From f1a797c36f8ed945f17c26ca519a99c411ce1ca6 Mon Sep 17 00:00:00 2001 From: Alexey Fedorov Date: Sun, 24 May 2026 01:45:28 -0700 Subject: [PATCH 01/16] chore(p-np): add test harness + bump to 4.4.0 (v4.4.0-client) --- package.json | 6 ++++-- tests/smoke.test.ts | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 tests/smoke.test.ts diff --git a/package.json b/package.json index 589cf9c..83fc41b 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,14 @@ { "name": "p-np-patcher", - "version": "4.3.0", + "version": "4.4.0", "description": "Fetches and patches Prodigy game files for static hosting", "main": "./dist/patch.js", "type": "module", "scripts": { "build": "node build.mjs", - "patch": "node dist/patch.js" + "patch": "node dist/patch.js", + "test": "node --experimental-strip-types --test \"tests/**/*.test.ts\"", + "typecheck": "tsc --noEmit" }, "repository": { "type": "git", diff --git a/tests/smoke.test.ts b/tests/smoke.test.ts new file mode 100644 index 0000000..aa882d1 --- /dev/null +++ b/tests/smoke.test.ts @@ -0,0 +1,8 @@ +import { describe, it } from "node:test"; +import assert from "node:assert/strict"; + +describe("smoke", () => { + it("test harness works", () => { + assert.equal(1 + 1, 2); + }); +}); From e33a54bcb34f4d97a0fac1de4b85b1117550598b Mon Sep 17 00:00:00 2001 From: Alexey Fedorov Date: Sun, 24 May 2026 01:49:31 -0700 Subject: [PATCH 02/16] feat(p-np): extract PatchRule + RULES + applyRules + hashRules Co-Authored-By: Claude Sonnet 4.6 --- src/patches.ts | 100 +++++++++++++++++++++++++++++++++++++++++ tests/patches.test.ts | 101 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 201 insertions(+) create mode 100644 src/patches.ts create mode 100644 tests/patches.test.ts diff --git a/src/patches.ts b/src/patches.ts new file mode 100644 index 0000000..86a5b4c --- /dev/null +++ b/src/patches.ts @@ -0,0 +1,100 @@ +import { createHash } from "node:crypto"; + +export type PatchRule = { + id: string; + description: string; + find: string; // RegExp source (no surrounding slashes) + flags: string; // RegExp flags ("" = first-match only; include "g" for replace-all) + replace: string; + minMatches: number; +}; + +// Ordered list of regex find/replace rules applied to game.min.js. +// All current Play Origin in-source patches converted to regex form, preserving +// first-match-vs-all semantics from the original patcher. +export const RULES: ReadonlyArray = [ + { + id: "singleton-exposure", + description: "Expose the prodigy singleton on window.__PNP__ in its constructor", + find: "(_instance=this\\),this\\._game=([A-Za-z_$][\\w$]*)\\}destroy\\(\\)\\{)", + flags: "", + replace: "_instance=this),window.__PNP__=this,this._game=$2}destroy(){", + minMatches: 1 + }, + { + id: "safe-bind", + description: "Wrap every gameContainer.bind call with __pnp_safeBind for idempotent (re)binding", + find: "([A-Za-z_$][\\w$]*\\.q\\.instance\\.prodigy\\.gameContainer)\\.bind\\(", + flags: "g", + replace: "window.__pnp_safeBind($1,", + minMatches: 1 + }, + { + id: "expose-constants", + description: "Alias the constants map onto window.__PNP_CONSTANTS_RAW__", + find: "([A-Za-z_$][\\w$]*)\\.constants=\\{\"GameConstants", + flags: "", + replace: "$1.constants=window.__PNP_CONSTANTS_RAW__={\"GameConstants", + minMatches: 1 + }, + { + id: "answer-question-bypass", + description: "Inject auto-answer bypass before the isOpen check in answerQuestion()", + find: "answerQuestion\\(\\)\\{if\\(!this\\._isOpen\\)", + flags: "", + replace: + "answerQuestion(){if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){const _w=Math.random()<(window._.constants.get('GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT')||1);this.onQuestionAnswered.dispatch(_w,0,null);_w?this.onQuestionAnsweredCorrectly.dispatch(0,null):this.onQuestionAnsweredIncorrectly.dispatch(0,null);return}if(!this._isOpen)", + minMatches: 1 + }, + { + id: "external-factory-bypass", + description: "Inject auto-answer bypass before const X=this.findParameter(\"externalFactory\")", + find: "(const [A-Za-z_$]=this\\.findParameter\\(\"externalFactory\"\\))", + flags: "", + replace: + "if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){const _w=Math.random()<(window._.constants.get('GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT')||1);this.finish({answerCorrect:_w,responseTime:0});return}$1", + minMatches: 1 + }, + { + id: "open-question-bypass", + description: "Inject early-return into openQuestionInterfaceThenEmitNotifications", + find: "openQuestionInterfaceThenEmitNotifications\\(([A-Za-z_$]),([A-Za-z_$]),([A-Za-z_$]),([A-Za-z_$]),([A-Za-z_$])\\)\\{this\\._education", + flags: "", + replace: + "openQuestionInterfaceThenEmitNotifications($1,$2,$3,$4,$5){if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){$5&&$5(!0,10,1,!1,!1,{});return}this._education", + minMatches: 1 + } +]; + +export type ApplyRulesOutcome = { + output: string; + perRuleCounts: Record; +}; + +export const applyRules = ( + source: string, + rules: ReadonlyArray +): ApplyRulesOutcome => { + const perRuleCounts: Record = {}; + let output = source; + for (const rule of rules) { + const re = new RegExp(rule.find, rule.flags); + let count = 0; + output = output.replace(re, (...args) => { + count += 1; + const groups = args.slice(1, -2); + let result = rule.replace; + groups.forEach((g, i) => { + result = result.replace(new RegExp("\\$" + (i + 1), "g"), g ?? ""); + }); + return result; + }); + perRuleCounts[rule.id] = count; + } + return { output, perRuleCounts }; +}; + +export const hashRules = (rules: ReadonlyArray): string => { + const canonical = JSON.stringify(rules); + return createHash("sha256").update(canonical).digest("hex").slice(0, 16); +}; diff --git a/tests/patches.test.ts b/tests/patches.test.ts new file mode 100644 index 0000000..6722547 --- /dev/null +++ b/tests/patches.test.ts @@ -0,0 +1,101 @@ +import { describe, it } from "node:test"; +import assert from "node:assert/strict"; +import { RULES, applyRules, hashRules, type PatchRule } from "../src/patches.ts"; + +describe("RULES shape", () => { + it("includes the singleton-exposure rule", () => { + const ids = RULES.map((r) => r.id); + assert.ok(ids.includes("singleton-exposure")); + }); + + it("every rule has the full PatchRule shape", () => { + for (const rule of RULES) { + assert.equal(typeof rule.id, "string"); + assert.equal(typeof rule.description, "string"); + assert.equal(typeof rule.find, "string"); + assert.equal(typeof rule.flags, "string"); + assert.equal(typeof rule.replace, "string"); + assert.equal(typeof rule.minMatches, "number"); + } + }); + + it("rule ids are unique", () => { + const ids = RULES.map((r) => r.id); + assert.equal(new Set(ids).size, ids.length); + }); +}); + +describe("applyRules — substitutions on synthetic bundle", () => { + it("singleton-exposure injects window.__PNP__", () => { + const input = `class X{constructor(){_instance=this),this._game=E}destroy(){}}`; + const { output, perRuleCounts } = applyRules(input, RULES); + assert.ok(output.includes("window.__PNP__=this")); + assert.ok((perRuleCounts["singleton-exposure"] ?? 0) >= 1); + }); + + it("safe-bind wraps gameContainer.bind calls", () => { + const input = `A.q.instance.prodigy.gameContainer.bind("MathTower")`; + const { output } = applyRules(input, RULES); + assert.ok(output.includes("window.__pnp_safeBind")); + assert.ok(!output.match(/[A-Za-z_$][\w$]*\.q\.instance\.prodigy\.gameContainer\.bind\(/)); + }); + + it("constants exposure aliases the constants map", () => { + const input = `var M={};M.constants={"GameConstants.Build.VERSION":"2026.18.1"}`; + const { output } = applyRules(input, RULES); + assert.ok(output.includes("__PNP_CONSTANTS_RAW__")); + }); + + it("answerQuestion bypass injects before the if-isOpen check", () => { + const input = `answerQuestion(){if(!this._isOpen){this._doStuff()}}`; + const { output, perRuleCounts } = applyRules(input, RULES); + assert.ok(output.includes("AUTO_ANSWER_CORRECT_PERCENT")); + assert.ok((perRuleCounts["answer-question-bypass"] ?? 0) >= 1); + }); + + it("externalFactory bypass wraps the findParameter call", () => { + const input = `function f(){const Q=this.findParameter("externalFactory");return Q.thing()}`; + const { output } = applyRules(input, RULES); + assert.ok(output.includes("EDUCATION_ENABLED")); + assert.ok(output.includes(`const Q=this.findParameter("externalFactory")`)); + }); + + it("openQuestionInterfaceThenEmitNotifications bypass injects the early return", () => { + const input = `class C{openQuestionInterfaceThenEmitNotifications(a,b,c,d,e){this._education.thing()}}`; + const { output, perRuleCounts } = applyRules(input, RULES); + assert.ok(output.includes("EDUCATION_ENABLED")); + assert.ok((perRuleCounts["open-question-bypass"] ?? 0) >= 1); + }); +}); + +describe("applyRules — counting + return shape", () => { + it("reports per-rule counts as numbers", () => { + const { perRuleCounts } = applyRules("nothing here", RULES); + for (const rule of RULES) { + assert.equal(typeof perRuleCounts[rule.id], "number"); + } + }); + + it("preserves source when no rule matches", () => { + const { output } = applyRules("just text", RULES); + assert.equal(output, "just text"); + }); +}); + +describe("hashRules", () => { + it("returns a 16-char hex string", () => { + const hash = hashRules(RULES); + assert.equal(hash.length, 16); + assert.match(hash, /^[0-9a-f]{16}$/); + }); + + it("is deterministic", () => { + assert.equal(hashRules(RULES), hashRules(RULES)); + }); + + it("changes when rules change", () => { + const a: PatchRule = { id: "x", description: "", find: "a", flags: "g", replace: "b", minMatches: 1 }; + const b: PatchRule = { id: "x", description: "", find: "a", flags: "g", replace: "c", minMatches: 1 }; + assert.notEqual(hashRules([a]), hashRules([b])); + }); +}); From 8d260b867d26b5d937f413be897923e9ab6e4c24 Mon Sep 17 00:00:00 2001 From: Alexey Fedorov Date: Sun, 24 May 2026 01:56:20 -0700 Subject: [PATCH 03/16] feat(p-np): extract buildPrefix + buildSuffix into wrappers.ts Co-Authored-By: Claude Sonnet 4.6 --- src/wrappers.ts | 342 +++++++++++++++++++++++++++++++++++++++++ tests/wrappers.test.ts | 88 +++++++++++ 2 files changed, 430 insertions(+) create mode 100644 src/wrappers.ts create mode 100644 tests/wrappers.test.ts diff --git a/src/wrappers.ts b/src/wrappers.ts new file mode 100644 index 0000000..2f33084 --- /dev/null +++ b/src/wrappers.ts @@ -0,0 +1,342 @@ +export const buildPrefix = (version: string): string => { + return ` +/** P-NP Patcher v${version} — Prefix **/ +const _getBox=(o,t)=>({string:"+",style:"font-size: 1px; padding: 0 "+Math.floor(o/2)+"px; line-height: "+t+"px;"}); +console.image=((o,t=1)=>{const e=new Image;e.onload=(()=>{const n=_getBox(e.width*t,e.height*t); +console.log("%c"+n.string,n.style+"background: url("+o+"); background-size: "+e.width*t+"px " ++e.height*t+"px; color: transparent;")}),e.src=o}); +const _pnpOldLog = console.log.bind(console); +console.log = (...d) => { + if (d && d.length && typeof d[0] === "string" && d[0].includes("This is a browser feature for developers only")) return "lol no"; + if (new Error().stack?.split("\\n").reverse()[0]?.includes("load-identity")) return "denied"; + return _pnpOldLog(...d); +}; +/** Ensure window._ exists before game code (lodash may load separately) **/ +if (typeof window._ === 'undefined' || window._ === null) window._ = {}; +window.__PNP_ORIG_UNDERSCORE__ = window._; +window._.variables = Object.create(null); +/** Pre-init _.constants as empty obj with Map-like API so game-side patches don't crash + * before the suffix wires up __PNP_CONSTANTS_RAW__. Real values populated post-game-load. **/ +if (!window._.constants) { + var _c = Object.create(null); + _c.get = function(k) { return _c[k]; }; + _c.set = function(k, v) { _c[k] = v; return _c; }; + _c.has = function(k) { return k in _c; }; + _c.constants = _c; + window._.constants = _c; +} + +/** Fix Inversify duplicate binding errors (e.g. "Ambiguous match: MathTower"). + * Some installers bind services to the GLOBAL gameContainer and can fire more + * than once in the patched execution context. We define a helper that the + * game-code patch below uses to safely bind (rebind if already bound). */ +window.__pnp_safeBind = function(container, id) { + try { + var inv = container._inversifyContainer || container; + if (typeof inv.isBound === 'function' && inv.isBound(id)) { + return (typeof container.rebind === 'function') ? container.rebind(id) : inv.rebind(id); + } + } catch(e) {} + return container.bind(id); +}; + +/** Guard SW.Load.decrementLoadSemaphore against duplicate calls. + * ROOT CAUSE: The old extension build (fetch+onreset approach) appends a second + * SW.Load.decrementLoadSemaphore() call after the game code, AND the patcher + * suffix calls it too → createGame() fires twice → all Inversify bind() calls + * run twice on the same container → "Ambiguous match found for MathTower" crash. + * + * Fix: wrap the function so only the FIRST call triggers createGame(). + * This works for both old extension (fetch+onreset) and new extension (doc-rewrite). */ +/** Runtime service discovery — enumerate Inversify bindings and match by shape (duck-typing). + * This replaces hardcoded service IDs that break every game update. */ +window.__pnp_discoverService = function(gc, shapeFn, label) { + try { + var map = gc._inversifyContainer._bindingDictionary._map; + if (!map) return null; + var hexPattern = /^[0-9a-f]{2,4}-[0-9a-f]{2,6}$/; + var iter = map.keys(); + var next = iter.next(); + while (!next.done) { + var id = next.value; + next = iter.next(); + if (typeof id !== 'string' || !hexPattern.test(id)) continue; + try { + var inst = gc.get(id); + if (inst && shapeFn(inst)) { + console.log("[Play Origin] Discovered " + label + " \\u2192 " + id); + return inst; + } + } catch(e) {} + } + } catch(e) { + console.warn("[Play Origin] Discovery failed for " + label + ":", e); + } + return null; +}; + +if (typeof SW !== 'undefined' && SW.Load && typeof SW.Load.decrementLoadSemaphore === 'function') { + var _pnpOrigDecrement = SW.Load.decrementLoadSemaphore.bind(SW.Load); + SW.Load.decrementLoadSemaphore = function() { + if (window.__PNP_SEM_DECREMENTED__) { + console.warn("[Play Origin] SW.Load.decrementLoadSemaphore() called twice — blocking duplicate createGame()"); + return; + } + window.__PNP_SEM_DECREMENTED__ = true; + return _pnpOrigDecrement(); + }; +} +`; +}; + +export const buildSuffix = ( + version: string, + guiLink: string, + displayImages: ReadonlyArray +): string => { + return ` +/** P-NP Patcher v${version} — Suffix **/ + +/* ── 1. Immediate: Signal game script loaded ── */ +SW.Load.decrementLoadSemaphore(); +console.log("%cP-NP Patcher", "font-size:40px;color:#540052;font-weight:900;font-family:sans-serif;"); +console.log("%cVersion ${version}", "font-size:20px;color:#000025;font-weight:700;font-family:sans-serif;"); +console.image((e => e[Math.floor(Math.random() * e.length)])(${JSON.stringify(displayImages)})); + +/* ── 2. Setup P-NP properties (waits for lodash if needed) ── */ +(function _pnpSetup() { + function _applyProps() { + const W = window; + if (!W._) W._ = {}; + + /* variables & functions namespaces */ + if (!W._.variables) W._.variables = Object.create(null); + W._.functions = Object.create(null); + + /* _.instance → the prodigy singleton exposed by our constructor patch */ + Object.defineProperty(W._, "instance", { + get: () => W.__PNP__, + enumerable: true, configurable: true + }); + + /* _.constants → raw plain object with Map-compatible .get()/.set() + self-alias .constants + * WHY: cheatGUI uses _.constants.constants["GameConstants.X"] = val (plain object writes) + * patcher game-side bypasses use _.constants.get("GameConstants.X") (Map-like reads) + * Both must work on the same underlying storage. We make _.constants the raw object + * and bolt on get/set/has methods + a .constants self-alias so every call site works. */ + if (W.__PNP_CONSTANTS_RAW__) { + var raw = W.__PNP_CONSTANTS_RAW__; + /* bolt Map-like API onto the plain object */ + raw.get = function(key) { return raw[key]; }; + raw.set = function(key, val) { raw[key] = val; return raw; }; + raw.has = function(key) { return key in raw; }; + /* self-alias: _.constants.constants["GameConstants.X"] = val */ + raw.constants = raw; + W._.constants = raw; + } + + /* _.player → discovered dynamically from DI container by shape. + * Cache the SERVICE (stable ref), not the player object (.player getter + * returns a new object each call). */ + Object.defineProperty(W._, "player", { + get: function() { + if (W.__PNP_PLAYER_SVC__) return W.__PNP_PLAYER_SVC__.player; + try { + var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer; + if (!gc) return null; + var svc = W.__pnp_discoverService(gc, function(inst) { + try { var p = inst.player; return p && typeof p === 'object' && ('data' in p); } + catch(e) { return false; } + }, "PlayerService"); + if (svc) { + W.__PNP_PLAYER_SVC__ = svc; + return svc.player; + } + } catch(e) {} + return null; + }, + enumerable: true, configurable: true + }); + + /* _.gameData */ + Object.defineProperty(W._, "gameData", { + get: () => { + try { return W.__PNP__?.game?.state?.states?.get?.("Boot")?._gameData; } + catch(e) { return null; } + }, + enumerable: true, configurable: true + }); + + /* _.localizer */ + Object.defineProperty(W._, "localizer", { + get: () => { + try { return W.__PNP__?.prodigy?.gameContainer?.get("LocalizationService"); } + catch(e) { return null; } + }, + enumerable: true, configurable: true + }); + + /* _.network → discovered dynamically from DI container by shape */ + Object.defineProperty(W._, "network", { + get: function() { + if (W.__PNP_NETWORK__) return W.__PNP_NETWORK__; + try { + var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer; + if (!gc) return null; + var nm = W.__pnp_discoverService(gc, function(inst) { + return typeof inst.getCharData === 'function' + && ('processPlayer' in inst) + && typeof inst.sendZoneEvent === 'function'; + }, "NetworkManager"); + if (nm && typeof nm === "object") { + if (!nm.game) { + Object.defineProperty(nm, "game", { + get: function() { return W.__PNP__ && W.__PNP__.game; }, + enumerable: true, configurable: true + }); + } + W.__PNP_NETWORK__ = nm; + return nm; + } + } catch(e) {} + return null; + }, + enumerable: true, configurable: true + }); + + /* _.hack → self-reference */ + Object.defineProperty(W._, "hack", { + get: () => W._, enumerable: true, configurable: true + }); + + /* Escape battle helper — handles SecureBattleRevamp via BattleController */ + W._.functions.escapeBattle = () => { + try { + const g = W.__PNP__?.game; + const currentState = g?.state?.current; + if (currentState === "PVP") { + g.state.states.PVP.endPVP(); + } else if (currentState === "CoOp") { + W.__PNP__.prodigy.world.$(W._.player?.data?.zone); + } else if (currentState === "SecureBattleRevamp") { + const st = g.state.states.get("SecureBattleRevamp"); + const bc = st?._battleController; + if (bc?.escapeBattle) bc.escapeBattle(); + else g?.state?.callbackContext?.runAwayCallback(); + } else { + g?.state?.callbackContext?.runAwayCallback(); + } + } catch(e) { console.warn("[Play Origin] escapeBattle failed:", e); } + }; + + /* _.membership → discovered by shape (isMember getter + hasFeatureAccess). + * Service ID drifts per build; shape is stable. */ + Object.defineProperty(W._, "membership", { + get: function() { + if (W.__PNP_MEMBERSHIP__) return W.__PNP_MEMBERSHIP__; + try { + var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer; + if (!gc) return null; + var ms = W.__pnp_discoverService(gc, function(inst) { + return inst && typeof inst.hasFeatureAccess === 'function' + && 'isMember' in inst; + }, "MembershipService"); + if (ms) { W.__PNP_MEMBERSHIP__ = ms; return ms; } + } catch(e) {} + return null; + }, + enumerable: true, configurable: true + }); + + /* _.functions.setMembership(bool) — deep membership override. + memberTier is derived from three hasFeatureAccess checks, so forcing it to return + true auto-promotes to Ultra tier. We snapshot the original _data on first call so + disable restores it. */ + W._.functions.setMembership = function(active) { + var ms = W._.membership; + if (!ms) return false; + if (!W.__PNP_MEMBERSHIP_ORIG__) { + W.__PNP_MEMBERSHIP_ORIG__ = { data: ms._data }; + } + if (active) { + var start = new Date(Date.now() - 86400000).toISOString(); + var end = new Date(Date.now() + 365 * 86400000 * 10).toISOString(); + ms._data = { + active: true, + features: [], + membershipStartTs: start, + membershipEndTs: end + }; + Object.defineProperty(ms, "hasFeatureAccess", { + value: function() { return true; }, + configurable: true, writable: true + }); + try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {} + try { W._.player && W._.player.unlockMemberItems && W._.player.unlockMemberItems(); } catch(e) {} + } else { + ms._data = W.__PNP_MEMBERSHIP_ORIG__.data; + if (Object.getOwnPropertyDescriptor(ms, "hasFeatureAccess")) { + delete ms.hasFeatureAccess; + } + try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {} + } + try { W._.player && (W._.player.appearanceChanged = true); } catch(e) {} + return true; + }; + + if (!W.__PNP_PROPS_APPLIED__) { + W.__PNP_PROPS_APPLIED__ = true; + console.log("[Play Origin] Properties applied to window._"); + } + } + + /* Lodash loads as a SEPARATE script AFTER game.min.js. + When it loads, it overwrites window._ entirely — and the game keeps + reassigning window._ (chunks, runInContext, etc.) indefinitely. + We PERMANENTLY poll and re-apply our properties whenever they're + missing. The 500ms interval is negligible overhead. */ + _applyProps(); + + var _pnpPollTick = function() { + try { + const desc = Object.getOwnPropertyDescriptor(window._, 'instance'); + if (!desc || !desc.get || !window.__PNP__) { + _applyProps(); + } + /* Singleton auto-fix: the constructor may fire twice (onreset context). + Our patch captures the first instance, but the REAL fully-initialized + singleton (with #prodigy set) is stored on the class's static _instance. + Detect the mismatch and update __PNP__ to the real one. */ + if (window.__PNP__ && !window.__PNP__.prodigy) { + try { + var ctor = Object.getPrototypeOf(window.__PNP__).constructor; + if (ctor._instance && ctor._instance !== window.__PNP__ && ctor._instance.prodigy) { + window.__PNP__ = ctor._instance; + console.log("[Play Origin] Singleton auto-fixed to real instance (prodigy available)"); + } + } catch(e) {} + } + /* Trigger lazy discovery for player and network via their getters */ + if (!window.__PNP_PLAYER_SVC__ && window.__PNP__) { + try { void window._.player; } catch(e) {} + } + if (!window.__PNP_NETWORK__ && window.__PNP__) { + try { void window._.network; } catch(e) {} + } + } catch(e) { _applyProps(); } + }; + setInterval(_pnpPollTick, 500); +})(); + +/* ── 3. CheatGUI loader (delayed to ensure game is ready) ── */ +var _pnpLoadGUI = async () => { + try { + eval(await (await fetch("${guiLink}")).text()); + } catch(e) { + console.error("[Play Origin] CheatGUI load failed:", e); + } +}; +setTimeout(_pnpLoadGUI, 15000); +console.trace = () => {}; +`; +}; diff --git a/tests/wrappers.test.ts b/tests/wrappers.test.ts new file mode 100644 index 0000000..aeae4d9 --- /dev/null +++ b/tests/wrappers.test.ts @@ -0,0 +1,88 @@ +import { describe, it } from "node:test"; +import assert from "node:assert/strict"; +import { buildPrefix, buildSuffix } from "../src/wrappers.ts"; + +describe("buildPrefix", () => { + it("returns a string", () => { + assert.equal(typeof buildPrefix("9.9.9"), "string"); + }); + + it("interpolates the version into the patcher header", () => { + const out = buildPrefix("9.9.9"); + assert.ok(out.includes("P-NP Patcher v9.9.9 — Prefix")); + }); + + it("includes console.image helper", () => { + const out = buildPrefix("4.4.0"); + assert.ok(out.includes("console.image")); + }); + + it("defines window.__pnp_safeBind", () => { + const out = buildPrefix("4.4.0"); + assert.ok(out.includes("window.__pnp_safeBind")); + }); + + it("defines window.__pnp_discoverService", () => { + const out = buildPrefix("4.4.0"); + assert.ok(out.includes("window.__pnp_discoverService")); + }); + + it("guards SW.Load.decrementLoadSemaphore against duplicate calls", () => { + const out = buildPrefix("4.4.0"); + assert.ok(out.includes("__PNP_SEM_DECREMENTED__")); + }); + + it("pre-inits window._.constants with map-like API", () => { + const out = buildPrefix("4.4.0"); + assert.ok(out.includes("window._.constants")); + }); +}); + +describe("buildSuffix", () => { + it("returns a string", () => { + assert.equal(typeof buildSuffix("4.4.0", "https://example.com/bundle.js", ["https://img/1.png"]), "string"); + }); + + it("interpolates the version into the patcher header", () => { + const out = buildSuffix("4.4.0", "https://example.com/bundle.js", []); + assert.ok(out.includes("P-NP Patcher v4.4.0 — Suffix")); + }); + + it("interpolates the GUI link verbatim into the loader fetch", () => { + const guiLink = "https://raw.githubusercontent.com/foo/bar/main/dist/bundle.js"; + const out = buildSuffix("4.4.0", guiLink, []); + assert.ok(out.includes(guiLink)); + }); + + it("serializes displayImages as a JSON array literal in console.image", () => { + const out = buildSuffix("4.4.0", "https://x/y.js", ["https://a/1.png", "https://b/2.png"]); + assert.ok(out.includes(JSON.stringify(["https://a/1.png", "https://b/2.png"]))); + }); + + it("calls SW.Load.decrementLoadSemaphore at the top", () => { + const out = buildSuffix("4.4.0", "https://x/y.js", []); + assert.ok(out.includes("SW.Load.decrementLoadSemaphore()")); + }); + + it("schedules the CheatGUI loader via setTimeout(15000)", () => { + const out = buildSuffix("4.4.0", "https://x/y.js", []); + assert.match(out, /setTimeout\([^)]+,\s*15000\)/); + }); + + it("polls every 500ms to re-apply window._ properties", () => { + const out = buildSuffix("4.4.0", "https://x/y.js", []); + assert.match(out, /setInterval\([^)]+,\s*500\)/); + }); + + it("exposes _.player via discovery", () => { + const out = buildSuffix("4.4.0", "https://x/y.js", []); + assert.ok(out.includes("PlayerService")); + assert.ok(out.includes("_.player") || out.includes('"player"')); + }); + + it("exposes _.membership via discovery + setMembership helper", () => { + const out = buildSuffix("4.4.0", "https://x/y.js", []); + assert.ok(out.includes("MembershipService")); + assert.ok(out.includes("setMembership")); + }); +}); From 3dc65d2e474fda519e5677843fa5cfa0bf5ccbde Mon Sep 17 00:00:00 2001 From: Alexey Fedorov Date: Sun, 24 May 2026 01:57:47 -0700 Subject: [PATCH 04/16] refactor(p-np): restore verbatim suffix, loosen timer regex tests Undo the named-callback extraction (_pnpLoadGUI / _pnpPollTick) from buildSuffix and restore the original inline IIFE forms that match patch.ts byte-for-byte. Loosen the two timer regex tests to tolerate nested parens in the timer callbacks. Co-Authored-By: Claude Sonnet 4.6 --- src/wrappers.ts | 21 ++++++++++----------- tests/wrappers.test.ts | 6 ++++-- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/wrappers.ts b/src/wrappers.ts index 2f33084..ea187bf 100644 --- a/src/wrappers.ts +++ b/src/wrappers.ts @@ -297,7 +297,7 @@ console.image((e => e[Math.floor(Math.random() * e.length)])(${JSON.stringify(di missing. The 500ms interval is negligible overhead. */ _applyProps(); - var _pnpPollTick = function() { + setInterval(() => { try { const desc = Object.getOwnPropertyDescriptor(window._, 'instance'); if (!desc || !desc.get || !window.__PNP__) { @@ -324,19 +324,18 @@ console.image((e => e[Math.floor(Math.random() * e.length)])(${JSON.stringify(di try { void window._.network; } catch(e) {} } } catch(e) { _applyProps(); } - }; - setInterval(_pnpPollTick, 500); + }, 500); })(); /* ── 3. CheatGUI loader (delayed to ensure game is ready) ── */ -var _pnpLoadGUI = async () => { - try { - eval(await (await fetch("${guiLink}")).text()); - } catch(e) { - console.error("[Play Origin] CheatGUI load failed:", e); - } -}; -setTimeout(_pnpLoadGUI, 15000); +setTimeout(() => + (async () => { + try { + eval(await (await fetch("${guiLink}")).text()); + } catch(e) { + console.error("[Play Origin] CheatGUI load failed:", e); + } + })(), 15000); console.trace = () => {}; `; }; diff --git a/tests/wrappers.test.ts b/tests/wrappers.test.ts index aeae4d9..d8f5b16 100644 --- a/tests/wrappers.test.ts +++ b/tests/wrappers.test.ts @@ -66,12 +66,14 @@ describe("buildSuffix", () => { it("schedules the CheatGUI loader via setTimeout(15000)", () => { const out = buildSuffix("4.4.0", "https://x/y.js", []); - assert.match(out, /setTimeout\([^)]+,\s*15000\)/); + assert.ok(/setTimeout\b/.test(out)); + assert.ok(/,\s*15000\)/.test(out)); }); it("polls every 500ms to re-apply window._ properties", () => { const out = buildSuffix("4.4.0", "https://x/y.js", []); - assert.match(out, /setInterval\([^)]+,\s*500\)/); + assert.ok(/setInterval\b/.test(out)); + assert.ok(/,\s*500\)/.test(out)); }); it("exposes _.player via discovery", () => { From a5fc8cf751d6b699ffc1a58935208a542296b35f Mon Sep 17 00:00:00 2001 From: Alexey Fedorov Date: Sun, 24 May 2026 02:00:59 -0700 Subject: [PATCH 05/16] feat(p-np): add Manifest type + buildManifest + hashManifest --- src/manifest.ts | 34 ++++++++++++++++++++++ tests/manifest.test.ts | 66 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 src/manifest.ts create mode 100644 tests/manifest.test.ts diff --git a/src/manifest.ts b/src/manifest.ts new file mode 100644 index 0000000..99bb988 --- /dev/null +++ b/src/manifest.ts @@ -0,0 +1,34 @@ +import { createHash } from "node:crypto"; +import type { PatchRule } from "./patches.ts"; + +export type Manifest = { + schemaVersion: 1; + patcherVersion: string; + hash: string; + rules: ReadonlyArray; + prefix: string; + suffix: string; +}; + +export const hashManifest = ( + rules: ReadonlyArray, + prefix: string, + suffix: string +): string => { + const canonical = JSON.stringify({ rules, prefix, suffix }); + return createHash("sha256").update(canonical).digest("hex").slice(0, 16); +}; + +export const buildManifest = (input: { + patcherVersion: string; + rules: ReadonlyArray; + prefix: string; + suffix: string; +}): Manifest => ({ + schemaVersion: 1, + patcherVersion: input.patcherVersion, + hash: hashManifest(input.rules, input.prefix, input.suffix), + rules: input.rules, + prefix: input.prefix, + suffix: input.suffix +}); diff --git a/tests/manifest.test.ts b/tests/manifest.test.ts new file mode 100644 index 0000000..43a58fa --- /dev/null +++ b/tests/manifest.test.ts @@ -0,0 +1,66 @@ +import { describe, it } from "node:test"; +import assert from "node:assert/strict"; +import { buildManifest, hashManifest, type Manifest } from "../src/manifest.ts"; +import { RULES } from "../src/patches.ts"; + +describe("buildManifest", () => { + it("produces a Manifest with schemaVersion=1", () => { + const m = buildManifest({ + patcherVersion: "4.4.0", + rules: RULES, + prefix: "PREFIX", + suffix: "SUFFIX" + }); + assert.equal(m.schemaVersion, 1); + }); + + it("includes patcherVersion verbatim", () => { + const m = buildManifest({ + patcherVersion: "9.9.9", + rules: RULES, + prefix: "P", + suffix: "S" + }); + assert.equal(m.patcherVersion, "9.9.9"); + }); + + it("attaches the hash field as a 16-char hex string", () => { + const m = buildManifest({ + patcherVersion: "4.4.0", + rules: RULES, + prefix: "P", + suffix: "S" + }); + assert.equal(m.hash.length, 16); + assert.match(m.hash, /^[0-9a-f]{16}$/); + }); + + it("the hash field equals hashManifest(rules, prefix, suffix)", () => { + const m = buildManifest({ + patcherVersion: "4.4.0", + rules: RULES, + prefix: "P", + suffix: "S" + }); + assert.equal(m.hash, hashManifest(RULES, "P", "S")); + }); +}); + +describe("hashManifest", () => { + it("is deterministic", () => { + assert.equal(hashManifest(RULES, "P", "S"), hashManifest(RULES, "P", "S")); + }); + + it("changes when prefix changes", () => { + assert.notEqual(hashManifest(RULES, "P1", "S"), hashManifest(RULES, "P2", "S")); + }); + + it("changes when suffix changes", () => { + assert.notEqual(hashManifest(RULES, "P", "S1"), hashManifest(RULES, "P", "S2")); + }); + + it("changes when rules change", () => { + const empty: Manifest["rules"] = []; + assert.notEqual(hashManifest(RULES, "P", "S"), hashManifest(empty, "P", "S")); + }); +}); From a05648b3f07b2a39b8886eeaf84b0d3d67267dae Mon Sep 17 00:00:00 2001 From: Alexey Fedorov Date: Sun, 24 May 2026 02:17:27 -0700 Subject: [PATCH 06/16] feat(p-np): emit manifest.json alongside game.min.js (v4.4.0-client) Refactors src/patch.ts to delegate to patches.ts (RULES + applyRules), wrappers.ts (buildPrefix + buildSuffix), and manifest.ts (buildManifest). Now emits dist/manifest.json, dist/game.min.js (verification copy), and dist/metadata.json with manifestHash + perRuleCounts. Switches from throw-on-degraded to graceful degradation (patchDegraded flag). All 6 rules matched live bundle; patchDegraded=false. Co-Authored-By: Claude Sonnet 4.6 --- dist/game.min.js | 2 +- dist/manifest.json | 57 +++++ dist/metadata.json | 11 +- src/patch.ts | 550 ++++++--------------------------------------- 4 files changed, 132 insertions(+), 488 deletions(-) create mode 100644 dist/manifest.json diff --git a/dist/game.min.js b/dist/game.min.js index 8dea735..139dcd3 100644 --- a/dist/game.min.js +++ b/dist/game.min.js @@ -1,4 +1,4 @@ -// game.min.js v2026.25.0 +// game.min.js v2026.25.0 (verification copy — extension uses manifest.json) /** P-NP Patcher v4.3.0 — Prefix **/ diff --git a/dist/manifest.json b/dist/manifest.json new file mode 100644 index 0000000..1c9187f --- /dev/null +++ b/dist/manifest.json @@ -0,0 +1,57 @@ +{ + "schemaVersion": 1, + "patcherVersion": "4.3.0", + "hash": "4509448a4c39c84d", + "rules": [ + { + "id": "singleton-exposure", + "description": "Expose the prodigy singleton on window.__PNP__ in its constructor", + "find": "(_instance=this\\),this\\._game=([A-Za-z_$][\\w$]*)\\}destroy\\(\\)\\{)", + "flags": "", + "replace": "_instance=this),window.__PNP__=this,this._game=$2}destroy(){", + "minMatches": 1 + }, + { + "id": "safe-bind", + "description": "Wrap every gameContainer.bind call with __pnp_safeBind for idempotent (re)binding", + "find": "([A-Za-z_$][\\w$]*\\.q\\.instance\\.prodigy\\.gameContainer)\\.bind\\(", + "flags": "g", + "replace": "window.__pnp_safeBind($1,", + "minMatches": 1 + }, + { + "id": "expose-constants", + "description": "Alias the constants map onto window.__PNP_CONSTANTS_RAW__", + "find": "([A-Za-z_$][\\w$]*)\\.constants=\\{\"GameConstants", + "flags": "", + "replace": "$1.constants=window.__PNP_CONSTANTS_RAW__={\"GameConstants", + "minMatches": 1 + }, + { + "id": "answer-question-bypass", + "description": "Inject auto-answer bypass before the isOpen check in answerQuestion()", + "find": "answerQuestion\\(\\)\\{if\\(!this\\._isOpen\\)", + "flags": "", + "replace": "answerQuestion(){if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){const _w=Math.random()<(window._.constants.get('GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT')||1);this.onQuestionAnswered.dispatch(_w,0,null);_w?this.onQuestionAnsweredCorrectly.dispatch(0,null):this.onQuestionAnsweredIncorrectly.dispatch(0,null);return}if(!this._isOpen)", + "minMatches": 1 + }, + { + "id": "external-factory-bypass", + "description": "Inject auto-answer bypass before const X=this.findParameter(\"externalFactory\")", + "find": "(const [A-Za-z_$]=this\\.findParameter\\(\"externalFactory\"\\))", + "flags": "", + "replace": "if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){const _w=Math.random()<(window._.constants.get('GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT')||1);this.finish({answerCorrect:_w,responseTime:0});return}$1", + "minMatches": 1 + }, + { + "id": "open-question-bypass", + "description": "Inject early-return into openQuestionInterfaceThenEmitNotifications", + "find": "openQuestionInterfaceThenEmitNotifications\\(([A-Za-z_$]),([A-Za-z_$]),([A-Za-z_$]),([A-Za-z_$]),([A-Za-z_$])\\)\\{this\\._education", + "flags": "", + "replace": "openQuestionInterfaceThenEmitNotifications($1,$2,$3,$4,$5){if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){$5&&$5(!0,10,1,!1,!1,{});return}this._education", + "minMatches": 1 + } + ], + "prefix": "\n/** P-NP Patcher v4.3.0 — Prefix **/\nconst _getBox=(o,t)=>({string:\"+\",style:\"font-size: 1px; padding: 0 \"+Math.floor(o/2)+\"px; line-height: \"+t+\"px;\"});\nconsole.image=((o,t=1)=>{const e=new Image;e.onload=(()=>{const n=_getBox(e.width*t,e.height*t);\nconsole.log(\"%c\"+n.string,n.style+\"background: url(\"+o+\"); background-size: \"+e.width*t+\"px \"\n+e.height*t+\"px; color: transparent;\")}),e.src=o});\nconst _pnpOldLog = console.log.bind(console);\nconsole.log = (...d) => {\n if (d && d.length && typeof d[0] === \"string\" && d[0].includes(\"This is a browser feature for developers only\")) return \"lol no\";\n if (new Error().stack?.split(\"\\n\").reverse()[0]?.includes(\"load-identity\")) return \"denied\";\n return _pnpOldLog(...d);\n};\n/** Ensure window._ exists before game code (lodash may load separately) **/\nif (typeof window._ === 'undefined' || window._ === null) window._ = {};\nwindow.__PNP_ORIG_UNDERSCORE__ = window._;\nwindow._.variables = Object.create(null);\n/** Pre-init _.constants as empty obj with Map-like API so game-side patches don't crash\n * before the suffix wires up __PNP_CONSTANTS_RAW__. Real values populated post-game-load. **/\nif (!window._.constants) {\n var _c = Object.create(null);\n _c.get = function(k) { return _c[k]; };\n _c.set = function(k, v) { _c[k] = v; return _c; };\n _c.has = function(k) { return k in _c; };\n _c.constants = _c;\n window._.constants = _c;\n}\n\n/** Fix Inversify duplicate binding errors (e.g. \"Ambiguous match: MathTower\").\n * Some installers bind services to the GLOBAL gameContainer and can fire more\n * than once in the patched execution context. We define a helper that the\n * game-code patch below uses to safely bind (rebind if already bound). */\nwindow.__pnp_safeBind = function(container, id) {\n try {\n var inv = container._inversifyContainer || container;\n if (typeof inv.isBound === 'function' && inv.isBound(id)) {\n return (typeof container.rebind === 'function') ? container.rebind(id) : inv.rebind(id);\n }\n } catch(e) {}\n return container.bind(id);\n};\n\n/** Guard SW.Load.decrementLoadSemaphore against duplicate calls.\n * ROOT CAUSE: The old extension build (fetch+onreset approach) appends a second\n * SW.Load.decrementLoadSemaphore() call after the game code, AND the patcher\n * suffix calls it too → createGame() fires twice → all Inversify bind() calls\n * run twice on the same container → \"Ambiguous match found for MathTower\" crash.\n *\n * Fix: wrap the function so only the FIRST call triggers createGame().\n * This works for both old extension (fetch+onreset) and new extension (doc-rewrite). */\n/** Runtime service discovery — enumerate Inversify bindings and match by shape (duck-typing).\n * This replaces hardcoded service IDs that break every game update. */\nwindow.__pnp_discoverService = function(gc, shapeFn, label) {\n try {\n var map = gc._inversifyContainer._bindingDictionary._map;\n if (!map) return null;\n var hexPattern = /^[0-9a-f]{2,4}-[0-9a-f]{2,6}$/;\n var iter = map.keys();\n var next = iter.next();\n while (!next.done) {\n var id = next.value;\n next = iter.next();\n if (typeof id !== 'string' || !hexPattern.test(id)) continue;\n try {\n var inst = gc.get(id);\n if (inst && shapeFn(inst)) {\n console.log(\"[Play Origin] Discovered \" + label + \" \\u2192 \" + id);\n return inst;\n }\n } catch(e) {}\n }\n } catch(e) {\n console.warn(\"[Play Origin] Discovery failed for \" + label + \":\", e);\n }\n return null;\n};\n\nif (typeof SW !== 'undefined' && SW.Load && typeof SW.Load.decrementLoadSemaphore === 'function') {\n var _pnpOrigDecrement = SW.Load.decrementLoadSemaphore.bind(SW.Load);\n SW.Load.decrementLoadSemaphore = function() {\n if (window.__PNP_SEM_DECREMENTED__) {\n console.warn(\"[Play Origin] SW.Load.decrementLoadSemaphore() called twice — blocking duplicate createGame()\");\n return;\n }\n window.__PNP_SEM_DECREMENTED__ = true;\n return _pnpOrigDecrement();\n };\n}\n", + "suffix": "\n/** P-NP Patcher v4.3.0 — Suffix **/\n\n/* ── 1. Immediate: Signal game script loaded ── */\nSW.Load.decrementLoadSemaphore();\nconsole.log(\"%cP-NP Patcher\", \"font-size:40px;color:#540052;font-weight:900;font-family:sans-serif;\");\nconsole.log(\"%cVersion 4.3.0\", \"font-size:20px;color:#000025;font-weight:700;font-family:sans-serif;\");\nconsole.image((e => e[Math.floor(Math.random() * e.length)])([\"https://i.imgur.com/bPtAQ8I.png\",\"https://i.imgur.com/EVbS5zG.png\",\"https://i.imgur.com/ij1DgZi.png\",\"https://i.imgur.com/lJTWDu2.png\",\"https://i.imgur.com/EPAdHYN.png\",\"https://i.imgur.com/5S5Tr1t.png\",\"https://i.imgur.com/d3BGwnZ.png\",\"https://i.imgur.com/Thdxszk.png\",\"https://i.imgur.com/zpyv4TJ.png\",\"https://i.imgur.com/lHztg3K.png\",\"https://i.imgur.com/Odu0WDF.png\",\"https://i.imgur.com/ExRgzlL.png\",\"https://i.imgur.com/2tj8ArT.png\",\"https://i.imgur.com/JMVR4wZ.png\",\"https://i.imgur.com/QhybQ9J.png\",\"https://i.imgur.com/sFdJp9c.png\",\"https://i.imgur.com/N4XnUY6.png\",\"https://i.imgur.com/0ivwtH8.png\",\"https://i.imgur.com/qJJh7nf.png\",\"https://i.imgur.com/BTnE99I.png\",\"https://i.imgur.com/T0LEsCe.png\",\"https://i.imgur.com/Nh20Jwl.png\",\"https://i.imgur.com/MvV56er.png\",\"https://i.imgur.com/Jyd6Uuy.png\",\"https://i.imgur.com/a3Tfych.png\",\"https://i.imgur.com/oNZIEhl.png\",\"https://i.imgur.com/VEJxBcM.png\",\"https://i.imgur.com/5UvWETx.png\",\"https://i.imgur.com/Pt9u23U.png\",\"https://i.imgur.com/Q5nVNus.png\",\"https://i.imgur.com/bDtTVd4.png\",\"https://i.imgur.com/0xAJCAy.png\",\"https://i.imgur.com/2rm0eUH.png\",\"https://i.imgur.com/lrbPvoc.png\",\"https://i.imgur.com/2xz4muk.png\",\"https://i.imgur.com/vURg371.png\",\"https://i.imgur.com/woEnk7L.png\",\"https://i.imgur.com/NX4pThk.png\",\"https://i.imgur.com/qwIznNP.png\",\"https://i.imgur.com/hwPeqbQ.png\",\"https://i.imgur.com/c4kM2cV.png\",\"https://i.imgur.com/k3CTGox.png\",\"https://i.imgur.com/SidLEMT.png\",\"https://i.imgur.com/C7uQ4mr.png\",\"https://i.imgur.com/orHdDCF.png\",\"https://i.imgur.com/caJF6R6.png\",\"https://i.imgur.com/hPZtRjb.png\",\"https://i.imgur.com/rwlTCpQ.png\",\"https://i.imgur.com/r0gIjUt.png\",\"https://i.imgur.com/k4YfiWs.png\",\"https://i.imgur.com/R89VSXH.png\",\"https://i.imgur.com/5X4tgvR.png\",\"https://i.imgur.com/E79ZaFT.png\",\"https://i.imgur.com/rZEGd27.png\",\"https://i.imgur.com/v5pDXsL.png\",\"https://i.imgur.com/VEHoaR9.png\",\"https://i.imgur.com/qyKbB5L.png\",\"https://i.imgur.com/NG0rZgL.png\",\"https://i.imgur.com/l3UODvl.png\",\"https://i.imgur.com/fQFxBi5.png\",\"https://i.imgur.com/dybtFOP.png\",\"https://i.imgur.com/iPua2Dg.png\",\"https://i.imgur.com/pXK2yWH.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/iLC5pQW.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/iDM2afL.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/y2fa9gg.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/22a89fh.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/80ahwofi.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/q29pgra.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/39ahfaai.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/19jamaa.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/a92upaaa.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/q8r9pqh.png\"]));\n\n/* ── 2. Setup P-NP properties (waits for lodash if needed) ── */\n(function _pnpSetup() {\n function _applyProps() {\n const W = window;\n if (!W._) W._ = {};\n\n /* variables & functions namespaces */\n if (!W._.variables) W._.variables = Object.create(null);\n W._.functions = Object.create(null);\n\n /* _.instance → the prodigy singleton exposed by our constructor patch */\n Object.defineProperty(W._, \"instance\", {\n get: () => W.__PNP__,\n enumerable: true, configurable: true\n });\n\n /* _.constants → raw plain object with Map-compatible .get()/.set() + self-alias .constants\n * WHY: cheatGUI uses _.constants.constants[\"GameConstants.X\"] = val (plain object writes)\n * patcher game-side bypasses use _.constants.get(\"GameConstants.X\") (Map-like reads)\n * Both must work on the same underlying storage. We make _.constants the raw object\n * and bolt on get/set/has methods + a .constants self-alias so every call site works. */\n if (W.__PNP_CONSTANTS_RAW__) {\n var raw = W.__PNP_CONSTANTS_RAW__;\n /* bolt Map-like API onto the plain object */\n raw.get = function(key) { return raw[key]; };\n raw.set = function(key, val) { raw[key] = val; return raw; };\n raw.has = function(key) { return key in raw; };\n /* self-alias: _.constants.constants[\"GameConstants.X\"] = val */\n raw.constants = raw;\n W._.constants = raw;\n }\n\n /* _.player → discovered dynamically from DI container by shape.\n * Cache the SERVICE (stable ref), not the player object (.player getter\n * returns a new object each call). */\n Object.defineProperty(W._, \"player\", {\n get: function() {\n if (W.__PNP_PLAYER_SVC__) return W.__PNP_PLAYER_SVC__.player;\n try {\n var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer;\n if (!gc) return null;\n var svc = W.__pnp_discoverService(gc, function(inst) {\n try { var p = inst.player; return p && typeof p === 'object' && ('data' in p); }\n catch(e) { return false; }\n }, \"PlayerService\");\n if (svc) {\n W.__PNP_PLAYER_SVC__ = svc;\n return svc.player;\n }\n } catch(e) {}\n return null;\n },\n enumerable: true, configurable: true\n });\n\n /* _.gameData */\n Object.defineProperty(W._, \"gameData\", {\n get: () => {\n try { return W.__PNP__?.game?.state?.states?.get?.(\"Boot\")?._gameData; }\n catch(e) { return null; }\n },\n enumerable: true, configurable: true\n });\n\n /* _.localizer */\n Object.defineProperty(W._, \"localizer\", {\n get: () => {\n try { return W.__PNP__?.prodigy?.gameContainer?.get(\"LocalizationService\"); }\n catch(e) { return null; }\n },\n enumerable: true, configurable: true\n });\n\n /* _.network → discovered dynamically from DI container by shape */\n Object.defineProperty(W._, \"network\", {\n get: function() {\n if (W.__PNP_NETWORK__) return W.__PNP_NETWORK__;\n try {\n var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer;\n if (!gc) return null;\n var nm = W.__pnp_discoverService(gc, function(inst) {\n return typeof inst.getCharData === 'function'\n && ('processPlayer' in inst)\n && typeof inst.sendZoneEvent === 'function';\n }, \"NetworkManager\");\n if (nm && typeof nm === \"object\") {\n if (!nm.game) {\n Object.defineProperty(nm, \"game\", {\n get: function() { return W.__PNP__ && W.__PNP__.game; },\n enumerable: true, configurable: true\n });\n }\n W.__PNP_NETWORK__ = nm;\n return nm;\n }\n } catch(e) {}\n return null;\n },\n enumerable: true, configurable: true\n });\n\n /* _.hack → self-reference */\n Object.defineProperty(W._, \"hack\", {\n get: () => W._, enumerable: true, configurable: true\n });\n\n /* Escape battle helper — handles SecureBattleRevamp via BattleController */\n W._.functions.escapeBattle = () => {\n try {\n const g = W.__PNP__?.game;\n const currentState = g?.state?.current;\n if (currentState === \"PVP\") {\n g.state.states.PVP.endPVP();\n } else if (currentState === \"CoOp\") {\n W.__PNP__.prodigy.world.$(W._.player?.data?.zone);\n } else if (currentState === \"SecureBattleRevamp\") {\n const st = g.state.states.get(\"SecureBattleRevamp\");\n const bc = st?._battleController;\n if (bc?.escapeBattle) bc.escapeBattle();\n else g?.state?.callbackContext?.runAwayCallback();\n } else {\n g?.state?.callbackContext?.runAwayCallback();\n }\n } catch(e) { console.warn(\"[Play Origin] escapeBattle failed:\", e); }\n };\n\n /* _.membership → discovered by shape (isMember getter + hasFeatureAccess).\n * Service ID drifts per build; shape is stable. */\n Object.defineProperty(W._, \"membership\", {\n get: function() {\n if (W.__PNP_MEMBERSHIP__) return W.__PNP_MEMBERSHIP__;\n try {\n var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer;\n if (!gc) return null;\n var ms = W.__pnp_discoverService(gc, function(inst) {\n return inst && typeof inst.hasFeatureAccess === 'function'\n && 'isMember' in inst;\n }, \"MembershipService\");\n if (ms) { W.__PNP_MEMBERSHIP__ = ms; return ms; }\n } catch(e) {}\n return null;\n },\n enumerable: true, configurable: true\n });\n\n /* _.functions.setMembership(bool) — deep membership override.\n memberTier is derived from three hasFeatureAccess checks, so forcing it to return\n true auto-promotes to Ultra tier. We snapshot the original _data on first call so\n disable restores it. */\n W._.functions.setMembership = function(active) {\n var ms = W._.membership;\n if (!ms) return false;\n if (!W.__PNP_MEMBERSHIP_ORIG__) {\n W.__PNP_MEMBERSHIP_ORIG__ = { data: ms._data };\n }\n if (active) {\n var start = new Date(Date.now() - 86400000).toISOString();\n var end = new Date(Date.now() + 365 * 86400000 * 10).toISOString();\n ms._data = {\n active: true,\n features: [],\n membershipStartTs: start,\n membershipEndTs: end\n };\n Object.defineProperty(ms, \"hasFeatureAccess\", {\n value: function() { return true; },\n configurable: true, writable: true\n });\n try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {}\n try { W._.player && W._.player.unlockMemberItems && W._.player.unlockMemberItems(); } catch(e) {}\n } else {\n ms._data = W.__PNP_MEMBERSHIP_ORIG__.data;\n if (Object.getOwnPropertyDescriptor(ms, \"hasFeatureAccess\")) {\n delete ms.hasFeatureAccess;\n }\n try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {}\n }\n try { W._.player && (W._.player.appearanceChanged = true); } catch(e) {}\n return true;\n };\n\n if (!W.__PNP_PROPS_APPLIED__) {\n W.__PNP_PROPS_APPLIED__ = true;\n console.log(\"[Play Origin] Properties applied to window._\");\n }\n }\n\n /* Lodash loads as a SEPARATE script AFTER game.min.js.\n When it loads, it overwrites window._ entirely — and the game keeps\n reassigning window._ (chunks, runInContext, etc.) indefinitely.\n We PERMANENTLY poll and re-apply our properties whenever they're\n missing. The 500ms interval is negligible overhead. */\n _applyProps();\n\n setInterval(() => {\n try {\n const desc = Object.getOwnPropertyDescriptor(window._, 'instance');\n if (!desc || !desc.get || !window.__PNP__) {\n _applyProps();\n }\n /* Singleton auto-fix: the constructor may fire twice (onreset context).\n Our patch captures the first instance, but the REAL fully-initialized\n singleton (with #prodigy set) is stored on the class's static _instance.\n Detect the mismatch and update __PNP__ to the real one. */\n if (window.__PNP__ && !window.__PNP__.prodigy) {\n try {\n var ctor = Object.getPrototypeOf(window.__PNP__).constructor;\n if (ctor._instance && ctor._instance !== window.__PNP__ && ctor._instance.prodigy) {\n window.__PNP__ = ctor._instance;\n console.log(\"[Play Origin] Singleton auto-fixed to real instance (prodigy available)\");\n }\n } catch(e) {}\n }\n /* Trigger lazy discovery for player and network via their getters */\n if (!window.__PNP_PLAYER_SVC__ && window.__PNP__) {\n try { void window._.player; } catch(e) {}\n }\n if (!window.__PNP_NETWORK__ && window.__PNP__) {\n try { void window._.network; } catch(e) {}\n }\n } catch(e) { _applyProps(); }\n }, 500);\n})();\n\n/* ── 3. CheatGUI loader (delayed to ensure game is ready) ── */\nsetTimeout(() =>\n (async () => {\n try {\n eval(await (await fetch(\"https://raw.githubusercontent.com/ProdigyPXP/ProdigyOrigin/master/originGUI/dist/bundle.js\")).text());\n } catch(e) {\n console.error(\"[Play Origin] CheatGUI load failed:\", e);\n }\n })(), 15000);\nconsole.trace = () => {};\n" +} diff --git a/dist/metadata.json b/dist/metadata.json index de98936..0847e65 100644 --- a/dist/metadata.json +++ b/dist/metadata.json @@ -1,10 +1,19 @@ { - "generatedAt": "2026-05-24T07:20:22.511Z", + "generatedAt": "2026-05-24T09:04:05.416Z", "patcherVersion": "4.3.0", "gameVersion": "2026.25.0", "publicGameHash": null, "loadGamePath": "/js/load-game-f2baaaba58.min.js", "patchDegraded": false, + "manifestHash": "4509448a4c39c84d", + "perRuleCounts": { + "singleton-exposure": 1, + "safe-bind": 9, + "expose-constants": 1, + "answer-question-bypass": 1, + "external-factory-bypass": 1, + "open-question-bypass": 1 + }, "source": { "gameUrl": "https://code.prodigygame.com/code/2026.25.0/game.min.js?v=2026.25.0", "publicGameUrl": null, diff --git a/src/patch.ts b/src/patch.ts index cd960f5..e4e93ca 100644 --- a/src/patch.ts +++ b/src/patch.ts @@ -4,12 +4,13 @@ import { fileURLToPath } from "node:url"; import { GUI_LINK, PRODIGY_CODE_ORIGIN, PRODIGY_LOAD_URL, VERSION } from "./constants.js"; import { displayImages } from "./displayImages.js"; +import { RULES, applyRules } from "./patches.js"; +import { buildPrefix, buildSuffix } from "./wrappers.js"; +import { buildManifest } from "./manifest.js"; const FETCH_TIMEOUT_MS = 30000; -type GameStatus = { - gameClientVersion: string; -}; +type GameStatus = { gameClientVersion: string }; export type PatchResult = { outputDir: string; @@ -17,24 +18,19 @@ export type PatchResult = { publicGameHash: string | null; loadGamePath: string; patchDegraded: boolean; + manifestHash: string; }; const parseGameStatus = (launcherHtml: string): GameStatus => { const match = launcherHtml.match(/gameStatusDataStr\s*=\s*'([^']+)'/); - if (!match?.[1]) { - throw new Error("Unable to find gameStatusDataStr in launcher HTML."); - } - + if (!match?.[1]) throw new Error("Unable to find gameStatusDataStr in launcher HTML."); return JSON.parse(match[1]) as GameStatus; }; const parseLoadGameUrl = (launcherHtml: string): string => { - const scriptMatch = launcherHtml.match(/https:\/\/code\.prodigygame\.com\/js\/load-game-[a-f0-9]+\.min\.js/i); - if (!scriptMatch?.[0]) { - throw new Error("Unable to locate load-game URL in launcher HTML."); - } - - return scriptMatch[0]; + const m = launcherHtml.match(/https:\/\/code\.prodigygame\.com\/js\/load-game-[a-f0-9]+\.min\.js/i); + if (!m?.[0]) throw new Error("Unable to locate load-game URL in launcher HTML."); + return m[0]; }; const parsePublicGameHash = (loadGameSource: string): string | null => { @@ -44,475 +40,31 @@ const parsePublicGameHash = (loadGameSource: string): string | null => { const isJavaScript = (content: string): boolean => { const trimmed = content.trim(); - if (trimmed.startsWith(" { - // ── Modern Webpack 5 Detection ── - // The game uses an arrow-function IIFE with __webpack_modules__ and exports to window. - // There are NO global app/game variables. Instead, an inversify singleton is used: - // X.q.instance.prodigy.gameContainer.get(serviceId) - // where X varies per module scope (N, Y, F, M, etc.). - - const patches: Array<[string | RegExp, string]> = []; - let corePatched = false; - - // ── 1. Singleton Exposure ── - // Find the main prodigy singleton constructor. It's the ONLY one that: - // - takes 1 arg (the Phaser game) - // - sets _instance and _game - // - is immediately followed by destroy() that nulls _prodigy - // Pattern: _instance=this),this._game=E}destroy(){ - const singletonPatched = source.replace( - /(_instance=this\),this\._game=([A-Za-z_$][\w$]*)\}destroy\(\)\{)/, - `_instance=this),window.__PNP__=this,this._game=$2}destroy(){` - ); - if (singletonPatched !== source) { - source = singletonPatched; - console.log(" ✓ Singleton exposure injected (window.__PNP__)"); - corePatched = true; - } else { - console.warn(" ✗ Could not find singleton constructor pattern"); - } - - // ── 2. hasMembership ── - // NOTE: We do NOT force hasMembership=true at the source level because that - // crashes the membership initialization flow (upgradeOptions is never set, - // causing TypeError at login). Instead, expose the membership service so the - // CheatGUI can toggle it dynamically AFTER the game finishes initializing. - // The service ID is "859-25be" and the property is .isMember. - - // ── 3. Fix duplicate Inversify bindings ── - // Replace all gameContainer.bind(X) with __pnp_safeBind(gameContainer, X) - // This is a global regex that catches every instance in the webpack bundle. - patches.push([ - /([A-Za-z_$][\w$]*\.q\.instance\.prodigy\.gameContainer)\.bind\(/g, - `window.__pnp_safeBind($1,` - ]); - - // ── 4. Expose Constants Map ── - // The game defines: .constants={"GameConstants.Build.VERSION":"2026.18.1",...} - // The minifier-assigned variable name drifts every build (A, f, M, ...), so we - // match any single identifier prefix rather than hardcoding one. - patches.push([ - /([A-Za-z_$][\w$]*)\.constants=\{"GameConstants/, - `$1.constants=window.__PNP_CONSTANTS_RAW__={"GameConstants` - ]); - - // ── 4. Answer Question Bypass (modern class method syntax) ── - // answerQuestion(){if(!this._isOpen){ → inject bypass before the if - patches.push([ - `answerQuestion(){if(!this._isOpen)`, - `answerQuestion(){if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){const _w=Math.random()<(window._.constants.get('GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT')||1);this.onQuestionAnswered.dispatch(_w,0,null);_w?this.onQuestionAnsweredCorrectly.dispatch(0,null):this.onQuestionAnsweredIncorrectly.dispatch(0,null);return}if(!this._isOpen)` - ]); - - // ── 5. External Factory Bypass ── - // Inject before: const E=this.findParameter("externalFactory") - patches.push([ - /(const [A-Za-z_$]=this\.findParameter\("externalFactory"\))/, - `if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){const _w=Math.random()<(window._.constants.get('GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT')||1);this.finish({answerCorrect:_w,responseTime:0});return}$1` - ]); - - // ── 6. openQuestionInterfaceThenEmitNotifications bypass ── - patches.push([ - /openQuestionInterfaceThenEmitNotifications\(([A-Za-z_$]),([A-Za-z_$]),([A-Za-z_$]),([A-Za-z_$]),([A-Za-z_$])\)\{this\._education/, - `openQuestionInterfaceThenEmitNotifications($1,$2,$3,$4,$5){if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){$5&&$5(!0,10,1,!1,!1,{});return}this._education` - ]); - - // ── Apply all search-replace patches ── - const patchedCore = patches.reduce((current, [searchValue, replacementValue], index) => { - const result = current.replace(searchValue, replacementValue); - if (result === current) { - console.warn(` ✗ Patch ${index + 1} did not match (non-critical)`); - } else { - console.log(` ✓ Patch ${index + 1} applied`); - } - return result; - }, source); - - if (!corePatched) { - console.warn("WARNING: Could not inject singleton exposure. Setting patchDegraded=true."); - ctx.patchDegraded = true; - } - - // ── Prefix: runs BEFORE game code ── - const prefix = ` -/** P-NP Patcher v${VERSION} — Prefix **/ -const _getBox=(o,t)=>({string:"+",style:"font-size: 1px; padding: 0 "+Math.floor(o/2)+"px; line-height: "+t+"px;"}); -console.image=((o,t=1)=>{const e=new Image;e.onload=(()=>{const n=_getBox(e.width*t,e.height*t); -console.log("%c"+n.string,n.style+"background: url("+o+"); background-size: "+e.width*t+"px " -+e.height*t+"px; color: transparent;")}),e.src=o}); -const _pnpOldLog = console.log.bind(console); -console.log = (...d) => { - if (d && d.length && typeof d[0] === "string" && d[0].includes("This is a browser feature for developers only")) return "lol no"; - if (new Error().stack?.split("\\n").reverse()[0]?.includes("load-identity")) return "denied"; - return _pnpOldLog(...d); -}; -/** Ensure window._ exists before game code (lodash may load separately) **/ -if (typeof window._ === 'undefined' || window._ === null) window._ = {}; -window.__PNP_ORIG_UNDERSCORE__ = window._; -window._.variables = Object.create(null); -/** Pre-init _.constants as empty obj with Map-like API so game-side patches don't crash - * before the suffix wires up __PNP_CONSTANTS_RAW__. Real values populated post-game-load. **/ -if (!window._.constants) { - var _c = Object.create(null); - _c.get = function(k) { return _c[k]; }; - _c.set = function(k, v) { _c[k] = v; return _c; }; - _c.has = function(k) { return k in _c; }; - _c.constants = _c; - window._.constants = _c; -} - -/** Fix Inversify duplicate binding errors (e.g. "Ambiguous match: MathTower"). - * Some installers bind services to the GLOBAL gameContainer and can fire more - * than once in the patched execution context. We define a helper that the - * game-code patch below uses to safely bind (rebind if already bound). */ -window.__pnp_safeBind = function(container, id) { - try { - var inv = container._inversifyContainer || container; - if (typeof inv.isBound === 'function' && inv.isBound(id)) { - return (typeof container.rebind === 'function') ? container.rebind(id) : inv.rebind(id); - } - } catch(e) {} - return container.bind(id); -}; - -/** Guard SW.Load.decrementLoadSemaphore against duplicate calls. - * ROOT CAUSE: The old extension build (fetch+onreset approach) appends a second - * SW.Load.decrementLoadSemaphore() call after the game code, AND the patcher - * suffix calls it too → createGame() fires twice → all Inversify bind() calls - * run twice on the same container → "Ambiguous match found for MathTower" crash. - * - * Fix: wrap the function so only the FIRST call triggers createGame(). - * This works for both old extension (fetch+onreset) and new extension (doc-rewrite). */ -/** Runtime service discovery — enumerate Inversify bindings and match by shape (duck-typing). - * This replaces hardcoded service IDs that break every game update. */ -window.__pnp_discoverService = function(gc, shapeFn, label) { - try { - var map = gc._inversifyContainer._bindingDictionary._map; - if (!map) return null; - var hexPattern = /^[0-9a-f]{2,4}-[0-9a-f]{2,6}$/; - var iter = map.keys(); - var next = iter.next(); - while (!next.done) { - var id = next.value; - next = iter.next(); - if (typeof id !== 'string' || !hexPattern.test(id)) continue; - try { - var inst = gc.get(id); - if (inst && shapeFn(inst)) { - console.log("[Play Origin] Discovered " + label + " \\u2192 " + id); - return inst; - } - } catch(e) {} - } - } catch(e) { - console.warn("[Play Origin] Discovery failed for " + label + ":", e); - } - return null; -}; - -if (typeof SW !== 'undefined' && SW.Load && typeof SW.Load.decrementLoadSemaphore === 'function') { - var _pnpOrigDecrement = SW.Load.decrementLoadSemaphore.bind(SW.Load); - SW.Load.decrementLoadSemaphore = function() { - if (window.__PNP_SEM_DECREMENTED__) { - console.warn("[Play Origin] SW.Load.decrementLoadSemaphore() called twice — blocking duplicate createGame()"); - return; - } - window.__PNP_SEM_DECREMENTED__ = true; - return _pnpOrigDecrement(); - }; -} -`; - - // ── Suffix: runs AFTER game code ── - const suffix = ` -/** P-NP Patcher v${VERSION} — Suffix **/ - -/* ── 1. Immediate: Signal game script loaded ── */ -SW.Load.decrementLoadSemaphore(); -console.log("%cP-NP Patcher", "font-size:40px;color:#540052;font-weight:900;font-family:sans-serif;"); -console.log("%cVersion ${VERSION}", "font-size:20px;color:#000025;font-weight:700;font-family:sans-serif;"); -console.image((e => e[Math.floor(Math.random() * e.length)])(${JSON.stringify(displayImages)})); - -/* ── 2. Setup P-NP properties (waits for lodash if needed) ── */ -(function _pnpSetup() { - function _applyProps() { - const W = window; - if (!W._) W._ = {}; - - /* variables & functions namespaces */ - if (!W._.variables) W._.variables = Object.create(null); - W._.functions = Object.create(null); - - /* _.instance → the prodigy singleton exposed by our constructor patch */ - Object.defineProperty(W._, "instance", { - get: () => W.__PNP__, - enumerable: true, configurable: true - }); - - /* _.constants → raw plain object with Map-compatible .get()/.set() + self-alias .constants - * WHY: cheatGUI uses _.constants.constants["GameConstants.X"] = val (plain object writes) - * patcher game-side bypasses use _.constants.get("GameConstants.X") (Map-like reads) - * Both must work on the same underlying storage. We make _.constants the raw object - * and bolt on get/set/has methods + a .constants self-alias so every call site works. */ - if (W.__PNP_CONSTANTS_RAW__) { - var raw = W.__PNP_CONSTANTS_RAW__; - /* bolt Map-like API onto the plain object */ - raw.get = function(key) { return raw[key]; }; - raw.set = function(key, val) { raw[key] = val; return raw; }; - raw.has = function(key) { return key in raw; }; - /* self-alias: _.constants.constants["GameConstants.X"] = val */ - raw.constants = raw; - W._.constants = raw; - } - - /* _.player → discovered dynamically from DI container by shape. - * Cache the SERVICE (stable ref), not the player object (.player getter - * returns a new object each call). */ - Object.defineProperty(W._, "player", { - get: function() { - if (W.__PNP_PLAYER_SVC__) return W.__PNP_PLAYER_SVC__.player; - try { - var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer; - if (!gc) return null; - var svc = W.__pnp_discoverService(gc, function(inst) { - try { var p = inst.player; return p && typeof p === 'object' && ('data' in p); } - catch(e) { return false; } - }, "PlayerService"); - if (svc) { - W.__PNP_PLAYER_SVC__ = svc; - return svc.player; - } - } catch(e) {} - return null; - }, - enumerable: true, configurable: true - }); - - /* _.gameData */ - Object.defineProperty(W._, "gameData", { - get: () => { - try { return W.__PNP__?.game?.state?.states?.get?.("Boot")?._gameData; } - catch(e) { return null; } - }, - enumerable: true, configurable: true - }); - - /* _.localizer */ - Object.defineProperty(W._, "localizer", { - get: () => { - try { return W.__PNP__?.prodigy?.gameContainer?.get("LocalizationService"); } - catch(e) { return null; } - }, - enumerable: true, configurable: true - }); - - /* _.network → discovered dynamically from DI container by shape */ - Object.defineProperty(W._, "network", { - get: function() { - if (W.__PNP_NETWORK__) return W.__PNP_NETWORK__; - try { - var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer; - if (!gc) return null; - var nm = W.__pnp_discoverService(gc, function(inst) { - return typeof inst.getCharData === 'function' - && ('processPlayer' in inst) - && typeof inst.sendZoneEvent === 'function'; - }, "NetworkManager"); - if (nm && typeof nm === "object") { - if (!nm.game) { - Object.defineProperty(nm, "game", { - get: function() { return W.__PNP__ && W.__PNP__.game; }, - enumerable: true, configurable: true - }); - } - W.__PNP_NETWORK__ = nm; - return nm; - } - } catch(e) {} - return null; - }, - enumerable: true, configurable: true - }); - - /* _.hack → self-reference */ - Object.defineProperty(W._, "hack", { - get: () => W._, enumerable: true, configurable: true - }); - - /* Escape battle helper — handles SecureBattleRevamp via BattleController */ - W._.functions.escapeBattle = () => { - try { - const g = W.__PNP__?.game; - const currentState = g?.state?.current; - if (currentState === "PVP") { - g.state.states.PVP.endPVP(); - } else if (currentState === "CoOp") { - W.__PNP__.prodigy.world.$(W._.player?.data?.zone); - } else if (currentState === "SecureBattleRevamp") { - const st = g.state.states.get("SecureBattleRevamp"); - const bc = st?._battleController; - if (bc?.escapeBattle) bc.escapeBattle(); - else g?.state?.callbackContext?.runAwayCallback(); - } else { - g?.state?.callbackContext?.runAwayCallback(); - } - } catch(e) { console.warn("[Play Origin] escapeBattle failed:", e); } - }; - - /* _.membership → discovered by shape (isMember getter + hasFeatureAccess). - * Service ID drifts per build; shape is stable. */ - Object.defineProperty(W._, "membership", { - get: function() { - if (W.__PNP_MEMBERSHIP__) return W.__PNP_MEMBERSHIP__; - try { - var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer; - if (!gc) return null; - var ms = W.__pnp_discoverService(gc, function(inst) { - return inst && typeof inst.hasFeatureAccess === 'function' - && 'isMember' in inst; - }, "MembershipService"); - if (ms) { W.__PNP_MEMBERSHIP__ = ms; return ms; } - } catch(e) {} - return null; - }, - enumerable: true, configurable: true - }); - - /* _.functions.setMembership(bool) — deep membership override. - memberTier is derived from three hasFeatureAccess checks, so forcing it to return - true auto-promotes to Ultra tier. We snapshot the original _data on first call so - disable restores it. */ - W._.functions.setMembership = function(active) { - var ms = W._.membership; - if (!ms) return false; - if (!W.__PNP_MEMBERSHIP_ORIG__) { - W.__PNP_MEMBERSHIP_ORIG__ = { data: ms._data }; - } - if (active) { - var start = new Date(Date.now() - 86400000).toISOString(); - var end = new Date(Date.now() + 365 * 86400000 * 10).toISOString(); - ms._data = { - active: true, - features: [], - membershipStartTs: start, - membershipEndTs: end - }; - Object.defineProperty(ms, "hasFeatureAccess", { - value: function() { return true; }, - configurable: true, writable: true - }); - try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {} - try { W._.player && W._.player.unlockMemberItems && W._.player.unlockMemberItems(); } catch(e) {} - } else { - ms._data = W.__PNP_MEMBERSHIP_ORIG__.data; - if (Object.getOwnPropertyDescriptor(ms, "hasFeatureAccess")) { - delete ms.hasFeatureAccess; - } - try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {} - } - try { W._.player && (W._.player.appearanceChanged = true); } catch(e) {} - return true; - }; - - if (!W.__PNP_PROPS_APPLIED__) { - W.__PNP_PROPS_APPLIED__ = true; - console.log("[Play Origin] Properties applied to window._"); - } - } - - /* Lodash loads as a SEPARATE script AFTER game.min.js. - When it loads, it overwrites window._ entirely — and the game keeps - reassigning window._ (chunks, runInContext, etc.) indefinitely. - We PERMANENTLY poll and re-apply our properties whenever they're - missing. The 500ms interval is negligible overhead. */ - _applyProps(); - - setInterval(() => { - try { - const desc = Object.getOwnPropertyDescriptor(window._, 'instance'); - if (!desc || !desc.get || !window.__PNP__) { - _applyProps(); - } - /* Singleton auto-fix: the constructor may fire twice (onreset context). - Our patch captures the first instance, but the REAL fully-initialized - singleton (with #prodigy set) is stored on the class's static _instance. - Detect the mismatch and update __PNP__ to the real one. */ - if (window.__PNP__ && !window.__PNP__.prodigy) { - try { - var ctor = Object.getPrototypeOf(window.__PNP__).constructor; - if (ctor._instance && ctor._instance !== window.__PNP__ && ctor._instance.prodigy) { - window.__PNP__ = ctor._instance; - console.log("[Play Origin] Singleton auto-fixed to real instance (prodigy available)"); - } - } catch(e) {} - } - /* Trigger lazy discovery for player and network via their getters */ - if (!window.__PNP_PLAYER_SVC__ && window.__PNP__) { - try { void window._.player; } catch(e) {} - } - if (!window.__PNP_NETWORK__ && window.__PNP__) { - try { void window._.network; } catch(e) {} - } - } catch(e) { _applyProps(); } - }, 500); -})(); - -/* ── 3. CheatGUI loader (delayed to ensure game is ready) ── */ -setTimeout(() => - (async () => { - try { - eval(await (await fetch("${GUI_LINK}")).text()); - } catch(e) { - console.error("[Play Origin] CheatGUI load failed:", e); - } - })(), 15000); -console.trace = () => {}; -`; - - return `${prefix}\n${patchedCore}\n${suffix}`; -}; - -const patchPublicGameFile = (source: string): string => { - return ` +const patchPublicGameFile = (source: string): string => ` (() => { const console = new Proxy({}, { get: () => () => {} }); ${source} })(); `; -}; const fetchText = async (url: string): Promise => { const controller = new AbortController(); const timeoutId = setTimeout(() => controller.abort(), FETCH_TIMEOUT_MS); - try { const response = await fetch(url, { signal: controller.signal }); - if (!response.ok) { - throw new Error(`Request failed for ${url} (${response.status} ${response.statusText}).`); - } - - const text = await response.text(); - return text; + if (!response.ok) throw new Error(`Request failed for ${url} (${response.status} ${response.statusText}).`); + return await response.text(); } finally { clearTimeout(timeoutId); } }; export const runPatch = async (outputDir = "patched-output"): Promise => { - const ctx: PatchContext = { patchDegraded: false }; - const launcherHtml = await fetchText(PRODIGY_LOAD_URL); const gameStatus = parseGameStatus(launcherHtml); const loadGameUrl = parseLoadGameUrl(launcherHtml); @@ -526,12 +78,8 @@ export const runPatch = async (outputDir = "patched-output"): Promise (perRuleCounts[r.id] ?? 0) < r.minMatches); + const patchDegraded = degraded.length > 0; + + for (const rule of RULES) { + const n = perRuleCounts[rule.id] ?? 0; + const ok = n >= rule.minMatches ? "✓" : "✗"; + console.log(` ${ok} rule "${rule.id}" matched ${n}x (min ${rule.minMatches})`); } - console.log("Applying patches..."); - const patchedGame = patchGameFile(gameSource, ctx); + if (patchDegraded) { + console.warn( + `[patcher] WARNING: ${degraded.length} rule(s) below minMatches — ` + + `setting patchDegraded=true. Extension will still apply the manifest as-is.` + ); + } + + // Build manifest + verification bundle. + const manifest = buildManifest({ patcherVersion: VERSION, rules: RULES, prefix, suffix }); + const verificationBundle = `${prefix}\n${patchedCore}\n${suffix}`; const patchedPublicGame = publicGameSource ? patchPublicGameFile(publicGameSource) : null; const resolvedOutputDir = path.resolve(outputDir); await mkdir(resolvedOutputDir, { recursive: true }); const writes: Array> = [ - writeFile(path.join(resolvedOutputDir, "game.min.js"), `// game.min.js v${gameVersion}\n\n${patchedGame}`, "utf8"), + writeFile( + path.join(resolvedOutputDir, "manifest.json"), + `${JSON.stringify(manifest, null, 2)}\n`, + "utf8" + ), + writeFile( + path.join(resolvedOutputDir, "game.min.js"), + `// game.min.js v${gameVersion} (verification copy — extension uses manifest.json)\n\n${verificationBundle}`, + "utf8" + ), writeFile( path.join(resolvedOutputDir, "metadata.json"), `${JSON.stringify( @@ -561,13 +142,10 @@ export const runPatch = async (outputDir = "patched-output"): Promise { console.log(`Patched files written to ${result.outputDir}`); console.log(`gameClientVersion=${result.gameClientVersion}`); - console.log(`publicGameHash=${result.publicGameHash}`); - console.log(`loadGamePath=${result.loadGamePath}`); - if (result.patchDegraded) { - console.warn(`WARNING: patchDegraded=true - some patches may not have been applied`); - } + console.log(`manifestHash=${result.manifestHash}`); + console.log(`patchDegraded=${result.patchDegraded}`); }) .catch((error: unknown) => { const message = error instanceof Error ? error.stack ?? error.message : String(error); From 3ae7676a631413ac4071b70ef64588110204b664 Mon Sep 17 00:00:00 2001 From: Alexey Fedorov Date: Sun, 24 May 2026 12:14:19 -0700 Subject: [PATCH 07/16] chore(p-np): bump VERSION constant to 4.4.0 Co-Authored-By: Claude Sonnet 4.6 --- dist/game.min.js | 6 +++--- dist/manifest.json | 8 ++++---- dist/metadata.json | 6 +++--- src/constants.ts | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dist/game.min.js b/dist/game.min.js index 139dcd3..b7bd32b 100644 --- a/dist/game.min.js +++ b/dist/game.min.js @@ -1,7 +1,7 @@ // game.min.js v2026.25.0 (verification copy — extension uses manifest.json) -/** P-NP Patcher v4.3.0 — Prefix **/ +/** P-NP Patcher v4.4.0 — Prefix **/ const _getBox=(o,t)=>({string:"+",style:"font-size: 1px; padding: 0 "+Math.floor(o/2)+"px; line-height: "+t+"px;"}); console.image=((o,t=1)=>{const e=new Image;e.onload=(()=>{const n=_getBox(e.width*t,e.height*t); console.log("%c"+n.string,n.style+"background: url("+o+"); background-size: "+e.width*t+"px " @@ -92,12 +92,12 @@ if (typeof SW !== 'undefined' && SW.Load && typeof SW.Load.decrementLoadSemaphor try{let k="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},B=(new k.Error).stack;B&&(k._sentryDebugIds=k._sentryDebugIds||{},k._sentryDebugIds[B]="f947ccf2-3be2-4d46-b53d-563d22a1a5ed",k._sentryDebugIdIdentifier="sentry-dbid-f947ccf2-3be2-4d46-b53d-563d22a1a5ed")}catch(e){}{let k="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};k._sentryModuleMetadata=k._sentryModuleMetadata||{},k._sentryModuleMetadata[(new k.Error).stack]=Object.assign({},k._sentryModuleMetadata[(new k.Error).stack],{dsn:"https://a84188f8494e47ea9adc6469ec4f4deb@o94449.ingest.us.sentry.io/1217080",release:"2026.25.0",project:"prodigy-game"})}{let k="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};k.SENTRY_RELEASE={id:"2026.25.0"}}(()=>{var __webpack_modules__={51151:function(k,B,U){var F,G,j;G=[U(26946)],void 0===(j="function"==typeof(F=function(k){"use strict";var B=k.Reader,U=k.Writer,F=k.util,G=k.roots.default||(k.roots.default={});return G.Spell=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.id=k.int32();break;case 2:j.element=k.string();break;case 3:j.tier=k.int32();break;case 4:j.energyCost=k.int32();break;case 5:j.target=k.int32();break;case 6:j.type=k.string();break;case 7:j.locked=k.bool();break;case 8:j.unlockLevel=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.id&&k.hasOwnProperty("id")&&!F.isInteger(k.id)?"id: integer expected":null!=k.element&&k.hasOwnProperty("element")&&!F.isString(k.element)?"element: string expected":null!=k.tier&&k.hasOwnProperty("tier")&&!F.isInteger(k.tier)?"tier: integer expected":null!=k.energyCost&&k.hasOwnProperty("energyCost")&&!F.isInteger(k.energyCost)?"energyCost: integer expected":null!=k.target&&k.hasOwnProperty("target")&&!F.isInteger(k.target)?"target: integer expected":null!=k.type&&k.hasOwnProperty("type")&&!F.isString(k.type)?"type: string expected":null!=k.locked&&k.hasOwnProperty("locked")&&"boolean"!=typeof k.locked?"locked: boolean expected":null!=k.unlockLevel&&k.hasOwnProperty("unlockLevel")&&!F.isInteger(k.unlockLevel)?"unlockLevel: integer expected":null},j.fromObject=function(k){if(k instanceof G.Spell)return k;var B=new G.Spell;return null!=k.id&&(B.id=0|k.id),null!=k.element&&(B.element=String(k.element)),null!=k.tier&&(B.tier=0|k.tier),null!=k.energyCost&&(B.energyCost=0|k.energyCost),null!=k.target&&(B.target=0|k.target),null!=k.type&&(B.type=String(k.type)),null!=k.locked&&(B.locked=Boolean(k.locked)),null!=k.unlockLevel&&(B.unlockLevel=0|k.unlockLevel),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.id=0,U.element="",U.tier=0,U.energyCost=0,U.target=0,U.type="",U.locked=!1,U.unlockLevel=0),null!=k.id&&k.hasOwnProperty("id")&&(U.id=k.id),null!=k.element&&k.hasOwnProperty("element")&&(U.element=k.element),null!=k.tier&&k.hasOwnProperty("tier")&&(U.tier=k.tier),null!=k.energyCost&&k.hasOwnProperty("energyCost")&&(U.energyCost=k.energyCost),null!=k.target&&k.hasOwnProperty("target")&&(U.target=k.target),null!=k.type&&k.hasOwnProperty("type")&&(U.type=k.type),null!=k.locked&&k.hasOwnProperty("locked")&&(U.locked=k.locked),null!=k.unlockLevel&&k.hasOwnProperty("unlockLevel")&&(U.unlockLevel=k.unlockLevel),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.Name=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.last=k.int32();break;case 2:j.first=k.int32();break;case 3:j.middle=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.last&&k.hasOwnProperty("last")&&!F.isInteger(k.last)?"last: integer expected":null!=k.first&&k.hasOwnProperty("first")&&!F.isInteger(k.first)?"first: integer expected":null!=k.middle&&k.hasOwnProperty("middle")&&!F.isInteger(k.middle)?"middle: integer expected":null},j.fromObject=function(k){if(k instanceof G.Name)return k;var B=new G.Name;return null!=k.last&&(B.last=0|k.last),null!=k.first&&(B.first=0|k.first),null!=k.middle&&(B.middle=0|k.middle),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.last=0,U.first=0,U.middle=0),null!=k.last&&k.hasOwnProperty("last")&&(U.last=k.last),null!=k.first&&k.hasOwnProperty("first")&&(U.first=k.first),null!=k.middle&&k.hasOwnProperty("middle")&&(U.middle=k.middle),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.Hair=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.color=k.int32();break;case 2:j.style=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.color&&k.hasOwnProperty("color")&&!F.isInteger(k.color)?"color: integer expected":null!=k.style&&k.hasOwnProperty("style")&&!F.isInteger(k.style)?"style: integer expected":null},j.fromObject=function(k){if(k instanceof G.Hair)return k;var B=new G.Hair;return null!=k.color&&(B.color=0|k.color),null!=k.style&&(B.style=0|k.style),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.color=0,U.style=0),null!=k.color&&k.hasOwnProperty("color")&&(U.color=k.color),null!=k.style&&k.hasOwnProperty("style")&&(U.style=k.style),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.WizardAppearance=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.name=G.Name.decode(k,k.uint32());break;case 2:j.hair=G.Hair.decode(k,k.uint32());break;case 3:j.face=k.int32();break;case 4:j.gender=k.string();break;case 5:j.eyeColor=k.int32();break;case 6:j.skinColor=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.name&&k.hasOwnProperty("name")&&(B=G.Name.verify(k.name))?"name."+B:null!=k.hair&&k.hasOwnProperty("hair")&&(B=G.Hair.verify(k.hair))?"hair."+B:null!=k.face&&k.hasOwnProperty("face")&&!F.isInteger(k.face)?"face: integer expected":null!=k.gender&&k.hasOwnProperty("gender")&&!F.isString(k.gender)?"gender: string expected":null!=k.eyeColor&&k.hasOwnProperty("eyeColor")&&!F.isInteger(k.eyeColor)?"eyeColor: integer expected":null!=k.skinColor&&k.hasOwnProperty("skinColor")&&!F.isInteger(k.skinColor)?"skinColor: integer expected":null;var B},j.fromObject=function(k){if(k instanceof G.WizardAppearance)return k;var B=new G.WizardAppearance;if(null!=k.name){if("object"!=typeof k.name)throw TypeError(".WizardAppearance.name: object expected");B.name=G.Name.fromObject(k.name)}if(null!=k.hair){if("object"!=typeof k.hair)throw TypeError(".WizardAppearance.hair: object expected");B.hair=G.Hair.fromObject(k.hair)}return null!=k.face&&(B.face=0|k.face),null!=k.gender&&(B.gender=String(k.gender)),null!=k.eyeColor&&(B.eyeColor=0|k.eyeColor),null!=k.skinColor&&(B.skinColor=0|k.skinColor),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.name=null,U.hair=null,U.face=0,U.gender="",U.eyeColor=0,U.skinColor=0),null!=k.name&&k.hasOwnProperty("name")&&(U.name=G.Name.toObject(k.name,B)),null!=k.hair&&k.hasOwnProperty("hair")&&(U.hair=G.Hair.toObject(k.hair,B)),null!=k.face&&k.hasOwnProperty("face")&&(U.face=k.face),null!=k.gender&&k.hasOwnProperty("gender")&&(U.gender=k.gender),null!=k.eyeColor&&k.hasOwnProperty("eyeColor")&&(U.eyeColor=k.eyeColor),null!=k.skinColor&&k.hasOwnProperty("skinColor")&&(U.skinColor=k.skinColor),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.Affix=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.type=k.string();break;case 2:j.amount=k.float();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.type&&k.hasOwnProperty("type")&&!F.isString(k.type)?"type: string expected":null!=k.amount&&k.hasOwnProperty("amount")&&"number"!=typeof k.amount?"amount: number expected":null},j.fromObject=function(k){if(k instanceof G.Affix)return k;var B=new G.Affix;return null!=k.type&&(B.type=String(k.type)),null!=k.amount&&(B.amount=Number(k.amount)),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.type="",U.amount=0),null!=k.type&&k.hasOwnProperty("type")&&(U.type=k.type),null!=k.amount&&k.hasOwnProperty("amount")&&(U.amount=B.json&&!isFinite(k.amount)?String(k.amount):k.amount),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.Appearance=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.ID=k.int32();break;case 2:j.wizardAppearance=G.WizardAppearance.decode(k,k.uint32());break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";var B={};if(null!=k.ID&&k.hasOwnProperty("ID")&&(B.appearance=1,!F.isInteger(k.ID)))return"ID: integer expected";if(null!=k.wizardAppearance&&k.hasOwnProperty("wizardAppearance")){if(1===B.appearance)return"appearance: multiple values";B.appearance=1;var U=G.WizardAppearance.verify(k.wizardAppearance);if(U)return"wizardAppearance."+U}return null},j.fromObject=function(k){if(k instanceof G.Appearance)return k;var B=new G.Appearance;if(null!=k.ID&&(B.ID=0|k.ID),null!=k.wizardAppearance){if("object"!=typeof k.wizardAppearance)throw TypeError(".Appearance.wizardAppearance: object expected");B.wizardAppearance=G.WizardAppearance.fromObject(k.wizardAppearance)}return B},j.toObject=function(k,B){B||(B={});var U={};return null!=k.ID&&k.hasOwnProperty("ID")&&(U.ID=k.ID,B.oneofs&&(U.appearance="ID")),null!=k.wizardAppearance&&k.hasOwnProperty("wizardAppearance")&&(U.wizardAppearance=G.WizardAppearance.toObject(k.wizardAppearance,B),B.oneofs&&(U.appearance="wizardAppearance")),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.Equipment=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 0:j.key=k.int32();break;case 1:j.follow=k.int32();break;case 2:j.hat=k.int32();break;case 3:j.outfit=k.int32();break;case 4:j.weapon=k.int32();break;case 5:j.spellRelic=k.int32();break;case 6:j.boots=k.int32();break;case 7:j.mount=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";var B={};return null!=k.key&&k.hasOwnProperty("key")&&(B._key=1,!F.isInteger(k.key))?"key: integer expected":null!=k.follow&&k.hasOwnProperty("follow")&&(B._follow=1,!F.isInteger(k.follow))?"follow: integer expected":null!=k.hat&&k.hasOwnProperty("hat")&&(B._hat=1,!F.isInteger(k.hat))?"hat: integer expected":null!=k.outfit&&k.hasOwnProperty("outfit")&&(B._outfit=1,!F.isInteger(k.outfit))?"outfit: integer expected":null!=k.weapon&&k.hasOwnProperty("weapon")&&(B._weapon=1,!F.isInteger(k.weapon))?"weapon: integer expected":null!=k.spellRelic&&k.hasOwnProperty("spellRelic")&&(B._spellRelic=1,!F.isInteger(k.spellRelic))?"spellRelic: integer expected":null!=k.boots&&k.hasOwnProperty("boots")&&(B._boots=1,!F.isInteger(k.boots))?"boots: integer expected":null!=k.mount&&k.hasOwnProperty("mount")&&(B._mount=1,!F.isInteger(k.mount))?"mount: integer expected":null},j.fromObject=function(k){if(k instanceof G.Equipment)return k;var B=new G.Equipment;return null!=k.key&&(B.key=0|k.key),null!=k.follow&&(B.follow=0|k.follow),null!=k.hat&&(B.hat=0|k.hat),null!=k.outfit&&(B.outfit=0|k.outfit),null!=k.weapon&&(B.weapon=0|k.weapon),null!=k.spellRelic&&(B.spellRelic=0|k.spellRelic),null!=k.boots&&(B.boots=0|k.boots),null!=k.mount&&(B.mount=0|k.mount),B},j.toObject=function(k,B){B||(B={});var U={};return null!=k.key&&k.hasOwnProperty("key")&&(U.key=k.key,B.oneofs&&(U._key="key")),null!=k.follow&&k.hasOwnProperty("follow")&&(U.follow=k.follow,B.oneofs&&(U._follow="follow")),null!=k.hat&&k.hasOwnProperty("hat")&&(U.hat=k.hat,B.oneofs&&(U._hat="hat")),null!=k.outfit&&k.hasOwnProperty("outfit")&&(U.outfit=k.outfit,B.oneofs&&(U._outfit="outfit")),null!=k.weapon&&k.hasOwnProperty("weapon")&&(U.weapon=k.weapon,B.oneofs&&(U._weapon="weapon")),null!=k.spellRelic&&k.hasOwnProperty("spellRelic")&&(U.spellRelic=k.spellRelic,B.oneofs&&(U._spellRelic="spellRelic")),null!=k.boots&&k.hasOwnProperty("boots")&&(U.boots=k.boots,B.oneofs&&(U._boots="boots")),null!=k.mount&&k.hasOwnProperty("mount")&&(U.mount=k.mount,B.oneofs&&(U._mount="mount")),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.Unit=function(){function j(k){if(this.affixes=[],this.spells=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.level=k.int32();break;case 2:j.health=k.int32();break;case 3:j.affixes&&j.affixes.length||(j.affixes=[]),j.affixes.push(G.Affix.decode(k,k.uint32()));break;case 4:j.type=k.string();break;case 5:j.appearance=G.Appearance.decode(k,k.uint32());break;case 7:j.accuracy=k.float();break;case 8:j.criticalHitChance=k.float();break;case 9:j.criticalHitBonusDamage=k.float();break;case 10:j.spells&&j.spells.length||(j.spells=[]),j.spells.push(G.Spell.decode(k,k.uint32()));break;case 11:j.powerStat=k.int32();break;case 12:j.healthStat=k.int32();break;case 13:j.element=k.string();break;case 14:j.nickname=k.string();break;case 15:j.equipment=G.Equipment.decode(k,k.uint32());break;case 16:j.maxHealth=k.int32();break;case 17:j.name=k.string();break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";var B={};if(null!=k.level&&k.hasOwnProperty("level")&&!F.isInteger(k.level))return"level: integer expected";if(null!=k.health&&k.hasOwnProperty("health")&&!F.isInteger(k.health))return"health: integer expected";if(null!=k.affixes&&k.hasOwnProperty("affixes")){if(!Array.isArray(k.affixes))return"affixes: array expected";for(var U=0;U>>3){case 1:j.energy=k.int32();break;case 2:j.units&&j.units.length||(j.units=[]),j.units.push(G.Unit.decode(k,k.uint32()));break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.energy&&k.hasOwnProperty("energy")&&!F.isInteger(k.energy))return"energy: integer expected";if(null!=k.units&&k.hasOwnProperty("units")){if(!Array.isArray(k.units))return"units: array expected";for(var B=0;B>>3){case 1:j.min=k.int32();break;case 2:j.max=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.min&&k.hasOwnProperty("min")&&!F.isInteger(k.min)?"min: integer expected":null!=k.max&&k.hasOwnProperty("max")&&!F.isInteger(k.max)?"max: integer expected":null},j.fromObject=function(k){if(k instanceof G.UnitLevel)return k;var B=new G.UnitLevel;return null!=k.min&&(B.min=0|k.min),null!=k.max&&(B.max=0|k.max),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.min=0,U.max=0),null!=k.min&&k.hasOwnProperty("min")&&(U.min=k.min),null!=k.max&&k.hasOwnProperty("max")&&(U.max=k.max),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.TeamLimit=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 0:j.limit=G.TeamLimit.Limit.decode(k,k.uint32());break;case 1:j.units=G.TeamLimit.Units.decode(k,k.uint32());break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.limit&&k.hasOwnProperty("limit")&&(B=G.TeamLimit.Limit.verify(k.limit))?"limit."+B:null!=k.units&&k.hasOwnProperty("units")&&(B=G.TeamLimit.Units.verify(k.units))?"units."+B:null;var B},j.fromObject=function(k){if(k instanceof G.TeamLimit)return k;var B=new G.TeamLimit;if(null!=k.limit){if("object"!=typeof k.limit)throw TypeError(".TeamLimit.limit: object expected");B.limit=G.TeamLimit.Limit.fromObject(k.limit)}if(null!=k.units){if("object"!=typeof k.units)throw TypeError(".TeamLimit.units: object expected");B.units=G.TeamLimit.Units.fromObject(k.units)}return B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.limit=null,U.units=null),null!=k.limit&&k.hasOwnProperty("limit")&&(U.limit=G.TeamLimit.Limit.toObject(k.limit,B)),null!=k.units&&k.hasOwnProperty("units")&&(U.units=G.TeamLimit.Units.toObject(k.units,B)),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j.Limit=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.min=k.int32();break;case 2:j.max=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.min&&k.hasOwnProperty("min")&&!F.isInteger(k.min)?"min: integer expected":null!=k.max&&k.hasOwnProperty("max")&&!F.isInteger(k.max)?"max: integer expected":null},j.fromObject=function(k){if(k instanceof G.TeamLimit.Limit)return k;var B=new G.TeamLimit.Limit;return null!=k.min&&(B.min=0|k.min),null!=k.max&&(B.max=0|k.max),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.min=0,U.max=0),null!=k.min&&k.hasOwnProperty("min")&&(U.min=k.min),null!=k.max&&k.hasOwnProperty("max")&&(U.max=k.max),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),j.Units=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.min=k.int32();break;case 2:j.max=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.min&&k.hasOwnProperty("min")&&!F.isInteger(k.min)?"min: integer expected":null!=k.max&&k.hasOwnProperty("max")&&!F.isInteger(k.max)?"max: integer expected":null},j.fromObject=function(k){if(k instanceof G.TeamLimit.Units)return k;var B=new G.TeamLimit.Units;return null!=k.min&&(B.min=0|k.min),null!=k.max&&(B.max=0|k.max),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.min=0,U.max=0),null!=k.min&&k.hasOwnProperty("min")&&(U.min=k.min),null!=k.max&&k.hasOwnProperty("max")&&(U.max=k.max),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),j}(),G.Battle=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.id=k.string();break;case 2:j.userId=k.int32();break;case 3:j.status=k.string();break;case 4:j.homeState=G.TeamState.decode(k,k.uint32());break;case 5:j.awayState=G.TeamState.decode(k,k.uint32());break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.id&&k.hasOwnProperty("id")&&!F.isString(k.id)?"id: string expected":null!=k.userId&&k.hasOwnProperty("userId")&&!F.isInteger(k.userId)?"userId: integer expected":null!=k.status&&k.hasOwnProperty("status")&&!F.isString(k.status)?"status: string expected":null!=k.homeState&&k.hasOwnProperty("homeState")&&(B=G.TeamState.verify(k.homeState))?"homeState."+B:null!=k.awayState&&k.hasOwnProperty("awayState")&&(B=G.TeamState.verify(k.awayState))?"awayState."+B:null;var B},j.fromObject=function(k){if(k instanceof G.Battle)return k;var B=new G.Battle;if(null!=k.id&&(B.id=String(k.id)),null!=k.userId&&(B.userId=0|k.userId),null!=k.status&&(B.status=String(k.status)),null!=k.homeState){if("object"!=typeof k.homeState)throw TypeError(".Battle.homeState: object expected");B.homeState=G.TeamState.fromObject(k.homeState)}if(null!=k.awayState){if("object"!=typeof k.awayState)throw TypeError(".Battle.awayState: object expected");B.awayState=G.TeamState.fromObject(k.awayState)}return B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.id="",U.userId=0,U.status="",U.homeState=null,U.awayState=null),null!=k.id&&k.hasOwnProperty("id")&&(U.id=k.id),null!=k.userId&&k.hasOwnProperty("userId")&&(U.userId=k.userId),null!=k.status&&k.hasOwnProperty("status")&&(U.status=k.status),null!=k.homeState&&k.hasOwnProperty("homeState")&&(U.homeState=G.TeamState.toObject(k.homeState,B)),null!=k.awayState&&k.hasOwnProperty("awayState")&&(U.awayState=G.TeamState.toObject(k.awayState,B)),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.TargetData=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 0:j.deltaHealth=k.int32();break;case 1:j.finalHealth=k.int32();break;case 2:j.effect=k.int32();break;case 3:j.targetUnit=k.int32();break;case 4:j.deltaEnergy=k.int32();break;case 5:j.finalEnergy=k.int32();break;case 6:j.index=k.int32();break;case 7:j.nFactor=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";var B={};return null!=k.deltaHealth&&k.hasOwnProperty("deltaHealth")&&!F.isInteger(k.deltaHealth)?"deltaHealth: integer expected":null!=k.finalHealth&&k.hasOwnProperty("finalHealth")&&!F.isInteger(k.finalHealth)?"finalHealth: integer expected":null!=k.effect&&k.hasOwnProperty("effect")&&(B._effect=1,!F.isInteger(k.effect))?"effect: integer expected":null!=k.targetUnit&&k.hasOwnProperty("targetUnit")&&(B._targetUnit=1,!F.isInteger(k.targetUnit))?"targetUnit: integer expected":null!=k.deltaEnergy&&k.hasOwnProperty("deltaEnergy")&&(B._deltaEnergy=1,!F.isInteger(k.deltaEnergy))?"deltaEnergy: integer expected":null!=k.finalEnergy&&k.hasOwnProperty("finalEnergy")&&(B._finalEnergy=1,!F.isInteger(k.finalEnergy))?"finalEnergy: integer expected":null!=k.index&&k.hasOwnProperty("index")&&(B._index=1,!F.isInteger(k.index))?"index: integer expected":null!=k.nFactor&&k.hasOwnProperty("nFactor")&&!F.isInteger(k.nFactor)?"nFactor: integer expected":null},j.fromObject=function(k){if(k instanceof G.TargetData)return k;var B=new G.TargetData;return null!=k.deltaHealth&&(B.deltaHealth=0|k.deltaHealth),null!=k.finalHealth&&(B.finalHealth=0|k.finalHealth),null!=k.effect&&(B.effect=0|k.effect),null!=k.targetUnit&&(B.targetUnit=0|k.targetUnit),null!=k.deltaEnergy&&(B.deltaEnergy=0|k.deltaEnergy),null!=k.finalEnergy&&(B.finalEnergy=0|k.finalEnergy),null!=k.index&&(B.index=0|k.index),null!=k.nFactor&&(B.nFactor=0|k.nFactor),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.deltaHealth=0,U.finalHealth=0,U.nFactor=0),null!=k.deltaHealth&&k.hasOwnProperty("deltaHealth")&&(U.deltaHealth=k.deltaHealth),null!=k.finalHealth&&k.hasOwnProperty("finalHealth")&&(U.finalHealth=k.finalHealth),null!=k.effect&&k.hasOwnProperty("effect")&&(U.effect=k.effect,B.oneofs&&(U._effect="effect")),null!=k.targetUnit&&k.hasOwnProperty("targetUnit")&&(U.targetUnit=k.targetUnit,B.oneofs&&(U._targetUnit="targetUnit")),null!=k.deltaEnergy&&k.hasOwnProperty("deltaEnergy")&&(U.deltaEnergy=k.deltaEnergy,B.oneofs&&(U._deltaEnergy="deltaEnergy")),null!=k.finalEnergy&&k.hasOwnProperty("finalEnergy")&&(U.finalEnergy=k.finalEnergy,B.oneofs&&(U._finalEnergy="finalEnergy")),null!=k.index&&k.hasOwnProperty("index")&&(U.index=k.index,B.oneofs&&(U._index="index")),null!=k.nFactor&&k.hasOwnProperty("nFactor")&&(U.nFactor=k.nFactor),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.Action=function(){function j(k){if(this.targetData=[],k)for(var B=Object.keys(k),U=0;U>>3){case 0:j.team=k.int32();break;case 1:j.type=k.string();break;case 2:j.id=k.int32();break;case 3:j.targetData&&j.targetData.length||(j.targetData=[]),j.targetData.push(G.TargetData.decode(k,k.uint32()));break;case 4:j.epicID=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.team&&k.hasOwnProperty("team")&&!F.isInteger(k.team))return"team: integer expected";if(null!=k.type&&k.hasOwnProperty("type")&&!F.isString(k.type))return"type: string expected";if(null!=k.id&&k.hasOwnProperty("id")&&!F.isInteger(k.id))return"id: integer expected";if(null!=k.targetData&&k.hasOwnProperty("targetData")){if(!Array.isArray(k.targetData))return"targetData: array expected";for(var B=0;B>>3){case 0:j.ID=k.int32();break;case 1:j.type=k.string();break;case 2:j.quantity=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";var B={};return null!=k.ID&&k.hasOwnProperty("ID")&&(B._ID=1,!F.isInteger(k.ID))?"ID: integer expected":null!=k.type&&k.hasOwnProperty("type")&&(B._type=1,!F.isString(k.type))?"type: string expected":null!=k.quantity&&k.hasOwnProperty("quantity")&&(B._quantity=1,!F.isInteger(k.quantity))?"quantity: integer expected":null},j.fromObject=function(k){if(k instanceof G.LootItem)return k;var B=new G.LootItem;return null!=k.ID&&(B.ID=0|k.ID),null!=k.type&&(B.type=String(k.type)),null!=k.quantity&&(B.quantity=0|k.quantity),B},j.toObject=function(k,B){B||(B={});var U={};return null!=k.ID&&k.hasOwnProperty("ID")&&(U.ID=k.ID,B.oneofs&&(U._ID="ID")),null!=k.type&&k.hasOwnProperty("type")&&(U.type=k.type,B.oneofs&&(U._type="type")),null!=k.quantity&&k.hasOwnProperty("quantity")&&(U.quantity=k.quantity,B.oneofs&&(U._quantity="quantity")),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.BattleAction=function(){function j(k){if(this.actions=[],this.lootSecure=[],this.lootUnSecure=[],k)for(var B=Object.keys(k),U=0;U>>3){case 0:j.id=k.string();break;case 1:j.userId=k.int32();break;case 2:j.status=k.string();break;case 3:j.actionID=k.string();break;case 4:j.actions&&j.actions.length||(j.actions=[]),j.actions.push(G.Action.decode(k,k.uint32()));break;case 5:j.lootSecure&&j.lootSecure.length||(j.lootSecure=[]),j.lootSecure.push(G.LootItem.decode(k,k.uint32()));break;case 6:j.lootUnSecure&&j.lootUnSecure.length||(j.lootUnSecure=[]),j.lootUnSecure.push(G.LootItem.decode(k,k.uint32()));break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.id&&k.hasOwnProperty("id")&&!F.isString(k.id))return"id: string expected";if(null!=k.userId&&k.hasOwnProperty("userId")&&!F.isInteger(k.userId))return"userId: integer expected";if(null!=k.status&&k.hasOwnProperty("status")&&!F.isString(k.status))return"status: string expected";if(null!=k.actionID&&k.hasOwnProperty("actionID")&&!F.isString(k.actionID))return"actionID: string expected";if(null!=k.actions&&k.hasOwnProperty("actions")){if(!Array.isArray(k.actions))return"actions: array expected";for(var B=0;B>>3){case 1:j.userId=k.int32();break;case 2:j.runs&&j.runs.length||(j.runs=[]),j.runs.push(G.Run.decode(k,k.uint32()));break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.userId&&k.hasOwnProperty("userId")&&!F.isInteger(k.userId))return"userId: integer expected";if(null!=k.runs&&k.hasOwnProperty("runs")){if(!Array.isArray(k.runs))return"runs: array expected";for(var B=0;B>>3){case 1:j.bounties&&j.bounties.length||(j.bounties=[]),j.bounties.push(G.Bounty.decode(k,k.uint32()));break;case 2:if(j.pets&&j.pets.length||(j.pets=[]),2==(7&$))for(var H=k.uint32()+k.pos;k.pos>>3){case 1:j.name=k.string();break;case 2:j.statBonus=G.StatBonus.decode(k,k.uint32());break;case 3:j.isMember=k.bool();break;case 4:j.petID=k.int32();break;case 5:j.bountyLoot&&j.bountyLoot.length||(j.bountyLoot=[]),j.bountyLoot.push(G.BountyRunLoot.decode(k,k.uint32()));break;case 6:if(j.randomLootItemTableIds&&j.randomLootItemTableIds.length||(j.randomLootItemTableIds=[]),2==(7&$))for(var H=k.uint32()+k.pos;k.pos>>3){case 1:j.ID=k.int32();break;case 2:j.quantity=k.int32();break;case 3:j.weight=k.float();break;case 4:j.type=k.string();break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";var B={};return null!=k.ID&&k.hasOwnProperty("ID")&&!F.isInteger(k.ID)?"ID: integer expected":null!=k.quantity&&k.hasOwnProperty("quantity")&&(B._quantity=1,!F.isInteger(k.quantity))?"quantity: integer expected":null!=k.weight&&k.hasOwnProperty("weight")&&(B._weight=1,"number"!=typeof k.weight)?"weight: number expected":null!=k.type&&k.hasOwnProperty("type")&&(B._type=1,!F.isString(k.type))?"type: string expected":null},j.fromObject=function(k){if(k instanceof G.BountyRunLoot)return k;var B=new G.BountyRunLoot;return null!=k.ID&&(B.ID=0|k.ID),null!=k.quantity&&(B.quantity=0|k.quantity),null!=k.weight&&(B.weight=Number(k.weight)),null!=k.type&&(B.type=String(k.type)),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.ID=0),null!=k.ID&&k.hasOwnProperty("ID")&&(U.ID=k.ID),null!=k.quantity&&k.hasOwnProperty("quantity")&&(U.quantity=k.quantity,B.oneofs&&(U._quantity="quantity")),null!=k.weight&&k.hasOwnProperty("weight")&&(U.weight=B.json&&!isFinite(k.weight)?String(k.weight):k.weight,B.oneofs&&(U._weight="weight")),null!=k.type&&k.hasOwnProperty("type")&&(U.type=k.type,B.oneofs&&(U._type="type")),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.StatBonus=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.type=k.string();break;case 2:j.amount=k.float();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.type&&k.hasOwnProperty("type")&&!F.isString(k.type)?"type: string expected":null!=k.amount&&k.hasOwnProperty("amount")&&"number"!=typeof k.amount?"amount: number expected":null},j.fromObject=function(k){if(k instanceof G.StatBonus)return k;var B=new G.StatBonus;return null!=k.type&&(B.type=String(k.type)),null!=k.amount&&(B.amount=Number(k.amount)),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.type="",U.amount=0),null!=k.type&&k.hasOwnProperty("type")&&(U.type=k.type),null!=k.amount&&k.hasOwnProperty("amount")&&(U.amount=B.json&&!isFinite(k.amount)?String(k.amount):k.amount),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.Character=function(){function j(k){if(this.loadouts=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userId=k.int32();break;case 2:j.gameVersion=k.string();break;case 3:j.dataVersion=k.int32();break;case 4:j.inventory=G.Inventory.decode(k,k.uint32());break;case 5:j.loadouts&&j.loadouts.length||(j.loadouts=[]),j.loadouts.push(G.Loadout.decode(k,k.uint32()));break;case 6:j.membership=G.Membership.decode(k,k.uint32());break;case 7:j.egInfo=G.EgInfo.decode(k,k.uint32());break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.userId&&k.hasOwnProperty("userId")&&!F.isInteger(k.userId))return"userId: integer expected";if(null!=k.gameVersion&&k.hasOwnProperty("gameVersion")&&!F.isString(k.gameVersion))return"gameVersion: string expected";if(null!=k.dataVersion&&k.hasOwnProperty("dataVersion")&&!F.isInteger(k.dataVersion))return"dataVersion: integer expected";if(null!=k.inventory&&k.hasOwnProperty("inventory")&&(U=G.Inventory.verify(k.inventory)))return"inventory."+U;if(null!=k.loadouts&&k.hasOwnProperty("loadouts")){if(!Array.isArray(k.loadouts))return"loadouts: array expected";for(var B=0;B>>3){case 1:j.orb&&j.orb.length||(j.orb=[]),j.orb.push(G.Item.decode(k,k.uint32()));break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.orb&&k.hasOwnProperty("orb")){if(!Array.isArray(k.orb))return"orb: array expected";for(var B=0;B>>3){case 1:j.ID=k.int32();break;case 2:j.quantity=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";var B={};return null!=k.ID&&k.hasOwnProperty("ID")&&!F.isInteger(k.ID)?"ID: integer expected":null!=k.quantity&&k.hasOwnProperty("quantity")&&(B._quantity=1,!F.isInteger(k.quantity))?"quantity: integer expected":null},j.fromObject=function(k){if(k instanceof G.Item)return k;var B=new G.Item;return null!=k.ID&&(B.ID=0|k.ID),null!=k.quantity&&(B.quantity=0|k.quantity),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.ID=0),null!=k.ID&&k.hasOwnProperty("ID")&&(U.ID=k.ID),null!=k.quantity&&k.hasOwnProperty("quantity")&&(U.quantity=k.quantity,B.oneofs&&(U._quantity="quantity")),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.Loadout=function(){function j(k){if(this.orbs=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:if(j.orbs&&j.orbs.length||(j.orbs=[]),2==(7&$))for(var H=k.uint32()+k.pos;k.pos>>3){case 1:j.active=k.bool();break;case 2:j.memberStartDate=k.int32();break;case 3:j.memberEndDate=k.int32();break;case 4:j.membershipStartTs=k.double();break;case 5:j.membershipEndTs=k.double();break;case 6:j.features&&j.features.length||(j.features=[]),j.features.push(k.string());break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.active&&k.hasOwnProperty("active")&&"boolean"!=typeof k.active)return"active: boolean expected";if(null!=k.memberStartDate&&k.hasOwnProperty("memberStartDate")&&!F.isInteger(k.memberStartDate))return"memberStartDate: integer expected";if(null!=k.memberEndDate&&k.hasOwnProperty("memberEndDate")&&!F.isInteger(k.memberEndDate))return"memberEndDate: integer expected";if(null!=k.membershipStartTs&&k.hasOwnProperty("membershipStartTs")&&"number"!=typeof k.membershipStartTs)return"membershipStartTs: number expected";if(null!=k.membershipEndTs&&k.hasOwnProperty("membershipEndTs")&&"number"!=typeof k.membershipEndTs)return"membershipEndTs: number expected";if(null!=k.features&&k.hasOwnProperty("features")){if(!Array.isArray(k.features))return"features: array expected";for(var B=0;B>>3){case 1:j.tier=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.tier&&k.hasOwnProperty("tier")&&!F.isInteger(k.tier)?"tier: integer expected":null},j.fromObject=function(k){if(k instanceof G.EgInfo)return k;var B=new G.EgInfo;return null!=k.tier&&(B.tier=0|k.tier),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.tier=0),null!=k.tier&&k.hasOwnProperty("tier")&&(U.tier=k.tier),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.CoOpTeamProto=function(){function j(k){if(this.teamMembers=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.hostID=k.double();break;case 2:j.teamMembers&&j.teamMembers.length||(j.teamMembers=[]),j.teamMembers.push(G.CoOpTeamMemberProto.decode(k,k.uint32()));break;case 3:j.battleStreak=k.double();break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.hostID&&k.hasOwnProperty("hostID")&&"number"!=typeof k.hostID)return"hostID: number expected";if(null!=k.teamMembers&&k.hasOwnProperty("teamMembers")){if(!Array.isArray(k.teamMembers))return"teamMembers: array expected";for(var B=0;B>>3){case 1:j.hostID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.hostID&&k.hasOwnProperty("hostID")&&"number"!=typeof k.hostID?"hostID: number expected":null},F.fromObject=function(k){if(k instanceof G.CoOpTeamDisbandedProto)return k;var B=new G.CoOpTeamDisbandedProto;return null!=k.hostID&&(B.hostID=Number(k.hostID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.hostID=0),null!=k.hostID&&k.hasOwnProperty("hostID")&&(U.hostID=B.json&&!isFinite(k.hostID)?String(k.hostID):k.hostID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.CoOpTeamJoinRequestProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null},F.fromObject=function(k){if(k instanceof G.CoOpTeamJoinRequestProto)return k;var B=new G.CoOpTeamJoinRequestProto;return null!=k.userID&&(B.userID=Number(k.userID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.CoOpTeamErrorProto=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.reason=k.string();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.reason&&k.hasOwnProperty("reason")&&!F.isString(k.reason)?"reason: string expected":null},j.fromObject=function(k){if(k instanceof G.CoOpTeamErrorProto)return k;var B=new G.CoOpTeamErrorProto;return null!=k.reason&&(B.reason=String(k.reason)),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.reason=""),null!=k.reason&&k.hasOwnProperty("reason")&&(U.reason=k.reason),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.CoOpTeamJoinSuccessProto=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.socketRoomID=k.string();break;case 2:j.team=G.CoOpTeamProto.decode(k,k.uint32());break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.socketRoomID&&k.hasOwnProperty("socketRoomID")&&!F.isString(k.socketRoomID))return"socketRoomID: string expected";if(null!=k.team&&k.hasOwnProperty("team")){var B=G.CoOpTeamProto.verify(k.team);if(B)return"team."+B}return null},j.fromObject=function(k){if(k instanceof G.CoOpTeamJoinSuccessProto)return k;var B=new G.CoOpTeamJoinSuccessProto;if(null!=k.socketRoomID&&(B.socketRoomID=String(k.socketRoomID)),null!=k.team){if("object"!=typeof k.team)throw TypeError(".CoOpTeamJoinSuccessProto.team: object expected");B.team=G.CoOpTeamProto.fromObject(k.team)}return B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.socketRoomID="",U.team=null),null!=k.socketRoomID&&k.hasOwnProperty("socketRoomID")&&(U.socketRoomID=k.socketRoomID),null!=k.team&&k.hasOwnProperty("team")&&(U.team=G.CoOpTeamProto.toObject(k.team,B)),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.CoOpTeamMatchDetailsProto=function(){function j(k){if(this.teammates=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.hostID=k.double();break;case 2:j.type=k.string();break;case 3:j.teammates&&j.teammates.length||(j.teammates=[]),j.teammates.push(G.PlayerProto.decode(k,k.uint32()));break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.hostID&&k.hasOwnProperty("hostID")&&"number"!=typeof k.hostID)return"hostID: number expected";if(null!=k.type&&k.hasOwnProperty("type")&&!F.isString(k.type))return"type: string expected";if(null!=k.teammates&&k.hasOwnProperty("teammates")){if(!Array.isArray(k.teammates))return"teammates: array expected";for(var B=0;B>>3){case 1:j.userID=k.double();break;case 2:j.ready=k.bool();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null!=k.ready&&k.hasOwnProperty("ready")&&"boolean"!=typeof k.ready?"ready: boolean expected":null},F.fromObject=function(k){if(k instanceof G.CoOpTeamMemberProto)return k;var B=new G.CoOpTeamMemberProto;return null!=k.userID&&(B.userID=Number(k.userID)),null!=k.ready&&(B.ready=Boolean(k.ready)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0,U.ready=!1),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),null!=k.ready&&k.hasOwnProperty("ready")&&(U.ready=k.ready),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.CoOpTeamReadyUpProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null},F.fromObject=function(k){if(k instanceof G.CoOpTeamReadyUpProto)return k;var B=new G.CoOpTeamReadyUpProto;return null!=k.userID&&(B.userID=Number(k.userID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.PlayerProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;case 2:j.appearance=G.PlayerAppearanceProto.decode(k,k.uint32());break;case 3:j.equipment=G.PlayerEquipmentProto.decode(k,k.uint32());break;case 4:j.name=G.PlayerNameProto.decode(k,k.uint32());break;case 5:j.level=k.double();break;case 6:j.member=k.double();break;case 7:j.team=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null!=k.appearance&&k.hasOwnProperty("appearance")&&(B=G.PlayerAppearanceProto.verify(k.appearance))?"appearance."+B:null!=k.equipment&&k.hasOwnProperty("equipment")&&(B=G.PlayerEquipmentProto.verify(k.equipment))?"equipment."+B:null!=k.name&&k.hasOwnProperty("name")&&(B=G.PlayerNameProto.verify(k.name))?"name."+B:null!=k.level&&k.hasOwnProperty("level")&&"number"!=typeof k.level?"level: number expected":null!=k.member&&k.hasOwnProperty("member")&&"number"!=typeof k.member?"member: number expected":null!=k.team&&k.hasOwnProperty("team")&&"number"!=typeof k.team?"team: number expected":null;var B},F.fromObject=function(k){if(k instanceof G.PlayerProto)return k;var B=new G.PlayerProto;if(null!=k.userID&&(B.userID=Number(k.userID)),null!=k.appearance){if("object"!=typeof k.appearance)throw TypeError(".PlayerProto.appearance: object expected");B.appearance=G.PlayerAppearanceProto.fromObject(k.appearance)}if(null!=k.equipment){if("object"!=typeof k.equipment)throw TypeError(".PlayerProto.equipment: object expected");B.equipment=G.PlayerEquipmentProto.fromObject(k.equipment)}if(null!=k.name){if("object"!=typeof k.name)throw TypeError(".PlayerProto.name: object expected");B.name=G.PlayerNameProto.fromObject(k.name)}return null!=k.level&&(B.level=Number(k.level)),null!=k.member&&(B.member=Number(k.member)),null!=k.team&&(B.team=Number(k.team)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0,U.appearance=null,U.equipment=null,U.name=null,U.level=0,U.member=0,U.team=0),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),null!=k.appearance&&k.hasOwnProperty("appearance")&&(U.appearance=G.PlayerAppearanceProto.toObject(k.appearance,B)),null!=k.equipment&&k.hasOwnProperty("equipment")&&(U.equipment=G.PlayerEquipmentProto.toObject(k.equipment,B)),null!=k.name&&k.hasOwnProperty("name")&&(U.name=G.PlayerNameProto.toObject(k.name,B)),null!=k.level&&k.hasOwnProperty("level")&&(U.level=B.json&&!isFinite(k.level)?String(k.level):k.level),null!=k.member&&k.hasOwnProperty("member")&&(U.member=B.json&&!isFinite(k.member)?String(k.member):k.member),null!=k.team&&k.hasOwnProperty("team")&&(U.team=B.json&&!isFinite(k.team)?String(k.team):k.team),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.PlayerAppearanceProto=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.faceID=k.double();break;case 2:j.hair=G.PlayerHairProto.decode(k,k.uint32());break;case 3:j.skinColorID=k.double();break;case 4:j.eyeColorID=k.double();break;case 5:j.gender=k.string();break;case 6:j.morph=G.MorphProto.decode(k,k.uint32());break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.faceID&&k.hasOwnProperty("faceID")&&"number"!=typeof k.faceID?"faceID: number expected":null!=k.hair&&k.hasOwnProperty("hair")&&(B=G.PlayerHairProto.verify(k.hair))?"hair."+B:null!=k.skinColorID&&k.hasOwnProperty("skinColorID")&&"number"!=typeof k.skinColorID?"skinColorID: number expected":null!=k.eyeColorID&&k.hasOwnProperty("eyeColorID")&&"number"!=typeof k.eyeColorID?"eyeColorID: number expected":null!=k.gender&&k.hasOwnProperty("gender")&&!F.isString(k.gender)?"gender: string expected":null!=k.morph&&k.hasOwnProperty("morph")&&(B=G.MorphProto.verify(k.morph))?"morph."+B:null;var B},j.fromObject=function(k){if(k instanceof G.PlayerAppearanceProto)return k;var B=new G.PlayerAppearanceProto;if(null!=k.faceID&&(B.faceID=Number(k.faceID)),null!=k.hair){if("object"!=typeof k.hair)throw TypeError(".PlayerAppearanceProto.hair: object expected");B.hair=G.PlayerHairProto.fromObject(k.hair)}if(null!=k.skinColorID&&(B.skinColorID=Number(k.skinColorID)),null!=k.eyeColorID&&(B.eyeColorID=Number(k.eyeColorID)),null!=k.gender&&(B.gender=String(k.gender)),null!=k.morph){if("object"!=typeof k.morph)throw TypeError(".PlayerAppearanceProto.morph: object expected");B.morph=G.MorphProto.fromObject(k.morph)}return B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.faceID=0,U.hair=null,U.skinColorID=0,U.eyeColorID=0,U.gender="",U.morph=null),null!=k.faceID&&k.hasOwnProperty("faceID")&&(U.faceID=B.json&&!isFinite(k.faceID)?String(k.faceID):k.faceID),null!=k.hair&&k.hasOwnProperty("hair")&&(U.hair=G.PlayerHairProto.toObject(k.hair,B)),null!=k.skinColorID&&k.hasOwnProperty("skinColorID")&&(U.skinColorID=B.json&&!isFinite(k.skinColorID)?String(k.skinColorID):k.skinColorID),null!=k.eyeColorID&&k.hasOwnProperty("eyeColorID")&&(U.eyeColorID=B.json&&!isFinite(k.eyeColorID)?String(k.eyeColorID):k.eyeColorID),null!=k.gender&&k.hasOwnProperty("gender")&&(U.gender=k.gender),null!=k.morph&&k.hasOwnProperty("morph")&&(U.morph=G.MorphProto.toObject(k.morph,B)),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.MorphProto=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.type=k.string();break;case 2:j.ID=k.double();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.type&&k.hasOwnProperty("type")&&!F.isString(k.type)?"type: string expected":null!=k.ID&&k.hasOwnProperty("ID")&&"number"!=typeof k.ID?"ID: number expected":null},j.fromObject=function(k){if(k instanceof G.MorphProto)return k;var B=new G.MorphProto;return null!=k.type&&(B.type=String(k.type)),null!=k.ID&&(B.ID=Number(k.ID)),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.type="",U.ID=0),null!=k.type&&k.hasOwnProperty("type")&&(U.type=k.type),null!=k.ID&&k.hasOwnProperty("ID")&&(U.ID=B.json&&!isFinite(k.ID)?String(k.ID):k.ID),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.PlayerEquipmentProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.hatID=k.double();break;case 2:j.outfitID=k.double();break;case 3:j.weaponID=k.double();break;case 4:j.bootsID=k.double();break;case 5:j.costumeID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.hatID&&k.hasOwnProperty("hatID")&&"number"!=typeof k.hatID?"hatID: number expected":null!=k.outfitID&&k.hasOwnProperty("outfitID")&&"number"!=typeof k.outfitID?"outfitID: number expected":null!=k.weaponID&&k.hasOwnProperty("weaponID")&&"number"!=typeof k.weaponID?"weaponID: number expected":null!=k.bootsID&&k.hasOwnProperty("bootsID")&&"number"!=typeof k.bootsID?"bootsID: number expected":null!=k.costumeID&&k.hasOwnProperty("costumeID")&&"number"!=typeof k.costumeID?"costumeID: number expected":null},F.fromObject=function(k){if(k instanceof G.PlayerEquipmentProto)return k;var B=new G.PlayerEquipmentProto;return null!=k.hatID&&(B.hatID=Number(k.hatID)),null!=k.outfitID&&(B.outfitID=Number(k.outfitID)),null!=k.weaponID&&(B.weaponID=Number(k.weaponID)),null!=k.bootsID&&(B.bootsID=Number(k.bootsID)),null!=k.costumeID&&(B.costumeID=Number(k.costumeID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.hatID=0,U.outfitID=0,U.weaponID=0,U.bootsID=0,U.costumeID=0),null!=k.hatID&&k.hasOwnProperty("hatID")&&(U.hatID=B.json&&!isFinite(k.hatID)?String(k.hatID):k.hatID),null!=k.outfitID&&k.hasOwnProperty("outfitID")&&(U.outfitID=B.json&&!isFinite(k.outfitID)?String(k.outfitID):k.outfitID),null!=k.weaponID&&k.hasOwnProperty("weaponID")&&(U.weaponID=B.json&&!isFinite(k.weaponID)?String(k.weaponID):k.weaponID),null!=k.bootsID&&k.hasOwnProperty("bootsID")&&(U.bootsID=B.json&&!isFinite(k.bootsID)?String(k.bootsID):k.bootsID),null!=k.costumeID&&k.hasOwnProperty("costumeID")&&(U.costumeID=B.json&&!isFinite(k.costumeID)?String(k.costumeID):k.costumeID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.PlayerHairProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.styleID=k.double();break;case 2:j.colorID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.styleID&&k.hasOwnProperty("styleID")&&"number"!=typeof k.styleID?"styleID: number expected":null!=k.colorID&&k.hasOwnProperty("colorID")&&"number"!=typeof k.colorID?"colorID: number expected":null},F.fromObject=function(k){if(k instanceof G.PlayerHairProto)return k;var B=new G.PlayerHairProto;return null!=k.styleID&&(B.styleID=Number(k.styleID)),null!=k.colorID&&(B.colorID=Number(k.colorID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.styleID=0,U.colorID=0),null!=k.styleID&&k.hasOwnProperty("styleID")&&(U.styleID=B.json&&!isFinite(k.styleID)?String(k.styleID):k.styleID),null!=k.colorID&&k.hasOwnProperty("colorID")&&(U.colorID=B.json&&!isFinite(k.colorID)?String(k.colorID):k.colorID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.PlayerNameProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.first=k.double();break;case 2:j.middle=k.double();break;case 3:j.last=k.double();break;case 4:j.nick=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.first&&k.hasOwnProperty("first")&&"number"!=typeof k.first?"first: number expected":null!=k.middle&&k.hasOwnProperty("middle")&&"number"!=typeof k.middle?"middle: number expected":null!=k.last&&k.hasOwnProperty("last")&&"number"!=typeof k.last?"last: number expected":null!=k.nick&&k.hasOwnProperty("nick")&&"number"!=typeof k.nick?"nick: number expected":null},F.fromObject=function(k){if(k instanceof G.PlayerNameProto)return k;var B=new G.PlayerNameProto;return null!=k.first&&(B.first=Number(k.first)),null!=k.middle&&(B.middle=Number(k.middle)),null!=k.last&&(B.last=Number(k.last)),null!=k.nick&&(B.nick=Number(k.nick)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.first=0,U.middle=0,U.last=0,U.nick=0),null!=k.first&&k.hasOwnProperty("first")&&(U.first=B.json&&!isFinite(k.first)?String(k.first):k.first),null!=k.middle&&k.hasOwnProperty("middle")&&(U.middle=B.json&&!isFinite(k.middle)?String(k.middle):k.middle),null!=k.last&&k.hasOwnProperty("last")&&(U.last=B.json&&!isFinite(k.last)?String(k.last):k.last),null!=k.nick&&k.hasOwnProperty("nick")&&(U.nick=B.json&&!isFinite(k.nick)?String(k.nick):k.nick),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.PlayerPetProto=function(){function j(k){if(this.foreignSpells=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.ID=k.double();break;case 2:j.stars=k.double();break;case 3:j.team=k.double();break;case 4:j.level=k.double();break;case 5:j.levelCaught=k.double();break;case 6:if(j.foreignSpells&&j.foreignSpells.length||(j.foreignSpells=[]),2==(7&$))for(var H=k.uint32()+k.pos;k.pos>>3){case 1:j.matchDetails=G.CoOpTeamMatchDetailsProto.decode(k,k.uint32());break;case 2:j.titanNetworkID=k.double();break;case 3:j.titanAssetID=k.double();break;case 4:j.titanHP=k.double();break;case 5:j.crystalHP=k.double();break;case 6:j.titanXPBounty=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.matchDetails&&k.hasOwnProperty("matchDetails")){var B=G.CoOpTeamMatchDetailsProto.verify(k.matchDetails);if(B)return"matchDetails."+B}return null!=k.titanNetworkID&&k.hasOwnProperty("titanNetworkID")&&"number"!=typeof k.titanNetworkID?"titanNetworkID: number expected":null!=k.titanAssetID&&k.hasOwnProperty("titanAssetID")&&"number"!=typeof k.titanAssetID?"titanAssetID: number expected":null!=k.titanHP&&k.hasOwnProperty("titanHP")&&"number"!=typeof k.titanHP?"titanHP: number expected":null!=k.crystalHP&&k.hasOwnProperty("crystalHP")&&"number"!=typeof k.crystalHP?"crystalHP: number expected":null!=k.titanXPBounty&&k.hasOwnProperty("titanXPBounty")&&"number"!=typeof k.titanXPBounty?"titanXPBounty: number expected":null},F.fromObject=function(k){if(k instanceof G.StartCoOpTitanMatchProto)return k;var B=new G.StartCoOpTitanMatchProto;if(null!=k.matchDetails){if("object"!=typeof k.matchDetails)throw TypeError(".StartCoOpTitanMatchProto.matchDetails: object expected");B.matchDetails=G.CoOpTeamMatchDetailsProto.fromObject(k.matchDetails)}return null!=k.titanNetworkID&&(B.titanNetworkID=Number(k.titanNetworkID)),null!=k.titanAssetID&&(B.titanAssetID=Number(k.titanAssetID)),null!=k.titanHP&&(B.titanHP=Number(k.titanHP)),null!=k.crystalHP&&(B.crystalHP=Number(k.crystalHP)),null!=k.titanXPBounty&&(B.titanXPBounty=Number(k.titanXPBounty)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.matchDetails=null,U.titanNetworkID=0,U.titanAssetID=0,U.titanHP=0,U.crystalHP=0,U.titanXPBounty=0),null!=k.matchDetails&&k.hasOwnProperty("matchDetails")&&(U.matchDetails=G.CoOpTeamMatchDetailsProto.toObject(k.matchDetails,B)),null!=k.titanNetworkID&&k.hasOwnProperty("titanNetworkID")&&(U.titanNetworkID=B.json&&!isFinite(k.titanNetworkID)?String(k.titanNetworkID):k.titanNetworkID),null!=k.titanAssetID&&k.hasOwnProperty("titanAssetID")&&(U.titanAssetID=B.json&&!isFinite(k.titanAssetID)?String(k.titanAssetID):k.titanAssetID),null!=k.titanHP&&k.hasOwnProperty("titanHP")&&(U.titanHP=B.json&&!isFinite(k.titanHP)?String(k.titanHP):k.titanHP),null!=k.crystalHP&&k.hasOwnProperty("crystalHP")&&(U.crystalHP=B.json&&!isFinite(k.crystalHP)?String(k.crystalHP):k.crystalHP),null!=k.titanXPBounty&&k.hasOwnProperty("titanXPBounty")&&(U.titanXPBounty=B.json&&!isFinite(k.titanXPBounty)?String(k.titanXPBounty):k.titanXPBounty),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.CoOpTitanHostReadyCheckProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null},F.fromObject=function(k){if(k instanceof G.CoOpTitanHostReadyCheckProto)return k;var B=new G.CoOpTitanHostReadyCheckProto;return null!=k.userID&&(B.userID=Number(k.userID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.CoOpTitanHostReadyResponseProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.currentTitanHP=k.double();break;case 2:j.currentCrystalHP=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.currentTitanHP&&k.hasOwnProperty("currentTitanHP")&&"number"!=typeof k.currentTitanHP?"currentTitanHP: number expected":null!=k.currentCrystalHP&&k.hasOwnProperty("currentCrystalHP")&&"number"!=typeof k.currentCrystalHP?"currentCrystalHP: number expected":null},F.fromObject=function(k){if(k instanceof G.CoOpTitanHostReadyResponseProto)return k;var B=new G.CoOpTitanHostReadyResponseProto;return null!=k.currentTitanHP&&(B.currentTitanHP=Number(k.currentTitanHP)),null!=k.currentCrystalHP&&(B.currentCrystalHP=Number(k.currentCrystalHP)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.currentTitanHP=0,U.currentCrystalHP=0),null!=k.currentTitanHP&&k.hasOwnProperty("currentTitanHP")&&(U.currentTitanHP=B.json&&!isFinite(k.currentTitanHP)?String(k.currentTitanHP):k.currentTitanHP),null!=k.currentCrystalHP&&k.hasOwnProperty("currentCrystalHP")&&(U.currentCrystalHP=B.json&&!isFinite(k.currentCrystalHP)?String(k.currentCrystalHP):k.currentCrystalHP),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.CoOpTitanPlayerAttackedProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;case 2:j.missed=k.bool();break;case 3:j.titanHealth=k.double();break;case 4:j.damage=k.double();break;case 5:j.spellID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null!=k.missed&&k.hasOwnProperty("missed")&&"boolean"!=typeof k.missed?"missed: boolean expected":null!=k.titanHealth&&k.hasOwnProperty("titanHealth")&&"number"!=typeof k.titanHealth?"titanHealth: number expected":null!=k.damage&&k.hasOwnProperty("damage")&&"number"!=typeof k.damage?"damage: number expected":null!=k.spellID&&k.hasOwnProperty("spellID")&&"number"!=typeof k.spellID?"spellID: number expected":null},F.fromObject=function(k){if(k instanceof G.CoOpTitanPlayerAttackedProto)return k;var B=new G.CoOpTitanPlayerAttackedProto;return null!=k.userID&&(B.userID=Number(k.userID)),null!=k.missed&&(B.missed=Boolean(k.missed)),null!=k.titanHealth&&(B.titanHealth=Number(k.titanHealth)),null!=k.damage&&(B.damage=Number(k.damage)),null!=k.spellID&&(B.spellID=Number(k.spellID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0,U.missed=!1,U.titanHealth=0,U.damage=0,U.spellID=0),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),null!=k.missed&&k.hasOwnProperty("missed")&&(U.missed=k.missed),null!=k.titanHealth&&k.hasOwnProperty("titanHealth")&&(U.titanHealth=B.json&&!isFinite(k.titanHealth)?String(k.titanHealth):k.titanHealth),null!=k.damage&&k.hasOwnProperty("damage")&&(U.damage=B.json&&!isFinite(k.damage)?String(k.damage):k.damage),null!=k.spellID&&k.hasOwnProperty("spellID")&&(U.spellID=B.json&&!isFinite(k.spellID)?String(k.spellID):k.spellID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.CoOpTitanTitanAttackedProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.missed=k.bool();break;case 2:j.crystalHP=k.double();break;case 3:j.damage=k.double();break;case 4:j.spellID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.missed&&k.hasOwnProperty("missed")&&"boolean"!=typeof k.missed?"missed: boolean expected":null!=k.crystalHP&&k.hasOwnProperty("crystalHP")&&"number"!=typeof k.crystalHP?"crystalHP: number expected":null!=k.damage&&k.hasOwnProperty("damage")&&"number"!=typeof k.damage?"damage: number expected":null!=k.spellID&&k.hasOwnProperty("spellID")&&"number"!=typeof k.spellID?"spellID: number expected":null},F.fromObject=function(k){if(k instanceof G.CoOpTitanTitanAttackedProto)return k;var B=new G.CoOpTitanTitanAttackedProto;return null!=k.missed&&(B.missed=Boolean(k.missed)),null!=k.crystalHP&&(B.crystalHP=Number(k.crystalHP)),null!=k.damage&&(B.damage=Number(k.damage)),null!=k.spellID&&(B.spellID=Number(k.spellID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.missed=!1,U.crystalHP=0,U.damage=0,U.spellID=0),null!=k.missed&&k.hasOwnProperty("missed")&&(U.missed=k.missed),null!=k.crystalHP&&k.hasOwnProperty("crystalHP")&&(U.crystalHP=B.json&&!isFinite(k.crystalHP)?String(k.crystalHP):k.crystalHP),null!=k.damage&&k.hasOwnProperty("damage")&&(U.damage=B.json&&!isFinite(k.damage)?String(k.damage):k.damage),null!=k.spellID&&k.hasOwnProperty("spellID")&&(U.spellID=B.json&&!isFinite(k.spellID)?String(k.spellID):k.spellID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.CoOpTitanQuestionAnsweredProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;case 2:j.correct=k.bool();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null!=k.correct&&k.hasOwnProperty("correct")&&"boolean"!=typeof k.correct?"correct: boolean expected":null},F.fromObject=function(k){if(k instanceof G.CoOpTitanQuestionAnsweredProto)return k;var B=new G.CoOpTitanQuestionAnsweredProto;return null!=k.userID&&(B.userID=Number(k.userID)),null!=k.correct&&(B.correct=Boolean(k.correct)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0,U.correct=!1),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),null!=k.correct&&k.hasOwnProperty("correct")&&(U.correct=k.correct),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.Mail=function(){function j(k){if(this.emails=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.emails&&j.emails.length||(j.emails=[]),j.emails.push(G.MailData.decode(k,k.uint32()));break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.emails&&k.hasOwnProperty("emails")){if(!Array.isArray(k.emails))return"emails: array expected";for(var B=0;B>>3){case 1:j.id=k.double();break;case 2:j.rawData=G.MailData.decode(k,k.uint32());break;case 3:j.userID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.id&&k.hasOwnProperty("id")&&"number"!=typeof k.id)return"id: number expected";if(null!=k.rawData&&k.hasOwnProperty("rawData")){var B=G.MailData.verify(k.rawData);if(B)return"rawData."+B}return null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null},F.fromObject=function(k){if(k instanceof G.OpenMailData)return k;var B=new G.OpenMailData;if(null!=k.id&&(B.id=Number(k.id)),null!=k.rawData){if("object"!=typeof k.rawData)throw TypeError(".OpenMailData.rawData: object expected");B.rawData=G.MailData.fromObject(k.rawData)}return null!=k.userID&&(B.userID=Number(k.userID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.id=0,U.rawData=null,U.userID=0),null!=k.id&&k.hasOwnProperty("id")&&(U.id=B.json&&!isFinite(k.id)?String(k.id):k.id),null!=k.rawData&&k.hasOwnProperty("rawData")&&(U.rawData=G.MailData.toObject(k.rawData,B)),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.MailData=function(){function j(k){if(this.attachments=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.id=k.double();break;case 2:j.isOpened=k.bool();break;case 3:j.subject=k.string();break;case 4:j.image=k.string();break;case 5:j.vImage=k.int32();break;case 6:j.message=k.string();break;case 7:j.attachments&&j.attachments.length||(j.attachments=[]),j.attachments.push(G.Attachment.decode(k,k.uint32()));break;case 8:j.gameMethod=G.GameMethod.decode(k,k.uint32());break;case 9:j.splitTest=k.string();break;case 10:j.membership=k.int32();break;case 11:j.userName=k.string();break;case 12:j.expiryDate=k.string();break;case 13:j.sendDate=k.string();break;case 14:j.name=k.string();break;case 15:j.extension=G.ExtensionData.decode(k,k.uint32());break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.id&&k.hasOwnProperty("id")&&"number"!=typeof k.id)return"id: number expected";if(null!=k.isOpened&&k.hasOwnProperty("isOpened")&&"boolean"!=typeof k.isOpened)return"isOpened: boolean expected";if(null!=k.subject&&k.hasOwnProperty("subject")&&!F.isString(k.subject))return"subject: string expected";if(null!=k.image&&k.hasOwnProperty("image")&&!F.isString(k.image))return"image: string expected";if(null!=k.vImage&&k.hasOwnProperty("vImage")&&!F.isInteger(k.vImage))return"vImage: integer expected";if(null!=k.message&&k.hasOwnProperty("message")&&!F.isString(k.message))return"message: string expected";if(null!=k.attachments&&k.hasOwnProperty("attachments")){if(!Array.isArray(k.attachments))return"attachments: array expected";for(var B=0;B>>3){case 1:j.ID=k.double();break;case 2:j.type=k.string();break;case 3:j.N=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.ID&&k.hasOwnProperty("ID")&&"number"!=typeof k.ID?"ID: number expected":null!=k.type&&k.hasOwnProperty("type")&&!F.isString(k.type)?"type: string expected":null!=k.N&&k.hasOwnProperty("N")&&!F.isInteger(k.N)?"N: integer expected":null},j.fromObject=function(k){if(k instanceof G.Attachment)return k;var B=new G.Attachment;return null!=k.ID&&(B.ID=Number(k.ID)),null!=k.type&&(B.type=String(k.type)),null!=k.N&&(B.N=0|k.N),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.ID=0,U.type="",U.N=0),null!=k.ID&&k.hasOwnProperty("ID")&&(U.ID=B.json&&!isFinite(k.ID)?String(k.ID):k.ID),null!=k.type&&k.hasOwnProperty("type")&&(U.type=k.type),null!=k.N&&k.hasOwnProperty("N")&&(U.N=k.N),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.GameMethod=function(){function j(k){if(this.params=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.name=k.string();break;case 2:j.buttonText=k.string();break;case 3:j.params&&j.params.length||(j.params=[]),j.params.push(k.string());break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.name&&k.hasOwnProperty("name")&&!F.isString(k.name))return"name: string expected";if(null!=k.buttonText&&k.hasOwnProperty("buttonText")&&!F.isString(k.buttonText))return"buttonText: string expected";if(null!=k.params&&k.hasOwnProperty("params")){if(!Array.isArray(k.params))return"params: array expected";for(var B=0;B>>3){case 1:j.name=k.string();break;case 2:j.unOpenedFrame=k.string();break;case 3:j.openedFrame=k.string();break;case 4:j.trashButtonVisible=k.bool();break;case 5:j.deleteMailOnClose=k.bool();break;case 6:j.params&&j.params.length||(j.params=[]),j.params.push(k.string());break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.name&&k.hasOwnProperty("name")&&!F.isString(k.name))return"name: string expected";if(null!=k.unOpenedFrame&&k.hasOwnProperty("unOpenedFrame")&&!F.isString(k.unOpenedFrame))return"unOpenedFrame: string expected";if(null!=k.openedFrame&&k.hasOwnProperty("openedFrame")&&!F.isString(k.openedFrame))return"openedFrame: string expected";if(null!=k.trashButtonVisible&&k.hasOwnProperty("trashButtonVisible")&&"boolean"!=typeof k.trashButtonVisible)return"trashButtonVisible: boolean expected";if(null!=k.deleteMailOnClose&&k.hasOwnProperty("deleteMailOnClose")&&"boolean"!=typeof k.deleteMailOnClose)return"deleteMailOnClose: boolean expected";if(null!=k.params&&k.hasOwnProperty("params")){if(!Array.isArray(k.params))return"params: array expected";for(var B=0;B>>3){case 1:j.roomID=k.string();break;case 2:j.userID=k.double();break;case 3:j.appearance=G.PlayerAppearanceProto.decode(k,k.uint32());break;case 4:j.equipment=G.PlayerEquipmentProto.decode(k,k.uint32());break;case 5:j.name=G.PlayerNameProto.decode(k,k.uint32());break;case 6:j.level=k.double();break;case 7:j.member=k.double();break;case 8:j.team=k.double();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.roomID&&k.hasOwnProperty("roomID")&&!F.isString(k.roomID)?"roomID: string expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null!=k.appearance&&k.hasOwnProperty("appearance")&&(B=G.PlayerAppearanceProto.verify(k.appearance))?"appearance."+B:null!=k.equipment&&k.hasOwnProperty("equipment")&&(B=G.PlayerEquipmentProto.verify(k.equipment))?"equipment."+B:null!=k.name&&k.hasOwnProperty("name")&&(B=G.PlayerNameProto.verify(k.name))?"name."+B:null!=k.level&&k.hasOwnProperty("level")&&"number"!=typeof k.level?"level: number expected":null!=k.member&&k.hasOwnProperty("member")&&"number"!=typeof k.member?"member: number expected":null!=k.team&&k.hasOwnProperty("team")&&"number"!=typeof k.team?"team: number expected":null;var B},j.fromObject=function(k){if(k instanceof G.DuelInviteProto)return k;var B=new G.DuelInviteProto;if(null!=k.roomID&&(B.roomID=String(k.roomID)),null!=k.userID&&(B.userID=Number(k.userID)),null!=k.appearance){if("object"!=typeof k.appearance)throw TypeError(".DuelInviteProto.appearance: object expected");B.appearance=G.PlayerAppearanceProto.fromObject(k.appearance)}if(null!=k.equipment){if("object"!=typeof k.equipment)throw TypeError(".DuelInviteProto.equipment: object expected");B.equipment=G.PlayerEquipmentProto.fromObject(k.equipment)}if(null!=k.name){if("object"!=typeof k.name)throw TypeError(".DuelInviteProto.name: object expected");B.name=G.PlayerNameProto.fromObject(k.name)}return null!=k.level&&(B.level=Number(k.level)),null!=k.member&&(B.member=Number(k.member)),null!=k.team&&(B.team=Number(k.team)),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.roomID="",U.userID=0,U.appearance=null,U.equipment=null,U.name=null,U.level=0,U.member=0,U.team=0),null!=k.roomID&&k.hasOwnProperty("roomID")&&(U.roomID=k.roomID),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),null!=k.appearance&&k.hasOwnProperty("appearance")&&(U.appearance=G.PlayerAppearanceProto.toObject(k.appearance,B)),null!=k.equipment&&k.hasOwnProperty("equipment")&&(U.equipment=G.PlayerEquipmentProto.toObject(k.equipment,B)),null!=k.name&&k.hasOwnProperty("name")&&(U.name=G.PlayerNameProto.toObject(k.name,B)),null!=k.level&&k.hasOwnProperty("level")&&(U.level=B.json&&!isFinite(k.level)?String(k.level):k.level),null!=k.member&&k.hasOwnProperty("member")&&(U.member=B.json&&!isFinite(k.member)?String(k.member):k.member),null!=k.team&&k.hasOwnProperty("team")&&(U.team=B.json&&!isFinite(k.team)?String(k.team):k.team),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.DuelRejectionProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null},F.fromObject=function(k){if(k instanceof G.DuelRejectionProto)return k;var B=new G.DuelRejectionProto;return null!=k.userID&&(B.userID=Number(k.userID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.DuelCancellationProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null},F.fromObject=function(k){if(k instanceof G.DuelCancellationProto)return k;var B=new G.DuelCancellationProto;return null!=k.userID&&(B.userID=Number(k.userID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.PvPReadyProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null},F.fromObject=function(k){if(k instanceof G.PvPReadyProto)return k;var B=new G.PvPReadyProto;return null!=k.userID&&(B.userID=Number(k.userID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.PvPTeamProto=function(){function j(k){if(this.pets=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;case 2:j.pets&&j.pets.length||(j.pets=[]),j.pets.push(G.PlayerPetProto.decode(k,k.uint32()));break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID)return"userID: number expected";if(null!=k.pets&&k.hasOwnProperty("pets")){if(!Array.isArray(k.pets))return"pets: array expected";for(var B=0;B>>3){case 1:V.id=k.double();break;case 2:V.type=k.string();break;case 4:V.answers&&V.answers.length||(V.answers=[]),V.answers.push(G.SurveyAnswerData.decode(k,k.uint32()));break;case 5:V.questionText===F.emptyObject&&(V.questionText={});var q=k.uint32()+k.pos;for(j="",$="";k.pos>>3){case 1:j=k.string();break;case 2:$=k.string();break;default:k.skipType(7&K)}}V.questionText[j]=$;break;default:k.skipType(7&W)}}return V},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.id&&k.hasOwnProperty("id")&&"number"!=typeof k.id)return"id: number expected";if(null!=k.type&&k.hasOwnProperty("type")&&!F.isString(k.type))return"type: string expected";if(null!=k.answers&&k.hasOwnProperty("answers")){if(!Array.isArray(k.answers))return"answers: array expected";for(var B=0;B>>3){case 1:j.randomizeAnswers=k.bool();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.randomizeAnswers&&k.hasOwnProperty("randomizeAnswers")&&"boolean"!=typeof k.randomizeAnswers?"randomizeAnswers: boolean expected":null},F.fromObject=function(k){if(k instanceof G.SurveySettings)return k;var B=new G.SurveySettings;return null!=k.randomizeAnswers&&(B.randomizeAnswers=Boolean(k.randomizeAnswers)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.randomizeAnswers=!1),null!=k.randomizeAnswers&&k.hasOwnProperty("randomizeAnswers")&&(U.randomizeAnswers=k.randomizeAnswers),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.SurveyReward=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.ID=k.double();break;case 2:j.N=k.double();break;case 3:j.type=k.string();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.ID&&k.hasOwnProperty("ID")&&"number"!=typeof k.ID?"ID: number expected":null!=k.N&&k.hasOwnProperty("N")&&"number"!=typeof k.N?"N: number expected":null!=k.type&&k.hasOwnProperty("type")&&!F.isString(k.type)?"type: string expected":null},j.fromObject=function(k){if(k instanceof G.SurveyReward)return k;var B=new G.SurveyReward;return null!=k.ID&&(B.ID=Number(k.ID)),null!=k.N&&(B.N=Number(k.N)),null!=k.type&&(B.type=String(k.type)),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.ID=0,U.N=0,U.type=""),null!=k.ID&&k.hasOwnProperty("ID")&&(U.ID=B.json&&!isFinite(k.ID)?String(k.ID):k.ID),null!=k.N&&k.hasOwnProperty("N")&&(U.N=B.json&&!isFinite(k.N)?String(k.N):k.N),null!=k.type&&k.hasOwnProperty("type")&&(U.type=k.type),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.SurveyData=function(){function j(k){if(this.data=[],this.rewards=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.id=k.double();break;case 2:j.name=k.string();break;case 3:j.data&&j.data.length||(j.data=[]),j.data.push(G.SurveyQuestionData.decode(k,k.uint32()));break;case 4:j.startDate=k.string();break;case 5:j.endDate=k.string();break;case 6:j.rewards&&j.rewards.length||(j.rewards=[]),j.rewards.push(G.SurveyReward.decode(k,k.uint32()));break;case 7:j.settings=G.SurveySettings.decode(k,k.uint32());break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.id&&k.hasOwnProperty("id")&&"number"!=typeof k.id)return"id: number expected";if(null!=k.name&&k.hasOwnProperty("name")&&!F.isString(k.name))return"name: string expected";if(null!=k.data&&k.hasOwnProperty("data")){if(!Array.isArray(k.data))return"data: array expected";for(var B=0;B>>3){case 1:V.id=k.string();break;case 3:V.text===F.emptyObject&&(V.text={});var q=k.uint32()+k.pos;for(j="",$="";k.pos>>3){case 1:j=k.string();break;case 2:$=k.string();break;default:k.skipType(7&K)}}V.text[j]=$;break;case 4:V.image=G.SurveyAnswerImage.decode(k,k.uint32());break;default:k.skipType(7&W)}}return V},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.id&&k.hasOwnProperty("id")&&!F.isString(k.id))return"id: string expected";if(null!=k.text&&k.hasOwnProperty("text")){if(!F.isObject(k.text))return"text: object expected";for(var B=Object.keys(k.text),U=0;U>>3){case 1:j.data&&j.data.length||(j.data=[]),j.data.push(G.SurveyData.decode(k,k.uint32()));break;case 2:j.lastAnswerDate=k.string();break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.data&&k.hasOwnProperty("data")){if(!Array.isArray(k.data))return"data: array expected";for(var B=0;B>>3){case 1:j.label=k.string();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.label&&k.hasOwnProperty("label")&&!F.isString(k.label)?"label: string expected":null},j.fromObject=function(k){if(k instanceof G.SurveyAnswerImage)return k;var B=new G.SurveyAnswerImage;return null!=k.label&&(B.label=String(k.label)),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.label=""),null!=k.label&&k.hasOwnProperty("label")&&(U.label=k.label),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G})?F.apply(B,G):F)||(k.exports=j)},8157:(k,B,U)=>{"use strict";U.d(B,{wh:()=>F,aG:()=>G,Q1:()=>Q,cj:()=>Z,qU:()=>j,mj:()=>$,bC:()=>et,pw:()=>H,Dr:()=>V,bJ:()=>Kt,eE:()=>z,QL:()=>K,_C:()=>W,Aq:()=>tt,I9:()=>it,W0:()=>st});var F=(k=>(k[k.Region=0]="Region",k[k.BoundingBox=1]="BoundingBox",k[k.Mesh=2]="Mesh",k[k.LinkedMesh=3]="LinkedMesh",k[k.Path=4]="Path",k[k.Point=5]="Point",k[k.Clipping=6]="Clipping",k))(F||{});class G{constructor(k,B=new Array,U=0,F=new DataView(k.buffer)){this.strings=B,this.index=U,this.buffer=F}readByte(){return this.buffer.getInt8(this.index++)}readUnsignedByte(){return this.buffer.getUint8(this.index++)}readShort(){const k=this.buffer.getInt16(this.index);return this.index+=2,k}readInt32(){const k=this.buffer.getInt32(this.index);return this.index+=4,k}readInt(k){let B=this.readByte(),U=127&B;return 0!=(128&B)&&(B=this.readByte(),U|=(127&B)<<7,0!=(128&B)&&(B=this.readByte(),U|=(127&B)<<14,0!=(128&B)&&(B=this.readByte(),U|=(127&B)<<21,0!=(128&B)&&(B=this.readByte(),U|=(127&B)<<28)))),k?U:U>>>1^-(1&U)}readStringRef(){const k=this.readInt(!0);return 0==k?null:this.strings[k-1]}readString(){let k=this.readInt(!0);switch(k){case 0:return null;case 1:return""}k--;let B="";for(let U=0;U>4){case 12:case 13:B+=String.fromCharCode((31&k)<<6|63&this.readByte()),U+=2;break;case 14:B+=String.fromCharCode((15&k)<<12|(63&this.readByte())<<6|63&this.readByte()),U+=3;break;default:B+=String.fromCharCode(k),U++}}return B}readFloat(){const k=this.buffer.getFloat32(this.index);return this.index+=4,k}readBoolean(){return 0!=this.readByte()}}var j=(k=>(k[k.setup=0]="setup",k[k.first=1]="first",k[k.replace=2]="replace",k[k.add=3]="add",k))(j||{}),$=(k=>(k[k.mixIn=0]="mixIn",k[k.mixOut=1]="mixOut",k))($||{}),H=(k=>(k[k.Fixed=0]="Fixed",k[k.Percent=1]="Percent",k))(H||{}),V=(k=>(k[k.Tangent=0]="Tangent",k[k.Chain=1]="Chain",k[k.ChainScale=2]="ChainScale",k))(V||{}),W=(k=>(k[k.Normal=0]="Normal",k[k.OnlyTranslation=1]="OnlyTranslation",k[k.NoRotationOrReflection=2]="NoRotationOrReflection",k[k.NoScale=3]="NoScale",k[k.NoScaleOrReflection=4]="NoScaleOrReflection",k))(W||{}),q=U(22478);class K{constructor(){this.size=null,this.names=null,this.values=null,this.renderObject=null}get width(){const k=this.texture;return k.trim?k.trim.width:k.orig.width}get height(){const k=this.texture;return k.trim?k.trim.height:k.orig.height}get u(){return this.texture._uvs.x0}get v(){return this.texture._uvs.y0}get u2(){return this.texture._uvs.x2}get v2(){return this.texture._uvs.y2}get offsetX(){const k=this.texture;return k.trim?k.trim.x:0}get offsetY(){return this.spineOffsetY}get pixiOffsetY(){const k=this.texture;return k.trim?k.trim.y:0}get spineOffsetY(){const k=this.texture;return this.originalHeight-this.height-(k.trim?k.trim.y:0)}get originalWidth(){return this.texture.orig.width}get originalHeight(){return this.texture.orig.height}get x(){return this.texture.frame.x}get y(){return this.texture.frame.y}get rotate(){return 0!==this.texture.rotate}get degrees(){return(360-45*this.texture.rotate)%360}}class z{constructor(){this.entries={},this.size=0}add(k){const B=this.entries[k];return this.entries[k]=!0,!B&&(this.size++,!0)}addAll(k){const B=this.size;for(let U=0,F=k.length;U1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(k,B){k.r=((4278190080&B)>>>24)/255,k.g=((16711680&B)>>>16)/255,k.b=((65280&B)>>>8)/255,k.a=(255&B)/255}static rgb888ToColor(k,B){k.r=((16711680&B)>>>16)/255,k.g=((65280&B)>>>8)/255,k.b=(255&B)/255}static fromString(k){return(new Y).setFromString(k)}};let Q=Y;Q.WHITE=new Y(1,1,1,1),Q.RED=new Y(1,0,0,1),Q.GREEN=new Y(0,1,0,1),Q.BLUE=new Y(0,0,1,1),Q.MAGENTA=new Y(1,0,1,1);const X=class{static clamp(k,B,U){return kU?U:k}static cosDeg(k){return Math.cos(k*X.degRad)}static sinDeg(k){return Math.sin(k*X.degRad)}static signum(k){return Math.sign(k)}static toInt(k){return k>0?Math.floor(k):Math.ceil(k)}static cbrt(k){const B=Math.pow(Math.abs(k),1/3);return k<0?-B:B}static randomTriangular(k,B){return X.randomTriangularWith(k,B,.5*(k+B))}static randomTriangularWith(k,B,U){const F=Math.random(),G=B-k;return F<=(U-k)/G?k+Math.sqrt(F*G*(U-k)):B-Math.sqrt((1-F)*G*(B-U))}static isPowerOfTwo(k){return k&&0==(k&k-1)}};let Z=X;Z.PI=3.1415927,Z.PI2=2*X.PI,Z.radiansToDegrees=180/X.PI,Z.radDeg=X.radiansToDegrees,Z.degreesToRadians=X.PI/180,Z.degRad=X.degreesToRadians;const J=class{static arrayCopy(k,B,U,F,G){for(let j=B,$=F;j=B?k:J.setArraySize(k,B,U)}static newArray(k,B){const U=new Array(k);for(let F=0;F0?this.items.pop():this.instantiator()}free(k){k.reset&&k.reset(),this.items.push(k)}freeAll(k){for(let B=0;B=F&&at.x=G&&at.y=0&&H>=0&&G>=0&&j>=0))return void(B.length=0);const V=Math.ceil(2.3*Math.sqrt($+H)),W=8*V+(G?4:0)+(j?4:0);if(B.length=W,0===W)return;if(0===V)return B.length=8,B[0]=B[6]=U+G,B[1]=B[3]=F+j,B[2]=B[4]=U-G,void(B[5]=B[7]=F-j);let K=0,z=4*V+(G?2:0)+2,Y=z,Q=W;{const k=G+$,H=j,V=U+k,W=U-k,q=F+H;if(B[K++]=V,B[K++]=q,B[--z]=q,B[--z]=W,j){const k=F-H;B[Y++]=W,B[Y++]=k,B[--Q]=k,B[--Q]=V}}for(let q=1;q0||B&&F<=0){const B=U/2;for(let F=B+B%2;F=6){gt(U,!1);const k=[];for(let G=0;G=0&&j>=0&&$.push(U,F,U+G,F,U+G,F+j,U,F+j)},triangulate(k,B){const U=k.points,F=B.points;if(0===U.length)return;const G=F.length/2;F.push(U[0],U[1],U[2],U[3],U[6],U[7],U[4],U[5]),B.indices.push(G,G+1,G+2,G+1,G+2,G+3)}},_t={build(k){vt.build(k)},triangulate(k,B){vt.triangulate(k,B)}};var Et=(k=>(k.MITER="miter",k.BEVEL="bevel",k.ROUND="round",k))(Et||{}),wt=(k=>(k.BUTT="butt",k.ROUND="round",k.SQUARE="square",k))(wt||{});const Tt={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(k,B=20){if(!this.adaptive||!k||isNaN(k))return B;let U=Math.ceil(k/this.maxLength);return Uthis.maxSegments&&(U=this.maxSegments),U}};class St{static curveTo(k,B,U,F,G,j){const $=j[j.length-2],H=j[j.length-1]-B,V=$-k,W=F-B,q=U-k,K=Math.abs(H*q-V*W);if(K<1e-8||0===G)return(j[j.length-2]!==k||j[j.length-1]!==B)&&j.push(k,B),null;const z=H*H+V*V,Y=W*W+q*q,Q=H*W+V*q,X=G*Math.sqrt(z)/K,Z=G*Math.sqrt(Y)/K,J=X*Q/z,tt=Z*Q/Y,et=X*q+Z*V,it=X*W+Z*H,st=V*(Z+J),nt=H*(Z+J),at=q*(X+tt),rt=W*(X+tt);return{cx:et+k,cy:it+B,radius:G,startAngle:Math.atan2(nt-it,st-et),endAngle:Math.atan2(rt-it,at-et),anticlockwise:V*W>q*H}}static arc(k,B,U,F,G,j,$,H,V){const W=$-j,K=Tt._segmentsCount(Math.abs(W)*G,40*Math.ceil(Math.abs(W)/q.TO)),z=W/(2*K),Y=2*z,Q=Math.cos(z),X=Math.sin(z),Z=K-1,J=Z%1/Z;for(let q=0;q<=Z;++q){const k=z+j+Y*(q+J*q),B=Math.cos(k),$=-Math.sin(k);V.push((Q*B+X*$)*G+U,(Q*-$+X*B)*G+F)}}}class At{static curveLength(k,B,U,F,G,j,$,H){let V=0,W=0,q=0,K=0,z=0,Y=0,Q=0,X=0,Z=0,J=0,tt=0,et=k,it=B;for(let st=1;st<=10;++st)W=st/10,q=W*W,K=q*W,z=1-W,Y=z*z,Q=Y*z,X=Q*k+3*Y*W*U+3*z*q*G+K*$,Z=Q*B+3*Y*W*F+3*z*q*j+K*H,J=et-X,tt=it-Z,et=X,it=Z,V+=Math.sqrt(J*J+tt*tt);return V}static curveTo(k,B,U,F,G,j,$){const H=$[$.length-2],V=$[$.length-1];$.length-=2;const W=Tt._segmentsCount(At.curveLength(H,V,k,B,U,F,G,j));let q=0,K=0,z=0,Y=0,Q=0;$.push(H,V);for(let X=1,Z=0;X<=W;++X)Z=X/W,q=1-Z,K=q*q,z=K*q,Y=Z*Z,Q=Y*Z,$.push(z*H+3*K*Z*k+3*q*Y*U+Q*G,z*V+3*K*Z*B+3*q*Y*F+Q*j)}}function Ct(k,B,U,F,G,j,$,H){let V,W;$?(V=F,W=-U):(V=-F,W=U);const q=k-U*G+V,K=B-F*G+W,z=k+U*j+V,Y=B+F*j+W;return H.push(q,K,z,Y),2}function Ot(k,B,U,F,G,j,$,H){const V=U-k,W=F-B;let q=Math.atan2(V,W),K=Math.atan2(G-k,j-B);H&&qK&&(K+=2*Math.PI);let z=q;const Y=K-q,Q=Math.abs(Y),X=Math.sqrt(V*V+W*W),Z=1+(15*Q*Math.sqrt(X)/Math.PI>>0),J=Y/Z;if(z+=J,H){$.push(k,B,U,F);for(let U=1,F=z;U=0&&(j.join===Et.ROUND?Y+=Ot(it,st,it-rt*ut,st-ot*ut,it-ht*ut,st-ct*ut,K,!1)+4:Y+=2,K.push(it-ht*ft,st-ct*ft,it+ht*ut,st+ct*ut));continue}const W=(-rt+tt)*(-ot+st)-(-rt+it)*(-ot+et),z=(-ht+nt)*(-ct+st)-(-ht+it)*(-ct+at),Q=(k*z-U*W)/H,lt=(G*W-B*z)/H,bt=(Q-it)*(Q-it)+(lt-st)*(lt-st),pt=it+(Q-it)*ut,vt=st+(lt-st)*ut,gt=it-(Q-it)*ft,mt=st-(lt-st)*ft,yt=V?ut:ft,_t=bt<=Math.min(k*k+B*B,U*U+G*G)+yt*yt*Z;let wt=j.join;if(wt===Et.MITER&&bt/Z>J&&(wt=Et.BEVEL),_t)switch(wt){case Et.MITER:K.push(pt,vt,gt,mt);break;case Et.BEVEL:V?K.push(pt,vt,it+rt*ft,st+ot*ft,pt,vt,it+ht*ft,st+ct*ft):K.push(it-rt*ut,st-ot*ut,gt,mt,it-ht*ut,st-ct*ut,gt,mt),Y+=2;break;case Et.ROUND:V?(K.push(pt,vt,it+rt*ft,st+ot*ft),Y+=Ot(it,st,it+rt*ft,st+ot*ft,it+ht*ft,st+ct*ft,K,!0)+4,K.push(pt,vt,it+ht*ft,st+ct*ft)):(K.push(it-rt*ut,st-ot*ut,gt,mt),Y+=Ot(it,st,it-rt*ut,st-ot*ut,it-ht*ut,st-ct*ut,K,!1)+4,K.push(it-ht*ut,st-ct*ut,gt,mt))}else{switch(K.push(it-rt*ut,st-ot*ut,it+rt*ft,st+ot*ft),wt){case Et.MITER:V?K.push(gt,mt,gt,mt):K.push(pt,vt,pt,vt),Y+=2;break;case Et.ROUND:Y+=V?Ot(it,st,it+rt*ft,st+ot*ft,it+ht*ft,st+ct*ft,K,!0)+2:Ot(it,st,it-rt*ut,st-ot*ut,it-ht*ut,st-ct*ut,K,!1)+2}K.push(it-ht*ut,st-ct*ut,it+ht*ft,st+ct*ft),Y+=2}}tt=F[2*(z-2)],et=F[2*(z-2)+1],it=F[2*(z-1)],st=F[2*(z-1)+1],rt=-(et-st),ot=tt-it,dt=Math.sqrt(rt*rt+ot*ot),rt/=dt,ot/=dt,rt*=X,ot*=X,K.push(it-rt*ut,st-ot*ut,it+rt*ft,st+ot*ft),V||(j.cap===wt.ROUND?Y+=Ot(it-rt*(ut-ft)*.5,st-ot*(ut-ft)*.5,it-rt*ut,st-ot*ut,it+rt*ft,st+ot*ft,K,!1)+2:j.cap===wt.SQUARE&&(Y+=Ct(it,st,rt,ot,ut,ft,!1,K)));const bt=B.indices,pt=Tt.epsilon*Tt.epsilon;for(let q=Q;q0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(k,B=null,U=null,F=null){const G=new Nt(k,B,U,F);return this.graphicsData.push(G),this.dirty++,this}drawHole(k,B=null){if(!this.graphicsData.length)return null;const U=new Nt(k,null,null,B),F=this.graphicsData[this.graphicsData.length-1];return U.lineStyle=F.lineStyle,F.holes.push(U),this.dirty++,this}destroy(){super.destroy();for(let k=0;k0&&(U=this.batches[this.batches.length-1],F=U.style);for(let H=this.shapeIndex;H65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&$===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=$?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(k,B){return!(!k||!B||k.texture.baseTexture!==B.texture.baseTexture||k.color+k.alpha!==B.color+B.alpha||!!k.native!=!!B.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let k=0,B=this.graphicsData.length;k131070)return!1;const B=this.batches;for(let k=0;k0&&(F=Mt.pop(),F||(F=new q.hq,F.texArray=new q.cc),this.drawCalls.push(F)),F.start=W,F.size=0,F.texArray.count=0,F.type=V),X.touched=1,X._batchEnabled=k,X._batchLocation=G,X.wrapMode=q.uR.REPEAT,F.texArray.elements[F.texArray.count++]=X,G++)),F.size+=z.size,W+=z.size,$=X._batchLocation,this.addColors(B,Q.color,Q.alpha,z.attribSize,z.attribStart),this.addTextureIds(U,$,z.attribSize,z.attribStart)}q.t5._globalBatch=k,this.packAttributes()}packAttributes(){const k=this.points,B=this.uvs,U=this.colors,F=this.textureIds,G=new ArrayBuffer(3*k.length*4),j=new Float32Array(G),$=new Uint32Array(G);let H=0;for(let V=0;V0&&k.alpha>0;return U?(k.matrix&&(k.matrix=k.matrix.clone(),k.matrix.invert()),Object.assign(this._lineStyle,{visible:U},k)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const k=this.currentPath.points,B=this.currentPath.points.length;B>2&&(this.drawShape(this.currentPath),this.currentPath=new q.tS,this.currentPath.closeStroke=!1,this.currentPath.points.push(k[B-2],k[B-1]))}else this.currentPath=new q.tS,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(k,B){return this.startPoly(),this.currentPath.points[0]=k,this.currentPath.points[1]=B,this}lineTo(k,B){this.currentPath||this.moveTo(0,0);const U=this.currentPath.points,F=U[U.length-2],G=U[U.length-1];return(F!==k||G!==B)&&U.push(k,B),this}_initCurve(k=0,B=0){this.currentPath?0===this.currentPath.points.length&&(this.currentPath.points=[k,B]):this.moveTo(k,B)}quadraticCurveTo(k,B,U,F){this._initCurve();const G=this.currentPath.points;return 0===G.length&&this.moveTo(0,0),Dt.curveTo(k,B,U,F,G),this}bezierCurveTo(k,B,U,F,G,j){return this._initCurve(),At.curveTo(k,B,U,F,G,j,this.currentPath.points),this}arcTo(k,B,U,F,G){this._initCurve(k,B);const j=this.currentPath.points,$=St.curveTo(k,B,U,F,G,j);if($){const{cx:k,cy:B,radius:U,startAngle:F,endAngle:G,anticlockwise:j}=$;this.arc(k,B,U,F,G,j)}return this}arc(k,B,U,F,G,j=!1){if(F===G)return this;if(!j&&G<=F?G+=q.TO:j&&F<=G&&(F+=q.TO),G-F==0)return this;const $=k+Math.cos(F)*U,H=B+Math.sin(F)*U,V=this._geometry.closePointEps;let W=this.currentPath?this.currentPath.points:null;if(W){const k=Math.abs(W[W.length-2]-$),B=Math.abs(W[W.length-1]-H);k0;return U?(k.matrix&&(k.matrix=k.matrix.clone(),k.matrix.invert()),Object.assign(this._fillStyle,{visible:U},k)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(k,B,U,F){return this.drawShape(new q.M_(k,B,U,F))}drawRoundedRect(k,B,U,F,G){return this.drawShape(new q.TE(k,B,U,F,G))}drawCircle(k,B,U){return this.drawShape(new q.jl(k,B,U))}drawEllipse(k,B,U,F){return this.drawShape(new q.Pp(k,B,U,F))}drawPolygon(...k){let B,U=!0;const F=k[0];F.points?(U=F.closeStroke,B=F.points):B=Array.isArray(k[0])?k[0]:k;const G=new q.tS(B);return G.closeStroke=U,this.drawShape(G),this}drawShape(k){return this._holeMode?this._geometry.drawHole(k,this._matrix):this._geometry.drawShape(k,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const k=this._geometry.graphicsData;return!(1!==k.length||k[0].shape.type!==q.HY.RECT||k[0].matrix||k[0].holes.length||k[0].lineStyle.visible&&k[0].lineStyle.width)}_render(k){this.finishPoly();const B=this._geometry;B.updateBatches(),B.batchable?(this.batchDirty!==B.batchDirty&&this._populateBatches(),this._renderBatched(k)):(k.batch.flush(),this._renderDirect(k))}_populateBatches(){const k=this._geometry,B=this.blendMode,U=k.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=k.batchDirty,this.batches.length=U,this.vertexData=new Float32Array(k.points);for(let F=0;FB&&(k=B),this.state.update(k),this.state.apply(this.skeleton),!this.skeleton)return;this.skeleton.updateWorldTransform();const U=this.skeleton.slots,G=this.color;let j=null,$=null;G?(j=G.light,$=G.dark):j=this.tintRgb;for(let K=0,z=U.length;K{"use strict";U.d(B,{qd:()=>Rt,Qb:()=>Y,MR:()=>$t,yE:()=>Vt});var F=U(8157);class G{constructor(k){if(!k)throw new Error("name cannot be null.");this.name=k}}const j=class extends G{constructor(k){super(k),this.id=j.nextID++,this.bones=null,this.vertices=[],this.worldVerticesLength=0,this.timelineAttachment=this}computeWorldVerticesOld(k,B){this.computeWorldVertices(k,0,this.worldVerticesLength,B,0,2)}computeWorldVertices(k,B,U,F,G,j){U=G+(U>>1)*j;const $=k.bone.skeleton,H=k.deform;let V=this.vertices;const W=this.bones;if(!W){H.length>0&&(V=H);const $=k.bone.matrix,W=$.tx,q=$.ty,K=$.a,z=$.c,Y=$.b,Q=$.d;for(let k=B,H=G;H=this.regions.length&&(U=this.regions.length-1);const F=this.regions[U];B.region!=F&&(B.region=F)}getPath(k,B){let U=k;const F=(this.start+B).toString();for(let G=this.digits-F.length;G>0;G--)U+="0";return U+=F,U}static nextID(){return Q._nextID++}};let X=Q;X._nextID=0;var Z=(k=>(k[k.hold=0]="hold",k[k.once=1]="once",k[k.loop=2]="loop",k[k.pingpong=3]="pingpong",k[k.onceReverse=4]="onceReverse",k[k.loopReverse=5]="loopReverse",k[k.pingpongReverse=6]="pingpongReverse",k))(Z||{});const J=[0,1,2,3,4,5,6];class tt{constructor(k,B,U){if(this.timelines=[],this.timelineIds=new F.eE,!k)throw new Error("name cannot be null.");this.name=k,this.setTimelines(B),this.duration=U}setTimelines(k){if(!k)throw new Error("timelines cannot be null.");this.timelines=k,this.timelineIds.clear();for(let B=0;B0&&(B%=this.duration));const V=this.timelines;for(let W=0,q=V.length;WB)return F-1;return U-1}static search(k,B,U){const F=k.length;for(let G=U;GB)return G-U;return F-U}}class ot extends rt{constructor(k,B,U){super(k,U),this.curves=F.Aq.newFloatArray(k+18*B),this.curves[k-1]=1}setLinear(k){this.curves[k]=0}setStepped(k){this.curves[k]=1}shrink(k){const B=this.getFrameCount()+18*k;if(this.curves.length>B){const k=F.Aq.newFloatArray(B);F.Aq.arrayCopy(this.curves,0,k,0,B),this.curves=k}}setBezier(k,B,U,F,G,j,$,H,V,W,q){const K=this.curves;let z=this.getFrameCount()+18*k;0==U&&(K[B]=2+z);const Y=.03*(F-2*j+H),Q=.03*(G-2*$+V),X=.006*(3*(j-H)-F+W),Z=.006*(3*($-V)-G+q);let J=2*Y+X,tt=2*Q+Z,et=.3*(j-F)+Y+.16666667*X,it=.3*($-G)+Q+.16666667*Z,st=F+et,nt=G+it;for(let at=z+18;zk){const j=this.frames[B],$=this.frames[B+U];return $+(k-j)/(G[F]-j)*(G[F+1]-$)}const j=F+18;for(F+=2;F=k){const B=G[F-2],U=G[F-1];return U+(k-B)/(G[F]-B)*(G[F+1]-U)}B+=this.getFrameEntries();const $=G[j-2],H=G[j-1];return H+(k-$)/(this.frames[B]-$)*(this.frames[B+U]-H)}}class ht extends ot{constructor(k,B,U){super(k,B,[U])}getFrameEntries(){return 2}setFrame(k,B,U){k<<=1,this.frames[k]=B,this.frames[k+1]=U}getCurveValue(k){const B=this.frames;let U=B.length-2;for(let G=2;G<=U;G+=2)if(B[G]>k){U=G-2;break}const F=this.curves[U>>1];switch(F){case 0:const F=B[U],G=B[U+1];return G+(k-F)/(B[U+2]-F)*(B[U+2+1]-G);case 1:return B[U+1]}return this.getBezierValue(k,U,1,F-2)}}class ct extends ht{constructor(k,B,U){super(k,B,`${et}|${U}`),this.boneIndex=0,this.boneIndex=U}apply(k,B,U,G,j,$,H){const V=k.bones[this.boneIndex];if(!V.active)return;if(UU)this.apply(k,B,Number.MAX_VALUE,F,G,j,$),B=-1;else if(B>=H[V-1])return;if(U0&&H[W-1]==k;)W--}for(;W=H[W];W++)F.push(this.events[W])}};let ut=lt;ut.propertyIds=[`${st}`];const ft=class extends rt{constructor(k){super(k,ft.propertyIds),this.drawOrders=new Array(k)}getFrameCount(){return this.frames.length}setFrame(k,B,U){this.frames[k]=B,this.drawOrders[k]=U}apply(k,B,U,G,j,$,H){if(H==F.mj.mixOut)return void($==F.qU.setup&&F.Aq.arrayCopy(k.slots,0,k.drawOrder,0,k.slots.length));if(U>4;const it=this.attachment.sequence.regions.length,st=J[15&X];if(st!=Z.hold)switch(et+=(U-Q)/tt+1e-5|0,st){case Z.once:et=Math.min(it-1,et);break;case Z.loop:et%=it;break;case Z.pingpong:{const k=(it<<1)-2;et=0==k?0:et%k,et>=it&&(et=k-et);break}case Z.onceReverse:et=Math.max(it-1-et,0);break;case Z.loopReverse:et=it-1-et%it;break;case Z.pingpongReverse:{const k=(it<<1)-2;et=0==k?0:(et+it-1)%k,et>=it&&(et=k-et)}}W.sequenceIndex=et}};let vt=pt;vt.ENTRIES=3,vt.MODE=1,vt.DELAY=2;const gt=class{constructor(k){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Et(this),this.propertyIDs=new F.eE,this.animationsChanged=!1,this.trackEntryPool=new F.bC((()=>new _t)),this.data=k}static emptyAnimation(){return gt._emptyAnimation}update(k){k*=this.timeScale;const B=this.tracks;for(let U=0,F=B.length;U0){if(F.delay-=G,F.delay>0)continue;G=-F.delay,F.delay=0}let j=F.next;if(j){const B=F.trackLast-j.delay;if(B>=0){for(j.delay=0,j.trackTime+=0==F.timeScale?0:(B/F.timeScale+k)*j.timeScale,F.trackTime+=G,this.setCurrent(U,j,!0);j.mixingFrom;)j.mixTime+=k,j=j.mixingFrom;continue}}else if(F.trackLast>=F.trackEnd&&!F.mixingFrom){B[U]=null,this.queue.end(F),this.clearNext(F);continue}if(F.mixingFrom&&this.updateMixingFrom(F,k)){let k=F.mixingFrom;for(F.mixingFrom=null,k&&(k.mixingTo=null);k;)this.queue.end(k),k=k.mixingFrom}F.trackTime+=G}this.queue.drain()}updateMixingFrom(k,B){const U=k.mixingFrom;if(!U)return!0;const F=this.updateMixingFrom(U,B);return U.animationLast=U.nextAnimationLast,U.trackLast=U.nextTrackLast,k.mixTime>0&&k.mixTime>=k.mixDuration?(0!=U.totalAlpha&&0!=k.mixDuration||(k.mixingFrom=U.mixingFrom,U.mixingFrom&&(U.mixingFrom.mixingTo=k),k.interruptAlpha=U.interruptAlpha,this.queue.end(U)),F):(U.trackTime+=B*U.timeScale,k.mixTime+=B,!1)}apply(k){if(!k)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();const B=this.events,U=this.tracks;let G=!1;for(let H=0,V=U.length;H0)continue;G=!0;const $=0==H?F.qU.first:j.mixBlend;let V=j.alpha;j.mixingFrom?V*=this.applyMixingFrom(j,k,$):j.trackTime>=j.trackEnd&&!j.next&&(V=0);const W=j.animationLast,q=j.getAnimationTime();let K=q,z=B;j.reverse&&(K=j.animation.duration-K,z=null);const Y=j.animation.timelines,Q=Y.length;if(0==H&&1==V||$==F.qU.add)for(let B=0;B1&&(j=1),U!=F.qU.first&&(U=G.mixBlend));const $=j0&&this.queueEvents(G,Y),this.events.length=0,G.nextAnimationLast=Y,G.nextTrackLast=G.trackTime,j}applyAttachmentTimeline(k,B,U,G,j){const $=B.slots[k.slotIndex];$.bone.active&&(U0;let G=k>=0;F.cj.signum(B)!=F.cj.signum(Y)&&Math.abs(B)<=90&&(Math.abs(k)>180&&(k+=360*F.cj.signum(k)),G=U),z=Y+k-k%360,G!=U&&(z+=360*F.cj.signum(k)),$[H]=z}$[H+1]=Y,W.rotation=q+z*G}queueEvents(k,B){const U=k.animationStart,F=k.animationEnd,G=F-U,j=k.trackLast%G,$=this.events;let H=0;const V=$.length;for(;HF||this.queue.event(k,B)}let W=!1;for(W=k.loop?0==G||j>k.trackTime%G:B>=F&&k.animationLast=this.tracks.length)return;const B=this.tracks[k];if(!B)return;this.queue.end(B),this.clearNext(B);let U=B;for(;;){const k=U.mixingFrom;if(!k)break;this.queue.end(k),U.mixingFrom=null,U.mixingTo=null,U=k}this.tracks[B.trackIndex]=null,this.queue.drain()}setCurrent(k,B,U){const F=this.expandToIndex(k);this.tracks[k]=B,B.previous=null,F&&(U&&this.queue.interrupt(F),B.mixingFrom=F,F.mixingTo=B,B.mixTime=0,F.mixingFrom&&F.mixDuration>0&&(B.interruptAlpha*=Math.min(1,F.mixTime/F.mixDuration)),F.timelinesRotation.length=0),this.queue.start(B)}setAnimation(k,B,U=!1){const F=this.data.skeletonData.findAnimation(B);if(!F)throw new Error(`Animation not found: ${B}`);return this.setAnimationWith(k,F,U)}setAnimationWith(k,B,U=!1){if(!B)throw new Error("animation cannot be null.");let F=!0,G=this.expandToIndex(k);G&&(-1==G.nextTrackLast?(this.tracks[k]=G.mixingFrom,this.queue.interrupt(G),this.queue.end(G),this.clearNext(G),G=G.mixingFrom,F=!1):this.clearNext(G));const j=this.trackEntry(k,B,U,G);return this.setCurrent(k,j,F),this.queue.drain(),j}addAnimation(k,B,U=!1,F=0){const G=this.data.skeletonData.findAnimation(B);if(!G)throw new Error(`Animation not found: ${B}`);return this.addAnimationWith(k,G,U,F)}addAnimationWith(k,B,U=!1,F=0){if(!B)throw new Error("animation cannot be null.");let G=this.expandToIndex(k);if(G)for(;G.next;)G=G.next;const j=this.trackEntry(k,B,U,G);return G?(G.next=j,j.previous=G,F<=0&&(F+=G.getTrackComplete()-j.mixDuration)):(this.setCurrent(k,j,!0),this.queue.drain()),j.delay=F,j}setEmptyAnimation(k,B=0){const U=this.setAnimationWith(k,gt.emptyAnimation(),!1);return U.mixDuration=B,U.trackEnd=B,U}addEmptyAnimation(k,B=0,U=0){const F=this.addAnimationWith(k,gt.emptyAnimation(),!1,U);return U<=0&&(F.delay+=F.mixDuration-B),F.mixDuration=B,F.trackEnd=B,F}setEmptyAnimations(k=0){const B=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let U=0,F=this.tracks.length;U0){G[H]=Ot,j[H]=U;continue k}break}G[H]=Ct}else G[H]=Tt}}getCurrent(k){return k>=this.tracks.length?null:this.tracks[k]}addListener(k){if(!k)throw new Error("listener cannot be null.");this.listeners.push(k)}removeListener(k){const B=this.listeners.indexOf(k);B>=0&&this.listeners.splice(B,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}setAnimationByName(k,B,U){gt.deprecatedWarning1||(gt.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.")),this.setAnimation(k,B,U)}addAnimationByName(k,B,U,F){gt.deprecatedWarning2||(gt.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.")),this.addAnimation(k,B,U,F)}hasAnimation(k){return null!==this.data.skeletonData.findAnimation(k)}hasAnimationByName(k){return gt.deprecatedWarning3||(gt.deprecatedWarning3=!0,console.warn("Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.")),this.hasAnimation(k)}};let mt=gt;mt._emptyAnimation=new tt("",[],0),mt.deprecatedWarning1=!1,mt.deprecatedWarning2=!1,mt.deprecatedWarning3=!1;const yt=class{constructor(){this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=F.qU.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(this.loop){const k=this.animationEnd-this.animationStart;return 0==k?this.animationStart:this.trackTime%k+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}setAnimationLast(k){this.animationLast=k,this.nextAnimationLast=k}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.length=0}getTrackComplete(){const k=this.animationEnd-this.animationStart;if(0!=k){if(this.loop)return k*(1+(this.trackTime/k|0));if(this.trackTime(k[k.start=0]="start",k[k.interrupt=1]="interrupt",k[k.end=2]="end",k[k.dispose=3]="dispose",k[k.complete=4]="complete",k[k.event=5]="event",k))(wt||{});const Tt=0,St=1,At=2,Ct=3,Ot=4,It=1,Dt=2;class Rt{constructor(k){this.atlas=k}loadSequence(k,B,U){const F=U.regions;for(let G=0,j=F.length;G1e-4?(k=Math.abs(z*X-Y*Q)/k,z/=q,Q/=K,Y=Q*k,X=z*k,B=Math.atan2(Q,z)*F.cj.radDeg):(z=0,Q=0,B=90-Math.atan2(X,Y)*F.cj.radDeg);const V=U+$-B,Z=U+H-B+90,J=F.cj.cosDeg(V)*G,tt=F.cj.cosDeg(Z)*j,et=F.cj.sinDeg(V)*G,it=F.cj.sinDeg(Z)*j;W.a=z*J-Y*et,W.c=z*tt-Y*it,W.b=Q*J+X*et,W.d=Q*tt+X*it;break}case F._C.NoScale:case F._C.NoScaleOrReflection:{const k=F.cj.cosDeg(U),B=F.cj.sinDeg(U);let V=(z*k+Y*B)/q,Z=(Q*k+X*B)/K,J=Math.sqrt(V*V+Z*Z);J>1e-5&&(J=1/J),V*=J,Z*=J,J=Math.sqrt(V*V+Z*Z),this.data.transformMode==F._C.NoScale&&z*X-Y*Q<0!=(q<0!=K<0)&&(J=-J);const tt=Math.PI/2+Math.atan2(Z,V),et=Math.cos(tt)*J,it=Math.sin(tt)*J,st=F.cj.cosDeg($)*G,nt=F.cj.cosDeg(90+H)*j,at=F.cj.sinDeg($)*G,rt=F.cj.sinDeg(90+H)*j;W.a=V*st+et*at,W.c=V*nt+et*rt,W.b=Z*st+it*at,W.d=Z*nt+it*rt;break}}W.a*=q,W.c*=q,W.b*=K,W.d*=K}setToSetupPose(){const k=this.data;this.x=k.x,this.y=k.y,this.rotation=k.rotation,this.scaleX=k.scaleX,this.scaleY=k.scaleY,this.shearX=k.shearX,this.shearY=k.shearY}getWorldRotationX(){return Math.atan2(this.matrix.b,this.matrix.a)*F.cj.radDeg}getWorldRotationY(){return Math.atan2(this.matrix.d,this.matrix.c)*F.cj.radDeg}getWorldScaleX(){const k=this.matrix;return Math.sqrt(k.a*k.a+k.b*k.b)}getWorldScaleY(){const k=this.matrix;return Math.sqrt(k.c*k.c+k.d*k.d)}updateAppliedTransform(){const k=this.parent,B=this.matrix;if(!k)return this.ax=B.tx-this.skeleton.x,this.ay=B.ty-this.skeleton.y,this.arotation=Math.atan2(B.b,B.a)*F.cj.radDeg,this.ascaleX=Math.sqrt(B.a*B.a+B.b*B.b),this.ascaleY=Math.sqrt(B.c*B.c+B.d*B.d),this.ashearX=0,void(this.ashearY=Math.atan2(B.a*B.c+B.b*B.d,B.a*B.d-B.b*B.c)*F.cj.radDeg);const U=k.matrix,G=1/(U.a*U.d-U.b*U.c),j=B.tx-U.tx,$=B.ty-U.ty;this.ax=j*U.d*G-$*U.c*G,this.ay=$*U.a*G-j*U.b*G;const H=G*U.d,V=G*U.a,W=G*U.c,q=G*U.b,K=H*B.a-W*B.b,z=H*B.c-W*B.d,Y=V*B.b-q*B.a,Q=V*B.d-q*B.c;if(this.ashearX=0,this.ascaleX=Math.sqrt(K*K+Y*Y),this.ascaleX>1e-4){const k=K*Q-z*Y;this.ascaleY=k/this.ascaleX,this.ashearY=Math.atan2(K*z+Y*Q,k)*F.cj.radDeg,this.arotation=Math.atan2(Y,K)*F.cj.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(z*z+Q*Q),this.ashearY=0,this.arotation=90-Math.atan2(Q,z)*F.cj.radDeg}worldToLocal(k){const B=this.matrix,U=B.a,F=B.c,G=B.b,j=B.d,$=1/(U*j-F*G),H=k.x-B.tx,V=k.y-B.ty;return k.x=H*j*$-V*F*$,k.y=V*U*$-H*G*$,k}localToWorld(k){const B=this.matrix,U=k.x,F=k.y;return k.x=U*B.a+F*B.c+B.tx,k.y=U*B.b+F*B.d+B.ty,k}worldToLocalRotation(k){const B=F.cj.sinDeg(k),U=F.cj.cosDeg(k),G=this.matrix;return Math.atan2(G.a*B-G.b*U,G.d*U-G.c*B)*F.cj.radDeg}localToWorldRotation(k){k-=this.rotation-this.shearX;const B=F.cj.sinDeg(k),U=F.cj.cosDeg(k),G=this.matrix;return Math.atan2(U*G.b+B*G.d,U*G.a+B*G.c)*F.cj.radDeg}rotateWorld(k){const B=this.matrix,U=B.a,G=B.c,j=B.b,$=B.d,H=F.cj.cosDeg(k),V=F.cj.sinDeg(k);B.a=H*U-V*j,B.c=H*G-V*$,B.b=V*U+H*j,B.d=V*G+H*$}}class Nt{constructor(k,B){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,!k)throw new Error("data cannot be null.");if(!B)throw new Error("skeleton cannot be null.");this.data=k,this.mix=k.mix,this.softness=k.softness,this.bendDirection=k.bendDirection,this.compress=k.compress,this.stretch=k.stretch,this.bones=new Array;for(let F=0;F180?Y-=360:Y<-180&&(Y+=360);let tt=k.ascaleX,et=k.ascaleY;if(G||j){switch(k.data.transformMode){case F._C.NoScale:case F._C.NoScaleOrReflection:Q=B-k.worldX,X=U-k.worldY}const V=k.data.length*tt,W=Math.sqrt(Q*Q+X*X);if(G&&WV&&V>1e-4){const k=(W/V-1)*H+1;tt*=k,$&&(et*=k)}}k.updateWorldTransformWith(k.ax,k.ay,k.arotation+Y*H,tt,et,k.ashearX,k.ashearY)}apply2(k,B,U,G,j,$,H,V,W){const q=k.ax,K=k.ay;let z=k.ascaleX,Y=k.ascaleY,Q=z,X=Y,Z=B.ascaleX;const J=k.matrix;let tt=0,et=0,it=0;z<0?(z=-z,tt=180,it=-1):(tt=0,it=1),Y<0&&(Y=-Y,it=-it),Z<0?(Z=-Z,et=180):et=0;const st=B.ax;let nt=0,at=0,rt=0,ot=J.a,ht=J.c,ct=J.b,dt=J.d;const lt=Math.abs(z-Y)<=1e-4;!lt||$?(nt=0,at=ot*st+J.tx,rt=ct*st+J.ty):(nt=B.ay,at=ot*st+ht*nt+J.tx,rt=ct*st+dt*nt+J.ty);const ut=k.parent.matrix;if(!ut)throw new Error("IK parent must itself have a parent.");ot=ut.a,ht=ut.c,ct=ut.b,dt=ut.d;const ft=1/(ot*dt-ht*ct);let bt=at-ut.tx,pt=rt-ut.ty;const vt=(bt*dt-pt*ht)*ft-q,gt=(pt*ot-bt*ct)*ft-K,mt=Math.sqrt(vt*vt+gt*gt);let yt,_t,Et=B.data.length*Z;if(mt<1e-4)return this.apply1(k,U,G,!1,$,!1,W),void B.updateWorldTransformWith(st,nt,0,B.ascaleX,B.ascaleY,B.ashearX,B.ashearY);bt=U-ut.tx,pt=G-ut.ty;let wt=(bt*dt-pt*ht)*ft-q,Tt=(pt*ot-bt*ct)*ft-K,St=wt*wt+Tt*Tt;if(0!=V){V*=z*(Z+1)*.5;const k=Math.sqrt(St),B=k-mt-Et*z+V;if(B>0){let U=Math.min(1,B/(2*V))-1;U=(B-V*(1-U*U))/k,wt-=U*wt,Tt-=U*Tt,St=wt*wt+Tt*Tt}}k:if(lt){Et*=z;let k=(St-mt*mt-Et*Et)/(2*mt*Et);k<-1?(k=-1,_t=Math.PI*j):k>1?(k=1,_t=0,$&&(ot=(Math.sqrt(St)/(mt+Et)-1)*W+1,Q*=ot,H&&(X*=ot))):_t=Math.acos(k)*j,ot=mt+Et*k,ht=Et*Math.sin(_t),yt=Math.atan2(Tt*ot-wt*ht,wt*ot+Tt*ht)}else{ot=z*Et,ht=Y*Et;const k=ot*ot,B=ht*ht,U=Math.atan2(Tt,wt);ct=B*mt*mt+k*St-k*B;const G=-2*B*mt,$=B-k;if(dt=G*G-4*$*ct,dt>=0){let k=Math.sqrt(dt);G<0&&(k=-k),k=.5*-(G+k);const B=k/$,F=ct/k,H=Math.abs(B)=-1&&ct<=1&&(ct=Math.acos(ct),bt=ot*Math.cos(ct)+mt,pt=ht*Math.sin(ct),dt=bt*bt+pt*pt,dtX&&(K=ct,X=dt,Q=bt,Z=pt)),St<=.5*(W+X)?(yt=U-Math.atan2(q*j,V),_t=H*j):(yt=U-Math.atan2(Z*j,Q),_t=K*j)}const At=Math.atan2(nt,st)*it;let Ct=k.arotation;yt=(yt-At)*F.cj.radDeg+tt-Ct,yt>180?yt-=360:yt<-180&&(yt+=360),k.updateWorldTransformWith(q,K,Ct+yt*W,Q,X,0,0),Ct=B.arotation,_t=((_t+At)*F.cj.radDeg-B.ashearX)*it+et-Ct,_t>180?_t-=360:_t<-180&&(_t+=360),B.updateWorldTransformWith(st,nt,Ct+_t*W,B.ascaleX,B.ascaleY,B.ashearX,B.ashearY)}}var xt=(k=>(k[k.Length=0]="Length",k[k.Fixed=1]="Fixed",k[k.Percent=2]="Percent",k[k.Proportional=3]="Proportional",k))(xt||{});const Lt=class{constructor(k,B){if(this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!k)throw new Error("data cannot be null.");if(!B)throw new Error("skeleton cannot be null.");this.data=k,this.bones=new Array;for(let F=0,G=k.bones.length;F0){k=K/k*Q;for(let B=1;B0?F.cj.degRad:-F.cj.degRad}for(let q=0,it=3;q0){const U=j.a,G=j.c,H=j.b,V=j.d;let W=0,K=0,Y=0;if(W=$?X[it-1]:0==z[q+1]?X[it+2]:Math.atan2(st,Q),W-=Math.atan2(H,U),et){K=Math.cos(W),Y=Math.sin(W);const F=k.data.length;Z+=(F*(K*U-Y*H)-Q)*B,J+=(F*(Y*U+K*H)-st)*B}else W+=tt;W>F.cj.PI?W-=F.cj.PI2:W<-F.cj.PI&&(W+=F.cj.PI2),W*=B,K=Math.cos(W),Y=Math.sin(W),j.a=K*U-Y*H,j.c=K*G-Y*V,j.b=Y*U+K*H,j.d=Y*G+K*V}k.updateAppliedTransform()}}computeWorldPositions(k,B,U){const G=this.target;let j=this.position;const $=this.spaces,H=F.Aq.setArraySize(this.positions,3*B+2);let V=this.world;const W=k.closed;let q=k.worldVerticesLength,K=q/6,z=Lt.NONE;if(!k.constantSpeed){const Y=k.lengths;K-=W?1:2;const Q=Y[K];let X;switch(this.data.positionMode==F.pw.Percent&&(j*=Q),this.data.spacingMode){case xt.Percent:X=Q;break;case xt.Proportional:X=Q/B;break;default:X=1}V=F.Aq.setArraySize(this.world,8);for(let F=0,Z=0,J=0;FQ){z!=Lt.AFTER&&(z=Lt.AFTER,k.computeWorldVertices(G,q-6,4,V,0,2)),this.addAfterPosition(tt-Q,V,0,H,Z);continue}}for(;;J++){const k=Y[J];if(!(tt>k)){if(0==J)tt/=k;else{const B=Y[J-1];tt=(tt-B)/(k-B)}break}}J!=z&&(z=J,W&&J==K?(k.computeWorldVertices(G,q-4,4,V,0,2),k.computeWorldVertices(G,0,4,V,4,2)):k.computeWorldVertices(G,6*J+2,8,V,0,2)),this.addCurvePosition(tt,V[0],V[1],V[2],V[3],V[4],V[5],V[6],V[7],H,Z,U||F>0&&0==B)}return H}W?(q+=2,V=F.Aq.setArraySize(this.world,q),k.computeWorldVertices(G,2,q-4,V,0,2),k.computeWorldVertices(G,0,2,V,q-4,2),V[q-2]=V[0],V[q-1]=V[1]):(K--,q-=4,V=F.Aq.setArraySize(this.world,q),k.computeWorldVertices(G,2,q,V,0,2));const Y=F.Aq.setArraySize(this.curves,K);let Q,X=0,Z=V[0],J=V[1],tt=0,et=0,it=0,st=0,nt=0,at=0,rt=0,ot=0,ht=0,ct=0,dt=0,lt=0,ut=0,ft=0;for(let F=0,vt=2;FX){this.addAfterPosition(B-X,V,q-4,H,vt);continue}}for(;;gt++){const k=Y[gt];if(!(B>k)){if(0==gt)B/=k;else{const U=Y[gt-1];B=(B-U)/(k-U)}break}}if(gt!=z){z=gt;let k=6*gt;for(Z=V[k],J=V[k+1],tt=V[k+2],et=V[k+3],it=V[k+4],st=V[k+5],nt=V[k+6],at=V[k+7],rt=.03*(Z-2*tt+it),ot=.03*(J-2*et+st),ht=.006*(3*(tt-it)-Z+nt),ct=.006*(3*(et-st)-J+at),dt=2*rt+ht,lt=2*ot+ct,ut=.3*(tt-Z)+rt+.16666667*ht,ft=.3*(et-J)+ot+.16666667*ct,pt=Math.sqrt(ut*ut+ft*ft),bt[0]=pt,k=1;k<8;k++)ut+=dt,ft+=lt,dt+=ht,lt+=ct,pt+=Math.sqrt(ut*ut+ft*ft),bt[k]=pt;ut+=dt,ft+=lt,pt+=Math.sqrt(ut*ut+ft*ft),bt[8]=pt,ut+=dt+ht,ft+=lt+ct,pt+=Math.sqrt(ut*ut+ft*ft),bt[9]=pt,mt=0}for(B*=pt;;mt++){const k=bt[mt];if(!(B>k)){if(0==mt)B/=k;else{const U=bt[mt-1];B=mt+(B-U)/(k-U)}break}}this.addCurvePosition(.1*B,Z,J,tt,et,it,st,nt,at,H,vt,U||F>0&&0==k)}return H}addBeforePosition(k,B,U,F,G){const j=B[U],$=B[U+1],H=B[U+2]-j,V=B[U+3]-$,W=Math.atan2(V,H);F[G]=j+k*Math.cos(W),F[G+1]=$+k*Math.sin(W),F[G+2]=W}addAfterPosition(k,B,U,F,G){const j=B[U+2],$=B[U+3],H=j-B[U],V=$-B[U+1],W=Math.atan2(V,H);F[G]=j+k*Math.cos(W),F[G+1]=$+k*Math.sin(W),F[G+2]=W}addCurvePosition(k,B,U,F,G,j,$,H,V,W,q,K){if(0==k||isNaN(k))return W[q]=B,W[q+1]=U,void(W[q+2]=Math.atan2(G-U,F-B));const z=k*k,Y=z*k,Q=1-k,X=Q*Q,Z=X*Q,J=Q*k,tt=3*J,et=Q*tt,it=tt*k,st=B*Z+F*et+j*it+H*Y,nt=U*Z+G*et+$*it+V*Y;W[q]=st,W[q+1]=nt,K&&(W[q+2]=k<.001?Math.atan2(G-U,F-B):Math.atan2(nt-(U*X+G*J*2+$*z),st-(B*X+F*J*2+j*z)))}};let kt=Lt;kt.NONE=-1,kt.BEFORE=-2,kt.AFTER=-3,kt.epsilon=1e-5;class Bt{constructor(k,B){if(this.darkColor=null,this.attachment=null,this.attachmentState=0,this.sequenceIndex=-1,this.deform=new Array,!k)throw new Error("data cannot be null.");if(!B)throw new Error("bone cannot be null.");this.data=k,this.bone=B,this.color=new F.Q1,this.darkColor=k.darkColor?new F.Q1:null,this.setToSetupPose(),this.blendMode=this.data.blendMode}getSkeleton(){return this.bone.skeleton}getAttachment(){return this.attachment}setAttachment(k){this.attachment!=k&&(k instanceof $&&this.attachment instanceof $&&k.timelineAttachment==this.attachment.timelineAttachment||(this.deform.length=0),this.attachment=k,this.sequenceIndex=-1)}setToSetupPose(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}}class Ut{constructor(k,B){if(this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new F.I9,this.active=!1,!k)throw new Error("data cannot be null.");if(!B)throw new Error("skeleton cannot be null.");this.data=k,this.mixRotate=k.mixRotate,this.mixX=k.mixX,this.mixY=k.mixY,this.mixScaleX=k.mixScaleX,this.mixScaleY=k.mixScaleY,this.mixShearY=k.mixShearY,this.bones=new Array;for(let F=0;F0?F.cj.degRad:-F.cj.degRad,X=this.data.offsetRotation*Q,Z=this.data.offsetShearY*Q,J=this.bones;for(let tt=0,et=J.length;ttF.cj.PI?$-=F.cj.PI2:$<-F.cj.PI&&($+=F.cj.PI2),$*=k;const H=Math.cos($),V=Math.sin($);Q.a=H*B-V*G,Q.c=H*U-V*j,Q.b=V*B+H*G,Q.d=V*U+H*j}if(H){const k=this.temp;V.localToWorld(k.set(this.data.offsetX,this.data.offsetY)),Q.tx+=(k.x-Q.tx)*B,Q.ty+=(k.y-Q.ty)*U}if(0!=G){let k=Math.sqrt(Q.a*Q.a+Q.b*Q.b);0!=k&&(k=(k+(Math.sqrt(q*q+z*z)-k+this.data.offsetScaleX)*G)/k),Q.a*=k,Q.b*=k}if(0!=j){let k=Math.sqrt(Q.c*Q.c+Q.d*Q.d);0!=k&&(k=(k+(Math.sqrt(K*K+Y*Y)-k+this.data.offsetScaleY)*j)/k),Q.c*=k,Q.d*=k}if($>0){const k=Q.c,B=Q.d,U=Math.atan2(B,k);let G=Math.atan2(Y,K)-Math.atan2(z,q)-(U-Math.atan2(Q.b,Q.a));G>F.cj.PI?G-=F.cj.PI2:G<-F.cj.PI&&(G+=F.cj.PI2),G=U+(G+Z)*$;const j=Math.sqrt(k*k+B*B);Q.c=Math.cos(G)*j,Q.d=Math.sin(G)*j}W.updateAppliedTransform()}}applyRelativeWorld(){const k=this.mixRotate,B=this.mixX,U=this.mixY,G=this.mixScaleX,j=this.mixScaleY,$=this.mixShearY,H=0!=B||0!=U,V=this.target,W=V.matrix,q=W.a,K=W.c,z=W.b,Y=W.d,Q=q*Y-K*z>0?F.cj.degRad:-F.cj.degRad,X=this.data.offsetRotation*Q,Z=this.data.offsetShearY*Q,J=this.bones;for(let tt=0,et=J.length;ttF.cj.PI?$-=F.cj.PI2:$<-F.cj.PI&&($+=F.cj.PI2),$*=k;const H=Math.cos($),V=Math.sin($);Q.a=H*B-V*G,Q.c=H*U-V*j,Q.b=V*B+H*G,Q.d=V*U+H*j}if(H){const k=this.temp;V.localToWorld(k.set(this.data.offsetX,this.data.offsetY)),Q.tx+=k.x*B,Q.ty+=k.y*U}if(0!=G){const k=(Math.sqrt(q*q+z*z)-1+this.data.offsetScaleX)*G+1;Q.a*=k,Q.b*=k}if(0!=j){const k=(Math.sqrt(K*K+Y*Y)-1+this.data.offsetScaleY)*j+1;Q.c*=k,Q.d*=k}if($>0){let k=Math.atan2(Y,K)-Math.atan2(z,q);k>F.cj.PI?k-=F.cj.PI2:k<-F.cj.PI&&(k+=F.cj.PI2);const B=Q.c,U=Q.d;k=Math.atan2(U,B)+(k-F.cj.PI/2+Z)*$;const G=Math.sqrt(B*B+U*U);Q.c=Math.cos(k)*G,Q.d=Math.sin(k)*G}W.updateAppliedTransform()}}applyAbsoluteLocal(){const k=this.mixRotate,B=this.mixX,U=this.mixY,F=this.mixScaleX,G=this.mixScaleY,j=this.mixShearY,$=this.target,H=this.bones;for(let V=0,W=H.length;V=F.length&&(F.length=k+1),F[k]||(F[k]={}),F[k][B]=U}addSkin(k){for(let U=0;U{"use strict";U.d(B,{B9:()=>H,t5:()=>bi,hq:()=>pi,JH:()=>Si,cc:()=>ps,hp:()=>gi,jl:()=>Mi,Q1:()=>ve,Td:()=>Oi,_4:()=>V,Pp:()=>Ni,Ag:()=>Je,dJ:()=>_s,V2:()=>Ti,vg:()=>it,uq:()=>ki,oA:()=>Wi,TO:()=>Ai,bR:()=>Di,tS:()=>xi,BP:()=>ds,bO:()=>Ci,M_:()=>Pi,TE:()=>Li,HY:()=>Ii,$f:()=>ea,Mt:()=>fs,Uw:()=>ri,QE:()=>K,gP:()=>Ms,NW:()=>Ks,Rv:()=>Fn,dL:()=>Ki,k2:()=>us,A5:()=>sa,uR:()=>Q,Eo:()=>Hn,MT:()=>$n,XO:()=>ii,W0:()=>at,Wp:()=>F});var F={};U.r(F),U.d(F,{BaseTextureCache:()=>$e,BoundingBox:()=>Fe,CanvasRenderTarget:()=>We,DATA_URI:()=>Ce,EventEmitter:()=>At(),ProgramCache:()=>Ge,TextureCache:()=>je,clearTextureCache:()=>Ve,correctBlendMode:()=>we,createIndicesForQuads:()=>Oe,decomposeDataUri:()=>Qe,deprecation:()=>Rt,destroyTextureCache:()=>He,detectVideoAlphaMode:()=>Bt,determineCrossOrigin:()=>Xe,earcut:()=>Ot(),getBufferType:()=>Ie,getCanvasBoundingBox:()=>ze,getResolutionOfUrl:()=>Ze,hex2rgb:()=>ge,hex2string:()=>me,interleaveTypedArrays:()=>Re,isMobile:()=>Tt,isPow2:()=>Me,isWebGLSupported:()=>Gt,log2:()=>Ne,nextPow2:()=>Pe,path:()=>xt,premultiplyBlendMode:()=>Ee,premultiplyRgba:()=>Te,premultiplyTint:()=>Se,premultiplyTintToRgba:()=>Ae,removeItems:()=>xe,rgb2hex:()=>_e,sayHello:()=>Ft,sign:()=>Le,skipHello:()=>Ut,string2hex:()=>ye,trimCanvas:()=>Ye,uid:()=>Be,url:()=>Pt});var G=(k=>(k[k.WEBGL_LEGACY=0]="WEBGL_LEGACY",k[k.WEBGL=1]="WEBGL",k[k.WEBGL2=2]="WEBGL2",k))(G||{}),j=(k=>(k[k.UNKNOWN=0]="UNKNOWN",k[k.WEBGL=1]="WEBGL",k[k.CANVAS=2]="CANVAS",k))(j||{}),$=(k=>(k[k.COLOR=16384]="COLOR",k[k.DEPTH=256]="DEPTH",k[k.STENCIL=1024]="STENCIL",k))($||{}),H=(k=>(k[k.NORMAL=0]="NORMAL",k[k.ADD=1]="ADD",k[k.MULTIPLY=2]="MULTIPLY",k[k.SCREEN=3]="SCREEN",k[k.OVERLAY=4]="OVERLAY",k[k.DARKEN=5]="DARKEN",k[k.LIGHTEN=6]="LIGHTEN",k[k.COLOR_DODGE=7]="COLOR_DODGE",k[k.COLOR_BURN=8]="COLOR_BURN",k[k.HARD_LIGHT=9]="HARD_LIGHT",k[k.SOFT_LIGHT=10]="SOFT_LIGHT",k[k.DIFFERENCE=11]="DIFFERENCE",k[k.EXCLUSION=12]="EXCLUSION",k[k.HUE=13]="HUE",k[k.SATURATION=14]="SATURATION",k[k.COLOR=15]="COLOR",k[k.LUMINOSITY=16]="LUMINOSITY",k[k.NORMAL_NPM=17]="NORMAL_NPM",k[k.ADD_NPM=18]="ADD_NPM",k[k.SCREEN_NPM=19]="SCREEN_NPM",k[k.NONE=20]="NONE",k[k.SRC_OVER=0]="SRC_OVER",k[k.SRC_IN=21]="SRC_IN",k[k.SRC_OUT=22]="SRC_OUT",k[k.SRC_ATOP=23]="SRC_ATOP",k[k.DST_OVER=24]="DST_OVER",k[k.DST_IN=25]="DST_IN",k[k.DST_OUT=26]="DST_OUT",k[k.DST_ATOP=27]="DST_ATOP",k[k.ERASE=26]="ERASE",k[k.SUBTRACT=28]="SUBTRACT",k[k.XOR=29]="XOR",k))(H||{}),V=(k=>(k[k.POINTS=0]="POINTS",k[k.LINES=1]="LINES",k[k.LINE_LOOP=2]="LINE_LOOP",k[k.LINE_STRIP=3]="LINE_STRIP",k[k.TRIANGLES=4]="TRIANGLES",k[k.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",k[k.TRIANGLE_FAN=6]="TRIANGLE_FAN",k))(V||{}),W=(k=>(k[k.RGBA=6408]="RGBA",k[k.RGB=6407]="RGB",k[k.RG=33319]="RG",k[k.RED=6403]="RED",k[k.RGBA_INTEGER=36249]="RGBA_INTEGER",k[k.RGB_INTEGER=36248]="RGB_INTEGER",k[k.RG_INTEGER=33320]="RG_INTEGER",k[k.RED_INTEGER=36244]="RED_INTEGER",k[k.ALPHA=6406]="ALPHA",k[k.LUMINANCE=6409]="LUMINANCE",k[k.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",k[k.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",k[k.DEPTH_STENCIL=34041]="DEPTH_STENCIL",k))(W||{}),q=(k=>(k[k.TEXTURE_2D=3553]="TEXTURE_2D",k[k.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",k[k.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",k[k.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",k[k.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",k[k.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",k[k.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",k[k.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",k[k.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",k))(q||{}),K=(k=>(k[k.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",k[k.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",k[k.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",k[k.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",k[k.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",k[k.UNSIGNED_INT=5125]="UNSIGNED_INT",k[k.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",k[k.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",k[k.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",k[k.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",k[k.BYTE=5120]="BYTE",k[k.SHORT=5122]="SHORT",k[k.INT=5124]="INT",k[k.FLOAT=5126]="FLOAT",k[k.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",k[k.HALF_FLOAT=36193]="HALF_FLOAT",k))(K||{}),z=(k=>(k[k.FLOAT=0]="FLOAT",k[k.INT=1]="INT",k[k.UINT=2]="UINT",k))(z||{}),Y=(k=>(k[k.NEAREST=0]="NEAREST",k[k.LINEAR=1]="LINEAR",k))(Y||{}),Q=(k=>(k[k.CLAMP=33071]="CLAMP",k[k.REPEAT=10497]="REPEAT",k[k.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",k))(Q||{}),X=(k=>(k[k.OFF=0]="OFF",k[k.POW2=1]="POW2",k[k.ON=2]="ON",k[k.ON_MANUAL=3]="ON_MANUAL",k))(X||{}),Z=(k=>(k[k.NPM=0]="NPM",k[k.UNPACK=1]="UNPACK",k[k.PMA=2]="PMA",k[k.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",k[k.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",k[k.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",k))(Z||{}),J=(k=>(k[k.NO=0]="NO",k[k.YES=1]="YES",k[k.AUTO=2]="AUTO",k[k.BLEND=0]="BLEND",k[k.CLEAR=1]="CLEAR",k[k.BLIT=2]="BLIT",k))(J||{}),tt=(k=>(k[k.AUTO=0]="AUTO",k[k.MANUAL=1]="MANUAL",k))(tt||{}),et=(k=>(k.LOW="lowp",k.MEDIUM="mediump",k.HIGH="highp",k))(et||{}),it=(k=>(k[k.NONE=0]="NONE",k[k.SCISSOR=1]="SCISSOR",k[k.STENCIL=2]="STENCIL",k[k.SPRITE=3]="SPRITE",k[k.COLOR=4]="COLOR",k))(it||{}),st=(k=>(k[k.NONE=0]="NONE",k[k.LOW=2]="LOW",k[k.MEDIUM=4]="MEDIUM",k[k.HIGH=8]="HIGH",k))(st||{}),nt=(k=>(k[k.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",k[k.ARRAY_BUFFER=34962]="ARRAY_BUFFER",k[k.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",k))(nt||{});const at={ADAPTER:{createCanvas:(k,B)=>{const U=document.createElement("canvas");return U.width=k,U.height=B,U},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(k,B)=>fetch(k,B),parseXML:k=>(new DOMParser).parseFromString(k,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var rt=/iPhone/i,ot=/iPod/i,ht=/iPad/i,ct=/\biOS-universal(?:.+)Mac\b/i,dt=/\bAndroid(?:.+)Mobile\b/i,lt=/Android/i,ut=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,ft=/Silk/i,bt=/Windows Phone/i,pt=/\bWindows(?:.+)ARM\b/i,vt=/BlackBerry/i,gt=/BB10/i,mt=/Opera Mini/i,yt=/\b(CriOS|Chrome)(?:.+)Mobile/i,_t=/Mobile(?:.+)Firefox\b/i,Et=function(k){return void 0!==k&&"MacIntel"===k.platform&&"number"==typeof k.maxTouchPoints&&k.maxTouchPoints>1&&"undefined"==typeof MSStream};function wt(k){var B={userAgent:"",platform:"",maxTouchPoints:0};k||"undefined"==typeof navigator?"string"==typeof k?B.userAgent=k:k&&k.userAgent&&(B={userAgent:k.userAgent,platform:k.platform,maxTouchPoints:k.maxTouchPoints||0}):B={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var U=B.userAgent,F=U.split("[FBAN");void 0!==F[1]&&(U=F[0]),void 0!==(F=U.split("Twitter"))[1]&&(U=F[0]);var G=function(k){return function(B){return B.test(k)}}(U),j={apple:{phone:G(rt)&&!G(bt),ipod:G(ot),tablet:!G(rt)&&(G(ht)||Et(B))&&!G(bt),universal:G(ct),device:(G(rt)||G(ot)||G(ht)||G(ct)||Et(B))&&!G(bt)},amazon:{phone:G(ut),tablet:!G(ut)&&G(ft),device:G(ut)||G(ft)},android:{phone:!G(bt)&&G(ut)||!G(bt)&&G(dt),tablet:!G(bt)&&!G(ut)&&!G(dt)&&(G(ft)||G(lt)),device:!G(bt)&&(G(ut)||G(ft)||G(dt)||G(lt))||G(/\bokhttp\b/i)},windows:{phone:G(bt),tablet:G(pt),device:G(bt)||G(pt)},other:{blackberry:G(vt),blackberry10:G(gt),opera:G(mt),firefox:G(_t),chrome:G(yt),device:G(vt)||G(gt)||G(mt)||G(_t)||G(yt)},any:!1,phone:!1,tablet:!1};return j.any=j.apple.device||j.android.device||j.windows.device||j.other.device,j.phone=j.apple.phone||j.android.phone||j.windows.phone,j.tablet=j.apple.tablet||j.android.tablet||j.windows.tablet,j}const Tt=(wt.default??wt)(globalThis.navigator);at.RETINA_PREFIX=/@([0-9\.]+)x/,at.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var St=U(30228),At=U.n(St),Ct=U(1858),Ot=U.n(Ct),It=U(88835);const Dt={};function Rt(k,B,U=3){if(Dt[B])return;let F=(new Error).stack;typeof F>"u"?console.warn("PixiJS Deprecation Warning: ",`${B}\nDeprecated since v${k}`):(F=F.split("\n").splice(U).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${B}\nDeprecated since v${k}`),console.warn(F),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${B}\nDeprecated since v${k}`),console.warn(F))),Dt[B]=!0}const Pt={get parse(){return Rt("7.3.0","utils.url.parse is deprecated, use native URL API instead."),It.qg},get format(){return Rt("7.3.0","utils.url.format is deprecated, use native URL API instead."),It.GP},get resolve(){return Rt("7.3.0","utils.url.resolve is deprecated, use native URL API instead."),It.hd}};function Mt(k){if("string"!=typeof k)throw new TypeError(`Path must be a string. Received ${JSON.stringify(k)}`)}function Nt(k){return k.split("?")[0].split("#")[0]}const xt={toPosix(k){return B="\\",U="/",k.replace(new RegExp(B.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),U);var B,U},isUrl(k){return/^https?:/.test(this.toPosix(k))},isDataUrl:k=>/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(k),isBlobUrl:k=>k.startsWith("blob:"),hasProtocol(k){return/^[^/:]+:/.test(this.toPosix(k))},getProtocol(k){Mt(k),k=this.toPosix(k);const B=/^file:\/\/\//.exec(k);if(B)return B[0];const U=/^[^/:]+:\/{0,2}/.exec(k);return U?U[0]:""},toAbsolute(k,B,U){if(Mt(k),this.isDataUrl(k)||this.isBlobUrl(k))return k;const F=Nt(this.toPosix(B??at.ADAPTER.getBaseUrl())),G=Nt(this.toPosix(U??this.rootname(F)));return(k=this.toPosix(k)).startsWith("/")?xt.join(G,k.slice(1)):this.isAbsolute(k)?k:this.join(F,k)},normalize(k){if(Mt(k),0===k.length)return".";if(this.isDataUrl(k)||this.isBlobUrl(k))return k;let B="";const U=(k=this.toPosix(k)).startsWith("/");this.hasProtocol(k)&&(B=this.rootname(k),k=k.slice(B.length));const F=k.endsWith("/");return(k=function(k,B){let U="",F=0,G=-1,j=0,$=-1;for(let H=0;H<=k.length;++H){if(H2){const k=U.lastIndexOf("/");if(k!==U.length-1){-1===k?(U="",F=0):(U=U.slice(0,k),F=U.length-1-U.lastIndexOf("/")),G=H,j=0;continue}}else if(2===U.length||1===U.length){U="",F=0,G=H,j=0;continue}B&&(U.length>0?U+="/..":U="..",F=2)}else U.length>0?U+=`/${k.slice(G+1,H)}`:U=k.slice(G+1,H),F=H-G-1;G=H,j=0}else 46===$&&-1!==j?++j:j=-1}return U}(k,!1)).length>0&&F&&(k+="/"),U?`/${k}`:B+k},isAbsolute(k){return Mt(k),k=this.toPosix(k),!!this.hasProtocol(k)||k.startsWith("/")},join(...k){if(0===k.length)return".";let B;for(let U=0;U0)if(void 0===B)B=F;else{const G=k[U-1]??"";this.joinExtensions.includes(this.extname(G).toLowerCase())?B+=`/../${F}`:B+=`/${F}`}}return void 0===B?".":this.normalize(B)},dirname(k){if(Mt(k),0===k.length)return".";let B=(k=this.toPosix(k)).charCodeAt(0);const U=47===B;let F=-1,G=!0;const j=this.getProtocol(k),$=k;for(let H=(k=k.slice(j.length)).length-1;H>=1;--H)if(B=k.charCodeAt(H),47===B){if(!G){F=H;break}}else G=!1;return-1===F?U?"/":this.isUrl($)?j+k:j:U&&1===F?"//":j+k.slice(0,F)},rootname(k){Mt(k);let B="";if(B=(k=this.toPosix(k)).startsWith("/")?"/":this.getProtocol(k),this.isUrl(k)){const U=k.indexOf("/",B.length);B=-1!==U?k.slice(0,U):k,B.endsWith("/")||(B+="/")}return B},basename(k,B){Mt(k),B&&Mt(B),k=Nt(this.toPosix(k));let U,F=0,G=-1,j=!0;if(void 0!==B&&B.length>0&&B.length<=k.length){if(B.length===k.length&&B===k)return"";let $=B.length-1,H=-1;for(U=k.length-1;U>=0;--U){const V=k.charCodeAt(U);if(47===V){if(!j){F=U+1;break}}else-1===H&&(j=!1,H=U+1),$>=0&&(V===B.charCodeAt($)?-1==--$&&(G=U):($=-1,G=H))}return F===G?G=H:-1===G&&(G=k.length),k.slice(F,G)}for(U=k.length-1;U>=0;--U)if(47===k.charCodeAt(U)){if(!j){F=U+1;break}}else-1===G&&(j=!1,G=U+1);return-1===G?"":k.slice(F,G)},extname(k){Mt(k);let B=-1,U=0,F=-1,G=!0,j=0;for(let $=(k=Nt(this.toPosix(k))).length-1;$>=0;--$){const H=k.charCodeAt($);if(47!==H)-1===F&&(G=!1,F=$+1),46===H?-1===B?B=$:1!==j&&(j=1):-1!==B&&(j=-1);else if(!G){U=$+1;break}}return-1===B||-1===F||0===j||1===j&&B===F-1&&B===U+1?"":k.slice(B,F)},parse(k){Mt(k);const B={root:"",dir:"",base:"",ext:"",name:""};if(0===k.length)return B;let U=(k=Nt(this.toPosix(k))).charCodeAt(0);const F=this.isAbsolute(k);let G;B.root=this.rootname(k),G=F||this.hasProtocol(k)?1:0;let j=-1,$=0,H=-1,V=!0,W=k.length-1,q=0;for(;W>=G;--W)if(U=k.charCodeAt(W),47!==U)-1===H&&(V=!1,H=W+1),46===U?-1===j?j=W:1!==q&&(q=1):-1!==j&&(q=-1);else if(!V){$=W+1;break}return-1===j||-1===H||0===q||1===q&&j===H-1&&j===$+1?-1!==H&&(B.base=B.name=0===$&&F?k.slice(1,H):k.slice($,H)):(0===$&&F?(B.name=k.slice(1,j),B.base=k.slice(1,H)):(B.name=k.slice($,j),B.base=k.slice($,H)),B.ext=k.slice(j,H)),B.dir=this.dirname(k),B},sep:"/",delimiter:":",joinExtensions:[".html"]};let Lt,kt;async function Bt(){return Lt??(Lt=(async()=>{const k=document.createElement("canvas").getContext("webgl");if(!k)return Z.UNPACK;const B=await new Promise((k=>{const B=document.createElement("video");B.onloadeddata=()=>k(B),B.onerror=()=>k(null),B.autoplay=!1,B.crossOrigin="anonymous",B.preload="auto",B.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",B.load()}));if(!B)return Z.UNPACK;const U=k.createTexture();k.bindTexture(k.TEXTURE_2D,U);const F=k.createFramebuffer();k.bindFramebuffer(k.FRAMEBUFFER,F),k.framebufferTexture2D(k.FRAMEBUFFER,k.COLOR_ATTACHMENT0,k.TEXTURE_2D,U,0),k.pixelStorei(k.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),k.pixelStorei(k.UNPACK_COLORSPACE_CONVERSION_WEBGL,k.NONE),k.texImage2D(k.TEXTURE_2D,0,k.RGBA,k.RGBA,k.UNSIGNED_BYTE,B);const G=new Uint8Array(4);return k.readPixels(0,0,1,1,k.RGBA,k.UNSIGNED_BYTE,G),k.deleteFramebuffer(F),k.deleteTexture(U),k.getExtension("WEBGL_lose_context")?.loseContext(),G[0]<=G[3]?Z.PMA:Z.UNPACK})()),Lt}function Ut(){Rt("7.0.0","skipHello is deprecated, please use settings.RENDER_OPTIONS.hello")}function Ft(){Rt("7.0.0",'sayHello is deprecated, please use Renderer\'s "hello" option')}function Gt(){return typeof kt>"u"&&(kt=function(){const k={stencil:!0,failIfMajorPerformanceCaveat:at.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!at.ADAPTER.getWebGLRenderingContext())return!1;const B=at.ADAPTER.createCanvas();let U=B.getContext("webgl",k)||B.getContext("experimental-webgl",k);const F=!!U?.getContextAttributes()?.stencil;if(U){const k=U.getExtension("WEBGL_lose_context");k&&k.loseContext()}return U=null,F}catch{return!1}}()),kt}var jt={grad:.9,turn:360,rad:360/(2*Math.PI)},$t=function(k){return"string"==typeof k?k.length>0:"number"==typeof k},Ht=function(k,B,U){return void 0===B&&(B=0),void 0===U&&(U=Math.pow(10,B)),Math.round(U*k)/U+0},Vt=function(k,B,U){return void 0===B&&(B=0),void 0===U&&(U=1),k>U?U:k>B?k:B},Wt=function(k){return(k=isFinite(k)?k%360:0)>0?k:k+360},qt=function(k){return{r:Vt(k.r,0,255),g:Vt(k.g,0,255),b:Vt(k.b,0,255),a:Vt(k.a)}},Kt=function(k){return{r:Ht(k.r),g:Ht(k.g),b:Ht(k.b),a:Ht(k.a,3)}},zt=/^#([0-9a-f]{3,8})$/i,Yt=function(k){var B=k.toString(16);return B.length<2?"0"+B:B},Qt=function(k){var B=k.r,U=k.g,F=k.b,G=k.a,j=Math.max(B,U,F),$=j-Math.min(B,U,F),H=$?j===B?(U-F)/$:j===U?2+(F-B)/$:4+(B-U)/$:0;return{h:60*(H<0?H+6:H),s:j?$/j*100:0,v:j/255*100,a:G}},Xt=function(k){var B=k.h,U=k.s,F=k.v,G=k.a;B=B/360*6,U/=100,F/=100;var j=Math.floor(B),$=F*(1-U),H=F*(1-(B-j)*U),V=F*(1-(1-B+j)*U),W=j%6;return{r:255*[F,H,$,$,V,F][W],g:255*[V,F,F,H,$,$][W],b:255*[$,$,V,F,F,H][W],a:G}},Zt=function(k){return{h:Wt(k.h),s:Vt(k.s,0,100),l:Vt(k.l,0,100),a:Vt(k.a)}},Jt=function(k){return{h:Ht(k.h),s:Ht(k.s),l:Ht(k.l),a:Ht(k.a,3)}},te=function(k){return Xt((U=(B=k).s,{h:B.h,s:(U*=((F=B.l)<50?F:100-F)/100)>0?2*U/(F+U)*100:0,v:F+U,a:B.a}));var B,U,F},ee=function(k){return{h:(B=Qt(k)).h,s:(G=(200-(U=B.s))*(F=B.v)/100)>0&&G<200?U*F/100/(G<=100?G:200-G)*100:0,l:G/2,a:B.a};var B,U,F,G},ie=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,se=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ne=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ae=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,re={string:[[function(k){var B=zt.exec(k);return B?(k=B[1]).length<=4?{r:parseInt(k[0]+k[0],16),g:parseInt(k[1]+k[1],16),b:parseInt(k[2]+k[2],16),a:4===k.length?Ht(parseInt(k[3]+k[3],16)/255,2):1}:6===k.length||8===k.length?{r:parseInt(k.substr(0,2),16),g:parseInt(k.substr(2,2),16),b:parseInt(k.substr(4,2),16),a:8===k.length?Ht(parseInt(k.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(k){var B=ne.exec(k)||ae.exec(k);return B?B[2]!==B[4]||B[4]!==B[6]?null:qt({r:Number(B[1])/(B[2]?100/255:1),g:Number(B[3])/(B[4]?100/255:1),b:Number(B[5])/(B[6]?100/255:1),a:void 0===B[7]?1:Number(B[7])/(B[8]?100:1)}):null},"rgb"],[function(k){var B=ie.exec(k)||se.exec(k);if(!B)return null;var U,F,G=Zt({h:(U=B[1],F=B[2],void 0===F&&(F="deg"),Number(U)*(jt[F]||1)),s:Number(B[3]),l:Number(B[4]),a:void 0===B[5]?1:Number(B[5])/(B[6]?100:1)});return te(G)},"hsl"]],object:[[function(k){var B=k.r,U=k.g,F=k.b,G=k.a,j=void 0===G?1:G;return $t(B)&&$t(U)&&$t(F)?qt({r:Number(B),g:Number(U),b:Number(F),a:Number(j)}):null},"rgb"],[function(k){var B=k.h,U=k.s,F=k.l,G=k.a,j=void 0===G?1:G;if(!$t(B)||!$t(U)||!$t(F))return null;var $=Zt({h:Number(B),s:Number(U),l:Number(F),a:Number(j)});return te($)},"hsl"],[function(k){var B=k.h,U=k.s,F=k.v,G=k.a,j=void 0===G?1:G;if(!$t(B)||!$t(U)||!$t(F))return null;var $=function(k){return{h:Wt(k.h),s:Vt(k.s,0,100),v:Vt(k.v,0,100),a:Vt(k.a)}}({h:Number(B),s:Number(U),v:Number(F),a:Number(j)});return Xt($)},"hsv"]]},oe=function(k,B){for(var U=0;U=.5},k.prototype.toHex=function(){return B=(k=Kt(this.rgba)).r,U=k.g,F=k.b,j=(G=k.a)<1?Yt(Ht(255*G)):"","#"+Yt(B)+Yt(U)+Yt(F)+j;var k,B,U,F,G,j},k.prototype.toRgb=function(){return Kt(this.rgba)},k.prototype.toRgbString=function(){return B=(k=Kt(this.rgba)).r,U=k.g,F=k.b,(G=k.a)<1?"rgba("+B+", "+U+", "+F+", "+G+")":"rgb("+B+", "+U+", "+F+")";var k,B,U,F,G},k.prototype.toHsl=function(){return Jt(ee(this.rgba))},k.prototype.toHslString=function(){return B=(k=Jt(ee(this.rgba))).h,U=k.s,F=k.l,(G=k.a)<1?"hsla("+B+", "+U+"%, "+F+"%, "+G+")":"hsl("+B+", "+U+"%, "+F+"%)";var k,B,U,F,G},k.prototype.toHsv=function(){return k=Qt(this.rgba),{h:Ht(k.h),s:Ht(k.s),v:Ht(k.v),a:Ht(k.a,3)};var k},k.prototype.invert=function(){return fe({r:255-(k=this.rgba).r,g:255-k.g,b:255-k.b,a:k.a});var k},k.prototype.saturate=function(k){return void 0===k&&(k=.1),fe(ce(this.rgba,k))},k.prototype.desaturate=function(k){return void 0===k&&(k=.1),fe(ce(this.rgba,-k))},k.prototype.grayscale=function(){return fe(ce(this.rgba,-1))},k.prototype.lighten=function(k){return void 0===k&&(k=.1),fe(le(this.rgba,k))},k.prototype.darken=function(k){return void 0===k&&(k=.1),fe(le(this.rgba,-k))},k.prototype.rotate=function(k){return void 0===k&&(k=15),this.hue(this.hue()+k)},k.prototype.alpha=function(k){return"number"==typeof k?fe({r:(B=this.rgba).r,g:B.g,b:B.b,a:k}):Ht(this.rgba.a,3);var B},k.prototype.hue=function(k){var B=ee(this.rgba);return"number"==typeof k?fe({h:k,s:B.s,l:B.l,a:B.a}):Ht(B.h)},k.prototype.isEqual=function(k){return this.toHex()===fe(k).toHex()},k}(),fe=function(k){return k instanceof ue?k:new ue(k)},be=[];!function(k){k.forEach((function(k){be.indexOf(k)<0&&(k(ue,re),be.push(k))}))}([function(k,B){var U={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},F={};for(var G in U)F[U[G]]=G;var j={};k.prototype.toName=function(B){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var G,$,H=F[this.toHex()];if(H)return H;if(null==B?void 0:B.closest){var V=this.toRgb(),W=1/0,q="black";if(!j.length)for(var K in U)j[K]=new k(U[K]).toRgb();for(var z in U){var Y=(G=V,$=j[z],Math.pow(G.r-$.r,2)+Math.pow(G.g-$.g,2)+Math.pow(G.b-$.b,2));Yk===B[U]));if(null!==k&&null!==B){const U=Object.keys(k),F=Object.keys(B);return U.length===F.length&&U.every((U=>k[U]===B[U]))}return k===B}toRgba(){const[k,B,U,F]=this._components;return{r:k,g:B,b:U,a:F}}toRgb(){const[k,B,U]=this._components;return{r:k,g:B,b:U}}toRgbaString(){const[k,B,U]=this.toUint8RgbArray();return`rgba(${k},${B},${U},${this.alpha})`}toUint8RgbArray(k){const[B,U,F]=this._components;return(k=k??[])[0]=Math.round(255*B),k[1]=Math.round(255*U),k[2]=Math.round(255*F),k}toRgbArray(k){k=k??[];const[B,U,F]=this._components;return k[0]=B,k[1]=U,k[2]=F,k}toNumber(){return this._int}toLittleEndianNumber(){const k=this._int;return(k>>16)+(65280&k)+((255&k)<<16)}multiply(B){const[U,F,G,j]=k.temp.setValue(B)._components;return this._components[0]*=U,this._components[1]*=F,this._components[2]*=G,this._components[3]*=j,this.refreshInt(),this._value=null,this}premultiply(k,B=!0){return B&&(this._components[0]*=k,this._components[1]*=k,this._components[2]*=k),this._components[3]=k,this.refreshInt(),this._value=null,this}toPremultiplied(k,B=!0){if(1===k)return(255<<24)+this._int;if(0===k)return B?0:this._int;let U=this._int>>16&255,F=this._int>>8&255,G=255&this._int;return B&&(U=U*k+.5|0,F=F*k+.5|0,G=G*k+.5|0),(255*k<<24)+(U<<16)+(F<<8)+G}toHex(){const k=this._int.toString(16);return`#${"000000".substring(0,6-k.length)+k}`}toHexa(){const k=Math.round(255*this._components[3]).toString(16);return this.toHex()+"00".substring(0,2-k.length)+k}setAlpha(k){return this._components[3]=this._clamp(k),this}round(k){const[B,U,F]=this._components;return this._components[0]=Math.round(B*k)/k,this._components[1]=Math.round(U*k)/k,this._components[2]=Math.round(F*k)/k,this.refreshInt(),this._value=null,this}toArray(k){k=k??[];const[B,U,F,G]=this._components;return k[0]=B,k[1]=U,k[2]=F,k[3]=G,k}normalize(B){let U,F,G,j;if(("number"==typeof B||B instanceof Number)&&B>=0&&B<=16777215){U=(B>>16&255)/255,F=(B>>8&255)/255,G=(255&B)/255,j=1}else if((Array.isArray(B)||B instanceof Float32Array)&&B.length>=3&&B.length<=4)B=this._clamp(B),[U,F,G,j=1]=B;else if((B instanceof Uint8Array||B instanceof Uint8ClampedArray)&&B.length>=3&&B.length<=4)B=this._clamp(B,0,255),[U,F,G,j=255]=B,U/=255,F/=255,G/=255,j/=255;else if("string"==typeof B||"object"==typeof B){if("string"==typeof B){const U=k.HEX_PATTERN.exec(B);U&&(B=`#${U[2]}`)}const $=fe(B);$.isValid()&&(({r:U,g:F,b:G,a:j}=$.rgba),U/=255,F/=255,G/=255)}if(void 0===U)throw new Error(`Unable to convert color ${B}`);this._components[0]=U,this._components[1]=F,this._components[2]=G,this._components[3]=j,this.refreshInt()}refreshInt(){this._clamp(this._components);const[k,B,U]=this._components;this._int=(255*k<<16)+(255*B<<8)+(255*U|0)}_clamp(k,B=0,U=1){return"number"==typeof k?Math.min(Math.max(k,B),U):(k.forEach(((F,G)=>{k[G]=Math.min(Math.max(F,B),U)})),k)}};pe.shared=new pe,pe.temp=new pe,pe.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let ve=pe;function ge(k,B=[]){return Rt("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),ve.shared.setValue(k).toRgbArray(B)}function me(k){return Rt("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),ve.shared.setValue(k).toHex()}function ye(k){return Rt("7.2.0","utils.string2hex is deprecated, use Color#toNumber instead"),ve.shared.setValue(k).toNumber()}function _e(k){return Rt("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),ve.shared.setValue(k).toNumber()}const Ee=function(){const k=[],B=[];for(let F=0;F<32;F++)k[F]=F,B[F]=F;k[H.NORMAL_NPM]=H.NORMAL,k[H.ADD_NPM]=H.ADD,k[H.SCREEN_NPM]=H.SCREEN,B[H.NORMAL]=H.NORMAL_NPM,B[H.ADD]=H.ADD_NPM,B[H.SCREEN]=H.SCREEN_NPM;const U=[];return U.push(B),U.push(k),U}();function we(k,B){return Ee[B?1:0][k]}function Te(k,B,U,F=!0){return Rt("7.2.0","utils.premultiplyRgba has moved to Color.premultiply"),ve.shared.setValue(k).premultiply(B,F).toArray(U??new Float32Array(4))}function Se(k,B){return Rt("7.2.0","utils.premultiplyTint has moved to Color.toPremultiplied"),ve.shared.setValue(k).toPremultiplied(B)}function Ae(k,B,U,F=!0){return Rt("7.2.0","utils.premultiplyTintToRgba has moved to Color.premultiply"),ve.shared.setValue(k).premultiply(B,F).toArray(U??new Float32Array(4))}const Ce=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;function Oe(k,B=null){const U=6*k;if((B=B||new Uint16Array(U)).length!==U)throw new Error(`Out buffer length is incorrect, got ${B.length} and expected ${U}`);for(let F=0,G=0;F>>1,k|=k>>>2,k|=k>>>4,k|=k>>>8,(k|=k>>>16)+1}function Me(k){return!(k&k-1||!k)}function Ne(k){let B=(k>65535?1:0)<<4,U=((k>>>=B)>255?1:0)<<3;return B|=U,U=((k>>>=U)>15?1:0)<<2,B|=U,U=((k>>>=U)>3?1:0)<<1,B|=U,B|(k>>>=U)>>1}function xe(k,B,U){const F=k.length;let G;if(B>=F||0===U)return;const j=F-(U=B+U>F?F-B:U);for(G=B;G(k.Renderer="renderer",k.Application="application",k.RendererSystem="renderer-webgl-system",k.RendererPlugin="renderer-webgl-plugin",k.CanvasRendererSystem="renderer-canvas-system",k.CanvasRendererPlugin="renderer-canvas-plugin",k.Asset="asset",k.LoadParser="load-parser",k.ResolveParser="resolve-parser",k.CacheParser="cache-parser",k.DetectionParser="detection-parser",k))(Je||{});const ti=k=>{if("function"==typeof k||"object"==typeof k&&k.extension){if(!k.extension)throw new Error("Extension class must have an extension object");k={..."object"!=typeof k.extension?{type:k.extension}:k.extension,ref:k}}if("object"!=typeof k)throw new Error("Invalid extension type");return"string"==typeof(k={...k}).type&&(k.type=[k.type]),k},ei=(k,B)=>ti(k).priority??B,ii={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...k){return k.map(ti).forEach((k=>{k.type.forEach((B=>this._removeHandlers[B]?.(k)))})),this},add(...k){return k.map(ti).forEach((k=>{k.type.forEach((B=>{const U=this._addHandlers,F=this._queue;U[B]?U[B]?.(k):(F[B]=F[B]||[],F[B]?.push(k))}))})),this},handle(k,B,U){const F=this._addHandlers,G=this._removeHandlers;if(F[k]||G[k])throw new Error(`Extension type ${k} already has a handler`);F[k]=B,G[k]=U;const j=this._queue;return j[k]&&(j[k]?.forEach((k=>B(k))),delete j[k]),this},handleByMap(k,B){return this.handle(k,(k=>{k.name&&(B[k.name]=k.ref)}),(k=>{k.name&&delete B[k.name]}))},handleByList(k,B,U=-1){return this.handle(k,(k=>{B.includes(k.ref)||(B.push(k.ref),B.sort(((k,B)=>ei(B,U)-ei(k,U))))}),(k=>{const U=B.indexOf(k.ref);-1!==U&&B.splice(U,1)}))}};class si{constructor(k){"number"==typeof k?this.rawBinaryData=new ArrayBuffer(k):k instanceof Uint8Array?this.rawBinaryData=k.buffer:this.rawBinaryData=k,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(k){return this[`${k}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(k){switch(k){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${k} isn't a valid view type`)}}}const ni=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");function ai(k){let B="";for(let U=0;U0&&(B+="\nelse "),U=0;--F){const G=oi[F];if(G.test&&G.test(k,U))return new G(k,B)}throw new Error("Unrecognized source type to auto-detect Resource")}class ci{constructor(k){this.items=[],this._name=k,this._aliasCount=0}emit(k,B,U,F,G,j,$,H){if(arguments.length>8)throw new Error("max arguments reached");const{name:V,items:W}=this;this._aliasCount++;for(let q=0,K=W.length;q0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(k){return k[this._name]&&(this.ensureNonAliasedItems(),this.remove(k),this.items.push(k)),this}remove(k){const B=this.items.indexOf(k);return-1!==B&&(this.ensureNonAliasedItems(),this.items.splice(B,1)),this}contains(k){return this.items.includes(k)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return 0===this.items.length}get name(){return this._name}}Object.defineProperties(ci.prototype,{dispatch:{value:ci.prototype.emit},run:{value:ci.prototype.emit}});class di{constructor(k=0,B=0){this._width=k,this._height=B,this.destroyed=!1,this.internal=!1,this.onResize=new ci("setRealSize"),this.onUpdate=new ci("update"),this.onError=new ci("onError")}bind(k){this.onResize.add(k),this.onUpdate.add(k),this.onError.add(k),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(k){this.onResize.remove(k),this.onUpdate.remove(k),this.onError.remove(k)}resize(k,B){(k!==this._width||B!==this._height)&&(this._width=k,this._height=B,this.onResize.emit(k,B))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(k,B,U){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(k,B){return!1}}class li extends di{constructor(k,B){const{width:U,height:F}=B||{};if(!U||!F)throw new Error("BufferResource width or height invalid");super(U,F),this.data=k,this.unpackAlignment=B.unpackAlignment??4}upload(k,B,U){const F=k.gl;F.pixelStorei(F.UNPACK_ALIGNMENT,this.unpackAlignment),F.pixelStorei(F.UNPACK_PREMULTIPLY_ALPHA_WEBGL,B.alphaMode===Z.UNPACK);const G=B.realWidth,j=B.realHeight;return U.width===G&&U.height===j?F.texSubImage2D(B.target,0,0,0,G,j,B.format,U.type,this.data):(U.width=G,U.height=j,F.texImage2D(B.target,0,U.internalFormat,G,j,0,B.format,U.type,this.data)),!0}dispose(){this.data=null}static test(k){return null===k||k instanceof Int8Array||k instanceof Uint8Array||k instanceof Uint8ClampedArray||k instanceof Int16Array||k instanceof Uint16Array||k instanceof Int32Array||k instanceof Uint32Array||k instanceof Float32Array}}const ui={scaleMode:Y.NEAREST,alphaMode:Z.NPM},fi=class k extends(At()){constructor(B=null,U=null){super(),U=Object.assign({},k.defaultOptions,U);const{alphaMode:F,mipmap:G,anisotropicLevel:j,scaleMode:$,width:H,height:V,wrapMode:W,format:q,type:K,target:z,resolution:Y,resourceOptions:Q}=U;B&&!(B instanceof di)&&((B=hi(B,Q)).internal=!0),this.resolution=Y||at.RESOLUTION,this.width=Math.round((H||0)*this.resolution)/this.resolution,this.height=Math.round((V||0)*this.resolution)/this.resolution,this._mipmap=G,this.anisotropicLevel=j,this._wrapMode=W,this._scaleMode=$,this.format=q,this.type=K,this.target=z,this.alphaMode=F,this.uid=Be(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=H>0&&V>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(B)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(k){this._mipmap!==k&&(this._mipmap=k,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(k){this._scaleMode!==k&&(this._scaleMode=k,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(k){this._wrapMode!==k&&(this._wrapMode=k,this.dirtyStyleId++)}setStyle(k,B){let U;return void 0!==k&&k!==this.scaleMode&&(this.scaleMode=k,U=!0),void 0!==B&&B!==this.mipmap&&(this.mipmap=B,U=!0),U&&this.dirtyStyleId++,this}setSize(k,B,U){return U=U||this.resolution,this.setRealSize(k*U,B*U,U)}setRealSize(k,B,U){return this.resolution=U||this.resolution,this.width=Math.round(k)/this.resolution,this.height=Math.round(B)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=Me(this.realWidth)&&Me(this.realHeight)}setResolution(k){const B=this.resolution;return B===k||(this.resolution=k,this.valid&&(this.width=Math.round(this.width*B)/k,this.height=Math.round(this.height*B)/k,this.emit("update",this)),this._refreshPOT()),this}setResource(k){if(this.resource===k)return this;if(this.resource)throw new Error("Resource can be set only once");return k.bind(this),this.resource=k,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(k){this.emit("error",this,k)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete $e[this.cacheId],delete je[this.cacheId],this.cacheId=null),this.valid=!1,this.dispose(),k.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(B,U,F=at.STRICT_TEXTURE_CACHE){const G="string"==typeof B;let j=null;if(G)j=B;else{if(!B._pixiId){const k=U?.pixiIdPrefix||"pixiid";B._pixiId=`${k}_${Be()}`}j=B._pixiId}let $=$e[j];if(G&&F&&!$)throw new Error(`The cacheId "${j}" does not exist in BaseTextureCache.`);return $||($=new k(B,U),$.cacheId=j,k.addToCache($,j)),$}static fromBuffer(B,U,F,G){B=B||new Float32Array(U*F*4);const j=new li(B,{width:U,height:F,...G?.resourceOptions});let $,H;return B instanceof Float32Array?($=W.RGBA,H=K.FLOAT):B instanceof Int32Array?($=W.RGBA_INTEGER,H=K.INT):B instanceof Uint32Array?($=W.RGBA_INTEGER,H=K.UNSIGNED_INT):B instanceof Int16Array?($=W.RGBA_INTEGER,H=K.SHORT):B instanceof Uint16Array?($=W.RGBA_INTEGER,H=K.UNSIGNED_SHORT):B instanceof Int8Array?($=W.RGBA,H=K.BYTE):($=W.RGBA,H=K.UNSIGNED_BYTE),j.internal=!0,new k(j,Object.assign({},ui,{type:H,format:$},G))}static addToCache(k,B){B&&(k.textureCacheIds.includes(B)||k.textureCacheIds.push(B),$e[B]&&$e[B]!==k&&console.warn(`BaseTexture added to the cache with an id [${B}] that already had an entry`),$e[B]=k)}static removeFromCache(k){if("string"==typeof k){const B=$e[k];if(B){const U=B.textureCacheIds.indexOf(k);return U>-1&&B.textureCacheIds.splice(U,1),delete $e[k],B}}else if(k?.textureCacheIds){for(let B=0;B1){for(let k=0;k(k[k.POLY=0]="POLY",k[k.RECT=1]="RECT",k[k.CIRC=2]="CIRC",k[k.ELIP=3]="ELIP",k[k.RREC=4]="RREC",k))(Ii||{});class Di{constructor(k=0,B=0){this.x=0,this.y=0,this.x=k,this.y=B}clone(){return new Di(this.x,this.y)}copyFrom(k){return this.set(k.x,k.y),this}copyTo(k){return k.set(this.x,this.y),k}equals(k){return k.x===this.x&&k.y===this.y}set(k=0,B=k){return this.x=k,this.y=B,this}}Di.prototype.toString=function(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`};const Ri=[new Di,new Di,new Di,new Di];class Pi{constructor(k=0,B=0,U=0,F=0){this.x=Number(k),this.y=Number(B),this.width=Number(U),this.height=Number(F),this.type=Ii.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new Pi(0,0,0,0)}clone(){return new Pi(this.x,this.y,this.width,this.height)}copyFrom(k){return this.x=k.x,this.y=k.y,this.width=k.width,this.height=k.height,this}copyTo(k){return k.x=this.x,k.y=this.y,k.width=this.width,k.height=this.height,k}contains(k,B){return!(this.width<=0||this.height<=0)&&(k>=this.x&&k=this.y&&Bk.right?k.right:this.right)<=B)return!1;const U=this.yk.bottom?k.bottom:this.bottom)>U}const U=this.left,F=this.right,G=this.top,j=this.bottom;if(F<=U||j<=G)return!1;const $=Ri[0].set(k.left,k.top),H=Ri[1].set(k.left,k.bottom),V=Ri[2].set(k.right,k.top),W=Ri[3].set(k.right,k.bottom);if(V.x<=$.x||H.y<=$.y)return!1;const q=Math.sign(B.a*B.d-B.b*B.c);if(0===q||(B.apply($,$),B.apply(H,H),B.apply(V,V),B.apply(W,W),Math.max($.x,H.x,V.x,W.x)<=U||Math.min($.x,H.x,V.x,W.x)>=F||Math.max($.y,H.y,V.y,W.y)<=G||Math.min($.y,H.y,V.y,W.y)>=j))return!1;const K=q*(H.y-$.y),z=q*($.x-H.x),Y=K*U+z*G,Q=K*F+z*G,X=K*U+z*j,Z=K*F+z*j;if(Math.max(Y,Q,X,Z)<=K*$.x+z*$.y||Math.min(Y,Q,X,Z)>=K*W.x+z*W.y)return!1;const J=q*($.y-V.y),tt=q*(V.x-$.x),et=J*U+tt*G,it=J*F+tt*G,st=J*U+tt*j,nt=J*F+tt*j;return!(Math.max(et,it,st,nt)<=J*$.x+tt*$.y||Math.min(et,it,st,nt)>=J*W.x+tt*W.y)}pad(k=0,B=k){return this.x-=k,this.y-=B,this.width+=2*k,this.height+=2*B,this}fit(k){const B=Math.max(this.x,k.x),U=Math.min(this.x+this.width,k.x+k.width),F=Math.max(this.y,k.y),G=Math.min(this.y+this.height,k.y+k.height);return this.x=B,this.width=Math.max(U-B,0),this.y=F,this.height=Math.max(G-F,0),this}ceil(k=1,B=.001){const U=Math.ceil((this.x+this.width-B)*k)/k,F=Math.ceil((this.y+this.height-B)*k)/k;return this.x=Math.floor((this.x+B)*k)/k,this.y=Math.floor((this.y+B)*k)/k,this.width=U-this.x,this.height=F-this.y,this}enlarge(k){const B=Math.min(this.x,k.x),U=Math.max(this.x+this.width,k.x+k.width),F=Math.min(this.y,k.y),G=Math.max(this.y+this.height,k.y+k.height);return this.x=B,this.width=U-B,this.y=F,this.height=G-F,this}}Pi.prototype.toString=function(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class Mi{constructor(k=0,B=0,U=0){this.x=k,this.y=B,this.radius=U,this.type=Ii.CIRC}clone(){return new Mi(this.x,this.y,this.radius)}contains(k,B){if(this.radius<=0)return!1;const U=this.radius*this.radius;let F=this.x-k,G=this.y-B;return F*=F,G*=G,F+G<=U}getBounds(){return new Pi(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)}}Mi.prototype.toString=function(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`};class Ni{constructor(k=0,B=0,U=0,F=0){this.x=k,this.y=B,this.width=U,this.height=F,this.type=Ii.ELIP}clone(){return new Ni(this.x,this.y,this.width,this.height)}contains(k,B){if(this.width<=0||this.height<=0)return!1;let U=(k-this.x)/this.width,F=(B-this.y)/this.height;return U*=U,F*=F,U+F<=1}getBounds(){return new Pi(this.x-this.width,this.y-this.height,this.width,this.height)}}Ni.prototype.toString=function(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class xi{constructor(...k){let B=Array.isArray(k[0])?k[0]:k;if("number"!=typeof B[0]){const k=[];for(let U=0,F=B.length;UB!=V>B&&k<(B-$)/(V-$)*(H-F)+F&&(U=!U)}return U}}xi.prototype.toString=function(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce(((k,B)=>`${k}, ${B}`),"")}]`};class Li{constructor(k=0,B=0,U=0,F=0,G=20){this.x=k,this.y=B,this.width=U,this.height=F,this.radius=G,this.type=Ii.RREC}clone(){return new Li(this.x,this.y,this.width,this.height,this.radius)}contains(k,B){if(this.width<=0||this.height<=0)return!1;if(k>=this.x&&k<=this.x+this.width&&B>=this.y&&B<=this.y+this.height){const U=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(B>=this.y+U&&B<=this.y+this.height-U||k>=this.x+U&&k<=this.x+this.width-U)return!0;let F=k-(this.x+U),G=B-(this.y+U);const j=U*U;if(F*F+G*G<=j||(F=k-(this.x+this.width-U),F*F+G*G<=j)||(G=B-(this.y+this.height-U),F*F+G*G<=j)||(F=k-(this.x+U),F*F+G*G<=j))return!0}return!1}}Li.prototype.toString=function(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`};class ki{constructor(k=1,B=0,U=0,F=1,G=0,j=0){this.array=null,this.a=k,this.b=B,this.c=U,this.d=F,this.tx=G,this.ty=j}fromArray(k){this.a=k[0],this.b=k[1],this.c=k[3],this.d=k[4],this.tx=k[2],this.ty=k[5]}set(k,B,U,F,G,j){return this.a=k,this.b=B,this.c=U,this.d=F,this.tx=G,this.ty=j,this}toArray(k,B){this.array||(this.array=new Float32Array(9));const U=B||this.array;return k?(U[0]=this.a,U[1]=this.b,U[2]=0,U[3]=this.c,U[4]=this.d,U[5]=0,U[6]=this.tx,U[7]=this.ty,U[8]=1):(U[0]=this.a,U[1]=this.c,U[2]=this.tx,U[3]=this.b,U[4]=this.d,U[5]=this.ty,U[6]=0,U[7]=0,U[8]=1),U}apply(k,B){B=B||new Di;const U=k.x,F=k.y;return B.x=this.a*U+this.c*F+this.tx,B.y=this.b*U+this.d*F+this.ty,B}applyInverse(k,B){B=B||new Di;const U=1/(this.a*this.d+this.c*-this.b),F=k.x,G=k.y;return B.x=this.d*U*F+-this.c*U*G+(this.ty*this.c-this.tx*this.d)*U,B.y=this.a*U*G+-this.b*U*F+(-this.ty*this.a+this.tx*this.b)*U,B}translate(k,B){return this.tx+=k,this.ty+=B,this}scale(k,B){return this.a*=k,this.d*=B,this.c*=k,this.b*=B,this.tx*=k,this.ty*=B,this}rotate(k){const B=Math.cos(k),U=Math.sin(k),F=this.a,G=this.c,j=this.tx;return this.a=F*B-this.b*U,this.b=F*U+this.b*B,this.c=G*B-this.d*U,this.d=G*U+this.d*B,this.tx=j*B-this.ty*U,this.ty=j*U+this.ty*B,this}append(k){const B=this.a,U=this.b,F=this.c,G=this.d;return this.a=k.a*B+k.b*F,this.b=k.a*U+k.b*G,this.c=k.c*B+k.d*F,this.d=k.c*U+k.d*G,this.tx=k.tx*B+k.ty*F+this.tx,this.ty=k.tx*U+k.ty*G+this.ty,this}setTransform(k,B,U,F,G,j,$,H,V){return this.a=Math.cos($+V)*G,this.b=Math.sin($+V)*G,this.c=-Math.sin($-H)*j,this.d=Math.cos($-H)*j,this.tx=k-(U*this.a+F*this.c),this.ty=B-(U*this.b+F*this.d),this}prepend(k){const B=this.tx;if(1!==k.a||0!==k.b||0!==k.c||1!==k.d){const B=this.a,U=this.c;this.a=B*k.a+this.b*k.c,this.b=B*k.b+this.b*k.d,this.c=U*k.a+this.d*k.c,this.d=U*k.b+this.d*k.d}return this.tx=B*k.a+this.ty*k.c+k.tx,this.ty=B*k.b+this.ty*k.d+k.ty,this}decompose(k){const B=this.a,U=this.b,F=this.c,G=this.d,j=k.pivot,$=-Math.atan2(-F,G),H=Math.atan2(U,B),V=Math.abs($+H);return V<1e-5||Math.abs(Ai-V)<1e-5?(k.rotation=H,k.skew.x=k.skew.y=0):(k.rotation=0,k.skew.x=$,k.skew.y=H),k.scale.x=Math.sqrt(B*B+U*U),k.scale.y=Math.sqrt(F*F+G*G),k.position.x=this.tx+(j.x*B+j.y*F),k.position.y=this.ty+(j.x*U+j.y*G),k}invert(){const k=this.a,B=this.b,U=this.c,F=this.d,G=this.tx,j=k*F-B*U;return this.a=F/j,this.b=-B/j,this.c=-U/j,this.d=k/j,this.tx=(U*this.ty-F*G)/j,this.ty=-(k*this.ty-B*G)/j,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const k=new ki;return k.a=this.a,k.b=this.b,k.c=this.c,k.d=this.d,k.tx=this.tx,k.ty=this.ty,k}copyTo(k){return k.a=this.a,k.b=this.b,k.c=this.c,k.d=this.d,k.tx=this.tx,k.ty=this.ty,k}copyFrom(k){return this.a=k.a,this.b=k.b,this.c=k.c,this.d=k.d,this.tx=k.tx,this.ty=k.ty,this}static get IDENTITY(){return new ki}static get TEMP_MATRIX(){return new ki}}ki.prototype.toString=function(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`};const Bi=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Ui=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Fi=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Gi=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],ji=[],$i=[],Hi=Math.sign;!function(){for(let k=0;k<16;k++){const B=[];ji.push(B);for(let U=0;U<16;U++){const F=Hi(Bi[k]*Bi[U]+Fi[k]*Ui[U]),G=Hi(Ui[k]*Bi[U]+Gi[k]*Ui[U]),j=Hi(Bi[k]*Fi[U]+Fi[k]*Gi[U]),$=Hi(Ui[k]*Fi[U]+Gi[k]*Gi[U]);for(let k=0;k<16;k++)if(Bi[k]===F&&Ui[k]===G&&Fi[k]===j&&Gi[k]===$){B.push(k);break}}}for(let k=0;k<16;k++){const B=new ki;B.set(Bi[k],Ui[k],Fi[k],Gi[k],0,0),$i.push(B)}}();const Vi={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:k=>Bi[k],uY:k=>Ui[k],vX:k=>Fi[k],vY:k=>Gi[k],inv:k=>8&k?15&k:7&-k,add:(k,B)=>ji[k][B],sub:(k,B)=>ji[k][Vi.inv(B)],rotate180:k=>4^k,isVertical:k=>2==(3&k),byDirection:(k,B)=>2*Math.abs(k)<=Math.abs(B)?B>=0?Vi.S:Vi.N:2*Math.abs(B)<=Math.abs(k)?k>0?Vi.E:Vi.W:B>0?k>0?Vi.SE:Vi.SW:k>0?Vi.NE:Vi.NW,matrixAppendRotationInv:(k,B,U=0,F=0)=>{const G=$i[Vi.inv(B)];G.tx=U,G.ty=F,k.append(G)}};class Wi{constructor(k,B,U=0,F=0){this._x=U,this._y=F,this.cb=k,this.scope=B}clone(k=this.cb,B=this.scope){return new Wi(k,B,this._x,this._y)}set(k=0,B=k){return(this._x!==k||this._y!==B)&&(this._x=k,this._y=B,this.cb.call(this.scope)),this}copyFrom(k){return(this._x!==k.x||this._y!==k.y)&&(this._x=k.x,this._y=k.y,this.cb.call(this.scope)),this}copyTo(k){return k.set(this._x,this._y),k}equals(k){return k.x===this._x&&k.y===this._y}get x(){return this._x}set x(k){this._x!==k&&(this._x=k,this.cb.call(this.scope))}get y(){return this._y}set y(k){this._y!==k&&(this._y=k,this.cb.call(this.scope))}}Wi.prototype.toString=function(){return`[@pixi/math:ObservablePoint x=${this.x} y=${this.y} scope=${this.scope}]`};const qi=class{constructor(){this.worldTransform=new ki,this.localTransform=new ki,this.position=new Wi(this.onChange,this,0,0),this.scale=new Wi(this.onChange,this,1,1),this.pivot=new Wi(this.onChange,this,0,0),this.skew=new Wi(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}updateLocalTransform(){const k=this.localTransform;this._localID!==this._currentLocalID&&(k.a=this._cx*this.scale.x,k.b=this._sx*this.scale.x,k.c=this._cy*this.scale.y,k.d=this._sy*this.scale.y,k.tx=this.position.x-(this.pivot.x*k.a+this.pivot.y*k.c),k.ty=this.position.y-(this.pivot.x*k.b+this.pivot.y*k.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(k){const B=this.localTransform;if(this._localID!==this._currentLocalID&&(B.a=this._cx*this.scale.x,B.b=this._sx*this.scale.x,B.c=this._cy*this.scale.y,B.d=this._sy*this.scale.y,B.tx=this.position.x-(this.pivot.x*B.a+this.pivot.y*B.c),B.ty=this.position.y-(this.pivot.x*B.b+this.pivot.y*B.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==k._worldID){const U=k.worldTransform,F=this.worldTransform;F.a=B.a*U.a+B.b*U.c,F.b=B.a*U.b+B.b*U.d,F.c=B.c*U.a+B.d*U.c,F.d=B.c*U.b+B.d*U.d,F.tx=B.tx*U.a+B.ty*U.c+U.tx,F.ty=B.tx*U.b+B.ty*U.d+U.ty,this._parentID=k._worldID,this._worldID++}}setFromMatrix(k){k.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(k){this._rotation!==k&&(this._rotation=k,this.updateSkew())}};qi.IDENTITY=new qi;let Ki=qi;Ki.prototype.toString=function(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`};const zi=[{test:k=>"float"===k.type&&1===k.size&&!k.isArray,code:k=>`\n if(uv["${k}"] !== ud["${k}"].value)\n {\n ud["${k}"].value = uv["${k}"]\n gl.uniform1f(ud["${k}"].location, uv["${k}"])\n }\n `},{test:(k,B)=>!("sampler2D"!==k.type&&"samplerCube"!==k.type&&"sampler2DArray"!==k.type||1!==k.size||k.isArray||null!=B&&void 0===B.castToBaseTexture),code:k=>`t = syncData.textureCount++;\n\n renderer.texture.bind(uv["${k}"], t);\n\n if(ud["${k}"].value !== t)\n {\n ud["${k}"].value = t;\n gl.uniform1i(ud["${k}"].location, t);\n; // eslint-disable-line max-len\n }`},{test:(k,B)=>"mat3"===k.type&&1===k.size&&!k.isArray&&void 0!==B.a,code:k=>`\n gl.uniformMatrix3fv(ud["${k}"].location, false, uv["${k}"].toArray(true));\n `,codeUbo:k=>`\n var ${k}_matrix = uv.${k}.toArray(true);\n\n data[offset] = ${k}_matrix[0];\n data[offset+1] = ${k}_matrix[1];\n data[offset+2] = ${k}_matrix[2];\n \n data[offset + 4] = ${k}_matrix[3];\n data[offset + 5] = ${k}_matrix[4];\n data[offset + 6] = ${k}_matrix[5];\n \n data[offset + 8] = ${k}_matrix[6];\n data[offset + 9] = ${k}_matrix[7];\n data[offset + 10] = ${k}_matrix[8];\n `},{test:(k,B)=>"vec2"===k.type&&1===k.size&&!k.isArray&&void 0!==B.x,code:k=>`\n cv = ud["${k}"].value;\n v = uv["${k}"];\n\n if(cv[0] !== v.x || cv[1] !== v.y)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n gl.uniform2f(ud["${k}"].location, v.x, v.y);\n }`,codeUbo:k=>`\n v = uv.${k};\n\n data[offset] = v.x;\n data[offset+1] = v.y;\n `},{test:k=>"vec2"===k.type&&1===k.size&&!k.isArray,code:k=>`\n cv = ud["${k}"].value;\n v = uv["${k}"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2f(ud["${k}"].location, v[0], v[1]);\n }\n `},{test:(k,B)=>"vec4"===k.type&&1===k.size&&!k.isArray&&void 0!==B.width,code:k=>`\n cv = ud["${k}"].value;\n v = uv["${k}"];\n\n if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n cv[2] = v.width;\n cv[3] = v.height;\n gl.uniform4f(ud["${k}"].location, v.x, v.y, v.width, v.height)\n }`,codeUbo:k=>`\n v = uv.${k};\n\n data[offset] = v.x;\n data[offset+1] = v.y;\n data[offset+2] = v.width;\n data[offset+3] = v.height;\n `},{test:(k,B)=>"vec4"===k.type&&1===k.size&&!k.isArray&&void 0!==B.red,code:k=>`\n cv = ud["${k}"].value;\n v = uv["${k}"];\n\n if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha)\n {\n cv[0] = v.red;\n cv[1] = v.green;\n cv[2] = v.blue;\n cv[3] = v.alpha;\n gl.uniform4f(ud["${k}"].location, v.red, v.green, v.blue, v.alpha)\n }`,codeUbo:k=>`\n v = uv.${k};\n\n data[offset] = v.red;\n data[offset+1] = v.green;\n data[offset+2] = v.blue;\n data[offset+3] = v.alpha;\n `},{test:(k,B)=>"vec3"===k.type&&1===k.size&&!k.isArray&&void 0!==B.red,code:k=>`\n cv = ud["${k}"].value;\n v = uv["${k}"];\n\n if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.a)\n {\n cv[0] = v.red;\n cv[1] = v.green;\n cv[2] = v.blue;\n \n gl.uniform3f(ud["${k}"].location, v.red, v.green, v.blue)\n }`,codeUbo:k=>`\n v = uv.${k};\n\n data[offset] = v.red;\n data[offset+1] = v.green;\n data[offset+2] = v.blue;\n `},{test:k=>"vec4"===k.type&&1===k.size&&!k.isArray,code:k=>`\n cv = ud["${k}"].value;\n v = uv["${k}"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4f(ud["${k}"].location, v[0], v[1], v[2], v[3])\n }`}],Yi={float:"\n if (cv !== v)\n {\n cu.value = v;\n gl.uniform1f(location, v);\n }",vec2:"\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2f(location, v[0], v[1])\n }",vec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3f(location, v[0], v[1], v[2])\n }",vec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4f(location, v[0], v[1], v[2], v[3]);\n }",int:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1i(location, v);\n }",ivec2:"\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2i(location, v[0], v[1]);\n }",ivec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3i(location, v[0], v[1], v[2]);\n }",ivec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4i(location, v[0], v[1], v[2], v[3]);\n }",uint:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1ui(location, v);\n }",uvec2:"\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2ui(location, v[0], v[1]);\n }",uvec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3ui(location, v[0], v[1], v[2]);\n }",uvec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4ui(location, v[0], v[1], v[2], v[3]);\n }",bool:"\n if (cv !== v)\n {\n cu.value = v;\n gl.uniform1i(location, v);\n }",bvec2:"\n if (cv[0] != v[0] || cv[1] != v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2i(location, v[0], v[1]);\n }",bvec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3i(location, v[0], v[1], v[2]);\n }",bvec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4i(location, v[0], v[1], v[2], v[3]);\n }",mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1i(location, v);\n }",samplerCube:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1i(location, v);\n }",sampler2DArray:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1i(location, v);\n }"},Qi={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};const Xi={};let Zi,Ji=Xi;function ts(){if(!Zi){Zi=et.MEDIUM;const k=function(){if(Ji===Xi||Ji?.isContextLost()){const k=at.ADAPTER.createCanvas();let B;at.PREFER_ENV>=G.WEBGL2&&(B=k.getContext("webgl2",{})),B||(B=k.getContext("webgl",{})||k.getContext("experimental-webgl",{}),B?B.getExtension("WEBGL_draw_buffers"):B=null),Ji=B}return Ji}();if(k&&k.getShaderPrecisionFormat){const B=k.getShaderPrecisionFormat(k.FRAGMENT_SHADER,k.HIGH_FLOAT);B&&(Zi=B.precision?et.HIGH:et.MEDIUM)}}return Zi}const es={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function is(k){return es[k]}let ss=null;const ns={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function as(k,B){if(!ss){const B=Object.keys(ns);ss={};for(let U=0;U0&&(B+="\nelse "),Uthis.size&&this.flush(),this._vertexCount+=k.vertexData.length/2,this._indexCount+=k.indices.length,this._bufferedTextures[this._bufferSize]=k._texture.baseTexture,this._bufferedElements[this._bufferSize++]=k)}buildTexturesAndDrawCalls(){const{_bufferedTextures:B,maxTextures:U}=this,F=k._textureArrayPool,G=this.renderer.batch,j=this._tempBoundTextures,$=this.renderer.textureGC.count;let H=++bi._globalBatch,V=0,W=F[0],q=0;G.copyBoundTextures(j,U);for(let k=0;k=U&&(G.boundArray(W,j,H,U),this.buildDrawCalls(W,q,k),q=k,W=F[++V],++H),K._batchEnabled=H,K.touched=$,W.elements[W.count++]=K)}W.count>0&&(G.boundArray(W,j,H,U),this.buildDrawCalls(W,q,this._bufferSize),++V,++H);for(let k=0;k0);for(let Q=0;Q=0;--F)k[F]=U[F]||null,k[F]&&(k[F]._batchLocation=F)}boundArray(k,B,U,F){const{elements:G,ids:j,count:$}=k;let H=0;for(let V=0;V<$;V++){const k=G[V],$=k._batchLocation;if($>=0&&$=G.WEBGL2&&(U=k.getContext("webgl2",B)),U)this.webGLVersion=2;else if(this.webGLVersion=1,U=k.getContext("webgl",B)||k.getContext("experimental-webgl",B),!U)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=U,this.getExtensions(),this.gl}getExtensions(){const{gl:k}=this,B={loseContext:k.getExtension("WEBGL_lose_context"),anisotropicFiltering:k.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:k.getExtension("OES_texture_float_linear"),s3tc:k.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:k.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:k.getExtension("WEBGL_compressed_texture_etc"),etc1:k.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:k.getExtension("WEBGL_compressed_texture_pvrtc")||k.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:k.getExtension("WEBGL_compressed_texture_atc"),astc:k.getExtension("WEBGL_compressed_texture_astc"),bptc:k.getExtension("EXT_texture_compression_bptc")};1===this.webGLVersion?Object.assign(this.extensions,B,{drawBuffers:k.getExtension("WEBGL_draw_buffers"),depthTexture:k.getExtension("WEBGL_depth_texture"),vertexArrayObject:k.getExtension("OES_vertex_array_object")||k.getExtension("MOZ_OES_vertex_array_object")||k.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:k.getExtension("OES_element_index_uint"),floatTexture:k.getExtension("OES_texture_float"),floatTextureLinear:k.getExtension("OES_texture_float_linear"),textureHalfFloat:k.getExtension("OES_texture_half_float"),textureHalfFloatLinear:k.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,B,{colorBufferFloat:k.getExtension("EXT_color_buffer_float")})}handleContextLost(k){k.preventDefault(),setTimeout((()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()}),0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const k=this.renderer.view;this.renderer=null,void 0!==k.removeEventListener&&(k.removeEventListener("webglcontextlost",this.handleContextLost),k.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(k){const B=k.getContextAttributes(),U="WebGL2RenderingContext"in globalThis&&k instanceof globalThis.WebGL2RenderingContext;U&&(this.webGLVersion=2),B&&!B.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const F=U||!!k.getExtension("OES_element_index_uint");this.supports.uint32Indices=F,F||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}Ss.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},Ss.extension={type:Je.RendererSystem,name:"context"},ii.add(Ss);class As{constructor(k,B){if(this.width=Math.round(k),this.height=Math.round(B),!this.width||!this.height)throw new Error("Framebuffer width or height is zero");this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new ci("disposeFramebuffer"),this.multisample=st.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(k=0,B){return this.colorTextures[k]=B||new bi(null,{scaleMode:Y.NEAREST,resolution:1,mipmap:X.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(k){return this.depthTexture=k||new bi(null,{scaleMode:Y.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:X.OFF,format:W.DEPTH_COMPONENT,type:K.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(k,B){if(k=Math.round(k),B=Math.round(B),!k||!B)throw new Error("Framebuffer width and height must not be zero");if(k!==this.width||B!==this.height){this.width=k,this.height=B,this.dirtyId++,this.dirtySize++;for(let U=0;U{const U=this.source;this.url=U.src;const F=()=>{this.destroyed||(U.onload=null,U.onerror=null,this.update(),this._load=null,this.createBitmap?k(this.process()):k(this))};U.complete&&U.src?F():(U.onload=F,U.onerror=k=>{B(k),this.onError.emit(k)})}))),this._load}process(){const k=this.source;if(null!==this._process)return this._process;if(null!==this.bitmap||!globalThis.createImageBitmap)return Promise.resolve(this);const B=globalThis.createImageBitmap,U=!k.crossOrigin||"anonymous"===k.crossOrigin;return this._process=fetch(k.src,{mode:U?"cors":"no-cors"}).then((k=>k.blob())).then((U=>B(U,0,0,k.width,k.height,{premultiplyAlpha:null===this.alphaMode||this.alphaMode===Z.UNPACK?"premultiply":"none"}))).then((k=>this.destroyed?Promise.reject():(this.bitmap=k,this.update(),this._process=null,Promise.resolve(this)))),this._process}upload(k,B,U){if("number"==typeof this.alphaMode&&(B.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(k,B,U);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(k,B,U,this.bitmap),!this.preserveBitmap){let k=!0;const F=B._glTextures;for(const G in F){const j=F[G];if(j!==U&&j.dirtyId!==B.dirtyId){k=!1;break}}k&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(k){return typeof HTMLImageElement<"u"&&("string"==typeof k||k instanceof HTMLImageElement)}}class Ds{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(k,B,U){const F=B.width,G=B.height;if(U){const B=k.width/2/F,j=k.height/2/G,$=k.x/F+B,H=k.y/G+j;U=Vi.add(U,Vi.NW),this.x0=$+B*Vi.uX(U),this.y0=H+j*Vi.uY(U),U=Vi.add(U,2),this.x1=$+B*Vi.uX(U),this.y1=H+j*Vi.uY(U),U=Vi.add(U,2),this.x2=$+B*Vi.uX(U),this.y2=H+j*Vi.uY(U),U=Vi.add(U,2),this.x3=$+B*Vi.uX(U),this.y3=H+j*Vi.uY(U)}else this.x0=k.x/F,this.y0=k.y/G,this.x1=(k.x+k.width)/F,this.y1=k.y/G,this.x2=(k.x+k.width)/F,this.y2=(k.y+k.height)/G,this.x3=k.x/F,this.y3=(k.y+k.height)/G;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}}Ds.prototype.toString=function(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`};const Rs=new Ds;function Ps(k){k.destroy=function(){},k.on=function(){},k.once=function(){},k.emit=function(){}}class Ms extends(At()){constructor(k,B,U,F,G,j,$){if(super(),this.noFrame=!1,B||(this.noFrame=!0,B=new Pi(0,0,1,1)),k instanceof Ms&&(k=k.baseTexture),this.baseTexture=k,this._frame=B,this.trim=F,this.valid=!1,this.destroyed=!1,this._uvs=Rs,this.uvMatrix=null,this.orig=U||B,this._rotate=Number(G||0),!0===G)this._rotate=2;else if(this._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=j?new Di(j.x,j.y):new Di(0,0),this.defaultBorders=$,this._updateID=0,this.textureCacheIds=[],k.valid?this.noFrame?k.valid&&this.onBaseTextureUpdated(k):this.frame=B:k.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&k.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(k){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=k.width,this._frame.height=k.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(k){if(this.baseTexture){if(k){const{resource:k}=this.baseTexture;k?.url&&je[k.url]&&Ms.removeFromCache(k.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,Ms.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}clone(){const k=this._frame.clone(),B=this._frame===this.orig?k:this.orig.clone(),U=new Ms(this.baseTexture,!this.noFrame&&k,B,this.trim?.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(U._frame=k),U}updateUvs(){this._uvs===Rs&&(this._uvs=new Ds),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(k,B={},U=at.STRICT_TEXTURE_CACHE){const F="string"==typeof k;let G=null;if(F)G=k;else if(k instanceof bi){if(!k.cacheId){const U=B?.pixiIdPrefix||"pixiid";k.cacheId=`${U}-${Be()}`,bi.addToCache(k,k.cacheId)}G=k.cacheId}else{if(!k._pixiId){const U=B?.pixiIdPrefix||"pixiid";k._pixiId=`${U}_${Be()}`}G=k._pixiId}let j=je[G];if(F&&U&&!j)throw new Error(`The cacheId "${G}" does not exist in TextureCache.`);return j||k instanceof bi?!j&&k instanceof bi&&(j=new Ms(k),Ms.addToCache(j,G)):(B.resolution||(B.resolution=Ze(k)),j=new Ms(new bi(k,B)),j.baseTexture.cacheId=G,bi.addToCache(j.baseTexture,G),Ms.addToCache(j,G)),j}static fromURL(k,B){const U=Object.assign({autoLoad:!1},B?.resourceOptions),F=Ms.from(k,Object.assign({resourceOptions:U},B),!1),G=F.baseTexture.resource;return F.baseTexture.valid?Promise.resolve(F):G.load().then((()=>Promise.resolve(F)))}static fromBuffer(k,B,U,F){return new Ms(bi.fromBuffer(k,B,U,F))}static fromLoader(k,B,U,F){const G=new bi(k,Object.assign({scaleMode:bi.defaultOptions.scaleMode,resolution:Ze(B)},F)),{resource:j}=G;j instanceof Is&&(j.url=B);const $=new Ms(G);return U||(U=B),bi.addToCache($.baseTexture,U),Ms.addToCache($,U),U!==B&&(bi.addToCache($.baseTexture,B),Ms.addToCache($,B)),$.baseTexture.valid?Promise.resolve($):new Promise((k=>{$.baseTexture.once("loaded",(()=>k($)))}))}static addToCache(k,B){B&&(k.textureCacheIds.includes(B)||k.textureCacheIds.push(B),je[B]&&je[B]!==k&&console.warn(`Texture added to the cache with an id [${B}] that already had an entry`),je[B]=k)}static removeFromCache(k){if("string"==typeof k){const B=je[k];if(B){const U=B.textureCacheIds.indexOf(k);return U>-1&&B.textureCacheIds.splice(U,1),delete je[k],B}}else if(k?.textureCacheIds){for(let B=0;Bthis.baseTexture.width,$=U+G>this.baseTexture.height;if(j||$){const k=j&&$?"and":"or",H=`X: ${B} + ${F} = ${B+F} > ${this.baseTexture.width}`,V=`Y: ${U} + ${G} = ${U+G} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${H} ${k} ${V}`)}this.valid=F&&G&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=k),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(k){this._rotate=k,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return Ms._EMPTY||(Ms._EMPTY=new Ms(new bi),Ps(Ms._EMPTY),Ps(Ms._EMPTY.baseTexture)),Ms._EMPTY}static get WHITE(){if(!Ms._WHITE){const k=at.ADAPTER.createCanvas(16,16),B=k.getContext("2d");k.width=16,k.height=16,B.fillStyle="white",B.fillRect(0,0,16,16),Ms._WHITE=new Ms(bi.from(k)),Ps(Ms._WHITE),Ps(Ms._WHITE.baseTexture)}return Ms._WHITE}}class Ns extends Ms{constructor(k,B){super(k,B),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(k){this.framebuffer.multisample=k}resize(k,B,U=!0){const F=this.baseTexture.resolution,G=Math.round(k*F)/F,j=Math.round(B*F)/F;this.valid=G>0&&j>0,this._frame.width=this.orig.width=G,this._frame.height=this.orig.height=j,U&&this.baseTexture.resize(G,j),this.updateUvs()}setResolution(k){const{baseTexture:B}=this;B.resolution!==k&&(B.setResolution(k),this.resize(B.width,B.height,!1))}static create(k){return new Ns(new Cs(k))}}class xs{constructor(k){this.texturePool={},this.textureOptions=k||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(k,B,U=st.NONE){const F=new Cs(Object.assign({width:k,height:B,resolution:1,multisample:U},this.textureOptions));return new Ns(F)}getOptimalTexture(k,B,U=1,F=st.NONE){let G;k=Math.max(Math.ceil(k*U-1e-6),1),B=Math.max(Math.ceil(B*U-1e-6),1),this.enableFullScreen&&k===this._pixelsWidth&&B===this._pixelsHeight?G=F>1?-F:-1:(G=((65535&(k=Pe(k)))<<16|65535&(B=Pe(B)))>>>0,F>1&&(G+=4294967296*F)),this.texturePool[G]||(this.texturePool[G]=[]);let j=this.texturePool[G].pop();return j||(j=this.createTexture(k,B,F)),j.filterPoolKey=G,j.setResolution(U),j}getFilterTexture(k,B,U){const F=this.getOptimalTexture(k.width,k.height,B||k.resolution,U||st.NONE);return F.filterFrame=k.filterFrame,F}returnTexture(k){const B=k.filterPoolKey;k.filterFrame=null,this.texturePool[B].push(k)}returnFilterTexture(k){this.returnTexture(k)}clear(k){if(k=!1!==k)for(const B in this.texturePool){const k=this.texturePool[B];if(k)for(let B=0;B0&&k.height>0;for(const k in this.texturePool){if(!(Number(k)<0))continue;const B=this.texturePool[k];if(B)for(let k=0;k1&&(F=this.getOptimalFilterTexture(k.width,k.height,B.resolution),F.filterFrame=k.filterFrame),U[G].apply(this,k,F,J.CLEAR,B);const j=k;k=F,F=j}U[G].apply(this,k,H.renderTexture,J.BLEND,B),G>1&&B.multisample>1&&this.returnFilterTexture(B.renderTexture),this.returnFilterTexture(k),this.returnFilterTexture(F)}B.clear(),this.statePool.push(B)}bindAndClear(k,B=J.CLEAR){const{renderTexture:U,state:F}=this.renderer;if(k===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,k?.filterFrame){const B=this.tempRect;B.x=0,B.y=0,B.width=k.filterFrame.width,B.height=k.filterFrame.height,U.bind(k,k.filterFrame,B)}else k!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?U.bind(k):this.renderer.renderTexture.bind(k,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const G=1&F.stateId||this.forceClear;(B===J.CLEAR||B===J.BLIT&&G)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(k,B,U,F){const G=this.renderer;G.state.set(k.state),this.bindAndClear(U,F),k.uniforms.uSampler=B,k.uniforms.filterGlobals=this.globalUniforms,G.shader.bind(k),k.legacy=!!k.program.attributeData.aTextureCoord,k.legacy?(this.quadUv.map(B._frame,B.filterFrame),G.geometry.bind(this.quadUv),G.geometry.draw(V.TRIANGLES)):(G.geometry.bind(this.quad),G.geometry.draw(V.TRIANGLE_STRIP))}calculateSpriteMatrix(k,B){const{sourceFrame:U,destinationFrame:F}=this.activeState,{orig:G}=B._texture,j=k.set(F.width,0,0,F.height,U.x,U.y),$=B.worldTransform.copyTo(ki.TEMP_MATRIX);return $.invert(),j.prepend($),j.scale(1/G.width,1/G.height),j.translate(B.anchor.x,B.anchor.y),j}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(k,B,U=1,F=st.NONE){return this.texturePool.getOptimalTexture(k,B,U,F)}getFilterTexture(k,B,U){if("number"==typeof k){const U=k;k=B,B=U}k=k||this.activeState.renderTexture;const F=this.texturePool.getOptimalTexture(k.width,k.height,B||k.resolution,U||st.NONE);return F.filterFrame=k.filterFrame,F}returnFilterTexture(k){this.texturePool.returnTexture(k)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(k,B){const U=Us[0],F=Us[1],G=Us[2],j=Us[3];U.set(B.left,B.top),F.set(B.left,B.bottom),G.set(B.right,B.top),j.set(B.right,B.bottom),k.apply(U,U),k.apply(F,F),k.apply(G,G),k.apply(j,j);const $=Math.min(U.x,F.x,G.x,j.x),H=Math.min(U.y,F.y,G.y,j.y),V=Math.max(U.x,F.x,G.x,j.x),W=Math.max(U.y,F.y,G.y,j.y);B.x=$,B.y=H,B.width=V-$,B.height=W-H}roundFrame(k,B,U,F,G){if(!(k.width<=0||k.height<=0||U.width<=0||U.height<=0)){if(G){const{a:k,b:B,c:U,d:F}=G;if((Math.abs(B)>1e-4||Math.abs(U)>1e-4)&&(Math.abs(k)>1e-4||Math.abs(F)>1e-4))return}(G=G?Fs.copyFrom(G):Fs.identity()).translate(-U.x,-U.y).scale(F.width/U.width,F.height/U.height).translate(F.x,F.y),this.transformAABB(G,k),k.ceil(B),this.transformAABB(G.invert(),k)}}}Gs.extension={type:Je.RendererSystem,name:"filter"},ii.add(Gs);class js{constructor(k){this.framebuffer=k,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=st.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const $s=new Pi;class Hs{constructor(k){this.renderer=k,this.managedFramebuffers=[],this.unknownFramebuffer=new As(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const k=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Pi,this.hasMRT=!0,this.writeDepthTexture=!0,1===this.renderer.context.webGLVersion){let B=this.renderer.context.extensions.drawBuffers,U=this.renderer.context.extensions.depthTexture;at.PREFER_ENV===G.WEBGL_LEGACY&&(B=null,U=null),B?k.drawBuffers=k=>B.drawBuffersWEBGL(k):(this.hasMRT=!1,k.drawBuffers=()=>{}),U||(this.writeDepthTexture=!1)}else this.msaaSamples=k.getInternalformatParameter(k.RENDERBUFFER,k.RGBA8,k.SAMPLES)}bind(k,B,U=0){const{gl:F}=this;if(k){const G=k.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(k);this.current!==k&&(this.current=k,F.bindFramebuffer(F.FRAMEBUFFER,G.framebuffer)),G.mipLevel!==U&&(k.dirtyId++,k.dirtyFormat++,G.mipLevel=U),G.dirtyId!==k.dirtyId&&(G.dirtyId=k.dirtyId,G.dirtyFormat!==k.dirtyFormat?(G.dirtyFormat=k.dirtyFormat,G.dirtySize=k.dirtySize,this.updateFramebuffer(k,U)):G.dirtySize!==k.dirtySize&&(G.dirtySize=k.dirtySize,this.resizeFramebuffer(k)));for(let B=0;B>U,F=B.height>>U,G=k/B.width;this.setViewport(B.x*G,B.y*G,k,F)}else{const B=k.width>>U,F=k.height>>U;this.setViewport(0,0,B,F)}}else this.current&&(this.current=null,F.bindFramebuffer(F.FRAMEBUFFER,null)),B?this.setViewport(B.x,B.y,B.width,B.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(k,B,U,F){const G=this.viewport;k=Math.round(k),B=Math.round(B),U=Math.round(U),F=Math.round(F),(G.width!==U||G.height!==F||G.x!==k||G.y!==B)&&(G.x=k,G.y=B,G.width=U,G.height=F,this.gl.viewport(k,B,U,F))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(k,B,U,F,G=$.COLOR|$.DEPTH){const{gl:j}=this;j.clearColor(k,B,U,F),j.clear(G)}initFramebuffer(k){const{gl:B}=this,U=new js(B.createFramebuffer());return U.multisample=this.detectSamples(k.multisample),k.glFramebuffers[this.CONTEXT_UID]=U,this.managedFramebuffers.push(k),k.disposeRunner.add(this),U}resizeFramebuffer(k){const{gl:B}=this,U=k.glFramebuffers[this.CONTEXT_UID];if(U.stencil){let F;B.bindRenderbuffer(B.RENDERBUFFER,U.stencil),F=1===this.renderer.context.webGLVersion?B.DEPTH_STENCIL:k.depth&&k.stencil?B.DEPTH24_STENCIL8:k.depth?B.DEPTH_COMPONENT24:B.STENCIL_INDEX8,U.msaaBuffer?B.renderbufferStorageMultisample(B.RENDERBUFFER,U.multisample,F,k.width,k.height):B.renderbufferStorage(B.RENDERBUFFER,F,k.width,k.height)}const F=k.colorTextures;let G=F.length;B.drawBuffers||(G=Math.min(G,1));for(let j=0;j1&&this.canMultisampleFramebuffer(k)?F.msaaBuffer=F.msaaBuffer||U.createRenderbuffer():F.msaaBuffer&&(U.deleteRenderbuffer(F.msaaBuffer),F.msaaBuffer=null,F.blitFramebuffer&&(F.blitFramebuffer.dispose(),F.blitFramebuffer=null));const $=[];for(let H=0;H1&&U.drawBuffers($),k.depthTexture&&this.writeDepthTexture){const F=k.depthTexture;this.renderer.texture.bind(F,0),U.framebufferTexture2D(U.FRAMEBUFFER,U.DEPTH_ATTACHMENT,U.TEXTURE_2D,F._glTextures[this.CONTEXT_UID].texture,B)}if(!k.stencil&&!k.depth||k.depthTexture&&this.writeDepthTexture)F.stencil&&(U.deleteRenderbuffer(F.stencil),F.stencil=null);else{let B,G;F.stencil=F.stencil||U.createRenderbuffer(),1===this.renderer.context.webGLVersion?(B=U.DEPTH_STENCIL_ATTACHMENT,G=U.DEPTH_STENCIL):k.depth&&k.stencil?(B=U.DEPTH_STENCIL_ATTACHMENT,G=U.DEPTH24_STENCIL8):k.depth?(B=U.DEPTH_ATTACHMENT,G=U.DEPTH_COMPONENT24):(B=U.STENCIL_ATTACHMENT,G=U.STENCIL_INDEX8),U.bindRenderbuffer(U.RENDERBUFFER,F.stencil),F.msaaBuffer?U.renderbufferStorageMultisample(U.RENDERBUFFER,F.multisample,G,k.width,k.height):U.renderbufferStorage(U.RENDERBUFFER,G,k.width,k.height),U.framebufferRenderbuffer(U.FRAMEBUFFER,B,U.RENDERBUFFER,F.stencil)}}canMultisampleFramebuffer(k){return 1!==this.renderer.context.webGLVersion&&k.colorTextures.length<=1&&!k.depthTexture}detectSamples(k){const{msaaSamples:B}=this;let U=st.NONE;if(k<=1||null===B)return U;for(let F=0;F=0&&this.managedFramebuffers.splice(G,1),k.disposeRunner.remove(this),B||(F.deleteFramebuffer(U.framebuffer),U.msaaBuffer&&F.deleteRenderbuffer(U.msaaBuffer),U.stencil&&F.deleteRenderbuffer(U.stencil)),U.blitFramebuffer&&this.disposeFramebuffer(U.blitFramebuffer,B)}disposeAll(k){const B=this.managedFramebuffers;this.managedFramebuffers=[];for(let U=0;UB.createVertexArrayOES(),k.bindVertexArray=k=>B.bindVertexArrayOES(k),k.deleteVertexArray=k=>B.deleteVertexArrayOES(k)):(this.hasVao=!1,k.createVertexArray=()=>null,k.bindVertexArray=()=>null,k.deleteVertexArray=()=>null)}if(2!==B.webGLVersion){const B=k.getExtension("ANGLE_instanced_arrays");B?(k.vertexAttribDivisor=(k,U)=>B.vertexAttribDivisorANGLE(k,U),k.drawElementsInstanced=(k,U,F,G,j)=>B.drawElementsInstancedANGLE(k,U,F,G,j),k.drawArraysInstanced=(k,U,F,G)=>B.drawArraysInstancedANGLE(k,U,F,G)):this.hasInstance=!1}this.canUseUInt32ElementIndex=2===B.webGLVersion||!!B.extensions.uint32ElementIndex}bind(k,B){B=B||this.renderer.shader.shader;const{gl:U}=this;let F=k.glVertexArrayObjects[this.CONTEXT_UID],G=!1;F||(this.managedGeometries[k.id]=k,k.disposeRunner.add(this),k.glVertexArrayObjects[this.CONTEXT_UID]=F={},G=!0);const j=F[B.program.id]||this.initGeometryVao(k,B,G);this._activeGeometry=k,this._activeVao!==j&&(this._activeVao=j,this.hasVao?U.bindVertexArray(j):this.activateVao(k,B.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const k=this._activeGeometry,B=this.renderer.buffer;for(let U=0;U"u"?.5:B,this.isSimple=!1}get texture(){return this._texture}set texture(k){this._texture=k,this._textureID=-1}multiplyUvs(k,B){void 0===B&&(B=k);const U=this.mapCoord;for(let F=0;F0?this.maskStack[this.maskStack.length-1]._colorMask:15;U!==B&&this.renderer.gl.colorMask(0!=(1&U),0!=(2&U),0!=(4&U),0!=(8&U))}destroy(){this.renderer=null}}Qs.extension={type:Je.RendererSystem,name:"mask"},ii.add(Qs);class Xs{constructor(k){this.renderer=k,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(k){const{gl:B}=this.renderer,U=this.getStackLength();this.maskStack=k;const F=this.getStackLength();F!==U&&(0===F?B.disable(this.glConst):(B.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const Zs=new ki,Js=[],tn=class k extends Xs{constructor(k){super(k),this.glConst=at.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const k=this.maskStack[this.maskStack.length-1];return k?k._scissorCounter:0}calcScissorRect(k){if(k._scissorRectLocal)return;const B=k._scissorRect,{maskObject:U}=k,{renderer:F}=this,G=F.renderTexture,j=U.getBounds(!0,Js.pop()??new Pi);this.roundFrameToPixels(j,G.current?G.current.resolution:F.resolution,G.sourceFrame,G.destinationFrame,F.projection.transform),B&&j.fit(B),k._scissorRectLocal=j}static isMatrixRotated(k){if(!k)return!1;const{a:B,b:U,c:F,d:G}=k;return(Math.abs(U)>1e-4||Math.abs(F)>1e-4)&&(Math.abs(B)>1e-4||Math.abs(G)>1e-4)}testScissor(B){const{maskObject:U}=B;if(!U.isFastRect||!U.isFastRect()||k.isMatrixRotated(U.worldTransform)||k.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(B);const F=B._scissorRectLocal;return F.width>0&&F.height>0}roundFrameToPixels(B,U,F,G,j){k.isMatrixRotated(j)||((j=j?Zs.copyFrom(j):Zs.identity()).translate(-F.x,-F.y).scale(G.width/F.width,G.height/F.height).translate(G.x,G.y),this.renderer.filter.transformAABB(j,B),B.fit(G),B.x=Math.round(B.x*U),B.y=Math.round(B.y*U),B.width=Math.round(B.width*U),B.height=Math.round(B.height*U))}push(k){k._scissorRectLocal||this.calcScissorRect(k);const{gl:B}=this.renderer;k._scissorRect||B.enable(B.SCISSOR_TEST),k._scissorCounter++,k._scissorRect=k._scissorRectLocal,this._useCurrent()}pop(k){const{gl:B}=this.renderer;k&&Js.push(k._scissorRectLocal),this.getStackLength()>0?this._useCurrent():B.disable(B.SCISSOR_TEST)}_useCurrent(){const k=this.maskStack[this.maskStack.length-1]._scissorRect;let B;B=this.renderer.renderTexture.current?k.y:this.renderer.height-k.height-k.y,this.renderer.gl.scissor(k.x,B,k.width,k.height)}};tn.extension={type:Je.RendererSystem,name:"scissor"};let en=tn;ii.add(en);class sn extends Xs{constructor(k){super(k),this.glConst=at.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const k=this.maskStack[this.maskStack.length-1];return k?k._stencilCounter:0}push(k){const B=k.maskObject,{gl:U}=this.renderer,F=k._stencilCounter;0===F&&(this.renderer.framebuffer.forceStencil(),U.clearStencil(0),U.clear(U.STENCIL_BUFFER_BIT),U.enable(U.STENCIL_TEST)),k._stencilCounter++;const G=k._colorMask;0!==G&&(k._colorMask=0,U.colorMask(!1,!1,!1,!1)),U.stencilFunc(U.EQUAL,F,4294967295),U.stencilOp(U.KEEP,U.KEEP,U.INCR),B.renderable=!0,B.render(this.renderer),this.renderer.batch.flush(),B.renderable=!1,0!==G&&(k._colorMask=G,U.colorMask(0!=(1&G),0!=(2&G),0!=(4&G),0!=(8&G))),this._useCurrent()}pop(k){const B=this.renderer.gl;if(0===this.getStackLength())B.disable(B.STENCIL_TEST);else{const U=0!==this.maskStack.length?this.maskStack[this.maskStack.length-1]:null,F=U?U._colorMask:15;0!==F&&(U._colorMask=0,B.colorMask(!1,!1,!1,!1)),B.stencilOp(B.KEEP,B.KEEP,B.DECR),k.renderable=!0,k.render(this.renderer),this.renderer.batch.flush(),k.renderable=!1,0!==F&&(U._colorMask=F,B.colorMask(0!=(1&F),0!=(2&F),0!=(4&F),0!=(8&F))),this._useCurrent()}}_useCurrent(){const k=this.renderer.gl;k.stencilFunc(k.EQUAL,this.getStackLength(),4294967295),k.stencilOp(k.KEEP,k.KEEP,k.KEEP)}}sn.extension={type:Je.RendererSystem,name:"stencil"},ii.add(sn);class nn{constructor(k){this.renderer=k,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get:()=>(Rt("7.0.0","renderer.plugins.extract has moved to renderer.extract"),k.extract)},prepare:{enumerable:!1,get:()=>(Rt("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),k.prepare)},interaction:{enumerable:!1,get:()=>(Rt("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),k.events)}})}init(){const k=this.rendererPlugins;for(const B in k)this.plugins[B]=new k[B](this.renderer)}destroy(){for(const k in this.plugins)this.plugins[k].destroy(),this.plugins[k]=null}}nn.extension={type:[Je.RendererSystem,Je.CanvasRendererSystem],name:"_plugin"},ii.add(nn);class an{constructor(k){this.renderer=k,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new ki,this.transform=null}update(k,B,U,F){this.destinationFrame=k||this.destinationFrame||this.defaultFrame,this.sourceFrame=B||this.sourceFrame||k,this.calculateProjection(this.destinationFrame,this.sourceFrame,U,F),this.transform&&this.projectionMatrix.append(this.transform);const G=this.renderer;G.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,G.globalUniforms.update(),G.shader.shader&&G.shader.syncUniformGroup(G.shader.shader.uniforms.globals)}calculateProjection(k,B,U,F){const G=this.projectionMatrix,j=F?-1:1;G.identity(),G.a=1/B.width*2,G.d=j*(1/B.height*2),G.tx=-1-B.x*G.a,G.ty=-j-B.y*G.d}setTransform(k){}destroy(){this.renderer=null}}an.extension={type:Je.RendererSystem,name:"projection"},ii.add(an);const rn=new Ki,on=new Pi;class hn{constructor(k){this.renderer=k,this._tempMatrix=new ki}generateTexture(k,B){const{region:U,...F}=B||{},G=U?.copyTo(on)||k.getLocalBounds(on,!0),j=F.resolution||this.renderer.resolution;G.width=Math.max(G.width,1/j),G.height=Math.max(G.height,1/j),F.width=G.width,F.height=G.height,F.resolution=j,F.multisample??(F.multisample=this.renderer.multisample);const $=Ns.create(F);this._tempMatrix.tx=-G.x,this._tempMatrix.ty=-G.y;const H=k.transform;return k.transform=rn,this.renderer.render(k,{renderTexture:$,transform:this._tempMatrix,skipUpdateTransform:!!k.parent,blit:!0}),k.transform=H,$}destroy(){}}hn.extension={type:[Je.RendererSystem,Je.CanvasRendererSystem],name:"textureGenerator"},ii.add(hn);const cn=new Pi,dn=new Pi;class ln{constructor(k){this.renderer=k,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Pi,this.destinationFrame=new Pi,this.viewportFrame=new Pi}contextChange(){const k=this.renderer?.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(k&&k.alpha&&k.premultipliedAlpha)}bind(k=null,B,U){const F=this.renderer;let G,j,$;this.current=k,k?(G=k.baseTexture,$=G.resolution,B||(cn.width=k.frame.width,cn.height=k.frame.height,B=cn),U||(dn.x=k.frame.x,dn.y=k.frame.y,dn.width=B.width,dn.height=B.height,U=dn),j=G.framebuffer):($=F.resolution,B||(cn.width=F._view.screen.width,cn.height=F._view.screen.height,B=cn),U||((U=cn).width=B.width,U.height=B.height));const H=this.viewportFrame;H.x=U.x*$,H.y=U.y*$,H.width=U.width*$,H.height=U.height*$,k||(H.y=F.view.height-(H.y+H.height)),H.ceil(),this.renderer.framebuffer.bind(j,H),this.renderer.projection.update(U,B,$,!j),k?this.renderer.mask.setMaskStack(G.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(B),this.destinationFrame.copyFrom(U)}clear(k,B){const U=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,F=ve.shared.setValue(k||U);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&F.premultiply(F.alpha);const G=this.destinationFrame,j=this.current?this.current.baseTexture:this.renderer._view.screen,$=G.width!==j.width||G.height!==j.height;if($){let{x:k,y:B,width:U,height:F}=this.viewportFrame;k=Math.round(k),B=Math.round(B),U=Math.round(U),F=Math.round(F),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(k,B,U,F)}this.renderer.framebuffer.clear(F.red,F.green,F.blue,F.alpha,B),$&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}ln.extension={type:Je.RendererSystem,name:"renderTexture"},ii.add(ln);class un{constructor(k,B){this.program=k,this.uniformData=B,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function fn(k,B,U){const F=k.createShader(B);return k.shaderSource(F,U),k.compileShader(F),F}function bn(k){const B=new Array(k);for(let U=0;U`${B}: ${k}`)),F=k.getShaderInfoLog(B),G=F.split("\n"),j={},$=G.map((k=>parseFloat(k.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1")))).filter((k=>!(!k||j[k])&&(j[k]=!0,!0))),H=[""];$.forEach((k=>{U[k-1]=`%c${U[k-1]}%c`,H.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")}));const V=U.join("\n");H[0]=V,console.error(F),console.groupCollapsed("click to view full shader code"),console.warn(...H),console.groupEnd()}function gn(k,B){const U=fn(k,k.VERTEX_SHADER,B.vertexSrc),F=fn(k,k.FRAGMENT_SHADER,B.fragmentSrc),G=k.createProgram();k.attachShader(G,U),k.attachShader(G,F);const j=B.extra?.transformFeedbackVaryings;if(j&&("function"!=typeof k.transformFeedbackVaryings?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):k.transformFeedbackVaryings(G,j.names,"separate"===j.bufferMode?k.SEPARATE_ATTRIBS:k.INTERLEAVED_ATTRIBS)),k.linkProgram(G),k.getProgramParameter(G,k.LINK_STATUS)||function(k,B,U,F){k.getProgramParameter(B,k.LINK_STATUS)||(k.getShaderParameter(U,k.COMPILE_STATUS)||vn(k,U),k.getShaderParameter(F,k.COMPILE_STATUS)||vn(k,F),console.error("PixiJS Error: Could not initialize shader."),""!==k.getProgramInfoLog(B)&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",k.getProgramInfoLog(B)))}(k,G,U,F),B.attributeData=function(k,B){const U={},F=B.getProgramParameter(k,B.ACTIVE_ATTRIBUTES);for(let G=0;Gk>B?1:-1));for(let F=0;Fk.index-B.index)),U}(k.uniforms,B),{uboElements:F,size:G}=function(k){const B=k.map((k=>({data:k,offset:0,dataLen:0,dirty:0})));let U=0,F=0,G=0;for(let j=0;j1&&(U=Math.max(U,16)*k.data.size),k.dataLen=U,F%U!=0&&F<16){const k=F%U%16;F+=k,G+=k}F+U>16?(G=16*Math.ceil(G/16),k.offset=G,G+=U,F=U):(k.offset=G,F+=U,G+=U)}return G=16*Math.ceil(G/16),{uboElements:B,size:G}}(U),j=["\n var v = null;\n var v2 = null;\n var cv = null;\n var t = 0;\n var gl = renderer.gl\n var index = 0;\n var data = buffer.data;\n "];for(let $=0;$1){const k=is(B.data.type),U=Math.max(_n[B.data.type]/16,1),F=k/U,$=(4-F%4)%4;j.push(`\n cv = ud.${G}.value;\n v = uv.${G};\n offset = ${B.offset/4};\n\n t = 0;\n\n for(var i=0; i < ${B.data.size*U}; i++)\n {\n for(var j = 0; j < ${F}; j++)\n {\n data[offset++] = v[t++];\n }\n offset += ${$};\n }\n\n `)}else{const k=yn[B.data.type];j.push(`\n cv = ud.${G}.value;\n v = uv.${G};\n offset = ${B.offset/4};\n ${k};\n `)}}return j.push("\n renderer.buffer.update(buffer);\n "),{size:G,syncFunc:new Function("ud","uv","renderer","syncData","buffer",j.join("\n"))}}let wn;let Tn=0;const Sn={textureCount:0,uboCount:0};class An{constructor(k){this.destroyed=!1,this.renderer=k,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=Tn++}systemCheck(){if(!function(){if("boolean"==typeof wn)return wn;try{wn=!0===new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")}catch{wn=!1}return wn}())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(k){this.gl=k,this.reset()}bind(k,B){k.disposeRunner.add(this),k.uniforms.globals=this.renderer.globalUniforms;const U=k.program,F=U.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(k);return this.shader=k,this.program!==U&&(this.program=U,this.gl.useProgram(F.program)),B||(Sn.textureCount=0,Sn.uboCount=0,this.syncUniformGroup(k.uniformGroup,Sn)),F}setUniforms(k){const B=this.shader.program,U=B.glPrograms[this.renderer.CONTEXT_UID];B.syncUniforms(U.uniformData,k,this.renderer)}syncUniformGroup(k,B){const U=this.getGlProgram();(!k.static||k.dirtyId!==U.uniformDirtyGroups[k.id])&&(U.uniformDirtyGroups[k.id]=k.dirtyId,this.syncUniforms(k,U,B))}syncUniforms(k,B,U){(k.syncUniforms[this.shader.program.id]||this.createSyncGroups(k))(B.uniformData,k.uniforms,this.renderer,U)}createSyncGroups(k){const B=this.getSignature(k,this.shader.program.uniformData,"u");return this.cache[B]||(this.cache[B]=function(k,B){const U=["\n var v = null;\n var cv = null;\n var cu = null;\n var t = 0;\n var gl = renderer.gl;\n "];for(const F in k.uniforms){const G=B[F];if(!G){!0===k.uniforms[F]?.group&&(k.uniforms[F].ubo?U.push(`\n renderer.shader.syncUniformBufferGroup(uv.${F}, '${F}');\n `):U.push(`\n renderer.shader.syncUniformGroup(uv.${F}, syncData);\n `));continue}const j=k.uniforms[F];let $=!1;for(let k=0;k>=1,U++;this.stateId=k.data}for(let B=0;Bk.systems[B])),U=[...B,...Object.keys(k.systems).filter((k=>!B.includes(k)))];for(const F of U)this.addSystem(k.systems[F],F)}addRunners(...k){k.forEach((k=>{this.runners[k]=new ci(k)}))}addSystem(k,B){const U=new k(this);if(this[B])throw new Error(`Whoops! The name "${B}" is already in use`);this[B]=U,this._systemsHash[B]=U;for(const F in this.runners)this.runners[F].add(U);return this}emitWithCustomOptions(k,B){const U=Object.keys(this._systemsHash);k.items.forEach((F=>{const G=U.find((k=>this._systemsHash[k]===F));F[k.name](B[G])}))}destroy(){Object.values(this.runners).forEach((k=>{k.destroy()})),this._systemsHash={}}}const Rn=class k{constructor(B){this.renderer=B,this.count=0,this.checkCount=0,this.maxIdle=k.defaultMaxIdle,this.checkCountMax=k.defaultCheckCountMax,this.mode=k.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==tt.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const k=this.renderer.texture,B=k.managedTextures;let U=!1;for(let F=0;Fthis.maxIdle&&(k.destroyTexture(G,!0),B[F]=null,U=!0)}if(U){let k=0;for(let U=0;U=0;F--)this.unload(k.children[F])}destroy(){this.renderer=null}};Rn.defaultMode=tt.AUTO,Rn.defaultMaxIdle=3600,Rn.defaultCheckCountMax=600,Rn.extension={type:Je.RendererSystem,name:"textureGC"};let Pn=Rn;ii.add(Pn);class Mn{constructor(k){this.texture=k,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=K.UNSIGNED_BYTE,this.internalFormat=W.RGBA,this.samplerType=0}}class Nn{constructor(k){this.renderer=k,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new bi,this.hasIntegerTextures=!1}contextChange(){const k=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=function(k){let B;return B="WebGL2RenderingContext"in globalThis&&k instanceof globalThis.WebGL2RenderingContext?{[K.UNSIGNED_BYTE]:{[W.RGBA]:k.RGBA8,[W.RGB]:k.RGB8,[W.RG]:k.RG8,[W.RED]:k.R8,[W.RGBA_INTEGER]:k.RGBA8UI,[W.RGB_INTEGER]:k.RGB8UI,[W.RG_INTEGER]:k.RG8UI,[W.RED_INTEGER]:k.R8UI,[W.ALPHA]:k.ALPHA,[W.LUMINANCE]:k.LUMINANCE,[W.LUMINANCE_ALPHA]:k.LUMINANCE_ALPHA},[K.BYTE]:{[W.RGBA]:k.RGBA8_SNORM,[W.RGB]:k.RGB8_SNORM,[W.RG]:k.RG8_SNORM,[W.RED]:k.R8_SNORM,[W.RGBA_INTEGER]:k.RGBA8I,[W.RGB_INTEGER]:k.RGB8I,[W.RG_INTEGER]:k.RG8I,[W.RED_INTEGER]:k.R8I},[K.UNSIGNED_SHORT]:{[W.RGBA_INTEGER]:k.RGBA16UI,[W.RGB_INTEGER]:k.RGB16UI,[W.RG_INTEGER]:k.RG16UI,[W.RED_INTEGER]:k.R16UI,[W.DEPTH_COMPONENT]:k.DEPTH_COMPONENT16},[K.SHORT]:{[W.RGBA_INTEGER]:k.RGBA16I,[W.RGB_INTEGER]:k.RGB16I,[W.RG_INTEGER]:k.RG16I,[W.RED_INTEGER]:k.R16I},[K.UNSIGNED_INT]:{[W.RGBA_INTEGER]:k.RGBA32UI,[W.RGB_INTEGER]:k.RGB32UI,[W.RG_INTEGER]:k.RG32UI,[W.RED_INTEGER]:k.R32UI,[W.DEPTH_COMPONENT]:k.DEPTH_COMPONENT24},[K.INT]:{[W.RGBA_INTEGER]:k.RGBA32I,[W.RGB_INTEGER]:k.RGB32I,[W.RG_INTEGER]:k.RG32I,[W.RED_INTEGER]:k.R32I},[K.FLOAT]:{[W.RGBA]:k.RGBA32F,[W.RGB]:k.RGB32F,[W.RG]:k.RG32F,[W.RED]:k.R32F,[W.DEPTH_COMPONENT]:k.DEPTH_COMPONENT32F},[K.HALF_FLOAT]:{[W.RGBA]:k.RGBA16F,[W.RGB]:k.RGB16F,[W.RG]:k.RG16F,[W.RED]:k.R16F},[K.UNSIGNED_SHORT_5_6_5]:{[W.RGB]:k.RGB565},[K.UNSIGNED_SHORT_4_4_4_4]:{[W.RGBA]:k.RGBA4},[K.UNSIGNED_SHORT_5_5_5_1]:{[W.RGBA]:k.RGB5_A1},[K.UNSIGNED_INT_2_10_10_10_REV]:{[W.RGBA]:k.RGB10_A2,[W.RGBA_INTEGER]:k.RGB10_A2UI},[K.UNSIGNED_INT_10F_11F_11F_REV]:{[W.RGB]:k.R11F_G11F_B10F},[K.UNSIGNED_INT_5_9_9_9_REV]:{[W.RGB]:k.RGB9_E5},[K.UNSIGNED_INT_24_8]:{[W.DEPTH_STENCIL]:k.DEPTH24_STENCIL8},[K.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[W.DEPTH_STENCIL]:k.DEPTH32F_STENCIL8}}:{[K.UNSIGNED_BYTE]:{[W.RGBA]:k.RGBA,[W.RGB]:k.RGB,[W.ALPHA]:k.ALPHA,[W.LUMINANCE]:k.LUMINANCE,[W.LUMINANCE_ALPHA]:k.LUMINANCE_ALPHA},[K.UNSIGNED_SHORT_5_6_5]:{[W.RGB]:k.RGB},[K.UNSIGNED_SHORT_4_4_4_4]:{[W.RGBA]:k.RGBA},[K.UNSIGNED_SHORT_5_5_5_1]:{[W.RGBA]:k.RGBA}},B}(k),this.samplerTypes=function(k){let B;return B="WebGL2RenderingContext"in globalThis&&k instanceof globalThis.WebGL2RenderingContext?{[k.RGB]:z.FLOAT,[k.RGBA]:z.FLOAT,[k.ALPHA]:z.FLOAT,[k.LUMINANCE]:z.FLOAT,[k.LUMINANCE_ALPHA]:z.FLOAT,[k.R8]:z.FLOAT,[k.R8_SNORM]:z.FLOAT,[k.RG8]:z.FLOAT,[k.RG8_SNORM]:z.FLOAT,[k.RGB8]:z.FLOAT,[k.RGB8_SNORM]:z.FLOAT,[k.RGB565]:z.FLOAT,[k.RGBA4]:z.FLOAT,[k.RGB5_A1]:z.FLOAT,[k.RGBA8]:z.FLOAT,[k.RGBA8_SNORM]:z.FLOAT,[k.RGB10_A2]:z.FLOAT,[k.RGB10_A2UI]:z.FLOAT,[k.SRGB8]:z.FLOAT,[k.SRGB8_ALPHA8]:z.FLOAT,[k.R16F]:z.FLOAT,[k.RG16F]:z.FLOAT,[k.RGB16F]:z.FLOAT,[k.RGBA16F]:z.FLOAT,[k.R32F]:z.FLOAT,[k.RG32F]:z.FLOAT,[k.RGB32F]:z.FLOAT,[k.RGBA32F]:z.FLOAT,[k.R11F_G11F_B10F]:z.FLOAT,[k.RGB9_E5]:z.FLOAT,[k.R8I]:z.INT,[k.R8UI]:z.UINT,[k.R16I]:z.INT,[k.R16UI]:z.UINT,[k.R32I]:z.INT,[k.R32UI]:z.UINT,[k.RG8I]:z.INT,[k.RG8UI]:z.UINT,[k.RG16I]:z.INT,[k.RG16UI]:z.UINT,[k.RG32I]:z.INT,[k.RG32UI]:z.UINT,[k.RGB8I]:z.INT,[k.RGB8UI]:z.UINT,[k.RGB16I]:z.INT,[k.RGB16UI]:z.UINT,[k.RGB32I]:z.INT,[k.RGB32UI]:z.UINT,[k.RGBA8I]:z.INT,[k.RGBA8UI]:z.UINT,[k.RGBA16I]:z.INT,[k.RGBA16UI]:z.UINT,[k.RGBA32I]:z.INT,[k.RGBA32UI]:z.UINT,[k.DEPTH_COMPONENT16]:z.FLOAT,[k.DEPTH_COMPONENT24]:z.FLOAT,[k.DEPTH_COMPONENT32F]:z.FLOAT,[k.DEPTH_STENCIL]:z.FLOAT,[k.DEPTH24_STENCIL8]:z.FLOAT,[k.DEPTH32F_STENCIL8]:z.FLOAT}:{[k.RGB]:z.FLOAT,[k.RGBA]:z.FLOAT,[k.ALPHA]:z.FLOAT,[k.LUMINANCE]:z.FLOAT,[k.LUMINANCE_ALPHA]:z.FLOAT,[k.DEPTH_STENCIL]:z.FLOAT},B}(k);const B=k.getParameter(k.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=B;for(let F=0;F=0;--G){const k=B[G];k&&k._glTextures[F].samplerType!==z.FLOAT&&this.renderer.texture.unbind(k)}}initTexture(k){const B=new Mn(this.gl.createTexture());return B.dirtyId=-1,k._glTextures[this.CONTEXT_UID]=B,this.managedTextures.push(k),k.on("dispose",this.destroyTexture,this),B}initTextureType(k,B){B.internalFormat=this.internalFormats[k.type]?.[k.format]??k.format,B.samplerType=this.samplerTypes[B.internalFormat]??z.FLOAT,2===this.webGLVersion&&k.type===K.HALF_FLOAT?B.type=this.gl.HALF_FLOAT:B.type=k.type}updateTexture(k){const B=k._glTextures[this.CONTEXT_UID];if(!B)return;const U=this.renderer;if(this.initTextureType(k,B),k.resource?.upload(U,k,B))B.samplerType!==z.FLOAT&&(this.hasIntegerTextures=!0);else{const F=k.realWidth,G=k.realHeight,j=U.gl;(B.width!==F||B.height!==G||B.dirtyId<0)&&(B.width=F,B.height=G,j.texImage2D(k.target,0,B.internalFormat,F,G,0,k.format,B.type,null))}k.dirtyStyleId!==B.dirtyStyleId&&this.updateTextureStyle(k),B.dirtyId=k.dirtyId}destroyTexture(k,B){const{gl:U}=this;if((k=k.castToBaseTexture())._glTextures[this.CONTEXT_UID]&&(this.unbind(k),U.deleteTexture(k._glTextures[this.CONTEXT_UID].texture),k.off("dispose",this.destroyTexture,this),delete k._glTextures[this.CONTEXT_UID],!B)){const B=this.managedTextures.indexOf(k);-1!==B&&xe(this.managedTextures,B,1)}}updateTextureStyle(k){const B=k._glTextures[this.CONTEXT_UID];B&&(k.mipmap!==X.POW2&&2===this.webGLVersion||k.isPowerOfTwo?B.mipmap=k.mipmap>=1:B.mipmap=!1,2===this.webGLVersion||k.isPowerOfTwo?B.wrapMode=k.wrapMode:B.wrapMode=Q.CLAMP,k.resource?.style(this.renderer,k,B)||this.setStyle(k,B),B.dirtyStyleId=k.dirtyStyleId)}setStyle(k,B){const U=this.gl;if(B.mipmap&&k.mipmap!==X.ON_MANUAL&&U.generateMipmap(k.target),U.texParameteri(k.target,U.TEXTURE_WRAP_S,B.wrapMode),U.texParameteri(k.target,U.TEXTURE_WRAP_T,B.wrapMode),B.mipmap){U.texParameteri(k.target,U.TEXTURE_MIN_FILTER,k.scaleMode===Y.LINEAR?U.LINEAR_MIPMAP_LINEAR:U.NEAREST_MIPMAP_NEAREST);const B=this.renderer.context.extensions.anisotropicFiltering;if(B&&k.anisotropicLevel>0&&k.scaleMode===Y.LINEAR){const F=Math.min(k.anisotropicLevel,U.getParameter(B.MAX_TEXTURE_MAX_ANISOTROPY_EXT));U.texParameterf(k.target,B.TEXTURE_MAX_ANISOTROPY_EXT,F)}}else U.texParameteri(k.target,U.TEXTURE_MIN_FILTER,k.scaleMode===Y.LINEAR?U.LINEAR:U.NEAREST);U.texParameteri(k.target,U.TEXTURE_MAG_FILTER,k.scaleMode===Y.LINEAR?U.LINEAR:U.NEAREST)}destroy(){this.renderer=null}}Nn.extension={type:Je.RendererSystem,name:"texture"},ii.add(Nn);class xn{constructor(k){this.renderer=k}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(k){const{gl:B,CONTEXT_UID:U}=this,F=k._glTransformFeedbacks[U]||this.createGLTransformFeedback(k);B.bindTransformFeedback(B.TRANSFORM_FEEDBACK,F)}unbind(){const{gl:k}=this;k.bindTransformFeedback(k.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(k,B){const{gl:U,renderer:F}=this;B&&F.shader.bind(B),U.beginTransformFeedback(k)}endTransformFeedback(){const{gl:k}=this;k.endTransformFeedback()}createGLTransformFeedback(k){const{gl:B,renderer:U,CONTEXT_UID:F}=this,G=B.createTransformFeedback();k._glTransformFeedbacks[F]=G,B.bindTransformFeedback(B.TRANSFORM_FEEDBACK,G);for(let j=0;jbi.defaultOptions.wrapMode,set(k){Rt("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),bi.defaultOptions.wrapMode=k}},SCALE_MODE:{get:()=>bi.defaultOptions.scaleMode,set(k){Rt("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),bi.defaultOptions.scaleMode=k}},MIPMAP_TEXTURES:{get:()=>bi.defaultOptions.mipmap,set(k){Rt("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),bi.defaultOptions.mipmap=k}},ANISOTROPIC_LEVEL:{get:()=>bi.defaultOptions.anisotropicLevel,set(k){Rt("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),bi.defaultOptions.anisotropicLevel=k}},FILTER_RESOLUTION:{get:()=>(Rt("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),_s.defaultResolution),set(k){_s.defaultResolution=k}},FILTER_MULTISAMPLE:{get:()=>(Rt("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),_s.defaultMultisample),set(k){_s.defaultMultisample=k}},SPRITE_MAX_TEXTURES:{get:()=>ms.defaultMaxTextures,set(k){Rt("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),ms.defaultMaxTextures=k}},SPRITE_BATCH_SIZE:{get:()=>ms.defaultBatchSize,set(k){Rt("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),ms.defaultBatchSize=k}},CAN_UPLOAD_SAME_BUFFER:{get:()=>ms.canUploadSameBuffer,set(k){Rt("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),ms.canUploadSameBuffer=k}},GC_MODE:{get:()=>Pn.defaultMode,set(k){Rt("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),Pn.defaultMode=k}},GC_MAX_IDLE:{get:()=>Pn.defaultMaxIdle,set(k){Rt("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),Pn.defaultMaxIdle=k}},GC_MAX_CHECK_COUNT:{get:()=>Pn.defaultCheckCountMax,set(k){Rt("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),Pn.defaultCheckCountMax=k}},PRECISION_VERTEX:{get:()=>ds.defaultVertexPrecision,set(k){Rt("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),ds.defaultVertexPrecision=k}},PRECISION_FRAGMENT:{get:()=>ds.defaultFragmentPrecision,set(k){Rt("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),ds.defaultFragmentPrecision=k}}});var kn=(k=>(k[k.INTERACTION=50]="INTERACTION",k[k.HIGH=25]="HIGH",k[k.NORMAL=0]="NORMAL",k[k.LOW=-25]="LOW",k[k.UTILITY=-50]="UTILITY",k))(kn||{});class Bn{constructor(k,B=null,U=0,F=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=k,this.context=B,this.priority=U,this.once=F}match(k,B=null){return this.fn===k&&this.context===B}emit(k){this.fn&&(this.context?this.fn.call(this.context,k):this.fn(k));const B=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),B}connect(k){this.previous=k,k.next&&(k.next.previous=this),this.next=k.next,k.next=this}destroy(k=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const B=this.next;return this.next=k?null:B,this.previous=null,B}}const Un=class k{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new Bn(null,null,1/0),this.deltaMS=1/k.targetFPMS,this.elapsedMS=1/k.targetFPMS,this._tick=k=>{this._requestId=null,this.started&&(this.update(k),this.started&&null===this._requestId&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(k,B,U=kn.NORMAL){return this._addListener(new Bn(k,B,U))}addOnce(k,B,U=kn.NORMAL){return this._addListener(new Bn(k,B,U,!0))}_addListener(k){let B=this._head.next,U=this._head;if(B){for(;B;){if(k.priority>B.priority){k.connect(U);break}U=B,B=B.next}k.previous||k.connect(U)}else k.connect(U);return this._startIfPossible(),this}remove(k,B){let U=this._head.next;for(;U;)U=U.match(k,B)?U.destroy():U.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let k=0,B=this._head;for(;B=B.next;)k++;return k}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let k=this._head.next;for(;k;)k=k.destroy(!0);this._head.destroy(),this._head=null}}update(B=performance.now()){let U;if(B>this.lastTime){if(U=this.elapsedMS=B-this.lastTime,U>this._maxElapsedMS&&(U=this._maxElapsedMS),U*=this.speed,this._minElapsedMS){const k=B-this._lastFrame|0;if(kFn.targetFPMS,set(k){Rt("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),Fn.targetFPMS=k}}});class Gn{static init(k){k=Object.assign({autoStart:!0,sharedTicker:!1},k),Object.defineProperty(this,"ticker",{set(k){this._ticker&&this._ticker.remove(this.render,this),this._ticker=k,k&&k.add(this.render,this,kn.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=k.sharedTicker?Fn.shared:new Fn,k.autoStart&&this.start()}static destroy(){if(this._ticker){const k=this._ticker;this.ticker=null,k.destroy()}}}Gn.extension=Je.Application,ii.add(Gn);const jn=[];ii.handleByList(Je.Renderer,jn);const $n="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",Hn="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n";class Vn{constructor(k){this.renderer=k}contextChange(k){let B;if(1===this.renderer.context.webGLVersion){const U=k.getParameter(k.FRAMEBUFFER_BINDING);k.bindFramebuffer(k.FRAMEBUFFER,null),B=k.getParameter(k.SAMPLES),k.bindFramebuffer(k.FRAMEBUFFER,U)}else{const U=k.getParameter(k.DRAW_FRAMEBUFFER_BINDING);k.bindFramebuffer(k.DRAW_FRAMEBUFFER,null),B=k.getParameter(k.SAMPLES),k.bindFramebuffer(k.DRAW_FRAMEBUFFER,U)}B>=st.HIGH?this.multisample=st.HIGH:B>=st.MEDIUM?this.multisample=st.MEDIUM:B>=st.LOW?this.multisample=st.LOW:this.multisample=st.NONE}destroy(){}}Vn.extension={type:Je.RendererSystem,name:"_multisample"},ii.add(Vn);class Wn{constructor(k){this.buffer=k||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class qn{constructor(k){this.renderer=k,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(k){const{gl:B,CONTEXT_UID:U}=this,F=k._glBuffers[U]||this.createGLBuffer(k);B.bindBuffer(k.type,F.buffer)}unbind(k){const{gl:B}=this;B.bindBuffer(k,null)}bindBufferBase(k,B){const{gl:U,CONTEXT_UID:F}=this;if(this.boundBufferBases[B]!==k){const G=k._glBuffers[F]||this.createGLBuffer(k);this.boundBufferBases[B]=k,U.bindBufferBase(U.UNIFORM_BUFFER,B,G.buffer)}}bindBufferRange(k,B,U){const{gl:F,CONTEXT_UID:G}=this;U=U||0;const j=k._glBuffers[G]||this.createGLBuffer(k);F.bindBufferRange(F.UNIFORM_BUFFER,B||0,j.buffer,256*U,256)}update(k){const{gl:B,CONTEXT_UID:U}=this,F=k._glBuffers[U]||this.createGLBuffer(k);if(k._updateID!==F.updateID)if(F.updateID=k._updateID,B.bindBuffer(k.type,F.buffer),F.byteLength>=k.data.byteLength)B.bufferSubData(k.type,0,k.data);else{const U=k.static?B.STATIC_DRAW:B.DYNAMIC_DRAW;F.byteLength=k.data.byteLength,B.bufferData(k.type,k.data,U)}}dispose(k,B){if(!this.managedBuffers[k.id])return;delete this.managedBuffers[k.id];const U=k._glBuffers[this.CONTEXT_UID],F=this.gl;k.disposeRunner.remove(this),U&&(B||F.deleteBuffer(U.buffer),delete k._glBuffers[this.CONTEXT_UID])}disposeAll(k){const B=Object.keys(this.managedBuffers);for(let U=0;Uk.resource)).filter((k=>k)).map((k=>k.load()));return this._load=Promise.all(k).then((()=>{const{realWidth:k,realHeight:B}=this.items[0];return this.resize(k,B),this.update(),Promise.resolve(this)})),this._load}}const Xn=class k extends Qn{constructor(B,U){const{width:F,height:G,autoLoad:j,linkBaseTexture:$}=U||{};if(B&&B.length!==k.SIDES)throw new Error(`Invalid length. Got ${B.length}, expected 6`);super(6,{width:F,height:G});for(let H=0;H0){if(!k.resource)throw new Error("CubeResource does not support copying of renderTexture.");this.addResourceAt(k.resource,B)}else k.target=q.TEXTURE_CUBE_MAP_POSITIVE_X+B,k.parentTextureArray=this.baseTexture,this.items[B]=k;return k.valid&&!this.valid&&this.resize(k.realWidth,k.realHeight),this.items[B]=k,this}upload(B,U,F){const G=this.itemDirtyIds;for(let j=0;j{if(null!==this.url)try{const B=await at.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const U=await B.blob();if(this.destroyed)return;const F=await createImageBitmap(U,{premultiplyAlpha:null===this.alphaMode||this.alphaMode===Z.UNPACK?"premultiply":"none"});if(this.destroyed)return void F.close();this.source=F,this.update(),k(this)}catch(Vt){if(this.destroyed)return;B(Vt),this.onError.emit(Vt)}else k(this)}))),this._load}upload(k,B,U){return this.source instanceof ImageBitmap?("number"==typeof this.alphaMode&&(B.alphaMode=this.alphaMode),super.upload(k,B,U)):(this.load(),!1)}dispose(){this.ownsImageBitmap&&this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(k){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&("string"==typeof k||k instanceof ImageBitmap)}static get EMPTY(){return Jn._EMPTY=Jn._EMPTY??at.ADAPTER.createCanvas(0,0),Jn._EMPTY}}const ta=class k extends Os{constructor(k,B){B=B||{},super(at.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=k,this.scale=B.scale||1,this._overrideWidth=B.width,this._overrideHeight=B.height,this._resolve=null,this._crossorigin=B.crossorigin,this._load=null,!1!==B.autoLoad&&this.load()}load(){return this._load||(this._load=new Promise((B=>{if(this._resolve=()=>{this.update(),B(this)},k.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}))),this._load}_loadSvg(){const k=new Image;Os.crossOrigin(k,this.svg,this._crossorigin),k.src=this.svg,k.onerror=B=>{this._resolve&&(k.onerror=null,this.onError.emit(B))},k.onload=()=>{if(!this._resolve)return;const B=k.width,U=k.height;if(!B||!U)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let F=B*this.scale,G=U*this.scale;(this._overrideWidth||this._overrideHeight)&&(F=this._overrideWidth||this._overrideHeight/U*B,G=this._overrideHeight||this._overrideWidth/B*U),F=Math.round(F),G=Math.round(G);const j=this.source;j.width=F,j.height=G,j._pixiId=`canvas_${Be()}`,j.getContext("2d").drawImage(k,0,0,B,U,0,0,F,G),this._resolve(),this._resolve=null}}static getSize(B){const U=k.SVG_SIZE.exec(B),F={};return U&&(F[U[1]]=Math.round(parseFloat(U[3])),F[U[5]]=Math.round(parseFloat(U[7]))),F}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(B,U){return"svg"===U||"string"==typeof B&&B.startsWith("data:image/svg+xml")||"string"==typeof B&&k.SVG_XML.test(B)}};ta.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;let ea=ta;const ia=class k extends Os{constructor(B,U){if(U=U||{},!(B instanceof HTMLVideoElement)){const F=document.createElement("video");!1!==U.autoLoad&&F.setAttribute("preload","auto"),!1!==U.playsinline&&(F.setAttribute("webkit-playsinline",""),F.setAttribute("playsinline","")),!0===U.muted&&(F.setAttribute("muted",""),F.muted=!0),!0===U.loop&&F.setAttribute("loop",""),!1!==U.autoPlay&&F.setAttribute("autoplay",""),"string"==typeof B&&(B=[B]);const G=B[0].src||B[0];Os.crossOrigin(F,G,U.crossorigin);for(let U=0;U{this.valid?B(this):(this._resolve=B,this._reject=U,k.load())})),this._load}_onError(k){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(k),this._reject&&(this._reject(k),this._reject=null,this._resolve=null)}_isSourcePlaying(){const k=this.source;return!k.paused&&!k.ended}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0)}_onCanPlay(){const k=this.source;k.removeEventListener("canplay",this._onCanPlay),k.removeEventListener("canplaythrough",this._onCanPlay);const B=this.valid;this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0,!B&&this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&k.play()}dispose(){this._configureAutoUpdate();const k=this.source;k&&(k.removeEventListener("play",this._onPlayStart),k.removeEventListener("pause",this._onPlayStop),k.removeEventListener("seeked",this._onSeeked),k.removeEventListener("canplay",this._onCanPlay),k.removeEventListener("canplaythrough",this._onCanPlay),k.removeEventListener("error",this._onError,!0),k.pause(),k.src="",k.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(k){k!==this._autoUpdate&&(this._autoUpdate=k,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(k){k!==this._updateFPS&&(this._updateFPS=k,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.source.requestVideoFrameCallback?(this._isConnectedToTicker&&(Fn.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),null===this._videoFrameRequestCallbackHandle&&(this._videoFrameRequestCallbackHandle=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback))):(null!==this._videoFrameRequestCallbackHandle&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(Fn.shared.add(this.update,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(null!==this._videoFrameRequestCallbackHandle&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Fn.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(B,U){return globalThis.HTMLVideoElement&&B instanceof HTMLVideoElement||k.TYPES.includes(U)}};ia.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],ia.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let sa=ia;oi.push(Jn,Is,class extends Os{constructor(k){super(k)}static test(k){const{OffscreenCanvas:B}=globalThis;return!!(B&&k instanceof B)||globalThis.HTMLCanvasElement&&k instanceof HTMLCanvasElement}},sa,class extends Os{constructor(k){super(k)}static test(k){return!!globalThis.VideoFrame&&k instanceof globalThis.VideoFrame}},ea,li,Zn,class extends Qn{constructor(k,B){const{width:U,height:F}=B||{};let G,j;Array.isArray(k)?(G=k,j=k.length):j=k,super(j,{width:U,height:F}),G&&this.initFromArray(G,B)}addBaseTextureAt(k,B){if(!k.resource)throw new Error("ArrayResource does not support RenderTexture");return this.addResourceAt(k.resource,B),this}bind(k){super.bind(k),k.target=q.TEXTURE_2D_ARRAY}upload(k,B,U){const{length:F,itemDirtyIds:G,items:j}=this,{gl:$}=k;U.dirtyId<0&&$.texImage3D($.TEXTURE_2D_ARRAY,0,U.internalFormat,this._width,this._height,F,0,B.format,U.type,null);for(let H=0;H{"use strict";U.d(B,{cz:()=>G,mc:()=>q,q9:()=>j});var F=U(22478);class G{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(k){return this.minX>this.maxX||this.minY>this.maxY?F.M_.EMPTY:((k=k||new F.M_(0,0,1,1)).x=this.minX,k.y=this.minY,k.width=this.maxX-this.minX,k.height=this.maxY-this.minY,k)}addPoint(k){this.minX=Math.min(this.minX,k.x),this.maxX=Math.max(this.maxX,k.x),this.minY=Math.min(this.minY,k.y),this.maxY=Math.max(this.maxY,k.y)}addPointMatrix(k,B){const{a:U,b:F,c:G,d:j,tx:$,ty:H}=k,V=U*B.x+G*B.y+$,W=F*B.x+j*B.y+H;this.minX=Math.min(this.minX,V),this.maxX=Math.max(this.maxX,V),this.minY=Math.min(this.minY,W),this.maxY=Math.max(this.maxY,W)}addQuad(k){let B=this.minX,U=this.minY,F=this.maxX,G=this.maxY,j=k[0],$=k[1];B=jF?j:F,G=$>G?$:G,j=k[2],$=k[3],B=jF?j:F,G=$>G?$:G,j=k[4],$=k[5],B=jF?j:F,G=$>G?$:G,j=k[6],$=k[7],B=jF?j:F,G=$>G?$:G,this.minX=B,this.minY=U,this.maxX=F,this.maxY=G}addFrame(k,B,U,F,G){this.addFrameMatrix(k.worldTransform,B,U,F,G)}addFrameMatrix(k,B,U,F,G){const j=k.a,$=k.b,H=k.c,V=k.d,W=k.tx,q=k.ty;let K=this.minX,z=this.minY,Y=this.maxX,Q=this.maxY,X=j*B+H*U+W,Z=$*B+V*U+q;K=XY?X:Y,Q=Z>Q?Z:Q,X=j*F+H*U+W,Z=$*F+V*U+q,K=XY?X:Y,Q=Z>Q?Z:Q,X=j*B+H*G+W,Z=$*B+V*G+q,K=XY?X:Y,Q=Z>Q?Z:Q,X=j*F+H*G+W,Z=$*F+V*G+q,K=XY?X:Y,Q=Z>Q?Z:Q,this.minX=K,this.minY=z,this.maxX=Y,this.maxY=Q}addVertexData(k,B,U){let F=this.minX,G=this.minY,j=this.maxX,$=this.maxY;for(let H=B;Hj?B:j,$=U>$?U:$}this.minX=F,this.minY=G,this.maxX=j,this.maxY=$}addVertices(k,B,U,F){this.addVerticesMatrix(k.worldTransform,B,U,F)}addVerticesMatrix(k,B,U,F,G=0,j=G){const $=k.a,H=k.b,V=k.c,W=k.d,q=k.tx,K=k.ty;let z=this.minX,Y=this.minY,Q=this.maxX,X=this.maxY;for(let Z=U;ZF?k.maxX:F,this.maxY=k.maxY>G?k.maxY:G}addBoundsMask(k,B){const U=k.minX>B.minX?k.minX:B.minX,F=k.minY>B.minY?k.minY:B.minY,G=k.maxX$?G:$,this.maxY=j>H?j:H}}addBoundsMatrix(k,B){this.addFrameMatrix(B,k.minX,k.minY,k.maxX,k.maxY)}addBoundsArea(k,B){const U=k.minX>B.x?k.minX:B.x,F=k.minY>B.y?k.minY:B.y,G=k.maxX$?G:$,this.maxY=j>H?j:H}}pad(k=0,B=k){this.isEmpty()||(this.minX-=k,this.maxX+=k,this.minY-=B,this.maxY+=B)}addFramePad(k,B,U,F,G,j){k-=G,B-=j,U+=G,F+=j,this.minX=this.minXU?this.maxX:U,this.minY=this.minYF?this.maxY:F}}class j extends F.Wp.EventEmitter{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new F.dL,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new G,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(k){const B=Object.keys(k);for(let U=0;U1)for(let B=0;Bthis.children.length)throw new Error(`${k}addChildAt: The index ${B} supplied is out of bounds ${this.children.length}`);return k.parent&&k.parent.removeChild(k),k.parent=this,this.sortDirty=!0,k.transform._parentID=-1,this.children.splice(B,0,k),this._boundsID++,this.onChildrenChange(B),k.emit("added",this),this.emit("childAdded",k,this,B),k}swapChildren(k,B){if(k===B)return;const U=this.getChildIndex(k),F=this.getChildIndex(B);this.children[U]=B,this.children[F]=k,this.onChildrenChange(U=this.children.length)throw new Error(`The index ${B} supplied is out of bounds ${this.children.length}`);const U=this.getChildIndex(k);F.Wp.removeItems(this.children,U,1),this.children.splice(B,0,k),this.onChildrenChange(B)}getChildAt(k){if(k<0||k>=this.children.length)throw new Error(`getChildAt: Index (${k}) does not exist.`);return this.children[k]}removeChild(...k){if(k.length>1)for(let B=0;B0&&F<=B){G=this.children.splice(U,F);for(let k=0;k1&&this.children.sort(V),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let k=0,B=this.children.length;k0&&U.height>0))return;let F,G;this.cullArea?(F=this.cullArea,G=this.worldTransform):this._render!==k.prototype._render&&(F=this.getBounds(!0));const j=B.projection.transform;if(j&&(G?(G=H.copyFrom(G),G.prepend(j)):G=j),F&&U.intersects(F,G))this._render(B);else if(this.cullArea)return;for(let k=0,$=this.children.length;k<$;++k){const U=this.children[k],F=U.cullable;U.cullable=F||!this.cullArea,U.render(B),U.cullable=F}}render(k){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this.filters?.length)this.renderAdvanced(k);else if(this.cullable)this._renderWithCulling(k);else{this._render(k);for(let B=0,U=this.children.length;Bq.defaultSortableChildren,set(k){F.Wp.deprecation("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),q.defaultSortableChildren=k}}})},20136:(k,B,U)=>{"use strict";U.d(B,{Z:()=>G});var F=U(22478);class G extends F.dJ{constructor(k=1){super(F.MT,"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n",{uAlpha:1}),this.alpha=k}get alpha(){return this.uniforms.uAlpha}set alpha(k){this.uniforms.uAlpha=k}}},58268:(k,B,U)=>{"use strict";U.d(B,{N:()=>G});var F=U(22478);class G extends F.dJ{constructor(){const k={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};super(F.Eo,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n if (uAlpha == 0.0) {\n gl_FragColor = c;\n return;\n }\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (c.a > 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n",k),this.alpha=1}_loadMatrix(k,B=!1){let U=k;B&&(this._multiply(U,this.uniforms.m,k),U=this._colorMatrix(U)),this.uniforms.m=U}_multiply(k,B,U){return k[0]=B[0]*U[0]+B[1]*U[5]+B[2]*U[10]+B[3]*U[15],k[1]=B[0]*U[1]+B[1]*U[6]+B[2]*U[11]+B[3]*U[16],k[2]=B[0]*U[2]+B[1]*U[7]+B[2]*U[12]+B[3]*U[17],k[3]=B[0]*U[3]+B[1]*U[8]+B[2]*U[13]+B[3]*U[18],k[4]=B[0]*U[4]+B[1]*U[9]+B[2]*U[14]+B[3]*U[19]+B[4],k[5]=B[5]*U[0]+B[6]*U[5]+B[7]*U[10]+B[8]*U[15],k[6]=B[5]*U[1]+B[6]*U[6]+B[7]*U[11]+B[8]*U[16],k[7]=B[5]*U[2]+B[6]*U[7]+B[7]*U[12]+B[8]*U[17],k[8]=B[5]*U[3]+B[6]*U[8]+B[7]*U[13]+B[8]*U[18],k[9]=B[5]*U[4]+B[6]*U[9]+B[7]*U[14]+B[8]*U[19]+B[9],k[10]=B[10]*U[0]+B[11]*U[5]+B[12]*U[10]+B[13]*U[15],k[11]=B[10]*U[1]+B[11]*U[6]+B[12]*U[11]+B[13]*U[16],k[12]=B[10]*U[2]+B[11]*U[7]+B[12]*U[12]+B[13]*U[17],k[13]=B[10]*U[3]+B[11]*U[8]+B[12]*U[13]+B[13]*U[18],k[14]=B[10]*U[4]+B[11]*U[9]+B[12]*U[14]+B[13]*U[19]+B[14],k[15]=B[15]*U[0]+B[16]*U[5]+B[17]*U[10]+B[18]*U[15],k[16]=B[15]*U[1]+B[16]*U[6]+B[17]*U[11]+B[18]*U[16],k[17]=B[15]*U[2]+B[16]*U[7]+B[17]*U[12]+B[18]*U[17],k[18]=B[15]*U[3]+B[16]*U[8]+B[17]*U[13]+B[18]*U[18],k[19]=B[15]*U[4]+B[16]*U[9]+B[17]*U[14]+B[18]*U[19]+B[19],k}_colorMatrix(k){const B=new Float32Array(k);return B[4]/=255,B[9]/=255,B[14]/=255,B[19]/=255,B}brightness(k,B){const U=[k,0,0,0,0,0,k,0,0,0,0,0,k,0,0,0,0,0,1,0];this._loadMatrix(U,B)}tint(k,B){const[U,G,j]=F.Q1.shared.setValue(k).toArray(),$=[U,0,0,0,0,0,G,0,0,0,0,0,j,0,0,0,0,0,1,0];this._loadMatrix($,B)}greyscale(k,B){const U=[k,k,k,0,0,k,k,k,0,0,k,k,k,0,0,0,0,0,1,0];this._loadMatrix(U,B)}blackAndWhite(k){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],k)}hue(k,B){k=(k||0)/180*Math.PI;const U=Math.cos(k),F=Math.sin(k),G=1/3,j=(0,Math.sqrt)(G),$=[U+(1-U)*G,G*(1-U)-j*F,G*(1-U)+j*F,0,0,G*(1-U)+j*F,U+G*(1-U),G*(1-U)-j*F,0,0,G*(1-U)-j*F,G*(1-U)+j*F,U+G*(1-U),0,0,0,0,0,1,0];this._loadMatrix($,B)}contrast(k,B){const U=(k||0)+1,F=-.5*(U-1),G=[U,0,0,0,F,0,U,0,0,F,0,0,U,0,F,0,0,0,1,0];this._loadMatrix(G,B)}saturate(k=0,B){const U=2*k/3+1,F=-.5*(U-1),G=[U,F,F,0,0,F,U,F,0,0,F,F,U,0,0,0,0,0,1,0];this._loadMatrix(G,B)}desaturate(){this.saturate(-1)}negative(k){this._loadMatrix([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],k)}sepia(k){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],k)}technicolor(k){this._loadMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],k)}polaroid(k){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],k)}toBGR(k){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],k)}kodachrome(k){this._loadMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],k)}browni(k){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],k)}vintage(k){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],k)}colorTone(k,B,U,G,j){k=k||.2,B=B||.15,U=U||16770432,G=G||3375104;const $=F.Q1.shared,[H,V,W]=$.setValue(U).toArray(),[q,K,z]=$.setValue(G).toArray(),Y=[.3,.59,.11,0,0,H,V,W,k,0,q,K,z,B,0,H-q,V-K,W-z,0,0];this._loadMatrix(Y,j)}night(k,B){const U=[-2*(k=k||.1),-k,0,0,0,-k,0,k,0,0,0,k,2*k,0,0,0,0,0,1,0];this._loadMatrix(U,B)}predator(k,B){const U=[11.224130630493164*k,-4.794486999511719*k,-2.8746118545532227*k,0*k,.40342438220977783*k,-3.6330697536468506*k,9.193157196044922*k,-2.951810836791992*k,0*k,-1.316135048866272*k,-3.2184197902679443*k,-4.2375030517578125*k,7.476448059082031*k,0*k,.8044459223747253*k,0,0,0,1,0];this._loadMatrix(U,B)}lsd(k){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],k)}reset(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)}get matrix(){return this.uniforms.m}set matrix(k){this.uniforms.m=k}get alpha(){return this.uniforms.uAlpha}set alpha(k){this.uniforms.uAlpha=k}}G.prototype.grayscale=G.prototype.greyscale},37692:(k,B,U)=>{"use strict";U.d(B,{N:()=>j});var F=U(22478),G="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float epsilon;\n\nconst int MAX_COLORS = %maxColors%;\n\nuniform vec3 originalColors[MAX_COLORS];\nuniform vec3 targetColors[MAX_COLORS];\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n\n float alpha = gl_FragColor.a;\n if (alpha < 0.0001)\n {\n return;\n }\n\n vec3 color = gl_FragColor.rgb / alpha;\n\n for(int i = 0; i < MAX_COLORS; i++)\n {\n vec3 origColor = originalColors[i];\n if (origColor.r < 0.0)\n {\n break;\n }\n vec3 colorDiff = origColor - color;\n if (length(colorDiff) < epsilon)\n {\n vec3 targetColor = targetColors[i];\n gl_FragColor = vec4((targetColor + colorDiff) * alpha, alpha);\n return;\n }\n }\n}\n";class j extends F.dJ{constructor(k,B=.05,U=k.length){super("attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",G.replace(/%maxColors%/g,U.toFixed(0))),this._replacements=[],this._maxColors=0,this.epsilon=B,this._maxColors=U,this.uniforms.originalColors=new Float32Array(3*U),this.uniforms.targetColors=new Float32Array(3*U),this.replacements=k}set replacements(k){const B=this.uniforms.originalColors,U=this.uniforms.targetColors,G=k.length;if(G>this._maxColors)throw new Error(`Length of replacements (${G}) exceeds the maximum colors length (${this._maxColors})`);B[3*G]=-1;for(let j=0;j{"use strict";let F;function G(){return F}U.d(B,{AB:()=>nt,s3:()=>re,kx:()=>ae});var j=U(22478);let $=0;const H=class extends j.Wp.EventEmitter{constructor(k){super(),this.id=$++,this.init(k)}set(k,B){if(void 0===this[k])throw new Error(`Property with name ${k} does not exist.`);switch(k){case"speed":this.speed=B;break;case"volume":this.volume=B;break;case"paused":this.paused=B;break;case"loop":this.loop=B;break;case"muted":this.muted=B}return this}get progress(){const{currentTime:k}=this._source;return k/this._duration}get paused(){return this._paused}set paused(k){this._paused=k,this.refreshPaused()}_onPlay(){this._playing=!0}_onPause(){this._playing=!1}init(k){this._playing=!1,this._duration=k.source.duration;const B=this._source=k.source.cloneNode(!1);B.src=k.parent.url,B.onplay=this._onPlay.bind(this),B.onpause=this._onPause.bind(this),k.context.on("refresh",this.refresh,this),k.context.on("refreshPaused",this.refreshPaused,this),this._media=k}_internalStop(){this._source&&this._playing&&(this._source.onended=null,this._source.pause())}stop(){this._internalStop(),this._source&&this.emit("stop")}get speed(){return this._speed}set speed(k){this._speed=k,this.refresh()}get volume(){return this._volume}set volume(k){this._volume=k,this.refresh()}get loop(){return this._loop}set loop(k){this._loop=k,this.refresh()}get muted(){return this._muted}set muted(k){this._muted=k,this.refresh()}get filters(){return console.warn("HTML Audio does not support filters"),null}set filters(k){console.warn("HTML Audio does not support filters")}refresh(){const k=this._media.context,B=this._media.parent;this._source.loop=this._loop||B.loop;const U=k.volume*(k.muted?0:1),F=B.volume*(B.muted?0:1),G=this._volume*(this._muted?0:1);this._source.volume=G*U*F,this._source.playbackRate=this._speed*k.speed*B.speed}refreshPaused(){const k=this._media.context,B=this._media.parent,U=this._paused||B.paused||k.paused;U!==this._pausedReal&&(this._pausedReal=U,U?(this._internalStop(),this.emit("paused")):(this.emit("resumed"),this.play({start:this._source.currentTime,end:this._end,volume:this._volume,speed:this._speed,loop:this._loop})),this.emit("pause",U))}play(k){const{start:B,end:U,speed:F,loop:G,volume:$,muted:V}=k;U&&console.assert(U>B,"End time is before start time"),this._speed=F,this._volume=$,this._loop=!!G,this._muted=V,this.refresh(),this.loop&&null!==U&&(console.warn('Looping not support when specifying an "end" time'),this.loop=!1),this._start=B,this._end=U||this._duration,this._start=Math.max(0,this._start-H.PADDING),this._end=Math.min(this._end+H.PADDING,this._duration),this._source.onloadedmetadata=()=>{this._source&&(this._source.currentTime=B,this._source.onloadedmetadata=null,this.emit("progress",B,this._duration),j.Rv.shared.add(this._onUpdate,this))},this._source.onended=this._onComplete.bind(this),this._source.play(),this.emit("start")}_onUpdate(){this.emit("progress",this.progress,this._duration),this._source.currentTime>=this._end&&!this._source.loop&&this._onComplete()}_onComplete(){j.Rv.shared.remove(this._onUpdate,this),this._internalStop(),this.emit("progress",1,this._duration),this.emit("end",this)}destroy(){j.Rv.shared.remove(this._onUpdate,this),this.removeAllListeners();const k=this._source;k&&(k.onended=null,k.onplay=null,k.onpause=null,this._internalStop()),this._source=null,this._speed=1,this._volume=1,this._loop=!1,this._end=null,this._start=0,this._duration=0,this._playing=!1,this._pausedReal=!1,this._paused=!1,this._muted=!1,this._media&&(this._media.context.off("refresh",this.refresh,this),this._media.context.off("refreshPaused",this.refreshPaused,this),this._media=null)}toString(){return`[HTMLAudioInstance id=${this.id}]`}};let V=H;V.PADDING=.1;class W extends j.Wp.EventEmitter{init(k){this.parent=k,this._source=k.options.source||new Audio,k.url&&(this._source.src=k.url)}create(){return new V(this)}get isPlayable(){return!!this._source&&4===this._source.readyState}get duration(){return this._source.duration}get context(){return this.parent.context}get filters(){return null}set filters(k){console.warn("HTML Audio does not support filters")}destroy(){this.removeAllListeners(),this.parent=null,this._source&&(this._source.src="",this._source.load(),this._source=null)}get source(){return this._source}load(k){const B=this._source,U=this.parent;if(4===B.readyState){U.isLoaded=!0;const B=U.autoPlayStart();return void(k&&setTimeout((()=>{k(null,U,B)}),0))}if(!U.url)return void k(new Error("sound.url or sound.source must be set"));B.src=U.url;const F=()=>{$(),U.isLoaded=!0;const B=U.autoPlayStart();k&&k(null,U,B)},G=()=>{$(),k&&k(new Error("Sound loading has been aborted"))},j=()=>{$();const U=`Failed to load audio element (code: ${B.error.code})`;k?k(new Error(U)):console.error(U)},$=()=>{B.removeEventListener("canplaythrough",F),B.removeEventListener("load",F),B.removeEventListener("abort",G),B.removeEventListener("error",j)};B.addEventListener("canplaythrough",F,!1),B.addEventListener("load",F,!1),B.addEventListener("abort",G,!1),B.addEventListener("error",j,!1),B.load()}}class q{constructor(k,B){this.parent=k,Object.assign(this,B),this.duration=this.end-this.start,console.assert(this.duration>0,"End time must be after start time")}play(k){return this.parent.play({complete:k,speed:this.speed||this.parent.speed,end:this.end,start:this.start,loop:this.loop})}destroy(){this.parent=null}}const K=["ogg","oga","opus","m4a","mp3","mpeg","wav","aiff","wma","mid","caf"],z=["audio/mpeg","audio/ogg"],Y={};!function(k){const B={m4a:"audio/mp4",oga:"audio/ogg",opus:'audio/ogg; codecs="opus"',caf:'audio/x-caf; codecs="opus"',...k||{}},U=document.createElement("audio"),F={},G=/^no$/;K.forEach((k=>{const j=U.canPlayType(`audio/${k}`).replace(G,""),$=B[k]?U.canPlayType(B[k]).replace(G,""):"";F[k]=!!j||!!$})),Object.assign(Y,F)}();class Q{static setParamValue(k,B){if(k.setValueAtTime){const U=G().context;k.setValueAtTime(B,U.audioContext.currentTime)}else k.value=B;return B}}let X=0;class Z extends j.Wp.EventEmitter{constructor(k){super(),this.id=X++,this._media=null,this._paused=!1,this._muted=!1,this._elapsed=0,this.init(k)}set(k,B){if(void 0===this[k])throw new Error(`Property with name ${k} does not exist.`);switch(k){case"speed":this.speed=B;break;case"volume":this.volume=B;break;case"muted":this.muted=B;break;case"loop":this.loop=B;break;case"paused":this.paused=B}return this}stop(){this._source&&(this._internalStop(),this.emit("stop"))}get speed(){return this._speed}set speed(k){this._speed=k,this.refresh(),this._update(!0)}get volume(){return this._volume}set volume(k){this._volume=k,this.refresh()}get muted(){return this._muted}set muted(k){this._muted=k,this.refresh()}get loop(){return this._loop}set loop(k){this._loop=k,this.refresh()}get filters(){return this._filters}set filters(k){this._filters&&(this._filters?.filter((k=>k)).forEach((k=>k.disconnect())),this._filters=null,this._source.connect(this._gain)),this._filters=k?.length?k.slice(0):null,this.refresh()}refresh(){if(!this._source)return;const k=this._media.context,B=this._media.parent;this._source.loop=this._loop||B.loop;const U=k.volume*(k.muted?0:1),F=B.volume*(B.muted?0:1),G=this._volume*(this._muted?0:1);Q.setParamValue(this._gain.gain,G*F*U),Q.setParamValue(this._source.playbackRate,this._speed*B.speed*k.speed),this.applyFilters()}applyFilters(){if(this._filters?.length){this._source.disconnect();let k=this._source;this._filters.forEach((B=>{k.connect(B.destination),k=B})),k.connect(this._gain)}}refreshPaused(){const k=this._media.context,B=this._media.parent,U=this._paused||B.paused||k.paused;U!==this._pausedReal&&(this._pausedReal=U,U?(this._internalStop(),this.emit("paused")):(this.emit("resumed"),this.play({start:this._elapsed%this._duration,end:this._end,speed:this._speed,loop:this._loop,volume:this._volume})),this.emit("pause",U))}play(k){const{start:B,end:U,speed:F,loop:G,volume:j,muted:$,filters:H}=k;U&&console.assert(U>B,"End time is before start time"),this._paused=!1;const{source:V,gain:W}=this._media.nodes.cloneBufferSource();this._source=V,this._gain=W,this._speed=F,this._volume=j,this._loop=!!G,this._muted=$,this._filters=H,this.refresh();const q=this._source.buffer.duration;this._duration=q,this._end=U,this._lastUpdate=this._now(),this._elapsed=B,this._source.onended=this._onComplete.bind(this),this._loop?(this._source.loopEnd=U,this._source.loopStart=B,this._source.start(0,B)):U?this._source.start(0,B,U-B):this._source.start(0,B),this.emit("start"),this._update(!0),this.enableTicker(!0)}enableTicker(k){j.Rv.shared.remove(this._updateListener,this),k&&j.Rv.shared.add(this._updateListener,this)}get progress(){return this._progress}get paused(){return this._paused}set paused(k){this._paused=k,this.refreshPaused()}destroy(){this.removeAllListeners(),this._internalStop(),this._gain&&(this._gain.disconnect(),this._gain=null),this._media&&(this._media.context.events.off("refresh",this.refresh,this),this._media.context.events.off("refreshPaused",this.refreshPaused,this),this._media=null),this._filters?.forEach((k=>k.disconnect())),this._filters=null,this._end=null,this._speed=1,this._volume=1,this._loop=!1,this._elapsed=0,this._duration=0,this._paused=!1,this._muted=!1,this._pausedReal=!1}toString(){return`[WebAudioInstance id=${this.id}]`}_now(){return this._media.context.audioContext.currentTime}_updateListener(){this._update()}_update(k=!1){if(this._source){const B=this._now(),U=B-this._lastUpdate;if(U>0||k){const k=this._source.playbackRate.value;this._elapsed+=U*k,this._lastUpdate=B;const F=this._duration;let G;if(this._source.loopStart){const k=this._source.loopEnd-this._source.loopStart;G=(this._source.loopStart+this._elapsed%k)/F}else G=this._elapsed%F/F;this._progress=G,this.emit("progress",this._progress,F)}}}init(k){this._media=k,k.context.events.on("refresh",this.refresh,this),k.context.events.on("refreshPaused",this.refreshPaused,this)}_internalStop(){if(this._source){this.enableTicker(!1),this._source.onended=null,this._source.stop(0),this._source.disconnect();try{this._source.buffer=null}catch(k){console.warn("Failed to set AudioBufferSourceNode.buffer to null:",k)}this._source=null}}_onComplete(){if(this._source){this.enableTicker(!1),this._source.onended=null,this._source.disconnect();try{this._source.buffer=null}catch(k){console.warn("Failed to set AudioBufferSourceNode.buffer to null:",k)}}this._source=null,this._progress=1,this.emit("progress",1,this._duration),this.emit("end",this)}}class J{constructor(k,B){this._output=B,this._input=k}get destination(){return this._input}get filters(){return this._filters}set filters(k){if(this._filters&&(this._filters.forEach((k=>{k&&k.disconnect()})),this._filters=null,this._input.connect(this._output)),k&&k.length){this._filters=k.slice(0),this._input.disconnect();let B=null;k.forEach((k=>{null===B?this._input.connect(k.destination):B.connect(k.destination),B=k})),B.connect(this._output)}}destroy(){this.filters=null,this._input=null,this._output=null}}const tt=class extends J{constructor(k){const B=k.audioContext,U=B.createBufferSource(),F=B.createGain(),G=B.createAnalyser();U.connect(G),G.connect(F),F.connect(k.destination),super(G,F),this.context=k,this.bufferSource=U,this.gain=F,this.analyser=G}get script(){return this._script||(this._script=this.context.audioContext.createScriptProcessor(tt.BUFFER_SIZE),this._script.connect(this.context.destination)),this._script}destroy(){super.destroy(),this.bufferSource.disconnect(),this._script&&this._script.disconnect(),this.gain.disconnect(),this.analyser.disconnect(),this.bufferSource=null,this._script=null,this.gain=null,this.analyser=null,this.context=null}cloneBufferSource(){const k=this.bufferSource,B=this.context.audioContext.createBufferSource();B.buffer=k.buffer,Q.setParamValue(B.playbackRate,k.playbackRate.value),B.loop=k.loop;const U=this.context.audioContext.createGain();return B.connect(U),U.connect(this.destination),{source:B,gain:U}}get bufferSize(){return this.script.bufferSize}};let et=tt;et.BUFFER_SIZE=0;class it{init(k){this.parent=k,this._nodes=new et(this.context),this._source=this._nodes.bufferSource,this.source=k.options.source}destroy(){this.parent=null,this._nodes.destroy(),this._nodes=null;try{this._source.buffer=null}catch(k){console.warn("Failed to set AudioBufferSourceNode.buffer to null:",k)}this._source=null,this.source=null}create(){return new Z(this)}get context(){return this.parent.context}get isPlayable(){return!!this._source&&!!this._source.buffer}get filters(){return this._nodes.filters}set filters(k){this._nodes.filters=k}get duration(){return console.assert(this.isPlayable,"Sound not yet playable, no duration"),this._source.buffer.duration}get buffer(){return this._source.buffer}set buffer(k){this._source.buffer=k}get nodes(){return this._nodes}load(k){this.source?this._decode(this.source,k):this.parent.url?this._loadUrl(k):k?k(new Error("sound.url or sound.source must be set")):console.error("sound.url or sound.source must be set")}async _loadUrl(k){const B=this.parent.url,U=await j.W0.ADAPTER.fetch(B);this._decode(await U.arrayBuffer(),k)}_decode(k,B){const U=(k,U)=>{if(k)B&&B(k);else{this.parent.isLoaded=!0,this.buffer=U;const k=this.parent.autoPlayStart();B&&B(null,this.parent,k)}};if(k instanceof AudioBuffer)U(null,k);else{this.parent.context.decode(k,U)}}}const st=class{static from(k){let B={};"string"==typeof k?B.url=k:k instanceof ArrayBuffer||k instanceof AudioBuffer||k instanceof HTMLAudioElement?B.source=k:Array.isArray(k)?B.url=k:B=k,B={autoPlay:!1,singleInstance:!1,url:null,source:null,preload:!1,volume:1,speed:1,complete:null,loaded:null,loop:!1,...B},Object.freeze(B);const U=G().useLegacy?new W:new it;return new st(U,B)}constructor(k,B){this.media=k,this.options=B,this._instances=[],this._sprites={},this.media.init(this);const U=B.complete;this._autoPlayOptions=U?{complete:U}:null,this.isLoaded=!1,this._preloadQueue=null,this.isPlaying=!1,this.autoPlay=B.autoPlay,this.singleInstance=B.singleInstance,this.preload=B.preload||this.autoPlay,this.url=Array.isArray(B.url)?this.preferUrl(B.url):B.url,this.speed=B.speed,this.volume=B.volume,this.loop=B.loop,B.sprites&&this.addSprites(B.sprites),this.preload&&this._preload(B.loaded)}preferUrl(k){const[B]=k.map((k=>({url:k,ext:j.Wp.path.extname(k).slice(1)}))).filter((({ext:k})=>Y[k])).sort(((k,B)=>K.indexOf(k.ext)-K.indexOf(B.ext)));if(!B)throw new Error("No supported file type found");return B.url}get context(){return G().context}pause(){return this.isPlaying=!1,this.paused=!0,this}resume(){return this.isPlaying=this._instances.length>0,this.paused=!1,this}get paused(){return this._paused}set paused(k){this._paused=k,this.refreshPaused()}get speed(){return this._speed}set speed(k){this._speed=k,this.refresh()}get filters(){return this.media.filters}set filters(k){this.media.filters=k}addSprites(k,B){if("object"==typeof k){const B={};for(const U in k)B[U]=this.addSprites(U,k[U]);return B}console.assert(!this._sprites[k],`Alias ${k} is already taken`);const U=new q(this,B);return this._sprites[k]=U,U}destroy(){this._removeInstances(),this.removeSprites(),this.media.destroy(),this.media=null,this._sprites=null,this._instances=null}removeSprites(k){if(k){const B=this._sprites[k];void 0!==B&&(B.destroy(),delete this._sprites[k])}else for(const B in this._sprites)this.removeSprites(B);return this}get isPlayable(){return this.isLoaded&&this.media&&this.media.isPlayable}stop(){if(!this.isPlayable)return this.autoPlay=!1,this._autoPlayOptions=null,this;this.isPlaying=!1;for(let k=this._instances.length-1;k>=0;k--)this._instances[k].stop();return this}play(k,B){let U;if("string"==typeof k){U={sprite:k,loop:this.loop,complete:B}}else"function"==typeof k?(U={},U.complete=k):U=k;if(U={complete:null,loaded:null,sprite:null,end:null,start:0,volume:1,speed:1,muted:!1,loop:!1,...U||{}},U.sprite){const k=U.sprite;console.assert(!!this._sprites[k],`Alias ${k} is not available`);const B=this._sprites[k];U.start=B.start+(U.start||0),U.end=B.end,U.speed=B.speed||1,U.loop=B.loop||U.loop,delete U.sprite}if(U.offset&&(U.start=U.offset),!this.isLoaded)return this._preloadQueue?new Promise((k=>{this._preloadQueue.push((()=>{k(this.play(U))}))})):(this._preloadQueue=[],this.autoPlay=!0,this._autoPlayOptions=U,new Promise(((k,B)=>{this._preload(((F,G,j)=>{this._preloadQueue.forEach((k=>k())),this._preloadQueue=null,F?B(F):(U.loaded&&U.loaded(F,G,j),k(j))}))})));(this.singleInstance||U.singleInstance)&&this._removeInstances();const F=this._createInstance();return this._instances.push(F),this.isPlaying=!0,F.once("end",(()=>{U.complete&&U.complete(this),this._onComplete(F)})),F.once("stop",(()=>{this._onComplete(F)})),F.play(U),F}refresh(){const k=this._instances.length;for(let B=0;B=0;k--)this._poolInstance(this._instances[k]);this._instances.length=0}_onComplete(k){if(this._instances){const B=this._instances.indexOf(k);B>-1&&this._instances.splice(B,1),this.isPlaying=this._instances.length>0}this._poolInstance(k)}_createInstance(){if(st._pool.length>0){const k=st._pool.pop();return k.init(this.media),k}return this.media.create()}_poolInstance(k){k.destroy(),st._pool.indexOf(k)<0&&st._pool.push(k)}};let nt=st;nt._pool=[];class at extends j.Wp.EventEmitter{constructor(){super(...arguments),this.speed=1,this.muted=!1,this.volume=1,this.paused=!1}refresh(){this.emit("refresh")}refreshPaused(){this.emit("refreshPaused")}get filters(){return console.warn("HTML Audio does not support filters"),null}set filters(k){console.warn("HTML Audio does not support filters")}get audioContext(){return console.warn("HTML Audio does not support audioContext"),null}toggleMute(){return this.muted=!this.muted,this.refresh(),this.muted}togglePause(){return this.paused=!this.paused,this.refreshPaused(),this.paused}destroy(){this.removeAllListeners()}}class rt extends J{constructor(){const k=window,B=new rt.AudioContext,U=B.createDynamicsCompressor(),F=B.createAnalyser();F.connect(U),U.connect(B.destination),super(F,U),this.autoPause=!0,this._ctx=B,this._offlineCtx=new rt.OfflineAudioContext(1,2,k.OfflineAudioContext?Math.max(8e3,Math.min(96e3,B.sampleRate)):44100),this.compressor=U,this.analyser=F,this.events=new j.Wp.EventEmitter,this.volume=1,this.speed=1,this.muted=!1,this.paused=!1,this._locked="suspended"===B.state&&("ontouchstart"in globalThis||"onclick"in globalThis),this._locked&&(this._unlock(),this._unlock=this._unlock.bind(this),document.addEventListener("mousedown",this._unlock,!0),document.addEventListener("touchstart",this._unlock,!0),document.addEventListener("touchend",this._unlock,!0)),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),globalThis.addEventListener("focus",this.onFocus),globalThis.addEventListener("blur",this.onBlur)}onFocus(){if(!this.autoPause)return;const k=this._ctx.state;"suspended"!==k&&"interrupted"!==k&&this._locked||(this.paused=this._pausedOnBlur,this.refreshPaused())}onBlur(){this.autoPause&&(this._locked||(this._pausedOnBlur=this._paused,this.paused=!0,this.refreshPaused()))}_unlock(){this._locked&&(this.playEmptySound(),"running"===this._ctx.state&&(document.removeEventListener("mousedown",this._unlock,!0),document.removeEventListener("touchend",this._unlock,!0),document.removeEventListener("touchstart",this._unlock,!0),this._locked=!1))}playEmptySound(){const k=this._ctx.createBufferSource();k.buffer=this._ctx.createBuffer(1,1,22050),k.connect(this._ctx.destination),k.start(0,0,0),"suspended"===k.context.state&&k.context.resume()}static get AudioContext(){const k=window;return k.AudioContext||k.webkitAudioContext||null}static get OfflineAudioContext(){const k=window;return k.OfflineAudioContext||k.webkitOfflineAudioContext||null}destroy(){super.destroy();const k=this._ctx;void 0!==k.close&&k.close(),globalThis.removeEventListener("focus",this.onFocus),globalThis.removeEventListener("blur",this.onBlur),this.events.removeAllListeners(),this.analyser.disconnect(),this.compressor.disconnect(),this.analyser=null,this.compressor=null,this.events=null,this._offlineCtx=null,this._ctx=null}get audioContext(){return this._ctx}get offlineContext(){return this._offlineCtx}set paused(k){k&&"running"===this._ctx.state?this._ctx.suspend():k||"suspended"!==this._ctx.state||this._ctx.resume(),this._paused=k}get paused(){return this._paused}refresh(){this.events.emit("refresh")}refreshPaused(){this.events.emit("refreshPaused")}toggleMute(){return this.muted=!this.muted,this.refresh(),this.muted}togglePause(){return this.paused=!this.paused,this.refreshPaused(),this._paused}decode(k,B){const U=k=>{B(new Error(k?.message||"Unable to decode file"))},F=this._offlineCtx.decodeAudioData(k,(k=>{B(null,k)}),U);F&&F.catch(U)}}class ot{constructor(k,B){this.init(k,B)}init(k,B){this.destination=k,this.source=B||k}connect(k){this.source?.connect(k)}disconnect(){this.source?.disconnect()}destroy(){this.disconnect(),this.destination=null,this.source=null}}const ht=class extends ot{constructor(k=0,B=0,U=0,F=0,j=0,$=0,H=0,V=0,W=0,q=0){let K=[];const z=[{f:ht.F32,type:"lowshelf",gain:k},{f:ht.F64,type:"peaking",gain:B},{f:ht.F125,type:"peaking",gain:U},{f:ht.F250,type:"peaking",gain:F},{f:ht.F500,type:"peaking",gain:j},{f:ht.F1K,type:"peaking",gain:$},{f:ht.F2K,type:"peaking",gain:H},{f:ht.F4K,type:"peaking",gain:V},{f:ht.F8K,type:"peaking",gain:W},{f:ht.F16K,type:"highshelf",gain:q}];G().useLegacy||(K=z.map((k=>{const B=G().context.audioContext.createBiquadFilter();return B.type=k.type,Q.setParamValue(B.Q,1),B.frequency.value=k.f,Q.setParamValue(B.gain,k.gain),B}))),super(K[0],K[K.length-1]),this.bands=K,this.bandsMap={};for(let G=0;G0&&this.bands[G-1].connect(k),this.bandsMap[k.frequency.value]=k}}setGain(k,B=0){if(!this.bandsMap[k])throw new Error(`No band found for frequency ${k}`);Q.setParamValue(this.bandsMap[k].gain,B)}getGain(k){if(!this.bandsMap[k])throw new Error(`No band found for frequency ${k}`);return this.bandsMap[k].gain.value}set f32(k){this.setGain(ht.F32,k)}get f32(){return this.getGain(ht.F32)}set f64(k){this.setGain(ht.F64,k)}get f64(){return this.getGain(ht.F64)}set f125(k){this.setGain(ht.F125,k)}get f125(){return this.getGain(ht.F125)}set f250(k){this.setGain(ht.F250,k)}get f250(){return this.getGain(ht.F250)}set f500(k){this.setGain(ht.F500,k)}get f500(){return this.getGain(ht.F500)}set f1k(k){this.setGain(ht.F1K,k)}get f1k(){return this.getGain(ht.F1K)}set f2k(k){this.setGain(ht.F2K,k)}get f2k(){return this.getGain(ht.F2K)}set f4k(k){this.setGain(ht.F4K,k)}get f4k(){return this.getGain(ht.F4K)}set f8k(k){this.setGain(ht.F8K,k)}get f8k(){return this.getGain(ht.F8K)}set f16k(k){this.setGain(ht.F16K,k)}get f16k(){return this.getGain(ht.F16K)}reset(){this.bands.forEach((k=>{Q.setParamValue(k.gain,0)}))}destroy(){this.bands.forEach((k=>{k.disconnect()})),this.bands=null,this.bandsMap=null}};let ct=ht;ct.F32=32,ct.F64=64,ct.F125=125,ct.F250=250,ct.F500=500,ct.F1K=1e3,ct.F2K=2e3,ct.F4K=4e3,ct.F8K=8e3,ct.F16K=16e3;const dt={loader:j.Ag.LoadParser,resolver:j.Ag.ResolveParser,cache:j.Ag.CacheParser,detection:j.Ag.DetectionParser};j.XO.handle(j.Ag.Asset,(k=>{const B=k.ref;Object.entries(dt).filter((([k])=>!!B[k])).forEach((([k,U])=>j.XO.add(Object.assign(B[k],{extension:B[k].extension??U}))))}),(k=>{const B=k.ref;Object.keys(dt).filter((k=>!!B[k])).forEach((k=>j.XO.remove(B[k])))}));class lt{constructor(k,B=!1){this._loader=k,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=B}add(k){k.forEach((k=>{this._assetList.push(k)})),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const k=[],B=Math.min(this._assetList.length,this._maxConcurrent);for(let U=0;U(Array.isArray(k)||(k=[k]),B?k.map((k=>"string"==typeof k||U?B(k):k)):k);const bt=new class{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(k){return this._cache.has(k)}get(k){const B=this._cache.get(k);return B||console.warn(`[Assets] Asset id ${k} was not found in the Cache`),B}set(k,B){const U=ft(k);let F;for(let j=0;j{F[k]=B})));const G=Object.keys(F),$={cacheKeys:G,keys:U};if(U.forEach((k=>{this._cacheMap.set(k,$)})),G.forEach((k=>{this._cache.has(k)&&this._cache.get(k)!==B&&console.warn("[Cache] already has key:",k),this._cache.set(k,F[k])})),B instanceof j.gP){const k=B;U.forEach((B=>{k.baseTexture!==j.gP.EMPTY.baseTexture&&j.t5.addToCache(k.baseTexture,B),j.gP.addToCache(k,B)}))}}remove(k){if(!this._cacheMap.has(k))return void console.warn(`[Assets] Asset id ${k} was not found in the Cache`);const B=this._cacheMap.get(k);B.cacheKeys.forEach((k=>{this._cache.delete(k)})),B.keys.forEach((k=>{this._cacheMap.delete(k)}))}get parsers(){return this._parsers}},pt=k=>!Array.isArray(k);class vt{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(k,B,U)=>(this._parsersValidated=!1,k[B]=U,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(k,B){const U={promise:null,parser:null};return U.promise=(async()=>{let F=null,G=null;if(B.loadParser&&(G=this._parserHash[B.loadParser],G||console.warn(`[Assets] specified load parser "${B.loadParser}" not found while loading ${k}`)),!G){for(let U=0;U({alias:[k],src:k}))),H=$.length,V=$.map((async k=>{const G=j.Wp.path.toAbsolute(k.src);if(!F[k.src])try{this.promiseCache[G]||(this.promiseCache[G]=this._getLoadPromiseAndParser(G,k)),F[k.src]=await this.promiseCache[G].promise,B&&B(++U/H)}catch(e){throw delete this.promiseCache[G],delete F[k.src],new Error(`[Loader.load] Failed to load ${G}.\n${e}`)}}));return await Promise.all(V),G?F[$[0].src]:F}async unload(k){const B=ft(k,(k=>({alias:[k],src:k}))).map((async k=>{const B=j.Wp.path.toAbsolute(k.src),U=this.promiseCache[B];if(U){const F=await U.promise;delete this.promiseCache[B],U.parser?.unload?.(F,k,this)}}));await Promise.all(B)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter((k=>k.name)).reduce(((k,B)=>(k[B.name]&&console.warn(`[Assets] loadParser name conflict "${B.name}"`),{...k,[B.name]:B})),{})}}var gt=(k=>(k[k.Low=0]="Low",k[k.Normal=1]="Normal",k[k.High=2]="High",k))(gt||{});function mt(k,B){if(Array.isArray(B)){for(const U of B)if(k.startsWith(`data:${U}`))return!0;return!1}return k.startsWith(`data:${B}`)}const yt={extension:{type:j.Ag.LoadParser,priority:gt.Low},name:"loadJson",test:k=>mt(k,"application/json")||ut(k,".json"),load:async k=>await(await j.W0.ADAPTER.fetch(k)).json()};j.XO.add(yt);const _t={name:"loadTxt",extension:{type:j.Ag.LoadParser,priority:gt.Low},test:k=>mt(k,"text/plain")||ut(k,".txt"),load:async k=>await(await j.W0.ADAPTER.fetch(k)).text()};j.XO.add(_t);const Et=["normal","bold","100","200","300","400","500","600","700","800","900"],wt=[".ttf",".otf",".woff",".woff2"],Tt=["font/ttf","font/otf","font/woff","font/woff2"],St=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;const At=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;const Ct={extension:{type:j.Ag.LoadParser,priority:gt.Low},name:"loadWebFont",test:k=>mt(k,Tt)||ut(k,wt),async load(k,B){const U=j.W0.ADAPTER.getFontFaceSet();if(U){const G=[],$=B.data?.family??function(k){const B=j.Wp.path.extname(k),U=j.Wp.path.basename(k,B).replace(/(-|_)/g," ").toLowerCase().split(" ").map((k=>k.charAt(0).toUpperCase()+k.slice(1)));let F=U.length>0;for(const j of U)if(!j.match(St)){F=!1;break}let G=U.join(" ");return F||(G=`"${G.replace(/[\\"]/g,"\\$&")}"`),G}(k),H=B.data?.weights?.filter((k=>Et.includes(k)))??["normal"],V=B.data??{};for(let B=0;Bj.W0.ADAPTER.getFontFaceSet().delete(k)))}};j.XO.add(Ct);let Ot=null;class It{constructor(){Ot||(Ot=URL.createObjectURL(new Blob(['(function() {\n "use strict";\n const WHITE_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=";\n async function checkImageBitmap() {\n try {\n if (typeof createImageBitmap != "function")\n return !1;\n const imageBlob = await (await fetch(WHITE_PNG)).blob(), imageBitmap = await createImageBitmap(imageBlob);\n return imageBitmap.width === 1 && imageBitmap.height === 1;\n } catch {\n return !1;\n }\n }\n checkImageBitmap().then((result) => {\n self.postMessage(result);\n });\n})();\n'],{type:"application/javascript"}))),this.worker=new Worker(Ot)}}It.revokeObjectURL=function(){Ot&&(URL.revokeObjectURL(Ot),Ot=null)};let Dt=null;class Rt{constructor(){Dt||(Dt=URL.createObjectURL(new Blob(['(function() {\n "use strict";\n async function loadImageBitmap(url) {\n const response = await fetch(url);\n if (!response.ok)\n throw new Error(`[WorkerManager.loadImageBitmap] Failed to fetch ${url}: ${response.status} ${response.statusText}`);\n const imageBlob = await response.blob();\n return await createImageBitmap(imageBlob);\n }\n self.onmessage = async (event) => {\n try {\n const imageBitmap = await loadImageBitmap(event.data.data[0]);\n self.postMessage({\n data: imageBitmap,\n uuid: event.data.uuid,\n id: event.data.id\n }, [imageBitmap]);\n } catch (e) {\n self.postMessage({\n error: e,\n uuid: event.data.uuid,\n id: event.data.id\n });\n }\n };\n})();\n'],{type:"application/javascript"}))),this.worker=new Worker(Dt)}}Rt.revokeObjectURL=function(){Dt&&(URL.revokeObjectURL(Dt),Dt=null)};let Pt,Mt=0;const Nt=new class{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return void 0!==this._isImageBitmapSupported||(this._isImageBitmapSupported=new Promise((k=>{const{worker:B}=new It;B.addEventListener("message",(U=>{B.terminate(),It.revokeObjectURL(),k(U.data)}))}))),this._isImageBitmapSupported}loadImageBitmap(k){return this._run("loadImageBitmap",[k])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){void 0===Pt&&(Pt=navigator.hardwareConcurrency||4);let k=this.workerPool.pop();return!k&&this._createdWorkers{this.complete(k.data),this.returnWorker(k.target),this.next()}))),k}returnWorker(k){this.workerPool.push(k)}complete(k){void 0!==k.error?this.resolveHash[k.uuid].reject(k.error):this.resolveHash[k.uuid].resolve(k.data),this.resolveHash[k.uuid]=null}async _run(k,B){await this._initWorkers();const U=new Promise(((U,F)=>{this.queue.push({id:k,arguments:B,resolve:U,reject:F})}));return this.next(),U}next(){if(!this.queue.length)return;const k=this.getWorker();if(!k)return;const B=this.queue.pop(),U=B.id;this.resolveHash[Mt]={resolve:B.resolve,reject:B.reject},k.postMessage({data:B.arguments,uuid:Mt++,id:U})}};function xt(k,B,U){k.resource.internal=!0;const F=new j.gP(k),G=()=>{delete B.promiseCache[U],bt.has(U)&&bt.remove(U)};return F.baseTexture.once("destroyed",(()=>{U in B.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),G())})),F.once("destroyed",(()=>{k.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),G())})),F}const Lt=[".jpeg",".jpg",".png",".webp",".avif"],kt=["image/jpeg","image/png","image/webp","image/avif"];const Bt={name:"loadTextures",extension:{type:j.Ag.LoadParser,priority:gt.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test:k=>mt(k,kt)||ut(k,Lt),async load(k,B,U){const F=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let G;G=F?this.config.preferWorkers&&await Nt.isImageBitmapSupported()?await Nt.loadImageBitmap(k):await async function(k){const B=await j.W0.ADAPTER.fetch(k);if(!B.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${k}: ${B.status} ${B.statusText}`);const U=await B.blob();return await createImageBitmap(U)}(k):await new Promise(((B,U)=>{const F=new Image;F.crossOrigin=this.config.crossOrigin,F.src=k,F.complete?B(F):(F.onload=()=>B(F),F.onerror=k=>U(k))}));const $={...B.data};$.resolution??($.resolution=j.Wp.getResolutionOfUrl(k)),F&&void 0===$.resourceOptions?.ownsImageBitmap&&($.resourceOptions={...$.resourceOptions},$.resourceOptions.ownsImageBitmap=!0);const H=new j.t5(G,$);return H.resource.src=k,xt(H,U,k)},unload(k){k.destroy(!0)}};j.XO.add(Bt);const Ut={extension:{type:j.Ag.LoadParser,priority:gt.High},name:"loadSVG",test:k=>mt(k,"image/svg+xml")||ut(k,".svg"),testParse:async k=>j.$f.test(k),async parse(k,B,U){const F=new j.$f(k,B?.data?.resourceOptions);await F.load();const G=new j.t5(F,{resolution:j.Wp.getResolutionOfUrl(k),...B?.data});return G.resource.src=B.src,xt(G,U,B.src)},load:async(k,B)=>(await j.W0.ADAPTER.fetch(k)).text(),unload:Bt.unload};j.XO.add(Ut);const Ft=[".mp4",".m4v",".webm",".ogv"],Gt=["video/mp4","video/webm","video/ogg"],jt={name:"loadVideo",extension:{type:j.Ag.LoadParser,priority:gt.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test:k=>mt(k,Gt)||ut(k,Ft),async load(k,B,U){let F;const G=await(await j.W0.ADAPTER.fetch(k)).blob(),$=URL.createObjectURL(G);try{const G={autoPlay:this.config.defaultAutoPlay,updateFPS:this.config.defaultUpdateFPS,loop:this.config.defaultLoop,muted:this.config.defaultMuted,playsinline:this.config.defaultPlaysinline,...B?.data?.resourceOptions,autoLoad:!0},H=new j.A5($,G);await H.load();const V=new j.t5(H,{alphaMode:await j.Wp.detectVideoAlphaMode(),resolution:j.Wp.getResolutionOfUrl(k),...B?.data});V.resource.src=k,F=xt(V,U,k),F.baseTexture.once("destroyed",(()=>{URL.revokeObjectURL($)}))}catch(e){throw URL.revokeObjectURL($),e}return F},unload(k){k.destroy(!0)}};function $t(k,B,U,F,G){const j=B[U];for(let $=0;${const B=k.substring(1,k.length-1).split(",");F.push(B)})),$t(k,F,0,B,U)}else U.push(k);return U}j.XO.add(jt);class Vt{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(k,B)=>`${k}${this._bundleIdConnector}${B}`,extractAssetIdFromBundle:(k,B)=>B.replace(`${k}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(k){if(this._bundleIdConnector=k.connector??this._bundleIdConnector,this._createBundleAssetId=k.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=k.extractAssetIdFromBundle??this._extractAssetIdFromBundle,"bar"!==this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar")))throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...k){k.forEach((k=>{this._preferredOrder.push(k),k.priority||(k.priority=Object.keys(k.params))})),this._resolverHash={}}set basePath(k){this._basePath=k}get basePath(){return this._basePath}set rootPath(k){this._rootPath=k}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(k){if("string"==typeof k)this._defaultSearchParams=k;else{const B=k;this._defaultSearchParams=Object.keys(B).map((k=>`${encodeURIComponent(k)}=${encodeURIComponent(B[k])}`)).join("&")}}getAlias(k){const{alias:B,name:U,src:F,srcs:G}=k;return ft(B||U||F||G,(k=>"string"==typeof k?k:Array.isArray(k)?k.map((k=>k?.src??k?.srcs??k)):k?.src||k?.srcs?k.src??k.srcs:k),!0)}addManifest(k){this._manifest&&console.warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=k,k.bundles.forEach((k=>{this.addBundle(k.name,k.assets)}))}addBundle(k,B){const U=[];Array.isArray(B)?B.forEach((B=>{const F=B.src??B.srcs,G=B.alias??B.name;let j;if("string"==typeof G){const B=this._createBundleAssetId(k,G);U.push(B),j=[G,B]}else{const B=G.map((B=>this._createBundleAssetId(k,B)));U.push(...B),j=[...G,...B]}this.add({...B,alias:j,src:F})})):Object.keys(B).forEach((F=>{const G=[F,this._createBundleAssetId(k,F)];if("string"==typeof B[F])this.add({alias:G,src:B[F]});else if(Array.isArray(B[F]))this.add({alias:G,src:B[F]});else{const k=B[F],U=k.src??k.srcs;this.add({...k,alias:G,src:Array.isArray(U)?U:[U]})}U.push(...G)})),this._bundles[k]=U}add(k,B,U,F,G){const $=[];let H;"string"==typeof k||Array.isArray(k)&&"string"==typeof k[0]?(j.Wp.deprecation("7.2.0","Assets.add now uses an object instead of individual parameters.\nPlease use Assets.add({ alias, src, data, format, loadParser }) instead."),$.push({alias:k,src:B,data:U,format:F,loadParser:G})):Array.isArray(k)?$.push(...k):$.push(k),H=k=>{this.hasKey(k)&&console.warn(`[Resolver] already has key: ${k} overwriting`)},ft($).forEach((k=>{const{src:B,srcs:U}=k;let{data:F,format:G,loadParser:j}=k;const $=ft(B||U).map((k=>"string"==typeof k?Ht(k):Array.isArray(k)?k:[k])),V=this.getAlias(k);Array.isArray(V)?V.forEach(H):H(V);const W=[];$.forEach((k=>{k.forEach((k=>{let B={};if("object"!=typeof k){B.src=k;for(let U=0;U{this._assetMap[k]=W}))}))}resolveBundle(k){const B=pt(k);k=ft(k);const U={};return k.forEach((k=>{const B=this._bundles[k];if(B){const F=this.resolve(B),G={};for(const B in F){const U=F[B];G[this._extractAssetIdFromBundle(k,B)]=U}U[k]=G}})),B?U[k[0]]:U}resolveUrl(k){const B=this.resolve(k);if("string"!=typeof k){const k={};for(const U in B)k[U]=B[U].src;return k}return B.src}resolve(k){const B=pt(k);k=ft(k);const U={};return k.forEach((k=>{if(!this._resolverHash[k])if(this._assetMap[k]){let B=this._assetMap[k];const U=B[0],F=this._getPreferredOrder(B);F?.priority.forEach((k=>{F.params[k].forEach((U=>{const F=B.filter((B=>!!B[k]&&B[k]===U));F.length&&(B=F)}))})),this._resolverHash[k]=B[0]??U}else this._resolverHash[k]=this.buildResolvedAsset({alias:[k],src:k},{});U[k]=this._resolverHash[k]})),B?U[k[0]]:U}hasKey(k){return!!this._assetMap[k]}hasBundle(k){return!!this._bundles[k]}_getPreferredOrder(k){for(let B=0;Bk.params.format.includes(B.format)));if(U)return U}return this._preferredOrder[0]}_appendDefaultSearchParams(k){if(!this._defaultSearchParams)return k;return`${k}${/\?/.test(k)?"&":"?"}${this._defaultSearchParams}`}buildResolvedAsset(k,B){const{aliases:U,data:F,loadParser:G,format:$}=B;return(this._basePath||this._rootPath)&&(k.src=j.Wp.path.toAbsolute(k.src,this._basePath,this._rootPath)),k.alias=U??k.alias??[k.src],k.src=this._appendDefaultSearchParams(k.src),k.data={...F||{},...k.data},k.loadParser=G??k.loadParser,k.format=$??k.format??j.Wp.path.extname(k.src).slice(1),k.srcs=k.src,k.name=k.alias,k}}const Wt=new class{constructor(){this._detections=[],this._initialized=!1,this.resolver=new Vt,this.loader=new vt,this.cache=bt,this._backgroundLoader=new lt(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(k={}){if(this._initialized)return void console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");if(this._initialized=!0,k.defaultSearchParams&&this.resolver.setDefaultSearchParams(k.defaultSearchParams),k.basePath&&(this.resolver.basePath=k.basePath),k.bundleIdentifier&&this.resolver.setBundleIdentifier(k.bundleIdentifier),k.manifest){let B=k.manifest;"string"==typeof B&&(B=await this.load(B)),this.resolver.addManifest(B)}const B=k.texturePreference?.resolution??1,U="number"==typeof B?[B]:B,F=await this._detectFormats({preferredFormats:k.texturePreference?.format,skipDetections:k.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:F,resolution:U}}),k.preferences&&this.setPreferences(k.preferences)}add(k,B,U,F,G){this.resolver.add(k,B,U,F,G)}async load(k,B){this._initialized||await this.init();const U=pt(k),F=ft(k).map((k=>{if("string"!=typeof k){const B=this.resolver.getAlias(k);return B.some((k=>!this.resolver.hasKey(k)))&&this.add(k),Array.isArray(B)?B[0]:B}return this.resolver.hasKey(k)||this.add({alias:k,src:k}),k})),G=this.resolver.resolve(F),j=await this._mapLoadToResolve(G,B);return U?j[F[0]]:j}addBundle(k,B){this.resolver.addBundle(k,B)}async loadBundle(k,B){this._initialized||await this.init();let U=!1;"string"==typeof k&&(U=!0,k=[k]);const F=this.resolver.resolveBundle(k),G={},j=Object.keys(F);let $=0,H=0;const V=()=>{B?.(++$/H)},W=j.map((k=>{const B=F[k];return H+=Object.keys(B).length,this._mapLoadToResolve(B,V).then((B=>{G[k]=B}))}));return await Promise.all(W),U?G[k[0]]:G}async backgroundLoad(k){this._initialized||await this.init(),"string"==typeof k&&(k=[k]);const B=this.resolver.resolve(k);this._backgroundLoader.add(Object.values(B))}async backgroundLoadBundle(k){this._initialized||await this.init(),"string"==typeof k&&(k=[k]);const B=this.resolver.resolveBundle(k);Object.values(B).forEach((k=>{this._backgroundLoader.add(Object.values(k))}))}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(k){if("string"==typeof k)return bt.get(k);const B={};for(let U=0;U{const U=G[k.src],$=[k.src];k.alias&&$.push(...k.alias),j[F[B]]=U,bt.set($,U)})),j}async unload(k){this._initialized||await this.init();const B=ft(k).map((k=>"string"!=typeof k?k.src:k)),U=this.resolver.resolve(B);await this._unloadFromResolved(U)}async unloadBundle(k){this._initialized||await this.init(),k=ft(k);const B=this.resolver.resolveBundle(k),U=Object.keys(B).map((k=>this._unloadFromResolved(B[k])));await Promise.all(U)}async _unloadFromResolved(k){const B=Object.values(k);B.forEach((k=>{bt.remove(k.src)})),await this.loader.unload(B)}async _detectFormats(k){let B=[];k.preferredFormats&&(B=Array.isArray(k.preferredFormats)?k.preferredFormats:[k.preferredFormats]);for(const U of k.detections)k.skipDetections||await U.test()?B=await U.add(B):k.skipDetections||(B=await U.remove(B));return B=B.filter(((k,U)=>B.indexOf(k)===U)),B}get detections(){return this._detections}get preferWorkers(){return Bt.config.preferWorkers}set preferWorkers(k){j.Wp.deprecation("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:k})}setPreferences(k){this.loader.parsers.forEach((B=>{B.config&&Object.keys(B.config).filter((B=>B in k)).forEach((U=>{B.config[U]=k[U]}))}))}};j.XO.handleByList(j.Ag.LoadParser,Wt.loader.parsers).handleByList(j.Ag.ResolveParser,Wt.resolver.parsers).handleByList(j.Ag.CacheParser,Wt.cache.parsers).handleByList(j.Ag.DetectionParser,Wt.detections);const qt={extension:j.Ag.CacheParser,test:k=>Array.isArray(k)&&k.every((k=>k instanceof j.gP)),getCacheableAssets:(k,B)=>{const U={};return k.forEach((k=>{B.forEach(((B,F)=>{U[k+(0===F?"":F+1)]=B}))})),U}};async function Kt(k){if("Image"in globalThis)return new Promise((B=>{const U=new Image;U.onload=()=>{B(!0)},U.onerror=()=>{B(!1)},U.src=k}));if("createImageBitmap"in globalThis&&"fetch"in globalThis){try{const B=await(await fetch(k)).blob();await createImageBitmap(B)}catch{return!1}return!0}return!1}j.XO.add(qt);const zt={extension:{type:j.Ag.DetectionParser,priority:1},test:async()=>Kt("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="),add:async k=>[...k,"avif"],remove:async k=>k.filter((k=>"avif"!==k))};j.XO.add(zt);const Yt={extension:{type:j.Ag.DetectionParser,priority:0},test:async()=>Kt("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="),add:async k=>[...k,"webp"],remove:async k=>k.filter((k=>"webp"!==k))};j.XO.add(Yt);const Qt=["png","jpg","jpeg"],Xt={extension:{type:j.Ag.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async k=>[...k,...Qt],remove:async k=>k.filter((k=>!Qt.includes(k)))};j.XO.add(Xt);const Zt="WorkerGlobalScope"in globalThis&&globalThis instanceof globalThis.WorkerGlobalScope;function Jt(k){return!Zt&&""!==document.createElement("video").canPlayType(k)}const te={extension:{type:j.Ag.DetectionParser,priority:0},test:async()=>Jt("video/webm"),add:async k=>[...k,"webm"],remove:async k=>k.filter((k=>"webm"!==k))};j.XO.add(te);const ee={extension:{type:j.Ag.DetectionParser,priority:0},test:async()=>Jt("video/mp4"),add:async k=>[...k,"mp4","m4v"],remove:async k=>k.filter((k=>"mp4"!==k&&"m4v"!==k))};j.XO.add(ee);const ie={extension:{type:j.Ag.DetectionParser,priority:0},test:async()=>Jt("video/ogg"),add:async k=>[...k,"ogv"],remove:async k=>k.filter((k=>"ogv"!==k))};j.XO.add(ie);const se={extension:j.Ag.ResolveParser,test:Bt.test,parse:k=>({resolution:parseFloat(j.W0.RETINA_PREFIX.exec(k)?.[1]??"1"),format:j.Wp.path.extname(k).slice(1),src:k})};j.XO.add(se);const ne=k=>{const B=k.src;return k?.alias?.[0]??j.Wp.path.basename(B,j.Wp.path.extname(B))},ae={extension:j.Ag.Asset,detection:{test:async()=>!0,add:async k=>[...k,...K.filter((k=>Y[k]))],remove:async k=>k.filter((B=>k.includes(B)))},loader:{extension:{type:[j.Ag.LoadParser],priority:gt.High},test(k){const B=j.Wp.path.extname(k).slice(1);return!!Y[B]||z.some((B=>k.startsWith(`data:${B}`)))},async load(k,B){const U=await new Promise(((U,F)=>nt.from({...B.data,url:k,preload:!0,loaded(k,G){k?F(k):U(G),B.data?.loaded?.(k,G)}})));return G().add(ne(B),U),U},async unload(k,B){G().remove(ne(B))}}};j.XO.add(ae);const re=function(k){return F=k,k}(new class{constructor(){this.init()}init(){return this.supported&&(this._webAudioContext=new rt),this._htmlAudioContext=new at,this._sounds={},this.useLegacy=!this.supported,this}get context(){return this._context}get filtersAll(){return this.useLegacy?[]:this._context.filters}set filtersAll(k){this.useLegacy||(this._context.filters=k)}get supported(){return null!==rt.AudioContext}add(k,B){if("object"==typeof k){const U={};for(const F in k){const G=this._getOptions(k[F],B);U[F]=this.add(F,G)}return U}if(console.assert(!this._sounds[k],`Sound with alias ${k} already exists.`),B instanceof nt)return this._sounds[k]=B,B;const U=this._getOptions(B),F=nt.from(U);return this._sounds[k]=F,F}_getOptions(k,B){let U;return U="string"==typeof k||Array.isArray(k)?{url:k}:k instanceof ArrayBuffer||k instanceof AudioBuffer||k instanceof HTMLAudioElement?{source:k}:k,U={...U,...B||{}},U}get useLegacy(){return this._useLegacy}set useLegacy(k){this._useLegacy=k,this._context=!k&&this.supported?this._webAudioContext:this._htmlAudioContext}get disableAutoPause(){return!this._webAudioContext.autoPause}set disableAutoPause(k){this._webAudioContext.autoPause=!k}remove(k){return this.exists(k,!0),this._sounds[k].destroy(),delete this._sounds[k],this}get volumeAll(){return this._context.volume}set volumeAll(k){this._context.volume=k,this._context.refresh()}get speedAll(){return this._context.speed}set speedAll(k){this._context.speed=k,this._context.refresh()}togglePauseAll(){return this._context.togglePause()}pauseAll(){return this._context.paused=!0,this._context.refreshPaused(),this}resumeAll(){return this._context.paused=!1,this._context.refreshPaused(),this}toggleMuteAll(){return this._context.toggleMute()}muteAll(){return this._context.muted=!0,this._context.refresh(),this}unmuteAll(){return this._context.muted=!1,this._context.refresh(),this}removeAll(){for(const k in this._sounds)this._sounds[k].destroy(),delete this._sounds[k];return this}stopAll(){for(const k in this._sounds)this._sounds[k].stop();return this}exists(k,B=!1){const U=!!this._sounds[k];return B&&console.assert(U,`No sound matching alias '${k}'.`),U}isPlaying(){for(const k in this._sounds)if(this._sounds[k].isPlaying)return!0;return!1}find(k){return this.exists(k,!0),this._sounds[k]}play(k,B){return this.find(k).play(B)}stop(k){return this.find(k).stop()}pause(k){return this.find(k).pause()}resume(k){return this.find(k).resume()}volume(k,B){const U=this.find(k);return void 0!==B&&(U.volume=B),U.volume}speed(k,B){const U=this.find(k);return void 0!==B&&(U.speed=B),U.speed}duration(k){return this.find(k).duration}close(){return this.removeAll(),this._sounds=null,this._webAudioContext&&(this._webAudioContext.destroy(),this._webAudioContext=null),this._htmlAudioContext&&(this._htmlAudioContext.destroy(),this._htmlAudioContext=null),this._context=null,this}})},1858:k=>{"use strict";function B(k,B,F){F=F||2;var j,$,H,V,K,z,Q,X=B&&B.length,Z=X?B[0]*F:k.length,J=U(k,0,Z,F,!0),tt=[];if(!J||J.next===J.prev)return tt;if(X&&(J=function(k,B,F,G){var j,$,H,V=[];for(j=0,$=B.length;j<$;j++)(H=U(k,B[j]*G,j<$-1?B[j+1]*G:k.length,G,!1))===H.next&&(H.steiner=!0),V.push(Y(H));for(V.sort(W),j=0;j80*F){j=H=k[0],$=V=k[1];for(var et=F;etH&&(H=K),z>V&&(V=z);Q=0!==(Q=Math.max(H-j,V-$))?32767/Q:0}return G(J,tt,F,j,$,Q,0),tt}function U(k,B,U,F,G){var j,$;if(G===ht(k,B,U,F)>0)for(j=B;j=B;j-=F)$=at(j,k[j],k[j+1],$);return $&&J($,$.next)&&(rt($),$=$.next),$}function F(k,B){if(!k)return k;B||(B=k);var U,F=k;do{if(U=!1,F.steiner||!J(F,F.next)&&0!==Z(F.prev,F,F.next))F=F.next;else{if(rt(F),(F=B=F.prev)===F.next)break;U=!0}}while(U||F!==B);return B}function G(k,B,U,W,q,K,Y){if(k){!Y&&K&&function(k,B,U,F){var G=k;do{0===G.z&&(G.z=z(G.x,G.y,B,U,F)),G.prevZ=G.prev,G.nextZ=G.next,G=G.next}while(G!==k);G.prevZ.nextZ=null,G.prevZ=null,function(k){var B,U,F,G,j,$,H,V,W=1;do{for(U=k,k=null,j=null,$=0;U;){for($++,F=U,H=0,B=0;B0||V>0&&F;)0!==H&&(0===V||!F||U.z<=F.z)?(G=U,U=U.nextZ,H--):(G=F,F=F.nextZ,V--),j?j.nextZ=G:k=G,G.prevZ=j,j=G;U=F}j.nextZ=null,W*=2}while($>1)}(G)}(k,W,q,K);for(var Q,X,Z=k;k.prev!==k.next;)if(Q=k.prev,X=k.next,K?$(k,W,q,K):j(k))B.push(Q.i/U|0),B.push(k.i/U|0),B.push(X.i/U|0),rt(k),k=X.next,Z=X.next;else if((k=X)===Z){Y?1===Y?G(k=H(F(k),B,U),B,U,W,q,K,2):2===Y&&V(k,B,U,W,q,K):G(F(k),B,U,W,q,K,1);break}}}function j(k){var B=k.prev,U=k,F=k.next;if(Z(B,U,F)>=0)return!1;for(var G=B.x,j=U.x,$=F.x,H=B.y,V=U.y,W=F.y,q=Gj?G>$?G:$:j>$?j:$,Y=H>V?H>W?H:W:V>W?V:W,X=F.next;X!==B;){if(X.x>=q&&X.x<=z&&X.y>=K&&X.y<=Y&&Q(G,H,j,V,$,W,X.x,X.y)&&Z(X.prev,X,X.next)>=0)return!1;X=X.next}return!0}function $(k,B,U,F){var G=k.prev,j=k,$=k.next;if(Z(G,j,$)>=0)return!1;for(var H=G.x,V=j.x,W=$.x,q=G.y,K=j.y,Y=$.y,X=HV?H>W?H:W:V>W?V:W,et=q>K?q>Y?q:Y:K>Y?K:Y,it=z(X,J,B,U,F),st=z(tt,et,B,U,F),nt=k.prevZ,at=k.nextZ;nt&&nt.z>=it&&at&&at.z<=st;){if(nt.x>=X&&nt.x<=tt&&nt.y>=J&&nt.y<=et&&nt!==G&&nt!==$&&Q(H,q,V,K,W,Y,nt.x,nt.y)&&Z(nt.prev,nt,nt.next)>=0)return!1;if(nt=nt.prevZ,at.x>=X&&at.x<=tt&&at.y>=J&&at.y<=et&&at!==G&&at!==$&&Q(H,q,V,K,W,Y,at.x,at.y)&&Z(at.prev,at,at.next)>=0)return!1;at=at.nextZ}for(;nt&&nt.z>=it;){if(nt.x>=X&&nt.x<=tt&&nt.y>=J&&nt.y<=et&&nt!==G&&nt!==$&&Q(H,q,V,K,W,Y,nt.x,nt.y)&&Z(nt.prev,nt,nt.next)>=0)return!1;nt=nt.prevZ}for(;at&&at.z<=st;){if(at.x>=X&&at.x<=tt&&at.y>=J&&at.y<=et&&at!==G&&at!==$&&Q(H,q,V,K,W,Y,at.x,at.y)&&Z(at.prev,at,at.next)>=0)return!1;at=at.nextZ}return!0}function H(k,B,U){var G=k;do{var j=G.prev,$=G.next.next;!J(j,$)&&tt(j,G,G.next,$)&&st(j,$)&&st($,j)&&(B.push(j.i/U|0),B.push(G.i/U|0),B.push($.i/U|0),rt(G),rt(G.next),G=k=$),G=G.next}while(G!==k);return F(G)}function V(k,B,U,j,$,H){var V=k;do{for(var W=V.next.next;W!==V.prev;){if(V.i!==W.i&&X(V,W)){var q=nt(V,W);return V=F(V,V.next),q=F(q,q.next),G(V,B,U,j,$,H,0),void G(q,B,U,j,$,H,0)}W=W.next}V=V.next}while(V!==k)}function W(k,B){return k.x-B.x}function q(k,B){var U=function(k,B){var U,F=B,G=k.x,j=k.y,$=-1/0;do{if(j<=F.y&&j>=F.next.y&&F.next.y!==F.y){var H=F.x+(j-F.y)*(F.next.x-F.x)/(F.next.y-F.y);if(H<=G&&H>$&&($=H,U=F.x=F.x&&F.x>=q&&G!==F.x&&Q(jU.x||F.x===U.x&&K(U,F)))&&(U=F,Y=V)),F=F.next}while(F!==W);return U}(k,B);if(!U)return B;var G=nt(U,k);return F(G,G.next),F(U,U.next)}function K(k,B){return Z(k.prev,k,B.prev)<0&&Z(B.next,k,k.next)<0}function z(k,B,U,F,G){return(k=1431655765&((k=858993459&((k=252645135&((k=16711935&((k=(k-U)*G|0)|k<<8))|k<<4))|k<<2))|k<<1))|(B=1431655765&((B=858993459&((B=252645135&((B=16711935&((B=(B-F)*G|0)|B<<8))|B<<4))|B<<2))|B<<1))<<1}function Y(k){var B=k,U=k;do{(B.x=(k-$)*(j-H)&&(k-$)*(F-H)>=(U-$)*(B-H)&&(U-$)*(j-H)>=(G-$)*(F-H)}function X(k,B){return k.next.i!==B.i&&k.prev.i!==B.i&&!function(k,B){var U=k;do{if(U.i!==k.i&&U.next.i!==k.i&&U.i!==B.i&&U.next.i!==B.i&&tt(U,U.next,k,B))return!0;U=U.next}while(U!==k);return!1}(k,B)&&(st(k,B)&&st(B,k)&&function(k,B){var U=k,F=!1,G=(k.x+B.x)/2,j=(k.y+B.y)/2;do{U.y>j!=U.next.y>j&&U.next.y!==U.y&&G<(U.next.x-U.x)*(j-U.y)/(U.next.y-U.y)+U.x&&(F=!F),U=U.next}while(U!==k);return F}(k,B)&&(Z(k.prev,k,B.prev)||Z(k,B.prev,B))||J(k,B)&&Z(k.prev,k,k.next)>0&&Z(B.prev,B,B.next)>0)}function Z(k,B,U){return(B.y-k.y)*(U.x-B.x)-(B.x-k.x)*(U.y-B.y)}function J(k,B){return k.x===B.x&&k.y===B.y}function tt(k,B,U,F){var G=it(Z(k,B,U)),j=it(Z(k,B,F)),$=it(Z(U,F,k)),H=it(Z(U,F,B));return G!==j&&$!==H||(!(0!==G||!et(k,U,B))||(!(0!==j||!et(k,F,B))||(!(0!==$||!et(U,k,F))||!(0!==H||!et(U,B,F)))))}function et(k,B,U){return B.x<=Math.max(k.x,U.x)&&B.x>=Math.min(k.x,U.x)&&B.y<=Math.max(k.y,U.y)&&B.y>=Math.min(k.y,U.y)}function it(k){return k>0?1:k<0?-1:0}function st(k,B){return Z(k.prev,k,k.next)<0?Z(k,B,k.next)>=0&&Z(k,k.prev,B)>=0:Z(k,B,k.prev)<0||Z(k,k.next,B)<0}function nt(k,B){var U=new ot(k.i,k.x,k.y),F=new ot(B.i,B.x,B.y),G=k.next,j=B.prev;return k.next=B,B.prev=k,U.next=G,G.prev=U,F.next=U,U.prev=F,j.next=F,F.prev=j,F}function at(k,B,U,F){var G=new ot(k,B,U);return F?(G.next=F.next,G.prev=F,F.next.prev=G,F.next=G):(G.prev=G,G.next=G),G}function rt(k){k.next.prev=k.prev,k.prev.next=k.next,k.prevZ&&(k.prevZ.nextZ=k.nextZ),k.nextZ&&(k.nextZ.prevZ=k.prevZ)}function ot(k,B,U){this.i=k,this.x=B,this.y=U,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function ht(k,B,U,F){for(var G=0,j=B,$=U-F;j0&&(F+=k[G-1].length,U.holes.push(F))}return U}},15369:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.catalystSDK=void 0;var F=U(83387),G=U(52931),j=U(71195),$=U(6818),H=U(37367),V=U(24445),W=U(2895),q=U(83976),K=U(79140),z=function(){function k(){}return Object.defineProperty(k.prototype,"genericRequest",{get:function(){return this._genericRequest.reset(),this._genericRequest},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"cloudScript",{get:function(){return new F.CloudScript(this._genericRequest)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"featureAccess",{get:function(){return this._featureAccess.reset(),this._featureAccess},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"authHandler",{get:function(){return this._authHandler.reset(),this._authHandler},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"mailer",{get:function(){return this._mailer.reset(),this._mailer},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"gameAssetsExperiments",{get:function(){return this._gameAssetsExperiments.reset(),this._gameAssetsExperiments},enumerable:!1,configurable:!0}),k.prototype.init=function(k,B){if(0===k.length){throw{name:"CatalystSdk.init error",message:"No Client ID"}}G.CommonInfo.init(k,B),this._http=new q.HttpRequest,this._authHandler=new K.AuthHandler,this._genericRequest=new W.GenericRequest(this._http,this.authHandler).useAuthorization(),this.leaderboard=new H.Leaderboard(this._genericRequest),this._featureAccess=new j.FeatureAccess(this._genericRequest,this._authHandler),this._mailer=new V.Mailer(this._genericRequest),this._gameAssetsExperiments=new $.GameAssetsExperiments(this._genericRequest)},k.prototype.setToken=function(k,B,U){void 0===U&&(U={header:!0,body:!1}),G.CommonInfo.setToken(k,B,U)},k}();B.catalystSDK=new z},32943:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.CatalystSdkError=void 0;var F=U(95912),G=U(6556),j=function(k){function B(U,F,G,j){var $=this;return B.isCloudScriptErrorResponse(U,G)?($=k.call(this,G.result.message)||this).errorInfo=G:$=k.call(this,G)||this,F&&($.name=F),$.code=U,$.httpStatus=j,$}return(0,F.__extends)(B,k),B.isCloudScriptErrorResponse=function(k,B){return k===G.EErrorCode.ScriptError||k===G.EErrorCode.CloudScriptRequestError},B.fromHttpStatus=function(k,U,F){var j;switch(k){case 412:j=G.EErrorCode.PreconditionFailed,console.warn("HTTP 412 Precondition Failed detected: ".concat(U||"Read-only Character enabled"),{httpStatus:k,message:U,name:F,timestamp:(new Date).toISOString()});break;case 401:case 403:j=G.EErrorCode.ReauthenticationRequired;break;case 408:case 504:j=G.EErrorCode.RequestTimeout;break;case 429:j=G.EErrorCode.RetryRequired;break;case 501:case 502:case 503:j=G.EErrorCode.NotImplemented;break;default:j=k>=400&&k<500?G.EErrorCode.RequestError:k>=500?G.EErrorCode.ConnectionFail:G.EErrorCode.Unknown}return new B(j,F||"HTTP ".concat(k," Error"),U||"Request failed with status ".concat(k),k)},B.stringify=function(k){var B;return k instanceof Error?"".concat(null!==(B=k.stack)&&void 0!==B?B:k.message):JSON.stringify(k)},B.prototype.isPreconditionFailed=function(){return this.code===G.EErrorCode.PreconditionFailed||412===this.httpStatus},B.prototype.isHttpStatus=function(k){return this.httpStatus===k},B.prototype.getUserFriendlyMessage=function(){switch(this.code){case G.EErrorCode.PreconditionFailed:return"The request could not be completed due to a precondition failure.";case G.EErrorCode.ReauthenticationRequired:return"Your session has expired. Please log in again.";case G.EErrorCode.RequestTimeout:return"The request timed out. Please check your connection and try again.";case G.EErrorCode.ConnectionFail:return"Unable to connect to the server. Please check your internet connection.";case G.EErrorCode.RetryRequired:return"The server is busy. Please try again in a moment.";case G.EErrorCode.GameTokenNotPresent:return"Authentication token is missing. Please log in again.";default:return this.message||"An unexpected error occurred. Please try again."}},B}(Error);B.CatalystSdkError=j},69016:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},83387:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.CloudScript=void 0;var F=U(95912),G=U(32943),j=U(27596),$=U(85262),H=U(52931),V=U(32009),W=U(6962),q=function(k){function B(B){var U=k.call(this,B)||this;return U.setServiceUrlVersion(U.getVersion()),U}return(0,F.__extends)(B,k),B.prototype.execute=function(k,B,U){return(0,F.__awaiter)(this,void 0,void 0,(function(){var G,j,$;return(0,F.__generator)(this,(function(F){switch(F.label){case 0:G={scriptName:k,params:B},F.label=1;case 1:return F.trys.push([1,3,,4]),j=this.extractResponse,[4,this.request(V.EHttpRequestType.POST,this._serviceURL,G,U)];case 2:return[2,j.apply(this,[F.sent()])];case 3:return $=F.sent(),[2,Promise.reject($)];case 4:return[2]}}))}))},B.prototype.extractResponse=function(k){var B=new W.HttpResponse;if(B.status=k.status,B.isOK()){var U=k.data;if(W.HttpResponse.isStatusOK(U.status))return B.data=U.result,B;throw new G.CatalystSdkError(j.EErrorCode.ScriptError,"".concat(k.status),k.data)}if(W.HttpResponse.isClientError(B.status)){var F=k.data;throw new G.CatalystSdkError(j.EErrorCode.CloudScriptRequestError,"".concat(k.status),void 0!==F.result?F:{result:k.data})}throw new G.CatalystSdkError(j.EErrorCode.CloudScriptRequestError,"".concat(k.status),k.data)},B.prototype.setServiceUrlVersion=function(B){return k.prototype.setVersion.call(this,B),this._serviceURL="".concat(H.CommonInfo.ServiceRootURL,"/game-cortex-server/").concat(this.getVersion(),"/cloudscripts.execute"),this},B.prototype.reset=function(){return k.prototype.reset.call(this),this.setServiceUrlVersion("v2"),this},B}($.BaseRequest);B.CloudScript=q},51901:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),(0,U(95912).__exportStar)(U(83387),B)},85262:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BaseRequest=void 0;var F=U(95912),G=U(2895),j=function(){function k(k){this._version="v1",this._request=null!=k?k:new G.GenericRequest,this.reset()}return k.prototype.reset=function(){return this._request.reset(),this},k.prototype.timeoutMS=function(k){return this._request.requestTimeoutMS(k),this},k.prototype.useIdempotency=function(k){return this._request.useIdempotency(k),this},k.prototype.requestID=function(k){return this._request.requestID(k),this},k.prototype.useTokenInBody=function(k){return this._request.useTokenInBody(k),this},k.prototype.useRetry=function(k){return this._request.useRetry(k),this},k.prototype.setRetryOption=function(k){return this._request.setRetryOption(k),this},k.prototype.setVersion=function(k){return this._version=k,this},k.prototype.getVersion=function(){return this._version},k.prototype.getRetryOption=function(){return this._request.getRetryOption()},k.prototype.useCredentials=function(){return this._request.useCredentials(),this},k.prototype.request=function(k,B,U,G,j){return(0,F.__awaiter)(this,void 0,void 0,(function(){return(0,F.__generator)(this,(function(F){return[2,this._request.request(k,B,U,G,j)]}))}))},k}();B.BaseRequest=j},52931:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.CommonInfo=void 0;var F=U(54770),G=function(){function k(){}return k.init=function(B,U){var G,j;k.Tokens=new Map,k.Tokens.set("header",new Map),k.Tokens.set("body",new Map),k.ClientID=B,k.ServiceRootURL=U.serviceRootURL,k.RequestTimeout=null!==(G=U.requestTimeout)&&void 0!==G?G:F.Constants.DefaultTimeoutMS,k.UseIdempotency=null!==(j=U.useIdempotency)&&void 0!==j?j:k.UseIdempotency,(null==U?void 0:U.retryOption)&&(k.RetryOption=U.retryOption)},Object.defineProperty(k,"headerToken",{get:function(){return k.Tokens.get("header")},enumerable:!1,configurable:!0}),Object.defineProperty(k,"bodyToken",{get:function(){return k.Tokens.get("body")},enumerable:!1,configurable:!0}),k.setToken=function(B,U,F){var G,j;void 0===F&&(F={header:!0,body:!1}),F.header&&(null===(G=k.headerToken)||void 0===G||G.set(B,U)),F.body&&(null===(j=k.bodyToken)||void 0===j||j.set(B,U))},k.UseIdempotency=!1,k}();B.CommonInfo=G},54770:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.Constants=void 0;var U=function(){function k(){}return k.DefaultTimeoutMS=3e4,k.DefaultRetryDelayMS=5e3,k.DefaultRetryMaxDelayMS=15e3,k.DefaultRetryRequiredStatusCodes=new Set([202,408,500,502,503,504]),k.ReauthenticationRequiredStatusCodes=new Set([401]),k}();B.Constants=U},6556:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.EErrorCode=void 0,function(k){k[k.NoError=0]="NoError",k[k.Unknown=1]="Unknown",k[k.InvalidMethodType=2]="InvalidMethodType",k[k.RequestTimeout=3]="RequestTimeout",k[k.ConnectionFail=4]="ConnectionFail",k[k.RetryRequired=5]="RetryRequired",k[k.IdempotencyError=6]="IdempotencyError",k[k.NotImplemented=7]="NotImplemented",k[k.CloudScriptRequestError=8]="CloudScriptRequestError",k[k.ScriptError=9]="ScriptError",k[k.RequestError=10]="RequestError",k[k.ReauthenticationRequired=11]="ReauthenticationRequired",k[k.GameTokenNotPresent=12]="GameTokenNotPresent",k[k.PreconditionFailed=13]="PreconditionFailed"}(B.EErrorCode||(B.EErrorCode={}))},27596:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(95912);(0,F.__exportStar)(U(85262),B),(0,F.__exportStar)(U(52931),B),(0,F.__exportStar)(U(54770),B),(0,F.__exportStar)(U(6556),B)},71195:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.FeatureAccess=void 0;var F=U(95912),G=U(32943),j=U(27596),$=U(85262),H=U(52931),V=U(32009),W=function(k){function B(B,U){var F=k.call(this,B)||this;return F._authHandler=U,F.setServiceUrlVersion("v2"),F}return(0,F.__extends)(B,k),B.prototype.getFeatures=function(){return(0,F.__awaiter)(this,void 0,void 0,(function(){var k,U;return(0,F.__generator)(this,(function(F){switch(F.label){case 0:this.setEndpoint(B.GetFeaturesEndpoint),this.setServiceUrlEndpoint(B.GetFeaturesEndpoint),F.label=1;case 1:return F.trys.push([1,3,,4]),[4,this.request(V.EHttpRequestType.GET,this._serviceURL,{clientID:H.CommonInfo.ClientID})];case 2:return k=F.sent(),[3,4];case 3:throw U=F.sent(),new G.CatalystSdkError(j.EErrorCode.Unknown,"Error calling ".concat(this._serviceURL),G.CatalystSdkError.stringify(U));case 4:if(k.isOK())return[2,k];throw new G.CatalystSdkError(j.EErrorCode.RequestError,"Call to ".concat(this._serviceURL," failed with status ").concat(k.status),JSON.stringify(k))}}))}))},B.prototype.update=function(){return(0,F.__awaiter)(this,void 0,void 0,(function(){var k,U;return(0,F.__generator)(this,(function(F){switch(F.label){case 0:this.setEndpoint(B.UpdateEndpoint),this.setServiceUrlEndpoint(B.UpdateEndpoint),F.label=1;case 1:return F.trys.push([1,3,,4]),[4,this.request(V.EHttpRequestType.POST,this._serviceURL,{clientID:H.CommonInfo.ClientID,identityToken:this._authHandler.getIdentityToken()})];case 2:return k=F.sent(),[3,4];case 3:throw U=F.sent(),new G.CatalystSdkError(j.EErrorCode.Unknown,"Error calling ".concat(this._serviceURL),G.CatalystSdkError.stringify(U));case 4:return k.isOK()?[4,this._authHandler.renewJWT()]:[3,6];case 5:return F.sent(),[2,k];case 6:throw new G.CatalystSdkError(j.EErrorCode.RequestError,"Call to ".concat(this._serviceURL," failed with status ").concat(k.status),JSON.stringify(k))}}))}))},B.prototype.setEndpoint=function(k){return this._currentEndpoint=k,this},B.prototype.getEndpoint=function(){return this._currentEndpoint},B.prototype.setServiceUrlVersion=function(B){return k.prototype.setVersion.call(this,B),this._serviceURL="".concat(H.CommonInfo.ServiceRootURL,"/game-cortex-server/v2/featureAccess.").concat(this.getEndpoint()),this},B.prototype.setServiceUrlEndpoint=function(k){return this.setEndpoint(k),this._serviceURL="".concat(H.CommonInfo.ServiceRootURL,"/game-cortex-server/v2/featureAccess.").concat(this.getEndpoint()),this},B.prototype.reset=function(){return k.prototype.reset.call(this),this.setServiceUrlVersion("v2"),this},B.GetFeaturesEndpoint="getFeatures",B.UpdateEndpoint="update",B}($.BaseRequest);B.FeatureAccess=W},79543:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),(0,U(95912).__exportStar)(U(71195),B)},92571:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.GameAssetsExperiments=B.SourceType=void 0;var F=U(95912),G=U(27596),j=U(41093);!function(k){k.CMS="CMS",k.LocalAssets="LocalAssets",k.GlobalEntities="GlobalEntities"}(B.SourceType||(B.SourceType={}));var $=function(k){function B(B){var U=k.call(this,B)||this;return k.prototype.setVersion.call(U,"v2"),U}return(0,F.__extends)(B,k),B.prototype.getAllExperimentsWithCustomData=function(k){return(0,F.__awaiter)(this,void 0,void 0,(function(){var B;return(0,F.__generator)(this,(function(U){return B="".concat(G.CommonInfo.ServiceRootURL,"/game-cortex-server/").concat(this.getVersion(),"/cloudscripts.execute"),[2,this.request(j.EHttpRequestType.POST,B,{userID:k,scriptName:"assetExperiments.getAllExperimentsWithCustomData"})]}))}))},B.prototype.getAssetsForExperimentsVariations=function(k,B,U){return(0,F.__awaiter)(this,void 0,void 0,(function(){var $,H;return(0,F.__generator)(this,(function(F){return $="".concat(G.CommonInfo.ServiceRootURL,"/game-cortex-server/").concat(this.getVersion(),"/cloudscripts.execute"),H={sourceType:k,experimentVariations:U},[2,this.request(j.EHttpRequestType.POST,$,{userID:B,scriptName:"assetExperiments.getAssetsForExperimentsVariations",params:H})]}))}))},B}(G.BaseRequest);B.GameAssetsExperiments=$},6818:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),(0,U(95912).__exportStar)(U(92571),B)},79600:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(95912);(0,F.__exportStar)(U(15369),B),(0,F.__exportStar)(U(32943),B),(0,F.__exportStar)(U(69016),B),(0,F.__exportStar)(U(51901),B),(0,F.__exportStar)(U(27596),B),(0,F.__exportStar)(U(79543),B),(0,F.__exportStar)(U(91801),B),(0,F.__exportStar)(U(85108),B),(0,F.__exportStar)(U(41093),B),(0,F.__exportStar)(U(56230),B),(0,F.__exportStar)(U(6818),B)},85108:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),(0,U(95912).__exportStar)(U(37367),B)},37367:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.Leaderboard=void 0;var F=U(95912),G=U(52931),j=function(){function k(k){this._genericRequest=k}return k.prototype.getUsers=function(){console.log("Leaderboard.getUsers"),this.call()},k.prototype.call=function(){return(0,F.__awaiter)(this,void 0,void 0,(function(){return(0,F.__generator)(this,(function(B){switch(B.label){case 0:return[4,this._genericRequest.request("get","".concat(G.CommonInfo.ServiceRootURL,"/game-cortex-server/").concat(k.Version,"/call"))];case 1:return[2,B.sent()]}}))}))},k.Version="v1",k}();B.Leaderboard=j},24445:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.Mailer=void 0;var F=U(95912),G=U(27596),j=U(85262),$=U(41093),H=function(k){function B(B){var U=k.call(this,B)||this;return U.setServiceUrlVersion("v1"),U}return(0,F.__extends)(B,k),B.prototype.setServiceUrlVersion=function(B){return k.prototype.setVersion.call(this,B),this},B.prototype.listMail=function(k,B,U,j,H,V){return(0,F.__awaiter)(this,void 0,void 0,(function(){var W;return(0,F.__generator)(this,(function(F){return W="".concat(G.CommonInfo.ServiceRootURL,"/game-cortex-server/").concat(this.getVersion(),"/mailer.listMail"),[2,this.request($.EHttpRequestType.GET,W,{userID:k,templateID:B,limit:U,offset:j,sortBy:H,sortDirection:V})]}))}))},B}(j.BaseRequest);B.Mailer=H},91801:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),(0,U(95912).__exportStar)(U(24445),B)},32009:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.EHttpRequestType=void 0,function(k){k.POST="post",k.GET="get",k.PUT="put",k.PATCH="patch",k.DELETE="delete",k.HEAD="head"}(B.EHttpRequestType||(B.EHttpRequestType={}))},2895:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.GenericRequest=void 0;var F=U(95912),G=U(32943),j=U(52931),$=U(54770),H=U(6556),V=U(32009),W=U(83976),q=U(61068),K=function(){function k(k,B){this._newBodyTokens=new Array,this._shouldIncludeCredentials=!1,this._shouldIncludeAuthorization=!1,this._idempotencyKeyName="Idempotency-Key",this._http=null!=k?k:new W.HttpRequest,this._authHandler=B}return Object.defineProperty(k.prototype,"idempotency",{get:function(){return this._idempotency},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"lastRequestID",{get:function(){return this._lastRequestID},enumerable:!1,configurable:!0}),k.prototype.reset=function(){var k,B,U;this._timeoutMS=j.CommonInfo.RequestTimeout,this._idempotency=j.CommonInfo.UseIdempotency,this._useRetry=(null===(k=j.CommonInfo.RetryOption)||void 0===k?void 0:k.retryCount)>0;var F=null===(U=null===(B=j.CommonInfo.RetryOption)||void 0===B?void 0:B.retryRequiredStatusCodes)||void 0===U?void 0:U.length;return this._retryRequiredStatusCodes=F&&F>0?new Set(j.CommonInfo.RetryOption.retryRequiredStatusCodes):$.Constants.DefaultRetryRequiredStatusCodes,this._lastRequestID="",this},k.prototype.requestTimeoutMS=function(k){return this._timeoutMS=k,this},k.prototype.useIdempotency=function(k){return this._idempotency=k,this},k.prototype.requestID=function(k){return this._idempotency=!0,this._newRequestID=k,this},k.prototype.useTokenInBody=function(k){var B,U;(null===(B=j.CommonInfo.headerToken)||void 0===B?void 0:B.has(k))?(null===(U=j.CommonInfo.headerToken)||void 0===U?void 0:U.get(k))?this._newBodyTokens.push(k):console.log("The token[".concat(k,"] has no value.")):console.log("Cannot find the token[".concat(k,"]"));return this},k.prototype.useRetry=function(k){return this._useRetry=k,this},k.prototype.useCredentials=function(){return this._shouldIncludeCredentials=!0,this},k.prototype.useAuthorization=function(){return this._shouldIncludeAuthorization=!0,this},k.prototype.setRetryOption=function(k){return this._useRetry=!0,this._retryOption=k,void 0!==k.retryRequiredStatusCodes&&k.retryRequiredStatusCodes.forEach(this._retryRequiredStatusCodes.add,this._retryRequiredStatusCodes),this},k.prototype.getRetryOption=function(){var k;if(this._useRetry)return null!==(k=this._retryOption)&&void 0!==k?k:j.CommonInfo.RetryOption},k.prototype.request=function(k,B,U,G,j){var $;return(0,F.__awaiter)(this,void 0,void 0,(function(){var V,W;return(0,F.__generator)(this,(function(F){switch(F.label){case 0:V="string"==typeof k?this.stringToHttpRequestType(k):k,this._idempotency&&(this._lastRequestID=null!==($=this._newRequestID)&&void 0!==$?$:this.uuidv4(),this._newRequestID=void 0),F.label=1;case 1:return F.trys.push([1,3,,6]),[4,this.sendRequest(V,B,U,G,j)];case 2:return[2,F.sent()];case 3:return(W=F.sent()).code===H.EErrorCode.ReauthenticationRequired&&this._authHandler?[4,this._authHandler.renewJWT()]:[3,5];case 4:return F.sent(),[2,this.sendRequest(V,B,U,G,j)];case 5:throw W;case 6:return[2]}}))}))},k.prototype.sendRequest=function(k,B,U,j,$){return(0,F.__awaiter)(this,void 0,void 0,(function(){var V,W,K,z,Y;return(0,F.__generator)(this,(function(Q){switch(Q.label){case 0:if((V=new q.HttpRequestInfo(k,B)).timeoutMS=this._timeoutMS,V.shouldIncludeCredentials=this._shouldIncludeCredentials,this._shouldIncludeAuthorization){if(!this._authHandler)throw new G.CatalystSdkError(H.EErrorCode.GameTokenNotPresent,void 0,"Attempt to call SDK while request does not have access to auth handler");if(!(W=this._authHandler.getGameJWT()))throw K=0===this._authHandler.getUserID()?"user is not logged in yet":"user is logged out",new G.CatalystSdkError(H.EErrorCode.GameTokenNotPresent,void 0,"Attempt to call SDK while ".concat(K));V.addHeader("Authorization",W)}return z=U,this._idempotency&&(z=(0,F.__assign)((0,F.__assign)({},z),{requestID:this._lastRequestID}),V.addHeader(this._idempotencyKeyName,this._lastRequestID)),this._newBodyTokens.length>0&&this._newBodyTokens.forEach((function(k){return V.useTokenInBody(k)})),z&&V.setBody(z),$&&V.setUrlSearchParamsBody($),(Y=null!=j?j:this.getRetryOption())&&(V.retryOption=Y,V.retryRequiredStatusCodes=this._retryRequiredStatusCodes),[4,this._http.send(V)];case 1:return[2,Q.sent()]}}))}))},k.prototype.stringToHttpRequestType=function(k){var B=V.EHttpRequestType.POST;switch(k.toLowerCase()){case"get":B=V.EHttpRequestType.GET;break;case"post":B=V.EHttpRequestType.POST;break;default:throw new G.CatalystSdkError(H.EErrorCode.InvalidMethodType,"GenericRequest.stringToHttpRequestType","undefined request method type: ".concat(k))}return B},k.prototype.uuidv4=function(){return"".concat(1e7,"-").concat(1e3,"-").concat(4e3,"-").concat(8e3,"-").concat(1e11).replace(/[018]/g,(function(k){return(parseInt(k)^crypto.getRandomValues(new Uint8Array(1))[0]&15>>parseInt(k)/4).toString(16)}))},k}();B.GenericRequest=K},83976:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.HttpRequest=void 0;var F=U(95912),G=U(32943),j=U(54770),$=U(6556),H=U(6962),V=function(){function k(){}return k.prototype.send=function(k){var B,U,G,H;return(0,F.__awaiter)(this,void 0,void 0,(function(){var V,W;return(0,F.__generator)(this,(function(F){switch(F.label){case 0:void 0!==k&&(this._requestInfo=k,this._retryCount=null!==(U=null===(B=this._requestInfo.retryOption)||void 0===B?void 0:B.retryCount)&&void 0!==U?U:0,this._retryDelayMS=null!==(H=null===(G=this._requestInfo.retryOption)||void 0===G?void 0:G.retryIntervalMS)&&void 0!==H?H:j.Constants.DefaultRetryDelayMS),F.label=1;case 1:return F.trys.push([1,3,,7]),[4,this.fetch(this._requestInfo)];case 2:return[2,F.sent()];case 3:if(V=F.sent(),W=!1,void 0!==V.code)switch(V.code){case $.EErrorCode.RequestTimeout:case $.EErrorCode.RetryRequired:W=!0}else W=!0;return W&&this._retryCount>0?(--this._retryCount,[4,this.waitInterval(this._retryDelayMS)]):[3,5];case 4:return F.sent(),this.updateRetryInterval(),[2,this.send()];case 5:return[2,Promise.reject(V)];case 6:return[3,7];case 7:return[2]}}))}))},k.prototype.fetch=function(k){return(0,F.__awaiter)(this,void 0,void 0,(function(){var B;return(0,F.__generator)(this,(function(U){switch(U.label){case 0:return[4,Promise.race([fetch(k.getURL(),k.getRequestInit()),this.waitInterval(k.timeoutMS)])];case 1:if(B=U.sent(),clearTimeout(this._timerID),B instanceof Response){if(j.Constants.ReauthenticationRequiredStatusCodes.has(B.status))throw new G.CatalystSdkError($.EErrorCode.ReauthenticationRequired,"".concat(B.status),"the status ".concat(B.status," requires reauthentication."));if(this.isRetryRequired(B.status))throw new G.CatalystSdkError($.EErrorCode.RetryRequired,"".concat(B.status),"the status ".concat(B.status," requires retry."));return[2,(new H.HttpResponse).set(B)]}throw"number"==typeof B?new G.CatalystSdkError($.EErrorCode.RequestTimeout):new G.CatalystSdkError($.EErrorCode.Unknown)}}))}))},k.prototype.waitInterval=function(k){return(0,F.__awaiter)(this,void 0,void 0,(function(){var B=this;return(0,F.__generator)(this,(function(U){return[2,new Promise((function(U){B._timerID=setTimeout((function(){return U(0)}),k)}))]}))}))},k.prototype.updateRetryInterval=function(){var k,B,U,F;this._retryDelayMS=Math.min(this._retryDelayMS+(null!==(B=null===(k=this._requestInfo.retryOption)||void 0===k?void 0:k.retryIncreamentMS)&&void 0!==B?B:0),null!==(F=null===(U=this._requestInfo.retryOption)||void 0===U?void 0:U.retryMaxDelayMS)&&void 0!==F?F:j.Constants.DefaultRetryMaxDelayMS)},k.prototype.isRetryRequired=function(k){var B;return null===(B=this._requestInfo.retryRequiredStatusCodes)||void 0===B?void 0:B.has(k)},k}();B.HttpRequest=V},61068:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.HttpRequestInfo=void 0;var F=U(95912),G=U(52931),j=U(32009),$=function(){function k(k,B,U){var F,j=this;this.timeoutMS=G.CommonInfo.RequestTimeout,this._queryParameters=new Map,this._newBodyTokens=new Map,this.shouldIncludeCredentials=!1,this._method=k,this._url=this.ensureUrlHasProtocol(B),this._header=null!=U?U:{},null===(F=G.CommonInfo.headerToken)||void 0===F||F.forEach((function(k,B){j._header[B]=k}))}return k.prototype.addHeader=function(k,B){return this._header[k]=B,this},k.prototype.getHeader=function(k){return this._header[k]},k.prototype.useTokenInBody=function(k){var B,U;if(null===(B=G.CommonInfo.headerToken)||void 0===B?void 0:B.has(k)){var F=null===(U=G.CommonInfo.headerToken)||void 0===U?void 0:U.get(k);F?this._newBodyTokens.set(k,F):console.log("The token[".concat(k,"] has no value."))}else console.log("Cannot find the token[".concat(k,"]"));return this},k.prototype.addQueryParameter=function(k,B){return this._queryParameters.set(k,B),this},k.prototype.setBody=function(k){var B,U=(0,F.__assign)((0,F.__assign)({},k),{clientID:G.CommonInfo.ClientID});if(null===(B=G.CommonInfo.bodyToken)||void 0===B||B.forEach((function(k,B){U[B]=k})),this._newBodyTokens.size>0&&this._newBodyTokens.forEach((function(k,B){return U[B]=k})),this._method===j.EHttpRequestType.GET)for(var $ in U)"object"!=typeof U[$]&&(void 0!==U[$]&&this.addQueryParameter($,U[$]),delete U[$]);return 0!==Object.keys(U).length&&(this.addHeader("Content-Type","application/json"),this._body=U),this},k.prototype.setUrlSearchParamsBody=function(k){this._method!==j.EHttpRequestType.GET&&this.addHeader("Content-Type","application/x-www-form-urlencoded"),this._body=k},k.prototype.getBody=function(){return JSON.stringify(this._body)},k.prototype.getURL=function(){var k=this._url;if(this._queryParameters.size>0){var B=[];this._queryParameters.forEach((function(k,U){B.push("".concat(encodeURIComponent(U),"=").concat(encodeURIComponent(k)))})),k+="".concat(-1!==this._url.indexOf("?")?"&":"?").concat(B.join("&"))}return k},k.prototype.getRequestInit=function(){var k={method:this._method,headers:this._header,redirect:"follow"};return this.shouldIncludeCredentials&&(k.credentials="include"),void 0!==this._body&&("application/json"===this._header["Content-Type"]?k.body=JSON.stringify(this._body):("application/x-www-form-urlencoded"===this._header["Content-Type"]&&(k.headers={"Content-Type":"application/x-www-form-urlencoded"},k.credentials="omit"),k.body=this._body)),k},k.prototype.ensureUrlHasProtocol=function(k){return/^https?/.exec(k)?k:"https://".concat(k)},k}();B.HttpRequestInfo=$},20153:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},6962:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.HttpResponse=void 0;var F=U(95912),G=U(32943),j=U(6556),$=function(){function k(){}return k.prototype.set=function(k){return(0,F.__awaiter)(this,void 0,void 0,(function(){var B,U,$;return(0,F.__generator)(this,(function(F){switch(F.label){case 0:return this.status=k.status,B=this,[4,this.obtainArrayBuffer(k)];case 1:if(B._body=F.sent(),U=this._body.byteLength>0?this.decodeData(this._body):"",null==($=k.headers.get("Content-Type"))?void 0:$.startsWith("application/json"))this.data=JSON.parse(U);else if("application/octet-stream"===$)throw new G.CatalystSdkError(j.EErrorCode.NotImplemented,"HttpResponse.set","Not implemented yet. ".concat($));return[2,this]}}))}))},Object.defineProperty(k.prototype,"requestID",{get:function(){var k;return null===(k=this.data)||void 0===k?void 0:k.requestID},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"body",{get:function(){return this._body},enumerable:!1,configurable:!0}),k.prototype.isOK=function(){return k.isStatusOK(this.status)},k.prototype.obtainArrayBuffer=function(k){return(0,F.__awaiter)(this,void 0,void 0,(function(){return(0,F.__generator)(this,(function(B){return[2,k.arrayBuffer()]}))}))},k.prototype.decodeData=function(k){try{return(new TextDecoder).decode(k)}catch(B){return(new(U(40537).TextDecoder)).decode(k)}},k.isStatusOK=function(k){return"number"==typeof k&&(k>=200&&k<300)},k.isClientError=function(k){return k>=400&&k<500},k}();B.HttpResponse=$},41093:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(95912);(0,F.__exportStar)(U(32009),B),(0,F.__exportStar)(U(2895),B),(0,F.__exportStar)(U(83976),B),(0,F.__exportStar)(U(61068),B),(0,F.__exportStar)(U(20153),B),(0,F.__exportStar)(U(6962),B)},79140:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.AuthHandler=void 0;var F,G=U(95912),j=(0,G.__importStar)(U(78686)),$=U(32943),H=U(27596),V=U(85262),W=U(52931),q=U(32009),K=(0,G.__importStar)(U(33770));!function(k){k.Login="coreGame.login",k.RenewJWT="coreGame.renewJWT",k.RenewIdentity="/oauth/token",k.SetSession="coreGame.setSession"}(F||(F={}));var z=function(k){function B(B){var U=k.call(this,B)||this;U.IsWorkerEnabled=!1,U._authInfo=null,U._serviceWorkerName="jwt-renewal-worker",U._renewJWTTimerID=null,U._renewIdentityTimerID=null,U._callbacks={},U._identityUri="";try{j.defaults.storage=sessionStorage,U._worker=K.createServiceWorker(U._serviceWorkerName),U.IsWorkerEnabled=!0,U.registerWorkerListener()}catch(F){U.IsWorkerEnabled=!1,console.log("Could not create Worker",F)}return U}return(0,G.__extends)(B,k),B.prototype.reset=function(){return k.prototype.reset.call(this),this.setServiceUrlVersion(B.Version),this},B.prototype.setAuthInfo=function(k){this._authInfo=k},B.prototype.getUserID=function(){var k,B;return null!==(B=null===(k=this._authInfo)||void 0===k?void 0:k.userID)&&void 0!==B?B:0},B.prototype.getIdentityToken=function(){var k,B;return null!==(B=null===(k=this._authInfo)||void 0===k?void 0:k.identityToken)&&void 0!==B?B:""},B.prototype.setIdentityToken=function(k){this._authInfo&&(this._authInfo.identityToken=k)},B.prototype.getRefreshToken=function(){var k,B;return null!==(B=null===(k=this._authInfo)||void 0===k?void 0:k.refreshToken)&&void 0!==B?B:""},B.prototype.setRefreshToken=function(k){this._authInfo&&(this._authInfo.refreshToken=k)},B.prototype.getAuthToken=function(){var k,B;return null!==(B=null===(k=this._authInfo)||void 0===k?void 0:k.authToken)&&void 0!==B?B:""},B.prototype.getPremises=function(){var k,B;return null!==(B=null===(k=this._authInfo)||void 0===k?void 0:k.premises)&&void 0!==B?B:""},B.prototype.setIdentityUri=function(k){this._identityUri=k},B.prototype.getIdentityUri=function(){return this._identityUri},B.prototype.getTimeToExpireMS=function(k){var U=k.exp,F=k.iat;if(!U||0===F&&isNaN(F))return B.TimeToExpireDefaultMS;var G=1e3*(U-F);return Math.max(G-B.TokenExpiryTimeOffsetMS,B.TokenExpiryTimeOffsetMS)},B.prototype.handleRequestError=function(k,B,U){var F,G,j,V;if(k instanceof $.CatalystSdkError)return 412===k.httpStatus&&(null===(G=(F=this._callbacks).onPreconditionFailed)||void 0===G||G.call(F,k)),k;if(k instanceof TypeError&&k.message.includes("Failed to fetch"))return new $.CatalystSdkError(H.EErrorCode.ConnectionFail,B,"Network error: Failed to fetch ".concat(U));if(k&&"object"==typeof k&&"status"in k){var W=k,q=W.message||W.statusText||"Request to ".concat(U," failed"),K=$.CatalystSdkError.fromHttpStatus(W.status,q,B);return 412===W.status&&(null===(V=(j=this._callbacks).onPreconditionFailed)||void 0===V||V.call(j,K)),K}return new $.CatalystSdkError(H.EErrorCode.Unknown,B,"Unknown error: ".concat($.CatalystSdkError.stringify(k)))},B.prototype.login=function(k){var U,j;return(0,G.__awaiter)(this,void 0,void 0,(function(){var $,H,V,W,K,z;return(0,G.__generator)(this,(function(Y){switch(Y.label){case 0:H=this.getRequestURL(F.Login),V=null;try{V=null!==(U=this.getSessionCodeFromUrl())&&void 0!==U?U:window.localStorage.getItem(B.SessionCodeKey)}catch(Q){console.log("error getting session code from local storage",Q)}W={metadata:{}},V&&(W.code=V),k&&(W.metadata=(0,G.__assign)({},k)),(K=null!==(j=localStorage.getItem("ajs_anonymous_id"))&&void 0!==j?j:void 0)&&(W.metadata.anonymousID=K),Y.label=1;case 1:return Y.trys.push([1,3,,4]),this._request.useCredentials(),[4,this.request(q.EHttpRequestType.POST,H,W)];case 2:return $=Y.sent(),[3,4];case 3:throw z=Y.sent(),this.handleRequestError(z,"LoginError",H);case 4:return this.processTokenResponse($,H),[2,$]}}))}))},B.prototype.logout=function(){var k,B;this.clearRenewTimer(this._renewJWTTimerID),this.clearRenewTimer(this._renewIdentityTimerID),this.IsWorkerEnabled?this._worker.terminate():(this._renewIdentityTimerID=null,this._renewJWTTimerID=null),j.forget(),this._authInfo=null,null===(B=(k=this._callbacks).onLogout)||void 0===B||B.call(k)},B.prototype.isLoggedIn=function(){var k=j.remember();return this.isValid(k)},B.prototype.setSession=function(){var k,B;return(0,G.__awaiter)(this,void 0,void 0,(function(){var U,j,V,K,z,Y;return(0,G.__generator)(this,(function(G){switch(G.label){case 0:if(!this._authInfo)throw new $.CatalystSdkError(H.EErrorCode.Unknown,"AuthHandler.setSession()","setSession() called without authInfo");j=this.getRequestRetryOptions(),V=this.getRequestURL(F.SetSession),K={client_id:W.CommonInfo.ClientID,identity_uri:this.getIdentityUri(),identity_token:this.getIdentityToken(),refresh_token:this.getRefreshToken(),profile:{premises:this.getPremises()}},G.label=1;case 1:return G.trys.push([1,3,,4]),[4,this.setServiceUrlVersion("v1").setRetryOption(j).request(q.EHttpRequestType.POST,V,K)];case 2:return U=G.sent(),[3,4];case 3:throw z=G.sent(),this.handleRequestError(z,"SetSessionError",V);case 4:if(!(null==U?void 0:U.isOK()))throw(Y=$.CatalystSdkError.fromHttpStatus((null==U?void 0:U.status)||0,"Call to ".concat(V," failed"),"SetSessionError")).isPreconditionFailed()&&(null===(B=(k=this._callbacks).onPreconditionFailed)||void 0===B||B.call(k,Y)),Y;return[2,U]}}))}))},B.prototype.renewJWT=function(){var k,B;return(0,G.__awaiter)(this,void 0,void 0,(function(){var U,V,W,K,z,Y,Q,X,Z;return(0,G.__generator)(this,(function(G){switch(G.label){case 0:this.clearRenewTimer(this._renewJWTTimerID),G.label=1;case 1:if(G.trys.push([1,6,,7]),!this._authInfo)throw new $.CatalystSdkError(H.EErrorCode.Unknown,"AuthHandler.renewJWT()","renewJWT() is called without authInfo");U=void 0,V=this._authInfo,W=V.userID,K=V.authToken,this.setServiceUrlVersion("v2"),z=this.getRequestURL("".concat(F.RenewJWT,"/").concat(W)),G.label=2;case 2:return G.trys.push([2,4,,5]),Y=this.getRequestRetryOptions(),[4,this.setRetryOption(Y).request(q.EHttpRequestType.POST,z,{token:K})];case 3:return U=G.sent(),[3,5];case 4:throw Q=G.sent(),this.handleRequestError(Q,"RenewJWTError",z);case 5:return this.processTokenResponse(U,z),[3,7];case 6:throw X=G.sent(),j.forget(),Z=X instanceof $.CatalystSdkError?X:this.handleRequestError(X,"RenewJWTError","renewJWT"),null===(B=(k=this._callbacks).onRenewJWTError)||void 0===B||B.call(k,Z),X;case 7:return[2]}}))}))},B.prototype.renewIdentityJWT=function(){var k,B;return(0,G.__awaiter)(this,void 0,void 0,(function(){var U,F,j,H,V,W,K,z;return(0,G.__generator)(this,(function(G){switch(G.label){case 0:this.clearRenewTimer(this._renewIdentityTimerID),this.IsWorkerEnabled||(this._renewIdentityTimerID=null),G.label=1;case 1:G.trys.push([1,6,,7]),U=void 0,F=this.getIdentityTokenRenewalRequest(),j=F.url,H=F.params,j.searchParams.append("version","1"),G.label=2;case 2:return G.trys.push([2,4,,5]),V=this.getRequestRetryOptions(),[4,this.request(q.EHttpRequestType.POST,j.toString(),{},V,H)];case 3:return U=G.sent(),[3,5];case 4:throw W=G.sent(),this.handleRequestError(W,"RenewIdentityJWTError",j.toString());case 5:return this.processIdentityResponse(U),[3,7];case 6:throw K=G.sent(),z=K instanceof $.CatalystSdkError?K:this.handleRequestError(K,"RenewIdentityJWTError","renewIdentityJWT"),null===(B=(k=this._callbacks).onRenewJWTError)||void 0===B||B.call(k,z),K;case 7:return[2]}}))}))},B.prototype.getRequestRetryOptions=function(){return{retryCount:10,retryIncreamentMS:2e3,retryMaxDelayMS:B.TokenExpiryTimeOffsetMS}},B.prototype.setServiceUrlVersion=function(B){return k.prototype.setVersion.call(this,B),this._serviceURL="".concat(W.CommonInfo.ServiceRootURL,"/game-cortex-server/").concat(this.getVersion(),"/"),this},B.prototype.getRequestURL=function(k){return"".concat(this._serviceURL).concat(k)},B.prototype.getJWT=function(){var k,B;return null!==(B=null===(k=this._authInfo)||void 0===k?void 0:k.token)&&void 0!==B?B:""},B.prototype.validateAndExtractJWT=function(k){var B=j.read(k);if(this.isValid(B))return B;throw new $.CatalystSdkError(H.EErrorCode.Unknown,"AuthHandler.processJWT()","jwtSessions is invalid")},B.prototype.setGameJWT=function(k){var B,U,G,$;if(!k.data.token)return!1;try{var H=this.validateAndExtractJWT(k.data.token),V=H.claim;j.keep(H);var W=this.getUserID(),q={userID:W,token:this.getAuthToken()};this.setServiceUrlVersion("v2");var K=this.getRequestURL("".concat(F.RenewJWT,"/").concat(W));return this.IsWorkerEnabled?this.setRenewJWTTimer(V):this._renewJWTTimerID=this.setRenewJWTTimerWithSetInterval(V,q,K,this._renewJWTTimerID,void 0),null===(U=(B=this._callbacks).onSetJWT)||void 0===U||U.call(B,"Bearer ".concat(k.data.token)),!0}catch(z){return null===($=(G=this._callbacks).onSetJWTError)||void 0===$||$.call(G,z),!1}},B.prototype.getGameJWT=function(){return j.get()},B.prototype.processTokenResponse=function(k,U){var F,G;if(!(null==k?void 0:k.isOK())){var j=$.CatalystSdkError.fromHttpStatus((null==k?void 0:k.status)||0,"Call to ".concat(U," failed with status ").concat(null==k?void 0:k.status),"processTokenResponse");throw 412===(null==k?void 0:k.status)&&(null===(G=(F=this._callbacks).onPreconditionFailed)||void 0===G||G.call(F,j)),j}if(!this.setGameJWT(k))throw new $.CatalystSdkError(H.EErrorCode.RequestError,"Failed to set JWT ".concat(k.data.token));if(void 0!==k.data.userID){var V=k;this.setAuthInfo(V.data),W.CommonInfo.setToken(B.TokenKeyUserID,"".concat(V.data.userID),{header:!1,body:!0}),W.CommonInfo.IdentityClientId=V.data.identityClientId,this.setIdentityUri(V.data.identityUri),this.setIdentityJWT(V.data.identityToken)}},B.prototype.setIdentityJWT=function(k){if(!k)return!1;try{var U=this.validateAndExtractJWT(k).claim;W.CommonInfo.setToken(B.TokenKeyIdentity,k,{header:!1,body:!1});var F=this.getTimeToExpireMS(U);return this.IsWorkerEnabled?this._worker.postMessage({message:"setIdentityJWT",expireTime:F,timerId:this._renewIdentityTimerID}):this._renewIdentityTimerID=window.setTimeout(this.renewIdentityJWT.bind(this),F),!0}catch(G){return!1}},B.prototype.getIdentityTokenRenewalRequest=function(){var k={client_id:W.CommonInfo.IdentityClientId,grant_type:B.IdentityRefreshTokenGrantType,refresh_token:this.getRefreshToken()},U=new URL("".concat(this.getIdentityUri()).concat(F.RenewIdentity)),G=new URLSearchParams;return G.append("client_id",k.client_id),G.append("refresh_token",k.refresh_token),G.append("grant_type",k.grant_type),{url:U,params:G}},B.prototype.processIdentityResponse=function(k){var B,U;if(!(null==k?void 0:k.isOK()))throw new $.CatalystSdkError(H.EErrorCode.RequestError,"Call to set identityJWT with status ".concat(null==k?void 0:k.status),$.CatalystSdkError.stringify(k));this.setIdentityJWT(k.data.access_token)&&(this.setRefreshToken(k.data.refresh_token),this.setIdentityToken(k.data.access_token),null===(U=(B=this._callbacks).onSetIdentityJWT)||void 0===U||U.call(B,k.data.access_token))},B.prototype.setRenewJWTTimer=function(k){var B=this.getTimeToExpireMS(k);return this._worker.postMessage({message:"setRenewJWT",expireTime:B,timerId:this._renewJWTTimerID}),!0},B.prototype.setRenewJWTTimerWithSetInterval=function(k,B,U,F,G){var j=this,$=this.getTimeToExpireMS(k);return window.setTimeout((function(){return j.renewJWT()}),$)},B.prototype.clearRenewTimer=function(k){k&&window.clearTimeout(k)},B.prototype.isValid=function(k){var B=null==k?void 0:k.claim;if(void 0!==B&&0!==B.iat&&!isNaN(B.iat)){var U=B.iat/1e3,F=!B.exp||B.exp>U,G=!B.nbf||B.nbf{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.createServiceWorker=void 0;var F=U(32943),G=U(27596);B.createServiceWorker=function(k){try{var B=new Blob(["\nonmessage = function (event) {\n if (event && event.data) {\n var message = event.data.message;\n if (message === 'setRenewJWT' || message === 'setIdentityJWT') {\n var expireTime = event.data.expireTime;\n var timerIdEvent = event.data.timerId;\n \n \n var initTimer = function (message, expireTime) {\n var timerId = self.setInterval(function () {\n var obj = {message, command: 'timer-started'}\n postMessage(obj);\n }, expireTime)\n postMessage({ timerId, message, command: 'timer-init' });\n }\n if(timerIdEvent && timerIdEvent >= 0) {\n self.clearInterval(timerIdEvent);\n }\n \n initTimer(message, expireTime);\n }\n }\n }"],{type:"application/javascript"}),U=URL.createObjectURL(B);return new Worker(U,{name:k})}catch(e){throw new F.CatalystSdkError(G.EErrorCode.Unknown,"Could not create Worker",F.CatalystSdkError.stringify(e))}}},22042:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},56230:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(95912);(0,F.__exportStar)(U(79140),B),(0,F.__exportStar)(U(33770),B),(0,F.__exportStar)(U(22042),B)},95912:(k,B,U)=>{"use strict";U.r(B),U.d(B,{__assign:()=>j,__asyncDelegator:()=>st,__asyncGenerator:()=>it,__asyncValues:()=>nt,__await:()=>et,__awaiter:()=>q,__classPrivateFieldGet:()=>ct,__classPrivateFieldSet:()=>dt,__createBinding:()=>z,__decorate:()=>H,__exportStar:()=>Y,__extends:()=>G,__generator:()=>K,__importDefault:()=>ht,__importStar:()=>ot,__makeTemplateObject:()=>at,__metadata:()=>W,__param:()=>V,__read:()=>X,__rest:()=>$,__spread:()=>Z,__spreadArray:()=>tt,__spreadArrays:()=>J,__values:()=>Q});var F=function(k,B){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,B){k.__proto__=B}||function(k,B){for(var U in B)Object.prototype.hasOwnProperty.call(B,U)&&(k[U]=B[U])})(k,B)};function G(k,B){if("function"!=typeof B&&null!==B)throw new TypeError("Class extends value "+String(B)+" is not a constructor or null");function U(){this.constructor=k}F(k,B),k.prototype=null===B?Object.create(B):(U.prototype=B.prototype,new U)}var j=function(){return(j=Object.assign||function(k){for(var B,U=1,F=arguments.length;U=0;H--)(G=k[H])&&($=(j<3?G($):j>3?G(B,U,$):G(B,U))||$);return j>3&&$&&Object.defineProperty(B,U,$),$}function V(k,B){return function(U,F){B(U,F,k)}}function W(k,B){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,B)}function q(k,B,U,F){return new(U||(U=Promise))((function(G,j){function $(k){try{V(F.next(k))}catch(e){j(e)}}function H(k){try{V(F.throw(k))}catch(e){j(e)}}function V(k){var B;k.done?G(k.value):(B=k.value,B instanceof U?B:new U((function(k){k(B)}))).then($,H)}V((F=F.apply(k,B||[])).next())}))}function K(k,B){var U,F,G,j,$={label:0,sent:function(){if(1&G[0])throw G[1];return G[1]},trys:[],ops:[]};return j={next:H(0),throw:H(1),return:H(2)},"function"==typeof Symbol&&(j[Symbol.iterator]=function(){return this}),j;function H(j){return function(H){return function(j){if(U)throw new TypeError("Generator is already executing.");for(;$;)try{if(U=1,F&&(G=2&j[0]?F.return:j[0]?F.throw||((G=F.return)&&G.call(F),0):F.next)&&!(G=G.call(F,j[1])).done)return G;switch(F=0,G&&(j=[2&j[0],G.value]),j[0]){case 0:case 1:G=j;break;case 4:return $.label++,{value:j[1],done:!1};case 5:$.label++,F=j[1],j=[0];continue;case 7:j=$.ops.pop(),$.trys.pop();continue;default:if(!(G=$.trys,(G=G.length>0&&G[G.length-1])||6!==j[0]&&2!==j[0])){$=0;continue}if(3===j[0]&&(!G||j[1]>G[0]&&j[1]=k.length&&(k=void 0),{value:k&&k[F++],done:!k}}};throw new TypeError(B?"Object is not iterable.":"Symbol.iterator is not defined.")}function X(k,B){var U="function"==typeof Symbol&&k[Symbol.iterator];if(!U)return k;var F,G,j=U.call(k),$=[];try{for(;(void 0===B||B-- >0)&&!(F=j.next()).done;)$.push(F.value)}catch(H){G={error:H}}finally{try{F&&!F.done&&(U=j.return)&&U.call(j)}finally{if(G)throw G.error}}return $}function Z(){for(var k=[],B=0;B1||H(k,B)}))})}function H(k,B){try{(U=G[k](B)).value instanceof et?Promise.resolve(U.value.v).then(V,W):q(j[0][2],U)}catch(e){q(j[0][3],e)}var U}function V(k){H("next",k)}function W(k){H("throw",k)}function q(k,B){k(B),j.shift(),j.length&&H(j[0][0],j[0][1])}}function st(k){var B,U;return B={},F("next"),F("throw",(function(k){throw k})),F("return"),B[Symbol.iterator]=function(){return this},B;function F(F,G){B[F]=k[F]?function(B){return(U=!U)?{value:et(k[F](B)),done:"return"===F}:G?G(B):B}:G}}function nt(k){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var B,U=k[Symbol.asyncIterator];return U?U.call(k):(k=Q(k),B={},F("next"),F("throw"),F("return"),B[Symbol.asyncIterator]=function(){return this},B);function F(U){B[U]=k[U]&&function(B){return new Promise((function(F,G){(function(k,B,U,F){Promise.resolve(F).then((function(B){k({value:B,done:U})}),B)})(F,G,(B=k[U](B)).done,B.value)}))}}}function at(k,B){return Object.defineProperty?Object.defineProperty(k,"raw",{value:B}):k.raw=B,k}var rt=Object.create?function(k,B){Object.defineProperty(k,"default",{enumerable:!0,value:B})}:function(k,B){k.default=B};function ot(k){if(k&&k.__esModule)return k;var B={};if(null!=k)for(var U in k)"default"!==U&&Object.prototype.hasOwnProperty.call(k,U)&&z(B,k,U);return rt(B,k),B}function ht(k){return k&&k.__esModule?k:{default:k}}function ct(k,B,U,F){if("a"===U&&!F)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof B?k!==B||!F:!B.has(k))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===U?F:"a"===U?F.call(k):F?F.value:B.get(k)}function dt(k,B,U,F,G){if("m"===F)throw new TypeError("Private method is not writable");if("a"===F&&!G)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof B?k!==B||!G:!B.has(k))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===F?G.call(k,U):G?G.value=U:B.set(k,U),U}},57530:(k,B,U)=>{"use strict";U.d(B,{i:()=>K});var F=U(8674),G=U(68910),j=U(64527),$=U(823),H=U(40794),V=U(15740),W=U(61806),q=U(43501);class K extends H.u{static get main(){return K._main}get viewportSize(){return this._viewportSize}get cameraMatrixID(){return this.recalculateViewMatrix(),this._transformWorldID}get viewMatrix(){return this.recalculateViewMatrix(),this._cameraMatrix}constructor(){super(),this.onViewportChanged=new V.H,this._viewportSize=new j.o(W.W.instance.game.world.width,W.W.instance.game.world.height),this._cameraMatrix=new G.Matrix,this._transformWorldID=-1,this._attachedTransform=null,K._main||(K._main=this)}create(){super.create(),this.GameObject.transform?this.attachToTransform():this.GameObject.onComponentAdded.add(this.componentWasAdded,this)}destroy(){K._main===this&&(K._main=null),this.GameObject.transform&&this.GameObject.transform.OnDestroy.remove(this.transformDestroyed,this),this.GameObject.onComponentAdded.remove(this.componentWasAdded,this),this.onViewportChanged.dispose(),super.destroy()}reset(){const k=this.GameObject.transform;k.setPosition(0,0),k.setScale(1,1),k.setRotation(0)}setViewportSize(k,B){if(this._viewportSize.setTo(k,B),this._attachedTransform){this._attachedTransform.pixiTransform._worldID++}this.onViewportChanged.dispatch()}setCameraActive(k,B){const U=B.projection;k!==(U.transform===this._cameraMatrix)&&(B.batch.flush(),U.transform=k?this.viewMatrix:null,U.update(U.destinationFrame,U.sourceFrame,B.resolution,!B.renderTexture.current))}attachToTransform(){null===this._attachedTransform&&(this._attachedTransform=this.GameObject.transform,this._attachedTransform.OnDestroy.add(this.transformDestroyed,this))}transformDestroyed(){this._cameraMatrix.identity(),this._attachedTransform=null}componentWasAdded(k){k instanceof q.d&&(this.GameObject.onComponentAdded.remove(this.componentWasAdded,this),this.attachToTransform())}}(0,F.Cg)([(0,$.oB)(),(0,F.Sn)("design:type",j.o)],K.prototype,"_viewportSize",void 0)},40794:(k,B,U)=>{"use strict";U.d(B,{X:()=>W,u:()=>q});var F,G=U(8674),j=U(79687),$=U(32154),H=U(15740),V=U(89683);const W={};let q=F=class{constructor(){this.gameObject=null,this.updateFunction=this.firstUpdate,this.onActiveChanged=new H.H,this.onDestroy=new H.H,this.isActive=!0,this._isCreated=!1}get GameObject(){return this.gameObject}set GameObject(k){!$.A.isDefined(this.gameObject)&&$.A.isDefined(k)&&(this.gameObject=k,V.G.addObject(this))}get OnActiveChanged(){return this.onActiveChanged}get IsActiveInHierarchy(){return this.Active&&Boolean(this.GameObject)&&this.GameObject.activeInHierarchy}get OnDestroy(){return this.onDestroy}get Active(){return this.isActive}set Active(k){this.isActive!==k&&(this.isActive=k,k?this.onEnable():this.onDisable(),this.onActiveChanged.dispatch())}get isCreated(){return this._isCreated}create(){this._isCreated=!0,this.registerComponent()}postCreate(){}firstUpdate(){this.updateFunction=this.update,this.update()}update(){}onEnable(){}onDisable(){}static customSerialize(k,B,U){}customDeserialize(k){}preDeserialize(k){}postDeserialize(){}destroy(){V.G.removeObject(this),this.isActive&&this.onDisable(),this.onActiveChanged.dispose(),this.onDestroy.dispatch(this),this.onDestroy.dispose(),this.unregisterComponent(),this.gameObject=null}getInjectedValue(k){return U(78178).U.getInjectedValue(this.gameObject,k)}registerComponent(){if(!F._enableRegistry)return;const k=this.constructor.name;F._componentRegistry.has(k)||F._componentRegistry.set(k,new Set),F._componentRegistry.get(k).add(this)}unregisterComponent(){const k=this.constructor.name,B=F._componentRegistry.get(k);null==B||B.delete(this)}static getComponents(k){const B=k.name,U=F._componentRegistry.get(B);return U?Array.from(U):[]}static getComponentsByString(k){return F.getComponents(W[k])}static toggleComponentRegistryStatus(k){F._enableRegistry=k}};q._enableRegistry=!1,q._componentRegistry=new Map,q=F=(0,G.Cg)([(0,j.injectable)()],q)},29658:(k,B,U)=>{"use strict";U.d(B,{EV:()=>j,S1:()=>V,YH:()=>H,s0:()=>$});var F=U(40794),G=U(49769);const j=(k,B,U)=>j=>{F.X[k]=j,F.X[k].alias=k,G.Er[G.ml.PATHS]||(G.Er[G.ml.PATHS]={},G.Er[G.ml.TOOL_TIPS]={}),G.Er[G.ml.PATHS][k]=B,G.Er[G.ml.TOOL_TIPS][k]=U},$=k=>B=>{G.oD[k]=B};var H;!function(k){k.root="",k.animation="Animation",k.filter="Filter",k.injection="Injection",k.input="Input",k.map="Map",k.motion="Motion",k.primitive="Primitive",k.physics="Physics",k.render="Render",k.saving="Saving",k.streaming="Streaming",k.tiled="Tiled",k.transform="Transform",k.transition="Transition",k.ui="UI",k.uiLayout="UI/Layout"}(H||(H={}));const V=()=>k=>{-1===G.Jr.indexOf(k.name)&&G.Jr.push(k.name)}},49769:(k,B,U)=>{"use strict";var F;U.d(B,{Bk:()=>$,EL:()=>j,Er:()=>G,Jr:()=>V,ml:()=>F,oD:()=>H}),function(k){k[k.PATHS=0]="PATHS",k[k.TOOL_TIPS=1]="TOOL_TIPS"}(F||(F={}));const G={},j={},$={},H={},V=[]},53924:(k,B,U)=>{"use strict";U.d(B,{W:()=>G,a:()=>j});var F=U(49769);function G(k){return B=>{F.EL[B.name]=k}}function j(k){return B=>{F.Bk[k]=B}}},82538:(k,B,U)=>{"use strict";var F;U.d(B,{e:()=>F}),function(k){k.Vertical="vertical",k.Horizontal="horizontal"}(F||(F={}))},83793:(k,B,U)=>{"use strict";U.d(B,{G:()=>G});const F="custom:annotations:editorFunctions",G=()=>(k,B)=>{let U=[B];if(Reflect.hasMetadata(F,k.constructor)){const G=Reflect.getMetadata(F,k.constructor);if(G.indexOf(B)>=0)return;U=G.concat(U)}Reflect.defineMetadata(F,U,k.constructor)}},55366:(k,B,U)=>{"use strict";U.d(B,{Y:()=>H});var F=U(8674),G=U(79687),j=U(80267),$=U(5191);let H=class{get frameTimeElapsed(){return this._now()-this._frameStartTime}get frameBudgetRemaining(){return this.frameBudget-this.frameTimeElapsed}constructor(k){this._frameStartTime=0,this._frameWorkDone=!1,this._workPromises=[],this.frameBudget=k,"undefined"!=typeof performance&&"function"==typeof performance.now?this._now=performance.now.bind(performance):"function"==typeof Date.now?this._now=Date.now.bind(Date):"function"==typeof Date.prototype.getTime?this._now=()=>(new Date).getTime():(this._now=()=>0,j.V.log("FrameWorkManager: None of the expected timing functions are available",$.$.Error))}markFrameStart(){this._frameStartTime=this._now(),this._frameWorkDone=!1}markFrameEnd(){for(;this._workPromises.length>0&&(this.frameBudgetRemaining>0||!this._frameWorkDone);)this._frameWorkDone=!0,this._workPromises[0][0]()&&this._workPromises.shift()}flushWorkQueue(){for(;this._workPromises.length>0;)this._frameWorkDone=!0,this._workPromises[0][0]()&&this._workPromises.shift()}cancelWork(){var k;for(const B of this._workPromises)null===(k=B[1])||void 0===k||k.call(B);this._workPromises=[]}awaitFreeTime(k,B){this._workPromises.push([k,B]),1===this._workPromises.length&&this.markFrameEnd()}};H=(0,F.Cg)([(0,G.injectable)(),(0,F.Sn)("design:paramtypes",[Number])],H)},61806:(k,B,U)=>{"use strict";U.d(B,{W:()=>F});class F{static get instance(){return this._instance}get game(){return this._game}constructor(k,B,U){this.prefabLoaderInstance=null,this.getWorkerURL=null,F._instance||(F._instance=this),this._game=k,this.loader=B,this.prefabLoaderInstance=U}destroy(){F._instance=null,this._game=null}}},42979:(k,B,U)=>{"use strict";U.d(B,{Z:()=>ht});var F=U(68910),G=U(36361),j=U(57530);class ${constructor(){this._cameraColliders=[]}get cameraColliders(){return this._cameraColliders}addCollider(k){this._cameraColliders.push({collider:k,bounds:this.getColliderBounds(k)})}removeCollider(k){const B=this._cameraColliders.length,U=this._cameraColliders.findIndex((B=>B.collider===k));return U>-1&&this._cameraColliders.splice(U,1),this._cameraColliders.lengthB.collider===k));B&&(B.bounds=this.getColliderBounds(k))}getColliderBounds(k){var B,U,G;const $=j.i.main.viewportSize,H=k.getBounds(),V=null!==(G=null===(U=null===(B=k.GameObject.parent)||void 0===B?void 0:B.transform)||void 0===U?void 0:U.worldMatrix)&&void 0!==G?G:F.Matrix.IDENTITY,W=k.GameObject.transform.worldScale,q=new F.Matrix(1/W.x,0,0,1/W.y,0,0).append(V),K=q.apply({x:H.left-$.getHalfWidth(),y:H.top-$.getHalfHeight()}),z=q.apply({x:H.right+$.getHalfWidth(),y:H.bottom+$.getHalfHeight()});return H.left=K.x,H.top=K.y,H.right=z.x,H.bottom=z.y,H}}var H=U(6686),V=U(32154),W=U(61806);class q{constructor(){this._queue=null,this._maxDeletesPerFrame=500,this._queue=new Set}processDestroyQueue(){let k=0;const B=[...this._queue];for(;this._queue.size>0&&k-1){const B=[`\n %c %c %c PixiJS ${F.VERSION} - ✰ renderType: ${k} ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n`,"background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log(...B)}else window.console&&window.console.log(`PixiJS ${F.VERSION} - ${k} - http://www.pixijs.com/`)}destroy(){var k;null===(k=this._device)||void 0===k||k.cleanUp(),this._onPause.dispose(),this._onResume.dispose(),this.state.destroy(),this.sound.destroy(),this.stage.destroy(),this.tweens.destroy(),this._time.removeAll(),this._destroyQueue.destroy(),this._rootContainer.unbindAll(),this._state=null,this._sound=null,this._stage=null,this._tweens=null,this._cache=null,this._load=null,this._time=null,this._cameraCollisions=null,this._destroyQueue=null,this._rootContainer=null,this._app.ticker.remove(this.update,this),this.app.destroy(!0),this.isBooted=!1}pauseGame(k){k?(this._paused||(this._paused=k,this._sound.muteOnPause&&this._sound.setMute(),this._time.gamePaused(),this.onPause.dispatch()),this._pausedByCode=!0):(this._paused&&(this._paused=k,this._sound.unsetMute(),this._time.gameResumed(),this.onResume.dispatch()),this._pausedByCode=!1)}gamePaused(k){this._paused||(this._paused=!0,this.time.gamePaused(),this.sound.muteOnPause&&this.sound.setMute(),this.onPause.dispatch(k))}gameResumed(k){this._paused&&(this._paused=!1,this.time.gameResumed(),this.sound.muteOnPause&&this.sound.unsetMute(),this.onResume.dispatch(k))}focusLoss(k){this.stage.disableVisibilityChange||this.gamePaused(k)}focusGain(k){window.focus&&window.focus(),this.stage.disableVisibilityChange||this.gameResumed(k)}createApp(k,B){let U;F.settings.ROUND_PIXELS=!!V.A.isDefined(k.roundPixels)&&k.roundPixels,F.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!V.A.isDefined(k.failIfMajorPerformanceCaveat)||k.failIfMajorPerformanceCaveat,F.settings.SCALE_MODE=B.antialias?F.SCALE_MODES.LINEAR:F.SCALE_MODES.NEAREST,void 0!==B.filterResolution&&(F.settings.FILTER_RESOLUTION=B.filterResolution),this._width=V.A.isDefined(k.width)?k.width:ht.DEFAULT_WIDTH,this._height=V.A.isDefined(k.height)?k.height:ht.DEFAULT_HEIGHT,this._app=new F.Application({width:this._width,height:this._height,view:document.createElement("canvas"),autoStart:!!B.autoStart&&B.autoStart,autoDensity:!B.autoDensity||B.autoDensity,preserveDrawingBuffer:B.preserveDrawingBuffer,antialias:B.antialias,backgroundAlpha:B.backgroundAlpha,sharedTicker:!B.sharedTicker||B.sharedTicker,resolution:B.resolution,forceCanvas:B.forceCanvas,backgroundColor:B.backgroundColor,clearBeforeRender:B.clearBeforeRender,powerPreference:B.powerPreference,resizeTo:B.resizeTo}),F.TextMetrics.nextLineHeightBehavior=!1,U=V.A.isDefined(k.parent)?k.parent instanceof HTMLElement?k.parent:document.getElementById(k.parent):document.createElement("div"),rt.D.addToDOM(this.canvas,U),F.Texture.addToCache=(k,B)=>{},F.BaseTexture.addToCache=(k,B)=>{},F.Texture.removeFromCache=k=>null,F.BaseTexture.removeFromCache=k=>null}createSystems(){this._add=new K.W(this),this._sound=new X.x(this),this._load=new tt.a,this._cache=new J.l(this),this._time=new nt.g(this),this._device=new at.p,this._state=new st.f(null),this._tweens=new Q.$(this),this._rnd=new et.b,this._cameraCollisions=new $,this._destroyQueue=new q,this._rootContainer=new G.r(null),this._triggerSystem=new H.G,this._useElaNavMeshSystem?this._navMeshSystem=new Y.s:this._navMeshSystem=new z.k}bootSystems(){this._time.boot(),this._sound.boot()}}ht.DEFAULT_WIDTH=1280,ht.DEFAULT_HEIGHT=720,ht.DEFAULT_FPS=60,ht.DEFAULT_SPF=1/ht.DEFAULT_FPS},27780:(k,B,U)=>{"use strict";U.d(B,{_:()=>Q});var F=U(95891),G=U(5191),j=U(80267),$=U(87987),H=U(62481),V=U(32154),W=(U(49769),U(61806)),q=U(44716),K=U(43501),z=U(15740),Y=U(89683);class Q{get name(){return this._name}set name(k){this._name=k}get components(){return this._components}get layer(){return this._layer?this._layer:this._parent?this._parent.layer:$.W.DEFAULT_NAME}set layer(k){this.setLayer(k,!1)}set parent(k){this.removeFromParent(),this.setParent(k),k&&k.onChildAdded.dispatch(this)}get parent(){return this._parent}get children(){return this._children}get isMarkedForDestruction(){return this._markedForDestruction}get active(){return this._isActive}set active(k){this._isActive!==k&&(this._isActive=k,this.onActiveChanged.dispatch(),this.activeInHierarchyChanged())}get activeInHierarchy(){return this._isActiveInHierarchy}get legacyTransform(){return null===this._legacyTransform&&(this._legacyTransform=this.findComponent(q.K)),this._legacyTransform}get isDestroyed(){return this._destroyed}get transform(){return null===this._transform&&(this._transform=this.findComponent(K.d)),this._transform}constructor(k=null){this.onActiveChanged=new z.H,this.onActiveInHierarchyChanged=new z.H,this.onHierarchyChanged=new z.H,this.onChildAdded=new z.H,this.onChildRemoved=new z.H,this.onLayerChanged=new z.H,this.onComponentAdded=new z.H,this.onComponentRemoved=new z.H,this.onComponentAddedToHierarchy=new z.H,this.onDestroy=new z.H,this._markedForDestruction=!1,this.updateFunction=this.firstUpdate,this._parent=null,this._isActive=!0,this._components=[],this._children=[],this._isActiveInHierarchy=!0,this._legacyTransform=null,this._transform=null,this._name="",this._destroyed=!1,this.setParent(k),Y.G.addObject(this)}addChild(k){k.removeFromParent(),k.setParent(this),this.onChildAdded.dispatch(k)}addChildAt(k,B){k.removeFromParent(),k.setParent(this,B),this.onChildAdded.dispatch(k)}getRenderOrder(){return this._parent._children.indexOf(this)}isInFront(){const k=this._parent._children;return k[k.length-1]===this}isInBack(){return this._parent._children[0]===this}sendToBack(){const k=this._parent._children.indexOf(this);-1!==k?(this._parent._children.splice(k,1),this._parent._children.unshift(this),this._parent.onHierarchyChanged.dispatch()):j.V.log("Parent did not have this game object in its list of children!",G.$.Error)}setRenderOrder(k){const B=this._parent._children.indexOf(this);-1!==B?(this._parent._children.splice(B,1),this._parent._children.splice(k,0,this),this._parent.onHierarchyChanged.dispatch()):j.V.log("Parent did not have this game object in its list of children!",G.$.Error)}firstUpdate(){this.updateFunction=this.update,this.update()}update(){if(this.activeInHierarchy&&!this._markedForDestruction){for(let k=this._components.length-1;k>=0;--k){const B=this._components[k];B.Active&&B.updateFunction()}for(let k=this._children.length-1;k>=0;--k)this._children[k].updateFunction()}}addComponent(k,B=!0){const U=new k;this._components.push(U),U.GameObject=this,U.OnDestroy.addOnce(this.removeComponent.bind(this)),B&&(U.create(),U.Active&&U.onEnable(),U.postCreate()),this.onComponentAdded.dispatch(U);const F=this._children.length;for(let G=0;GB instanceof k));return V.A.isDefined(B)?B:null}findComponents(k){return this._components.filter((B=>B instanceof k))}hasComponent(k){return V.A.isDefined(this.findComponent(k))}bringToFront(){const k=this._parent._children.indexOf(this);-1!==k?k!==this._parent.children.length-1&&(this._parent._children.splice(k,1),this._parent._children.push(this),this._parent.onHierarchyChanged.dispatch()):j.V.log("Parent did not have this game object in its list of children!",G.$.Error)}destroy(){var k;if(this._destroyed=!0,this.onDestroy.dispatch(),!this._markedForDestruction){for(let B=this._children.length-1;B>=0;--B)null===(k=this._children[B])||void 0===k||k.destroy();this._children.length=0}for(let U=this._components.length-1;U>=0;--U)try{this._components[U].destroy()}catch(B){H.R.logError(B,"Failed to destroy component")}this._components.length=0,this.removeFromParent(),Y.G.removeObject(this),this.onComponentAdded.dispose(),this.onComponentRemoved.dispose(),this.onComponentAddedToHierarchy.dispose(),this.onChildAdded.dispose(),this.onChildRemoved.dispose(),this.onActiveChanged.dispose(),this.onActiveInHierarchyChanged.dispose(),this.onHierarchyChanged.dispose(),this.onDestroy.dispose(),this.onLayerChanged.dispose()}destroyDeferred(){var k;const B=this._children.length;for(let U=0;U=0))return void j.V.log(`index ${B} out-of-bounds of child array length ${k._children.length}`,G.$.Error);k._children.splice(B,0,this)}else k._children.push(this);this._parent=k,this._parent.onActiveInHierarchyChanged.add(this.activeInHierarchyChanged,this),this._parent.onHierarchyChanged.add(this.onHierarchyChanged.dispatch,this.onHierarchyChanged)}this.onHierarchyChanged.dispatch();const U=this.isActiveInHierarchy();U!==this._isActiveInHierarchy&&(this._isActiveInHierarchy=U,this.onActiveInHierarchyChanged.dispatch())}activeInHierarchyChanged(){this._isActiveInHierarchy=this.isActiveInHierarchy();const k=this._components.length;for(let B=0;B{"use strict";U.d(B,{W:()=>H});var F=U(68910),G=U(61806),j=U(16649),$=U(71392);class H{constructor(k){this.game=null,this.stage=null,this.game=k,this.stage=k.stage}existing(k){return this.stage.addChild(k)}tween(k,B,U=!0){return this.game.tweens.create(k,B,U)}audio(k="",B=1,U=!1,F){return this.sound(k,B,U,F)}sound(k="",B=1,U=!1,F){return this.game.sound.add(k,B,U,F)}text(k=0,B=0,U="",G,j=this.stage){const $=new F.Text(U,G);return $.x=k,$.y=B,j.addChild($),$}graphics(k=0,B=0,U=this.stage){const G=new F.Graphics;return G.position.set(k,B),U.addChild(G),G}spine(k,B,U,F){const G=new j.y(U);return G.setToSetupPose(),G.position.x=k,G.position.y=B,F?F.addChild(G):this.game.stage.addChild(G),G}simpleMesh(k){return new F.SimpleMesh(null==k?void 0:k.texture,null==k?void 0:k.vertices,null==k?void 0:k.uvs,null==k?void 0:k.indices,null==k?void 0:k.drawMode)}texture(k,B){return new F.Texture(k,null==B?void 0:B.frame,null==B?void 0:B.orig,null==B?void 0:B.trim,null==B?void 0:B.rotate,null==B?void 0:B.anchor)}container(k,B="container",U=!1){const F=new $.m;return F.name=B,U?(G.W.instance.game.stage.addChild(F),F.zIndex=G.W.instance.game.stage.children.length):k&&(k.addChild(F),F.zIndex=k.children.length),F}sprite(k=0,B=0,U,j,$,H){const V=H||(U?G.W.instance.game.cache.getTexture(U,j):F.Texture.EMPTY),W=new F.Sprite(V);return W.position.set(k,B),$?$.addChild(W):G.W.instance.game.stage.addChild(W),W}renderTexture(k=100,B=100,U,j=!1){const $={width:k,height:B,resolution:1},H=new F.BaseRenderTexture($),V=new F.RenderTexture(H);return j&&G.W.instance.game.cache.addRenderTexture(U||G.W.instance.game.rnd.uuid(),V),V}}},57056:(k,B,U)=>{"use strict";U.d(B,{D:()=>G});var F=U(22494);const G=()=>(k,B)=>{const U="function"==typeof k?k:k.constructor;F.Q.addProperty("custom:annotations:ignoreInEditor",U,B)}},44716:(k,B,U)=>{"use strict";U.d(B,{K:()=>tt});var F=U(8674),G=U(80267),j=U(5191),$=U(15308),H=U(71392);class V extends H.m{constructor(){super(...arguments),this.placeholderBounds=new $.M(0,0,0,0),this._vertexData=new Float32Array([0,0,0,0,0,0,0,0])}set width(k){this.placeholderBounds.width=k,this._vertexData[2]=k,this._vertexData[4]=k}get width(){return this.placeholderBounds.width}set height(k){this.placeholderBounds.height=k,this._vertexData[5]=k,this._vertexData[7]=k}get height(){return this.placeholderBounds.height}_calculateBounds(){this._bounds.addQuad(this._vertexData)}}var W,q=U(32154),K=U(27179),z=U(8490),Y=U(823),Q=U(40794),X=U(29658),Z=U(61806),J=U(53924);let tt=W=class extends Q.u{get group(){return this._group}set RoundRelativeValues(k){this.roundRelativeValues=k}get RoundRelativeValues(){return this.roundRelativeValues}set GameObject(k){!q.A.isDefined(this.GameObject)&&q.A.isDefined(k)&&(this.gameObject=k,k.parent&&k.parent.legacyTransform&&k.parent.legacyTransform.group.addChild(this._group))}get GameObject(){return this.gameObject}set x(k){this.cachedRelativeX=null,this._group.x=k}get x(){return this._group.x}set y(k){this.cachedRelativeY=null,this._group.y=k}get y(){return this._group.y}set relativeX(k){const B=this.GameObject.parent&&this.GameObject.parent.legacyTransform?this.GameObject.parent.legacyTransform.width:0;this.x=W.applyScaleValue(B,k,this.roundRelativeValues),this.cachedRelativeX=k}get relativeX(){let k=0;return q.A.isDefined(this.cachedRelativeX)?k=this.cachedRelativeX:this.GameObject.parent&&this.GameObject.parent.legacyTransform&&(k=W.determineScaleValue(this._group.x,this.GameObject.parent.legacyTransform.width,this.roundRelativeValues)),k}set relativeY(k){const B=this.GameObject.parent&&this.GameObject.parent.legacyTransform?this.GameObject.parent.legacyTransform.height:0;this.y=W.applyScaleValue(B,k,this.roundRelativeValues),this.cachedRelativeY=k}get relativeY(){let k=0;return q.A.isDefined(this.cachedRelativeY)?k=this.cachedRelativeY:this.GameObject.parent&&this.GameObject.parent.legacyTransform&&(k=W.determineScaleValue(this._group.y,this.GameObject.parent.legacyTransform.height,this.roundRelativeValues)),k}set roundedX(k){this.x=Math.round(k)}get roundedX(){return Math.round(this.x)}set roundedY(k){this.y=Math.round(k)}get roundedY(){return Math.round(this.y)}set width(k){this.cachedRelativeWidth=null,this.dimensionPlaceholder&&(this.dimensionPlaceholder.width=k),this._group.width=k,this.updatePivotXFromAnchorX(),this.reapplyChildRelativeValues()}get width(){return this._group.width}set height(k){this.cachedRelativeHeight=null,this.dimensionPlaceholder&&(this.dimensionPlaceholder.height=k),this._group.height=k,this.updatePivotYFromAnchorY(),this.reapplyChildRelativeValues()}get height(){return this._group.height}set relativeWidth(k){const B=this.GameObject.parent&&this.GameObject.parent.legacyTransform?this.GameObject.parent.legacyTransform.width:0;this.width=W.applyScaleValue(B,k,this.roundRelativeValues),this.cachedRelativeWidth=k}get relativeWidth(){let k=0;return q.A.isDefined(this.cachedRelativeWidth)?k=this.cachedRelativeWidth:this.GameObject.parent&&this.GameObject.parent.legacyTransform&&(k=W.determineScaleValue(this.width,this.GameObject.parent.legacyTransform.width,!1)),k}set relativeHeight(k){const B=this.GameObject.parent&&this.GameObject.parent.legacyTransform?this.GameObject.parent.legacyTransform.height:0;this.height=W.applyScaleValue(B,k,this.roundRelativeValues),this.cachedRelativeHeight=k}get relativeHeight(){let k=0;return q.A.isDefined(this.cachedRelativeHeight)?k=this.cachedRelativeHeight:this.GameObject.parent&&this.GameObject.parent.legacyTransform&&(k=W.determineScaleValue(this.height,this.GameObject.parent.legacyTransform.height,!1)),k}set roundedWidth(k){this.width=Math.round(k)}get roundedWidth(){return Math.round(this.width)}set roundedHeight(k){this.height=Math.round(k)}get roundedHeight(){return Math.round(this.height)}set anchorX(k){this.anchor.x=k,this.updatePivotXFromAnchorX()}get anchorX(){return this.anchor.x}set anchorY(k){this.anchor.y=k,this.updatePivotYFromAnchorY()}get anchorY(){return this.anchor.y}set scaleX(k){this._group.scale.x=k}get scaleX(){return this._group.scale.x}set scaleY(k){this._group.scale.y=k}get scaleY(){return this._group.scale.y}customDeserialize(k){this.dimensionPlaceholder||(this.dimensionPlaceholder=this._group.addChild(new V),this.dimensionPlaceholder.name=`${this.GameObject.name}-dimensionalPlaceholder`);const B=k.width;q.A.isDefined(B)&&(this.width=B);const U=k.height;if(q.A.isDefined(U)&&(this.height=U),q.A.isDefined(this.GameObject.parent)){const B=this.GameObject.parent.legacyTransform,U=k.relativeWidth;q.A.isDefined(U)&&(this.dimensionPlaceholder.width=W.applyScaleValue(B?B.width:0,U,this.roundRelativeValues),this.cachedRelativeWidth=U);const F=k.relativeHeight;q.A.isDefined(F)&&(this.dimensionPlaceholder.height=W.applyScaleValue(B?B.height:0,F,this.roundRelativeValues),this.cachedRelativeHeight=F)}const F=k.anchorX;q.A.isDefined(F)&&(this.anchorX=F);const G=k.anchorY;q.A.isDefined(G)&&(this.anchorY=G);const j=k.scaleX;q.A.isDefined(j)&&(this.scaleX=j);const $=k.scaleY;q.A.isDefined($)&&(this.scaleY=$),super.customDeserialize(k)}reapplyChildRelativeValues(){const k=this.GameObject.children;for(let B=0;B{k(),this.GameObject&&!this.GameObject.parent&&this.GameObject.updateFunction()},this.group.visible=this.GameObject.activeInHierarchy}destroy(){this.GameObject.onActiveInHierarchyChanged.remove(this.updateGroupVisibility,this),this.GameObject.onHierarchyChanged.remove(this.updateParentGroup,this),this._group.gameObjectRef=null,super.destroy(),this._group.destroy(),this._group=null}updateGroupVisibility(){this._group&&!this._group.destroyed&&(this._group.visible=this.GameObject.activeInHierarchy,this._group.worldVisible&&this._group.parent?this._group.updateTransform():this._group.worldVisible&&!this._group.parent&&G.V.log("Attempting to update a group that has no parent but is set to visible",j.$.Warning))}updateParentGroup(){this.GameObject.parent&&this.GameObject.parent.legacyTransform?this.GameObject.parent.legacyTransform.group.addChild(this._group):Z.W.instance.game.world.addChild(this._group)}static applyScaleValue(k,B,U){const F=k*B;return W.roundIfNeeded(F,U)}static determineScaleValue(k,B,U){const F=k/B;return W.roundIfNeeded(F,U)}static roundIfNeeded(k,B){return B?Math.round(k):k}};(0,F.Cg)([(0,Y.vk)(),(0,F.Sn)("design:type",Boolean)],tt.prototype,"roundRelativeValues",void 0),(0,F.Cg)([(0,Y.g1)(),(0,F.Sn)("design:type",Number),(0,F.Sn)("design:paramtypes",[Number])],tt.prototype,"x",null),(0,F.Cg)([(0,Y.g1)(),(0,F.Sn)("design:type",Number),(0,F.Sn)("design:paramtypes",[Number])],tt.prototype,"y",null),(0,F.Cg)([(0,Y.g1)(),(0,F.Sn)("design:type",Number),(0,F.Sn)("design:paramtypes",[Number])],tt.prototype,"relativeX",null),(0,F.Cg)([(0,Y.g1)(),(0,F.Sn)("design:type",Number),(0,F.Sn)("design:paramtypes",[Number])],tt.prototype,"relativeY",null),(0,F.Cg)([(0,Y.g1)(),(0,F.Sn)("design:type",Number),(0,F.Sn)("design:paramtypes",[Number])],tt.prototype,"scaleX",null),(0,F.Cg)([(0,Y.g1)(),(0,F.Sn)("design:type",Number),(0,F.Sn)("design:paramtypes",[Number])],tt.prototype,"scaleY",null),tt=W=(0,F.Cg)([(0,X.EV)("LegacyTransform",X.YH.transform,"Works with the position and scale of the game object
to which it is attached (deprecated)"),(0,J.W)(z.L),(0,F.Sn)("design:paramtypes",[])],tt)},70028:(k,B,U)=>{"use strict";U.d(B,{k:()=>z});var F=U(8674),G=U(68910),j=U(5191),$=U(80267),H=U(2136),V=U(27179),W=U(94341),q=U(15073),K=U(61806);class z{getNavMeshConstructor(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._navMeshConstructorWorker){const k=K.W.instance.getWorkerURL("NavMeshConstructor");this._navMeshConstructorWorker=q.p.createWorker(H.b,k)}return this._navMeshConstructorWorker.start()}))}constructor(){this.navMesh=null,this._blockPolygonIDs=new Map,this._globalPolygonIDs=[],this._navMeshConstructorWorker=null,this._globalWalkableAreas=[],this._globalNonWalkableAreas=[],this._currentStreamedMap=null,this._streamedBlockMeshes=new Map;this.navMesh=new W.L([],0,10)}destroy(){this._navMeshConstructorWorker.stop(),this._navMeshConstructorWorker=null}findPath(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.navMesh){let U=this.navMesh.findPath(k,B);if((null==U?void 0:U.length)>0)return U;if(yield this._currentStreamedMap.loadingPromiseQueueHead,U=this.navMesh.findPath(k,B),(null==U?void 0:U.length)>0)return U;$.V.log(`Failed to find path in navmesh at source ${k} with destination ${B}`,j.$.Error)}return[]}))}addWalkableArea(k){this._globalWalkableAreas.concat(k),this.buildNavMeshFromGlobalPolys().then((k=>{const B=this._globalPolygonIDs;this._globalPolygonIDs=[],this.modifyNavMesh(k,B)})).catch((()=>{$.V.log("Error while building NavMesh from global polys",j.$.Error)}))}addNonWalkableArea(k){for(const U of k)this._globalNonWalkableAreas.push(U);const B=[];for(const U of k){const k=U.GameObject.transform.worldPosition;for(const U of this._streamedBlockMeshes.values())U.block.block.containsPoint(k)&&B.push(U.block)}B.length>0&&this.onStreamedMapBlocksChanged(B,[]),this.buildNavMeshFromGlobalPolys().then((k=>{const B=this._globalPolygonIDs;this._globalPolygonIDs=[],this.modifyNavMesh(k,B)})).catch((()=>{$.V.log("Error while building NavMesh after adding ColliderPolygon",j.$.Error)}))}buildNavMeshFromGlobalPolys(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=[];for(const U of this._globalWalkableAreas)k.push(this.getPolyBoolPoly(U));const B=[];for(const U of this._globalNonWalkableAreas)B.push(this.getPolyBoolPoly(U));return(yield this.getNavMeshConstructor()).constructNavMesh(void 0,k,B)}))}modifyNavMesh(k,B,U){if(B)for(const F of B)this.navMesh.removePolygon(F);if(k){const B=k.regions.map((k=>k.map((k=>new V.I(k[0],k[1])))));for(const k of B)k.length>0&&this._globalPolygonIDs.push(this.navMesh.addPolygon(k))}if(U)for(const F of U){const k=F[0];this._blockPolygonIDs.has(k)&&(this._blockPolygonIDs.get(k).forEach((k=>{this.navMesh.removePolygon(k)})),this._blockPolygonIDs.delete(k));const B=[],U=F[1].regions.map((k=>k.map((k=>new V.I(k[0],k[1])))));for(const F of U)F.length>0&&B.push(this.navMesh.addPolygon(F));B.length>0&&this._blockPolygonIDs.set(F[0],B)}}bindStreamedMap(k){this._currentStreamedMap=k,this._currentStreamedMap.onLoadedBlocksChanged.add(this.onStreamedMapBlocksChanged,this),this._currentStreamedMap.onStreamedBlockChanged.add(this.reloadStreamedBlock,this)}releaseStreamedMap(){if(this._currentStreamedMap){this._currentStreamedMap.onLoadedBlocksChanged.remove(this.onStreamedMapBlocksChanged,this),this._currentStreamedMap.onStreamedBlockChanged.remove(this.reloadStreamedBlock,this),this._currentStreamedMap=null;for(const k of this._blockPolygonIDs)for(const B of k[1])this.navMesh.removePolygon(B);this._blockPolygonIDs.clear(),this._streamedBlockMeshes.clear()}}onStreamedMapBlocksChanged(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){let U=[];for(const k of B)U=U.concat(this.unloadStreamedBlock(k));const F=new Map;for(const B of k){const k=this.generateBlockID(B);this._blockPolygonIDs.has(k)&&(U=U.concat(this.unloadStreamedBlock(B)));const G=B.block,j=Object.assign({block:B},G.getNavData());this._streamedBlockMeshes.set(k,j);for(const B of this._globalNonWalkableAreas)G.containsPoint(B.GameObject.transform.worldPosition)&&j.nonWalkableAreas.push(this.getPolyBoolPoly(B));const $=yield this.constructBlockMesh(j);F.set(k,$)}this.modifyNavMesh(void 0,Array.from(U.values()),F),k.forEach((k=>{k.block.resolveNavMeshConstructionPromise()}))}))}getPolyBoolPoly(k){const B=k.GameObject.transform.worldMatrix,U=new G.Point;return{inverted:!1,regions:[k.points.map((k=>(B.apply(k,U),[U.x,U.y])))]}}constructBlockMesh(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.getNavMeshConstructor(),U=k.block.block.getBoundsPoly();try{return yield B.constructNavMesh(U,k.walkableAreas,k.nonWalkableAreas)}catch(e){$.V.log(`Error while constructing NavMesh for block at ${JSON.stringify(k.block.block)} ${e}`,j.$.Error)}}))}unloadStreamedBlock(k){const B=this.generateBlockID(k);let U=[];return this._streamedBlockMeshes.delete(B),this._blockPolygonIDs.has(B)&&(U=this._blockPolygonIDs.get(B),this._blockPolygonIDs.delete(B)),U}reloadStreamedBlock(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.onStreamedMapBlocksChanged([k],[k])}))}generateBlockID(k){const B=k.x,U=k.y;return(B+U)*(B+U+1)*.5+U}}},8460:(k,B,U)=>{"use strict";U.d(B,{s:()=>Q});var F=U(8674),G=U(80267),j=U(5191),$=U(12915);class H{constructNavMesh(k,B,U){try{if(!k||k.length<=0)return[];const F=this.convertToPolyBoolPoly(k);let G=$.segments(F[0]);const j=F.length;for(let k=1;k({regions:[k.map((k=>[k.x,k.y]))],inverted:!1})))}}var V,W=U(94341),q=U(15073),K=U(15740),z=U(39002),Y=U(61806);!function(k){k.Walkable="walkable",k.NonWalkable="non-walkable"}(V||(V={}));class Q{get isRebuildingNavMesh(){return this._isRebuildingNavMesh}constructor(){this.navMesh=null,this.onNavMeshChanged=new K.H,this.onFlushCompleted=new K.H,this._navMeshConstructorWorker=null,this._gridResolution=1200,this._nextPolygonID=1,this._nextBlockID=1,this._navMeshBlocks=[],this._updateBlockIdQueue=[],this._polyBlockMapping=new Map,this._queueRequestCount=0,this._isRebuildingNavMesh=!1;this.navMesh=new W.L([],0,10)}destroy(){this.onNavMeshChanged.dispose(),this.onFlushCompleted.dispose(),this._navMeshConstructorWorker.stop(),this._navMeshConstructorWorker=null,this._navMeshBlocks.forEach((k=>{k.onBuildComplete.dispose()})),this.navMesh.destroy()}findPath(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.navMesh){const U=this.navMesh.findPath(k,B);if((null==U?void 0:U.length)>0)return U;if(this._isRebuildingNavMesh)return new Promise((k=>{this.onNavMeshChanged.addOnce(void 0)}))}return[]}))}setNavMeshConstructorWorker(k){this._navMeshConstructorWorker=k}getNavMeshConstructor(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._navMeshConstructorWorker){const k=Y.W.instance.getWorkerURL("NavMeshConstructor");this._navMeshConstructorWorker=q.p.createWorker(H,k)}return this._navMeshConstructorWorker.start()}))}setGridResolution(k){return(0,F.sH)(this,void 0,void 0,(function*(){this._gridResolution=k;let B=this._navMeshBlocks.reduce(((k,B)=>(k.push(...B.polygons),k)),[]);B=B.filter(((k,U)=>U===B.findIndex((B=>B.ID===k.ID)))),this.beginNavMeshUpdateQueue(),this._navMeshBlocks.forEach((k=>{k.navMeshPolygonIDs.forEach((k=>this.navMesh.removePolygon(k)))})),this._polyBlockMapping.clear(),this._navMeshBlocks=[];const U=B.length;for(let k=0;k{this.removePolygon(k)})),this.flushNavMeshUpdateQueue()}removePolygon(k){return this.removePolygonFromNavMesh(k)}beginNavMeshUpdateQueue(){++this._queueRequestCount}flushNavMeshUpdateQueue(){return(0,F.sH)(this,void 0,void 0,(function*(){return--this._queueRequestCount,this._queueRequestCount>0||this._isRebuildingNavMesh?new Promise((k=>{this.onFlushCompleted.addOnce(k)})):this._updateBlockIdQueue.length>0?this.rebuildAllBlocksInQueue():void 0}))}rebuildAllBlocksInQueue(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this.getBlocks(this._updateBlockIdQueue);this._updateBlockIdQueue=[],this._isRebuildingNavMesh=!0;const B=k.length;for(let U=0;U0)return this.rebuildAllBlocksInQueue();this.onFlushCompleted.dispatch()}))}getBlocksForNavPoly(k){const B=z.c.getAABBforPoints(k.poly),U=Math.floor(B.left/this._gridResolution),F=Math.floor(B.top/this._gridResolution),G=Math.ceil(B.right/this._gridResolution),j=Math.ceil(B.bottom/this._gridResolution),$=[];for(let H=U;H0){this.getBlocks(U).forEach((B=>{const U=B.polygons.findIndex((B=>B.ID===k));U>-1?B.polygons.splice(U,1):G.V.log(`Polygon with id ${k} was not found in block with ID ${B.ID}, but was expected`,j.$.Warning),this.updateNavMeshBlock(B)})),this._polyBlockMapping.delete(k)}}createBlockNavPoly(k,B){return{ID:this._nextPolygonID++,type:B,poly:k}}addPolygonsToNavMesh(k,B){this.beginNavMeshUpdateQueue();const U=k.map((k=>{const U=this.createBlockNavPoly(k,B);return this.addPolygonToNavMesh(U),U.ID}));return this.flushNavMeshUpdateQueue(),U}addPolygonToNavMesh(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this.getBlocksForNavPoly(k);this._polyBlockMapping.set(k.ID,B.map((k=>k.ID))),yield Promise.all(B.map((B=>(0,F.sH)(this,void 0,void 0,(function*(){return B.polygons.push(k),this.updateNavMeshBlock(B)})))))}))}updateNavMeshBlock(k){return(0,F.sH)(this,void 0,void 0,(function*(){this._queueRequestCount>0?-1===this._updateBlockIdQueue.indexOf(k.ID)&&this._updateBlockIdQueue.push(k.ID):(yield this.rebuildNavMeshBlock(k),this.onNavMeshChanged.dispatch())}))}rebuildNavMeshBlock(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(k.isBuilding)return new Promise((B=>{k.onBuildComplete.addOnce((()=>{this.rebuildNavMeshBlock(k).then(B)}))}));k.isBuilding=!0,k.navMeshPolygonIDs.length>0&&(k.navMeshPolygonIDs.forEach((k=>{this.navMesh.removePolygon(k)})),k.navMeshPolygonIDs=[]);const B=k.x*this._gridResolution,U=k.y*this._gridResolution,F={left:B,top:U,right:B+this._gridResolution,bottom:U+this._gridResolution},G=yield this.getNavMeshConstructor(),j=[],$=[];k.polygons.forEach((k=>{k.poly.forEach((k=>{k.x=this.alignValuesSmallerThanEpsilon(k.x,B),k.y=this.alignValuesSmallerThanEpsilon(k.y,U),k.x=this.alignValuesSmallerThanEpsilon(k.x,F.right),k.y=this.alignValuesSmallerThanEpsilon(k.y,F.bottom)})),k.type===V.Walkable?j.push(k):k.type===V.NonWalkable&&$.push(k)}));const H=yield G.constructNavMesh(j.map((k=>k.poly)),$.map((k=>k.poly)),F);k.navMeshPolygonIDs=H.map((k=>this.navMesh.addPolygon(k))),k.isBuilding=!1,k.onBuildComplete.dispatch()}))}alignValuesSmallerThanEpsilon(k,B){return k!==B&&Math.abs(k-B)<1?B:k}getGridBlock(k,B){const U=this._navMeshBlocks.findIndex((U=>U.x===k&&U.y===B));if(U>-1)return this._navMeshBlocks[U];const F={ID:this._nextBlockID++,x:k,y:B,polygons:[],navMeshPolygonIDs:[],isBuilding:!1,onBuildComplete:new K.H};return this._navMeshBlocks.push(F),F}getBlocks(k){return k.map((k=>this._navMeshBlocks.find((B=>B.ID===k)))).filter((k=>!!k))}}},82119:(k,B,U)=>{"use strict";U.d(B,{l:()=>F});const F={}},563:(k,B,U)=>{"use strict";U.d(B,{X:()=>z});var F,G=U(8674),j=U(64527),$=U(27179),H=U(823),V=U(29658),W=U(43501),q=U(15740),K=U(39002);let z=F=class extends W.d{constructor(){super(...arguments),this._anchorMin=new $.I(.5,.5),this._anchorMax=new $.I(.5,.5),this._anchoredPivotOffset=new $.I,this._sizeDelta=new j.o,this._pivot=new $.I(.5,.5),this._rectTransformDimensions=new j.o,this._isTransformRectDirty=!0,this._onRecalculatedBounds=new q.H,this._onDimensionsChanged=new q.H}get anchorMin(){return this._anchorMin}set anchorMin(k){this.setAnchorMin(k.x,k.y)}get anchorMax(){return this._anchorMax}set anchorMax(k){this.setAnchorMax(k.x,k.y)}get localPosition(){return this._anchoredPivotOffset}set localPosition(k){this.setAnchoredPivotOffset(k.x,k.y)}get left(){return-this._sizeDelta.width*this._pivot.x+this._anchoredPivotOffset.x}set left(k){this.setSizeDelta(-this.right-k,this._sizeDelta.height),this.setAnchoredPivotOffset(this._sizeDelta.width*this._pivot.x+k,this._anchoredPivotOffset.y)}get right(){return-(this._sizeDelta.width*(1-this._pivot.x)+this._anchoredPivotOffset.x)}set right(k){this.setSizeDelta(-this.left-k,this._sizeDelta.height),this.setAnchoredPivotOffset(-(this._sizeDelta.width*(1-this._pivot.x)+k),this._anchoredPivotOffset.y)}get top(){return-this._sizeDelta.height*this._pivot.y+this._anchoredPivotOffset.y}set top(k){this.setSizeDelta(this._sizeDelta.width,-this.bottom-k),this.setAnchoredPivotOffset(this._anchoredPivotOffset.x,this._sizeDelta.height*this._pivot.y+k)}get bottom(){return-(this._sizeDelta.height*(1-this._pivot.y)+this._anchoredPivotOffset.y)}set bottom(k){this.setSizeDelta(this._sizeDelta.width,-this.top-k),this.setAnchoredPivotOffset(this._anchoredPivotOffset.x,-(this._sizeDelta.height*(1-this._pivot.y)+k))}get posX(){return this._anchoredPivotOffset.x}set posX(k){this.setAnchoredPivotOffset(k,this._anchoredPivotOffset.y)}get posY(){return this._anchoredPivotOffset.y}set posY(k){this.setAnchoredPivotOffset(this._anchoredPivotOffset.x,k)}get widthDelta(){return this._sizeDelta.width}set widthDelta(k){this.setSizeDelta(k,this._sizeDelta.height)}get heightDelta(){return this._sizeDelta.height}set heightDelta(k){this.setSizeDelta(this._sizeDelta.width,k)}get rectTransformDimensions(){return this.recalculateRectTransform(),this._rectTransformDimensions}get pivot(){return this._pivot}set pivot(k){this.setPivot(k.x,k.y)}get anchoredPivotOffset(){return this._anchoredPivotOffset}set anchoredPivotOffset(k){this.setAnchoredPivotOffset(k.x,k.y)}get sizeDelta(){return this._sizeDelta}set sizeDelta(k){this.setSizeDelta(k.width,k.height)}get fullWidth(){return this.rectTransformDimensions.width}set fullWidth(k){const B=this.rectTransformDimensions.width-this._sizeDelta.width;this._sizeDelta.width=k-B,this.markRectTransformDirty()}get fullHeight(){return this.rectTransformDimensions.height}set fullHeight(k){const B=this.rectTransformDimensions.height-this._sizeDelta.height;this._sizeDelta.height=k-B,this.markRectTransformDirty()}get onRecalculatedBounds(){return this._onRecalculatedBounds}get onDimensionsChanged(){return this._onDimensionsChanged}create(){super.create(),this._isTransformRectDirty=!0,this._previousParent&&(this._previousParent.onComponentAdded.add(this.parentComponentAddedOrRemoved,this),this._previousParent.onComponentRemoved.add(this.parentComponentAddedOrRemoved,this))}destroy(){var k,B,U,F;this._onRecalculatedBounds.dispose(),this._onDimensionsChanged.dispose(),null===(B=null===(k=this._previousParent)||void 0===k?void 0:k.onComponentAdded)||void 0===B||B.remove(this.parentComponentAddedOrRemoved,this),null===(F=null===(U=this._previousParent)||void 0===U?void 0:U.onComponentRemoved)||void 0===F||F.remove(this.parentComponentAddedOrRemoved,this),super.destroy()}preDeserialize(k){super.preDeserialize(k),null==k||delete k.localPosition}setAnchorMin(k,B){K.c.isNearlyEqual(this._anchorMin.x,k)&&K.c.isNearlyEqual(this._anchorMin.y,B)||(this._anchorMin.x=k,this._anchorMin.y=B,this.markRectTransformDirty())}setAnchorMax(k,B){K.c.isNearlyEqual(this._anchorMax.x,k)&&K.c.isNearlyEqual(this._anchorMax.y,B)||(this._anchorMax.x=k,this._anchorMax.y=B,this.markRectTransformDirty())}setAnchoredPivotOffset(k,B){this._anchoredPivotOffset.isNearlyEqualToValues(k,B)||(this._anchoredPivotOffset.x=k,this._anchoredPivotOffset.y=B,this.markRectTransformDirty())}setPosition(k,B){this.setAnchoredPivotOffset(k,B)}setPositionX(k){this.setAnchoredPivotOffset(k,this._anchoredPivotOffset.y)}setPositionY(k){this.setAnchoredPivotOffset(this._anchoredPivotOffset.x,k)}setSizeDelta(k,B){this._sizeDelta.isNearlyEqualToValues(k,B)||(this._sizeDelta.width=k,this._sizeDelta.height=B,this.markRectTransformDirty())}setPivot(k,B){this._pivot.isNearlyEqualToValues(k,B)||(this._pivot.x=k,this._pivot.y=B,this.markRectTransformDirty())}postDeserialize(){super.postDeserialize(),this._isTransformRectDirty=!0}recalculateTransform(){this.recalculateRectTransform(),super.recalculateTransform()}recalculateWorldTransform(){this.recalculateRectTransform(),super.recalculateWorldTransform()}parentComponentAddedOrRemoved(k){k instanceof W.d&&this.markRectTransformDirty()}hierarchyUpdated(){var k,B;this.GameObject.parent!==this._previousParent&&(this._previousParent&&(this._previousParent.onComponentAdded.remove(this.parentComponentAddedOrRemoved,this),this._previousParent.onComponentRemoved.remove(this.parentComponentAddedOrRemoved,this)),null===(k=this.GameObject.parent)||void 0===k||k.onComponentAdded.add(this.parentComponentAddedOrRemoved,this),null===(B=this.GameObject.parent)||void 0===B||B.onComponentRemoved.add(this.parentComponentAddedOrRemoved,this),this.markRectTransformDirty()),super.hierarchyUpdated()}recalculateRectTransform(){if(this._isTransformRectDirty){const k=this.GameObject.parent,B=k?k.findComponent(F):null,U=B?B.rectTransformDimensions:j.o.ZERO,G=new $.I(this._anchorMin.x*U.width,this._anchorMin.y*U.height),H=new $.I(this._anchorMax.x*U.width,this._anchorMax.y*U.height),V=new j.o(H.x-G.x,H.y-G.y),W=new $.I(0,0),q=this._rectTransformDimensions.width,K=this._rectTransformDimensions.height;B&&(W.x=U.width*B.pivot.x,W.y=U.height*B.pivot.y),this._rectTransformDimensions.width=V.width+this._sizeDelta.width,this._rectTransformDimensions.height=V.height+this._sizeDelta.height,super.setPosition(G.x+V.width*this._pivot.x+this._anchoredPivotOffset.x-W.x,G.y+V.height*this._pivot.y+this._anchoredPivotOffset.y-W.y),this._isTransformRectDirty=!1,this._onRecalculatedBounds.dispatch(),q===this._rectTransformDimensions.width&&K===this._rectTransformDimensions.height||this._onDimensionsChanged.dispatch()}}markRectTransformDirty(){if(!this._isTransformRectDirty){this._isTransformRectDirty=!0;const k=this.GameObject.children;if(!k)return;const B=k.length;for(let U=0;U to place values dynamically")],z)},96352:(k,B,U)=>{"use strict";U.d(B,{M:()=>j});var F=U(80267),G=U(5191);class j{constructor(k){this._gl=k}destroy(){this._gl.deleteProgram(this._program)}useProgram(){this._gl.useProgram(this._program)}compileProgram(k,B){const U=this._gl,j=this.compileFragmentShader(U,B),$=this.compileVertexShader(U,k);if(!j||!$)return null;const H=U.createProgram();return U.attachShader(H,$),U.attachShader(H,j),U.linkProgram(H),U.getProgramParameter(H,U.LINK_STATUS)?this._program=H:(F.V.log(`Could not initialize shaders:\n${U.getProgramInfoLog(H)}`,G.$.Error),null)}compileVertexShader(k,B){return this.compileShader(k,B,k.VERTEX_SHADER)}compileFragmentShader(k,B){return this.compileShader(k,B,k.FRAGMENT_SHADER)}compileShader(k,B,U){const j=k.createShader(U);return k.shaderSource(j,B),k.compileShader(j),k.getShaderParameter(j,k.COMPILE_STATUS)?j:(F.V.log(`Could not compile shader of type ${U}:\n${k.getShaderInfoLog(j)}`,G.$.Error),null)}}},43501:(k,B,U)=>{"use strict";U.d(B,{d:()=>K});var F=U(8674),G=U(68910),j=U(823),$=U(71082),H=U(40794),V=U(29658),W=U(15740),q=U(39002);let K=class extends H.u{constructor(){super(...arguments),this._previousParent=null,this.onWorldMatrixChanged=new W.H,this._worldPosition=new G.Point,this._worldScale=new G.Point(1,1),this._pixiTransform=new G.Transform,this._worldScaleID=0}get localPosition(){return this._pixiTransform.position}set localPosition(k){this.setPixiTransformPosition(k.x,k.y)}get localScale(){return this._pixiTransform.scale}set localScale(k){this.setScale(k.x,k.y)}get localRotation(){return q.c.radiansToDegrees(this._pixiTransform.rotation)}set localRotation(k){this.setRotation(k)}get localMatrix(){return this.recalculateTransform(),this._pixiTransform.localTransform}get worldMatrix(){return this.recalculateWorldTransform(),this._pixiTransform.worldTransform}get worldPosition(){this.recalculateWorldTransform();const k=this._pixiTransform.worldTransform;return this._worldPosition.set(k.tx,k.ty),this._worldPosition}set worldPosition(k){var B;const U=null===(B=this.GameObject.parent)||void 0===B?void 0:B.transform;if(U){const B=U.worldMatrix.applyInverse(k);this.setPixiTransformPosition(B.x,B.y)}else this.localPosition=k}get worldScale(){var k,B;this.recalculateWorldTransform();const U=this._pixiTransform._worldID;if(this._worldScaleID!==U){this._worldScale.copyFrom(this._pixiTransform.scale);let F=null===(k=this.GameObject.parent)||void 0===k?void 0:k.transform;for(;F;)$.C.multiplyPointData(this._worldScale,F.localScale),F=null===(B=F.GameObject.parent)||void 0===B?void 0:B.transform;this._worldScaleID=U}return this._worldScale}set worldScale(k){var B;const U=null===(B=this.GameObject.parent)||void 0===B?void 0:B.transform;if(U){const B=U.worldScale;this.setScale(k.x/B.x,k.y/B.y)}else this.setScale(k.x,k.y)}get pixiTransform(){return this.recalculateWorldTransform(),this._pixiTransform}create(){super.create(),this._previousParent=this.GameObject.parent,this.GameObject.onHierarchyChanged.add(this.hierarchyUpdated,this),this.appendObservablePointCallback(this._pixiTransform.position,(()=>{this.markChildTransformsDirty()})),this.appendObservablePointCallback(this._pixiTransform.scale,(()=>{this.markChildTransformsDirty()})),this.appendObservablePointCallback(this._pixiTransform.pivot,(()=>{this.markChildTransformsDirty()})),this.appendObservablePointCallback(this._pixiTransform.skew,(()=>{this.markChildTransformsDirty()}))}destroy(){var k,B;null===(B=null===(k=this.GameObject)||void 0===k?void 0:k.onHierarchyChanged)||void 0===B||B.remove(this.hierarchyUpdated,this),this.onWorldMatrixChanged.dispose(),super.destroy()}setPosition(k,B){this.setPixiTransformPosition(k,B)}setPositionX(k){this._pixiTransform.position.x=k}setPositionY(k){this._pixiTransform.position.y=k}setPixiTransformPosition(k,B){this._pixiTransform.position.set(k,B)}setScale(k,B=k){this._pixiTransform.scale.set(k,B)}setSkew(k,B=k){this._pixiTransform.skew.set(q.c.degreesToRadians(k),q.c.degreesToRadians(B))}setRotation(k){this._pixiTransform.rotation=q.c.degreesToRadians(k)}recalculateWorldTransform(){this._pixiTransform.updateTransform(this.getParentTransform())}recalculateTransform(){this._pixiTransform.updateLocalTransform()}getParentTransform(){var k,B;const U=null===(B=null===(k=this.GameObject)||void 0===k?void 0:k.parent)||void 0===B?void 0:B.transform;return U?U.pixiTransform:(this._fakeParentTransform||(this._fakeParentTransform=new G.Transform),this._fakeParentTransform)}markChildTransformsDirty(){var k,B,U;this._pixiTransform._worldID++,this.onWorldMatrixChanged.dispatch();const F=null!==(B=null===(k=this.GameObject)||void 0===k?void 0:k.children)&&void 0!==B?B:[],G=F.length;for(let j=0;j{U.call(F),B()}}};(0,F.Cg)([(0,j._H)(),(0,F.Sn)("design:type",Object),(0,F.Sn)("design:paramtypes",[Object])],K.prototype,"localPosition",null),(0,F.Cg)([(0,j._H)(),(0,F.Sn)("design:type",Object),(0,F.Sn)("design:paramtypes",[Object])],K.prototype,"localScale",null),(0,F.Cg)([(0,j.g1)(),(0,F.Sn)("design:type",Number),(0,F.Sn)("design:paramtypes",[Number])],K.prototype,"localRotation",null),K=(0,F.Cg)([(0,V.EV)("Transform",V.YH.transform,"A basic transform that only holds position rotation and scale")],K)},55539:(k,B,U)=>{"use strict";var F;U.d(B,{C:()=>F}),function(k){k[k.TOP_LEFT=0]="TOP_LEFT",k[k.TOP_CENTER=1]="TOP_CENTER",k[k.TOP_RIGHT=2]="TOP_RIGHT",k[k.LEFT_TOP=3]="LEFT_TOP",k[k.LEFT_CENTER=4]="LEFT_CENTER",k[k.LEFT_BOTTOM=5]="LEFT_BOTTOM",k[k.CENTER=6]="CENTER",k[k.RIGHT_TOP=7]="RIGHT_TOP",k[k.RIGHT_CENTER=8]="RIGHT_CENTER",k[k.RIGHT_BOTTOM=9]="RIGHT_BOTTOM",k[k.BOTTOM_LEFT=10]="BOTTOM_LEFT",k[k.BOTTOM_CENTER=11]="BOTTOM_CENTER",k[k.BOTTOM_RIGHT=12]="BOTTOM_RIGHT"}(F||(F={}))},30290:(k,B,U)=>{"use strict";var F;U.d(B,{G:()=>G,J:()=>F}),function(k){k.None="none",k.Easy="power1",k.Strong="power2",k.VeryStrong="power3",k.SuperStrong="power4",k.Back="back",k.Elastic="elastic"}(F||(F={}));class G{static generateCustomElasticEase(k=1,B=.3,U=!1,F=!0){let j;return j=U?F?{value:`elastic.inOut(${k}, ${B})`}:{value:`elastic.in(${k}, ${B})`}:F?{value:`elastic.out(${k}, ${B})`}:G.Linear.None,j}static generateCustomBackEase(k=2,B=!0,U=!1){let F;return F=B?U?{value:`back.inOut(${k})`}:{value:`back.in(${k})`}:U?{value:`back.out(${k})`}:G.Linear.None,F}static generateSteppedEase(k=16){return{value:`steps (${k})`}}static generateSlowMoEase(k=.5,B=.5,U=!1){return{value:`slow (${k}, ${B}, ${U})`}}static generateRoughEase(k=1,B=20,U=!0,F=!1,j=!0,$=!0,H=G.Linear.None){let V="none";return j?V=$?"both":"in":$&&(V="out"),{value:`rough ({ template: ${H}, strength: ${k}, points: ${B}, randomize: ${U}, clamp: ${F}, taper: ${V})`}}}G.Back={In:{value:"back.in(2) "},Out:{value:"back.out(2) "},InOut:{value:"back.inOut(2)"}},G.Bounce={In:{value:"bounce.in"},Out:{value:"bounce.out"},InOut:{value:"bounce.inOut"}},G.Circular={In:{value:"circ.in"},Out:{value:"circ.out"},InOut:{value:"circ.inOut"}},G.Cubic={In:{value:"power2.in"},Out:{value:"power2.out"},InOut:{value:"power2.inOut"}},G.Elastic={In:{value:"elastic.in(1, 0.3)"},Out:{value:"elastic.out(1, 0.3)"},InOut:{value:"elastic.inOut(1, 0.3)"}},G.Exponential={In:{value:"expo.in"},Out:{value:"expo.out"},InOut:{value:"expo.inOut"}},G.Linear={None:{value:"none"}},G.Quadratic={In:{value:"power1.in"},Out:{value:"power1.out"},InOut:{value:"power1.inOut"}},G.Quintic={In:{value:"power4.in"},Out:{value:"power4.out"},InOut:{value:"power4.inOut"}},G.Quartic={In:{value:"power3.in"},Out:{value:"power3.out"},InOut:{value:"power3.inOut"}},G.Sinusoidal={In:{value:"sine.in"},Out:{value:"sine.out"},InOut:{value:"sine.inOut"}}},29104:(k,B,U)=>{"use strict";U.d(B,{K:()=>W});var F=U(85880),G=U(80267),j=U(5191),$=U(32154),H=U(15740),V=U(30290);class W{get onLoop(){return this.onRepeat}get isRunning(){return this._timeline.isActive()}get isPaused(){return this._timeline.paused()}get timeScale(){return this._timeline.timeScale()}set timeScale(k){this.checkInitialized("timeScale"),this._timeline.timeScale(k)}get properties(){return this.checkInitialized("get properties"),this._rootTween.vars}get reverse(){return this.checkInitialized("get reverse"),this._timeline.reversed()}set reverse(k){this.checkInitialized("set reverse"),this._timeline.reversed(k)}getDuration(){return this.checkInitialized("get duration"),1e3*this._rootTween.duration()}duration(k){return this.checkInitialized("set duration"),this._rootTween.duration(.001*k),this}getDelay(){return this.checkInitialized("get delay"),1e3*this._timeline.delay()}delay(k){return this.checkInitialized("set delay"),this._timeline.delay(.001*k),this}getRepeat(){return this.checkInitialized("get repeat"),this._timeline.repeat()}repeat(k){return this.checkInitialized("set repeat"),this._timeline=this._timeline.repeat(k),this}getYoyo(){return this.checkInitialized("get yoyo"),this._timeline.yoyo()}yoyo(k){return this.checkInitialized("set yoyo"),this._timeline.yoyo(k),this}get totalDuration(){return this.checkInitialized("get totalDuration"),1e3*this._timeline.duration()}get target(){return this._target}constructor(k,B,U,G){this._tweenInitialized=!1,this.chainedTween=null,this.pendingDelete=!1,this.killed=!1,this.isDestroyed=!1,this._target=k,this.game=B,this.manager=G,this.owner=U,this.onTweenComplete=new H.H,this.onChildComplete=new H.H,this.onRepeat=new H.H,this.onUpdate=new H.H,this.onStart=new H.H,this.onDestroy=new H.H,this._timeline=F.os.timeline({onComplete:()=>{this.onCompleteCallback()},onRepeat:()=>{this.onRepeat.dispatch()},onUpdate:()=>{this.onUpdate.dispatch()},onStart:()=>{this.onStart.dispatch()}}),this._rootTween=F.os.set(this._target,{})}fixDeprecatedRelativeValues(k){const B=Object.keys(k);for(let U=0;U=0?(K.delay=.001*q,this._timeline.to(this._target,K)):this._timeline.add(this._rootTween),this._timeline.paused(!G),$.A.isDefined(B)&&this.duration(B),$.A.isDefined(H)&&this.repeat(H),$.A.isDefined(j)&&this.delay(j),$.A.isDefined(W)&&this.yoyo(W),this}from(k,B,U=V.G.Linear.None,G=!1,j,H,W,q=-1){const K=this.fixDeprecatedRelativeValues(k);return K.ease=U.value,this._rootTween=F.os.from(this._target,K),this._tweenInitialized=!0,q>=0?(K.delay=.001*q,this._timeline.to(this._target,K)):this._timeline.add(this._rootTween),this._timeline.paused(!G),$.A.isDefined(B)&&this.duration(B),$.A.isDefined(H)&&this.repeat(H),$.A.isDefined(j)&&this.delay(j),$.A.isDefined(W)&&this.yoyo(W),this}onCompleteCallback(){this.game&&(this.onTweenComplete.dispatch(),this.chainedTween&&this.chainedTween.start())}onUpdateCallback(k,B){return this.onUpdate.add(k,B),this}chain(...k){let B=k.length;for(;--B>=0;)k[B].onTweenComplete.add((()=>{this.game&&this.onChildComplete.dispatch()}),this,Number.MAX_SAFE_INTEGER),B>0?k[B-1].chainedTween=k[B]:this.chainedTween=k[B];return this}pause(){return this._timeline&&(this._timeline=this._timeline.pause()),this}loop(k){return this._timeline=this._timeline.repeat(k?-1:0),this}repeatDelay(k){return this._timeline=this._timeline.repeatDelay(.001*k),this}resume(){var k;return this._timeline=null===(k=this._timeline)||void 0===k?void 0:k.resume(),this}start(){return this._timeline=this._timeline.restart(!0),this}stop(k=!1){return this._timeline&&(this._timeline=this._timeline.pause(),k&&(this._timeline=this._timeline.progress(1,!1))),this}remove(){this._timeline&&this._timeline.kill(),this._rootTween&&this._rootTween.kill(),this.pendingDelete=!0,this.killed=!0}destroy(){this.isDestroyed?G.V.log("Tween destroy called, but tween is already destroyed",j.$.Warning):(this._timeline&&(this.killed||this._timeline.kill(),this._timeline=null),this._rootTween&&(this.killed||this._rootTween.kill(),this._rootTween=null),this.killed=!0,this.onStart.dispose(),this.onTweenComplete.dispose(),this.onChildComplete.dispose(),this.onUpdate.dispose(),this.onRepeat.dispose(),this.game=null,this.manager=null,this.owner=null,this.chainedTween=null,this.onTweenComplete=null,this.onChildComplete=null,this.onRepeat=null,this.onUpdate=null,this.onStart=null,this.isDestroyed=!0,this.onDestroy.dispatch(),this.onDestroy.dispose(),this.onDestroy=null)}checkInitialized(k){this._tweenInitialized||G.V.log(`Please call Tween.to/from before calling ${k}, the value has not been set!`,j.$.Error)}}},78821:(k,B,U)=>{"use strict";U.d(B,{$:()=>H});var F=U(85880),G=U(80267),j=U(5191),$=U(29104);class H{constructor(k){this._tweens=[],this._owners=new Map,this.game=k,this.game.onPause.add(this.pauseAll,this),this.game.onResume.add(this.resumeAll,this)}getAll(){return this._tweens}removeAll(){this._tweens.forEach((k=>{k.pendingDelete=!0,k.remove()}))}removeFrom(k,B=!0){let U,F;if(Array.isArray(k))for(F=k.length,U=0;U{U&&(k.pendingDelete=!0)}),this,-Number.MAX_SAFE_INTEGER),k}create(k,B,U=!0){const F=new $.K(k,this.game,B);return this.add(F,B,U),F}remove(k){const B=this._tweens.indexOf(k);-1!==B&&(this._tweens[B].pendingDelete=!0,this._tweens[B].remove())}update(){for(let k=this._tweens.length-1;k>=0;k--){const B=this._tweens[k];if(!1!=!!B)if(B.isDestroyed){this._tweens.splice(k,1);const U=this.findOwnerForTween(B);null!==U?G.V.log(`Attempted to update a destroyed tween, owner: ${U.constructor.name}`,j.$.Warning):G.V.log("Attempted to update a destroyed tween.",j.$.Warning)}else B.pendingDelete&&(B.isRunning&&B.stop(!1),this.removeTweenFromOwner(B),B.destroy(),this._tweens.splice(k,1));else this._tweens.splice(k,1)}return this._tweens.length>0}pauseAll(){this._tweens.forEach((k=>{k.pendingDelete||k.pause()}))}resumeAll(){this._tweens.forEach((k=>{k.pendingDelete||k.resume()}))}removeAllFromOwner(k){if(!this._owners.has(k))return;this._owners.get(k).forEach((k=>{k.remove(),k.pendingDelete=!0})),this._owners.delete(k)}removeTweenFromOwner(k){let B=!1;if(this._owners.has(k.owner)){const U=this._owners.get(k.owner);U.has(k)&&(U.delete(k),0===U.size&&this._owners.delete(k.owner),B=!0)}return B}findOwnerForTween(k){let B=null;if(null!==k.owner)B=k.owner;else for(const[U,F]of this._owners.entries())if(F.has(k)){B=U;break}return B}destroy(){this.game.onPause.remove(this.pauseAll,this),this.game.onResume.remove(this.resumeAll,this),this.game=null,this._tweens=null}static setGlobalTimeScale(k){F.os.globalTimeline.timeScale(k)}}},50740:(k,B,U)=>{"use strict";U.d(B,{K:()=>H});var F=U(5191),G=U(80267),j=U(15740),$=U(39002);class H{get isDestroyed(){return this._destroyed}get isLoaded(){return this.sound.isLoaded}set isLoaded(k){this.sound.isLoaded=k}get isPlaying(){return this.sound.isPlaying}set isPlaying(k){this.sound.isPlaying=k}get autoPlay(){return this.sound.autoPlay}set autoPlay(k){this.sound.autoPlay=k}get singleInstance(){return this.sound.singleInstance}set singleInstance(k){this.sound.singleInstance=k}get preload(){return this.sound.preload}set preload(k){this.sound.preload=k}get paused(){return this.sound.paused}set paused(k){this.sound.paused=k}get muted(){return this.sound.muted}set muted(k){this.instancesValid()&&(this.sound.muted=k)}get mute(){return this.muted}set mute(k){this.muted=k}get loop(){return this.sound.loop}set loop(k){this.instancesValid()&&(this.sound.loop=k)}get url(){return this.sound.url}set url(k){this.sound.url=k}get options(){return this.sound.options}set options(k){this.sound.options=k}get media(){return this.sound.media}set media(k){this.sound.media=k}get speed(){return this.sound.speed}set speed(k){this.instancesValid()&&(this.sound.speed=k)}get filters(){return this.sound.filters}set filters(k){this.sound.filters=k}get volume(){return this.sound.volume}set volume(k){this.instancesValid()&&(this.sound.volume=k)}get context(){return this.sound.context}get instances(){return this.sound.instances}get sprites(){return this.sound.sprites}get duration(){return this.sound.duration}get isPlayable(){return this.sound.isPlayable}get isDecoding(){return!this.sound.isLoaded}get onPlay(){return this._onPlay}get onStop(){return this._onStop}get onComplete(){return this._onComplete}get onPause(){return this._onPause}get onResume(){return this._onResume}constructor(k,B,U,$){this._destroyed=!1,this._onPlay=new j.H,this._onStop=new j.H,this._onComplete=new j.H,this._onPause=new j.H,this._onResume=new j.H,this.sound=k,this.game=B,this.key=U,this.usingAudioTag=$,k?this.singleInstance=!1:G.V.log("PIXISound constructor called without a sound.",F.$.Error)}instancesValid(){let k=!0;return this.sound.instances||(k=!1,G.V.log(`Sound instances invalid for key ${this.key}`,F.$.Warning)),k}pause(){return this.isPlaying&&(this.onPause.dispatch(),this.sound.pause()),this}resume(){return this.paused&&(this.onResume.dispatch(),this.sound.resume()),this}addSprites(k,B){return this.sound.addSprites(k,B)}destroy(){this._destroyed=!0,this._onComplete.dispose(),this._onStop.dispose(),this._onPlay.dispose(),this._onPause.dispose(),this._onResume.dispose(),this.game.sound.remove(this),this.sound&&(this.sound.instances&&this.sound.destroy(),this.sound=null)}removeSprites(k){return this.sound.removeSprites(k),this}stop(){return this.sound&&(this.isPlaying||this.paused)&&(this._onStop.dispatch(),this.sound.stop()),this}play(k,B){return this.onPlay.dispatch(),this.sound.play(k,(k=>{this.onComplete.dispatch(),B&&B(k)})),this}playWithOptions(k={start:0}){return this.onPlay.dispatch(),this.sound.play(k,(k=>{this.onComplete.dispatch()})),this}refresh(){this.sound.refresh()}refreshPaused(){this.sound.refreshPaused()}autoPlayStart(){return this.sound.autoPlayStart()}addMarker(k,B,U,F=null){null!==F&&(this.volume=F);const G={start:B,end:B+U},j=this.sound.sprites[k];return j?Object.assign(j,G):this.sound.addSprites(k,G),this}playMarker(k,B=0,U=null,j=null,H=!1,V){const W=this.sprites[k];if(W){const F=$.c.clamp(B,0,1);W.start=$.c.linear(W.start,W.end,F),null!==U&&(this.volume=U),null!==j&&(this.loop=j),H&&this.stop(),this.play(k,V)}else G.V.log(`Cannot find sound ${k} so cannot play it.`,F.$.Error);return this}removeMarker(k){return this.sound.removeSprites(k),this}}},78321:(k,B,U)=>{"use strict";U.d(B,{x:()=>W});var F=U(8674),G=U(34711),j=U(22070),$=U(30615),H=U(15740),V=U(50740);class W{get mute(){return this._muted}set mute(k){if(k){if(this._muted)return;this._codeMuted=!0,this.setMute()}else{if(!this._muted)return;this._codeMuted=!1,this.unsetMute()}}get volume(){return G.s3.volumeAll}set volume(k){const B=Math.min(Math.max(k,0),1);if(G.s3.volumeAll!==B){G.s3.volumeAll=B;for(let k=0;k{this.setTouchUnlock(),this.resumeWebAudio()},void 0===this._unlockSource.start?this._unlockSource.noteOn(0):this._unlockSource.start(0),this.resumeWebAudio())),!0}stopAll(){this.noAudio||G.s3.stopAll()}pauseAll(){this.noAudio||G.s3.pauseAll()}resumeAll(){this.noAudio||G.s3.resumeAll()}setDecodedCallback(k,B,U){let F=k;"string"==typeof F&&(F=[F]),this._watchList.reset();for(let G=0;G0;)if(this._sounds[B]===k)return this._sounds.splice(B,1),!0;return!1}removeAll(){G.s3.removeAll(),this._sounds.length=0}removeByKey(k){let B=this._sounds.length,U=0;for(G.s3.remove(k);B-- >0;)this._sounds[B].key===k&&(this._sounds.splice(B,1),U++);return U}play(k="",B=1,U=!1){if(this.noAudio)return null;const F=this.add(k,B,U);return F.play(),F}setMute(){this._muted||(this._muted=!0,G.s3.muteAll(),this.onMute.dispatch())}unsetMute(){this._muted&&!this._codeMuted&&(this._muted=!1,G.s3.unmuteAll(),this.onUnMute.dispatch())}destroy(){var k,B;this.removeAll(),this.onSoundDecode.dispose(),this.onVolumeChange.dispose(),this.onMute.dispose(),this.onUnMute.dispose(),this.onTouchUnlock.dispose(),this.game.canvas.removeEventListener("click",this._resumeWebAudioOnClick),null===(B=null===(k=this.context)||void 0===k?void 0:k.close)||void 0===B||B.call(k),this._sounds=null,this._watchList=null,G.s3.close()}_onResumeWebAudioOnClick(){this.resumeWebAudio(),this.game.canvas.removeEventListener("click",this._resumeWebAudioOnClick)}}},48368:(k,B,U)=>{"use strict";U.d(B,{q:()=>$});var F=U(68910),G=U(5191),j=U(80267);class ${static setSmoothed(k,B){(null==k?void 0:k.baseTexture)?(k.baseTexture.scaleMode=B?F.SCALE_MODES.LINEAR:F.SCALE_MODES.NEAREST,k.baseTexture.update()):j.V.log("Object not found, cannot set smoothing",G.$.Warning)}static getSmoothed(k){return k.baseTexture.scaleMode===F.SCALE_MODES.LINEAR}}},15740:(k,B,U)=>{"use strict";U.d(B,{H:()=>H});var F=U(8674),G=U(41560),j=U(32154);class ${get listener(){return this._listener}get context(){return this._context}get callCount(){return this._callCount}constructor(k,B=null,U=!1,F=0,G){this.isOnce=!1,this.priority=0,this.active=!0,this._callCount=0,this._listener=k,this._context=B,this.isOnce=U,this.priority=F,this._args=G}isBound(){return!!this._listener}execute(k){var B;let U;if(this.active&&this.isBound()){++this._callCount;let F=[];k.length>0&&(F=F.concat(k)),(null===(B=this._args)||void 0===B?void 0:B.length)>0&&(F=F.concat(this._args)),U=this._listener.apply(this.context,F)}return U}destroy(){this._listener=null,this._context=null,this._args=null}toString(){return`[SignalBinding isOnce: ${String(this.isOnce)}, isBound: ${String(this.isBound())}, active: ${String(this.active)}]`}}class H{constructor(){this._bindings=[],this._shouldPropagate=!0,this.active=!0,this._dispatchCount=0}get dispatchCount(){return this._dispatchCount}add(k,B=null,U=0,...F){return this.validateListener(k,"add"),this.addBinding(k,B,!1,U,F)}addOnce(k,B=null,U=0,...F){return this.validateListener(k,"addOnce"),this.addBinding(k,B,!0,U,F)}asPromise(){return(0,F.sH)(this,void 0,void 0,(function*(){return j.A.isDefined(this._promise)||(this._promise=new G.b,this.addOnce(((...k)=>{var B;null===(B=this._promise)||void 0===B||B.resolve(k),this._promise=null}))),this._promise}))}remove(k,B=null){if(!k)return;this.validateListener(k,"remove");const U=this.indexOfListener(k,B);-1!==U&&this.removeAtIndex(U)}removeAll(k=null){for(let B=this._bindings.length-1;B>=0;--B)k&&k!==this._bindings[B].context||this.removeAtIndex(B)}has(k,B=null){return-1!==this.indexOfListener(k,B)}halt(){this._shouldPropagate=!1}dispatch(...k){this.active&&this.dispatchInternal(k)}dispatchAsync(...k){return(0,F.sH)(this,void 0,void 0,(function*(){this.active&&(yield Promise.all(this.dispatchInternal(k)))}))}dispatchInternal(k){this._shouldPropagate=!0;const B=[...this._bindings],U=[];for(let F=B.length-1;F>=0&&this._shouldPropagate;--F){const G=B[F];U.push(G.execute(k)),G.isOnce&&G.isBound()&&this.remove(G.listener,G.context)}return this._dispatchCount++,U}dispose(){var k;null===(k=this._promise)||void 0===k||k.reject(`Signal disposed before firing. ${this.toString()}`),this.removeAll(),this._bindings.length=0}getBindingsCount(){return this._bindings.length}toString(){return`[Signal bindings count: ${this.getBindingsCount()}, active: ${String(this.active)}]`}validateListener(k,B){if("function"!=typeof k)throw new Error(`Signal: listener is a required param of ${B}() and must be a function.`)}addBinding(k,B=null,U=!1,F=0,G){const j=this.indexOfListener(k,B);let H;if(j>=0){if(H=this._bindings[j],H.isOnce!==U)throw new Error(`You cannot add ${U?"":"Once"}() then add ${U?"Once":""}() the same listener without removing the relationship first`)}else{H=new $(k,B,U,F,G);let j=0;for(let k=this._bindings.length-1;k>=0;--k)if(this._bindings[k].priorityU.listener===k&&U.context===B))}}},9938:(k,B,U)=>{"use strict";var F,G,j,$;U.d(B,{bX:()=>F}),function(k){k.PointerDown="pointerdown",k.PointerCancel="pointercancel",k.PointerUp="pointerup",k.PointerTap="pointertap",k.PointerUpOutside="pointerupoutside",k.PointerMove="pointermove",k.PointerOver="pointerover",k.PointerOut="pointerout"}(F||(F={})),function(k){k.TouchStart="touchstart",k.TouchCancel="touchcancel",k.TouchEnd="touchend",k.TouchEndOutside="touchendoutside",k.TouchMove="touchmove",k.Tap="tap"}(G||(G={})),function(k){k.RightDown="rightdown",k.MouseDown="mousedown",k.RightUp="rightup",k.MouseUp="mouseup",k.RightClick="rightclick",k.Click="click",k.RightUpOutside="rightupoutside",k.MouseUpOutside="mouseupoutside",k.MouseMove="mousemove",k.MouseOver="mouseover",k.MouseOut="mouseout"}(j||(j={})),function(k){k.Added="added",k.Removed="removed"}($||($={}))},86766:(k,B,U)=>{"use strict";U.d(B,{S:()=>Z});var F=U(8674),G=U(27179),j=U(823),$=U(4697),H=U(52751),V=U(62481),W=U(93337),q=U(57530),K=U(40794),z=U(29658),Y=U(61806),Q=U(15740),X=U(9938);let Z=class extends K.u{constructor(){super(...arguments),this.onDown=new Q.H,this.onRelease=new Q.H,this.onReleaseOutside=new Q.H,this.onHoverEnter=new Q.H,this.onHoverExit=new Q.H,this.onHoverMove=new Q.H,this.onHold=new Q.H,this.onClick=new Q.H,this._holdDelay=1e3,this.debounceTimeMs=0,this.allowContinuousHold=!1,this._pointerDown=!1,this._touchDuration=0,this._holdSent=!1,this._isTargetInput=!1,this._lastClickTime=0,this.onInputEnabledChanged=new Q.H,this._inputEnabled=!0,this.attachToCamera=!1,this.disableWhileAwaitingListeners=!1,this.sendClickLocationWithPointerSignals=!0,this._awaitingListeners=!1,this._renderComponent=null,this._displayObject=null}get inputEnabled(){return this._inputEnabled}set inputEnabled(k){this._inputEnabled=k,this.applyInputEnabledSetting(k),this.onInputEnabledChanged.dispatch()}set useHandCursor(k){this._useHandCursor=k,this.applyUseHandCursorSetting(k)}get useHandCursor(){return this._useHandCursor}set awaitingListeners(k){this._awaitingListeners=k,this.applyInputEnabledSetting(!k)}get renderComponent(){return this._renderComponent}set renderComponent(k){this._renderComponent=k,this._renderComponent?this.updateRenderComponent(this._renderComponent):this.updateRenderComponent(null)}create(){super.create(),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerUpOutside=this.onPointerUpOutside.bind(this),this.onPointerOver=this.onPointerOver.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onPointerMove=this.onPointerMove.bind(this)}postCreate(){super.postCreate(),this.updateRenderComponent(this._renderComponent)}hasContainsPoint(k){return void 0!==k.containsPoint}hasOriginalContainsPoint(k){return void 0!==k.originalContainsPoint}overrideContainsPoint(k){if(!this.hasContainsPoint(k))return;let B;this.hasOriginalContainsPoint(k)?B=k.originalContainsPoint.bind(k):(B=k.containsPoint.bind(k),k.originalContainsPoint=B),k.containsPoint=k=>{let U=this.attachToCamera||H.w.getActiveScene().getLayer(this._renderComponent.GameObject.layer).attachToCamera||!q.i.main;return B(U?k:q.i.main.viewMatrix.applyInverse(k))}}recursiveOverrideContainsPoint(k){if(this.overrideContainsPoint(k),void 0!==k.children&&!1!==Array.isArray(k.children))for(let B=0;B{var k,B;null===(B=null===(k=this.gameObject)||void 0===k?void 0:k.isDestroyed)||void 0===B||B||(this.awaitingListeners=!1)}))):this.onClick.dispatch(...this.sendClickLocationWithPointerSignals?[B]:[])),this._isTargetInput=!1,this._holdSent=!1,this._pointerDown=!1}onPointerUpOutside(k){(0,W.H)(k)||(this.onReleaseOutside.dispatch(),this._holdSent=!1,this._pointerDown=!1)}onPointerOver(k){(0,W.H)(k)||this.onHoverEnter.dispatch()}onPointerOut(k){(0,W.H)(k)||(this._isTargetInput=!1,this._touchDuration=0,this.onHoverExit.dispatch())}onPointerMove(k){if((0,W.H)(k))return;const B=new G.I(k.global.x,k.global.y);this.onHoverMove.dispatch(B)}applyUseHandCursorSetting(k){this._displayObject&&(this._displayObject.cursor=k?"pointer":"auto")}applyInputEnabledSetting(k){this._displayObject&&(this._displayObject.eventMode=k?"static":"auto")}enableInteractiveChildrenOnHierarchy(k){var B;const U=k.parent;U&&(U.interactiveChildCount=(null!==(B=U.interactiveChildCount)&&void 0!==B?B:0)+1,U.interactiveChildren=!0,this.enableInteractiveChildrenOnHierarchy(U))}disableInteractiveChildrenOnHierarchy(k){const B=k.parent;B&&B.interactiveChildCount>0&&(--B.interactiveChildCount,B.interactiveChildren=B.interactiveChildCount>0,this.disableInteractiveChildrenOnHierarchy(B))}shouldDebounce(){return!this.inputEnabled||this._awaitingListeners||this.debounceTimeMs>0&&Date.now(){"use strict";U.d(B,{l:()=>it});var F=U(68910),G=U(5191),j=U(80267),$=U(32154),H=U(61806),V=U(39688),W=U(66032),q=U(52777),K=U(88651);class z extends K.${constructor(k,B,U,F){super(k,B),this.bitmapData=U,this.frameData=F}destroy(){this.game.cache.removeBitmapData(this.key),super.destroy()}}var Y=U(37950),Q=U(37061);class X extends K.${constructor(k,B,U,F){super(k,B),this.renderTexture=U,this.frameData=F}destroy(){this.game.cache.removeRenderTexture(this.key),super.destroy()}}var Z=U(89460);class J extends K.${get spineData(){return this._spineData}constructor(k,B){super(H.W.instance.game,k),this._spineData=B}destroy(){this._spineData=null,super.destroy()}}var tt=U(49356),et=U(90157);class it{get game(){return this._game}static getAssetTypeIDs(){return Object.keys(q.r).filter((k=>!isNaN(Number(q.r[k])))).map((k=>q.r[k]))}addAtlasAlias(k,B,U){this._atlasFrameAlias.set(k,{atlasGuid:B,atlasFrame:U})}removeAtlasAlias(k){this._atlasFrameAlias.delete(k)}getAtlasAlias(k){return this._atlasFrameAlias.has(k)?this._atlasFrameAlias.get(k):null}addSliceData(k,B){this._sliceData.set(k,B)}getSliceData(k){return this._sliceData.get(k)}get cacheMap(){return this._cacheMap}constructor(k){this._atlasFrameAlias=new Map,this._sliceData=new Map,this._game=k,this._cacheMap=new Map,this._cacheMap.set(q.r.IMAGE,new Map),this._cacheMap.set(q.r.TEXTURE_ATLAS,new Map),this._cacheMap.set(q.r.JSON,new Map),this._cacheMap.set(q.r.SOUND,new Map),this._cacheMap.set(q.r.TEXT,new Map),this._cacheMap.set(q.r.RENDER_TEXTURE,new Map),this._cacheMap.set(q.r.BITMAPDATA,new Map),this._cacheMap.set(q.r.SPINE,new Map)}getKeys(k){return this.hasMap(k)?Array.from(this._cacheMap.get(k).keys()):[]}getSpine(k){const B=this.getMap(q.r.SPINE);if(!B.has(k))return null;let U=!0;const F=B.get(k),G=F.spineData;return F.destroyed&&!G&&(U=!1),U?G:(this.deleteStaleCache(B,k,q.e.SPINE),this.deleteStaleCache(B,k,q.e.TEXT),this.deleteStaleCache(B,`${k}Atlas`,q.e.JSON),null)}getImage(k){const B=this.getMap(q.r.IMAGE);if(!B.has(k))return null;const U=B.get(k),F=U.image;return U.destroyed||!F?(this.deleteStaleCache(B,k,q.e.IMAGE),null):F}getTexture(k,B){let U=k,G=B;const j=this.getMap(q.r.IMAGE),H=this.getAtlasAlias(k);if(H&&(U=H.atlasGuid,G=H.atlasFrame),j.has(U)){const k=j.get(U);if(k.destroyed||!k.image&&k.texture.baseTexture.resource)this.deleteStaleCache(j,U,q.e.IMAGE);else{if($.A.isDefined(G)){const B=k.subTextures[G];if(B&&null!==B.textureCacheIds&&B.baseTexture&&!B.baseTexture.destroyed)return B}const B=k.texture;if(B&&null!==B.textureCacheIds&&B.baseTexture&&!B.baseTexture.destroyed)return B;this.deleteStaleCache(j,U,q.e.IMAGE)}}return F.Texture.EMPTY}getFrameData(k,B=q.r.TEXTURE_ATLAS){const U=this.getMap(B);if(!U.has(k))return null;const F=U.get(k),G=F.frameData;return F.destroyed||!$.A.isDefined(G)||G.destroyed?(this.deleteStaleCache(U,k,Object.values(q.e)[B]),null):G}getFrameByName(k,B,U=q.r.TEXTURE_ATLAS){const F=this.getFrameData(k,U);return F?(B||j.V.log(`Cache getFrameByName called with no frame name: ${k}`,G.$.Error),F.getFrameByName(B)):null}getJSON(k){const B=this.getMap(q.r.JSON);if(!B.has(k))return null;const U=B.get(k),F=U.json;return U.destroyed||!$.A.isDefined(F)?(this.deleteStaleCache(B,k,q.e.JSON),null):F}getSound(k){const B=this.getMap(q.r.SOUND);if(!B.has(k))return null;const U=B.get(k),F=U.sound;return U.destroyed||!F||F.isDestroyed||!F.sound?(this.deleteStaleCache(B,k,q.e.SOUND),null):F}getText(k){const B=this.getMap(q.r.TEXT);if(!B.has(k))return null;const U=B.get(k),F=U.text;return U.destroyed||!$.A.isDefined(F)?(this.deleteStaleCache(B,k,q.e.TEXT),null):F}getRenderTexture(k){const B=this.getMap(q.r.RENDER_TEXTURE);if(!B.has(k))return null;const U=B.get(k),F=U.renderTexture;return U.destroyed||!F||null===F.textureCacheIds?(this.deleteStaleCache(B,k,q.e.RENDER_TEXTURE),null):F}getBitmapData(k){const B=this.getMap(q.r.BITMAPDATA);if(!B.has(k))return null;const U=B.get(k),F=U.bitmapData;return U.destroyed||!F||null===F.textureCacheIds?(this.deleteStaleCache(B,k,q.e.BITMAPDATA),null):F}getTextureAtlas(k){const B=this.getMap(q.r.TEXTURE_ATLAS);if(!B.has(k))return null;const U=B.get(k);return U.destroyed?(this.deleteStaleCache(B,k,q.e.TEXTURE_ATLAS),null):U}addSpine(k,B){this.addItem(k,q.r.SPINE,new J(k,B))}addImage(k,B,U){const F=this.getMap(q.r.IMAGE).get(k);if(F&&$.A.isDefined(U)){const $=`${U}`;return F.subTextures[$]&&j.V.log(`Warning: The frame key ${$} already exists as a subtexture in the texture key ${k}. Overwritting...`,G.$.Warning),void(F.subTextures[$]=B)}const H=new Y.E(this._game,k,B);this.addItem(k,q.r.IMAGE,H)}addTextureAtlas(k,B,U){const F=new et.Z(this._game,k,k,U);this.addItem(k,q.r.TEXTURE_ATLAS,F)}addBitmapData(k,B,U){let F=U;return void 0===F&&(F=new W.o,F.addFrame(new V.w(0,B.frame.x,B.frame.y,B.frame.width,B.frame.height,k))),this.addItem(k,q.r.BITMAPDATA,new z(H.W.instance.game,k,B,F)),B}addRenderTexture(k,B){const U=new W.o;U.addFrame(new V.w(0,0,0,B.width,B.height,"")),this.addItem(k,q.r.RENDER_TEXTURE,new X(H.W.instance.game,k,B,U))}addJSON(k,B){this.addItem(k,q.r.JSON,new Q.F(this._game,k,B))}addSound(k,B){this.addItem(k,q.r.SOUND,new Z.I(this._game,k,B))}addText(k,B){this.addItem(k,q.r.TEXT,new tt.q(this._game,k,B))}checkKey(k){for(const B of this._cacheMap.values())if(B.has(k))return!0;return!1}checkImageKey(k){return null!==this.getImage(k)}checkTextureAtlasKey(k){return null!==this.getTextureAtlas(k)}checkRenderTextureKey(k){return null!==this.getRenderTexture(k)}checkBitmapDataKey(k){return null!==this.getBitmapData(k)}checkJSONKey(k){return null!==this.getJSON(k)}checkSoundKey(k){return null!==this.getSound(k)}checkTextKey(k){return null!==this.getText(k)}checkFrameData(k){return null!==this.getFrameData(k)}checkSpineKey(k){return null!==this.getSpine(k)}removeSpine(k){this.removeItem(k,q.r.SPINE)}removeImage(k){this.removeItem(k,q.r.IMAGE)}removeJSON(k){this.removeItem(k,q.r.JSON)}removeSound(k){this.removeItem(k,q.r.SOUND)}removeText(k){this.removeItem(k,q.r.TEXT)}removeTextureAtlas(k){this.removeItem(k,q.r.TEXTURE_ATLAS)}removeBitmapData(k){this.removeItem(k,q.r.BITMAPDATA)}removeRenderTexture(k){this.removeItem(k,q.r.RENDER_TEXTURE)}destroy(){this.removeAllItems(),this._cacheMap.clear()}getMap(k){return this._cacheMap.get(k)}addItem(k,B,U){this._cacheMap.get(B).set(k,U)}removeItem(k,B){const U=this._cacheMap.get(B);U.has(k)&&(U.get(k).destroy(),U.delete(k))}removeAllItemsOfType(k){this.getKeys(k).forEach((B=>{this.removeItem(B,k)}))}removeAllItems(){it.getAssetTypeIDs().forEach((k=>{this.removeAllItemsOfType(k)}))}hasMap(k){return this._cacheMap.has(k)}isSoundDecoded(k){const B=this.getMap(q.r.SOUND).get(k);if(B){const k=B.sound;if(k)return k.isLoaded}return!1}deleteStaleCache(k,B,U){j.V.log(`--- ${U} ${it.CACHE_WARNING} ${B} ---`,G.$.Warning),k.delete(B)}}it.CACHE_WARNING="found in cache that has been destroyed. Clearing cache for: "},52777:(k,B,U)=>{"use strict";var F,G;U.d(B,{e:()=>G,r:()=>F}),function(k){k[k.BITMAPDATA=0]="BITMAPDATA",k[k.IMAGE=1]="IMAGE",k[k.JSON=2]="JSON",k[k.RENDER_TEXTURE=3]="RENDER_TEXTURE",k[k.SOUND=4]="SOUND",k[k.SPINE=5]="SPINE",k[k.TEXT=6]="TEXT",k[k.TEXTURE_ATLAS=7]="TEXTURE_ATLAS"}(F||(F={})),function(k){k.BITMAPDATA="BitmapData",k.IMAGE="Image",k.JSON="Json",k.RENDER_TEXTURE="RenderTexture",k.SOUND="Sound",k.SPINE="Spine",k.TEXT="Text",k.TEXTURE_ATLAS="TextureAtlas"}(G||(G={}))},72077:(k,B,U)=>{"use strict";U.d(B,{a:()=>Q});var F,G=U(8674),j=U(34711),$=U(68910),H=U(5191),V=U(80267),W=U(62481),q=U(61806),K=U(50740),z=U(15740),Y=U(66032);!function(k){k.JSON="json",k.IMAGE="image",k.AUDIO="audio",k.ATLAS="atlas",k.SPINE="spine",k.SPRITESHEET="spritesheet"}(F||(F={}));class Q{static renameJSONKeys(k,B){const U=Object.keys(k).map((U=>({[B.get(U)||U]:k[U]})));return Object.assign({},...U)}get crossOrigin(){return this._crossOrigin}set crossOrigin(k){this._crossOrigin=k}get baseURL(){return $.Assets.resolver.basePath}set baseURL(k){$.Assets.resolver.basePath=k}get isLoading(){return this._isloading}totalQueuedFiles(){return this._loadingDictionary.size}constructor(){this._queue=[],this._immediateQueue=[],this._loadingDictionary=new Map,this._wasFail=!1,this._isLoading=!1,this.onLoadComplete=new z.H,this.onFileStart=new z.H,this.onFileComplete=new z.H,this.onFileLoadComplete=new z.H,this.onFilesLoaded=new z.H,this._isloading=!1,this.onReset=new z.H,this._crossOrigin="anonymous",$.Assets.resolver.basePath="",$.loadTextures.config={preferWorkers:!1,preferCreateImageBitmap:!1,crossOrigin:"anonymous"},$.extensions.add(j.kx)}removeFromLoadingQueue(k){if(this._loadingDictionary.has(k)){const B=this._loadingDictionary.get(k);return this._loadingDictionary.delete(k),B}return null}isInQueue(k){return this._queue.some((B=>B.key===k))}isInImmediateQueue(k){return this._immediateQueue.some((B=>B.key===k))}isInLoadingQueue(k){return this._loadingDictionary.has(k)}start(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._isLoading){for(let k=0;k(0,G.sH)(this,void 0,void 0,(function*(){const B=Object.keys(k);let U=0;for(let G=0;G{this._wasFail=!0,this._isloading=!1;const B=Array.from(this._loadingDictionary.keys()),U=W.R.stringify(k);B.forEach((k=>{const B=this._loadingDictionary.get(k).url.split(/\?\w+=/)[0];if(U.includes(B)){this.removeFromLoadingQueue(k);this.onFileLoadComplete.dispatch(k,!1)}})),W.R.logError(k,"Promise rejected while loading assets in framework loader"),this.finalizeLoad()}))}))}finalizeLoad(){if(this._immediateQueue.length>0){for(let k=0;k{const B=k.metaData;B.frameWidth=U,B.frameHeight=G,B.extruded=j,B.spritesheetMargin=$,B.spritesheetSpacing=H}))}audio(k,B,U=!0,G){if(0===B.length)return;let j=`${B[0].substring(0,B[0].lastIndexOf(".")+1)}{${B[0].substr(B[0].lastIndexOf(".")+1)}`;for(let F=1;F{k.metaData.spineAtlasSuffix=G}))}destroy(){this.onFileComplete.dispose(),this.onFileStart.dispose(),this.onFileLoadComplete.dispose(),this.onLoadComplete.dispose(),this.onReset.dispose(),this.onFilesLoaded.dispose()}getResourceData(k){var B;return null!==(B=this._loadingDictionary.get(k))&&void 0!==B?B:null}addFile(k,B,U,F,G){if(this.isInLoadingQueue(B)||this.isInQueue(B)||this.isInImmediateQueue(B))return;const j={type:k,key:B,url:U,onAssetQueuedCallback:G,parentResourceKey:F,isLoading:!1,metaData:{}};this._isLoading?this._queue.push(j):this.addFileToInternalLoader(j)}addFileToInternalLoader(k){this._loadingDictionary.set(k.key,k),k.type===F.JSON?$.Assets.add({alias:k.key,src:k.url,loadParser:"loadJson"}):$.Assets.add({alias:k.key,src:k.url}),k.onAssetQueuedCallback&&k.onAssetQueuedCallback(this._loadingDictionary.get(k.key))}processJSON(k,B,U){k.addJSON(U,B)}processImage(k,B,U){k.addImage(U,B)}processSound(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){let F=B;B.instances||(F=yield new Promise(((k,U)=>j.AB.from({url:B.url,preload:!0,loaded(B,F){B?U(B):k(F)}}))));const G=new K.K(F,q.W.instance.game,U,j.s3.useLegacy);k.addSound(U,G)}))}processTextureAtlas(k,B,U){const F={frames:{}};let G;(null==B?void 0:B.baseTexture)&&(G=new $.Texture(B.baseTexture)),G?k.addImage(U,G):V.V.log(`Atlas resource with key ${U} has no texture.`,H.$.Warning),B.textures?Object.keys(B.textures).forEach((G=>{const j=B.textures[G],H=B._frames[G];if(F.frames[G]=H,j.baseTexture)k.addImage(U,j,G);else{const F=new $.Texture(B.baseTexture);F.frame=new $.Rectangle(H.frame.x,H.frame.y,H.frame.w,H.frame.h),k.addImage(U,F,G)}})):V.V.log(`Atlas resource with key ${U} has no textures array.`,H.$.Warning),k.addTextureAtlas(U,G,Y.o.configToFrameData(F))}processSpine(k,B,U){k.addSpine(U,B)}processSpritesheet(k,B,U,F){var G,j;const H={frames:{}},V=F.metaData,W=V.frameWidth,q=V.frameHeight,K=B.width/W,z=B.height/q,Q=V.extruded,X=Q?null!==(G=V.spritesheetMargin)&&void 0!==G?G:1:0,Z=Q?null!==(j=V.spritesheetSpacing)&&void 0!==j?j:2:0,J=B.height/(q+Z)|0,tt=B.width/(W+Z)|0;let et=X,it=X,st=0;for(let Y=0;Y{"use strict";U.d(B,{E:()=>V});var F=U(8674),G=U(68910),j=U(80267),$=U(5191),H=U(88651);class V extends H.${constructor(k,B,U){var F,G;super(k,B),this.texture=U,this.subTextures={},U||j.V.log(`CachedImageResource texture is null for key: ${B}`,$.$.Error),this.image=null===(G=null===(F=U.baseTexture)||void 0===F?void 0:F.resource)||void 0===G?void 0:G.source}destroy(){const k=Object.create(null,{destroy:{get:()=>super.destroy}});return(0,F.sH)(this,void 0,void 0,(function*(){yield G.Assets.unload(this.key),Object.values(this.subTextures).forEach((k=>{k.destroy()})),this.subTextures={},this.texture.destroy(),this.texture=null,k.destroy.call(this)}))}}},37061:(k,B,U)=>{"use strict";U.d(B,{F:()=>G});var F=U(88651);class G extends F.${constructor(k,B,U){super(k,B),this.json=U}destroy(){this.json=null,super.destroy()}}},88651:(k,B,U)=>{"use strict";U.d(B,{$:()=>F});class F{get destroyed(){return this._destroyed}constructor(k,B){this._destroyed=!1,this.game=k,this.key=B}destroy(){this._destroyed=!0}}},89460:(k,B,U)=>{"use strict";U.d(B,{I:()=>G});var F=U(88651);class G extends F.${constructor(k,B,U){super(k,B),this.sound=U}destroy(){this.game.sound.remove(this.sound),this.sound=null,super.destroy()}}},49356:(k,B,U)=>{"use strict";U.d(B,{q:()=>G});var F=U(88651);class G extends F.${constructor(k,B,U){super(k,B),this.text=U}destroy(){this.text=null,super.destroy()}}},90157:(k,B,U)=>{"use strict";U.d(B,{Z:()=>G});var F=U(88651);class G extends F.${constructor(k,B,U,F){super(k,B),this.imageKey=U,this.frameData=F}destroy(){this.game.cache.removeImage(this.imageKey),super.destroy()}}},49415:(k,B,U)=>{"use strict";U.d(B,{J:()=>j});var F=U(55539),G=U(39002);class j{static getOffsetX(k){return(void 0!==k.anchor?k.anchor.x:0)*Math.abs(k.width)}static getOffsetY(k){return(void 0!==k.anchor?k.anchor.y:0)*Math.abs(k.height)}static getCenterX(k){let B=k.x+.5*Math.abs(k.width);return void 0!==k.getLocalBounds&&(B+=k.getLocalBounds().x),void 0!==k.offsetX&&(B-=k.offsetX),B}static setCenterX(k,B){k.x+=B-this.getCenterX(k)}static getCenterY(k){let B=k.y+.5*Math.abs(k.height);return void 0!==k.getLocalBounds&&(B+=k.getLocalBounds().y),void 0!==k.offsetY&&(B-=k.offsetY),B}static setCenterY(k,B){k.y+=B-this.getCenterY(k)}static getLeft(k){let B=k.x;return void 0!==k.getLocalBounds&&(B+=k.getLocalBounds().x),void 0!==k.offsetX&&(B-=k.offsetX),B}static setLeft(k,B){k.x+=B-this.getLeft(k)}static getRight(k){let B=k.x+Math.abs(k.width);return void 0!==k.getLocalBounds&&(B+=k.getLocalBounds().x),void 0!==k.offsetX&&(B-=k.offsetX),B}static setRight(k,B){k.x+=B-this.getRight(k)}static getTop(k){let B=k.y;return void 0!==k.getLocalBounds&&(B+=k.getLocalBounds().y),void 0!==k.offsetY&&(B-=k.offsetY),B}static setTop(k,B){k.y+=B-this.getTop(k)}static getBottom(k){let B=k.y+Math.abs(k.height);return void 0!==k.getLocalBounds&&(B+=k.getLocalBounds().y),void 0!==k.offsetY&&(B-=k.offsetY),B}static setBottom(k,B){k.y+=B-this.getBottom(k)}static alignIn(k,B,U=F.C.TOP_LEFT,G=0,$=0){switch(U){default:case F.C.TOP_LEFT:j.setLeft(B,k.left-G),j.setTop(B,k.top-$);break;case F.C.TOP_CENTER:j.setCenterX(B,k.centerX+G),j.setTop(B,k.top-$);break;case F.C.TOP_RIGHT:j.setRight(B,k.right+$),j.setTop(B,k.top-$);break;case F.C.LEFT_CENTER:j.setLeft(B,k.left-G),j.setCenterY(B,k.centerY+$);break;case F.C.CENTER:j.setCenterX(B,k.centerX+G),j.setCenterY(B,k.centerY+$);break;case F.C.RIGHT_CENTER:j.setRight(B,k.right+G),j.setCenterY(B,k.centerY+$);break;case F.C.BOTTOM_LEFT:j.setLeft(B,k.left-G),j.setBottom(B,k.bottom+$);break;case F.C.BOTTOM_CENTER:j.setCenterX(B,k.centerX+G),j.setBottom(B,k.bottom+$);break;case F.C.BOTTOM_RIGHT:j.setRight(B,k.right+G),j.setBottom(B,k.bottom+$)}}static alignTo(k,B,U=F.C.TOP_LEFT,G=0,$=0){switch(U){default:case F.C.TOP_LEFT:j.setLeft(B,k.left-G),j.setBottom(B,k.top-$);break;case F.C.TOP_CENTER:j.setCenterX(B,k.centerX+G),j.setBottom(B,k.top-$);break;case F.C.TOP_RIGHT:j.setRight(B,k.right+G),j.setBottom(B,k.top-$);break;case F.C.LEFT_TOP:j.setRight(B,k.left-G),j.setTop(B,k.top-$);break;case F.C.LEFT_CENTER:j.setRight(B,k.left-G),j.setCenterY(B,k.centerY+$);break;case F.C.LEFT_BOTTOM:j.setRight(B,k.left-G),j.setBottom(B,k.bottom+$);break;case F.C.RIGHT_TOP:j.setLeft(B,k.right+G),j.setTop(B,k.top-$);break;case F.C.RIGHT_CENTER:j.setLeft(B,k.right+G),j.setCenterY(B,k.centerY+$);break;case F.C.RIGHT_BOTTOM:j.setLeft(B,k.right+G),j.setBottom(B,k.bottom+$);break;case F.C.BOTTOM_LEFT:j.setLeft(B,k.left-G),j.setTop(B,k.bottom+$);break;case F.C.BOTTOM_CENTER:j.setCenterX(B,k.centerX+G),j.setTop(B,k.bottom+$);break;case F.C.BOTTOM_RIGHT:j.setRight(B,k.right+G),j.setTop(B,k.bottom+$)}}static applyMatrixToBounds(k,B){const U=B.apply({x:k.left,y:k.top}),F=B.apply({x:k.right,y:k.bottom});return{left:U.x,right:F.x,top:U.y,bottom:F.y}}static applyInverseMatrixToBounds(k,B){const U=B.applyInverse({x:k.left,y:k.top}),F=B.applyInverse({x:k.right,y:k.bottom});return{left:U.x,right:F.x,top:U.y,bottom:F.y}}static mergeBounds(k,B){return k.left=Math.min(k.left,B.left),k.right=Math.max(k.right,B.right),k.top=Math.min(k.top,B.top),k.bottom=Math.max(k.bottom,B.bottom),k}static intersectBounds(k,B){k.left=Math.max(k.left,B.left),k.right=Math.min(k.right,B.right),k.top=Math.max(k.top,B.top),k.bottom=Math.min(k.bottom,B.bottom)}static areEqual(k,B,U){return G.c.isNearlyEqual(k.left,B.left,U)&&G.c.isNearlyEqual(k.right,B.right,U)&&G.c.isNearlyEqual(k.top,B.top,U)&&G.c.isNearlyEqual(k.bottom,B.bottom,U)}}},39002:(k,B,U)=>{"use strict";U.d(B,{_:()=>F,c:()=>$});var F,G=U(95891),j=U(68910);!function(k){k.X="x",k.Y="y",k.Z="z"}(F||(F={}));class ${static degreesToRadians(k){return k*$.DEGREES_TO_RAD}static radiansToDegrees(k){return k*$.RAD_TO_DEGREES}static isNearlyEqual(k,B,U=1e-5){return Math.abs(k-B)0&&0==(k&k-1))return k;{let B=1;for(;B0&&0==(k&k-1)&&B>0&&0==(B&B-1)}static random(k=0,B=1){return k===B?k:Math.random()*(B-k)+k}static between(k=0,B=1){let U=k,F=B;return U===F?U:(U=Math.round(U),F=Math.round(F),Math.floor(Math.random()*(F-U+1))+U)}static fuzzyEqual(k,B,U=$.EPSILON){return Math.abs(k-B)B-U}static average(...k){let B=0;for(let U=0;U=$.PI2-U?F=G:(Math.abs(G-F)>Math.PI&&(GF?F+=U:GB[F]&&(F=U);return B[F]}static minProperty(k,...B){const U=G.flatten(B);let F=1,j=0;const $=U.length;for(;F<$;F++)U[F][k]U[j][k]&&(j=F);return U[j][k]}static wrapAngle(k,B){return B?this.wrap(k,-Math.PI,Math.PI):this.wrap(k,-180,180)}static linearInterpolation(k,B){const U=k.length-1,F=U*B,G=Math.floor(F);return B<0?this.linear(k[0],k[1],F):B>1?this.linear(k[U],k[U-1],U-F):this.linear(k[G],k[G+1>U?U:G+1],F-G)}static bezierInterpolation(k,B){let U=0;const F=k.length-1;for(let G=0;G<=F;G++)U+=Math.pow(1-B,F-G)*Math.pow(B,G)*k[G]*this.bernstein(F,G);return U}static catmullRomInterpolation(k,B){const U=k.length-1;let F=U*B,G=Math.floor(F);return k[0]===k[U]?(B<0&&(G=Math.floor(F=U*(B+1))),this.catmullRom(k[(G-1+U)%U],k[G],k[(G+1)%U],k[(G+2)%U],F-G)):B<0?k[0]-(this.catmullRom(k[0],k[0],k[1],k[1],-F)-k[0]):B>1?k[U]-(this.catmullRom(k[U],k[U],k[U-1],k[U-1],F-U)-k[U]):this.catmullRom(k[G>0?G-1:0],k[G],k[U0;)B*=U;return this.clamp(B,Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}static catmullRom(k,B,U,F,G){const j=.5*(U-k),$=.5*(F-B),H=G*G;return(2*B-2*U+j+$)*(G*H)+(-3*B+3*U-2*j-$)*H+j*G+B}static difference(k,B){return Math.abs(k-B)}static roundAwayFromZero(k){return k>0?Math.ceil(k):Math.floor(k)}static sinCosGenerator(k,B=1,U=1,F=1){let G=B,j=U;const $=F*Math.PI/k,H=[],V=[];for(let W=0;W0?1:0}static percent(k,B,U=0){return k>B||U>B?1:kk?0:(k-U)/B}static circumferencePoint(k,B,U,F=-1,G=!0){const H=F>0?.5*F:1;let V=U;G||(V=$.degToRad(U));const W=new j.Point;return W.x=k+H*Math.cos(V),W.y=B+H*Math.sin(V),W}static clampedLerp(k,B,U){let F=U<0?0:U;return F=F>1?1:F,k+(B-k)*F}static inverseLerp(k,B,U){return(U-k)/(B-k)}static validateInt(k,B=0){if("number"!=typeof k){const U=parseInt(k,10);return Number.isNaN(U)?B:U}return Number.isNaN(k)?B:k}static normalizeRange(k,B,U){return B>k?(U-k)/(B-k):BB.left&&k.topB.top}static getAABBforPoints(k){const B={left:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,top:Number.POSITIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY};return k.forEach((k=>{B.left=Math.min(k.x,B.left),B.right=Math.max(k.x,B.right),B.top=Math.min(k.y,B.top),B.bottom=Math.max(k.y,B.bottom)})),B}}$.DEGREES_TO_RAD=Math.PI/180,$.RAD_TO_DEGREES=180/Math.PI,$.EPSILON=1e-4,$.PI2=2*Math.PI,$.TAU=2*Math.PI,$.PHI=1.61803398875,$.DEG_TO_RAD=Math.PI/180,$.RAD_TO_DEG=180/Math.PI},13409:(k,B,U)=>{"use strict";U.d(B,{b:()=>G});var F=U(32154);class G{constructor(k=[]){this.c=1,this.s0=0,this.s1=0,this.s2=0,"string"==typeof k?this.state(k):this.sow(k)}rnd(){const k=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|k,this.s0=this.s1,this.s1=this.s2,this.s2=k-this.c,this.s2}sow(k){if(this.s0=this.hash(" "),this.s1=this.hash(this.s0),this.s2=this.hash(this.s1),this.c=1,k)for(let B=0;B>>0,B-=F,B*=F,F=B>>>0,B-=F,F+=4294967296*B;return 2.3283064365386963e-10*(F>>>0)}integer(){return 4294967296*this.rnd.apply(this)}frac(){return this.rnd.apply(this)+11102230246251565e-32*(2097152*this.rnd.apply(this)|0)}real(){return this.integer()+this.frac()}integerInRange(k,B){return Math.floor(this.realInRange(0,B-k+1)+k)}realInRange(k,B){return this.frac()*(B-k)+k}normal(){return 1-2*this.frac()}pick(k){return k[this.integerInRange(0,k.length-1)]}sign(){return this.pick([-1,1])}weightedPick(k){return k[~~(Math.pow(this.frac(),2)*(k.length-1)+.5)]}angle(){return this.integerInRange(-180,180)}shuffle(k){const B=k.length-1;for(let U=B;U>0;U--){const F=Math.floor(this.frac()*(B+1)),G=k[F];k[F]=k[U],k[U]=G}return k}state(k=""){if(k.match(/^!rnd/)){const B=k.split(",");this.c=parseFloat(B[1]),this.s0=parseFloat(B[2]),this.s1=parseFloat(B[3]),this.s2=parseFloat(B[4])}return["!rnd",this.c,this.s0,this.s1,this.s2].join(",")}uuid(){let k,B=0;for(k="";B++<36;k+=(~B%5|3*B&4)>0?((15^B)>0?8^this.frac()*((20^B)>0?16:4):4).toString(16):"-");return k}}},15308:(k,B,U)=>{"use strict";U.d(B,{M:()=>H});var F=U(68910),G=U(80267),j=U(5191),$=U(32154);class H extends F.Rectangle{get offsetX(){return this.x+.5*this.width}set offsetX(k){this.x=k-.5*this.width}get offsetY(){return this.y+.5*this.height}set offsetY(k){this.y=k-.5*this.height}get anchor(){return new F.Point(0,0)}get bottomRight(){return new F.Point(this.right,this.bottom)}set bottomRight(k){this.x=k.x-this.width,this.y=k.y-this.height}get bottomLeft(){return new F.Point(this.x,this.bottom)}set bottomLeft(k){this.x=k.x,this.y=k.y-this.height}get centerX(){return this.x+this.halfWidth}set centerX(k){this.x=k-this.halfWidth}get centerY(){return this.y+this.halfHeight}set centerY(k){this.y=k-this.halfHeight}get empty(){return!$.A.isDefined(this.width)||!$.A.isDefined(this.height)}set empty(k){k&&this.setTo(0,0,0,0)}get halfHeight(){return Math.round(this.height/2)}get halfWidth(){return Math.round(this.width/2)}get topLeft(){return new F.Point(this.x,this.y)}set topLeft(k){this.x=k.x,this.y=k.y}get topRight(){return new F.Point(this.x+this.width,this.y)}set topRight(k){this.x=k.x-this.width,this.y=k.y}setTo(k,B,U,F){return this.x=k,this.y=B,this.width=U,this.height=F,this}resize(k,B){return this.width=k,this.height=B,this}setPosition(k,B){this.x=k,this.y=B}intersectsRectValues(k,B,U,F){return H.intersects(this,new H(k,B,U,F))}static intersects(k,B){return!(k.width<=0||k.height<=0||B.width<=0||B.height<=0)&&!(k.rightB.right||k.y>B.bottom)}static clone(k){return k?new H(k.x,k.y,k.width,k.height):(G.V.log("Clone failed. Rect does not exist.",j.$.Error),null)}static sameDimensions(k,B){return k.width===B.width&&k.height===B.height}static containsRaw(k,B,U,F,G,j){return G>=k&&G=B&&j{"use strict";var F;U.d(B,{Q:()=>G,y:()=>F}),function(k){k[k.BLACK=0]="BLACK",k[k.RED=16711680]="RED",k[k.ORANGE=16750848]="ORANGE",k[k.YELLOW=16776960]="YELLOW",k[k.GREEN=65280]="GREEN",k[k.AQUA=65535]="AQUA",k[k.BLUE=255]="BLUE",k[k.VIOLET=16711935]="VIOLET",k[k.WHITE=16777215]="WHITE",k[k.GRAY=6710886]="GRAY"}(F||(F={}));class G{static numberToHexString(k){let B="";return k>16777215?(B+=`0${((4278190080&k)>>>24).toString(16)}`.slice(-2),B+=`0${((16711680&k)>>>16).toString(16)}`.slice(-2),B+=`0${((65280&k)>>>8).toString(16)}`.slice(-2),B+=`0${(255&k).toString(16)}`.slice(-2)):(B+=`0${((16711680&k)>>>16).toString(16)}`.slice(-2),B+=`0${((65280&k)>>>8).toString(16)}`.slice(-2),B+=`0${(255&k).toString(16)}`.slice(-2),B+="FF"),`#${B.toUpperCase()}`}static convertPixelToGreyscale(k,B,U){return.3*k+.59*B+.11*U}static createColor(k=0,B=0,U=0,F=1,j=0,$=0,H=0,V=0){const W={r:k,g:B,b:U,a:F,h:j,s:$,l:H,v:V,color:0,color32:0,rgba:""};return G.updateColor(W)}static updateColor(k){return k.rgba=`rgba(${k.r.toFixed()},${k.g.toFixed()},${k.b.toFixed()},${k.a.toString()})`,k.color=G.getColor(k.r,k.g,k.b),k.color32=G.getColor32(255*k.a,k.r,k.g,k.b),k}static getColor32(k,B,U,F){return k<<24|B<<16|U<<8|F}static getColor(k,B,U){return k<<16|B<<8|U}static hexToRGB(k){const B=G.hexToColor(k);if(B)return G.getColor32(B.a,B.r,B.g,B.b)}static hexToColor(k,B){const U=k.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,((k,B,U,F)=>B+B+U+U+F+F)),F=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(U);if(F){const k=parseInt(F[1],16),U=parseInt(F[2],16),j=parseInt(F[3],16);if(!B)return G.createColor(k,U,j);B.r=k,B.g=U,B.b=j}return B}static hexToRGBArray(k){return[(k>>16&255)/255,(k>>8&255)/255,(255&k)/255]}static RGBArrayToHex(k){return(255*k[0]<<16)+(255*k[1]<<8)+255*k[2]}static getRGB(k){return k>16777215?{alpha:k>>>24,red:k>>16&255,green:k>>8&255,blue:255&k,a:k>>>24,r:k>>16&255,g:k>>8&255,b:255&k}:{alpha:255,red:k>>16&255,green:k>>8&255,blue:255&k,a:255,r:k>>16&255,g:k>>8&255,b:255&k}}}},39688:(k,B,U)=>{"use strict";U.d(B,{w:()=>V});var F=U(68910),G=U(80267),j=U(5191),$=U(39002),H=U(15308);class V extends F.Rectangle{constructor(k,B,U,F,H,V){super(B,U,F,H),this.index=k,0!==this.width&&0!==this.height||G.V.log(`Frame: Frame ${this.name} has a width or height of zero`,j.$.Warning),this.name=V,this.centerX=Math.floor(F/2),this.centerY=Math.floor(H/2),this.distance=$.c.distance(0,0,F,H),this.sourceSizeW=F,this.sourceSizeH=H}resize(k,B){this.width=k,this.height=B,this.centerX=Math.floor(k/2),this.centerY=Math.floor(B/2),this.distance=$.c.distance(0,0,k,B),this.sourceSizeW=k,this.sourceSizeH=B}setTrim(k,B,U,F,G,j,$){this.trimmed=k,k&&(this.sourceSizeW=B,this.sourceSizeH=U,this.centerX=Math.floor(B/2),this.centerY=Math.floor(U/2),this.spriteSourceSizeX=F,this.spriteSourceSizeY=G,this.spriteSourceSizeW=j,this.spriteSourceSizeH=$)}clone(){const k=new V(this.index,this.x,this.y,this.width,this.height,this.name);for(const B in this)this.hasOwnProperty(B)&&(k[B]=this[B]);return k}getRect(k){let B=k;return null==B?B=new H.M(this.x,this.y,this.width,this.height):B.setTo(this.x,this.y,this.width,this.height),B}}},66032:(k,B,U)=>{"use strict";U.d(B,{o:()=>H});var F=U(80267),G=U(5191),j=U(32154),$=U(39688);class H{constructor(){this._frames=[],this._frameNames=new Map,this._destroyed=!1}get destroyed(){return this._destroyed}get total(){return this._frames.length}addFrame(k){return k.index=this._frames.length,this._frames.push(k),j.A.isDefined(k.name)&&""!==k.name&&this._frameNames.set(k.name,k.index),k}getFrame(k){return"string"==typeof k?(k||F.V.log(`frame name get with no name: ${k}`,G.$.Error),this.getFrameByName(k)):this._frames[k>=this._frames.length?0:k]}getFrameByName(k){if("number"==typeof k)return this.getFrame(k);const B=this._frameNames.get(k);return"number"==typeof B?this._frames[B]:(F.V.log(`Frame does not exist with name: ${k}`,G.$.Warning),null)}checkFrameName(k){return this._frameNames.has(k)}clone(){const k=new H;for(let B=0;B{"use strict";U.d(B,{B:()=>H});var F,G=U(68910),j=U(57530),$=U(71392);!function(k){k.BLUR="blur",k.PAGE_HIDE="pagehide",k.CLICK="click",k.FOCUS="focus",k.PAGE_SHOW="pageshow",k.PAUSE="pause",k.RESUME="resume"}(F||(F={}));class H extends $.m{setBackgroundColor(k){this.game.app.renderer.background.backgroundColor.setValue(k),this.game.app.view.parentElement.style.backgroundColor=G.Color.shared.setValue(k).toHex()}get game(){return this._game}get width(){return this.game.width}get height(){return this.game.height}get camera(){return j.i.main}constructor(k){super(),this.disableVisibilityChange=!1,this._hiddenVar="hidden",this._game=k,this.name="_stage_root",this.game.stage=this,this.interactiveChildren=!0,this.game.config&&this.parseConfig(this.game.config),k.app.stage&&(k.app.stage.addChild(this),this.zIndex=k.app.stage.children.length)}parseConfig(k){k.disableVisibilityChange&&(this.disableVisibilityChange=k.disableVisibilityChange)}boot(){this.checkVisibility()}checkVisibility(){const k=document;void 0!==k.hidden?this._hiddenVar="visibilitychange":void 0!==k.webkitHidden?this._hiddenVar="webkitvisibilitychange":void 0!==k.mozHidden?this._hiddenVar="mozvisibilitychange":void 0!==k.msHidden?this._hiddenVar="msvisibilitychange":this._hiddenVar=null,this._onChange=k=>{this.visibilityChange(k)},this._onChangePause=()=>{this._onChange({type:F.PAUSE})},this._onChangeResume=()=>{this._onChange({type:F.RESUME})},this._onClick=k=>{void 0===document.hasFocus||document.hasFocus()||this.visibilityChange(k)},this._hiddenVar&&document.addEventListener(this._hiddenVar,this._onChange,!1),window.onblur=this._onChange,window.onfocus=this._onChange,window.onpagehide=this._onChange,window.onpageshow=this._onChange,window.addEventListener(F.CLICK,this._onClick)}visibilityChange(k){switch(k.type){case F.BLUR:case F.PAGE_HIDE:return void this.game.focusLoss(k);case F.CLICK:case F.FOCUS:case F.PAGE_SHOW:return void this.game.focusGain(k)}if(this.disableVisibilityChange)return;const B=document;B.hidden||B.mozHidden||B.msHidden||B.webkitHidden||k.type===F.PAUSE?this.game.gamePaused(k):this.game.gameResumed(k)}destroy(){this._hiddenVar&&document.removeEventListener(this._hiddenVar,this._onChange,!1),window.onpagehide=null,window.onpageshow=null,window.onblur=null,window.onfocus=null,window.removeEventListener(F.CLICK,this._onClick),super.destroy({children:!0,texture:!0,baseTexture:!0})}}},16649:(k,B,U)=>{"use strict";U.d(B,{b:()=>F,y:()=>V});var F,G=U(85999),j=U(61806),$=U(15740),H=U(71392);!function(k){k.Spine="spine",k.Pixi="pixi",k.Component="component"}(F||(F={}));class V extends H.m{get paused(){return this._paused}set paused(k){this._paused!==k&&(this._paused=k,k?(this._wasSpineUpdateOnPause=this._updateMethod===F.Spine)&&(this._updateMethod=F.Pixi):(this._wasSpineUpdateOnPause&&(this._updateMethod=F.Spine),this._wasSpineUpdateOnPause=void 0))}get game(){return j.W.instance.game}get pixiSpine(){return this._pixiSpine}get skeleton(){return this._pixiSpine.skeleton}get state(){return this._pixiSpine.state}constructor(k){super(),this.pendingDestroy=!1,this._updateMethod=F.Pixi,this._paused=!1,this.onStart=new $.H,this.onComplete=new $.H,this.onEnd=new $.H,this.onEvent=new $.H,this.name=k;const B=this.game.cache.getSpine(k),U=B.spineAtlas,j=(new G.qd(U),B.spineData);this._pixiSpine=new G.yE(j),this._pixiSpine.state.addListener({start:this.onSpineStart.bind(this),event:this.onSpineEvent.bind(this),complete:this.onSpineComplete.bind(this),end:this.onSpineEnd.bind(this)}),this._pixiSpine.renderable=!0,this._pixiSpine.autoUpdate=!0,this._pixiSpine.eventMode="none",this.addChild(this._pixiSpine)}onSpineStart(k){this.onStart.dispatch(k)}onSpineComplete(k){this.onComplete.dispatch(k)}onSpineEnd(k){this.onEnd.dispatch(k)}onSpineEvent(k,B){this.onEvent.dispatch(k.trackIndex,B)}setTint(k){this._pixiSpine.tint=k}set updateMethod(k){this._paused&&(this._wasSpineUpdateOnPause=k===F.Spine),this._pixiSpine.autoUpdate=k===F.Spine,this._updateMethod=k}get updateMethod(){return this._updateMethod}update(){this.updateSpine(!1)}updateFromComponent(){this.updateSpine(!0)}updateSpine(k){this._pixiSpine.autoUpdate||this.paused||this._updateMethod===F.Component!==k||this._pixiSpine.update(.001*this.game.app.ticker.deltaMS),this.pendingDestroy&&this.destroy()}destroy(k){this._pixiSpine&&(this._pixiSpine.autoUpdate=!1,this._pixiSpine.state.clearListeners(),this._pixiSpine.state.clearListenerNotifications(),this.removeChild(this._pixiSpine),this._pixiSpine.destroy(k),this._pixiSpine=null),this.onComplete&&(this.onComplete.dispose(),this.onComplete=null),this.onEnd&&(this.onEnd.dispose(),this.onEnd=null),this.onEvent&&(this.onEvent.dispose(),this.onEvent=null),this.onStart&&(this.onStart.dispose(),this.onStart=null),this.pendingDestroy=!1,super.destroy(k)}setAnimationByName(k,B,U=!1){var F;const G=this._pixiSpine.state.setAnimation(k,B,U);return(null===(F=null==G?void 0:G.animation)||void 0===F?void 0:F.duration)>0&&this._pixiSpine.update(0),G}addAnimationByName(k,B,U=!1,F=0){this._pixiSpine.state.addAnimation(k,B,U,F)}setAnimationMix(k,B,U){this._pixiSpine.stateData.setMix(k,B,U)}setSkinByName(k){this._pixiSpine.skeleton.setSkinByName(k)}setSkin(k){this._pixiSpine.skeleton.setSkin(k)}setToSetupPose(k=!1){k&&(this._pixiSpine.lastTime=null),this._pixiSpine.skeleton.setToSetupPose()}getSlotContainer(k){return this.getSlotContainerByIndex(k.data.index)}getSlotContainerByIndex(k){return this._pixiSpine.slotContainers[k]}}},12033:(k,B,U)=>{"use strict";U.d(B,{f:()=>V});var F=U(5191),G=U(80267),j=U(71082),$=U(61806),H=U(15740);class V{get current(){return this._current.key}getCurrentState(){return this._current}get states(){return this._states}get game(){return $.W.instance.game}get onStateChange(){return this._onStateChange}get onStateLoaded(){return this._onStateLoaded}constructor(k){this._onStateChange=new H.H,this._onStateLoaded=new H.H,this._states=new Map,this._pendingState=k||null,this._current=null}boot(){this.game.onPause.add(this.pause,this),this.game.onResume.add(this.resume,this),this._pendingState&&this.add(this._pendingState.key,this._pendingState,!0)}add(k,B,U=!1){return B.key=k,this._states.set(k,B),U&&(this._pendingState=B),B}remove(k){this._current&&this._current.key===k&&(this._current=null),this._states.delete(k)}start(k,B=!0,...U){this._states.has(k)?(this._pendingState=this._states.get(k),this._clearWorld=B,this._initArgs=U):G.V.log("Invalid key passed to start method",F.$.Warning)}preUpdate(){if(this._pendingState){const k=this._current?this.current:null;if(this.clearCurrentState(),this.setCurrentState(this._pendingState.key),this._onStateChange.dispatch(this._current,k||""),this.current&&this.current!==this._pendingState.key)return;this._pendingState=null,this._current.preload(),this._current.create(),this._onStateLoaded.dispatch(this._current,k||"")}}update(){this._current.update()}get(k){return this.states.has(k)?this.states.get(k):null}loadComplete(){this._current.create()}clearCurrentState(){var k;this._current&&(this._current.shutdown(),this.game.tweens.removeAll(),this.game.time.removeAll(),null===(k=this.game.stage.camera)||void 0===k||k.reset(),this._clearWorld&&j.C.removeAllChildren(this.game.world,!0),this._current=null,this.game.load.reset(!0))}setCurrentState(k){this._current=this._states.get(k),this._current.init(...this._initArgs),k===this._pendingState.key&&(this._initArgs=[])}pause(){this._current&&this._current.paused()}resume(){this._current&&this._current.resumed()}destroy(){this._clearWorld=!0,this.clearCurrentState(),this._pendingState=null,this._onStateChange.dispose(),this._onStateLoaded.dispose()}}},65321:(k,B,U)=>{"use strict";U.d(B,{g:()=>G});var F=U(84215);class G{get timeMS(){return this._timeMS}get deltaMS(){return this._deltaMS}get deltaMultiplier(){return this._deltaMultiplier}get events(){return this._events}constructor(k){this._timeMS=0,this._deltaMS=0,this._deltaMultiplier=1,this._events=null,this._timers=[],this._game=k,this._events=new F.M(this._game,!1)}boot(){this.updateTime(),this._events.start()}add(k){return this._timers.includes(k)||this._timers.push(k),k}create(k=!0){return this.add(new F.M(this._game,k))}removeAll(){this._timers.forEach((k=>k.destroy())),this._timers=[],this._events.removeAll()}destroy(k){if(!k)return;k.destroy();const B=this._timers.indexOf(k);-1!==B&&this._timers.splice(B,1)}update(){if(this.updateTime(),!this._game.paused){this._events.update();for(let k=this._timers.length-1;k>=0;--k){const B=this._timers[k];B.update(),B.canDestroy()&&(B.destroy(),this._timers.splice(k,1))}}}gamePaused(){this._events.pause(),this._timers.forEach((k=>k.pause()))}gameResumed(){this.updateTime(),this._events.resume(),this._timers.forEach((k=>k.resume()))}updateTime(){this._timeMS=this._game.app.ticker.lastTime,this._deltaMS=this._game.app.ticker.deltaMS,this._deltaMultiplier=this._deltaMS/16.6666666666667}}},84215:(k,B,U)=>{"use strict";U.d(B,{M:()=>H});var F=U(80267),G=U(5191),j=U(15740);class ${get callbackArgs(){return this._callbackArgs}get markedForDelete(){return this._markedForDelete}constructor(k,B,U,F,G,...j){this._markedForDelete=!1,this.delayMS=k,this.tick=B,this.runCount=U,this.callback=F,this.callbackContext=G,this._callbackArgs=j}markForDeletion(){this._markedForDelete=!0}}class H{constructor(k,B=!0){this._state="stopped",this._expired=!1,this._events=[],this.onComplete=new j.H,this._updateTimeThreshold=1e3,this._timeAtLastUpdate=0,this._game=k,this._destroyOnExpire=B}start(k=0){if("running"===this._state)return void F.V.log("Timer is already running.",G.$.Warning);if("paused"===this._state)return void F.V.log("Timer is currently paused. Call resume() instead.",G.$.Warning);const B=this.getGameTime();this._timeAtLastUpdate=B;const U=B+k;this._state="running",this._events.forEach((k=>k.tick=U+k.delayMS))}stop(k=!0,B=!1){this._state="stopped",k?this.removeAll(B):B&&this.onComplete.removeAll()}removeAll(k=!0){for(let B=this._events.length-1;B>=0;--B)this.removeAtIndex(B);k&&this.onComplete.removeAll()}addTimer(k,B,U,...F){return this.createTimer(k,1,B,U,...F)}repeat(k,B,U,F,...G){return this.createTimer(k,B,U,F,...G)}loop(k,B,U,...F){return this.createTimer(k,-1,B,U,...F)}createTimer(k,B,U,F,...G){const j=Math.round(k),H=j+(0===this._timeAtLastUpdate?this.getGameTime():this._timeAtLastUpdate),V=new $(j,H,B,U,F,...G);return this._events.push(V),this.sortEvents(),this._expired=!1,V}remove(k){return this.removeAtIndex(this._events.indexOf(k))}removeAtIndex(k){return k>=0&&kk.tick-B.tick))}update(){if("running"!==this._state)return;const k=this.getGameTime(),B=k-this._timeAtLastUpdate;B>this._updateTimeThreshold&&this.offsetEventTimers(B);const U=[];let F=!1;for(let G=0;G0&&0==--B.runCount?B.markForDeletion():(B.tick+=B.delayMS,F=!0),U.push(B)}if(U.length>0){for(let k=0;kB.tick+=k))}getGameTime(){return this._game.time.timeMS}destroy(){this.removeAll(!0),this.onComplete.dispose(),this._state="stopped",this._expired=!0,this._events=[]}}H.MINUTE=6e4,H.SECOND=1e3,H.HALF_SECOND=500,H.QUARTER_SECOND=250},42687:(k,B,U)=>{"use strict";U.d(B,{p:()=>H});var F=U(80267),G=U(5191),j=U(77120),$=U(15740);class H{constructor(){this.deviceReadyAt=0,this.callbacks=[],this.rotationEvent=new $.H}get isInitialized(){return this.deviceReadyAt>0}whenReady(k){this.isInitialized?k():(this.callbacks.push(k),j.D.isReady?this.initialize():j.D.addDOMContentLoadedListener(this.initialize.bind(this)))}initialize(){"orientation"in screen&&screen.orientation.addEventListener("change",this.onDeviceRotation.bind(this)),this.deviceReadyAt=Date.now(),j.D.removeDOMContentLoadedListener(this.initialize.bind(this)),this.callbacks.forEach((k=>{k()})),this.callbacks=[]}onDeviceRotation(){F.V.log(`onDeviceRotation: ${screen.orientation.type}`,G.$.Verbose),this.rotationEvent.dispatch(screen.orientation.type.startsWith("landscape"))}cleanUp(){this.rotationEvent.dispose(),"orientation"in screen&&screen.orientation.removeEventListener("change",this.onDeviceRotation)}}},71392:(k,B,U)=>{"use strict";U.d(B,{m:()=>W});var F=U(68910),G=U(61806),j=U(15740),$=U(35192);$.q9.prototype.name=null,$.mc.prototype.getChildByName=function(k,B){for(let U=0,F=this.children.length;U=0;--B){const U=this.children[B];if(U&&!U.destroyed&&!1!==U.exists&&"function"==typeof U.update)try{U.update(G.W.instance.game.time.deltaMS)}catch(k){H.R.logError(k,"Exception updating child container")}}}destroy(k){var B,U;this.destroyed||(null===(B=this.onDestroy)||void 0===B||B.dispatch(),null===(U=this.onDestroy)||void 0===U||U.dispose(),this.onDestroy=null,this.exists=!1,super.destroy(k))}render(k){V.C.canContainerRender(this)&&super.render(k)}}},86787:(k,B,U)=>{"use strict";U.d(B,{CL:()=>ve.C,lv:()=>ge,J6:()=>Vt.J,l2:()=>$t.l,r0:()=>Ht.r,i7:()=>F.i,YP:()=>H,jl:()=>qt,Q1:()=>Qt.Q,uA:()=>V.u,XF:()=>V.X,oD:()=>z.oD,mc:()=>ie.m,DX:()=>me.D,yQ:()=>Qt.y,YH:()=>j.YH,e$:()=>Pt.e,b:()=>Zt.b,GS:()=>rt.G,bT:()=>Ct,sV:()=>Ft,wI:()=>Xt.w,YA:()=>se.Y,W$:()=>Jt.W,Zt:()=>ne.Z,_m:()=>ae._,Wz:()=>oe.W,mk:()=>te,Sj:()=>jt.S,K1:()=>ce.K,cj:()=>kt.c,bs:()=>Yt.b,XV:()=>tt.X,M_:()=>Bt.M,HN:()=>q.H,qF:()=>Ut.q,gX:()=>ee.g,Kf:()=>ot,dL:()=>pe.d,K:()=>Lt.K,EV:()=>j.EV,s0:()=>j.s0,WR:()=>X.W,GO:()=>Rt.G,aw:()=>X.a,DT:()=>he.D,x4:()=>de,Og:()=>ue,Wf:()=>be,S1:()=>j.S1});var F=U(57530),G=U(8674),j=U(29658);let $=class extends F.i{recalculateViewMatrix(){if(!this._attachedTransform)return;const k=this._attachedTransform.pixiTransform._worldID;if(k!==this._transformWorldID){const B=this._attachedTransform.worldMatrix,U=this._attachedTransform.worldScale,F=B.a/U.x,G=B.c/U.y;this._cameraMatrix.set(F,G,-G,F,-B.tx*F- -B.ty*G+this._viewportSize.getHalfWidth(),-B.tx*G+-B.ty*F+this._viewportSize.getHalfHeight()),this._transformWorldID=k}}};$=(0,G.Cg)([(0,j.EV)("CameraEla",j.YH.root,"Represents an ELA version camera and provides a matrix from translating
from world space into view space")],$);let H=class extends F.i{recalculateViewMatrix(){if(!this._attachedTransform)return;const k=this._attachedTransform.pixiTransform._worldID;k!==this._transformWorldID&&(this._attachedTransform.worldMatrix.clone().invert().translate(this._viewportSize.getHalfWidth(),this._viewportSize.getHalfHeight()).copyTo(this._cameraMatrix),this._transformWorldID=k)}};H=(0,G.Cg)([(0,j.EV)("Camera",j.YH.root,"Represents a camera and provides a matrix from translating
from world space into view space")],H);var V=U(40794),W=U(823),q=U(15740);let K=class extends V.u{constructor(){super(...arguments),this.onCreate=new q.H,this.onPostCreate=new q.H,this.onUpdate=new q.H,this.onOnEnable=new q.H,this.onOnDisable=new q.H,this.onPostDeserialize=new q.H}create(){super.create(),this.onCreate.dispatch()}destroy(){this.onCreate.dispose(),this.onPostCreate.dispose(),this.onUpdate.dispose(),this.onOnEnable.dispose(),this.onOnDisable.dispose(),this.onPostDeserialize.dispose(),super.destroy()}postCreate(){super.postCreate(),this.onPostCreate.dispatch()}update(){super.update(),this.onUpdate.dispatch()}onEnable(){super.onEnable(),this.onOnEnable.dispatch()}onDisable(){super.onDisable(),this.onOnDisable.dispatch()}postDeserialize(){super.postDeserialize(),this.onPostDeserialize.dispatch()}};(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],K.prototype,"onCreate",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],K.prototype,"onPostCreate",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],K.prototype,"onUpdate",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],K.prototype,"onOnEnable",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],K.prototype,"onOnDisable",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],K.prototype,"onPostDeserialize",void 0),K=(0,G.Cg)([(0,j.EV)("ComponentEvents",j.YH.root,"Provides signals fired with component lifecycle events")],K);var z=U(49769),Y=U(5191),Q=U(80267),X=U(53924),Z=U(85880),J=U(95891),tt=U(563),et=U(43234),it=U(21979),st=U(59859),nt=U(4697),at=U(32154),rt=U(30290);class ot{constructor(k){this._defaultEase=rt.G.Linear.None,this._listOfTransformHolders={},this._createdFilters=new Map,this._originalRenderValuesMap=new Map,this.new(k)}new(k={}){const{startDelay:B=0,loopCount:U=0,yoyo:F=!1,loopDelay:G=0,onStart:j,onComplete:$}=k;at.A.isDefined(this._timeline)&&this.destroyTimeline(),this._timeline=new Z.os.core.Timeline({delay:B,yoyo:F,repeat:U,repeatDelay:G}),Z.os.config({nullTargetWarn:!1}),this._timeline.eventCallback("onStart",(()=>{this.update(),null==j||j()})),this._timeline.eventCallback("onUpdate",(()=>{this.update()})),this._onCompleteCallback=$,this._timeline.eventCallback("onComplete",(()=>{this.internalOnComplete()})),this._timeline.pause()}to(k,B,U,F=this._defaultEase,G,j){if(!this.canAnimate(k))return this;const $="string"==typeof F?F:F.value;return this._timeline.to(k,Object.assign(Object.assign({},this.convertToGSAPCompatibleProps(Object.assign({},U),j)),{duration:B,ease:$}),G),this}convertToGSAPCompatibleProps(k,B){const U={};for(const F in k)"number"!=typeof k[F]&&"string"!=typeof k[F]||(U[F]=B?`+=${k[F]}`:k[F]),"stagger"===F&&(U[F]=k[F]);return U}from(k,B,U,F=this._defaultEase,G,j){if(!this.canAnimate(k))return this;const $="string"==typeof F?F:F.value;return this._timeline.from(k,Object.assign(Object.assign({},this.convertToGSAPCompatibleProps(Object.assign({},U),j)),{duration:B,ease:$}),G),this}fromTo(k,B,U,F,G=this._defaultEase,j,$){if(!this.canAnimate(k))return this;const H="string"==typeof G?G:G.value;return this._timeline.fromTo(k,Object.assign({},this.convertToGSAPCompatibleProps(Object.assign({},U),$)),Object.assign(Object.assign({},this.convertToGSAPCompatibleProps(Object.assign({},F),$)),{duration:B,ease:H}),j),this}restart(){var k;return null===(k=this._timeline)||void 0===k||k.restart(),this}play(k=0){var B;return null===(B=this._timeline)||void 0===B||B.play(k),this}pause(){var k;return null===(k=this._timeline)||void 0===k||k.pause(),this}resume(){var k;return null===(k=this._timeline)||void 0===k||k.paused(!1),this}isPaused(){var k,B;return null!==(B=null===(k=this._timeline)||void 0===k?void 0:k.paused())&&void 0!==B&&B}onComplete(k){return this._onCompleteCallback=k,this}internalOnComplete(){var k;this.clearFiltersFromAnimatingObject(),null===(k=this._onCompleteCallback)||void 0===k||k.call(this)}clearFiltersFromAnimatingObject(k=!1){var B;if(!(null===(B=this._timeline)||void 0===B?void 0:B.repeat()))for(const[U,F]of this._createdFilters){if(!k){const k=this._originalRenderValuesMap.get(U);if(k&&(k.alpha!==U.alpha||k.tintStrength!==U.tintStrength||k.tintColor!==U.tintColor||k.blendMode!==U.blendMode))continue}if(U.filters&&(U.filters.baseFilter=void 0),U.filters=void 0,U.components.rootContainer.filters){const k=U.components.rootContainer.filters.indexOf(F);k>-1&&U.components.rootContainer.filters.splice(k,1)}}}get objectCount(){return Object.keys(this._listOfTransformHolders).length}addGameObject(k){const B=Object.values(this._listOfTransformHolders).find((B=>B.GameObjectLink===k)),U=B||this.addNewAnimatedObject(k);if(!B&&U){const k=at.A.generateGUID();this._listOfTransformHolders[k]=U,this._originalRenderValuesMap.has(U)||this._originalRenderValuesMap.set(U,{alpha:U.alpha,tintStrength:U.tintStrength,tintColor:U.tintColor,blendMode:U.blendMode})}return U}addGameObjects(k){return k.map((k=>this.addGameObject(k)))}destroyTimeline(k){var B;k&&this.complete(),null===(B=this._timeline)||void 0===B||B.kill(),this._timeline=null}resetToStart(){var k;return null===(k=this._timeline)||void 0===k||k.seek(0).pause(),this.update(),this}complete(){var k;return null===(k=this._timeline)||void 0===k||k.progress(1).pause(),this.update(),this}addNewAnimatedObject(k){var B,U,F;const G=[];if(!k)return null;if(k.legacyTransform)return G.push("Game Object has a legacy transform, animations might not play. Please use Transform /Rect transform."),{warningLog:G};const j=k.activeInHierarchy,$=k.transform,H=k.transform instanceof tt.X?k.transform:null,V=k.findComponent(nt.y),W=k.findComponent(st.j),q={alpha:V?W?W.alpha:1:null,tintStrength:V?1:null,tintColor:V?"rgba(255,255,255,1)":null,blendMode:V?"Multiply":null};W&&(q.alpha=W.alpha,q.tintStrength=W.tintIntensity,q.tintColor=W.tintColor,q.blendMode=W.tintBlendMode);const K=null===(B=k.parent)||void 0===B?void 0:B.findComponent(it.P);K&&G.push("Position changes are not yet supported for objects with a parent that has a layout component.");const z=H||$;return Object.assign(Object.assign({rotation:null==z?void 0:z.localRotation,x:null==z?void 0:z.localPosition.x,y:null==z?void 0:z.localPosition.y,scaleX:null!==(U=null==z?void 0:z.localScale.x)&&void 0!==U?U:1,scaleY:null!==(F=null==z?void 0:z.localScale.y)&&void 0!==F?F:1,skewX:0,skewY:0},q),{visible:j,GameObjectLink:k,components:{transformComponent:z,parentLayoutComponent:K},warningLog:G})}updateAnimatedGameObjects(k){var B,U;(null==k?void 0:k.GameObjectLink)&&(this.updateGeometryPass(k),(B=k.components).renderComponent||(B.renderComponent=k.GameObjectLink.findComponent(nt.y)),k.components.renderComponent&&((U=k.components).rootContainer||(U.rootContainer=k.components.renderComponent.getRootContainer()),k.components.rootContainer&&this.updateRenderPass(k)))}updateGeometryPass(k){const B=k.components.transformComponent;(null==B?void 0:B.GameObject)&&(k.components.parentLayoutComponent||B.setPosition(k.x,k.y),B.setRotation(k.rotation),B.setScale(k.scaleX,k.scaleY),B.setSkew(k.skewX,k.skewY))}updateRenderPass(k){var B;const U=this.setupFilters(k);if((null===(B=k.filters)||void 0===B?void 0:B.baseFilter)&&(at.A.isDefined(k.alpha)&&(k.filters.baseFilter.alpha=k.alpha),at.A.isDefined(k.tintStrength)&&(k.filters.baseFilter.tintIntensity=k.tintStrength),at.A.isDefined(k.blendMode)&&(k.filters.baseFilter.blend=parseInt(et.P[k.blendMode])),at.A.isDefined(k.tintColor))){const[B=255,U=255,F=255]=Z.os.utils.splitColor(k.tintColor);k.filters.baseFilter.tintColor=[B/255,U/255,F/255]}k.components.rootContainer.filters=U}setupFilters(k){const B=k.components.rootContainer.filters||[];if(!(at.A.isDefined(k.alpha)||at.A.isDefined(k.tintStrength)||at.A.isDefined(k.blendMode)||at.A.isDefined(k.tintColor)))return B;if(!k.filters){const U=["alpha","tintStrength","tintColor","blendMode"];k.filters={},k.filters.baseFilter||U.forEach((U=>{void 0!==k[U]&&(k.filters.baseFilter=B.find((k=>k instanceof et.o))||this._createdFilters.get(k),k.filters.baseFilter||(k.filters.baseFilter=new et.o,this._createdFilters.set(k,k.filters.baseFilter)),B.includes(k.filters.baseFilter)||B.push(k.filters.baseFilter))}))}return B}update(){Object.keys(this._listOfTransformHolders).forEach((k=>{const B=this._listOfTransformHolders[k];this.updateAnimatedGameObjects(B)}))}updateObjects(k){k instanceof Array?(0,J.forEach)(k,(k=>{this.updateAnimatedGameObjects(k)})):this.updateAnimatedGameObjects(k)}canAnimate(k){return null!==this._timeline&&null!==k}destroy(){this._onCompleteCallback=void 0,this.destroyTimeline(),this.clearFiltersFromAnimatingObject(!0),this._createdFilters.clear(),this._originalRenderValuesMap.clear()}}var ht,ct,dt=U(26731),lt=U(15887),ut=U(32928),ft=U(32357),bt=U(23664),pt=U(900),vt=U(46386),gt=U(42149),mt=U(56761),yt=U(33431),_t=U(84893),Et=U(5440),wt=U(84097);!function(k){k.From="From",k.To="To",k.FromTo="From To"}(ht||(ht={})),function(k){k.From="from",k.To="to",k.FromTo="fromTo"}(ct||(ct={}));const Tt=["#817","#a35","#c66","#e94","#ed0","#9d5","#4d8","#2cb","#0bc","#09c","#36b","#639"];class St extends dt.${constructor(){super(...arguments),this.easyTweenUI=[],this._hasValidTweenData=!1,this._lastClipboardContent=null,this.firstFocus=!0,this.infoBoxNodes=[],this.activeKeyRequiresRenderComponent=null,this.activeGUID=null,this.activeSelectedSelf=!1,this.lastRegenerationTime=null,this.regenerationMinimumIntervalMS=700,this.allowRegeneration=!1,this.jestTesting=!1,this.uiNodeSize1="1of12",this.uiNodeSize2="2of12",this.uiNodeSize3="3of12",this.uiNodeSize4="4of12",this.uiNodeSize6="6of12",this.uiNodeSize8="8of12",this.uiNodeSize9="9of12",this.uiNodeSize12="12of12",this.terminalIDPreviewAnimation="preview-animation"}generate(k,B){var U;return this.currentState=k,this.firstRunDoChecks(),this.checkClipboardForTweenData(),!this.jestTesting&&!this.allowRegeneration&&this.lastRegenerationTime&&Date.now()-this.lastRegenerationTime0){const k=this.currentState.selectedTween;this.activeSelectedSelf="self"===(null===(U=this.currentState.timeline.tweens[k])||void 0===U?void 0:U.GameObjectLinks.join()),this.activeGUID=this.currentState.gameObjectRecords[k],this.addSectionTargetPicker(),(this.activeGUID||this.activeSelectedSelf)&&(this.addSectionPropertySettings(),this.addSectionTweenType(),this.addSectionFromToValues(),this.addSectionEasingType(),this.addTweenGameObjectInfo())}this.addSectionSequenceSettings(),this.addSectionInfo()}}addSectionPreviewMode(){const k=ft.X.create({buttonText:this.currentState.playMode?"STOP":"Preview Sequence",tooltip:this.currentState.playMode?"Stop the animation preview":"Start the animation preview in the editor's game view",id:this.terminalIDPreviewAnimation,nodeSize:this.uiNodeSize12,buttonIcon:this.currentState.playMode?Et.a2.Stop:Et.a2.Play,buttonType:this.currentState.playMode?Et.VQ.Highlight:Et.VQ.Prodigy,onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{playMode:!this.currentState.playMode})}}),B=ft.X.create({buttonText:"Docs",tooltip:"Open the Easy Tween documentation",id:"info-button",nodeSize:this.uiNodeSize6,buttonIcon:Et.a2.Copy,onClick:()=>{this._editorAPI.openLinkInDefaultBrowser("https://prodigygame.atlassian.net/wiki/spaces/GD/pages/5048729640/EasyTween")}}),U=lt.X.createHorizontal([k,B],{spacing:4});this.easyTweenUI.push(U),this.easyTweenUI=this.easyTweenUI.concat(this.createTimelinePreview())}createTimelinePreview(){var k;const B=[];if(!(null===(k=this.currentState.timeline)||void 0===k?void 0:k.tweens)||0===this.currentState.timeline.tweens.length)return B;let U=0;return this.currentState.timeline.tweens.forEach((k=>{const B=(k.how.delay||0)+k.how.duration;U=Math.max(U,B)})),B.push(yt.l.create({id:"easy-tween-duration",labelValue:`Total Duration: ${U}s`})),0===U||this.currentState.timeline.tweens.forEach(((k,F)=>{const G=k.how.delay||0,j=G+k.how.duration,$=G/U*100,H=100-j/U*100,V=this.getTweenColor(F),W=Object.assign(bt._.line(`timeline-preview-${F}`),{style:{borderLeft:`1px solid ${V}`,borderRight:`1px solid ${V}`,marginLeft:`${$}%`,marginRight:`${H}%`,marginTop:"1px",marginBottom:"1px",height:"6px",backgroundColor:V,opacity:this.currentState.selectedTween===F?1:.6,width:"unset",alignSelf:"unset"}});B.push(W)})),B}getTweenColor(k){return Tt[k%Tt.length]}addSectionAddRemoveTween(){var k,B,U;const F=Math.min(null!==(U=null===(B=null===(k=this.currentState.timeline)||void 0===k?void 0:k.tweens)||void 0===B?void 0:B.length)&&void 0!==U?U:0,At.maximumTweensAllowed-1),G=[];for(let H=0;H0){const k=`${j}of12`;G.push(ft.X.create({buttonText:"",id:"tweens-filler",nodeSize:k,buttonDisabled:!0}))}const $=lt.X.createHorizontal(this.createTweenClipboardButtons());this.easyTweenUI.push(lt.X.createVertical([lt.X.createHorizontal(G),$],{isContainer:!0,title:"Tweens"}))}addSectionTargetPicker(){const k=this.currentState.selectedTween,B=lt.X.createHorizontal([],{isContainer:!0,title:`Tween ${k+1} Target`}),U=ft.X.create({buttonText:"SELF",tooltip:"Tween a different Game Object, currently targeting the object this component is attached to",id:this.terminalIDPreviewAnimation,nodeSize:this.uiNodeSize3,buttonIcon:Et.a2.None,buttonType:this.activeSelectedSelf?Et.VQ.Prodigy:Et.VQ.Default,onClick:this.userClickSelf.bind(this)}),F=ft.X.create({id:"select-game-object-button",nodeSize:this.uiNodeSize2,buttonType:Et.VQ.Prodigy,tooltip:"Tween this Game Object, currently targeting an arbitrary object",onClick:()=>{this.activeGUID&&this._editorAPI.selectGameObject(this.activeGUID)},buttonText:"",buttonIcon:Et.a2.ArrowPointer});B.elements.push(U),this.activeSelectedSelf||(B.elements.push(vt.W.create({id:`gameObjectRecords${this.currentState.selectedTween.toString()}`,propertyPath:["gameObjectRecords",this.currentState.selectedTween.toString()],gameObjectGuid:this.activeGUID,onChange:this.userClickPickGameObject.bind(this)})),this.activeGUID&&B.elements.push(F)),this.easyTweenUI.push(B)}addSectionPropertySettings(){var k,B;const U=this.createTextBox("Property","Pick the property to animate",this.uiNodeSize3),F=pt._.create({id:"propertyGroup",nodeSize:this.uiNodeSize9,selectValue:null!==(B=null===(k=this.currentState.timeline.tweens[this.currentState.selectedTween].customData)||void 0===k?void 0:k.propertyGroup)&&void 0!==B?B:"Position",propertyPath:["timeline","tweens",this.currentState.selectedTween.toString(),"customData","propertyGroup"],selectOptions:Object.keys(At.propertyGroups),onChange:()=>{this.resetActiveTweenProperties()}}),G=this.createTextBox("Duration","The length of the animation, in seconds",this.uiNodeSize3),j=this.createHowInput("duration",this.uiNodeSize9),$=this.createTextBox("Delay","Initial delay before animation starts",this.uiNodeSize3),H=this.createHowInput("delay",this.uiNodeSize9);this.easyTweenUI.push(lt.X.createHorizontal([U,F]),lt.X.createHorizontal([G,j]),lt.X.createHorizontal([$,H]))}createCheckboxGroup(k,B,U,F=!0){return ut.G.checkboxGroup({id:`${this.currentState.selectedTween.toString()}-${k}`,readonly:!F,labelValue:k,labelPosition:Et.G5.Right,inputValue:B,onChange:(k,B)=>{"boolean"==typeof B&&U(B)}})}addSectionTweenType(){var k,B,U,F,G;const j=[{label:ht.From,value:ct.From},{label:ht.To,value:ct.To},{label:ht.FromTo,value:ct.FromTo}],$=this.currentState.selectedTween,H=this.currentState.timeline.tweens[$],V=pt._.create({id:`${$.toString()}-${ct.FromTo}`,selectOptions:j.map((k=>k.label)),selectValue:null!==(B=null===(k=H.customData)||void 0===k?void 0:k.fromTo)&&void 0!==B?B:ht.To,propertyPath:["timeline","tweens",$.toString(),"customData","fromTo"],onChange:()=>{this.resetActiveTweenProperties()}}),W=!(!(null===(U=H.customData)||void 0===U?void 0:U.useTargetFrom)&&!(null===(F=H.customData)||void 0===F?void 0:F.useTargetTo)),q=this.createCheckboxGroup("Relative",H.how.relative,(k=>{H.how.relative=k,this.safelyModifyTimeline()}),!W),K=this.createCheckboxGroup("Tween children",null===(G=H.customData)||void 0===G?void 0:G.tweenChildren,(k=>{H.customData.tweenChildren=k,this.safelyModifyTimeline()}));this.easyTweenUI.push(lt.X.createVertical([lt.X.createHorizontal([V,q,K],{style:{width:"100%"}})],{isContainer:!0,title:"Tween Type"}))}addSectionFromToValues(){var k,B,U,F,G,j,$,H,V;const W=this.currentState.selectedTween,q=this.currentState.timeline.tweens[W],K=null===(k=q.customData)||void 0===k?void 0:k.propertyGroup,z=At.propertyGroups[K],Y=lt.X.createVertical([],{isContainer:!0}),Q=lt.X.createVertical([],{isContainer:!0}),X=this.createTextBox(ht.From,"The value to start from",this.uiNodeSize6),Z=this.createTextBox(ht.To,"The value to go towards",this.uiNodeSize6),J=ft.X.create({buttonText:"Match Target Object",id:"use-target-from",tooltip:"Match the starting value to the target object's value for this property",nodeSize:this.uiNodeSize6,buttonIcon:Et.a2.None,buttonType:(null===(B=q.customData)||void 0===B?void 0:B.useTargetFrom)?Et.VQ.Prodigy:Et.VQ.Default,onClick:()=>{var k,B;(null===(k=q.customData)||void 0===k?void 0:k.useTargetFrom)||(this.currentState.timeline.tweens[W].how.relative=!1),this.currentState.timeline.tweens[W].customData.useTargetFrom=!(null===(B=q.customData)||void 0===B?void 0:B.useTargetFrom),this.safelyModifyTimeline()}}),tt=ft.X.create({buttonText:"Match Target Object",id:"use-target-to",tooltip:"Match the ending value to the target objects value for this property",nodeSize:this.uiNodeSize6,buttonIcon:Et.a2.None,buttonType:(null===(U=q.customData)||void 0===U?void 0:U.useTargetTo)?Et.VQ.Prodigy:Et.VQ.Default,onClick:()=>{var k,B;(null===(k=q.customData)||void 0===k?void 0:k.useTargetTo)||(this.currentState.timeline.tweens[W].how.relative=!1),this.currentState.timeline.tweens[W].customData.useTargetTo=!(null===(B=q.customData)||void 0===B?void 0:B.useTargetTo),this.safelyModifyTimeline()}}),et=null===(F=q.customData)||void 0===F?void 0:F.fromTo,it=et===ht.From||et===ht.FromTo,st=et===ht.To||et===ht.FromTo;it&&Y.elements.push(lt.X.createHorizontal([X,J])),st&&Q.elements.push(lt.X.createHorizontal([Z,tt])),this.activeKeyRequiresRenderComponent=null;for(const nt in z){At.renderKeys.includes(nt)&&(this.activeKeyRequiresRenderComponent=nt);const k=z[nt];it&&!(null===(G=q.customData)||void 0===G?void 0:G.useTargetFrom)&&it&&Y.elements.push(this.createFromToInput(nt,k,ct.From)),st&&!(null===(j=q.customData)||void 0===j?void 0:j.useTargetTo)&&Q.elements.push(this.createFromToInput(nt,k,ct.To))}(null===($=q.customData)||void 0===$?void 0:$.useTargetFrom)&&Y.elements.push(vt.W.create({id:`gameObjectRecordsFrom${this.currentState.selectedTween.toString()}`,propertyPath:["gameObjectRecordsFrom",this.currentState.selectedTween.toString()],gameObjectGuid:this.currentState.gameObjectRecordsFrom[this.currentState.selectedTween]})),(null===(H=q.customData)||void 0===H?void 0:H.useTargetTo)&&Q.elements.push(vt.W.create({id:`gameObjectRecordsTo${this.currentState.selectedTween.toString()}`,propertyPath:["gameObjectRecordsTo",this.currentState.selectedTween.toString()],gameObjectGuid:this.currentState.gameObjectRecordsTo[this.currentState.selectedTween]})),(null===(V=this.currentState.timeline.tweens[this.currentState.selectedTween].customData)||void 0===V?void 0:V.tweenChildren)&&(it&&Y.elements.push(this.createFromToInput("stagger",0,ct.From,!1)),st&&Q.elements.push(this.createFromToInput("stagger",0,ct.To,!1))),it&&this.easyTweenUI.push(Y),st&&this.easyTweenUI.push(Q)}addSectionEasingType(){var k,B,U,F,G,j,$,H;const V=[],W=this.currentState.timeline.tweens[this.currentState.selectedTween],q="string"==typeof(null==W?void 0:W.ease)?W.ease:(null===(k=null==W?void 0:W.ease)||void 0===k?void 0:k.value)||"none",K={};for(const et in rt.J)K[rt.J[et]]=et;const z=(null===(U=null===(B=null==q?void 0:q.split(".")[0])||void 0===B?void 0:B.match(/\w+$/))||void 0===U?void 0:U[0])||"none",Y=(null===(G=null===(F=null==q?void 0:q.split(".")[1])||void 0===F?void 0:F.match(/^\w+/))||void 0===G?void 0:G[0])||"out",Q=(null===(j=null==q?void 0:q.match(/[+-]?\d+(\.\d+)?/g))||void 0===j?void 0:j.map((function(k){return parseFloat(k)})))||[],X=pt._.create({id:`${this.currentState.selectedTween}-ease`,nodeSize:this.uiNodeSize8,selectValue:K[z],selectOptions:Object.keys(rt.J),onChange:k=>{const B=k.toLowerCase()===rt.J.None?"":`.${Y}`;this.currentState.timeline.tweens[this.currentState.selectedTween].ease=`${rt.J[k]}${B}`,this.safelyModifyTimeline()}}),Z=pt._.create({id:`${this.currentState.selectedTween}-easeInOut`,nodeSize:this.uiNodeSize4,selectValue:Y,selectOptions:["in","out","inOut"],onChange:k=>{this.currentState.timeline.tweens[this.currentState.selectedTween].ease=`${z}.${k}`,this.safelyModifyTimeline()}});V.push(X),z!==rt.J.None&&V.push(Z),this.easyTweenUI.push(lt.X.createVertical([lt.X.createHorizontal(V)],{isContainer:!0,title:"Easing"}));const J=z===rt.J.Back,tt=z===rt.J.Elastic;if(J||tt){const k=[];k.push(yt.l.create({id:"back-overshoot-label",labelValue:"Overshoot",nodeSize:this.uiNodeSize3}),mt.f.create({id:`${this.currentState.selectedTween}-back--overshoot`,inputType:"number",inputValue:null!==($=Q[0])&&void 0!==$?$:1,inputUpdateMode:Et.JG.OnTheFly,nodeSize:this.uiNodeSize3,onChange:(k,B)=>{var U,F;Q[0]=B;const G=J?`${Q[0]}`:`${null!==(U=Q[0])&&void 0!==U?U:1}, ${null!==(F=Q[1])&&void 0!==F?F:1}`;this.currentState.timeline.tweens[this.currentState.selectedTween].ease=`${z}.${Y}(${G})`,this.safelyModifyTimeline()}})),tt&&k.push(yt.l.create({id:"back-amplitude-label",labelValue:"Amplitude",nodeSize:this.uiNodeSize3}),mt.f.create({id:`${this.currentState.selectedTween}-back--amplitude`,inputType:"number",inputValue:null!==(H=Q[1])&&void 0!==H?H:1,inputUpdateMode:Et.JG.OnTheFly,nodeSize:this.uiNodeSize3,onChange:(k,B)=>{var U,F;Q[1]=B;const G=J?`${Q[0]}`:`${null!==(U=Q[0])&&void 0!==U?U:1}, ${null!==(F=Q[1])&&void 0!==F?F:1}`;this.currentState.timeline.tweens[this.currentState.selectedTween].ease=`${z}.${Y}(${G})`,this.safelyModifyTimeline()}})),this.easyTweenUI.push(lt.X.createVertical([lt.X.createHorizontal(k)]))}}createTweenButtons(k){var B;const U=k===this.currentState.selectedTween;let F=!1;this.currentState.timeline&&(F=k<(null===(B=this.currentState.timeline.tweens)||void 0===B?void 0:B.length));return[ft.X.create({buttonText:F?"-":"+",tooltip:F?"Remove this tween layer":"Add a new tween layer",id:`${this._componentGuid}-tween-add-remove-${k}`,nodeSize:this.uiNodeSize1,buttonType:F?Et.VQ.Default:Et.VQ.Highlight,onClick:()=>{this.userClickAddRemoveTween(k)}}),ft.X.create({buttonText:[k+1].toString(),id:`tween-${k}`,tooltip:`Select Tween ${k+1}`,nodeSize:this.uiNodeSize1,buttonDisabled:!F,buttonType:U?Et.VQ.Prodigy:Et.VQ.Default,onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{selectedTween:k})},style:{backgroundColor:F?this.getTweenColor(k):void 0,opacity:U?1:.6,borderColor:U?"#FFFFFF":"transparent",borderWidth:"1px",borderStyle:"solid",color:"white",textShadow:"-1px -1px 0 black, \n 1px -1px 0 black, \n -1px 1px 0 black, \n 1px 1px 0 black"}})]}addTweenGameObjectInfo(){var k,B;let U=null;this.activeSelectedSelf?U=null===(k=this._editorAPI.getComponent(this._componentGuid))||void 0===k?void 0:k.GameObject:this.activeGUID&&(U=this._editorAPI.getGameObject(this.activeGUID));if(null!==(B=null==U?void 0:U.hasComponent(nt.y))&&void 0!==B&&B||!this.activeKeyRequiresRenderComponent)return;const F=lt.X.createVertical([],{isContainer:!0,title:"Tween Info"});F.elements.push(gt.b.create({id:"no-render-component-warning",iconType:Et.AT.Question,message:`Uh oh! It looks like you\`re trying to tween ${this.activeKeyRequiresRenderComponent} but that requires a RenderComponent.\nWould you like to create a basic render component?`})),F.elements.push(ft.X.create({buttonText:"Yes, add a BaseRender",id:"add-base-render-btn",tooltip:"Add a basic render component to this Game Object so the selected property can be tweened",onClick:()=>{U&&(this.activeSelectedSelf||this._editorAPI.selectGameObject(this.activeGUID),this._editorAPI.addComponent("BaseRender"))}})),0!==F.elements.length&&this.easyTweenUI.push(F)}addSectionSequenceSettings(){var k,B,U,F;const G=(null===(B=null===(k=this.currentState.timeline)||void 0===k?void 0:k.tweens)||void 0===B?void 0:B.length)>0,j=ft.X.create({buttonText:"Save Motion to File",id:"save-motion",tooltip:"Save the current animation timeline to a file for later use",buttonTextWrap:Et.K3.Wrap,style:{paddingRight:"1px"},onClick:G?this.userClickSaveAnimation.bind(this):null}),$=ft.X.create({buttonText:"Load Motion from File",id:"load-motion",tooltip:"Load an animation timeline from a file",buttonTextWrap:Et.K3.Wrap,style:{paddingLeft:"1px"},onClick:this.userClickLoadAnimation.bind(this)}),H=lt.X.createHorizontal([this.createTextBox("Loop Count","The number of times the animation will loop",this.uiNodeSize4),mt.f.create({id:"loopCount",inputType:"number",nodeSize:this.uiNodeSize4,inputValue:0|(null===(U=this.currentState.timeline)||void 0===U?void 0:U.loopCount),propertyPath:["timeline","loopCount"],inputUpdateMode:Et.JG.OnTheFly}),ut.G.checkboxGroup({id:"yoyo",labelPosition:Et.G5.Right,inputValue:(null===(F=this.currentState.timeline)||void 0===F?void 0:F.yoyo)||!1,labelValue:"yoyo",onChange:(k,B)=>{this.currentState.timeline.yoyo=B,this.safelyModifyTimeline()}})]),V=lt.X.createVertical([lt.X.createVertical([this.createPlaybackButton("Autoplay Tween","playbackPlayOnEnable","Play the tween automatically when the prefab is enabled/created"),this.createPlaybackButton("Destroy Object On Complete","playbackKillOnComplete","Destroy the GameObject with this component when the tween finishes playing"),lt.X.createHorizontal([j,$],{spacing:10}),bt._.line(),_t.N.create({id:"onTweenComplete",label:"On Tween Complete",signalValue:this.currentState.onTweenComplete,componentGUID:this._componentGuid})])],{isContainer:!0,title:"Sequence settings",isCollapsible:!0,spacing:4});this.currentState.timeline&&V.elements.unshift(H),this.easyTweenUI.push(V)}addSectionInfo(){var k,B,U,F,G;this.infoBoxNodes.length=0;const j=null!==(U=null===(B=null===(k=this.currentState.timeline)||void 0===k?void 0:k.tweens)||void 0===B?void 0:B.length)&&void 0!==U?U:0;for(let H=0;H0)for(const U of B.warningLog)this.createWarning(`Tween ${H+1}: ${U}`,Et.AT.Warning)}}else this.createWarning(`Tween ${H+1} has no target! Nothing will play for it :(`,Et.AT.Warning)}0===j&&this.createWarning("Click on the + icon to add a tween to animate!",Et.AT.Info),this.createWarning(`Tween will play on prefab enable: ${this.currentState.playbackPlayOnEnable}`,Et.AT.Info),this.createWarning(`Tween will get destroyed on completion: ${this.currentState.playbackKillOnComplete}`,Et.AT.Info);const $=lt.X.createVertical(this.infoBoxNodes,{isContainer:!0,title:"Timeline Info"});this.easyTweenUI.push($)}createTextBox(k,B,U){return yt.l.create({id:`${k}-label`,labelTextWrap:Et.K3.Wrap,labelTooltip:B,labelValue:k,nodeSize:U})}createWarning(k,B){this.infoBoxNodes.push(gt.b.create({id:`infoBox${this.infoBoxNodes.length}`,iconType:B,message:k})),this.allowRegeneration=!0}createPlaybackButton(k,B,U){return ft.X.create({buttonText:k,id:B,buttonTextWrap:Et.K3.Wrap,nodeSize:this.uiNodeSize2,buttonType:this.currentState[B]?Et.VQ.Prodigy:Et.VQ.Default,tooltip:U,onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{[B]:!this.currentState[B]})}})}createHowInput(k,B){const U=this.currentState.selectedTween,F=this.currentState.timeline.tweens[U];return mt.f.create({id:`${this._componentGuid.toString()}--selectedTween.toString()}-how-${k}`,propertyPath:["timeline","tweens",this.currentState.selectedTween.toString(),"how",k],inputType:"number",inputValue:F.how[k],inputUpdateMode:Et.JG.OnTheFly,nodeSize:B})}createFromToInput(k,B,U,F=!0){const G=this.currentState.selectedTween,j=this.currentState.timeline.tweens[G],$=F&&j.how.relative?":+=":":",H=j[U]||{},V="undefined"!==H[k]?H[k]:B,W={labelValue:`${k}${$}`,id:`${this._componentGuid.toString()}-${U}-${k}`,propertyPath:["timeline","tweens",this.currentState.selectedTween.toString(),U,k],inputUpdateMode:Et.JG.OnTheFly};return"tintColor"===k?mt.f.create(Object.assign(Object.assign({},W),{inputType:"color",inputValue:"#"===V[0]?V:"#ffffff"})):"blendMode"===k?pt._.create(Object.assign(Object.assign({},W),{selectOptions:Object.keys(et.P).filter((k=>isNaN(Number(k)))),selectValue:V})):mt.f.create(Object.assign(Object.assign({},W),{inputType:"number",inputValue:V}))}resetActiveTweenProperties(){var k,B;const U=this.currentState.selectedTween,F=null===(k=this.currentState.timeline.tweens[U].customData)||void 0===k?void 0:k.propertyGroup,G=null===(B=this.currentState.timeline.tweens[U].customData)||void 0===B?void 0:B.fromTo;G===ht.From?(delete this.currentState.timeline.tweens[U].to,this.currentState.timeline.tweens[U].from=Object.assign({},At.propertyGroups[F])):G===ht.To?(delete this.currentState.timeline.tweens[U].from,this.currentState.timeline.tweens[U].to=Object.assign({},At.propertyGroups[F])):(this.currentState.timeline.tweens[U].from=Object.assign({},At.propertyGroups[F]),this.currentState.timeline.tweens[U].to=Object.assign({},At.propertyGroups[F])),this.safelyModifyTimeline()}firstRunDoChecks(){this.firstFocus&&(this._editorAPI.isPlayMode()||(this.currentState.playMode=!1),this.firstFocus=!1)}userClickSelf(){const k=this.currentState.selectedTween;this.activeSelectedSelf="self"===this.currentState.timeline.tweens[k].GameObjectLinks.join(),this.currentState.gameObjectRecords[k]=null,this.currentState.timeline.tweens[this.currentState.selectedTween].GameObjectLinks=this.activeSelectedSelf?[]:["self"],this.safelyModifyTimeline(),this._editorAPI.modifyComponent(this._componentGuid,{gameObjectRecords:this.cleanGORecords()})}userClickPickGameObject(){this._editorAPI.getComponent(this._componentGuid).GameObject===this._editorAPI.getGameObject(this.activeGUID)&&(this.currentState.timeline.tweens[this.currentState.selectedTween].GameObjectLinks=["self"],this.safelyModifyTimeline())}userClickAddRemoveTween(k){if(this.currentState.timeline||(this.currentState.timeline={timelineID:this._componentGuid,tweens:[]},this.safelyModifyTimeline()),this.currentState.timeline.timelineID!==this._componentGuid)return;const B=this.currentState.timeline.tweens.length,U=kAt.maximumTweensAllowed,F=!U,G=B+(F?1:-1);if(F){const k={GameObjectLinks:["self"],to:Object.assign({},At.propertyGroups[At.defaultPropertyGroup]),how:Object.assign({},At.how),ease:`${rt.J[At.ease]}.${At.direction}`,customData:{propertyGroup:At.defaultPropertyGroup,fromTo:At.fromTo}};this.currentState.timeline.tweens.push(k)}else if(U&&B>0){this.currentState.timeline.tweens.splice(k,1);const B=12;for(let U=k;U{k?this._editorAPI.showPopup(`Animation saved!\n${k}`):Q.V.log("Save operation was cancelled.",Y.$.Info)})).catch((k=>{this._editorAPI.showPopup("Error during save operation. Please contact TNT Team!")}))}userClickLoadAnimation(){this._editorAPI.showFileDialog(wt.r.Load,"Load Your File","example","animation").then((k=>{if(k)try{const B=JSON.parse(k);if(null==B?void 0:B.tweens)return void this.processTimeline(B);this._editorAPI.showPopup("Invalid or incomplete animation data.")}catch(B){this._editorAPI.showPopup("Invalid JSON. Please contact TNT Team!")}else Q.V.log("Load operation was cancelled.",Y.$.Info)})).catch((k=>{this._editorAPI.showPopup("Error during load operation. Please contact TNT Team!")}))}processTimeline(k){this.currentState.selectedTween=0,this.activeGUID=null,this.currentState.gameObjectRecords={},this._editorAPI.modifyComponent(this._componentGuid,{gameObjectRecords:this.cleanGORecords()}),this.currentState.timeline=k,this.currentState.timeline.timelineID=this._componentGuid,this.safelyModifyTimeline()}cleanGORecords(){const k={};for(const B in this.currentState.gameObjectRecords)this.currentState.gameObjectRecords[B]&&(k[B]=this.currentState.gameObjectRecords[B]);return k}safelyModifyTimeline(){this.currentState.timeline.timelineID===this._componentGuid&&this._editorAPI.modifyComponent(this._componentGuid,{timeline:this.currentState.timeline})}checkClipboardForTweenData(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;try{const U=yield navigator.clipboard.readText();if(U!==this._lastClipboardContent){this._lastClipboardContent=U;try{const B=JSON.parse(U);this._hasValidTweenData=void 0!==(null===(k=null==B?void 0:B.easyTween)||void 0===k?void 0:k.tween)}catch(B){this._hasValidTweenData=!1}}}catch(U){this._hasValidTweenData=!1}}))}copyTweenToClipboard(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;if(void 0===this.currentState.selectedTween||!(null===(k=this.currentState.timeline)||void 0===k?void 0:k.tweens))return;const B=this.currentState.timeline.tweens[this.currentState.selectedTween];if(!B)return;const U={easyTween:{tween:Object.assign(Object.assign({},B),{GameObjectLinks:[]})}};try{yield navigator.clipboard.writeText(JSON.stringify(U,null,2)),Q.V.log("Tween copied to clipboard",Y.$.Info)}catch(F){Q.V.log("Failed to copy tween to clipboard",Y.$.Error)}}))}pasteTweenFromClipboard(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;try{if(void 0===this.currentState.selectedTween)return void Q.V.log("Please select a tween to paste into",Y.$.Error);const B=yield navigator.clipboard.readText(),U=JSON.parse(B);if(null===(k=null==U?void 0:U.easyTween)||void 0===k?void 0:k.tween){const k=U.easyTween.tween;this.currentState.timeline.tweens||(this.currentState.timeline.tweens=[]),this.currentState.timeline.tweens[this.currentState.selectedTween]=Object.assign(Object.assign({},k),{GameObjectLinks:["self"]}),this.safelyModifyTimeline(),Q.V.log("Tween pasted from clipboard",Y.$.Info)}}catch(B){Q.V.log("Failed to paste tween from clipboard",Y.$.Error)}}))}shiftTween(k){var B;if(void 0===this.currentState.selectedTween||!(null===(B=this.currentState.timeline)||void 0===B?void 0:B.tweens))return;const U=this.currentState.selectedTween,F=this.currentState.timeline.tweens.length-1,G=U+(k?1:-1);if(G<0||G>F)return;const j=this.currentState.timeline.tweens,$=j[U];j[U]=j[G],j[G]=$,this._editorAPI.modifyComponent(this._componentGuid,{selectedTween:G}),this.safelyModifyTimeline()}createTweenClipboardButtons(){var k,B,U;return[ft.X.create({id:"shift-left",buttonText:"←",tooltip:"Shift the selected tween one layer lower",nodeSize:this.uiNodeSize1,buttonType:Et.VQ.Default,buttonDisabled:void 0===this.currentState.selectedTween||!(null===(k=this.currentState.timeline)||void 0===k?void 0:k.tweens)||this.currentState.selectedTween<=0,onClick:()=>{this.shiftTween(!1)}}),ft.X.create({id:"copy-tween",buttonText:"Copy",tooltip:"Copy the selected tween to the clipboard",nodeSize:this.uiNodeSize2,buttonType:Et.VQ.Default,buttonDisabled:void 0===this.currentState.selectedTween||!(null===(B=this.currentState.timeline)||void 0===B?void 0:B.tweens),onClick:()=>{this.copyTweenToClipboard()}}),ft.X.create({id:"paste-tween",buttonText:"Paste",tooltip:"Paste tween data from the clipboard into the selected tween",nodeSize:this.uiNodeSize2,buttonType:Et.VQ.Default,buttonDisabled:!this._hasValidTweenData,onClick:()=>{this.pasteTweenFromClipboard()}}),ft.X.create({id:"shift-right",buttonText:"→",tooltip:"Shift the selected tween one layer higher",nodeSize:this.uiNodeSize1,buttonType:Et.VQ.Default,buttonDisabled:void 0===this.currentState.selectedTween||!(null===(U=this.currentState.timeline)||void 0===U?void 0:U.tweens)||this.currentState.selectedTween>=this.currentState.timeline.tweens.length-1,onClick:()=>{this.shiftTween(!0)}})]}}const At={propertyGroups:{Position:{x:0,y:0},Rotation:{rotation:0},Scale:{scaleX:1,scaleY:1},Skew:{skewX:0,skewY:0},Alpha:{alpha:1},Tint:{tintColor:"rgba(255,255,255,1)",tintStrength:1,blendMode:"Multiply"}},renderKeys:["alpha","tintStrength","tintColor"],ease:"Easy",fromTo:"To",direction:"out",defaultPropertyGroup:"Position",how:{duration:1,delay:0,relative:!1},maximumTweensAllowed:12};let Ct=class extends V.u{constructor(){super(...arguments),this.playMode=!1,this.playbackPlayOnEnable=!0,this.playbackKillOnComplete=!1,this.gameObjectRecords={},this.gameObjectRecordsFrom={},this.gameObjectRecordsTo={},this.timeline=null,this.selectedTween=-1,this.onTweenComplete=new q.H}get _animationWrapper(){return this._animation||this.reloadAnimation(),this._animation}create(){super.create(),this.checkAndTriggerAnimation()}checkForAGameObjectEditor(){let k=0;const B=()=>{var U;editorAPI.getGameObjectGuid(this.GameObject)?this.isCurrentlySelected()?this.checkAndTriggerAnimation():null===(U=this._animation)||void 0===U||U.destroyTimeline():++k<100&&window.setTimeout(B,100)};window.setTimeout(B,100)}isCurrentlySelected(){return!1}checkAndTriggerAnimation(){var k;if(!(null===(k=this.GameObject)||void 0===k?void 0:k.active))return;this.playbackPlayOnEnable&&this.playAnimation()}playAnimation(k=0){this._animationWrapper.play(k)}pauseAnimation(){this._animationWrapper.pause()}resumeAnimation(){this._animationWrapper.resume()}completeAnimation(){this._animationWrapper.complete()}resetToStart(){this._animationWrapper.resetToStart()}reloadAnimation(){var k,B,U,F,G,j,$,H;this._animation&&this._animation.destroy(),this._animation=new ot({loopCount:null!==(B=null===(k=this.timeline)||void 0===k?void 0:k.loopCount)&&void 0!==B?B:0,yoyo:null!==(F=null===(U=this.timeline)||void 0===U?void 0:U.yoyo)&&void 0!==F&&F}),this._animation.onComplete((()=>{var k,B;null===(k=this.onTweenComplete)||void 0===k||k.dispatch(),this.playbackKillOnComplete&&(null===(B=this._animation)||void 0===B||B.destroy(),this._animation=null)}));const V=this.timeline;if(!V)return void Q.V.log("Easy Tween: not loaded properly",Y.$.Error);const W=V.tweens.length;if(0!==W)for(let q=0;q0)){Q.V.log(`Easy Tween: tween ${q} has no children to animate`,Y.$.Info);continue}W=this._animation.addGameObjects(F.children)}if(k.to&&(null===($=k.customData)||void 0===$?void 0:$.useTargetTo)&&this.gameObjectRecordsTo[q]){const B=this._animation.addGameObject(this.gameObjectRecordsTo[q]);Object.keys(k.to).forEach((U=>{U in B&&(k.to[U]=B[U])}))}if(k.from&&(null===(H=k.customData)||void 0===H?void 0:H.useTargetFrom)&&this.gameObjectRecordsFrom[q]){const B=this._animation.addGameObject(this.gameObjectRecordsFrom[q]);Object.keys(k.from).forEach((U=>{U in B&&(k.from[U]=B[U])}))}k.from&&k.to?this._animation.fromTo(W,k.how.duration,k.from,k.to,k.ease,k.how.delay,k.how.relative):k.to?this._animation.to(W,k.how.duration,k.to,k.ease,k.how.delay,k.how.relative):k.from&&this._animation.from(W,k.how.duration,k.from,k.ease,k.how.delay,k.how.relative)}else Q.V.log("Easy Tween: No tweens to animate",Y.$.Info)}destroy(){var k,B;null===(k=this._animation)||void 0===k||k.destroy(),null===(B=this.onTweenComplete)||void 0===B||B.dispose(),super.destroy()}};(0,G.Cg)([(0,W.vk)(),(0,G.Sn)("design:type",Boolean)],Ct.prototype,"playMode",void 0),(0,G.Cg)([(0,W.vk)(),(0,G.Sn)("design:type",Boolean)],Ct.prototype,"playbackPlayOnEnable",void 0),(0,G.Cg)([(0,W.vk)(),(0,G.Sn)("design:type",Boolean)],Ct.prototype,"playbackKillOnComplete",void 0),(0,G.Cg)([(0,W.Om)(),(0,W.ER)(),(0,G.Sn)("design:type",Object)],Ct.prototype,"gameObjectRecords",void 0),(0,G.Cg)([(0,W.Om)(),(0,W.ER)(),(0,G.Sn)("design:type",Object)],Ct.prototype,"gameObjectRecordsFrom",void 0),(0,G.Cg)([(0,W.Om)(),(0,W.ER)(),(0,G.Sn)("design:type",Object)],Ct.prototype,"gameObjectRecordsTo",void 0),(0,G.Cg)([(0,W.np)(),(0,W.SZ)(),(0,G.Sn)("design:type",Object)],Ct.prototype,"timeline",void 0),(0,G.Cg)([(0,W.g1)(),(0,G.Sn)("design:type",Number)],Ct.prototype,"selectedTween",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],Ct.prototype,"onTweenComplete",void 0),Ct=(0,G.Cg)([(0,j.EV)("EasyTween",j.YH.animation),(0,X.W)(St)],Ct);let Ot=class extends V.u{constructor(){super(...arguments),this.separator=" ",this.buildStringOnCreate=!0,this.chunks=[],this.onStringChanged=new q.H,this.onStringBuilt=new q.H,this._originalChunks=[]}create(){super.create(),this.buildStringOnCreate&&this.buildString(),this._originalChunks=[...this.chunks]}addChunk(k,B){if(at.A.isDefined(B)){const U=B<0?this.chunks.length+B:B;if(U<0||U>this.chunks.length)return void Q.V.log(`StringBuilderComponent: Index out of bounds trying to add string "${k}" at index ${B}`,Y.$.Error);this.chunks.splice(U,0,k)}else this.chunks.push(k);this.onStringChanged.dispatch(this.getString())}setChunk(k,B){const U=B<0?this.chunks.length+B:B;U<0||U>=this.chunks.length?Q.V.log(`StringBuilderComponent: Index out of bounds trying to set chunk to "${k}" at index ${B}`,Y.$.Error):this.chunks[U]!==k&&(this.chunks[U]=k,this.onStringChanged.dispatch(this.getString()))}deleteChunk(k){const B=k<0?this.chunks.length+k:k;B<0||B>=this.chunks.length?Q.V.log(`StringBuilderComponent: Index out of bounds trying to delete string at index ${k}`,Y.$.Error):(this.chunks.splice(B,1),this.onStringChanged.dispatch(this.getString()))}reset(){const k=this.getString();this.chunks=[...this._originalChunks],this.getString()!==k&&this.onStringChanged.dispatch(this.getString())}buildString(){this.onStringBuilt.dispatch(this.getString())}getString(){return this.chunks.filter((k=>(null==k?void 0:k.length)>0)).join(this.separator)}destroy(){this.onStringChanged.dispose(),this.onStringBuilt.dispose(),super.destroy()}};(0,G.Cg)([(0,W.W_)(),(0,G.Sn)("design:type",String)],Ot.prototype,"separator",void 0),(0,G.Cg)([(0,W.vk)(),(0,G.Sn)("design:type",Boolean)],Ot.prototype,"buildStringOnCreate",void 0),(0,G.Cg)([(0,W.W_)(),(0,W.SZ)(),(0,G.Sn)("design:type",Array)],Ot.prototype,"chunks",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],Ot.prototype,"onStringChanged",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],Ot.prototype,"onStringBuilt",void 0),Ot=(0,G.Cg)([(0,j.EV)("StringBuilder",j.YH.ui)],Ot);class It extends dt.${generate(k,B){const U=[];return U.push(ut.G.componentPickerGroup({id:"source",labelValue:"Source",componentType:"Component",componentGuid:k.source})),U.push(ut.G.componentPickerGroup({id:"target",labelValue:"Target",componentType:"Component",componentGuid:k.target})),U.push(ut.G.checkboxGroup({id:"copyOnCreate",labelValue:"Copy on Create",labelPosition:Et.G5.Left,inputValue:k.copyOnCreate})),U.push(_t.N.create({id:"beforeCopy",label:"Before Copy",signalValue:k.beforeCopy,componentGUID:this._componentGuid})),U.push(_t.N.create({id:"onCopy",label:"On Copy",signalValue:k.onCopy,componentGUID:this._componentGuid})),U.push(bt._.blankLine("divider")),U.push(this.buildPropertiesSection(k)),lt.X.createVertical(U)}buildPropertiesSection(k){var B,U,F;const G=[];if(!k.source||!k.target)return G.push(gt.b.create({id:"property-cloner-empty",iconType:Et.AT.Info,message:"Select source and target to see common properties."})),lt.X.createVertical(G,{isContainer:!0,title:"Properties to copy"});const j=this.getCommonProperties(k.source,k.target),$=new Set(null!==(B=k.propertiesToCopy)&&void 0!==B?B:[]),H=new Set(j),V=(null!==(U=k.propertiesToCopy)&&void 0!==U?U:[]).filter((k=>H.has(k)));if(V.length!==(null!==(F=k.propertiesToCopy)&&void 0!==F?F:[]).length){this._editorAPI.modifyComponent(this._componentGuid,{propertiesToCopy:V});for(const k of $)H.has(k)||$.delete(k)}if(0===j.length)G.push(gt.b.create({id:"property-cloner-no-common",iconType:Et.AT.Info,message:"Source and target have no public properties in common."}));else for(const W of j)G.push(ut.G.checkboxGroup({id:`prop-${W}`,labelValue:W,labelPosition:Et.G5.Left,inputValue:$.has(W),onChange:(k,B)=>{if("boolean"!=typeof B)return;const U=new Set($);B?U.add(W):U.delete(W);const F=j.filter((k=>U.has(k)));this._editorAPI.modifyComponent(this._componentGuid,{propertiesToCopy:F})}}));return lt.X.createVertical(G,{isContainer:!0,title:"Properties to copy",isCollapsible:!0})}getCommonProperties(k,B){const U=this._editorAPI.getComponent(k),F=this._editorAPI.getComponent(B);if(!U||!F)return[];const G=U,j=F,$=new Set(this.collectPublicKeys(F));return this.collectPublicKeys(U).filter((k=>$.has(k))).filter((k=>typeof G[k]==typeof j[k])).filter((k=>"function"!=typeof G[k])).sort(((k,B)=>k.localeCompare(B)))}collectPublicKeys(k){const B=new Set;let U=k;for(;U&&Object.getPrototypeOf(U);){const k=Object.getOwnPropertyDescriptors(U);for(const U of Object.keys(k)){if(B.has(U)||U.startsWith("_"))continue;const F=k[U];"function"!=typeof F.value&&"object"!=typeof F.value&&B.add(U)}U=Object.getPrototypeOf(U)}return[...B]}}let Dt=class extends V.u{constructor(){super(...arguments),this.source=null,this.target=null,this.copyOnCreate=!1,this.propertiesToCopy=[],this.beforeCopy=new q.H,this.onCopy=new q.H}create(){super.create(),this.copyOnCreate&&this.copy()}copy(){if(!this.source||!this.target)return;this.beforeCopy.dispatch();const k=this.source,B=this.target;for(const U of this.propertiesToCopy){if(!(U in k)||!(U in B))continue;const F=k[U];typeof F==typeof B[U]&&("function"!=typeof F&&(B[U]=F))}this.onCopy.dispatch()}destroy(){this.beforeCopy.dispose(),this.onCopy.dispose(),super.destroy()}};(0,G.Cg)([(0,W.Mn)(V.u),(0,G.Sn)("design:type",V.u)],Dt.prototype,"source",void 0),(0,G.Cg)([(0,W.Mn)(V.u),(0,G.Sn)("design:type",V.u)],Dt.prototype,"target",void 0),(0,G.Cg)([(0,W.vk)(),(0,G.Sn)("design:type",Boolean)],Dt.prototype,"copyOnCreate",void 0),(0,G.Cg)([(0,W.W_)(),(0,W.SZ)(),(0,G.Sn)("design:type",Array)],Dt.prototype,"propertiesToCopy",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],Dt.prototype,"beforeCopy",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],Dt.prototype,"onCopy",void 0),Dt=(0,G.Cg)([(0,j.EV)("PropertyCloner",j.YH.root,"Copies matching public properties from a source component to a target component"),(0,X.W)(It)],Dt);var Rt=U(83793),Pt=U(82538),Mt=(U(55539),U(10673));class Nt{constructor(k,B){this.onStart=new q.H,this.onStop=new q.H,this.key=k,this.loop=B}destroy(){this.onStart.dispose(),this.onStop.dispose()}play(k,B){B.isLoaded?this.playInternal(B.getSpine()):B.OnLoaded.addOnce((()=>{this.playInternal(B.getSpine())})),this.onStop.addOnce(k.onAnimationStateStop,k)}playInternal(k){var B;k.setAnimationByName(0,this.key,this.loop),null===(B=this.onStart)||void 0===B||B.dispatch(),this.loop||k.onComplete.addOnce((()=>{this.sendStopSignal()}))}sendStopSignal(){this.onStop.dispatch()}}let xt=class extends V.u{constructor(){super(...arguments),this._states=new Map,this._currentState=null,this._defaultState=null}get CurrentStateKey(){return this._currentState?this._currentState.key:this._defaultState?this._defaultState.key:""}destroy(){this._states.forEach((k=>{k.destroy()})),this._states=null,super.destroy()}setDefaultAnimationState(k,B){this.addAnimationState(k,B)&&(this._defaultState=this._states.get(k),this._currentState||this._defaultState.play(this,this._spineComponent))}addAnimationState(k,B){if(!this._states.has(k)){const U=new Nt(k,B);return this._states.set(k,U),!0}return!1}setAnimationState(k){var B;this._states.has(k)&&this.CurrentStateKey!==k?(null===(B=this._currentState)||void 0===B||B.sendStopSignal(),this._currentState=this._states.get(k),this._currentState.play(this,this._spineComponent),this._currentState.onStop.addOnce(this.onAnimationStateStop,this)):Q.V.log(`Spine animation for key ${k} does not exist on this controller`,Y.$.Error)}onAnimationStateStop(){var k;this._currentState=null,null===(k=this._defaultState)||void 0===k||k.play(this,this._spineComponent)}};(0,G.Cg)([(0,W.Mn)(Mt.v),(0,G.Sn)("design:type",Mt.v)],xt.prototype,"_spineComponent",void 0),xt=(0,G.Cg)([(0,j.EV)("SpineAnimationController",j.YH.animation,"A controller to manage animation states for a given SpineComponent")],xt);var Lt=U(29104),kt=(U(78821),U(50740),U(78321),U(39002));var Bt=U(15308);U(68910);var Ut=U(48368);class Ft{constructor(k){this.onAddedToGroup=new q.H,this.onRemovedFromGroup=new q.H,this.onRemovedFromWorld=new q.H,this.onOutOfBounds=new q.H,this.onEnterBounds=new q.H,this.onInputOver=new q.H,this.onInputOut=new q.H,this.onInputDown=new q.H,this.onInputUp=new q.H,this.onDestroy=new q.H,this.onDragStart=new q.H,this.onDragStop=new q.H,this.onDragUpdate=new q.H,this.onAnimationStart=new q.H,this.onAnimationComplete=new q.H,this.onAnimationLoop=new q.H,this.parent=k}destroy(){this.parent=null,this.onDestroy.dispose(),this.onAddedToGroup.dispose(),this.onRemovedFromGroup.dispose(),this.onEnterBounds.dispose(),this.onOutOfBounds.dispose(),this.onInputOver.dispose(),this.onInputOut.dispose(),this.onInputDown.dispose(),this.onInputUp.dispose(),this.onDragStart.dispose(),this.onDragUpdate.dispose(),this.onDragStop.dispose(),this.onAnimationStart.dispose(),this.onAnimationComplete.dispose(),this.onAnimationLoop.dispose(),this.onRemovedFromWorld.dispose()}}U(9938);var Gt,jt=U(86766),$t=U(48011),Ht=(U(37950),U(37061),U(89460),U(49356),U(90157),U(52777));!function(k){k[k.JSON_HASH=0]="JSON_HASH",k[k.JSON_ARRAY=1]="JSON_ARRAY"}(Gt||(Gt={}));U(72077);var Vt=U(49415),Wt=U(27179);class qt{get diameter(){return this._diameter}set diameter(k){k>0?(this._diameter=k,this._radius=.5*k):Q.V.log(`Circle diameter must be greater than 0. You provided: ${k}`,Y.$.Warning)}get radius(){return this._radius}set radius(k){k>0?(this._radius=k,this._diameter=2*k):Q.V.log(`Circle radius must be greater than 0. You provided: ${k}`,Y.$.Warning)}constructor(k=0,B=0,U=0){this._diameter=0,this._radius=0,this.setTo(k,B,U)}get circumference(){return Math.PI*this._radius*2}circumferencePoint(k,B=!1,U=new Wt.I){return B&&(k=kt.c.degToRad(k)),U.x=this.x+this.radius*Math.cos(k),U.y=this.y+this.radius*Math.sin(k),U}getBounds(){return new Bt.M(this.x-this.radius,this.y-this.radius,this.diameter,this.diameter)}setTo(k,B,U){return this.x=k,this.y=B,this.diameter=U,this}}var Kt,zt,Yt=U(13409),Qt=U(99414),Xt=U(39688);U(66032),U(16883);!function(k){k[k.NORMAL=0]="NORMAL",k[k.ADD=1]="ADD",k[k.MULTIPLY=2]="MULTIPLY",k[k.SCREEN=3]="SCREEN",k[k.OVERLAY=4]="OVERLAY",k[k.DARKEN=5]="DARKEN",k[k.LIGHTEN=6]="LIGHTEN",k[k.COLOR_DODGE=7]="COLOR_DODGE",k[k.COLOR_BURN=8]="COLOR_BURN",k[k.HARD_LIGHT=9]="HARD_LIGHT",k[k.SOFT_LIGHT=10]="SOFT_LIGHT",k[k.DIFFERENCE=11]="DIFFERENCE",k[k.EXCLUSION=12]="EXCLUSION",k[k.HUE=13]="HUE",k[k.SATURATION=14]="SATURATION",k[k.COLOR=15]="COLOR",k[k.LUMINOSITY=16]="LUMINOSITY"}(Kt||(Kt={})),function(k){k[k.DEFAULT=0]="DEFAULT",k[k.LINEAR=1]="LINEAR",k[k.NEAREST=2]="NEAREST"}(zt||(zt={}));var Zt=U(16649),Jt=U(61806);class te{static DUMMY_METHOD(){}get add(){return Jt.W.instance.game.add}get game(){return Jt.W.instance.game}get stage(){return Jt.W.instance.game.stage}get key(){return this._key}set key(k){this._key=k}init(...k){te.DUMMY_METHOD()}preload(){te.DUMMY_METHOD()}create(){te.DUMMY_METHOD()}update(){te.DUMMY_METHOD()}shutdown(){te.DUMMY_METHOD()}paused(){te.DUMMY_METHOD()}resumed(){te.DUMMY_METHOD()}}U(12033);var ee=U(65321),ie=(U(84215),U(42687),U(71392)),se=U(55366),ne=U(42979),ae=U(27780);let re=class extends V.u{get onGameObjectActiveChanged(){return this.gameObject.onActiveChanged}get onGameObjectActiveInHierarchyChanged(){return this.gameObject.onActiveInHierarchyChanged}get onGameObjectHierarchyChanged(){return this.gameObject.onHierarchyChanged}get onGameObjectChildAdded(){return this.gameObject.onChildAdded}get onGameObjectChildRemoved(){return this.gameObject.onChildRemoved}get onGameObjectLayerChanged(){return this.gameObject.onLayerChanged}get onGameObjectComponentAdded(){return this.gameObject.onComponentAdded}get onGameObjectComponentRemoved(){return this.gameObject.onComponentRemoved}get onGameObjectComponentAddedToHierarchy(){return this.gameObject.onComponentAddedToHierarchy}get onGameObjectDestroy(){return this.gameObject.onDestroy}};(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("activeChanged"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectActiveChanged",null),(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("activeInHierarchyChanged"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectActiveInHierarchyChanged",null),(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("hierarchyChanged"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectHierarchyChanged",null),(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("childAdded"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectChildAdded",null),(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("childRemoved"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectChildRemoved",null),(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("layerChanged"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectLayerChanged",null),(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("componentAdded"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectComponentAdded",null),(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("componentRemoved"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectComponentRemoved",null),(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("componentAddedToHierarchy"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectComponentAddedToHierarchy",null),(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("destroy"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectDestroy",null),re=(0,G.Cg)([(0,j.EV)("GameObjectEvents",j.YH.root,"Provides access to signals dispatched by GameObject")],re);var oe=U(17400),he=U(57056),ce=U(44716);U(70028),U(8460);const de=(k,B)=>(U,F)=>{(0,W.E8)()(U,F),(0,W.Lr)(B)(U,F),(0,W.nK)(k)(U,F)};var le=U(82119);const ue=(k,B)=>U=>{const F={ctor:U};B&&(F.category=B),le.l[k]=F};U(96352);var fe=U(22494);const be=()=>(k,B)=>{fe.Q.addProperty("custom:annotations:skipMapExport",k.constructor,B)};var pe=U(43501),ve=U(30615);class ge{static getRandomItem(k,B=0,U=0){let F=U;if(!k)return null;U<1&&(F=k.length);const G=B+Math.floor(Math.random()*F);return void 0===k[G]?null:k[G]}}U(89683);var me=U(77120)},30615:(k,B,U)=>{"use strict";U.d(B,{C:()=>F});class F{get list(){return this._list}set list(k){this.reset(),this._list=k}constructor(k=[]){this._cursor=0,this._list=[],this._list=k}get total(){return this._list.length}get first(){return this._cursor=0,this._list.length>0?this._list[0]:null}get next(){var k;return this._cursorU[k]===B)))&&void 0!==U?U:null}exists(k){return this._list.indexOf(k)>-1}reset(){this._list=[],this._cursor=0}remove(k){const B=this._list.indexOf(k);if(B>-1)return this._list.splice(B,1),k}setAll(k,B){this._list.forEach((U=>{U[k]=B}))}callAll(k,...B){this._list.forEach((U=>{U[k].apply(U,B)}))}removeAll(k=!1){k&&this._list.forEach((k=>{k.destroy()})),this.reset()}}},89683:(k,B,U)=>{"use strict";U.d(B,{G:()=>F});class F{static addObject(k){this.enabled&&this.objects.push(k)}static removeObject(k){if(this.enabled){const B=this.objects.indexOf(k);B>=0&&this.objects.splice(B,1)}}static getPropertiesFromObject(k,B){const U={};for(const G in B)Object.keys(B[G]).length>0?U[G]=F.getPropertiesFromObject(k[G],B[G]):k&&null!==k[G]&&void 0!==k[G]?U[G]=k[G]:U[G]=B[G];return U}static getPropertiesFromComponent(k,B){return this.getPropertiesFromObject(k,B)}}F.enabled=!1,F.objects=[]},77120:(k,B,U)=>{"use strict";U.d(B,{D:()=>G});var F=U(95891);class G{static get width(){return Math.max(window.innerWidth,document.documentElement.clientWidth)}static get height(){return Math.max(window.innerHeight,document.documentElement.clientHeight)}static get isReady(){return F.includes(["complete","interactive"],document.readyState)}static addDOMContentLoadedListener(k){document.addEventListener("DOMContentLoaded",k)}static removeDOMContentLoadedListener(k){document.removeEventListener("DOMContentLoaded",k)}static isFullScreen(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}static addToDOM(k,B,U=!0){const F=null!=B?B:document.body;U&&F.style&&(F.style.overflow="hidden"),F.appendChild(k)}}},81071:(k,B,U)=>{"use strict";U.d(B,{n:()=>H});var F=U(40794),G=U(27179),j=U(32469),$=U(823);class H{static getDefaultsForComponent(k){const B=F.X[k],U=Reflect.getMetadata($.UW,B);if(!U)return{};const H=U.map((k=>Reflect.getMetadata($.fY,B,k))),V=new B,W={};return H.forEach((k=>{var B;const U=null!==(B=k.alias)&&void 0!==B?B:k.property;if(k.type===j.b.Signal)return;let F;try{F=k.type!==j.b.Vector||k.isArray||k.isReorderableList?V[k.property]:new G.I(V[k.property].x,V[k.property].y)}catch(e){switch(k.type){case j.b.Vector:F={x:0,y:0};break;case j.b.Size:F={width:0,height:0}}}W[U]=F})),W}}},26731:(k,B,U)=>{"use strict";U.d(B,{$:()=>F});class F{initialize(k,B){this._componentGuid=k,this._editorAPI=B}}},15887:(k,B,U)=>{"use strict";U.d(B,{X:()=>j});var F,G=U(32154);!function(k){k[k.Vertical=0]="Vertical",k[k.Horizontal=1]="Horizontal"}(F||(F={}));class j{constructor(k,B,U){if(this.nodeSize="auto",this.isContainer=!1,this.title="",this.isCollapsible=!1,this.startCollapsed=!1,this.spacing=0,this.style={},this.type=k,this.elements=B,G.A.isDefined(U)){if(G.A.isDefined(U.nodeSize)&&(this.nodeSize=U.nodeSize),G.A.isDefined(U.isContainer)&&!0===U.isContainer&&(this.isContainer=U.isContainer),U.title&&(this.isContainer=!0,this.title=U.title),G.A.isDefined(U.isCollapsible)&&!0===U.isCollapsible&&(this.isContainer=!0,this.isCollapsible=U.isCollapsible),G.A.isDefined(U.startCollapsed)&&!0===U.startCollapsed&&(this.isContainer=!0,this.isCollapsible=!0,this.startCollapsed=U.startCollapsed),G.A.isDefined(U.isContainer)&&this.isContainer!==U.isContainer)throw new Error("Value for isContainer set to false, but other container options were set.");if(G.A.isDefined(U.isCollapsible)&&this.isCollapsible!==U.isCollapsible)throw new Error("Value for isCollapsible set to false, but startCollapsed was set to true.");G.A.isDefined(U.spacing)&&(this.spacing=U.spacing),G.A.isDefined(U.style)&&(this.style=U.style)}}static createHorizontal(k,B){return new j(F.Horizontal,k,B)}static createVertical(k,B){return new j(F.Vertical,k,B)}static createVerticalContainer(k,B){const U=Object.assign(Object.assign({},B),{isContainer:!0});return j.createVertical(k,U)}static createHorizontalContainer(k,B){const U=Object.assign(Object.assign({},B),{isContainer:!0});return j.createHorizontal(k,U)}}},32928:(k,B,U)=>{"use strict";U.d(B,{G:()=>Y});var F=U(15887),G=U(32357),j=U(1596),$=U(900),H=U(47681),V=U(46386),W=U(31042),q=U(56761),K=U(33431),z=U(76814);class Y{static checkboxGroup(k){const B=this.createLabelTerminal(k,"11of12"),U=q.f.create({id:k.id,inputType:"checkbox",inputValue:k.inputValue,onChange:k.onChange,readonly:k.readonly,nodeSize:"1of12"});return F.X.createHorizontal([B,U])}static numberGroup(k){const B=this.createLabelTerminal(k),U=q.f.create({id:k.id,inputValue:k.inputValue,inputType:"number",inputUpdateMode:k.inputUpdateMode,showDeleteButton:k.showDeleteButton,readonly:k.readonly,onChange:k.onChange});return F.X.createHorizontal([B,U])}static textGroup(k){const B=this.createLabelTerminal(k),U=q.f.create({id:k.id,inputValue:k.inputValue,inputType:"text",inputUpdateMode:k.inputUpdateMode,showDeleteButton:k.showDeleteButton,readonly:k.readonly,onChange:k.onChange});return F.X.createHorizontal([B,U])}static colorPickerGroup(k){const B=this.createLabelTerminal(k),U=q.f.create({id:k.id,inputValue:k.inputValue,inputType:"color",inputUpdateMode:k.inputUpdateMode,readonly:k.readonly,onChange:k.onChange});return F.X.createHorizontal([B,U])}static vectorGroup(k){var B,U,G,j;const $=this.createLabelTerminal(k),H=q.f.create({labelValue:"x:",id:null!==(B=k.xKey)&&void 0!==B?B:`${k.id}X`,propertyPath:k.xKey?[k.xKey]:[k.id,"x"],inputValue:null===(U=k.vectorValue)||void 0===U?void 0:U.x,inputType:"number",inputUpdateMode:k.inputUpdateMode,readonly:k.readonly,showDeleteButton:k.showDeleteButton,onChange:k.onChange}),V=q.f.create({labelValue:"y:",id:null!==(G=k.yKey)&&void 0!==G?G:`${k.id}Y`,propertyPath:k.yKey?[k.yKey]:[k.id,"y"],inputValue:null===(j=k.vectorValue)||void 0===j?void 0:j.y,inputType:"number",inputUpdateMode:k.inputUpdateMode,readonly:k.readonly,showDeleteButton:k.showDeleteButton,onChange:k.onChange});return F.X.createHorizontal([$,F.X.createVertical([H,V])])}static sizeGroup(k){var B,U,G,j;const $=this.createLabelTerminal(k),H=q.f.create({labelValue:"w:",id:null!==(B=k.widthKey)&&void 0!==B?B:`${k.id}W`,propertyPath:k.widthKey?[k.widthKey]:[k.id,"width"],inputValue:null===(U=k.sizeValue)||void 0===U?void 0:U.width,inputType:"number",inputUpdateMode:k.inputUpdateMode,readonly:k.readonly,showDeleteButton:k.showDeleteButton,onChange:k.onChange}),V=q.f.create({labelValue:"h:",id:null!==(G=k.heightKey)&&void 0!==G?G:`${k.id}H`,propertyPath:k.heightKey?[k.heightKey]:[k.id,"height"],inputValue:null===(j=k.sizeValue)||void 0===j?void 0:j.height,inputType:"number",inputUpdateMode:k.inputUpdateMode,readonly:k.readonly,showDeleteButton:k.showDeleteButton,onChange:k.onChange});return F.X.createHorizontal([$,F.X.createVertical([H,V])])}static fourDimensionGroup(k){var B,U,G,j,$,H,V,W;const K=this.createLabelTerminal(k),z=q.f.create({labelValue:`${k.xKey?k.xKey:"X"}:`,id:null!==(B=k.xKey)&&void 0!==B?B:`${k.id}Top`,propertyPath:k.xKey?[k.xKey]:[k.id,"x"],inputValue:null===(U=k.fourInputValue)||void 0===U?void 0:U.top,inputType:"number",inputUpdateMode:k.inputUpdateMode,readonly:k.readonly,showDeleteButton:k.showDeleteButton,onChange:k.onChange}),Y=q.f.create({labelValue:`${k.yKey?k.yKey:"Y"}:`,id:null!==(G=k.yKey)&&void 0!==G?G:`${k.id}Bottom`,propertyPath:k.yKey?[k.yKey]:[k.id,"y"],inputValue:null===(j=k.fourInputValue)||void 0===j?void 0:j.bottom,inputType:"number",inputUpdateMode:k.inputUpdateMode,readonly:k.readonly,showDeleteButton:k.showDeleteButton,onChange:k.onChange}),Q=q.f.create({labelValue:`${k.zKey?k.zKey:"Z"}:`,id:null!==($=k.zKey)&&void 0!==$?$:`${k.id}Right`,propertyPath:k.zKey?[k.zKey]:[k.id,"z"],inputValue:null===(H=k.fourInputValue)||void 0===H?void 0:H.right,inputType:"number",inputUpdateMode:k.inputUpdateMode,readonly:k.readonly,showDeleteButton:k.showDeleteButton,onChange:k.onChange}),X=q.f.create({labelValue:`${k.wKey?k.wKey:"W"}:`,id:null!==(V=k.wKey)&&void 0!==V?V:`${k.id}Left`,propertyPath:k.wKey?[k.wKey]:[k.id,"w"],inputValue:null===(W=k.fourInputValue)||void 0===W?void 0:W.left,inputType:"number",inputUpdateMode:k.inputUpdateMode,readonly:k.readonly,showDeleteButton:k.showDeleteButton,onChange:k.onChange});return F.X.createVertical([K,F.X.createHorizontal([z,Y]),F.X.createHorizontal([Q,X])])}static dropdownGroup(k){const B=this.createLabelTerminal(k),U=$._.create({id:k.id,selectOptions:k.selectOptions,selectValue:k.selectValue,readonly:k.readonly,onChange:k.onChange});return F.X.createHorizontal([B,U])}static enumGroup(k,B){const U=Object.keys(B).filter((k=>isNaN(k))).map((k=>({label:k,value:B[k]})));return this.dropdownGroup(Object.assign(Object.assign({},k),{selectOptions:U}))}static presetGroup(k){const B=this.createLabelTerminal(k),U=z.E.create(k);return F.X.createHorizontal([B,U])}static buttonGroup(k){const B=this.createLabelTerminal(k),U=G.X.create({id:k.id,buttonText:k.buttonText,buttonIcon:k.buttonIcon,buttonType:k.buttonType,onClick:k.onClick,buttonDisabled:k.buttonDisabled});return F.X.createHorizontal([B,U])}static componentPickerGroup(k){const B=this.createLabelTerminal(k),U=j.G.create({id:k.id,componentType:k.componentType,componentGuid:k.componentGuid,readonly:k.readonly,onChange:k.onChange});return F.X.createHorizontal([B,U])}static gameObjectPickerGroup(k){const B=this.createLabelTerminal(k),U=V.W.create({id:k.id,gameObjectGuid:k.gameObjectGuid,readonly:k.readonly,onChange:k.onChange});return F.X.createHorizontal([B,U])}static filePickerGroup(k){const B=this.createLabelTerminal(k),U=H.H.create({id:k.id,path:k.path,onChange:k.onChange,allowedExtensions:k.allowedExtensions});return F.X.createHorizontal([B,U])}static imagePickerGroup(k){const B=this.createLabelTerminal(k),U=W.A.create({id:k.id,guid:k.guid,onChange:k.onChange});return F.X.createHorizontal([B,U])}static createLabelTerminal(k,B="4of12"){return K.l.create({id:`${k.id}-label`,labelTooltip:k.labelTooltip,labelValue:k.labelValue,labelTextWrap:k.labelTextWrap,nodeSize:B})}}},97573:(k,B,U)=>{"use strict";U.d(B,{H:()=>G});var F=U(81071);class G{constructor(){this.oldType="LegacyTransform",this.newType="RectTransform"}convert(k){const B=Object.assign(Object.assign({},F.n.getDefaultsForComponent(this.oldType)),{x:0,y:0,relativeX:0,relativeY:0,width:0,height:0,relativeWidth:0,relativeHeight:0,anchorX:0,anchorY:0,scaleX:1,scaleY:1}),U=Object.assign({},k);Object.keys(U).forEach((k=>{void 0===U[k]&&delete U[k]})),"relativeX"in U&&delete U.x,"relativeY"in U&&delete U.y,"relativeWidth"in U&&delete U.width,"relativeHeight"in U&&delete U.height;const G=Object.assign(Object.assign({},B),U),j=F.n.getDefaultsForComponent(this.newType);return Object.assign(Object.assign({},j),{localPosition:{x:G.x,y:G.y},localRotation:0,localScale:{x:G.scaleX,y:G.scaleY},anchorMin:{x:G.relativeX-G.relativeWidth*G.anchorX,y:G.relativeY-G.relativeHeight*G.anchorY},anchorMax:{x:G.relativeX+G.relativeWidth*(1-G.anchorX),y:G.relativeY+G.relativeHeight*(1-G.anchorY)},anchoredPivotOffset:{x:G.x,y:G.y},sizeDelta:{width:G.width,height:G.height},pivot:{x:G.anchorX,y:G.anchorY}})}}},8490:(k,B,U)=>{"use strict";U.d(B,{L:()=>K});var F=U(26731),G=U(15887),j=U(32928),$=U(23664),H=U(5440),V=U(32357),W=U(97573),q=U(62131);class K extends F.${handleValueChange(k,B,U,F){null!==F&&K.exclusiveMap[U]&&B.modifyComponent(k,{[K.exclusiveMap[U]]:null})}generate(k,B){const U=[];return U.push(j.G.vectorGroup({id:"position",labelValue:"Position",showDeleteButton:!0,vectorValue:{x:k.x,y:k.y},xKey:"x",yKey:"y",onChange:this.handleValueChange.bind(this,this._componentGuid,this._editorAPI)})),U.push($._.halfBlankLine()),U.push(j.G.vectorGroup({id:"relativePosition",labelValue:"Relative Pos",showDeleteButton:!0,vectorValue:{x:k.relativeX,y:k.relativeY},xKey:"relativeX",yKey:"relativeY",onChange:this.handleValueChange.bind(this,this._componentGuid,this._editorAPI)})),U.push($._.halfBlankLine()),U.push(j.G.sizeGroup({id:"size",labelValue:"Size",showDeleteButton:!0,sizeValue:{width:k.width,height:k.height},widthKey:"width",heightKey:"height",onChange:this.handleValueChange.bind(this,this._componentGuid,this._editorAPI)})),U.push($._.halfBlankLine()),U.push(j.G.sizeGroup({id:"relativeSize",labelValue:"Relative Size",showDeleteButton:!0,sizeValue:{width:k.relativeWidth,height:k.relativeHeight},widthKey:"relativeWidth",heightKey:"relativeHeight",onChange:this.handleValueChange.bind(this,this._componentGuid,this._editorAPI)})),U.push($._.halfBlankLine()),U.push(j.G.vectorGroup({id:"anchor",labelValue:"Anchor",showDeleteButton:!0,vectorValue:{x:k.anchorX,y:k.anchorY},xKey:"anchorX",yKey:"anchorY"})),U.push($._.halfBlankLine()),U.push(j.G.vectorGroup({id:"scale",labelValue:"Scale",showDeleteButton:!0,vectorValue:{x:k.scaleX,y:k.scaleY},xKey:"scaleX",yKey:"scaleY"})),this._editorAPI.isFeatureEnabled(q.b.ConvertLegacyTransformButton)&&(U.push($._.halfBlankLine()),U.push(V.X.create({id:"convert-button",buttonText:"Convert to RectTransform",buttonIcon:H.a2.Bolt,buttonType:H.VQ.Highlight,onClick:()=>{this._editorAPI.convertComponent(this._componentGuid,new W.H)}}))),G.X.createVertical(U)}}K.exclusiveMap={x:"relativeX",y:"relativeY",relativeX:"x",relativeY:"y",width:"relativeWidth",height:"relativeHeight",relativeWidth:"width",relativeHeight:"height"}},140:(k,B,U)=>{"use strict";U.d(B,{I:()=>G});var F=U(49860);class G extends F.A{constructor(k){var B;super(k),this.label=k.label,this.arrayType=k.arrayType,this.enumeration=k.enumeration,this.value=k.value,this.isReorderable=null===(B=k.isReorderable)||void 0===B||B,this.insertElementCallbacks=k.insertElementCallbacks,this.onChange=k.onChange,this.getElementInspector=k.getElementInspector}static create(k){return new G(k)}}},32357:(k,B,U)=>{"use strict";U.d(B,{X:()=>j});var F=U(5440),G=U(49860);class j extends G.A{constructor(k){var B;super(k),this.onClick=k.onClick,this.buttonText=k.buttonText,this.buttonIcon=k.buttonIcon,this.buttonType=k.buttonType,this.disabled=k.buttonDisabled,this.buttonTextWrap=null!==(B=k.buttonTextWrap)&&void 0!==B?B:F.K3.Wrap,this.tooltip=k.tooltip}static create(k){return new j(k)}}},1596:(k,B,U)=>{"use strict";U.d(B,{G:()=>G});var F=U(49860);class G extends F.A{constructor(k){var B,U;super(k),this.componentType="string"==typeof k.componentType?k.componentType:null===(B=k.componentType)||void 0===B?void 0:B.name,this.componentGuid=k.componentGuid,this.readonly=null!==(U=k.readonly)&&void 0!==U&&U,this.onChange=k.onChange}static create(k){return new G(k)}}},23664:(k,B,U)=>{"use strict";U.d(B,{_:()=>j});var F=U(5440),G=U(49860);class j extends G.A{constructor(k){super(k),this.dividerType=k.dividerType}static line(k=""){return new j({id:k,dividerType:F.gY.Line})}static blankLine(k=""){return new j({id:k,dividerType:F.gY.Blank})}static halfBlankLine(k=""){return new j({id:k,dividerType:F.gY.HalfBlank})}static verticalLine(k=""){return new j({id:k,dividerType:F.gY.VerticalLine})}static verticalBlank(k=""){return new j({id:k,dividerType:F.gY.VerticalBlank})}}},900:(k,B,U)=>{"use strict";U.d(B,{_:()=>G});var F=U(49860);class G extends F.A{constructor(k){var B;super(k),this.selectOptions=k.selectOptions,this.selectValue=k.selectValue,this.readonly=null!==(B=k.readonly)&&void 0!==B&&B,this.onChange=k.onChange}static create(k){const B=k.selectOptions.length>0&&"string"==typeof k.selectOptions[0]?k.selectOptions.map((k=>({label:k,value:k}))):k.selectOptions;return new G(Object.assign(Object.assign({},k),{selectOptions:B}))}}},47681:(k,B,U)=>{"use strict";U.d(B,{H:()=>G});var F=U(49860);class G extends F.A{constructor(k){super(k),this.path=k.path,this.onChange=k.onChange,this.allowedExtensions=k.allowedExtensions}static create(k){return new G(k)}}},46386:(k,B,U)=>{"use strict";U.d(B,{W:()=>G});var F=U(49860);class G extends F.A{constructor(k){var B;super(k),this.gameObjectGuid=k.gameObjectGuid,this.readonly=null!==(B=k.readonly)&&void 0!==B&&B,this.onChange=k.onChange}static create(k){return new G(k)}}},31042:(k,B,U)=>{"use strict";U.d(B,{A:()=>G});var F=U(49860);class G extends F.A{constructor(k){super(k),this.guid=k.guid,this.onChange=k.onChange}static create(k){return new G(k)}}},42149:(k,B,U)=>{"use strict";U.d(B,{b:()=>G});var F=U(49860);class G extends F.A{constructor(k){super(k),this.message=k.message.replace(/\n/gm," "),this.iconType=k.iconType}static create(k){return new G(k)}}},56761:(k,B,U)=>{"use strict";U.d(B,{f:()=>G});var F=U(49860);class G extends F.A{constructor(k){var B;super(k),this.label=k.labelValue,this.value=k.inputValue,this.type=k.inputType,this.onChange=k.onChange,this.updateMode=k.inputUpdateMode,this.readOnly=k.readonly,this.showDeleteButton=null!==(B=k.showDeleteButton)&&void 0!==B&&B}static create(k){return new G(k)}}},49860:(k,B,U)=>{"use strict";U.d(B,{A:()=>F});class F{constructor(k){var B,U;this.id=k.id,this.nodeSize=null!==(B=k.nodeSize)&&void 0!==B?B:"auto",this.propertyPath=k.propertyPath&&k.propertyPath.length>0?k.propertyPath:[this.id],this.style=null!==(U=k.style)&&void 0!==U?U:{}}static create(k){throw new Error("Implement the create function")}}},33431:(k,B,U)=>{"use strict";U.d(B,{l:()=>j});var F=U(5440),G=U(49860);class j extends G.A{constructor(k){var B,U,G;super(k),this.labelValue=k.labelValue,this.labelTooltip=null!==(B=k.labelTooltip)&&void 0!==B?B:"",this.labelPosition=null!==(U=k.labelPosition)&&void 0!==U?U:F.G5.Left,this.labelTextWrap=null!==(G=k.labelTextWrap)&&void 0!==G?G:F.K3.Wrap}static create(k){return new j(k)}}},76814:(k,B,U)=>{"use strict";U.d(B,{E:()=>G});var F=U(49860);class G extends F.A{constructor(k){super(k)}static create(k){return new G(k)}}},84893:(k,B,U)=>{"use strict";U.d(B,{N:()=>G});var F=U(49860);class G extends F.A{constructor(k){super(k),this.label=k.label,this.signalValue=k.signalValue,this.componentGUID=k.componentGUID}static create(k){return new G(k)}}},74786:(k,B,U)=>{"use strict";U.d(B,{Iq:()=>F.I,X9:()=>G.X,_L:()=>j._,_6:()=>$._,Hn:()=>H.H,WV:()=>W.W,bl:()=>q.b,fq:()=>K.f,ly:()=>z.l,T7:()=>X,Ny:()=>Y.N,IC:()=>Q});var F=U(140),G=U(32357),j=(U(1596),U(23664)),$=U(900),H=U(47681),V=U(49860);V.A;var W=U(46386);V.A;U(31042);var q=U(42149),K=U(56761),z=U(33431),Y=(U(76814),U(84893));class Q extends V.A{constructor(k){super(k),this.guid=k.guid,this.onChange=k.onChange}static create(k){return new Q(k)}}class X extends V.A{constructor(k){super(k),this.guid=k.guid,this.onChange=k.onChange}static create(k){return new X(k)}}},62131:(k,B,U)=>{"use strict";var F;U.d(B,{b:()=>F}),function(k){k.ConvertLegacyTransformButton="convertLegacyTransformButton",k.PreserveWorldPositionOnHierarchyChange="preserveWorldPositionOnHierarchyChange"}(F||(F={}))},5440:(k,B,U)=>{"use strict";var F,G,j,$,H,V,W;U.d(B,{AT:()=>$,G5:()=>F,JG:()=>W,K3:()=>G,VQ:()=>H,a2:()=>V,gY:()=>j}),function(k){k.Left="left",k.Right="right",k.Center="center"}(F||(F={})),function(k){k.None="none",k.Wrap="wrap"}(G||(G={})),function(k){k.HalfBlank="halfBlank",k.Blank="blank",k.Line="line",k.VerticalLine="verticalLine",k.VerticalBlank="verticalBlank"}(j||(j={})),function(k){k.Info="info",k.Warning="warning",k.Error="error",k.Verbose="verbose",k.Question="question"}($||($={})),function(k){k.Default="default",k.Highlight="highlight",k.Danger="danger",k.Prodigy="prodigy"}(H||(H={})),function(k){k.None="none",k.Eraser="eraser",k.Image="image",k.Pencil="pencil",k.Trash="trash",k.Bolt="bolt",k.Gear="gear",k.ArrowUp="arrow-up",k.ArrowDown="arrow-down",k.ArrowLeft="arrow-left",k.ArrowRight="arrow-right",k.Smiley="face-smile",k.FloppyDisk="floppy-disk",k.VolumeOn="volume",k.VolumeOff="volume-xmark",k.EyeOpen="eye",k.EyeClosed="eye-slash",k.Folder="folder",k.Copy="copy",k.Cut="scissors",k.Paste="paste",k.Play="play",k.Pause="pause",k.Stop="stop",k.Rewind="backward",k.FastForward="forward",k.Record="record-vinyl",k.StepForward="forward-step",k.StepBackward="backward-step",k.ArrowPointer="arrow-pointer",k.Add="plus",k.Spinner="spinner"}(V||(V={})),function(k){k.OnTheFly="onTheFly",k.Confirm="confirm"}(W||(W={}))},43234:(k,B,U)=>{"use strict";U.d(B,{P:()=>F,o:()=>j});var F,G=U(68910);!function(k){k[k.Add=0]="Add",k[k.Average=1]="Average",k[k.Darken=2]="Darken",k[k.Difference=3]="Difference",k[k.Exclusion=4]="Exclusion",k[k.Lighten=5]="Lighten",k[k.Multiply=6]="Multiply",k[k.Negation=7]="Negation",k[k.Phoenix=8]="Phoenix",k[k.Screen=9]="Screen",k[k.Subtract=10]="Subtract"}(F||(F={}));class j extends G.Filter{get tintIntensity(){return this.uniforms.tintIntensity}set tintIntensity(k){this.uniforms.tintIntensity=k}get alpha(){return this.uniforms.alpha}set alpha(k){this.uniforms.alpha=k}get blend(){return F[this.uniforms.blend]}set blend(k){this.uniforms.blend=k}get tintColor(){return G.Color.shared.setValue(this.uniforms.color).toRgbArray()}set tintColor(k){this.uniforms.color=k}constructor(k={}){const B=Object.assign(Object.assign({},j.defaultOptions),k);super(null,j.FRAGMENT_SHADER,{alpha:B.alpha,blend:B.blend,tintIntensity:B.tintIntensity,color:G.Color.shared.setValue(B.color).toRgbArray()})}}j.defaultOptions={color:111,tintIntensity:0,blend:F.Multiply,alpha:1},j.FRAGMENT_SHADER="\n precision mediump float;\n varying vec2 vTextureCoord;\n uniform sampler2D uSampler;\n uniform vec3 color;\n uniform float alpha;\n uniform float tintIntensity;\n uniform int blend;\n \n void main() {\n // set overall alpha on image first, we can affect children this way.\n vec4 processedColor = texture2D( uSampler, vTextureCoord ) * alpha;\n\n // apply tint\n if(tintIntensity>0.0){\n vec3 a = processedColor.rgb/processedColor.a;\n vec3 b = color;\n\n // blend modes\n if (blend == 0) { // add\n processedColor.rgb = min(a + b, vec3(1.0));\n } else if (blend == 1) { // average\n processedColor.rgb = (a + b) * 0.5;\n } else if (blend == 2) { // darken\n processedColor.rgb = min(a, b);\n } else if (blend == 3) { // difference\n processedColor.rgb = abs(a - b);\n } else if (blend == 4) { // exclusion\n processedColor.rgb = a + b - 2.0 * a * b;\n } else if (blend == 5) { // lighten\n processedColor.rgb = max(a, b);\n } else if (blend == 6) { // multiply\n processedColor.rgb = a * b;\n } else if (blend == 7) { // negation\n processedColor.rgb = vec3(1.0) - abs(vec3(1.0) - a - b);\n } else if (blend == 8) { // phoenix\n processedColor.rgb = min(a, b) - max(a, b) + vec3(1.0);\n } else if (blend == 9) { // screen\n processedColor.rgb = 1.0 - ((1.0 - a) * (1.0 - b));\n } else if (blend == 10) { // subtract\n processedColor.rgb = max(a + b - vec3(1.0), vec3(0.0));\n };\n processedColor.rgb = mix(a, processedColor.rgb, tintIntensity);\n processedColor.rgb*=processedColor.a;\n }\n\n // cleanup\n processedColor = clamp(processedColor, 0.0, 1.0);\n gl_FragColor = processedColor;\n }"},47131:(k,B,U)=>{"use strict";U.d(B,{d:()=>G});var F=U(40794);class G extends F.u{}},300:(k,B,U)=>{"use strict";U.d(B,{db:()=>Y,X2:()=>X,oW:()=>nt.o,Pz:()=>nt.P});var F=U(8674),G=U(68910),j=U(29658),$=U(823),H=U(47131);let V=class extends H.d{constructor(){super(...arguments),this.alpha=1}createFilter(){return new G.filters.AlphaFilter(this.alpha)}};(0,F.Cg)([(0,$.g1)(),(0,F.Sn)("design:type",Number)],V.prototype,"alpha",void 0),V=(0,F.Cg)([(0,j.EV)("AlphaFilter",j.YH.filter,"A component for a alpha filter")],V);var W=U(61806),q=U(5191),K=U(80267),z=U(32154);class Y{constructor(){this.filters=[]}bake(k){if(!z.A.isDefined(k))return K.V.log("No Texture provided for BakeStep",q.$.Error),null;if(k.width*k.height==0)return K.V.log("Texture in BakeTexture does not have a proper width or height",q.$.Error),null;Y._sprite.texture=k,Y._sprite.filters=this.filters,Y._sprite.width=k.width,Y._sprite.height=k.height,Y._sprite.position.set(0,0);const B={width:k.width,height:k.height},U=W.W.instance.game.renderer.generateTexture(Y._sprite,Object.assign({region:k.frame},B));return Y._sprite.texture=null,Y._sprite.filters=null,U}}Y._sprite=new G.Sprite;class Q{constructor(){this.decals=[]}bake(k){Q._sprite.texture=k;for(const U of this.decals)for(const k of U.transforms){const B=new G.Sprite(U.texture);Q._sprite.addChild(B),B.transform=k}const B=W.W.instance.game.renderer.generateTexture(Q._sprite);for(let U=Q._sprite.children.length-1;U>=0;U--)Q._sprite.children[U].destroy();return Q._sprite.texture=null,B}}Q._sprite=new G.Sprite;class X extends G.Texture{constructor(k,B=[]){super(k.baseTexture,k.frame,k.orig,k.trim,k.rotate,k.defaultAnchor),this.original=this.baseTexture,this.bakeSteps=B,this.bakeSteps.length&&this.bake()}bake(){this.baseTexture=this.original.castToBaseTexture();for(const k of this.bakeSteps)this.baseTexture=k.bake(this).baseTexture}addStep(k){this.bakeSteps.push(k),this.baseTexture=k.bake(this).baseTexture}destroy(k){this.original.dispose(),k&&this.original.destroy(),this.bakeSteps=[],super.destroy(k)}}var Z=U(53924),J=U(26731),tt=U(15887),et=U(32928);class it extends J.${generate(k,B){const U=et.G.numberGroup({id:"strength",labelValue:"strength",inputValue:k.strength}),F=et.G.numberGroup({id:"quality",labelValue:"quality",inputValue:k.quality}),G=et.G.numberGroup({id:"resolution",labelValue:"resolution",inputValue:k.resolution}),j=et.G.dropdownGroup({id:"kernelSize",labelValue:"kernelSize",selectOptions:[5,7,9,11,13,15].map((k=>({label:k.toString(),value:k}))),selectValue:k.kernelSize});return tt.X.createVertical([U,F,G,j])}}let st=class extends H.d{constructor(){super(...arguments),this.strength=8,this.quality=4,this.resolution=G.settings.FILTER_RESOLUTION,this.kernelSize=5}createFilter(){return new G.filters.BlurFilter(this.strength,this.quality,this.resolution,this.kernelSize)}};(0,F.Cg)([(0,$.g1)(),(0,F.Sn)("design:type",Number)],st.prototype,"strength",void 0),(0,F.Cg)([(0,$.g1)(),(0,F.Sn)("design:type",Number)],st.prototype,"quality",void 0),(0,F.Cg)([(0,$.g1)(),(0,F.Sn)("design:type",Number)],st.prototype,"resolution",void 0),(0,F.Cg)([(0,$.g1)(),(0,F.Sn)("design:type",Number)],st.prototype,"kernelSize",void 0),st=(0,F.Cg)([(0,j.EV)("BlurFilter",j.YH.filter,"A component for a blur filter"),(0,Z.W)(it)],st);var nt=U(43234);class at extends G.Filter{get y(){return this.uniforms.ySample}set y(k){this.uniforms.ySample=k}get LUT(){return this.uniforms.uLUT}set LUT(k){this.uniforms.uLUT=k}constructor(k,B=.5){super(null,at.fragmentShader,{ySample:B,uLUT:null!=k?k:G.Texture.WHITE})}}at.fragmentShader="\n precision mediump float;\n varying vec2 vTextureCoord;\n uniform sampler2D uSampler;\n uniform sampler2D uLUT;\n uniform float ySample;\n \n void main() {\n vec4 c = texture2D( uSampler, vTextureCoord );\n vec4 l = texture2D( uLUT, vec2(c.r/c.a, ySample) );\n c.rgb = l.rgb;\n c.rgb *= c.a;\n gl_FragColor = c;\n }";var rt=U(37692);let ot=class extends H.d{constructor(){super(...arguments),this.replacementArray=[],this.tolerance=.05,this.maxColors=null}createFilter(){return new rt.N(this.replacementArray,this.tolerance,this.maxColors)}};(0,F.Cg)([(0,$.SZ)(),(0,F.Sn)("design:type",Array)],ot.prototype,"replacementArray",void 0),(0,F.Cg)([(0,$.g1)(),(0,F.Sn)("design:type",Number)],ot.prototype,"tolerance",void 0),(0,F.Cg)([(0,$.g1)(),(0,F.Sn)("design:type",Number)],ot.prototype,"maxColors",void 0),ot=(0,F.Cg)([(0,j.EV)("ColorReplaceFilter",j.YH.filter)],ot);class ht extends G.Filter{get y(){return this.uniforms.ySample}set y(k){this.uniforms.ySample=k}get LUT(){return this.uniforms.uLUT}set LUT(k){this.uniforms.uLUT=k}constructor(k,B=.5){super(null,ht.fragmentShader,{ySample:B,uLUT:null!=k?k:G.Texture.WHITE})}}ht.fragmentShader="\n precision mediump float;\n varying vec2 vTextureCoord;\n uniform sampler2D uSampler;\n uniform sampler2D uLUT;\n uniform float ySample;\n \n void main() {\n vec4 c = texture2D( uSampler, vTextureCoord );\n c.rgb /= c.a;\n c.r = texture2D( uLUT, vec2(c.r, ySample) ).r;\n c.g = texture2D( uLUT, vec2(c.g, ySample) ).g;\n c.b = texture2D( uLUT, vec2(c.b, ySample) ).b;\n c.rgb *= c.a;\n gl_FragColor = c;\n }";let ct=class extends H.d{constructor(){super(...arguments),this.noise=.5,this.seed=1}createFilter(){return new G.filters.NoiseFilter(this.noise,this.seed)}};(0,F.Cg)([(0,$.g1)(),(0,F.Sn)("design:type",Number)],ct.prototype,"noise",void 0),(0,F.Cg)([(0,$.g1)(),(0,F.Sn)("design:type",Number)],ct.prototype,"seed",void 0),ct=(0,F.Cg)([(0,j.EV)("NoiseFilter",j.YH.filter,"A component for a noise filter")],ct)},62459:(k,B,U)=>{"use strict";U.d(B,{rcl:()=>$e,BKH:()=>Xi,CLt:()=>Q.CL,IqD:()=>xe.Iq,lv2:()=>Q.lv,dbg:()=>Fe.db,X2n:()=>Fe.X2,oWr:()=>Fe.oW,dTp:()=>is,jsv:()=>Ui.j,OQO:()=>Lt,J6z:()=>Q.J6,a2l:()=>Tt.a2,X9M:()=>xe.X9,l2R:()=>Q.l2,r05:()=>Q.r0,i7d:()=>Q.i7,YPZ:()=>Q.YP,kBN:()=>qt,jlt:()=>Q.jl,ESH:()=>yo,Q1f:()=>Q.Q1,TZp:()=>Rt,uAl:()=>Q.uA,XFX:()=>Q.XF,AY_:()=>nn,Crq:()=>ns,oDK:()=>Q.oD,mcf:()=>Q.mc,Fid:()=>wi,$KW:()=>gt.$,nvu:()=>zr,o5U:()=>Bt.o,_Lw:()=>xe._L,DX_:()=>Q.DX,_6c:()=>xe._6,iO0:()=>es,PzZ:()=>Fe.Pz,yQ0:()=>Q.yQ,YH6:()=>Q.YH,Z$z:()=>hs.Z$,dBt:()=>Jt,EQV:()=>ee,vLr:()=>te,DEw:()=>Zi,If$:()=>se,t5G:()=>z,ZIW:()=>Li,$Zn:()=>Ps,e$E:()=>Q.e$,bJb:()=>hs.bJ,ba$:()=>Q.b,iXQ:()=>dr,KZk:()=>or,GS3:()=>Q.GS,bTj:()=>Q.bT,RQr:()=>Ut.R,sVA:()=>Q.sV,rPI:()=>mi,zL:()=>gi,CQn:()=>ii,myN:()=>ur,wvl:()=>mt,Hnb:()=>xe.Hn,wIr:()=>Q.wI,YAt:()=>Q.YA,W$e:()=>Q.W$,Zt2:()=>Q.Zt,$Bt:()=>Y,_mx:()=>Q._m,bE_:()=>Ei.b,WzQ:()=>Q.Wz,WVg:()=>xe.WV,Htv:()=>Ft,mk0:()=>Q.mk,KDe:()=>ro,Ff4:()=>Gt,vYh:()=>ge,JTA:()=>Qi,Sz7:()=>ts,wGs:()=>On,ATc:()=>Tt.AT,bl1:()=>xe.bl,s3P:()=>Di,JTX:()=>Ii,Uoy:()=>jt.U,Eci:()=>ki,Sjx:()=>Q.Sj,fqe:()=>xe.fq,JGO:()=>Tt.JG,XRp:()=>yt.X,PQK:()=>Oi,rrh:()=>_i.r,AA4:()=>gr,UvC:()=>vr,XKG:()=>fr,_A9:()=>br,ly:()=>xe.ly,I6z:()=>Do.I,PEP:()=>Yi.P,K16:()=>Q.K1,mZY:()=>hn,Oap:()=>ss,$bb:()=>J.$,VyI:()=>Z.V,cj9:()=>Q.cj,E1D:()=>Ln.E1,pV3:()=>Rn,iyL:()=>Er,uFJ:()=>Tr,m$y:()=>Sr,wPU:()=>Ar,nbL:()=>qr,ibt:()=>Cr,d53:()=>Or,s1c:()=>Ir,Ayx:()=>Kr,Qgu:()=>Rr,ZxM:()=>Pr,mYY:()=>Mr,CIs:()=>Nr,f84:()=>xr,Lzo:()=>Lr,hQR:()=>kr,U8B:()=>jr,l_K:()=>$r,l28:()=>Dr,okU:()=>Wr,KhP:()=>Mn,lx6:()=>wo,C1c:()=>Wt.C,Uuu:()=>sn,wNP:()=>Jr,T7t:()=>xe.T7,iNH:()=>Xr,sG1:()=>en,H12:()=>no,Egh:()=>Kt,LkC:()=>hs.Lk,bsf:()=>Q.bs,XVE:()=>Q.XV,M_G:()=>Q.M_,Lom:()=>To,y4o:()=>Pt.y,bnh:()=>zt.b,v14:()=>Qt,aSj:()=>Yt,pH6:()=>So,Tyz:()=>ct,ey1:()=>at,eXg:()=>nt,wa5:()=>st.w,Mnj:()=>Xt,HN0:()=>Q.HN,NyS:()=>xe.Ny,or0:()=>Ln.or,hQi:()=>Ao,CxD:()=>Fi,V09:()=>Io,qFr:()=>Q.qF,xTJ:()=>cr,Nj:()=>ne.N,v2j:()=>Gr.v,a5k:()=>uo,ICs:()=>xe.IC,E3R:()=>ae.E,Ee5:()=>rn,uFU:()=>xt,Phd:()=>Sn,i4g:()=>ws,DXe:()=>rs,tJn:()=>Tn,w4d:()=>us,Gme:()=>It.G,EYj:()=>re,BSH:()=>Cs,gXL:()=>Q.gX,Kfn:()=>Q.Kf,dLy:()=>Q.dL,zFe:()=>xi,Kak:()=>Q.K,Aq$:()=>it.A,I9Y:()=>Ln.I9,u1k:()=>pr,ba9:()=>Ve,nKb:()=>hs.nK,Bak:()=>W.B,EVk:()=>Q.EV,s0Z:()=>Q.s0,WR4:()=>Q.WR,i0J:()=>hs.i0,GO0:()=>Q.GO,aw3:()=>Q.aw,xkT:()=>$t.x,DTs:()=>Q.DT,Cdj:()=>Ai,IJn:()=>Ti,vQZ:()=>Si,fFd:()=>Ci,lu3:()=>hs.lu,x4W:()=>Q.x4,Og1:()=>Q.Og,Lr6:()=>hs.Lr,okD:()=>hs.ok,Pqz:()=>hs.Pq,SZi:()=>hs.SZ,vkK:()=>hs.vk,iEU:()=>hs.iE,MnK:()=>hs.Mn,gfw:()=>hs.gf,ERr:()=>hs.ER,npj:()=>hs.np,vCS:()=>hs.vC,tW2:()=>hs.tW,Mts:()=>hs.Mt,g11:()=>hs.g1,OmD:()=>hs.Om,g8Q:()=>hs.g8,bbQ:()=>hs.bb,W_S:()=>hs.W_,_Hz:()=>hs._H,Wf4:()=>Q.Wf,V84:()=>kt,YLv:()=>hs.YL,S1F:()=>Q.S1,tfT:()=>hs.tf});var F={};U.r(F),U.d(F,{Decoder:()=>Za,Encoder:()=>Qa,PacketType:()=>Ya,protocol:()=>za});var G,j=U(8674),$=U(40794),H=U(29658),V=U(61806),W=U(41444),q=U(823);let K=G=class extends $.u{constructor(){super(...arguments),this._sound=null,this._key="",this._startTime=0,this._duration=0,this._playOnAwake=!1,this._stopOnDestroy=!1,this._volume=1,this._loop=!1,this._pausedWhenHidden=!1}set key(k){this._key=k,this.createSound()}get key(){return this._key}set volume(k){this._volume=k}get volume(){return this._volume}set loop(k){this._loop=k}get loop(){return this._loop}get isPlaying(){return!!this._sound&&this._sound.isPlaying}create(){super.create(),this.createSound(),this._playOnAwake&&this.play(),this.handlePauseOnEvent=this.handlePauseOnEvent.bind(this),G.PAUSE_ON_EVENTS.forEach((k=>{document.addEventListener(k,this.handlePauseOnEvent)}))}handlePauseOnEvent(){var k;document.hidden?(null===(k=this._sound.sound)||void 0===k?void 0:k.paused)||(this._pausedWhenHidden=!0,this._sound.pause()):this._pausedWhenHidden&&(this._pausedWhenHidden=!1,this._sound.resume())}createSound(){this._key&&(this._sound=V.W.instance.game.sound.add(this._key,this.volume,this.loop))}play(k=null){if(this._sound){let B=null;this._duration>0&&(B="play",this._sound.addMarker(B,this._startTime,this._duration)),this._sound.volume=this.volume,this._sound.loop=this.loop,this._sound.play(B,k)}}pause(){this._sound&&this._sound.pause()}resume(){this._sound&&this._sound.resume()}stop(){this._sound&&this._sound.stop()}destroy(){var k;this._sound&&((null===(k=this._sound.sound)||void 0===k?void 0:k.sprites.play)&&this._sound.removeMarker("play"),this._stopOnDestroy&&this.stop()),this._sound=null,G.PAUSE_ON_EVENTS.forEach((k=>{document.removeEventListener(k,this.handlePauseOnEvent)})),super.destroy()}};var z,Y;K.PAUSE_ON_EVENTS=["visibilitychange","webkitvisibilitychange","mozvisibilitychange","msvisibilitychange"],(0,j.Cg)([(0,W.B)(),(0,q.W_)(),(0,j.Sn)("design:type",String)],K.prototype,"_key",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],K.prototype,"_startTime",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],K.prototype,"_duration",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],K.prototype,"_playOnAwake",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],K.prototype,"_stopOnDestroy",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],K.prototype,"_volume",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],K.prototype,"_loop",void 0),K=G=(0,j.Cg)([(0,H.EV)("Sound",H.YH.root,"Lowest level audio component")],K),function(k){k.PrefabService="PrefabService",k.PrefabDataProvider="PrefabDataProvider",k.AssetLoader="AssetLoader",k.FrameWorkManager="FrameWorkManager"}(z||(z={})),function(k){k.IFSMController="IFSMController",k.FSMFactories="FSMFactories",k.FSMDataProvider="FSMDataProvider",k.FSMService="FSMService",k.LocalizationData="LocalizationData",k.LocalizationService="LocalizationService",k.LoggerService="LoggerService"}(Y||(Y={}));var Q=U(86787),X=U(57056),Z=U(80267),J=U(5191),tt=U(95891);class et{constructor(){this._bitFieldArray=[],this._bitLength=0}static fromBase64(k){const B=k.length,U=new et;U.reserveSize(B*et.BITS_PER_BASE64_CHAR);let F=0;for(let G=0;G=this._bitLength)&&this.getUnchecked(k)}set(k,B){this.reserveSize(k+1),this.setUnchecked(k,B)}getUnchecked(k){const B=Math.floor(k/et.BITS_PER_FIELD),U=1<=0?G:F.push(B)-1}getBitField(){var k,B;return null!==(k=this._bitField)&&void 0!==k?k:this._bitField=et.fromBase64(null!==(B=this.baseGetData())&&void 0!==B?B:"")}getBitIndex(k){const B=this._registeredComponents.indexOf(k);return B<0&&Z.V.log(`No component is registered for guid ${k}. Re-saving the prefab may fix this problem.`,J.$.Error),B}};(0,j.Cg)([(0,X.D)(),(0,q.SZ)(),(0,q.W_)(),(0,j.Sn)("design:type",Array)],ot.prototype,"_registeredComponents",void 0),ot=(0,j.Cg)([(0,H.EV)("BitFieldSaveData",H.YH.saving,"Reads and writes bits to a datastore using its guid as a key")],ot);let ht=class extends $.u{setBit(k){this._bitFieldSaveDataComponent.setBit(this._index,k)}getBit(){return this._bitFieldSaveDataComponent.getBit(this._index)}static customSerialize(k,B,U){super.customSerialize(k,B,U);const F=U.getComponentPropertyValue(k.guid,"bitFieldSaveDataComponent");F?k.properties.index=ot.registerComponent(U.getNormalizedComponentByGuid(F),k.guid):Z.V.log("BitFieldBitComponent has no bitFieldSaveDataComponent set.",J.$.Warning)}};(0,j.Cg)([(0,q.g8)(ot),(0,j.Sn)("design:type",ot)],ht.prototype,"_bitFieldSaveDataComponent",void 0),(0,j.Cg)([(0,X.D)(),(0,q.g1)(),(0,j.Sn)("design:type",Number)],ht.prototype,"_index",void 0),ht=(0,j.Cg)([(0,H.EV)("BitFieldBit",H.YH.saving,"Represents one bit of the bit field save data")],ht);let ct=class extends rt{setData(k){this.baseSetData(k)}getData(){return this.baseGetData()}};ct=(0,j.Cg)([(0,H.EV)("SaveData",H.YH.saving,"Reads and writes data to a datastore using its guid as a key")],ct);var dt=U(68910),lt=U(57530),ut=U(39002),ft=U(563),bt=U(64527),pt=U(27179);class vt{static drawTransformDirectionVectors(k,B,U={}){const F=tt.merge(vt.DEFAULT_TRANSFORM_DIRECTION_VECTOR_STYLE,U),G=new dt.Matrix;if(G.copyFrom(k.worldMatrix),F.drawRightVector){const k=new pt.I(G.a,G.c);k.normalize(),vt.drawDirectionVector(new pt.I(G.tx,G.ty),k,B,F.rightVectorStyle)}if(F.drawUpVector){const k=new pt.I(G.b,G.d);k.normalize(),vt.drawDirectionVector(new pt.I(G.tx,G.ty),k,B,F.upVectorStyle)}}static drawDirectionVector(k,B,U,F={}){const G=tt.merge(vt.DEFAULT_DIRECTION_VECTOR_STYLE,F);vt.drawArrow(new pt.I(k.x+B.x*(F.arrowHeightPx+F.bodyHeightPx),k.y+B.y*(F.arrowHeightPx+F.bodyHeightPx)),ut.c.radiansToDegrees(Math.atan2(B.y,B.x)),U,G)}static drawTransformAnchor(k,B,U={}){const F=tt.merge(vt.DEFAULT_TRANSFORM_ANCHOR_STYLE,U),G=this.calculateTransformPosition(k);"square"===F.shapeType&&(G.x-=.5*F.shape.sizePx,G.y-=.5*F.shape.sizePx),B.beginFill(F.shape.fill.color,F.shape.fill.alpha),"circle"===F.shapeType?B.drawCircle(G.x,G.y,F.shape.sizePx):B.drawRect(G.x,G.y,F.shape.sizePx,F.shape.sizePx),B.endFill(),F.shape.outline&&F.shape.outline.thicknessPx>0&&(B.lineStyle(F.shape.outline.thicknessPx,F.shape.outline.color,F.shape.outline.alpha),"circle"===F.shapeType?B.drawCircle(G.x,G.y,F.shape.sizePx):B.drawRect(G.x,G.y,F.shape.sizePx,F.shape.sizePx),B.lineStyle(0))}static calculateTransformPosition(k,B=!0){const U=new dt.Matrix;return U.copyFrom(k.worldMatrix),B&<.i.main&&U.prepend(lt.i.main.viewMatrix),new pt.I(U.tx,U.ty)}static drawRectTransformOutline(k,B,U={},F=!0){const G=tt.merge(vt.DEFAULT_RECT_TRANSFORM_OUTLINE_STYLE,U),j=this.calculateRectTransformCorners(k,F);B.lineStyle(G.thicknessPx,G.color,G.alpha),B.moveTo(j[0].x,j[0].y),B.lineTo(j[1].x,j[1].y),B.lineTo(j[2].x,j[2].y),B.lineTo(j[3].x,j[3].y),B.lineTo(j[0].x,j[0].y),B.lineStyle(0)}static drawRectTransformCorners(k,B,U={},F=!0){const G=tt.merge(vt.DEFAULT_RECT_TRANSFORM_OUTLINE_STYLE,U),j=this.calculateRectTransformCorners(k,F);this.drawArrow(j[0],45,B,{fill:G},F),this.drawArrow(j[1],135,B,{fill:G},F),this.drawArrow(j[2],225,B,{fill:G},F),this.drawArrow(j[3],315,B,{fill:G},F)}static calculateRectTransformCorners(k,B=!0){const U=k.rectTransformDimensions,F=[new dt.Point(-U.width*k.pivot.x,-U.height*k.pivot.y),new dt.Point(U.width*(1-k.pivot.x),-U.height*k.pivot.y),new dt.Point(U.width*(1-k.pivot.x),U.height*(1-k.pivot.y)),new dt.Point(-U.width*k.pivot.x,U.height*(1-k.pivot.y))],G=new dt.Matrix;G.copyFrom(k.worldMatrix),B&<.i.main&&G.prepend(lt.i.main.viewMatrix);for(let j=0;j<4;++j)F[j]=G.apply(F[j]);return F}static drawRectTransformAnchors(k,B,U={},F=!0){const G=tt.merge(vt.DEFAULT_TRIANGLE_STYLE,{widthPx:8,heightPx:18},U);let j=bt.o.ZERO,$=0;const H=new dt.Matrix;k.GameObject.parent&&k.GameObject.parent.transform&&(k.GameObject.parent.transform instanceof ft.X&&(j=k.GameObject.parent.transform.rectTransformDimensions),$=Math.atan2(k.GameObject.parent.transform.worldMatrix.b,k.GameObject.parent.transform.worldMatrix.d)*(180/Math.PI),H.copyFrom(k.GameObject.parent.transform.worldMatrix));const V=new bt.o(j.width*(k.anchorMax.x-k.anchorMin.x),j.height*(k.anchorMax.y-k.anchorMin.y)),W=new pt.I(k.localMatrix.tx-V.width*k.pivot.x,k.localMatrix.ty-V.height*k.pivot.y),q=new pt.I(k.localMatrix.tx+V.width*(1-k.pivot.x),k.localMatrix.ty+V.height*(1-k.pivot.y));q.x-=k.localPosition.x,q.y-=k.localPosition.y,W.x-=k.localPosition.x,W.y-=k.localPosition.y,vt.drawTriangle(H.apply(new pt.I(q.x,q.y)),$-50,B,G,F),vt.drawTriangle(H.apply(new pt.I(W.x,q.y)),$+50,B,G,F),vt.drawTriangle(H.apply(new pt.I(q.x,W.y)),$-130,B,G,F),vt.drawTriangle(H.apply(new pt.I(W.x,W.y)),$+130,B,G,F)}static drawArrow(k,B,U,F={},G=!0){const j=tt.merge(vt.DEFAULT_ARROW_STYLE,F),$=[new dt.Point(0,0),new dt.Point(-j.arrowHeightPx,.5*j.arrowWidthPx),new dt.Point(-j.arrowHeightPx,-.5*j.arrowWidthPx),new dt.Point(-j.arrowHeightPx,-.5*j.bodyWidthPx),new dt.Point(-j.arrowHeightPx,.5*j.bodyWidthPx),new dt.Point(-j.arrowHeightPx-j.bodyHeightPx,-.5*j.bodyWidthPx),new dt.Point(-j.arrowHeightPx-j.bodyHeightPx,.5*j.bodyWidthPx)],H=new dt.Matrix;H.rotate(ut.c.degreesToRadians(B)),H.translate(k.x,k.y),G&<.i.main&&H.prepend(lt.i.main.viewMatrix);const V=$.length;for(let W=0;W0&&(U.lineStyle(F.outline.thicknessPx,F.outline.color,F.outline.alpha),U.drawPolygon([...H,new dt.Point($.x,$.y)]),U.lineStyle(0))}}vt.DEFAULT_TRANSFORM_ANCHOR_STYLE={shapeType:"circle",shape:{sizePx:20,fill:{color:16777215,alpha:.4},outline:{color:16777215,alpha:1,thicknessPx:2}}},vt.DEFAULT_ARROW_STYLE={fill:{color:16777215,alpha:1},arrowWidthPx:20,arrowHeightPx:10,bodyHeightPx:30,bodyWidthPx:5},vt.DEFAULT_TRANSFORM_DIRECTION_VECTOR_STYLE={drawRightVector:!0,rightVectorStyle:{fill:{color:16711680,alpha:1},arrowWidthPx:15,arrowHeightPx:10,bodyWidthPx:5,bodyHeightPx:30},drawUpVector:!0,upVectorStyle:{fill:{color:65280,alpha:1},arrowWidthPx:15,arrowHeightPx:10,bodyWidthPx:5,bodyHeightPx:30}},vt.DEFAULT_DIRECTION_VECTOR_STYLE={arrowWidthPx:15,arrowHeightPx:10,bodyWidthPx:5,bodyHeightPx:30,fill:{color:16777215,alpha:1}},vt.DEFAULT_RECT_TRANSFORM_OUTLINE_STYLE={thicknessPx:2,color:16777215,alpha:1},vt.DEFAULT_TRIANGLE_STYLE={fill:{color:16777215,alpha:1},outline:null,widthPx:15,heightPx:20};U(81071),U(97573);var gt=U(26731);class mt{initialize(k,B){this._fileGuid=k,this._editorAPI=B}}var yt=U(15887),_t=U(53924),Et=U(32357),wt=U(56761),Tt=U(5440);class St extends gt.${generate(k,B){const U=[];return U.push(this.generateGrid(4,3)),U.push(this.generateStaggeredRows()),U.push(this.generateStaggeredGrid()),yt.X.createVertical(U)}generateGrid(k,B){const U=[];for(let F=0;F0?G.push(It.G.dropdownGroup({id:"font",labelValue:"Font",selectValue:k.font,selectOptions:j})):G.push(It.G.enumGroup({id:"font",labelValue:"Font",selectValue:k.font},Jt)),G.push(It.G.enumGroup({id:"fontStyle",labelValue:"Style",selectValue:k.fontStyle},ee)),G.push(It.G.enumGroup({id:"fontWeight",labelValue:"Weight",selectValue:k.fontWeight},te)),G.push(It.G.textGroup({id:"fontSize",inputValue:k.fontSize>0?`${k.fontSize}`:"",labelValue:"Size",onChange:(k,B)=>{let U=parseInt(B);(isNaN(U)||U<0)&&(U=0),this._editorAPI.modifyComponent(this._componentGuid,{fontSize:U})}})),F.push(yt.X.createVertical(G,{isContainer:!0,title:`Font '${k.font}' (${k.fontSize})`,isCollapsible:!0}));const $=[];if($.push(It.G.checkboxGroup({id:"smooth",labelValue:"Smooth",inputValue:k.smooth,labelTooltip:"When true, sets scale mode to linear. Reduces pixelation but can cause blurriness."})),$.push(It.G.checkboxGroup({id:"roundPixels",labelValue:"Round Pixels",inputValue:k.roundPixels,labelTooltip:"When true, rounds the pixel values when rendering."})),$.push(It.G.enumGroup({id:"blendMode",labelValue:"Blend Mode",selectValue:k.blendMode},dt.BLEND_MODES)),$.push(It.G.colorPickerGroup({id:"tint",labelValue:"Tint",inputValue:k.tint})),$.push(It.G.numberGroup({id:"strokeThickness",labelValue:"Stroke Thickness",inputValue:k.strokeThickness})),k.strokeThickness>0&&$.push(It.G.colorPickerGroup({id:"stroke",labelValue:"Stoke Color",inputValue:k.stroke})),$.push(It.G.checkboxGroup({id:"underline",labelValue:"Underline",inputValue:k.underline})),k.underline){const B=[];B.push(It.G.numberGroup({id:"underlineStartIndex",labelValue:"Start Index",inputValue:k.underlineStartIndex})),B.push(It.G.numberGroup({id:"underlineEndIndex",labelValue:"End Index",inputValue:k.underlineEndIndex})),$.push(yt.X.createVertical(B,{isContainer:!0}))}if($.push(It.G.checkboxGroup({id:"dropShadow",labelValue:"Drop Shadow",inputValue:k.dropShadow})),k.dropShadow){const B=[];B.push(It.G.numberGroup({id:"dropShadowAlpha",labelValue:"Alpha",inputValue:k.dropShadowAlpha})),B.push(It.G.numberGroup({id:"dropShadowAngle",labelValue:"Angle",inputValue:k.dropShadowAngle})),B.push(It.G.colorPickerGroup({id:"dropShadowColor",labelValue:"Color",inputValue:k.dropShadowColor})),B.push(It.G.numberGroup({id:"dropShadowBlur",labelValue:"Blur",inputValue:k.dropShadowBlur})),B.push(It.G.numberGroup({id:"dropShadowDistance",labelValue:"Distance",inputValue:k.dropShadowDistance})),B.push(It.G.numberGroup({id:"dropShadowPadding",labelValue:"Padding",inputValue:k.dropShadowPadding})),$.push(yt.X.createVertical(B,{isContainer:!0}))}F.push(yt.X.createVertical($,{isContainer:!0,title:"Effects",isCollapsible:!0,startCollapsed:!1}));const H=[];if(k.scaleToFitRectTransform||H.push(It.G.checkboxGroup({id:"resizeRectTransform",labelValue:"Resize RectTransform",inputValue:k.resizeRectTransform})),k.resizeRectTransform||k.textOverflow&&k.textOverflowUseRectTransformSize||H.push(It.G.checkboxGroup({id:"scaleToFitRectTransform",labelValue:"Scale To Fit RectTransform",inputValue:k.scaleToFitRectTransform})),k.scaleToFitRectTransform||(H.push(It.G.checkboxGroup({id:"textOverflow",labelValue:"Text Overflow",inputValue:k.textOverflow})),k.textOverflow&&(H.push(It.G.checkboxGroup({id:"textOverflowUseRectTransformSize",labelValue:"Use RectTransform Size",inputValue:k.textOverflowUseRectTransformSize})),k.textOverflowUseRectTransformSize||H.push(It.G.numberGroup({id:"textOverflowWidth",labelValue:"Overflow Width",inputValue:k.textOverflowWidth})))),H.push(It.G.checkboxGroup({id:"wordWrap",labelValue:"Word Wrap",inputValue:k.wordWrap})),k.wordWrap){const B=[];B.push(It.G.checkboxGroup({id:"wrapToRectTransformWidth",labelValue:"Wrap To RectTransform Width",inputValue:k.wrapToRectTransformWidth})),k.wrapToRectTransformWidth||B.push(It.G.numberGroup({id:"wordWrapWidth",labelValue:"Width",inputValue:k.wordWrapWidth})),H.push(yt.X.createVertical(B,{isContainer:!0}))}return H.push(It.G.numberGroup({id:"lineSpacing",labelValue:"Line Spacing",inputValue:k.lineSpacing})),H.push(It.G.enumGroup({id:"align",labelValue:"Align",selectValue:k.align},se)),H.push(It.G.enumGroup({id:"boundsAlignH",labelValue:"Bounds Align H",selectValue:k.boundsAlignH},se)),H.push(It.G.enumGroup({id:"boundsAlignV",labelValue:"Bounds Align V",selectValue:k.boundsAlignV},ie)),H.push(It.G.vectorGroup({id:"padding",labelValue:"Padding",vectorValue:{x:k.paddingX,y:k.paddingY},xKey:"paddingX",yKey:"paddingY"})),F.push(yt.X.createVertical(H,{isContainer:!0,title:"Layout",isCollapsible:!0,startCollapsed:!1})),U.push(yt.X.createVertical(F,{isContainer:!0,title:"Advanced",isCollapsible:!0,startCollapsed:!0})),yt.X.createVertical(U)}}class Rt{static validateHTMLHexColor(k,B="#",U=!1){return new RegExp(`^${B}[A-Fa-f0-9]{6}${U?"|[A-Fa-f0-9]{8}":""}$`).test(k)}static decimalToHex(k,B="#",U=!1){return`${B}${k.toString(16).padStart(U?8:6,"0")}`}static hexToDecimal(k,B="#"){return parseInt(k.replace(B,""),16)}static rgbToHsv(k){const B=k.r/255,U=k.g/255,F=k.b/255,G=Math.max(B,U,F),j=G-Math.min(B,U,F);return 0===j?{h:0,s:0,v:G}:G===B?{h:(U-F)/j%6/6,s:j/G,v:G}:G===U?{h:((F-B)/j+2)/6,s:j/G,v:G}:{h:((B-U)/j+4)/6,s:j/G,v:G}}static hsvToRgb(k){const B=6*k.h;let U;U=B<0?B%6+6:B%6;const F=U-Math.floor(U),G=k.v*(1-k.s),j=k.v*(1-F*k.s),$=k.v*(1-(1-F)*k.s);let H;return H=U<1?{r:k.v,g:$,b:G}:U<2?{r:j,g:k.v,b:G}:U<3?{r:G,g:k.v,b:$}:U<4?{r:G,g:j,b:k.v}:U<5?{r:$,g:G,b:k.v}:{r:k.v,g:G,b:j},H.r=255*H.r|0,H.g=255*H.g|0,H.b=255*H.b|0,H}static rgbToXyz(k){let B=k.r/255,U=k.g/255,F=k.b/255;B=B>.04045?Math.pow((B+.055)/1.055,2.4):B/12.92,U=U>.04045?Math.pow((U+.055)/1.055,2.4):U/12.92,F=F>.04045?Math.pow((F+.055)/1.055,2.4):F/12.92;return{x:.49*B+.31*U+.2*F,y:.176*B+.812*U+.01*F,z:0*B+.01*U+.99*F}}static xyzToRgb(k){const B=k.x,U=k.y,F=k.z;let G=2.364*B-.896*U-.468*F,j=-.515*B+1.426*U+.088*F,$=.005*B-.014*U+1.009*F;return G=G>.0031308?1.055*Math.pow(G,1/2.4)-.055:12.92*G,j=j>.0031308?1.055*Math.pow(j,1/2.4)-.055:12.92*j,$=$>.0031308?1.055*Math.pow($,1/2.4)-.055:12.92*$,G=Math.min(Math.max(255*G|0,0),255),j=Math.min(Math.max(255*j|0,0),255),$=Math.min(Math.max(255*$|0,0),255),{r:G,g:j,b:$}}static xyzToLab(k){const B=k=>k>.008856?Math.cbrt(k):(903.3*k+16)/116;return{l:116*B(k.y/100)-16,a:500*(B(k.x/95.0489)-B(k.y/100)),b:200*(B(k.y/100)-B(k.z/108.884))}}static labToXyz(k){const B=6/29,U=k=>k>B?k*k*k:3*B*B*(k-4/29);return{x:95.0489*U((k.l+16)/116+k.a/500),y:100*U((k.l+16)/116),z:108.884*U((k.l+16)/116-k.b/200)}}static labToLch(k){return{l:k.l,c:Math.sqrt(k.a*k.a+k.b*k.b),h:Math.atan2(k.b,k.a)}}static lchToLab(k){return{l:k.l,a:k.c*Math.cos(k.h),b:k.c*Math.sin(k.h)}}static rgbToLch(k){return Rt.labToLch(Rt.xyzToLab(Rt.rgbToXyz(k)))}static lchToRgb(k){return Rt.xyzToRgb(Rt.labToXyz(Rt.lchToLab(k)))}static rgbInterpolate(k,B,U){return{r:k.r+(B.r-k.r)*U,g:k.g+(B.g-k.g)*U,b:k.b+(B.b-k.b)*U}}static circularInterpolate(k,B,U){let F,G=k,j=B,$=U,H=j-G;if(G>j){const k=j;j=G,G=k,H=-H,$=1-$}return H>.5?(G+=1,F=(G+$*(j-G))%1):F=G+$*H,F}static hsvInterpolate(k,B,U){const F=Rt.rgbToHsv(k),G=Rt.rgbToHsv(B),j=this.circularInterpolate(F.h,G.h,U),$=F.s+U*(G.s-F.s),H=F.v+U*(G.v-F.v);return Rt.hsvToRgb({h:j,s:$,v:H})}static lchInterpolate(k,B,U){const F=Rt.rgbToLch(k),G=Rt.rgbToLch(B),j=this.circularInterpolate(F.h,G.h,U),$=F.c+U*(G.c-F.c),H=F.l+U*(G.l-F.l);return Rt.lchToRgb({l:H,c:$,h:j})}static stringToRgb(k){const B=k.replace(/^#/,"");return{r:parseInt(B.substring(0,2),16)/255,g:parseInt(B.substring(2,4),16)/255,b:parseInt(B.substring(4,6),16)/255}}static rgbToNumber(k){return(k.r<<16)+(k.g<<8)+k.b}}var Pt=U(4697),Mt=U(15740);class Nt{constructor(){this.onTextChanged=new Mt.H}get OnTextChanged(){return this.onTextChanged}cleanUp(){this.onTextChanged.dispose()}}class xt extends Nt{constructor(k){super(),this.source=null,this.setText(k)}getText(){return this.source}setText(k){this.source=k,this.OnTextChanged.dispatch(this,k)}}class Lt{static areBitsSet(k,B){return(k&B)===B}static isBitSet(k,B){return Lt.areBitsSet(k,1<{}}var Bt=U(22070),Ut=U(62481);class Ft{static getWidth(k){if(k.legacyTransform)return k.legacyTransform.width;if(k.transform){const B=k.transform;if(B instanceof ft.X)return B.rectTransformDimensions.width}return 0}static getHeight(k){if(k.legacyTransform)return k.legacyTransform.height;if(k.transform){const B=k.transform;if(B instanceof ft.X)return B.rectTransformDimensions.height}return 0}}class Gt{static completeGenerator(k){let B;do{B=k.next()}while(!B.done);return B.value}static completeGeneratorAsync(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){if(B)return Gt.processGeneratorStepFrameWorkManager(k,B);let U;do{U=k.next()}while(!U.done);return U.value}))}static processGeneratorStepFrameWorkManager(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){return new Promise(((U,F)=>{B.awaitFreeTime((()=>{const B=k.next();return B.done&&U(B.value),B.done}),F)}))}))}}var jt=U(78178),$t=U(22494),Ht=U(32469),Vt=U(6e4);var Wt=U(71082);class qt{get promise(){return this._promise}get[Symbol.toStringTag](){return"CancelablePromise"}get cancelled(){return this._cancelled}constructor(k){this._cancelled=!1,this._promise=new Promise(k)}cancel(){this._cancelled=!0}then(k,B){return this._promise.then((B=>{if(!this._cancelled)return null==k?void 0:k(B)}),(k=>{if(!this._cancelled)return null==B?void 0:B(k)})),this}catch(k){return this._promise.catch((B=>{if(!this._cancelled)return null==k?void 0:k(B)})),this}}class Kt{static timeout(k){return(0,j.sH)(this,void 0,void 0,(function*(){return new Promise((B=>{window.setTimeout(B,k)}))}))}static cancelableTimeout(k){return new qt((B=>{window.setTimeout(B,k)}))}static autoRetry(k){return(0,j.sH)(this,arguments,void 0,(function*(k,B=3,U=100){let F=U;for(let j=0;jB.size?B:k,G=k.size>B.size?k:B;for(const j of F)G.has(j)&&U.add(j);return U}static getSymmetricDifference(k,B){const U=k.size>B.size?B:k,F=k.size>B.size?k:B,G=new Set(F);for(const j of U)G.has(j)?G.delete(j):G.add(j);return G}static isSuperset(k,B){for(const U of B)if(!k.has(U))return!1;return!0}static getDifference(k,B){const U=new Set(k);for(const F of B)U.delete(F);return U}static addAll(k,B){if(it.A.isDefined(B))for(const U of B)this.addEntry(k,U)}static addEntry(k,B){it.A.isDefined(B)&&k.add(B)}}var Zt,Jt,te,ee,ie,se,ne=U(21695),ae=(U(22300),U(548));!function(k){k.ABeeZee="ABeeZee",k.LuckiestGuy="Luckiest Guy",k.FredokaOne="Fredoka One",k.PaytoneOne="Paytone One"}(Jt||(Jt={})),function(k){k.Normal="normal",k.Lighter="lighter",k.Bold="bold",k.Bolder="bolder"}(te||(te={})),function(k){k.Normal="normal",k.Italic="italic",k.Oblique="oblique"}(ee||(ee={})),function(k){k.Bottom="bottom",k.Middle="middle",k.Top="top"}(ie||(ie={})),function(k){k.Left="left",k.Center="center",k.Right="right"}(se||(se={}));let re=Zt=class extends Pt.y{get TextObject(){return this.createTextObject(),this.textObject}set Source(k){this.isCreated?(null!==this.textSource&&this.textSource.OnTextChanged.removeAll(this),this.textSource=k,this.textSource.OnTextChanged.add(this.updateText,this),this.updateText()):this._preCreateCacheValues.text=k}get Source(){if(!this.isCreated){const k=this._preCreateCacheValues.text;return k&&k instanceof Nt?k:null}return this.textSource}set text(k){this.isCreated?this.Source instanceof xt&&this.Source.getText()===k||(this.Source=new xt(this.localize(k))):this._preCreateCacheValues.text=k}get text(){if(!this.isCreated){const k=this._preCreateCacheValues.text;return k?k instanceof Nt?k.getText():k:""}return this.TextObject.text}set font(k){this.isCreated?(this.textObject.style.fontFamily=k,this.handleTextOverflow()):this._preCreateCacheValues.fontFamily=k}get font(){var k;return this.isCreated?this.textObject.style.fontFamily:null!==(k=this._preCreateCacheValues.fontFamily)&&void 0!==k?k:""}set fontStyle(k){this.isCreated?(this.setInternalFontStyle(k),this.handleTextOverflow()):this._preCreateCacheValues.fontStyle=k}get fontStyle(){var k;return this.isCreated?this.TextObject.style.fontStyle:null!==(k=this._preCreateCacheValues.fontStyle)&&void 0!==k?k:ee.Normal}setInternalFontStyle(k){const B=""===k?ee.Normal:k;switch(B){case ee.Normal:case ee.Italic:case ee.Oblique:this.textObject.style.fontStyle=B;break;default:Z.V.log(`Font style '${B}' is not valid.`,J.$.Warning)}}set fontWeight(k){this.isCreated?(this.setInternalFontWeight(k),this.handleTextOverflow()):this._preCreateCacheValues.fontWeight=k}get fontWeight(){var k;return this.isCreated?this.TextObject.style.fontWeight:null!==(k=this._preCreateCacheValues.fontWeight)&&void 0!==k?k:te.Normal}setInternalFontWeight(k){switch(k){case te.Normal:case te.Lighter:case te.Bold:case te.Bolder:this.textObject.style.fontWeight=k;break;default:Z.V.log(`Font weight '${k}' is not valid.`,J.$.Warning)}}get fontSize(){var k;return this.isCreated?this._fontSize:null!==(k=this._preCreateCacheValues.fontSize)&&void 0!==k?k:1}set fontSize(k){this.isCreated?(this._fontSize=k,this.updateTextSize()):this._preCreateCacheValues.fontSize=k}set textObjectFontSize(k){this.isCreated?(this.setInternalTextObjectFontSize(k),this.handleTextOverflow()):this._preCreateCacheValues.fontSize=k}get textObjectFontSize(){var k;return this.isCreated?this.TextObject.style.fontSize:null!==(k=this._preCreateCacheValues.fontSize)&&void 0!==k?k:1}setInternalTextObjectFontSize(k){this.textObject.style.fontSize=k>0?k:1}set fill(k){this.isCreated?this.isValidColor(k)&&(this.textObject.style.fill=k):this._preCreateCacheValues.fill=k}get fill(){var k;return this.isCreated?this.TextObject.style.fill:null!==(k=this._preCreateCacheValues.fill)&&void 0!==k?k:""}set align(k){this.isCreated?this.textObject.style.align=k:this._preCreateCacheValues.align=k}get align(){var k;return this.isCreated?this.TextObject.style.align:null!==(k=this._preCreateCacheValues.align)&&void 0!==k?k:se.Center}set boundsAlignH(k){this.isCreated?(this._boundsAlignH=k,this.applyTextPivot()):this._preCreateCacheValues.boundsAlignH=k}get boundsAlignH(){var k;return this.isCreated?this._boundsAlignH:null!==(k=this._preCreateCacheValues.boundsAlignH)&&void 0!==k?k:se.Center}set boundsAlignV(k){this.isCreated?(this._boundsAlignV=k,this.applyTextPivot()):this._preCreateCacheValues.boundsAlignV=k}get boundsAlignV(){var k;return this.isCreated?this._boundsAlignV:null!==(k=this._preCreateCacheValues.boundsAlignV)&&void 0!==k?k:ie.Middle}set stroke(k){this.isCreated?this.isValidColor(k)&&(this.textObject.style.stroke=k):this._preCreateCacheValues.stroke=k}get stroke(){var k;return this.isCreated?this.TextObject.style.stroke:null!==(k=this._preCreateCacheValues.stroke)&&void 0!==k?k:""}set strokeThickness(k){this.isCreated?this.textObject.style.strokeThickness=k:this._preCreateCacheValues.strokeThickness=k}get strokeThickness(){var k;return this.isCreated?this.TextObject.style.strokeThickness:null!==(k=this._preCreateCacheValues.strokeThickness)&&void 0!==k?k:0}set wordWrap(k){this.isCreated?this.textObject.style.wordWrap=k:this._preCreateCacheValues.wordWrap=k}get wordWrap(){var k;return this.isCreated?this.TextObject.style.wordWrap:null!==(k=this._preCreateCacheValues.wordWrap)&&void 0!==k&&k}set wordWrapWidth(k){this.isCreated?this.textObject.style.wordWrapWidth=k:this._preCreateCacheValues.wordWrapWidth=k}get wordWrapWidth(){var k;return this.isCreated?this.TextObject.style.wordWrapWidth:null!==(k=this._preCreateCacheValues.wordWrapWidth)&&void 0!==k?k:0}set wrapToRectTransformWidth(k){this.isCreated?(this._wrapToRectTransformWidth=k,this.updateWrapToRectTransform()):this._preCreateCacheValues.wrapToRectTransformWidth=k}get wrapToRectTransformWidth(){var k;return this.isCreated?this._wrapToRectTransformWidth:null!==(k=this._preCreateCacheValues.wrapToRectTransformWidth)&&void 0!==k&&k}set blendMode(k){this.isCreated?this.TextObject.blendMode=k:this._preCreateCacheValues.blendMode=k}get blendMode(){var k;return this.isCreated?this.TextObject.blendMode:null!==(k=this._preCreateCacheValues.blendMode)&&void 0!==k?k:dt.BLEND_MODES.NORMAL}set lineSpacing(k){this.isCreated?this.textObject.style.leading=k:this._preCreateCacheValues.leading=k}get lineSpacing(){var k;return this.isCreated?this.TextObject.style.leading:null!==(k=this._preCreateCacheValues.leading)&&void 0!==k?k:0}set paddingX(k){this._paddingX=k}get paddingX(){return this._paddingX}set paddingY(k){this._paddingY=k}get paddingY(){return this._paddingY}set dropShadow(k){this.isCreated?this.TextObject.style.dropShadow=k:this._preCreateCacheValues.dropShadow=k}get dropShadow(){var k;return this.isCreated?this.TextObject.style.dropShadow:null!==(k=this._preCreateCacheValues.dropShadow)&&void 0!==k&&k}set dropShadowAlpha(k){this.isCreated?this.TextObject.style.dropShadowAlpha=k:this._preCreateCacheValues.dropShadowAlpha=k}get dropShadowAlpha(){var k;return this.isCreated?this.TextObject.style.dropShadowAlpha:null!==(k=this._preCreateCacheValues.dropShadowAlpha)&&void 0!==k?k:0}set dropShadowAngle(k){this.isCreated?this.TextObject.style.dropShadowAngle=k:this._preCreateCacheValues.dropShadowAngle=k}get dropShadowAngle(){var k;return this.isCreated?this.TextObject.style.dropShadowAngle:null!==(k=this._preCreateCacheValues.dropShadowAngle)&&void 0!==k?k:0}set dropShadowColor(k){this.isCreated?this.isValidColor(k)&&(this.TextObject.style.dropShadowColor=k):this._preCreateCacheValues.dropShadowColor=k}get dropShadowColor(){var k;return this.isCreated?this.TextObject.style.dropShadowColor:null!==(k=this._preCreateCacheValues.dropShadowColor)&&void 0!==k?k:""}set dropShadowBlur(k){this.isCreated?this.TextObject.style.dropShadowBlur=k:this._preCreateCacheValues.dropShadowBlur=k}get dropShadowBlur(){var k;return this.isCreated?this.TextObject.style.dropShadowBlur:null!==(k=this._preCreateCacheValues.dropShadowBlur)&&void 0!==k?k:0}set dropShadowDistance(k){this.isCreated?this.TextObject.style.dropShadowDistance=k:this._preCreateCacheValues.dropShadowDistance=k}get dropShadowDistance(){var k;return this.isCreated?this.TextObject.style.dropShadowDistance:null!==(k=this._preCreateCacheValues.dropShadowDistance)&&void 0!==k?k:0}set dropShadowPadding(k){this.isCreated?this.TextObject.style.padding=k:this._preCreateCacheValues.padding=k}get dropShadowPadding(){var k;return this.isCreated?this.TextObject.style.padding:null!==(k=this._preCreateCacheValues.padding)&&void 0!==k?k:0}set tint(k){this.isCreated?this.TextObject.tint=k:this._preCreateCacheValues.tint=k}get tint(){var k;return this.isCreated?this.TextObject.tint:null!==(k=this._preCreateCacheValues.tint)&&void 0!==k?k:0}set alpha(k){this.isCreated?this.textObject.alpha=k:this._preCreateCacheValues.alpha=k}get alpha(){var k;return this.isCreated?this.textObject.alpha:null!==(k=this._preCreateCacheValues.alpha)&&void 0!==k?k:1}set underline(k){this._underline=k}get underline(){return this._underline}set underlineStartIndex(k){this._underlineStartIndex=k}get underlineStartIndex(){return this._underlineStartIndex}set underlineEndIndex(k){this._underlineEndIndex=k}get underlineEndIndex(){return this._underlineEndIndex}get scaleToFitRectTransform(){var k;return this.isCreated?this._scaleToFitRectTransform:null!==(k=this._preCreateCacheValues.scaleToFitRectTransform)&&void 0!==k&&k}set scaleToFitRectTransform(k){this.isCreated?(this._scaleToFitRectTransform=k,this.updateScaleToRectTransform()):this._preCreateCacheValues.scaleToFitRectTransform=k}set roundPixels(k){this.isCreated?this.textObject.roundPixels=k:this._preCreateCacheValues.roundPixels=k}get roundPixels(){var k;return this.isCreated?this.textObject.roundPixels:null!==(k=this._preCreateCacheValues.roundPixels)&&void 0!==k&&k}constructor(){super(),this.textSource=null,this._underlines=[],this._boundsAlignH=se.Left,this._boundsAlignV=ie.Top,this._paddingX=0,this._paddingY=0,this._preCreateCacheValues={},this.textObject=null,this._wrapToRectTransformWidth=!1,this._underline=!1,this._underlineStartIndex=null,this._underlineEndIndex=null,this.resizeRectTransform=!1,this._scaleToFitRectTransform=!1,this.textOverflow=!1,this.textOverflowUseRectTransformSize=!0,this._isLocKey=!0,this._textSize=new bt.o,this._smooth=!0}create(){var k,B;super.create(),this.createTextObject(),this.assignCacheValuesToComponent()||this.phaserTextObjectSetup();if(""!==this.textObject.text||this.updateTextSize(),this.textObject.visible=this.Active,this.GameObject.onActiveInHierarchyChanged.add((()=>{this.IsActiveInHierarchy&&this.applyTextPivot()})),this.OnActiveChanged.add((()=>this.textObject.visible=this.Active)),this.setUpDisplayObject(this.textObject),this.gameObject.legacyTransform){const k=this.gameObject.legacyTransform;0!==k.width&&0!==k.height&&this.textObject.position.set(Zt.LEGACY_STYLE_PADDING),this._textBounds=new dt.Rectangle(0,0,k.width,k.height)}if(this.applyTextPivot(),this._underline){const U=null!==(k=this.underlineStartIndex)&&void 0!==k?k:0,F=null!==(B=this.underlineEndIndex)&&void 0!==B?B:this.textObject.text.length;this.drawUnderline(U,F)}this._preCreateCacheValues=void 0}assignCacheValuesToComponent(){var k,B,U,F,G,j,$,H,V,W,q,K,z,Y,Q,X,Z,J,tt,et,it,st;return!!this._preCreateCacheValues&&(this.dropShadowPadding=null!==(k=this._preCreateCacheValues.padding)&&void 0!==k?k:this.dropShadowPadding,this.textObject.style.fontFamily=null!==(B=this._preCreateCacheValues.fontFamily)&&void 0!==B?B:this.textObject.style.fontFamily,void 0!==this._preCreateCacheValues.fontStyle&&this.setInternalFontStyle(this._preCreateCacheValues.fontStyle),void 0!==this._preCreateCacheValues.fontWeight&&this.setInternalFontWeight(this._preCreateCacheValues.fontWeight),this.fill=null!==(U=this._preCreateCacheValues.fill)&&void 0!==U?U:this.fill,this.stroke=null!==(F=this._preCreateCacheValues.stroke)&&void 0!==F?F:this.stroke,this.strokeThickness=null!==(G=this._preCreateCacheValues.strokeThickness)&&void 0!==G?G:this.strokeThickness,this.wordWrapWidth=null!==(j=this._preCreateCacheValues.wordWrapWidth)&&void 0!==j?j:this.wordWrapWidth,this.wordWrap=null!==($=this._preCreateCacheValues.wordWrap)&&void 0!==$?$:this.wordWrap,this.align=null!==(H=this._preCreateCacheValues.align)&&void 0!==H?H:this.align,this._boundsAlignH=null!==(V=this._preCreateCacheValues.boundsAlignH)&&void 0!==V?V:this._boundsAlignH,this._boundsAlignV=null!==(W=this._preCreateCacheValues.boundsAlignV)&&void 0!==W?W:this._boundsAlignV,this.roundPixels=null!==(q=this._preCreateCacheValues.roundPixels)&&void 0!==q?q:this.roundPixels,this._scaleToFitRectTransform=null!==(K=this._preCreateCacheValues.scaleToFitRectTransform)&&void 0!==K?K:this._scaleToFitRectTransform,this.alpha=null!==(z=this._preCreateCacheValues.alpha)&&void 0!==z?z:this.alpha,this.tint=null!==(Y=this._preCreateCacheValues.tint)&&void 0!==Y?Y:this.tint,this.blendMode=null!==(Q=this._preCreateCacheValues.blendMode)&&void 0!==Q?Q:this.blendMode,void 0!==this._preCreateCacheValues.fontSize&&(this._fontSize=this._preCreateCacheValues.fontSize,this.setInternalTextObjectFontSize(this._preCreateCacheValues.fontSize)),this.dropShadow=null!==(X=this._preCreateCacheValues.dropShadow)&&void 0!==X?X:this.dropShadow,this.dropShadowAlpha=null!==(Z=this._preCreateCacheValues.dropShadowAlpha)&&void 0!==Z?Z:this.dropShadowAlpha,this.dropShadowAngle=null!==(J=this._preCreateCacheValues.dropShadowAngle)&&void 0!==J?J:this.dropShadowAngle,this.dropShadowColor=null!==(tt=this._preCreateCacheValues.dropShadowColor)&&void 0!==tt?tt:this.dropShadowColor,this.dropShadowBlur=null!==(et=this._preCreateCacheValues.dropShadowBlur)&&void 0!==et?et:this.dropShadowBlur,this.dropShadowDistance=null!==(it=this._preCreateCacheValues.dropShadowDistance)&&void 0!==it?it:this.dropShadowDistance,this.lineSpacing=null!==(st=this._preCreateCacheValues.leading)&&void 0!==st?st:this.lineSpacing,void 0!==this._preCreateCacheValues.wrapToRectTransformWidth&&(this.wrapToRectTransformWidth=this._preCreateCacheValues.wrapToRectTransformWidth),this.phaserTextObjectSetup(),void 0!==this._preCreateCacheValues.text&&(this._preCreateCacheValues.text instanceof Nt?this.Source=this._preCreateCacheValues.text:this.text=this._preCreateCacheValues.text),!0)}phaserTextObjectSetup(){this.textObject.style.leading+=6,this.textObject.style.lineJoin="round"}applyScalingToTransform(k,B,U){const F=k.rectTransformDimensions;let G=-F.width*k.pivot.x,j=-F.height*k.pivot.y;this._boundsAlignH===se.Center?G+=F.getHalfWidth()-B.getHalfWidth():this._boundsAlignH===se.Right&&(G+=F.width-B.width),this._boundsAlignV===ie.Middle?j+=F.getHalfHeight()-B.getHalfHeight():this._boundsAlignV===ie.Bottom&&(j+=F.height-B.height),U.position.set(G,j)}applyToMatrix(k,B){B.append(k)}getDimensions(){return this._textSize}createPixiTransformOverride(){const k=super.createPixiTransformOverride();return k.setCustomRectTransformScaling(this),k}localize(k){var B;if(!this._isLocKey||!k||"string"!=typeof k||!this.isCreated)return k;try{const B=this.getInjectedValue(Y.LocalizationService);if(!B)throw new Error("No localization service available");const U=B.getText(k);if(U&&U!==k)return U}catch(U){Ut.R.logError(U,`Text Component on GameObject '${null===(B=this.GameObject)||void 0===B?void 0:B.name}' failed to localize text '${k}'`)}return k}createTextObject(){this.textObject||(this.isCreated||Z.V.log("Making the textObject before create() is not recommended",J.$.Warning),this.textObject=new dt.Text(""),this.textObject.style.fontFamily=Jt.ABeeZee,this.textObject.style.fill=Ot.y.BLACK,this.textObject.style.stroke=Ot.y.BLACK,this.textObject.style.dropShadowColor=Ot.y.BLACK,this.updateSmooth())}updateText(){if(!this.isCreated)return;const k=this.textObject.text;this.textObject.text=this.Source.getText(),this.updateTextSize(),this.Source&&this.Source.getText()!==k&&this.applyTextPivot()}applyTextPivot(){if(!this._textBounds||this.textObject.destroyed)return;let k=this._textBounds.x,B=this._textBounds.y;const U=this.textObject.resolution,F=Zt.LEGACY_STYLE_PADDING;this._boundsAlignH===se.Right?(k+=this._textBounds.width-this.textObject.canvas.width/U-this._paddingX,this.gameObject.legacyTransform&&this.gameObject.legacyTransform.width!==this.textObject.canvas.width&&(k+=2*F)):this._boundsAlignH===se.Center?(k+=Math.ceil(.5*(this._textBounds.width-this.textObject.canvas.width/U)),this.gameObject.legacyTransform&&this.gameObject.legacyTransform.width!==this.textObject.canvas.width&&(k+=F)):k+=this._paddingX,this._boundsAlignV===ie.Bottom?B+=this._textBounds.height-this.textObject.canvas.height/U-this._paddingY:this._boundsAlignV===ie.Middle?B+=Math.ceil(.5*(this._textBounds.height-this.textObject.canvas.height/U)):B+=this._paddingY,this.textObject.position.set(k,B)}drawUnderline(k,B){const U=Math.max(k,0),F=Math.max(B,0);if(U===F)return;if(!this.isCreated)return this.underlineStartIndex=U,this.underlineEndIndex=F,void(this._underline=!0);const G=this.text.substring(U,Math.min(F,this.text.length)),j=dt.TextMetrics.measureText(G,this.textObject.style),$=dt.TextMetrics.measureText(this.text.substring(0,U),this.textObject.style).width,H=j.height,W=V.W.instance.game.add.graphics($,H),q=parseInt(this.fill.substr(1),16)<<8,K=Math.abs(q/256);W.lineStyle(2,K,1,1),W.moveTo(0,0),W.lineTo(j.width,0),this._underlines.push(W),this.textObject.addChild(W)}isValidColor(k){return Rt.validateHTMLHexColor(k,"#",!0)}customDeserialize(k){var B;this._isLocKey=!1!==k.isLocKey;let U=!1;it.A.isDefined(k.dropShadowAlpha)?U=!0:this.dropShadowAlpha=k.dropShadowAlpha=0,it.A.isDefined(k.dropShadowAngle)?U=!0:this.dropShadowAngle=k.dropShadowAngle=0,it.A.isDefined(k.dropShadowBlur)?U=!0:this.dropShadowBlur=k.dropShadowBlur=0,it.A.isDefined(k.dropShadowDistance)?U=!0:this.dropShadowDistance=k.dropShadowDistance=0,it.A.isDefined(k.dropShadowColor)?(this.dropShadowColor=k.dropShadowColor="black"===k.dropShadowColor?"#000000":k.dropShadowColor,U=!0):this.dropShadowColor=k.dropShadowColor="#000000",it.A.isDefined(k.dropShadowPadding)?U=!0:this.dropShadowPadding=k.dropShadowPadding=3,this.dropShadow=k.dropShadow=null!==(B=k.dropShadow)&&void 0!==B?B:U,super.customDeserialize(k)}destroy(){var k,B;this._underlines.forEach((k=>{k.destroy()})),this._underlines=[],null===(k=this.textSource)||void 0===k||k.cleanUp(),(null===(B=this.textObject)||void 0===B?void 0:B.texture)&&this.textObject.destroy(),this.textObject=null,super.destroy()}updateTextSize(){this.updateScaleToRectTransform(),this._textSize.setTo(this.textObject.width,this.textObject.height),this.resizeRectTransformUponTextChange(),this.handleTextOverflow()}resizeRectTransformUponTextChange(){this.resizeRectTransform&&this.GameObject.transform instanceof ft.X&&this.GameObject.transform.setSizeDelta(this._textSize.width,this._textSize.height)}handleTextOverflow(){var k,B,U;const F=this.textOverflowUseRectTransformSize?null===(U=null===(B=null===(k=this.GameObject)||void 0===k?void 0:k.transform)||void 0===B?void 0:B.sizeDelta)||void 0===U?void 0:U.width:this.textOverflowWidth;if(this.textOverflow&&F&&this._textSize.width>F&&this.text.length>3){let k=dt.TextMetrics.measureText(this.text,this.textObject.style),B=this.text,U=!0;for(;k.width>F&&B.length>3;)B=`${B.slice(0,-(U?1:4))}...`,k=dt.TextMetrics.measureText(B,this.textObject.style),U=!1;this.text=B}}updateWrapToRectTransform(){this.gameObject.transform instanceof ft.X&&(this.gameObject.transform.onDimensionsChanged.remove(this.updateWrapToRectTransform,this),this.wrapToRectTransformWidth&&(this.wordWrapWidth=this.gameObject.transform.fullWidth,this.gameObject.transform.onDimensionsChanged.add(this.updateWrapToRectTransform,this),this.resizeRectTransform=!1))}updateScaleToRectTransform(){if(this.textObjectFontSize=this._fontSize,this.gameObject.transform instanceof ft.X&&(this.gameObject.transform.onDimensionsChanged.removeAll(this),this.scaleToFitRectTransform)){const k=this.gameObject.transform,B=Math.min(k.fullWidth/this.textObject.width,k.fullHeight/this.textObject.height,1);this.textObjectFontSize=this._fontSize*B,this.gameObject.transform.onDimensionsChanged.add(this.updateScaleToRectTransform,this)}}canRootContainerRender(){var k;const B=null===(k=this.textObject)||void 0===k?void 0:k.text;return!!(null==B?void 0:B.trim())&&super.canRootContainerRender()}static customSerialize(k,B,U){super.customSerialize(k,B,U);!1!==k.properties.isLocKey&&(delete k.properties.isLocKey,U.setComponentPropertyValue(k.guid,"isLocKey",void 0))}};re.LEGACY_STYLE_PADDING=3,(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"text",null),(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"font",null),(0,j.Cg)([(0,q.gf)(ee),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"fontStyle",null),(0,j.Cg)([(0,q.gf)(te),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"fontWeight",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],re.prototype,"_fontSize",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"fill",null),(0,j.Cg)([(0,q.gf)(se),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"align",null),(0,j.Cg)([(0,q.gf)(se),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"boundsAlignH",null),(0,j.Cg)([(0,q.gf)(ie),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"boundsAlignV",null),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"stroke",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"strokeThickness",null),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean),(0,j.Sn)("design:paramtypes",[Boolean])],re.prototype,"wordWrap",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"wordWrapWidth",null),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean),(0,j.Sn)("design:paramtypes",[Boolean])],re.prototype,"wrapToRectTransformWidth",null),(0,j.Cg)([(0,q.gf)(dt.BLEND_MODES),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"blendMode",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"lineSpacing",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"paddingX",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"paddingY",null),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean),(0,j.Sn)("design:paramtypes",[Boolean])],re.prototype,"dropShadow",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"dropShadowAlpha",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"dropShadowAngle",null),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"dropShadowColor",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"dropShadowBlur",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"dropShadowDistance",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"dropShadowPadding",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"tint",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"alpha",null),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],re.prototype,"_underline",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],re.prototype,"_underlineStartIndex",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],re.prototype,"_underlineEndIndex",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],re.prototype,"resizeRectTransform",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean),(0,j.Sn)("design:paramtypes",[Boolean])],re.prototype,"scaleToFitRectTransform",null),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],re.prototype,"textOverflow",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],re.prototype,"textOverflowUseRectTransformSize",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],re.prototype,"textOverflowWidth",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean),(0,j.Sn)("design:paramtypes",[Boolean])],re.prototype,"roundPixels",null),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],re.prototype,"_isLocKey",void 0),re=Zt=(0,j.Cg)([(0,H.EV)("Text",H.YH.ui,"Draws a web font on the screen as a child of the parent game object"),(0,_t.W)(Dt),(0,j.Sn)("design:paramtypes",[])],re);var oe=U(140),he=U(42149),ce=U(33431);class de extends gt.${generate(k,B){const U=oe.I.create({id:"numberArray",label:"Number Array",arrayType:Ht.b.Number,value:k.numberArray,insertElementCallbacks:new Map([["Value: 10",()=>10],["Value: 5",()=>5],["This should fail",()=>""]])}),F=oe.I.create({id:"stringArray",label:"String Array",arrayType:Ht.b.String,value:k.stringArray,isReorderable:!1}),G=oe.I.create({id:"booleanArray",label:"Boolean Array",arrayType:Ht.b.Boolean,value:k.booleanArray}),j=oe.I.create({id:"enumArray",label:"Enum Array",arrayType:Ht.b.Enum,value:k.enumArray}),$=oe.I.create({id:"reducedEnumArray",label:"Reduced Enum Array",arrayType:Ht.b.Enum,value:k.reducedEnumArray,enumeration:{Bold:te.Bold,Normal:te.Normal}}),H=oe.I.create({id:"componentArray",label:"Component Array",arrayType:Ht.b.ComponentReference,value:k.componentArray}),V=oe.I.create({id:"gameObjectArray",label:"GameObject Array",arrayType:Ht.b.GameObjectReference,value:k.gameObjectArray}),W=oe.I.create({id:"colorArray",label:"Color Array",arrayType:Ht.b.String,value:k.colorArray}),q=oe.I.create({id:"jsonFileArray",label:"Json File Array",arrayType:Ht.b.String,value:k.jsonFileArray}),K=oe.I.create({id:"jsonArray",label:"JSON Array",arrayType:Ht.b.JSON,value:k.jsonArray}),z=oe.I.create({id:"customInspectorArray",label:"Custom Inspector Array",arrayType:Ht.b.GenericObject,value:k.customInspectorArray,insertElementCallbacks:new Map([["color",()=>({label:"a color element",color:"#660000"})],["bool",()=>({label:"a bool element",bool:!0})],["color + bool",()=>({label:"a color + bool element",color:"#66BB00",bool:!0})],["neither",()=>({label:"neither color nor bool"})]]),getElementInspector:(k,B)=>{const U=[];return U.push(ce.l.create({id:`label-${B}`,labelValue:k.label})),k.color&&U.push(wt.f.create({id:`color-${B}`,inputType:"color",inputValue:k.color,propertyPath:[`${B}`,"color"]})),it.A.isDefined(k.bool)&&U.push(wt.f.create({id:`boolean-${B}`,inputType:"checkbox",inputValue:k.bool,propertyPath:[`${B}`,"bool"]})),it.A.isDefined(k.bool)||k.color||U.push(he.b.create({id:`boolean-${B}`,message:"Object contains neither color nor bool",iconType:Tt.AT.Warning})),yt.X.createVertical(U)}}),Y=this.getDemoEnemyGenericObjectArrayTerminal(k);return yt.X.createVertical([U,F,G,j,$,H,V,W,q,K,Y,z])}getDemoEnemyGenericObjectArrayTerminal(k){let B;!function(k){k.Goblin="Goblin",k.Orc="Orc",k.Troll="Troll"}(B||(B={}));const U=new Map([[B.Goblin,{name:B.Goblin,hp:5,spawnRate:1,dropIds:[{id:1,name:"Sword"},{id:2,name:"Hammer"}]}],[B.Orc,{name:B.Orc,hp:10,spawnRate:.8,dropIds:[{id:2,name:"Hammer"},{id:3,name:"Shield"},{id:4,name:"Helmet"}]}],[B.Troll,{name:B.Troll,hp:50,spawnRate:.2,dropIds:[{id:5,name:"Club"},{id:4,name:"Helmet"}]}]]),F=new Map;for(const G of Object.values(B))F.set(G,(()=>U.get(G)));return oe.I.create({id:"genericObjectArray",label:"Generic Object Array",arrayType:Ht.b.GenericObject,value:k.genericObjectArray,insertElementCallbacks:F})}}let le=class extends $.u{constructor(){super(...arguments),this._numberArray=[1,2,3],this._stringArray=["a","b","c"],this._booleanArray=[!0,!1,!0],this._enumArray=[],this._reducedEnumArray=[],this._componentArray=[],this._gameObjectArray=[],this._colorArray=[],this._jsonFileArray=[],this._jsonArray=[{name:"jsonTest1",id:1},{name:"jsonTest2",id:2}],this._customInspectorArray=[{label:"An object with a color",color:"#660000"},{label:"An object with a bool",bool:!0},{label:"An object with color and a bool",color:"#66BB00",bool:!0},{label:"An object with neither color nor bool"}]}};(0,j.Cg)([(0,q.g1)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_numberArray",void 0),(0,j.Cg)([(0,q.W_)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_stringArray",void 0),(0,j.Cg)([(0,q.vk)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_booleanArray",void 0),(0,j.Cg)([(0,q.gf)(te),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_enumArray",void 0),(0,j.Cg)([(0,q.gf)(te),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_reducedEnumArray",void 0),(0,j.Cg)([(0,q.Mn)(Ct.d),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_componentArray",void 0),(0,j.Cg)([(0,q.ER)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_gameObjectArray",void 0),(0,j.Cg)([(0,q.iE)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_colorArray",void 0),(0,j.Cg)([(0,q.tW)("gear"),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_jsonFileArray",void 0),(0,j.Cg)([(0,q.np)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_genericObjectArray",void 0),(0,j.Cg)([(0,q.vC)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_jsonArray",void 0),(0,j.Cg)([(0,q.np)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_customInspectorArray",void 0),le=(0,j.Cg)([(0,H.EV)("DemoArray"),(0,_t.W)(de)],le);class ue extends gt.${generate(k,B){const U=[];return U.push(this.generateButtonsByType()),U.push(this.generateButtonsByIcon()),U.push(this.generateButtonsByState()),U.push(this.generateButtonsWordWrap()),U.push(this.generateStandaloneButton(k)),yt.X.createVertical(U)}generateButtonsByType(){const k=[];return Object.keys(Tt.VQ).forEach((B=>{const U=Tt.VQ[B],F=It.G.buttonGroup({id:`button-${U}`,buttonText:B,buttonType:U,labelValue:B});k.push(F)})),yt.X.createVertical(k,{isContainer:!0,title:"Button Types",isCollapsible:!0})}generateButtonsByIcon(){const k=[];return Object.keys(Tt.a2).forEach((B=>{const U=Tt.a2[B],F=It.G.buttonGroup({id:`button-${U}`,buttonText:B,buttonIcon:U,labelValue:B});k.push(F)})),yt.X.createVertical(k,{isContainer:!0,title:"Button Icons",isCollapsible:!0})}generateButtonsByState(){const k=[It.G.buttonGroup({id:"button-enabled",buttonText:"Enabled",labelValue:"Enabled"}),It.G.buttonGroup({id:"button-disabled",buttonText:"Disabled",labelValue:"Disabled",buttonDisabled:!0})];return yt.X.createVertical(k,{isContainer:!0,title:"Button States",isCollapsible:!0})}generateStandaloneButton(k){const B=[he.b.create({id:"info-box--button-standalone",iconType:Tt.AT.Info,message:"Standalone button. Another way to create buttons when TerminalGroup.buttonGroup() doesn't suit your needs."}),Et.X.create({id:"button-standalone",buttonText:"Standalone Button",onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{lastClickTime:(new Date).toLocaleString()})}}),ce.l.create({id:"last-click-label",labelValue:k.lastClickTime?`Last Click at: ${k.lastClickTime}`:"Click the Standalone Button!",labelTextWrap:Tt.K3.Wrap})];return yt.X.createVertical(B,{isContainer:!0,title:"Standalone Button",isCollapsible:!0})}generateButtonsWordWrap(){const k=[Et.X.create({id:"button-no-wrap",buttonText:"This is a whole lot of text that will get cut off becaue word wrapping is off.",buttonTextWrap:Tt.K3.None}),Et.X.create({id:"button-text-wrap",buttonText:"This is a whole lot of text that will get wrapped into multiple lines because word wrapping is turned on.",buttonTextWrap:Tt.K3.Wrap})];return yt.X.createVertical(k,{isContainer:!0,title:"Text Wrap on Buttons",isCollapsible:!0})}}let fe=class extends $.u{};(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],fe.prototype,"_lastClickTime",void 0),fe=(0,j.Cg)([(0,H.EV)("DemoButtonsComponent"),(0,_t.W)(ue)],fe);var be,pe=U(44716);!function(k){k.Scale="scale",k.Stop="stop",k.ClipInner="clip-inner",k.ClipHigh="clip-high"}(be||(be={}));class ve extends dt.NineSlicePlane{constructor(){super(...arguments),this._shrinkHorizontal=be.Scale,this._shrinkVertical=be.Scale}get shrinkHorizontal(){return this._shrinkHorizontal}set shrinkHorizontal(k){this._shrinkHorizontal!==k&&(this._shrinkHorizontal=k,this._refresh())}get shrinkVertical(){return this._shrinkVertical}set shrinkVertical(k){this._shrinkVertical!==k&&(this._shrinkVertical=k,this._refresh())}setShrinkModes(k,B){this._shrinkHorizontal===k&&this._shrinkVertical===B||(this._shrinkHorizontal=k,this._shrinkVertical=B,this._refresh())}_refresh(){if(this.destroyed)return;const k=this.texture,B=k.orig.width,U=k.orig.height,F=k.trim||{x:0,y:0,width:B,height:U},G=F.y,j=U-F.height-F.y,$=G/U,H=j/U,V=Math.max(this._topHeight-G,0),W=Math.max(this._bottomHeight-j,0),q=F.x,K=B-F.width-F.x,z=q/B,Y=K/B,Q=Math.max(this._leftWidth-q,0),X=Math.max(this._rightWidth-K,0),Z=this._getMinScale(),J=this.vertices,tt=this.geometry.buffers[1].data;let et,it,st,nt,at,rt,ot,ht,ct,dt,lt,ut,ft,bt,pt,vt;switch(this._shrinkHorizontal){case be.Stop:et=q,it=q+Q,this.width0?(et=q,it=q+Q*Z):et=it=this._width*z,X>0?(st=this._width-K-X*Z,nt=this._width-K):st=nt=this._width*(1-Y),ct=z,dt=z+Q/B,lt=1-Y-X/B,ut=1-Y}switch(this._shrinkVertical){case be.Stop:at=G,rt=G+V,this.height0?(at=G,rt=G+V*Z):at=rt=this._height*$,ft=$,bt=$+V/U,W>0?(ot=this._height-j-W*Z,ht=this._height-j):ot=ht=this._height*(1-H),pt=1-H-W/U,vt=1-H}J[0]=J[8]=J[16]=J[24]=et,J[2]=J[10]=J[18]=J[26]=it,J[4]=J[12]=J[20]=J[28]=st,J[6]=J[14]=J[22]=J[30]=nt,J[1]=J[3]=J[5]=J[7]=at,J[9]=J[11]=J[13]=J[15]=rt,J[17]=J[19]=J[21]=J[23]=ot,J[25]=J[27]=J[29]=J[31]=ht,tt[0]=tt[8]=tt[16]=tt[24]=ct,tt[2]=tt[10]=tt[18]=tt[26]=dt,tt[4]=tt[12]=tt[20]=tt[28]=lt,tt[6]=tt[14]=tt[22]=tt[30]=ut,tt[1]=tt[3]=tt[5]=tt[7]=ft,tt[9]=tt[11]=tt[13]=tt[15]=bt,tt[17]=tt[19]=tt[21]=tt[23]=pt,tt[25]=tt[27]=tt[29]=tt[31]=vt,this.geometry.buffers[0].update(),this.geometry.buffers[1].update()}}let ge=class extends Pt.y{constructor(){super(...arguments),this.image=null,this._alpha=1,this._shrinkHorizontal=be.Scale,this._shrinkVertical=be.Scale,this.atlas="",this.frame="",this._imageID=null,this._tint="#FFFFFF",this._imageDimensions=new bt.o}get alpha(){return this._alpha}set alpha(k){this._alpha=k,this.image&&(this.image.alpha=k)}get shrinkHorizontal(){return this._shrinkHorizontal}get shrinkVertical(){return this._shrinkVertical}get atlasKey(){return this.atlas}set tint(k){this._tint=dt.Color.shared.setValue(k).toHex(),this.image&&(this.image.tint=k)}get sliceData(){return this._sliceData}create(){super.create();let k="",B="";this._imageID?B=this._imageID:(B=this.atlas,k=this.frame),this.updateAssetInternal(B,k)}destroy(){this.image&&!this.image.destroyed&&this.image.destroy(),this.image=null,super.destroy()}getDimensions(){return this._sliceData?new bt.o(this.image.width,this.image.height):this._imageDimensions}updateAsset(k,B){var U;this.isCreated?this.atlas===k&&this.frame===B||(null===(U=this.image)||void 0===U?void 0:U.destroyed)||this.updateAssetInternal(k,B):this._onCreateAction.addOnce(this.updateAsset,this,void 0,k,B)}updateAssetInternal(k,B){this.atlas=k,this.frame=B,this._sliceData=V.W.instance.game.cache.getSliceData(k),(this._sliceData&&this.image instanceof dt.Sprite||!this._sliceData&&this.image instanceof ve)&&(this.image.destroy(),this.image=null);const U=V.W.instance.game.cache.getTexture(k,B);this.image?(this.image.texture=U,this.image instanceof ve&&(this.image.leftWidth=this._sliceData.left,this.image.topHeight=this._sliceData.top,this.image.rightWidth=this._sliceData.right,this.image.bottomHeight=this._sliceData.bottom),this.updateSmooth()):(this._sliceData?(this.image=new ve(U,this._sliceData.left,this._sliceData.top,this._sliceData.right,this._sliceData.bottom),this.image.setShrinkModes(this._shrinkHorizontal,this._shrinkVertical)):this.image=new dt.Sprite,this.image.texture=U,this.image.tint=dt.utils.string2hex(this._tint),this.image.alpha=this._alpha,this.setRootContainer(this.image)),this.image.roundPixels=!0,this._imageDimensions.width=this.image.width,this._imageDimensions.height=this.image.height}setTexture(k){this.image.texture=k,this._imageDimensions.width=this.image.width,this._imageDimensions.height=this.image.height}setAnchor(k,B){this.image instanceof dt.Sprite&&this.image.anchor.set(k,B)}setAngle(k){this.image.angle=k}setScale(k,B){this.image.scale.set(k,B)}setAlpha(k){this.image.alpha=k}setBlend(k){this.image.blendMode=k}setShrinkModes(k,B){this._shrinkHorizontal=k,this._shrinkVertical=B,this.image instanceof ve&&this.image.setShrinkModes(k,B)}createPixiTransformOverride(){const k=super.createPixiTransformOverride();return this._sliceData&&k.setCustomRectTransformScaling(this),k}applyScalingToTransform(k,B,U){if(!this._sliceData){const F=k.rectTransformDimensions,G=F.width/B.width,j=F.height/B.height,$=-B.width*k.pivot.x*G,H=-B.height*k.pivot.y*j;return U.scale.set(G,j),void U.position.set($,H)}this.image.width=k.rectTransformDimensions.width,this.image.height=k.rectTransformDimensions.height,U.position.set(-k.rectTransformDimensions.width*k.pivot.x,-k.rectTransformDimensions.height*k.pivot.y)}applyToMatrix(k,B){B.append(k)}sizeToSourceImage(){const k=this.gameObject.transform;k instanceof ft.X?(k.fullWidth=this.image.width,k.fullHeight=this.image.height):Z.V.log("Graphic: Cannot size to source image due to missing RectTransform.",J.$.Verbose)}isValid(){return!(!this.image||this.image.destroyed)&&(!(this.image instanceof dt.Sprite&&!this.image.texture)&&!(this.image instanceof ve&&!this.image.shader))}};(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],ge.prototype,"_alpha",void 0),(0,j.Cg)([(0,q.gf)(be),(0,j.Sn)("design:type",String)],ge.prototype,"_shrinkHorizontal",void 0),(0,j.Cg)([(0,q.gf)(be),(0,j.Sn)("design:type",String)],ge.prototype,"_shrinkVertical",void 0),(0,j.Cg)([(0,W.B)(),(0,q.W_)(),(0,j.Sn)("design:type",String)],ge.prototype,"atlas",void 0),(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],ge.prototype,"frame",void 0),(0,j.Cg)([(0,W.B)(),(0,q.W_)(),(0,q.nK)("singleImageID"),(0,j.Sn)("design:type",String)],ge.prototype,"_imageID",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String)],ge.prototype,"_tint",void 0),ge=(0,j.Cg)([(0,H.EV)("Graphic",H.YH.ui,"Lowest level graphic component")],ge);class me extends gt.${generate(k,B){const U=[];return U.push(It.G.componentPickerGroup({id:"componentPickerText",labelValue:"Text Component",componentType:re,componentGuid:k.componentPickerText})),U.push(It.G.componentPickerGroup({id:"componentPickerGraphic",labelValue:"Graphic Component",componentType:ge,componentGuid:k.componentPickerGraphic,readonly:!0})),U.push(It.G.componentPickerGroup({id:"componentPickerRectTransform",labelValue:"RectTransform Component",componentType:ft.X,componentGuid:k.componentPickerRectTransform})),U.push(It.G.componentPickerGroup({id:"componentPickerLegacyTransform",labelValue:"LegacyTransform Component",componentType:pe.K,componentGuid:k.componentPickerLegacyTransform})),yt.X.createVertical(U)}}let ye=class extends $.u{};(0,j.Cg)([(0,q.Mn)(re),(0,j.Sn)("design:type",re)],ye.prototype,"_componentPickerText",void 0),(0,j.Cg)([(0,q.Mn)(ge),(0,j.Sn)("design:type",ge)],ye.prototype,"_componentPickerGraphic",void 0),(0,j.Cg)([(0,q.Mn)(ft.X),(0,j.Sn)("design:type",ft.X)],ye.prototype,"_componentPickerRectTransform",void 0),(0,j.Cg)([(0,q.Mn)(pe.K),(0,j.Sn)("design:type",pe.K)],ye.prototype,"_componentPickerLegacyTransform",void 0),ye=(0,j.Cg)([(0,H.EV)("DemoComponentPickerComponent"),(0,_t.W)(me)],ye);var _e=U(47681);class Ee extends gt.${generate(k,B){const U=[];return U.push(this.generateGenericPicker()),U.push(this.generateInitialPathPicker()),U.push(this.generateFilteredPicker()),U.push(this.generateOnChangeButton(k)),yt.X.createVertical(U)}generateGenericPicker(){const k=[It.G.filePickerGroup({id:"demoGenericPicker",labelValue:"Generic Picker"}),ce.l.create({id:"demoGenericPickerStandaloneLabel",labelValue:"Standalone Picker"}),_e.H.create({id:"demoGenericPickerStandalone"})];return yt.X.createVertical(k,{isContainer:!0,title:"Generic Picker",isCollapsible:!0})}generateInitialPathPicker(){const k=[It.G.filePickerGroup({id:"demoInitialPathPicker",labelValue:"Initial Path",path:"test/fake/path/image.png"})];return yt.X.createVertical(k,{isContainer:!0,title:"Initial Path Picker",isCollapsible:!0})}generateFilteredPicker(){const k=[It.G.filePickerGroup({id:"demoFilteredPickerPng",labelValue:"PNG Picker",allowedExtensions:["png"]}),It.G.filePickerGroup({id:"demoFilteredPickerImages",labelValue:"Images Picker",allowedExtensions:["png","jpg","jpeg","webp","jfif","tiff","drwg"]}),It.G.filePickerGroup({id:"demoFilteredPickerGear",labelValue:"Gear Picker",allowedExtensions:["gear"]}),It.G.filePickerGroup({id:"demoFilteredPickerDefault",labelValue:"Default Filtering",allowedExtensions:[]})];return yt.X.createVertical(k,{isContainer:!0,title:"Filtered Picker",isCollapsible:!0})}generateOnChangeButton(k){var B;const U=[It.G.filePickerGroup({id:"demoOnChangePicker",labelValue:"On Change Picker",onChange:k=>{this._editorAPI.modifyComponent(this._componentGuid,{lastPickedPath:k})}}),ce.l.create({id:"demoOnChangeLabel",labelValue:null!==(B=k.lastPickedPath)&&void 0!==B?B:"No path picked yet",labelTextWrap:Tt.K3.Wrap})];return yt.X.createVertical(U,{isContainer:!0,title:"OnChange Picker",isCollapsible:!0})}}let we=class extends $.u{};(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],we.prototype,"_lastPickedPath",void 0),we=(0,j.Cg)([(0,H.EV)("DemoFilePickerComponent"),(0,_t.W)(Ee)],we);var Te=U(27780);class Se extends gt.${generate(k,B){const U=[];return U.push(It.G.gameObjectPickerGroup({id:"targetGameObjectA",labelValue:"Target A Game Object",gameObjectGuid:k.targetGameObjectA})),U.push(It.G.gameObjectPickerGroup({id:"targetGameObjectB",labelValue:"Target B Game Object",gameObjectGuid:k.targetGameObjectB,readonly:k.targetGameObjectBReadonly})),U.push(It.G.checkboxGroup({id:"targetGameObjectBReadonly",labelValue:"Target B is Readonly",inputValue:k.targetGameObjectBReadonly})),yt.X.createVertical(U)}}let Ae=class extends $.u{constructor(){super(...arguments),this._targetGameObjectA=null,this._targetGameObjectB=null,this._targetGameObjectBReadonly=!1}};(0,j.Cg)([(0,q.ER)(),(0,j.Sn)("design:type",Te._)],Ae.prototype,"_targetGameObjectA",void 0),(0,j.Cg)([(0,q.ER)(),(0,j.Sn)("design:type",Te._)],Ae.prototype,"_targetGameObjectB",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Ae.prototype,"_targetGameObjectBReadonly",void 0),Ae=(0,j.Cg)([(0,H.EV)("DemoGameObjectPickerComponent"),(0,_t.W)(Se)],Ae);U(8490);var Ce=U(23664),Oe=U(84893);const Ie="Change the values below to test the info box. ";class De extends gt.${generate(k,B){let U="";switch(k.testDropdown){case"Long":U+=`${Ie}${Ie}${Ie}${Ie}`;case"Medium":U+=`${Ie}${Ie}`;case"Short":default:U+=Ie}let F="";switch(k.testUpdateMode){case Tt.JG.OnTheFly:F="Updates occur regularly on a short delay after user input is detected.";break;case Tt.JG.Confirm:F="Updates occur only after user confirms input with Enter or when focus is lost."}return yt.X.createVertical([It.G.checkboxGroup({id:"readonly",labelValue:"Readonly",inputValue:B.readonly,onChange:(k,U)=>{U?this._editorAPI.saveComponentMetadata(this._componentGuid,{readonly:!B.readonly}):this._editorAPI.deleteComponentMetadata(this._componentGuid,["readonly"])}}),Ce._.blankLine(),It.G.textGroup({id:"testString",labelValue:"String Test",inputValue:k.testString,readonly:B.readonly}),It.G.numberGroup({id:"testNumber",labelValue:"Number Test",inputValue:k.testNumber,readonly:B.readonly}),It.G.colorPickerGroup({id:"testColorStr",labelValue:"Color Test (String)",inputValue:k.testColorStr,readonly:B.readonly}),It.G.colorPickerGroup({id:"testColorNum",labelValue:"Color Test (Number)",inputValue:k.testColorNum,readonly:B.readonly}),It.G.buttonGroup({id:"randomButton",buttonText:"Ok",labelValue:"Randomize",onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{testString:it.A.generateGUID(),testNumber:Math.floor(1e3*Math.random()),testColorStr:`#${(16777215*Math.random()*1e6).toString(16).slice(0,6)}`,testColorNum:Rt.hexToDecimal(`#${(16777215*Math.random()*1e6).toString(16).slice(0,6)}`)})}}),Ce._.blankLine(),It.G.checkboxGroup({id:"testBoolean",labelValue:"Checkbox Test",inputValue:k.testBoolean,readonly:B.readonly}),It.G.vectorGroup({id:"testVector",labelValue:"Vector Test",vectorValue:k.testVector,readonly:B.readonly}),It.G.sizeGroup({id:"testSize",labelValue:"Size Test",sizeValue:k.testSize,readonly:B.readonly}),Ce._.blankLine(),ce.l.create({id:"longLabel",labelValue:"This is some very long text that is definitely going to wrap basically no matter how wide the inspector panel.",labelTextWrap:Tt.K3.Wrap}),ce.l.create({id:"longLabelNoWrap",labelValue:"Same but nowrap. This is some very long text that is definitely going to wrap basically no matter how wide the inspector panel.",labelTextWrap:Tt.K3.None}),Et.X.create({id:"longButton",buttonText:"This is some more very long text designed to not fit on the button and be forced to word wrap. I bet it even works.",buttonTextWrap:Tt.K3.Wrap}),Et.X.create({id:"longButtonNoWrap",buttonText:"Same but nowrap. This is some more very long text designed to not fit on the button and be forced to word wrap. I bet it even works.",buttonTextWrap:Tt.K3.None}),Ce._.blankLine(),he.b.create({id:"infoBox",iconType:k.testEnum,message:U}),Ce._.halfBlankLine(),It.G.enumGroup({id:"testEnum",labelValue:"Icon Type",selectValue:k.testEnum,readonly:B.readonly},Tt.AT),It.G.dropdownGroup({id:"testDropdown",labelValue:"Info Box Size",selectOptions:["Short","Medium","Long"],selectValue:k.testDropdown,readonly:B.readonly}),Ce._.blankLine(),Oe.N.create({id:"testSignal",label:"Test Signal",signalValue:k.testSignal,componentGUID:this._componentGuid}),Ce._.blankLine(),yt.X.createVertical([It.G.textGroup({id:"testString",labelValue:"String A",inputValue:k.testString,readonly:B.readonly}),It.G.numberGroup({id:"testNumber",labelValue:"Number Test",inputValue:k.testNumber,readonly:B.readonly})],{isContainer:!0,isCollapsible:!0,title:"Collapsible"}),yt.X.createVertical([It.G.textGroup({id:"testString",labelValue:"String A",inputValue:k.testString,readonly:B.readonly}),It.G.numberGroup({id:"testNumber",labelValue:"Number Test",inputValue:k.testNumber,readonly:B.readonly})],{isContainer:!0,title:"Not Collapsible"}),yt.X.createVertical([It.G.textGroup({id:"testString",labelValue:"String A",inputValue:k.testString,readonly:B.readonly}),It.G.numberGroup({id:"testNumber",labelValue:"Number Test",inputValue:k.testNumber,readonly:B.readonly})],{isContainer:!0,title:"Start Collapsed",isCollapsible:!0,startCollapsed:!0}),Ce._.line(),yt.X.createVertical([he.b.create({id:"updateModeInfoBox",iconType:Tt.AT.Verbose,message:F}),Ce._.halfBlankLine(),It.G.enumGroup({id:"testUpdateMode",labelValue:"Mode",selectValue:k.testUpdateMode},Tt.JG),It.G.textGroup({id:"testUpdateModeInput",labelValue:"Input",inputValue:k.testUpdateModeInput,inputUpdateMode:k.testUpdateMode}),It.G.textGroup({id:"testUpdateModeOutput",labelValue:"Output",inputValue:k.testUpdateModeInput,readonly:!0})],{isContainer:!0,isCollapsible:!0,title:"Update Modes"}),Ce._.line(),It.G.filePickerGroup({id:"testFilePicker",labelValue:"File Picker",allowedExtensions:["png"],onChange:k=>{console.log(`****** picked: ${k}`)}})])}}let Re=class extends $.u{constructor(){super(...arguments),this._testVector=new pt.I,this._testSize=new bt.o,this._testEnum=Tt.AT.Info,this._testUpdateMode=Tt.JG.Confirm}destroy(){var k;super.destroy(),null===(k=this._testSignal)||void 0===k||k.dispose()}};(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],Re.prototype,"_testString",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Re.prototype,"_testNumber",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String)],Re.prototype,"_testColorStr",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",Number)],Re.prototype,"_testColorNum",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Re.prototype,"_testBoolean",void 0),(0,j.Cg)([(0,q._H)(),(0,j.Sn)("design:type",pt.I)],Re.prototype,"_testVector",void 0),(0,j.Cg)([(0,q.oB)(),(0,j.Sn)("design:type",bt.o)],Re.prototype,"_testSize",void 0),(0,j.Cg)([(0,q.gf)(Tt.AT),(0,j.Sn)("design:type",String)],Re.prototype,"_testEnum",void 0),(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],Re.prototype,"_testDropdown",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Re.prototype,"_testSignal",void 0),(0,j.Cg)([(0,q.gf)(Tt.JG),(0,j.Sn)("design:type",String)],Re.prototype,"_testUpdateMode",void 0),(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],Re.prototype,"_testUpdateModeInput",void 0),Re=(0,j.Cg)([(0,H.EV)("TestComponent"),(0,_t.W)(De)],Re);class Pe{static fromSliceFile(k){const B=new Pe,U=JSON.parse(k);return B.sliceData={top:U.top,bottom:U.bottom,right:U.right,left:U.left},B.sliceImage=U.image,B}static toSliceFile(k){return JSON.stringify({top:k.sliceData.top,bottom:k.sliceData.bottom,right:k.sliceData.right,left:k.sliceData.left,image:k.sliceImage})}}let Me=class extends mt{constructor(){super(...arguments),this._slice=new Pe}initialize(k,B){super.initialize(k,B);const U=this._editorAPI.getFilePath(this._fileGuid);U?(this._path=U,this._slice=Pe.fromSliceFile(this._editorAPI.readFileSync(this._path).toString())):Z.V.log(`Failed to get filepath for ${this._fileGuid}`,J.$.Error)}generateImageGuidInspector(){return wt.f.create({id:`image-guid-picker-${this._fileGuid}`,labelValue:"Image",inputValue:this._slice.sliceImage,inputType:"text",onChange:k=>{this._slice.sliceImage=k,this._editorAPI.writeToPath(this._path,Pe.toSliceFile(this._slice)),this._editorAPI.redrawCustomInspector()}})}generateNineSliceInspector(){return It.G.fourDimensionGroup({id:`slice-inspector-${this._fileGuid}`,labelValue:"Slice Data",xKey:"top",yKey:"bottom",zKey:"right",wKey:"left",labelTooltip:"The slice data for the image",fourInputValue:this._slice.sliceData,inputUpdateMode:Tt.JG.Confirm,onChange:(k,B)=>{this._slice.sliceData=Object.assign(Object.assign({},this._slice.sliceData),{[k]:B}),this._editorAPI.writeToPath(this._path,Pe.toSliceFile(this._slice)),this._editorAPI.redrawCustomInspector()}})}generate(){return this._path?yt.X.createVertical([this.generateNineSliceInspector(),this.generateImageGuidInspector()]):he.b.create({id:`failed-slice-path-${this._fileGuid}`,iconType:Tt.AT.Error,message:`Failed to get filepath for ${this._fileGuid} (likely a race condition with the editors internal file structure). Please re-select the file.`})}};Me=(0,j.Cg)([(0,Q.aw)("slice")],Me);class Ne extends gt.${generate(k,B){const U=[],F=[];F.push(It.G.colorPickerGroup({id:"tintDefault",labelValue:"Tint Default",inputValue:k.tintDefault}),It.G.numberGroup({id:"tintIntensityDefault",labelValue:"Tint Intensity Default",inputValue:k.tintIntensityDefault})),F.push(It.G.colorPickerGroup({id:"tintOver",labelValue:"Tint Over",inputValue:k.tintOver}),It.G.numberGroup({id:"tintIntensityOver",labelValue:"Tint Intensity Over",inputValue:k.tintIntensityOver})),F.push(It.G.colorPickerGroup({id:"tintDown",labelValue:"Tint Down",inputValue:k.tintDown}),It.G.numberGroup({id:"tintIntensityDown",labelValue:"Tint Intensity Down",inputValue:k.tintIntensityDown})),F.push(It.G.colorPickerGroup({id:"tintFocus",labelValue:"Tint Focus",inputValue:k.tintFocus}),It.G.numberGroup({id:"tintIntensityFocus",labelValue:"Tint Intensity Focus",inputValue:k.tintIntensityFocus})),F.push(It.G.colorPickerGroup({id:"tintDisable",labelValue:"Tint Disable",inputValue:k.tintDisable}),It.G.numberGroup({id:"tintIntensityDisable",labelValue:"Tint Intensity Disable",inputValue:k.tintIntensityDisable}));const G=[];G.push(It.G.numberGroup({id:"alphaDefault",labelValue:"Alpha Default",inputValue:k.alphaDefault}),It.G.numberGroup({id:"alphaOver",labelValue:"Alpha Over",inputValue:k.alphaOver}),It.G.numberGroup({id:"alphaDown",labelValue:"Alpha Down",inputValue:k.alphaDown}),It.G.numberGroup({id:"alphaFocus",labelValue:"Alpha Focus",inputValue:k.alphaFocus}),It.G.numberGroup({id:"alphaDisable",labelValue:"Alpha Disable",inputValue:k.alphaDisable}));const j=[];j.push(It.G.vectorGroup({id:"scaleDefault",labelValue:"Vector Default",vectorValue:k.scaleDefault}),It.G.vectorGroup({id:"scaleOver",labelValue:"Vector Over",vectorValue:k.scaleOver}),It.G.vectorGroup({id:"scaleDown",labelValue:"Vector Down",vectorValue:k.scaleDown}),It.G.vectorGroup({id:"testFocus",labelValue:"Vector Focus",vectorValue:k.scaleFocus}),It.G.vectorGroup({id:"testDisable",labelValue:"Vector Disable",vectorValue:k.scaleDisable}));const $=[];return $.push(It.G.imagePickerGroup({id:"assetDefault",labelValue:"Asset Default",guid:k.assetDefault}),It.G.imagePickerGroup({id:"assetOver",labelValue:"Asset Over",guid:k.assetOver}),It.G.imagePickerGroup({id:"assetDown",labelValue:"Asset Down",guid:k.assetDown}),It.G.imagePickerGroup({id:"assetFocus",labelValue:"Asset Focus",guid:k.assetFocus}),It.G.imagePickerGroup({id:"assetDisable",labelValue:"Asset Disable",guid:k.assetDisable})),U.push(yt.X.createVertical(F,{isContainer:!0,title:"Tint",isCollapsible:!0,startCollapsed:!0}),yt.X.createVertical(G,{isContainer:!0,title:"Alpha",isCollapsible:!0,startCollapsed:!0}),yt.X.createVertical(j,{isContainer:!0,title:"Scale",isCollapsible:!0,startCollapsed:!0}),yt.X.createVertical($,{isContainer:!0,title:"Asset",isCollapsible:!0,startCollapsed:!0})),yt.X.createVertical(U)}}var xe=U(74786),Le=(U(62131),U(83793));let ke=class extends $.u{constructor(){super(...arguments),this.imageGuids=[],this._targetGraphic=new ge,this.onImageChanged=new Mt.H}postCreate(){super.postCreate(),this._currentIndex=0,this.imageGuids.length&&this.updateImage()}nextImage(){0!==this.imageGuids.length?(this._currentIndex++,this._currentIndex%=this.imageGuids.length,this.updateImage()):Z.V.log("There are no images in imageGuids to display",J.$.Error)}previousImage(){0!==this.imageGuids.length?(this._currentIndex+=this.imageGuids.length-1,this._currentIndex%=this.imageGuids.length,this.updateImage()):Z.V.log("There are no images in imageGuids to display",J.$.Error)}updateImage(){const k=this.imageGuids[this._currentIndex];this._targetGraphic.updateAsset(k),this.onImageChanged.dispatch(k)}destroy(){this.onImageChanged.dispose(),super.destroy()}};(0,j.Cg)([(0,q.SZ)(),(0,q.W_)(),(0,j.Sn)("design:type",Array)],ke.prototype,"imageGuids",void 0),(0,j.Cg)([(0,q.Mn)(ge),(0,j.Sn)("design:type",ge)],ke.prototype,"_targetGraphic",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],ke.prototype,"onImageChanged",void 0),(0,j.Cg)([(0,Le.G)(),(0,j.Sn)("design:type",Function),(0,j.Sn)("design:paramtypes",[]),(0,j.Sn)("design:returntype",void 0)],ke.prototype,"nextImage",null),(0,j.Cg)([(0,Le.G)(),(0,j.Sn)("design:type",Function),(0,j.Sn)("design:paramtypes",[]),(0,j.Sn)("design:returntype",void 0)],ke.prototype,"previousImage",null),ke=(0,j.Cg)([(0,H.EV)("ImageCycle",H.YH.ui)],ke);var Be=U(30290);let Ue=class extends $.u{constructor(){super(...arguments),this._speed=250,this.onTweenStarted=new Mt.H,this.onTweenStopped=new Mt.H,this._isReturning=!1}toggleTween(){const k=this.gameObject.transform;this._movementTween?(this._movementTween.onRepeat.removeAll(),this._movementTween.remove(),this._movementTween=null,this.resetPosition(),this.onTweenStopped.dispatch()):(this.resetPosition(),this._movementTween=V.W.instance.game.add.tween(k.localPosition,this),this._movementTween.to({x:this._endPosition.localPosition.x,y:this._endPosition.localPosition.y},this.getTravelDuration(),Be.G.Linear.None,!0,0,-1,!0),this._movementTween.onRepeat.add((()=>{this._isReturning=!this._isReturning,this.faceDirection()})),this.onTweenStarted.dispatch())}resetPosition(){this.gameObject.transform.localPosition=this._startPosition.localPosition,this._isReturning=!1,this.faceDirection()}faceDirection(){if(this.gameObject){const k=this.gameObject.transform,B=this._isReturning?this._startPosition:this._endPosition,U=Math.sign(B.localPosition.x-k.localPosition.x);0!==U&&this.gameObject.transform.setScale(U,k.localScale.y)}}getTravelDuration(){return ut.c.distance(this.gameObject.transform.localPosition.x,this.gameObject.transform.localPosition.y,this._endPosition.localPosition.x,this._endPosition.localPosition.y)/this._speed*1e3}destroy(){this.onTweenStarted.dispose(),this.onTweenStopped.dispose(),super.destroy()}};(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Ue.prototype,"_speed",void 0),(0,j.Cg)([(0,q.Mn)(Ct.d),(0,j.Sn)("design:type",Ct.d)],Ue.prototype,"_startPosition",void 0),(0,j.Cg)([(0,q.Mn)(Ct.d),(0,j.Sn)("design:type",Ct.d)],Ue.prototype,"_endPosition",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Ue.prototype,"onTweenStarted",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Ue.prototype,"onTweenStopped",void 0),Ue=(0,j.Cg)([(0,H.EV)("TransformYoyo",H.YH.motion,"Transform patrol between two points")],Ue);var Fe=U(300),Ge=U(79687);let je=class{constructor(){this.fsmFactories=null,this.data=null,this.variables=null,this.currentState=null,this.onComplete=new Mt.H}get OnComplete(){return this.onComplete}init(k,B,U){this.fsmFactories=k,this.data=B,this.variables=U}execute(k=!1){this.currentState||this.executeNext(k)}executeWithData(k,B){this.currentState=k;const U=this.fsmFactories.createState(k,this.variables);U.OnComplete.addOnce((()=>{this.onStateCompleted(B)}),this),U.execute(B)}executeWithName(k,B){for(let U=0;U0){for(let B=0;B0){let k=!0;for(let B=0;B1)switch(k.charAt(0)){case"$":U=this.findVariable(k.substr(1),B);break;case"#":U=st.w.getActiveScene().container.get(k.substr(1))}return U}if(k.constructor===Array){const U=[];for(let F=0;FB=>{He[k]=B};var We;let qe=We=class{deserializeCollection(k){return We.deserializeCollection(k,this.deserialize)}serializeCollection(k){return We.serializeCollection(k,this.serialize)}static deserializeCollection(k,B){const U=[];if(k)for(let F=0;FB;default:return!1}}};pi=(0,j.Cg)([(0,Ge.injectable)()],pi);let vi=class{constructor(){this.fsmFactories=null,this.data=null,this.variables=null,this.actions=[],this.actionsCompleted=0,this.onComplete=new Mt.H}get OnComplete(){return this.onComplete}init(k,B,U){this.fsmFactories=k,this.data=B,this.variables=U}execute(k=!1){if(k&&Z.V.log(`Executing STATE ${this.data.name}`,J.$.Verbose),this.data.actions.length>0){for(let B=0;B(B,U)=>{const F=k.container.resolve(je);return F.init(this,B,U),F})),this.add(vi,(k=>(B,U)=>{const F=k.container.resolve(vi);return F.init(this,B,U),F})),this.add($e,(k=>(B,U)=>{const F=B.Type;if(He.hasOwnProperty(F)){const G=k.container.resolve(He[F]);return G.init(B,U),G}return null})),this.add(pi,(k=>(B,U)=>{const F=k.container.resolve(pi);return F.init(B,U),F}))}createStateMachine(k,B){return this.create(je,k,B)}createState(k,B){return this.create(vi,k,B)}createAction(k,B){return this.create($e,k,B)}createCondition(k,B){return this.create(pi,k,B)}};gi=(0,j.Cg)([(0,Ge.injectable)()],gi);let mi=class{constructor(k){this.fsmFactories=null,this.fsmFactories=k}execute(k,B,U=null){this.createStateMachine(k,B,U).execute()}createStateMachine(k,B,U){const F=this.fsmFactories.createStateMachine(k,B);return U&&F.OnComplete.addOnce(U),F}};mi=(0,j.Cg)([(0,Ge.injectable)(),(0,j.Qj)(0,(0,Ge.inject)(Y.FSMFactories)),(0,j.Sn)("design:paramtypes",[gi])],mi);let yi=class extends mi{execute(k,B,U=null){this.createStateMachine(k,B,U).execute(!0)}};yi=(0,j.Cg)([(0,Ge.injectable)()],yi);U(3004);var _i=U(36361),Ei=U(18830);let wi=class extends $.u{constructor(){super(...arguments),this.components=[],this.identifier=null,this.context=null}get Identifier(){return this.identifier}set Identifier(k){const B=this.GameObject.findComponentInParent(Ei.b);null!==B&&null!==this.components&&(null!==this.identifier&&B.Container.unbind(this.identifier),null!==k&&this.bindComponents(k,this.components)),this.identifier=k}get Components(){return this.components}set Components(k){const B=this.GameObject.findComponentInParent(Ei.b);null!==B&&null!==this.identifier&&(null!==this.components&&B.Container.unbind(this.identifier),null!==k&&this.bindComponents(this.identifier,k)),this.components=k}get Context(){return null!==this.context?this.context:this.GameObject.findComponentInParent(Ei.b)}set Context(k){null!==this.context&&this.context.Container.unbind(this.identifier),this.context=k,null!==this.identifier&&null!==this.components&&this.bindComponents(this.identifier,this.components)}create(){super.create(),null!==this.identifier&&null!==this.components&&this.bindComponents(this.identifier,this.components)}destroy(){if(null!==this.identifier){const k=this.Context;null!==k&&k.Container.unbind(this.identifier)}super.destroy()}bindComponents(k,B){const U=this.Context;null!==U&&(1===B.length?U.Container.bind(k).toConstantValue(B[0]):B.length>1&&U.Container.bind(k).toConstantValue(B))}};(0,j.Cg)([(0,q.E8)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],wi.prototype,"components",void 0),(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],wi.prototype,"identifier",void 0),(0,j.Cg)([(0,q.Mn)(Ei.b),(0,j.Sn)("design:type",Ei.b)],wi.prototype,"context",void 0),wi=(0,j.Cg)([(0,H.EV)("ContextBinding",H.YH.injection,"Context binding component is a way of pushing binding up the chain of GameObjects")],wi);const Ti=(k,B,U)=>{const F=`INJECTION_PARAMS_${B}`,G=U.value;U.value=function(...B){const U=Reflect.getMetadata(F,k);if(Array.isArray(U))for(let k=0;k(B,U,F)=>{const G=`INJECTION_PARAMS_${U}`,j=Reflect.getMetadata(G,B);Array.isArray(j)?j.push({identifier:k,index:F}):Reflect.defineMetadata(G,[{identifier:k,index:F}],B)},Ai=(k,B=!0)=>(U,F)=>{Object.defineProperty(U,F,{get(){const U=jt.U.getInjectedValue(this.gameObject,k);return B&&null!==U&&Object.defineProperty(this,F,{get:()=>U}),U},configurable:!0})},Ci=(k,B=!0)=>(U,F)=>{Object.defineProperty(U,F,{get(){const U=this.getInjectedValue(k);return B&&null!==U&&Object.defineProperty(this,F,{get:()=>U}),U},configurable:!0})};class Oi{constructor(){this.container=null,this._isInstalled=!1}get Container(){return this.container}install(k){this.container=k,this._isInstalled||(this.installBindings(),this._isInstalled=!0)}cleanup(){}}class Ii extends $.u{getInjectedValue(k){return jt.U.getInjectedValue(this.gameObject,k)}}class Di{constructor(k){this.container=null,this.container=k}getInjectedValue(k){return this.container.get(k)}}let Ri=class extends $.u{constructor(){super(...arguments),this.installers=[]}get Installers(){return this.installers}create(){super.create(),this.installers.length>0&&this.runInstallers()}runInstallers(){for(let k=0;k0){const k=st.w.getActiveScene().container;k.hasBinding(this._identifier)||k.bind(this._identifier).toConstantValue(1===this._components.length?this._components[0]:this._components)}}destroy(){if(null!==this._identifier){const k=1===this._components.length?this._components[0]:this._components;st.w.getActiveScene().container.get(this._identifier)===k&&st.w.getActiveScene().container.unbind(this._identifier)}super.destroy()}};(0,j.Cg)([(0,q.Mn)($.u),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],Pi.prototype,"_components",void 0),(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],Pi.prototype,"_identifier",void 0),Pi=(0,j.Cg)([(0,H.EV)("SceneContextBinding",H.YH.injection,"Binds the list of components to the scene container")],Pi);var Mi=U(86766),Ni=U(93337);let xi=class extends $.u{setState(k){}};var Li;xi=(0,j.Cg)([(0,H.EV)("TransitionComponent (abstract)")],xi),function(k){k[k.Default=0]="Default",k[k.Over=1]="Over",k[k.Down=2]="Down",k[k.Focus=3]="Focus",k[k.Disabled=4]="Disabled"}(Li||(Li={}));let ki=class extends Mi.S{constructor(){super(...arguments),this._transitions=[],this._useHandCursor=!0,this.allowDisabledInput=!1,this._isButtonEnabled=!0,this.alwaysTransition=!1,this._currentState=Li.Default}get isButtonEnabled(){return this._isButtonEnabled}get _canTransition(){return this._currentState!==Li.Disabled||this.alwaysTransition}get currentState(){return this._currentState}set awaitingListeners(k){this._awaitingListeners=k,this.applyInputEnabledSetting(!k),this.setState(k?Li.Disabled:Li.Default)}create(){super.create(),this._transitions=this.GameObject.findComponentsInChildren(xi)}destroy(){this._transitions=[],super.destroy()}firstUpdate(){super.firstUpdate(),this.setState(this._currentState)}setButtonEnabled(k=!0){k!==this._isButtonEnabled&&(this._isButtonEnabled=k,this.allowDisabledInput||(this.inputEnabled=k,this.applyUseHandCursorSetting(!!k&&this._useHandCursor)),this.setState(k?Li.Default:Li.Disabled))}onPointerDown(k){(0,Ni.H)(k)||this.shouldDebounce()||(this._canTransition&&this.setState(Li.Down),super.onPointerDown(k))}onPointerUp(k){(0,Ni.H)(k)||this.shouldDebounce()||(this._canTransition&&(this._isOver?this.setState(Li.Over):this.setState(this._isButtonEnabled?Li.Default:Li.Disabled)),super.onPointerUp(k))}onPointerUpOutside(k){(0,Ni.H)(k)||(this._canTransition&&this.setState(this._isButtonEnabled?Li.Default:Li.Disabled),super.onPointerUpOutside(k))}onPointerOver(k){(0,Ni.H)(k)||(this._canTransition&&this.setState(Li.Over),this._isOver=!0,super.onPointerOver(k))}onPointerOut(k){(0,Ni.H)(k)||(this._canTransition&&this.setState(this._isButtonEnabled?Li.Default:Li.Disabled),this._isOver=!1,super.onPointerOut(k))}setState(k){this._currentState=k;for(let B=0;B0){const k=V.W.instance.game.cache.getTexture(F);k&&($.image.texture=k)}$.tint=j,$.setAlpha(U),this.gameObject.transform.setScale(k.x,k.y);break;case this._defaultRenderComponent instanceof Fi:const H=this._defaultRenderComponent;(null==F?void 0:F.length)>0&&H.setSlicedImage(F),H.slicedImage.tint=j,H.slicedImage.alpha=U,this.gameObject.transform.setScale(k.x,k.y);break;case this._defaultRenderComponent instanceof re:(null==F?void 0:F.length)>0&&Z.V.log("Associated RenderComponent (Text) is not a supported type for image transitions",J.$.Warning);const W=this._defaultRenderComponent;W.tint=j,W.alpha=U,this.gameObject.transform.setScale(k.x,k.y);break;case this._defaultRenderComponent instanceof Ui.j:const q=this._defaultRenderComponent;q.tintColor=B,q.alpha=U,q.tintIntensity=G,this.gameObject.transform.setScale(k.x,k.y),q.updateFilter();break;default:const K=this._defaultRenderComponent.getRootContainer();K&&(K.alpha=U),this.gameObject.transform.setScale(k.x,k.y),Z.V.log("Associated RenderComponent is not a supported type for tint or image transitions",J.$.Warning)}}};(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String)],Gi.prototype,"_tintDefault",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String)],Gi.prototype,"_tintOver",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String)],Gi.prototype,"_tintDown",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String)],Gi.prototype,"_tintFocus",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String)],Gi.prototype,"_tintDisable",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"tintIntensityDefault",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"tintIntensityOver",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"tintIntensityDown",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"tintIntensityFocus",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"tintIntensityDisable",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"alphaDefault",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"alphaOver",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"alphaDown",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"alphaFocus",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"alphaDisable",void 0),(0,j.Cg)([(0,q._H)(),(0,j.Sn)("design:type",pt.I)],Gi.prototype,"_scaleDefault",void 0),(0,j.Cg)([(0,q._H)(),(0,j.Sn)("design:type",pt.I)],Gi.prototype,"_scaleOver",void 0),(0,j.Cg)([(0,q._H)(),(0,j.Sn)("design:type",pt.I)],Gi.prototype,"_scaleDown",void 0),(0,j.Cg)([(0,q._H)(),(0,j.Sn)("design:type",pt.I)],Gi.prototype,"_scaleFocus",void 0),(0,j.Cg)([(0,q._H)(),(0,j.Sn)("design:type",pt.I)],Gi.prototype,"_scaleDisable",void 0),(0,j.Cg)([(0,q.i0)(Bi.Z.SingleImage),(0,j.Sn)("design:type",String)],Gi.prototype,"_assetDefault",void 0),(0,j.Cg)([(0,q.i0)(Bi.Z.SingleImage),(0,j.Sn)("design:type",String)],Gi.prototype,"_assetOver",void 0),(0,j.Cg)([(0,q.i0)(Bi.Z.SingleImage),(0,j.Sn)("design:type",String)],Gi.prototype,"_assetDown",void 0),(0,j.Cg)([(0,q.i0)(Bi.Z.SingleImage),(0,j.Sn)("design:type",String)],Gi.prototype,"_assetFocus",void 0),(0,j.Cg)([(0,q.i0)(Bi.Z.SingleImage),(0,j.Sn)("design:type",String)],Gi.prototype,"_assetDisable",void 0),(0,j.Cg)([(0,Vt.Pq)(Pt.y),(0,j.Sn)("design:type",Pt.y)],Gi.prototype,"_defaultRenderComponent",void 0),Gi=(0,j.Cg)([(0,H.EV)("RenderableTransition",H.YH.transition),(0,_t.W)(Ne)],Gi);let ji=class extends $.u{constructor(){super(...arguments),this.ratio=1}get rectTransform(){return this._rectTransform}};(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],ji.prototype,"ratio",void 0),(0,j.Cg)([(0,Vt.Pq)(ft.X),(0,j.Sn)("design:type",ft.X)],ji.prototype,"_rectTransform",void 0),ji=(0,j.Cg)([(0,H.EV)("FlexGrow",H.YH.uiLayout,"A data component that tells `FlexContainerComponent` that this child object should grow.")],ji);const $i=(k,B)=>k+B;var Hi,Vi,Wi;!function(k){k[k.Rows=0]="Rows",k[k.Columns=1]="Columns"}(Hi||(Hi={})),function(k){k[k.Gutter=0]="Gutter",k[k.Centered=1]="Centered",k[k.SpaceEvenly=2]="SpaceEvenly"}(Vi||(Vi={})),function(k){k[k.Top=0]="Top",k[k.Center=1]="Center",k[k.Bottom=2]="Bottom"}(Wi||(Wi={}));let qi=class extends $.u{constructor(){super(...arguments),this.onChildrenRearranged=new Mt.H,this.resizeContainer=!0,this.minWidth=0,this.minHeight=0,this.wrap=!1,this.direction=Hi.Rows,this.gutter=0,this.rowGutter=0,this.useRowGutter=!1,this.spacing=Vi.Gutter,this.align=Wi.Top,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0,this.paddingLeft=0,this._shouldRearrangeChildren=!0}getSizeOfRectForDirection(k,B=!1){return this.direction===Hi.Columns?B?k.widthDelta:k.heightDelta:B?k.heightDelta:k.widthDelta}rowSizeOfChildren(k){return k.reduce(((k,B)=>k+this.getSizeOfRectForDirection(B.findComponent(ft.X))),0)+(k.length-1)*this.gutter}resizeChildrenForRow(k,B){const U=k.reduce(((k,B)=>{const U=B.findComponent(ji);if(U){const{rectTransform:B}=U;this.direction===Hi.Rows?B.setSizeDelta(0,B.heightDelta):B.setSizeDelta(B.widthDelta,0),k.push(U)}return k}),[]),F=Math.max(B-this.rowSizeOfChildren(k),0),G=U.map((k=>k.ratio)).reduce($i,0);U.forEach((k=>{const{rectTransform:B}=k,U=F/G*k.ratio+this.getSizeOfRectForDirection(B);this.direction===Hi.Rows?B.setSizeDelta(U,B.heightDelta):B.setSizeDelta(B.widthDelta,U)}))}distributeChildrenOnRow(k,B,U){this.resizeChildrenForRow(k,B);const F=k.map((k=>k.findComponent(ft.X))),G=F.map((k=>this.getSizeOfRectForDirection(k))).reduce($i,0),j=(()=>this.spacing===Vi.SpaceEvenly?Math.max(this.gutter,(B-G)/(k.length-1)):this.gutter)();let $=this.direction===Hi.Rows?this.paddingLeft:this.paddingTop;if(this.spacing===Vi.Centered){$+=Math.max(B-this.rowSizeOfChildren(k),0)/2}const H=F.map((k=>this.getSizeOfRectForDirection(k,!0))).reduce(((k,B)=>Math.max(k,B)),0);for(const V of F){let k=U;const B=this.getSizeOfRectForDirection(V,!0);this.align===Wi.Center?k+=(H-B)/2:this.align===Wi.Bottom&&(k+=H-B),this.direction===Hi.Columns?V.setPosition(k,$):V.setPosition($,k),$+=this.getSizeOfRectForDirection(V)+j}return H}arrangeChildren(){const k=this.gameObject.children.filter((k=>k.active));if(0===k.length)return;const B=(()=>this.direction===Hi.Columns?this._rectTransform.fullHeight-this.paddingBottom-this.paddingTop:this._rectTransform.fullWidth-this.paddingLeft-this.paddingRight)();let U=this.direction===Hi.Rows?this.paddingTop:this.paddingLeft;const F=[];if(this.wrap)for(const j of k){const k=this.getSizeOfRectForDirection(j.findComponent(ft.X));if(this.rowSizeOfChildren(F)+k+this.gutter>B){U+=this.distributeChildrenOnRow(F,B,U)+(this.useRowGutter?this.rowGutter:this.gutter),F.length=0}F.push(j)}else F.push(...k);const G=this.distributeChildrenOnRow(F,B,U);if(this.resizeContainer){const k=G+U+(this.direction===Hi.Rows?this.paddingBottom:this.paddingRight);this.direction===Hi.Rows?this._rectTransform.setSizeDelta(this._rectTransform.widthDelta,Math.max(this.minHeight,k)):this.direction===Hi.Columns&&this._rectTransform.setSizeDelta(Math.max(this.minWidth,k),this._rectTransform.heightDelta)}}triggerRearrange(){this._shouldRearrangeChildren=!0}postCreate(){super.postCreate(),this._rectTransform||(this._rectTransform=this.gameObject.findComponent(ft.X)||this.gameObject.addComponent(ft.X)),this._rectTransform.onDimensionsChanged.add(this.arrangeChildren,this);const k=k=>{k.onActiveChanged.add(this.triggerRearrange,this);const B=k.findComponent(ft.X);if(!B)throw new Error("Children of FlexContainerComponent must have a RectTransform");B.onDimensionsChanged.add(this.triggerRearrange,this),this.triggerRearrange()};this.gameObject.children.forEach(k),this.gameObject.onChildAdded.add(k),this.gameObject.onChildRemoved.add((k=>{var B;k.onActiveChanged.remove(this.triggerRearrange,this),null===(B=k.findComponent(ft.X))||void 0===B||B.onDimensionsChanged.remove(this.triggerRearrange,this),this.triggerRearrange()}))}destroy(){this._rectTransform.onDimensionsChanged.remove(this.arrangeChildren,this),super.destroy()}update(){this._shouldRearrangeChildren&&(this.arrangeChildren(),this._shouldRearrangeChildren=!1,this.onChildrenRearranged.dispatch())}setMinHeight(k){this.minHeight=k,this.resizeContainerToMins()}resizeContainerToMins(){this._rectTransform.setSizeDelta(Math.max(this.minWidth,this._rectTransform.widthDelta),Math.max(this.minHeight,this._rectTransform.heightDelta))}};(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],qi.prototype,"onChildrenRearranged",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],qi.prototype,"resizeContainer",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],qi.prototype,"minWidth",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],qi.prototype,"minHeight",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],qi.prototype,"wrap",void 0),(0,j.Cg)([(0,q.gf)(Hi),(0,j.Sn)("design:type",Number)],qi.prototype,"direction",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],qi.prototype,"gutter",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],qi.prototype,"rowGutter",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],qi.prototype,"useRowGutter",void 0),(0,j.Cg)([(0,q.gf)(Vi),(0,j.Sn)("design:type",Number)],qi.prototype,"spacing",void 0),(0,j.Cg)([(0,q.gf)(Wi),(0,j.Sn)("design:type",Number)],qi.prototype,"align",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],qi.prototype,"paddingTop",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],qi.prototype,"paddingRight",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],qi.prototype,"paddingBottom",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],qi.prototype,"paddingLeft",void 0),(0,j.Cg)([(0,Vt.Pq)(ft.X),(0,j.Sn)("design:type",ft.X)],qi.prototype,"_rectTransform",void 0),qi=(0,j.Cg)([(0,H.EV)("FlexContainer",H.YH.uiLayout,"`FlexContainerComponent` will automatically arrange its children into rows or columns based on the size of the its and the child's `RectTransform`.")],qi);var Ki,zi=U(82538),Yi=U(21979);!function(k){k[k.Start=0]="Start",k[k.Center=1]="Center",k[k.End=2]="End"}(Ki||(Ki={}));let Qi=class extends Yi.P{constructor(){super(...arguments),this._fixedRowCount=0,this._fixedColumnCount=0,this._dynamicRowHeight=!1,this._dynamicColumnWidth=!1,this._rowSpacing=0,this._columnSpacing=0,this._xPositionOffset=0,this._yPositionOffset=0,this._alignmentAnchorX=0,this._alignmentAnchorY=0,this._fillPriority=zi.e.Horizontal,this._reverseFillRow=!1,this._reverseFillColumn=!1,this._indexOffset=0,this.onUpdated=new Mt.H,this._lastLineAlignment=Ki.Start}get fixedRowCount(){return this._fixedRowCount}get fixedColumnCount(){return this._fixedColumnCount}get dynamicRowHeight(){return this._dynamicRowHeight}get dynamicColumnWidth(){return this._dynamicColumnWidth}get rowSpacing(){return this._rowSpacing}get columnSpacing(){return this._columnSpacing}get xPositionOffset(){return this._xPositionOffset}get yPositionOffset(){return this._yPositionOffset}get alignmentAnchorX(){return this._alignmentAnchorX}get alignmentAnchorY(){return this._alignmentAnchorY}get fillPriority(){return this._fillPriority}get indexOffset(){return this._indexOffset}set indexOffset(k){this._indexOffset=k}postDeserialize(){super.postDeserialize(),this._fixedRowCount<1&&this._fixedColumnCount<1?(Z.V.log("At least one direction in grid needs to be a fixed size",J.$.Error),this._fixedRowCount=1,this._fixedColumnCount=1):this._fixedRowCount<1&&this._fixedColumnCount>=1?(this._fillPriority=zi.e.Horizontal,this._reverseFillRow=!1):this._fixedRowCount>=1&&this._fixedColumnCount<1&&(this._fillPriority=zi.e.Vertical,this._reverseFillColumn=!1)}destroy(){this.onUpdated.dispose(),super.destroy()}setFixedColumnCount(k){this._fixedColumnCount=k,this.updateAll()}setFixedRowCount(k){this._fixedRowCount=k,this.updateAll()}setXOffset(k){this._xPositionOffset=k,this.updateAll()}setYOffset(k){this._yPositionOffset=k,this.updateAll()}getLayoutPositionX(k){const B=this.getColumn(k+this._indexOffset),U=this.getTotalCellCount(),F=this.getGameObjectList().length;if(this.fillPriority===zi.e.Vertical||1===this.getColumnCount()||this._dynamicColumnWidth||F===U||k+this._indexOffset=1&&(B=this._fixedRowCount-1-B),B}getColumn(k){let B;return B=this._fillPriority===zi.e.Horizontal?k%this._fixedColumnCount:Math.floor(k/this._fixedRowCount),this._reverseFillColumn&&this._fixedColumnCount>=1&&(B=this._fixedColumnCount-1-B),B}getRowCount(){const k=this.getGameObjectList().length+this._indexOffset;return this._fillPriority===zi.e.Horizontal?Math.ceil(k/this._fixedColumnCount):Math.min(k,this._fixedRowCount)}getColumnCount(){const k=this.getGameObjectList().length+this._indexOffset;return this._fillPriority===zi.e.Horizontal?Math.min(k,this._fixedColumnCount):Math.ceil(k/this._fixedRowCount)}getTotalCellCount(){if(this._fixedRowCount>0&&this._fixedColumnCount>0)return this._fixedRowCount*this._fixedColumnCount}isFilled(){return this._fixedRowCount>=1&&this._fixedColumnCount>=1&&this.getGameObjectList().length>=this._fixedRowCount*this._fixedColumnCount}isEmpty(){return this.getGameObjectList().length<=0}setRowSpacing(k){this._rowSpacing=k,this.updateAll()}setColumnSpacing(k){this._columnSpacing=k,this.updateAll()}updateAll(k=!0){const B=this.updateCachedDimensions();super.updateAll(k),this.onUpdated.dispatch(B)}updateCachedDimensions(){const k=Math.max(1,this.getRowCount()),B=Math.max(1,this.getColumnCount()),U=new Array(k).fill(0),F=new Array(B).fill(0),G=this.getGameObjectList();for(let H=G.length-1;H>=0;--H){const k=this.getRow(H),B=this.getColumn(H),j=G[H],$=Ft.getWidth(j),V=Ft.getHeight(j);U[k]=Math.max(U[k],V),F[B]=Math.max(F[B],$)}this._cachedColumnX=new Array(B),this._cachedRowY=new Array(k);let j=this._xPositionOffset,$=this._yPositionOffset;for(let H=0;H0){return this.getColumn(k+this.indexOffset)%this.fixedRowCount%2==0?this.alignmentAnchorX:this._alternateAnchorX}return this.alignmentAnchorX}getLayoutAnchorY(k){if(it.A.isDefined(this._alternateAnchorY)&&this.fixedColumnCount>0){return this.getColumn(k+this.indexOffset)%this.fixedColumnCount%2==0?this.alignmentAnchorY:this._alternateAnchorY}return this.alignmentAnchorY}};var Zi,Ji;(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Xi.prototype,"_alternateAnchorX",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Xi.prototype,"_alternateAnchorY",void 0),Xi=(0,j.Cg)([(0,H.EV)("AlternatingAnchorGridLayout",H.YH.uiLayout,"A custom grid layout component")],Xi),function(k){k[k.Start=0]="Start",k[k.Center=1]="Center",k[k.End=2]="End"}(Zi||(Zi={})),function(k){k[k.None=0]="None",k[k.SpaceAround=1]="SpaceAround",k[k.SpaceBetween=2]="SpaceBetween"}(Ji||(Ji={}));let ts=class extends Yi.P{constructor(){super(...arguments),this.resizeRectTransform=!1,this.fixedRowCount=0,this.fixedColumnCount=0,this.dynamicRowHeight=!1,this.dynamicColumnWidth=!1,this.justifyRowSpacing=Ji.None,this.justifyColumnSpacing=Ji.None,this.rowHeight=0,this.columnWidth=0,this._rowSpacing=0,this._columnSpacing=0,this.childAlignmentX=.5,this.childAlignmentY=.5,this.applyChildPivotX=!1,this.applyChildPivotY=!1,this.childPivotX=.5,this.childPivotY=.5,this._fillPriority=zi.e.Horizontal,this.reverseFillRow=!1,this.reverseFillColumn=!1,this.beginningEmptyCells=0,this.lastLineAlignment=Zi.Start,this.onUpdated=new Mt.H}get rowSpacing(){return this._rowSpacing}set rowSpacing(k){this._rowSpacing=k,this.updateAll()}get columnSpacing(){return this._columnSpacing}set columnSpacing(k){this._columnSpacing=k,this.updateAll()}get fillPriority(){return this.fixedRowCount<1&&this.fixedColumnCount>=1?zi.e.Horizontal:this.fixedRowCount>=1&&this.fixedColumnCount<1?zi.e.Vertical:this._fillPriority}set fillPriority(k){this._fillPriority=k,this.updateAll()}destroy(){this.onUpdated.dispose(),super.destroy()}getLayoutAnchorX(k){var B;if(this.applyChildPivotX)return this.childPivotX;const U=null===(B=this.getGameObjectList()[k])||void 0===B?void 0:B.transform;return U instanceof ft.X?U.pivot.x:0}getLayoutAnchorY(k){var B;if(this.applyChildPivotY)return this.childPivotY;const U=null===(B=this.getGameObjectList()[k])||void 0===B?void 0:B.transform;return U instanceof ft.X?U.pivot.y:0}getLayoutPositionX(k){const B=this.getColumn(k+this.beginningEmptyCells);return!this._cachedLastLinePositions||this.fillPriority===zi.e.Vertical||k+this.beginningEmptyCells=1&&(U=B-1-U),U}getColumn(k){const B=this.getColumnCount();let U;return U=this.fillPriority===zi.e.Horizontal?k%B:Math.floor(k/this.getRowCount()),this.reverseFillColumn&&B>=1&&(U=B-1-U),U}getRowCount(){const k=this.getGameObjectList().length+this.beginningEmptyCells;return this.fillPriority===zi.e.Vertical?this.fixedRowCount>0?this.fixedRowCount:Math.max(1,k):this.fixedColumnCount>=1?Math.max(1,this.fixedRowCount,Math.ceil(k/this.fixedColumnCount)):1}getColumnCount(){const k=this.getGameObjectList().length+this.beginningEmptyCells;return this.fillPriority===zi.e.Horizontal?this.fixedColumnCount>0?this.fixedColumnCount:Math.max(1,k):this.fixedRowCount>=1?Math.max(1,this.fixedColumnCount,Math.ceil(k/this.fixedRowCount)):1}getTotalCellCount(){return this.getRowCount()*this.getColumnCount()}isFilled(){return this.fixedRowCount>=1&&this.fixedColumnCount>=1&&this.getGameObjectList().length+this.beginningEmptyCells>=this.fixedRowCount*this.fixedColumnCount}isEmpty(){return this.getGameObjectList().length+this.beginningEmptyCells<=0}updateByIndex(k){var B;const U=null===(B=this.getGameObjectList()[k])||void 0===B?void 0:B.transform;U instanceof ft.X&&(U.setAnchorMin(.5,.5),U.setAnchorMax(.5,.5)),super.updateByIndex(k)}updateAll(k=!0){const B=this.updateCachedDimensions();super.updateAll(k),k&&this.resizeRectTransform&&this.gameObject.transform instanceof ft.X&&(this.gameObject.transform.fullWidth=B.width,this.gameObject.transform.fullHeight=B.height),this.onUpdated.dispatch(B)}updateCachedDimensions(){const k=this.getRowCount(),B=this.getColumnCount(),U=new Array(k).fill(this.rowHeight),F=new Array(B).fill(this.columnWidth),G=this.getGameObjectList();if(this.dynamicColumnWidth||this.dynamicRowHeight)for(let Y=G.length-1;Y>=0;--Y){const k=this.getRow(Y+this.beginningEmptyCells),B=this.getColumn(Y+this.beginningEmptyCells),j=G[Y],$=j.transform instanceof ft.X?j.transform:null;if(this.dynamicColumnWidth&&(!$||$.anchorMax.x===$.anchorMin.x)){const k=Ft.getWidth(j);F[B]=Math.max(F[B],k)}if(this.dynamicRowHeight&&(!$||$.anchorMax.y===$.anchorMin.y)){const B=Ft.getHeight(j);U[k]=Math.max(U[k],B)}}if(this.GameObject.children.length>1&&this.justifyRowSpacing!==Ji.None&&this.GameObject.transform instanceof ft.X){const B=tt.sum(U),F=this.justifyRowSpacing===Ji.SpaceAround?k+1:k-1;this._rowSpacing=Math.max(0,(this.GameObject.transform.sizeDelta.height-B)/F)}if(this.GameObject.children.length>1&&this.justifyColumnSpacing!==Ji.None&&this.GameObject.transform instanceof ft.X){const k=tt.sum(F),U=this.justifyColumnSpacing===Ji.SpaceAround?B+1:B-1;this._columnSpacing=Math.max(0,(this.GameObject.transform.sizeDelta.width-k)/U)}this._cachedColumnX=new Array(B),this._cachedRowY=new Array(k);const j=tt.sum(F)+(B-1)*this._columnSpacing,$=tt.sum(U)+(k-1)*this._rowSpacing;let H=.5,V=.5,W=j,q=$;this.gameObject.transform instanceof ft.X&&(H=this.gameObject.transform.pivot.x,V=this.gameObject.transform.pivot.y,this.resizeRectTransform||(W=this.gameObject.transform.fullWidth,q=this.gameObject.transform.fullHeight));let K=Math.round(H*-j+(H-.5)*W),z=Math.round(V*-$+(V-.5)*q);for(let Y=0;Y1&&k>1){const U=this.fillPriority===zi.e.Horizontal,F=(G.length+this.beginningEmptyCells)%(U?B:k);if(F>0)if(this.lastLineAlignment===Zi.Center){const k=U?this._columnSpacing:this._rowSpacing;let B=-k;const j=U?this.dynamicColumnWidth?Ft.getWidth:()=>0:this.dynamicRowHeight?Ft.getHeight:()=>0,$=tt.takeRight(G,F).map((U=>{const F=j(U);return B+=F+k,B})),H=$[0],V=B;this._cachedLastLinePositions=$.map((k=>k-H+this.childPivotX*H-(V>>1)))}else this._cachedLastLinePositions=tt.takeRight(U?this._cachedColumnX:this._cachedRowY,F)}return new bt.o(j,$)}};var es;(0,j.Cg)([(0,q.vk)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Boolean)],ts.prototype,"resizeRectTransform",void 0),(0,j.Cg)([(0,q.g1)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"fixedRowCount",void 0),(0,j.Cg)([(0,q.g1)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"fixedColumnCount",void 0),(0,j.Cg)([(0,q.vk)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Boolean)],ts.prototype,"dynamicRowHeight",void 0),(0,j.Cg)([(0,q.vk)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Boolean)],ts.prototype,"dynamicColumnWidth",void 0),(0,j.Cg)([(0,q.gf)(Ji),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"justifyRowSpacing",void 0),(0,j.Cg)([(0,q.gf)(Ji),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"justifyColumnSpacing",void 0),(0,j.Cg)([(0,q.g1)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"rowHeight",void 0),(0,j.Cg)([(0,q.g1)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"columnWidth",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],ts.prototype,"_rowSpacing",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],ts.prototype,"_columnSpacing",void 0),(0,j.Cg)([(0,q.g1)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"childAlignmentX",void 0),(0,j.Cg)([(0,q.g1)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"childAlignmentY",void 0),(0,j.Cg)([(0,q.vk)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Boolean)],ts.prototype,"applyChildPivotX",void 0),(0,j.Cg)([(0,q.vk)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Boolean)],ts.prototype,"applyChildPivotY",void 0),(0,j.Cg)([(0,q.g1)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"childPivotX",void 0),(0,j.Cg)([(0,q.g1)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"childPivotY",void 0),(0,j.Cg)([(0,q.gf)(zi.e),(0,j.Sn)("design:type",String)],ts.prototype,"_fillPriority",void 0),(0,j.Cg)([(0,q.vk)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Boolean)],ts.prototype,"reverseFillRow",void 0),(0,j.Cg)([(0,q.vk)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Boolean)],ts.prototype,"reverseFillColumn",void 0),(0,j.Cg)([(0,q.g1)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"beginningEmptyCells",void 0),(0,j.Cg)([(0,q.gf)(Zi),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"lastLineAlignment",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],ts.prototype,"onUpdated",void 0),ts=(0,j.Cg)([(0,H.EV)("GridLayoutNew",H.YH.uiLayout,"Grid layout component for UI")],ts),function(k){k[k.JSON=0]="JSON",k[k.Image=1]="Image",k[k.Atlas=2]="Atlas",k[k.Music=3]="Music",k[k.Sound=4]="Sound",k[k.Spine=5]="Spine",k[k.Binary=6]="Binary"}(es||(es={}));let is=class{constructor(){this.dataSource=null,this.onDataSourceUpdated=new Mt.H}setDataSource(k){this.dataSource=k,this.onDataSourceUpdated.dispatch()}destroy(){this.onDataSourceUpdated.dispose()}};is=(0,j.Cg)([(0,Ge.injectable)()],is);let ss=class extends is{getText(k,...B){if(it.A.isDefined(k)&&""===k.trim())return k;if(it.A.isDefined(this.dataSource)){let U=this.dataSource.getValue(k);if(it.A.isDefined(U)){for(let k=0;k=this._minimumLogLevel&&(this._shouldColorCodeLogs?console.log(`%c[${J.$[B].toUpperCase()}]%c ${k}`,this.getLogStyle(B),this.getTextStyle(),...U):console.log(`[${J.$[B].toUpperCase()}] ${k}`,...U),B===this._stackTraceLogLevel&&(console.groupCollapsed(`Error: ${k}`),console.trace(),console.groupEnd()))}table(k,B,U){"object"==typeof k?B>=this._minimumLogLevel&&console.table(k,U):this.log("Message must be an object or array to be logged as a table",J.$.Warning)}setLogLevel(k){this._minimumLogLevel=k}setColoredLogsEnabled(k){this._shouldColorCodeLogs=k}getLogStyle(k){switch(k){case J.$.Verbose:return"background: #009688; color: #EEEEEE; padding: 2px";case J.$.Warning:return"background: #FEEFB3; color: #9F6000; padding: 2px";case J.$.Error:return"background: #FFD2D2; color: #D8000C; padding: 2px";default:return""}}getTextStyle(){return"color: #000; background-color: #FFF; padding: 0"}}ns.CSS_HIGHLIGHT_PINK="display: inline-block ; background-color: #e0005a ; color: #ffffff ; font-weight: bold ; padding: 3px 7px 3px 7px ; border-radius: 3px 3px 3px 3px ;",ns.CSS_HIGHLIGHT_GOLD="display: inline-block ; background-color: gold ; color: black ; font-weight: bold ; padding: 3px 7px 3px 7px ; border-radius: 3px 3px 3px 3px ;",ns.CSS_HIGHLIGHT_GREEN="display: inline-block ; background-color: #2ffa62 ; color: black ; font-weight: bold ; padding: 3px 7px 3px 7px ; border-radius: 3px 3px 3px 3px ;",ns.CSS_BOLD="font-weight: bold ;";var as,rs,os=U(49415),hs=U(80473);class cs extends $.u{constructor(){super(...arguments),this.image=null,this.animationData=[],this.isPlaying=!1,this.frameTimeElapsed=0,this.frameIndex=0}create(){super.create(),this.image=this.GameObject.findComponent(ge)}update(){if(super.update(),this.isPlaying){this.frameTimeElapsed+=V.W.instance.game.time.deltaMS;let k=this.animationData[this.frameIndex].duration,B=this.frameIndex;for(;this.frameTimeElapsed>=k;)++B,this.frameTimeElapsed-=k,B>=this.animationData.length&&(B=0),k=this.animationData[B].duration;B!==this.frameIndex&&(this.frameIndex=B,this.image.updateAsset(this.image.atlasKey,`${this.animationData[this.frameIndex].frame}`))}}playAnimation(){null!==this.image&&(this.isPlaying=!0)}stopAnimation(){this.isPlaying=!1}}class ds extends $.u{constructor(){super(...arguments),this.tiles=[]}addTile(k){this.tiles.push(k),k.OnDestroy.add(this.removeTile,this)}destroy(){var k;for(const B of this.tiles)B.OnDestroy.remove(this.removeTile,this),null===(k=B.GameObject)||void 0===k||k.destroy();super.destroy()}setTileGroupVisibility(k,B,U=1){const F=B?1:0,G={tiles:[],alpha:1-F};for(let j=0;j{for(let k=0;k(0,j.sH)(this,void 0,void 0,(function*(){return as.loadTilesets(k)})))).then((k=>this.parseMap(B,k,U,F,G))).catch((k=>{Z.V.log(`TMXMapLoader: ${Ut.R.stringify(k)}`,J.$.Warning)})).then((B=>(0,j.sH)(this,void 0,void 0,(function*(){this.optimizeMapLayer(B,F),this.optimizeMapLayer(B,G),this._loadedMap=B,this.onMapLoaded.dispatch(k)}))))}static loadMapFileFromUrl(k){return(0,j.sH)(this,void 0,void 0,(function*(){return V.W.instance.loader.assignAssetData(k,{type:"json",fullURL:k}),as.loadMapFile(k)}))}static loadMapFile(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=V.W.instance.game;return V.W.instance.loader.isLoaded(k,es.JSON)?B.cache.getJSON(k):V.W.instance.loader.loadAssets([k]).then((()=>(0,j.sH)(this,void 0,void 0,(function*(){return Promise.resolve(tt.cloneDeep(B.cache.getJSON(k)))}))))}))}static loadTilesets(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=k.tilesets.map((k=>k.name));return B.every((k=>V.W.instance.loader.isLoaded(k,es.JSON)))?Promise.resolve(k):V.W.instance.loader.loadAssets(B).then((()=>(0,j.sH)(this,void 0,void 0,(function*(){return Promise.resolve(k)}))))}))}parseMap(k,B,U,F,G){const j=k.addComponent(ds);for(const $ of B.layers){let k=$.visible,H=F;if($.properties){it.A.isDefined($.properties.isAbove)?H=G:it.A.isDefined($.properties.content)&&(H=U);const B=tt.get($,"properties.toggle",-1);B>-1&&this._disabledToggleGroups.includes(B)&&(k=!1),it.A.isDefined($.properties.reference)&&(k=!1)}if(k){const k=this.createLayer(H,$,B.tilesets);for(const B of k)j.addTile(B)}}return j}createLayer(k,B,U){const F=new Te._(k);return F.name=B.name,F.addComponent(this.useLegacyTransforms?pe.K:Ct.d),it.A.isDefined(B.objects)?this.createObjectLayer(F,B,U):this.createTiledLayer(F,B,U)}createObjectLayer(k,B,U){var F,G,j;const $=[],H=as.TILE_SIZE>>1;for(const V of B.objects){const W=tt.get(B,"properties.dynamicToggle",-1),q=this.createTile(k,V.gid,V.x,V.y,U,W,null,null===(F=B.properties)||void 0===F?void 0:F.tag,B.opacity);if(it.A.isDefined(q)){if(this.useLegacyTransforms)null===(G=q.GameObject.legacyTransform)||void 0===G||G.group.position.set(V.x+H,V.y-H),q.GameObject.findComponent(ge).setAnchor(.5,.5);else{const k=V.x+H+Math.sin(V.rotation*Math.PI/180)*as.TILE_SIZE,B=V.y-H,U=q.GameObject.transform;U.setPosition(k,B),U.setRotation(null!==(j=V.rotation)&&void 0!==j?j:0)}$.push(q)}}return $}createTiledLayer(k,B,U){var F;const G=it.A.isDefined(B.properties)&&B.properties.useAnimDuration,j=tt.get(B,"properties.dynamicToggle",-1),$=[];let H=0;const V=B.height,W=B.width;for(let q=0;q({isLoaded:k=>V.W.instance.loader.isLoaded(k,es.Image)})}),J.updateAsset(Q.name,`${q}`),J.setAlpha(W);const et=!!(null==Z?void 0:Z.animation);if(et){const k=V.W.instance.game,B=[],U=X.addComponent(cs);for(const F of Z.animation)B.push(k.cache.getTexture(Q.name,F.tileid)),U.animationData.push({frame:`${F.tileid}`,duration:$?F.duration:250});U.playAnimation()}X.addComponent(ls).rotate(z,K,Y);const st=X.addComponent(us);return it.A.isDefined(j)&&(st.hasToggleGroup=j>-1,st.groupID=j,st.isAnimated=et,st.tag=H,this._disabledToggleGroups.includes(j)&&J.setAlpha(0)),st}static getTileData(k,B){let U=k;U&=~rs.all;const F=as.getTileset(B,U);return it.A.isDefined(F)&&it.A.isDefined(U)?(U-=F.firstgid,{tileset:F,id:U,transform:k&rs.all}):null}static getTileset(k,B){for(const U of k)if(B>=U.firstgid&&B the tiles into the target game objects that are assigned.")],fs),function(k){k[k.none=0]="none",k[k.flippedVertically=1073741824]="flippedVertically",k[k.flippedHorizontally=2147483648]="flippedHorizontally",k[k.flippedDiagonally=536870912]="flippedDiagonally",k[k.all=-536870912]="all"}(bs||(bs={}));class ps{constructor(k,B){this._currentTileCount=0,this._tileIDLocations=new Map,this._nextTileID=1;const U=V.W.instance.game;this.mesh=U.add.simpleMesh({texture:U.add.texture(U.cache.getTexture(k).baseTexture)}),this.mesh.autoUpdate=!1,this.mesh.tint=B,this.mesh.shader.batchable=!1,this.mesh.drawMode=dt.DRAW_MODES.TRIANGLES,this.mesh.visible=!1}destroy(){this.mesh.destroy(),this._tileIDLocations.clear(),this._indexBuffer=null,this._vertexBuffer=null,this._uvBuffer=null}addTiles(k){return this.addTilesAtIndex(k,this._currentTileCount)}addTilesAtIndex(k,B){const U=k.length;if(this.ensureBufferSize(this._currentTileCount+U),B{k>=B&&this._tileIDLocations.set(F,this._tileIDLocations.get(F)+U)}))}const F=[];for(let G=0;Gthis._tileIDLocations.has(k))).sort(((k,B)=>this._tileIDLocations.get(k)-this._tileIDLocations.get(B))),U=B.length;let F=0;for(;Fthis._tileIDLocations.get(B)===k+U),F),G=k*ps.FLOATS_PER_TILE,j=U*ps.FLOATS_PER_TILE;this._vertexBuffer.set(this._vertexBuffer.subarray(G+j),G),this._uvBuffer.set(this._uvBuffer.subarray(G+j),G);const $=B.slice(F,F+U);this._tileIDLocations.forEach(((B,F)=>{$.indexOf(F)>-1?this._tileIDLocations.delete(F):B>k&&this._tileIDLocations.set(F,this._tileIDLocations.get(F)-U)})),F+=U}this.mesh.verticesBuffer.update(this._vertexBuffer),this.mesh.uvBuffer.update(this._uvBuffer),this.mesh.size-=U*ps.INDICES_PER_TILE,this.mesh.visible=this.mesh.size>0,this._currentTileCount-=U}addTileVertexDataAtIndex(k,B){const U=B*ps.FLOATS_PER_TILE;this._vertexBuffer.set([k.x,k.y,k.x+k.width,k.y,k.x+k.width,k.y+k.height,k.x,k.y+k.height],U);const F=this.mesh.texture;it.A.isGuid(k.tileset)||Z.V.log(`${k.tileset} needs its metadata GUID in the name property, not a string for ELA game compatibility.`,J.$.Error);const G=V.W.instance.game.cache.getTextureAtlas(k.tileset).frameData.getFrame(k.frame),j=[{u:G.x/F.width,v:G.y/F.height},{u:(G.x+G.width)/F.width,v:G.y/F.height},{u:(G.x+G.width)/F.width,v:(G.y+G.height)/F.height},{u:G.x/F.width,v:(G.y+G.height)/F.height}];0!=(k.transform&bs.flippedDiagonally)&&it.A.swapArrayIndex(j,1,3),0!=(k.transform&bs.flippedHorizontally)&&(it.A.swapArrayIndex(j,0,1),it.A.swapArrayIndex(j,2,3)),0!=(k.transform&bs.flippedVertically)&&(it.A.swapArrayIndex(j,0,3),it.A.swapArrayIndex(j,1,2)),this._uvBuffer.set([j[0].u,j[0].v,j[1].u,j[1].v,j[2].u,j[2].v,j[3].u,j[3].v],U)}ensureBufferSize(k){var B,U,F,G;const j=k*ps.FLOATS_PER_TILE;if((null!==(U=null===(B=this._vertexBuffer)||void 0===B?void 0:B.length)&&void 0!==U?U:0){k.tileMesh.destroy()})),this._meshTargets=[],this._externalTileIDs.clear()}addTiles(k){const B=this.addTilesToMeshTargets(k),U=new Array(k.length);return B.forEach(((k,B)=>{const F=this._nextTileID++;k.externalID=F,this._externalTileIDs.set(F,k),U[B]=F})),U}addHiddenTiles(k){const B=new Array(k.length);return k.forEach(((k,U)=>{this._hiddenTiles.has(k.dynamicToggleID)||this._hiddenTiles.set(k.dynamicToggleID,[]);const F=this._nextTileID++;this._hiddenTiles.get(k.dynamicToggleID).push({meshID:null,tileID:null,tileData:k,externalID:F}),B[U]=F})),B}removeTiles(k){const B=k.map((k=>this._externalTileIDs.get(k))).filter((k=>!!k)).sort(((k,B)=>k.meshID-B.meshID));let U=0;const F=B.length;for(;UB.meshID===k),U),G=this._meshTargets.find((B=>B.ID===k)),j=B.slice(U,U+F),$=j.map((k=>k.tileID));G.tileMesh.removeTiles($);const H=j.reduce(((k,B)=>{var U;const F=B.tileData.layerIndex;return k[F]=(null!==(U=k[F])&&void 0!==U?U:0)+1,k}),{}),V=Object.keys(H).map((k=>parseInt(k,10))),W=V.length;for(let B=0;B{const F=B.filter((B=>-1===k.indexOf(B.externalID)));F.length>0?this._hiddenTiles.set(U,F):this._hiddenTiles.delete(U)})),this.cleanMeshInstances()}setToggleLayerVisibility(k,B){if(B){if(this._hiddenTiles.has(k)){const B=this._hiddenTiles.get(k),U=this.addTilesToMeshTargets(B.map((k=>k.tileData)));B.forEach(((k,B)=>{const F=U[B];F.externalID=k.externalID,this._externalTileIDs.set(k.externalID,F)})),this._hiddenTiles.delete(k)}}else{const B=Array.from(this._externalTileIDs.values()).filter((B=>B.tileData.dynamicToggleID===k));this._hiddenTiles.set(k,B),this.removeTiles(B.map((k=>k.externalID)))}}addTilesToMeshTargets(k){var B;const U=k.slice().sort(((k,B)=>k.tileset!==B.tileset?k.tileset.localeCompare(B.tileset):k.layerIndex-B.layerIndex)),F=[];U.forEach((k=>{const B={0:k.tileset,1:k.tint},U=k.layerIndex;-1===F.findIndex((k=>this.isConfigurationEqual(k,B)&&k.layer===U))&&F.push(Object.assign(Object.assign({},B),{layer:U}))})),F.forEach((k=>{this.createMeshTarget(k,k.layer)}));let G=0;const j=U.length,$=[];for(;Gk.tileset===F&&k.tint===j&&k.layerIndex===H),G),W=this.getMeshTarget({0:F,1:j},H),q=U.slice(G,G+V),K=W.tileMesh.addTilesAtIndex(q,this.getTileOffsetForLayer(W,H)).map(((k,B)=>({tileID:k,meshID:W.ID,tileData:q[B],externalID:null})));W.layerTileCount[H]=(null!==(B=W.layerTileCount[H])&&void 0!==B?B:0)+V,$.push(...K),G+=V}const H=new Array($.length);return $.forEach((B=>{H[k.indexOf(B.tileData)]=B})),H}hasMeshTarget(k,B){return this._meshTargets.findIndex((U=>this.isConfigurationEqual(k,U.config)&&U.layerRange.min<=B&&U.layerRange.max>=B))>-1}createMeshTarget(k,B){if(this.hasMeshTarget(k,B))return;const U=this._meshTargets.filter((B=>this.isConfigurationEqual(B.config,k))),F=[null,null];if(U.forEach((k=>{k.layerRange.maxk.layerRange.max?F[0]:k:F[1]=F[1]&&F[1].layerRange.mink.layerRange.min!==k.layerRange.max));U.length>0&&U.forEach((k=>{this.splitMeshAtLayer(k,B)})),this.createTileMeshTarget(k,B,B)}}getMeshTarget(k,B){return this._meshTargets.find((U=>this.isConfigurationEqual(k,U.config)&&U.layerRange.min<=B&&U.layerRange.max>=B))}getTargetsBetweenLayers(k,B){return this._meshTargets.filter((U=>U.layerRange.min>k&&U.layerRange.mink&&U.layerRange.maxB))}splitMeshAtLayer(k,B){const U=k.layerRange.max;k.layerRange.max=B;const F=this.createTileMeshTarget(k.config,B+1,U),G=Object.keys(k.layerTileCount).map((k=>parseInt(k,10))).filter((k=>k>B)),j=G.length;for(let $=0;$=this._meshTargets[V].layerRange.max&&U<=(null!==(G=null===(F=this._meshTargets[V+1])||void 0===F?void 0:F.layerRange.min)&&void 0!==G?G:Number.POSITIVE_INFINITY)&&(H=V+1);return this.meshContainer.addChildAt(j.tileMesh.mesh,H),this._meshTargets.splice(H,0,j),j}getTileOffsetForLayer(k,B){const U=Object.keys(k.layerTileCount).map((k=>parseInt(k,10)));let F=0;const G=U.length;for(let j=0;j0;--k){Object.values(this._meshTargets[k].layerTileCount).reduce(((k,B)=>k+B),0)<=0&&(this._meshTargets[k].tileMesh.destroy(),this._meshTargets.splice(k,1))}for(let k=this._meshTargets.length-1;k>0;--k){const B=this._meshTargets[k-1],U=this._meshTargets[k];if(this.isConfigurationEqual(U.config,B.config)){const F=Object.keys(U.layerTileCount).map((k=>parseInt(k,10))),G=F.length;for(let k=0;kB.meshID===k.ID&&B.tileData.layerIndex===U)),j=B.tileMesh.addTilesAtIndex(G.map((k=>k.tileData)),this.getTileOffsetForLayer(B,U));k.tileMesh.removeTiles(G.map((k=>k.tileID))),B.layerTileCount[U]=(null!==(F=B.layerTileCount[U])&&void 0!==F?F:0)+G.length,k.layerTileCount[U]=0,G.forEach(((k,U)=>{k.meshID=B.ID,k.tileID=j[U]}))}isConfigurationEqual(k,B){for(let U=0;U<2;++U)if(k[U]!==B[U])return!1;return!0}}class gs{constructor(){this._toggleLayerVisibility={},this._tileMultiMesh=new vs}destroy(){this._tileMultiMesh.destroy()}clear(){this._tileMultiMesh.clear()}setParentContainer(k){k.addChild(this._tileMultiMesh.meshContainer)}addTilesToBatch(k){const B=[],U=[];k.forEach((k=>{var F;null===(F=this._toggleLayerVisibility[k.dynamicToggleID])||void 0===F||F?B.push(k):U.push(k)}));const F=this._tileMultiMesh.addTiles(B),G=this._tileMultiMesh.addHiddenTiles(U),j=new Array(k.length);return F.forEach(((U,F)=>{j[k.indexOf(B[F])]=U})),G.forEach(((B,F)=>{j[k.indexOf(U[F])]=B})),j}removeTilesFromBatch(k){this._tileMultiMesh.removeTiles(k)}setToggleLayerVisibility(k,B){this._toggleLayerVisibility[k]=B,this._tileMultiMesh.setToggleLayerVisibility(k,B)}}class ms{constructor(k,B){this._batchedTiles=new Map,this._nextTileID=1,this._toggleLayerVisibility={},this._renderOffset=k,this._renderTextureDimensions=B}destroy(){this.resetRenderTexture(),this._batchedTiles.clear()}clear(){this.resetRenderTexture(),this._renderTextureSprite=null,this._currentRenderTexture=null,this._toggleLayerVisibility={},this._batchedTiles.clear()}setParentContainer(k){this._parentContainer=k,this._renderTextureSprite&&this._parentContainer.addChild(this._renderTextureSprite)}addTilesToBatch(k){const B=this.createIDsForBatchedTiles(k);return this.redrawTileBatch(),B}removeTilesFromBatch(k){const B=k.length;for(let U=0;Uk.layerIndex!==B.layerIndex?k.layerIndex-B.layerIndex:k.tileset!==B.tileset?k.tileset.localeCompare(B.tileset):k.frame!==B.frame?k.frame-B.frame:k.tint!==B.tint?k.tint-B.tint:k.transform-B.transform)),$=null!==(k=V.W.instance.game.renderer)&&void 0!==k?k:dt.autoDetectRenderer(),H=V.W.instance.game.cache;null===(B=this._renderTextureSprite)||void 0===B||B.destroy(),null===(U=this._currentRenderTexture)||void 0===U||U.destroy(!0),this._currentRenderTexture=dt.RenderTexture.create(this._renderTextureDimensions);const W=new dt.Sprite,q=new dt.Matrix,K=new dt.Matrix;let z=bs.none;const Y=j.length;for(let V=0;V{k.destroy()})),this._gridRenderers=[],this._currentTileData=[]}setParentContainer(k){this._parentContainer=k;const B=this._gridRenderers.length;for(let U=0;U0){const B={width:k[0].width,height:k[0].height},U=this.getRenderTextureDimensions(B),F=this.getTileDrawData(k.concat(this._currentTileData.map((k=>k.sourceTileData)))),G={width:Math.ceil(F.size.width/U.width),height:Math.ceil(F.size.height/U.height)};this.updateRendererBufferForGrid(F.offset,G,U);const j=this.renderTiles(k,U,G);return this.updateTextureGridPositions(U,G),j.map((k=>k.externalID))}return[]}removeTilesFromBatch(k){const B=[];k.forEach((k=>{const U=this._currentTileData.find((B=>B.externalID===k));U&&B.push(U)}));const U=this._gridRenderers.length;for(let F=0;Fk.rendererIndex===F));k.length>0&&this._gridRenderers[F].removeTilesFromBatch(k.map((k=>k.internalID)))}this._currentTileData=this._currentTileData.filter((k=>-1===B.indexOf(k)))}clear(){this._gridRenderers.forEach((k=>{k.destroy()})),this._gridRenderers=[],this._textureGridSize={width:0,height:0},this._currentTileData=[]}setToggleLayerVisibility(k,B){this._toggleLayerVisibility[k]=B,this._gridRenderers.forEach((U=>{U.setToggleLayerVisibility(k,B)})),this.updateTextureGridPositions(this._renderTextureDimensions,this._textureGridSize)}getGridSprites(){return this._gridRenderers.map((k=>k.getTextureSprite()))}getRenderTextureDimensions(k){return{width:Math.floor(ys.MAX_RENDER_TEXTURE_SIZE/k.width)*k.width,height:Math.floor(ys.MAX_RENDER_TEXTURE_SIZE/k.height)*k.height}}getTileDrawData(k){const B=k[0];let U=B.x,F=B.y,G=B.x+B.width,j=B.y+B.height;const $=k.length;for(let H=0;H<$;++H){const B=k[H];U=Math.min(U,B.x),F=Math.min(F,B.y),G=Math.max(G,B.x+B.width),j=Math.max(j,B.y+B.height)}return{size:{width:G-U,height:j-F},offset:{x:U,y:F}}}updateRendererBufferForGrid(k,B,U){if(this._textureGridSize.width!==B.width||this._textureGridSize.height!==B.height||k.x!==this._renderTextureOffset.x||k.y!==this._renderTextureOffset.y){const F=B.width*B.height-this._gridRenderers.length,G=this._gridRenderers.length;if(F<0){for(let k=0;kparseInt(k,10))).filter((k=>!this._toggleLayerVisibility[k]));this._gridRenderers.forEach((k=>{j.forEach((B=>{k.setToggleLayerVisibility(B,!1)}))})),this._textureGridSize=B,this._renderTextureDimensions=U,this._renderTextureOffset=k;const $=this._currentTileData.splice(0);this._currentTileData=[];const H=this.renderTiles($.map((k=>k.sourceTileData)),U,B),V=this._currentTileData.length;for(let k=0;kB.sourceTileData===H[k].sourceTileData)).externalID}}renderTiles(k,B,U){const F=[],G=this._gridRenderers.length;for(let H=0;H0){const B=this._gridRenderers[H].addTilesToBatch(k.map((k=>Object.assign(Object.assign({},k.sourceTileData),{x:k.tilePosition.x,y:k.tilePosition.y})))),U=B.length;for(let F=0;F{k.destroy()})),this._pooledTiles=[],this._tileBatch.forEach((k=>{k.sprite.destroy()})),this._tileBatch=[]}setParentContainer(k){this._parentContainer=k;const B=this._tileBatch.length;for(let U=0;UB.id===k[U])),F=this._tileBatch[B],G=F.sprite;G.visible=!1,--this._layerTileCount[F.layer],this._parentContainer.removeChildAt(this._parentContainer.getChildIndex(G)),this._pooledTiles.push(G),this._tileBatch.splice(B,1)}}clear(){this._tileBatch.forEach((k=>{k.sprite.visible=!1,this._pooledTiles.push(k.sprite)})),this._tileBatch=[],this._layerTileCount={}}setToggleLayerVisibility(k,B){-1!==k&&(this._toggleLayerVisibility[k]=B,this._tileBatch.forEach((U=>{U.toggleLayerID===k&&(U.sprite.visible=B)})))}getCanvasTile(){return 0===this._pooledTiles.length&&this.addTilesToPool(Math.ceil(this._tileBatch.length*_s.POOL_GROW_RATIO)),this._pooledTiles.pop()}addTilesToPool(k){for(let B=0;Bk.name===B));if(U)return U.value}}return U}}class ws{constructor(k){this.setMapData(k)}getSize(){return this.getLayerDimensions(this.getActiveLayers())}getLayers(){return this._mapJSON.layers}getActiveLayers(){return this.filterActiveLayers(this._mapJSON.layers)}getTileDimensions(){var k,B;return{width:null!==(k=this._mapJSON.tilewidth)&&void 0!==k?k:ws.DEFAULT_TILE_SIZE,height:null!==(B=this._mapJSON.tileheight)&&void 0!==B?B:ws.DEFAULT_TILE_SIZE}}getMapDimensions(){var k,B;return{width:null!==(k=this._mapJSON.width)&&void 0!==k?k:0,height:null!==(B=this._mapJSON.height)&&void 0!==B?B:0}}getTilesetNames(){var k,B;return null!==(B=null===(k=this._mapJSON.tilesets)||void 0===k?void 0:k.map((k=>k.name)))&&void 0!==B?B:[]}getTilesets(){return this._mapJSON.tilesets}getTileData(k){let B=k;B&=~bs.all;const U=this.getTilesetForTile(B);return U?(B-=U.firstgid,{tileset:U,id:B,transform:k&bs.all}):null}getTileRenderDataForGrid(k,B){var U,F;if(k<0||B<0||k>this._mapJSON.width||B>this._mapJSON.height)return[];const G=[],j=this._renderableLayers.length;for(let $=0;$=k.firstgid&&B{if(B.layers){const U=this.filterActiveLayers(B.layers);U.length>0&&k.push(Object.assign(Object.assign({},B),{layers:U}))}else this.isLayerActive(B)&&k.push(B);return k}),[])}isLayerActive(k){return k.visible&&k.data&&k.width>0&&k.height>0&&!Es.readPropertyValue(k.properties,"reference")}parseRenderableLayers(k){var B;const U=[],F=null!==(B=null==k?void 0:k.length)&&void 0!==B?B:0;for(let G=0;G{this._mapDataArray.push(k),this._mapDataFiles.set(V,k),B.push(fs.loadTilesets(k))})));yield Promise.all(k),yield Promise.all(B);const U=[],F={firstgid:1,name:`tileset-${it.A.generateGUID()}`,tilecount:0,tiles:U},G=new Map,j=[],$=(k,B)=>{if(k&&k.id>=0){const U=k.id,$=`${k.tileset.name}#${U}`;let H=G.get($);return it.A.isDefined(H)||(G.set($,H=j.length),j.push(k),++F.tilecount),B?H+1|k.transform:H}return B?0:-1};for(const V of this._mapDataArray){for(let B=0;B=0;--B){const U=fs.getTileData(k.data[B],V.tilesets);k.data[B]=$(U,!0)}if(k.objects)for(let B=k.objects.length-1;B>=0;--B){const U=k.objects[B],F=fs.getTileData(U.gid,V.tilesets);U.gid=$(F,!0),U.x=Math.floor(U.x),U.y=Math.floor(U.y)}}}const k=(k,B,F)=>{const G={animation:[]};if(it.A.isDefined(k)){const B={tileset:F,id:k,transform:rs.none};G.id=$(B,!1)}for(const U of B){const k={tileset:F,id:U.tileid,transform:rs.none};G.animation.push({duration:U.duration,tileid:$(k,!1)})}U.push(G)};for(const B of V.tilesets)if(B.tiles)if(Array.isArray(B.tiles))for(const U of B.tiles)U.animation&&k(U.id,U.animation,B);else for(const U in B.tiles){const F=B.tiles[U];F.animation&&k(Number(U),F.animation,B)}V.tilesets=[F]}const H=Math.floor(Math.sqrt(j.length)),W=Math.ceil(j.length/H),q=H*(fs.TILE_SIZE+2)+1,K=W*(fs.TILE_SIZE+2)+1,z=V.W.instance.game.add.renderTexture(q,K,F.name,!0);yield Promise.all(B);const Y=V.W.instance.game.cache.cacheMap.get(Ts.r.RENDER_TEXTURE).get(F.name);(V.W.instance.game.renderer.type===dt.RENDERER_TYPE.WEBGL?this.renderWebGl:this.renderCanvas)(j,H,z,Y),this._enableDebugDrawCombinerAtlas&&this.renderDebugText(j,H,z);const Q=V.W.instance.loader;return Q.assignAssetData(F.name,{type:"tileset",key:F.name,w:fs.TILE_SIZE,h:fs.TILE_SIZE,forceExtruded:!0}),yield Q.loadAssets([F.name]),F.name}))}renderWebGl(k,B,U,F){const G={};k.forEach(((k,U)=>{var F;const j=k.tileset.name,$=`${k.id}`;(null!==(F=G[j])&&void 0!==F?F:G[j]=[]).push({id:$,newId:U,x:U%B*(fs.TILE_SIZE+2)+1,y:Math.floor(U/B)*(fs.TILE_SIZE+2)+1})}));const j=V.W.instance.game.cache,$=new dt.SimpleMesh(void 0,void 0,void 0,void 0,dt.DRAW_MODES.TRIANGLE_STRIP);for(const H of Object.keys(G)){const k=G[H],B=new dt.Texture(j.getTexture(H).baseTexture);$.texture=B;const V=new Float32Array(4*k.length*2),W=new Float32Array(4*k.length*2),q=new Uint16Array(6*k.length-1);let K=-1;for(let U=0;U0&&(q[++K]=Z),q[++K]=Z,q[++K]=Z+1,q[++K]=Z+2,q[++K]=Z+3,q[++K]=Z+3,F.frameData.addFrame(new Ss.w(G.newId,G.x,G.y,fs.TILE_SIZE,fs.TILE_SIZE,G.newId.toString()))}$.geometry.getIndex().update(q),$.verticesBuffer.update(V),$.uvBuffer.update(W),$.size=K,Wt.C.renderRawXY(U,$,0,0,!1)}}renderCanvas(k,B,U,F){const G=V.W.instance.game.add.sprite(0,0,"");G.parent=null;const j=k.length;for(let $=0;${this.onMapLoaded.dispatch()})),this._mapLoader.loadMap(this.mapID,this.map,this.content,this.background,this.foreground)}destroy(){this.onMapLoaded.dispose(),super.destroy()}};(0,j.Cg)([(0,q.W_)(),(0,W.B)(),(0,j.Sn)("design:type",String)],Cs.prototype,"mapID",void 0),(0,j.Cg)([(0,q.Mn)(fs),(0,j.Sn)("design:type",fs)],Cs.prototype,"_mapLoader",void 0),(0,j.Cg)([(0,q.ER)(),(0,j.Sn)("design:type",Te._)],Cs.prototype,"map",void 0),(0,j.Cg)([(0,q.ER)(),(0,j.Sn)("design:type",Te._)],Cs.prototype,"background",void 0),(0,j.Cg)([(0,q.ER)(),(0,j.Sn)("design:type",Te._)],Cs.prototype,"foreground",void 0),(0,j.Cg)([(0,q.ER)(),(0,j.Sn)("design:type",Te._)],Cs.prototype,"content",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Cs.prototype,"_loadOnCreate",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Cs.prototype,"_animateInEditor",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Cs.prototype,"onMapLoaded",void 0),Cs=(0,j.Cg)([(0,H.EV)("TileMapLoader",void 0,"Loads a tilemap onto serialized GameObject layers")],Cs);let Os=class extends Pt.y{create(){super.create(),this._mapContainer=V.W.instance.game.add.container(),this._mapContainer.interactiveChildren=!1,this.setRootContainer(this._mapContainer),this._tileBatchRenderMode=Es.getBestBatchRenderMode(),this._tileBatchRenderMode.setParentContainer(this._mapContainer);const k=V.W.instance.game.cache.getJSON(this._tiledMapAsset);if(k){const B=new ws(k);this._tileBatchRenderMode.addTilesToBatch(B.getMapTilesRenderData())}}destroy(){this._mapContainer.destroy(),super.destroy()}};(0,j.Cg)([(0,q.i0)(Bi.Z.TiledMap),(0,j.Sn)("design:type",String)],Os.prototype,"_tiledMapAsset",void 0),Os=(0,j.Cg)([(0,H.EV)("TiledMap",H.YH.tiled)],Os);let Is=class extends Pt.y{constructor(){super(...arguments),this._tileBorderBuffer=3,this._tileLoadedLeft=-1/0,this._tileLoadedTop=-1/0,this._mapSize=new bt.o,this._cachedWorldScale={x:1,y:1}}create(){if(super.create(),this._mapContainer=V.W.instance.game.add.container(),this._mapContainer.interactiveChildren=!1,this.setRootContainer(this._mapContainer),this._tileBatchRenderer=Es.getBestBatchRenderMode(),this._tileBatchRenderer.setParentContainer(this._mapContainer),this.tiledMap){const k=V.W.instance.game.cache.getJSON(this.tiledMap);k&&this.setMapData(new ws(k))}}destroy(){this._mapContainer.destroy(),this._mapContainer=null,this._tileBatchRenderer.destroy(),this._tileBatchRenderer=null,super.destroy()}update(){if(super.update(),this._mapData){const k=this.GameObject.transform.worldScale;this._cachedWorldScale.x===k.x&&this._cachedWorldScale.y===k.y||this.setStreamingDimensions(lt.i.main.viewportSize),this.setStreamingCenter(lt.i.main.GameObject.transform.worldPosition)}}setStreamingDimensions(k){this._cachedWorldScale=Object.assign({},this.GameObject.transform.worldScale);const B={width:k.width/this._cachedWorldScale.x,height:k.height/this._cachedWorldScale.y},U=2*this._tileBorderBuffer;this._streamingDimensions=B,this._gridWidth=Math.floor(B.width/this._tileDimensions.width)+U,this._gridHeight=Math.floor(B.height/this._tileDimensions.height)+U,this._tileBatchRenderer.clear(),this._tileLoadedLeft=Number.NEGATIVE_INFINITY,this._tileLoadedTop=Number.NEGATIVE_INFINITY,this._renderedTiles=new Array(this._gridWidth);for(let F=0;F0&&(U.push(...B),this._renderedTiles[F][k]=[])}}}if(0!==B){const G=this._gridWidth-F,j=k<0?0:F;for(let k=0;k0&&(U.push(...j),this._renderedTiles[F][B]=[])}}}if(U.length>0&&this._tileBatchRenderer.removeTilesFromBatch(U),0!==k&&(k<0?this._renderedTiles.unshift(...this._renderedTiles.splice(this._renderedTiles.length+k)):this._renderedTiles.push(...this._renderedTiles.splice(0,k))),0!==B)for(let k=0;k0?this._gridWidth-k:0;for(let k=0;k<$;++k){const U=B+k;for(let k=0;k0&&(j.push(...B),G.push({indexX:U,indexY:k,count:B.length}))}}}if(0!==B){const U=this._gridWidth-Math.abs(k),F=k>0?0:$;for(let k=0;k0?this._gridHeight-B:0,H=Math.abs(B);for(let k=0;k0&&(j.push(...F),G.push({indexX:U,indexY:B,count:F.length}))}}}if(j.length>0){const k=[...this._tileBatchRenderer.addTilesToBatch(j)];for(;G.length>0;){const B=G.shift();this._renderedTiles[B.indexX][B.indexY]=k.splice(0,B.count)}}}}getDimensions(){return this._mapSize}setMapData(k){this._mapData=k,this._tileDimensions=k.getTileDimensions(),this._tileBatchRenderer.clear();const B=k.getTileDimensions(),U=k.getMapDimensions();this._mapSize.setTo(B.width*U.width,B.height*U.height),this.setStreamingDimensions(lt.i.main.viewportSize)}};(0,j.Cg)([(0,q.i0)(Bi.Z.TiledMap),(0,j.Sn)("design:type",String)],Is.prototype,"tiledMap",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Is.prototype,"_tileBorderBuffer",void 0),Is=(0,j.Cg)([(0,H.EV)("StreamedTiledMapEla",H.YH.tiled)],Is);let Ds=class extends Pt.y{constructor(){super(...arguments),this._width=100,this._height=100}getDimensions(){return new bt.o(this._width,this._height)}};(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Ds.prototype,"_width",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Ds.prototype,"_height",void 0),Ds=(0,j.Cg)([(0,H.EV)("BoundsExpander","Map","An empty RenderComponent that will cause the export bounds to grow")],Ds);let Rs=class extends $.u{constructor(){super(...arguments),this._cameraCollisions=null}create(){super.create(),this._cameraCollisions=V.W.instance.game.cameraCollisions,this._cameraCollisions.addCollider(this)}destroy(){this._cameraCollisions.removeCollider(this),super.destroy()}getBounds(){return this.rectTransform.getBounds()}};var Ps;(0,j.Cg)([(0,Vt.Pq)(ft.X),(0,j.Sn)("design:type",ft.X)],Rs.prototype,"rectTransform",void 0),Rs=(0,j.Cg)([(0,H.EV)("CameraCollider",H.YH.map,"Prevents the LoadAreaCameraFollowController from viewing an area")],Rs),function(k){k.AwaitMapCombiner="AwaitMapCombiner",k.Localization="Localization",k.MainPlayerGameObject="MainPlayerGameObject",k.PopupHandler="PopupHandler",k.PlayerPathfinder="PlayerPathfinder",k.StreamedMap="StreamedMap",k.StreamedMapEla="StreamedMapEla",k.GameObjectReference="GameObjectReference",k.GameObjectBounds="GameObjectBounds",k.InitDataPlayFsm="InitData-playFSM",k.InitDataSpawnLocationName="InitData-spawnLocationName",k.InitDataSpawnPosition="InitData-spawnPosition",k.InitDataSpawnFacingDirection="InitData-spawnFacingDirection"}(Ps||(Ps={}));let Ms=class extends $.u{create(){super.create();{const k=lt.i.main;this._cameraTransform=k.GameObject.transform,this._cameraTransform.onWorldMatrixChanged.add(this.cull,this),this.cull()}}destroy(){this._cameraTransform.onWorldMatrixChanged.remove(this.cull,this),super.destroy()}cull(){const k=this._bounds;if(k){const B=lt.i.main,U=B.viewportSize.getHalfWidth(),F=B.viewportSize.getHalfHeight(),G=this._cameraTransform.worldPosition;this.gameObject.active=k.leftG.x-U&&k.topG.y-F}}};(0,j.Cg)([Ai(Ps.GameObjectBounds),(0,j.Sn)("design:type",Object)],Ms.prototype,"_bounds",void 0),Ms=(0,j.Cg)([(0,H.EV)("CameraCulling",H.YH.map,"Deactivates the attached game object when offscreen")],Ms);let Ns=class extends $.u{constructor(){super(...arguments),this.onOffsetChanged=new Mt.H,this._cameraCollisions=null,this.maxCameraMovePerMs=1/0,this._offset={x:0,y:0},this.target=null,this._cameraSpeedVector=new pt.I}set offset(k){this._offset=k,this.onOffsetChanged.dispatch()}get offset(){return this._offset}create(){if(super.create(),this._cameraCollisions=V.W.instance.game.cameraCollisions,this.target){st.w.getActiveScene().onPostUpdate.add(this);{const k=this.target.transform.worldPosition;lt.i.main.GameObject.transform.worldPosition=k}}}destroy(){this.target&&(st.w.getActiveScene().onPostUpdate.remove(this),this.target=null),this._cameraCollisions=null,this.onOffsetChanged.dispose(),super.destroy()}postUpdate(){const k=lt.i.main.GameObject.transform,B=this.target.transform,U={x:B.worldPosition.x+this._offset.x,y:B.worldPosition.y+this._offset.y};if(this.IsActiveInHierarchy){const F=new pt.I(k.worldPosition.x,k.worldPosition.y);if(U.x/=B.worldScale.x,U.y/=B.worldScale.y,this._cameraCollisions)for(const k of this._cameraCollisions.cameraColliders){const B=k.bounds.left-U.x,F=k.bounds.right-U.x,G=k.bounds.top-U.y,j=k.bounds.bottom-U.y,$=B<0&&F>0?-B0?-Gj*j&&(G.normalize(),this._cameraSpeedVector.set(j,j),G.multiply(this._cameraSpeedVector),U.x=F.x+G.x,U.y=F.y+G.y),k.worldPosition={x:Math.round(U.x),y:Math.round(U.y)}}}};(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Ns.prototype,"maxCameraMovePerMs",void 0),(0,j.Cg)([(0,q.vC)(),(0,j.Sn)("design:type",Object)],Ns.prototype,"_offset",void 0),(0,j.Cg)([(0,q.ER)(),(0,j.Sn)("design:type",Te._)],Ns.prototype,"target",void 0),Ns=(0,j.Cg)([(0,H.EV)("CameraFollowController",H.YH.map,"Simplified camera follow controller that follows a target within bounds without
requiring a streamed map or camera collider components")],Ns);var xs,Ls=U(55366),ks=U(42979),Bs=U(49769);class Us extends Ke{constructor(){super(...arguments),this.injectionName=null,this.type=null,this.required=null,this.injectionLinks=[]}get InjectionName(){return this.injectionName}set InjectionName(k){this.injectionName=k}get Type(){return this.type}set Type(k){this.type=k}get Required(){return this.required}set Required(k){this.required=k}get InjectionLinks(){return this.injectionLinks}set InjectionLinks(k){this.injectionLinks=k}}class Fs extends Ke{constructor(){super(...arguments),this.propertyName=null,this.componentGUID=null}get PropertyName(){return this.propertyName}set PropertyName(k){this.propertyName=k}get ComponentGUID(){return this.componentGUID}set ComponentGUID(k){this.componentGUID=k}}class Gs extends Ke{constructor(){super(...arguments),this.guid=null,this.type=null,this.properties={}}get GUID(){return this.guid}set GUID(k){this.guid=k}get Type(){return this.type}set Type(k){this.type=k}get Properties(){return this.properties}set Properties(k){this.properties=k}}class js extends Ke{constructor(){super(...arguments),this.guid=null,this.tuid=null,this.properties={}}get GUID(){return this.guid}set GUID(k){this.guid=k}get TUID(){return this.tuid}set TUID(k){this.tuid=k}get Properties(){return this.properties}set Properties(k){this.properties=k}}class $s extends Ke{constructor(){super(...arguments),this.name=null,this.layer=null,this.guid=null,this.components=[],this.children=[],this.active=null,this.injections=[]}get Name(){return this.name}set Name(k){this.name=k}get Layer(){return this.layer}set Layer(k){this.layer=k}get GUID(){return this.guid}set GUID(k){this.guid=k}get Components(){return this.components}set Components(k){this.components=k}get Children(){return this.children}set Children(k){this.children=k}get Active(){return this.active}set Active(k){this.active=k}get Injections(){return this.injections}set Injections(k){this.injections=k}}class Hs extends $s{constructor(){super(...arguments),this.tuid=null}get TUID(){return this.tuid}set TUID(k){this.tuid=k}}class Vs extends $s{constructor(){super(...arguments),this.template=null,this.templateKey=null}}let Ws=xs=class extends qe{deserialize(k){return xs.deserializePrefab(k)}serialize(k){return xs.serializePrefab(k)}static deserializePrefab(k){let B=null;if(xs.isPrefabSchemaTemplate(k)){const U=new Vs;U.template=k.template,U.templateKey=k.templateKey,B=U}else if(xs.isPrefabSchemaOverride(k)){const U=new Hs;U.TUID=k.tuid,B=U}else B=new $s;return B.Name=k.name,B.Layer=k.layer,B.Active=k.active,B.GUID=k.guid,B.Components=qe.deserializeCollection(k.components,xs.deserializeComponent),B.Children=qe.deserializeCollection(k.children,xs.deserializePrefab),B.Injections=qe.deserializeCollection(k.injections,xs.deserializeInjection),B}static serializePrefab(k){return xs.isPrefabDataTemplate(k)?{name:k.Name,layer:k.Layer,guid:k.GUID,template:k.template,components:qe.serializeCollection(k.Components,xs.serializeComponent),children:qe.serializeCollection(k.Children,xs.prototype.serialize)}:xs.isPrefabDataOverride(k)?{name:k.Name,layer:k.Layer,guid:k.GUID,tuid:k.TUID,components:qe.serializeCollection(k.Components,xs.serializeComponent),children:qe.serializeCollection(k.Children,xs.prototype.serialize)}:{name:k.Name,layer:k.Layer,guid:k.GUID,components:qe.serializeCollection(k.Components,xs.serializeComponent),children:qe.serializeCollection(k.Children,xs.prototype.serialize)}}static restoreArrayObjects(k){return(null==k?void 0:k.properties)?(Object.keys(k.properties).forEach((B=>{if(!Array.isArray(k.properties[B]))return;const U=k.properties[B];if(0===U.length||"object"!=typeof U[0])return;const F=U;F.forEach(((k,B)=>{if((null==k?void 0:k.__type)&&Bs.oD[null==k?void 0:k.__type]){const U=new Bs.oD[k.__type];Object.keys(k).forEach((B=>{U[B]=k[B]})),F[B]=U}})),k.properties[B]=F})),k.properties):null}static deserializeComponent(k){if(k&&(k.properties=xs.restoreArrayObjects(k)),xs.isComponentSchemaOverride(k)){const B=new js;return B.GUID=k.guid,B.TUID=k.tuid,B.Properties=k.properties,B}if(k){const B=new Gs;return B.GUID=k.guid,B.Type=k.type,B.Properties=k.properties,B}}static serializeComponent(k){return xs.isComponentDataOverride(k)?{guid:k.GUID,tuid:k.TUID,properties:k.Properties}:{guid:k.GUID,type:k.Type,properties:k.Properties}}static deserializeInjectionLink(k){const B=new Fs;return B.ComponentGUID=k.componentGuid,B.PropertyName=k.propertyName,B}static deserializeInjection(k){const B=new Us;return B.InjectionName=k.injectionName,B.Type=k.type,B.Required=k.required,B.InjectionLinks=qe.deserializeCollection(k.injectionLinks,xs.deserializeInjectionLink),B}static isPrefabSchemaTemplate(k){return k.hasOwnProperty("template")||k.hasOwnProperty("templateKey")}static isPrefabDataTemplate(k){return k instanceof Vs}static isPrefabSchemaOverride(k){return null==k?void 0:k.hasOwnProperty("tuid")}static isPrefabDataOverride(k){return k instanceof Hs}static isComponentSchemaOverride(k){return k&&k.hasOwnProperty("tuid")}static isComponentDataOverride(k){return k instanceof js}};Ws=xs=(0,j.Cg)([(0,Ge.injectable)()],Ws);let qs=class extends $.u{constructor(){super(...arguments),this.points=[{x:0,y:0},{x:100,y:0},{x:100,y:100},{x:0,y:100}]}};(0,j.Cg)([(0,q.vC)(),(0,j.Sn)("design:type",Array)],qs.prototype,"points",void 0),qs=(0,j.Cg)([(0,H.EV)("ColliderPolygon",H.YH.map,"A polygon defining a non-walkable area")],qs);let Ks=class extends $.u{constructor(){super(...arguments),this.points=[{x:0,y:0},{x:100,y:0},{x:100,y:100},{x:0,y:100}]}};(0,j.Cg)([(0,q.vC)(),(0,j.Sn)("design:type",Array)],Ks.prototype,"points",void 0),Ks=(0,j.Cg)([(0,H.EV)("NavMeshPolygon",H.YH.map,"A navigation mesh polygon that the player can walk on")],Ks);class zs{get isLoaded(){return this._loaded}constructor(k){this._gameObjects=[],this._loaded=!1,this.names=k}addGameObject(k){return(0,j.sH)(this,void 0,void 0,(function*(){return this._gameObjects.push(k),this._loaded?k.addReference().catch((k=>{Z.V.log(`ConditionGroup: Error in addGameObject. The error is ${k.message} and stack trace is: ${k.stack}`,J.$.Error)})):null}))}removeGameObject(k){const B=this._gameObjects.indexOf(k);return!!(B>=0&&(this._gameObjects.splice(B,1),this._loaded))&&(k.removeReference(),!0)}getGameObjects(){return this._gameObjects}getGameObjectComponents(k){let B=[];return this._loaded&&this._gameObjects.forEach((U=>{const F=U.getGameObject();F&&(B=B.concat(F.findComponentsInChildren(k)))})),B}isActive(k){return this.names.every((B=>k.isConditionActive(B)))}loadIfActive(k){return(0,j.sH)(this,void 0,void 0,(function*(){this.isActive(k)?(this._loaded=!0,yield Promise.all(this._gameObjects.map((k=>(0,j.sH)(this,void 0,void 0,(function*(){return k.addReference()})))))):this._loaded&&this.unload()}))}unload(){this._loaded&&(this._gameObjects.forEach((k=>{k.removeReference()})),this._loaded=!1)}}class Ys{constructor(k,B){this.onBlockChanged=new Mt.H,this._conditionGroups=[],this._map=k,this._bounds=B}destroy(){this.unloadAssets(),this.onBlockChanged.dispose()}loadAssets(){return(0,j.sH)(this,void 0,void 0,(function*(){return it.A.isDefined(this._currentLoadingPromise)?this._currentLoadingPromise:this._currentLoadingPromise=Promise.all(this._conditionGroups.map((k=>(0,j.sH)(this,void 0,void 0,(function*(){return k.loadIfActive(this._map)}))))).then((()=>{this._currentLoadingPromise=null}))}))}unloadAssets(){for(const k of this._conditionGroups)k.unload()}addGameObject(k,B=[]){let U=!1;for(const F of this._conditionGroups)if(it.A.equalArrayContents(F.names,B)){F.addGameObject(k).catch((()=>{Z.V.log("Error while adding game object reference",J.$.Error)})),U=!0;break}if(!U){const U=new zs(B);U.addGameObject(k).catch((()=>{Z.V.log("Error while adding game object reference",J.$.Error)})),this._conditionGroups.push(U)}}removeGameObject(k){let B=!1;for(const U of this._conditionGroups)U.removeGameObject(k)&&(B=!0)}getGameObjectComponents(k){let B=[];return this._conditionGroups.forEach((U=>{U.isActive(this._map)&&(B=B.concat(U.getGameObjectComponents(k)))})),B}setConditionGroupActive(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){it.A.isDefined(this._currentLoadingPromise)&&(yield this._currentLoadingPromise);const U=this._conditionGroups.filter((B=>B.names.indexOf(k)>=0));if(U.length<=0)return!1;if(B)yield this._currentLoadingPromise=Promise.all(U.map((k=>(0,j.sH)(this,void 0,void 0,(function*(){return k.loadIfActive(this._map)}))))),this._currentLoadingPromise=null;else for(const k of U)k.unload();return!0}))}getBounds(){return this._bounds}}class Qs extends Ys{constructor(k,B){super(k,B),this._navmeshDirty=!1,this._constructNavmeshPromise=null,this._polyListeners=new Set}containsPoint(k){return k.x>this._bounds.left&&k.xthis._bounds.top&&k.y{Z.V.log("Error while adding game object reference",J.$.Error)})),U=!0;break}if(!U){const U=new zs(B);U.addGameObject(k).catch((()=>{Z.V.log("Error while adding game object reference",J.$.Error)})),this._conditionGroups.push(U)}k.onNavigationChange.add(this.requestNavMeshRecalculation,this),k.onLoaded.add(this.requestNavMeshRecalculation,this),k.onUnloaded.add(this.requestNavMeshRecalculation,this)}removeGameObject(k){var B;let U=!1;for(const F of this._conditionGroups)F.removeGameObject(k)&&(U=!0);k.onNavigationChange.remove(this.requestNavMeshRecalculation,this),k.onLoaded.remove(this.requestNavMeshRecalculation,this),k.onUnloaded.remove(this.requestNavMeshRecalculation,this),U&&(null===(B=this.requestNavMeshRecalculation())||void 0===B||B.catch((()=>{Z.V.log("Error while recalculating navMesh after removing gameobject",J.$.Error)})))}getActiveGameObjectComponents(k){let B=[];return this._conditionGroups.forEach((U=>{U.isActive(this._map)&&(B=B.concat(U.getGameObjectComponents(k).filter((k=>k.Active&&k.GameObject.activeInHierarchy))))})),B}isReconstructingNavMesh(){return!!this._constructNavmeshPromise}getReconstructionCompletionPromise(){return(0,j.sH)(this,void 0,void 0,(function*(){this._constructNavmeshPromise&&(yield this._constructNavmeshPromise)}))}getNavData(){const k=[];for(const U of this.getActiveGameObjectComponents(Ks)){this._polyListeners.has(U)||(U.OnActiveChanged.add(this.requestNavMeshRecalculation,this),U.GameObject.onActiveInHierarchyChanged.add(this.requestNavMeshRecalculation,this),this._polyListeners.add(U));const B=U.GameObject.transform.worldMatrix,F=new dt.Point,G={inverted:!1,regions:[U.points.map((k=>(B.apply(k,F),[F.x,F.y])))]};k.push(G)}const B=[];for(const U of this.getActiveGameObjectComponents(qs)){this._polyListeners.has(U)||(U.OnActiveChanged.add(this.requestNavMeshRecalculation,this),U.GameObject.onActiveInHierarchyChanged.add(this.requestNavMeshRecalculation,this),this._polyListeners.add(U));const k=U.GameObject.transform.worldMatrix,F=new dt.Point,G={inverted:!1,regions:[U.points.map((B=>(k.apply(B,F),[F.x,F.y])))]};B.push(G)}return{walkableAreas:k,nonWalkableAreas:B}}}Qs.isInitialLoading=!1;class Xs{get bounds(){return this._bounds}get gameObject(){return this._gameObject}constructor(k,B){this.onNavigationChange=new Mt.H,this.onLoaded=new Mt.H,this.onUnloaded=new Mt.H,this._referenceCount=0,this._loadPromise=null,this._gameObject=k,this._bounds=B}destroy(){this.onNavigationChange.dispose(),this.onLoaded.dispose(),this.onUnloaded.dispose()}addReference(){return(0,j.sH)(this,void 0,void 0,(function*(){if(1==++this._referenceCount){if(this._loadPromise=this.load(),null!==this._loadPromise&&!this._loadPromise.cancelled)try{yield this._loadPromise.then((k=>{this._gameObject=k,this._loadPromise=null,this.onLoaded.dispatch()})).catch((()=>{this._loadPromise=null})).promise}catch(k){Z.V.log(`Error in GameObjectReference.addReference: ${k}`,J.$.Error)}}else if(null!==this._loadPromise&&!this._loadPromise.cancelled)try{yield this._loadPromise.promise}catch(k){Z.V.log(`Error in GameObjectReference.addReference else block: ${k}`,J.$.Error)}}))}removeReference(){var k;0==--this._referenceCount&&(null===(k=this._loadPromise)||void 0===k||k.cancel(),this.unload(),this.onUnloaded.dispatch())}load(){return null}unload(){}getGameObject(){return this._gameObject}}class Zs extends Xs{constructor(k,B,U=!1){super(null,k.bounds),this._definition=k,this._parentObject=B,this._usingLegacyStreamedMap=U}load(){const k=new Ws,B=V.W.instance.prefabLoaderInstance,U=new Te._;U.addComponent(Ei.b).Container.bind(Ps.GameObjectBounds).toConstantValue(this.bounds);const F=this._usingLegacyStreamedMap?B.loadFromJSONWithDependencies(k.deserialize(this._definition.prefab),U,!0):B.loadFromJSONProject(k.deserialize(this._definition.prefab),U,!0);return F.then((k=>{var B;const U=null!==(B=k.findComponent(Ei.b))&&void 0!==B?B:k.addComponent(Ei.b);U.Container.rebind(Ps.GameObjectBounds).toConstantValue(this.bounds),U.Container.bind(Ps.GameObjectReference).toConstantValue(this),k.parent=this._parentObject})).catch((k=>{Z.V.log(`Failed to load from GameObjectReference: ${k}\n${JSON.stringify(this._definition.prefab)}`,J.$.Error)})),F}unload(){var k;null===(k=this._gameObject)||void 0===k||k.destroy(),this._gameObject=null}}class Js{get onLoadedBlocksChanged(){return this._onLoadedBlocksChanged}get onStreamedBlockChanged(){return this._onStreamedBlockChanged}get offset(){return this._offset}get blockSize(){return this._blockSize}get loadingPromiseQueueHead(){return this._loadingPromiseQueue.head}constructor(k,B,U){this._onLoadedBlocksChanged=new Mt.H,this._globalObjects=[],this._offset={x:0,y:0},this._conditions={},this._loadedBlocks=[],this._gameObjectReferences=[],this._loadingPromiseQueue=new Yt,this._onStreamedBlockChanged=new Mt.H,this._isLegacy=!1,this.parent=k,this._blockSize=B}destroy(){for(const k of this._blocks)for(const B of k)B.destroy();for(const k of this._gameObjectReferences)k.destroy();this._onLoadedBlocksChanged.dispose(),this._onStreamedBlockChanged.dispose()}addGlobalObject(k){k.parent=this.parent,this._globalObjects.push(k)}addGameObjectReference(k){const B=function(k){return!!k.gameObject}(k)?new Xs(k.gameObject,k.bounds):new Zs(k,this.parent,this._isLegacy);return this.getBlocksInBounds(k.bounds).forEach((U=>{U.block.addGameObject(B,k.conditionGroups)})),this._gameObjectReferences.push(B),B}removeGameObjectReference(k){this.getBlocksInBounds(k.bounds).forEach((B=>{B.block.removeGameObject(k)})),tt.pull(this._gameObjectReferences,k),k.destroy()}isConditionActive(k){var B;return!it.A.isDefined(k)||(null===(B=this._conditions[k])||void 0===B?void 0:B.active)}unloadBlocks(){this._loadedBlocks.forEach((k=>{k.block.unloadAssets()})),this._loadedBlocks=[]}getBlocksInBounds(k){const B=[],U=ut.c.clamp(Math.floor((k.left-this._offset.x)/this._blockSize),0,this._blockCountX-1),F=ut.c.clamp(Math.floor((k.right-this._offset.x)/this._blockSize),0,this._blockCountX-1),G=ut.c.clamp(Math.floor((k.top-this._offset.y)/this._blockSize),0,this._blockCountY-1),j=ut.c.clamp(Math.floor((k.bottom-this._offset.y)/this._blockSize),0,this._blockCountY-1);for(let $=U;$<=F;++$)for(let k=G;k<=j;++k)B.push({block:this._blocks[$][k],x:$,y:k,size:this._blockSize});return B}loadBlocks(k){return(0,j.sH)(this,void 0,void 0,(function*(){}))}}class tn extends Js{constructor(k,B,U){super(k,B,U),this._isLegacy=!0,V.W.instance.game.navMeshSystem.bindStreamedMap(this),this._offset.x=U.left,this._offset.y=U.top;const F=U.right-U.left,G=U.bottom-U.top;Qs.isInitialLoading=!0,this._blockCountX=Math.ceil(F/B),this._blockCountY=Math.ceil(G/B),this._blocks=[],this._blocks.length=this._blockCountX;for(let j=0;j{this._onStreamedBlockChanged.dispatch({block:U,x:j,y:k})}))}}}destroy(){V.W.instance.game.navMeshSystem.releaseStreamedMap(),super.destroy()}static createFromData(k,B,U){return(0,j.sH)(this,void 0,void 0,(function*(){const F=new tn(k,B,U.bounds);U.globalObjects&&(yield Promise.all(U.globalObjects.map((k=>(0,j.sH)(this,void 0,void 0,(function*(){return F.addGlobalObjectPrefab(k).promise}))))));for(const k of U.mapObjects)F.addGameObjectReference(k);return F}))}addGlobalObjectPrefab(k){const B=new Ws,U=V.W.instance.prefabLoaderInstance.loadFromJSONWithDependencies(B.deserialize(k),null,!0);return U.then((k=>{this.addGlobalObject(k)})).catch((B=>{Z.V.log(`Failed to load map global object: ${B}\n${JSON.stringify(k)}`,J.$.Error)})),U}setConditionActive(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){const U=yield this._loadingPromiseQueue.push();if(it.A.isDefined(k)){const F=this._conditions[k];if(F){if(F.active===B)return void U();F.active=B}else this._conditions[k]={active:B};yield Promise.all(this._loadedBlocks.map((U=>(0,j.sH)(this,void 0,void 0,(function*(){return U.block.setConditionGroupActive(k,B).then((k=>(0,j.sH)(this,void 0,void 0,(function*(){k&&(yield this.buildBlockNavMesh(U))}))))})))))}U()}))}loadBlocks(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=yield this._loadingPromiseQueue.push(),U=(k,B)=>k.x===B.x&&k.y===B.y,F=this.getBlocksInBounds(k),G=it.A.removeMultipleFromArray(this._loadedBlocks,F,U),$=it.A.removeMultipleFromArray(F,this._loadedBlocks,U);if(G.forEach((k=>{k.block.unloadAssets()})),yield Promise.all($.map((k=>(0,j.sH)(this,void 0,void 0,(function*(){yield k.block.loadAssets(),Qs.isInitialLoading||(yield this.buildBlockNavMesh(k))}))))),this._loadedBlocks=F,Qs.isInitialLoading){Qs.isInitialLoading=!1;const B=[];this.getBlocksInBounds(k).forEach((k=>{B.push(this.buildBlockNavMesh(k))})),yield Promise.all(B)}($.length>0||G.length>0)&&this._onLoadedBlocksChanged.dispatch($,G),B()}))}buildBlockNavMesh(k){return(0,j.sH)(this,void 0,void 0,(function*(){yield k.block.requestNavMeshRecalculation()}))}}class en extends Pt.y{}let sn=class extends en{constructor(){super(...arguments),this._filled=!0,this._color="#393939",this._alpha=1,this._points=[],this._graphics=null}get filled(){return this._filled}set filled(k){this._filled=k,this.drawPolygon()}get color(){return this._color}set color(k){this._color=k,this.drawPolygon()}get alpha(){return this._alpha}set alpha(k){this._alpha=k,this.drawPolygon()}get points(){return this._points}set points(k){this._points=k,this.drawPolygon()}create(){super.create(),this._graphics=V.W.instance.game.add.graphics(0,0),this.setUpDisplayObject(this._graphics),this._points.length>0&&this.drawPolygon()}destroy(){var k;null===(k=this._graphics)||void 0===k||k.destroy(),this._graphics=null,super.destroy()}drawPolygon(){if(!this._graphics)return;this._graphics.clear();const k=parseInt(this._color.substr(1),16);this._filled?this._graphics.beginFill(k,this._alpha):this._graphics.lineStyle(2,k,this._alpha),this._graphics.drawPolygon(this._points),this._filled?this._graphics.endFill():this._graphics.lineStyle(0)}getGraphics(){return this._graphics}};(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],sn.prototype,"_filled",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String)],sn.prototype,"_color",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],sn.prototype,"_alpha",void 0),(0,j.Cg)([(0,q.SZ)(),(0,q._H)(),(0,j.Sn)("design:type",Array)],sn.prototype,"_points",void 0),sn=(0,j.Cg)([(0,H.EV)("PolygonPrimitive",H.YH.primitive,"Draws a box using the PIXI Graphics library")],sn);class nn extends $.u{}class an extends Ii{constructor(){super(...arguments),this.blockSize=400,this.onMapLoaded=new Mt.H,this._conditionGroupEvaluators=[],this._navMeshGameObjects=[],this._blockBoundGameObjects=[],this._loadPromise=new zt.b,this._enableDebugMesh=!1,this._enableDebugDrawBlocks=!1,this._navmeshDirty=!1}set EnableDebugMesh(k){this._enableDebugMesh=k}set EnableDebugDrawBlocks(k){this._enableDebugDrawBlocks=k}create(){super.create(),st.w.getActiveScene().container.bind(Ps.StreamedMap).toConstantValue(this)}destroy(){var k;null===(k=this.map)||void 0===k||k.destroy(),this.onMapLoaded.dispose(),delete window.toggleNavMesh,this._debugParent&&this._debugParent.destroy(),super.destroy()}awaitLoaded(){return(0,j.sH)(this,void 0,void 0,(function*(){return this._loadPromise}))}update(){super.update(),this._navmeshDirty&&(this.drawNavMesh(),this._navmeshDirty=!1)}drawNavMesh(k){this._debugParent||(this._debugParent=new Te._(this.GameObject),k||this._debugParent.addComponent(Ct.d),this._debugParent.layer="debug"),this._navMeshGameObjects.forEach((k=>{k.destroy()})),this._blockBoundGameObjects.forEach((k=>{k.destroy()})),this._navMeshGameObjects=[],this._blockBoundGameObjects=[];for(const B of V.W.instance.game.navMeshSystem.navMesh.getPolygons()){const k=B.getPoints(),U=new Te._(this._debugParent);U.addComponent(Ct.d);const F=new Te._(U);F.addComponent(Ct.d);const G=F.addComponent(sn,!1);G.alpha=.2,G.color="#3333AA",G.filled=!0,G.points=[...k,k[0]],G.create();const j=new Te._(U);j.addComponent(Ct.d);const $=j.addComponent(sn,!1);$.alpha=.5,$.color="#3333AA",$.filled=!1,$.points=[...k,k[0]],$.create();for(const H of B.neighbours){const k=new Te._(U);k.addComponent(Ct.d);const F=k.addComponent(sn,!1);F.alpha=.5,F.color="#AA3333",F.filled=!1,F.points=[B.centroid,H.centroid],F.create()}this._navMeshGameObjects.push(U)}if(this._enableDebugDrawBlocks){const k=lt.i.main.GameObject.transform,B=lt.i.main.viewportSize,U=k.worldPosition.x-B.getHalfWidth(),F=k.worldPosition.x+B.getHalfWidth(),G=k.worldPosition.y-B.getHalfHeight(),j=k.worldPosition.y+B.getHalfHeight();for(let $=Math.floor(U/this.blockSize)*this.blockSize;${Z.V.log(`StreamedMapComponent: Error in create. The error is ${k.message} and stack trace is: ${k.stack}`,J.$.Error)}))}createAsync(){return(0,j.sH)(this,void 0,void 0,(function*(){if(!this.mapData&&(yield V.W.instance.loader.loadAssets([this.mapDataPath]).then((()=>{this.mapData=V.W.instance.game.cache.getJSON(this.mapDataPath)})),!this.mapData))throw new Error(`Couldn't load streamed map ${this.mapDataPath}`);if(this.map=yield tn.createFromData(this.GameObject,this.blockSize,this.mapData),this._conditionGroupEvaluators){const k=[];for(const B of this._conditionGroupEvaluators)for(const U of B.getActiveConditions())k.push(this.map.setConditionActive(U,!0));yield Promise.all(k)}let k=null;window.toggleNavMesh=()=>{k?(this.map.onStreamedBlockChanged.remove(k),k=null,this._debugParent&&(this._debugParent.destroy(),this._debugParent=null),this._navMeshGameObjects=[]):(this.map.onStreamedBlockChanged.add(k=()=>{this._navmeshDirty=!0}),this.drawNavMesh())},this._enableDebugMesh&&window.toggleNavMesh(),this.onMapLoaded.dispatch(),this._loadPromise.resolve()}))}drawNavMesh(){super.drawNavMesh(!0)}};var on;rn=(0,j.Cg)([(0,H.EV)("StreamedMap",H.YH.map,"Allows a streamed map to be added as a component")],rn);let hn=on=class extends Ii{constructor(){super(...arguments),this._cameraCollisions=null,this.horizontalLoadDistance=940,this.verticalLoadDistance=660,this.deadZoneSize=100,this.maxCameraMovePerMs=1/0,this.shouldFollow=!0,this._offset={x:0,y:0},this._target=null,this._frameWorkManagerNormalBudget=ks.Z.DEFAULT_FPS,this._loadingBlocks=!1,this._enableDebugStreaming=!1}set EnableDebugStreaming(k){this._enableDebugStreaming=k}set Offset(k){this._offset=k}create(){super.create(),this._cameraCollisions=V.W.instance.game.cameraCollisions,this._lastLoadPosition=new pt.I(1/0,1/0);const k=this._target.transform.worldPosition;this._loadedBounds={left:k.x,right:k.x,top:k.y,bottom:k.y},this._deadZoneSizeSq=this.deadZoneSize*this.deadZoneSize,this._frameWorkManager&&(this._frameWorkManagerNormalBudget=this._frameWorkManager.frameBudget),this._target&&st.w.getActiveScene().onPostUpdate.add(this)}destroy(){this._frameWorkManager&&(this._frameWorkManager.frameBudget=this._frameWorkManagerNormalBudget),super.destroy()}postUpdate(){var k;const B=lt.i.main.GameObject.transform;if(this._enableDebugStreaming)B.setPosition(Math.round(this._target.transform.worldPosition.x+this._offset.x),Math.round(this._target.transform.worldPosition.y+this._offset.y));else{let U=ut.c.clamp(this._target.transform.worldPosition.x,this._loadedBounds.left,this._loadedBounds.right)+this._offset.x,F=ut.c.clamp(this._target.transform.worldPosition.y,this._loadedBounds.top,this._loadedBounds.bottom)+this._offset.y;if(this.shouldFollow){const G=new pt.I(B.worldPosition.x,B.worldPosition.y);for(const B of null===(k=this._cameraCollisions)||void 0===k?void 0:k.cameraColliders){const k=B.bounds.left-U,G=B.bounds.right-U,j=B.bounds.top-F,$=B.bounds.bottom-F,H=k<0&&G>0?-k0?-j<$?j:$:0;0!==H&&0!==V&&(Math.abs(H)$*$&&this._lastLoadPosition.x!==1/0&&(j.normalize(),j.multiply(new pt.I($,$)),U=G.x+j.x,F=G.y+j.y),B.setPosition(Math.round(U),Math.round(F))}const G=Math.min(U-this._loadedBounds.left,this._loadedBounds.right-U,F-this._loadedBounds.top,this._loadedBounds.bottom-F);this._frameWorkManager.frameBudget=ut.c.clampedLerp(on._frameWorkManagerLargeBudget,this._frameWorkManagerNormalBudget,G/on._frameWorkManagerBudgetRampDistance)}if(!this._loadingBlocks){const k=this._target.transform.worldPosition;if(new pt.I(k.x-this._lastLoadPosition.x,k.y-this._lastLoadPosition.y).getMagnitudeSq()>=this._deadZoneSizeSq){const B=this.getLoadBounds();this._loadingBlocks=!0,this._loadedBounds.left=Math.max(this._loadedBounds.left,B.left),this._loadedBounds.right=Math.min(this._loadedBounds.right,B.right),this._loadedBounds.top=Math.max(this._loadedBounds.top,B.top),this._loadedBounds.bottom=Math.min(this._loadedBounds.bottom,B.bottom),this.mapComponent.map?this.mapComponent.map.loadBlocks(B).then((()=>{const k=lt.i.main.viewportSize;this._loadedBounds.left=B.left+k.getHalfWidth(),this._loadedBounds.right=B.right-k.getHalfWidth(),this._loadedBounds.top=B.top+k.getHalfHeight(),this._loadedBounds.bottom=B.bottom-k.getHalfHeight(),this._loadingBlocks=!1})).catch((()=>{this._loadingBlocks=!1})):this._loadingBlocks=!1,this._lastLoadPosition.copyFrom(k)}}}getLoadBounds(){const k=this._target.transform.worldPosition;return{top:k.y-this.verticalLoadDistance,bottom:k.y+this.verticalLoadDistance,left:k.x-this.horizontalLoadDistance,right:k.x+this.horizontalLoadDistance}}};hn._frameWorkManagerLargeBudget=200,hn._frameWorkManagerBudgetRampDistance=500,(0,j.Cg)([(0,q.Mn)(rn),(0,j.Sn)("design:type",rn)],hn.prototype,"mapComponent",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],hn.prototype,"horizontalLoadDistance",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],hn.prototype,"verticalLoadDistance",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],hn.prototype,"deadZoneSize",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],hn.prototype,"maxCameraMovePerMs",void 0),(0,j.Cg)([(0,q.ER)(),(0,j.Sn)("design:type",Te._)],hn.prototype,"_target",void 0),(0,j.Cg)([Ci(z.FrameWorkManager),(0,j.Sn)("design:type",Ls.Y)],hn.prototype,"_frameWorkManager",void 0),hn=on=(0,j.Cg)([(0,Ge.injectable)(),(0,H.EV)("LoadAreaCameraFollowController",H.YH.map,"A camera follow controller that follows a target and informs asset loading in a legacy StreamedMap")],hn);let cn=class extends $.u{constructor(){super(...arguments),this._enableFollowControllerAfter=!1,this._panTimeMs=1e3,this.onFinish=new Mt.H}create(){super.create(),this._cameraFollowController=this._mainPlayer.findComponentInChildren(hn)}destroy(){this.onFinish.dispose(),super.destroy()}run(){const k=lt.i.main.GameObject.transform,B=new pt.I;B.copyFrom(k.localPosition);const U=new pt.I;U.copyFrom(this._targetTransform.worldPosition),U.subtract(k.worldPosition);const F={percent:0};this.setCameraControllerEnabled(!1),V.W.instance.game.add.tween(F,this).to({percent:1},this._panTimeMs,Be.G.Quadratic.InOut,!0).onUpdateCallback((()=>{k.setPosition(Math.round(B.x+U.x*F.percent),Math.round(B.y+U.y*F.percent))})).onTweenComplete.addOnce((()=>{k.setPosition(B.x+U.x,B.y+U.y),this._enableFollowControllerAfter&&this.setCameraControllerEnabled(!0),this.onFinish.dispatch()}))}setCameraControllerEnabled(k){this._cameraFollowController&&(this._cameraFollowController.shouldFollow=k)}};(0,j.Cg)([Ai(Ps.MainPlayerGameObject),(0,j.Sn)("design:type",Te._)],cn.prototype,"_mainPlayer",void 0),(0,j.Cg)([(0,q.Mn)(Ct.d),(0,j.Sn)("design:type",Ct.d)],cn.prototype,"_targetTransform",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],cn.prototype,"_enableFollowControllerAfter",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],cn.prototype,"_panTimeMs",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],cn.prototype,"onFinish",void 0),cn=(0,j.Cg)([(0,H.EV)("CameraPan",H.YH.motion,"Pans the camera to a target location")],cn);let dn=class extends $.u{};dn=(0,j.Cg)([(0,H.EV)("GlobalExport",H.YH.map,"Adds the attached prefab to a list of prefabs to always be loaded within a streamed map")],dn);class ln extends Js{constructor(k,B,U){super(k,B,U),this.onBoundsLoaded=new Mt.H,this._offset.x=U.left,this._offset.y=U.top;const F=U.right-U.left,G=U.bottom-U.top;this._blockCountX=Math.ceil(F/B),this._blockCountY=Math.ceil(G/B),this._blocks=[],this._blocks.length=this._blockCountX;for(let j=0;j{this._onStreamedBlockChanged.dispatch({block:U,x:j,y:k})}))}}}destroy(){super.destroy(),this.onBoundsLoaded.dispose()}static createFromData(k,B,U){return(0,j.sH)(this,void 0,void 0,(function*(){const F=new ln(k,B,U.bounds);U.globalObjects&&(yield Promise.all(U.globalObjects.map((k=>(0,j.sH)(this,void 0,void 0,(function*(){return F.addGlobalObjectPrefab(k).promise}))))));for(const k of U.mapObjects)F.addGameObjectReference(k);return F}))}addGlobalObjectPrefab(k){const B=new Ws,U=V.W.instance.prefabLoaderInstance.loadFromJSONProject(B.deserialize(k),null,!0);return U.then((k=>{this.addGlobalObject(k)})).catch((B=>{Z.V.log(`Failed to load map global object: ${B}\n${JSON.stringify(k)}`,J.$.Error)})),U}setConditionActive(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){const U=yield this._loadingPromiseQueue.push();if(it.A.isDefined(k)){let F=this._conditions[k];if(F){if(F.active===B)return void U();F.active=B}else F=this._conditions[k]={active:B};yield Promise.all(this._loadedBlocks.map((U=>(0,j.sH)(this,void 0,void 0,(function*(){return U.block.setConditionGroupActive(k,B)})))))}U()}))}loadBlocks(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=yield this._loadingPromiseQueue.push(),U=(k,B)=>k.x===B.x&&k.y===B.y,F=this.getBlocksInBounds(k),G=it.A.removeMultipleFromArray(this._loadedBlocks,F,U),$=it.A.removeMultipleFromArray(F,this._loadedBlocks,U);G.forEach((k=>{k.block.unloadAssets()})),yield Promise.all($.map((k=>(0,j.sH)(this,void 0,void 0,(function*(){return k.block.loadAssets()}))))),this._loadedBlocks=F,B(),($.length>0||G.length>0)&&this._onLoadedBlocksChanged.dispatch($,G,k)}))}}let un=class extends an{constructor(){super(...arguments),this._navMeshPolyIDs=[]}create(){super.create(),this._streamedMapAsset&&this.loadMap()}loadMap(){return(0,j.sH)(this,void 0,void 0,(function*(){const k=V.W.instance.game.cache.getJSON(this._streamedMapAsset);if(this.map=yield ln.createFromData(this.GameObject,this.blockSize,k),this._conditionGroupEvaluators){const k=[];for(const B of this._conditionGroupEvaluators)for(const U of B.getActiveConditions())k.push(this.map.setConditionActive(U,!0));yield Promise.all(k)}this._navMeshPolyIDs=V.W.instance.game.navMeshSystem.addWalkablePolygons(k.navMesh);let B=null;window.toggleNavMesh=()=>{const k=V.W.instance.game.navMeshSystem;B?(k.onNavMeshChanged.remove(B),B=null,this._debugParent&&(this._debugParent.destroy(),this._debugParent=null),this._navMeshGameObjects=[]):(k.onNavMeshChanged.add(B=()=>{this._navmeshDirty=!0}),this.drawNavMesh())},this._enableDebugMesh&&window.toggleNavMesh(),this.onMapLoaded.dispatch(),this._loadPromise.resolve()}))}destroy(){this._navMeshPolyIDs.length>0&&(V.W.instance.game.navMeshSystem.removePolygons(this._navMeshPolyIDs),this._navMeshPolyIDs=[]),super.destroy()}};(0,j.Cg)([(0,q.i0)(Bi.Z.StreamedMapEla),(0,j.Sn)("design:type",String)],un.prototype,"_streamedMapAsset",void 0),un=(0,j.Cg)([(0,H.EV)("StreamedMapEla",H.YH.map,"Allows an ELA version streamed map to be added as a component")],un);let fn=class extends $.u{constructor(){super(...arguments),this._horizontalLoadPadding=300,this._verticalLoadPadding=300,this.onStreamingBoundsChanged=new Mt.H,this._deadZoneSize=100,this._lastLoadPosition=new pt.I(1/0,1/0)}create(){super.create(),this._deadZoneSizeSq=this._deadZoneSize*this._deadZoneSize,this._target&&st.w.getActiveScene().onPostUpdate.add(this)}destroy(){this._target&&st.w.getActiveScene().onPostUpdate.remove(this),this.onStreamingBoundsChanged.dispose(),this._target=null,super.destroy()}postUpdate(){if(!this.GameObject.activeInHierarchy)return;const k=this._target.worldPosition,B=new pt.I(k.x-this._lastLoadPosition.x,k.y-this._lastLoadPosition.y),U=lt.i.main.viewportSize,F=this.GameObject.transform.worldScale,G=U.getHalfWidth()+this._horizontalLoadPadding*F.x,j=U.getHalfHeight()+this._verticalLoadPadding*F.y;if(B.getMagnitudeSq()>=this._deadZoneSizeSq){const k=this._target.worldPosition;this.onStreamingBoundsChanged.dispatch({top:k.y-j,bottom:k.y+j,left:k.x-G,right:k.x+G}),this._lastLoadPosition.copyFrom(k)}}getTarget(){var k;return null!==(k=this._target)&&void 0!==k?k:null}};(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],fn.prototype,"_horizontalLoadPadding",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],fn.prototype,"_verticalLoadPadding",void 0),(0,j.Cg)([(0,q.Mn)(Ct.d),(0,j.Sn)("design:type",Ct.d)],fn.prototype,"_target",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],fn.prototype,"onStreamingBoundsChanged",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],fn.prototype,"_deadZoneSize",void 0),fn=(0,j.Cg)([(0,H.EV)("StreamingBoundsEla",H.YH.streaming)],fn);let bn=class extends $.u{constructor(){super(...arguments),this.onLoadedAreaChanged=new Mt.H,this._loadedBounds=null}create(){var k;super.create(),null===(k=this._streamingBounds)||void 0===k||k.onStreamingBoundsChanged.add(this.streamingAreaChanged,this)}destroy(){var k;null===(k=this._streamingBounds)||void 0===k||k.onStreamingBoundsChanged.remove(this.streamingAreaChanged,this),this.onLoadedAreaChanged.dispose(),this._streamedMap=null,this._streamingBounds=null,this._loadedBounds=null,super.destroy()}getLoadedBounds(){return this._loadedBounds?this.convertBoundsToWorld(this._loadedBounds):null}streamingAreaChanged(k){if(this._streamedMap){const B=this._streamedMap.GameObject.transform.worldMatrix,U=os.J.applyInverseMatrixToBounds(k,B);this._loadedBounds&&os.J.intersectBounds(this._loadedBounds,U),this._streamedMap.map.loadBlocks(os.J.applyInverseMatrixToBounds(k,B)).then((()=>{this._loadedBounds=U,this.onLoadedAreaChanged.dispatch(this.convertBoundsToWorld(this._loadedBounds))}))}}convertBoundsToWorld(k){const B=this._streamedMap.GameObject.transform.worldMatrix;return os.J.applyMatrixToBounds(k,B)}};var pn,vn;(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],bn.prototype,"onLoadedAreaChanged",void 0),(0,j.Cg)([(0,q.Mn)(fn),(0,j.Sn)("design:type",fn)],bn.prototype,"_streamingBounds",void 0),(0,j.Cg)([(0,q.Mn)(un),(0,j.Sn)("design:type",un)],bn.prototype,"_streamedMap",void 0),bn=(0,j.Cg)([(0,H.EV)("StreamingLoadedAreaEla",H.YH.streaming)],bn),function(k){k[k.Left=0]="Left",k[k.Right=1]="Right",k[k.Top=2]="Top",k[k.Bottom=3]="Bottom"}(vn||(vn={}));let gn=pn=class extends $.u{create(){var k;super.create(),lt.i.main.onViewportChanged.add(this.loadedAreaChanged,this),null===(k=this._loadedArea)||void 0===k||k.onLoadedAreaChanged.add(this.loadedAreaChanged,this)}destroy(){var k;lt.i.main.onViewportChanged.remove(this.loadedAreaChanged,this),null===(k=this._loadedArea)||void 0===k||k.onLoadedAreaChanged.remove(this.loadedAreaChanged,this),this._cameraColliders=[],this._cameraBounds=[],this._loadedArea=null,super.destroy()}loadedAreaChanged(k){if(!k)return;this._cameraBounds||this.createCameraBounds();const B=lt.i.main.viewportSize,U=this.GameObject.transform.worldScale,F=new bt.o(B.width/U.x,B.height/U.y),G=this.GameObject.transform.worldMatrix.applyInverse({x:.5*(k.right-k.left)+k.left,y:.5*(k.bottom-k.top)+k.top}),j=.5*Math.max(k.right-k.left,B.width)/U.x,$=.5*Math.max(k.bottom-k.top,B.height)/U.y,H=G.x-j,W=G.x+j,q=G.y-$,K=G.y+$,z=K-q,Y={width:W-H+2*F.width,height:z+2*F.height};this._cameraBounds[vn.Left].setAnchoredPivotOffset(H-pn.HALF_COLLIDER_SIZE,G.y),this._cameraBounds[vn.Left].setSizeDelta(pn.COLLIDER_SIZE,Y.height),this._cameraBounds[vn.Right].setAnchoredPivotOffset(W+pn.HALF_COLLIDER_SIZE,G.y),this._cameraBounds[vn.Right].setSizeDelta(pn.COLLIDER_SIZE,Y.height),this._cameraBounds[vn.Top].setAnchoredPivotOffset(G.x,q-pn.HALF_COLLIDER_SIZE),this._cameraBounds[vn.Top].setSizeDelta(Y.width,pn.COLLIDER_SIZE),this._cameraBounds[vn.Bottom].setAnchoredPivotOffset(G.x,K+pn.HALF_COLLIDER_SIZE),this._cameraBounds[vn.Bottom].setSizeDelta(Y.width,pn.COLLIDER_SIZE);const Q=V.W.instance.game.cameraCollisions;this._cameraColliders.forEach((k=>{Q.updateColliderBounds(k)}))}createCameraBounds(){this._cameraBounds=[],this._cameraColliders=[];for(let k=0;k0&&(this._indices[++k]=B.vertexIndex),this._indices[++k]=B.vertexIndex,this._indices[++k]=B.vertexIndex+1,this._indices[++k]=B.vertexIndex+2,this._indices[++k]=B.vertexIndex+3,this._indices[++k]=B.vertexIndex+3);k>0?(this._mesh.visible=!0,this._mesh.geometry.getIndex().update(this._indices),this._mesh.verticesBuffer.update(this._vertices),this._mesh.uvBuffer.update(this._uvs),this._mesh.size=k):this._mesh.visible=!1,this._isGeometryDirty=!1}setUpTile(k,B,U,F,G,j,$){let H=k;const W=0!=(H&rs.flippedHorizontally),q=0!=(H&rs.flippedVertically),K=0!=(H&rs.flippedDiagonally);H&=~rs.all;const z=fs.getTileset(this._mapData.tilesets,H);if(!z||!it.A.isDefined(H))return null;H-=z.firstgid;const Y=this._streamer.getOrCreateTile(),Q=Y.uvs,X=V.W.instance.game.cache.getFrameByName(z.name,`${H}`,Ts.r.RENDER_TEXTURE),Z=X.x/this._texture.width,J=X.right/this._texture.width,tt=X.y/this._texture.height,et=X.bottom/this._texture.height;Q[0].x=Z,Q[0].y=tt,Q[1].x=J,Q[1].y=tt,Q[2].x=Z,Q[2].y=et,Q[3].x=J,Q[3].y=et;const st=Math.max(0,F),nt=Math.min(0,F),at=Math.max(0,G),rt=Math.min(0,G),ot=-nt/this._texture.width,ht=-st/this._texture.width,ct=-rt/this._texture.height,dt=-at/this._texture.height;let lt=[1,0,0,1];K&&(this.swap(Q,1,2),lt=[0,1,1,0]),W&&(this.swap(Q,0,1),this.swap(Q,2,3),lt[0]*=-1,lt[2]*=-1),q&&(this.swap(Q,0,2),this.swap(Q,1,3),lt[1]*=-1,lt[3]*=-1),Q[0].x+=ot*lt[0]+ct*lt[2],Q[0].y+=ot*lt[1]+ct*lt[3],Q[1].x+=ht*lt[0]+ct*lt[2],Q[1].y+=ht*lt[1]+ct*lt[3],Q[2].x+=ot*lt[0]+dt*lt[2],Q[2].y+=ot*lt[1]+dt*lt[3],Q[3].x+=ht*lt[0]+dt*lt[2],Q[3].y+=ht*lt[1]+dt*lt[3];const ut=B+st,ft=B+fs.TILE_SIZE+nt,bt=U+at,pt=U+fs.TILE_SIZE+rt;let vt=Y.vertexIndex*En.FLOATS_PER_VERTEX;return[[ut,Q[0].x],[bt,Q[0].y],[ft,Q[1].x],[bt,Q[1].y],[ut,Q[2].x],[pt,Q[2].y],[ft,Q[3].x],[pt,Q[3].y]].forEach((k=>{this._vertices[vt]=k[0],this._uvs[vt]=k[1],++vt})),Y.toggleGroup=j,Y.active=!(j>-1)||this._streamer.isToggleGroupVisible(j),this._isGeometryDirty=!0,Y}swap(k,B,U){const F=k[B];k[B]=k[U],k[U]=F}createGenericTile(){this.ensureBufferAvailable(1+(this._nextTileVertex>>2));const k={vertexIndex:this._nextTileVertex,uvs:[{x:0,y:0},{x:0,y:0},{x:0,y:0},{x:0,y:0}],toggleGroup:-1,active:!0};return this._nextTileVertex+=En.VERTICES_PER_TILE,k}releaseTile(k){this._isGeometryDirty=!0}ensureBufferAvailable(k){var B,U,F,G;const j=k*En.FLOATS_PER_TILE;if((null!==(U=null===(B=this._vertices)||void 0===B?void 0:B.length)&&void 0!==U?U:0){Z.V.log(`TMXMapStreamer#loadMapByFilename: ${k}`,J.$.Error)}))}loadMapByAsset(k){fs.loadMapFile(k).then(this.loadMapFromData.bind(this)).catch((k=>{Z.V.log(`TMXMapStreamer#loadMapByAsset: ${k}`,J.$.Error)}))}loadMapFromData(k){return(0,j.sH)(this,void 0,void 0,(function*(){return fs.loadTilesets(this.mapData=k).then((()=>(0,j.sH)(this,void 0,void 0,(function*(){return this.setup()})))).catch((k=>{Z.V.log(`TMXMapStreamer#loadMapFromData: ${k}`,J.$.Error)})).then((()=>(0,j.sH)(this,void 0,void 0,(function*(){this.onMapLoaded.dispatch()}))))}))}setup(){var k;const B=this.GameObject.addComponent(ds);for(let F=0;F0;--F)this.releaseTile(this.createGenericTile());return B}update(){if(super.update(),this._setupComplete){const k=lt.i.main.GameObject.transform.worldPosition,B=Math.floor((k.x-lt.i.main.viewportSize.getHalfWidth()-this.GameObject.transform.worldPosition.x)/fs.TILE_SIZE+.5)-wn.OFFSCREEN_TILE_PRELOAD,U=Math.floor((k.y-lt.i.main.viewportSize.getHalfHeight()-this.GameObject.transform.worldPosition.y)/fs.TILE_SIZE+.5)-wn.OFFSCREEN_TILE_PRELOAD,F=ut.c.clamp(B-this._tileLoadedLeft,-this._tileGridWidth,this._tileGridWidth),G=Math.sign(F);if(0!==F)for(let H=F;0!==H;H-=G){const k=H>0?H-1:H;for(let B=0;B0?H+F:H;for(let B=j;0!==B;B-=$){const U=B>0?B-1:B;this.releaseGridCell(k,U)}}if(this._tileGridLeftIndex+=F,this._tileGridTopIndex+=j,this._tileLoadedLeft=B,this._tileLoadedTop=U,0!==F)for(let H=-F;0!==H;H+=G){const k=H>0?H-1:H;for(let B=0;B0?H:H-F;for(let B=-j;0!==B;B+=$){const U=B>0?B-1:B;this.setUpTilesForLayers(k,U)}}this._renderer.update()}}setUpTilesForLayers(k,B){const U=this.getTileGridCell(k,B),F=this.screenToTmxIndex(k,B),G=this.screenToLocalPosition(k,B),j=this._layerData.length;for(let $=0;$=k.width||F.y>=k.height))if(k.data){const B=k.data[k.width*F.y+F.x];if(Boolean(B)){const F=this.setUpTileForLayer(B,G.x,G.y,0,0,k);F&&U.tiles.push(F)}}else if(k.objects){const B=this._objectsByLayer[`${$}|${F.x},${F.y}`];if(B)for(const F of B){const B=this.setUpTileForLayer(F.gid,G.x,G.y,F.x-G.x,F.y-G.y,k);B&&U.tiles.push(B)}}}}setUpTileForLayer(k,B,U,F,G,j){const $=tt.get(j,"properties.dynamicToggle",-1),H=it.A.isDefined(j.properties)&&j.properties.useAnimDuration;return this._renderer.setUpTile(k,B,U,F,G,$,H)}createGenericTile(){const k=this._renderer.createGenericTile();return this._createdTiles.push(k),this._activeTiles.push(k),k}releaseGridCell(k,B){const U=this.getTileGridCell(k,B);for(const F of U.tiles)this.releaseTile(F),U.tiles=[]}releaseTile(k){this._renderer.releaseTile(k),this._activeTiles.splice(this._activeTiles.indexOf(k),1),this._tilePool.push(k)}getPooledTile(){const k=this._tilePool.pop();return k&&this._activeTiles.push(k),k}getOrCreateTile(){var k;return null!==(k=this.getPooledTile())&&void 0!==k?k:this.createGenericTile()}screenToTileGridIndex(k,B){return{x:it.A.wrapArrayIndex(this._tileGridLeftIndex+k,this._tileGridWidth),y:it.A.wrapArrayIndex(this._tileGridTopIndex+B,this._tileGridHeight)}}screenToTmxIndex(k,B){return{x:this._tileLoadedLeft+it.A.wrapArrayIndex(k,this._tileGridWidth),y:this._tileLoadedTop+it.A.wrapArrayIndex(B,this._tileGridHeight)}}screenToLocalPosition(k,B){const U=this.screenToTmxIndex(k,B);return U.x=U.x*fs.TILE_SIZE,U.y=U.y*fs.TILE_SIZE,U}getTileGridCell(k,B){const U=this.screenToTileGridIndex(k,B);return this._tileGrid[U.x][U.y]}setToggleGroupVisible(k,B){var U;this._toggleGroupState[k]=B,null===(U=this._renderer)||void 0===U||U.setToggleGroupVisible(k,B)}isToggleGroupVisible(k){var B;return null===(B=this._toggleGroupState[k])||void 0===B||B}};Tn.OFFSCREEN_TILE_PRELOAD=3,Tn.STREAMER_POOL_BUFFER_SCALE=.25,(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],Tn.prototype,"fileName",void 0),(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],Tn.prototype,"asset",void 0),Tn=wn=(0,j.Cg)([(0,H.EV)("TMXMapStreamer",H.YH.tiled,"Handles the creation of on-screen tiles for the streaming system"),(0,X.D)()],Tn);let Sn=class extends $.u{constructor(){super(...arguments),this._hasCombinedMaps=!1,this.onMapsCombined=new Mt.H,this._enableDebugDrawCombinerAtlas=!1}set EnableDebugDrawCombinerAtlas(k){this._enableDebugDrawCombinerAtlas=k}postCreate(){super.postCreate(),this.loadAndCombineMapData().catch((k=>{Z.V.log(`TMXMapCombiner: Error in load and combine map data. The error is ${k.message} and stack trace is: ${k.stack}`,J.$.Error)}))}destroy(){this.onMapsCombined.dispose(),super.destroy()}loadAndCombineMapData(){return(0,j.sH)(this,void 0,void 0,(function*(){const k=this.GameObject.findComponentsInChildren(Tn);if(k){const B=new As,U=[];for(const G of k)G.mapData?B.addMapData(G.mapData):it.A.isDefined(G.asset)?(U.push(Tn.loadMapFile(G.asset).then((k=>(0,j.sH)(this,void 0,void 0,(function*(){return fs.loadTilesets(k)})))).then((k=>{G.mapData=k,B.addMapData(k)}))),G.fileName=G.asset=void 0):it.A.isDefined(G.fileName)?(U.push(Tn.loadMapFileFromUrl(G.fileName).then((k=>(0,j.sH)(this,void 0,void 0,(function*(){return fs.loadTilesets(k)})))).then((k=>{G.mapData=k,B.addMapData(k)}))),G.fileName=G.asset=void 0):Z.V.log("TMXMapCombiner: Data is not defined for a streamer",J.$.Error);yield Promise.all(U);const F=yield B.combine();for(const G of k)G.loadMapFromData(G.mapData).catch((k=>{Z.V.log(`TMXMapCombiner: Error loading map from data. The error is ${k.message} and stack trace is: ${k.stack}`,J.$.Error)}));if(this._hasCombinedMaps=!0,this.onMapsCombined.dispatch(),this._enableDebugDrawCombinerAtlas){const k=V.W.instance.game,B=V.W.instance.game.add.sprite(0,0,void 0,void 0,void 0,k.cache.getRenderTexture(F));B.fixedToCamera=!0;const U=V.W.instance.game.height;let G=B.width,j=B.height;if(j>U){const k=U/j;G*=k,j=U,B.scale.set(k,k)}const $=V.W.instance.game.add.graphics(0,0);$.beginFill(65535,1).drawRect(0,0,G,j).endFill();const H=V.W.instance.game.add.renderTexture(G,j);Wt.C.clear(H),Wt.C.renderRawXY(H,$,0,0),Wt.C.renderXY(H,B,0,0),k.world.addChild(B)}}}))}hasCombinedMaps(){return this._hasCombinedMaps}};var An;Sn=(0,j.Cg)([(0,H.EV)("TMXMapCombiner",H.YH.tiled,"Runs TMXMapDataCombiner on TMXMapStreamers in children to generate a shared atlas
and remap the tile data")],Sn);let Cn=An=class extends fs{create(){super.create(),""!==this.tiledMap?this._generatedAssetTag=it.A.generateGUID():this._generatedAssetTag=this.tiledMap,(this.inGameAsset||this.tiledMap)&&this.reloadMapFile(!1)}destroy(){this._container&&this._container.destroy(),super.destroy()}reloadMapFile(k=!0){if(this._container&&this._container.destroy(),super.create(),this._container=new Te._(this.GameObject),this._container.onDestroy.addOnce((()=>{this._container=null})),this._container.addComponent(Ct.d),k){const k=V.W.instance.game.cache;k.checkJSONKey(this.tiledMap)&&k.removeJSON(this.tiledMap)}else{const k=An.spriteCache.get(this.tiledMap);if(k){const B=new Te._(this._container);B.addComponent(Ct.d);return void B.addComponent(ge).setTexture(k)}}this.loadMap()}loadMap(){fs.loadMapFile(this._generatedAssetTag).then((k=>(0,j.sH)(this,void 0,void 0,(function*(){return fs.loadTilesets(k)})))).then((k=>(0,j.sH)(this,void 0,void 0,(function*(){return this.createFlatImage(k)})))).catch((k=>{Z.V.log(`TMXMapEditorComponent#loadMap: ${k}`,J.$.Error)})).then((()=>(0,j.sH)(this,void 0,void 0,(function*(){this.onMapLoaded.dispatch(this._generatedAssetTag)}))))}createFlatImage(k){return(0,j.sH)(this,void 0,void 0,(function*(){var B;let U=0,F=0;for(let V=0;V0&&B.height>0&&(B.properties&&it.A.isDefined(B.properties.reference)||(U=Math.max(U,B.width),F=Math.max(F,B.height)))}const G=V.W.instance.game.add.renderTexture(U*Tn.TILE_SIZE,F*Tn.TILE_SIZE),j=new Te._;j.addComponent(pe.K);const $=j.addComponent(ge);Object.defineProperty($,"assetLoader",{get:()=>({isLoaded:k=>V.W.instance.loader.isLoaded(k,es.Image)})});const H=j.addComponent(ls);let W=rs.none;for(let V=0;V0&&q.height>0))continue;if(q.properties&&it.A.isDefined(q.properties.reference))continue;$.setAlpha(null!==(B=q.opacity)&&void 0!==B?B:1);const K=new Map;for(let B=0;B<=F;++B)for(let F=0;F<=U;++F){const U=fs.getTileData(q.data[q.width*B+F],k.tilesets);if(U&&U.id>=0){U.x=F*fs.TILE_SIZE,U.y=B*fs.TILE_SIZE;let k=K.get(U.tileset.name);k||K.set(U.tileset.name,k=new Map),k.has(U.id)?k.get(U.id).push(U):k.set(U.id,[U])}}if(K.size<=0)continue;const z=.5*Tn.TILE_SIZE;for(const[k,B]of K.entries())for(const[U,F]of B.entries()){$.updateAsset(k,`${U}`);for(const k of F)W!==k.transform&&(H.rotate(0!=(k.transform&rs.flippedVertically),0!=(k.transform&rs.flippedHorizontally),0!=(k.transform&rs.flippedDiagonally)),W=k.transform),j.legacyTransform.group.updateTransform(),Wt.C.renderRawXY(G,j.legacyTransform.group,k.x+z,k.y+z,!1)}}j.destroy();const q=new Te._(this._container);q.addComponent(Ct.d);q.addComponent(ge).setTexture(G),An.spriteCache.set(this.tiledMap,G)}))}};Cn.spriteCache=new Map,(0,j.Cg)([(0,q.W_)(),(0,q.nK)("asset"),(0,j.Sn)("design:type",String)],Cn.prototype,"inGameAsset",void 0),(0,j.Cg)([(0,q.i0)(Bi.Z.TiledMap),(0,j.Sn)("design:type",String)],Cn.prototype,"tiledMap",void 0),(0,j.Cg)([(0,Le.G)(),(0,j.Sn)("design:type",Function),(0,j.Sn)("design:paramtypes",[Boolean]),(0,j.Sn)("design:returntype",void 0)],Cn.prototype,"reloadMapFile",null),Cn=An=(0,j.Cg)([(0,H.EV)("TiledMap",H.YH.tiled,"Loads and displays a Tiled map file in editor")],Cn);let On=class extends $.u{findPath(k,B){throw new Error("Not implemented")}findPathAsync(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){throw new Error("Not implemented")}))}};var In;On=(0,j.Cg)([(0,H.EV)("IPathfinderComponent",void 0,"A component that pathfinds")],On),function(k){k.MovePlayer="Prodigy.Events.PlayerLocomotion.MOVE_PLAYER",k.StopPlayer="Prodigy.Events.PlayerLocomotion.STOP_PLAYER",k.GetTarget="Prodigy.Events.PlayerLocomotion.GET_TARGET"}(In||(In={}));let Dn=class extends Ii{constructor(){super(...arguments),this._deltaPos=new pt.I,this._targetNavMesh=null,this.speed=.25,this._onMoveStart=new Mt.H,this._onMoveEnd=new Mt.H,this._onPathComplete=new Mt.H}get deltaPos(){return this._deltaPos}get onMoveStart(){return this._onMoveStart}get onMoveEnd(){return this._onMoveEnd}get onPathComplete(){return this._onPathComplete}get targetNavMesh(){return null===this._targetNavMesh?V.W.instance.game.navMeshSystem.navMesh:this._targetNavMesh}set targetNavMesh(k){this._targetNavMesh=k}create(){super.create(),this._lastTarget=new pt.I,this._lastTarget.copyFrom(this.GameObject.transform.worldPosition),V.W.instance.game.stage.addListener(In.StopPlayer,this.stop.bind(this),this),V.W.instance.game.stage.addListener(In.GetTarget,this.onGetTarget.bind(this),this)}onDisable(){super.onDisable(),this.stop()}pathTo(k){if(this.Active){const B=this.GameObject.transform.worldPosition,U=this.targetNavMesh.findPath(new pt.I(B.x,B.y),k);if(U)return this.foundPath(U),!0}return!1}foundPath(k){this.currentPath=k,this.currentPathSegment=-1,this.currentPathSegmentLength=0,this.currentPathSegmentRemaining=0,this._onMoveStart.dispatch()}update(){if(super.update(),this.currentPath){let k=this.speed*V.W.instance.game.time.deltaMS,B=this.currentPath[this.currentPathSegment],U=this.currentPath[this.currentPathSegment+1];for(;k>=this.currentPathSegmentRemaining;){if(k-=this.currentPathSegmentRemaining,++this.currentPathSegment>=this.currentPath.length-1)return this.stop(),this._onPathComplete.dispatch(),void this.GameObject.transform.setPosition(U.x,U.y);B=U,U=this.currentPath[this.currentPathSegment+1],this.currentPathSegmentLength=this.currentPathSegmentRemaining=B.getDistance(U)}this.currentPathSegmentRemaining-=k;const F=this.currentPathSegmentRemaining/this.currentPathSegmentLength,G=new pt.I(ut.c.linear(U.x,B.x,F),ut.c.linear(U.y,B.y,F)),j=this.GameObject.transform.worldPosition;this._deltaPos.setTo(G.x-j.x,G.y-j.y),this.GameObject.transform.setPosition(G.x,G.y)}else this._deltaPos.copyFrom(pt.I.ZERO)}stop(){this.currentPath=null,this.currentPathSegment=-1,this.currentPathSegmentLength=0,this.currentPathSegmentRemaining=0,this._deltaPos.copyFrom(pt.I.ZERO),this._onMoveEnd.dispatch()}onGetTarget(k=!1){if(k){const k=this.GameObject.transform.worldPosition;return{x:k.x,y:k.y}}return{x:this._lastTarget.x,y:this._lastTarget.y}}destroy(){V.W.instance.game.stage.removeListener(In.StopPlayer),V.W.instance.game.stage.removeListener(In.GetTarget),this._onMoveStart.dispose(),this._onMoveEnd.dispose(),this._onPathComplete.dispose(),super.destroy()}};(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Dn.prototype,"_onMoveStart",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Dn.prototype,"_onMoveEnd",void 0),Dn=(0,j.Cg)([(0,H.EV)("NavMeshLocomotion",void 0,"Handles movement across a NavMesh")],Dn);let Rn=class extends On{findPath(k,B){var U;return null===(U=V.W.instance.game.navMeshSystem.navMesh)||void 0===U?void 0:U.findPath(k,B)}findPathAsync(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){return this.findPath(k,B)}))}};var Pn;Rn=(0,j.Cg)([(0,H.EV)("NavMeshPathfinder",H.YH.motion,"Hooks into the nav mesh and finds a path from the source to the target location")],Rn);let Mn=Pn=class extends $.u{constructor(){super(...arguments),this.deltaPos=new pt.I,this.speed=.25,this._autoScaleSpeed=!1,this.onPathStart=new Mt.H,this.onPathEnd=new Mt.H,this.onPathComplete=new Mt.H,this.onTargetSelected=new Mt.H}get currentPathSegment(){return this._currentPathSegment}get target(){var k,B;const U=null!==(B=null===(k=this._currentPath)||void 0===k?void 0:k[this._currentPath.length-1])&&void 0!==B?B:this.gameObject.transform.localPosition;return{x:U.x,y:U.y}}destroy(){this.onPathStart.dispose(),this.onPathEnd.dispose(),this.onPathComplete.dispose(),this.onTargetSelected.dispose(),super.destroy()}onDisable(){super.onDisable(),this.stop()}getPath(){return this._currentPath}setPath(k){this._currentPath=k,this._currentPathSegment=-1,this._currentPathSegmentLength=0,this._currentPathSegmentRemaining=0,this.onPathStart.dispatch(),this.onTargetSelected.dispatch(k[k.length-1])}update(){if(super.update(),this._currentPath){let k=this.speed;this._autoScaleSpeed&&(k*=this.gameObject.transform.worldScale.x);let B=k*Math.min(V.W.instance.game.time.deltaMS,Pn.MAX_ELAPSED_MS),U=this._currentPath[this._currentPathSegment],F=this._currentPath[this._currentPathSegment+1];for(;B>=this._currentPathSegmentRemaining;){if(B-=this._currentPathSegmentRemaining,++this._currentPathSegment>=this._currentPath.length-1)return this.stop(),this.onPathComplete.dispatch(),void(F&&this.updatePos(F));U=F,F=this._currentPath[this._currentPathSegment+1],this._currentPathSegmentLength=this._currentPathSegmentRemaining=Wt.C.getDistance(U,F)}this._currentPathSegmentRemaining-=B;const G=this._currentPathSegmentRemaining/this._currentPathSegmentLength,j=new pt.I(ut.c.linear(F.x,U.x,G),ut.c.linear(F.y,U.y,G));this.updatePos(j)}else this.deltaPos.copyFrom(pt.I.ZERO)}updatePos(k){const B=this.gameObject.transform;this.deltaPos.copyFrom(k),this.deltaPos.subtract(B.localPosition),B.worldPosition=k}stop(){this._currentPath&&(this._currentPath=null,this._currentPathSegment=-1,this._currentPathSegmentLength=0,this._currentPathSegmentRemaining=0,this.deltaPos.copyFrom(pt.I.ZERO),this.onPathEnd.dispatch())}};Mn.MAX_ELAPSED_MS=200,(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Mn.prototype,"speed",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Mn.prototype,"_autoScaleSpeed",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Mn.prototype,"onPathStart",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Mn.prototype,"onPathEnd",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Mn.prototype,"onPathComplete",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Mn.prototype,"onTargetSelected",void 0),Mn=Pn=(0,j.Cg)([(0,H.S1)(),(0,H.EV)("PathLocomotion",H.YH.motion,"Takes in a path of points and moves the GameObject transform along that given path")],Mn);var Nn=U(96352);class xn extends Nn.M{constructor(k){super(k);const B=this.compileProgram(xn.VERTEX_SRC,xn.FRAGMENT_SRC);this.useProgram(),this.uSamplerLocation=k.getUniformLocation(B,"uSampler"),this.uCameraMatrixLocation=k.getUniformLocation(B,"cameraMatrix"),this.aVertexPositionLocation=k.getAttribLocation(B,"aVertexPosition"),this.aTextureCoordPositionLocation=k.getAttribLocation(B,"aTextureCoord")}}xn.VERTEX_SRC="\n precision highp float;\n attribute vec2 aVertexPosition;\n attribute vec2 aTextureCoord;\n\n uniform mat3 cameraMatrix;\n\n varying vec2 vTextureCoord;\n\n void main(void) {\n gl_Position = vec4(cameraMatrix * vec3(aVertexPosition, 1.0), 1.0);\n vTextureCoord = aTextureCoord;\n }\n ",xn.FRAGMENT_SRC="\n precision highp float;\n varying vec2 vTextureCoord;\n\n uniform sampler2D uSampler;\n\n void main(void) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n }\n ";U(2136);var Ln=U(40008);U(94341);class kn extends Ks{constructor(){super(...arguments),this._navMeshPolygonID=null}postCreate(){super.postCreate(),this.addPolygon(),this.GameObject.transform.onWorldMatrixChanged.add(this.refreshPolygonData,this),this.OnActiveChanged.add(this.refreshPolygonData,this)}destroy(){this.GameObject.transform.onWorldMatrixChanged.remove(this.refreshPolygonData,this),this.OnActiveChanged.remove(this.refreshPolygonData,this),this.removePolygon(),super.destroy()}updatePolygonPoints(k){this.points=k,this.refreshPolygonData()}refreshPolygonData(){const k=V.W.instance.game.navMeshSystem;k.beginNavMeshUpdateQueue(),this.removePolygon(),this.addPolygon(),k.flushNavMeshUpdateQueue()}removePolygon(){null!==this._navMeshPolygonID&&(this.removePolygonFromNavMeshSystem(this._navMeshPolygonID),this._navMeshPolygonID=null)}addPolygon(){this.Active&&null===this._navMeshPolygonID&&(this._navMeshPolygonID=this.addPolygonToNavMeshSystem(this.getPointsInWorldSpace()))}getPointsInWorldSpace(){const k=this.GameObject.transform.worldMatrix.clone(),B=this.GameObject.transform.worldScale;return k.scale(1/B.x,1/B.y),this.points.map((B=>k.apply(B)))}}let Bn=class extends kn{removePolygonFromNavMeshSystem(k){V.W.instance.game.navMeshSystem.removePolygon(k)}addPolygonToNavMeshSystem(k){return V.W.instance.game.navMeshSystem.addWalkablePolygon(k)}};Bn=(0,j.Cg)([(0,H.EV)("NavMeshPolygonEla",H.YH.map,"A navigation mesh polygon that the player can walk on")],Bn);U(87945);let Un=class extends kn{removePolygonFromNavMeshSystem(k){V.W.instance.game.navMeshSystem.removePolygon(k)}addPolygonToNavMeshSystem(k){return V.W.instance.game.navMeshSystem.addNonWalkablePolygon(k)}};Un=(0,j.Cg)([(0,H.EV)("ColliderPolygonEla",H.YH.map,"A polygon defining a non-walkable area")],Un);U(66570),U(59004);const Fn=Object.create(null);Fn.open="0",Fn.close="1",Fn.ping="2",Fn.pong="3",Fn.message="4",Fn.upgrade="5",Fn.noop="6";const Gn=Object.create(null);Object.keys(Fn).forEach((k=>{Gn[Fn[k]]=k}));const jn={type:"error",data:"parser error"},$n="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),Hn="function"==typeof ArrayBuffer,Vn=k=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(k):k&&k.buffer instanceof ArrayBuffer,Wn=({type:k,data:B},U,F)=>$n&&B instanceof Blob?U?F(B):qn(B,F):Hn&&(B instanceof ArrayBuffer||Vn(B))?U?F(B):qn(new Blob([B]),F):F(Fn[k]+(B||"")),qn=(k,B)=>{const U=new FileReader;return U.onload=function(){const k=U.result.split(",")[1];B("b"+(k||""))},U.readAsDataURL(k)};function Kn(k){return k instanceof Uint8Array?k:k instanceof ArrayBuffer?new Uint8Array(k):new Uint8Array(k.buffer,k.byteOffset,k.byteLength)}let zn;const Yn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qn="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let Mo=0;Mo{if("string"!=typeof k)return{type:"message",data:ta(k,B)};const U=k.charAt(0);if("b"===U)return{type:"message",data:Jn(k.substring(1),B)};return Gn[U]?k.length>1?{type:Gn[U],data:k.substring(1)}:{type:Gn[U]}:jn},Jn=(k,B)=>{if(Xn){const U=(k=>{let B,U,F,G,j,$=.75*k.length,H=k.length,V=0;"="===k[k.length-1]&&($--,"="===k[k.length-2]&&$--);const W=new ArrayBuffer($),q=new Uint8Array(W);for(B=0;B>4,q[V++]=(15&F)<<4|G>>2,q[V++]=(3&G)<<6|63&j;return W})(k);return ta(U,B)}return{base64:!0,data:k}},ta=(k,B)=>{switch(B){case"blob":return k instanceof Blob?k:new Blob([k]);case"arraybuffer":default:return k instanceof ArrayBuffer?k:k.buffer}},ea=String.fromCharCode(30);function ia(){return new TransformStream({transform(k,B){!function(k,B){$n&&k.data instanceof Blob?k.data.arrayBuffer().then(Kn).then(B):Hn&&(k.data instanceof ArrayBuffer||Vn(k.data))?B(Kn(k.data)):Wn(k,!1,(k=>{zn||(zn=new TextEncoder),B(zn.encode(k))}))}(k,(U=>{const F=U.length;let G;if(F<126)G=new Uint8Array(1),new DataView(G.buffer).setUint8(0,F);else if(F<65536){G=new Uint8Array(3);const k=new DataView(G.buffer);k.setUint8(0,126),k.setUint16(1,F)}else{G=new Uint8Array(9);const k=new DataView(G.buffer);k.setUint8(0,127),k.setBigUint64(1,BigInt(F))}k.data&&"string"!=typeof k.data&&(G[0]|=128),B.enqueue(G),B.enqueue(U)}))}})}let sa;function na(k){return k.reduce(((k,B)=>k+B.length),0)}function aa(k,B){if(k[0].length===B)return k.shift();const U=new Uint8Array(B);let F=0;for(let G=0;GPromise.resolve().then(k):(k,B)=>B(k,0),ha="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function ca(k,...B){return B.reduce(((B,U)=>(k.hasOwnProperty(U)&&(B[U]=k[U]),B)),{})}const da=ha.setTimeout,la=ha.clearTimeout;function ua(k,B){B.useNativeTimers?(k.setTimeoutFn=da.bind(ha),k.clearTimeoutFn=la.bind(ha)):(k.setTimeoutFn=ha.setTimeout.bind(ha),k.clearTimeoutFn=ha.clearTimeout.bind(ha))}function fa(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class ba extends Error{constructor(k,B,U){super(k),this.description=B,this.context=U,this.type="TransportError"}}class pa extends ra{constructor(k){super(),this.writable=!1,ua(this,k),this.opts=k,this.query=k.query,this.socket=k.socket,this.supportsBinary=!k.forceBase64}onError(k,B,U){return super.emitReserved("error",new ba(k,B,U)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(k){"open"===this.readyState&&this.write(k)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(k){const B=Zn(k,this.socket.binaryType);this.onPacket(B)}onPacket(k){super.emitReserved("packet",k)}onClose(k){this.readyState="closed",super.emitReserved("close",k)}pause(k){}createUri(k,B={}){return k+"://"+this._hostname()+this._port()+this.opts.path+this._query(B)}_hostname(){const k=this.opts.hostname;return-1===k.indexOf(":")?k:"["+k+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(k){const B=function(k){let B="";for(let U in k)k.hasOwnProperty(U)&&(B.length&&(B+="&"),B+=encodeURIComponent(U)+"="+encodeURIComponent(k[U]));return B}(k);return B.length?"?"+B:""}}class va extends pa{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(k){this.readyState="pausing";const B=()=>{this.readyState="paused",k()};if(this._polling||!this.writable){let k=0;this._polling&&(k++,this.once("pollComplete",(function(){--k||B()}))),this.writable||(k++,this.once("drain",(function(){--k||B()})))}else B()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(k){((k,B)=>{const U=k.split(ea),F=[];for(let G=0;G{if("opening"===this.readyState&&"open"===k.type&&this.onOpen(),"close"===k.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(k)})),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const k=()=>{this.write([{type:"close"}])};"open"===this.readyState?k():this.once("open",k)}write(k){this.writable=!1,((k,B)=>{const U=k.length,F=new Array(U);let G=0;k.forEach(((k,j)=>{Wn(k,!1,(k=>{F[j]=k,++G===U&&B(F.join(ea))}))}))})(k,(k=>{this.doWrite(k,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const k=this.opts.secure?"https":"http",B=this.query||{};return!1!==this.opts.timestampRequests&&(B[this.opts.timestampParam]=fa()),this.supportsBinary||B.sid||(B.b64=1),this.createUri(k,B)}}let ga=!1;try{ga="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(Po){}const ma=ga;function ya(){}class _a extends va{constructor(k){if(super(k),"undefined"!=typeof location){const B="https:"===location.protocol;let U=location.port;U||(U=B?"443":"80"),this.xd="undefined"!=typeof location&&k.hostname!==location.hostname||U!==k.port}}doWrite(k,B){const U=this.request({method:"POST",data:k});U.on("success",B),U.on("error",((k,B)=>{this.onError("xhr post error",k,B)}))}doPoll(){const k=this.request();k.on("data",this.onData.bind(this)),k.on("error",((k,B)=>{this.onError("xhr poll error",k,B)})),this.pollXhr=k}}class Ea extends ra{constructor(k,B,U){super(),this.createRequest=k,ua(this,U),this._opts=U,this._method=U.method||"GET",this._uri=B,this._data=void 0!==U.data?U.data:null,this._create()}_create(){var k;const B=ca(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");B.xdomain=!!this._opts.xd;const U=this._xhr=this.createRequest(B);try{U.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){U.setDisableHeaderCheck&&U.setDisableHeaderCheck(!0);for(let k in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(k)&&U.setRequestHeader(k,this._opts.extraHeaders[k])}}catch(e){}if("POST"===this._method)try{U.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{U.setRequestHeader("Accept","*/*")}catch(e){}null===(k=this._opts.cookieJar)||void 0===k||k.addCookies(U),"withCredentials"in U&&(U.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(U.timeout=this._opts.requestTimeout),U.onreadystatechange=()=>{var k;3===U.readyState&&(null===(k=this._opts.cookieJar)||void 0===k||k.parseCookies(U.getResponseHeader("set-cookie"))),4===U.readyState&&(200===U.status||1223===U.status?this._onLoad():this.setTimeoutFn((()=>{this._onError("number"==typeof U.status?U.status:0)}),0))},U.send(this._data)}catch(e){return void this.setTimeoutFn((()=>{this._onError(e)}),0)}"undefined"!=typeof document&&(this._index=Ea.requestsCount++,Ea.requests[this._index]=this)}_onError(k){this.emitReserved("error",k,this._xhr),this._cleanup(!0)}_cleanup(k){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=ya,k)try{this._xhr.abort()}catch(e){}"undefined"!=typeof document&&delete Ea.requests[this._index],this._xhr=null}}_onLoad(){const k=this._xhr.responseText;null!==k&&(this.emitReserved("data",k),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(Ea.requestsCount=0,Ea.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",wa);else if("function"==typeof addEventListener){addEventListener("onpagehide"in ha?"pagehide":"unload",wa,!1)}function wa(){for(let k in Ea.requests)Ea.requests.hasOwnProperty(k)&&Ea.requests[k].abort()}const Ta=function(){const k=Sa({xdomain:!1});return k&&null!==k.responseType}();function Sa(k){const B=k.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!B||ma))return new XMLHttpRequest}catch(e){}if(!B)try{return new(ha[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}const Aa="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class Ca extends pa{get name(){return"websocket"}doOpen(){const k=this.uri(),B=this.opts.protocols,U=Aa?{}:ca(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(U.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(k,B,U)}catch(Po){return this.emitReserved("error",Po)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=k=>this.onClose({description:"websocket connection closed",context:k}),this.ws.onmessage=k=>this.onData(k.data),this.ws.onerror=k=>this.onError("websocket error",k)}write(k){this.writable=!1;for(let B=0;B{try{this.doWrite(U,k)}catch(e){}F&&oa((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const k=this.opts.secure?"wss":"ws",B=this.query||{};return this.opts.timestampRequests&&(B[this.opts.timestampParam]=fa()),this.supportsBinary||(B.b64=1),this.createUri(k,B)}}const Oa=ha.WebSocket||ha.MozWebSocket;const Ia={websocket:class extends Ca{createSocket(k,B,U){return Aa?new Oa(k,B,U):B?new Oa(k,B):new Oa(k)}doWrite(k,B){this.ws.send(B)}},webtransport:class extends pa{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(Po){return this.emitReserved("error",Po)}this._transport.closed.then((()=>{this.onClose()})).catch((k=>{this.onError("webtransport error",k)})),this._transport.ready.then((()=>{this._transport.createBidirectionalStream().then((k=>{const B=function(k,B){sa||(sa=new TextDecoder);const U=[];let F=0,G=-1,j=!1;return new TransformStream({transform($,H){for(U.push($);;){if(0===F){if(na(U)<1)break;const k=aa(U,1);j=128==(128&k[0]),G=127&k[0],F=G<126?3:126===G?1:2}else if(1===F){if(na(U)<2)break;const k=aa(U,2);G=new DataView(k.buffer,k.byteOffset,k.length).getUint16(0),F=3}else if(2===F){if(na(U)<8)break;const k=aa(U,8),B=new DataView(k.buffer,k.byteOffset,k.length),j=B.getUint32(0);if(j>Math.pow(2,21)-1){H.enqueue(jn);break}G=j*Math.pow(2,32)+B.getUint32(4),F=3}else{if(na(U)k){H.enqueue(jn);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),U=k.readable.pipeThrough(B).getReader(),F=ia();F.readable.pipeTo(k.writable),this._writer=F.writable.getWriter();const G=()=>{U.read().then((({done:k,value:B})=>{k||(this.onPacket(B),G())})).catch((k=>{}))};G();const j={type:"open"};this.query.sid&&(j.data=`{"sid":"${this.query.sid}"}`),this._writer.write(j).then((()=>this.onOpen()))}))}))}write(k){this.writable=!1;for(let B=0;B{F&&oa((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var k;null===(k=this._transport)||void 0===k||k.close()}},polling:class extends _a{constructor(k){super(k);const B=k&&k.forceBase64;this.supportsBinary=Ta&&!B}request(k={}){return Object.assign(k,{xd:this.xd},this.opts),new Ea(Sa,this.uri(),k)}}},Da=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Ra=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Pa(k){if(k.length>8e3)throw"URI too long";const B=k,U=k.indexOf("["),F=k.indexOf("]");-1!=U&&-1!=F&&(k=k.substring(0,U)+k.substring(U,F).replace(/:/g,";")+k.substring(F,k.length));let G=Da.exec(k||""),j={},$=14;for(;$--;)j[Ra[$]]=G[$]||"";return-1!=U&&-1!=F&&(j.source=B,j.host=j.host.substring(1,j.host.length-1).replace(/;/g,":"),j.authority=j.authority.replace("[","").replace("]","").replace(/;/g,":"),j.ipv6uri=!0),j.pathNames=function(k,B){const U=/\/{2,9}/g,F=B.replace(U,"/").split("/");"/"!=B.slice(0,1)&&0!==B.length||F.splice(0,1);"/"==B.slice(-1)&&F.splice(F.length-1,1);return F}(0,j.path),j.queryKey=function(k,B){const U={};return B.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(k,B,F){B&&(U[B]=F)})),U}(0,j.query),j}const Ma="function"==typeof addEventListener&&"function"==typeof removeEventListener,Na=[];Ma&&addEventListener("offline",(()=>{Na.forEach((k=>k()))}),!1);class xa extends ra{constructor(k,B){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,k&&"object"==typeof k&&(B=k,k=null),k){const U=Pa(k);B.hostname=U.host,B.secure="https"===U.protocol||"wss"===U.protocol,B.port=U.port,U.query&&(B.query=U.query)}else B.host&&(B.hostname=Pa(B.host).host);ua(this,B),this.secure=null!=B.secure?B.secure:"undefined"!=typeof location&&"https:"===location.protocol,B.hostname&&!B.port&&(B.port=this.secure?"443":"80"),this.hostname=B.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=B.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},B.transports.forEach((k=>{const B=k.prototype.name;this.transports.push(B),this._transportsByName[B]=k})),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},B),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(k){let B={},U=k.split("&");for(let F=0,G=U.length;F{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Na.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(k){const B=Object.assign({},this.opts.query);B.EIO=4,B.transport=k,this.id&&(B.sid=this.id);const U=Object.assign({},this.opts,{query:B,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[k]);return new this._transportsByName[k](U)}_open(){if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);const k=this.opts.rememberUpgrade&&xa.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const B=this.createTransport(k);B.open(),this.setTransport(B)}setTransport(k){this.transport&&this.transport.removeAllListeners(),this.transport=k,k.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",(k=>this._onClose("transport close",k)))}onOpen(){this.readyState="open",xa.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(k){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",k),this.emitReserved("heartbeat"),k.type){case"open":this.onHandshake(JSON.parse(k.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const B=new Error("server error");B.code=k.data,this._onError(B);break;case"message":this.emitReserved("data",k.data),this.emitReserved("message",k.data)}}onHandshake(k){this.emitReserved("handshake",k),this.id=k.sid,this.transport.query.sid=k.sid,this._pingInterval=k.pingInterval,this._pingTimeout=k.pingTimeout,this._maxPayload=k.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const k=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+k,this._pingTimeoutTimer=this.setTimeoutFn((()=>{this._onClose("ping timeout")}),k),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const k=this._getWritablePackets();this.transport.send(k),this._prevBufferLen=k.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let k=1;for(let U=0;U=57344?U+=3:(F++,U+=4);return U}(B):Math.ceil(1.33*(B.byteLength||B.size))),U>0&&k>this._maxPayload)return this.writeBuffer.slice(0,U);k+=2}var B;return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const k=Date.now()>this._pingTimeoutTime;return k&&(this._pingTimeoutTime=0,oa((()=>{this._onClose("ping timeout")}),this.setTimeoutFn)),k}write(k,B,U){return this._sendPacket("message",k,B,U),this}send(k,B,U){return this._sendPacket("message",k,B,U),this}_sendPacket(k,B,U,F){if("function"==typeof B&&(F=B,B=void 0),"function"==typeof U&&(F=U,U=null),"closing"===this.readyState||"closed"===this.readyState)return;(U=U||{}).compress=!1!==U.compress;const G={type:k,data:B,options:U};this.emitReserved("packetCreate",G),this.writeBuffer.push(G),F&&this.once("flush",F),this.flush()}close(){const k=()=>{this._onClose("forced close"),this.transport.close()},B=()=>{this.off("upgrade",B),this.off("upgradeError",B),k()},U=()=>{this.once("upgrade",B),this.once("upgradeError",B)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?U():k()})):this.upgrading?U():k()),this}_onError(k){if(xa.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",k),this._onClose("transport error",k)}_onClose(k,B){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Ma&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const k=Na.indexOf(this._offlineEventListener);-1!==k&&Na.splice(k,1)}this.readyState="closed",this.id=null,this.emitReserved("close",k,B),this.writeBuffer=[],this._prevBufferLen=0}}}xa.protocol=4;class La extends xa{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let k=0;k{U||(B.send([{type:"ping",data:"probe"}]),B.once("packet",(k=>{if(!U)if("pong"===k.type&&"probe"===k.data){if(this.upgrading=!0,this.emitReserved("upgrading",B),!B)return;xa.priorWebsocketSuccess="websocket"===B.name,this.transport.pause((()=>{U||"closed"!==this.readyState&&(W(),this.setTransport(B),B.send([{type:"upgrade"}]),this.emitReserved("upgrade",B),B=null,this.upgrading=!1,this.flush())}))}else{const k=new Error("probe error");k.transport=B.name,this.emitReserved("upgradeError",k)}})))};function G(){U||(U=!0,W(),B.close(),B=null)}const j=k=>{const U=new Error("probe error: "+k);U.transport=B.name,G(),this.emitReserved("upgradeError",U)};function $(){j("transport closed")}function H(){j("socket closed")}function V(k){B&&k.name!==B.name&&G()}const W=()=>{B.removeListener("open",F),B.removeListener("error",j),B.removeListener("close",$),this.off("close",H),this.off("upgrading",V)};B.once("open",F),B.once("error",j),B.once("close",$),this.once("close",H),this.once("upgrading",V),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==k?this.setTimeoutFn((()=>{U||B.open()}),200):B.open()}onHandshake(k){this._upgrades=this._filterUpgrades(k.upgrades),super.onHandshake(k)}_filterUpgrades(k){const B=[];for(let U=0;UIa[k])).filter((k=>!!k))),super(k,U)}}const Ba="function"==typeof ArrayBuffer,Ua=Object.prototype.toString,Fa="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Ua.call(Blob),Ga="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===Ua.call(File);function ja(k){return Ba&&(k instanceof ArrayBuffer||(k=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(k):k.buffer instanceof ArrayBuffer)(k))||Fa&&k instanceof Blob||Ga&&k instanceof File}function $a(k,B){if(!k||"object"!=typeof k)return!1;if(Array.isArray(k)){for(let B=0,U=k.length;B=0&&k.num{delete this.acks[k];for(let B=0;B{this.io.clearTimeoutFn(G),B.apply(this,k)};j.withError=!0,this.acks[k]=j}emitWithAck(k,...B){return new Promise(((U,F)=>{const G=(k,B)=>k?F(k):U(B);G.withError=!0,B.push(G),this.emit(k,...B)}))}_addToQueue(k){let B;"function"==typeof k[k.length-1]&&(B=k.pop());const U={id:this._queueSeq++,tryCount:0,pending:!1,args:k,flags:Object.assign({fromQueue:!0},this.flags)};k.push(((k,...F)=>{if(U!==this._queue[0])return;return null!==k?U.tryCount>this._opts.retries&&(this._queue.shift(),B&&B(k)):(this._queue.shift(),B&&B(null,...F)),U.pending=!1,this._drainQueue()})),this._queue.push(U),this._drainQueue()}_drainQueue(k=!1){if(!this.connected||0===this._queue.length)return;const B=this._queue[0];B.pending&&!k||(B.pending=!0,B.tryCount++,this.flags=B.flags,this.emit.apply(this,B.args))}packet(k){k.nsp=this.nsp,this.io._packet(k)}onopen(){"function"==typeof this.auth?this.auth((k=>{this._sendConnectPacket(k)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(k){this.packet({type:Ya.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},k):k})}onerror(k){this.connected||this.emitReserved("connect_error",k)}onclose(k,B){this.connected=!1,delete this.id,this.emitReserved("disconnect",k,B),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach((k=>{if(!this.sendBuffer.some((B=>String(B.id)===k))){const B=this.acks[k];delete this.acks[k],B.withError&&B.call(this,new Error("socket has been disconnected"))}}))}onpacket(k){if(k.nsp===this.nsp)switch(k.type){case Ya.CONNECT:k.data&&k.data.sid?this.onconnect(k.data.sid,k.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ya.EVENT:case Ya.BINARY_EVENT:this.onevent(k);break;case Ya.ACK:case Ya.BINARY_ACK:this.onack(k);break;case Ya.DISCONNECT:this.ondisconnect();break;case Ya.CONNECT_ERROR:this.destroy();const B=new Error(k.data.message);B.data=k.data.data,this.emitReserved("connect_error",B)}}onevent(k){const B=k.data||[];null!=k.id&&B.push(this.ack(k.id)),this.connected?this.emitEvent(B):this.receiveBuffer.push(Object.freeze(B))}emitEvent(k){if(this._anyListeners&&this._anyListeners.length){const B=this._anyListeners.slice();for(const U of B)U.apply(this,k)}super.emit.apply(this,k),this._pid&&k.length&&"string"==typeof k[k.length-1]&&(this._lastOffset=k[k.length-1])}ack(k){const B=this;let U=!1;return function(...F){U||(U=!0,B.packet({type:Ya.ACK,id:k,data:F}))}}onack(k){const B=this.acks[k.id];"function"==typeof B&&(delete this.acks[k.id],B.withError&&k.data.unshift(null),B.apply(this,k.data))}onconnect(k,B){this.id=k,this.recovered=B&&this._pid===B,this._pid=B,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((k=>this.emitEvent(k))),this.receiveBuffer=[],this.sendBuffer.forEach((k=>{this.notifyOutgoingListeners(k),this.packet(k)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((k=>k())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ya.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(k){return this.flags.compress=k,this}get volatile(){return this.flags.volatile=!0,this}timeout(k){return this.flags.timeout=k,this}onAny(k){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(k),this}prependAny(k){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(k),this}offAny(k){if(!this._anyListeners)return this;if(k){const B=this._anyListeners;for(let U=0;U0&&k.jitter<=1?k.jitter:0,this.attempts=0}sr.prototype.duration=function(){var k=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var B=Math.random(),U=Math.floor(B*this.jitter*k);k=0==(1&Math.floor(10*B))?k-U:k+U}return 0|Math.min(k,this.max)},sr.prototype.reset=function(){this.attempts=0},sr.prototype.setMin=function(k){this.ms=k},sr.prototype.setMax=function(k){this.max=k},sr.prototype.setJitter=function(k){this.jitter=k};class nr extends ra{constructor(k,B){var U;super(),this.nsps={},this.subs=[],k&&"object"==typeof k&&(B=k,k=void 0),(B=B||{}).path=B.path||"/socket.io",this.opts=B,ua(this,B),this.reconnection(!1!==B.reconnection),this.reconnectionAttempts(B.reconnectionAttempts||1/0),this.reconnectionDelay(B.reconnectionDelay||1e3),this.reconnectionDelayMax(B.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(U=B.randomizationFactor)&&void 0!==U?U:.5),this.backoff=new sr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==B.timeout?2e4:B.timeout),this._readyState="closed",this.uri=k;const G=B.parser||F;this.encoder=new G.Encoder,this.decoder=new G.Decoder,this._autoConnect=!1!==B.autoConnect,this._autoConnect&&this.open()}reconnection(k){return arguments.length?(this._reconnection=!!k,k||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(k){return void 0===k?this._reconnectionAttempts:(this._reconnectionAttempts=k,this)}reconnectionDelay(k){var B;return void 0===k?this._reconnectionDelay:(this._reconnectionDelay=k,null===(B=this.backoff)||void 0===B||B.setMin(k),this)}randomizationFactor(k){var B;return void 0===k?this._randomizationFactor:(this._randomizationFactor=k,null===(B=this.backoff)||void 0===B||B.setJitter(k),this)}reconnectionDelayMax(k){var B;return void 0===k?this._reconnectionDelayMax:(this._reconnectionDelayMax=k,null===(B=this.backoff)||void 0===B||B.setMax(k),this)}timeout(k){return arguments.length?(this._timeout=k,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(k){if(~this._readyState.indexOf("open"))return this;this.engine=new ka(this.uri,this.opts);const B=this.engine,U=this;this._readyState="opening",this.skipReconnect=!1;const F=tr(B,"open",(function(){U.onopen(),k&&k()})),G=B=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",B),k?k(B):this.maybeReconnectOnOpen()},j=tr(B,"error",G);if(!1!==this._timeout){const k=this._timeout,U=this.setTimeoutFn((()=>{F(),G(new Error("timeout")),B.close()}),k);this.opts.autoUnref&&U.unref(),this.subs.push((()=>{this.clearTimeoutFn(U)}))}return this.subs.push(F),this.subs.push(j),this}connect(k){return this.open(k)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const k=this.engine;this.subs.push(tr(k,"ping",this.onping.bind(this)),tr(k,"data",this.ondata.bind(this)),tr(k,"error",this.onerror.bind(this)),tr(k,"close",this.onclose.bind(this)),tr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(k){try{this.decoder.add(k)}catch(e){this.onclose("parse error",e)}}ondecoded(k){oa((()=>{this.emitReserved("packet",k)}),this.setTimeoutFn)}onerror(k){this.emitReserved("error",k)}socket(k,B){let U=this.nsps[k];return U?this._autoConnect&&!U.active&&U.connect():(U=new ir(this,k,B),this.nsps[k]=U),U}_destroy(k){const B=Object.keys(this.nsps);for(const U of B){if(this.nsps[U].active)return}this._close()}_packet(k){const B=this.encoder.encode(k);for(let U=0;Uk())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(k,B){var U;this.cleanup(),null===(U=this.engine)||void 0===U||U.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",k,B),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const k=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const B=this.backoff.duration();this._reconnecting=!0;const U=this.setTimeoutFn((()=>{k.skipReconnect||(this.emitReserved("reconnect_attempt",k.backoff.attempts),k.skipReconnect||k.open((B=>{B?(k._reconnecting=!1,k.reconnect(),this.emitReserved("reconnect_error",B)):k.onreconnect()})))}),B);this.opts.autoUnref&&U.unref(),this.subs.push((()=>{this.clearTimeoutFn(U)}))}}onreconnect(){const k=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",k)}}const ar={};function rr(k,B){"object"==typeof k&&(B=k,k=void 0);const U=function(k,B="",U){let F=k;U=U||"undefined"!=typeof location&&location,null==k&&(k=U.protocol+"//"+U.host),"string"==typeof k&&("/"===k.charAt(0)&&(k="/"===k.charAt(1)?U.protocol+k:U.host+k),/^(https?|wss?):\/\//.test(k)||(k=void 0!==U?U.protocol+"//"+k:"https://"+k),F=Pa(k)),F.port||(/^(http|ws)$/.test(F.protocol)?F.port="80":/^(http|ws)s$/.test(F.protocol)&&(F.port="443")),F.path=F.path||"/";const G=-1!==F.host.indexOf(":")?"["+F.host+"]":F.host;return F.id=F.protocol+"://"+G+":"+F.port+B,F.href=F.protocol+"://"+G+(U&&U.port===F.port?"":":"+F.port),F}(k,(B=B||{}).path||"/socket.io"),F=U.source,G=U.id,j=U.path,$=ar[G]&&j in ar[G].nsps;let H;return B.forceNew||B["force new connection"]||!1===B.multiplex||$?H=new nr(F,B):(ar[G]||(ar[G]=new nr(F,B)),H=ar[G]),U.query&&!B.query&&(B.query=U.queryKey),H.socket(U.path,B)}var or,hr;Object.assign(rr,{Manager:nr,Socket:ir,io:rr,connect:rr}),function(k){k.Disconnect="disconnect",k.Reconnecting="reconnecting",k.Reconnect="reconnect",k.Message="message",k.PlayerJoined="playerJoined",k.PlayerLeft="playerLeft",k.PlayerList="playerList",k.Connect="connect",k.ConnectFailed="connect_failed",k.Error="error",k.ConnectError="connect_error",k.ReconnectAttempt="reconnect_attempt",k.ReconnectError="reconnect_error",k.ReconnectFailed="reconnect_failed",k.AnalyticsInfo="INFO",k.AnalyticsError="ERROR",k.Matched="matched",k.WaitTimeExhausted="waitTimeExhausted"}(or||(or={}));let cr=hr=class{get id(){return this.socket?this.socket.id:null}connect(k,B=null,U={}){if(!it.A.isDefined(this.socket)){let F=k;null!==B&&(F=`${F}:${B}`),this.socket=rr(F,(0,tt.merge)({forceNew:!0,transports:["websocket","xhr-polling","jsonp-polling","htmlfile"]},U))}}disconnect(){it.A.isDefined(this.socket)&&(!this.socket.connected&&this.socket.disconnected||this.socket.disconnect(),this.socket=null)}addListener(k,B){if(it.A.isDefined(this.socket))if(-1!==hr.IO_EVENTS.indexOf(k)){const U=k;this.socket.io.on(U,B)}else this.socket.on(k,B)}removeListener(k,B){if(it.A.isDefined(this.socket))if(-1!==hr.IO_EVENTS.indexOf(k)){const U=k;this.socket.io.off(U,B)}else this.socket.off(k,B)}emitEvent(k,B){it.A.isDefined(this.socket)&&this.socket.emit(k,B)}setQuery(k){it.A.isDefined(this.socket)&&(this.socket.io.opts.query=k)}isConnected(){return it.A.isDefined(this.socket)&&this.socket.connected}};var dr;cr.IO_EVENTS=[or.Reconnect,or.ReconnectAttempt,or.ReconnectError,or.ReconnectFailed],cr=hr=(0,j.Cg)([(0,Ge.injectable)()],cr),function(k){k.Get="GET",k.Post="POST",k.Put="PUT",k.Patch="PATCH",k.Delete="DELETE",k.Head="HEAD"}(dr||(dr={}));class lr{constructor(){this._httpStatusCode=0,this._headers=new Map,this._body=null,this._data=null,this._errorMessage=null}setHttpStatusCode(k){return this._httpStatusCode=k,this}getHttpStatusCode(){return this._httpStatusCode}setHeader(k,B,U=!0){const F=k.toLowerCase();return!U&&this._headers.has(F)?Z.V.log(`Could not set response header ${k} because it was already set`,J.$.Warning):this._headers.set(F,B),this}getHeader(k){const B=k.toLowerCase();return this._headers.has(B)?this._headers.get(B):null}setBody(k){return this._body=k,this}getBody(){return this._body}setErrorMessage(k){return this._errorMessage=k,this}getErrorMessage(){return this._errorMessage}wasSuccessful(){return this._httpStatusCode>=200&&this._httpStatusCode<=299&&null===this._errorMessage}setData(k){return this._data=k,this}getData(){return this._data}}let ur=class{constructor(){this._baseURI=null,this._defaultHeaders=new Map,this._defaultResponseHandler=new Map}setDefaultHeader(k,B,U=!0){!U&&this._defaultHeaders.has(k)?Z.V.log(`Could not set header ${k} as it already has a value`,J.$.Warning):this._defaultHeaders.set(k,B)}getDefaultHeaders(){return this._defaultHeaders}setBaseURI(k){this._baseURI=k}getBaseURI(){return this._baseURI}setDefaultResponseHandler(k,B,U=null){const F=`${k}`;this._defaultResponseHandler.has(F)?Z.V.log(`Could not set default handler for ${F} responses as one already exists`,J.$.Warning):this._defaultResponseHandler.set(F,{context:U,func:B})}clearDefaultResponseHandler(k){const B=`${k}`;this._defaultResponseHandler.has(B)&&this._defaultResponseHandler.delete(B)}sendRequest(k){return(0,j.sH)(this,void 0,void 0,(function*(){k.getRequestInterceptors().forEach((B=>{B.func.call(B.context,k)})),k.getBaseURI()||k.setBaseURI(this._baseURI);const B=k.getHeaders();return this._defaultHeaders.forEach(((U,F)=>{B.has(F)||k.setHeader(F,U)})),new Promise((B=>{this.sendFetchRequest(k,this.getRequestInitData(k),B)}))}))}getRequestInitData(k){const B={method:k.getMethod(),headers:{}},U=k.getHeaders();U.size>0&&U.forEach(((k,U)=>{B.headers[U]=k}));k.shouldIncludeCredentials()&&(B.credentials="include");const F=k.getBody();return F&&(k.getMethod()!==dr.Get&&k.getMethod()!==dr.Head?(B.headers["Content-Type"]=F.getContentType(),B.body=F.getData()):Z.V.log(`Cannot send a body for ${k.getMethod()} ${k.getFullURI()}`,J.$.Warning)),B}sendFetchRequest(k,B,U){return(0,j.sH)(this,arguments,void 0,(function*(k,B,U,F=1){let G=!1;const j=window.setTimeout((()=>{G=!0,this.retryRequest(k,B,U,F)||U((new lr).setHttpStatusCode(408).setErrorMessage("The request has timed out."))}),k.getTimeout());let $=null;try{$=yield fetch(k.getFullURI(),B)}catch(e){this.retryRequest(k,B,U,F)||U((new lr).setHttpStatusCode(0).setErrorMessage(`Request could not be sent - ${e.message}`))}if(window.clearTimeout(j),$&&!G){const B=new lr;if(B.setHttpStatusCode($.status),$.headers.forEach(((k,U)=>{B.setHeader(U,k,!0)})),B.setBody(yield $.arrayBuffer()),k.getResponseInterceptors().forEach((k=>{k.func.call(k.context,B)})),k.shouldUseDefaultResponseHandlers()&&this._defaultResponseHandler.size>0){let k=B.getHttpStatusCode().toString();for(let U=k.length-1;U>=0;--U){if(this._defaultResponseHandler.has(k)){const U=this._defaultResponseHandler.get(k);U.func.call(U.context,B);break}k=`${k.substr(0,U)}*${k.substr(U+1)}`}}U(B)}}))}retryRequest(k,B,U,F){const G=()=>{this.sendFetchRequest(k,B,U,F+1)};return F<=k.getRetryCount()&&(k.retryDelayMS>0||k.retryIncrementMS>0?(window.setTimeout(G,k.retryDelayMS),k.retryDelayMS=Math.min(k.retryDelayMS+k.retryIncrementMS,k.retryMaxDelayMS)):G(),!0)}};ur=(0,j.Cg)([(0,Ge.injectable)()],ur);class fr{constructor(){}static convertToJson(k){const B=new Uint8Array(k.getBody());if(B.length>0){const U=it.A.bufferToUtf8String(B);try{k.setData(JSON.parse(U))}catch(e){Z.V.log(`Malformed JSON in response: ${U}`,J.$.Error),k.setErrorMessage("No JSON body due to malformed payload")}}}}class br{constructor(k=null){this._jsonObject=null,this.setJson(k)}setJson(k){this._jsonObject=k}getJson(){return this._jsonObject}getData(){return this._jsonObject?JSON.stringify(this._jsonObject):null}getContentType(){return"application/json"}}class pr{constructor(){this._baseURI=null,this._requestURI=null,this._method=dr.Get,this._headers=new Map,this._queryParameters=new Map,this._shouldUseDefaultResponseHandlers=!0,this._requestInterceptors=[],this._responseInterceptors=[],this._body=null,this._retryCount=0,this._includeCredentials=!1,this._retryDelayMS=1e3,this._retryIncrementMS=2e3,this._retryMaxDelayMS=15e3,this._timeout=1e4}get retryDelayMS(){return this._retryDelayMS}set retryDelayMS(k){this._retryDelayMS=k}get retryIncrementMS(){return this._retryIncrementMS}set retryIncrementMS(k){this._retryIncrementMS=k}get retryMaxDelayMS(){return this._retryMaxDelayMS}set retryMaxDelayMS(k){this._retryMaxDelayMS=k}setHeader(k,B,U=!0){return!U&&this._headers.has(k)?Z.V.log(`Could not set header ${k} because an existing value for it already exists.`,J.$.Warning):this._headers.set(k,B),this}getHeaders(){return this._headers}setUseDefaultResponseHandlers(k){return this._shouldUseDefaultResponseHandlers=k,this}shouldUseDefaultResponseHandlers(){return this._shouldUseDefaultResponseHandlers}setBaseURI(k){return this._baseURI=k,this}getBaseURI(){return this._baseURI}setRequestURI(k){return this._requestURI=k,this}getRequestURI(){return this._requestURI}setQueryParameter(k,B,U=!0){return!U&&this._queryParameters.has(k)?Z.V.log(`Could not set query parameter '${k}' as it already has a value`,J.$.Warning):this._queryParameters.set(k,B),this}getQueryParameters(){return this._queryParameters}getFullURI(){let k=null;if(it.A.isDefined(this._requestURI)?k=it.A.isDefined(this._baseURI)?`${this._baseURI}/${this._requestURI}`:this._requestURI:it.A.isDefined(this._baseURI)&&(k=this._baseURI),null!==k&&this._queryParameters.size>0){let B="";this._queryParameters.forEach(((k,U)=>{B+=`${encodeURIComponent(U)}=${encodeURIComponent(k)}&`})),k=`${k}?${B.substr(0,B.length-1)}`}return k}setMethod(k){return this._method=k,this}getMethod(){return this._method}addRequestInterceptor(k,B=null){return this._requestInterceptors.push({context:B,func:k}),this}removeRequestInterceptor(k,B=null){const U=this._requestInterceptors.findIndex((U=>U.func===k&&U.context===B));return U>-1&&this._requestInterceptors.splice(U,1),this}getRequestInterceptors(){return this._requestInterceptors}addResponseInterceptor(k,B=null){return this._responseInterceptors.push({func:k,context:B}),this}removeResponseInterceptor(k,B=null){const U=this._responseInterceptors.findIndex((U=>U.func===k&&U.context===B));return U>-1&&this._responseInterceptors.splice(U,1),this}getResponseInterceptors(){return this._responseInterceptors}setRetryCount(k){return this._retryCount=k,this}getRetryCount(){return this._retryCount}setTimeout(k){return this._timeout=k,this}getTimeout(){return this._timeout}setIncludeCredentials(k){return this._includeCredentials=k,this}shouldIncludeCredentials(){return this._includeCredentials}setBody(k){return this._body=k,this}getBody(){return this._body}}var vr;!function(k){k[k.Stepped=0]="Stepped",k[k.Random=1]="Random",k[k.PhasePerSample=2]="PhasePerSample",k[k.Fixed=3]="Fixed"}(vr||(vr={}));class gr{set type(k){k!==this._type&&(this._type=k,this._getValueFunction=gr.GET_VALUE_FUNCTIONS[k])}get type(){return this._type}constructor(k=vr.Random){this.min=0,this.max=1,this.step=.5,this.offset=0,this.onSetMinMax=new Mt.H,this._value=0,this._getValueFunction=this.getValueRandom,this._type=vr.Fixed,this._value=this.offset,this.type=k}setMinMax(k=0,B=1){this.min=k,this.max=B,this.onSetMinMax.dispatch()}getValue(){return this._getValueFunction()}getValueStepped(){return this._value+=this.step,this._value%=this.max-this.min,this._value+this.min}getValueRandom(){return Math.random()*(this.max-this.min)+this.min}getValuePhasePerSample(){return this._value+=this.step,this._value%=1,ut.c.linear(this.min,this.max,this._value)}getValueFixed(){return this.min}destroy(){this.onSetMinMax.dispose(),this.onSetMinMax=null}}gr.GET_VALUE_FUNCTIONS={[vr.Stepped]:gr.prototype.getValueStepped,[vr.Random]:gr.prototype.getValueRandom,[vr.PhasePerSample]:gr.prototype.getValuePhasePerSample,[vr.Fixed]:gr.prototype.getValueFixed};class mr{get life(){return this._life}set life(k){this._life=k,this._lifePercentage=this.life/this.startingLife}get lifePercentage(){return this._lifePercentage}constructor(){this._life=1,this.startingLife=1,this.color=Ot.y.WHITE,this.alpha=1,this.startingAlpha=1,this.velocity=new pt.I(0,0),this.position=new pt.I(0,0),this.initialWorldPosition=new pt.I(0,0),this.rotationalVelocity=0,this.rotation=0,this.scale=new pt.I(1,1),this.startingScale=new pt.I(1,1),this.reset()}reset(){this.life=1,this.color=Ot.y.WHITE,this.alpha=1,this.velocity.set(0,0),this.position.set(0,0),this.rotation=0,this.rotationalVelocity=0,this.scale.set(1,1)}}class yr{get next(){return this._next}set next(k){this._next&&(this._next._prev=null),this._next=k,k&&(k._prev=this)}get prev(){return this._prev}set prev(k){this._prev&&(this._prev._next=null),this._prev=k,k&&(k._next=this)}constructor(k){this.object=k}}class _r{addObjectToList(k){this.addToList(new yr(k))}addToList(k){k.next=this.head,k.prev=null,this.head=k}removeFirst(){if(!this.head)return null;const k=this.head;return this.head=k.next,k.next=null,k}removeFromList(k){return this.removeObjectFromList(k.object)}removeObjectFromList(k){if(!this.head)return null;let B=this.head;if(B.object===k)return this.head=this.head.next,B.next=B.prev=null,B;let U=this.head.next;for(;U;){if(U.object===k){const k=U.next;return U.next=U.prev=null,B.next=k,U}B=U,U=B.next}return null}getLength(){let k=0,B=this.head;for(;B;)k++,B=B.next;return k}forEach(k){let B=this.head;for(;B;)k(B.object),B=B.next}generateArray(){const k=[];let B=this.head;for(;B;)k.push(B.object),B=B.next;return k}}class Er{get autoRecycleOnDisable(){return this._autoRecycleOnDisable}set autoRecycleOnDisable(k){k!==this._autoRecycleOnDisable&&(k?(this.aliveList.forEach(this.addActiveChangeListener.bind(this)),this.deadList.forEach(this.addActiveChangeListener.bind(this))):(this.aliveList.forEach((k=>{k.onActiveChanged.removeAll(this)})),this.deadList.forEach((k=>{k.onActiveChanged.removeAll(this)}))),this._autoRecycleOnDisable=k)}constructor(k,B=null,U=null){this._autoRecycleOnDisable=!0,this.create=k,this.reset=B,this.die=U,this.deadList=new _r,this.aliveList=new _r}allocate(k){for(let B=0;B{k.active||this.recycleObject(k)}),this)}createNewObject(){const k=this.create();return this._autoRecycleOnDisable&&this.addActiveChangeListener(k),k.onDestroy.add((()=>{this.removeObject(k)}),this),this.aliveList.addObjectToList(k),k}recycleObject(k){const B=this.aliveList.removeObjectFromList(k);B?(this.deadList.addToList(B),this.die&&this.die(k)):this.log("recycleObject - Not recycling, object not found in alive stack!")}removeListeners(k){k.onActiveChanged.removeAll(this),k.onDestroy.removeAll(this)}removeObject(k){let B=this.deadList.removeObjectFromList(k);B||(B=this.aliveList.removeObjectFromList(k),B)?this.removeListeners(k):this.log("removeObject - Not removing, object not found in dead or alive stack!")}flush(k=!1){const B=[];for(;this.deadList.head;){const k=this.deadList.head.object;B.push(k),this.deadList.removeFirst(),this.removeListeners(k)}if(k)for(let U=0;Usuper.create}});return(0,j.sH)(this,void 0,void 0,(function*(){yield B.create.call(this,k),this.imageGuid&&(yield V.W.instance.loader.loadAssets([this.imageGuid]).catch(Ut.R.createHandler(`Failed to load image for ParticleInitializeImage - ${this.imageGuid}`)))}))}initialize(k){if(k.atlas=this.imageGuid,k.frame=this.frame,!k.renderComponent){const B=k.gameObject.addComponent(ge);B.smooth=!0,B.setAnchor(.5,.5),k.renderComponent=B}k.renderComponent.updateAsset(this.imageGuid,this.frame)}}class Pr extends Dr{constructor(){super(...arguments),this.life=new gr}initialize(k){k.life=this.life.getValue()}}class Mr extends Dr{constructor(){super(...arguments),this.point1=new pt.I,this.point2=new pt.I,this.lineLocation=new gr}initialize(k){const B=this.lineLocation.getValue();k.position.add(new pt.I(ut.c.linear(this.point1.x,this.point2.x,B),ut.c.linear(this.point1.y,this.point2.y,B)))}}class Nr extends Dr{constructor(){super(...arguments),this.xLocation=new gr,this.yLocation=new gr}initialize(k){k.position.add(new pt.I(this.xLocation.getValue(),this.yLocation.getValue()))}}class xr extends Dr{constructor(){super(...arguments),this.rotation=new gr}initialize(k){k.rotation+=this.rotation.getValue()}}class Lr extends Dr{constructor(){super(...arguments),this.speed=new gr}initialize(k){k.rotationalVelocity+=this.speed.getValue()}}class kr extends Dr{constructor(){super(...arguments),this.scale=new gr}initialize(k){const B=this.scale.getValue();k.scale.set(k.scale.x*B,k.scale.y*B)}}var Br,Ur,Fr,Gr=U(10673);!function(k){k.RGB="rgb",k.HSV="hsv",k.LCH="lch"}(Br||(Br={}));class jr extends Dr{constructor(){super(...arguments),this.angle=new gr,this.speed=new gr,this.followWorldTransform=!1}initialize(k){var B,U,F;const G=this.angle.getValue()*ut.c.DEG_TO_RAD,j=this.speed.getValue(),$=new pt.I(Math.sin(G)*j,Math.cos(G)*j);if(this.followWorldTransform){const G=null!==(F=null===(U=null===(B=k.gameObject.parent)||void 0===B?void 0:B.parent)||void 0===U?void 0:U.transform.worldScale)&&void 0!==F?F:new pt.I(1,1);k.velocity.add(new pt.I($.x*G.x,$.y*G.y))}else k.velocity.add($)}}class $r extends Dr{constructor(){super(...arguments),this.x=new gr,this.y=new gr,this.followWorldTransform=!1}initialize(k){var B,U,F;const G=this.x.getValue(),j=this.y.getValue();if(this.followWorldTransform){const $=null!==(F=null===(U=null===(B=k.gameObject.parent)||void 0===B?void 0:B.parent)||void 0===U?void 0:U.transform.worldScale)&&void 0!==F?F:new pt.I(1,1);k.velocity.add(new pt.I(G*$.x,j*$.y))}else k.velocity.add(new pt.I(G,j))}}!function(k){k.PositionRect="PositionRect",k.PositionLine="PositionLine",k.Image="Image",k.ImageList="ImageList",k.Alpha="Alpha",k.Life="Life",k.Rotation="Rotation",k.Scale="Scale",k.Velocity="Velocity",k.VelocityXY="VelocityXY",k.RotateWithVelocity="RotateWithVelocity",k.RotationalVelocity="RotationalVelocity",k.Spine="Spine",k.SpineRandomAnimation="SpineRandomAnimation",k.Tint="Tint"}(Ur||(Ur={})),function(k){k.Alpha="Alpha",k.AlphaMax="AlphaMax",k.Dampen="Dampen",k.Flipbook="Flipbook",k.LifeFromPosition="LifeFromPosition",k.RotateWithVelocity="RotateWithVelocity",k.Immortal="Immortal",k.Scale="Scale",k.Attract="Attract",k.Jitter="Jitter"}(Fr||(Fr={}));class Hr{static getInitializer(k){const B=Hr.InitializerConstructors.get(k)();return B.__type=k,B}static getBehaviour(k){const B=Hr.BehaviourConstructors.get(k)();return B.__type=k,B}static createInitializer(k,B){const U=new k;return U.__type=B,U}static createBehaviour(k,B){const U=new k;return U.__type=B,U}static getBehaviourNames(){return Array.from(Hr.BehaviourConstructors.keys())}static getInitializerNames(){return Array.from(Hr.InitializerConstructors.keys())}}Hr.InitializerConstructors=new Map([[Ur.Image,Hr.createInitializer.bind(Hr,Rr,Ur.Image)],[Ur.ImageList,Hr.createInitializer.bind(Hr,class extends Dr{constructor(){super(...arguments),this.imageGuids=["c108638e-c0db-414f-859f-bc33c6a4dbca"],this.randomize=!0,this._currentImageIndex=-1}create(k){const B=Object.create(null,{create:{get:()=>super.create}});return(0,j.sH)(this,void 0,void 0,(function*(){yield B.create.call(this,k),this.imageGuids&&(yield V.W.instance.loader.loadAssets(this.imageGuids).catch(Ut.R.createHandler(`Failed to load image for ParticleInitializeImage - ${this.imageGuids.join(", ")}`)))}))}initialize(k){if(this.randomize?this._currentImageIndex=Math.floor(Math.random()*this.imageGuids.length):this._currentImageIndex=(this._currentImageIndex+1)%this.imageGuids.length,k.atlas=this.imageGuids[this._currentImageIndex],!k.renderComponent){const B=k.gameObject.addComponent(ge);B.smooth=!0,B.setAnchor(.5,.5),k.renderComponent=B}k.renderComponent.updateAsset(k.atlas)}},Ur.ImageList)],[Ur.Rotation,Hr.createInitializer.bind(Hr,xr,Ur.Rotation)],[Ur.Scale,Hr.createInitializer.bind(Hr,kr,Ur.Scale)],[Ur.Life,Hr.createInitializer.bind(Hr,Pr,Ur.Life)],[Ur.Alpha,Hr.createInitializer.bind(Hr,class extends Dr{constructor(){super(...arguments),this.alpha=new gr}initialize(k){k.alpha=this.alpha.getValue()}},Ur.Alpha)],[Ur.Tint,Hr.createInitializer.bind(Hr,class extends Dr{constructor(){super(...arguments),this.colorA="#ffaaff",this.colorB="#ff00ff",this.mode=Br.RGB,this.mix=new gr}initialize(k){if(k.renderComponent){const B=Rt.stringToRgb(this.colorA),U=Rt.stringToRgb(this.colorB),F=this.mix.getValue();let G;switch(this.mode){case Br.HSV:G=Rt.hsvInterpolate(B,U,F);break;case Br.LCH:G=Rt.lchInterpolate(B,U,F);break;case Br.RGB:default:G=Rt.rgbInterpolate(B,U,F)}k.renderComponent.tint=dt.Color.shared.setValue([G.r,G.g,G.b]).toNumber()}}},Ur.Tint)],[Ur.Velocity,Hr.createInitializer.bind(Hr,jr,Ur.Velocity)],[Ur.VelocityXY,Hr.createInitializer.bind(Hr,$r,Ur.VelocityXY)],[Ur.RotateWithVelocity,Hr.createInitializer.bind(Hr,class extends Dr{initialize(k){const B=Math.atan2(k.velocity.y,k.velocity.x);k.rotation=B*ut.c.RAD_TO_DEG}},Ur.RotateWithVelocity)],[Ur.RotationalVelocity,Hr.createInitializer.bind(Hr,Lr,Ur.RotationalVelocity)],[Ur.PositionRect,Hr.createInitializer.bind(Hr,Nr,Ur.PositionRect)],[Ur.PositionLine,Hr.createInitializer.bind(Hr,Mr,Ur.PositionLine)],[Ur.Spine,Hr.createInitializer.bind(Hr,class extends Dr{constructor(){super(...arguments),this.asset="",this.animationName="",this.loopAnimation=!0}initialize(k){var B,U;if(!(null===(B=this.asset)||void 0===B?void 0:B.length))return;let F;k.renderComponent?F=k.renderComponent:(F=k.gameObject.addComponent(Gr.v),k.renderComponent=F),F.setAsset(this.asset),(null===(U=this.animationName)||void 0===U?void 0:U.length)&&F.setAnimationByName(0,this.animationName,this.loopAnimation)}},Ur.Spine)],[Ur.SpineRandomAnimation,Hr.createInitializer.bind(Hr,class extends Dr{constructor(){super(...arguments),this.loopAnimation=!0}initialize(k){const B=k.renderComponent;if(!B)return void Z.V.log("No Spine Found On Particle!!",J.$.Error);const U=B.getSpine().skeleton.data.animations,F=Math.floor(Math.random()*U.length);B.setAnimationByName(0,U[F].name,this.loopAnimation)}},Ur.SpineRandomAnimation)]]),Hr.BehaviourConstructors=new Map([[Fr.Alpha,Hr.createBehaviour.bind(Hr,Sr,Fr.Alpha)],[Fr.AlphaMax,Hr.createBehaviour.bind(Hr,Ar,Fr.AlphaMax)],[Fr.Scale,Hr.createBehaviour.bind(Hr,Ir,Fr.Scale)],[Fr.Dampen,Hr.createBehaviour.bind(Hr,class extends Tr{constructor(){super(...arguments),this.xDampen=.9,this.yDampen=.9,this.rotationalDampen=.9}update(k,B,U){k.rotationalVelocity*=Math.pow(this.rotationalDampen,U),k.velocity.x*=Math.pow(this.xDampen,U),k.velocity.y*=Math.pow(this.yDampen,U)}},Fr.Dampen)],[Fr.Flipbook,Hr.createBehaviour.bind(Hr,Cr,Fr.Flipbook)],[Fr.LifeFromPosition,Hr.createBehaviour.bind(Hr,Or,Fr.LifeFromPosition)],[Fr.Immortal,Hr.createBehaviour.bind(Hr,class extends Tr{constructor(){super(...arguments),this.minimumLife=1}update(k,B){k.life=Math.max(this.minimumLife,k.life)}},Fr.Immortal)],[Fr.Attract,Hr.createBehaviour.bind(Hr,class extends Tr{constructor(){super(...arguments),this.targetName="target",this.strength=.1,this.maxVelocity=20,this.velocityLerp=.1}create(k){var B;this._target=null===(B=k.GameObject.findChildByName(this.targetName))||void 0===B?void 0:B.findComponent(Ct.d)}update(k,B,U){if(!this._target)return;const F=this._target.localPosition,G=this._target.worldScale;F.x*=G.x,F.y*=G.y;const j=new pt.I((F.x-k.position.x)*this.strength,(F.y-k.position.y)*this.strength);j.getMagnitude()>this.maxVelocity&&(j.normalize(),j.multiply({x:this.maxVelocity,y:this.maxVelocity})),j.multiply({x:U,y:U});const $=this.velocityLerp*U;j.x=ut.c.linear(k.velocity.x,j.x,$),j.y=ut.c.linear(k.velocity.y,j.y,$),k.velocity=j}},Fr.Attract)],[Fr.Jitter,Hr.createBehaviour.bind(Hr,class extends Tr{constructor(){super(...arguments),this.strength=5}update(k,B){k.position.x+=ut.c.random(-this.strength,this.strength),k.position.y+=ut.c.random(-this.strength,this.strength)}},Fr.Jitter)],[Fr.RotateWithVelocity,Hr.createBehaviour.bind(Hr,class extends Tr{constructor(){super(...arguments),this.additionalRotation=0,this.smoothing=0}update(k,B,U){const F=Math.atan2(k.velocity.y,k.velocity.x)*ut.c.RAD_TO_DEG+this.additionalRotation;k.rotation=ut.c.linear(F,k.rotation,this.smoothing*U)}},Fr.RotateWithVelocity)]]);class Vr extends gt.${constructor(){super(...arguments),this.autoUpdateCache=!0,this.iteratedNumberKeys=["min","max","step","offset"],this.vectorKeys=["_x","_y"]}generate(k,B){this._initializerOptions||(this._initializerOptions=Hr.getInitializerNames()),this._behaviorOptions||(this._behaviorOptions=Hr.getBehaviourNames());const U=this.getSystem();if(!U)return yt.X.createVertical([he.b.create({id:"no-particle-system",message:"No Particle System found, try refreshing"}),Et.X.create({id:"refresh-button",buttonText:"Refresh",onClick:()=>{this._editorAPI.redrawCustomInspector()}})]);const F=[];return F.push(Et.X.create({id:"reset-all-button",buttonText:"Reset All",onClick:()=>{let k=this.getSystem().GameObject;for(;k.parent;)k=k.parent;const B=k.findComponentsInChildren(Wr);for(const U of B)U.reset()}})),F.push(Et.X.create({id:"reset-button",buttonText:"Reset",onClick:()=>{this.getSystem().reset()}})),F.push(Et.X.create({id:"emit-button",buttonText:"Emit 1",onClick:()=>{this.getSystem().emit()}})),this.autoUpdateCache||F.push(Et.X.create({id:"write-cache",buttonText:"Write Cache",onClick:()=>{this.updateCache(!0)}})),F.push(It.G.checkboxGroup({id:"autoUpdateCache",labelValue:"Auto Update Cache",inputValue:this.autoUpdateCache,onChange:(k,B)=>{this.autoUpdateCache=B,this._editorAPI.redrawCustomInspector()}})),F.push(It.G.checkboxGroup({id:"world-space",labelValue:"World Space",inputValue:U.worldSpace,onChange:(k,B)=>{this.getSystem().worldSpace=B,this.updateCache()}})),F.push(It.G.checkboxGroup({id:"spawn-in-back",labelValue:"Spawn In Back",inputValue:U.spawnInBack,onChange:(k,B)=>{this.getSystem().spawnInBack=B,this.updateCache()}})),F.push(It.G.checkboxGroup({id:"paused-system",labelValue:"Paused",inputValue:U.paused,onChange:(k,B)=>{this.getSystem().paused=B,this.updateCache()}})),F.push(It.G.checkboxGroup({id:"pause-emission",labelValue:"Pause Emission",inputValue:U.pauseEmission,onChange:(k,B)=>{this.getSystem().pauseEmission=B,this.updateCache()}})),F.push(It.G.numberGroup({id:"max-particles",labelValue:"Max Particles",inputValue:U.maxParticles,onChange:(k,B)=>{this.getSystem().maxParticles=B,this.updateCache()}})),F.push(It.G.numberGroup({id:"total-particles",labelValue:"Total Particles",inputValue:U.totalParticles,onChange:(k,B)=>{this.getSystem().totalParticles=B,this.updateCache()}})),F.push(this.getTopLevelIteratedNumberInspector(U.emitPerSecond,"emitPerSecond")),F.push(It.G.numberGroup({id:"prewarm",labelValue:"Prewarm (Seconds)",inputValue:U.prewarm,inputUpdateMode:Tt.JG.Confirm,onChange:(k,B)=>{this.getSystem().prewarm=B,this.updateCache()}})),F.push(Ce._.line()),F.push(this.createInitializersEditor(U.initializers)),F.push(It.G.dropdownGroup({labelValue:"Add Initializer",id:"add-end-initializers",selectValue:0,selectOptions:this._initializerOptions,onChange:k=>{this.getSystem().initializers.push(Hr.InitializerConstructors.get(k)()),this.updateCache()}})),F.push(Ce._.line()),F.push(this.createBehavioursEditor(U.behaviours)),F.push(It.G.dropdownGroup({labelValue:"Add Behaviour",id:"add-end-behaviours",selectValue:0,selectOptions:this._behaviorOptions,onChange:k=>{this.getSystem().behaviours.push(Hr.BehaviourConstructors.get(k)()),this.updateCache()}})),yt.X.createVertical(F)}getSystem(){return this._editorAPI.getComponent(this._componentGuid)}updateCache(k=!1){if(!this.autoUpdateCache&&!k)return void this._editorAPI.redrawCustomInspector();const B=this.getSystem();B.create();const U=B.initializers.map(this.serializeStep.bind(this)),F=B.behaviours.map(this.serializeStep.bind(this));this._editorAPI.modifyComponent(this._componentGuid,{initializers:U,behaviours:F,emitPerSecond:{type:B.emitPerSecond.type,min:B.emitPerSecond.min,max:B.emitPerSecond.max,step:B.emitPerSecond.step,offset:B.emitPerSecond.offset},spawnInBack:B.spawnInBack,maxParticles:B.maxParticles,worldSpace:B.worldSpace,totalParticles:B.totalParticles,pauseEmission:B.pauseEmission,paused:B.paused})}serializeStep(k){const B=Object.keys(k),U={};for(const F of B)if(!F.startsWith("_"))if("object"==typeof k[F]){const B=Object.keys(k[F]);this.iteratedNumberKeys.every((k=>B.includes(k)))?U[F]={type:k[F].type,min:k[F].min,max:k[F].max,step:k[F].step,offset:k[F].offset}:this.vectorKeys.every((k=>B.includes(k)))?U[F]={x:k[F].x,y:k[F].y}:Array.isArray(k[F])&&(U[F]=k[F])}else U[F]=k[F];return U.__type=k.__type,U}createInitializersEditor(k){const B=[];for(let U=0;U{const U=this.getSystem(),F=U[B][k-1];U[B][k-1]=U[B][k],U[B][k]=F,this.updateCache()}})),U.push(Et.X.create({id:`move-down-${B}-${k}`,buttonText:"⬇️",buttonDisabled:k===this.getSystem()[B].length-1,onClick:()=>{const U=this.getSystem(),F=U[B][k+1];U[B][k+1]=U[B][k],U[B][k]=F,this.updateCache()}})),U.push(wr._.create({id:`add-${B}-${k}`,selectValue:0,selectOptions:"behaviours"===B?this._behaviorOptions:this._initializerOptions,onChange:U=>{const F=this.getSystem();"behaviours"===B?F.behaviours.splice(k,0,Hr.BehaviourConstructors.get(U)()):F.initializers.splice(k,0,Hr.InitializerConstructors.get(U)()),this.updateCache()}})),U.push(ce.l.create({id:`break-${k}`,labelValue:" "})),U.push(Et.X.create({id:`delete-${B}-${k}`,buttonText:"❌",onClick:()=>{this.getSystem()[B].splice(k,1),this.updateCache()}})),yt.X.createHorizontal(U)}getParticleStepInspector(k,B,U){const F=[this.getParticleStepHeader(B,U)];return Object.keys(k).filter((k=>!k.startsWith("_"))).forEach((G=>{const j=(k,F)=>{this.getSystem()[U][B][G]=F,this.updateCache()},$={id:G+Math.random(),labelValue:G,inputUpdateMode:Tt.JG.Confirm};if("object"==typeof k[G]){const j=Object.keys(k[G]);if(this.iteratedNumberKeys.every((k=>j.includes(k))))F.push(this.getIteratedNumberInspector(k,G,B,U));else if(this.vectorKeys.every((k=>j.includes(k))))F.push(yt.X.createVertical([ce.l.create($),It.G.numberGroup(Object.assign(Object.assign({},$),{id:`x-${$.id}`,labelValue:"x",inputValue:k[G]._x,onChange:(F,j)=>{k[G]._x=j;this.getSystem()[U][B]=k,this.updateCache()}})),It.G.numberGroup(Object.assign(Object.assign({},$),{id:`y-${$.id}`,labelValue:"y",inputValue:k[G]._y,onChange:(F,j)=>{k[G]._y=j;this.getSystem()[U][B]=k,this.updateCache()}}))]));else if("imageGuids"===G)for(let H=0;H<8;H++){const j=k[G][H];F.push(It.G.imagePickerGroup(Object.assign(Object.assign({},$),{id:`image-guid-${$.id}-${H}`,labelValue:`Image ${H}`,guid:j,onChange:F=>{k[G][H]=F.length?F:void 0;this.getSystem()[U][B]=k,this.updateCache()}})))}else F.push(ce.l.create({id:Math.random().toString(),labelValue:`Unknown object ${G} - ${JSON.stringify(k[G])}. Please update ParticleSystemInspector`}))}else if("imageGuid"===G)F.push(It.G.imagePickerGroup(Object.assign(Object.assign({},$),{id:`image-guid-${$.id}`,labelValue:"Image",guid:k[G],onChange:F=>{k[G]=F;this.getSystem()[U][B]=k,this.updateCache()}})));else switch($.inputValue=k[G],$.onChange=j,typeof k[G]){case"string":F.push(It.G.textGroup($));break;case"boolean":F.push(It.G.checkboxGroup($));break;case"number":F.push(It.G.numberGroup($));break;case"function":break;default:F.push(ce.l.create({id:Math.random().toString(),labelValue:`Unknown parameter ${G} - ${typeof k[G]}. Please update ParticleSystemInspector`}))}})),yt.X.createVertical(F,{isCollapsible:!0,title:k.__type})}getIteratedNumberInspector(k,B,U,F){const G={id:B+Math.random(),labelValue:B,inputUpdateMode:Tt.JG.Confirm},j={title:`${B} - Iterated Number`,isContainer:!0},$=It.G.enumGroup(Object.assign(Object.assign({},G),{id:`type-${G.id}`,labelValue:"type",selectValue:k[B].type,onChange:G=>{k[B].type=G;this.getSystem()[F][U]=k,this.updateCache()}}),vr),H=It.G.numberGroup(Object.assign(Object.assign({},G),{id:`min-${G.id}`,labelValue:k[B].type===vr.Fixed?"value":"min",inputValue:k[B].min,onChange:(G,j)=>{k[B].min=j;this.getSystem()[F][U]=k,this.updateCache()}}));if(k[B].type===vr.Fixed)return yt.X.createVertical([$,H],j);const V=It.G.numberGroup(Object.assign(Object.assign({},G),{id:`max-${G.id}`,labelValue:"max",inputValue:k[B].max,onChange:(G,j)=>{k[B].max=j;this.getSystem()[F][U]=k,this.updateCache()}}));return k[B].type===vr.Random?yt.X.createVertical([$,H,V],j):yt.X.createVertical([$,H,V,It.G.numberGroup(Object.assign(Object.assign({},G),{id:`step-${G.id}`,labelValue:"step",inputValue:k[B].step,onChange:(G,j)=>{k[B].step=j;this.getSystem()[F][U]=k,this.updateCache()}})),It.G.numberGroup(Object.assign(Object.assign({},G),{id:`offset-${G.id}`,labelValue:"offset",inputValue:k[B].offset,onChange:(G,j)=>{k[B].offset=j;this.getSystem()[F][U]=k,this.updateCache()}}))],j)}getTopLevelIteratedNumberInspector(k,B){const U={id:B+Math.random(),labelValue:B,inputUpdateMode:Tt.JG.Confirm},F={title:`${B} - Iterated Number`,isContainer:!0},G=It.G.enumGroup(Object.assign(Object.assign({},U),{id:`type-${U.id}`,labelValue:"type",selectValue:k.type,onChange:U=>{k.type=U.valueOf();this.getSystem()[B]=k,this.updateCache()}}),vr),j=It.G.numberGroup(Object.assign(Object.assign({},U),{id:`min-${U.id}`,labelValue:k.type===vr.Fixed?"value":"min",inputValue:k.min,onChange:(U,F)=>{k.min=F;this.getSystem()[B]=k,this.updateCache()}}));if(k.type===vr.Fixed)return yt.X.createVertical([G,j],F);const $=It.G.numberGroup(Object.assign(Object.assign({},U),{id:`max-${U.id}`,labelValue:"max",inputValue:k.max,onChange:(U,F)=>{k.max=F;this.getSystem()[B]=k,this.updateCache()}}));return k.type===vr.Random?yt.X.createVertical([G,j,$],F):yt.X.createVertical([G,j,$,It.G.numberGroup(Object.assign(Object.assign({},U),{id:`step-${U.id}`,labelValue:"step",inputValue:k.step,onChange:(U,F)=>{k.step=F;this.getSystem()[B]=k,this.updateCache()}})),It.G.numberGroup(Object.assign(Object.assign({},U),{id:`offset-${U.id}`,labelValue:"offset",inputValue:k.offset,onChange:(U,F)=>{k.offset=F;this.getSystem()[B]=k,this.updateCache()}}))],F)}}let Wr=class extends $.u{constructor(){super(),this.initializers=[],this.behaviours=[],this.maxParticles=100,this.worldSpace=!0,this.worldSpaceScaling=!0,this.totalParticles=-1,this.emitPerSecond=new gr,this.pauseEmission=!1,this.paused=!1,this.spawnInBack=!0,this.prewarm=0,this.onAllParticlesDead=new Mt.H,this._nextBurstTime=0,this._emitCount=0,this._lastEmit=0,this._nextEmit=0,this._time=0,this._created=!1,this._particles=new Er(this.createParticle.bind(this),this.resetParticle.bind(this),this.killParticle.bind(this))}create(){if(this._created)return;this._created=!0,super.create();const k=new gr;k.max=this.emitPerSecond.max,k.min=this.emitPerSecond.min,k.step=this.emitPerSecond.step,k.offset=this.emitPerSecond.offset,k.type=this.emitPerSecond.type,this.emitPerSecond=k,this.emitPerSecond.onSetMinMax.add(this.onEmitPerSecondUpdate.bind(this));const B=[];this.initializers=this.initializers.map((k=>{const U=Hr.getInitializer(k.__type);return this.applySerializedObject(U,k),B.push(U.create(this)),U})),this.behaviours=this.behaviours.map((k=>{const B=Hr.getBehaviour(k.__type);return this.applySerializedObject(B,k),B.create(this),B})),this.prewarm>0&&Promise.all(B).then((()=>{this.runForward(this.prewarm)})).catch(Ut.R.createHandler("Failed to prewarm particle system"))}applySerializedObject(k,B){for(const U in B)if("object"==typeof B[U])this.applySerializedObject(k[U],B[U]);else{let F=U;"_"===U.charAt(0)&&(F=U.slice(1));const G=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(k),F);if((null==G?void 0:G.get)&&!(null==G?void 0:G.set))continue;k[F]=B[U]}}destroy(){var k;super.destroy(),this._particles.destroy(!0),null===(k=this.emitPerSecond)||void 0===k||k.destroy(),this.emitPerSecond=null,this.initializers=null,this.behaviours=null,this.onAllParticlesDead.dispatch(),this.onAllParticlesDead.dispose()}reset(){this._emitCount=0,this._lastEmit=0,this._time=0,this._nextEmit=1/this.emitPerSecond.getValue(),this._particles.flush(!0),this._particles.aliveList.forEach((k=>{k.active=!1}))}warmUp(k=this.maxParticles,B){if(B){const U=this.initializers;this.initializers=B,this.emit(k),this.initializers=U}else this.emit(k)}runForward(k){this._created||this.create();let B=k;for(;B>0;){const k=Math.min(B,ks.Z.DEFAULT_SPF);this.progressBurstTime(),this.pauseEmission||(this._time+=k,this._lastEmit+=k,(this.totalParticles<0||this.totalParticles>this._emitCount)&&this._particles.aliveList.getLength()=this._nextEmit&&(this._particles.getObject(),this._lastEmit-=this._nextEmit,this._nextEmit=1/this.emitPerSecond.getValue())),this.updateParticles(k),B-=k}}emit(k=1){for(let B=Math.min(k,this.maxParticles-this._particles.aliveList.getLength());B>0;--B)this._particles.getObject()}killParticle(k){const B=k.particle.renderComponent;B&&(B.destroy(),k.particle.renderComponent=void 0),0===this._particles.aliveList.getLength()&&this.onAllParticlesDead.dispatch()}createParticle(){const k=new Te._(this.gameObject);k.addComponent(Ct.d);const B=new mr;return B.gameObject=k,k.particle=B,this.initializeParticle(k.particle),k}resetParticle(k){k.particle.reset(),this.initializeParticle(k.particle)}initializeParticle(k){var B;k.initialWorldPosition.copyFrom(this.gameObject.transform.worldPosition),this.initializers.forEach((B=>{var U;null===(U=B.initialize)||void 0===U||U.call(B,k)})),k.startingLife=k.life,k.startingScale.copyFrom(k.scale),k.startingAlpha=k.alpha,this._emitCount++;const U=null===(B=k.renderComponent)||void 0===B?void 0:B.getRootContainer();U&&(this.spawnInBack?U.parent.setChildIndex(U,0):U.parent.setChildIndex(U,U.parent.children.length-1))}onEnable(){super.onEnable(),this._time=0,this._nextEmit=1/this.emitPerSecond.getValue(),this._emitCount=0,this.burstTime&&(this._nextBurstTime=this._time+this.burstTime.getValue()),this.gameObject.transform.onWorldMatrixChanged.add(this.updateTransform,this)}onDisable(){var k,B;null===(B=null===(k=this.gameObject)||void 0===k?void 0:k.transform)||void 0===B||B.onWorldMatrixChanged.removeAll(this),super.onDisable()}updateTransform(){var k;this.worldSpace&&this.worldSpaceScaling&&(null===(k=this.gameObject.parent)||void 0===k?void 0:k.transform)&&this.gameObject.transform.setScale(1/this.gameObject.parent.transform.worldScale.x,1/this.gameObject.parent.transform.worldScale.y)}onEmitPerSecondUpdate(){(this._nextEmitthis.emitPerSecond.max)&&(this._nextEmit=1/this.emitPerSecond.getValue())}update(){if(this._created||this.create(),super.update(),this.paused)return;const k=Math.min(.001*V.W.instance.game.time.deltaMS,ks.Z.DEFAULT_SPF);if(!this.pauseEmission&&(this._time+=k,this._lastEmit+=k,this.totalParticles<0||this.totalParticles>this._emitCount)){let k=0;for(;this._particles.aliveList.getLength()this._nextEmit;)if(this._particles.getObject(),this._lastEmit-=this._nextEmit,k+=this._nextEmit,this._nextEmit=1/this.emitPerSecond.getValue(),k>.034){this._lastEmit%=this._nextEmit;break}}this.updateParticles(k),this.progressBurstTime()}updateParticles(k){const B=k/ks.Z.DEFAULT_SPF,U=new pt.I,F=[];this._particles.aliveList.forEach((G=>{const j=G.particle;j.life-=k,j.life<0?F.push(G):(j.scale.copyFrom(j.startingScale),this.behaviours.forEach((k=>{const U=(j.lifePercentage-k.startAtLifePercentage)/(k.endAtLifePercentage-k.startAtLifePercentage);U>=0&&U<=1&&k.update&&k.update(j,U,B)})),U.setTo(j.velocity.x*k,j.velocity.y*k),j.position.add(U),j.rotation+=j.rotationalVelocity*k,G.transform.setScale(j.scale.x,j.scale.y),this.worldSpace?G.transform.localPosition=new pt.I(j.position.x+(j.initialWorldPosition.x-this.gameObject.transform.worldPosition.x),j.position.y+(j.initialWorldPosition.y-this.gameObject.transform.worldPosition.y)):G.transform.localPosition=j.position,G.transform.localRotation=j.rotation,j.renderComponent&&(j.renderComponent.getRootContainer().alpha=j.startingAlpha*j.alpha))}));for(let G=F.length-1;G>=0;--G){F[G].active=!1}}progressBurstTime(){this.burstTime&&this._time>this._nextBurstTime&&(this._nextBurstTime=this._time+this.burstTime.getValue(),this._emitCount=0)}};(0,j.Cg)([(0,q.np)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],Wr.prototype,"initializers",void 0),(0,j.Cg)([(0,q.np)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],Wr.prototype,"behaviours",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Wr.prototype,"maxParticles",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Wr.prototype,"worldSpace",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Wr.prototype,"totalParticles",void 0),(0,j.Cg)([(0,q.np)(),(0,j.Sn)("design:type",gr)],Wr.prototype,"emitPerSecond",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Wr.prototype,"pauseEmission",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Wr.prototype,"paused",void 0),(0,j.Cg)([(0,q.np)(),(0,j.Sn)("design:type",gr)],Wr.prototype,"burstTime",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Wr.prototype,"spawnInBack",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Wr.prototype,"prewarm",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Wr.prototype,"onAllParticlesDead",void 0),Wr=(0,j.Cg)([(0,_t.W)(Vr),(0,H.EV)("ParticleSystem","Particle System","A particle system and controller"),(0,H.S1)(),(0,j.Sn)("design:paramtypes",[])],Wr);class qr extends Tr{update(k,B){this.callback(k,B)}}class Kr extends Dr{initialize(k){this.callback(k)}}class zr{constructor(k){this._dependencyData=null,this._dependencyData=k}getPrefabDependencyList(k,B){var U;if(!this._dependencyData)return new Set;const F=V.W.instance.game.cache,G=null!=B?B:new Set;if(G.has(k))return G;if(G.add(k),null===(U=this._dependencyData[k])||void 0===U?void 0:U.dependencies){const B=this._dependencyData[k].dependencies;for(let k=0;k{(()=>(0,j.sH)(this,void 0,void 0,(function*(){var j;const W=Zr.isPrefabTemplate(k)?new Qr:null,q=new Qr,K=U?this._frameWorkManager:void 0;if(this._dependencyMapper){const B=this._dependencyMapper.getPrefabDependencyList(null!=G?G:k.GUID);yield this._assetLoader.loadAssets(Array.from(B))}if(yield Gt.completeGeneratorAsync(this.instantiatePrefab(q,k,B,W),K),$.cancelled||!it.A.isDefined(q.Root))return void V("PrefabLoader.loadFromJSONWithDependencies: promise cancelled or root undefined at instantiatePrefab");const z=this.gatherInstantiatedComponents(q.Root),Y=this.convertInjectionDataToInjectionLinkData(null!==(j=k.Injections)&&void 0!==j?j:[],null!=F?F:[]);null!==Y?(yield Gt.completeGeneratorAsync(this.mapPrefab(q,k,q.Root,W,Y),K),$.cancelled?V("PrefabLoader.loadFromJSONWithDependencies: promise cancelled at mapPrefab"):(yield this.preloadAssets(q.Root),$.cancelled?V("PrefabLoader.loadFromJSONWithDependencies: promise cancelled at preloadAssets"):(yield Gt.completeGeneratorAsync(this.createPrefab(z),K),$.cancelled?V("PrefabLoader.loadFromJSONWithDependencies: promise cancelled at createPrefab"):(yield Gt.completeGeneratorAsync(this.postCreatePrefab(z),K),$.cancelled?V("PrefabLoader.loadFromJSONWithDependencies: promise cancelled at postCreatePrefab"):H(q.Root))))):V("PrefabLoader.loadFromJSONAsync: injectionLinkData is null")})))().catch((k=>{V(Ut.R.stringify(k))}))}));return $}preloadFromGUIDWithDependencies(k,B=!1,U){const F=this._prefabService.getPrefabFromGuid(k);return this.preloadFromJSONWithDependencies(F,B,U,k)}preloadFromJSONWithDependencies(k,B=!1,U,F){let G;const $=k=>{k.components.length=0;for(const B of k.children)$(B)},H=()=>{G&&($(G),G.destroy(),G=null)},V=new qt((($,W)=>{(()=>(0,j.sH)(this,void 0,void 0,(function*(){var j;const H=Zr.isPrefabTemplate(k)?new Qr:null,q=new Qr,K=B?this._frameWorkManager:void 0;if(this._dependencyMapper){const B=this._dependencyMapper.getPrefabDependencyList(null!=F?F:k.GUID);yield this._assetLoader.loadAssets(Array.from(B))}const z=new Te._;if(z.active=!1,G=yield Gt.completeGeneratorAsync(this.instantiatePrefab(q,k,z,H),K),V.cancelled||!it.A.isDefined(q.Root))return void W("PrefabLoader.preloadFromJSONWithDependencies: promise cancelled or root undefined at instantiatePrefab");const Y=this.convertInjectionDataToInjectionLinkData(null!==(j=k.Injections)&&void 0!==j?j:[],null!=U?U:[]);null!==Y?(yield Gt.completeGeneratorAsync(this.mapPrefab(q,k,q.Root,H,Y),K),V.cancelled?W("PrefabLoader.preloadFromJSONWithDependencies: promise cancelled at mapPrefab"):(yield this.preloadAssets(q.Root),$())):W("PrefabLoader.loadFromJSONAsync: injectionLinkData is null")})))().catch((k=>{W(Ut.R.stringify(k))})).finally(H)}));return V}loadFromJSONProject(k,B,U=!1,F){const G=new qt((($,H)=>{(()=>(0,j.sH)(this,void 0,void 0,(function*(){var j;const V=Zr.isPrefabTemplate(k)?new Qr:null,W=new Qr,q=U?this._frameWorkManager:void 0;if(yield Gt.completeGeneratorAsync(this.instantiatePrefab(W,k,B,V),q),!it.A.isDefined(W.Root))return void H("PrefabLoader.loadFromJSONProject: promise cancelled at instantiatePrefab");const K=this.gatherInstantiatedComponents(W.Root),z=this.convertInjectionDataToInjectionLinkData(null!==(j=k.Injections)&&void 0!==j?j:[],null!=F?F:[]);null!==z?(yield Gt.completeGeneratorAsync(this.mapPrefab(W,k,W.Root,V,z),q),G.cancelled?H("PrefabLoader.loadFromJSONProject: promise cancelled at mapPrefab"):(yield this.preloadAssetsProject(W.Root),G.cancelled?H("PrefabLoader.loadFromJSONProject: promise cancelled at preloadAssetsProject"):(yield Gt.completeGeneratorAsync(this.createPrefab(K),q),G.cancelled?H("PrefabLoader.loadFromJSONProject: promise cancelled at completeGeneratorAsync - createPrefab"):(yield Gt.completeGeneratorAsync(this.postCreatePrefab(K),q),G.cancelled?H("PrefabLoader.loadFromJSONProject: promise cancelled at completeGeneratorAsync - postCreatePrefab"):$(W.Root))))):H("PrefabLoader.loadFromJSONAsync: injectionLinkData is null")})))().catch((k=>{H(Ut.R.stringify(k))}))}));return G}getLastPrefabMap(){return this._lastPrefabMap}*instantiatePrefab(k,B,U,F){var G;const j=this.generateUniqueGUID(k,B.GUID);if(!it.A.isDefined(j))return Zr.logError(`Attempting to instantiate the same object twice: ${B.GUID}.`,J.$.Error),null;yield;let H=null,V=F,W=B.Name,q=!1;if(Zr.isPrefabTemplate(B)){V=new Qr;let F=null;if(F=B.templateKey?this._prefabService.getPrefabFromGuid(B.templateKey):this._prefabService.getPrefab(B.template),!it.A.isDefined(F))return Zr.logError(`Attempting to instantiate a template that does not exist: ${B.template}.`,J.$.Error),null;B.Layer&&(F.Layer=B.Layer),yield*this.instantiatePrefab(V,F,U,null),H=V.Root,B.templateKey?(k.TemplatesKeyed[B.templateKey]||(k.TemplatesKeyed[B.templateKey]=[]),k.TemplatesKeyed[B.templateKey].push(V)):(k.Templates[B.template]||(k.Templates[B.template]=[]),k.Templates[B.template].push(V))}else if(Zr.isPrefabOverride(B)){if(!V.Map.hasOwnProperty(B.TUID))return Zr.logError(`Attempting to map a templated prefab that does not exist: ${B.TUID}.`,J.$.Error),null;if(!(V.Map[B.TUID]instanceof Te._))return Zr.logError(`Attempting to map a templated prefab to a non-prefab: ${B.TUID}.`,J.$.Error),null;H=V.Map[B.TUID],it.A.isDefined(W)&&""!==W||(W=H.name)}else H=new Te._(U),q=!0;it.A.isDefined(B.Name)&&""!==B.Name&&(H.name=W),B.Layer&&(H.layer=B.Layer),it.A.isDefined(B.Active)&&(H.active=B.Active),k.Map[j]=H,it.A.isDefined(k.Root)||it.A.isDefined(k.GUID)||(k.Root=H,k.GUID=j),B.Components||(B.Components=[]);for(let K=0;K0&&U.Properties){F.preDeserialize(U.Properties);for(const B of X){const G=B.alias?B.alias:B.property;let $=U.Properties[G];const H=[];if(j.hasOwnProperty(G))if(B.type===Ht.b.Signal){let k=j[G];Array.isArray(k)||(k=[k]);for(const B of k)"function"==typeof B?H.push(B):Z.V.log(`Signal injection for ${G} of ${U.GUID} is not a function`,J.$.Error);H.length>0&&!$&&($=[])}else $=j[G];if(it.A.isDefined($)){const U=B.isRecord?F[B.property]:F,G=B.isRecord?$:{[B.property]:$};Object.keys(G).forEach((F=>{switch(B.type){case Ht.b.ComponentReference:case Ht.b.UnknownObject:case Ht.b.GameObjectReference:Zr.mapObjectReference(k.Map,U,F,B.isArray,G[F]);break;case Ht.b.SceneObjectReference:Zr.mapSceneObjectReference(U,F,B.isArray,G[F]);break;case Ht.b.Signal:Zr.mapSignal(k.Map,U,F,G[F],H);break;case Ht.b.PrefabConstructable:Zr.mapPrefabConstructable(U,F,B.isArray,B.isReorderableList,G[F]);break;default:Zr.mapField(U,F,G[F])}}))}}F.customDeserialize(U.Properties),F.postDeserialize()}}for(let $=0;${this._assetLoader.loadTypedAssets(this.generateTypeMap(k),B)}))}))}gatherInstantiatedComponents(k,B=[]){const U=k.components;for(let G=U.length-1;G>=0;--G)B.push(U[G]);const F=k.children;for(let G=0;G{for(const F of k.components){const k=W.ih.getAssetProperties(F);if(k)for(const[G,j]of k){const k=F[G];if(k)for(const F of Array.isArray(k)?k:[k]){const k=j&&F[j]?F[j]:F,G=B.getAtlasAlias(k);G?U.add(G.atlasGuid):U.add(k)}}}for(const B of k.children)F(B)};return F(k),this._assetLoader.loadAssets(Array.from(U))}))}getTemplate(k,B){const U=k.Templates[B.template],F=k.TemplatesKeyed[B.templateKey];let G=null;return(null==U?void 0:U.length)>0?(G=U.shift(),U.push(G)):(null==F?void 0:F.length)>0&&(G=F.shift()),G}getOverride(k,B){const U=k[B];return U instanceof Te._?U:null}*createPrefab(k){for(const U of k)if(yield,!U.isCreated&&U.GameObject)try{U.create()}catch(B){this.handleLoadException(B)}}*postCreatePrefab(k){for(const U of k)if(U.GameObject){yield;try{U.postCreate()}catch(B){this.handleLoadException(B)}}}generateUniqueGUID(k,B){let U=B;if(it.A.isDefined(U)&&""!==U)k.Map.hasOwnProperty(U)&&(U=null);else do{U=it.A.generateGUID()}while(k.Map.hasOwnProperty(U));return U}getSerializableProperties(k){if(this._cachedSerializableProperties.has(k.constructor))return this._cachedSerializableProperties.get(k.constructor);{let B=null;const U=Reflect.getMetadata(q.UW,k.constructor);return U&&U.length>0&&(B=U.map((B=>Reflect.getMetadata(q.fY,k.constructor,B))),B=tt.orderBy(B,["priority"],["desc"]),this._cachedSerializableProperties.set(k.constructor,B)),B}}handleLoadException(k){Z.V.log("Error when loading prefab:\n",J.$.Error),Z.V.log(k,J.$.Error),Z.V.log(null==k?void 0:k.stack,J.$.Error)}static mapObjectReference(k,B,U,F,G){if(Array.isArray(B[U])||F)if(Array.isArray(G)){B[U].length>0&&(B[U]=[]);const F=B[U];for(let B=0;BU.call(G,...k,...B)),G):$.add(((...B)=>U.call(G,k,...B)),G):$.add(U,G)}else Zr.logError(`Attempting to deserialize a Signal property with an undefined handler ${F.functionName}.`,J.$.Error)}else if(F.propertyName){const k=F.args;void 0!==k?B[U].add((()=>{G[F.propertyName]=k}),G):$.add((k=>{void 0!==k?G[F.propertyName]=k:Zr.logError(`Attempting to update a property ${F.propertyName} from a Signal with undefined dispatch params.`,J.$.Error)}))}}for(const V of G)$.add(V)}static mapField(k,B,U){if(U instanceof Object&&"function"!=typeof U){k[B]||(k[B]=Array.isArray(U)?[]:{});const F=k[B];for(const k in U)Zr.mapField(F,k,U[k])}else k[B]=U}static resolveRequiredComponents(k){const B=Vt.QW.getProperties(k);for(const U of B){const B=Vt.QW.getPropertyInfo(k,U).ctor,F=k.GameObject.findComponent(B);F?k[U]=F:Z.V.log(`Missing ${B.name} component required by ${k.constructor.name} component`,J.$.Error)}}static mapPrefabConstructable(k,B,U,F,G){const j=k=>{const B=Yr.l[k];return B?new B.ctor:(Zr.logError(`Attempting to construct instance of non-prefabConstructable class ${k}`,J.$.Error),null)};if(U||F){const U=[];for(const k of G){const B=j(k);B&&U.push(B)}k[B]=U}else k[B]=j(G)}static isPrefabTemplate(k){return k instanceof Vs}static isPrefabOverride(k){return k instanceof Hs}static isComponentOverride(k){return k instanceof js}static logError(k,B){0}};var to,eo;(0,j.Cg)([Ci(z.PrefabService),(0,j.Sn)("design:type",Xr)],Jr.prototype,"_prefabService",void 0),(0,j.Cg)([Ci(z.AssetLoader),(0,j.Sn)("design:type",Object)],Jr.prototype,"_assetLoader",void 0),(0,j.Cg)([Ci(z.FrameWorkManager),(0,j.Sn)("design:type",Ls.Y)],Jr.prototype,"_frameWorkManager",void 0),Jr=Zr=(0,j.Cg)([(0,Ge.injectable)()],Jr),function(k){k[k.Individual=0]="Individual",k[k.Combined=1]="Combined"}(to||(to={})),function(k){k[k.RejectPromise=0]="RejectPromise",k[k.DispatchSignal=1]="DispatchSignal"}(eo||(eo={}));class io{constructor(){this._loader=null,this._config=null,this._prefabDependencyData=null,this._loader=V.W.instance.game.load}loadProjectConfigData(k,B,U){return(0,j.sH)(this,void 0,void 0,(function*(){let F=new URL("projectConfig/assetPathConfig.json",window.location.origin),G=new URL("projectConfig/dependencyMap.json",window.location.origin);k&&(F="string"!=typeof k?k:new URL(k)),B&&(G="string"!=typeof B?B:new URL(B));const j=this.fetchConfig(F.href).then((k=>{this.loadServerAssetConfig(k,U)})),$=this.fetchConfig(G.href).then((k=>{this.loadPrefabDependencyJson(k)}));yield Promise.all([j,$]).catch((k=>{Ut.R.logError(k,"Error loading project configs")}))}))}loadServerAssetConfig(k,B){this._config=Object.assign(Object.assign({},JSON.parse(k)),B||{});const U=Object.keys(this._config.assetData);for(let F=0;F{const F=new XMLHttpRequest;F.onload=()=>{(null==F?void 0:F.responseText)?B(F.responseText):U(new Error(`No response text found for ${k}`))},F.onerror=B=>{U(new Error(`Error fetching config from ${k}`))},F.onabort=B=>{U(new Error(`Request aborted for ${k}`))},F.open("get",k,!0),F.send()}))}))}fetchPrefabData(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=this.getAssetData(k);if(B){if("prefab"===B.type)return new Promise(((k,U)=>{const F=new XMLHttpRequest;F.onload=()=>{F.response?k(F.response):U(null)},F.onerror=k=>{U(null)},F.onabort=k=>{U(null)},F.responseType="json";const G=it.A.appendPathToURL(B.path,this.getURL());F.open("get",G.href,!0),F.send()}));Z.V.log(`Asset at ${k} is type ${B.type} expected to be "prefab"`,J.$.Warning)}return null}))}preloadAssetsForPrefab(k){return(0,j.sH)(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}preloadAssetsForPrefabs(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=[];for(const U of k)B.push(this.preloadAssetsForPrefab(U));yield Promise.all(B)}))}loadTypedAssets(k,B){throw new Error("Method not implemented.")}isLoaded(k,B){throw new Error("Method not implemented.")}loadAssets(k){return(0,j.sH)(this,void 0,void 0,(function*(){throw new Error("use loadTypedAssets for projects")}))}getAsset(k,B){throw{name:"NotImplementedError",message:"Not yet implemented"}}assignAssetData(k,B){throw{name:"NotImplementedError",message:"Not yet implemented"}}getAssetData(k){var B;if(null===(B=this._config)||void 0===B?void 0:B.assetData){if(this._config.assetData[k])return this._config.assetData[k];Z.V.log(`Could not find ${k} in asset map`,J.$.Warning)}else this.logNotInstantiated();return null}logNotInstantiated(){Z.V.log("AssetLoader returned an empty URL as either no config was loaded or no server URL was found in the config.",J.$.Warning)}}let so=class extends io{constructor(){super(...arguments),this._prefabsPreloaded=!1,this.imageRatioFileSuffix="",this.onLoadFailed=new Mt.H,this._dependenciesByGuid=new Map,this._dependenciesBeingProcessed=new Set}fetchPrefabDataSync(k){return this.prefabLoadingBehaviour===to.Individual?JSON.parse(V.W.instance.game.cache.getJSON(k)):V.W.instance.game.cache.getJSON(k)}getUrlForAsset(k,B){const U=this.getAssetData(k);if(U){const k=it.A.appendPathToURL(U.path,this.getURL());if(B){let B;return k.href.endsWith(".png")?B=".png":k.href.endsWith(".json")&&(B=".json"),new URL(this.appendImageRatioSuffix(k.href,B))}return k}return null}appendImageRatioSuffix(k,B){return k.replace(B,`${this.imageRatioFileSuffix}${B}`)}loadTypedAssets(k,B){const U=[];Object.keys(k).forEach((B=>{U.push(...Array.from(k[B].values()).map((k=>this.checkForAtlasLink(k))))})),this.loadAssetsWithGUIDs(U).then((()=>{B()}))}preloadAssetsForPrefab(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=this.getPrefabDependencyList(k);return this.loadAssetsWithGUIDs(Array.from(B.values()))}))}loadAssetsWithGUIDs(k){return(0,j.sH)(this,arguments,void 0,(function*(k,B=!0){return this.prefabLoadingBehaviour===to.Combined&&B&&!this._prefabsPreloaded?new Promise(((B,U)=>{this.loadAssetsWithGUIDs(["prefabs"],!1).then((()=>{const U=V.W.instance.game.cache.getJSON("prefabs");Object.keys(U).forEach((k=>{V.W.instance.game.cache.addJSON(k,U[k])})),this._prefabsPreloaded=!0,this.loadAssetsWithGUIDs(k).then((()=>{B()}))})).catch((k=>{U(k)}))})):new Promise(((B,U)=>{const F=new Set,G=new Set,j=()=>{if(0===F.size){let k=!0;if(0===G.size)B();else switch(this.failureBehaviour){case eo.DispatchSignal:k=!1,this.onLoadFailed.dispatch(Array.from(G.values()));break;case eo.RejectPromise:default:U(new Error(`${G.size} assets failed to load`))}k&&this._loader.onFileLoadComplete.remove($)}},$=(k,B)=>{F.has(k)?(F.delete(k),B||G.add(k),j()):G.has(k)&&B&&(G.delete(k),j())};let H=!1;k.forEach((k=>{!this.isCached(k)&&this.resolveLoadSingle(k)&&(F.add(k),H=!0)})),H?(this._loader.onFileLoadComplete.add($),this._loader.start()):B()}))}))}checkForAtlasLink(k){var B,U;const F=this._config.assetData[k];return null!==(U=null===(B=null==F?void 0:F.atlasLink)||void 0===B?void 0:B.guid)&&void 0!==U?U:k}getPrefabDependencyList(k){var B;const U=new Set,F=this.checkForAtlasLink(k);if(this._config.assetData[F]&&U.add(F),!(null===(B=this._prefabDependencyData[F])||void 0===B?void 0:B.dependencies))return U;if(this._dependenciesByGuid.has(k))return this._dependenciesByGuid.get(k);if(this._dependenciesBeingProcessed.has(k))return U;this._dependenciesBeingProcessed.add(k);const G=this._prefabDependencyData[F].dependencies;for(let j=0;j0&&H>0,V,H);break;default:return Z.V.log(`DynamicAssetLoader cannot handle asset of type ${G}`,J.$.Warning),!1}return!0}return!1}isLoaded(k,B){const U=V.W.instance.game.cache;return B===Bi.Z.Prefab||B===Bi.Z.TiledMap||B===Bi.Z.StreamedMapEla||B===Bi.Z.Json?U.checkJSONKey(k):B===Bi.Z.Atlas?U.checkTextureAtlasKey(k):B===Bi.Z.Spine?U.checkSpineKey(k):"singleImage"===B||B===Bi.Z.SingleImage?U.checkImageKey(k):B===Bi.Z.Audio||B===Bi.Z.Sfx||B===Bi.Z.Bgm?U.checkSoundKey(k):B===Bi.Z.Tileset&&U.checkTextureAtlasKey(k)}};so=(0,j.Cg)([(0,Ge.injectable)()],so);let no=class extends io{fetchPrefabDataSync(k){return JSON.parse(V.W.instance.game.cache.getJSON(k))}loadTypedAssets(k,B){B&&this._loader.onLoadComplete.addOnce(B);const U=Object.keys(k);for(let F=0;F{this._loader.onLoadComplete.addOnce((()=>{B()}));this.getPrefabDependencyList(k).forEach((k=>{this.resolveLoadSingle(k)})),this._loader.start()}))}))}getPrefabDependencyList(k){var B,U,F;const G=new Set;if(this._config.assetData[k]&&G.add(k),null===(B=this._prefabDependencyData[k])||void 0===B?void 0:B.dependencies){const B=this._prefabDependencyData[k].dependencies;for(let k=0;k{var F;return{name:B,imageGuid:k.imageIDs[U],transform:null===(F=k.transforms)||void 0===F?void 0:F[U]}})),U}static toGearFile(k){const B=[],U=[],F=[];for(let j=0;j{if(null==k?void 0:k.length){const B=V.W.instance.game.cache.getJSON(k);if(!B)return;const U=ro.fromGearFile(B);U&&this.addGear(U,!1).catch(Ut.R.createHandler("Could not add gear in getFromGear"))}})),this.autoRefresh&&this.refresh().catch(Ut.R.createHandler(`Could not refresh ${this.gameObject.name} gear in getFromGear`))}addGear(k){return(0,j.sH)(this,arguments,void 0,(function*(k,B=!0){this.gearElements.push(k),B&&(yield this.refresh().catch(Ut.R.createHandler(`Could not refresh ${this.gameObject.name} gear in addGear`)))}))}setGearAt(k,B){return(0,j.sH)(this,arguments,void 0,(function*(k,B,U=!0){this.gearElements[k]=B;for(let F=0;F<=k;F++)void 0===this.gearElements[F]&&(this.gearElements[F]=null);U&&(yield this.refresh().catch(Ut.R.createHandler(`Could not refresh ${this.gameObject.name} gear in setGearAt`)))}))}removeGear(k,B=!0){const U=this.gearElements.indexOf(k);-1!==U&&(this.gearElements.splice(U,1),B&&this.refresh().catch(Ut.R.createHandler(`Could not refresh ${this.gameObject.name} gear in removeGear`)))}shouldRecolorSlot(k){return!this._slotsToNotRecolor.has(k)}refresh(){return(0,j.sH)(this,void 0,void 0,(function*(){var k;if(!this.spine&&(this.hookSpineComponent(),!this.spine))throw new Error(`Could not find SpineComponent on ${this.gameObject.name} in SpineManagerComponent`);const B=[];for(let U=this.gearElements.length-1;U>=0;U--){const k=this.gearElements[U];if(!it.A.isDefined(k))continue;const F=k.attachments.map((k=>k.imageGuid));this._allCurrentImageGuids.push(...F),B.push(this.loadImages(F))}B.length&&(yield Promise.all(B)),this._skin.clear(),this._hiddenSlots.clear(),this._slotsToNotRecolor.clear(),this.attachmentTextureIdMap.clear(),this._activeAttachments=[],this._allCurrentImageGuids=[];for(let U=this.gearElements.length-1;U>=0;U--){const B=this.gearElements[U];it.A.isDefined(B)&&(B.hiddenSlots.forEach((k=>{this.hideSlotBySlotName(k)})),B.slotsToNotRecolor.forEach((k=>{this._slotsToNotRecolor.add(k)})),null===(k=B.attachments)||void 0===k||k.forEach((k=>this.applyTextureByAttachment(k))))}this.updateHiddenSlots(),this.updateSkin(),this.onLoadComplete.dispatch()}))}updateSkin(){var k;this.spine.pixiSpine.skeleton.setSkin(this._skin),this.spine.pixiSpine.skeleton.setSlotsToSetupPose(),null===(k=this.spine.pixiSpine.animationState)||void 0===k||k.apply(this.spine.pixiSpine.skeleton)}applyTextureByAttachment(k){const B=V.W.instance.game.cache.getTexture(k.imageGuid);if(!(null==B?void 0:B.baseTexture))return void Z.V.log(`Could not find texture with guid ${k.imageGuid} for attachment ${k.name}`,J.$.Error);lo.q.setSmoothed(B,!0);this.getSlotNames(k.name).forEach((U=>{this.applyTextureToSlot(U,k,B)})),-1===this._activeAttachments.indexOf(k.name)&&this._activeAttachments.push(k.name),this.attachmentTextureIdMap.set(k.name,k.imageGuid)}applyTextureToSlot(k,B,U){var F;if(this._hiddenSlots.has(k))return;const G=this.spine.skeleton,j=G.findSlot(k);if(!j)return void Z.V.log(`Could not find slot ${k} for attachment ${B.name}`,J.$.Error);const $=j.data;if(!$)return void Z.V.log(`Could not find data for slot ${k} for attachment ${B.name}`,J.$.Error);const H=G.findSlotIndex(k),V=G.data.defaultSkin.getAttachment(H,B.name);if(V.type===oo.Region||V.type===oo.Mesh){const k=V.copy(),G=(0,tt.clone)(k.region);G.names=k.region.names,G.values=k.region.values,G.texture=U,G.size=this.getSizeForAttachment(V,U.orig),G.size=this.applyTransform(B.transform,null!==(F=G.size)&&void 0!==F?F:U.orig),k.region=G,V.type===oo.Region&&B.transform&&(k.x=B.transform.x,k.y=B.transform.y),this._skin.setAttachment($.index,B.name,k)}}applyTransform(k,B){if(!k)return B;const U=B.clone();return U.x+=k.x,U.y+=k.y,U.width*=k.scaleX,U.height*=k.scaleY,U}getSizeForAttachment(k,B){return B}hideSlotBySlotName(k){const B=this.spine.skeleton.findSlot(k);B?this._hiddenSlots.has(k)||this._hiddenSlots.set(k,B):Z.V.log(`Slot ${k} not found on spine ${this.spine.name}`,J.$.Warning)}updateHiddenSlots(){Array.from(this._hiddenSlots.values()).forEach((k=>{const B=this.getAttachmentName(k.data.name);B&&this._skin.setAttachment(k.data.index,B,uo.hiddenAttachment)}))}isHiddenSlot(k){return this._hiddenSlots.has(k)}destroy(){this.onLoadComplete.dispose(),super.destroy()}getAttachmentName(k){return this.slotToAttachmentMap.has(k)?this.slotToAttachmentMap.get(k):k}getSlotNames(k){return this.attachmentToSlotMap.has(k)?this.attachmentToSlotMap.get(k):[k]}}uo.defaultTextures=new Map,(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],uo.prototype,"autoRefresh",void 0),(0,j.Cg)([(0,q.SZ)(),(0,q.tW)("gear"),(0,j.Sn)("design:type",Array)],uo.prototype,"gear",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],uo.prototype,"onLoadComplete",void 0),(0,j.Cg)([(0,Le.G)(),(0,j.Sn)("design:type",Function),(0,j.Sn)("design:paramtypes",[]),(0,j.Sn)("design:returntype",void 0)],uo.prototype,"getFromGear",null);var fo,bo=U(64425);class po{}po.markups={pause:{apply:(k,B,U)=>(U.delay+=k.delay,U),dataDefault:{delay:1e3}},"scale-in":{apply:(k,B,U)=>{const F=V.W.instance.game.tweens.create(B.scale,B),G=k.ease.split(".");return F.from({x:0,y:0},k.time,Be.G[G[0]][G[1]],!0,U.delay+k.delay),F.start(),U.delay+=k.delay,U},dataDefault:{time:400,delay:25,ease:"Back.Out"}},shake:{apply:(k,B,U)=>{const F=B.position.clone(),G=V.W.instance.game.tweens.create(B.position,B);return G.onUpdate.add((()=>{B.position.set(F.x+Math.random()*k.strength-k.strength,F.y+Math.random()*k.strength-k.strength)})),G.from({},1e3),G.loop(!0),G.start(),U},dataDefault:{strength:5}},circular:{apply:(k,B,U)=>{const F=B.position.clone(),G={phase:0},j=(F.x+3*F.y)/B.style.fontSize*k.freq,$=V.W.instance.game.tweens.create(G,B);return $.onUpdate.add((()=>{B.position.set(F.x+Math.cos(G.phase+j)*k.yStrength,F.y+Math.sin(G.phase+j)*k.xStrength)})),$.from({phase:2*Math.PI},k.time),$.loop(!0),$.start(),U},dataDefault:{xStrength:5,yStrength:5,time:2e3,freq:.2}},wave:{apply:(k,B,U)=>{const F=B.position.clone(),G={phase:0},j=(F.x+3*F.y)/B.style.fontSize*k.freq,$=V.W.instance.game.tweens.create(G,B);return $.onUpdate.add((()=>{B.position.set(F.x,F.y+Math.sin(G.phase+j)*k.strength)})),$.from({phase:2*Math.PI},k.time),$.loop(!0),$.start(),U},dataDefault:{strength:5,time:2e3,freq:.2}},rock:{apply:(k,B,U)=>{const F={phase:0},G=(B.position.x+3*B.position.y)/B.style.fontSize*k.freq,j=V.W.instance.game.tweens.create(F,B);return j.onUpdate.add((()=>{B.rotation=Math.sin(F.phase+G)*k.strength})),j.from({phase:2*Math.PI},k.time),j.loop(!0),j.start(),U},dataDefault:{strength:.4,time:2e3,freq:.2}},b:{applyStyle:k=>(k.fontWeight="bold",k)},i:{applyStyle:k=>(k.fontStyle="italic",k.padding=5,k)},red:{applyStyle:k=>(k.fill=fo.red,k)},yellow:{applyStyle:k=>(k.fill=fo.yellow,k)},green:{applyStyle:k=>(k.fill=fo.green,k)},cyan:{applyStyle:k=>(k.fill=fo.cyan,k)},blue:{applyStyle:k=>(k.fill=fo.blue,k)},pink:{applyStyle:k=>(k.fill=fo.pink,k)},sunset:{applyStyle:k=>(k.fill=[0,8913083,11158528],k)}},function(k){k[k.red=11730944]="red",k[k.yellow=11580160]="yellow",k[k.green=45824]="green",k[k.cyan=46003]="cyan",k[k.blue=179]="blue",k[k.pink=11731123]="pink"}(fo||(fo={}));class vo{constructor(k,B,U){if(this._markup=po.markups[k],!this._markup)return Z.V.log(`Text markup ${k} does not exist, either add it or check your spelling`,J.$.Error),void(this.start=Number.POSITIVE_INFINITY);this.type=k,this.start=U,this.data=Object.assign({},this._markup.dataDefault);const F=Object.keys(B);for(let G=0;G, perhaps use `Text` instead?",J.$.Info),this._text=k,this.onFinish(null)):this._parser.parse(k)}onText(k){k.value&&(this._textIndex+=k.value.length,this._text+=k.value)}onFinish(k){this._callback&&this._callback()}onOpenTag(k){const B={};for(let F=0;F=0;B--){const U=this.markups[B];if(U.type===k.tagName&&void 0===U.end){U.start===this._textIndex?U.start=U.end=this._textIndex-1:U.end=this._textIndex;break}}}onError(k){Z.V.log(`Text markup error ${k.code} at ${k.pos}! ${k.message}`,J.$.Error)}}let mo=class extends re{constructor(){super(...arguments),this._texts=[]}set text(k){this.createTextObject(),this.Source instanceof xt?this.Source.setText(k):this.Source=new xt(k)}get text(){var k;return null===(k=this.Source)||void 0===k?void 0:k.getText()}set lineSpacing(k){Z.V.log(`Cannot set line spacing to ${k} on TextMoney, line spacing is not yet implemented.`,J.$.Warning)}get lineSpacing(){return Z.V.log("Cannot get line spacing from TextMoney, line spacing is not implemented.",J.$.Warning),0}set underline(k){Z.V.log("Underline not supported on TextMoney",J.$.Error)}create(){super.create(),this._parser||(this._parser=new go),this._parent.visible=this.Active,this.OnActiveChanged.add((()=>this._parent.visible=this.Active)),this.setRootContainer(this._parent),this._parent.position.y-=3,this.calculateBoundsAlign()}setRootContainer(k){k===this._parent&&super.setRootContainer(k)}createTextObject(){super.createTextObject(),this.textObject.visible=!1,this._parent||(this._parent=new dt.Container)}updateText(){if(null===this._parent||null===this.Source)Z.V.log("Trying to update the text on a Text component before the text object was created.",J.$.Warning);else{const k=this.Source.getText();this._parser||(this._parser=new go),this._parser.parse(k,this.onParserFinish.bind(this))}}onParserFinish(){this.resetForNextText();const k=this._parser.text.split(" ");let B=0,U=0,F=0,G=k.length;for(let j=0;jthis.wordWrapWidth&&(this.position.x=0,this.position.y+=this.getTextObjectStyle().fontSize)}getStyleIndex(k){for(;this._nextStyleIndex=k;B--)this._parent.removeChild(this._texts[B]),V.W.instance.game.tweens.removeAllFromOwner(this._texts[B]),this._texts[B].destroy(),this._texts.pop()}loopMarkups(k,B,U){var F;let G=0;const j=[];for(let $=this._parser.markups.length-1;$>=0;$--){const H=this._parser.markups[$];if(k>=H.start&&-1===j.indexOf(H.type)&&(k=0;B--)this._parent.removeChild(this._texts[B]),V.W.instance.game.tweens.removeAllFromOwner(this._texts[B]),this._texts[B].destroy(),this._texts.pop();this._parent&&this._parent.destroy(),this._parent=null,this._texts=[],super.destroy()}};(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],mo.prototype,"text",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],mo.prototype,"lineSpacing",null),mo=(0,j.Cg)([(0,H.EV)("TextMoney",H.YH.ui,"Draws a web font on the screen as a child of the parent game object")],mo);let yo=class extends en{constructor(){super(...arguments),this._filled=!0,this._color="#393939",this._radius=50,this._alpha=1,this._strokeThickness=2,this._graphics=null,this._size=new bt.o}get filled(){return this._filled}set filled(k){this._filled=k,this.drawCircle()}get color(){return this._color}set color(k){this._color=k,this.drawCircle()}get radius(){return this._radius}set radius(k){this._radius=k;const B=2*k;this._size.setTo(B,B),this.drawCircle()}get alpha(){return this._alpha}set alpha(k){this._alpha=k,this.drawCircle()}get strokeThickness(){return this._strokeThickness}set strokeThickness(k){this._strokeThickness=k,this.drawCircle()}create(){super.create(),this._graphics=V.W.instance.game.add.graphics(0,0);const k=2*this._radius;this._size.setTo(k,k),this.setUpDisplayObject(this._graphics),this.drawCircle()}destroy(){var k;null===(k=this._graphics)||void 0===k||k.destroy(),this._graphics=null,super.destroy()}getDimensions(){return this._size}drawCircle(){if(!this._graphics)return;this._graphics.clear();const k=parseInt(this._color.substr(1),16);this._filled?this._graphics.beginFill(k,this._alpha):this._graphics.lineStyle(this._strokeThickness,k,this._alpha),this._graphics.drawCircle(this._radius,this._radius,this._radius),this._filled?this._graphics.endFill():this._graphics.lineStyle(0)}getGraphics(){return this._graphics}};(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],yo.prototype,"_filled",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String)],yo.prototype,"_color",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],yo.prototype,"_radius",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],yo.prototype,"_alpha",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],yo.prototype,"_strokeThickness",void 0),yo=(0,j.Cg)([(0,H.EV)("CirclePrimitive",H.YH.primitive,"Draws a circle using the PIXI Graphics library")],yo);let _o=class extends Pt.y{constructor(){super(...arguments),this._dashLength=100,this._dashRadius=20,this._dashGapSize=20,this._dashColor="#FFFFFF",this._isVertical=!1}create(){super.create(),this._graphics=new dt.Graphics,this.setUpDisplayObject(this._graphics),this._rectTransform=this.GameObject.findComponent(ft.X),this._rectTransform?(this._rectTransform.onRecalculatedBounds.add(this.renderDashedLine,this),this.renderDashedLine()):Z.V.log("DashedLineComponent must be attached to a RectTransform!",J.$.Error)}destroy(){var k,B;null===(B=null===(k=this._rectTransform)||void 0===k?void 0:k.onRecalculatedBounds)||void 0===B||B.remove(this.renderDashedLine,this),this._graphics.destroy(),this._rectTransform=null,this._graphics=null,super.destroy()}getDimensions(){return this._rectTransform.rectTransformDimensions}renderDashedLine(){this._graphics.clear();const k=this._rectTransform.rectTransformDimensions;if(this._isVertical){const B=new dt.Matrix;B.rotate(ut.c.degreesToRadians(90)).translate(k.width,0),this._graphics.setMatrix(B)}this._graphics.beginFill(parseInt(this._dashColor.substring(1),16));const B=this._dashLength+this._dashGapSize,U=this._isVertical?k.height:k.width,F=this._isVertical?k.width:k.height,G=Math.max(Math.floor(U/B),this._dashLength<=U?1:0);let j=Math.floor(.5*(U-(B*G-this._dashGapSize)));for(let $=0;$k||G)&&(k=V.right),(V.leftU||G)&&(U=V.bottom),(V.top{this.GameObject.transform instanceof ft.X&&this.GameObject.transform.onRecalculatedBounds.remove(this.resizeToMatchRectTransform,this)}))}postCreate(){super.postCreate(),this.GameObject.transform instanceof ft.X&&this.GameObject.transform.onRecalculatedBounds.add(this.resizeToMatchRectTransform,this)}createAndPlaceImages(){const k=this.GameObject.legacyTransform;let B,U;if(k)B=k.width/k.scaleX,U=k.height/k.scaleY;else if(this.GameObject.transform instanceof ft.X){const k=this.GameObject.transform.rectTransformDimensions;B=k.width,U=k.height}else B=0,U=0,Z.V.log("Sliced Graphic is missing valid transform. Setting size to 0",J.$.Error);this.center?(this._tiling&&!this.is9Slice()?this.imgCenter=this.createAndInitializeMesh(this.center):(this.imgCenter=this.createAndInitializeSprite(this.center),this.imgCenter.anchor.x=.5,this.imgCenter.anchor.y=.5),this.is9Slice()?this.create9Slice(B,U):this.is3Slice()?this.create3Slice(B,U):Z.V.log("Invalid SlicedGraphic arrangement was attempted.",J.$.Error)):Z.V.log("SlicedGraphic has center undefined.",J.$.Error),this.updateSmooth()}is9Slice(){return!!(this.topLeft&&this.topRight&&this.bottomLeft&&this.bottomRight)}is3Slice(){return!(this.topLeft||this.topRight||this.bottomLeft||this.bottomRight)}isHorizontal3Slice(){return!(!this.leftCenter||!this.rightCenter||this.topCenter||this.bottomCenter)}isVertical3Slice(){return!(!this.topCenter||!this.bottomCenter||this.leftCenter||this.rightCenter)}adjustImgCenterPositionWithOffset(k,B){this.imgCenter.position.x+=k,this.imgCenter.position.y+=B}createAndInitializeSprite(k){const B=new dt.Sprite(V.W.instance.game.cache.getTexture(k.atlas,k.frame));return B.name=k.frame,this.setElementProperties(B,k),this.elementsGroup.addChild(B),B}createAndInitializeMesh(k){const B=V.W.instance.game.cache.getTexture(this.center.atlas,this.center.frame),U=new dt.SimpleMesh(B,void 0,void 0,void 0,dt.DRAW_MODES.TRIANGLE_STRIP);return U.visible=!1,this.setElementProperties(U,k),this.elementsGroup.addChild(U),U}performTilingInOneDirection(k,B,U,F){const G=k===zi.e.Horizontal;U.visible=!1;const j=U.texture.frame,$=G?j.width:j.height,H=G?j.height:j.width,V=B/$;if(V>0){const B=V%1>Co.EPSILON?V%1:0,G=B>0?Math.ceil(V):Math.floor(V),j=new Uint16Array(6*G-2),W=new Float32Array(4*G*2),q=new Float32Array(4*G*2);let K=-1;for(let k=0;k<4*G;k+=4)0!==k&&(j[++K]=k),j[++K]=k,j[++K]=k+1,j[++K]=k+2,j[++K]=k+3,k!==4*G-4&&(j[++K]=k+3);let z=F;const Y=$;if(k===zi.e.Horizontal)for(let k=0;k<4*G*2;k+=8)W[k]=z,W[k+1]=0,q[k]=0,q[k+1]=0,W[k+4]=z,W[k+5]=H,q[k+4]=0,q[k+5]=1,k===4*G*2-8&&B>0?(W[k+2]=z+$*B,W[k+3]=0,q[k+2]=B,q[k+3]=0,W[k+6]=z+$*B,W[k+7]=H,q[k+6]=B,q[k+7]=1):(W[k+2]=z+$,W[k+3]=0,q[k+2]=1,q[k+3]=0,W[k+6]=z+$,W[k+7]=H,q[k+6]=1,q[k+7]=1),z+=Y;else for(let k=0;k<4*G*2;k+=8)W[k]=0,W[k+1]=z,q[k]=0,q[k+1]=0,W[k+2]=H,W[k+3]=z,q[k+2]=1,q[k+3]=0,k===4*G*2-8&&B>0?(W[k+4]=0,W[k+5]=z+$*B,q[k+4]=0,q[k+5]=B,W[k+6]=H,W[k+7]=z+$*B,q[k+6]=1,q[k+7]=B):(W[k+4]=0,W[k+5]=z+$,q[k+4]=0,q[k+5]=1,W[k+6]=H,W[k+7]=z+$,q[k+6]=1,q[k+7]=1),z+=Y;U.geometry.getIndex().update(j),U.verticesBuffer.update(W),U.uvBuffer.update(q),U.visible=!0}}create3Slice(k,B){this.isHorizontal3Slice()?(this.imgLeftCenter=this.createAndInitializeSprite(this.leftCenter),this.imgRightCenter=this.createAndInitializeSprite(this.rightCenter),this.resize3Slice(k,B)):this.isVertical3Slice()?(this.imgTopCenter=this.createAndInitializeSprite(this.topCenter),this.imgBottomCenter=this.createAndInitializeSprite(this.bottomCenter),this.resize3Slice(k,B)):Z.V.log("Invalid SlicedGraphic arrangement was attempted.",J.$.Error)}resize3Slice(k,B){const U=this.imgCenter.texture.orig;if(this.isHorizontal3Slice()){const B=k-this.getHorizontalLength(this.imgLeftCenter,this.leftCenter)-this.getHorizontalLength(this.imgRightCenter,this.rightCenter);if(this._tiling&&this.imgCenter instanceof dt.SimpleMesh){this.performTilingInOneDirection(zi.e.Horizontal,B,this.imgCenter,this.getHorizontalLength(this.imgLeftCenter,this.leftCenter));const k=this.getHorizontalLength(this.imgLeftCenter,this.leftCenter)+.5*B,U=.5*this.imgCenter.texture.frame.height;this.imgLeftCenter.position.x=-.5*(B+this.getHorizontalLength(this.imgLeftCenter,this.leftCenter))+k,this.imgLeftCenter.position.y=U,this.imgRightCenter.position.x=.5*(B+this.getHorizontalLength(this.imgRightCenter,this.rightCenter))+k,this.imgRightCenter.position.y=U}else{this.imgCenter.width=B,this.imgCenter.height=U?U.height:this.imgCenter.texture.height;const k=this.getHorizontalLength(this.imgLeftCenter,this.leftCenter)+.5*this.imgCenter.width,F=.5*this.imgCenter.height;this.adjustImgCenterPositionWithOffset(k,F),this.imgLeftCenter.position.x=-.5*(this.imgCenter.width+this.getHorizontalLength(this.imgLeftCenter,this.leftCenter))+k,this.imgLeftCenter.position.y=F,this.imgRightCenter.position.x=.5*(this.imgCenter.width+this.getHorizontalLength(this.imgRightCenter,this.rightCenter))+k,this.imgRightCenter.position.y=F}}else if(this.isVertical3Slice()){const k=B-this.getVerticalLength(this.imgTopCenter,this.topCenter)-this.getVerticalLength(this.imgBottomCenter,this.bottomCenter);if(this._tiling&&this.imgCenter instanceof dt.SimpleMesh){this.performTilingInOneDirection(zi.e.Vertical,k,this.imgCenter,this.getVerticalLength(this.imgTopCenter,this.topCenter));const B=.5*this.imgCenter.texture.frame.width,U=this.getVerticalLength(this.imgTopCenter,this.topCenter)+.5*this.imgCenter.height;this.imgTopCenter.position.x=B,this.imgTopCenter.position.y=-.5*(this.imgCenter.height+this.getVerticalLength(this.imgTopCenter,this.topCenter))+U,this.imgBottomCenter.position.x=B,this.imgBottomCenter.position.y=.5*(this.imgCenter.height+this.getVerticalLength(this.imgBottomCenter,this.bottomCenter))+U}else{this.imgCenter.width=U?U.width:this.imgCenter.texture.width,this.imgCenter.height=k;const B=.5*this.imgCenter.width,F=this.getVerticalLength(this.imgTopCenter,this.topCenter)+.5*this.imgCenter.height;this.adjustImgCenterPositionWithOffset(B,F),this.imgTopCenter.position.x=B,this.imgTopCenter.position.y=-.5*(this.imgCenter.height+this.getVerticalLength(this.imgTopCenter,this.topCenter))+F,this.imgBottomCenter.position.x=B,this.imgBottomCenter.position.y=.5*(this.imgCenter.height+this.getVerticalLength(this.imgBottomCenter,this.bottomCenter))+F}}}create9Slice(k,B){this.imgTopLeft=this.createAndInitializeSprite(this.topLeft),this.imgTopRight=this.createAndInitializeSprite(this.topRight),this.imgBottomLeft=this.createAndInitializeSprite(this.bottomLeft),this.imgBottomRight=this.createAndInitializeSprite(this.bottomRight),this.topCenter&&this.bottomCenter&&this.leftCenter&&this.rightCenter?(this.imgTopCenter=this.createAndInitializeSprite(this.topCenter),this.imgBottomCenter=this.createAndInitializeSprite(this.bottomCenter),this.imgLeftCenter=this.createAndInitializeSprite(this.leftCenter),this.imgRightCenter=this.createAndInitializeSprite(this.rightCenter),this.resize9Slice(k,B)):Z.V.log("SlicedGraphic has sides undefined.",J.$.Error)}resize9Slice(k,B){this.imgCenter.width=k-this.getHorizontalLength(this.imgTopLeft,this.topLeft)-this.getHorizontalLength(this.imgTopRight,this.topRight),this.imgCenter.height=B-this.getVerticalLength(this.imgTopLeft,this.topLeft)-this.getVerticalLength(this.imgBottomLeft,this.bottomLeft);const U=this.getHorizontalLength(this.imgTopLeft,this.topLeft)+.5*this.imgCenter.width,F=this.getVerticalLength(this.imgTopLeft,this.topLeft)+.5*this.imgCenter.height;this.adjustImgCenterPositionWithOffset(U,F),this.imgTopLeft.position.x=-.5*(this.imgCenter.width+this.getHorizontalLength(this.imgTopLeft,this.topLeft))+U,this.imgTopLeft.position.y=-.5*(this.imgCenter.height+this.getVerticalLength(this.imgTopLeft,this.topLeft))+F,this.imgTopRight.position.x=.5*(this.imgCenter.width+this.getHorizontalLength(this.imgTopRight,this.topRight))+U,this.imgTopRight.position.y=-.5*(this.imgCenter.height+this.getVerticalLength(this.imgTopRight,this.topRight))+F,this.imgBottomLeft.position.x=-.5*(this.imgCenter.width+this.getHorizontalLength(this.imgBottomLeft,this.bottomLeft))+U,this.imgBottomLeft.position.y=.5*(this.imgCenter.height+this.getVerticalLength(this.imgBottomLeft,this.bottomLeft))+F,this.imgBottomRight.position.x=.5*(this.imgCenter.width+this.getHorizontalLength(this.imgBottomRight,this.bottomRight))+U,this.imgBottomRight.position.y=.5*(this.imgCenter.height+this.getVerticalLength(this.imgBottomRight,this.bottomRight))+F,this.topCenter&&this.bottomCenter&&this.leftCenter&&this.rightCenter?(this.imgTopCenter.position.x=U,this.imgTopCenter.position.y=-.5*(this.imgCenter.height+this.getVerticalLength(this.imgTopCenter,this.topCenter))+F,this.imgBottomCenter.position.x=U,this.imgBottomCenter.position.y=.5*(this.imgCenter.height+this.getVerticalLength(this.imgBottomCenter,this.bottomCenter))+F,this.imgLeftCenter.position.x=-.5*(this.imgCenter.width+this.getHorizontalLength(this.imgLeftCenter,this.leftCenter))+U,this.imgLeftCenter.position.y=F,this.imgRightCenter.position.x=.5*(this.imgCenter.width+this.getHorizontalLength(this.imgRightCenter,this.rightCenter))+U,this.imgRightCenter.position.y=F,this.isOrientationChanged(this.topCenter)?this.imgTopCenter.height=this.imgCenter.width:this.imgTopCenter.width=this.imgCenter.width,this.isOrientationChanged(this.bottomCenter)?this.imgBottomCenter.height=this.imgCenter.width:this.imgBottomCenter.width=this.imgCenter.width,this.isOrientationChanged(this.leftCenter)?this.imgLeftCenter.width=this.imgCenter.height:this.imgLeftCenter.height=this.imgCenter.height,this.isOrientationChanged(this.rightCenter)?this.imgRightCenter.width=this.imgCenter.height:this.imgRightCenter.height=this.imgCenter.height):Z.V.log("SlicedGraphic has sides undefined.",J.$.Error)}resizeToMatchRectTransform(){if(this.GameObject.transform instanceof ft.X){const k=this.GameObject.transform.rectTransformDimensions,B=k.width,U=k.height;if(!this.isCenterValid())return;this.imgCenter.position.set(0,0),this.is9Slice()?this.resize9Slice(B,U):this.is3Slice()&&this.resize3Slice(B,U)}}resetImages(){this.elementsGroup&&(this.elementsGroup.removeChildren(),this.imgTopLeft=null,this.imgTopRight=null,this.imgBottomLeft=null,this.imgBottomRight=null,this.imgTopCenter=null,this.imgBottomCenter=null,this.imgLeftCenter=null,this.imgRightCenter=null,this.imgCenter=null,this.createAndPlaceImages())}applyScalingToTransform(k,B,U){U.position.set(-k.rectTransformDimensions.width*k.pivot.x,-k.rectTransformDimensions.height*k.pivot.y)}applyToMatrix(k,B){B.append(k)}getDimensions(){return this._elementGroupSize}createPixiTransformOverride(){const k=super.createPixiTransformOverride();return k.setCustomRectTransformScaling(this),k}getHorizontalLength(k,B){return this.isOrientationChanged(B)?Math.abs(k.height):Math.abs(k.width)}getVerticalLength(k,B){return this.isOrientationChanged(B)?Math.abs(k.width):Math.abs(k.height)}isOrientationChanged(k){const B=Math.abs(k.rotation);return B===Oo.R90||B===Oo.R270}setElementProperties(k,B){k instanceof dt.Sprite&&(k.anchor.x=.5,k.anchor.y=.5),it.A.isDefined(B.rotation)&&(it.A.isDefined(this.dividePIBy180)||(this.dividePIBy180=Math.PI/180),k.rotation=Number(B.rotation)*this.dividePIBy180),it.A.isDefined(B.flipX)&&B.flipX&&(k.scale.x*=-1),it.A.isDefined(B.flipY)&&B.flipY&&(k.scale.y*=-1)}isCenterValid(){return!(!this.imgCenter||this.imgCenter.destroyed)&&(!(this.imgCenter instanceof dt.Sprite&&!this.imgCenter.texture)&&!(this.imgCenter instanceof dt.SimpleMesh&&!this.imgCenter.shader))}destroy(){var k,B;null===(k=this.elementsGroup)||void 0===k||k.destroy(),null===(B=this.rootGroup)||void 0===B||B.destroy(),this.topLeft=null,this.topRight=null,this.bottomLeft=null,this.bottomRight=null,this.topCenter=null,this.bottomCenter=null,this.leftCenter=null,this.rightCenter=null,this.center=null,this.imgTopLeft=null,this.imgTopRight=null,this.imgBottomLeft=null,this.imgBottomRight=null,this.imgTopCenter=null,this.imgBottomCenter=null,this.imgLeftCenter=null,this.imgRightCenter=null,this.imgCenter=null,this.elementsGroup=null,super.destroy()}};Io.EPSILON=.01,(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Io.prototype,"_alpha",void 0),(0,j.Cg)([(0,W.B)("atlas"),(0,q.vC)(),(0,j.Sn)("design:type",Object)],Io.prototype,"topLeft",void 0),(0,j.Cg)([(0,W.B)("atlas"),(0,q.vC)(),(0,j.Sn)("design:type",Object)],Io.prototype,"topRight",void 0),(0,j.Cg)([(0,W.B)("atlas"),(0,q.vC)(),(0,j.Sn)("design:type",Object)],Io.prototype,"bottomLeft",void 0),(0,j.Cg)([(0,W.B)("atlas"),(0,q.vC)(),(0,j.Sn)("design:type",Object)],Io.prototype,"bottomRight",void 0),(0,j.Cg)([(0,W.B)("atlas"),(0,q.vC)(),(0,j.Sn)("design:type",Object)],Io.prototype,"topCenter",void 0),(0,j.Cg)([(0,W.B)("atlas"),(0,q.vC)(),(0,j.Sn)("design:type",Object)],Io.prototype,"bottomCenter",void 0),(0,j.Cg)([(0,W.B)("atlas"),(0,q.vC)(),(0,j.Sn)("design:type",Object)],Io.prototype,"leftCenter",void 0),(0,j.Cg)([(0,W.B)("atlas"),(0,q.vC)(),(0,j.Sn)("design:type",Object)],Io.prototype,"rightCenter",void 0),(0,j.Cg)([(0,W.B)("atlas"),(0,q.vC)(),(0,j.Sn)("design:type",Object)],Io.prototype,"center",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Io.prototype,"_tiling",void 0),Io=Co=(0,j.Cg)([(0,H.EV)("SlicedGraphic",H.YH.ui,"9-slice and 3-slice graphic component
")],Io);U(51200),U(87987);var Do=U(17607);U(44770);let Ro=class extends $.u{constructor(){super(...arguments),this.onTriggerEnter=new Mt.H,this.onTriggerExit=new Mt.H,this.onTriggerHold=new Mt.H,this.isStatic=!0,this.tags=[],this.width=100,this.height=100,this._wasAddedToSystem=!1,this._cachedBounds=null}create(){super.create(),this.updateTrigger(),this.OnActiveChanged.add(this.updateTrigger,this),this.GameObject.onActiveInHierarchyChanged.add(this.updateTrigger,this)}destroy(){this.onTriggerEnter.dispose(),this.onTriggerExit.dispose(),this.onTriggerHold.dispose(),this.removeTriggerFromSystem(),this.OnActiveChanged.remove(this.updateTrigger,this),this.GameObject.onActiveInHierarchyChanged.remove(this.updateTrigger,this),super.destroy()}getBounds(){return this.isStatic&&null!==this._cachedBounds||this.updateCachedBounds(),this._cachedBounds}addTriggerToSystem(){this._wasAddedToSystem||(V.W.instance.game.triggerSystem.addTrigger(this),this._wasAddedToSystem=!0)}removeTriggerFromSystem(){this._wasAddedToSystem&&(V.W.instance.game.triggerSystem.removeTrigger(this),this._wasAddedToSystem=!1)}updateTrigger(){this.IsActiveInHierarchy?this.addTriggerToSystem():this.removeTriggerFromSystem()}updateCachedBounds(){const k=this.GameObject.transform,B=.5*this.width,U=.5*this.height,F=k.worldMatrix.clone(),G=k.worldScale;F.scale(1/G.x,1/G.y);const j=F.apply({x:-B,y:-U}),$=F.apply({x:B,y:U});this._cachedBounds||(this._cachedBounds={left:0,right:0,top:0,bottom:0}),this._cachedBounds.left=j.x,this._cachedBounds.top=j.y,this._cachedBounds.right=$.x,this._cachedBounds.bottom=$.y}};(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Ro.prototype,"onTriggerEnter",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Ro.prototype,"onTriggerExit",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Ro.prototype,"onTriggerHold",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Ro.prototype,"isStatic",void 0),(0,j.Cg)([(0,q.SZ)(),(0,q.W_)(),(0,j.Sn)("design:type",Array)],Ro.prototype,"tags",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Ro.prototype,"width",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Ro.prototype,"height",void 0),Ro=(0,j.Cg)([(0,H.EV)("AABBTrigger",H.YH.physics)],Ro);U(6686),U(80632),U(1788),U(15073)},18830:(k,B,U)=>{"use strict";U.d(B,{b:()=>nt});var F=U(8674),G=U(86787),j=U(40794),$=U(29658),H=U(32469),V=U(62481),W=U(26731),q=U(15887),K=U(74786),z=U(140),Y=U(56761),Q=U(5440);class X extends W.${initialize(k,B){var U,F;super.initialize(k,B);const G=null===(U=B.getComponentData)||void 0===U?void 0:U.call(B,k);this._injections=Object.entries(null!==(F=null==G?void 0:G.injections)&&void 0!==F?F:[]).map((([k,B])=>{var U;return{key:k,type:null!==(U=X.VAR_TYPE_TO_PROPERTY_TYPE[typeof B])&&void 0!==U?U:H.b.JSON,value:B}}))}generate(k){return q.X.createVertical([z.I.create({id:"installers",label:"Installers",arrayType:H.b.String,value:k.installers,isReorderable:!0}),z.I.create({id:"injections-record",label:"Injections",arrayType:H.b.GenericObject,value:this._injections,insertElementCallbacks:new Map([[H.b.String,()=>({key:"newString",type:H.b.String,value:""})],[H.b.Number,()=>({key:"newNumber",type:H.b.Number,value:0})],[H.b.Boolean,()=>({key:"newBoolean",type:H.b.Boolean,value:!1})],[H.b.JSON,()=>({key:"newJSON",type:H.b.JSON,value:{}})]]),getElementInspector:X.generateInjectionElementInspector,onChange:k=>{this._injections=k,this._editorAPI.modifyComponent(this._componentGuid,{injections:k.reduce(((k,B)=>{B.error=void 0;try{k[B.key]=B.type===H.b.JSON?X.parseJson(B.value):B.value}catch(e){V.R.logError(e,`Failed to parse JSON for key ${B.key}:`),B.error=e}return k}),{})})}})])}static generateInjectionElementInspector(k,B){var U;const F=[];switch(F.push(Y.f.create({id:`injection-key-${B}`,labelValue:"Key",inputType:"text",inputValue:k.key,propertyPath:[`${B}`,"key"]})),F.push(K._6.create({id:`injection-type-${B}`,selectOptions:X.INJECTION_TYPE_OPTIONS,selectValue:k.type,propertyPath:[`${B}`,"type"]})),k.type){case H.b.String:F.push(Y.f.create({id:`injection-value-${B}`,labelValue:"Value",inputType:"text",inputValue:k.value,propertyPath:[`${B}`,"value"]}));break;case H.b.Number:F.push(Y.f.create({id:`injection-value-${B}`,labelValue:"Value",inputType:"number",inputValue:k.value,propertyPath:[`${B}`,"value"]}));break;case H.b.Boolean:F.push(Y.f.create({id:`injection-value-${B}`,labelValue:"Value",inputType:"checkbox",inputValue:k.value,propertyPath:[`${B}`,"value"]}));break;case H.b.JSON:F.push(Y.f.create({id:`injection-value-${B}`,labelValue:"Value",inputType:"text",inputValue:X.stringifyJson(k.value),propertyPath:[`${B}`,"value"],inputUpdateMode:Q.JG.Confirm,style:{borderColor:k.error?"red":void 0}})),k.error&&F.push(K.ly.create({id:`injection-error-${B}`,labelTextWrap:Q.K3.Wrap,labelValue:null!==(U=k.error.message)&&void 0!==U?U:k.error.toString(),style:{color:"red",textWrap:"pretty"}}))}return q.X.createVertical(F)}static stringifyJson(k){return"string"==typeof k?k:JSON.stringify(k)}static parseJson(k){return"string"==typeof k?JSON.parse(k):k}}X.INJECTION_TYPE_OPTIONS=[{label:H.b.String,value:H.b.String},{label:H.b.Number,value:H.b.Number},{label:H.b.Boolean,value:H.b.Boolean},{label:H.b.JSON,value:H.b.JSON}],X.VAR_TYPE_TO_PROPERTY_TYPE={string:H.b.String,number:H.b.Number,boolean:H.b.Boolean};var Z,J=U(36361),tt=U(823),et=U(52751),it=U(78178),st=U(32154);let nt=Z=class extends j.u{constructor(){super(...arguments),this.container=new J.r(null),this.installers=[],this.injections={}}get ParentContainer(){var k,B,U;return null!==(U=null===(B=null===(k=this.GameObject)||void 0===k?void 0:k.parent)||void 0===B?void 0:B.findComponentInParent(Z))&&void 0!==U?U:null}get Container(){return this.container}get Installers(){return this.installers}create(){super.create(),this.hasRunInstallers||this.runInstallers(),this.bindInjectedValues(this.injections),this.attachParentContainer(),this.gameObject.onHierarchyChanged.add(this.attachParentContainer,this)}runInstallers(){this.hasRunInstallers=!0;for(let k=0;k{"use strict";U.d(B,{s:()=>j});class F{constructor(k){this.inversifyInterface=null,this.inversifyInterface=k}asSingleton(){this.inversifyInterface.inSingletonScope()}}var G=U(36361);class j{constructor(k){this.inversifyBindingTo=null,this.inversifyBindingTo=k}to(k){return new F(this.inversifyBindingTo.to(k))}toConstantValue(k){this.inversifyBindingTo.toConstantValue(k)}toDynamicValue(k){return new F(this.inversifyBindingTo.toDynamicValue((B=>k(G.r.wrapContainer(B.container)))))}}},36361:(k,B,U)=>{"use strict";U.d(B,{r:()=>$});var F=U(79687),G=U(61806),j=U(3004);class ${get sourceContainer(){return this._inversifyContainer}get parent(){return this._parentContainer}set parent(k){var B;this._parentContainer=k,this._inversifyContainer.parent=null!==(B=null==k?void 0:k._inversifyContainer)&&void 0!==B?B:null}constructor(k){var B,U;void 0===k&&(k=null!==(U=null===(B=G.W.instance)||void 0===B?void 0:B.game.rootContainer)&&void 0!==U?U:null),this._inversifyContainer=new F.Container,this.parent=k}bind(k){return new j.s(this._inversifyContainer.bind(k))}unbind(k){this.hasBinding(k,!1)&&this._inversifyContainer.unbind(k)}rebind(k){return this.unbind(k),this.bind(k)}get(k){return this.hasBinding(k)?this._inversifyContainer.get(k):null}hasBinding(k,B=!0){return B?this._inversifyContainer.isBound(k):this._inversifyContainer._bindingDictionary.hasKey(k)}resolve(k){return this._inversifyContainer.resolve(k)}unbindAll(){this._inversifyContainer.unbindAll()}static wrapContainer(k){const B=new $;return B._inversifyContainer=k,B}}},21979:(k,B,U)=>{"use strict";U.d(B,{P:()=>Q});var F,G=U(8674),j=U(95891),$=U.n(j),H=U(40794),V=U(29658),W=U(563),q=U(5191),K=U(80267),z=U(823),Y=U(22494);let Q=F=class extends H.u{constructor(){super(...arguments),this.autoUpdateLayout=!0,this.updateInactiveChildren=!1,this.roundPixels=!1,this._watchedChildren=[]}postCreate(){super.postCreate(),this.autoUpdateLayout?(this.gameObject.onChildAdded.add(this.watchChildren,this),this.gameObject.onChildRemoved.add(this.watchChildren,this),this.watchChildren()):this.updateAll(),this.gameObject.onDestroy.add(this.cleanUpListeners,this)}destroy(){this.cleanUpListeners(),super.destroy()}cleanUpListeners(){var k,B,U;this.gameObject.onChildAdded.removeAll(this),this.gameObject.onChildRemoved.removeAll(this);for(const F of this.gameObject.children)null===(k=F.onActiveChanged)||void 0===k||k.removeAll(this),null===(U=null===(B=F.transform)||void 0===B?void 0:B.onDimensionsChanged)||void 0===U||U.removeAll(this)}getLayoutPositionX(k){return K.V.log("Layout#getLayoutPositionX should be overridden",q.$.Warning),0}getLayoutPositionY(k){return K.V.log("Layout#getLayoutPositionY should be overridden",q.$.Warning),0}getLayoutAnchorX(k){return K.V.log("Layout#getLayoutAnchorX should be overridden",q.$.Warning),0}getLayoutAnchorY(k){return K.V.log("Layout#getLayoutAnchorY should be overridden",q.$.Warning),0}updateAll(k=!0){const B=this.getGameObjectList();for(let U=0;U=B.length)return void K.V.log(`Layout#updateByIndex called with out of bounds index ${k}. There are ${B.length} active children`,q.$.Error);const U=B[k],F=this.roundPixels?Math.round(this.getLayoutPositionX(k)):this.getLayoutPositionX(k),G=this.roundPixels?Math.round(this.getLayoutPositionY(k)):this.getLayoutPositionY(k);if(U.legacyTransform){const B=U.legacyTransform;B.x=F,B.y=G,B.anchorX=this.getLayoutAnchorX(k),B.anchorY=this.getLayoutAnchorY(k),B.update()}else{const B=U.transform;B instanceof W.X?(B.setAnchoredPivotOffset(F,G),B.setPivot(this.getLayoutAnchorX(k),this.getLayoutAnchorY(k))):B.setPosition(F,G)}}isFilled(){return!1}getGameObjectList(){return this.GameObject.children.filter((k=>k.active||this.updateInactiveChildren))}watchChildren(){var k,B,U;const F=[...this.gameObject.children],G=$().difference(this._watchedChildren,F),j=$().difference(F,this._watchedChildren);for(const $ of G)null===(k=$.onActiveChanged)||void 0===k||k.removeAll(this),null===(U=null===(B=$.transform)||void 0===B?void 0:B.onDimensionsChanged)||void 0===U||U.removeAll(this);for(const $ of j)$.onActiveChanged.add(this.updateAll,this),$.onComponentAdded.add(this.watchForChildTransform,this),this.watchForChildTransform($.transform);this._watchedChildren=F,this.updateAll()}watchForChildTransform(k){k instanceof W.X&&k.onDimensionsChanged.add(this.updateAll,this)}};(0,G.Cg)([(0,z.vk)(),(0,Y.x)("updateAll"),(0,G.Sn)("design:type",Boolean)],Q.prototype,"autoUpdateLayout",void 0),(0,G.Cg)([(0,z.vk)(),(0,Y.x)("updateAll"),(0,G.Sn)("design:type",Boolean)],Q.prototype,"updateInactiveChildren",void 0),(0,G.Cg)([(0,z.vk)(),(0,Y.x)("updateAll"),(0,G.Sn)("design:type",Boolean)],Q.prototype,"roundPixels",void 0),Q=F=(0,G.Cg)([(0,V.EV)("Layout (abstract)",void 0,"Layout component for UI")],Q)},5191:(k,B,U)=>{"use strict";var F;U.d(B,{$:()=>F}),function(k){k[k.Verbose=0]="Verbose",k[k.Info=1]="Info",k[k.Warning=2]="Warning",k[k.Error=3]="Error"}(F||(F={}))},80267:(k,B,U)=>{"use strict";U.d(B,{V:()=>F});class F{constructor(){}static addLogger(k){this._loggers.push(k)}static removeLogger(k){this._loggers=this._loggers.filter((B=>B!==k))}static log(k,B,...U){this._loggers.forEach((F=>{F.log(k,B,...U)}))}static table(k,B,U){this._loggers.forEach((F=>{F.table(k,B,U)}))}static setLogLevel(k){this._loggers.forEach((B=>{B.setLogLevel(k)}))}}F._loggers=[]},2136:(k,B,U)=>{"use strict";U.d(B,{b:()=>j});var F=U(8674),G=U(12915);class j{constructNavMesh(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){try{if(!B||B.length<=0)return{regions:[],inverted:!1};let F=G.segments(B[0]);const j=B.length;for(let k=1;k{"use strict";U.d(B,{N:()=>G});var F=U(27179);class G{constructor(k,B,U,G){this.start=new F.I(k,B),this.end=new F.I(U,G),this.left=Math.min(k,U),this.right=Math.max(k,U),this.top=Math.min(B,G),this.bottom=Math.max(B,G)}pointOnSegment(k,B){return k>=this.left&&k<=this.right&&B>=this.top&&B<=this.bottom&&this.pointOnLine(k,B)}pointOnLine(k,B){return Math.abs((k-this.left)*(this.bottom-this.top)-(this.right-this.left)*(B-this.top))=this.left-G.EPSILON&&B.x<=this.right+G.EPSILON&&B.y>=this.top-G.EPSILON&&B.y<=this.bottom+G.EPSILON?B:this.start.getDistanceSq(k.end){"use strict";U.d(B,{o:()=>G});var F=U(39002);class G{get width(){return this._width}set width(k){this._width=k,this._halfWidth=.5*k}get height(){return this._height}set height(k){this._height=k,this._halfHeight=.5*k}getHalfWidth(){return this._halfWidth}getHalfHeight(){return this._halfHeight}constructor(k=0,B=0){this._width=0,this._halfWidth=0,this._height=0,this._halfHeight=0,this.width=k,this.height=B}isNearlyEqual(k,B){return this.isNearlyEqualToValues(k.width,k.height,B)}isNearlyEqualToValues(k,B,U){return F.c.isNearlyEqual(this.width,k,U)&&F.c.isNearlyEqual(this.height,B,U)}setTo(k,B){this.width=k,this.height=B}copyFrom(k){this.width=k.width,this.height=k.height}}G.ZERO=new G(0,0)},27179:(k,B,U)=>{"use strict";U.d(B,{I:()=>H});var F=U(39002),G=U(80267),j=U(5191),$=U(32154);class H{static get ZERO(){return new H(0,0)}static get ONE(){return new H(1,1)}static get UP(){return new H(0,1)}static get DOWN(){return new H(0,-1)}static get RIGHT(){return new H(1,0)}static get LEFT(){return new H(-1,0)}get x(){return this._x}set x(k){this._x=k,this._recalculateMagnitudeSq=!0,this._recalculateMagnitude=!0}get y(){return this._y}set y(k){this._y=k,this._recalculateMagnitudeSq=!0,this._recalculateMagnitude=!0}getMagnitude(){return this.recalculateMagnitude(),this._magnitude}getMagnitudeSq(){return this.recalculateMagnitudeSq(),this._magnitudeSq}constructor(k=0,B=0){this._x=0,this._y=0,this._magnitude=0,this._magnitudeSq=0,this._recalculateMagnitude=!1,this._recalculateMagnitudeSq=!1,this.x=k,this.y=B}static fromPoint(k){return new H(k.x,k.y)}setTo(k,B){this.set(k,B)}set(k,B){this.x=k,this.y=B}setToPolar(k,B=1){this.set(Math.cos(k)*B,Math.sin(k)*B)}copyFrom(k){return this.set(k.x,k.y),this}copyTo(k){return k.set(this.x,this.y),k}equals(k){return this.isNearlyEqual(k)}isNearlyEqual(k,B){return this.isNearlyEqualToValues(k.x,k.y,B)}isNearlyEqualToValues(k,B,U){return F.c.isNearlyEqual(this.x,k,U)&&F.c.isNearlyEqual(this.y,B,U)}invert(){this.set(this._y,this._x)}perpendicular(k=!0){k?this.set(this._y,-this._x):this.set(-this._y,this._x)}normalRightHand(){this.set(-1*this._y,this._x)}floor(){this.set(Math.floor(this._x),Math.floor(this._y))}ceil(){this.set(Math.ceil(this._x),Math.ceil(this._y))}round(){this.set(Math.round(this._x),Math.round(this._y))}negate(){this.set(-this._x,-this._y)}add(k){this._x+=k.x,this._y+=k.y}subtract(k){this._x-=k.x,this._y-=k.y}multiply(k){this._x*=k.x,this._y*=k.y}divide(k){this._x/=k.x,this._y/=k.y}clamp(k,B,U){switch(U){case F._.X:this._x=F.c.clamp(this._x,k,B);break;case F._.Y:this._y=F.c.clamp(this._y,k,B);break;default:this._x=F.c.clamp(this._x,k,B),this._y=F.c.clamp(this._y,k,B)}}clip(k){const B=k.left,U=k.top,F=k.right,G=k.bottom;this._xF&&(this._x=F),this._yG&&(this._y=G)}rotate(k,B,U=null){if($.A.isDefined(U)){const F=B+Math.atan2(this._y-k.y,this._x-k.x);this._x=k.x+U*Math.cos(F),this._y=k.y+U*Math.sin(F)}else{this.subtract(k);const U=Math.sin(B),F=Math.cos(B);this._x=F*this._x-U*this._y+k.x,this._y=U*this._x+F*this._y+k.y}}normalize(){const k=this.getMagnitude();k>0&&(this._x/=k,this._y/=k,this._magnitude=1,this._magnitudeSq=1,this._recalculateMagnitude=!1,this._recalculateMagnitudeSq=!1)}interpolate(k,B){this.set(this._x+(k.x-this._x)*B,this._y+(k.y-this._y)*B)}project(k,B=!1){const U=this.dot(k)/(B?1:k.getMagnitudeSq());0!==U&&this.set(U*k.x,U*k.y)}trunc(){this.set(~~this._x,~~this._y)}isZero(){return this.isNearlyEqual(H.ZERO)}angle(k){return Math.atan2(k.y-this._y,k.x-this._x)}dot(k){return this._x*k.x+this._y*k.y}cross(k){return this._x*k.y-this._y*k.x}getDistanceSq(k){return Math.pow(this.x-k.x,2)+Math.pow(this.y-k.y,2)}getDistance(k){return Math.sqrt(this.getDistanceSq(k))}toString(){return`[{Vector }]`}print(k=j.$.Info){G.V.log(this.toString(),k)}recalculateMagnitudeSq(){this._recalculateMagnitudeSq&&(this._magnitudeSq=Math.pow(this._x,2)+Math.pow(this._y,2),this._recalculateMagnitudeSq=!1)}recalculateMagnitude(){this.recalculateMagnitudeSq(),this._recalculateMagnitude&&(this._magnitude=Math.sqrt(this._magnitudeSq),this._recalculateMagnitude=!1)}}},40008:(k,B,U)=>{"use strict";U.d(B,{E1:()=>j,or:()=>$.o,I9:()=>G.I});var F=U(39002),G=U(27179);class j{get tx(){return this._translation.x}set tx(k){this._translation.x=k}get ty(){return this._translation.y}set ty(k){this._translation.y=k}get translation(){return this._translation}constructor(k=1,B=0,U=0,F=1,j=0,$=0){this.a=0,this.b=0,this.c=0,this.d=0,this._translation=new G.I,this.setTo(k,B,U,F,j,$)}setTo(k,B,U,F,G,j){this.a=k,this.b=B,this.c=U,this.d=F,this.tx=G,this.ty=j}setToIdentity(){this.setTo(1,0,0,1,0,0)}isIdentityMatrix(){return 1===this.a&&0===this.b&&0===this.tx&&0===this.c&&1===this.d&&0===this.ty}isTranslateOnly(){return 1===this.a&&0===this.b&&0===this.c&&1===this.d}translate(k,B){this.tx+=k,this.ty+=B}rotate(k){const B=Math.sin(F.c.degreesToRadians(k)),U=Math.cos(F.c.degreesToRadians(k)),G=this.a,j=this.b,$=this.tx;this.a=G*U-this.c*B,this.b=j*U-this.d*B,this.c=G*B+this.c*U,this.d=j*B+this.d*U,this.tx=$*U-this.ty*B,this.ty=$*B+this.ty*U}scale(k,B=k){this.a*=k,this.b*=k,this.c*=B,this.d*=B,this.tx*=k,this.ty*=B}multiply(k){j.multiply(this,k,this)}premultiply(k){j.multiply(k,this,this)}isEqual(k,B){return F.c.isNearlyEqual(this.a,k.a,B)&&F.c.isNearlyEqual(this.b,k.b,B)&&F.c.isNearlyEqual(this.c,k.c,B)&&F.c.isNearlyEqual(this.d,k.d,B)&&F.c.isNearlyEqual(this.tx,k.tx,B)&&F.c.isNearlyEqual(this.ty,k.ty,B)}clone(k){this.a=k.a,this.b=k.b,this.c=k.c,this.d=k.d,this.tx=k.tx,this.ty=k.ty}transformVector(k){k.set(this.a*k.x+this.b*k.y+this.tx,this.c*k.x+this.d*k.y+this.ty)}transformXY(k,B){const U=new G.I(k,B);return this.transformVector(U),U}createTransformedVector(k){const B=new G.I(k.x,k.y);return this.transformVector(B),B}inverseTransformVector(k){const B=1/(this.a*this.d-this.b*this.c);k.set(this.d*B*k.x+-this.b*B*k.y+(this.ty*this.b-this.tx*this.d)*B,this.a*B*k.y+-this.c*B*k.x+(-this.ty*this.a+this.tx*this.c)*B)}createInverseTransformedVector(k){const B=new G.I(k.x,k.y);return this.inverseTransformVector(B),B}inverseTransformXY(k,B){const U=new G.I(k,B);return this.inverseTransformVector(U),U}fromArray(k){this.setTo(k[0],k[3],k[1],k[4],k[2],k[5])}toArray(k=!1,B=new Float32Array(9)){return k?(B[0]=this.a,B[1]=this.b,B[2]=0,B[3]=this.c,B[4]=this.d,B[5]=0,B[6]=this.tx,B[7]=this.ty,B[8]=1):(B[0]=this.a,B[1]=this.c,B[2]=this.tx,B[3]=this.b,B[4]=this.d,B[5]=this.ty,B[6]=0,B[7]=0,B[8]=1),B}static makeScale(k,B=k){return new j(k,0,0,B,0,0)}static makeTranslation(k,B){return new j(1,0,0,1,k,B)}static makeRotation(k){const B=Math.cos(F.c.degreesToRadians(k)),U=Math.sin(F.c.degreesToRadians(k));return new j(B,-U,U,B,0,0)}static multiply(k,B,U=new j){return U.setTo(k.a*B.a+k.b*B.c,k.a*B.b+k.b*B.d,k.c*B.a+k.d*B.c,k.c*B.b+k.d*B.d,k.a*B.tx+k.b*B.ty+k.tx,k.c*B.tx+k.d*B.ty+k.ty),U}}j.IDENTITY=new j(1,0,0,1,0,0);U(51088);var $=U(64527)},55787:(k,B,U)=>{"use strict";U.d(B,{q:()=>$});var F=U(3431),G=U(51088),j=U(27179);class ${constructor(k){this.nodes=k,this.init()}neighbors(k){return k.neighbours}navHeuristic(k,B){return k.entryPoint.getDistance($.targetPoint)}static getCost(k,B){const U=k.entryPoint,F=$.targetPoint,H=k.portals.find(((U,F)=>k.neighbours[F].id===B.id));return B.entryPoint=j.I.fromPoint(H.closestIntersection(new G.N(U.x,U.y,F.x,F.y))),U.getDistance(B.entryPoint)}destroy(){this.cleanDirty(),this.nodes=[]}init(){}cleanDirty(){}markDirty(){}}$.prototype.init=F.Graph.prototype.init,$.prototype.cleanDirty=F.Graph.prototype.cleanDirty,$.prototype.markDirty=F.Graph.prototype.markDirty},94341:(k,B,U)=>{"use strict";U.d(B,{L:()=>z});var F=U(3431),G=U(39002),j=U(51088);class ${constructor(k,B=!0){this.points=k,this.edges=[];for(let U=1;U0)){B.push(F),U=F,j=$,F=U,G=U,$=j,H=j,q=j;continue}G=K,H=q}if(V.triArea2(U,F,W)>=0){if(!(U.isNearlyEqual(F)||V.triArea2(U,G,W)<0)){B.push(G),U=G,j=H,F=U,G=U,$=j,H=j,q=j;continue}F=W,$=q}}return 0!==B.length&&B[B.length-1].isNearlyEqual(k[k.length-1].left)||B.push(k[k.length-1].left),B}}var q=U(55787),K=U(87945);class z{constructor(k,B=0,U=0){this._meshShrinkAmount=B,this._fromPolySearchRadius=U;const F=k.map((k=>{const B=k.map((k=>({x:k.x,y:k.y})));return new $(B)}));this._navPolygons=F.map(((k,B)=>new K.q(B,k))),this._nextId=this._navPolygons.length,this.calculateAllNeighbours(),this._graph=new q.q(this._navPolygons)}getPolygons(){return this._navPolygons}addPolygon(k){const B=new K.q(this._nextId++,new $(k));return this._navPolygons.push(B),this.calculatePolyNeighbours(B),B.id}removePolygon(k){for(let B=0;B0)for(const F of this._navPolygons)if(G=F.boundingRadius+Q,U=F.centroid.getDistance(z),U<=G){const{distance:k}=this.projectPointToPolygon(z,F);k<=Q&&k0)for(const F of this._navPolygons)if(G=F.boundingRadius+this._meshShrinkAmount,U=F.centroid.getDistance(Y),U<=G){const{distance:k}=this.projectPointToPolygon(Y,F);k<=this._meshShrinkAmount&&k0===B||!k.isNearlyEqual(J[B-1])))}calculateAllNeighbours(){for(let k=0;kk.boundingRadius+B.boundingRadius))for(const U of k.polygon.edges)for(const F of B.polygon.edges){if(!V.areCollinear(U,F))continue;const G=this.getSegmentOverlap(U,F);if(!G)continue;k.neighbours.push(B),B.neighbours.push(k);const[$,H]=G;let W=k.centroid.angle(U.start),q=k.centroid.angle(G[0]),K=k.centroid.angle(G[1]),z=V.angleDifference(W,q),Y=V.angleDifference(W,K);zk.point.xB.point.x?1:k.point.yB.point.y?1:0));const F=U[0].line===U[1].line,G=U[1].point.isNearlyEqual(U[2].point);return F||G?null:[U[1].point,U[2].point]}projectPointToPolygon(k,B){let U=null,F=Number.MAX_VALUE;for(const G of B.polygon.edges){const B=this.projectPointToEdge(k,G),j=k.getDistance(B);(null===U||j{"use strict";U.d(B,{q:()=>j});var F=U(27179),G=U(55787);class j{constructor(k,B){this.id=k,this.polygon=B,this.neighbours=[],this.portals=[],this.centroid=this.calculateCentroid(),this.boundingRadius=this.calculateRadius(),this.weight=1}getPoints(){return this.polygon.points}contains(k){return this.polygon.contains(k.x,k.y)||this.isPointOnEdge(k)}calculateCentroid(){const k=new F.I(0,0),B=this.polygon.points.length;return this.polygon.points.forEach((B=>{k.add(B)})),k.x/=B,k.y/=B,k}calculateRadius(){let k=0;for(const B of this.polygon.points){const U=Math.sqrt(this.centroid.getDistanceSq(B));U>k&&(k=U)}return k}isPointOnEdge({x:k,y:B}){for(const U of this.polygon.edges)if(U.pointOnSegment(k,B))return!0;return!1}destroy(){this.neighbours=[],this.portals=[]}toString(){return`NavPoly(id: ${this.id} at: ${this.centroid})`}isWall(){return 0===this.weight}centroidDistance(k){return Math.sqrt(this.centroid.getDistanceSq(k.centroid))}getCost(k){return G.q.getCost(k,this)}}},41444:(k,B,U)=>{"use strict";U.d(B,{B:()=>j,ih:()=>G});const F="custom:annotations:assetTagProperties";class G{static getAssetProperties(k){return Reflect.getMetadata(F,k.constructor)}static addAssetMetadata(k,B,U){const j=new Map(G.getAssetProperties(k));j.set(B,U),Reflect.defineMetadata(F,j,k.constructor)}}const j=k=>(B,U)=>{G.addAssetMetadata(B,U,k)}},87661:(k,B,U)=>{"use strict";var F;U.d(B,{Z:()=>F}),function(k){k.Image="image",k.Font="font",k.Spine="spine",k.Json="json",k.Csv="csv",k.Prefab="prefab",k.SingleImage="singleImage",k.Atlas="atlas",k.Audio="audio",k.Sfx="sfx",k.Bgm="bgm",k.TiledMap="tiledMap",k.Tileset="tileset",k.StreamedMap="streamedMap",k.StreamedMapEla="streamedMapEla"}(F||(F={}))},84097:(k,B,U)=>{"use strict";var F;U.d(B,{r:()=>F}),function(k){k[k.Save=0]="Save",k[k.Load=1]="Load"}(F||(F={}))},32469:(k,B,U)=>{"use strict";var F;U.d(B,{b:()=>F}),function(k){k.String="string",k.Number="number",k.JSON="json",k.JSONFile="jsonFile",k.Boolean="boolean",k.Color="color",k.Vector="vector",k.Size="size",k.ComponentReference="componentReference",k.GameObjectReference="gameObjectReference",k.SceneObjectReference="sceneObjectReference",k.PrefabConstructable="prefabConstructable",k.Signal="signal",k.EditorAssetReference="editorAssetReference",k.Enum="enum",k.Unknown="unknown",k.UnknownObject="unknownObject",k.GenericObject="GenericObject"}(F||(F={}))},823:(k,B,U)=>{"use strict";U.d(B,{E8:()=>pt,ER:()=>rt,Lr:()=>z,Mn:()=>dt,Om:()=>ot,SZ:()=>ht,UW:()=>$,VF:()=>lt,W_:()=>Z,YL:()=>q,_H:()=>nt,bb:()=>ft,dY:()=>W,e6:()=>vt,fY:()=>H,g1:()=>J,g8:()=>ut,gf:()=>bt,i0:()=>gt,iE:()=>st,lu:()=>Y,nK:()=>K,np:()=>ct,oB:()=>at,ok:()=>Q,tW:()=>it,tf:()=>X,vC:()=>et,vk:()=>tt});var F=U(47131),G=U(22494),j=U(32469);const $="custom:annotations:serializableProperties",H="custom:annotations:propertyInfo";function V(k,B){if(Reflect.hasOwnMetadata(H,k.constructor,B))return Reflect.getOwnMetadata(H,k.constructor,B);{G.Q.addProperty($,k.constructor,B);const U={property:B,type:j.b.Unknown,isArray:!1,isRecord:!1,isReorderableList:!1};return Reflect.defineMetadata(H,U,k.constructor,B),U}}class W{static addTypeMetadata(k,B,U,F){const G=V(k,B);if(G.type=U,!G.alias){let k=B;"_"===B[0]&&(k=B.substr(1),G.alias=k)}return G.priority||(G.priority=0),Object.assign(G,F),G}static addMetadata(k,B,U){const F=V(k,B);return Object.assign(F,U),F}static setTypeMetadataIsRecord(k,B,U){const F=V(k,B);return F.isRecord=U,F}}const q=k=>mt(((B,U)=>{W.addMetadata(B,U,{toolTip:k})})),K=k=>(B,U)=>{W.addMetadata(B,U,{alias:k})},z=k=>(B,U)=>{W.addMetadata(B,U,{priority:k})},Y=k=>mt(((B,U)=>{W.addMetadata(B,U,{inputUpdateMode:k})})),Q=k=>mt(((B,U)=>{W.addMetadata(B,U,{renderIf:k})})),X=k=>(B,U)=>{var F,G;const j=null!==(G=null===(F=Reflect.getOwnMetadata(H,B.constructor,U))||void 0===F?void 0:F.validateFunctions)&&void 0!==G?G:[];j.push(k),W.addMetadata(B,U,{validateFunctions:j})},Z=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.String,k)},J=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.Number,k)},tt=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.Boolean,k)},et=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.JSON,k)},it=(k,B)=>(U,F)=>{W.addTypeMetadata(U,F,j.b.JSONFile,B).assetExtension=k||"json"},st=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.Color,k)},nt=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.Vector,k)},at=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.Size,k)},rt=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.GameObjectReference,k)},ot=()=>(k,B)=>{W.setTypeMetadataIsRecord(k,B,!0)},ht=(k=!0,B)=>(U,F)=>{const G=V(U,F);G.insertElementCallbacks=B,k?G.isReorderableList=!0:G.isArray=!0},ct=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.GenericObject,k)},dt=(k,B)=>(U,F)=>{const G=W.addTypeMetadata(U,F,j.b.ComponentReference,B);"string"!=typeof k?G.componentCtor=k:G.typeName=k},lt=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.ComponentReference,k).componentCtor=F.d},ut=(k,B)=>(U,F)=>{W.addTypeMetadata(U,F,j.b.SceneObjectReference,B).componentCtor=k},ft=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.Signal,k)},bt=(k,B)=>(U,F)=>{W.addTypeMetadata(U,F,j.b.Enum,B).referenceType=k},pt=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.UnknownObject,k)},vt=(k,B)=>(U,F)=>{W.addTypeMetadata(U,F,j.b.PrefabConstructable,B).categoryFilter=k},gt=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.EditorAssetReference).assetType=k},mt=k=>()=>{}},6e4:(k,B,U)=>{"use strict";U.d(B,{Pq:()=>H,QW:()=>$});var F=U(22494);const G="custom:annotations:RequireComponentTagProperties",j="custom:annotations:requireComponentInfo";class ${static getProperties(k){return Reflect.getMetadata(G,k.constructor)||[]}static getPropertyInfo(k,B){return Reflect.getMetadata(j,k.constructor,B)}static addMetadata(k,B){F.Q.addProperty(G,k.constructor,B)}}const H=k=>(B,U)=>{$.addMetadata(B,U);const F={ctor:k};Reflect.defineMetadata(j,F,B.constructor,U)}},80473:(k,B,U)=>{"use strict";U.d(B,{Z$:()=>F.Z,bJ:()=>G.b,Lk:()=>$,nK:()=>j.nK,i0:()=>j.i0,lu:()=>j.lu,Lr:()=>j.Lr,ok:()=>j.ok,Pq:()=>H.Pq,SZ:()=>j.SZ,vk:()=>j.vk,iE:()=>j.iE,Mn:()=>j.Mn,gf:()=>j.gf,ER:()=>j.ER,np:()=>j.np,vC:()=>j.vC,tW:()=>j.tW,Mt:()=>q,g1:()=>j.g1,Om:()=>j.Om,g8:()=>j.g8,bb:()=>j.bb,W_:()=>j.W_,_H:()=>j._H,YL:()=>j.YL,tf:()=>j.tf});var F=U(87661),G=(U(84097),U(32469)),j=U(823);class ${static nonEmptyString(){return k=>{if(!(null==k?void 0:k.trim()))return"This field cannot be empty."}}static integer(){return k=>{if(!Number.isInteger(k))return"This field must be a whole number."}}static greaterThan(k){return B=>{if(B<=k)return`This field must be greater than ${k}.`}}static lessThan(k){return B=>{if(B>=k)return`This field must be less than ${k}.`}}static range(k,B){return U=>{if(UB)return`This field must be between ${k} and ${B}.`}}}var H=U(6e4),V=U(22494);const W="custom:annotations:UIDTagProperties";const q=()=>(k,B)=>{j.dY.addTypeMetadata(k,B,G.b.Number),class{static getUIDProperties(k){return Reflect.getMetadata(W,k.constructor)}static addUIDMetadata(k,B){V.Q.addProperty(W,k.constructor,B)}}.addUIDMetadata(k,B)}},51200:(k,B,U)=>{"use strict";U.d(B,{k:()=>H});var F=U(68910),G=U(563),j=U(64527);class ${applyScalingToTransform(k,B,U){const F=k.rectTransformDimensions,G=F.width/B.width,j=F.height/B.height,$=-B.width*k.pivot.x*G,H=-B.height*k.pivot.y*j;U.scale.set(G,j),U.position.set($,H)}applyToMatrix(k,B){B.append(k)}}class H extends F.Transform{constructor(k,B,U){super(),this._rectTransformScalingTransform=new F.Transform,this._previousRectTransformDimensions=new j.o,this._previousContainerDimensions=new j.o,this._rectTransformScaling=new $,this._applyRectTransformScaling=!1,this._transformIDs={0:0,1:0,2:0},this._attachedTransform=k,this._targetRenderable=B,this._getDimensionsFunc=U,this._applyRectTransformScaling=k instanceof G.X,this._worldID=B.getRootContainer().transform._worldID+1}updateLocalTransform(){if(!this._targetRenderable||!this._attachedTransform)return;const k=this._attachedTransform.pixiTransform,B=k._localID;B!==this._localID&&(this.localTransform.copyFrom(k.localTransform),this.position.copyFrom(k.position),this.scale.copyFrom(k.scale),this.rotation=k.rotation,this._localID=B)}updateTransform(){var k,B,U;if(!this._targetRenderable||!this._attachedTransform)return;if(this._applyRectTransformScaling){const k=this._attachedTransform,B=k.rectTransformDimensions,U=this._getDimensionsFunc(),F=!this._previousRectTransformDimensions.isNearlyEqual(B);F&&(this._transformIDs[2]=1),!F&&this._previousContainerDimensions.isNearlyEqual(U)||(this._rectTransformScaling.applyScalingToTransform(k,U,this._rectTransformScalingTransform),this._rectTransformScalingTransform.updateLocalTransform(),this._previousContainerDimensions.copyFrom(U),this._previousRectTransformDimensions.copyFrom(B),this._transformIDs[2]=1)}const G=this.hasCustomParent(),j=null!==(U=null===(B=null===(k=this._targetRenderable.getRootContainer())||void 0===k?void 0:k.parent)||void 0===B?void 0:B.transform)&&void 0!==U?U:F.Transform.IDENTITY,$=this._attachedTransform.pixiTransform,H=G?j._worldID:$._parentID,V=G?j._worldID:$._worldID,W=this._rectTransformScalingTransform._localID;H===this._parentID&&V===this._transformIDs[0]&&W===this._transformIDs[1]&&1!==this._transformIDs[2]||(G?this.worldTransform.copyFrom(j.worldTransform):(this.worldTransform.copyFrom($.worldTransform),this._applyRectTransformScaling&&this._rectTransformScaling.applyToMatrix(this._rectTransformScalingTransform.localTransform,this.worldTransform)),this._worldID++,this._parentID=H,this._transformIDs[0]=V,this._transformIDs[1]=W,this._transformIDs[2]=0)}setCustomRectTransformScaling(k){this._rectTransformScaling=k}hasCustomParent(){var k;return!!this._targetRenderable&&(null===(k=this._targetRenderable.getRootContainer())||void 0===k?void 0:k.parent)!==this._targetRenderable.getParentContainer()}destroy(){this._getDimensionsFunc=null,this._targetRenderable=null,this._attachedTransform=null,this._rectTransformScalingTransform=null}}},4697:(k,B,U)=>{"use strict";U.d(B,{y:()=>st});var F,G=U(8674),j=U(68910),$=U(40794),H=U(29658),V=U(15740),W=U(44716),q=U(43501),K=U(47131),z=U(80267),Y=U(5191),Q=U(64527),X=U(27179),Z=U(823),J=U(52751),tt=U(32154),et=U(71082),it=U(51200);let st=F=class extends $.u{constructor(){super(...arguments),this.onRootContainerParentRemoved=new V.H,this.onRootContainerParentSet=new V.H,this.onRootContainerSet=new V.H,this._filter=null,this._isCullable=!1,this._rootContainer=null,this._parentRenderComponent=null,this._overrideTransform=null,this._onCreateAction=new V.H}get isCullable(){return this._isCullable}set isCullable(k){this._isCullable=k,this.cullContainer(k)}get smooth(){return this._smooth}set smooth(k){this._smooth=k,this.updateSmooth()}create(){super.create(),this._onCreateAction.dispatch()}destroy(){this.clearParentRenderComponent(),this.clearListeners(),this._onCreateAction.dispose(),this.onRootContainerSet.dispose(),this.onRootContainerParentRemoved.dispose(),this.onRootContainerParentSet.dispose(),this.clearRootContainer(),this._overrideTransform&&this._overrideTransform.destroy(),this._previousTransform=null,this._overrideTransform=null,super.destroy()}onEnable(){super.onEnable(),this.updateVisibility()}onDisable(){super.onDisable(),this.updateVisibility()}getRootContainer(){return this._rootContainer}getDimensions(){return z.V.log(`Render component getDimensions not overridden in '${this.constructor.name}'. This is likely a mistake.`,Y.$.Warning),Q.o.ZERO}getCenterOffset(){return X.I.ZERO}getParentContainer(){var k;const B=null===(k=this._parentRenderComponent)||void 0===k?void 0:k.getRootContainer();return B&&this._parentRenderComponent.GameObject.layer===this.GameObject.layer?B:this.GameObject?J.w.getActiveScene().getLayer(this.GameObject.layer):null}setUpDisplayObject(k){this.setFilter(k),this.setRootContainer(k)}setFilter(k){this._filter?k.filters=[this._filter.createFilter()]:k.filters=null}setRootContainer(k){this.isCreated?this._rootContainer?z.V.log("Root container can only be set once",Y.$.Warning):k?(this._rootContainer=k,this.overrideRootContainerRender(),this.cullContainer(this._isCullable),this.updateVisibility(),this.GameObject.onActiveInHierarchyChanged.add(this.updateVisibility,this),this.GameObject.onHierarchyChanged.add(this.gameObjectHierarchyChanged,this),this.onRootContainerSet.dispatch(),this.attachRootContainer(),this.updateSmooth()):z.V.log("Root container must be a valid value",Y.$.Warning):this._onCreateAction.addOnce(this.setRootContainer,this,void 0,k)}cullContainer(k){this._rootContainer&&(this._rootContainer.cullable=k)}overrideRootContainerRender(){this._originalRootContainerRender||(this._originalRootContainerRender=this._rootContainer.render.bind(this._rootContainer),this._rootContainer.render=k=>{var B;this.canRootContainerRender()&&(this._rootContainer.cullable&&(this._rootContainer._mask||(null===(B=this._rootContainer.filters)||void 0===B?void 0:B.length))&&!this.doesRootContainerIntersectWithRenderer(k)||this._originalRootContainerRender(k))})}resetRootContainerRender(){this._rootContainer&&this._originalRootContainerRender&&(this._rootContainer.render=this._originalRootContainerRender),this._originalRootContainerRender=void 0}canRootContainerRender(){var k,B;if(!et.C.canContainerRender(this._rootContainer))return!1;const U=null!==(B=null===(k=this._overrideTransform)||void 0===k?void 0:k.worldTransform)&&void 0!==B?B:j.Matrix.IDENTITY;return!(0===U.a||0===U.d)}doesRootContainerIntersectWithRenderer(k){const B=k.renderTexture.sourceFrame;if(!(B.width>0&&B.height>0))return!1;let U,F;this._rootContainer.cullArea?(U=this._rootContainer.cullArea,F=this._rootContainer.worldTransform):U=this._rootContainer.getBounds(!0);const G=k.projection.transform;return G&&(F?F.prepend(G):F=G),U&&B.intersects(U,F)}getOverriddenTransform(){return this._overrideTransform}createPixiTransformOverride(){return new it.k(this.GameObject.transform,this,(()=>this.getDimensions()))}attachRootContainer(){if(this.GameObject.legacyTransform)this.addRootContainerToContainerObject(this.GameObject.legacyTransform.group),this.GameObject.legacyTransform.OnDestroy.add(this.onLegacyTransformDestroyed,this);else{this.GameObject.transform?this.overridePIXIUpdateFunction():this.GameObject.onComponentAdded.add(this.trackTransformAddingToOverride,this),this.GameObject.onComponentAddedToHierarchy.add(this.componentAddedToHierarchy,this);const k=this.GameObject.findComponentInParent(F,!1);k?(this._parentRenderComponent=k,this._parentRenderComponent.OnDestroy.add(this.onParentRenderComponentDestroyed,this),k.getRootContainer()?(this._parentRenderComponent.GameObject.onLayerChanged.add(this.attachRootToRenderComponentParent,this),this.GameObject.onLayerChanged.add(this.attachRootToRenderComponentParent,this)):(k.onRootContainerSet.add(this.onRenderComponentContainerWasSet,this),this.GameObject.onLayerChanged.add(this.attachRootToCurrentLayer,this)),this.attachRootToRenderComponentParent()):(this.attachRootToCurrentLayer(),this.GameObject.onLayerChanged.add(this.attachRootToCurrentLayer,this))}}gameObjectHierarchyChanged(){this.clearParentRenderComponent(),this.GameObject.onLayerChanged.remove(this.attachRootToCurrentLayer,this),this.attachRootContainer()}componentAddedToHierarchy(k,B){if(B instanceof F)if(null===this._parentRenderComponent)this.attachRootContainer();else{const k=this.GameObject.findComponentInParent(F,!1);this._parentRenderComponent!==k&&(this.clearParentRenderComponent(),this.attachRootContainer())}}clearParentRenderComponent(){var k,B;this._parentRenderComponent&&(this._parentRenderComponent.onRootContainerSet.removeAll(this),null===(k=this._parentRenderComponent.GameObject)||void 0===k||k.onLayerChanged.removeAll(this),this._parentRenderComponent.OnDestroy.removeAll(this),this.GameObject.onLayerChanged.removeAll(this),this.onRootContainerParentRemoved.dispatch(),null===(B=this._parentRenderComponent.getRootContainer())||void 0===B||B.removeChild(this._rootContainer),this._parentRenderComponent=null)}attachRootToRenderComponentParent(){var k;const B=null===(k=this._parentRenderComponent)||void 0===k?void 0:k.getRootContainer(),U=this.getParentContainer();if(U===B&&U.children.length>0){const k=this.findChildIndex(),B=U.children.indexOf(this._rootContainer);-1!==B&&B===k||U.addChildAt(this._rootContainer,k)}else this.addRootContainerToContainerObject(U);this.onRootContainerParentSet.dispatch()}findChildIndex(){const k=this.buildRenderComponentOrder(this._parentRenderComponent.GameObject),B=k.indexOf(this),U=this._parentRenderComponent._rootContainer.children,F=k.length;for(let G=B;G-1)return B}return U.length}buildRenderComponentOrder(k){const B=[],U=k.children.length;for(let G=0;G0?j:this.buildRenderComponentOrder(U))}return B}attachRootToCurrentLayer(){if(this.gameObject.isMarkedForDestruction||this.gameObject.isDestroyed)return;this._rootContainer.parent&&this.onRootContainerParentRemoved.dispatch();const k=J.w.getActiveScene().getLayer(this.GameObject.layer);this.addRootContainerToContainerObject(k),this.onRootContainerParentSet.dispatch()}addRootContainerToContainerObject(k){k&&-1===k.children.indexOf(this._rootContainer)&&this._rootContainer&&!this._rootContainer.destroyed&&k.addChild(this._rootContainer)}onRenderComponentContainerWasSet(){this._parentRenderComponent.onRootContainerSet.remove(this.onRenderComponentContainerWasSet,this),this._parentRenderComponent.GameObject.onLayerChanged.add(this.attachRootToRenderComponentParent,this),this.GameObject.onLayerChanged.remove(this.attachRootToCurrentLayer,this),this.GameObject.onLayerChanged.add(this.attachRootToRenderComponentParent,this),this.attachRootToRenderComponentParent()}updateVisibility(){var k;if(this._rootContainer&&!this._rootContainer.destroyed){const B=this.IsActiveInHierarchy;this._rootContainer.visible=B,this._rootContainer.exists=B,null===(k=this._overrideTransform)||void 0===k||k.updateTransform()}}updateSmooth(){this._rootContainer&&tt.A.isDefined(this._smooth)&&tt.A.toggleDisplayObjSmooth(this._rootContainer,this._smooth)}trackTransformAddingToOverride(k){k instanceof q.d?(this.overridePIXIUpdateFunction(),this.GameObject.onComponentAdded.remove(this.trackTransformAddingToOverride,this)):k instanceof W.K&&(this.attachRootContainer(),this.GameObject.onComponentAdded.remove(this.trackTransformAddingToOverride,this))}onOverrideTransformDestroyed(){this.resetPIXIUpdateFunction(),this.attachRootContainer(),this.GameObject.onComponentAdded.add(this.trackTransformAddingToOverride,this)}onLegacyTransformDestroyed(){this.attachRootContainer(),this.GameObject.onComponentAdded.add(this.trackTransformAddingToOverride,this)}onParentRenderComponentDestroyed(){this._parentRenderComponent.GameObject.onLayerChanged.removeAll(this),this.GameObject.onLayerChanged.removeAll(this),this.GameObject.onLayerChanged.add(this.attachRootToCurrentLayer,this),this.attachRootToCurrentLayer()}overridePIXIUpdateFunction(){this._overrideTransform||(this.GameObject.transform.OnDestroy.add(this.onOverrideTransformDestroyed,this),this._previousTransform=this._rootContainer.transform,this._overrideTransform=this.createPixiTransformOverride(),this._rootContainer.transform=this._overrideTransform)}resetPIXIUpdateFunction(){this._rootContainer.transform=this._previousTransform,this._previousTransform=null,this._overrideTransform=null}clearListeners(){this.GameObject&&(this.GameObject.onActiveInHierarchyChanged.removeAll(this),this.GameObject.onHierarchyChanged.removeAll(this),this.GameObject.onLayerChanged.removeAll(this),this.GameObject.onComponentAddedToHierarchy.removeAll(this),this.GameObject.onDestroy.removeAll(this),this.GameObject.onComponentAdded.removeAll(this),this.GameObject.legacyTransform?this.GameObject.legacyTransform.OnDestroy.removeAll(this):this.GameObject.transform&&this.GameObject.transform.OnDestroy.removeAll(this))}clearRootContainer(){this._rootContainer&&(this.resetRootContainerRender(),this._previousTransform&&(this._rootContainer.transform=this._previousTransform),this._rootContainer.removeFromParent(),this._rootContainer=null)}};(0,G.Cg)([(0,Z.VF)(),(0,G.Sn)("design:type",K.d)],st.prototype,"_filter",void 0),(0,G.Cg)([(0,Z.vk)(),(0,Z.YL)("Should the _rootContainer (including children) of this RenderComponent be culled?
Useful when you expect to have objects that are off screen."),(0,G.Sn)("design:type",Boolean)],st.prototype,"_isCullable",void 0),(0,G.Cg)([(0,Z.vk)(),(0,Z.YL)("Should the _rootContainer (including children) of this RenderComponent be smoothed?"),(0,G.Sn)("design:type",Boolean)],st.prototype,"_smooth",void 0),st=F=(0,G.Cg)([(0,H.EV)("RenderComponent (abstract)",void 0,"Includes helpers for some of the core functionality required for
injecting render components into the scene graph")],st)},59859:(k,B,U)=>{"use strict";U.d(B,{j:()=>z});var F=U(8674),G=U(85880),j=U(68910),$=U(29658),H=U(61806),V=U(300),W=U(40008),q=U(80473),K=U(4697);let z=class extends K.y{constructor(){super(...arguments),this.localBoundsOffset=W.I9.ZERO,this._updateRequired=!1,this._alpha=1,this._tintColor="0xFFFFFF",this._tintIntensity=0,this._tintBlendMode=V.Pz.Multiply,this._baseFilter=null}get alpha(){return this._alpha}set alpha(k){this._updateRequired||(this._updateRequired=this._alpha!==k),this._alpha=k}get tintColor(){return this._tintColor}set tintColor(k){this._updateRequired||(this._updateRequired=this._tintColor!==k),this._tintColor=k}get tintIntensity(){return this._tintIntensity}set tintIntensity(k){this._updateRequired||(this._updateRequired=this._tintIntensity!==k),this._tintIntensity=k}get tintBlendMode(){return this._tintBlendMode}set tintBlendMode(k){this._updateRequired||(this._updateRequired=this._tintIntensity!==k),this._tintBlendMode=k}get requireFilter(){return 1!==this._alpha||0!==this._tintIntensity}create(){var k,B;if(super.create(),!this._renderContainer){if(this._renderContainer=null===(B=null===(k=H.W.instance)||void 0===k?void 0:k.game)||void 0===B?void 0:B.add.container(),!this._renderContainer)return;this._renderContainer.name=this.GameObject.name,this.setRootContainer(this._renderContainer)}this.requireFilter&&(this._updateRequired=!0,this.updateFilter())}getCenterOffset(){return this.localBoundsOffset}updateFilter(){var k;if(this.requireFilter){if(this._updateRequired&&this.lookupBaseFilter()){const[k=255,B=255,U=255]=G.os.utils.splitColor(this._tintColor);this._baseFilter.alpha=this._alpha,this._baseFilter.tintIntensity=this._tintIntensity,this._baseFilter.tintColor=[k/255,B/255,U/255],this._baseFilter.blend=this._tintBlendMode,this._updateRequired=!1}}else(null===(k=this._renderContainer.filters)||void 0===k?void 0:k.includes(this._baseFilter))&&(this._renderContainer.filters=this._renderContainer.filters.filter((k=>k!==this._baseFilter)),this._baseFilter.destroy(),this._baseFilter=null,this._updateRequired=!1)}lookupBaseFilter(){var k;if(this._renderContainer)return this._renderContainer.filters||(this._renderContainer.filters=[]),this._baseFilter=(null===(k=this._renderContainer.filters)||void 0===k?void 0:k.find((k=>k instanceof V.oW)))||new V.oW,this._renderContainer.filters.includes(this._baseFilter)||this._renderContainer.filters.push(this._baseFilter),this._baseFilter}getDimensions(){var k,B,U,F,G,$,H,V;const q=null===(B=null===(k=this._renderContainer)||void 0===k?void 0:k._bounds)||void 0===B?void 0:B.getRectangle(),K=(null==q?void 0:q.width)>0?q:new j.Rectangle(0,0,100,100);return this.localBoundsOffset=new W.I9(K.x-(null===(G=null===(F=null===(U=this.gameObject)||void 0===U?void 0:U.transform)||void 0===F?void 0:F.localPosition)||void 0===G?void 0:G.x),K.y-(null===(V=null===(H=null===($=this.gameObject)||void 0===$?void 0:$.transform)||void 0===H?void 0:H.localPosition)||void 0===V?void 0:V.y)),new W.or(K.width,K.height)}destroy(){var k;null===(k=this._renderContainer)||void 0===k||k.destroy(),this._renderContainer=null,super.destroy()}canRootContainerRender(){var k;return 0!==(null===(k=this._baseFilter)||void 0===k?void 0:k.alpha)&&super.canRootContainerRender()}};(0,F.Cg)([(0,q.g1)(),(0,F.Sn)("design:type",Number)],z.prototype,"_alpha",void 0),(0,F.Cg)([(0,q.iE)(),(0,F.Sn)("design:type",String)],z.prototype,"_tintColor",void 0),(0,F.Cg)([(0,q.g1)(),(0,F.Sn)("design:type",Number)],z.prototype,"_tintIntensity",void 0),(0,F.Cg)([(0,q.gf)(V.Pz),(0,F.Sn)("design:type",Number)],z.prototype,"_tintBlendMode",void 0),z=(0,F.Cg)([(0,$.EV)("BaseRender",$.YH.render,"Creates a basic render component to allow for visual changes(alpha, tint, etc)")],z)},10673:(k,B,U)=>{"use strict";U.d(B,{v:()=>et});var F,G=U(8674),j=U(29658),$=U(15740),H=U(16649),V=U(61806),W=U(80267),q=U(5191),K=U(64527),z=U(27179),Y=U(41444),Q=U(87661),X=U(823),Z=U(548),J=U(32154),tt=U(4697);let et=F=class extends tt.y{get alpha(){return this.spine.alpha}set alpha(k){this.spine&&(this.spine.alpha=k)}set tint(k){this._tint=k,this.spine&&this.spine.setTint(k)}get paused(){return this.spine&&this.isLoaded?this.spine.paused:!!J.A.isDefined(this._pausedOnLoad)&&this._pausedOnLoad}set paused(k){this.spine&&this.isLoaded?this.spine.paused=k:this._pausedOnLoad=k}get updateMethod(){var k;return this.spine&&this.isLoaded?this.spine.updateMethod:null!==(k=this._updateMethodOnLoad)&&void 0!==k?k:H.b.Pixi}set updateMethod(k){this.spine&&this.isLoaded?this.spine.updateMethod=k:this._updateMethodOnLoad=k}get isLoaded(){return this._isLoaded}get OnLoaded(){return this.onLoaded}constructor(){super(),this.spine=null,this._spineKey=null,this._spineGUID=null,this._animationRemap=new Map,this._alphaOnLoad=1,this._tint=void 0,this._isLoaded=!1,this.onLoaded=new $.H,this._preCreateSetAsset=null,this.onEvent=new $.H,this._spineSize=new K.o,this._spineAnchor=new z.I,this._smooth=!0}create(){super.create(),this.onLoaded.addOnce((()=>{this.alpha=this._alphaOnLoad,J.A.isDefined(this._pausedOnLoad)&&(this.paused=this._pausedOnLoad),J.A.isDefined(this._updateMethodOnLoad)&&(this.updateMethod=this._updateMethodOnLoad)})),this._rootGroup=V.W.instance.game.add.container(void 0,this.GameObject.name),this._rootGroup.containsPoint=this.isPointInSpine.bind(this),this.setRootContainer(this._rootGroup),this._preCreateSetAsset?(this._preCreateSetAsset(),this._preCreateSetAsset=null):this._spineKey?this.setAsset(this._spineKey):this._spineGUID&&this.setAsset(this._spineGUID)}setAsset(k,B,U){var F;if(!this._rootGroup)return this._preCreateSetAsset=this.setAsset.bind(this,k,B,U),void(this._spineKey=k);this.destroySpine(),J.A.isDefined(k)&&0!==k.length?(this._isLoaded=!1,Z.E.isLoaded(k)?(this.updateSpineObject(k),J.A.isDefined(B)&&B()):U?U(k,B):W.V.log(`Spine asset ${k} was not found in cache and no load function was provided to SpineComponent on ${null===(F=this.gameObject)||void 0===F?void 0:F.name}`,q.$.Error)):J.A.isDefined(B)&&B()}destroy(){var k;this.destroySpine(),this._animationRemap.clear(),null===(k=this._rootGroup)||void 0===k||k.destroy(),this.onLoaded.dispose(),this.onEvent.dispose(),this._isLoaded=!1,this._preCreateSetAsset=null,super.destroy()}destroySpine(){this.spine&&(this.spine.onEvent&&this.spine.onEvent.removeAll(this.onEvent),this.spine.pendingDestroy=!0,this.spine=null)}getDimensions(){return this.spine?this._spineSize:K.o.ZERO}getCenterOffset(){return this.spine?this._spineAnchor:z.I.ZERO}getCurrentDimensions(){return this.spine?new K.o(this.spine.width,this.spine.height):K.o.ZERO}getSpine(){return this.spine}setAnimationMix(k,B,U){this.spine.setAnimationMix(this.getRemappedAnimation(k),this.getRemappedAnimation(B),U)}update(){var k;null===(k=this.spine)||void 0===k||k.updateFromComponent(),super.update()}updateSpineObject(k){if(this.destroySpine(),this.GameObject){this.spine=V.W.instance.game.add.spine(0,0,k),this._tint&&this.spine.setTint(this._tint),this.spine.updateMethod=H.b.Pixi,this._rootGroup.addChild(this.spine),this.updateSmooth(),this.setSlotVisibility(F.INPUT_HITBOX,!1),this.spine.onEvent.add(this.onEvent.dispatch,this.onEvent),this.spine.update();const B=this.spine.skeleton.data,U=B.width,G=B.height;this._spineSize.setTo(U,G);const j=B.x,$=B.y;this._spineAnchor.setTo(-U-j,-G-$),this._isLoaded=!0,this.onLoaded.dispatch()}}setSlotVisibility(k,B){const U=this.getSlot(k);if(U){const k=this.getSpine().getSlotContainer(U);k?k.visible=B:U.color.a=B?1:0}}getSlot(k){var B;return this.spine?this.spine.skeleton.findSlot(k):(W.V.log(`No Spine in SpineComponent on ${null===(B=this.gameObject)||void 0===B?void 0:B.name}`,q.$.Error),null)}getBone(k){var B;let U=null;return this.spine?(U=this.spine.skeleton.findBone(k),U||W.V.log(`Bone with name ${k} not found`,q.$.Error)):W.V.log(`No Spine in SpineComponent on ${null===(B=this.gameObject)||void 0===B?void 0:B.name}`,q.$.Error),U}setAnimationByName(k,B,U=!1){const F=this.getRemappedAnimation(B);this.spine.setAnimationByName(k,F,U)}addAnimationRemap(k,B){this._animationRemap.set(k,B)}removeAnimationRemap(k,B){B&&this._animationRemap.get(k)!==B||this._animationRemap.delete(k)}getRemappedAnimation(k){var B;return null!==(B=this._animationRemap.get(k))&&void 0!==B?B:k}isPointInSpine(k){if(!this.spine)return!1;const B=this.spine.getBounds();return k.x>=B.left&&k.x<=B.right&&k.y>=B.top&&k.y<=B.bottom}};et.INPUT_HITBOX="input_hitbox",(0,G.Cg)([(0,Y.B)(),(0,X.W_)(),(0,X.Lr)(0),(0,X.nK)("asset"),(0,G.Sn)("design:type",String)],et.prototype,"_spineKey",void 0),(0,G.Cg)([(0,Y.B)(),(0,X.i0)(Q.Z.Spine),(0,G.Sn)("design:type",String)],et.prototype,"_spineGUID",void 0),(0,G.Cg)([(0,X.g1)(),(0,X.Lr)(0),(0,X.nK)("alpha"),(0,G.Sn)("design:type",Number)],et.prototype,"_alphaOnLoad",void 0),(0,G.Cg)([(0,X.vk)(),(0,X.nK)("paused"),(0,G.Sn)("design:type",Boolean)],et.prototype,"_pausedOnLoad",void 0),(0,G.Cg)([(0,X.gf)(H.b),(0,X.nK)("updateMethod"),(0,G.Sn)("design:type",String)],et.prototype,"_updateMethodOnLoad",void 0),(0,G.Cg)([(0,X.bb)(),(0,G.Sn)("design:type",$.H)],et.prototype,"onLoaded",void 0),(0,G.Cg)([(0,X.bb)(),(0,G.Sn)("design:type",$.H)],et.prototype,"onEvent",void 0),et=F=(0,G.Cg)([(0,j.EV)("Spine",j.YH.animation,"Renders a spine asset"),(0,G.Sn)("design:paramtypes",[])],et)},87987:(k,B,U)=>{"use strict";U.d(B,{W:()=>W});var F=U(57530),G=U(80267),j=U(5191),$=U(21695),H=U(71392),V=U(17607);class W extends H.m{get sortFunctor(){return this._sortFunctor}set sortFunctor(k){this._sortFunctor=k}constructor(k,B,U){super(),this._sortFunctor=V.I.NONE,this.attachToCamera=U,this.interactiveChildren=!0,k.addChild(this),this.name=B}render(k){var B;!this.children.length||!this.visible||this.worldAlpha<=0||this.children.every((k=>!k.visible||k.worldAlpha<=0))||(null===(B=F.i.main)||void 0===B||B.setCameraActive(!this.attachToCamera,k),super.render(k))}addDisplayObject(k){if(this._sortFunctor){const B=this.children.length;for(let U=0;U-1?this.removeChild(k):G.V.log("Display object was not found",j.$.Warning)}update(){this._sortFunctor&&$.N.insertion(this.children,this._sortFunctor),super.update()}}W.DEFAULT_NAME="default",W.DEFAULT_DEPTH=0},17607:(k,B,U)=>{"use strict";U.d(B,{I:()=>F});const F={Y_SORT:(k,B)=>k.worldTransform.ty{"use strict";U.d(B,{Z:()=>W});var F=U(68910),G=U(61806),j=U(36361),$=U(80267),H=U(5191),V=U(87987);class W{constructor(){this._layers=new Map,this._gameObjects=[],this._container=new j.r,this.POST_UPDATE="postUpdate",this.onPostUpdate=new F.Runner(this.POST_UPDATE)}get gameObjects(){return this._gameObjects}get container(){return this._container}addGameObject(k){if(!k)return $.V.log("Cannot add null gameObject",H.$.Error),null;k.parent?$.V.log("Could not add game object to scene as it is parented to something already",H.$.Warning):this._gameObjects.push(k)}removeGameObject(k){const B=this._gameObjects.indexOf(k);B>-1?this._gameObjects.splice(B,1):$.V.log("Could not remove game object from the scene",H.$.Warning)}addLayer(k=V.W.DEFAULT_NAME,B=V.W.DEFAULT_DEPTH,U){return this._layers.has(k)?($.V.log(`A layer with the name '${k}' already exists. It will not be added.`,H.$.Warning),this._layers.get(k).layer):this.createLayer(k,B,U)}getLayer(k){return this._layers.has(k)?this._layers.get(k).layer:this.createLayer(k,V.W.DEFAULT_DEPTH)}hasLayer(k){return this._layers.has(k)}setLayerDepth(k,B){const U=this._layers.get(k);if(!U)return null;U.depth=B;const F=G.W.instance.game;return F.world.removeChild(U.layer),this.addContainerToWorld(F,U.layer,B),U.layer}setAllLayerVisibility(k,B){for(const U of this._layers.keys())(null==B?void 0:B.has(U))||(this._layers.get(U).layer.visible=k)}addContainerToWorld(k,B,U){const F=k.world.children,G=F.length;for(let j=0;j-1;--k)this._gameObjects[k].destroyDeferred();this._gameObjects=null;for(const k of this._layers.keys())this.destroyLayer(k);this._layers=null,this._container.unbindAll(),this.onPostUpdate.destroy(),this.onPostUpdate=null}findLayerDataForObject(k){const B=k.name;return B&&this._layers.has(B)?this._layers.get(B):null}createLayer(k,B,U=!1){const F=G.W.instance.game,j=new V.W(F.stage,k,U);return this.addContainerToWorld(G.W.instance.game,j,B),this._layers.set(k,{layer:j,depth:B}),j}}},52751:(k,B,U)=>{"use strict";U.d(B,{w:()=>G});var F=U(44770);class G{static getActiveScene(){return null===this._currentScene&&(this._currentScene=new F.Z),this._currentScene}static destroyActiveScene(){this._currentScene&&(this._currentScene.destroy(),this._currentScene=null)}}G._currentScene=null},6686:(k,B,U)=>{"use strict";U.d(B,{G:()=>$});var F=U(39002),G=U(49415),j=U(22300);class ${constructor(){this._quadTreeBounds={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY},this._staticTriggerQuadTree=new j.E({left:0,top:0,right:0,bottom:0},$.MAX_TREE_DEPTH,$.MAX_TRIGGERS_IN_LEAF),this._triggerRemoveCounter=0,this._dynamicTriggers=[]}addTrigger(k){k.isStatic?this.addStaticTrigger(k):this.addDynamicTrigger(k)}removeTrigger(k){k.isStatic?this.removeStaticTrigger(k):this.removeDynamicTrigger(k)}update(){const k=this._dynamicTriggers.length;for(let B=0;BF.c.doBoundsOverlap(U.bounds,k))).map((({value:k})=>k)));const j=G.length;for(let k=0;k-1===G.indexOf(k))).forEach((k=>{U.trigger.onTriggerExit.dispatch(k),k.onTriggerExit.dispatch(U.trigger)})),U.overlappingTriggers=G}this._dynamicTriggers.forEach((k=>{k.bounds=null}))}addStaticTrigger(k){const B=k.getBounds(),U=G.J.mergeBounds(Object.assign({},this._quadTreeBounds),B);G.J.areEqual(U,this._quadTreeBounds)||(this._staticTriggerQuadTree.updateBounds(U),this._quadTreeBounds=U),this._staticTriggerQuadTree.insert(B,k)}addDynamicTrigger(k){this._dynamicTriggers.push({trigger:k,bounds:null,overlappingTriggers:[]})}removeStaticTrigger(k){if(this._staticTriggerQuadTree.remove(k.getBounds(),k),++this._triggerRemoveCounter,this._triggerRemoveCounter>$.TRIGGER_REMOVAL_REBALANCE_COUNT){const k=this._staticTriggerQuadTree.getAllContents(),B={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY};k.forEach((({bounds:k})=>{G.J.mergeBounds(B,k)})),G.J.areEqual(B,this._quadTreeBounds)||(this._staticTriggerQuadTree.updateBounds(B),this._quadTreeBounds=B),this._triggerRemoveCounter=0}}removeDynamicTrigger(k){const B=this._dynamicTriggers.findIndex((({trigger:B})=>B===k));if(B>-1){this._dynamicTriggers.splice(B,1)[0].overlappingTriggers.forEach((B=>{B.onTriggerExit.dispatch(k),k.onTriggerExit.dispatch(B)}))}}}$.MAX_TRIGGERS_IN_LEAF=15,$.MAX_TREE_DEPTH=8,$.TRIGGER_REMOVAL_REBALANCE_COUNT=20},22070:(k,B,U)=>{"use strict";U.d(B,{o:()=>K});var F,G,j=U(46880),$=U(34711);!function(k){k.local="localStorage",k.session="sessionStorage"}(F||(F={})),function(k){k.iOS="iOS",k.Android="Android",k.iPadOS="iPadOS",k.FireOS="Fire OS",k.ChromebookOS="CrOS"}(G||(G={}));var H,V;!function(k){k.Amazon="Amazon",k.Google="Google"}(H||(H={})),function(k){k.iPhone="iPhone",k.iPad="iPad",k.iPod="iPod"}(V||(V={}));var W=U(32154);const q="Unknown";class K{static get bowserParsedData(){return this._bowserParsedData||(this._bowserParsedData=(0,j.parse)(window.navigator.userAgent)),this._bowserParsedData}static isMobile(){return this.bowserParsedData.platform.type===j.PLATFORMS_MAP.tablet||this.bowserParsedData.platform.type===j.PLATFORMS_MAP.mobile}static isDesktop(){return!K.isMobile()}static isChrome(){return this.bowserParsedData.browser.name===j.BROWSER_MAP.chrome}static isChromium(){return this.bowserParsedData.browser.name===j.BROWSER_MAP.chromium}static isFirefox(){return this.bowserParsedData.browser.name===j.BROWSER_MAP.firefox}static isEdge(){return this.bowserParsedData.browser.name===j.BROWSER_MAP.edge}static isOpera(){return this.bowserParsedData.browser.name===j.BROWSER_MAP.opera}static isSafari(){return this.bowserParsedData.browser.name===j.BROWSER_MAP.safari}static isIpadOS(){return K.getOsName()===G.iPadOS}static isIOS(){return this.bowserParsedData.os.name===G.iOS||!(K.isAndroid()||!W.A.isDefined(window.navigator.platform))&&(window.navigator.platform.indexOf(V.iPhone)>=0||window.navigator.platform.indexOf(V.iPad)>=0||window.navigator.platform.indexOf(V.iPod)>=0)}static isAndroid(){return this.bowserParsedData.os.name===G.Android}static isFireOS(){return K.getOsDistribution()===G.FireOS||K.getLocalStorageDeviceInfo().manufacturer===H.Amazon}static getBrowserType(){return this.bowserParsedData.browser.name}static getBrowserVersion(){var k;return null!==(k=this.bowserParsedData.browser.version)&&void 0!==k?k:"unknown"}static getIOSVersion(){if(/iP(hone|od|ad)/.test(navigator.platform)){const k=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return parseInt(k[1],10)}return null}static getDeviceModel(){if(!K._deviceModel){const k=K.getLocalStorageDeviceInfo(),B=k.marketingName?`${k.manufacturer} ${k.marketingName}`.trimLeft():k.model;K._deviceModel=B||q}return K._deviceModel}static getLocalStorageDeviceInfo(){var k;if(K._detectedDeviceInfo)return K._detectedDeviceInfo;K._detectedDeviceInfo={osName:"",osVersion:"",osiOS:void 0,osAndroid:void 0,osDistribution:"",browserName:"",browserVersion:"",vendor:"",model:"",yearReleased:"",manufacturer:"",marketingName:"",mobileDevice:void 0,isTablet:void 0,primaryHardwareType:""};const B=null!==(k=window.deviceInformation)&&void 0!==k?k:JSON.parse(localStorage.getItem("device-information"));return B&&(K._detectedDeviceInfo=B),K._detectedDeviceInfo}static getDeviceHardwareType(){if(K._deviceHardwareType)return K._deviceHardwareType;const k=K.getLocalStorageDeviceInfo();return(null==k?void 0:k.primaryHardwareType)?(K._deviceHardwareType=k.primaryHardwareType,K._deviceHardwareType):q}static getOsDistribution(){const k=K.getLocalStorageDeviceInfo();return(null==k?void 0:k.osDistribution)?k.osDistribution:"unknown"}static getOsName(){const k=K.getLocalStorageDeviceInfo();return(null==k?void 0:k.osName)?k.osName:"unknown"}static isAndroidStockBrowser(){if(!K.isAndroid())return!1;return parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.appVersion)[1],10)<=534&&0===navigator.vendor.indexOf(H.Google)}static isWebAudio(){return!$.s3.useLegacy}static hasLocalStorageSupport(){return this.checkStorage(F.local)}static hasSessionStorageSupport(){return this.checkStorage(F.session)}static checkStorage(k){try{const B=window[k],U="dummy_key_for_testing_storage";return B.setItem(U,U),B.removeItem(U),!0}catch(B){return!1}}}},62481:(k,B,U)=>{"use strict";U.d(B,{R:()=>j});var F=U(5191),G=U(80267);class j{static createHandler(k){return B=>{this.logError(B,k)}}static logError(k,B){G.V.log(`${B}: ${j.stringify(k)}`,F.$.Error)}static stringify(k){var B;return k instanceof Error?null!==(B=k.stack)&&void 0!==B?B:k.message:JSON.stringify(k)}static getMessage(k){return k instanceof Error?k.message:"string"==typeof k?k:"An unknown error occurred"}}},78178:(k,B,U)=>{"use strict";U.d(B,{U:()=>j});var F=U(18830),G=U(52751);class j{static getInjectedValue(k,B){var U,j;return null!==(j=null===(U=null==k?void 0:k.findComponentInParent(F.b))||void 0===U?void 0:U.getInjectedValue(B))&&void 0!==j?j:G.w.getActiveScene().container.get(B)}static getParentContainer(k){var B,U;return null!==(U=null===(B=null==k?void 0:k.findComponentInParent(F.b))||void 0===B?void 0:B.Container)&&void 0!==U?U:G.w.getActiveScene().container}}},22494:(k,B,U)=>{"use strict";U.d(B,{Q:()=>G,x:()=>$});var F=U(40794);class G{static addProperty(k,B,U){const F=Reflect.getMetadata(k,B);Reflect.defineMetadata(k,F?[...F,U]:[U],B)}}let j=0;function $(k){return(B,U)=>{const G=Object.getOwnPropertyDescriptor(B,U);if(G&&(G.get||G.set||"function"==typeof G.value))throw new Error("Decorator can only be applied to member variables");if("function"!=typeof B[k])throw new Error("Update function must be a function");const $=`_updateFunction_${"string"==typeof U?U:j++}`;Object.defineProperty(B,U,{get(){return this[$]},set(B){this[$]=B,this instanceof F.u&&!this.isCreated||this[k]()}})}}},71082:(k,B,U)=>{"use strict";U.d(B,{C:()=>$});var F=U(68910),G=U(39002),j=U(61806);class ${static areMatricesEqual(k,B,U){return G.c.isNearlyEqual(k.tx,B.tx,U)&&G.c.isNearlyEqual(k.ty,B.ty,U)&&G.c.isNearlyEqual(k.a,B.a,U)&&G.c.isNearlyEqual(k.b,B.b,U)&&G.c.isNearlyEqual(k.c,B.c,U)&&G.c.isNearlyEqual(k.d,B.d,U)}static matrix3x3ToPixi(k,B){B.set(k.a,k.b,k.c,k.d,k.tx,k.ty)}static addPointData(k,B,U=k){U.x=k.x+B.x,U.y=k.y+B.y}static subtractPointData(k,B,U=k){U.x=k.x-B.x,U.y=k.y-B.y}static multiplyPointData(k,B,U=k){U.x=k.x*B.x,U.y=k.y*B.y}static dividePointData(k,B,U=k){U.x=k.x/B.x,U.y=k.y/B.y}static getDistanceSq(k,B){return Math.pow(k.x-B.x,2)+Math.pow(k.y-B.y,2)}static getDistance(k,B){return Math.sqrt(this.getDistanceSq(k,B))}static render(k,B,U=null,G=!1,$=!1){var H;const V={renderTexture:k,clear:G,transform:U,skipUpdateTransform:$};(null!==(H=j.W.instance.game.renderer)&&void 0!==H?H:F.autoDetectRenderer()).render(B,V)}static renderXY(k,B,U,G,j=!1){this.render(k,B,new F.Matrix(1,0,0,1,U,G),j,!1)}static renderRawXY(k,B,U,G,j){this.render(k,B,new F.Matrix(1,0,0,1,U,G),j,!0)}static clear(k){var B;const U=null!==(B=j.W.instance.game.renderer)&&void 0!==B?B:F.autoDetectRenderer();if(null==U?void 0:U.renderTexture){const B=U.renderTexture.current;if(U.renderTexture.bind(k),U.renderTexture.clear(),B!==k&&(null===B||(null==B?void 0:B.baseTexture))){const k=U.renderTexture.sourceFrame,F=U.renderTexture.destinationFrame;U.renderTexture.bind(B,k,F)}}}static removeAllChildren(k,B=!1){const U=k.removeChildren();if(B)for(const F of U)F.destroy()}static markTextureGarbageCollectionFrame(){var k;const B=(null!==(k=j.W.instance.game.renderer)&&void 0!==k?k:F.autoDetectRenderer()).textureGC;this._textureGcFrame=B.count}static garbageCollectTextures(){var k;const B=(null!==(k=j.W.instance.game.renderer)&&void 0!==k?k:F.autoDetectRenderer()).textureGC,U=B.maxIdle;B.maxIdle=B.count-this._textureGcFrame,B.run(),B.maxIdle=U}static destroyAllTextures(){this.markTextureGarbageCollectionFrame(),this.garbageCollectTextures()}static canContainerRender(k){var B;if(!(k&&!k.destroyed&&k.visible&&k.renderable&&k.worldAlpha>0))return!1;if(null===(B=k.filters)||void 0===B?void 0:B.length)for(const U of k.filters)if(U.uniforms&&(0===U.uniforms.alpha||0===U.uniforms.uAlpha))return!1;return!0}}$._textureGcFrame=0},93337:(k,B,U)=>{"use strict";U.d(B,{H:()=>F});const F=k=>!k.isPrimary&&(k.stopPropagation(),!0)},21695:(k,B,U)=>{"use strict";U.d(B,{N:()=>F});class F{static insertion(k,B){const U=k.length;for(let F=0;F0&&B(U,k[G-1]);)k[G]=k[G-1],--G;k[G]=U}}}},22300:(k,B,U)=>{"use strict";var F;U.d(B,{E:()=>G}),function(k){k[k.TopLeft=0]="TopLeft",k[k.TopRight=1]="TopRight",k[k.BottomLeft=2]="BottomLeft",k[k.BottomRight=3]="BottomRight"}(F||(F={}));class G{constructor(k,B,U){this._treeObjects=[],this._overlappingTreeObjects=[],this._level=1,this._nodes=[],this._bounds=k,this._maxDepth=B,this._maxObjects=U}updateBounds(k){this._bounds=k;const B=this.getAllContents();this.clear(),B.forEach((({bounds:k,value:B})=>{this.insert(k,B)}))}clear(){this._treeObjects.length=0,this._overlappingTreeObjects.length=0;const k=this._nodes.length;for(let B=0;B0){const U=this.findNodeIndex(k),F=this._nodes[U];return void(k.left>=F._bounds.left&&k.right<=F._bounds.right&&k.top>=F._bounds.top&&k.bottom<=F._bounds.bottom?this._nodes[U].insert(k,B):this._overlappingTreeObjects.push({bounds:k,value:B}))}this._treeObjects.push({bounds:k,value:B});const U=this._treeObjects.length;if(this._levelthis._maxObjects){this.split();for(let k=0;k0){const B=this._nodes.length;for(let U=0;U0){const U=this.findNodeIndex(k),G=this._nodes[U];k.left>=G._bounds.left&&k.right<=G._bounds.right&&k.top>=G._bounds.top&&k.bottom<=G._bounds.bottom?B.push.apply(B,G.retrieve(k)):(k.left<=this._nodes[F.TopRight]._bounds.left&&(k.top<=this._nodes[F.BottomLeft]._bounds.top&&B.push.apply(B,this._nodes[F.TopLeft].getAllContents()),k.bottom>this._nodes[F.BottomLeft]._bounds.top&&B.push.apply(B,this._nodes[F.BottomLeft].getAllContents())),k.right>this._nodes[F.TopRight]._bounds.left&&(k.top<=this._nodes[F.BottomRight]._bounds.top&&B.push.apply(B,this._nodes[F.TopRight].getAllContents()),k.bottom>this._nodes[F.BottomRight]._bounds.top&&B.push.apply(B,this._nodes[F.BottomRight].getAllContents())))}return B.push.apply(B,this._overlappingTreeObjects),B.push.apply(B,this._treeObjects),B}remove(k,B){const U=({value:k})=>B===k;let F=this._overlappingTreeObjects.findIndex(U);if(F>-1)this._overlappingTreeObjects.splice(F,1);else if(F=this._treeObjects.findIndex(U),F>-1)this._treeObjects.splice(F,1);else if(this._nodes.length>0){const U=this.findNodeIndex(k);this._nodes[U].remove(k,B)}}split(){const k=.5*(this._bounds.right-this._bounds.left),B=.5*(this._bounds.bottom-this._bounds.top),U=this._bounds.left,j=this._bounds.top;this._nodes[F.TopLeft]=new G({left:U,top:j,right:U+k,bottom:j+B},this._maxDepth,this._maxObjects),this._nodes[F.TopLeft]._level=this._level+1,this._nodes[F.TopRight]=new G({left:U+k,top:j,right:this._bounds.right,bottom:j+B},this._maxDepth,this._maxObjects),this._nodes[F.TopRight]._level=this._level+1,this._nodes[F.BottomLeft]=new G({left:U,top:j+B,right:U+k,bottom:this._bounds.bottom},this._maxDepth,this._maxObjects),this._nodes[F.BottomLeft]._level=this._level+1,this._nodes[F.BottomRight]=new G({left:U+k,top:j+B,right:this._bounds.right,bottom:this._bounds.bottom},this._maxDepth,this._maxObjects),this._nodes[F.BottomRight]._level=this._level+1}findNodeIndex(k){const B=this._bounds.left+.5*(this._bounds.right-this._bounds.left),U=this._bounds.top+.5*(this._bounds.bottom-this._bounds.top),G=k.top{"use strict";U.d(B,{E:()=>q});var F=U(95891),G=U(68910),j=U(16649),$=U(61806),H=U(80267),V=U(5191),W=U(62481);class q{static getAnimationEventTime(k,B,U){var j,$;const W=null!==($=null===(j=k.skeleton)||void 0===j?void 0:j.data.findAnimation(B))&&void 0!==$?$:null;let q=-1;if(W){if((null==W?void 0:W.timelines.length)>0){const k=W.timelines,j=k[k.length-1];if(j instanceof G.spine.EventTimeline){const k=F.find(j.events,(k=>k.data.name===U));k?q=1e3*k.time:H.V.log(`Missing event "${U}" on animation "${B}"`,V.$.Warning)}else H.V.log(`Missing event timeline for animation "${B}"`,V.$.Warning)}}else H.V.log(`Missing spine animation "${B}"`,V.$.Warning);return q}static getAudioList(k){let B=null;try{B=new j.y(k)}catch(G){return W.R.logError(G,`Could not load spine ${k}`),null}if(!B)return null;const U=[];for(let F=0;F0&&U.push(k)}return B.destroy(),U.map(F.trim)}static isLoaded(k){return $.W.instance.game.cache.checkSpineKey(k)}static getSpineEventByName(k,B){const U=$.W.instance.game.cache.getJSON(k);if(!U)return H.V.log(`Spine ${k} either unloaded or incorrect`,V.$.Warning),[];if(0===U.events.length)return[];const F=[];for(let j=0;jk===B.name));-1!==$&&(F.push(new G.spine.Event(-1,U.events[$])),U.animations.forEach((B=>{B.timelines.forEach((B=>{B instanceof G.spine.EventTimeline&&F.push(...B.events.filter((B=>B.data.name===k)))}))})))}return F}}},32154:(k,B,U)=>{"use strict";U.d(B,{A:()=>H});var F=U(68910),G=U(48368),j=U(5191),$=U(80267);class H{static isDefined(k){return null!=k}static generateGUID(){let k=Date.now();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(k+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(B=>{const U=(k+16*Math.random())%16|0;return k=Math.floor(k/16),("x"===B?U:3&U|8).toString(16)}))}static isGuid(k){if(!k)return!1;return/^[A-F\d]{8}-[A-F\d]{4}-4[A-F\d]{3}-[89AB][A-F\d]{3}-[A-F\d]{12}$/i.test(k)}static bufferToUtf8String(k){let B=0;const U=[];for(;B127)if(F>191&&F<224){if(B>=k.length)return $.V.log("JsonResponseInterceptor - Incomplete 2 byte sequence",j.$.Error),null;F=(31&F)<<6|63&k[B++]}else if(F>223&&F<240){if(B+1>=k.length)return $.V.log("JsonResponseInterceptor - Incomplete 3 byte sequence",j.$.Error),null;F=(15&F)<<12|(63&k[B++])<<6|63&k[B++]}else{if(!(F>239&&F<248))return $.V.log(`JsonResponseInterceptor - Invalid multi-byte start 0x${F.toString(16)}`,j.$.Error),null;if(B+2>=k.length&&B+1>=k.length)return $.V.log("JsonResponseInterceptor - Incomplete 4 byte sequence",j.$.Error),null;F=(7&F)<<18|(63&k[B++])<<12|(63&k[B++])<<6|63&k[B++]}if(F<=65535)U.push(String.fromCharCode(F));else{if(!(F<=1114111))return $.V.log(`JSON conversion code 0x${F.toString(16)} could not be decoded`,j.$.Error),null;F-=65536,U.push(String.fromCharCode(F>>10|55296)),U.push(String.fromCharCode(1023&F|56320))}}return U.join("")}static utf8StringToBuffer(k){let B=0;const U=new Uint8Array(4*k.length);for(let F=0;F!==k.length;++F){let G=k.charCodeAt(F);if(G<128)U[B++]=G;else{if(G<2048)U[B++]=G>>6|192;else{if(G>55295&&G<56320){if(++F>=k.length)return $.V.log("UTF-8 encode: incomplete surrogate pair",j.$.Error),null;const H=k.charCodeAt(F);if(H<56320||H>57343)return $.V.log(`UTF-8 encode: second surrogate character 0x${H.toString(16)} at index ${F} out of range`,j.$.Error),null;G=((1023&G)<<10)+(1023&H)+65536,U[B++]=G>>18|240,U[B++]=G>>12&63|128}else U[B++]=G>>12|224;U[B++]=G>>6&63|128}U[B++]=63&G|128}}return new Uint8Array(U.buffer.slice(0,B))}static toggleDisplayObjSmooth(k,B){if(k&&((k instanceof F.Sprite||k instanceof F.TilingSprite)&&G.q.setSmoothed(k.texture,B),k instanceof F.Container))for(let U=0;U=G.length)switch(F){case 1:G=new Array(B+1-G.length).join(U)+G;break;case 3:const F=Math.ceil((j=B-G.length)/2);G=new Array(j-F+1).join(U)+G+new Array(F+1).join(U);break;default:G=k+new Array(B+1-G.length).join(U)}return G}static getUrlVariable(k){const B={};return window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,((k,U,F)=>B[U]=F)),B[k]}static setOuterWidth(k,B){k.style.width=B-(k.style.paddingLeft?parseInt(k.style.paddingLeft):0)-(k.style.paddingRight?parseInt(k.style.paddingRight):0)-(k.style.borderLeftWidth?parseInt(k.style.borderLeftWidth):0)-(k.style.borderRightWidth?parseInt(k.style.borderRightWidth):0)+"px"}static setOuterHeight(k,B){k.style.height=B-(k.style.paddingTop?parseInt(k.style.paddingTop):0)-(k.style.paddingBottom?parseInt(k.style.paddingBottom):0)-(k.style.borderTopWidth?parseInt(k.style.borderTopWidth):0)-(k.style.borderBottomWidth?parseInt(k.style.borderBottomWidth):0)+"px"}static getCenteredXY(k,B,U,G,j,$){return new F.Point(U+.5*(j-k),G+.5*($-B))}static wrapArrayIndex(k,B){if(B<=0)return null;let U=k;for(;U<0;)U+=B;for(;U>=B;)U-=B;return U}static equalArrayContents(k,B){if(k===B)return!0;if(null===k||null===B)return!1;if(k.length!==B.length)return!1;const U=[...k];for(const F of B)if(!this.removeFromArray(F,U))return!1;return!(U.length>0)}static removeFromArray(k,B,U=((k,B)=>k===B)){for(let F=0;Fthis.removeFromArray(k,F,U))),F}static swapArrayIndex(k,B,U){const F=k[B];k[B]=k[U],k[U]=F}static getSequentialArrayValuesCount(k,B,U,F){const G=void 0!==F?U+F:k.length;let j=U;for(;j{"use strict";U.d(B,{b:()=>G});var F=U(8674);class G{get[Symbol.toStringTag](){return"ResolvablePromise"}constructor(){this.promise=new Promise(((k,B)=>{this.resolve=k,this.reject=B}))}then(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return this.promise.then(k,B)}))}catch(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.promise.catch(k)}))}finally(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.promise.finally(k)}))}}},1788:(k,B,U)=>{"use strict";U.d(B,{A:()=>nt});var F=U(8674);const G=Symbol("Comlink.proxy"),j=Symbol("Comlink.endpoint"),$=Symbol("Comlink.releaseProxy"),H=new WeakSet,V=new Map([["proxy",{canHandle:k=>k&&k[G],serialize(k){const{port1:B,port2:U}=new MessageChannel;return W(k,B),[U,[U]]},deserialize:k=>(k.start(),K(k))}],["throw",{canHandle:k=>H.has(k),serialize(k){const B=k instanceof Error;let U=k;return B&&(U={isError:B,message:k.message,stack:k.stack}),[U,[]]},deserialize(k){if(k.isError)throw Object.assign(new Error,k);throw k}}]]);function W(k,B=self){B.addEventListener("message",(function U(F){if(!F||!F.data)return;const{id:j,type:$,path:V}=Object.assign({path:[]},F.data),K=(F.data.argumentList||[]).map(J);let z;try{const B=V.slice(0,-1).reduce(((k,B)=>k[B]),k),U=V.reduce(((k,B)=>k[B]),k);switch($){case 0:z=U;break;case 1:B[V.slice(-1)[0]]=J(F.data.value),z=!0;break;case 2:z=U.apply(B,K);break;case 3:z=function(k){return Object.assign(k,{[G]:!0})}(new U(...K));break;case 4:{const{port1:B,port2:U}=new MessageChannel;W(k,U),z=function(k,B){return X.set(k,B),k}(B,[B])}break;case 5:z=void 0}}catch(e){z=e,H.add(e)}Promise.resolve(z).catch((k=>(H.add(k),k))).then((k=>{const[F,G]=Z(k);B.postMessage(Object.assign(Object.assign({},F),{id:j}),G),5===$&&(B.removeEventListener("message",U),q(B))}))})),B.start&&B.start()}function q(k){(function(k){return"MessagePort"===k.constructor.name})(k)&&k.close()}function K(k){return Y(k)}function z(k){if(k)throw new Error("Proxy has been released and is not useable")}function Y(k,B=[]){let U=!1;const F=new Proxy((function(){}),{get(G,j){if(z(U),j===$)return()=>tt(k,{type:5,path:B.map((k=>k.toString()))}).then((()=>{q(k),U=!0}));if("then"===j){if(0===B.length)return{then:()=>F};const U=tt(k,{type:0,path:B.map((k=>k.toString()))}).then(J);return U.then.bind(U)}return Y(k,[...B,j])},set(F,G,j){z(U);const[$,H]=Z(j);return tt(k,{type:1,path:[...B,G].map((k=>k.toString())),value:$},H).then(J)},apply(F,G,$){z(U);const H=B[B.length-1];if(H===j)return tt(k,{type:4}).then(J);if("bind"===H)return Y(k,B.slice(0,-1));const[V,W]=Q($);return tt(k,{type:2,path:B.map((k=>k.toString())),argumentList:V},W).then(J)},construct(F,G){z(U);const[j,$]=Q(G);return tt(k,{type:3,path:B.map((k=>k.toString())),argumentList:j},$).then(J)}});return F}function Q(k){const B=k.map(Z);return[B.map((k=>k[0])),(U=B.map((k=>k[1])),Array.prototype.concat.apply([],U))];var U}const X=new WeakMap;function Z(k){for(const[B,U]of V)if(U.canHandle(k)){const[F,G]=U.serialize(k);return[{type:3,name:B,value:F},G]}return[{type:0,value:k},X.get(k)||[]]}function J(k){switch(k.type){case 3:return V.get(k.name).deserialize(k.value);case 0:return k.value}}function tt(k,B,U){return new Promise((F=>{const G=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");k.addEventListener("message",(function B(U){U.data&&U.data.id&&U.data.id===G&&(k.removeEventListener("message",B),F(U.data))})),k.start&&k.start(),k.postMessage(Object.assign({id:G},B),U)}))}var et=U(80267),it=U(5191),st=U(32154);class nt{constructor(k){this.workerSpawner=null,this.workerInstance=null,this.workerInterface=null,this.workerSpawner=k}start(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.workerInstance){if(!this.workerInterface)return this.workerInterfacePromise}else this.workerInstance=this.workerSpawner(),this.workerInterfacePromise=new(K(this.workerInstance)),this.workerInterface=yield this.workerInterfacePromise;return Promise.resolve(this.workerInterface)}))}isReady(){return st.A.isDefined(this.workerInstance)&&st.A.isDefined(this.workerInterface)}getInterface(){return this.workerInterface}stop(){this.workerInterface?(this.workerInstance.terminate(),this.workerInstance=null,this.workerInterface=null):this.workerInterfacePromise?this.workerInterfacePromise.then((()=>{this.stop()})).catch():et.V.log("Worker has not been started",it.$.Error)}}},80632:(k,B,U)=>{"use strict";U.d(B,{m:()=>$});var F=U(8674),G=U(80267),j=U(5191);class ${constructor(k){this.workerInstance=null,this.workerCtor=null,this.workerCtor=k}start(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this.workerInstance){const k=this.workerCtor(),B=Object.keys(k),U=B.length;for(let G=0;G(0,F.sH)(this,void 0,void 0,(function*(){return Promise.resolve(B.call(k,U))}))}}this.workerInstance=k}return Promise.resolve(this.workerInstance)}))}isReady(){return null!==this.workerInstance}stop(){this.workerInstance?this.workerInstance=null:G.V.log("Worker has not been started",j.$.Error)}getInterface(){return this.workerInstance}}},15073:(k,B,U)=>{"use strict";U.d(B,{p:()=>V});var F=U(80267),G=U(5191),j=U(22070),$=U(1788),H=U(80632);class V{static createWorker(k,B){return 11===j.o.getIOSVersion()?new H.m((()=>new k)):new $.A((()=>{let k=null;try{k=new Worker(B)}catch(e){k=V.createBlobWorker([`importScripts('${B}');`])}return k}))}static createBlobWorker(k){var B,U,j;let $=null,H=null;try{const F="application/javascript";try{H=new Blob(k,{type:F})}catch(e){const j=new(null!==(U=null!==(B=window.BlobBuilder)&&void 0!==B?B:window.WebKitBlobBuilder)&&void 0!==U?U:window.MozBlobBuilder);j.append(k),H=j.getBlob(F)}const G=(null!==(j=window.URL)&&void 0!==j?j:window.webkitURL).createObjectURL(H);$=new Worker(G)}catch(V){F.V.log("Could not spawn a blob worker",G.$.Error)}return $}}},12915:(k,B,U)=>{var F,G=U(27652),j=U(77781),$=U(52769),H=U(48297),V=U(81370),W=U(80240),q=U(88904),K=U(38808),z=U(66570),Y=!1,Q=j();function X(k,B,U){var G=F.segments(k),j=F.segments(B),$=U(F.combine(G,j));return F.polygon($)}F={buildLog:function(k){return!0===k?Y=G():!1===k&&(Y=!1),!1!==Y&&Y.list},epsilon:function(k){return Q.epsilon(k)},segments:function(k){var B=$(!0,Q,Y);return k.regions.forEach(B.addRegion),{segments:B.calculate(k.inverted),inverted:k.inverted}},combine:function(k,B){return{combined:$(!1,Q,Y).calculate(k.segments,k.inverted,B.segments,B.inverted),inverted1:k.inverted,inverted2:B.inverted}},selectUnion:function(k){return{segments:V.union(k.combined,Y),inverted:k.inverted1||k.inverted2}},selectIntersect:function(k){return{segments:V.intersect(k.combined,Y),inverted:k.inverted1&&k.inverted2}},selectDifference:function(k){return{segments:V.difference(k.combined,Y),inverted:k.inverted1&&!k.inverted2}},selectDifferenceRev:function(k){return{segments:V.differenceRev(k.combined,Y),inverted:!k.inverted1&&k.inverted2}},selectXor:function(k){return{segments:V.xor(k.combined,Y),inverted:k.inverted1!==k.inverted2}},polygon:function(k){return{regions:H(k.segments,Q,Y),inverted:k.inverted}},polygonFromGeoJSON:function(k){return W.toPolygon(F,k)},polygonToGeoJSON:function(k){return W.fromPolygon(F,Q,k)},union:function(k,B){return X(k,B,F.selectUnion)},intersect:function(k,B){return X(k,B,F.selectIntersect)},difference:function(k,B){return X(k,B,F.selectDifference)},differenceRev:function(k,B){return X(k,B,F.selectDifferenceRev)},xor:function(k,B){return X(k,B,F.selectXor)},isConvex:function(k){return k.regions.every((function(k){return q.isConvex(k)}))},makeConvex:function(k){var B=[];return k.regions.forEach((function(k){var U=[];k.forEach((function(k){U.push(k[0]),U.push(k[1])}));for(var F=z(U),G=0;G{k.exports=function(){var k,B=0,U=!1;function F(B,U){return k.list.push({type:B,data:U?JSON.parse(JSON.stringify(U)):void 0}),k}return k={list:[],segmentId:function(){return B++},checkIntersection:function(k,B){return F("check",{seg1:k,seg2:B})},segmentChop:function(k,B){return F("div_seg",{seg:k,pt:B}),F("chop",{seg:k,pt:B})},statusRemove:function(k){return F("pop_seg",{seg:k})},segmentUpdate:function(k){return F("seg_update",{seg:k})},segmentNew:function(k,B){return F("new_seg",{seg:k,primary:B})},segmentRemove:function(k){return F("rem_seg",{seg:k})},tempStatus:function(k,B,U){return F("temp_status",{seg:k,above:B,below:U})},rewind:function(k){return F("rewind",{seg:k})},status:function(k,B,U){return F("status",{seg:k,above:B,below:U})},vert:function(B){return B===U?k:(U=B,F("vert",{x:B}))},log:function(k){return"string"!=typeof k&&(k=JSON.stringify(k,!1," ")),F("log",{txt:k})},reset:function(){return F("reset")},selected:function(k){return F("selected",{segs:k})},chainStart:function(k){return F("chain_start",{seg:k})},chainRemoveHead:function(k,B){return F("chain_rem_head",{index:k,pt:B})},chainRemoveTail:function(k,B){return F("chain_rem_tail",{index:k,pt:B})},chainNew:function(k,B){return F("chain_new",{pt1:k,pt2:B})},chainMatch:function(k){return F("chain_match",{index:k})},chainClose:function(k){return F("chain_close",{index:k})},chainAddHead:function(k,B){return F("chain_add_head",{index:k,pt:B})},chainAddTail:function(k,B){return F("chain_add_tail",{index:k,pt:B})},chainConnect:function(k,B){return F("chain_con",{index1:k,index2:B})},chainReverse:function(k){return F("chain_rev",{index:k})},chainJoin:function(k,B){return F("chain_join",{index1:k,index2:B})},done:function(){return F("done")}}}},88904:(k,B,U)=>{var F=U(58811),G=2*Math.PI,j=.5*Math.PI,$=function(k,B,U){for(var G=[],j=B;j!==U+1;++j)j=F.normalizeIndex(k,j),G.push(k[j]);return G},H=function(k,B,U){return[$(k,B,U),$(k,U,B)]},V=function(k){for(;k<=-Math.PI;)k+=G;for(;k>Math.PI;)k-=G;return k},W={isConvex:function(k){if(k.length<3)return!1;for(var B,U=k[k.length-2],F=k[k.length-1],j=U[0],$=U[1],H=F[0],W=F[1],q=Math.atan2(W-$,H-j),K=0,z=0;z0?1:-1}else if(B*X<0)return!1;K+=X}}return 1===Math.abs(Math.round(K/G))},makeConvex:function(k){if(k.length<3)return[];if(3===k.length)return[k];var B=function(k){if(k.length<3)return 0;for(var B=k[k.length-2],U=k[k.length-1],F=B[0],j=B[1],$=U[0],H=U[1],V=Math.atan2(H-j,$-F),W=0,q=0;qMath.PI;)Y-=G;W+=Y}}return Math.round(W/G)}(k);if(1!==Math.abs(B))throw"Convex.makeConvex does not support complex polygons. Poly given was: "+JSON.stringify(k);for(var U,$,W=k[k.length-2],q=k[k.length-1],K=W[0],z=W[1],Y=q[0],Q=q[1],X=Math.atan2(Q-z,Y-K),Z=!1,J=0,tt=0;tt-J=0&&(void 0===$||Math.abs(V(it-$)){k.exports=function(k){"number"!=typeof k&&(k=1e-10);var B={epsilon:function(B){return"number"==typeof B&&(k=B),k},pointAboveOrOnLine:function(B,U,F){var G=U[0],j=U[1],$=F[0],H=F[1],V=B[0];return($-G)*(B[1]-j)-(H-j)*(V-G)>=-k},pointBetween:function(B,U,F){var G=B[1]-U[1],j=F[0]-U[0],$=B[0]-U[0],H=F[1]-U[1],V=$*j+G*H;return!(V-k)},pointsSameX:function(B,U){return Math.abs(B[0]-U[0])k!=$-G>k&&(j-W)*(G-q)/($-q)+W-F>k&&(H=!H),j=W,$=q}return H}};return B}},80240:k=>{var B={toPolygon:function(k,B){function U(B){if(B.length<=0)return k.segments({inverted:!1,regions:[]});function U(B){var U=B.slice(0,B.length-1);return k.segments({inverted:!1,regions:[U]})}for(var F=U(B[0]),G=1;G{var F=U(64691);k.exports=function(k,B,U){function G(k,B,F){return{id:U?U.segmentId():-1,start:k,end:B,myFill:{above:F.myFill.above,below:F.myFill.below},otherFill:null}}var j=F.create();function $(k,U){j.insertBefore(k,(function(F){return function(k,U,F,G,j,$){var H=B.pointsCompare(U,j);return 0!==H?H:B.pointsSame(F,$)?0:k!==G?k?1:-1:B.pointAboveOrOnLine(F,G?j:$,G?$:j)?1:-1}(k.isStart,k.pt,U,F.isStart,F.pt,F.other.pt)<0}))}function H(k,B){var U=function(k,B){var U=F.node({isStart:!0,pt:k.start,seg:k,primary:B,other:null,status:null});return $(U,k.end),U}(k,B);return function(k,B,U){var G=F.node({isStart:!1,pt:B.end,seg:B,primary:U,other:k,status:null});k.other=G,$(G,k.pt)}(U,k,B),U}function V(k,B){var F=G(B,k.seg.end,k.seg);return function(k,B){U&&U.segmentChop(k.seg,B),k.other.remove(),k.seg.end=B,k.other.pt=B,$(k.other,k.pt)}(k,B),H(F,k.primary)}function W(G,$){var H=F.create();function W(k){return H.findTransition((function(U){var F,G,j,$,H,V;return(F=k,G=U.ev,j=F.seg.start,$=F.seg.end,H=G.seg.start,V=G.seg.end,B.pointsCollinear(j,H,V)?B.pointsCollinear($,H,V)||B.pointAboveOrOnLine($,H,V)?1:-1:B.pointAboveOrOnLine(j,H,V)?1:-1)>0}))}function q(k,F){var G=k.seg,j=F.seg,$=G.start,H=G.end,W=j.start,q=j.end;U&&U.checkIntersection(G,j);var K=B.linesIntersect($,H,W,q);if(!1===K){if(!B.pointsCollinear($,H,W))return!1;if(B.pointsSame($,q)||B.pointsSame(H,W))return!1;var z=B.pointsSame($,W),Y=B.pointsSame(H,q);if(z&&Y)return F;var Q=!z&&B.pointBetween($,W,q),X=!Y&&B.pointBetween(H,W,q);if(z)return X?V(F,H):V(k,q),F;Q&&(Y||(X?V(F,H):V(k,q)),V(F,$))}else 0===K.alongA&&(-1===K.alongB?V(k,W):0===K.alongB?V(k,K.pt):1===K.alongB&&V(k,q)),0===K.alongB&&(-1===K.alongA?V(F,$):0===K.alongA?V(F,K.pt):1===K.alongA&&V(F,H));return!1}for(var K=[];!j.isEmpty();){var z=j.getHead();if(U&&U.vert(z.pt[0]),z.isStart){U&&U.segmentNew(z.seg,z.primary);var Y=W(z),Q=Y.before?Y.before.ev:null,X=Y.after?Y.after.ev:null;function Z(){if(Q){var k=q(z,Q);if(k)return k}return!!X&&q(z,X)}U&&U.tempStatus(z.seg,!!Q&&Q.seg,!!X&&X.seg);var J,tt=Z();if(tt){var et;if(k)(et=null===z.seg.myFill.below||z.seg.myFill.above!==z.seg.myFill.below)&&(tt.seg.myFill.above=!tt.seg.myFill.above);else tt.seg.otherFill=z.seg.myFill;U&&U.segmentUpdate(tt.seg),z.other.remove(),z.remove()}if(j.getHead()!==z){U&&U.rewind(z.seg);continue}if(k)et=null===z.seg.myFill.below||z.seg.myFill.above!==z.seg.myFill.below,z.seg.myFill.below=X?X.seg.myFill.above:G,z.seg.myFill.above=et?!z.seg.myFill.below:z.seg.myFill.below;else if(null===z.seg.otherFill)J=X?z.primary===X.primary?X.seg.otherFill.above:X.seg.myFill.above:z.primary?$:G,z.seg.otherFill={above:J,below:J};U&&U.status(z.seg,!!Q&&Q.seg,!!X&&X.seg),z.other.status=Y.insert(F.node({ev:z}))}else{var it=z.status;if(null===it)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(H.exists(it.prev)&&H.exists(it.next)&&q(it.prev.ev,it.next.ev),U&&U.statusRemove(it.ev.seg),it.remove(),!z.primary){var st=z.seg.myFill;z.seg.myFill=z.seg.otherFill,z.seg.otherFill=st}K.push(z.seg)}j.getHead().remove()}return U&&U.done(),K}return k?{addRegion:function(k){for(var F,G,j,$=k[k.length-1],V=0;V{k.exports={create:function(){var k={root:{root:!0,next:null},exists:function(B){return null!==B&&B!==k.root},isEmpty:function(){return null===k.root.next},getHead:function(){return k.root.next},insertBefore:function(B,U){for(var F=k.root,G=k.root.next;null!==G;){if(U(G))return B.prev=G.prev,B.next=G,G.prev.next=B,void(G.prev=B);F=G,G=G.next}F.next=B,B.prev=F,B.next=null},findTransition:function(B){for(var U=k.root,F=k.root.next;null!==F&&!B(F);)U=F,F=F.next;return{before:U===k.root?null:U,after:F,insert:function(k){return k.prev=U,k.next=F,U.next=k,null!==F&&(F.prev=k),k}}}};return k},node:function(k){return k.prev=null,k.next=null,k.remove=function(){k.prev.next=k.next,k.next&&(k.next.prev=k.prev),k.prev=null,k.next=null},k}}},48297:k=>{k.exports=function(k,B,U){var F=[],G=[];return k.forEach((function(k){var j=k.start,$=k.end;if(B.pointsSame(j,$))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{U&&U.chainStart(k);for(var H={index:0,matches_head:!1,matches_pt1:!1},V={index:0,matches_head:!1,matches_pt1:!1},W=H,q=0;q{function B(k,B,U){var F=[];return k.forEach((function(k){var G=(k.myFill.above?8:0)+(k.myFill.below?4:0)+(k.otherFill&&k.otherFill.above?2:0)+(k.otherFill&&k.otherFill.below?1:0);0!==B[G]&&F.push({id:U?U.segmentId():-1,start:k.start,end:k.end,myFill:{above:1===B[G],below:2===B[G]},otherFill:null})})),U&&U.selected(F),F}var U={union:function(k,U){return B(k,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],U)},intersect:function(k,U){return B(k,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],U)},difference:function(k,U){return B(k,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],U)},differenceRev:function(k,U){return B(k,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],U)},xor:function(k,U){return B(k,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],U)}};k.exports=U},38808:(k,B,U)=>{var F=U(58811),G=function(k,B,U){var F=B[0]-k[0],G=B[1]-k[1],j=U[0]-k[0];return F*(U[1]-k[1])-G*j},j={regionContains:function(k,B){for(var U=0;U0!=j>0)return!1}return!0},carve:function(k,B){for(var U,j,$,H,V,W=k[k.length-1],q=1/0,K=0;K0===G(B[0],B[1],B[2])>0;for(K=0;K{k.exports={normalizeIndex:function(k,B){for(;B<0;)B+=k.length;for(;B>=k.length;)B-=k.length;return B}}},3332:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(43342);(0,F.__exportStar)(U(97860),B),(0,F.__exportStar)(U(14435),B)},97860:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.Multiplayer=void 0;var F=U(43342),G=U(14435),j=(0,F.__importDefault)(U(39454)),$=(0,F.__importStar)(U(78686)),H=function(){function k(k,B){this._maxAuthRetries=5,this._authRetries=0,this._wasDisconnected=!1,this._moveOnAreaPerChannel=!1,$.defaults.storage=sessionStorage,this._clientID=k,this._multiplayerURL=B;var U=new URL(this._multiplayerURL),F=U.hostname,G=U.port.length>0?parseInt(U.port,10):void 0,H=U.protocol.startsWith("https");this.cleanupOldToken(),this._client=j.default.create({hostname:F,path:"/prodigy-synapse/socketcluster/",port:G,secure:H,autoConnect:!1,authTokenName:"".concat(this._clientID,"-socketcluster.authToken"),autoReconnectOptions:{randomness:0,initialDelay:500,maxDelay:1e4}})}return k.prototype.connect=function(){this._client.connect(),this.onDeauthenticated()},k.prototype.getChannelName=function(k){return k.startsWith(this._clientID)?k:"".concat(this._clientID,"-").concat(k)},k.prototype.authenticate=function(k){return(0,F.__awaiter)(this,void 0,void 0,(function(){return(0,F.__generator)(this,(function(B){switch(B.label){case 0:return[4,Promise.all([this._client.invoke("login",{token:k}),this._client.listener("authenticate").once()])];case 1:return B.sent(),this._authRetries=0,[2]}}))}))},k.prototype.enableMoveOnAreaPerChannel=function(){this._moveOnAreaPerChannel=!0},k.prototype.subscribe=function(k,B){return(0,F.__awaiter)(this,void 0,void 0,(function(){var U,G,j,$;return(0,F.__generator)(this,(function(F){return U=this.getChannelName(k),G=this._client.subscribe(U).createConsumer(),j=this._client.receiver("messageHistory").createConsumer(),$=this._client.receiver("channelData").createConsumer(),this.processSubscriptionEvents(G,B),this.processSubscriptionEvents($,B),this.processHistoryEvents(j,B),[2]}))}))},k.prototype.processSubscriptionEvents=function(B,U){var G,j,$,H,V,W;return(0,F.__awaiter)(this,void 0,void 0,(function(){var q,K;return(0,F.__generator)(this,(function(z){switch(z.label){case 0:z.trys.push([0,5,6,11]),G=(0,F.__asyncValues)(B),z.label=1;case 1:return[4,G.next()];case 2:if((j=z.sent()).done)return[3,4];(q=j.value).type===k.BroadcastActionType&&null!==(null===(V=q)||void 0===V?void 0:V.messageID)&&this.setLatestBroadcastMessage(null!==(W=q.messageID)&&void 0!==W?W:0),U(q),z.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return K=z.sent(),$={error:K},[3,11];case 6:return z.trys.push([6,,9,10]),j&&!j.done&&(H=G.return)?[4,H.call(G)]:[3,8];case 7:z.sent(),z.label=8;case 8:return[3,10];case 9:if($)throw $.error;return[7];case 10:return[7];case 11:return[2]}}))}))},k.prototype.processHistoryEvents=function(k,B){var U,G,j,$;return(0,F.__awaiter)(this,void 0,void 0,(function(){var H,V,W,q,K,z,Y,Q;return(0,F.__generator)(this,(function(X){switch(X.label){case 0:X.trys.push([0,5,6,11]),U=(0,F.__asyncValues)(k),X.label=1;case 1:return[4,U.next()];case 2:if((G=X.sent()).done)return[3,4];if(void 0===(H=G.value).messageHistory||null===H.messageHistory)return[3,3];try{for(Y=void 0,V=(0,F.__values)(H.messageHistory),W=V.next();!W.done;W=V.next())(q=W.value).id>this.getLatestBroadcastMessage()&&(K={type:"broadcastAction",userID:H.userID,actionInfo:q.messageBody,messageID:q.id},this.setLatestBroadcastMessage(q.id),B(K))}catch(Z){Y={error:Z}}finally{try{W&&!W.done&&(Q=V.return)&&Q.call(V)}finally{if(Y)throw Y.error}}X.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return z=X.sent(),j={error:z},[3,11];case 6:return X.trys.push([6,,9,10]),G&&!G.done&&($=U.return)?[4,$.call(U)]:[3,8];case 7:X.sent(),X.label=8;case 8:return[3,10];case 9:if(j)throw j.error;return[7];case 10:return[7];case 11:return[2]}}))}))},k.prototype.userListReceiver=function(k){var B,U;return(0,F.__awaiter)(this,void 0,void 0,(function(){var G,j,$,H;return(0,F.__generator)(this,(function(V){switch(V.label){case 0:V.trys.push([0,5,6,11]),G=(0,F.__asyncValues)(this._client.receiver("userList")),V.label=1;case 1:return[4,G.next()];case 2:if((j=V.sent()).done)return[3,4];$=j.value,k($),V.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return H=V.sent(),B={error:H},[3,11];case 6:return V.trys.push([6,,9,10]),j&&!j.done&&(U=G.return)?[4,U.call(G)]:[3,8];case 7:V.sent(),V.label=8;case 8:return[3,10];case 9:if(B)throw B.error;return[7];case 10:return[7];case 11:return[2]}}))}))},k.prototype.subscribedReceiver=function(k){var B,U;return(0,F.__awaiter)(this,void 0,void 0,(function(){var G,j,$,H;return(0,F.__generator)(this,(function(V){switch(V.label){case 0:V.trys.push([0,5,6,11]),G=(0,F.__asyncValues)(this._client.receiver("subscribed")),V.label=1;case 1:return[4,G.next()];case 2:if((j=V.sent()).done)return[3,4];$=j.value,k($),V.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return H=V.sent(),B={error:H},[3,11];case 6:return V.trys.push([6,,9,10]),j&&!j.done&&(U=G.return)?[4,U.call(G)]:[3,8];case 7:V.sent(),V.label=8;case 8:return[3,10];case 9:if(B)throw B.error;return[7];case 10:return[7];case 11:return[2]}}))}))},k.prototype.generalError=function(k){var B,U;return(0,F.__awaiter)(this,void 0,void 0,(function(){var G,j,$,H;return(0,F.__generator)(this,(function(V){switch(V.label){case 0:V.trys.push([0,5,6,11]),G=(0,F.__asyncValues)(this._client.listener("error")),V.label=1;case 1:return[4,G.next()];case 2:if((j=V.sent()).done)return[3,4];if("Socket hung up"===($=j.value.error).message)return[3,3];k($),V.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return H=V.sent(),B={error:H},[3,11];case 6:return V.trys.push([6,,9,10]),j&&!j.done&&(U=G.return)?[4,U.call(G)]:[3,8];case 7:V.sent(),V.label=8;case 8:return[3,10];case 9:if(B)throw B.error;return[7];case 10:return[7];case 11:return[2]}}))}))},k.prototype.disconnectError=function(k){var B,U;return(0,F.__awaiter)(this,void 0,void 0,(function(){var G,j,$,H;return(0,F.__generator)(this,(function(V){switch(V.label){case 0:V.trys.push([0,5,6,11]),G=(0,F.__asyncValues)(this._client.listener("disconnect")),V.label=1;case 1:return[4,G.next()];case 2:if((j=V.sent()).done)return[3,4];$=j.value.reason,this._wasDisconnected=!0,k(new Error($)),V.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return H=V.sent(),B={error:H},[3,11];case 6:return V.trys.push([6,,9,10]),j&&!j.done&&(U=G.return)?[4,U.call(G)]:[3,8];case 7:V.sent(),V.label=8;case 8:return[3,10];case 9:if(B)throw B.error;return[7];case 10:return[7];case 11:return[2]}}))}))},k.prototype.subscribeFailError=function(k){var B,U;return(0,F.__awaiter)(this,void 0,void 0,(function(){var j,$,H,V,W,q,K,z,Y;return(0,F.__generator)(this,(function(Q){switch(Q.label){case 0:Q.trys.push([0,5,6,11]),j=(0,F.__asyncValues)(this._client.listener("subscribeFail")),Q.label=1;case 1:return[4,j.next()];case 2:if(($=Q.sent()).done)return[3,4];H=$.value,V=H.error,W=H.channel,G.ChannelValidator.isStatusChannelPatternMatch(W)&&(q=G.ChannelNameService.getUserIDFromStatusChannelName(W),K=V.message,z={userID:q,channel:W,message:"User ".concat(q," failed to subscribe to the status channel ").concat(W,"."),originalErrorMessage:K},V.message=JSON.stringify(z)),k(V,W),Q.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return Y=Q.sent(),B={error:Y},[3,11];case 6:return Q.trys.push([6,,9,10]),$&&!$.done&&(U=j.return)?[4,U.call(j)]:[3,8];case 7:Q.sent(),Q.label=8;case 8:return[3,10];case 9:if(B)throw B.error;return[7];case 10:return[7];case 11:return[2]}}))}))},k.prototype.onDeauthenticated=function(){var k,B;return(0,F.__awaiter)(this,void 0,void 0,(function(){var U,G,j,H;return(0,F.__generator)(this,(function(V){switch(V.label){case 0:V.trys.push([0,6,7,12]),U=(0,F.__asyncValues)(this._client.listener("deauthenticate")),V.label=1;case 1:return[4,U.next()];case 2:return(G=V.sent()).done?[3,5]:(G.value,j=$.get(),this._authRetries<=this._maxAuthRetries?(this._authRetries+=1,[4,this.authenticate(j)]):[3,4]);case 3:V.sent(),V.label=4;case 4:return[3,1];case 5:return[3,12];case 6:return H=V.sent(),k={error:H},[3,12];case 7:return V.trys.push([7,,10,11]),G&&!G.done&&(B=U.return)?[4,B.call(U)]:[3,9];case 8:V.sent(),V.label=9;case 9:return[3,11];case 10:if(k)throw k.error;return[7];case 11:return[7];case 12:return[2]}}))}))},k.prototype.onReconnect=function(k){var B,U;return(0,F.__awaiter)(this,void 0,void 0,(function(){var G,j,$,H;return(0,F.__generator)(this,(function(V){switch(V.label){case 0:V.trys.push([0,5,6,11]),G=(0,F.__asyncValues)(this._client.listener("connect")),V.label=1;case 1:return[4,G.next()];case 2:if((j=V.sent()).done)return[3,4];j.value,$=this._wasDisconnected,this._wasDisconnected=!1,$&&k(),V.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return H=V.sent(),B={error:H},[3,11];case 6:return V.trys.push([6,,9,10]),j&&!j.done&&(U=G.return)?[4,U.call(G)]:[3,8];case 7:V.sent(),V.label=8;case 8:return[3,10];case 9:if(B)throw B.error;return[7];case 10:return[7];case 11:return[2]}}))}))},k.prototype.unsubscribe=function(k){return(0,F.__awaiter)(this,void 0,void 0,(function(){var B;return(0,F.__generator)(this,(function(U){return B=this.getChannelName(k),this._client.closeChannel(B),[2,this._client.unsubscribe(B)]}))}))},k.prototype.moveOnArea=function(k,B){return(0,F.__awaiter)(this,void 0,void 0,(function(){var U;return(0,F.__generator)(this,(function(G){return U=this.getChannelName(k),this._moveOnAreaPerChannel?this._client.transmit("moveOnArea-".concat(k),(0,F.__assign)((0,F.__assign)({},B),{channel:U})):this._client.transmit("moveOnArea",(0,F.__assign)((0,F.__assign)({},B),{channel:U})),[2]}))}))},k.prototype.addNotificationListener=function(k){return(0,F.__awaiter)(this,void 0,void 0,(function(){var B,U;return(0,F.__generator)(this,(function(F){return(B=this.getNotificationChannelName())?(U=this._client.subscribe(B).createConsumer(),[2,this.processSubscriptionEvents(U,k)]):[2]}))}))},k.prototype.addStatusListener=function(k,B){return(0,F.__awaiter)(this,void 0,void 0,(function(){var U,j,$,H,V,W;return(0,F.__generator)(this,(function(q){try{for(U=(0,F.__values)(k),j=U.next();!j.done;j=U.next())$=j.value,H=G.ChannelNameService.getStatusChannelName(this._clientID,$),this.subscribe(H,B)}catch(K){V={error:K}}finally{try{j&&!j.done&&(W=U.return)&&W.call(U)}finally{if(V)throw V.error}}return[2]}))}))},k.prototype.getNotificationChannelName=function(){var k,B;return null===(B=null===(k=this._client)||void 0===k?void 0:k.authToken)||void 0===B?void 0:B.notificationChannelName},k.prototype.getLatestBroadcastMessage=function(){var k;return Number.parseInt(null!==(k=window.localStorage.getItem("latestHistoryMessage"))&&void 0!==k?k:"0")},k.prototype.setLatestBroadcastMessage=function(k){window.localStorage.setItem("latestHistoryMessage",k.toString())},k.prototype.cleanupOldToken=function(){window.localStorage.removeItem("".concat(this._clientID,"-socketcluster.authToken"))},k.prototype.addClientBroadcastListener=function(k){return(0,F.__awaiter)(this,void 0,void 0,(function(){var B,U;return(0,F.__generator)(this,(function(F){return B=G.ChannelNameService.getClientBroadcastChannelName(this._clientID),U=this._client.subscribe(B).createConsumer(),[2,this.processSubscriptionEvents(U,k)]}))}))},k.BroadcastActionType="broadcastAction",k}();B.Multiplayer=H},63384:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},37446:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.EClientID=void 0,function(k){k.MATH="1",k.ELA="ela-game"}(B.EClientID||(B.EClientID={}))},7107:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},4498:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},57094:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},88789:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.ChannelNameService=void 0;var U=function(){function k(){}return k.getStatusChannelName=function(k,B){return"".concat(k,"-").concat(B,"-status")},k.getUserIDFromStatusChannelName=function(k){var B=k.split("-");return B[B.length-2]},k.getClientBroadcastChannelName=function(k){return"".concat(k,"-client-broadcast")},k}();B.ChannelNameService=U},60286:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},48276:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.ChannelValidator=void 0;var F=U(37446),G=function(){function k(){}return k.isStatusChannel=function(k){if(!k)return!1;var B=k.channelName;return!!B&&(!!this.isStatusChannelPatternMatch(B)&&!(!k.isPrivate||!k.owner))},k.isStatusChannelPatternMatch=function(k){if(!k)return!1;var B=this.getGameClientIDsAsString(),U="^(".concat(B,")-(\\d*)-status$");return new RegExp(U).test(k)},k.getGameClientIDsAsString=function(){return Object.values(F.EClientID).join("|")},k}();B.ChannelValidator=G},14435:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(43342);(0,F.__exportStar)(U(63384),B),(0,F.__exportStar)(U(57094),B),(0,F.__exportStar)(U(7107),B),(0,F.__exportStar)(U(4498),B),(0,F.__exportStar)(U(60286),B),(0,F.__exportStar)(U(88789),B),(0,F.__exportStar)(U(48276),B),(0,F.__exportStar)(U(37446),B)},43342:(k,B,U)=>{"use strict";U.r(B),U.d(B,{__assign:()=>j,__asyncDelegator:()=>st,__asyncGenerator:()=>it,__asyncValues:()=>nt,__await:()=>et,__awaiter:()=>q,__classPrivateFieldGet:()=>ct,__classPrivateFieldSet:()=>dt,__createBinding:()=>z,__decorate:()=>H,__exportStar:()=>Y,__extends:()=>G,__generator:()=>K,__importDefault:()=>ht,__importStar:()=>ot,__makeTemplateObject:()=>at,__metadata:()=>W,__param:()=>V,__read:()=>X,__rest:()=>$,__spread:()=>Z,__spreadArray:()=>tt,__spreadArrays:()=>J,__values:()=>Q});var F=function(k,B){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,B){k.__proto__=B}||function(k,B){for(var U in B)Object.prototype.hasOwnProperty.call(B,U)&&(k[U]=B[U])})(k,B)};function G(k,B){if("function"!=typeof B&&null!==B)throw new TypeError("Class extends value "+String(B)+" is not a constructor or null");function U(){this.constructor=k}F(k,B),k.prototype=null===B?Object.create(B):(U.prototype=B.prototype,new U)}var j=function(){return(j=Object.assign||function(k){for(var B,U=1,F=arguments.length;U=0;H--)(G=k[H])&&($=(j<3?G($):j>3?G(B,U,$):G(B,U))||$);return j>3&&$&&Object.defineProperty(B,U,$),$}function V(k,B){return function(U,F){B(U,F,k)}}function W(k,B){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,B)}function q(k,B,U,F){return new(U||(U=Promise))((function(G,j){function $(k){try{V(F.next(k))}catch(e){j(e)}}function H(k){try{V(F.throw(k))}catch(e){j(e)}}function V(k){var B;k.done?G(k.value):(B=k.value,B instanceof U?B:new U((function(k){k(B)}))).then($,H)}V((F=F.apply(k,B||[])).next())}))}function K(k,B){var U,F,G,j,$={label:0,sent:function(){if(1&G[0])throw G[1];return G[1]},trys:[],ops:[]};return j={next:H(0),throw:H(1),return:H(2)},"function"==typeof Symbol&&(j[Symbol.iterator]=function(){return this}),j;function H(j){return function(H){return function(j){if(U)throw new TypeError("Generator is already executing.");for(;$;)try{if(U=1,F&&(G=2&j[0]?F.return:j[0]?F.throw||((G=F.return)&&G.call(F),0):F.next)&&!(G=G.call(F,j[1])).done)return G;switch(F=0,G&&(j=[2&j[0],G.value]),j[0]){case 0:case 1:G=j;break;case 4:return $.label++,{value:j[1],done:!1};case 5:$.label++,F=j[1],j=[0];continue;case 7:j=$.ops.pop(),$.trys.pop();continue;default:if(!(G=$.trys,(G=G.length>0&&G[G.length-1])||6!==j[0]&&2!==j[0])){$=0;continue}if(3===j[0]&&(!G||j[1]>G[0]&&j[1]=k.length&&(k=void 0),{value:k&&k[F++],done:!k}}};throw new TypeError(B?"Object is not iterable.":"Symbol.iterator is not defined.")}function X(k,B){var U="function"==typeof Symbol&&k[Symbol.iterator];if(!U)return k;var F,G,j=U.call(k),$=[];try{for(;(void 0===B||B-- >0)&&!(F=j.next()).done;)$.push(F.value)}catch(H){G={error:H}}finally{try{F&&!F.done&&(U=j.return)&&U.call(j)}finally{if(G)throw G.error}}return $}function Z(){for(var k=[],B=0;B1||H(k,B)}))})}function H(k,B){try{(U=G[k](B)).value instanceof et?Promise.resolve(U.value.v).then(V,W):q(j[0][2],U)}catch(e){q(j[0][3],e)}var U}function V(k){H("next",k)}function W(k){H("throw",k)}function q(k,B){k(B),j.shift(),j.length&&H(j[0][0],j[0][1])}}function st(k){var B,U;return B={},F("next"),F("throw",(function(k){throw k})),F("return"),B[Symbol.iterator]=function(){return this},B;function F(F,G){B[F]=k[F]?function(B){return(U=!U)?{value:et(k[F](B)),done:"return"===F}:G?G(B):B}:G}}function nt(k){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var B,U=k[Symbol.asyncIterator];return U?U.call(k):(k=Q(k),B={},F("next"),F("throw"),F("return"),B[Symbol.asyncIterator]=function(){return this},B);function F(U){B[U]=k[U]&&function(B){return new Promise((function(F,G){(function(k,B,U,F){Promise.resolve(F).then((function(B){k({value:B,done:U})}),B)})(F,G,(B=k[U](B)).done,B.value)}))}}}function at(k,B){return Object.defineProperty?Object.defineProperty(k,"raw",{value:B}):k.raw=B,k}var rt=Object.create?function(k,B){Object.defineProperty(k,"default",{enumerable:!0,value:B})}:function(k,B){k.default=B};function ot(k){if(k&&k.__esModule)return k;var B={};if(null!=k)for(var U in k)"default"!==U&&Object.prototype.hasOwnProperty.call(k,U)&&z(B,k,U);return rt(B,k),B}function ht(k){return k&&k.__esModule?k:{default:k}}function ct(k,B,U,F){if("a"===U&&!F)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof B?k!==B||!F:!B.has(k))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===U?F:"a"===U?F.call(k):F?F.value:B.get(k)}function dt(k,B,U,F,G){if("m"===F)throw new TypeError("Private method is not writable");if("a"===F&&!G)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof B?k!==B||!G:!B.has(k))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===F?G.call(k,U):G?G.value=U:B.set(k,U),U}},18045:k=>{"use strict";k.exports=function(k,B){var U=new Array(arguments.length-1),F=0,G=2,j=!0;for(;G{"use strict";var U=B;U.length=function(k){var B=k.length;if(!B)return 0;for(var U=0;--B%4>1&&"="===k.charAt(B);)++U;return Math.ceil(3*k.length)/4-U};for(var F=new Array(64),G=new Array(123),j=0;j<64;)G[F[j]=j<26?j+65:j<52?j+71:j<62?j-4:j-59|43]=j++;U.encode=function(k,B,U){for(var G,j=null,$=[],H=0,V=0;B>2],G=(3&W)<<4,V=1;break;case 1:$[H++]=F[G|W>>4],G=(15&W)<<2,V=2;break;case 2:$[H++]=F[G|W>>6],$[H++]=F[63&W],V=0}H>8191&&((j||(j=[])).push(String.fromCharCode.apply(String,$)),H=0)}return V&&($[H++]=F[G],$[H++]=61,1===V&&($[H++]=61)),j?(H&&j.push(String.fromCharCode.apply(String,$.slice(0,H))),j.join("")):String.fromCharCode.apply(String,$.slice(0,H))};var $="invalid encoding";U.decode=function(k,B,U){for(var F,j=U,H=0,V=0;V1)break;if(void 0===(W=G[W]))throw Error($);switch(H){case 0:F=W,H=1;break;case 1:B[U++]=F<<2|(48&W)>>4,F=W,H=2;break;case 2:B[U++]=(15&F)<<4|(60&W)>>2,F=W,H=3;break;case 3:B[U++]=(3&F)<<6|W,H=0}}if(1===H)throw Error($);return U-j},U.test=function(k){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(k)}},24358:k=>{"use strict";function B(){this._listeners={}}k.exports=B,B.prototype.on=function(k,B,U){return(this._listeners[k]||(this._listeners[k]=[])).push({fn:B,ctx:U||this}),this},B.prototype.off=function(k,B){if(void 0===k)this._listeners={};else if(void 0===B)this._listeners[k]=[];else for(var U=this._listeners[k],F=0;F{"use strict";function B(k){return"undefined"!=typeof Float32Array?function(){var B=new Float32Array([-0]),U=new Uint8Array(B.buffer),F=128===U[3];function G(k,F,G){B[0]=k,F[G]=U[0],F[G+1]=U[1],F[G+2]=U[2],F[G+3]=U[3]}function j(k,F,G){B[0]=k,F[G]=U[3],F[G+1]=U[2],F[G+2]=U[1],F[G+3]=U[0]}function $(k,F){return U[0]=k[F],U[1]=k[F+1],U[2]=k[F+2],U[3]=k[F+3],B[0]}function H(k,F){return U[3]=k[F],U[2]=k[F+1],U[1]=k[F+2],U[0]=k[F+3],B[0]}k.writeFloatLE=F?G:j,k.writeFloatBE=F?j:G,k.readFloatLE=F?$:H,k.readFloatBE=F?H:$}():function(){function B(k,B,U,F){var G=B<0?1:0;if(G&&(B=-B),0===B)k(1/B>0?0:2147483648,U,F);else if(isNaN(B))k(2143289344,U,F);else if(B>34028234663852886e22)k((G<<31|2139095040)>>>0,U,F);else if(B<11754943508222875e-54)k((G<<31|Math.round(B/1401298464324817e-60))>>>0,U,F);else{var j=Math.floor(Math.log(B)/Math.LN2);k((G<<31|j+127<<23|8388607&Math.round(B*Math.pow(2,-j)*8388608))>>>0,U,F)}}function $(k,B,U){var F=k(B,U),G=2*(F>>31)+1,j=F>>>23&255,$=8388607&F;return 255===j?$?NaN:G*(1/0):0===j?1401298464324817e-60*G*$:G*Math.pow(2,j-150)*($+8388608)}k.writeFloatLE=B.bind(null,U),k.writeFloatBE=B.bind(null,F),k.readFloatLE=$.bind(null,G),k.readFloatBE=$.bind(null,j)}(),"undefined"!=typeof Float64Array?function(){var B=new Float64Array([-0]),U=new Uint8Array(B.buffer),F=128===U[7];function G(k,F,G){B[0]=k,F[G]=U[0],F[G+1]=U[1],F[G+2]=U[2],F[G+3]=U[3],F[G+4]=U[4],F[G+5]=U[5],F[G+6]=U[6],F[G+7]=U[7]}function j(k,F,G){B[0]=k,F[G]=U[7],F[G+1]=U[6],F[G+2]=U[5],F[G+3]=U[4],F[G+4]=U[3],F[G+5]=U[2],F[G+6]=U[1],F[G+7]=U[0]}function $(k,F){return U[0]=k[F],U[1]=k[F+1],U[2]=k[F+2],U[3]=k[F+3],U[4]=k[F+4],U[5]=k[F+5],U[6]=k[F+6],U[7]=k[F+7],B[0]}function H(k,F){return U[7]=k[F],U[6]=k[F+1],U[5]=k[F+2],U[4]=k[F+3],U[3]=k[F+4],U[2]=k[F+5],U[1]=k[F+6],U[0]=k[F+7],B[0]}k.writeDoubleLE=F?G:j,k.writeDoubleBE=F?j:G,k.readDoubleLE=F?$:H,k.readDoubleBE=F?H:$}():function(){function B(k,B,U,F,G,j){var $=F<0?1:0;if($&&(F=-F),0===F)k(0,G,j+B),k(1/F>0?0:2147483648,G,j+U);else if(isNaN(F))k(0,G,j+B),k(2146959360,G,j+U);else if(F>17976931348623157e292)k(0,G,j+B),k(($<<31|2146435072)>>>0,G,j+U);else{var H;if(F<22250738585072014e-324)k((H=F/5e-324)>>>0,G,j+B),k(($<<31|H/4294967296)>>>0,G,j+U);else{var V=Math.floor(Math.log(F)/Math.LN2);1024===V&&(V=1023),k(4503599627370496*(H=F*Math.pow(2,-V))>>>0,G,j+B),k(($<<31|V+1023<<20|1048576*H&1048575)>>>0,G,j+U)}}}function $(k,B,U,F,G){var j=k(F,G+B),$=k(F,G+U),H=2*($>>31)+1,V=$>>>20&2047,W=4294967296*(1048575&$)+j;return 2047===V?W?NaN:H*(1/0):0===V?5e-324*H*W:H*Math.pow(2,V-1075)*(W+4503599627370496)}k.writeDoubleLE=B.bind(null,U,0,4),k.writeDoubleBE=B.bind(null,F,4,0),k.readDoubleLE=$.bind(null,G,0,4),k.readDoubleBE=$.bind(null,j,4,0)}(),k}function U(k,B,U){B[U]=255&k,B[U+1]=k>>>8&255,B[U+2]=k>>>16&255,B[U+3]=k>>>24}function F(k,B,U){B[U]=k>>>24,B[U+1]=k>>>16&255,B[U+2]=k>>>8&255,B[U+3]=255&k}function G(k,B){return(k[B]|k[B+1]<<8|k[B+2]<<16|k[B+3]<<24)>>>0}function j(k,B){return(k[B]<<24|k[B+1]<<16|k[B+2]<<8|k[B+3])>>>0}k.exports=B(B)},84153:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},99390:k=>{"use strict";k.exports=function(k,B,U){var F=U||8192,G=F>>>1,j=null,$=F;return function(U){if(U<1||U>G)return k(U);$+U>F&&(j=k(F),$=0);var H=B.call(j,$,$+=U);return 7&$&&($=1+(7|$)),H}}},81447:(k,B)=>{"use strict";var U=B;U.length=function(k){for(var B=0,U=0,F=0;F191&&F<224?j[$++]=(31&F)<<6|63&k[B++]:F>239&&F<365?(F=((7&F)<<18|(63&k[B++])<<12|(63&k[B++])<<6|63&k[B++])-65536,j[$++]=55296+(F>>10),j[$++]=56320+(1023&F)):j[$++]=(15&F)<<12|(63&k[B++])<<6|63&k[B++],$>8191&&((G||(G=[])).push(String.fromCharCode.apply(String,j)),$=0);return G?($&&G.push(String.fromCharCode.apply(String,j.slice(0,$))),G.join("")):String.fromCharCode.apply(String,j.slice(0,$))},U.write=function(k,B,U){for(var F,G,j=U,$=0;$>6|192,B[U++]=63&F|128):55296==(64512&F)&&56320==(64512&(G=k.charCodeAt($+1)))?(F=65536+((1023&F)<<10)+(1023&G),++$,B[U++]=F>>18|240,B[U++]=F>>12&63|128,B[U++]=F>>6&63|128,B[U++]=63&F|128):(B[U++]=F>>12|224,B[U++]=F>>6&63|128,B[U++]=63&F|128);return U-j}},89187:(k,B,U)=>{const F=U(72237);class G extends F{constructor(k,B,U,F){super(),this.PENDING=G.PENDING,this.SUBSCRIBED=G.SUBSCRIBED,this.UNSUBSCRIBED=G.UNSUBSCRIBED,this.name=k,this.client=B,this._eventDemux=U,this._dataStream=F.stream(this.name)}createConsumer(k){return this._dataStream.createConsumer(k)}listener(k){return this._eventDemux.stream(`${this.name}/${k}`)}close(){this.client.closeChannel(this.name)}kill(){this.client.killChannel(this.name)}killOutputConsumer(k){this.hasOutputConsumer(k)&&this.client.killChannelOutputConsumer(k)}killListenerConsumer(k){this.hasAnyListenerConsumer(k)&&this.client.killChannelListenerConsumer(k)}getOutputConsumerStats(k){if(this.hasOutputConsumer(k))return this.client.getChannelOutputConsumerStats(k)}getListenerConsumerStats(k){if(this.hasAnyListenerConsumer(k))return this.client.getChannelListenerConsumerStats(k)}getBackpressure(){return this.client.getChannelBackpressure(this.name)}getListenerConsumerBackpressure(k){return this.hasAnyListenerConsumer(k)?this.client.getChannelListenerConsumerBackpressure(k):0}getOutputConsumerBackpressure(k){return this.hasOutputConsumer(k)?this.client.getChannelOutputConsumerBackpressure(k):0}closeOutput(){this.client.channelCloseOutput(this.name)}closeListener(k){this.client.channelCloseListener(this.name,k)}closeAllListeners(){this.client.channelCloseAllListeners(this.name)}killOutput(){this.client.channelKillOutput(this.name)}killListener(k){this.client.channelKillListener(this.name,k)}killAllListeners(){this.client.channelKillAllListeners(this.name)}getOutputConsumerStatsList(){return this.client.channelGetOutputConsumerStatsList(this.name)}getListenerConsumerStatsList(k){return this.client.channelGetListenerConsumerStatsList(this.name,k)}getAllListenersConsumerStatsList(){return this.client.channelGetAllListenersConsumerStatsList(this.name)}getOutputBackpressure(){return this.client.channelGetOutputBackpressure(this.name)}getListenerBackpressure(k){return this.client.channelGetListenerBackpressure(this.name,k)}getAllListenersBackpressure(){return this.client.channelGetAllListenersBackpressure(this.name)}hasOutputConsumer(k){return this.client.channelHasOutputConsumer(this.name,k)}hasListenerConsumer(k,B){return this.client.channelHasListenerConsumer(this.name,k,B)}hasAnyListenerConsumer(k){return this.client.channelHasAnyListenerConsumer(this.name,k)}get state(){return this.client.getChannelState(this.name)}set state(k){throw new Error("Cannot directly set channel state")}get options(){return this.client.getChannelOptions(this.name)}set options(k){throw new Error("Cannot directly set channel options")}subscribe(k){this.client.subscribe(this.name,k)}unsubscribe(){this.client.unsubscribe(this.name)}isSubscribed(k){return this.client.isSubscribed(this.name,k)}transmitPublish(k){return this.client.transmitPublish(this.name,k)}invokePublish(k){return this.client.invokePublish(this.name,k)}}G.PENDING="pending",G.SUBSCRIBED="subscribed",G.UNSUBSCRIBED="unsubscribed",k.exports=G},27445:(k,B,U)=>{const F=U(97605),G=F.InvalidActionError;k.exports=function(k,B,U,j){this.socket=k,this.id=B,this.procedure=U,this.data=j,this.sent=!1,this._respond=(k,B)=>{if(this.sent)throw new G(`Response to request ${this.id} has already been sent`);this.sent=!0,this.socket.sendObject(k,B)},this.end=(k,B)=>{let U={rid:this.id};void 0!==k&&(U.data=k),this._respond(U,B)},this.error=(k,B)=>{let U={rid:this.id,error:F.dehydrateError(k)};this._respond(U,B)}}},72641:(k,B,U)=>{const F=U(47579);function G(k){this._listenerDemux=new F}G.prototype.emit=function(k,B){this._listenerDemux.write(k,B)},G.prototype.listener=function(k){return this._listenerDemux.stream(k)},G.prototype.closeListener=function(k){this._listenerDemux.close(k)},G.prototype.closeAllListeners=function(){this._listenerDemux.closeAll()},G.prototype.removeListener=function(k){this._listenerDemux.unstream(k)},G.prototype.getListenerConsumerStats=function(k){return this._listenerDemux.getConsumerStats(k)},G.prototype.getListenerConsumerStatsList=function(k){return this._listenerDemux.getConsumerStatsList(k)},G.prototype.getAllListenersConsumerStatsList=function(){return this._listenerDemux.getConsumerStatsListAll()},G.prototype.getListenerConsumerCount=function(k){return this._listenerDemux.getConsumerCount(k)},G.prototype.getAllListenersConsumerCount=function(){return this._listenerDemux.getConsumerCountAll()},G.prototype.killListener=function(k){this._listenerDemux.kill(k)},G.prototype.killAllListeners=function(){this._listenerDemux.killAll()},G.prototype.killListenerConsumer=function(k){this._listenerDemux.killConsumer(k)},G.prototype.getListenerBackpressure=function(k){return this._listenerDemux.getBackpressure(k)},G.prototype.getAllListenersBackpressure=function(){return this._listenerDemux.getBackpressureAll()},G.prototype.getListenerConsumerBackpressure=function(k){return this._listenerDemux.getConsumerBackpressure(k)},G.prototype.hasListenerConsumer=function(k,B){return this._listenerDemux.hasConsumer(k,B)},G.prototype.hasAnyListenerConsumer=function(k){return this._listenerDemux.hasConsumerAll(k)},k.exports=G},67526:(k,B)=>{"use strict";B.byteLength=function(k){var B=V(k),U=B[0],F=B[1];return 3*(U+F)/4-F},B.toByteArray=function(k){var B,U,j=V(k),$=j[0],H=j[1],W=new G(function(k,B,U){return 3*(B+U)/4-U}(0,$,H)),q=0,K=H>0?$-4:$;for(U=0;U>16&255,W[q++]=B>>8&255,W[q++]=255&B;2===H&&(B=F[k.charCodeAt(U)]<<2|F[k.charCodeAt(U+1)]>>4,W[q++]=255&B);1===H&&(B=F[k.charCodeAt(U)]<<10|F[k.charCodeAt(U+1)]<<4|F[k.charCodeAt(U+2)]>>2,W[q++]=B>>8&255,W[q++]=255&B);return W},B.fromByteArray=function(k){for(var B,F=k.length,G=F%3,j=[],$=16383,H=0,V=F-G;HV?V:H+$));1===G?(B=k[F-1],j.push(U[B>>2]+U[B<<4&63]+"==")):2===G&&(B=(k[F-2]<<8)+k[F-1],j.push(U[B>>10]+U[B>>4&63]+U[B<<2&63]+"="));return j.join("")};for(var U=[],F=[],G="undefined"!=typeof Uint8Array?Uint8Array:Array,j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$=0,H=j.length;$0)throw new Error("Invalid string. Length must be a multiple of 4");var U=k.indexOf("=");return-1===U&&(U=B),[U,U===B?0:4-U%4]}function W(k,B,F){for(var G,j,$=[],H=B;H>18&63]+U[j>>12&63]+U[j>>6&63]+U[63&j]);return $.join("")}F["-".charCodeAt(0)]=62,F["_".charCodeAt(0)]=63},46880:function(k){k.exports=function(k){var B={};function U(F){if(B[F])return B[F].exports;var G=B[F]={i:F,l:!1,exports:{}};return k[F].call(G.exports,G,G.exports,U),G.l=!0,G.exports}return U.m=k,U.c=B,U.d=function(k,B,F){U.o(k,B)||Object.defineProperty(k,B,{enumerable:!0,get:F})},U.r=function(k){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(k,"__esModule",{value:!0})},U.t=function(k,B){if(1&B&&(k=U(k)),8&B)return k;if(4&B&&"object"==typeof k&&k&&k.__esModule)return k;var F=Object.create(null);if(U.r(F),Object.defineProperty(F,"default",{enumerable:!0,value:k}),2&B&&"string"!=typeof k)for(var G in k)U.d(F,G,function(B){return k[B]}.bind(null,G));return F},U.n=function(k){var B=k&&k.__esModule?function(){return k.default}:function(){return k};return U.d(B,"a",B),B},U.o=function(k,B){return Object.prototype.hasOwnProperty.call(k,B)},U.p="",U(U.s=90)}({17:function(k,B,U){"use strict";B.__esModule=!0,B.default=void 0;var F=U(18),G=function(){function k(){}return k.getFirstMatch=function(k,B){var U=B.match(k);return U&&U.length>0&&U[1]||""},k.getSecondMatch=function(k,B){var U=B.match(k);return U&&U.length>1&&U[2]||""},k.matchAndReturnConst=function(k,B,U){if(k.test(B))return U},k.getWindowsVersionName=function(k){switch(k){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},k.getMacOSVersionName=function(k){var B=k.split(".").splice(0,2).map((function(k){return parseInt(k,10)||0}));if(B.push(0),10===B[0])switch(B[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},k.getAndroidVersionName=function(k){var B=k.split(".").splice(0,2).map((function(k){return parseInt(k,10)||0}));if(B.push(0),!(1===B[0]&&B[1]<5))return 1===B[0]&&B[1]<6?"Cupcake":1===B[0]&&B[1]>=6?"Donut":2===B[0]&&B[1]<2?"Eclair":2===B[0]&&2===B[1]?"Froyo":2===B[0]&&B[1]>2?"Gingerbread":3===B[0]?"Honeycomb":4===B[0]&&B[1]<1?"Ice Cream Sandwich":4===B[0]&&B[1]<4?"Jelly Bean":4===B[0]&&B[1]>=4?"KitKat":5===B[0]?"Lollipop":6===B[0]?"Marshmallow":7===B[0]?"Nougat":8===B[0]?"Oreo":9===B[0]?"Pie":void 0},k.getVersionPrecision=function(k){return k.split(".").length},k.compareVersions=function(B,U,F){void 0===F&&(F=!1);var G=k.getVersionPrecision(B),j=k.getVersionPrecision(U),$=Math.max(G,j),H=0,V=k.map([B,U],(function(B){var U=$-k.getVersionPrecision(B),F=B+new Array(U+1).join(".0");return k.map(F.split("."),(function(k){return new Array(20-k.length).join("0")+k})).reverse()}));for(F&&(H=$-Math.min(G,j)),$-=1;$>=H;){if(V[0][$]>V[1][$])return 1;if(V[0][$]===V[1][$]){if($===H)return 0;$-=1}else if(V[0][$]1?G-1:0),$=1;$0){var $=Object.keys(U),V=H.default.find($,(function(k){return B.isOS(k)}));if(V){var W=this.satisfies(U[V]);if(void 0!==W)return W}var q=H.default.find($,(function(k){return B.isPlatform(k)}));if(q){var K=this.satisfies(U[q]);if(void 0!==K)return K}}if(j>0){var z=Object.keys(G),Y=H.default.find(z,(function(k){return B.isBrowser(k,!0)}));if(void 0!==Y)return this.compareVersion(G[Y])}},B.isBrowser=function(k,B){void 0===B&&(B=!1);var U=this.getBrowserName().toLowerCase(),F=k.toLowerCase(),G=H.default.getBrowserTypeByAlias(F);return B&&G&&(F=G.toLowerCase()),F===U},B.compareVersion=function(k){var B=[0],U=k,F=!1,G=this.getBrowserVersion();if("string"==typeof G)return">"===k[0]||"<"===k[0]?(U=k.substr(1),"="===k[1]?(F=!0,U=k.substr(2)):B=[],">"===k[0]?B.push(1):B.push(-1)):"="===k[0]?U=k.substr(1):"~"===k[0]&&(F=!0,U=k.substr(1)),B.indexOf(H.default.compareVersions(G,U,F))>-1},B.isOS=function(k){return this.getOSName(!0)===String(k).toLowerCase()},B.isPlatform=function(k){return this.getPlatformType(!0)===String(k).toLowerCase()},B.isEngine=function(k){return this.getEngineName(!0)===String(k).toLowerCase()},B.is=function(k,B){return void 0===B&&(B=!1),this.isBrowser(k,B)||this.isOS(k)||this.isPlatform(k)},B.some=function(k){var B=this;return void 0===k&&(k=[]),k.some((function(k){return B.is(k)}))},k}();B.default=W,k.exports=B.default},92:function(k,B,U){"use strict";B.__esModule=!0,B.default=void 0;var F,G=(F=U(17))&&F.__esModule?F:{default:F},j=/version\/(\d+(\.?_?\d+)+)/i,$=[{test:[/googlebot/i],describe:function(k){var B={name:"Googlebot"},U=G.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/opera/i],describe:function(k){var B={name:"Opera"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/opr\/|opios/i],describe:function(k){var B={name:"Opera"},U=G.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/SamsungBrowser/i],describe:function(k){var B={name:"Samsung Internet for Android"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/Whale/i],describe:function(k){var B={name:"NAVER Whale Browser"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/MZBrowser/i],describe:function(k){var B={name:"MZ Browser"},U=G.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/focus/i],describe:function(k){var B={name:"Focus"},U=G.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/swing/i],describe:function(k){var B={name:"Swing"},U=G.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/coast/i],describe:function(k){var B={name:"Opera Coast"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(k){var B={name:"Opera Touch"},U=G.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/yabrowser/i],describe:function(k){var B={name:"Yandex Browser"},U=G.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/ucbrowser/i],describe:function(k){var B={name:"UC Browser"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/Maxthon|mxios/i],describe:function(k){var B={name:"Maxthon"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/epiphany/i],describe:function(k){var B={name:"Epiphany"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/puffin/i],describe:function(k){var B={name:"Puffin"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/sleipnir/i],describe:function(k){var B={name:"Sleipnir"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/k-meleon/i],describe:function(k){var B={name:"K-Meleon"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/micromessenger/i],describe:function(k){var B={name:"WeChat"},U=G.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/qqbrowser/i],describe:function(k){var B={name:/qqbrowserlite/i.test(k)?"QQ Browser Lite":"QQ Browser"},U=G.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/msie|trident/i],describe:function(k){var B={name:"Internet Explorer"},U=G.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/\sedg\//i],describe:function(k){var B={name:"Microsoft Edge"},U=G.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/edg([ea]|ios)/i],describe:function(k){var B={name:"Microsoft Edge"},U=G.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/vivaldi/i],describe:function(k){var B={name:"Vivaldi"},U=G.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/seamonkey/i],describe:function(k){var B={name:"SeaMonkey"},U=G.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/sailfish/i],describe:function(k){var B={name:"Sailfish"},U=G.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,k);return U&&(B.version=U),B}},{test:[/silk/i],describe:function(k){var B={name:"Amazon Silk"},U=G.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/phantom/i],describe:function(k){var B={name:"PhantomJS"},U=G.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/slimerjs/i],describe:function(k){var B={name:"SlimerJS"},U=G.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(k){var B={name:"BlackBerry"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/(web|hpw)[o0]s/i],describe:function(k){var B={name:"WebOS Browser"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/bada/i],describe:function(k){var B={name:"Bada"},U=G.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/tizen/i],describe:function(k){var B={name:"Tizen"},U=G.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/qupzilla/i],describe:function(k){var B={name:"QupZilla"},U=G.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/firefox|iceweasel|fxios/i],describe:function(k){var B={name:"Firefox"},U=G.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/electron/i],describe:function(k){var B={name:"Electron"},U=G.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/MiuiBrowser/i],describe:function(k){var B={name:"Miui"},U=G.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/chromium/i],describe:function(k){var B={name:"Chromium"},U=G.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/chrome|crios|crmo/i],describe:function(k){var B={name:"Chrome"},U=G.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/GSA/i],describe:function(k){var B={name:"Google Search"},U=G.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:function(k){var B=!k.test(/like android/i),U=k.test(/android/i);return B&&U},describe:function(k){var B={name:"Android Browser"},U=G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/playstation 4/i],describe:function(k){var B={name:"PlayStation 4"},U=G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/safari|applewebkit/i],describe:function(k){var B={name:"Safari"},U=G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/.*/i],describe:function(k){var B=-1!==k.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:G.default.getFirstMatch(B,k),version:G.default.getSecondMatch(B,k)}}}];B.default=$,k.exports=B.default},93:function(k,B,U){"use strict";B.__esModule=!0,B.default=void 0;var F,G=(F=U(17))&&F.__esModule?F:{default:F},j=U(18),$=[{test:[/Roku\/DVP/],describe:function(k){var B=G.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,k);return{name:j.OS_MAP.Roku,version:B}}},{test:[/windows phone/i],describe:function(k){var B=G.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,k);return{name:j.OS_MAP.WindowsPhone,version:B}}},{test:[/windows /i],describe:function(k){var B=G.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,k),U=G.default.getWindowsVersionName(B);return{name:j.OS_MAP.Windows,version:B,versionName:U}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(k){var B={name:j.OS_MAP.iOS},U=G.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,k);return U&&(B.version=U),B}},{test:[/macintosh/i],describe:function(k){var B=G.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,k).replace(/[_\s]/g,"."),U=G.default.getMacOSVersionName(B),F={name:j.OS_MAP.MacOS,version:B};return U&&(F.versionName=U),F}},{test:[/(ipod|iphone|ipad)/i],describe:function(k){var B=G.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,k).replace(/[_\s]/g,".");return{name:j.OS_MAP.iOS,version:B}}},{test:function(k){var B=!k.test(/like android/i),U=k.test(/android/i);return B&&U},describe:function(k){var B=G.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,k),U=G.default.getAndroidVersionName(B),F={name:j.OS_MAP.Android,version:B};return U&&(F.versionName=U),F}},{test:[/(web|hpw)[o0]s/i],describe:function(k){var B=G.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,k),U={name:j.OS_MAP.WebOS};return B&&B.length&&(U.version=B),U}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(k){var B=G.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,k)||G.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,k)||G.default.getFirstMatch(/\bbb(\d+)/i,k);return{name:j.OS_MAP.BlackBerry,version:B}}},{test:[/bada/i],describe:function(k){var B=G.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,k);return{name:j.OS_MAP.Bada,version:B}}},{test:[/tizen/i],describe:function(k){var B=G.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,k);return{name:j.OS_MAP.Tizen,version:B}}},{test:[/linux/i],describe:function(){return{name:j.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:j.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(k){var B=G.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,k);return{name:j.OS_MAP.PlayStation4,version:B}}}];B.default=$,k.exports=B.default},94:function(k,B,U){"use strict";B.__esModule=!0,B.default=void 0;var F,G=(F=U(17))&&F.__esModule?F:{default:F},j=U(18),$=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(k){var B=G.default.getFirstMatch(/(can-l01)/i,k)&&"Nova",U={type:j.PLATFORMS_MAP.mobile,vendor:"Huawei"};return B&&(U.model=B),U}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:j.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:j.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:j.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:j.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:j.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:j.PLATFORMS_MAP.tablet}}},{test:function(k){var B=k.test(/ipod|iphone/i),U=k.test(/like (ipod|iphone)/i);return B&&!U},describe:function(k){var B=G.default.getFirstMatch(/(ipod|iphone)/i,k);return{type:j.PLATFORMS_MAP.mobile,vendor:"Apple",model:B}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:j.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:j.PLATFORMS_MAP.mobile}}},{test:function(k){return"blackberry"===k.getBrowserName(!0)},describe:function(){return{type:j.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(k){return"bada"===k.getBrowserName(!0)},describe:function(){return{type:j.PLATFORMS_MAP.mobile}}},{test:function(k){return"windows phone"===k.getBrowserName()},describe:function(){return{type:j.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(k){var B=Number(String(k.getOSVersion()).split(".")[0]);return"android"===k.getOSName(!0)&&B>=3},describe:function(){return{type:j.PLATFORMS_MAP.tablet}}},{test:function(k){return"android"===k.getOSName(!0)},describe:function(){return{type:j.PLATFORMS_MAP.mobile}}},{test:function(k){return"macos"===k.getOSName(!0)},describe:function(){return{type:j.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(k){return"windows"===k.getOSName(!0)},describe:function(){return{type:j.PLATFORMS_MAP.desktop}}},{test:function(k){return"linux"===k.getOSName(!0)},describe:function(){return{type:j.PLATFORMS_MAP.desktop}}},{test:function(k){return"playstation 4"===k.getOSName(!0)},describe:function(){return{type:j.PLATFORMS_MAP.tv}}},{test:function(k){return"roku"===k.getOSName(!0)},describe:function(){return{type:j.PLATFORMS_MAP.tv}}}];B.default=$,k.exports=B.default},95:function(k,B,U){"use strict";B.__esModule=!0,B.default=void 0;var F,G=(F=U(17))&&F.__esModule?F:{default:F},j=U(18),$=[{test:function(k){return"microsoft edge"===k.getBrowserName(!0)},describe:function(k){if(/\sedg\//i.test(k))return{name:j.ENGINE_MAP.Blink};var B=G.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,k);return{name:j.ENGINE_MAP.EdgeHTML,version:B}}},{test:[/trident/i],describe:function(k){var B={name:j.ENGINE_MAP.Trident},U=G.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:function(k){return k.test(/presto/i)},describe:function(k){var B={name:j.ENGINE_MAP.Presto},U=G.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:function(k){var B=k.test(/gecko/i),U=k.test(/like gecko/i);return B&&!U},describe:function(k){var B={name:j.ENGINE_MAP.Gecko},U=G.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:j.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(k){var B={name:j.ENGINE_MAP.WebKit},U=G.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}}];B.default=$,k.exports=B.default}})},48287:(k,B,U)=>{"use strict";var F=U(67526),G=U(251),j="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;B.hp=V,B.IS=50;var $=2147483647;function H(k){if(k>$)throw new RangeError('The value "'+k+'" is invalid for option "size"');var B=new Uint8Array(k);return Object.setPrototypeOf(B,V.prototype),B}function V(k,B,U){if("number"==typeof k){if("string"==typeof B)throw new TypeError('The "string" argument must be of type string. Received type number');return K(k)}return W(k,B,U)}function W(k,B,U){if("string"==typeof k)return function(k,B){"string"==typeof B&&""!==B||(B="utf8");if(!V.isEncoding(B))throw new TypeError("Unknown encoding: "+B);var U=0|X(k,B),F=H(U),G=F.write(k,B);G!==U&&(F=F.slice(0,G));return F}(k,B);if(ArrayBuffer.isView(k))return function(k){if(Tt(k,Uint8Array)){var B=new Uint8Array(k);return Y(B.buffer,B.byteOffset,B.byteLength)}return z(k)}(k);if(null==k)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(Tt(k,ArrayBuffer)||k&&Tt(k.buffer,ArrayBuffer))return Y(k,B,U);if("undefined"!=typeof SharedArrayBuffer&&(Tt(k,SharedArrayBuffer)||k&&Tt(k.buffer,SharedArrayBuffer)))return Y(k,B,U);if("number"==typeof k)throw new TypeError('The "value" argument must not be of type number. Received type number');var F=k.valueOf&&k.valueOf();if(null!=F&&F!==k)return V.from(F,B,U);var G=function(k){if(V.isBuffer(k)){var B=0|Q(k.length),U=H(B);return 0===U.length||k.copy(U,0,0,B),U}if(void 0!==k.length)return"number"!=typeof k.length||St(k.length)?H(0):z(k);if("Buffer"===k.type&&Array.isArray(k.data))return z(k.data)}(k);if(G)return G;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof k[Symbol.toPrimitive])return V.from(k[Symbol.toPrimitive]("string"),B,U);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}function q(k){if("number"!=typeof k)throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function K(k){return q(k),H(k<0?0:0|Q(k))}function z(k){for(var B=k.length<0?0:0|Q(k.length),U=H(B),F=0;F=$)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+$.toString(16)+" bytes");return 0|k}function X(k,B){if(V.isBuffer(k))return k.length;if(ArrayBuffer.isView(k)||Tt(k,ArrayBuffer))return k.byteLength;if("string"!=typeof k)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);var U=k.length,F=arguments.length>2&&!0===arguments[2];if(!F&&0===U)return 0;for(var G=!1;;)switch(B){case"ascii":case"latin1":case"binary":return U;case"utf8":case"utf-8":return _t(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*U;case"hex":return U>>>1;case"base64":return Et(k).length;default:if(G)return F?-1:_t(k).length;B=(""+B).toLowerCase(),G=!0}}function Z(k,B,U){var F=!1;if((void 0===B||B<0)&&(B=0),B>this.length)return"";if((void 0===U||U>this.length)&&(U=this.length),U<=0)return"";if((U>>>=0)<=(B>>>=0))return"";for(k||(k="utf8");;)switch(k){case"hex":return ut(this,B,U);case"utf8":case"utf-8":return ht(this,B,U);case"ascii":return dt(this,B,U);case"latin1":case"binary":return lt(this,B,U);case"base64":return ot(this,B,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ft(this,B,U);default:if(F)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),F=!0}}function J(k,B,U){var F=k[B];k[B]=k[U],k[U]=F}function tt(k,B,U,F,G){if(0===k.length)return-1;if("string"==typeof U?(F=U,U=0):U>2147483647?U=2147483647:U<-2147483648&&(U=-2147483648),St(U=+U)&&(U=G?0:k.length-1),U<0&&(U=k.length+U),U>=k.length){if(G)return-1;U=k.length-1}else if(U<0){if(!G)return-1;U=0}if("string"==typeof B&&(B=V.from(B,F)),V.isBuffer(B))return 0===B.length?-1:et(k,B,U,F,G);if("number"==typeof B)return B&=255,"function"==typeof Uint8Array.prototype.indexOf?G?Uint8Array.prototype.indexOf.call(k,B,U):Uint8Array.prototype.lastIndexOf.call(k,B,U):et(k,[B],U,F,G);throw new TypeError("val must be string, number or Buffer")}function et(k,B,U,F,G){var j,$=1,H=k.length,V=B.length;if(void 0!==F&&("ucs2"===(F=String(F).toLowerCase())||"ucs-2"===F||"utf16le"===F||"utf-16le"===F)){if(k.length<2||B.length<2)return-1;$=2,H/=2,V/=2,U/=2}function W(k,B){return 1===$?k[B]:k.readUInt16BE(B*$)}if(G){var q=-1;for(j=U;jH&&(U=H-V),j=U;j>=0;j--){for(var K=!0,z=0;zG&&(F=G):F=G;var j=B.length;F>j/2&&(F=j/2);for(var $=0;$>8,G=U%256,j.push(G),j.push(F);return j}(B,k.length-U),k,U,F)}function ot(k,B,U){return 0===B&&U===k.length?F.fromByteArray(k):F.fromByteArray(k.slice(B,U))}function ht(k,B,U){U=Math.min(k.length,U);for(var F=[],G=B;G239?4:W>223?3:W>191?2:1;if(G+K<=U)switch(K){case 1:W<128&&(q=W);break;case 2:128==(192&(j=k[G+1]))&&(V=(31&W)<<6|63&j)>127&&(q=V);break;case 3:j=k[G+1],$=k[G+2],128==(192&j)&&128==(192&$)&&(V=(15&W)<<12|(63&j)<<6|63&$)>2047&&(V<55296||V>57343)&&(q=V);break;case 4:j=k[G+1],$=k[G+2],H=k[G+3],128==(192&j)&&128==(192&$)&&128==(192&H)&&(V=(15&W)<<18|(63&j)<<12|(63&$)<<6|63&H)>65535&&V<1114112&&(q=V)}null===q?(q=65533,K=1):q>65535&&(q-=65536,F.push(q>>>10&1023|55296),q=56320|1023&q),F.push(q),G+=K}return function(k){var B=k.length;if(B<=ct)return String.fromCharCode.apply(String,k);var U="",F=0;for(;FF.length?V.from(j).copy(F,G):Uint8Array.prototype.set.call(F,j,G);else{if(!V.isBuffer(j))throw new TypeError('"list" argument must be an Array of Buffers');j.copy(F,G)}G+=j.length}return F},V.byteLength=X,V.prototype._isBuffer=!0,V.prototype.swap16=function(){var k=this.length;if(k%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var B=0;BU&&(k+=" ... "),""},j&&(V.prototype[j]=V.prototype.inspect),V.prototype.compare=function(k,B,U,F,G){if(Tt(k,Uint8Array)&&(k=V.from(k,k.offset,k.byteLength)),!V.isBuffer(k))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof k);if(void 0===B&&(B=0),void 0===U&&(U=k?k.length:0),void 0===F&&(F=0),void 0===G&&(G=this.length),B<0||U>k.length||F<0||G>this.length)throw new RangeError("out of range index");if(F>=G&&B>=U)return 0;if(F>=G)return-1;if(B>=U)return 1;if(this===k)return 0;for(var j=(G>>>=0)-(F>>>=0),$=(U>>>=0)-(B>>>=0),H=Math.min(j,$),W=this.slice(F,G),q=k.slice(B,U),K=0;K>>=0,isFinite(U)?(U>>>=0,void 0===F&&(F="utf8")):(F=U,U=void 0)}var G=this.length-B;if((void 0===U||U>G)&&(U=G),k.length>0&&(U<0||B<0)||B>this.length)throw new RangeError("Attempt to write outside buffer bounds");F||(F="utf8");for(var j=!1;;)switch(F){case"hex":return it(this,k,B,U);case"utf8":case"utf-8":return st(this,k,B,U);case"ascii":case"latin1":case"binary":return nt(this,k,B,U);case"base64":return at(this,k,B,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rt(this,k,B,U);default:if(j)throw new TypeError("Unknown encoding: "+F);F=(""+F).toLowerCase(),j=!0}},V.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ct=4096;function dt(k,B,U){var F="";U=Math.min(k.length,U);for(var G=B;GF)&&(U=F);for(var G="",j=B;jU)throw new RangeError("Trying to access beyond buffer length")}function pt(k,B,U,F,G,j){if(!V.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(B>G||Bk.length)throw new RangeError("Index out of range")}function vt(k,B,U,F,G,j){if(U+F>k.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("Index out of range")}function gt(k,B,U,F,j){return B=+B,U>>>=0,j||vt(k,0,U,4),G.write(k,B,U,F,23,4),U+4}function mt(k,B,U,F,j){return B=+B,U>>>=0,j||vt(k,0,U,8),G.write(k,B,U,F,52,8),U+8}V.prototype.slice=function(k,B){var U=this.length;(k=~~k)<0?(k+=U)<0&&(k=0):k>U&&(k=U),(B=void 0===B?U:~~B)<0?(B+=U)<0&&(B=0):B>U&&(B=U),B>>=0,B>>>=0,U||bt(k,B,this.length);for(var F=this[k],G=1,j=0;++j>>=0,B>>>=0,U||bt(k,B,this.length);for(var F=this[k+--B],G=1;B>0&&(G*=256);)F+=this[k+--B]*G;return F},V.prototype.readUint8=V.prototype.readUInt8=function(k,B){return k>>>=0,B||bt(k,1,this.length),this[k]},V.prototype.readUint16LE=V.prototype.readUInt16LE=function(k,B){return k>>>=0,B||bt(k,2,this.length),this[k]|this[k+1]<<8},V.prototype.readUint16BE=V.prototype.readUInt16BE=function(k,B){return k>>>=0,B||bt(k,2,this.length),this[k]<<8|this[k+1]},V.prototype.readUint32LE=V.prototype.readUInt32LE=function(k,B){return k>>>=0,B||bt(k,4,this.length),(this[k]|this[k+1]<<8|this[k+2]<<16)+16777216*this[k+3]},V.prototype.readUint32BE=V.prototype.readUInt32BE=function(k,B){return k>>>=0,B||bt(k,4,this.length),16777216*this[k]+(this[k+1]<<16|this[k+2]<<8|this[k+3])},V.prototype.readIntLE=function(k,B,U){k>>>=0,B>>>=0,U||bt(k,B,this.length);for(var F=this[k],G=1,j=0;++j=(G*=128)&&(F-=Math.pow(2,8*B)),F},V.prototype.readIntBE=function(k,B,U){k>>>=0,B>>>=0,U||bt(k,B,this.length);for(var F=B,G=1,j=this[k+--F];F>0&&(G*=256);)j+=this[k+--F]*G;return j>=(G*=128)&&(j-=Math.pow(2,8*B)),j},V.prototype.readInt8=function(k,B){return k>>>=0,B||bt(k,1,this.length),128&this[k]?-1*(255-this[k]+1):this[k]},V.prototype.readInt16LE=function(k,B){k>>>=0,B||bt(k,2,this.length);var U=this[k]|this[k+1]<<8;return 32768&U?4294901760|U:U},V.prototype.readInt16BE=function(k,B){k>>>=0,B||bt(k,2,this.length);var U=this[k+1]|this[k]<<8;return 32768&U?4294901760|U:U},V.prototype.readInt32LE=function(k,B){return k>>>=0,B||bt(k,4,this.length),this[k]|this[k+1]<<8|this[k+2]<<16|this[k+3]<<24},V.prototype.readInt32BE=function(k,B){return k>>>=0,B||bt(k,4,this.length),this[k]<<24|this[k+1]<<16|this[k+2]<<8|this[k+3]},V.prototype.readFloatLE=function(k,B){return k>>>=0,B||bt(k,4,this.length),G.read(this,k,!0,23,4)},V.prototype.readFloatBE=function(k,B){return k>>>=0,B||bt(k,4,this.length),G.read(this,k,!1,23,4)},V.prototype.readDoubleLE=function(k,B){return k>>>=0,B||bt(k,8,this.length),G.read(this,k,!0,52,8)},V.prototype.readDoubleBE=function(k,B){return k>>>=0,B||bt(k,8,this.length),G.read(this,k,!1,52,8)},V.prototype.writeUintLE=V.prototype.writeUIntLE=function(k,B,U,F){(k=+k,B>>>=0,U>>>=0,F)||pt(this,k,B,U,Math.pow(2,8*U)-1,0);var G=1,j=0;for(this[B]=255&k;++j>>=0,U>>>=0,F)||pt(this,k,B,U,Math.pow(2,8*U)-1,0);var G=U-1,j=1;for(this[B+G]=255&k;--G>=0&&(j*=256);)this[B+G]=k/j&255;return B+U},V.prototype.writeUint8=V.prototype.writeUInt8=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,1,255,0),this[B]=255&k,B+1},V.prototype.writeUint16LE=V.prototype.writeUInt16LE=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,2,65535,0),this[B]=255&k,this[B+1]=k>>>8,B+2},V.prototype.writeUint16BE=V.prototype.writeUInt16BE=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,2,65535,0),this[B]=k>>>8,this[B+1]=255&k,B+2},V.prototype.writeUint32LE=V.prototype.writeUInt32LE=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,4,4294967295,0),this[B+3]=k>>>24,this[B+2]=k>>>16,this[B+1]=k>>>8,this[B]=255&k,B+4},V.prototype.writeUint32BE=V.prototype.writeUInt32BE=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,4,4294967295,0),this[B]=k>>>24,this[B+1]=k>>>16,this[B+2]=k>>>8,this[B+3]=255&k,B+4},V.prototype.writeIntLE=function(k,B,U,F){if(k=+k,B>>>=0,!F){var G=Math.pow(2,8*U-1);pt(this,k,B,U,G-1,-G)}var j=0,$=1,H=0;for(this[B]=255&k;++j>0)-H&255;return B+U},V.prototype.writeIntBE=function(k,B,U,F){if(k=+k,B>>>=0,!F){var G=Math.pow(2,8*U-1);pt(this,k,B,U,G-1,-G)}var j=U-1,$=1,H=0;for(this[B+j]=255&k;--j>=0&&($*=256);)k<0&&0===H&&0!==this[B+j+1]&&(H=1),this[B+j]=(k/$>>0)-H&255;return B+U},V.prototype.writeInt8=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,1,127,-128),k<0&&(k=255+k+1),this[B]=255&k,B+1},V.prototype.writeInt16LE=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,2,32767,-32768),this[B]=255&k,this[B+1]=k>>>8,B+2},V.prototype.writeInt16BE=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,2,32767,-32768),this[B]=k>>>8,this[B+1]=255&k,B+2},V.prototype.writeInt32LE=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,4,2147483647,-2147483648),this[B]=255&k,this[B+1]=k>>>8,this[B+2]=k>>>16,this[B+3]=k>>>24,B+4},V.prototype.writeInt32BE=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,4,2147483647,-2147483648),k<0&&(k=4294967295+k+1),this[B]=k>>>24,this[B+1]=k>>>16,this[B+2]=k>>>8,this[B+3]=255&k,B+4},V.prototype.writeFloatLE=function(k,B,U){return gt(this,k,B,!0,U)},V.prototype.writeFloatBE=function(k,B,U){return gt(this,k,B,!1,U)},V.prototype.writeDoubleLE=function(k,B,U){return mt(this,k,B,!0,U)},V.prototype.writeDoubleBE=function(k,B,U){return mt(this,k,B,!1,U)},V.prototype.copy=function(k,B,U,F){if(!V.isBuffer(k))throw new TypeError("argument should be a Buffer");if(U||(U=0),F||0===F||(F=this.length),B>=k.length&&(B=k.length),B||(B=0),F>0&&F=this.length)throw new RangeError("Index out of range");if(F<0)throw new RangeError("sourceEnd out of bounds");F>this.length&&(F=this.length),k.length-B>>=0,U=void 0===U?this.length:U>>>0,k||(k=0),"number"==typeof k)for(j=B;j55295&&U<57344){if(!G){if(U>56319){(B-=3)>-1&&j.push(239,191,189);continue}if($+1===F){(B-=3)>-1&&j.push(239,191,189);continue}G=U;continue}if(U<56320){(B-=3)>-1&&j.push(239,191,189),G=U;continue}U=65536+(G-55296<<10|U-56320)}else G&&(B-=3)>-1&&j.push(239,191,189);if(G=null,U<128){if((B-=1)<0)break;j.push(U)}else if(U<2048){if((B-=2)<0)break;j.push(U>>6|192,63&U|128)}else if(U<65536){if((B-=3)<0)break;j.push(U>>12|224,U>>6&63|128,63&U|128)}else{if(!(U<1114112))throw new Error("Invalid code point");if((B-=4)<0)break;j.push(U>>18|240,U>>12&63|128,U>>6&63|128,63&U|128)}}return j}function Et(k){return F.toByteArray(function(k){if((k=(k=k.split("=")[0]).trim().replace(yt,"")).length<2)return"";for(;k.length%4!=0;)k+="=";return k}(k))}function wt(k,B,U,F){for(var G=0;G=B.length||G>=k.length);++G)B[G+U]=k[G];return G}function Tt(k,B){return k instanceof B||null!=k&&null!=k.constructor&&null!=k.constructor.name&&k.constructor.name===B.name}function St(k){return k!=k}var At=function(){for(var k="0123456789abcdef",B=new Array(256),U=0;U<16;++U)for(var F=16*U,G=0;G<16;++G)B[F+G]=k[U]+k[G];return B}()},13144:(k,B,U)=>{"use strict";var F=U(66743),G=U(11002),j=U(10076),$=U(47119);k.exports=$||F.call(j,G)},12205:(k,B,U)=>{"use strict";var F=U(66743),G=U(11002),j=U(13144);k.exports=function(){return j(F,G,arguments)}},11002:k=>{"use strict";k.exports=Function.prototype.apply},10076:k=>{"use strict";k.exports=Function.prototype.call},73126:(k,B,U)=>{"use strict";var F=U(66743),G=U(69675),j=U(10076),$=U(13144);k.exports=function(k){if(k.length<1||"function"!=typeof k[0])throw new G("a function is required");return $(F,j,k)}},47119:k=>{"use strict";k.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},38075:(k,B,U)=>{"use strict";var F=U(70453),G=U(10487),j=G(F("String.prototype.indexOf"));k.exports=function(k,B){var U=F(k,!!B);return"function"==typeof U&&j(k,".prototype.")>-1?G(U):U}},10487:(k,B,U)=>{"use strict";var F=U(96897),G=U(30655),j=U(73126),$=U(12205);k.exports=function(k){var B=j(arguments),U=k.length-(arguments.length-1);return F(B,1+(U>0?U:0),!0)},G?G(k.exports,"apply",{value:$}):k.exports.apply=$},36556:(k,B,U)=>{"use strict";var F=U(70453),G=U(73126),j=G([F("%String.prototype.indexOf%")]);k.exports=function(k,B){var U=F(k,!!B);return"function"==typeof U&&j(k,".prototype.")>-1?G([U]):U}},8928:k=>{function B(k){this.input=k;for(var B,U=k.split("\n"),F=0,G=U.length,j=0,$={length:G};F=0&&"\n"!==B.charAt(U);U--);return k-U-1},indexAt:function(k){var B=k.line,U=k.column;return this.lineMap[B].start+U},charAt:function(k){var B=this.indexAt(k);return this.input.charAt(B)}},U.Indexer=B,k.exports=U},79155:(k,B,U)=>{"use strict";const F=U(84427),G=U(46221),j=U(51750);function $(k,B){switch(G(k)){case"object":return function(k,B){if("function"==typeof B)return B(k);if(B||j(k)){const U=new k.constructor;for(let F in k)U[F]=$(k[F],B);return U}return k}(k,B);case"array":return function(k,B){const U=new k.constructor(k.length);for(let F=0;F{"use strict";var F=U(13798);function G(k){return!0===F(k)&&"[object Object]"===Object.prototype.toString.call(k)}k.exports=function(k){var B,U;return!1!==G(k)&&("function"==typeof(B=k.constructor)&&(!1!==G(U=B.prototype)&&!1!==U.hasOwnProperty("isPrototypeOf")))}},46221:k=>{var B=Object.prototype.toString;function U(k){return"function"==typeof k.constructor?k.constructor.name:null}k.exports=function(k){if(void 0===k)return"undefined";if(null===k)return"null";var F=typeof k;if("boolean"===F)return"boolean";if("string"===F)return"string";if("number"===F)return"number";if("symbol"===F)return"symbol";if("function"===F)return"GeneratorFunction"===U(k)?"generatorfunction":"function";if(function(k){return Array.isArray?Array.isArray(k):k instanceof Array}(k))return"array";if(function(k){if(k.constructor&&"function"==typeof k.constructor.isBuffer)return k.constructor.isBuffer(k);return!1}(k))return"buffer";if(function(k){try{if("number"==typeof k.length&&"function"==typeof k.callee)return!0}catch(B){if(-1!==B.message.indexOf("callee"))return!0}return!1}(k))return"arguments";if(function(k){return k instanceof Date||"function"==typeof k.toDateString&&"function"==typeof k.getDate&&"function"==typeof k.setDate}(k))return"date";if(function(k){return k instanceof Error||"string"==typeof k.message&&k.constructor&&"number"==typeof k.constructor.stackTraceLimit}(k))return"error";if(function(k){return k instanceof RegExp||"string"==typeof k.flags&&"boolean"==typeof k.ignoreCase&&"boolean"==typeof k.multiline&&"boolean"==typeof k.global}(k))return"regexp";switch(U(k)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(k){return"function"==typeof k.throw&&"function"==typeof k.return&&"function"==typeof k.next}(k))return"generator";switch(F=B.call(k)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return F.slice(8,-1).toLowerCase().replace(/\s/g,"")}},40862:(k,B,U)=>{"use strict";var F=U(14263),G="undefined"!=typeof process&&"production",j=!G||"dev"===G||"development"===G,$="undefined"!=typeof process&&Boolean(process.env.SHOW_MODULE_COMPLAINS),H="undefined"!=typeof process&&Boolean(process.env.SHOW_NESTED_COMPLAINS),V="undefined"!=typeof console&&console.warn&&console,W="undefined"!=typeof process&&process.cwd&&process.cwd()+"/"||"",q="undefined"!=typeof process&&"win32"===process.platform?"\r\n":"\n",K=[].slice,z="[ignore]",Y={};function Q(){var k,B,U,F,G,j,H=arguments;if(!Q.silence){"object"==typeof H[H.length-1]?(k=H[H.length-1],H=K.call(H,0,-1)):k={},j=k.level||2,G=k.heading||(2==j?"WARNING!!":"NOTICE"),F=k.headingColor||(2==j?Q.colors.warning:Q.colors.notice),U=null==k.locationIndex?1:k.locationIndex,!1===k.location&&(U=0),B=k.location||Z(U);var V=Q.getModuleName(B);if(!V||$){if(B){if(Y[B]||B===z)return;Y[B]=!0}tt=X(G,F);for(var J=0;JU;j--)if(Y[G[j]])return z;B=G[U]}catch(e){}return B}function J(){}(Q=j?Q:J).method=j?function(k,B){var U=k[B],F=K.call(arguments,2);k[B]=function(){return Q.apply(null,F),U.apply(this,arguments)}}:J,Q.fn=j?function(k){var B=K.call(arguments,1);return function(){return Q.apply(null,B),k.apply(this,arguments)}}:function(k){return k},Q.log=function(k,B){var U=X(k,B);Q.stream?Q.stream.write(U+q):V&&V.warn(U)},Q.stream="undefined"!=typeof process&&process.stderr,Q.silence=!1,Q.color=Q.stream&&Q.stream.isTTY,Q.colors={warning:"",notice:"",message:!1,location:""},Q.getModuleName=function(k){for(var B=k.replace(W,"").split(/\/|\\/g),U=B.length-1;U>=0;U--)if("node_modules"===B[U]){var F=B[U+1];return"@"===F[0]?F+"/"+B[U+2]:F}},k.exports?k.exports=Q:"undefined"!=typeof window&&(window.complain=Q)},72237:k=>{class B{async next(k){let B=this.createConsumer(k),U=await B.next();return B.return(),U}async once(k){let B=await this.next(k);return B.done&&await new Promise((()=>{})),B.value}createConsumer(){throw new TypeError("Method must be overriden by subclass")}[Symbol.asyncIterator](){return this.createConsumer()}}k.exports=B},30454:k=>{"use strict";var B="%[a-f0-9]{2}",U=new RegExp("("+B+")|([^%]+?)","gi"),F=new RegExp("("+B+")+","gi");function G(k,B){try{return[decodeURIComponent(k.join(""))]}catch(j){}if(1===k.length)return k;B=B||1;var U=k.slice(0,B),F=k.slice(B);return Array.prototype.concat.call([],G(U),G(F))}function j(k){try{return decodeURIComponent(k)}catch(j){for(var B=k.match(U)||[],F=1;F{"use strict";var F=U(30655),G=U(58068),j=U(69675),$=U(75795);k.exports=function(k,B,U){if(!k||"object"!=typeof k&&"function"!=typeof k)throw new j("`obj` must be an object or a function`");if("string"!=typeof B&&"symbol"!=typeof B)throw new j("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new j("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new j("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new j("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new j("`loose`, if provided, must be a boolean");var H=arguments.length>3?arguments[3]:null,V=arguments.length>4?arguments[4]:null,W=arguments.length>5?arguments[5]:null,q=arguments.length>6&&arguments[6],K=!!$&&$(k,B);if(F)F(k,B,{configurable:null===W&&K?K.configurable:!W,enumerable:null===H&&K?K.enumerable:!H,value:U,writable:null===V&&K?K.writable:!V});else{if(!q&&(H||V||W))throw new G("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");k[B]=U}}},7176:(k,B,U)=>{"use strict";var F,G=U(73126),j=U(75795);try{F=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var $=!!F&&j&&j(Object.prototype,"__proto__"),H=Object,V=H.getPrototypeOf;k.exports=$&&"function"==typeof $.get?G([$.get]):"function"==typeof V&&function(k){return V(null==k?k:H(k))}},66570:k=>{"use strict";function B(k,B,j){j=j||2;var $,H,V,K,Y,Q,X,Z=B&&B.length,J=Z?B[0]*j:k.length,tt=U(k,0,J,j,!0),et=[];if(!tt||tt.next===tt.prev)return et;if(Z&&(tt=function(k,B,G,j){var $,H,V,K=[];for($=0,H=B.length;$80*j){$=V=k[0],H=K=k[1];for(var it=j;itV&&(V=Y),Q>K&&(K=Q);X=0!==(X=Math.max(V-$,K-H))?1/X:0}return G(tt,et,j,$,H,X),et}function U(k,B,U,F,G){var j,$;if(G===at(k,B,U,F)>0)for(j=B;j=B;j-=F)$=it(j,k[j],k[j+1],$);return $&&Z($,$.next)&&(st($),$=$.next),$}function F(k,B){if(!k)return k;B||(B=k);var U,F=k;do{if(U=!1,F.steiner||!Z(F,F.next)&&0!==X(F.prev,F,F.next))F=F.next;else{if(st(F),(F=B=F.prev)===F.next)break;U=!0}}while(U||F!==B);return B}function G(k,B,U,W,q,z,Y){if(k){!Y&&z&&function(k,B,U,F){var G=k;do{null===G.z&&(G.z=K(G.x,G.y,B,U,F)),G.prevZ=G.prev,G.nextZ=G.next,G=G.next}while(G!==k);G.prevZ.nextZ=null,G.prevZ=null,function(k){var B,U,F,G,j,$,H,V,W=1;do{for(U=k,k=null,j=null,$=0;U;){for($++,F=U,H=0,B=0;B0||V>0&&F;)0!==H&&(0===V||!F||U.z<=F.z)?(G=U,U=U.nextZ,H--):(G=F,F=F.nextZ,V--),j?j.nextZ=G:k=G,G.prevZ=j,j=G;U=F}j.nextZ=null,W*=2}while($>1)}(G)}(k,W,q,z);for(var Q,X,Z=k;k.prev!==k.next;)if(Q=k.prev,X=k.next,z?$(k,W,q,z):j(k))B.push(Q.i/U),B.push(k.i/U),B.push(X.i/U),st(k),k=X.next,Z=X.next;else if((k=X)===Z){Y?1===Y?G(k=H(k,B,U),B,U,W,q,z,2):2===Y&&V(k,B,U,W,q,z):G(F(k),B,U,W,q,z,1);break}}}function j(k){var B=k.prev,U=k,F=k.next;if(X(B,U,F)>=0)return!1;for(var G=k.next.next;G!==k.prev;){if(Y(B.x,B.y,U.x,U.y,F.x,F.y,G.x,G.y)&&X(G.prev,G,G.next)>=0)return!1;G=G.next}return!0}function $(k,B,U,F){var G=k.prev,j=k,$=k.next;if(X(G,j,$)>=0)return!1;for(var H=G.xj.x?G.x>$.x?G.x:$.x:j.x>$.x?j.x:$.x,q=G.y>j.y?G.y>$.y?G.y:$.y:j.y>$.y?j.y:$.y,z=K(H,V,B,U,F),Q=K(W,q,B,U,F),Z=k.prevZ,J=k.nextZ;Z&&Z.z>=z&&J&&J.z<=Q;){if(Z!==k.prev&&Z!==k.next&&Y(G.x,G.y,j.x,j.y,$.x,$.y,Z.x,Z.y)&&X(Z.prev,Z,Z.next)>=0)return!1;if(Z=Z.prevZ,J!==k.prev&&J!==k.next&&Y(G.x,G.y,j.x,j.y,$.x,$.y,J.x,J.y)&&X(J.prev,J,J.next)>=0)return!1;J=J.nextZ}for(;Z&&Z.z>=z;){if(Z!==k.prev&&Z!==k.next&&Y(G.x,G.y,j.x,j.y,$.x,$.y,Z.x,Z.y)&&X(Z.prev,Z,Z.next)>=0)return!1;Z=Z.prevZ}for(;J&&J.z<=Q;){if(J!==k.prev&&J!==k.next&&Y(G.x,G.y,j.x,j.y,$.x,$.y,J.x,J.y)&&X(J.prev,J,J.next)>=0)return!1;J=J.nextZ}return!0}function H(k,B,U){var F=k;do{var G=F.prev,j=F.next.next;!Z(G,j)&&J(G,F,F.next,j)&&tt(G,j)&&tt(j,G)&&(B.push(G.i/U),B.push(F.i/U),B.push(j.i/U),st(F),st(F.next),F=k=j),F=F.next}while(F!==k);return F}function V(k,B,U,j,$,H){var V=k;do{for(var W=V.next.next;W!==V.prev;){if(V.i!==W.i&&Q(V,W)){var q=et(V,W);return V=F(V,V.next),q=F(q,q.next),G(V,B,U,j,$,H),void G(q,B,U,j,$,H)}W=W.next}V=V.next}while(V!==k)}function W(k,B){return k.x-B.x}function q(k,B){if(B=function(k,B){var U,F=B,G=k.x,j=k.y,$=-1/0;do{if(j<=F.y&&j>=F.next.y&&F.next.y!==F.y){var H=F.x+(j-F.y)*(F.next.x-F.x)/(F.next.y-F.y);if(H<=G&&H>$){if($=H,H===G){if(j===F.y)return F;if(j===F.next.y)return F.next}U=F.x=F.x&&F.x>=q&&G!==F.x&&Y(jU.x)&&tt(F,k)&&(U=F,z=V),F=F.next;return U}(k,B)){var U=et(B,k);F(U,U.next)}}function K(k,B,U,F,G){return(k=1431655765&((k=858993459&((k=252645135&((k=16711935&((k=32767*(k-U)*G)|k<<8))|k<<4))|k<<2))|k<<1))|(B=1431655765&((B=858993459&((B=252645135&((B=16711935&((B=32767*(B-F)*G)|B<<8))|B<<4))|B<<2))|B<<1))<<1}function z(k){var B=k,U=k;do{(B.x=0&&(k-$)*(F-H)-(U-$)*(B-H)>=0&&(U-$)*(j-H)-(G-$)*(F-H)>=0}function Q(k,B){return k.next.i!==B.i&&k.prev.i!==B.i&&!function(k,B){var U=k;do{if(U.i!==k.i&&U.next.i!==k.i&&U.i!==B.i&&U.next.i!==B.i&&J(U,U.next,k,B))return!0;U=U.next}while(U!==k);return!1}(k,B)&&tt(k,B)&&tt(B,k)&&function(k,B){var U=k,F=!1,G=(k.x+B.x)/2,j=(k.y+B.y)/2;do{U.y>j!=U.next.y>j&&U.next.y!==U.y&&G<(U.next.x-U.x)*(j-U.y)/(U.next.y-U.y)+U.x&&(F=!F),U=U.next}while(U!==k);return F}(k,B)}function X(k,B,U){return(B.y-k.y)*(U.x-B.x)-(B.x-k.x)*(U.y-B.y)}function Z(k,B){return k.x===B.x&&k.y===B.y}function J(k,B,U,F){return!!(Z(k,B)&&Z(U,F)||Z(k,F)&&Z(U,B))||X(k,B,U)>0!=X(k,B,F)>0&&X(U,F,k)>0!=X(U,F,B)>0}function tt(k,B){return X(k.prev,k,k.next)<0?X(k,B,k.next)>=0&&X(k,k.prev,B)>=0:X(k,B,k.prev)<0||X(k,k.next,B)<0}function et(k,B){var U=new nt(k.i,k.x,k.y),F=new nt(B.i,B.x,B.y),G=k.next,j=B.prev;return k.next=B,B.prev=k,U.next=G,G.prev=U,F.next=U,U.prev=F,j.next=F,F.prev=j,F}function it(k,B,U,F){var G=new nt(k,B,U);return F?(G.next=F.next,G.prev=F,F.next.prev=G,F.next=G):(G.prev=G,G.next=G),G}function st(k){k.next.prev=k.prev,k.prev.next=k.next,k.prevZ&&(k.prevZ.nextZ=k.nextZ),k.nextZ&&(k.nextZ.prevZ=k.prevZ)}function nt(k,B,U){this.i=k,this.x=B,this.y=U,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function at(k,B,U,F){for(var G=0,j=B,$=U-F;j0&&(F+=k[G-1].length,U.holes.push(F))}return U}},14263:function(k,B,U){var F,G,j;!function($,H){"use strict";G=[U(40343)],void 0===(j="function"==typeof(F=function(k){var B=/(^|@)\S+:\d+/,U=/^\s*at .*(\S+:\d+|\(native\))/m,F=/^(eval@)?(\[native code])?$/;return{parse:function(k){if(void 0!==k.stacktrace||void 0!==k["opera#sourceloc"])return this.parseOpera(k);if(k.stack&&k.stack.match(U))return this.parseV8OrIE(k);if(k.stack)return this.parseFFOrSafari(k);throw new Error("Cannot parse given Error object")},extractLocation:function(k){if(-1===k.indexOf(":"))return[k];var B=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(k.replace(/[()]/g,""));return[B[1],B[2]||void 0,B[3]||void 0]},parseV8OrIE:function(B){return B.stack.split("\n").filter((function(k){return!!k.match(U)}),this).map((function(B){B.indexOf("(eval ")>-1&&(B=B.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var U=B.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),F=U.match(/ (\(.+\)$)/);U=F?U.replace(F[0],""):U;var G=this.extractLocation(F?F[1]:U),j=F&&U||void 0,$=["eval",""].indexOf(G[0])>-1?void 0:G[0];return new k({functionName:j,fileName:$,lineNumber:G[1],columnNumber:G[2],source:B})}),this)},parseFFOrSafari:function(B){return B.stack.split("\n").filter((function(k){return!k.match(F)}),this).map((function(B){if(B.indexOf(" > eval")>-1&&(B=B.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===B.indexOf("@")&&-1===B.indexOf(":"))return new k({functionName:B});var U=/((.*".+"[^@]*)?[^@]*)(?:@)/,F=B.match(U),G=F&&F[1]?F[1]:void 0,j=this.extractLocation(B.replace(U,""));return new k({functionName:G,fileName:j[0],lineNumber:j[1],columnNumber:j[2],source:B})}),this)},parseOpera:function(k){return!k.stacktrace||k.message.indexOf("\n")>-1&&k.message.split("\n").length>k.stacktrace.split("\n").length?this.parseOpera9(k):k.stack?this.parseOpera11(k):this.parseOpera10(k)},parseOpera9:function(B){for(var U=/Line (\d+).*script (?:in )?(\S+)/i,F=B.message.split("\n"),G=[],j=2,$=F.length;j<$;j+=2){var H=U.exec(F[j]);H&&G.push(new k({fileName:H[2],lineNumber:H[1],source:F[j]}))}return G},parseOpera10:function(B){for(var U=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,F=B.stacktrace.split("\n"),G=[],j=0,$=F.length;j<$;j+=2){var H=U.exec(F[j]);H&&G.push(new k({functionName:H[3]||void 0,fileName:H[2],lineNumber:H[1],source:F[j]}))}return G},parseOpera11:function(U){return U.stack.split("\n").filter((function(k){return!!k.match(B)&&!k.match(/^Error created at/)}),this).map((function(B){var U,F=B.split("@"),G=this.extractLocation(F.pop()),j=F.shift()||"",$=j.replace(//,"$2").replace(/\([^)]*\)/g,"")||void 0;j.match(/\(([^)]*)\)/)&&(U=j.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var H=void 0===U||"[arguments not available]"===U?void 0:U.split(",");return new k({functionName:$,args:H,fileName:G[0],lineNumber:G[1],columnNumber:G[2],source:B})}),this)}}})?F.apply(B,G):F)||(k.exports=j)}()},30655:k=>{"use strict";var B=Object.defineProperty||!1;if(B)try{B({},"a",{value:1})}catch(e){B=!1}k.exports=B},41237:k=>{"use strict";k.exports=EvalError},69383:k=>{"use strict";k.exports=Error},79290:k=>{"use strict";k.exports=RangeError},79538:k=>{"use strict";k.exports=ReferenceError},58068:k=>{"use strict";k.exports=SyntaxError},69675:k=>{"use strict";k.exports=TypeError},35345:k=>{"use strict";k.exports=URIError},79612:k=>{"use strict";k.exports=Object},30228:k=>{"use strict";var B=Object.prototype.hasOwnProperty,U="~";function F(){}function G(k,B,U){this.fn=k,this.context=B,this.once=U||!1}function j(k,B,F,j,$){if("function"!=typeof F)throw new TypeError("The listener must be a function");var H=new G(F,j||k,$),V=U?U+B:B;return k._events[V]?k._events[V].fn?k._events[V]=[k._events[V],H]:k._events[V].push(H):(k._events[V]=H,k._eventsCount++),k}function $(k,B){0==--k._eventsCount?k._events=new F:delete k._events[B]}function H(){this._events=new F,this._eventsCount=0}Object.create&&(F.prototype=Object.create(null),(new F).__proto__||(U=!1)),H.prototype.eventNames=function(){var k,F,G=[];if(0===this._eventsCount)return G;for(F in k=this._events)B.call(k,F)&&G.push(U?F.slice(1):F);return Object.getOwnPropertySymbols?G.concat(Object.getOwnPropertySymbols(k)):G},H.prototype.listeners=function(k){var B=U?U+k:k,F=this._events[B];if(!F)return[];if(F.fn)return[F.fn];for(var G=0,j=F.length,$=new Array(j);G{"use strict";var F=U(69600),G=Object.prototype.toString,j=Object.prototype.hasOwnProperty,$=function(k,B,U){for(var F=0,G=k.length;F=3&&(G=U),W(k)?$(k,B,G):"string"==typeof k?H(k,B,G):V(k,B,G)}},89353:k=>{"use strict";var B="Function.prototype.bind called on incompatible ",U=Object.prototype.toString,F=Math.max,G="[object Function]",j=function(k,B){for(var U=[],F=0;F{"use strict";var F=U(89353);k.exports=Function.prototype.bind||F},70453:(k,B,U)=>{"use strict";var F,G=U(79612),j=U(69383),$=U(41237),H=U(79290),V=U(79538),W=U(58068),q=U(69675),K=U(35345),z=U(71514),Y=U(58968),Q=U(6188),X=U(68002),Z=U(75880),J=U(70414),tt=U(73093),et=Function,it=function(k){try{return et('"use strict"; return ('+k+").constructor;")()}catch(e){}},st=U(75795),nt=U(30655),at=function(){throw new q},rt=st?function(){try{return at}catch(k){try{return st(arguments,"callee").get}catch(B){return at}}}():at,ot=U(64039)(),ht=U(93628),ct=U(71064),dt=U(48648),lt=U(11002),ut=U(10076),ft={},bt="undefined"!=typeof Uint8Array&&ht?ht(Uint8Array):F,pt={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?F:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?F:ArrayBuffer,"%ArrayIteratorPrototype%":ot&&ht?ht([][Symbol.iterator]()):F,"%AsyncFromSyncIteratorPrototype%":F,"%AsyncFunction%":ft,"%AsyncGenerator%":ft,"%AsyncGeneratorFunction%":ft,"%AsyncIteratorPrototype%":ft,"%Atomics%":"undefined"==typeof Atomics?F:Atomics,"%BigInt%":"undefined"==typeof BigInt?F:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?F:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?F:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?F:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":j,"%eval%":eval,"%EvalError%":$,"%Float16Array%":"undefined"==typeof Float16Array?F:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?F:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?F:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?F:FinalizationRegistry,"%Function%":et,"%GeneratorFunction%":ft,"%Int8Array%":"undefined"==typeof Int8Array?F:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?F:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?F:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ot&&ht?ht(ht([][Symbol.iterator]())):F,"%JSON%":"object"==typeof JSON?JSON:F,"%Map%":"undefined"==typeof Map?F:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&ot&&ht?ht((new Map)[Symbol.iterator]()):F,"%Math%":Math,"%Number%":Number,"%Object%":G,"%Object.getOwnPropertyDescriptor%":st,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?F:Promise,"%Proxy%":"undefined"==typeof Proxy?F:Proxy,"%RangeError%":H,"%ReferenceError%":V,"%Reflect%":"undefined"==typeof Reflect?F:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?F:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&ot&&ht?ht((new Set)[Symbol.iterator]()):F,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?F:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ot&&ht?ht(""[Symbol.iterator]()):F,"%Symbol%":ot?Symbol:F,"%SyntaxError%":W,"%ThrowTypeError%":rt,"%TypedArray%":bt,"%TypeError%":q,"%Uint8Array%":"undefined"==typeof Uint8Array?F:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?F:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?F:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?F:Uint32Array,"%URIError%":K,"%WeakMap%":"undefined"==typeof WeakMap?F:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?F:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?F:WeakSet,"%Function.prototype.call%":ut,"%Function.prototype.apply%":lt,"%Object.defineProperty%":nt,"%Object.getPrototypeOf%":ct,"%Math.abs%":z,"%Math.floor%":Y,"%Math.max%":Q,"%Math.min%":X,"%Math.pow%":Z,"%Math.round%":J,"%Math.sign%":tt,"%Reflect.getPrototypeOf%":dt};if(ht)try{null.error}catch(e){var vt=ht(ht(e));pt["%Error.prototype%"]=vt}var gt=function k(B){var U;if("%AsyncFunction%"===B)U=it("async function () {}");else if("%GeneratorFunction%"===B)U=it("function* () {}");else if("%AsyncGeneratorFunction%"===B)U=it("async function* () {}");else if("%AsyncGenerator%"===B){var F=k("%AsyncGeneratorFunction%");F&&(U=F.prototype)}else if("%AsyncIteratorPrototype%"===B){var G=k("%AsyncGenerator%");G&&ht&&(U=ht(G.prototype))}return pt[B]=U,U},mt={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},yt=U(66743),_t=U(9957),Et=yt.call(ut,Array.prototype.concat),wt=yt.call(lt,Array.prototype.splice),Tt=yt.call(ut,String.prototype.replace),St=yt.call(ut,String.prototype.slice),At=yt.call(ut,RegExp.prototype.exec),Ct=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ot=/\\(\\)?/g,It=function(k){var B=St(k,0,1),U=St(k,-1);if("%"===B&&"%"!==U)throw new W("invalid intrinsic syntax, expected closing `%`");if("%"===U&&"%"!==B)throw new W("invalid intrinsic syntax, expected opening `%`");var F=[];return Tt(k,Ct,(function(k,B,U,G){F[F.length]=U?Tt(G,Ot,"$1"):B||k})),F},Dt=function(k,B){var U,F=k;if(_t(mt,F)&&(F="%"+(U=mt[F])[0]+"%"),_t(pt,F)){var G=pt[F];if(G===ft&&(G=gt(F)),void 0===G&&!B)throw new q("intrinsic "+k+" exists, but is not available. Please file an issue!");return{alias:U,name:F,value:G}}throw new W("intrinsic "+k+" does not exist!")};k.exports=function(k,B){if("string"!=typeof k||0===k.length)throw new q("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof B)throw new q('"allowMissing" argument must be a boolean');if(null===At(/^%?[^%]*%?$/,k))throw new W("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var U=It(k),F=U.length>0?U[0]:"",G=Dt("%"+F+"%",B),j=G.name,$=G.value,H=!1,V=G.alias;V&&(F=V[0],wt(U,Et([0,1],V)));for(var K=1,z=!0;K=U.length){var Z=st($,Y);$=(z=!!Z)&&"get"in Z&&!("originalValue"in Z.get)?Z.get:$[Y]}else z=_t($,Y),$=$[Y];z&&!H&&(pt[j]=$)}}return $}},71064:(k,B,U)=>{"use strict";var F=U(79612);k.exports=F.getPrototypeOf||null},48648:k=>{"use strict";k.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},93628:(k,B,U)=>{"use strict";var F=U(48648),G=U(71064),j=U(7176);k.exports=F?function(k){return F(k)}:G?function(k){if(!k||"object"!=typeof k&&"function"!=typeof k)throw new TypeError("getProto: not an object");return G(k)}:j?function(k){return j(k)}:null},6549:k=>{"use strict";k.exports=Object.getOwnPropertyDescriptor},75795:(k,B,U)=>{"use strict";var F=U(6549);if(F)try{F([],"length")}catch(e){F=null}k.exports=F},85880:(k,B,U)=>{"use strict";function F(k){if(void 0===k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function G(k,B){k.prototype=Object.create(B.prototype),k.prototype.constructor=k,k.__proto__=B}U.d(B,{os:()=>Pn});var j,$,H,V,W,q,K,z,Y,Q,X,Z,J,tt,et,it={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},st={duration:.5,overwrite:!1,delay:0},nt=1e8,at=1e-8,rt=2*Math.PI,ot=rt/4,ht=0,ct=Math.sqrt,dt=Math.cos,lt=Math.sin,ut=function(k){return"string"==typeof k},ft=function(k){return"function"==typeof k},bt=function(k){return"number"==typeof k},pt=function(k){return void 0===k},vt=function(k){return"object"==typeof k},gt=function(k){return!1!==k},mt=function(){return"undefined"!=typeof window},yt=function(k){return ft(k)||ut(k)},_t="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},Et=Array.isArray,wt=/(?:-?\.?\d|\.)+/gi,Tt=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,St=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,At=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Ct=/[+-]=-?[.\d]+/,Ot=/[^,'"\[\]\s]+/gi,It=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Dt={},Rt={},Pt=function(k){return(Rt=re(k,Dt))&&hs},Mt=function(k,B){return console.warn("Invalid property",k,"set to",B,"Missing plugin? gsap.registerPlugin()")},Nt=function(k,B){return!B&&console.warn(k)},xt=function(k,B){return k&&(Dt[k]=B)&&Rt&&(Rt[k]=B)||Dt},Lt=function(){return 0},kt={suppressEvents:!0,isStart:!0,kill:!1},Bt={suppressEvents:!0,kill:!1},Ut={suppressEvents:!0},Ft={},Gt=[],jt={},$t={},Ht={},Vt=30,Wt=[],qt="",Kt=function(k){var B,U,F=k[0];if(vt(F)||ft(F)||(k=[k]),!(B=(F._gsap||{}).harness)){for(U=Wt.length;U--&&!Wt[U].targetTest(F););B=Wt[U]}for(U=k.length;U--;)k[U]&&(k[U]._gsap||(k[U]._gsap=new wi(k[U],B)))||k.splice(U,1);return k},zt=function(k){return k._gsap||Kt(Fe(k))[0]._gsap},Yt=function(k,B,U){return(U=k[B])&&ft(U)?k[B]():pt(U)&&k.getAttribute&&k.getAttribute(B)||U},Qt=function(k,B){return(k=k.split(",")).forEach(B)||k},Xt=function(k){return Math.round(1e5*k)/1e5||0},Zt=function(k){return Math.round(1e7*k)/1e7||0},Jt=function(k,B){var U=B.charAt(0),F=parseFloat(B.substr(2));return k=parseFloat(k),"+"===U?k+F:"-"===U?k-F:"*"===U?k*F:k/F},te=function(k,B){for(var U=B.length,F=0;k.indexOf(B[F])<0&&++Fj;)$=$._prev;return $?(B._next=$._next,$._next=B):(B._next=k[U],k[U]=B),B._next?B._next._prev=B:k[F]=B,B._prev=$,B.parent=B._dp=k,B},le=function(k,B,U,F){void 0===U&&(U="_first"),void 0===F&&(F="_last");var G=B._prev,j=B._next;G?G._next=j:k[U]===B&&(k[U]=j),j?j._prev=G:k[F]===B&&(k[F]=G),B._next=B._prev=B.parent=null},ue=function(k,B){k.parent&&(!B||k.parent.autoRemoveChildren)&&k.parent.remove&&k.parent.remove(k),k._act=0},fe=function(k,B){if(k&&(!B||B._end>k._dur||B._start<0))for(var U=k;U;)U._dirty=1,U=U.parent;return k},be=function(k){for(var B=k.parent;B&&B.parent;)B._dirty=1,B.totalDuration(),B=B.parent;return k},pe=function(k,B,U,F){return k._startAt&&($?k._startAt.revert(Bt):k.vars.immediateRender&&!k.vars.autoRevert||k._startAt.render(B,!0,F))},ve=function k(B){return!B||B._ts&&k(B.parent)},ge=function(k){return k._repeat?me(k._tTime,k=k.duration()+k._rDelay)*k:0},me=function(k,B){var U=Math.floor(k/=B);return k&&U===k?U-1:U},ye=function(k,B){return(k-B._start)*B._ts+(B._ts>=0?0:B._dirty?B.totalDuration():B._tDur)},_e=function(k){return k._end=Zt(k._start+(k._tDur/Math.abs(k._ts||k._rts||at)||0))},Ee=function(k,B){var U=k._dp;return U&&U.smoothChildTiming&&k._ts&&(k._start=Zt(U._time-(k._ts>0?B/k._ts:((k._dirty?k.totalDuration():k._tDur)-B)/-k._ts)),_e(k),U._dirty||fe(U,k)),k},we=function(k,B){var U;if((B._time||!B._dur&&B._initted||B._startat)&&B.render(U,!0)),fe(k,B)._dp&&k._initted&&k._time>=k._dur&&k._ts){if(k._dur=0&&U.totalTime(U._tTime),U=U._dp;k._zTime=-1e-8}},Te=function(k,B,U,F){return B.parent&&ue(B),B._start=Zt((bt(U)?U:U||k!==V?Pe(k,U,B):k._time)+B._delay),B._end=Zt(B._start+(B.totalDuration()/Math.abs(B.timeScale())||0)),de(k,B,"_first","_last",k._sort?"_start":0),Oe(B)||(k._recent=B),F||we(k,B),k._ts<0&&Ee(k,k._tTime),k},Se=function(k,B){return(Dt.ScrollTrigger||Mt("scrollTrigger",B))&&Dt.ScrollTrigger.create(B,k)},Ae=function(k,B,U,F,G){return Ri(k,B,G),k._initted?!U&&k._pt&&!$&&(k._dur&&!1!==k.vars.lazy||!k._dur&&k.vars.lazy)&&Y!==ci.frame?(Gt.push(k),k._lazy=[G,F],1):void 0:1},Ce=function k(B){var U=B.parent;return U&&U._ts&&U._initted&&!U._lock&&(U.rawTime()<0||k(U))},Oe=function(k){var B=k.data;return"isFromStart"===B||"isStart"===B},Ie=function(k,B,U,F){var G=k._repeat,j=Zt(B)||0,$=k._tTime/k._tDur;return $&&!F&&(k._time*=j/k._dur),k._dur=j,k._tDur=G?G<0?1e10:Zt(j*(G+1)+k._rDelay*G):j,$>0&&!F&&Ee(k,k._tTime=k._tDur*$),k.parent&&_e(k),U||fe(k.parent,k),k},De=function(k){return k instanceof Si?fe(k):Ie(k,k._dur)},Re={_start:0,endTime:Lt,totalDuration:Lt},Pe=function k(B,U,F){var G,j,$,H=B.labels,V=B._recent||Re,W=B.duration()>=nt?V.endTime(!1):B._dur;return ut(U)&&(isNaN(U)||U in H)?(j=U.charAt(0),$="%"===U.substr(-1),G=U.indexOf("="),"<"===j||">"===j?(G>=0&&(U=U.replace(/=/,"")),("<"===j?V._start:V.endTime(V._repeat>=0))+(parseFloat(U.substr(1))||0)*($?(G<0?V:F).totalDuration()/100:1)):G<0?(U in H||(H[U]=W),H[U]):(j=parseFloat(U.charAt(G-1)+U.substr(G+1)),$&&F&&(j=j/100*(Et(F)?F[0]:F).totalDuration()),G>1?k(B,U.substr(0,G-1),F)+j:W+j)):null==U?W:+U},Me=function(k,B,U){var F,G,j=bt(B[1]),$=(j?2:1)+(k<2?0:1),H=B[$];if(j&&(H.duration=B[1]),H.parent=U,k){for(F=H,G=U;G&&!("immediateRender"in F);)F=G.vars.defaults||{},G=gt(G.vars.inherit)&&G.parent;H.immediateRender=gt(F.immediateRender),k<2?H.runBackwards=1:H.startAt=B[$-1]}return new Li(B[0],H,B[$+1])},Ne=function(k,B){return k||0===k?B(k):B},xe=function(k,B,U){return UB?B:U},Le=function(k,B){return ut(k)&&(B=It.exec(k))?B[1]:""},ke=[].slice,Be=function(k,B){return k&&vt(k)&&"length"in k&&(!B&&!k.length||k.length-1 in k&&vt(k[0]))&&!k.nodeType&&k!==W},Ue=function(k,B,U){return void 0===U&&(U=[]),k.forEach((function(k){var F;return ut(k)&&!B||Be(k,1)?(F=U).push.apply(F,Fe(k)):U.push(k)}))||U},Fe=function(k,B,U){return H&&!B&&H.selector?H.selector(k):!ut(k)||U||!q&&di()?Et(k)?Ue(k,U):Be(k)?ke.call(k,0):k?[k]:[]:ke.call((B||K).querySelectorAll(k),0)},Ge=function(k){return k=Fe(k)[0]||Nt("Invalid scope")||{},function(B){var U=k.current||k.nativeElement||k;return Fe(B,U.querySelectorAll?U:U===k?Nt("Invalid scope")||K.createElement("div"):k)}},je=function(k){return k.sort((function(){return.5-Math.random()}))},$e=function(k){if(ft(k))return k;var B=vt(k)?k:{each:k},U=gi(B.ease),F=B.from||0,G=parseFloat(B.base)||0,j={},$=F>0&&F<1,H=isNaN(F)||$,V=B.axis,W=F,q=F;return ut(F)?W=q={center:.5,edges:.5,end:1}[F]||0:!$&&H&&(W=F[0],q=F[1]),function(k,$,K){var z,Y,Q,X,Z,J,tt,et,it,st=(K||B).length,at=j[st];if(!at){if(!(it="auto"===B.grid?0:(B.grid||[1,nt])[1])){for(tt=-nt;tt<(tt=K[it++].getBoundingClientRect().left)&&ittt&&(tt=Z),Zst?st-1:V?"y"===V?st/it:it:Math.max(it,st/it))||0)*("edges"===F?-1:1),at.b=st<0?G-st:G,at.u=Le(B.amount||B.each)||0,U=U&&st<0?pi(U):U}return st=(at[k]-at.min)/at.max||0,Zt(at.b+(U?U(st):st)*at.v)+at.u}},He=function(k){var B=Math.pow(10,((k+"").split(".")[1]||"").length);return function(U){var F=Zt(Math.round(parseFloat(U)/k)*k*B);return(F-F%1)/B+(bt(U)?0:Le(U))}},Ve=function(k,B){var U,F,G=Et(k);return!G&&vt(k)&&(U=G=k.radius||nt,k.values?(k=Fe(k.values),(F=!bt(k[0]))&&(U*=U)):k=He(k.increment)),Ne(B,G?ft(k)?function(B){return F=k(B),Math.abs(F-B)<=U?F:B}:function(B){for(var G,j,$=parseFloat(F?B.x:B),H=parseFloat(F?B.y:0),V=nt,W=0,q=k.length;q--;)(G=F?(G=k[q].x-$)*G+(j=k[q].y-H)*j:Math.abs(k[q]-$))(G=Math.abs(G))&&(j=F,H=G);return j},Qe=function(k,B,U){var F,G,j,$=k.vars,V=$[B],W=H,q=k._ctx;if(V)return F=$[B+"Params"],G=$.callbackScope||k,U&&Gt.length&&ee(),q&&(H=q),j=F?V.apply(G,F):V.call(G),H=W,j},Xe=function(k){return ue(k),k.scrollTrigger&&k.scrollTrigger.kill(!!$),k.progress()<1&&Qe(k,"onInterrupt"),k},Ze=[],Je=function(k){if(k)if(k=!k.name&&k.default||k,mt()||k.headless){var B=k.name,U=ft(k),F=B&&!U&&k.init?function(){this._props=[]}:k,G={init:Lt,render:Vi,add:Ii,kill:qi,modifier:Wi,rawVars:0},j={targetTest:0,get:0,getSetter:Gi,aliases:{},register:0};if(di(),k!==F){if($t[B])return;ae(F,ae(he(k,G),j)),re(F.prototype,re(G,he(k,j))),$t[F.prop=B]=F,k.targetTest&&(Wt.push(F),Ft[B]=1),B=("css"===B?"CSS":B.charAt(0).toUpperCase()+B.substr(1))+"Plugin"}xt(B,F),k.register&&k.register(hs,F,Yi)}else Ze.push(k)},ti=255,ei={aqua:[0,ti,ti],lime:[0,ti,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,ti],navy:[0,0,128],white:[ti,ti,ti],olive:[128,128,0],yellow:[ti,ti,0],orange:[ti,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[ti,0,0],pink:[ti,192,203],cyan:[0,ti,ti],transparent:[ti,ti,ti,0]},ii=function(k,B,U){return(6*(k+=k<0?1:k>1?-1:0)<1?B+(U-B)*k*6:k<.5?U:3*k<2?B+(U-B)*(2/3-k)*6:B)*ti+.5|0},si=function(k,B,U){var F,G,j,$,H,V,W,q,K,z,Y=k?bt(k)?[k>>16,k>>8&ti,k&ti]:0:ei.black;if(!Y){if(","===k.substr(-1)&&(k=k.substr(0,k.length-1)),ei[k])Y=ei[k];else if("#"===k.charAt(0)){if(k.length<6&&(F=k.charAt(1),G=k.charAt(2),j=k.charAt(3),k="#"+F+F+G+G+j+j+(5===k.length?k.charAt(4)+k.charAt(4):"")),9===k.length)return[(Y=parseInt(k.substr(1,6),16))>>16,Y>>8&ti,Y&ti,parseInt(k.substr(7),16)/255];Y=[(k=parseInt(k.substr(1),16))>>16,k>>8&ti,k&ti]}else if("hsl"===k.substr(0,3))if(Y=z=k.match(wt),B){if(~k.indexOf("="))return Y=k.match(Tt),U&&Y.length<4&&(Y[3]=1),Y}else $=+Y[0]%360/360,H=+Y[1]/100,F=2*(V=+Y[2]/100)-(G=V<=.5?V*(H+1):V+H-V*H),Y.length>3&&(Y[3]*=1),Y[0]=ii($+1/3,F,G),Y[1]=ii($,F,G),Y[2]=ii($-1/3,F,G);else Y=k.match(wt)||ei.transparent;Y=Y.map(Number)}return B&&!z&&(F=Y[0]/ti,G=Y[1]/ti,j=Y[2]/ti,V=((W=Math.max(F,G,j))+(q=Math.min(F,G,j)))/2,W===q?$=H=0:(K=W-q,H=V>.5?K/(2-W-q):K/(W+q),$=W===F?(G-j)/K+(GH||et<0)&&(Y+=et-V),((q=(z=(Q+=et)-Y)-J)>0||it)&&(X=++F.frame,G=z-1e3*F.time,F.time=z/=1e3,J+=q+(q>=Z?4:Z-q),K=1),it||(k=B(U)),K)for(j=0;j=B&&j--},_listeners:tt}}(),di=function(){return!X&&ci.wake()},li={},ui=/^[\d.\-M][\d.\-,\s]/,fi=/["']/g,bi=function(k){for(var B,U,F,G={},j=k.substr(1,k.length-3).split(":"),$=j[0],H=1,V=j.length;H1&&$.config?$.config.apply(null,~k.indexOf("{")?[bi(j[1])]:(B=k,U=B.indexOf("(")+1,F=B.indexOf(")"),G=B.indexOf("(",U),B.substring(U,~G&&G=1?U:1,j=(F||(B?.3:.45))/(U<1?U:1),$=j/rt*(Math.asin(1/G)||0),H=function(k){return 1===k?1:G*Math.pow(2,-10*k)*lt((k-$)*j)+1},V="out"===B?H:"in"===B?function(k){return 1-H(1-k)}:yi(H);return j=rt/j,V.config=function(U,F){return k(B,U,F)},V},Ei=function k(B,U){void 0===U&&(U=1.70158);var F=function(k){return k?--k*k*((U+1)*k+U)+1:0},G="out"===B?F:"in"===B?function(k){return 1-F(1-k)}:yi(F);return G.config=function(U){return k(B,U)},G};Qt("Linear,Quad,Cubic,Quart,Quint,Strong",(function(k,B){var U=B<5?B+1:B;mi(k+",Power"+(U-1),B?function(k){return Math.pow(k,U)}:function(k){return k},(function(k){return 1-Math.pow(1-k,U)}),(function(k){return k<.5?Math.pow(2*k,U)/2:1-Math.pow(2*(1-k),U)/2}))})),li.Linear.easeNone=li.none=li.Linear.easeIn,mi("Elastic",_i("in"),_i("out"),_i()),Z=7.5625,tt=1/(J=2.75),mi("Bounce",(function(k){return 1-et(1-k)}),et=function(k){return k0?k+(k+this._rDelay)*this._repeat:k):this.totalDuration()&&this._dur},B.totalDuration=function(k){return arguments.length?(this._dirty=0,Ie(this,this._repeat<0?k:(k-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},B.totalTime=function(k,B){if(di(),!arguments.length)return this._tTime;var U=this._dp;if(U&&U.smoothChildTiming&&this._ts){for(Ee(this,k),!U._dp||U.parent||we(U,this);U&&U.parent;)U.parent._time!==U._start+(U._ts>=0?U._tTime/U._ts:(U.totalDuration()-U._tTime)/-U._ts)&&U.totalTime(U._tTime,!0),U=U.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&k0||!this._tDur&&!k)&&Te(this._dp,this,this._start-this._delay)}return(this._tTime!==k||!this._dur&&!B||this._initted&&Math.abs(this._zTime)===at||!k&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=k),ie(this,k,B)),this},B.time=function(k,B){return arguments.length?this.totalTime(Math.min(this.totalDuration(),k+ge(this))%(this._dur+this._rDelay)||(k?this._dur:0),B):this._time},B.totalProgress=function(k,B){return arguments.length?this.totalTime(this.totalDuration()*k,B):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},B.progress=function(k,B){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?k:1-k)+ge(this),B):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},B.iteration=function(k,B){var U=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(k-1)*U,B):this._repeat?me(this._tTime,U)+1:1},B.timeScale=function(k,B){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===k)return this;var U=this.parent&&this._ts?ye(this.parent._time,this):this._tTime;return this._rts=+k||0,this._ts=this._ps||-1e-8===k?0:this._rts,this.totalTime(xe(-Math.abs(this._delay),this._tDur,U),!1!==B),_e(this),be(this)},B.paused=function(k){return arguments.length?(this._ps!==k&&(this._ps=k,k?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(di(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==at&&(this._tTime-=at)))),this):this._ps},B.startTime=function(k){if(arguments.length){this._start=k;var B=this.parent||this._dp;return B&&(B._sort||!this.parent)&&Te(B,this,k-this._delay),this}return this._start},B.endTime=function(k){return this._start+(gt(k)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},B.rawTime=function(k){var B=this.parent||this._dp;return B?k&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?ye(B.rawTime(k),this):this._tTime:this._tTime},B.revert=function(k){void 0===k&&(k=Ut);var B=$;return $=k,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(k),this.totalTime(-.01,k.suppressEvents)),"nested"!==this.data&&!1!==k.kill&&this.kill(),$=B,this},B.globalTime=function(k){for(var B=this,U=arguments.length?k:B.rawTime();B;)U=B._start+U/(Math.abs(B._ts)||1),B=B._dp;return!this.parent&&this._sat?this._sat.globalTime(k):U},B.repeat=function(k){return arguments.length?(this._repeat=k===1/0?-2:k,De(this)):-2===this._repeat?1/0:this._repeat},B.repeatDelay=function(k){if(arguments.length){var B=this._time;return this._rDelay=k,De(this),B?this.time(B):this}return this._rDelay},B.yoyo=function(k){return arguments.length?(this._yoyo=k,this):this._yoyo},B.seek=function(k,B){return this.totalTime(Pe(this,k),gt(B))},B.restart=function(k,B){return this.play().totalTime(k?-this._delay:0,gt(B))},B.play=function(k,B){return null!=k&&this.seek(k,B),this.reversed(!1).paused(!1)},B.reverse=function(k,B){return null!=k&&this.seek(k||this.totalDuration(),B),this.reversed(!0).paused(!1)},B.pause=function(k,B){return null!=k&&this.seek(k,B),this.paused(!0)},B.resume=function(){return this.paused(!1)},B.reversed=function(k){return arguments.length?(!!k!==this.reversed()&&this.timeScale(-this._rts||(k?-1e-8:0)),this):this._rts<0},B.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},B.isActive=function(){var k,B=this.parent||this._dp,U=this._start;return!(B&&!(this._ts&&this._initted&&B.isActive()&&(k=B.rawTime(!0))>=U&&k1?(B?(F[k]=B,U&&(F[k+"Params"]=U),"onUpdate"===k&&(this._onUpdate=B)):delete F[k],this):F[k]},B.then=function(k){var B=this;return new Promise((function(U){var F=ft(k)?k:ne,G=function(){var k=B.then;B.then=null,ft(F)&&(F=F(B))&&(F.then||F===B)&&(B.then=k),U(F),B.then=k};B._initted&&1===B.totalProgress()&&B._ts>=0||!B._tTime&&B._ts<0?G():B._prom=G}))},B.kill=function(){Xe(this)},k}();ae(Ti.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-1e-8,_prom:0,_ps:!1,_rts:1});var Si=function(k){function B(B,U){var G;return void 0===B&&(B={}),(G=k.call(this,B)||this).labels={},G.smoothChildTiming=!!B.smoothChildTiming,G.autoRemoveChildren=!!B.autoRemoveChildren,G._sort=gt(B.sortChildren),V&&Te(B.parent||V,F(G),U),B.reversed&&G.reverse(),B.paused&&G.paused(!0),B.scrollTrigger&&Se(F(G),B.scrollTrigger),G}G(B,k);var U=B.prototype;return U.to=function(k,B,U){return Me(0,arguments,this),this},U.from=function(k,B,U){return Me(1,arguments,this),this},U.fromTo=function(k,B,U,F){return Me(2,arguments,this),this},U.set=function(k,B,U){return B.duration=0,B.parent=this,ce(B).repeatDelay||(B.repeat=0),B.immediateRender=!!B.immediateRender,new Li(k,B,Pe(this,U),1),this},U.call=function(k,B,U){return Te(this,Li.delayedCall(0,k,B),U)},U.staggerTo=function(k,B,U,F,G,j,$){return U.duration=B,U.stagger=U.stagger||F,U.onComplete=j,U.onCompleteParams=$,U.parent=this,new Li(k,U,Pe(this,G)),this},U.staggerFrom=function(k,B,U,F,G,j,$){return U.runBackwards=1,ce(U).immediateRender=gt(U.immediateRender),this.staggerTo(k,B,U,F,G,j,$)},U.staggerFromTo=function(k,B,U,F,G,j,$,H){return F.startAt=U,ce(F).immediateRender=gt(F.immediateRender),this.staggerTo(k,B,F,G,j,$,H)},U.render=function(k,B,U){var F,G,j,H,W,q,K,z,Y,Q,X,Z,J=this._time,tt=this._dirty?this.totalDuration():this._tDur,et=this._dur,it=k<=0?0:Zt(k),st=this._zTime<0!=k<0&&(this._initted||!et);if(this!==V&&it>tt&&k>=0&&(it=tt),it!==this._tTime||U||st){if(J!==this._time&&et&&(it+=this._time-J,k+=this._time-J),F=it,Y=this._start,q=!(z=this._ts),st&&(et||(J=this._zTime),(k||!B)&&(this._zTime=k)),this._repeat){if(X=this._yoyo,W=et+this._rDelay,this._repeat<-1&&k<0)return this.totalTime(100*W+k,B,U);if(F=Zt(it%W),it===tt?(H=this._repeat,F=et):((H=~~(it/W))&&H===it/W&&(F=et,H--),F>et&&(F=et)),Q=me(this._tTime,W),!J&&this._tTime&&Q!==H&&this._tTime-Q*W-this._dur<=0&&(Q=H),X&&1&H&&(F=et-F,Z=1),H!==Q&&!this._lock){var nt=X&&1&Q,rt=nt===(X&&1&H);if(HB)for(F=k._first;F&&F._start<=U;){if("isPause"===F.data&&F._start>B)return F;F=F._next}else for(F=k._last;F&&F._start>=U;){if("isPause"===F.data&&F._start=J&&k>=0)for(G=this._first;G;){if(j=G._next,(G._act||F>=G._start)&&G._ts&&K!==G){if(G.parent!==this)return this.render(k,B,U);if(G.render(G._ts>0?(F-G._start)*G._ts:(G._dirty?G.totalDuration():G._tDur)+(F-G._start)*G._ts,B,U),F!==this._time||!this._ts&&!q){K=0,j&&(it+=this._zTime=-1e-8);break}}G=j}else{G=this._last;for(var ot=k<0?k:F;G;){if(j=G._prev,(G._act||ot<=G._end)&&G._ts&&K!==G){if(G.parent!==this)return this.render(k,B,U);if(G.render(G._ts>0?(ot-G._start)*G._ts:(G._dirty?G.totalDuration():G._tDur)+(ot-G._start)*G._ts,B,U||$&&(G._initted||G._startAt)),F!==this._time||!this._ts&&!q){K=0,j&&(it+=this._zTime=ot?-1e-8:at);break}}G=j}}if(K&&!B&&(this.pause(),K.render(F>=J?0:-1e-8)._zTime=F>=J?1:-1,this._ts))return this._start=Y,_e(this),this.render(k,B,U);this._onUpdate&&!B&&Qe(this,"onUpdate",!0),(it===tt&&this._tTime>=this.totalDuration()||!it&&J)&&(Y!==this._start&&Math.abs(z)===Math.abs(this._ts)||this._lock||((k||!et)&&(it===tt&&this._ts>0||!it&&this._ts<0)&&ue(this,1),B||k<0&&!J||!it&&!J&&tt||(Qe(this,it===tt&&k>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(it0)&&this._prom())))}return this},U.add=function(k,B){var U=this;if(bt(B)||(B=Pe(this,B,k)),!(k instanceof Ti)){if(Et(k))return k.forEach((function(k){return U.add(k,B)})),this;if(ut(k))return this.addLabel(k,B);if(!ft(k))return this;k=Li.delayedCall(0,k)}return this!==k?Te(this,k,B):this},U.getChildren=function(k,B,U,F){void 0===k&&(k=!0),void 0===B&&(B=!0),void 0===U&&(U=!0),void 0===F&&(F=-nt);for(var G=[],j=this._first;j;)j._start>=F&&(j instanceof Li?B&&G.push(j):(U&&G.push(j),k&&G.push.apply(G,j.getChildren(!0,B,U)))),j=j._next;return G},U.getById=function(k){for(var B=this.getChildren(1,1,1),U=B.length;U--;)if(B[U].vars.id===k)return B[U]},U.remove=function(k){return ut(k)?this.removeLabel(k):ft(k)?this.killTweensOf(k):(le(this,k),k===this._recent&&(this._recent=this._last),fe(this))},U.totalTime=function(B,U){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Zt(ci.time-(this._ts>0?B/this._ts:(this.totalDuration()-B)/-this._ts))),k.prototype.totalTime.call(this,B,U),this._forcing=0,this):this._tTime},U.addLabel=function(k,B){return this.labels[k]=Pe(this,B),this},U.removeLabel=function(k){return delete this.labels[k],this},U.addPause=function(k,B,U){var F=Li.delayedCall(0,B||Lt,U);return F.data="isPause",this._hasPause=1,Te(this,F,Pe(this,k))},U.removePause=function(k){var B=this._first;for(k=Pe(this,k);B;)B._start===k&&"isPause"===B.data&&ue(B),B=B._next},U.killTweensOf=function(k,B,U){for(var F=this.getTweensOf(k,U),G=F.length;G--;)Ai!==F[G]&&F[G].kill(k,B);return this},U.getTweensOf=function(k,B){for(var U,F=[],G=Fe(k),j=this._first,$=bt(B);j;)j instanceof Li?te(j._targets,G)&&($?(!Ai||j._initted&&j._ts)&&j.globalTime(0)<=B&&j.globalTime(j.totalDuration())>B:!B||j.isActive())&&F.push(j):(U=j.getTweensOf(G,B)).length&&F.push.apply(F,U),j=j._next;return F},U.tweenTo=function(k,B){B=B||{};var U,F=this,G=Pe(F,k),j=B,$=j.startAt,H=j.onStart,V=j.onStartParams,W=j.immediateRender,q=Li.to(F,ae({ease:B.ease||"none",lazy:!1,immediateRender:!1,time:G,overwrite:"auto",duration:B.duration||Math.abs((G-($&&"time"in $?$.time:F._time))/F.timeScale())||at,onStart:function(){if(F.pause(),!U){var k=B.duration||Math.abs((G-($&&"time"in $?$.time:F._time))/F.timeScale());q._dur!==k&&Ie(q,k,0,1).render(q._time,!0,!0),U=1}H&&H.apply(q,V||[])}},B));return W?q.render(0):q},U.tweenFromTo=function(k,B,U){return this.tweenTo(B,ae({startAt:{time:Pe(this,k)}},U))},U.recent=function(){return this._recent},U.nextLabel=function(k){return void 0===k&&(k=this._time),Ye(this,Pe(this,k))},U.previousLabel=function(k){return void 0===k&&(k=this._time),Ye(this,Pe(this,k),1)},U.currentLabel=function(k){return arguments.length?this.seek(k,!0):this.previousLabel(this._time+at)},U.shiftChildren=function(k,B,U){void 0===U&&(U=0);for(var F,G=this._first,j=this.labels;G;)G._start>=U&&(G._start+=k,G._end+=k),G=G._next;if(B)for(F in j)j[F]>=U&&(j[F]+=k);return fe(this)},U.invalidate=function(B){var U=this._first;for(this._lock=0;U;)U.invalidate(B),U=U._next;return k.prototype.invalidate.call(this,B)},U.clear=function(k){void 0===k&&(k=!0);for(var B,U=this._first;U;)B=U._next,this.remove(U),U=B;return this._dp&&(this._time=this._tTime=this._pTime=0),k&&(this.labels={}),fe(this)},U.totalDuration=function(k){var B,U,F,G=0,j=this,$=j._last,H=nt;if(arguments.length)return j.timeScale((j._repeat<0?j.duration():j.totalDuration())/(j.reversed()?-k:k));if(j._dirty){for(F=j.parent;$;)B=$._prev,$._dirty&&$.totalDuration(),(U=$._start)>H&&j._sort&&$._ts&&!j._lock?(j._lock=1,Te(j,$,U-$._delay,1)._lock=0):H=U,U<0&&$._ts&&(G-=U,(!F&&!j._dp||F&&F.smoothChildTiming)&&(j._start+=U/j._ts,j._time-=U,j._tTime-=U),j.shiftChildren(-U,!1,-Infinity),H=0),$._end>G&&$._ts&&(G=$._end),$=B;Ie(j,j===V&&j._time>G?j._time:G,1,1),j._dirty=0}return j._tDur},B.updateRoot=function(k){if(V._ts&&(ie(V,ye(k,V)),Y=ci.frame),ci.frame>=Vt){Vt+=it.autoSleep||120;var B=V._first;if((!B||!B._ts)&&it.autoSleep&&ci._listeners.length<2){for(;B&&!B._ts;)B=B._next;B||ci.sleep()}}},B}(Ti);ae(Si.prototype,{_lock:0,_hasPause:0,_forcing:0});var Ai,Ci,Oi=function(k,B,U,F,G,j,$){var H,V,W,q,K,z,Y,Q,X=new Yi(this._pt,k,B,0,1,Hi,null,G),Z=0,J=0;for(X.b=U,X.e=F,U+="",(Y=~(F+="").indexOf("random("))&&(F=Ke(F)),j&&(j(Q=[U,F],k,B),U=Q[0],F=Q[1]),V=U.match(At)||[];H=At.exec(F);)q=H[0],K=F.substring(Z,H.index),W?W=(W+1)%5:"rgba("===K.substr(-5)&&(W=1),q!==V[J++]&&(z=parseFloat(V[J-1])||0,X._pt={_next:X._pt,p:K||1===J?K:",",s:z,c:"="===q.charAt(1)?Jt(z,q)-z:parseFloat(q)-z,m:W&&W<4?Math.round:0},Z=At.lastIndex);return X.c=Z")})),W.duration();else{for(Y in K={},rt)"ease"===Y||"easeEach"===Y||Pi(Y,rt[Y],K,rt.easeEach);for(Y in K)for(ut=K[Y].sort((function(k,B){return k.t-B.t})),mt=0,q=0;qQ-at&&!Z?Q:kX&&(F=X)),(W=this._yoyo&&1&j)&&(z=this._yEase,F=X-F),V=me(this._tTime,H),F===Y&&!U&&this._initted&&j===V)return this._tTime=J,this;j!==V&&(K&&this._yEase&&vi(K,W),this.vars.repeatRefresh&&!W&&!this._lock&&this._time!==H&&this._initted&&(this._lock=U=1,this.render(Zt(H*j),!0).invalidate()._lock=0))}if(!this._initted){if(Ae(this,Z?k:F,U,B,J))return this._tTime=0,this;if(!(Y===this._time||U&&this.vars.repeatRefresh&&j!==V))return this;if(X!==this._dur)return this.render(k,B,U)}if(this._tTime=J,this._time=F,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=q=(z||this._ease)(F/X),this._from&&(this.ratio=q=1-q),F&&!Y&&!B&&!j&&(Qe(this,"onStart"),this._tTime!==J))return this;for(G=this._pt;G;)G.r(q,G.d),G=G._next;K&&K.render(k<0?k:K._dur*K._ease(F/this._dur),B,U)||this._startAt&&(this._zTime=k),this._onUpdate&&!B&&(Z&&pe(this,k,0,U),Qe(this,"onUpdate")),this._repeat&&j!==V&&this.vars.onRepeat&&!B&&this.parent&&Qe(this,"onRepeat"),J!==this._tDur&&J||this._tTime!==J||(Z&&!this._onUpdate&&pe(this,k,0,!0),(k||!X)&&(J===this._tDur&&this._ts>0||!J&&this._ts<0)&&ue(this,1),B||Z&&!Y||!(J||Y||W)||(Qe(this,J===Q?"onComplete":"onReverseComplete",!0),this._prom&&!(J0)&&this._prom()))}}else!function(k,B,U,F){var G,j,H,V=k.ratio,W=B<0||!B&&(!k._start&&Ce(k)&&(k._initted||!Oe(k))||(k._ts<0||k._dp._ts<0)&&!Oe(k))?0:1,q=k._rDelay,K=0;if(q&&k._repeat&&(K=xe(0,k._tDur,B),j=me(K,q),k._yoyo&&1&j&&(W=1-W),j!==me(k._tTime,q)&&(V=1-W,k.vars.repeatRefresh&&k._initted&&k.invalidate())),W!==V||$||F||k._zTime===at||!B&&k._zTime){if(!k._initted&&Ae(k,B,F,U,K))return;for(H=k._zTime,k._zTime=B||(U?at:0),U||(U=B&&!H),k.ratio=W,k._from&&(W=1-W),k._time=0,k._tTime=K,G=k._pt;G;)G.r(W,G.d),G=G._next;B<0&&pe(k,B,0,!0),k._onUpdate&&!U&&Qe(k,"onUpdate"),K&&k._repeat&&!U&&k.parent&&Qe(k,"onRepeat"),(B>=k._tDur||B<0)&&k.ratio===W&&(W&&ue(k,1),U||$||(Qe(k,W?"onComplete":"onReverseComplete",!0),k._prom&&k._prom()))}else k._zTime||(k._zTime=B)}(this,k,B,U);return this},U.targets=function(){return this._targets},U.invalidate=function(B){return(!B||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(B),k.prototype.invalidate.call(this,B)},U.resetTo=function(k,B,U,F,G){X||ci.wake(),this._ts||this.play();var j=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Ri(this,j),function(k,B,U,F,G,j,$,H){var V,W,q,K,z=(k._pt&&k._ptCache||(k._ptCache={}))[B];if(!z)for(z=k._ptCache[B]=[],q=k._ptLookup,K=k._targets.length;K--;){if((V=q[K][B])&&V.d&&V.d._pt)for(V=V.d._pt;V&&V.p!==B&&V.fp!==B;)V=V._next;if(!V)return Ci=1,k.vars[B]="+=0",Ri(k,$),Ci=0,H?Nt(B+" not eligible for reset"):1;z.push(V)}for(K=z.length;K--;)(V=(W=z[K])._pt||W).s=!F&&0!==F||G?V.s+(F||0)+j*V.c:F,V.c=U-V.s,W.e&&(W.e=Xt(U)+Le(W.e)),W.b&&(W.b=V.s+Le(W.b))}(this,k,B,U,F,this._ease(j/this._dur),j,G)?this.resetTo(k,B,U,F,1):(Ee(this,0),this.parent||de(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},U.kill=function(k,B){if(void 0===B&&(B="all"),!(k||B&&"all"!==B))return this._lazy=this._pt=0,this.parent?Xe(this):this;if(this.timeline){var U=this.timeline.totalDuration();return this.timeline.killTweensOf(k,B,Ai&&!0!==Ai.vars.overwrite)._first||Xe(this),this.parent&&U!==this.timeline.totalDuration()&&Ie(this,this._dur*this.timeline._tDur/U,0,1),this}var F,G,j,$,H,V,W,q=this._targets,K=k?Fe(k):q,z=this._ptLookup,Y=this._pt;if((!B||"all"===B)&&function(k,B){for(var U=k.length,F=U===B.length;F&&U--&&k[U]===B[U];);return U<0}(q,K))return"all"===B&&(this._pt=0),Xe(this);for(F=this._op=this._op||[],"all"!==B&&(ut(B)&&(H={},Qt(B,(function(k){return H[k]=1})),B=H),B=function(k,B){var U,F,G,j,$=k[0]?zt(k[0]).harness:0,H=$&&$.aliases;if(!H)return B;for(F in U=re({},B),H)if(F in U)for(G=(j=H[F].split(",")).length;G--;)U[j[G]]=U[F];return U}(q,B)),W=q.length;W--;)if(~K.indexOf(q[W]))for(H in G=z[W],"all"===B?(F[W]=B,$=G,j={}):(j=F[W]=F[W]||{},$=B),$)(V=G&&G[H])&&("kill"in V.d&&!0!==V.d.kill(H)||le(this,V,"_pt"),delete G[H]),"all"!==j&&(j[H]=1);return this._initted&&!this._pt&&Y&&Xe(this),this},B.to=function(k,U){return new B(k,U,arguments[2])},B.from=function(k,B){return Me(1,arguments)},B.delayedCall=function(k,U,F,G){return new B(U,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:k,onComplete:U,onReverseComplete:U,onCompleteParams:F,onReverseCompleteParams:F,callbackScope:G})},B.fromTo=function(k,B,U){return Me(2,arguments)},B.set=function(k,U){return U.duration=0,U.repeatDelay||(U.repeat=0),new B(k,U)},B.killTweensOf=function(k,B,U){return V.killTweensOf(k,B,U)},B}(Ti);ae(Li.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),Qt("staggerTo,staggerFrom,staggerFromTo",(function(k){Li[k]=function(){var B=new Si,U=ke.call(arguments,0);return U.splice("staggerFromTo"===k?5:4,0,0),B[k].apply(B,U)}}));var ki=function(k,B,U){return k[B]=U},Bi=function(k,B,U){return k[B](U)},Ui=function(k,B,U,F){return k[B](F.fp,U)},Fi=function(k,B,U){return k.setAttribute(B,U)},Gi=function(k,B){return ft(k[B])?Bi:pt(k[B])&&k.setAttribute?Fi:ki},ji=function(k,B){return B.set(B.t,B.p,Math.round(1e6*(B.s+B.c*k))/1e6,B)},$i=function(k,B){return B.set(B.t,B.p,!!(B.s+B.c*k),B)},Hi=function(k,B){var U=B._pt,F="";if(!k&&B.b)F=B.b;else if(1===k&&B.e)F=B.e;else{for(;U;)F=U.p+(U.m?U.m(U.s+U.c*k):Math.round(1e4*(U.s+U.c*k))/1e4)+F,U=U._next;F+=B.c}B.set(B.t,B.p,F,B)},Vi=function(k,B){for(var U=B._pt;U;)U.r(k,U.d),U=U._next},Wi=function(k,B,U,F){for(var G,j=this._pt;j;)G=j._next,j.p===F&&j.modifier(k,B,U),j=G},qi=function(k){for(var B,U,F=this._pt;F;)U=F._next,F.p===k&&!F.op||F.op===k?le(this,F,"_pt"):F.dep||(B=1),F=U;return!B},Ki=function(k,B,U,F){F.mSet(k,B,F.m.call(F.tween,U,F.mt),F)},zi=function(k){for(var B,U,F,G,j=k._pt;j;){for(B=j._next,U=F;U&&U.pr>j.pr;)U=U._next;(j._prev=U?U._prev:G)?j._prev._next=j:F=j,(j._next=U)?U._prev=j:G=j,j=B}k._pt=F},Yi=function(){function k(k,B,U,F,G,j,$,H,V){this.t=B,this.s=F,this.c=G,this.p=U,this.r=j||ji,this.d=$||this,this.set=H||ki,this.pr=V||0,this._next=k,k&&(k._prev=this)}return k.prototype.modifier=function(k,B,U){this.mSet=this.mSet||this.set,this.set=Ki,this.m=k,this.mt=U,this.tween=B},k}();Qt(qt+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",(function(k){return Ft[k]=1})),Dt.TweenMax=Dt.TweenLite=Li,Dt.TimelineLite=Dt.TimelineMax=Si,V=new Si({sortChildren:!1,defaults:st,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),it.stringFilter=hi;var Qi=[],Xi={},Zi=[],Ji=0,ts=0,es=function(k){return(Xi[k]||Zi).map((function(k){return k()}))},is=function(){var k=Date.now(),B=[];k-Ji>2&&(es("matchMediaInit"),Qi.forEach((function(k){var U,F,G,j,$=k.queries,H=k.conditions;for(F in $)(U=W.matchMedia($[F]).matches)&&(G=1),U!==H[F]&&(H[F]=U,j=1);j&&(k.revert(),G&&B.push(k))})),es("matchMediaRevert"),B.forEach((function(k){return k.onMatch(k,(function(B){return k.add(null,B)}))})),Ji=k,es("matchMedia"))},ss=function(){function k(k,B){this.selector=B&&Ge(B),this.data=[],this._r=[],this.isReverted=!1,this.id=ts++,k&&this.add(k)}var B=k.prototype;return B.add=function(k,B,U){ft(k)&&(U=B,B=k,k=ft);var F=this,G=function(){var k,G=H,j=F.selector;return G&&G!==F&&G.data.push(F),U&&(F.selector=Ge(U)),H=F,k=B.apply(F,arguments),ft(k)&&F._r.push(k),H=G,F.selector=j,F.isReverted=!1,k};return F.last=G,k===ft?G(F,(function(k){return F.add(null,k)})):k?F[k]=G:G},B.ignore=function(k){var B=H;H=null,k(this),H=B},B.getTweens=function(){var B=[];return this.data.forEach((function(U){return U instanceof k?B.push.apply(B,U.getTweens()):U instanceof Li&&!(U.parent&&"nested"===U.parent.data)&&B.push(U)})),B},B.clear=function(){this._r.length=this.data.length=0},B.kill=function(k,B){var U=this;if(k?function(){for(var B,F=U.getTweens(),G=U.data.length;G--;)"isFlip"===(B=U.data[G]).data&&(B.revert(),B.getChildren(!0,!0,!1).forEach((function(k){return F.splice(F.indexOf(k),1)})));for(F.map((function(k){return{g:k._dur||k._delay||k._sat&&!k._sat.vars.immediateRender?k.globalTime(0):-1/0,t:k}})).sort((function(k,B){return B.g-k.g||-1/0})).forEach((function(B){return B.t.revert(k)})),G=U.data.length;G--;)(B=U.data[G])instanceof Si?"nested"!==B.data&&(B.scrollTrigger&&B.scrollTrigger.revert(),B.kill()):!(B instanceof Li)&&B.revert&&B.revert(k);U._r.forEach((function(B){return B(k,U)})),U.isReverted=!0}():this.data.forEach((function(k){return k.kill&&k.kill()})),this.clear(),B)for(var F=Qi.length;F--;)Qi[F].id===this.id&&Qi.splice(F,1)},B.revert=function(k){this.kill(k||{})},k}(),ns=function(){function k(k){this.contexts=[],this.scope=k,H&&H.data.push(this)}var B=k.prototype;return B.add=function(k,B,U){vt(k)||(k={matches:k});var F,G,j,$=new ss(0,U||this.scope),V=$.conditions={};for(G in H&&!$.selector&&($.selector=H.selector),this.contexts.push($),B=$.add("onMatch",B),$.queries=k,k)"all"===G?j=1:(F=W.matchMedia(k[G]))&&(Qi.indexOf($)<0&&Qi.push($),(V[G]=F.matches)&&(j=1),F.addListener?F.addListener(is):F.addEventListener("change",is));return j&&B($,(function(k){return $.add(null,k)})),this},B.revert=function(k){this.kill(k||{})},B.kill=function(k){this.contexts.forEach((function(B){return B.kill(k,!0)}))},k}(),as={registerPlugin:function(){for(var k=arguments.length,B=new Array(k),U=0;U1){var F=k.map((function(k){return hs.quickSetter(k,B,U)})),G=F.length;return function(k){for(var B=G;B--;)F[B](k)}}k=k[0]||{};var j=$t[B],$=zt(k),H=$.harness&&($.harness.aliases||{})[B]||B,V=j?function(B){var F=new j;Q._pt=0,F.init(k,U?B+U:B,Q,0,[k]),F.render(1,F),Q._pt&&Vi(1,Q)}:$.set(k,H);return j?V:function(B){return V(k,H,U?B+U:B,$,1)}},quickTo:function(k,B,U){var F,G=hs.to(k,re(((F={})[B]="+=0.1",F.paused=!0,F),U||{})),j=function(k,U,F){return G.resetTo(B,k,U,F)};return j.tween=G,j},isTweening:function(k){return V.getTweensOf(k,!0).length>0},defaults:function(k){return k&&k.ease&&(k.ease=gi(k.ease,st.ease)),oe(st,k||{})},config:function(k){return oe(it,k||{})},registerEffect:function(k){var B=k.name,U=k.effect,F=k.plugins,G=k.defaults,j=k.extendTimeline;(F||"").split(",").forEach((function(k){return k&&!$t[k]&&!Dt[k]&&Nt(B+" effect requires "+k+" plugin.")})),Ht[B]=function(k,B,F){return U(Fe(k),ae(B||{},G),F)},j&&(Si.prototype[B]=function(k,U,F){return this.add(Ht[B](k,vt(U)?U:(F=U)&&{},this),F)})},registerEase:function(k,B){li[k]=gi(B)},parseEase:function(k,B){return arguments.length?gi(k,B):li},getById:function(k){return V.getById(k)},exportRoot:function(k,B){void 0===k&&(k={});var U,F,G=new Si(k);for(G.smoothChildTiming=gt(k.smoothChildTiming),V.remove(G),G._dp=0,G._time=G._tTime=V._time,U=V._first;U;)F=U._next,!B&&!U._dur&&U instanceof Li&&U.vars.onComplete===U._targets[0]||Te(G,U,U._start-U._delay),U=F;return Te(V,G,0),G},context:function(k,B){return k?new ss(k,B):H},matchMedia:function(k){return new ns(k)},matchMediaRefresh:function(){return Qi.forEach((function(k){var B,U,F=k.conditions;for(U in F)F[U]&&(F[U]=!1,B=1);B&&k.revert()}))||is()},addEventListener:function(k,B){var U=Xi[k]||(Xi[k]=[]);~U.indexOf(B)||U.push(B)},removeEventListener:function(k,B){var U=Xi[k],F=U&&U.indexOf(B);F>=0&&U.splice(F,1)},utils:{wrap:function k(B,U,F){var G=U-B;return Et(B)?qe(B,k(0,B.length),U):Ne(F,(function(k){return(G+(k-B)%G)%G+B}))},wrapYoyo:function k(B,U,F){var G=U-B,j=2*G;return Et(B)?qe(B,k(0,B.length-1),U):Ne(F,(function(k){return B+((k=(j+(k-B)%j)%j||0)>G?j-k:k)}))},distribute:$e,random:We,snap:Ve,normalize:function(k,B,U){return ze(k,B,0,1,U)},getUnit:Le,clamp:function(k,B,U){return Ne(U,(function(U){return xe(k,B,U)}))},splitColor:si,toArray:Fe,selector:Ge,mapRange:ze,pipe:function(){for(var k=arguments.length,B=new Array(k),U=0;U=0)return;$.svg&&(this.svgo=G.getAttribute("data-svg-origin"),this.props.push(Us,U,"")),B=Bs}(j||U)&&this.props.push(B,U,j[B])},Gs=function(k){k.translate&&(k.removeProperty("translate"),k.removeProperty("scale"),k.removeProperty("rotate"))},js=function(){var k,B,U=this.props,F=this.target,G=F.style,j=F._gsap;for(k=0;k=0?Ws[G]:"")+k},Ks=function(){"undefined"!=typeof window&&window.document&&(cs=window,ds=cs.document,ls=ds.documentElement,fs=Hs("div")||{style:{}},Hs("div"),Bs=qs(Bs),Us=Bs+"Origin",fs.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",vs=!!qs("perspective"),ps=hs.core.reverting,us=1)},zs=function k(B){var U,F=Hs("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),G=this.parentNode,j=this.nextSibling,$=this.style.cssText;if(ls.appendChild(F),F.appendChild(this),this.style.display="block",B)try{U=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=k}catch(e){}else this._gsapBBox&&(U=this._gsapBBox());return G&&(j?G.insertBefore(this,j):G.appendChild(this)),ls.removeChild(F),this.style.cssText=$,U},Ys=function(k,B){for(var U=B.length;U--;)if(k.hasAttribute(B[U]))return k.getAttribute(B[U])},Qs=function(k){var B;try{B=k.getBBox()}catch(U){B=zs.call(k,!0)}return B&&(B.width||B.height)||k.getBBox===zs||(B=zs.call(k,!0)),!B||B.width||B.x||B.y?B:{x:+Ys(k,["x","cx","x1"])||0,y:+Ys(k,["y","cy","y1"])||0,width:0,height:0}},Xs=function(k){return!(!k.getCTM||k.parentNode&&!k.ownerSVGElement||!Qs(k))},Zs=function(k,B){if(B){var U,F=k.style;B in gs&&B!==Us&&(B=Bs),F.removeProperty?("ms"!==(U=B.substr(0,2))&&"webkit"!==B.substr(0,6)||(B="-"+B),F.removeProperty("--"===U?B:B.replace(Es,"-$1").toLowerCase())):F.removeAttribute(B)}},Js=function(k,B,U,F,G,j){var $=new Yi(k._pt,B,U,0,1,j?Rs:Ds);return k._pt=$,$.b=F,$.e=G,k._props.push(U),$},tn={deg:1,rad:1,turn:1},en={grid:1,flex:1},sn=function k(B,U,F,G){var j,$,H,V,W=parseFloat(F)||0,q=(F+"").trim().substr((W+"").length)||"px",K=fs.style,z=ws.test(U),Y="svg"===B.tagName.toLowerCase(),Q=(Y?"client":"offset")+(z?"Width":"Height"),X=100,Z="px"===G,J="%"===G;if(G===q||!W||tn[G]||tn[q])return W;if("px"!==q&&!Z&&(W=k(B,U,F,"px")),V=B.getCTM&&Xs(B),(J||"%"===q)&&(gs[U]||~U.indexOf("adius")))return j=V?B.getBBox()[z?"width":"height"]:B[Q],Xt(J?W/j*X:W/100*j);if(K[z?"width":"height"]=X+(Z?q:G),$=~U.indexOf("adius")||"em"===G&&B.appendChild&&!Y?B:B.parentNode,V&&($=(B.ownerSVGElement||{}).parentNode),$&&$!==ds&&$.appendChild||($=ds.body),(H=$._gsap)&&J&&H.width&&z&&H.time===ci.time&&!H.uncache)return Xt(W/H.width*X);if(!J||"height"!==U&&"width"!==U)(J||"%"===q)&&!en[Vs($,"display")]&&(K.position=Vs(B,"position")),$===B&&(K.position="static"),$.appendChild(fs),j=fs[Q],$.removeChild(fs),K.position="absolute";else{var tt=B.style[U];B.style[U]=X+G,j=B[Q],tt?B.style[U]=tt:Zs(B,U)}return z&&J&&((H=zt($)).time=ci.time,H.width=$[Q]),Xt(Z?j*W/X:j&&W?X/j*W:0)},nn=function(k,B,U,F){var G;return us||Ks(),B in Ss&&"transform"!==B&&~(B=Ss[B]).indexOf(",")&&(B=B.split(",")[0]),gs[B]&&"transform"!==B?(G=pn(k,F),G="transformOrigin"!==B?G[B]:G.svg?G.origin:vn(Vs(k,Us))+" "+G.zOrigin+"px"):(!(G=k.style[B])||"auto"===G||F||~(G+"").indexOf("calc("))&&(G=hn[B]&&hn[B](k,B,U)||Vs(k,B)||Yt(k,B)||("opacity"===B?1:0)),U&&!~(G+"").trim().indexOf(" ")?sn(k,B,G,U)+U:G},an=function(k,B,U,F){if(!U||"none"===U){var G=qs(B,k,1),j=G&&Vs(k,G,1);j&&j!==U?(B=G,U=j):"borderColor"===B&&(U=Vs(k,"borderTopColor"))}var $,H,V,W,q,K,z,Y,Q,X,Z,J=new Yi(this._pt,k.style,B,0,1,Hi),tt=0,et=0;if(J.b=U,J.e=F,U+="","auto"===(F+="")&&(K=k.style[B],k.style[B]=F,F=Vs(k,B)||F,K?k.style[B]=K:Zs(k,B)),hi($=[U,F]),F=$[1],V=(U=$[0]).match(St)||[],(F.match(St)||[]).length){for(;H=St.exec(F);)z=H[0],Q=F.substring(tt,H.index),q?q=(q+1)%5:"rgba("!==Q.substr(-5)&&"hsla("!==Q.substr(-5)||(q=1),z!==(K=V[et++]||"")&&(W=parseFloat(K)||0,Z=K.substr((W+"").length),"="===z.charAt(1)&&(z=Jt(W,z)+Z),Y=parseFloat(z),X=z.substr((Y+"").length),tt=St.lastIndex-X.length,X||(X=X||it.units[B]||Z,tt===F.length&&(F+=X,J.e+=X)),Z!==X&&(W=sn(k,B,K,X)||0),J._pt={_next:J._pt,p:Q||1===et?Q:",",s:W,c:Y-W,m:q&&q<4||"zIndex"===B?Math.round:0});J.c=tt-1;)U=H[G],gs[U]&&(F=1,U="transformOrigin"===U?Us:Bs),Zs(j,U);F&&(Zs(j,Bs),V&&(V.svg&&j.removeAttribute("transform"),pn(j,1),V.uncache=1,Gs($)))}},hn={clearProps:function(k,B,U,F,G){if("isFromStart"!==G.data){var j=k._pt=new Yi(k._pt,B,U,0,0,on);return j.u=F,j.pr=-10,j.tween=G,k._props.push(U),1}}},cn=[1,0,0,1,0,0],dn={},ln=function(k){return"matrix(1, 0, 0, 1, 0, 0)"===k||"none"===k||!k},un=function(k){var B=Vs(k,Bs);return ln(B)?cn:B.substr(7).match(Tt).map(Xt)},fn=function(k,B){var U,F,G,j,$=k._gsap||zt(k),H=k.style,V=un(k);return $.svg&&k.getAttribute("transform")?"1,0,0,1,0,0"===(V=[(G=k.transform.baseVal.consolidate().matrix).a,G.b,G.c,G.d,G.e,G.f]).join(",")?cn:V:(V!==cn||k.offsetParent||k===ls||$.svg||(G=H.display,H.display="block",(U=k.parentNode)&&k.offsetParent||(j=1,F=k.nextElementSibling,ls.appendChild(k)),V=un(k),G?H.display=G:Zs(k,"display"),j&&(F?U.insertBefore(k,F):U?U.appendChild(k):ls.removeChild(k))),B&&V.length>6?[V[0],V[1],V[4],V[5],V[12],V[13]]:V)},bn=function(k,B,U,F,G,j){var $,H,V,W=k._gsap,q=G||fn(k,!0),K=W.xOrigin||0,z=W.yOrigin||0,Y=W.xOffset||0,Q=W.yOffset||0,X=q[0],Z=q[1],J=q[2],tt=q[3],et=q[4],it=q[5],st=B.split(" "),nt=parseFloat(st[0])||0,at=parseFloat(st[1])||0;U?q!==cn&&(H=X*tt-Z*J)&&(V=nt*(-Z/H)+at*(X/H)-(X*it-Z*et)/H,nt=nt*(tt/H)+at*(-J/H)+(J*it-tt*et)/H,at=V):(nt=($=Qs(k)).x+(~st[0].indexOf("%")?nt/100*$.width:nt),at=$.y+(~(st[1]||st[0]).indexOf("%")?at/100*$.height:at)),F||!1!==F&&W.smooth?(et=nt-K,it=at-z,W.xOffset=Y+(et*X+it*J)-et,W.yOffset=Q+(et*Z+it*tt)-it):W.xOffset=W.yOffset=0,W.xOrigin=nt,W.yOrigin=at,W.smooth=!!F,W.origin=B,W.originIsAbsolute=!!U,k.style[Us]="0px 0px",j&&(Js(j,W,"xOrigin",K,nt),Js(j,W,"yOrigin",z,at),Js(j,W,"xOffset",Y,W.xOffset),Js(j,W,"yOffset",Q,W.yOffset)),k.setAttribute("data-svg-origin",nt+" "+at)},pn=function(k,B){var U=k._gsap||new wi(k);if("x"in U&&!B&&!U.uncache)return U;var F,G,j,$,H,V,W,q,K,z,Y,Q,X,Z,J,tt,et,st,nt,at,rt,ot,ht,ct,dt,lt,ut,ft,bt,pt,vt,gt,mt=k.style,yt=U.scaleX<0,_t="px",Et="deg",wt=getComputedStyle(k),Tt=Vs(k,Us)||"0";return F=G=j=V=W=q=K=z=Y=0,$=H=1,U.svg=!(!k.getCTM||!Xs(k)),wt.translate&&("none"===wt.translate&&"none"===wt.scale&&"none"===wt.rotate||(mt[Bs]=("none"!==wt.translate?"translate3d("+(wt.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==wt.rotate?"rotate("+wt.rotate+") ":"")+("none"!==wt.scale?"scale("+wt.scale.split(" ").join(",")+") ":"")+("none"!==wt[Bs]?wt[Bs]:"")),mt.scale=mt.rotate=mt.translate="none"),Z=fn(k,U.svg),U.svg&&(U.uncache?(dt=k.getBBox(),Tt=U.xOrigin-dt.x+"px "+(U.yOrigin-dt.y)+"px",ct=""):ct=!B&&k.getAttribute("data-svg-origin"),bn(k,ct||Tt,!!ct||U.originIsAbsolute,!1!==U.smooth,Z)),Q=U.xOrigin||0,X=U.yOrigin||0,Z!==cn&&(st=Z[0],nt=Z[1],at=Z[2],rt=Z[3],F=ot=Z[4],G=ht=Z[5],6===Z.length?($=Math.sqrt(st*st+nt*nt),H=Math.sqrt(rt*rt+at*at),V=st||nt?_s(nt,st)*ms:0,(K=at||rt?_s(at,rt)*ms+V:0)&&(H*=Math.abs(Math.cos(K*ys))),U.svg&&(F-=Q-(Q*st+X*at),G-=X-(Q*nt+X*rt))):(gt=Z[6],pt=Z[7],ut=Z[8],ft=Z[9],bt=Z[10],vt=Z[11],F=Z[12],G=Z[13],j=Z[14],W=(J=_s(gt,bt))*ms,J&&(ct=ot*(tt=Math.cos(-J))+ut*(et=Math.sin(-J)),dt=ht*tt+ft*et,lt=gt*tt+bt*et,ut=ot*-et+ut*tt,ft=ht*-et+ft*tt,bt=gt*-et+bt*tt,vt=pt*-et+vt*tt,ot=ct,ht=dt,gt=lt),q=(J=_s(-at,bt))*ms,J&&(tt=Math.cos(-J),vt=rt*(et=Math.sin(-J))+vt*tt,st=ct=st*tt-ut*et,nt=dt=nt*tt-ft*et,at=lt=at*tt-bt*et),V=(J=_s(nt,st))*ms,J&&(ct=st*(tt=Math.cos(J))+nt*(et=Math.sin(J)),dt=ot*tt+ht*et,nt=nt*tt-st*et,ht=ht*tt-ot*et,st=ct,ot=dt),W&&Math.abs(W)+Math.abs(V)>359.9&&(W=V=0,q=180-q),$=Xt(Math.sqrt(st*st+nt*nt+at*at)),H=Xt(Math.sqrt(ht*ht+gt*gt)),J=_s(ot,ht),K=Math.abs(J)>2e-4?J*ms:0,Y=vt?1/(vt<0?-vt:vt):0),U.svg&&(ct=k.getAttribute("transform"),U.forceCSS=k.setAttribute("transform","")||!ln(Vs(k,Bs)),ct&&k.setAttribute("transform",ct))),Math.abs(K)>90&&Math.abs(K)<270&&(yt?($*=-1,K+=V<=0?180:-180,V+=V<=0?180:-180):(H*=-1,K+=K<=0?180:-180)),B=B||U.uncache,U.x=F-((U.xPercent=F&&(!B&&U.xPercent||(Math.round(k.offsetWidth/2)===Math.round(-F)?-50:0)))?k.offsetWidth*U.xPercent/100:0)+_t,U.y=G-((U.yPercent=G&&(!B&&U.yPercent||(Math.round(k.offsetHeight/2)===Math.round(-G)?-50:0)))?k.offsetHeight*U.yPercent/100:0)+_t,U.z=j+_t,U.scaleX=Xt($),U.scaleY=Xt(H),U.rotation=Xt(V)+Et,U.rotationX=Xt(W)+Et,U.rotationY=Xt(q)+Et,U.skewX=K+Et,U.skewY=z+Et,U.transformPerspective=Y+_t,(U.zOrigin=parseFloat(Tt.split(" ")[2])||!B&&U.zOrigin||0)&&(mt[Us]=vn(Tt)),U.xOffset=U.yOffset=0,U.force3D=it.force3D,U.renderTransform=U.svg?Tn:vs?wn:mn,U.uncache=0,U},vn=function(k){return(k=k.split(" "))[0]+" "+k[1]},gn=function(k,B,U){var F=Le(B);return Xt(parseFloat(B)+parseFloat(sn(k,"x",U+"px",F)))+F},mn=function(k,B){B.z="0px",B.rotationY=B.rotationX="0deg",B.force3D=0,wn(k,B)},yn="0deg",_n="0px",En=") ",wn=function(k,B){var U=B||this,F=U.xPercent,G=U.yPercent,j=U.x,$=U.y,H=U.z,V=U.rotation,W=U.rotationY,q=U.rotationX,K=U.skewX,z=U.skewY,Y=U.scaleX,Q=U.scaleY,X=U.transformPerspective,Z=U.force3D,J=U.target,tt=U.zOrigin,et="",it="auto"===Z&&k&&1!==k||!0===Z;if(tt&&(q!==yn||W!==yn)){var st,nt=parseFloat(W)*ys,at=Math.sin(nt),rt=Math.cos(nt);nt=parseFloat(q)*ys,st=Math.cos(nt),j=gn(J,j,at*st*-tt),$=gn(J,$,-Math.sin(nt)*-tt),H=gn(J,H,rt*st*-tt+tt)}X!==_n&&(et+="perspective("+X+En),(F||G)&&(et+="translate("+F+"%, "+G+"%) "),(it||j!==_n||$!==_n||H!==_n)&&(et+=H!==_n||it?"translate3d("+j+", "+$+", "+H+") ":"translate("+j+", "+$+En),V!==yn&&(et+="rotate("+V+En),W!==yn&&(et+="rotateY("+W+En),q!==yn&&(et+="rotateX("+q+En),K===yn&&z===yn||(et+="skew("+K+", "+z+En),1===Y&&1===Q||(et+="scale("+Y+", "+Q+En),J.style[Bs]=et||"translate(0, 0)"},Tn=function(k,B){var U,F,G,j,$,H=B||this,V=H.xPercent,W=H.yPercent,q=H.x,K=H.y,z=H.rotation,Y=H.skewX,Q=H.skewY,X=H.scaleX,Z=H.scaleY,J=H.target,tt=H.xOrigin,et=H.yOrigin,it=H.xOffset,st=H.yOffset,nt=H.forceCSS,at=parseFloat(q),rt=parseFloat(K);z=parseFloat(z),Y=parseFloat(Y),(Q=parseFloat(Q))&&(Y+=Q=parseFloat(Q),z+=Q),z||Y?(z*=ys,Y*=ys,U=Math.cos(z)*X,F=Math.sin(z)*X,G=Math.sin(z-Y)*-Z,j=Math.cos(z-Y)*Z,Y&&(Q*=ys,$=Math.tan(Y-Q),G*=$=Math.sqrt(1+$*$),j*=$,Q&&($=Math.tan(Q),U*=$=Math.sqrt(1+$*$),F*=$)),U=Xt(U),F=Xt(F),G=Xt(G),j=Xt(j)):(U=X,j=Z,F=G=0),(at&&!~(q+"").indexOf("px")||rt&&!~(K+"").indexOf("px"))&&(at=sn(J,"x",q,"px"),rt=sn(J,"y",K,"px")),(tt||et||it||st)&&(at=Xt(at+tt-(tt*U+et*G)+it),rt=Xt(rt+et-(tt*F+et*j)+st)),(V||W)&&($=J.getBBox(),at=Xt(at+V/100*$.width),rt=Xt(rt+W/100*$.height)),$="matrix("+U+","+F+","+G+","+j+","+at+","+rt+")",J.setAttribute("transform",$),nt&&(J.style[Bs]=$)},Sn=function(k,B,U,F,G){var j,$,H=360,V=ut(G),W=parseFloat(G)*(V&&~G.indexOf("rad")?ms:1)-F,q=F+W+"deg";return V&&("short"===(j=G.split("_")[1])&&(W%=H)!==W%180&&(W+=W<0?H:-360),"cw"===j&&W<0?W=(W+36e9)%H-~~(W/H)*H:"ccw"===j&&W>0&&(W=(W-36e9)%H-~~(W/H)*H)),k._pt=$=new Yi(k._pt,B,U,F,W,Cs),$.e=q,$.u="deg",k._props.push(U),$},An=function(k,B){for(var U in B)k[U]=B[U];return k},Cn=function(k,B,U){var F,G,j,$,H,V,W,q=An({},U._gsap),K=U.style;for(G in q.svg?(j=U.getAttribute("transform"),U.setAttribute("transform",""),K[Bs]=B,F=pn(U,1),Zs(U,Bs),U.setAttribute("transform",j)):(j=getComputedStyle(U)[Bs],K[Bs]=B,F=pn(U,1),K[Bs]=j),gs)(j=q[G])!==($=F[G])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(G)<0&&(H=Le(j)!==(W=Le($))?sn(U,G,j,W):parseFloat(j),V=parseFloat($),k._pt=new Yi(k._pt,F,G,H,V-H,As),k._pt.u=W||0,k._props.push(G));An(F,q)};Qt("padding,margin,Width,Radius",(function(k,B){var U="Top",F="Right",G="Bottom",j="Left",$=(B<3?[U,F,G,j]:[U+j,U+F,G+F,G+j]).map((function(U){return B<2?k+U:"border"+U+k}));hn[B>1?"border"+k:k]=function(k,B,U,F,G){var j,H;if(arguments.length<4)return j=$.map((function(B){return nn(k,B,U)})),5===(H=j.join(" ")).split(j[0]).length?j[0]:H;j=(F+"").split(" "),H={},$.forEach((function(k,B){return H[k]=j[B]=j[B]||j[(B-1)/2|0]})),k.init(B,H,G)}}));var On,In,Dn,Rn={name:"css",register:Ks,targetTest:function(k){return k.style&&k.nodeType},init:function(k,B,U,F,G){var j,$,H,V,W,q,K,z,Y,Q,X,Z,J,tt,et,st,nt,at,rt,ot,ht=this._props,ct=k.style,dt=U.vars.startAt;for(K in us||Ks(),this.styles=this.styles||$s(k),st=this.styles.props,this.tween=U,B)if("autoRound"!==K&&($=B[K],!$t[K]||!Di(K,B,U,F,k,G)))if(W=typeof $,q=hn[K],"function"===W&&(W=typeof($=$.call(U,F,k,G))),"string"===W&&~$.indexOf("random(")&&($=Ke($)),q)q(this,k,K,$,U)&&(et=1);else if("--"===K.substr(0,2))j=(getComputedStyle(k).getPropertyValue(K)+"").trim(),$+="",ri.lastIndex=0,ri.test(j)||(z=Le(j),Y=Le($)),Y?z!==Y&&(j=sn(k,K,j,Y)+Y):z&&($+=z),this.add(ct,"setProperty",j,$,F,G,0,0,K),ht.push(K),st.push(K,0,ct[K]);else if("undefined"!==W){if(dt&&K in dt?(j="function"==typeof dt[K]?dt[K].call(U,F,k,G):dt[K],ut(j)&&~j.indexOf("random(")&&(j=Ke(j)),Le(j+"")||"auto"===j||(j+=it.units[K]||Le(nn(k,K))||""),"="===(j+"").charAt(1)&&(j=nn(k,K))):j=nn(k,K),V=parseFloat(j),(Q="string"===W&&"="===$.charAt(1)&&$.substr(0,2))&&($=$.substr(2)),H=parseFloat($),K in Ss&&("autoAlpha"===K&&(1===V&&"hidden"===nn(k,"visibility")&&H&&(V=0),st.push("visibility",0,ct.visibility),Js(this,ct,"visibility",V?"inherit":"hidden",H?"inherit":"hidden",!H)),"scale"!==K&&"transform"!==K&&~(K=Ss[K]).indexOf(",")&&(K=K.split(",")[0])),X=K in gs)if(this.styles.save(K),Z||((J=k._gsap).renderTransform&&!B.parseTransform||pn(k,B.parseTransform),tt=!1!==B.smoothOrigin&&J.smooth,(Z=this._pt=new Yi(this._pt,ct,Bs,0,1,J.renderTransform,J,0,-1)).dep=1),"scale"===K)this._pt=new Yi(this._pt,J,"scaleY",J.scaleY,(Q?Jt(J.scaleY,Q+H):H)-J.scaleY||0,As),this._pt.u=0,ht.push("scaleY",K),K+="X";else{if("transformOrigin"===K){st.push(Us,0,ct[Us]),at=void 0,rt=void 0,ot=void 0,at=(nt=$).split(" "),rt=at[0],ot=at[1]||"50%","top"!==rt&&"bottom"!==rt&&"left"!==ot&&"right"!==ot||(nt=rt,rt=ot,ot=nt),at[0]=rn[rt]||rt,at[1]=rn[ot]||ot,$=at.join(" "),J.svg?bn(k,$,0,tt,0,this):((Y=parseFloat($.split(" ")[2])||0)!==J.zOrigin&&Js(this,J,"zOrigin",J.zOrigin,Y),Js(this,ct,K,vn(j),vn($)));continue}if("svgOrigin"===K){bn(k,$,1,tt,0,this);continue}if(K in dn){Sn(this,J,K,V,Q?Jt(V,Q+$):$);continue}if("smoothOrigin"===K){Js(this,J,"smooth",J.smooth,$);continue}if("force3D"===K){J[K]=$;continue}if("transform"===K){Cn(this,$,k);continue}}else K in ct||(K=qs(K)||K);if(X||(H||0===H)&&(V||0===V)&&!Ts.test($)&&K in ct)H||(H=0),(z=(j+"").substr((V+"").length))!==(Y=Le($)||(K in it.units?it.units[K]:z))&&(V=sn(k,K,j,Y)),this._pt=new Yi(this._pt,X?J:ct,K,V,(Q?Jt(V,Q+H):H)-V,X||"px"!==Y&&"zIndex"!==K||!1===B.autoRound?As:Is),this._pt.u=Y||0,z!==Y&&"%"!==Y&&(this._pt.b=j,this._pt.r=Os);else if(K in ct)an.call(this,k,K,j,Q?Q+$:$);else if(K in k)this.add(k,K,j||k[K],Q?Q+$:$,F,G);else if("parseTransform"!==K){Mt(K,$);continue}X||(K in ct?st.push(K,0,ct[K]):st.push(K,1,j||k[K])),ht.push(K)}et&&zi(this)},render:function(k,B){if(B.tween._time||!ps())for(var U=B._pt;U;)U.r(k,U.d),U=U._next;else B.styles.revert()},get:nn,aliases:Ss,getSetter:function(k,B,U){var F=Ss[B];return F&&F.indexOf(",")<0&&(B=F),B in gs&&B!==Us&&(k._gsap.x||nn(k,"x"))?U&&bs===U?"scale"===B?xs:Ns:(bs=U||{})&&("scale"===B?Ls:ks):k.style&&!pt(k.style[B])?Ps:~B.indexOf("-")?Ms:Gi(k,B)},core:{_removeProperty:Zs,_getMatrix:fn}};hs.utils.checkPrefix=qs,hs.core.getStyleSaver=$s,Dn=Qt((On="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(In="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(k){gs[k]=1})),Qt(In,(function(k){it.units[k]="deg",dn[k]=1})),Ss[Dn[13]]=On+","+In,Qt("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(k){var B=k.split(":");Ss[B[1]]=Dn[B[0]]})),Qt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(k){it.units[k]="px"})),hs.registerPlugin(Rn);var Pn=hs.registerPlugin(Rn)||hs;Pn.core.Tween},30592:(k,B,U)=>{"use strict";var F=U(30655),G=function(){return!!F};G.hasArrayLengthDefineBug=function(){if(!F)return null;try{return 1!==F([],"length",{value:1}).length}catch(e){return!0}},k.exports=G},64039:(k,B,U)=>{"use strict";var F="undefined"!=typeof Symbol&&Symbol,G=U(41333);k.exports=function(){return"function"==typeof F&&("function"==typeof Symbol&&("symbol"==typeof F("foo")&&("symbol"==typeof Symbol("bar")&&G())))}},41333:k=>{"use strict";k.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var k={},B=Symbol("test"),U=Object(B);if("string"==typeof B)return!1;if("[object Symbol]"!==Object.prototype.toString.call(B))return!1;if("[object Symbol]"!==Object.prototype.toString.call(U))return!1;for(var F in k[B]=42,k)return!1;if("function"==typeof Object.keys&&0!==Object.keys(k).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(k).length)return!1;var G=Object.getOwnPropertySymbols(k);if(1!==G.length||G[0]!==B)return!1;if(!Object.prototype.propertyIsEnumerable.call(k,B))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var j=Object.getOwnPropertyDescriptor(k,B);if(42!==j.value||!0!==j.enumerable)return!1}return!0}},49092:(k,B,U)=>{"use strict";var F=U(41333);k.exports=function(){return F()&&!!Symbol.toStringTag}},9957:(k,B,U)=>{"use strict";var F=Function.prototype.call,G=Object.prototype.hasOwnProperty,j=U(66743);k.exports=j.call(F,G)},25335:k=>{"use strict";k.exports=class{static createState(k){return k}constructor(k){this.reset()}reset(){this.pos=-1,this.maxPos=-1,this.state=null,this.data=this.src=null,this.filename=null}setInitialState(k){this.initialState=k}enterState(k){if(this.state===k)throw new Error("Re-entering the current state is illegal - "+k.name);var B;(B=this.state)&&B.leave&&B.leave.call(this,k),this.state=k,k.enter&&k.enter.call(this,B)}lookAheadFor(k,B){null==B&&(B=this.pos+1);var U=B+k.length;if(!(U>this.maxPos+1))return this.data.substring(B,U)===k?k:void 0}lookAtCharAhead(k,B){return null==B&&(B=this.pos),this.data.charAt(B+k)}lookAtCharCodeAhead(k,B){return null==B&&(B=this.pos),this.data.charCodeAt(B+k)}rewind(k){this.pos-=k}skip(k){this.pos+=k}end(){this.pos=this.maxPos+1}substring(k,B){return this.data.substring(k,B)}parse(k,B){if(null==k)return;if(this.reset(),Array.isArray(k)&&(k=k.join("")),this.src=k,this.filename=B,this.data=k,this.maxPos=k.length-1,this.initialState&&this.enterState(this.initialState),this.pos=65279===k.charCodeAt(0)?1:0,!this.state)return;for(var U;(U=this.pos)<=this.maxPos;){let B=k[U],F=B.charCodeAt(0),G=this.state;if(10!==F){if(13===F){let B=U+1;if(B{"use strict";var F=U(25335),G=U(70456),j=U(64101),$=U(40862),H=U(8928);function V(k){return k<=32}var W=/^[\-\+]?\d*(?:\.\d+)?(?:e[\-\+]?\d+)?$/;function q(k){var B=k.length;if(B)return k[B-1]}const K=92,z=47,Y=60,Q=62,X=93,Z=40,J=41,tt=123,et=125,it=42,st=45,nt=36,at=124,rt=[],ot=U(21052);class ht extends F{constructor(k,B){super(B);var U=this;function ct(k){var B=H(U.src),F=B.lineAt(U.pos),G=B.columnAt(U.pos),j=U.filename;$(k,{location:(j||"(unknown file)")+":"+F+":"+G})}var dt=j.createNotifiers(U,k);this.notifiers=dt;var lt,ut,ft,bt,pt,vt,gt,mt,yt,_t,Et,wt,Tt,St,At,Ct,Ot,It,Dt=B&&!1===B.concise?1:2,Rt=B&&B.isOpenTagOnly,Pt=B&&B.ignorePlaceholders,Mt=B&&B.ignoreNonstandardStringPlaceholders,Nt=!0===B.legacyCompatibility,xt="html";function Lt(k){0===arguments.length&&(k=vt),dt.notifyText(k,xt),vt=""}function kt(){wt&&!lt.withinAttrGroup&&te()}function Bt(k){At=Et,St=k;var B=q(mt);if(mt.push({type:"html",delimiter:k,indent:Et}),!B||!B.body)return U.enterState(Me);if(1===B.body)U.enterState(Be);else{if(2!==B.body)throw new Error("Illegal value for parent.body: "+B.body);U.enterState(ke)}}function Ut(){vt&&(Tt||St)&&(vt=vt.replace(/(\r\n|\n)$/,"")),Lt();for(let B=mt.length-1;B>=0;B--){var k=mt[B];if("html"===k.type){mt.pop();break}return void Qt(k.pos,"MISSING_END_TAG",'Missing ending "'+k.tagName+'" tag')}At=null,St=null,Tt=!1,U.state!==Ne&&U.enterState(Ne)}function Ft(){for(Lt();mt.length;){var k=q(mt);if("tag"===k.type){if(!k.concise)return void Qt(k.pos,"MISSING_END_TAG",'Missing ending "'+k.tagName+'" tag');ee(k.expectedCloseTagName)}else{if("html"!==k.type)throw new Error("Illegal state. There should not be any non-concise tags on the stack when in concise mode");mt.pop()}}}function Gt(){if(wt){if(lt.withinAttrGroup)return void Qt(lt.pos,"MALFORMED_OPEN_TAG",'EOF reached while within an attribute group (e.g. "[ ... ]").');te(),Ft()}else Qt(lt.pos,"MALFORMED_OPEN_TAG","EOF reached while parsing open tag")}this.reset=function(){F.prototype.reset.call(this),vt="",lt=void 0,ut=void 0,ft=void 0,bt=void 0,pt=void 0,gt=!1,mt=[],yt=[],_t=void 0,Et="",wt=2===Dt,Tt=!1,St=null,At=null,Ct=!1,Ot=!1,It=0},this.reset();var jt=dt.notifyCDATA,$t=dt.notifyComment,Ht=dt.notifyOpenTag,Vt=dt.notifyOpenTagName,Wt=dt.notifyCloseTag,qt=dt.notifyDocumentType,Kt=dt.notifyDeclaration,zt=dt.notifyPlaceholder,Yt=dt.notifyScriptlet;function Qt(k,B,F){U.end(),dt.notifyError(k,B,F)}function Xt(){return ut={},lt.attributes===rt?lt.attributes=[ut]:lt.attributes.push(ut),U.enterState(We),ut}function Zt(){ut=null,U.state!==Ve&&U.enterState(Ve)}function Jt(){Lt();var k={type:"tag",tagName:"",tagNameParts:null,attributes:[],argument:void 0,params:void 0,pos:U.pos,indent:Et,nestedIndent:null,concise:wt};return gt=!0,Ct&&(k.beginMixedMode=!0,Ct=!1),mt.push(k),lt=k,U.enterState(Ue),lt}function te(k){var B=lt.tagName,F=lt.attributes,G=lt.parseOptions;if(G&&!0===G.ignoreAttributes)F.length=0;else{if(lt.requiresCommas&&F.length>1)for(let k=0;k1)for(let k=0;k")||U.lookAheadFor("/"+q(mt).tagName+">")||U.lookAheadFor("/"+pt+">");return!!k&&(U.state===ei&&be(),Lt(),ee(pt,U.pos,U.pos+1+k.length),U.skip(k.length),U.enterState(Me),!0)}function Re(){return!!U.lookAheadFor("![CDATA[")&&(function(){Lt();var k=ie();k.value="",U.enterState($e)}(),U.skip(8),!0)}function Pe(k){let B=At+St;if(U.lookAheadFor(B,U.pos+k.length))return U.skip(At.length),U.skip(St.length),U.enterState(Ne),void ve(ye);U.lookAheadFor(At,U.pos+k.length)?U.skip(At.length):At&&!Oe()&&Ut()}var Me=ht.createState({name:"STATE_HTML_CONTENT",placeholder(k){},eol(k){vt+=k,Ct?(Ct=!1,Ut()):Ot?(Ot=!1,Ut()):Tt?Ut():St&&Pe(k)},eof:Ft,enter(){xt="html",wt=!1},char(k,B){if(B===Y){if(Re())return;var F=U.lookAtCharCodeAhead(1);37===F?(he(),U.skip(1)):U.lookAheadFor("!--")?(pe(),U.skip(3)):33===F?(!function(){Lt();var k=ie();k.value="",U.enterState(ii)}(),U.skip(1)):63===F?(!function(){Lt();var k=ie();k.value="",U.enterState(si)}(),U.skip(1)):F===z?(bt=U.pos,ft=null,U.skip(1),Lt(),U.enterState(He)):F===Q||F===Y||V(F)?vt+="<":(Jt(),lt.tagNameStart=U.pos+1)}else!Pt&&Ae(0,B)?(vt+="\\",U.skip(1)):!Pt&&Se(0,B)?(vt+="$",U.skip(1)):!Pt&&Te(0,B)?Lt():!Nt&&B===nt&&V(U.lookAtCharCodeAhead(1))&&(G=U.substring(0,U.pos).split("\n"),j=G[G.length-1],/^\s*$/.test(j))?(U.skip(1),ce()):vt+=k;var G,j}}),Ne=ht.createState({name:"STATE_CONCISE_HTML_CONTENT",eol(k){vt+=k,Et=""},eof:Ft,enter(){wt=!0,Et=""},comment(k){var B=k.value;B=B.trim(),$t({value:B,pos:k.pos,endPos:k.endPos}),"block"===k.type&&ve(me)},endTrailingWhitespace(k){Ut(),k&&Ft()},char(k,B){if(V(B))Et+=k;else{for(;;){let k=mt.length;if(!k){if(Et)return void Qt(U.pos,"BAD_INDENTATION","Line has extra indentation at the beginning");break}{let B=mt[k-1];if(!(B.indent.length>=Et.length))break;ee(B.expectedCloseTagName)}}var F,G=mt.length&&mt[mt.length-1];if(G){if(F=G.body,G.openTagOnly)return void Qt(U.pos,"INVALID_BODY",'The "'+G.tagName+'" tag does not allow nested body content');if(G.nestedIndent){if(G.nestedIndent.length!==Et.length)return void Qt(U.pos,"BAD_INDENTATION","Line indentation does match indentation of previous line")}else G.nestedIndent=Et}if(F&&B!==st)return void Qt(U.pos,"ILLEGAL_LINE_START",'A line within a tag that only allows text content must begin with a "-" character');if(B===Y||Nt&&B===nt)return B===nt&&ct('Handling of a placeholder (i.e. "${...}") at the start of a concise line will be changing.\nA placeholder at the start of a concise line will now be handled as a tag name placeholder instead of a body text placeholder.\nSwitch to using "-- ${...}" to avoid breakage.\nSee: https://github.com/marko-js/htmljs-parser/issues/48'),Ct=!0,U.rewind(1),void Bt();if(!Nt&&B===nt&&V(U.lookAtCharCodeAhead(1)))return U.skip(1),void ce();if(B===st){if(U.lookAtCharCodeAhead(1)!==st){if(!Nt)return void Qt(U.pos,"ILLEGAL_LINE_START",'A line in concise mode cannot start with a single hyphen. Use "--" instead. See: https://github.com/marko-js/htmljs-parser/issues/43');ct('The usage of a single hyphen at the start of a concise line is now deprecated. Use "--" instead.\nSee: https://github.com/marko-js/htmljs-parser/issues/43')}return St=k,U.enterState(xe)}if(B===z){var j=U.lookAtCharCodeAhead(1);return j===z?(ue(),void U.skip(1)):j===it?(fe(),void U.skip(1)):void Qt(U.pos,"ILLEGAL_LINE_START",'A line in concise mode cannot start with "/" unless it starts a "//" or "/*" comment')}Jt(),lt.tagNameStart=U.pos,U.rewind(1)}}}),xe=ht.createState({name:"STATE_BEGIN_DELIMITED_HTML_BLOCK",eol:function(k){Bt(St),Pe(k)},eof:Ft,char(k,B){B===st?St+=k:Oe()||(Tt=!0,Bt())}}),Le=ht.createState({name:"STATE_CHECK_TRAILING_WHITESPACE",eol:function(){ge(null,!1)},eof:function(){ge(null,!0)},char(k,B){V(B)||ge({ch:k})}}),ke=ht.createState({name:"STATE_STATIC_TEXT_CONTENT",enter(){xt="static-text"},eol(k){vt+=k,Tt?Ut():St&&Pe(k)},eof:Ft,char(k,B){!wt&&B===Y&&De()||(vt+=k)}}),Be=ht.createState({name:"STATE_PARSED_TEXT_CONTENT",enter(){xt="parsed-text"},placeholder:Me.placeholder,comment(k){vt+=k.rawValue,St&&k.eol&&Pe(k.eol)},templateString(k){vt+=k.value},eol(k){vt+=k,Tt?Ut():St&&Pe(k)},eof:Ft,char(k,B){if(!wt&&B===Y){if(De())return;if(Re())return;if(37===U.lookAtCharCodeAhead(1))return he(),void U.skip(1)}if(B===z){if(U.lookAtCharCodeAhead(1)===it)return fe(),void U.skip(1);if(U.lookAtCharCodeAhead(1)===z)return ue(),void U.skip(1)}if(96!==B){if(!Pt&&Ae(0,B))U.skip(1);else{if(!Pt&&Se(0,B))return vt+="$",void U.skip(1);if(!Pt&&Te(0,B))return void Lt()}vt+=k}else oe()}}),Ue=ht.createState({name:"STATE_TAG_NAME",eol:kt,eof:Gt,expression(k){lt.tagNameEnd=k.endPos,k.value&&(lt.tagName+=k.value,lt.tagNameParts&<.tagNameParts.push(JSON.stringify(k.value)))},placeholder(k){lt.tagNameParts||(lt.tagNameParts=[],lt.tagName&<.tagNameParts.push(JSON.stringify(lt.tagName))),lt.tagName+=U.substring(k.pos,k.endPos),lt.tagNameParts.push("("+k.value+")"),lt.tagNameEnd=k.endPos,U.lookAtCharCodeAhead(1)===Z&&(ae(),U.enterState(Fe))},enter(k){k!==Ke&&ne()},char(k,B){throw new Error("Illegal state")}}),Fe=ht.createState({name:"STATE_TAG_ARGS",eol:kt,eof:Gt,expression(k){var B=k.value;if(B.charCodeAt(B.length-1)!==J)throw new Error("Invalid argument");k.value=B.slice(1,B.length-1),k.pos+=1,k.endPos-=1,lt.argument=k,U.lookAtCharCodeAhead(1)===at?U.enterState(Ge):U.enterState(Ve)},enter(k){k!==Ke&&ne()},char(k,B){throw new Error("Illegal state")}}),Ge=ht.createState({name:"STATE_TAG_PARAMS",eol:kt,eof:Gt,expression(k){var B=k.value;k.value=B.slice(1),k.pos+=1,lt.params=k,U.enterState(Ve)},enter(k){k!==Ke&&ne()},char(k,B){throw new Error("Illegal state")}}),je=ht.createState({name:"STATE_TAG_VAR",eol:kt,eof:Gt,expression(k){var B=k.value;k.value=B.slice(1),k.pos+=1,lt.var=k,U.lookAtCharCodeAhead(1)===at?U.enterState(Ge):U.lookAtCharCodeAhead(1)===Z?U.enterState(Fe):U.enterState(Ve)},enter(k){k!==Ke&&ne()},char(k,B){throw new Error("Illegal state")}}),$e=ht.createState({name:"STATE_CDATA",enter(){xt="cdata"},eof(){Qt(_t.pos,"MALFORMED_CDATA","EOF reached while parsing CDATA")},char(k,B){if(B===X){var F=U.lookAheadFor("]>");if(F)return G=se(),jt(G.value,G.pos,U.pos+3),void U.skip(F.length)}var G;_t.value+=k}}),He=ht.createState({name:"STATE_CLOSE_TAG",eof(){Qt(ee.pos,"MALFORMED_CLOSE_TAG","EOF reached while parsing closing tag")},enter(){ft=""},char(k,B){B===Q?(ft.length>0?ee(ft,bt,U.pos+1):ee(pt,bt,U.pos+1),U.enterState(Me)):ft+=k}}),Ve=ht.createState({name:"STATE_WITHIN_OPEN_TAG",eol:kt,eof:Gt,enter(){lt.notifiedOpenTagName||(lt.notifiedOpenTagName=!0,lt.tagNameEndPos=U.pos,Vt(lt))},expression(k){var B=we(k);if(B)if(0===lt.attributes.length){if(null!=lt.argument)return void Qt(k.endPos,"ILLEGAL_TAG_ARGUMENT","A tag can only have one argument");lt.argument=B}else{let U=ut||q(lt.attributes);if(null!=U.argument)return void Qt(k.endPos,"ILLEGAL_ATTRIBUTE_ARGUMENT","An attribute can only have one argument");U.argument=B}},placeholder(k){Xt().value=k.value,Zt(),U.enterState(Ye)},comment(k){},char(k,B){if(wt){if(B===st){if(U.lookAtCharCodeAhead(1)!==st){if(!Nt)return void Qt(lt.pos,"MALFORMED_OPEN_TAG",'"-" not allowed as first character of attribute name');ct('The usage of a single hyphen in a concise line is now deprecated. Use "--" instead.\nSee: https://github.com/marko-js/htmljs-parser/issues/43')}if(lt.withinAttrGroup)return void Qt(U.pos,"MALFORMED_OPEN_TAG","Attribute group was not properly ended");te(),St=k;var F=function(){var k=/[^\n]*\n(\s+)/.exec(U.substring(U.pos));if(k){var B=k[1].split(/\n/g);return B[B.length-1]}}();return F>Et&&(Et=F),void U.enterState(xe)}if(91===B)return lt.withinAttrGroup?void Qt(U.pos,"MALFORMED_OPEN_TAG",'Unexpected "[" character within open tag.'):void(lt.withinAttrGroup=!0);if(B===X)return lt.withinAttrGroup?void(lt.withinAttrGroup=!1):void Qt(U.pos,"MALFORMED_OPEN_TAG",'Unexpected "]" character within open tag.')}else{if(B===Q)return void te();if(B===z){if(U.lookAtCharCodeAhead(1)===Q)return te(!0),void U.skip(1)}}if(Ae(0,B)){return Xt().name="\\",void U.skip(1)}if(Se(0,B)){return Xt().name="$",void U.skip(1)}if(!Te(0,B))return B===Y?Qt(U.pos,"ILLEGAL_ATTRIBUTE_NAME",'Invalid attribute name. Attribute name cannot begin with the "<" character.'):B===z&&U.lookAtCharCodeAhead(1)===it?(fe(),void U.skip(1)):void(V(B)||(B===Z?(U.rewind(1),ne()):(U.rewind(1),Xt())))}}),We=ht.createState({name:"STATE_ATTRIBUTE_NAME",eol:kt,eof:Gt,expression(k){var B=we(k);B&&(ut.argument=B),k.endedWithComma?(Ie(),lt.requiresCommas=!0,ut.endedWithComma=!0):Ce("=",0)||(lt.lastAttrNoComma=!0),ut.name=ut.name?ut.name+k.value:k.value,ut.pos=k.pos,ut.endPos=k.endPos,ut.name||(ut.name="default",ut.default=!0)},enter(k){if(lt.requiresCommas&<.lastAttrNoComma){var B=lt.parseOptions;if(!B||!0!==B.relaxRequireCommas)return Qt(U.pos,"COMMAS_REQUIRED","if commas are used, they must be used to separate all attributes for a tag")}k!==Ke&&ne()},char(k,B){throw new Error("Illegal state")}}),qe=ht.createState({name:"STATE_ATTRIBUTE_VALUE",expression(k){var B=k.value;if(""===B)return Qt(k.pos,"ILLEGAL_ATTRIBUTE_VALUE",'No attribute value found after "="');k.endedWithComma?(Ie(),lt.requiresCommas=!0,ut.endedWithComma=!0):lt.lastAttrNoComma=!0,k.hasUnenclosedWhitespace&&(lt.hasUnenclosedWhitespace=!0),ut.value=B,ut.pos=k.pos,ut.endPos=k.endPos,k.isStringLiteral?ut.literalValue=function(k,B,U){"'"===k.charAt(0)&&(k='"'+(k=(k=k.substring(1,k.length-1)).replace(/\\\\|\\[']|\\["]|["]/g,(function(k){return"\\'"===k?"'":'"'===k?'\\"':k})))+'"');try{return JSON.parse(k)}catch(e){U(B,"INVALID_STRING","Invalid string ("+k+"): "+e)}}(B,k.pos,Qt):"true"===B?ut.literalValue=!0:"false"===B?ut.literalValue=!1:"null"===B?ut.literalValue=null:"undefined"===B?ut.literalValue=void 0:W.test(B)&&(ut.literalValue=Number(B)),Zt()},eol:kt,eof:Gt,enter(k){k!==Ke&&ne()},char(k,B){throw new Error("Illegal state")}}),Ke=ht.createState({name:"STATE_EXPRESSION",eol(k){if(0===_t.groupStack.length){if(_t.parentState===We||_t.parentState===qe)return _t.endPos=U.pos,ae(),Zt(),void(wt&&kt());if(_t.parentState===Ue)return _t.endPos=U.pos,ae(),U.state!==Ve&&U.enterState(Ve),void(wt&&kt())}_t.value+=k},eof(){if(!wt||0!==_t.groupStack.length){let k=_t.parentState;return k===We?Qt(_t.pos,"MALFORMED_OPEN_TAG",'EOF reached while parsing attribute name for the "'+lt.tagName+'" tag'):k===qe?Qt(_t.pos,"MALFORMED_OPEN_TAG",'EOF reached while parsing attribute value for the "'+ut.name+'" attribute'):k===Ue?Qt(_t.pos,"MALFORMED_OPEN_TAG","EOF reached while parsing tag name"):k===Qe?Qt(_t.pos,"MALFORMED_PLACEHOLDER","EOF reached while parsing placeholder"):Qt(_t.pos,"INVALID_EXPRESSION","EOF reached while parsing expression")}_t.endPos=U.pos,ae(),Gt()},string(k){""===_t.value?_t.isStringLiteral=!0===k.isStringLiteral:_t.isStringLiteral=!1,_t.value+=k.value},comment(k){_t.isStringLiteral=!1,_t.value+=k.rawValue},templateString(k){_t.isStringLiteral=!1,_t.value+=k.value},regularExpression(k){_t.isStringLiteral=!1,_t.value+=k.value},char(k,B){let F=_t.groupStack.length,j=_t.parentState;if(39===B)return re("'",39);if(34===B)return re('"',34);if(96===B)return oe();if(B===z){var $=U.lookAtCharCodeAhead(1);if($===z)return ue(),void U.skip(1);if($===it)return fe(),void U.skip(1);if(0===F&&!wt&&$===Q)return _t.endPos=U.pos,ae(),U.rewind(1),void(U.state!==Ve&&U.enterState(Ve));if(!/[\]})A-Z0-9.<%]/i.test(function(k){for(var B=null==k?-1:k;V(U.lookAtCharCodeAhead(B));)B--;return U.lookAtCharAhead(B)}()))return ie().value="/",void U.enterState(Je)}else if(B===at&&j===Ge){if(0===F)return _t.groupStack.push(B),_t.isStringLiteral=!1,void(_t.value+=k);if(1===F)return void ae()}else{if(B===Z||91===B||B===tt)return 0===F&&B===Z&&(_t.lastLeftParenPos=_t.value.length),_t.groupStack.push(B),_t.isStringLiteral=!1,void(_t.value+=k);if(B===J||B===X||B===et){if(0===F){if(B!==X)return Qt(_t.pos,"INVALID_EXPRESSION",'Mismatched group. A closing "'+k+'" character was found but it is not matched with a corresponding opening character.');if(lt.withinAttrGroup)return _t.endPos=U.pos+1,ae(),U.rewind(1),void(U.state!==Ve&&U.enterState(Ve))}let G=_t.groupStack.pop();if(B===J&&G!==Z||B===X&&91!==G||B===et&&G!==tt)return Qt(_t.pos,"INVALID_EXPRESSION",'Mismatched group. A "'+k+'" character was found when "'+String.fromCharCode(G)+'" was expected.');if(_t.value+=k,0===_t.groupStack.length)if(B===J&&(_t.lastRightParenPos=_t.value.length-1),B===et&&j===Qe||B===J&&j===Fe)return _t.endPos=U.pos+1,void ae();return}}var H,W,q;if(0===F){if(!wt&&B===Q&&(j===Ue||j===We||j===qe||j===Ve))return _t.endPos=U.pos,ae(),Zt(),U.rewind(1),void(U.state!==Ve&&U.enterState(Ve));if(59===B)return ae(),Zt(),void(wt&&(te(),ve((function(k){if(k){var B=k.ch.charCodeAt(0);if(B===z){if(U.lookAheadFor("/"))return ue(),void U.skip(1);if(U.lookAheadFor("*"))return fe(),void U.skip(1)}else if(B===Y&&U.lookAheadFor("!--"))return pe(),void U.skip(3);Qt(U.pos,"INVALID_CODE_AFTER_SEMICOLON","A semicolon indicates the end of a line. Only comments may follow it.")}}))));if(44===B||V(B)){if(44===B||Ce(","))44!==B&&(Ie(),U.skip(1)),_t.endedWithComma=!0;else{if(_t.parentState===We&&Ce("="))return void Ie();if(j!==Ue){var K=(W=U.data.substring(U.pos),!!(q=/^\s+typeof\s+/.exec(W))&&q[0]);if(K)return _t.value+=K,_t.isStringLiteral=!1,_t.hasUnenclosedWhitespace=!0,void U.skip(K.length-1);var st=function(){var k=U.data.substring(U.pos),B=G.patternNext.exec(k);if(B){var F=B[0],j=B[1];if(Nt&&"-"===j)return!1;if(!(wt?F.includes("["):F.includes(">")))return U.skip(F.length-1),F}else{var $=U.substring(U.pos-G.longest,U.pos);if(G.patternPrev.exec($))return U.rewind(1),Ie()}return!1}();if(st)return _t.isStringLiteral=!1,_t.hasUnenclosedWhitespace=!0,void(_t.value+=st)}}return _t.endPos=U.pos,ae(),Zt(),void(U.state!==Ve&&U.enterState(Ve))}if(61===B&&j===We)return _t.endPos=U.pos,ae(),U.enterState(qe),void Ie();if(""===_t.value){let k=function(){var k=U.data.substring(U.pos),B=/^typeof\s+/.exec(k);return!!B&&B[0]}();if(k)return _t.value+=k,_t.isStringLiteral=!1,_t.hasUnenclosedWhitespace=!0,void U.skip(k.length-1)}if(_t.parentState===Ge&&B===at)return ae(),U.rewind(1),void U.enterState(Ge);if(_t.parentState===je&&(61===B||B===Q))return ae(),U.rewind(1),void(U.state!==Ve&&U.enterState(Ve));if(_t.parentState===Ue){if(Ae(0,B))return _t.value+="\\",void U.skip(1);if(Se(0,B))return _t.value+="$",void U.skip(1);if(B===nt&&U.lookAtCharCodeAhead(1)===tt)return _t.endPos=U.pos,ae(),void _e(!0,!0);if(46===B||35===B)return ae(),U.rewind(1),(H=ie()).currentPart=null,H.hasId=!1,H.beginPart=function(k){H.currentPart={type:k,stringParts:[],rawParts:[],text:"",_endText(){var k=this.text;k&&(this.stringParts.push(JSON.stringify(k)),this.rawParts.push({text:k,pos:U.pos-k.length,endPos:U.pos})),this.text=""},addPlaceholder(k){var B=k.pos+(k.escape?2:3),F=k.endPos-1;this._endText(),this.stringParts.push("("+k.value+")"),this.rawParts.push({expression:U.src.slice(B,F),pos:B,endPos:F})},end(){this._endText();var B=this.stringParts.join("+");"id"===k?lt.shorthandId={value:B,rawParts:this.rawParts}:"class"===k&&(lt.shorthandClassNames||(lt.shorthandClassNames=[]),lt.shorthandClassNames.push({value:B,rawParts:this.rawParts}))}}},void U.enterState(ze);if(B===z)return ae(),U.rewind(1),void U.enterState(je)}if(_t.parentState===Ue||_t.parentState===je){if(B===at)return ae(),U.rewind(1),void U.enterState(Ge);if(61===B)return ae(),U.rewind(1),void U.enterState(Ve);if(U.lookAtCharCodeAhead(1)===Z&&_t.value)return _t.value+=k,ae(),void U.enterState(Fe)}}_t.isStringLiteral=!1,_t.value+=k}}),ze=ht.createState({name:"STATE_TAG_NAME_SHORTHAND",placeholder(k){_t.currentPart.addPlaceholder(k)},eol(k){lt.tagNameEnd=U.pos,Ee(),U.state!==Ve&&U.enterState(Ve),wt&&kt()},eof(){if(Ee(),!wt)return Qt(_t.pos,"INVALID_TAG_SHORTHAND","EOF reached will parsing id/class shorthand in tag name");Gt()},char(k,B){var F=_t;if(!wt&&(B===Q||B===z))return lt.tagNameEnd=U.pos,Ee(),void U.rewind(1);if(V(B))return Ee(),lt.tagNameEnd=U.pos,void(U.state!==Ve&&U.enterState(Ve));if(46===B)F.currentPart&&F.currentPart.end(),F.beginPart("class");else if(35===B){if(F.hasId)return Qt(_t.pos,"INVALID_TAG_SHORTHAND","Multiple shorthand ID parts are not allowed on the same tag");F.hasId=!0,F.currentPart&&F.currentPart.end(),F.beginPart("id")}else!Pt&&Ae(0,B)?(F.currentPart.text+="\\",U.skip(1)):!Pt&&Se(0,B)?(F.currentPart.text+="$",U.skip(1)):!Pt&&Te(0,B)||(B===Z?(Ee(),U.rewind(1),U.enterState(Fe)):B===at?(Ee(),U.rewind(1),U.enterState(Ge)):F.currentPart.text+=k)}}),Ye=ht.createState({name:"STATE_AFTER_PLACEHOLDER_WITHIN_TAG",eol:kt,eof:Gt,char(k,B){if(!wt){if(B===Q)return void te();if(B===z){if(U.lookAtCharCodeAhead(1)===Q)return te(!0),void U.skip(1)}}V(B)?U.enterState(Ve):Qt(U.pos,"UNEXPECTED_TEXT_AFTER_PLACEHOLDER_IN_TAG",`An unexpected "${k}" character was found after a placeoholder within the open tag.`)}}),Qe=ht.createState({name:"STATE_PLACEHOLDER",expression(k){_t.value=k.value.slice(1,-1),_t.endPos=k.endPos,function(){var k=se();if(It--,!k.withinTemplateString){var B=zt(k);k.value=B}k.parentState.placeholder(k)}()},eol(k){throw new Error("Illegal state. EOL not expected")},eof(){throw new Error("Illegal state. EOF not expected")},enter(k){k!==Ke&&ne()}}),Xe=ht.createState({name:"STATE_STRING",placeholder(k){_t.currentText&&(_t.stringParts.push(_t.currentText),_t.currentText=""),_t.isStringLiteral=!1,_t.stringParts.push(k)},eol(k){2===k.length?_t.currentText+="\\r\\n":_t.currentText+="\\n"},eof(){Qt(U.pos,"INVALID_STRING",It>0?"EOF reached while parsing string expression found inside placeholder":"EOF reached while parsing string expression")},char(k,B){var F,G,j=_t.stringParts,$=_t.quoteCharCode;if(B===K)Ae(0,B)?_t.currentText+=Pt?"\\\\\\\\":"\\":Se(0,B)?_t.currentText+=Pt?"\\\\$":"$":(F=U.lookAtCharAhead(1),_t.currentText+=k+F),U.skip(1);else if(B===$){_t.currentText&&j.push(_t.currentText);let k="",B=_t.quoteChar;if(j.length)for(let U=0;U1&&(k="("+k+")"),_t.value=k,(G=se()).value=dt.notifyString(G),G.parentState.string(G)}else Pt||Mt||!Te(0,B)?_t.currentText+=k:(_t.currentText&&j.push(_t.currentText),_t.currentText="",_t.isStringLiteral=!1)}}),Ze=ht.createState({name:"STATE_TEMPLATE_STRING",placeholder:function(k){_t.value+="${"+k.value+"}"},eol(k){_t.value+=k},eof(){Qt(U.pos,"INVALID_TEMPLATE_STRING","EOF reached while parsing template string expression")},char(k,B){var F,G;B===nt&&U.lookAtCharCodeAhead(1)===tt?_e(!1):(_t.value+=k,B===K?(F=U.lookAtCharAhead(1),U.skip(1),_t.value+=F):96===B&&(G=se()).parentState.templateString(G))}}),Je=ht.createState({name:"STATE_REGULAR_EXPRESSION",eol(){Qt(U.pos,"INVALID_REGULAR_EXPRESSION","EOL reached while parsing regular expression")},eof(){Qt(U.pos,"INVALID_REGULAR_EXPRESSION","EOF reached while parsing regular expression")},char(k,B){var F,G;_t.value+=k,B===K?(F=U.lookAtCharAhead(1),U.skip(1),_t.value+=F):91===B&&_t.inCharacterSet?_t.inCharacterSet=!0:B===X&&_t.inCharacterSet?_t.inCharacterSet=!1:B!==z||_t.inCharacterSet||(G=se()).parentState.regularExpression(G)}}),ti=ht.createState({name:"STATE_JS_COMMENT_BLOCK",eol(k){_t.value+=k},eof(){Qt(_t.pos,"MALFORMED_COMMENT","EOF reached while parsing multi-line JavaScript comment")},char(k,B){if(B===it&&U.lookAtCharCodeAhead(1)===z)return _t.endPos=U.pos+2,be(),void U.skip(1);_t.value+=k}}),ei=ht.createState({name:"STATE_JS_COMMENT_LINE",eol(k){U.rewind(k.length),_t.endPos=U.pos,be()},eof(){_t.endPos=U.pos,be()},char(k,B){_t.parentState===Be&&!wt&&B===Y&&De()||(_t.value+=k)}}),ii=ht.createState({name:"STATE_DTD",eol(k){_t.value+=k},eof(){Qt(_t.pos,"MALFORMED_DOCUMENT_TYPE","EOF reached while parsing document type")},char(k,B){var F;B===Q?(_t.endPos=U.pos+1,F=se(),qt(F)):_t.value+=k}}),si=ht.createState({name:"STATE_DECLARATION",eol(k){_t.value+=k},eof(){Qt(_t.pos,"MALFORMED_DECLARATION","EOF reached while parsing declaration")},char(k,B){63===B?U.lookAtCharCodeAhead(1)===Q&&(_t.endPos=U.pos+2,le(),U.skip(1)):B===Q?(_t.endPos=U.pos+1,le()):_t.value+=k}}),ni=ht.createState({name:"STATE_HTML_COMMENT",eol(k){_t.value+=k},eof(){Qt(_t.pos,"MALFORMED_COMMENT","EOF reached while parsing comment")},char(k,B){if(45===B){var F=U.lookAheadFor("->");F?(_t.endPos=U.pos+3,(G=se()).endPos=U.pos+3,$t(G),U.skip(F.length)):_t.value+=k}else _t.value+=k;var G}}),ai=ht.createState({name:"STATE_SCRIPTLET",eol(k){_t.value+=k},eof(){Qt(_t.pos,"MALFORMED_SCRIPTLET","EOF reached while parsing scriptlet")},comment(k){_t.value+=k.rawValue},char(k,B){if(_t.quoteCharCode)return _t.value+=k,void(B===K?(_t.value+=U.lookAtCharAhead(1),U.skip(1)):B===_t.quoteCharCode&&(_t.quoteCharCode=null));if(B===z){if(U.lookAtCharCodeAhead(1)===it)return fe(),void U.skip(1)}else if(39===B||34===B)_t.quoteCharCode=B;else if(37===B&&U.lookAtCharCodeAhead(1)===Q)return F=U.pos+2,(G=se()).endPos=F,Yt(G),void U.skip(1);var F,G;_t.value+=k}}),ri=ht.createState({name:"STATE_INLINE_SCRIPT",eol(k){_t.endMatch||96===_t.stringType?_t.value+=k:(U.rewind(k.length),de(U.pos))},eof(){_t.endMatch||_t.stringType?Qt(_t.pos,"MALFORMED_SCRIPTLET","EOF reached while parsing scriptet"):de(U.pos)},comment(k){_t.value+=k.rawValue},char(k,B){if(B===K)return _t.value+=k+U.lookAtCharAhead(1),void U.skip(1);if(_t.stringType)return B===_t.stringType&&(_t.stringType=null),void(_t.value+=k);if(B===z){var F=U.lookAtCharCodeAhead(1);if(F===z)return ue(),void U.skip(1);if(F===it)return fe(),void U.skip(1)}if(_t.value+=k,B!==_t.endMatch)if(39!==B&&34!==B&&96!==B){var G=null;B===Z?G=J:B===tt?G=et:91===B&&(G=X),G&&(_t.endMatch&&_t.endMatches.push(_t.endMatch),_t.endMatch=G)}else _t.stringType=B;else _t.endMatch=_t.endMatches.pop()}});U.enterHtmlContentState=function(){U.state!==Me&&U.enterState(Me)},U.enterConciseHtmlContentState=function(){U.state!==Ne&&U.enterState(Ne)},U.enterParsedTextContentState=function(){var k=mt.length&&mt[mt.length-1];if(!k||!k.tagName)throw new Error('The "parsed text content" parser state is only allowed within a tag');wt?(k.body=1,U.enterState(Ne)):U.enterState(Be)},U.enterJsContentState=U.enterParsedTextContentState,U.enterCssContentState=U.enterParsedTextContentState,U.enterStaticTextContentState=function(){var k=mt.length&&mt[mt.length-1];if(!k||!k.tagName)throw new Error('The "static text content" parser state is only allowed within a tag');wt?(k.body=2,U.enterState(Ne)):U.enterState(ke)},2===Dt?(U.setInitialState(Ne),U.enterDefaultState=function(){U.enterState(Ne)}):(U.setInitialState(Me),U.enterDefaultState=function(){U.enterState(Me)})}parse(k,B){super.parse(k,B),this.notifiers.notifyFinish()}}k.exports=ht},21052:(k,B)=>{var U={};["base","br","col","hr","embed","img","input","keygen","link","meta","param","source","track","wbr"].forEach((function(k){U[k]=!0})),B.isOpenTagOnly=function(k){return U.hasOwnProperty(k)}},64425:(k,B,U)=>{var F=U(3366);B.C=function(k,B){return new F(k,B||{})}},64101:(k,B)=>{B.createNotifiers=function(k,B){var U=!1;return{notifyText(F,G){if(!U){var j=B.onText;j&&F.length>0&&j.call(k,{type:"text",value:F,parseMode:G},k)}},notifyCDATA(F,G,j){if(!U){var $=B.onCDATA;$&&F&&$.call(k,{type:"cdata",value:F,pos:G,endPos:j},k)}},notifyError(F,G,j){if(!U){U=!0;var $=B.onError;$&&$.call(k,{type:"error",code:G,message:j,pos:F,endPos:k.pos},k)}},notifyOpenTagName(F){if(!U){var G=B.onOpenTagName;if(G){var j={type:"openTagName",tagName:F.tagName,tagNameExpression:F.tagNameExpression,emptyTagName:F.emptyTagName,pos:F.pos,endPos:F.tagNameEndPos,concise:F.concise};F.shorthandId&&(j.shorthandId=F.shorthandId),F.shorthandClassNames&&(j.shorthandClassNames=F.shorthandClassNames),j.setParseOptions=function(k){k&&(F.parseOptions=k)},G.call(k,j,k)}}},notifyOpenTag(F){if(!U){var G=B.onOpenTag;if(G){var j={type:"openTag",tagName:F.tagName,tagNameExpression:F.tagNameExpression,emptyTagName:F.emptyTagName,var:F.var,argument:F.argument,params:F.params,pos:F.pos,endPos:F.endPos,tagNameEndPos:F.tagNameEndPos,openTagOnly:F.openTagOnly,selfClosed:F.selfClosed,concise:F.concise};F.shorthandId&&(j.shorthandId=F.shorthandId),F.shorthandClassNames&&(j.shorthandClassNames=F.shorthandClassNames),j.attributes=F.attributes.map((k=>{var B={default:k.default,name:k.name,value:k.value,pos:k.pos,endPos:k.endPos,argument:k.argument};return k.hasOwnProperty("literalValue")&&(B.literalValue=k.literalValue),B})),j.setParseOptions=function(B){if(B){var U=B.state;U&&("parsed-text"===U?k.enterParsedTextContentState():"static-text"===U&&k.enterStaticTextContentState()),F.parseOptions=B}},G.call(k,j,k)}}},notifyCloseTag(F,G,j){if(!U){var $=B.onCloseTag;if($){var H={type:"closeTag",tagName:F,pos:G,endPos:j};$.call(k,H,k)}}},notifyDocumentType(F){if(!U){var G=B.onDocumentType;G&&G.call(this,{type:"documentType",value:F.value,pos:F.pos,endPos:F.endPos},k)}},notifyDeclaration(F){if(!U){var G=B.onDeclaration;G&&G.call(k,{type:"declaration",value:F.value,pos:F.pos,endPos:F.endPos},k)}},notifyComment(F){if(!U){var G=B.onComment;G&&F.value&&G.call(k,{type:"comment",value:F.value,pos:F.pos,endPos:F.endPos},k)}},notifyScriptlet(F){if(!U){var G=B.onScriptlet;G&&F.value&&G.call(k,{type:"scriptlet",tag:F.tag,line:F.line,block:F.block,value:F.value,pos:F.pos,endPos:F.endPos},k)}},notifyPlaceholder(F){if(!U){var G=B.onPlaceholder;if(G){var j={type:"placeholder",value:F.value,pos:F.pos,endPos:F.endPos,escape:!1!==F.escape,withinBody:!0===F.withinBody,withinAttribute:!0===F.withinAttribute,withinString:!0===F.withinString,withinOpenTag:!0===F.withinOpenTag,withinTagName:!0===F.withinTagName};return G.call(k,j,k),j.value}return F.value}},notifyString(F){if(!U){var G=B.onString;if(G){var j={type:"string",value:F.value,pos:F.pos,endPos:F.endPos,stringParts:F.stringParts,isStringLiteral:F.isStringLiteral};return G.call(k,j,k),j.value}return F.value}},notifyFinish(){B.onfinish&&B.onfinish.call(k,{},k)}}}},70456:(k,B)=>{var U=B.operators=["*","/","%","+","-","<<",">>",">>>","<","<=",">",">=","instanceof","in","==","!=","===","!==","&","^","|","&&","||","?",":","["];function F(k){return/^[A-Z]+$/i.test(k)?"\\b"+G(k)+"\\b":"/"===k?"\\/(?:\\b|\\s)":G(k)}function G(k){return k.replace(/([^\w\d])/g,"\\$1")}U.sort((function(k,B){return B.length-k.length})),B.longest=U.sort(((k,B)=>B.length-k.length))[0].length+1,B.patternNext=new RegExp("^\\s*("+U.map(F).join("|")+")\\s*(?!-)"),B.patternPrev=new RegExp("[^-+](?:"+U.concat(["typeof","new","void"]).map(F).join("|")+")(\\s*)$")},251:(k,B)=>{B.read=function(k,B,U,F,G){var j,$,H=8*G-F-1,V=(1<>1,q=-7,K=U?G-1:0,z=U?-1:1,Y=k[B+K];for(K+=z,j=Y&(1<<-q)-1,Y>>=-q,q+=H;q>0;j=256*j+k[B+K],K+=z,q-=8);for($=j&(1<<-q)-1,j>>=-q,q+=F;q>0;$=256*$+k[B+K],K+=z,q-=8);if(0===j)j=1-W;else{if(j===V)return $?NaN:1/0*(Y?-1:1);$+=Math.pow(2,F),j-=W}return(Y?-1:1)*$*Math.pow(2,j-F)},B.write=function(k,B,U,F,G,j){var $,H,V,W=8*j-G-1,q=(1<>1,z=23===G?Math.pow(2,-24)-Math.pow(2,-77):0,Y=F?0:j-1,Q=F?1:-1,X=B<0||0===B&&1/B<0?1:0;for(B=Math.abs(B),isNaN(B)||B===1/0?(H=isNaN(B)?1:0,$=q):($=Math.floor(Math.log(B)/Math.LN2),B*(V=Math.pow(2,-$))<1&&($--,V*=2),(B+=$+K>=1?z/V:z*Math.pow(2,1-K))*V>=2&&($++,V/=2),$+K>=q?(H=0,$=q):$+K>=1?(H=(B*V-1)*Math.pow(2,G),$+=K):(H=B*Math.pow(2,K-1)*Math.pow(2,G),$=0));G>=8;k[U+Y]=255&H,Y+=Q,H/=256,G-=8);for($=$<0;k[U+Y]=255&$,Y+=Q,$/=256,W-=8);k[U+Y-Q]|=128*X}},56698:k=>{"function"==typeof Object.create?k.exports=function(k,B){B&&(k.super_=B,k.prototype=Object.create(B.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}))}:k.exports=function(k,B){if(B){k.super_=B;var U=function(){};U.prototype=B.prototype,k.prototype=new U,k.prototype.constructor=k}}},47244:(k,B,U)=>{"use strict";var F=U(49092)(),G=U(38075)("Object.prototype.toString"),j=function(k){return!(F&&k&&"object"==typeof k&&Symbol.toStringTag in k)&&"[object Arguments]"===G(k)},$=function(k){return!!j(k)||null!==k&&"object"==typeof k&&"number"==typeof k.length&&k.length>=0&&"[object Array]"!==G(k)&&"[object Function]"===G(k.callee)},H=function(){return j(arguments)}();j.isLegacyArguments=$,k.exports=H?j:$},69600:k=>{"use strict";var B,U,F=Function.prototype.toString,G="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof G&&"function"==typeof Object.defineProperty)try{B=Object.defineProperty({},"length",{get:function(){throw U}}),U={},G((function(){throw 42}),null,B)}catch(Y){Y!==U&&(G=null)}else G=null;var j=/^\s*class\b/,$=function(k){try{var B=F.call(k);return j.test(B)}catch(e){return!1}},H=function(k){try{return!$(k)&&(F.call(k),!0)}catch(e){return!1}},V=Object.prototype.toString,W="function"==typeof Symbol&&!!Symbol.toStringTag,q=!(0 in[,]),K=function(){return!1};if("object"==typeof document){var z=document.all;V.call(z)===V.call(document.all)&&(K=function(k){if((q||!k)&&(void 0===k||"object"==typeof k))try{var B=V.call(k);return("[object HTMLAllCollection]"===B||"[object HTML document.all class]"===B||"[object HTMLCollection]"===B||"[object Object]"===B)&&null==k("")}catch(e){}return!1})}k.exports=G?function(k){if(K(k))return!0;if(!k)return!1;if("function"!=typeof k&&"object"!=typeof k)return!1;try{G(k,null,B)}catch(e){if(e!==U)return!1}return!$(k)&&H(k)}:function(k){if(K(k))return!0;if(!k)return!1;if("function"!=typeof k&&"object"!=typeof k)return!1;if(W)return H(k);if($(k))return!1;var B=V.call(k);return!("[object Function]"!==B&&"[object GeneratorFunction]"!==B&&!/^\[object HTML/.test(B))&&H(k)}},48184:(k,B,U)=>{"use strict";var F,G=U(36556),j=U(99721)(/^\s*(?:function)?\*/),$=U(49092)(),H=U(93628),V=G("Object.prototype.toString"),W=G("Function.prototype.toString");k.exports=function(k){if("function"!=typeof k)return!1;if(j(W(k)))return!0;if(!$)return"[object GeneratorFunction]"===V(k);if(!H)return!1;if(void 0===F){var B=function(){if(!$)return!1;try{return Function("return function*() {}")()}catch(e){}}();F=!!B&&H(B)}return H(k)===F}},14035:(k,B,U)=>{"use strict";var F,G=U(36556),j=U(49092)(),$=U(9957),H=U(75795);if(j){var V=G("RegExp.prototype.exec"),W={},q=function(){throw W},K={toString:q,valueOf:q};"symbol"==typeof Symbol.toPrimitive&&(K[Symbol.toPrimitive]=q),F=function(k){if(!k||"object"!=typeof k)return!1;var B=H(k,"lastIndex");if(!(B&&$(B,"value")))return!1;try{V(k,K)}catch(e){return e===W}}}else{var z=G("Object.prototype.toString");F=function(k){return!(!k||"object"!=typeof k&&"function"!=typeof k)&&"[object RegExp]"===z(k)}}k.exports=F},35680:(k,B,U)=>{"use strict";var F=U(25767);k.exports=function(k){return!!F(k)}},13798:k=>{"use strict";k.exports=function(k){return null!=k&&"object"==typeof k&&!1===Array.isArray(k)}},3431:(k,B)=>{var U,F,G,j;j=function(){function k(k){for(var B=k,U=[];B.parent;)U.unshift(B),B=B.parent;return U}var B={search:function(U,F,j,$){U.cleanDirty();var H=($=$||{}).heuristic||B.heuristics.manhattan,V=$.closest||!1,W=new G((function(k){return k.f})),q=F;for(F.h=H(F,j),W.push(F);W.size()>0;){var K=W.pop();if(K===j)return k(K);K.closed=!0;for(var z=U.neighbors(K),Y=0,Q=z.length;Y0&&(this.content[0]=B,this.bubbleUp(0)),k},remove:function(k){var B=this.content.indexOf(k),U=this.content.pop();B!==this.content.length-1&&(this.content[B]=U,this.scoreFunction(U)0;){var U=(k+1>>1)-1,F=this.content[U];if(!(this.scoreFunction(B){k.exports=U(33251)(window)},33251:function(k){k.exports=function(k){var B={};function U(k){return"string"==typeof k||k&&"object"==typeof k&&"[object String]"==Object.prototype.toString.call(k)||!1}function F(k,F){return k&&!U(k)&&(F=k,k=void 0),{key:k||B.defaults.key,storage:F||B.defaults.storage}}return B.defaults={key:"JWT_TOKEN",tokenPrefix:"Bearer ",storage:k.localStorage,padding:!1},B.encode64=function(U){var F=k.btoa(k.unescape(k.encodeURIComponent(U)));return B.defaults.padding?F:F.replace(/=+$/,"")},B.decode64=function(B){return k.decodeURIComponent(k.escape(k.atob(B)))},B.write=function(k){return B.defaults.tokenPrefix+B.encode64(JSON.stringify(k.header))+"."+B.encode64(JSON.stringify(k.claim))+"."+(k.signature||"")},B.read=function(k){0===k.indexOf(B.defaults.tokenPrefix)&&(k=k.substring(B.defaults.tokenPrefix.length));var U=k.split(".");return{header:JSON.parse(B.decode64(U[0])),claim:JSON.parse(B.decode64(U[1])),signature:U[2]||""}},B.validateClaim=function(k,B,U){var F=Date.now()/1e3;return k&&(!k.exp||k.exp>F)&&(!k.nbf||k.nbf{"use strict";k.exports=$,$.Item=V;var B=$.prototype,U=V.prototype,F=W.prototype,G="undefined"==typeof Symbol?void 0:Symbol.iterator;B.tail=B.head=null,$.of=function(){return H(new this,arguments)},$.from=function(k){return H(new this,k)},B.toArray=function(){var k=this.head,B=[];for(;k;)B.push(k),k=k.next;return B},B.prepend=function(k){var B=this,U=B.head;if(!k)return!1;if(!k.append||!k.prepend||!k.detach)throw new Error(j+"#prepend`.");if(U)return U.prepend(k);return k.detach(),k.list=B,B.head=k,B.size++,k},B.append=function(k){if(!k)return!1;if(!k.append||!k.prepend||!k.detach)throw new Error(j+"#append`.");var B=this,U=B.head,F=B.tail;if(F)return F.append(k);if(U)return U.append(k);return k.detach(),k.list=B,B.head=k,B.size++,k},void 0!==G&&(B[G]=function(){return new W(this.head)}),U.next=U.prev=U.list=null,U.prepend=function(k){if(!(k&&k.append&&k.prepend&&k.detach))throw new Error(j+"Item#prepend`.");var B=this,U=B.list,F=B.prev;if(!U)return!1;k.detach(),F&&(k.prev=F,F.next=k);k.next=B,k.list=U,B.prev=k,B===U.head&&(U.head=k);U.tail||(U.tail=B);return U.size++,k},U.append=function(k){if(!(k&&k.append&&k.prepend&&k.detach))throw new Error(j+"Item#append`.");var B=this,U=B.list,F=B.next;if(!U)return!1;k.detach(),F&&(k.next=F,F.prev=k);k.prev=B,k.list=U,B.next=k,B!==U.tail&&U.tail||(U.tail=k);return U.size++,k},U.detach=function(){var k=this,B=k.list,U=k.prev,F=k.next;if(!B)return k;B.tail===k&&(B.tail=U);B.head===k&&(B.head=F);B.tail===B.head&&(B.tail=null);U&&(U.next=F);F&&(F.prev=U);return k.prev=k.next=k.list=null,B.size--,k},F.next=function(){var k=this.item;return this.value=k,this.done=!k,this.item=k?k.next:void 0,this};var j="An argument without append, prepend, or detach methods was given to `List";function $(){this.size=0,0!==arguments.length&&H(this,arguments)}function H(k,B){var U,F,j,$;if(!B)return k;if(void 0!==G&&B[G])for($=B[G](),j={};!j.done;)j=$.next(),k.append(j&&j.value);else for(U=B.length,F=-1;++F{"use strict";k.exports=Math.abs},58968:k=>{"use strict";k.exports=Math.floor},94459:k=>{"use strict";k.exports=Number.isNaN||function(k){return k!=k}},6188:k=>{"use strict";k.exports=Math.max},68002:k=>{"use strict";k.exports=Math.min},75880:k=>{"use strict";k.exports=Math.pow},70414:k=>{"use strict";k.exports=Math.round},73093:(k,B,U)=>{"use strict";var F=U(94459);k.exports=function(k){return F(k)||0===k?k:k<0?-1:1}},45228:k=>{"use strict";var B=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;function G(k){if(null==k)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(k)}k.exports=function(){try{if(!Object.assign)return!1;var k=new String("abc");if(k[5]="de","5"===Object.getOwnPropertyNames(k)[0])return!1;for(var B={},U=0;U<10;U++)B["_"+String.fromCharCode(U)]=U;if("0123456789"!==Object.getOwnPropertyNames(B).map((function(k){return B[k]})).join(""))return!1;var F={};return"abcdefghijklmnopqrst".split("").forEach((function(k){F[k]=k})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},F)).join("")}catch(G){return!1}}()?Object.assign:function(k,j){for(var $,H,V=G(k),W=1;W{var F="function"==typeof Map&&Map.prototype,G=Object.getOwnPropertyDescriptor&&F?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,j=F&&G&&"function"==typeof G.get?G.get:null,$=F&&Map.prototype.forEach,H="function"==typeof Set&&Set.prototype,V=Object.getOwnPropertyDescriptor&&H?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,W=H&&V&&"function"==typeof V.get?V.get:null,q=H&&Set.prototype.forEach,K="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,z="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,Q=Boolean.prototype.valueOf,X=Object.prototype.toString,Z=Function.prototype.toString,J=String.prototype.match,tt=String.prototype.slice,et=String.prototype.replace,it=String.prototype.toUpperCase,st=String.prototype.toLowerCase,nt=RegExp.prototype.test,at=Array.prototype.concat,rt=Array.prototype.join,ot=Array.prototype.slice,ht=Math.floor,ct="function"==typeof BigInt?BigInt.prototype.valueOf:null,dt=Object.getOwnPropertySymbols,lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,ut="function"==typeof Symbol&&"object"==typeof Symbol.iterator,ft="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ut||"symbol")?Symbol.toStringTag:null,bt=Object.prototype.propertyIsEnumerable,pt=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(k){return k.__proto__}:null);function vt(k,B){if(k===1/0||k===-1/0||k!=k||k&&k>-1e3&&k<1e3||nt.call(/e/,B))return B;var U=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof k){var F=k<0?-ht(-k):ht(k);if(F!==k){var G=String(F),j=tt.call(B,G.length+1);return et.call(G,U,"$&_")+"."+et.call(et.call(j,/([0-9]{3})/g,"$&_"),/_$/,"")}}return et.call(B,U,"$&_")}var gt=U(42634),mt=gt.custom,yt=Ot(mt)?mt:null,_t={__proto__:null,double:'"',single:"'"},Et={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function wt(k,B,U){var F=U.quoteStyle||B,G=_t[F];return G+k+G}function Tt(k){return et.call(String(k),/"/g,""")}function St(k){return!ft||!("object"==typeof k&&(ft in k||void 0!==k[ft]))}function At(k){return"[object Array]"===Rt(k)&&St(k)}function Ct(k){return"[object RegExp]"===Rt(k)&&St(k)}function Ot(k){if(ut)return k&&"object"==typeof k&&k instanceof Symbol;if("symbol"==typeof k)return!0;if(!k||"object"!=typeof k||!lt)return!1;try{return lt.call(k),!0}catch(e){}return!1}k.exports=function k(B,F,G,H){var V=F||{};if(Dt(V,"quoteStyle")&&!Dt(_t,V.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Dt(V,"maxStringLength")&&("number"==typeof V.maxStringLength?V.maxStringLength<0&&V.maxStringLength!==1/0:null!==V.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var X=!Dt(V,"customInspect")||V.customInspect;if("boolean"!=typeof X&&"symbol"!==X)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Dt(V,"indent")&&null!==V.indent&&"\t"!==V.indent&&!(parseInt(V.indent,10)===V.indent&&V.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Dt(V,"numericSeparator")&&"boolean"!=typeof V.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var it=V.numericSeparator;if(void 0===B)return"undefined";if(null===B)return"null";if("boolean"==typeof B)return B?"true":"false";if("string"==typeof B)return Mt(B,V);if("number"==typeof B){if(0===B)return 1/0/B>0?"0":"-0";var nt=String(B);return it?vt(B,nt):nt}if("bigint"==typeof B){var ht=String(B)+"n";return it?vt(B,ht):ht}var dt=void 0===V.depth?5:V.depth;if(void 0===G&&(G=0),G>=dt&&dt>0&&"object"==typeof B)return At(B)?"[Array]":"[Object]";var mt=function(k,B){var U;if("\t"===k.indent)U="\t";else{if(!("number"==typeof k.indent&&k.indent>0))return null;U=rt.call(Array(k.indent+1)," ")}return{base:U,prev:rt.call(Array(B+1),U)}}(V,G);if(void 0===H)H=[];else if(Pt(H,B)>=0)return"[Circular]";function Et(B,U,F){if(U&&(H=ot.call(H)).push(U),F){var j={depth:V.depth};return Dt(V,"quoteStyle")&&(j.quoteStyle=V.quoteStyle),k(B,j,G+1,H)}return k(B,V,G+1,H)}if("function"==typeof B&&!Ct(B)){var It=function(k){if(k.name)return k.name;var B=J.call(Z.call(k),/^function\s*([\w$]+)/);if(B)return B[1];return null}(B),Nt=Ut(B,Et);return"[Function"+(It?": "+It:" (anonymous)")+"]"+(Nt.length>0?" { "+rt.call(Nt,", ")+" }":"")}if(Ot(B)){var Ft=ut?et.call(String(B),/^(Symbol\(.*\))_[^)]*$/,"$1"):lt.call(B);return"object"!=typeof B||ut?Ft:xt(Ft)}if(function(k){if(!k||"object"!=typeof k)return!1;if("undefined"!=typeof HTMLElement&&k instanceof HTMLElement)return!0;return"string"==typeof k.nodeName&&"function"==typeof k.getAttribute}(B)){for(var Gt="<"+st.call(String(B.nodeName)),jt=B.attributes||[],$t=0;$t"}if(At(B)){if(0===B.length)return"[]";var Ht=Ut(B,Et);return mt&&!function(k){for(var B=0;B=0)return!1;return!0}(Ht)?"["+Bt(Ht,mt)+"]":"[ "+rt.call(Ht,", ")+" ]"}if(function(k){return"[object Error]"===Rt(k)&&St(k)}(B)){var Vt=Ut(B,Et);return"cause"in Error.prototype||!("cause"in B)||bt.call(B,"cause")?0===Vt.length?"["+String(B)+"]":"{ ["+String(B)+"] "+rt.call(Vt,", ")+" }":"{ ["+String(B)+"] "+rt.call(at.call("[cause]: "+Et(B.cause),Vt),", ")+" }"}if("object"==typeof B&&X){if(yt&&"function"==typeof B[yt]&>)return gt(B,{depth:dt-G});if("symbol"!==X&&"function"==typeof B.inspect)return B.inspect()}if(function(k){if(!j||!k||"object"!=typeof k)return!1;try{j.call(k);try{W.call(k)}catch(Gt){return!0}return k instanceof Map}catch(e){}return!1}(B)){var Wt=[];return $&&$.call(B,(function(k,U){Wt.push(Et(U,B,!0)+" => "+Et(k,B))})),kt("Map",j.call(B),Wt,mt)}if(function(k){if(!W||!k||"object"!=typeof k)return!1;try{W.call(k);try{j.call(k)}catch(B){return!0}return k instanceof Set}catch(e){}return!1}(B)){var qt=[];return q&&q.call(B,(function(k){qt.push(Et(k,B))})),kt("Set",W.call(B),qt,mt)}if(function(k){if(!K||!k||"object"!=typeof k)return!1;try{K.call(k,K);try{z.call(k,z)}catch(Gt){return!0}return k instanceof WeakMap}catch(e){}return!1}(B))return Lt("WeakMap");if(function(k){if(!z||!k||"object"!=typeof k)return!1;try{z.call(k,z);try{K.call(k,K)}catch(Gt){return!0}return k instanceof WeakSet}catch(e){}return!1}(B))return Lt("WeakSet");if(function(k){if(!Y||!k||"object"!=typeof k)return!1;try{return Y.call(k),!0}catch(e){}return!1}(B))return Lt("WeakRef");if(function(k){return"[object Number]"===Rt(k)&&St(k)}(B))return xt(Et(Number(B)));if(function(k){if(!k||"object"!=typeof k||!ct)return!1;try{return ct.call(k),!0}catch(e){}return!1}(B))return xt(Et(ct.call(B)));if(function(k){return"[object Boolean]"===Rt(k)&&St(k)}(B))return xt(Q.call(B));if(function(k){return"[object String]"===Rt(k)&&St(k)}(B))return xt(Et(String(B)));if("undefined"!=typeof window&&B===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&B===globalThis||void 0!==U.g&&B===U.g)return"{ [object globalThis] }";if(!function(k){return"[object Date]"===Rt(k)&&St(k)}(B)&&!Ct(B)){var Kt=Ut(B,Et),zt=pt?pt(B)===Object.prototype:B instanceof Object||B.constructor===Object,Yt=B instanceof Object?"":"null prototype",Qt=!zt&&ft&&Object(B)===B&&ft in B?tt.call(Rt(B),8,-1):Yt?"Object":"",Xt=(zt||"function"!=typeof B.constructor?"":B.constructor.name?B.constructor.name+" ":"")+(Qt||Yt?"["+rt.call(at.call([],Qt||[],Yt||[]),": ")+"] ":"");return 0===Kt.length?Xt+"{}":mt?Xt+"{"+Bt(Kt,mt)+"}":Xt+"{ "+rt.call(Kt,", ")+" }"}return String(B)};var It=Object.prototype.hasOwnProperty||function(k){return k in this};function Dt(k,B){return It.call(k,B)}function Rt(k){return X.call(k)}function Pt(k,B){if(k.indexOf)return k.indexOf(B);for(var U=0,F=k.length;UB.maxStringLength){var U=k.length-B.maxStringLength,F="... "+U+" more character"+(U>1?"s":"");return Mt(tt.call(k,0,B.maxStringLength),B)+F}var G=Et[B.quoteStyle||"single"];return G.lastIndex=0,wt(et.call(et.call(k,G,"\\$1"),/[\x00-\x1f]/g,Nt),"single",B)}function Nt(k){var B=k.charCodeAt(0),U={8:"b",9:"t",10:"n",12:"f",13:"r"}[B];return U?"\\"+U:"\\x"+(B<16?"0":"")+it.call(B.toString(16))}function xt(k){return"Object("+k+")"}function Lt(k){return k+" { ? }"}function kt(k,B,U,F){return k+" ("+B+") {"+(F?Bt(U,F):rt.call(U,", "))+"}"}function Bt(k,B){if(0===k.length)return"";var U="\n"+B.prev+B.base;return U+rt.call(k,","+U)+"\n"+B.prev}function Ut(k,B){var U=At(k),F=[];if(U){F.length=k.length;for(var G=0;G{"use strict";function B(k){if("string"!=typeof k)throw new TypeError("Path must be a string. Received "+JSON.stringify(k))}function U(k,B){for(var U,F="",G=0,j=-1,$=0,H=0;H<=k.length;++H){if(H2){var V=F.lastIndexOf("/");if(V!==F.length-1){-1===V?(F="",G=0):G=(F=F.slice(0,V)).length-1-F.lastIndexOf("/"),j=H,$=0;continue}}else if(2===F.length||1===F.length){F="",G=0,j=H,$=0;continue}B&&(F.length>0?F+="/..":F="..",G=2)}else F.length>0?F+="/"+k.slice(j+1,H):F=k.slice(j+1,H),G=H-j-1;j=H,$=0}else 46===U&&-1!==$?++$:$=-1}return F}var F={resolve:function(){for(var k,F="",G=!1,j=arguments.length-1;j>=-1&&!G;j--){var $;j>=0?$=arguments[j]:(void 0===k&&(k=process.cwd()),$=k),B($),0!==$.length&&(F=$+"/"+F,G=47===$.charCodeAt(0))}return F=U(F,!G),G?F.length>0?"/"+F:"/":F.length>0?F:"."},normalize:function(k){if(B(k),0===k.length)return".";var F=47===k.charCodeAt(0),G=47===k.charCodeAt(k.length-1);return 0!==(k=U(k,!F)).length||F||(k="."),k.length>0&&G&&(k+="/"),F?"/"+k:k},isAbsolute:function(k){return B(k),k.length>0&&47===k.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var k,U=0;U0&&(void 0===k?k=G:k+="/"+G)}return void 0===k?".":F.normalize(k)},relative:function(k,U){if(B(k),B(U),k===U)return"";if((k=F.resolve(k))===(U=F.resolve(U)))return"";for(var G=1;GW){if(47===U.charCodeAt(H+K))return U.slice(H+K+1);if(0===K)return U.slice(H+K)}else $>W&&(47===k.charCodeAt(G+K)?q=K:0===K&&(q=0));break}var z=k.charCodeAt(G+K);if(z!==U.charCodeAt(H+K))break;47===z&&(q=K)}var Y="";for(K=G+q+1;K<=j;++K)K!==j&&47!==k.charCodeAt(K)||(0===Y.length?Y+="..":Y+="/..");return Y.length>0?Y+U.slice(H+q):(H+=q,47===U.charCodeAt(H)&&++H,U.slice(H))},_makeLong:function(k){return k},dirname:function(k){if(B(k),0===k.length)return".";for(var U=k.charCodeAt(0),F=47===U,G=-1,j=!0,$=k.length-1;$>=1;--$)if(47===(U=k.charCodeAt($))){if(!j){G=$;break}}else j=!1;return-1===G?F?"/":".":F&&1===G?"//":k.slice(0,G)},basename:function(k,U){if(void 0!==U&&"string"!=typeof U)throw new TypeError('"ext" argument must be a string');B(k);var F,G=0,j=-1,$=!0;if(void 0!==U&&U.length>0&&U.length<=k.length){if(U.length===k.length&&U===k)return"";var H=U.length-1,V=-1;for(F=k.length-1;F>=0;--F){var W=k.charCodeAt(F);if(47===W){if(!$){G=F+1;break}}else-1===V&&($=!1,V=F+1),H>=0&&(W===U.charCodeAt(H)?-1==--H&&(j=F):(H=-1,j=V))}return G===j?j=V:-1===j&&(j=k.length),k.slice(G,j)}for(F=k.length-1;F>=0;--F)if(47===k.charCodeAt(F)){if(!$){G=F+1;break}}else-1===j&&($=!1,j=F+1);return-1===j?"":k.slice(G,j)},extname:function(k){B(k);for(var U=-1,F=0,G=-1,j=!0,$=0,H=k.length-1;H>=0;--H){var V=k.charCodeAt(H);if(47!==V)-1===G&&(j=!1,G=H+1),46===V?-1===U?U=H:1!==$&&($=1):-1!==U&&($=-1);else if(!j){F=H+1;break}}return-1===U||-1===G||0===$||1===$&&U===G-1&&U===F+1?"":k.slice(U,G)},format:function(k){if(null===k||"object"!=typeof k)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof k);return function(k,B){var U=B.dir||B.root,F=B.base||(B.name||"")+(B.ext||"");return U?U===B.root?U+F:U+k+F:F}("/",k)},parse:function(k){B(k);var U={root:"",dir:"",base:"",ext:"",name:""};if(0===k.length)return U;var F,G=k.charCodeAt(0),j=47===G;j?(U.root="/",F=1):F=0;for(var $=-1,H=0,V=-1,W=!0,q=k.length-1,K=0;q>=F;--q)if(47!==(G=k.charCodeAt(q)))-1===V&&(W=!1,V=q+1),46===G?-1===$?$=q:1!==K&&(K=1):-1!==$&&(K=-1);else if(!W){H=q+1;break}return-1===$||-1===V||0===K||1===K&&$===V-1&&$===H+1?-1!==V&&(U.base=U.name=0===H&&j?k.slice(1,V):k.slice(H,V)):(0===H&&j?(U.name=k.slice(1,$),U.base=k.slice(1,V)):(U.name=k.slice(H,$),U.base=k.slice(H,V)),U.ext=k.slice($,V)),H>0?U.dir=k.slice(0,H-1):j&&(U.dir="/"),U},sep:"/",delimiter:":",win32:null,posix:null};F.posix=F,k.exports=F},59004:function(k){k.exports=function(){"use strict";function k(k,B){if(!(k instanceof B))throw new TypeError("Cannot call a class as a function")}function B(k,B){for(var U=0;UB?1:k0))break;if(null===B.right)break;if(U(k,B.right.key)>0&&(V=B.right,B.right=V.left,V.left=B,null===(B=V).right))break;j.right=B,j=B,B=B.right}}return j.right=B.left,$.left=B.right,B.left=G.right,B.right=G.left,B}function $(k,B,U,G){var $=new F(k,B);if(null===U)return $.left=$.right=null,$;var H=G(k,(U=j(k,U,G)).key);return H<0?($.left=U.left,$.right=U,U.left=null):H>=0&&($.right=U.right,$.left=U,U.right=null),$}function H(k,B,U){var F=null,G=null;if(B){var $=U((B=j(k,B,U)).key,k);0===$?(F=B.left,G=B.right):$<0?(G=B.right,B.right=null,F=B):(F=B.left,B.left=null,G=B)}return{left:F,right:G}}function V(k,B,U){return null===B?k:(null===k||((B=j(k.key,B,U)).left=k),B)}function W(k,B,U,F,G){if(k){F(B+(U?"└── ":"├── ")+G(k)+"\n");var j=B+(U?" ":"│ ");k.left&&W(k.left,j,!1,F,G),k.right&&W(k.right,j,!0,F,G)}}var q=function(){function k(k){void 0===k&&(k=G),this._root=null,this._size=0,this._comparator=k}return k.prototype.insert=function(k,B){return this._size++,this._root=$(k,B,this._root,this._comparator)},k.prototype.add=function(k,B){var U=new F(k,B);null===this._root&&(U.left=U.right=null,this._size++,this._root=U);var G=this._comparator,$=j(k,this._root,G),H=G(k,$.key);return 0===H?this._root=$:(H<0?(U.left=$.left,U.right=$,$.left=null):H>0&&(U.right=$.right,U.left=$,$.right=null),this._size++,this._root=U),this._root},k.prototype.remove=function(k){this._root=this._remove(k,this._root,this._comparator)},k.prototype._remove=function(k,B,U){var F;return null===B?null:0===U(k,(B=j(k,B,U)).key)?(null===B.left?F=B.right:(F=j(k,B.left,U)).right=B.right,this._size--,F):B},k.prototype.pop=function(){var k=this._root;if(k){for(;k.left;)k=k.left;return this._root=j(k.key,this._root,this._comparator),this._root=this._remove(k.key,this._root,this._comparator),{key:k.key,data:k.data}}return null},k.prototype.findStatic=function(k){for(var B=this._root,U=this._comparator;B;){var F=U(k,B.key);if(0===F)return B;B=F<0?B.left:B.right}return null},k.prototype.find=function(k){return this._root&&(this._root=j(k,this._root,this._comparator),0!==this._comparator(k,this._root.key))?null:this._root},k.prototype.contains=function(k){for(var B=this._root,U=this._comparator;B;){var F=U(k,B.key);if(0===F)return!0;B=F<0?B.left:B.right}return!1},k.prototype.forEach=function(k,B){for(var U=this._root,F=[],G=!1;!G;)null!==U?(F.push(U),U=U.left):0!==F.length?(U=F.pop(),k.call(B,U),U=U.right):G=!0;return this},k.prototype.range=function(k,B,U,F){for(var G=[],j=this._comparator,$=this._root;0!==G.length||$;)if($)G.push($),$=$.left;else{if(j(($=G.pop()).key,B)>0)break;if(j($.key,k)>=0&&U.call(F,$))return this;$=$.right}return this},k.prototype.keys=function(){var k=[];return this.forEach((function(B){var U=B.key;return k.push(U)})),k},k.prototype.values=function(){var k=[];return this.forEach((function(B){var U=B.data;return k.push(U)})),k},k.prototype.min=function(){return this._root?this.minNode(this._root).key:null},k.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},k.prototype.minNode=function(k){if(void 0===k&&(k=this._root),k)for(;k.left;)k=k.left;return k},k.prototype.maxNode=function(k){if(void 0===k&&(k=this._root),k)for(;k.right;)k=k.right;return k},k.prototype.at=function(k){for(var B=this._root,U=!1,F=0,G=[];!U;)if(B)G.push(B),B=B.left;else if(G.length>0){if(B=G.pop(),F===k)return B;F++,B=B.right}else U=!0;return null},k.prototype.next=function(k){var B=this._root,U=null;if(k.right){for(U=k.right;U.left;)U=U.left;return U}for(var F=this._comparator;B;){var G=F(k.key,B.key);if(0===G)break;G<0?(U=B,B=B.left):B=B.right}return U},k.prototype.prev=function(k){var B=this._root,U=null;if(null!==k.left){for(U=k.left;U.right;)U=U.right;return U}for(var F=this._comparator;B;){var G=F(k.key,B.key);if(0===G)break;G<0?B=B.left:(U=B,B=B.right)}return U},k.prototype.clear=function(){return this._root=null,this._size=0,this},k.prototype.toList=function(){return Y(this._root)},k.prototype.load=function(k,B,U){void 0===B&&(B=[]),void 0===U&&(U=!1);var F=k.length,G=this._comparator;if(U&&Z(k,B,0,F-1,G),null===this._root)this._root=K(k,B,0,F),this._size=F;else{var j=X(this.toList(),z(k,B),G);F=this._size+F,this._root=Q({head:j},0,F)}return this},k.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(k.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),k.prototype.toString=function(k){void 0===k&&(k=function(k){return String(k.key)});var B=[];return W(this._root,"",!0,(function(k){return B.push(k)}),k),B.join("")},k.prototype.update=function(k,B,U){var F=this._comparator,G=H(k,this._root,F),j=G.left,W=G.right;F(k,B)<0?W=$(B,U,W,F):j=$(B,U,j,F),this._root=V(j,W,F)},k.prototype.split=function(k){return H(k,this._root,this._comparator)},k}();function K(k,B,U,G){var j=G-U;if(j>0){var $=U+Math.floor(j/2),H=k[$],V=B[$],W=new F(H,V);return W.left=K(k,B,U,$),W.right=K(k,B,$+1,G),W}return null}function z(k,B){for(var U=new F(null,null),G=U,j=0;j0?B=(B=$=$.next=U.pop()).right:G=!0;return $.next=null,j.next}function Q(k,B,U){var F=U-B;if(F>0){var G=B+Math.floor(F/2),j=Q(k,B,G),$=k.head;return $.left=j,k.head=k.head.next,$.right=Q(k,G+1,U),$}return null}function X(k,B,U){for(var G=new F(null,null),j=G,$=k,H=B;null!==$&&null!==H;)U($.key,H.key)<0?(j.next=$,$=$.next):(j.next=H,H=H.next),j=j.next;return null!==$?j.next=$:null!==H&&(j.next=H),G.next}function Z(k,B,U,F,G){if(!(U>=F)){for(var j=k[U+F>>1],$=U-1,H=F+1;;){do{$++}while(G(k[$],j)<0);do{H--}while(G(k[H],j)>0);if($>=H)break;var V=k[$];k[$]=k[H],k[H]=V,V=B[$],B[$]=B[H],B[H]=V}Z(k,B,U,H,G),Z(k,B,H+1,F,G)}}var J=function(k,B){return k.ll.x<=B.x&&B.x<=k.ur.x&&k.ll.y<=B.y&&B.y<=k.ur.y},tt=function(k,B){if(B.ur.xB.x?1:k.yB.y?1:0}}]),U(B,[{key:"link",value:function(k){if(k.point===this.point)throw new Error("Tried to link already linked events");for(var B=k.point.events,U=0,F=B.length;U=0&&V>=0?$W?-1:0:j<0&&V<0?$W?1:0:Vj?1:0}}}]),B}(),gt=0,mt=function(){function B(U,F,G,j){k(this,B),this.id=++gt,this.leftSE=U,U.segment=this,U.otherSE=F,this.rightSE=F,F.segment=this,F.otherSE=U,this.rings=G,this.windings=j}return U(B,null,[{key:"compare",value:function(k,B){var U=k.leftSE.point.x,F=B.leftSE.point.x,G=k.rightSE.point.x,j=B.rightSE.point.x;if(j$&&H>V)return-1;var q=k.comparePoint(B.leftSE.point);if(q<0)return 1;if(q>0)return-1;var K=B.comparePoint(k.rightSE.point);return 0!==K?K:-1}if(U>F){if($H&&$>W)return 1;var z=B.comparePoint(k.leftSE.point);if(0!==z)return z;var Y=k.comparePoint(B.rightSE.point);return Y<0?1:Y>0?-1:1}if($H)return 1;if(Gj){var X=k.comparePoint(B.rightSE.point);if(X<0)return 1;if(X>0)return-1}if(G!==j){var Z=V-$,J=G-U,tt=W-H,et=j-F;if(Z>J&&ttet)return-1}return G>j?1:GW?1:k.idB.id?1:0}}]),U(B,[{key:"replaceRightSE",value:function(k){this.rightSE=k,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var k=this.leftSE.point.y,B=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:kB?k:B}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(k){return k.x===this.leftSE.point.x&&k.y===this.leftSE.point.y||k.x===this.rightSE.point.x&&k.y===this.rightSE.point.y}},{key:"comparePoint",value:function(k){if(this.isAnEndpoint(k))return 0;var B=this.leftSE.point,U=this.rightSE.point,F=this.vector();if(B.x===U.x)return k.x===B.x?0:k.x0&&H.swapEvents(),vt.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),F&&(G.checkForConsuming(),j.checkForConsuming()),U}},{key:"swapEvents",value:function(){var k=this.rightSE;this.rightSE=this.leftSE,this.leftSE=k,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var B=0,U=this.windings.length;B0){var j=U;U=F,F=j}if(U.prev===F){var $=U;U=F,F=$}for(var H=0,V=F.rings.length;H0))throw new Error("Tried to create degenerate segment at [".concat(k.x,", ").concat(k.y,"]"));G=U,j=k,$=-1}return new B(new vt(G,!0),new vt(j,!1),[F],[$])}}]),B}(),yt=function(){function B(U,F,G){if(k(this,B),!Array.isArray(U)||0===U.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=F,this.isExterior=G,this.segments=[],"number"!=typeof U[0][0]||"number"!=typeof U[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var j=rt.round(U[0][0],U[0][1]);this.bbox={ll:{x:j.x,y:j.y},ur:{x:j.x,y:j.y}};for(var $=j,H=1,V=U.length;Hthis.bbox.ur.x&&(this.bbox.ur.x=W.x),W.y>this.bbox.ur.y&&(this.bbox.ur.y=W.y),$=W)}j.x===$.x&&j.y===$.y||this.segments.push(mt.fromRing($,j,this))}return U(B,[{key:"getSweepEvents",value:function(){for(var k=[],B=0,U=this.segments.length;Bthis.bbox.ur.x&&(this.bbox.ur.x=$.bbox.ur.x),$.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=$.bbox.ur.y),this.interiorRings.push($)}this.multiPoly=F}return U(B,[{key:"getSweepEvents",value:function(){for(var k=this.exteriorRing.getSweepEvents(),B=0,U=this.interiorRings.length;Bthis.bbox.ur.x&&(this.bbox.ur.x=$.bbox.ur.x),$.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=$.bbox.ur.y),this.polys.push($)}this.isSubject=F}return U(B,[{key:"getSweepEvents",value:function(){for(var k=[],B=0,U=this.polys.length;B0&&(k=F)}for(var G=k.segment.prevInResult(),j=G?G.prevInResult():null;;){if(!G)return null;if(!j)return G.ringOut;if(j.ringOut!==G.ringOut)return j.ringOut.enclosingRing()!==G.ringOut?G.ringOut:G.ringOut.enclosingRing();G=j.prevInResult(),j=G?G.prevInResult():null}}}]),B}(),Tt=function(){function B(U){k(this,B),this.exteriorRing=U,U.poly=this,this.interiorRings=[]}return U(B,[{key:"addInterior",value:function(k){this.interiorRings.push(k),k.poly=this}},{key:"getGeom",value:function(){var k=[this.exteriorRing.getGeom()];if(null===k[0])return null;for(var B=0,U=this.interiorRings.length;B1&&void 0!==arguments[1]?arguments[1]:mt.compare;k(this,B),this.queue=U,this.tree=new q(F),this.segments=[]}return U(B,[{key:"process",value:function(k){var B=k.segment,U=[];if(k.consumedBy)return k.isLeft?this.queue.remove(k.otherSE):this.tree.remove(B),U;var F=k.isLeft?this.tree.insert(B):this.tree.find(B);if(!F)throw new Error("Unable to find segment #".concat(B.id," ")+"[".concat(B.leftSE.point.x,", ").concat(B.leftSE.point.y,"] -> ")+"[".concat(B.rightSE.point.x,", ").concat(B.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var G=F,j=F,$=void 0,H=void 0;void 0===$;)null===(G=this.tree.prev(G))?$=null:void 0===G.key.consumedBy&&($=G.key);for(;void 0===H;)null===(j=this.tree.next(j))?H=null:void 0===j.key.consumedBy&&(H=j.key);if(k.isLeft){var V=null;if($){var W=$.getIntersection(B);if(null!==W&&(B.isAnEndpoint(W)||(V=W),!$.isAnEndpoint(W)))for(var q=this._splitSafely($,W),K=0,z=q.length;K0?(this.tree.remove(B),U.push(k)):(this.segments.push(B),B.prev=$)}else{if($&&H){var nt=$.getIntersection(H);if(null!==nt){if(!$.isAnEndpoint(nt))for(var at=this._splitSafely($,nt),rt=0,ot=at.length;rtCt)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var st=new At(Q),nt=Q.size,at=Q.pop();at;){var ot=at.key;if(Q.size===nt){var ht=ot.segment;throw new Error("Unable to pop() ".concat(ot.isLeft?"left":"right"," SweepEvent ")+"[".concat(ot.point.x,", ").concat(ot.point.y,"] from segment #").concat(ht.id," ")+"[".concat(ht.leftSE.point.x,", ").concat(ht.leftSE.point.y,"] -> ")+"[".concat(ht.rightSE.point.x,", ").concat(ht.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(Q.size>Ct)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(st.segments.length>Ot)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var ct=st.process(ot),dt=0,lt=ct.length;dt1?B-1:0),F=1;F1?B-1:0),F=1;F1?B-1:0),F=1;F1?B-1:0),F=1;F{"use strict";k.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},26946:(k,B,U)=>{"use strict";k.exports=U(24394)},24394:(k,B,U)=>{"use strict";var F=B;function G(){F.util._configure(),F.Writer._configure(F.BufferWriter),F.Reader._configure(F.BufferReader)}F.build="minimal",F.Writer=U(63449),F.BufferWriter=U(60818),F.Reader=U(16237),F.BufferReader=U(33158),F.util=U(93610),F.rpc=U(95047),F.roots=U(64529),F.configure=G,G()},16237:(k,B,U)=>{"use strict";k.exports=V;var F,G=U(93610),j=G.LongBits,$=G.utf8;function H(k,B){return RangeError("index out of range: "+k.pos+" + "+(B||1)+" > "+k.len)}function V(k){this.buf=k,this.pos=0,this.len=k.length}var W,q="undefined"!=typeof Uint8Array?function(k){if(k instanceof Uint8Array||Array.isArray(k))return new V(k);throw Error("illegal buffer")}:function(k){if(Array.isArray(k))return new V(k);throw Error("illegal buffer")},K=function(){return G.Buffer?function(k){return(V.create=function(k){return G.Buffer.isBuffer(k)?new F(k):q(k)})(k)}:q};function z(){var k=new j(0,0),B=0;if(!(this.len-this.pos>4)){for(;B<3;++B){if(this.pos>=this.len)throw H(this);if(k.lo=(k.lo|(127&this.buf[this.pos])<<7*B)>>>0,this.buf[this.pos++]<128)return k}return k.lo=(k.lo|(127&this.buf[this.pos++])<<7*B)>>>0,k}for(;B<4;++B)if(k.lo=(k.lo|(127&this.buf[this.pos])<<7*B)>>>0,this.buf[this.pos++]<128)return k;if(k.lo=(k.lo|(127&this.buf[this.pos])<<28)>>>0,k.hi=(k.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return k;if(B=0,this.len-this.pos>4){for(;B<5;++B)if(k.hi=(k.hi|(127&this.buf[this.pos])<<7*B+3)>>>0,this.buf[this.pos++]<128)return k}else for(;B<5;++B){if(this.pos>=this.len)throw H(this);if(k.hi=(k.hi|(127&this.buf[this.pos])<<7*B+3)>>>0,this.buf[this.pos++]<128)return k}throw Error("invalid varint encoding")}function Y(k,B){return(k[B-4]|k[B-3]<<8|k[B-2]<<16|k[B-1]<<24)>>>0}function Q(){if(this.pos+8>this.len)throw H(this,8);return new j(Y(this.buf,this.pos+=4),Y(this.buf,this.pos+=4))}V.create=K(),V.prototype._slice=G.Array.prototype.subarray||G.Array.prototype.slice,V.prototype.uint32=(W=4294967295,function(){if(W=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return W;if(W=(W|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return W;if(W=(W|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return W;if(W=(W|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return W;if(W=(W|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return W;if((this.pos+=5)>this.len)throw this.pos=this.len,H(this,10);return W}),V.prototype.int32=function(){return 0|this.uint32()},V.prototype.sint32=function(){var k=this.uint32();return k>>>1^-(1&k)|0},V.prototype.bool=function(){return 0!==this.uint32()},V.prototype.fixed32=function(){if(this.pos+4>this.len)throw H(this,4);return Y(this.buf,this.pos+=4)},V.prototype.sfixed32=function(){if(this.pos+4>this.len)throw H(this,4);return 0|Y(this.buf,this.pos+=4)},V.prototype.float=function(){if(this.pos+4>this.len)throw H(this,4);var k=G.float.readFloatLE(this.buf,this.pos);return this.pos+=4,k},V.prototype.double=function(){if(this.pos+8>this.len)throw H(this,4);var k=G.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,k},V.prototype.bytes=function(){var k=this.uint32(),B=this.pos,U=this.pos+k;if(U>this.len)throw H(this,k);return this.pos+=k,Array.isArray(this.buf)?this.buf.slice(B,U):B===U?new this.buf.constructor(0):this._slice.call(this.buf,B,U)},V.prototype.string=function(){var k=this.bytes();return $.read(k,0,k.length)},V.prototype.skip=function(k){if("number"==typeof k){if(this.pos+k>this.len)throw H(this,k);this.pos+=k}else do{if(this.pos>=this.len)throw H(this)}while(128&this.buf[this.pos++]);return this},V.prototype.skipType=function(k){switch(k){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(k=7&this.uint32());)this.skipType(k);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+k+" at offset "+this.pos)}return this},V._configure=function(k){F=k,V.create=K(),F._configure();var B=G.Long?"toLong":"toNumber";G.merge(V.prototype,{int64:function(){return z.call(this)[B](!1)},uint64:function(){return z.call(this)[B](!0)},sint64:function(){return z.call(this).zzDecode()[B](!1)},fixed64:function(){return Q.call(this)[B](!0)},sfixed64:function(){return Q.call(this)[B](!1)}})}},33158:(k,B,U)=>{"use strict";k.exports=j;var F=U(16237);(j.prototype=Object.create(F.prototype)).constructor=j;var G=U(93610);function j(k){F.call(this,k)}j._configure=function(){G.Buffer&&(j.prototype._slice=G.Buffer.prototype.slice)},j.prototype.string=function(){var k=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+k,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+k,this.len))},j._configure()},64529:k=>{"use strict";k.exports={}},95047:(k,B,U)=>{"use strict";B.Service=U(27595)},27595:(k,B,U)=>{"use strict";k.exports=G;var F=U(93610);function G(k,B,U){if("function"!=typeof k)throw TypeError("rpcImpl must be a function");F.EventEmitter.call(this),this.rpcImpl=k,this.requestDelimited=Boolean(B),this.responseDelimited=Boolean(U)}(G.prototype=Object.create(F.EventEmitter.prototype)).constructor=G,G.prototype.rpcCall=function k(B,U,G,j,$){if(!j)throw TypeError("request must be specified");var H=this;if(!$)return F.asPromise(k,H,B,U,G,j);if(H.rpcImpl)try{return H.rpcImpl(B,U[H.requestDelimited?"encodeDelimited":"encode"](j).finish(),(function(k,U){if(k)return H.emit("error",k,B),$(k);if(null!==U){if(!(U instanceof G))try{U=G[H.responseDelimited?"decodeDelimited":"decode"](U)}catch(k){return H.emit("error",k,B),$(k)}return H.emit("data",U,B),$(null,U)}H.end(!0)}))}catch(V){return H.emit("error",V,B),void setTimeout((function(){$(V)}),0)}else setTimeout((function(){$(Error("already ended"))}),0)},G.prototype.end=function(k){return this.rpcImpl&&(k||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},32239:(k,B,U)=>{"use strict";k.exports=G;var F=U(93610);function G(k,B){this.lo=k>>>0,this.hi=B>>>0}var j=G.zero=new G(0,0);j.toNumber=function(){return 0},j.zzEncode=j.zzDecode=function(){return this},j.length=function(){return 1};var $=G.zeroHash="\0\0\0\0\0\0\0\0";G.fromNumber=function(k){if(0===k)return j;var B=k<0;B&&(k=-k);var U=k>>>0,F=(k-U)/4294967296>>>0;return B&&(F=~F>>>0,U=~U>>>0,++U>4294967295&&(U=0,++F>4294967295&&(F=0))),new G(U,F)},G.from=function(k){if("number"==typeof k)return G.fromNumber(k);if(F.isString(k)){if(!F.Long)return G.fromNumber(parseInt(k,10));k=F.Long.fromString(k)}return k.low||k.high?new G(k.low>>>0,k.high>>>0):j},G.prototype.toNumber=function(k){if(!k&&this.hi>>>31){var B=1+~this.lo>>>0,U=~this.hi>>>0;return B||(U=U+1>>>0),-(B+4294967296*U)}return this.lo+4294967296*this.hi},G.prototype.toLong=function(k){return F.Long?new F.Long(0|this.lo,0|this.hi,Boolean(k)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(k)}};var H=String.prototype.charCodeAt;G.fromHash=function(k){return k===$?j:new G((H.call(k,0)|H.call(k,1)<<8|H.call(k,2)<<16|H.call(k,3)<<24)>>>0,(H.call(k,4)|H.call(k,5)<<8|H.call(k,6)<<16|H.call(k,7)<<24)>>>0)},G.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},G.prototype.zzEncode=function(){var k=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^k)>>>0,this.lo=(this.lo<<1^k)>>>0,this},G.prototype.zzDecode=function(){var k=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^k)>>>0,this.hi=(this.hi>>>1^k)>>>0,this},G.prototype.length=function(){var k=this.lo,B=(this.lo>>>28|this.hi<<4)>>>0,U=this.hi>>>24;return 0===U?0===B?k<16384?k<128?1:2:k<2097152?3:4:B<16384?B<128?5:6:B<2097152?7:8:U<128?9:10}},93610:function(k,B,U){"use strict";var F=B;function G(k,B,U){for(var F=Object.keys(B),G=0;G0)},F.Buffer=function(){try{var k=F.inquire("buffer").Buffer;return k.prototype.utf8Write?k:null}catch(e){return null}}(),F._Buffer_from=null,F._Buffer_allocUnsafe=null,F.newBuffer=function(k){return"number"==typeof k?F.Buffer?F._Buffer_allocUnsafe(k):new F.Array(k):F.Buffer?F._Buffer_from(k):"undefined"==typeof Uint8Array?k:new Uint8Array(k)},F.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,F.Long=F.global.dcodeIO&&F.global.dcodeIO.Long||F.global.Long||F.inquire("long"),F.key2Re=/^true|false|0|1$/,F.key32Re=/^-?(?:0|[1-9][0-9]*)$/,F.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,F.longToHash=function(k){return k?F.LongBits.from(k).toHash():F.LongBits.zeroHash},F.longFromHash=function(k,B){var U=F.LongBits.fromHash(k);return F.Long?F.Long.fromBits(U.lo,U.hi,B):U.toNumber(Boolean(B))},F.merge=G,F.lcFirst=function(k){return k.charAt(0).toLowerCase()+k.substring(1)},F.newError=j,F.ProtocolError=j("ProtocolError"),F.oneOfGetter=function(k){for(var B={},U=0;U-1;--U)if(1===B[k[U]]&&void 0!==this[k[U]]&&null!==this[k[U]])return k[U]}},F.oneOfSetter=function(k){return function(B){for(var U=0;U{"use strict";k.exports=K;var F,G=U(93610),j=G.LongBits,$=G.base64,H=G.utf8;function V(k,B,U){this.fn=k,this.len=B,this.next=void 0,this.val=U}function W(){}function q(k){this.head=k.head,this.tail=k.tail,this.len=k.len,this.next=k.states}function K(){this.len=0,this.head=new V(W,0,0),this.tail=this.head,this.states=null}var z=function(){return G.Buffer?function(){return(K.create=function(){return new F})()}:function(){return new K}};function Y(k,B,U){B[U]=255&k}function Q(k,B){this.len=k,this.next=void 0,this.val=B}function X(k,B,U){for(;k.hi;)B[U++]=127&k.lo|128,k.lo=(k.lo>>>7|k.hi<<25)>>>0,k.hi>>>=7;for(;k.lo>127;)B[U++]=127&k.lo|128,k.lo=k.lo>>>7;B[U++]=k.lo}function Z(k,B,U){B[U]=255&k,B[U+1]=k>>>8&255,B[U+2]=k>>>16&255,B[U+3]=k>>>24}K.create=z(),K.alloc=function(k){return new G.Array(k)},G.Array!==Array&&(K.alloc=G.pool(K.alloc,G.Array.prototype.subarray)),K.prototype._push=function(k,B,U){return this.tail=this.tail.next=new V(k,B,U),this.len+=B,this},Q.prototype=Object.create(V.prototype),Q.prototype.fn=function(k,B,U){for(;k>127;)B[U++]=127&k|128,k>>>=7;B[U]=k},K.prototype.uint32=function(k){return this.len+=(this.tail=this.tail.next=new Q((k>>>=0)<128?1:k<16384?2:k<2097152?3:k<268435456?4:5,k)).len,this},K.prototype.int32=function(k){return k<0?this._push(X,10,j.fromNumber(k)):this.uint32(k)},K.prototype.sint32=function(k){return this.uint32((k<<1^k>>31)>>>0)},K.prototype.uint64=function(k){var B=j.from(k);return this._push(X,B.length(),B)},K.prototype.int64=K.prototype.uint64,K.prototype.sint64=function(k){var B=j.from(k).zzEncode();return this._push(X,B.length(),B)},K.prototype.bool=function(k){return this._push(Y,1,k?1:0)},K.prototype.fixed32=function(k){return this._push(Z,4,k>>>0)},K.prototype.sfixed32=K.prototype.fixed32,K.prototype.fixed64=function(k){var B=j.from(k);return this._push(Z,4,B.lo)._push(Z,4,B.hi)},K.prototype.sfixed64=K.prototype.fixed64,K.prototype.float=function(k){return this._push(G.float.writeFloatLE,4,k)},K.prototype.double=function(k){return this._push(G.float.writeDoubleLE,8,k)};var J=G.Array.prototype.set?function(k,B,U){B.set(k,U)}:function(k,B,U){for(var F=0;F>>0;if(!B)return this._push(Y,1,0);if(G.isString(k)){var U=K.alloc(B=$.length(k));$.decode(k,U,0),k=U}return this.uint32(B)._push(J,B,k)},K.prototype.string=function(k){var B=H.length(k);return B?this.uint32(B)._push(H.write,B,k):this._push(Y,1,0)},K.prototype.fork=function(){return this.states=new q(this),this.head=this.tail=new V(W,0,0),this.len=0,this},K.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new V(W,0,0),this.len=0),this},K.prototype.ldelim=function(){var k=this.head,B=this.tail,U=this.len;return this.reset().uint32(U),U&&(this.tail.next=k.next,this.tail=B,this.len+=U),this},K.prototype.finish=function(){for(var k=this.head.next,B=this.constructor.alloc(this.len),U=0;k;)k.fn(k.val,B,U),U+=k.len,k=k.next;return B},K._configure=function(k){F=k,K.create=z(),F._configure()}},60818:(k,B,U)=>{"use strict";k.exports=j;var F=U(63449);(j.prototype=Object.create(F.prototype)).constructor=j;var G=U(93610);function j(){F.call(this)}function $(k,B,U){k.length<40?G.utf8.write(k,B,U):B.utf8Write?B.utf8Write(k,U):B.write(k,U)}j._configure=function(){j.alloc=G._Buffer_allocUnsafe,j.writeBytesBuffer=G.Buffer&&G.Buffer.prototype instanceof Uint8Array&&"set"===G.Buffer.prototype.set.name?function(k,B,U){B.set(k,U)}:function(k,B,U){if(k.copy)k.copy(B,U,0,k.length);else for(var F=0;F>>0;return this.uint32(B),B&&this._push(j.writeBytesBuffer,B,k),this},j.prototype.string=function(k){var B=G.Buffer.byteLength(k);return this.uint32(B),B&&this._push($,B,k),this},j._configure()},9655:function(k,B,U){var F;k=U.nmd(k),function(G){B&&B.nodeType,k&&k.nodeType;var j="object"==typeof U.g&&U.g;j.global!==j&&j.window!==j&&j.self;var $,H=2147483647,V=36,W=/^xn--/,q=/[^\x20-\x7E]/,K=/[\x2E\u3002\uFF0E\uFF61]/g,z={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Y=Math.floor,Q=String.fromCharCode;function X(k){throw new RangeError(z[k])}function Z(k,B){for(var U=k.length,F=[];U--;)F[U]=B(k[U]);return F}function J(k,B){var U=k.split("@"),F="";return U.length>1&&(F=U[0]+"@",k=U[1]),F+Z((k=k.replace(K,".")).split("."),B).join(".")}function tt(k){for(var B,U,F=[],G=0,j=k.length;G=55296&&B<=56319&&G65535&&(B+=Q((k-=65536)>>>10&1023|55296),k=56320|1023&k),B+=Q(k)})).join("")}function it(k,B){return k+22+75*(k<26)-((0!=B)<<5)}function st(k,B,U){var F=0;for(k=U?Y(k/700):k>>1,k+=Y(k/B);k>455;F+=V)k=Y(k/35);return Y(F+36*k/(k+38))}function nt(k){var B,U,F,G,j,$,W,q,K,z,Q,Z=[],J=k.length,tt=0,it=128,nt=72;for((U=k.lastIndexOf("-"))<0&&(U=0),F=0;F=128&&X("not-basic"),Z.push(k.charCodeAt(F));for(G=U>0?U+1:0;G=J&&X("invalid-input"),((q=(Q=k.charCodeAt(G++))-48<10?Q-22:Q-65<26?Q-65:Q-97<26?Q-97:V)>=V||q>Y((H-tt)/$))&&X("overflow"),tt+=q*$,!(q<(K=W<=nt?1:W>=nt+26?26:W-nt));W+=V)$>Y(H/(z=V-K))&&X("overflow"),$*=z;nt=st(tt-j,B=Z.length+1,0==j),Y(tt/B)>H-it&&X("overflow"),it+=Y(tt/B),tt%=B,Z.splice(tt++,0,it)}return et(Z)}function at(k){var B,U,F,G,j,$,W,q,K,z,Z,J,et,nt,at,rt=[];for(J=(k=tt(k)).length,B=128,U=0,j=72,$=0;$=B&&ZY((H-U)/(et=F+1))&&X("overflow"),U+=(W-B)*et,B=W,$=0;$H&&X("overflow"),Z==B){for(q=U,K=V;!(q<(z=K<=j?1:K>=j+26?26:K-j));K+=V)at=q-z,nt=V-z,rt.push(Q(it(z+at%nt,0))),q=Y(at/nt);rt.push(Q(it(q,0))),j=st(U,et,F==G),U=0,++F}++U,++B}return rt.join("")}$={version:"1.4.1",ucs2:{decode:tt,encode:et},decode:nt,encode:at,toASCII:function(k){return J(k,(function(k){return q.test(k)?"xn--"+at(k):k}))},toUnicode:function(k){return J(k,(function(k){return W.test(k)?nt(k.slice(4).toLowerCase()):k}))}},void 0===(F=function(){return $}.call(B,U,B,k))||(k.exports=F)}()},97283:k=>{self,k.exports=(()=>{var k={192:(k,B)=>{var U,F,G=function(){var k=function(k,B){var U=k,F=$[B],G=null,j=0,V=null,Z=[],J={},et=function(k,B){G=function(k){for(var B=new Array(k),U=0;U=7&&at(k),null==V&&(V=ht(U,F,Z)),ot(V,B)},it=function(k,B){for(var U=-1;U<=7;U+=1)if(!(k+U<=-1||j<=k+U))for(var F=-1;F<=7;F+=1)B+F<=-1||j<=B+F||(G[k+U][B+F]=0<=U&&U<=6&&(0==F||6==F)||0<=F&&F<=6&&(0==U||6==U)||2<=U&&U<=4&&2<=F&&F<=4)},st=function(){for(var k=8;k>F&1);G[Math.floor(F/3)][F%3+j-8-3]=$}for(F=0;F<18;F+=1)$=!k&&1==(B>>F&1),G[F%3+j-8-3][Math.floor(F/3)]=$},rt=function(k,B){for(var U=F<<3|B,$=H.getBCHTypeInfo(U),V=0;V<15;V+=1){var W=!k&&1==($>>V&1);V<6?G[V][8]=W:V<8?G[V+1][8]=W:G[j-15+V][8]=W}for(V=0;V<15;V+=1)W=!k&&1==($>>V&1),V<8?G[8][j-V-1]=W:V<9?G[8][15-V-1+1]=W:G[8][15-V-1]=W;G[j-8][8]=!k},ot=function(k,B){for(var U=-1,F=j-1,$=7,V=0,W=H.getMaskFunction(B),q=j-1;q>0;q-=2)for(6==q&&(q-=1);;){for(var K=0;K<2;K+=1)if(null==G[F][q-K]){var z=!1;V>>$&1)),W(F,q-K)&&(z=!z),G[F][q-K]=z,-1==($-=1)&&(V+=1,$=7)}if((F+=U)<0||j<=F){F-=U,U=-U;break}}},ht=function(k,B,U){for(var F=q.getRSBlocks(k,B),G=K(),j=0;j8*V)throw"code length overflow. ("+G.getLengthInBits()+">"+8*V+")";for(G.getLengthInBits()+4<=8*V&&G.put(0,4);G.getLengthInBits()%8!=0;)G.putBit(!1);for(;!(G.getLengthInBits()>=8*V||(G.put(236,8),G.getLengthInBits()>=8*V));)G.put(17,8);return function(k,B){for(var U=0,F=0,G=0,j=new Array(B.length),$=new Array(B.length),V=0;V=0?Q.getAt(X):0}}var Z=0;for(z=0;zF)&&(k=F,B=U)}return B}())},J.createTableTag=function(k,B){k=k||2;var U="";U+='',U+="";for(var F=0;F";for(var G=0;G';U+=""}return(U+="")+"
"},J.createSvgTag=function(k,B,U,F){var G={};"object"==typeof arguments[0]&&(k=(G=arguments[0]).cellSize,B=G.margin,U=G.alt,F=G.title),k=k||2,B=void 0===B?4*k:B,(U="string"==typeof U?{text:U}:U||{}).text=U.text||null,U.id=U.text?U.id||"qrcode-description":null,(F="string"==typeof F?{text:F}:F||{}).text=F.text||null,F.id=F.text?F.id||"qrcode-title":null;var j,$,H,V,W=J.getModuleCount()*k+2*B,q="";for(V="l"+k+",0 0,"+k+" -"+k+",0 0,-"+k+"z ",q+=''+ct(F.text)+"":"",q+=U.text?''+ct(U.text)+"":"",q+='',q+='"},J.createDataURL=function(k,B){k=k||2,B=void 0===B?4*k:B;var U=J.getModuleCount()*k+2*B,F=B,G=U-B;return tt(U,U,(function(B,U){if(F<=B&&B"};var ct=function(k){for(var B="",U=0;U":B+=">";break;case"&":B+="&";break;case'"':B+=""";break;default:B+=F}}return B};return J.createASCII=function(k,B){if((k=k||1)<2)return function(k){k=void 0===k?2:k;var B,U,F,G,j,$=1*J.getModuleCount()+2*k,H=k,V=$-k,W={"██":"█","█ ":"▀"," █":"▄"," ":" "},q={"██":"▀","█ ":"▀"," █":" "," ":" "},K="";for(B=0;B<$;B+=2){for(F=Math.floor((B-H)/1),G=Math.floor((B+1-H)/1),U=0;U<$;U+=1)j="█",H<=U&&U=V?q[j]:W[j];K+="\n"}return $%2&&k>0?K.substring(0,K.length-$-1)+Array($+1).join("▀"):K.substring(0,K.length-1)}(B);k-=1,B=void 0===B?2*k:B;var U,F,G,j,$=J.getModuleCount()*k+2*B,H=B,V=$-B,W=Array(k+1).join("██"),q=Array(k+1).join(" "),K="",z="";for(U=0;U<$;U+=1){for(G=Math.floor((U-H)/k),z="",F=0;F<$;F+=1)j=1,H<=F&&F>>8),B.push(255&$)):B.push(F)}}return B}};var B,U,F,G,j,$={L:1,M:0,Q:3,H:2},H=(B=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],U=1335,F=7973,j=function(k){for(var B=0;0!=k;)B+=1,k>>>=1;return B},(G={}).getBCHTypeInfo=function(k){for(var B=k<<10;j(B)-j(U)>=0;)B^=U<=0;)B^=F<5&&(U+=3+j-5)}for(F=0;F=256;)B-=255;return k[B]}}}();function W(k,B){if(void 0===k.length)throw k.length+"/"+B;var U=function(){for(var U=0;U>>7-B%8&1)},put:function(k,B){for(var F=0;F>>B-F-1&1))},getLengthInBits:function(){return B},putBit:function(U){var F=Math.floor(B/8);k.length<=F&&k.push(0),U&&(k[F]|=128>>>B%8),B+=1}};return U},z=function(k){var B=k,U={getMode:function(){return 1},getLength:function(k){return B.length},write:function(k){for(var U=B,G=0;G+2>>8&255)+(255&G),k.put(G,13),U+=2}if(U>>8)},writeBytes:function(k,U,F){U=U||0,F=F||k.length;for(var G=0;G0&&(B+=","),B+=k[U];return B+"]"}};return B},J=function(k){var B=k,U=0,F=0,G=0,j={read:function(){for(;G<8;){if(U>=B.length){if(0==G)return-1;throw"unexpected end of file./"+G}var k=B.charAt(U);if(U+=1,"="==k)return G=0,-1;k.match(/^\s$/)||(F=F<<6|$(k.charCodeAt(0)),G+=6)}var j=F>>>G-8&255;return G-=8,j}},$=function(k){if(65<=k&&k<=90)return k-65;if(97<=k&&k<=122)return k-97+26;if(48<=k&&k<=57)return k-48+52;if(43==k)return 62;if(47==k)return 63;throw"c:"+k};return j},tt=function(k,B,U){for(var F=function(k,B){var U=k,F=B,G=new Array(k*B),j={setPixel:function(k,B,F){G[B*U+k]=F},write:function(k){k.writeString("GIF87a"),k.writeShort(U),k.writeShort(F),k.writeByte(128),k.writeByte(0),k.writeByte(0),k.writeByte(0),k.writeByte(0),k.writeByte(0),k.writeByte(255),k.writeByte(255),k.writeByte(255),k.writeString(","),k.writeShort(0),k.writeShort(0),k.writeShort(U),k.writeShort(F),k.writeByte(0);var B=$(2);k.writeByte(2);for(var G=0;B.length-G>255;)k.writeByte(255),k.writeBytes(B,G,255),G+=255;k.writeByte(B.length-G),k.writeBytes(B,G,B.length-G),k.writeByte(0),k.writeString(";")}},$=function(k){for(var B=1<>>B!=0)throw"length over";for(;W+B>=8;)V.writeByte(255&(k<>>=8-W,q=0,W=0;q|=k<0&&V.writeByte(q)}});z.write(B,F);var Y=0,Q=String.fromCharCode(G[Y]);for(Y+=1;Y=6;)j(k>>>B-6),B-=6},G.flush=function(){if(B>0&&(j(k<<6-B),k=0,B=0),U%3!=0)for(var G=3-U%3,$=0;$>6,128|63&F):F<55296||F>=57344?B.push(224|F>>12,128|F>>6&63,128|63&F):(U++,F=65536+((1023&F)<<10|1023&k.charCodeAt(U)),B.push(240|F>>18,128|F>>12&63,128|F>>6&63,128|63&F))}return B}(k)},void 0===(F="function"==typeof(U=function(){return G})?U.apply(B,[]):U)||(k.exports=F)},796:(k,B,U)=>{"use strict";U.d(B,{default:()=>Pt});var F=function(){return(F=Object.assign||function(k){for(var B,U=1,F=arguments.length;UF||G&&G<$.y)&&(G&&G<$.y?($.y=G,$.y%2==0&&$.x--):$.y-=2,H.y=$.y*j,$.x=1+2*Math.ceil(($.y/V-1)/2),H.x=Math.round(H.y/V)),{height:H.y,width:H.x,hideYDots:$.y,hideXDots:$.x}}const W={L:.07,M:.15,Q:.25,H:.3},q="dots",K="rounded",z="classy",Y="classy-rounded",Q="square",X="extra-rounded";var Z=function(){return(Z=Object.assign||function(k){for(var B,U=1,F=arguments.length;U2||$&&H||V&&W)this._basicSquare({x:B,y:U,size:F,context:G,rotation:0});else{if(2===q){var K=0;return $&&V?K=Math.PI/2:V&&H?K=Math.PI:H&&W&&(K=-Math.PI/2),void this._basicCornerRounded({x:B,y:U,size:F,context:G,rotation:K})}if(1===q)return K=0,V?K=Math.PI/2:H?K=Math.PI:W&&(K=-Math.PI/2),void this._basicSideRounded({x:B,y:U,size:F,context:G,rotation:K})}else this._basicDot({x:B,y:U,size:F,context:G,rotation:0})},k.prototype._drawExtraRounded=function(k){var B=k.x,U=k.y,F=k.size,G=k.context,j=k.getNeighbor,$=j?+j(-1,0):0,H=j?+j(1,0):0,V=j?+j(0,-1):0,W=j?+j(0,1):0,q=$+H+V+W;if(0!==q)if(q>2||$&&H||V&&W)this._basicSquare({x:B,y:U,size:F,context:G,rotation:0});else{if(2===q){var K=0;return $&&V?K=Math.PI/2:V&&H?K=Math.PI:H&&W&&(K=-Math.PI/2),void this._basicCornerExtraRounded({x:B,y:U,size:F,context:G,rotation:K})}if(1===q)return K=0,V?K=Math.PI/2:H?K=Math.PI:W&&(K=-Math.PI/2),void this._basicSideRounded({x:B,y:U,size:F,context:G,rotation:K})}else this._basicDot({x:B,y:U,size:F,context:G,rotation:0})},k.prototype._drawClassy=function(k){var B=k.x,U=k.y,F=k.size,G=k.context,j=k.getNeighbor,$=j?+j(-1,0):0,H=j?+j(1,0):0,V=j?+j(0,-1):0,W=j?+j(0,1):0;0!==$+H+V+W?$||V?H||W?this._basicSquare({x:B,y:U,size:F,context:G,rotation:0}):this._basicCornerRounded({x:B,y:U,size:F,context:G,rotation:Math.PI/2}):this._basicCornerRounded({x:B,y:U,size:F,context:G,rotation:-Math.PI/2}):this._basicCornersRounded({x:B,y:U,size:F,context:G,rotation:Math.PI/2})},k.prototype._drawClassyRounded=function(k){var B=k.x,U=k.y,F=k.size,G=k.context,j=k.getNeighbor,$=j?+j(-1,0):0,H=j?+j(1,0):0,V=j?+j(0,-1):0,W=j?+j(0,1):0;0!==$+H+V+W?$||V?H||W?this._basicSquare({x:B,y:U,size:F,context:G,rotation:0}):this._basicCornerExtraRounded({x:B,y:U,size:F,context:G,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:B,y:U,size:F,context:G,rotation:-Math.PI/2}):this._basicCornersRounded({x:B,y:U,size:F,context:G,rotation:Math.PI/2})},k}(),tt="square",et="extra-rounded";var it=function(){return(it=Object.assign||function(k){for(var B,U=1,F=arguments.length;U0&&G[G.length-1])||6!==j[0]&&2!==j[0])){$=0;continue}if(3===j[0]&&(!G||j[1]>G[0]&&j[1]=(B-G.hideXDots)/2&&k<(B+G.hideXDots)/2&&U>=(B-G.hideYDots)/2&&U<(B+G.hideYDots)/2||(null===(F=ht[k])||void 0===F?void 0:F[U])||(null===(j=ht[k-B+7])||void 0===j?void 0:j[U])||(null===($=ht[k])||void 0===$?void 0:$[U-B+7])||(null===(H=ct[k])||void 0===H?void 0:H[U])||(null===(V=ct[k-B+7])||void 0===V?void 0:V[U])||(null===(W=ct[k])||void 0===W?void 0:W[U-B+7]))})),this.drawCorners(),this._options.image&&this.drawImage({width:G.width,height:G.height,count:B,dotSize:F}),[2]}}))},new((F=void 0)||(F=Promise))((function(k,j){function $(k){try{V(G.next(k))}catch(k){j(k)}}function H(k){try{V(G.throw(k))}catch(k){j(k)}}function V(B){var U;B.done?k(B.value):(U=B.value,U instanceof F?U:new F((function(k){k(U)}))).then($,H)}V((G=G.apply(B,U||[])).next())}));var B,U,F,G},k.prototype.drawBackground=function(){var k=this.context,B=this._options;if(k){if(B.backgroundOptions.gradient){var U=B.backgroundOptions.gradient,F=this._createGradient({context:k,options:U,additionalRotation:0,x:0,y:0,size:this._canvas.width>this._canvas.height?this._canvas.width:this._canvas.height});U.colorStops.forEach((function(k){var B=k.offset,U=k.color;F.addColorStop(B,U)})),k.fillStyle=F}else B.backgroundOptions.color&&(k.fillStyle=B.backgroundOptions.color);k.fillRect(0,0,this._canvas.width,this._canvas.height)}},k.prototype.drawDots=function(k){var B=this;if(!this._qr)throw"QR code is not defined";var U=this.context;if(!U)throw"QR code is not defined";var F=this._options,G=this._qr.getModuleCount();if(G>F.width||G>F.height)throw"The canvas is too small.";var j=Math.min(F.width,F.height)-2*F.margin,$=Math.floor(j/G),H=Math.floor((F.width-G*$)/2),V=Math.floor((F.height-G*$)/2),W=new J({context:U,type:F.dotsOptions.type});U.beginPath();for(var q=function(U){for(var F=function(F){return k&&!k(U,F)?"continue":K._qr.isDark(U,F)?void W.draw(H+U*$,V+F*$,$,(function(j,$){return!(U+j<0||F+$<0||U+j>=G||F+$>=G)&&!(k&&!k(U+j,F+$))&&!!B._qr&&B._qr.isDark(U+j,F+$)})):"continue"},j=0;j=0&&W<=.25*Math.PI||W>1.75*Math.PI&&W<=2*Math.PI?(q-=H/2,K-=H/2*Math.tan(V),z+=H/2,Y+=H/2*Math.tan(V)):W>.25*Math.PI&&W<=.75*Math.PI?(K-=H/2,q-=H/2/Math.tan(V),Y+=H/2,z+=H/2/Math.tan(V)):W>.75*Math.PI&&W<=1.25*Math.PI?(q+=H/2,K+=H/2*Math.tan(V),z-=H/2,Y-=H/2*Math.tan(V)):W>1.25*Math.PI&&W<=1.75*Math.PI&&(K+=H/2,q+=H/2/Math.tan(V),Y-=H/2,z-=H/2/Math.tan(V)),B=U.createLinearGradient(Math.round(q),Math.round(K),Math.round(z),Math.round(Y))}return B},k}();var lt=function(){return(lt=Object.assign||function(k){for(var B,U=1,F=arguments.length;U2||j&&$||H&&V)this._basicSquare({x:B,y:U,size:F,rotation:0});else{if(2===W){var q=0;return j&&H?q=Math.PI/2:H&&$?q=Math.PI:$&&V&&(q=-Math.PI/2),void this._basicCornerRounded({x:B,y:U,size:F,rotation:q})}if(1===W)return q=0,H?q=Math.PI/2:$?q=Math.PI:V&&(q=-Math.PI/2),void this._basicSideRounded({x:B,y:U,size:F,rotation:q})}else this._basicDot({x:B,y:U,size:F,rotation:0})},k.prototype._drawExtraRounded=function(k){var B=k.x,U=k.y,F=k.size,G=k.getNeighbor,j=G?+G(-1,0):0,$=G?+G(1,0):0,H=G?+G(0,-1):0,V=G?+G(0,1):0,W=j+$+H+V;if(0!==W)if(W>2||j&&$||H&&V)this._basicSquare({x:B,y:U,size:F,rotation:0});else{if(2===W){var q=0;return j&&H?q=Math.PI/2:H&&$?q=Math.PI:$&&V&&(q=-Math.PI/2),void this._basicCornerExtraRounded({x:B,y:U,size:F,rotation:q})}if(1===W)return q=0,H?q=Math.PI/2:$?q=Math.PI:V&&(q=-Math.PI/2),void this._basicSideRounded({x:B,y:U,size:F,rotation:q})}else this._basicDot({x:B,y:U,size:F,rotation:0})},k.prototype._drawClassy=function(k){var B=k.x,U=k.y,F=k.size,G=k.getNeighbor,j=G?+G(-1,0):0,$=G?+G(1,0):0,H=G?+G(0,-1):0,V=G?+G(0,1):0;0!==j+$+H+V?j||H?$||V?this._basicSquare({x:B,y:U,size:F,rotation:0}):this._basicCornerRounded({x:B,y:U,size:F,rotation:Math.PI/2}):this._basicCornerRounded({x:B,y:U,size:F,rotation:-Math.PI/2}):this._basicCornersRounded({x:B,y:U,size:F,rotation:Math.PI/2})},k.prototype._drawClassyRounded=function(k){var B=k.x,U=k.y,F=k.size,G=k.getNeighbor,j=G?+G(-1,0):0,$=G?+G(1,0):0,H=G?+G(0,-1):0,V=G?+G(0,1):0;0!==j+$+H+V?j||H?$||V?this._basicSquare({x:B,y:U,size:F,rotation:0}):this._basicCornerExtraRounded({x:B,y:U,size:F,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:B,y:U,size:F,rotation:-Math.PI/2}):this._basicCornersRounded({x:B,y:U,size:F,rotation:Math.PI/2})},k}();var ft=function(){return(ft=Object.assign||function(k){for(var B,U=1,F=arguments.length;U0&&G[G.length-1])||6!==j[0]&&2!==j[0])){$=0;continue}if(3===j[0]&&(!G||j[1]>G[0]&&j[1]=(B-G.hideXDots)/2&&k<(B+G.hideXDots)/2&&U>=(B-G.hideYDots)/2&&U<(B+G.hideYDots)/2||(null===(F=gt[k])||void 0===F?void 0:F[U])||(null===(j=gt[k-B+7])||void 0===j?void 0:j[U])||(null===($=gt[k])||void 0===$?void 0:$[U-B+7])||(null===(H=mt[k])||void 0===H?void 0:H[U])||(null===(V=mt[k-B+7])||void 0===V?void 0:V[U])||(null===(W=mt[k])||void 0===W?void 0:W[U-B+7]))})),this.drawCorners(),this._options.image&&this.drawImage({width:G.width,height:G.height,count:B,dotSize:F}),[2]}}))},new((F=void 0)||(F=Promise))((function(k,j){function $(k){try{V(G.next(k))}catch(k){j(k)}}function H(k){try{V(G.throw(k))}catch(k){j(k)}}function V(B){var U;B.done?k(B.value):(U=B.value,U instanceof F?U:new F((function(k){k(U)}))).then($,H)}V((G=G.apply(B,U||[])).next())}));var B,U,F,G},k.prototype.drawBackground=function(){var k,B,U=this._element,F=this._options;if(U){var G=null===(k=F.backgroundOptions)||void 0===k?void 0:k.gradient,j=null===(B=F.backgroundOptions)||void 0===B?void 0:B.color;(G||j)&&this._createColor({options:G,color:j,additionalRotation:0,x:0,y:0,height:F.height,width:F.width,name:"background-color"})}},k.prototype.drawDots=function(k){var B,U,F=this;if(!this._qr)throw"QR code is not defined";var G=this._options,j=this._qr.getModuleCount();if(j>G.width||j>G.height)throw"The canvas is too small.";var $=Math.min(G.width,G.height)-2*G.margin,H=Math.floor($/j),V=Math.floor((G.width-j*H)/2),W=Math.floor((G.height-j*H)/2),q=new ut({svg:this._element,type:G.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color"),this._defs.appendChild(this._dotsClipPath),this._createColor({options:null===(B=G.dotsOptions)||void 0===B?void 0:B.gradient,color:G.dotsOptions.color,additionalRotation:0,x:V,y:W,height:j*H,width:j*H,name:"dot-color"});for(var K=function(B){for(var G=function(G){return k&&!k(B,G)?"continue":(null===(U=z._qr)||void 0===U?void 0:U.isDark(B,G))?(q.draw(V+B*H,W+G*H,H,(function(U,$){return!(B+U<0||G+$<0||B+U>=j||G+$>=j)&&!(k&&!k(B+U,G+$))&&!!F._qr&&F._qr.isDark(B+U,G+$)})),void(q._element&&z._dotsClipPath&&z._dotsClipPath.appendChild(q._element))):"continue"},$=0;$$?H:$,q=document.createElementNS("http://www.w3.org/2000/svg","rect");if(q.setAttribute("x",String(G)),q.setAttribute("y",String(j)),q.setAttribute("height",String($)),q.setAttribute("width",String(H)),q.setAttribute("clip-path","url('#clip-path-"+V+"')"),B){var K;if(B.type===ot)(K=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",V),K.setAttribute("gradientUnits","userSpaceOnUse"),K.setAttribute("fx",String(G+H/2)),K.setAttribute("fy",String(j+$/2)),K.setAttribute("cx",String(G+H/2)),K.setAttribute("cy",String(j+$/2)),K.setAttribute("r",String(W/2));else{var z=((B.rotation||0)+F)%(2*Math.PI),Y=(z+2*Math.PI)%(2*Math.PI),Q=G+H/2,X=j+$/2,Z=G+H/2,J=j+$/2;Y>=0&&Y<=.25*Math.PI||Y>1.75*Math.PI&&Y<=2*Math.PI?(Q-=H/2,X-=$/2*Math.tan(z),Z+=H/2,J+=$/2*Math.tan(z)):Y>.25*Math.PI&&Y<=.75*Math.PI?(X-=$/2,Q-=H/2/Math.tan(z),J+=$/2,Z+=H/2/Math.tan(z)):Y>.75*Math.PI&&Y<=1.25*Math.PI?(Q+=H/2,X+=$/2*Math.tan(z),Z-=H/2,J-=$/2*Math.tan(z)):Y>1.25*Math.PI&&Y<=1.75*Math.PI&&(X+=$/2,Q+=H/2/Math.tan(z),J-=$/2,Z-=H/2/Math.tan(z)),(K=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",V),K.setAttribute("gradientUnits","userSpaceOnUse"),K.setAttribute("x1",String(Math.round(Q))),K.setAttribute("y1",String(Math.round(X))),K.setAttribute("x2",String(Math.round(Z))),K.setAttribute("y2",String(Math.round(J)))}B.colorStops.forEach((function(k){var B=k.offset,U=k.color,F=document.createElementNS("http://www.w3.org/2000/svg","stop");F.setAttribute("offset",100*B+"%"),F.setAttribute("stop-color",U),K.appendChild(F)})),q.setAttribute("fill","url('#"+V+"')"),this._defs.appendChild(K)}else U&&q.setAttribute("fill",U);this._element.appendChild(q)},k}(),_t="canvas";for(var Et={},wt=0;wt<=40;wt++)Et[wt]=wt;const Tt={type:_t,width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:Et[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{color:"#fff"}};var St=function(){return(St=Object.assign||function(k){for(var B,U=1,F=arguments.length;UMath.min(B.width,B.height)&&(B.margin=Math.min(B.width,B.height)),B.dotsOptions=St({},B.dotsOptions),B.dotsOptions.gradient&&(B.dotsOptions.gradient=At(B.dotsOptions.gradient)),B.cornersSquareOptions&&(B.cornersSquareOptions=St({},B.cornersSquareOptions),B.cornersSquareOptions.gradient&&(B.cornersSquareOptions.gradient=At(B.cornersSquareOptions.gradient))),B.cornersDotOptions&&(B.cornersDotOptions=St({},B.cornersDotOptions),B.cornersDotOptions.gradient&&(B.cornersDotOptions.gradient=At(B.cornersDotOptions.gradient))),B.backgroundOptions&&(B.backgroundOptions=St({},B.backgroundOptions),B.backgroundOptions.gradient&&(B.backgroundOptions.gradient=At(B.backgroundOptions.gradient))),B}var Ot=U(192),It=U.n(Ot),Dt=function(k,B,U,F){return new(U||(U=Promise))((function(G,j){function $(k){try{V(F.next(k))}catch(k){j(k)}}function H(k){try{V(F.throw(k))}catch(k){j(k)}}function V(k){var B;k.done?G(k.value):(B=k.value,B instanceof U?B:new U((function(k){k(B)}))).then($,H)}V((F=F.apply(k,B||[])).next())}))},Rt=function(k,B){var U,F,G,j,$={label:0,sent:function(){if(1&G[0])throw G[1];return G[1]},trys:[],ops:[]};return j={next:H(0),throw:H(1),return:H(2)},"function"==typeof Symbol&&(j[Symbol.iterator]=function(){return this}),j;function H(j){return function(H){return function(j){if(U)throw new TypeError("Generator is already executing.");for(;$;)try{if(U=1,F&&(G=2&j[0]?F.return:j[0]?F.throw||((G=F.return)&&G.call(F),0):F.next)&&!(G=G.call(F,j[1])).done)return G;switch(F=0,G&&(j=[2&j[0],G.value]),j[0]){case 0:case 1:G=j;break;case 4:return $.label++,{value:j[1],done:!1};case 5:$.label++,F=j[1],j=[0];continue;case 7:j=$.ops.pop(),$.trys.pop();continue;default:if(!((G=(G=$.trys).length>0&&G[G.length-1])||6!==j[0]&&2!==j[0])){$=0;continue}if(3===j[0]&&(!G||j[1]>G[0]&&j[1]\r\n'+F],{type:"image/svg+xml"})]):[2,new Promise((function(U){return B.getCanvas().toBlob(U,"image/"+k,1)}))]}}))}))},k.prototype.download=function(k){return Dt(this,void 0,void 0,(function(){var B,U,F,G,j;return Rt(this,(function($){switch($.label){case 0:if(!this._qr)throw"QR code is empty";return B="png",U="qr","string"==typeof k?(B=k,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof k&&null!==k&&(k.name&&(U=k.name),k.extension&&(B=k.extension)),[4,this._getQRStylingElement(B)];case 1:return F=$.sent(),"svg"===B.toLowerCase()?(G=new XMLSerializer,j='\r\n'+(j=G.serializeToString(F.getElement())),H("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(j),U+".svg")):H(F.getCanvas().toDataURL("image/"+B),U+"."+B),[2]}}))}))},k}()}},B={};function U(F){if(B[F])return B[F].exports;var G=B[F]={exports:{}};return k[F](G,G.exports,U),G.exports}return U.n=k=>{var B=k&&k.__esModule?()=>k.default:()=>k;return U.d(B,{a:B}),B},U.d=(k,B)=>{for(var F in B)U.o(B,F)&&!U.o(k,F)&&Object.defineProperty(k,F,{enumerable:!0,get:B[F]})},U.o=(k,B)=>Object.prototype.hasOwnProperty.call(k,B),U(796)})().default},74765:k=>{"use strict";var B=String.prototype.replace,U=/%20/g,F="RFC1738",G="RFC3986";k.exports={default:G,formatters:{RFC1738:function(k){return B.call(k,U,"+")},RFC3986:function(k){return String(k)}},RFC1738:F,RFC3986:G}},55373:(k,B,U)=>{"use strict";var F=U(98636),G=U(62642),j=U(74765);k.exports={formats:j,parse:G,stringify:F}},62642:(k,B,U)=>{"use strict";var F=U(37720),G=Object.prototype.hasOwnProperty,j=Array.isArray,$={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:F.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},H=function(k){return k.replace(/&#(\d+);/g,(function(k,B){return String.fromCharCode(parseInt(B,10))}))},V=function(k,B){return k&&"string"==typeof k&&B.comma&&k.indexOf(",")>-1?k.split(","):k},W=function(k,B,U,F){if(k){var j=U.allowDots?k.replace(/\.([^.[]+)/g,"[$1]"):k,$=/(\[[^[\]]*])/g,H=U.depth>0&&/(\[[^[\]]*])/.exec(j),W=H?j.slice(0,H.index):j,q=[];if(W){if(!U.plainObjects&&G.call(Object.prototype,W)&&!U.allowPrototypes)return;q.push(W)}for(var K=0;U.depth>0&&null!==(H=$.exec(j))&&K=0;--j){var $,H=k[j];if("[]"===H&&U.parseArrays)$=U.allowEmptyArrays&&(""===G||U.strictNullHandling&&null===G)?[]:[].concat(G);else{$=U.plainObjects?Object.create(null):{};var W="["===H.charAt(0)&&"]"===H.charAt(H.length-1)?H.slice(1,-1):H,q=U.decodeDotInKeys?W.replace(/%2E/g,"."):W,K=parseInt(q,10);U.parseArrays||""!==q?!isNaN(K)&&H!==q&&String(K)===q&&K>=0&&U.parseArrays&&K<=U.arrayLimit?($=[])[K]=G:"__proto__"!==q&&($[q]=G):$={0:G}}G=$}return G}(q,B,U,F)}};k.exports=function(k,B){var U=function(k){if(!k)return $;if(void 0!==k.allowEmptyArrays&&"boolean"!=typeof k.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==k.decodeDotInKeys&&"boolean"!=typeof k.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==k.decoder&&void 0!==k.decoder&&"function"!=typeof k.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==k.charset&&"utf-8"!==k.charset&&"iso-8859-1"!==k.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var B=void 0===k.charset?$.charset:k.charset,U=void 0===k.duplicates?$.duplicates:k.duplicates;if("combine"!==U&&"first"!==U&&"last"!==U)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===k.allowDots?!0===k.decodeDotInKeys||$.allowDots:!!k.allowDots,allowEmptyArrays:"boolean"==typeof k.allowEmptyArrays?!!k.allowEmptyArrays:$.allowEmptyArrays,allowPrototypes:"boolean"==typeof k.allowPrototypes?k.allowPrototypes:$.allowPrototypes,allowSparse:"boolean"==typeof k.allowSparse?k.allowSparse:$.allowSparse,arrayLimit:"number"==typeof k.arrayLimit?k.arrayLimit:$.arrayLimit,charset:B,charsetSentinel:"boolean"==typeof k.charsetSentinel?k.charsetSentinel:$.charsetSentinel,comma:"boolean"==typeof k.comma?k.comma:$.comma,decodeDotInKeys:"boolean"==typeof k.decodeDotInKeys?k.decodeDotInKeys:$.decodeDotInKeys,decoder:"function"==typeof k.decoder?k.decoder:$.decoder,delimiter:"string"==typeof k.delimiter||F.isRegExp(k.delimiter)?k.delimiter:$.delimiter,depth:"number"==typeof k.depth||!1===k.depth?+k.depth:$.depth,duplicates:U,ignoreQueryPrefix:!0===k.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof k.interpretNumericEntities?k.interpretNumericEntities:$.interpretNumericEntities,parameterLimit:"number"==typeof k.parameterLimit?k.parameterLimit:$.parameterLimit,parseArrays:!1!==k.parseArrays,plainObjects:"boolean"==typeof k.plainObjects?k.plainObjects:$.plainObjects,strictDepth:"boolean"==typeof k.strictDepth?!!k.strictDepth:$.strictDepth,strictNullHandling:"boolean"==typeof k.strictNullHandling?k.strictNullHandling:$.strictNullHandling}}(B);if(""===k||null==k)return U.plainObjects?Object.create(null):{};for(var q="string"==typeof k?function(k,B){var U={__proto__:null},W=B.ignoreQueryPrefix?k.replace(/^\?/,""):k;W=W.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var q,K=B.parameterLimit===1/0?void 0:B.parameterLimit,z=W.split(B.delimiter,K),Y=-1,Q=B.charset;if(B.charsetSentinel)for(q=0;q-1&&(Z=j(Z)?[Z]:Z);var it=G.call(U,X);it&&"combine"===B.duplicates?U[X]=F.combine(U[X],Z):it&&"last"!==B.duplicates||(U[X]=Z)}return U}(k,U):k,K=U.plainObjects?Object.create(null):{},z=Object.keys(q),Y=0;Y{"use strict";var F=U(920),G=U(37720),j=U(74765),$=Object.prototype.hasOwnProperty,H={brackets:function(k){return k+"[]"},comma:"comma",indices:function(k,B){return k+"["+B+"]"},repeat:function(k){return k}},V=Array.isArray,W=Array.prototype.push,q=function(k,B){W.apply(k,V(B)?B:[B])},K=Date.prototype.toISOString,z=j.default,Y={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:G.encode,encodeValuesOnly:!1,format:z,formatter:j.formatters[z],indices:!1,serializeDate:function(k){return K.call(k)},skipNulls:!1,strictNullHandling:!1},Q={},X=function k(B,U,j,$,H,W,K,z,X,Z,J,tt,et,it,st,nt,at,rt){for(var ot,ht=B,ct=rt,dt=0,lt=!1;void 0!==(ct=ct.get(Q))&&!lt;){var ut=ct.get(B);if(dt+=1,void 0!==ut){if(ut===dt)throw new RangeError("Cyclic object value");lt=!0}void 0===ct.get(Q)&&(dt=0)}if("function"==typeof Z?ht=Z(U,ht):ht instanceof Date?ht=et(ht):"comma"===j&&V(ht)&&(ht=G.maybeMap(ht,(function(k){return k instanceof Date?et(k):k}))),null===ht){if(W)return X&&!nt?X(U,Y.encoder,at,"key",it):U;ht=""}if("string"==typeof(ot=ht)||"number"==typeof ot||"boolean"==typeof ot||"symbol"==typeof ot||"bigint"==typeof ot||G.isBuffer(ht))return X?[st(nt?U:X(U,Y.encoder,at,"key",it))+"="+st(X(ht,Y.encoder,at,"value",it))]:[st(U)+"="+st(String(ht))];var ft,bt=[];if(void 0===ht)return bt;if("comma"===j&&V(ht))nt&&X&&(ht=G.maybeMap(ht,X)),ft=[{value:ht.length>0?ht.join(",")||null:void 0}];else if(V(Z))ft=Z;else{var pt=Object.keys(ht);ft=J?pt.sort(J):pt}var vt=z?U.replace(/\./g,"%2E"):U,gt=$&&V(ht)&&1===ht.length?vt+"[]":vt;if(H&&V(ht)&&0===ht.length)return gt+"[]";for(var mt=0;mt0?it+et:""}},37720:(k,B,U)=>{"use strict";var F=U(74765),G=Object.prototype.hasOwnProperty,j=Array.isArray,$=function(){for(var k=[],B=0;B<256;++B)k.push("%"+((B<16?"0":"")+B.toString(16)).toUpperCase());return k}(),H=function(k,B){for(var U=B&&B.plainObjects?Object.create(null):{},F=0;F1;){var B=k.pop(),U=B.obj[B.prop];if(j(U)){for(var F=[],G=0;G=V?H.slice(q,q+V):H,z=[],Y=0;Y=48&&Q<=57||Q>=65&&Q<=90||Q>=97&&Q<=122||j===F.RFC1738&&(40===Q||41===Q)?z[z.length]=K.charAt(Y):Q<128?z[z.length]=$[Q]:Q<2048?z[z.length]=$[192|Q>>6]+$[128|63&Q]:Q<55296||Q>=57344?z[z.length]=$[224|Q>>12]+$[128|Q>>6&63]+$[128|63&Q]:(Y+=1,Q=65536+((1023&Q)<<10|1023&K.charCodeAt(Y)),z[z.length]=$[240|Q>>18]+$[128|Q>>12&63]+$[128|Q>>6&63]+$[128|63&Q])}W+=z.join("")}return W},isBuffer:function(k){return!(!k||"object"!=typeof k)&&!!(k.constructor&&k.constructor.isBuffer&&k.constructor.isBuffer(k))},isRegExp:function(k){return"[object RegExp]"===Object.prototype.toString.call(k)},maybeMap:function(k,B){if(j(k)){for(var U=[],F=0;F{"use strict";var F=U(24280),G=U(45228),j=U(30454);function $(k,B){return B.encode?B.strict?F(k):encodeURIComponent(k):k}function H(k){return Array.isArray(k)?k.sort():"object"==typeof k?H(Object.keys(k)).sort((function(k,B){return Number(k)-Number(B)})).map((function(B){return k[B]})):k}B.qg=function(k,B){var U=function(k){var B;switch(k.arrayFormat){case"index":return function(k,U,F){B=/\[(\d*)\]$/.exec(k),k=k.replace(/\[\d*\]$/,""),B?(void 0===F[k]&&(F[k]={}),F[k][B[1]]=U):F[k]=U};case"bracket":return function(k,U,F){B=/(\[\])$/.exec(k),k=k.replace(/\[\]$/,""),B?void 0!==F[k]?F[k]=[].concat(F[k],U):F[k]=[U]:F[k]=U};default:return function(k,B,U){void 0!==U[k]?U[k]=[].concat(U[k],B):U[k]=B}}}(B=G({arrayFormat:"none"},B)),F=Object.create(null);return"string"!=typeof k?F:(k=k.trim().replace(/^(\?|#|&)/,""))?(k.split("&").forEach((function(k){var B=k.replace(/\+/g," ").split("="),G=B.shift(),$=B.length>0?B.join("="):void 0;$=void 0===$?null:j($),U(j(G),$,F)})),Object.keys(F).sort().reduce((function(k,B){var U=F[B];return Boolean(U)&&"object"==typeof U&&!Array.isArray(U)?k[B]=H(U):k[B]=U,k}),Object.create(null))):F}},99721:(k,B,U)=>{"use strict";var F=U(36556),G=U(14035),j=F("RegExp.prototype.exec"),$=U(69675);k.exports=function(k){if(!G(k))throw new $("`regex` must be a RegExp");return function(B){return null!==j(k,B)}}},87566:k=>{k.exports=function(k){var B=[],U=[];return function k(F,G){var j,$,H;if(!("object"!=typeof F||null===F||F instanceof Boolean||F instanceof Date||F instanceof Number||F instanceof RegExp||F instanceof String)){for(j=0;j{const F=U(87566),G=function(){return!this}();function j(k,B){this.name="AuthTokenExpiredError",this.message=k,this.expiry=B,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function $(k){this.name="AuthTokenInvalidError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function H(k,B){this.name="AuthTokenNotBeforeError",this.message=k,this.date=B,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function V(k){this.name="AuthTokenError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function W(k){this.name="AuthError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function q(k,B){this.name="SilentMiddlewareBlockedError",this.message=k,this.type=B,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function K(k){this.name="InvalidActionError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function z(k){this.name="InvalidArgumentsError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function Y(k){this.name="InvalidOptionsError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function Q(k){this.name="InvalidMessageError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function X(k,B){this.name="SocketProtocolError",this.message=k,this.code=B,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function Z(k){this.name="ServerProtocolError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function J(k){this.name="HTTPServerError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function tt(k){this.name="ResourceLimitError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function et(k){this.name="TimeoutError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function it(k,B,U,F){this.name="BadConnectionError",this.message=k,this.type=B,this.code=U||1001,this.reason=F||ot[this.code]||"",Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function st(k){this.name="BrokerError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function nt(k,B){this.name="ProcessExitError",this.message=k,this.code=B,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function at(k){this.name="UnknownError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}j.prototype=Object.create(Error.prototype),$.prototype=Object.create(Error.prototype),H.prototype=Object.create(Error.prototype),V.prototype=Object.create(Error.prototype),W.prototype=Object.create(Error.prototype),q.prototype=Object.create(Error.prototype),K.prototype=Object.create(Error.prototype),z.prototype=Object.create(Error.prototype),Y.prototype=Object.create(Error.prototype),Q.prototype=Object.create(Error.prototype),X.prototype=Object.create(Error.prototype),Z.prototype=Object.create(Error.prototype),J.prototype=Object.create(Error.prototype),tt.prototype=Object.create(Error.prototype),et.prototype=Object.create(Error.prototype),it.prototype=Object.create(Error.prototype),st.prototype=Object.create(Error.prototype),nt.prototype=Object.create(Error.prototype),at.prototype=Object.create(Error.prototype),k.exports={AuthTokenExpiredError:j,AuthTokenInvalidError:$,AuthTokenNotBeforeError:H,AuthTokenError:V,AuthError:W,SilentMiddlewareBlockedError:q,InvalidActionError:K,InvalidArgumentsError:z,InvalidOptionsError:Y,InvalidMessageError:Q,SocketProtocolError:X,ServerProtocolError:Z,HTTPServerError:J,ResourceLimitError:tt,TimeoutError:et,BadConnectionError:it,BrokerError:st,ProcessExitError:nt,UnknownError:at};const rt={1001:"Socket was disconnected",1002:"A WebSocket protocol error was encountered",1003:"Server terminated socket because it received invalid data",1005:"Socket closed without status code",1006:"Socket hung up",1007:"Message format was incorrect",1008:"Encountered a policy violation",1009:"Message was too big to process",1010:"Client ended the connection because the server did not comply with extension requirements",1011:"Server encountered an unexpected fatal condition",4e3:"Server ping timed out",4001:"Client pong timed out",4002:"Server failed to sign auth token",4003:"Failed to complete handshake",4004:"Client failed to save auth token",4005:"Did not receive #handshake from client before timeout",4006:"Failed to bind socket to message broker",4007:"Client connection establishment timed out",4008:"Server rejected handshake from client",4009:"Server received a message before the client handshake"},ot={1e3:"Socket closed normally",1001:rt[1001]};k.exports.socketProtocolErrorStatuses=rt,k.exports.socketProtocolIgnoreStatuses=ot,k.exports.dehydrateError=function(k){let B;if(k&&"object"==typeof k){B={message:k.message};for(let U of Object.keys(k))B[U]=k[U]}else B="function"==typeof k?"[function "+("string"==typeof k.name?k.name:"anonymous")+"]":k;return F(B)},k.exports.hydrateError=function(k){let B=null;if(null!=k)if("object"==typeof k){B=new Error("string"==typeof k.message?k.message:"Invalid error message format"),"string"==typeof k.name&&(B.name=k.name);for(let U of Object.keys(k))void 0===B[U]&&(B[U]=k[U])}else B=k;return B},k.exports.decycle=F},87916:k=>{const B="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",U=/^[ \n\r\t]*[{\[]/;let F=function(k){let U=new Uint8Array(k),F=U.length,G="";for(let j=0;j>2],G+=B[(3&U[j])<<4|U[j+1]>>4],G+=B[(15&U[j+1])<<2|U[j+2]>>6],G+=B[63&U[j+2]];return F%3==2?G=G.substring(0,G.length-1)+"=":F%3==1&&(G=G.substring(0,G.length-2)+"=="),G},G=function(k,B){if("undefined"!=typeof ArrayBuffer&&B instanceof ArrayBuffer)return{base64:!0,data:F(B)};if("undefined"!=typeof Buffer){if(B instanceof Buffer)return{base64:!0,data:B.toString("base64")};if(B&&"Buffer"===B.type&&Array.isArray(B.data)){let k;return k=Buffer.from?Buffer.from(B.data):new Buffer(B.data),{base64:!0,data:k.toString("base64")}}}return B};k.exports.decode=function(k){if(null==k)return null;if("#1"===k||"#2"===k)return k;let B=k.toString();if(!U.test(B))return B;try{return JSON.parse(B)}catch(F){}return B},k.exports.encode=function(k){return"#1"===k||"#2"===k?k:JSON.stringify(k,G)}},43924:(k,B,U)=>{"use strict";var F=256,G=[],j=void 0===U.g?window:U.g,$=Math.pow(F,6),H=Math.pow(2,52),V=2*H,W=255,q=Math.random;function K(k){var B,U=k.length,G=this,j=0,$=G.i=G.j=0,H=G.S=[];for(U||(k=[U++]);j=V;)k/=2,B/=2,U>>>=1;return(k+U)/B}},k.exports.resetGlobal=function(){Math.random=q},Y(Math.random(),G)},96897:(k,B,U)=>{"use strict";var F=U(70453),G=U(30041),j=U(30592)(),$=U(75795),H=U(69675),V=F("%Math.floor%");k.exports=function(k,B){if("function"!=typeof k)throw new H("`fn` is not a function");if("number"!=typeof B||B<0||B>4294967295||V(B)!==B)throw new H("`length` must be a positive 32-bit integer");var U=arguments.length>2&&!!arguments[2],F=!0,W=!0;if("length"in k&&$){var q=$(k,"length");q&&!q.configurable&&(F=!1),q&&!q.writable&&(W=!1)}return(F||W||!U)&&(j?G(k,"length",B,!0,!0):G(k,"length",B)),k}},84427:(k,B,U)=>{"use strict";const F=Symbol.prototype.valueOf,G=U(2149);k.exports=function(k,B){switch(G(k)){case"array":return k.slice();case"object":return Object.assign({},k);case"date":return new k.constructor(Number(k));case"map":return new Map(k);case"set":return new Set(k);case"buffer":return function(k){const B=k.length,U=Buffer.allocUnsafe?Buffer.allocUnsafe(B):Buffer.from(B);return k.copy(U),U}(k);case"symbol":return function(k){return F?Object(F.call(k)):{}}(k);case"arraybuffer":return function(k){const B=new k.constructor(k.byteLength);return new Uint8Array(B).set(new Uint8Array(k)),B}(k);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return function(k,B){return new k.constructor(k.buffer,k.byteOffset,k.length)}(k);case"regexp":return function(k){const B=void 0!==k.flags?k.flags:/\w+$/.exec(k)||void 0,U=new k.constructor(k.source,B);return U.lastIndex=k.lastIndex,U}(k);case"error":return Object.create(k);default:return k}}},2149:k=>{var B=Object.prototype.toString;function U(k){return"function"==typeof k.constructor?k.constructor.name:null}k.exports=function(k){if(void 0===k)return"undefined";if(null===k)return"null";var F=typeof k;if("boolean"===F)return"boolean";if("string"===F)return"string";if("number"===F)return"number";if("symbol"===F)return"symbol";if("function"===F)return"GeneratorFunction"===U(k)?"generatorfunction":"function";if(function(k){return Array.isArray?Array.isArray(k):k instanceof Array}(k))return"array";if(function(k){if(k.constructor&&"function"==typeof k.constructor.isBuffer)return k.constructor.isBuffer(k);return!1}(k))return"buffer";if(function(k){try{if("number"==typeof k.length&&"function"==typeof k.callee)return!0}catch(B){if(-1!==B.message.indexOf("callee"))return!0}return!1}(k))return"arguments";if(function(k){return k instanceof Date||"function"==typeof k.toDateString&&"function"==typeof k.getDate&&"function"==typeof k.setDate}(k))return"date";if(function(k){return k instanceof Error||"string"==typeof k.message&&k.constructor&&"number"==typeof k.constructor.stackTraceLimit}(k))return"error";if(function(k){return k instanceof RegExp||"string"==typeof k.flags&&"boolean"==typeof k.ignoreCase&&"boolean"==typeof k.multiline&&"boolean"==typeof k.global}(k))return"regexp";switch(U(k)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(k){return"function"==typeof k.throw&&"function"==typeof k.return&&"function"==typeof k.next}(k))return"generator";switch(F=B.call(k)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return F.slice(8,-1).toLowerCase().replace(/\s/g,"")}},14803:(k,B,U)=>{"use strict";var F=U(58859),G=U(69675),j=function(k,B,U){for(var F,G=k;null!=(F=G.next);G=F)if(F.key===B)return G.next=F.next,U||(F.next=k.next,k.next=F),F};k.exports=function(){var k,B={assert:function(k){if(!B.has(k))throw new G("Side channel does not contain "+F(k))},delete:function(B){var U=k&&k.next,F=function(k,B){if(k)return j(k,B,!0)}(k,B);return F&&U&&U===F&&(k=void 0),!!F},get:function(B){return function(k,B){if(k){var U=j(k,B);return U&&U.value}}(k,B)},has:function(B){return function(k,B){return!!k&&!!j(k,B)}(k,B)},set:function(B,U){k||(k={next:void 0}),function(k,B,U){var F=j(k,B);F?F.value=U:k.next={key:B,next:k.next,value:U}}(k,B,U)}};return B}},80507:(k,B,U)=>{"use strict";var F=U(70453),G=U(36556),j=U(58859),$=U(69675),H=F("%Map%",!0),V=G("Map.prototype.get",!0),W=G("Map.prototype.set",!0),q=G("Map.prototype.has",!0),K=G("Map.prototype.delete",!0),z=G("Map.prototype.size",!0);k.exports=!!H&&function(){var k,B={assert:function(k){if(!B.has(k))throw new $("Side channel does not contain "+j(k))},delete:function(B){if(k){var U=K(k,B);return 0===z(k)&&(k=void 0),U}return!1},get:function(B){if(k)return V(k,B)},has:function(B){return!!k&&q(k,B)},set:function(B,U){k||(k=new H),W(k,B,U)}};return B}},72271:(k,B,U)=>{"use strict";var F=U(70453),G=U(36556),j=U(58859),$=U(80507),H=U(69675),V=F("%WeakMap%",!0),W=G("WeakMap.prototype.get",!0),q=G("WeakMap.prototype.set",!0),K=G("WeakMap.prototype.has",!0),z=G("WeakMap.prototype.delete",!0);k.exports=V?function(){var k,B,U={assert:function(k){if(!U.has(k))throw new H("Side channel does not contain "+j(k))},delete:function(U){if(V&&U&&("object"==typeof U||"function"==typeof U)){if(k)return z(k,U)}else if($&&B)return B.delete(U);return!1},get:function(U){return V&&U&&("object"==typeof U||"function"==typeof U)&&k?W(k,U):B&&B.get(U)},has:function(U){return V&&U&&("object"==typeof U||"function"==typeof U)&&k?K(k,U):!!B&&B.has(U)},set:function(U,F){V&&U&&("object"==typeof U||"function"==typeof U)?(k||(k=new V),q(k,U,F)):$&&(B||(B=$()),B.set(U,F))}};return U}:$},920:(k,B,U)=>{"use strict";var F=U(69675),G=U(58859),j=U(14803),$=U(80507),H=U(72271)||$||j;k.exports=function(){var k,B={assert:function(k){if(!B.has(k))throw new F("Side channel does not contain "+G(k))},delete:function(B){return!!k&&k.delete(B)},get:function(B){return k&&k.get(B)},has:function(B){return!!k&&k.has(B)},set:function(B,U){k||(k=H()),k.set(B,U)}};return B}},39454:(k,B,U)=>{const F=U(8334),G=U(33820),j="19.1.2";k.exports.factory=G,k.exports.AGClientSocket=F,k.exports.create=function(k){return G.create({...k,version:j})},k.exports.version=j},4142:k=>{function B(){this._internalStorage={},this.isLocalStorageEnabled=this._checkLocalStorageEnabled()}B.prototype._checkLocalStorageEnabled=function(){let k;try{localStorage.setItem("__scLocalStorageTest",1),localStorage.removeItem("__scLocalStorageTest")}catch(e){k=e}return!k},B.prototype.saveToken=function(k,B,U){return this.isLocalStorageEnabled?localStorage.setItem(k,B):this._internalStorage[k]=B,Promise.resolve(B)},B.prototype.removeToken=function(k){let B=this.loadToken(k);return this.isLocalStorageEnabled?localStorage.removeItem(k):delete this._internalStorage[k],B},B.prototype.loadToken=function(k){let B;return B=this.isLocalStorageEnabled?localStorage.getItem(k):this._internalStorage[k]||null,Promise.resolve(B)},k.exports=B},8334:(k,B,U)=>{const F=U(47579),G=U(72641),j=U(89187),$=U(4142),H=U(87916),V=U(89839),W=U(51883),q=U(79155),K=U(48287).hp,z=U(17549),Y=U(97605),Q=Y.InvalidArgumentsError,X=Y.InvalidMessageError,Z=Y.SocketProtocolError,J=Y.TimeoutError,tt=Y.BadConnectionError;function et(k){G.call(this);let B=Object.assign({path:"/socketcluster/",secure:!1,protocolScheme:null,socketPath:null,autoConnect:!0,autoReconnect:!0,autoSubscribeOnConnect:!0,connectTimeout:2e4,ackTimeout:1e4,timestampRequests:!1,timestampParam:"t",binaryType:"arraybuffer",batchOnHandshake:!1,batchOnHandshakeDuration:100,batchInterval:50,protocolVersion:2,wsOptions:{},cloneData:!1},k);null==B.authTokenName&&(B.authTokenName=this._generateAuthTokenNameFromURI(B)),this.id=null,this.version=B.version||null,this.protocolVersion=B.protocolVersion,this.state=this.CLOSED,this.authState=this.UNAUTHENTICATED,this.signedAuthToken=null,this.authToken=null,this.pendingReconnect=!1,this.pendingReconnectTimeout=null,this.preparingPendingSubscriptions=!1,this.clientId=B.clientId,this.wsOptions=B.wsOptions,this.connectTimeout=B.connectTimeout,this.ackTimeout=B.ackTimeout,this.channelPrefix=B.channelPrefix||null,this.authTokenName=B.authTokenName,B.pingTimeout=B.connectTimeout,this.pingTimeout=B.pingTimeout,this.pingTimeoutDisabled=!!B.pingTimeoutDisabled;let U=Math.pow(2,31)-1,j=k=>{if(this[k]>U)throw new Q(`The ${k} value provided exceeded the maximum amount allowed`)};if(j("connectTimeout"),j("ackTimeout"),j("pingTimeout"),this.connectAttempts=0,this.isBatching=!1,this.batchOnHandshake=B.batchOnHandshake,this.batchOnHandshakeDuration=B.batchOnHandshakeDuration,this._batchingIntervalId=null,this._outboundBuffer=new W,this._channelMap={},this._channelEventDemux=new F,this._channelDataDemux=new F,this._receiverDemux=new F,this._procedureDemux=new F,this.options=B,this._cid=1,this.options.callIdGenerator=()=>this._cid++,this.options.autoReconnect){null==this.options.autoReconnectOptions&&(this.options.autoReconnectOptions={});let k=this.options.autoReconnectOptions;null==k.initialDelay&&(k.initialDelay=1e4),null==k.randomness&&(k.randomness=1e4),null==k.multiplier&&(k.multiplier=1.5),null==k.maxDelay&&(k.maxDelay=6e4)}if(null==this.options.subscriptionRetryOptions&&(this.options.subscriptionRetryOptions={}),this.options.authEngine?this.auth=this.options.authEngine:this.auth=new $,this.options.codecEngine?this.codec=this.options.codecEngine:this.codec=H,this.options.protocol){let k=new Q("The protocol option does not affect socketcluster-client - If you want to utilize SSL/TLS, use the secure option instead");this._onError(k)}if(this.options.query=B.query||{},"string"==typeof this.options.query){let k=new URLSearchParams(this.options.query),B={};for(let[U,F]of k.entries()){let k=B[U];null==k?B[U]=F:(Array.isArray(k)||(B[U]=[k]),B[U].push(F))}this.options.query=B}this.options.autoConnect&&this.connect()}et.prototype=Object.create(G.prototype),et.CONNECTING=et.prototype.CONNECTING=V.prototype.CONNECTING,et.OPEN=et.prototype.OPEN=V.prototype.OPEN,et.CLOSED=et.prototype.CLOSED=V.prototype.CLOSED,et.AUTHENTICATED=et.prototype.AUTHENTICATED="authenticated",et.UNAUTHENTICATED=et.prototype.UNAUTHENTICATED="unauthenticated",et.SUBSCRIBED=et.prototype.SUBSCRIBED=j.SUBSCRIBED,et.PENDING=et.prototype.PENDING=j.PENDING,et.UNSUBSCRIBED=et.prototype.UNSUBSCRIBED=j.UNSUBSCRIBED,et.ignoreStatuses=Y.socketProtocolIgnoreStatuses,et.errorStatuses=Y.socketProtocolErrorStatuses,Object.defineProperty(et.prototype,"isBufferingBatch",{get:function(){return this.transport.isBufferingBatch}}),et.prototype.uri=function(){return V.computeURI(this.options)},et.prototype.getBackpressure=function(){return Math.max(this.getAllListenersBackpressure(),this.getAllReceiversBackpressure(),this.getAllProceduresBackpressure(),this.getAllChannelsBackpressure())},et.prototype._generateAuthTokenNameFromURI=function(k){return`socketcluster.authToken${k.host?`.${k.host}`:`.${k.hostname||"localhost"}${k.port?`:${k.port}`:""}`}`},et.prototype._setAuthToken=function(k){this._changeToAuthenticatedState(k.token),(async()=>{try{await this.auth.saveToken(this.authTokenName,k.token,{})}catch(B){this._onError(B)}})()},et.prototype._removeAuthToken=function(k){(async()=>{let k;try{k=await this.auth.removeToken(this.authTokenName)}catch(B){return void this._onError(B)}this.emit("removeAuthToken",{oldAuthToken:k})})(),this._changeToUnauthenticatedStateAndClearTokens()},et.prototype._privateDataHandlerMap={"#publish":function(k){if("string"!=typeof k.channel)return;let B=this._undecorateChannelName(k.channel);this.isSubscribed(B,!0)&&this._channelDataDemux.write(B,k.data)},"#kickOut":function(k){if("string"!=typeof k.channel)return;let B=this._undecorateChannelName(k.channel),U=this._channelMap[B];U&&(this.emit("kickOut",{channel:B,message:k.message}),this._channelEventDemux.write(`${B}/kickOut`,{message:k.message}),this._triggerChannelUnsubscribe(U))},"#setAuthToken":function(k){k&&this._setAuthToken(k)},"#removeAuthToken":function(k){this._removeAuthToken(k)}},et.prototype._privateRPCHandlerMap={"#setAuthToken":function(k,B){if(k)this._setAuthToken(k),B.end();else{let k=new X("No token data provided by #setAuthToken event");delete k.stack,B.error(k)}},"#removeAuthToken":function(k,B){this._removeAuthToken(k),B.end()}},et.prototype.getState=function(){return this.state},et.prototype.getBytesReceived=function(){return this.transport.getBytesReceived()},et.prototype.deauthenticate=async function(){(async()=>{let k;try{k=await this.auth.removeToken(this.authTokenName)}catch(B){return void this._onError(B)}this.emit("removeAuthToken",{oldAuthToken:k})})(),this.state!==this.CLOSED&&this.transmit("#removeAuthToken"),this._changeToUnauthenticatedStateAndClearTokens(),await z(0)},et.prototype.connect=function(k){if(k&&(this.state!==this.CLOSED&&this.disconnect(1e3,"Socket was disconnected by the client to initiate a new connection"),this.options={...this.options,...k},null==this.options.authTokenName&&(this.options.authTokenName=this._generateAuthTokenNameFromURI(this.options))),this.state===this.CLOSED){this.pendingReconnect=!1,this.pendingReconnectTimeout=null,clearTimeout(this._reconnectTimeoutRef),this.state=this.CONNECTING,this.emit("connecting",{}),this.transport&&this.transport.clearAllListeners();let k={onOpen:k=>{this.state=this.OPEN,this._onOpen(k)},onOpenAbort:k=>{this.state!==this.CLOSED&&(this.state=this.CLOSED,this._destroy(k.code,k.reason,!0))},onClose:k=>{this.state!==this.CLOSED&&(this.state=this.CLOSED,this._destroy(k.code,k.reason))},onEvent:k=>{this.emit(k.event,k.data)},onError:k=>{this._onError(k.error)},onInboundInvoke:k=>{this._onInboundInvoke(k)},onInboundTransmit:k=>{this._onInboundTransmit(k.event,k.data)}};this.transport=new V(this.auth,this.codec,this.options,this.wsOptions,k)}},et.prototype.reconnect=function(k,B){this.disconnect(k,B),this.connect()},et.prototype.disconnect=function(k,B){if("number"!=typeof(k=k||1e3))throw new Q("If specified, the code argument must be a number");let U=this.state===this.CONNECTING;U||this.state===this.OPEN?(this.state=this.CLOSED,this._destroy(k,B,U),this.transport.close(k,B)):(this.pendingReconnect=!1,this.pendingReconnectTimeout=null,clearTimeout(this._reconnectTimeoutRef))},et.prototype._changeToUnauthenticatedStateAndClearTokens=function(){if(this.authState!==this.UNAUTHENTICATED){let k=this.authState,B=this.authToken,U=this.signedAuthToken;this.authState=this.UNAUTHENTICATED,this.signedAuthToken=null,this.authToken=null;let F={oldAuthState:k,newAuthState:this.authState};this.emit("authStateChange",F),this.emit("deauthenticate",{oldSignedAuthToken:U,oldAuthToken:B})}},et.prototype._changeToAuthenticatedState=function(k){if(this.signedAuthToken=k,this.authToken=this._extractAuthTokenData(k),this.authState!==this.AUTHENTICATED){let B=this.authState;this.authState=this.AUTHENTICATED;let U={oldAuthState:B,newAuthState:this.authState,signedAuthToken:k,authToken:this.authToken};this.preparingPendingSubscriptions||this.processPendingSubscriptions(),this.emit("authStateChange",U)}this.emit("authenticate",{signedAuthToken:k,authToken:this.authToken})},et.prototype.decodeBase64=function(k){return K.from(k,"base64").toString("utf8")},et.prototype.encodeBase64=function(k){return K.from(k,"utf8").toString("base64")},et.prototype._extractAuthTokenData=function(k){if("string"!=typeof k)return null;let B=k.split(".")[1];if(null!=B){let k=B;try{return k=this.decodeBase64(k),JSON.parse(k)}catch(e){return k}}return null},et.prototype.getAuthToken=function(){return this.authToken},et.prototype.getSignedAuthToken=function(){return this.signedAuthToken},et.prototype.authenticate=async function(k){let B;try{B=await this.invoke("#authenticate",k)}catch(U){throw"BadConnectionError"!==U.name&&"TimeoutError"!==U.name&&this._changeToUnauthenticatedStateAndClearTokens(),await z(0),U}return B&&null!=B.isAuthenticated?B.authError&&(B.authError=Y.hydrateError(B.authError)):B={isAuthenticated:this.authState,authError:null},B.isAuthenticated?this._changeToAuthenticatedState(k):this._changeToUnauthenticatedStateAndClearTokens(),(async()=>{try{await this.auth.saveToken(this.authTokenName,k,{})}catch(U){this._onError(U)}})(),await z(0),B},et.prototype._tryReconnect=function(k){let B,U=this.connectAttempts++,F=this.options.autoReconnectOptions;if(null==k||U>0){let k=Math.round(F.initialDelay+(F.randomness||0)*Math.random());B=Math.round(k*Math.pow(F.multiplier,U))}else B=k;B>F.maxDelay&&(B=F.maxDelay),clearTimeout(this._reconnectTimeoutRef),this.pendingReconnect=!0,this.pendingReconnectTimeout=B,this._reconnectTimeoutRef=setTimeout((()=>{this.connect()}),B)},et.prototype._onOpen=function(k){this.isBatching?this._startBatching():this.batchOnHandshake&&(this._startBatching(),setTimeout((()=>{this.isBatching||this._stopBatching()}),this.batchOnHandshakeDuration)),this.preparingPendingSubscriptions=!0,k?(this.id=k.id,this.pingTimeout=k.pingTimeout,k.isAuthenticated?this._changeToAuthenticatedState(k.authToken):this._changeToUnauthenticatedStateAndClearTokens()):this._changeToUnauthenticatedStateAndClearTokens(),this.connectAttempts=0,this.options.autoSubscribeOnConnect&&this.processPendingSubscriptions(),this.emit("connect",{...k,processPendingSubscriptions:()=>{this.processPendingSubscriptions()}}),this.state===this.OPEN&&this._flushOutboundBuffer()},et.prototype._onError=function(k){this.emit("error",{error:k})},et.prototype._suspendSubscriptions=function(){Object.keys(this._channelMap).forEach((k=>{let B=this._channelMap[k];this._triggerChannelUnsubscribe(B,!0)}))},et.prototype._abortAllPendingEventsDueToBadConnection=function(k,B,U){let F,G=this._outboundBuffer.head;for(;G;){F=G.next;let j=G.data;clearTimeout(j.timeout),delete j.timeout,G.detach(),G=F;let $=j.callback;if($){delete j.callback;let F=`Event ${j.event} was aborted due to a bad connection`,G=new tt(F,k,B,U);$.call(j,G,j)}j.cid&&this.transport.cancelPendingResponse(j.cid)}},et.prototype._destroy=function(k,B,U){if(this.id=null,this._cancelBatching(),this.transport&&this.transport.clearAllListeners(),this.pendingReconnect=!1,this.pendingReconnectTimeout=null,clearTimeout(this._reconnectTimeoutRef),this._suspendSubscriptions(),U?this.emit("connectAbort",{code:k,reason:B}):this.emit("disconnect",{code:k,reason:B}),this.emit("close",{code:k,reason:B}),!et.ignoreStatuses[k]){let U;U="string"==typeof B?"Socket connection closed with status code "+k+" and reason: "+B:"Socket connection closed with status code "+k;let F=new Z(et.errorStatuses[k]||U,k);this._onError(F)}this._abortAllPendingEventsDueToBadConnection(U?"connectAbort":"disconnect",k,B),this.options.autoReconnect&&(4e3===k||4001===k||1005===k?this._tryReconnect(0):1e3!==k&&k<4500&&this._tryReconnect())},et.prototype._onInboundTransmit=function(k,B){let U=this._privateDataHandlerMap[k];U?U.call(this,B||{}):this._receiverDemux.write(k,B)},et.prototype._onInboundInvoke=function(k){let{procedure:B,data:U}=k,F=this._privateRPCHandlerMap[B];F?F.call(this,U,k):this._procedureDemux.write(B,k)},et.prototype.decode=function(k){return this.transport.decode(k)},et.prototype.encode=function(k){return this.transport.encode(k)},et.prototype._flushOutboundBuffer=function(){let k,B=this._outboundBuffer.head;for(;B;){k=B.next;let U=B.data;B.detach(),this.transport.transmitObject(U),B=k}},et.prototype._handleEventAckTimeout=function(k,B){B&&B.detach(),delete k.timeout;let U=k.callback;if(U){delete k.callback;let B=new J(`Event response for ${k.event} event timed out`);U.call(k,B,k)}k.cid&&this.transport.cancelPendingResponse(k.cid)},et.prototype._processOutboundEvent=function(k,B,U,F){U=U||{},this.state===this.CLOSED&&this.connect();let G,j={event:k};G=F?new Promise(((k,B)=>{j.callback=(U,F)=>{U?B(U):k(F)}})):Promise.resolve();let $=new W.Item;this.options.cloneData?j.data=q(B):j.data=B,$.data=j;let H=null==U.ackTimeout?this.ackTimeout:U.ackTimeout;return j.timeout=setTimeout((()=>{this._handleEventAckTimeout(j,$)}),H),this._outboundBuffer.append($),this.state===this.OPEN&&this._flushOutboundBuffer(),G},et.prototype.send=function(k){this.transport.send(k)},et.prototype.transmit=function(k,B,U){return this._processOutboundEvent(k,B,U)},et.prototype.invoke=function(k,B,U){return this._processOutboundEvent(k,B,U,!0)},et.prototype.transmitPublish=function(k,B){let U={channel:this._decorateChannelName(k),data:B};return this.transmit("#publish",U)},et.prototype.invokePublish=function(k,B){let U={channel:this._decorateChannelName(k),data:B};return this.invoke("#publish",U)},et.prototype._triggerChannelSubscribe=function(k,B){let U=k.name;if(k.state!==j.SUBSCRIBED){let F=k.state;k.state=j.SUBSCRIBED;let G={oldChannelState:F,newChannelState:k.state,subscriptionOptions:B};this._channelEventDemux.write(`${U}/subscribeStateChange`,G),this._channelEventDemux.write(`${U}/subscribe`,{subscriptionOptions:B}),this.emit("subscribeStateChange",{channel:U,...G}),this.emit("subscribe",{channel:U,subscriptionOptions:B})}},et.prototype._triggerChannelSubscribeFail=function(k,B,U){let F=B.name,G=!B.options.waitForAuth||this.authState===this.AUTHENTICATED;!!this._channelMap[F]&&G&&(delete this._channelMap[F],this._channelEventDemux.write(`${F}/subscribeFail`,{error:k,subscriptionOptions:U}),this.emit("subscribeFail",{error:k,channel:F,subscriptionOptions:U}))},et.prototype._cancelPendingSubscribeCallback=function(k){null!=k._pendingSubscriptionCid&&(this.transport.cancelPendingResponse(k._pendingSubscriptionCid),delete k._pendingSubscriptionCid)},et.prototype._decorateChannelName=function(k){return this.channelPrefix&&(k=this.channelPrefix+k),k},et.prototype._undecorateChannelName=function(k){return this.channelPrefix&&0===k.indexOf(this.channelPrefix)?k.replace(this.channelPrefix,""):k},et.prototype.startBatch=function(){this.transport.startBatch()},et.prototype.flushBatch=function(){this.transport.flushBatch()},et.prototype.cancelBatch=function(){this.transport.cancelBatch()},et.prototype._startBatching=function(){null==this._batchingIntervalId&&(this.startBatch(),this._batchingIntervalId=setInterval((()=>{this.flushBatch(),this.startBatch()}),this.options.batchInterval))},et.prototype.startBatching=function(){this.isBatching=!0,this._startBatching()},et.prototype._stopBatching=function(){null!=this._batchingIntervalId&&clearInterval(this._batchingIntervalId),this._batchingIntervalId=null,this.flushBatch()},et.prototype.stopBatching=function(){this.isBatching=!1,this._stopBatching()},et.prototype._cancelBatching=function(){null!=this._batchingIntervalId&&clearInterval(this._batchingIntervalId),this._batchingIntervalId=null,this.cancelBatch()},et.prototype.cancelBatching=function(){this.isBatching=!1,this._cancelBatching()},et.prototype._trySubscribe=function(k){let B=!k.options.waitForAuth||this.authState===this.AUTHENTICATED;if(this.state===this.OPEN&&!this.preparingPendingSubscriptions&&null==k._pendingSubscriptionCid&&B){let B={noTimeout:!0},U={};k.options.waitForAuth&&(B.waitForAuth=!0,U.waitForAuth=B.waitForAuth),k.options.data&&(U.data=k.options.data),k._pendingSubscriptionCid=this.transport.invokeRaw("#subscribe",{channel:this._decorateChannelName(k.name),...U},B,(B=>{if(B){if("BadConnectionError"===B.name)return;delete k._pendingSubscriptionCid,this._triggerChannelSubscribeFail(B,k,U)}else delete k._pendingSubscriptionCid,this._triggerChannelSubscribe(k,U)})),this.emit("subscribeRequest",{channel:k.name,subscriptionOptions:U})}},et.prototype.subscribe=function(k,B){B=B||{};let U=this._channelMap[k],F={waitForAuth:!!B.waitForAuth};return null!=B.priority&&(F.priority=B.priority),void 0!==B.data&&(F.data=B.data),U?B&&(U.options=F):(U={name:k,state:j.PENDING,options:F},this._channelMap[k]=U,this._trySubscribe(U)),new j(k,this,this._channelEventDemux,this._channelDataDemux)},et.prototype._triggerChannelUnsubscribe=function(k,B){let U=k.name;if(this._cancelPendingSubscribeCallback(k),k.state===j.SUBSCRIBED){let F={oldChannelState:k.state,newChannelState:B?j.PENDING:j.UNSUBSCRIBED};this._channelEventDemux.write(`${U}/subscribeStateChange`,F),this._channelEventDemux.write(`${U}/unsubscribe`,{}),this.emit("subscribeStateChange",{channel:U,...F}),this.emit("unsubscribe",{channel:U})}B?k.state=j.PENDING:delete this._channelMap[U]},et.prototype._tryUnsubscribe=function(k){if(this.state===this.OPEN){let B={noTimeout:!0};this._cancelPendingSubscribeCallback(k);let U=this._decorateChannelName(k.name);this.transport.transmit("#unsubscribe",U,B)}},et.prototype.unsubscribe=function(k){let B=this._channelMap[k];B&&(this._triggerChannelUnsubscribe(B),this._tryUnsubscribe(B))},et.prototype.receiver=function(k){return this._receiverDemux.stream(k)},et.prototype.closeReceiver=function(k){this._receiverDemux.close(k)},et.prototype.closeAllReceivers=function(){this._receiverDemux.closeAll()},et.prototype.killReceiver=function(k){this._receiverDemux.kill(k)},et.prototype.killAllReceivers=function(){this._receiverDemux.killAll()},et.prototype.killReceiverConsumer=function(k){this._receiverDemux.killConsumer(k)},et.prototype.getReceiverConsumerStats=function(k){return this._receiverDemux.getConsumerStats(k)},et.prototype.getReceiverConsumerStatsList=function(k){return this._receiverDemux.getConsumerStatsList(k)},et.prototype.getAllReceiversConsumerStatsList=function(){return this._receiverDemux.getConsumerStatsListAll()},et.prototype.getReceiverBackpressure=function(k){return this._receiverDemux.getBackpressure(k)},et.prototype.getAllReceiversBackpressure=function(){return this._receiverDemux.getBackpressureAll()},et.prototype.getReceiverConsumerBackpressure=function(k){return this._receiverDemux.getConsumerBackpressure(k)},et.prototype.hasReceiverConsumer=function(k,B){return this._receiverDemux.hasConsumer(k,B)},et.prototype.hasAnyReceiverConsumer=function(k){return this._receiverDemux.hasConsumerAll(k)},et.prototype.procedure=function(k){return this._procedureDemux.stream(k)},et.prototype.closeProcedure=function(k){this._procedureDemux.close(k)},et.prototype.closeAllProcedures=function(){this._procedureDemux.closeAll()},et.prototype.killProcedure=function(k){this._procedureDemux.kill(k)},et.prototype.killAllProcedures=function(){this._procedureDemux.killAll()},et.prototype.killProcedureConsumer=function(k){this._procedureDemux.killConsumer(k)},et.prototype.getProcedureConsumerStats=function(k){return this._procedureDemux.getConsumerStats(k)},et.prototype.getProcedureConsumerStatsList=function(k){return this._procedureDemux.getConsumerStatsList(k)},et.prototype.getAllProceduresConsumerStatsList=function(){return this._procedureDemux.getConsumerStatsListAll()},et.prototype.getProcedureBackpressure=function(k){return this._procedureDemux.getBackpressure(k)},et.prototype.getAllProceduresBackpressure=function(){return this._procedureDemux.getBackpressureAll()},et.prototype.getProcedureConsumerBackpressure=function(k){return this._procedureDemux.getConsumerBackpressure(k)},et.prototype.hasProcedureConsumer=function(k,B){return this._procedureDemux.hasConsumer(k,B)},et.prototype.hasAnyProcedureConsumer=function(k){return this._procedureDemux.hasConsumerAll(k)},et.prototype.channel=function(k){this._channelMap[k];return new j(k,this,this._channelEventDemux,this._channelDataDemux)},et.prototype.closeChannel=function(k){this.channelCloseOutput(k),this.channelCloseAllListeners(k)},et.prototype.closeAllChannelOutputs=function(){this._channelDataDemux.closeAll()},et.prototype.closeAllChannelListeners=function(){this._channelEventDemux.closeAll()},et.prototype.closeAllChannels=function(){this.closeAllChannelOutputs(),this.closeAllChannelListeners()},et.prototype.killChannel=function(k){this.channelKillOutput(k),this.channelKillAllListeners(k)},et.prototype.killAllChannelOutputs=function(){this._channelDataDemux.killAll()},et.prototype.killAllChannelListeners=function(){this._channelEventDemux.killAll()},et.prototype.killAllChannels=function(){this.killAllChannelOutputs(),this.killAllChannelListeners()},et.prototype.killChannelOutputConsumer=function(k){this._channelDataDemux.killConsumer(k)},et.prototype.killChannelListenerConsumer=function(k){this._channelEventDemux.killConsumer(k)},et.prototype.getChannelOutputConsumerStats=function(k){return this._channelDataDemux.getConsumerStats(k)},et.prototype.getChannelListenerConsumerStats=function(k){return this._channelEventDemux.getConsumerStats(k)},et.prototype.getAllChannelOutputsConsumerStatsList=function(){return this._channelDataDemux.getConsumerStatsListAll()},et.prototype.getAllChannelListenersConsumerStatsList=function(){return this._channelEventDemux.getConsumerStatsListAll()},et.prototype.getChannelBackpressure=function(k){return Math.max(this.channelGetOutputBackpressure(k),this.channelGetAllListenersBackpressure(k))},et.prototype.getAllChannelOutputsBackpressure=function(){return this._channelDataDemux.getBackpressureAll()},et.prototype.getAllChannelListenersBackpressure=function(){return this._channelEventDemux.getBackpressureAll()},et.prototype.getAllChannelsBackpressure=function(){return Math.max(this.getAllChannelOutputsBackpressure(),this.getAllChannelListenersBackpressure())},et.prototype.getChannelListenerConsumerBackpressure=function(k){return this._channelEventDemux.getConsumerBackpressure(k)},et.prototype.getChannelOutputConsumerBackpressure=function(k){return this._channelDataDemux.getConsumerBackpressure(k)},et.prototype.hasAnyChannelOutputConsumer=function(k){return this._channelDataDemux.hasConsumerAll(k)},et.prototype.hasAnyChannelListenerConsumer=function(k){return this._channelEventDemux.hasConsumerAll(k)},et.prototype.getChannelState=function(k){let B=this._channelMap[k];return B?B.state:j.UNSUBSCRIBED},et.prototype.getChannelOptions=function(k){let B=this._channelMap[k];return B?{...B.options}:{}},et.prototype._getAllChannelStreamNames=function(k){let B=this._channelEventDemux.getConsumerStatsListAll().filter((B=>0===B.stream.indexOf(`${k}/`))).reduce(((k,B)=>(k[B.stream]=!0,k)),{});return Object.keys(B)},et.prototype.channelCloseOutput=function(k){this._channelDataDemux.close(k)},et.prototype.channelCloseListener=function(k,B){this._channelEventDemux.close(`${k}/${B}`)},et.prototype.channelCloseAllListeners=function(k){this._getAllChannelStreamNames(k).forEach((k=>{this._channelEventDemux.close(k)}))},et.prototype.channelKillOutput=function(k){this._channelDataDemux.kill(k)},et.prototype.channelKillListener=function(k,B){this._channelEventDemux.kill(`${k}/${B}`)},et.prototype.channelKillAllListeners=function(k){this._getAllChannelStreamNames(k).forEach((k=>{this._channelEventDemux.kill(k)}))},et.prototype.channelGetOutputConsumerStatsList=function(k){return this._channelDataDemux.getConsumerStatsList(k)},et.prototype.channelGetListenerConsumerStatsList=function(k,B){return this._channelEventDemux.getConsumerStatsList(`${k}/${B}`)},et.prototype.channelGetAllListenersConsumerStatsList=function(k){return this._getAllChannelStreamNames(k).map((k=>this._channelEventDemux.getConsumerStatsList(k))).reduce(((k,B)=>(B.forEach((B=>{k.push(B)})),k)),[])},et.prototype.channelGetOutputBackpressure=function(k){return this._channelDataDemux.getBackpressure(k)},et.prototype.channelGetListenerBackpressure=function(k,B){return this._channelEventDemux.getBackpressure(`${k}/${B}`)},et.prototype.channelGetAllListenersBackpressure=function(k){let B=this._getAllChannelStreamNames(k).map((k=>this._channelEventDemux.getBackpressure(k)));return Math.max(...B.concat(0))},et.prototype.channelHasOutputConsumer=function(k,B){return this._channelDataDemux.hasConsumer(k,B)},et.prototype.channelHasListenerConsumer=function(k,B,U){return this._channelEventDemux.hasConsumer(`${k}/${B}`,U)},et.prototype.channelHasAnyListenerConsumer=function(k,B){return this._getAllChannelStreamNames(k).some((k=>this._channelEventDemux.hasConsumer(k,B)))},et.prototype.subscriptions=function(k){let B=[];return Object.keys(this._channelMap).forEach((U=>{(k||this._channelMap[U].state===j.SUBSCRIBED)&&B.push(U)})),B},et.prototype.isSubscribed=function(k,B){let U=this._channelMap[k];return B?!!U:!!U&&U.state===j.SUBSCRIBED},et.prototype.processPendingSubscriptions=function(){this.preparingPendingSubscriptions=!1;let k=[];Object.keys(this._channelMap).forEach((B=>{let U=this._channelMap[B];U.state===j.PENDING&&k.push(U)})),k.sort(((k,B)=>{let U=k.options.priority||0,F=B.options.priority||0;return U>F?-1:U{this._trySubscribe(k)}))},k.exports=et},33820:(k,B,U)=>{const F=U(8334),G=U(69824),j=U(97605).InvalidArgumentsError;function $(k,B){let U=null==k.secure?B:k.secure;return k.port||("undefined"!=typeof location&&location.port?location.port:U?443:80)}k.exports={create:function(k){if((k=k||{}).host&&!k.host.match(/[^:]+:\d{2,5}/))throw new j("The host option should include both the hostname and the port number in the hostname:port format");if(k.host&&k.hostname)throw new j("The host option should already include the hostname and the port number in the hostname:port format - Because of this, you should never use host and hostname options together");if(k.host&&k.port)throw new j("The host option should already include the hostname and the port number in the hostname:port format - Because of this, you should never use host and port options together");let B="undefined"!=typeof location&&"https:"===location.protocol,U={clientId:G.v4(),port:$(k,B),hostname:"undefined"!=typeof location&&location.hostname||"localhost",secure:B};return Object.assign(U,k),new F(U)}}},89839:(k,B,U)=>{const F=U(27445);let G;if("undefined"!=typeof WebSocket)G=function(k,B){return new WebSocket(k)};else{let k=U(18495);G=function(B,U){return new k(B,[],U)}}const j=U(97605),$=j.TimeoutError,H=j.BadConnectionError;function V(k,B,U,F,j){this.state=this.CLOSED,this.auth=k,this.codec=B,this.options=U,this.wsOptions=F,this.protocolVersion=U.protocolVersion,this.connectTimeout=U.connectTimeout,this.pingTimeout=U.pingTimeout,this.pingTimeoutDisabled=!!U.pingTimeoutDisabled,this.callIdGenerator=U.callIdGenerator,this.authTokenName=U.authTokenName,this.isBufferingBatch=!1,this._pingTimeoutTicker=null,this._callbackMap={},this._batchBuffer=[],j||(j={}),this._onOpenHandler=j.onOpen||function(){},this._onOpenAbortHandler=j.onOpenAbort||function(){},this._onCloseHandler=j.onClose||function(){},this._onEventHandler=j.onEvent||function(){},this._onErrorHandler=j.onError||function(){},this._onInboundInvokeHandler=j.onInboundInvoke||function(){},this._onInboundTransmitHandler=j.onInboundTransmit||function(){},this.state=this.CONNECTING;let $=this.uri(),H=G($,F);H.binaryType=this.options.binaryType,this.socket=H,H.onopen=()=>{this._onOpen()},H.onclose=async k=>{let B;B=null==k.code?1005:k.code,this._destroy(B,k.reason)},H.onmessage=(k,B)=>{this._onMessage(k.data)},H.onerror=k=>{this.state===this.CONNECTING&&this._destroy(1006)},this._connectTimeoutRef=setTimeout((()=>{this._destroy(4007),this.socket.close(4007)}),this.connectTimeout),1===this.protocolVersion?this._handlePing=k=>"#1"===k&&(this._resetPingTimeout(),this.socket.readyState===this.socket.OPEN&&this.send("#2"),!0):this._handlePing=k=>""===k&&(this._resetPingTimeout(),this.socket.readyState===this.socket.OPEN&&this.send(""),!0)}V.CONNECTING=V.prototype.CONNECTING="connecting",V.OPEN=V.prototype.OPEN="open",V.CLOSED=V.prototype.CLOSED="closed",V.computeURI=function(k){let B,U=k.query||{};B=null==k.protocolScheme?k.secure?"wss":"ws":k.protocolScheme,k.timestampRequests&&(U[k.timestampParam]=(new Date).getTime());let F,G,j=new URLSearchParams;for(let[$,H]of Object.entries(U))if(Array.isArray(H))for(let k of H)j.append($,k);else j.set($,H);if(U=j.toString(),U.length&&(U="?"+U),null==k.socketPath){if(k.host)F=k.host;else{let U="";k.port&&("wss"===B&&443!==k.port||"ws"===B&&80!==k.port)&&(U=":"+k.port),F=k.hostname+U}G=k.path}else F=k.socketPath,G=`:${k.path}`;return B+"://"+F+G+U},V.prototype.uri=function(){return V.computeURI(this.options)},V.prototype._onOpen=async function(){let k;clearTimeout(this._connectTimeoutRef),this._resetPingTimeout();try{k=await this._handshake()}catch(B){return null==B.statusCode&&(B.statusCode=4003),this._onError(B),this._destroy(B.statusCode,B.toString()),void this.socket.close(B.statusCode)}this.state=this.OPEN,k&&(this.pingTimeout=k.pingTimeout),this._resetPingTimeout(),this._onOpenHandler(k)},V.prototype._handshake=async function(){let k=await this.auth.loadToken(this.authTokenName),B=await this.invoke("#handshake",{authToken:k},{force:!0});return B&&(B.authToken=k,B.authError&&(B.authError=j.hydrateError(B.authError))),B},V.prototype._abortAllPendingEventsDueToBadConnection=function(k,B,U){Object.keys(this._callbackMap||{}).forEach((F=>{let G=this._callbackMap[F];delete this._callbackMap[F],clearTimeout(G.timeout),delete G.timeout;let j=`Event ${G.event} was aborted due to a bad connection`,$=new H(j,k,B,U),V=G.callback;V&&(delete G.callback,V.call(G,$,G))}))},V.prototype._destroy=function(k,B){j.socketProtocolErrorStatuses[k];!B&&j.socketProtocolErrorStatuses[k]&&(B=j.socketProtocolErrorStatuses[k]),delete this.socket.onopen,delete this.socket.onclose,delete this.socket.onmessage,delete this.socket.onerror,clearTimeout(this._connectTimeoutRef),clearTimeout(this._pingTimeoutTicker),this.state===this.OPEN?(this.state=this.CLOSED,this._abortAllPendingEventsDueToBadConnection("disconnect",k,B),this._onCloseHandler({code:k,reason:B})):this.state===this.CONNECTING?(this.state=this.CLOSED,this._abortAllPendingEventsDueToBadConnection("connectAbort",k,B),this._onOpenAbortHandler({code:k,reason:B})):this.state===this.CLOSED&&this._abortAllPendingEventsDueToBadConnection("connectAbort",k,B)},V.prototype._processInboundPacket=function(k,B){if(k&&"string"==typeof k.event)if("number"==typeof k.cid){let B=new F(this,k.cid,k.event,k.data);this._onInboundInvokeHandler(B)}else this._onInboundTransmitHandler({...k});else if(k&&"number"==typeof k.rid){let B=this._callbackMap[k.rid];if(B&&(clearTimeout(B.timeout),delete B.timeout,delete this._callbackMap[k.rid],B.callback)){let U=j.hydrateError(k.error);B.callback(U,k.data)}}else this._onEventHandler({event:"raw",data:{message:B}})},V.prototype._onMessage=function(k){if(this._onEventHandler({event:"message",data:{message:k}}),this._handlePing(k))return;let B=this.decode(k);if(Array.isArray(B)){let U=B.length;for(let F=0;F{this._destroy(4e3),this.socket.close(4e3)}),this.pingTimeout)},V.prototype.clearAllListeners=function(){this._onOpenHandler=function(){},this._onOpenAbortHandler=function(){},this._onCloseHandler=function(){},this._onEventHandler=function(){},this._onErrorHandler=function(){},this._onInboundInvokeHandler=function(){},this._onInboundTransmitHandler=function(){}},V.prototype.startBatch=function(){this.isBufferingBatch=!0,this._batchBuffer=[]},V.prototype.flushBatch=function(){if(this.isBufferingBatch=!1,!this._batchBuffer.length)return;let k=this.serializeObject(this._batchBuffer);this._batchBuffer=[],this.send(k)},V.prototype.cancelBatch=function(){this.isBufferingBatch=!1,this._batchBuffer=[]},V.prototype.getBytesReceived=function(){return this.socket.bytesReceived},V.prototype.close=function(k,B){this.state!==this.OPEN&&this.state!==this.CONNECTING||(k=k||1e3,this._destroy(k,B),this.socket.close(k,B))},V.prototype.transmitObject=function(k){let B={event:k.event,data:k.data};return k.callback&&(B.cid=k.cid=this.callIdGenerator(),this._callbackMap[k.cid]=k),this.sendObject(B),k.cid||null},V.prototype._handleEventAckTimeout=function(k){k.cid&&delete this._callbackMap[k.cid],delete k.timeout;let B=k.callback;if(B){delete k.callback;let U=new $(`Event response for ${k.event} event timed out`);B.call(k,U,k)}},V.prototype.transmit=function(k,B,U){let F={event:k,data:B};return(this.state===this.OPEN||U.force)&&this.transmitObject(F),Promise.resolve()},V.prototype.invokeRaw=function(k,B,U,F){let G={event:k,data:B,callback:F};U.noTimeout||(G.timeout=setTimeout((()=>{this._handleEventAckTimeout(G)}),this.options.ackTimeout));let j=null;return(this.state===this.OPEN||U.force)&&(j=this.transmitObject(G)),j},V.prototype.invoke=function(k,B,U){return new Promise(((F,G)=>{this.invokeRaw(k,B,U,((k,B)=>{k?G(k):F(B)}))}))},V.prototype.cancelPendingResponse=function(k){delete this._callbackMap[k]},V.prototype.decode=function(k){return this.codec.decode(k)},V.prototype.encode=function(k){return this.codec.encode(k)},V.prototype.send=function(k){this.socket.readyState!==this.socket.OPEN?this._destroy(1005):this.socket.send(k)},V.prototype.serializeObject=function(k){let B;try{B=this.encode(k)}catch(U){return this._onError(U),null}return B},V.prototype.sendObject=function(k){if(this.isBufferingBatch)return void this._batchBuffer.push(k);let B=this.serializeObject(k);null!=B&&this.send(B)},k.exports=V},17549:k=>{k.exports=function(k){return new Promise((B=>{setTimeout((()=>{B()}),k)}))}},18495:k=>{let B;B="undefined"!=typeof WorkerGlobalScope?self:"undefined"!=typeof window&&window||function(){return this}();const U=B.WebSocket||B.MozWebSocket;function F(k,B,F){let G;return G=B?new U(k,B):new U(k),G}U&&(F.prototype=U.prototype),k.exports=U?F:null},69824:(k,B,U)=>{"use strict";var F;U.r(B),U.d(B,{NIL:()=>ut,parse:()=>Z,stringify:()=>q,v1:()=>X,v3:()=>ot,v4:()=>ht,v5:()=>lt,validate:()=>H,version:()=>ft});var G=new Uint8Array(16);function j(){if(!F&&!(F="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return F(G)}const $=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const H=function(k){return"string"==typeof k&&$.test(k)};for(var V=[],W=0;W<256;++W)V.push((W+256).toString(16).substr(1));const q=function(k){var B=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,U=(V[k[B+0]]+V[k[B+1]]+V[k[B+2]]+V[k[B+3]]+"-"+V[k[B+4]]+V[k[B+5]]+"-"+V[k[B+6]]+V[k[B+7]]+"-"+V[k[B+8]]+V[k[B+9]]+"-"+V[k[B+10]]+V[k[B+11]]+V[k[B+12]]+V[k[B+13]]+V[k[B+14]]+V[k[B+15]]).toLowerCase();if(!H(U))throw TypeError("Stringified UUID is invalid");return U};var K,z,Y=0,Q=0;const X=function(k,B,U){var F=B&&U||0,G=B||new Array(16),$=(k=k||{}).node||K,H=void 0!==k.clockseq?k.clockseq:z;if(null==$||null==H){var V=k.random||(k.rng||j)();null==$&&($=K=[1|V[0],V[1],V[2],V[3],V[4],V[5]]),null==H&&(H=z=16383&(V[6]<<8|V[7]))}var W=void 0!==k.msecs?k.msecs:Date.now(),X=void 0!==k.nsecs?k.nsecs:Q+1,Z=W-Y+(X-Q)/1e4;if(Z<0&&void 0===k.clockseq&&(H=H+1&16383),(Z<0||W>Y)&&void 0===k.nsecs&&(X=0),X>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Y=W,Q=X,z=H;var J=(1e4*(268435455&(W+=122192928e5))+X)%4294967296;G[F++]=J>>>24&255,G[F++]=J>>>16&255,G[F++]=J>>>8&255,G[F++]=255&J;var tt=W/4294967296*1e4&268435455;G[F++]=tt>>>8&255,G[F++]=255&tt,G[F++]=tt>>>24&15|16,G[F++]=tt>>>16&255,G[F++]=H>>>8|128,G[F++]=255&H;for(var et=0;et<6;++et)G[F+et]=$[et];return B||q(G)};const Z=function(k){if(!H(k))throw TypeError("Invalid UUID");var B,U=new Uint8Array(16);return U[0]=(B=parseInt(k.slice(0,8),16))>>>24,U[1]=B>>>16&255,U[2]=B>>>8&255,U[3]=255&B,U[4]=(B=parseInt(k.slice(9,13),16))>>>8,U[5]=255&B,U[6]=(B=parseInt(k.slice(14,18),16))>>>8,U[7]=255&B,U[8]=(B=parseInt(k.slice(19,23),16))>>>8,U[9]=255&B,U[10]=(B=parseInt(k.slice(24,36),16))/1099511627776&255,U[11]=B/4294967296&255,U[12]=B>>>24&255,U[13]=B>>>16&255,U[14]=B>>>8&255,U[15]=255&B,U};function J(k,B,U){function F(k,F,G,j){if("string"==typeof k&&(k=function(k){k=unescape(encodeURIComponent(k));for(var B=[],U=0;U>>9<<4)+1}function et(k,B){var U=(65535&k)+(65535&B);return(k>>16)+(B>>16)+(U>>16)<<16|65535&U}function it(k,B,U,F,G,j){return et(($=et(et(B,k),et(F,j)))<<(H=G)|$>>>32-H,U);var $,H}function st(k,B,U,F,G,j,$){return it(B&U|~B&F,k,B,G,j,$)}function nt(k,B,U,F,G,j,$){return it(B&F|U&~F,k,B,G,j,$)}function at(k,B,U,F,G,j,$){return it(B^U^F,k,B,G,j,$)}function rt(k,B,U,F,G,j,$){return it(U^(B|~F),k,B,G,j,$)}const ot=J("v3",48,(function(k){if("string"==typeof k){var B=unescape(encodeURIComponent(k));k=new Uint8Array(B.length);for(var U=0;U>5]>>>G%32&255,$=parseInt(F.charAt(j>>>4&15)+F.charAt(15&j),16);B.push($)}return B}(function(k,B){k[B>>5]|=128<>5]|=(255&k[F/8])<>>32-B}const lt=J("v5",80,(function(k){var B=[1518500249,1859775393,2400959708,3395469782],U=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof k){var F=unescape(encodeURIComponent(k));k=[];for(var G=0;G>>0;et=tt,tt=J,J=dt(Z,30)>>>0,Z=X,X=nt}U[0]=U[0]+X>>>0,U[1]=U[1]+Z>>>0,U[2]=U[2]+J>>>0,U[3]=U[3]+tt>>>0,U[4]=U[4]+et>>>0}return[U[0]>>24&255,U[0]>>16&255,U[0]>>8&255,255&U[0],U[1]>>24&255,U[1]>>16&255,U[1]>>8&255,255&U[1],U[2]>>24&255,U[2]>>16&255,U[2]>>8&255,255&U[2],U[3]>>24&255,U[3]>>16&255,U[3]>>8&255,255&U[3],U[4]>>24&255,U[4]>>16&255,U[4]>>8&255,255&U[4]]})),ut="00000000-0000-0000-0000-000000000000";const ft=function(k){if(!H(k))throw TypeError("Invalid UUID");return parseInt(k.substr(14,1),16)}},40343:function(k,B){var U,F,G;!function(j,$){"use strict";F=[],void 0===(G="function"==typeof(U=function(){function k(k){return!isNaN(parseFloat(k))&&isFinite(k)}function B(k){return k.charAt(0).toUpperCase()+k.substring(1)}function U(k){return function(){return this[k]}}var F=["isConstructor","isEval","isNative","isToplevel"],G=["columnNumber","lineNumber"],j=["fileName","functionName","source"],$=["args"],H=["evalOrigin"],V=F.concat(G,j,$,H);function W(k){if(k)for(var U=0;U$+1e3&&(V.update(1e3*H/(k-$),100),$=k,H=0,q)){var B=performance.memory;q.update(B.usedJSHeapSize/1048576,B.jsHeapSizeLimit/1048576)}return k},update:function(){j=this.end()},domElement:G,setMode:U}}).Panel=function(k,B,U){var F=1/0,G=0,j=Math.round,$=j(window.devicePixelRatio||1),H=80*$,V=48*$,W=3*$,q=2*$,K=3*$,z=15*$,Y=74*$,Q=30*$,X=document.createElement("canvas");X.width=H,X.height=V,X.style.cssText="width:80px;height:48px";var Z=X.getContext("2d");return Z.font="bold "+9*$+"px Helvetica,Arial,sans-serif",Z.textBaseline="top",Z.fillStyle=U,Z.fillRect(0,0,H,V),Z.fillStyle=B,Z.fillText(k,W,q),Z.fillRect(K,z,Y,Q),Z.fillStyle=U,Z.globalAlpha=.9,Z.fillRect(K,z,Y,Q),{dom:X,update:function(V,J){F=Math.min(F,V),G=Math.max(G,V),Z.fillStyle=U,Z.globalAlpha=1,Z.fillRect(0,0,H,z),Z.fillStyle=B,Z.fillText(j(V)+" "+k+" ("+j(F)+"-"+j(G)+")",W,q),Z.drawImage(X,K+$,z,Y-$,Q,K,z,Y-$,Q),Z.fillRect(K+Y-$,z,$,Q),Z.fillStyle=U,Z.globalAlpha=.9,Z.fillRect(K+Y-$,z,$,j((1-V/J)*Q))}}},B)},7682:(k,B,U)=>{const F=U(11607);k.exports=class extends F{constructor(k,B){super(),this._streamDemux=k,this.name=B}createConsumer(k){return this._streamDemux.createConsumer(this.name,k)}}},47579:(k,B,U)=>{const F=U(44658),G=U(7682);k.exports=class{constructor(){this.streams={},this._nextConsumerId=1,this.generateConsumerId=()=>this._nextConsumerId++}write(k,B){this.streams[k]&&this.streams[k].write(B)}close(k,B){this.streams[k]&&this.streams[k].close(B)}closeAll(k){for(let B of Object.values(this.streams))B.close(k)}writeToConsumer(k,B){for(let U of Object.values(this.streams))if(U.hasConsumer(k))return U.writeToConsumer(k,B)}closeConsumer(k,B){for(let U of Object.values(this.streams))if(U.hasConsumer(k))return U.closeConsumer(k,B)}getConsumerStats(k){for(let[B,U]of Object.entries(this.streams))if(U.hasConsumer(k))return{...U.getConsumerStats(k),stream:B}}getConsumerStatsList(k){return this.streams[k]?this.streams[k].getConsumerStatsList().map((B=>({...B,stream:k}))):[]}getConsumerStatsListAll(){let k=[];for(let B of Object.keys(this.streams)){let U=this.getConsumerStatsList(B);for(let B of U)k.push(B)}return k}kill(k,B){this.streams[k]&&this.streams[k].kill(B)}killAll(k){for(let B of Object.values(this.streams))B.kill(k)}killConsumer(k,B){for(let U of Object.values(this.streams))if(U.hasConsumer(k))return U.killConsumer(k,B)}getBackpressure(k){return this.streams[k]?this.streams[k].getBackpressure():0}getBackpressureAll(){return Object.values(this.streams).reduce(((k,B)=>Math.max(k,B.getBackpressure())),0)}getConsumerBackpressure(k){for(let B of Object.values(this.streams))if(B.hasConsumer(k))return B.getConsumerBackpressure(k);return 0}hasConsumer(k,B){return!!this.streams[k]&&this.streams[k].hasConsumer(B)}hasConsumerAll(k){return Object.values(this.streams).some((B=>B.hasConsumer(k)))}getConsumerCount(k){return this.streams[k]?this.streams[k].getConsumerCount():0}getConsumerCountAll(){return Object.values(this.streams).reduce(((k,B)=>k+B.getConsumerCount()),0)}createConsumer(k,B){return this.streams[k]||(this.streams[k]=new F({generateConsumerId:this.generateConsumerId,removeConsumerCallback:()=>{this.getConsumerCount(k)||delete this.streams[k]}})),this.streams[k].createConsumer(B)}stream(k){return new G(this,k)}unstream(k){delete this.streams[k]}}},11607:k=>{class B{async next(k){let B=this.createConsumer(k),U=await B.next();return B.return(),U}async once(k){let B=await this.next(k);if(B.done){if(null!=k){let k=new Error("Stream consumer operation timed out early because stream ended");throw k.name="TimeoutError",k}await new Promise((()=>{}))}return B.value}createConsumer(){throw new TypeError("Method must be overriden by subclass")}[Symbol.asyncIterator](){return this.createConsumer()}}k.exports=B},24280:k=>{"use strict";k.exports=function(k){return encodeURIComponent(k).replace(/[!'()*]/g,(function(k){return"%"+k.charCodeAt(0).toString(16).toUpperCase()}))}},78465:function(k){k.exports=function(){"use strict";function k(B){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(k){return typeof k}:function(k){return k&&"function"==typeof Symbol&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k})(B)}function B(k,B){if(!(k instanceof B))throw new TypeError("Cannot call a class as a function")}function U(k,B){for(var U=0;U(B=parseInt(B.getAttribute("tabindex")))?1:k1&&void 0!==arguments[1]?arguments[1]:"flex";k.style.display=B},re=function(k){k.style.display="none"},oe=function(k,B,U,F){var G=k.querySelector(B);G&&(G.style[U]=F)},he=function(k,B,U){B?ae(k,U):re(k)},ce=function(k){return!(!k||!(k.offsetWidth||k.offsetHeight||k.getClientRects().length))},de=function(){return!ce(Pt())&&!ce(Mt())&&!ce(Lt())},le=function(k){return!!(k.scrollHeight>k.clientHeight)},ue=function(k){var B=window.getComputedStyle(k),U=parseFloat(B.getPropertyValue("animation-duration")||"0"),F=parseFloat(B.getPropertyValue("transition-duration")||"0");return U>0||F>0},fe=function(k,B){if("function"==typeof k.contains)return k.contains(B)},be=function(k){var B=arguments.length>1&&void 0!==arguments[1]&&arguments[1],U=Ft();ce(U)&&(B&&(U.style.transition="none",U.style.width="100%"),setTimeout((function(){U.style.transition="width ".concat(k/1e3,"s linear"),U.style.width="0%"}),10))},pe=function(){var k=Ft(),B=parseInt(window.getComputedStyle(k).width);k.style.removeProperty("transition"),k.style.width="100%";var U=parseInt(window.getComputedStyle(k).width),F=parseInt(B/U*100);k.style.removeProperty("transition"),k.style.width="".concat(F,"%")},ve=function(){return"undefined"==typeof window||"undefined"==typeof document},ge='\n
\n
\n
    \n
    \n
    \n
    \n
    \n
    \n \n

    \n \n
    \n
    \n
    \n \n \n
    \n \n \n
    \n \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n
    \n').replace(/(^|\n)\s*/g,""),me=function(){var k=yt();return!!k&&(k.parentNode.removeChild(k),ie([document.documentElement,document.body],[gt["no-backdrop"],gt["toast-shown"],gt["has-column"]]),!0)},ye=function(k){Xn.isVisible()&&Zt!==k.target.value&&Xn.resetValidationMessage(),Zt=k.target.value},_e=function(){var k=Ct(),B=se(k,gt.input),U=se(k,gt.file),F=k.querySelector(".".concat(gt.range," input")),G=k.querySelector(".".concat(gt.range," output")),j=se(k,gt.select),$=k.querySelector(".".concat(gt.checkbox," input")),H=se(k,gt.textarea);B.oninput=ye,U.onchange=ye,j.onchange=ye,$.onchange=ye,H.oninput=ye,F.oninput=function(k){ye(k),G.value=F.value},F.onchange=function(k){ye(k),F.nextSibling.value=F.value}},Ee=function(k){return"string"==typeof k?document.querySelector(k):k},we=function(k){var B=wt();B.setAttribute("role",k.toast?"alert":"dialog"),B.setAttribute("aria-live",k.toast?"polite":"assertive"),k.toast||B.setAttribute("aria-modal","true")},Te=function(k){"rtl"===window.getComputedStyle(k).direction&&ee(yt(),gt.rtl)},Se=function(k){var B=me();if(ve())st("SweetAlert2 requires document to initialize");else{var U=document.createElement("div");U.className=gt.container,B&&ee(U,gt["no-transition"]),Kt(U,ge);var F=Ee(k.target);F.appendChild(U),we(k),Te(F),_e()}},Ae=function(B,U){B instanceof HTMLElement?U.appendChild(B):"object"===k(B)?Ce(B,U):B&&Kt(U,B)},Ce=function(k,B){k.jquery?Oe(B,k):Kt(B,k.toString())},Oe=function(k,B){if(k.textContent="",0 in B)for(var U=0;U in B;U++)k.appendChild(B[U].cloneNode(!0));else k.appendChild(B.cloneNode(!0))},Ie=function(){if(ve())return!1;var k=document.createElement("div"),B={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var U in B)if(Object.prototype.hasOwnProperty.call(B,U)&&void 0!==k.style[U])return B[U];return!1}(),De=function(){var k=document.createElement("div");k.className=gt["scrollbar-measure"],document.body.appendChild(k);var B=k.getBoundingClientRect().width-k.clientWidth;return document.body.removeChild(k),B},Re=function(k,B){var U=kt(),F=xt(),G=Pt(),j=Mt(),$=Lt();B.showConfirmButton||B.showDenyButton||B.showCancelButton||re(U),Qt(U,B,"actions"),Me(G,"confirm",B),Me(j,"deny",B),Me($,"cancel",B),Pe(G,j,$,B),B.reverseButtons&&(U.insertBefore($,F),U.insertBefore(j,F),U.insertBefore(G,F)),Kt(F,B.loaderHtml),Qt(F,B,"loader")};function Pe(k,B,U,F){if(!F.buttonsStyling)return ie([k,B,U],gt.styled);ee([k,B,U],gt.styled),F.confirmButtonColor&&(k.style.backgroundColor=F.confirmButtonColor),F.denyButtonColor&&(B.style.backgroundColor=F.denyButtonColor),F.cancelButtonColor&&(U.style.backgroundColor=F.cancelButtonColor)}function Me(k,B,U){he(k,U["show".concat(J(B),"Button")],"inline-block"),Kt(k,U["".concat(B,"ButtonText")]),k.setAttribute("aria-label",U["".concat(B,"ButtonAriaLabel")]),k.className=gt[B],Qt(k,U,"".concat(B,"Button")),ee(k,U["".concat(B,"ButtonClass")])}function Ne(k,B){"string"==typeof B?k.style.background=B:B||ee([document.documentElement,document.body],gt["no-backdrop"])}function xe(k,B){B in gt?ee(k,gt[B]):(it('The "position" parameter is not valid, defaulting to "center"'),ee(k,gt.center))}function Le(k,B){if(B&&"string"==typeof B){var U="grow-".concat(B);U in gt&&ee(k,gt[U])}}var ke=function(k,B){var U=yt();if(U){Ne(U,B.backdrop),!B.backdrop&&B.allowOutsideClick&&it('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),xe(U,B.position),Le(U,B.grow),Qt(U,B,"container");var F=document.body.getAttribute("data-swal2-queue-step");F&&(U.setAttribute("data-queue-step",F),document.body.removeAttribute("data-swal2-queue-step"))}},Be={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},Ue=["input","file","range","select","radio","checkbox","textarea"],Fe=function(k,B){var U=Ct(),F=Be.innerParams.get(k),G=!F||B.input!==F.input;Ue.forEach((function(k){var F=gt[k],j=se(U,F);$e(k,B.inputAttributes),j.className=F,G&&re(j)})),B.input&&(G&&Ge(B),He(B))},Ge=function(k){if(!Ke[k.input])return st('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(k.input,'"'));var B=qe(k.input),U=Ke[k.input](B,k);ae(U),setTimeout((function(){Jt(U)}))},je=function(k){for(var B=0;BF?"".concat(B,"px"):null})).observe(k,{attributes:!0,attributeFilter:["style"]})}return k};var ze=function(k,B){var U=Ct().querySelector("#".concat(gt.content));B.html?(Ae(B.html,U),ae(U,"block")):B.text?(U.textContent=B.text,ae(U,"block")):re(U),Fe(k,B),Qt(Ct(),B,"content")},Ye=function(k,B){var U=Ut();he(U,B.footer),B.footer&&Ae(B.footer,U),Qt(U,B,"footer")},Qe=function(k,B){var U=Gt();Kt(U,B.closeButtonHtml),Qt(U,B,"closeButton"),he(U,B.showCloseButton),U.setAttribute("aria-label",B.closeButtonAriaLabel)},Xe=function(k,B){var U=Be.innerParams.get(k);if(U&&B.icon===U.icon&&St())Je(St(),B);else if(Ze(),B.icon)if(-1!==Object.keys(mt).indexOf(B.icon)){var F=_t(".".concat(gt.icon,".").concat(mt[B.icon]));ae(F),ei(F,B),Je(F,B),ee(F,B.showClass.icon)}else st('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(B.icon,'"'))},Ze=function(){for(var k=Tt(),B=0;B\n \n
    \n
    \n '):"error"===B.icon?Kt(k,'\n \n \n \n \n '):Kt(k,si({question:"?",warning:"!",info:"i"}[B.icon]))},ii=function(k,B){if(B.iconColor){k.style.color=B.iconColor,k.style.borderColor=B.iconColor;for(var U=0,F=[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"];U').concat(k,"")},ni=function(k,B){var U=It();if(!B.imageUrl)return re(U);ae(U,""),U.setAttribute("src",B.imageUrl),U.setAttribute("alt",B.imageAlt),ne(U,"width",B.imageWidth),ne(U,"height",B.imageHeight),U.className=gt.image,Qt(U,B,"image")},ai=[],ri=function(k){var B=this;ai=k;var U=function(k,B){ai=[],k(B)},F=[];return new Promise((function(k){!function G(j,$){j=B.progressSteps.length&&it("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),B.progressSteps.forEach((function(k,G){var j=di(k);if(U.appendChild(j),G===F&&ee(j,gt["active-progress-step"]),G!==B.progressSteps.length-1){var $=li(B);U.appendChild($)}}))},fi=function(k,B){var U=At();he(U,B.title||B.titleText),B.title&&Ae(B.title,U),B.titleText&&(U.innerText=B.titleText),Qt(U,B,"title")},bi=function(k,B){var U=Bt();Qt(U,B,"header"),ui(k,B),Xe(k,B),ni(k,B),fi(k,B),Qe(k,B)},pi=function(k,B){var U=wt();ne(U,"width",B.width),ne(U,"padding",B.padding),B.background&&(U.style.background=B.background),vi(U,B)},vi=function(k,B){k.className="".concat(gt.popup," ").concat(ce(k)?B.showClass.popup:""),B.toast?(ee([document.documentElement,document.body],gt["toast-shown"]),ee(k,gt.toast)):ee(k,gt.modal),Qt(k,B,"popup"),"string"==typeof B.customClass&&ee(k,B.customClass),B.icon&&ee(k,gt["icon-".concat(B.icon)])},gi=function(k,B){pi(k,B),ke(k,B),bi(k,B),ze(k,B),Re(k,B),Ye(k,B),"function"==typeof B.didRender?B.didRender(wt()):"function"==typeof B.onRender&&B.onRender(wt())},mi=function(){return ce(wt())},yi=function(){return Pt()&&Pt().click()},_i=function(){return Mt()&&Mt().click()},Ei=function(){return Lt()&&Lt().click()};function wi(){for(var k=this,B=arguments.length,U=new Array(B),F=0;F0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,Li||(document.body.addEventListener("click",Ui),Li=!0)}var Ui=function(k){for(var B=k.target;B&&B!==document;B=B.parentNode)for(var U in ki){var F=B.getAttribute(U);if(F)return void ki[U].fire({template:F})}},Fi={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,onBeforeOpen:void 0,onOpen:void 0,willOpen:void 0,didOpen:void 0,onRender:void 0,didRender:void 0,onClose:void 0,onAfterClose:void 0,willClose:void 0,didClose:void 0,onDestroy:void 0,didDestroy:void 0,scrollbarPadding:!0},Gi=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","imageAlt","imageHeight","imageUrl","imageWidth","onAfterClose","onClose","onDestroy","progressSteps","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],ji={animation:'showClass" and "hideClass',onBeforeOpen:"willOpen",onOpen:"didOpen",onRender:"didRender",onClose:"willClose",onAfterClose:"didClose",onDestroy:"didDestroy"},$i=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","heightAuto","keydownListenerCapture"],Hi=function(k){return Object.prototype.hasOwnProperty.call(Fi,k)},Vi=function(k){return-1!==Gi.indexOf(k)},Wi=function(k){return ji[k]},qi=function(k){Hi(k)||it('Unknown parameter "'.concat(k,'"'))},Ki=function(k){-1!==$i.indexOf(k)&&it('The parameter "'.concat(k,'" is incompatible with toasts'))},zi=function(k){Wi(k)&&rt(k,Wi(k))},Yi=function(k){for(var B in k)qi(B),k.toast&&Ki(B),zi(B)},Qi=Object.freeze({isValidParameter:Hi,isUpdatableParameter:Vi,isDeprecatedParameter:Wi,argsToParams:bt,isVisible:mi,clickConfirm:yi,clickDeny:_i,clickCancel:Ei,getContainer:yt,getPopup:wt,getTitle:At,getContent:Ct,getHtmlContainer:Ot,getImage:It,getIcon:St,getIcons:Tt,getInputLabel:Nt,getCloseButton:Gt,getActions:kt,getConfirmButton:Pt,getDenyButton:Mt,getCancelButton:Lt,getLoader:xt,getHeader:Bt,getFooter:Ut,getTimerProgressBar:Ft,getFocusableElements:$t,getValidationMessage:Rt,isLoading:Wt,fire:wi,mixin:Ti,queue:ri,getQueueStep:oi,insertQueueStep:hi,deleteQueueStep:ci,showLoading:Si,enableLoading:Si,getTimerLeft:Di,stopTimer:Ri,resumeTimer:Pi,toggleTimer:Mi,increaseTimer:Ni,isTimerRunning:xi,bindClickHandler:Bi});function Xi(){if(Be.innerParams.get(this)){var k=Be.domCache.get(this);re(k.loader);var B=k.popup.getElementsByClassName(k.loader.getAttribute("data-button-to-replace"));B.length?ae(B[0],"inline-block"):de()&&re(k.actions),ie([k.popup,k.actions],gt.loading),k.popup.removeAttribute("aria-busy"),k.popup.removeAttribute("data-loading"),k.confirmButton.disabled=!1,k.denyButton.disabled=!1,k.cancelButton.disabled=!1}}function Zi(k){var B=Be.innerParams.get(k||this),U=Be.domCache.get(k||this);return U?Xt(U.content,B.input):null}var Ji=function(){null===qt.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(qt.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(qt.previousBodyPadding+De(),"px"))},ts=function(){null!==qt.previousBodyPadding&&(document.body.style.paddingRight="".concat(qt.previousBodyPadding,"px"),qt.previousBodyPadding=null)},es=function(){if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!zt(document.body,gt.iosfix)){var k=document.body.scrollTop;document.body.style.top="".concat(-1*k,"px"),ee(document.body,gt.iosfix),ss(),is()}},is=function(){if(!navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)){var k=44;wt().scrollHeight>window.innerHeight-k&&(yt().style.paddingBottom="".concat(k,"px"))}},ss=function(){var k,B=yt();B.ontouchstart=function(B){k=ns(B)},B.ontouchmove=function(B){k&&(B.preventDefault(),B.stopPropagation())}},ns=function(k){var B=k.target,U=yt();return!(as(k)||rs(k)||B!==U&&(le(U)||"INPUT"===B.tagName||le(Ct())&&Ct().contains(B)))},as=function(k){return k.touches&&k.touches.length&&"stylus"===k.touches[0].touchType},rs=function(k){return k.touches&&k.touches.length>1},os=function(){if(zt(document.body,gt.iosfix)){var k=parseInt(document.body.style.top,10);ie(document.body,gt.iosfix),document.body.style.top="",document.body.scrollTop=-1*k}},hs=function(){return!!window.MSInputMethodContext&&!!document.documentMode},cs=function(){var k=yt(),B=wt();k.style.removeProperty("align-items"),B.offsetTop<0&&(k.style.alignItems="flex-start")},ds=function(){"undefined"!=typeof window&&hs()&&(cs(),window.addEventListener("resize",cs))},ls=function(){"undefined"!=typeof window&&hs()&&window.removeEventListener("resize",cs)},us=function(){et(document.body.children).forEach((function(k){k===yt()||fe(k,yt())||(k.hasAttribute("aria-hidden")&&k.setAttribute("data-previous-aria-hidden",k.getAttribute("aria-hidden")),k.setAttribute("aria-hidden","true"))}))},fs=function(){et(document.body.children).forEach((function(k){k.hasAttribute("data-previous-aria-hidden")?(k.setAttribute("aria-hidden",k.getAttribute("data-previous-aria-hidden")),k.removeAttribute("data-previous-aria-hidden")):k.removeAttribute("aria-hidden")}))},bs={swalPromiseResolve:new WeakMap};function ps(k,B,U,F){U?ws(k,F):(Ii().then((function(){return ws(k,F)})),Ci.keydownTarget.removeEventListener("keydown",Ci.keydownHandler,{capture:Ci.keydownListenerCapture}),Ci.keydownHandlerAdded=!1),B.parentNode&&!document.body.getAttribute("data-swal2-queue-step")&&B.parentNode.removeChild(B),Ht()&&(ts(),os(),ls(),fs()),vs()}function vs(){ie([document.documentElement,document.body],[gt.shown,gt["height-auto"],gt["no-backdrop"],gt["toast-shown"],gt["toast-column"]])}function gs(k){var B=wt();if(B){k=ms(k);var U=Be.innerParams.get(this);if(U&&!zt(B,U.hideClass.popup)){var F=bs.swalPromiseResolve.get(this);ie(B,U.showClass.popup),ee(B,U.hideClass.popup);var G=yt();ie(G,U.showClass.backdrop),ee(G,U.hideClass.backdrop),ys(this,B,U),F(k)}}}var ms=function(k){return void 0===k?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:G({isConfirmed:!1,isDenied:!1,isDismissed:!1},k)},ys=function(k,B,U){var F=yt(),G=Ie&&ue(B),j=U.onClose,$=U.onAfterClose,H=U.willClose,V=U.didClose;_s(B,H,j),G?Es(k,B,F,V||$):ps(k,F,Vt(),V||$)},_s=function(k,B,U){null!==B&&"function"==typeof B?B(k):null!==U&&"function"==typeof U&&U(k)},Es=function(k,B,U,F){Ci.swalCloseEventFinishedCallback=ps.bind(null,k,U,Vt(),F),B.addEventListener(Ie,(function(k){k.target===B&&(Ci.swalCloseEventFinishedCallback(),delete Ci.swalCloseEventFinishedCallback)}))},ws=function(k,B){setTimeout((function(){"function"==typeof B&&B(),k._destroy()}))};function Ts(k,B,U){var F=Be.domCache.get(k);B.forEach((function(k){F[k].disabled=U}))}function Ss(k,B){if(!k)return!1;if("radio"===k.type)for(var U=k.parentNode.parentNode.querySelectorAll("input"),F=0;F")),Se(k)}var Bs=["swal-title","swal-html","swal-footer"],Us=function(k){var B="string"==typeof k.template?document.querySelector(k.template):k.template;if(!B)return{};var U=B.content||B;return Ws(U),G(Fs(U),Gs(U),js(U),$s(U),Hs(U),Vs(U,Bs))},Fs=function(B){var U={};return et(B.querySelectorAll("swal-param")).forEach((function(B){qs(B,["name","value"]);var F=B.getAttribute("name"),G=B.getAttribute("value");"boolean"==typeof Fi[F]&&"false"===G&&(G=!1),"object"===k(Fi[F])&&(G=JSON.parse(G)),U[F]=G})),U},Gs=function(k){var B={};return et(k.querySelectorAll("swal-button")).forEach((function(k){qs(k,["type","color","aria-label"]);var U=k.getAttribute("type");B["".concat(U,"ButtonText")]=k.innerHTML,B["show".concat(J(U),"Button")]=!0,k.hasAttribute("color")&&(B["".concat(U,"ButtonColor")]=k.getAttribute("color")),k.hasAttribute("aria-label")&&(B["".concat(U,"ButtonAriaLabel")]=k.getAttribute("aria-label"))})),B},js=function(k){var B={},U=k.querySelector("swal-image");return U&&(qs(U,["src","width","height","alt"]),U.hasAttribute("src")&&(B.imageUrl=U.getAttribute("src")),U.hasAttribute("width")&&(B.imageWidth=U.getAttribute("width")),U.hasAttribute("height")&&(B.imageHeight=U.getAttribute("height")),U.hasAttribute("alt")&&(B.imageAlt=U.getAttribute("alt"))),B},$s=function(k){var B={},U=k.querySelector("swal-icon");return U&&(qs(U,["type","color"]),U.hasAttribute("type")&&(B.icon=U.getAttribute("type")),U.hasAttribute("color")&&(B.iconColor=U.getAttribute("color")),B.iconHtml=U.innerHTML),B},Hs=function(k){var B={},U=k.querySelector("swal-input");U&&(qs(U,["type","label","placeholder","value"]),B.input=U.getAttribute("type")||"text",U.hasAttribute("label")&&(B.inputLabel=U.getAttribute("label")),U.hasAttribute("placeholder")&&(B.inputPlaceholder=U.getAttribute("placeholder")),U.hasAttribute("value")&&(B.inputValue=U.getAttribute("value")));var F=k.querySelectorAll("swal-input-option");return F.length&&(B.inputOptions={},et(F).forEach((function(k){qs(k,["value"]);var U=k.getAttribute("value"),F=k.innerHTML;B.inputOptions[U]=F}))),B},Vs=function(k,B){var U={};for(var F in B){var G=B[F],j=k.querySelector(G);j&&(qs(j,[]),U[G.replace(/^swal-/,"")]=j.innerHTML)}return U},Ws=function(k){var B=Bs.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);et(k.querySelectorAll("*")).forEach((function(k){var U=k.tagName.toLowerCase();-1===B.indexOf(U)&&it("Unrecognized element <".concat(U,">"))}))},qs=function(k,B){et(k.attributes).forEach((function(U){-1===B.indexOf(U.name)&&it(['Unrecognized attribute "'.concat(U.name,'" on <').concat(k.tagName.toLowerCase(),">."),"".concat(B.length?"Allowed attributes are: ".concat(B.join(", ")):"To set the value, use HTML within the element.")])}))},Ks=10,zs=function(k){var B=yt(),U=wt();"function"==typeof k.willOpen?k.willOpen(U):"function"==typeof k.onBeforeOpen&&k.onBeforeOpen(U);var F=window.getComputedStyle(document.body).overflowY;Js(B,U,k),setTimeout((function(){Xs(B,U)}),Ks),Ht()&&(Zs(B,k.scrollbarPadding,F),us()),Vt()||Ci.previousActiveElement||(Ci.previousActiveElement=document.activeElement),Ys(U,k),ie(B,gt["no-transition"])},Ys=function(k,B){"function"==typeof B.didOpen?setTimeout((function(){return B.didOpen(k)})):"function"==typeof B.onOpen&&setTimeout((function(){return B.onOpen(k)}))},Qs=function k(B){var U=wt();if(B.target===U){var F=yt();U.removeEventListener(Ie,k),F.style.overflowY="auto"}},Xs=function(k,B){Ie&&ue(B)?(k.style.overflowY="hidden",B.addEventListener(Ie,Qs)):k.style.overflowY="auto"},Zs=function(k,B,U){es(),ds(),B&&"hidden"!==U&&Ji(),setTimeout((function(){k.scrollTop=0}))},Js=function(k,B,U){ee(k,U.showClass.backdrop),B.style.setProperty("opacity","0","important"),ae(B),setTimeout((function(){ee(B,U.showClass.popup),B.style.removeProperty("opacity")}),Ks),ee([document.documentElement,document.body],gt.shown),U.heightAuto&&U.backdrop&&!U.toast&&ee([document.documentElement,document.body],gt["height-auto"])},tn=function(k,B){"select"===B.input||"radio"===B.input?rn(k,B):-1!==["text","email","number","tel","textarea"].indexOf(B.input)&&(ht(B.inputValue)||dt(B.inputValue))&&on(k,B)},en=function(k,B){var U=k.getInput();if(!U)return null;switch(B.input){case"checkbox":return sn(U);case"radio":return nn(U);case"file":return an(U);default:return B.inputAutoTrim?U.value.trim():U.value}},sn=function(k){return k.checked?1:0},nn=function(k){return k.checked?k.value:null},an=function(k){return k.files.length?null!==k.getAttribute("multiple")?k.files:k.files[0]:null},rn=function(B,U){var F=Ct(),G=function(k){return hn[U.input](F,cn(k),U)};ht(U.inputOptions)||dt(U.inputOptions)?(Si(),ct(U.inputOptions).then((function(k){B.hideLoading(),G(k)}))):"object"===k(U.inputOptions)?G(U.inputOptions):st("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(k(U.inputOptions)))},on=function(k,B){var U=k.getInput();re(U),ct(B.inputValue).then((function(F){U.value="number"===B.input?parseFloat(F)||0:"".concat(F),ae(U),U.focus(),k.hideLoading()})).catch((function(B){st("Error in inputValue promise: ".concat(B)),U.value="",ae(U),U.focus(),k.hideLoading()}))},hn={select:function(k,B,U){var F=se(k,gt.select),G=function(k,B,F){var G=document.createElement("option");G.value=F,Kt(G,B),G.selected=dn(F,U.inputValue),k.appendChild(G)};B.forEach((function(k){var B=k[0],U=k[1];if(Array.isArray(U)){var j=document.createElement("optgroup");j.label=B,j.disabled=!1,F.appendChild(j),U.forEach((function(k){return G(j,k[1],k[0])}))}else G(F,U,B)})),F.focus()},radio:function(k,B,U){var F=se(k,gt.radio);B.forEach((function(k){var B=k[0],G=k[1],j=document.createElement("input"),$=document.createElement("label");j.type="radio",j.name=gt.radio,j.value=B,dn(B,U.inputValue)&&(j.checked=!0);var H=document.createElement("span");Kt(H,G),H.className=gt.label,$.appendChild(j),$.appendChild(H),F.appendChild($)}));var G=F.querySelectorAll("input");G.length&&G[0].focus()}},cn=function B(U){var F=[];return"undefined"!=typeof Map&&U instanceof Map?U.forEach((function(U,G){var j=U;"object"===k(j)&&(j=B(j)),F.push([G,j])})):Object.keys(U).forEach((function(G){var j=U[G];"object"===k(j)&&(j=B(j)),F.push([G,j])})),F},dn=function(k,B){return B&&B.toString()===k.toString()},ln=function(k,B){k.disableButtons(),B.input?bn(k,B,"confirm"):mn(k,B,!0)},un=function(k,B){k.disableButtons(),B.returnInputValueOnDeny?bn(k,B,"deny"):vn(k,B,!1)},fn=function(k,B){k.disableButtons(),B(lt.cancel)},bn=function(k,B,U){var F=en(k,B);B.inputValidator?pn(k,B,F):k.getInput().checkValidity()?"deny"===U?vn(k,B,F):mn(k,B,F):(k.enableButtons(),k.showValidationMessage(B.validationMessage))},pn=function(k,B,U){k.disableInput(),Promise.resolve().then((function(){return ct(B.inputValidator(U,B.validationMessage))})).then((function(F){k.enableButtons(),k.enableInput(),F?k.showValidationMessage(F):mn(k,B,U)}))},vn=function(k,B,U){B.preDeny?Promise.resolve().then((function(){return ct(B.preDeny(U,B.validationMessage))})).then((function(B){!1===B?k.hideLoading():k.closePopup({isDenied:!0,value:void 0===B?U:B})})):k.closePopup({isDenied:!0,value:U})},gn=function(k,B){k.closePopup({isConfirmed:!0,value:B})},mn=function(k,B,U){B.showLoaderOnConfirm&&Si(),B.preConfirm?(k.resetValidationMessage(),Promise.resolve().then((function(){return ct(B.preConfirm(U,B.validationMessage))})).then((function(B){ce(Rt())||!1===B?k.hideLoading():gn(k,void 0===B?U:B)}))):gn(k,U)},yn=function(k,B,U,F){B.keydownTarget&&B.keydownHandlerAdded&&(B.keydownTarget.removeEventListener("keydown",B.keydownHandler,{capture:B.keydownListenerCapture}),B.keydownHandlerAdded=!1),U.toast||(B.keydownHandler=function(B){return Sn(k,B,F)},B.keydownTarget=U.keydownListenerCapture?window:wt(),B.keydownListenerCapture=U.keydownListenerCapture,B.keydownTarget.addEventListener("keydown",B.keydownHandler,{capture:B.keydownListenerCapture}),B.keydownHandlerAdded=!0)},_n=function(k,B,U){var F=$t();if(F.length)return(B+=U)===F.length?B=0:-1===B&&(B=F.length-1),F[B].focus();wt().focus()},En=["ArrowRight","ArrowDown","Right","Down"],wn=["ArrowLeft","ArrowUp","Left","Up"],Tn=["Escape","Esc"],Sn=function(k,B,U){var F=Be.innerParams.get(k);F.stopKeydownPropagation&&B.stopPropagation(),"Enter"===B.key?An(k,B,F):"Tab"===B.key?Cn(B,F):-1!==[].concat(En,wn).indexOf(B.key)?On(B.key):-1!==Tn.indexOf(B.key)&&In(B,F,U)},An=function(k,B,U){if(!B.isComposing&&B.target&&k.getInput()&&B.target.outerHTML===k.getInput().outerHTML){if(-1!==["textarea","file"].indexOf(U.input))return;yi(),B.preventDefault()}},Cn=function(k,B){for(var U=k.target,F=$t(),G=-1,j=0;j1&&void 0!==arguments[1]?arguments[1]:{};Yi(G({},B,k)),Ci.currentInstance&&Ci.currentInstance._destroy(),Ci.currentInstance=this;var U=kn(k,B);ks(U),Object.freeze(U),Ci.timeout&&(Ci.timeout.stop(),delete Ci.timeout),clearTimeout(Ci.restoreFocusTimeout);var F=Un(this);return gi(this,U),Be.innerParams.set(this,U),Bn(this,F,U)}var kn=function(k,B){var U=Us(k),F=G({},Fi.showClass,B.showClass,U.showClass,k.showClass),j=G({},Fi.hideClass,B.hideClass,U.hideClass,k.hideClass),$=G({},Fi,B,U,k);return $.showClass=F,$.hideClass=j,!1===k.animation&&($.showClass={popup:"swal2-noanimation",backdrop:"swal2-noanimation"},$.hideClass={}),$},Bn=function(k,B,U){return new Promise((function(F){var G=function(B){k.closePopup({isDismissed:!0,dismiss:B})};bs.swalPromiseResolve.set(k,F),B.confirmButton.onclick=function(){return ln(k,U)},B.denyButton.onclick=function(){return un(k,U)},B.cancelButton.onclick=function(){return fn(k,G)},B.closeButton.onclick=function(){return G(lt.close)},Dn(k,B,G),yn(k,Ci,U,G),U.toast&&(U.input||U.footer||U.showCloseButton)?ee(document.body,gt["toast-column"]):ie(document.body,gt["toast-column"]),tn(k,U),zs(U),Fn(Ci,U,G),Gn(B,U),setTimeout((function(){B.container.scrollTop=0}))}))},Un=function(k){var B={popup:wt(),container:yt(),content:Ct(),actions:kt(),confirmButton:Pt(),denyButton:Mt(),cancelButton:Lt(),loader:xt(),closeButton:Gt(),validationMessage:Rt(),progressSteps:Dt()};return Be.domCache.set(k,B),B},Fn=function(k,B,U){var F=Ft();re(F),B.timer&&(k.timeout=new Ms((function(){U("timer"),delete k.timeout}),B.timer),B.timerProgressBar&&(ae(F),setTimeout((function(){k.timeout&&k.timeout.running&&be(B.timer)}))))},Gn=function(k,B){if(!B.toast)return ot(B.allowEnterKey)?void(jn(k,B)||_n(B,-1,1)):$n()},jn=function(k,B){return B.focusDeny&&ce(k.denyButton)?(k.denyButton.focus(),!0):B.focusCancel&&ce(k.cancelButton)?(k.cancelButton.focus(),!0):!(!B.focusConfirm||!ce(k.confirmButton)||(k.confirmButton.focus(),0))},$n=function(){document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};function Hn(k){var B=wt(),U=Be.innerParams.get(this);if(!B||zt(B,U.hideClass.popup))return it("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");var F={};Object.keys(k).forEach((function(B){Xn.isUpdatableParameter(B)?F[B]=k[B]:it('Invalid parameter to update: "'.concat(B,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}));var j=G({},U,F);gi(this,j),Be.innerParams.set(this,j),Object.defineProperties(this,{params:{value:G({},this.params,k),writable:!1,enumerable:!0}})}function Vn(){var k=Be.domCache.get(this),B=Be.innerParams.get(this);B&&(k.popup&&Ci.swalCloseEventFinishedCallback&&(Ci.swalCloseEventFinishedCallback(),delete Ci.swalCloseEventFinishedCallback),Ci.deferDisposalTimer&&(clearTimeout(Ci.deferDisposalTimer),delete Ci.deferDisposalTimer),qn(B),Kn(this))}var Wn,qn=function(k){"function"==typeof k.didDestroy?k.didDestroy():"function"==typeof k.onDestroy&&k.onDestroy()},Kn=function(k){delete k.params,delete Ci.keydownHandler,delete Ci.keydownTarget,zn(Be),zn(bs)},zn=function(k){for(var B in k)k[B]=new WeakMap},Yn=Object.freeze({hideLoading:Xi,disableLoading:Xi,getInput:Zi,close:gs,closePopup:gs,closeModal:gs,closeToast:gs,enableButtons:As,disableButtons:Cs,enableInput:Os,disableInput:Is,showValidationMessage:Ds,resetValidationMessage:Rs,getProgressSteps:Ps,_main:Ln,update:Hn,_destroy:Vn}),Qn=function(){function k(){if(B(this,k),"undefined"!=typeof window){"undefined"==typeof Promise&&st("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)"),Wn=this;for(var U=arguments.length,F=new Array(U),G=0;G:first-child,.swal2-container.swal2-bottom-left>:first-child,.swal2-container.swal2-bottom-right>:first-child,.swal2-container.swal2-bottom-start>:first-child,.swal2-container.swal2-bottom>:first-child{margin-top:auto}.swal2-container.swal2-grow-fullscreen>.swal2-modal{display:flex!important;flex:1;align-self:stretch;justify-content:center}.swal2-container.swal2-grow-row>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-grow-column{flex:1;flex-direction:column}.swal2-container.swal2-grow-column.swal2-bottom,.swal2-container.swal2-grow-column.swal2-center,.swal2-container.swal2-grow-column.swal2-top{align-items:center}.swal2-container.swal2-grow-column.swal2-bottom-left,.swal2-container.swal2-grow-column.swal2-bottom-start,.swal2-container.swal2-grow-column.swal2-center-left,.swal2-container.swal2-grow-column.swal2-center-start,.swal2-container.swal2-grow-column.swal2-top-left,.swal2-container.swal2-grow-column.swal2-top-start{align-items:flex-start}.swal2-container.swal2-grow-column.swal2-bottom-end,.swal2-container.swal2-grow-column.swal2-bottom-right,.swal2-container.swal2-grow-column.swal2-center-end,.swal2-container.swal2-grow-column.swal2-center-right,.swal2-container.swal2-grow-column.swal2-top-end,.swal2-container.swal2-grow-column.swal2-top-right{align-items:flex-end}.swal2-container.swal2-grow-column>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-no-transition{transition:none!important}.swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen)>.swal2-modal{margin:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-container .swal2-modal{margin:0!important}}.swal2-popup{display:none;position:relative;box-sizing:border-box;flex-direction:column;justify-content:center;width:32em;max-width:100%;padding:1.25em;border:none;border-radius:5px;background:#fff;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-header{display:flex;flex-direction:column;align-items:center;padding:0 1.8em}.swal2-title{position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;margin:1.25em auto 0;padding:0 1.6em}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;box-shadow:none;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#2778c4;color:#fff;font-size:1.0625em}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#d14529;color:#fff;font-size:1.0625em}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#757575;color:#fff;font-size:1.0625em}.swal2-styled:focus{outline:0;box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1.25em 0 0;padding:1em 0 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:1.25em auto}.swal2-close{position:absolute;z-index:2;top:0;right:0;align-items:center;justify-content:center;width:1.2em;height:1.2em;padding:0;overflow:hidden;transition:color .1s ease-out;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-content{z-index:1;justify-content:center;margin:0;padding:0 1.6em;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em auto}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:100%;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em auto;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-input[type=number]{max-width:10em}.swal2-file{background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto}.swal2-validation-message{display:none;align-items:center;justify-content:center;margin:0 -2.7em;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:0 0 1.25em;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{right:auto;left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@supports (-ms-accelerator:true){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{top:auto;right:auto;bottom:auto;left:auto;max-width:calc(100% - .625em * 2);background-color:transparent!important}body.swal2-no-backdrop .swal2-container>.swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}body.swal2-no-backdrop .swal2-container.swal2-top{top:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-top-left,body.swal2-no-backdrop .swal2-container.swal2-top-start{top:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-top-end,body.swal2-no-backdrop .swal2-container.swal2-top-right{top:0;right:0}body.swal2-no-backdrop .swal2-container.swal2-center{top:50%;left:50%;transform:translate(-50%,-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-left,body.swal2-no-backdrop .swal2-container.swal2-center-start{top:50%;left:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-end,body.swal2-no-backdrop .swal2-container.swal2-center-right{top:50%;right:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom{bottom:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom-left,body.swal2-no-backdrop .swal2-container.swal2-bottom-start{bottom:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-bottom-end,body.swal2-no-backdrop .swal2-container.swal2-bottom-right{right:0;bottom:0}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}body.swal2-toast-column .swal2-toast{flex-direction:column;align-items:stretch}body.swal2-toast-column .swal2-toast .swal2-actions{flex:1;align-self:stretch;height:2.2em;margin-top:.3125em}body.swal2-toast-column .swal2-toast .swal2-loading{justify-content:center}body.swal2-toast-column .swal2-toast .swal2-input{height:2em;margin:.3125em auto;font-size:1em}body.swal2-toast-column .swal2-toast .swal2-validation-message{font-size:1em}')},62248:(k,B,U)=>{"use strict";U.d(B,{l6:()=>F});var F,G,j=U(92661);!function(k){k.Rescue="rescue",k.Evolution="evolution",k.LostPet="lostPetCost",k.Merge="merge"}(F||(F={})),function(k){k.Rescue="rescue",k.Evolution="evolution",k.LostPet="lostPetCost"}(G||(G={}));const $=j.g1P(j.k5n(G),j.aig().min(0)),H=j.g1P(j.YjP(),$),V=j.g1P(j.YjP(),H),W=j.g1P(j.YjP(),V),q=j.Ikc({level:j.YOg(j.aig().int().min(1))});j.Ikc({name:j.YjP(),variants:j.g1P(j.YjP(),W),levelCapsEvolutionVariant:j.g1P(j.YjP(),q)})},95359:(k,B,U)=>{"use strict";U.d(B,{IE:()=>G});var F,G,j=U(92661);!function(k){k.StatsCommon="statsCom",k.StatsUncommon="statsUnc",k.StatsRare="statsRar",k.StatsHeroic="statsHer",k.StatsLegendary="statsLeg",k.Default="default",k.Wizard="wizard",k.PuppetMaster="puppetMaster",k.Boss="boss",k.Miniboss="miniboss",k.IllusionBoss="illusionBoss",k.DragonBoss="dragonBoss",k.HoodedWizard="hoodedWizard",k.Pippet="pippet"}(F||(F={})),function(k){k.Power="power",k.Defence="defence",k.Speed="speed",k.Hp="hp"}(G||(G={}));j.g1P(j.k5n(F),j.YOg(j.Whr()))},76572:(k,B,U)=>{"use strict";U.d(B,{_:()=>F});class F{constructor(k=null){this._message=null,null!==k&&this.setErrorMessage(k)}setErrorMessage(k){this._message=k}getErrorMessage(){return this._message}}},30334:(k,B,U)=>{"use strict";U.d(B,{z:()=>F});const F=5},113:(k,B,U)=>{"use strict";var F;U.d(B,{O:()=>F}),function(k){k.Firefly="forest",k.Shiverchill="shiverchill",k.Skywatch="skywatch",k.Bonfire="bonfire",k.Shipwreck="shipwreck",k.TowerTown="towertown"}(F||(F={}))},26077:(k,B,U)=>{"use strict";U.d(B,{$N:()=>G,gW:()=>$,mX:()=>j});var F=U(17446);const G={[F.E.Common]:"common",[F.E.Uncommon]:"uncommon",[F.E.Rare]:"rare",[F.E.Heroic]:"heroic",[F.E.Legendary]:"legendary"},j={common:F.E.Common,uncommon:F.E.Uncommon,rare:F.E.Rare,heroic:F.E.Heroic,legendary:F.E.Legendary},$={Shiny:"_shiny"}},88022:(k,B,U)=>{"use strict";var F;U.d(B,{_:()=>F}),function(k){k.Academy_tower_cr_stools_json="60831677-d459-4006-b97b-321a443e09e0",k.Academy_tower_progress_ui_json="b315cf38-adc5-4ea0-bbbd-99f07fcc55d6",k.Academy_towers_name_banner_json="10311b80-4c09-4b54-b083-716e468c29a7",k.Boss_aspen_extras_json="1057de44-bd55-402c-9b9b-3d267c2bb1df",k.Boss_bonfire_json="6d821273-7cd7-4606-9930-4bcd492003a3",k.Boss_gerald_json="c38cef60-fc17-4628-85f4-f1ed7873d9ba",k.Boss_gerald_shadow_json="d0b270a9-222d-4ac9-b96f-1227b94e1b9d",k.Boss_skywatch_json="923c301b-5f07-4471-978d-92696c52c468",k.Boss_titan_barrier_break_json="9b4f9957-c4c4-412f-995d-fffcd5d74c3a",k.Boss_titan_barrier_json="74921264-90f3-4c07-8930-4c8d720db79d",k.Boss_titan_json="c5025568-47f7-4303-8be4-0544b422ee64",k.Boss_titan_spark_json="b2b8887a-5bfd-42a3-be4e-3bd1cd85b1c1",k.Daily_login_calendar_json="f1652f03-1fde-46d1-9c82-613d85d2c2c6",k.Duels_matchmaking_json="d1bae84f-a96a-4222-881b-70c1e0883620",k.Event_daily_login_bonus_json="bd03a84a-cc64-4c9d-a58b-92c1f2ac814f",k.Event_moonlightfest_json="a34cf420-9dcb-491b-925d-c1cc316c7fbf",k.Event_october_json="b083cb98-ade8-47e7-9bf2-3fdb4387478c",k.Event_pumpkinfest_json="8881b8c9-9f10-4a59-a091-4ac2a46ac45f",k.Event_starlight_festival_json="3aba1b12-409e-408f-820b-a1885cd7237d",k.Event_summerfest_json="800bd696-72ce-4b35-b35e-aad290b78e58",k.Event_winterfest_json="dbe9b147-c96e-4a9f-bad2-4ec1cd7a401d",k.Floatling_fling_json="bbffa1b6-79e3-4b8a-ace2-7796565cf015",k.Font_battle_json="9b54d364-ec74-4a2e-9243-2b671483d4d6",k.Font_black_json="8a50a2dc-f9fc-4b6e-8163-af4a680d838c",k.Font_button_json="c494006d-6fa2-4553-a7d6-8fe6614f304a",k.Font_general_json="05c2c8d0-b6b2-4e4a-ae81-c217ad7d94b8",k.Font_microtransactions_json="6598b520-06b1-4105-bc0a-4de6a3466dd6",k.Font_shadow_json="96fc3ba0-27ef-4c7c-8ad4-8a84a3b9b8de",k.Font_ui_json="7a182121-0b1a-405c-9817-d6b99e054f5b",k.Game_dancedance_json="b2c4d03f-f1ad-49b6-9820-a81a96eaf61d",k.Game_dinodig_json="33cb1fa0-9c1c-4993-a05f-5b6d9c5467ff",k.General_attacks_json="5f06769f-7269-4807-ba66-be1724860507",k.General_battle_json="81521922-a876-4f7f-940a-ce9644c08f98",k.General_chat_hud_json="d45aa48d-e364-4ba6-9a7e-750d1c844e89",k.General_core_2_json="59c467aa-1adc-4bbf-b606-2428f41951a1",k.General_core_json="37fd2547-8939-4c13-8d91-a91f6ef2b82b",k.General_icons_hud_json="45f1d6ab-c455-4b28-ad0d-ef053fa9d2d4",k.General_icons_json="c4d59570-c1cb-4065-a35d-7135af6fa51a",k.General_login_json="b495cec9-b305-405c-bbf7-ec3643cdece0",k.General_map_json="a966f131-7d30-4c69-9a0a-b380775f79e9",k.General_pets_json="9a91d86e-34ec-4cd6-98b9-195c4716bea0",k.Icon_topic_pixel_json="3f38b8e3-ae48-4db2-a101-495c7ae9154e",k.Icons_house_buying_json="ae662eab-b93c-48d4-98e5-ebb534bb2288",k.Icons_house_json="970feac8-062e-4ed4-87ba-f793dd3323cc",k.Icons_menu_json="ef63444d-f511-4327-b9de-257197813f80",k.Npc_face_arena_master_json="692b081b-198e-4f2c-afc1-60b603570baf",k.Npc_face_aspen_json="1de12143-69cc-4942-a0d4-ca5c153ca68f",k.Npc_face_astraldragon_json="333cdeff-3307-4aca-9c79-a968b5070953",k.Npc_face_athena_json="41d37a49-933f-4bd1-93e2-d82005e14d99",k.Npc_face_bargo_bunny_json="643f0ce1-969a-42d1-8c30-82715a7fb308",k.Npc_face_benni_json="2f8caf7a-0a31-43ef-9944-e11d4acf82e1",k.Npc_face_bok_json="00bc919e-62cf-413d-bbbc-1b2cc5724468",k.Npc_face_boombox_json="598c699e-e706-4ec1-b352-cf591a6da7f1",k.Npc_face_broccolina_json="332e3dad-e456-4dbf-a558-ae249e53ccbe",k.Npc_face_cebollini_json="3d77fb75-e7ca-4411-81cf-dbfeeebf126e",k.Npc_face_clankboot_json="ddf6db07-2615-4905-8f8e-91c47704a79d",k.Npc_face_cloakedwizard_json="78887024-6a01-4ef6-af87-233e0d0392e9",k.Npc_face_cumulo_json="dcd879ec-b168-4478-a953-9e3a47b62614",k.Npc_face_don_zorro_json="211b4ec2-8f41-42f6-a66b-56b5b7deea28",k.Npc_face_eugene_json="b6fa766e-ec12-439e-af3c-239f26561ab8",k.Npc_face_eve_json="36f05e7f-b2f8-4f4b-9b09-7fd961a91fc7",k.Npc_face_firedragon_json="bcdd337d-4483-47a4-a931-06f36c251fc8",k.Npc_face_fishthing_json="900782b3-43f3-49ff-9fe5-71f8f2b32962",k.Npc_face_floatling_merchant_json="e8cc9a63-954e-4264-b021-23812e071ba9",k.Npc_face_flora_json="58e3fb0a-04ff-4c24-8e3d-b64834b1b9df",k.Npc_face_florian_json="c2f2096b-54f4-40eb-a9fe-ac2c4b1b2d33",k.Npc_face_gale_json="4f5aedc5-2e46-4c24-8bc0-4fd20b187fe8",k.Npc_face_generic_student_raster_json="38108157-8886-4909-96cf-18c9bbdb129b",k.Npc_face_gerald_raster_json="0786b5ed-ed86-4624-a045-291b02a486fd",k.Npc_face_guard_json="6afae7a7-5683-4711-8b8d-ef8982df0587",k.Npc_face_harriet_json="b59b2795-6e6b-4c5e-b5f2-12e772d7e0a1",k.Npc_face_harvey_json="ad0d5bdc-e76c-48f3-9d85-f1e1f81cccdf",k.Npc_face_hollowjack_json="76b71b3f-b4a7-413f-80a2-76fdeb808b30",k.Npc_face_howard_cornelius_json="98c17c79-2d43-4b59-b9ed-b6784b89d633",k.Npc_face_ice_tower_warden_json="7dc19742-a5d1-4856-a552-52c488ee716e",k.Npc_face_icedragon_json="c50e6c71-66b1-4b8f-a13b-babf2ac1cca8",k.Npc_face_jim_json="08d207df-490e-48df-88e2-1b8fab31f33f",k.Npc_face_julia_ghoulia_json="7b1b4ee2-e04f-4c5c-8d07-74c9b61ee1f9",k.Npc_face_kandi_json="76211f0c-4685-4a40-ac4d-5c72a0467b1c",k.Npc_face_koi_json="19699732-0d39-45ab-ba17-cca14a251f99",k.Npc_face_mamastar_json="b7d2eb7f-ded2-4dc3-b71b-55deed490352",k.Npc_face_merchant_json="2a787301-0520-4579-adb6-ff99d81f98f3",k.Npc_face_mira_json="e50a94db-152e-4fa2-bcf5-74f5e8a88829",k.Npc_face_mist_json="bed0a62a-ec52-402c-9e5f-25ef58a6de82",k.Npc_face_mizu_json="386add32-c825-4a96-9c85-2594da830a38",k.Npc_face_morris_json="0c644e4d-2bab-4754-a803-6405ddab8d8e",k.Npc_face_mozza_ella_json="a2601500-ede3-4e05-b5c6-6f4342c3cec1",k.Npc_face_mugs_json="7e467d11-02b3-4368-bb8b-6844f3b584a9",k.Npc_face_noot_json="6c29cbd0-645e-4a11-b0b6-935cb78a4020",k.Npc_face_physicaldragon_json="bdbf3969-125d-49f7-8e7f-369058f26f84",k.Npc_face_pippet_json="4989b1a1-4519-41fb-b4eb-c44ab799ce11",k.Npc_face_poppet_json="fff0d68f-77ad-4a99-b2ef-c242b3e68252",k.Npc_face_potion_json="37fb9995-2cc7-43f6-87db-db6b317d6fcf",k.Npc_face_puppetmaster_hourglass_json="94c3d409-7138-480f-a3b8-0316c959fdd1",k.Npc_face_puppetmaster_json="9b3c6d3a-8814-49ae-b4a1-8343097ad6a8",k.Npc_face_puppetmaster_raster_json="f55db1eb-8dec-406b-934b-4c67d023bd39",k.Npc_face_puppetmaster_reborn_json="c05255ce-4e33-4cf0-b76d-1adf6703c374",k.Npc_face_scoog_json="d7a1db06-c9bc-43d5-beb0-7e445f9f7c2a",k.Npc_face_selena_json="7221890b-7284-4f57-b324-2ebde1aaf75e",k.Npc_face_shadowdragon_json="3c71f275-bf08-42db-b74a-7e9a65c3f1e3",k.Npc_face_sir_vey_json="c9fb711e-d687-469f-b8af-5376627e6cba",k.Npc_face_slime_guard_hank_json="372f71c0-ebc9-4899-8bec-e23b4133fddd",k.Npc_face_slime_guard_json="a5a4d6ae-684e-4c4d-8f29-d0a8ebd96d5c",k.Npc_face_slime_guard_mike_json="64482cd2-ca5b-42ce-b88d-f211a94d0028",k.Npc_face_slime_queen_json="613ddde7-b5ad-4c11-a2e0-7a5f7bbb1594",k.Npc_face_slime_worker_json="8caee26c-32fc-45e5-9cf3-4b4adeacc4e4",k.Npc_face_slurpy_json="48beef1f-196d-4577-924a-4bf1cf5fac41",k.Npc_face_stache_json="b8da0f5b-e078-4bcd-acb7-ecdd37551ff8",k.Npc_face_starlightboss_json="8730d2e1-f2b8-478f-a1f3-3feec362d201",k.Npc_face_stubborn_shadow_json="b7b920dd-464d-477d-8da1-b894cd774ea3",k.Npc_face_swoopy_json="4ed260ec-b7cf-4b8f-9a82-90f0c5f4399c",k.Npc_face_toy_json="d2dbd340-5919-44d2-b3e3-e62bb1729774",k.Npc_face_ulla_json="24d32e95-2dc8-40f2-9240-1fde8623da9a",k.Npc_face_verna_json="7b7e4fc8-387b-4f24-8dfa-3841fd07f8f7",k.Npc_face_windsail_json="52464276-f52d-474d-9e70-87fd8903a59c",k.Npc_face_winston_json="339cbbf7-9e98-4d30-83de-e5721e7e7edc",k.Npc_face_wizard_json="e5cbfefc-aa3e-4aaa-b018-77e63fc7c888",k.Npc_face_wyrms_json="a7f444ac-f419-490e-80c9-bcc5554e18f0",k.Npc_sprite_benni_json="f4507fe5-199c-4607-b9e1-ba310b6673b9",k.Npc_sprite_bok_json="79b14f32-c35c-46c7-8d0a-c84153387fd0",k.Npc_sprite_boombox_json="74de39e1-8bf8-4310-a497-bb2eff3feb33",k.Npc_sprite_broccolina_json="1e9da7ca-42a2-47ed-861a-5862c58591b6",k.Npc_sprite_cebollini_json="b02826c8-28b5-4493-8552-5de3f3ed906f",k.Npc_sprite_clankboot_json="0b12b3a2-543b-4918-8f09-00aef980bb2d",k.Npc_sprite_cumulo_json="834cec01-cc74-4014-9b8a-9fc0b74915f2",k.Npc_sprite_eugene_json="ef57d234-f4eb-458d-9b1a-a46d32715105",k.Npc_sprite_eve_json="760038bd-3483-4655-bf03-666e97612bb3",k.Npc_sprite_fishthing_json="558eec74-c9bc-48f4-9fd1-fabd3b5fef0e",k.Npc_sprite_flora_json="67b23f8a-6d1a-4314-8af4-515f3c3c283d",k.Npc_sprite_gnome_json="54c4cf3f-2670-4d4b-b178-64640803c9a2",k.Npc_sprite_guard_json="a09ba130-7636-4cfc-8323-b3e09cc9bd6a",k.Npc_sprite_howard_cornelius_json="c8014dd7-bda9-41f9-aab7-fbb76653db5b",k.Npc_sprite_jim_json="1779a78b-bdd6-4207-a991-59ac86801975",k.Npc_sprite_julia_ghoulia_json="f639e264-5017-4b1d-82de-e1832f1f4d8d",k.Npc_sprite_mama_star_json="ab2459ca-2812-4fa0-8085-96f507da7220",k.Npc_sprite_merchant_json="4e768d76-3013-4e30-a853-90b7b1672dc4",k.Npc_sprite_mira_json="3889e9b9-ce45-4c10-a293-5e0d09b5f10a",k.Npc_sprite_morris_json="e84e7829-e176-4864-9bee-628489934f95",k.Npc_sprite_mozza_ella_json="2e837bcc-e92c-4e55-936f-3badcc16f386",k.Npc_sprite_mugs_json="d8c2d16f-974e-4460-a70a-2549175bad28",k.Npc_sprite_noot_json="5d5cf855-33d5-40a1-92de-9c1020879849",k.Npc_sprite_pippet_json="3fa76099-5b94-4c16-88e5-4d176e56b621",k.Npc_sprite_potion_json="6fc659ba-ee43-4f51-a53a-dafa7ca5a7c6",k.Npc_sprite_scoog_json="8e20f328-047c-4594-96b6-1619836519c7",k.Npc_sprite_slime_guard_json="e7fa232d-e4c7-48b5-882e-5b6e914fdc9b",k.Npc_sprite_slime_queen_json="28c25359-76da-4096-8578-1c08080ddace",k.Npc_sprite_slime_worker_json="11725d43-791d-4d4b-835d-4dec1b4b1883",k.Npc_sprite_slurpy_json="79f61a3b-04d0-43e1-8330-896ce5d1e304",k.Npc_sprite_stache_json="c871c5a5-2248-4d00-af22-937f79b13a25",k.Npc_sprite_swoopy_json="0d52af66-3868-4c43-84b8-403b9a3e455f",k.Npc_sprite_toy_json="9a5c5acb-2ad0-4faf-b276-42ba25b0db91",k.Npc_sprite_windsail_json="54d58b21-c65c-4395-a84a-61a55a3fde5b",k.Npc_sprite_wizard_json="a6c7e4a2-b306-437a-94ac-0261fe2224b5",k.Particles_json="59f3e3cd-c27b-4a60-8d33-2fd8a7542fce",k.Particles_mount_11_json="bed01fa6-a177-45a2-89b8-b92d8b3030d3",k.Particles_mount_5_json="c108cd09-3f02-4f28-9e2d-cd927425128c",k.Particles_mount_6_json="4d002d20-55be-4fee-bf0e-8ea9e5bc9fdf",k.Particles_mount_8_json="ea7dc11f-eb15-4dea-8367-5c938c9fe301",k.Particles_mount_9_json="19ea189a-6eab-48b8-8a16-5541b31502d2",k.Pet_merge_ftue_slides_json="61b48f36-9d17-42ad-8e57-e54d2fd6a367",k.Pet_xp_boost_json="919e8d1e-7f64-47d2-bb13-3990076ee2c4",k.Popup_after_hours_json="e77002e1-61df-4228-bee3-a611b71c1c9a",k.Popup_gohome_json="fb6e5eb3-8bea-4e80-bf51-64f2da4d0df4",k.Popup_member2_json="09807618-2328-4831-9080-47055a663863",k.Popup_member_json="8d4e0617-e51e-45da-9531-220fa6759a90",k.Popup_member_modular_json="f85e62f1-05d4-4bb6-8a9c-ce164a4fe619",k.Popup_member_success_json="e4fa0728-1053-42c3-8333-b297414be3aa",k.Popup_parent_link_json="abda2313-18a2-45d3-a295-71c7e790f071",k.Popup_star_jar_json="1b44ff51-1d60-4e70-89d3-aa040ac0d764",k.Popup_travel_grayscale_json="d2882548-5869-4324-86b9-10b846ab184d",k.Popup_travel_json="be7f13f1-c44c-45a1-b794-1f035682a107",k.Popup_ui_roulette_json="89d4783e-4891-45cc-8354-d1a676351714",k.Random_wizards_json="1c455c4a-22b2-4151-9dbb-299031a7a429",k.Rift_run_shadow_dragon_battle_map_1_json="37c6b810-1de6-4591-b848-b7c65b653780",k.Rift_run_shadow_dragon_battle_map_2_json="e2941089-be34-4491-af3d-f77b4a66c157",k.Rift_run_shadow_dragon_battle_map_3_json="22bdd379-3fb1-412f-ae9d-4d48394d3ca5",k.Scene_intro_json="558f1248-c5f2-40cc-80b5-1a515323ef5a",k.Shiverchill_snow_particle_json="0c9f3c09-dacb-45a1-beec-3af66822a0d7",k.Skin_underwater_json="de739f08-7f8d-4d88-90e0-c4752bd87220",k.State_challenge_background_json="dfad7f8b-4604-4c92-98db-bfc8b7c49c64",k.State_challenges_json="ff065970-102d-4fcf-bd86-fed58684b9cc",k.Store_cloud_json="8cde933c-4610-4e1d-bed2-ac0a6695c644",k.Store_dorm_json="4cb89769-bf79-43f2-8e3f-e2a4cc960484",k.Store_forest_json="a7c8041c-ec4c-4c03-8c70-85b411e7254b",k.Store_mountain_json="ba9a7067-0457-45b7-8a93-f19cc25b8ff7",k.Store_pirate_json="a6000028-6971-41eb-87df-28eb77e7a0d6",k.Store_stylist_json="146f5e4e-aafe-4897-b25a-ba1504f54753",k.Store_tech_json="c7483a53-4163-49c0-b9f8-976792d01079",k.Store_volcano_json="dfb7e342-8b34-4f14-a3c5-40960bef10f3",k.Tabs_left_json="09ce7cb9-fe18-46cc-a9c7-80500957cdc9",k.Tiled_sprites_json="0ebdf8e9-a833-4add-b5f3-580f3dafae54",k.Tileset_core_json="b910aea8-b655-4883-b512-271b0b958791",k.Towertown_frames_store_json="e8afc045-6894-410f-bd8a-b013df34b96e",k.Towertown_interiors_store_json="21e7389b-6ca0-4ac4-ac39-bf85089f71d5",k.Towertown_interiors_ui_json="25b4432e-6f9d-4850-9f73-52e24f57359a",k.Ui_after_school_json="9e9c9ea2-6f3e-4dfb-9e5e-3ee5a7610842",k.Ui_bam_json="0d007a9c-f08c-4029-a924-60f64d317ebc",k.Ui_battle_arena_json="43e29f53-cad1-47df-b9ab-6da5a1e6c00b",k.Ui_battle_pass_json="7e9e32a3-5c8c-4a85-9901-528d8ebe9753",k.Ui_battle_pass_ultimate_json="478cd1f5-ee15-4b1b-b5ba-34464dd73601",k.Ui_battle_revamp_json="7f153f7f-8470-4c8c-bfed-9bbf38fd4740",k.Ui_battle_revamp_legacy_json="2decd275-885b-43c7-8f0a-2f1dfa06a9d5",k.Ui_breadcrumbs_json="4835c50f-fcda-4de7-91f0-72ddecb6a8e4",k.Ui_buttons_json="22cb767c-d4b4-4a19-9011-cc7f5261356b",k.Ui_card_json="109e12f6-3f67-42ce-8cb5-3e50ae75b5ef",k.Ui_cc_adventure_map_json="a88dec95-785e-422d-a3f2-7a41dc517053",k.Ui_cc_boss_icons_json="1d2f1f0d-d4e8-492c-8509-d7e78235dbb2",k.Ui_cc_dungeon_complete_json="5a3a2697-40d6-426a-a8e8-2384923b2e17",k.Ui_charged_levels_json="51b25aab-bd7e-4377-bcb1-3553cbe978e9",k.Ui_class_code_json="c398bb25-88fe-401a-bb89-1a008447a239",k.Ui_common_neutral_json="1be98e6b-fa30-49ed-89b0-2845ef01c75c",k.Ui_contextual_offers_json="913df195-976e-49ec-9465-2ebc4ebdfd7d",k.Ui_coop_json="1c81065d-abd2-4f35-941d-8cd7b023da10",k.Ui_daily_question_json="2e8adbbd-52d0-43e7-a12e-8ca3e2fb70bb",k.Ui_dialogues_json="826a14ed-4ee6-4dd6-9244-5ae972d7cdd7",k.Ui_difficulty_selector_json="ccf4a666-1643-4029-8ec1-fad5e23894c3",k.Ui_dual_currency_backing_json="6ea5b40c-b520-4396-9375-57944d8d8836",k.Ui_duels_loading_screen_json="a4a5c1ac-736d-455d-93c7-e5d185a88404",k.Ui_duels_matchmaking_leagues_json="b56de104-0245-433c-963c-1f32b52072fe",k.Ui_duels_stadium_rooms_json="4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",k.Ui_education_badges_json="e8564da8-4cf9-4350-b7e4-a6799a604c6d",k.Ui_eg_bountyrun_json="6b2722ea-1ebf-4579-9cf5-db9734394f89",k.Ui_evolution_screen_json="7a26fabf-9dc4-495b-9b72-b8eb697395a2",k.Ui_featured_pet_json="298ffe1f-af76-4410-b66b-26f684f0293f",k.Ui_forest_progress_json="77e12afe-3f39-4102-8a3a-65659947cc66",k.Ui_ftue_player_goals_json="1acf7d49-330c-4f33-bee6-b3d3971f5e75",k.Ui_guide_hands_json="b1df28f3-8164-4f95-a26e-4195e89e6cc6",k.Ui_hard_currency_json="c1f34747-4e84-43c4-8f37-4d81eed275ed",k.Ui_home_school_server_json="fd77fe10-306d-4ecf-aefd-b78efd752d49",k.Ui_icons_json="ae62c4d3-ba14-4de0-8054-03581ca389b8",k.Ui_library_json="8d28ece7-51e5-4bb2-b57f-19d77ea9ba14",k.Ui_login_credentials_json="689bcf78-3c74-49ab-9e18-159fd83ec460",k.Ui_loot_dash_json="87ffbede-e592-47e6-b837-99a1524d71f6",k.Ui_loot_dash_lobby_json="44c81f16-42ae-488e-b61b-e8844bcc5397",k.Ui_magicoin_upsell_json="96913c15-3ee6-4f41-a28a-7d1f16f63953",k.Ui_member_jar_json="becee9ee-8884-4572-878d-9134b4bc63fc",k.Ui_member_tiers_json="96f934ce-db64-4159-9c2f-d93f679ed4ff",k.Ui_moonlight_fest_json="022ddcad-5938-4f72-9755-b3739e9513b0",k.Ui_panels_json="e770ddd9-eb12-4d7e-9774-7657d342f1f4",k.Ui_parent_goal_json="b9402d51-9f2c-41bf-b582-a8c67ba7b073",k.Ui_pet_capture_json="4f1022a8-0406-4adf-9e5a-0684b4aa8efb",k.Ui_pet_gear_json="444a50b3-d294-47f9-8f51-65fece4b4359",k.Ui_pet_menu_json="389ef624-a601-45e2-ae6c-030305e40354",k.Ui_pet_merge_json="b30f9cb9-2b8d-4c36-b765-821e0c06f22b",k.Ui_pet_rarity_indicator_json="229edeef-fc22-44e8-b34c-558441e4fa38",k.Ui_petslots_json="61345a9c-2788-4667-a6b3-6eebbb4bde0d",k.Ui_postbattle_json="8d93f015-2812-48c3-a412-1a75ed4c88ec",k.Ui_prebattle_json="eca8ff43-14c2-4c24-bf22-416f394d46bd",k.Ui_pumpkinfest_json="87c35c43-465f-4a96-9676-ba8275a2ad87",k.Ui_pvp_seasons_json="5797ca36-83e6-4f76-a6cc-0e1ed9f98a82",k.Ui_raster_bars_json="b5ec5318-c940-4a25-b22f-36d97c912f2a",k.Ui_raster_epicsv2_hero_poses_json="4c2e0ca5-a224-426e-8a68-6b4dd47994db",k.Ui_raster_epicsv2_json="05eedff0-8230-4705-b857-e310c2e69556",k.Ui_raster_icons_json="c6753144-cb9b-48a3-94ba-525459416b6a",k.Ui_raster_panels_json="ee3b9351-524b-40de-a452-c34f060df0e0",k.Ui_raster_pet_card_json="82f66941-d492-42d1-adc4-5131c802d27a",k.Ui_raster_pet_zone_menu_json="ba0c40a3-5622-4006-8eb5-66eed4142357",k.Ui_raster_pets_menu_json="1ffde150-1833-416f-82d2-32a2b4444a6c",k.Ui_registration_json="3619736d-741f-4342-91b5-f3d276039020",k.Ui_replay_campaign_json="1188c794-4cfd-435e-9c4f-81da56601c60",k.Ui_revamp_pet_info_json="d60e23d5-a249-4a68-a0ea-f70bc9533d99",k.Ui_rifts_json="e0aec679-5627-49e6-bb0c-59a4e504ba51",k.Ui_segmented_offer_json="a60c3a09-98c3-4125-9f3a-7cba66121953",k.Ui_seven_level_membership_json="85480cf4-5370-4a58-97b5-8b237163165f",k.Ui_shared_json="2974fbc2-b097-42cc-ace4-19cd3a63ff7e",k.Ui_shared_revamp_json="9e213e98-76ad-4295-9699-d5d38685cbd5",k.Ui_shipwreck_progress_json="faa4ac5e-9a0a-4b0f-aaa6-00c94c0d1f1d",k.Ui_shiverchill_progress_json="13887a36-e295-48d8-94f3-5f5d3015787a",k.Ui_social_feed_json="5ea30e07-e362-4ac2-a0e0-0a9e3dbdfed9",k.Ui_social_menu_json="f28ac625-fa22-4c32-a6dd-9afb5cca5895",k.Ui_spell_effect_icons_json="a25b6cda-c1a2-4734-b7bd-15c3b49402d9",k.Ui_springfest_json="15eded9b-03d5-4e70-bc3d-7c1360654cb6",k.Ui_starlight_fest_json="f99c7956-c3bc-411d-a480-e98eba73a0f7",k.Ui_store_json="93a21019-836a-4433-b6ae-fdc7515725b7",k.Ui_summerfest_json="2b362a5e-4928-4547-bf01-f4c3e2753b18",k.Ui_timer_json="ae3788cd-2574-4eab-bccd-7284018ac7fa",k.Ui_titan_json="8a31f137-bb95-4e66-9b12-308458e3d6d0",k.Ui_towertown_flags_json="cc9fe7a1-c344-46fe-a86d-518d9d6c8622",k.Ui_towertown_json="b50091d7-fcd3-48e4-b051-61d8cd11e140",k.Ui_towertown_misc_json="99c68201-9a18-4f93-9eed-7d87cf2107b1",k.Ui_towertown_samples_json="64095efd-5cf4-48ec-81a0-806f58fe0285",k.Ui_unified_store_json="741fd381-0be6-4ce6-b12e-e46648b69d93",k.Ui_weekly_challenge_json="48df0747-c750-417d-a892-ba2f3e145757",k.Ui_widget_icon_json="48f64ca9-a763-45ba-a31c-a73dca7d66a6",k.Ui_widget_modal_json="c431f466-ad95-46a3-ad55-70200dbbfaa0",k.Ui_winterfest_json="5707ba74-0199-4cf2-98d9-fccf6cde1323",k.Ui_wizard_bank_json="ef304ad8-293c-4537-95ab-bac9747d2f55",k.Ui_wizard_costumes_json="570d4d78-5031-4a11-82c2-fbf60ea20373",k.Ui_world_zone_locked_unlocked_json="474793c4-15b4-4fad-8576-6dc4a373148a",k.Zone_arena_json="7ef7273d-b157-465c-a980-c38f5680c3b7",k.Zone_bonfire_json="118a10bd-96bc-4aa9-985e-34ee681482be",k.Zone_cloud_json="e644ec28-68e4-471d-a86b-0384c4f71f89",k.Zone_dino_json="a9a42dce-f8e2-4ddf-887f-28fb5ffdd1c9",k.Zone_elemental_guardian_json="293b3825-8f12-407a-bc06-b906e15e1d01",k.Zone_forest_json="75bdbbe1-aa77-4a93-9fef-b437f1ca70c2",k.Zone_lamplight_json="2715318f-943d-46a1-a600-78b6f3bc762a",k.Zone_museum_json="36532f64-1e40-4ecd-a575-7f6733a0d59f",k.Zone_pirate_json="3e356110-1011-4184-b6ea-1e137a640f67",k.Zone_plains_json="6177d87f-72e9-4033-aaf4-4e6fc5be96ee",k.Zone_shipwreck_json="84729031-a641-4fb8-adc5-ef4b67746061",k.Zone_shiverchill_json="d4ed607c-ed6e-4304-96b3-50445b0d9e69",k.Zone_skywatch_json="9b201c34-c88b-45a4-83c0-b7371c45538d",k.Zone_tech_json="62a82805-2446-40e9-959e-e769a8f65942",k.Zone_tower_json="de3489ec-caff-40bc-9fa1-3fbe38313f5c",k.Zone_towerbase_json="8c2da818-0326-433a-89f9-358d5c3e3342",k.Zone_volcano_json="e69bf988-1083-43a0-8736-10410299e0ef"}(F||(F={}))},19631:(k,B,U)=>{"use strict";var F;U.d(B,{B:()=>F}),function(k){k.Attack="a1c943d4-650b-48e3-a72b-6af3fbf657db",k.Battle="84eda37b-8c5a-455f-b5cd-08745edf1fa0",k.Build="d2cfc25b-bc7e-4e7e-9c6e-8d3249f78422",k.Check="da89546d-68dd-48bf-827d-848a078614a6",k.Chevron_down="a0ba6651-4fe9-4d48-889a-2a46eda6bda0",k.Chevron_up="546c237d-8aa9-417d-83b1-bab6b5e7af1e",k.Circle_checkmark="77febc0d-9d23-4cad-83f3-3debb82386d0",k.Circle_warning="4c3663fa-1e1a-4ed3-ae87-29d7767a873e",k.Clean="c7391fb8-3a30-485a-99ce-316fbecce06a",k.Close="08405a8f-4f87-465e-b694-f9b71b598885",k.Delete="3b551a31-d4bc-4215-b00d-00e26a91f515",k.Down="45a7df0f-869f-4672-8abe-6180103cbd71",k.Edit="5c7b9aa4-3413-4233-9a0e-21d404d07d76",k.Emerald_medium_active="19e554ae-1e0c-4ae3-9656-07f87ca73d14",k.Emerald_medium_default="38096a59-f92d-4cfe-919b-66a61fc26e88",k.Emerald_medium_hover="4c807809-4796-4bfe-b7dd-a89a59fc8e51",k.Expand="0480e4de-4331-47ef-a708-7366081bbc25",k.Gift="03ec12b6-9c85-4a76-ad79-a5f0aca5cf63",k.Info="b401a7d3-a8f0-42e9-b9fb-e5d74089fc75",k.Left="e7a24859-a18a-4889-b3db-ca33a12ab7f7",k.Lock="2d10927a-1bd3-4524-b34a-96ed4af97a35",k.Marble_medium_active="3b0905cc-92c6-450b-a6bc-21fdd41374ec",k.Marble_medium_default="076b37ab-055f-4198-aea9-a5eb024c8a20",k.Marble_medium_hover="2cc809a1-4591-4883-9ed6-d88fa9821c4f",k.Minus="679ea543-fc5a-45f1-8b6d-9b7f55c9108c",k.Move="66be330c-d375-4210-a79b-c1b18e2bcab9",k.Music="14cbd6b3-652d-49d8-8105-df23faf62d98",k.Notification_badge="a4584ae3-d562-4b56-be28-289f8d64038a",k.Paper="fc5623a4-88cf-41ea-9c53-40370bc8b6d9",k.Paper_small="4608462d-d1e7-4187-99cc-e6ab0dbf13c1",k.Paper_small_arrow="a5bfeba3-254f-4747-8a75-d8d9443984a8",k.Pause="f69469cd-13e8-4359-935b-22175e89dc0b",k.Play="651cd102-a21e-4490-82e2-64a9046b1090",k.Plus="e524f1eb-1246-4c6b-9d83-2bdb42399fc7",k.Progress_bar_medium_inner="bfb9cc0e-f464-4b6e-a442-ef3ad5024df2",k.Progress_bar_medium_outer="df4a56a7-82c1-414e-9aa7-00db86f2ff26",k.Question="05723c11-96e7-4d22-b757-f40d7a6e436c",k.Right="d1a40282-cd64-4b27-9b77-859f19e213a0",k.Ruby_medium_active="194de295-67b4-45f7-9deb-5b1a685bb129",k.Ruby_medium_default="5a234c6b-cde5-4d66-a649-a4ada4f930ee",k.Ruby_medium_hover="6766da3c-6f86-498b-b8a8-630215706018",k.Sapphire_medium_active="d2d9d739-d22c-45c6-9c26-a0ce202eea70",k.Sapphire_medium_default="47dd9b87-6f11-4c78-8784-e1a065f292ae",k.Sapphire_medium_hover="c9ad9712-c6cf-4859-b455-8a6caab6d7dc",k.Settings="e7f32586-8bd9-4456-ba94-f628b126c8a8",k.Shop="5c7c6983-e0e0-4f12-aeae-d8cb9e694d05",k.Sparkle="0dae1bfa-9168-4c81-8296-ac0e5f496a09",k.Spin="6bf889f5-a846-49be-aefc-53de7d916fde",k.Stone_medium_disabled="47842fb5-d14e-487d-8311-f735190d27e0",k.Tooltip_arrow="b53183c0-bf22-4fd4-9c87-a09be3ae393c",k.Tooltip_background="cd9f7600-6633-4717-b4ac-9d785f2c43e9",k.Trash="b73b691c-1fad-41ad-bd21-d504cc66f5f5",k.Universal_scroll_bar_slider="c43d0835-7cb7-47eb-bc5a-301b578fa0b6",k.Universal_scroll_bar_thin_fill="28395da7-146d-4313-b563-44ce3cf23ca0",k.Universal_scroll_bar_thin_slide="fee8a769-8dcb-4f36-b848-aa0e6e6f9b78",k.Universal_scroll_bar_thin_track="bf4eb3b1-c21c-4117-ba70-c879037d7d63",k.Universal_scroll_bar_track="0964859c-7adc-4888-b781-88bafd182013",k.Universal_scroll_bar_track_fill="15125dcb-acfe-42c9-a31b-8119822deb5c",k.Universal_scroll_bar_wide_fill="ab6d7fff-3bcb-401f-b4a2-8fe67cacbeee",k.Universal_scroll_bar_wide_slide="ad6f3e06-68e6-4002-b278-2d27b47423ad",k.Universal_scroll_bar_wide_track="ecee181e-28b8-4167-9eb4-be10150e55a5",k.Unlock="81914f8b-7dc3-42b0-9bcf-6545ae1eaca3",k.Up="dbe1f3a8-3e0a-4860-8dd4-4fb6fdf8b730",k.Volume="2135385c-c6cd-482a-9d00-534c0bd4dc8f",k.Wood_small="8b35cd44-ded6-48ec-a5fd-6c1ea7af198d",k.Wood_small_hover="23d7b67d-3213-4cc1-8953-485b4c2c9a0c"}(F||(F={}))},79998:(k,B,U)=>{"use strict";var F;U.d(B,{u:()=>F}),function(k){k.Card_gear_mini="9451a72b-35b5-4520-a19f-ebdbd4e9b79a",k.Card_gear_mini_empty="1b5d874d-000b-482e-a04d-85ef0d899a3d",k.Card_outline="41806707-f982-4e02-b50e-5756b7f11f74",k.Card_overlay="495f94ac-4030-4421-8888-dbde5b08a8ae",k.Change_icon="b82a0a51-e67d-479e-a01e-6ac1c8ae0161",k.Empty_slot="ba33cde8-a277-46a6-adac-a0ef7d3b96a4",k.Gear_bg_small_common="6e0849d3-8851-4e18-b3b9-d9e642604ef1",k.Gear_bg_small_heroic="d6f08696-b35b-486a-9ea6-a2110beddc4d",k.Gear_bg_small_legendary="3f9463e8-7550-4c95-9231-c838c1fd24ef",k.Gear_bg_small_rare="668a63e2-ddef-4c5a-81bf-b92ebc36acbb",k.Gear_bg_small_uncommon="5dacc18c-04ed-4790-b05c-790cdc7d36db",k.Gear_slot_small="0d03daba-91a0-4f0e-87b1-2acd557060b6",k.Icon_gear_boots="0b178835-e2fc-432a-9728-b6fbfea6091e",k.Icon_gear_buddy="82322c96-1611-479f-abb5-9bf8e7d3b65e",k.Icon_gear_hat="138d6852-a1e1-42c5-9457-bdef12678314",k.Icon_gear_mount="09344c5c-9c34-421b-842c-ad3d02861879",k.Icon_gear_outfit="adfa2804-c0df-4158-8ea8-bf69d1715b6d",k.Icon_gear_pet_hat="8adc1ca8-607e-43fe-98a3-e2d0a6137e3c",k.Icon_gear_pet_relic="b8caf254-84cc-4c09-8e19-6064377ca580",k.Icon_gear_relic="c6a5ccbb-7c55-49ba-bf5c-eeec195008d9",k.Icon_gear_wand="948ea863-fc01-4492-bba4-6c4c918bf334",k.Icon_plus="6a0b4863-7c0d-4bf7-97b3-03e1f40fcf2b",k.Info_btn="3fe118cc-6c7a-4249-821b-626d945f18f5",k.Label_bg="6bdd2cff-d715-46b5-b8d2-de684585089e",k.Merge_bar_full="66a66541-5dde-4603-8151-5b6c8958eb60",k.Merge_bar_max="8a4fe42c-eafe-489e-8936-55496e7bff0c",k.Merge_bar_progress="b1b3a5e4-ef78-4a17-a233-6c2cab9de11a",k.Merge_progress_bg="ebccd12d-be8d-4565-9728-ca7055e6d4e4",k.Pet_card_bg_bw="1a6d89c8-d9d6-42e5-b191-5eb5283695c8",k.Pet_card_bg_common="a1f245e2-07ed-4b09-8447-9776abb66a90",k.Pet_card_bg_empty="2a7fbe24-901e-4dc2-85ca-fae23a5fcb59",k.Pet_card_bg_heroic="422491a4-1c89-4a7e-ae1f-e19eb48441ac",k.Pet_card_bg_legendary="a388eda8-e6eb-4311-bd17-d258c157c0f2",k.Pet_card_bg_rare="6fd5faf3-67ca-43bd-959a-ee2c00ce451e",k.Pet_card_bg_uncommon="7c6a358d-e248-4316-9f30-a87afb1223ea",k.Rarity_bg="e3be89b5-2232-4de8-9a1d-44530d67e041",k.Separator="4dd74269-2a5d-44f2-b404-7a4de6bb8675",k.Swap_bg="97c369fb-924e-40d2-8ce4-9ddff0f6a009",k.Transparent_overlay="4c1b2629-e435-4b95-9a13-602f4768ce3f",k.Transparent_overlay_white="a4a1037a-88b6-4eb0-865e-5d863c3047b3",k.Treasure_track_icon_small="96ea0f9e-c9de-485d-aa4e-f38de08b9bbf"}(F||(F={}))},82351:(k,B,U)=>{"use strict";var F;U.d(B,{B:()=>F}),function(k){k.After_school_widget_ftue="1b6e6c51-d240-492e-a925-f8410959cdc4",k.Battle_pass_auto_collect="7f36b3c7-6170-4c2e-ac4e-462c31d7a654",k.Battle_pass_quest_claimed="ca291626-09ef-4ee3-8296-91d7fcd1aab9",k.Battle_pass_reward_claimed="53b62d77-706b-4fd7-9722-c4887d85643e",k.Bg_bossbattle_firefly="06a98d53-59c7-432c-b83d-29338229c5f0",k.Bgm_battle_astral_dragon="44f370ee-ca77-44d4-8b09-12309448fdc6",k.Bgm_battle_physical_dragon="39410388-e2fa-4b84-b658-65414051ac8a",k.Bgm_battle_puppet_master="1ab522b3-ab89-4565-8598-a0fd2dc67aff",k.Bgm_battle_shadow_dragon="a8d72c5d-5447-4cde-ad75-be94f8a34945",k.Bgm_puppet_master_ambient_loop="583f384f-cd89-4528-8d99-b8008750dff3",k.Bgm_puppet_master_victory_loop="3d1444c4-0ef5-4544-b0c9-8b0df20da045",k.ChargeRemoval_Noot_001="879e0501-e3a7-4402-a80d-88290f8c73e5",k.ChargeRemoval_Noot_002="824202f6-a7da-4554-a4aa-6723f7bccb67",k.ChargeUp_clean="5ce26997-a727-4d2d-8da4-20c0e8ee1e24",k.Dragon_1_battle_intro="b4c12a81-7e0a-4c5b-9779-51b16c1a337b",k.Dragon_isle_reveal="b082b1c8-fe70-4de9-8dcf-15af44a86875",k.Dreamy_drop_2="f433dcb0-2ff6-46bf-8b52-f2ee9f0b86c7",k.First_dragon_defeated="13b9ea19-28e8-4e7c-9491-f2aac1ffd62f",k.First_dragon_orb="cc629e5d-6ea2-48e9-853e-5950d143aa03",k.First_dragon_rift="41210811-ce8b-455d-a403-633bd4485b48",k.Loot_dash_background_music="ed985314-6121-4076-9585-0c925ed4f9ae",k.Loot_dash_endgame_match_completed="89cd123e-b1a3-4cf9-b998-cb6e21fa7847",k.Loot_dash_endgame_placing_screen="24f133f9-f1c9-4ac2-9b72-2aa823bb62aa",k.Loot_dash_loot_bag_added="4062114e-dff0-4732-b2e0-dbac0dfb530e",k.Loot_dash_matchboard_done="56b7d72c-acbd-49ff-9cca-48adc0eb5293",k.Loot_dash_matchboard_move="4335687a-b815-4d58-9deb-d7b73592a1f6",k.Loot_dash_math_streak_complete="391128ae-1c31-40c2-b2b7-fb4a18cda1b1",k.Loot_dash_math_streak_increased="a2f987b1-6e57-4430-91c2-ceef0d2095da",k.Loot_dash_math_streak_reset="e57f8d5d-16a8-45a2-a268-7c3db3fc68dc",k.Loot_dash_revive="4b65b7b8-e5a8-4f76-9c89-46e8a89bb601",k.Loot_dash_stage_intro="f297f3d4-0f68-4799-b663-9fe18c12bb4c",k.MainVOFire_BTS2023_Voice_Pippet_PuppetMasterAppearance_Bonfire_100="b6e84fe3-10b4-4aa3-94f5-b49cc5e79b92",k.Post_first_rift="0a9cdf59-00cb-4176-9151-d035c21bc19a",k.Post_first_rift_key="2b3d515d-35cc-4926-8da9-970cfd6b6272",k.Post_pm_visit="fd42e4c9-4f1a-4828-bee0-cf32e114072b",k.Pre_pm_visit="ba3139f7-3550-4fb8-935d-e1811dd65159",k.Sfx_CloudCoverAnimation_V2="48856d82-dde5-498b-978f-5246c31464c5",k.Sfx_Cutscene_PortalClose_V4="d9a46c98-a80b-41b3-b741-426627f4c36d",k.Sfx_Cutscene_PortalOpen_V4="c74e9088-d3cd-46c1-a89f-13cf2857fb39",k.Sfx_Cutscene_PortalStuck_V4="d721028f-f1ab-4b0b-8ff6-d475b98b89b4",k.Sfx_Cutscene_TimeTwisterLost_V4="92457ef1-9ed2-4869-ad11-0f39cc4dd987",k.Sfx_Dodge="365b8bdd-3b43-4502-bf1a-159adc784baa",k.Sfx_Wyrm_Roar_Double="acdd5caf-1295-4f4d-bb5a-574f494ad397",k.Sfx_Wyrm_Roar_Double_IceMagic="e0243032-93c6-4312-ac9f-1b3f4e278004",k.Sfx_Wyrm_Roar_Single="6308374c-9301-4ed1-b57f-a94ef062b0fa",k.Sfx_Wyrm_Roar_Single_IceMagic="e0d9554e-4e57-4791-be3d-c8e3ba6d0be9",k.Sfx_academy_keystone_activation_sheen="8b991c45-f7d5-4b47-97ce-88ab425f6a6a",k.Sfx_achievement_fanfare="aa25a8d4-1b8a-4378-b0c1-7795f66a73c9",k.Sfx_astral_dragon_spell="b7f0e183-db81-4203-b99f-022cfbbd166d",k.Sfx_bomb_astral_v02="eb514caa-dafe-4e7a-a7f5-a169f43a32f6",k.Sfx_bomb_fire_v02="ad5a26b8-cceb-48ac-bc8b-fdb110511a15",k.Sfx_bomb_ice_v02="4882da74-146f-42a9-a04c-1561c0b91015",k.Sfx_bomb_plant_v02="c7b13264-f4b3-42e2-81f0-a3533720f90e",k.Sfx_bomb_shadow_v02="7ec1c6a2-c9f9-416e-a544-35ef7f427ded",k.Sfx_bomb_speedup="1832ee30-bd24-4d00-8520-fb88fb1a57eb",k.Sfx_bomb_speedupx2="80598706-7901-49b9-99db-98c2be8713af",k.Sfx_bomb_storm_v02="d54fc353-78d8-47b7-aa20-7e51f27c0487",k.Sfx_bomb_throw="52506ff0-ff39-4c7b-a62f-d1f9f230794e",k.Sfx_bomb_water_v02="e6c56493-053c-41c7-a37e-d23bfa99d722",k.Sfx_buff_defencedown_v02="671ff6e0-7d79-460c-896d-7c718c0812e8",k.Sfx_buff_defenceup_v02="21ef83ae-84e9-4fdd-bb4a-466f82667ec6",k.Sfx_buff_powerdown_v02="7ed6a8e0-5b40-49eb-b454-cbef1d52b286",k.Sfx_buff_powerup_v02="8eb1d383-d71b-490b-917f-798ecaa0a01e",k.Sfx_buff_regenerate_v02="4d6b4b51-1ecc-4b6a-9dd4-ed2bcc4ef31a",k.Sfx_charge_lost="13d45a54-8ac2-4aa3-9fcc-7f83e3541850",k.Sfx_charge_up="087084e0-572c-4b67-8c6d-90c78a5304cb",k.Sfx_chargedLevelUnlockSequence="58325603-6ed2-46a5-9f41-eb306825c4e3",k.Sfx_charged_levels="a78f8de2-ff90-42f2-868f-e6b40a222132",k.Sfx_charged_levels_unlocked="4423df87-50fb-46d5-ae8d-add3b4f59d9a",k.Sfx_critial_hit="29a72e9b-f3fe-4531-b8cc-1239245fab0b",k.Sfx_daily_login_calendar_reward_collect="34a282a1-0b03-45eb-a73e-5966cc7c08cf",k.Sfx_daily_login_calendar_reward_state_change="2afc773f-4784-4562-82d9-edc813bac5f6",k.Sfx_damage_astral="963fb6c1-a50d-4bb1-989f-ca68eeb472a8",k.Sfx_damage_fire="325a747b-0d8d-4071-9a95-a65fdc3dee99",k.Sfx_damage_ice="e36bab4f-3803-4c49-9cd7-57f0b1bb9966",k.Sfx_damage_plant="3b7bb3bb-1a90-4626-b568-f8678cd90b0b",k.Sfx_damage_shadow="83dcc56b-b8d2-4681-a296-2553343f803e",k.Sfx_damage_storm="47db30c9-34d7-44c4-a3d2-b0171561521b",k.Sfx_damage_water="201be481-09c4-4d55-b7d9-b1af3f30fb46",k.Sfx_dragon_isle_celebration="02d35327-173c-49fb-9d1f-9f4add37c15c",k.Sfx_dragonisle_dragon_defeat="b4fd7861-9fab-4172-a0cd-4765aeb8d07b",k.Sfx_dragonisle_dragon_roar_attack="a6a77f79-e8ab-46cc-bcd1-697cd0c970bf",k.Sfx_duels_personal_best_win_streak="5f5a2f31-0b34-4ef5-bbd6-593f776ce21e",k.Sfx_duels_win_streak_badge="bc7df9fc-679e-4db4-9941-3bcf642671f1",k.Sfx_empty_mp="03ee47ea-8e0a-4983-ba38-5043f221c990",k.Sfx_fire_boost_screen_overlay="42758484-a8ec-4c7a-a750-71b4a5955fe4",k.Sfx_fireworks_celebration="495eeb5b-45e5-4cdb-ae0d-36e831486c09",k.Sfx_fumble_poof="a900850d-09fa-477d-900f-7119614e7030",k.Sfx_gift_astral="a0d89704-27dc-44d0-ac35-19fdfdccbd6e",k.Sfx_gift_dark="c3af7530-f6ce-4ef9-8e36-b891d8b41d72",k.Sfx_gift_fire="2ed350c2-eb51-49e4-b796-dc5d78b291d4",k.Sfx_gift_ice="a15674b6-9f63-40b4-97f5-1dad04b31824",k.Sfx_gift_plant="c8ad9187-7e97-4883-a3ff-12573ab6fda7",k.Sfx_gift_storm="9d1e1bb3-2f1d-41b9-a78d-92a4b12b4648",k.Sfx_gift_water="542eabbe-f80c-45b7-a1fd-024c391e92b2",k.Sfx_heal="2ec522b6-315d-4402-9b8e-3f38e7ef2aeb",k.Sfx_hud_icon_notification="113196a8-911a-40e3-9ecf-193b9fea0318",k.Sfx_ice_boost_screen_overlay="3246ae9b-7fe9-4792-ad92-58f133b26e8b",k.Sfx_large_explosion_with_glass="11c9caa1-e418-4e28-a1b1-0558e8e5bf5e",k.Sfx_long_explosion_with_rubble_A="bca8ac0f-1eb0-4210-92e6-ebd062a0a0ed",k.Sfx_long_explosion_with_rubble_B="0e1ad5d7-d229-45be-b59c-1cd343209089",k.Sfx_magic_poof_story_unlock="bff7dfe6-2e8f-4273-a4ce-1b6c41a3b4e6",k.Sfx_medium_explosion_with_rubble_A="9ea87f5b-b10b-416b-b98a-c422a5b5ba4c",k.Sfx_medium_explosion_with_rubble_B="b768cf01-0dd3-4bc9-8f8d-2bd1712ee649",k.Sfx_mp_refilled="fe8a74ff-944d-4f15-9c75-2dc352c02e97",k.Sfx_pbf_levelup_barfill="a2e4be60-1a60-4265-be70-7e5119977e19",k.Sfx_pbf_levelup_dance="45c78a1f-8d12-4227-b52b-14e907c538a1",k.Sfx_pet_merge_badge_transformation="96e8c480-6aea-4278-8177-3254c3770b1d",k.Sfx_pet_merge_beam_effect="8631acb7-a542-4d74-aaa7-0463b19af746",k.Sfx_pet_merge_card_transformation="769d8854-5b71-4d08-98be-ae5ef9857dce",k.Sfx_pet_merge_stat_transformation="56b28d58-b2ae-4115-827c-2c3b1897b0a9",k.Sfx_physical_boost_screen_overlay="d9e85b3f-9e4a-4e4e-9091-e82b9ba6cd0e",k.Sfx_physical_dragon_spell="4482ed8c-c9bc-4dbd-9466-3596c2d4169c",k.Sfx_plant_boost_screen_overlay="da50ef8c-aa86-446f-af8c-a99df761f76e",k.Sfx_powerful_hit="9bd1e922-875d-49e9-a953-ab048518bee2",k.Sfx_puppet_master_battle_ground_rumble="f923d7e3-5a96-4cc1-b512-a3ec70d4bf90",k.Sfx_puppet_master_battle_heavenly_harmonic="261670ed-eb91-4641-87a7-4f719d7568e8",k.Sfx_puppet_master_battle_keystone_flash="e0bffeef-947e-4f5e-b176-039645c683e4",k.Sfx_puppet_master_defeat_animation="442ee09b-b2a6-47de-8c6a-e6fa56aa030a",k.Sfx_puppet_master_spell_beam_impact="6223c671-ba33-4238-a059-ffd20483453b",k.Sfx_puppet_master_spell_beam_travel="75162d65-4342-477c-8ee5-74a4eeb774da",k.Sfx_puppet_master_spell_cast="d8e81f70-40ed-4a83-a8d2-ccf24d793bfc",k.Sfx_puppet_master_spell_downpour="60c46051-2bd3-4974-8188-bec5e549d230",k.Sfx_puppet_master_spell_map_transition="323a3664-0bae-442a-92d5-9e169eea37db",k.Sfx_puppet_master_spell_mp_drain="795b305d-83b4-4b7b-b617-134aaf96b36b",k.Sfx_puppet_master_spell_pet_steal_travel="e6b95d05-880c-4c10-9bc7-8cd52b503e59",k.Sfx_puppet_master_spell_volcano="5e2781fe-35f0-4a4b-9d19-5c6f665b7100",k.Sfx_resist_hit="1f6ebb67-5ed6-44bd-b887-13a5e9ff647d",k.Sfx_segmented_offers_last_chance="64ff2326-f2f3-47c2-bb71-9552946c44ee",k.Sfx_segmented_offers_open="a0ebb0f6-5cd7-4a88-8754-d4c628944750",k.Sfx_segmented_offers_sustained_bgm="d7fb4948-40d9-4d3d-846c-5c41a440ddd2",k.Sfx_shadow_dragon_spell="7711492f-0390-4557-aff7-356d89c0926a",k.Sfx_short_explosion_with_rubble_A="88ba375a-8de1-4320-933f-bd0198106e81",k.Sfx_short_explosion_with_rubble_B="35a4b330-7714-44ac-851e-acf5ac5f9d2d",k.Sfx_spell_card_hover="2e797110-6b72-4361-99f3-f3ee49bee730",k.Sfx_spell_card_select="3f6ec21b-74bd-4e28-9505-6b1811345595",k.Sfx_starter_pet_charfoal="1e5794eb-7343-4042-b9da-ce24fedbb105",k.Sfx_starter_pet_interaction="c30b9ef8-4c17-4742-8f8e-5032dc62cebd",k.Sfx_starter_pet_mermina="0475b18e-7be4-4543-8551-52d2d48d2a2f",k.Sfx_starter_pet_snowfluff="ece27950-944d-42fd-b0ad-2820c3289de0",k.Sfx_starter_pet_sproot="955f3300-aa46-4d00-8717-f36619a6f090",k.Sfx_starter_pet_wott="4a67772e-0b06-46ca-91ca-278853bb8964",k.Sfx_storm_boost_screen_overlay="f1c2b6ca-e50a-498f-a29f-6f136869c711",k.Sfx_teleport_defeat="6dbbcaa4-b8bd-40e3-b0c0-3e0b557eb328",k.Sfx_teleport_rescue="be56192c-8cc6-42de-9cec-84e4b7ea86fa",k.Sfx_unit_buff_positive="cb678bc1-f52d-4a26-9bc9-4f449eb4480c",k.Sfx_unit_select="e8aa3107-ae70-4d1b-b9d4-ac615430d795",k.Sfx_unlock="5ad36ecb-b0c4-4449-a7fa-df9ffce57c6e",k.Sfx_upgrade="c246fce8-2d7c-4174-9d34-78f7d53ae91b",k.Sfx_vs_animation="58a44645-a223-4668-b9d8-69a387302642",k.Sfx_water_boost_screen_overlay="af8393c7-1de9-4257-ad65-6b8546047fda",k.Sfx_wizard_team_teleport="5ae1ad0a-4a08-4213-8dd3-c935db30c85f",k.Spiritual_power_up_2="acc367b5-f20e-49fb-9805-5c14db2a3080",k.Voice_10_103_magic_refilled="e449016c-7be5-4910-a36c-0773c6394a01",k.Voice_10_104_powerful_hit="441e8cf1-2fbd-4ddd-a479-58674dfd9f39",k.Voice_10_105_rescue_charfoal="0530f6b8-c6bf-4289-94c6-5393be396579",k.Voice_10_106_rescue_mermina="3fd24e11-6833-488d-a423-4eb8e49366b7",k.Voice_10_107_rescue_snowfluff="cc7f5ea6-91e5-4271-a208-5f2ea4f9b14a",k.Voice_10_108_rescue_sproot="31cfe69d-f8be-496f-85d8-798752eb02a1",k.Voice_10_109_rescue_wott="022bf41a-42d0-499b-876e-edefe5d1085d",k.Voice_10_110_rescue_now="84c8c24a-dcdc-4225-8aca-83b2bf883558",k.Voice_10_111="5fed2359-c9c4-47ea-bea5-48e6e6d13b2f",k.Voice_10_112="225a54dc-3ddf-4750-9abc-a164927fc2e9",k.Voice_10_113="c33299df-0666-4979-9161-bf3f24be6b29",k.Voice_10_114="027cb958-1982-4c7f-b95d-dc8ac6d8ddcc",k.Voice_10_115="8671bfab-9f89-4fd4-9e05-0d543cf1f15d",k.Voice_10_116="6ad06bed-0669-466a-b4e4-e31543f53f3f",k.Voice_10_117="e907829b-e167-4a74-a007-43560ed75270",k.Voice_10_118="800500cb-684b-419e-b760-3509c1005d58",k.Voice_10_119="69dac330-b34c-4377-bd30-8c3b058dabb2",k.Voice_10_120="16a006ef-3ff4-4a99-a5e8-3233d9b04edf",k.Voice_10_121="1c56f26c-41ae-4a0a-9f57-8161113d3f8f",k.Voice_10_122="a970da72-55ac-4b05-94ff-40c692780aa8",k.Voice_10_123="e561eadf-4ac2-4d7d-9001-1907d72005bc",k.Voice_10_124="e56685ec-c7d1-4b9d-938f-7975971903ac",k.Voice_10_125="cdeebc0f-82bf-4429-857d-3eb0be818de2",k.Voice_10_126="44e890f4-0feb-4663-8e49-ac5e6891620a",k.Voice_10_127="7634c6d6-ce66-4e1c-bdaa-da2be3dcd637",k.Voice_10_128="1125c828-9049-4abf-85cd-fbac58c430b7",k.Voice_10_129="baff6336-5765-49f3-a298-b8fa332d3a00",k.Voice_10_130="2e19de25-d150-4699-a07c-63c36834e475",k.Voice_10_131="57e45b36-f1a0-47ae-9212-191bc05c35a8",k.Voice_10_132="e88afa2d-6067-47f0-a04c-5f738f0d56b8",k.Voice_10_133="3c827543-fe8a-4b85-a5a0-34061e3ce529",k.Voice_12_19_broccolina="c1f7586d-1f6d-4ca5-8829-b759c59c02b7",k.Voice_12_20_broccolina="bf1a7246-85f7-4665-b70d-23a9729d7053",k.Voice_12_21_benni="9b0bcfd8-a1a8-4f71-956e-9aa87ce9b1ec",k.Voice_12_22_benni="d508018a-3cf4-4cbd-a3d1-7d129ff1eb28",k.Voice_12_23_benni="afbce6a6-3e75-4de8-880d-a7b8253527be",k.Voice_15_19="6816e7a6-63a4-41a1-9637-4863dcba0782",k.Voice_15_20="a5718ce4-583c-4356-bfb2-19a888ddf885",k.Voice_19_2="ac48a4ad-7d5b-46f2-bece-b2a8a701f6f5",k.Voice_19_3="1a151de2-c971-4d84-9272-d3ed4fc5cad5",k.Voice_1_16="c7180562-df7b-4414-8362-d9d82f060009",k.Voice_1_17="451ae0cd-e14a-48d1-8679-fcca6e9e80ce",k.Voice_20_10="38298832-8279-4404-a76b-0bb59d676cde",k.Voice_20_11="fc235967-d1ff-480b-8072-4902cc25b382",k.Voice_20_12="cc1a64e9-f71b-47e2-86f1-c0e5a2b3ff11",k.Voice_20_13="ed73f7e4-c246-4da8-93d3-f5206093928a",k.Voice_20_14="c5a57936-e233-45a2-b80a-c588997862ad",k.Voice_20_15="7fb5ce1b-a671-47ef-868c-b248bbe84c40",k.Voice_20_16="02934b65-8bf1-4feb-8ced-d49dc0bd1c2a",k.Voice_20_17="4b165a5a-078d-40f8-a678-3f659d2be68d",k.Voice_20_18="11a271ae-4ebe-456a-9665-f9c7920009fd",k.Voice_20_19="8af4d3e7-1d06-41df-aae9-fe71d06faba0",k.Voice_20_20="f60fc029-a665-42f4-ba5d-0eefceade421",k.Voice_20_21="dbea3392-a31d-44e0-984e-f6d8d92c846b",k.Voice_20_22="b8a58514-f95a-4768-9e2d-ee3c074184e1",k.Voice_20_23="a88d369d-69cd-4ca0-92f3-30c44d4fbc9e",k.Voice_20_24="430695cf-627c-4a38-b7a9-75fdbd363937",k.Voice_20_25="7c77fa42-16f0-4a2f-acad-10961affde94",k.Voice_20_26="1125cc46-c607-4241-b61f-499a1e841509",k.Voice_20_27="6fba3843-ecc2-45a3-9743-205954ded9c0",k.Voice_20_28="db847682-da08-4e78-af4d-2894ffb7d666",k.Voice_20_29="a24232f5-9e20-4295-890f-170c40ad297c",k.Voice_20_3="f6180419-bb0b-4d87-aa26-6e533747efad",k.Voice_20_4="2698951e-dd19-4ec9-a316-0202db6e69f3",k.Voice_20_5="2d476014-9e22-48b9-bbcd-413f8b606ffa",k.Voice_20_6="faf3b96b-0bd5-415c-b3b1-661b1da4e805",k.Voice_20_7="29e29cee-18d6-4e16-a66b-01d4242a207a",k.Voice_20_8="cabcbd43-7b4c-45f9-a487-1b9ab2b3cfd4",k.Voice_20_9="6e83295b-417e-4cc6-b18c-5bedf73e64a7",k.Voice_27_2="3b163ad9-c7e7-4b09-b115-845f83beb625",k.Voice_27_3="20833965-09a1-4026-bc2f-c681b9024682",k.Voice_27_4="4cac7a05-e830-4f8f-a609-d9f77dc251ce",k.Voice_42_1="1418aa4c-db9a-446a-881e-51eaa1dc8d26",k.Voice_8_15="24a87b64-fc3b-4e20-9306-d84470080516",k.Voice_8_16="fe0c6952-0282-41ba-9951-e6ffa70f6be1",k.Voice_Act1_HardModeQuest_Noot_first_entry_1="e62edb53-2c5d-407e-9985-55c428d4eb39",k.Voice_Act1_HardModeQuest_Noot_first_entry_2="576df7bf-84f2-4c2e-9599-6af05ba5dbfb",k.Voice_Act1_HardModeQuest_Noot_intro_1_no_charge="fb3c6abb-6d48-4f31-8dca-1e0a0b5fbdd3",k.Voice_Act1_HardModeQuest_Noot_intro_1_with_charge="78be9a03-5bb2-4364-8af9-1bd49ab78cb0",k.Voice_Act1_HardModeQuest_Noot_intro_2="177f1fe3-096e-4b20-b3a0-65351bcdcef8",k.Voice_Act1_HardModeQuest_Noot_intro_3="d7e0275d-2149-4432-b91d-438c4c7fc8d0",k.Voice_Act1_HardModeQuest_Noot_intro_4="07b3c465-da2f-4472-81f9-557ed0cd4c63",k.Voice_Act1_HardModeQuest_PuppetMaster_01="ea58d380-a099-4251-bd38-a3bcce81186d",k.Voice_Act1_HardModeQuest_PuppetMaster_02="10ce55c6-de14-4f2b-a969-dd7aaf370d76",k.Voice_Act1_HardModeQuest_PuppetMaster_03="86e9e2c3-9d47-4225-8a95-b764e0e74166",k.Voice_Act1_HardModeQuest_PuppetMaster_04="723d9b13-2eda-46b0-92cb-c124847498de",k.Voice_Act1_HardModeQuest_PuppetMaster_05="b6e7e6fd-2c88-4812-a1cf-18c7814b952a",k.Voice_Act1_HardModeQuest_PuppetMaster_06="d6e16f3c-dcc5-4313-a8fb-f0629edb2080",k.Voice_Act1_HardModeQuest_PuppetMaster_07="9c0ce2a8-9856-41c0-aba6-9833ef04319a",k.Voice_Act2_ExpertModeQuest_Noot_02="1464f501-f524-4d97-a2b5-3ca172a330e7",k.Voice_Act2_ExpertModeQuest_Noot_07="1c2fdd4c-ca72-43c3-8806-4edd4441d64e",k.Voice_Act2_ExpertModeQuest_Noot_08="dfd40f36-ca09-4b8b-92a2-be932c1e29b4",k.Voice_Act2_ExpertModeQuest_PuppetMaster_01="dfbf4390-bc6f-4f58-9a2a-d75520a4c0fd",k.Voice_Act2_ExpertModeQuest_PuppetMaster_03="1d0a5003-5b19-4b02-9597-4b213c087c9c",k.Voice_Act2_ExpertModeQuest_PuppetMaster_04="9ef120c5-8620-4bf4-bdf8-dbf54ab25403",k.Voice_Act2_ExpertModeQuest_PuppetMaster_06="4ef1f1f4-6438-4342-8400-a83c97eaf22f",k.Voice_Act2_ExpertModeQuest_PuppetMaster_07="dd688549-7017-421a-968e-fdd28fcb5a6a",k.Voice_Act3_ExpertModeCompleted_Noot_02="d8018e08-f36c-47fc-8d11-5c4cf2cb0c72",k.Voice_Act3_ExpertModeCompleted_Noot_04="4797db7b-d780-4db3-b7a4-8faeaddb82f3",k.Voice_Act3_ExpertModeCompleted_Noot_05="9d6d26d4-3dce-4f9c-a595-26505d92810f",k.Voice_Act3_ExpertModeCompleted_Noot_06="5f445c9c-a7a4-40d4-9f8f-6906746bcba1",k.Voice_Act3_ExpertModeCompleted_PuppetMaster_03="408711d0-2a2f-4c2a-925c-8c3be3806310",k.Voice_Bok_FireflyQuest12_ShiverchillQ1_1="d1f784c6-5422-4fbd-866c-690a631a60f9",k.Voice_Bok_FireflyQuest12_ShiverchillQ1_2="85836055-5277-459b-81dd-a684a4f3a420",k.Voice_Bok_FireflyQuest12_ShiverchillQ1_3="0a9ed340-d709-498c-981d-d5c8c2790e58",k.Voice_Bok_FireflyQuest4_1="67efb88a-2f59-4f0f-9217-87e798dd8de6",k.Voice_Bok_FireflyQuest4_2="a80cfd70-ffa5-4f64-9d4b-766417b0d008",k.Voice_Bok_FireflyQuest4_3="c7082eba-d2ed-4243-aecc-02fbf61caec8",k.Voice_Bok_FireflyQuest4_4="a6f14ba6-d293-4ff4-b9f1-1dfce99f64f2",k.Voice_Bok_FireflyQuest4_5="a9dfdc42-414f-4e42-a5dd-8d977d3f057e",k.Voice_CostumesFTUE_01="3a23f3e5-556f-42c3-a19b-8c3a3745b12e",k.Voice_CostumesFTUE_02="20597ced-6a00-438c-b21d-e4b39b776a9f",k.Voice_CostumesFTUE_03="3d4a27a7-1692-4a18-869f-145e1d81755c",k.Voice_CostumesFTUE_04="a38c63b3-ba7f-4818-9325-12d05aea3c18",k.Voice_CostumesFTUE_05="4d6c6866-edeb-4748-88ec-dd1739394e99",k.Voice_CostumesFTUE_06="314060b9-e2b7-4f41-8e19-20f788a469f7",k.Voice_FTUE_Noot_01="6201ebba-eb44-4569-a4bb-5b186e293738",k.Voice_FTUE_Noot_02="a56e7520-366f-419e-9a8d-bfbc47bb8dbd",k.Voice_FTUE_Noot_03A="e3743c63-16f8-4a1f-8d4c-1ddb2ad00ad4",k.Voice_FTUE_Noot_03B="e27b0f9e-0766-41cf-ac21-e228bc4ad061",k.Voice_FTUE_Noot_04A="a3ba8c47-055c-4752-a2e0-28fb2b57650e",k.Voice_FTUE_Noot_04B="d0098fd3-c274-4a49-ae0d-3c58e86973d5",k.Voice_Flora_FireflyForestquest3_LoseScenario_47="23120c01-a43e-4f5a-8a8f-4a9b7b0f0c67",k.Voice_Flora_Fireflyquest12_75="4634ac41-5afa-4396-b3e9-6904e98b7c04",k.Voice_Flora_Fireflyquest12_76="e2944bf5-448d-41a0-bad9-089508bca0a9",k.Voice_Flora_Fireflyquest12_77="6d21749a-2c84-4c9d-ac67-20242e2b2fa8",k.Voice_Flora_Fireflyquest12_78="e6b32beb-8766-4d54-9bcd-85eeb95e1233",k.Voice_Flora_Fireflyquest12_79="44dce9a8-0f31-4549-b1ef-a4214de0c669",k.Voice_Flora_Fireflyquest12_80="4d1a1a03-5f8a-474f-a0fa-e7cc67c09ad3",k.Voice_Flora_Fireflyquest2_27="f9bba913-6305-4918-94e1-2b159ca6a6f0",k.Voice_Flora_Fireflyquest2_28="60c02f7e-e53e-471d-820d-ec463eef5042",k.Voice_Flora_Fireflyquest2_29="934cec15-ca77-4b0e-83d0-bf1ed0e14ae9",k.Voice_Flora_Fireflyquest2_30="d7b89d1b-8b1f-40c2-a13c-4551aa820e23",k.Voice_Flora_Fireflyquest2_31="87ca920d-a097-4e07-b0d0-7414a6d8624b",k.Voice_Flora_Fireflyquest2_32="7b1a9932-8b1e-43e8-9a3d-c3522907aa35",k.Voice_Flora_Fireflyquest2_33="b0dd6c68-667b-4773-8441-d20d010b1921",k.Voice_Flora_Fireflyquest2_34="8c20049a-f2c1-4b11-994f-d5ecf3286254",k.Voice_Flora_Fireflyquest2_35="0aa1c7f4-0c0b-4543-af41-21520af2e207",k.Voice_Flora_Fireflyquest2_36="99ad2411-ef2a-44c4-80fe-91a1c6e73d10",k.Voice_Flora_Fireflyquest2_37="e777b487-2ad8-413d-a29b-f91a56ebcf5e",k.Voice_Flora_Fireflyquest2_38="771cc166-fdfe-411b-83bc-428e694eca12",k.Voice_Flora_Fireflyquest2_hard_31="cfbb5286-7db3-4ce0-ba4d-034cff1b33d3",k.Voice_Flora_Fireflyquest3_39="0c09dafe-a083-4450-bea9-98b907d9cec3",k.Voice_Flora_Fireflyquest3_40="a09ea086-132d-4204-8962-989dcc8f4ca2",k.Voice_Flora_Fireflyquest3_41="6e715615-8c75-406f-bf16-1c4a0615fbcc",k.Voice_Flora_Fireflyquest3_42="fd89cdd8-3185-40b7-8a6a-3b852a3a2e7e",k.Voice_Flora_Fireflyquest3_43="ef8438e2-4fd3-46ad-bd04-265dfe419c04",k.Voice_Flora_Fireflyquest3_44="22f427e7-be06-4677-954f-1d2f9666d966",k.Voice_Flora_Fireflyquest3_hard_42="53dac275-1015-4b75-9644-641ddcdc8fb5",k.Voice_Flora_Fireflyquest4_45="dd26c56a-6b2c-4ba2-b9be-aa9c8e4ab083",k.Voice_Flora_Fireflyquest4_46="8134104a-2474-4ebf-90ef-b121663a3881",k.Voice_Flora_Fireflyquest4_48="6d87a34a-590a-47b6-9d95-4eec4e553d7e",k.Voice_Flora_Fireflyquest4_49="9fe03d0f-1c9c-42d3-b23f-a57e0c349a22",k.Voice_Flora_Fireflyquest4_50="c83ea4a3-f619-4ee2-bc75-e2ca76cb3297",k.Voice_Flora_Fireflyquest4_51="edb05f79-5894-435e-98e0-a3240b8a2760",k.Voice_Flora_Fireflyquest4_52="b4b2d963-fadc-47fe-aea9-d522163febbb",k.Voice_Flora_Fireflyquest4_53="c3c5660d-7d12-44de-9fdd-c8cb88295613",k.Voice_Flora_Fireflyquest4_54="7d001523-b12c-4d5e-86f6-ca816251727e",k.Voice_Flora_Fireflyquest4_55="a296b98e-74a2-4ea4-b949-ab2047000312",k.Voice_Flora_Fireflyquest4_56="9ab70530-50dd-4a1e-b49e-a9b764f42053",k.Voice_Flora_Fireflyquest4_57="46749d6c-a7b7-4013-b8ea-f19b8e00af80",k.Voice_Flora_ReturnToFirefly_AfterCompleted_81="e4c81876-f7bc-43fd-a1d8-8a41e89eacef",k.Voice_Flora_ReturnToFirefly_AfterCompleted_82="58bfc0ca-8300-4295-b540-c5a61f5827ae",k.Voice_Flora_ReturnToFirefly_AfterCompleted_83="4d5d87ed-8178-4809-909d-ace0d8ddc8b4",k.Voice_Flora_ReturnToFirefly_AfterCompleted_84="03be6a85-dcd7-4ba9-af1b-ed285b02d7d2",k.Voice_Flora_ReturnToFirefly_AfterCompleted_85="2a925ee8-851f-411c-99a7-de6254256aa8",k.Voice_Flora_oldFireflyquest10_71="4d71da00-96f4-4636-ab81-56dbd071d477",k.Voice_Flora_oldFireflyquest11_72="5e25645d-79f5-441d-9b16-08b66a6e5f86",k.Voice_Flora_oldFireflyquest11_73="20f03f5d-8c65-42a6-b046-ae6008b7b6d2",k.Voice_Flora_oldFireflyquest11_74="bc5c2411-a541-4ada-bb82-005329aee60e",k.Voice_Flora_oldFireflyquest6_58="ccacc6c8-b49e-4e4f-9584-b777757b35fc",k.Voice_Flora_oldFireflyquest6_59="fe1d5e7b-2ff9-469c-b197-9ad90b9fc730",k.Voice_Flora_oldFireflyquest7_60="50c9b7ce-acfd-4ee9-b902-8329fea6d1b3",k.Voice_Flora_oldFireflyquest7_61="f8084421-aaf0-44a2-b5d0-4e6faf33fce5",k.Voice_Flora_oldFireflyquest7_62="2e711397-b298-4f2f-837d-74445d0ac913",k.Voice_Flora_oldFireflyquest8_63="a7850f38-3fb6-4863-9940-6745765fe352",k.Voice_Flora_oldFireflyquest8_64="768bdadf-b2ed-4ebd-9715-8d82585b6c7f",k.Voice_Flora_oldFireflyquest8_65="8ab42f40-8443-4627-b831-5c6bc3ab3775",k.Voice_Flora_oldFireflyquest9_66="37832249-2e54-4281-b7d6-6eea7c2055a4",k.Voice_Flora_oldFireflyquest9_67="306ca9f2-635f-443f-83d6-b4925e3998a8",k.Voice_Flora_oldFireflyquest9_68="0d6b079f-68a4-454c-8418-9ff00d9216b5",k.Voice_Flora_oldFireflyquest9_69="4b0e7a3e-17d2-466a-9080-601813713e3a",k.Voice_Flora_oldFireflyquest9_70="a627c458-b67e-4663-84db-36114935e6f7",k.Voice_Florian_Fireflyquest4_125="793109a0-3767-4bf0-8d76-6cc0a1f75725",k.Voice_Florian_Fireflyquest4_126="0e565471-70ae-4c5e-b708-6f82d2b73ded",k.Voice_Florian_Fireflyquest4_127="5b5249df-0644-4167-864a-5becb343e607",k.Voice_Florian_Fireflyquest4_86="f975045d-ce42-449e-acd4-8d13c71420f1",k.Voice_Florian_Fireflyquest4_87="ca408999-53e3-40fd-be14-fd0b416c3f43",k.Voice_Florian_Fireflyquest4_88="bced7d1c-e488-494a-8ab7-5deefdfbe247",k.Voice_Florian_Fireflyquest4_89="8f10ca92-c408-43e0-bc74-0cbd759f2e31",k.Voice_Florian_Fireflyquest4_90="ca90fd85-69d1-495a-a3fd-e9af9a420db4",k.Voice_Florian_Fireflyquest4_91="366d4d57-6ca1-4919-b5bf-aab9218979b0",k.Voice_Gerald_FireflyQuest12_1="4aeebe34-600b-4a64-9ceb-fc062ba26c65",k.Voice_Gerald_FireflyQuest12_2="92228d81-143b-487f-bcaa-100036cd1092",k.Voice_Gerald_FireflyQuest12_3="6a696e73-b4d4-409b-b853-d7c8df346fe8",k.Voice_Gerald_FireflyQuest12_4="a6664e8c-38b1-4ca8-8941-156ce28b7648",k.Voice_Gerald_FireflyQuest12_5="9df59475-b723-499c-894d-0b0e2ef593cd",k.Voice_Gerald_FireflyQuest12_6="ff4a9d75-a212-41eb-a5f1-015a0dcf26a6",k.Voice_Merchant_Fireflyquest5_128="3641ab5b-c143-40a4-a536-41d0bfa82d42",k.Voice_MoonlightFest_Act01_Pippet_01="265a6280-a954-439c-b47c-822e4ed9c586",k.Voice_MoonlightFest_Act01_Pippet_02="0f255991-396e-4d42-80a3-e3a10f613c52",k.Voice_MoonlightFest_Act01_Poppet_01="21431f24-2e66-49a3-ad6c-52480dc70192",k.Voice_MoonlightFest_Act01_Poppet_02="a55b9d82-2a2c-46b7-b291-594750b50dd3",k.Voice_MoonlightFest_Act01_Poppet_03="0ef59fd1-e11a-417f-bfc4-c4dbd629d5d5",k.Voice_MoonlightFest_Act02_Flora_01="e75a6f1a-20f2-4e91-83ad-76ed7dbc7ce1",k.Voice_MoonlightFest_Act02_Poppet_01="7e378243-c2c3-41b5-89d2-f03666c23bb2",k.Voice_MoonlightFest_Act03_Bok_01="09d0236d-379f-4de8-af2b-6a71b0f3f6b2",k.Voice_MoonlightFest_Act03_Poppet_01="6fed54f5-deb7-4b9f-8d6b-b6f8db9a83ce",k.Voice_MoonlightFest_Act04_Harriet_01="8246268a-f175-40d7-b2ab-e407295c303a",k.Voice_MoonlightFest_Act04_Poppet_01="5a33d8d6-c12b-4152-a393-7238b5665b12",k.Voice_MoonlightFest_Ending_Poppet_01="1a7f02f6-c143-4d89-8885-4194bec22bba",k.Voice_MoonlightFest_Ending_Poppet_02="5ae5d1fd-5014-4806-a444-e32e89a008f0",k.Voice_MoonlightFest_Ending_Poppet_03="93457007-5f7d-43b9-9e54-0618bb180747",k.Voice_MoonlightFest_FinalEnding_Pippet_01="a93a38aa-3ad5-46e5-8747-7dd5d1af29af",k.Voice_MoonlightFest_FinalEnding_Poppet_01="348a715d-a622-425a-a391-ce1ef9701956",k.Voice_MoonlightFest_FinalEnding_Poppet_02="be3e7c5e-7f50-4dc1-9ce7-0d2fcad27f2a",k.Voice_MoonlightFest_FinalEnding_PuppetMaster_01="ae757e3a-4e7b-4449-aacd-08fb8bf6d56b",k.Voice_MoonlightFest_FinalEnding_PuppetMaster_02="5652b920-6cc6-41ca-9faf-8f160c2f62d4",k.Voice_MoonlightFest_FinalEnding_PuppetMaster_03="aef91411-cba5-4b85-a596-a73ae607e092",k.Voice_MoonlightFest_FinalEnding_PuppetMaster_04="a3cfcf58-0725-407d-861a-c043764e3092",k.Voice_MoonlightFest_Selena_01="980b39bf-d60a-45ad-8101-be954bbf3ff2",k.Voice_MoonlightFest_Selena_02="2bda7850-97d9-4ab6-9e6f-528e718afc5d",k.Voice_MoonlightFest_Selena_03="2a67c308-af6e-4f9c-b3f9-d7941a2e77e9",k.Voice_MoonlightFest_Selena_04="fbc2d440-91ea-4380-a810-a5c7c48c33bf",k.Voice_MoonlightFest_Selena_05="b9bf1aae-813f-425f-8971-f18a39455cd7",k.Voice_MoonlightFest_Selena_06="03fd45db-c715-498a-9d7f-aed1405f97fb",k.Voice_MoonlightFest_Selena_07="909efcb8-0498-408f-8059-608d1356970d",k.Voice_MoonlightFest_Selena_09="4a58d57c-baf6-4895-a656-488345b3e2bb",k.Voice_MoonlightFest_Selena_10="3827d54f-b91b-48ec-bf50-f097c866e235",k.Voice_MoonlightFest_Selena_11="35c7c4c9-ea84-4c6a-b9f2-9b171cf50777",k.Voice_MoonlightFest_Selena_12="c9941e15-1bc2-4834-bd73-0e8555fe422a",k.Voice_MoonlightFest_Selena_13="9c57aa9d-72b9-4ff9-b691-315c9d3d8170",k.Voice_MoonlightFest_Selena_14="555a82e8-5123-4e08-a022-2fde0dedfc75",k.Voice_MoonlightFest_Selena_15="fe8cd84d-221f-448e-9af7-8d3a707a3c4f",k.Voice_MoonlightFest_Selena_16="11ff0bdd-4071-4064-9089-a74730a41a8c",k.Voice_MoonlightFest_Selena_17="6a843c26-26d3-4be1-9c1b-40689337f670",k.Voice_MoonlightFest_Selena_18="fb9aa5d0-5b29-411c-829b-378d3aa6362d",k.Voice_MoonlightFest_Selena_19="c28875fd-0a0c-4982-9d32-22e187bc9694",k.Voice_MoonlightFest_Selena_20="583489f7-fa75-4bc4-8b59-5109858178c0",k.Voice_MoonlightFest_Selena_21="821ae69e-c376-4ac8-8851-c299b4400270",k.Voice_MoonlightFest_Selena_22="6ca41204-8317-4375-ad56-4303e5365cee",k.Voice_MoonlightFest_Selena_23="5cf4d4ce-388d-459d-ada5-c5e956f67c21",k.Voice_MoonlightFest_Selena_24="554811c0-5364-417c-852b-085f80b78492",k.Voice_MoonlightFest_Selena_25="31d77714-2054-464c-83f6-7454d05447ba",k.Voice_MoonlightFest_Selena_26="7db19657-8fd0-4b7d-aae8-b1eee6458903",k.Voice_MoonlightFest_Selena_27="22f311e4-e526-4529-a25b-766d96b04c4b",k.Voice_MoonlightFest_Selena_28="893c0de0-e9a6-48c5-86d7-146d019cb040",k.Voice_MoonlightFest_Selena_29="98268d80-52cd-408a-aebb-e22ffe543334",k.Voice_MoonlightFest_Selena_30="13a75a5a-9c59-4146-a429-3a8565e67f03",k.Voice_MoonlightFest_Selena_31="04203ee6-62ca-4b5a-ac44-2ead8755a0d2",k.Voice_MoonlightFest_Selena_32="ad1ed02a-648b-482c-8ace-bc6a406038cb",k.Voice_MoonlightFest_Selena_33="1caee07e-af5b-47c3-88b8-d07ac09332a4",k.Voice_MoonlightFest_Selena_34="fdf5a5f0-a9f5-44bd-b0ac-30cafca66c20",k.Voice_MoonlightFest_Selena_35="acc914bb-f681-4138-a9a0-a84ec6ca51e8",k.Voice_MoonlightFest_Selena_36="e8129d96-63c5-4ce3-9cad-c615cf1eba6f",k.Voice_MoonlightFest_Selena_37="62a6da41-99a3-4a48-ad9f-0898968e0fad",k.Voice_MoonlightFest_Selena_38="3eb13f9f-cfdf-4d3a-91a1-22ca77099b70",k.Voice_MoonlightFest_Selena_39="12e3a8ed-0fdf-4854-aa90-51474004c3c0",k.Voice_MoonlightFest_Selena_40="99f4d524-d6d7-4558-97a7-35d3b4f3d039",k.Voice_MoonlightFest_Selena_41="cb5e756a-f79f-42be-ab4f-c33b4950de1c",k.Voice_Narrator_BonfireEntry1_135="b8a8478b-d4ce-4c96-957f-42f1adfdc933",k.Voice_Narrator_BonfireEntry2_136="f14b1412-d2c3-4fc8-8cdc-0bf51ecbf50a",k.Voice_Narrator_BonfireEntry3_137="40441b03-1d8c-45fe-bcc7-70ce2a9d9a04",k.Voice_Narrator_FireflyEntry1_129="97a15639-7941-4e82-ad92-9ee01dbd891c",k.Voice_Narrator_FireflyEntry2_130="f0116f3d-e88a-4254-bece-4c7801b29415",k.Voice_Narrator_FireflyEntry3_131="b70ec6f7-da19-4ce3-b725-5cb5d60571a2",k.Voice_Narrator_ShipWreckEntry1_141="7ec9e690-2207-4500-bd8e-d268184a2f06",k.Voice_Narrator_ShipWreckEntry2_142="4698946c-d0b2-48d2-b137-bf51fc281e0c",k.Voice_Narrator_ShipWreckEntry3_143="035ce9cf-74af-40f4-b3ca-064e9c2d95e3",k.Voice_Narrator_ShiverchillEntry1_132="e5bf7d7b-4970-46a6-ae42-1111a3349e5c",k.Voice_Narrator_ShiverchillEntry2_133="e0a792e7-242b-498a-8f25-fe9f8b057620",k.Voice_Narrator_ShiverchillEntry3_134="05fe1185-a23a-49a9-abf0-c3883dbd0e81",k.Voice_Narrator_SkywatchEntry1_138="a1dac258-7596-449e-8850-0802ee1d30ce",k.Voice_Narrator_SkywatchEntry2_139="158bc99f-5a0a-4007-827c-8c2ef8a0493b",k.Voice_Narrator_SkywatchEntry3_140="0f0f3ac8-29bd-4939-98c1-ca8ee438f243",k.Voice_Noot_OldFireflyQuest6_21="7b82f4bc-9d19-4f82-a3ea-e3ffceb78ed1",k.Voice_Noot_OldFireflyQuest6_22="3a444a25-8d35-41f7-a730-9c48aa3eeb81",k.Voice_Noot_OldFireflyQuest8_23="a3548e8a-c9ae-47fc-9b80-d59d38851a2a",k.Voice_Noot_PuppetMasterAppearance_Shipwreck_20="3e223f80-43e3-479e-bf76-dd4179418657",k.Voice_Noot_PuppetMasterLockingZones_Worldmap_18="b498d56a-b9d2-415a-8cae-0b3518c27cf6",k.Voice_Noot_PuppetMasterLockingZones_Worldmap_19="528e8ac8-cf7e-4ad9-88b6-3298f8597759",k.Voice_Noot_SkywatchQuest4="c5534d86-7693-4de8-8e14-38a629f9f3f5",k.Voice_Pippet_FireflyQuest4_92="a55805b6-608b-48ae-babd-27b74649e2a1",k.Voice_Pippet_FireflyQuest4_93="41435b6f-dcee-4327-b73e-45af372163ff",k.Voice_Pippet_FireflyQuest4_94="ff73cc98-7df8-42fa-a09a-630e88907eff",k.Voice_Pippet_FireflyQuest4_95="9158e059-efc9-4f60-9f71-b588752eaed7",k.Voice_Pippet_FireflyQuest4_96="64206efe-36f6-4da0-b916-e7d836988837",k.Voice_Pippet_PuppetMasterAppearance_Shiverchill_98="4b7afdb9-dacc-4a41-9780-74db34339d14",k.Voice_Pippet_PuppetMasterAppearance_Shiverchill_99="f3547370-61ea-41cd-a65d-d6a4608bdc69",k.Voice_Pippet_PuppetMasterAppearance_Skywatch_101="07061ffa-305d-4ae5-853b-5cfac9b27b7b",k.Voice_Pippet_PuppetMasterAppearance_Skywatch_102="3e605d9a-a08e-43db-aadf-a109e85dde6b",k.Voice_Pippet_PuppetMasterAppearance_Skywatch_103="75369c88-1194-48a5-8a1e-38fb086fde4b",k.Voice_Pippet_PuppetMasterLockingZones_Worldmap_97="3a59a038-38ba-4be6-9728-838067b83aea",k.Voice_PostBattle_LossFlow_Noot_01_merge="f34a942d-12e2-43ce-82eb-4da484a55505",k.Voice_PostBattle_LossFlow_Noot_02_evolve="7d4bdf7c-2b7a-454e-a41e-0c879329fbdf",k.Voice_PostBattle_LossFlow_Noot_03_plant="2ab557fe-d14b-4121-bb47-b7bc38ed67b2",k.Voice_PostBattle_LossFlow_Noot_04_fire="b5f81d13-5afa-4bd6-9c68-5ed32ec57802",k.Voice_PostBattle_LossFlow_Noot_05_water="91854eb3-98df-4e30-9584-258aae24b7d5",k.Voice_PostBattle_LossFlow_Noot_06_storm="177e18b9-5058-410f-8035-11ba77f32eae",k.Voice_PostBattle_LossFlow_Noot_07_astral="ff3fba4d-ee4a-45e1-8bd4-a3bfe412774d",k.Voice_PostBattle_LossFlow_Noot_08_shadow="4343353b-2dd1-4c3a-969b-6051aba94b8f",k.Voice_PostBattle_LossFlow_Noot_09_earn_stars="12d43163-0394-49a9-99ba-d271277aa296",k.Voice_PostBattle_LossFlow_Noot_10_pet_gear="c6eace4a-8cb9-4a6e-9b7a-22481a46ef45",k.Voice_PostBattle_LossFlow_Noot_11_wizard_gear="dd7acffd-3ff8-4cf5-97b8-26ce95c5ef88",k.Voice_PostBattle_LossFlow_Noot_12_weakness="16619cd3-de73-4d34-a387-2babda7b37dc",k.Voice_PostBattle_LossFlow_Noot_13_strength="af22ff86-e950-40bb-a458-c6be61c854d7",k.Voice_PumpkinFest_Extras_KandiKorn_01="793e6cac-e2c0-4670-b05d-774e5a39c6f0",k.Voice_PumpkinFest_Extras_KandiKorn_02="3cd9d71e-807b-4637-b044-c08aee1b485f",k.Voice_PumpkinFest_HollowJack_01_V02="bbbf5487-1c7c-4a1a-84cf-c1acdc2b6278",k.Voice_PumpkinFest_HollowJack_02_V02="26310b07-f8d3-4ef5-984f-28e365b2139f",k.Voice_PumpkinFest_HollowJack_03_V02="7f472a43-3495-4857-9b25-d7101223570b",k.Voice_PumpkinFest_HollowJack_04_V02="262e799c-f8af-46b8-8b98-f742bb49a5a2",k.Voice_PumpkinFest_HollowJack_05_V02="eaf995e1-097b-4f7a-afdc-54c9512ee85e",k.Voice_PumpkinFest_Intro_KandiKorn_01="4dd31d9e-9a36-4939-9049-05c4aef77738",k.Voice_PumpkinFest_Intro_KandiKorn_02="c1294e83-09ed-4974-bd5c-eea9a553ce2f",k.Voice_PumpkinFest_Intro_KandiKorn_03="d30fa6f4-81c6-48b4-8f8f-3ab0a5758cd4",k.Voice_PumpkinFest_Intro_KandiKorn_04="04b7e74c-aafc-4e08-8dd2-cf9ae6d99344",k.Voice_PumpkinFest_Story_Week1_KandiKorn_01="8d94b22c-82a9-4cc8-b69a-ed417069e77c",k.Voice_PumpkinFest_Story_Week1_KandiKorn_02="06811388-a6a2-48b7-9eb4-25a0b8cff3a5",k.Voice_PumpkinFest_Story_Week1_KandiKorn_03="e521afdc-afad-4ba8-8a78-c3a119dfe185",k.Voice_PumpkinFest_Story_Week2_KandiKorn_01="9e19d42e-57b2-4951-b1bc-28d03b5d645d",k.Voice_PumpkinFest_Story_Week2_KandiKorn_02="4e758915-8828-49c4-822b-55f81ffc7ed0",k.Voice_PumpkinFest_Story_Week2_KandiKorn_03="259550eb-2a62-4a87-befa-a5fe9a9c01b8",k.Voice_PumpkinFest_Story_Week3_KandiKorn_01="24ffc523-2a22-41ae-bdd9-1b3f75032ec0",k.Voice_PumpkinFest_Story_Week3_KandiKorn_02="790391ac-f0e5-47cc-97d2-65932fe029b4",k.Voice_PuppetMasterSept25_Scene08_PuppetMaster_01="218f8754-de85-4eb0-b792-cc91a6b2393f",k.Voice_PuppetMasterSept25_Scene08_PuppetMaster_02="db88bb61-7711-4fbf-ae5a-df93a1ba4b9c",k.Voice_PuppetMasterSept25_Scene08_PuppetMaster_03="0e437670-69d3-48f0-ac86-803faaf61720",k.Voice_PuppetMasterSept25_Scene08_PuppetMaster_04="5172c8fd-41da-4bfd-9c46-3712e9fc8ae8",k.Voice_PuppetMaster_FireflyQuest4_118="2dae6372-0603-42ad-9a55-9e71b2eb3401",k.Voice_PuppetMaster_FireflyQuest4_119="bd6da4e1-02ff-47d5-98a1-763b5854dbfc",k.Voice_PuppetMaster_LockingZones_Worldmap_120="c7fb185e-3536-4df4-aff3-b2403f712447",k.Voice_PuppetMaster_LockingZones_Worldmap_121="aecf39a7-af64-4d55-b06e-e478aef5c3f9",k.Voice_PuppetMaster_LockingZones_Worldmap_122="b28049f0-06ab-4423-b93e-183f89fdd022",k.Voice_PuppetMaster_LockingZones_Worldmap_123="12321149-9589-4b0d-bd95-5e141cdeb5b7",k.Voice_PuppetMaster_PuppetMasterAppearance_Bonfire_108="7971c3c2-0a42-4a9f-b52c-6ab9e060fb8e",k.Voice_PuppetMaster_PuppetMasterAppearance_Bonfire_109="c0cdfd80-6091-4987-ab46-dc04e3a1e498",k.Voice_PuppetMaster_PuppetMasterAppearance_Bonfire_110="76cea0da-0bd2-4bb6-b0ca-e7ef382117c8",k.Voice_PuppetMaster_PuppetMasterAppearance_Shipwreck_111="3ae2d573-8cc9-4fc3-a4ed-a2a3cec63740",k.Voice_PuppetMaster_PuppetMasterAppearance_Shipwreck_112="593bbdc8-6ea8-4dac-a1ee-8d6ea85fd40f",k.Voice_PuppetMaster_PuppetMasterAppearance_Shipwreck_113="c86e1829-5619-4004-b02d-22feacfc2995",k.Voice_PuppetMaster_PuppetMasterAppearance_Shipwreck_114="593104e7-7f0b-4b9c-80df-994fe42ef243",k.Voice_PuppetMaster_PuppetMasterAppearance_Shiverchill_104="eeb4a381-6d0e-4e93-adf6-9adfc17a8811",k.Voice_PuppetMaster_PuppetMasterAppearance_Shiverchill_105="4d6b5c5a-c283-4281-b14c-21c929e3fb1f",k.Voice_PuppetMaster_PuppetMasterAppearance_Shiverchill_106="58e4d015-12ce-48bf-8563-8572f66e208e",k.Voice_PuppetMaster_PuppetMasterAppearance_Shiverchill_107="3afc2c07-ef58-49e0-8c0d-47ea535c8dc9",k.Voice_PuppetMaster_PuppetMasterAppearance_Skywatch_115="80530300-e336-43ac-ad3d-d7a0fc83c3e4",k.Voice_PuppetMaster_PuppetMasterAppearance_Skywatch_116="e5013a18-09df-4676-a0fe-ccbef339757f",k.Voice_PuppetMaster_PuppetMasterAppearance_Skywatch_117="c2ff57de-b3ad-4508-a3ac-f831a0ffec62",k.Voice_Rifts_Barks_Phase1_Lose_FireDragon_01="92f9526a-eb50-4902-8835-5f5b1caef3f7",k.Voice_Rifts_Barks_Phase1_Start_FireDragon_01="0038c10f-9599-41d2-bdd0-547ead604f5b",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_01="83130011-7070-4d3f-a381-f2a95c376109",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_02="87cf2132-0060-4d33-b2db-6b86968a843e",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_03="78574eb1-d435-401d-83c0-8c8a8382f97d",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_04="8da447ef-873b-4a98-83ef-167f49818738",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_05="bc522af4-8477-47fd-a516-6cf25bc58ea7",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_06="5fd61bd2-8c0f-4216-850a-1924dc87671d",k.Voice_Rifts_Barks_Phase1_Win_FireDragon_01="a261103d-a93a-4816-aeae-5004d53b6151",k.Voice_Rifts_Barks_Phase2_Lose_FireDragon_01="e7b284cf-9e17-41ae-a210-c951194f3f93",k.Voice_Rifts_Barks_Phase2_Start_FireDragon_01="9570b27d-5ef4-4ea8-8071-c8da1d1f673a",k.Voice_Rifts_Barks_Phase2_Start_FireDragon_02="0057458a-0825-4166-8741-127fcac61c04",k.Voice_Rifts_Barks_Phase2_Start_FireDragon_03="622798b6-cfb6-4e7f-86dd-c1e03c825c63",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_01="cf4a466d-8d29-4de7-be3e-a3992e2d1d77",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_02="a763f34d-f221-4ffc-8f31-0a7509665734",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_03="d391fb03-7729-4457-b23a-cac711165efb",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_04="ee8e1481-26b3-4f0e-8651-8bbceb9bfee9",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_05="5fbc95a1-46e6-4b1f-b219-640e79cf7c55",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_06="94c47f9e-4808-4138-b99b-af622c8b6c19",k.Voice_Rifts_Barks_Phase2_Win_FireDragon_01="48a41a66-e1d0-4e67-9430-9a8a275fb5d8",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_01="12f78484-3661-4da5-a7b2-f9a6279288a9",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_02="42e7c4c0-fb85-451c-9b17-b9e17c187126",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_03="3a90fd78-837d-422b-af6c-ae5ff36c165f",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_04="3c30cf21-a317-405d-a103-19c1e7196d97",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_05="8969d173-f209-466e-9337-bb4a697bbf48",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_06="ae4facf1-e2f8-4a30-8308-70542462de9a",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_01="586ad1fd-f572-4f84-b1e4-4d88d0271676",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_02="ca264450-1239-49e3-ac90-be1856e74513",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_03="36725538-31f5-45ab-91e0-0e85d78bf200",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_04="3a4d1976-03c7-4d5b-8fb0-0da3cf70daf5",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_05="bc4f68f4-a8da-4416-b628-347b491e4d92",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_06="15fcd342-af9e-4186-8dd4-27f7183b59bd",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_01="d3458d9f-241b-411a-8766-5f395438425e",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_02="6a7e711b-829c-44f1-87d8-11af0fbacfd1",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_03="946a17ee-cd11-42f1-880a-4c8009e567e9",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_04="d15a6d42-a15f-471e-8be3-ac0f485db0c9",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_05="d54c716a-497b-4109-a55e-6131a7b460cf",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_06="65a92b5f-5053-47c2-a5e0-9d59b2475d38",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_07="4e23b7da-9896-4055-8133-1e148f54ac8c",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_08="d5df1466-c37c-4ab4-95ed-50601d41f233",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_09="1d7336ec-d068-4b68-aaef-485a83a33385",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_10="f770f346-96fe-4a0e-b3d8-058ec0daccf5",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_11="f5fab027-e7c5-480f-b884-cb1e7ab37987",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_12="5a4374ce-d36e-402e-bef6-eee7de5f6ee5",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_01="28b99bef-d2a3-4a3c-98b0-377ec1048eef",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_02="64b04240-cae6-476b-bb07-124cc607e068",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_03="4570c0b5-c090-4cb7-8a67-81d1b154c16f",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_04="4a1a1362-5e17-4fae-97f0-2145e4ed9bae",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_05="4d7e3d3c-2464-47ab-bd92-ae71f8f9cf48",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_06="79423224-7d81-4853-a7f5-5d2c04ae331d",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_01="95b7d67e-e2b7-49be-9e73-bc9e962840ae",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_02="98643009-885f-411e-baa0-de2620f1ee58",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_03="cf289168-1eaa-4416-9f74-3f1a6a419ba2",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_04="6b36c34a-b2e6-4b19-95a3-4dbef0608d05",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_05="fb88d55e-1a71-42c4-bea0-939b86f135b1",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_06="1e437fea-0072-4a52-8527-165760917029",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_01="27e5029e-b986-4e48-92c4-dfbf59eba53c",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_02="980f81fb-8ce6-42a8-b49d-ecda3bb0e0b3",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_03="f44177d9-06c0-484a-9801-94ed2a3396b7",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_04="7d9a680e-3c98-4cae-8fd9-869123b55d65",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_05="8b900146-ddb3-41a2-8d8f-3eb5ac9dd1fe",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_06="14327e06-f043-409f-a62c-ebc7b0349196",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_01="b42a33eb-bb74-4528-b3f5-922d2e12fb1b",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_02="f8bb0237-3238-416a-9031-59b6948a5ca9",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_03="0cdc2a59-c39e-4e63-be1d-897552dbc3ee",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_04="faa77dd0-4ac3-4742-8815-a15c05db1b01",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_05="08068dd0-5988-4fb1-9cb6-881763261938",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_06="c9c96576-779a-40cc-9aa4-af8bd0e783ed",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_07="fd6901b0-3f74-4bd2-8328-bbe8542b7649",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_08="4d8ebfec-a049-4b0b-a836-95272ef96467",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_09="cd2709c3-63e8-49e3-836f-f8e175ae3e60",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_10="30d4d564-00f0-4c2c-a9fb-c1c5dcdbd73f",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_11="113b8cb3-633a-42c2-a9d7-aa8ae56de61a",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_12="1e8bb3f6-917a-480b-b808-82b323ce458e",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_01="817a1602-435e-4adb-a963-64b80702add7",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_02="1c8e0b50-ff77-400e-b797-28b2577b4a42",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_03="145b81cf-67ba-4637-984b-b295326325da",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_04="c6f61bbb-37c7-4e4a-923d-428da1c4a6d6",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_05="ac970c72-5b06-47cc-8f17-017a105e9c0d",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_06="dd473903-5535-482b-a841-4ba674a311ec",k.Voice_Rifts_Barks_Phase5_Lose_FireDragon_01="26a42e1f-1a96-4048-87c5-f22a30fa1a6a",k.Voice_Rifts_Barks_Phase5_Lose_FireDragon_02="462e7142-e8ee-4378-a700-1cb40001f16f",k.Voice_Rifts_Barks_Phase5_Lose_FireDragon_03="56c088b3-5b60-4a08-8b92-3ddad4b9f6a0",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_01="6255ca4f-965a-4658-b424-d5e91d4ec1ad",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_02="437c4fe2-ce8a-417a-a868-3871f7f70c5f",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_03="898e5c4a-82fd-4b77-9260-d599cfe89bd9",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_04="6d28b564-2589-4aab-98e3-41a78740b86b",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_05="19fa33e4-075f-43d7-b263-e3dbc1b03755",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_06="a9e1f6ba-f0c8-4112-9e54-f89b32e92cd9",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_01="f676b584-7dfe-4943-8835-5ba16de30b32",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_02="22b3a5f0-8405-4863-9fcb-246c14048e6c",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_03="7fbd275e-d007-481a-a4c8-6f5fa661b7ad",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_04="cc531426-4730-44b5-9aaf-d0198796b305",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_05="048970a6-5ecb-47d4-bff8-2f187600657a",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_06="995829a8-759f-4d43-b538-418102e09ea5",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_07="9ea3ae2d-56fc-4a4f-9c48-24f342d97455",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_08="e4265381-25a4-49f4-96cf-65d4cad60733",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_09="a9656998-a668-4fa2-93c7-81b88b55de2a",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_10="5d388b12-d032-4873-956e-f275cff7000e",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_11="e9a757e0-337e-4d5b-b46b-2b4da3a40d78",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_12="9a50cf7e-7e5e-4bf5-9da0-bcdc866a0bf7",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_01="df8765ed-40ab-4421-b468-ba288bdb4d30",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_02="e0a7f270-a9d0-452d-bdb1-c5cdc8dde7fa",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_03="9602fddd-d217-4c9a-b4eb-18608c1e8269",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_04="7d2bc0c8-a497-41fe-ac47-e47961460217",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_05="b0f343d1-76f3-419b-924c-4ce3b3af79bd",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_06="7d2643ee-a714-4345-829f-6f708e7b2ce9",k.Voice_Spingfest2026_Bargo_01="1fd8fade-4576-4c7e-aba6-413eb4cdfe5a",k.Voice_Spingfest2026_Bargo_02="83ff686d-d671-43cd-a5d7-ff65f51fb49b",k.Voice_Spingfest2026_Bargo_03="f36484d0-df11-46db-a6fb-22aaf96a7264",k.Voice_Spingfest2026_Bargo_04="e9201965-4cb2-4d58-a744-882018ee59a3",k.Voice_Spingfest2026_Bargo_05="7b4e2917-fe21-4fdc-8434-1c29ed1ab260",k.Voice_Spingfest2026_BunnyWizard_01="7bc5faf1-a37c-4df2-b405-1e0e7cc48214",k.Voice_Spingfest2026_BunnyWizard_02="aae5025e-65d4-4255-895b-1e0e607aad7c",k.Voice_Spingfest2026_DonZorro_01="5b1f1e2d-9f39-4872-8181-d79ac5e04ae6",k.Voice_Spingfest2026_DonZorro_02="b8027096-b8c4-4b51-9683-4c9802368731",k.Voice_Spingfest2026_DonZorro_03="af963f44-8cf4-4e06-bfca-2320b08af3aa",k.Voice_Spingfest2026_DonZorro_04="2c3fbe7e-1cdd-45ba-8ecd-23397d977042",k.Voice_Spingfest2026_DonZorro_05="adb356df-b4a8-4533-ba19-e57bb07efd0b",k.Voice_Spingfest2026_DonZorro_06="680987b1-382c-4841-b8ed-ae1248c59a9a",k.Voice_Spingfest2026_DonZorro_07="a7dba811-b982-4a57-9737-8796f86f4fbf",k.Voice_Spingfest2026_DonZorro_08="a259d488-8eda-4c44-a787-ce588239fc5a",k.Voice_Spingfest2026_DonZorro_09="f36b961f-e8c8-4da8-8c57-9414899923c4",k.Voice_Spingfest2026_DonZorro_10="54d51e49-5530-4630-ad34-39b220c972c6",k.Voice_Spingfest2026_DonZorro_11="0c7e90ab-4ee9-4739-8d95-1f758fd29bc3",k.Voice_Spingfest2026_DonZorro_12="d7ea0e42-843d-4b77-8385-dac686d6ac8b",k.Voice_Spingfest2026_DonZorro_13="cfcf9ffa-0376-49a8-bcb8-edc73afdee13",k.Voice_Spingfest2026_DonZorro_14="5da97319-40d7-492e-a43d-05630fd2e0b3",k.Voice_Spingfest2026_DonZorro_15="aebb6223-2174-42ac-9f24-0feb458aa47d",k.Voice_Spingfest2026_DonZorro_16="cb4cc9f0-9b9e-457c-b2d5-349e3073551d",k.Voice_Spingfest2026_DonZorro_17="0b0346cd-1312-4f07-bf2c-6599325845a7",k.Voice_Spingfest2026_DonZorro_18="8a349921-fc7b-4762-8c88-473661b30399",k.Voice_Spingfest2026_FoxWizard_01="c4b79595-c4b4-4bf7-902f-186c274a0605",k.Voice_Spingfest2026_FoxWizard_02="d236a67d-814e-463d-bbfc-137764d89b5d",k.Voice_Spingfest2026_HarrietHood_01="dc69fbd5-33e9-4830-9c3d-c60e2bbee7bc",k.Voice_Spingfest2026_HarrietHood_02="ff7cd0eb-970f-41f9-b81f-a1a4046420ad",k.Voice_Spingfest2026_HarrietHood_03="a37c35c4-75fa-4544-bd24-d8d01488265e",k.Voice_Spingfest2026_HarrietHood_04="aea03dc1-b42c-4fa2-8783-f0d321ad6072",k.Voice_Spingfest2026_HarrietHood_05="4c8c72cc-5347-4edb-9ade-16ad80a603d7",k.Voice_Spingfest2026_HarrietHood_06="ff477c42-03d2-4666-b782-ceb619a6ab5d",k.Voice_Spingfest2026_HarrietHood_07="fbc095e1-a8ef-49c1-ab40-15e475257b25",k.Voice_Spingfest2026_HarrietHood_08="efc580cb-da14-46a8-a8d8-9e345d94a643",k.Voice_Spingfest2026_HarrietHood_09="4e2a17c8-daf3-43e1-8820-10839902aebe",k.Voice_Spingfest2026_HarrietHood_10="8febc700-a624-4106-98c4-43033a6afb1e",k.Voice_Spingfest2026_HarrietHood_11="22c55298-721c-4d1c-916b-5ac45bd1c6b4",k.Voice_Spingfest2026_HarrietHood_12="c5bce580-d55f-4b2b-acd0-664748a1f649",k.Voice_Spingfest2026_HarrietHood_13="f5ff002e-7d0b-4f56-965e-4437d10e6ae4",k.Voice_Spingfest2026_HarrietHood_14="a21eae98-64b6-4e4d-97b8-b21c03d5eada",k.Voice_Spingfest2026_HarrietHood_15="c0a6415a-a77f-4e57-b5f6-de9b865f2366",k.Voice_Spingfest2026_HarrietHood_16="df15219b-7bfc-4c0f-acbe-c484622368bb",k.Voice_Spingfest2026_Verna_01="eca97a55-a065-418b-adef-f478c076e3eb",k.Voice_Spingfest2026_Verna_02="25588c46-835c-4aa1-9243-7492c6d0542e",k.Voice_Spingfest2026_Verna_03="60dd4050-b8e7-44c1-bf3e-f01cf1fedb66",k.Voice_Spingfest2026_Verna_04="3e74a12b-e4d0-403c-bce2-c25a7b8c6296",k.Voice_StarlightFestival2025_Act1_SirConstello_01="e61b41ae-653f-4e42-982b-131a449dfc39",k.Voice_StarlightFestival2025_Act1_SirConstello_02="353f5eeb-661b-4b76-ad12-25ecc59927f8",k.Voice_StarlightFestival2025_Act1_SirConstello_03="d7d6f580-32f8-4878-9b68-3006d973fb00",k.Voice_StarlightFestival2025_Act2_SirConstello_01="734415c8-1c11-489e-a56e-5ef094e4c5ce",k.Voice_StarlightFestival2025_Act2_SirConstello_02="6f9a0025-ac09-47ad-8f5e-41462ab4a6c7",k.Voice_StarlightFestival2025_Act2_SirConstello_03="05b4d235-e72b-4cb9-bde3-8d65c0460d1d",k.Voice_StarlightFestival2025_Act3_SirConstello_01="334879f8-f78f-4904-a993-831ee94b89e6",k.Voice_StarlightFestival2025_Act3_SirConstello_02="e59f920c-aa0a-40f1-b356-67fdb737df04",k.Voice_StarlightFestival2025_Act3_SirConstello_03="e430c39b-31e3-402d-8e3b-b19760ac7d1a",k.Voice_StarlightFestival2025_Act3_SirConstello_04="08504d8a-d0a6-42fb-823e-ed83ceb3b21f",k.Voice_StarlightFestival2025_Act4_PuppetMaster_01="c4c30d2b-bfc0-429f-8d8e-21f95805ab94",k.Voice_StarlightFestival2025_Act4_PuppetMaster_02="a04fb70a-485c-4c4f-bae3-5396bb2faea2",k.Voice_StarlightFestival2025_Scene1_Imani_01="3215533c-f280-41c5-ae51-88248af23238",k.Voice_StarlightFestival2025_Scene1_Imani_02="6922f234-c7c0-45d6-baaa-0d61a9e0a5e1",k.Voice_StarlightFestival2025_Scene1_Imani_03="e0feaee3-a19e-4f23-a086-2e6f78dfcf1f",k.Voice_StarlightFestival2025_Scene1_Imani_04="7eb94d46-e8b1-4fab-9364-60316257ff6a",k.Voice_StarlightFestival2025_Scene1_Imani_05="532928c3-4482-4207-8bc2-facbb21345f3",k.Voice_StarlightFestival2025_Scene1_Imani_06="18f94da5-96d0-4053-9d50-5161e5b36269",k.Voice_StarlightFestival2025_Scene2_Imani_01="b607ed24-454e-43d6-90e1-f09f9b5f660a",k.Voice_StarlightFestival2025_Scene2_Imani_02="acc7e16e-0294-4842-ae99-a783a2c2b59f",k.Voice_StarlightFestival2025_Scene2_Imani_03="f084658a-9358-40ca-b035-19c3ebe1b05a",k.Voice_StarlightFestival2025_Scene3_Imani_01="962f6225-1ba7-4024-b187-7f0461e0ac40",k.Voice_StarlightFestival2025_Scene3_Imani_02="3de77efc-0d7d-495d-938c-a740a1aa6b66",k.Voice_StarlightFestival2025_Scene4_Imani_01="275d57f9-93e3-44b8-9376-9a584c76005b",k.Voice_StarlightFestival2025_Scene4_Imani_02="49043ab6-ef4b-41f1-bf1c-19e2e92787e7",k.Voice_StarlightFestival2025_Scene5_III_Imani_01="9f85d703-7bec-4ba8-a345-f53ae65e0fdf",k.Voice_StarlightFestival2025_Scene5_III_Imani_02="f8ad7325-54a4-4e28-ba45-7ba06f4af46e",k.Voice_StarlightFestival2025_Scene5_III_Imani_03="b4b2da92-e710-424b-a350-a6e768ef16a2",k.Voice_StarlightFestival2025_Scene5_II_Imani_01="a895dcc0-f681-4f7d-ac06-cf3120989449",k.Voice_StarlightFestival2025_Scene5_I_Imani_01="8524d96f-7621-497f-b39c-727d1091e519",k.Voice_StarlightFestival2025_ShopDialogue_Imani_01="fc82be12-27d2-4813-a09c-95d88f614efb",k.Voice_Winterfest_Act1_HowardCornelius_01="f7ce1403-7b74-4d65-bc57-f4f6bd4d5423",k.Voice_Winterfest_Act1_HowardCornelius_02="fc3fffb3-05f4-4370-a23e-0a2efbdd02f7",k.Voice_Winterfest_Act1_HowardCornelius_03="f8e90484-d723-41c0-bdaa-2902a447d1ac",k.Voice_Winterfest_Act1_HowardCornelius_04="4f6050c9-9387-4ef1-9009-2a72db089754",k.Voice_Winterfest_Act2_HowardCornelius_01="6bdf71b5-39f6-4bf2-a848-6044fc507a92",k.Voice_Winterfest_Act2_HowardCornelius_02="be1c5454-1d86-4471-88fc-0eea94c8c325",k.Voice_Winterfest_Act3_Pippet_01="14ccf911-d9c6-42d0-91f9-dd706fc612bf",k.Voice_Winterfest_Act3_Pippet_02="fd7c7789-3d06-4f34-988a-9178d252f17b",k.Voice_Winterfest_Finale_HowardCornelius_01="67de2248-a7ba-4f90-bc48-f5be1ade65c4",k.Voice_Winterfest_Finale_HowardCornelius_02="fb1b2e45-cce4-48b4-95c8-52fa79a3e075",k.Voice_Winterfest_Finale_Pippet_01="97b2e447-ae3c-4c9e-8c50-c5c2060cc575",k.Voice_Winterfest_PuppetMaster_01="d15990c4-8665-4c43-b14b-7fee3e19e2b3",k.Voice_Winterfest_PuppetMaster_02="61bb05e2-a2e7-46b5-85ca-03b5436c39d2",k.Voice_Winterfest_PuppetMaster_03="df487868-7136-414b-b1fa-7e1dbe4aa4d6",k.Voice_astraldragon_barks_another_round="c0b23cb3-289a-4297-9bed-f548d2800ee5",k.Voice_astraldragon_barks_banish_any_shadow="0bda7f89-99c7-48b6-8fe5-59259afa378c",k.Voice_astraldragon_barks_better_but_not_enough="baa46a07-f1e7-4c2b-80c5-de02673ec417",k.Voice_astraldragon_barks_bright_enough="efa05b5e-435d-4b53-978a-90dea30dfe97",k.Voice_astraldragon_barks_brilliance_unmatched="95779b6e-0463-474e-82a4-4d7f47fec7fa",k.Voice_astraldragon_barks_brilliant_work="24019069-373c-4a07-b4e0-bf85c0a45d08",k.Voice_astraldragon_barks_brilliant_young_wizard="4a03c1a1-5d99-4b52-bd03-1f4e8c3ca46f",k.Voice_astraldragon_barks_cannot_defeat_me="a15cead6-5e9e-40ce-b37d-be9be3011113",k.Voice_astraldragon_barks_combine_our_light="c8f045df-ab61-4993-95f3-3141ec1ab0af",k.Voice_astraldragon_barks_coming_shadow="35bc3180-103c-41eb-bd2f-efad1e797d07",k.Voice_astraldragon_barks_couldnt_defeat_me="0ac0bfda-8b28-4c25-a391-75c785bedcbf",k.Voice_astraldragon_barks_grow_stronger="7abb4acf-5201-4597-b627-52eee750e799",k.Voice_astraldragon_barks_growth_takes_time="c68623db-a0d1-423e-9eef-e608b8c75ced",k.Voice_astraldragon_barks_hard_work_and_practice="a1c0e840-1758-4323-9f0e-ea7490e2812c",k.Voice_astraldragon_barks_have_patience="cc4cab5b-f97b-47a6-8557-47b6856482c6",k.Voice_astraldragon_barks_i_see_youve_returned="f366fb3d-a652-47e6-9f29-316ffdd6c306",k.Voice_astraldragon_barks_keep_hearing_about="d5928ecb-1a59-4506-af54-4c8ee12331fd",k.Voice_astraldragon_barks_keep_practicing="7b5d0500-eef7-4c73-b098-7643a7bba8a9",k.Voice_astraldragon_barks_light_defeats_darkness="e6596485-0535-434a-8a45-a6eb1892a50b",k.Voice_astraldragon_barks_my_brilliant_light_reveals="f10cfbda-629f-4ccf-8300-cb3c433fc994",k.Voice_astraldragon_barks_no_pan_flash="2847e3c0-d26f-491a-99c9-b6d8862ef580",k.Voice_astraldragon_barks_only_light="70b39ecb-2808-407a-85e8-a6ed43a95057",k.Voice_astraldragon_barks_patience_rewarded="ff2b0281-9e58-43ae-97c7-482c6a3a0e1d",k.Voice_astraldragon_barks_patience_young_wizard="d7bc8327-3739-43ef-8120-8a6d3d9866ad",k.Voice_astraldragon_barks_pm_growing_stronger="42534711-b799-4eed-ae23-63342ce0be8c",k.Voice_astraldragon_barks_pm_shadow_grows_darker="14580731-a63f-432d-876e-6be789511572",k.Voice_astraldragon_barks_practice_makes_perfect="f4105e43-1490-4e6b-a2a9-cfdcf4751139",k.Voice_astraldragon_barks_return_soon="1bb4eb04-7c32-4b3e-bd27-ad71fd376579",k.Voice_astraldragon_barks_shadows_in_my_light="2ff5b053-704b-40cc-8d01-9bb001443b5a",k.Voice_astraldragon_barks_shine_as_brightly="2f4508c2-e623-4491-8c5e-5fd7e310309a",k.Voice_astraldragon_barks_show_brilliance="3a9fcc01-1b80-4e79-8fcc-b408c8af80d0",k.Voice_astraldragon_barks_show_me_your_best="44c7cbf0-63da-4b3f-aa15-4ca7745c508f",k.Voice_astraldragon_barks_strength_grows="ad7498fe-2f20-4d60-8462-1dc6a42bd7bf",k.Voice_astraldragon_barks_wont_outshine_me="92cda661-7015-4c82-9e4a-6f110511f28c",k.Voice_astraldragon_barks_you_have_grown="76c5bc67-6548-450f-bb8c-1cf1f559cf65",k.Voice_astraldragon_barks_you_must_do_better="e97dc055-d8db-4c00-8fbb-2f7f019c114a",k.Voice_astraldragon_barks_youve_returned="6f14a2e2-8035-4007-8eff-40a654d4a11a",k.Voice_bonfireQ7="84775988-fbee-4dc1-98ab-4148261ffeaf",k.Voice_costumes_tutorial="b7a2a519-1334-40c8-b238-1917c0cb4bad",k.Voice_endgame_post_puppet_master_9_dragon_isle="b86a1b08-66f4-4b10-89fb-8e9ac02f10c6",k.Voice_forestQ10="9448d6e5-5212-47d9-9138-40643f137531",k.Voice_forestQ11="407cd4a8-c70e-4e67-882b-fc3f0a4a7dec",k.Voice_forestQ12_flora="b2c27420-1927-4082-a896-c51baad604d6",k.Voice_forestQ12_florian="c5a28bce-e616-4544-8f4e-dea46bfd4877",k.Voice_forestQ12_gerald="de65df15-d7cf-4a45-a34d-d922db1d244b",k.Voice_forestQ2="f718c977-b0be-47a5-b32a-f7c85123e5c7",k.Voice_forestQ3="bed2b67a-c3cf-4004-9775-87bb05956b52",k.Voice_forestQ4_bok="039e1365-4dab-4172-84a3-2e60b137d94f",k.Voice_forestQ4_flora="b60decd1-c74f-41c3-ad7d-0e020699d59a",k.Voice_forestQ4_florian="e1b742a7-16e7-405f-ad28-4ba97c9ec35a",k.Voice_forestQ4_pippet_pm="718c3eda-5abd-4eee-8b14-c4af1a3f08ef",k.Voice_forestQ6="752334fc-2b56-4b86-9ec8-b987b45c4ed8",k.Voice_forestQ7="4eeb621d-ef32-4a7a-81fa-77012dbc8d00",k.Voice_forestQ8="f448bea6-cc75-43be-bcd5-082c6e54f0ac",k.Voice_forestQ9="15579768-b744-4f6a-800e-2e16d6d8ae22",k.Voice_login_credentials_reminder="c42cbe2b-6ec4-4aef-bf6d-831a23501d7f",k.Voice_noot_bundle="ee7f8ba7-057b-4ec1-b286-33577826de25",k.Voice_noot_ftue_battle_1="87731b6c-02bc-45cf-b254-94603c497f88",k.Voice_noot_ftue_battle_2="0cd2217b-262f-45cc-9690-24754190b0fe",k.Voice_noot_ftue_battle_3="906dd7fa-4222-41d2-9aec-a479c7aea2ec",k.Voice_noot_ftue_character_creation="1aebe87a-fd47-48e3-8d1f-bd5d37da1319",k.Voice_noot_ftue_choose_spell="a5900a44-87a4-4a2d-b74f-6802bd75dcf4",k.Voice_noot_ftue_choose_target="fd6eff8f-3b0d-4e77-bc21-9076fcc659fd",k.Voice_noot_ftue_encounter_1="1391f7d3-713a-4c9f-89c0-6942b7c68d2c",k.Voice_noot_ftue_encounter_2="0ecba55f-c642-4bed-8732-b24d9a5a175e",k.Voice_noot_ftue_great_hall_2_1="6cc08048-03a3-4662-8531-ca5f30b253c9",k.Voice_noot_ftue_great_hall_2_2="bca7007e-cc1c-4d07-865e-1641146cd66e",k.Voice_noot_ftue_great_hall_2_3="f0105409-9ae2-4f90-bc8d-4efd284890ea",k.Voice_noot_ftue_great_hall_4="77ee831b-1c87-4e05-affa-3363b73dca51",k.Voice_noot_ftue_intro_1="25112f49-9657-42d0-b808-66200974a770",k.Voice_noot_ftue_intro_2="a4d985a0-e832-42bd-8eaa-174f9ac0b826",k.Voice_noot_ftue_magic_1="5deb5b21-d7e7-4550-86d2-7177952d64de",k.Voice_noot_ftue_magic_2="c34b7f8a-3374-4ff1-9e84-fc2d0f0de744",k.Voice_noot_ftue_pet_rescue="f7da42d7-5b1d-442f-b0f6-f5cacb810958",k.Voice_noot_ftue_pet_select="f5fd2631-1019-4c6f-8012-21d807d0ae96",k.Voice_noot_ftue_secret="151a9e02-cca3-42aa-b4e5-2b8860ed8c3d",k.Voice_noot_merge_button="3ed05219-8bd9-4fad-a451-f7987998de68",k.Voice_noot_merge_new_merge_your_pets="5303bef8-f9e5-4d8d-a431-f9a0011d5d74",k.Voice_noot_merge_open_pet_roster="08d4d3d1-a2e7-4f9c-9833-fd02b74c1765",k.Voice_noot_merge_pets_at_bottom="8615b753-4e50-41c7-a7d0-f124c3096844",k.Voice_noot_merge_ready_to_merge="45669959-a78c-4131-83ee-909c01d86cbd",k.Voice_noot_merge_see_that_pet="48d66fbc-5a49-4ed8-a8b6-f0d97b082032",k.Voice_noot_parentAttach="98f688f9-39d5-48d3-8a90-b7ea1206bb67",k.Voice_noot_petgear_tutorial_1="48b20bce-9549-4a47-8fb3-8f1bea0b02da",k.Voice_noot_petgear_tutorial_2="40c0c01b-212e-488f-9ef2-d61a56324009",k.Voice_parental_consent_explanation="e0783d65-b4a8-42bb-ada0-e48de8fb88c5",k.Voice_physicaldragon_barks_are_you_any_better="d7b49452-506e-4d6c-b298-9b4d13181b82",k.Voice_physicaldragon_barks_at_our_best="3b882497-68e1-4f0a-99af-c4a5946efe1b",k.Voice_physicaldragon_barks_bested_me="ba1b3f47-fc6a-4efb-a659-66c1b51b3e5e",k.Voice_physicaldragon_barks_capture_me="42bb8e86-f329-4be7-8514-2c8abacdc1b5",k.Voice_physicaldragon_barks_come_on_wizard="675027ea-32cf-4060-b6d9-7b57d10a759b",k.Voice_physicaldragon_barks_common_enemy="ec7b77b2-5938-4798-afeb-7cc05546f754",k.Voice_physicaldragon_barks_couldnt_beat_you="426d5033-12b0-4f9d-9249-e61b14d9e9cf",k.Voice_physicaldragon_barks_crush="78b13812-5de4-4be3-9143-f11666cb14a1",k.Voice_physicaldragon_barks_defeat="4c96ab3b-8464-4dd8-938d-cd277c58908c",k.Voice_physicaldragon_barks_didnt_let_last="4f98dd5d-615c-4da2-83fd-631200ede10c",k.Voice_physicaldragon_barks_discouraged="32ff5fe3-3dac-4e96-b2d7-28837b8787c8",k.Voice_physicaldragon_barks_focus_on="b16d4e28-5bd7-4621-8f8c-0bd3ac2af870",k.Voice_physicaldragon_barks_goals="6a0a0e39-d085-4d48-a6ed-57d232c92f37";k.Voice_physicaldragon_barks_good_fight="cce6e142-394e-4bee-a481-0887436c51ed",k.Voice_physicaldragon_barks_great_work="bdae3354-3ce1-4252-adb5-cee8b60a320e",k.Voice_physicaldragon_barks_grow_strong="10383451-d7f9-438c-9654-88aaa40b0500",k.Voice_physicaldragon_barks_hit_the_gym="b2b3cb19-e232-4a5a-900a-20e114b31b6a",k.Voice_physicaldragon_barks_i_am_stronger="1798181f-df7c-4cae-8a95-343853541952",k.Voice_physicaldragon_barks_i_hope_youve_been="36b6807c-a16c-48c0-b037-b3df3bfbbc59",k.Voice_physicaldragon_barks_impressive="8f0e21cd-152b-49ab-b1da-01872560a49c",k.Voice_physicaldragon_barks_incredible="c3af7589-0928-41c0-984e-c6f6923cd2ca",k.Voice_physicaldragon_barks_intense_workout="59d78525-13a2-4eee-9fb3-d79e1a6a6775",k.Voice_physicaldragon_barks_magic_muscle="1e5a891c-5b0c-4dc3-a218-e94d5e78e64b",k.Voice_physicaldragon_barks_must_be_ready="56791c11-af4d-45fb-9678-2ce107288c1b",k.Voice_physicaldragon_barks_need_to_prepare="bfa3e0a2-8b33-425e-bb38-7f4d4c137043",k.Voice_physicaldragon_barks_paying_off="f03ff598-796e-42b0-b1ff-9c316c6e3884",k.Voice_physicaldragon_barks_prove_it="bbbc37f1-ed8f-4df3-9a4e-fcb87d163c85",k.Voice_physicaldragon_barks_puny_puppet_master="9ac41e5b-e02e-49c1-ae6e-ea5be6f98d3b",k.Voice_physicaldragon_barks_push_our_limits="9c730d52-fe17-4235-8694-115e71f501a8",k.Voice_physicaldragon_barks_push_yourself="4b9cd045-caf9-4e7d-b3a2-21389c779aa3",k.Voice_physicaldragon_barks_real_challenge="856c2983-53e1-4da8-9f0e-f6bd71bac6d3",k.Voice_physicaldragon_barks_skills_are_improving="652b0fb4-4ab1-488e-adc4-9709bf0251ea",k.Voice_physicaldragon_barks_spells_weak="6c2b3a74-9478-4fbe-beda-bc0b27e11e23",k.Voice_physicaldragon_barks_stand_a_chance="829fd4f3-2e74-41f8-a02b-ac17ad740a3a",k.Voice_physicaldragon_barks_true_strength="76211c06-3cea-407a-abcf-910da0dac394",k.Voice_physicaldragon_barks_unscathed="9701c840-a9e7-4bbb-b390-ee09e7b8c014",k.Voice_physicaldragon_barks_unstoppable="945f6b48-dc48-47c9-b43c-cd7a229eda28",k.Voice_physicaldragon_barks_vow_to_defeat="4efb5001-dd9e-4720-b277-c35f5bb011b7",k.Voice_physicaldragon_barks_who_is_this_puppetmaster="b2c842c3-55c8-429e-bcf8-91ad1135256c",k.Voice_physicaldragon_barks_will_fall="c162a5ec-0e1d-4f1c-8d2a-0c8de5d5f7e3",k.Voice_physicaldragon_barks_you_wizards_all_same="9879fe0a-e14b-41b5-bde8-49e8c749d8fb",k.Voice_physicaldragon_barks_youre_stronger="9e74046c-9959-47df-b50a-8e921e1d3b61",k.Voice_puppet_master_ftue_encounter_3="751dbd19-2ba9-4793-a915-b545bec0ae8d",k.Voice_puppet_master_ftue_locking_zones="b4b0ffd5-51b3-42f4-8df9-5f7c84ba2726",k.Voice_restriction_tutorial="139933de-56c2-47e4-b217-ed2b90204e37",k.Voice_restrictionsFTUE_Noot_01="0070a683-6d11-40d9-9ba7-48d50ec54e65",k.Voice_restrictionsFTUE_Noot_02="18025f8e-d6dc-44e8-bc88-71ee014a4d22",k.Voice_restrictionsFTUE_Noot_03="779c891e-db4c-4d31-9264-75c03344b5e1",k.Voice_restrictionsFTUE_Noot_04="1ea06190-02e0-4c25-a98c-f041728c498d",k.Voice_restrictionsFTUE_Noot_05="174b182a-657c-4e1e-9a1d-5ba6932d864d",k.Voice_restrictionsFTUE_Noot_06="a555c536-fa6b-4329-94ba-c8f6f4fe40cb",k.Voice_restrictionsFTUE_Noot_07="3a18911c-338d-4496-931c-a8037a4540b6",k.Voice_restrictionsFTUE_Noot_08="19fa6f83-509f-49ff-b33f-3c22653da81c",k.Voice_returnToFireflyForest="1fbc5b10-e687-46d3-8a43-04a67663828b",k.Voice_rifts_barks_phase5_lose_firedragon_04="5797299f-334f-4b1e-ac95-b62271b47655",k.Voice_rifts_barks_phase5_lose_firedragon_05="2430c05a-abd5-4d68-a224-433ffdafc3f6",k.Voice_rifts_barks_phase5_lose_firedragon_06="b03a0453-dbdc-4314-afec-e11e64ec92ff",k.Voice_shadowdragon_barks_a_bit_stronger="47586556-3026-4af6-a56e-68a0ce7724b9",k.Voice_shadowdragon_barks_another_challenge="e3615fac-06f9-4883-ba69-55ca7dc55fdb",k.Voice_shadowdragon_barks_another_shadow_creature="be601471-67ea-4d2b-906a-238e1833dd3d",k.Voice_shadowdragon_barks_aww="841a9d6b-676c-45f4-8e78-f2346e855029",k.Voice_shadowdragon_barks_aww_im_tired="a2fd8f30-022d-4d7c-aa20-19d22b082cd3",k.Voice_shadowdragon_barks_be_friends="4f5f5b8f-a880-457b-8464-78a58a6ff6af",k.Voice_shadowdragon_barks_better_than_this="06090c46-a437-4504-af24-e3224107e350",k.Voice_shadowdragon_barks_come_back="f431049c-60b9-4aac-9802-97bf6bef7771",k.Voice_shadowdragon_barks_come_on="1e9a2384-ac63-4378-a359-9ae8ff9054b1",k.Voice_shadowdragon_barks_darkness="a23e3f92-87ac-4b6b-b6df-fb6c14f21d8b",k.Voice_shadowdragon_barks_did_you_know="80afbf53-16fc-43c4-a074-b0abc9d27230",k.Voice_shadowdragon_barks_different="086200ec-5cf0-40ea-be5f-d4a8e6b64db3",k.Voice_shadowdragon_barks_do_you_know_why="3fad0075-d72e-426d-a2dc-fafa3584b51a",k.Voice_shadowdragon_barks_dont_be_afraid="0c64d0b7-ca5f-4738-89e4-602656e323c1",k.Voice_shadowdragon_barks_dont_give_up="27506445-59ea-4948-94eb-5f5b573580cc",k.Voice_shadowdragon_barks_dont_hold_back="6e116961-b271-4555-88ab-367f55bf4b6d",k.Voice_shadowdragon_barks_dont_worry="fcd3c137-9162-45b7-a387-b3343164d037",k.Voice_shadowdragon_barks_end_well="abab1a73-96d5-4a35-b732-07d95ffe50f4",k.Voice_shadowdragon_barks_face_your_fears="7722b937-f52c-469e-9a62-2dce36108ac3",k.Voice_shadowdragon_barks_first_real_friend="ef3dbc87-238c-48db-82cc-3b2d7b9f0149",k.Voice_shadowdragon_barks_friends_yet="6d1c9fe1-9fb1-4b93-b6a5-381e03d3ffdd",k.Voice_shadowdragon_barks_get_stronger="39e22e54-5cbe-49f7-985d-cb57f145929c",k.Voice_shadowdragon_barks_give_up_too_easily="d031c2ef-dba7-4530-83b9-e93fa17a51bb",k.Voice_shadowdragon_barks_good_challenge="d9572171-1a4a-4035-ab0a-c62c3ac14da2",k.Voice_shadowdragon_barks_handle_my_shadows="536c4ca2-ac0c-4c2b-8062-3c13c575fc12",k.Voice_shadowdragon_barks_hasnt_come_back="8a44a303-3543-4a7b-a6c6-344d9aeb759c",k.Voice_shadowdragon_barks_help_you_get_ready="5bfbb582-520a-47ea-942c-813e0bfa4d1f",k.Voice_shadowdragon_barks_help_you_get_stronger="6a60c4bc-8518-4b63-97e6-c7326cfa7de7",k.Voice_shadowdragon_barks_here_again="6d348128-b855-4ef5-9a07-47e5de681b55",k.Voice_shadowdragon_barks_i_believe="0660a731-011d-4a50-ab91-abb2efd9691b",k.Voice_shadowdragon_barks_i_can_beat_both="43c93a9e-0748-4aa9-9a6a-07df381004d5",k.Voice_shadowdragon_barks_i_can_trust_you="d9ef0f7a-435d-43b8-8f54-df585e51396a",k.Voice_shadowdragon_barks_i_guess="c4503ad1-909f-45eb-8924-a1d14b6dc930",k.Voice_shadowdragon_barks_i_knew="9e86e248-58cf-48a5-8a79-386362e889d9",k.Voice_shadowdragon_barks_i_wont_be_defeated="d56e83d1-dfb4-44d4-9227-99b392000502",k.Voice_shadowdragon_barks_ill_be_here="ee418f32-e3d0-4535-bd7b-d37bb627610f",k.Voice_shadowdragon_barks_im_glad="6db4512b-ea23-49c2-a777-1ed847ce06a0",k.Voice_shadowdragon_barks_keep_fighting="6e37cc0a-2df0-48fc-aa87-b681fcdd5d08",k.Voice_shadowdragon_barks_keep_up="1d64f1e8-c430-4323-9694-00520a2911d6",k.Voice_shadowdragon_barks_let_you_escape="369d1694-bebd-4d29-89c9-f603c1bb606b",k.Voice_shadowdragon_barks_little_shadow="df9bfddb-b596-4287-8e18-bce1551fb774",k.Voice_shadowdragon_barks_look_so_scared="afba3c41-8388-4a7e-bdce-7644071ef16c",k.Voice_shadowdragon_barks_lost_again="114b09b8-34fa-419b-9e02-7aae7c64d53a",k.Voice_shadowdragon_barks_maybe_not_like="ca7c8501-c9eb-475e-bf2f-328a66a520b0",k.Voice_shadowdragon_barks_miss_me="6d825909-963f-4f64-a7a5-56242539a144",k.Voice_shadowdragon_barks_most_run="60f026a8-1343-47a5-bc66-9715e88adc49",k.Voice_shadowdragon_barks_need_a_friend="d9ffaa94-2345-45d5-a3d7-2a8c222092cb",k.Voice_shadowdragon_barks_need_to_train_harder="b15e9e10-a99a-4f55-be24-3c991f064552",k.Voice_shadowdragon_barks_new_friend="2194329f-fec8-42a1-8e98-3aceb370fce7",k.Voice_shadowdragon_barks_not_like_other_dragons="2ed4e11c-cc2b-45cb-a003-0a425eb74969",k.Voice_shadowdragon_barks_not_like_the_other_dragons="5b90f22e-922c-45b8-86fe-e60838afbb40",k.Voice_shadowdragon_barks_not_like_the_others="35e3e01d-aa1d-496f-9285-9c9c43eccb60",k.Voice_shadowdragon_barks_not_scared="d960476c-a628-4961-b550-a98e1d00f6fe",k.Voice_shadowdragon_barks_oooh_which="d1d313e1-6a36-4375-8996-92f72b319033",k.Voice_shadowdragon_barks_penumbra="16d54f67-a510-4171-adae-d0ac567bd595",k.Voice_shadowdragon_barks_penumbra_is_my_home="dfba1dc3-30f5-4bc7-98a8-41ab98c5412e",k.Voice_shadowdragon_barks_play_rough="11100f80-1fe6-4ce4-b2da-6dedd889e5bf",k.Voice_shadowdragon_barks_play_so_rough="e7cdaff6-0d0e-48c5-b455-2b7473b9f1bf",k.Voice_shadowdragon_barks_promise="b6b1413d-0dc4-493a-b1c0-0b5b8b033a7f",k.Voice_shadowdragon_barks_puppet_master_found_me="f8224e9e-7465-497c-9197-66b9746d7ac1",k.Voice_shadowdragon_barks_puppet_master_play_too="eb2495cb-b65f-42d8-a181-831ebb9c675a",k.Voice_shadowdragon_barks_ran_away="2dccaee6-47d8-4167-81c5-0cdd262c4ff2",k.Voice_shadowdragon_barks_ready_next_time="df1d50e8-24b0-4160-9d0f-2074c6899147",k.Voice_shadowdragon_barks_run_away="209101f5-9d8d-45b5-921e-52c521e626c2",k.Voice_shadowdragon_barks_run_away_from_me="f151c74e-1091-46fe-be18-b35fe491b830",k.Voice_shadowdragon_barks_runs_away="cf4d0c1e-de58-4e0d-817e-d6f35253a83d",k.Voice_shadowdragon_barks_scared_of_the_dark="448383f1-6956-4861-b6c3-971743f60d99",k.Voice_shadowdragon_barks_scared_yet="a496e4ed-9be2-451a-aa2e-59f8421bf0d6",k.Voice_shadowdragon_barks_shadows_gather="7ac3d64c-3790-4c73-8968-a477702ead49",k.Voice_shadowdragon_barks_show_puppet_master="79ea3125-e676-4c67-9cb2-0baff194a29d",k.Voice_shadowdragon_barks_so_easily="8873f717-e2ef-4b61-922f-54f3b976c836",k.Voice_shadowdragon_barks_spirit="413aa94d-d7b6-4eb5-b592-53405722730a",k.Voice_shadowdragon_barks_stronger_now="19c4998b-ecdf-4809-8ba8-d476d2a550d2",k.Voice_shadowdragon_barks_surprised_me="6a6f0469-3444-4db3-91d3-d291189a1b69",k.Voice_shadowdragon_barks_thanks="05d8e6f5-084c-44c7-9c7b-1bf576ba5981",k.Voice_shadowdragon_barks_that_was_fun="6e4d44ff-4b6f-4620-9339-641170272dc8",k.Voice_shadowdragon_barks_the_other_dragons="6832c74a-8e22-49ce-a820-b15b1a01b847",k.Voice_shadowdragon_barks_this_will_be_fun="9fd9d424-28a0-4c15-99b2-6b942775f7e7",k.Voice_shadowdragon_barks_training="dfc05d25-580f-449e-adbc-c3bee26c0226",k.Voice_shadowdragon_barks_training_hard="0f53b8cb-6cb4-4f9b-a08c-b7ab62f0752e",k.Voice_shadowdragon_barks_tried_to_catch_me="ce029a0a-31d8-4b72-803f-1512bbd257a2",k.Voice_shadowdragon_barks_understand_the_world="25f4aa2f-74d9-4512-a028-1e81f0fbd1cd",k.Voice_shadowdragon_barks_very_brave="491d51d7-f92d-47bb-81fa-9ea0afefb99f",k.Voice_shadowdragon_barks_want_to_understand="05d6fbc9-9c0a-4f57-b987-5d4120f4e198",k.Voice_shadowdragon_barks_we_can_be_friends="97dd64ea-1acb-454b-9581-ce3b915d4abd",k.Voice_shadowdragon_barks_were_both="8959790b-f840-4814-b30d-a22224c726b3",k.Voice_shadowdragon_barks_win_this_time="151025aa-15e5-4beb-8e84-2a637407ef96",k.Voice_shadowdragon_barks_woah="7eb84b41-7942-40eb-b327-e1d59128e694",k.Voice_shadowdragon_barks_wondering="a95066e3-697d-4bd8-8b65-85570e30bc88",k.Voice_shadowdragon_barks_wont_bite="eab1886d-b2be-4f00-a483-932f7d875a3f",k.Voice_shadowdragon_barks_wont_go_easy="751fca3e-ea17-435a-ba45-356cc5270736",k.Voice_shadowdragon_barks_worthy_opponent="79a34676-3b3a-4d65-85d4-26cdf38239a2",k.Voice_shadowdragon_barks_wow="cd5540b1-7763-47ef-af13-8c5b271e0f91",k.Voice_shadowdragon_barks_you_actually_beat_me="01df7a4f-fd26-46f6-a2ce-5e3e24c0a792",k.Voice_shadowdragon_barks_you_lost="2ad5a136-5bcd-47b0-b00f-0bbea4293ea7",k.Voice_shadowdragon_barks_you_won_this_one="d6363d52-3fb7-4f5f-ad72-7593e5027acd",k.Voice_shadowdragon_barks_you_wont_beat_me="8078c6aa-420d-4da7-909a-f6258b6df951",k.Voice_shadowdragon_barks_youre_back="9144cc7d-7852-42c5-954c-6e4d89150a40",k.Voice_shadowdragon_barks_youre_different="aae521ee-43f0-46a8-8398-793088d0b9bb",k.Voice_shipwreck_shoreQ5="538c134f-7892-4b58-8ff1-7aa0bc80bccd",k.Voice_shiverchillQ1="e81783f4-742e-47a9-b678-e835f5511729",k.Voice_shiverchillQ8="2d4cf644-4954-451d-9074-472f8f3867c2",k.Voice_skywatchQ6="e0a70bed-40d0-4dd1-8c74-094465363f63",k.Voice_theo_ftue_battle_1="b898c3a9-37ff-49fa-b3ed-50b69b562bff",k.Voice_theo_ftue_great_hall_1="2c61e59f-9268-447f-b74a-ca671cab5e8a",k.Voice_theo_ftue_great_hall_2="b968c2b9-2482-4579-8c22-1b9ba0c5f156",k.Voice_theo_ftue_great_hall_3="583fd3f3-0524-4029-b572-1dce7f0044e3",k.Voice_theo_ftue_status_effect_academy_1="e84f4a71-67cd-43b4-abf4-95a51a2b6998",k.Voice_theo_ftue_status_effect_academy_2="0ccbad51-4ecf-49e3-86a2-8319cc079a86",k.Voice_theo_ftue_status_effect_academy_3="173ef992-3667-4df8-8961-b25a1a81dc93",k.Voice_theo_ftue_status_effect_academy_4="2360f0d6-daa7-41a0-bd56-97737a18bc4b",k.Voice_theo_ftue_status_effect_battle_1="2ae12b93-aab3-4860-9093-3ef5f016eb9b",k.Voice_theo_ftue_status_effect_battle_2="1cf0ff98-caab-4e6e-ac85-2e62d5ac35d7",k.Voice_theo_ftue_status_effect_battle_3="436bede8-752f-44f7-8b27-c68f348ee867",k.Voice_theo_ftue_status_effect_battle_4="e5bcb33e-5b1d-4426-8b63-2c3eb5f5dcde",k.Voice_theo_ftue_status_effect_battle_5="44416e68-e18b-4656-870b-613fd5cc460f",k.Voice_theo_ftue_status_effect_battle_6="1405942d-a77b-4169-bd56-8f88c5a015df",k.Voice_theo_ftue_status_effect_intro_1="c52ed43b-5079-4bfc-829a-eb93524974b3",k.Voice_theo_ftue_status_effect_intro_1B="2e99ec10-5627-4241-90d9-fd45ca0f731f",k.Voice_theo_ftue_status_effect_intro_2="e58f1db4-5b14-4514-9b7c-114e35cdf531",k.Voice_worldmapZoneLockCutscene="de25b378-9651-474b-ad75-c18eb6ba1212"}(F||(F={}))},85855:(k,B,U)=>{"use strict";var F;U.d(B,{V:()=>F}),function(k){k.Bgm_academy_greathall="e79dc398-f0eb-456a-af9d-1759d9c32fb2",k.Bgm_ancient_battle="0ef7576d-f3c1-4191-85b7-d769782cd8ee",k.Bgm_ancient_hub="0d3050e4-dd5e-4502-bf75-b1af732717dd",k.Bgm_ancient_map="543a6fcc-3ea6-4c27-9b9e-31994ec6d4f5",k.Bgm_ancient_rune_run="b15669da-9a8d-411e-98f2-099a4985c744",k.Bgm_archives="0fcec453-ff3f-4a64-bffd-2abe3120d115",k.Bgm_arena_challenger="2d354a8a-5184-4e0e-aa91-c6f9ecab09ec",k.Bgm_arena_leaderboard="3406f114-73e0-4973-b5d3-6c7edce3613d",k.Bgm_arena_league_battles="db9a057e-1131-4177-a82b-32943cfa53ef",k.Bgm_arena_lobby="19802a7f-5458-434c-9571-f10fcc45dd7f",k.Bgm_arena_progression="25d8dbb6-7775-4306-92d4-5fe36054dbf0",k.Bgm_arena_progression_cheering="d36870e0-ca0b-47be-991f-922b9d2949b3",k.Bgm_battle="4d69c3cd-c3c3-4978-9faa-7a0d711c6a65",k.Bgm_bonfire_spire="56b79d1d-250a-44ae-9364-7e8659020992",k.Bgm_dance1="299f19fd-c6c2-4356-b7fe-5948fc87495c",k.Bgm_dance2="401a961f-d196-40d1-9414-581512ec1077",k.Bgm_dinosweeper="2e553538-13dc-4a08-8ca8-3abd84b5a280",k.Bgm_earthtower_bamboo_forest="7a82929c-5511-495e-b434-a9aa27d7b8a3",k.Bgm_earthtower_dmv_secret_path="debd0200-6fee-4cc3-9297-4aa544e1ba0a",k.Bgm_earthtower_tropical_rain="db8ebe45-6749-4aa8-89bd-270dd20adff9",k.Bgm_firefly_forest="7ab9248d-63bb-4b18-a49e-32e95db8926e",k.Bgm_floatlingfling="7a5ef731-9314-4758-af3a-bbb6897767f7",k.Bgm_fun="91474aa9-9e54-4e4c-a1e7-07a4786f2130",k.Bgm_game="305dcdfe-5032-4fcd-a67c-f79ef3ff27f7",k.Bgm_icedungeon_boss="b64946bb-416e-4770-ae88-f1e6b6c066ce",k.Bgm_icedungeon_inside="2c468736-584e-49dc-8661-36ad146f9698",k.Bgm_icedungeon_outside="c7e05de2-5172-4960-86af-efa13ad94360",k.Bgm_icetower_main="681e4d18-87de-480f-bca3-33f85ef17407",k.Bgm_icetower_postrescue="163aa033-7921-4c72-8922-4c771493f689",k.Bgm_intro="a5fb84ed-9ca3-4f74-b745-1d3090c54fed",k.Bgm_intro_1="79c8287b-4a2c-4ed1-82ab-90bb619abf63",k.Bgm_lamplight="d42586bd-91f8-4578-996a-fdc0d17237d0",k.Bgm_moonlight_fest="592d8b21-1913-4da6-89ba-13b21e28d0f3",k.Bgm_pumpkinfest="d6e99986-35da-4899-90bb-b4e291288e48",k.Bgm_puppetmaster="d276bd04-abc5-46dc-b343-8bc6156a4be2",k.Bgm_shipwreck_shore="dd76fa12-7677-49cf-9fc8-e2a1fd14052e",k.Bgm_shiverchill_mountain="b48326bd-3a03-4770-bfdd-882ac9e0cf35",k.Bgm_skywatch="2f6b8966-8f6e-4936-b45e-23489f9fb33d",k.Bgm_space="04bd8ce1-1834-463b-8d83-ef04365b6676",k.Bgm_spring_fest="9dcfb88c-e09d-44eb-8812-6e2305ddb7f8",k.Bgm_starlight_festival="d0754bb7-8e21-4efc-bf38-5de2220f92be",k.Bgm_summerfest="623499b8-4e36-4e36-98c9-6e9503e3b6bd",k.Bgm_towertown="ea3c00a3-0fdf-4775-8b3b-2bcac93220ac",k.Bgm_tutorial="e402e5e8-273a-49be-92aa-f7be3a2b8366",k.Bgm_victory="b86b6bd3-89e2-4fba-926c-3484be60c994",k.Bgm_victory_short="b86b3ce2-99b0-47bf-9117-17dbb5a46826",k.Bgm_winterfest="82ed0747-6d7a-4906-85ab-116ac792df86"}(F||(F={}))},25308:(k,B,U)=>{"use strict";var F;U.d(B,{e:()=>F}),function(k){k.Academy_endgame_encounter="0071cba8-e2e2-422c-b8cd-4f3ad8563458",k.Bonfire_spire_c3_encounter="19ac6101-24f1-4cf0-bb10-73690aba013e",k.Bonfire_spire_hard_quests_encounter="73670a90-6da7-4fab-9ff2-953b83c58103",k.Bonfire_spire_quests_encounter="faafed48-8d48-47ea-9d96-5a0830a63293",k.Ftue_revamp_normal_special_encounter="14ab8d41-0c4c-4c75-b659-b4a346c4b373",k.Hard_boss_encounter="8d0e2b18-2366-4333-99f1-ec74bb352975",k.Hard_first_encounter="c933b784-759d-4f0a-a3f3-665da315df86",k.Hard_random_encounter="e6813f4f-48b6-41b9-81d4-19e0309e1f93",k.Hard_special_encounter="c8d839ee-a16d-492d-b333-1e66f8f5e81b",k.Normal_boss_encounter="4958320f-36a0-411a-bf69-dad1c44d76c6",k.Normal_first_encounter="99f8b1e3-1e2f-43f3-92b2-05c0dc31891a",k.Normal_random_encounter="22d3b88c-cbee-49af-9169-54cf0bbb5534",k.Normal_special_encounter="0e58412d-c80f-4886-aacc-9757c8f5f2e3",k.Shipwreck_c9_encounter="57f3493e-c9c4-4874-9a83-5dd72b9ac86a",k.Shipwreck_hard_quests_encounter="f1878d64-5eb7-4001-9947-b046216fc651",k.Shipwreck_quests_encounter="93c88d25-382d-499b-a395-8de32ffa9f4d",k.Shiverchill_b6_encounter="a990c753-2d35-447c-afbd-f9a80c7f5e99",k.Shiverchill_hard_quests_encounter="b955f0d2-b24a-4bd4-a5e7-3151157e998f",k.Shiverchill_quests_encounter="2c37a6e7-1987-41cd-8538-2820b48545b7",k.Skywatch_c3_encounter="6a9f55dd-d6f2-4b04-ba0d-532689e4a1c0",k.Skywatch_hard_quests_encounter="aeefc86b-099d-4502-bd39-490cebcb5fb1",k.Skywatch_quests_encounter="bc205792-bff1-4d0a-a807-ccd123214f6f",k.Test_encounters_encounter="7c1a528d-3836-4472-b50b-25d627e19280",k.Tutorial_quests_encounter="2bf2e1df-52bf-4895-bfb5-2037d634ac1e"}(F||(F={}))},24521:(k,B,U)=>{"use strict";var F;U.d(B,{r:()=>F}),function(k){k.After_school_widget_ftue_json="6969a2ef-da8a-4ccf-863e-461b58a98be9",k.BackpackConfiguration_json="5f644853-2216-475b-b14c-76274465edf8",k.BattleRevampConstants_json="c56d5e8f-8ae7-4fe2-9771-58bd051834ca",k.BossBarks_json="545f26e5-613e-4a3c-8fdf-6f344a460e41",k.CombatFormulaScalingConfigs_json="6482e360-92af-498d-ae82-789a13031cd5",k.ContextualPrompt_ChargedLevelUltraUpsell_json="128abe36-af3e-41be-9583-e861fd21229a",k.ContextualPrompt_MemberJarDualPackage_json="f774fbe7-97a4-4ee3-9c90-b427884b7a35",k.ContextualPrompt_MemberJarUltraFocused_json="018f747d-3a21-4bca-a1a0-dab3a4cac180",k.ContextualPrompt_PetEvolution_UltraFocus_json="efd93c6d-90f3-4c86-87ce-c5b36ee21027",k.ContextualPrompt_PetEvolution_json="b6f8a3f6-2e77-44fa-9943-42f2ebe922d4",k.ContextualPrompt_PetRescue_DualPackage_json="94933ceb-337b-49c9-9c06-68359f524560",k.ContextualPrompt_PetRescue_UltraFocused_json="0d85d143-1359-41cd-8da8-3dfd2fea4974",k.ContextualPrompt_PlayAfterSchoolAd_json="6baed730-3fc3-4955-87dc-7b6bb91df8c5",k.ContextualPrompt_SegmentedOffersDualPackage_json="13db027d-8766-43eb-88c6-b58d15505985",k.ContextualPrompt_SegmentedOffersUltraFocused_json="88b12f43-3da5-40ad-95c2-c5d76f7de2f2",k.Dragon_isle_reveal_data_json="5065775f-d3a2-4209-8479-19ae49ed68d7",k.DynamicParentPromptRuleset_json="8ec01565-e4ac-45d1-a2fb-a7395c4783f3",k.DynamicPromptConfig_json="df500fe0-f798-40b0-9461-2c383a2fa8c8",k.DynamicPromptRulesUnifiedFlows_json="b3826cf8-dd1d-41a5-a50d-f298d0c80853",k.DynamicPromptRuleset_json="9aa328f2-2089-4aeb-983f-4cdc8b00cf0d",k.DynamicPromptTest_CatchMorePetsShortTitle_json="955b59ff-9f54-43e4-b456-9938041bcba5",k.DynamicPromptTest_EndofBattleMemberChestShortTitle_json="93a1d4fb-c9da-43f6-a87d-48cb167768b4",k.DynamicPromptTest_NonMemberStarJarShortTitle_json="97259080-624f-4a5e-82aa-14fd7a5ee20b",k.DynamicPromptTreasureTrackUltimate_json="cf67faf2-aa94-4b74-9661-c1d6b040739b",k.DynamicPromptTreasureTrackUltraOffSeason_json="01065eed-02f8-4203-913d-d5fcfc0d487d",k.DynamicPromptTreasureTrackUltra_json="dc7fc8c3-3327-4498-81b6-7f14683b8a18",k.DynamicPromptUltraUpsellInternational_json="ea57623f-18fe-420d-9e5a-a19b30b686b7",k.DynamicPromptUpsellMagicoinInstandReward_json="d8b140e5-84b3-40eb-becf-65bf7135dd39",k.DynamicPrompt_BattlePassMobileUpsell_json="515f4c90-5ca4-49b0-9483-57e1909161aa",k.DynamicPrompt_CatchPetsValentines_json="b4b848fa-0c9d-4305-afd8-7b5dc83a4d2f",k.DynamicPrompt_DualOTPUpsell_json="e0536b94-973b-49db-a7a1-110c8ba3c538",k.DynamicPrompt_EvolvePetsShortTitle_json="4f955752-39c7-4f2e-8d01-907c572a1e0b",k.DynamicPrompt_Getmoregear_json="9ef3fb60-208e-48e7-9c9f-e138cb50ae1b",k.DynamicPrompt_MagicoinOTPOffseasonUpsell_json="d6ee0487-11ee-41fc-b4fa-992290c1c984",k.DynamicPrompt_MagicoinOTPUpsell_json="c2fda55e-ff25-4aae-b5cb-6c3469d25a54",k.DynamicPrompt_MemberJarAd_json="422f9260-af01-4be7-89a9-cb033c46704e",k.DynamicPrompt_MembersgetSevenLevels_json="627c09b0-2e80-46af-9d01-cd07c99e1093",k.DynamicPrompt_MembershipForMagicoin_json="cae370bf-f848-42b2-a667-8fad5b623458",k.DynamicPrompt_MobileMagicoinUpsellOffseason_json="c77ebacb-d171-4e78-b36a-7cb1cb4524d1",k.DynamicPrompt_MobileMagicoinUpsell_json="6dd2e248-5b64-4a67-82ea-2ae2b7e7ac03",k.DynamicPrompt_MobileMembershipUpsellOffseason_json="c28a8d45-0b2f-4138-a84e-3b7609c1926b",k.DynamicPrompt_MobileMembershipUpsell_json="9661c8f1-1e7c-4792-9458-002687716187",k.DynamicPrompt_OpenJarButton_json="a75b1e1b-b5f8-4ea0-9ae8-23763dcf5622",k.DynamicPrompt_PetGear_json="a509c42c-d4c2-4168-a696-82f6f374b62b",k.DynamicPrompt_PurchasePetSlotsGift_json="5218578b-aac1-4f5d-b8a2-852fb2970f5d",k.DynamicPrompt_PurchasePetSlotsLimit_json="e3165125-c079-4726-be78-7ba60a0913ea",k.DynamicPrompt_PurchasePetSlots_json="fb30b74e-3ff8-4b05-bd6b-9621a2ee3611",k.First_dragon_defeated_data_json="0a6642b9-0aed-40c5-9b46-b58f52b09538",k.First_dragon_orb_data_json="46d21f09-4aaf-4b8f-a1e7-33dba96a5004",k.First_dragon_rift_data_json="68d4183a-5551-4080-8076-f176fb4d60fc",k.LevelBasedPromptsRuleset_json="65e6f811-e988-4198-a4fe-370f5fb28821",k.MemberJarData_json="ac37cca1-0981-4fc6-b6ef-9904e7991f19",k.MembershipStep1Config_Buy_EquipMemberItem_School_json="2d213a07-b981-40fe-92b0-6808bc0b8ac3",k.MembershipStep1Config_Buy_EquipMemberItem_json="290091be-a590-4969-b62a-5483b45680fd",k.MembershipStep1Config_CatchMorePets_School_json="0a124599-a016-48aa-939f-35a3462f62ab",k.MembershipStep1Config_CatchMorePets_json="cad74b0a-09d1-485d-a861-25c4f3747c74",k.MembershipStep1Config_EvolvePet_json="0a06384a-d7c9-4394-a4c1-4607bc552fb9",k.MembershipStep1Config_NonMemberStarJar_School_json="bc21cfcd-9f66-4e48-b92d-33756651e143",k.MembershipStep1Config_NonMemberStarJar_json="87219a5a-55bd-4642-a21f-34167572c946",k.MembershipStep1Config_OpenMemberChestBattle_School_json="8dfae2c6-a015-4d22-aa7b-a6062ccab10a",k.MembershipStep1Config_OpenMemberChestBattle_json="bd389f39-2eaa-4077-9ead-62b903e1c1ab",k.ParentPromptConfig01_MemberJar_json="8636b574-483a-4894-adad-0cd49ea7070d",k.ParentPromptConfig01_json="490111de-8144-48ca-82c8-729e55b49adc",k.PetBenchVariationConfig_json="dcef6a62-180e-40c5-912b-4c87b654cf75",k.PetEvolutionandRescueCosts_json="07a10eba-c03a-41eb-9131-9a1c37becf85",k.PetMergeCosts_json="2fdf3d4d-cbfb-476e-b2b9-e3a96615f8e9",k.PetOwnershipRestrictions_json="280e0d39-ee59-4276-b4ce-3ff056903cd7",k.PetXPBoostData_json="4367ab33-751f-4600-8d2c-6886bd8f45a8",k.PlayerStorageMaxCount_json="1686c319-a09d-4522-baba-db85287da661",k.Post_first_rift_data_json="084fdb6e-6a11-43eb-ad7b-6a255cc4d64a",k.Post_first_rift_key_data_json="a43cf21c-bb27-491b-8fb7-ca11db110817",k.Post_pm_visit_data_json="1df305b4-93c3-4e2a-bc10-3df0a618d177",k.Pre_pm_visit_data_json="62f6f8af-d1d3-4876-9365-25a9bf3be9e4",k.RiftRunKey_1_json="3bf8a670-5afc-4113-8d51-eec627555d6a",k.RiftRunKey_2_json="38f2fe53-fe57-4046-b642-cbf34807ddfb",k.RiftRunKey_3_json="478eefb5-a10f-41c1-abb2-7b4a38d17193",k.ShadowBattleBackgroundConfig_json="20742cd9-a066-4292-8988-5a3a707cb618",k.SpellLevelBonusConfigs_json="23aeefbc-e0f6-40aa-b311-f058cefd6ec3",k.SvSLeaderboardRewards_json="00a0e127-2a9d-45f6-ada9-1f1fce3828b2",k.TotalUnitStatsGrowthCurves_json="2d946b19-14fe-4267-917e-3696b8360504",k.UltimatesPetLocationConfig_json="c63ad7c2-0ba0-42c2-8bdc-308a4e91945d",k.UnifiedConversionFlowRuleset_json="24912fe8-527f-4631-8e77-ad52043ba316",k.UnifiedRewardScalingConfig_json="20f8d71f-5e79-4f3c-9624-42229eb09587",k.Voice_Rifts_Barks_Phase1_Lose_FireDragon_01_json="3d2bc486-3508-43a4-96ed-a3431ec5a093",k.Voice_Rifts_Barks_Phase1_Start_FireDragon_01_json="d555f6d2-01e2-4171-a1a1-989b93450d11",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_01_json="0761b82b-0690-40fb-84e1-8e10b2aac836",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_02_json="d8c018a7-598b-4424-ba6d-e1ad554fcb42",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_03_json="a150ea6d-e102-4d4c-a00b-f8da8aec2116",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_04_json="e6933f58-42c0-4f6e-8712-40ffca4674d2",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_05_json="858390b6-787e-428a-a3da-01347ea4b991",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_06_json="f6c8ba5a-124c-4b3f-af49-ca8ca414946e",k.Voice_Rifts_Barks_Phase1_Win_FireDragon_01_json="bd09159e-9c37-4fb6-adc1-f0c07367fc58",k.Voice_Rifts_Barks_Phase2_Lose_FireDragon_01_json="8226543d-87dd-4a60-b4d2-d04bd158e29f",k.Voice_Rifts_Barks_Phase2_Start_FireDragon_01_json="1ce2d62d-8236-4215-a17c-b93c9247990e",k.Voice_Rifts_Barks_Phase2_Start_FireDragon_02_json="b8007e12-2382-43b3-b945-284572e6b431",k.Voice_Rifts_Barks_Phase2_Start_FireDragon_03_json="b8dad1de-dcba-4ed2-ac2e-ccf4c622ea02",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_01_json="da79692a-5c2a-40d9-a4b8-b7acbab71c8d",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_02_json="1468c2b2-f2f7-41e5-95bb-f8e9448b47fb",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_03_json="b4a22af1-e2d6-4be3-aeba-11f3806295ea",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_04_json="b23fcb9a-0739-4b63-b0b0-05cd90580943",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_05_json="c9d04c5c-ad6a-4821-87c9-2b3d7b2d4863",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_06_json="dacb35a2-c36f-4478-a9d5-71bd5e1c30d7",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_01_json="4f234272-8d10-4b0e-a550-df19b085d8a3",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_02_json="a7149d01-d0ea-4e53-902c-1d3383230e1c",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_03_json="9d7debca-1260-4d6e-838f-cdf5c0856913",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_04_json="7bcbec87-66cf-4f29-b4ce-4070f3c3bd3c",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_05_json="14538950-bd4c-4ec7-a1bb-5b4f6fd33c8b",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_06_json="6ef3802b-821f-42eb-91b4-379ebcfccfec",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_01_json="05c20b4a-8e33-4e3d-bc86-c4fca2e2b803",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_02_json="d83a5148-10d9-4dcb-be61-038b2e811059",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_03_json="dfd0e080-c489-4bac-9bc2-2b6558fc3499",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_04_json="05b2a151-522e-4fd9-8790-69512be50856",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_05_json="4ceb8f37-9cc4-4204-b5f3-8eab63dea0df",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_06_json="817fe756-3fa1-4a92-b218-cd8799224e18",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_01_json="ca29fdf1-e90a-4874-8a8a-c1939fdf8a3b",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_02_json="f1851e4a-96f4-43d4-bbaa-f7860a9c7184",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_03_json="c7a0d0a9-1222-45a0-bb59-a8c99f8fc20c",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_04_json="27f03455-fa1e-4ef7-87f3-f935b37bd3eb",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_05_json="71677675-4b5e-4d74-862d-7c85e7f7b5ba",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_06_json="d7e87223-a19f-47f2-8ebb-df26381f1d2a",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_07_json="c65b0fbf-ec36-4cbc-aeb8-1b025c5b4c3b",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_08_json="aa269dfc-0bf9-4105-9e67-f7ffb519402b",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_09_json="8ed017fd-4e13-485b-98b3-438f2e416e1f",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_10_json="003686f2-282b-41f3-9f0d-b153b1f215c9",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_11_json="98cb63d5-bb0a-47b1-9acb-20c9ea82af5c",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_12_json="6b8bcb51-7383-42d0-8d11-686d4833cb36",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_01_json="034533b9-01c1-4945-b122-6e922dc1a1ab",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_02_json="cf3ec4e9-c554-415d-9b2f-ffe4d9c88289",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_03_json="399dc8c0-cfd0-427e-a3b6-e19556558f8d",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_04_json="85990ec6-6791-4806-ab2d-3afe941bc69f",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_05_json="3c359379-e855-4711-8843-902db42658df",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_06_json="64252fa5-fee7-4e29-9ef7-0d2afab8e0dc",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_01_json="50761680-6e9b-4df5-8525-ea250158b177",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_02_json="da9ad08a-f27b-4167-aeb3-1d808f96a929",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_03_json="465faa98-ec02-44a7-9297-62adb2429d14",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_04_json="0ad92380-f495-4255-a695-651251246818",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_05_json="0bb96250-9ec4-40db-8001-7606d03541b0",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_06_json="6332a42e-1c8b-4a5f-96f5-ef5143e5a5e3",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_01_json="eeac3572-5200-4ca2-b4eb-05ebdebfcf8e",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_02_json="f482bd8e-d44d-41f6-a339-1af621c391b1",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_03_json="130b26c7-9191-4def-852a-3a73527abc0f",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_04_json="3117db2b-31b8-49a3-839b-5e47552e89e4",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_05_json="860589cf-1630-4b3f-b1b0-5213c9639e93",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_06_json="fb7479ba-0f76-4935-9361-56cd9aa45de1",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_01_json="3e712a05-a415-49f3-bae0-f65defe9faa3",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_02_json="411ea9b5-ba39-4ccd-8f80-a4c540b775f6",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_03_json="407b6b6c-0c14-4fe6-b742-cbf6afae595a",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_04_json="fd18c7d6-02bb-46d1-8023-391211b34908",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_05_json="45ace84c-bcbf-4035-af43-9ea1c42a78e9",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_06_json="5c026a93-c9a4-4e82-8bd1-f39920b14196",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_07_json="e214ad3b-e5dc-4c78-8995-e2e6aa21885f",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_08_json="f2c68593-4c77-4541-bb8d-9a8b24bbe835",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_09_json="bb340aac-f566-4a7d-8e3e-c304a09a6a5b",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_10_json="dbad6214-bb00-4103-80cc-5f95dd5fea55",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_11_json="cf793052-09ba-42e6-b75a-b2ea91857419",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_12_json="702e373b-a974-45cb-b48e-11fac633b015",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_01_json="001d0528-caa9-4b23-b59f-0407a43feb52",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_02_json="ecddff12-3bd6-4b17-ab81-88fe4cb67b4f",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_03_json="559476eb-677d-431b-b1fb-76091044ceba",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_04_json="90546ad1-c77a-46bc-b8c2-90abac944941",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_05_json="bb133039-c862-406a-bda2-3c88dc5e844f",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_06_json="f49234a0-2415-49ec-9901-8cc9161fc2dc",k.Voice_Rifts_Barks_Phase5_Lose_FireDragon_01_json="ea1f4a8c-8ef3-41f4-beb6-d5482eefc012",k.Voice_Rifts_Barks_Phase5_Lose_FireDragon_02_json="4e4511e9-2bad-429a-8eb7-01f84d2cb216",k.Voice_Rifts_Barks_Phase5_Lose_FireDragon_03_json="7bab4dde-6b43-4c35-8173-f09e2c0118f6",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_01_json="681abc3d-6d19-4b8b-b953-57ca1b747be2",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_02_json="dbea9b4a-9a39-47e7-9736-9176249a66fb",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_03_json="09bb0755-a44f-4c05-81dd-4ce67f49d1ed",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_04_json="d3877042-9aac-4a11-b58a-b9be4dd2918a",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_05_json="929baa59-c68b-41fe-97a6-5792bc91a1e3",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_06_json="4461cf9f-9009-4147-936b-2ff3f1282343",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_01_json="f5ee754f-a984-4342-9891-5dbecdb6b482",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_02_json="f0d0cfb9-dd2d-4b48-bdaa-1e3634ae4d97",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_03_json="445360f6-52bf-4aca-a8ee-22d9ea19e297",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_04_json="010e9f52-2c20-4b40-986d-aaa730d14a07",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_05_json="411e62d6-d2f3-4aba-8244-7568d88b73ff",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_06_json="7859f25b-2d09-40cf-92d6-084de8ec2d90",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_07_json="a1c6f3d0-6526-4724-bccc-e37ea0ad0b0c",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_08_json="0f861975-5cb4-41a2-bf4a-ff6507a1fae3",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_09_json="1bc9218f-add8-41c8-91af-00b092afe0c4",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_10_json="51dd2076-d0d2-4bb5-8afd-d9d4abb68cc7",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_11_json="8426fbcb-61f8-4462-bea3-48c1d218a87e",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_12_json="4da11a89-7188-439a-a738-5e22f1670fd9",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_01_json="02ae6917-788c-41cd-86f6-0c61ddb69a34",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_02_json="7e83eb50-8fd1-4350-8d6e-44fbc46e1766",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_03_json="ee13ba68-a812-4aa8-8e0a-1f40a4d95234",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_04_json="35553890-6c40-4c06-90df-a607413dee1a",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_05_json="0b9eeebd-5a3c-46c6-a584-03f0f8a950bb",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_06_json="9cabed87-e325-42cd-867e-bcc9b8d96d52",k.Voice_bonfireQ7_data_json="07332468-8c1e-4ea8-abb6-0ffa8392b786",k.Voice_costumes_tutorial_json="34500f57-86af-489d-8f89-2a0e31249467",k.Voice_forestQ10_data_json="d8446ca3-a597-4522-9d80-924412c26295",k.Voice_forestQ11_data_json="0752384c-7cf2-49d0-a42a-6fc3c9950cd0",k.Voice_forestQ12_flora_data_json="62906b71-0a22-4933-b9bc-785f474744a5",k.Voice_forestQ12_florian_data_json="ed45ce7c-59e3-4057-ade5-6ce647857b7c",k.Voice_forestQ12_gerald_data_json="36274711-9d79-439c-8873-89dd8990d306",k.Voice_forestQ2_data_json="0547cdab-8c06-4a11-a603-85683987600a",k.Voice_forestQ3_data_json="c21c0bda-e668-4de1-8f05-2a4634fddb95",k.Voice_forestQ4_bok_data_json="b549ec5d-7e48-4bcf-ae40-83b8222bb35c",k.Voice_forestQ4_flora_data_json="0aed1353-5207-4690-a82c-397f482f6d55",k.Voice_forestQ4_florian_data_json="d6febcf5-6531-496c-94b2-abf20468765f",k.Voice_forestQ4_pippet_pm_data_json="0c2de341-f1c1-4134-9728-8d17b4669e5c",k.Voice_forestQ6_data_json="24b751dc-2f26-4c2a-a0a3-6ff6f7c72a83",k.Voice_forestQ7_data_json="bf32aa19-b9b3-4385-945e-6ff03f0e21fd",k.Voice_forestQ8_data_json="6e14fc5e-7108-41db-9b6f-d11ee27e1205",k.Voice_forestQ9_data_json="4c2cd83f-997b-492b-b787-348eb69b4c86",k.Voice_restriction_tutorial_data_json="deff6948-1134-4992-aae5-c8a8e3760c98",k.Voice_returnToFireflyForest_data_json="db83a12c-4016-4ebd-bc12-21f6dd88846d",k.Voice_rifts_barks_phase5_lose_firedragon_04_json="df1e9872-44fa-4de8-90d7-c401ee816f9a",k.Voice_rifts_barks_phase5_lose_firedragon_05_json="911bd81f-3c04-4904-a307-86a999665f37",k.Voice_rifts_barks_phase5_lose_firedragon_06_json="cf50c7c5-b9d2-435f-b762-f59476eff5c0",k.Voice_shipwreck_shoreQ5_data_json="c7a25137-e7cc-4002-96af-0d865320ba5e",k.Voice_shiverchillQ1_data_json="fc922bfd-0be5-4b17-bcbb-8f06d1481836",k.Voice_shiverchillQ8_data_json="94da2fc1-24cf-464a-9b40-4ca1e0b96b0a",k.Voice_skywatchQ6_data_json="5a5e2901-8e98-4a3c-a948-4eafe834777a",k.Voice_worldmapZoneLockCutscene_data_json="f9327d4c-b42b-46f4-ac3d-63f75a5afc36",k.WorldInteractablesConfig_json="d3e01c63-1336-46fc-8435-99caffde49f6",k.ZoneRewardsBonfireSpire_json="cacd7360-f3e1-41d1-9c2b-5a8b66bc2493",k.ZoneRewardsFireflyForest_json="c13f55ed-30f7-49cc-a26a-0a9053bae1f5",k.ZoneRewardsShipwreckShore_json="f5b107f0-c1c8-4b41-ad9d-58b18e992f52",k.ZoneRewardsShiverchill_json="d6525574-f8c6-4c2e-8d2a-e169f2cdb179",k.ZoneRewardsSkywatch_json="1de7d516-ac0e-4930-ba9a-2ec742d7b49a"}(F||(F={}))},99625:(k,B,U)=>{"use strict";var F;U.d(B,{l:()=>F}),function(k){k.AcademyCR1="909f60d3-2177-4338-a6ba-756d0de8a138",k.AcademyCR1Hard="cab4dbbc-6f5d-428d-89ad-fff309a2e3c2",k.AcademyCR2="14412c15-d98c-4e34-b15e-78ade05ef979",k.AcademyCR2Hard="5f8d5c73-eda3-4019-9d45-f66432c3b683",k.AcademyCommonRoomSignage="699fc753-98db-4284-992a-f7fa5943fffe",k.AcademyEndgamePostPippet="c150b774-5d89-4d37-9911-12dcfc234283",k.AcademyEndgamePreCebolliniBattle="ccdea3bd-4748-4af8-a7c7-01ce751a47be",k.AcademyEndgamePreGeraldBattle="57227567-fe21-4c95-ae34-c4fabb1f94bf",k.AcademyEndgamePreGuardianBattleBase="6537bffb-d2a5-4532-a037-732b80fa8082",k.AcademyEndgamePreIceWyrmBattle="59c6f80a-eede-453d-9031-74e70c175102",k.AcademyEndgamePreNastyCloudBattle="1993d472-62cb-4744-a48a-8db278fb10aa",k.AcademyEndgamePreOldOneBattle="45bae272-5a88-48a6-8e4e-bb82185e433c",k.AcademyEndgamePrePippet="751fba71-3794-4b18-b1cc-56b11c5fba13",k.AcademyEndgamePrePuppetMasterBattle="236e5c7e-a1d3-4310-9177-1b23c299542c",k.AcademyGH1="20feb7c4-b30e-484f-98aa-c3ac49a238b9",k.AcademyGH1Hard="32a111c0-2f48-44ac-9e69-4c3bed882f25",k.AcademyGH2="f5adc319-7e45-489a-9576-37a081d04f9e",k.AcademyGH2Hard="4f3aeb3c-fe3a-4518-8a49-fd166671b564",k.AcademyGH3="586a3378-09dd-40f6-a821-9d908017ea9d",k.AcademyGH3Hard="6c08c115-3474-4808-8ece-065df3e89d0d",k.AcademyStatusEffects1Cutscene="13251014-3eec-4359-8d03-9ebdee5cb019",k.AcademyStatusEffects2Cutscene="0a77d72d-108b-4fd2-b88f-d80fbf6eb883",k.AcademyTowerExitPopup="81b1f0c0-a916-418d-819e-503b6cf2e1db",k.AcademyTowerExitSign="f510a78c-c78e-4925-aa9a-f39e27e598d7",k.AcademyTowerGotoNextFloorPopup="ce934a91-04c7-426f-8f15-e0e7cf286b95",k.AcademyTowerProgressHUD="69653e47-a7bd-4d50-9d61-5e472da55d51",k.AcademyWalkableScreen="158317fa-8f47-4c13-a985-ab1bdcf2b70c",k.AccountInfoSettings="dc4c4aef-b649-471f-8517-475e85de9a57",k.AchievementCard="f027a0e2-6d68-4e54-93ec-8e98fe5c2fe9",k.AchievementCardWithReward="4ce8d681-6a12-4845-b10f-ebf42407afde",k.AchievementScrollview="7aa91b45-f736-468b-a230-f701e4e5d537",k.ActiveTeamDisplay="cef217d3-c312-4e45-af45-a1a6a9a876ea",k.AdAutoCurrencyEvent="89fa7581-e485-4b95-ae5c-6f4921b20e10",k.AdAutoTitanEvent="65d4dc62-feb5-4865-8639-ee7a45f9e2eb",k.AdAutoXPStarEvent="bfb47856-78c9-40b3-a61a-bea081f80625",k.AdBacking="545d11fe-d959-46f7-a5ec-fd87b7b99485",k.AdBattlePass="06e3d970-1a71-48e9-bfb8-3f3bfa060895",k.AdBattlePassVideo="53a70a22-cbac-435c-b1d8-1077e370148e",k.AdDuelsMatchmakingHighlight="2ccd1460-a520-466f-8b03-0b9e19f5fe1a",k.AdDynamicStoreGoNow="7794ceff-b178-4e26-aa35-942a03130038",k.AdFestivalGoNow="921e3d92-d2c8-45d2-94b5-1e8cf03e1e64",k.AdGoNowNonTeleportTemplate="a6304dd0-4bb6-4529-806f-70b81a946c3f",k.AdGoNowTemplate="deb4a8a1-51f0-426b-b93e-e10124aac6f5",k.AdImageTemplate="e614e66d-6b42-47f9-8cfa-08ed393f42a7",k.AdLootDashGoNow="0c6af7a8-c6f9-4261-bfe2-b478eb2f23d4",k.AdLootDashVideoandGoNow="3f09bdbb-f8fa-4a97-b65b-ff22d89e69ee",k.AdMailer="59100cbc-f17c-4ddc-a5a7-6e4ad28fe5ca",k.AdOpenVideoBase="4ab7d0d5-5304-4c57-9a27-db2268af61ec",k.AdParentAttach="f01830d4-655b-4d55-b3dc-1cda1319c816",k.AdPetGearRelease="fe779b2d-b190-439d-8099-0a042996fbd4",k.AdTeleportBase="cb7c9d1e-812d-4ba7-9033-c8b90d9d9fe2",k.AdUltimatesImageTemplate="8760e766-0703-4cfb-900f-e57d5ff417d7",k.AdUltimatesTemplate="4789d69d-6af5-4935-96bf-2bce636323c1",k.AdVideoAndGoNowTemplate="6f1b9955-bab3-41ad-b547-25edaeb5ede9",k.AdVideoTemplate="7f569c4c-25b8-4b44-8177-526b8ab8157b",k.AddFloor="18ef3003-27e5-46fc-b71a-e59165184d9a",k.AdventureMap_BossBases="34022fb5-3e06-4f9e-9e7d-afc2d3a5d223",k.AdventureMap_BossRewards="cdd7bfe7-ebda-4a1c-80b1-e023608200b3",k.AdventureMap_ItemSlot="39470ffd-5db7-49e5-9b0b-3365f386c002",k.AdventureMap_RowCurrent="137f95a6-1efe-40bb-b5e3-5d73da563226",k.AdventureMap_RowDone="f74b757b-499d-4d7e-82bc-44870a73d7ec",k.AdventureMap_RowUnrevealed="50342091-df38-4d10-86d5-4b62ab768233",k.AdventureMap_ScrollViewLarge="0cbeb534-cf83-4788-97c4-bb7bceed8e84",k.AdventureMap_ScrollViewSmall="9da76592-c6fd-4435-873e-df5681edb1b9",k.AdventureMap_Template="1de822c9-13b3-4b99-aded-e340240c382c",k.Adventure_Chest="5997e7d2-1e39-4dcd-923e-d9596703a358",k.Adventure_Crate="d17939e1-10d6-4fae-8695-1a70059c7564",k.Adventure_CrateItem="02c62104-a3c5-44ad-acbc-d02398349e1f",k.Adventure_CrateMonster="7e90ec3c-2d07-4fe5-b988-71712f531108",k.Adventure_EmptyCrate="2d9e07e9-e5c9-4328-ad3d-7b76921e093f",k.Adventure_GolemEncounter="b3424a57-d677-4d5e-9094-046c94cb3365",k.Adventure_MakaluEncounter="20f58865-7c92-4b2c-9e8b-e44b024fa102",k.Adventure_MemberChest="695f8d56-8dee-413f-acb7-d8d1d269286b",k.Adventure_Monster="4ba5ecb4-f37b-4222-a1f0-723ca2ed5cfa",k.Adventure_SnowPileItem="9db71127-4b69-474b-a14f-2f8e14492157",k.Adventure_SnowPileMonster="75c94731-e067-4b07-ae7d-53520eff2dd8",k.Adventure_SnowPileTemplate="8334b8dd-a9a3-45c7-918d-38deaa562c04",k.Adventure_Teleporter="f640ee73-5520-4062-be29-72bae4e60e6e",k.Adventure_YetiEncounter="3261fd98-0e15-4334-9f66-7ccd7991ee92",k.AfterSchoolWidgetRewardsScreen="0e05d108-0c04-4113-a8ed-4a121d951cad",k.AfterSchoolWidgetSparkles="277c1df5-33f9-4d25-a53c-b45fad0c308e",k.AfterSchoolWidgetStampSpine="5b3feb51-8b48-4089-be0f-5a5e41e1b4e4",k.AllKeystonesCelebration="5e014182-552d-4cad-a90b-142831bd7aee",k.AllShopsMenu="86dccc9b-b6b4-4ba2-8d3b-732bd8c6fa97",k.AnimatedSpineCreature="1c053f80-afa4-4de7-83a9-7bd8658b01cb",k.AnimatedSpritesheetCreature="3af064db-2afc-493c-930a-0b5591be4729",k.ArenaModalDialogBackgroundBase="a67c78cd-5248-4c80-be20-c1628ba91b03",k.AssetIconGrid="7c497e0e-01d9-4557-a9d1-0afd59417b2a",k.AssetIconGridElement="0554201c-99e6-4a85-b11a-c1f47bbb43f1",k.AthenaNPC="b7a81280-dc21-495d-afea-a59bd3924c87",k.AthenaShopNPC="c77cab86-f654-4a74-92ae-e9bc53535d5e",k.Badge_burst="5b57b694-72b4-4b5f-99d4-95cfb062ecf5",k.Badge_particles_loop="027d012c-5320-407a-8a56-718698bde75b",k.BallofGoo="4dba6e64-98db-43a0-a2ff-ecfe492d1929",k.BannerDialogBody="fe2b6457-7aa9-42b9-bcc9-c47ef41b8eb6",k.BannerDialogFooter="9e0a7aab-93ac-4980-946e-25035091b8b2",k.BannerDialogHyperlink="76ac585a-4bec-4c1b-958c-76d19b28dd8e",k.BannerMedium="208f8660-3080-44fe-a92c-7c2485d23051",k.BannerWidget="60d693ed-483f-4af3-a685-331808679474",k.BargoNPC="c99dbcdc-f7fd-44ca-947c-6e7515b610b2",k.BaseHUDWidget="f95072cb-b136-4983-ade0-ca9c4ea51aab",k.BattleCastSpell="e8281bf1-1e28-4240-9568-9d6669265283",k.BattleEnergyOrb="5f0eacd7-0dcd-4326-9856-4a20f3601365",k.BattleOverlayText="ae5bdf4f-d891-4452-ab71-647090e19bbe",k.BattlePassComplexFtueModal="7a80665c-33c6-4a6a-a392-5a00d98fb659",k.BattlePassCountdownTimer="c39c582c-48fe-40c2-acfd-e8b2abf2d784",k.BattlePassHomeScreen="9fbde66a-d17f-424d-9155-6fe4914bf46c",k.BattlePassInfiniteTier="b57e8f5c-554d-4ada-9dfc-1244260838e9",k.BattlePassItemCard="a2916f0a-cb57-4cf9-b9ca-3dbbfad65380",k.BattlePassLargeItemCard="8e5087e3-1a54-4ac8-afeb-5e82d67f242a",k.BattlePassMembershipModal="a7d600cb-c477-47fa-8938-bfcd87ee75c7",k.BattlePassMenuBar="22dc0f9a-11b7-421c-a1e5-e8cbcb4ee93b",k.BattlePassMenuLeftPanel="7cfe1c53-bcec-499e-ae8a-170249c29d20",k.BattlePassMobileUltraUpsell="a2b2e4c1-3e6b-471d-9e93-c373dd830b91",k.BattlePassOffSeasonDialog="d290c15f-e28a-4874-a345-6e6677aa91fb",k.BattlePassQuest="1e509021-6ab6-495b-ab79-a369cb0661fc",k.BattlePassQuestRewardTracker="f8aa45ed-1cd5-4e83-b840-81ca74f5060e",k.BattlePassQuestsComingSoonBanner="656a16bb-2caf-40ad-895c-0e7c30dfb8b9",k.BattlePassQuestsScreen="a6a07acd-0326-4a3c-b053-3a70f1945dfc",k.BattlePassRewardsScreen="4e85d710-0e72-4075-976f-e2bd7b33a0c2",k.BattlePassRewardsScreenItemCard="9795de05-e284-454b-a4be-3631f006bd17",k.BattlePassRewardsScreenItemCardWithLock="aa77dbdc-d02e-4f81-b6ea-9db5d80441e2",k.BattlePassSimpleFtueModal="3394fc35-c2d8-4b87-b1d0-6a0abbf51216",k.BattlePassSimpleFtueModalWithoutClose="efbf94d5-da8e-4a4b-b22c-e04baf1ea423",k.BattlePassThreeTier="0e05abc1-9ea2-4cbd-baff-be5142a39075",k.BattlePassThreeTierInfiniteTier="6699174c-7a92-429a-abd7-e3b3d9067ac9",k.BattlePassThreeTierRewardsScreen="fa38e4bd-4cfe-43af-a6af-805a2e24f53f",k.BattlePassTier="a34748e8-747a-451e-a872-511869c72990",k.BattlePassToaster="7c74b3fb-1c90-4dcf-8e22-86ffe70a5e51",k.BattlePassToasterWithParticles="afc69c08-c6ec-4967-aa36-710617997ebb",k.BattlePassTopBar="dd5dfe37-250f-4da9-b7fc-5c50a8a94220",k.BattlePassUltimateMemberUpsell="2f0f0649-e6a9-4cbb-aea9-d378dbf5e16d",k.BattlePassUltraUpsell="d2c4df87-794b-4878-aefb-26fa172404fd",k.BattlePassUltraUpsellOffSeason="db962882-0dab-48bb-8c4b-ffcb0f7e6275",k.BattleRestrictionsPopup="3d1fa41b-2981-4cbc-928f-5b5b99dd450a",k.BattleResult="5c305e63-28e3-4cca-8be4-5910196c4d5f",k.BattleScene="1ac4dce7-c3a2-4341-ac23-02a5a4f6615e",k.BattleTeamHUD="7c097985-7087-4043-abc7-985918c9c5d4",k.Battywork="a405b70f-e6de-4ae6-8f3f-beed6d9ff4c2",k.Beam_particles="6232b4ff-2fb9-4b4e-a0dd-a0d362d808e8",k.BlockingEnemySpawnPoint="6a37f4d6-911f-427c-87e4-b76006ca7ed3",k.BlueLargeButtonTextAndIconRight_RectTransform="988176d0-042d-48e6-89a1-4e74ea299ed9",k.BlueLargeButtonText_RectTransform="956e86c9-3164-409d-9601-4ee7a68f22ff",k.BlueMediumButtonTextAndIconLeft_RectTransform="12a01b2f-9bdc-4562-9fe9-5b385632cd61",k.BlueMediumButtonTextAndIconRight_RectTransform="4872669c-77d5-4f02-96ac-dca4174fc076",k.BlueMediumButtonText_RectTransform="2040e562-f68c-4c50-a6fe-1261dd1a266c",k.BlueSmallButtonTextAndIconLeft_RectTransform="cbfdca48-c3aa-438f-a67f-4d26d317e74d",k.BlueSmallButtonTextAndIconRight_RectTransform="fd84b30d-b484-4f4d-9b46-e9f3976001cb",k.BlueSmallButtonText_RectTransform="f70cce4d-e26c-4b8d-8ec4-13d249d99897",k.BodyMultipleTrophies="c2a0bc7a-2fee-4e7b-a32c-62e32f4f90c5",k.BokNPC="de379179-512a-477f-9f52-5ad2e72d642c",k.BonfireHardQ13BattleCutscene="0e11e5d5-8533-4bad-8b5b-7a46477863cc",k.BonfireHardQ14Cutscene="88315ca9-6772-4f9d-ba08-bb5849bf1a66",k.BonfireMerchantNPC="737de3f7-fb08-410a-961c-b632be0c8a90",k.BonfireQ10Cutscene="11aadc6d-4fec-4fc7-a079-a8e4e8e7040e",k.BonfireQ11Cutscene="9387060c-d7e9-40af-8be7-22ac926fbc03",k.BonfireQ11HardCutscene="c3da7b0c-5c55-41e3-a0cc-f643cc1a0ff8",k.BonfireQ13BattleCutscene="c032630a-0200-472f-8eb5-2eb4db17feab",k.BonfireQ13Post_battleCutscene="6f3fcf10-90e6-458b-96d4-378493e39ef2",k.BonfireQ14Cutscene="8cfc207e-f7a1-4a2d-98bd-b10e1a0c6608",k.BonfireQ6Cutscene="9141f4be-8410-4ffb-b518-49954409e000",k.BonfireQ8Cutscene="a08b2cc5-bc50-4486-ba3d-d7754b16b2cb",k.BonfireSpireA1="f7feb9c6-6053-44d2-aa4b-d44c93c1effb",k.BonfireSpireA1Hard="f4ed8f38-9a7d-4f99-b059-2e39aa0f0604",k.BonfireSpireA4="67f250a7-6982-42f8-9a65-f0e5ae795635",k.BonfireSpireA4Hard="139fbdcd-1ab1-4124-bb7a-0e8d8ccd3186",k.BonfireSpireB1="b61bfeb5-9898-4413-83d9-1f0c4898d8f2",k.BonfireSpireB1Hard="cced6cd4-6ff2-4ef0-aee3-70ecd77e0cca",k.BonfireSpireB2="e90f010e-8122-49a3-bdd8-5a7b2ea42e1e",k.BonfireSpireB2Hard="e610730b-94bf-40fa-a237-0d8ff712dc22",k.BonfireSpireB4="8366eaeb-240d-454c-945a-452cf4081ee8",k.BonfireSpireB4Hard="d5739b61-a98e-4206-a751-04dcb7bfb397",k.BonfireSpireB5="b5c9a3ee-0e60-4bf4-9589-d5632dcd8f93",k.BonfireSpireB5Hard="ff9c0910-f68a-4d15-a03e-9f165cd06b37",k.BonfireSpireC1="ffe87899-8e47-4ac5-a6b5-dd398a52aa98",k.BonfireSpireC1Hard="da5c82d1-e643-4e80-b644-f0d4d0879bf9",k.BonfireSpireC2="ab844cf2-3902-4ea0-9958-6e9bb437fc54",k.BonfireSpireC2Hard="1c875238-d0a2-4829-bae9-b120a55297be",k.BonfireSpireC3="c4ac200c-042a-46b2-b517-961dcceb1f7d",k.BonfireSpireC3Hard="62d023fc-f383-4791-9d27-517525b9dd69",k.BonfireSpireC4="4dc9b482-3db4-4766-880d-17caf4c9ae12",k.BonfireSpireC4Hard="edb017fb-8c7b-4392-ae87-5948835c9b55",k.BonfireSpireC6="c4790ef3-fa14-44fc-9b1b-b6ae2c0cf21d",k.BonfireSpireC6Hard="4a670087-960c-4528-a1ff-9ae72e772657",k.BonfireSpireD1="a91821c0-38e6-4000-848c-5da16c674f6e",k.BonfireSpireD1Hard="bfa0be82-c0da-4b52-966c-0dc89ec06439",k.BonfireSpireD2="a56a97b8-28d0-4f50-b326-774103bd252b",k.BonfireSpireD2Hard="ccc0d95e-9ce3-48ff-8dd8-5975190b9c96",k.BonfireSpireD3="7af56eea-559f-4cb2-8857-f23f43570b18",k.BonfireSpireD3Hard="0d3d565b-dd7b-402f-8347-fdda3f4d8c95",k.BonfireSpireD4="bacbf8ae-d808-4aa1-a9d3-bdf09b67c234",k.BonfireSpireD4Hard="0f05fe2c-447f-4ee3-ba00-fa59f138af19",k.BonfireSpireD5="bcfdb02d-3a77-410e-a5c6-046ccaf15c55",k.BonfireSpireD5Hard="1bf7fe6d-5864-4e36-94aa-cb347a927dd5",k.BonfireSpireD6="f05943ad-fe1d-4690-9361-b7490db1482e",k.BonfireSpireD6Hard="1a9f35ba-5737-4c3a-a4e1-3c2eb223cdcb",k.BonfireSpireE5="6ecd54f9-1622-4af0-bdeb-e0d1a1a0af7c",k.BonfireSpireE5Hard="41274568-49ea-4d95-be50-8c7609f2f58f",k.BonfireSpireE6="d640c5ec-71db-4bae-b24c-43e7d43f0697",k.BonfireSpireE6Hard="7aa80a57-758c-49c9-bacd-453fe06940b9",k.BonfireSpireWalkableScreen="538a9242-41a4-458f-a04a-bcbae84c1050",k.BorderlessVideoPlayer="0b7c3353-6edc-4c40-992a-8a23cae62ee3",k.BossBattleModal="a9ff4ee9-edd8-44d7-95b0-1532559a2887",k.BossChest="2142f025-9e21-4f6b-a964-6cfef5d1bc6d",k.BossDifficultyIndicatorIcon="774061bb-20d4-45a2-b15c-1e60c914ba55",k.BossDifficultyIndicatorSpotlight="765c868b-6efd-498c-9d9e-b7c021c72904",k.BossKeyPosewithWeakness="a5b3c169-6c50-4ccd-9fce-9c2f88bd0581",k.BossRewardUI="384bdfdf-ce86-4f1c-9f7b-be95d344b250",k.BossRewardUIwithcurrencyrespin="cf9bdc47-0cff-417d-8ade-3f093b073a94",k.BossRewardUIwithnorespin="9543889d-b837-41b2-a170-f6d53eb5441a",k.BossRiftScreen="c0217105-992a-4dd9-a1db-00876d6e1156",k.Boss_icon_slot="d0dcb964-e294-44c8-b39d-65aae4346034",k.Boss_icons_row="7564f48e-bfa9-4b94-96ae-e628e30d3b7b",k.Boss_reward_missed="b451c4b0-180b-402d-840b-26f383d0edfc",k.Boss_reward_revealed="14284996-79c0-44c2-a36b-9cffece19bc4",k.Boss_reward_unrevealed="dd3d3de4-5a08-42e2-92df-510a9ec718e6",k.Bubble="3b84616b-b2af-43e4-8b2f-c3ca1d6ad931",k.BuddyParticleDefence="15dccb40-e75e-4162-9bb4-665951019a5e",k.BuddyParticleHp="2a98be0d-518e-4c1d-a406-4d6e5d54641c",k.BuddyParticlePower="52e112fd-571d-466f-a5c7-2ce1f7678e48",k.BuddyParticleSpeed="75f1847d-9c5c-4004-9bb9-b233adb6f2f5",k.BundleExtraReward="0732f378-aed5-403b-ba11-db87c35c1b19",k.Burgerworks="a1ff93a5-6595-4277-8421-2d51390507b3",k.BurnVinesVFX="8b476774-94dd-42ec-9103-791a655bc418",k.ButtonBaseMediumBlue="4e3cf812-02d1-4a90-8611-bc2783f08f82",k.ButtonBaseMediumGreenA="2762f59d-5aa4-4257-ad69-76cc508bf31d",k.ButtonBaseMediumGreenB="ddcc451d-87d8-43eb-85de-d5583367adfa",k.ButtonBaseMediumRed="0d57eaa5-96d9-4270-aacc-917e8957dcae",k.ButtonBaseMediumWhite="b9e3faf7-de48-4a5f-85dd-bad1dbae21e9",k.ButtonBlueMediumTextAndIconRight="34247c91-a5c8-43d6-a462-2f24c20a0c50",k.ButtonGreenMediumTextAndIconLeft="ed74cc80-3253-4820-9368-488434b7a019",k.ButtonGreenMediumTextCenter3States="ed80cdbb-c6a6-4560-b28d-548a6f586f61",k.ButtonGreenMediumTextCenter4States="0f5e554e-6640-4f35-aa08-5d9103c77231",k.ButtonGreenMedium_LargeTextCenter3States="71a7c42f-f624-4ac1-882d-256ae0566f2c",k.ButtonRedMediumTextAndIconRight="e3bccf0e-2afd-4f08-a113-0e653b79a2d7",k.ButtonRedSmallTextandIcon_RectTransform="6f2053ec-0878-4085-a82c-82a175a34a24",k.ButtonWhiteLargeIconOnly_RectTransform="b6eead11-6a94-4926-b209-a48c833fb284",k.ButtonWhiteLargeTextAndIconLeft="5d45505f-721b-4c3c-b81f-7c862c3a172f",k.ButtonWhiteLargeTextCenter3States="78543d0f-99f7-4779-85a0-fd5b4f1d8658",k.ButtonWhiteMediumIconOnly_RectTransform="37b4be5c-46be-4db7-8830-a427be35944f",k.ButtonWhiteMediumTextAndIconLeft="65207ca3-d40d-4e8f-a241-cc7f33ca9bdb",k.ButtonWhiteMediumTextCenter3States="05bee47c-6bee-4961-b90b-9e47dbcbf6d7",k.ButtonWhiteSmallIconOnly_RectTransform="d35485e1-ba06-4762-a8eb-8309202d1bbd",k.CTR3SpringfestAd="ac514889-4da6-48d5-87aa-466390fc728f",k.CTR3VideoMenu="445d5673-7b53-43d1-b8c5-4be32170061f",k.CameraControlHUD="ee399d49-98ac-4e40-a608-ddb51f4c0e87",k.CampaignReplayHardModeFTUEDialogueController="452a807d-a6d2-4261-a076-8a9947dae9df",k.CampaignReplayNarrativeCatchupCutscene="ae583e4d-f49c-43e7-8fd8-0da14c823d0b",k.CampaignReplayNarrativeIntroCutscene="17518765-3a2b-4628-9a4b-58f091118617",k.CardDailyLoginCalendar="292c13a3-bfc4-4be9-a0d0-f9fcc1b79620",k.CebolliniNPC="b5d61bde-ae3f-491a-bbed-1f91cefff3b6",k.CebolliniPatrol="8027b8a7-f0cd-4868-adad-f46fdaa427ad",k.CharSelectScreen="7d7904ff-40f5-4cfe-92b4-2fcffcd911bd",k.CharacterClassCode="e41c8cf0-9933-42ce-b0cd-67a630a4db72",k.CharacterCreateScreen="715890b6-5312-4892-97eb-8a3f8b457d66",k.CharacterDialogGeneralButton="504d0d3f-da75-43dd-92ba-fe5a30187a98",k.CharacterDialogue="fc803f64-b097-4a02-9ccd-065a52f64d9f",k.CharacterPaletteButton="36036887-6c56-4c0f-9b26-8415a3070e54",k.CharacterPaletteSelector="570b7031-b46c-48fb-bf62-0c3d96622ccf",k.CharacterScreenFooter="9f085f2d-06ad-42f7-83f7-c8830ed9dab9",k.ChargedLevelsDecayImmunityModal="3882006e-9310-43e4-9527-73d2b58c3283",k.ChargedLevelsIncreasedMailer="d12ecfa7-4e92-4881-8eb3-42a182f7145c",k.Charged_level_effect_bottom="8168db41-f708-413f-99b4-cfa123d61aee",k.Charged_level_effect_top="7c283ce6-333d-49b8-8bfe-e0e0cfd1b529",k.Charged_level_retention="612b62f9-f19b-48e2-83ec-cb12a402cc06",k.Charged_level_timer="756ae86a-92e3-4722-a00b-c00a43912458",k.Charged_levels_tutorial="ce22db97-2fa4-42b2-af24-4f2b1ce625a0",k.ChaseItemDisplay="cfea767c-df8e-429f-9563-10c30e3f69e8",k.ChatBubble="f477d5dc-2d62-4263-8aca-74f6d0390b70",k.ChestContainer="358d439c-9469-437f-a4d2-f0141aee13b5",k.ChestRewardPopupFactory="2900f01c-02af-4819-92ab-5b8f5cb70b4c",k.ChooseFloorLook="9bedbfff-f5e9-47aa-bc9b-22ccfb0904d1",k.ClassCodePopup="1c988778-d55c-4e71-bd6a-9f44ed2d24c2",k.ClassCodeSection="79470531-f247-41ab-9eae-7fe353f669e2",k.ClickHereGuideHand="df712ed3-75b5-4797-ab0a-8f1ba3e929e9",k.CloseButton="5207b7a8-d8f8-47e0-9db3-4998301c1df8",k.CloseButtonSmall="b942553b-a06a-4c8c-b0a0-160effb3ec7f",k.CloseButtonSmall_RectTransform="c83f5774-380a-4bcd-9704-37b75eb535ac",k.CloseButton_RectTransform="70aec33c-5de3-4f24-a309-fcca4a5a74b2",k.CloseButton_WithText="e27ce6d3-3fe7-4765-aec1-7c8fbeab1ad7",k.ClosedRedRectangleMessage="0be93aaf-2599-432b-8319-d25b7d3e4023",k.ClosedTag="24ec6c09-a2d4-4872-8d10-f8fdf8951a10",k.Cloverworks="7b491953-54e4-4d71-8c26-508aca2bfb19",k.Coffee="b7a4af27-45c8-44c1-8e2d-c13e60c914dd",k.Collectable="fbdf5181-e2d3-484b-a26d-9f20917d7b80",k.CollectableSpawner="c8126793-f301-4bd1-b1a9-c7e45fdbfe33",k.CompletedParentSection="82acc4ed-cae0-4424-9bbe-27456d90adab",k.Confetti="55dd2d85-d0ef-4e64-9941-a1bdf15510cb",k.ConfirmationDialogBody="68cb0ab3-f4df-48b6-97e3-b51008bec534",k.ConfirmationDialogFooter="4c912ea4-5042-49b0-ac2f-137cca73c26f",k.ConfirmationDialogFooterWideButtons="0d366e67-7073-4a92-86ba-f92b9782ad83",k.ConfirmationDialogHeader="30e7a29b-11ba-43b2-bd47-44bd53e31c69",k.ContextualPanelTemplate="4e9e129a-f359-4080-896e-e8233c94a974",k.ContextualPromptDualPackage_Template="1d204d23-b61e-4968-9a50-55e42c797c43",k.ContextualPromptMemberJarDualPackage="da897525-ada9-4b72-ac50-8b849000ee70",k.ContextualPromptMemberJarUltraFocused="ba82d3b4-82a3-40cd-8704-5f1b5e51166f",k.ContextualPromptPetFocusedDualPackage="d9b71a6a-280b-413d-9008-29530167196a",k.ContextualPromptPetFocusedUltraFocused="8f1d19a0-1afc-4aca-813a-5db6dea77cf7",k.ContextualPromptPetMergeDualPackage="478535b5-e14c-4082-803c-720b6e89f100",k.ContextualPromptPetMergeUltraFocused="32421374-4c16-4af6-8d8e-769fecd5f706",k.ContextualPromptSegmentedOffersDualPackage="b85f1e10-76de-45d7-99aa-7ed55f2ef57a",k.ContextualPromptSegmentedOffersUltraFocused="804129e8-2647-42ba-a81c-208c73ae0e10",k.ContextualPromptUltraFocused_Template="83041159-c503-4c03-84ef-74f27ede09eb",k.ContextualPrompt_ChargedLevelsUltraUpsell="7d4331f2-5930-4bea-8f91-d0ede612d1ae",k.CornerQuit="e5ecea46-b0a0-47ea-a0d6-fce83e3ea403",k.Cosmicworks="3b3ada7c-845b-403a-b292-07d6058fef32",k.CostumesHeader="995ebab4-37e3-4608-ac78-ff6c05b31461",k.Crystal="462e4ce6-39fd-459e-9aa2-b851af58c72e",k.CrystalCafeStore="9e6845cb-93e4-4780-8567-058bf635f143",k.CrystalCaverns1Streaming="1dd59d6e-6bbc-44e8-b50f-80b60ed4abb0",k.CrystalCaverns_FixTracksTutorial="4ebfee10-3b01-429e-a815-a5a2afdad49c",k.CrystalCaverns_GlaciasEncounter="4d35970b-6c0d-4a82-a0ea-b49acdeece27",k.CrystalCaverns_MinecartTutorial="2acaaf48-000f-48b0-8160-d7116868ee2e",k.CrystalCaverns_Phase1="d0886b67-9670-4eef-b452-0cd4f0a42d19",k.CrystalCaverns_Phase1Blocker="c60bce9b-9f18-46f0-a29f-dcb64da8fbaa",k.CrystalCaverns_Phase2="c6982a43-eb94-41bd-8684-777ab5bd19c7",k.CrystalCaverns_Phase3="5f41427d-83e6-4de4-ac63-f14d0fc3447e",k.CrystalCaverns_SceneBase="1579afec-dff4-41a0-936f-4111f4f96cb3",k.CrystalCaverns_WinstonVonLootEncounter="c211f913-5ab3-4244-8fb5-1ef606760b42",k.CrystalCaverns_WinstonVonLootPost_Battle="b611fcac-649e-4993-b135-3a29c49b870f",k.CtaTipBodyEvolvePet="00d0d17d-4379-494c-95cb-c94c8a22d9fc",k.CtaTipBodyLevelPet="0f2485c4-2398-4e35-beb3-c390eb07ab2b",k.CtaTipBodyMergePet="055accaf-4ef9-4bb2-b203-538deb058483",k.CurrencyButton="fbdfd03b-e749-4b32-a7c0-36befcf6f6b8",k.CurrencyChangeNotifier="7b4072e0-6183-47d6-afb3-3eeac00cdcd5",k.CurrencyConversionPurchaseButtons="8dc96b0d-7129-449c-a8aa-3c9f96bbb20a",k.CurrencyCostDisplay="f8951ba1-a529-4297-ade4-a04e61e9c51e",k.CurrencyCounter="c62f8482-a816-4872-aae8-0c53769ac81a",k.CurrencyDisplay="205c5bdd-5921-408c-be92-218d37935584",k.CurrencyDrainWarningModal="6e211bc8-5150-4066-8414-dc49c205bdb3",k.CurrencyEarnParticles="4c3a5dbc-747e-47d9-86c7-b6dceab5a55e",k.CurrencyHeader="8be71acf-9767-47d6-b0e4-a32bfe92abc4",k.CurrentStateChallengeView="90626149-a806-412f-80a7-2925cc702940",k.CurrentWorldInfo="21aa57b4-ef6a-4cfa-9446-e1b1ef1895f9",k.CustomKeyboardLetter="93877c15-e507-46d5-9534-31fba16886bd",k.CutsceneHUDController="9d9eb449-93bd-4d01-bc1d-90d2db24d724",k.CutsceneInputOverlay="652dac85-414b-45b6-b996-a65e26b669fb",k.DailyCollectableSpawner="2df80544-a31e-430e-9edf-f139bbdd2908",k.DailyLoginCalendarHUDButton="4591ac22-90c2-427e-b9c2-8ce24ba1fcb7",k.DebugBattleUnitClickArea="e28766d2-895e-443d-8206-6bf3781effb9",k.DebugCutsceneStatus="d009f1ca-ff4e-4615-8317-0334666dd6b6",k.DebugMenu="8008fca2-1b22-4e30-b745-50ab3b15c297",k.DebugMenuCategory="c2404aeb-7cd3-4cf9-af7d-8c8fc4f448bb",k.DebugMenuCategoryTab="ec38aa4d-bc0d-4627-922d-5d63ad82035d",k.DebugMenuCommand="a3d07eec-1abd-41c2-b3d5-1091f91362c2",k.DebugMenuInputField="dedf0b7d-5a28-478a-80e1-2b194fe07ad7",k.DebugMenuToggle="f20ee92d-0887-4ce9-b519-0840b5340bbb",k.DebugStatusEffectMenuItem="59ebf52b-e334-46d7-a9a1-a18acdffe1e3",k.DebugStatusEffectsMenu="4f26967e-dc37-425a-9bbb-2eda4e3b8453",k.DefaultBody="01eb52e2-1dc9-4f65-99b7-157604cc777b",k.DefaultFooter="c8062699-3d21-4fbd-9e5d-af23e8a9f969",k.DefaultHeader="a9e11847-274a-406c-8599-93e017f4bc61",k.DefeatedPetsBattleIcon="76cbc1ab-8d41-4628-9909-7f44921b267d",k.DefeatedPetsRarityLabel="90467007-ea9c-4758-aace-dd9ff9739d74",k.DialogBanner="d17a542f-7dd9-43cb-ba9d-9fa34eb31e22",k.DialogMedium="69bad6cf-14b6-412e-a50c-292cc979727a",k.Dialoglarge="e19ecfda-8a24-4a40-92bd-035c7c7e79f2",k.Dialogsmall="223de309-a870-4aed-adaa-5cbe162c5659",k.DiamondArgyleBackground="9bae72c1-64e4-484e-917b-f684f9b9d11c",k.DiamondArgyleBackgroundWoodHeader="7d214f60-767f-439c-923c-94d2cf85b9ac",k.DiamondArgyleBackgroundWoodHeaderWithTimer="b4e8fbc2-b38d-470a-a0ca-d659ca2f1081",k.DifficultySelectorConfirmationModal="1175d3cd-6a04-4fdd-aa49-1538807cf0a4",k.DifficultySelectorPanel="7093d479-a2b6-47f8-8946-84fb6f964529",k.DifficultySelectorScreen="fc444dea-9f82-49eb-8c78-0cce54920080",k.DifficultyUnlockedModal="ab0063c1-9150-4027-9a20-e5db1f864ffb",k.DonZorroNPC="b48df925-28af-45f6-96c3-252f64ec1fe4",k.Dragonworks="cea13c56-c95c-458c-8fb2-e238c66d3266",k.DuelInviteNotification="282745d4-ca7d-4456-9cff-a69d67b5992b",k.DuelMatchmakingOpponent="b301d2e0-e203-4e1f-b3ff-b4e3577619b1",k.DuelTurnTimer="d6ac1a3f-be11-4483-b249-43dd7ee3f4a4",k.DuelWaitingMessage="590d5748-ded1-46ba-9e7a-fbffdad23f28",k.DuelsFindMatchButton="e2fd5b68-0a61-40d5-90cf-0756d500dd8c",k.DuelsLoadingScreen="38b1277a-7325-45c0-ac36-b39f459baf4d",k.DuelsMatchmakingScreen="e13e76b2-69ad-4c37-bc6b-d238c8c75d9e",k.DuelsStadiumDailyUsage="cc9f36be-386c-430a-9c21-ebf449f873b4",k.DuelsStadiumMenu="e4dfc5af-955c-4e3a-9bdf-cc4b32d1eebb",k.DuelsStadiumMenuHeader="6a836ff3-7a26-45f3-a94d-e90dbb29a74f",k.DuelsStadiumRoomCard="2605656e-2882-488c-bc1c-1e9945d0b52a",k.DuelsStadiumRoomsBrowser="6de8f19b-2e94-40af-b02f-f97788eb1bf6",k.DuelsWinStreakBadges="978675db-88e4-4080-ae2e-facc7e265741",k.DungeonCompleted="43a6e25e-06ba-402e-98b6-633e2c9018b7",k.DungeonHealstone="28bc7b7d-291a-429d-a618-5dfa0b0ed829",k.DungeonLoadingScreen="2c1a7a79-398b-4c1e-acec-e877db67468e",k.DungeonMinerNPC="64d59196-1650-40cf-ba3d-0e1ba89f5063",k.DungeonPlayer="c4f5f284-e29c-489b-bc3d-3d093f71ba11",k.DynamicAppearance="d52e1378-ee03-46d7-94a4-eabe3a7726ab",k.DynamicMembershipParent="55e8171c-4fc9-4921-b69e-7127d2f8a658",k.DynamicProgressBar="9b53da2f-8af0-4c29-801e-5572b4069455",k.DynamicPrompt_DualOTPUpsell="091e868f-c990-4098-a379-e819f2a6623d",k.DynamicPrompt_MagicoinOTPUpsell="88cd7563-c1ca-4ef0-aba1-a0e82024ca0d",k.DynamicPrompt_MagicoinOffseasonOTPUpsell="993329b0-8b3d-4e57-8a75-55a4f02cb71e",k.DynamicPrompt_MagicoinUpsell="47a7868a-652b-4c33-8fdb-e0706802aabe",k.DynamicPrompt_Memberjar="323cbcd5-7625-4d67-8c64-436d54578837",k.DynamicPrompt_MembersGetSevenLevels="ab987c70-1283-42dc-bc33-b89e22882408",k.DynamicPrompt_MembershipInfo="47fe382c-a79f-4dd9-8414-ac85ba006125",k.DynamicPrompt_MembershipInfoV2="001e334d-bc5f-4f54-80bd-690d73fe5299",k.DynamicPrompt_MembershipforMagicoin="324afd89-4ef8-430e-bdae-72d3d1d0fc64",k.DynamicPrompt_MobileMagicoinUpsell="200032ea-f61f-4622-8e9f-6bd7a43dbb9e",k.DynamicPrompt_MobileMagicoinUpsellOffseason="01eb2259-22a3-4149-8229-3c67655d3fe0",k.DynamicPrompt_PetSlotsAtLimit="b811077a-71f1-4d47-b0ac-ae72218f7a22",k.DynamicPrompt_PetSlotsBase="ddf2e26e-782e-4264-a2a3-2fcb5a496b68",k.DynamicPrompt_UltraUpsellTemplate="d1d157dc-5cce-4a4a-8de7-ec95d661f780",k.DynamicPrompt_UpsellMobileTemplate="4a32acef-d2c3-418b-9319-5396d676a8d6",k.DynamicSpinePet="7baf54d3-a94f-4217-a02c-de7a432d6473",k.DynamicSpritesheetPet="f98eb440-a797-4315-96fa-58c36a040b47",k.DynamicStore="ec99a1be-645d-4847-89b5-8bccb24896bc",k.DynamicStoreBundlesPanel="70c2add6-a9c9-4e26-aaa1-2de6a5ae8494",k.DynamicStoreEmptySection="66e7ba19-6a0a-472c-b930-dd1a5786146c",k.DynamicStoreFeaturedPetBundlePanel="a82ebae8-4ee8-4712-b736-4021aa100205",k.DynamicStoreItemScroll="f8dfde7b-4719-406f-880e-42a17a2c8a9c",k.DynamicStoreLeftPanel="0b9098bf-f747-4e25-b1ca-ecbae0efa3ea",k.DynamicStoreLeftPanelTab="00790afb-0bb7-42dd-910f-75c0e2237ba8",k.DynamicStoreModal="d2709b02-8f1e-4689-a442-113a47e95e12",k.DynamicStorePetOffersIcon="04bb9c29-0674-4626-b959-d8d3541ed47a",k.DynamicStoreSectionHeader="2d06e685-1ac5-4e8e-8e6b-b734df75a974",k.DynamicStoreSegmentedOffersPanel="0f31446e-cb70-42f9-9b14-4c1c385761a4",k.DynamicallySizedNotificationBadge="ecf56d28-6b95-4e39-add2-2527fae268b4",k.ElementalBoostDisplay="1c889aa8-7827-4a48-b1c2-eaca23098701",k.ElementalBoostPopupText="8b0da69a-0b2e-403e-9407-99f17cb08066",k.ElementalWeaknessChartPopup="102039d3-1726-4cfb-a69f-39aa63096698",k.EndGameNavigationGuideHand="9499f1c6-1cd6-48df-976e-d9bed26aa640",k.EndgameConfettiInitializer="ea5ba159-a621-403c-930f-0713eecb964a",k.EndgameIllustrationPuppetMasterDefeat="3c7d236f-a3d2-4c0d-a532-b24c608bd33e",k.EndgamePedestalClickHandler="3d76179d-a0ef-4ddb-a5f7-85500939eec7",k.EndgamePostPuppetMasterCutscene="77ddbb9e-904a-4394-88e3-999747f4dff0",k.EpicCounterWidget="5eda22ae-ae59-4268-9e41-616b984885da",k.ErrorDialogContentRefresh="a407adcf-e270-4c84-a40f-9ba0bd93d3b4",k.ErrorDialogFooter="fc95e252-4c38-4cb9-bfe9-38839c054e00",k.ErrorDialogHeader="20afb102-02db-45e7-b3d6-5c0985965a1a",k.EveNPC="771f8838-90f4-4e8f-9298-b5b63e49e53d",k.EvolutionScreen="7a383058-6eaf-477d-9e32-7dd56a80329e",k.EvolvedPet_InsufficientResources="02bb09aa-6b0a-4054-b19c-42ebed3bf434",k.FeaturedPetModal="110c9891-99b5-4bd8-ac76-fa2ef27a4b36",k.FeaturedPetWidget="c876d2cd-ca45-4c58-bb34-745b30931cd1",k.FeaturedSpawnPoint="5fe00b2a-ba56-4c67-8ac8-c728450d4412",k.FeaturedSpawnTimer="3573877c-79a2-40aa-ac72-32bc275a6969",k.FestivalAboutMenu="6c068d49-4027-452a-9f41-0248014f8f40",k.FestivalChest="03fdba93-89f0-47e8-b3f6-13be42993cd9",k.FestivalChestRewardUI="3cc6eeed-fe9b-4e71-8540-e750e6ba801c",k.FestivalCoopTier="4b8069a2-3d7e-4782-8df5-8612ceea28c0",k.FestivalDateDisplay="1166fc69-1512-4569-8c2d-67ebeb3192b2",k.FestivalPortalVideoPopup="d6f168d3-ad5e-4377-b8a9-4a3ff4d40a09",k.FestivalPrizeWheel="c9ef701f-0538-4757-a079-63ff435b0ee8",k.FestivalProgressMenu="47070187-ba72-4128-a873-cba32f6c48a4",k.FestivalProgressStoryTier="55642e5f-1f1c-466a-ba92-aab91fef04c5",k.FestivalProgressTier="3087ecc6-97e0-4ca0-bc4e-5070828671eb",k.FestivalToaster="c78b5b1b-173e-4ec0-8d48-cb17b179e094",k.FestivalTravelModal="323053cf-7d32-4478-b898-2c6a92317b56",k.FilledTeamCardInjectionConfigured="634a3c1f-c77f-4884-9480-adb2d2566014",k.FilledTeamCardInjectionConfiguredMergeRank="4f8abb19-447f-416c-8ed4-f07a59e73050",k.FireflyForestWalkableScreen="2ad90480-6788-45fa-a19f-276d153958b0",k.FireflyHardQ12CutscenePost_battle="356e1856-146e-4704-8471-5b1d973195b4",k.FireflyHardQ12IntroCutscene="517a4351-96e6-4c82-952b-8c1b5797ab54",k.FireflyHardQ2MinibossEncounter="6b4fc0b7-10d5-43f2-a0f1-255374490c9a",k.FireflyMerchantNPC="a8d1e441-a759-4e94-8541-7236da9334c9",k.FireflyQ12CutscenePost_battle="a6f047ce-0958-4b38-a580-7dc47b9b1c2a",k.FireflyQ12IntroCutscene="0e7cc4c3-9f0b-4ab3-a680-8120053b0b1f",k.FireflyQ2MidBattleTutorial="f8bf9bc2-b3af-4e86-9bca-ba632e6889ca",k.FireflyQ2MinibossEncounter="afad8dfb-544d-4246-9ff8-3025ab25d8f7",k.FireflyQ3MinibossEncounter="412c6156-5cc0-4196-b79d-eb889596639e",k.FireflyQ4FlorianNPC="f106b51c-cf1c-446b-8714-30516a53d5a6",k.FireflyQ6Cutscene="7892d170-60b2-42f7-ac54-c772c6d15c3b",k.FireflyQ6CutscenePost_battle="c7c62796-d65b-4ae6-b3c2-e4c031eb343b",k.FireflyQ8GeraldNPC="84b16e5c-3dd3-4297-ba79-b9a3854adce8",k.FireflyQuestMerchantNPC="25915477-156a-429c-a3e2-3cb68a054944",k.Firework="cf900e63-412d-4e36-a708-1808d347e79f",k.FirstNameCellPrefab="af3d0a70-f46e-4bdc-90a8-78b13e9e75d6",k.FirstNameSelector="0591ca90-f9c8-43af-a85b-5629e9c71bf6",k.FirstNameSelectorScrollBar="cc209739-9ca6-4781-8b81-d2369dab2477",k.FlagTintableBanner="963cb371-05e6-422b-be5a-82e80dfe0c3d",k.FloatlingFlingResearchPointPanel="48ee416d-121b-45d2-83ed-37f0c5f2ffe7",k.FloorDecorationPlacer="c7179c8b-30a9-409a-8eb3-d132b660c0ac",k.FloorListLargeItem="423af034-ebdf-406b-9ebb-18421ed7caa8",k.FloorListSmallItem="c955c422-dd5f-42ce-bf12-bf7b04e17ab1",k.FloorLook="8e2aed7d-ab4e-4424-814a-b2b169891551",k.FloraNPC="24878142-e2d1-4106-b6b4-559c6fc99693",k.FlorianNPC="a88ada8c-baec-4ce2-857a-41a16f2a0a11",k.FlorianNPCLegacyMaps="ca50f899-f9d2-4f2d-8a02-e671f4a5c2a4",k.FlowerParticles="0e168a59-a5ff-4897-9b2a-aefb43d9d7cd",k.Flowerworks="d221d05a-07ab-4cb1-a9c1-0fb21cb144d7",k.Flutterworks="d73125fd-91ba-44fb-ab2d-3bbd0320fdb1",k.FocusOverlay="66c052fa-7a57-42fe-9279-94ee566de6a7",k.ForestA3="51eb274f-00c1-4a21-83a1-0995c0d2970d",k.ForestA3Hard="4725b648-10e5-496b-a0ad-7fe89056521e",k.ForestA4="ce5df2e9-d864-40c3-82fc-95652b69c562",k.ForestA4Hard="bb69e366-e6bf-4326-8774-70c103d0633f",k.ForestA5="4a6e0fb2-96cc-41e3-bffb-e84c5117f264",k.ForestA5Hard="d53a4816-4aa2-4bf8-9bc5-6c6c0d5df690",k.ForestB5="d0ccb64c-bc88-41ff-bac6-04101f887a3f",k.ForestB5Hard="0ff00aff-3da4-41e4-91c5-2f8338aaf0cf",k.ForestB6="e63350da-8e8f-4523-a286-d4c4d2ff73fe",k.ForestB6Hard="21689966-9ec6-4e5e-83bc-f9b4bb78ecac",k.ForestB7="6aa00bfe-fbcc-4101-9f3d-fad479d805a0",k.ForestB7Hard="06153eb6-fa17-4ba7-9397-c67a639c2785",k.ForestB8="7bc951f1-da51-49de-bf88-f40b05691f4c",k.ForestB8Hard="b565b7f6-132b-441c-911f-e75467207074",k.ForestC4="b4b4b8db-df37-4e11-9af9-eece973f79f6",k.ForestC4Hard="d8fa1d4b-536d-49a6-b5ba-fb0b0a7bee44",k.ForestC7="b39f6138-6a52-4c49-9ee0-e7219f457686",k.ForestC7Hard="c011566d-96be-4a7b-a0ed-baf3010e5f5c",k.ForestC8="e9d74135-75ed-4f86-a5cc-7b1c5682f90f",k.ForestC8Hard="19e486a3-8cb3-4579-8a96-f27d46bc00ba",k.ForestD3="17cffc83-9b3a-413e-b497-c42592d82093",k.ForestD3Hard="45cefde8-1300-4d1b-8deb-f7c467f2182f",k.FtueHouseExteriorChooseName="11052834-088b-4448-bc82-b5dbde861376",k.FtueHouseExteriorWorldMap="fccca0e8-dc37-4e6e-92d8-dc0080d0ce92",k.FtueIntroCutscene="303ab378-1819-4fb7-bdc1-74254d74edd8",k.FtueKeystonesCutsceneGH1="e9c7a1f6-df14-4db7-a9aa-7066f785accb",k.FtueKeystonesCutsceneGH2="3aa87410-33c1-45e1-aeba-0b737fe8584f",k.FtuePetInteractCutscene="1c0480f6-539b-41f2-ba74-c7aa46d501f0",k.FtuePlayerGoal="52ee2681-2fe6-436c-a671-5e179734ef20",k.FtuePlayerGoalRewardIcon="8e251779-a900-4342-a8e9-194e26e0ac95",k.FtuePlayerGoals="7841e096-0775-4836-a036-a699e97aeb53",k.FtuePlayerGoalsHudIcon="8cf2c78c-ebe4-4284-a57d-358bbe548f7a",k.FtuePuppetMasterEncounterCutscene="d6aa13bc-feed-4e74-9bcc-bf915a4171f7",k.FullScreenIFrameModal="7595de17-5dd2-4292-993f-1f282b93d433",k.FullScreenSpinner="ace6a730-c3d8-485d-8e18-5d3206bf8d32",k.FullUnitInfo="7f57bd48-8f2b-422c-9361-dc678d8ba725",k.GlowHighlightAnimation="61da80fc-7729-4e5f-8580-64e938ba1b53",k.GoingToArcadiaModal="0644faba-8b95-448b-a228-89e2222ba86d",k.GraphicCurrencyDisplay="bc62dfe4-19d8-427d-8a16-70effdeee79d",k.GreatHallPart1Cutscene="ce204c50-beb9-4184-9738-b54204f91c8e",k.GreatHallPart2Cutscene_StarterPet="12197814-f61f-4619-901d-23a8127140a3",k.GreenLargeButtonTextAndIconLeft_RectTransform="4143b4b9-7cc5-4088-9e07-edd2eb9409cc",k.GreenLargeButtonTextAndIconRight_RectTransform="826fde9e-0f3a-4ae2-b50d-13940715f87f",k.GreenLargeButtonText_RectTransform="43705ebf-a99d-4052-ba1f-db23639584e5",k.GreenMediumButtonTextAndIconLeft_RectTransform="3909edca-f54d-4cad-90d7-6af556567289",k.GreenMediumButtonTextAndIconRight_RectTransform="3528ffb5-8832-4313-a612-c502cd69d9c4",k.GreenMediumButtonText_RectTransform="529faa7d-c2b9-4093-be2c-e846a7108135",k.GreenSmallButtonTextAndIconLeft_RectTransform="8e9027db-2ad9-484f-8cf8-bcde815666ad",k.GreenSmallButtonTextAndIconRight_RectTransform="579ffa03-9580-492c-ad39-52b5e4c1ab41",k.GreenSmallButtonText_RectTransform="29f4b7f5-e3ba-446e-8cfc-72b5989ea676",k.GrottoPortal="aa21a6c0-07a8-46a8-8be7-00d34a62e460",k.GrottoSelectModal="9508619c-64e3-4822-b007-f53201bdc6d9",k.GuardSlimeHank="d4333a63-7258-474b-ad91-709611e2c89a",k.GuardSlimeMike="9d2ee8a5-b130-4113-b567-6263d37ec7e2",k.GuardSlimeNPC="66a3cbef-efc6-4e26-8fb1-e9e7a08a5a3f",k.GuardianBattleFog="af5e7e4a-66b5-42b9-924d-459ab4e0f888",k.GuidanceBanner="9bd83a0d-9b97-4cb2-9a91-306f910ed792",k.GuideHand="171721fb-5707-4ca6-a63a-720ceb050943",k.GuideHandSortingAnchor="f0850757-a0bb-4050-8283-6a994d040f99",k.HTMLVideoPlayer="80d09647-8a5f-4451-aaa1-f12927d62d4b",k.HUDGlowAnimations="5952ad79-cb4c-478d-ab4e-67819ab0aaad",k.HUDLoader="9e3ca3b9-fa71-4f6d-b6ee-1fef78965022",k.HUDMenuBar="bfea05f6-bb3d-472d-ad13-2601f2f565e1",k.HUDMenuBar2025="02e11067-c9c1-47ad-8cfa-33dcf1bf0021",k.HUDMenuBar_House="3e8bba0f-fc57-4411-8180-ac8948aa48ed",k.HUD_WIP="01ee32e0-e237-4d21-889b-ce9419d476e0",k.HarrietNPC="37934600-7ebb-4371-84b3-b36ba0623fa4",k.HatStoreAdvertisement="65b1cc51-052b-4ee9-8c52-4b808d009a57",k.Header="16b63ae7-4b58-4211-843f-056c92ea59dd",k.HeaderNavigationTab="44bc682e-7ade-4b27-8be1-47102c0b96d0",k.HeaderNavigationTabs="7e4b9038-600b-44b5-b790-4d7eeb6c2592",k.HeaderTitleSubClose="c778624c-abce-49cf-8363-426fee511af0",k.HeartTaskProgressMeter="9ea1ea71-c867-486b-846c-3cef97e21199",k.HopWalkCreature="e3df5753-c17c-4b08-9627-11d136a75347",k.HorizontalFixableMinecartTracks="25901cbc-1f86-46bf-9b6b-494de314da2f",k.HorizontalMinecartTracks="e647a8e2-fa3c-4aa2-94f8-c1a652a734af",k.HowardCorneliusNPC="b1516b4b-9698-497d-8062-039140edecad",k.HudAttentionManagerHandler="73c6ffc7-0b2d-4d9e-b089-6e400385804c",k.HudButtonRevamp="4737abf7-0ba1-43ea-9ed3-b77f50a618aa",k.HudButtonSubnav="334fcd8b-53d1-4d2c-87bb-545098a51c16",k.HudContextMenu="8a2b8faa-a3c6-4503-8c8f-72925bdfaf72",k.HudLiveopsManager="6f96f32b-9560-4f8f-9b8a-b2dd86b19f61",k.HudRevampLiveopsButton="6c261527-f4a7-4f4f-b98a-27376e1891ed",k.HudTutorialOverlays="69366510-cac2-4fef-8d90-91ff0775cb15",k.Hud_badge_animations="15521bb7-2d35-44f8-8c11-2114219f2a51",k.Hud_menu_bar_icon_animations="f1c65a51-2d48-437c-b117-bc57e9b92e7c",k.IFrameModal="fa05caef-e8b7-4b78-9304-e68c4cc9a178",k.IceBlockParticle="3513afea-41ff-4161-a4bf-aa7c70b294e2",k.IceTowerBetaPopup="6681990d-e0bb-405f-96d5-959779ec0ca8",k.IceWyrmSequence="9b5195b5-2a24-49e1-9aba-a0b7bacdea2d",k.IconTimer="9ec9bcec-80b3-44c1-87df-33a8e2cfa115",k.Icyworks="fed14908-e145-4d1a-ae31-7fe23cc1fccd",k.InfinityTowerTopRightContainer="f80b20e9-24ce-4f0c-852f-09efd8903b32",k.InfoButton="9b8a0f90-d3ea-4c36-aefb-2e06de02d0a7",k.InfoButtonBig="40222400-e474-4b3f-b841-abb1ab612c71",k.InfoRemoveTooltip="2e5f0801-8ba0-4135-a913-7e7cd41fb16b",k.InfoSection="d2cdc4f1-9e27-4b36-ad39-9b9c6d9d8558",k.InformationDialogGraphicBody="514acf6d-258c-4830-bc54-7acda35afa20",k.InjectionTest="2e47b691-4d8b-4c9c-84b1-72e580a1f351",k.InputBlocker="af9e4dcc-0247-49ff-acc4-577d9167e108",k.InteractableSparkles="cb02d3b3-66a3-428a-86eb-9ce6ff58f707",k.Interactable_BonfireCrate="2521f763-4cda-4591-a900-a22b2165e0a6",k.Interactable_BonfireFlower="6a8dfea7-4502-4076-bd16-b836a8c26dd8",k.Interactable_FireflyFlower="8b5b7081-710b-4561-95b6-8962e2647505",k.Interactable_FireflyTrapBox="9f91a551-bd15-4b87-a372-609aeb7f32c1",k.Interactable_Generic="7f5a53bf-f28c-48e7-b1cb-d7c71940a95d",k.Interactable_MinibossReward="b2c02e7b-a5f6-4633-89d3-8995e017e3a0",k.Interactable_MoonFlower="ba9d1007-2341-4cd6-9f96-61e321679563",k.Interactable_MoonValve="0b08738a-1d41-4426-bb0a-0614c7a1916f",k.Interactable_ShipwreckChest="071a9314-cf6e-4f72-96e3-1178184c8740",k.Interactable_ShipwreckSandPile="d7f0d300-5a11-402c-8e3f-19799012508b",k.Interactable_ShiverchillCrate="a0d3dd32-5238-43b2-b475-603291ec6c92",k.Interactable_ShiverchillSnowpile1="9e3ab9de-9b8a-4f21-8b6f-29edc0a1ba40",k.Interactable_ShiverchillSnowpile2="699b2e8b-3fa0-41d7-a611-5afa37d8a5db",k.Interactable_ShiverchillSnowpile3="edb041a3-1ca6-4227-aad1-375d9f64152f",k.Interactable_SkywatchBalloon="fcae3fa5-7f32-4534-a4f5-b681d2703bdb",k.Interactable_SkywatchValve="58577cd9-84d6-4ed6-aecb-a29fb9caaee4",k.ItemCard="9d8e1a8f-5201-4137-8249-fed3cb0c1f60",k.ItemCardCounter="20fa959f-be28-4d22-9733-b8405c3d9f25",k.ItemCardHeader="d29600f0-dbff-44ee-9ca8-d126881e7f9c",k.ItemCardLockedBackground="e3dc2984-f573-42cf-baf0-f1378b58701e",k.ItemCardRarityCommon="bde236b5-b4e9-487e-98bb-260b68e1d508",k.ItemCardRarityCommonNoShadow="c9340a5c-d410-4835-bcd7-3e5f27a61e5c",k.ItemCardRarityHeroic="1d3b76f4-fb53-4c1d-82c2-3ab22372b314",k.ItemCardRarityHeroicNoShadow="7dda15a9-d786-486c-9699-214c9d303c15",k.ItemCardRarityLegendary="af47e456-af04-48ad-b12c-0c798e11f16f",k.ItemCardRarityLegendaryNoShadow="b5d1f28e-d15d-4144-92b1-4597be72a854",k.ItemCardRarityRare="89946068-4db0-4ddb-bccb-16d2581aa2c4",k.ItemCardRarityRareNoShadow="f44accf3-0868-4fee-9903-4a6a31cb7d17",k.ItemCardRaritySmall="fd6d706f-314b-45d5-abed-6d820ddd60e1",k.ItemCardRarityUncommon="33921ba4-9f23-4b2f-b2b0-e2353ab80abc",k.ItemCardRarityUncommonNoShadow="08f72fe4-cf27-44e9-9b22-eca718b4c84b",k.ItemCard_EquippedGear="74ed0089-2688-4118-8317-7337d818b839",k.ItemDetailsModal="3aeccccd-d017-4ec1-a075-715c039b0d5f",k.ItemIcon="2521a48e-7f55-4879-ac68-dd74bd1487a2",k.ItemRarityBanner="98c91ffb-8ddd-4d5e-bf82-f4a78726a2db",k.JellyJimNPC="3d33edbb-e187-42fb-92ef-466c2948d38b",k.KeystonePedestalMenu="928d051f-74ff-4c5e-b7d0-2fd53b353d18",k.KeystonePedestalMenuItem="6f937ac7-f7d2-43ff-89b5-75e533e626c3",k.KeystonePlacement="1530e7a8-3689-4bcc-be71-8dad3f851359",k.Lagoonworks="edcc94b9-3e15-4e83-b815-90d2a2135146",k.LamplightC3="d72ccb06-0673-40a9-9d92-d94b632f1fb8",k.LamplightLockedPopup="096c42b7-328f-4c0a-96c5-b73a6d5ae0a3",k.LamplightWalkableScreen="88217bc7-d73b-47a9-b3a9-1868a47c356b",k.LargeButtonTextAndIconLeftBase_RectTransform="f45d1d33-8e2f-4c9c-a47e-4cf1db19a1ca",k.LargeButtonTextAndIconRightBase_RectTransform="7f9a4ec0-0d90-4b0f-a4f9-025a93bca33e",k.LargeButtonTextBase_RectTransform="6f82f043-fad8-4549-b8ee-777661f42659",k.LavaLeverInteraction="b0867de3-3240-4016-8d7e-54e8e941a7a8",k.LavaLeverQuestInteraction="197d5bb4-61d2-4ad8-9f83-008e054b52bd",k.LeaderboardClassCodeView="8611011c-5483-4262-9e0c-fd1443acce90",k.LeaderboardCountdownWindow="8370d704-ea6d-4efc-8b89-5f6587753a81",k.LeaderboardNotification="aa959ca2-8754-4df8-95d6-ca16935697fe",k.LeaderboardRankingPanel="17b7a6d9-3b5c-4190-b20b-75ce7a4dc589",k.LeaderboardResults="84ae29ee-a4c9-4c70-86be-7740d8087b58",k.LeaderboardScrollableView="db401529-cded-4df0-9669-47df6861f35d",k.LeaderboardSvSRankingPanel="2ecc0dbf-8d91-49e5-bf99-3342e40a4fbe",k.LeaderboardSvSView="7dded6db-0f1b-49b3-8a6b-4bf2cdff9f81",k.LeaderboardView="a97ca31a-1eaf-42d1-92bc-4670819f0cd1",k.LearnMoreBody="4213f26e-6502-4e1c-a0ab-155a252792fa",k.LeaveLamplightConfirmation="decb2378-402e-4aa8-8c3c-60d53a3eb645",k.LegacyBattleNewIndicator="1f087df3-8054-49d5-9146-e745fe16d006",k.LegacyDungeonPlayer="42e01b40-8bd6-4555-9a15-5dcfd6ce8f6f",k.LegacyEpicsChoiceCard="c7db91ad-cca1-4b93-9d2e-7405e26fab5d",k.LegacyEpicsChoicePopup="62f060d8-fe93-442f-8ee8-8fd134c62dc0",k.LegacyFollow_BabyReindeer="12c7cd6a-8528-4f37-9db3-2c37422cfdad",k.LegacyFollow_BabySnowman="81140ff9-5019-4538-909e-ecd0f4a96508",k.LegacyFollow_BarnOwl="7858415c-b99f-4f6d-bff3-d9bf5e66f8dc",k.LegacyFollow_Beagle="d9b2b923-1cef-4701-bb6b-66cf4fb18a7f",k.LegacyFollow_BlueParrot="5673ba5e-d1a8-40b2-8cfd-2d91fdca9977",k.LegacyFollow_BrownHamster="817a489d-a299-4873-8889-d37f96a20879",k.LegacyFollow_CalicoCat="223a0cdc-8788-46dd-8654-96526508df14",k.LegacyFollow_Chameleon="56e2cb99-bcff-4bc1-ab86-1631fc1c82c8",k.LegacyFollow_CloudSheep="35f406ed-3d0e-41d7-b9c6-a5286ba584dc",k.LegacyFollow_Cockatiel="e64ef4fa-2ae2-46f2-bfd8-ae4dab232e46",k.LegacyFollow_CuddlyCactus="91e32f85-b86e-4024-874e-c0d6352fc92d",k.LegacyFollow_FlameSalamander="8f9744b7-1e48-4b25-af31-e983dad3cfe1",k.LegacyFollow_FlowerTurtle="4cb02221-b4fe-46b8-ad53-3ac666ae9d81",k.LegacyFollow_Gecko="5e758c86-4462-4abd-9a4e-fa1b0fbcf0f7",k.LegacyFollow_GreyCat="ff3837c0-5acb-4f1d-9581-b42634a9a5f4",k.LegacyFollow_GreyParrot="8089f5bf-ad38-42e8-ae5b-6c77b9d60e2e",k.LegacyFollow_HornedOwl="84b152d0-8202-420c-89bc-22a129ede8bf",k.LegacyFollow_Husky="64f957f0-95ab-49a4-a8f1-8fb2d412962f",k.LegacyFollow_LeopardGecko="c74886af-7e0d-41b1-b347-cf2b5ced4885",k.LegacyFollow_Penguin="5072a2e8-93eb-478c-900a-80b8a6649496",k.LegacyFollow_PurpleOwl="62292d8d-279f-406b-93ff-cfaf076b58aa",k.LegacyFollow_RainbowPanda="80b17525-4e04-44a3-9c71-27b895a4e024",k.LegacyFollow_RedParrot="cf0cfdeb-04d0-4218-8fb6-be4c31a186f8",k.LegacyFollow_Saber_ToothCat="df4c4416-f741-4a2d-8f3a-a4417fc592c6",k.LegacyFollow_Shepherd="4d7789ce-6b07-459b-9580-67fdd9f0ad4e",k.LegacyFollow_ShibaInu="f3ec331d-35b8-421e-90a7-314ef44f0887",k.LegacyFollow_SiameseCat="ac2837f7-5ccb-4059-8a74-ee2267b28eae",k.LegacyFollow_SparkleHamster="8be164c6-81de-425c-84ea-7f0f5101ca4c",k.LegacyFollow_SparkleKitty="1e2a857c-8213-4425-8264-bccffe30bf18",k.LegacyFollow_SparklePuppy="903f80d7-8550-4469-a299-291251fe5cdf",k.LegacyFollow_SpottedHamster="da4c7159-fbb2-4b7c-9f96-1b88e91b7c88",k.LegacyFollow_Steam_PoweredRobotBird9001="f42ddee5-4e78-44bd-bd3d-d9cbdb586bea",k.LegacyFollow_TabbyCat="0b599ffd-5823-4b6b-930a-af1d4411f111",k.LegacyFollow_Turtle="cfa2a157-1044-46cc-b7f7-fedc7f1a9efd",k.LegacyFollow_TuxedoCat="aba7150b-4e2b-41db-8f88-9833a7905e5e",k.LegacyFollow_WhiteCat="49a3cb34-0e8e-44fa-9087-da28f6ac3262",k.LegacyMapSpawnPoint="733fbbc6-b09d-4c9d-a6be-580cdc4d175e",k.LegacyMapWizardEncounter="e81a8ce0-80c3-45a6-8e6f-1e33050a6252",k.LegacyPlayerHead="9e1081ce-6b5b-44b0-a3bb-17f03b746d32",k.LegacySeasonRewards="aef5d065-6408-4e5e-a6f5-bdc395ce578e",k.LegacySeasonRewardsCard="419e1bcb-9354-4eae-8ab3-a650c4188540",k.LevelUpBanner="f85818f1-debb-425f-b2d8-8416ea1c6752",k.LoadingOverlay="04e0b298-53ac-452c-9f4f-477ee891cee2",k.LoadingSpinner="5ac9c3cc-e070-4487-998e-4f2824d1304f",k.LoginCredentialsQuizPopup="30a023e9-f0e5-4c36-a264-6ac51f8c3ad3",k.LoginPage="dde06240-581b-4a49-ac08-1a678b4670f5",k.LootDashBattleUI="2de5d40d-fce3-45d6-b76c-45567735af2b",k.LootDashDetailedSelectionScreen="15f95dd5-8f08-411a-a239-cb408607330e",k.LootDashFeaturedItemCard="de39eb7c-8b84-4842-9760-9a09b7d90731",k.LootDashFeaturedItemConfirmationModal="cc653363-763b-43eb-a6fa-1344d5720d6c",k.LootDashFindAMatch="83d4290f-4b2f-4d09-9dc6-1aa8450918c0",k.LootDashLobby="07604842-aaa8-4d95-b7cc-15b24e3ffefa",k.LootDashMatchFinishedMenu="bb225026-647c-4d2f-be0f-0f123d1d9113",k.LootDashMenu="cd941df6-4613-4a91-aba6-d82b18b74af5",k.LootDashNoMoreRevivesModal="30980f91-8064-415e-bb68-da9f2607724f",k.LootDashOpponent="3cb8108f-75a7-4428-8446-37970141cf00",k.LootDashStage="48a50b40-f903-427b-ae8b-8f8a627659a6",k.LootDashStageOverlay="0172bc63-5e2a-4c0a-8f49-9cff11d5c9d9",k.LootDashTransportModal="6e5f12aa-96e0-4825-bc2b-375f0f01ad8b",k.LootDashWaitingRoom="bf8a4461-7dc3-4bac-a2c1-585f1a03141d",k.LootDashYourTeam="e743f3d6-1bd6-433f-b08a-afa676402880",k.LootItemCard="336e0c9c-cd1c-4301-b52a-b98e5fa5d9ba",k.LootItemCardwithQuantity="bd404e85-187e-4418-a4c8-8138c889808a",k.LostFlowCtaBase="6a171cde-a4d7-4fdf-b231-dc09a2f1caed",k.LostPetModal="b26c3933-6f46-4ebc-810e-04546801eaa4",k.MagicoinRewardsDisplay="127fd899-ba5f-4ff0-a705-8355e2242a07",k.MagicoinValueText="f397d5b4-0158-4bbc-a24b-11fd01438e78",k.MainDungeonPlayer="34dc3421-4b81-4317-ba07-c49c197a17ed",k.MainHudBar="d57f7b9a-76c8-46ca-9add-8646c0aa697b",k.MainPlayer="4d671c0a-9eab-4ebf-a4b6-7735316c7974",k.MainPlayerDisplay="cdd4b79c-67bf-4018-b069-4ce23dc647fb",k.MainPlayerIcon="a4364b84-a6c2-472d-9119-4cf6e6c3e6fd",k.MapLocationDialog="bb95e49c-7053-4edb-9bb2-2d22a1a4d8fd",k.MaskedPlayerIcon="3508c69a-337e-47fb-b694-9bd81bcf0200",k.MathTowerFloor="096be956-d921-4b01-94cf-5296b2ad9dee",k.MathTowerShroudLock="a1bd4731-a40a-4891-8cfd-6556e741c10d",k.MaxRiftCardTeaser="0ea1cf17-73c7-47e2-bc40-359a463796a9",k.MaxRiftTierCompletePopup="2edf9ed8-edf2-40ca-9cfa-8413cbd4b271",k.MediumButtonTextAndIconLeftBase_RectTransform="174e9865-8ac6-459f-abed-f6049c437d8a",k.MediumButtonTextAndIconRightBase_RectTransform="c9d3b0f0-1385-4b5f-b73b-f755384c6d06",k.MediumButtonTextBase_RectTransform="dc93dfc6-5aa8-4521-b827-d85cc1ccb7a7",k.MemberChest="baf20088-5ecc-4def-941a-b0a57a0b74a1",k.MemberJarContextualPanel="e543abbc-eab8-44d6-b6f8-30845c0ac41f",k.MemberJarInfoWidget="ee74b4ae-0f3e-4c73-be8d-1ae019d75c07",k.MemberJarRewardsDisplay="6f2c597e-e1e2-45b5-a5e2-a314694bae08",k.MemberLockedGoldRiftModal="89771efd-0e52-4d6d-8483-8bceccc17eb1",k.MemberRewardCard="06aa63f4-5918-4303-b58f-e2f7763d47af",k.MemberSuccessVideoPopup="fb7e84ef-e017-4834-a0ce-4cc11dffc8d2",k.Member_LockedRiftsVideoPopup="5afebb38-08b5-4007-adb1-ce53a6059073",k.MembershipButton="386ac2b6-c46e-4cf9-8a23-e7db6cb87ba1",k.MembershipParent="ffb23bc7-99e7-43d0-8d7c-959368fbab0d",k.MembershipSchoolAd="c54ba39e-3ccc-4235-9dfc-fe3d032187fc",k.MembershipSuccess="18482125-378d-45d6-8e32-0bf4637f90a0",k.MembershipSuppressionTooltip="eb5a918a-3042-44ba-ae91-40445f35e8fc",k.MembershipSuppressionTooltipMenu="8898a24e-c4c6-450b-b682-005af5b15d6b",k.MembershipVideoAd="a77d89fb-0220-4cc8-b50d-d84720b2dfd5",k.MembershipYouTubeAd="c37e0a92-7388-453a-9b3e-da705f84c1f9",k.Memberworks="97cab445-cdcd-4fde-9769-8d45547bf11a",k.MergeBar="017bc79d-de8c-4554-ae26-e137e790e5b2",k.MergeIngredient="d7008c76-d93e-4503-a704-edf566f93c0e",k.MergeIngredientWidget="ac5d1a07-f7c6-48b2-a02f-a3bb3dbda3e2",k.MergeRankBadgeLarge="1676d3fc-cf3f-4321-95f9-050a0a917674",k.MergeRankBadgesmall="6d5e96d6-39bc-4eb8-8add-18bad3f11e4f",k.MergeSuccessBadgeVFX="a328816e-5e07-4d20-9808-349ab5f3f2df",k.MergeSuccessNumberVFX="0076fbeb-5385-4043-9d37-0b1ff0198da4",k.MessageBox="a1d0fd8f-e51e-4276-b8f9-89e5ee92e5f7",k.MinecartSuppliesPile="80fe2449-99e6-4f0d-bdd6-8179802906cd",k.MinecartTrackBoard="c36b4076-771b-4e60-abaf-ddf0d4c86930",k.MinecartTrackRail="94e1fe77-0dbe-4bbf-95e5-ea707007ed5c",k.MobileUpsellModalOffseason="3c5cd356-47ba-440d-9f7d-ccb691b8570a",k.ModalCloseAnimation="e41f3893-9306-47fa-92e9-4e038067db28",k.ModalDialogBackgroundBanner="cba8f9c9-b62c-4873-a571-57e29977ae5c",k.ModalDialogBackgroundBase="2a318f65-0bae-4e36-b551-84f93be3eede",k.ModalDialogBackgroundBaseSortingAnchor="e20cc2b2-962d-4556-94a4-4e9eb6ed6597",k.ModalDialogBackgroundLarge="51511cac-c7c9-4d10-bb33-a78c42f5ec68",k.ModalDialogBackgroundMedium="8aa8df9a-e2ed-4751-9188-d0527e41fbab",k.ModalDialogBackgroundSmall="cb5675f1-a15c-4e61-9a93-feceb823d6e1",k.ModalDialogBackgroundX_Large="54d80c70-5534-4a9b-86b2-208d52e07772",k.ModifierBar="5fc3725f-d8dd-4602-8871-448c5130128b",k.ModifierIcon="c72feaaf-8a1a-434a-a96d-a59453339dd7",k.ModifierIcon_WithTooltip="26684bd6-470b-4e88-9238-f6bc52867f12",k.MoonA1="aacfa1fe-370d-460f-977a-228505774cd0",k.MoonB1="d080cf08-ffcc-4c83-abbe-da789aff9331",k.MoonC1="a42ee972-b18e-4615-870b-21d18d793e88",k.MoonD1="6b93840a-b98d-490e-bbfb-9e1fb977aac5",k.MoonPortal="03d4d8a7-1ed0-4288-abec-1852236cf0cb",k.MoonWalkableScreen="24fed0ce-6dab-4a77-b8e7-59f7f60efb1e",k.Moonlight2025MoonArrival="d4c6d02c-a66d-4280-ae4c-156ed97ed926",k.Moonlight2026FinaleCutscene0="90101948-166b-4336-97a8-8594116b924e",k.Moonlight2026FinaleCutscene1="40455b32-6202-4ff8-ae50-2e11292d90b1",k.Moonlight2026FinaleCutscene2="59994356-ad20-4816-a7b3-66092049bd53",k.Moonlight2026FinaleCutscene3="d575e79d-7c56-4b41-980a-fbaab29e33c1",k.Moonlight2026FinaleCutscene4="a4f336f5-5394-48ec-b2e7-306158986468",k.Moonlight2026IntroCutscene="a390ee52-de3c-416b-9ef4-649dd9688810",k.Moonlight2026IntroCutscene2="571b56cb-d04b-455f-a96b-e6661f0c4f72",k.Moonlight2026Story1_3="73fc2346-e6ca-4339-a7d8-bf0960c592ed",k.Moonlight2026Story2_1="339d7ea0-7622-422c-94ac-68d079bc09d1",k.Moonlight2026Story2_2="c81cb16a-6032-46b5-a69d-e9b539282ace",k.Moonlight2026Story2_3="b22345cc-cfe6-4047-8db1-e4471691af57",k.Moonlight2026Story3_1="cd7fd03f-88be-45c6-a91b-bf31c48f4de1",k.Moonlight2026Story3_2="10e1c548-e870-4b58-b11a-bb56f7454431",k.Moonlight2026Story4_1="a8380002-480c-4b21-83d2-f3ca767e9f5b",k.Moonlight2026Story4_2="f86c7095-e1f0-481e-85fa-d9f83efa6706",k.Moonlight2026Story4_3="bb7f56ee-e500-482d-a675-bf7dd0511e02",k.Moonlight2026Story5_1="32da834a-8008-4ebe-b280-f5194d745bfa",k.Moonlight2026Story5_2="2fd5f087-7ef7-4739-853e-298bbc8fce6d",k.MoonlightBossStatue="fdfcb576-13e3-4b66-8e6d-2c64f083e8e5",k.MoreItemsCounterCard="f7fc5047-8e53-498f-9b88-a54b4f719a84",k.MoreMagicAtHomePopup="02cd1957-6f99-4862-be67-4a6fb1319aa7",k.MorphMarbleButton="e94d0dbb-d754-4384-be03-3bf4405d05e0",k.MorphMarbleIconSpine="37a4238b-4bcf-4da7-9853-d249281c53fc",k.MorphedLegacyFollow="99b8c066-153f-4b64-8f31-f013999bd6e8",k.MorphedSingleImageDorm="7f4c0349-a4c2-471e-849e-418bc6f30b9a",k.MorphedSpineFollow="67a7bd11-9c7a-42e4-a18d-3ee7e70ca835";k.MountPreviewTool="cfa08d0c-26c4-4d0d-93c4-99a3908fa452",k.MoveFloor="c16c8fac-546e-4a8f-9699-96afe7d42bf2",k.MovingImageTween="76892994-f7dd-4bcf-a46d-b54dcd910245",k.MultiCurrencyWallet="c9624751-c2c9-482a-96b9-77ff25ac944a",k.MythicalEpicsCarousel="4a494381-5e03-41e0-ba43-007be9819e9c",k.NPCAcademyMerchant="da9f045e-f7d3-4b2d-9bce-c566869d013d",k.NPCAspenFrost="fd48539b-0b8e-4e4b-9e3e-ada16d096a68",k.NPCBenni="a6477340-d0ec-467f-8215-8233ac847d74",k.NPCBenniandBroccolina="84e11a0a-480f-41af-95be-dad7c5bf0298",k.NPCBossStatue="6605a0ab-355d-41bd-b8c7-52ee317591b8",k.NPCBroccolina="82a09006-0152-4f46-953e-92c747850df4",k.NPCEugene="43ecf99f-48bd-4e9b-b613-5eff88f8a6e6",k.NPCGale="3386158a-44c0-4d6e-b9a5-45f1669a6a38",k.NPCGnomeSpinner="5410643e-1f60-4fbe-9543-381f5845b87a",k.NPCGnomeStylist="9e3ad609-86f4-47e5-b88f-120ad9be8983",k.NPCGnomeWheeler="fd0edd4d-6f74-4c4c-87ca-e15749814858",k.NPCIndicator="982b5f6c-e362-46df-95c3-6405f0a99286",k.NPCNoot="1e3594ac-0daa-473a-ba58-00d9555b5b09",k.NPCTheoAddiwise="e59a37e5-242d-41de-b6bb-4857ea3770fd",k.NPCWizardBase="01697576-347d-46e1-a054-f4f32a5778f6",k.NavigationGuideHand="7ac0c322-6503-4a19-8d9d-2f31c0a98492",k.NewTownPopup="6026dfea-1840-4632-a262-e0fefbfb2d37",k.Nicknamer="c3ac7fb9-b56f-4f2e-ae20-da8fb9c552b8",k.NoShadowAnimatedSpineCreature="45da9634-1d20-4249-9c7e-397e5f3f3e70",k.NootBattleTip="3b21f27f-e737-4d30-b085-bd74777cacdc",k.NootSpeechTooltip="cb09ab46-f605-439e-84c8-26572f2207fa",k.Npc_imani_star="bcb070db-74e6-45a1-864c-544cf428b708",k.Npc_kandi_kart="70e51761-df90-4e60-be26-1dcac6b72b4b",k.Npc_kandi_korn="b4abfa7e-97d4-4d44-b342-75a6bc828896",k.Npc_milkyway="9a32bf0d-748b-4188-aead-75df2b9be79a",k.Npc_poppet="097e536f-b637-40b2-9138-71203b14e2f2",k.OTPCelebrationCoin="ffa021d4-135b-41b7-b044-75fa78558444",k.OTPCelebrationModal="3412d343-6304-4140-9e42-57a5035060c4",k.OpenPWAInstallMenu="e741c190-7589-4ab2-9a85-8668b3c4210a",k.OptionsMenu="da0068bc-3803-4b05-8bda-f76f96a91a8b",k.Orb_burst="c3a867b2-1947-46e2-a472-febcadd7bf5a",k.Orb_burst_2="2fe2168b-1e64-4a80-a175-45c0e32aa410",k.Orb_particles_fall="2c87b6a5-94df-49d0-99ee-c3b7f3d25334",k.Overlay_difficulty_expert="5ef74941-73f6-4083-9b13-97923cca6659",k.Overlay_difficulty_expert_particles="f5dff32e-b002-4b1c-9502-c4a2f7e120d4",k.Overlay_difficulty_hard="74f020ae-f283-4799-9b67-f6dcab484fb2",k.Overlay_difficulty_hard_particles="7edaa81c-30d0-4dbe-b824-d354d6022cc0",k.Overlay_moonlight="217578d0-5547-47ed-b9fe-5d6bc96cc977",k.OwnedPetCardInjectionConfigured="364911fa-c99f-407e-8af6-0157cacba222",k.OwnedPetCardInjectionConfiguredMergeRank="dd4156ac-d6ec-4500-846a-103052e4f971",k.PVPArenaGate="f5f8abfe-6766-4981-ad51-edc544561bf8",k.PVPArenaNPCArenaMaster="dd4dc09f-9d51-40b5-8846-6393951c2bdd",k.PVPArenaOutsideTrophyCase="da6bd42e-06e0-4dc5-b976-caf20800ba67",k.PVPArenaSignpost="34a7a6af-968e-460b-8f8e-802b9ba7440c",k.PVPArenaTrophyCase="b388ddef-c031-4e98-ae1c-e32975e7fb00",k.PVPArenaTrophyCount="c248c8b1-4fae-42ed-8ef5-800be0d43eb3",k.PWAEntryInitialization="a898481f-808d-48dd-91db-cb9441348489",k.PWAErrorPopup="505ae35e-457c-4dfb-a633-170572a4cdd7",k.PWAInstallMenuBase="2df094ca-b6bd-4ca1-aeb3-be207554ddba",k.PWAInstallMenuBaseSmall="757fd180-0ff6-45e1-97c2-aa98f96f555b",k.PWAInstallMenuNoIncentive="eb5cd5c8-25dd-4f7f-a72b-441a22e0f741",k.PaintBalloon="e93677d9-c599-40f5-a1e0-29f8e18703ff",k.PaperDialogInjectionConfigured="35687420-dd30-4411-89e1-20aaab8521fc",k.ParentAttach3="212a3c6e-0113-4c17-a647-f0362a5203c9",k.ParentAttachModal="07326396-e362-4272-989c-0f853701ab6f",k.ParentGoalParentAttachModal="a0afb3c5-2747-4fe1-a693-80f9a222fe1a",k.ParentGoalStatusDialogBase="4ad7fd94-17ac-42ca-80c9-a9b7da1422fb",k.ParentGoalStatusDialogComplete="edc6419f-02a7-4db8-be70-3c78dbc86546",k.ParentGoalStatusDialogInProgress="43f733cd-9f6e-4124-ad9f-c7494513b536",k.ParentGoalStatusDialogNoGoal="90cef2ce-9eb8-4466-8cd5-cc9234bf3d96",k.ParentGoalTracker="d9ac6f78-bb11-4a5e-976a-bd39faa63d2b",k.ParentSection="819901b9-7cf0-4541-b1fb-e873f8c2dc3b",k.ParentalConsentBanner="9dd203ff-6a15-4b0b-8d33-a049e2d40c81",k.ParentalConsentModal="9f59a705-5589-4573-a782-afde8c8164b0",k.Particle_astral_burst_1="929beba6-b5e0-4818-b9e7-1cd6869537f3",k.Particle_astral_burst_2="e09994aa-3f0f-4d92-8490-998a5cc833ee",k.Particle_astral_burst_3_rune="aba7824e-24f7-4365-bef2-b05c7813eb71",k.Particle_astral_burst_directional_1="9d20a3b5-f830-40cc-ba6b-4ff47af674fe",k.Particle_astral_burst_directional_2="155035d6-10a5-4ef3-8219-9581f5600bff",k.Particle_astral_burst_directional_3="141d33ff-dc17-43dc-9ddb-f5eb34b3cd83",k.Particle_astral_impact_dust_1="41e855bb-0ea2-4f0b-9637-38fb1974351a",k.Particle_astral_impact_dust_2="41b9c17d-e34c-4cb9-bb3b-2ed8986c8eea",k.Particle_astral_impact_dust_3="5c28487e-5f07-4572-84c4-40ea0c4bc962",k.Particle_bomb_fire_exit_test="bc8c5270-18b0-4839-8967-47988e190770",k.Particle_bubbles_rising="148ac653-174d-436c-9f6b-6a0b721514f3",k.Particle_confetti_moonlightfestival="0c97d8f3-1fe9-483c-9caa-da2cc6144fb6",k.Particle_fire_burst_directional_1="af207485-37cf-4b3e-8479-3abff7c103d5",k.Particle_fire_burst_directional_2="6b2a1288-3347-4717-937e-ac51b7fe06fa",k.Particle_fire_impact_dust_1="a8959c08-a826-4566-a12e-74da46542081",k.Particle_fog_pumpkinfest="f37d9e65-763d-4f96-ac86-17210c600b8c",k.Particle_ice_burst_directional_1="90ab2afa-eec7-495a-9d30-95dbeaaf5795",k.Particle_ice_burst_directional_2="d8fb76df-27f3-4912-9d96-984debdda0eb",k.Particle_ice_impact_dust_1="311586cc-250e-4eb4-8093-e025abc1eb18",k.Particle_icon_glow="b2c6dda3-24c9-4e26-888f-fdb816945f22",k.Particle_icon_sparkles="036d32c9-fbe9-4c2a-bf3c-67adb1801265",k.Particle_ink_explosion="766784c1-0181-4c4f-8c0c-07fc5216cafc",k.Particle_ink_idle="1a15a63e-2a9c-4372-81f9-ee23fae620d1",k.Particle_ink_idle_small="b4b6a781-5244-4882-a080-b6cf441a7c2a",k.Particle_lost_charge_stream="af2682ba-690e-42de-b431-992eeb38d59d",k.Particle_pet_to_store_A="103e2891-36b3-4b58-a2f4-4e115451d1a9",k.Particle_pet_to_store_B="5f8cb304-30db-486b-9a93-1ea71324215f",k.Particle_pet_to_store_C="ef314fb0-7b30-436f-9a1f-804553f22fe6",k.Particle_pet_to_store_D="a93de2a5-e926-4a80-80c5-662293c53849",k.Particle_physical_burst_directional_1="9b4f196a-6902-4318-a68e-e7a798fb5a5f",k.Particle_physical_burst_directional_2="7c878019-1af6-487d-8bbf-295a04137a15",k.Particle_physical_impact_dust_1="38e59f12-ff67-4999-922b-3bd0e3a77dc9",k.Particle_plant_burst_directional_1="7e8921b0-b9af-4ff5-b61e-9c1032c72e0c",k.Particle_plant_burst_directional_2="b441fb95-6ad7-4619-bb26-87b3d7eaccde",k.Particle_plant_impact_dust_1="b23e920e-baa4-401c-8473-ca582af4ecff",k.Particle_sand_rise="b5374eac-bbc7-4388-ac96-14af32ea107a",k.Particle_screen_dim="0b3a250b-7ba7-4d25-91a3-9d1980343a59",k.Particle_screen_dim_long="9cff7a2f-028b-4445-af96-2b1f2b3471f9",k.Particle_shadow_boom="41cff766-5076-4cc5-bfd4-f25eb4767bea",k.Particle_shadow_burst_directional_1="69ff659f-9768-45df-944b-ea0e16e60c74",k.Particle_shadow_burst_directional_2="ceb09c38-6ba0-4acf-b284-0f5393c969f6",k.Particle_shadow_impact_dust_1="8e0bfb35-6e75-479d-a60e-f0745e078b2e",k.Particle_shadow_trail="9438ea3b-f8b4-4048-9db3-090b4f9cd737",k.Particle_smoke_morphmarble="65255952-3ac5-4612-be23-e37e30ec7afb",k.Particle_smoke_smokestack="60a800de-a83a-4f6c-b19c-f35ba3feaa9e",k.Particle_smoke_white="c2327db8-1b44-409f-8387-c7633127c082",k.Particle_snow_1="eed660c1-3d30-479d-8003-e488e7209442",k.Particle_sparkle_trail_1="46bdef16-21b4-42c6-9625-f8857980651a",k.Particle_spotlight="b0edc171-e9af-4012-8b34-001c2118f994",k.Particle_storm_burst_directional_1="8adb36cb-6227-42fd-a22c-530fec3695a1",k.Particle_storm_burst_directional_2="6fd55f97-c86a-4608-907e-f226df4f4b35",k.Particle_storm_impact_dust_1="b5d79c7f-911b-4f9b-8651-17159f4d55c0",k.Particle_treasuretrack_trail_1="1b2b6d78-2d8c-466c-b138-a6acda67a3ef",k.Particle_water_burst_directional_1="c2520b98-8db7-4272-8f94-517bee0e2556",k.Particle_water_burst_directional_2="2b71ce7d-b7e7-4344-b225-fbffeb4c6d96",k.Particle_water_impact_dust_1="7b2a4845-d93d-431f-bf43-92cd3f6eb7b1",k.PathingStar="9518748a-13e3-4f2e-852b-4e42bd85ca02",k.PetAboutInfoCard="76bfd317-9e3d-4aaf-ac97-6feec08665a4",k.PetBookGearSlot="2d106c5e-e9be-4583-8a2f-f76ce406a55e",k.PetBookMenu="e4fa3c64-2bf3-482d-8d25-89c7c3b02c5a",k.PetBookTeamSelection="d21adf52-3dcb-4522-bf40-27d1492756a4",k.PetBook_PetCard="dd35869b-0d2b-42c8-abd7-bc4cdef2b59e",k.PetCaptureHighlightSmallTooltip="ac1a9380-65ed-4aaf-a305-ea77057df8b1",k.PetCardRarity="3b64692b-fc74-4572-9d8f-7ddb8a079bd2",k.PetCardRarityBackground="282d3611-3a24-419e-a26f-899e4547135c",k.PetCountRestrictionHelperContent="16a3cedd-79e7-499b-8cef-42cd144cb4d2",k.PetDetailsScreen="04ca63b1-d490-4440-8943-58d3d36ce258",k.PetDifficultyIndicatorIcon="fd1b8fba-3e56-4d55-9e73-229a0eb61a2f",k.PetEvolutionDisplay="4f7f09f0-0fb5-426b-b9c5-d127f0d91564",k.PetEvolutionLine="c7be8c8a-b01c-401e-a022-75e786473a6c",k.PetEvolutionMagicoinModal="0cc7d11e-eb16-4332-8810-10e05075f37d",k.PetEvolutionPanel="aad8dee1-2f6d-4a5c-9089-7a43f94b25af",k.PetEvolutionSequence="7149027e-4544-4c4d-bc36-cf4311018916",k.PetEvolutionWidget="4b06d0d6-3091-4c2a-afa2-f35828e63ba9",k.PetFocusContextualPanelContent="d8a01778-a189-44d3-bcdf-41c1ca70ad84",k.PetGearDescription="fdf102bb-e0ba-4960-9f93-ffe1e3ee734d",k.PetGearFtueOverlay="7a06d692-db44-48c5-84ed-e2970b03e1e8",k.PetGearItemCard="57394207-7650-4365-b68c-63f72f8b5308",k.PetGearTooltip="8192e149-fd81-4938-9d8d-f3c5ecd79245",k.PetGearWidget="f9f25c01-180f-4203-837b-11ff09b47fab",k.PetInfoLoreTab="a7aea094-4ed6-4280-ac89-1224df5601db",k.PetInfoScreenCard="33a1192b-a968-46c7-acb0-3806346b3800",k.PetInfoStat="dc7e4985-c6fe-4de5-8e24-e22ea376b0d4",k.PetInfoStatsTab="e932f227-df58-43ca-91cd-dab5f2081133",k.PetInfoTab="d0df30b9-8102-4da6-8090-6e6add1686a9",k.PetInfoWidget="7f9ce78e-7514-43bb-8757-c8d56c519604",k.PetInventoryScroll="fee6bb72-95f3-4665-8ad8-eec81141049b",k.PetLevelWidget="1519bc39-5f2d-464b-b5eb-a8610c78d3a4",k.PetMerge2Modal="01b373c1-e724-4a3d-bf07-04036bbc3ac9",k.PetMergeConsumedIngredient="f31191a8-d3d1-4903-b78a-ad0fcbfe5e55",k.PetMergeContextualPanelContent="44e974cf-2abc-4b1d-8a42-e3875a09e514",k.PetMergeFTUE="6f0f90b8-de17-4be6-89dc-1c47c7ea4fa8",k.PetMergeModal="5e53903f-6c5c-45ba-a35e-5b389d9e7e35",k.PetMergePetFanfare="4b24e560-8aa7-4101-a1b0-196111930f5a",k.PetMergeRestrictionHelperContent="204ff384-6360-4274-bcbb-86b0ea60acc4",k.PetMergeWidget="e66f6a25-046e-4f26-b001-f054a1c2829f",k.PetNameWidget="a4a7bbc8-ba1d-47f7-9133-6f6ebe24df8a",k.PetPlatformWidget="ba1d8c0c-b2c5-4d34-aa05-3470e02fdcd7",k.PetPostEvolutionCard="b9a0f728-7828-476a-8a56-ea12dedaf1b5",k.PetPreEvolutionCard="bab37c3f-8aec-41f7-9aaf-3d1af2444d26",k.PetProgressTabController="a58ac210-1436-439d-a342-8cc77c590d88",k.PetQuestInfo="b8f1822d-03b5-4810-bae3-26ba898324c1",k.PetRescueCard="f9fe1d73-b28a-46aa-8b46-8fe5117e94b4",k.PetRescueCardSequence="8bafaeb9-1983-41e6-9d27-b02c5f04852f",k.PetRescueExperiment="5f1fc64c-f981-461c-967d-de22ba1c1500",k.PetRescueStampSpineLocalized="7b87eebf-38b3-4807-b28a-f05d9feea67e",k.PetSelectionDrawer="7c992288-c7f1-4a22-a6e1-b820a6501b94",k.PetSlots_PurchaseModalSidecar="8cf594e3-618f-4c0c-8f7f-e6992b3f46c4",k.PetSpellWidgetCard="03ec51be-c419-417e-9121-dcece7d8c20b",k.PetSpellsWidget="68232e17-b553-4372-936b-325b8b79b5e8",k.PetStandView="11c2342c-ad09-4021-8d3f-04dbf4421ad8",k.PetStatsInfoCard="bb0e4fe9-0e05-42b9-a1c6-8661eb5af225",k.PetTamingTaskProgressCard="a49b5e5a-be60-4e4d-bd7d-d17997631f50",k.PetTamingTaskProgressCardV2="f29e0afa-c262-4cd6-b47e-875597b55fb8",k.PetTamingTaskStatus="c73d11f1-e4b7-41d6-bf14-a7b77d9c479d",k.PetTamingView="af15c3bd-ba60-44ff-a3a6-b92fd7809ad6",k.PetTasksTab="be90c9bf-2ec5-4056-93a1-e110fb943698",k.PetTasksTabV2="7de8c6e8-3ee0-4536-9bc3-1de0eee8f9bf",k.PetTeamCard="337e778d-d9b4-4fb7-9105-0a7dd73c7bae",k.PetXPBoostFTUEPopup="ff0b8d68-96a0-43f1-ae16-43d04f32bcf3",k.Pet_Merge_FTUE_Popup="23c2e24e-9bd6-4d0a-a14f-f487c2ddc60f",k.Pets_AddPetSlotsWithoutConversion="cc7da06f-4329-4e52-a48f-71211e4a6fe0",k.Pets_Background="deaf21f9-e416-437b-a348-38cf09bf8023",k.Pets_BackgroundPetBook="366bbcde-0f91-4f9b-ba36-11537a853b13",k.Pets_BackgroundYourTeam="1a816b0b-02b3-47ce-9d20-9a7728707697",k.Pets_ButtonTooltipOwnedPanel="89bc34ad-a329-4d95-9d0a-81345dd3842b",k.Pets_ButtonTooltipTeamPanel="dece6029-923b-43a5-b114-dce4e3c77c93",k.Pets_CarouselCreaturePreview="510f2023-d98b-4671-be05-143e5accc46a",k.Pets_CustomDialogFooter="c50c7501-139f-4d4d-a18c-8d07dfd8fa50",k.Pets_EmptySlotCard="e636f7cb-6684-445b-aa66-5965e1fc7b34",k.Pets_EmptyTeamCard="fab69025-5aaa-4f86-b4c4-eea77d7b3734",k.Pets_FilledTeamCard="7b25559d-d6f2-4a16-9d0c-24d2b9fe1118",k.Pets_LeftSideYourPetPanel="ad005f96-ace1-427f-b7eb-a84d0fe6264a",k.Pets_MenuHeader="603e642d-43f7-435d-adf8-111edc412559",k.Pets_OwnedPetCard="83b0a5fd-afac-4336-b35c-d56592e8b7c6",k.Pets_OwnedPetCardwithmergerank="a0b0695d-29cb-4d56-8ce5-f9c7de728dba",k.Pets_OwnedPetsScrollviewPanel="6a8bfe5b-80a8-4f8f-96ba-8355ca13383b",k.Pets_OwnedPetsScrollviewPanel_PetSlotsLayoutVariant="4f1c2d2e-6636-4d3f-a201-d011de3b8a41",k.Pets_PetBookCard="48479669-ed5a-4848-b260-343ab900084d",k.Pets_PetBookGridandUI="fd5f0b3c-4985-4063-8578-592845359f4e",k.Pets_PetBookMenu="d43edf90-57c6-44c0-b4df-01ea8fc2921b",k.Pets_PetEvolutionInfoPanel="5a328e09-a4ef-4738-9aa9-1cb8d760826d",k.Pets_PetInfoMenu="08027796-5d46-4e0a-b0aa-c428f0cf56f9",k.Pets_PurchaseSlotsButtonAssembly="f2182f11-312f-44c9-9eea-83604fbd43f2",k.Pets_RevampButtonTooltipOwnedPanel="6f13cc8b-e3e2-446d-ad39-4e7656ef66a5",k.Pets_RevampButtonTooltipTeamPanel="8ed6b5ab-9a1b-433c-a23b-047f7e65ba3a",k.Pets_RightSideStatsPanel="02b7bd8b-fea0-467c-aa98-5ab25670607c",k.Pets_RightSideYourPetPanel="e905bf3a-c9f6-49e7-9f61-0bd2169c0268",k.Pets_SlotsOwned="e6152207-b552-4e73-895c-f037998a0045",k.Pets_TeamPanel="4b2943f7-f0a7-4a6b-a86a-18b49719e0c2",k.Pets_TeamSwapUI="3bdc600b-52e8-4267-b091-6c86ad4fd630",k.Pets_YourPetGearMenu="ba9d7b40-eeea-4800-98dd-0b9723caa629",k.Pets_YourPetMenu="bf29d664-f591-431c-af02-dfa8ec0c6b57",k.Pets_YourPetMenuHeader="0022e374-367c-4e89-a227-bafb355f2290",k.Pets_YourTeamMenu="ad167b80-ec13-4619-95fe-198a3dcf76c5",k.Pets_ZoneUI="101dab12-99de-4b54-badc-91fc37492b13",k.Pets_ZoneUIButton="46e7832e-5a9e-4607-a1e7-68b966859a61",k.Pets_ZoneUIGridElement="72888420-674b-4888-a0d6-a34f92a5a17e",k.PetwithNameandWeakness="ef8552f1-7f82-4657-95a5-2c33ce3dcab5",k.PippetNPCLegacyMaps="1ca6e8d0-356f-404b-8d0e-03f368a3de63",k.PippetQuestEncounterCutscene="6b7b227a-3d32-48ec-9787-2658a8ebc793",k.PlayerHubMenu="42704dc2-180c-4df6-98a6-057a6438f03d",k.PlayerLoginInfo="717340e4-7bf0-4812-b2bd-3e1ca2ebeaad",k.PlayerSummary="7885b29f-39fc-4577-8145-63dfbceff6e5",k.PlayerTeamCard="a9de0f52-d320-4b9e-b072-a2c7eafb573d",k.PlayerwithNameandWeakness="6b920814-f927-4654-a614-2073175738ce",k.PlayerwithNameandWeaknessandStars="d5ceca5e-d20f-4d54-8c6e-1eacc22bf536",k.PopupPriorityHandler="fe121dac-1cfb-4918-8dc7-04db1a562ce4",k.PopupText="a53be86a-925b-452d-9f99-637095bcb933",k.Portal1ShopNPC="bea5701b-7e9a-459f-8ca6-cf85309d4f07",k.Portal2ShopNPC="c129011b-6b3c-4856-b064-daeac99d2e5c",k.Portal3ShopNPC="c677ecb3-57d2-4cd0-9cf5-371bbb7a40d7",k.PostBattleFlowBase="b3b44488-c061-4cd9-b6e1-47cae010a1f5",k.PostBattleMembershipVideoMenu="98caf7c9-e241-4035-8036-854b79a103ec",k.PostLossFlowScreen="db0e96dd-9ff3-4a7b-a9e6-8995c4a1c916",k.PostLossFlowTeamPetContainer="ef04440a-2a2d-40b6-96ee-a12df115fa37",k.Post_fx_particles="58ce1f99-df0a-4506-b0c7-25413e90b270",k.PrebattlePopup="8015128c-de82-426d-bbbc-fa97c4d94bc3",k.PrefabAdTest="f7e5db39-39fb-4bea-8b2a-1515077d59d6",k.PrizeIconDailyLoginCalendar="b3d3d083-910a-4564-a8cb-875381b4ef4e",k.ProgressBanner="5426b858-2196-4ce4-bbf0-fa5adcd626fd",k.ProgressBar="026d935c-bcf3-4a4d-85fa-c757e464b020",k.ProgressMenuBase="77a246b8-5f31-49c0-bc5a-ceccb805e439",k.ProgressStep="d2589ef6-1125-4df6-8d57-75ea4a5ac8d8",k.ProgressTrack="6f13a3f9-7119-49ab-9749-400eefa0dfa4",k.Pumpki_poof="503b6560-6454-44ce-897f-fb674c4de2a7",k.Pumpkinfest2025CutsceneCrowd="3b1d641b-eca5-4819-baf6-330e73062d73",k.Pumpkinfest2025IntroCutscene="c60ca394-8213-484b-b123-897d5337ebf0",k.Pumpkinfest2025Quest1Cutscene="72abcf7b-6be2-4348-85f4-62a9e322aa85",k.Pumpkinfest2025Quest2Cutscene="92df56fb-2fa2-4ad2-81e3-92c821373ec2",k.Pumpkinfest2025Quest3Cutscene="862f25d9-0f49-44e8-a9e0-0a0a4c6f6b63",k.Pumpkinfest2025Quest4Cutscene="6d4bb4e1-1945-4fcf-a919-ec878eeed7c4",k.PumpkinfestBossStatue="be66f894-0a3c-4653-af4a-3d6a79aee2da",k.PuppetMasterBattleEnvironmentFX="ea9544ac-0823-4dde-b14e-d699baad872d",k.PuppetMastersDragonOrb="9b9e0dfa-84b2-4a3a-8317-92e23d6489b1",k.PuppetmasterNPCLegacyMaps="429138e3-47ff-4910-bffc-0a229529cd10",k.PushNotificationEntry="ddedf67f-0469-4b11-8f66-3828490f114f",k.PushNotificationPermission="fab56b18-1d84-42e2-8c8d-5aa69726d7ef",k.QRCode="fcea2758-df48-49c2-84cd-9d90cea18234",k.QueenGoo_liaNPC="ec3f54f4-46de-4907-aea0-7186106c5666",k.QuestGuideBanner="b1065462-2b72-4c20-b4ed-31972907c3ce",k.QuickRenovationComponent="be607cec-dcbd-4d1c-8f61-40ff7286279f",k.Rainbowworks="af62580e-21e5-492c-95fd-1f9269b8dce4",k.RandomPlayerAppearanceLegacy="b6fa975a-3c68-4fbd-8dbf-7b310fbb0ea5",k.RarityBanner="8c79234d-dd1c-4f00-85a7-e051ab20a0a9",k.RealLegacyFollow="34b23e5f-0dff-43b8-bfff-90d1bf005095",k.RedMediumButtonTextAndIconRight_RectTransform="81a31dc9-e710-409f-abe0-575f12761e94",k.RegistrationCell="2e7d24a5-a7aa-45b5-9269-8cd3f972f4b4",k.RegistrationChooseCountry="48eb9712-a0ad-4a6d-93f4-f0c9c7dbbd23",k.RegistrationChooseGrade="5b26adea-cd56-478d-b787-f979e78cc136",k.RegistrationChooseName="fd4a87c7-bd55-4dd1-9811-7be2859b9e20",k.RegistrationChoosePassword="1a445a03-4696-4255-863b-ce63cbb0753c",k.RegistrationChooseSub="71356bbf-7525-4350-be62-6a28d6efce72",k.RegistrationClassCode="f8fad4de-39bd-4ae8-8e72-e0a9b1ee7c06",k.RegistrationCountryButton="e0eb302d-d4cf-4162-a1a8-fa14b2e1ad01",k.RegistrationGradeButton="6dfe4559-a044-40e8-850b-8b2496516e27",k.RegistrationHeader="9282f708-e29e-4427-b9b6-450b710542ad",k.RegistrationHomeorSchool="6ea9f2e8-3440-4c31-a895-d4d00b218d5a",k.RegistrationScrollBar="f6dbd550-f849-4254-8c96-490327804add",k.RegistrationScrollView="c3f4f422-e0a6-48ed-92ae-5b98281ee2bd",k.RegistrationSection="7c530624-38bd-4e98-b6a9-4023db5660bf",k.RegistrationSignupSchool="521eb027-0b88-479c-aa01-70f6b9598d70",k.RegistrationSuccess="9349868c-3a29-47fe-8e77-ee003c8252e5",k.RemoteDungeonPlayer="534113f9-fd78-4330-96cb-60ae8bd5e6bf",k.RemotePlayer="ec88031e-0010-45b9-93d9-3696d7ace879",k.RepeatingUnidirectionalBackground="e5726196-a9be-4175-a304-fcb1e431f44d",k.ReportPlayerPopup="ea6aaff6-8dbc-4a64-8e11-819a603da40a",k.RerollEnemiesPanel="2ae9f1bc-5129-4802-aad8-061b80159e5c",k.RescuablePet="aada0a1d-3366-444a-9fac-4bb3cb58a383",k.RescueAvailableSequence="f2718256-8357-4e2c-bd1b-345dc18488b9",k.RescuePet="924f3c70-cb9b-4c54-bdf9-e327e30276db",k.RescuePetPrompt="63bc22d8-bce0-4e82-824d-5437f51107ef",k.RescueScreen="0ed56e71-2074-41d9-bbca-e428ec8167a2",k.RescueTooltip="bd5ab2ae-2a32-476b-a6b4-10d62d42f41b",k.Rescue_AtHardCapTooltip="97ab9a2f-e2aa-4b85-9b87-1f418254f247",k.ResizableTooltip_RectTransform="f046b64b-037e-4739-b9f5-577d1a784cfa",k.RestartDungeon="dfdd5ce8-8445-43a0-aaf0-3ab6d5b7d8d1",k.RestrictionHelperBaseScreen="72545f44-2abc-4651-a9fe-d053fb822841",k.ResultsSkipInteractable="9df8feaf-d5fa-4eb1-b5fb-9e8d49104c19",k.RevampActionMenu="8648ce6d-d05f-405b-940b-9bfece7cafe2",k.RevampActionMenuIcon="0b4a1bb5-2231-4428-8e38-9a41951cffe7",k.RevampBattleLowHealthBorder="4b28c28b-d4ae-46e5-828f-92dc3963dc04",k.RevampBattleMultiTargetObject="96262dae-b10b-4440-ad5f-00a6d5898cd9",k.RevampBattleNewIndicator="48992009-9050-443a-a43b-976e54620793",k.RevampBattleScene="edff9ba9-cd7b-4369-8e30-455c3cae40a6",k.RevampBattleTargetContainer="08d84cb1-94fd-4447-9e8f-f4ed4bac3bc3",k.RevampBattleTargetObject="83386d1e-c184-419b-bc24-26d3522fac10",k.RevampBattleUnitHome="8e03b300-95f4-4805-ad6b-2d2a38bee819",k.RevampBattleUnitOpponent="2c161c32-80b9-4cc5-b2dd-aefc60e17e24",k.RevampSpellCard="c8071de7-491a-46ea-86c3-3954f0f745be",k.RevampSpellHitInfo="81110ebb-a918-4b7c-80ca-295dedd5c096",k.RevampSpellTooltip="eeafa512-3f71-4922-b3a7-13e36f10b41f",k.RevampTitanContainer="a30c8100-6fef-414c-86ec-25946d7432a7",k.RevampTutorialBattleScene="7e11dc11-a480-4b0e-bbfd-56bb7f7d172f",k.RevampTutorialInputBlockingOverlay="d7e01b6a-03b3-4c96-8d92-d1ee0ef2f6df",k.RevampTutorialNootDialogue="60cbd447-d908-42e4-9194-abd8fa123bec",k.RewardCard="a6a9c6a7-5b3e-4a17-bd96-30453699edd5",k.RewardsDisplay="fb31030d-fb0e-4ea1-a9cf-77bad3c8adb5",k.RewardsFirstBattlePassMenuBar="506cd023-ae7f-40a4-8ad6-84da90386c22",k.RideableMinecart="7a3692c0-8cef-4962-a759-bcdd049a3184",k.RiftKeyInventory="aa4b5512-9f0c-4057-9ef8-aad7bcf5d5f4",k.RiftRunMenuBackground="ff749b3b-f4ab-4933-91c3-309fe089be8a",k.RiftRunModifierCard="30f5989c-4441-47b9-b9e0-4c0619ec984f",k.RiftRunModifierIcon_WithFlourish="d4fca01e-6cbb-45b8-9d30-ba4e16772268",k.RiftRunModifierPopup="857b1fcf-ab03-4f6f-afa7-b89880b6d186",k.RiftRunOpponentCard="ea4bcbb4-dd0a-4855-998e-a3366fb04789",k.RiftRunOpponentSelection="ca4b7dce-dcb6-4987-9231-75e8b7b9be3f",k.RiftRunPetTeam="fbdbb730-661a-4241-a23e-1c6a1e269659",k.RiftRunPortal="b62a4821-d886-4db2-a0f7-596d5950dd0a",k.RiftRunReusePetModal="400fe33b-cef9-4336-9d7e-c82e3b847d15",k.RiftRunRiftCard="0a2fa984-14fd-4fde-930e-c5e45bad2deb",k.RiftRunTeamSelection="6dfac5f9-53db-4780-97cd-80d33aa13251",k.RiftsCycleModal="76c596cb-953c-4f77-91ff-b790648bd135",k.RiftsRestrictionBadge="b76e8681-cb83-4474-87ce-1ac04c0e4d6b",k.RiftsSelectionMenu="e82b930e-59c6-4f91-ace6-86c8836238b5",k.RightSideHUDManager="b5240209-033e-4227-a4d7-fa95a3ec3330",k.RooftopMastery="60197ca4-edac-4623-a47c-0d949ddff287",k.RoomInfoStoreSideBar="a4ce522d-ec9a-4f59-9875-15041ffdb810",k.RulesToBattleWidget="305f52a5-493c-4578-96fb-791b09fcc64b",k.Save_trigger="4d8a543d-f259-4399-8bd9-95984910a158",k.ScalablePet="7b044fbe-f1f8-4d2f-a2cc-6c1d957deac8",k.SceneBackgroundCarousel="0bb538b5-8d0a-4a31-b251-eee3cc0c7285",k.ScreenDailyLoginCalendar="854400e1-7a6d-4f14-983d-a7b620f7fe51",k.ScreenSizeSection="6181e9e3-bd5d-4e4c-827a-714e370e960e",k.ScrollView="c6d00799-e5cd-49bb-bfb3-91bfbe7a47ef",k.ScrollViewDailyLoginCalendar="00c3f0ad-fc1c-49d1-a35a-9855007440ba",k.SecondaryHudBar="a8c6218f-a6cd-46b6-9e8b-1bbfed20dc9a",k.SecureBattleUnit="811ff008-78cc-4ed3-bc80-3275890ff601",k.SecureBattleWaitingMessage="c32fbece-26d7-43b7-bcad-698cd540b465",k.SegmentedOfferContextualPanel="53eb5321-c0ed-43aa-988c-2a0881a2b183",k.SegmentedOffersAccessPoint="e6420321-b325-4cc2-8998-69c383296406",k.SegmentedOffersCloseAnimation="c50ec24c-76a2-46cb-b013-2d2f4ea44482",k.SegmentedOffersModal="db998b22-8437-47bd-af92-e18d5afbdf5b",k.SegmentedOffersPanel="4e55d813-03ed-45da-91f6-a93cc35481dc",k.SelenaNPC="fb4c82a9-cd41-4dd2-8530-8e990c87f225",k.SettingSlider="49dae7be-a679-452f-b7d1-ce515f50bb8a",k.SettingsMenu="82f4f89c-70b8-4186-973a-be80bb937b0c",k.Shadowball="4c5c32b4-80dc-4bc5-9062-1bb717b8943a",k.Shadowworks="50b27e96-5ff9-4640-9cc9-1742fe0a1592",k.ShipwreckMerchantNPC="c13b5f5c-7fc2-462f-b8a2-86ca9a9b2384",k.ShipwreckShoreA1="2fbda416-04f6-4a0d-9282-ab0871eefc10",k.ShipwreckShoreA1Hard="1f7f577c-0eb8-44f4-90ac-e32331fd9f18",k.ShipwreckShoreA2="b88bb99a-547b-4c8e-aa8d-ad1c13b93ea1",k.ShipwreckShoreA2Hard="1452def4-0130-4057-928c-4b7dce192f62",k.ShipwreckShoreA3="26fc9f18-0577-4df2-bbad-49ff5d330955",k.ShipwreckShoreA3Hard="1e419b38-254a-4529-a9de-962282a807f2",k.ShipwreckShoreA4="deb7b3f8-4b82-4df0-8a3f-5f21a2178aa1",k.ShipwreckShoreA4Hard="80de1fce-ade5-452f-bcc3-fbc4522891c2",k.ShipwreckShoreA5="c965a714-8690-4ea3-b821-627f7ae22d09",k.ShipwreckShoreA5Hard="7669445c-370c-4920-b3b5-bfacfaac01c5",k.ShipwreckShoreA7="9f7b00e9-8c3c-41d8-bafb-a9f86e95839d",k.ShipwreckShoreA7Hard="4c38b6b1-63ef-442d-b035-02c3bbaa178b",k.ShipwreckShoreB10="e742ef39-c26b-4be1-8c6b-9fb0bb3e398a",k.ShipwreckShoreB10Hard="66a0d9de-9885-4072-9d6d-be30563c9c97",k.ShipwreckShoreB11="bd674223-8650-4b78-88aa-b0946660f689",k.ShipwreckShoreB11Hard="380bdf7a-9db0-4975-a54b-e26235f294c4",k.ShipwreckShoreB12="ff7acbec-9135-49cc-a0b3-164cace439f4",k.ShipwreckShoreB12Hard="040fa585-5325-4300-bba6-5f11ed10c530",k.ShipwreckShoreB13="ed8a33f1-40a4-4aac-a7f1-0f16d899669d",k.ShipwreckShoreB13Hard="4026f96a-9a34-4453-9500-bb03cbdf757a",k.ShipwreckShoreB2="83d8bcab-b3a8-449f-9b2a-a32468e37aef",k.ShipwreckShoreB2Hard="143e0111-86ba-4f29-b379-db7e537ac6ba",k.ShipwreckShoreB4="d895187a-0c84-44f8-8610-cb2272a3eb26",k.ShipwreckShoreB4Hard="b5dc4108-77b3-4064-9b54-4522930a57ce",k.ShipwreckShoreB5="cb16738c-3625-4955-b81d-054aff8d714e",k.ShipwreckShoreB5Hard="38e6f403-2f6f-45a2-b85a-b82ff3a09a9e",k.ShipwreckShoreB6="f3a5caa9-fc27-4c71-b088-9565b3819b08",k.ShipwreckShoreB6Hard="d970e1fd-6040-4664-be9e-5eabee9efef4",k.ShipwreckShoreB7="23cb5018-7989-4146-a64b-07260540f25a",k.ShipwreckShoreB7Hard="765f65fa-3bf4-4b63-81c0-ecde1c919c79",k.ShipwreckShoreB8="fb605e83-87c3-4e0f-bb1c-9d9674af248c",k.ShipwreckShoreB8Hard="88a2a391-93ff-4184-a122-2a3fd969b264",k.ShipwreckShoreC10="9d92fbce-33a2-47c7-8732-17e966a4e7e4",k.ShipwreckShoreC10Hard="e5107d4e-1bf7-4502-a830-d9c39cd33b35",k.ShipwreckShoreC11="4d9be4ea-4d5d-49d9-8a02-e690e37e301b",k.ShipwreckShoreC11Hard="349d3e9a-3580-4c48-88cf-1b72c04eaad3",k.ShipwreckShoreC12="d880ca04-841f-478e-aacb-b5ae997b5625",k.ShipwreckShoreC12Hard="77102aa1-6dd9-46d4-be44-d1b9b19708e8",k.ShipwreckShoreC6="94b7cd79-e587-444a-bec2-39c09f8787a6",k.ShipwreckShoreC6Hard="12eae675-01ed-477d-badc-25e096aba256",k.ShipwreckShoreC7="c7800785-4aa6-41cf-bdda-89d1ce309216",k.ShipwreckShoreC7Hard="4dc5e1b8-d864-4308-8760-7294e61c7be3",k.ShipwreckShoreC8="a757576c-1c34-48cb-b3a6-b465712eabe7",k.ShipwreckShoreC8Hard="38dfec5a-5e57-4870-ba1c-deb9d0ae955c",k.ShipwreckShoreC9="945d4a06-bcfa-494a-9237-ab4ae11d1d86",k.ShipwreckShoreC9Hard="0c225e23-b3d8-412b-9969-abeed54a9855",k.ShipwreckWalkableScreen="4641aade-2d84-4df9-bd9a-31ab328004fb",k.ShiverchillA10="de3f5fb2-d53f-4e38-ac0e-4a61eaf7e686",k.ShiverchillA10Hard="1c039bad-45b9-4126-9c24-f51ca8d7bb9c",k.ShiverchillA11="ef30a0d1-38d7-4597-b231-5cf195231ed0",k.ShiverchillA11Hard="e86f41e6-fbac-4126-83f7-31ec6b999c1d",k.ShiverchillA2="43994993-a816-4539-b40b-ad6158806d94",k.ShiverchillA2Hard="93ba6dcb-8e51-4031-b962-99196111fbee",k.ShiverchillA3="5611fea1-4579-458d-aa96-0224f4fa78c6",k.ShiverchillA3Hard="0fe0bfa3-4df1-49d8-8b59-d5b9902f820a",k.ShiverchillA4="b01e0250-9797-4482-bd15-3d87d1c5ddfa",k.ShiverchillA4Hard="e56b2904-94da-42a8-a7c6-c8912c7c469d",k.ShiverchillA5="ca9824b2-373a-42a0-9842-2ba45db8bb9a",k.ShiverchillA5Hard="197c21da-ccf0-4f08-abc7-7527bda05b87",k.ShiverchillA6="08365893-0077-4329-b67c-86665d44b155",k.ShiverchillA6Hard="ed93e641-fd09-4111-9a6a-6aa09a2ef55c",k.ShiverchillA7="97855079-10c2-4622-bc83-3cc553ec8dd5",k.ShiverchillA7Hard="e54929bc-b538-48a1-8e9a-5b21677a81fe",k.ShiverchillA9="5b3f2fa1-7315-4295-84f8-463ad3616cfc",k.ShiverchillA9Hard="261f3fb0-c231-4dc8-9ed1-406ef7471eab",k.ShiverchillB1="83e03166-d998-4303-82bd-733f72288ece",k.ShiverchillB10="f17696c9-8384-4a32-8c45-ccb1522dba52",k.ShiverchillB10Hard="dcdf07e4-4dc5-41ab-a241-d481bf87bfc9",k.ShiverchillB1Hard="a5322202-1c60-4cf7-bf0a-c33bd885fab5",k.ShiverchillB2="76e01d03-0271-4ae3-96d6-598c0d32f756",k.ShiverchillB2Hard="2074ba4c-7253-4c53-b15f-9b428f4c26fb",k.ShiverchillB3="d469e9fa-4e16-4692-9415-6f3fc699b66d",k.ShiverchillB3Hard="f132ad5c-54d5-4a77-859e-461f9e329db8",k.ShiverchillB6="4bc577a6-c951-410c-b2c0-a4fb1f247e6a",k.ShiverchillB6Hard="a4975e10-da8c-4836-9d2e-dbd6832faa3b",k.ShiverchillB7="6f8ef663-f5fc-4af5-987b-275ed305962b",k.ShiverchillB7Hard="5dc17fa3-bc41-4333-8dcd-7129f6b43a41",k.ShiverchillB8="dd168142-b794-430f-b92e-909be6b8a7ee",k.ShiverchillB8Hard="637486a7-6a6c-429c-a846-dd1d39265803",k.ShiverchillB9="b38e18f2-cab1-4a5b-be4e-842140fd472a",k.ShiverchillB9Hard="02eab0cb-3a80-40df-aead-e69b41e61bc9",k.ShiverchillFurnace="d7883806-8dc6-44b7-b4b0-94753d4f5555",k.ShiverchillMerchantNPC="ff41d02a-254c-45c6-bf31-e502146d750e",k.ShiverchillMinerNPC="9f78d5f0-99e8-402d-bc71-c10a12177c2e",k.ShiverchillWalkableScreen="ed548110-12bc-49b6-b82c-3de29ae4a199",k.ShopButton="7dbf8994-d05e-43db-a3c3-f71d4f70d175",k.SimpleCountdownTimer="19b7279f-c2d4-411c-9cb3-34d8a97b4855",k.SimplePetCard_NoName="f1ebb75c-00b8-4908-87e7-923434d08769",k.SkywatchA0="16587a3b-5080-48f5-bc49-195b3cdc8cd1",k.SkywatchA0Hard="5b3b2818-65fa-4dca-b4eb-594ad5e3addd",k.SkywatchA1="3b31e13f-a691-456f-8e33-30881bbe87b9",k.SkywatchA1Hard="3bf56ec2-465d-4ba4-9e87-a2bd9e5cdfa0",k.SkywatchB1="d762a8c4-21cb-40e7-ba5f-d79eb2fdbc48",k.SkywatchB1Hard="6c7dc959-4726-409e-a0dd-756b3ff3296d",k.SkywatchB2="eefb46b5-d85b-4716-bbdd-ded12625ca8b",k.SkywatchB2Hard="275cb99f-53a8-44f6-b3d0-905ecf1951de",k.SkywatchB3="495bcd45-3175-4f17-8418-71169c1a9d5f",k.SkywatchB3Hard="4de74f84-038d-4d66-8f8b-eb73d89414f8",k.SkywatchC1="dda0b304-a412-4d67-a8fa-0989f3318cc5",k.SkywatchC1Hard="a284d709-ddc1-4bcc-bab3-af97745721dc",k.SkywatchC2="edd6c271-2582-4099-9499-beedc4873168",k.SkywatchC2Hard="2e212cb1-92d4-4e91-8eec-28223fa521f4",k.SkywatchC3="05d79784-4a06-4d9b-aaeb-6c14ed6bb78f",k.SkywatchC3Hard="31a9fe12-eb1c-4fd1-9e48-e41a4869f45d",k.SkywatchC4="bb263563-81c0-4f7f-868b-cc34cc926329",k.SkywatchC4Hard="3a98ca0a-c947-49e3-859e-0a5361c29a2d",k.SkywatchCloudBoss="915a095c-0fb0-432d-a3a4-aa25b6fae2cd",k.SkywatchCloudMiniboss="a71994c5-fc05-4872-aefd-ead47e04626e",k.SkywatchD1="e7b52256-a265-4a5c-b550-7648f00ad77b",k.SkywatchD1Hard="e294ee7e-4b2d-42b3-9b34-520bfe05120d",k.SkywatchD2="24542690-a364-453c-9679-21199a81dafb",k.SkywatchD2Hard="1dd115d3-c1fb-4b9f-b956-3dea3ca11154",k.SkywatchD3="29ccedcd-9358-4e3b-9576-70b79280bf93",k.SkywatchD3Hard="033e3fd5-3fce-4986-ad1c-7bb5669d3a56",k.SkywatchE1="8c774fd3-202a-4736-b7aa-ae8e4867671a",k.SkywatchE1Hard="b4c3d186-dd2e-4345-9952-a55ab55684e9",k.SkywatchE2="b072e1c2-7b43-4e29-b51f-4ec0fdc1ff33",k.SkywatchE2Hard="c5347af2-1a7d-4d7b-b803-189f35ae069f",k.SkywatchE3="d9b98e4f-8d70-43b0-b358-89e3a18859e4",k.SkywatchE3Hard="e36914a5-05d8-434a-983d-d0df13ae587d",k.SkywatchE4="7d62be40-1c60-4703-bc56-b8768070012f",k.SkywatchE4Hard="a372d76a-9959-47bf-8eb5-49f29f101316",k.SkywatchE5="6c7eb89d-4055-4dde-b8de-35566e9faad8",k.SkywatchE5Hard="a594f9df-b1b2-4655-8907-a6d89101d305",k.SkywatchElevatorDoors="1dd04539-f5fd-4745-9c96-b433ca099fc7",k.SkywatchHardQ2_1Cutscene="282a981f-4572-4c53-950a-fa125dea48c5",k.SkywatchHardQ2_2ThiefChaseMiniScene="9a71a58e-f7be-43f5-a33b-11f665570678",k.SkywatchHardQ2_3ThiefChaseMiniScene="73b6ccc9-4f3a-4f6a-8591-fa8d98f899ee",k.SkywatchHardQ2_4ThiefChaseFinalScene="4756bf96-de9e-488f-871b-e5dfc05c2222",k.SkywatchMerchantNPC="6908883b-c608-4f11-b59e-fcd7c1489cd8",k.SkywatchQ11Battle="b5008efe-ad58-4650-a506-a020adf6da44",k.SkywatchQ11HardBattle="5c0bc813-3353-4a23-bb19-c1bdc77e7b47",k.SkywatchQ13Battle="579d4f5e-bba1-4ea3-ad1b-f8ba95027e43",k.SkywatchQ13BattleHard="96db842e-69e2-437e-be3d-f260b400bef9",k.SkywatchQ2_1Cutscene="3b1a23f1-b7a1-4182-8cd8-62a858d68462",k.SkywatchQ2_2ThiefChaseMiniScene="e468f825-b91d-43d0-8111-e5deb6b299da",k.SkywatchQ2_3ThiefChaseMiniScene="731bbe35-f5aa-4e1c-a18a-955a1982725f",k.SkywatchQ2_4ThiefChaseFinalScene="477c3a7c-329c-4705-bbea-c4be4879fe4b",k.SkywatchQ4CloudVinesCutscene="35ae4d34-344e-434a-a7e9-344e9d28c28a",k.SkywatchRightVerticalTrolley="f0df1742-1a1a-4a4c-9437-5385e3cac173",k.SkywatchTrolley="a805e489-8e4e-4b60-beac-f434bd915218",k.SkywatchWalkableScreen="3c90207b-f8dd-4111-8b5b-a20b707fea69",k.SlurpyNPC="e1610a1d-e9fb-40d7-8cc7-b81c8da73b71",k.SmallWarningMessage="34767edb-4b03-48c6-b2eb-c150132d4b97",k.SmokeCloud="6658ac4f-8942-4f2a-9694-49a5942f0e9a",k.SmokeCloudLarge="e1a4a3dc-4a83-4db1-8120-a8f1e4e0a71d",k.Snowball="e604ea87-d9c3-4fd2-b572-bdbaf660949a",k.SocialMenuHeader="03984d40-a468-4930-91eb-0efb9e5aee0b",k.SocialMenuHeaderButton="bac9c286-b493-4349-8d45-3173bbaaca1f",k.SpawnPoint="8f92d9e7-968b-457a-9320-8cf51e79fa91",k.SpawnableTooltip_RectTransform="7837ebb1-1256-4a35-a32c-60eaf9e2f922",k.SpeechBubble="22c5392d-7342-40aa-a40e-2ed4d599fc20",k.SpellContainer="e939ac35-f063-4f97-817e-dd66b4c8a77d",k.SpellLearnedPopupMessage="e5a682ca-0da2-42ef-aa46-2a55bf1ac9c2",k.SpellStatusEffectInfo="7456a914-b457-47e2-9bfd-4c600a1930d6",k.SpellsWidget="46c8ba4d-8e40-4bfa-a999-6da0d33b52b2",k.SpineFollow="1e5c1c74-9b7e-4484-b118-d4023d624ac2",k.SpinePet="606e07d8-e4dc-46fe-bd18-20fd59e29dc1",k.SpinePetFollow="e776d8a6-115a-46fa-b2e8-00ce0241d654",k.SpinePetLegacyTransform="9c4a6d1e-1b25-4ca4-abd3-f46ee924b73b",k.SpinePet_Injectable="47a739a0-8d7c-42c2-82ad-668e0eea3859",k.SpinePreviewTool="68be7fa5-cfc5-4ef0-90b4-465c05372e56",k.SpringfestGrottoA3="197985bd-2674-4212-9bd3-ee7407b68361",k.SpringfestGrottoA9="facc9d95-e9a3-4e49-893c-62da7a86c276",k.SpringfestGrottoB2="c1afea61-4cf8-42e6-aaf4-e0d981f55c39",k.SpringfestGrottoB7="a67c9db6-9a03-4d79-b3f7-7991062e47a7",k.SpringfestGrottoBunnyA3="088eb1b1-397f-42f0-b239-a080e705c16c",k.SpringfestGrottoBunnyA9="7e523cd6-11fa-4012-a9d7-45c5443fed02",k.SpringfestGrottoBunnyB2="dcd360c4-a2cb-4879-9bda-8c33bcafe872",k.SpringfestGrottoBunnyB7="2e062f05-002f-41a0-b5b5-b51d17360672",k.SpringfestGrottoFoxA3="a28c1c45-68ec-47f6-b326-f96db7ae2120",k.SpringfestGrottoFoxA9="82f39295-e545-4766-837f-247872975ba7",k.SpringfestGrottoFoxB2="08054625-9e7b-4ceb-a136-5dc3eecc7e07",k.SpringfestGrottoFoxB7="242a5c11-18ee-4eae-8fd7-16ad0a1fd235",k.SpringfestGrottoWalkableScreen="0b772c3c-74c8-4edb-bfde-d7d187f3433c",k.SpringfestIntroCutscene="157cc96e-b77d-448c-baba-b264dd6975f8",k.SpritesheetPet="770d667d-f843-4269-95d6-3e1496233792",k.SpritesheetPetFollow="4c780a71-5340-4cd3-84f0-a188391b8edb",k.SqueakNPC="09d7d532-10e2-4a31-9cd3-c39eb15c0c16",k.StandardButton="aa0ffd57-fbf1-4e26-91e4-f9b96d5fe423",k.StandardModal="5078ccbf-50aa-427a-b422-e8ab36bb856f",k.StandardSlider="6bd05200-026c-477a-a035-b53226a01f02",k.StandardTooltip="63943ada-7e4e-4cb6-bdf9-a03e91640e53",k.StarfallController="fabb48fe-e49a-4b9d-b2bc-75b19e0dffb9",k.Starfall_1="0dae27c9-dad6-49b1-b2ee-e9d07f2c783b",k.Starfall_2="2f9bc898-fca8-4ee1-bfff-40b54f5074ca",k.Starfall_3="f520a2c6-7573-4b1d-a505-dfa780140ca6",k.Starfall_4="0beea666-5165-47be-8838-63a69bdeeffe",k.Starfall_5="86dee1da-62d3-46c6-8a80-4932b9cd5bd2",k.Starlight2025Q1_0Cutscene="a0840788-b2ca-4347-9728-e283799d863a",k.Starlight2025Q1_1Cutscene="4f9a673a-93ef-44c6-8d1b-31b54ae37263",k.Starlight2025Q1_2Cutscene="223b7588-d3c2-4323-9a45-48fbaa7a5444",k.Starlight2025Q2_0Cutscene="56177f06-8d9f-471b-8f6f-1dd0d9d89f49",k.Starlight2025Q3_0Cutscene="7f39bcb5-1b85-4fd4-87fe-d5c6c9bd096b",k.Starlight2025Q4_0Cutscene="aed1c394-2607-442a-9fbb-9bee0333018b",k.Starlight2025Q5_0Cutscene="0a83f887-958c-4842-a34b-e9afed0c2e12",k.Starlight2025Q6_0Cutscene="eebffa5e-cf09-481c-a765-e4ec2d7d2a3a",k.Starlight2025Q7_0Cutscene="69a18efc-e127-4714-908b-fb691cf939bf",k.Starlight2025Q7_1Cutscene="5b6b760c-047c-447a-ba91-d8db45788f18",k.StarlightBossNPC="12936db9-36e9-4f0d-8738-89a64c17ddd2",k.StarlightFestivalAd="070c7f92-2031-4aaa-b70b-a941bb3e1ca1",k.StarterPetSelection="32fde58c-43c1-4c3b-af23-241e56f79332",k.StarterPetSelection_ToggleButton="2c99fe08-f647-4ab5-9c09-bcae47da8803",k.StatIconDisplay="277aa6d1-33ba-4457-97b8-1d4db09a4eaf",k.StatPopupMessage="20d6614f-f2a4-4953-96fe-d2cdf803d11c",k.StateChallengeGoalsCard="fed54a8b-5149-41fd-bab8-fa6dba2fd5e0",k.StateChallengeGoalsMenu="b59bac96-9209-4ef9-9587-2b33fc3a82ed",k.StateChallengeGoalsWidget="279d8520-b7cd-4874-83f0-a80a332bb6f3",k.StateChallengeMilestoneRewardCollect="64ac441c-a303-49d1-b53d-d30521b78401",k.StateChallengeMilestoneRewardReady="f0384a5d-62c7-48b5-859a-3e3ed94b117e",k.StateChallengesBG="502e95a9-218f-45ca-93fe-550ba3955102",k.StateChallengesConfetti="d36796fd-26e5-4e62-9eb8-ee02c9bb9940",k.StateChallengesDistantPetPortrait="ddc21f17-1cc1-43a6-b3df-2e72487e2df6",k.StateChallengesDownTimeState="abd6041b-d7cb-49a3-83ae-793bc9bd9a35",k.StateChallengesFootracePet="a854ce49-1184-4ea6-9d62-b53fb803808a",k.StateChallengesFootracerInfoPanel="be46a94d-b232-4d6d-ba83-66158b8584ff",k.StateChallengesHUDButton="edfa3064-ae8f-40dd-99e6-b9242995c29d",k.StateChallengesIntroAnimationState="9fc64e3c-7dde-49c3-bd0a-8ee5ed2fbdc8",k.StateChallengesMenu="3b686c7e-aee8-4f6d-a263-f432d0dcd67c",k.StateChallengesNoClassState="eefa96f0-9165-4d51-831f-199b3f278b47",k.StateChallengesNoDataState="20514db1-57bc-4a38-9a83-37b5629b50a4",k.StateChallengesPetSpawner="7b251546-9136-47a6-857d-9c8f57234db0",k.StateChallengesPointsBanner="86027c14-eb0d-4fa8-8f2f-5d1ad34f6917",k.StateChallengesPostChallengeView="2574f4e7-61bc-49ab-9517-d73a9e517949",k.StateChallengesRectangleGlow="fdc5a594-2100-4c66-9ff7-ddfd9f211a65",k.StaticAd="02fdb444-8d07-4d29-a6e0-d838bd055fd2",k.StaticAdCarousel="8b7f72a0-943f-4951-a48a-5de7bd90e771",k.StaticAd_BuyMemberItem="8bdb5229-1ce5-4792-9c95-7548c915ffb9",k.StaticAd_EvolvePets="cd7aebb2-b11c-4d0a-b42b-6375df078236",k.StaticAd_LevelUpFaster="84d242fd-9351-49af-b7bc-80c63b642562",k.StaticAd_MemberBoxes="6caba0df-9b6b-492c-afeb-b99819731377",k.StaticAd_MemberChests="21b3713a-c1fc-400e-93fd-5549bff7bbbc",k.StaticAd_SoMuchMore="77d7d87e-aee7-4586-88fb-b32c02aba256",k.StaticUltimatesTamingMeter="006002b6-7b3c-4d69-8532-7f14bdcb4b00",k.StatusEffect="21dd5d53-3b65-493c-a799-f191603d7059",k.StatusEffectIndicator="4ab50008-6778-4344-b149-7723ceceb989",k.StatusEffectIndicatorList="636f07b4-46e6-44ec-9943-ba94a4b2aeae",k.StatusEffectsList="a9704f83-5cff-4843-85f9-81d354c1cc40",k.StatusEffectsTutorialBattleScene="1f920125-5af1-4ca9-b3ea-88f498ade36f",k.Status_effect_DOT_astral="8e8e53b1-2649-4027-8097-c508982850e4",k.Status_effect_DOT_fire="223f7e41-f2c3-477a-84c3-d04112f000f6",k.Status_effect_DOT_ice="20a3833c-06c5-4946-b89d-c72f32835167",k.Status_effect_DOT_plant="779eab2f-db94-4f90-a647-b08f3dfadc86",k.Status_effect_DOT_shadow="b7398e69-540d-4fa6-adc3-10d0e45d91e0",k.Status_effect_DOT_storm="2bc80471-42a7-41fc-b517-8f2883f3ed15",k.Status_effect_DOT_water="04b975eb-45ee-4c18-ae53-f3bb04972494",k.Status_effect_bomb_astral="ac9e7d5e-6376-42d9-b6d1-3a9c8ff50edd",k.Status_effect_bomb_fire="a1dec98c-7e25-4bb4-98d3-78c49426b4b1",k.Status_effect_bomb_ice="f2d1bf00-621c-40af-99c4-87c5008ffdb1",k.Status_effect_bomb_plant="f5cfb330-ac30-4d56-8f61-b97a866e83c3",k.Status_effect_bomb_shadow="636c11c7-4d20-4e5c-913c-156c45c7fc32",k.Status_effect_bomb_storm="87f25050-7d50-4f5f-996a-6f1ea3bc3db3",k.Status_effect_bomb_water="3a9f950c-9f0c-4e19-9273-4d87a5fb9230",k.Status_effect_buff_defense_up="8ca4b1fa-8ad8-4df0-84c0-4de0ad7252e0",k.Status_effect_buff_dodge_up="042c237a-71be-4d08-b130-2adfcc6fe383",k.Status_effect_buff_power_up="98ee9f42-f99e-42dd-9491-de0829cadef5",k.Status_effect_buff_regen="851ba533-4c69-4708-8a07-b8c312f2955e",k.Status_effect_debuff_defense_down="182d1985-c358-4029-87a1-9cbdcbfbc9fa",k.Status_effect_debuff_dodge_down="90d885bb-a055-47ce-975d-107201598679",k.Status_effect_debuff_power_down="ff87e639-f7f3-4db2-9579-b77e64c265d5",k.Status_effect_gift_astral="d60bb89f-3b0f-422e-aa9a-e1a2bfc19198",k.Status_effect_gift_fire="3e49df13-cddb-4e04-8b69-cd17f48dca47",k.Status_effect_gift_ice="47f98aa6-a841-480e-bb91-5114478163f3",k.Status_effect_gift_plant="5f48bd6c-8a9e-481c-a1b4-e41770b402a1",k.Status_effect_gift_shadow="f72d08fb-2c73-4c46-a9e0-c82c298495e6",k.Status_effect_gift_storm="b1258367-7ef9-4067-b356-02f5ffab21f2",k.Status_effect_gift_water="69104062-2a1c-4dc7-841e-16b7d998b644",k.StayLeaveModalDialog="b22652bb-f0ef-4d81-be04-655b16e3a779",k.Store="cb8a15b2-266f-4c7f-8d76-4df2e6128ea3",k.StoreBundlePopup="97eda0df-98d7-4ae7-8c3f-670cd574f99e",k.StoreCurrencyDisplay="7af16fc7-f946-4cd4-ab28-757ed79fb395",k.StoreGearStatsDisplay="9c354d8c-dc92-4ee4-a828-deaf35990e4c",k.StoreItemCard="3c5fc766-a784-48e9-b076-d45a0cfd1b1c",k.StoreItemCardSimple="352d96fd-87a0-42c6-86ba-f5f5f2fbd199",k.StoreItemCardSmall="af395fc1-e3bb-4378-9f34-2132b16d5bd3",k.StoreRightPanel="1a6c4a6b-6b28-4bd7-87c9-d6b85bd5214e",k.StoreTooltipAuto="4a389156-2c69-4e74-8790-d55d464823f3",k.StoreTooltipManual="36e72540-094c-4907-8f7f-e80dd07cc418",k.SubspaceMythicNotification="b75dac05-c121-4cc7-b533-b5ddfd760082",k.SubtitleTitleHeader="69c4ab16-bd61-4b1c-a899-9591324cb922",k.Sunworks="1b97aa7d-c4e9-42f0-a6c6-8ce5fe375c47",k.SupportDialogBody="f098c29c-b502-49e6-a6ff-be7b70e95fb2",k.SupportDialogFooter="4188e5ff-c5e3-48ab-8ed6-6447c2ac7665",k.SurveyAnswerPrefab="65d81152-57d7-4976-a35d-866f93ae5815",k.SurveyOpenEndedAnswerPrefab="16b34b84-6ca3-4641-9353-aac17071c28a",k.SurveyPrefab="a82ab69c-02a3-40c8-a834-8385a80aebf1",k.TeamCardBase="15f5edb9-3e96-47f2-b39e-e96556fb34b8",k.TeleportTrigger="a1c5e4d2-ffbf-4365-a065-63c7d4d726a7",k.TestPromptContent="2f779a06-c607-4250-8039-d43a0dd341d0",k.TextPopupMessage="444587d6-5a80-4fcb-8e87-b3fac29eac8a",k.ThreeStateCloseButton="51050525-d8bb-4fcc-8db6-6a5bfa19a9e6",k.TidusAdVideo="70c0a518-8be9-4213-880a-9e969145fbb8",k.TimeRemainingFooter="4172afd5-e2cc-496c-b915-8d4c0523e91f",k.TintableBanner="924ac7e2-049c-4c98-8d9d-d59683000f3e",k.TitanDeadPopup="940aa9a9-d8ba-40fe-8460-c2fd906a0187",k.TitanTeleportAd="2326a266-af06-471d-91ac-2922aa209e6e",k.ToasterNotification="490551b5-11af-485c-9a2f-4a6dc2d5a99a",k.ToggleImageButton="1a6b96e1-7505-4786-935e-cc99b5903dfa",k.ToolTip="02ad1891-5703-477d-9de8-14148e9aff74",k.TooltipSpeech="04b2dca3-c52e-4fef-afd3-171d8e1ee624",k.Tooltip_RectTransform="fc775cb1-3fc9-4ca9-a6c4-44e09fb241bd",k.Tooltip_test="93e56ab0-c16d-42f8-bc17-85d396dd476d",k.TopHeavyBody="50d655d4-5e85-46c8-8e46-c33a449ca975",k.TopHeavyHeader="23cb292f-e6e2-4f3c-88a5-fcaf8bdf179c",k.TowerTownHUD="f0279fc2-fd10-44ee-b6d9-15c1635f42bb",k.TowerTownInProgressPrefab="14227a70-675e-4dda-90ec-13013d75df46",k.TowerTownMallInterface="632ea709-d268-4aa0-8792-4c0957c1829c",k.TowerTownMallScrollBar="905106d0-0376-4006-8dbf-5852c553ee6a",k.TowerTownMallShopComponent="91e08ac0-7aa4-4a2b-853d-b1850d86c32e",k.TowerTownShopScrollView="ac3e6cab-d35e-4a46-bcc7-f3603b0186a8",k.TowerTownUpdate="57697f5a-34d8-4d25-85e3-0770f71f4b3e",k.TowerTownUpdateCard="4ef72dff-a973-467c-8f7d-35883c5ec2a5",k.TowerTownUpdateInterface="72fcf275-814c-406d-a7fd-a38cd3abaf51",k.TransformRelayFanfare="7a9d0bf7-8454-4ec2-a98c-0d2bddf7f7d7",k.TransformRelayObject="44cb5816-7653-4c8b-941f-27905efa541b",k.TransformRelayTitanFanfare="864476a6-ef2d-4318-907e-993311b4c168",k.TrimVinesSequence="feb8924b-1c5e-4960-bcde-954a258d8b4d",k.TriptropTrioEncounter="ea914f41-e452-4812-b208-365bf7a91a74",k.TutorialTag="e691781a-5ef1-43fc-b1c4-1113ea9ad0da",k.UIDemo="93a43c09-d04c-4e4c-9830-a3bb1dc55f95",k.UltimatePet="a83cc8be-012b-4407-90b7-50c4f8d16238",k.UltimateProgressCard="9c4f6c89-7f71-445e-8471-2a3ea3c9629c",k.UltimateTaskUI="aba58103-a05e-47e6-90fb-8dcf6f46756b",k.UltimateTrail="ca953f32-108c-4330-b4f7-7cf333d21598",k.UltimatesBannerSpotlight="48d461aa-0e71-4813-ad2f-b7d30db15917",k.UltimatesBattleHealthBar="07a17daa-a30a-41e8-8a5c-341c2141910d",k.UltimatesCarouselCard="df5e003e-f26c-43f1-be0c-b060f1aed96d",k.UltimatesInventoryCard="5c30e061-478b-4eb3-aa29-cb10ee3c1ffa",k.UltimatesItemTradeCard="b1c32946-40e5-4300-a9e1-ffebeca08c8d",k.UltimatesItemTradePopup="e60eb95d-edd6-4059-aa5f-277638962bf4",k.UltimatesMembershipUpsellScroll="53040e67-7fd4-4c57-8487-4b481b136848",k.UltimatesMembershipUpsellScrollV2="647c6e04-2b47-4df0-a8be-603687f877c3",k.UltimatesPanelDailyLoginCalendar="02d79aa8-3244-49a5-ada4-c23804dde900",k.UltimatesPlinth="daa42dbd-2f77-4659-be6f-0f5c6422a99f",k.UltimatesTaskTooltip="47738785-da61-4792-91cc-0995fc41df51",k.UltimatesTrialPostBattlePopup="94ea5ff7-4ff7-485c-b768-b460294fea5e",k.UltimatesWanderingNPC="0ca8c9f6-2491-4de5-9bbd-5bd7f11c4279",k.UltimatesWanderingNPCBeginTrackingPopup="ec57fae7-32d4-47e6-8d8d-7e29facca662",k.UltraMembershipWidget="77061205-702f-4eef-950f-205d8b15a966",k.UnifiedConversionFlow_BuyMagicoinOTP="f6c1dffc-cec7-4bb4-a267-a0d815f12e95",k.UnifiedConversionFlow_CoreMemberPanel="ff7fa13b-f43d-482e-9876-2f17541cb83e",k.UnifiedConversionFlow_DualOTPModal="0954745b-5504-4d43-b041-6fbad05e0763",k.UnifiedConversionFlow_MobilePlusMemberPanel="96f1d68b-1a84-4a6f-a7f3-43db078a1d97",k.UnifiedConversionFlow_PlusMemberPanel="dc84a0b6-55af-4421-a87f-49f8c35f5fec",k.UnifiedConversionFlow_TitleInputOverlay="aebddb9b-eeb1-45ea-b3a7-ab72a5b81b51",k.UnifiedConversionFlow_UltraMemberPanel="0542066c-eca1-4fce-ac39-95e9a77ad07d",k.UnifiedStoreBase="ebce620f-d5bf-4f9c-9278-9d046d6e97b0",k.UnifiedStoreButton="9d6c4831-210e-437d-983a-238745caf22b",k.UniversalTeamSelectionMenu="daa62438-f0da-4a82-b406-bd793daebe98",k.UniversalTeamSelectionPetDrawer="dc61077c-1a1b-4c64-9884-fc4629dd5d2a",k.UniversalTeamSelectionPetSlot="10c3c58e-af8c-43f8-a820-aba39c7740f0",k.VernaNPC="69c547be-405d-46e8-b3a1-b9c0119573f6",k.VerticalFixableMinecartTracks="2dc4e86e-6667-4d39-9938-48539933a198",k.VerticalMinecartTracks="48c32834-70fd-494c-bd4b-5d685c06eee1",k.VictoryBanner="3fddc715-d281-4116-81cf-cf14f768be0b",k.VideoPopupDialog="2f9ad04e-f86f-434e-beb3-482c05a3e99e",k.VisibleAffixIcon="76a0733d-731c-4e14-8790-d8c5c94f10d1",k.WalkableScreen="17aa475e-c95e-4bd9-a7b2-83cecf793707",k.WanderingNPCTrail="0b472392-029d-4f18-b03a-30585867d61c",k.WarningToaster="373deb18-fae0-43b0-a1c7-825c9d239a3e",k.WaterBalloon="6c13c725-e537-4bb4-8692-f60ed2d0a86a",k.WaterBalloonInstructionPanel="8527f4be-1522-4ceb-8161-c45c61d9b553",k.WaterTornado="e340c70c-951d-4b8d-93e4-e41222f0a2af",k.WeaktoDisplay="08a53290-d9bc-4699-9d89-5db29bcb11d1",k.WeeklyChallengeDialog="9b5ae8cd-bfba-40e0-bbc7-32784e6165e6",k.WeeklyChallengeMain="54affc1b-d1b7-42b3-a6ad-cd14f5bccce5",k.WeeklyChallengeRewardDialog="15e898ca-b84f-4012-bb0b-686247d7c475",k.WeeklyChallengeUI="7cb490b2-199c-4b0e-a699-fdd6dd60bdd8",k.Whirlpool="843e4693-4171-46a7-81b4-6dae59041d6b",k.WhiteLargeButtonTextAndIconLeft_RectTransform="c63d2ffd-78e9-4e0b-af32-9cb9729ee579",k.WhiteMediumButtonTextAndIconLeft_RectTransform="5d2d8057-1d1a-4fdb-86db-163c94d7d7cd",k.WhiteSmallButtonTextAndIconLeft_RectTransform="8d7d1956-7cae-43f6-ae50-5e6c864b27c5",k.WhiteSmallButtonTextAndIconRight_RectTransform="4e95401f-26d8-4579-95aa-92c2e0848e17",k.WhiteSmallButtonText_RectTransform="298d257a-cfc4-410f-b88f-7490a5919f60",k.WidgetIconUI="edb51970-e30c-4ce7-b7b6-24188eaffeea",k.WidgetOpenAnimation="0469f57b-a9c8-41c1-89e2-cfdd83c23fbf",k.WinstonVonLoot="db7991d2-4bb6-4849-a9d2-43f3df2a45fb",k.Winterfest2025FinaleCutscene0="b46f3c34-89d9-459f-9557-e66019f1b4e4",k.Winterfest2025FinaleCutscene1="e20857fb-946a-4dcb-8530-e4d2f7749305",k.Winterfest2025FinaleCutscene2="bd894056-1ecb-4b45-aa76-546a589c42b0",k.Winterfest2025FinaleCutscene3="c1945747-7949-4b08-8d13-30df2adeba56",k.Winterfest2025IntroCutscene="3a609017-9205-4abd-a335-0997ccd1ee81",k.WinterfestBossStatue="a216443b-ec2e-421c-9ecd-99a4eb544347",k.WizardBankChest="e77bbd3d-9deb-4169-a9bd-026e9dac9bed",k.WizardBankChestGold="fdb971ef-554f-4a7e-aac3-ce2ce7b419a7",k.WizardBankChestGroup="83f5af0d-b128-4276-8046-db73d903502d",k.WizardBankChestUltra="cc6b8750-b4f2-4476-b6a6-9455f0d3b126",k.WizardBankCollectPanel="3bac15b8-458c-412a-884e-98ad46a9fb60",k.WizardBankGoldWidget="20278935-3754-4a14-9429-dc69265d9ab9",k.WizardBankMenuModal="0b5fe5e3-61e3-444d-b3a2-50b9483ec2b0",k.WizardBankNonMember="22504267-a9f6-42c6-93f7-0d6c2439126e",k.WizardBankPlusChest="f44f2c7f-d0d9-4bc7-85ca-2da863961552",k.WizardCostumesFTUEOverlay="80656be6-a50f-464c-8ba2-8c997f40b35a",k.WizardCostumesFTUEPopup="ec9c8b88-10fd-467f-85b5-160e9c1a1c25",k.WizardCostumesHUDButton="38e1d8f8-23bf-41e4-aed7-cd4213ea80e6",k.WizardCostumesMenu="64f054d9-0094-456f-b49a-984c2cf2e37f",k.WizardCostumesVideoMenu="47b876bc-47f3-439a-a1ef-f127e7492503",k.WizardHeadAppearance="012158f8-2e88-4289-bc27-8ca0af20ae33",k.WizardInjectionConfigured="eb60a57f-2423-43eb-bac4-69dbedab5321",k.WizardNameObject="3123994a-1477-447c-8c63-6015ab50065d",k.WizardNameSelector="847f69fd-cca6-40af-878c-84aba7177752",k.WoodPanelHeader="93c13bf1-df26-4488-8644-a3b885b302a2",k.WorkerSlimeSoupNPC="c65aaec6-bed6-4347-bdd6-e3272de54299",k.WorkerSlimeTurnipNPC="1fcb98dd-0702-4584-88e0-681670370acb",k.WorldInfoCard="f78090fc-5f1e-48dc-8215-2825d4eec7fb",k.WorldInfoSection="81ac35d7-d7c5-45a8-b30c-3e0ed97297ff",k.WorldMap="711f7aaf-c73a-45dc-a38c-8fce87d3a4ee",k.WorldMapZoneUnlock="7622b78f-367c-467d-83fa-75330170f86e",k.XPBar="d9f264ef-2959-48a8-be07-848d7a990658",k.YourPetHeader="98ae374b-5bd7-45fe-9eb9-c51be9a491f4",k.YourPetMenuPetGearSlots="46778c6e-027c-4370-bc6f-5dc785fb8eec",k.ZoneChest_Transform="83b3474a-3cc3-4e7d-93f0-ade9859c7a3d",k.ZoneComingSoonPopup="0a113b81-d025-403b-8e6c-9646b7e650af",k.ZoneEntryIllustrationBase="29025f58-628d-4969-9c67-a0146cc23c16",k.ZoneEntryIllustrationBonfire="6a89aaf0-22f5-42b6-ad2a-d92660362748",k.ZoneEntryIllustrationFirefly="4a92d202-5703-4cd0-87a0-554589feda20",k.ZoneEntryIllustrationShipwreck="17ca166d-1803-43ba-a623-6aaacf767424",k.ZoneEntryIllustrationShiverchill="b3da778c-9f60-4db0-b44c-9d72d8a0f967",k.ZoneEntryIllustrationSkywatch="d2b46236-1e6c-43fa-98c9-1125a89abf14",k.ZoneGoalsInfoPanel="19014058-f949-495a-a843-c7fc972200b3",k.ZoneGoalsMain="c4e33399-223e-4156-a111-546a61f7f47a",k.ZoneLockedPopup="47d77023-9571-4329-8368-94dfca784941",k.ZoneLockedSequence="00cbf719-4d52-4b0d-8dd7-9428e1236db1",k.ZoneUnlockedPopup="a6f78822-378f-4773-a838-e4071d10c238",k._spell="d9eb45f1-20b8-446d-a36b-afcd8ce9c6bd"}(F||(F={}))},51742:(k,B,U)=>{"use strict";var F;U.d(B,{c:()=>F}),function(k){k.Sfx_academy_portal_close="138f0ebf-d540-48e6-9701-839743659a86",k.Sfx_academy_portal_open="c8c9213d-694c-4d30-a62e-c7b00b9bd69c",k.Sfx_academy_rumble="567f8f43-caee-4adb-9a67-f1bb054e6a7d",k.Sfx_adding_pet_to_team="d726df53-9001-4603-a518-c052eea1212e",k.Sfx_ancient_blast="be9b0f3a-b7e0-4dee-a9bd-1283055cb8fb",k.Sfx_ancient_bush_rustle="855a7223-8333-4553-b83c-934a387ce140",k.Sfx_ancient_bush_spring="72e9d19a-025f-4fcf-ab17-27f780b9c95d",k.Sfx_ancient_crystal="86ecbe47-70d9-44c1-bb7e-0a4f8a18528a",k.Sfx_ancient_exit="c1b6774c-bf14-4298-85b1-1ea60ccc694c",k.Sfx_ancient_forge_crystal_drop="d296b828-e1ad-41fc-abdd-bca50112a2f7",k.Sfx_ancient_leaf_pile="8cb41b2a-2094-48b0-af0d-cf456a498297",k.Sfx_ancient_lightning="cba9da50-eb22-45d4-9cfc-e7f314be065f",k.Sfx_ancient_loadout_action="1a6c571b-24d8-4a3f-aaba-a3d3a31409e6",k.Sfx_ancient_magical_plant="39bdef53-f0a4-4c45-935a-3ddd5b489643",k.Sfx_ancient_portal="fd70679f-9ac9-4dc5-9414-2dbc4e7d2952",k.Sfx_ancient_portal_short="b2956662-4789-489b-ad72-168b6c8d2754",k.Sfx_ancient_powerup="355a51a9-a097-45c2-aded-3977d372671d",k.Sfx_ancient_relic_forge="e86ef6d4-eb4c-49fd-bcfe-64e1df1e0542",k.Sfx_ancient_rocks="41e58ca4-caec-4ea8-a213-b3d03b5d6de2",k.Sfx_ancient_seal_destroy="d7233d2d-7149-4796-b7af-a54e09bc78ad",k.Sfx_ancient_seal_overload="74dcc0df-2605-45c7-b81a-9787461129b1",k.Sfx_ancient_teleport="ae53c99d-378c-4e81-a2fb-113751e8e816",k.Sfx_ancient_teleport_appear="41dffc4b-b10a-4d7d-a644-23a5d684880f",k.Sfx_ancient_teleport_hum="7dacface-ffb6-4d9a-9d95-401a804e3e9d",k.Sfx_ancient_torch="25a1f18d-0474-4868-bc92-ab26e681d5a3",k.Sfx_ancient_transform="ccff86d9-504a-46d7-af5e-024d5765fdda",k.Sfx_ancient_twinkle="e910bcd8-7fb6-410f-8fbe-a01cbf559929",k.Sfx_arena_battle_begin="3f844b1e-0009-4c77-b1bc-478b5da5739b",k.Sfx_arena_battle_fire="1c68c41f-0a5c-4512-be65-b8e9300dbd5b",k.Sfx_arena_changing_battle_screens="caf097c4-67fb-478a-ae77-5e3f7e90e5fc",k.Sfx_arena_division_chests="b04b79e1-4663-444f-8b16-f35972308b67",k.Sfx_arena_equipping_runes="e37b676f-cefd-4387-ba89-a0c3a770a1bb",k.Sfx_arena_gain_trophy_points="0a347906-be58-4fe2-bbff-580c95611a24",k.Sfx_arena_gate_close="0a57f293-6f24-49b1-8bf4-dadab1a7902d",k.Sfx_arena_gate_open="2d9cd04f-a5d7-4966-a014-03615577ffe5",k.Sfx_arena_going_up_leader_boards="21ea1e7e-7779-4a16-949c-1bdbb2e4dc82",k.Sfx_arena_level_20_milestone="fdaeec2e-8b92-40ad-a84c-93e2e483f41e",k.Sfx_arena_loading_between_battles="6bcb88f7-2b72-4171-827c-a6f9beed12ff",k.Sfx_arena_locked_chest="2819da5e-8ebb-4b4a-ae83-feef207bb186",k.Sfx_arena_losing_trophy_points="f00d727a-ccbb-4121-9f73-268d4401ee36",k.Sfx_arena_member_chests="5de57442-dd46-48d4-9255-35f61dced8c1",k.Sfx_arena_open_and_close_rune_boards="0848777b-7c66-4d4d-a38e-9e33fdad4109",k.Sfx_arena_rank_up_different_tier="c5c02250-6e6e-4e52-b6f0-2a4d23507602",k.Sfx_arena_rank_up_same_tier="d8d27255-2c7d-4e69-8d21-e5d773094eae",k.Sfx_arena_season_begins="42589ee8-e6d7-4b3d-baf1-01481a6eadcb",k.Sfx_arena_season_ends="ddc03e6c-8cbb-4ad8-a583-6930f1d1b647",k.Sfx_arena_season_rewards="905a3bac-d9f8-4081-ac17-32cacb88c044",k.Sfx_arena_selecting_a_challenger="59182f1e-714f-4d1b-890a-f94a76f0c9fd",k.Sfx_arena_viewing_your_season_progress="2f439ea3-dd47-4d7c-a861-163ff0672c04",k.Sfx_arena_you_lost="723c4ba1-6c47-46e3-830f-e0889cd91ac7",k.Sfx_arena_you_won="319bc4e2-105f-4986-b84a-45b75968cc47",k.Sfx_arena_you_won_banner="1cb1513a-0626-49ac-85bb-4a9a3a22240a",k.Sfx_attack_forest_fury="46fd92ee-efd9-422f-80dc-d24ebbd9ece7",k.Sfx_attack_frigid_blast="66645c27-ea00-4705-b610-f4934965a4ad",k.Sfx_attack_hot_snow="7d5a0bd5-34ed-415b-8cf2-4350fc41cef2",k.Sfx_attack_royal_roar="607ae283-7ac1-4b5d-bbdf-0f4b2536077d",k.Sfx_attack_storm_wrath="88c8f045-6a28-48c9-9f1a-03f3158564a1",k.Sfx_attack_tidal_twister="5ef568c3-2271-432c-b43f-9b3ac304f314",k.Sfx_bar_fill="e18d2ce3-f058-45a1-9a49-899714181e00",k.Sfx_battle="03af8793-f0d2-4df6-b7d9-3d981cb30c1a",k.Sfx_bonfire_spire_q5="41689399-dde7-4145-bb6b-de399e77c0f3",k.Sfx_bonfire_spire_q6_and_q14="dce641f5-8c4f-463d-952e-ed88b2495325",k.Sfx_book_close="b7ab7e4e-6cdb-4319-bbe6-d7582b691e08",k.Sfx_book_open="8cf28c92-e390-4862-9352-a8a2661d43d7",k.Sfx_bubble_pop="5ec1266b-16a6-4e35-b89a-8f0ab1594058",k.Sfx_button_disabled_state="14b31c3a-8fd4-4ce6-bc21-3ba668ab2971",k.Sfx_button_sparkle="d7cec272-b8d4-4424-a6bf-06551945cae0",k.Sfx_chest_locked="9f0b33c5-25bd-4396-a717-8cb688931a34",k.Sfx_chest_open="393f147c-ee28-4182-b425-3d25e2eec028",k.Sfx_chest_open_member="a621bff0-56ed-4372-8126-3979174102e7",k.Sfx_chest_open_non_member="4027a9fc-aafe-45b5-b22b-c61473ff6828",k.Sfx_crate="f84bff26-95f7-459e-8085-7fce398f8f53",k.Sfx_crystalbreak="cc21e19d-bf9a-4844-a329-53a1aa99110c",k.Sfx_crystalclumpdestroy="93e1e797-f6a9-43d4-9aa2-590732aeefb7",k.Sfx_dance_dance="36997279-b2d4-478b-acc3-0a6a63341a8c",k.Sfx_dino_dig="5afb830a-729e-4889-af35-5f7b51b093dd",k.Sfx_epic_egg_hatch="a9c0f4d0-d413-41df-b38a-79349d2511c7",k.Sfx_floatling_fling="2c0b1365-212c-4436-a22e-8de59312615c",k.Sfx_house_intro="a5fcdcf2-cf78-4afd-bf13-a7c807a97baa",k.Sfx_item_appear="19bc6ece-02a0-4fb1-815b-341476892b7f",k.Sfx_item_fill="b80a560c-6db7-43b9-973d-101045219b51",k.Sfx_item_hit="9541607d-02f3-4553-a5a9-de70d2f5e752",k.Sfx_item_whoosh="c49f9bf1-7651-40d9-a231-ead15e9a9e19",k.Sfx_jar_appear="bbc20fbf-48dc-4fde-9180-cbf9201cea4f",k.Sfx_jar_fill_ancient_game_gift_bundle_positive_open="6028a83c-baae-4c8e-8c6e-4226f564a77e",k.Sfx_jar_open_ancient_game_magic_bubble_open="78c4c917-727d-4a86-add7-7e0007555d9f",k.Sfx_keystone_appear="151a96bc-1e90-46d5-8a56-5eecded631f3",k.Sfx_keystone_disappear="7f8858ac-0174-4e6a-b300-5981ce3409bb",k.Sfx_lamplight="d4bf6a95-75a4-4414-91be-05a45cb3b846",k.Sfx_lamplight_pets="0e0cf8bb-0774-4ec7-bf59-60389b604666",k.Sfx_level_up="f599cb5b-38a3-433b-b752-5a70e159d378",k.Sfx_lockbreak="60431b90-7381-4a49-ad0e-0ad0660d4a5c",k.Sfx_main="556ac285-ca78-4e22-b47f-802c01fa7343",k.Sfx_minecart="8fe39e6f-f474-4c7d-8193-ee6cf37085b5",k.Sfx_minecartstop="1967797a-bf9e-4ba5-9cff-bb68c5629cfa",k.Sfx_moving_pet_position="41a6d297-9401-4592-97e9-c668df44e4f6",k.Sfx_open_petinfo_yourpet="addb4b04-11b5-4b09-88a6-33606054187a",k.Sfx_paper_tab="9dd81853-67f3-4168-b476-a5884cc5084f",k.Sfx_petbook_pagination="fea6d560-bf0c-409d-8635-19d5b2d85402",k.Sfx_pets_button_disabled_state="a507f085-7c4c-4f2f-a240-9e86509a3db4",k.Sfx_petsui_rescued="7133e7d7-527e-4ad6-a480-fe58247547bf",k.Sfx_puppetmaster_blast="71d1a201-a433-4a2b-8e27-afdeb07d6583",k.Sfx_pvp="49b61a63-8c88-42db-85dc-ad757780585f",k.Sfx_qi_button_default="5a365fe0-a201-47b4-987c-bce32bebbb0c",k.Sfx_qi_button_disabled="c7ab65ff-f34d-4dd6-a816-4b0bd2034991",k.Sfx_qi_negative_action="c27696e8-c89a-453e-a4e6-131f15b836f7",k.Sfx_qi_positive_action="adb8b97f-9956-47bb-94e7-72606ae3c6cb",k.Sfx_registration="54cf02bd-1b50-4940-b59a-c2a1ea18eb2a",k.Sfx_results_screen="8d0b360d-48ff-4450-84de-13df33dcb2b6",k.Sfx_sharelikeaction="c0f35ab7-46de-4e38-b4ef-ff336e859e75",k.Sfx_shipwreck_shore="30e09f59-4c2e-4a77-8711-c673d8d1456e",k.Sfx_skywatch="9ea8fadd-a299-4c3c-958d-f019fdae0f2d",k.Sfx_snowball="be83d5f8-2829-431e-8edc-cab9a6c8660e",k.Sfx_snowpile="11923d10-063d-4ee2-85f3-2238669a8c82",k.Sfx_spell_learned="9a651525-3dcd-45d6-8142-e5c6368c80ba",k.Sfx_star_appear_ancient_game_star_glitter="e9f8ca80-57af-4e7c-9e7f-6e2606ac9682",k.Sfx_star_explode_ancient_game_magic_achievement_1="b57b24ff-7d46-4d96-9b45-3354e7e40492",k.Sfx_star_jar="9e4c94fc-be4a-43fb-b5d1-00f630a64100",k.Sfx_star_jar_redeem="8d6718d7-22c3-4c27-a6a2-bc95c9e30597",k.Sfx_stat_increase="1d2476f6-a81d-4f4b-b071-9914ed707ae4",k.Sfx_store_equip="718123da-a810-4bf2-9190-f8ee55d2d131",k.Sfx_store_purchase="e1f6473b-8108-40ef-89d3-c6cd5f980380",k.Sfx_tab_click="09ee2803-e13c-40db-bcee-effdd658dcdd",k.Sfx_titan="cc4f40e3-bb3f-4531-85a9-fc4b9be341b2",k.Sfx_titan_catapult_hit="bee4d71a-a89b-46e5-a8f5-6335900e4c64",k.Sfx_titan_catapult_launch="d7727e1c-3e83-4a22-b83c-ac6f6129b46e",k.Sfx_toaster_close="d448e932-697c-475f-a45e-dbfd14148001",k.Sfx_toaster_open="c57228d3-ce21-47a4-bcaf-7de85e87ff5d",k.Sfx_tower_town="5bbd4f05-dd4b-4b39-b82f-10aa55b48d24",k.Sfx_ui="a5ecab87-fcb5-4f02-b98f-51faa950e8be",k.Sfx_water_balloon="a16dfa00-116a-41c8-bc36-a65b925581cb",k.Sfx_world="60b3a3e5-7221-4177-b75b-d93e731ec2fc",k.Sfx_wyrmroar="9d3aa970-b3c3-43c9-ab89-9e7efa7835f2",k.Sfx_xp_gain="69aa346a-9242-424c-9b30-2d43b14c2773",k.Sfx_xp_gain_member="7839c36e-2c83-4b00-b823-989da7f03c94",k.Sfx_yetiroar="a6219a8d-89ae-41f4-8806-3849d1869ae0",k.Voice_0="b8983c32-8fc2-472a-b251-695234ed54c7",k.Voice_10_1="8374fe01-22e1-418a-8add-d449afd2adf8",k.Voice_10_10="d15da664-0a6b-441f-bf1a-6e6ae693d17a",k.Voice_10_100="dd7ce4c7-b5e5-4f0b-a603-05271c89b8e3",k.Voice_10_101="dacd86f7-7e17-4960-b457-f4a18e15fd50",k.Voice_10_11="ff4c63da-c0c7-43d9-9736-c9b616c5ddf4",k.Voice_10_12="e74964d0-2bea-4a02-afae-1b65fc129139",k.Voice_10_13="630733b7-5d28-497d-a7a5-1d2019ef00a5",k.Voice_10_14="fb2597b1-cd14-4a7c-9fcc-1587dcf7f56f",k.Voice_10_15="8c82ebee-76a2-40fa-b31d-82fad226ef2d",k.Voice_10_16="a84be1c2-e6c9-47cd-ad89-dab895785db1",k.Voice_10_17="f429c8e5-da4b-4f35-ad72-542952d6aff5",k.Voice_10_18="f56a207e-2100-4161-b2d6-a76110086845",k.Voice_10_19="e5caeaef-3eef-48b4-ac6c-d992d8c557a9",k.Voice_10_2="25ac99ac-4d79-4988-917f-372f82e49220",k.Voice_10_20="39b6a2aa-27c3-44f1-bbd9-652eaaf7b4e9",k.Voice_10_21="68c557cc-ce02-4ff3-98a6-195f46f15f5e",k.Voice_10_22="4454bba7-9bd8-4975-a1ea-9a9ec42b1064",k.Voice_10_23="603fb6b7-caff-4cb7-bfff-4f0778c8219f",k.Voice_10_24="dc97131d-7de7-42c7-979a-cc5baa305acc",k.Voice_10_25="bbfcc683-1b76-497b-bb93-17ad11bbcda6",k.Voice_10_26="f4accfe1-9a4d-49d6-bc8d-726a53524025",k.Voice_10_27="9d6e793b-931b-4a5c-beac-a21b1c26f54e",k.Voice_10_28="4594100a-65b5-46e4-b051-9143b897461e",k.Voice_10_29="03a85e9d-2f22-4dc5-86ab-acb2a756665b",k.Voice_10_3="89a5dca1-52e1-473a-a000-5580d4804c56",k.Voice_10_30="903363bf-e7b9-4f76-95da-838cf92aac2d",k.Voice_10_31="2f90b0e0-7335-417b-b452-127f7de3fa62",k.Voice_10_32="27c286d4-f665-4ae1-bc49-d9d382cf155c",k.Voice_10_33="1a12de45-eaad-45fe-9a09-6980d8540613",k.Voice_10_34="0efb77ba-b0d6-4e33-90d2-035abfd2c033",k.Voice_10_35="3600b850-001f-4947-a582-ec4c84b5a139",k.Voice_10_36="a65753f2-f7c9-40a6-a45b-b893111a81b2",k.Voice_10_37="3b624ea2-dde9-4d53-92e6-a579690a35e8",k.Voice_10_38="b36cb4f3-f17a-4859-b5e4-1f5355289b69",k.Voice_10_39="5633a65b-a9da-4e63-89c2-d52f5d815b4e",k.Voice_10_4="18b617f3-c270-417d-abcf-78c0ddbfa1b5",k.Voice_10_40="7ca2fa2d-6e46-48ff-99ad-a09dca7cb890",k.Voice_10_41="3fb75a60-af33-4cef-8c5e-66e28969d623",k.Voice_10_42="ccb47779-50dd-4b13-b45c-d028cc4475a0",k.Voice_10_43="0d947cf3-31f1-4df1-8fc5-419d6e5d54a3",k.Voice_10_44="d17dc780-a622-441b-a156-ee7b15d5ce05",k.Voice_10_45="aa42e5fd-a27b-45a1-a14d-42a41059bd43",k.Voice_10_46="ca327091-4ddb-4579-a04c-dba4651a09a3",k.Voice_10_47="b05fbee3-0759-4dee-81ab-cbc2c6e4b651",k.Voice_10_48="aa16aa0a-6fbf-4277-b465-fae598b15a05",k.Voice_10_49="90127057-b483-4f20-a986-fc6a722a2bde",k.Voice_10_5="a7af0dd5-03c7-4215-9644-3ed32871e3b8",k.Voice_10_50="620242d7-dc6c-48b6-8233-548a3f369644",k.Voice_10_51="f5efaba7-0376-4eb1-a3d6-8f4a362cb81e",k.Voice_10_52="405e0fdc-25ed-4a53-b817-6743c9d1f2c6",k.Voice_10_53="8c4216b9-b62e-4e18-a6d0-8440e409aa06",k.Voice_10_54="232d9520-354c-41d8-b54c-676505429a15",k.Voice_10_55="8957cb08-2cff-47ae-a4d8-cf3ec020e729",k.Voice_10_56="0383fc16-321a-4a24-8e46-920aa4483044",k.Voice_10_57="80059479-0418-46f9-8c51-57a5137fca69",k.Voice_10_58="c7e9a18a-314c-42ba-900b-39711a5739c3",k.Voice_10_59="7324cb3e-3516-4c68-b3e9-21591918a039",k.Voice_10_6="7f417572-24ac-4079-a85f-a70ed43e9022",k.Voice_10_60="db932e86-48d3-4805-a193-28fb9c046beb",k.Voice_10_61="158d05df-fa47-4ab0-bd3e-76c3e4efd752",k.Voice_10_62="bf6f99af-e72c-4651-a206-a10bb08d9b99",k.Voice_10_63="5d2664f3-b7b7-4814-b089-ce33b657cf81",k.Voice_10_64="08161f8e-94ca-485c-84fb-311482a2f0cb",k.Voice_10_65="96012c1a-f0c7-4b26-8022-5f67227342f4",k.Voice_10_66="a63ce015-5fdb-4b7f-87b4-45ec4503cf8d",k.Voice_10_67="fe4ade9a-24a5-4c94-b69c-1f6ac6edc3ac",k.Voice_10_68="991122d3-4996-4e2e-a952-fa06c08aaf27",k.Voice_10_69="25793c57-a685-46ec-970f-64d7afe0d6d4",k.Voice_10_7="6c5d8cf8-fedd-4028-9059-b53dfe26eef2",k.Voice_10_70="a51bf05e-ffba-496f-80f3-f730e1b0f975",k.Voice_10_71="936d43e4-742e-4d20-b70b-fbe3a0514f76",k.Voice_10_72="dadcd5a3-7823-4925-858b-d9b46c22de5d",k.Voice_10_73="2ceb19df-3c2d-468d-a521-9e934c755d3b",k.Voice_10_74="8f2dba92-32f1-4ec9-820d-1d224913d467",k.Voice_10_75="c4d5d6d5-7f25-4068-99f7-7d3385879fe1",k.Voice_10_76="51838690-17b3-4efa-a5c7-dece38f3da0e",k.Voice_10_77="36eccea7-891a-453f-8acc-3231ad4f4275",k.Voice_10_78="07a42466-62a6-4f68-84bc-f63e73a8e52f",k.Voice_10_79="189d4bae-b293-4134-9caa-827727111a89",k.Voice_10_8="b08eb38b-4385-4f64-bd0a-77d9d4dab1bd",k.Voice_10_80="0df89a78-3e01-4c33-8a0c-ab935c70bc2d",k.Voice_10_81="a8536bf9-702d-4e96-bba4-f614b91e8698",k.Voice_10_82="144ac2da-f141-4182-993b-955929ce0f57",k.Voice_10_83="00e8d026-90c6-4296-97db-cc69c7527980",k.Voice_10_84="567a21e0-1e5f-491a-a6a4-b3b2242d57f2",k.Voice_10_85="fcd808e7-1bfb-433b-b2f8-05e31cb45dc7",k.Voice_10_86="8dbdaec9-f94d-4572-a855-01ba3187d1a9",k.Voice_10_87="2acc6399-b867-4362-978e-bed6f19f5d99",k.Voice_10_88="08289a6f-fc73-476a-bab4-667ad155bba8",k.Voice_10_89="6820cd0b-7c8f-4026-87e3-59320b82b82b",k.Voice_10_9="4d1f5225-2bab-463d-8b01-4ffcc853306e",k.Voice_10_90="54f5ae0a-b6ec-49b7-87c6-984bb0b7ce04",k.Voice_10_91="58a85340-45da-404d-9608-9d14fc69b176",k.Voice_10_92="711f1dce-efc1-4858-8395-d95e8dc7c4c1",k.Voice_10_93="db010365-a2eb-4d56-809c-fc5d8a70ab8f",k.Voice_10_94="b3463275-de36-4831-bce1-c13c130f2b54",k.Voice_10_95="df0af4f7-6f1e-4086-b874-ca2499224134",k.Voice_10_96="4a0d25a2-b634-4df1-820e-309939839f87",k.Voice_10_97="abb370c4-5fc4-4cfa-b607-57e9adc61317",k.Voice_10_98="55328b35-268f-4d0a-ac10-d5dfce78819c",k.Voice_10_99="5b2e4bfc-c777-451c-ac64-63b0556d1d43",k.Voice_11="fbdc34da-94a8-44c8-8746-4881c2a57c45",k.Voice_11_1="33870292-9f42-4aeb-846a-32523c1e6339",k.Voice_11_2="645bc547-787d-4fcb-9e01-cc0428eab3ee",k.Voice_11_3="a50441d3-5413-492d-8ade-7d96cea8608f",k.Voice_12_1="f0629883-d0d7-477c-9d80-683149efc47d",k.Voice_12_10="1ac27643-bc73-4747-952c-cc68fed72954",k.Voice_12_11="3fb7995c-1cd4-4854-8257-d0f2fdbf804e",k.Voice_12_12="9efb4a74-41dd-4e3e-8d0c-e07816416480",k.Voice_12_13="9b8c2daa-9134-4728-aa67-ee48ed86d49c",k.Voice_12_14="f5d1916c-5ded-43cd-91b7-620f4381558d",k.Voice_12_15="4c219ef8-6694-4874-b984-7c195c7af5b7",k.Voice_12_16="4664ca14-b1c9-4fb0-a764-5d3cda6b637f",k.Voice_12_17="ddb5622b-b67a-4cf8-9e72-30d04b5aba95",k.Voice_12_18="a3bdeeb8-ce5b-4f39-ab0b-547f635f301b",k.Voice_12_2="475d98f6-92de-4dad-a201-324bd296eea2",k.Voice_12_3="f4770274-326a-497e-9904-b8b01659af4e",k.Voice_12_4="50f57a4f-52b9-46a7-bd4f-17e6331b5778",k.Voice_12_5="33bad2e5-ae92-4699-84ce-ee99f14f8fba",k.Voice_12_6="363637a0-0d33-4c58-b9f0-151b22a0c1c1",k.Voice_12_7="e9ed5001-d592-48ca-b918-efd46aee33de",k.Voice_12_8="333d5063-fddd-41bf-a95c-eb82d7767847",k.Voice_12_9="5dd95371-d5f4-4b3c-95d9-fdc3c8841cb7",k.Voice_13_1="f906dab9-56a4-4639-acf6-b0fe7be73b29",k.Voice_14_1="0f6848e1-bd85-4c8d-ae85-ac5ff8298234",k.Voice_14_2="0b25866d-33b3-4616-af2f-a25b6c4e0c17",k.Voice_15_1="fcf5a301-ef27-4589-b0f2-99be5abcc6e5",k.Voice_15_10="30dd76dd-cc4d-4b70-b4fa-79d3c0a14df8",k.Voice_15_11="02cd8f2f-3a9d-4ad6-92ab-6da9225c895e",k.Voice_15_12="08aeffa8-187e-49f1-a326-b91b85334532",k.Voice_15_13="eb243657-a7df-43e8-98e5-3fd68dfdb6d9",k.Voice_15_14="d3b6c2dc-42f9-49db-ad1b-a27a12ee0b2d",k.Voice_15_15="dc3fd45a-30b4-4883-98a0-5929fbc09ee2",k.Voice_15_16="ce9d5f95-089c-4a9b-8bcc-c123267d9aa0",k.Voice_15_17="f0cc43c3-9e3f-410d-a9a9-5c39c24d8273",k.Voice_15_18="a019226e-7975-446e-bf75-d1d496b832f9",k.Voice_15_2="e04f3f64-efe4-4feb-aabf-7b76b5ce19d6",k.Voice_15_3="90998594-7818-446e-87c0-f3bcfb53d05a",k.Voice_15_4="42b9aaec-5111-48b5-880a-fa06129abad4",k.Voice_15_5="e0da217d-7a8e-4bda-8945-30d7a51342a5",k.Voice_15_6="d4ec40f0-aa49-4620-917b-c86706401865",k.Voice_15_7="cad25c19-056f-4f04-a891-150e9e151894",k.Voice_15_8="36dbeab1-0102-4e8e-8a9a-b17e06649ec7",k.Voice_15_9="d5caf9ba-4a6d-4834-b2d8-2acf209edf51",k.Voice_16_1="d4ff6e15-07ff-407b-8267-b9e63b19b5ed",k.Voice_16_2="5e754842-534e-4ecf-905b-e1edad589c46",k.Voice_16_3="a549ec6b-de5c-478d-bb61-38d7a6f230ba",k.Voice_17_1="9dc63892-5b87-4617-97cd-aecd0b1ca0ba",k.Voice_17_2="4667104b-71f9-47fe-89b6-3188959c725e",k.Voice_17_3="7504ea16-fed9-40ac-95ef-1ed71f4ceee0",k.Voice_17_4="2e352a3f-79e0-4420-b4ef-21db33a271cc",k.Voice_18_1="52b16126-6452-422f-b926-caa25c7e92a8",k.Voice_18_2="8d3141f7-7fdf-468b-8f43-2fc7767b0a21",k.Voice_18_3="918bd95b-b98e-4ea7-a2c0-e46fdddaa823",k.Voice_18_4="5d809ec8-9620-4049-ac4a-cabfe765dcbd",k.Voice_18_5="8f5583ae-04db-419c-9b18-e1cd64475797",k.Voice_19_1="84a75a47-f8fa-48cc-8044-92e91a0c87b7",k.Voice_1_1="7901d207-e514-4ff4-a2a5-ed0312a2d640",k.Voice_1_10="6f4c05e7-15d1-4d1b-be88-564b421fceae",k.Voice_1_11="48c1d522-de68-4fbb-904b-6baa84013fda",k.Voice_1_12="a9b92570-9111-4e8a-aa37-b420e6859034",k.Voice_1_13="d2c5ce34-e31b-41a8-ac2c-28d124c7c5ba",k.Voice_1_14="9ddcc862-33eb-4668-b35b-5ec0ca108e61",k.Voice_1_15="131c2c36-8b5f-4eaf-bc43-19ae307bd9a9",k.Voice_1_2="bcca6880-e652-484e-848d-074c90119aaa",k.Voice_1_3="db819f9e-1687-46b7-a889-bee08b4b9fe5",k.Voice_1_4="163f1b05-df94-4d34-a4f0-a97c7d4a2056",k.Voice_1_5="8b3233e3-2d3a-4cce-b002-0a0a429cee83",k.Voice_1_6="b964e341-8564-4383-b0ef-58f638968677",k.Voice_1_7="a6fdb043-578b-4f03-a667-d71ce87ea05d",k.Voice_1_8="e5076a83-9296-4595-9ebc-bc4c32df228e",k.Voice_1_9="9f920d31-c2e9-412d-9b56-4184ee6a5129",k.Voice_2="c87a7825-b899-49c1-9604-604486f3a276",k.Voice_20_1="00902e19-6596-495d-b0ca-cd98aafba128",k.Voice_20_2="8e731a39-2a57-48d5-b5d5-38f6871cf134",k.Voice_21_1="c2e464bb-bf60-489d-ade0-3b824071b8f9",k.Voice_21_2="21b23b69-c804-4312-b420-6159d2efdf24",k.Voice_22_1="87a222fb-8469-4eba-bef7-a59995c317cd",k.Voice_22_2="1e07e93b-2e35-4d98-9134-b3d6509bbbe7",k.Voice_23_1="1dbdc658-fc61-4083-86ad-f4a975e9b4a5",k.Voice_23_2="410c4498-c8d3-48a9-9577-a0b1eea19b58",k.Voice_23_3="4925fb6b-9720-4c03-b8d1-cc01e82fad1c",k.Voice_24_1="5c8be06f-0e96-428f-9ca2-76701a0d74f1",k.Voice_25_1="81ebcc5b-8a69-479f-9fd1-effbb3825ed6",k.Voice_26_1="0c6b84e5-f4a4-4e4d-9a53-efcac80bbde5",k.Voice_27_1="9cbc27db-a65b-405e-9af6-09991dc3901b",k.Voice_28_1="41e1f7d9-7313-4f72-803e-750b2beacb12",k.Voice_29_1="449b0569-bcc7-45ba-8896-f48784a4c9ba",k.Voice_3="b0f7e2bf-bf73-4912-8983-ddf5c33cfc2f",k.Voice_30_1="e5e3b754-560b-4a18-8c2c-65bea92b145c",k.Voice_31_1="81c38a0a-3596-433f-9f50-3f1ad4545831",k.Voice_31_10="560bda7b-cf4a-4cc3-a385-87a675ae6eb6",k.Voice_31_11="1fe92a88-0ffc-43ba-af06-706f323b1fef",k.Voice_31_2="1384c200-e18c-480f-a678-184c6fa0cd1c",k.Voice_31_3="60b6b173-12ca-4768-b6fa-18fc73b5c4a2",k.Voice_31_4="8f61c317-72b0-4f5d-930a-3222842461a3",k.Voice_31_5="322f6541-efd1-42ab-a22e-29d6082c297b",k.Voice_31_6="651c25f2-5092-4f7a-a814-41ac2d6118b1",k.Voice_31_7="9e60859b-9da4-4e80-bbde-36ba9189fb24",k.Voice_31_8="dc8672b0-9893-4478-bd72-7ca1134f36ca",k.Voice_31_9="c6d04f55-adc6-4518-8942-8eb8581072e4",k.Voice_32_1="254ec798-db74-4600-8b14-b44e2f4f1fee",k.Voice_33_1="5c6d4f2a-306d-4562-a4fb-68c105c5d411",k.Voice_34_1="02ff5e25-b1fe-433a-a3fb-8b9ee2b5ca52",k.Voice_35_1="d64e0332-d3a1-4697-8f4c-26b77895b5bb",k.Voice_36_1="79db4bf1-b54e-45af-a2f3-4eeef0de9479",k.Voice_37_1="782be050-14d8-46d7-a3c6-025dcf0ccae9",k.Voice_38_1="e1e98afb-68d7-49ff-bf24-f6e8beaa4bfe",k.Voice_39_1="b7567b10-b8ca-4ea8-b040-c07351cb1559",k.Voice_39_2="ab6667cb-8f3c-43b8-ac98-c5979f41a493",k.Voice_39_3="857caa3f-e35a-442b-924e-914aa44c3948",k.Voice_39_4="3e2a5634-37ee-45b5-8769-c6fac7983c25",k.Voice_39_5="af7eec7e-169d-4f29-8658-82176f96ca8c",k.Voice_39_6="5dcef2df-b9c3-4605-b077-60601dbbb80c",k.Voice_4="b107ceb3-3f2a-4eff-9920-083c64d1825b",k.Voice_40_1="ef0c0e07-6a19-4010-a1eb-5d3ead249daf",k.Voice_41_1="6b65e388-71ce-4897-a651-e96a66446c1a",k.Voice_5="7dbb3a28-6630-416e-816a-9d2235356a07",k.Voice_6="c4040765-4656-4ad5-a147-53b85acc1e77",k.Voice_7="1be1bb65-5bb5-4ef2-86cb-2b634614e76a",k.Voice_8_1="17090933-1d74-4556-88f8-6936c1416cf6",k.Voice_8_10="9e9ee52a-6416-42f6-b2a2-b202653c4b14",k.Voice_8_11="d7e72894-b7d9-4b49-b00a-a49c06658fd8",k.Voice_8_12="32820842-6f0e-4c3c-b634-1333b6088561",k.Voice_8_13="4de4f67a-c7a1-41f1-98f1-1aeb08c57a3d",k.Voice_8_14="c5097d7b-7eaa-4737-b7bd-b0141ff69473",k.Voice_8_2="d268246c-7a9c-453a-9c36-d44d49ed05a5",k.Voice_8_3="68713acd-7415-4a68-b7c4-a778d1564a71",k.Voice_8_4="ec28035b-edf1-459b-a72f-008c23ebbf9e",k.Voice_8_5="22b1e4b4-d6aa-4c42-8e67-c95aa62b58de",k.Voice_8_6="4c2281f0-84ee-4f1b-a7d0-6c81a9ea390a",k.Voice_8_7="97f8654d-82c4-4f0e-b796-21e6765fae10",k.Voice_8_8="06f7112b-3a1c-495f-a592-322c2ec8e2af",k.Voice_8_9="113d9a21-b131-4eee-a7e2-bcbd22627ab1",k.Voice_9="b8ad14cc-bc8f-452f-a8a2-46df02fefafa"}(F||(F={}))},36648:(k,B,U)=>{"use strict";var F;U.d(B,{q:()=>F}),function(k){k.About_ArtistsAlley_MayJune="6a93df6c-0e28-4a2f-a31c-bdbdab1c07c4",k.About_FF_DecJan="cde70f26-33a1-4b3c-9491-e91caef3a078",k.About_HotCold_AugSept="27807234-1d15-41b9-8446-219b7e15457e",k.About_JurassicBBQ_JuneJuly="d854de9c-85bd-452b-87f3-7fb9d522b71d",k.About_Magicoin_OctNov="770fe68d-439b-4431-9ca2-e0899d607d3a",k.About_MoonlightDance_AprilMay="26f3957f-a74f-4f10-bca0-eea06b1c85f4",k.About_SG_FebMarch="cfffffd0-252a-4d03-b6e9-8eb3c8d6e783",k.About_SunkenSecrets_Oct="fbf2103d-5f12-4a26-a87c-33510dae0153",k.About_starryknight_AugSept="778400b9-fde2-403d-9226-b2f3cb03ed50",k.Accent_banner_pbf_magicoin_free="d91c9c9a-919a-4313-a0a1-4c5d265120c2",k.Accent_banner_pbf_magicoin_member="3d44b1a7-d40b-4466-b563-d2137d54fa60",k.Ad_app_download="17ee12c4-6d52-46f5-bed8-cccf13a09900",k.Ad_challenge_large="232666ac-597b-4465-86cb-44871595eae8",k.Ad_challenge_small="9015ffcd-e810-4836-927a-42f4c225d8b2",k.All_shops_button_basic="c2245984-24bd-4d1f-ab4f-8a1ba90688d3",k.All_shops_button_hover="2dc169c3-65ee-4385-be45-585c667872a7",k.Alpha_gradient="b12df35b-db7d-42bd-89e8-2fe725626e89",k.Alpha_gradient_large="d7d4292d-694e-4751-ae88-f9d74dfad4bf",k.April_2024_teacher_gift="ac5e998d-a0c8-4afd-a2a2-941eb00d0180",k.April_2025_teacher_gift="945b0ef4-6a59-4209-8976-7a1f91818da7",k.April_2025_tt_home_screen_background="37d6ad0a-b38c-4214-b940-01006e43c687",k.April_2026_teacher_gift="3e2438da-30e6-4697-b3b5-5cf6a4160cc2",k.ArchiveWheelBig="190a8f4a-ee88-4565-9c80-590673e13eec",k.ArchiveWheelFrame="7fb923e3-cb90-41e0-91db-2c954e2b1c35",k.ArchiveWheelPointer="3cb1b4b2-eefe-451f-bd80-2ae657b187db",k.Archives_season_s1_r1="6c720489-8c28-4b35-9070-58aa2731ea9e",k.Arrow_green="d9d395d1-ad6b-496d-938e-b6c6f0e8d5f1",k.Aug_2025_tt_home_screen_background="da88abfc-9ea1-4dd4-8bb2-dbfa4d71b36a",k.August_2024_teacher_gift="99146844-af5c-4908-9f73-dd47fa68514d",k.August_2025_teacher_gift="727289c5-2ace-4678-a95d-7fe0eb97b8cd",k.BTS_GearUpdate_mailer="d7597f0f-f3b8-48d3-8241-0f528290a749",k.Background="a9d8a799-09b6-4688-b5c0-6d8af305eea1",k.Background_arena="d4c07814-4cce-404d-90dd-f0236af8b3ae",k.Background_boss_rift_ice="20873d43-4230-41d6-9dd9-282f61178cfd",k.Background_boss_rift_sky="d51faf6a-819d-4fd5-bbb6-a7a7d156d7c2",k.Background_class_code="8b4aa02a-0030-4e24-88d6-cefc61776746",k.Background_moonlight="2ac28cea-f8f0-4057-abf1-38d29cd35325",k.Background_pumpkin="7744caca-6df9-4e11-a219-bc0f54877f5e",k.Background_starlight="7e9090f0-e343-4de0-b4a5-ac00be823cd9",k.Background_winterfest="12b5ea74-ae25-4cdf-936d-5138ba9979c6",k.Backing_1_cream="ed3d8628-cd54-43f1-be7b-662544f575cd",k.Backing_2_beige="4c4adfbb-5d2a-463f-9c89-4c144952e7f8",k.Backing_3_dark_beige="7615aa8e-d1f8-4704-b7b1-2a69fb0396eb",k.Backing_4_secondary_beige="352a5f6d-93a4-445c-a712-46cdc95f5754",k.Backing_battlelog="6add84e5-fe82-4c44-98e6-5a719c901095",k.Backing_bonus_reward="935b3ba4-6488-4c72-aff0-5c95be06ffab",k.Backing_dim="906d5416-484c-4f70-8282-de03ccc57aa1",k.Backing_pattern_sparkles="96245e39-235b-44f4-9bfa-ecd046276e6d",k.Backing_wood="85feead2-7940-4fca-94bb-f9b038fd90d4",k.Backing_wood_notch="3f035693-9114-40ed-80e2-1967a5ceb6f9",k.Backing_wood_small="19094bc6-e28e-4220-9e35-795ae0aada01",k.Badge_backing_empty="282d23b8-d120-49c3-bdaf-2acc8ec9d7cd",k.Banner_festivals_tinteable_grad="cb8e9ef3-e61b-443f-af6c-67a56dd27d0a",k.Banner_small_pink="357fdc8f-f15d-40ad-aca4-0940ae8e9549",k.Banner_small_purple="c4dcb310-5dc2-4c70-93f1-9e73ebb9e28c",k.BattleLowHealthBorder="59d77743-50a6-445d-9832-6c26604e4c43",k.Battle_Pass_FTUE_Screen_1="4bf4dec7-dad0-4c4a-8b05-51b4065f86cd",k.Battle_Pass_FTUE_Screen_2="abe43935-9df7-43bd-b449-3c1674905f48",k.Battle_Pass_FTUE_Screen_3="36dbfe97-8a73-44c7-af33-05bdc26f752f",k.Battle_Pass_FTUE_Screen_4="f27c16c2-5a1e-465b-b894-fd4dd6515ca7",k.Battle_Pass_FTUE_Screen_4_2024_Dec="476a975f-1687-4ebe-a8a7-0de0f9eaef57",k.Battle_Pass_FTUE_Screen_4_2025_April="42749ab2-a725-481e-8ad5-141f1107b270",k.Battle_Pass_FTUE_Screen_4_2025_Aug="eae2dfa6-87ac-4e92-8168-8d3de4f27713",k.Battle_Pass_FTUE_Screen_4_2025_Feb="b260dec4-eb94-4325-bcb1-53e1b1658b0d",k.Battle_Pass_FTUE_Screen_4_2025_June="c12d8c88-196b-4509-a973-d16dfb54ac79",k.Battle_Pass_FTUE_Screen_4_2025_November="aaeed6e2-85c9-4141-9b0c-72ccad0c9bfe",k.Battle_Pass_FTUE_Screen_4_2025_October="e8060736-a9de-44e8-8671-00e0289892eb",k.Battle_academy_gh_pedestal_bg="b437f002-af00-49b8-a2d7-25b67b5685a7",k.Battle_academy_gh_pedestal_fg="c09002e3-6695-4efd-be21-8f413e6a7e20",k.Battle_academy_gh_stairs_bg="8c3bf69a-1282-416d-90c1-57efca053c5f",k.Battle_academy_gh_stairs_fg="ca4194f4-8626-4ff4-b1f1-4d84fa0f823b",k.Battle_academy_stairs="cb20f004-bf10-45d7-ada9-9a3ba66b913f",k.Battle_archives="ffde07db-e1bb-4b0c-b724-8faae4a14d26",k.Battle_archives_bg="41f23d64-af23-4ad2-8c33-0f3ccfeaf3b4",k.Battle_archives_fg="88182fd5-723a-4ac5-9c21-ae0de5cb8b1c",k.Battle_bonfire_inside_bg="6ba91a53-b9f0-4e76-a99a-133121d1f163",k.Battle_bonfire_inside_fg="b292329a-50c6-46e7-92fb-e3b6b4fb0694",k.Battle_bonfire_lava="89f1914a-4308-4131-bc14-33507fee4851",k.Battle_bonfire_lava_bg="49f70191-39bb-4f25-832e-84f6c2b1149b",k.Battle_bonfire_lava_fg="b95d2b2d-cd94-4e1f-beac-149c9f023809",k.Battle_bonfire_lava_old="340e7581-a41d-46bb-a11a-631921f42118",k.Battle_bonfire_outside_bg="16b4a938-d5bc-41ea-9089-c308b24b7237",k.Battle_bonfire_outside_fg="ace7fd1a-3c7c-42fc-8b11-471d19098b40",k.Battle_coliseum_outside_bg="1b6e94b0-9dab-4b77-b216-93f791658f20",k.Battle_coliseum_outside_fg="09666b04-39e5-45b5-9e49-111f91ebedd7",k.Battle_forest_generic="77eedb27-a584-46f3-87a6-40e84902c429",k.Battle_forest_generic_bg="351db49c-f8f5-4076-b713-a6175f9c1c0e",k.Battle_forest_generic_fg="f5e3e053-a0f4-471d-88e9-c10404d8da07",k.Battle_forest_generic_old="76a18a73-ff12-4518-8fe4-8d1212f914a4",k.Battle_forest_outside="19a67601-ce54-40ea-ac70-8c6b3b1cbb83",k.Battle_forest_outside_bg="325a0230-611d-4d79-8c9e-784703b77721",k.Battle_forest_outside_fg="c376bd6d-ef20-4c13-a396-4085486ef68c",k.Battle_forest_outside_old="84230353-9e18-4cf6-aecf-3c68ffaad60a",k.Battle_grotto="e8526641-5073-4a97-bb4c-a8edd8550c63",k.Battle_grotto_bg="e3602904-def2-4b94-ba3f-1f2e5ae65d83",k.Battle_grotto_fg="211ad4ee-1450-4931-b4e4-4964e9e4199e",k.Battle_interstitial_bg="cfc94123-817c-4e1f-8bf3-6e1eeec93ced",k.Battle_lamplight_moonfest_bg="6b62b005-097a-4580-9701-061386e71920",k.Battle_lamplight_moonfest_fg="dddabadb-b443-4499-a8e0-a896944e727f",k.Battle_lamplight_outside="289f3ef1-58c1-4257-a739-7a73b495164c",k.Battle_lamplight_outside_bg="33d861e0-8416-4366-b640-75bd58a76419",k.Battle_lamplight_outside_fg="8088a9e2-278a-48cc-a429-be02d472fbbc",k.Battle_lamplight_outside_springfest="99ba4ee3-0bc2-42b3-a76c-505aa6956e9a",k.Battle_lamplight_outside_summerfest="c50db463-cdfa-4f28-a1f2-b2c46e8e8990",k.Battle_lamplight_outside_winterfest="87c9b456-c737-4c8c-8d85-ae07ff87daac",k.Battle_lamplight_pumpkinfest_bg="83af8521-a111-4086-8412-90998096923b",k.Battle_lamplight_pumpkinfest_fg="e96058b9-7536-4dfd-9c4f-b89a9a6f312d",k.Battle_lamplight_pumpkinfest_night="a0876a5b-71eb-49da-aaf0-0470d7e0b8b5",k.Battle_lamplight_pumpkinfest_night_bg="ebf28489-f1ca-4961-9c9a-b4833bfb8b5a",k.Battle_lamplight_pumpkinfest_night_fg="6f160c28-ca59-4b62-b5b8-ea9f0e5e9fe0",k.Battle_lamplight_springfest_bg="99a5fe98-a71a-4c17-a9b4-c85809f08d82",k.Battle_lamplight_springfest_fg="e636c55e-fde2-4c8d-870c-b7d8035fce92",k.Battle_lamplight_starlight="2ee80068-aad0-4187-aa81-84f3ea701f0c",k.Battle_lamplight_starlight_bg="e666e7f9-6294-41e6-8a7a-45fdbc61a69b",k.Battle_lamplight_starlight_fg="654aa629-489e-4cb6-bf46-fed109a439ce",k.Battle_lamplight_summerfest_bg="dc9e3505-30bd-4e74-9fc5-bc9147af52ce",k.Battle_lamplight_summerfest_fg="25f0b480-cadc-43c3-835b-ffd6e60115ad",k.Battle_lamplight_winterfest_bg="a24b5f19-0b31-47ae-ab9e-2be6854dfc5f",k.Battle_lamplight_winterfest_fg="d133013e-92a7-467e-875b-c599d5fffff5",k.Battle_map="1d2ef160-a67d-4b3e-b62f-068f0b116328",k.Battle_moon="294aa34d-24f9-4826-a309-1ff7fbb92c52",k.Battle_moon_bg="bd6ba53d-dd8a-4a7f-a68c-26161c17f5df",k.Battle_moon_fg="aa0f953d-a092-4ba4-9ea6-3e017d4f8e77",k.Battle_puppet_master_bg="fd200b15-bd62-46c1-a177-0d0c46628444",k.Battle_revamp_splash="6e202c5f-e986-4a2e-b9b7-11eff12943c3",k.Battle_shipwreck_inside="ecec9348-3818-407e-aef7-b2ec15c241a5",k.Battle_shipwreck_inside_bg="510850d9-61d9-49ed-a600-4ba7f2b7f397",k.Battle_shipwreck_inside_fg="c547d4ff-e235-4bd4-be23-b503cb6cad72",k.Battle_shipwreck_outside="8c146682-ab2a-4680-a5e3-b9910dd27507",k.Battle_shipwreck_outside_bg="d502cd37-ef8c-46d6-81e8-7c548b66dc0d",k.Battle_shipwreck_outside_fg="bc6618a6-f008-446e-8ead-5391c4cce57d",k.Battle_shipwreck_underwater="6c77836a-db22-49c8-8168-ebe566764b6a",k.Battle_shipwreck_underwater_bg="9e53b099-9941-466f-8ea8-e6e7d0126049",k.Battle_shipwreck_underwater_fg="c883bf41-56ea-4415-bd75-1157fa748a67",k.Battle_shiverchill_inside="027df5e9-b930-4700-8a6e-f234fb0989de",k.Battle_shiverchill_inside_bg="b7555e19-a333-47c4-ab5c-7eb5dc06893e",k.Battle_shiverchill_inside_fg="a5a80e5b-5680-4b3e-a53f-6155540dcc9c",k.Battle_shiverchill_outside_bg="0d6c6911-c576-4200-8a99-7be16d46e7e8",k.Battle_shiverchill_outside_fg="c14e6f6f-83dd-48ac-970a-4d9cd6d30f59",k.Battle_shiverchill_outside_old="1f4c3639-355f-4762-afa5-ffe42862d02b",k.Battle_skywatch_inside_bg="bec82905-9385-4c6d-a27a-2027d27d9f0f",k.Battle_skywatch_inside_fg="d87f5a6b-64e8-4afd-ac23-a9905ca5e2a0",k.Battle_skywatch_outside="84b91294-49d6-4481-b3e8-48a22b30e9e8",k.Battle_skywatch_outside_bg="29189a36-c263-472b-9375-6340c7e5486a",k.Battle_skywatch_outside_fg="858eb9e5-97cd-4d79-bd4a-66347b53f294",k.Battle_tower_inside_bg="6689ef4f-ed14-4a10-b50b-7c51aeb172ef",k.Battle_tower_inside_fg="d21d9862-1f9a-42e6-988b-efcd34f5f397",k.Battle_wizarddash_bg="fb925c0b-5939-4eb1-ba5c-aa77182f39b1",k.Battle_wizarddash_fg="55daa75b-ee5b-4a1c-bec7-e7695bdb2905",k.Battle_wizarddash_fg2="a97e897b-2fe9-4de2-8042-f7a6bd05e08e",k.Battle_wizarddash_outside="56567ff6-79b0-4eac-a5cf-b8d03ef8c284",k.Bg_battle_academy="22a20bf3-dd2b-4f89-8086-907733a339b0",k.Bg_battle_arena="d5810e2c-5d94-4cd1-87b1-2608a1e3c726",k.Bg_battle_cloud="d249015c-59d2-45f5-a977-282fb639bb5b",k.Bg_battle_dino="fbc909f5-5f70-462f-9a3f-1d432d8af2a3",k.Bg_battle_forest="f7dbf566-f2f1-4d47-9b02-29bb4fbc0956",k.Bg_battle_mountain="bff86add-432b-4ee1-bcd9-68c9ea56f6e6",k.Bg_battle_pirate="1c8be200-2d6b-4157-8506-edefa20a7bcc",k.Bg_battle_shipwreck_beach="a45e070f-5279-4946-afce-ce1f467179d9",k.Bg_battle_shipwreck_underwater="43b05a79-5dcf-4d9d-be5c-45b47c7200fa",k.Bg_battle_tech="55ca142f-fe61-47a5-829b-5dd789c6fb3c",k.Bg_battle_tower="707c27c0-5389-49c9-a677-aaa5c046a1b5",k.Bg_battle_volcano="6742be04-500b-40cc-bbab-df0be52ded1b",k.Bg_calendar="0e6e8c32-47de-4bac-8e54-c8496a33347d",k.Bg_calendar_v2="d80afbed-3612-46ff-929f-4d01e989b2a1",k.Bg_floatling_fling="96623e14-59c3-465c-a190-c9b29a7f5c1e",k.Bg_generic_outdoor="feef9cf3-47aa-4728-a7b9-fc80d1900cb7",k.Bg_postbattle="875f9adf-8992-488b-9e64-417488fb3bf0",k.Bg_postbattle_magicoin="8fcd40c5-f035-42dc-a08e-30c685365ed5",k.Bg_pumpkinfest_ui="19a2abd8-5739-4cc1-9d9e-da6fdb8ff7bf",k.Bg_springfest_ui="d3604e95-e752-49b4-bba0-632c119e909e",k.Bg_springfest_ui_02="6158e3e0-7ef6-41d6-9ba9-89ece91e5077",k.Bg_summerfest_ui_01="235b8ffe-f623-4de4-ba57-2698b848a46f",k.Bg_titan_ui_02="79ae07c7-c11a-431f-814a-4622ebe99939",k.Bg_winterfest_ui_01="1f7e4012-8c2e-4d7a-8ab0-9e4838c6c049",k.Bg_winterfest_ui_02="7b5e5ca2-54d8-4978-9ae1-f308adcafdf4",k.BigthingstrailerYTthumbnail="d0205c4e-53e8-41bf-86ae-1a97437205d3",k.Blur_tier1_tier2_back_small="3c3699b1-eb41-44ed-8cd4-c35ff848386f",k.Blur_tier1_tier2_front_small="6ede1bcd-bba2-42cc-9457-e62029780d1a",k.Blur_tier2_tier3_back_small="e664aa7f-1fbf-44f0-bc36-30c0f9cc60c9",k.Blur_tier2_tier3_front_small="a5b990b7-ce0c-4d85-8013-7be26f8b719f",k.Bonfire_intro_1="06b07398-3193-452c-b8b5-882454335eeb",k.Bonfire_intro_2="864be244-dcea-4a0c-9915-d25b29b75e27",k.Bonfire_intro_3="f56f0b6e-3416-464f-aa29-414ab05907ed",k.Bonfire_intro_v2_1="cd3e2167-8a7c-416a-9515-9b1afb077194",k.Bonfire_intro_v2_2="9ce4e043-242e-4cf9-80be-770650ebdae1",k.Bonfire_intro_v2_3="5f59b8ec-7357-4d66-9114-6a4c9be5e7c4",k.Book_ui="1f5c6ea6-1f87-4f2b-92bb-90393bd5935a",k.Boss_shadow_cebollini="89346d11-3e0e-4ce6-aa24-b1f72ab6c360",k.Boss_shadow_gerald="731255e7-c9e3-4430-b81b-dfae29642ce5",k.Boss_shadow_ice_wyrm="30e15ae5-abfa-4305-bc06-0bd187d78854",k.Boss_shadow_nasty_cloud="dc8a4c4a-9b01-4739-8023-e0f7d899a9ba",k.Boss_shadow_old_one="cf00167e-f118-4c73-8a5e-8857dac762a3",k.Btn_dyno_blue="36ace350-a4f0-4922-a539-411812418d14",k.Btn_dyno_magenta="93e025cd-0c9d-4f7f-beb7-b98ab3658a20",k.Btn_lamplight_pumpkinfest="5aa590de-b3a3-4dd6-aa0c-ade9aa39e2b8",k.Btn_lamplight_springfest="035f70fb-d91d-41a9-bbf9-0e0bede11d65",k.Btn_lamplight_starlight="c3dd173f-e91c-4291-801a-05f5df983bad",k.Btn_tower_blue="1476b951-1ef3-44fc-a08a-080b95f225f3",k.Btn_tower_magenta="d8e14379-1f40-4852-9151-35aafff3e89d",k.Btn_towertown_blue="2e7ec46b-1f9f-4135-aa3c-2cd00d9a16a3",k.Btn_towertown_magenta="b6aa202f-f6ac-4f60-afa5-ea4da7dfbaac",k.Btn_town_moonlight="59f97607-89ee-4b20-b62d-2584f9c17760",k.Btn_town_winterfest="91a7fc3e-0d31-4e18-8124-9cd012a95bdf",k.Bucket0="a50c59dd-44d7-4d6b-b410-006fd7678f2c",k.Bucket1="6a330d2a-d315-41fb-8497-ce421b5999f5",k.Bucket2="4fe18160-7312-44e8-93f4-6db53de1c5ae",k.Bucket3="6eb98eda-e918-4e9b-b968-c7187a80fbca",k.Bundle_gold_frame="41c15819-baf5-464b-b25a-ea2592d63e0c",k.Bundle_storefront_decor="122b210b-6320-4041-bbd6-19f9dd1827ac",k.Button_emerald_medium="23a47cdd-8a75-42dd-b07e-666c2927f8a9",k.Button_marble_medium="ba54762a-7e30-4934-ad6d-c071d3103e6d",k.Button_ruby_medium="ce6ad281-108e-47b7-b7bd-83343c66b470",k.Button_saphire_medium="c64eca7b-2b6d-4aef-b2a7-44bd54e70a18",k.Button_stone_medium="e2326f53-b7cd-4244-a6ac-ff55bec6286e",k.Camera_map="37174f1d-2e40-422b-9703-4b0d85d69db7",k.Candy_Corn_Promo="ab5fed41-516f-4eb9-a12e-e1ea65b8f340",k.Cannon_ball="992b9327-1e78-48b0-a583-966f67a97668",k.Card_reveal_130x130="febc75d1-5ae6-4c8a-9890-f6778fde9866",k.Card_reveal_yellow_130x130="c55e348e-df17-41b7-861f-9f2b6a424575",k.Cc_shadowWyrm_mound="752efa09-3484-4baa-9838-6d4f6f345e8b",k.Character_1_long="a95aabe6-7b4f-4de6-b635-a7d6634f0036",k.Character_1_short="ef85f824-8fa3-4438-aef2-ee4272fba962",k.Character_2_long="a22645b2-4518-430a-ac7d-1f35ee22d2eb",k.Character_2_short="1e58496f-1bcc-403e-9b4d-895be3612fc4",k.Character_3_long="07f4c036-893c-4a78-87fa-c3b11aff7a3f",k.Character_3_short="99dab1ca-685b-49b1-8d7f-ceaf18a52afe",k.Charged_levels_mailer="22662a50-0c47-48f8-af1f-ac066ecf7b19",k.Charged_levels_mailer_ultra="d8918507-82b9-4e92-ad17-fb88b60766d1",k.Chart_elements="5641e94b-03e1-43fb-9299-e53334131ec4",k.Chest_gold_closed="a709d3bd-4a5e-41d4-90e2-0034dd469e65",k.Chest_gold_disabled="b44aaabf-614b-4c6e-ae63-e2fff70ab5b2",k.Chest_gold_open="c121599e-8d8b-44c4-b541-1c693bdd534e",k.Chest_plus_closed="dcfc52ce-9724-44c7-8582-2e170c5fabb8",k.Chest_plus_disabled="2bcac690-df88-462f-8009-0ecfb0acadf3",k.Chest_plus_open="cc444397-19cb-4496-a491-8fc3f0378dbe",k.Chest_ultra_closed="a6d1e967-40ac-4f91-860d-cdfc16767927",k.Chest_ultra_disabled="9b9fce35-6142-4d5a-8114-bb49d64b8b02",k.Chest_ultra_open="889607e1-297d-42cb-89ef-31d2ae820e6d",k.Classroom_reward="c626cee9-7f05-436b-a347-ca86f023d109",k.Cloud_1="13a29059-c116-4faa-ae11-9bfc57dc53d3",k.Cloud_2="02fb27fd-29c9-41a7-b771-5537c8a1507a",k.Cloud_3="bb8c549c-36dd-4819-b047-fa0a2943b835",k.Cloud_5="1a3ee237-60be-44c8-99d8-bd29abe1dcdc",k.Coffee="10d2a756-3bb3-4101-be68-3c2a4a0881d6",k.Collect_badge="9d1795bf-a6b5-4a3b-b165-13d806461703",k.Connector="1f40fc06-4ee3-41cb-af13-47465cded3bc",k.Connector_arrow="23b4ad0d-6ad1-4ab0-b24c-339888fad809",k.Container_dual_buttons_clipped_corner_small="57043f8c-4166-4df0-8a82-bc88ff0f3282",k.Corner_title_card_base="a3e4a924-6c77-4825-926a-9efb414fed2d",k.Corner_title_card_calendar="65f00391-55ce-4ee7-b856-123a4d63917c",k.Corner_title_card_member="fcfd2bb5-ec6e-4f07-beb6-1b25f2c772ec",k.Corner_title_card_tintable="6f06438a-2184-4bae-8a81-6f0480762f60",k.Create_parent_account="2157060c-5361-4a13-a564-cf3c0be73f89",k.CurrencyWeekend_gold_coin="3c45cfa8-a35c-4a5e-bbd4-fc01a6f73d27",k.Dance1icon="1669f0b8-e58a-43ac-80fa-5eaff641031a",k.Db_hammer="3319f075-0acf-4d03-bcfe-abad5590da2e",k.Db_moonwalk="00e1c093-cc0f-4a40-b902-7d2feaac099f",k.Db_runningman="2f3ac52c-27a4-474d-8ebb-5f07a2fc8f2c",k.December_2023_teachers_gift_snow_fox="b42f12ec-e31f-40bd-a381-48f64d58600b",k.December_2024_teacher_gift="0e193b10-328e-40ad-9ce6-38a250efab6e",k.December_2025_teacher_gift="ce1ec2e9-389c-455e-84bc-3987b42b6312",k.December_tt_home_screen_background="f9787e55-62e5-40a3-b98f-ba899560a4ef",k.Default_loading_screen="0f010710-289d-41ff-9861-519b1b4f0a21",k.Dialog_backing="bf67e08f-de01-4ade-bb63-3594bbc3567a",k.DragonOrb_1="0cc2bfa1-9b87-4572-9ac1-b832daff107b",k.DragonOrb_2="f79d74cc-3069-4587-a6ff-72b8ebb03593",k.DragonOrb_3="7a710425-cad8-4020-8f18-ca316963027f",k.DragonOrb_4="9541cc6a-b4e8-4e11-a65b-de6fde686d24",k.Dragon_rift_coming_soon="bbd676b7-72c0-48a7-8b02-9c47f3bea020",k.Dragon_statue_glow="4f32bdc3-5929-4ea6-ac3c-d32dcc0f88d9",k.Dragon_statue_glow_night="c4d787d2-0041-464a-854d-8e588ec2478f",k.EarthWheelBig="0f3c01eb-cf3f-4536-8e96-e0710b771426",k.EarthWheelFrame="267307e9-9389-4d72-a736-e6994ad30bf5",k.EarthWheelPointer="2163b7b2-1eca-4d2a-9ac5-41a5736c515d",k.Effect_accuracy_buff_1_mini="c53d079f-9ab4-4724-840c-7fd3d8cfa41a",k.Effect_accuracy_buff_1_small="449b187a-0212-411e-8aaa-c76281dbf442",k.Effect_accuracy_debuff_1_mini="af6552f5-5727-4eb8-a9a3-7a92ac9c932e",k.Effect_accuracy_debuff_1_small="45b06dee-3da7-481a-8ec0-064dbb877abb",k.Effect_anti_magic_shield_mini="6da1035e-e826-4a32-9a4c-4bde2076031c",k.Effect_anti_magic_shield_small="246f25a8-fcf9-4a64-8008-aa5adaba95b7",k.Effect_astral_absorb_mini="667a5d98-7703-476a-af24-7791ebe81265",k.Effect_astral_absorb_small="59ffa032-4c5c-4924-b8a3-0ab7d388f5d4",k.Effect_astral_buff_1_mini="3243b5f3-6aff-44a9-9458-7b97c1ef7b5e",k.Effect_astral_buff_1_small="d18b5275-3b84-441e-beba-6376088a5664",k.Effect_astral_buff_2_small="3f06d3d6-9a8b-4bf2-84e0-00b5e2bdb3e9",k.Effect_astral_debuff_1_mini="7608919d-9cbd-4464-add9-85a4f57df64e",k.Effect_astral_debuff_1_small="c7839228-7e81-4fae-a35a-2c69a90bb1dc",k.Effect_astral_reflect_mini="1e03b19c-2855-4c1f-a3fc-e13c6305bc3c",k.Effect_astral_reflect_small="79451739-a2da-466d-b7c3-c48199c3eb4c",k.Effect_astral_shield_mini="afbe4e0a-a0d6-45ba-838f-53d966c58266",k.Effect_astral_shield_small="b17d5a37-044e-4621-b4cb-9b054da93f2d",k.Effect_crit_buff_1_mini="fe14460e-0b3f-4ad7-a430-9cce574dfaf3",k.Effect_crit_buff_1_small="924c672a-63ed-4f4b-8cd9-1e9ba6853db2",k.Effect_crit_buff_2_mini="ae4c2715-48b7-409d-8ec2-f5530e75b3e5",k.Effect_crit_buff_2_small="25ea9f42-a8d2-4db4-91c4-6c83857239e8",k.Effect_crit_debuff_1_mini="25eec472-fa3a-4b35-80a1-6aecf6566fbc",k.Effect_crit_debuff_1_small="23eeed3f-bca8-4b16-aa62-7fda81fcce20",k.Effect_crit_never_mini="164cbcda-9720-4c16-ba19-6f26e90a709f",k.Effect_crit_never_small="a9352b7f-cc7a-4944-b139-a469ee9cc25c",k.Effect_defence_buff_1_mini="67bcf47e-cf2c-409a-bdea-57cf8e12297c",k.Effect_defence_buff_1_small="5efb35be-639e-48c7-8af8-8a4a941c1929",k.Effect_defence_debuff_1_mini="44c76791-10d2-4f6c-a13e-276fa346a254",k.Effect_defence_debuff_1_small="0ba5f3dd-6f80-4877-9629-67eda18fd966",k.Effect_equipment_no_mini="3ca1227e-8b7a-426c-8575-ba6d9d1ee8d9",k.Effect_equipment_no_small="c3e3c27c-1897-4f26-8995-ce30d8d3aec4",k.Effect_fire_absorb_mini="eb3331ff-384d-4afa-b129-c727ba410f26",k.Effect_fire_absorb_small="49eab690-f21a-4450-8310-b637b90a7ab4",k.Effect_fire_buff_1_mini="8a9f291f-b7a7-4305-81d8-2deaf9b53d0d",k.Effect_fire_buff_1_small="512ef00f-7c44-46e0-bbce-18c25621b40f",k.Effect_fire_buff_2_small="c1780461-7692-46f5-ab6c-f023991d32c4",k.Effect_fire_debuff_1_mini="daab793b-6e29-45ec-b571-7d3a04d5820b",k.Effect_fire_debuff_1_small="ec686c29-f9a1-4291-ba18-509feaa14eb8",k.Effect_fire_reflect_mini="7d82a9fe-7ff3-4f6f-b069-76a9a8b6f71f",k.Effect_fire_reflect_small="5a72b9dc-0497-491b-ad4d-c711f2eed8d6",k.Effect_health_buff_1_mini="335a2890-8e36-49d8-bfe2-edddc55bf324",k.Effect_health_buff_1_small="e468dcf8-7acd-4cd6-af04-8df2ac183495",k.Effect_health_debuff_1_mini="8a40ea6a-9ef6-4f29-bda7-f66602fd709d",k.Effect_health_debuff_1_small="82ba9a52-a23c-475b-94b4-9aeb963fadb4",k.Effect_health_degenerate_mini="10a06bf8-8cea-4db4-a59d-da27b10f2223",k.Effect_health_degenerate_small="4be9b677-8f83-4e15-8214-0b59ac43a666",k.Effect_health_regenerate_mini="4de04183-3766-4e8d-ac83-f2b1b3f64b70",k.Effect_health_regenerate_small="d5d59df0-297a-4344-9aff-19594b2fc780",k.Effect_health_survive_mini="13e9897a-b6c3-42c6-99f8-69290f37eed6",k.Effect_health_survive_small="d738435e-1279-46f9-a1e7-f94e05ce6d56",k.Effect_ice_absorb_mini="c48afad1-92cb-40ab-b0b0-be746802358a",k.Effect_ice_absorb_small="ec4764f7-5bdb-4f06-b992-6bb5a0980548",k.Effect_ice_buff_1_mini="da3bcb2b-04d8-42c2-b155-e0cae1b74d09",k.Effect_ice_buff_1_small="4b1156cd-68c4-4560-98d0-7478d732abd9",k.Effect_ice_buff_2_small="46e8d016-56e4-424b-adad-7bff139002b4",k.Effect_ice_debuff_1_mini="9280c470-1271-494d-b2e4-135ae962a643",k.Effect_ice_debuff_1_small="b4b86645-a853-4415-b891-2cb825878e05",k.Effect_ice_reflect_mini="b8ba88e1-e814-4d25-978d-0a9972d8c7b2",k.Effect_ice_reflect_small="a001975b-e6e0-40b9-aa9c-12775f2c8f09",k.Effect_pets_no_1_mini="2b6a451d-33a8-4b30-92c8-26274c6f80a3",k.Effect_pets_no_1_small="744f972c-69fe-48ef-85b8-d095f541d751",k.Effect_pets_no_2_mini="e06f607f-042e-43f3-a54b-8599e17f4a2b",k.Effect_pets_no_2_small="492402a3-64ac-4da4-8c11-27629178e7ba",k.Effect_pets_no_3_mini="ea8dd1ca-867c-41cb-a066-271ed53aae9a",k.Effect_pets_no_3_small="a6872be5-bb08-4e28-aac5-82e3bccdd1d2",k.Effect_pets_no_4_mini="3e5b7454-86ff-4f28-b8e0-e7c05cff3c96",k.Effect_pets_no_4_small="888364b0-bec9-4f4c-841f-0c68b5355c41",k.Effect_pets_no_5_mini="8bd894e2-a875-4c90-86df-dff8f8ae65c2",k.Effect_pets_no_5_small="fe0720aa-f362-4c36-ab49-5937a45194e7",k.Effect_pets_no_astral_mini="b8d7e991-f4e3-4c2a-9ef4-6b3c111e957c",k.Effect_pets_no_astral_small="9bad211f-56ab-4460-8ce1-39e0e48f60c6",k.Effect_pets_no_fire_mini="6c1e288c-de01-422b-820f-eb6eafb23875",k.Effect_pets_no_fire_small="75d13b06-2726-42d7-ae0f-5f05398bc767",k.Effect_pets_no_ice_mini="66832e72-dc7d-444d-930d-58d99cd121a2",k.Effect_pets_no_ice_small="cf0ab767-caa4-45f7-a977-09332f459b1c",k.Effect_pets_no_physical_mini="3f27ff6e-8ce4-4f5b-a9d7-e95b9212809a",k.Effect_pets_no_physical_small="b95780f0-fa45-4613-83f2-970c6fb388c2",k.Effect_pets_no_plant_mini="eebf8ceb-32f6-4a26-a427-ee7473e297e3",k.Effect_pets_no_plant_small="946d8a2f-d32b-401e-ace6-c338a2ab71aa",k.Effect_pets_no_shadow_mini="773a68cb-b248-4004-acc9-eaf0787f130b",k.Effect_pets_no_shadow_small="da618446-c36f-4634-9d29-261b3258a94f",k.Effect_pets_no_storm_mini="57dcc553-b727-4220-a4c3-475a5c97f914",k.Effect_pets_no_storm_small="4b79c153-3900-4901-a51c-d80240545d99",k.Effect_pets_no_water_mini="fa093e33-93ae-4ca7-9d7d-8b96266abbea",k.Effect_pets_no_water_small="e701688e-5044-4e8e-89e6-29f8345ff7f4",k.Effect_physical_absorb_mini="9d821334-90c9-4199-8e9f-327aa11a1915",k.Effect_physical_absorb_small="bc367d86-1e82-4faf-b7f7-cacf9a7a44d9",k.Effect_physical_buff_1_mini="ff510a5a-6610-474a-9f48-1dfa7339c7a2",k.Effect_physical_buff_1_small="25f74665-0058-472a-b074-3e6bc23000b2",k.Effect_physical_buff_2_small="303251c3-cb6f-407c-bd67-84949dc761c3",k.Effect_physical_debuff_1_mini="57870911-4e5b-436d-b7c8-ed9c480fc6eb",k.Effect_physical_debuff_1_small="0d4a7fc6-69ce-48d9-b924-d17a1eb5c6df",k.Effect_physical_reflect_mini="b3e2befa-048e-498a-9a39-a6715a54574b",k.Effect_physical_reflect_small="d14992f3-fd4a-48a8-b9cc-3a1e2e193e23",k.Effect_plant_absorb_mini="aad5a902-dcb7-4b67-89ff-19daf9c80be0",k.Effect_plant_absorb_small="2618205c-25ac-47c9-a9df-bb04328f4a48",k.Effect_plant_buff_1_mini="5f4bc1e9-cf78-4e2e-a566-267afc5c5521",k.Effect_plant_buff_1_small="283883af-634b-4fb2-872f-fb07cad16bbe",k.Effect_plant_buff_2_small="a8f38ef9-1b3f-4707-b9ae-388e9ceadcb6",k.Effect_plant_debuff_1_mini="d115b170-16ae-4a94-8304-7aac57959e8b",k.Effect_plant_debuff_1_small="920aab75-b9ba-4dfb-935a-be0b9ea4d9f3",k.Effect_plant_reflect_mini="8bde27bb-528f-438c-b9c5-b09528d89489",k.Effect_plant_reflect_small="2fd5f267-63e6-48ae-9540-6c6ce4e00c7c",k.Effect_power_buff_1_mini="dbbe190a-c51b-470f-a453-87796b32c8fe",k.Effect_power_buff_1_small="abf367ee-f194-42ec-a887-df3bf3740655",k.Effect_power_debuff_1_mini="7edf25d1-28bc-47dd-a90f-f7927f6c4c05",k.Effect_power_debuff_1_small="8702f2ed-2777-4aef-b278-bc0e11ef30e2",k.Effect_revive_mini="cb8c7dc3-3dbd-4fec-bf43-11b108e7c944",k.Effect_revive_small="03f5add4-5118-4eef-ac48-ef73c31391fd",k.Effect_shadow_absorb_mini="912f056a-5e46-43d9-a189-1daef2de1f64",k.Effect_shadow_absorb_small="396a63ba-aba5-4765-941b-bcdb30c6e8fd",k.Effect_shadow_buff_1_mini="49b8d6f4-6d53-474b-94b8-f7b3201d216f",k.Effect_shadow_buff_1_small="1192b17f-67aa-4de5-904b-e12ed3fe8304",k.Effect_shadow_buff_2_small="c24fdeee-0f0c-4a17-a4fc-b839cc59f65b",k.Effect_shadow_debuff_1_mini="f6a8f99b-561c-4fbe-8409-a3b0429f63cb",k.Effect_shadow_debuff_1_small="e81e6cb0-c295-4355-a21c-c0cdc7f4a1fb",k.Effect_shadow_form_mini="bea672fe-1ba8-4a84-94f2-de64976aa334",k.Effect_shadow_form_small="5a3d5b03-05d1-4999-8bed-962d79906be9",k.Effect_shadow_reflect_mini="a788e431-662b-4548-8010-3dcea6355c50",k.Effect_shadow_reflect_small="99e8824f-b915-456f-9dd2-d9fbb42801ab",k.Effect_speed_buff_1_mini="59eafd49-5656-4e8c-935a-26ea04fdbb04",k.Effect_speed_buff_1_small="050a7873-f865-4db1-a745-5dcbd5dab36a",k.Effect_speed_debuff_1_mini="218d7e46-522e-4a2b-8051-a82f4eca63bd",k.Effect_speed_debuff_1_small="79eafb60-318e-4d81-b614-f79466695593",k.Effect_spell_cooldown_debuff_mini="133e978f-64f0-4342-ae8c-01ce773b277b",k.Effect_spell_cooldown_debuff_small="86515e2c-11fa-40a4-891d-a543ea7b263f",k.Effect_spell_random_mini="482f8804-212a-42e8-8955-68b71c104c90",k.Effect_spell_random_small="6d4f9612-61ff-4f01-ac94-00941970e39e",k.Effect_storm_absorb_mini="7a9dfe5a-ee43-4a62-9eb7-bb9c8d9426c2",k.Effect_storm_absorb_small="3d19dcb8-cb05-4663-ad44-a75d78bda149",k.Effect_storm_buff_1_mini="f56a5c25-f448-4a98-9d7e-52c11b554bc2",k.Effect_storm_buff_1_small="32777f2e-81fa-4551-a3ee-fe44332d11dc",k.Effect_storm_buff_2_small="dbf20643-8add-4574-b2e6-e153258850b6",k.Effect_storm_debuff_1_mini="40b63572-2591-4a12-a186-efb8f48d0b22",k.Effect_storm_debuff_1_small="4a3d2242-0fa3-453b-835b-6319d30ff983",k.Effect_storm_reflect_mini="27e959e2-b76f-436e-aa1b-e06ae086fac7",k.Effect_storm_reflect_small="80d4f71b-a85b-4688-b67d-271dffe1d37e",k.Effect_timed_mini="ab1d47c8-d0a3-4f50-b17e-65ba0ec55590",k.Effect_timed_small="de182b75-1187-4348-a601-ec0531730882",k.Effect_water_absorb_mini="416094e3-28ad-41a8-923f-88e09b96fe3c",k.Effect_water_absorb_small="54f24470-6e5f-4a58-b9a6-ed94eb6caa3e",k.Effect_water_buff_1_mini="0ffce8d4-5d0e-49f4-be40-92ceb5a80338",k.Effect_water_buff_1_small="e02da00e-f978-4097-a458-d6fea0e335a9",k.Effect_water_buff_2_small="be8423c7-473c-432b-b775-880224d0e479",k.Effect_water_debuff_1_mini="372eb1a1-142e-4048-b585-fd25c5070957",k.Effect_water_debuff_1_small="b4c992dd-f982-4ac5-9238-83b667e63e0c",k.Effect_water_reflect_mini="779eb6a1-cb2b-42b3-8a2d-18339eba194a",k.Effect_water_reflect_small="c41ec3dd-f4f0-416a-af98-40ad7782d669",k.Emerald_large_active="dc1229e3-08b9-4a29-a526-16cf1552b437",k.Emerald_large_default="77908517-e6df-4550-8752-ca90c32b9c3d",k.Emerald_large_hover="131e66f0-006d-4255-bd73-12b7b8b30bb1",k.End_frame_icon_home="eb03215d-a106-4485-bc46-21ecae5cb755",k.End_frame_icon_membership="34ee8b41-175c-4d77-adcb-f225acf7b65b",k.Existing_member_tooltip="246f75c0-6b11-44fc-a1c4-4a2dff131122",k.Face_01="c27e881a-b3d8-4e27-a5e6-56d5ba600104",k.Face_02="818ecd67-d4cf-4e6a-a7ff-53c347c1792e",k.FeaturedPet_HUD_BG_Astral="ac9256b8-93d7-4fe6-930b-a6c7f0f64f38",k.FeaturedPet_HUD_BG_Fire="afcec615-03f3-4d71-80b4-3595e1c37550",k.FeaturedPet_HUD_BG_Ice="a3cb7c55-b6f3-4a38-aa58-5eac35042ad9",k.FeaturedPet_HUD_BG_Physical="1489e248-ba17-4c57-8f8c-33aee57ad041",k.FeaturedPet_HUD_BG_Plant="f9b8b02d-9c39-46e8-b464-93f108194001",k.FeaturedPet_HUD_BG_Shadow="d179156d-d4bd-4ade-8dc7-bbb6649c217a",k.FeaturedPet_HUD_BG_Storm="ba735928-07e4-4e52-8d9b-8a2e1a3ddb8e",k.FeaturedPet_HUD_BG_Water="bf392a71-9c02-4fc2-bc8c-c46c8a07741b",k.FeaturedPet_HUD_FG="54355e9a-386d-4ae9-a2a2-89d489c334ae",k.February_2024_teacher_gift="d4bc3b8e-7873-46a3-b38f-88c8b8f7895d",k.February_2025_teacher_gift="54482e83-53a0-4cbd-83a7-2d4647f9f392",k.February_2025_tt_home_screen_background="569b7cf2-43af-4276-85a5-581109336e0d",k.February_2026_teacher_gift="7640b268-6bb3-44ec-8f59-9b2e3499ce25",k.Fill_bundle_gold="bb2b22e7-a7ff-450f-b8bd-1a2fd0773201",k.Fill_plusmember_background="d6c921b0-3112-4393-95e4-17572113f067",k.Fill_ultramember_background_full="7d2073ee-6e20-4f16-9303-812a08ecc240",k.Firefly_intro_1="0d7e5e8d-7c55-4167-9efc-4c7e508afc60",k.Firefly_intro_2="56acca89-eab7-4917-a4c9-4a5593c5b7bc",k.Firefly_intro_3="acee2efb-6c0f-4069-95dd-56084cc7681f",k.Floatling_limiter_popup="98e3961f-fe37-4adb-9f27-40fe8ecd8215",k.Fog_1="bda15c51-89f7-4b8a-b3e4-4c7c1d71a92a",k.Frame_difficulty_expert="ad53b50a-7f5d-425a-81f2-c5e5c518dbe0",k.Frame_difficulty_hard="038ff741-5825-4a15-9be5-104a502f09ed",k.Game_Splash_Page="52edeca5-8047-4647-ac11-36e1c34c0bc4",k.Game_island_launch_modal="27b9ed9f-1e62-451b-aa6e-54b903635867",k.Game_mode_confirmation="c816d079-8b34-4db6-9907-e5cea39cf735",k.Gate_moon_open="82615ece-6f17-4723-b4c1-d383c450c2e8",k.Gift_reward="181ac118-48c3-43f0-84fd-43cfaf4758be",k.Giftbox_state_challenges_shadow="b45a2261-334e-434b-b80e-237fe4e4e7de",k.Gold_medium_active="25bf927e-7a6f-49bd-9b41-be0f6d72a9a4",k.Gold_medium_default="6c525afe-f80f-4dda-a684-1cef6ae685bf",k.Gold_medium_hover="4fd0c163-5042-420e-93ab-e5b6f5a98ead",k.Golden_page="fd4e0676-1293-4c0f-941b-695089d257e6",k.HUD_backing_no_shadow="3fdc0762-9b3c-4d2d-b3e6-c0fda25b4d8d",k.Highlight_burst="56307e29-713e-4415-b6e4-e039c1acf9e2",k.Holiday_challenge_2024_reward="8d02ab5d-2787-4eeb-a006-f45046130bf7",k.Horizontal_dorm_1="944ea85e-01d0-4782-9e7f-7efd51156471",k.Horizontal_dorm_10="934f58fd-ecea-4eaa-8f75-8c578e51a018",k.Horizontal_dorm_100="13214aa8-db57-41be-ad68-c4c430dabcc8",k.Horizontal_dorm_101="00231d99-199b-4b00-9b8e-c0b306025550",k.Horizontal_dorm_102="3183d829-000c-4326-b8e5-dde2f01a0762",k.Horizontal_dorm_108="97204e47-138b-4aa5-a6ec-3c99b2288b3a",k.Horizontal_dorm_109="16f2337d-632e-432d-ac79-ca61dd783df7",k.Horizontal_dorm_11="b4caa685-6889-40a0-b890-a52afd706616",k.Horizontal_dorm_113="1ae19a5c-355a-4a23-a9de-c7d191a45c4a",k.Horizontal_dorm_114="5c1bbc2d-ed08-4aef-8b71-d2cfd964d9ff",k.Horizontal_dorm_115="279dd049-faf7-4b1f-b52c-d1e9572fd1d5",k.Horizontal_dorm_117="d6739fa7-277a-4b15-83e4-4971cb86ee0e",k.Horizontal_dorm_118="5cf29244-2091-42ac-90c2-a16fc72a1773",k.Horizontal_dorm_12="087ea007-4dcd-4feb-9668-a907ef082878",k.Horizontal_dorm_120="6f162c6f-0177-4fd6-8869-04d59d6a5020",k.Horizontal_dorm_123="0c67b5bd-7494-471b-a1d1-4555fcc8aa23",k.Horizontal_dorm_124="c5062637-15f6-4eab-b6db-b1b859ebc5a5",k.Horizontal_dorm_126="4f117952-3559-444a-a0b7-43909fa99e3a",k.Horizontal_dorm_127="bb9d52f8-bf29-48cd-85c7-3f3725b15b0c",k.Horizontal_dorm_128="cf5aad1a-94f4-4216-a9eb-c3299f7e33f7",k.Horizontal_dorm_129="9113044a-7be4-4c17-80dc-c081da64ffd1",k.Horizontal_dorm_13="489961a2-8ec7-454f-81ff-ce1f3cdcaa55",k.Horizontal_dorm_130="0303923d-c6b3-4304-a117-fd52d02a0b5c",k.Horizontal_dorm_131="a1c16019-5bb1-42b2-9cfc-86874fd9ea1c",k.Horizontal_dorm_133="8f323636-a90d-42f2-86f7-462cb8411c33",k.Horizontal_dorm_138="e57c5d6f-3697-44c3-85ea-51affa96d9e3",k.Horizontal_dorm_139="441002e5-da3d-4939-8839-998588cf5f35",k.Horizontal_dorm_141="821d0133-8229-4376-8296-a97f406bb2b2",k.Horizontal_dorm_143="86e1db6e-117f-4f1b-8a73-80d5fee478f0",k.Horizontal_dorm_144="778eff4e-bd22-443e-a8c9-a0855ea8f7ad",k.Horizontal_dorm_147="09cad8d8-e2ea-445a-b926-1db919b41e2f",k.Horizontal_dorm_15="ec7d1f1f-cc37-4614-ac10-a4be1becb17b",k.Horizontal_dorm_153="728537f6-3144-4802-a32b-8b2859f0b845",k.Horizontal_dorm_154="2d9148d0-cc63-4758-bff1-a466957ed1e3",k.Horizontal_dorm_156="ed7a9ab7-e2d4-4316-9494-2e2cb83da6fb",k.Horizontal_dorm_157="568baed3-a421-48f5-9af8-5cbc0bc0d085",k.Horizontal_dorm_16="9c1c8578-a3c2-46a6-8369-6e657c8feb02",k.Horizontal_dorm_160="95a84f46-d06d-4dca-93a9-d5171021c844",k.Horizontal_dorm_162="2cdbd242-739f-4f4d-a368-70a304dc3102",k.Horizontal_dorm_165="a9e93063-564b-431e-81f5-970b7b402b2c",k.Horizontal_dorm_166="1b403a36-c008-4ed0-badc-e03df6046609",k.Horizontal_dorm_167="590f0388-a280-4de3-a5dd-ba2e545c4c91",k.Horizontal_dorm_17="50975b45-8108-4ae0-bcee-04e74acc749d",k.Horizontal_dorm_170="bc985b1e-941e-4c60-9a2c-1ce882279e20",k.Horizontal_dorm_173="17f15edb-c73f-4d3a-b4e2-a9eb4d80b995",k.Horizontal_dorm_174="d90c5cb5-c895-41a0-adeb-a57041f8e5c1",k.Horizontal_dorm_175="a4ad755a-baf2-41c5-82a1-59c900ef0c16",k.Horizontal_dorm_177="0f4f1b7c-6197-4de2-99f1-2fbeb7fad0f5",k.Horizontal_dorm_178="16c29e39-c86e-49b4-828f-29417336ceb3",k.Horizontal_dorm_179="8cf2dfae-8c5a-4691-bfa3-5bbcd551c068",k.Horizontal_dorm_180="48837a0c-281d-49c5-9340-1bc8660ae63a",k.Horizontal_dorm_181="f8dd5ea4-7302-48cd-8222-e184041319f2",k.Horizontal_dorm_182="b3c7380d-cc12-43fe-88e6-4c36ec8c9dcc",k.Horizontal_dorm_183="7e0d082e-aea1-487a-936a-5403e0240779",k.Horizontal_dorm_186="b833cd8a-03f7-4603-9c01-fa3b7762b381",k.Horizontal_dorm_188="a88ba7dd-17f3-4b78-82fd-50600fd4d0b4",k.Horizontal_dorm_189="37ee7b89-f1bd-40d0-865a-f0aeb2c84897",k.Horizontal_dorm_191="1affe23a-eebc-4f68-8f47-3241bf12d490",k.Horizontal_dorm_192="5dbc2f3b-8250-4817-8597-a453c2a2ae81",k.Horizontal_dorm_193="c4e9a75d-074d-4bf9-84c2-4493672e6eb1",k.Horizontal_dorm_194="1ddaef82-9ad6-443c-ac72-dbbed5b1fd9f",k.Horizontal_dorm_195="c8402663-2860-427c-888f-fc2a138a7205",k.Horizontal_dorm_196="1ed01e83-4c6a-49e2-8b1b-a3f39d0db73d",k.Horizontal_dorm_197="effbed23-1d41-4acc-8e2a-75700bb24930",k.Horizontal_dorm_198="dc1a5c62-ac5b-4c77-800e-8581b4f015b9",k.Horizontal_dorm_199="0e8fea37-5d40-4835-b138-ee790d9465ea",k.Horizontal_dorm_2="d1f7b044-ea8b-4859-af5e-da2329ab5eb2",k.Horizontal_dorm_20="f02deb11-bfe5-488d-8cde-9828a1eedb8b",k.Horizontal_dorm_203="f555e0be-73f7-42af-8d39-58865a7810e2",k.Horizontal_dorm_205="842c7b98-0d03-4e26-82c5-54c44330e1b5",k.Horizontal_dorm_206="61539ddd-58cc-4663-a9d4-69d37f1d68ba",k.Horizontal_dorm_207="e3038562-2a32-4424-8268-f8d3f84f4f41",k.Horizontal_dorm_208="c64cf382-b3ca-4d68-955f-103fd8f9e937",k.Horizontal_dorm_209="977a5441-6a35-4913-a140-b8338b6df4fa",k.Horizontal_dorm_210="60282ccd-b943-4108-97cc-f19ba5feee0b",k.Horizontal_dorm_211="63dc1d35-36df-47b4-bae6-e0dd41b0a760",k.Horizontal_dorm_214="17a528be-5f8a-45c3-9ead-7f584c1fc2f4",k.Horizontal_dorm_215="5d3c4b87-f573-4023-a2f8-1692805c2fa8",k.Horizontal_dorm_216="0b993753-fc57-45ef-b41f-30c2deaa28f3",k.Horizontal_dorm_218="f5515d36-a21f-448b-8a21-41c921f0f676",k.Horizontal_dorm_219="571e3268-1227-4b59-8720-97fef0d1ad3a",k.Horizontal_dorm_220="267d2673-3107-4199-a7dd-6b7e0c681e65",k.Horizontal_dorm_221="cb2d8ced-a752-415a-aaf3-cb807e4b3ca6",k.Horizontal_dorm_222="c2c794bb-cf87-4c7d-923a-07d34c92e24e",k.Horizontal_dorm_223="3439b58e-80d0-4a9c-9caf-afe293cdc062",k.Horizontal_dorm_224="bd80dae5-2695-49ba-acbe-c373ff5b2d8c",k.Horizontal_dorm_225="b0999e4b-822f-41d6-8557-6a14dc738c5c",k.Horizontal_dorm_226="7eafd8b9-3d8b-40c4-9df6-2168fe232755",k.Horizontal_dorm_227="f11e73b2-d3ed-4eb7-a615-f0609c835a0e",k.Horizontal_dorm_229="47f220d6-ff63-463d-ab50-5f856ef968d4",k.Horizontal_dorm_23="b605d0c0-a9ad-4777-b635-1be2376dbd99",k.Horizontal_dorm_230="3d4e1303-eb6b-4aa6-a05d-40c4797e190b",k.Horizontal_dorm_231="7ed8c998-5c40-41b2-a9ae-847b47df7b54",k.Horizontal_dorm_232="7066f56c-4d98-40fb-8620-e6e2793c28de",k.Horizontal_dorm_234="54270e2b-ab1d-4ac7-ad93-5c339259a99f",k.Horizontal_dorm_238="b1331636-a97d-47b6-8e45-5764565dbe73",k.Horizontal_dorm_239="904146fa-0e25-4848-9a50-c5daff7e5cfe",k.Horizontal_dorm_240="ad438726-5981-48f1-bd9e-305063233309",k.Horizontal_dorm_242="1f05e7c7-054b-4fd9-b46a-ff5306a1b1cc",k.Horizontal_dorm_243="4e45d50b-92f5-4604-a831-d3cd82e387e9",k.Horizontal_dorm_244="6a8b651b-159c-4b98-ba35-8bac72db5ad2",k.Horizontal_dorm_245="d3e6af8d-9133-47c4-bd32-5237b5cd97f3",k.Horizontal_dorm_252="bac168a3-ef63-4f15-88be-c8e8ed388e3e",k.Horizontal_dorm_255="80cb7765-911b-4064-a635-a523683a0b82",k.Horizontal_dorm_256="716f3a4e-3d77-4fe8-b0cf-2664ae9ee7ef",k.Horizontal_dorm_257="1a9d46c4-bfd1-416f-aa44-28e13a2a178c",k.Horizontal_dorm_258="89f7cbc2-31e9-4cb0-909a-7e0c6808f007",k.Horizontal_dorm_259="9b77088a-717f-4bd0-a1df-36827e473d7e",k.Horizontal_dorm_260="b407056a-e1e6-4233-a30a-eff3cc3fd4a2",k.Horizontal_dorm_261="d6011a9e-447b-4762-9724-d6ef10ebb60e",k.Horizontal_dorm_262="5b3fbd74-6a86-4b8e-add3-c434b7d83a5e",k.Horizontal_dorm_263="91ac273b-3f2b-444b-9540-acad56257d7f",k.Horizontal_dorm_264="d1743bfd-b68a-4f8c-9d9b-4085e57085cb",k.Horizontal_dorm_265="da29f400-1431-4652-b973-d31145eeabe2",k.Horizontal_dorm_266="758339ba-dae0-4bfa-8386-eb9810e2a43e",k.Horizontal_dorm_267="c887bac4-d4ee-4a63-9e9d-207c3f2c8420",k.Horizontal_dorm_268="a55cf486-c143-4406-a132-59386d3d03b6",k.Horizontal_dorm_27="fe46f106-e06e-4e56-97aa-1c64fbcc1e8b",k.Horizontal_dorm_274="02de4e51-c626-4a4f-80e5-402331b19d58",k.Horizontal_dorm_277="9801e032-9d91-4f3b-8d3f-54e1373c81c2",k.Horizontal_dorm_278="68f5bca2-3ee7-41c3-aaad-937e300394c7",k.Horizontal_dorm_279="6964b497-630b-44ba-b93e-7a4c20818638",k.Horizontal_dorm_28="7f8ea2fe-63a0-4c2c-bd9a-742bd79e4b90",k.Horizontal_dorm_280="47f05fcd-8413-4a88-9d00-6e04912ccd21",k.Horizontal_dorm_281="175cb876-a722-4934-8f97-525a271f4c62",k.Horizontal_dorm_282="fd64a898-6c3b-493f-a70a-a618395e29f8",k.Horizontal_dorm_283="fcf1cb80-65ef-413c-8ae5-075a1e55c537",k.Horizontal_dorm_285="2082c827-b38f-4846-8190-d5011b828475",k.Horizontal_dorm_286="8afe42c4-00c4-4fba-962e-cdcaf27eb59b",k.Horizontal_dorm_290="41207e4a-ca39-4757-b224-08c12f9a7e8b",k.Horizontal_dorm_297="d8b9f48d-b7f2-48fb-8c4b-30d4884fb6e3",k.Horizontal_dorm_298="1a2a626b-3b5c-4fdf-ab2d-ab3f1b096c42",k.Horizontal_dorm_299="55898a86-4dcd-4a89-88d6-bc2901658c40",k.Horizontal_dorm_3="f4f80d4f-804e-4b51-9e73-91aa7b83165f",k.Horizontal_dorm_34="be9419d4-490f-4adb-b377-b277ddc90b96",k.Horizontal_dorm_40="2567e0b5-d3ad-4ee4-a083-a02d58bec384",k.Horizontal_dorm_45="5fa04498-0fe4-4cb8-9a03-a53e831c75ba",k.Horizontal_dorm_49="a495ee8d-8151-49d8-a835-3ab3cdf9fcd4",k.Horizontal_dorm_50="779991d4-6f3c-4f98-9a91-eb13789c8cf1",k.Horizontal_dorm_51="b0114f95-dc4e-4239-8434-a36f540e0fde",k.Horizontal_dorm_52="440391d5-d582-4568-8464-0793db60a236",k.Horizontal_dorm_54="3beb9f5f-909b-4830-9be1-31540c50d1c2",k.Horizontal_dorm_56="e2671f34-2ad8-4d2e-9a22-79544205d4bc",k.Horizontal_dorm_61="1d87cba7-b31b-47ab-90bb-f74b6ab5c913",k.Horizontal_dorm_62="7df441e2-706f-4afb-831a-35d8f6410dce",k.Horizontal_dorm_64="9c8ce85f-83f4-43f9-87c7-a6a93393953a",k.Horizontal_dorm_65="ab805745-7bb4-44af-b8a2-bdef3e153d90",k.Horizontal_dorm_66="9a8bcb6a-178f-49b8-b27a-0a3f4fba909d",k.Horizontal_dorm_67="8f5390b9-10fd-42c6-af7d-e50c888a521f",k.Horizontal_dorm_68="efd4f13c-982a-4f03-be5e-ba1ecbd74e02",k.Horizontal_dorm_69="e41f9160-40e6-4eae-a318-53cf14ef0b0e",k.Horizontal_dorm_70="c495bba3-56de-401f-a312-58563252f2be",k.Horizontal_dorm_71="af9e4ba7-92b6-4e9f-9c4e-8370a322db6d",k.Horizontal_dorm_72="cf5f0af7-1e03-432b-9e73-8e96e131725a",k.Horizontal_dorm_74="208ea701-8c1e-4b22-b6c9-60891bd25f57",k.Horizontal_dorm_75="40c4de48-b4d8-496b-bc4f-fc62d9cc809b",k.Horizontal_dorm_76="93832f84-b7a7-4e67-b403-d87f142b9c60",k.Horizontal_dorm_77="bb74bc98-ec9a-4173-a1f7-e538726b5cd5",k.Horizontal_dorm_78="244011d8-4ade-4f78-a091-f4f3e1bc3595",k.Horizontal_dorm_80="bfdd0168-a940-442f-8f1f-2586e6d48c0c",k.Horizontal_dorm_81="7b568b02-986d-4158-8947-450e69fbbe63",k.Horizontal_dorm_82="632d2b88-c4b7-4f15-a194-b0943df580eb",k.Horizontal_dorm_83="c10bcdb5-e7d0-42e7-962a-884e69c0750d",k.Horizontal_dorm_85="79effc72-97c8-48c7-9ad8-403e3bd69c28",k.Horizontal_dorm_87="efaf9d94-f0c4-4d36-a5f9-653085b1fe64",k.Horizontal_dorm_89="0f76710c-ad30-42b0-bb43-7c61c6779d8f",k.Horizontal_dorm_92="53a8041b-81be-4771-9df3-9db31e4ca038",k.Horizontal_dorm_95="53d78e92-2d61-4948-81dc-6a7cbd9d8b82",k.Horizontal_dorm_97="b9176e85-e6ec-4bc0-870f-24f140d30b0b",k.Horizontal_dorm_98="332e3c65-ef94-427a-bb7d-a2e76b93f7bc",k.Horizontal_dorm_99="ac74b874-b0ca-462e-bae6-902307dba629",k.House_all="8329a62a-f931-4c62-9068-ae0949d552fe",k.House_design="68ea7a1b-a783-4704-804c-b35aa009a2c7",k.House_lock="a555c608-92c6-4390-a63c-424c44b859b8",k.House_unlock="461db3e8-ab08-4a4f-8694-66a698c8b683",k.Howard_cornelius_portrait="2117cdc5-e324-43f9-8795-64f08208fbcd",k.Hud_after_school="a4b76834-dd0e-49df-984a-d33fe014f383",k.Hud_after_school_circle="9f3fcd8e-abc8-4138-a48d-94ccf0680f29",k.Hud_backpack="932d246b-c406-4781-81dc-f4761ceb97b9",k.Hud_burger="b074e226-1fa6-4f14-bbf2-8668776b21ac",k.Hud_button_basic="c409ff1b-2724-42dc-b3c2-8ce863462b8d",k.Hud_button_basic_noshadow="cdb6a1b3-13c0-49e5-8188-26b3fae2b1e6",k.Hud_button_basic_noshadow_pointer="b49e34ad-5d58-4572-8a3f-0bb160196023",k.Hud_button_disabled="5bb8ae7d-2f3f-410a-a0cf-23e4a692595b",k.Hud_button_hover="213c588e-235e-4ab4-801a-f3a892edeb24",k.Hud_button_pressed="c64ce51a-2d0c-42a3-be18-964cd82f900b",k.Hud_calendar="a62096ab-ae16-4cc4-bf92-2dfeaad9e1f6",k.Hud_chat="097bf81a-9354-4837-a7fd-5d07463e8809",k.Hud_core_membership="5c233329-4c2d-4589-a7b5-be79087e7e16",k.Hud_daily_goals="b5db5845-13c6-4ec1-92cb-e81cd3b1e8ad",k.Hud_duels="c67d47dd-322d-45eb-b3dd-175bf71e53ef",k.Hud_free_membership="66eec2c1-e4df-409c-8a68-7c581ce2bb05",k.Hud_friends="ab57214a-ee29-4af9-bff7-a9b5c133e730",k.Hud_gift_no_shadow="a1af25aa-ab1d-47c6-8840-66d1e860013d",k.Hud_house_edit="a088c398-06c5-4899-87d0-a72bbd2f454d",k.Hud_house_exit="2949c8c6-3d9c-4bef-b434-d9d75dfab75b",k.Hud_house_info="decfb13a-a7ee-4d42-82aa-b3a41cd29741",k.Hud_house_locked="ea98ef3c-7d8d-4a99-8edc-47bcabd72052",k.Hud_house_unlocked="23550ac0-65c3-423c-b94f-5b24175b436e",k.Hud_leaderboard="123a9839-b689-4fa8-bf6c-4cb850c18ec6",k.Hud_mail="371de630-5798-45cf-a7c4-50a713c7f1a3",k.Hud_map="6b825a7e-fe52-4bb5-82f0-cd1b448b4eb0",k.Hud_moonlightfest="d8688b4f-a712-4edf-b481-b1f4cf93cad7",k.Hud_parent_gifts="eb9a2046-45c3-4f78-a6ae-71df128c85ce",k.Hud_parent_gifts_circle="922ac122-1c06-45c0-89e8-452b7474ca3a",k.Hud_pet_center="df157576-5715-4af1-8f6c-b30a3388bd76",k.Hud_pet_list="81e04a02-9792-4886-b513-0ae5307e6642",k.Hud_pets="2bd3e716-979f-4018-8407-d959230736fb",k.Hud_plus_membership="5a68a494-0005-4063-b9ac-826a6b005dad",k.Hud_pumpkinfest="21dc2c6c-5441-4b1d-8e7a-a4541a3234a4",k.Hud_rifts="7c85a67b-dd5f-441d-a988-63a9fc186f58",k.Hud_secondary_button_hover="56d1d4aa-6021-49d6-be58-eeb90e6469b5",k.Hud_secondary_chat="5bf2c427-cd0e-4cac-a5e9-4eaf4603f593",k.Hud_secondary_mail="3b07065d-6123-412d-b793-a6d8897342e9",k.Hud_secondary_settings="650f430d-db07-434a-9513-5234e64adc00",k.Hud_secondary_social="b24f9c77-752a-413d-b0c0-b1695eea6de3",k.Hud_secondary_wizard_watch="ad99cc89-6912-4fb7-949b-f5a3f09bfc26",k.Hud_settings="234ca838-35f1-49fe-82f2-bf382624537d",k.Hud_shop="d4dc7070-8a0c-47ba-a2ad-36de33ab6531",k.Hud_speechbubble="7259de72-0aeb-422d-b16c-6c55b8eed073",k.Hud_speechbubble_wooden_tail="39eee527-fbeb-4e21-ab17-5170bc41414d",k.Hud_springfest="430decbd-3bdc-45d0-b918-4bddfa51f3d9",k.Hud_starlight="3127572c-d12d-489c-ba30-e9c11c14043c",k.Hud_starter_pack="790b98f1-8863-4765-b87d-0dda2c364772",k.Hud_state_challenge="7c572625-7025-47a3-9b4f-e7cf6093556f",k.Hud_state_challenges="60c5cf92-41a2-41d9-bbff-93803d411c63",k.Hud_summerfest="b39f5edc-ad0d-424a-ac87-83a220db0354",k.Hud_treasure_track="5164fbfe-17ee-4def-9157-678de69a623a",k.Hud_treasure_track_big="aa6673a2-b225-4046-be6e-df593a578be9",k.Hud_ultra_membership="5991c63f-4d9b-459a-9cb6-317bff008268",k.Hud_winterfest="20b8c197-2f21-43d6-a4a1-cec9e216bfed",k.Hud_wizard_dash="db3fe015-bc76-4737-8550-68bce8ec631c",k.Hud_wizard_watch="dea91059-3077-4589-9dcc-47b227862a7a",k.Hype_ww_thumbnail_1="9b375c1d-12b2-4f01-aed6-fa3a8f9f9284",k.Hype_ww_thumbnail_2="17d8d73e-e2d7-444e-8794-840ad8559293",k.Hype_ww_thumbnail_3="ab7683bb-1cd9-407d-84ac-cb3a5355dd4f",k.Ice_tower_beta="476a3de5-cb74-47c3-be89-43b8505bf84d",k.Icon_badge_value="5cb18513-069c-4570-9360-87269b91700e",k.Icon_boots_1="3331d7af-ef8f-4056-b85f-60624648b810",k.Icon_boots_10="2c0e8a9a-a67c-40ec-bb14-6810faf3b324",k.Icon_boots_102="6d35ac85-e458-4a8a-81bb-8c0c75304f40",k.Icon_boots_105="71194da5-18c8-4bdd-b4bd-1d1ba8e52771",k.Icon_boots_107="803b8e04-fbad-42b7-9760-aec7916f56a9",k.Icon_boots_108="77add4b7-da51-4bae-b81c-1736865fbe82",k.Icon_boots_109="635106c2-09c7-4778-8887-932be294392e",k.Icon_boots_11="bfec3231-b023-4841-ae59-09c3887e7c32",k.Icon_boots_111="79007e87-8669-4c8f-8386-e97d6ebd62c1",k.Icon_boots_112="dfb3733e-604a-450e-856f-acd34e5e2ddd",k.Icon_boots_113="83cdd5d7-ef62-43cb-ab96-162cdcdb145f",k.Icon_boots_115="b111173b-9cba-4bf0-a17b-decc32adc383",k.Icon_boots_116="187350d1-2c6d-447b-bcb5-84ff3c392dd2",k.Icon_boots_117="8c245114-dd00-4e20-a9d6-266d8655e3cb",k.Icon_boots_118="c28e8d76-4342-44e4-af9c-a8458e096024",k.Icon_boots_119="002390fa-9bb8-4ca0-a252-a6815458ae62",k.Icon_boots_12="5d5f3ab8-e39c-47fa-9e09-e70b9815c007",k.Icon_boots_120="bbc9aeb5-a361-410a-91c7-2c37f3836dda",k.Icon_boots_121="6b084311-9b91-45d3-a71c-5f6442ceb78b",k.Icon_boots_122="a3309afb-8b2d-4b32-b556-2e92a81295c8",k.Icon_boots_123="876237d7-45ad-4890-b985-939c6b757bf1",k.Icon_boots_124="fc85da64-a320-4a03-adeb-df10682f461e",k.Icon_boots_125="1b90ea12-5066-4cdd-a4a7-d0e6ce4094b2",k.Icon_boots_13="b1ca330c-ab05-4d60-ba2b-acdf207c4bb7",k.Icon_boots_130="fc65f973-c1ae-42a0-aa2b-461edfa08564",k.Icon_boots_131="3690b1ef-ead2-49a0-99d5-0544a3c4d31d",k.Icon_boots_132="6c07474c-2c4d-452f-9ef0-b530467bc95f",k.Icon_boots_133="5ef972d2-9eba-4e34-8659-43abacd5403e",k.Icon_boots_134="02f0af6c-85f4-4a66-b40e-c48d498512db",k.Icon_boots_136="af191e9d-fa49-4dae-8ab1-16c8253690bb",k.Icon_boots_139="f2974935-1c33-42cf-ba01-c0d1c3b2b7a7",k.Icon_boots_14="f6fbf4b8-3066-4cf9-bc13-1cad0a6e21fe",k.Icon_boots_140="03cebcd6-79c5-4333-9f2d-437b7ae754d8",k.Icon_boots_141="94f2816b-188c-4c0f-b066-d7175d9511cc",k.Icon_boots_142="2895fa5c-9f67-4e6f-9f67-7ae8345c60a4",k.Icon_boots_143="98e7fd5f-93be-4d0e-8f5f-2db7eb9e9219",k.Icon_boots_144="c88002bc-212b-43e7-8253-e4984bac1987",k.Icon_boots_145="76be5c56-c049-4177-a0d5-40e9dbfc43a6",k.Icon_boots_146="8b530038-126a-4eea-af27-e3ec59428edb",k.Icon_boots_147="45f3d5ad-adf1-4645-adf7-fb247f6dc0cf",k.Icon_boots_148="94ea8a8d-ceeb-405e-b71b-b7e727bc79cf",k.Icon_boots_149="a372ae5d-795d-47ce-bc08-93f45ffcb007",k.Icon_boots_15="cd47f348-6e2b-486b-8b73-0bd625d948ad",k.Icon_boots_150="5a8d2396-e548-48da-ad90-d75fcd85b593",k.Icon_boots_151="ad9c5ba0-b239-44bc-82ce-5bf584eafe72",k.Icon_boots_152="52f35c99-58de-4189-ac88-3966efc8ddd7",k.Icon_boots_153="d7ed7904-fbc6-424b-9301-d8457439ab71",k.Icon_boots_154="b63e8c56-bd36-4e39-b4a1-e9cdb878dc78",k.Icon_boots_155="018dbe24-1326-4b69-bd6b-53d8db388e1f",k.Icon_boots_156="af35230d-14e9-4a8a-abfa-73c589dcff39",k.Icon_boots_157="bca71d2a-1cc3-4358-ad8f-77d6e8388191",k.Icon_boots_158="ae2ac911-7a9e-4128-ac5b-4f15ace418e8",k.Icon_boots_159="2fc4ce7a-2844-4ccd-92da-09d1605d3064",k.Icon_boots_16="59a422c2-8a7e-4a86-ae0e-a497d523d7aa",k.Icon_boots_160="ecf40250-b27b-46d8-af49-cb3f2d53fcd9",k.Icon_boots_161="6441df81-db9b-49c6-96f7-d5987faf3347",k.Icon_boots_162="40bf870f-9947-4b9c-b680-62fd94d403f0",k.Icon_boots_163="3b9f65b9-122f-4aa4-8435-eacd13b1cb51",k.Icon_boots_164="61e37abc-12bc-4c98-9446-d398103fbe76",k.Icon_boots_165="ff319f1a-53fd-4f98-a554-0df2e34301bf",k.Icon_boots_166="3c68378f-833d-413d-a662-d0d19f1112db",k.Icon_boots_167="76b99dc0-504e-44fa-8c9f-8836a5613055",k.Icon_boots_168="065c690f-7c21-41c1-8173-6451a971b688",k.Icon_boots_169="1a319090-f183-484f-9067-bc9d4c8b6304",k.Icon_boots_17="024bde04-5c3b-41e9-a4c1-016aca03a59d",k.Icon_boots_170="34dc2a90-83cf-449c-95d7-91eab81fa1d0",k.Icon_boots_171="a3a644c8-c3e7-4ca2-a168-f5ffaf68111a",k.Icon_boots_172="83f8e869-7715-4606-a3b3-be24bbd4b529",k.Icon_boots_173="e53ccc98-1fc0-4328-9ee0-d30232c00ace",k.Icon_boots_174="f37611fd-6603-4cf0-a810-503266a9a369",k.Icon_boots_175="8192f725-c5c2-418b-ba10-569f01c84d62",k.Icon_boots_176="abc15823-16a4-448d-b9b4-c3cd5ecb61d2",k.Icon_boots_177="e316a826-8167-4994-9503-84169582a169",k.Icon_boots_178="40d0ecd6-9351-416b-831f-f2bfec93b6d6",k.Icon_boots_179="fc96e021-cf53-47e9-8e70-398372358254",k.Icon_boots_18="df371911-785f-43c4-80a6-dc127e1ea9c3",k.Icon_boots_19="90d2c27f-e8a3-4da1-b293-9ed6db10b34d",k.Icon_boots_2="c7a3c52e-70cf-40dc-8d0a-6d56e930b9a2",k.Icon_boots_20="95af6f39-6b74-45f8-acdf-a2f90dcadb16",k.Icon_boots_21="fffe727b-2413-4812-b172-938112687bfb",k.Icon_boots_22="c55dff47-86ad-4e8e-a426-317a9ffa71ea",k.Icon_boots_23="6a751d69-2606-4104-8f4d-7b63b2bc2b6b",k.Icon_boots_24="9d0fa279-4d87-4fad-bbea-d19251748950",k.Icon_boots_25="4003e3c2-471b-4106-8de8-f541bb0c4f11",k.Icon_boots_26="64a26737-11d2-4289-9173-b84b24e389a1",k.Icon_boots_27="959a8678-e3e5-4220-b385-d5854d4eca53",k.Icon_boots_28="5efb2ea1-59a7-4c4c-bf31-63d7488bc497",k.Icon_boots_29="6af3f4bf-d8a8-4739-a399-9c769907ad22",k.Icon_boots_3="00fd52ff-82f8-4ed6-9b8e-c9fe1aaf964e",k.Icon_boots_30="8b30c1a4-fff0-446b-b131-5f31844f2ac2",k.Icon_boots_31="b720e976-4a36-4a1e-9eae-ab5a5b3f7976",k.Icon_boots_32="8e274f61-12b6-4d19-9c68-fb4567d08bec",k.Icon_boots_33="58c24e2e-e8af-4d52-bb1c-cbf45bee31c7",k.Icon_boots_34="70422a49-fdf2-4223-80ac-b7d7f95b746c",k.Icon_boots_35="ce5bcdfc-913a-40b7-ad71-61a3d736c2a9";k.Icon_boots_36="690abc6d-3f4f-42b1-87de-66043eaa1fba",k.Icon_boots_37="f6f9aa25-e066-47b3-a910-75e6b11a6365",k.Icon_boots_38="9706b890-f8f3-4066-bad3-a5f5007633b0",k.Icon_boots_4="a288b678-4c29-41aa-9a5c-ab1ec74236ef",k.Icon_boots_40="eb064543-2ea4-4f07-9af1-75063171c0b0",k.Icon_boots_41="b91e00b0-cd0f-4269-8ee6-7868030d9361",k.Icon_boots_42="7b490110-7508-412d-9155-0b5e00e6a288",k.Icon_boots_43="75de5ed5-c372-4d45-815a-4b2c63f917ed",k.Icon_boots_44="1d247ea6-d0f1-4dc6-8576-eab09e6d5c91",k.Icon_boots_45="a83e679b-14ef-4225-9d2d-bbf4ab508e4b",k.Icon_boots_46="f410179a-d1dd-49ee-9908-f71ad7b9204c",k.Icon_boots_47="3c3d1514-2cec-43f1-828c-0263f0e431f5",k.Icon_boots_48="6e5f9b89-780c-4047-bc6c-b2bada430c1c",k.Icon_boots_49="501c1a9c-ccc1-46c8-80fb-95e80eb91003",k.Icon_boots_5="78871012-9e2c-430c-a9e1-e75e9ce8c63c",k.Icon_boots_50="5ce308cb-7e67-4be9-a207-ee7586bbb19c",k.Icon_boots_51="a33c4714-65b6-486e-ba23-a59aec9c0313",k.Icon_boots_52="83084b5e-1525-4574-8f2b-b7441edd763b",k.Icon_boots_53="132c448a-843a-49fc-a4c1-488be92ded26",k.Icon_boots_54="6118308d-34ac-496d-985d-53d9a79965c2",k.Icon_boots_55="851bbb97-e251-4753-87b5-6428798bf7cd",k.Icon_boots_57="76d31f6f-d47e-4a75-bd12-18b729dca44f",k.Icon_boots_58="2b0a3982-dda5-401f-8d95-cdcb8aaaced8",k.Icon_boots_59="84136ee4-54af-4561-b513-cb1dc0d0899d",k.Icon_boots_6="0340ccdb-9a19-4095-80e0-05501fa8d8e8",k.Icon_boots_61="f56939af-d7a3-4a29-b274-6b87e6ce0721",k.Icon_boots_69="7df5bdca-5dfa-4614-8384-7ff48d921c0b",k.Icon_boots_7="d66c9761-427b-4291-9953-f305ffab02ad",k.Icon_boots_79="45dff960-7d87-45d8-ac2d-75970825db68",k.Icon_boots_8="ade2a175-4d80-4405-8c49-fb1a4a0b0f3d",k.Icon_boots_80="a81e3796-44f4-4091-beb2-76b5102d28ad",k.Icon_boots_81="316f8bd5-b4da-470c-a641-1fba8354eb69",k.Icon_boots_82="51ac1905-eb17-4220-bdb3-39ebf14ff1b4",k.Icon_boots_83="54796d93-ebb3-40ad-b7a1-45232da59f2d",k.Icon_boots_84="093432ac-820a-427e-8cbd-daf8c32a7596",k.Icon_boots_85="22efd162-d646-410d-8409-741862fddb65",k.Icon_boots_86="3f74d53c-99be-4280-9700-9dabd2cda01b",k.Icon_boots_87="0196f999-1745-4035-8371-9ec4d34cd7df",k.Icon_boots_88="91f07df3-9d0d-46b9-a36d-bb8c413f87d1",k.Icon_boots_89="9f8ff43b-38ef-4c79-b301-2899dc69f411",k.Icon_boots_9="41330ee6-d85f-4fae-aa8d-18cc3f59cb03",k.Icon_boots_90="14d94e35-aaff-418f-89af-682ba82f685a",k.Icon_boots_91="a878936d-b447-4b04-a539-0a79941cc778",k.Icon_boots_92="78244a46-49d7-4dc0-b531-2c88682e8bfc",k.Icon_boots_93="f7e06c5c-4b27-4382-a65d-51dd3f6a2d35",k.Icon_boots_94="1ef3d001-b67c-4bfc-a18f-37287bb3db05",k.Icon_boss_buff_critChance="04d10245-5625-4599-9d5b-6b8f59d85e75",k.Icon_boss_buff_critDamage="a1c2e832-e430-4852-aad9-8280d0dff660",k.Icon_boss_buff_crit_damage="ce614c5b-f4d8-4f1c-ae53-e4fb19124b59",k.Icon_boss_buff_damage="6eb9f539-0ecb-47d7-a30e-bb27d839917a",k.Icon_boss_buff_damage_reduction="2df6b18f-0d0f-4f9c-a9e0-57e7ce439d71",k.Icon_boss_buff_elemental_bonus="480ea338-5fbf-43fe-9ce7-58f7eabcbb8a",k.Icon_boss_buff_health="3c95b279-86d0-4758-a7b3-b3ea5241731d",k.Icon_boss_indicator_rits_locked_tier_1="1b0fa381-13a1-4272-9e30-94a01d5ea91f",k.Icon_boss_indicator_rits_locked_tier_2="83bea1d6-a746-4dd0-9a35-f2c60e39a7e2",k.Icon_boss_indicator_rits_locked_tier_3="a9669bf5-561d-400a-a899-53503a1287bb",k.Icon_boss_indicator_rits_tier_1="09ee7887-6840-4326-8ee9-e2d6cb8fbe4b",k.Icon_boss_indicator_rits_tier_2="336815fe-e678-4e41-8507-4b1ac8549487",k.Icon_boss_indicator_rits_tier_3="c1a47291-6763-4092-bd32-f63c0d66fd3f",k.Icon_boss_indicator_tier_1="595dee07-d43d-4d4c-943f-1e53e6e2521a",k.Icon_boss_indicator_tier_2="74fa2647-be61-4d47-828f-1be165f8ff8b",k.Icon_boss_indicator_tier_3="71516abb-1a27-4c0f-afe4-d8574b0b61d2",k.Icon_bulb_filled="851184f4-62b1-4a37-8921-a1703f432131",k.Icon_bundle_5="3f9f728f-864e-4ee7-9279-456da392f0d3",k.Icon_bundle_6="e443501b-d645-4638-a2b9-1d78330ebc80",k.Icon_bundle_7="26581c16-cb1f-4350-a1f5-968fea4653d0",k.Icon_bundle_8="bd9b4e12-cf8e-4a0b-85f2-4c9df6661011",k.Icon_bundle_9="24510618-6221-46a0-899c-ea9ab5447af9",k.Icon_celebration_pack="4d6c19d5-149b-4033-bd49-57a3ba3d943e",k.Icon_charged_levels="90c2a5f6-58d6-455e-b92b-7b03d3928e97",k.Icon_coop_quest="6effb0c2-e1ce-4742-a77f-a9e1b6b39b71",k.Icon_currency_1="009e0aee-98b6-4baf-af34-68036b15ac4e",k.Icon_currency_10="cf72b35f-ea03-43b6-8ae7-a87a9ccbed04",k.Icon_currency_11="489b9378-928e-4693-99f3-c2ab011a3f3b",k.Icon_currency_12="2bf687f7-1309-467e-8207-8be4b5d76b75",k.Icon_currency_12_store="c1606ebd-d321-47d2-b13d-6be7c8239592",k.Icon_currency_13="9d238336-2b74-434b-9d18-ddf5152bd0d6",k.Icon_currency_13_store="5b9315bf-1b28-4807-b354-7c47f7d94646",k.Icon_currency_14="2fec2133-84a2-4c44-b484-f1c444472c93",k.Icon_currency_14_store="a4eb2352-8a0c-4561-89ca-a20fb11f2c51",k.Icon_currency_15="c253b0d8-1991-4333-84d3-cdba9ec361e3",k.Icon_currency_15_store="6af3fbe9-bc5a-4292-9d9d-53757587b82b",k.Icon_currency_16="4d6ae2bb-53fe-4f38-b65e-e22911758401",k.Icon_currency_16_store="e60473b8-2c84-4caa-8995-8977199f1ee8",k.Icon_currency_17="7ddd6ca1-888e-4b5e-bd36-c6c63ae769ff",k.Icon_currency_18="99839edd-7a0f-4e2a-a461-1e1b066f6252",k.Icon_currency_19="687dda2a-4afe-4aa3-bf75-b2b6e2f4d0d2",k.Icon_currency_1_pile_small="1d53f730-a8a6-4730-a450-a230f0584730",k.Icon_currency_1_store="519749d7-1737-4e2c-b86a-f8f40fec6d93",k.Icon_currency_2="585415e7-27f7-4cbf-aee2-b004a2bf082f",k.Icon_currency_20="452cff58-333b-4551-91b6-077628cf606e",k.Icon_currency_21="dd01fd90-3e73-41df-bab5-08e5bac466f5",k.Icon_currency_22="cce27a2d-ecf0-412b-b15d-f96c98bc8ac7",k.Icon_currency_23="f842a4cb-f901-462b-bba3-95a0da64f940",k.Icon_currency_24="0dc3e45c-43ad-4757-9580-ae5faecc3642",k.Icon_currency_25="55572369-4374-463a-b50a-13fa8b3c7641",k.Icon_currency_27="ff14ee8e-111c-48e3-ae1a-faef2cfcb5bb",k.Icon_currency_27_pile_small="4e6b380e-a9d5-4636-a695-a977ba965ca7",k.Icon_currency_27_store="c7210eac-b11e-4e6a-9b2b-ed1973bae72d",k.Icon_currency_28="afe4aa69-e318-4353-8069-e35a24f2bd0e",k.Icon_currency_28_store="97641576-f84d-4096-bce6-a182d9995be8",k.Icon_currency_29="c5ee3a7e-7d15-4806-b40d-ab1e8dbed519",k.Icon_currency_29_store="0549ee32-8eeb-4f34-b75a-de2b09f2f28d",k.Icon_currency_3="c69fa292-71f2-48c4-be31-3b4982d386c9",k.Icon_currency_30="830f0d8d-045c-46c8-bf65-9f5ec278f378",k.Icon_currency_30_store="b0f115fb-fc1a-411b-ae9c-89855affbf7c",k.Icon_currency_31="d5e8bec6-1a3b-42fe-be20-e42bf74700ec",k.Icon_currency_4="f8619d29-748c-40a2-80e8-a3e7b0a6fc5b",k.Icon_currency_5="dc0a80b0-c181-4729-859e-9499b8c5cd3f",k.Icon_currency_6="cb24a771-24b3-41a4-8acd-6966d43cfa95",k.Icon_currency_7="1005d9aa-064f-46c2-ab7b-a20816dd890f",k.Icon_currency_8="083cfa85-15e5-4db9-b5dd-f736094332ed",k.Icon_currency_9="7c8369f4-8cb5-4637-a4cc-4ce00d37004e",k.Icon_cutscene="94334d22-2e66-4e4f-a73e-a9a34067068a",k.Icon_dance_1="e269ddff-67cc-44f5-9462-4feddaee73c1",k.Icon_dance_2="485aedd2-fbb2-4202-b122-fa446ccf49ff",k.Icon_dance_3="9666d73d-5c6e-4b56-aabb-86903a9c91d8",k.Icon_dance_4="a4ace528-0a82-4f63-a03e-12f5f733c925",k.Icon_dance_5="aa681ddc-f01a-4dd6-8f19-b5971bfa88c7",k.Icon_dorm_1="aa7f4ee9-28b4-4d8a-83fe-f73feca2e864",k.Icon_dorm_10="566cfe77-6392-4531-b10b-7010fb2f10ad",k.Icon_dorm_100="7b0cb93b-be6a-4510-8ec1-594cbd9bd027",k.Icon_dorm_101="7757e6df-ef07-4bcb-a68f-1a1605b8fcc4",k.Icon_dorm_102="2890f1ef-41de-43f3-9c88-9e3facd5eeab",k.Icon_dorm_103="1095d888-4043-4041-9757-69b0b21d7211",k.Icon_dorm_104="22c925e1-39fd-499f-8809-3ea8d3d36555",k.Icon_dorm_105="758c89dd-1f72-497e-ae89-528217f1a664",k.Icon_dorm_106="278c74d4-1d31-47ea-b815-23d4e45f1597",k.Icon_dorm_107="382c0a59-2a95-4904-bd82-422d40be061f",k.Icon_dorm_108="9ae1ea1d-8285-407b-9981-82d042182dc4",k.Icon_dorm_109="20e3ae3b-7535-4ba7-8f32-e399d266ff04",k.Icon_dorm_11="826ae11c-21b8-474c-8e04-49663f4b80a6",k.Icon_dorm_110="e052cae5-b676-4148-9b43-23b01efdbcde",k.Icon_dorm_111="1b1a36d5-d960-4d60-a90e-c3d4d72f0503",k.Icon_dorm_112="9562cdc2-85b8-4065-a801-7c6d57a67cf2",k.Icon_dorm_113="8da8e586-01ca-49d9-a5a3-c927a67c9972",k.Icon_dorm_114="485372bf-2070-41d3-8fa6-4472a898c296",k.Icon_dorm_115="35d663f7-e95a-435c-8cb3-b954096396b9",k.Icon_dorm_116="d758321e-d3bb-4484-82b7-d7eee17917e2",k.Icon_dorm_117="1792379b-7fa7-4d6d-a7c3-65197a86d789",k.Icon_dorm_118="939cb1d6-b48b-4dd1-9b1a-d016d95dfb73",k.Icon_dorm_119="2a5a6d50-87d5-4d56-b8e0-23aba9b67967",k.Icon_dorm_12="fa9dd6a7-5d86-4095-afe7-d20def63d772",k.Icon_dorm_120="ec2ab317-123f-443b-874d-acdc064322a5",k.Icon_dorm_121="0b7b6db2-577f-4b31-99ea-593e3565d3be",k.Icon_dorm_122="35949641-2a4c-4032-ad03-b98f55fdcc76",k.Icon_dorm_123="ff03838d-7a7c-4f86-beea-ba3d7eb37330",k.Icon_dorm_124="8952ab41-aec8-43b8-831f-a854dbe741cf",k.Icon_dorm_125="cac953fb-635c-4f4d-996a-697659542e6c",k.Icon_dorm_126="dbf5c182-f24c-4d71-9f55-2aaec0dc0f79",k.Icon_dorm_127="76314649-a055-44fd-bb59-88c293cef230",k.Icon_dorm_128="88235b33-821a-4f85-9103-8ed4b24e8728",k.Icon_dorm_129="11202ea7-b4e9-4ea4-a8bf-e386083cb32a",k.Icon_dorm_13="a69be307-85df-47b6-806b-b0e334af4866",k.Icon_dorm_130="ef91101f-6f01-4050-9aee-300b8aa43b2a",k.Icon_dorm_131="fcdd2727-adc7-4619-a59e-44da4fed7a22",k.Icon_dorm_132="2f2ed32c-7d44-42f6-9130-bfda57cd3310",k.Icon_dorm_133="95deb4a3-7d2a-49ca-8429-10e122010c10",k.Icon_dorm_134="3097178d-ce76-48c6-9038-562958c0190b",k.Icon_dorm_135="caf0d18b-fd77-44ab-9ab9-5571c3004592",k.Icon_dorm_136="354a4caf-0c65-4bf9-9851-cf638f51b5ba",k.Icon_dorm_137="e1300a0d-d09f-4ae1-9c79-3ba932b4fa2c",k.Icon_dorm_138="a9e72600-9f75-4a6f-8b37-8ca116c0bd5e",k.Icon_dorm_139="dac98d78-8142-4ad2-b74b-e1f7c45adfa4",k.Icon_dorm_14="c75209e2-78fc-42ac-9586-637735cba027",k.Icon_dorm_140="89919009-4113-4cfe-8135-fceb4c70c27e",k.Icon_dorm_141="ecadaaae-6571-41ba-a3b8-90fd7cc2150b",k.Icon_dorm_142="c2c1807b-05e1-4cb7-9ac1-94adbd3ce872",k.Icon_dorm_143="ededcda0-c5d6-4ca4-84c2-acc44fc1d66f",k.Icon_dorm_144="74ea9a6d-a6c8-436e-b7bf-9802c80bbad6",k.Icon_dorm_145="89f12281-2db3-45dd-8c1d-d87e9c65f30a",k.Icon_dorm_146="760c8386-b0c3-4dd8-95fe-5ad8f2ede76c",k.Icon_dorm_147="4aa7c2a2-35f1-4a16-b096-4188ad74b082",k.Icon_dorm_149="f5a774e2-0977-4b6b-8844-b045a5077f30",k.Icon_dorm_15="42755ace-3575-4b1a-8316-f11da02a7722",k.Icon_dorm_150="3b8f6fad-d717-4552-98ad-59190fab336e",k.Icon_dorm_151="e63ae07e-f881-4b1d-9631-53a5ad744c40",k.Icon_dorm_152="20838d8f-e8e6-430f-8a77-f34f21c0634c",k.Icon_dorm_153="75d2bc65-2d14-424a-a6c0-e2f936e6389a",k.Icon_dorm_154="ecc70da6-8ecc-4662-9a22-1fc9e3f4bd04",k.Icon_dorm_156="16a97f29-6acd-4772-b101-ee69014ab19b",k.Icon_dorm_157="0cb603a5-1c4c-48fb-a58a-6700c7a2281d",k.Icon_dorm_159="bfa136a8-b40a-451e-bf54-33e69cefa601",k.Icon_dorm_16="a2868ae9-d139-4776-af73-33ea7326c237",k.Icon_dorm_160="f0ed6ef7-e78d-4314-9054-c4a6493a837a",k.Icon_dorm_161="a0ff0705-652d-4eb1-95e0-d418fdabbe00",k.Icon_dorm_162="0b6252f4-de5c-4289-bde3-dfd4a7babdb6",k.Icon_dorm_164="befc6570-1d28-4a10-9930-8872ff3064d4",k.Icon_dorm_165="eea7db40-c9a0-42a9-b73a-d5a7050adaaf",k.Icon_dorm_166="1c2f7110-3bf6-4710-8bb7-6bebe1753d0f",k.Icon_dorm_167="56918c80-2dc6-4d9b-a91d-e883431901a8",k.Icon_dorm_168="a104a092-3741-42ac-a032-3c1eae7fff15",k.Icon_dorm_169="d85b6ca8-2870-435a-a033-4350050a187b",k.Icon_dorm_17="bd513839-8be9-495d-ad61-4e28b69bea34",k.Icon_dorm_170="aca2f7e3-44c9-4007-8750-ac05e9a15e50",k.Icon_dorm_171="bf6b2d89-d7cd-45eb-a64f-d8072fa75e3e",k.Icon_dorm_172="1cdc5c8d-a245-4b42-ab3a-c3c0b0dacb4d",k.Icon_dorm_173="4b46ccc6-528b-4e47-b81b-65f9ba28bdb3",k.Icon_dorm_174="a2135da1-9169-4a60-8c32-ffa4827c36fa",k.Icon_dorm_175="8f41b335-6b4c-479f-8984-eb071fac9eab",k.Icon_dorm_176="b1d3b659-d544-4298-9010-968aa90d1f70",k.Icon_dorm_177="faadbf55-48fb-41be-98be-4b61e7e1463a",k.Icon_dorm_178="8e927752-0bbf-40e3-8c9d-6c355d4cea3c",k.Icon_dorm_179="74212f78-a276-4692-b67a-0aacac0ef3ca",k.Icon_dorm_18="d77fa9bb-db19-48a9-89e5-cf1e30e68458",k.Icon_dorm_180="af5ed18b-39b9-4797-a85f-02dd9a4928fb",k.Icon_dorm_181="2a976d5d-ccf1-4080-8a6c-9f8413a17602",k.Icon_dorm_182="85fad99a-3bef-4753-bd76-e785a5d7e7a9",k.Icon_dorm_183="3ae81581-eeb4-499d-b6f1-50a9886da1af",k.Icon_dorm_184="d8b7a2b3-eac0-4a6b-8d86-580de332a4ab",k.Icon_dorm_185="2581e0f2-0615-499d-bed1-20da460fa707",k.Icon_dorm_186="ef7f4809-7a66-4b16-b6d1-2e745b713f61",k.Icon_dorm_187="ea21b475-a452-4a5a-8c84-abe486e7724a",k.Icon_dorm_188="734f0d23-8588-496f-9058-008a5aeabf43",k.Icon_dorm_189="67be66d8-caf2-4803-95bf-0f664e227aa6",k.Icon_dorm_19="ce8cf06e-03ea-4f57-8f93-ea21bbd57a3d",k.Icon_dorm_191="0e36e68b-1817-4800-8a36-04d4438cac5b",k.Icon_dorm_192="38822fef-77c9-49f6-ba82-c72ac8095734",k.Icon_dorm_193="f7cf3c38-37ba-4c85-a417-2f3176c5fe5e",k.Icon_dorm_194="52f1876e-9b6a-4761-8d3f-d8171c9b6a62",k.Icon_dorm_195="e73a2520-c3f8-4d1e-9b9b-03fad263a947",k.Icon_dorm_196="cc6d1ce5-5474-462c-bc41-e28e4183b25d",k.Icon_dorm_197="cc0e2f3a-8e43-4085-a628-84bccc05fd64",k.Icon_dorm_198="92fea460-c3bc-4131-a671-2eb7217de4de",k.Icon_dorm_199="ddc55501-b8aa-4315-a14a-71f7d203be35",k.Icon_dorm_2="33d87d88-e274-4613-af34-6263a1ffb8bd",k.Icon_dorm_20="98983e44-74ca-4bfd-b36c-f8f945abae3c",k.Icon_dorm_202="09f73f45-8ce0-4399-b6a9-f07ac7767d17",k.Icon_dorm_203="5cc2068a-4cde-490e-8c94-5bbf8e933387",k.Icon_dorm_204="e819247e-12e0-4c31-b6d5-604af1ac4c24",k.Icon_dorm_205="ad88a984-5658-4066-ba5b-06ad6a506eb4",k.Icon_dorm_206="7c87e059-6cb0-4e3e-b20e-fc57681b0e3f",k.Icon_dorm_207="00f1fc81-9404-4ffc-8eb0-8e93a2c37064",k.Icon_dorm_208="4938553e-955b-4c7a-8b9c-041572832639",k.Icon_dorm_209="be71ba9b-8713-45a1-b3fc-d91a2b7dcd23",k.Icon_dorm_21="d05d41db-d874-4b9d-adf4-93efa8ae8051",k.Icon_dorm_210="97ec5e35-4898-4273-a9dc-9977da8968d2",k.Icon_dorm_211="2dbf2ae2-ecc8-48ca-857a-cc02cc538dc0",k.Icon_dorm_212="82e0bf70-3a07-42b2-b4f9-9bffaf2412e0",k.Icon_dorm_213="b1ef07ec-eff6-4422-9e4f-587da966f337",k.Icon_dorm_214="0eb14dee-4279-48f0-93ca-ebd8ff13df03",k.Icon_dorm_215="ef439b1a-01d3-4547-b961-560fdf2cc00c",k.Icon_dorm_216="0d2d976c-7aad-47aa-8bb6-3e49787725aa",k.Icon_dorm_218="0be13e16-6549-4b2c-821a-05bb64cf3193",k.Icon_dorm_219="23ae865f-fdd9-48c8-ac77-0c1d472957a5",k.Icon_dorm_22="d37ce8c9-ccb0-4366-aac0-586a58944ba8",k.Icon_dorm_220="6b9a9d01-3273-48a7-bdba-2116a3f33f06",k.Icon_dorm_221="024834d6-14e2-4296-8189-04703eec27e0",k.Icon_dorm_222="2707558d-7843-4d2f-9b09-0f40a9506c09",k.Icon_dorm_223="76e88987-a6fc-4c6f-ab55-1c57c270982e",k.Icon_dorm_224="9f7a1514-a344-43df-89da-1815980a4379",k.Icon_dorm_225="6f5970bc-8cdd-41ed-8424-9c23add556fb",k.Icon_dorm_226="2352ac36-e0ae-42a6-9fa4-5e7521a6e496",k.Icon_dorm_227="be64c154-91d1-4c3a-a299-305fe1cfb4e5",k.Icon_dorm_228="c0f84d99-f988-46e4-adcf-41a1621ab756",k.Icon_dorm_229="a2595b9d-f886-4f7c-96a3-9ab6fc40d057",k.Icon_dorm_23="60717c2d-9134-4fcc-badc-a9efeffee090",k.Icon_dorm_230="a44a0a71-9141-4359-b745-f0da21e23adc",k.Icon_dorm_231="20dc8c2a-6f3a-40e9-b65a-03016645943b",k.Icon_dorm_232="51534cb6-4e3b-4f02-8ee4-935279c2f83d",k.Icon_dorm_234="b0e0faf2-32da-47eb-bd72-b8357994370a",k.Icon_dorm_235="b0033c7b-db5e-4728-94c5-938e482784e7",k.Icon_dorm_236="ae1554cb-6c93-441a-9b90-e3056339a9a8",k.Icon_dorm_237="4cc84229-fbdb-4bbc-8695-5609194c169f",k.Icon_dorm_238="91f45467-cfcf-4e7d-bd25-9dcbbe7be08a",k.Icon_dorm_239="10c51d1f-1ee3-4a30-a5b4-83a23cbfc78e",k.Icon_dorm_24="866ed0c4-373e-40cc-bb5a-a49adf7fe277",k.Icon_dorm_240="7cc296b2-cb50-4460-8d89-4c2fd8484097",k.Icon_dorm_241="b2af2c3e-2086-4cd6-ba70-6ad67f71a0af",k.Icon_dorm_242="f4419033-07ee-4e97-acf3-73ada790509c",k.Icon_dorm_243="0a319f96-9d6d-4bf2-81c6-b8a58d66f3e8",k.Icon_dorm_244="d44addaf-d69f-47b2-9245-b0c44dbb8117",k.Icon_dorm_245="32f75fab-d85c-4153-ad84-c3c393f3d8a0",k.Icon_dorm_247="cf356f86-8001-4336-8ff3-6b755e9da836",k.Icon_dorm_248="9f36cfda-65dc-429f-96ba-b29995a9de5c",k.Icon_dorm_249="db8f8044-e66b-481c-ac71-5f365e281b78",k.Icon_dorm_25="355fe7a6-b7f8-4215-81c5-0154ec89ae89",k.Icon_dorm_250="7803336f-3742-44ef-83e6-d1461f2731d1",k.Icon_dorm_251="dc3d45b0-19e1-4c7a-9a8e-d80af155030b",k.Icon_dorm_252="f7363b82-328a-4c91-acaf-29da233eef66",k.Icon_dorm_253="0253600a-c953-45e6-82f5-07f12fafb927",k.Icon_dorm_254="e5be6660-8fd3-4af2-a090-a972fd28dfd1",k.Icon_dorm_255="2d0d6a3a-b132-4aa8-af63-ae0e9ae03569",k.Icon_dorm_256="252dc8cb-2be7-4876-9330-709aa6c310e1",k.Icon_dorm_257="3faa373a-5fdd-4385-91a4-71ccd4960f6b",k.Icon_dorm_258="d877d120-1026-4e3a-930c-c3b2ef6c60e1",k.Icon_dorm_259="89725cf1-f8a6-45fa-9f26-cde21c3f00aa",k.Icon_dorm_26="09f250ac-169e-4e25-aede-82df9748d708",k.Icon_dorm_260="6a70bfd4-403c-43c6-a25c-a516344d688c",k.Icon_dorm_261="5a154161-7a95-44ac-b7af-764e36534138",k.Icon_dorm_262="d770713f-59d1-4829-be9c-e0accc79cd77",k.Icon_dorm_263="de4456a8-dc91-4b9c-b3db-86b188ad7bfc",k.Icon_dorm_264="986edbb7-cb2e-4ad7-a04e-d637107517dd",k.Icon_dorm_265="0d262300-ccc0-4d01-b4b6-ff6d2996d0b9",k.Icon_dorm_266="928ebb25-fa5c-4e17-babe-0f131d84fef8",k.Icon_dorm_267="70e71ff4-6236-4015-9f17-d782b1e9a22c",k.Icon_dorm_268="c616f520-b235-45ef-8bc7-bc1afcaaaefb",k.Icon_dorm_27="ccb870c6-04a3-41a9-9b23-eba642da9b69",k.Icon_dorm_273="25847bff-c240-4c40-ae2e-3c14a304a278",k.Icon_dorm_274="e4acd5b3-6f59-47c7-9a95-9467299eec84",k.Icon_dorm_275="b8fb9c75-6a1e-4733-98c2-dce864a3e1fa",k.Icon_dorm_276="35ba65db-97cd-4dd1-86ed-1e5f33d34ac7",k.Icon_dorm_277="32dd0c62-e3c4-4d11-b648-3d365745c06c",k.Icon_dorm_278="d8329420-b0bb-4181-bd80-b8a957442e42",k.Icon_dorm_279="7fa57898-450e-47bc-854b-b14593878635",k.Icon_dorm_28="86d68f76-ab73-4d24-9375-aeb419389742",k.Icon_dorm_280="e4b9c694-b19b-44fb-a230-43334882dc19",k.Icon_dorm_281="61056f2a-9c49-4e61-941a-b261b7d16fcc",k.Icon_dorm_282="16bcc296-5d57-4028-b7bd-f0f909ba0158",k.Icon_dorm_283="d9db1e2e-de1b-44b8-89ba-7bc9acb1b345",k.Icon_dorm_284="85ce801e-7cbf-4d36-b006-6411f5175238",k.Icon_dorm_285="f5c61ea3-d0b9-4a85-a568-953e07c95f07",k.Icon_dorm_286="1d1c5a1d-3dc4-4eed-99ce-53eeea6ac64d",k.Icon_dorm_287="b64e36d3-9687-49ec-85d7-08bfb607a528",k.Icon_dorm_288="413b9027-20f9-4865-b331-8eef4b737c34",k.Icon_dorm_289="0810ce1b-b6a4-476f-96c0-f4b07efbd041",k.Icon_dorm_29="269b3609-918d-454f-943d-f967cb2957de",k.Icon_dorm_290="5a962860-cbc5-49c4-a0e3-a6e01bf21047",k.Icon_dorm_291="226d9a34-423f-472c-bd73-f85f1c0e7d82",k.Icon_dorm_292="9a0a9ce7-ea3b-4b4e-a63b-a8c2c7601c19",k.Icon_dorm_293="a55bcd55-283a-43e4-a492-a8d7930d56a5",k.Icon_dorm_295="7b7191d9-db69-4f3d-b927-ac180a8c1e84",k.Icon_dorm_296="50502673-b839-496f-b810-67333a93617f",k.Icon_dorm_297="b9e8f861-bd9b-4121-acde-a4a36cf69772",k.Icon_dorm_298="b0480787-4926-4b17-a69d-26ca5e27de74",k.Icon_dorm_299="5cc5b544-2c33-488c-a9c3-4ac617b5465a",k.Icon_dorm_3="5f488c19-d5cb-43b0-b1b6-e50eded3d1cc",k.Icon_dorm_30="1245aab1-c95c-4f0b-9521-3025e97036b8",k.Icon_dorm_31="82618859-e064-4398-9f14-7de9d1f22e7f",k.Icon_dorm_32="f70a9bf6-7dd1-44b7-9829-b2466945bb1c",k.Icon_dorm_33="cd4ea517-4f38-47a9-89b1-0432babaae8d",k.Icon_dorm_34="3d35b880-5b72-4911-8cb6-65fa49716594",k.Icon_dorm_35="272c8de0-5c23-451d-9f35-19a1a0e39b04",k.Icon_dorm_36="e1eda36d-6d21-410d-8cd4-998dbbda523d",k.Icon_dorm_37="6cc808eb-edb4-43f1-a8f4-ea9cb37a0a8f",k.Icon_dorm_38="aa804e51-d7fc-44f3-9f90-82f7138f5697",k.Icon_dorm_39="6c74e182-f8c2-4939-afaf-848879990c88",k.Icon_dorm_4="aeb36876-4d34-47e2-9d48-7de03a480f6b",k.Icon_dorm_40="3e2d3033-8bca-4962-b2ec-eb9d06e5df1e",k.Icon_dorm_41="588ff24a-fee3-49a1-86f2-9dc0720afbe3",k.Icon_dorm_42="4bdca643-bb02-4f90-bbac-abbbb6cba38a",k.Icon_dorm_43="7dd7f78d-aca0-4a67-aed1-caa4ee401748",k.Icon_dorm_44="63afdf66-5cde-4a25-96aa-db3062aed753",k.Icon_dorm_45="0e7edff5-1dcb-4866-b5f8-5ed8557a7486",k.Icon_dorm_46="338d8a5a-8c14-4256-9acc-693713eb04dc",k.Icon_dorm_47="6261038c-7c85-46e2-a675-4fdc8aa08ea4",k.Icon_dorm_48="39ba2982-31ae-43f8-a31b-1ce2508f66ea",k.Icon_dorm_49="90fed777-8e53-4d3e-859b-2f43015a6348",k.Icon_dorm_5="c27079c6-7e3c-4194-96a5-7f2075c2c0e8",k.Icon_dorm_50="6c0d6bf4-aae6-461c-8045-fa6324fc7bac",k.Icon_dorm_51="a0891e6e-0bca-4c91-9390-58f223df509b",k.Icon_dorm_52="11b68a89-43f5-417d-a920-725230769a88",k.Icon_dorm_53="5d12c2f2-5a43-4f56-aa98-a2d45d6e4741",k.Icon_dorm_54="6fe1e5f9-b41e-418b-b857-56452982bc6a",k.Icon_dorm_55="5ed886a1-ec5a-440c-a953-35170ec05422",k.Icon_dorm_56="a5c7c2ad-5f3b-487f-8ebe-b2c28060f48d",k.Icon_dorm_57="6600bc60-5f0f-456a-b5b8-5674391b5d6f",k.Icon_dorm_58="e718a3aa-3b38-4888-9491-2a2cd83ead42",k.Icon_dorm_59="5343910a-49ec-4bc9-afee-63fc98962d10",k.Icon_dorm_6="f01d3536-8f27-45a1-bd0f-a45cba516496",k.Icon_dorm_60="40c61b99-bb12-4920-ae48-ce53dcab0684",k.Icon_dorm_61="7858f335-1e41-4ef4-b5ca-3437b5c82485",k.Icon_dorm_62="bade824c-cf8a-478d-8d45-7f386e4e9192",k.Icon_dorm_63="db9b901b-ea7e-46c0-be3f-dc9f80f335ce",k.Icon_dorm_64="ee8292d3-b72e-4d55-8072-4dca3cf7fdc1",k.Icon_dorm_65="4d5270a6-8f9a-451d-85a9-2f5ae902b274",k.Icon_dorm_66="6304dfcb-e138-4875-a3f1-9e7052bbd37b",k.Icon_dorm_67="f9a546a3-9989-4e92-a09e-bc49d8d63a6c",k.Icon_dorm_68="7ab2caab-5bb3-4f9f-9f8c-4c941c3bce59",k.Icon_dorm_69="94bca265-b04e-4d70-9bb4-b5d2239c8347",k.Icon_dorm_7="135bdbcd-a51c-492d-a7ab-aa42d22c02da",k.Icon_dorm_70="f94283c6-7645-4cb0-a114-6d087704f373",k.Icon_dorm_71="e92e3148-bd07-41dc-8e81-2a774d334183",k.Icon_dorm_72="6bf1dc49-b856-48c8-bafc-5349bdc75010",k.Icon_dorm_73="6570a040-b633-4311-8e2e-2794783f2cf2",k.Icon_dorm_74="ff054d63-bc61-4cda-ad8a-90553031f8fc",k.Icon_dorm_75="74f5c8e0-079a-41c4-a295-49dffa441f24",k.Icon_dorm_76="5d8ad48e-7932-4526-a608-e3c81caaf6a3",k.Icon_dorm_77="da4a989a-e32d-4e3b-aa9f-6ab61f80988f",k.Icon_dorm_78="6171588c-7a75-4552-ad40-e72c721b8ae3",k.Icon_dorm_79="30004485-b35c-420c-b2a2-9d62c5a8367a",k.Icon_dorm_8="432d0371-a089-4f26-b2d0-38f1c7d3baaa",k.Icon_dorm_80="bd61fa75-1496-4a2f-bc65-6bf6e4e9482d",k.Icon_dorm_81="21e7bce5-a6cc-4907-a2d1-392f2d834e4a",k.Icon_dorm_82="532f169b-7149-4519-aa92-8dfec4fa6e1f",k.Icon_dorm_83="d8a47720-358a-4d63-b7e5-6402cad78528",k.Icon_dorm_84="012a6009-3974-4437-8e9d-183c2ebc9752",k.Icon_dorm_85="6fc1872c-eb83-4ae8-ad86-dbce00bc95f9",k.Icon_dorm_86="9e984eb9-38e2-4d44-b3f4-7bac3d149f16",k.Icon_dorm_87="e540c205-b512-4dd1-8c3d-f642c93ab5fa",k.Icon_dorm_88="4202c1ca-1dbb-4a91-984c-6812c7e8cbc5",k.Icon_dorm_89="ad48df8b-3ed8-4518-b9da-3f88473de1e7",k.Icon_dorm_9="39b41cb4-4655-448e-a15f-b14f1c89a5b2",k.Icon_dorm_90="abe262dc-5d4b-445e-a866-cdfdd0938646",k.Icon_dorm_91="b87acf6a-db18-4fc3-8f94-3ccc2a3d4574",k.Icon_dorm_92="3db85022-12ec-4feb-ad2a-98724991822b",k.Icon_dorm_93="de1bcd80-18d9-46ba-92e4-b9f6033ab14f",k.Icon_dorm_94="670ed547-fec5-407c-acb2-aaf428b2830a",k.Icon_dorm_95="73e0a3af-e97e-4eba-98b6-61e402b79c06",k.Icon_dorm_96="dbbd8786-7e64-4aca-9a56-ab05fee0f1a7",k.Icon_dorm_97="63a295f1-6629-4cb1-9097-4fd876bc5cb7",k.Icon_dorm_98="abae7c87-3e6c-4865-b959-d935d540cc26",k.Icon_dorm_99="51cbe9eb-cd5f-4c1a-9506-295d36e42b08",k.Icon_dormbg_1="ecefdaea-e30e-41ed-af81-bbac0b85c567",k.Icon_dormbg_10="5ee22bae-f02c-4faa-b3b8-bc6fed190f32",k.Icon_dormbg_11="518de818-c9ca-4b17-ac62-7d6f301cb4d7",k.Icon_dormbg_12="321d329b-8cc3-461b-a694-b3e468fbf475",k.Icon_dormbg_13="d2bc8539-e09f-4132-a350-9a5dc60e911c",k.Icon_dormbg_14="ec5bdc8d-9f3f-4eb3-b25b-b2ae36d507d7",k.Icon_dormbg_15="50118a28-5769-4e32-afb4-5c0c6dc630d8",k.Icon_dormbg_16="84f03c0a-0767-44a2-86ff-de5630c63314",k.Icon_dormbg_17="68c65783-706e-45af-9f25-e71a08dba0e0",k.Icon_dormbg_18="934c2670-51fe-4b14-9043-ae00afaf1431",k.Icon_dormbg_19="44397d0d-351f-4fc9-b469-62b956ff00a3",k.Icon_dormbg_2="0d97ae00-efee-4da8-9bed-047658cd372d",k.Icon_dormbg_3="a58823f3-9aad-455c-98a5-7728dc272a2f",k.Icon_dormbg_4="625d8873-01ce-4eb1-8c3b-16ae18915836",k.Icon_dormbg_5="305a0a12-9a0f-40a3-b930-c22456620af6",k.Icon_dormbg_6="fa88c99f-db50-4466-af64-4c0571e54796",k.Icon_dormbg_7="8c8d6605-ed70-4710-8739-742c97d58381",k.Icon_dormbg_8="39b55eac-75a3-4ed0-ad60-cc6944fb41cf",k.Icon_dormbg_9="eba52da5-e59c-443c-a029-29545994f12d",k.Icon_dragon_orb_astral="9d9c6a2b-806b-4ccc-8250-002bdebadaf6",k.Icon_dragon_orb_astral_huge="3d8fc46d-d672-48aa-a165-8baa0e69348e",k.Icon_dragon_orb_fire="8c75f560-0778-4290-ac52-5000290abb5e",k.Icon_dragon_orb_fire_huge="474f438c-1429-490e-9343-2cd5965bafcc",k.Icon_dragon_orb_ice="8e2afc0d-7580-44e4-bad7-c190b7ae71c7",k.Icon_dragon_orb_ice_huge="23c8b451-e341-4058-8e20-11912e3c184b",k.Icon_dragon_orb_physical="5a262caf-2a6a-4b51-8a89-a791da193fc8",k.Icon_dragon_orb_physical_huge="141c3a8d-51f9-438c-a6c1-7f89b268f274",k.Icon_dragon_orb_physical_huge_silhouette="8ebe8d03-6f90-4ffb-aae4-791af35ca44a",k.Icon_dragon_orb_plant="f10c3bdb-89aa-4e3e-a726-20b169027f55",k.Icon_dragon_orb_plant_huge="5edfa0c3-0e54-4c57-a4b2-34a329c39704",k.Icon_dragon_orb_shadow="b3ba5b67-7984-4613-80e2-81580637c1a2",k.Icon_dragon_orb_shadow_huge="c41c0a7b-a157-48f0-8ce1-13f074cf0849",k.Icon_dragon_orb_storm="80fc4e9a-fb62-4a54-aabb-e10766210182",k.Icon_dragon_orb_storm_huge="2f512880-9e18-4eee-b761-bb3c33d6927e",k.Icon_dragon_orb_water="0ba7c6ab-bd03-4db5-ba5b-03f1f6be01ba",k.Icon_dragon_orb_water_huge="50664486-ddb4-48c2-adda-ac4fe0cff62e",k.Icon_elements_chart="c387c574-a039-429b-844d-7270fdd2380c",k.Icon_emote_1="87bc3760-04ba-4aba-a13e-f32a4b184e90",k.Icon_emote_10="0a7c0150-1593-4f28-83a8-8db058a56f6f",k.Icon_emote_11="14c2cd40-929a-4228-a7a6-baa2e2e3bcd1",k.Icon_emote_12="420f9ab7-a292-4d81-b65b-6e56a2a4d47a",k.Icon_emote_13="f23b610f-dca4-416a-9d8c-11920ee091ca",k.Icon_emote_14="3d27405b-f9d1-44f8-b64a-66bb7111bab8",k.Icon_emote_15="8b4461fa-abab-4ab0-9fc0-6c6f83b2c61a",k.Icon_emote_16="26dfdc8b-2bc5-4fb0-bc1e-2d30fa50b241",k.Icon_emote_17="4e597cba-671f-4de9-8ef6-f000c7f28312",k.Icon_emote_18="a1eabf6a-41a7-4d81-93e9-3ce784a6eeac",k.Icon_emote_19="a2049def-b490-42ab-b3f2-48911445f808",k.Icon_emote_2="6c7f9552-4698-4731-873b-85bf33cbcc1a",k.Icon_emote_20="88a8d493-cea7-420c-85f7-cd2cbbb0dc8b",k.Icon_emote_21="9fc7b325-1740-4fb0-9623-8bb42b877e80",k.Icon_emote_22="e6bb1dde-6bb5-4a04-b2b0-982cfd8c811a",k.Icon_emote_23="c56cb871-84b7-43c9-98b8-c004219a3a00",k.Icon_emote_24="3bbede39-61ad-4823-b68e-00e68047ab98",k.Icon_emote_25="bbe79c0e-dc39-4975-8286-e7d6aed353bc",k.Icon_emote_26="cd58cb40-d7d1-4cc5-b372-9cf9214e8ffc",k.Icon_emote_28="7193f883-c1ea-4c64-8a3b-4fcbd01c2230",k.Icon_emote_3="c34a02c1-0174-4fda-8018-d5026be950ca",k.Icon_emote_4="0cdb8714-44ae-4322-a344-65a1f38ec1fb",k.Icon_emote_5="5a3069ac-2fab-4e96-b894-f5699af7aec3",k.Icon_emote_6="5eae56d9-611c-4535-9304-7c886b9f38b5",k.Icon_emote_7="0ac82307-6196-46a3-ade0-b8a24cf68ea2",k.Icon_emote_8="6f372668-c590-4c53-a66d-b89fdb3ea4a2",k.Icon_emote_9="e7b9474f-16b6-4c90-a58d-81f425cc2791",k.Icon_face_1="15be89c2-ad05-43be-85dc-af03ddecc9e3",k.Icon_face_10="db9d7259-a653-4f91-9983-f4ba8edb2d01",k.Icon_face_11="adebf976-0988-424c-b18e-fe08472f8e11",k.Icon_face_12="61725f9b-2320-4105-a12a-2f4db323fc37",k.Icon_face_13="408e3589-8d10-41bb-8d16-a060d785f60c",k.Icon_face_14="27e7238f-51f9-4b22-a27a-bc8a235d3e0c",k.Icon_face_15="be507ad4-2c9d-4a78-9489-a4b1445576a3",k.Icon_face_16="8eb2826d-3931-4778-9eeb-64774be9df71",k.Icon_face_17="d01d3059-0c24-49a3-b5e4-c0388b68582d",k.Icon_face_18="ef963721-e1ab-4596-baa3-48ad9c3b379f",k.Icon_face_19="b2c170bb-4eac-481b-aac8-0c0370bb9983",k.Icon_face_2="77845cf0-a961-4656-8cbc-3d73889b44d9",k.Icon_face_20="742ad13b-6277-4048-9d6e-d5d8b3dd09ed",k.Icon_face_3="a3bb7eff-e110-4f85-ad0c-9eb6b5d83837",k.Icon_face_4="40bfbe23-2637-472e-b5c8-fb3bdb601809",k.Icon_face_5="b87eeee9-3bc3-42b2-b037-00018010ffbd",k.Icon_face_6="9d914fe0-2eb0-4876-b3d9-d760c99198ad",k.Icon_face_7="1654c7bc-6a58-4726-b024-0bb2adfc1c3e",k.Icon_face_8="c4dc436b-abb4-4e7c-9c5a-62561c549a0f",k.Icon_face_9="dde26748-6111-4817-b4b3-4838e747e7b4",k.Icon_follow_1="5331593c-fbcd-46fa-95d3-c4bdf789e753",k.Icon_follow_10="e3c1a4f4-6610-4164-98f2-31aa6f02149f",k.Icon_follow_11="43641748-60af-4013-916c-0f02b8bc10aa",k.Icon_follow_12="301ceb1b-6eb6-475a-b182-2acee66b22dc",k.Icon_follow_125="399de882-1ccf-4556-8289-0243f7025d79",k.Icon_follow_126="da12e96d-c895-4abd-9ff2-c768db28d96d",k.Icon_follow_127="559a4486-e138-4655-a4e1-716fad3bae0b",k.Icon_follow_128="0682ecb5-29cc-498a-bf0a-3d2c78b701f5",k.Icon_follow_129="53c8c465-1a3e-4b96-9b6c-f40f69a28b40",k.Icon_follow_13="501824e4-36f7-4a77-9ab9-ba1f37ac1cd7",k.Icon_follow_130="b74a2f3d-aad6-4d33-9dcf-692560d651fc",k.Icon_follow_131="2da63051-0237-48f2-aa1c-88a9149a737f",k.Icon_follow_132="69ca5e4f-b796-4c77-ac26-4e84f2053599",k.Icon_follow_133="32ec5a96-3a8a-42e8-bf1c-7996ca78c738",k.Icon_follow_134="b1ca9337-3281-4ada-bd03-71c01cdc3e1a",k.Icon_follow_135="9a6671b9-7f03-4b1c-bce5-4ae924388712",k.Icon_follow_136="5ecbdee7-8d01-4bec-8b7d-b0664ea8b8f1",k.Icon_follow_137="e6a4f6e6-fa35-450c-85a9-2ff37f32532b",k.Icon_follow_138="46dd4a51-66bf-4952-8875-667c6b0904f4",k.Icon_follow_139="ac697412-1a63-4fc1-92fd-417eb5a112be",k.Icon_follow_14="d246ff46-ed64-4097-9eef-67ee415d85c3",k.Icon_follow_140="146b1068-42ce-4828-8a79-a8ce2746e367",k.Icon_follow_141="9f278441-d8c6-436a-9db4-3881b963686d",k.Icon_follow_142="287d1e95-24ed-4830-8bbd-7b97b3d7d0e1",k.Icon_follow_143="609d3724-b42a-435a-aeb5-f1f35a971a48",k.Icon_follow_144="6daa3c5d-4052-4250-8b29-db87387550d2",k.Icon_follow_145="b515023b-f8d9-4b0d-a3c5-58fb7ea7027f",k.Icon_follow_146="77cdb5e1-7b25-42a7-a9fc-2ac1d7cb7054",k.Icon_follow_147="f1b2fb7e-8f6a-4beb-9ee3-9674172fcdcf",k.Icon_follow_148="c22004cb-8cd9-4094-94bc-90bdf6124658",k.Icon_follow_149="5248feb6-963d-4334-b20b-5d88a90c9dab",k.Icon_follow_15="b99597ce-7193-4e5f-bca3-73ae669aa17e",k.Icon_follow_150="4cb61c2a-c4a2-4145-8677-4ad4be1f0478",k.Icon_follow_151="b4705a42-bf3d-4ae3-96da-1be8e2863bbf",k.Icon_follow_152="bdba4913-716c-4b24-b4c4-c2df39568da9",k.Icon_follow_153="7ee0472f-d8fb-400f-a90b-1055cecb8e4d",k.Icon_follow_154="428b9072-d4a6-4faf-bc4f-34cd81ebee5f",k.Icon_follow_155="aee71ae7-d14b-4263-a589-8044e830c8e7",k.Icon_follow_156="291191f3-c3a1-4615-b2c8-ce2355abc19a",k.Icon_follow_157="90d0e8ba-7d51-45cb-af9a-25f3d3480b6e",k.Icon_follow_158="a89d23fc-579c-46c2-ad22-0fdcb5cdf794",k.Icon_follow_16="c86c0c3d-ca54-4cee-8107-45a111e58922",k.Icon_follow_161="92b78a23-91c0-410e-87ca-baaf358344fe",k.Icon_follow_162="69e1ee26-a81f-4520-91cc-662803b488cb",k.Icon_follow_163="f977a05c-d8b5-46d3-9426-774a06cc8b3f",k.Icon_follow_164="2044b8bd-05b1-4adb-81df-fa4a41e760a1",k.Icon_follow_165="3c715731-9738-4076-b457-88082a22aee0",k.Icon_follow_166="dc5ebad0-3edd-4d5f-b507-86db574fbed4",k.Icon_follow_167="2fd04b87-4d43-4a3e-9032-bb140e60ceb5",k.Icon_follow_168="57aa3f19-9166-4b8a-88f0-02cc3f46cf74",k.Icon_follow_169="f728dab0-7c81-4583-a4e9-accc8e9c1947",k.Icon_follow_17="0318cf98-5981-48c4-96ea-43387f7b8631",k.Icon_follow_170="11c557f1-96a9-4733-90f0-a06a81dcfbe3",k.Icon_follow_171="93626a85-9d2e-4c51-aa71-9f430bdde436",k.Icon_follow_172="bcd68e0d-f3d1-41fd-90fc-ad822a17e92c",k.Icon_follow_173="2d93be8a-03c5-4362-8704-dffc4c5a5a74",k.Icon_follow_174="78b77ba6-e366-45bb-912d-5a05d8a9a446",k.Icon_follow_175="b333b46e-3ce5-4800-93fd-617d1c8b8e48",k.Icon_follow_176="040ef63f-7502-4eaf-a148-41fe5d2a4b4f",k.Icon_follow_177="71ba011f-cb77-4aa2-adff-bb5554f7a54b",k.Icon_follow_178="4c40ec3d-58fb-4863-bd20-f1652d8fadf3",k.Icon_follow_179="ebbb4674-1a9d-4fd4-8e03-ac8a54deacb1",k.Icon_follow_18="52749525-fcc8-4a6f-81d6-387c8283ddc2",k.Icon_follow_181="4642a690-b5fe-43a0-9616-781908db599c",k.Icon_follow_182="5be61588-e1ba-487b-93c8-713dfe9faac2",k.Icon_follow_183="4afddbe1-64e3-4cc4-9a01-a4898a21c650",k.Icon_follow_184="869785ab-c91e-4d7c-9057-ce650bda193b",k.Icon_follow_185="1348d422-c381-4b0c-9a3a-175eaf527da1",k.Icon_follow_186="752b85f4-06cb-48ea-9c1b-88bf1a3ac8fa",k.Icon_follow_187="a5c4e783-c03f-4668-ae99-d8520144f4e9",k.Icon_follow_188="4dbcefc6-f8e0-461b-80ad-8794565e3d4e",k.Icon_follow_189="62fada21-0922-434f-be1d-97e1136a3a89",k.Icon_follow_19="d7e5acb6-a3b2-450e-89c1-99aba818b848",k.Icon_follow_190="4e404c29-605e-4faa-a5c5-32073c7e722e",k.Icon_follow_191="9c8f5103-91aa-4ef0-8c78-44d33c7dbce1",k.Icon_follow_192="83f85dcb-7c0c-4894-be36-5e196453c6ec",k.Icon_follow_193="8cd5ccb3-a237-414f-b513-3177fb7bfa6a",k.Icon_follow_194="2e585d80-e968-4adc-8025-643859f3bd22",k.Icon_follow_195="51ee9639-f1a2-428d-87cc-d166c52f9e23",k.Icon_follow_196="905e38d5-be2d-481b-88cb-3b3fefcd93c9",k.Icon_follow_197="8de8ee24-835c-4829-a8e0-b74936c7c799",k.Icon_follow_198="9b438f6c-e2ee-4648-b076-f2a2e7addb88",k.Icon_follow_199="ba5e13c9-e2c6-4ada-86a5-26786210836a",k.Icon_follow_2="9b72f134-1db1-43db-90a4-5ec82d253511",k.Icon_follow_20="3f416ec1-8302-4e05-8165-698b25ff9a2f",k.Icon_follow_200="aa3a2e9b-5ffd-4d1e-99da-bf2401e41eda",k.Icon_follow_201="8c00fedc-4802-482e-abbc-176906f7f066",k.Icon_follow_202="37f79ca2-9004-4e5b-9524-d196ad8537a7",k.Icon_follow_203="21c55979-b4c2-4d80-92b5-d58155aca08d",k.Icon_follow_204="6ea8e508-3af4-4938-be4f-10d8e285db03",k.Icon_follow_205="8db46035-7a71-42b7-8d7d-cafaee2fd8fd",k.Icon_follow_206="2fe321f0-f195-46b2-9e25-70f0be0c61b4",k.Icon_follow_207="3943bdb4-d4ed-4674-845b-89f8703499b2",k.Icon_follow_208="2531c6b6-3867-46e7-ab05-3c4fc74672ec",k.Icon_follow_209="803313d4-0743-473c-a38c-13aeac8ada42",k.Icon_follow_21="88f15e3e-129e-4f30-a6bb-ed99d41e75ea",k.Icon_follow_210="c5d776a4-0433-47b4-ad85-3d63cb9e4480",k.Icon_follow_211="facca6ec-00e6-4f3a-bba3-097f7f45e5e5",k.Icon_follow_212="bae4753a-45bd-4520-b50b-11ffdf5a6c4e",k.Icon_follow_213="f5eff3b3-faba-40b7-ac1a-dfd4d3562836",k.Icon_follow_214="71ed34eb-0acc-4386-96a1-0ece9082184f",k.Icon_follow_215="a1540006-9fc9-4756-98e3-ceeab9cdb713",k.Icon_follow_216="853140fc-162a-4bef-b117-ed1b71c81e8f",k.Icon_follow_217="61ea7ca4-5731-40c9-ab35-f64cd835d7d4",k.Icon_follow_218="51329004-50b5-41ee-afcc-5f009e15e459",k.Icon_follow_219="cf5f3832-439f-4c74-935e-43dc1659c5b0",k.Icon_follow_22="89a2f542-9b39-41ee-806d-2f8fa0e54e9f",k.Icon_follow_221="5a95cada-b42e-44dd-a18a-89446f7b10ad",k.Icon_follow_223="0865eb45-950d-4309-b2c9-1f524d684494",k.Icon_follow_224="5421cbaa-aeb4-4af8-b4ab-295a86a3df28",k.Icon_follow_225="a169b415-819d-4962-b421-24b673851b54",k.Icon_follow_226="c1d74ef6-acbc-4171-bf4f-16c28b561b96",k.Icon_follow_227="6f096a7f-799a-4b11-870e-11d855f88946",k.Icon_follow_228="ed8052f8-69dd-42f0-b9c3-d076a3fcd4ca",k.Icon_follow_229="26ab6ddc-b3c3-456a-b3e4-e5e37387d74b",k.Icon_follow_23="c2483cc3-ed11-479e-a41c-9e4df652ca82",k.Icon_follow_230="1bcbbeb3-abf2-4e32-a0a7-f3a913c896b7",k.Icon_follow_231="e14665c7-e85f-4054-8458-d482665b49d9",k.Icon_follow_232="fb6b946f-4d17-47d0-bb7c-e13629018863",k.Icon_follow_233="51d8cf44-629d-4676-bd0e-417602000ab8",k.Icon_follow_234="08849952-15ae-49af-9c23-9d32fc65bc78",k.Icon_follow_235="17a81173-4c48-4f1d-baa6-881b1c45d179",k.Icon_follow_236="51edabd5-b29b-4758-9fed-c67ebdcb5d40",k.Icon_follow_237="431591b5-6fd1-463b-8b13-8279e9a62bca",k.Icon_follow_238="bf44ef68-3291-45b5-89b8-f66ab85ef752",k.Icon_follow_239="88fa68c4-1cc8-4421-b476-630d9e214d28",k.Icon_follow_24="e7342d06-8ee7-44ea-a914-63a7a243d0a4",k.Icon_follow_240="108ddb3f-a226-4b2d-911f-9bd6cd265a32",k.Icon_follow_241="2146cc68-6d97-42c9-a8a9-c50b3d8f1575",k.Icon_follow_243="e7fb7b61-0cb0-4982-a091-ee1773ac3b10",k.Icon_follow_244="9d58c222-6149-4acc-9ae0-175511cfab99",k.Icon_follow_245="f5a1047c-62f4-4233-90fc-9e9acde6cff2",k.Icon_follow_246="f4b20432-5448-4758-a7b2-ed3e5649b0d0",k.Icon_follow_247="e6f46bbe-0214-4ddd-a4df-f89e3aa5f45b",k.Icon_follow_248="57ece1f5-9af5-4d4c-b3d6-f348c8f1a6a3",k.Icon_follow_249="00cb3764-4854-444f-8f3d-e55df6ca073c",k.Icon_follow_25="316119a7-1f83-4f12-9726-9f8de9a3b8df",k.Icon_follow_250="fab51d5e-e41d-4476-ae5c-d3d96f6ba541",k.Icon_follow_251="f11bc26f-503b-45af-a017-0aeeb7b9b805",k.Icon_follow_252="fabeed26-d6e5-43c1-859c-14ad5c54f330",k.Icon_follow_253="1053a8e1-baf8-43db-af32-2806c4eb1add",k.Icon_follow_254="8e8f7ed6-a354-4f8b-9305-20a080ffbce2",k.Icon_follow_255="5bd143ab-8706-42ea-88da-e04702f2aa81",k.Icon_follow_256="4f545091-490f-4d39-8963-1fa5f6e4d076",k.Icon_follow_257="13082536-a1cf-4d1d-9715-2469a1987b28",k.Icon_follow_258="90dc7a95-6ae3-4ad9-9eaf-8c48d2327c6a",k.Icon_follow_259="e335186d-ff6e-45f9-ad2b-db01283d54ae",k.Icon_follow_26="bcb61a90-eb84-4d8b-86ba-338386ea24ab",k.Icon_follow_260="7db42e80-a40e-40d3-bc2f-d3d292b43270",k.Icon_follow_261="b9e785f3-2efc-497e-a76e-f89d41e25ec1",k.Icon_follow_262="b6c567b0-e51a-4fd0-b3ca-ce1eaad485f8",k.Icon_follow_263="3c02fd94-79c3-43d3-9b37-2bb3a5e19ead",k.Icon_follow_264="0d037285-881a-4601-a056-9401c68c4152",k.Icon_follow_265="b9dd0c2d-fe2f-4ec1-8b50-528a9ce4d64c",k.Icon_follow_266="85602694-00cd-49e9-a25b-a066e7d0c62e",k.Icon_follow_267="3f90bb61-b8f5-49cb-9860-9e90d7c5b85e",k.Icon_follow_268="e37ac522-c8ac-4aaa-94bd-17a6ece67464",k.Icon_follow_269="ff5501b3-68bd-4fb2-92b7-f04d2c1dd683",k.Icon_follow_27="6ef8aaa8-24ce-45a2-b9aa-fae2aa3bcb91",k.Icon_follow_270="727f159b-a37b-4783-b438-d34f09c88fa5",k.Icon_follow_271="55fd187a-0e19-4abe-88cd-295c6e842e75",k.Icon_follow_272="14354a18-516b-4167-8556-16f91346735f",k.Icon_follow_273="1ab1177e-73e6-43f6-9040-7d684da7fb53",k.Icon_follow_274="cfef7a1a-c44b-495c-a1e3-387ef1306619",k.Icon_follow_275="25d469f0-e1c3-4e25-a713-c84eb199af11",k.Icon_follow_277="598ef031-d213-475a-b662-17c034d0bcfc",k.Icon_follow_278="ac2467f4-c12b-4471-b18c-c42aa6d1b50d",k.Icon_follow_279="827b7fac-e325-447e-956b-61f8b3f97010",k.Icon_follow_28="106af062-00ce-4e59-8190-5cf55e1bdded",k.Icon_follow_280="2d30d250-9d4e-476c-a00a-c27de98e8bf3",k.Icon_follow_282="b3c9f9ae-9282-4235-b8e4-f40fd61fd1fa",k.Icon_follow_283="2f3fd239-fc25-413c-8e72-7f063474eb17",k.Icon_follow_284="262d812e-ac2b-48cb-bca2-c9d4fe958763",k.Icon_follow_285="214c8c98-8e98-45a1-9e07-ea214ffe7147",k.Icon_follow_286="736d2b9c-e9d0-423f-bfc8-e93323ba3920",k.Icon_follow_287="465e0d33-dce3-4140-8d63-ed32f77b852d",k.Icon_follow_288="fabbe4a8-9b87-4002-ac1d-01cf9186e6c1",k.Icon_follow_289="549577a8-65aa-48aa-9d59-f9932d3c90dc",k.Icon_follow_29="260f73d3-644f-45a9-8c1a-3899c6ea56cb",k.Icon_follow_290="45a09fba-2070-4868-985e-86dc711cc556",k.Icon_follow_291="53698d82-60b7-4283-94d7-050d1d1dcd2b",k.Icon_follow_292="698e0a52-4975-414e-b6a1-5fde43233750",k.Icon_follow_293="7cb193c5-e502-4f0d-94f4-b7ff49c427b1",k.Icon_follow_294="b60ddae7-eb2b-42fe-a076-0c6b9e118ae2",k.Icon_follow_295="3e195195-e452-43a8-aae7-ec237187482f",k.Icon_follow_296="7a6b59ef-6f3a-40bd-87c0-c8e3d2e7a748",k.Icon_follow_297="89369230-6620-4c3d-bde8-f6c5db892010",k.Icon_follow_298="63e33511-a2fb-495c-8068-fa3e950cecb0",k.Icon_follow_299="66b5de1f-ffaa-4d15-94ae-be3668dccd07",k.Icon_follow_3="79ef68b7-3657-4d3f-b84e-764767466cac",k.Icon_follow_30="0b0d3716-07ee-4943-a41a-58e7c165107e",k.Icon_follow_300="6c0a4132-801a-4966-ac95-a7fc87eeb411",k.Icon_follow_301="e0abbebb-6b36-44f3-9a8a-01c5b38c3028",k.Icon_follow_302="55d38799-e72c-4b23-9ce8-4d66dbda5098",k.Icon_follow_303="8206fd1a-7679-4be7-9fe9-7f286e50f469",k.Icon_follow_304="858ca73c-4e52-424c-a1d5-5938c388c4f5",k.Icon_follow_305="9bc90d9e-f0f2-47cb-989e-2932d3d800fe",k.Icon_follow_306="4f32701f-150b-44b0-a355-adc2e2aab288",k.Icon_follow_307="b4ac688a-c5a4-4e74-b286-9aafefe6c8a8",k.Icon_follow_308="fea975b1-db33-4573-8adb-f90b6c2e1469",k.Icon_follow_309="ac8e1806-509f-4dc8-9190-6758929026bb",k.Icon_follow_31="1bf5b050-7d54-4915-8033-28b2ba50c62e",k.Icon_follow_310="4790f0db-66bd-4148-a84d-abdac5894e8b",k.Icon_follow_311="21cecf6e-075a-463d-8f25-e1198c512979",k.Icon_follow_312="202e93bd-f850-4e36-8e35-61def6b7544a",k.Icon_follow_313="3e344c7c-b3a8-49a8-9755-c19aa308a96b",k.Icon_follow_314="5fa07e18-34df-4964-8155-69a1183669cf",k.Icon_follow_315="1d1248af-dd84-4fdb-a95d-8678bce72b35",k.Icon_follow_316="7d687582-8fd7-473a-9fcf-8650fa8ee065",k.Icon_follow_317="394935ce-1d8a-4910-9515-00f42b8de8b1",k.Icon_follow_318="c1502532-f818-4ac5-9b19-5da2cf16cd1c",k.Icon_follow_319="2267a524-8f0d-4527-a76c-657702634e24",k.Icon_follow_32="403a9a8d-9b89-4e0a-8c88-b7ec5748d2a9",k.Icon_follow_320="12168a1e-4b67-463e-b768-5798aa5d7416",k.Icon_follow_321="aed10ae6-a550-4e1a-98a3-460784b38696",k.Icon_follow_322="2b57dbba-c25c-42f2-a0e9-e3d187a2a35f",k.Icon_follow_323="c26dd27f-12d5-4d9f-9d79-f1e61a86b596",k.Icon_follow_324="10aa0965-527f-4fd9-a9ab-3727df9697d1",k.Icon_follow_325="339c1878-ecca-4753-87ac-c41b7c361ef5",k.Icon_follow_326="aea16c69-9cc6-4174-9a1c-5d8459564d86",k.Icon_follow_327="c9ec51e8-0af1-49bc-ae6f-65e18aaa0ccb",k.Icon_follow_328="d187c36f-fb00-44f6-ad9f-68031cc115b8",k.Icon_follow_329="56e44362-9443-4880-9f03-87a8654e9797",k.Icon_follow_33="a3bda44c-4160-41bf-9636-819252425230",k.Icon_follow_330="42975065-939f-4270-b503-8a95cebea8ce",k.Icon_follow_331="6735e1bd-4b33-4f20-bc61-496f6fa572dd",k.Icon_follow_336="125fb686-be2f-4266-b67f-5b5e2fb579f7",k.Icon_follow_337="8a82df07-6501-470a-a053-97cb4cd8a0a2",k.Icon_follow_338="9d658f38-bae3-4edf-ac42-693424514877",k.Icon_follow_339="63bb4fe7-7877-4d48-9d7a-48370725c6ee",k.Icon_follow_34="b5aa47bf-a72d-49af-a82c-42b77f39c9de",k.Icon_follow_340="bde7c8a1-bd26-4daf-b3b8-59abb925f418",k.Icon_follow_341="343a1de5-7fab-48e8-86a4-43ce8db9f904",k.Icon_follow_342="f9708f05-cb45-40d5-8c3a-8e6d7c7af727",k.Icon_follow_35="7a5f6c6b-dd19-45d0-bb57-231044bf6072",k.Icon_follow_36="c9df5789-a5b6-4dcc-97fe-e38b130e3155",k.Icon_follow_37="1c2e03f9-060e-4996-8f1a-56a8ff085a09",k.Icon_follow_4="83ce3b90-9e92-4f79-b991-6d0c640023cc",k.Icon_follow_5="24aa0dfb-6d7e-449e-aae5-fc7a84670681",k.Icon_follow_6="614f5649-f4f2-4d43-859d-3f5d0655bacb",k.Icon_follow_7="96aa5480-c88d-40be-8db6-b171c4c04fcd",k.Icon_follow_8="6c57383f-6676-4532-9d45-06634fd6dea6",k.Icon_follow_9="e6f7e9bd-e5f9-4797-97d2-3e06839ce134",k.Icon_fossil_1="b70fbb76-5cc9-4a04-b6f3-aa406a1677e7",k.Icon_fossil_10="fd30c231-318a-49fb-bda8-1f2bfbc7e2e1",k.Icon_fossil_11="09f110ff-7313-4ebc-b43e-d6015eb939e8",k.Icon_fossil_12="f0673c90-9009-4d57-8ca4-16e43ab38250",k.Icon_fossil_13="fa068613-e4b4-48c4-a0ee-17ae8650bf86",k.Icon_fossil_14="abc815d6-1653-4e66-8a35-2a878653ccc5",k.Icon_fossil_15="84131a61-473a-4591-ba62-15965feb275f",k.Icon_fossil_16="24db8398-d31d-4848-b127-e38143db94d5",k.Icon_fossil_17="b0f22083-8473-4148-9dcd-ea3a91e26ff1",k.Icon_fossil_18="408b2328-9bd6-4d5b-ad88-5fe26b848ae5",k.Icon_fossil_19="b0b2ad0c-74b7-4cc9-9b46-458067c60389",k.Icon_fossil_2="cb62c437-2e48-4de0-afee-f75546372fcc",k.Icon_fossil_20="32842687-5da9-4047-bdcc-c06715cdba5a",k.Icon_fossil_21="89e0cb13-89f0-4925-8603-5b239f9c7648",k.Icon_fossil_22="e809d2c9-e9b4-4378-9995-e07fe136281d",k.Icon_fossil_23="325302cb-f15e-4303-b765-d0c16500951c",k.Icon_fossil_24="e0ec93d8-b469-4f61-99b6-21fff61d3557",k.Icon_fossil_3="addc9dde-0c32-4f42-932e-61ecfd002979",k.Icon_fossil_4="1abe5fbf-a1ff-4e94-9c8c-a10d936a7981",k.Icon_fossil_5="d9674bca-8727-401f-8376-b5f08d7fc846",k.Icon_fossil_6="f47b51c9-5494-4806-ba81-627d7a9ea716",k.Icon_fossil_7="f60a28c8-267c-4641-b464-3a4c64676bc2",k.Icon_fossil_8="5271d685-fc72-4e97-9457-c52c0d0f94ea",k.Icon_fossil_9="6d706465-6ec7-44c6-9fec-7ca9b40c6cdf",k.Icon_gender_1="b75d3a12-2b7d-420d-af3a-02dedbdfb7f5",k.Icon_gender_2="46eea9f2-8e75-4014-b014-0f152c79a0ff",k.Icon_giftBox_1="e05d75c3-33d6-4809-847d-15f4e0ee3960",k.Icon_hairColor_1="aea5f953-343b-46cf-be85-2a063d86ffcb",k.Icon_hairColor_10="9374acdd-febc-41d7-80d4-e2bb004d57a0",k.Icon_hairColor_11="b9ec336c-514e-4436-aa57-6934dd036d82",k.Icon_hairColor_12="ffdd53b5-0806-40a0-8c86-0313a1d2c5cc",k.Icon_hairColor_13="a06178f9-afa5-4ba7-82f0-e166282ef25a",k.Icon_hairColor_14="7975a528-4147-45a6-9116-b7e022bd14bc",k.Icon_hairColor_15="61281058-ab22-48cf-96a3-f390985a0c60",k.Icon_hairColor_16="903ce3f3-2d4c-42f1-a1bb-36390e47e330",k.Icon_hairColor_17="b224d601-e579-438c-a56b-92417a3b7deb",k.Icon_hairColor_18="0ee47cb6-24f7-45c0-8595-652e928890d5",k.Icon_hairColor_19="386a93cc-a979-43f7-b56c-0ef1d443032e",k.Icon_hairColor_2="1bba717a-10f7-4c98-8a40-ec19538ef32f",k.Icon_hairColor_20="b454f03d-e03d-44a8-9ee3-de6d0395dfe0",k.Icon_hairColor_21="ff11049e-0416-4ccf-8e2a-c64bdaa68059",k.Icon_hairColor_22="99e7cb43-e3de-4e0e-9cf4-79a921b216d1",k.Icon_hairColor_23="07f03731-a851-4093-8fb3-df3d0f96f6d4",k.Icon_hairColor_24="744e1228-cf3a-4264-a9e8-9e5f19d7aaa1",k.Icon_hairColor_25="0fbc476e-a81a-4315-bee2-0ea6e1e97eed",k.Icon_hairColor_26="7a4a4b7a-062a-4a17-9dee-b1f30adc91c1",k.Icon_hairColor_27="656df49e-d770-4f3a-8b6d-b98ff6794864",k.Icon_hairColor_28="60fb96ad-b32b-43c5-a2eb-e1df004f6164",k.Icon_hairColor_29="90798e46-1000-4693-93e3-25045c8440c5",k.Icon_hairColor_3="e92e6605-cd81-40e8-a044-6b064347db95",k.Icon_hairColor_30="a6951141-db33-4c4c-9065-67ff7f17b91e",k.Icon_hairColor_31="784689e0-1f16-4b06-8a22-9f6708eae845",k.Icon_hairColor_32="f0a0daeb-0e5c-487c-ad54-ac46dc318c4e",k.Icon_hairColor_33="6953b59d-14d5-4bf6-a0b0-e25adabcde6e",k.Icon_hairColor_34="4ad225bb-74ae-41fc-a424-e884a6a8f541",k.Icon_hairColor_35="4d1e2229-b4d3-4b63-9cbe-26558656cd1c",k.Icon_hairColor_36="9b93c20a-1937-43ce-b454-87a1e3536852",k.Icon_hairColor_37="9b346fd3-51b1-4f7c-9d0b-2e4cfd3138ec",k.Icon_hairColor_38="ba537540-2ae4-47ee-9024-33f678e78cf4",k.Icon_hairColor_39="fe784858-e7df-445a-bbcf-5f7a42d3ebac",k.Icon_hairColor_4="3e70d556-f75f-450e-aa30-d4efd1a5d885",k.Icon_hairColor_40="6f4d8fe7-f795-441b-a3c2-0773014acc29",k.Icon_hairColor_41="5c1bcdcc-2248-4e05-a7b3-0e82dd1ff4b2",k.Icon_hairColor_42="d69f87c9-f055-487d-b890-9d1dbc092fdd",k.Icon_hairColor_43="e90c5cf3-caf8-4bc6-a556-ad063d6adfc7",k.Icon_hairColor_44="4f36cffc-f8dd-49a5-baa3-0071298002c3",k.Icon_hairColor_5="5e22c25a-8ef3-480f-991e-30d07b82b39a",k.Icon_hairColor_6="ab08ae25-b316-4b45-82bb-eb5cc786e530",k.Icon_hairColor_7="5c1ebe60-5b29-48b9-8b5a-7e79b85607d4",k.Icon_hairColor_8="ff073fce-778a-43fa-8fa1-e1d05140ba9f";k.Icon_hairColor_9="897fd708-60a9-4188-aa3d-538816b3d611",k.Icon_hair_1="2807c0bb-bffc-4673-bc26-366c3fa1137a",k.Icon_hair_10="48f5cc9c-39f4-4548-8f99-e4515d8cee0f",k.Icon_hair_11="83108906-9fd4-47c4-8ee7-316cce1dce08",k.Icon_hair_12="d1b7fc90-7063-4a03-ac50-720581ef0704",k.Icon_hair_13="57cf7f6f-9340-46aa-8bc2-5eef1cfbf033",k.Icon_hair_14="034e0504-7870-4b5d-9d18-02f24ed70cb7",k.Icon_hair_15="feb79385-3505-49e2-b044-51f28c625f4b",k.Icon_hair_16="41edfe80-d36c-42c2-9e33-e3c9954db520",k.Icon_hair_17="093dda22-0397-4bad-a404-0953826c3bab",k.Icon_hair_18="ba379495-5a77-4580-b467-628cc9a83af9",k.Icon_hair_19="95791ed8-5d0e-41fc-b345-94996b7f3be7",k.Icon_hair_2="4b28281f-18a6-4a2c-bb47-20b7d9bd24b1",k.Icon_hair_20="31761abe-9b6b-4de8-852b-571a371be744",k.Icon_hair_21="0d016813-5172-4970-9870-c12ef748837c",k.Icon_hair_22="da2b7830-6db7-49de-a745-33c854180a44",k.Icon_hair_23="dfa8aad0-c719-481f-9819-1300071fdd9f",k.Icon_hair_24="48c40ba5-ea21-460b-bca3-c0a694770640",k.Icon_hair_25="33cec843-face-4b86-ac84-d65d92836deb",k.Icon_hair_26="e478b901-c6f2-4728-949c-1f3c3c9a4790",k.Icon_hair_27="b62c622e-236b-4820-89c8-1a55ff2bb026",k.Icon_hair_28="9df96bd5-b56f-4d50-96c2-03a42c2cce08",k.Icon_hair_29="56ec1b4c-d791-44e4-bb0d-d00c80dd1da9",k.Icon_hair_3="3f1983c7-ed98-46fe-abfd-6e6f7fc3d72e",k.Icon_hair_30="f9b35a76-83d3-4de7-a16a-aa081b4946e6",k.Icon_hair_31="cb71c0e3-b26a-417e-a4a3-a35f7ec33d00",k.Icon_hair_32="226e4cd9-4e20-4610-b070-dcd32842eba4",k.Icon_hair_33="b3dd7d99-4b9a-48fb-a659-c4f41722ac58",k.Icon_hair_34="e54bc531-d1d4-45e9-b82b-aef55f6d9e98",k.Icon_hair_35="611816e8-aa37-4987-991c-c499907dc4ef",k.Icon_hair_36="c5ce29b9-11a1-4cd3-8b09-943e5d5e7c87",k.Icon_hair_37="d37bc752-7955-414d-a944-82e8b72c5556",k.Icon_hair_38="71407641-e329-44d8-9aba-3255a2d2de56",k.Icon_hair_39="60831207-dae8-49d0-a4c4-6214a409923e",k.Icon_hair_4="57bbccec-0b21-4565-89fd-aafac39bd677",k.Icon_hair_40="54027259-964e-4440-ada6-3ab4bfe1bb87",k.Icon_hair_41="7b38e0e4-b756-4c2d-af82-c6b6abe832af",k.Icon_hair_42="8e41baf6-f35a-40a9-9fbb-3eef5bf439c1",k.Icon_hair_43="63529f14-18da-45a3-8b8e-34851d4f79d0",k.Icon_hair_44="44e7ed38-b04c-4c08-b149-b748bcadfb6d",k.Icon_hair_45="984bcce6-4a50-4c22-95e3-f78937767f89",k.Icon_hair_46="4e8644cd-6697-4526-a06e-9f37206bf0d3",k.Icon_hair_47="42bc1ccd-9676-4137-9db2-8f8f4dbb8d7f",k.Icon_hair_48="114a8bfa-3942-4b22-9d40-35bedcf5535e",k.Icon_hair_49="2e3186e7-7da2-44ad-979b-4469e2020a7d",k.Icon_hair_5="4db33606-9eb6-4244-ba28-306747e8d883",k.Icon_hair_50="b6b065d0-a144-4ceb-9aac-ab0d655c51e8",k.Icon_hair_51="c12f0e6f-c0d5-421a-b660-86aaf66e8204",k.Icon_hair_52="fe5d5c8c-c84a-4594-954d-33b08fcb408e",k.Icon_hair_53="8b35978d-46a2-4513-ad6b-b1a4b6c2a632",k.Icon_hair_54="1c444035-c494-4016-a43e-e158f91158c3",k.Icon_hair_55="cb2af9aa-f7a6-4964-87be-5b05d650d40e",k.Icon_hair_56="c2bffc4b-0a66-40eb-9605-e4d02ac9c5bd",k.Icon_hair_57="a4d500ba-6b81-4ace-88e0-590b12fb4a68",k.Icon_hair_58="4e2b275b-649f-413e-94f8-93dc46f51fa9",k.Icon_hair_59="5d94a50a-e00b-4476-8d14-912b4431aec6",k.Icon_hair_6="4e9e8092-2fac-47de-a70e-826771e56104",k.Icon_hair_7="38f4787c-2299-4d8b-9ebb-83c0d7da5ca4",k.Icon_hair_8="686fe7aa-e815-4398-9ae4-feb864c45bb2",k.Icon_hair_9="37d48da5-7981-4bf2-bc89-6d9a6e0c97d9",k.Icon_hat_1="83c3c738-d4a6-4124-8c24-adb6ca9461db",k.Icon_hat_10="b738e945-0d8f-4e34-ae3f-c6104413660b",k.Icon_hat_100="5bf8e5b2-4fad-4857-a91e-dfd37f64ede9",k.Icon_hat_101="841464b4-880a-4fa5-a0bf-2fdb5e640c6c",k.Icon_hat_102="5874d231-8e1d-40d9-9439-1bc7564a5bd6",k.Icon_hat_103="1c8b90d5-33c8-4135-923f-2db9241412cf",k.Icon_hat_104="4a05753f-ab15-4f5f-bdc2-4587049d5cda",k.Icon_hat_105="6a823427-b822-4afd-8516-aa10263f0a23",k.Icon_hat_106="b5d446f5-ef83-4cbe-aeec-d6bcc5f9e878",k.Icon_hat_107="da7bc4f5-d913-4d04-8f9c-2db156f2d0ba",k.Icon_hat_108="5de06206-799e-42cf-98e3-d41e8e5d849a",k.Icon_hat_109="55a17c14-2ec8-4868-b2bb-8db582237076",k.Icon_hat_11="1e5f339e-81d9-4a1f-baf9-3daa5d9733f0",k.Icon_hat_110="7cf646d4-9b14-446d-b5d1-9f78a889f6fe",k.Icon_hat_111="c839d016-d8ac-4271-9909-d1513718ad60",k.Icon_hat_112="4480926d-4ad8-4375-b737-15504a85ce1f",k.Icon_hat_113="c798cf5f-3686-4d96-ad08-33c6e8de2e9a",k.Icon_hat_114="80c627e6-0aeb-449d-a945-1bb00833e8bb",k.Icon_hat_115="93d44f92-3dbc-4b36-90c1-73d60aec1fa6",k.Icon_hat_116="2bd842b7-5b3e-4bd2-aaf1-1f37f1f2ac22",k.Icon_hat_117="e6f80732-f34d-4c4f-82a4-ae6a5f19872f",k.Icon_hat_118="48f36fbe-56f6-4b2c-9d42-d22f1963bf63",k.Icon_hat_119="f5437035-7618-45c5-a24f-9ee3f0f40252",k.Icon_hat_12="937dd47d-20d8-447c-91f3-0b2da91f7f37",k.Icon_hat_120="9fefe71c-7006-4abf-b571-a6a52be1e790",k.Icon_hat_121="e8d58dd1-aa04-43dc-9042-4db39dc74304",k.Icon_hat_122="8b05c2bc-720f-4eee-96a4-e5bd3a2d6ecb",k.Icon_hat_123="8ea12d95-4c11-4da9-804c-b2fa7de7e9c1",k.Icon_hat_124="af541447-2225-44a7-ad4c-dce519240cb9",k.Icon_hat_125="21444c38-6db6-4879-a998-956392e28024",k.Icon_hat_126="ab616468-d06f-4407-90d1-166bc3d7d41e",k.Icon_hat_127="bf8255dd-f2e7-4f76-80d2-1cc63f2c3694",k.Icon_hat_128="b5e872a9-43a4-4c23-83e4-ca81d185521b",k.Icon_hat_129="7efc0d93-00db-41ef-aaff-fad7976a48f3",k.Icon_hat_13="8230c60d-cc87-46c6-be44-77b99dcf8d0f",k.Icon_hat_130="17df02aa-c574-425d-8226-b77246c60a0d",k.Icon_hat_131="6e51c563-8806-4030-849a-700145ebdb64",k.Icon_hat_132="6575fbe6-14c7-4969-b128-108f40dea7cf",k.Icon_hat_133="8d097384-4bfa-4ae4-bef1-76a15823b2d2",k.Icon_hat_134="d5e4652f-e6d2-4561-8d19-66baf20c932a",k.Icon_hat_135="c00fb227-eb72-4e6d-ad0d-a5f401e806fc",k.Icon_hat_136="f891b2d5-ac3d-4413-b981-a692d808bf27",k.Icon_hat_137="23788ae3-2b83-42f6-b70d-78c417e7a356",k.Icon_hat_138="ae8bf3c8-0441-417f-a398-a33d924027a9",k.Icon_hat_139="fd78743c-741c-4cf7-bd23-6c4369fc1d0d",k.Icon_hat_14="7127c1ec-99c6-45ee-88c9-0aaef6485a93",k.Icon_hat_140="bad1d8a2-c9b1-4514-a80b-98a007e4e75d",k.Icon_hat_141="164d2de5-3ce4-44b4-86d4-cba0e3d06b4a",k.Icon_hat_142="0d00f58c-3527-4a00-a1a1-52452220a05c",k.Icon_hat_143="b2f82118-ba27-438d-957d-1c6266edf7fa",k.Icon_hat_144="5f580659-c835-45ce-9148-c316e6b9c9d4",k.Icon_hat_145="ca0b8956-3168-45a0-96d9-d14fe068c755",k.Icon_hat_146="b1cf7976-f3ca-4376-8077-9b505b33c54b",k.Icon_hat_147="280f453f-81a3-41d1-b85f-d6ba6b7f4907",k.Icon_hat_148="7789a31c-6339-4fbe-9e5f-0e724a536272",k.Icon_hat_149="6a1478d2-effb-4e78-a799-ffa7dd6bf915",k.Icon_hat_15="6009981e-b2b9-495f-aa9a-fc270b63fd86",k.Icon_hat_150="692472c0-e70f-4e21-b4b5-5161e5ad3ee6",k.Icon_hat_152="0ec17d79-a477-428a-92a2-9bd40cf0de12",k.Icon_hat_153="5de443af-4c13-4c6f-bc98-87a9d4a9d8f9",k.Icon_hat_154="0ac38bdb-f1a7-4ebe-9165-957c96497633",k.Icon_hat_155="e5793aaf-398a-4f43-b3fe-d137578a5927",k.Icon_hat_156="3c3d5fdd-b045-4b20-b85e-4afc1972011a",k.Icon_hat_157="e05567f3-ae59-4a1a-a530-4bf13554ee20",k.Icon_hat_158="b24c6790-33ef-4aee-93f5-2dc7110c43e6",k.Icon_hat_159="587fc5f9-7b45-406f-ae3c-7cfa1528dc75",k.Icon_hat_16="91fdbe11-0033-428c-9231-0f0fe7e2c5de",k.Icon_hat_161="765d5483-3428-4f55-ba61-417cb902fc81",k.Icon_hat_162="50aa34ee-67fc-440c-b3ed-080823c2b69e",k.Icon_hat_163="374d1be7-a3af-4607-bc0d-71907111f53b",k.Icon_hat_164="996167a0-fceb-4ab9-90f6-74ebb80f10ef",k.Icon_hat_165="9ca0d273-763a-4356-9495-08b128a88427",k.Icon_hat_166="e84b8a66-3172-49a7-a8e7-02dd2f1e3fef",k.Icon_hat_17="728d0d86-107b-4e62-816d-11c5dd111827",k.Icon_hat_171="313734c5-563c-4b9b-b039-2064c4689efa",k.Icon_hat_172="6fbfa08b-26c2-4450-a577-93f1d086124c",k.Icon_hat_173="2795079a-7e2c-430d-802e-c3ff8f248f06",k.Icon_hat_174="8acf9e27-6bcc-43fb-94f1-64b47df75cf4",k.Icon_hat_175="f8d03fcc-61a1-479f-9d9a-c3406fabb319",k.Icon_hat_176="946ccabc-5e76-4ea9-8d84-ceafdc31dd14",k.Icon_hat_177="920a8f1a-f406-47db-921e-e356d3d0ce16",k.Icon_hat_178="7dc7e0ba-76dd-41cc-90b3-3fc8a983dba9",k.Icon_hat_18="fc43b4d6-ca6e-44e9-928b-7037380acf78",k.Icon_hat_180="42188e74-b6e8-40f4-909d-b82e13dcf8f4",k.Icon_hat_181="0a401ed1-d560-4a44-8cc4-6316a2bb5827",k.Icon_hat_184="884806b0-4a79-4d4a-8488-c4f7935d7e58",k.Icon_hat_185="4de1b292-9748-43d4-8d31-4ec399a93412",k.Icon_hat_186="2c857407-d904-431a-ab52-d2ef3213e33a",k.Icon_hat_187="1f0b035f-6497-402f-b894-a107e1a58a30",k.Icon_hat_188="48e2c3ba-73d3-413f-b6ed-935ffde3b6de",k.Icon_hat_189="eae8b398-1166-4d26-bf35-84c74606476f",k.Icon_hat_19="cc2b13c1-32da-46af-bc77-528ffd4c5593",k.Icon_hat_190="9831227d-7a0e-465b-a48c-3e08d5598377",k.Icon_hat_191="9309524e-d3d5-40e7-b053-246de6a296fd",k.Icon_hat_192="21692d37-26f1-4367-bd34-c354abbe680b",k.Icon_hat_193="79659fea-ff13-4576-8dfb-b0f00e41a0e7",k.Icon_hat_194="4c58b4ad-519d-4b2d-9277-a98e6b254589",k.Icon_hat_195="e6581c40-6184-47e2-b5c0-21ac43e427c9",k.Icon_hat_196="e6f1ad1d-63b3-4de6-adef-fa1afb301217",k.Icon_hat_197="92928596-ca59-4fcb-bab0-db15786ef56a",k.Icon_hat_198="31ca4dc7-0b1b-40ff-828e-02d90aab1126",k.Icon_hat_199="399b2c57-e02e-4b06-bf74-40024f4a5d90",k.Icon_hat_2="12cdea03-a475-448c-b9fe-45a8a4d365ff",k.Icon_hat_20="4eff8574-5bc9-44c4-a2fa-b31d13d38837",k.Icon_hat_200="3474469d-d525-4d36-ab70-6991dacfd6e3",k.Icon_hat_201="e7d47a1d-a3fa-4e43-989e-b5614b38b10a",k.Icon_hat_202="20404a4c-1ede-4648-846a-ee0388013917",k.Icon_hat_203="f170eced-8197-4dde-979a-e97ae355d52f",k.Icon_hat_204="b5896c1d-abfe-4be4-91d4-8158a9f592ec",k.Icon_hat_205="e2f21a82-d7c1-4b62-b2a1-6d256e3665c7",k.Icon_hat_206="8f3832de-042d-4199-9250-181628e5a9a7",k.Icon_hat_207="1906df17-6efe-41dd-906f-c829b44b5de7",k.Icon_hat_208="2a0ed41e-da55-41e3-b455-3258ba8a897b",k.Icon_hat_209="7c71662d-1261-4e41-9250-6b927ae8b605",k.Icon_hat_21="8b353b41-2e50-442f-8949-df7cd98f7de2",k.Icon_hat_210="d0735b75-fdad-4403-92a3-2c103235c3f1",k.Icon_hat_211="ce8a9dca-2e0d-4196-bfc9-6e9c541f2567",k.Icon_hat_212="bbeec574-0c47-4973-8898-a5a54e6ffdae",k.Icon_hat_213="f1e361fd-684b-47c2-a9ab-d9ed8dc82f2c",k.Icon_hat_214="f83ec842-c1eb-4486-b09c-1f9c24bc8d43",k.Icon_hat_215="725467bc-fa0b-4a68-8673-4a605a3cf0e0",k.Icon_hat_216="f4d98661-50ed-4937-882e-ce7b6011622a",k.Icon_hat_217="45f5aa78-a6b1-4d5f-b967-b7f7ef41205c",k.Icon_hat_218="3dcbe2eb-f0b5-4367-b269-818609c3bcf0",k.Icon_hat_219="00b2f5c6-fe08-4b90-b0ea-4d3d32edcb44",k.Icon_hat_22="4f2720d6-d83d-4cd6-a44f-1c2842ece537",k.Icon_hat_220="ed760e0b-3e4f-4f3b-af74-bb4413841dcc",k.Icon_hat_221="97d20079-6ac1-4911-b9ea-98d6024510b5",k.Icon_hat_222="f64e3022-6f02-49e3-a6c7-c5d489ac267b",k.Icon_hat_223="d8164238-b80c-4221-bbff-5e6c112f82e1",k.Icon_hat_224="1a06e85f-5fc0-4db5-bbb1-a3ffa542c6d9",k.Icon_hat_226="55ff03c9-cb33-448a-aa3b-9d39ae0296f8",k.Icon_hat_227="896852fb-f6ed-40ab-ad50-2525f2330bf1",k.Icon_hat_228="f4891cb9-d329-44ff-83fb-b3af641b6e76",k.Icon_hat_229="a2123ac4-d643-4261-b796-236410f04d1a",k.Icon_hat_23="777f79e1-f83b-4368-83e2-36d70ae2c9a9",k.Icon_hat_230="63d1d0fa-efa2-47b0-8c28-c4ad60b85073",k.Icon_hat_231="b0e85db9-4eab-44f6-a821-7a2da256e2c7",k.Icon_hat_232="9b9ab676-907f-4fe0-ac8b-f7540cd768f0",k.Icon_hat_233="2d0e744e-551a-4194-b44f-d298a24fc15b",k.Icon_hat_234="a804a4a7-a3c3-405a-926a-5c5502adbad2",k.Icon_hat_235="0df8611f-81c5-4b0d-ad61-24b948e1a35c",k.Icon_hat_236="239e0927-a61f-4fd7-b6e8-da003b34fadd",k.Icon_hat_237="9bf538b3-1cd9-48e6-9a2e-5b490e3c98d5",k.Icon_hat_238="18f92cd1-3667-4b67-8ea6-c5e8290cc861",k.Icon_hat_239="32a28fc8-79d2-49d5-af32-007d1a76ef98",k.Icon_hat_24="911af0bb-71de-429d-8595-7a524b7270ec",k.Icon_hat_240="dd60d86e-cf5d-448d-94e6-c3159a9fa560",k.Icon_hat_242="a0517f1c-16d6-4dad-b42c-34395af3897a",k.Icon_hat_243="f11c8f2e-986e-4598-a1e0-b14f2acdeba7",k.Icon_hat_244="163b1bf1-b5b3-4ddc-92d8-c045ccf8c570",k.Icon_hat_245="068be377-06bb-4611-8ed8-11e44af86f61",k.Icon_hat_246="816d6ef8-f7bc-4510-afda-615237a85819",k.Icon_hat_247="826570af-65f5-4007-87a6-b6c3844ae5dc",k.Icon_hat_25="eafd6a6b-04a4-4514-9112-5f76ca923c0b",k.Icon_hat_256="a7b20dac-0e40-419e-8568-ab4ee971279d",k.Icon_hat_257="8bac1f24-945d-4f4e-967d-c0ae076d6475",k.Icon_hat_258="05ec0401-3428-460e-b339-766b7c792c54",k.Icon_hat_259="44451a60-e342-4737-b808-c08f91abeb5d",k.Icon_hat_26="1c1e526e-077e-48f1-92b2-e4a4fcde77c5",k.Icon_hat_260="78e7a333-23dc-444d-bfa6-f93d4b09ef27",k.Icon_hat_261="9d170116-b9f9-44fb-88ac-ec01efeb2e59",k.Icon_hat_262="18ffcbbc-c65b-4162-b17d-4933ad89d8e8",k.Icon_hat_263="09426a56-3405-45a7-92f1-1a243c2939b6",k.Icon_hat_264="3927e5bd-4b65-4023-9ae6-883013b2b0a5",k.Icon_hat_265="5da080c9-8b23-4ace-af7c-ed7a099c1ee5",k.Icon_hat_266="df81704b-0007-4228-8e51-79abf5fc3145",k.Icon_hat_267="22af38c0-1acd-49ed-b16c-d3fb16f10ca1",k.Icon_hat_268="c1520ad5-5ab7-4511-9f57-4de63e99b0b7",k.Icon_hat_269="7008f7df-e6a9-4ea8-a7dc-3dc8960c899e",k.Icon_hat_27="24c5ec58-7647-469a-b6e1-dee3be16b8c5",k.Icon_hat_270="0c05ece1-5b61-4c1a-9287-70998f811c89",k.Icon_hat_271="fe2877ff-1549-404e-882c-3caa5267999b",k.Icon_hat_272="bd59620f-aafb-41e6-ae19-21f4119581fe",k.Icon_hat_273="1caa5b01-fcff-41f1-9e71-81f1a0f2407d",k.Icon_hat_274="d7acd8d8-ce1d-42e2-a69d-5b9cf6a5ae21",k.Icon_hat_275="aa65a3c2-d5d4-4606-a3e0-02add5ecf9e5",k.Icon_hat_277="e370be3a-58cd-4374-a891-12e39c958f24",k.Icon_hat_278="9b3299fa-4c90-4fe2-a6c9-66bcd751184a",k.Icon_hat_279="ff4ed695-e2c3-4b83-a31e-3f7786d96758",k.Icon_hat_28="5db0ffe7-e8bd-4486-bfaf-6cc883ea6f37",k.Icon_hat_280="ecbcb6a0-666e-4b6a-845b-84188d45a74e",k.Icon_hat_281="da178f68-c6d9-48ec-96bf-3a5e98be580f",k.Icon_hat_282="5e8e7057-eb8d-4a38-bfa2-d51de3581d1c",k.Icon_hat_283="c031da89-5676-457b-879b-ce734d08ff51",k.Icon_hat_284="a639a955-ab23-475f-808d-1664c85db909",k.Icon_hat_285="01c96c3b-6201-43a9-bba6-47092307faf4",k.Icon_hat_29="2b3e409e-d912-4c29-ad3f-2a4da158a1cd",k.Icon_hat_3="b0272671-f7f0-4133-83c8-208bcd39c8da",k.Icon_hat_30="4b80292c-3245-4521-b10b-f9e515d33d7e",k.Icon_hat_31="86b45eec-156d-4181-bc0b-82b9df8c2a41",k.Icon_hat_32="f7273d6c-a803-413f-8d91-cc920f4108b1",k.Icon_hat_33="1e9e9336-22ad-4afd-bee1-cf8107a991f8",k.Icon_hat_34="f3fcf77d-72bb-4980-8e05-23e59facedbc",k.Icon_hat_35="0e62e3cd-58eb-4201-a15f-df7d9de27177",k.Icon_hat_36="2ce1efa9-9be9-4f8d-a632-2b3c64285a02",k.Icon_hat_37="1c8caf25-083d-4304-95fe-845780e84c8c",k.Icon_hat_38="972528dc-649c-4287-a62e-547c558b9d1d",k.Icon_hat_39="156b8d2a-d497-425e-97d3-7400843e8fd5",k.Icon_hat_4="66958209-f349-450a-9466-7c23bfd5ac13",k.Icon_hat_40="139fcf81-8a77-43b8-885b-d4ee14446d1b",k.Icon_hat_41="143df9f3-417a-418b-9e0a-bebb68dc4217",k.Icon_hat_42="5e5df52d-3228-41aa-8f6f-04f1cfa6a838",k.Icon_hat_43="8abea8e9-fff5-417a-a372-41332724f273",k.Icon_hat_44="d66eac26-d008-42df-ba9b-c038e994a70c",k.Icon_hat_45="e3d72c8a-9b34-4fb1-85b0-59fe16e68b79",k.Icon_hat_46="8dcce013-9234-4dd9-be1f-d78c1f49b964",k.Icon_hat_47="be8701f0-1b7d-47fb-8914-0504c787bb8d",k.Icon_hat_48="715a72b7-c9c8-422e-a708-8360259a9014",k.Icon_hat_49="6823fc1e-74e2-4e3d-9f2c-b9a70a1c37c1",k.Icon_hat_5="d8f1150c-8217-4048-bc66-ce7a29547f2b",k.Icon_hat_50="0fe80fc9-28be-4b02-871d-b2e43bf3a8a2",k.Icon_hat_51="446744cb-c21e-4b21-8edc-69eda4224b11",k.Icon_hat_52="99d6488d-79d0-4919-b2ed-65536940d2e3",k.Icon_hat_53="9fd53aac-8e0d-4c4b-ad9b-a830336f8bf4",k.Icon_hat_54="02a708b2-b01b-4f05-b0f3-808d7b030d2b",k.Icon_hat_55="f9a15dac-2319-4285-bc14-9a6c2d0424b1",k.Icon_hat_56="0e5bfed4-caf9-4006-8da5-64ee9461acf9",k.Icon_hat_57="27b2642b-12d7-464b-819e-c9b9d730d125",k.Icon_hat_58="31a9c26b-fd51-4296-a612-0cd19aad07dc",k.Icon_hat_59="56e517df-edb3-4722-8b56-8f4b2069bbb7",k.Icon_hat_6="5430ec51-f011-41a9-bcfe-82e3c5c1580b",k.Icon_hat_60="4fdcfe0c-857b-4ada-90e0-970b006ef492",k.Icon_hat_61="045775ae-72d9-4e56-96f6-422efcebdd1c",k.Icon_hat_62="09d01b1f-bfc8-48b7-bbab-70c6536c6e81",k.Icon_hat_63="9228d628-d84a-4805-ab9a-c24db7756d66",k.Icon_hat_64="77906366-aeaf-474b-ac74-c7ff1806ac42",k.Icon_hat_65="b317b135-5916-430b-9524-48f999c880e7",k.Icon_hat_66="ee68ce1d-325e-4510-a863-1b5eaf945c65",k.Icon_hat_67="2fe9941a-17df-44bf-a28d-e87cf7c98470",k.Icon_hat_68="cf4b1b97-e13c-4c73-a796-979962b4e9f9",k.Icon_hat_69="bc89e9dd-b440-42d6-a30d-15dfafe26436",k.Icon_hat_7="cdbd516b-257a-4d5c-a498-1da04ae4c169",k.Icon_hat_70="eb5dc320-7181-4499-822a-d9036a22f8d1",k.Icon_hat_71="c4d823a6-6740-4322-8b00-01113ee5dae6",k.Icon_hat_72="19031c29-b029-4189-848b-34ed9a093ca2",k.Icon_hat_73="acf565a3-7eb5-4a3c-9c29-098043263e6f",k.Icon_hat_74="e8fe082c-d5a3-4bbf-98f8-e12bde1c238f",k.Icon_hat_75="66562b33-cf91-409b-9368-9dbe6a7387b1",k.Icon_hat_76="e2d9cc50-fc23-4627-a8cf-3ac5ed295c2e",k.Icon_hat_77="0a711dca-c2de-48f3-89d3-38a2d00f58a3",k.Icon_hat_78="6da03329-f032-498c-b319-cb7fc107af5d",k.Icon_hat_79="d1b096c7-6a6f-440e-8058-cfb5de5f94d7",k.Icon_hat_8="dbda516f-5531-48f9-80a3-e342c00d7375",k.Icon_hat_80="d9a0c9e3-ea8d-431d-b78e-f8c712827400",k.Icon_hat_81="658c5918-2457-4018-a0f1-93b890f73459",k.Icon_hat_82="c91b41de-315f-49e9-98a2-e3457a3c6e41",k.Icon_hat_83="12ad06fc-90f3-4729-a5c2-eefeefb0d074",k.Icon_hat_84="3e863d42-348d-48bb-b729-b638a58372ea",k.Icon_hat_85="80eeb6ac-29fb-48b4-9661-756526c71c50",k.Icon_hat_86="85018531-0088-44a3-b29f-71418d5fa404",k.Icon_hat_87="8b73260b-e106-407f-a02c-d107428d66c5",k.Icon_hat_88="1c08179c-8b16-4bcf-956f-2bb394c79b34",k.Icon_hat_89="90375232-0003-4418-9ba3-fbca2d953851",k.Icon_hat_9="ba07e775-e0cb-4286-a589-01b3bbcb9f85",k.Icon_hat_90="bbb0445c-c542-4e80-93f4-d16627424ba4",k.Icon_hat_92="e4433a56-21a4-46db-8f64-c47dee3c66a5",k.Icon_hat_93="70d89f07-d4b9-4456-9b92-8191a09663c8",k.Icon_hat_94="4f939f9e-c59a-4afd-8556-0174e5dd839c",k.Icon_hat_95="45f1a49d-7c4c-4043-918f-c965f123f348",k.Icon_hat_96="aac92fcd-9d4b-464f-a7fb-2172c0decc61",k.Icon_hat_97="db8bd1fa-31d5-45f3-a5fe-ecdc4bab0a51",k.Icon_hat_98="3ea7869e-3c5d-4e88-a690-6c2bbbc89555",k.Icon_hat_99="f84e95c7-1f07-41af-936c-4b52500dbb79",k.Icon_item_1="c28bc24c-108e-47b1-9278-629243bb35b5",k.Icon_item_10="3581e864-dfc6-40c2-b4ad-782affa08a27",k.Icon_item_100="464ee508-cd46-4a1f-8a4c-42f7c61bc20c",k.Icon_item_101="17533e2b-cbac-4db2-a53e-3112a9ae915b",k.Icon_item_102="d2f4db06-9626-4619-afff-b3c218c4fcb0",k.Icon_item_103="f1413a28-eb78-409b-b921-6eeca411e2b5",k.Icon_item_104="70b45db1-1db9-4659-b800-17578c23f444",k.Icon_item_105="4ad06f0b-e22a-4da9-96a0-0cf37b4ef4a4",k.Icon_item_106="c2885800-9790-4d03-ad48-22012497109b",k.Icon_item_107="04439b1c-a6dd-4be4-ae72-c405bd1fa55e",k.Icon_item_108="95896e68-8382-4df0-93cc-aa9743a9df48",k.Icon_item_109="0459a50a-2b37-4d60-b702-520b03ce42f6",k.Icon_item_11="88007b8e-9c2a-4105-8527-4e2e57540072",k.Icon_item_110="1500f15d-f97e-4406-aab5-48b5ec2d0158",k.Icon_item_111="e348b650-f6fc-4329-91a4-5a1a16359bd3",k.Icon_item_112="5c020f94-9a7e-44c1-8264-8e85d15742e1",k.Icon_item_113="b7bf7131-2724-4113-8961-42becf87ed84",k.Icon_item_114="4b1424d1-840b-469d-9a77-b2a25ef457f6",k.Icon_item_115="d6a601ce-f3c0-4fac-939b-578ab28fc3a9",k.Icon_item_116="f4e3d488-2161-4d71-967a-a834cc32ef15",k.Icon_item_12="e796109c-bbda-4cee-b13a-2eba6e9f14af",k.Icon_item_13="332ebbea-1702-4776-8cb7-24ad2dd18c94",k.Icon_item_130="08413081-560a-40e4-be9e-911ba6953598",k.Icon_item_131="8237c26a-c49d-4c55-b24a-b14ada972540",k.Icon_item_133="4dc0dd9a-1079-40df-8ff5-0496e140333c",k.Icon_item_134="0fe74c15-6eee-4d1f-b342-cfaf6e2de05c",k.Icon_item_137="fce0a30e-1f79-4309-b26a-d556414faab1",k.Icon_item_138="befda432-e5e6-4ad8-b0e6-29edb5289c50",k.Icon_item_139="b5bf7042-d52d-49b9-ac53-120e87f71c33",k.Icon_item_14="e5482b18-ac73-409c-8201-2d7ea07c6a4d",k.Icon_item_140="86b39da8-86d7-4998-aa26-dfd19f84e25c",k.Icon_item_141="0cde3128-800f-4382-8a69-ab5b4dc2ae16",k.Icon_item_142="0aacc431-326d-4972-a415-893551290a8f",k.Icon_item_143="a245611e-35d0-40c8-905c-435c43f5d44e",k.Icon_item_144="6120a2ce-ae25-4981-9e63-2c9b3d61db12",k.Icon_item_145="deaf34fa-36d2-4500-8a13-ebbe8c3f4827",k.Icon_item_146="a982a91c-f90a-4ad0-8743-ca5177dc23d9",k.Icon_item_147="6f9d2377-5691-4434-b7e0-21dce49cdaff",k.Icon_item_148="c4532fbf-bcd8-468e-8d60-1d61c4e8e5e5",k.Icon_item_149="6ddd3fb2-fcf7-4025-83e5-5d84965ef1f2",k.Icon_item_15="1d6fd091-2bba-4dd6-b041-cca42b3d064e",k.Icon_item_150="1bbee42f-f224-4c23-9e34-fe44012e300f",k.Icon_item_151="e4e1f7c1-0215-4830-a820-d774a1537d1a",k.Icon_item_152="dc028e49-dd04-4c7d-81ef-73b0218132c0",k.Icon_item_153="1c9dea12-2b0d-4972-acf9-0d2498912f92",k.Icon_item_154="8b394816-1976-4ee3-b340-05d54be4bd27",k.Icon_item_158="5cba536a-4f26-4b4e-8160-14035a6ad213",k.Icon_item_16="21b10fe8-1553-413e-8f61-49ecf09a9331",k.Icon_item_160="a27cb228-52a6-40ff-94a1-f1763162c07a",k.Icon_item_161="2cc48a2f-afb1-4292-873a-a61ec973c2e0",k.Icon_item_162="c23d9fc6-b0e2-48e0-a66e-64bef6e49b2c",k.Icon_item_163="0e16c841-107d-4908-b657-3a3fbbe87731",k.Icon_item_165="399aa688-facf-49e9-be1d-3c080ec23b21",k.Icon_item_166="719e274a-f21f-4bb4-9a05-738244ed963b",k.Icon_item_168="707db873-6d6e-400d-af6b-3459239d3bbf",k.Icon_item_169="1fabbd26-cba0-446a-ba0d-c0634f9dfd18",k.Icon_item_17="ae439b5a-abbd-4a2a-9fa0-b34a0b0c0f4d",k.Icon_item_171="aedc669f-417b-4ab2-9bf6-d853df6eed4b",k.Icon_item_174="c6faa7d9-0e63-4274-9e91-68f4da9e92d3",k.Icon_item_177="35406c80-f8b1-4fbf-b56b-a5aedde671f2",k.Icon_item_178="49ba774b-3e31-40e6-8297-632b37a22f44",k.Icon_item_179="0685b7f8-d3ac-4bf3-a847-58fd93423472",k.Icon_item_18="5d3ec490-6c56-4fa3-b89b-1fb6576789a3",k.Icon_item_182="113b6498-3407-4fa8-b344-b56499d889fc",k.Icon_item_183="0f61441b-f215-4d11-8785-780a4b5fd00c",k.Icon_item_184="aab22ac8-70a5-4835-9aa0-3ef577604c59",k.Icon_item_185="e861f2f2-9cea-4236-941b-bea1ab32cd27",k.Icon_item_186="c640c920-ec00-4116-86f0-1d6ccd4aa589",k.Icon_item_187="4426b7fd-f0ae-4da3-baed-6c8c69aafab5",k.Icon_item_188="17792ef6-9f1c-4d3d-8add-84c3caac5aee",k.Icon_item_19="708c2eb2-2359-44e3-b26c-912853462131",k.Icon_item_190="4fa078b2-c6bc-4df9-be4c-25b576127d24",k.Icon_item_195="b1812d67-6d69-49d1-b1f7-4eac202bb261",k.Icon_item_2="ab67f0c9-5e81-46ae-95ad-5bf4cad5f462",k.Icon_item_20="3aba0d8e-8e26-46a0-a22a-1452d851c8b3",k.Icon_item_21="c1f16145-eeeb-4474-9679-4c2ec309cba1",k.Icon_item_22="d7ccb7b2-e8e5-4f96-af92-f31c60bf4d95",k.Icon_item_226="89175a2e-84df-48e7-9981-93129ad8dd7c",k.Icon_item_227="e422d591-b0ae-4f18-8cec-f9ffedd3fd58",k.Icon_item_23="31f3d781-a8da-4547-9ea3-18debcb82e66",k.Icon_item_24="356cc58c-93a7-4092-b227-dac51f716774",k.Icon_item_25="9dd2e323-89be-4f01-a02f-aae5bd4b0175",k.Icon_item_252="1bb43780-816c-46f7-a001-27584082c3b3",k.Icon_item_26="9b72687c-a3e2-463e-b138-1cb8931a28f4",k.Icon_item_27="5fb5ea15-8def-49ff-a6a7-3c1284f604fa",k.Icon_item_28="d2517577-8403-4097-ba6c-a2b9c067b7f3",k.Icon_item_29="83de7363-febc-4fa3-b880-e79173908d35",k.Icon_item_3="a0673e27-1302-43a6-b3bb-acbd0805c48e",k.Icon_item_30="d0597519-82c6-4344-a540-7f835db55d3b",k.Icon_item_31="34e79978-69af-42d5-a9ce-147b602a85e3",k.Icon_item_32="5b558436-c9e4-49e4-ae77-1fa5a9fe59e9",k.Icon_item_33="ba902f85-597f-46b1-ae32-571078a25bad",k.Icon_item_34="5e33f139-02b2-4bcc-8a8a-bef849130ab4",k.Icon_item_35="368079b9-3fa8-4e23-b8df-46b47f8d2a3e",k.Icon_item_36="846d615d-f9a3-48a1-b76a-28e4b3ad4d41",k.Icon_item_37="e5b588cd-1985-4c12-ad11-d760a2c2c950",k.Icon_item_38="5543109d-8c39-4fb0-b453-79b69c84b078",k.Icon_item_39="2c87d736-b041-4243-9d13-b251de4a8b76",k.Icon_item_4="225f24bb-9327-4b18-819a-d6d5cb1afe57",k.Icon_item_40="ef098807-3fcf-4699-8ae0-e0982c33dda9",k.Icon_item_41="160e9d85-6d85-4655-8cd2-5558ef188c33",k.Icon_item_42="a0e58984-d569-478c-bf58-d458d46f0263",k.Icon_item_43="85b12f73-564f-42eb-b5be-03403483421d",k.Icon_item_44="ba018f6e-e190-425e-aa57-f390824c6d54",k.Icon_item_45="64eb9ace-d4d9-4747-b280-fbef48d74c31",k.Icon_item_46="8e30cc93-3388-45e2-9f84-8b153cba7dd5",k.Icon_item_47="acf3d3f8-2f14-4f34-bfdf-1b05f5ea19e7",k.Icon_item_48="9b2d4fdd-fae8-499a-8bff-1cd021bf6b5b",k.Icon_item_49="85f34492-45ba-46e3-bb74-8f887d995378",k.Icon_item_5="2f28ff99-44db-4bad-90f5-3aa73c698d38",k.Icon_item_50="d33bf401-31ad-499b-aed4-ee90ebadf63e",k.Icon_item_51="b38d1b17-93dc-4a37-95d7-76372437a8e0",k.Icon_item_52="3ef1ec34-3f35-4b7d-8b4e-ec157de0adca",k.Icon_item_53="da0a679f-bccf-495d-8269-4c4c7b4595f1",k.Icon_item_54="9d63a785-eb12-4265-a95e-379d1d63ac89",k.Icon_item_55="2a3ed742-553b-4282-9e88-5611dd9043a0",k.Icon_item_56="153ff0fe-bf2e-4727-aacb-dfe9ef540d56",k.Icon_item_57="9f22852b-9b86-431b-8fd6-2144171c6d2c",k.Icon_item_58="7ec25aa5-7019-4472-adfb-8d58879c4ff4",k.Icon_item_59="35a0e7de-f7a2-40d3-a923-409c35ccd09b",k.Icon_item_6="81147664-6554-4bc3-a976-b70d6b5b26c6",k.Icon_item_60="55de3768-feb1-4326-a04c-e92ebb2f20db",k.Icon_item_61="b27315de-6121-4902-8e87-6ff4ccb560a1",k.Icon_item_62="0983b4f2-003a-42f6-aa6e-b2ea122601fc",k.Icon_item_63="58c95df5-ea60-4890-b058-03f166f374a2",k.Icon_item_64="61e18135-501c-4017-9c28-0221d93b39f0",k.Icon_item_65="ad5ae2f5-2507-41f9-a006-453820736d68",k.Icon_item_66="f2b27f2e-1a29-4ea0-b264-aa19eb71c7f1",k.Icon_item_67="ed5ab73d-40e2-433c-a16e-f838ee44bc56",k.Icon_item_68="4fc89434-f906-4d08-8120-12bcb7255412",k.Icon_item_69="9931d8f9-229c-4304-ba70-af341808fc14",k.Icon_item_7="126f2504-85dc-42c2-8704-59ff4014fd8e",k.Icon_item_70="395c60e8-087a-49d1-9c72-64f29bc3a132",k.Icon_item_71="37c130c8-5b46-497c-8862-136b638a1602",k.Icon_item_72="c468205a-8e22-4a96-9037-65762556bcce",k.Icon_item_73="b18e4901-c05e-4017-bf3d-584aeba7ed8b",k.Icon_item_74="cf615e92-36a5-426e-8ee9-2d1af77fbd72",k.Icon_item_75="fbd15ee0-a644-4851-b291-224588c61a7a",k.Icon_item_76="2528288a-931b-4462-bf0e-5bfdce0a86c2",k.Icon_item_77="19142273-1e8d-42bf-990b-7dfed0193d36",k.Icon_item_78="05fca2b0-fa33-4e24-9ee5-97e34dc97f46",k.Icon_item_79="e9b2e092-b406-46a9-84f8-f862ba9885b4",k.Icon_item_8="b9af1e9b-4e28-4fb8-8b1b-cf2fb12e3a01",k.Icon_item_80="3ae2e916-872d-418a-acca-c471461e3c40",k.Icon_item_81="82080e3b-2d3a-4afb-8041-20023b0796b7",k.Icon_item_82="90b17988-d18f-4311-9088-b5ceb8b54fc7",k.Icon_item_83="8cd1ea08-d7cf-48e6-bfd8-b121c7ad492b",k.Icon_item_84="c90d52ba-da0b-4c43-9741-798d077d3c0c",k.Icon_item_85="4789af0b-2bea-4ccd-8395-47ee19a9470d",k.Icon_item_86="d5be95fe-a705-4f8c-9e60-ee551ba9053a",k.Icon_item_87="dbdd175c-a7d9-47ea-a21a-a1c764e9a012",k.Icon_item_88="172d4cf3-d2c6-4616-bd98-833c35575ea6",k.Icon_item_89="3b9c0484-479f-47b3-9cac-d95e62d98e5a",k.Icon_item_9="17479d1a-6021-4ca7-b09c-9040febbfc29",k.Icon_item_90="1b3d6612-f49f-44be-bee6-71e8871f4fd3",k.Icon_item_91="0a8d1006-5a53-4532-a24b-0a9a1a4293a5",k.Icon_item_92="507c32e4-171d-41f8-a883-42f4a83af551",k.Icon_item_93="0a3121be-d920-438f-9566-5c35c9787849",k.Icon_item_94="4b160cf5-234d-4b1c-8877-f56dd810fa3b",k.Icon_item_95="f3c85530-2323-4ce0-93cd-372e6067cd54",k.Icon_item_96="aea041f0-9ac7-44f8-9d9a-abe37de7f062",k.Icon_item_97="f267db02-d23a-46d6-a9dc-f817209301de",k.Icon_item_98="39b6f144-7eae-4e99-a54f-db3e6caf2a05",k.Icon_item_99="06da5113-13b4-41a3-a9cc-b849fc746f01",k.Icon_item_crystal_blue="5856c054-1828-4319-a9d3-7a58e4d47e23",k.Icon_item_crystal_green="20e18e00-9b8f-4bde-96a6-30151026efb3",k.Icon_key_1="fc983d21-d667-49df-958d-8265c9c07820",k.Icon_key_10="0b425050-d879-473b-a1ca-86535e134227",k.Icon_key_11="845fbcb9-2df6-40d7-a43a-a738efe4cf8b",k.Icon_key_12="51ddfb3f-d561-4a98-b296-9c88b21d6624",k.Icon_key_13="6144f87b-994e-4477-a1c3-0c0a62216233",k.Icon_key_14="ef6ff44a-d309-458e-a232-5a706a6f1464",k.Icon_key_15="38f8016a-3103-4ba5-b50e-8e9a00a7aaee",k.Icon_key_16="282ecd81-12f5-40f2-bc33-394aa7bf3790",k.Icon_key_17="ccc64bfd-b7ba-43c7-9ea7-eeebe7b96c31",k.Icon_key_1_2="dac330cc-48f2-4197-a8e2-72c52e840719",k.Icon_key_1_3="5c7d10e0-1532-41f9-9407-1e0f88035644",k.Icon_key_2="d76ff4c0-f26c-4a37-8698-10db647afeb5",k.Icon_key_22="952c3956-ab1d-4a99-b8e4-d3b95a0787db",k.Icon_key_23="cb6de1f8-39b0-4f64-993b-cfcc52035490",k.Icon_key_24="c6990768-f6dd-4b44-ab11-be38e644fcf1",k.Icon_key_25="9c34de61-db9c-488d-b33b-9b5e997318f9",k.Icon_key_26="7396221d-93f7-4c33-8e1f-cd61fc6619ef",k.Icon_key_27="990377e8-367e-4c12-9385-96104e9a326b",k.Icon_key_28="00352b7d-1fee-4d09-a78c-3ff46377a4ce",k.Icon_key_3="e8fb53de-7f1d-4b47-b660-0a7d4779f879",k.Icon_key_4="62de2c82-7c2c-4de1-b06e-7a19481a9523",k.Icon_key_5="d94c6ccb-1f87-41e8-a12c-c6ac1596e1ab",k.Icon_key_6="528f162b-d9d0-4822-affa-0ff145db1391",k.Icon_key_7="ed5550e8-bff6-4ea8-9a9c-213934dc25c9",k.Icon_key_8="d8fe6ba8-87c6-4e78-8b75-cfc7b53379f0",k.Icon_key_9="a817653f-15f3-46b7-8131-60734727bcc7",k.Icon_level_star_med="899ba6bf-8c79-4ffa-9004-947be85c72ac",k.Icon_lock_mini_extra="d5ffddd6-74a0-48c9-9cd9-44725e94e2ff",k.Icon_member_plus_gold="b19a24c3-02a9-458c-a7a2-3adf8bacec7d",k.Icon_memberjar_stamp_red="156ff938-4e19-48c2-b1f7-943945c8a2ca",k.Icon_memerjar_stamp_red="772c9283-d5ce-46b0-9bfd-a88108b4ca44",k.Icon_mini_member="387a3f2e-81fb-42e3-b6cd-052bd7ea68a6",k.Icon_mini_member_b="f93e6aac-d71a-4d34-bc29-0fd8a548f2e1",k.Icon_mount_1="633cfe11-aa5d-4480-93d2-144deb98ad44",k.Icon_mount_10="db240479-96ba-4a5f-a199-342ed8c40066",k.Icon_mount_11="d4341d56-6f40-449f-9be1-b8783899bcb5",k.Icon_mount_12="4c779907-7789-451d-8fef-b663ad3eb716",k.Icon_mount_13="1d59ef02-b12b-4495-b8ff-2c592dff45a5",k.Icon_mount_14="5532f9fa-5208-428f-a105-257bc92a8b73",k.Icon_mount_15="cfaa348a-4051-4517-83b8-2ff3d45f1b53",k.Icon_mount_16="8d1b0ad7-9e67-4142-bd8a-75b3adf83f89",k.Icon_mount_17="14e9594f-5556-485f-8a15-bd39a18bf99e",k.Icon_mount_18="bd96d5de-2d3d-41f8-810a-3b7bb4d0aa3f",k.Icon_mount_19="88044a65-7915-47ac-a186-bfb68f15c166",k.Icon_mount_20="9cd067ac-f807-4352-a55b-7e107a647994",k.Icon_mount_21="d92c70fc-ae40-432b-88c4-f94cff3f1015",k.Icon_mount_22="9a67f631-3db4-400c-8f16-65cc5b44c545",k.Icon_mount_23="093b0f99-62ce-472d-90f6-5838138159b7",k.Icon_mount_24="6a45cf82-184f-435e-8e68-07b4711d9a7d",k.Icon_mount_25="d65bd238-1839-4d71-8af2-e866d11ae68f",k.Icon_mount_26="fd92671e-e04d-4da0-93d1-2af13f65a2c2",k.Icon_mount_27="79cd0342-d69a-47d4-8e3c-4cfbaf52a444",k.Icon_mount_28="0520053c-96d2-45fe-baf6-95e1da280965",k.Icon_mount_29="4817d1cf-3e4d-460c-9ea7-a5b90f98b9e6",k.Icon_mount_3="0753cba0-6e78-4612-9097-10b6d9c06629",k.Icon_mount_30="b3e17d18-8782-40ab-ab9c-f028cb129b27",k.Icon_mount_31="f8034b2f-20c2-4598-a885-b7ed45e199d1",k.Icon_mount_32="22544978-73c2-47b4-be88-5b961ca7d6c7",k.Icon_mount_33="ed5c74eb-db42-48a7-8346-5e318a170c41",k.Icon_mount_34="1c04756f-106e-4bd1-941a-1aca57145bc5",k.Icon_mount_35="c8b0cdfc-6831-4b64-aae4-9d6cfe5b282a",k.Icon_mount_36="1779a9c8-17b5-44f4-a57d-2bdc071284f6",k.Icon_mount_37="d2b823c7-c89c-4d78-8fca-e7356d821d8b",k.Icon_mount_38="e8b0100e-4d52-4260-b1a8-c38711b2ad39",k.Icon_mount_39="22c7c724-fa68-4f85-b611-9ca70582190c",k.Icon_mount_40="4b5e64fa-4d7c-47dc-8785-2637a3a128a3",k.Icon_mount_41="bc5e4d24-4694-4f45-bbf3-8c38408a2cf9",k.Icon_mount_42="286e449b-9499-4e2e-8283-e7d4b964120c",k.Icon_mount_43="8599ec95-d6f1-4300-bdd5-1d5876197732",k.Icon_mount_44="de0db092-6c47-4506-98c1-0d51c45463f2",k.Icon_mount_45="afba3547-b390-4d7e-969f-a9cac7ba14c9",k.Icon_mount_46="149ef81c-0f34-405f-bf8c-6350070fbe2e",k.Icon_mount_47="8155f91b-4ccd-41f6-aef3-0b0c698438bb",k.Icon_mount_48="8d0160e5-d774-4056-a029-97d7a2703329",k.Icon_mount_49="f0b21dd3-06f4-4c12-abc6-f5a71f0a28ef",k.Icon_mount_5="f6e2b0da-c466-4984-9a24-c11d46198639",k.Icon_mount_6="9c837b10-d0d9-44a3-b429-2e0f1a4ffe48",k.Icon_mount_8="f2d220bf-d036-44e0-af6d-9fdf340b4731",k.Icon_mount_9="f7dceac7-1b9e-46e8-b359-6d374d9a52a3",k.Icon_orb="74169e1e-fbd4-471b-bce9-378a06315b80",k.Icon_orb_1="7c6a477c-5de3-44b0-8abd-6fa0e505f9aa",k.Icon_orb_10="2771fc5e-953c-4856-9f11-f89112595e64",k.Icon_orb_11="aa0d0952-e1dd-4eee-8fc2-6d4583ee80ab",k.Icon_orb_12="42b722c7-fe7e-42a6-aa19-c32f1b75cc36",k.Icon_orb_13="f40e00e0-a079-4486-8906-27ce8246b4cb",k.Icon_orb_14="418de606-efb4-45ad-a658-c99ca88c3dbc",k.Icon_orb_15="18a53650-4d25-458b-aa59-e6c769897391",k.Icon_orb_16="661bc769-9b9e-4441-8f0b-e5fce6205594",k.Icon_orb_17="e7893e74-9042-4d0e-9246-bc2d34a97e97",k.Icon_orb_18="15ac473c-2b15-4f22-a64f-8eb62f3e8151",k.Icon_orb_19="1c113cbf-5e75-4622-a889-099892fd6b59",k.Icon_orb_2="d6fcaf4c-7b54-49a8-a560-28f3f4e7adfb",k.Icon_orb_20="b1c07f8e-43cd-49ba-b6e8-1dc3fbfac1ed",k.Icon_orb_21="1dde2b9c-a8b0-4576-857d-c5d4096d684b",k.Icon_orb_22="868cba1e-b67f-450a-9bc6-fb1eefd2a67e",k.Icon_orb_23="069eac6d-b4a9-446e-9d59-96032c4a01d7",k.Icon_orb_24="086362d9-e365-4eab-b4b8-a734eecb57d3",k.Icon_orb_25="c4497226-579c-4e0a-b103-15e8b7854c86",k.Icon_orb_26="9c4601ef-9872-42a6-9eac-c04edfc9e3eb",k.Icon_orb_27="152749de-4faa-4e4e-9097-678c7229f47f",k.Icon_orb_28="b0d4d333-e284-4782-ad44-1c3ed816d94f",k.Icon_orb_29="0503505e-6dc3-481a-b77a-80a3d2ba728f",k.Icon_orb_3="bf6cc21c-344c-44d9-9fdb-10e9526ebcdc",k.Icon_orb_30="aed5261b-1695-45c8-9f13-e5513bb9f64d",k.Icon_orb_31="9045fd6d-4282-4feb-87a4-64ef2be5fb5a",k.Icon_orb_32="7b8e338f-c490-41eb-b5ad-48e2889e094b",k.Icon_orb_33="fe4c421a-a834-4019-8350-902f737e9a1f",k.Icon_orb_34="0adeead5-504a-49d5-af34-df3d5706f45a",k.Icon_orb_35="d5774fd1-dc6f-4b8b-9971-0b8fdd838b4c",k.Icon_orb_36="fdca4e79-3475-4dfa-98a8-0171a9738bbd",k.Icon_orb_37="f9cbadfd-fd77-40f3-a0ac-fc3cb1303d2a",k.Icon_orb_4="7b500c3c-07c7-44d0-94dd-1d30e5337424",k.Icon_orb_5="96344b1a-21d3-470d-afa1-e7f7cf5270bf",k.Icon_orb_6="426678bc-f87e-43d6-aa47-8e8c5e46e343",k.Icon_orb_7="9e4b8ee0-6e1f-4ba3-ba92-b13fb711404f",k.Icon_orb_8="16f5bb0c-9fe3-4376-b529-c5ca0143c2a7",k.Icon_orb_9="d7a726de-9efc-41c9-b970-bde00d604c85",k.Icon_orb_bg="ab1a9324-c7c8-45ae-b90f-fd28ee66c54a",k.Icon_orb_no_tile="8bf05375-25bc-4146-9d0c-40b6510f6e5d",k.Icon_outfit_1="aa5408e4-3990-489c-8461-7c885d1ab04d",k.Icon_outfit_10="a8916acc-46ef-4128-ad82-fc02d27833b5",k.Icon_outfit_101="b759e17b-2221-400f-8ad1-68a49a20fb26",k.Icon_outfit_102="efaf3efa-157c-475c-bc31-bed2f3400dae",k.Icon_outfit_103="76ac2f4a-0209-44a8-8320-557b628c7ba4",k.Icon_outfit_104="54bfd668-282f-4f4f-88f3-3766719e3009",k.Icon_outfit_105="f5ddcca1-f853-4174-a2c5-050333a18a57",k.Icon_outfit_106="cc274cd1-87b7-46db-b787-1d24a4fb40cc",k.Icon_outfit_107="a53834af-ca26-425f-b4fd-9fa1d57a749c",k.Icon_outfit_108="35746488-a0e0-4539-8372-78f6802812d3",k.Icon_outfit_109="1152a304-c4f7-4298-838c-27d517242059",k.Icon_outfit_11="9aa82624-c056-453b-a905-89c191ac72d5",k.Icon_outfit_110="22464ac7-bbca-4cc8-889a-85772fc3ad4e",k.Icon_outfit_111="58f1590c-f52b-4154-b735-f6bd4915e767",k.Icon_outfit_112="cbfb82b4-4956-423f-a5f7-b560e66db773",k.Icon_outfit_113="5835bba2-3d5e-4c3f-9977-ce193f53387f",k.Icon_outfit_114="c7ee99b2-64d1-41c6-8c84-c3b9fcd9a09b",k.Icon_outfit_115="7fa982e5-6ea5-41b3-8fa5-f52bf6c7a724",k.Icon_outfit_116="ed557460-37dd-4db4-97f5-f3ce5c013880",k.Icon_outfit_117="920dc5a0-0c67-4629-9629-c14cf7a8aed1",k.Icon_outfit_12="86256a61-131b-458e-9929-20d98d75c78a",k.Icon_outfit_122="905ab1cc-7d75-4c26-bd46-4d528bc8e7da",k.Icon_outfit_123="eb345c75-5abc-480c-8c5e-caf8a7c406fa",k.Icon_outfit_124="093fef08-760b-42a4-af97-64778facfd73",k.Icon_outfit_125="dd209a4e-edb6-4906-bc9d-90725b1d30ed",k.Icon_outfit_126="29b77b02-7794-4c21-b127-8cca2f6bf50f",k.Icon_outfit_128="16835c33-0004-4e2c-ad84-a0b944d05c99",k.Icon_outfit_129="c4bedd01-6ec8-42bf-889f-07ef57aa8575",k.Icon_outfit_13="76640a12-0567-421b-ac71-7be05fe862a6",k.Icon_outfit_130="f67dce87-a994-4e33-ae36-b041d6cc2c4a",k.Icon_outfit_131="d7a9ae55-f9a7-4348-8c16-81251058c13b",k.Icon_outfit_132="d2735256-7f08-4e64-864e-b669bd6ab5d6",k.Icon_outfit_136="795f9757-9632-45a6-b7f6-be14b2494b35",k.Icon_outfit_137="89fd11ac-094e-412d-9f46-25d36cc1d36b",k.Icon_outfit_138="d48eedec-c0ff-4416-9b44-e30d4efdd6d6",k.Icon_outfit_139="295cde4b-f58a-4a56-8257-25d0b8bd66d3",k.Icon_outfit_14="5a37b019-1a80-47c6-9756-abb0fec87d2f",k.Icon_outfit_140="e6608195-4524-467a-accc-913d318ac287",k.Icon_outfit_141="5101ec39-b07e-4a48-bd4a-39b1db8b6a9a",k.Icon_outfit_142="cf7ca92f-b304-4db3-9ef0-c83875218092",k.Icon_outfit_143="c886e733-48bd-4cff-8f1e-47122d828fa3",k.Icon_outfit_144="c7bded28-4ccf-40ba-bf93-264baf8bb4bf",k.Icon_outfit_145="0602140b-32a6-4281-a0c1-32a1ded5e4bd",k.Icon_outfit_146="55004863-a237-4c45-9a6e-27edf0e0598d",k.Icon_outfit_147="af803fd8-75e3-43da-bf6e-ea1a05ecc7ae",k.Icon_outfit_148="baaf85c3-17c4-4327-9b5e-43938dd81251",k.Icon_outfit_149="3d61cad8-0b10-412a-a333-8f939c7b8923",k.Icon_outfit_15="b59f9b10-9585-45db-a58e-776906c963f0",k.Icon_outfit_150="21f86240-aacf-4b1e-a1a2-26c2e44c3831",k.Icon_outfit_151="6a8db283-e809-4e27-b4fc-d7ca80c184af",k.Icon_outfit_152="08950e3d-e6e9-4274-ab39-0bce7b1e6726",k.Icon_outfit_153="11ef4cd9-f531-4c58-b6cd-cbb74e75c426",k.Icon_outfit_154="28505ce5-ccd0-44f2-83e1-75d4398205a2",k.Icon_outfit_155="64b488ac-7d93-4bac-85d2-b8171db65896",k.Icon_outfit_156="4e3072ef-b976-4730-a37f-3ca230cfa669",k.Icon_outfit_157="620de052-0dcf-4b40-aded-bc2bf7ac0906",k.Icon_outfit_158="a45f24eb-bb71-4373-9e7e-010d00c98049",k.Icon_outfit_159="34cd719d-5e38-4e9f-9cd1-bd01030b4a57",k.Icon_outfit_16="87ec4602-7587-4745-bd56-7aaa5eab6f9b",k.Icon_outfit_160="0103a98a-7f7a-4c16-8764-6f9b3670092c",k.Icon_outfit_161="9fa40654-9389-4545-85b1-52667f6b58bb",k.Icon_outfit_162="d3ad9b3e-2aa5-4e9c-a97a-6600272d8b2b",k.Icon_outfit_163="06baad8e-47f5-4551-ade5-36aa54255bef",k.Icon_outfit_164="ca09c2fa-ee28-4f69-a3db-c547337a3e38",k.Icon_outfit_165="5e7dd042-a6e8-4d69-a129-7b69b5ad661b",k.Icon_outfit_166="fd8a6dda-69e4-48be-b140-ef87b19bb4db",k.Icon_outfit_167="951491b8-5548-4002-97f4-894f53710dab",k.Icon_outfit_168="a538ca6c-87c4-416d-90a7-f2f11318e36a",k.Icon_outfit_169="b60a9265-ccfd-41bf-9fd2-481dfbb34cb2",k.Icon_outfit_17="62dea1c7-89f1-41e7-bfc7-953e00f44d80",k.Icon_outfit_170="76efc3df-0991-4f69-82f3-69615ace972a",k.Icon_outfit_171="761f197c-68d3-43ff-9a9a-9675385f1766",k.Icon_outfit_172="a61f3ab3-d141-44ce-9e30-040c8db206eb",k.Icon_outfit_173="60133606-0d70-422a-8d22-4317ccb58398",k.Icon_outfit_174="01be9473-06d9-469c-baf3-6e4df4a1e286",k.Icon_outfit_175="d0c5659a-cdf6-4b81-bd3a-5165054be178",k.Icon_outfit_176="51bbc560-e49b-4bce-aec3-cc4e53561264",k.Icon_outfit_177="b81be64d-2f5a-4f1b-9fbc-acc0dc4f7952",k.Icon_outfit_178="e9b32f52-97d4-4963-b4a0-786c1ab426c1",k.Icon_outfit_179="dc8619bb-7e3f-4ed8-aea4-8db28121f53c",k.Icon_outfit_18="f09f5929-865c-45d0-bcaf-01ce4a35bebb",k.Icon_outfit_180="e3cdee93-c363-4dc5-9f06-64e28595e4cd",k.Icon_outfit_182="993f756d-b0da-428a-a125-298f956e32e4",k.Icon_outfit_183="8f8b99e5-5d54-428c-8d8b-47efb42349f1",k.Icon_outfit_184="c2a3ea43-54c3-43e5-a56f-98ae4c3c39fb",k.Icon_outfit_185="43da0402-8e47-4b0f-8bc4-9fd0ee2523e0",k.Icon_outfit_186="1b142c67-e2ce-4701-91e6-2b95f1072dd1",k.Icon_outfit_187="45a20650-1e8f-4eca-b48a-4ce69c05e173",k.Icon_outfit_19="e12498a1-689b-4e83-9b3f-3ad66e76818f",k.Icon_outfit_196="4b87b751-e2ff-4b8d-988c-6f3b9f19773e",k.Icon_outfit_197="d5977d02-cde8-487c-aa4c-711830fa88b5",k.Icon_outfit_198="b43cd532-e787-46ab-85b2-1948b625209d",k.Icon_outfit_2="3eef128c-ed80-413f-b3b8-3ffc1c5bd0ff",k.Icon_outfit_20="794d1937-a7ef-4ebf-8d4d-9e2b90685938",k.Icon_outfit_21="1171af5c-9d62-4ef2-820b-213d52a2eb74",k.Icon_outfit_22="5a5c8aea-0923-4eb9-8810-fe6dbf9e22bc",k.Icon_outfit_23="e327e577-3bcf-4c33-97c7-c8fef05e9da2",k.Icon_outfit_24="58e429b1-f783-421f-8935-c80e6ee3ab08",k.Icon_outfit_25="e6911d1e-70a2-41a9-8070-9724697641eb",k.Icon_outfit_252="72f3ae4b-4333-4244-ab40-333e3fecc405",k.Icon_outfit_253="ca07c5b0-55a6-4b0d-a871-2f24dcac0627",k.Icon_outfit_254="dc153bd5-2466-40c5-861a-ca6eb25f1b14",k.Icon_outfit_255="0626fd18-c549-4eb5-990a-1ceeab207bed",k.Icon_outfit_256="71621e07-74dd-476d-a4d8-164f706682e6",k.Icon_outfit_257="dda100dd-286e-44e4-8d3a-18a87e25448c",k.Icon_outfit_258="21d3fa7a-3b9e-41a4-bab4-8fa9ff0a528b",k.Icon_outfit_259="cfdf520d-8578-480b-9022-7fe0feb34012",k.Icon_outfit_26="c832aa1e-1b47-418a-8da8-b259f2a8f7aa",k.Icon_outfit_260="a91e2ab3-d417-465b-9cc5-86dca032876a",k.Icon_outfit_261="a6f4f4fe-abd4-45ac-bbc6-239557868e85",k.Icon_outfit_262="68b59abf-9821-496e-8b42-64be6d68c262",k.Icon_outfit_263="286e55c7-c17f-4f0f-bb42-340d7221addb",k.Icon_outfit_264="e33c46e9-4786-4bc0-93ed-18cecdede270",k.Icon_outfit_265="83ebe5e2-8225-489f-b01d-fa56aaeabe25",k.Icon_outfit_266="c5213bd2-b3fe-4e08-82b5-7046a0ace24f",k.Icon_outfit_267="ee3f92af-31ea-4c8c-a148-6fa2f0b592be",k.Icon_outfit_268="6b797545-ffb7-46bb-98bb-6d6ff645b385",k.Icon_outfit_269="fd75deba-0994-4e56-a481-06ea7d78bf00",k.Icon_outfit_27="e252deb5-77f0-4da0-b486-8db84721af7a",k.Icon_outfit_270="45aaff6c-6dfd-4bde-b8da-f2408394a6cf",k.Icon_outfit_271="91c8a4e0-2ff2-432f-ac42-78960808515f",k.Icon_outfit_272="4036d126-5382-4772-b77c-14e3344296f7",k.Icon_outfit_273="feea2a6e-7c12-44af-811f-10624a113103",k.Icon_outfit_274="f77bf6cd-46bc-4d7c-bc03-b97ab4f8057e",k.Icon_outfit_275="acfc8193-3459-48d3-b535-483427b0af40",k.Icon_outfit_276="3aeaab19-0f64-48a4-9a58-72be41c29668",k.Icon_outfit_277="d90fbdbc-d713-49f3-b0dd-3ffb36e8ad9e",k.Icon_outfit_278="550ed400-7c06-4d99-8d16-238f3a3a815f",k.Icon_outfit_279="e17304e1-54f2-42f3-8ae9-ed02f9bec30a",k.Icon_outfit_28="8b15dec3-1122-4c42-bd95-0e9e4f5e2fff",k.Icon_outfit_280="6835d9fb-1f22-4d7b-a6be-c4c48091880a",k.Icon_outfit_281="76e9130c-3e08-41b2-a090-b1b524353fbc",k.Icon_outfit_282="1651f77d-95ff-4206-98c7-fcad2b9dfa8b",k.Icon_outfit_283="09061397-4624-446d-87e2-975e51079586",k.Icon_outfit_284="24e5058b-5c7e-4310-b42a-635ba8377658",k.Icon_outfit_285="c16ed889-9699-4fd3-85a4-d353505326dd",k.Icon_outfit_286="30218f7e-1d21-494a-a68d-cb5bfaecd6dd",k.Icon_outfit_287="26a7ae61-acb4-4984-aebd-5f4ae6352de2",k.Icon_outfit_29="b03276c7-02ad-4e0d-b395-ebd08f7a0285",k.Icon_outfit_3="55cba21f-1883-46cc-a2e3-af2fdd2a9521",k.Icon_outfit_30="ee71f3d9-235c-494f-9e74-f79165af7734",k.Icon_outfit_31="8dc481ec-9ee7-40a8-b1d5-85eb36427034",k.Icon_outfit_32="6a14eb65-d317-43cc-9dca-9873aa0b58c0",k.Icon_outfit_33="a5f42159-f4ae-4469-b28f-8cc0b5d4be26",k.Icon_outfit_34="c14bc2ba-48f1-461d-b22b-572f30637f95",k.Icon_outfit_35="93b51503-7ce2-40fd-9de5-c4d7b21cbe85",k.Icon_outfit_36="4685b0ab-b6b1-4813-b800-0a4d0519c700",k.Icon_outfit_37="68bec49d-72bc-400c-a6ff-3a639dba34f1",k.Icon_outfit_38="16b48b87-89ba-4522-9778-0e6bae5c2045",k.Icon_outfit_39="3ddd8ea7-d686-42fc-a7d4-7bf71bd67b43",k.Icon_outfit_4="ba2ed472-ec02-4906-b827-a67ad2685035",k.Icon_outfit_40="9b31bbca-abff-405a-9a3a-21dbf6ec515d",k.Icon_outfit_41="22071a8d-7e41-4def-8b63-4958accca4d4",k.Icon_outfit_42="b289c462-cbb4-4566-9eec-16d345f20730",k.Icon_outfit_43="057d294a-8bc7-45b7-9e72-92eaefe03a57",k.Icon_outfit_44="e2a0bc00-f9e3-4cb9-9e57-e0fd600c125c",k.Icon_outfit_45="20c1bc76-82d9-4717-8488-ef1f1e7bd8e0",k.Icon_outfit_46="d94b5994-a3d4-4589-b18f-eafeab79f2c4",k.Icon_outfit_47="48bfe01b-1275-4d87-b548-109c30992aba",k.Icon_outfit_48="232ed203-5f3e-4e31-a82a-1e9ec4814d54",k.Icon_outfit_49="2cddf712-57a5-4332-951e-bd10fbdd6e1b",k.Icon_outfit_5="483485d3-f34f-43a3-b4ca-c614c5b4d56e",k.Icon_outfit_50="a96bb1a8-6bb0-48ea-b659-d1a411e3fea2",k.Icon_outfit_51="2d7ed46a-8b26-4579-bbee-6b526261e812",k.Icon_outfit_52="66cf33ea-5b3a-4bfc-aaa5-9f5e59acb5c0",k.Icon_outfit_53="efca60f9-ea7a-4477-9470-53fce1ee0d9c",k.Icon_outfit_54="9bd8824e-0374-48a4-b0c8-7c60443bc345",k.Icon_outfit_55="45c2e020-b277-41cf-b80a-f636e8107bd3",k.Icon_outfit_56="a205aaf2-f338-4c86-9092-a7014b651fe1",k.Icon_outfit_57="618442c6-2f9e-4e49-ab0b-c25f0c93fcab",k.Icon_outfit_58="38cfb2d9-0530-4837-9543-1bdc5401be11",k.Icon_outfit_59="d9d61971-1c14-4469-a8be-c2ec2406aa34",k.Icon_outfit_6="148af7f3-85ee-472a-a48b-e58299e578fe",k.Icon_outfit_60="99050f03-081d-432c-99d8-58e3e9c60023",k.Icon_outfit_61="4a58c7d5-e8dd-4633-9fe0-d5a2b5d1a54e",k.Icon_outfit_62="5ce34366-e687-415e-98d1-807f160ad4da",k.Icon_outfit_63="3b1fba68-bdec-41dc-8004-bf6d044765c8",k.Icon_outfit_64="96d9b39c-3192-4578-ade1-24f6636cf7ab",k.Icon_outfit_65="80eb4b19-f82c-48f9-91b9-b408dd30bf35",k.Icon_outfit_66="f68b0068-9322-477e-863d-5836b73d71ad",k.Icon_outfit_67="b3e64fcf-5386-43b7-a125-27f3010046cf",k.Icon_outfit_68="e90686f5-6c86-43ff-b302-c02915e8e908",k.Icon_outfit_7="83ef1da2-2dc7-4924-aabd-db53728a6fed",k.Icon_outfit_72="1e4d20e8-6f06-4ae3-bf91-a25f72a5e7c3",k.Icon_outfit_73="5cdcfeff-883b-4d07-8a65-bd92c498dc4d",k.Icon_outfit_74="7ddb1455-d95e-4c1a-81d6-e4b29c40339e",k.Icon_outfit_75="59856327-c047-4f66-a778-19ddb23431fd",k.Icon_outfit_76="725178ff-091a-4a55-9566-38485d1f3d8a",k.Icon_outfit_78="305ae860-01b8-4c51-8c93-40d34876986b",k.Icon_outfit_79="7c8f23a8-7b8a-42d5-9948-c3467b06a307",k.Icon_outfit_8="f5f2978e-525b-468d-a253-c36b28dea63e";k.Icon_outfit_80="6f4cca09-0ed1-4206-9b96-34592356fbf1",k.Icon_outfit_81="2bb53433-465c-4eff-b34f-6e10bea3df72",k.Icon_outfit_82="f6bb62e2-2903-4eb5-97fb-11d1cbcffdd2",k.Icon_outfit_83="df536a68-ff86-40f4-aa1c-552402ae5e8b",k.Icon_outfit_84="a3572ad5-476b-4674-8448-0896f1694b69",k.Icon_outfit_85="3e02e558-d780-4121-8e45-d962e055088a",k.Icon_outfit_86="ea65057d-a429-44d8-a260-4a9161782640",k.Icon_outfit_87="853e1dd5-0b83-4a37-ba47-24382ddc3b07",k.Icon_outfit_88="03fe7356-17ba-4b57-a5bd-3ee70e80425d",k.Icon_outfit_89="9ceba7f5-12e0-4413-8746-867189873f7f",k.Icon_outfit_9="649b26fa-b945-437e-9dc0-dfdd8a8901c8",k.Icon_outfit_90="8edbe036-d91b-4353-843a-7529d058ed86",k.Icon_outfit_91="009d6c9a-73e4-4168-a8b5-9ba2bf15389b",k.Icon_outfit_92="3db8800e-d9cd-4b7b-a5b4-d45243743cb8",k.Icon_outfit_93="e7de6c98-2f6d-4367-96c8-65250bd819ad",k.Icon_outfit_94="af78ec3c-2c75-40e5-81bf-dcdf6b1274b6",k.Icon_outfit_95="3e0f23e6-641d-40ae-93df-114edf2c9ceb",k.Icon_outfit_96="5655cb46-7ada-457d-9c17-0cd8803d418a",k.Icon_outfit_97="2593328a-82fb-473f-84f4-cbca828b8245",k.Icon_outfit_98="e0decf91-a6d8-4640-b3b8-56d00ccec493",k.Icon_outfit_99="74a09c73-d07a-4939-bc5e-3302c6658f85",k.Icon_parentgoal_reward="ede0b6d4-5d1c-4a0f-bc8b-043227065ecd",k.Icon_petHat_1="dbf56fe0-8f46-4498-a918-d18fe6d9a719",k.Icon_petHat_10="bcb74128-4244-48b5-bbda-0d63cc64feb3",k.Icon_petHat_100="7ad16a1d-a8ae-4678-affb-b7b7cf05c159",k.Icon_petHat_101="10e60bd5-520b-46ea-89e0-5480cc42bf55",k.Icon_petHat_102="8b564637-2fb1-4eec-909b-81286148eeb3",k.Icon_petHat_103="35287bc2-245c-490b-832e-4e02f1cff234",k.Icon_petHat_104="8537dc8c-8fb0-4399-b50f-d957eca4b744",k.Icon_petHat_105="80a8fa27-53a4-4ad2-872a-b48176a2da0c",k.Icon_petHat_106="b79a848a-c2fa-49e3-b8a0-8239c0e8c76f",k.Icon_petHat_107="0d20306b-8476-4d13-8c04-76abe38eff37",k.Icon_petHat_108="0ff4a508-d5c5-4ad5-a4dc-ea30f7d1aa39",k.Icon_petHat_109="4c37ba7a-3b72-4cdb-bf63-053b1531a0cd",k.Icon_petHat_11="bd0baba5-bcef-4d61-9f2a-9563aacd16a5",k.Icon_petHat_110="e21b0dec-8ade-4627-9466-88f3b040c362",k.Icon_petHat_111="81e0d6bc-f686-4eab-a634-2b3c94dfd78f",k.Icon_petHat_112="ea8d2068-7039-4530-9ad5-e512b958e49c",k.Icon_petHat_113="b9a1c66b-c7b6-41cc-8c9a-732c9cdaa7c3",k.Icon_petHat_114="d1571ed0-a803-4e16-a0ee-55540c6cf1eb",k.Icon_petHat_115="3cfef047-f091-40ba-adb3-9a25779af833",k.Icon_petHat_116="ffad8a4a-b8ab-4630-8326-1069a3921a0b",k.Icon_petHat_117="f992c5b2-80ee-47b4-8548-1f262c31883d",k.Icon_petHat_118="d561bebd-5523-43fd-9a6f-117e3d8db07c",k.Icon_petHat_119="eb89bb51-c5e2-4990-93b8-8fd073a3acca",k.Icon_petHat_12="ebaa6edd-dab2-4e50-8a5b-fca1c01e4e51",k.Icon_petHat_120="41a1f4da-326c-458b-a8cf-db8499803dff",k.Icon_petHat_121="cd3f9afc-6c00-417a-9e22-d083c131bdab",k.Icon_petHat_122="40a04336-824c-4902-a88c-4daf6dcbcb73",k.Icon_petHat_123="883ed28b-0f13-48fb-b56b-04928386bd0f",k.Icon_petHat_124="2876f462-bc98-45bd-af9d-4dc58e0db001",k.Icon_petHat_125="474bfb8c-0edc-4a45-b353-3ca56dccd0b2",k.Icon_petHat_126="05a16380-df72-425f-82dd-005d9d3f5596",k.Icon_petHat_127="0878ed19-48a9-40d1-9924-c6ddfaf189ff",k.Icon_petHat_128="8d67a164-680a-4c4a-ba23-9de8c8193180",k.Icon_petHat_129="6f450a5a-c60d-44b8-b8f3-20de300d6d14",k.Icon_petHat_13="21fe6a8e-191a-40fa-8b4f-b26d6afde6c6",k.Icon_petHat_130="66ecf655-edf2-47a2-9032-4eaa7a66a1db",k.Icon_petHat_131="4be0110b-7ab7-444d-b0ac-7dca522e4509",k.Icon_petHat_132="ce0b0d63-dfe0-4298-8218-efa1abe38e2e",k.Icon_petHat_133="de2c2c50-5e4d-4071-b9c3-2254c8dac526",k.Icon_petHat_134="de2e951b-ee99-4832-a955-60111219fe54",k.Icon_petHat_135="59226fa6-676d-48ea-960b-401e82df8acd",k.Icon_petHat_136="32752682-e22c-4b84-ba1b-9bab6c702162",k.Icon_petHat_137="6c3be92c-6636-4c83-94ed-afdc1b06f1a3",k.Icon_petHat_138="265f34e3-d191-44a1-b58a-11856ea056eb",k.Icon_petHat_139="0188f96f-298a-4abf-939f-9756eb651227",k.Icon_petHat_14="de4a3817-7a9e-431e-a69d-39462eb4d68a",k.Icon_petHat_140="1313d81d-51aa-4ab3-895e-b0459a3764a3",k.Icon_petHat_141="b08138b4-1ff4-4307-a8a1-18c2af8cfb9b",k.Icon_petHat_142="b5a19330-b41e-4420-a576-6db19a4602cd",k.Icon_petHat_143="04c0181b-a436-474e-8c61-997f8b59d79b",k.Icon_petHat_144="71d3c987-3a08-4588-a9df-227800b33037",k.Icon_petHat_15="990e7c7a-b431-4b65-a054-e9a2cbb10efa",k.Icon_petHat_16="8540d0aa-3dc2-4ffe-896d-53743afa7d94",k.Icon_petHat_17="50343689-7af3-47cd-878f-09210787b7ce",k.Icon_petHat_18="4590c43b-cffe-49fe-b9b0-5ea0893e0dd9",k.Icon_petHat_19="570e21e5-126a-49bd-b94b-ced79b81a091",k.Icon_petHat_2="602dcbe5-8e6a-40cd-bd88-a0a12ff079bc",k.Icon_petHat_20="2ca46ac5-cb80-4a40-983c-11bd8b43a770",k.Icon_petHat_21="9bbafe4e-df6d-40d6-84c4-8baf6ee93fb2",k.Icon_petHat_22="a085108f-bee0-4f0c-a6f5-976094cac23b",k.Icon_petHat_23="3aaca455-234a-4229-9b28-a52a352e917d",k.Icon_petHat_24="f601b0f0-1198-4180-9cc0-462222dd5e39",k.Icon_petHat_25="64592ed6-7a43-4789-8b6e-7f4581d805e5",k.Icon_petHat_26="cc43c8cf-f29e-4d35-9141-e00d99cd9c6e",k.Icon_petHat_27="0b7873db-2549-442e-921f-a5514a5c8b4a",k.Icon_petHat_28="fe4e797b-516e-48fe-9177-43e09ced9c6f",k.Icon_petHat_29="fdcaad02-2a19-4513-82d8-abb550e14a88",k.Icon_petHat_3="b06508a9-2c50-4e95-9b4e-dd60d26af9e3",k.Icon_petHat_30="8c222361-eead-49f0-b874-cc6131477450",k.Icon_petHat_31="9ea94d04-55c1-4bb7-b814-d30c11c02e20",k.Icon_petHat_32="06285508-5ab4-40e4-b08d-f5d9e59c261d",k.Icon_petHat_33="ec4a1612-b0ab-4b8a-a03f-88655ad6790c",k.Icon_petHat_34="6ae8bd8f-8cf9-46e6-90d0-1637849e7d34",k.Icon_petHat_35="8ed8ee8f-44bb-485d-84e3-ea28bcf4e530",k.Icon_petHat_36="88bcb349-7aea-4e4d-89c8-af557b5e2a69",k.Icon_petHat_37="be50c101-a1a5-4c39-b3d2-363fe194d2d1",k.Icon_petHat_38="deea4ecc-4b64-4bd6-844d-fe12d8855de5",k.Icon_petHat_39="e940fa05-b195-4d1f-952c-d3b131aeb7bb",k.Icon_petHat_4="a7149b1e-7327-4749-a0ed-604e6ebd24da",k.Icon_petHat_40="9bb5ed3a-be3d-432c-b1c1-ab637783d848",k.Icon_petHat_41="8eb64d2f-1ac0-4814-8744-0a91fcf04d04",k.Icon_petHat_42="d8296099-b3af-4892-a4e0-0d64a4572e95",k.Icon_petHat_43="2c266ed4-981f-4c94-88a9-b116ea70ca63",k.Icon_petHat_44="5fdee887-b915-4b3b-94cd-a5af2bf3fb44",k.Icon_petHat_45="6bc99eb3-3182-463f-98a1-d850462c6c3f",k.Icon_petHat_46="e96360a2-d57c-418e-beaa-b8d0502cd0ab",k.Icon_petHat_47="7709b7f7-a765-410c-b88e-1fe57db4409e",k.Icon_petHat_48="7d5daabe-35df-4801-9943-ac04277a3dba",k.Icon_petHat_49="0dba21de-b61d-4ed9-8292-bd1ec2878563",k.Icon_petHat_5="93da1fad-95d5-4c19-924d-5d99a91dcbc2",k.Icon_petHat_50="8e5d3a8d-b2a4-4171-97f5-36d31b40cf70",k.Icon_petHat_51="f8ce9124-ff4b-4f5f-b242-810b90b170bd",k.Icon_petHat_52="e4fc9154-9c31-4c7f-b5c6-ee44438e452b",k.Icon_petHat_53="af7f955e-ef58-4d51-bfc2-c673f233f5e0",k.Icon_petHat_54="148d55f1-9085-4779-9cb3-25d5d2b62139",k.Icon_petHat_55="64d7e433-7062-4fac-8902-3c56cd312b7c",k.Icon_petHat_56="e0616501-3be0-42b3-958d-922d6d74dcc1",k.Icon_petHat_57="872c7c0c-32ef-4cd0-a90e-0e4456a25731",k.Icon_petHat_58="c015d54c-f761-4563-941b-4071266d4f42",k.Icon_petHat_59="2038f9ad-0564-4eae-bb1a-0377303a8f10",k.Icon_petHat_6="bba112df-094a-4717-bd45-837b69b64bff",k.Icon_petHat_60="0aed10a3-8040-4b12-b21b-0c1bfe28808b",k.Icon_petHat_61="f7705761-25d8-4859-97a8-4afcd0309b83",k.Icon_petHat_62="019e7a30-a9f3-4046-99bd-4d94ca13cbbc",k.Icon_petHat_63="08c25ac1-5378-49a6-8668-2c077f1fd068",k.Icon_petHat_64="c3a81362-8ad2-4495-8b48-f7e5210ba768",k.Icon_petHat_65="45aed6e0-5d8b-4b4c-8305-bf7e2ec135a1",k.Icon_petHat_66="25157ea2-0382-4e47-9c81-34145ce135a3",k.Icon_petHat_67="89e3cad4-ff0c-4c50-be5e-e4413eb1fd70",k.Icon_petHat_68="ec3428c4-a6a3-4043-bffb-00d355c53dd8",k.Icon_petHat_69="ef3b77ec-e8c7-4698-a33b-a68387a58072",k.Icon_petHat_7="93f05827-1692-46bf-b7ee-6100eeebab3c",k.Icon_petHat_70="78e4293f-058c-4222-a934-6b719f2bf2a2",k.Icon_petHat_71="41036d01-db09-4f73-896b-2c7ee587a209",k.Icon_petHat_72="7bf4bbe8-5762-4be0-a1fc-b2c51e2b2e75",k.Icon_petHat_73="e34a8a1d-52ee-4316-bd98-5c788f5ea62b",k.Icon_petHat_74="aa97e551-dfd4-40e4-a94c-1ff76823116c",k.Icon_petHat_75="0f6fc3ea-de8e-43d8-9d3e-998e7453d25c",k.Icon_petHat_76="5269c359-72ce-40ba-a4ba-ca2276b799d2",k.Icon_petHat_77="fcfdeb97-66dd-4411-a1d7-ba2f0030ee6e",k.Icon_petHat_78="b658eaf1-d02a-4fa3-bdc1-8656eeb35849",k.Icon_petHat_79="1fcbebdc-91b9-4c92-9104-a77f5af22d89",k.Icon_petHat_8="2f6f2798-11d7-4fb8-95ed-6531f8694ee4",k.Icon_petHat_80="ee2295c4-5ac7-47c3-971f-282f9896cc33",k.Icon_petHat_81="642a302d-8d63-433e-8575-b7abc87fc64e",k.Icon_petHat_82="f3b93b22-e60a-4330-a3ea-0e1a2b3046df",k.Icon_petHat_83="4d2e7f5e-9e40-42d5-92b9-6e8687e713a2",k.Icon_petHat_84="33cdde68-4ebc-4e97-af85-f7e48e4f450b",k.Icon_petHat_85="34b7b8bc-cdb2-4d76-a7e0-e423de87d74f",k.Icon_petHat_86="80a36cb6-7739-4926-8813-4f0cc89eebc8",k.Icon_petHat_87="0dae63cd-04bd-49b5-9367-0a6e0ae1a163",k.Icon_petHat_88="69f89fc8-6442-4a69-8ddd-ff730cb08023",k.Icon_petHat_89="3663df5b-d260-490d-b7eb-7b7c35c88550",k.Icon_petHat_9="2ff73755-6221-4190-b47f-34ef609337bf",k.Icon_petHat_90="5a716845-1a91-4ea7-814d-69900fe6adc8",k.Icon_petHat_91="dcbe943d-a633-49a7-b733-420267d4c600",k.Icon_petHat_92="2ee01a4a-b6b6-4a14-8d90-c606ccd7a20b",k.Icon_petHat_93="7e938a27-5c7a-474a-ba31-8af87b589f11",k.Icon_petHat_94="5834a1dc-5bb4-4690-89fc-066137bcd396",k.Icon_petHat_95="11364d64-536e-402a-bc19-ce95e9062f16",k.Icon_petHat_96="2206bb5c-25e1-4c2f-9af2-4fecd629725f",k.Icon_petHat_97="7a460713-f483-49ae-a1d5-14613dae627f",k.Icon_petHat_98="8cdf2a43-2f1d-45c6-b19b-570db2066f1d",k.Icon_petHat_99="bbba5770-dc85-4583-ab88-d2f0ca22453f",k.Icon_petRelic_1="c3a08117-fc95-4d4d-8ec3-dd4c8562db8d",k.Icon_petRelic_10="f4c54acf-0289-404d-b723-6bb3cf019e6e",k.Icon_petRelic_100="f6df55ab-c24b-4fd1-94a6-abee23e2a6d7",k.Icon_petRelic_101="c346ab32-bde5-45b7-9881-a01e66eef3e8",k.Icon_petRelic_102="bca98c08-08f3-40fc-82e6-bda848fc81f0",k.Icon_petRelic_103="72ac5371-6808-49be-a37f-bc40908c74f0",k.Icon_petRelic_104="8f55161d-bc09-4af1-a8ba-17c43df89b89",k.Icon_petRelic_105="4e8c85a9-e19e-4bc1-96aa-8d66fefecc06",k.Icon_petRelic_106="175291e3-416f-4388-b5ce-4164f3ce5e36",k.Icon_petRelic_107="ac9b23f2-8cf0-4773-985b-2b67dbe3e7ee",k.Icon_petRelic_108="df6d98a1-991f-433e-ad6d-9a88c3bec43b",k.Icon_petRelic_109="a4d121ab-e632-4444-9a00-ec1fc933081c",k.Icon_petRelic_11="08132305-5d72-472e-a0b0-ac14b5af6ca9",k.Icon_petRelic_110="4169e9ee-f130-4500-904d-6fbda206ddb2",k.Icon_petRelic_111="e5ef3e17-4853-429e-ae16-a068cbae8e76",k.Icon_petRelic_112="7de451ed-fa87-49a1-9583-7d598fe22a6a",k.Icon_petRelic_113="06f418c4-e8a1-4962-8228-0c76bb359c8f",k.Icon_petRelic_114="a1d8bff6-56ff-4f5b-8a07-8a1f2d4a6c73",k.Icon_petRelic_115="9d568039-060e-4e4d-9744-bb22aae1c0a1",k.Icon_petRelic_116="1ace1825-a24d-4cd1-9497-16e11cc66b74",k.Icon_petRelic_117="1c8cb244-b1ef-431d-ab7c-aab40bde57a9",k.Icon_petRelic_118="f4cd7278-df70-4f9d-9d07-d3c1abcf4e1e",k.Icon_petRelic_119="1ca5245f-a73e-46c6-97b7-35c0de098644",k.Icon_petRelic_12="bdd30943-fd9e-4fbc-8b96-ae1b913f5705",k.Icon_petRelic_120="9f001c7c-2575-40ab-8d7f-de89c2bacdbc",k.Icon_petRelic_121="67a21fc3-5ee4-48c0-97c5-6a43c3a46e20",k.Icon_petRelic_122="90d481f2-8aa0-42a0-9a05-f901d10ecdc3",k.Icon_petRelic_123="e7330510-18ec-46bb-a53f-88d0461fcac9",k.Icon_petRelic_124="d18d48d3-1937-4dcd-aa84-0723c4af11a8",k.Icon_petRelic_125="f2249b45-dc91-4fc5-ac44-ba7af80ef7a7",k.Icon_petRelic_126="845c3722-ba83-4df8-b17c-141a4ab78b7b",k.Icon_petRelic_127="b4fe7de2-5dae-46df-8edf-195b3dfe1bc0",k.Icon_petRelic_128="f80b6ce3-33b9-47b6-af79-55ba7acf5a19",k.Icon_petRelic_129="04cb79ae-6754-47f3-9947-10ec723e09c6",k.Icon_petRelic_13="10457efe-9c66-413a-ba32-17df933a379a",k.Icon_petRelic_130="9d849481-e5bb-40af-bb60-142151750e51",k.Icon_petRelic_131="f7155b81-17f8-4d3e-bafa-7b45e3c4b30a",k.Icon_petRelic_132="286cb6c3-a682-4171-86a4-cbcea961636a",k.Icon_petRelic_133="2bc878f2-7173-414a-8b1f-1224259cfaec",k.Icon_petRelic_134="bbd27bef-6f3c-43bf-8ab7-a21d15a374bd",k.Icon_petRelic_135="a5f5df2c-81bd-45bf-b9ae-c112d26757df",k.Icon_petRelic_136="f8182546-9183-49c6-a9b2-d519292176c0",k.Icon_petRelic_137="c7407a6f-6603-4211-b2cd-5b746411fb85",k.Icon_petRelic_138="a9c245d8-e9a8-4acc-ad21-b8b6e545eb74",k.Icon_petRelic_139="5e169702-04a1-48fe-9e20-44bec6369cf6",k.Icon_petRelic_14="ee445a38-a93c-4b2c-ac59-387b52b26ebe",k.Icon_petRelic_140="1c270c04-9bde-4cc0-a9f1-e332296984ab",k.Icon_petRelic_141="de310b40-a29d-4788-9965-7de4f08cc3d6",k.Icon_petRelic_142="e727e5de-8e09-4a17-a0db-37e54562b069",k.Icon_petRelic_143="31cbfbad-0926-4760-ae9a-5e3238213c05",k.Icon_petRelic_144="d0d84a1a-3211-4de5-ab70-986e5c58ddaf",k.Icon_petRelic_145="0c58c073-07c2-48a2-8214-75feea7b089c",k.Icon_petRelic_146="e1a1880e-d966-4c88-a1cd-b849825668be",k.Icon_petRelic_147="d9bf4a00-14e1-4b54-8187-8827ad9d28e6",k.Icon_petRelic_15="cad35ff9-8c70-4dcb-94bf-e4afff550d19",k.Icon_petRelic_16="1f1d579e-f57e-4932-9203-db0adbe5fb14",k.Icon_petRelic_17="02ba7d2a-cdcd-408f-8263-6a15d299ad4f",k.Icon_petRelic_18="0149596f-0c48-41d5-a9a4-6404a3a41285",k.Icon_petRelic_19="1b5d5f56-e7d9-4a07-a401-6bd20e21eeb5",k.Icon_petRelic_2="41c8aa30-0a4a-4793-916a-a540626b8e07",k.Icon_petRelic_20="be9ce795-52cd-46bd-b02e-961b9cc19178",k.Icon_petRelic_21="61c03a4b-0f38-4afb-9e2c-042d9258c32b",k.Icon_petRelic_22="848fcda3-e8b5-42a1-9aa4-6e6181a37d2a",k.Icon_petRelic_23="ea122246-3a1c-441b-bc82-675db3827d4a",k.Icon_petRelic_24="8a6cdd76-a5a6-4375-a590-5f448769cb4d",k.Icon_petRelic_25="57760143-8375-4d73-8d3a-516b02ade43a",k.Icon_petRelic_26="725572b0-3470-491a-846b-e1c63c3776ae",k.Icon_petRelic_27="5736932a-4253-4970-a0ca-a2efcd26410e",k.Icon_petRelic_28="51572a65-a20a-4c9d-94c8-a3d16b4c83e5",k.Icon_petRelic_29="2a104474-50bd-4be3-afc0-91e9d046d2fc",k.Icon_petRelic_3="6a39c91c-424d-4cce-847e-733e63f20ab1",k.Icon_petRelic_30="591aab16-6046-4e70-a593-8ef178dcb96e",k.Icon_petRelic_31="6f0a2924-c9b8-4bb4-b0ef-a00e1363bb36",k.Icon_petRelic_32="d557c740-d924-4074-b99b-63e9ed454c83",k.Icon_petRelic_33="a01ee398-8648-48f9-9634-dae4295a2280",k.Icon_petRelic_34="f6c7f147-f5a9-496b-ba66-66632ea5c066",k.Icon_petRelic_35="5cbabe40-9466-4d39-9a53-2026f85563b4",k.Icon_petRelic_36="675bb651-1506-405d-b55f-148a799b336d",k.Icon_petRelic_37="20dc92c3-8f3b-42fd-9ffa-e6245c0028a6",k.Icon_petRelic_38="66596efd-8767-4348-87ec-e59255c18393",k.Icon_petRelic_39="fc348140-b207-4aab-8cc7-1fa54017faaa",k.Icon_petRelic_4="b08f7644-65f1-4f60-b0aa-c4d3ad8df440",k.Icon_petRelic_40="215669ff-4973-477e-b359-0c59dc54b3ca",k.Icon_petRelic_41="5c03f1da-1de4-468b-bf4a-17924a1d70cd",k.Icon_petRelic_42="b89d53b2-13a8-46d8-b034-29e481c4bc35",k.Icon_petRelic_43="74a46063-9799-4deb-88e1-13ebdf1bbd39",k.Icon_petRelic_44="259e3445-b76e-4749-a015-2e438aab086a",k.Icon_petRelic_45="b53982c6-658d-416c-a8a5-78c63256268a",k.Icon_petRelic_46="d31d1cac-811f-495a-8d71-cb62a4712ff6",k.Icon_petRelic_47="6c62fb1f-841e-4772-bba6-76f93346078b",k.Icon_petRelic_48="de8afe0d-140c-4810-949f-dd9080dbddcd",k.Icon_petRelic_49="7108bf88-9f44-4c05-af24-acf5b0e52205",k.Icon_petRelic_5="e5114c98-0437-41ee-9f97-b8ada3409fc4",k.Icon_petRelic_50="866245f1-2b24-4585-b407-cbd2e5be08e6",k.Icon_petRelic_51="d4002efe-0620-40ab-a6e7-0e93f48b66a8",k.Icon_petRelic_52="41ebbc79-2d50-4c58-b70f-5bbdb455065b",k.Icon_petRelic_53="233c734a-815b-4110-86f5-0af4b01d1a50",k.Icon_petRelic_54="980506b1-94ef-4545-aac2-5e0fc8cc6158",k.Icon_petRelic_55="cd7d2d34-577c-4211-96c0-fd0f0dfb552d",k.Icon_petRelic_56="5a380da3-46ee-4a7c-b085-f326ab323855",k.Icon_petRelic_57="9748eeaa-f90b-4831-9b6c-a774ce3cbe1c",k.Icon_petRelic_58="853f3535-4237-4dc2-ace5-3eedde739082",k.Icon_petRelic_59="78be87a9-9657-42ba-bfbb-59a144dfbaa1",k.Icon_petRelic_6="50506009-c7d5-4e7c-b437-a766c1b3825d",k.Icon_petRelic_60="a50379c5-d958-499b-bacf-f62f071a77aa",k.Icon_petRelic_61="2b6e7374-c07c-4d33-8f19-bfe620069f66",k.Icon_petRelic_62="8d72d4cc-6d6c-4610-a1a4-03dd6a935405",k.Icon_petRelic_63="1f8cf454-eeb1-4197-8a1c-c802d1e69fd6",k.Icon_petRelic_64="573a1790-7f23-48cd-b150-1a1b5a19b03b",k.Icon_petRelic_65="6ce024bf-58ae-4f21-a5fb-b5ce75d21aec",k.Icon_petRelic_66="51ed6f4e-d957-4eb6-bb75-0d71d882aee2",k.Icon_petRelic_67="f14267be-beb7-49f1-a46e-7e3b664abebf",k.Icon_petRelic_68="669419c0-dbaa-4c9e-922f-1c4c43f1cd3c",k.Icon_petRelic_69="efd65e10-7688-4aa9-9a80-00daa882f438",k.Icon_petRelic_7="0c25533d-f3a3-4462-a8ef-3f66ec73d9f2",k.Icon_petRelic_70="80cceb23-a19e-4420-87c5-7fb2b8acb32b",k.Icon_petRelic_71="5476f54e-9d10-4bb5-b75e-0bd10e3dcebf",k.Icon_petRelic_72="748de582-19cd-4d11-87f0-3dcc5e63120d",k.Icon_petRelic_73="737d89c8-1a1c-4b91-a242-8da0de7156d8",k.Icon_petRelic_74="8875dbde-d134-432e-879b-f97168b95a75",k.Icon_petRelic_75="d111c58b-6ce4-40d1-bf1e-f916a1791d6e",k.Icon_petRelic_76="3b20e2c1-7b2a-4659-8722-905236e1b3d4",k.Icon_petRelic_77="14d801e7-7bf6-466a-af4a-438da037a09d",k.Icon_petRelic_78="dba76b56-476f-4e26-8343-a398faf190cf",k.Icon_petRelic_79="77654186-50f5-4fe9-9244-eccdb006ed76",k.Icon_petRelic_8="66a79f17-4a48-4004-9fd2-3555a8ee2877",k.Icon_petRelic_80="1143256b-7fed-4ba5-bd60-14559a5cddd1",k.Icon_petRelic_81="925df444-2dba-471c-96ec-7038c2f1aa06",k.Icon_petRelic_82="643b5935-63ba-4685-8ec9-ef78d67d7eb2",k.Icon_petRelic_83="d129d11b-e095-43be-bfdc-e28792d391c0",k.Icon_petRelic_85="502d9842-aefc-4b27-ba86-8f885ba6071a",k.Icon_petRelic_86="cee2f1da-37e6-4826-94aa-c17d0d643bbd",k.Icon_petRelic_87="322b3a6e-aa5e-4df4-8e1f-d25206790d4d",k.Icon_petRelic_88="0bf7a542-b039-477b-803a-8ae062633790",k.Icon_petRelic_89="7b21effc-df2b-42ae-a1d1-27b8c399e20f",k.Icon_petRelic_9="1d3e41ca-c271-4e9b-afc4-a89b54e1cb08",k.Icon_petRelic_90="444ff143-949c-4ca5-8aef-194777e64acc",k.Icon_petRelic_91="0cdc1f83-1376-4957-9dde-61d5707dcdc7",k.Icon_petRelic_92="2c61b82c-7d66-4eb0-b0ef-21874c6fb31d",k.Icon_petRelic_93="b3999076-9b45-4f92-be38-27d8dc540930",k.Icon_petRelic_94="4de5dfa5-47e8-4e0d-89ca-28e132b9be47",k.Icon_petRelic_95="0c2b291b-df2c-40b1-ac61-5f685d8272d2",k.Icon_petRelic_96="cc6bc210-72d9-4771-8e85-501b4d938159",k.Icon_petRelic_97="e142389c-5173-47b1-8ead-8f16ce07a1f2",k.Icon_petRelic_98="cee0d115-00b8-486b-9c94-9a807dd9f549",k.Icon_petRelic_99="377730c6-c7af-4eae-963d-6d7bccd36c80",k.Icon_pet_1="89f2e5b5-4e68-426a-8996-0b2ff92ba33b",k.Icon_pet_10="3a84f536-f036-4eb4-9093-e76030ab2977",k.Icon_pet_100="178232ae-a644-479f-9033-f289fb36bb65",k.Icon_pet_101="755ebfcb-d8bb-43f2-9187-61f8d530c934",k.Icon_pet_102="e1000778-a6d8-4094-9859-525587e97e9b",k.Icon_pet_103="e1f9ca2d-3c35-4e79-acef-4d85d3e38e3d",k.Icon_pet_104="9e0854b8-38a2-40df-82b9-4a663ef38c89",k.Icon_pet_105="886a2920-5cf3-414e-8412-a0e82650d8f7",k.Icon_pet_106="a5f2f648-97ad-4e58-8ea9-0d053f97d10d",k.Icon_pet_107="f57236f7-cc41-445e-8fa4-7e4f4145aa07",k.Icon_pet_108="5a47eb03-3317-4460-9b9f-f6fa57bf6d4f",k.Icon_pet_109="398e8c39-34f5-414c-972a-e170dd2e94bc",k.Icon_pet_11="2c57f6e8-db7e-480c-b2a6-b5b9bb068fb8",k.Icon_pet_110="1442557f-044b-432f-b371-9ded98f8072d",k.Icon_pet_111="e2280efa-a2f5-41e6-9732-e33c17e8a9fd",k.Icon_pet_112="ea9ae3e0-9d22-4b2b-944f-2e907027a4c6",k.Icon_pet_113="612737a8-8c9b-49e4-8260-9ccb31c75d15",k.Icon_pet_114="ab92bb93-c0ac-456e-9c42-7d41e552eaf4",k.Icon_pet_115="3865777f-31e6-449d-967c-5b4f3270ec4d",k.Icon_pet_116="9896b846-2710-4d0e-9cc8-7d18cb151302",k.Icon_pet_117="99f095da-6cda-4bde-bdee-6a1b2bdacad2",k.Icon_pet_118="550d5658-ba12-4c1b-a159-b885f74845ca",k.Icon_pet_119="30081f17-e2a1-494f-ab02-ceb9523fdb08",k.Icon_pet_12="4bd51dab-4877-4b62-846d-ee64299be26c",k.Icon_pet_120="69cd1958-4506-41c6-b93f-dc4eda84731c",k.Icon_pet_121="bc2589f7-2a42-4ffe-820e-9e2c6eb993b2",k.Icon_pet_122="85aed590-d0ed-449f-8fe9-925f60b0df78",k.Icon_pet_123="aeb6d5e2-91d0-4550-a292-851279207f9c",k.Icon_pet_124="724a89c1-31b0-415f-94d7-637c03fb907e",k.Icon_pet_125="9bb148fe-bd7e-4c4b-a255-63ccca05f6fb",k.Icon_pet_126="283c5b3a-3a93-4dad-b47e-310b915a5391",k.Icon_pet_127="cd814ed5-b62b-4660-bf62-a6087fa4f66f",k.Icon_pet_128="8c030e54-e0e7-4cad-9327-a7f1caa7734c",k.Icon_pet_129="be297e96-812f-4610-b2d2-e6cb14f16b0e",k.Icon_pet_13="de026c00-5de9-4f91-9c9e-54c51f0327e4",k.Icon_pet_130="d4784480-f887-4e86-b4b6-9d34eb523030",k.Icon_pet_131="ad4bd5b9-eb01-4f14-9556-fbad7cf76cc4",k.Icon_pet_132="76edf52f-f3be-4996-9bdc-0fcea40e51cf",k.Icon_pet_133="df1543a6-1f8b-44c3-b4d6-3c380d706741",k.Icon_pet_134="fa5ccf4c-b38e-44e6-9972-c8f5c4b2c1ba",k.Icon_pet_135="f4d33b2e-3445-41c1-b60b-2c7c04867826",k.Icon_pet_136="d93e539e-53f6-4d48-b647-f4f2168b2d42",k.Icon_pet_137="56d66edf-a5b6-4e32-8c58-c68e3d74beb8",k.Icon_pet_138="ac100325-42a9-453d-a316-346590090791",k.Icon_pet_139="fc2bcfe5-9983-4201-b7f9-5d05f833c23f",k.Icon_pet_14="18b0c5ed-d58f-47e7-9b50-ba4124576f7c",k.Icon_pet_140="0d5d0284-4928-4424-8c3f-393b90560831",k.Icon_pet_141="20ca3bea-a5f9-4b66-98b8-416c8f3cde06",k.Icon_pet_142="60e043e4-41f8-4434-aa78-0be512b42017",k.Icon_pet_143="0cfee9da-5e01-4d14-a8bf-5418857749d5",k.Icon_pet_144="f091ae0f-ad90-49a0-b6ac-cb8fc041bc14",k.Icon_pet_145="fa3329bd-b8b5-46e7-a879-1dc06b7204a4",k.Icon_pet_146="397a8e25-3eb7-4d77-b121-87aff0782261",k.Icon_pet_147="d8ee6b11-2b7e-44e3-bcd6-d150714fec49",k.Icon_pet_148="1b71aee5-6076-4037-873e-0c6c697598a1",k.Icon_pet_149="5593d322-ade9-4c42-965b-1106db1fcd0e",k.Icon_pet_15="9312899d-6fc8-4737-92d4-2a6d31a3d7e3",k.Icon_pet_150="7dd9ac81-3ab3-4b83-89f6-2500bd71c3a8",k.Icon_pet_151="1411c933-c030-43d2-9707-735c990b6d0b",k.Icon_pet_155="e7ff6310-d342-4f5d-928c-d345572a7078",k.Icon_pet_156="5195096f-3085-4c3d-811c-adc4c845fba1",k.Icon_pet_157="8e1a4b6e-d9a9-4969-b09d-fbd3b2ed9859",k.Icon_pet_158="e56c2c41-fdb0-468c-b414-629e0e48b8f3",k.Icon_pet_16="666e1051-1265-49f5-9ab2-b86ea6d0f65c",k.Icon_pet_160="fc8915a8-0b61-4bf3-b6b2-0ddc2fafebef",k.Icon_pet_164="a6a6f305-a82c-4d72-8d60-1e288707e543",k.Icon_pet_165="2d93ee17-7da9-4fc3-ad7e-0a64cb99a600",k.Icon_pet_166="1e24f199-eef3-48fc-b752-b826323bf0ce",k.Icon_pet_167="023bb769-81c0-4f32-ba60-79c95dba45b2",k.Icon_pet_168="025e056e-d1bb-4156-8f15-a4b5da194f9b",k.Icon_pet_169="ac6c3a54-4274-4784-9622-fd9277005eef",k.Icon_pet_17="21f5f7e4-b1d9-4c3d-bfce-53d1b81b7476",k.Icon_pet_170="e9c9debb-8701-490b-b5e0-81a603cb424a",k.Icon_pet_171="10cc44f1-784a-4df9-a2e5-9af7e96376c6",k.Icon_pet_172="4c617661-def9-444a-81a5-e8915d32a27f",k.Icon_pet_173="f09ba7ce-d0f8-4b49-9fe2-8b6589eb7cb8",k.Icon_pet_174="6a1e3b7c-f7f7-466c-8720-929359429ffb",k.Icon_pet_175="657bd45a-e448-4a78-a625-9f276cafac22",k.Icon_pet_176="13942a09-4e19-46f0-95cb-3fcabc24148d",k.Icon_pet_177="5701d0e1-246c-48bd-b340-d6b9d362b88d",k.Icon_pet_178="10f4a886-7072-4582-aacb-e76a43373aad",k.Icon_pet_179="5559dac5-1368-469f-abda-4d5469185d04",k.Icon_pet_18="29626503-8d51-436b-a6ca-416e2e7de44d",k.Icon_pet_182="4e16e067-7e49-453b-ad91-8eae3c381a33",k.Icon_pet_183="3083f308-5469-4591-884d-bba9e4d17b45",k.Icon_pet_184="8254e112-885a-4c05-b0be-e64f697d198c",k.Icon_pet_185="dfae124a-f667-4e29-8229-fdbcc6416cfa",k.Icon_pet_186="d18fe0b2-f6aa-47cd-aa4b-9139be29419e",k.Icon_pet_187="ac5b141e-5d75-4a3d-96dc-46103fb056e3",k.Icon_pet_188="0f3cde49-b199-4e45-b44b-fde91328cf5a",k.Icon_pet_189="b09d6787-0051-4ca5-a6bf-6349d14615b1",k.Icon_pet_19="85d2512a-2003-4317-ada0-bdf023901234",k.Icon_pet_190="14780ab9-6393-4f5b-9eea-46990881a658",k.Icon_pet_191="f1862bc7-6afd-4687-a02c-99f6410bb77d",k.Icon_pet_192="296829ea-a604-4ff6-a9de-33ee1f39dcdc",k.Icon_pet_193="85c4d139-3376-4a1e-bc6c-47dabf4552d8",k.Icon_pet_194="f57e3db1-91bb-45d3-9cb0-24aa3ef2a984",k.Icon_pet_195="77c97bf0-fb39-4eb1-bc50-e49bb09675d0",k.Icon_pet_196="cd42b406-54f6-4bef-a836-6578ee474b31",k.Icon_pet_197="8ba93898-9f08-405a-aac7-58f5ace0aa82",k.Icon_pet_198="04d00093-3034-4b02-b93b-d138b2debf8e",k.Icon_pet_199="370220b5-d64c-4501-a43e-4ffcd92aa237",k.Icon_pet_2="f07b3983-ff1f-4a41-99fe-29aebbcd8b4f",k.Icon_pet_20="3d19cb2a-75eb-4410-affc-d9e848a138d8",k.Icon_pet_200="9ba9e56d-e375-4b7c-8e37-3e9a6b8cb1f7",k.Icon_pet_201="c7e0bc0b-c7dc-4fb2-8a99-d4d7eb9877fa",k.Icon_pet_202="83aab5cc-e40f-4390-88d7-69ef504014ab",k.Icon_pet_203="2c094c0d-81e4-4072-9c9e-f5eb39ab241e",k.Icon_pet_204="7a1c44ef-cd69-499a-8529-250f0a03a8f3",k.Icon_pet_205="e33e5c24-3d45-44c0-a6bf-e3a364c7de9c",k.Icon_pet_206="3e22f406-213a-43a4-bcb7-b03a028c5704",k.Icon_pet_207="e2875874-66da-4e49-9617-51f1d6c58a31",k.Icon_pet_208="57d9e165-eab7-4c75-a83f-2e44c1c66a32",k.Icon_pet_209="81af4662-0a2f-4b7f-89b2-e07fc1980d11",k.Icon_pet_21="37087ceb-6ef6-455f-98b9-c2b6006a7ce8",k.Icon_pet_210="973dd33d-34eb-4f68-bd48-b26303a8c4bf",k.Icon_pet_211="a29086de-6b7a-4083-a210-e75fbeda4a09",k.Icon_pet_213="bae4db67-690f-4199-8c23-bf0a310d45d1",k.Icon_pet_215="65e5236e-2d4e-4c9a-85d9-686cebb4349b",k.Icon_pet_216="f476c3fe-89cd-4f71-83d2-0ecf7c910444",k.Icon_pet_217="9cd7fd61-6408-4048-a039-e4924f43200c",k.Icon_pet_218="cd0f17cf-8146-4bc3-bb26-29f4250c6f20",k.Icon_pet_219="8dc0fe4f-01ef-4334-9dc0-ebb45ba26ccf",k.Icon_pet_22="f5ebc351-9ee4-436a-8342-378e794eb29e",k.Icon_pet_220="d9a2ef1a-698c-467b-aae2-1a62a384ecaa",k.Icon_pet_221="160978c5-fc42-4bd9-8c00-a90510893cc9",k.Icon_pet_222="5ab938ec-869e-403a-80a3-e0b59621d728",k.Icon_pet_224="41a7615e-5165-4de0-9b7b-b665f49c60df",k.Icon_pet_225="6212aaae-ebac-4784-8f3c-0c232a67b316",k.Icon_pet_226="ac63d8c0-a73e-44e6-bf9d-636290b56fb0",k.Icon_pet_227="d8944eff-9933-4e1e-90f4-e015bbfa2554",k.Icon_pet_228="a99ab8d2-a922-4465-bddd-8c7e217fba12",k.Icon_pet_229="cbc6bfbb-61d3-44d9-80e6-7a033ea4019f",k.Icon_pet_23="1e8635c5-6d93-4b35-897b-f3b4393bfc62",k.Icon_pet_230="bd15ebf3-20f5-44b9-a507-b286e75cc0a3",k.Icon_pet_231="c0a594d3-8f2c-47db-a280-4b096976c700",k.Icon_pet_232="045def76-c438-46bc-bc0a-ff8dea880686",k.Icon_pet_233="7bf7a652-7929-498b-baef-b658ca256b8e",k.Icon_pet_234="9cadec5b-a111-4e33-8e1a-290e3da018d1",k.Icon_pet_235="0e030649-36d6-4dd5-a75e-32b4290f0da8",k.Icon_pet_236="eb3bfd0c-9208-4ff8-bfb5-da5e917d927d",k.Icon_pet_238="eacc45a2-11cb-4801-aace-8495b1bf8ace",k.Icon_pet_239="ce8da52c-bce3-485b-9c64-cd0e53ef6b84",k.Icon_pet_24="de365346-e268-430c-8b07-3adefcf029c7",k.Icon_pet_240="449c81bf-3a9a-4edb-aaec-443dc2d5fae8",k.Icon_pet_243="f4aad299-f785-4deb-82f4-9c3398d79f44",k.Icon_pet_244="1ad2fb11-ee53-4bed-ab50-7f5124d4c8b7",k.Icon_pet_245="583fdb3d-23be-400e-8fe9-3a1282802d76",k.Icon_pet_247="5f9e9ff7-b1d0-4de5-bffb-0f6b081fae15",k.Icon_pet_248="5d5a0b69-6c7b-49e1-a259-afa44da8bad3",k.Icon_pet_249="3290fd9d-fa96-4db0-be39-ad1f0fa295e7",k.Icon_pet_25="6bc3d8dd-14c1-4abc-9211-6515b8e26628",k.Icon_pet_250="cc7a59e6-e759-44d0-9d05-3ae3cd4f49fc",k.Icon_pet_251="b12364c3-0cd2-4b62-a94b-c529512b2ffc",k.Icon_pet_252="79ae5896-3793-4594-b5f9-41a0c9dee2a2",k.Icon_pet_253="17bb74c5-0d27-4597-a3f3-b0a15d1733ac",k.Icon_pet_254="e4c9189b-cd3b-41f4-a528-b123c3f9cadd",k.Icon_pet_255="922a7db0-a56d-4a15-950f-ce91b11a1b89",k.Icon_pet_256="f31194dd-aa7d-4137-b22c-02f3e36e8047",k.Icon_pet_257="ef2ef063-3e58-4cb6-afe1-ec825543efb8",k.Icon_pet_258="005f6690-ca54-478e-8413-82fa609e2c6d",k.Icon_pet_26="8af7a915-8b78-4fd2-b398-aefe4556826a",k.Icon_pet_261="91fcc552-a6a2-49b1-86da-6a5612740eb1",k.Icon_pet_262="ed3dfe29-bd43-4b79-9a57-c5c37fe74c87",k.Icon_pet_264="d24f4c29-b5dc-4641-8c11-105897452a41",k.Icon_pet_265="52ede517-55db-4aec-a294-fc05b2729ff5",k.Icon_pet_266="f0b9a992-140e-4ef2-8705-470f0a99a368",k.Icon_pet_267="0a26ae8e-8c8b-4f7f-bf4a-01a42c8da6e0",k.Icon_pet_268="5eab656b-6de6-4e63-9625-6658eb8cd03c",k.Icon_pet_269="54414c83-77b2-43ab-a43d-9c4cfe98e761",k.Icon_pet_27="8dcae2e1-fbea-466f-87a0-31e7fbc4abae",k.Icon_pet_270="95be3061-0efd-452a-a868-c22174180eab",k.Icon_pet_271="e3b29347-65ff-402f-87a3-eb88f63562d7",k.Icon_pet_272="0e6ce499-96de-412f-b732-87ea3262d8d9",k.Icon_pet_273="238a9aa0-e874-4d1d-a358-b76f812ca1e7",k.Icon_pet_274="78bdf9a5-03b9-4f79-b8fa-6b07b82a3c14",k.Icon_pet_275="c6fefca4-dd71-4a1b-80e3-9a3ba1d95f87",k.Icon_pet_276="7552d19f-39d5-4fa6-8a14-3e2bee20f87e",k.Icon_pet_277="79e9285d-53a2-4fa3-9081-1d55c8fb3ce9",k.Icon_pet_278="f7ed8361-ed57-43b9-a284-ac3becb76c4b",k.Icon_pet_28="0d801036-f429-4d6e-a67f-60822c38bf76",k.Icon_pet_280="7869cda3-c5c1-493d-8b23-29fd4c219591",k.Icon_pet_285="4cab4bf5-4d14-45b6-8362-9dd19485038a",k.Icon_pet_286="abb466be-5764-4d94-8fb1-4b45976b39ae",k.Icon_pet_287="3c018061-8715-4d73-83b5-3474c03c0e7a",k.Icon_pet_288="6b8531d1-16aa-4478-9051-e2f6fc107f23",k.Icon_pet_289="19ba2513-96ca-4754-b1aa-8d0e0105984b",k.Icon_pet_29="d801a040-efe1-4834-8524-4f9cabffbf13",k.Icon_pet_290="acf70736-1e76-4b3d-b772-6bde3c4776f3",k.Icon_pet_291="28c4952a-8687-4123-a844-f49ea77c38ef",k.Icon_pet_292="6e80a34c-820e-45d9-afb8-f5b0bc688c7f",k.Icon_pet_293="a1bacec3-cc9b-4062-aac4-aef3a9de5a38",k.Icon_pet_294="753d880a-c490-407e-a56a-d2cc1bfce60d",k.Icon_pet_295="4c70f7c1-d037-4061-a418-556892e0894e",k.Icon_pet_296="1cf78eb4-7655-4822-a9f5-7dd744549a72",k.Icon_pet_297="0bf4889b-34b0-4d68-807b-30618c8784f2",k.Icon_pet_298="a9fe9c9c-3eef-4637-82fe-3c6ba599e819",k.Icon_pet_299="e18e90cb-d99a-499d-8c51-23ac46c2b82a",k.Icon_pet_3="136395ac-e6e8-4fc2-bb71-c86a67af4e78",k.Icon_pet_30="7eb8ee10-6faf-41fe-8807-eb7c0cb118e2",k.Icon_pet_300="9451ce37-8073-4024-9ba9-93523316df5d",k.Icon_pet_301="d590e4b4-b716-42c4-8202-30f9fe958ffa",k.Icon_pet_302="c862ce44-3875-4216-a112-1ce3eb7b34cb",k.Icon_pet_303="730a4328-c805-4922-9bcf-1aa12072b4e9",k.Icon_pet_304="149041c1-9caf-40ad-b017-6a1adfcf082a",k.Icon_pet_305="62c443c5-3e1b-43ee-a562-bcc7d2e5eef9",k.Icon_pet_306="15022e22-40ef-4079-a2e4-0873c6cd0c61",k.Icon_pet_307="20af6d66-b6d9-4cc8-9dd3-bc5258f48eae",k.Icon_pet_308="a474471f-1b15-44c7-ab82-7b7577389f7f",k.Icon_pet_309="693b741c-5ed8-4ab6-b64f-a99c8b8b3edd",k.Icon_pet_31="b29210da-c114-484f-85ee-9ac76041f576",k.Icon_pet_310="f17479be-7249-4472-b41b-a7871cb55a38",k.Icon_pet_317="4aa7d9ad-b6bd-4ad6-80c3-d048cfd6bba6",k.Icon_pet_318="69bfe033-d1e3-41e9-9e9a-5e78e3fb85ab",k.Icon_pet_319="d8d298a6-0ddd-4fb2-aedd-fb39fdd5fd54",k.Icon_pet_32="8655234a-babc-435c-853e-2bc82ea5b426",k.Icon_pet_320="e5f28e3d-44b9-445a-9ce1-b194d37e075a",k.Icon_pet_321="b8525ffa-2634-4915-9aa2-18949ca8bb3f",k.Icon_pet_322="33e0bd71-cded-4882-8c9c-9754ca0481c0",k.Icon_pet_323="d43b134b-8188-4842-9fbf-a5be2ad21a9d",k.Icon_pet_324="4aa9306e-1594-412e-a06c-b5083e0d9ec4",k.Icon_pet_325="ee058695-0797-43b7-b0d8-9c5aea490c6b",k.Icon_pet_326="5e0aa66f-8ef5-4c60-b850-57c1aaea2d83",k.Icon_pet_33="767d389d-2e21-4cd1-ab55-650862a61f7e",k.Icon_pet_335="e5b2d1ee-54ad-44da-8592-bee1859379f3",k.Icon_pet_336="9c419ecf-0bc6-4dac-9fb1-bf5ace95f91a",k.Icon_pet_337="ecac6dfb-109d-4ac5-bcbf-949727d4fe6c",k.Icon_pet_338="86fd9af0-8d45-4984-a412-d9c4d8056ade",k.Icon_pet_339="2d3fc3af-d440-4b41-9c23-ec55b3c589f7",k.Icon_pet_34="7ace47f3-88f9-42f0-b9b1-c10a0d1c16d7",k.Icon_pet_341="56165844-cdb1-4e52-98b3-31294a9ef59f",k.Icon_pet_342="bee9ae00-3069-4077-a529-5e599901ad4e",k.Icon_pet_344="04150b83-5d0f-4b99-aa63-ec5970a4c364",k.Icon_pet_346="bcf79a1d-c21b-412f-9e89-715110ecca33",k.Icon_pet_35="56dc52b4-ae15-4934-ae0b-7b9d80e90f84",k.Icon_pet_354="a6df914e-5188-473b-affd-1d5a5f0546df",k.Icon_pet_36="bb730c4a-1905-4abd-a0fc-92929029e445",k.Icon_pet_362="d1d9fdbb-851a-4684-8c80-b456de84a9d9",k.Icon_pet_363="f33ddf07-5132-4ec3-840f-179ae983ed98",k.Icon_pet_37="0fd3c25e-70d5-42be-a3d9-2c7e2e124b47",k.Icon_pet_376="41dd8ef8-b9dc-4aaa-8c39-0529e9394e45",k.Icon_pet_377="14b21375-f272-48b0-9fa2-57a06b8948bd",k.Icon_pet_38="e98f11bb-cb58-4181-bb5e-689b055f47e5",k.Icon_pet_385="0631357e-3fe3-4b7a-9848-aa96834d5b98",k.Icon_pet_386="52b1a34b-8b90-46bf-9e4a-599ff7953aab",k.Icon_pet_387="b29900a2-095e-4435-bb03-8e859542143d",k.Icon_pet_388="43eb47c6-d595-4c3c-a1aa-95d1c13a46e4",k.Icon_pet_39="5049949d-62b8-4c51-a847-b7d6cee35e25",k.Icon_pet_4="4b64f407-477e-47e4-a43a-331976c31c1d",k.Icon_pet_40="20510f0c-9f3c-4064-94c9-32b45e0c4acf",k.Icon_pet_41="eb27277c-229a-4870-a54f-0a643981beb3",k.Icon_pet_42="2674603b-cdb6-4dbc-b5b9-36b52b8ec688",k.Icon_pet_43="256a07ef-5fb7-4780-89d3-0629304ce672",k.Icon_pet_44="00a3e682-5c8f-4e57-80fd-183cabb647d0",k.Icon_pet_45="d729c4f1-dda8-4931-9b4d-7001e40e1039",k.Icon_pet_46="171c5a0f-fe0c-46a6-b2bd-adfee77bc7a2",k.Icon_pet_47="e4377cb9-78da-4c04-b6d5-c752fd151193",k.Icon_pet_48="fce2f75f-df5f-44ea-916a-28cdb2d190f4",k.Icon_pet_49="f69d6215-0325-41a4-8951-20475a5ab663",k.Icon_pet_5="bee9e786-13f5-49fc-9f87-ea287dd1cebe",k.Icon_pet_50="ca5de630-ce98-4826-a615-9cd84b8d6713",k.Icon_pet_51="b2743af3-0385-4bbf-981b-7355a17ec413",k.Icon_pet_52="023c0c17-76a5-4819-8970-8150ecfafa67",k.Icon_pet_53="d6d7becb-6c68-4b0f-8996-66a5006674a2",k.Icon_pet_54="ee8be7a9-d7f1-49f8-ba1b-54d517309419",k.Icon_pet_55="5cd49ecb-2bd2-4e33-afc9-847ae0824c1c",k.Icon_pet_56="c623fc25-a339-4868-9a83-0a54ca3b11fd",k.Icon_pet_57="627ef6f8-ae3a-4ad0-8f08-b5708f46edce",k.Icon_pet_58="d64241df-b154-4769-b2b6-11aaaeae2d43",k.Icon_pet_59="3790705f-8f0d-4ef9-985c-d8373ebf38f3",k.Icon_pet_6="ff0264ac-c226-4a41-906c-7c471ab34626",k.Icon_pet_60="39831cab-8e13-497a-8622-642fa7b89b06",k.Icon_pet_61="15052c6a-9bbb-4b0f-a5fb-10da40993bc7",k.Icon_pet_62="7abdce2d-125e-4308-b5e6-078a05bf807d",k.Icon_pet_63="382a6ddc-e030-458a-845b-28ed632217fb",k.Icon_pet_64="c1efe18c-b370-4fbb-93bc-d5ef2150c116",k.Icon_pet_65="0a82d008-d073-4cda-b343-11750203bf29",k.Icon_pet_66="28681a85-11e3-40b6-92f6-97279248445e",k.Icon_pet_67="c14aeb8a-262d-42b8-b427-3cf5719301c0",k.Icon_pet_68="cfec73ea-0041-41e1-84eb-1e2eb0e116ff",k.Icon_pet_69="fd54b60e-e748-4c43-b838-9e6b5a5f5998",k.Icon_pet_7="17ef1360-064a-49d5-a900-f0e1ac2b9e6a",k.Icon_pet_70="260787f1-7d79-41a8-9a64-a94fbdf915ba",k.Icon_pet_71="858d4414-0eb0-42df-bcae-9133df1a28fb",k.Icon_pet_72="1feab39e-1f3d-450f-ba45-7e5ee80b439c",k.Icon_pet_73="14f34a3f-e2df-4fd3-909e-c42e7dc15efa",k.Icon_pet_74="35036827-1d54-4436-908d-8a895e3b846b",k.Icon_pet_75="830e1cb0-f186-487e-b8d8-9d4aabd717bd",k.Icon_pet_76="dd175def-4b40-49f4-895f-074810edddde",k.Icon_pet_77="81ab6e61-2caa-4960-8df8-4ffd923cd6d1",k.Icon_pet_78="0e280f1d-f336-43d0-8dfc-b08adcbe298b",k.Icon_pet_79="5de29130-ab78-435f-8386-f0ca03ffd633",k.Icon_pet_8="0de9a823-1f4f-4b33-9ea2-e86653550033",k.Icon_pet_80="e6ee9a05-0acb-4f6f-a8fc-138675ef3173",k.Icon_pet_81="b91145af-b859-4143-bff7-25af01224c8c",k.Icon_pet_82="24a93254-1b69-4c0a-8ea9-184e73fea27f",k.Icon_pet_83="7ec4ebfa-0dd0-4f1c-a597-a39e37d61818",k.Icon_pet_84="c0f4c22e-de7c-4143-aac1-d7e34ac53537",k.Icon_pet_85="83bb2c89-6abd-418a-b9cf-5a8e99380bff",k.Icon_pet_86="8545603c-6323-41a3-ac40-239811ce4ba4",k.Icon_pet_87="8365782e-e854-4d77-ae03-a46cb14fa24c",k.Icon_pet_88="ac845260-34db-4d17-bea6-89093ae6b425",k.Icon_pet_89="d2101bb2-7778-4d1b-a5a5-d2790ddd2a57",k.Icon_pet_9="93386d4d-18b5-4c6b-b8cf-954794cb1f33",k.Icon_pet_90="ee454e4b-4df3-4eb7-8a7e-602900460196",k.Icon_pet_91="47d3016e-a1b5-4a64-a359-d0e87e28b83c",k.Icon_pet_92="791ac06e-beb0-4ff4-98e8-c34e5988862a",k.Icon_pet_93="196658bc-f5b6-4d61-b7f6-447346e35825",k.Icon_pet_94="964c71d1-2123-4f41-82fc-b80256c15dec",k.Icon_pet_95="d85eab5d-0ee2-4462-b0ba-595c4222d31c",k.Icon_pet_96="9103b2ba-a9b1-49fb-a930-26a7146d646f",k.Icon_pet_97="478fce77-ab3b-4136-a2d9-69e9e4a539c6",k.Icon_pet_98="48e8753e-9c12-45e5-bff1-3511b814cc61",k.Icon_pet_99="b160be6b-69f8-44dc-ac75-45f09e050e97",k.Icon_petbook="ca22ad66-a188-4ccc-ad4f-97246ba1198f",k.Icon_petevolution_indicator_arrows="75e13af6-4197-4e28-a97b-796dc52248ef",k.Icon_playbutton_default="b1372680-b831-4362-b110-36d2d5d78bf7",k.Icon_playbutton_hover="0ad145b7-0b3c-45b1-a038-c0d58199bbd0",k.Icon_plus_bonus_reward="84e9759f-d023-453c-a59c-c39b6fa484fe",k.Icon_plus_teal="13df7598-587e-4da4-8615-fec2403e6046",k.Icon_prodigy_points="df496067-fbfa-4688-98db-7063119aa2f5",k.Icon_prodigy_points_mini="9d568b0c-e62d-49b5-81a8-da177b3694a5",k.Icon_relic_1="5d15829e-771e-4e47-8701-c46a25a118d0",k.Icon_relic_10="b671f9b0-2838-4fd6-a501-6b9949b9d6d3",k.Icon_relic_11="ec4af452-4e98-47c7-817e-edff539a4b0c",k.Icon_relic_12="6e1b22eb-8b7d-4a79-9b40-b8506db62cc9",k.Icon_relic_13="42c1b3cb-7126-473a-8ada-66a2cfc881cd",k.Icon_relic_14="3029e7f4-8635-4855-88e4-c51cca0c0dda",k.Icon_relic_15="6dcfc0af-60c5-4ff4-b5d4-671c63c922f3",k.Icon_relic_16="1990291a-2d26-40d1-a0bb-b545d0541369",k.Icon_relic_17="aab38410-4959-4c4d-9f90-9ca215540393",k.Icon_relic_18="8c98ac0b-7498-4ca2-8a19-99f0b447ad16",k.Icon_relic_19="4bfe853c-7155-46a6-9b26-74cb85f95cdd",k.Icon_relic_2="87a32d98-1f7e-43af-88dc-bb19fdff9eaf",k.Icon_relic_20="9122670a-d415-4582-9d28-8a049062067e",k.Icon_relic_21="7a0dec3b-3f62-4e04-b0d4-e71b03edb296",k.Icon_relic_22="463e7ded-4742-4be5-8765-42d53da9dbc9",k.Icon_relic_23="b5d96e9e-ca88-474a-9daa-b6def00deb25",k.Icon_relic_24="9c3bbbb9-e19d-42a0-b1e8-035e974b082a",k.Icon_relic_25="0c2966b5-2aa8-41a1-9579-ab20e37004d6",k.Icon_relic_26="bf3feeb9-dd65-44ba-b25c-f80792b1794f",k.Icon_relic_27="31cb6d80-eed4-4dce-8a4f-11798ba8ac1f",k.Icon_relic_28="eca26b49-978a-4286-8251-dceda83d2a56",k.Icon_relic_29="bfa96adb-aa5c-4da3-be06-e59c754e7756",k.Icon_relic_3="6e5d7f7a-c3d9-4fbf-b051-f8be53dc3195",k.Icon_relic_30="79a7fdb9-ebf4-4149-9904-6155d5385f92",k.Icon_relic_31="d13a7e38-4d63-4a11-a9b4-c387000bfad8",k.Icon_relic_32="3f1e5d9f-43bf-41e0-948b-8bee96cfa260",k.Icon_relic_33="85fd49c8-e334-4dee-88dd-c87a1e755a20",k.Icon_relic_34="b26c2dde-3103-4aa0-b524-2f50ee703685",k.Icon_relic_4="98768dc1-8805-4914-ae39-0e176741a3e9",k.Icon_relic_5="174a9cd0-a127-4cdd-ac8d-31d0fd2446b2",k.Icon_relic_6="a21c273f-7927-45d9-a6f4-3f524c327b96",k.Icon_relic_7="b9f2988c-6d30-46d5-aa45-ed5f5075621b",k.Icon_relic_8="c40a2aec-7b5e-48e2-af31-1042320cce16",k.Icon_relic_9="6e7adb03-7a7c-4fd2-81f6-487916425630",k.Icon_reward_gold_1="993d5bed-f0c9-4410-b08f-daaf92e63a05",k.Icon_reward_gold_2="6e8ace8d-054c-4e00-96a8-7c6982b5e0cd",k.Icon_reward_gold_3="19d4ff6e-90d9-44ee-85fb-5b320fc1dabb",k.Icon_reward_gold_4="f932c0df-14af-4473-8db9-d0dbc847b8dc",k.Icon_rift_difficulty_easy="5ae88fcf-337a-46a2-838a-671998965300",k.Icon_rift_difficulty_hard="afce3001-db80-4211-9660-069a24052fd1",k.Icon_rift_difficulty_normal="bfed4ff9-5347-440b-a0c0-91e0430260ae",k.Icon_spellRelic_1="a0a954b6-4858-4310-8ccc-046480c3e947",k.Icon_spellRelic_10="9b42653a-1063-46ad-8f42-a9dc083f16a5",k.Icon_spellRelic_100="b98ce930-e980-4197-a24b-ea783839c63c",k.Icon_spellRelic_101="89d9a4fd-ee5b-4d65-8abe-78bf1fdc968a",k.Icon_spellRelic_102="75979a30-fee2-4f5c-a1ed-72a17401aa2e",k.Icon_spellRelic_106="b51034cc-cdd9-483d-817e-52551070555f",k.Icon_spellRelic_107="8a70e135-545c-4317-b281-4c0e50f77915",k.Icon_spellRelic_108="909a4ed4-5b47-4bcd-9bef-b6ef56b82071",k.Icon_spellRelic_109="4093e152-feb8-47b0-91aa-ed27b8e1098f",k.Icon_spellRelic_11="700295f8-6727-4978-85a9-a76a1f5ca583",k.Icon_spellRelic_110="a3368198-69be-4319-8eec-4d931d10e8ca",k.Icon_spellRelic_111="e133bdf3-867a-4b43-ba28-e22830eeb9ac",k.Icon_spellRelic_112="a46b0338-82e9-4c54-bdb9-897a106dbbcc",k.Icon_spellRelic_113="f28888c6-bfb0-4ffa-aa5a-5f37a9a13251",k.Icon_spellRelic_114="c7d2a61c-fe6c-4957-b219-fe8d6f493ca6",k.Icon_spellRelic_115="dd0b574d-c5f1-4f93-b9c8-27084ab4ec48",k.Icon_spellRelic_116="fffd79a1-8551-4556-90da-57333420b8e4",k.Icon_spellRelic_117="9f0e732f-daa6-404c-8a99-2e0b3fe39de3",k.Icon_spellRelic_118="9268c53f-06da-4d3c-9ab6-a4c63ebafaec",k.Icon_spellRelic_12="8f3c8ab6-c77a-4843-965a-1a6200d4223f",k.Icon_spellRelic_13="fa15885b-d97b-4afe-b924-9d9ee1f90dcc",k.Icon_spellRelic_14="63b7746a-9c69-4624-a410-2938b180944a",k.Icon_spellRelic_15="7455d8f1-9af5-4c63-9eb0-43102634dccc",k.Icon_spellRelic_16="bf6811f1-0c80-40db-8d2d-2be4272553b3",k.Icon_spellRelic_17="2d28c675-f5d8-403e-9191-f629933bf13b",k.Icon_spellRelic_18="e94ef064-a0fa-4528-bba5-ead5b120de0b",k.Icon_spellRelic_19="8774d904-5ed6-4cc0-a02b-a8803d450fb0",k.Icon_spellRelic_2="bb7e9989-5b4d-4c83-842d-03a15c1ebfd9",k.Icon_spellRelic_20="43dbb5f6-3915-4985-8fd2-8867c8dc0ade",k.Icon_spellRelic_21="8e75d907-c550-4266-8afc-5a31b33e8c8c",k.Icon_spellRelic_22="24c187c5-16ce-4324-a2a1-06ca7b6b7802",k.Icon_spellRelic_3="f1c31937-fdb7-4bcc-a7d5-c28949af6c42",k.Icon_spellRelic_30="e875a70d-7a93-4e30-bbbe-15f4844ef0f8",k.Icon_spellRelic_31="4a592caf-a0f5-4429-b86c-ece79b77689d",k.Icon_spellRelic_32="e5a84d53-1364-4dbd-bfc0-822a85108e6d",k.Icon_spellRelic_33="76373d2d-01ca-49a8-b34d-34d0ba9f34cd",k.Icon_spellRelic_34="1df7de6f-e7cd-43be-ac17-1255e8d13d74",k.Icon_spellRelic_35="7ac46f51-86b6-4727-bf36-fb2caf221ed7",k.Icon_spellRelic_36="f491441f-f48c-46ea-b031-55c7302c6157",k.Icon_spellRelic_37="a947cd4f-dd20-4cbe-925f-10dd39afc4c5",k.Icon_spellRelic_38="161ffc6a-ee27-45d7-bd37-76968eea8d94",k.Icon_spellRelic_39="aa78231f-671b-4ecd-b2da-f14a8a6d25bf",k.Icon_spellRelic_4="9a518476-9fd9-4ffc-8fb7-332794a83300",k.Icon_spellRelic_40="6b4f3f5f-82e3-4981-b1f7-81657fa7ebcc",k.Icon_spellRelic_41="8030d33e-bb39-4343-b9a9-a54c75699376",k.Icon_spellRelic_42="caf79519-c723-466d-b1b8-f630b7f46deb",k.Icon_spellRelic_43="6f0681ef-346c-4273-b9a4-13e56ea365cd",k.Icon_spellRelic_44="8a929109-4547-421e-8474-6896c955773e",k.Icon_spellRelic_45="78298265-218b-49c3-8467-cb1a22ce4116",k.Icon_spellRelic_46="8a40d35e-7cf5-4bed-bdeb-ef840c652df1",k.Icon_spellRelic_48="cacf0608-2dbc-4f2d-b684-1737488f0d14",k.Icon_spellRelic_49="f21cb5de-889f-4960-946a-2654c8516446",k.Icon_spellRelic_5="69f48725-5743-4a01-9289-0a517c383e08",k.Icon_spellRelic_50="74760a95-b13d-4476-bf53-27a1424c6146",k.Icon_spellRelic_51="c92b55b8-1485-41b5-a37d-58e1b2f4e8fb",k.Icon_spellRelic_52="18196be6-7258-4834-bdc8-1d8f77402e5c",k.Icon_spellRelic_53="3aab00cb-1f5d-4135-8faa-2f1e627f9b9d",k.Icon_spellRelic_54="33c8691e-5cbd-4d09-b037-74f793f08216",k.Icon_spellRelic_55="751399b9-d090-4e21-9777-5f666dfec514",k.Icon_spellRelic_56="84a53238-975a-48c1-ae1c-96d61830128e",k.Icon_spellRelic_57="ea29d93e-e9bc-43b2-a40b-743663bc574e",k.Icon_spellRelic_58="fe393076-02b3-4bde-9317-33ccac1f8cf6",k.Icon_spellRelic_59="c7c6ea4f-6bc5-4bd4-bdd7-992fe9a71e27",k.Icon_spellRelic_6="6032f62c-a4b0-4c75-8072-7acca8ca2ffb",k.Icon_spellRelic_60="7cfa68a9-2e73-4864-8ff9-509b0ea7b44d",k.Icon_spellRelic_61="377e8a82-2f24-4e1b-9094-e26cd692c183",k.Icon_spellRelic_62="81345eaf-dbd8-41cc-8e75-9b21762348aa",k.Icon_spellRelic_63="c05e6cbf-0899-4e56-b8ea-9a0d93c0c808",k.Icon_spellRelic_64="02f11eda-4120-44b2-81a0-75260229809a",k.Icon_spellRelic_65="ac1a1952-bd68-477e-befb-b672d5ba165a",k.Icon_spellRelic_66="a46f92f7-24e0-4b51-874a-98081a52e781",k.Icon_spellRelic_67="3d937d73-a4da-4d7f-bd48-3b091b964cf8",k.Icon_spellRelic_68="bbbeddcf-e094-4802-bed6-0a61a4b29ebe",k.Icon_spellRelic_69="e3527ca7-a578-410b-ad61-a9272cba01c8",k.Icon_spellRelic_7="21453b90-fc16-4b78-86a4-6399a0f287a1",k.Icon_spellRelic_70="d9ca5ed5-3f8e-4c16-a732-295f348a1cf0",k.Icon_spellRelic_71="09a6c1c3-bacb-415b-9c6e-0b97a03fb09c",k.Icon_spellRelic_72="82fde356-ede1-4053-9bf6-09cef927f1d4",k.Icon_spellRelic_73="249291c2-0228-496e-86e2-0867d57287c6",k.Icon_spellRelic_74="dd0de0b9-c087-49ea-8abe-67b1e05d401f",k.Icon_spellRelic_75="f2d2114f-d703-4971-a35c-071fbe954f8f",k.Icon_spellRelic_76="19bbc32e-449d-4431-bc8f-232663c6728e",k.Icon_spellRelic_77="61d413ea-da9a-4a97-b0ac-de7e2c4dbb1e",k.Icon_spellRelic_78="081c88e5-4b47-43c0-b876-21c21d647d0c",k.Icon_spellRelic_79="0a001fe4-913e-4c81-9080-8a1b28c55ce3",k.Icon_spellRelic_8="f12852e2-bcbe-498f-b85e-90f8ffe53803",k.Icon_spellRelic_80="e9706d6d-ce32-4c2d-9229-29b0fe99c138",k.Icon_spellRelic_81="7fb0b91b-2769-46eb-b954-7cd25a924a7e",k.Icon_spellRelic_82="2a91ebeb-9a7d-4cac-b742-9a65056a6c25",k.Icon_spellRelic_83="023ec071-2abf-4c41-9c87-012bd5f50244",k.Icon_spellRelic_84="cef02f17-579e-4043-b398-7e592bbc72c6",k.Icon_spellRelic_85="c12e0384-20e0-4938-9474-822177fc1605",k.Icon_spellRelic_86="ca198060-9e77-419b-8f13-e9c5340858ff",k.Icon_spellRelic_87="8b70576f-ed9c-4b64-8b79-bd7573b24fd8",k.Icon_spellRelic_88="b9276e72-13e8-4f7f-b2ab-06aed6dbfd9c",k.Icon_spellRelic_89="9fdb558c-76dc-4261-b099-77d958133266",k.Icon_spellRelic_9="9f81998c-060b-479d-b6f5-944b7aee7b4f",k.Icon_spellRelic_90="499e06a9-cbb5-4d74-ae96-0c9250a0dccd",k.Icon_spellRelic_91="5be1874e-7bf4-4353-bb20-d936d93d3363",k.Icon_spellRelic_92="e6b4c10e-ae56-4694-8c49-db4fe7b95fb8",k.Icon_spellRelic_93="691cf97f-7438-4eed-a16e-6881349528b4",k.Icon_spellRelic_94="9e7a6563-bb21-4598-acce-c1d03d1016e2",k.Icon_spellRelic_95="99d14153-a213-4656-a46a-e983d0c89272",k.Icon_spellRelic_96="4f5c110b-af36-453e-b0c5-29caea429712",k.Icon_spellRelic_97="248ec55d-5ad4-4703-9b35-4372b8aa7be4",k.Icon_spellRelic_98="4187befc-025b-464c-9af6-3620f69d2c32",k.Icon_spellRelic_99="254d02ad-f71b-4049-a66d-5d0077fe2478",k.Icon_storeTab_1="4d8e895b-e783-4c64-9b9a-82216bdad1b0",k.Icon_storeTab_10="a9d6bd78-1370-4023-8d9d-a9df10388c10",k.Icon_storeTab_100="c5c165db-28d2-4d54-aeca-6f92d5421fe4",k.Icon_storeTab_101="8f66a5be-0a2f-46bd-9b0b-0a213365e3b2",k.Icon_storeTab_102="6c669496-f9c1-42ec-ae43-9676184a9a24",k.Icon_storeTab_11="ec5942cf-2a12-45a9-ba69-59903e3cdd83",k.Icon_storeTab_110="ecc86e84-5173-4df9-a95d-e2d8118a2cbc",k.Icon_storeTab_111="645f1293-f0b9-47e7-b09c-af3a34253a36",k.Icon_storeTab_112="c73a8164-a161-4ff2-bf39-14e7ac65d75f",k.Icon_storeTab_113="99ac5c67-e442-4d95-a21a-0175e141c100",k.Icon_storeTab_114="d2c6dcf0-aafc-46c0-96ae-60e49db9ba73",k.Icon_storeTab_115="1b00d209-e0b2-4cbc-bef4-a07dff7838ce",k.Icon_storeTab_12="9d95ac1d-3570-4a75-8107-8ffb246ff8d5",k.Icon_storeTab_13="011ea7e2-a883-4c9e-a3f6-ebe091967366",k.Icon_storeTab_14="7e659d44-3a22-4278-a7a0-02cc57f88e84",k.Icon_storeTab_15="17967c14-fbcd-47c7-85cc-f0648a3961ad",k.Icon_storeTab_16="204242a5-f1f1-4d3b-aaa7-057f0041e67f",k.Icon_storeTab_17="646d2a46-81fa-4955-a01d-5b04c2e54c27";k.Icon_storeTab_18="a2f44e3e-3fb8-430b-9cce-3c477920850b",k.Icon_storeTab_19="dafa927e-9bd0-4b5a-bd7a-3f74a422704d",k.Icon_storeTab_2="7d68eda5-6943-4823-a0f8-78d01d004388",k.Icon_storeTab_20="e5d9f6b2-6970-4352-956a-327ffa73954a",k.Icon_storeTab_21="cb78d6c8-ea2b-4c2d-9952-c6f8043b016f",k.Icon_storeTab_22="de45f882-d3d3-48b3-8fcb-b836bea17d02",k.Icon_storeTab_23="12ffdb6e-7db7-43b6-880f-6954242adfbe",k.Icon_storeTab_24="57a4dc2d-5de7-4e2c-8179-85d6e2930775",k.Icon_storeTab_25="981575fa-2860-4509-a67b-a58aaf6eb3e4",k.Icon_storeTab_26="2752d131-ddbe-4872-a4c3-fef647675137",k.Icon_storeTab_27="47be8cf2-4fa5-4188-829f-d283beca9a40",k.Icon_storeTab_28="6e55e86d-7179-4920-bf15-1f951b70b221",k.Icon_storeTab_29="6a0e7ede-6af0-43a6-b60f-167cfc385189",k.Icon_storeTab_3="70b70a19-1c65-492f-99df-9ebc2de1bbc0",k.Icon_storeTab_30="99b5ef05-6c8d-462a-922c-13a0b0437d52",k.Icon_storeTab_31="b48e029c-5629-4839-9082-7145c7746fb8",k.Icon_storeTab_32="9c6d3695-0af0-4c5b-924b-321dd9260796",k.Icon_storeTab_33="b89f3729-de04-49c0-8535-1b2cdc16ae54",k.Icon_storeTab_34="ade6f637-b7ae-4a1d-97fa-6c9b6a08c0a8",k.Icon_storeTab_35="a891f05f-7ffa-4593-aa4f-9fba7de3eeae",k.Icon_storeTab_36="1ab1146b-6165-4611-a405-837e7ced833e",k.Icon_storeTab_37="297c52c4-5db3-445d-bc5d-116285fafa44",k.Icon_storeTab_38="b97f0df1-77e9-4034-be8c-ea826d5c4cec",k.Icon_storeTab_39="42f7d2bb-2d7e-4b5e-8cc8-61f54558ce12",k.Icon_storeTab_4="4eae6dd5-0eb8-45f3-bb92-6338b690b594",k.Icon_storeTab_40="b4b492ec-3dcd-4b4b-b3ac-4a5e2a1f44b2",k.Icon_storeTab_41="05a54efe-04b2-49ee-aa78-be8f3371c982",k.Icon_storeTab_42="f4141bae-6f30-4d89-8b81-253cc1fce9af",k.Icon_storeTab_43="48676cd9-f2d4-47b6-9a5f-4e146a662308",k.Icon_storeTab_44="ec5c76d8-01dd-4d66-92d9-51266f2fa44c",k.Icon_storeTab_45="f6dbf0b8-0b24-4aa0-a54b-0b336e004d16",k.Icon_storeTab_46="a1603a3c-0bc0-4c63-9ec4-6bcbba64fa45",k.Icon_storeTab_47="9a1babca-7b9f-4341-bf27-3f00bcdfe561",k.Icon_storeTab_48="ebfb9688-2259-4aea-a566-713b869dc1db",k.Icon_storeTab_49="657f1248-8c0e-41fd-9be8-3fbca24f1b58",k.Icon_storeTab_5="4407be08-5408-4702-8da2-423254850b8c",k.Icon_storeTab_50="621712cf-f525-4969-925c-c2ce7d7fcac8",k.Icon_storeTab_51="b226af1a-9947-411f-8b87-b6803ad22faa",k.Icon_storeTab_52="81f06512-b845-4dfa-ab04-5a7fc2e66447",k.Icon_storeTab_53="06c8f1f4-fdd7-441d-8bed-0ffbd2fc2536",k.Icon_storeTab_54="ef4a2b28-a03a-4a6d-af65-657c4a8c5324",k.Icon_storeTab_55="309877a3-6008-4476-81e3-35973289c05b",k.Icon_storeTab_56="27732539-2183-4cca-bfe0-2b814218e8f9",k.Icon_storeTab_57="e4fba5cb-f5f4-4a55-bd3f-3d7e7b6897a2",k.Icon_storeTab_58="8718936e-8f78-438c-b9a1-146209a9f786",k.Icon_storeTab_59="773ee63c-38aa-4d1b-bd94-c821235c70e1",k.Icon_storeTab_6="761a043a-a855-4be0-a8fe-7a5f0f363ef4",k.Icon_storeTab_60="0e1fb603-edd4-4af1-b406-c720942aaa89",k.Icon_storeTab_61="6cda439c-7d12-48cc-a419-6b5a9767735c",k.Icon_storeTab_62="3a41fbe2-4aca-474d-a9aa-a4ab51559349",k.Icon_storeTab_63="1b331a95-eb65-4842-90b7-f58b3528e2b8",k.Icon_storeTab_64="d92e249d-c26a-440d-8327-92a0aa19e5ea",k.Icon_storeTab_65="4f3718c1-b84c-437e-9603-89b2d781b16c",k.Icon_storeTab_66="559471c6-36fb-42cc-8b94-8c2d837e93e8",k.Icon_storeTab_67="235070cd-fedf-435f-b455-6abadf3aa2aa",k.Icon_storeTab_68="5d01dcae-8940-4f76-b8f1-5bc7bfeae14b",k.Icon_storeTab_69="0bc6561a-5e97-4265-94b8-ef1dd7d91cc7",k.Icon_storeTab_7="820c6107-ff7a-4086-bca7-5f9a3df09ff8",k.Icon_storeTab_70="55d307d5-9f3b-404d-8dd5-e22ad61d6687",k.Icon_storeTab_71="4d20d785-01bf-480f-aaa3-e837b3101ba5",k.Icon_storeTab_72="38c6b43a-f097-444d-91ce-02589c9f3275",k.Icon_storeTab_73="08fbeca0-e2ca-4240-b4b4-73ab9ea0fe99",k.Icon_storeTab_74="307c6cd5-ff22-45cc-86e2-3b4cf5cd23df",k.Icon_storeTab_75="27fc4ee5-e7af-4449-a8b7-73e86bc8ca1d",k.Icon_storeTab_76="fc90ab2c-77df-45a3-83dd-b2860de4a371",k.Icon_storeTab_77="afd3b212-bca1-4fa5-ad4e-cb60391214a4",k.Icon_storeTab_78="0bfa19f0-3975-44f7-9806-dbc3b0e76ec9",k.Icon_storeTab_79="b83700d7-552b-4755-bdb2-3c5afc68cfa6",k.Icon_storeTab_8="c84b992b-b2a3-493f-91ba-3af7dcb43712",k.Icon_storeTab_80="e998d7d5-70e7-40ca-9572-76fbe71d0d7f",k.Icon_storeTab_81="11a1815e-f0c3-43bf-a5bf-f76011d42b2f",k.Icon_storeTab_82="04d44ee2-3a49-4611-87c5-d9b672b91678",k.Icon_storeTab_83="acbf2cea-a0eb-4264-99dc-db6471e90160",k.Icon_storeTab_84="03399a52-b97c-4c71-adee-18fe0cd71d67",k.Icon_storeTab_85="5d4183a2-de15-42a3-be3d-8bfc668d7e3a",k.Icon_storeTab_86="d965a854-4e38-4e2f-b399-052e48c12417",k.Icon_storeTab_87="314fa89a-ebc5-499e-9488-d5295a50d162",k.Icon_storeTab_88="8a1ece84-d79d-4a7b-8510-6b3445945af1",k.Icon_storeTab_9="dde6a5a9-aa04-473c-bcd3-93a164e5ff67",k.Icon_storeTab_95="8996c6cf-2263-4304-ba25-7251ace7d254",k.Icon_storeTab_96="08a32903-a4ea-4492-9c6b-e2aaaa2125e1",k.Icon_storeTab_97="8f429176-597e-4c5e-b7c8-6de81c1fdc81",k.Icon_storeTab_98="0d9a9b11-35cb-4b46-a2c9-e1a4533d3fd9",k.Icon_storeTab_99="e02882fe-dc5b-4f0a-b768-7e83dd6dd543",k.Icon_store_astral="9f2a8cbb-6a9a-4378-abc0-19831d79f088",k.Icon_store_boots="d7eaa268-b518-45ba-92dc-a90df71f5be8",k.Icon_store_buddies="d436cf52-5f5c-4f5d-8c79-b87e211346a3",k.Icon_store_bunny="ac0b971d-f398-4e1b-86a5-f434808868a5",k.Icon_store_clover="dd8f59ea-7a41-4651-8c6a-7ed49ae2374b",k.Icon_store_fireworks="e2089834-9c34-4350-bda2-48d85137a9aa",k.Icon_store_for_you="815d8c11-60cd-485b-a975-0fbd5e544d3d",k.Icon_store_fox="01476af6-3e52-4c53-8d29-3cf900a87b51",k.Icon_store_furniture="5879ae6e-07dc-424f-a6ee-bfbb2671d4f5",k.Icon_store_hair="41ec55c6-dcaa-4c0a-9dfa-01e06cbc67f7",k.Icon_store_hair_colour="0b030a1d-a52c-48ff-b5f3-b5fdbb7da1dd",k.Icon_store_hats="481698cf-87e8-46cf-9265-cd90cbf802f9",k.Icon_store_jester_hat="270d5643-2b5d-4563-9a1a-070def8a2ca5",k.Icon_store_lost_pets="b87ff195-b509-4be5-9572-897dd7353241",k.Icon_store_magicoin="d65f8aa3-2f5a-4414-96d0-1d48d06b537f",k.Icon_store_membership="269c40d7-038e-4f60-b7a6-675234be2d05",k.Icon_store_mounts="325b0adc-2789-406b-bbee-9c313e69d265",k.Icon_store_mythics="a1339101-2e39-44d0-a5ff-9a2650c8ca73",k.Icon_store_outfits="f6038462-221f-4b8c-9d07-79d6a1504570",k.Icon_store_pet_deals="4383caf4-327e-45d3-b347-eef47b194267",k.Icon_store_pet_hats="2fbc59cb-4283-48e9-a797-2dc92472b42c",k.Icon_store_pet_relics="ea2ebc88-cf94-4c6d-96cb-2e4548e98132",k.Icon_store_region_bonfire="d06eefec-28dc-4b2b-8e0a-04358fc60ebc",k.Icon_store_region_firefly="3b395fcd-860a-4f7f-a2de-f1ccaa083ed1",k.Icon_store_region_shipwreck="84e01325-4dac-4749-bcfc-4e76d4071b9e",k.Icon_store_region_shiverchill="8d533b3e-49ce-4d93-a0e5-d9efaf47d48f",k.Icon_store_region_skywatch="d25a41d9-826c-49f2-ac38-4d740bcb268b",k.Icon_store_relics="12aefbd7-4223-4b96-9f9b-5646beb493ba",k.Icon_store_shadow="9376badc-2432-40ad-a146-c0cc3eae7919",k.Icon_store_special_offer="96c72097-94f8-4e48-9053-ca647dcf08c4",k.Icon_store_starter_pack="9aab6bba-7102-4964-960c-9690e8d75ac2",k.Icon_store_wands="23dfc3bc-421a-4a72-9c2a-e6c6875afdc2",k.Icon_store_wizard_gear="b4c36fba-0122-4884-ba09-e45d114db2a7",k.Icon_summerfest="eb43f74d-6a51-406f-a67a-d152d6f9e23c",k.Icon_tab_member_selected="e24c89a7-3bdc-429b-8f34-e420f9aee5b3",k.Icon_trophy_1st="e5f36540-54c0-470d-9743-54bdcadab2be",k.Icon_trophy_1st_mini="f09643c7-78bf-4c97-a78e-2683a554c025",k.Icon_trophy_2nd="413da68d-90f1-48e5-a560-bdbc6c4ddee9",k.Icon_trophy_2nd_mini="ebe82f86-9299-4c01-a09b-6ce546eec8e1",k.Icon_trophy_3rd="96d99d39-bd06-45da-ad41-a72dd5c6c26e",k.Icon_trophy_3rd_mini="b23555ff-492d-4f60-95cd-e70c442bb75c",k.Icon_ultimatesQuestItem_1="9aada09b-1ca4-4610-a474-8d518abe280d",k.Icon_ultimatesQuestItem_10="1f15d500-e9e4-45a2-b694-fa8e4f2eda9f",k.Icon_ultimatesQuestItem_11="af877da5-21cc-44ff-857a-726307fea1cc",k.Icon_ultimatesQuestItem_12="4c4fa211-e802-4a01-b03c-06983069cc43",k.Icon_ultimatesQuestItem_13="7b5f11ca-7413-4993-a34c-d44b8b9663e9",k.Icon_ultimatesQuestItem_14="d4c2bb63-9f55-4664-8afa-67d5e0d4bc72",k.Icon_ultimatesQuestItem_15="190eb85c-68e4-4274-8d43-5f090404e2f3",k.Icon_ultimatesQuestItem_16="13e69e03-6cac-4414-8beb-91de1efa262d",k.Icon_ultimatesQuestItem_17="314ad0d9-ae24-46a9-9570-e20c1088dc73",k.Icon_ultimatesQuestItem_18="e15310a1-78e5-4879-9c4d-88e533f4cbfe",k.Icon_ultimatesQuestItem_19="9a830507-5883-4d2c-84e2-f149558ce7d4",k.Icon_ultimatesQuestItem_2="6c1b68aa-d634-4e7d-8294-a2b4a272565d",k.Icon_ultimatesQuestItem_20="aa7a8670-1664-42d6-a007-bbf5b0468605",k.Icon_ultimatesQuestItem_21="1be5c48e-0bd0-4535-92ca-dc7ab7239d5d",k.Icon_ultimatesQuestItem_22="58c45141-2b7d-4d2d-8047-63b5c6db4db7",k.Icon_ultimatesQuestItem_23="c7006d02-8cef-4a16-bbd5-272cfdc0afa3",k.Icon_ultimatesQuestItem_24="93c317b9-cc27-49bd-9696-04b1ec21bbfa",k.Icon_ultimatesQuestItem_25="73136a31-ac38-4343-b349-e0b2ee32a224",k.Icon_ultimatesQuestItem_26="a6d9ba3c-5a43-4aff-9985-1cdd70d2f4ee",k.Icon_ultimatesQuestItem_27="32a6c61b-73b7-419e-9087-cb72bd04a6f8",k.Icon_ultimatesQuestItem_28="be3251f5-20ab-471b-b526-9735a74b1702",k.Icon_ultimatesQuestItem_29="98509963-18a6-4151-aa5d-77dea059324a",k.Icon_ultimatesQuestItem_3="f8ad8f7a-79d1-41a7-9515-777e71e1ed89",k.Icon_ultimatesQuestItem_30="911a0c98-8b40-49b7-b2a1-596c1fb72e30",k.Icon_ultimatesQuestItem_31="8940fb16-6dc1-4204-8fbb-a584780c7d9a",k.Icon_ultimatesQuestItem_32="341aed9a-4848-4641-ae73-5f9bdce7a209",k.Icon_ultimatesQuestItem_33="bb083ab5-0c2f-4a25-ba4f-385f9392ada5",k.Icon_ultimatesQuestItem_34="87fe18c1-0e6b-49d8-9562-2638e15b4b54",k.Icon_ultimatesQuestItem_35="031a422f-6f3d-4e6b-9cac-1f09cb39b2fb",k.Icon_ultimatesQuestItem_36="eca660bb-74e5-49cc-9e17-ac5a7e58b234",k.Icon_ultimatesQuestItem_37="57fb23a8-2235-4ae4-8d49-3700cb918875",k.Icon_ultimatesQuestItem_38="56f02a2a-bf52-423c-bb39-b8385da5a879",k.Icon_ultimatesQuestItem_39="146badfa-32cd-428c-ada7-1a5f899c3282",k.Icon_ultimatesQuestItem_4="4798eb5f-21bd-4405-89d6-5d21eddf7c9d",k.Icon_ultimatesQuestItem_40="960135be-b476-4958-8ff5-44fab5446c18",k.Icon_ultimatesQuestItem_41="683abfce-9c16-4634-81e4-638444a7f93a",k.Icon_ultimatesQuestItem_42="f9551326-fa38-4b55-9613-5e5b441426cb",k.Icon_ultimatesQuestItem_43="eb4ece7a-a6e4-4469-a0ae-348098a1ef83",k.Icon_ultimatesQuestItem_44="6b48616c-6879-4ebe-a9f4-96d1033399c7",k.Icon_ultimatesQuestItem_45="e5739a7b-d6d9-4f18-8c9e-148720ee4e98",k.Icon_ultimatesQuestItem_46="f792a942-9e10-4e45-93df-030873509c56",k.Icon_ultimatesQuestItem_47="51e7dd12-6df7-4086-a59e-a7bb9b3ed65f",k.Icon_ultimatesQuestItem_48="093aa9ab-c94e-415e-8e00-deac494af7cb",k.Icon_ultimatesQuestItem_49="977fd3c2-7bc9-4d1c-b9a6-b6b828807596",k.Icon_ultimatesQuestItem_5="c7c336f3-56e0-4691-9b3e-5620b848a56d",k.Icon_ultimatesQuestItem_50="13ed04e7-f35b-473f-9cb9-b80dbbfcef3c",k.Icon_ultimatesQuestItem_51="4b55dff2-f30a-47ee-ad66-dc0e847cb5a8",k.Icon_ultimatesQuestItem_52="2b3ccfda-1aca-40d9-afac-08b5bea1e240",k.Icon_ultimatesQuestItem_53="beb7971c-7b3d-477f-9fa1-0d652bb1894e",k.Icon_ultimatesQuestItem_54="d8111eb2-67df-4337-894c-104765a5a281",k.Icon_ultimatesQuestItem_55="3eb401c3-d037-4774-bfc7-881ef4fe364b",k.Icon_ultimatesQuestItem_56="abb64af6-17d9-4276-afb6-c0351258bfcb",k.Icon_ultimatesQuestItem_57="5510e076-4fc5-471e-b62e-67be890fa323",k.Icon_ultimatesQuestItem_6="becb85b6-988c-435d-a15a-eb38fa6b7f37",k.Icon_ultimatesQuestItem_64="c4596ad7-69de-4654-8fff-b90751fa78a9",k.Icon_ultimatesQuestItem_65="f31b9845-9afb-4cb8-a9a7-82478de9fbf8",k.Icon_ultimatesQuestItem_66="3b29450a-9ac0-417e-b234-a437e266d649",k.Icon_ultimatesQuestItem_67="6af17156-dde5-4a99-a2d2-8b96de93f8cd",k.Icon_ultimatesQuestItem_68="7bfa9748-d26c-40eb-b632-5464470658ff",k.Icon_ultimatesQuestItem_69="26f93936-e56e-4e30-8237-eec91cdaf52f",k.Icon_ultimatesQuestItem_7="6ebf1b18-fa58-465a-9abe-f8e94492e96b",k.Icon_ultimatesQuestItem_70="ef3e2f00-cc4d-4610-8fab-7549129e4087",k.Icon_ultimatesQuestItem_71="ab72becd-425c-480f-b318-cdd7472de534",k.Icon_ultimatesQuestItem_72="a7909739-423f-4454-ad03-9153c3cee839",k.Icon_ultimatesQuestItem_76="7c46a4ed-fe0a-4a6a-b93f-8d4d31f3a902",k.Icon_ultimatesQuestItem_77="cb116baa-f588-4b45-af57-8034c16f313c",k.Icon_ultimatesQuestItem_78="1ed0dc02-a0de-4313-9211-79f938bba453",k.Icon_ultimatesQuestItem_79="6e101486-6619-4cc7-a74c-ee96098a52a4",k.Icon_ultimatesQuestItem_8="92f9531b-a767-44a9-ae06-dbce12337a0b",k.Icon_ultimatesQuestItem_80="7f269cc2-dfb5-4f93-bade-27f3067006c5",k.Icon_ultimatesQuestItem_81="e4d382d6-c595-489e-b351-bfb18ec396c6",k.Icon_ultimatesQuestItem_9="ae09e273-7a3d-4f59-a022-83a019f03eaa",k.Icon_weapon_1="19af2479-cd93-42bb-b383-11525dffc468",k.Icon_weapon_10="ab931ee3-d3a1-43de-89f4-5a90156b1149",k.Icon_weapon_100="65e632f3-8c18-4b8a-9a11-d64e59b78375",k.Icon_weapon_101="ebcea9ef-1a17-42df-a635-76efd014a995",k.Icon_weapon_102="ae0e55db-5557-4d24-bb41-213f32bbc41b",k.Icon_weapon_103="4687a590-8845-4bd6-a94e-38be57347fcd",k.Icon_weapon_104="520f9036-52f8-4077-827b-f058fd9cbb98",k.Icon_weapon_105="3fb104da-36c5-4dd5-aafd-9e9610564558",k.Icon_weapon_106="25e6ad61-5237-4fe3-a5c8-a504dd74c95f",k.Icon_weapon_107="bc79c65e-0a3d-4ce3-95bd-1ff90da74113",k.Icon_weapon_108="9d43c1ca-ce94-43a5-895e-40b782f4c695",k.Icon_weapon_109="0e4714ac-f057-4d30-b71b-43649c908496",k.Icon_weapon_11="b9b4d413-3ca7-4063-8c61-cab96c1e5890",k.Icon_weapon_111="11e408e0-1d36-4400-8df3-bafc90f0ac44",k.Icon_weapon_112="5e3306e0-a2c2-4774-911b-9884c80bf8d0",k.Icon_weapon_113="4613dec6-be01-4aa3-8bfb-bff4b8aa2563",k.Icon_weapon_114="4e3b181a-48c2-49c5-8f79-4e7d29039d78",k.Icon_weapon_115="57859a5b-5af6-40cf-9100-59fea8bab79c",k.Icon_weapon_116="ff887d65-969f-4a22-8a2f-c1ae327f1844",k.Icon_weapon_118="60ac027b-e729-468e-b53f-07f42a924184",k.Icon_weapon_119="da1ba6c2-35af-4323-b06f-6aacb72a7180",k.Icon_weapon_12="48a03d75-5917-4c31-ac70-a64514c237a0",k.Icon_weapon_120="484f87af-30ee-40f4-babc-fcaae5fe9d3f",k.Icon_weapon_121="6fab474e-abc7-40c9-867d-4c568b583f8b",k.Icon_weapon_122="1b31761d-c0c0-4dd6-8f77-33e5a3d7a602",k.Icon_weapon_123="5aa602d8-e8fa-4a42-bf7d-b3274faaf1bd",k.Icon_weapon_124="f20d1158-af10-49a0-867b-d344c4b23496",k.Icon_weapon_125="cf2a7b9d-74c8-43cd-aff2-0ef376d6bea1",k.Icon_weapon_126="517ed277-45de-4529-839d-2c127519bebd",k.Icon_weapon_127="1539a83c-4136-489b-ab2d-0ab01cb88cc5",k.Icon_weapon_128="4bdb1945-82cc-43a2-a4ac-3c742ed69a2f",k.Icon_weapon_129="68ffcd2d-74a8-4285-9095-72d6465e0a99",k.Icon_weapon_13="6a48f0b5-4670-4faa-8f36-4177aa169027",k.Icon_weapon_130="7822ff8a-5b8e-4642-93c2-96418e1e6f45",k.Icon_weapon_131="2bcd48a7-2824-40f6-add4-d99375ecd2a7",k.Icon_weapon_132="bf12cc0b-e504-43c7-b16a-72d1cf5211cf",k.Icon_weapon_133="bde33e37-85ae-45e1-a12c-934a2106b384",k.Icon_weapon_134="3952a09a-ffb2-409a-95a8-8af9e445faf1",k.Icon_weapon_135="12ace860-8ecb-4db9-8b4a-032db25eb4ae",k.Icon_weapon_136="b8729e63-0541-4c18-8c63-e34e3f094c03",k.Icon_weapon_138="a0f07669-c048-43ed-b9d7-4b0b8a57bb02",k.Icon_weapon_139="8cff5b66-e2fa-4774-aeb5-9ab195ec4c86",k.Icon_weapon_14="b943d9f2-d645-4334-8e33-ba21a6eb47cf",k.Icon_weapon_140="5c8abf11-9579-4723-953d-acbfa4dcd56a",k.Icon_weapon_141="53789982-6738-4a3e-9831-32a225d95abf",k.Icon_weapon_142="240f8b59-e243-437e-8bb8-0d438e525c4a",k.Icon_weapon_143="0b817208-07cc-4a18-b21b-549953269129",k.Icon_weapon_144="66e4b65d-4ae6-44ca-bfe7-04fe4a9267c8",k.Icon_weapon_148="164cb888-5846-4de0-8ad6-76fb8ae045ee",k.Icon_weapon_15="788cf8be-e0dc-4d4a-ac29-c99df2ad2adb",k.Icon_weapon_150="bedd6ba7-2ebf-46ce-9015-961660b38e4b",k.Icon_weapon_151="179135d7-235d-4d03-9ed3-868572813520",k.Icon_weapon_152="12062beb-94d0-4c05-ad33-6295e9715d9b",k.Icon_weapon_153="d4a92aaf-9b19-4db8-97e6-a5da44b2d7fc",k.Icon_weapon_154="9c17f80b-e828-4aa4-81a4-0df706d27b15",k.Icon_weapon_155="2815a227-b150-476e-8515-de9882255d29",k.Icon_weapon_156="b551683f-0648-4d79-895d-f7627ca7431b",k.Icon_weapon_157="e4e9009c-472f-43d0-8470-87341d3c7b86",k.Icon_weapon_158="99d61e00-d468-4f75-82f1-7e972b0641e3",k.Icon_weapon_159="c019a623-316f-47a7-8b44-6a0966da5837",k.Icon_weapon_16="213fc75d-b06b-48e2-a5cc-05e5353bf8e7",k.Icon_weapon_160="964d09d6-e8ef-4601-ac50-57ffe17a93b8",k.Icon_weapon_161="7d55e319-71d3-4e3a-8351-9cbf82a3c277",k.Icon_weapon_162="bd96bd2e-90be-46e8-9df8-c7440e51d5ad",k.Icon_weapon_163="96e44ea5-1b50-4a49-afca-00f40898b619",k.Icon_weapon_164="d98aa525-d0a6-4d64-afb0-0477679e2111",k.Icon_weapon_165="3751ecc5-aed4-4216-959b-92590af325bd",k.Icon_weapon_169="be0e790b-5d6c-4199-a418-04a1b69ba4a5",k.Icon_weapon_17="a4938d86-3165-4f48-adff-87dbff8289ca",k.Icon_weapon_170="42214cb3-5bb3-4753-8ae8-f683368845d0",k.Icon_weapon_171="e63e98cf-3292-443b-bde9-c88d15dfc88f",k.Icon_weapon_172="baabee0c-cff8-4bd5-b638-e0e03489b756",k.Icon_weapon_173="774429ca-862e-496c-b5f8-434dc500de3d",k.Icon_weapon_174="6a1c0e6e-18d7-4015-8494-41b1c31157bf",k.Icon_weapon_175="39f4dbd2-c089-4dd0-8fb0-7f5918b576d2",k.Icon_weapon_176="5bdf89d4-2602-4f0d-b445-ff16d55a1d1a",k.Icon_weapon_177="dbb649e7-8a9a-4d12-af05-96bf7fe04401",k.Icon_weapon_178="6449667c-ff65-4ea1-a3e9-520d4ab2c13f",k.Icon_weapon_179="2dd20738-8078-4caf-a46b-5fc1a9befd98",k.Icon_weapon_18="6aa68829-683f-45d5-96b6-d7e961425232",k.Icon_weapon_180="a567da0e-d048-4f6a-a07e-eff11fe5c455",k.Icon_weapon_181="bdf13a80-b824-4ff2-9dc4-e3cbc2c5b885",k.Icon_weapon_182="313e8a5b-e08b-4f06-98f4-b68162610dce",k.Icon_weapon_183="db398233-a784-464a-be8d-d6abad7a2c1c",k.Icon_weapon_184="48ebf300-e14e-4554-84bd-bcf817ca8085",k.Icon_weapon_185="edf9d264-ca62-4fc0-9fd0-ab8cebcb9775",k.Icon_weapon_187="25e35b8a-639c-4534-a5e9-c4c0ca5129d8",k.Icon_weapon_188="ab960e45-538e-4eb7-b3d3-fce2ae61823e",k.Icon_weapon_189="b2c1c8ca-7bfb-4403-826a-53bf5765f725",k.Icon_weapon_19="0b1badd2-3714-4749-b010-bd18dbde0968",k.Icon_weapon_190="5bcdca5c-b5aa-4d85-b1d0-67f3bb9886f7",k.Icon_weapon_191="eeb4f0df-94df-48c9-9360-61502e999395",k.Icon_weapon_192="92fa6e29-1276-4f5a-905d-f95bb437800a",k.Icon_weapon_193="18906af9-7734-4a8c-a48c-935192de8183",k.Icon_weapon_194="9cb36604-3b58-43ea-a561-5c96906eafbd",k.Icon_weapon_195="561a31fe-4de1-4575-89f9-bb878364fb39",k.Icon_weapon_196="5d498564-b791-4609-8848-d2d61bfcde47",k.Icon_weapon_197="d03b0a74-a882-401e-b380-5c84bfe7ff6d",k.Icon_weapon_198="27026328-bc23-447b-b995-ad2ae6827b4a",k.Icon_weapon_199="4c487465-65d4-4e30-bdad-59fbd29dcd0b",k.Icon_weapon_2="ec8d3cf8-6092-4714-81ef-801631a328c8",k.Icon_weapon_20="e85627f3-0e7e-4f94-a091-49269c8f2d56",k.Icon_weapon_200="ef892446-20ad-48a0-ab96-ff09f1b1365a",k.Icon_weapon_201="1fbc86e7-23d6-4855-8755-e07bbe7199be",k.Icon_weapon_202="81dfba10-8996-4406-92c3-9b985c5ba0cf",k.Icon_weapon_203="29a16c74-e704-4bb4-91de-543bb1fca4c3",k.Icon_weapon_204="529a816e-8d0b-44d5-850c-94ec0fd6a8eb",k.Icon_weapon_205="e14aee46-cc5b-420c-8f68-da2bd0ec7589",k.Icon_weapon_206="5f15088d-dbb0-4db3-8947-a9a0e3d58053",k.Icon_weapon_207="2027a4af-6dc7-4b14-aaf4-38bdcdb542d4",k.Icon_weapon_208="e1ef6b0b-2128-4c6f-88d7-cd849c12d62c",k.Icon_weapon_209="98cedccf-f640-413a-9142-2944999e21ce",k.Icon_weapon_21="b8b765da-e046-4346-8f93-1f25a883616b",k.Icon_weapon_210="e1e0a38d-5031-4c51-8b00-57951dbc5611",k.Icon_weapon_211="6ec0b929-8add-47c9-a38e-a7aec9af68ac",k.Icon_weapon_212="3cd0c527-6413-4657-8e51-745e7de139ee",k.Icon_weapon_213="789f6a84-bae6-401a-84ad-a13ad974a78b",k.Icon_weapon_214="5f299d5f-5a05-463d-8b19-1526090bd2df",k.Icon_weapon_215="74ae44b1-4449-4887-9496-a3c3a4b9bf7f",k.Icon_weapon_216="272880a3-5569-4b83-ab53-a25ca6c2bbce",k.Icon_weapon_217="62d1d525-146d-449c-ac8d-ab743e4d21cf",k.Icon_weapon_218="180a1a08-500c-4776-8edc-6a7fa6ce14db",k.Icon_weapon_219="87a9c730-b482-44da-a227-c0e01b0d3da3",k.Icon_weapon_22="f9742a5a-7e8d-4219-bcad-ecdffac88e5a",k.Icon_weapon_221="244bd57c-979c-4866-8479-47c7f0db12f5",k.Icon_weapon_222="e33aee0c-eceb-4f05-863e-ee350b6877fa",k.Icon_weapon_223="1eac4900-dc88-45e8-a57a-f9a08cf29be0",k.Icon_weapon_224="104d62b8-834c-4334-ac5a-8c3d4bc6399c",k.Icon_weapon_226="074b311d-6106-4cfd-8337-0ba77c4d5159",k.Icon_weapon_227="79bd498c-bc64-4d57-8966-9289faf82fad",k.Icon_weapon_228="0a71dcfa-5d91-4c22-b69c-458fa51dfd54",k.Icon_weapon_229="43ce1bd8-761c-46c5-866c-858ce905fe31",k.Icon_weapon_23="b5a4e813-c7e9-4262-933b-c3e99ad97c8a",k.Icon_weapon_230="2c35b723-a616-487b-b51f-f7fe750a3aa4",k.Icon_weapon_231="946ae8dd-4a05-4cef-b6ef-e5d9d681a04e",k.Icon_weapon_233="d8c044dd-a32f-42b9-9afc-6faea033f980",k.Icon_weapon_234="352a0681-7465-4522-8c57-57483704a1bf",k.Icon_weapon_235="9aff6b63-41ab-45ea-8a8a-e8e357be6a25",k.Icon_weapon_236="98177813-3793-4ec6-9818-2ec77ab0fc25",k.Icon_weapon_237="379c53e4-0a66-41a7-981c-1b8d38125516",k.Icon_weapon_238="121d2034-faae-43fc-84ac-7d71f60796b7",k.Icon_weapon_239="6f103f1d-a8a0-4dfb-968d-a9b67d2e044e",k.Icon_weapon_24="1369436a-6f4e-4beb-83da-0e0870372f54",k.Icon_weapon_240="ec8ff3af-8eb5-4b7d-8608-54b23405cf8c",k.Icon_weapon_241="34a4cb8a-fa32-4f32-a23f-7eca6b555029",k.Icon_weapon_242="7c290dc2-d71a-45ba-8267-c537e77b2180",k.Icon_weapon_243="b1ef6031-484e-46a8-b14f-33c22acb1a7f",k.Icon_weapon_244="835ca3bb-a529-4afe-a39e-8444c4b1fc92",k.Icon_weapon_245="296c36b6-5a76-4e0e-b361-30d7318d41d8",k.Icon_weapon_246="fc26ece1-8df9-4f4d-8b01-8f70f358eeac",k.Icon_weapon_247="150c4fa8-5292-44b9-b2f7-d2a073ef1edd",k.Icon_weapon_248="2823dcd0-8482-4a67-b07e-40917b7f9e19",k.Icon_weapon_25="ae021c72-3618-4e25-b25f-2e146be2571e",k.Icon_weapon_250="026a2f13-114f-4e5b-a88e-93f79486703f",k.Icon_weapon_251="60c1b2b5-d9cd-4f6d-a755-b953117916d5",k.Icon_weapon_253="a74cd3ce-7e1a-4b5e-9281-2b04de8c97c3",k.Icon_weapon_254="fac6f2d6-3ba0-4b4f-b8f9-9f9a1c247042",k.Icon_weapon_255="2eb57751-a8a9-4dde-8ece-797588178cf0",k.Icon_weapon_256="d602eeb6-f953-4916-8c6e-dbdf265af166",k.Icon_weapon_257="906b215e-cd35-4ffd-af64-2b86edb50313",k.Icon_weapon_258="a07cbf01-677a-44af-8280-7d61321c160e",k.Icon_weapon_259="84ffcab2-b811-4f13-b4ca-431e9aa008ff",k.Icon_weapon_26="6e27a1ba-b90e-4f24-a20f-2c29e547c38e",k.Icon_weapon_260="888a9995-29cd-46ac-8541-f4685c67ec2d",k.Icon_weapon_261="00510f5a-f1e6-44fc-916b-6754cc5e69c1",k.Icon_weapon_262="c9d07fb0-3dde-4901-ab5d-58ca28923adb",k.Icon_weapon_263="e24665d6-a843-4577-a5e7-02760ed53b4d",k.Icon_weapon_264="d5c123cb-9718-42d0-af7a-e890e0b7a102",k.Icon_weapon_265="6d189e6e-9380-433a-873e-693ef2ca2ba9",k.Icon_weapon_266="f5758f12-07f1-4f2a-903e-fa2f458169e7",k.Icon_weapon_267="9a8881cf-7364-46f2-9d94-cc3083086060",k.Icon_weapon_268="6c32c6f7-5114-47c6-8f13-840f8cf72ca0",k.Icon_weapon_269="b79dac5c-8956-4a83-a1af-344bdd0ae123",k.Icon_weapon_27="180074aa-8a19-4ade-bb9c-fe21d0128fd6",k.Icon_weapon_270="f3ca0cd5-ee59-4acd-8b5f-7c95ed565e6d",k.Icon_weapon_271="416939bd-a391-4069-90ef-96f283eb81f7",k.Icon_weapon_272="f4c2317d-d0d2-45b5-b2b1-cfb74be00074",k.Icon_weapon_273="2adba2f7-ec1d-43cf-8ff8-db4df7832d98",k.Icon_weapon_28="a864872a-6498-4060-b590-37556be3b75f",k.Icon_weapon_282="5019f445-1aa5-437e-9c7e-a3587b4bef71",k.Icon_weapon_283="9b866487-a85a-438f-9e52-fcd857b1eef7",k.Icon_weapon_284="e9d2356b-8fda-4c4d-8518-cfa4d3787b92",k.Icon_weapon_285="8c7e8672-f317-4eb6-971b-b8a9853b2e5a",k.Icon_weapon_286="1708c339-99fb-4573-b853-0ea34d417d4b",k.Icon_weapon_287="3c5faf06-ce5b-44b3-b048-c013d6cc4825",k.Icon_weapon_288="ecc7b9d0-ba3b-4101-b375-6114d6a21a73",k.Icon_weapon_289="277f134a-cd58-4fb5-b856-2baac1bcc5f7",k.Icon_weapon_29="75380bc6-5f94-4ff6-9600-ce2f7ee594e7",k.Icon_weapon_290="a13dee6e-8caf-4297-827c-88ef4325408d",k.Icon_weapon_291="cf3a9825-e0e6-4bd2-bac5-aac66187332a",k.Icon_weapon_292="692ad003-08e5-4d2e-8f70-a0a925383643",k.Icon_weapon_293="a644cad0-90b1-4672-b660-73f639eea6d9",k.Icon_weapon_294="f5a2fc7a-cb82-4181-93b4-9b88c8ec9fc7",k.Icon_weapon_295="6c09a3b0-2ee4-4e5b-b1e8-78b0926afa05",k.Icon_weapon_296="20bf51f4-b8fd-4ea9-a2a6-c4682cf78d4c",k.Icon_weapon_297="b6fc5b3a-5934-4767-a653-f38f7c7a407c",k.Icon_weapon_298="07c51dbb-c39b-4f7e-9f8c-7edcbfc86431",k.Icon_weapon_299="0903133f-c7a1-47a6-bcdd-89c961222556",k.Icon_weapon_3="e780af93-fa6d-48d8-bcdc-ccb1dc78959a",k.Icon_weapon_30="e23ddb43-8f62-48e1-9dbf-135328ceaafc",k.Icon_weapon_300="3fae96d2-6738-48bc-8a1d-c9079f6b9b6a",k.Icon_weapon_301="e25fdfb6-c369-4379-afb0-f0cadb9082e3",k.Icon_weapon_302="34937a31-101b-4999-8fcc-979d75b5e057",k.Icon_weapon_303="86c884f6-f9b3-411f-94f5-0a12eed9adf2",k.Icon_weapon_304="0e582865-45b8-4bbc-aaf8-ff7c8bc25924",k.Icon_weapon_305="96fdc10b-12ca-4f88-ba63-67f98c1174e8",k.Icon_weapon_306="d2c8f8c2-f287-41d8-90ab-0cba7db98b16",k.Icon_weapon_307="958c492e-ebbf-46e7-8d64-7539af6f76a0",k.Icon_weapon_308="16937b30-950a-4b43-98df-69d57fefdbf8",k.Icon_weapon_309="1052d510-6499-4f26-8f5f-052127de3172",k.Icon_weapon_31="9cbb1e02-0c3b-469d-ae05-62683cec96bb",k.Icon_weapon_310="db5a9f64-a7a1-402a-9706-59197ba6a1d0",k.Icon_weapon_314="241be73a-400d-471a-b02e-f20b6bb947b4",k.Icon_weapon_315="38d9f8fc-e69d-48fc-ab34-df753bf41719",k.Icon_weapon_316="cffb730f-f541-42b2-9aa7-4a3926818643",k.Icon_weapon_317="38c7ba14-f446-4f39-9721-1884a9fac6c8",k.Icon_weapon_318="3d373318-1ec3-43c7-879d-f2a027d94474",k.Icon_weapon_319="3d6b0dbb-5508-43a6-8ab3-7541eae6336d",k.Icon_weapon_32="582978bb-e3f0-4754-a733-01246e067c22",k.Icon_weapon_320="49489fe0-1dce-4d4e-aa93-8e412b76f9cb",k.Icon_weapon_321="9904038d-43b1-4920-b8b5-1ac1b96b5388",k.Icon_weapon_322="31a2ba8a-a4d3-4942-b7cd-725f3e62b147",k.Icon_weapon_323="545facbf-5ac8-4348-9b54-9c1c516c0b75",k.Icon_weapon_33="c183f343-7d2e-4406-a572-2b9583feb76e",k.Icon_weapon_34="daabb528-16f2-4a02-8137-c1c4eac38230",k.Icon_weapon_35="f8ddbc68-4124-4aa1-8f7f-d531994e13d8",k.Icon_weapon_36="a60dfc45-89c3-4800-ae8f-759d12696218",k.Icon_weapon_37="942994cf-5320-467b-87f6-3ddc343b8bc0",k.Icon_weapon_38="679504ca-edd3-4008-becd-f8b388a8cd70",k.Icon_weapon_39="956b1253-25af-4beb-b2ba-bc30d143c392",k.Icon_weapon_4="11574e5e-e2af-4e1c-89d6-b12fa92bebcd",k.Icon_weapon_40="097900f1-0dac-4172-82d3-39b2bebd16fa",k.Icon_weapon_41="34f68c8c-74d2-415f-8978-d5bd3ed3bcb0",k.Icon_weapon_42="0456b091-52ac-4cb9-b98c-ef7074263128",k.Icon_weapon_43="e8bf3772-14d2-4319-a031-56c2a4720a1c",k.Icon_weapon_44="a11ec914-9d11-4539-a647-b32bc3e24102",k.Icon_weapon_45="dd6d6066-deb8-4f77-9c16-b5eb1aa358c9",k.Icon_weapon_46="b30743f7-bd8e-4ab7-ae63-2b132a214775",k.Icon_weapon_47="c5b6aac0-e707-4852-92d8-849c7b8cb39b",k.Icon_weapon_48="6fa2f6bc-fb22-4862-844a-718729f24de8",k.Icon_weapon_49="5dddbbe9-ba0c-4dff-9aa2-0495cc04893e",k.Icon_weapon_5="3c419e52-4ffb-4e9f-9117-1c2ec37f4b9c",k.Icon_weapon_50="40afa905-3192-4ab0-a1f9-02dc26fa4a4a",k.Icon_weapon_51="ba5ad703-781c-4f71-9903-6fe42af54fb7",k.Icon_weapon_52="461bb9ca-7608-477d-bac5-b5cec37cc67a",k.Icon_weapon_53="d41c0688-a89c-43ef-a8a8-1d643aa2e0e6",k.Icon_weapon_54="caa8f5d7-868d-4b94-af04-a751a78bb7c1",k.Icon_weapon_55="659b3c30-0784-49b1-9acd-30c9652e2f2f",k.Icon_weapon_56="35ace9af-5b86-4d29-91c3-c6869b07813d",k.Icon_weapon_57="2a2de320-a79b-4ac3-87a6-5dbd5e4792a2",k.Icon_weapon_58="ba6b98f5-8f6f-4c76-9066-1e96769e11dc",k.Icon_weapon_59="6286e5e4-da27-4214-bcbe-61a9d8655f1b",k.Icon_weapon_6="7d7f5646-54d9-4087-ab29-df74ea7f0eff",k.Icon_weapon_60="dfc699c8-0b1c-44e2-90ad-4b94c15e6641",k.Icon_weapon_61="88b25f8a-70a6-4177-bf21-cd2ff2c15dd8",k.Icon_weapon_62="565a5939-c82e-4d54-a6d9-d2cb0d9ad34b",k.Icon_weapon_63="2997e965-a666-4a8d-9404-c4ef6e0388e3",k.Icon_weapon_64="b73938a0-b939-40fd-a97d-6c7f3cab2dd3",k.Icon_weapon_65="959eb0de-d7a8-4610-928e-281272389fc3",k.Icon_weapon_66="6eba519f-02f9-4193-82bf-ce2413038924",k.Icon_weapon_67="a72823db-3ddc-4cca-a60b-823c015829c9",k.Icon_weapon_68="35be0741-42fd-456a-812c-57c6a89c8919",k.Icon_weapon_69="d448c554-2082-4f24-820d-4dbbf6b07c77",k.Icon_weapon_7="9976a37f-1258-4c74-8d37-ef4f2499dfa0",k.Icon_weapon_70="3ca23504-9663-4133-a3ed-203b810436be",k.Icon_weapon_71="6d08eef2-ca75-4144-bb99-e85d4332e10a",k.Icon_weapon_72="f191bca9-af38-4000-a8ce-b43f57cf634f",k.Icon_weapon_73="908add0f-1a15-471a-a4dc-8fc70ccc403c",k.Icon_weapon_74="b64d02a1-6448-496c-b88d-22011810f6a4",k.Icon_weapon_75="8af14e35-dea3-42da-81bd-042fa20d849d",k.Icon_weapon_76="583e025b-b8aa-45bd-845d-53a490221143",k.Icon_weapon_77="78f9eb1c-e763-4f7e-bb6d-90642ce1abad",k.Icon_weapon_78="e65cd0fe-3960-4932-bc74-287d62c54bf7",k.Icon_weapon_79="f41abb7e-61cf-4c35-860c-09076af30dd9",k.Icon_weapon_8="33e90953-4dfc-4f02-a5f1-0a8437463d66",k.Icon_weapon_80="2c3fa3e5-ab75-44ae-904f-4756f1933027",k.Icon_weapon_81="67c90fa9-8f4c-44cd-ad38-2a2f9a5ee966",k.Icon_weapon_82="55f91252-faa5-49f7-84c0-84b1239d5826",k.Icon_weapon_83="aa066562-bb6d-44c2-8eed-1192acef1107",k.Icon_weapon_84="e5b8f63b-4698-471c-a408-d662fc90ce3f",k.Icon_weapon_85="4465f6c9-30ec-48ec-98c4-f1e3c015bded",k.Icon_weapon_86="54bdb2f1-f3a5-4df7-ba7b-0c1a40c25cdc",k.Icon_weapon_87="787a3250-1336-4b73-bdda-f70f21373932",k.Icon_weapon_88="58edf0ca-f951-47ac-a107-507fe47194c6",k.Icon_weapon_89="d579d4f8-7ebc-4712-9d9e-bc7c6bbd479f",k.Icon_weapon_9="bace1907-1080-4812-a685-8ce79320ac53",k.Icon_weapon_90="15ebe361-5962-41fb-8377-8313960b33dd",k.Icon_weapon_91="afba2971-db5d-48a4-8ce8-d509eb302c97",k.Icon_weapon_92="ef1f2b79-bbaa-42e9-8f33-fb3399791c7d",k.Icon_weapon_93="cead2f52-8557-4350-b719-6ddfbb4df451",k.Icon_weapon_94="2df69434-e901-44c2-83d0-6d4b49765508",k.Icon_weapon_95="2b7a7d04-3cda-41e2-bd49-32b06ca43dfd",k.Icon_weapon_96="d346da67-2a9a-47f4-8a8e-9dfabee943bf",k.Icon_weapon_97="f985b3d0-29bd-4176-b87c-f40a159df615",k.Icon_weapon_98="a8b9959d-1b5f-4bbc-9e9e-dd976864cd0d",k.Icon_weapon_99="4e9949a8-92d0-4935-b5b4-9e1811ecea65",k.Icon_xp="d4567fad-c437-4fb0-abb5-6ac5b71da560",k.Infinitytower_closed="a18a20f1-c854-439d-9af0-692a80efa18b",k.Infinitytower_floorbarricade="70f73256-1807-4b33-8cdb-457f64d1da57",k.Infinitytower_open="f9119200-ed8c-4ec8-9efc-2e80132e1e88",k.Info_rewards_cycle_2="5fcc63ed-8399-4208-9c24-82e08d0a6cd2",k.Ink_ball="efc7da2d-a795-4058-abe5-807bf72077e1",k.Ink_blob_1="b9905e7b-0b08-442a-8ac5-37c7f1d17496",k.Ink_blob_2="dd3bfb2b-247a-4ce0-bf0d-0d1ccf83eb23",k.Introducing_Wizard_Dash_Home="9dd5416b-14c3-4be7-97fe-fe705c7432ea",k.Introducing_Wizard_Dash_School="eca6ecea-e2bd-44e5-aed9-1b6ece8d7042",k.Item_details_modal_background="bd6c2bef-a799-4df5-87c5-67dce9b16acb",k.Item_details_modal_background_ultra="938b2dda-3619-4cd9-8234-7fa68ad0a9a0",k.January_2024_teacher_gift="3041f213-1c32-4dd0-b5d3-e79a78f9e526",k.January_2025_teacher_gift="5f41f130-ca52-4218-a203-debbbc9bdcd4",k.July_tt_home_screen_background="d31577ac-ad74-46c9-bb14-14bf4bbe8039",k.June_2025_tt_home_screen_background="2894dff0-0ba5-4f57-94e9-6fa237d0ba2d",k.K_state_1_100px="83f303a7-d96a-4093-b419-13ee9a8424d5",k.K_state_1_150px="6809d5bc-6302-4bff-8f57-f9efb0f8abc9",k.K_state_1_225px="e872d8bf-c10c-4b64-be88-7bd4fc5c5ed7",k.K_state_2_100px="79ae76d1-1de7-44fe-92cf-a5df6d3f3003",k.K_state_2_150px="a87240ee-875b-41ab-8fa1-c65034893e85",k.K_state_2_225px="7f196f43-03b4-4c97-a6ae-7e6db18bdef5",k.K_state_3_100px="f8d052fe-4eae-477e-8953-91bfbac248e1",k.K_state_3_150px="51e5c2ab-7c5b-4b0d-a084-af12a961762c",k.K_state_3_225px="5102f9d2-8a08-41f1-853a-43f1e407bb37",k.K_state_4_100px="a29573af-c63e-4cfb-9754-51e6b002ae1c",k.K_state_4_150px="f126421a-d0e1-4b6c-95ee-fc122a6628fd",k.K_state_4_225px="dea5a709-e010-4b3c-9e11-d13356843653",k.K_state_5_100px="712b8ebd-1c29-46c1-a482-b949e9da2b80",k.K_state_5_150px="65872e15-f25e-4701-af8c-ad0a740843db",k.K_state_5_225px="84876ff7-fa59-47cf-92ed-e71f58dc5578",k.Kandi_Korn_Tooltip="bfee774f-8225-4d2f-b56b-dd7cb4d7bd76",k.Key_pose_dragon_astral="24d34652-594d-43a3-bd2f-71ad22b8c015",k.Key_pose_dragon_fire="8c670b7f-47f6-451e-9e6c-386bbd4b6416",k.Key_pose_dragon_ice="25f65336-b177-4c0f-9adf-38cb0e7baf02",k.Key_pose_dragon_physical="0d281863-90b8-490b-a830-a9bf5e913613",k.Key_pose_dragon_physical_smaller_silhouette="654fa615-e1c2-49ef-873d-344c4f3dd616",k.Key_pose_dragon_plant="929d83a9-fa13-410a-b2c0-71a10063701a",k.Key_pose_dragon_shadow="3763af09-7994-492d-abd9-d8fb6a992802",k.Key_pose_dragon_storm="b3a6ecb9-0d27-482a-86b4-d53cec889e1c",k.Key_pose_dragon_water="ec4b139d-b476-4ceb-a6c7-e21c75a4847c",k.Label_full="e7908d67-1d90-435f-b277-3206893d404f",k.Leaderboard_class_code_backing_splash="ddc6e534-0bbe-4474-af3a-5f386ecbbec4",k.Letter_DungeonsWizardWatch="52f514c4-1bc8-437f-93a5-2ed88fbba129",k.Letter_RuneRun_Launch="c8393d0b-0923-46d4-ad57-4961a27e1187",k.Letter_RuneRun_Prepare_ad="1e32ee54-df98-498c-8a37-1c8f4dc5310c",k.Letter_RuneRun_teaser_ad="219ebdad-76a4-416f-bbd7-c8278695cb99",k.Letter_crystal_caverns_ad="39aaf8ba-948a-4b0f-bf78-6e166647270b",k.Letter_crystal_caverns_teaser2="8ae37d20-92a1-4ce4-9b4f-36a864b40048",k.Letter_mail_open_image="34ccbabd-faa8-4f9e-87d8-dcf8e1501208",k.Letter_member_reward_feb="9c27e6ec-1d65-476f-92da-0203e7e9bdae",k.Letter_member_reward_march_2019="ab7ae1ad-9239-46c2-846b-5fc5146b50f4",k.Letter_memberbox_to_treasuretrack_mailer="42896a0d-634f-4bf1-8e18-5744ab0c6728",k.Letter_memberbox_ultra_april2023_mailer="4e84e868-8752-46a9-91e1-3196a2c35c13",k.Letter_petbook_ad="aad7b2bd-f844-4d44-9fa0-707713502631",k.Letter_pumpkinfest="ea42cb6f-d575-4bb2-b822-a3ce0fda0933",k.Letter_red_bubble_ad="a0bafb18-2d85-42cb-a3cb-597f9954d542",k.Letter_runerun="35f773db-2739-474c-bd8a-35ea36c6db7f",k.Letter_season_end_rewards_bronze="efa3bf7d-313e-412a-872b-0c18f7a6faa3",k.Letter_skywatchtitan_ad="93f0faba-17db-4bbb-bb63-9beec8efa422",k.Letter_springfest_ad="dc3a3969-4130-4991-8902-15b06c012ed1",k.Letter_springfest_start="dcfc7694-bbe6-4fd8-97c1-062ea4d90e04",k.Letter_star_bonus_teaser="63f76560-95f2-4b20-870f-67e06d35b23f",k.Letter_starlight_teaser="1577d212-4eb5-440e-a066-261e84ed0ec9",k.Letter_summerquest_ad="fcb6228f-304e-436b-8b66-7ffb90065cff",k.Letter_titan_co_op="6db6af2f-ee16-4dcd-9707-d5c8bd04f8c9",k.Letter_titan_gearset_ice="5d731e3c-5f4d-4dad-aea6-f30207bdcaec",k.Letter_titan_gearset_ice1="d6761a8c-986a-4ce0-9b52-bab7e905ad23",k.Letter_titan_shard_teaser="6fc701bd-a6e8-4895-879d-7f3e51128fbf",k.Letter_ultrabox_april2024_mailer="979fd69e-04fd-414b-b643-7853ca8f47b2",k.Letter_ultrabox_december_mailer="b450d9ae-d581-47a2-a26b-654625b2d507",k.Letter_ultrabox_january_2024_mailer="08c5e1ce-99bc-479e-b6db-41e8bf0c1a15",k.Letter_ultrabox_july_mailer="00e6a61d-1a9d-4317-978a-0efce796f740",k.Letter_ultrabox_october2022_mailer="845760f5-83a7-4c2a-80fc-662cfef41f50",k.Letter_ultrabox_october2023_mailer="e454efd6-31aa-45c7-87fd-03625b344f68",k.Letter_ultrabox_to_treasuretrack_mailer="2160a0a7-468d-454c-b426-c5c2bab6f7cf",k.Letter_winterfest_2020="dad19ad3-42cc-43b8-b692-e045450fd7a9",k.Lock_glow_blue="b0e4eb75-ba02-4c4d-ad60-dfbc314c0c9e",k.Lock_glow_magenta="3fb36e25-1402-4d44-bf55-7f1e42384ff3",k.Lock_glow_purple="24c81c23-4157-42a7-86de-80509c9aace2",k.Login_bg_1="30dec100-0244-4b59-8a38-33cbd8cd6faa",k.Login_bg_10="c4708286-1749-4338-b26f-c4c7ff78f654",k.Login_bg_11="508f5c50-36a0-4f0a-863b-7511b03e1bfc",k.Login_bg_13="48f61fbe-215e-42a0-94ad-81bd491da4ca",k.Login_bg_2="a61377d3-2379-4a60-a22a-32fa18f40a26",k.Login_bg_4="e4118670-c092-40f7-87b8-4069cb27efce",k.Login_bg_5="092e5971-6164-4803-b1be-967c09c433b5",k.Login_bg_7="9d64b0e5-9530-4744-8e7a-f35808d61475",k.Login_bg_8="fb63adb4-78ab-4e13-922c-799c8f21331f",k.Login_google_signin="e3717a41-fa27-447a-a6fd-ee20ca7d4a5a",k.Loot_bag_modal="9ac9796f-3361-4503-b9c0-7bfb3e0c8c61",k.Loot_dash_background_lobby="b9d3c36a-1556-4fa5-be20-a172fcbfad5c",k.Loot_dash_lobby_cover="f6de9afc-10c1-464b-876c-ae629a2db04e",k.Loot_dash_logo="62e073cf-2f99-4804-b7eb-9da1cb430a8d",k.Loot_dash_transport_modal="7ee205b5-e2db-4928-9482-eab245f28125",k.MB_Treasure_track_May_2024="65b8b2db-e056-4969-8908-58d7ad5123b3",k.MP_Intro_Modal="1e429705-e210-4be8-9b24-c0dc8d71b6bb",k.Magicoin_pile_core_no_glow="f431c3ad-ccb0-4d30-8975-82ea4a280570",k.Magicoin_pile_core_small="2bd05195-60b4-4734-b661-bd53b22ce7fd",k.Magicoin_pile_single_image="2566ba35-b257-411f-8ab3-6429c68d2cc1",k.Mama_Star_Tooltip="7e31bd48-f72c-4c62-8a8d-ffbb8819bdbd",k.Map_icon_moonlightfest="5d058aa4-a824-45ba-9b1d-cfacb990fe21",k.Map_icon_pumpkinfest="4aa9f4a2-1fa2-4f1a-bf9a-bc669c68931d",k.Map_icon_starlight="7067d4dd-7d0a-4073-aa44-7e299f6cd0fe",k.Marble_large_active="d10ec19a-5675-4176-b604-2682fd5a46c4",k.Marble_large_default="d97071f6-18c9-4ca7-8c21-c9af9751af39",k.Marble_large_hover="39aeccae-f28c-4520-9135-27c855b39566",k.March_2024_teacher_gift="f7d0b888-137e-483c-bb3b-ce1d59499552",k.March_2025_teacher_gift="9f6b9ce8-0322-46bc-9e8e-a7ebd692cf52",k.March_2026_teacher_gift="7ec2eef0-f56e-4f92-a718-45cb38f87a9f",k.Matchboard_player_rifts="9f8a328a-6794-466b-a155-983c7934c5c8",k.May_2024_teacher_gift="08c7d742-b372-4593-841b-4dafef6f21ba",k.May_2025_teacher_gift="29626c58-0cc4-4673-99f7-6e1f7f1f7598",k.Mcoin_pattern_celebration="f0b20b12-e885-40c4-bbb8-da09abff6462",k.Member_frame="28eaa4b0-5039-495c-a806-f1081fb89d72",k.Member_jar_empty="dee4a641-4c79-410e-bf21-96c2e30eb41d",k.Member_jar_full="9979d576-b03b-493e-80e3-a8965c1049c7",k.Member_jar_half="a5957dc3-8a04-4c50-a8af-beb626d85d6f",k.Member_jar_little="a3fd68dd-926c-462f-a554-1e3d6e5040d7",k.Memberbox_mailer_june_2024="36058cca-b83d-4023-8f7f-6ce1175eed9e",k.Memberbox_preview_mailer_image_December_2023="5ff35ac2-b754-42fc-8566-f0f8f9a392c1",k.Memberbox_preview_mailer_image_May_2023="075aed6f-065a-4228-ba28-2d4c88023a4c",k.Memberbox_preview_mailer_image_October_2023="14aa1ede-d22c-48d9-9920-a84c941b94cd",k.Memberbox_preview_mailer_image_September_2023="aae9840c-3953-4c9e-aec1-094e397736de",k.Memberbox_preview_mailer_image_april_2024="55d648df-d8ae-4066-bdd2-7c1c7f52ed94",k.Memberbox_preview_mailer_image_aug_2023="49b8015e-5747-412b-a5eb-4387a614608b",k.Memberbox_preview_mailer_image_february_2024="d1b28dcb-b711-4548-9eec-803172773bd2",k.Memberbox_preview_mailer_image_january_2024="8855f77c-e520-4085-818f-270d22199c58",k.Memberbox_preview_mailer_image_march_2024="39a186ee-778c-4401-9cab-a0a6f36002dc",k.Memberbox_preview_mailer_image_may_2024="473b62ab-8afb-4fe0-9fe9-124c80ae0122",k.Memberbox_treasure_track_mailer_June_2024="8204f4ef-8675-4932-ac23-75b00543a84a",k.Memberpet_icon="d512556b-5825-46cb-9d63-c7cba6cd4465",k.Membership_Modal="d73e3da6-71c7-4335-818f-21713bf66716",k.Merge_rank_badge_small="66ace882-bea9-44a5-b7b1-24d212933b3e",k.Mini_member_icon="54c86c56-d5a7-4306-b3c0-c6fdc9797f5a",k.Mini_member_icon_b="b0d5ee17-3749-4be6-85dd-a4abe432d9da",k.Missing_asset="d2d5dd32-08e1-4c39-9ae2-771ba5d49ee3",k.Mlp_arrow="9b2914d7-34c7-4ed9-9817-cc229e9b49de",k.Modal_banner_blue="4acf024d-76d5-4cf3-90fe-a5b32e85f713",k.Modal_banner_green="551b0540-f04c-47bc-8fbc-e463090e8745",k.Modal_banner_purple="504115e9-eb66-4eb4-9f3d-643706d0b11e",k.Modal_banner_red="1f970558-2087-4ffc-8054-6749c4fc0d29",k.Moongems_promo="3beeb7f2-1f91-49a8-bfe8-e2847b939b30",k.Moonlight_loading_screen="8106c7ed-f79b-40c0-a74e-9e69c0daac88",k.Moonlight_statue_boss="3615bcf2-580b-4b11-8a24-db5c08880dd3",k.Moonlight_story_1="e9da43f1-71ea-415e-8c4e-25e910d2a4d3",k.Moonlight_story_1_intro="18364aaf-4329-445c-97b8-01c27ab72152",k.Moonlight_story_2="ddd1fddb-d0ec-44ea-b74c-aefde9540503",k.Moonlight_story_3="66153fae-8dc2-4464-904f-bc11d18fab5b",k.Moonlight_story_4="2575bfcd-9563-4b6a-888c-6683d053b5c1",k.Moonlight_story_5="585b8917-6c2b-4720-af8c-c414c2f19d2a",k.Moonlight_story_6="3fb66fc6-d2ba-4fff-8949-2d49cc43c35c",k.Moonlight_story_7="694f9302-5008-4833-95a7-fbacc609b86b",k.Moonlightfest_wizard_watch="8d1b38d5-4290-4340-9f9b-4ad48a7b540c",k.Mount_above_1="3f7065b4-66eb-45e0-8f8c-fd47f33ad983",k.Mount_above_3="4f4f93b5-70b4-420f-9f6b-eab2d696f788",k.Mount_above_5="09d4b806-3dee-4c61-9b79-8ca8e9afc7ed",k.Mount_below_1="afd8ee62-bad2-44fd-8914-eb9e8311267e",k.Mount_below_3="caf0954e-3f50-42c9-8b25-5fdcb0ccbe38",k.Mount_below_5="1f0dc981-0d0c-48b8-b271-b3394d8c205e",k.Mp_boost_popup_image="1459209a-12cf-49a9-80f2-4b650f61a7eb",k.Mythic_Aquadile_Hero_Pose="5c3b2a6a-5c80-4de8-b1e1-662397000e21",k.Mythic_Arcturion_Hero_Pose="994e3475-3401-46c0-8fb8-745dec04a779",k.Mythic_Barkbarian_Hero_Pose="3ce8eca7-bbfb-4777-b07b-74e56344ba2b",k.Mythic_Blast_Star_Hero_Pose="eb449254-d605-447b-b7bf-62e27729ac08",k.Mythic_Buzzra_Hero_Pose="aed197d5-117c-4e18-9911-a9e23930059c",k.Mythic_Cerenox_Pose="c67a26ab-8d6f-4ffe-8aa4-28989531f4e0",k.Mythic_Cryospike_Hero_Pose="fadfc104-7135-44d3-bc2a-3faae84e1b4f",k.Mythic_Drenchor_Hero_Pose="77b0b732-6891-49d4-aa92-3a5db19041de",k.Mythic_Eclipse_Hero_Pose="7cd47d89-158b-47a9-a62c-bfa04bfc48ce",k.Mythic_Frozzra_Hero_Pose="d2161848-a95c-4fa1-b484-a9aa2f24333e",k.Mythic_Glimmerwing_Hero_pose="c3d73260-0603-4997-a07d-f9fe43943bc9",k.Mythic_Gryphroom_Hero_Pose="70895dfc-0ece-4914-aa42-ba1ad3fceae2",k.Mythic_Gryphtopus_Hero_Pose="52b4c776-810c-4d74-a180-9003acddc911",k.Mythic_Hydroid_Hero_Pose="567de9a3-9c98-4a2f-911c-980528e76609",k.Mythic_Intitalk_Hero_Pose="18ac7050-4625-41d7-aa2d-9549fd069de0",k.Mythic_Llavama_Hero_Pose="01bd195a-d706-430b-b8f6-03e25ca7265a",k.Mythic_Luma_Hero_Pose="6112d42b-f6ab-458c-9a66-6a9c84d9777d",k.Mythic_Luna_Hero_Pose="57922fd9-f372-4777-832a-ff22fc6a5902",k.Mythic_Magmayhem_Hero_Pose="c35706fb-f12d-4596-b602-e374cefbeab4",k.Mythic_Merahawk_Hero_Pose="8b84fd0b-9533-4cd8-ad30-d65b40478c35",k.Mythic_Nine_Tailed_Fox_Hero_Pose="e8f7084a-de99-4a99-b388-84b2c4755f6e",k.Mythic_Polartide_Hero_Pose="43d66525-973a-4094-9d13-f1b094ff8f96",k.Mythic_Pyrodile_Hero_Pose="be78f521-b9b8-4ed4-a996-04fa3d6bd839",k.Mythic_Serasoar_Hero_Pose="5130e997-e2d9-4654-8517-a24ba25d2020",k.Mythic_Shimmerstorm_Hero_Pose="8a68da24-e357-4777-bb9f-7c78711bca9e",k.Mythic_Shiver_And_Scorch_Hero_Pose="01a58c05-f7fd-42df-99ee-97feaa3750c8",k.Mythic_Solar_Hero_Pose="07f8e16d-dfbf-442e-acaf-71268c370f58",k.Mythic_Splash_And_Spark_Hero_Pose="05575a36-5e6d-4133-86f6-e934e612ac2c",k.Mythic_Thunderclaw_Hero_Pose="19c921b2-a615-4d05-980e-7d9eb847f787",k.Mythic_Tidus_Hero_Pose="51cac9a4-c1eb-4a91-9325-be98321d382a",k.Mythic_Vegabloom_Hero_Pose="69f5c30c-d1f6-4556-a1c7-89a1fa93a9aa",k.Mythic_Verdama_Hero_Pose="bb9fd3a9-b9e1-4303-b310-f0b9c1a55be0",k.Mythic_tab_bg="af2481a9-617b-4df5-a7cc-c8e818e064c2",k.MythicalEpic_WW_Aquadile="43c28104-403e-4b93-a565-dac539815667",k.MythicalEpic_WW_Arcturion="4257bcef-de30-4258-8557-2c3d552eb9f0",k.MythicalEpic_WW_Barkbarian="6aeb941c-f9e1-455f-a358-372f7e1a205c",k.MythicalEpic_WW_Blast_Star="2161440a-1a68-4df3-907e-dd2d66753f29",k.MythicalEpic_WW_BluefuryMagmayhem="83640d16-f8d6-4f5c-b41a-5177b5839221",k.MythicalEpic_WW_Buzzra="df713468-6c5f-4b13-a733-b8160f4e377f",k.MythicalEpic_WW_ChillnChar="1ca6bbac-2120-4a7f-9254-83f7f2b52af4",k.MythicalEpic_WW_Glimmerwing="1205771f-76b1-4e85-8aa6-d167b9fcb61a",k.MythicalEpic_WW_Gryphtopus="c29f3680-9580-4a9a-984f-7c50aa672ad3",k.MythicalEpic_WW_Hydroid="81a44379-9ac2-42b7-ab01-2acb73c2f297",k.MythicalEpic_WW_Lumanight="22116dd5-d3a3-4bd3-8f06-c5da9957a634",k.MythicalEpic_WW_Luna="66690b5e-08fe-439e-a955-b675ba48548c",k.MythicalEpic_WW_Magmayhem="69e7b184-cd7d-4af3-a803-677dfe279ba1",k.MythicalEpic_WW_Nebula="34a025e5-80e0-49c8-a8eb-d7f4c2443424",k.MythicalEpic_WW_Pyrodile="ad3d00d2-af5b-4bb9-aad4-9eccea17fc58",k.MythicalEpic_WW_Shimmerstorm="eccd283d-9829-4142-8096-5e6e587c1309",k.MythicalEpic_WW_SnowyRiptide="1fe4b8db-9d30-47c3-a308-e3cb6fd5b882",k.MythicalEpic_WW_Solar="a763d26e-f1b8-4123-9422-66d304ae7ea1",k.MythicalEpic_WW_SplashSpark="23f8582b-879e-421a-bd39-447978dd4243",k.MythicalEpic_WW_Tidus="185d4b16-0fe4-44cf-a906-d494c15a2f05",k.MythicalEpic_WW_Vegabloom="2e80ce74-2893-452a-a4f6-e8665a5c6687",k.New_member_tooltip="99e45e46-4388-4829-97e5-c557a728d9bd",k.Nicknamer_pedestal="e2b8bbae-f585-4b59-aa89-549b9c2c82ef",k.Noot_prompt="65a1e456-b9ee-46ea-969b-8846a5952359",k.November_2023_teachers_gift="3df6a108-c4b7-48c9-bdd8-c85bc1ee250a",k.November_2024_teacher_gift="02f544b2-70e8-4d30-b374-d01499d0fc26",k.November_2025_teacher_gift="1b5ccced-4a8c-47f1-807e-e0cc9fcb9eea",k.October_2024_teacher_gift="6d4dd436-b605-4e10-a47d-1a8ed25ac142",k.October_2025_teacher_gift="67ef29bb-0ed5-4148-bc68-7181781ebd02",k.October_2025_tt_home_screen_background="c57e8901-7703-42af-9b5a-636d83de53ce",k.October_tt_home_screen_background="20fe6e9f-7184-4560-8eaf-92580a5fa41a",k.One_million_question_reward="7db9c933-d74f-4c33-95fc-53ff443564bc",k.Otp_background_tiling_pattern="2b0f34e4-af12-48ab-923e-ea4f8b1d1aa1",k.Page="c355f557-d0fe-43d2-bcbb-191e47cc2dc1",k.Panel_star_small="db35c76f-546e-4f79-a31f-779c458811d5",k.Paper_section="d7076e68-3f9c-42cb-a997-94740a3fb268",k.Parallax_tier1_back_small="ce253584-d2eb-42e4-8d17-16a8bd9275a7",k.Parallax_tier1_front_small="b1e29a81-834d-4697-9df0-222e574c9d4d",k.Parallax_tier2_back_small="316fa102-aed2-4889-9c94-96627c9d155e",k.Parallax_tier2_front_small="c6ec31f6-57a0-40d6-b15c-123e413071b8",k.Parallax_tier3_back_small="20e7a3ed-224d-4314-ab1d-83f7a4a020c7",k.Parallax_tier3_front_small="309d7511-5399-4507-a40d-aff668bf187e",k.Parent_account_signup="5af11e88-29aa-4cba-aad9-aaa3e3dfc794",k.Parent_attach_video_image="e9ea9155-a841-4c20-b9f7-a983f3414491",k.Parent_image="de6541d6-e770-443d-a351-9be8b41210ba",k.Parent_panel="86748226-3d3c-40f8-a867-e0208ecf7b6a",k.Parent_rewards="0a77af6f-413d-46e7-9f2b-771b3647c6ec",k.Parent_rewards_1="e6a054b1-7c54-4be2-8f28-0271f6da209d",k.Parent_rewards_2="4ca8bd98-ac6a-4ae0-bfb7-5382208b9c25",k.Parent_rewards_sparkle_pup="d947477b-3d58-48e8-a3fa-d21592776c01",k.Particle_astral_ball_1="e7ceb024-bb47-48f0-a5f4-2ee343898a73",k.Particle_astral_ball_2="32324fc0-0b71-4673-8ba5-f6522fda7932",k.Particle_astral_dust_blue="00be5a73-4d6b-4b06-a238-bcd1ad98ff58",k.Particle_astral_dust_blue_soft="52c61443-0b5d-4300-885b-846efe4909f1",k.Particle_astral_dust_star="dd1ddceb-1072-4b4d-b137-2bc922d01ed4",k.Particle_astral_dust_yellow="8ffcb05f-8597-457b-8ff8-fbdcce474442",k.Particle_astral_dust_yellow_soft="f92674f4-d0a3-4df2-8422-a17e0d4611b8",k.Particle_astral_glyph="822eef05-a960-41b6-81b8-46f5cabfab2e",k.Particle_astral_petals="a1d69150-eec8-4d3c-8c70-2a416340b739",k.Particle_astral_sparkle_blue="32ee4d09-3aff-493c-8d82-006bee5c6c00",k.Particle_astral_sparkle_yellow="19f18918-d3fa-4d40-b26d-346a38b21609",k.Particle_astral_star_large_yellow="32c9b107-08d1-48eb-be05-7d6da3676bf1",k.Particle_astral_star_small_blue="809339f2-2d66-49d5-8b07-138b8a302455",k.Particle_astral_star_small_pink="e46f5915-acdd-4c6c-a6d3-06e6216786fc",k.Particle_astral_star_small_yellow="9dd15a97-e337-4272-b5d9-9e6638f5988c",k.Particle_astral_wave="126d2f4a-055a-462a-b0c1-77d3b6bfae93",k.Particle_basic_1="8b98758e-f41d-4f3f-92a9-d3b4f641e94c",k.Particle_bubble_shipwreck="02983da0-2672-4043-983b-0d6550810229",k.Particle_circle_icon_glow="01a64028-4a08-4f3b-8710-cd68af2d3ad2",k.Particle_confetti1="4a5cf85e-9065-441d-b600-89448b1437f5",k.Particle_confetti2="6deed511-8f75-42d1-930d-6abc5d799575",k.Particle_confetti3="0bb60ba7-7fa1-452b-aa30-db0ae78b9573",k.Particle_confetti4="a122e368-e4b3-4389-b26b-3ed3ce1582a5",k.Particle_confetti5="c0000d36-1328-4321-9858-d620aca97753",k.Particle_confetti6="54ef243a-624b-490e-bb3a-ec591d067f30",k.Particle_confetti7="1dbc4d29-1301-4bf7-9470-bd0fd6f68925",k.Particle_confetti8="006cf741-4712-4bbb-9fbb-0ca79ba5b309",k.Particle_confetti9="e12a01af-1699-4ed8-b778-b5162a873bfd",k.Particle_fire_dust="76538aca-620a-4480-b169-63c31a2b5ffa",k.Particle_fire_fireball="3d925935-5e5f-4ff3-ad8f-9d2cae086c62",k.Particle_fire_flame_1="166e6c0a-553d-4e28-998c-d7ebc7982b3e",k.Particle_fire_flame_2="36482bb5-10e3-491c-9731-a169e5e777d0",k.Particle_fire_flame_burst="0e26e98d-8fb3-49df-ae87-beef2c0aad3f",k.Particle_fire_lava_ball="95ba21fb-e6d7-4a46-b92e-2e7be62848f8",k.Particle_fire_red_ball_soft="62db4975-f0f6-4970-ae62-b8edad9e93c4",k.Particle_firefly_expert_magenta="da7a3673-b9e2-4a2b-8c46-9eb323ad94fd",k.Particle_firefly_hard_blue="7b8fa28c-ae42-4437-9d49-d2ee99563e91",k.Particle_ice_shard_1="5ad16175-74c3-40ce-9a5c-6e4730fc0e83",k.Particle_ice_shard_2="62f90932-6ea4-4923-bbae-b8b55bba9d41",k.Particle_ice_shard_3="bd71f620-31b8-4093-8900-a46c1af72cde",k.Particle_ice_shard_4="aa0a2cd3-78c7-45b3-9c57-8fec7b36647c",k.Particle_ice_shard_5="1fbd2f2e-76b4-442e-870c-c95614b3e9a1",k.Particle_ice_shard_6="98d63c06-0142-4439-9cdc-8305b6c673f7",k.Particle_ice_shard_7="ac32311a-2a97-4b2f-a646-36971cc5733e",k.Particle_ice_snow_flake="82d050c7-f1ea-43af-b27f-5dd5f867bfb4",k.Particle_orb_pale="255174d7-67fb-473e-8691-fbea7f3a586c",k.Particle_petstore_1="b2f422f3-c00a-48b1-b6ad-f8fa6385fe80",k.Particle_petstore_2="3a576d53-d95d-4a12-beb6-950201120052",k.Particle_petstore_orb_1="f24ca185-eda1-4a1c-b5dd-21a0376e51c5",k.Particle_physical_ball_1="e036d562-6605-479e-bfd7-42a72f53e6eb",k.Particle_physical_burst_1="372c863f-b1ab-4be8-88b6-635e3759b783",k.Particle_physical_burst_2="4389c6d3-8621-44ce-8674-1d686afde153",k.Particle_physical_dust="80049b7d-55c1-400f-ad34-6a24df7e522a",k.Particle_physical_spear_1="5f6e4a7e-2d22-4f7e-b510-7844b7b02055",k.Particle_physical_spear_2="c17b93a2-beb6-4e5d-a103-335fccc4a5de",k.Particle_physical_star_yellow="97b056ca-21de-4924-9ee9-e0e839194d9e",k.Particle_plant_dust="aaaea424-aee1-43c3-977d-865f6893e293",k.Particle_plant_leaf_1="6e33d7b9-ac04-4668-a8ab-a61c61919a9b",k.Particle_plant_leaf_2="8eff52cf-a098-4005-b8fa-5f5a4127f244",k.Particle_plant_leaf_3="95bc75da-809c-4902-b1ae-536d9eba77bd",k.Particle_plant_leaf_4="51683980-a483-4123-a1a1-840f4eedaa43",k.Particle_plant_venom="e4eed321-8f28-4f91-9cb5-5d1b27223f03",k.Particle_plant_wave_1="8b4f567d-d641-4d00-8e92-6add1911b606";k.Particle_shadow_ball_1="16f0d3c3-725a-4a35-8e6d-902f5341e2f3",k.Particle_shadow_ball_2="4d408085-bd8a-4ee9-84a1-0c4c24daff62",k.Particle_shadow_ball_soft="61bfbd86-339d-4e3c-8721-2dae436b9073",k.Particle_shadow_dust_dark="23b7ce78-ad78-4a94-90f9-3f0f856cb5a2",k.Particle_shadow_dust_purple="e094999f-361a-4822-9697-13930ed491eb",k.Particle_shadow_fire_ball="f5bc36d7-2211-465e-996f-78670d1d9b02",k.Particle_shadow_portal="71db7306-a3ee-47e0-a9b7-9cc613e9f12e",k.Particle_shadow_ring="fcf63589-ff24-49d2-97ac-a4ab57718cfc",k.Particle_sparkle_white="161cb905-922b-4431-93e0-996c795d9ce4",k.Particle_storm_ball_1="9fac7f4a-a233-4f3c-8163-3f73c65b9ca7",k.Particle_storm_bolt_1="947c2857-bab1-4822-a3e6-187a214b1d9a",k.Particle_storm_bolt_2="a3b1a537-28b6-4221-a3e6-1b55a5247e4d",k.Particle_storm_bolt_3="dac88ca7-8cfc-474d-ae78-dcae37ea40e3",k.Particle_storm_bolt_4="daaa617d-d8ec-4d72-b8c7-8930619865c1",k.Particle_storm_dust="79f0588d-3840-4b6b-9495-5fc7200c0755",k.Particle_storm_lightning_circle="52870001-4b11-42b5-b7eb-87c0e0ff9e8e",k.Particle_storm_lightning_circle_2="a86bea4c-f778-4c73-87b4-5f18bc1d3b9f",k.Particle_storm_wave_1="8503f5d4-d40a-48a0-a4e4-0cd83afceb53",k.Particle_water_ball_1="d89f6c2b-35be-4ce0-b536-17fbde9aaaab",k.Particle_water_ball_2="8bc4e1eb-ddde-4678-8b54-c43d903315a7",k.Particle_water_dust="fcd29adc-d7c4-40b6-94f8-09df22bec3a1",k.Pet_Lore_Charfoal_banner="605f945e-5b9b-40fc-82c1-948094259914",k.Pet_Lore_Mermina_banner="df7f2040-53ea-4326-9157-5dbbc8bd098c",k.Pet_Lore_Snowfluff_banner="2c6b4623-7671-4ef2-9e8c-b215a8b00339",k.Pet_Lore_Sproot_banner="73fac858-ac00-4c0b-b180-211e4e1ba34a",k.Pet_Lore_Wott_banner="54f674f6-cfc1-470f-a00d-4998d559f746",k.Pet_Merge_FTUE_New_Menu_slide1="d24a9a06-9e07-4197-a11a-071f19ee7b00",k.Pet_Merge_FTUE_New_Menu_slide2="ebd57b51-079a-4dce-8754-56866960bd8b",k.Pet_Merge_FTUE_New_Menu_slide2merge2="0ffc0fb5-7e9b-4dfc-9557-83573ca5399b",k.Pet_Merge_FTUE_New_Menu_slide3="78a41e9f-1177-4bd5-8e30-943bc55f4a7e",k.Pet_Merge_FTUE_New_Menu_slide4="dd0e75d5-0b7d-4320-8e9c-33087d8b08d1",k.Pet_Merge_FTUE_New_Menu_slide5="38b51a6e-aec5-4201-9d4d-1101259a9600",k.Pet_Merge_FTUE_New_Menu_slide5merge2="9bf515da-7b5b-46bb-8772-2e231e9769cf",k.Pet_adventures_trailer="d419aa99-b7ba-4337-8186-2ef14b6280a4",k.Pet_difficulty_indicator="6272d06b-907a-4d58-80fc-30e28e0ef441",k.Pet_menu_team_bg="a9ad0d82-6913-4429-ac1e-b9a45f5bb969",k.Play_button_64px="cc6eb105-68bb-4d4f-82c2-807d58005ed9",k.Plus_member_modal_full="d32f78cd-1f58-48eb-988b-330ff490780a",k.Plus_white="82ca61d7-0804-4edf-927e-e42ba2edb078",k.Pm_post_battle_1="244143b9-d182-4073-91bf-fda516720a60",k.Pm_post_battle_2="454af535-0e05-4853-af40-979b1754c4a2",k.Pm_post_battle_3="ab48346b-77c0-4883-a0c5-cad8c3a8ba88",k.Podium_decorated="2d96e9b1-4147-4451-8bc1-847f756ab6ff",k.Podium_plain="51184526-ed50-4c34-ac7e-89e008581eca",k.Popup_play_at_home_reminder="3adcebde-1dcd-437d-b74c-cb99adc587dd",k.Postbattle_highlight_chest="90efc070-cc41-44e8-8962-2ac9c87e9d1d",k.Postbattle_magicoin_member_title="6a48b7d6-6de4-48e5-8bf0-c27db052f87b",k.Prodigy_logo="001660e3-bbb8-48e4-9a75-fe0ddd138bd8",k.Promo_memberbox_may="cb453abf-7f31-41d9-bf12-b8765ea1274e",k.Prompts_catchmorepets="546b627e-071f-4add-857a-0d36e7ec769e",k.Prompts_catchmorepets_0="9395d630-8822-4dd4-ac95-11f659607cf9",k.Prompts_catchmorepets_list_0="f08fc684-9378-48be-9174-b77aa23483ca",k.Prompts_chest="b8c73e89-97c9-4c5c-87ef-7b1e9b9f4ad9",k.Prompts_chest_0="7eafde13-b75f-49ed-b79b-f6cf37121c8f",k.Prompts_evolvepets="aaf0f2f8-458e-479e-ad37-ff6e94c29072",k.Prompts_evolvepets_0="d06296c7-36d0-4780-97f8-24c9eef630bc",k.Prompts_evolvepets_list_0="7fb9039c-0480-440b-af4d-c862e2004121",k.Prompts_generic_1="53939fa2-3ef5-4e45-b1e5-b08a0b4b382c",k.Prompts_generic_1_0="0acb4b4f-d8c3-4b56-ac7e-b8684685a07e",k.Prompts_member_gear="8abf4af3-aab3-40e3-97c9-48cbe54b8885",k.Prompts_member_gear_0="eb64ac2a-867c-4952-91b9-207c77c7a498",k.Prompts_memberjar="b6c4647d-b11e-4cd1-b0df-de738fdb961a",k.Prompts_petgear="fd2ff5a6-98bd-47e2-9048-11d50647488c",k.Prompts_petslot_churn="dab27a1d-5c66-48ce-a699-cb0bb0a27f37",k.Prompts_petslot_newmember="63b931ab-459f-47ea-b2f1-0bdfcf98fe7f",k.Prompts_starjar="7b65adea-8ba1-4f34-9344-a15f1618bc0f",k.Prompts_starjar_0="ac4cc8ae-f0ec-4f71-8e58-6c87a63b5c8a",k.Prompts_valentines="d2d7b68d-cf2c-443a-83eb-f29b2e0b8ff4",k.Pumpkin_coop_story_0="a14d0f45-f279-428d-93c0-f05066556ba8",k.Pumpkin_coop_story_1="b73a40d0-4158-452d-89d4-a9defa27e16a",k.Pumpkin_coop_story_2="5fc4189f-f407-4b67-9ebe-21f00299f27d",k.Pumpkin_coop_story_3="56b84f54-4784-4bd2-bbea-0ed382fc1f24",k.Pumpkin_icon="0b64fbc3-998a-403c-8f2f-9e2d4af52186",k.Pumpkinfest_boss_2023_wizard_watch="1f60bc3a-1c83-41fb-aec1-956347ba1dfb",k.Pumpkinfest_loading_screen="2eba08ba-f9d0-4fea-a9c3-dd29eb2fabe3",k.Pumpkinfest_modal="5ca70fc8-314a-42d8-8bb4-48475bba3883",k.Pumpkinfest_npc_1="09f61562-c720-4062-ba0d-881f5c3883ee",k.Pumpkinfest_npc_2="b0802ba8-4434-48bf-859c-455909cc0b50",k.Pumpkinfest_npc_3="9ed8df8d-5e24-44ef-aa16-3e6f1ea4a2ce",k.Pumpkinfest_splash="2747718f-7086-4ff1-853c-4d85460d84ee",k.Pumpkinfest_statue_boss="cb6bd48f-eb5a-4576-be87-73845ecc76a7",k.Pumpkinfest_wizard_watch="ed93d10a-5639-486b-beb0-4ed34b436a4a",k.Pumpkinfest_ww_rewards2022="2d10017c-9d6c-4c9a-9922-acadd0b5b518",k.Puppet_master_portrait="1c1c883f-86bf-4cd2-86d8-1df2a9d8baed",k.Puppet_master_returns_splash="bda343af-0bd9-4ac2-b8a5-13d14a57536c",k.Puppet_master_splash_modal="01e67204-26eb-42cb-bf5f-8b8039c02223",k.Pvp_seasons_prize_sign="137c9e4a-bd64-4f5b-82be-e0fda675cd41",k.Quests_ArtistsAlley_MayJune="7f5582f8-3849-4081-af1b-2b1807db77e7",k.Quests_FF_December_2024="719e3f20-b02a-4ab3-9e63-1cbe14ca4670",k.Quests_HotCold_AugSept_2024="45375410-e3a6-4b2a-92dc-94f2860256bd",k.Quests_JBBQ_June_2025="5a86096d-fe11-4979-9a06-e8a6def1a65f",k.Quests_Magicoin_October_2024="00f350e8-79b4-4ace-9eda-dd4558130120",k.Quests_MoonlightDance_April_2025="f18b785c-5eda-4680-b556-54405ccf80c6",k.Quests_Pirates_March_2024="17003ff9-19da-4dbb-a717-766d0ccc4eee",k.Quests_SG_February_2025="ac308138-630c-4d31-8c4d-d1d0e5a9b747",k.Quests_SS_October_2025="ad5ff85c-61b8-4ad9-910e-5a59d9ebb1c1",k.Quests_starry_aug_2025="5fdacd87-05e9-42ec-8aca-43b4ba7098eb",k.Replay_unlock_gerald="35a6c6df-2007-44ac-8161-fbf58f71fafb",k.Replaycampaign_loading_screen="e9dd52e4-26c7-4819-8f82-598f230d5a35",k.Restriction_Card_BG_Green="cd571770-dfd1-487d-8444-666850b052b0",k.Restriction_Card_BG_Red="30b9db45-8ea2-48e3-9060-215e534978fe",k.Restriction_banner_BG_academy="ee8a76bb-8edc-46fa-a5a5-e423545602b4",k.Restriction_banner_BG_bonfire="76cc922b-0ff0-436f-ade5-5db13bfa61ed",k.Restriction_banner_BG_firefly="39559ecc-021c-4fd6-baed-0c97ad8c67b2",k.Restriction_banner_BG_puppetmaster="70d7fb05-7b65-452f-828c-f6f24847e1de",k.Restriction_banner_BG_shipwreck="bfec1718-b37b-4c8c-9812-8d99469f9c35",k.Restriction_banner_BG_shiverchill="b0192a39-6675-42e8-b9eb-79f64c44ee2e",k.Restriction_banner_BG_skywatch="cee1b226-0bc3-4e12-9e5c-43d155c4142c",k.Restriction_banner_cebollini="4d9fa613-ccec-46a6-bacb-92660b69c397",k.Restriction_banner_cloaked="a18c7b77-1d0c-4b19-8413-b8718a2a5a2a",k.Restriction_banner_cloakedfire="a2226624-5220-42c7-b1bf-557441744a3b",k.Restriction_banner_cloakedice="51d4f58c-057b-415d-b9c5-9a3fde6a3754",k.Restriction_banner_cloakedplant="1f6e40d3-42be-4c14-b7ff-9381007b0890",k.Restriction_banner_cloakedshadow="1acbba7e-43c0-4ffd-b27b-5e70e3d1fc9f",k.Restriction_banner_cloakedstorm="2632fe2f-b439-45cb-b6d7-693f5f423d30",k.Restriction_banner_cloakedwater="578b8815-fc2b-4c03-b2bf-66c3b5dbb4da",k.Restriction_banner_gerald="d949cf78-987b-494d-b9a0-4e97c588641e",k.Restriction_banner_hardmode="3311cf49-d68a-4c02-99ab-e68ff3997854",k.Restriction_banner_icewyrm="d8446233-78f7-499b-b711-c12f85765fa1",k.Restriction_banner_nastycloud="e0fb6bea-753b-4642-9ade-34f7bf1962f5",k.Restriction_banner_oldone="68396481-b137-440e-b987-20810c24805e",k.Restriction_banner_pippet_endgame="040482a9-ed2b-41da-a3a8-e4ec428227c8",k.Restriction_banner_puppetmaster="a2ccd2a6-f484-4924-a2ec-bf8209b0893c",k.Restriction_banner_puppetmaster_endgame="957eea92-99a6-42c7-9cd4-15c637fc5567",k.Restriction_banner_puppetmaster_illusion_endgame="cb82579b-6f70-4dc5-8af8-b168171e82af",k.Restriction_banner_title_cebollini="8a50dc3c-5507-4345-b0ac-7364d5ee5af7",k.Restriction_banner_title_cloakedwizard="b1c1b8ca-4b4b-487f-844f-691d5d0f6e30",k.Restriction_banner_title_gerald="6457e30a-28c9-402d-9145-e6bf87b5534c",k.Restriction_banner_title_harmode="b58202ba-d988-48be-8954-9af2f7d7cbf4",k.Restriction_banner_title_icewyrm="dbfc58de-2985-4ccf-9281-75a4dbdae43a",k.Restriction_banner_title_nastycloud="af08a882-71a5-4de4-8ed6-2d07b9b126a1",k.Restriction_banner_title_oldone="cfee59f7-dceb-430b-8175-1e7594357640",k.Restriction_banner_title_pippet="ebc4f820-7eec-43bb-81e5-335fcb94ebc9",k.Restriction_banner_title_puppetmaster="f2020e7e-99e7-40f3-96aa-369676aadcb6",k.Restriction_banner_wave_bonfire="cd7890d5-7cd8-4993-a881-09ea8f765afa",k.Restriction_banner_wave_firefly="27df4960-c576-4db8-841e-227d6baa01e5",k.Restriction_banner_wave_hardmode="cadaed92-ef51-427d-812a-32f050696b36",k.Restriction_banner_wave_puppetmaster="86f08038-cd8a-46e8-9336-cab629383ad2",k.Restriction_banner_wave_shipwreck="4eaeef0b-f54b-401e-a4e7-98839cabd40f",k.Restriction_banner_wave_shiverchill="59bde7f6-f279-4689-a081-36be8c7205da",k.Restriction_banner_wave_skywatch="9cada148-898b-4d05-a16b-cf178c4d3881",k.Restriction_free_merge="355e5432-87ef-4208-8cda-f063b6675656",k.Restriction_free_rescue="c254cdcc-540e-498a-ace4-1ffc0ce9632b",k.Restrictions_extreme_background="8662e647-0b64-41f0-a647-7fd0edf1fefc",k.Restrictions_extreme_rewards="2b8297d8-e469-48d5-b1eb-64b2e8a9c047",k.Restrictions_hard_background="a6930f38-193a-4ad8-85e4-3731a0776bc3",k.Restrictions_hard_rewards="98e858b1-c69b-4087-bccd-c93bbf8a3f08",k.Revamp_star_frame="b9f3d4d2-e858-49ed-8e34-2946f8ea7ff5",k.Revamp_wooden_frame_store="2a1a001d-be02-4e2c-b302-76ebbbad3e50",k.RiftRunKey_1="d356ddb2-7802-4be8-9d38-a6f83f62621b",k.RiftRunKey_2="765f1557-dc57-47e3-b53a-360d3383fb69",k.RiftRunKey_3="fa2ac725-959d-427a-b50f-ef5e43f8b9c8",k.Rift_base_active="24d11b9b-954e-4730-b19d-0ed869d6385d",k.Rift_base_active_dragon_large="bb48466b-2312-479d-8a50-42d6c1910fca",k.Rift_base_active_miniboss="a98920db-59fe-4585-a882-753d734ca881",k.Rift_base_active_miniboss_large="bb636f9f-6357-4a48-8076-0596a84bb441",k.Rift_base_done="843e39e5-8793-4aff-8bdb-de50d04302d8",k.Rift_base_done_large="e0224bb5-d043-4bbc-bb70-76fe4c1dfd31",k.Rift_base_locked="c2bdd83a-ce9b-40bb-a5a2-67f06c19993b",k.Rift_base_locked_large="8d51988b-bdc3-45b8-8198-d0279cad28cd",k.Rift_base_prize="771150a0-80cd-417d-b879-a64b6e76903f",k.Rift_cycles_fr_1="1ba81c1b-6cad-4e07-97f5-2c2b3e6c97a4",k.Rift_cycles_fr_2="0c7529b8-2c95-4e90-adb4-2accfff2fbde",k.Rift_cycles_fr_3="cc55c76e-2d0a-4055-921b-441526238f84",k.Rift_golden_cycles_fr_1="37a77ac6-2afa-4ac9-8aa4-6e24e24a65ca",k.Rift_isle_base_large="0c9fd0f1-c48b-4b75-a569-bbe4d53493f6",k.Rift_isle_base_medium="54c616ea-1bb5-4b6f-b502-8fe443459d59",k.Rift_isle_base_small="5942823c-6a8c-4886-a096-c8e9e300d803",k.Rift_isle_top_large="abef3841-3b3c-405c-ac34-50fa0c6583b8",k.Rift_isle_top_medium="432cd616-0e54-4bf8-8a05-423d03499a2a",k.Rift_isle_top_small="3372bbb5-6beb-49de-a8c4-1095ca8ff902",k.Rifts_currency_astral="8b1bf7b7-2602-49b1-9935-ed2d86275530",k.Rifts_currency_astral_store="bf6143bf-5203-486e-aef2-4c60b50d7289",k.Rifts_currency_default="f5440d65-689b-4102-b532-105e5f5814f7",k.Rifts_currency_default_store="7d7892a7-1fa3-48ab-93f1-83094331a2cf",k.Rifts_currency_fire="a723b6ee-ac02-4f60-8453-a35a96735d4d",k.Rifts_currency_fire_store="d52bd2ac-b414-4d03-8894-9f51bd1ae087",k.Rifts_currency_gold="75ae6dd2-755d-4fd3-8d01-3bf8f1d42b4d",k.Rifts_currency_gold_store="168022d6-85ac-4831-9178-0e0f37569c88",k.Rifts_currency_ice="de1d1d90-1822-42c4-b4b2-2ff2567c7374",k.Rifts_currency_ice_store="0db027e7-3220-4fe6-8934-92f0e9ef3e9f",k.Rifts_currency_physical="3e40c032-3d78-40d6-91e5-8ce700420a80",k.Rifts_currency_physical_store="c4868c4e-3c60-41e2-b084-211a61a50770",k.Rifts_currency_plant="d148a810-b062-4f43-a084-37e0f825f0d9",k.Rifts_currency_plant_store="a705abc2-4d0d-41d4-9009-1e5d7e195cc1",k.Rifts_currency_shadow="8969e2f7-d310-4d7d-897e-f5e5c787b474",k.Rifts_currency_shadow_store="71cef4e0-012b-4322-953d-91080d340dc4",k.Rifts_currency_storm="167a71d6-e8e2-4d38-86dd-c52c278e7b40",k.Rifts_currency_storm_store="d72ca282-6d18-473c-bef9-68dfcdb9e432",k.Rifts_currency_water="e9ab45e1-5ff4-433d-9c48-9e092fb12519",k.Rifts_currency_water_store="3dc963b7-7531-4b20-b951-f8e0415c1c5d",k.Ruby_large_active="cc8ce92d-74c1-4675-94c2-dfd20584fb4e",k.Ruby_large_default="8127f8a0-201a-4b2b-8aa7-344aaee79996",k.Ruby_large_hover="0db96a33-3dd2-430a-a0bb-948b00ebfc7b",k.Sand_shortcut="5e51ca47-9e7a-4a52-a9b7-c208a70e410f",k.Sapphire_large_active="84357009-fb16-4001-ade7-0e956a7081fd",k.Sapphire_large_default="a398b0e0-4e41-412a-89c8-b1c2f376d1bf",k.Sapphire_large_hover="39648aa3-ee1f-4223-8b58-dd9918434e53",k.Scene_intro_bg1="06a4af0a-8dd7-4aa1-8780-daf7f7493be5",k.Scene_intro_bg2="a696e107-30b5-4d21-98cc-0583c6f28991",k.Scene_intro_bg3="3d8fbe36-511e-447e-995b-a71593d88d36",k.Scrollbar_thumb="b1e8b0a2-3df8-474f-a6e0-df70bfe58e53",k.Scrollbar_track="37d989bf-ccf4-46ad-bdfd-f5f3e226267c",k.September_2024_teacher_gift="35f67264-a0a3-470d-94f2-e5f454afe3d6",k.September_2025_teacher_gift="0928749f-59d6-43f5-92f2-9b4efb326bde",k.Shards_promo="1dca823c-f657-4ce5-988c-b456506d9bef",k.Sheets_dorm_17="91f2a7fa-6c42-4dae-ace1-8c9e8b144370",k.Shipwreck_1="488d78c7-7b2e-49b2-b4c7-ea0afb16749f",k.Shipwreck_2="9210c638-aec9-4890-bff1-bbe61168f3c2",k.Shipwreck_3="9e8a8ea0-5815-4b96-a909-3a2074b71350",k.Shipwreck_intro_v2_1="22da049e-0da7-4bf4-97d6-1ad4c5208087",k.Shipwreck_intro_v2_2="d37433f9-6fb0-48ea-a209-936c31bd55bf",k.Shipwreck_intro_v2_3="93a14828-ad61-46ec-9a28-26367ff9c205",k.Shiverchill_intro_1="5faec87b-7bbd-43bd-a373-b360cd097785",k.Shiverchill_intro_2="ae423479-e853-4f16-9c60-8c7aff258de9",k.Shiverchill_intro_3="89245504-555f-4c55-9c78-06d582f84b2b",k.Shiverchill_intro_v2_1="c328d909-cf1a-483b-bc44-ee084089ce3b",k.Shiverchill_intro_v2_2="32c7e585-4311-4ba7-882d-f0bfbbf02bb3",k.Shiverchill_intro_v2_3="9aac98a2-7754-4910-b9b4-010bbf395141",k.Shooting_star_blue="c0f7027b-1940-4231-a048-019c3ba044ef",k.Shooting_star_yellow="ccd30491-defd-4f5e-983b-429d2648b367",k.Showcase_box_sliced="4a97a9c1-2c19-4ddb-b247-3afcf1b2eee5",k.Skywatch_intro_1="f3bc2be9-26c1-4ce1-9159-b0d6e2f376b0",k.Skywatch_intro_2="c27e7094-9ad8-4007-8746-9ab52170cf6b",k.Skywatch_intro_3="44a8ba6f-a25f-475c-881f-8da9a4299e82",k.Skywatch_intro_v2_1="2d7b9acc-93e2-4d39-a933-b7e63d5adfde",k.Skywatch_intro_v2_2="5a37f448-7337-4261-bcc2-0360b765f6f9",k.Skywatch_intro_v2_3="0c773c9d-99fd-4fff-8c48-110fe158f896",k.Sleeping_floatlings_pop_up="a961cb24-d71b-4205-9435-f44adafcee01",k.Slice_big_notification="c3578718-0a82-48d3-845b-9b867d01fb6f",k.Slice_hud_bar_backing="ca727288-6294-47ac-ac21-d7425fa7191b",k.Slice_hud_bar_fill="0d336ef0-05d2-442b-9494-efe154771428",k.Slice_hud_label="b55739a0-de09-48e7-8252-f974d813659f",k.Slice_hud_label_hotbar="a68d0849-69d1-4663-8a28-59f48fea1142",k.Slice_input_big="b65d16b6-0cc4-421e-bd10-48385cdedf24",k.Slice_input_big_hud="e6c41608-7853-4baa-b844-d9452076072e",k.Slice_input_small="6514a0df-f16e-46cc-894f-6e234a74b15d",k.Slice_rifts_bg="d2a62bec-9590-46a2-9349-c5e7f3437a1c",k.Slice_rifts_bg_highlight="74d76c99-e9e0-408a-87e9-a204550e1d7c",k.Small_pet_124="928d7267-09b6-4efb-aaa9-96b99a441788",k.Small_pet_65="18493c98-6d7d-4690-a5ab-b8544c2780d9",k.Small_pet_68="c36c8132-f0a5-47a7-bf5e-1baf4d986f67",k.Small_pet_71="f53924a2-6d63-46e0-b1b1-1b22a62b7b35",k.Small_pet_74="5ddc18c7-b747-4ceb-8e50-ce85729646d7",k.Smart_block="17ce5182-90be-41f1-8f04-7476f9e83cc3",k.Snowball_pile="914e3890-92a0-45f1-9918-713d7cb317fa",k.Snowflake_1="d9a53df9-5a2f-4546-9268-8230b9c56200",k.Sparkle="c108638e-c0db-414f-859f-bc33c6a4dbca",k.Sparkles_set_hud_membership="345a7dfc-8739-485c-897f-5dd5c8a41154",k.Spell_3_0_wizard_watch="da87732a-ed78-46a6-a0db-ee1007e2cb6e",k.Spell_astral_starbitblast_aoe="981c22df-b12d-45fd-a344-4114cba18b77",k.Spell_astral_starbitblast_aoe_cooldown="8245fc9d-a7c4-40ca-b96d-32950f67d423",k.Spell_astral_starbitblast_giant="6d2505f0-c2d2-4f83-a620-cfca49e5ad93",k.Spell_astral_starbitblast_giant_cooldown="707dc677-38bd-4410-aeef-1fc5b0bfeea1",k.Spell_astral_starbitblast_multi="7df980be-4601-41a7-b961-2daa0636265e",k.Spell_astral_starbitblast_multi_cooldown="820f37e9-fb24-46ba-b6b6-8f3d5776f888",k.Spell_astral_starbitblast_multi_random="223daa84-819b-4052-9974-11ab81678bcc",k.Spell_astral_starbitblast_multi_random_cooldown="78caa901-cdde-448f-b25d-3451914b2c31",k.Spell_astral_starbitblast_multiaoe="43ef43c9-c397-40c3-b1ed-a0a800b0b377",k.Spell_astral_starbitblast_multiaoe_cooldown="60be6888-62d1-435a-8264-39b2a00028dd",k.Spell_astral_starbitblast_random="0e7a543a-8f90-4468-9855-cdd724c8e3ba",k.Spell_astral_starbitblast_random_cooldown="49b90ed2-e9ce-42e0-8c7b-4c319cb201c9",k.Spell_astral_starbitblast_single="4eb536e7-1d76-4e7b-89cb-fbab9982e26d",k.Spell_astral_starbitblast_single_cooldown="9100be81-4435-4033-86b1-34a9cfdbfd55",k.Spell_fire_fireball_aoe="ecfc01f9-8ae4-4d4c-95bc-988e9b413187",k.Spell_fire_fireball_aoe_cooldown="7e52eba4-ade3-48b5-93f2-dc50d836c4f9",k.Spell_fire_fireball_giant="2ac08f56-cbd6-427b-88db-f260a4b5eabb",k.Spell_fire_fireball_giant_cooldown="1b451077-4e38-4b20-949e-8716abdfd8a9",k.Spell_fire_fireball_multi="6f116fa7-e9a4-46e5-84b8-91d5ac6c82f5",k.Spell_fire_fireball_multi_cooldown="95ee1862-933b-4705-8b48-13f28cf2afaf",k.Spell_fire_fireball_multi_random="503e2144-b0e6-4b44-bd66-fa24edbdb5fe",k.Spell_fire_fireball_multi_random_cooldown="07b8b893-1f3e-4901-ab95-f973c9fb95f6",k.Spell_fire_fireball_multiaoe="f7bdaaaa-b529-471e-9680-5071dfcf69e8",k.Spell_fire_fireball_multiaoe_cooldown="9c058587-7121-4593-866c-83d44dca6cab",k.Spell_fire_fireball_random="779558ce-d4d4-46a2-bb99-e32ab7647ada",k.Spell_fire_fireball_random_cooldown="071d4ec8-853a-4290-acb0-3f8e3111565a",k.Spell_fire_fireball_single="dba93de1-f0b1-412a-9ed2-e41433721b14",k.Spell_fire_fireball_single_cooldown="eebb87c0-dca6-41ad-a789-4b80760d86f0",k.Spell_fire_volcannon_aoe="b82b8567-2463-426d-97f4-6865363250df",k.Spell_fire_volcannon_aoe_cooldown="88644385-8a8d-461d-b660-2ab327aae95c",k.Spell_fire_volcannon_random="9f6635ba-2923-4702-bdbb-b676c5096018",k.Spell_fire_volcannon_random_cooldown="aebdcdd2-9913-43cf-896f-983965f1b157",k.Spell_fire_volcannon_single="8117fe9b-3c3d-484c-8b4e-ea5b1e74d44d",k.Spell_fire_volcannon_single_cooldown="7666e913-0bcd-4363-b77d-b28a9cdd7624",k.Spell_ice_chillout_aoe="ee696e58-492b-4c0c-8404-2a48f9c4a707",k.Spell_ice_chillout_aoe_cooldown="79857cd6-0fa3-4a23-947f-4d58b35b9d7d",k.Spell_ice_chillout_random="b8cb8d4a-1b6a-4df4-a999-3a78765a43a3",k.Spell_ice_chillout_random_cooldown="229b8e1d-6ddd-4535-8f49-c404692bb144",k.Spell_ice_chillout_single="5fce9f8f-3bd1-45a5-8712-0ea42781d7c0",k.Spell_ice_chillout_single_cooldown="e6e8e769-865a-4710-9e3d-065cb2de7ca5",k.Spell_ice_icicleshard_aoe="cf3699bd-d9f5-4fef-b8d2-f39bfd189e5d",k.Spell_ice_icicleshard_aoe_cooldown="8c9e9fef-8817-4353-9ec8-7f09331a63cd",k.Spell_ice_icicleshard_giant="35a5f236-23d7-45af-9311-03511b652049",k.Spell_ice_icicleshard_giant_cooldown="c6777865-efca-41c3-a9fe-0a582f263c27",k.Spell_ice_icicleshard_multi="c02ca92c-9539-44d8-ba32-959d33718cd4",k.Spell_ice_icicleshard_multi_cooldown="35a9215f-fade-433a-a6d2-a65bf40dc156",k.Spell_ice_icicleshard_multi_random="9c5c06d2-decb-4454-8388-f478c904adf8",k.Spell_ice_icicleshard_multi_random_cooldown="4e37fdf7-3ae8-40aa-ac55-c4ec74a881a8",k.Spell_ice_icicleshard_multiaoe="c55fa393-6e00-4d55-ba76-c95897dff077",k.Spell_ice_icicleshard_multiaoe_cooldown="9c8cf0c6-79bc-455a-ad38-bc7c385c8f95",k.Spell_ice_icicleshard_random="89c3fbd0-ef9c-4b23-959d-5974f6186b9b",k.Spell_ice_icicleshard_random_cooldown="00fca5a9-3e51-4862-a08b-1bd7aee82392",k.Spell_ice_icicleshard_single="86a0c3e6-5a88-4dae-af37-2267f6f28367",k.Spell_ice_icicleshard_single_cooldown="1aafdaf6-8ccc-4837-b48c-05ad0f25812a",k.Spell_ice_snowlingball_aoe="7779e3ea-d12a-4119-be0b-7eb5a002d6ba",k.Spell_ice_snowlingball_aoe_cooldown="119fc80e-3046-4421-b435-7a502febfbb9",k.Spell_ice_snowlingball_giant="3f15be4f-00c8-4f24-87b2-d15084842bf3",k.Spell_ice_snowlingball_giant_cooldown="f04dbe03-1d45-4d00-9017-7853194bc358",k.Spell_ice_snowlingball_multi="569a6b59-eb30-4199-aa9f-531fdd8b6698",k.Spell_ice_snowlingball_multi_cooldown="780254ee-ef6d-4820-807c-727865440b93",k.Spell_ice_snowlingball_multi_random="8cb1ab37-63a3-4a78-8187-f4f7d2c2f5ee",k.Spell_ice_snowlingball_multi_random_cooldown="ddccfd93-655c-4a81-95df-f889e03497ff",k.Spell_ice_snowlingball_multiaoe="52d1b8fc-04de-4038-b477-1045944c5372",k.Spell_ice_snowlingball_multiaoe_cooldown="6e5950cc-92d7-43f6-b5bb-7fe5d0c3c30d",k.Spell_ice_snowlingball_random="2859ad3e-e607-4cb8-af07-411b27087398",k.Spell_ice_snowlingball_random_cooldown="b58e189e-0a30-40a4-8baa-88543e10651c",k.Spell_ice_snowlingball_single="28f75698-ed30-4121-9b77-84cf31ff2ff0",k.Spell_ice_snowlingball_single_cooldown="02950102-7a4a-498e-b9a9-fb582873fcf9",k.Spell_neutral_aoa_aoe="375abf63-0f3f-43a6-b636-9b467e182cdd",k.Spell_neutral_aoa_aoe_cooldown="e824ebfa-6690-4511-a838-04c84700016b",k.Spell_neutral_heal_aoe="3cb09195-f903-4c39-b208-5171ae0b634f",k.Spell_neutral_heal_aoe_cooldown="35f87455-c4c2-4123-8d2d-eed8a8fd758e",k.Spell_neutral_heal_self="705dd5f8-5e05-4d3e-9fe0-425620ab6e92",k.Spell_neutral_heal_self_cooldown="a4efcfb8-5a4a-4e84-9144-a00a65f957d8",k.Spell_neutral_heal_single="31cbc0d9-6a5f-41dc-894d-3391a894f153",k.Spell_neutral_heal_single_cooldown="ea805326-39a2-4272-967a-25efb7142baa",k.Spell_neutral_heal_single_random="0db31ffe-7ed2-4900-b8e4-ad1d00650fe1",k.Spell_neutral_heal_single_random_cooldown="3915e1da-8cde-46e5-8432-94293ec7377e",k.Spell_physical_blunt_aoe="5aa3c789-4c3c-4eb9-840e-fa6e4b9795a1",k.Spell_physical_blunt_aoe_cooldown="194d94c5-ee26-466a-ad0a-a471c608c51c",k.Spell_physical_blunt_giant="83dae56c-b690-47b4-8ab6-37fe27a34b33",k.Spell_physical_blunt_giant_cooldown="987c26f7-243c-461a-9453-e48164ac7484",k.Spell_physical_blunt_multi="853421aa-0c22-4005-bb4a-68f8c6bbdf1e",k.Spell_physical_blunt_multi_cooldown="b84caa43-c384-4ed7-81f7-61b876d96adf",k.Spell_physical_blunt_multi_random="63fdd768-56a6-49ef-9c45-bc333e2bc2d1",k.Spell_physical_blunt_multi_random_cooldown="a0170a57-e502-4a64-819d-4ca30a4e302a",k.Spell_physical_blunt_multiaoe="e6758316-ac61-4f87-8071-0302fe65df95",k.Spell_physical_blunt_multiaoe_cooldown="8a298751-8b30-41bb-af50-181b86ff47d1",k.Spell_physical_blunt_random="a734d19e-3512-4110-84f6-0f81caa1a3a4",k.Spell_physical_blunt_random_cooldown="da283e74-8720-43c4-923e-7494607b76c9",k.Spell_physical_blunt_single="e968859b-7552-4d9a-aef5-9da452c89477",k.Spell_physical_blunt_single_cooldown="49b0e079-d698-4779-bd10-c9d3aa8ba689",k.Spell_physical_pierce_aoe="edfe447e-31c4-4b12-b408-0bdd31df34c2",k.Spell_physical_pierce_aoe_cooldown="4a41e755-16ca-4227-8e82-4fd3721dcf39",k.Spell_physical_pierce_giant="b07f2e0b-b1cb-4d50-8d03-87d65da9c0b2",k.Spell_physical_pierce_giant_cooldown="cf5de1d4-772e-4112-a78a-371f9f4f115b",k.Spell_physical_pierce_multi="3a999e5e-e1f8-48c0-9ad4-961d9c4b28de",k.Spell_physical_pierce_multi_cooldown="98490791-fd79-415f-980c-33625a582319",k.Spell_physical_pierce_multi_random="9ac290b1-69cf-431a-a394-e87698191826",k.Spell_physical_pierce_multi_random_cooldown="c5854a17-6127-4217-87ab-9487abaf6066",k.Spell_physical_pierce_multiaoe="95576fd8-e1be-4854-8691-93bbf3f5d618",k.Spell_physical_pierce_multiaoe_cooldown="9515e430-a090-4eed-bb8c-8f6ad26d24ae",k.Spell_physical_pierce_random="d09c5ff2-0929-4d45-948e-311b8927ee14",k.Spell_physical_pierce_random_cooldown="9d2dc89f-b88e-4ba6-b031-1240eeb793f4",k.Spell_physical_pierce_single="3e0db036-8ef5-497e-b599-39f5820cc3eb",k.Spell_physical_pierce_single_cooldown="e540864f-b88e-4109-b5a5-caf909892c6b",k.Spell_physical_slash_aoe="f26699c1-fb58-4ab0-9e22-98f7d724e08a",k.Spell_physical_slash_aoe_cooldown="23249f46-506b-4796-bdea-37497556328e",k.Spell_physical_slash_giant="8ef7afd7-c00d-4c74-87d6-caa327b30f2a",k.Spell_physical_slash_giant_cooldown="67e66d6e-1a83-4834-96e1-6eedff384b5e",k.Spell_physical_slash_multi="caeeb971-182f-4b53-916d-e42bd7ce7cb3",k.Spell_physical_slash_multi_cooldown="d91e544c-020a-4ac9-a4da-491cf8a38811",k.Spell_physical_slash_multi_random="e7958847-36cd-4d8b-a5c5-e98ac9b1c9b6",k.Spell_physical_slash_multi_random_cooldown="2c5c455f-c929-4400-863a-1428a12a263b",k.Spell_physical_slash_multiaoe="182417ee-ba54-4e3a-ac0f-c28c4e869930",k.Spell_physical_slash_multiaoe_cooldown="519d924b-db7e-4bc5-a93e-c8e0937b0a86",k.Spell_physical_slash_random="3c1c219e-9407-4e7d-b01e-ad4aaee81a03",k.Spell_physical_slash_random_cooldown="1e7c7ef3-a4b1-4c8d-8c27-9228d463f860",k.Spell_physical_slash_single="a7e83eb9-6c25-4b47-b5da-c07a1d794f88",k.Spell_physical_slash_single_cooldown="8cc67bc3-c8b6-49f3-8047-31969d86adce",k.Spell_plant_forestshurricane_aoe="28ebd156-cbe3-4d6e-be5d-eaa987052667",k.Spell_plant_forestshurricane_aoe_cooldown="3777b573-6401-4ab2-b087-ea547604c154",k.Spell_plant_forestshurricane_random="a7e99491-e989-4436-81bf-8c70f47db588",k.Spell_plant_forestshurricane_random_cooldown="7792f68e-3d9b-453b-ad5d-eeb75cf58040",k.Spell_plant_forestshurricane_single="3fa491a5-8e7f-4ac2-90b7-6855b7b5241c",k.Spell_plant_forestshurricane_single_cooldown="d1a01f47-c39c-4734-a49b-712704692f93",k.Spell_plant_leafswarm_aoe="0a84edd0-e9e5-4c23-984e-24798355b38b",k.Spell_plant_leafswarm_aoe_cooldown="cef41288-67d2-4b2c-870b-2bd8e3806cfe",k.Spell_plant_leafswarm_giant="45d3e2ee-ffcb-4799-90bc-64e385a6a085",k.Spell_plant_leafswarm_giant_cooldown="d49205d9-9e5c-43f7-8dda-04686a179a71",k.Spell_plant_leafswarm_multi="d5679207-9daa-47d7-983e-9bed43ca023d",k.Spell_plant_leafswarm_multi_cooldown="bb8063f0-4f56-4e4b-b09a-77545adeb143",k.Spell_plant_leafswarm_multi_random="c34dc780-295a-4d92-8da5-7f80d1aa6c74",k.Spell_plant_leafswarm_multi_random_cooldown="b5152a59-adf3-4b77-b68b-2b7ca5ef4c0e",k.Spell_plant_leafswarm_multiaoe="99a23d3e-dae6-4670-b523-89a4c8f921e1",k.Spell_plant_leafswarm_multiaoe_cooldown="9aa5a33c-4303-4749-b9cc-f52e9c158e20",k.Spell_plant_leafswarm_random="4db5f73b-f6e9-43e1-85ac-a301cefa6dd7",k.Spell_plant_leafswarm_random_cooldown="27a96b69-32d5-42c6-9b62-d7aab2054ba3",k.Spell_plant_leafswarm_single="beebac37-f1d3-4267-a6b0-053ef85f0285",k.Spell_plant_leafswarm_single_cooldown="7c31ef0c-9e50-4927-b448-ea7b47c64318",k.Spell_shadow_shadowshock_aoe="d8b9cc0b-728f-4bce-882e-da9fc5a7a398",k.Spell_shadow_shadowshock_aoe_cooldown="08f09a3f-1234-4844-87c0-a056d37466a3",k.Spell_shadow_shadowshock_giant="2640aff5-8ae2-41ef-ab45-787a92293a83",k.Spell_shadow_shadowshock_giant_cooldown="11b957b3-6144-42ba-a3ec-ca71335e97ed",k.Spell_shadow_shadowshock_multi="fc604b6d-33a7-4ebf-abdc-4ea8f614fb34",k.Spell_shadow_shadowshock_multi_cooldown="1ff86001-92d0-4a6c-b224-aec06e759191",k.Spell_shadow_shadowshock_multi_random="59ec806a-c2cf-41bf-ae9e-1881ab032380",k.Spell_shadow_shadowshock_multi_random_cooldown="6efd9fc8-4a6d-4987-b60f-b0f1bb77c9b4",k.Spell_shadow_shadowshock_multiaoe="bcea6d99-d01c-4363-95a8-cbc5ab407ba5",k.Spell_shadow_shadowshock_multiaoe_cooldown="8444ad29-ede4-4305-aa98-667d7bf7b38d",k.Spell_shadow_shadowshock_random="71d754ab-0bbd-42e5-8c23-f30b241d8489",k.Spell_shadow_shadowshock_random_cooldown="e41d8e3e-575c-4a11-9bd6-0c8d05c279f3",k.Spell_shadow_shadowshock_single="8f9324d7-3e6d-46a0-8ba6-a5ca2e6c7bc4",k.Spell_shadow_shadowshock_single_cooldown="b7c180d0-32a4-49c7-8abb-865da9701db3",k.Spell_storm_ioncannon_aoe="3739d7f3-ee3b-46b7-9a68-4479372c898b",k.Spell_storm_ioncannon_aoe_cooldown="23483c24-f56a-4b5a-98a5-20f46661ceac",k.Spell_storm_ioncannon_random="6b8c5277-8b40-4448-9bd1-18a05a7824ae",k.Spell_storm_ioncannon_random_cooldown="8c7df9f4-22f2-41cc-bc3c-6ffcbb085318",k.Spell_storm_ioncannon_single="7ae60d5a-7c72-48fe-a916-5dd4b574d5a6",k.Spell_storm_ioncannon_single_cooldown="62fd4638-e4a4-4296-a7d2-19fdc6216231",k.Spell_storm_sparksphere_aoe="ce7d0c71-70e4-478e-81ca-12ad935ac0c8",k.Spell_storm_sparksphere_aoe_cooldown="e322def6-acc9-495f-8dac-59b5c0dc9d2e",k.Spell_storm_sparksphere_giant="bb8e871d-042c-4780-abab-1f6c603e61da",k.Spell_storm_sparksphere_giant_cooldown="8c1551c5-8d7b-47a1-b771-709351b29d1c",k.Spell_storm_sparksphere_multi="fa00cceb-938d-4559-94b1-d97e18de5de8",k.Spell_storm_sparksphere_multi_cooldown="bd9cb342-c9df-4721-9870-7d2258351f28",k.Spell_storm_sparksphere_multi_random="5353471b-47de-4189-a11c-9aeb16969dad",k.Spell_storm_sparksphere_multi_random_cooldown="bdb75561-a2ed-47c5-8e79-0bab1fced03a",k.Spell_storm_sparksphere_multiaoe="3bdd0870-27d7-4267-b536-54acce8d3363",k.Spell_storm_sparksphere_multiaoe_cooldown="f55f996d-ec96-4780-ba7f-c0c5ec81558a",k.Spell_storm_sparksphere_random="452f3251-a7d3-4f89-b78e-370d7da41731",k.Spell_storm_sparksphere_random_cooldown="74f61c73-0650-4103-ac89-80057768165d",k.Spell_storm_sparksphere_single="b99070c5-49ac-4b27-8042-e3aeb75c6a63",k.Spell_storm_sparksphere_single_cooldown="fbc4ba18-0f4e-4537-bcc6-1cfcc0600058",k.Spell_water_aquaspear_aoe="f8ab15df-eed5-4bb5-8509-2a50a0fc1df6",k.Spell_water_aquaspear_aoe_cooldown="1cfbb430-3bb5-4b9e-a3db-aa2d3c9307e2",k.Spell_water_aquaspear_giant="c992c7ec-c6ca-4450-a200-3c4102566f60",k.Spell_water_aquaspear_giant_cooldown="f6facf62-39a8-4255-9652-a7e8badc8069",k.Spell_water_aquaspear_multi="11dabab1-3401-4d77-8bd3-7e784615e82d",k.Spell_water_aquaspear_multi_cooldown="d6abce4a-27cd-46b1-95ab-0d7f90d4cabc",k.Spell_water_aquaspear_multi_random="492c986d-8c8b-48d8-bcfa-837af5cc53f9",k.Spell_water_aquaspear_multi_random_cooldown="1f52d2d0-42be-47c8-902d-f529f8f7181a",k.Spell_water_aquaspear_multiaoe="4cc990c3-caeb-4c87-9b3a-639bf087042b",k.Spell_water_aquaspear_multiaoe_cooldown="7f00844c-eca3-48f6-bc7d-bba3bd8b3b79",k.Spell_water_aquaspear_random="2715a10a-7fa6-410d-b752-a33c0bcbdcb7",k.Spell_water_aquaspear_random_cooldown="1bc4118a-9887-4e4c-8446-8a1da5591e02",k.Spell_water_aquaspear_single="447f7ee0-991e-4d80-b259-35a58645d623",k.Spell_water_aquaspear_single_cooldown="01051ed3-84c9-488b-b343-b6b686ab7c72",k.Spell_water_downpourtal_aoe="a5f28dbe-91ab-496a-a1ee-5cc64303e12a",k.Spell_water_downpourtal_aoe_cooldown="9bfea01a-5989-4105-a9f5-ed28d651ba55",k.Spell_water_downpourtal_random="e05c9ad5-4176-43a8-9616-f8d67f6610f0",k.Spell_water_downpourtal_random_cooldown="9577bcce-fc11-45ba-89ec-87a1d9d9d79d",k.Spell_water_downpourtal_single="3bf6e39c-42f7-4a21-aaba-5ca5a6092ca7",k.Spell_water_downpourtal_single_cooldown="6b8b59f7-3a5a-454b-92e8-3ded35ada29e",k.Spell_water_waterburst_aoe="b7eab3fd-18b0-4a28-96e4-7c3e288bd66f",k.Spell_water_waterburst_aoe_cooldown="f64fa96c-ae20-4ded-926d-1f3787371de6",k.Spell_water_waterburst_giant="a73da2e8-5e06-42e1-b9cc-8a5dd0eed316",k.Spell_water_waterburst_giant_cooldown="2084feda-a24d-46ad-82a6-c58d296ce7f6",k.Spell_water_waterburst_multi="195b9a26-1084-450b-bef9-621be7df6054",k.Spell_water_waterburst_multi_cooldown="d3d2d4b4-f85d-4c21-8915-6b1c42c41c57",k.Spell_water_waterburst_multi_random="38169736-51ad-4dba-bc4f-0e7946fbff93",k.Spell_water_waterburst_multi_random_cooldown="11118a27-20a5-47cc-994f-d8cd5b2a5b36",k.Spell_water_waterburst_multiaoe="304ae25e-ec04-429a-a8ca-5a7a051ae2f6",k.Spell_water_waterburst_multiaoe_cooldown="99b2e718-2e81-4727-913e-6733afc436f7",k.Spell_water_waterburst_random="ee58f390-a8b5-4096-9347-b2fa76c2ee3a",k.Spell_water_waterburst_random_cooldown="8178be55-c216-4c45-b737-c925e44d90b7",k.Spell_water_waterburst_single="7a7e07f9-19ba-4e08-b364-ad49074fa3af",k.Spell_water_waterburst_single_cooldown="05050656-9735-4d82-bc3c-fce381eb20bd",k.Spine_chest_gold_coins="99ce8365-dab4-4a7a-ad58-2b09a897f9fd",k.Spine_chest_plus_coins="a8dcc2e9-aea8-4a1f-b6d6-293e4995d040",k.Spine_chest_ultra_coins="485753d9-8c01-48d9-a0b1-318a90867c19",k.Spot_hats="81e8c625-a514-41bb-bc5a-02f285655d98",k.Spot_samples="175dc8ce-b1ab-4e7c-bb81-2138a34e9778",k.Spotlight="3266c6a7-a2e0-4346-b9fe-efbba5463b55",k.Spotlight_floor="e19bcbaf-2004-45b3-b14e-46c91cd0fbb1",k.Springfest_1="f2ff1c31-a3d4-4d13-9bb6-e57a03cbaa2d",k.Springfest_3="3fa13df8-a37c-4cd3-bdc2-6b37b443e6e1",k.Springfest_Mask_Bunny="353de5a5-d0cd-40be-8088-975f03565c33",k.Springfest_Mask_Fox="9355c77e-a924-4518-b8bf-bfe5ed586c69",k.Springfest_background="7a2b6b25-4109-4d23-8751-a815a42571d7",k.Springfest_rewards_dorm_cycle_1="681e6b9d-485c-441d-8d7f-b754abbacea5",k.Springfest_rewards_dorm_cycle_2="4f65b8b7-f1b0-42c3-a722-5eb57568cd6b",k.Springfest_rewards_follow_cycle_1="5a699d14-42b1-4240-8822-2b74acb338eb",k.Springfest_rewards_follow_cycle_2="e7a76ff2-a32f-4720-b9d4-569c91381368",k.Springfest_rewards_item="2cb8690c-cb33-4d43-bb64-edcd760127c4",k.Springfest_rewards_pet_cycle_1="07235641-fddd-4c59-9cf6-22f7fe7a914a",k.Springfest_rewards_pet_cycle_2="60ff374e-8f29-4d8b-b0bb-add8176a4fde",k.Springfest_wizard_watch="744564f1-d791-401f-9fbb-c8908a17cf0a",k.Star_fivepoint_bright="cbb7b804-fc6e-4f13-9389-8ac32046a87c",k.Star_fivepoint_bright_1="d1bc8575-14f8-4d68-acfc-c97b5c67ac4e",k.Star_fivepoint_bright_blue="973bd603-7ec1-4573-a244-41d83d63aeee",k.Star_fivepoint_bright_purple="58273f60-c5e5-4f4c-b39a-71662643ca97",k.Starlight_splash="97940f51-b803-4ad6-a62e-9ba94cba45b3",k.Starlight_statue_boss="e64bb95a-63d7-4ea5-a9ff-5dbf72deb73a",k.Starlight_statue_boss_eye_glow="5ccaf71f-fbc8-4463-9f9f-3f4c3044261c",k.Starlight_story_daily_battles="60f55ef9-a565-4081-88f9-ee612eb8fe39",k.Starlight_story_finale_1="ad66083e-f475-421c-a3d4-451c3c6f8313",k.Starlight_story_finale_2="77257aa0-e5b5-4164-aa31-33c30486b248",k.Starlight_story_finale_3="b6e0f472-3032-4e35-9b12-d3450b8c67b2",k.Starlight_story_shop="7bcf633a-c2ba-4df4-abb6-319b0a8dc096",k.Starlight_story_stylist="d87f5728-a431-465d-b6fd-d2cd0622a9e5",k.Starlight_story_wheel="5f8c8bac-69b9-4107-86b6-841fecba2860",k.State_challenge_mailer_small="b8cd1c13-a027-4786-a4fc-eb133d0b5d75",k.State_challenge_podium="d3faafe7-39e4-4417-9fa3-d8894d041d8e",k.Statechallenge_loading_screen="fb2fe979-3151-4eb1-a96c-cd052bffab44",k.Static_member_ad_base_memberchest="f4600114-00be-4b52-b38c-b5e6ec5788f8",k.Static_member_ad_buy_member_items="29a72b6b-a8e1-46c2-b4bc-3752a1ab1fef",k.Static_member_ad_evolve_pets="8baae029-c647-4c97-b33e-94bb09de5392",k.Static_member_ad_level_up_faster="aa110d0f-eaa1-447f-9fa3-56299435ff82",k.Static_member_ad_monthly_membership_boxes="829d2a93-2114-455f-8e5c-ee52215f9df3",k.Static_member_ad_so_much_more="233daa6f-4167-475a-99b6-2d36b4bc63ad",k.Statue_boss_winterfest="190c6eda-0a54-4f53-8ae6-deb40ce8acab",k.Stone_large_disabled="6d5b86f3-7e04-43e3-ba99-9ec8e19178b9",k.Story_book_map="5c8fb725-f8e6-4896-820c-e42fd9f7f530",k.Subtitle_banner_blue="cb996d5e-4169-473a-9810-fc7e6ea1140a",k.Subtitle_banner_brown="1b25a1a9-47a6-48d4-a683-2f01cecd7dd5",k.Subtitle_banner_cyan="98cf8496-528f-46d5-ac0d-a3ad5cf7710f",k.Subtitle_banner_green="b8157fd2-7e56-43a3-8a28-a4cdc0164571",k.Subtitle_banner_grey="f23c8918-427b-4743-8506-9a6103878398",k.Subtitle_banner_lavander="52a79a62-492a-471e-b172-704ea166ba54",k.Subtitle_banner_pink="d216c69a-299e-438e-8554-fdbae5812323",k.Subtitle_banner_salmon="c48f802c-0ee0-41ab-9389-f44132057611",k.Summerfest2025_wizard_watch="524b495d-8bfa-470f-a249-788e919b8ab5",k.Summerfest_background="aad6a38c-07ce-402e-b5ae-a0ea26ea98d5",k.Summerfest_icon_dorm_cycle_2="5a8dca90-8ec0-45ec-a4ab-00f52df9639d",k.Summerfest_icon_follow_cycle_2="32b5f24d-2393-415f-b2cc-bc684aa6dd96",k.Summerfest_icon_pet_cycle_2="2c358622-62ca-4dac-9a5b-c70c5afa86b3",k.Summerfest_loading_screen="35b1f0e8-2821-4ac0-b7d9-eb1503ed3013",k.Summerfest_rewards_dorm_cycle_1="97a30e3e-616a-4332-9ff2-cf31db5cd1a8",k.Summerfest_rewards_follow_cycle_1="f243003e-8517-4c71-9bf7-dabf67c392d4",k.Summerfest_rewards_item="f7d9336c-3b97-4c11-ba80-94fb99ce0503",k.Summerfest_rewards_pet_cycle_1="2b98d136-97bc-46cf-b225-9d2e12705ac4",k.Summerfest_teaser="53263a15-1f96-417f-ba9a-73e8732da1cf",k.Summerfest_wizard_watch="1204293f-59e6-406c-9299-ec95f8cb4d19",k.SunWheelBig="ab39ce98-2154-4c09-b7ca-ed41ab4676ef",k.SunWheelFrame="03d55f5d-ae00-43bc-b97b-b96f1685ffa8",k.SunWheelPointer="05f4076e-2220-4e52-a6e3-602328ba62df",k.TT_Intro_Modal_Wire_May="2d12a52b-314a-4a0c-84ac-715eaa4dbefc",k.Teacher_gift_blaze="ea1308b2-6d7c-476d-bd59-285bc54b58d8",k.Teacher_gift_monster_plant="d247fe51-001d-4ba1-808d-4cdc76fb6ff4",k.Teacher_gift_singenewt="66862439-5164-4504-9ce2-908e712039f2",k.Teacher_gift_slimy="6dd1b1dd-6d61-41ca-b93b-8d56720f6320",k.Tier_lock="c96d7417-54f5-45ce-a145-8fa5381202b2",k.Tileset_water_new_underwater="4651bce9-97f3-4bc5-8568-9d5cd4a4cc74",k.Timer="35d9716e-1d0a-462f-a717-5092e9c90125",k.Tintable_backing_divider_sparkles="25ebc5bd-c56d-439d-a176-f4145ff91248",k.Tintable_blur_10px="877588a3-4ada-4eec-a0d6-fbe1e44c10f4",k.Tintable_rectangle_10px_corner="4431239c-5b0c-4b76-afb6-734d8d2cfd99",k.Tintable_rectangle_12px_corner="06d922e2-baf8-42e0-bc0e-149590b741c3",k.Tipbubble="456ce066-4d35-488f-b9ba-8dcd80bd7f16",k.Tipbubble_tail="1f013188-1cd7-4bbe-b329-31f746c32ed3",k.Title_plate_purple="559deb2e-274d-4675-947c-c039461085e2",k.Topbar_button_basic_color_1="db6cc2c2-ef55-468f-9414-4fecee6ad4b1",k.Topbar_button_basic_color_2="cab0340f-d03a-4177-bda3-d14863de8512",k.Topbar_button_basic_color_3="97cf491b-65c4-4f0b-8e7b-7581bbc5aeeb",k.Topbar_button_basic_color_4="3954bb7c-34f0-41ca-b1f5-eb87489f788b",k.Topbar_button_hover_color_1="59966bde-2d2c-4717-bedb-174c145a0f9f",k.Topbar_button_hover_color_2="e4f9783f-5798-43d6-8a42-dbd2ef0dfd5c",k.Topbar_button_hover_color_3="1759bae0-8493-4716-91d0-6a391838254f",k.Topbar_button_hover_color_4="80de62b3-1347-455b-8ddd-d5fdd3b1514d",k.Topbar_button_pressed="810c3144-3e79-43d6-9252-deb95f826b20",k.Topbar_plain_color_1="f6055c5f-66a7-408b-bda4-f93b7f91780d",k.Topbar_plain_color_2="b69fef13-1044-4089-a2e2-b3bb806f1f26",k.Topbar_plain_color_3="de1a0db8-32d9-4a79-bda5-43ad88822cc3",k.Topbar_plain_color_4="bf749c86-d44b-4752-af3a-ce1a015477f2",k.Towertown_open="4bbdcfc4-a78c-4ae3-a906-d546905fc022",k.Towertown_watch_adv="cc1c6bab-95c1-4705-8cf5-32821da251a3",k.Treasure_tablet="3b2b830c-7013-4778-ab6f-7b0b807670d7",k.Treasure_track_artists_alley_splash="6056f152-daf1-47a3-87fa-ecb45dff652c",k.Treasure_track_splash="e82ae0a6-c8e2-4fd8-afd9-407576b89ceb",k.Treasure_track_xp_80x80="c9ff6682-fc5f-4907-ad2a-b53530adb2eb",k.Trophy_bronze_small_state_challenges="4e431e59-7b9e-44fe-b0e9-ffb858232d99",k.Trophy_bronze_small_state_challenges_4="aeb6a727-c9a7-4276-a7ec-d9e9ff73f9ac",k.Trophy_bronze_small_state_challenges_5="736d11c0-7300-476a-8a77-fdd4be393480",k.Trophy_bronze_state_challenges="fdbc28f6-1837-494b-97f7-ce78708ec892",k.Trophy_case_top="5056f385-166f-4c9a-987c-daa7acf6d816",k.Trophy_exterior_00="2cfb17fc-c308-4f54-84e2-3e6c5b2220ed",k.Trophy_exterior_00_night="39cb0814-8862-4ded-9101-0ced2f91d389",k.Trophy_exterior_01="db2af1d6-64f5-4bda-bb00-b3587b5480a0",k.Trophy_exterior_02="833f2a7e-957b-4665-804e-5f0646ae004b",k.Trophy_exterior_03="b86ac0be-f3c7-465f-b9d5-9eac025342dc",k.Trophy_exterior_04="a47ba1d3-2294-436c-afe4-54e8f110f82b",k.Trophy_exterior_05="578665ea-d9f8-4815-8268-e55de3600f53",k.Trophy_golden_small_state_challenges="a5a193d6-75a6-41f5-8486-89f35e6f1cb4",k.Trophy_golden_state_challenges="6028be92-21dc-48d0-bc57-64ddff6621a7",k.Trophy_lobby_01="00564610-412d-446c-a76d-9bfb3a2d11f3",k.Trophy_lobby_02="a3932060-cbf0-465b-b245-e0128f1ee2e3",k.Trophy_lobby_03="40af937e-454a-4ae2-bf48-98f90951b710",k.Trophy_lobby_04="3c0000ad-1216-482f-8adc-be6f68d40297",k.Trophy_lobby_05="e4f055df-7a17-4371-8ca1-35159194d3bb",k.Trophy_silver_small_state_challenges="ec54ed34-2e12-462e-96c8-f0b5216b7630",k.Trophy_silver_state_challenges="c92c3f32-0c7b-446d-a107-d6aeb2215b7e",k.Tt_deco_ammonitefossil="98bf8744-4b5e-4e11-9b30-1f45a1917fb6",k.Tt_deco_ammonitefossil_icon="4d5094c1-4242-4cdc-8425-18e0d089731e",k.Tt_deco_babygargoyle="380abc55-1e8f-4e6e-a820-c1f049797d72",k.Tt_deco_babygargoyle_icon="c9b58d99-547b-431c-a1f4-ac2f18b6495d",k.Tt_deco_bigredbow="c5604178-54b5-4ee4-9231-a220621d02fe",k.Tt_deco_bigredbow_icon="35d9f6af-5c30-4e48-8931-608300c7959a",k.Tt_deco_birdbath="79bf82e8-a4b2-488f-9b34-4249de135e93",k.Tt_deco_birdbath_icon="0f0be8fe-b66b-48ae-97df-e68553b00673",k.Tt_deco_bp_ammonitefossil="fce30c85-ef9b-4825-89a0-587b7503c2f9",k.Tt_deco_bp_babygargoyle="018be468-1402-4404-b8f0-008a1a2c8ca7",k.Tt_deco_bp_bigredbow="5dd3522a-580d-458b-a5c7-9e307e40ed37",k.Tt_deco_bp_birdbath="8d2deb44-15b2-4da1-a466-75f833f5157a",k.Tt_deco_bp_clamshell="5f0bcb26-a6b6-4080-817e-95c8fd5b5b2b",k.Tt_deco_bp_conflictedmask="7f44a802-cf09-488f-8b89-f0add094d6ef",k.Tt_deco_bp_crystalflake="ea645198-2780-4261-a71f-734be3e4c31d",k.Tt_deco_bp_gingerbreadman="d7e6de87-4fa4-412b-825b-44536d1a293b",k.Tt_deco_bp_grapes="30c4841b-cc25-4dc6-9942-9fc0c7dae508",k.Tt_deco_bp_happyflowercoconut="9e954b30-b6d4-4664-8873-fd65d47cdf24",k.Tt_deco_bp_happystar="6bcf3b30-4863-456c-a9e1-d7bf3c4e6e5f",k.Tt_deco_bp_happysun="7b3125e6-4ac5-4a21-a830-6f4fc07f7fd4",k.Tt_deco_bp_hummingfeeder="0534d2f5-a4ca-4c9b-9bdd-506a7508e1f2",k.Tt_deco_bp_lantern="0b5062be-836a-4192-a423-4c4d66299607",k.Tt_deco_bp_lifesaver="041a7f54-41bd-442c-a515-01d0b0826f42",k.Tt_deco_bp_orangeflower="f0bb5855-2be8-463f-ba14-6473bbc6adf6",k.Tt_deco_bp_pinkflowerbasket="e237eca4-fe75-45cb-9579-5377e8d913d8",k.Tt_deco_bp_pinklotus="84741432-9996-4aa5-b7cf-43326e8a49ec",k.Tt_deco_bp_piratewheel="7b14361c-e34b-4d6d-a0ec-2debf06b86cd",k.Tt_deco_bp_planet="19a7a513-44b9-4941-a2b2-98bd6f6a59b0",k.Tt_deco_bp_puffyskates="2f5cdb8f-f345-425a-9a83-66205b5a3436",k.Tt_deco_bp_redgrassmushroom="d19662ea-ca8b-478b-a461-54d55ac94333",k.Tt_deco_bp_starswithcrescentmoon="a0603c67-59da-458f-ad0d-4e6f75efb3d8",k.Tt_deco_bp_steellantern="9a607e0e-84d1-410b-9f05-e108ec5d916d",k.Tt_deco_bp_stuffedfish="5da7c51e-5f7b-48a7-b5f2-b250207ab13b",k.Tt_deco_bp_teengargoyle="27a4cc87-2fc4-4df2-a248-0839aecc1907",k.Tt_deco_bp_toyeggnest="5a2f2707-bbc5-42f1-8221-7af0a859410a",k.Tt_deco_bp_windowsillcoolingpie="185fc191-fcf4-45aa-a985-6561a695ab61",k.Tt_deco_bp_woodenclock="b4c45bac-fd3e-406d-b86a-ada2102a03be",k.Tt_deco_bp_woodenoctopus="bbf58b26-1bab-4d2b-9763-eb6fc8481caf",k.Tt_deco_clamshell="fdf8715f-11f2-4c55-bbb0-cafb328c2c97",k.Tt_deco_clamshell_icon="dbf12805-f8ad-4da9-9c7d-df28040f5168",k.Tt_deco_conflictedmask="a5410bf9-e01c-452b-b19d-c67ad916ba37",k.Tt_deco_conflictedmask_icon="e1ca5a40-7b9c-42ec-8c7c-c1056c81beda",k.Tt_deco_crystalflake="0cf5a585-73bc-4c3f-b7a2-1696c1cfcaf2",k.Tt_deco_crystalflake_icon="bf555c8a-f9df-4e69-a5d1-f4ff42df30c9",k.Tt_deco_gingerbreadman="50dc8d86-7283-4eea-bcdf-99deac8544cf",k.Tt_deco_gingerbreadman_icon="284780e9-9b66-41b5-91bb-ef17077c1f73",k.Tt_deco_grapes="f1c4f238-4968-4223-8bdd-b8b86493a1d8",k.Tt_deco_grapes_icon="47ecd891-f539-4f3b-914e-4aa4c9aef15e",k.Tt_deco_happyflowercoconut="a10272e9-f176-4490-abad-22cf16d1605a",k.Tt_deco_happyflowercoconut_icon="200c6e49-3d20-4be7-b133-faf6f5e7af30",k.Tt_deco_happystar="7a75c80c-89c5-4e6c-bd7f-0a1418e0b593",k.Tt_deco_happystar_icon="ad5963a4-a7a2-469c-8a4f-602cb7265121",k.Tt_deco_happysun="376ecc1b-9e3f-487e-b330-08f0a41a072b",k.Tt_deco_happysun_icon="0b135c11-efd4-4055-b8c6-addc71701b68",k.Tt_deco_hummingfeeder="77840809-c991-40e6-86e7-bcfa1cc64353",k.Tt_deco_hummingfeeder_icon="0d622501-9155-48b8-b7b8-7bc8dd57b526",k.Tt_deco_lantern="66ef08bb-b271-42e3-a6bf-e60f60f48260",k.Tt_deco_lantern_icon="ae19f1ca-c38e-4d2b-8acf-6c2d68a8ee35",k.Tt_deco_lifesaver="640d8ac1-0452-4af1-bff8-c8e9eab5929b",k.Tt_deco_lifesaver_icon="e9b38757-f0eb-4d0b-9c31-63269534e0bd",k.Tt_deco_orangeflower="be857fda-6001-42e0-92a7-bc017be1eab9",k.Tt_deco_orangeflower_icon="2fe5e140-f8d9-49be-9a13-7be9c4114c67",k.Tt_deco_ph="5ac3cf37-e35b-49d4-853d-bd55c1ddaf0d",k.Tt_deco_pinkflowerbasket="340cbe8f-c2b3-420c-94be-4936df86427e",k.Tt_deco_pinkflowerbasket_icon="7f707cfd-7fea-4ff4-acb8-0745899dd90c",k.Tt_deco_pinklotus="85277284-10c8-4607-9973-ffbcb20196b6",k.Tt_deco_pinklotus_icon="b48c4d7c-0391-44f0-93e9-41a9a79632ba",k.Tt_deco_piratewheel="34b03b72-e45c-4c13-9f17-a0f91103e689",k.Tt_deco_piratewheel_icon="f40ef9c2-d34b-4121-b91a-50a54ba99e0d",k.Tt_deco_planet="70daed12-608f-4e43-9056-aa68173fccd7",k.Tt_deco_planet_icon="bcbecc40-f2b1-411e-aa81-02eb439ae609",k.Tt_deco_puffyskates="92330445-45f8-4d82-8f1b-93381c509b90",k.Tt_deco_puffyskates_icon="e8c4e4f7-9284-4ec1-982b-ee970b3331ca",k.Tt_deco_redgrassmushroom="8c77d9c5-9ae2-44b4-a48e-0bab12e1497e",k.Tt_deco_redgrassmushroom_icon="3da43433-f4f6-4c5f-a66c-59f4b162000d",k.Tt_deco_starswithcrescentmoon="b1bd6977-3ee6-406b-8480-0c391de6c0aa",k.Tt_deco_starswithcrescentmoon_icon="5fd18966-9297-42ff-8834-af8c19019104",k.Tt_deco_steellantern="fc331545-ffdb-4b6f-aafb-55b1b2be29fe",k.Tt_deco_steellantern_icon="b62b3723-8785-4968-9158-bb4e160a4b8c",k.Tt_deco_stuffedfish="6dd274ef-85a8-4e6a-ab39-c0fb297f1cd4",k.Tt_deco_stuffedfish_icon="863f5ab1-d7f6-44b1-a4f5-ea6403a36ce4",k.Tt_deco_teengargoyle="8b5a06e0-9096-43a4-a029-512482a67752",k.Tt_deco_teengargoyle_icon="6ae9949c-1206-46f6-92b2-2f7877837aa7",k.Tt_deco_toyeggnest="2b90adb7-029c-4b74-afa2-f92032a9c289",k.Tt_deco_toyeggnest_icon="f9d66f9a-a2ca-4cdd-b28d-5cf50f80938e",k.Tt_deco_windowsillcoolingpie="9df4bbab-492f-4211-9b0a-7fcf940d7c97",k.Tt_deco_windowsillcoolingpie_icon="37602f1d-a6d7-41f9-ad56-05c0f6b7a80f",k.Tt_deco_woodenclock="5ab0fdf6-26a3-4ed7-9d17-64a4e04ae159",k.Tt_deco_woodenclock_icon="49624b28-f9b9-4088-a128-98f56447c08b",k.Tt_deco_woodenoctopus="d148638b-2138-42e0-92a3-b1d1a945ec1e",k.Tt_deco_woodenoctopus_icon="9a0aca29-f83a-4c11-b637-c1fbbb7b6a1d",k.Tt_frame_bp_fire_1="e3bb9891-0d94-4710-b0bf-7a658a897ecf",k.Tt_frame_bp_fire_2="5e6437b4-f0e6-411d-b017-068cb298989a",k.Tt_frame_bp_fire_3="1270fe1a-1343-4ad5-b402-2a9b01e87117",k.Tt_frame_bp_fire_4="4329dbff-147a-454c-a7d2-4de069ae7081",k.Tt_frame_bp_fire_5="0bf182c9-d86e-4187-8dd5-f197ebdac5cc",k.Tt_frame_bp_fire_6="443b30dc-e9dd-4878-8f61-87eee5778b39",k.Tt_frame_bp_ice_1="3299d38d-60a7-4cb4-8673-8faad34f7e2e",k.Tt_frame_bp_ice_2="8537252a-2df9-45ab-8d91-a39245ebf242",k.Tt_frame_bp_ice_3="475a7abf-9aca-4fe7-aba0-7d42a12c4c3a",k.Tt_frame_bp_ice_4="6d6da880-a0b3-4890-a2a5-563da06a3e1a",k.Tt_frame_bp_ice_5="32ccd383-abd3-4c82-9149-588cc2bd75eb",k.Tt_frame_bp_ice_6="5ce657a6-86ce-4d46-bcdb-662e77c918b0",k.Tt_frame_bp_plant_1="bd91c3ed-846f-4dc1-8aa2-a6cc08b9030e",k.Tt_frame_bp_plant_2="50df3deb-f1cd-4a6b-840b-4a6d54482021",k.Tt_frame_bp_plant_3="90531f5d-2ee8-4343-9442-cca88ed5201a",k.Tt_frame_bp_plant_4="c4b29660-ef9e-4cab-9bc3-1d0e5adb73fe",k.Tt_frame_bp_plant_5="83374789-ce38-4daf-b311-bd40951efe9f",k.Tt_frame_bp_plant_6="088ebaf8-9248-481d-b35f-d576e6e4befd",k.Tt_frame_bp_storm_1="c0d2613c-8953-4a0f-86fd-05abe84b5868",k.Tt_frame_bp_storm_2="2d353e46-ab0c-4307-9d62-83bba831a90d",k.Tt_frame_bp_storm_3="e106853b-d3d8-4cf9-8602-8c818acb35b9",k.Tt_frame_bp_storm_4="9eacd7df-ba5a-4066-ae4d-5e5ea92bf5b9",k.Tt_frame_bp_storm_5="3c298e45-78b3-4e35-a7b7-ca73833a19e1",k.Tt_frame_bp_storm_6="4a3d125a-1c4e-4bf8-ba25-b81be5f6a001",k.Tt_frame_bp_water_1="afe55c6e-0225-4e18-961d-a05ff38bb836",k.Tt_frame_bp_water_2="ae743243-7f11-483c-8c85-61dab2c1ee70",k.Tt_frame_bp_water_3="2d825d74-7924-4d38-8c67-a43c8e1fb8d5",k.Tt_frame_bp_water_4="6b1c0d07-6cc3-4fcb-843a-ae8fe853fb8c",k.Tt_frame_bp_water_5="c2ce1daf-cb34-4269-a08e-5c3af052d64b",k.Tt_frame_bp_water_6="e93026d0-9c96-4bac-b429-f64f04b70515",k.Tt_frame_fire_1="724620be-09d0-4a22-9ec4-82c0c5545549",k.Tt_frame_fire_2="96ed4c11-5af2-4968-8079-02a6b1dcd3e5",k.Tt_frame_fire_3="0ac7096d-5a5a-41ee-898b-a88c5f59ebe6",k.Tt_frame_fire_4="9afdd9d7-2024-42ab-b402-54095a60f530",k.Tt_frame_fire_5="bf54d6f3-acde-4761-a335-e3f42d145892",k.Tt_frame_fire_6="586b8c02-4057-4db5-a5a0-c95c517819d5",k.Tt_frame_ice_1="77b9ce41-7947-4772-a93b-cd6ef8c4c264",k.Tt_frame_ice_2="5859c787-9f92-4b03-8a7a-cab44cb8a8d8",k.Tt_frame_ice_3="b9e09b67-d11a-4288-89cb-50830314edfc",k.Tt_frame_ice_4="76618ee8-4811-4df7-ad8e-ebbdba704bc8",k.Tt_frame_ice_5="998a2a2e-543a-471a-b4f0-0c3a917240f3",k.Tt_frame_ice_6="0e95d74a-26dc-4130-b476-7bbf270d04fd",k.Tt_frame_ph="fe5038c2-1e83-453b-9b8e-8d4c388392f4",k.Tt_frame_plant_1="123dd58c-e4ed-4d7d-b295-e2fbd2371401",k.Tt_frame_plant_2="f511b723-5748-4ddf-bb01-132ae1a7d9b1",k.Tt_frame_plant_3="771757fb-eb93-48bf-892f-4a183daf9e85",k.Tt_frame_plant_4="fde30427-6871-4d1e-9d92-a6df7bd26843",k.Tt_frame_plant_5="b975919a-cd48-4793-8f43-3e543cc2e70b",k.Tt_frame_plant_6="211932bc-9d15-4149-a5c4-86c3d3a31b9b",k.Tt_frame_storm_1="368622ba-1ef8-4c7e-9fbe-91535b5a98bd",k.Tt_frame_storm_2="de6b6efa-10cc-4fcc-b81d-8b23f56c5903",k.Tt_frame_storm_3="180338e5-bcfe-41fd-8ade-9844b4dcd594",k.Tt_frame_storm_4="8cb72f8c-0118-4c52-bbf4-62ba6420f868",k.Tt_frame_storm_5="e77f40e2-db00-4669-af50-2cc659445979",k.Tt_frame_storm_6="ea8dc9ad-4562-452c-a35b-48bdd76e3a62",k.Tt_frame_water_1="2a2109d5-76d4-404a-9bbc-0eac2b5dffa4",k.Tt_frame_water_2="07a9b8ef-68c7-40f5-9db6-bda1a321bdc8",k.Tt_frame_water_3="3e441ad5-878b-4b8c-b49e-b9c6aa45d81f",k.Tt_frame_water_4="02d84c7d-1fbe-42be-bb9e-a013fdd7fa19",k.Tt_frame_water_5="b8a82e80-8f1f-416f-acc9-5506de7972bc",k.Tt_frame_water_6="9d1ecaa9-5c62-48c8-8627-a4fcff95f3ff",k.Tt_int_ph="5d4d4873-a4ce-44e2-89e7-85fb582da46f",k.Tt_interior_bp_fire_1="ab4b7495-5b6c-44e1-91cc-8b20e3d591cd",k.Tt_interior_bp_fire_2="32b9b825-2a7d-4a66-803c-811175c2acc3",k.Tt_interior_bp_fire_3="c27548cc-d564-44b1-b383-5c85be7fac1d",k.Tt_interior_bp_fire_4="98bf3075-2b4e-4571-9dc9-79785109de23",k.Tt_interior_bp_fire_5="baf70955-2754-4eee-a6d8-5f57249e8ccc",k.Tt_interior_bp_fire_6="1a32e62e-404b-46dd-8a44-24cf9aab7770",k.Tt_interior_bp_ice_1="fcadc8e5-3025-4eaf-91a6-4920279944a6",k.Tt_interior_bp_ice_2="5447f88e-4ad1-45d1-8c7a-c6eaa917ebcb",k.Tt_interior_bp_ice_3="a59de311-8fb0-4f78-b187-25b652f2eb3d",k.Tt_interior_bp_ice_4="6e6fba1d-0a85-477f-9165-ece2fdeaba14",k.Tt_interior_bp_ice_5="5d8771ec-88dd-4aa6-9ffe-75563d349a66",k.Tt_interior_bp_ice_6="1ce79b4d-22df-46ad-9204-30cd06d433dc",k.Tt_interior_bp_plant_1="cfcdac71-0aaf-4c61-9175-2063a558fba9",k.Tt_interior_bp_plant_2="6f4f7e65-40ee-4c24-bd7b-9895bbf3573f",k.Tt_interior_bp_plant_3="0028d0c1-c998-4566-a0ec-f3c11155b9e4",k.Tt_interior_bp_plant_4="83a48057-8825-4cb9-8c7d-811de9c038a6",k.Tt_interior_bp_plant_5="fcfc747a-071a-4bc9-b5e8-cb08c03ff214",k.Tt_interior_bp_plant_6="c7ff2d6b-b28f-40b3-b3ed-66490a1c6439",k.Tt_interior_bp_storm_1="caef0401-1865-42e3-8350-a35abd451418",k.Tt_interior_bp_storm_2="ccd5e840-f260-4a5b-8603-3ff567f78a78",k.Tt_interior_bp_storm_3="e3170739-c616-4927-b070-c3a867e1dec5",k.Tt_interior_bp_storm_4="1967b439-eb0c-4dd3-8f4c-04d89dd227df",k.Tt_interior_bp_storm_5="bb4365b6-4445-435a-b6ff-c16cfa160590",k.Tt_interior_bp_storm_6="0c6256ea-3716-45ec-babe-0c74d4e6ec45",k.Tt_interior_bp_water_1="70fbb9e6-6fb6-4304-a52d-09aec2afd235",k.Tt_interior_bp_water_2="5a22dd34-d216-496d-ba5a-9a2dd24a4481",k.Tt_interior_bp_water_3="2f1d4452-1300-4e79-961a-f7c1e7583ebb",k.Tt_interior_bp_water_4="26eb1461-956c-4b7b-a2d2-d106160e7afc",k.Tt_interior_bp_water_5="19970c62-a9c8-469c-92b9-0b3ce2dde87d",k.Tt_interior_bp_water_6="2252c25c-54a5-42bf-a25c-357094099029",k.Tt_interior_fire_1="c2a28b5c-2ffd-4cd6-8630-3c2208ccaf74",k.Tt_interior_fire_2="7b4419cb-9abf-451d-b4f3-95bd3cba9a1d",k.Tt_interior_fire_3="5fc5e4ca-6e48-4755-9b7e-5c331bfffa59",k.Tt_interior_fire_4="fde40b18-d611-4414-85e9-eb86a7d3e9cd",k.Tt_interior_fire_5="6dc70ca4-496d-4b23-b227-cb035c16d863",k.Tt_interior_fire_6="7dbccda0-2a2b-44af-ad71-5b4d2f082d77",k.Tt_interior_ice_1="0fbaf01c-bc33-44fb-9b0e-d4f7aea9931b",k.Tt_interior_ice_2="ce785ad7-3be6-4036-ab4d-874bc5208d8a",k.Tt_interior_ice_3="9863d48b-fdbd-4284-9861-8b2dd6d94b4e",k.Tt_interior_ice_4="1dd60917-584b-45c3-8e80-85ab9f5d1103",k.Tt_interior_ice_5="d8c92be9-a327-4c8a-81e3-155888c4dd97",k.Tt_interior_ice_6="c8843328-0073-4d77-8914-271c58150c64",k.Tt_interior_plant_1="2609e420-488b-487f-82db-7033509ad435",k.Tt_interior_plant_2="9e7344b9-f5a3-466f-a015-e5249d837b57",k.Tt_interior_plant_3="7ffdfbdf-6be8-4ad8-85cb-48091b75d86f",k.Tt_interior_plant_4="c609310d-e764-4f81-8b83-5c27e6b2b53e",k.Tt_interior_plant_5="0d226f6d-c586-4676-95a0-421a5967b2d0",k.Tt_interior_plant_6="0ea565f1-ef8e-4ebf-84c2-d788186064ac",k.Tt_interior_storm_1="bffb6e2a-6096-4c80-b8ea-2af4e9e85a62",k.Tt_interior_storm_2="e467bc8d-1849-4d25-bb57-9f59736a25d1",k.Tt_interior_storm_3="f6f10267-1650-424b-b7b5-f32f557a49ba",k.Tt_interior_storm_4="97baae73-1a31-4446-badb-5cbf19c21b1a",k.Tt_interior_storm_5="84b0a122-4515-4813-bcfd-9e03ff012115",k.Tt_interior_storm_6="7d4610eb-6dfe-4353-9ee4-fd2ed9822f11",k.Tt_interior_water_1="dcd376aa-6b22-46e8-a091-a8c485c8eff5",k.Tt_interior_water_2="13df2b8b-124e-40bb-9fd6-4fd1be1baa9b",k.Tt_interior_water_3="af7bbfad-b382-4483-a863-11acac7b4007",k.Tt_interior_water_4="8cd48d7b-fb90-4334-b598-6aa5260e3a3b",k.Tt_interior_water_5="b2aedede-366e-4cf2-b9e5-2f8f0daa1ae2",k.Tt_interior_water_6="179832bd-08fb-4911-b71d-b13f4d5fd2e3",k.Twilight_wheel="e53556f7-d1df-4e5d-a457-fa99e83e05b9",k.Twilight_wheel_off="234407f9-1f33-49b8-8a7b-4a4bf504cab4",k.Ui_coop_bucket="e233cc3c-fcd8-4142-87c7-33c34570007b",k.Ui_pet_xp_boost_graphic="8da014e1-1078-45e4-a5e9-06a36aca15fb",k.Ui_pet_xp_sunburst_white="8c6d94e8-24f1-47d7-a9ab-cb65dd1c866c";k.Universal_scroll_bar_slider_basic="db95a2c0-abe8-4710-8ab9-902cf65e8809",k.Universal_scroll_bar_slider_hover="08551e9e-d5a8-4830-814c-aaad30f76c97",k.Universal_scroll_bar_track="a365d6ce-345f-4404-8d2b-b389bc6716fa",k.Vertical_dorm_1="4ad58123-ea85-4242-869b-d2bda088d557",k.Vertical_dorm_10="77f018d4-566d-4238-943f-73ecef33542a",k.Vertical_dorm_100="46daf03d-9175-4d3c-b9b2-fee25d9a7caa",k.Vertical_dorm_101="ea817ccd-3733-48d9-b5bd-5b5ff786751e",k.Vertical_dorm_102="121049e6-54e5-4863-a8b4-cc68ef39a945",k.Vertical_dorm_103="c6373e45-7fec-4695-8842-e952d9bcfb2a",k.Vertical_dorm_104="02b867b4-1002-4e64-a27a-ed721a1f9053",k.Vertical_dorm_105="2896771b-4f47-4d4c-9ca3-98b1346fda93",k.Vertical_dorm_106="25f56ef1-95cc-4cd6-8723-e932e0407b71",k.Vertical_dorm_107="acf1ab4f-7f66-43e8-9f8e-38c4d40aa071",k.Vertical_dorm_108="c18983be-4074-472b-9c1f-23fa166b6288",k.Vertical_dorm_109="116a4406-7663-4401-9cdd-164f1d2571b1",k.Vertical_dorm_11="73f521b3-c357-425d-b867-4caaa034914b",k.Vertical_dorm_110="96d8ab22-8f7d-4c11-9929-7914ceff4742",k.Vertical_dorm_111="304acc4f-013a-4385-8862-5cd828e962e2",k.Vertical_dorm_112="891e8319-ec08-4dad-bda1-0f196fb34001",k.Vertical_dorm_113="a3f3622b-caec-4228-8deb-2ce3afae8bc8",k.Vertical_dorm_114="5ae172a1-73d5-4a1b-b272-4b1e11012d1a",k.Vertical_dorm_115="3a0c6a18-986a-4ef3-8867-d53d3745fbc5",k.Vertical_dorm_116="de4470db-7d8f-4805-8fe7-82b242980c95",k.Vertical_dorm_117="3dee9d55-bcdb-482a-b058-e19d4c08a68c",k.Vertical_dorm_118="be2ca8e8-3dac-443a-b65f-5ae7e8e6cb9c",k.Vertical_dorm_119="c355abe3-269b-42ec-b7b6-ee730008a592",k.Vertical_dorm_12="b6eba5bb-65b1-4669-bf13-637202be6482",k.Vertical_dorm_120="cb5af5ba-e272-478f-a826-333c87853db4",k.Vertical_dorm_121="48a7a1ce-4ac4-4235-a522-9915ef6f4636",k.Vertical_dorm_122="d03a9445-2b10-40c4-ba8e-6ff0c120d623",k.Vertical_dorm_123="af9130e0-99e6-4dae-9121-b95b154b0756",k.Vertical_dorm_124="da4b5c3c-770e-4327-ac01-92bf2fcaf7b2",k.Vertical_dorm_125="6d9fe51b-5482-4c91-acbb-ee87363987aa",k.Vertical_dorm_126="0547038f-5510-4833-863f-14ea9a205840",k.Vertical_dorm_127="b47d66d7-ab54-4f49-8ac3-363df8cc18f5",k.Vertical_dorm_128="61751a5a-1c48-4a9b-a042-ad7e29802ff5",k.Vertical_dorm_129="9e60cc4b-fcad-4f96-8fd5-77523299669f",k.Vertical_dorm_13="d814b3c3-5efd-40fa-90c2-2efa648c75d7",k.Vertical_dorm_130="632d7aec-aa0c-425b-a16f-1964f84ea0b8",k.Vertical_dorm_131="1977a218-0ebc-4149-a78a-c512468aa4d7",k.Vertical_dorm_132="3ab4754e-885d-4d16-bc60-2cccba483e76",k.Vertical_dorm_133="29cb3648-3ae9-47df-9ba5-9c977ed2fdf4",k.Vertical_dorm_134="9eec7380-9a71-48ad-bc05-ab195a1d2ca8",k.Vertical_dorm_135="65f51264-d8c8-4505-a0ba-2467c71ebe83",k.Vertical_dorm_136="461ea4cd-02c5-419c-9e00-313b2885ad8c",k.Vertical_dorm_137="181f42cd-5a64-4c16-b919-0252a0e6e2cd",k.Vertical_dorm_138="6b3fbc75-0b79-4330-9c24-5a893ea6e7d9",k.Vertical_dorm_139="86dea814-2908-4b65-b3a5-d37fd3973c00",k.Vertical_dorm_14="e1cf4f8f-c5a8-4e13-9f7c-11dd6e9fc6fd",k.Vertical_dorm_140="aa8b79d7-9d60-429d-ab3d-98ba531b9f91",k.Vertical_dorm_141="157c6a83-8c2f-4c22-96ca-70e658a1731a",k.Vertical_dorm_142="f1339be0-7362-4be4-9133-850cfe01239d",k.Vertical_dorm_143="4f69f346-493a-4563-81a1-3e20baa5703a",k.Vertical_dorm_144="f6c8fb46-f7f8-4769-ba5b-49eb9ca1ea08",k.Vertical_dorm_145="a908c059-52fb-4193-b2a4-c6082b9a1c62",k.Vertical_dorm_146="ac3aa61b-ae3e-42c5-9e65-5222cde16a67",k.Vertical_dorm_147="9d9d45c4-19e5-4ea0-afb0-0b709f96942c",k.Vertical_dorm_15="be6f339a-8cfd-4d95-af27-22f55c0b541d",k.Vertical_dorm_152="eb4f600e-15f9-4d96-8f83-05c224f78deb",k.Vertical_dorm_153="786c8f3a-d93f-4990-9b96-5dfcdfb2b14b",k.Vertical_dorm_154="13a7419f-24c2-487e-9427-466fe2b27715",k.Vertical_dorm_156="d3a809b6-b38d-40c5-a79f-9b53afe7090f",k.Vertical_dorm_157="cc33c0b4-55e1-4f32-ba8a-bcf1807c3e23",k.Vertical_dorm_159="d69be3e8-a2b2-4191-bfdd-1bb4917ca18b",k.Vertical_dorm_16="14bee117-1627-4ba5-a7fb-05c7d1f21c6f",k.Vertical_dorm_160="4c5f93a5-e3f0-4f49-8c14-ccd31cf826ac",k.Vertical_dorm_161="16e2f3e7-ec4c-4a1d-8801-13c90a035b08",k.Vertical_dorm_162="61bd7028-7489-457c-8ba3-e10dc10fabb3",k.Vertical_dorm_165="ec8ebbf7-211d-4e66-9054-63acacb62fe5",k.Vertical_dorm_166="597af58c-12d3-4cad-a2f6-f9c576ae467c",k.Vertical_dorm_167="9a664ec2-81ae-4761-8f19-04769633fe11",k.Vertical_dorm_168="9fa610e8-a404-4970-ad24-8f9ae440ec8c",k.Vertical_dorm_17="b9e85a13-ae87-4319-a53b-f8cb36b2743e",k.Vertical_dorm_170="7e70aa9d-934d-4101-aad2-a6132f9eba93",k.Vertical_dorm_172="285b0d23-0a04-4808-bf6e-9bce7cb3d108",k.Vertical_dorm_173="524b931e-8fae-4940-aaf6-e26cc8e19cbd",k.Vertical_dorm_174="71fb2cd8-8def-4b2a-b29f-9fae5d527983",k.Vertical_dorm_175="39f226e2-9795-495a-af71-261eca208b2d",k.Vertical_dorm_176="a4f33b37-ad76-458f-83b7-11a5205b8163",k.Vertical_dorm_177="e34fbd43-8c7b-4e3d-92eb-42c6ba8319a7",k.Vertical_dorm_178="2ee126a4-ff03-48ed-b131-210780a1f930",k.Vertical_dorm_179="6f340796-e992-4f71-a2a5-13b2692bea73",k.Vertical_dorm_18="719ee94b-0e05-4336-99cd-215b51b4b5ea",k.Vertical_dorm_180="3e29437b-f895-4fed-80b8-ebc2b8f3f96c",k.Vertical_dorm_181="2501177f-4111-48c4-868c-af60619f6f7f",k.Vertical_dorm_183="4128a834-34ff-406f-920a-be02ce4cde91",k.Vertical_dorm_184="19ccddc6-a115-4283-b836-5933d8a535e4",k.Vertical_dorm_185="c715f6cf-2f68-459d-ba0c-6c91823c54be",k.Vertical_dorm_186="30992f5b-8c7b-4763-a667-b220e5fb1f96",k.Vertical_dorm_187="e8aa633c-2a6c-4791-a834-6d9061820fb3",k.Vertical_dorm_188="208c911d-4565-408a-a0e8-2a42aa54ce8a",k.Vertical_dorm_189="5c033a33-935c-4df0-91d3-b01672ae514a",k.Vertical_dorm_19="f5e1bcdf-8f7a-438d-9b76-ff09328943dd",k.Vertical_dorm_191="12b15048-b0da-4b87-82fe-5301473d1015",k.Vertical_dorm_192="b1b9aba5-8c16-4307-95c3-1bd2cfb7a5ae",k.Vertical_dorm_193="cbd78246-97a8-4f91-af1d-f166f06de41d",k.Vertical_dorm_194="fe52e6c9-e394-4f87-97d6-23c7565e3dcc",k.Vertical_dorm_195="a5802ac7-b883-4685-876b-9e74e4e2d12f",k.Vertical_dorm_196="22983af1-8b06-4ddf-93f4-6f7629d4da82",k.Vertical_dorm_197="d16fe0df-4856-4c10-9014-7f5f8f3c9e16",k.Vertical_dorm_198="5a2cb3d2-f60b-436a-ad4e-8d7d83c867ea",k.Vertical_dorm_199="a15bb8d9-3972-4e4c-8a0b-2d2ab0c75e77",k.Vertical_dorm_2="668ed1e7-0cd7-4f71-af03-b715d875443a",k.Vertical_dorm_20="e87012bc-6ded-48dd-a59b-d0cc872cbdc4",k.Vertical_dorm_203="3d2748b9-4c49-4707-8dc4-e200cc8dcf7a",k.Vertical_dorm_205="fcd38cca-b804-46b6-8f8c-6694e2854e4f",k.Vertical_dorm_206="c7b50da8-810c-41ff-a3a9-6e1f44784e0e",k.Vertical_dorm_207="eb0d8310-3448-4f8c-957a-f964ade86c86",k.Vertical_dorm_208="21c9bdc2-b46b-4324-9048-22162737caaa",k.Vertical_dorm_209="bc3393b3-bda6-4ebb-9b81-1840bf6a7364",k.Vertical_dorm_21="fe915b04-0cb8-4575-9570-e31c17740cd8",k.Vertical_dorm_210="4b08c230-6f65-4fa4-81c2-d5477dc38634",k.Vertical_dorm_211="8834fb38-ec5e-435b-bd28-0c9e8cfb4ca7",k.Vertical_dorm_212="8b7bd883-3081-4fd4-9e95-1f7c2c785955",k.Vertical_dorm_214="ecbe380e-ffd3-452c-b97a-b478fd9d7cb7",k.Vertical_dorm_215="ad9baa0b-5980-4b47-8d84-d98cdaea5e5b",k.Vertical_dorm_216="1842d300-ab4c-4376-8d69-c895bfaa3ebe",k.Vertical_dorm_218="55aafa5b-2d36-444f-a0fb-3630b2bc8e4d",k.Vertical_dorm_219="59c1c23d-535c-4563-83e3-a74588e6d6de",k.Vertical_dorm_22="e4be1a58-d9af-4747-bde6-c728d562b7db",k.Vertical_dorm_220="41194cfc-40de-4a6d-9e86-1c0db943c8c1",k.Vertical_dorm_221="eeffc5a8-fe58-4a2e-b502-689f744233e4",k.Vertical_dorm_222="3f865840-c2d7-4253-9c4d-47d92616595d",k.Vertical_dorm_223="8294171e-46a2-4e0f-848b-870011366c53",k.Vertical_dorm_224="97349e61-dee7-4735-8a13-54a23c41997c",k.Vertical_dorm_225="8ea3c86a-3926-4ce7-abd3-715295c4a9f9",k.Vertical_dorm_226="0a3a309a-383f-4b49-a170-b172318a9429",k.Vertical_dorm_227="b8b59b7c-399f-4de4-b67f-81ff5157a4fa",k.Vertical_dorm_229="b5c73340-46f5-43b6-9c17-1477b0c08cfd",k.Vertical_dorm_23="fea36508-fd22-49cd-a9c1-77e66ee50282",k.Vertical_dorm_230="0e1bab9e-7c53-4ce7-befa-3951aea02b26",k.Vertical_dorm_231="c0c56a5e-8aaf-450b-a702-79d6621a5833",k.Vertical_dorm_232="a74d9e81-ead0-4781-8bd6-9071241e79e8",k.Vertical_dorm_234="9415d381-beb5-4539-8bbf-3b20d8ec9c97",k.Vertical_dorm_237="5b584940-97e2-4ccb-84c3-d59335997698",k.Vertical_dorm_238="be69ed67-53e4-43b8-adf1-1851450922da",k.Vertical_dorm_239="b1b2ad1b-5531-49fe-91a3-d7f605806039",k.Vertical_dorm_24="1736c17d-d4a9-45f3-a4c3-b75c7f0fe74a",k.Vertical_dorm_240="49ed535a-5634-4a06-a420-108aea365f6c",k.Vertical_dorm_241="7068344e-92a3-4981-a163-91785608dddc",k.Vertical_dorm_243="faace1a3-9bf0-45ca-b6d3-cf9eaf95448c",k.Vertical_dorm_244="a56b5129-556d-4e82-b100-bb26bce1203d",k.Vertical_dorm_245="b3af069d-0864-4b0d-8457-1fd0d14a7720",k.Vertical_dorm_25="33416572-0b6d-4c80-82b2-877e55204337",k.Vertical_dorm_252="d0904dbc-2c72-4c66-9f57-a0c1b73bd807",k.Vertical_dorm_253="4fa26da1-a0d0-45d3-8ab1-bd8c12d6c7cd",k.Vertical_dorm_255="2a238fbe-26c4-43c9-b968-91436dc22ec8",k.Vertical_dorm_256="3a34c0fd-c8d8-4f60-bc78-df650e7d8e2b",k.Vertical_dorm_258="727b4ee4-6231-4c09-9ffb-7dfb10813fbb",k.Vertical_dorm_259="86f27d75-c913-490f-a1af-67188f2f6571",k.Vertical_dorm_26="2030fb5c-1b40-44d1-a88c-e39f45d0646d",k.Vertical_dorm_260="92bda2d8-b28c-4c67-acb6-1e01132edd0e",k.Vertical_dorm_261="e83897ca-deda-4439-a42d-cb33fd323fc2",k.Vertical_dorm_262="13ae8b71-39c3-4482-97ea-072b70fe2332",k.Vertical_dorm_263="42e770a9-cae0-401b-be5c-3df412779644",k.Vertical_dorm_264="0d01ea41-014b-480a-a352-b8332b4695d4",k.Vertical_dorm_265="5794cf9d-5edf-4dfc-9d7f-086d703cb770",k.Vertical_dorm_266="5135c6b2-df4a-460b-b812-5f645666ad1e",k.Vertical_dorm_267="91857c61-0902-4b8b-9018-22c42dcbafda",k.Vertical_dorm_268="3f9771fb-1fb6-4339-b1d3-58c3e392e3b0",k.Vertical_dorm_27="eb914dfd-24b3-4b83-9645-e294daee9c70",k.Vertical_dorm_274="45d5a797-f9b4-4cf9-a32b-70928fe072dd",k.Vertical_dorm_275="0d0c4d44-6294-4ff7-aa9e-9347d6e6e385",k.Vertical_dorm_277="7a2db271-c722-4a81-a427-625677e90847",k.Vertical_dorm_278="30756eb0-2728-41af-806b-1ad8bce77d5e",k.Vertical_dorm_279="e16d4e0b-80f7-4931-8fbf-28edb51c7622",k.Vertical_dorm_28="4ae704da-a08e-4a47-aab5-7a1195e72f22",k.Vertical_dorm_280="ac95d496-521e-43fc-9ee5-5cb1c8d96fd4",k.Vertical_dorm_281="66cbb8a4-4189-4e76-a763-f80e028889fa",k.Vertical_dorm_282="bf72de50-6886-437d-a1d3-cbc64acc9095",k.Vertical_dorm_283="3a368014-8053-4247-a0a1-8985c68bac88",k.Vertical_dorm_285="bd9a2c82-2962-4e9e-bf71-299d41ed8e28",k.Vertical_dorm_286="c430e7cf-7fc9-4e71-af19-e7deec2c67e9",k.Vertical_dorm_288="c0445e84-df8c-449c-932f-d2b7fb299d5e",k.Vertical_dorm_289="79fe6544-9492-4865-8a49-949dafb41ef7",k.Vertical_dorm_29="ee0f916f-006b-44ca-9cd0-2cc54d04b3e2",k.Vertical_dorm_290="6c699154-8d65-4d18-ab7d-dbaa00f30d7d",k.Vertical_dorm_291="9cbda97e-930a-4ea5-b2db-b92d101dc7c7",k.Vertical_dorm_292="a897c25c-09ce-4856-9ffd-cbb1090c95da",k.Vertical_dorm_293="02e57672-5e18-4693-8f78-b3ce663b5087",k.Vertical_dorm_295="a619c211-28be-40e0-965e-2ef65e68f7d7",k.Vertical_dorm_296="800a8da1-3823-4711-bef4-b5acfaab9ad4",k.Vertical_dorm_297="9bd484ca-4114-498e-ab1a-8806d098c790",k.Vertical_dorm_298="1a4ba5d8-7ff5-4120-b775-513b1a2dbde1",k.Vertical_dorm_299="82c348f8-beb7-43a5-9919-e39fbaff8a83",k.Vertical_dorm_3="7eca12b2-033c-4658-a87d-f116f8889b39",k.Vertical_dorm_30="e189e0d2-b18f-48a9-b004-b09c7493d60a",k.Vertical_dorm_31="b1c809ce-737e-43e2-866a-849718ae4c51",k.Vertical_dorm_32="2676b6a8-b797-4054-9397-296c39ae8e61",k.Vertical_dorm_33="b2fac3b7-f326-46a6-bf3a-64707b6720ed",k.Vertical_dorm_34="541ec6b9-05fa-41e2-9fd9-b39754669894",k.Vertical_dorm_35="1cbd45d0-4b23-4683-b6f7-1407297b9279",k.Vertical_dorm_36="b2025480-bcc2-4c05-9e3e-880dd9b6e314",k.Vertical_dorm_37="2fae27fa-914a-4bc7-9920-62a474816969",k.Vertical_dorm_38="f847a7a3-36a3-4a48-8313-86c67f1bc927",k.Vertical_dorm_39="d08d4545-0927-4ebe-8fce-d5d9149d53d8",k.Vertical_dorm_4="ca84ec42-30d1-4c95-8820-989624814e88",k.Vertical_dorm_40="19d5c281-8278-476b-b0d9-d4836647e7d0",k.Vertical_dorm_41="1fba8776-b618-4bf0-aa9a-c70667628f89",k.Vertical_dorm_42="78e0323b-ab21-4a3d-a141-c68bc8c6be5b",k.Vertical_dorm_43="62740c4d-b407-4d9f-bd50-a83476a7c69f",k.Vertical_dorm_44="e82f984a-79dd-4636-9467-956c38d55407",k.Vertical_dorm_45="3bd66757-34ad-4991-841a-6fd0bf1f9a7a",k.Vertical_dorm_46="d98253c2-05f0-4b38-8d7c-a53f83da3de3",k.Vertical_dorm_47="af44d296-51c5-49c4-9195-5a86ab7d94a3",k.Vertical_dorm_48="8bdf8a5e-d93c-478b-aef3-63fb2561bed9",k.Vertical_dorm_49="afef7edf-a7dc-4d55-ae2c-a8e650a0f7e9",k.Vertical_dorm_5="fc19aa6e-ca14-4736-9fa4-8f465441f459",k.Vertical_dorm_50="515e97e8-ea7f-4a14-9610-725aa0e0be73",k.Vertical_dorm_51="a31d1198-05aa-4b24-9acf-0758f2a4bc26",k.Vertical_dorm_52="76ac8e43-b968-4c4c-821c-615e46606765",k.Vertical_dorm_53="7c34002f-f68a-4963-a1e6-d80d0a06531c",k.Vertical_dorm_54="47db2634-c74c-463e-b37d-b9333898221f",k.Vertical_dorm_55="0e5f6357-9bb1-4c77-85f9-d3984aa21a79",k.Vertical_dorm_56="47667c6d-88eb-4bfe-86c8-7eea4191021f",k.Vertical_dorm_57="e93b12be-be1f-49c6-b0d1-c5832d935aa8",k.Vertical_dorm_58="baf1e07a-2eaf-44c6-836b-d11c7460ac32",k.Vertical_dorm_59="2f334580-76f3-4f8f-a9b4-9b67e94fa974",k.Vertical_dorm_6="8f9c2b70-1ed3-4e62-9179-e545b4799015",k.Vertical_dorm_60="cd6e0ada-123f-4856-bb18-f477c01dd418",k.Vertical_dorm_61="ad193da2-a05c-4081-8644-a12e68c62fe7",k.Vertical_dorm_62="f1c777a6-5815-46e8-803f-363fe7ac047b",k.Vertical_dorm_63="b5df5c96-ae43-404e-bd5a-0cdbc84aab86",k.Vertical_dorm_64="f6177ac0-4acb-417b-926b-ca6030c310a2",k.Vertical_dorm_65="8fb6005a-2442-4122-8b05-c90445cc7d9b",k.Vertical_dorm_66="6f9e9fb8-10f0-4d5b-8c59-52bcad41d023",k.Vertical_dorm_67="48b30297-b9b6-4bd8-819f-e125c30ce575",k.Vertical_dorm_68="c78dbe0e-05c1-4f89-841c-e9ef7be6ec5f",k.Vertical_dorm_69="27c71aa2-f460-4a39-9f52-9559e81aace7",k.Vertical_dorm_7="5205d87f-40bb-48af-9dbf-0479f2c6d1c5",k.Vertical_dorm_70="4c76ef66-ca2e-4f60-9dbe-0a25ff8fad72",k.Vertical_dorm_71="3951dd02-64fa-4789-8abf-ee803ebe3bba",k.Vertical_dorm_72="46a401ab-bae1-4df0-a416-7c594b40cde9",k.Vertical_dorm_73="80fc8684-4583-4d1e-9a84-95f340b5208c",k.Vertical_dorm_74="394a8b69-88a8-480c-9421-bd21b4070da8",k.Vertical_dorm_75="48097014-4415-4aeb-9854-17f15ea74c7a",k.Vertical_dorm_76="65b21868-e2f2-4dbf-ac20-8f7aab78f750",k.Vertical_dorm_77="83c72f0f-d8c5-44fc-a9d6-5a8e4a59ea64",k.Vertical_dorm_78="6fdc2255-d5b8-4928-8d41-c47328e0ea3f",k.Vertical_dorm_79="cccf6ac1-5ac5-4862-afca-7546232cbbdc",k.Vertical_dorm_8="6b84a66c-ab63-4be5-92b3-acbf25c0b8a9",k.Vertical_dorm_80="fe15accb-af3a-4d2b-a928-9c324e678157",k.Vertical_dorm_81="1af11a7c-2dcf-4a85-ac6f-b359993cc4dd",k.Vertical_dorm_82="d2b77216-50ce-4fc9-935c-19e9694ee7b6",k.Vertical_dorm_83="82f59d5d-3331-42d8-a411-5114f43ac0be",k.Vertical_dorm_84="a9a97ecc-2fd8-4ed6-897a-3851061b6ed8",k.Vertical_dorm_85="136b8391-3dfe-4b05-8d48-62a87f64a5c9",k.Vertical_dorm_86="cc32b316-e90a-43b2-8215-d99b45d217cb",k.Vertical_dorm_87="d200b0f1-8694-4911-9450-3bfadb1dc8b8",k.Vertical_dorm_88="60d027ec-b25b-48c0-825b-0bc1e23fa0dd",k.Vertical_dorm_89="1bf21cef-729a-4230-941a-49a3dfd2a7fe",k.Vertical_dorm_9="691d5bab-d369-4b09-a194-caef2b804f81",k.Vertical_dorm_90="202ff271-e4d2-4e53-a6b0-5dd86e2d0813",k.Vertical_dorm_91="f83b44e4-36df-42cf-b739-bb9b49cff800",k.Vertical_dorm_92="79399f78-4159-40f6-afda-fcaaff81c4b8",k.Vertical_dorm_93="45002a87-483a-4bcc-a1cd-88de4ee2dd97",k.Vertical_dorm_94="6142be54-cd55-4519-a14d-165f4dc6a3ea",k.Vertical_dorm_95="3d289d92-d9d9-439e-9e25-7e7ecd42c756",k.Vertical_dorm_96="5f4c3d9d-3a0a-49c1-9949-449c2e10d0e0",k.Vertical_dorm_97="81c4f5f4-f81d-4430-82c6-6ae746d27092",k.Vertical_dorm_98="387b91e7-9902-429d-842d-c9f068c8b38c",k.Vertical_dorm_99="0832752f-fa01-4c3b-8cf7-164fe0f8c435",k.Video_image_costumes="919a0133-db5c-44eb-8e8e-114d62ed3ce3",k.Video_image_home="acfde347-b861-4145-a49d-e88c36feda03",k.Video_image_member="9dad2fb4-1a18-4f2c-a6ff-b07367e38520",k.Video_image_rifts_back="352c528a-ef80-49ee-b629-f0ff97542b2c",k.Video_image_rifts_icon_keys="b6a8cd5a-b26f-48fe-b92b-e77ab4100d72",k.Video_play="c1825d00-0ced-49a9-abf1-c873d4a5e9dd",k.Vignette_general_map_expert="43b45520-fc4e-4531-aa40-e0ee68c57d61",k.Vignette_general_map_hard="82f5c9f5-b43c-4249-a1ec-f3721e889e60",k.WW_StateChallenge_Game="bfb9a1f9-6d66-4d69-9c00-41f7f8a766e5",k.WW_april_fools_2025_thumbnail="8e971ea0-6889-4242-a582-11d3b30600f5",k.Weekly_challenge_1="34c58806-2ce5-4f2e-aa9b-2e53d6e0b36f",k.Weekly_challenge_2="fdf890a3-057a-49b5-9256-de3269e47ad5",k.Weekly_challenge_shine_backing="7f338ae8-c043-4734-be42-1f7ecf16d250",k.Weekly_challenge_shine_backing_member="6778d26b-1231-4832-9be4-8eefde04a1d8",k.Wheel_of_wonder="4b31ad29-c418-4625-9d57-7b06b3cbaf76",k.Wheel_twilight_icon="bb01e396-cbf0-4078-b212-445c893ed864",k.Wheel_twilight_large="02464262-44a8-42e0-bbbf-ef26b3f6a709",k.Wheel_wonder_icon="13dfd8b0-e3ca-4cc4-a66e-a8b3ced3ebd6",k.Widget_gold_back="51c72f62-a752-4a56-b038-98e079f4f71b",k.Widget_gold_back_bricks="f76742e7-bd29-4c79-a76a-7bba552477c6",k.Widget_gold_divider="d777af4b-db68-4669-aeb0-063c7f848c3a",k.Widget_gold_pile_prize="013f6874-f71f-4b11-a60b-6999804f4bc7",k.Widget_gold_price="86765b15-0362-4c47-add1-a42124bcc1b8",k.Widget_gold_price_left="79ac84dd-a3b2-4db4-8d9e-2c6d95fa96f4",k.Widget_gold_price_mid="5b517dd7-b973-45c0-ac96-a65e50d2b0f0",k.Widget_gold_price_right="b82d4600-62cb-41b1-817f-1df6c5cf8be2",k.Winterfest_launch_modal="842fafd7-c60f-43af-bd39-d49ae395aa9d",k.Winterfest_rewards_01="af9a1f7b-021b-483b-8e6c-7de6fd50a3ea",k.Winterfest_rewards_02="46602525-9c07-49b7-9c19-efea962fc3f3",k.Winterfest_rewards_03="8447b388-b147-4353-a17f-16692152adf5",k.Winterfest_rewards_04="b0f6da2c-46d4-4e0e-9e08-6a531500f4d0",k.Winterfest_rewards_05="56e66928-d290-4ce9-85ac-b9ff8d79df17",k.Winterfest_wizard_watch="09a80e11-4db7-4e52-a37f-de83041ad656",k.Wiz_bank_title="340045b4-cdc3-487d-aaa0-96deebabe71c",k.Wizard_watch_bts2024_teaser="faac7228-8936-4d29-97e3-64d2e96a7a55",k.Wooden_background="545a93c1-285f-4950-a832-63ca191215a6",k.Ww_StateChallenge_5="3c286c9c-1ab5-4439-8e70-03afa6ab71e8",k.Ww_accolades_trailer="887bea12-bc52-494a-a399-bf81c5d80938",k.Ww_bts_dragonisland_2024="913762a9-42b4-4d18-bd4d-20fcb62b465c",k.Ww_cake_set_may_2025="e94f19b1-84d4-464e-aabe-49ec0fa1b82a",k.Ww_charged_levels_200="93fe2f00-9a6a-4634-8534-941aca50707b",k.Ww_content_creator_august_2024="d00b1772-a934-4d4e-a3e7-8e2dc281b302",k.Ww_content_creator_nov_2024="5b943a5e-7753-4c56-8de8-4585741120d8",k.Ww_content_creator_oct_2024="a2e4644c-ee92-45d2-b0c6-e601ab8274ac",k.Ww_content_creator_sept_2024="7a86cd31-b2ad-4e9a-91b7-947240416b6c",k.Ww_crystal_caverns_removal="b6092d6f-1268-4dd2-a297-8c721a2ad57f",k.Ww_dragon_isle_launch="47dcf2b5-2100-49d8-8b0c-2a5456c48149",k.Ww_duck_outfit="b5d934d2-96e1-4d5c-a032-79133d3ffcf4",k.Ww_holiday_challenge_2024="acc77611-a4d8-4664-91c1-719c08ad67ef",k.Ww_liveops_rifts_astral="65e9d0f3-8a0a-43e1-b0f1-13ad30f2ac09",k.Ww_liveops_rifts_ice="a554242f-8367-470e-9821-938c3706d375",k.Ww_liveops_rifts_launch="31143655-2560-4d09-b4c9-32af56271797",k.Ww_liveops_rifts_plant="fc309643-bce9-40ad-ba95-31a82ba0f51b",k.Ww_liveops_rifts_shadow="f1b5b25d-d3a2-4bbe-a687-24ffb3c455d0",k.Ww_liveops_rifts_storm="9d1ff203-b71e-4a6f-a607-47885c3a0b6f",k.Ww_liveops_rifts_water="9aa88ab2-7440-463d-920d-5b76b54cb1a7",k.Ww_new_rifts_sketches1C="a8c898e2-9da7-4876-8d4a-990839b736e3",k.Ww_pet_merge_trailer="072c2ad1-157e-4bf7-ba7d-904ed8c8d6be",k.Ww_pet_merge_trailer_thumbnail="fbc0b60f-e674-4ffd-917b-35212c11a38f",k.Ww_petgear="b0a6ed75-2840-49c4-9738-b2fc31f41c54",k.Ww_pumpkin_end_of_festival_currency="a7338b3f-e1cf-4c8c-b01d-d0bb683240c5",k.Ww_pumpkin_end_of_festival_mailer="e097150c-9efe-42be-b933-ffe1faa631ef",k.Ww_starlight_end_of_festival_currency="323f474a-a01d-4818-94d4-2da1f037d040",k.Ww_starlight_end_of_festival_mailer="696a79a9-f4d9-4e06-8704-7ffce5da3ea1",k.Ww_summerfest_2023="c1640824-bad1-4143-aef5-ca06fbb9df7b",k.Ww_teacher_gift_april_2025="c09b77ec-9549-499e-977d-26a26b832069",k.Ww_teacher_gift_august_2025="969c9b05-fbff-460a-ba54-eb36296fea6f",k.Ww_teacher_gift_december_2024="32ffc932-684d-4c56-9df2-826c5c709f5b",k.Ww_teacher_gift_december_2025="5d4fb53b-451e-47f6-9006-626c37f84ea8",k.Ww_teacher_gift_february_2025="31299ac9-6b3b-45ba-aba0-0c3cf7fdd8d1",k.Ww_teacher_gift_january_2025="20a59f79-bcf8-4435-8c28-e22be9d33ce8",k.Ww_teacher_gift_march_2025="628d0fc6-00cc-4ee2-9671-09acd6d0f896",k.Ww_teacher_gift_may_2025="5295c7ee-f93e-4aa1-ac46-bef119faa252",k.Ww_teacher_gift_november_2024="4408638c-32a3-4479-bc69-f73b5f4ac872",k.Ww_teacher_gift_november_2025="32131d0f-9a2c-4a6c-93d1-36dbd0623155",k.Ww_teacher_gift_october_2024="67cab5ac-de5a-4bef-9faf-a4db2dc02338",k.Ww_teacher_gift_october_2025="985f1997-58ba-48f9-bff4-6b19b4624f34",k.Ww_teacher_gift_september_2025="bb59a890-f3fa-4c47-ab7b-658ea7a9024b",k.Ww_teachers_gift_october_ww="d7996e56-aa66-48c2-96e6-880bd101c8d3",k.Ww_thumbnail_yt="ad3cbafc-69ca-482a-a59f-6abfb9f548ed",k.Ww_thumnail_lucky_outfit="29f649cd-8f02-46a1-90a6-b1a29f8a9c0e",k.Ww_treasure_track_MoonlightDance_2025="9e1ff95d-fc4d-40fb-ba8f-a0686d801ed9",k.Ww_treasure_track_SunkenSecrets_2025="7d2efa5c-e260-4e56-b1a0-aadeb9a3ebc7",k.Ww_treasure_track_frozenfairytale_2024="6ceaac4d-0074-4936-b42d-8e82051cb414",k.Ww_treasure_track_jurassicbbq_2025="bc7ce956-36dc-45b7-bbbc-fdbc6e5ad5dc",k.Ww_treasure_track_magicoin_ultra_member_oct_2024="41778e01-c761-4051-b3dc-1031becfc7d0",k.Ww_treasure_track_skywatchgarden_2025="67a3c12c-90ac-4c91-bb64-d129df4c2137",k.Ww_treasure_track_starry_2025="da1b7617-0d9e-476a-8dad-6ece6cd845f8",k.Ww_tt_frozenfairytale_launch="36d9dd8c-9f51-4ea7-bf9f-494f5a648ff4",k.Ww_wiztober_2024_launch="20be5f3a-f57f-4304-b9ce-f9e5df1ba235",k.Xp_stardust="30b137dc-a6aa-418f-962e-364e0a9a1e8f",k._2xAeros_CurrencyWeekend="ae0ee6e8-2546-477b-b15b-51a69203320d",k._2xAll_CurrencyWeekend="594c2395-310d-4705-91de-8ba86b8eb11b",k._2xFlorians_CurrencyWeekend="aa591044-2139-4287-aa87-818bc00e1b3b",k._2xHotHots_CurrencyWeekend="414d8714-0f19-450d-b5eb-64e4c203ee54",k._2xShivers_CurrencyWeekend="49aa8220-6446-4933-947a-4d289af0add4",k._2xYars_CurrencyWeekend="8500d1f6-4fff-485e-b81d-ea7f071bf6fd"}(F||(F={}))},40671:(k,B,U)=>{"use strict";var F;U.d(B,{z:()=>F}),function(k){k.Elemental_boost_fire_spell="5bbcc44c-5720-41e1-ba71-2effa464effa",k.Elemental_boost_ice_spell="da3aaa9a-6dfa-4ae7-8954-6ce61f25f90c",k.Elemental_boost_physical_spell="afa961f8-0910-4203-98b3-3e69de77af8e",k.Elemental_boost_plant_spell="561fefa3-e6f4-47fb-a2a8-8b0c92a5ac6f",k.Elemental_boost_storm_spell="74449f65-2638-4670-9bc4-b6f1c02fa1df",k.Elemental_boost_water_spell="d36ed671-3746-4244-bb83-2a82f36350e8",k.Spell_astral_roar_single_spell="e192dd7b-1ae1-4b91-bc70-43a6f583a9e4",k.Spell_astral_starbeam_aoe_centered_spell="885d144c-b538-4f2f-a585-3d20a385d5d8",k.Spell_astral_starbitblast_aoe_individual_spell="d87c22d9-bf05-4968-aab8-6f99413caffb",k.Spell_astral_starbitblast_giant_spell="f154e6d5-c162-43de-93a9-c2534a092ced",k.Spell_astral_starbitblast_single_spell="1fafdd06-8c59-4283-b94e-910b61c330e5",k.Spell_fire_charclone_aoe_centered_spell="a6a69fa6-9f56-4b51-8fa9-8e3053a4d67b",k.Spell_fire_fireball_aoe_individual_spell="a1909588-fa2e-4699-9a6b-cfcfea077bb1",k.Spell_fire_fireball_giant_spell="3058d0d3-95d2-4563-8a47-915ca83a622b",k.Spell_fire_fireball_single_spell="0d5c7b56-b0e2-410f-ac84-5dd9079046ec",k.Spell_fire_roar_single_spell="450b5ea8-63db-4dde-83ca-b573fb43da5e",k.Spell_fire_slurpysnack_aoe_spell="667bb5d8-48f5-414e-9731-eecdfc22e623",k.Spell_fire_volcannon_aoe_centered_spell="6d460931-7303-4959-9679-8c63619e70ef",k.Spell_fire_volcannon_aoe_individual_spell="976c7414-85b7-48b6-afde-2ccb52bfabda",k.Spell_fire_volcannon_giant_spell="665df55f-0004-4a23-a970-403b81d67f69",k.Spell_fire_volcannon_single_spell="f7b09db8-0430-42de-a944-71ff3a0abce6",k.Spell_fumble_spell="a50a9f99-eb44-4912-b9e8-8a5ef9386b35",k.Spell_ice_bokcrack_aoe_spell="b8a0da8e-85e4-4a45-90b9-601a47d14fad",k.Spell_ice_chillout_aoe_centered_spell="ae3bcdf6-59e2-4495-860f-501c9400432e",k.Spell_ice_chillout_aoe_individual_spell="ba185370-1a63-43bf-af3e-3d256c24c102",k.Spell_ice_chillout_single_spell="b8326cef-6972-43eb-a555-33e18e3a5777",k.Spell_ice_icicleshard_aoe_individual_spell="dc028f7d-75f8-4906-b078-6b5c81add333",k.Spell_ice_icicleshard_giant_spell="6d5c5c54-5d57-42ff-82aa-09447e6745a4",k.Spell_ice_icicleshard_single_spell="9fc69df0-0fad-4f87-9e66-a2dd6ab45dfd",k.Spell_ice_roar_single_spell="8b313158-2a1f-4072-b61d-2ae8f96ff650",k.Spell_neutral_aoa_aoe_spell="c0f8af45-63da-4aba-bb5e-bc405a366090",k.Spell_neutral_heal_aoe_individual_spell="83ea47bf-5033-4f39-8b87-1c717e96585f",k.Spell_neutral_heal_single_spell="b798d1ac-68a8-42e0-ae9b-0b7d6e0779f5",k.Spell_neutral_nootrevive_aoe_spell="501d41e5-2efb-4576-af3f-0a9cdc9c8bd5",k.Spell_neutral_rescue_single_spell="dd50c820-a96b-4725-8e0d-78723d179d1c",k.Spell_physical_blunt_aoe_individual_spell="794416ec-b96c-4528-8078-a5f8d8859526",k.Spell_physical_blunt_giant_spell="9396e920-5ab2-494b-9aa2-7d088b3ae8a3",k.Spell_physical_blunt_single_spell="7d19ab90-8c76-4753-8973-e7dc6570e7d7",k.Spell_physical_pierce_aoe_individual_spell="866f0251-188a-4d98-a12f-59bd09cf18de",k.Spell_physical_pierce_giant_spell="e052dbf0-ff21-4879-8401-b4c7a3801839",k.Spell_physical_pierce_single_spell="4e349303-34c7-467a-91fe-7e2fe9b0d6f1",k.Spell_physical_piercingvolley_aoe_centered_spell="96f0094b-c481-4d93-b41e-7cc5adedb770",k.Spell_physical_roar_single_spell="b99c3b17-7c4b-4acc-b5ad-80f231bedb90",k.Spell_physical_slash_aoe_individual_spell="a41733ba-6531-491b-88bf-15dfcd94e0f9",k.Spell_physical_slash_giant_spell="44dc8d16-17b3-4f25-b0f3-9433e7526275",k.Spell_physical_slash_single_spell="2f81ed22-7176-4393-94a6-5826ebff84bc",k.Spell_plant_florasfury_aoe_spell="0ba749c1-0c1c-4e0f-ae85-94661f0b075a",k.Spell_plant_forestshurricane_aoe_centered_spell="da58c5a2-c69f-4003-8d1b-e4a4f351ab1d",k.Spell_plant_forestshurricane_aoe_individual_spell="946494ca-87bf-4905-9007-9e13f456cf97",k.Spell_plant_forestshurricane_single_spell="15aa963e-6abb-49ad-b9fd-e0bd3a32e032",k.Spell_plant_leafswarm_aoe_individual_spell="d88176c5-816e-429a-8895-4bd488d020b4",k.Spell_plant_leafswarm_giant_spell="1bbadb3b-529f-43ed-bc4e-86b305cfa459",k.Spell_plant_leafswarm_single_spell="fc8b7c65-774b-4038-9a8a-ec75d00f4064",k.Spell_plant_roar_single_spell="08ee90b7-baa1-4d77-a637-36593e9dbfef",k.Spell_shadow_crystalcrash_aoe_spell="19569d20-bfaa-45c3-86fe-e39432153271",k.Spell_shadow_darkpourtal_aoe_centered_spell="093d2ca6-b00a-42d1-aacb-e0cb3c805498",k.Spell_shadow_darkpourtal_aoe_individual_spell="1ef54c51-57e1-44bd-8e03-88157a47cbae",k.Spell_shadow_darkpourtal_single_spell="6bf09377-4569-4c6e-b2af-5fef84fdde13",k.Spell_shadow_darktwister_aoe_individual_spell="30cb3c5e-7141-48a0-b384-75cab3504c25",k.Spell_shadow_darktwister_single_spell="7ae5cfa7-8700-4bf7-b5e5-08a862b3ecfb",k.Spell_shadow_grimburst_aoe_individual_spell="2c29d85f-ca51-42f5-b586-c69b23aa0a10",k.Spell_shadow_grimburst_single_spell="91b9be57-da56-45e4-8115-3ae3ff62432a",k.Spell_shadow_kidnap_single_spell="420e2ffe-9c85-453d-bdf3-c6b27e3483d7",k.Spell_shadow_nova_aoe_spell="4f36fae1-545d-4d31-894b-c91d5c719af9",k.Spell_shadow_phantomscall_single_spell="373f9feb-480b-473d-a04b-3104f5827c3c",k.Spell_shadow_roar_single_spell="bcd82f80-62cd-460d-891b-995b6108f6c2",k.Spell_shadow_shadowdrain_single_spell="d78f44a5-78f9-4a52-a040-83b48cbb7193",k.Spell_shadow_shadowshock_aoe_individual_spell="1ac4463d-0aef-4bc2-820e-723d6b2d9ec2",k.Spell_shadow_shadowshock_giant_spell="c136c280-f165-4942-acb5-e83fb88fe2d5",k.Spell_shadow_shadowshock_single_spell="b497caa5-6b0b-42ba-8cf3-6b5992d7e275",k.Spell_shadow_shadowsurge_aoe_centered_spell="dba024eb-70a2-4468-828d-21daf700731e",k.Spell_shadow_spikestrike_single_spell="bf8025f2-af70-4162-8376-642649aac4e6",k.Spell_shadow_yetismash_aoe_individual_spell="7644193c-9553-465b-a44c-c1a7d15337dc",k.Spell_storm_bennicrack_aoe_spell="6b052295-b165-4dbc-adc1-1b4c7bdecee7",k.Spell_storm_broccocrack_aoe_spell="1f2d228f-d7c4-434b-824c-8b362c98c567",k.Spell_storm_ioncannon_aoe_centered_spell="5b050ee8-65b8-4801-8478-a2cd4c66b6de",k.Spell_storm_ioncannon_aoe_individual_spell="c1236b7a-c630-4586-8ee1-45a6c5cf2b99",k.Spell_storm_ioncannon_single_spell="94ce657f-08af-4844-99f1-63a0b7682a9a",k.Spell_storm_roar_single_spell="9cd9a22b-84a3-4966-9041-899d850ed39a",k.Spell_storm_sparksphere_aoe_individual_spell="da961641-11cb-47f8-b5b4-4963a91a48d8",k.Spell_storm_sparksphere_giant_spell="8553e321-4a07-42d2-888b-d8cbfa7efd0b",k.Spell_storm_sparksphere_single_spell="6174afe9-1236-458a-b5cc-561c062e58b5",k.Spell_water_bubblesmackdown_aoe_individual_spell="58e6955b-d927-4a51-8af7-08cfdaffa839",k.Spell_water_bubblesmackdown_single_spell="8921c962-3415-4a45-8e5b-c2438c8fff1e",k.Spell_water_downpourtal_aoe_centered_spell="15085252-9b5a-4db2-80c5-f68f6d727978",k.Spell_water_downpourtal_aoe_individual_spell="f3a9466e-a8ad-4339-a0cb-11a4b52bef22",k.Spell_water_downpourtal_single_spell="a1d41abc-7e22-4c81-a24b-0ec71e54ead4",k.Spell_water_evereinvigorate_aoe_spell="a4740f29-a5ba-4ab5-a9f5-7399afd53f35",k.Spell_water_roar_single_spell="90b18ab9-e197-4992-8d92-9b84a1afee9a",k.Spell_water_waterburst_aoe_individual_spell="7079bb4d-cf8b-463a-a81a-641cf4562197",k.Spell_water_waterburst_giant_spell="d35b5322-ee84-4db4-ac36-82451d84b486",k.Spell_water_waterburst_single_spell="bb3d88ab-3512-4666-ab09-71a7d9c5c0e2",k.Status_effect_DOT_astral_apply_spell="540bfa68-ec34-486f-9c80-390ae7253445",k.Status_effect_DOT_fire_apply_spell="0128a7c9-5524-4c5c-8758-62e82196f6a7",k.Status_effect_DOT_ice_apply_spell="96234675-d098-4839-a60e-5f5c623c83d1",k.Status_effect_DOT_plant_apply_spell="45e779d0-9d0e-4309-b37f-ed8b1a4cd590",k.Status_effect_DOT_shadow_apply_spell="c3bc95db-5945-4b24-af2f-508817e3d54f",k.Status_effect_DOT_storm_apply_spell="ce99bf0a-41fb-4223-902b-b6c72749c93b",k.Status_effect_DOT_water_apply_spell="cc8d7e93-10db-403f-86d0-1edd088f9f22",k.Status_effect_bomb_astral_apply_spell="0efb1a0c-9662-4bc7-99a9-68b66a2c1ea9",k.Status_effect_bomb_astral_trigger_spell="8128fc7e-a127-4f59-b774-18be39f63ea4",k.Status_effect_bomb_fire_apply_spell="87dc5f6f-f04a-44f2-ba16-bb55ca7399a5",k.Status_effect_bomb_fire_trigger_spell="8408d92f-6aef-4e9e-99c6-4f336ee3904a",k.Status_effect_bomb_ice_apply_spell="a714fd55-c211-48a2-baa2-4f1a1c373d86",k.Status_effect_bomb_ice_trigger_spell="4887dcc2-4fe7-4686-b317-f530c2d3772f",k.Status_effect_bomb_plant_apply_spell="13672321-ceaf-4c38-adfe-b914add31039",k.Status_effect_bomb_plant_trigger_spell="e2e14ff7-f2fd-45f3-a731-f2e4bed2a332",k.Status_effect_bomb_shadow_apply_spell="5a369764-6a13-441d-8822-d5f7185e265d",k.Status_effect_bomb_shadow_trigger_spell="3e5392ad-f878-414c-b72e-b0e72313d23a",k.Status_effect_bomb_storm_apply_spell="91d02d77-d48e-4989-80b4-57ff1975c090",k.Status_effect_bomb_storm_trigger_spell="7bf3ef8f-db0b-4218-b76e-055ef4963c65",k.Status_effect_bomb_water_apply_spell="19016b3b-ad8d-4bf6-aa2c-d418629eb39d",k.Status_effect_bomb_water_trigger_spell="a9f74422-8857-4118-ade5-b48718332004",k.Status_effect_buff_apply_spell="da139c19-1214-4176-b393-f8c889390a9d",k.Status_effect_buff_defense_up_apply_spell="29f02217-46ab-4e0b-b0fd-4a13fcd69913",k.Status_effect_buff_dodge_up_apply_spell="eeaa22c1-8bda-4b9f-8c41-bcdfa562f2b3",k.Status_effect_buff_power_up_apply_spell="cde4f01e-1760-44b4-874c-6a4ad9b6b597",k.Status_effect_buff_regen_apply_spell="ea4493fe-e19e-442c-b9d6-7e078727f2b8",k.Status_effect_buff_sustain_spell="5f052ed7-0516-4f76-bfe0-7721ad2869b8",k.Status_effect_burn_apply_spell="6e958385-90a2-4988-b43d-dfe90229d433",k.Status_effect_burn_sustain_spell="1bcc50f9-922c-4fe8-ab2b-64dcc627c18f",k.Status_effect_cleanse_apply_large_spell="2320ccbe-4abc-471f-8aaf-190a7208699d",k.Status_effect_cleanse_apply_spell="7bfa3569-e780-4e7b-bd1b-1a267263459b",k.Status_effect_confuse_apply_spell="386d7dbb-acfa-4da2-9bb9-c053ed6e5ec0",k.Status_effect_confuse_sustain_spell="2a89835d-109f-45d6-80cb-a6a22ededbab",k.Status_effect_debuff_apply_spell="99796020-0b23-4b15-a0f4-3fa0ce40c112",k.Status_effect_debuff_defense_down_apply_spell="e83c14bf-01ae-4e5f-84ac-83331b07a3cc",k.Status_effect_debuff_dodge_down_apply_spell="8bc75313-e76a-4040-b180-c9b132047c66",k.Status_effect_debuff_power_down_apply_spell="b1ce7a8a-249a-4922-9eae-ccfc033488c7",k.Status_effect_debuff_sustain_spell="04bc4eb4-e53a-417a-921f-fafc7efbc0e8",k.Status_effect_drain_crit_damage_apply_spell="27f0571f-0e01-4766-8213-559b7f7a6cda",k.Status_effect_drain_defence_apply_spell="f0d4841b-4f22-4f71-9593-ae320fb3c204",k.Status_effect_drain_dodge_apply_spell="ba92fa55-bf9c-4837-b885-eeb5ee482e9f",k.Status_effect_drain_luck_apply_spell="88aaccb2-564d-446b-b835-76a9a42a97aa",k.Status_effect_drain_power_apply_spell="d359a6e8-e906-43e9-8476-7a2374209cc5",k.Status_effect_frozen_apply_spell="632a1acc-3df5-4acd-97f0-66d5289c1491",k.Status_effect_frozen_release_spell="c05cc4aa-4dc0-411d-8386-c3e39aaccf59",k.Status_effect_gift_astral_apply_spell="271e3524-d3b4-4377-999f-70e2bfa9138a",k.Status_effect_gift_fire_apply_spell="5747a15b-7a86-4bf8-bd95-7eaedcea34c4",k.Status_effect_gift_ice_apply_spell="236f62c1-cb68-45ce-91d1-a908b2ded738",k.Status_effect_gift_plant_apply_spell="893c52b1-e1ff-4054-948d-5e87c6cfb1be",k.Status_effect_gift_shadow_apply_spell="4db64d03-12b2-42bd-9dcf-67a4dbeaedac",k.Status_effect_gift_storm_apply_spell="d284483c-90cb-491a-954d-9a391757ef66",k.Status_effect_gift_water_apply_spell="a224e219-c81e-484f-9fe5-c138b7535b0e",k.Status_effect_heal_apply_large_spell="e076407f-9a40-4c71-9989-334e249cc285",k.Status_effect_heal_apply_spell="9c810416-2d76-4e26-8eb6-7e07fa84847c",k.Status_effect_heal_sustain_spell="d0dd8443-2fe5-464b-8ef7-7d16ee639a20",k.Status_effect_shock_apply_spell="65c7292e-f03a-46c3-a06d-cfeb2fadd668",k.Status_effect_shock_sustain_spell="080bb8e4-e5c6-44d5-9ae9-dcb7f6862173",k.Status_effect_taunt_apply_spell="485218f6-73c4-4a28-ab99-b3ef0a47c9a9",k.Status_effect_taunt_sustain_spell="dc96dcba-aa6c-451b-bf5d-27ad138590b8"}(F||(F={}))},56942:(k,B,U)=>{"use strict";var F;U.d(B,{Q:()=>F}),function(k){k.Bomb_effect_astral_json="f79e6354-4a0d-40ac-afc2-1a8509dc275d",k.Bomb_effect_fire_json="83b8c22c-b2f1-4832-9cd8-74872cc894da",k.Bomb_effect_ice_json="a191cb15-90d0-4790-8fe9-d4cb97eda293",k.Bomb_effect_plant_json="ed1c4e0a-7541-487f-92ba-290f39ba2d54",k.Bomb_effect_shadow_json="bcb857b0-6aae-46d7-abc0-3a6f99fd48bd",k.Bomb_effect_storm_json="03e13363-9c6c-475e-91b0-c6b7367b809d",k.Bomb_effect_water_json="c58222ab-9543-4aed-b61a-474f44e71480",k.Complete_badge_bounce_json="9883fa9b-a115-4a44-b51a-8cac39021661",k.Default_boss_01_json="6641bd0d-4885-4e85-9a20-e6cafadd4883",k.Default_boss_02_json="1966e939-2cbd-41eb-abe8-42c4ce4f9cc4",k.Default_boss_12_json="81158eaf-bf57-495d-a0c3-6678804b8a56",k.Default_boss_13_json="d97dc42a-26ff-490f-9b46-7f74a7424db0",k.Default_boss_15_json="c63e5eed-61aa-49a9-9db3-b4aefa07ff9d",k.Default_boss_16_json="ba559492-71ec-487b-b495-0379e36d8d08",k.Default_boss_17_json="8aa6d5d5-e39c-40ae-9c38-dca8d7e955e7",k.Default_boss_18_json="9f0d7322-6d15-41a3-b225-858fa0f8a4bd",k.Default_boss_19_json="e3fc8115-b84f-4181-9eb1-b2270b4c7902",k.Default_boss_20_json="7d5ce573-9c2d-4f0e-aa4b-073769e18fac",k.Default_boss_29_json="10983823-f156-40c9-a4d3-4d2619e2b0c8",k.Default_boss_30_json="444b3bf8-0dc6-47a5-92bc-7bd1daf1b53d",k.Default_follow_10_json="9d6a6657-4aec-4d2d-993f-ddde651fce44",k.Default_follow_11_json="685e27aa-3ef9-4429-afe1-5ab401ab0aae",k.Default_follow_130_json="d77761c5-8c40-47b1-be3a-64d836bcf819",k.Default_follow_131_json="faadfb50-8060-4942-ad8e-a55a2eea9149",k.Default_follow_132_json="ab970d4e-8c8d-4aa8-88bd-1c9ed7ca824f",k.Default_follow_133_json="319921ec-a111-4ff4-92fe-93b3973284df",k.Default_follow_138_json="0f372293-26b7-4ca2-9a92-16d22614542b",k.Default_follow_139_json="fe775569-5be5-4c3b-897e-4713849ac493",k.Default_follow_140_json="6b894787-24da-47b9-b5a9-c4e64e2dd276",k.Default_follow_141_json="a0ca8055-8dae-42a7-b32a-35e73dce0cbf",k.Default_follow_142_json="6ee0e017-8b33-40ff-8b1f-8fd6f4c2b7b4",k.Default_follow_143_json="c715d2c3-553d-467b-8276-88d3a2bbbea8",k.Default_follow_144_json="c5f13da1-4d4c-4ef2-873e-b3aa0d4c3bbe",k.Default_follow_145_json="a88476bb-f551-4d26-ae10-fcf1b21f1547",k.Default_follow_146_json="8013c9f2-fe15-4bb6-bb5a-5e8aa4295117",k.Default_follow_147_json="5def7c69-2437-44fa-b23b-a57e6eb9655b",k.Default_follow_148_json="74d49feb-5622-4a4c-88a2-f75edeaf3976",k.Default_follow_149_json="e2c44f6a-0829-4453-b992-58db361ad4a8",k.Default_follow_150_json="3803d2a3-7eac-4a04-b1bd-a61ee0cf3140",k.Default_follow_151_json="6f416453-ab40-479e-b342-9b33a58ca354",k.Default_follow_152_json="ebe14e48-a974-4374-aa9c-19a07bc069f8",k.Default_follow_153_json="956b991e-a9df-42fa-937a-f08a29cab226",k.Default_follow_154_json="ef3ba4ef-0c18-472b-bc27-0c582f590f2e",k.Default_follow_155_json="3395c09d-6352-46d9-ae1b-43e0cc81f776",k.Default_follow_156_json="bf055f0c-95be-481a-b2cd-59ad54cbb6ac",k.Default_follow_157_json="7fd800f7-765f-4cf8-8ec6-2f6a3062416a",k.Default_follow_158_json="2c74f8b2-9b10-4bdd-bb81-287a0193b086",k.Default_follow_161_json="67dc9c14-e923-49d8-9efc-ccdbd863ed1c",k.Default_follow_162_json="821d412b-bc15-4469-9127-771c7b5eb00b",k.Default_follow_163_json="82e7a172-e029-4092-b56f-06084fb75643",k.Default_follow_164_json="a8911d7d-dc04-47f5-80a6-57f7e2fe9346",k.Default_follow_165_json="5cef885a-b3e9-41cc-92df-fd0ae8033fe8",k.Default_follow_166_json="2264bd98-1d90-4406-9848-7437bba96d96",k.Default_follow_167_json="9c9e2e48-a449-4646-8af1-b20b32d157e5",k.Default_follow_168_json="da0dd9d6-623d-407b-8893-b2bd0817279a",k.Default_follow_169_json="d50fa489-e4ae-4d54-bba7-0420468b8ee2",k.Default_follow_170_json="436e517a-b278-429d-aadc-0919845fcd82",k.Default_follow_171_json="b3316f24-27c4-4619-b7e0-7924a6bc9c74",k.Default_follow_172_json="81c8c12d-7e43-4469-b187-8476140a9010",k.Default_follow_173_json="facb1a11-7204-4899-a020-421f9f993102",k.Default_follow_174_json="6d5f7fac-666e-4b1d-9064-12d8687d3dbe",k.Default_follow_175_json="05d716a4-bfe6-4d86-a03f-49358962fff2",k.Default_follow_179_json="f5a13809-8934-4285-989f-56371fd6b8e9",k.Default_follow_181_json="1a888673-3f09-4493-893f-f9c81fa7ed4c",k.Default_follow_182_json="31516f8b-fd55-4f91-8184-c76f33689723",k.Default_follow_183_json="73d9fce6-26bf-444d-8791-b48c60dd80c5",k.Default_follow_184_json="3986d3c2-288c-414f-bda6-1b0319db6964",k.Default_follow_185_json="2617660a-a46b-4586-961c-354b2219cb36",k.Default_follow_186_json="0b5c3792-f709-4d1e-b118-9747585d15ad",k.Default_follow_187_json="d4f6ec08-e352-4d8d-a07a-8b2c3caaf30e",k.Default_follow_188_json="089993f6-17e0-4b18-a3b7-46c3a6c916c8",k.Default_follow_189_json="e7c7a049-427e-41b8-a2af-89b059494b6f",k.Default_follow_190_json="3f92de11-eebd-4f0d-a85e-2ca259384c2e",k.Default_follow_191_json="c63e0d92-5e24-4465-bd34-a8f539cb2d2d",k.Default_follow_192_json="5b24afc6-d3b3-41c5-aeac-7ffbc4ff0068",k.Default_follow_193_json="21fee41e-1718-4c2f-9e89-e68f38be2671",k.Default_follow_194_json="cf86409c-50ca-46d1-b2af-0f120ad4ccde",k.Default_follow_195_json="7e65c08f-0b67-4c63-a396-3a78d9411268",k.Default_follow_196_json="5a3c9b69-f34c-4225-b5ba-bb3a27f4ceb0",k.Default_follow_197_json="a9e5982c-d0a9-49ed-923d-eb145d994a88",k.Default_follow_198_json="14dd21e6-ff12-46e2-8050-374b2e476d8a",k.Default_follow_199_json="eb867431-4414-4729-9f01-0d731bd8f0c6",k.Default_follow_200_json="2409e805-8189-4323-9612-b602bd7327c5",k.Default_follow_201_json="4375dcfa-5852-4528-b7ce-d9fb129899ef",k.Default_follow_202_json="4ba163f1-16a1-4e26-b467-0cd9b7493c81",k.Default_follow_203_json="ce7eaea6-6275-48e2-a4b3-7563e9acd9fb",k.Default_follow_204_json="1055dbf9-ad80-41f2-abaa-5b24dc442fb6",k.Default_follow_205_json="14b043d1-bd31-414a-897f-f128052b83d5",k.Default_follow_206_json="012acfb8-9d0c-45f8-ab16-6d4d1c595ad6",k.Default_follow_207_json="13cb1dc2-0094-4abe-81dd-30ce177b0885",k.Default_follow_208_json="58f3bae9-d3de-4265-bcdc-7a4ee5053f0e",k.Default_follow_209_json="e9d75a8d-f2c5-4cf2-8017-e867d8d825c4",k.Default_follow_210_json="bf7b2a12-52fc-48dc-897a-58ffad5aae8e",k.Default_follow_212_json="7a710b0a-a905-4e41-a1bc-79b851e57725",k.Default_follow_213_json="dbf6b502-980c-4339-9fd8-a6b55aa8bde4",k.Default_follow_214_json="a931f88d-bd54-4532-bab9-c2f2444ef93c",k.Default_follow_215_json="bb56d5f6-c19b-4613-917f-c73885cca1d5",k.Default_follow_216_json="21c935c4-9233-4187-b83e-c268b9fd1369",k.Default_follow_218_json="d2c1c116-c13a-46f1-b124-bbf1430512f2",k.Default_follow_219_json="16b551d1-36f0-4146-9bb9-3d6730113ab8",k.Default_follow_221_json="505287e3-06b5-4643-b52a-916979ae051c",k.Default_follow_223_json="1da43ad8-ea99-4303-a0e1-1b43bb8ef634",k.Default_follow_224_json="ab7402cc-8307-4cb5-be3f-3eab246b01c5",k.Default_follow_225_json="200daa22-f9fd-4e78-8b1a-5d7cba4bbfe7",k.Default_follow_226_json="c5e2fd13-bea2-4e5b-808a-f94c864d24a9",k.Default_follow_227_json="f11aca4f-e74a-488b-a19e-562e0d84c4cf",k.Default_follow_228_json="a3fa03e0-ee78-46a2-abe0-994aa2d1f623",k.Default_follow_229_json="0a76db91-4e9f-4341-b6c5-20d8f41ebce8",k.Default_follow_231_json="0c4a84e7-4dd0-47db-8848-589a01604aca",k.Default_follow_232_json="ba45ec16-7b46-49ce-84b3-7e562e828cca",k.Default_follow_234_json="17cda462-6245-4f82-91ca-361a62b6466d",k.Default_follow_235_json="314f51de-af45-4902-a0ca-dd8a95ca7bbe",k.Default_follow_236_json="5aa88ad6-3c10-427e-aacb-03816a2b3a37",k.Default_follow_237_json="0d011df6-0779-4a49-b224-62c94b682722",k.Default_follow_238_json="3f64e268-1912-4f74-acc7-d28deca57963",k.Default_follow_239_json="edfe5ed4-2527-4300-ae8e-312ac4275b23",k.Default_follow_23_json="431b6872-b460-490f-9760-c15e5971c9ea",k.Default_follow_240_json="1165bc40-4f57-473b-8a07-707fb1575022",k.Default_follow_243_json="9947a713-76c0-41e2-a13f-a9bb08012d41",k.Default_follow_244_json="f080c9fe-7c93-4db3-b93f-13775f3238f4",k.Default_follow_245_json="04f8fd38-8e5d-44cd-9446-5b9f343ecdab",k.Default_follow_246_json="614a2593-e427-4cb7-b311-e960fd417495",k.Default_follow_248_json="f431cb42-f275-4791-ab44-647f3169cef0",k.Default_follow_249_json="f4f17e9c-3372-4377-bb53-02ee226f7e9c",k.Default_follow_24_json="15ccda48-b8a7-438c-a814-72e98b38133e",k.Default_follow_250_json="14775416-3e8c-4207-a847-adce48793504",k.Default_follow_255_json="2d7202a7-935f-428a-8d6d-4b58113f411b",k.Default_follow_256_json="46831a0f-f62e-41a7-b363-c0c5bc004bb3",k.Default_follow_25_json="6d373933-fc6c-4806-a668-03bdc99f5ba9",k.Default_follow_261_json="37082550-6911-49a4-9486-6d5ae03a72ae",k.Default_follow_267_json="46bc2852-e0af-42fe-9392-ac4464d3ae90",k.Default_follow_268_json="acd9b994-2b73-41e4-bfef-09f8874654fd",k.Default_follow_26_json="8b217448-7a21-4c29-9703-642552108f10",k.Default_follow_272_json="bebdc381-2608-468d-a6fb-07f587b1fc8f",k.Default_follow_273_json="3ebe19ba-923c-485d-99df-384aed74b967",k.Default_follow_274_json="6e67a026-e550-44b4-8f87-341579cd6f2e",k.Default_follow_275_json="df7b8352-b38b-4518-a511-e403b0e96d65",k.Default_follow_280_json="87adb678-8e05-4546-8c61-483c1a035850",k.Default_follow_282_json="28d5d2dc-17c6-4ace-b973-016c90f7dc15",k.Default_follow_283_json="1933923f-3578-486d-880c-91a8e3068357",k.Default_follow_284_json="1d7d2e6d-b4f4-4f6f-8f94-6026494c2d5e",k.Default_follow_285_json="a7c1e7bc-4001-4946-a862-7ebfa5d96c50",k.Default_follow_286_json="1c55e6d2-ced1-4b3e-8f88-f0c3183795ba",k.Default_follow_287_json="4e52f4d2-8620-4293-902b-304a1e387ac2",k.Default_follow_288_json="9bde4d09-c8f8-4d27-acc0-25e4b7ed2c63",k.Default_follow_289_json="7068fcb5-453d-4d6e-961e-ac17c629d3e2",k.Default_follow_28_json="38412256-86af-47e9-83f7-1442c56f9e27",k.Default_follow_290_json="c1e9c559-9138-484a-b736-a0c575835c42",k.Default_follow_292_json="f395611d-7b71-42a2-99ba-576b06127f59",k.Default_follow_293_json="074ec936-d950-4c1f-a2b5-c0ebde422aea",k.Default_follow_294_json="8f0df3d6-e8bb-4ccf-afbe-fec513ca3504",k.Default_follow_295_json="ed3334fd-be0b-450c-936b-a9b6f6540c4e",k.Default_follow_296_json="20f86486-8f52-4adb-a1a4-365e60bff751",k.Default_follow_297_json="4ca6f7db-520e-4e9d-8cbb-6bc5d4997886",k.Default_follow_298_json="73951032-2b84-42f0-991f-541ed1787b3f",k.Default_follow_299_json="807f9a65-4c96-45dc-a9f5-50d04f4efe32",k.Default_follow_29_json="e5cddbca-9b79-4237-a7ec-ec975f9a8000",k.Default_follow_2_json="6ec07a84-5b46-4281-b4b2-155085069b6c",k.Default_follow_300_json="f348efbc-24e3-4695-9dc6-e470cfd31aca",k.Default_follow_301_json="d9a72147-70a1-4d52-835a-e128c400dcb8",k.Default_follow_302_json="989b5d8a-69b1-4c5a-b829-99e1607ce4c6",k.Default_follow_303_json="7d33f083-6426-4dd9-a1f6-ba8e436088d9",k.Default_follow_304_json="bd1cc115-16a1-4198-a44c-486238ea8f2d",k.Default_follow_305_json="a0dcf86c-89d8-4ef7-b98b-55a60430218a",k.Default_follow_306_json="e171eb5f-4a1b-46ec-bb3f-66ae0f782370",k.Default_follow_307_json="832ab3a5-c4a7-4c85-8bcf-9d77791f8b53",k.Default_follow_308_json="7e6e73a5-8562-4c68-a7f2-304c9aae3bdc",k.Default_follow_30_json="89791950-954d-4e88-8150-c17deec21b09",k.Default_follow_310_json="fbb2f47d-1c4a-4c79-9ba5-7ba2e4e7052d",k.Default_follow_311_json="c7d830e2-c253-4d37-bbdb-5959553a8441",k.Default_follow_312_json="210b80b4-6636-47c8-87b6-4771e823cf88",k.Default_follow_313_json="b08d0e7d-fc93-477a-8d71-e218bed5a0d7",k.Default_follow_314_json="183beb26-f44f-4ce7-a570-9b201d7590b0",k.Default_follow_316_json="ad9de204-0da8-48a5-8ac0-1e98951ef2c2",k.Default_follow_317_json="610c138c-2d09-4cd7-b52c-397e73eefd11",k.Default_follow_318_json="910d63f8-70b1-4c77-8957-c4cefaa0e1d4",k.Default_follow_319_json="861d8331-0467-4eef-98f8-f3aa0f2a09ba",k.Default_follow_31_json="b6066e74-f44c-42b3-9478-26c713d6ae32",k.Default_follow_320_json="fc165dc2-13e5-42af-8c7d-7962272f66e3",k.Default_follow_321_json="b212ec78-d66f-46fe-880a-71c3a866f6a7",k.Default_follow_322_json="b8ec147e-0a2c-4126-9389-7d8335adeafd",k.Default_follow_323_json="6aeadad1-6845-411a-b212-20bcbe5415dd",k.Default_follow_324_json="458a95be-ca8e-4c13-a0b8-0b10934e8f72",k.Default_follow_325_json="506353d7-fa18-4dbd-aaf7-5a068ec0886f",k.Default_follow_326_json="9b026670-bba1-4612-b52e-cd7a6ea59e79",k.Default_follow_327_json="dad931e7-d377-4d1d-ba3d-d2282f36622f",k.Default_follow_32_json="c027dd0e-1ab0-461e-b7cd-2e5f14fe0b43",k.Default_follow_336_json="4d5f4828-3fad-4f78-ad67-0f24a57aa0f4",k.Default_follow_337_json="70be8da4-70a6-4b73-84e7-222be432314b",k.Default_follow_338_json="6e186191-6729-4603-ae53-9bec9884c076",k.Default_follow_339_json="cb763b15-fa09-4689-9cd9-7730bc995472",k.Default_follow_33_json="697bd7a2-fe0c-445f-97c9-b52de1934d29",k.Default_follow_340_json="41c958ed-d23f-4be0-b0b2-643a9c28680a",k.Default_follow_341_json="5a574a22-e44a-414d-91f7-d6757b6c6011",k.Default_follow_342_json="a759c57d-b4be-4543-85bf-02768e7d101c",k.Default_follow_34_json="fb106cc6-ab99-4bfe-867c-77c6ce615920",k.Default_follow_36_json="e0490254-4ef2-4bf5-97c7-73ab24943bdc",k.Default_follow_37_json="f67eddf2-2372-45b7-988e-55c6e85b8ef8",k.Default_follow_3_json="742cc114-f459-43ab-8c36-8bdda3b935c0",k.Default_follow_4_json="bd3499c4-24e3-4b79-a23b-2ddca680e41b",k.Default_follow_5_json="7ac79e67-c6d5-48dc-b146-1747da08f306",k.Default_follow_6_json="e2af56e2-4226-40c5-abd5-43bafac28471",k.Default_follow_7_json="4353a799-36b7-454d-9682-f1f85e3fe650",k.Default_follow_8_json="e8ac9e3e-9c60-4fe7-a47c-3dc23681f65f",k.Default_follow_9_json="547ccda6-f17b-419e-8e97-c35dd163e658",k.Default_titan_2_json="470f7170-7cec-4362-9820-c385249f1b79",k.Default_titan_3_json="01e799f0-3426-4e26-ae5d-ac4fc550a298",k.Default_titan_5_json="7a9abdee-235e-4828-9446-62121596a965",k.Default_titan_6_json="f7a51671-f150-4600-a315-c524aaed246a",k.Default_titan_8_json="9dccef03-69f1-4d43-bf59-1ed4c5fe5dcc",k.Defense_down_json="c12e6d1c-c193-445a-a821-0e3fddfa2ee6",k.Defense_up_json="3c7157c2-50a7-4ae6-b0b0-6cafada14417",k.Dodge_down_json="ca8c56c3-480a-4d49-8750-31be7aa73e27",k.Dodge_up_json="fe9e9444-2d4e-4281-8d4d-6a8d1d760a64",k.Fire_boss_18_json="788fbdea-721d-4aac-be6a-d47912e3c9df",k.Horizontal_dorm_151_json="66c741e4-4cfb-4507-af4d-0f393872ae63",k.Horizontal_dorm_164_json="d4a629c7-3fe8-4659-af60-942df2b114e3",k.Horizontal_dorm_202_json="03bcbc59-6c2e-469a-a794-21b28f957289",k.Horizontal_dorm_204_json="ee8efad4-5a1c-4e23-9c1c-773c2be4906c",k.Horizontal_dorm_206_json="6bbf21af-6add-428e-ba23-686abcad4ab7",k.Horizontal_dorm_242_json="c1f8b0ea-6f57-4de2-8250-560d8100f37f",k.Horizontal_dorm_251_json="b9bf90f7-8031-43e0-a0b6-f06ec7eddb1c",k.Horizontal_dorm_254_json="f8153816-dc7e-43b8-a293-b087e6411e68",k.Ice_boss_18_json="06bb221f-7d00-491c-99fc-db5407a5ccb7",k.Lootbag_widget_json="93245de8-14b4-4d6b-9d52-089b46beeb8c",k.Math_streak_widget_json="88fa5114-4166-4103-8554-6f662a502199",k.Merge_01_json="b498bc36-e523-4621-a534-7a3443d6b033",k.Merge_badge_shine_one_json="dbccfac6-8342-41fd-bc24-b846bd124977",k.Merge_fx_json="26b93228-86bc-4931-b4e2-f97e6cb3e77a",k.Merge_green_energy_json="bb1a0a7e-a275-44c4-86da-85c12864bd63",k.Micro_cube_json="97854ff8-5a10-4480-aed2-b94755a45c66",k.Mythics_tab_portrait_bloom_json="eaf3000a-003a-42ab-8552-450f350e8777",k.Npc_harvey_json="00208e38-f979-4e35-83fe-7ca795108a8f",k.Npc_sir_vey_json="b1819a81-3ba2-4adf-a793-59f54a6c0c06",k.Parent_attach_membership_ad_json="b65de452-7367-445b-936f-20f3ac2b5776",k.Parent_attach_ticket_json="b961a979-b87a-4f69-b178-985c6b409122",k.Pet_glow_rescue_json="fb561fa1-93f5-437b-8dd1-4aeccef988ef",k.Plant_boss_18_json="3636c520-643b-404c-84f6-8dd2b48ea0d4",k.Player_raster_json="50aadd37-b1e0-4efc-978f-e57467c9123d",k.Player_raster_upscaled_json="37715ae1-b2eb-45bb-83b7-8df8abee1e79",k.Power_down_json="0a434d30-526a-4e4f-ba33-ca3b41199b8f",k.Power_up_json="c5d053bd-a84e-45c7-8780-6bc749d80e11",k.Rarity_level_fx_json="ecd48633-08bf-49e8-b84f-2b055b7d05c8",k.Read_to_Merge_1="473a0ddc-73b3-44d8-83c5-4a6b85eb9b50",k.Regen_json="ad7f7576-3d6e-447a-ad98-699f37e62598",k.Spine_DOT_burn_json="18a2e9ec-aa7f-49f3-8dd2-900a890542f7",k.Spine_DOT_drench_json="71e02717-99bd-46e4-91db-c0127908cede",k.Spine_DOT_frostbite_json="d334cad5-04a7-481b-b677-d143718186d7",k.Spine_DOT_gloom_json="3e7e4125-8708-4776-8f90-e5694be74227",k.Spine_DOT_shock_json="4601c446-6660-4279-b928-ce19016fb79f",k.Spine_DOT_smite_json="d7fcf746-76bf-48d4-9a03-da592405d34d",k.Spine_DOT_venom_json="691e44c3-9d79-4965-baf1-3550e012ec85",k.Spine_FTUE_bloom_json="bba8c652-581b-45d2-b8f4-279e68f2dd40",k.Spine_HUD_glows_json="e36629a3-dcdd-4cff-b5c9-8ac6415a01be",k.Spine_academy_landingdoors_json="f3c81778-432a-489d-a145-5dc718e503b4",k.Spine_academy_tower_progress_ui_json="2c9eac95-b2df-4867-8ca2-d3b28f4552af",k.Spine_academy_unlock_json="df4dc2af-964d-4e81-a85c-bcdf684a9236",k.Spine_academy_window_glow_horizontal_json="a4666f61-7010-4dd2-b525-9418156a3c13",k.Spine_academy_window_glow_vertical_json="9bda4a88-8211-47e9-8cb2-888154d39739",k.Spine_academy_window_light_horizontal_json="ee247462-91b1-452c-96bf-53c9e8b758dd",k.Spine_academy_window_light_vertical_json="292b4836-8013-4608-b2f1-bdc84b6daefe",k.Spine_academygh_addkeystone_json="1f458501-f219-4bc9-b89a-d132bd1dc94f",k.Spine_academygh_centre_json="d2048b6e-53f8-49c8-ab5d-daf5bd671048",k.Spine_academylanternglow_json="46058c99-e242-462a-8ea1-421601708905",k.Spine_academystairlight_json="32803951-ad63-456b-b23c-3fb3d5f92f62",k.Spine_add_modifier_fx_json="7a2907a2-9728-492c-bccf-4f7eb21ed25d",k.Spine_adventure_boss_chest_json="c6cfb1be-76fc-42df-976f-1a046c132123",k.Spine_after_school_widget_sparkles_json="9981495d-ab66-4402-8a9e-1c9852aeb04f",k.Spine_after_school_widget_stamp_json="f03fa9f3-7416-46c3-af03-27a43ee64822",k.Spine_aoa_multi1_json="d8535e44-8377-42bf-908e-a40aa68061fa",k.Spine_aoa_multi1_teal_json="5b646e33-356f-49b3-b225-9c53244da7f4",k.Spine_archive_door_glow_json="eb9d33b0-e2d7-4e0d-a517-755b891a109f",k.Spine_archive_lantern_glow_json="f7015f7d-e28d-4b43-a2b7-96b979bad64a",k.Spine_arena_centrepiece_json="15e52cad-58d0-4aab-9aee-20e3fa1621e5",k.Spine_arena_emerald_button_fx_json="2068abad-0deb-4256-bbd6-6dcc2b10110f",k.Spine_arena_fountain_parallax_json="c65de5c2-712b-4c4a-9db7-1fe07bf340e2",k.Spine_arena_gate_json="1baf2106-968a-4525-92da-63867a64ed36",k.Spine_arena_icon_chest_fx_json="ce1f289c-8680-4f35-b327-bad23b7ad263",k.Spine_arena_marble_button_fx_json="078b2fb8-7f93-422a-b434-9ef8bb87c8a4",k.Spine_arena_progressbar_json="bf096a86-a0de-4b7b-9426-b3a67fae01c3",k.Spine_arena_shield_bronze1_json="29145c85-e5f3-434d-8263-9d44adc2f429",k.Spine_arena_shield_bronze1_small_json="35cd4743-91a5-4a09-bcef-2bff5f1ea241",k.Spine_arena_shield_bronze2_json="b4364cab-e9c4-4597-88f6-02ce3d2ef423",k.Spine_arena_shield_bronze2_small_json="f944d568-2f18-4fea-bf15-2ffbb87c7186",k.Spine_arena_shield_bronze3_json="cd48c308-f566-4052-835c-86d269d10b48",k.Spine_arena_shield_bronze3_small_json="bdada53c-6d5a-4f85-94ef-9406e2e57af9",k.Spine_arena_shield_gold1_json="f8344c71-53f7-4a2c-9549-85d18f8e66df",k.Spine_arena_shield_gold1_small_json="7a5c7388-9e5e-49ef-99cd-d4c30e3c53e6",k.Spine_arena_shield_gold2_json="8133b67b-8d57-4b3a-ac84-d90d2cffc012",k.Spine_arena_shield_gold2_small_json="6e8fe35f-892f-498e-b124-726d1b3a05cf",k.Spine_arena_shield_gold3_json="02e5cbf8-a25d-4657-afdc-00ebab9aa2b7",k.Spine_arena_shield_gold3_small_json="6a8dac74-fd32-4db6-9d9e-596296e74f76",k.Spine_arena_shield_silver1_json="21a7fbd0-230a-4849-940c-8b38fbb8376c",k.Spine_arena_shield_silver1_small_json="db481e15-e638-4b6b-b5ca-5ca54a48bfed",k.Spine_arena_shield_silver2_json="6aec1caf-fad7-49f0-90a6-b77fc6ad953b",k.Spine_arena_shield_silver2_small_json="d7f268b4-d914-4a75-8231-cf45b47a7d16",k.Spine_arena_shield_silver3_json="9558908c-e73f-4e91-875c-55b571cf3696",k.Spine_arena_shield_silver3_small_json="7ab4a118-2ee7-462e-90ed-b190fd92761d",k.Spine_arena_sign_json="37c6a5ae-040f-493f-b4c8-7d2cf092dee9",k.Spine_arena_torch_bronze_json="a6db17be-465d-4f90-842a-499c1b5f540c",k.Spine_arena_torch_brown_json="d3f0cb3c-cc33-482b-9b49-77f804565469",k.Spine_arena_torch_gold_json="eca7da27-8afa-477a-b08c-8b3fa58504d3",k.Spine_arena_torch_red_json="5008ac6e-3433-4b88-ba21-0692f0faa4dc",k.Spine_arena_torch_silver_json="8827f855-a3b7-4908-95b9-06ddd283ae4e",k.Spine_arena_torch_t3_json="80541a50-f2a0-4659-924e-272258d25f03",k.Spine_arena_trophy_case_json="a63b6b98-fcfc-410c-bdfa-d21a07499ac1",k.Spine_arena_vs_json="19e6ca2c-88db-4426-94d9-545bc8e6fd0c",k.Spine_arena_vs_small_json="a46bc7bf-6e7f-40cd-a682-75f183e5a253",k.Spine_arena_waterfall_json="e2a152ce-25fa-43a3-bfc2-38312a4b1404",k.Spine_arena_waterfeature_json="657a2ab2-3b07-4798-8972-70ce3ffbdce0",k.Spine_astral_eg_single_json="aeabcc46-5b7b-4d2e-818d-d964b5e144f2",k.Spine_astral_multi1_json="a700963c-1877-4710-a6ba-fa604a2ddafa",k.Spine_astral_multi2_json="c664d4bc-5c15-49aa-a0b8-e598e68d91a7",k.Spine_astral_multi3_json="9c3c31a0-0fc0-44b5-aca8-dbf05a636d1c",k.Spine_astral_multi_create_01_json="d24cf569-5fa7-48fa-9931-5e39432984db",k.Spine_astral_multi_impact_01_json="d5518ce5-c0ca-4f67-a9f3-30444433925c",k.Spine_astral_multi_travel_01_json="defa73d2-d0e5-4b8b-a9c3-670af1750ab4",k.Spine_astral_single1_json="eb371c42-131e-4938-b335-2de7e762ccc1",k.Spine_astral_single2_json="3c5cc7f7-2696-4b0c-b977-b7d374f228aa",k.Spine_astral_single3_json="da7e8a6f-7a9e-44c4-88f9-f87476c22685",k.Spine_astral_single_create_01_json="29b14c1c-aca4-492e-9f9d-e1e98fc63056",k.Spine_astral_single_impact_01_json="15e96d72-1133-4711-8bbf-b39de128a6fc",k.Spine_astral_single_trail_01_json="6362f973-c62b-46a7-88b6-b1cc51b0845f",k.Spine_astral_single_travel_01_json="15631df4-9dd3-4f1b-9d3e-c31a2c8cb05d",k.Spine_balloon_skywatch_json="d7a047ef-fb83-49f3-8bdc-c4abcefaf87a",k.Spine_bam_aoa_button_json="ec9679ec-949f-45dc-8709-2725455473de",k.Spine_battle_academygh_keystone_json="d2607e94-ddfc-4856-a185-d9201f48565d",k.Spine_battle_fire_boost_json="a53da5bb-8128-472c-90fb-d992038795ef",k.Spine_battle_ftue_pointer_json="faa1ab60-74ea-4e2c-912e-369050ac7570",k.Spine_battle_ice_boost_json="032866b7-fe80-455b-a7ca-c20b1625b8f1",k.Spine_battle_map_smoke_json="653e1193-56ef-4740-a1d5-318ae2751f9a",k.Spine_battle_mini_magic_pip_json="a4ab289d-6736-45ab-8839-e52cbf4a8347",k.Spine_battle_mp_drain_json="e06d2a18-8c01-42b0-aa17-b9cd08fb9be4",k.Spine_battle_mp_refill_json="1d09dd2e-d6db-439d-98c1-b1a75b244fe8",k.Spine_battle_physical_boost_json="f1dd085f-cfb0-4d60-9189-5b6aabeaa813",k.Spine_battle_plant_boost_json="f999143d-e03b-4688-ad0d-1826d8a754e0",k.Spine_battle_storm_boost_json="a3890edc-f6de-44a9-a0e5-7e4b9d990d1e",k.Spine_battle_targeting_arrow_json="525d0de7-2eed-43c2-a38d-35418c21e4d4",k.Spine_battle_tint_fx_json="c4ed4156-fa5f-400e-8e83-b22f0ed28809",k.Spine_battle_transport_boss_purple_json="643b3999-96dd-4c55-a1cf-f494dac832b0",k.Spine_battle_transport_json="db957a7a-c2b0-4b41-9cc0-1a83a23da13c",k.Spine_battle_transport_purple_json="5eea6f2e-cca7-4c00-a6ba-7ae1f0513418",k.Spine_battle_water_boost_json="a4dd6b84-cffc-43b7-8d13-5f200873a06c",k.Spine_battyworks_json="4855051d-3fef-44e6-a4e2-3e83f6244049",k.Spine_best_streak_fx_json="c158061e-497d-4afd-a18c-6e690d1b9eca",k.Spine_bloom_rescuebtn_json="157feffe-9d49-4646-905c-c8816b81a76b",k.Spine_bonfire_unlock_json="55c08ab4-5c23-4b5a-ac6a-6d83998db983",k.Spine_boss_cebollini_shadow_json="e7b7fd9a-7619-4e5c-b77a-a61d01cd7b74",k.Spine_boss_gerald_json="d6d19e0f-bbb8-4044-bda9-bfaad9f616bd",k.Spine_boss_gerald_shadow_json="8c8384c2-8a31-4d8e-9308-570cfdb43d8f",k.Spine_boss_marionette_json="0baf166f-a8d6-455a-9233-15ce0259a566",k.Spine_boss_oldone_shadow_json="d48c87b6-26b3-4fba-9b5d-f8d72399328f",k.Spine_boss_poppet_json="f5f1a17c-04cc-4db8-a8e2-9402d1bae77e",k.Spine_boss_shadow_effect_back_json="e1d07d66-c314-4bc3-8e83-103adcd2f621",k.Spine_boss_shadow_effect_front_json="37ebd369-13db-42d0-bdfa-ebb0bacda46f",k.Spine_boss_shadow_effect_json="b0f341b8-549a-462b-b2e0-0dc14f25a0df",k.Spine_boss_starlight_json="1ad0e0fa-9684-447a-9aa5-de6ecb01f566",k.Spine_boss_stormystorm_shadow_json="b97554a3-6348-46e1-a4e2-b564a13d5674",k.Spine_box_skywatch_json="802f3edd-dfeb-4d52-ae9d-2b16563a93d9",k.Spine_casteffect_json="a0f5e0f4-1552-402d-8e53-a14f086d0e96",k.Spine_casteffect_teal_json="4f18ae8f-a3c2-468d-9975-7d8923b544ad",k.Spine_catapult_impact_json="db9ae837-8164-4132-a2d9-d45e47662d89",k.Spine_catapult_json="dad8c8f0-06df-46a8-9670-b025d8d540f8",k.Spine_character_shine_json="7ed698dd-5282-4025-a0c0-cf6f49fb32e9",k.Spine_charged_inbattle_visual_json="883aa852-f5d9-4202-ac1e-1762be5b8525",k.Spine_charged_level_bar_json="1241b3ca-0e36-4dd1-abeb-459de56d4803",k.Spine_charged_level_petbook_json="288bf660-d6cc-457a-a969-76c8b2080190",k.Spine_charged_visual_json="2ffa56ce-b58d-46a9-bd5a-a6531ce817d1",k.Spine_chest_bunny_json="fce7c866-75ae-4121-93fb-97ee5e69571e",k.Spine_chest_fox_json="919ea28d-f3d1-47c0-b09c-6cd76d7d6d2c",k.Spine_chest_mcoins_sparkles_json="8d0be954-a1ea-4bf9-a10d-ea5278bc010a",k.Spine_chest_member_json="9b579137-3dfc-4552-80b5-359cae5e3a32",k.Spine_chest_moon_json="bce82458-c803-4722-84d2-b70c2ce5283a",k.Spine_chest_nonmember_json="14ddc430-c87c-48de-9080-db40a85f24f2",k.Spine_chest_shipwreck_json="a6b92dd4-fbf1-4298-8eea-335e641982ee",k.Spine_circle_bloom_1_json="2f964bc8-ff47-4b08-9395-6f2398254222",k.Spine_claim_TT_json="8d600dae-bf52-459c-bb0c-cdac5fb7ecef",k.Spine_claim_currency_json="b94f8151-0014-4980-aa3c-6ba242c3b91b",k.Spine_claim_rarity_json="5b92e8ff-2f71-45a9-98e1-97a0a8dcdfd6",k.Spine_coins_trail_json="4fa76c24-8f49-475a-94f7-6de47d89996c",k.Spine_coop_crystal_json="ebebb548-49f8-494e-b9f0-422a829bad65",k.Spine_coop_multi1_json="971bba7b-ae0b-4776-96ce-4a94bf70a282",k.Spine_coop_single1_json="77f91e9f-e2ea-4f5f-ac67-f05b04be1740",k.Spine_crate_bonfire_json="fedc0f75-1e86-4f19-9a1e-9073d15c70cf",k.Spine_crate_firefly_json="ca0e226b-9979-4e54-ba27-4441b429539e",k.Spine_crate_json="8095e819-5bbe-4ee1-bcbc-47536422c051",k.Spine_crate_shiverchill_json="7fa1ff40-1ed0-4a67-90e1-4d0bf74fed3a",k.Spine_crystal_clumps_json="5643d965-7eca-4818-a693-cf580d19bf4a",k.Spine_crystal_multi1_json="7a04c78e-5d27-4162-8257-ef4e3e3122f5",k.Spine_crystal_multi2_json="fccc291c-15d8-400e-878c-fe44e503925a",k.Spine_crystal_multi_aoa_json="dd49e8c6-6c14-49ed-9275-eba7f9d233f1",k.Spine_crystal_multi_travel_01_json="40cc5c90-b72e-42c5-97ab-91412ca4d193",k.Spine_crystal_single1_json="34c44ff2-93ee-42be-9b3e-04de56b69d63",k.Spine_crystal_single_create_01_json="77ba1c7a-cf35-43b2-ba9b-56f15dd4bfda",k.Spine_crystal_single_impact_01_json="f827f9ae-7613-496b-90e4-7c07cd2499ee",k.Spine_crystal_single_travel_01_json="1e4491db-6bff-49f8-af1a-2b94dcbc9e2e",k.Spine_dailylogin_notification_json="4bb3d541-b80c-4db6-b12d-9eafecf0fd52",k.Spine_damageindicator_json="12778d46-418a-4503-be81-dc8a94fabc04",k.Spine_difficulty_indicator_json="adf97fec-2865-449d-b258-27df258199d7",k.Spine_dragon_astral_json="d87e8e31-351b-44bd-8f01-5f535d986817",k.Spine_dragon_fire_json="c678da05-c3a8-4f96-9c02-54eedfb190bb",k.Spine_dragon_ice_json="926845eb-544d-426e-8bd9-a8f96fad5661",k.Spine_dragon_isle_unlock_json="d7d5bbe6-91ec-4a09-ab7c-eea3278ab298",k.Spine_dragon_isle_whirlpool_json="a613c676-b272-4ad9-9974-f649a7dcdb3c",k.Spine_dragon_physical_json="87f757ca-7b88-4d01-b7df-368c3f26ad4b",k.Spine_dragon_shadow_json="46f7e2fb-c6e0-40d2-abbf-45c499753873",k.Spine_duels_matchmaking_fire_boost_json="0d4646d0-ae39-436f-949f-1382eee518f9",k.Spine_duels_matchmaking_ice_boost_json="79cfd236-5261-459d-b260-25f1acd4e259",k.Spine_duels_matchmaking_physical_boost_json="617adb0b-848c-45b5-ab04-9a11ce98fdc9",k.Spine_duels_matchmaking_plant_boost_json="c876aeea-1864-4d9a-a5b9-6be4e06c2e13",k.Spine_duels_matchmaking_storm_boost_json="a9390d7b-bbe3-4c74-97f5-2b2d3b89ad21",k.Spine_duels_matchmaking_unlock_json="4141c7b3-b11f-4032-9b54-fb38ac7ca5f0",k.Spine_duels_matchmaking_water_boost_json="028aa30a-edc5-44cf-b3ff-db39034cd9f1",k.Spine_dungeon_board_json="327e691b-fa54-4e73-9ae7-7920fd36bc12",k.Spine_dungeon_rail_json="adb29b58-3f8b-47de-b390-42a10a5ae547",k.Spine_dyno_unlock_json="847ca164-dd6b-4d8c-b8e1-7f8a0c903c99",k.Spine_elemental_boost_buff_json="38d8ea2d-dbb9-4895-b674-5627eef2aa00",k.Spine_elemental_boost_icon_fx_json="965dfcf8-8cc9-447f-9b0f-11d8f3c9d9ef",k.Spine_elemental_boost_spellcard_fx_json="7e8a3e98-066d-4400-8edb-3528b552ae5d",k.Spine_epic_egg_json="59f78c92-f9a6-4bd9-8d21-b2ade1af6d3d",k.Spine_epictamed_json="3f18090d-3a31-4e89-8252-a15385cbc884",k.Spine_event_celebrate_json="d4fb2e0a-7a40-4e57-8a73-198039d59739",k.Spine_event_celebrate_titan_json="da7946e8-7ca7-4b27-b415-1c10b0dfe3ce",k.Spine_event_sign_summerfest_json="13e1f775-42c9-4adf-a695-636d2dd0ce66",k.Spine_event_zone_celebrate_json="0ac41cc4-a820-49a3-bfd1-8fe75d0218f9",k.Spine_evo_fullscreen_json="e6b647ae-64cc-48e2-9443-39d3bace38f4",k.Spine_evo_gift_arrow_json="54eba1cd-b22e-4c3c-95ac-41768fae87ad",k.Spine_evo_gift_button_glow_above_json="81803b57-6814-4dbf-9115-8a5fde3e0b40",k.Spine_evo_gift_button_glow_below_json="6bcbb167-b4aa-4f41-98d6-645be0f5fec8",k.Spine_evo_gift_ui_circle_json="e08e8607-6efe-420f-9b40-0c7d9da351e3",k.Spine_evolution_indicator_json="7b86517d-c05d-4568-808c-727c848d25f6",k.Spine_evolve_mask_json="d1430358-23dd-4bbd-bc8f-7e8373304dcd",k.Spine_final_battle_environment_damage_json="c10b430a-2f9d-40d8-8b69-f67968b9f9cc",k.Spine_fire_aoe_center_impact_01_json="f30e99b4-59fc-48af-91e8-6a876b09be8c",k.Spine_fire_eg_single_json="be16dcaf-3d2e-4678-99d0-efad50e33f0d",k.Spine_fire_multi1_json="bd16e66b-1cc4-4bea-95d3-f4a9bfe6e461",k.Spine_fire_multi2_json="bdcf9859-a34d-49d0-9021-1295c42644ec",k.Spine_fire_multi3_json="8b61d47b-5aa1-450b-a885-1a787949288f",k.Spine_fire_single1_json="72e80f7b-7ab6-4a3b-9824-0a5d024afe9c",k.Spine_fire_single2_json="c4fdf118-f9d3-4a61-b1c7-c34955d79060",k.Spine_fire_single3_json="e8d1c156-5b4d-4aab-b20e-312247f6e05c",k.Spine_fire_single_create_01_json="053db46c-4a45-4c3d-ba09-82e6c53e0be7",k.Spine_fire_single_create_02_json="d7076169-a0f9-4f9f-98f0-942a90b980ef",k.Spine_fire_single_create_03_json="da097c25-22d2-45b9-9974-837523163d26",k.Spine_fire_single_impact_01_json="7f92cbaa-418a-40f9-a7dc-0656f092c07b",k.Spine_fire_single_impact_02_json="129226d2-40b1-4bbd-8890-4c9618002585",k.Spine_fire_single_impact_03_json="60e601a3-9501-43a7-83d6-117901794dd8",k.Spine_fire_single_impact_04_json="b33c30da-6d51-4172-97ad-ead89fc47a89",k.Spine_fire_single_trail_01_json="677a3bb2-d44a-478f-aa8a-b0242317d2c5",k.Spine_fire_single_travel_01_json="b3ee47f6-f482-4e5c-9221-7dd24e81f08c",k.Spine_firework_burgerworks_json="5c0b3b51-805d-4310-8932-1085ddd14b25",k.Spine_firework_cloverworks_json="513c2eae-490e-48a7-b836-aecb63726ca8",k.Spine_firework_cosmicworks_json="8f1ef3bb-9f19-4bdf-9572-40475bc58885",k.Spine_firework_dragonworks_json="88fdad23-7321-4b02-98d8-791c7760ccb5",k.Spine_firework_flutterworks_json="c4488e8a-2bcf-4284-932c-7065f6afb16a",k.Spine_firework_lagoonworks_json="0c0d2016-b2a9-4fc2-8d0d-4e719f6eaa49",k.Spine_firework_memberworks_json="d376e8ce-fcc1-4c13-9f2c-d76e88105ce4",k.Spine_firework_shadowworks_json="1828228e-073d-47bb-9e72-b97c684f4fbf",k.Spine_firework_springworks_json="a56d7d8d-ef44-458b-b052-5e52af450dc7",k.Spine_firework_sunworks_json="5c79a518-5b43-460a-b4a9-bbb3a68dfa80",k.Spine_flash_json="4f5414fd-f0f1-41b2-ae13-6a038a273c51",k.Spine_floatlingfling_zoneshimmer_json="a5c84582-fc49-462a-bcc8-a932d90091db",k.Spine_flower_bonfire_json="8efa0493-95ba-43fa-bd8b-ec2ef031b59f",k.Spine_flower_firefly_json="029a9af9-2e04-484d-b84e-5a197ce2eb66",k.Spine_focus_multi1_json="3aab50e2-40b1-442a-b338-dc034cd24cfa",k.Spine_follow_176_json="4cef956b-7390-466e-8fb9-1a8f828c3032",k.Spine_follow_177_json="c2bd3677-b7b0-4de5-ab25-355d1d66c654",k.Spine_follow_178_json="18e4a8f3-3c42-416e-9eba-3e2e1ad4a954",k.Spine_follow_269_json="3f013291-d36f-4acd-b2cf-fc662c32ed98",k.Spine_follow_277_json="65a354a1-37a2-4620-aa75-1d2c54582ee4",k.Spine_follow_278_json="1c40c2da-121e-4831-8ea9-8cb57a6cfb85",k.Spine_friendshipmeter_json="766ea634-4745-44dc-bacb-6e893c222eda",k.Spine_friendshipmeter_update_json="b0e0b28e-0b49-4c1e-8441-4d2f3b279031",k.Spine_fx_moonlight_starburst_json="444edfc0-5ec3-4dfa-a5b8-4dd203588a60",k.Spine_game_island_json="e9dacc45-9f44-4dbc-8ce3-da5167f17169",k.Spine_gift_astral_json="7e805287-a791-4022-aaff-28d7f57d902a",k.Spine_gift_fire_json="2454efbf-741a-47b3-a109-276bdcffb350",k.Spine_gift_ice_json="abd75b0d-f93b-440f-94ca-278b0a23e7bd",k.Spine_gift_plant_json="c2f17f87-7331-49ee-9cb6-27a836b0f734",k.Spine_gift_shadow_json="10543ab8-3145-4cff-97e9-bb8fb607b87c",k.Spine_gift_storm_json="b3855dae-7fcf-40a7-97b2-fa3435f505b8",k.Spine_gift_water_json="0e6429b9-6f5d-4f6d-99cc-00c0d0c416e4",k.Spine_hardmode_mapsmoke_json="8788c811-7909-497e-b859-d3d5136bdfd5",k.Spine_hardmode_portal_json="87a6c1d2-8fdb-4744-8f09-a69b080fa794",k.Spine_healstone_json="96b0612f-7e50-4d72-b1d9-f7cb78b79b83",k.Spine_heart_fx_json="523d30d7-e929-4e60-8e55-400b2d23b9a4",k.Spine_house_unlock_json="bad7baae-0533-4c9e-8d2f-06e039eaa9ea",k.Spine_huduiglow_json="96e14408-621c-49d6-87ce-25121b62d5bd",k.Spine_ice_eg_single_json="3d82eff6-9b52-4cfd-aa8b-09349761d0a2",k.Spine_ice_multi1_json="a0172658-cd5d-4195-a9f4-f3200b47b979",k.Spine_ice_multi2_json="cb5c6315-7b4c-4c8d-a864-428cb5e96d2e",k.Spine_ice_multi3_json="27e33f7a-e01e-4741-8034-debbb215b762",k.Spine_ice_single1_json="60870b48-1575-4f30-a30f-2ce3c75e0ae0",k.Spine_ice_single2_json="db1db805-47f4-400a-a9a9-0a4821869c25",k.Spine_ice_single3_json="920978fe-4b61-4033-b085-7ef1e3777eb7",k.Spine_ice_single_create_01_json="abba864b-9f11-4b2c-8d54-532833239571",k.Spine_ice_single_impact_01_json="7984be9d-ae87-429b-8ca1-a8af4867d550",k.Spine_ice_single_impact_02_json="a7ffc1bb-c323-442f-9007-9ef1ced87f17",k.Spine_ice_single_trail_01_json="0171b64e-1623-462b-a51e-ad6f0bfaca31",k.Spine_ice_single_travel_01_json="0f72178f-7962-4d3e-af04-f110649f2e6b",k.Spine_indicator_playerandtarget_json="6f08ef56-d99f-4b5e-af03-13ce3c112b2d",k.Spine_infinitytower_floorbarricade_json="4c8ed577-a603-4337-891e-8854cd493228",k.Spine_ink_single1_json="9207827c-3123-4587-bf4e-370bd01c3914",k.Spine_interact_moondoor_json="621f24b6-68a7-43b5-8348-bb24f0841b66",k.Spine_interact_sparkles_json="14f3d293-e2a5-4f21-bbe1-0329ce2fa275",k.Spine_itemcard_vfx_json="6eced39c-be90-42fd-bcd3-841362ec4c03",k.Spine_levelbar_glow_json="0254d9d6-44f3-46f5-b4ff-d0a18148f883",k.Spine_levelbar_json="f6523fa5-4145-4b7d-819b-76630e701574",k.Spine_levelstar_json="80671da1-95dc-4686-b2b0-f5cbdbb917a8",k.Spine_levelup_json="c3bb2352-226a-4897-8393-143ce872d3c9",k.Spine_lucky_loot_glow_json="c3f323d5-0822-4fc4-a4db-032a57543c40",k.Spine_lumintree_json="98e1a47c-1557-4a2a-8110-49e5d821f472",k.Spine_match_finish_json="40e67911-0601-46b0-9f92-72e303d9c555",k.Spine_mcoin_postbattle_json="bae41625-2bfb-4a7b-b19d-ffa22874bc98",k.Spine_mcoin_trails_json="04c0d21a-85c8-468c-aa0b-0f6188d5bcd6",k.Spine_mcoin_wallet_json="5fd65d1f-c664-459c-b8ad-b3befe010d57",k.Spine_member_reward_json="43df00b2-1c56-4bd6-aa35-2ae721b472c0",k.Spine_member_star_explode_json="780b41d4-d0c7-479e-b0ec-d60831421916",k.Spine_memberjar_json="1d6c72b2-7a07-4d20-8084-9add04f63cb0",k.Spine_memberpet_icon_json="2cea2b7f-1176-4d9d-9584-7bd4fffb0ee7",k.Spine_minecart_json="85271fa9-55bd-496c-b473-d1c2861b2b7f",k.Spine_miniboss_reward_json="73c901bb-ee3f-44e7-a6bd-3182afc004f8",k.Spine_mlp_chest_json="86a8d6db-9a5b-42d8-95bc-48f5b8e0a5ad",k.Spine_mlp_epic_pets_json="f518e0ce-48e1-40e4-9d1a-8c6cdde3c8ce",k.Spine_mlp_hero_pose_json="3e963b2d-c06b-48e9-9cdd-16d5706815f8",k.Spine_mlp_memberstar_json="0af66670-9c84-4ab0-b894-b72e23824aea",k.Spine_mlp_more_pets_json="f8d4822d-30fc-4223-bf1b-d1dabbf0c48c",k.Spine_mlp_pet_upgrades_json="26e45485-062b-40b8-9418-f727697b5b0d",k.Spine_mlp_sheen_json="ef3d77b3-f5df-4ed0-b320-a2122012cdcc",k.Spine_mlp_sparkles_json="3dd61cbe-f63f-4376-9684-0a09755ef950",k.Spine_mlp_stamp_25off_json="c86bb500-bc3d-4442-9a29-549f4f033a5c",k.Spine_mlp_stamp_json="dfee40c8-dac3-4632-9d87-5b117243e42a",k.Spine_modal_sparkle_json="3ae9a86f-2eab-415d-a333-934e023eb75b",k.Spine_morph_marble_icon_json="83b903ed-b3bf-4bd3-b5fe-e4e4f271bae4",k.Spine_morph_marble_timer_json="498aaaab-477b-4f05-bb30-e1facc73e3c7",k.Spine_mount_10_json="3c721d45-1431-487c-b9ff-0bc8b6ceacb4",k.Spine_mount_11_json="10859370-4929-4095-b06d-678c98fc6831",k.Spine_mount_12_json="2f5619ba-6453-4fea-bde3-92a2bef77731",k.Spine_mount_13_json="fad46bff-e617-406f-be02-5dc0f6d43472",k.Spine_mount_14_json="04912ee8-93c5-49cf-b83c-3c3561be286f",k.Spine_mount_15_json="a5028399-a693-4e34-9809-553dfc1de01a",k.Spine_mount_16_json="e2bc4806-0002-43ac-820e-fcc8eeb93417",k.Spine_mount_17_json="b20d8a27-702b-47d4-ae70-a06c0d99eb02",k.Spine_mount_18_json="65def7ac-1a0d-4955-b8f2-f64f4c2c5684",k.Spine_mount_19_json="4ff4f670-6dff-4be8-b2e4-3b1a85283f92",k.Spine_mount_1_json="b833f467-83d9-4168-b5c8-497dee6fd06a",k.Spine_mount_20_json="87410876-d340-4819-82a4-d8d8ac795dcb",k.Spine_mount_21_json="524dfce9-2af7-4463-a76c-27269be139ce",k.Spine_mount_22_json="74f71202-5891-4112-b4b3-9bd5ce1f7788",k.Spine_mount_23_json="bd051b5b-ba80-49f5-b5a6-1e8d56ee352f",k.Spine_mount_24_json="95417d2c-d040-41c6-822a-49cef14d6919",k.Spine_mount_25_json="d5ea96ac-c2dc-46af-8684-9205551ccfb7",k.Spine_mount_26_json="3210e698-c4cf-4f07-a989-ad34da581e40",k.Spine_mount_27_json="cf3adb9b-838b-4827-8d1d-277629239311",k.Spine_mount_28_json="54ce0afc-0f7d-497f-af13-961447c16f7e",k.Spine_mount_29_json="f8a12670-a54f-43b8-9f86-1f3e3464c7ea",k.Spine_mount_30_json="a6918307-90d3-4f58-b046-e7a9c031ddff",k.Spine_mount_31_json="c70d7356-02e5-43e3-a343-cfa667a6f652",k.Spine_mount_32_json="44adfbbb-d834-45ec-a7dd-8aca03147879",k.Spine_mount_33_json="41c7fdd6-2423-45b0-9fd5-b9824abe3163",k.Spine_mount_34_json="b17c3e08-e787-4e70-be98-97682fa1810e",k.Spine_mount_35_json="21d07917-c028-480c-994a-23122c2064c6",k.Spine_mount_36_json="5612a560-6bbc-4fc0-8f56-01295b535b05",k.Spine_mount_37_json="de45e292-6014-4b88-9e9b-37fbb5cad480",k.Spine_mount_38_json="ea86bef6-63ba-4e6e-b98b-3ffe3360a2c5",k.Spine_mount_39_json="7d493d78-431b-4cf9-9c58-9c4133de40c3",k.Spine_mount_3_json="82bcfa9e-da02-4efd-90cf-d58461e9e9fe",k.Spine_mount_40_json="20c4c318-6fb8-437c-816b-75b502d131c2",k.Spine_mount_41_json="b48bf963-0dc3-4020-8743-bd23ff74f13d",k.Spine_mount_42_json="711c3479-2b70-4737-9a39-48a843c7c89f",k.Spine_mount_43_json="1a428665-e2fd-44b9-9386-e2c3081e6f3f",k.Spine_mount_44_json="c38220f6-864a-42fa-bcfb-1433b020b9f2",k.Spine_mount_45_json="ebe2f5af-31a3-430d-80ce-bed170385f20",k.Spine_mount_46_json="4d6b2d01-5ed6-4db5-b659-4c1a79a3f8b8",k.Spine_mount_47_json="b59f1433-3e1e-44a3-a92a-964f96866b30",k.Spine_mount_48_json="4e18ce24-26e0-44a9-8dde-024103c2d6a9",k.Spine_mount_49_json="961dc9fa-e398-4ac4-9c9d-2f2a5aac0e63",k.Spine_mount_5_json="214ec825-564e-4b9d-a809-9057563a5aa1",k.Spine_mount_6_json="5d30646a-003b-49ee-89a7-d3e45280c03d",k.Spine_mount_8_json="efb79f9d-173a-49c5-b4a6-898f8d1eb8c5",k.Spine_mount_9_json="53940db3-697a-449f-935f-2ce6b379b512",k.Spine_mount_test2_json="438b476e-16fa-465b-aabc-8715195e7b42",k.Spine_mount_test_json="cfc64d82-4d64-4523-9f44-7c0b16f967ed",k.Spine_music_note_1_json="358c04bf-88c9-4f63-a795-11bdcd0c502f",k.Spine_music_note_2_json="6b2c2b4b-3c29-4713-9598-3b3744e9ae92",k.Spine_music_note_3_json="c063942b-3cdf-4a23-8090-d90fbeff5b7c",k.Spine_music_note_4_json="19fedcd0-0775-458e-bd04-026ff9db14de",k.Spine_music_note_5_json="71cf73db-9885-43a3-980e-c5e77abc9443",k.Spine_music_note_6_json="fa283bd0-8e86-4fb7-aa30-f2bb95c5a7b7",k.Spine_music_notes_json="474b2707-0cbd-4433-ae90-9bd863134dfc",k.Spine_mythic_button_fx_json="74e2be2d-1f59-49ea-a2ad-9741a5f32dcd",k.Spine_mythic_ending_timer_json="c35ed14a-287f-420d-8f0e-6b512a51ed17",k.Spine_mythic_takedown_badge_json="9ea6e19a-93f5-4b24-84ab-9bf77c458160",k.Spine_npc_ada_json="9fa8c8d3-0abb-49f3-84e8-ded5e01cb01a",k.Spine_npc_arenamaster_json="f7b2c99e-e5be-4c9c-9d77-ae0eba250966",k.Spine_npc_aspen_json="27a72f63-89d5-44a3-aa85-a41ca50c7607",k.Spine_npc_athena_json="8ef41540-c49e-4bed-8076-0af95d9bd989",k.Spine_npc_benni_json="197b82a5-0282-4dab-94a3-1733de20a1ee",k.Spine_npc_bok_json="4b901ba0-5e29-451f-ad46-4c3e2bb86613",k.Spine_npc_broccolina_json="9af7dce6-99c8-4255-9bd1-ede1ad13677b",k.Spine_npc_bunny_bouncer_json="3380e07c-deb6-486a-8564-7a6f3afe6d74",k.Spine_npc_cauldron_slimeworker_json="1067a438-89b2-4a9c-b961-e05f41a08748",k.Spine_npc_cebollini_json="f5822754-1119-4a8c-ac36-4a489638178c",k.Spine_npc_don_zorro_json="ce50d082-0424-4b1a-a87e-e963222735ad",k.Spine_npc_eugene_json="95cf771e-d792-4f61-9240-f56d91b50310",k.Spine_npc_eve_json="e8d355c1-ce60-47dc-89e6-e153b1847a9a",k.Spine_npc_firefly_json="f278d370-add0-4744-b9d2-b71aa74ee88f",k.Spine_npc_floatling_fire1_json="176ec55e-6e54-49bc-ac89-62219861f87b",k.Spine_npc_floatling_fire2_json="976e2b41-cd86-4eb5-bf12-0efc5d5d6241",k.Spine_npc_floatling_fire3_json="a096f0c0-6dd0-4ac2-b4f1-87c2ed236503",k.Spine_npc_floatling_fire4_json="6f1fb5e2-cebe-4e04-a9b0-12bfa60611d2",k.Spine_npc_floatling_fire5_json="a705ef12-8e6d-42c6-b9d0-4d3466d5e2f5",k.Spine_npc_floatling_ice1_json="40da6ba2-1b87-470a-95d8-0057d41ea8ab",k.Spine_npc_floatling_ice2_json="fa2f90c0-c912-4c2d-a0d1-fbd6ee86d4d4",k.Spine_npc_floatling_ice3_json="8f8968df-9733-49ba-89fe-e851c26b6fa8",k.Spine_npc_floatling_ice4_json="9fe68383-b914-4f92-b734-6f67aaf64596",k.Spine_npc_floatling_ice5_json="443a58c4-3036-4648-a741-d1f452dd9b08",k.Spine_npc_floatling_plant1_json="fa4a9a67-eed1-46b5-ad44-b72d29876538",k.Spine_npc_floatling_plant2_json="8cdf1350-70f6-41a1-983b-d742ba205b02",k.Spine_npc_floatling_plant3_json="0ea4ccc4-2120-4978-9bd2-dd493acab2b1",k.Spine_npc_floatling_plant4_json="37d251a9-9f86-47ea-865d-e7b27637c753",k.Spine_npc_floatling_plant5_json="1bb9d729-4c41-47b9-b2bb-4501fb397c5f",k.Spine_npc_floatling_storm1_json="74498d70-93f0-4bb5-8de9-269a8063629a",k.Spine_npc_floatling_storm2_json="f7f2d713-b99b-4b60-b0b3-a458bd41a69c",k.Spine_npc_floatling_storm3_json="b4d72146-bea4-4eea-9474-691c396aa7ea",k.Spine_npc_floatling_storm4_json="b122376b-ab8e-422d-89e9-97aaba2a50d6",k.Spine_npc_floatling_storm5_json="17987336-8147-4ab4-971e-a0af1b3a2d36",k.Spine_npc_floatling_water1_json="a1cd6654-9bd6-4bd6-a3f7-7d7301fbb03a",k.Spine_npc_floatling_water2_json="0ab24669-46ba-464c-96ba-91d01579c843",k.Spine_npc_floatling_water3_json="14158013-194c-496b-851e-c82e2e715546",k.Spine_npc_floatling_water4_json="191e0473-3107-450e-a2f2-77ed1cb6a449",k.Spine_npc_floatling_water5_json="e12e9c26-c9ef-437a-b052-1d21b4b78738",k.Spine_npc_floatlingmerchant_json="3cd66caf-76f6-454d-adda-97c6e8f0ae1b",k.Spine_npc_flora_json="f79c22c7-4d21-4585-9506-adcbc96be9d5",k.Spine_npc_florian_json="9b98777f-78b5-4508-94cd-ea5179393981",k.Spine_npc_foreman_json="415a2f55-28a2-4899-83ef-bc43cb706151",k.Spine_npc_gale_json="1d1859fa-e8d5-4811-9d48-420f92328f4d",k.Spine_npc_gerald_json="11570038-1097-4d08-9973-735793f49ce5",k.Spine_npc_gerald_shadow_json="ada1bcee-51bc-4f39-8610-e9362f849b8b",k.Spine_npc_gnome_boardy_json="45755707-da8e-42a6-a4bf-e878496c6e3d",k.Spine_npc_gnome_crystal_cavern_json="b72913b9-5a4e-4855-b0a3-8527a31f7d3b",k.Spine_npc_gnome_firefly_collector_json="4944ab45-b1d6-4997-a1b2-99dff780dacb",k.Spine_npc_gnome_miner_json="244342ae-5070-4429-bb49-5c578f863337",k.Spine_npc_gnome_rift_json="92d204cb-a234-40b6-b219-c48bf20bfb7d",k.Spine_npc_gnome_shop_bonfire_json="7b4dd4f8-b1be-43a4-be2d-ec160ce9af54",k.Spine_npc_gnome_shop_firefly_json="79d2f9ac-307d-4e7e-b873-56dbeacd6258",k.Spine_npc_gnome_shop_shipwreck_json="b2ee59f9-5a2c-44c8-9055-eab4aa36e437",k.Spine_npc_gnome_shop_shiverchill_json="f5ef7feb-04fc-4f6d-818e-fb29d899dc25",k.Spine_npc_gnome_shop_skywatch_json="33718387-584c-4a53-97a6-0581bda73a31",k.Spine_npc_gnome_spinner_json="52537250-d00f-46a0-8905-3d18cd7d3368",k.Spine_npc_gnome_stylist_json="cafc68b5-634d-4eae-aab1-8247e2d830f7",k.Spine_npc_gnome_traveller_json="608f0737-8e04-46e2-b783-d2c91b4a0237",k.Spine_npc_gnome_wheeler_json="73dab9f8-f39f-4e4b-80af-37997e6a9b8a",k.Spine_npc_harriet_json="2561b5ce-cc0f-459f-b2db-c443c07fbf53",k.Spine_npc_howard_json="f644301a-5c3c-4935-af4e-de914b863469",k.Spine_npc_imani_star_json="e1f341b9-ab7e-4816-b2af-ab9ad2ffa6ed",k.Spine_npc_jelly_jim_json="0677cf1a-591d-4d7f-921a-55c04d6ddb14",k.Spine_npc_julia_json="c273d20b-3a5f-4a68-97ff-9eebdf374119",k.Spine_npc_kandi_json="0b7d7314-5d76-4428-b46b-10f39d9cf529",k.Spine_npc_koi_json="d1e29513-e3dc-4138-b547-2a60cc05c7f1",k.Spine_npc_maomao_popup_json="e2cfde8c-3012-4ac1-92ea-dd7b1b2394ce",k.Spine_npc_milkyway_json="8d349571-f42c-4189-80e5-e58927aafda5",k.Spine_npc_mist_json="408d71a0-f24d-4cad-ad0e-3013b72c39f1",k.Spine_npc_mizu_json="482b8b6b-68f7-4827-a5e9-9892f914f4e3",k.Spine_npc_ninja_1_json="26dc9e59-bf55-42ae-ac70-8d2f1fbb793b",k.Spine_npc_ninja_2_json="db785ed3-04ef-4b9c-af38-aee48d179725",k.Spine_npc_ninja_3_json="6dce012f-993b-4895-9a3e-523e4398cbe2",k.Spine_npc_ninja_4_json="f73ecf6f-0b38-4d2b-a543-0698121fee57",k.Spine_npc_ninja_5_json="706593eb-a432-4005-8b26-ef3b48e0daac",k.Spine_npc_noot_json="f13056a1-c618-45cb-8009-0f18fb9092b2",k.Spine_npc_pippet_json="8e2484bc-004a-4866-a4b4-52b5ad789dad",k.Spine_npc_puppetmaster_alt_json="8d8c98f7-1b8f-4508-823d-330cce8a82de",k.Spine_npc_puppetmaster_hardmode_json="b4e874d4-a5a5-4d61-ae95-5aa7d12a2921",k.Spine_npc_puppetmaster_json="f72d225f-bfa7-4701-9af6-80798608ea5c",k.Spine_npc_selena_json="20b960c4-c4ce-47ed-b843-a71e7201ddab",k.Spine_npc_slimeguard_hank_json="8b552edf-2a99-4e0e-8da6-491f2105b805",k.Spine_npc_slimeguard_json="8e4fec6a-49f4-469f-8f45-634280fdf4f7",k.Spine_npc_slimeguard_mike_json="7b788c4a-850b-4fae-9961-a50799707119",k.Spine_npc_slimequeen_json="15f310a3-bf47-48fa-9e22-289c650d0344",k.Spine_npc_slimerella_json="13ee4ddf-6e96-4e01-af22-56e029c62297",k.Spine_npc_slimeworker_json="8f80680f-c098-4e7b-aabc-84643be8fe29",k.Spine_npc_slurpy_json="bca2d166-d2b7-4295-85df-a0cca5084aed",k.Spine_npc_swoopy_json="5fd76115-b040-4d02-b99a-b6a2d015b785",k.Spine_npc_ulla_json="0cefdc92-d8ea-4310-b670-21d644e5f73c",k.Spine_npc_verna_json="20f5c6a5-3599-4b76-9c76-0e3b2a2ef4ac",k.Spine_otp_celebration_json="4e16990f-1d6a-4b31-b386-60dfff304e37",k.Spine_padlock_json="615639df-cbd1-4af9-9c6f-4b5c5b8d5d92",k.Spine_paint_balloon_splash_json="b0bc1552-56eb-47cb-9b4a-650fd9a46845",k.Spine_parent_reward_json="53a4ddbe-de7b-4f9b-9b4d-c8028420f9b6",k.Spine_parentgoals_icon_json="36234fcb-be88-4e31-9092-ab7df4e84c97",k.Spine_pbf_magicoin_sparkles_json="9424c87f-e8df-416f-9ab1-5643ffbb7c9b",k.Spine_pet_100_json="6002cf71-b592-4639-be65-b63eba6d9a88",k.Spine_pet_101_json="ac61b90a-ee5c-43ec-a456-316657a4f2bd",k.Spine_pet_102_json="6f1371a9-4074-4e49-ac53-e390827cce1d",k.Spine_pet_103_json="39f08c6c-7220-4c50-af9e-4a7f69390896",k.Spine_pet_104_json="5970beaf-f638-40c6-afe3-97a3fc64f8b3",k.Spine_pet_105_json="22d9543c-6c9a-4ac1-99e1-2c9abec03137",k.Spine_pet_106_json="ad425b3e-8cd2-4f1c-a5ff-7ba7b4e40c7e",k.Spine_pet_107_json="6270505a-bb90-4949-bd7d-f6ae68b62ae9",k.Spine_pet_108_json="f2808c76-d9e1-475f-864a-7178d2c0b506",k.Spine_pet_109_json="7eaf6c1d-f150-46bd-89e7-bcce6b8876a1",k.Spine_pet_10_json="98fe0850-8a25-4ab8-b5c4-18db9682c495",k.Spine_pet_110_json="4ca45404-f00f-4f80-96fd-c18ad504a3ae",k.Spine_pet_111_json="3a3cd4f3-49d3-46ad-8f4a-e9224129b7ec",k.Spine_pet_112_json="4f8aa3b1-2344-429e-b4c3-a50e82662f6b",k.Spine_pet_113_json="ab0acfec-8638-4f37-a779-dae72f455845",k.Spine_pet_114_json="0721e2df-66af-429b-b326-ccbc94ba468b",k.Spine_pet_115_json="10ea5937-81de-4141-97f3-d236d42f778a",k.Spine_pet_116_json="b927fea1-1e65-4aa1-b9eb-bee99391a575",k.Spine_pet_117_json="100fd339-373d-4675-9f09-9fba36cc6abb",k.Spine_pet_118_json="de1919f9-9ad8-45a4-ad01-fe1c8897dfa3",k.Spine_pet_119_json="c3e9cf8d-0201-46d0-ad61-0c690c78fee4",k.Spine_pet_11_json="9a4a641e-672f-4789-be5d-d6df1eb5e321",k.Spine_pet_120_json="d349443b-08a1-49d9-8e91-2d63bda8b1cf",k.Spine_pet_121_json="8f452b06-b3b4-4c25-a5dd-33343b4fcfcc",k.Spine_pet_122_json="093fc1f8-c513-4ef9-af11-04509fda30ff",k.Spine_pet_123_json="890f9005-1816-4900-9677-24983bfb18ba",k.Spine_pet_124_json="9491da83-2f61-47fe-8073-4f3cde42a96b",k.Spine_pet_125_json="cb8f3fdb-c96b-46cc-a51c-d93eabe54769",k.Spine_pet_126_json="c8d13f99-0653-403c-9d2b-95ab2e3a4a37",k.Spine_pet_127_json="6337501d-43b8-47e8-8ace-84cff3d6a914",k.Spine_pet_128_json="3a800661-c3bb-40c8-ad7b-fba27e47426c",k.Spine_pet_129_json="6febcd26-98c0-41b1-adff-ca6dbc1a6bb6",k.Spine_pet_12_json="8e922a4e-5b3a-423a-b258-e759df420999",k.Spine_pet_130_json="4e6fff9c-f9dd-4f49-bd46-557077e02975",k.Spine_pet_131_json="12137997-8e00-4042-87f3-220f865e243a",k.Spine_pet_132_json="71c81df8-0693-4041-b69f-8ff29340e4bc",k.Spine_pet_133_json="9345ae86-9025-4841-9251-9bbecff3a63d",k.Spine_pet_134_json="5424908a-8755-4db6-8bcb-d315b219a3bd",k.Spine_pet_135_json="66491ebb-7336-489e-9f15-4c76a112c3e6",k.Spine_pet_136_FTUE_json="03a9fa79-a2bc-4497-b3f3-0bba1c7e9095",k.Spine_pet_136_json="6432dfaa-2140-43ae-8e0d-543de6b9baec",k.Spine_pet_137_json="68759a87-ccfd-45fd-b8a2-04877e565a7e",k.Spine_pet_138_json="805fb198-405b-45cf-be4b-c943eb5780ee",k.Spine_pet_139_FTUE_json="44fa3bd0-0b18-458d-a473-b0b0b02b39f2",k.Spine_pet_139_json="1a5cbb8a-3476-4810-abcf-8ae17286475e",k.Spine_pet_13_json="1768152c-d25e-4d67-86c5-53aaa0309574",k.Spine_pet_140_json="a429fc74-f76e-4dca-8d29-128b13f2b7ee",k.Spine_pet_141_json="58dc4c03-0048-4d08-926c-cb3fc20f1272",k.Spine_pet_142_FTUE_json="b218106d-6990-4403-996d-14a1d8e15403",k.Spine_pet_142_json="3f5d4535-31b8-4185-975b-1051af0486b8",k.Spine_pet_143_json="5224af77-c1f9-4490-a741-620311bedd1f",k.Spine_pet_144_json="aeb244e3-3cf7-4fc8-8a6c-de62dce15e8d",k.Spine_pet_145_FTUE_json="0e54d6e2-daa6-4bf6-af6f-3b3b82b65f94",k.Spine_pet_145_json="d2e69249-a4fc-4442-a6b5-e2b6918dcdd7",k.Spine_pet_146_json="231daa2b-f325-43dd-acdf-27ac37cef765",k.Spine_pet_147_json="3532fbfd-8494-46fa-90bf-997961d7b19f",k.Spine_pet_148_FTUE_json="6bd224ba-15cc-4d04-9698-7bd1d9fdd28d",k.Spine_pet_148_json="d3cf7559-4250-40d5-816d-de41f4fa7910",k.Spine_pet_149_json="efd2efa8-8d9f-46d5-abb0-1aee05daa690",k.Spine_pet_14_json="78f956f7-5c94-4c1e-9afa-9960294c2c3c",k.Spine_pet_150_json="95efc14d-2c4d-4f5e-bd59-b42e0f4ff1dc",k.Spine_pet_151_json="34e6744e-f005-4d66-8536-a5566c1b0531",k.Spine_pet_152_json="23a4a864-d46d-4e0f-8b44-f84287c33332",k.Spine_pet_153_json="7d961810-6e8a-4ccd-b7da-0cd9ee2fbae3",k.Spine_pet_154_json="e8192a81-df51-4959-a2ba-1c900d4fecf0",k.Spine_pet_155_json="fc459a41-a24a-46df-905f-cfae11925227",k.Spine_pet_156_json="a04f0ad0-480f-45fb-9011-a5ea28070721",k.Spine_pet_157_json="23ef5f67-30fe-46a8-8b77-74996e8959c6",k.Spine_pet_158_json="431d9192-15a0-493e-b0db-be18d13e8a2c",k.Spine_pet_15_json="bf6af2be-1031-44f2-80f7-3325cd450c3f",k.Spine_pet_160_json="38a815df-cf94-41ca-b0a3-314d6a37054b",k.Spine_pet_161_json="1f6eafd2-9a55-42f8-8a7c-ada2f226c4a7",k.Spine_pet_162_json="a604d393-5e4b-41c4-8fd5-6d22231ead31",k.Spine_pet_163_json="3783f1c7-c26e-4f8b-89fa-932891bac5a5",k.Spine_pet_164_json="bc56b2e2-aa2a-4298-a09b-7101c4c4761b",k.Spine_pet_165_json="ca6a7ff3-1366-4342-8293-cedb2f1ecbaf",k.Spine_pet_166_json="0c3437af-6a72-4fe7-8415-edc1b0adba8c",k.Spine_pet_167_json="17b087eb-0dd3-4b82-803a-df796adc7c95",k.Spine_pet_168_json="cab654b2-625b-47e5-94a5-838c70aa9b69",k.Spine_pet_169_json="59e79c21-ef18-4ece-8130-32a056c62be2",k.Spine_pet_16_json="d28c9abc-866f-49d9-bc38-c767dce417d5",k.Spine_pet_170_json="727a84f4-70ee-4873-a2e1-ad8e5d4e0b19",k.Spine_pet_171_json="feab09f0-ebbf-40a5-9b78-9a8d53d4fb69",k.Spine_pet_172_json="666cc997-22f0-44c8-8162-55e11f4d494c",k.Spine_pet_173_json="2d8ca273-ae0c-4164-87df-f2fb03f6beca",k.Spine_pet_174_json="e5467dbb-9880-4f6b-9a09-aa9e73e80f27",k.Spine_pet_175_json="89a3a1dc-235c-4c0a-bae8-eea45bdd9bd0",k.Spine_pet_176_json="61e5ae0e-569e-4457-ba3e-827aa54f776c",k.Spine_pet_177_json="b8f3d505-604c-4410-8bbc-612b8e529d7d",k.Spine_pet_178_json="6ca18784-8114-4c7d-b3e9-23a0a3216b50",k.Spine_pet_179_json="3d90e9e9-a790-46c6-84f0-54e2fa516a5f",k.Spine_pet_17_json="3e80feb0-016c-4eb5-a392-245527011497",k.Spine_pet_182_json="19e16315-8cd3-49c1-ab35-b7e9495fcd5d",k.Spine_pet_183_json="891d64b0-848c-4544-b8fb-c9e6c652c089",k.Spine_pet_184_json="2ffddcdc-596d-42dd-b9ec-6d8ca7a7ffa4",k.Spine_pet_185_json="1940308d-c215-4ebd-ab11-9fb92316cce2",k.Spine_pet_186_json="85850236-7db4-4ef5-8647-5ffd3fedec95",k.Spine_pet_187_json="cfb920dc-c59e-4f90-893a-921caa50826a",k.Spine_pet_188_json="0764d625-5fd7-4a38-a3ea-cc4d64231dad",k.Spine_pet_189_json="555b795b-0391-45d5-a4c1-ec098206d375",k.Spine_pet_18_json="be25a2d3-acfa-4957-ac28-143415c7ea27",k.Spine_pet_190_json="34dfd6be-3f13-4225-9444-e28a31c0dda9",k.Spine_pet_191_json="00866b77-4bfd-49b3-b11a-7486efb1d091",k.Spine_pet_192_json="3b0c2788-776d-4ccd-8440-64dc69c84d45",k.Spine_pet_193_json="a605e8e1-0c36-4a95-9048-e987ca50d146",k.Spine_pet_194_json="901faac0-682e-404a-92b7-d29a738c8bed",k.Spine_pet_195_json="b3a8ecc7-db50-4c8a-9ea4-dcdb00b8af3f",k.Spine_pet_196_json="56c5b1c3-dfba-4ed0-be14-7c83f82b6e34",k.Spine_pet_197_json="037ed58a-b79d-4d38-bb0f-97a91011cf5c";k.Spine_pet_198_json="111d835d-d4ce-484e-a846-8354595f8bfd",k.Spine_pet_199_json="976916f1-8e0e-467c-8c51-1afe64a1765d",k.Spine_pet_19_json="382ab68b-7b4a-4543-8e81-85052c5d27a5",k.Spine_pet_1_json="624c21bd-63c2-4558-9365-78673fd6f9e5",k.Spine_pet_200_json="7103891a-2033-4a6f-bae3-fd9f78641559",k.Spine_pet_201_json="509a084a-968f-4926-83a0-22668c872064",k.Spine_pet_202_json="dad14c94-e845-4ecb-99e4-f300ca4573a7",k.Spine_pet_203_json="3711e0f9-ec0c-43f5-9759-4e95015f0e6f",k.Spine_pet_204_json="8ada4ec2-ca4e-4952-b9ce-4637c622e4b5",k.Spine_pet_205_json="a134b428-42e2-4aab-9c02-044dd2c1b260",k.Spine_pet_206_json="847eeb11-1f93-4dd7-8597-1b2ad6ff9b0b",k.Spine_pet_207_json="1ecaf902-a910-4dde-86e4-11e92aa0a6ee",k.Spine_pet_208_json="558f635e-4b4c-4680-884d-8de50612c34b",k.Spine_pet_209_json="6fa916fb-2522-4918-be93-748d700d668d",k.Spine_pet_20_json="3a58bbbb-315e-416f-ba3a-7a1c93834d7c",k.Spine_pet_210_json="9fc267e6-940f-41ce-8708-a81c186f5c75",k.Spine_pet_211_json="1dff47e6-cb50-4dbe-9f52-91050bbfd9e1",k.Spine_pet_213_json="1758538e-511d-452a-856f-0e521825ab65",k.Spine_pet_214_json="b8b3843e-e25a-451b-8226-d2ad64772b88",k.Spine_pet_215_json="e5b07215-0e47-4f2f-9252-f2e1d44a88ed",k.Spine_pet_216_json="4f92313e-21ac-489a-afcd-b38b8259b2e8",k.Spine_pet_217_json="d894ae4a-6b9b-4075-9af3-db2cafa002d1",k.Spine_pet_218_json="acd354f3-ed71-436f-829a-95fe9ab3daf3",k.Spine_pet_219_json="2960dfb4-85c1-48b2-a9e5-de4eb31d8a7f",k.Spine_pet_21_json="f7831e07-1e86-42fe-a0b2-005052911c36",k.Spine_pet_220_json="fbdd29fd-c5fa-4949-961e-08524beaf189",k.Spine_pet_221_json="eeefe934-73d8-4b04-bfa4-25ea21d1b96a",k.Spine_pet_222_json="e42fefe9-d7e3-4518-97df-20d11ce344bb",k.Spine_pet_224_json="b5b7225e-44a0-43f8-b092-d30b071ebc6c",k.Spine_pet_225_json="a841031e-2017-41cc-9271-98835518d7d0",k.Spine_pet_226_json="2fcbad8c-3410-487d-8b7f-89c1b709fbe9",k.Spine_pet_227_json="69c48023-e155-484e-822e-7b4ce30c63df",k.Spine_pet_228_json="c253cd80-1651-4441-8e04-def66208ef5c",k.Spine_pet_229_json="9631263d-2fd7-451d-aaca-4c7271bae129",k.Spine_pet_22_json="bc690cb9-907e-4255-9606-805af4ff16cb",k.Spine_pet_230_json="66a98dc3-eafa-4be2-9724-7daeffba75ef",k.Spine_pet_231_json="43587964-526f-40e2-8b51-952410eb393f",k.Spine_pet_232_json="7766769d-7919-444c-a4dc-10ce15aa4ac8",k.Spine_pet_233_json="55276168-e54c-4065-b8d1-09eaf5c0b34a",k.Spine_pet_234_json="11a9ae5b-26c6-45d5-8233-7fb589ba78c0",k.Spine_pet_235_json="a1ce3ac6-b098-476f-bab0-70df98711449",k.Spine_pet_236_json="2d92d144-fd7b-4212-85bd-287bb23161a8",k.Spine_pet_238_json="32104c62-3a28-4aea-8727-c99dc0e37c29",k.Spine_pet_239_json="8b139e78-aa76-46e4-bf69-1a2ba7fca8bf",k.Spine_pet_23_json="d2e3243f-aadf-45cc-9856-1bff37ea440e",k.Spine_pet_240_json="0229ddba-6bba-4b33-aab0-6f2be21af9cd",k.Spine_pet_243_json="05940bd4-7451-402d-85cf-8eabe4bfbe43",k.Spine_pet_244_json="fa63e4d7-a8af-407c-a972-f3477145ef0f",k.Spine_pet_245_json="ff5d0f8b-6e97-44cf-8774-82e68302450f",k.Spine_pet_247_json="d7793e14-4bc3-46f5-a877-bca5ff632831",k.Spine_pet_248_json="d11ce5f5-168d-4424-9aa6-b7f541ab783a",k.Spine_pet_249_json="f7ba7eff-7d9a-46f0-a5c7-5c7b6fc95bd5",k.Spine_pet_24_json="7db566a4-e033-4140-8ca6-0e8f84f96007",k.Spine_pet_250_json="3d3b68f2-2928-4d35-a2d5-0dd896fc8545",k.Spine_pet_251_json="ef0b0f50-c5c6-459e-845f-39227d6bea18",k.Spine_pet_252_json="e6dc8e02-d087-4462-8f36-57806bc5c8a0",k.Spine_pet_253_json="8d867ce0-a7b3-48f3-bea7-50e382b85180",k.Spine_pet_254_json="957b90a2-657d-47c6-8847-05093918c888",k.Spine_pet_255_json="ee57412d-84e3-4a45-8789-ebd1e2d994c3",k.Spine_pet_256_json="6fa72251-886a-4540-8d9f-d77fc614f254",k.Spine_pet_257_json="96eac8eb-c97a-423d-bbcf-6877d336dcbf",k.Spine_pet_258_json="cd0478e3-e9cf-4371-a2a3-8eb0254cd1ca",k.Spine_pet_25_json="1a8ccd0a-92a4-49a7-828c-bac18babd4dd",k.Spine_pet_261_json="5be5c351-5502-4e9b-a35e-727dbb5fd9e9",k.Spine_pet_262_json="aa5fe41e-574e-460d-b18c-9e5c3b786e85",k.Spine_pet_264_json="50152b35-9a0a-4317-92ac-01123b09a10f",k.Spine_pet_265_json="0d9f8d9c-18b6-4cee-b750-e6a0101ecd70",k.Spine_pet_266_json="df256134-c79a-4db9-93a9-3e6de26629f5",k.Spine_pet_267_json="33155d59-dec0-413d-a1cc-74c21b14c2ab",k.Spine_pet_268_json="7a850e9c-b1ff-4ed4-b501-b88c419bf797",k.Spine_pet_269_json="342b398f-c420-41e2-8759-57913a4356eb",k.Spine_pet_26_json="882acee2-395b-484d-adba-d27ddfa34ef2",k.Spine_pet_270_json="bdcabbc7-3633-4693-b798-c218f63c4e77",k.Spine_pet_271_json="502b4b3a-3119-481a-8192-e899a589dd5e",k.Spine_pet_272_json="353d3983-fb29-491b-9134-c964256c38b7",k.Spine_pet_273_json="41259d80-9a58-4bdb-b221-6dedc017792e",k.Spine_pet_274_json="4a49f3a4-7f18-42f0-a874-3535b53a5fc7",k.Spine_pet_275_json="29f42e24-80b1-481b-a04e-301d2245565b",k.Spine_pet_276_json="ff581b3d-3778-4402-bd50-7cf3599f45a1",k.Spine_pet_277_json="c69b275a-40c6-4b93-ae51-0b2dded1c8e5",k.Spine_pet_278_json="7423f59e-4d39-42dc-9c4d-f4a813e48694",k.Spine_pet_27_json="65c417ea-720d-40a9-b015-4fa8c66ecf57",k.Spine_pet_280_json="986c1f1a-0e12-437f-970b-54a0f4efb39b",k.Spine_pet_285_json="6d9f1fc9-faeb-4fd9-b292-e6f774f8a1d1",k.Spine_pet_286_json="c66770a4-89ce-4c36-86ee-ed90654fb90b",k.Spine_pet_287_json="82e89e29-19f1-47fc-b7b8-10aff316ddab",k.Spine_pet_288_json="6ca9649b-45c4-43f4-b321-5f39a94b9242",k.Spine_pet_289_json="3b59c88a-22ac-4b65-9520-b9c0e3f8efb8",k.Spine_pet_28_json="f85f25fc-cdad-4243-8cde-fb3a56ae72b0",k.Spine_pet_290_json="1d2505fc-146e-440f-bbbc-d8279c87f78e",k.Spine_pet_291_json="67517386-d9ee-4a5b-a4e8-5da2670ef4ba",k.Spine_pet_292_json="cf060dc7-41ee-42c1-b676-45e04eb36c7f",k.Spine_pet_293_json="b44e9ed6-4046-4ee5-a2f6-12e8c746a56c",k.Spine_pet_294_json="372d8329-44b4-4e49-bacd-2541d10aa4e5",k.Spine_pet_295_json="f03f6c33-0e08-4f0b-bfbf-2b99773e073a",k.Spine_pet_296_json="9eb7d7d2-7586-4456-94f0-bc87a23509c4",k.Spine_pet_297_json="dc59553c-4ff0-485c-bd4c-0e42fed0033d",k.Spine_pet_298_json="48d90db6-aff2-4434-b934-0c1f4c829f8b",k.Spine_pet_299_json="4e02f21a-4cf1-42c1-be9a-0cdc934189f2",k.Spine_pet_29_json="28c2da62-b05d-44e0-80a1-f74159bec7df",k.Spine_pet_2_json="ab9cd362-d049-4e74-9a67-9482af6a7903",k.Spine_pet_300_json="ac351eaf-f55f-438a-8170-6d8543cf6dab",k.Spine_pet_301_json="44b7ba23-1183-4fab-9777-c530163105c7",k.Spine_pet_302_json="b4e52c57-0245-4cdf-b7e8-d52ecf84b555",k.Spine_pet_303_json="31304e70-0c28-460a-91cf-d929a421ffaa",k.Spine_pet_304_json="0191a00d-1584-4286-8e12-63eaff14b4c8",k.Spine_pet_305_json="c18a8f49-d8f0-4bd1-93b8-e17798d0d506",k.Spine_pet_306_json="2e66a49d-c080-43f8-a6a8-7136f83516ed",k.Spine_pet_307_json="615a2cf0-2b16-443a-ae3d-fe44b1723974",k.Spine_pet_308_json="574f0155-cdc8-4ba2-95f2-01307c333374",k.Spine_pet_309_json="0b3bf0e8-4e2e-453e-bf1a-81aee55e3517",k.Spine_pet_30_json="6fdd6406-3a29-415f-9299-454cfbd59fbb",k.Spine_pet_310_json="a23985ea-fe07-4cc9-80a7-7ee5c455587f",k.Spine_pet_317_json="81dd9c8a-879a-4408-bcda-dea02d851f45",k.Spine_pet_318_json="b6debca7-71da-4674-84f2-7b48b9c60875",k.Spine_pet_319_json="3d3f8335-31fa-44d2-8428-855d1898cb29",k.Spine_pet_31_json="2ff5eefd-f16a-441f-b3ee-5a79461867c5",k.Spine_pet_320_json="a98b82e7-c029-4372-86a6-72908d434618",k.Spine_pet_321_json="678819be-6cc8-4d67-ba18-37c55e25dc6b",k.Spine_pet_322_json="70188b8c-725c-46aa-9fda-9f63c882a082",k.Spine_pet_323_json="5122bd83-a8ac-43d6-8e15-16fe61c529b8",k.Spine_pet_324_json="6129e698-ecd5-41e6-b7a0-bffc325a1fd9",k.Spine_pet_325_json="afe00374-3511-43e3-bb0d-bc349402d3a3",k.Spine_pet_326_json="4c8fd072-150b-4607-8e38-e89e07a6277c",k.Spine_pet_32_json="09b0fec9-42ff-4e1e-aba9-4941a919b149",k.Spine_pet_335_json="6b72ded7-6fd7-41d4-9908-5a2c6572b35e",k.Spine_pet_336_json="e7fa44f4-f95e-4855-a2ae-6193b2aa49d5",k.Spine_pet_337_json="076cb088-caba-4a9d-8b23-9e7f31534716",k.Spine_pet_338_json="24675028-08e2-4ebc-8566-29a30919770b",k.Spine_pet_339_json="5b19e6c4-c3eb-484d-a4d0-7a9355e85a71",k.Spine_pet_33_json="d17ab0d6-c4b2-44f6-95d2-83c5d862a250",k.Spine_pet_341_json="02c2d721-534e-40fa-ac13-790ffeb54128",k.Spine_pet_342_json="c08de98c-3ee8-4025-a9a6-cadda2233cb1",k.Spine_pet_344_json="17185171-c1de-4e71-af7d-762c1b0ec687",k.Spine_pet_346_json="500dab9d-4237-49f5-9a60-6e69ff6fe084",k.Spine_pet_34_json="cdde707d-9c5d-4b52-bbff-74d8e9df8862",k.Spine_pet_354_json="c143df10-6513-4a24-8060-237ac3dec711",k.Spine_pet_35_json="feba4f30-cd85-4876-8c4a-041d9dfc4e6e",k.Spine_pet_362_json="c2154690-b043-44ae-b433-23c0b9dd8b05",k.Spine_pet_363_json="7ecfe1c4-f20a-47f2-a923-d5f58afbab46",k.Spine_pet_36_json="734edf64-405c-4bb6-90cd-999235524419",k.Spine_pet_376_json="593aeeb7-8331-46b3-80f6-9e951a93cde0",k.Spine_pet_377_json="937880b8-f92b-461b-880f-9be65b1819e7",k.Spine_pet_37_json="d0acb997-ecbd-4a98-9f7e-f90b833dcf77",k.Spine_pet_385_json="de170494-00f2-424b-973b-3968270c17e2",k.Spine_pet_386_json="84819714-205d-4d02-a451-fced28fd1c1f",k.Spine_pet_387_json="0bc3c4e3-7026-46d3-8aa0-f3265f94f3dc",k.Spine_pet_388_json="9035e4f1-aede-4714-91e4-c1dc12bb5477",k.Spine_pet_38_json="d30943f7-dc35-470a-9b3b-ffd1a5ea9fb0",k.Spine_pet_39_json="1509e1f8-d714-4f2f-8507-d6f3c0845004",k.Spine_pet_3_json="add03fa1-e749-4028-9f5f-2006ca8ec61c",k.Spine_pet_40_json="12f8fff2-2d78-4921-80bb-2c4633017a30",k.Spine_pet_41_json="8a951385-592e-4866-a45d-4cb8b098dae1",k.Spine_pet_42_json="90dc5e5e-27bf-4b97-a99a-d09422e0a7b4",k.Spine_pet_43_json="408c81ec-ad18-4bea-8f0f-dda95dfe6e89",k.Spine_pet_44_json="a1d89955-0c4e-4b51-8810-f4cb3815f475",k.Spine_pet_45_json="619bedfe-f98f-4704-b64b-c9542c8a86c9",k.Spine_pet_46_json="79f7b288-f2a0-4552-9572-b304de66143c",k.Spine_pet_47_json="c9e962b1-b84c-44f0-b3a6-8030fdde7da9",k.Spine_pet_48_json="f758bfe7-5685-49fa-8b3a-18d93f2b7908",k.Spine_pet_49_json="bbc51b00-f855-4e47-9eba-2a762f68277d",k.Spine_pet_4_json="32d65bff-0a01-4411-8745-c048727140c2",k.Spine_pet_50_json="e9e6bb32-dff9-4b8d-acb3-3219e2683a0b",k.Spine_pet_51_json="9a8a8949-a4ff-4425-9fd1-b73774e62ebe",k.Spine_pet_52_json="08dbac2b-a7e5-4f96-ba2b-80f0b40d0788",k.Spine_pet_53_json="d381c981-16e7-44ac-ab10-6fc3dbeb085e",k.Spine_pet_54_json="cba7ed04-3099-4318-850b-f94e9ab0a89b",k.Spine_pet_55_json="e65aed4b-98a6-42c4-8d18-cb7b80df56a1",k.Spine_pet_56_json="221d7b8c-8774-4619-8bf8-199d6b3b971a",k.Spine_pet_57_json="3a8b8144-a3e1-4f37-9f79-3d85328b161b",k.Spine_pet_58_json="d401fedd-1dce-4a05-91f9-fe76b5e637e7",k.Spine_pet_59_json="38fc3b6d-36ec-468c-97fc-b394cb4fe357",k.Spine_pet_5_json="8fb4d9f5-1e7c-4a8c-9271-73f0d6fb646d",k.Spine_pet_60_json="65cf58a8-1abb-4dfa-9780-61371f97e9d3",k.Spine_pet_61_json="411b40ee-b5a9-4f55-931a-8e6ec3939387",k.Spine_pet_62_json="3874a12f-fbba-4c08-ab33-74e6ba093f91",k.Spine_pet_63_json="bd1ce8fc-2f5b-41d3-b7e0-d50d201102b1",k.Spine_pet_64_json="52117a24-42aa-458e-85ba-01c568bf342b",k.Spine_pet_65_json="23110903-a73e-4861-a011-9f532b7113ce",k.Spine_pet_66_json="57749f9b-cc40-41f1-958a-d093374231e9",k.Spine_pet_67_json="f9eafd46-3238-465c-8568-6f2ac5856ca9",k.Spine_pet_68_json="9cdd62a1-8a47-4009-af6f-ded41154f153",k.Spine_pet_69_json="1d203682-b718-4692-845c-bae34b4c26a7",k.Spine_pet_6_json="c44c9ea1-7825-4615-b226-dc0e5643b703",k.Spine_pet_70_json="8f922a86-a9fb-4c3b-876d-40fb86cc4b02",k.Spine_pet_71_json="483c041f-4cc8-4eac-b8d1-ba8bf5547479",k.Spine_pet_72_json="9adc54cf-5cfa-43c9-8308-acc108bca6ab",k.Spine_pet_73_json="5c66afeb-b3b2-411a-9ff5-85592376f267",k.Spine_pet_74_json="fafea933-9e0c-418b-9e5a-fe86f2fcc346",k.Spine_pet_75_json="0054f56f-d3aa-4d99-98fb-7593fb5f8e22",k.Spine_pet_76_json="b23cc2a4-201b-46e5-8871-8e3acc355543",k.Spine_pet_77_json="eefd8726-0799-47c6-badb-f3f82008ff3e",k.Spine_pet_78_json="28cddc60-1e65-4dec-951c-a9b243e0e7d2",k.Spine_pet_79_json="7316756f-343e-4eac-b1a5-3c3102a8fde6",k.Spine_pet_7_json="d4f40b3a-db9e-4227-975c-1c2fbc412cc0",k.Spine_pet_80_json="4ecbbb30-2198-4f9b-8e36-811a3a2f5851",k.Spine_pet_81_json="545d4399-1be1-4b1f-8c8b-8768f17f5e7c",k.Spine_pet_82_json="154eb84b-0008-45fe-b1af-4324c2b2072b",k.Spine_pet_83_json="95d85b7d-f6eb-481d-97a3-555af4d96ebd",k.Spine_pet_84_json="ee979a66-45d4-4cb5-bdfa-c5a760dddcde",k.Spine_pet_85_json="17197284-ffdf-47ef-bc06-adadde125d38",k.Spine_pet_86_json="9374647d-3952-463d-ac92-74ea856595ad",k.Spine_pet_87_json="125184d9-b7a3-48aa-96cf-55f2c717abf7",k.Spine_pet_88_json="7a74f3d7-91b0-478d-a978-59c4bc831c98",k.Spine_pet_89_json="6a64d518-11be-47f0-bfb7-3bb7efd302d7",k.Spine_pet_8_json="76b98aa0-b8f5-4558-85aa-d99b07aa9e91",k.Spine_pet_90_json="8280245b-4c0d-41a4-a3ee-61c1b15fda11",k.Spine_pet_91_json="8dfffb36-1565-4847-840e-8ffb6853c490",k.Spine_pet_92_json="fbbfa853-93e2-4b08-b58f-fb472af20e00",k.Spine_pet_93_json="6db5f3f4-62f0-4ca1-8260-ff78d42fac2a",k.Spine_pet_94_json="dd15ead8-2dd8-4cf7-821c-5daa86b6da6c",k.Spine_pet_95_json="ba7e2558-286c-4b2b-8d5d-a73ee1d8d3bc",k.Spine_pet_96_json="723f981e-5a16-43d6-811c-90bca1ce7a58",k.Spine_pet_97_json="001c63b3-b912-4cc4-a267-6b6ba46f9dbe",k.Spine_pet_98_json="53a00330-ee9f-40bb-a41f-2cea2f578e2d",k.Spine_pet_99_json="763ef1d6-8adb-44ad-b8c4-0f6452323862",k.Spine_pet_9_json="ac66a86d-2212-45e6-8075-35f05ae3d06f",k.Spine_pet_battle_rescue_back_json="1618279c-80fc-44f9-8351-ab0a792c8e53",k.Spine_pet_battle_rescue_front_json="a27f0b05-9ef5-4060-a06e-43557b7c7a2b",k.Spine_pet_battle_rescue_json="079ab5ab-0f58-4289-8c41-154d936f797b",k.Spine_pet_card_shine_json="443300f2-c3ad-4059-af40-d6f31e4e3001",k.Spine_pet_empty_state_json="12bb11bf-3ac8-4fc7-9f63-fbf4aa535984",k.Spine_pet_rescue_card_json="d1d15cbe-544c-4793-afcf-0ebfc4aae1f1",k.Spine_pet_rescue_json="8e94ea91-a3ba-4cb1-a821-34a6713565a2",k.Spine_pet_shadow_effect_back_json="a68a9e63-4d4d-403e-a7d6-89338db8e4f1",k.Spine_pet_shadow_effect_front_json="1cb949f7-e03d-414e-9306-4068ac1a1d15",k.Spine_pet_shadow_effect_json="9fceb8cc-f22d-4732-b03b-cbacc58d5aac",k.Spine_petbook_stamp_json="59792db7-52fb-4bc3-be12-555563f4b3df",k.Spine_petslot_unlock_json="74dd84ba-64a2-4f90-b9a9-b7d8d9a0be69",k.Spine_physical_blunt_json="70b97c74-dc3e-4bca-a869-4d5b2374df8d",k.Spine_physical_impact_02_json="002cafd0-673f-44d3-96c3-0a97f1092f77",k.Spine_physical_impact_json="fc0bcea0-f460-44f6-91b4-8cae6afcf9ac",k.Spine_physical_multi_impact_01_json="37ab6fd3-1d5e-4050-ad95-a1d572954472",k.Spine_physical_multi_travel_01_json="840cf48c-6ea6-4c0b-94e8-4d6e13faef1b",k.Spine_physical_pierce_json="9cb32bd0-be63-44e1-80fc-8dc73f5579eb",k.Spine_physical_slash_json="b7a6d581-0f46-4a29-9a71-fc6f116353bc",k.Spine_plant_eg_single_json="86d0078c-b0d7-40be-98de-17003291d9cf",k.Spine_plant_gryphroom_json="78c1f487-d6a0-430f-96c6-e27fb99485b0",k.Spine_plant_multi1_json="14670d48-47fb-4dc6-aa3b-35f7472ddaa5",k.Spine_plant_multi2_json="37bf9991-56b6-4689-88e5-d3f5c0d2d4a5",k.Spine_plant_multi3_json="68ea87b1-dc1f-40f4-8e81-014b99115eb7",k.Spine_plant_single1_json="01ec85a7-e4ec-4565-a0bd-0db6ba14b5f5",k.Spine_plant_single2_json="2dca9468-59a5-4b9f-8d45-70d000f596eb",k.Spine_plant_single3_json="a5d233a0-0fc9-4ca9-a15b-c19184f6f4a0",k.Spine_plant_single_create_02_json="27800f7d-7858-4543-acfb-cff0e7c4b445",k.Spine_plant_single_impact_02_json="712f6dfc-f5e1-4fc9-8096-00330d2957c8",k.Spine_plant_single_travel_02_json="5e65fa82-626d-4320-a184-e745b8235196",k.Spine_plant_single_travel_03_json="c7b19b50-253f-437a-9d4e-3d2b16958612",k.Spine_plinth_carousel_dark_json="63bc53ba-296b-4f42-930a-9d8a1d75c8b1",k.Spine_plinth_carousel_json="69ad4fa3-a8fa-49b5-87aa-112a38df01df",k.Spine_plinth_pet_158_json="1c86e40d-4138-41dd-b9d2-bdbe9bc04929",k.Spine_pmlock_elevator_json="08fdd21d-60d2-49d0-b509-db16c81a5ed2",k.Spine_pmlocks_basic_json="f3022233-9983-4236-a894-40f488343ce2",k.Spine_podium_flame_json="c30192a9-fc3a-445c-85d5-49fcd38e6c9e",k.Spine_pumpki_poof_json="2244d003-f8cd-472a-9483-5e202342aae0",k.Spine_puppetmaster_map_smoke_json="25209d4b-5f25-470a-8ce5-b76a4b82a926",k.Spine_puppetmaster_smoke_json="86320697-486a-402f-a619-d1cfc7cc2567",k.Spine_questionsanswered_confetti_json="682130c5-ae92-4565-8446-0c0bb0a09400",k.Spine_rainbow_works_json="ab1d4710-471a-4cf8-a7e8-18fb0bee27e3",k.Spine_rank_bar_json="3d79db6d-b5ac-48f0-a741-5f9500feb79c",k.Spine_rasterreveal_json="57bf17e8-b38a-4983-9ed4-293c4f43c822",k.Spine_rays_celebration_json="a47ccfc5-2b81-42f5-83a4-ed255d9864b8",k.Spine_restrictions_card_flip_json="8b960170-692b-4232-a8db-3fccc166aa8d",k.Spine_revive_json="0ff4db7b-40fa-47ed-9949-30508dbb142c",k.Spine_rift_modifier_reroll_json="cc41d68e-4734-4909-b890-bf3ea0479346",k.Spine_rift_pet_revive_OL_json="edb88c3b-65e2-4dda-9c64-b9a2f610bc37",k.Spine_rift_pet_revive_UL_json="bebd20f0-619b-4680-ac9c-a6b16218751b",k.Spine_rift_portal_astral_json="7f1c4560-6aea-43d5-9403-3d1173f6fea2",k.Spine_rift_portal_basic_json="bc72e20c-385e-4b2b-b0b2-67e34edf064c",k.Spine_rift_portal_fire_json="e88735cc-1554-4368-a604-bcd4e1fe7ec9",k.Spine_rift_portal_gold_json="4f33945f-59bb-4f19-881f-410173a12ee4",k.Spine_rift_portal_ice_json="3a6ec369-8f9c-4f09-a45d-076f05062ce3",k.Spine_rift_portal_physical_json="cb982d3e-538f-4cb3-a5ec-5477c16a6bff",k.Spine_rift_portal_plant_json="8548f003-2fdd-4cf3-ae38-e7b712f5f7ee",k.Spine_rift_portal_shadow_json="518eab39-88a6-4bee-adb2-d9179d743a34",k.Spine_rift_portal_storm_json="11230246-6f5b-4581-9d59-1dfd62bb7dd2",k.Spine_rift_portal_water_json="350d8b01-a273-4fa8-849f-1d7e552bf1bf",k.Spine_roar_impact_01_json="c982cef5-79ff-42b6-8e05-a6c389f9fa2d",k.Spine_roar_single_travel_01_json="50817345-eff4-45f6-8b8f-baf97d43a569",k.Spine_rune_equip_json="51abe61f-a912-4358-970c-8165c781472c",k.Spine_rustling_bush_json="30c554f5-f314-4466-8c4d-132d4d8c5929",k.Spine_sandpile_shipwreck_json="ab416c70-bd78-4ad7-b9ad-c3344613ad30",k.Spine_screendebris_json="ddf266b4-90c7-49d7-8dc6-c31f6c234329",k.Spine_segmented_offers_rewardclaim_json="d140a5dc-144b-49d0-8f0f-4c3279687b61",k.Spine_segmented_offers_stamp_json="eecd178b-33fb-46ee-a9be-1991375ede0d",k.Spine_shadow_boss_shield_json="20ffe378-58cb-4b1f-a3a7-5f13c00ad68b",k.Spine_shadow_fire_create_03_json="7c90bafb-2e8a-47d0-addc-4e9e3b840023",k.Spine_shadow_fire_single_impact_02_json="14747ca0-0266-4a44-988a-84bd8f34fd09",k.Spine_shadow_fire_single_impact_03_json="dba630a0-7d92-43b8-adcc-5f217636e551",k.Spine_shadow_multi1_json="8d00a6c2-3d71-44f3-b6db-7784d2a2fe54",k.Spine_shadow_multi_create_01_json="f823ad07-28b3-4761-a22d-6d0378d5745f",k.Spine_shadow_multi_create_02_json="5a58af70-04c8-45f9-a927-bba840c0afa9",k.Spine_shadow_multi_impact_01_json="55ae8376-fff4-47df-bd21-50b9368965c9",k.Spine_shadow_multi_impact_02_json="67334c48-3a25-4ec1-b9ca-2345e3687f9b",k.Spine_shadow_multi_travel_01_json="e13582f2-f864-47b7-a388-8061b6a5155f",k.Spine_shadow_plant_single_impact_02_json="b4de27b9-7f94-4705-aed2-5be14038084e",k.Spine_shadow_plant_single_travel_03_json="714db27a-6577-4004-be01-48d70b173be4",k.Spine_shadow_single1_json="e1ae5dea-ecb6-4d0b-b0fc-a8d7d7b15e22",k.Spine_shadow_single_create_01_json="f52dc182-b35a-4650-8418-d9086019b460",k.Spine_shadow_single_create_02_json="d51983d3-59fb-4485-87c7-3ddde2123cbe",k.Spine_shadow_single_impact_01_json="dd8ccc18-07a8-4a6b-b708-6e2c6f5481a7",k.Spine_shadow_single_impact_02_json="ab1afb1c-e0c2-4553-a574-cfc8ee1dd823",k.Spine_shadow_single_trail_01_json="823987b7-5991-4899-8ebb-156a95e42f53",k.Spine_shadow_single_travel_01_json="fd59918f-8d2f-4c74-8138-3749b54aceaa",k.Spine_shadow_single_travel_02_json="9868be2c-c7af-47a7-be1b-6f5c2460423d",k.Spine_shadow_summon_json="1f3c05a1-3613-49d6-ae59-b174e8b26ffe",k.Spine_shadow_water_multi_create_01_json="af192621-930a-4419-876d-a90674b58205",k.Spine_shadow_water_multi_impact_03_json="d7dfd04f-c368-458c-9bf0-d31150e55591",k.Spine_shadow_water_single_create_01_json="4b4215a9-8b31-46c1-b28a-395bf5c533ec",k.Spine_shadowclash_json="ddfdd75d-777b-4e3f-a72e-cf41a1c53709",k.Spine_shadowportal_json="f3ab5ae5-8c4c-4a06-bce6-d634f02fe8d7",k.Spine_shipwreck_bubble_json="0e05fb87-ca6e-4c9a-8694-acc6b0deb1bf",k.Spine_shipwreck_squeak_json="c8942f5a-21f3-4bbf-91c9-79dfa82319a6",k.Spine_shipwreck_tornado_json="44e7a15d-85c6-47cc-950d-6298e9ccb855",k.Spine_shipwreck_unlock_json="e337846c-b83a-41d7-a49e-97d5651c2180",k.Spine_shipwreck_whirlpool_json="8cce319b-1a79-4fc6-8fa8-d67d47014b5c",k.Spine_shiverchill_unlock_json="c951c214-d5c5-44b1-af9c-c18039cd82b8",k.Spine_shop_cardglow_json="14d063ae-f7ab-4555-acc3-413975d82146",k.Spine_shroud_json="411a3889-759f-424e-87a0-2093ab698334",k.Spine_skywatch_elevator_json="388253ab-685a-4791-8d2e-516eec48870e",k.Spine_skywatch_unlock_json="8a39400a-d58c-4d8f-bb15-4bbb89557019",k.Spine_smartblock_vfx_json="ab0445de-9cb2-4527-8224-9a8004bba0f6",k.Spine_smoke_1_json="56de05e0-5658-41a6-8972-2e27f5047c47",k.Spine_smoke_2_json="f6f6fc75-071a-4e0c-90f8-e1a713dfbb80",k.Spine_smoke_flagmask_json="857120d1-0edb-46f5-bc0d-bcf03d61b23a",k.Spine_snowpile_1_json="34cd3817-0a0c-45fa-a304-04c8b53a9cac",k.Spine_snowpile_2_json="6f814fe8-3d8f-45f3-9dfe-ff5087a02521",k.Spine_snowpile_3_json="dcb8ea90-3766-41a1-a01a-d811c56ced40",k.Spine_snowpile_shiverchill_1_json="457740d1-6c48-43cb-b787-8cc9a527b939",k.Spine_snowpile_shiverchill_2_json="d85ca9fd-1360-49e2-bfd7-bef3cbe07af7",k.Spine_snowpile_shiverchill_3_json="d8282472-29c6-46c4-8040-9ce4f2c36332",k.Spine_snowworks_json="72a5b25a-bb3e-464b-b023-9330b7cc8ffe",k.Spine_socialfeed_poof_json="e0748643-78ff-4577-a1f3-567965b360f2",k.Spine_sparkle_2_json="65e4176f-66aa-40e1-9e1b-cc491956556f",k.Spine_sparkle_button_json="d5b86d51-51e9-40c8-b11e-69b9cb25c51e",k.Spine_sparkle_button_petrescue_json="810fc55f-5b83-4ef3-94a8-f3b22bc0f5ee",k.Spine_sparkle_pbf_json="301f36f5-f242-4752-bb5c-9dc7b588e3bb",k.Spine_sparkle_worldmap_json="52970e19-53c9-4ee9-bb9c-cac5d85c68c3",k.Spine_spell_astral_impact_json="fc83527c-99a6-45de-9802-66fd576ef070",k.Spine_spell_beebee_aoe_impact_json="e0a42f0d-4274-4503-bff2-2649906be057",k.Spine_spell_bok_aoe_impact_json="a51d7221-d8fd-4346-846a-8be149b4fd16",k.Spine_spell_eve_aoe_impact_json="159c2116-0233-4c22-b246-6ca356c12dfd",k.Spine_spell_fire_impact_json="159c75ee-03f2-416d-9f7f-10526aa59cdf",k.Spine_spell_flora_aoe_impact_json="dda92d38-179c-46e9-8596-3e62a22b10b7",k.Spine_spell_fumble_json="8935cf27-c92a-4603-a3ee-0e44f3c862e8",k.Spine_spell_ice_impact_json="bf28a438-8785-4f91-aa8e-d566f6f4799d",k.Spine_spell_noot_aoe_impact_json="ad317a02-5edb-4132-b5a9-3d2a557554b3",k.Spine_spell_plant_impact_json="cb6cb725-01ad-4a04-af1c-b07e7feb1a7b",k.Spine_spell_shadow_impact_json="108f9f97-b729-43e7-89ea-0f77faf2043b",k.Spine_spell_slurpy_aoe_impact_json="e1c30b47-0f01-42b1-93c5-0eb71f8b350e",k.Spine_spell_storm_impact_json="b12ee3be-96cf-4bc2-9e4f-bfd1d354d2a4",k.Spine_spell_water_impact_json="959fcd45-0c45-4dc7-9ad4-c7574416988d",k.Spine_stage_intros_json="314c0ca6-0c20-43e8-899c-5787c3a4f30e",k.Spine_stair_lock_json="3b3faa30-1c94-4eff-8445-0e615b782494",k.Spine_starjar_json="25f0a9cd-a4ac-4780-9799-750eaad56346",k.Spine_stateChallenges_milestoneReward_json="a3638eb1-108b-45e3-ad43-0e45d2a34898",k.Spine_stateChallenges_rectangleGlow_json="a184d13b-e427-42a7-ba18-2c1ae7ac1dc1",k.Spine_statuseffect_buff_json="0984e03a-4c96-44cb-87e8-7a725c161594",k.Spine_statuseffect_burn_json="95f3e5f4-cabb-4acc-9bcb-e6c74ef4c9ee",k.Spine_statuseffect_cleanse_json="f7c7e44e-89e3-40e3-9f13-1555dc61f1ed",k.Spine_statuseffect_confuse_json="54d6b02d-e05d-4a30-b3ff-a63ae14ec788",k.Spine_statuseffect_debuff_json="aa56d6b8-2880-4900-84ae-c77452b01629",k.Spine_statuseffect_frozen_json="ee5461bd-c4a2-4cd7-861d-f2b432436f63",k.Spine_statuseffect_heal_json="afcaeb58-c01a-408e-a11b-7e73fd56c8fe",k.Spine_statuseffect_shock_json="5fca11d5-698c-4b36-9c50-09f8beb229a9",k.Spine_statuseffect_taunt_json="3b33f7bc-9213-474d-b548-27e1451875bf",k.Spine_storm_eg_single_json="ac67a755-3c46-4547-8eb8-d43a47ef34a3",k.Spine_storm_multi1_json="5ef5090e-da69-435c-8c04-465a5622ae11",k.Spine_storm_multi2_json="cf9d4964-a1eb-4798-a0e4-917c850a25f0",k.Spine_storm_multi3_json="f64da219-29ea-4e48-a795-093126882066",k.Spine_storm_single1_json="bfe8d7cb-f773-482f-820a-25b89f788cdb",k.Spine_storm_single2_json="f4d2eb09-a4f4-4a8c-a88b-3046a7f3a6dc",k.Spine_storm_single3_json="06fe4cad-96f6-432c-b1f5-d4a333239e88",k.Spine_storm_single_create_01_json="27806031-20d0-4201-881a-0f857d43e9e0",k.Spine_storm_single_impact_01_json="49aa8f66-6395-462d-aa7b-e8d3467ac3ce",k.Spine_storm_single_impact_03_json="9399362d-177f-4369-a9f6-0b490799218a",k.Spine_storm_single_trail_01_json="1cf136e9-585b-4a43-aedf-07d915303153",k.Spine_storm_single_travel_01_json="cd0f9883-d35e-496b-bfb8-f0d5a6eedda1",k.Spine_stubbornshadow_json="669693a9-f63b-4488-ab35-78c8bc49dfa6",k.Spine_teleport_fog_json="4b9872cd-ad65-44fa-ab94-a3771b4ec2b0",k.Spine_throw_gift_json="2bfdd297-bb17-4af4-91d3-86bba1f63942",k.Spine_throw_gooball_json="58c4d590-862d-4ce4-afc8-56db823b208c",k.Spine_throw_pudding_json="95fa71c8-429b-431b-8872-5884e9f22cb0",k.Spine_throw_shadowball_json="0c8864e6-7a01-4d4f-9634-0d79bbc54664",k.Spine_throw_snowball_json="6d4e13ef-839b-4027-9fad-260ec3e8319d",k.Spine_throw_staticball_json="0fdc3d0b-cf4e-47c6-ade6-2658a8c504cf",k.Spine_throw_tomato_json="c5412998-f03c-4d18-ad86-7ef12f50147f",k.Spine_tower_elevator_ice_json="af751d21-0f20-4943-8120-c470a2efb8fc",k.Spine_tower_elevator_json="03de5d63-326d-43b5-a8d0-57cf7394e64d",k.Spine_tower_unlock_json="47c8154d-4060-4faf-b9ee-90172f5b12bb",k.Spine_towertown_unlock_json="1b212ea9-d472-45b9-8391-0c00c919cf1f",k.Spine_town_unlock_json="0768d5dd-0448-4244-b3eb-f174c1c1eb8c",k.Spine_trap_door_glow_json="9a7d122c-1b21-460c-be96-a2ef2acaebe2",k.Spine_ui_roulette_json="ea743ba8-af6d-443c-97ef-0693b7ebc86b",k.Spine_ui_unlock_json="f8d80054-fd59-4027-8727-59c78ef168a3",k.Spine_ultra_chest_coins_json="b1df00b2-8582-42d6-b0bb-30ab19a1820a",k.Spine_ultra_chest_json="a2f331e3-ba0a-4c1a-8f79-c7134b1230a6",k.Spine_ultra_chest_sparkles_json="0b8d92ba-b29a-4fc5-b28b-f4c055df4ca7",k.Spine_ultra_modal_json="0a076053-adef-4912-b73a-8dca45c7ba6b",k.Spine_upgrade_radial_json="49dec81e-74df-45f1-af3d-d2eb3e37580e",k.Spine_vegabloom_button_fx_json="553151eb-91d2-453a-bd95-dccceaf88125",k.Spine_warden_bubble_container_json="87dcc185-20cc-4181-bb29-7b9aa3be4767",k.Spine_water_balloon_splash_json="9c38c71b-7b50-48d8-b5b1-dd0d13633536",k.Spine_water_eg_single_json="a5d83ac5-9a39-4f4d-971e-2a22d32d3437",k.Spine_water_multi1_json="911ec137-99b0-42a5-8b71-7dfaab36d5bb",k.Spine_water_multi2_json="24ad5a52-cb70-461e-b571-b8bc7650ec04",k.Spine_water_multi3_json="b1a6c68b-0fc3-4d4d-b621-905076602db7",k.Spine_water_multi_create_01_json="ddd9b47c-713d-4654-9782-daa66a20cda5",k.Spine_water_multi_impact_01_json="28c9205e-6b34-43f0-809f-afef80091df3",k.Spine_water_multi_impact_02_json="f203683d-ffae-4b6c-9a60-980f9d5fe962",k.Spine_water_multi_impact_03_json="ebc02f04-132a-4c72-a4ac-1e835bdd28a8",k.Spine_water_single1_json="f9b045b8-6845-419b-b619-500a4c4012af",k.Spine_water_single2_json="4ed9e0af-ae89-46fd-a151-c8cd6baa66b2",k.Spine_water_single3_json="1736e1ff-7720-49dc-bbee-da12815746ff",k.Spine_water_single_create_01_json="eb06f3ec-53fb-4e70-acf0-f70045c49533",k.Spine_water_single_create_02_json="9f4d7a2a-765a-45fd-9293-e38d12a4e90b",k.Spine_water_single_create_04_json="cee1c753-c9e1-45b3-8530-41b64d7ddf0e",k.Spine_water_single_impact_01_json="dabf6d5d-3084-461d-b401-010eada3c3e5",k.Spine_water_single_impact_02_json="64be31ab-6e40-4842-b420-098f8cef03bd",k.Spine_water_single_impact_04_json="7677528f-dd6c-4c96-ae41-3442616a9ad0",k.Spine_water_single_trail_01_json="ef3d04df-f8aa-4820-99ed-3bd8af1814a8",k.Spine_water_single_travel_01_json="29611ca2-2d5e-485e-85ae-6ca0f710cbee",k.Spine_water_single_travel_02_json="5624c1c1-9170-47dd-a0e9-9977f4e4349c",k.Spine_water_single_travel_04_json="cf2a3e86-1024-4f28-9afa-065437351bbc",k.Spine_weekly_challenge_bar_shine_json="22b27b76-f5b7-43e7-ac7c-d684bbd81aa9",k.Spine_weekly_challenge_bar_shine_narrow_json="b1ce8878-85ae-4de7-b78a-9e93cfbfae20",k.Spine_weekly_challenge_gear_splash_json="4b33100d-2eac-4626-8739-b6ccf65f51c9",k.Spine_widget_gold_back_glow_json="3c590432-e93a-4ded-9bbc-5df1b74e5ee5",k.Spine_widget_gold_curtains_json="52b4cc0c-3e71-4b94-a675-b5eb78da1836",k.Spine_win_streak_fx_json="08147bc7-1137-4834-b244-3747f2b272f0",k.Spine_wizbank_highlight_arrows_json="240127a1-6f6c-4bf5-b0d0-f8d3a7340dac",k.Spine_xp_stardust_json="feb77d5a-6b1e-4f2c-93ba-ef42bfe1d9d3",k.Spine_xpbar_json="35e6c8de-6c84-4070-81dd-d107aaf2449c",k.Starlight_wheel_ui_explosion_json="ae42147f-2626-452b-82ff-1b1c724ca2da",k.Storm_boss_18_json="1284e8c2-1f64-491d-80f9-c2d2a3b7152a",k.Ui_exclamation_point_json="adfb6f59-917d-4556-9dd1-6bc6e6592497",k.Vertical_dorm_149_json="c8fcb677-58c3-44c5-9a88-8b969dd7a3c9",k.Vertical_dorm_150_json="376f0dd1-3a79-4e5b-a130-a253df4f3d3e",k.Vertical_dorm_151_json="e97ff833-c9a5-482e-96b0-193f18994045",k.Vertical_dorm_164_json="c40bbcb5-e068-4918-a307-7f999a54b9b1",k.Vertical_dorm_169_json="45a1b43b-82de-4e5b-8b40-9c2f38dc1e38",k.Vertical_dorm_171_json="508f8f69-39f9-43d6-a967-3e95f4a30827",k.Vertical_dorm_182_json="bfba625d-606f-4074-ad3f-8227d6a90971",k.Vertical_dorm_187_json="b6a644fb-8606-4395-9578-34323b130f77",k.Vertical_dorm_202_json="194ad7e5-6c52-4b09-84a5-ad5cdcba126f",k.Vertical_dorm_204_json="84269f57-8130-4033-8cea-50f632ed0c7b",k.Vertical_dorm_206_json="fb457271-af4b-493a-8b86-bdef84f904bb",k.Vertical_dorm_213_json="ad58cb4e-07ef-45d3-8c02-ef18b226f58c",k.Vertical_dorm_228_json="94abe624-b7ed-4cb5-a5bf-88b4f055c84c",k.Vertical_dorm_235_json="be957dd8-1be1-4772-ad73-0ec86879d017",k.Vertical_dorm_236_json="d306b289-6418-4e4b-ac5a-384f6c7c9504",k.Vertical_dorm_242_json="eefb91d3-c32a-425c-bf2f-82b735f26a59",k.Vertical_dorm_247_json="de966ddc-43ee-44e6-b6eb-ddfb5f0007d5",k.Vertical_dorm_248_json="8aa786bd-7f9a-4286-ae9e-8d6c9095ef67",k.Vertical_dorm_249_json="02c10e9f-a3fc-412b-bdec-8e5d778ec0dc",k.Vertical_dorm_250_json="f397dec3-d99d-4cb8-b3f0-fa9e51117c4c",k.Vertical_dorm_251_json="408f9fec-2fc7-42ae-b3dc-51d363b3f2f3",k.Vertical_dorm_257_json="cd7d1d94-1384-4b64-814f-5568d8962fef",k.Vertical_dorm_273_json="d4ef92b6-8374-4840-8b41-6ff901a35dd6",k.Vertical_dorm_276_json="f3278cda-37b6-4158-91d9-9d816927dc65",k.Vertical_dorm_284_json="f987b2c7-8fce-4dd1-9aa5-852fe12ad2f7",k.Vertical_dorm_287_json="f935c283-a64b-40e7-b163-69912f5fb8d5",k.Water_boss_18_json="83754d21-6ea8-4c2c-8a01-a15317a5e90f",k.Wishie_mlp_json="68a39dbd-05d6-4964-935a-453b82aa1a02"}(F||(F={}))},47101:(k,B,U)=>{"use strict";var F;U.d(B,{N:()=>F}),function(k){k.Battle_academy_classroom_icetower_json="7d49da25-cd3e-454d-91ef-0a3b093d6797",k.Battle_academy_classroom_json="9fef2c8a-2ff5-4670-9588-7204f3c70691",k.Battle_academy_gh_stairs_json="1f3b1af5-5868-4801-b68b-5338e46c0014",k.Battle_academy_office_icetower_json="56774bcb-6165-4235-829e-d5558d1a231b",k.Battle_academy_office_json="7ce67cd8-aa5a-4efe-af8c-2fd128061016",k.Battle_archives_json="5d4d4526-8264-4db6-bd65-8d8be4868e2e",k.Battle_bonfire_inside_json="4f9b4c38-36d4-4dcc-83c3-aa39e345fd6c",k.Battle_bonfire_lava_json="545efb2b-e4e2-4797-927d-f5f0fadc1672",k.Battle_bonfire_outside_json="4908067d-bf10-48bd-9341-81ae43b755de",k.Battle_coliseum_outside_json="be143d35-4108-4619-9333-ef105a97d25e",k.Battle_forest_generic_json="29f4ad28-df74-4133-958f-12bbde4cc27f",k.Battle_forest_outside_json="62ae1ab1-881c-472f-bc99-7eb63564e017",k.Battle_lamplight_outside_json="f369358a-fdea-43c7-83e6-c1a5b1f3e467",k.Battle_lamplight_outside_pumpkinfest_json="087fd393-236a-4749-bdd7-dca2b7708960",k.Battle_lamplight_outside_starlight_json="9d7b7d41-fa35-41a7-af78-87398d3eeff1",k.Battle_lamplight_outside_winterfest_json="e30f311b-73b7-409c-8850-46f8ae854b3c",k.Battle_shipwreck_outside_json="19cbd9ec-281e-4fe3-80fc-72edfd2289ba",k.Battle_shipwreck_underwater_json="ef6a2f9a-5d14-4afd-8767-e34ca09db5ee",k.Battle_shiverchill_inside_json="9ee1391b-9efb-4898-ac14-7d0168d82825",k.Battle_shiverchill_outside_json="d0e470ef-38cc-4dc7-8259-ab85abd2cf5a",k.Battle_skywatch_inside_json="9b95d790-0d89-48dc-a95d-add23a4d3885",k.Battle_skywatch_outside_json="19a67124-2042-4cb6-a4b9-4a39c0d02002",k.Battle_tower_inside_json="0a2117f2-2b4e-463b-b22d-00e4b9404e03",k.Crystal_caverns_hub_json="67ec1606-d695-41ec-88ba-6876f7fe0d00",k.Crystal_caverns_phase_1_background_json="a1c2a605-dc9c-4f76-b363-bbeca6debfe9",k.Crystal_caverns_phase_1_foreground_json="364efa34-077f-4d8b-a3bc-0d7d2a6777c1",k.Crystal_caverns_phase_1_parallax_json="2e392de6-e42b-4458-ae71-287de0e58182",k.Crystal_caverns_phase_2_background_json="0759b3af-02fa-4370-ae7a-15d22f098faf",k.Crystal_caverns_phase_2_foreground_json="639a8a61-d3d5-4688-ae08-93a6c603ac7d",k.Crystal_caverns_phase_3_background_json="2bf362ab-3412-4271-acfa-d3910b5ad7fb",k.Crystal_caverns_phase_3_foreground_json="fa8fe6cf-9119-4e64-807e-de26623989d8",k.Map_academy_gh1_json="e368d1be-87e5-4430-b111-4c572c5bf5d2",k.Map_academy_gh2_json="7fac7cc0-b2ea-40ec-ab7a-8d7881a7ad85",k.Map_academy_gh3_json="66955673-b9fd-41c0-8f6e-5f6968635b0f",k.Map_academy_gh_landing1_json="8776e2d9-a129-4c22-91a9-a07641113f07",k.Map_academy_gh_landing2_json="18d3ebfe-6368-49df-8378-6209646ae4d9",k.Map_activity_zone_a1_json="6cf5e606-bc7f-4fc3-9ad0-00cda2115950",k.Map_activity_zone_a2_json="a24eb7dd-550c-4340-9958-4244e2591441",k.Map_activity_zone_b1_json="ceb89fa1-b2b5-4da6-a492-9404e3ae7b27",k.Map_activity_zone_b2_json="03655c7f-c72b-463b-93f3-d109d2ec4a04",k.Map_activity_zone_b3_json="77ec3144-7a26-4956-b9f7-fbe3410ec253",k.Map_activity_zone_c1_json="8bb9bd9f-8113-4fb7-966c-073a341a14ce",k.Map_activity_zone_c2_json="3ff46e9d-7cf2-4b06-a6da-1c45d91129a9",k.Map_archives_1_json="311dbf4a-b04a-48fe-a2a9-267e63beb953",k.Map_archives_2_json="44d9ddfa-22ce-4183-97db-501a18887620",k.Map_archives_3_json="89d5a130-6fa5-498e-8257-d33f6ed6b934",k.Map_archives_4_json="275353a0-87c9-4583-a276-072fdc6c1284",k.Map_archives_5_json="f3ae2e17-8f05-459f-8b62-91c0fa16427d",k.Map_archives_6_json="eeb51aca-74d2-40d0-81d6-204bcb6280ef",k.Map_archives_end_json="01a9311b-7cf6-4026-b028-730510f2007b",k.Map_archives_m1_json="d691783e-9b59-468b-9050-bbd2aa9d8cef",k.Map_archives_m2_json="6937feb7-cc3b-4336-bd43-1ae115460f8a",k.Map_archives_m3_json="ff2ad1f6-6321-429a-8e82-f16213a52f02",k.Map_archives_m4_json="77edf0e1-c08e-43ae-ad45-c4dc03ff139d",k.Map_archives_m5_json="89092716-a398-4cc1-a8d0-f0e842bf0f7b",k.Map_archives_m6_json="215616cc-65f2-4da3-98fe-9cca6386a647",k.Map_archives_m7_json="6585633a-8266-4743-a734-03646f2c4ccd",k.Map_archives_m8_json="736ec08d-5930-4a04-abe5-11a7cecc365e",k.Map_archives_m9_json="fdc1d768-c5c5-4b7f-8149-7e6764b0edc6",k.Map_bonfire_spire_a1_json="d12078ba-8fe3-4f4e-bc02-cb46fc26f3f2",k.Map_bonfire_spire_a4_json="cbdb465d-d4cc-43db-97b0-be7f202772d9",k.Map_bonfire_spire_b1_json="bc8ae623-0245-4eab-826c-04761cdb9c16",k.Map_bonfire_spire_b2_json="c2649e06-fb82-4bc8-9f73-8d7cc5db8b96",k.Map_bonfire_spire_b4_json="39599574-6a7b-4390-9ef6-083d7143ce62",k.Map_bonfire_spire_b5_json="dd594a6a-df51-4086-9bd6-9c70d508926c",k.Map_bonfire_spire_c1_json="a11d5293-ffc0-4f17-a0cc-8dce070aef82",k.Map_bonfire_spire_c2_json="302edc0c-4538-4427-8f9b-5ef8a1aaaf2a",k.Map_bonfire_spire_c3_json="fe6824a0-4108-473f-a655-b9e85784624d",k.Map_bonfire_spire_c4_json="83fcaf30-6470-474e-accb-104f49c3a992",k.Map_bonfire_spire_c6_json="a90760f6-6eae-47f6-88f8-bfc6d32aff74",k.Map_bonfire_spire_d1_json="e1f45bcc-ea11-40d5-bd64-92305402a869",k.Map_bonfire_spire_d2_json="96c0b5b5-592d-4315-b34e-476423793798",k.Map_bonfire_spire_d3_json="d0b6c992-94fa-49d9-8d6c-6529f1a8aaf6",k.Map_bonfire_spire_d4_json="8a16f2a1-7916-4a47-879a-eeca5bd69d31",k.Map_bonfire_spire_d5_json="9e34ab11-3be2-444c-8631-e84f650d25bb",k.Map_bonfire_spire_d6_json="419bca8c-c873-4695-ae4f-6b487dbfa996",k.Map_bonfire_spire_e5_json="503b5480-e931-4c57-8171-e06673329d8c",k.Map_bonfire_spire_e6_json="5cd6758d-d72f-4065-b431-06abc3436967",k.Map_bonfire_spire_titan_json="4ed1c250-e13a-42f9-9b49-040c5ff7c63d",k.Map_cloudzone_a0_json="13a81610-b279-4204-96be-89f52ada9289",k.Map_cloudzone_a1_json="ddabfca2-b147-40d0-a8c7-25f2a40da099",k.Map_cloudzone_b1_json="cc657f0a-5691-42a0-a80e-b147917d46b4",k.Map_cloudzone_b2_json="dd38895f-209a-4342-958f-33aa31e97c7a",k.Map_cloudzone_b3_json="fa0bd594-795c-42dc-a3ce-e60e2002e0b4",k.Map_cloudzone_c1_json="3531dedf-e8f2-452f-9c6a-21399d191fba",k.Map_cloudzone_c2_json="41d055f3-c052-4880-a9f5-221ca7e75285",k.Map_cloudzone_c3_json="fed3034d-73e3-435f-bb0f-270b1b31bfb3",k.Map_cloudzone_c4_json="79161e15-a752-4c37-b965-90847cdd4b92",k.Map_cloudzone_c5_json="e9ce0e15-6b4e-45b6-9301-d9beb0528fab",k.Map_cloudzone_d1_json="0b7cec16-769b-4309-8b8e-9a9f9a2da4be",k.Map_cloudzone_d2_json="78f761e9-8505-4df6-bf1b-36ffcdc1504d",k.Map_cloudzone_d3_json="ef7e35b2-7aa4-4324-9907-490f3a2c2637",k.Map_cloudzone_e1_json="5ab29754-ccf3-49b2-b579-ba3462ebc75d",k.Map_cloudzone_e2_json="de12de37-184f-4ca6-b594-6f5647fb50d3",k.Map_cloudzone_e3_json="26210f2e-5b07-4eb0-b3a1-cac5873c0a9e",k.Map_cloudzone_e4_json="7411bffa-00c9-412d-b5b8-bb9bfa31be9a",k.Map_cloudzone_e5_json="5e195979-4a63-46ec-a5f5-9f7a9ab64d8c",k.Map_darktower_a1_json="a62c4de0-5300-4317-a0a9-9598ac39b041",k.Map_darktower_a2_json="51efddc1-b4ab-4dcd-8ef1-3a661d2dc3d0",k.Map_darktower_a3_json="e12566fa-dc26-42dd-bda5-908c50dd36a6",k.Map_dragon_isle_a1_json="efb34781-2be6-4238-a552-c2d8b85f303d",k.Map_dyno_a0_json="d5ec0a21-90ec-445b-af1a-124353adc44e",k.Map_earth_tower_10_json="f6fb0da4-a3b1-47cb-ac4f-a2b915b65d5f",k.Map_earth_tower_11_json="65c450f0-d029-49ae-9144-b65e13a49af4",k.Map_earth_tower_12_json="d44fedf4-0696-4c30-a818-97f7454fe2fc",k.Map_earth_tower_13_json="f73470dc-4b50-4f69-9227-ee7efaaf8f95",k.Map_earth_tower_14_json="c6375e14-8644-43d2-9e2a-5f37a5cbb505",k.Map_earth_tower_15_json="e6f9f23c-0f15-4adf-bd9e-f1e17559100d",k.Map_earth_tower_1_json="cc77f431-ba69-4af1-b89c-dfc8f597daf6",k.Map_earth_tower_2_json="8e029ac4-4654-4c97-a05c-f0d1b6e72108",k.Map_earth_tower_3_json="3d275749-b660-4c6d-8a0a-4bf5be7b26b6",k.Map_earth_tower_4_json="e60ab106-eb77-4f9e-9976-438a70c53cda",k.Map_earth_tower_5_json="b5ff2b72-30da-4ce6-8087-70d19126d756",k.Map_earth_tower_6_json="f6861c24-801f-4fb9-aeca-0eca0525c4fa",k.Map_earth_tower_7_json="4122e07a-797a-4298-bc53-252533379922",k.Map_earth_tower_8_json="15d8bf9d-c300-48a9-b8d3-008c9bf1d454",k.Map_earth_tower_9_json="3ed1d40e-fcae-4bd4-bb5c-c4b5b42c732d",k.Map_earthtower_common_json="dccefce9-1c05-4c1f-bce6-257dd3d489da",k.Map_earthtower_entrance_exit_json="e78f6b6b-01f6-49c7-8709-bdafc999fdff",k.Map_earthtower_warden_json="1ab3cd34-4a81-4311-8921-9bdb508b5eb7",k.Map_forest_a3_json="0f9613a0-15b1-453c-ac95-caf71a6d2106",k.Map_forest_a4_json="be652e02-f73a-44e2-b7e8-80b4a004e81a",k.Map_forest_a5_json="ec3831e2-6820-4412-8909-258f218b086b",k.Map_forest_b5_json="df61688f-eb72-491b-bfb7-86ae6673f87a",k.Map_forest_b6_json="e73e186b-692e-4288-9266-b105a9243712",k.Map_forest_b7_json="ffde6bdc-56b3-494d-adde-3e4e68904377",k.Map_forest_b8_json="de33d472-2a90-42c6-8a92-18836f608563",k.Map_forest_c4_json="0636c558-1841-4a0c-a707-a3bc3e32b981",k.Map_forest_c7_json="237c6716-58e2-46b4-97da-4b1cbd134c0b",k.Map_forest_c8_json="91f4e20a-54e5-443c-9260-5a288944ef8c",k.Map_forest_d3_json="2d235c44-f3c0-47fa-88b2-e3ef17da226a",k.Map_forest_titan_json="5aaa3b75-0bdb-46bb-bff5-e9cc1939b8e9",k.Map_house_cool_cave_json="8aee8a68-806e-4485-a73b-159a6371f362",k.Map_house_cool_cave_unique_1_json="e4a32a1a-931b-4f81-a3e5-0c981726fd7b",k.Map_house_cool_cave_unique_2_json="030b5f0a-1d95-421c-9c39-8f101371016c",k.Map_house_exit_json="6e3821b0-137e-4c98-9f4c-cea9fb05ddae",k.Map_house_exterior_json="eb11b8eb-9559-49c9-9e21-61b775ecf3cd",k.Map_house_fire_pit_2_json="40a1b488-056a-4847-99f6-537261e90d23",k.Map_house_fire_pit_3_json="2e008042-f44b-4d68-a0dc-5fe07a3182e0",k.Map_house_fire_pit_json="dd47c602-abca-4135-be16-69fd063d8191",k.Map_house_forest_json="8994dae5-6ede-4258-9358-d2ca0fb42f92",k.Map_house_house_large_3_json="17971061-851a-46d8-8d66-1094b2cd1fa0",k.Map_house_house_large_4_json="6e77fe17-29f8-4fba-a8ff-5da649e54c34",k.Map_house_icecaves_json="5d34d393-6660-4837-81fc-8deeb1cbb61f",k.Map_house_large_0_json="963bb4e4-648d-4b80-b5b6-79b89bc0808f",k.Map_house_large_1_json="86b4384c-766e-4011-9ea8-cb09a81cd504",k.Map_house_medium_0_json="4e81e52c-8c63-4b04-bd7a-e598e2d97a4a",k.Map_house_medium_1_json="c779f818-7705-401e-b4a0-f5065262cd51",k.Map_house_small_0_json="69382cb8-511c-4e94-bfc1-bb7333f381b7",k.Map_house_small_1_json="9971dab3-54f1-4e26-bd7f-800d014441fc",k.Map_house_suburbs_json="99db977c-0fc5-474d-b6f1-dc139ee593ff",k.Map_house_treehouse_json="a92f25ef-1cef-4417-88fa-113ed219da5b",k.Map_house_treehouse_unique_1_json="a3628526-3c9a-44f7-8902-75c3640cd3b8",k.Map_house_treehouse_unique_2_json="3b796247-bec2-459e-ad29-a1b82cc28949",k.Map_ice_tower_10_json="98b3debe-07cd-4301-8ebe-742211db6c2d",k.Map_ice_tower_11_json="65da3846-69c9-4b19-9529-24498a76f894",k.Map_ice_tower_12_json="5724d45e-43c7-4d8f-90c0-0af2314e5340",k.Map_ice_tower_13_json="2adbc0ca-84c8-48c9-a5d0-7bcf669748ea",k.Map_ice_tower_14_json="45c49aea-da29-4da8-badd-f61893fa9679",k.Map_ice_tower_15_json="926ccfb4-3761-4c80-87d8-8c8699e0c9f7",k.Map_ice_tower_1_json="0e2f5edf-6efe-4b45-9dac-dea34ad33b48",k.Map_ice_tower_2_json="aeb695ff-0b35-4528-b17c-60276398c5fa",k.Map_ice_tower_3_json="f772bbae-e686-45fe-bf07-1a6cdb8d959c",k.Map_ice_tower_4_json="0bd5ab5f-010d-485a-a22a-ed7489ecf054",k.Map_ice_tower_5_json="c981753b-ba79-4216-aed3-7bb5842ddcde",k.Map_ice_tower_6_json="0e2bd8df-9e94-416f-9a7d-cfad65c00b5d",k.Map_ice_tower_7_json="247a9027-68d3-4ea1-88a3-706a5a5ed79d",k.Map_ice_tower_8_json="7abc5a4b-73b5-439a-98d5-3ae7fefbc875",k.Map_ice_tower_9_json="af8d4bf3-209b-41ae-96d2-d24038c7387a",k.Map_icetower_common_json="786d4027-d807-4f39-b094-c0896dd2567d",k.Map_icetower_entrance_exit_json="8006d32b-c9e8-4b23-8378-ea5892db1275",k.Map_icetower_warden_json="61372b71-e108-4ed4-b486-6b9425066a96",k.Map_lamplight_a1_springfest_json="6e6343a5-4b78-4cf8-93d3-26fd6fb76443",k.Map_lamplight_a2_json="dce42698-5575-4976-b648-569a3b948712",k.Map_lamplight_a2_pumpkinfest_json="82dabf44-94be-4058-a564-beec1d7e1ef4",k.Map_lamplight_a2_springfest_json="a0eafff5-da33-4ed4-b7e4-09b80b7637e3",k.Map_lamplight_a2_starlight_festival_json="a961eaa2-dfd4-4a2a-bb08-da9231bb36ad",k.Map_lamplight_a2_summerfest_json="99954158-5410-4018-aedf-e7597be0580e",k.Map_lamplight_a2_winterfest_json="4babc52a-18e5-4191-a3cc-81fa0f454f5e",k.Map_lamplight_a3_json="bfd9c837-cc31-426b-a1e3-edf0e3144e2a",k.Map_lamplight_a3_pumpkinfest_json="a1945e8f-3f41-4a83-acd2-7556768b797c",k.Map_lamplight_a3_springfest_json="afa5814c-1507-477d-afe5-6243e9e1ba29",k.Map_lamplight_a3_starlight_festival_json="68c65c8b-7a64-4a89-8304-6cf169034903",k.Map_lamplight_a3_summerfest_json="4b83b20b-6d90-495c-9577-ac8aec49e251",k.Map_lamplight_a3_winterfest_json="d2c65f0e-eaf2-40e6-84cd-d2ae29529455",k.Map_lamplight_a4_json="61263e6e-bfc9-4668-b2e8-881b76def550",k.Map_lamplight_a4_pumpkinfest_json="38153cdb-7771-43d9-acd7-c938b0b9aa6a",k.Map_lamplight_a4_starlight_festival_json="d02008b2-0110-44fb-8da6-60012bb63dba",k.Map_lamplight_a4_summerfest_json="40bd8b6e-7cf2-4164-84d2-956cc6aefd28",k.Map_lamplight_a4_winterfest_json="352ce646-9ee4-41c2-b181-6eadee3bbfd4",k.Map_lamplight_arena_lobby_json="b5624cc9-0c76-452b-bd1a-97138c13c80e",k.Map_lamplight_b0_json="32f78086-cb1c-4127-9978-6055559fd2b8",k.Map_lamplight_b0_pumpkinfest_json="dae98119-e6f6-4c07-8a93-1798a108bef5",k.Map_lamplight_b0_starlight_festival_json="d78de4de-8ef7-48c7-8528-9691447d68eb",k.Map_lamplight_b0_summerfest_json="c93f58ab-f9be-42ad-a958-7cc25328cabf",k.Map_lamplight_b0_winterfest_json="fb9f2c09-b2a3-4045-aade-77d4a1e0ce58",k.Map_lamplight_b1_json="8e811293-d379-41de-8720-c0049fa46362",k.Map_lamplight_b1_pumpkinfest_json="41c54c3b-e186-4fc5-bca7-76ded96fde5e",k.Map_lamplight_b1_starlight_festival_json="4279fa93-7996-4769-8079-5d14794c86b5",k.Map_lamplight_b1_summerfest_json="bccbf96b-2e1c-4832-9ee5-e85bee48f881",k.Map_lamplight_b1_winterfest_json="de3f41c5-5e8d-44b9-8049-991713e53204",k.Map_lamplight_b2_json="ceb45405-70a7-4f5f-8f5c-2a89cc10798e",k.Map_lamplight_b2_pumpkinfest_json="34e060a2-9a81-46c8-8b39-700b41b80bf2",k.Map_lamplight_b2_springfest_json="04b68c4b-3989-429e-9188-9c92a00d7956",k.Map_lamplight_b2_starlight_festival_json="be9cf36e-87e9-4f5a-9870-f0573e74cac0",k.Map_lamplight_b2_summerfest_json="f1d33a4f-d3fb-4f63-bdb8-90875ed157d5",k.Map_lamplight_b2_winterfest_json="9dacdf6b-b677-4847-9209-1e3edb965630",k.Map_lamplight_b3_json="7a915a22-7467-44fe-b0a5-68040ae1dc82",k.Map_lamplight_b3_pumpkinfest_json="f9856954-5342-48e7-b0a1-151c3c27bb9d",k.Map_lamplight_b3_springfest_json="a9f9cde3-4e9e-4bd3-8008-fd32ad23360c",k.Map_lamplight_b3_starlight_festival_json="19e6656b-2a3d-4daf-9777-44ffe76b6c71",k.Map_lamplight_b3_summerfest_json="ca0f361f-ba47-4361-bf6d-9143f42c98ed",k.Map_lamplight_b3_winterfest_json="b945731b-7547-4256-b2da-c85818458c7d",k.Map_lamplight_b4_json="d8e18060-6beb-45df-b1a8-118f67475439",k.Map_lamplight_b4_pumpkinfest_json="df1968b8-c265-4707-b8e9-dae14edea36d",k.Map_lamplight_b4_springfest_json="b4080056-1d32-4c8d-a560-37e551fff5f8",k.Map_lamplight_b4_starlight_festival_json="56441d64-8ac6-433b-af84-3a78de66a668",k.Map_lamplight_b4_summerfest_json="f1f14e7d-b33d-4d6b-b52a-f217303dcc7a",k.Map_lamplight_b4_winterfest_json="b7a1d9d4-7b88-4ece-83a8-54bba771225d",k.Map_lamplight_b5_json="647188fe-8c93-4c61-bf53-23240caa0e2d",k.Map_lamplight_b5_pumpkinfest_json="96ae4ae5-4e35-4a24-8410-5b7b8472683a",k.Map_lamplight_b5_starlight_festival_json="9729a2ed-918b-4933-98c5-6dd472fdb980",k.Map_lamplight_b5_summerfest_json="0ad330f9-7108-4994-82fb-039b5ed82fab",k.Map_lamplight_b5_winterfest_json="b7aad8f1-01e8-4c22-8f02-0231fdfc50e5",k.Map_lamplight_c1_json="0580bd3c-2fa0-4fa1-bbea-823f0bbeb306",k.Map_lamplight_c2_json="cd85ee5b-1eb5-47db-9287-8037e5b74973",k.Map_lamplight_c2_pumpkinfest_json="ed9156f1-593e-457f-854a-a749b4bdae61",k.Map_lamplight_c2_springfest_json="3ba57b9e-dc6b-40ba-92bc-73161b629fa3",k.Map_lamplight_c2_starlight_festival_json="637b3d70-59ee-4de5-ac4f-b59c2de065bf",k.Map_lamplight_c2_summerfest_json="1dc6d0ac-e716-4b98-bd23-aaa1e487f73c",k.Map_lamplight_c2_winterfest_json="9f155a71-5df6-4b50-bf5d-ba0fb3ac8f8e",k.Map_lamplight_c3_arena_json="64471176-0054-4f42-8987-9a1562770093",k.Map_lamplight_c3_json="e385a4f0-8957-457b-8221-7764dd7bfff1",k.Map_lamplight_c3_pumpkinfest_json="193f3dc3-263b-4d19-abdc-efdef4530e9f",k.Map_lamplight_c3_springfest_json="f2f105f7-fce2-4ade-b12f-f15dbfe1d62f",k.Map_lamplight_c3_starlight_festival_json="215ad692-55ab-4ea3-9ce3-9e44dd15df1e",k.Map_lamplight_c3_summerfest_json="2445d1e5-c0f8-4918-ae71-9d6827e9f52f",k.Map_lamplight_c3_winterfest_json="e5812a74-8a81-4872-817b-8173876d3fe8",k.Map_lamplight_c4_json="1e589d19-1816-4c5f-b13c-fd2cb2750cb7",k.Map_lamplight_c4_pumpkinfest_json="9f521645-64b3-4258-a067-e861246b6794",k.Map_lamplight_c4_springfest_json="2c4819b0-d497-4d28-8d4a-31cf492ca4eb",k.Map_lamplight_c4_starlight_festival_json="77581531-9f9c-4811-aa99-bb7bd8c770ab",k.Map_lamplight_c4_summerfest_json="4d80ca6c-00ac-4421-b946-d7f80b85f8ac",k.Map_lamplight_c4_winterfest_json="b808a71b-fcfc-4f8e-9366-6035296c128f",k.Map_lamplight_coliseum_json="295c36f9-d284-409c-9f9f-1340f09b9c0f",k.Map_lamplight_d3_springfest_json="9d93ce95-7824-437a-a474-f7cbe156f9e7",k.Map_moon_a1_json="98c8873f-cbf3-471e-b7b3-5f07b72597d1",k.Map_moon_b1_json="717ffcfc-1186-465e-adaa-88b4ca207a94",k.Map_moon_c1_json="e7cdd83d-76b0-416d-b037-58a1e0c3bba9",k.Map_moon_d1_json="37773050-b869-4531-95f3-f8119583b672",k.Map_moonlight_a2_json="4b411022-9f2f-41ed-a6ce-bd3aaf229d0c",k.Map_moonlight_a3_json="52173e05-da54-4526-ba44-5e2913387fdf",k.Map_moonlight_a4_json="2171b9c4-6217-4012-bc90-72988f023e8d",k.Map_moonlight_b0_json="60b92e5f-3e1f-41f9-bd61-6dbbf291dd98",k.Map_moonlight_b1_json="5a2ca7a2-6667-4533-9029-87c0a762d64b",k.Map_moonlight_b2_json="bd7320db-bfd1-4f65-a87d-cab576787cc6",k.Map_moonlight_b3_json="6c3a5c2e-2f1b-4e66-ad58-29c2db3ee6cb",k.Map_moonlight_b4_json="8006fb7b-645b-4fd9-8380-bd10760ddd2e",k.Map_moonlight_b5_json="a78feb3c-019f-44c6-ad34-1160574bd21b",k.Map_moonlight_c1_json="39ff980a-55bb-4f88-947d-2a19aeebf6e8",k.Map_moonlight_c2_json="3d046ff2-39fd-41a5-9fa9-4ada9be70ffe",k.Map_moonlight_c3_json="42d4fcf6-fee5-48d7-9147-ba9a6aafe728",k.Map_moonlight_c4_json="fc87db94-e007-4050-b725-7a6e3601b026",k.Map_pathing_json="ad74b143-ef72-4083-ab46-d26a78c635ae",k.Map_shipwreck_shore_a1_json="bec0fc58-9498-41d0-8ada-45d417b75ec3",k.Map_shipwreck_shore_a2_json="7828b92d-12f3-4cce-95d9-adfaae779b39",k.Map_shipwreck_shore_a3_json="74c29f00-0b9f-4d8b-b2ca-d5eb7202b2c9",k.Map_shipwreck_shore_a4_json="e8b71722-1d60-4151-a0ba-91d39c463c7e",k.Map_shipwreck_shore_a5_json="7ce77ade-9350-4373-94a1-4d4ed5699bb1",k.Map_shipwreck_shore_a7_json="3fa802db-97ff-4dbb-b2b4-c76feda8da48",k.Map_shipwreck_shore_b10_json="1a935356-f241-4326-9ac9-74e173f45aff",k.Map_shipwreck_shore_b11_json="fe0144bb-89f7-4eca-96b2-68c497aa8054",k.Map_shipwreck_shore_b12_json="4aebd662-3bca-4d9a-b924-400ac15b7900",k.Map_shipwreck_shore_b13_json="f1459839-5d3e-4aaa-a0d5-bd0d37ba51c5",k.Map_shipwreck_shore_b2_json="fbd11b50-3a91-4724-b61e-894346ef61a5",k.Map_shipwreck_shore_b4_json="b0458fc9-6b21-40b6-81b6-912a11da6728",k.Map_shipwreck_shore_b5_json="f5029804-c0c0-4e9f-9627-c4df9304c396",k.Map_shipwreck_shore_b6_json="ac6a0b84-a791-4344-9057-b92cdccf4e0d",k.Map_shipwreck_shore_b7_json="2b185475-f2cd-4ffc-9b7d-6ad5fe0af712",k.Map_shipwreck_shore_b8_json="b32775d2-a9d4-481f-840d-5e479aff59a6",k.Map_shipwreck_shore_c10_json="2ff7db73-56df-41e1-a209-4cce4a069c77",k.Map_shipwreck_shore_c11_json="4f2a8777-504e-4dee-b0fe-4e6799e220bc",k.Map_shipwreck_shore_c12_json="5efd7fe7-f0b8-42e4-8f87-4a938009f84c",k.Map_shipwreck_shore_c6_json="4aed6f9b-7835-40e5-bb0f-8a82c8deee1d",k.Map_shipwreck_shore_c7_json="ae454cb2-5374-4eb5-b6df-35d19ec2ce8a",k.Map_shipwreck_shore_c8_json="ef0bbe73-7fdb-49dd-b30c-520f6434cfb5",k.Map_shipwreck_shore_c9_json="98b2032d-5b74-4f77-b656-5f9c690ab3f9",k.Map_shipwreck_shore_titan_json="1c37b8a2-452e-4b05-81b7-807f328e6695",k.Map_shiverchill_a10_json="cdabef39-c9bb-47e9-bcbf-f00277b3dfc9",k.Map_shiverchill_a11_json="1a34be63-f9c1-4d96-b3b5-6889e832832b",k.Map_shiverchill_a2_json="edba1fdc-0d0e-45ce-850b-ff83541d9b55",k.Map_shiverchill_a3_json="bfd5c27c-e0c8-4c8d-a412-b778aa233071",k.Map_shiverchill_a4_json="1c6760f4-0e81-4fc9-9a6b-73cb45da0071",k.Map_shiverchill_a5_json="c5df7827-ecf4-49bb-8747-2e8752a6ce92",k.Map_shiverchill_a6_json="f2d082d1-52b2-4946-adab-df924380347a",k.Map_shiverchill_a7_json="4b29995f-c861-48da-9dab-745e7587c12d",k.Map_shiverchill_a9_json="30a852bc-98dd-459f-836a-b95fd7d0bb74",k.Map_shiverchill_b10_json="5c7ca665-e511-4484-8efd-ab57c80a7335",k.Map_shiverchill_b1_json="151a0cab-965f-4c29-b2a9-67f72ad02ae4",k.Map_shiverchill_b2_json="54da27d7-cfea-4113-ac75-5890faf8c4f2",k.Map_shiverchill_b3_json="19ac3604-1bbb-4b61-93de-e87836cfe63d",k.Map_shiverchill_b6_json="486e7b36-c4d7-417a-b7f1-58aa3148538c",k.Map_shiverchill_b7_json="adeb5b70-e9bb-45ca-8cf6-aa34867555d1",k.Map_shiverchill_b8_json="275892c1-37f0-4c5a-bb7e-105be4dc9401",k.Map_shiverchill_b9_json="cbfc5029-bebc-4836-a62c-1dda4e79ec38",k.Map_shiverchill_titan_json="464e035a-5fc1-4d89-ad75-de065061ad48",k.Map_skywatch_titan_json="bf21572c-1080-4e3e-9390-0d5ba3770888",k.Map_springfest_grotto_a3_json="b9752a87-c7dc-4342-b0e8-4fa103714f82",k.Map_springfest_grotto_a9_json="ad4769f4-ebb5-4dab-a52b-ccc13a72184f",k.Map_springfest_grotto_b2_json="82fde97e-35f9-4355-bf9c-bc4da0f82a0c",k.Map_springfest_grotto_b7_json="66b3b0ef-b029-4507-91e5-8e1185dcddf1",k.Revamp_battle_academy_classroom_icetower_json="bf36ed9d-a1bd-4bc6-8e07-dc2e9deb9bc2",k.Revamp_battle_academy_classroom_json="c2efc300-2e72-48d8-b646-e7c14b85fd63",k.Revamp_battle_academy_gh_json="b9aed696-a108-4316-8077-3defba917de6",k.Revamp_battle_academy_gh_stairs_json="4123602a-6dd1-4725-b802-58d05ff2d347",k.Revamp_battle_academy_office_icetower_json="5e70d317-5751-462f-98b7-e9f30afbe201",k.Revamp_battle_academy_office_json="dd1bdac4-6044-465f-8fbf-7daf26e2fe1e",k.Revamp_battle_archives_json="e15c44a9-c33f-40bc-a642-ca66f95d60e2",k.Revamp_battle_bonfire_inside_json="e3c28dc8-7dcb-44ff-a608-fd590f3fa845",k.Revamp_battle_bonfire_lava_json="a647e914-8b32-4922-b9e5-ae978a730206",k.Revamp_battle_bonfire_outside_json="dec06b03-e1bf-436d-9851-9146a4704995",k.Revamp_battle_forest_generic_json="33bc6173-8b90-4551-a073-f1d151435556",k.Revamp_battle_forest_outside_json="fefa5d15-5bc4-4f9a-bebb-3b73f2790130",k.Revamp_battle_lamplight_outside_json="a24c0a86-53dd-4cd6-b9fd-2b63e0339ea0",k.Revamp_battle_lamplight_outside_pumpkinfest_json="f6ce851b-7496-489d-a349-8ae89e8c69bc",k.Revamp_battle_lamplight_outside_starlight_json="d3ca4b14-fc38-4bbb-a796-c49304887694",k.Revamp_battle_lamplight_outside_winterfest_json="bc3d2d9d-7241-4312-9d00-8db6707b88ea",k.Revamp_battle_shipwreck_outside_json="db312186-2056-428a-9b55-2d9c06600ceb",k.Revamp_battle_shipwreck_underwater_json="0f426554-dd99-4c93-9aab-a72c55a6e247",k.Revamp_battle_shiverchill_inside_json="0c099d65-b1ce-4f12-bfb1-12af03b99690",k.Revamp_battle_shiverchill_outside_json="8ecc5bfc-7caa-4619-a85c-ba4f784beafa",k.Revamp_battle_skywatch_inside_json="52e7e267-cba9-49e0-a2ae-10ebdc9c2205",k.Revamp_battle_skywatch_outside_json="c9aba10f-0723-480e-9ed3-ff4806b70b50",k.Towertown_1up_json="821c2dcb-30c5-41d9-9dce-6c7757a133e3",k.Towertown_1up_tut_sub_json="ea1e712e-d900-4498-8f4b-d51e9cf30b4e",k.Towertown_2up_json="4ae09d06-ba26-4c60-b877-974b2d7692bc"}(F||(F={}))},84317:(k,B,U)=>{"use strict";var F;U.d(B,{t:()=>F}),function(k){k.Tileset_UI_png="1397a747-efdf-46cb-b219-ab7afea40a64",k.Tileset_academy_png="dfaca806-4f30-447f-9296-3d4c0ddca7f5",k.Tileset_academy_sup_png="359de525-b71b-4a5f-8387-ecf876420d68",k.Tileset_ancient_ruins_png="7a290c41-fbcc-41c2-bdc1-b080be93ed84",k.Tileset_archives_png="ef9f43ac-08db-418b-b39c-84757b9cc69c",k.Tileset_arena_bronze_png="c623c8b8-5f9d-448c-91f6-97d00947da9a",k.Tileset_arena_gold_night_png="49b0f7e9-9aed-4abd-9460-fbd621cadde1",k.Tileset_arena_gold_png="982ff829-3774-46a7-98ba-e8b9b356331e",k.Tileset_arena_silver_png="3604dbbb-bd44-4eee-84ec-e9da7985f562",k.Tileset_bonfire_png="5ffb004d-4278-48a0-bd1f-fd460b5dacbc",k.Tileset_classroom_firefly_png="ca2c3487-f094-4d19-b44f-147dd646bad7",k.Tileset_classroom_ice_png="0f1daa1c-7f98-4df8-b7e5-730ba9188b17",k.Tileset_classroom_png="e04c76f6-98fc-4267-ac72-387848f1c20b",k.Tileset_classroom_shiverchill_png="178d5c50-efa6-4590-8507-3b0bca7c7dda",k.Tileset_cloud_new_png="68e18d2c-a3dd-45c0-92ab-8ad9770eee88",k.Tileset_cloud_no_collisions_png="4f357cd9-056b-417b-baa6-344636e4651a",k.Tileset_cloud_png="833af31b-c3b3-4424-af2e-c96f3fdc407f",k.Tileset_collisions_png="246f9a54-ba28-4575-bb5d-03612f6bf81c",k.Tileset_darktower_png="8d229484-b7d6-485b-ac37-b0bcc1173ef0",k.Tileset_dragonisland_exterior_png="71bb74dc-4e4b-4bae-a055-aee3d7e356dc",k.Tileset_dragonisland_waterfall_png="64ba2351-501c-4744-98bf-ba40933da056",k.Tileset_exterior_general_png="fb19d855-764a-44af-a08a-d29b2f08b4db",k.Tileset_firefly_new_night_png="2d99c5d6-c502-48cf-b0ba-380e656d7cbb",k.Tileset_firefly_new_png="cea33c56-b89a-49dd-ac3c-b4998ca49d82",k.Tileset_firepit_png="c7f4d0f3-c856-4e4f-8335-6ac29489f19c",k.Tileset_forest_new_night_png="72f6597c-10a9-47e8-95fd-1bbc6901e780",k.Tileset_forest_new_png="0e5daa52-24ac-4045-9425-db4ab20b6e96",k.Tileset_forest_png="032440a2-9e11-4118-a258-52b541096fbc",k.Tileset_generic_moonfest_night_png="3d5fa3d6-a84c-4925-a6ae-18aeca404e07",k.Tileset_generic_new_night_png="ec108c59-99ac-4184-af87-8a602f1cc96e",k.Tileset_generic_new_png="7c6386ba-52c0-44ad-9a0d-54da3fccbb9c",k.Tileset_generic_png="16918ba8-4539-42cf-956f-09c71d6ac905",k.Tileset_generic_snow_png="abd6f8ab-d0b9-4d7e-86a2-8c6f65d8944e",k.Tileset_grotto_springfest_png="cdab57ce-0b92-434f-bb35-ddf1dc2dc413",k.Tileset_icecave_new_png="039df322-0618-4e4f-9233-745da57fc9da",k.Tileset_icecave_png="a8ae4050-c105-4e35-a3a8-97af719cedd0",k.Tileset_iceruins_png="d497a024-d0a2-45aa-a0b4-4c48952e875c",k.Tileset_infinity_tower_construction_png="f2ab6689-c522-4253-8f87-059e10397131",k.Tileset_interior_general_png="94d1d1f4-30eb-47ad-a6f8-8992714591b2",k.Tileset_interior_icecave_png="13e4bab5-eb18-49b8-b670-5f977e37628c",k.Tileset_interior_png="d4546866-fd36-415c-9785-a87bad977a68",k.Tileset_interior_treehouse_png="686754cd-f8ad-4a66-a2c1-7ea301652456",k.Tileset_minecarts_png="ef4ee67f-ab2d-438b-9058-a0eb075de0c6",k.Tileset_moon_exterior_png="b26d6483-0403-428f-8e9f-13813d233932",k.Tileset_moon_interior_png="43eb8a78-2f00-47d2-b463-79e9c5aa457f",k.Tileset_moonlight_extras_night_png="6829c578-7def-4abd-82a3-ac4c2fe4613f",k.Tileset_outside_png="ddf7610e-e83f-41ad-a642-680298802ed0",k.Tileset_outsidesnow_png="d3806833-c510-49c7-941c-8fdedba8bb1b",k.Tileset_railruins_png="280da4e9-2d2d-4ba8-b40c-1c4359e8fb28",k.Tileset_ship_exterior_png="09ae8073-3334-4fec-b84e-dafb09668420",k.Tileset_ship_interior_png="e6183cf5-c5d9-4982-bbd2-dad8a54a0901",k.Tileset_shiverchill_exterior_png="a1ba7f57-e537-46e5-8160-2ba8910ba7de",k.Tileset_shiverchill_footsteppath_png="168e2732-ab26-4e6a-89c6-cfcaa9e4e62a",k.Tileset_shiverchill_interior_png="ec6c712b-8866-4370-bda6-dc7cad31a703",k.Tileset_shiverchill_png="81d9ae1f-f2dc-4ff6-b866-6e773e730305",k.Tileset_shiverchill_rails_png="b5848154-d97f-4b12-9f5f-c1a0d8933aaa",k.Tileset_skies_new_png="e1aa8afc-3dd9-4749-ba63-7aa327005900",k.Tileset_skywatch_buildings_png="c7455906-0e6e-4a8c-a15b-c7362ca93501",k.Tileset_skywatch_factory_png="6415e23e-c4ed-4852-8279-ff810b39a4f3",k.Tileset_skywatch_png="46b3694d-d219-4163-9e99-29770533ac29",k.Tileset_space_background_png="f9792203-daf6-4792-ac81-a4d55b633aa4",k.Tileset_springfest_png="161ae087-1633-44e7-98c0-8171818bc692",k.Tileset_towertown_basic_png="541c640e-7ac1-4e4f-a4fd-e27a08bff5e2",k.Tileset_town_december_png="7fa641db-d014-401c-8f59-a6eb8cef8ff2",k.Tileset_town_moonfest_night_png="9a11b628-4b4a-469d-9a7d-463ddbce4579",k.Tileset_town_new_night_png="2232dd58-c29b-4b41-b506-015cec056bae",k.Tileset_town_new_png="0e1d3b5e-c4b8-49b1-9314-577a1bc53370",k.Tileset_town_november_night_png="68066241-dc49-4a6b-9b64-5191cde677f0",k.Tileset_town_november_png="ed7b770b-f3cd-424d-bf0d-a0bb70a26008",k.Tileset_town_october_night_png="74b5c47c-4a8d-494e-990c-4ce099d209a9",k.Tileset_town_october_png="4b7bf187-1e50-497b-8211-23eccefa19e4",k.Tileset_town_png="4697235d-97c6-49d7-a3fe-a9a8409a8d93",k.Tileset_town_summerfest_png="ac55de45-af6a-4fde-b362-ff3eb7977c3e",k.Tileset_tutorial_subspace_png="0a34ab36-b86c-4521-aa95-13cb44c7156d",k.Tileset_twilight_arcade_png="700dde1a-1d41-47c0-9484-e9324b56118b",k.Tileset_volcano_new_png="ae2f7959-e7cb-479c-ad53-92401bf4ac2c",k.Tileset_volcano_png="83448b36-2ce8-4062-99db-e12b35fe6e68",k.Tileset_wall_collisions_png="a6ff3c98-bb92-480f-8a2b-d9c0efe00730",k.Tileset_water_new_png="4adfca05-a4e7-4c5d-8f17-b448377bbdbe"}(F||(F={}))},54300:(k,B,U)=>{"use strict";var F;U.d(B,{p:()=>F}),function(k){k["dragonOrb-1"]="0cc2bfa1-9b87-4572-9ac1-b832daff107b",k["dragonOrb-2"]="f79d74cc-3069-4587-a6ff-72b8ebb03593",k["dragonOrb-3"]="7a710425-cad8-4020-8f18-ca316963027f",k["dragonOrb-4"]="9541cc6a-b4e8-4e11-a65b-de6fde686d24",k["riftRunKey-1"]="d356ddb2-7802-4be8-9d38-a6f83f62621b",k["riftRunKey-2"]="765f1557-dc57-47e3-b53a-360d3383fb69",k["riftRunKey-3"]="fa2ac725-959d-427a-b50f-ef5e43f8b9c8"}(F||(F={}))},88818:(k,B,U)=>{"use strict";var F,G,j,$;U.d(B,{$6:()=>V,Cj:()=>j,Q2:()=>F,VE:()=>$,e9:()=>H,yG:()=>W}),function(k){k.Attack="attack",k.Attack2="attack2",k.DanceDab="dance-dab",k.DanceMoonwalk="dance-moonwalk",k.DanceRunningman="dance-runningman",k.Dig="dig",k.Idle="idle",k.IdleHeavy="idle-heavy",k.IdlePose="idle-pose",k.IdleToPetInteract="idle-to-pet-interact",k.PetInteract="pet-interact",k.Static="static",k.Walk="walk"}(F||(F={})),function(k){k.Cast="cast"}(G||(G={})),function(k){k.Shadow="shadow",k.HairLPigtails="hair-L-pigtails",k.HatBack="hat-back",k.HairBun="hair-bun",k.HairBackLong="hair-back-long",k.HairBack="hair-back",k.Cape="cape",k.SleeveLSkin="sleeve-L-skin",k.SleeveL="sleeve-L",k.GloveLHandSkin="glove-L-hand-skin",k.GloveLHand="glove-L-hand",k.HairBehind="hair-behind",k.Weapon="weapon",k.Tail="tail",k.Back="back",k.GloveLFingersSkin="glove-L-fingers-skin",k.GloveLFingers="glove-L-fingers",k.LegLSkin="leg-L-skin",k.LegL="leg-L",k.BootLSkin="boot-L-skin",k.BootL="boot-L",k.Hip="hip",k.LegRSkin="leg-R-skin",k.LegR="leg-R",k.BootRSkin="boot-R-skin",k.BootR="boot-R",k.PauldronL="pauldron-L",k.HatMiddle="hat-middle",k.Neck="neck",k.Torso="torso",k.Belt="belt",k.Chest="chest",k.SleeveRSkin="sleeve-R-skin",k.SleeveR="sleeve-R",k.Collar="collar",k.GloveRSkin="glove-R-skin",k.GloveRWrist="glove-R-wrist",k.GloveRHand="glove-R-hand",k.Necklace="necklace",k.FaceLower="face-lower",k.FaceUpper="face-upper",k.EyeLWhite="eye-L-white",k.EyeLIris="eye-L-iris",k.EyeLOutline="eye-L-outline",k.EyeLBlink="eye-L-blink",k.EyeRWhite="eye-R-white",k.EyeRIris="eye-R-iris",k.EyeROutline="eye-R-outline",k.EyeRBlink="eye-R-blink",k.Mouth="mouth",k.Nose="nose",k.EyebrowR="eyebrow-R",k.EyebrowL="eyebrow-L",k.ExpressionFace="expression-face",k.HairInfront="hair-infront",k.HairShort="hair-short",k.HatFace="hat-face",k.HairRPigtails="hair-R-pigtails",k.PauldronR="pauldron-R",k.HatFront="hat-front",k.ExpressionUpper="expression-upper"}(j||(j={})),function(k){k.Back="back",k.Belt="belt",k.BootL="boot-L",k.BootLSkin="boot-L-skin",k.BootR="boot-R",k.BootRSkin="boot-R-skin",k.Cape="cape",k.Chest="chest",k.Collar="collar",k.ExpressionFace="expression-face",k.ExpressionUpper="expression-upper",k.EyeLBlink="eye-L-blink",k.EyeLIris="eye-L-iris",k.EyeLOutline="eye-L-outline",k.EyeLWhite="eye-L-white",k.EyeRBlink="eye-R-blink",k.EyeRIris="eye-R-iris",k.EyeROutline="eye-R-outline",k.EyeRWhite="eye-R-white",k.EyebrowL="eyebrow-L",k.EyebrowR="eyebrow-R",k.FaceLower="face-lower",k.FaceUpper="face-upper",k.GloveLFingers="glove-L-fingers",k.GloveLFingersSkin="glove-L-fingers-skin",k.GloveLHand="glove-L-hand",k.GloveLHandSkin="glove-L-hand-skin",k.GloveRHand="glove-R-hand",k.GloveRSkin="glove-R-skin",k.GloveRWrist="glove-R-wrist",k.HairBack="hair-back",k.HairBackLong="hair-back-long",k.HairBehind="hair-behind",k.HairBun="hair-bun",k.HairInfront="hair-infront",k.HairLPigtails="hair-L-pigtails",k.HairRPigtails="hair-R-pigtails",k.HairShort="hair-short",k.HatBack="hat-back",k.HatFace="hat-face",k.HatFront="hat-front",k.HatMiddle="hat-middle",k.Hip="hip",k.LegL="leg-L",k.LegLSkin="leg-L-skin",k.LegR="leg-R",k.LegRSkin="leg-R-skin",k.MouthA="mouth-A",k.MouthClose="mouth-Close",k.MouthSmile="mouth-smile",k.MouthYeah="mouth-yeah",k.Neck="neck",k.Necklace="necklace",k.Nose="nose",k.PauldronL="pauldron-L",k.PauldronR="pauldron-R",k.Shadow="shadow",k.SleeveL="sleeve-L",k.SleeveLSkin="sleeve-L-skin",k.SleeveR="sleeve-R",k.SleeveRSkin="sleeve-R-skin",k.Tail="tail",k.Torso="torso",k.Weapon="weapon"}($||($={}));const H=[["mouth-A",["mouth"]],["mouth-Close",["mouth"]],["mouth-smile",["mouth"]],["mouth-yeah",["mouth"]]],V=[["mouth","mouth-Close"]],W=new Map([["back",[1157,0,118,104]],["belt",[1310,2,78,22]],["boot-L",[1694,217,37,38]],["boot-L-skin",[1690,76,38,38]],["boot-R",[1694,178,37,38]],["boot-R-skin",[1692,37,38,38]],["cape",[969,8,81,92]],["chest",[1436,8,41,40]],["collar",[1729,83,91,35]],["expression-face",[1055,105,133,150]],["expression-upper",[1189,105,133,150]],["eye-L-blink",[681,2,19,9]],["eye-L-iris",[1694,119,20,20]],["eye-L-outline",[108,4,23,30]],["eye-L-white",[167,5,19,29]],["eye-R-blink",[658,1,22,10]],["eye-R-iris",[1715,119,20,20]],["eye-R-outline",[72,4,35,30]],["eye-R-white",[132,5,34,29]],["eyebrow-L",[1651,7,27,25]],["eyebrow-R",[1276,1,33,23]],["face-lower",[1051,15,105,85]],["face-upper",[572,8,85,63]],["glove-L-fingers",[36,1,35,33]],["glove-L-fingers-skin",[0,1,35,33]],["glove-L-hand",[1610,19,40,40]],["glove-L-hand-skin",[1705,0,38,36]],["glove-R-hand",[1649,74,40,40]],["glove-R-skin",[1651,33,40,40]],["glove-R-wrist",[1694,140,38,37]],["hair-L-pigtails",[0,35,92,220]],["hair-R-pigtails",[93,35,92,220]],["hair-back",[1603,115,90,140]],["hair-back-long",[734,89,144,166]],["hair-behind",[879,101,175,154]],["hair-bun",[1457,107,72,148]],["hair-infront",[1490,1,119,105]],["hair-short",[772,1,117,87]],["hat-back",[186,72,200,183]],["hat-face",[1323,105,133,150]],["hat-front",[387,72,200,183]],["hat-middle",[588,72,145,183]],["hip",[1389,3,46,45]],["leg-L",[1610,60,38,54]],["leg-L-skin",[1451,50,38,54]],["leg-R",[1412,49,38,55]],["leg-R-skin",[1373,49,38,55]],["mouth-A",[722,2,21,12]],["mouth-Close",[701,3,18,8]],["mouth-smile",[214,27,15,7]],["mouth-yeah",[734,72,19,16]],["neck",[187,6,26,28]],["necklace",[186,35,43,36]],["nose",[1679,7,25,25]],["pauldron-L",[722,15,49,56]],["pauldron-R",[658,12,63,59]],["shadow",[272,5,177,66]],["sleeve-L",[230,4,41,67]],["sleeve-L-skin",[450,5,41,66]],["sleeve-R",[532,7,39,64]],["sleeve-R-skin",[492,7,39,64]],["tail",[1276,25,96,79]],["torso",[890,4,78,96]],["weapon",[1530,110,72,145]]])},10471:(k,B,U)=>{"use strict";U.d(B,{B:()=>G,h:()=>F});const F=[27],G=F.concat([28,29,30])},46791:(k,B,U)=>{"use strict";U.d(B,{a:()=>F});const F=(0,U(77601).gb)({key:"members-get-7-levels",default:{enabled:!1}})},96703:(k,B,U)=>{"use strict";U.d(B,{K:()=>F});const F=(0,U(77601).gb)({key:"after-school-widget",activateAssociatedExperiments:1,default:{enabled:!1}})},44751:(k,B,U)=>{"use strict";U.d(B,{m:()=>F});const F=(0,U(77601).gb)({key:"arcadia-zone-in-math-rpg",activateAssociatedExperiments:0,default:{enabled:!1},evaluate:(k,B)=>({enabled:k.enabled&&!B.onMobileApp})})},59685:(k,B,U)=>{"use strict";var F,G;U.d(B,{D:()=>G,E:()=>F}),function(k){k.Dumb="dumb",k.Ok="ok",k.Smart="smart",k.Tricky="tricky",k.Reversed="reversed"}(F||(F={})),function(k){k.Elementalist="elementalist",k.Assassin="assassin",k.Turtle="turtle"}(G||(G={}))},88541:(k,B,U)=>{"use strict";var F;U.d(B,{Ct:()=>j,GM:()=>G,d6:()=>F}),function(k){k.Free="free",k.FreeUsed="freeUsed",k.Member="member",k.MemberUsed="memberUsed"}(F||(F={}));const G={enabled:!0,cooldownTimeUtcMinutes:240,rooms:[{id:"free-play",active:!0,name:"Free Play",nameKey:"DUELS_STADIUM_ROOM_NAME_FREE_PLAY",freeBattles:1,memberBattles:1,usesElementalBoosts:!0,forceBots:!0,minBotDifficulty:-2,maxBotDifficulty:4,prize:{type:"gold",amount:50},prizeIcon:{atlas:"f28ac625-fa22-4c32-a6dd-9afb5cca5895",frame:"currency-gold-2-large"},matchmakingBucket:1,style:{backingColor:"#99d8f2",headerImage:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-blue-sky"},headerImageDisabled:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-blue-sky-disabled"},headerTextColor:"#2266aa",lockBarColor:"#2f76be",borderColor:"#2f76be",contentBackingColor:"#f3ffff",contentBorderColor:"#349fe3",costBackingColor:"#a3ddf9"}},{id:"moonlit-clash",active:!0,name:"Moonlit Clash",nameKey:"DUELS_STADIUM_ROOM_NAME_MOONLIT_CLASH",levelLock:15,timeOfDayLock:"home",freeBattles:2,memberBattles:1,usesElementalBoosts:!0,forceBots:!1,minBotDifficulty:1,maxBotDifficulty:8,entryCost:{type:"gold",amount:100},prize:{type:"gold",amount:250},prizeIcon:{atlas:"f28ac625-fa22-4c32-a6dd-9afb5cca5895",frame:"currency-gold-3-large"},matchmakingBucket:1,style:{backingColor:"#6296cc",headerImage:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-moon"},headerImageDisabled:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-moon-disabled"},headerTextColor:"#4c4892",lockBarColor:"#4c4892",borderColor:"#4c4892",contentBackingColor:"#effaff",contentBorderColor:"#349fe3",costBackingColor:"#a1d0ef"}},{id:"spell-masters",active:!0,name:"Spell Masters",nameKey:"DUELS_STADIUM_ROOM_NAME_SPELL_MASTERS",levelLock:40,freeBattles:1,memberBattles:2,usesElementalBoosts:!0,forceBots:!1,minBotDifficulty:-2,maxBotDifficulty:8,entryCost:{type:"gold",amount:250},prize:{type:"gold",amount:500},prizeIcon:{atlas:"f28ac625-fa22-4c32-a6dd-9afb5cca5895",frame:"currency-gold-4-large"},matchmakingBucket:1,style:{backingColor:"#ffcd91",headerImage:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-stairs"},headerImageDisabled:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-stairs-disabled"},headerTextColor:"#ae2d00",lockBarColor:"#aa331c",borderColor:"#aa331c",contentBackingColor:"#fffaeb",contentBorderColor:"#f89e80",costBackingColor:"#f8ce99"}},{id:"boss-hunters",active:!0,name:"Boss Hunters",nameKey:"DUELS_STADIUM_ROOM_NAME_BOSS_HUNTERS",levelLock:90,freeBattles:0,memberBattles:1,usesElementalBoosts:!0,forceBots:!1,minBotDifficulty:3,maxBotDifficulty:8,entryCost:{type:"gold",amount:400},prize:{type:"gold",amount:1e3},prizeIcon:{atlas:"f28ac625-fa22-4c32-a6dd-9afb5cca5895",frame:"currency-gold-5-large"},matchmakingBucket:1,style:{backingColor:"#d17dcd",headerImage:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-tower"},headerImageDisabled:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-tower-disabled"},headerTextColor:"#754274",lockBarColor:"#592b4a",borderColor:"#592b4a",contentBackingColor:"#ffe4fe",contentBorderColor:"#734988",costBackingColor:"#f1b5ee"}}]},j={backingColor:"#bab5c2",borderColor:"#655664",contentBackingColor:"#f2f2f0",contentBorderColor:"#655664",costBackingColor:"#d2ced8"}},4845:(k,B,U)=>{"use strict";var F;U.d(B,{P:()=>G,R:()=>F}),function(k){k.LevelLocked="levelLock",k.TimeOfDayLocked="timeOfDayLock",k.NoBattlesAvailable="noBattlesAvailable",k.NoMembership="noMembership",k.NoEntryCost="noEntryCost",k.Fallback="unknownIneligibilityReason"}(F||(F={}));class G{constructor(k){this._levelLockedKeys={tooltip:{title:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_LEVEL_LOCK_KEY},body:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_LEVEL_LOCK_KEY}},card:{top:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_CARD_TOP_MESSAGE_LEVEL_LOCK_KEY}}},this._timeOfDayLockedKeys={tooltip:{title:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_TIME_OF_DAY_LOCK_KEY},body:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_TIME_OF_DAY_LOCK_KEY}},card:{top:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_CARD_TOP_MESSAGE_TIME_OF_DAY_LOCK_KEY},bottom:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_CARD_BOTTOM_MESSAGE_TIME_OF_DAY_LOCK_KEY}}},this._noTicketsKeys={tooltip:{title:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_NO_TICKETS_KEY},body:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_NO_TICKETS_KEY}},card:{bottom:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_CARD_BOTTOM_MESSAGE_NO_TICKETS_KEY}}},this._noMembershipKeys={tooltip:{title:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_MEMBERSHIP_KEY},body:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_MEMBERSHIP_KEY}}},this._fallbackKeys={tooltip:{title:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_FALLBACK_KEY},body:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_FALLBACK_KEY}}},this._noEntryCostKeys={tooltip:{title:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_ENTRY_COST_KEY},body:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_ENTRY_COST_KEY}}},this.CHECK_TO_INELIGIBLE_REASON_KEYS_MAP=new Map([[F.NoMembership,this._noMembershipKeys],[F.LevelLocked,this._levelLockedKeys],[F.TimeOfDayLocked,this._timeOfDayLockedKeys],[F.NoBattlesAvailable,this._noTicketsKeys],[F.NoEntryCost,this._noEntryCostKeys],[F.Fallback,this._fallbackKeys]]),k&&(this._localizer=k)}validate(k,B){const U=[()=>this.meetsLevelRequirement(k.room,k.playerLevel),()=>this.meetsAvailableBattlesRequirement(k.room,k.isMember,k.numBattlesUsed),()=>this.meetsTimeOfDayRequirement(k.room,k.inSchoolHours)];B&&U.push(...B);let F={eligible:!0};for(const G of U)if(F=G(),!F.eligible)break;return F}meetsAvailableBattlesRequirement(k,B,U){const G=-1===k.freeBattles,j=-1===k.memberBattles,$=k.freeBattles+k.memberBattles,H=k.freeBattles>0&&U0&&U>=k.freeBattles&&U<$;return G||B&&j||H||B&&V?{eligible:!0}:!B&&V?this.getEligibilityObject(!1,F.NoMembership):this.getEligibilityObject(!1,F.NoBattlesAvailable)}meetsLevelRequirement(k,B){var U,G;if(!k.levelLock)return{eligible:!0};const j=B>=k.levelLock;return(null===(U=this._levelLockedKeys.card)||void 0===U?void 0:U.top)&&(this._levelLockedKeys.card.top.args=[k.levelLock]),(null===(G=this._levelLockedKeys.card)||void 0===G?void 0:G.bottom)&&(this._levelLockedKeys.card.bottom.args=[k.levelLock]),this._levelLockedKeys.tooltip.body.args=[k.levelLock],this.getEligibilityObject(j,F.LevelLocked)}meetsTimeOfDayRequirement(k,B){var U,G;if(!k.timeOfDayLock||"none"===k.timeOfDayLock)return{eligible:!0};const j="home"===k.timeOfDayLock&&!B||"school"===k.timeOfDayLock&&B,$="school"===k.timeOfDayLock?["8:00am","4:00pm"]:["4:00pm","8:00am"];return this._timeOfDayLockedKeys.tooltip.body.args=$,(null===(U=this._timeOfDayLockedKeys.card)||void 0===U?void 0:U.top)&&(this._timeOfDayLockedKeys.card.top.args=$),(null===(G=this._timeOfDayLockedKeys.card)||void 0===G?void 0:G.bottom)&&(this._timeOfDayLockedKeys.card.bottom.args=$),this.getEligibilityObject(j,F.TimeOfDayLocked)}getEligibilityObject(k,B){var U,F,G,j,$,H,V,W,q,K,z;if(k)return{eligible:k};const Y={eligible:k,ineligibleReason:{type:B,tooltip:{title:"",body:""}}};if(this._localizer&&Y.ineligibleReason){const k=null!==(U=this.CHECK_TO_INELIGIBLE_REASON_KEYS_MAP.get(B))&&void 0!==U?U:this._fallbackKeys,Q=null!==(F=k.tooltip.title.args)&&void 0!==F?F:[],X=null!==(G=k.tooltip.body.args)&&void 0!==G?G:[],Z=null!==(H=null===($=null===(j=k.card)||void 0===j?void 0:j.top)||void 0===$?void 0:$.args)&&void 0!==H?H:[],J=null!==(q=null===(W=null===(V=k.card)||void 0===V?void 0:V.bottom)||void 0===W?void 0:W.args)&&void 0!==q?q:[];Y.ineligibleReason.tooltip={title:this._localizer.getText(k.tooltip.title.key,...Q),body:this._localizer.getText(k.tooltip.body.key,...X)},Y.ineligibleReason.card={topMessage:(null===(K=k.card)||void 0===K?void 0:K.top)?this._localizer.getText(k.card.top.key,...Z):void 0,bottomMessage:(null===(z=k.card)||void 0===z?void 0:z.bottom)?this._localizer.getText(k.card.bottom.key,...J):void 0}}return Y}}G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_LEVEL_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_TITLE_LEVEL_LOCK",G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_LEVEL_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_BODY_LEVEL_LOCK",G.STADIUM_ROOM_INELIGIBLE_REASON_CARD_TOP_MESSAGE_LEVEL_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_CARD_MESSAGE_LEVEL_LOCK",G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_TIME_OF_DAY_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_TITLE_TIME_OF_DAY_LOCK",G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_TIME_OF_DAY_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_BODY_TIME_OF_DAY_LOCK",G.STADIUM_ROOM_INELIGIBLE_REASON_CARD_TOP_MESSAGE_TIME_OF_DAY_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_CARD_MESSAGE_TIME_OF_DAY_LOCK",G.STADIUM_ROOM_INELIGIBLE_REASON_CARD_BOTTOM_MESSAGE_TIME_OF_DAY_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_CARD_BOTTOM_MESSAGE_TIME_OF_DAY_LOCK",G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_NO_TICKETS_KEY="STADIUM_ROOM_INELIGIBLE_REASON_TITLE_NO_TICKETS",G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_NO_TICKETS_KEY="STADIUM_ROOM_INELIGIBLE_REASON_BODY_NO_TICKETS",G.STADIUM_ROOM_INELIGIBLE_REASON_CARD_BOTTOM_MESSAGE_NO_TICKETS_KEY="STADIUM_ROOM_INELIGIBLE_REASON_CARD_BOTTOM_MESSAGE_NO_TICKETS",G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_MEMBERSHIP_KEY="STADIUM_ROOM_INELIGIBLE_REASON_TITLE_MEMBERSHIP",G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_MEMBERSHIP_KEY="STADIUM_ROOM_INELIGIBLE_REASON_BODY_MEMBERSHIP",G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_FALLBACK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_TITLE_FALLBACK",G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_FALLBACK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_BODY_FALLBACK",G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_ENTRY_COST_KEY="STADIUM_ROOM_INELIGIBLE_REASON_TITLE_ENTRY_COST",G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_ENTRY_COST_KEY="STADIUM_ROOM_INELIGIBLE_REASON_BODY_ENTRY_COST"},60035:(k,B,U)=>{"use strict";var F;U.d(B,{z:()=>F}),function(k){k.ElementalBoost="elementalBoost",k.OutgoingDamageMultiplier="outgoingDamage",k.IncomingDamageMultiplier="incomingDamage",k.OutgoingHealingMultiplier="outgoingHealing",k.IncomingHealingMultiplier="incomingHealing",k.StatChange="statChange",k.DodgeChance="dodgeChance",k.RoundStartSpell="roundStartSpell",k.RoundStartAffix="roundStartAffix",k.Survivor="survivor",k.NoGear="noGear",k.Revive="revive",k.Reflect="reflect",k.RandomizeTarget="randomizeTarget",k.RemovePetsByElement="removePetsByElement",k.RemovePetsByRarity="removePetsByRarity",k.CooldownMin="cooldownMin",k.TurnTimer="turnTimer"}(F||(F={}))},28628:(k,B,U)=>{"use strict";var F;U.d(B,{GJ:()=>W,Ie:()=>q,JT:()=>z,Mb:()=>G,OT:()=>K,XK:()=>j,gu:()=>F,uj:()=>H,w0:()=>V,x_:()=>Q,xn:()=>Y,zJ:()=>$}),function(k){k.Basic="basic",k.QuestPippet="quest-pippet",k.QuestPippetDefeatable="quest-pippet-defeatable",k.Ultimates="ultimates",k.Tutorial1="tutorial1",k.Tutorial2="tutorial2",k.Tutorial3="tutorial3",k.Tutorial1Revised="tutorial1revised",k.Tutorial2Revised="tutorial2revised",k.StatusEffectsTutorial="status-effects-tutorial",k.FireflyQ2Miniboss="firefly-Q2-miniboss",k.FireflyQ3Miniboss="firefly-Q3-miniboss",k.FireflyQ8TriptropTrio="firefly-Q8-triptrop-trio",k.FireflyQ12Gerald="firefly-Q12-gerald",k.SkywatchCloudMiniboss="skywatch-cloud-miniboss",k.SkywatchCloudBoss="skywatch-cloud-boss",k.SkywatchQ11Bitbots="skywatch-Q11-bitbots",k.SkywatchQ6Swarm="skywatch-Q6-swarm",k.ShiverchillQ6Ghosts="shiverchill-Q6-ghosts",k.ShiverchillQ7IceWyrm="shiverchill-Q7-ice-wyrm",k.ShiverchillQ13IceWyrm="shiverchill-Q13-ice-wyrm",k.BonfireQ12Guardian="bonfire-Q12-guardian",k.BonfireQ13Cebollini="bonfire-Q13-cebollini",k.ShipwreckQ11OldOne="shipwreck-Q11-old-one",k.Duel="duel",k.MatchmakingDuel="matchmaking-duel",k.MatchmakingBotDuel="matchmaking-bot-duel",k.Titan="titan",k.CrystalCavernsGrumpyYeti="cc-grumpy-yeti",k.CrystalCavernsCrystalThief="cc-crystal-thief",k.CrystalCavernsGlacias="cc-glacias",k.CrystalCavernsMakalu="cc-makalu",k.CrystalCavernsCrystalGolem="cc-crystal-golem",k.DarkTower="darktower",k.EndgamePippet="endgame-pippet",k.EndGameGuardianFirefly="endgame-guardian-firefly",k.EndGameGuardianShiverchill="endgame-guardian-shiverchill",k.EndGameGuardianSkywatch="endgame-guardian-skywatch",k.EndGameGuardianBonfire="endgame-guardian-bonfire",k.EndGameGuardianShipwreck="endgame-guardian-shipwreck",k.EndGamePuppetMaster="endgame-puppetmaster",k.ZoneMiniboss="zone-miniboss",k.PumpkinfestBoss="pumpkinfest-boss",k.NormalRiftRun="normal-rift-run",k.BossRiftRun="boss-rift-run",k.LootDash="loot-dash",k.FestivalDailyBoss="festival-daily-boss",k.FestivalDailyBattle="festival-daily-battle",k.FeaturedSpawn="featured-spawn"}(F||(F={}));const G=[F.NormalRiftRun];var j;!function(k){k.Victory="victory",k.Defeat="defeat",k.Escape="escape"}(j||(j={}));const $=k=>{if(!("opponents"in k))throw new Error("No opponents have been configured")};var H,V,W,q;!function(k){k.Wizard="wizard",k.Pet="pet",k.Boss="boss",k.Titan="titan",k.Object="object",k.Miniboss="miniboss"}(H||(H={})),function(k){k.Pet="Pet",k.Summon="Summon",k.Titan="Titan",k.Player="Player",k.Boss="Boss"}(V||(V={})),function(k){k.DungeonBoss="Dungeon Boss",k.TowerBoss="Tower Boss",k.ZoneBoss="Zone Boss",k.EventBoss="Event",k.FinalBoss="Final Boss",k.Wizard="Wizard",k.Mythic="Mythic",k.Enemy="Enemy"}(W||(W={})),function(k){k.FrontTop="frontTop",k.FrontMiddle="frontMiddle",k.FrontBottom="frontBottom",k.BackMiddle="backMiddle",k.Middle="middle",k.HugeUnit="hugeUnit"}(q||(q={}));const K=59,z=37,Y=k=>[W.DungeonBoss,W.TowerBoss].includes(k),Q=k=>[W.ZoneBoss,W.EventBoss].includes(k)},26738:(k,B,U)=>{"use strict";var F,G;U.d(B,{m:()=>F,x:()=>G}),function(k){k.GOAL="goal",k.PREMIUM_GATE="premiumGate",k.PREMIUM_REWARD_CLAIM="premiumRewardClaim",k.FREE_REWARD_CLAIM="freeRewardClaim",k.INFINITE_ACTIVE="infiniteActive",k.INFINITE_GOAL="infiniteGoal",k.INFINITE_CLAIM="infiniteClaim"}(F||(F={})),function(k){k.GOAL="goal",k.CLAIM="claim"}(G||(G={}))},68834:(k,B,U)=>{"use strict";var F,G;U.d(B,{H2:()=>H,IC:()=>j,Nz:()=>$,UA:()=>F,bm:()=>G}),function(k){k.BecomeAMember="Become a Member"}(F||(F={})),function(k){k.All="All",k.Daily="Daily",k.Weekly="Weekly",k.Monthly="Monthly",k.Season="Season",k.Bonus="Bonus"}(G||(G={}));const j={[G.All]:"BATTLE_PASS_QUEST_TYPE_ALL",[G.Daily]:"BATTLE_PASS_QUEST_TYPE_DAILY",[G.Weekly]:"BATTLE_PASS_QUEST_TYPE_WEEKLY",[G.Monthly]:"BATTLE_PASS_QUEST_TYPE_MONTHLY",[G.Season]:"BATTLE_PASS_QUEST_TYPE_SEASON",[G.Bonus]:"BATTLE_PASS_QUEST_TYPE_BONUS"};var $,H;!function(k){k.BecomeAMember="BecomeAMember",k.EvolvePet="EvolvePet"}($||($={})),function(k){k.Home="home",k.Rewards="rewards",k.Quests="quests"}(H||(H={}))},47708:(k,B,U)=>{"use strict";U.d(B,{Al:()=>G,K_:()=>j,q6:()=>$});var F=U(97495);const G={[F.i.Regular]:!0,[F.i.Hard]:!1,[F.i.Expert]:!1};var j,$;!function(k){k.Regular="EASY_MODE",k.Hard="HARD_MODE",k.Expert="EXPERT_MODE"}(j||(j={})),function(k){k[k.NotStarted=0]="NotStarted",k[k.HardModeIntroduced=1]="HardModeIntroduced",k[k.HardModeStarted=2]="HardModeStarted",k[k.ExpertModeIntroduced=3]="ExpertModeIntroduced",k[k.ExpertModeStarted=4]="ExpertModeStarted"}($||($={}));$.HardModeIntroduced},97495:(k,B,U)=>{"use strict";var F;U.d(B,{i:()=>F}),function(k){k.Regular="regular",k.Hard="hard",k.Expert="expert"}(F||(F={}))},2090:(k,B,U)=>{"use strict";U.d(B,{u:()=>F});const F=(0,U(77601).gb)({key:"keep-players-in-hard-mode",activateAssociatedExperiments:1,default:{enabled:!1}})},34656:(k,B,U)=>{"use strict";U.d(B,{j:()=>H});var F=U(29891),G=U(64270),j=U(15821),$=U(87490);class H{static specialOfferSectionHasContent(k,B){if(k.id!==G.Xx.SpecialOffer)return!1;const U=!!k.emptySectionInfo&&k.emptySectionInfo.title.length>0&&k.emptySectionInfo.subtitle.length>0;return!!B||U}static calculateFinalCost(k,B,U,F){var H,W,q,K;let z;const Y=this.getItemRewards(k);if(!k.metadata.ignorePriceTable&&(null==U?void 0:U.featureEnabled)&&1===Y.length){const V=Y[0],K=B(V.type,V.ID),Q=null!==(H=k.metadata.currency)&&void 0!==H?H:null===(W=null==K?void 0:K.dynamicStoreBaseCost)||void 0===W?void 0:W.currencyId;if(void 0!==Q){const k=class{static computePowerLevel(k){let B=0;for(const[U,F]of Object.entries(k))j.A.isDefined(F)&&(U===$.EStat.Hp?B+=.5*F:B+=F);return B}static findMatchingScale(k,B,U){return Object.values(k.scales).find((k=>k.enabled&&k.currencies.includes(B)&&k.items.includes(U)))}static computePriceFromScale(k,B,U){const F=[...k.keys].sort(((k,B)=>k.value-B.value));return this.computePriceFromSortedKeys(F,k.type,B,U,k.roundTo)}static resolveCost(k,B){return j.A.isDefined(B)&&j.A.isDefined(k.costByRarity[B])?k.costByRarity[B]:k.baseCost}static computePriceFromSortedKeys(k,B,U,F,j){var $;if(0===k.length)return;const H=k[0],V=k[k.length-1];switch(B){case G.zS.Floor:{const B=k.reduce(((k,B)=>B.value<=U?B:k),H);return this.resolveCost(B,F)}case G.zS.Ceiling:{const B=k.find((k=>k.value>=U));return this.resolveCost(null!=B?B:V,F)}case G.zS.Linear:{const B=k.find((k=>k.value===U));if(void 0!==B)return this.resolveCost(B,F);if(UV.value)return this.resolveCost(V,F);const G=k.reduce(((k,B)=>B.valuek.value>U)))&&void 0!==$?$:V,q=(U-G.value)/(W.value-G.value),K=this.resolveCost(G,F)+q*(this.resolveCost(W,F)-this.resolveCost(G,F)),z=null!=j?j:1,Y=z>0?z:1;return Math.round(K/Y)*Y}}}static lookupPrice(k,B,U,F,j,$,H){let V,W,q;if(H){const F=`${B}:${U}`;if(!H.has(F)){const G=this.findMatchingScale(k,B,U);H.set(F,G?{scale:G,sortedKeys:[...G.keys].sort(((k,B)=>k.value-B.value))}:null)}const G=H.get(F);if(!G)return;V=G.scale,W=G.sortedKeys}else{if(V=this.findMatchingScale(k,B,U),!V)return;W=[...V.keys].sort(((k,B)=>k.value-B.value))}switch(V.keyType){case G.NR.Power:if(!j)return;q=this.computePowerLevel(j);break;case G.NR.LevelLock:q=null!=$?$:0}return this.computePriceFromSortedKeys(W,V.type,q,F,V.roundTo)}}.lookupPrice(U,Q,V.type,null==K?void 0:K.rarity,null==K?void 0:K.stats,null==K?void 0:K.lockLevel,F);void 0!==k&&(z={type:"currency",currency:Q,value:k*(null!==(q=V.N)&&void 0!==q?q:1)})}}if(z||null==k.metadata.currency||null==k.metadata.cost||(z={type:"currency",currency:V(k.metadata.currency),value:V(k.metadata.cost)}),!z)for(const G of Y){const k=B(G.type,G.ID);if(!(null==k?void 0:k.dynamicStoreBaseCost))continue;const{currencyId:U,amount:F}=k.dynamicStoreBaseCost;z={type:"currency",currency:U,value:F*(null!==(K=G.N)&&void 0!==K?K:1)}}if(!z)throw new Error(`No cost found for offer ${k.id}`);if(k.metadata.percentageDiscount){const B=1-k.metadata.percentageDiscount/100;z.value=Math.ceil(z.value*B)}return z}static getItemRewards(k){var B;const U=[];for(const{type:G,data:j}of null!==(B=k.onComplete)&&void 0!==B?B:[])switch(G){case F.s.GOT_PET:U.push({type:"pet",ID:j.id,N:1});break;case F.s.GOT_ITEM:U.push(...j.itemDrops)}return U}}function V(k){return"string"==typeof k?parseInt(k,10):k}},49569:(k,B,U)=>{"use strict";U.d(B,{Y:()=>F});const F=(0,U(77601).gb)({key:"unified-store",activateAssociatedExperiments:1,default:{enabled:!1}})},64270:(k,B,U)=>{"use strict";var F,G,j,$,H,V,W;U.d(B,{GA:()=>G,IF:()=>H,NR:()=>K,Xx:()=>F,g0:()=>j,qO:()=>$,zS:()=>q}),function(k){k.SpecialOffer="SpecialOffer",k.DefeatedPets="DefeatedPets",k.Bundle="Bundle",k.RestrictionOffer="RestrictionOffer"}(F||(F={})),function(k){k.PetShop="pet-store",k.TitanShop="titan-shop",k.WizardCenter="wizard-center",k.SpecialOffers="special-offers",k.FestivalShop="festival-shop",k.RegionShop="region-shop",k.AcademyShop="academy-shop",k.RiftsPortal1Shop="rifts-p1-shop",k.RiftsPortal2Shop="rifts-p2-shop",k.RiftsPortal3Shop="rifts-p3-shop",k.StarlightShop="starlight-fest-store",k.PumpkinfestShop="pumpkinfest-store",k.WinterfestShop="winterfest-store",k.MoonlightShop="moonlight-fest-store",k.OfferPopup="offer-popup",k.SpringfestShop="spring-fest-store",k.SummerfestShop="summerfest-store"}(G||(G={})),function(k){k.AllShops="#all-shops"}(j||(j={})),function(k){k.DynamicStore="DynamicStore"}($||($={})),function(k){k.StoreKeyNotFound="store-key-not-found",k.BadStoreConfig="bad-store-config",k.UnknownError="unknown-error"}(H||(H={})),function(k){k.BadStoreConfig="bad-store-config"}(V||(V={})),function(k){k.Rifts="rifts"}(W||(W={}));var q,K;!function(k){k.Floor="floor",k.Ceiling="ceiling",k.Linear="linear"}(q||(q={})),function(k){k.Power="power",k.LevelLock="levelLock"}(K||(K={}))},40295:(k,B,U)=>{"use strict";var F;U.d(B,{B:()=>F}),function(k){k.NotStarted="NotStarted",k.LastKeystoneCutsceneViewed="LastKeystoneCutsceneViewed",k.PippetDefeated="PippetDefeated",k.Guardian1Defeated="Guardian1Defeated",k.Guardian2Defeated="Guardian2Defeated",k.Guardian3Defeated="Guardian3Defeated",k.Guardian4Defeated="Guardian4Defeated",k.Guardian5Defeated="Guardian5Defeated",k.PuppetMasterDefeated="PuppetMasterDefeated"}(F||(F={}))},71698:(k,B,U)=>{"use strict";U.d(B,{o:()=>F});const F=(0,U(77601).gb)({key:"festivals",activateAssociatedExperiments:0,default:{enabled:!0,startDates:{},endDates:{},variant:0}})},57797:(k,B,U)=>{"use strict";var F,G,j,$;U.d(B,{je:()=>j,k$:()=>$,wD:()=>G,xK:()=>F}),function(k){k.Story="Story",k.Season="Season",k.Rifts="Rifts",k.Member="Member",k.Coop="Coop"}(F||(F={})),function(k){k.GOAL="goal",k.CLAIM="claim",k.STORY="story",k.COOP="coop"}(G||(G={})),function(k){k.Normal="normal",k.Boss="boss"}(j||(j={})),function(k){k.Any="any",k.Normal="normal",k.Boss="boss"}($||($={}))},46902:(k,B,U)=>{"use strict";var F,G;U.d(B,{Q:()=>F}),function(k){k.AllZones="all_zones",k.Global="global",k.AllInstances="all_instances"}(F||(F={})),function(k){k.Xp="Xp",k.Currency="Currency",k.TitanShard="TitanShard",k.Springfest="Springfest",k.Summerfest="Summerfest",k.Pumpkinfest="Pumpkinfest",k.Winterfest="Winterfest",k.StarlightFestival="Starlight"}(G||(G={}))},10727:(k,B,U)=>{"use strict";U.d(B,{d3:()=>$,tZ:()=>j});var F=U(25308),G=U(77601);const j={[F.e.Normal_special_encounter]:F.e.Ftue_revamp_normal_special_encounter},$=(0,G.gb)({key:"ftue-revamp-phase-1",activateAssociatedExperiments:0,default:{enabled:!1}})},28344:(k,B,U)=>{"use strict";U.d(B,{y:()=>F});const F=(0,U(77601).gb)({key:"ftue-revamp-phase-2",activateAssociatedExperiments:0,default:{enabled:!1}})},39324:(k,B,U)=>{"use strict";var F,G,j,$;U.d(B,{$P:()=>j,fK:()=>$}),function(k){k.Current="Current",k.Scheduled="Scheduled"}(F||(F={})),function(k){k.None="None",k.Hourly="Hourly",k.Daily="Daily",k.Weekly="Weekly"}(G||(G={})),function(k){k.AppStart="APP_START",k.EnterGameWorld="ENTER_GAME_WORLD"}(j||(j={})),function(k){k.ShopVisitNotification="shop_visit_notification"}($||($={}))},58347:(k,B,U)=>{"use strict";U.d(B,{F:()=>F});const F=(0,U(77601).gb)({key:"magicoin-softlock-flow-changes",activateAssociatedExperiments:0,default:!1})},89067:(k,B,U)=>{"use strict";U.d(B,{Cy:()=>$,Jr:()=>K,Kr:()=>V,Uk:()=>q,qe:()=>j,ts:()=>F,uR:()=>H,yR:()=>G});var F,G,j,$,H,V,W=U(66582);!function(k){k.AfterSchoolWidget="AfterSchoolWidget",k.Backpack="Backpack",k.Chat="Chat",k.Challenges="Challenges",k.CoreMember="CoreMember",k.Duels="Duels",k.Festival="Festival",k.FriendsList="Friends List",k.Hamburger="Hamburger",k.HouseEdit="HouseEdit",k.HouseLocked="HouseLocked",k.HouseReport="HouseReport",k.HouseUnlocked="HouseUnlocked",k.HouseUpgrade="HouseUpgrade",k.LoginRewards="Login Rewards",k.Map="Map",k.NonMember="NonMember",k.Pets="Pets",k.PlusMember="PlusMember",k.Rifts="Rifts",k.Settings="Settings",k.Shop="Shop",k.StateChallenges="StateChallenges",k.TreasureTrack="TreasureTrack",k.UltraMember="UltraMember",k.WizardCostumes="WizardCostumes",k.WizardDash="WizardDash",k.WizardWatch="Wizard Watch",k.YourGoals="Your Goals",k.YourMail="Your Mail"}(F||(F={})),function(k){k[k.Standard=0]="Standard",k[k.Liveops=1]="Liveops",k[k.Secondary=2]="Secondary",k[k.PlayerHub=3]="PlayerHub"}(G||(G={})),function(k){k[k.Always=0]="Always",k[k.AtHome=1]="AtHome",k[k.AtAnotherHome=2]="AtAnotherHome",k[k.NotHome=3]="NotHome",k[k.HomeVisitsAllowed=4]="HomeVisitsAllowed",k[k.HomeVisitsNotAllowed=5]="HomeVisitsNotAllowed",k[k.NonMember=6]="NonMember",k[k.CoreMember=7]="CoreMember",k[k.PlusMember=8]="PlusMember",k[k.UltraMember=9]="UltraMember",k[k.FestivalActive=10]="FestivalActive",k[k.ValidStateChallenge=11]="ValidStateChallenge",k[k.StateChallengeActiveOrCanCollectRewards=12]="StateChallengeActiveOrCanCollectRewards",k[k.AfterSchoolWidgetEnabled=13]="AfterSchoolWidgetEnabled",k[k.DailyLoginCalendarEnabled=14]="DailyLoginCalendarEnabled",k[k.DailyLoginCalendarUnlocked=15]="DailyLoginCalendarUnlocked",k[k.WizardWatchUnlocked=16]="WizardWatchUnlocked",k[k.PlayerGoalsEnabled=17]="PlayerGoalsEnabled",k[k.TreasureTrackUnlocked=18]="TreasureTrackUnlocked",k[k.FestivalUnlocked=19]="FestivalUnlocked",k[k.EnglishOnly=20]="EnglishOnly"}(j||(j={})),function(k){k[k.Small=64]="Small",k[k.Normal=87]="Normal",k[k.Large=98]="Large",k[k.ExtraLarge=120]="ExtraLarge"}($||($={})),function(k){k.HudGameObject="HudGameObject",k.HudRevampReusableStandardTooltip="HudRevampReusableStandardTooltip"}(H||(H={})),function(k){k.HudButtonEnabled="HudButtonEnabled",k.HudAttentionRequested="HudAttentionRequested"}(V||(V={}));const q={[W._$.NonMember]:F.NonMember,[W._$.MemberCore]:F.CoreMember,[W._$.MemberLevelUp]:F.CoreMember,[W._$.MemberPlus]:F.PlusMember,[W._$.MemberUltimateMath]:F.PlusMember,[W._$.MemberUltra]:F.UltraMember,[W._$.MemberUltimateBundle]:F.UltraMember},K={[F.NonMember]:"MEMBERSHIP_STATUS_FREE",[F.CoreMember]:"MEMBERSHIP_STATUS_CORE",[F.PlusMember]:"MEMBERSHIP_STATUS_PLUS",[F.UltraMember]:"MEMBERSHIP_STATUS_ULTRA"}},6452:(k,B,U)=>{"use strict";U.d(B,{D:()=>H});var F=U(95891),G=U.n(F),j=U(28628);const $=JSON.parse('{"cumulativeXp":[0,14,28,42,57,73,89,106,123,141,160,180,200,221,243,266,290,315,341,368,396,425,455,486,519,553,588,625,663,703,744,787,832,878,927,977,1029,1084,1140,1199,1260,1324,1390,1459,1530,1605,1682,1762,1846,1933,2024,2118,2216,2318,2423,2534,2648,2767,2891,3020,3154,3293,3438,3589,3746,3909,4078,4255,4438,4629,4827,5033,5248,5471,5703,5944,6195,6456,6728,7010,7304,7609,7927,8257,8601,8958,9329,9716,10118,10535,10970,11422,11892,12381,12889,13418,13968,14540,15135,15753,15982,16218,16461,16711,16968,17233,17505,17785,18073,18369,18673,18985,19306,19635,19973,20320,20676,21041,21415,21799,22193,22597,23011,23435,23869,24314,24769,25235,25712,26200,26700,27211,27734,28269,28816,29375,29946,30530,31127,31737,32360,32996,33646,34310,34987,35679,36385,37105,37840,38590,39355,40135,40931,41743,42571,43415,44275,45152,46045,46955,47882,48827,49789,50769,51767,52784,53819,54873,55946,57038,58149,59280,60431,61602,62793,64005,65237,66490,67765,69061,70379,71719,73081,74465,75872,77302,78755,80232,81732,83256,84804,86377,87975,89598,91246,92919,94618,96343,98094,99872]}');class H{static getXpRewardForBattleUnit(k,B,U){switch(k.type||j.uj.Object){case j.uj.Pet:return B.type===j.w0.Summon?U.mythic:U.base;case j.uj.Titan:return U.titan;case j.uj.Boss:return B.category?(0,j.xn)(B.category)?U.repeatableBoss:(0,j.x_)(B.category)?U.singularBoss:B.category===j.GJ.FinalBoss?k.asset.id===j.OT?U.finalBoss:U.illusionBoss:B.category===j.GJ.Wizard?k.asset.id===j.JT?U.pippet:U.cloakedWizard:U.base:U.base;case j.uj.Wizard:return U.cloakedWizard;case j.uj.Miniboss:return U.miniBoss;default:return U.base}}static getXpRequiredForLevel(k,B,U){return B[k-U]}static getLevelCurve(){return $}static getLevelFromCumulativeXp(k,B,U){return k<0?U:k>=B[B.length-1]?B.length-1+U:B.findIndex((B=>B>k))-1+U}static doesCumulativeXpMatchLevelCurve(k,B,U,F){return k===H.getLevelFromCumulativeXp(B,U,F)}static getRelativeXpGainedForCurrentLevel(k,B,U,F){const G=B-U[k-F];return Math.max(0,G)}static getRelativeXpRequiredForLevel(k,B,U){const F=k-U;return 0===F?B[F]:F>B.length-1?0:Math.max(0,B[F]-B[F-1])}static getCurrentLevelProgressPercent(k,B,U,F){const j=k-F;if(j<0)return 0;if(j>=U.length||B>=U[U.length-1])return 1;const $=H.getRelativeXpGainedForCurrentLevel(k,B,U,F),V=H.getRelativeXpRequiredForLevel(k+1,U,F);return V<=0?0:G().clamp($/V,0,1)}static getXpFromNextLevelProgressPercent(k,B,U,F){const j=H.getRelativeXpRequiredForLevel(k+1,U,F)*G().clamp(B,0,1);return Math.round(H.getXpRequiredForLevel(k,U,F)+j)}}},52551:(k,B,U)=>{"use strict";U.d(B,{w:()=>V});var F=U(28085),G=U(78746);const j=JSON.parse('{"xpPerOpponentDefeatedMultiplier":0.5,"revive":{"healthPercent":0.5,"revivesPerReviveLevel":{"Level0":1,"Level1":2,"Level2":3},"initialRevives":{"NonMember":"Level0","MemberLevelUp":"Level1","MemberUltimateMath":"Level2","MemberUltimateBundle":"Level2","MemberCore":"Level1","MemberPlus":"Level2","MemberUltra":"Level2"}},"matchSetup":{"maximumPlayers":8,"matchmakingTimeMs":30000,"finalCountdownMs":3000,"finalWaitTimeMs":2000},"battleSetup":{"stagesPerZone":5,"wavesPerBattleStage":{"1":[1],"2":[1],"3":[1],"4":[1,1],"5":[1,1],"6":[1,1],"7":[1,1],"8":[1,1,1],"9":[1,1,1],"10":[1,1,1],"11":[1,1,2],"12":[1,1,2],"default":[1,1,2,2,3]},"numberOfZones":1,"minEnemyLevel":2,"enemyLevelVariance":3,"treasureStagesEnabled":false,"minTreasureStageInZone":4,"maxMpPerPet":2},"postBattle":{"lootBags":{"lootBagsPerPlace":[7,5,3],"default":1},"baseLootBagItemConfig":{"goldTable":182,"currencyTable":184,"itemsTable":180,"itemChance":0.2},"memberLootBagItemConfig":{"goldTable":183,"currencyTable":185,"itemsTable":181,"itemChance":0.8}},"matchboard":{"batchUpdatesAtPlayerCount":0,"opponentBatchUpdateIntervalMs":500}}'),$=JSON.parse('{"matchSetup":{"maximumTimeBetweenBotJoinsMs":6000,"maximumMatchSearchTimeMs":1500,"minimumMatchSearchTimeMs":3000},"opponentConfigs":{"slow":{"waveTime":{"min":90,"max":150},"questionTime":{"min":50,"max":70}},"average":{"waveTime":{"min":55,"max":90},"questionTime":{"min":30,"max":50}},"fast":{"waveTime":{"min":35,"max":55},"questionTime":{"min":15,"max":30}},"gradeMultiplier":4,"botDistributions":[{"streak":-2,"difficulty":"Easy","fastCount":0,"averageCount":3,"slowCount":4},{"streak":-5,"difficulty":"Super easy","fastCount":0,"averageCount":1,"slowCount":6},{"streak":2,"difficulty":"Hard","fastCount":2,"averageCount":3,"slowCount":2},{"streak":5,"difficulty":"Super hard","fastCount":3,"averageCount":4,"slowCount":0},{"streak":0,"difficulty":"Normal","fastCount":1,"averageCount":3,"slowCount":3}]}}'),H=JSON.parse('{"revive":{"revivesPerReviveLevel":{"Level0":"infinite","Level1":"infinite","Level2":"infinite"}},"matchSetup":{"maximumPlayers":100,"finalCountdownMs":0,"finalWaitTimeMs":3000},"battleSetup":{"maxMpPerPet":1},"quickQuizConfigs":{"transportModalDurationMs":5000,"miniumMatchmakingTimeMs":3000,"quickQuizCancelledTimeoutMs":5000},"matchboard":{"batchUpdatesAtPlayerCount":20,"opponentBatchUpdateIntervalMs":2000}}');class V{static getConfig(k){return V.configs[k]}}V.configs={[G.B1.Home]:(0,F.ES)(j,$),[G.B1.QuickQuiz]:(0,F.ES)(j,H)}},70156:(k,B,U)=>{"use strict";U.d(B,{eA:()=>F,yB:()=>G});const F="infinite";var G,j;!function(k){k.Level0="Level0",k.Level1="Level1",k.Level2="Level2"}(G||(G={})),function(k){k.SuperEasy="Super easy",k.Easy="Easy",k.Normal="Normal",k.Hard="Hard",k.SuperHard="Super hard"}(j||(j={}));j.Normal},78746:(k,B,U)=>{"use strict";var F;U.d(B,{B1:()=>j,Cr:()=>K,Kn:()=>Q,Mh:()=>z,Ns:()=>q,Os:()=>H,gK:()=>$,kL:()=>G,mz:()=>V,s9:()=>Y,zM:()=>F}),function(k){k[k.None=0]="None",k[k.LobbyDefault=1]="LobbyDefault",k[k.SelectPets=2]="SelectPets",k[k.SelectFollows=3]="SelectFollows",k[k.SelectMounts=4]="SelectMounts",k[k.FindingAMatch=5]="FindingAMatch",k[k.WaitingForPlayers=6]="WaitingForPlayers",k[k.MatchmakingComplete=7]="MatchmakingComplete",k[k.MatchStartingSoon=8]="MatchStartingSoon",k[k.MatchStartingNow=9]="MatchStartingNow",k[k.MatchEndedByServer=10]="MatchEndedByServer"}(F||(F={}));const G=[F.SelectPets,F.SelectFollows,F.SelectMounts];var j,$,H,V,W,q,K;!function(k){k.QuickQuiz="QuickQuiz",k.Home="Home"}(j||(j={})),function(k){k.Bots="Bots",k.Multiplayer="Multiplayer"}($||($={})),function(k){k.Battle="Battle",k.Treasure="Treasure"}(H||(H={})),function(k){k.Lobby="lobby",k.DetailedSelection="detailedSelection"}(V||(V={})),function(k){k[k.YourTeam=0]="YourTeam",k[k.WaitingRoom=1]="WaitingRoom",k[k.FindAMatch=2]="FindAMatch"}(W||(W={})),function(k){k.LootDash="Wizard Dash",k.ChooseAPet="Choose a Pet",k.ChooseABuddy="Choose a Buddy",k.ChooseAMount="Choose a Mount"}(q||(q={})),function(k){k.Unfinished="Unfinished",k.Win="Win",k.Loss="Loss",k.Quit="Quit"}(K||(K={}));const z=["pet","follow","mount"],Y=5,Q=1},12022:(k,B,U)=>{"use strict";U.d(B,{G:()=>H});var F=U(66582),G=U(61468),j=U(70156),$=U(78746);class H{static getNumberOfRevivesFromMemberTier(k,B){var U;const G=F.rH[k];if(void 0!==(null===(U=B.revive)||void 0===U?void 0:U.initialRevives[G])){const k=B.revive.initialRevives[G];return this.getNumberOfRevivesFromReviveLevel(k,B)}throw new Error(`Member tier "${G}" does not have an initial revive value in the passed in config. ${JSON.stringify(B)}`)}static getNumberOfRevivesFromReviveLevel(k,B){var U,F,G;if(void 0!==(null===(U=B.revive)||void 0===U?void 0:U.revivesPerReviveLevel[k]))return null!==(G=null===(F=B.revive)||void 0===F?void 0:F.revivesPerReviveLevel[k])&&void 0!==G?G:$.Kn;throw new Error(`Revive level "${k}" does not have a value in the passed in config. ${JSON.stringify(B)}`)}static hasRevivesRemaining(k){return k===j.eA||k>0}static getCurrentPlace(k,B,U){const F=G.l.countUniqueItems(B.map((k=>k.playerId))),j=new Array(F).fill(0);for(const G of B)G.time<=U&&(j[G.playerId]=Math.max(j[G.playerId],G.stageIndex+1));return j.filter((B=>0!==B&&B>=k)).length+1}static getMatchCompletionState(k,B,U){return k?B||U?B?$.Cr.Quit:$.Cr.Loss:$.Cr.Win:$.Cr.Unfinished}static getLootBagsCount(k,B){return(null!=B?B:Object.keys(k)).reduce(((B,U)=>B+k[U]),0)}static hasMetMinimumVictoryRequirement(k){return this.getLootBagsCount(k,["fromStreak","fromWaveComplete"])>0}}},88059:(k,B,U)=>{"use strict";U.d(B,{s:()=>F});const F=(0,U(77601).gb)({key:"magicoin-battle-rewards",default:{enabled:!1}})},75172:(k,B,U)=>{"use strict";U.d(B,{T:()=>F,h:()=>G});var F,G;U(48417);!function(k){k.FeatureUnlocked="feature_unlocked",k.EligibleBattleStarted="eligible_battle_started",k.IntroModalShown="intro_modal_shown",k.FirstDropReceived="first_drop_received"}(F||(F={})),function(k){k[k.FeatureUnlocked=0]="FeatureUnlocked",k[k.EligibleBattleStarted=1]="EligibleBattleStarted",k[k.IntroModalShown=2]="IntroModalShown",k[k.FirstDropReceived=3]="FirstDropReceived"}(G||(G={}))},83798:(k,B,U)=>{"use strict";U.d(B,{G:()=>F});const F=(0,U(77601).gb)({key:"hide-member-jar-for-new-players",default:{enabled:!1,unlockLevel:12}})},39596:(k,B,U)=>{"use strict";U.d(B,{g:()=>F});const F=(0,U(77601).gb)({key:"fab-member-jar-at-school",activateAssociatedExperiments:1,default:!1})},95525:(k,B,U)=>{"use strict";U.d(B,{w:()=>F});const F=(0,U(77601).gb)({key:"rox-three-tier-membership-stratification",activateAssociatedExperiments:0,evaluate:k=>Object.assign(Object.assign({},k),{variant:k.enabled&&k.variant?k.variant:0}),default:{enabled:!0,variant:0}})},223:(k,B,U)=>{"use strict";U.d(B,{l:()=>$});var F=U(8674),G=U(77601);const j=(0,G.gb)({key:"otp-non-member",activateAssociatedExperiments:1,default:{enabled:!1},evaluate:({enabled:k})=>k}),$=(0,G.gb)({key:"otp",activateAssociatedExperiments:0,evaluate:(k,B)=>{var{enabled:U,enabledOnMobile:G}=k,$=(0,F.Tt)(k,["enabled","enabledOnMobile"]);return Object.assign(Object.assign({},$),{enabled:U&&(B.isMember||B.evaluate(j))&&(!B.onMobileApp||G)})},default:{enabled:!1,enabledOnMobile:!1,cooldown:0,storeName:void 0,spendCap:{resetTime:3,dailyLimit:void 0,monthlyLimit:void 0}}})},58182:(k,B,U)=>{"use strict";U.d(B,{N:()=>F});const F=(0,U(77601).gb)({key:"fab-pet-merge-2-evolution-add-new-pet",activateAssociatedExperiments:0,default:!1})},93893:(k,B,U)=>{"use strict";U.d(B,{v:()=>F});const F=(0,U(77601).gb)({key:"fab-secure-evolution",default:!1})},50508:(k,B,U)=>{"use strict";U.d(B,{p:()=>F});const F=["petHat","petRelic"]},21574:(k,B,U)=>{"use strict";U.d(B,{g:()=>W});var F=U(26077),G=U(15821);const j=JSON.parse('{"minimumPlayerLevel":20,"statScalers":{"1":{"hp":1.1,"power":1.1,"defence":1.1,"speed":1.1},"2":{"hp":1.2,"power":1.2,"defence":1.2,"speed":1.2},"3":{"hp":1.3,"power":1.3,"defence":1.3,"speed":1.3},"4":{"hp":1.4,"power":1.4,"defence":1.4,"speed":1.4},"5":{"hp":1.5,"power":1.5,"defence":1.5,"speed":1.5},"6":{"hp":1.6,"power":1.6,"defence":1.6,"speed":1.6}},"recipesPerProgressionType":{"OneEvolutionFamilyTier":{"0":{"ingredientCount":1,"evolutionTier":1},"1":{"ingredientCount":1,"evolutionTier":1},"2":{"ingredientCount":1,"evolutionTier":1},"3":{"ingredientCount":1,"evolutionTier":1},"4":{"ingredientCount":2,"evolutionTier":1},"5":{"ingredientCount":2,"evolutionTier":1}},"TwoEvolutionFamilyTier":{"0":{"ingredientCount":2,"evolutionTier":1},"1":{"ingredientCount":2,"evolutionTier":1},"2":{"ingredientCount":2,"evolutionTier":2},"3":{"ingredientCount":2,"evolutionTier":2},"4":{"ingredientCount":2,"evolutionTier":2},"5":{"ingredientCount":2,"evolutionTier":2}},"ThreeEvolutionFamilyTier":{"0":{"ingredientCount":2,"evolutionTier":1},"1":{"ingredientCount":2,"evolutionTier":1},"2":{"ingredientCount":3,"evolutionTier":2},"3":{"ingredientCount":3,"evolutionTier":2},"4":{"ingredientCount":3,"evolutionTier":3},"5":{"ingredientCount":3,"evolutionTier":3}},"FourEvolutionFamilyTier":{"0":{"ingredientCount":2,"evolutionTier":1},"1":{"ingredientCount":2,"evolutionTier":2},"2":{"ingredientCount":2,"evolutionTier":2},"3":{"ingredientCount":2,"evolutionTier":2},"4":{"ingredientCount":2,"evolutionTier":3},"5":{"ingredientCount":2,"evolutionTier":4}}}}'),$=JSON.parse('{"defaultRecipesByRarity":{"common":{"0":{"ingredientCount":1,"levelCap":20,"requiredLevel":20,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"1":{"ingredientCount":3,"levelCap":40,"requiredLevel":40,"cost":[{"type":"currency","id":27,"amount":5}],"alternateCost":null},"2":{"ingredientCount":4,"levelCap":60,"requiredLevel":60,"cost":[{"type":"currency","id":27,"amount":5}],"alternateCost":null},"3":{"ingredientCount":6,"levelCap":80,"requiredLevel":80,"cost":[{"type":"currency","id":27,"amount":10}],"alternateCost":null},"4":{"ingredientCount":8,"levelCap":100,"requiredLevel":100,"cost":[{"type":"currency","id":27,"amount":10}],"alternateCost":null},"5":{"ingredientCount":12,"levelCap":120,"requiredLevel":120,"cost":[{"type":"currency","id":27,"amount":15}],"alternateCost":null}},"uncommon":{"0":{"ingredientCount":0,"levelCap":40,"requiredLevel":0,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"1":{"ingredientCount":2,"levelCap":40,"requiredLevel":40,"cost":[{"type":"currency","id":27,"amount":10}],"alternateCost":null},"2":{"ingredientCount":3,"levelCap":60,"requiredLevel":60,"cost":[{"type":"currency","id":27,"amount":10}],"alternateCost":null},"3":{"ingredientCount":4,"levelCap":80,"requiredLevel":80,"cost":[{"type":"currency","id":27,"amount":20}],"alternateCost":null},"4":{"ingredientCount":4,"levelCap":100,"requiredLevel":100,"cost":[{"type":"currency","id":27,"amount":20}],"alternateCost":null},"5":{"ingredientCount":5,"levelCap":120,"requiredLevel":120,"cost":[{"type":"currency","id":27,"amount":30}],"alternateCost":null}},"rare":{"0":{"ingredientCount":0,"levelCap":40,"requiredLevel":0,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"1":{"ingredientCount":2,"levelCap":40,"requiredLevel":40,"cost":[{"type":"currency","id":27,"amount":15}],"alternateCost":null},"2":{"ingredientCount":2,"levelCap":60,"requiredLevel":60,"cost":[{"type":"currency","id":27,"amount":15}],"alternateCost":null},"3":{"ingredientCount":3,"levelCap":80,"requiredLevel":80,"cost":[{"type":"currency","id":27,"amount":30}],"alternateCost":null},"4":{"ingredientCount":4,"levelCap":100,"requiredLevel":100,"cost":[{"type":"currency","id":27,"amount":30}],"alternateCost":null},"5":{"ingredientCount":4,"levelCap":120,"requiredLevel":120,"cost":[{"type":"currency","id":27,"amount":45}],"alternateCost":null}},"heroic":{"0":{"ingredientCount":0,"levelCap":60,"requiredLevel":0,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"1":{"ingredientCount":0,"levelCap":60,"requiredLevel":0,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"2":{"ingredientCount":2,"levelCap":60,"requiredLevel":60,"cost":[{"type":"currency","id":27,"amount":25}],"alternateCost":null},"3":{"ingredientCount":2,"levelCap":80,"requiredLevel":80,"cost":[{"type":"currency","id":27,"amount":50}],"alternateCost":null},"4":{"ingredientCount":3,"levelCap":100,"requiredLevel":100,"cost":[{"type":"currency","id":27,"amount":50}],"alternateCost":null},"5":{"ingredientCount":3,"levelCap":120,"requiredLevel":120,"cost":[{"type":"currency","id":27,"amount":75}],"alternateCost":null}},"legendary":{"0":{"ingredientCount":0,"levelCap":60,"requiredLevel":0,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"1":{"ingredientCount":0,"levelCap":60,"requiredLevel":0,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"2":{"ingredientCount":1,"levelCap":60,"requiredLevel":60,"cost":[{"type":"currency","id":27,"amount":50}],"alternateCost":null},"3":{"ingredientCount":2,"levelCap":80,"requiredLevel":80,"cost":[{"type":"currency","id":27,"amount":100}],"alternateCost":null},"4":{"ingredientCount":2,"levelCap":100,"requiredLevel":100,"cost":[{"type":"currency","id":27,"amount":100}],"alternateCost":null},"5":{"ingredientCount":3,"levelCap":120,"requiredLevel":120,"cost":[{"type":"currency","id":27,"amount":150}],"alternateCost":null}}}}'),H=JSON.parse('{"recipesByPetId":{}}');var V=U(37016);class W{static get config(){return this._config}static get merge2RecipesByRarity(){return this._merge2RecipesByRarity}static get merge2RecipesByPetId(){return this._merge2RecipesByPetId}static minimumRankForRarity(k,B){if(B){const B=this._merge2RecipesByRarity.defaultRecipesByRarity[k];for(let k=V.qd.MIN;k<=V.qd.MAX;++k){const U=k;if(G.A.isDefined(null==B?void 0:B[U])&&B[U].ingredientCount>0)return U}}return V.qd.MIN}static parseMerge2RecipesByRarityConfig(k){const B={defaultRecipesByRarity:{}};for(const[U,j]of Object.entries(k.defaultRecipesByRarity)){const k=F.mX[U.toLowerCase()];if(G.A.isDefined(k)){const U={};for(const[k,B]of Object.entries(j)){const F=parseInt(k,10);!isNaN(F)&&F<6&&(U[F]={ingredientCount:B.ingredientCount,levelCap:B.levelCap,requiredLevel:B.requiredLevel,cost:B.cost,alternateCost:B.alternateCost})}B.defaultRecipesByRarity[k]=U}}return B}static parseMerge2RecipesByPetIdConfig(k){const B={recipesByPetId:{}};for(const[U,F]of Object.entries(k.recipesByPetId)){const k={};for(const[B,U]of Object.entries(F)){const F=parseInt(B,10);!isNaN(F)&&F<6&&(k[F]={ingredientCount:U.ingredientCount,levelCap:U.levelCap,requiredLevel:U.requiredLevel,cost:U.cost,alternateCost:U.alternateCost})}B.recipesByPetId[U]=k}return B}}W._config=Object.assign({},j),W._merge2RecipesByRarity=W.parseMerge2RecipesByRarityConfig($),W._merge2RecipesByPetId=W.parseMerge2RecipesByPetIdConfig(H)},50788:(k,B,U)=>{"use strict";U.d(B,{F:()=>j,J:()=>G});var F=U(77601);const G=(0,F.gb)({key:"fab-pet-merge-2-feature",default:!1}),j=(0,F.gb)({key:"fab-pet-merge-2-evolution-disabled",default:!1})},37016:(k,B,U)=>{"use strict";U.d(B,{J1:()=>$,_T:()=>H,o5:()=>F,qd:()=>j,zb:()=>G});var F,G;U(87490),U(48417);!function(k){k.OneEvolutionFamilyTier="OneEvolutionFamilyTier",k.TwoEvolutionFamilyTier="TwoEvolutionFamilyTier",k.ThreeEvolutionFamilyTier="ThreeEvolutionFamilyTier",k.FourEvolutionFamilyTier="FourEvolutionFamilyTier"}(F||(F={})),function(k){k.Success="Success",k.NotEnoughIngredients="NotEnoughIngredients",k.IncompatibleIngredients="IncompatibleIngredients",k.AlreadyMaxRank="AlreadyMaxRank",k.PetNotOwned="PetNotOwned",k.PetCannotBeMerged="PetNotMergeable",k.LevelTooLow="LevelTooLow",k.UnableToGiveFreeMerge="UnableToGiveFreeMerge"}(G||(G={}));const j={MIN:0,MAX:6};var $;!function(k){k.Pet="Pet",k.MembershipReward="MembershipReward",k.MagicoinPet="MagicoinPet",k.FTUEMerge="FTUEMerge"}($||($={}));const H={defaultPetCostTableVariantKey:"mergeCosts",overridePetCostTableVariantKey:"petCosts"}},96989:(k,B,U)=>{"use strict";U.d(B,{Y:()=>$});var F=U(15821),G=U(21574),j=U(37016);class ${static getRecipeForPet(k,B){var U;const F=null!==(U=this.PROGRESSION_TYPES_PER_EVOS[k])&&void 0!==U?U:j.o5.OneEvolutionFamilyTier;return G.g.config.recipesPerProgressionType[F][B]}static getMerge2RecipeForPet(k,B,U){const F=G.g.merge2RecipesByPetId.recipesByPetId[+k];if(F)return F[U];const j=G.g.merge2RecipesByRarity.defaultRecipesByRarity[B];return null==j?void 0:j[U]}static isCompatibleIngredient(k,B,U,G,$){let H=!1;switch(G.type){case j.J1.Pet:const V=B(G.uniqueId);if(this.isMerge1Recipe($)){const B=k(U.ID);if(V&&V.uniqueID!==U.uniqueID){const U=k(V.ID);U.data.evolution.tier===$.evolutionTier&&(H=this.isSameEvolutionLine(k,U,B))}}else H=F.A.isDefined(V)&&U.ID===V.ID&&V.uniqueID!==U.uniqueID;break;case j.J1.MembershipReward:case j.J1.MagicoinPet:H=!0}return H}static isSameEvolutionLine(k,B,U){if(B.ID===U.ID)return!0;if(B.data.evolution.tier>U.data.evolution.tier)return this.isSameEvolutionLine(k,U,B);const F=B.data.curve.find((k=>k.evolveID));if(!(null==F?void 0:F.evolveID))return!1;if(F.evolveID===U.ID)return!0;const G=k(F.evolveID);return this.isSameEvolutionLine(k,G,U)}static canRankUp(k){return kk.uniqueID!==U.uniqueID)).forEach((B=>{var U;let H=1;const V=k(B.uniqueID);for(let k=0;k0&&(j[B.uniqueID]=H)})),j}static selectOptimalIngredients(k,B){const U=Object.entries(k).sort(((k,B)=>k[1]-B[1])),F=U.length;let G=null;for(let j=1;j<1<=B&&(!G||k{"use strict";U.d(B,{m:()=>G,y:()=>j});var F=U(77601);const G=(0,F.gb)({key:"show-pet-details-screen-update",activateAssociatedExperiments:1,default:!1}),j=(0,F.gb)({key:"pet-details-screen-use-alternate-layout",activateAssociatedExperiments:1,default:!1})},13027:(k,B,U)=>{"use strict";var F;U.d(B,{k:()=>F}),function(k){k[k.StartQuest=1]="StartQuest",k[k.BattleOne=2]="BattleOne",k[k.BattleOneGotItem=3]="BattleOneGotItem",k.BattleOneB="2b-first-battle-post-tutorial",k.BattleOneGotItemB="3b-first-battle-post-tutorial-reward",k[k.BattleTwo=4]="BattleTwo",k[k.BattleTwoGotItem=5]="BattleTwoGotItem",k.BattleTwoB="4b-second-battle-post-tutorial",k.BattleTwoGotItemB="5b-second-battle-post-tutorial-reward",k.ClassCode="10-class-code-attach",k.ClassCodeGotItem="11-class-code-attach-reward",k[k.PlayAfterHours=8]="PlayAfterHours",k[k.PlayAfterHoursGotItem=9]="PlayAfterHoursGotItem",k.ProfileQuiz="12-login-credentials-quiz",k.ProfileQuizGotItem="13-login-credentials-quiz-reward",k[k.ParentAttach=6]="ParentAttach",k[k.ParentAttachGotItem=7]="ParentAttachGotItem",k.ParentAttachB="6b-parent-attach-post-ftue",k.ParentAttachGotItemB="7b-parent-attach-post-ftue-reward"}(F||(F={}))},49754:(k,B,U)=>{"use strict";U.d(B,{H:()=>F});const F=(0,U(77601).gb)({key:"fab-post-battle-rescue-screen-variants",default:{enabled:!1,magicoinCost:0}})},92240:(k,B,U)=>{"use strict";U.d(B,{h:()=>$});var F=U(8674),G=U(6670),j=U(58776);class ${static calculateState(k,B,U){var F;let G;const $=B.find((B=>B.name===k));if($){G=$.defaultState;for(let k=0;k<(null===(F=$.stateOverrides)||void 0===F?void 0:F.length);k++){if(!$.stateOverrides[k].stateTaskIds.every((k=>{var B;return(null===(B=U.find((B=>B.id===k)))||void 0===B?void 0:B.status)===j.t.COMPLETE}))){G=$.stateOverrides[k];break}}return G}}static calculateStateWithPreconditions(k,B,U,$){return(0,F.sH)(this,void 0,void 0,(function*(){var F;let H;const V=B.find((B=>B.name===k));if(!V)return;let W=yield G.f.meetsPreconditions($,V.preconditions);if(W){H=V.defaultState;for(let k=0;k<(null===(F=V.stateOverrides)||void 0===F?void 0:F.length);k++){if(W=yield G.f.meetsPreconditions($,V.stateOverrides[k].preconditions),!W)continue;if(!V.stateOverrides[k].stateTaskIds.every((k=>{var B;return(null===(B=U.find((B=>B.id===k)))||void 0===B?void 0:B.status)===j.t.COMPLETE}))){H=V.stateOverrides[k];break}}return H}}))}}},70472:(k,B,U)=>{"use strict";U.d(B,{A:()=>Z});var F=U(7247),G=U(96684),j=U(70760),$=U(60157),H=U(28869);class V extends H.g{isReady(k,B){return!(!B||!(0,$.M6)(B))&&(!(k.shopIDs&&!k.shopIDs.some((k=>k===B.shopID)))&&(!(k.shopNames&&!k.shopNames.some((k=>k===B.shopName)))&&!(k.shopCategories&&!k.shopCategories.some((k=>k===B.shopCategory)))))}getCacheKey(k){var B,U,F;return`ShopRestriction\n ID${null===(B=k.shopIDs)||void 0===B?void 0:B.join("|")}\n Name${null===(U=k.shopNames)||void 0===U?void 0:U.join("|")}\n Category${null===(F=k.shopCategories)||void 0===F?void 0:F.map((k=>k.toString())).join("|")}`}}class W extends H.g{isReady(k,B){return!(!B||!(0,$.An)(B))&&(!(k.unitTypes&&!k.unitTypes.some((k=>k===B.unitType)))&&(!(k.unitIds&&!k.unitIds.some((k=>k===B.id)))&&(!(k.unitNames&&!k.unitNames.some((k=>k===B.name)))&&(!(k.unitNicknames&&!k.unitNicknames.some((k=>k===B.nickname)))&&!(k.unitTeams&&!k.unitTeams.some((k=>k===B.team)))))))}getCacheKey(k){var B,U,F,G,j;return`UnitRestriction\n Type${null===(B=k.unitTypes)||void 0===B?void 0:B.map((k=>k.toString())).join("|")}\n ID${null===(U=k.unitIds)||void 0===U?void 0:U.join("|")}\n Name${null===(F=k.unitNames)||void 0===F?void 0:F.join("|")}\n Nickname${null===(G=k.unitNicknames)||void 0===G?void 0:G.join("|")}\n Team${null===(j=k.unitTeams)||void 0===j?void 0:j.map((k=>k.toString())).join("|")}`}}class q extends H.g{isReady(k,B){return!(!B||!(0,$.Rf)(B))&&this.checkRestrictions(k,B)}checkRestrictions(k,B){return!(k.ids&&!k.ids.some((k=>k===B.uniqueId)))}getCacheKey(k){return`UniqueEncounterRestriction${this.getCacheKeyFromData(k)}`}getCacheKeyFromData(k){var B;return`ID${null===(B=k.ids)||void 0===B?void 0:B.map((k=>k.toString())).join("|")}`}}const K={[F.i.ITEM_RESTRICTIONS]:G.x,[F.i.SHOP_RESTRICTIONS]:V,[F.i.PET_RESTRICTIONS]:j.F,[F.i.UNIT_RESTRICTIONS]:W,[F.i.UNIQUE_ENCOUNTER_RESTRICTIONS]:q};class z extends class{constructor(){this.reset()}doCheck(k,B,U){let F=k.getCacheKey(B);if(F&&!0===(null==B?void 0:B.negateResult)&&(F=`${F}-negate`),F&&F in this._resultsCache)return this._resultsCache[F];let G=k.isReady(B,U);return!0===(null==B?void 0:B.negateResult)&&(G=!G),F&&(this._resultsCache[F]=G),G}reset(){this._resultsCache={},this._cache={}}}{constructor(k){super(),this._taskParams=k}check(k,B){const U=K[k];if(void 0===U)throw new Error(`No condition handler found for type: ${k}`);const F=new U;return this.doCheck(F,B,this._taskParams)}}var Y=U(58776),Q=U(62886),X=U(24522);class Z{get questID(){return this._questID}get taskID(){return this._taskDefinition.id}get type(){return this._taskDefinition.completionRequirements.type}get taskDefinition(){return this._taskDefinition}get taskProgress(){return this._taskProgress}get onSetupTasks(){var k;return null!==(k=this._taskDefinition.onSetup)&&void 0!==k?k:[]}constructor(k,B,U){this._questID=k,this._taskDefinition=B,this._taskProgress=U}incrementProgressInTask(k=1){var B,U;return this.setProgressInTask((null!==(U=null===(B=this._taskProgress.data)||void 0===B?void 0:B.progress)&&void 0!==U?U:0)+k)}resetProgressInTask(){return this.setProgressInTask(0)}setProgressInTask(k){var B,U,F,G,j,$,H,V,W,q;const K=Math.max(null!==(B=this._taskDefinition.completionRequirements.data.target)&&void 0!==B?B:1,1);let z=0,Q=k;if(Q>=K&&!this._taskDefinition.repeatable&&(this._taskProgress.status=Y.t.COMPLETE,z=1),this._taskDefinition.repeatable){z=null===(U=this._taskDefinition.allowProgressOverflow)||void 0===U||U?Math.floor(k/K):Math.min(1,Math.floor(k/K));const B=(null!==(G=null===(F=this._taskProgress.data)||void 0===F?void 0:F.timesCompleted)&&void 0!==G?G:0)+z;"number"==typeof this._taskDefinition.repeatable&&B>=this._taskDefinition.repeatable&&(this._taskProgress.status=Y.t.COMPLETE,z=Math.max(0,this._taskDefinition.repeatable-(null!==($=null===(j=this._taskProgress.data)||void 0===j?void 0:j.timesCompleted)&&void 0!==$?$:0))),Q=k%K,null!==(H=(W=this._taskProgress).data)&&void 0!==H||(W.data={progress:Q,timesCompleted:0}),this._taskProgress.data.timesCompleted=B}else null!==(V=(q=this._taskProgress).data)&&void 0!==V||(q.data={progress:Q});return this._taskProgress.data.progress=Q,this._taskProgress.status===Y.t.COMPLETE&&delete this.taskProgress.data,z}setResults(k){var B,U;null!==(B=(U=this._taskProgress).results)&&void 0!==B||(U.results=[]),this._taskProgress.results.push(...k)}eventMatchesTask(k,B){switch(this.type){case Q.T.PURCHASE_FROM_STORE:return this.type===k&&B.id===this._taskDefinition.id;case Q.T.NONE:return this.type===k}return this.taskMeetsRequirements(k,B,this.taskDefinition.completionRequirements)}taskShouldReset(k,B){return this.taskMeetsRequirements(k,B,this.taskDefinition.resetRequirements)}shouldSendEvent(k,B){return this.eventMatchesTask(k,B)||this.taskShouldReset(k,B)}taskMeetsRequirements(k,B,U){var F,G,j,$;if(!U)return!1;if(!Object.values(Q.T).includes(k))return!1;if(U.type!==k)return!1;if((null===(F=U.data)||void 0===F?void 0:F.id)&&(null===(G=U.data)||void 0===G?void 0:G.id)!==B.id)return!1;if((null===(j=U.data)||void 0===j?void 0:j.type)&&(null===($=U.data)||void 0===$?void 0:$.type)!==B.type)return!1;if(U.conditions){let k=!0;const F=new z(B.params);for(const B of U.conditions||[])if(k=F.check(B.type,B.data),!k)break;if(!k)return!1}return!0}getTimeUntilUnlock(){var k,B;const U=null===(B=null===(k=this._taskDefinition)||void 0===k?void 0:k.preconditions)||void 0===B?void 0:B.find((k=>k.type===X.n.DATE_AFTER));return U?new Date(U.data.date).getTime()-Date.now():0}getTimeUntilExpiry(){var k;const B=null===(k=this._taskDefinition.preconditions)||void 0===k?void 0:k.find((k=>k.type===X.n.DATE_BEFORE));return B?new Date(B.data.date).getTime()-Date.now():0}getPrerequisites(){return this._taskDefinition.prerequisites.filter((k=>"root"!==k))}}},6670:(k,B,U)=>{"use strict";U.d(B,{f:()=>V});var F=U(8674),G=U(15821),j=U(70472),$=U(58776),H=U(29891);class V{static getTasksInProgress(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){var F;if(B.status===$.t.COMPLETE)return[];if(k.id!==B.id)throw new Error(`Quest definition (${k.id}) and player progress (${B.id}) are for different quests.`);const G=[],H=[],V=new Map,W=[];null===(F=B.tasks)||void 0===F||F.forEach((B=>{var U;if(B)if(B.status===$.t.COMPLETE){G.push(B.id);const F=k.tasks.find((k=>k.id===B.id));(null===(U=null==F?void 0:F.metadata)||void 0===U?void 0:U.isExperimentGate)&&W.push(B.id)}else B.status===$.t.STOPPED?H.push(B.id):V.set(B.id,B)})),U.reset();const q=[];for(const B of k.tasks){if(H.includes(B.id))continue;if(!B.prerequisites.filter((U=>this.isPrerequisiteValid(U,k,W,B))).every((k=>G.includes(k))))continue;if(!(yield this.meetsPreconditions(U,B.preconditions)))continue;const F=V.get(B.id);F&&q.push(new j.A(k.id,B,F))}return q}))}static isPrerequisiteValid(k,B,U,F){var G,j;if(!F.checkPrerequisiteValidity)return!0;const $=B.tasks.find((B=>B.id===k));return!!$&&!((null===(G=$.metadata)||void 0===G?void 0:G.experimentTaskId)&&!U.includes(null===(j=$.metadata)||void 0===j?void 0:j.experimentTaskId))}static preprocessQuestProgress(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){var F,G,j,H;if(B&&k.id!==B.id)throw new Error(`Quest definition (${k.id}) and player progress (${B.id}) are for different quests.`);(null==B?void 0:B.uuid)&&B.uuid!==k.metadata.uuid&&(B.tasks=[]);const W={id:k.id,status:(null==B?void 0:B.status)||$.t.IN_PROGRESS,tasks:[]};let q=!1;for(const K of k.tasks){let k=null===(F=null==B?void 0:B.tasks)||void 0===F?void 0:F.find((k=>k.id===K.id));const z=void 0!==k;if(k||(k=V.generateTaskProgress(K.id)),(null==B?void 0:B.status)===$.t.COMPLETE?null===(G=W.tasks)||void 0===G||G.push({id:k.id,status:$.t.COMPLETE,results:null==k?void 0:k.results}):null===(j=W.tasks)||void 0===j||j.push({id:k.id,status:k.status,data:k.data,results:null==k?void 0:k.results}),B&&U&&k.status===$.t.IN_PROGRESS){let F=!1;for(const k of K.stopConditions||[])if(F=yield U.check(k.type,k.data),F)break;F&&(k.status=$.t.STOPPED,q=!0,z||null===(H=B.tasks)||void 0===H||H.push(k))}}return{changesMade:q,fullProgress:W}}))}static filterTasksByPreconditions(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield Promise.all(k.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){var U;return(yield Promise.all((null!==(U=k.taskDefinition.preconditions)&&void 0!==U?U:[]).map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return B.check(k.type,k.data)})))))).every((k=>k))?k:void 0})))))).filter((k=>void 0!==k))}))}static filterTaskSchemasByPreconditions(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield Promise.all(k.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){var U;return(yield Promise.all((null!==(U=k.preconditions)&&void 0!==U?U:[]).map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return B.check(k.type,k.data)})))))).every((k=>k))?k:void 0})))))).filter(G.A.isDefined)}))}static generateTaskProgress(k){return{id:k,status:$.t.IN_PROGRESS,data:{progress:0}}}static getTasksOfType(k,B){return k.tasks.filter((k=>k.completionRequirements.type===B))}static getTasksOfStatus(k,B){if(!k)return[];const U=[];for(const F of k)F.status===B&&U.push(F.id);return U}static shouldProcessOnCompleteHandlers(k){var B,U;return!(null===(U=null===(B=k.results)||void 0===B?void 0:B.find((k=>k.type===H.s.MARK_TASK_COMPLETE)))||void 0===U?void 0:U.result)}static doesTaskGrantItems(k){var B,U;return null!==(U=null===(B=k.onComplete)||void 0===B?void 0:B.some((k=>k.type===H.s.GOT_ITEM||k.type===H.s.GOT_PET)))&&void 0!==U&&U}static meetsPreconditions(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){let U=!0;for(const F of null!=B?B:[])if(U=yield k.check(F.type,F.data),!U)return!1;return!0}))}}},28869:(k,B,U)=>{"use strict";U.d(B,{g:()=>F});class F{getCacheKey(k){return null}}},96684:(k,B,U)=>{"use strict";U.d(B,{x:()=>j});var F=U(60157),G=U(28869);class j extends G.g{isReady(k,B){return!(!B||!(0,F.hr)(B))&&this.checkRestrictions(k,B)}checkRestrictions(k,B){return!(k.rarities&&!k.rarities.some((k=>k===B.rarity)))&&(!(k.types&&!k.types.some((k=>k===B.itemType)))&&(!(k.sources&&!k.sources.some((k=>k===B.source)))&&!(k.ids&&!k.ids.some((k=>k.toString()===B.id.toString())))))}getCacheKey(k){return`ItemRestriction${this.getCacheKeyFromData(k)}`}getCacheKeyFromData(k){var B,U,F,G;return`Rarity${null===(B=k.rarities)||void 0===B?void 0:B.map((k=>k.toString())).join("|")}\n Type${null===(U=k.types)||void 0===U?void 0:U.map((k=>k.toString())).join("|")}\n Source${null===(F=k.sources)||void 0===F?void 0:F.map((k=>k.toString())).join("|")}\n ID${null===(G=k.ids)||void 0===G?void 0:G.map((k=>k.toString())).join("|")}`}}},70760:(k,B,U)=>{"use strict";U.d(B,{F:()=>j});var F=U(60157),G=U(96684);class j extends G.x{isReady(k,B){return!(!B||!(0,F.NT)(B))&&(!!super.checkRestrictions(k,B)&&(!(k.elements&&!k.elements.some((k=>k===B.element)))&&(!(k.levelMin&&B.level&&B.levelk.levelMax))))}getCacheKey(k){var B;return`PetRestriction${super.getCacheKeyFromData(k)}\n Elements${null===(B=k.ids)||void 0===B?void 0:B.map((k=>k.toString())).join("|")}\n LevelMin${k.levelMin}LevelMax${k.levelMax}`}}},94310:(k,B,U)=>{"use strict";var F;U.d(B,{L:()=>F}),function(k){k.ImaniStar="Imani Star",k.MilkyWay="Milky Way",k.Starfall_1="Starfall 1",k.Starfall_2="Starfall 2",k.Starfall_3="Starfall 3",k.Starfall_4="Starfall 4",k.Starfall_5="Starfall 5",k.FestivalPrizeWheel="FestivalPrizeWheel",k.Snips="NPC Gnome Stylist",k.DragonStatue="NPC Dragon Statue",k.CurrencyDrainModal="Currency Drain Modal",k.CutsceneReplayButton="Cutscene Replay Button",k.KandiKorn="Kandi Korn",k.MoonPortal="Moon Portal",k.GrottoPortal="Grotto Portal",k.Selena="Selena",k.Verna="Verna",k.Bargo="Bargo",k.Harriet="Harriet",k.DonZorro="Don Zorro",k.HowardCornelius="Howard Cornelius",k.Athena="Athena",k.BossStatue="Boss Statue",k.MainObjective="Main Objective",k.CurrencyDrainHudOverride="Currency Drain HUD Override",k.CurrencyDrainPopup="Currency Drain Popup",k.MapOverride="Map Override",k.DailyBattles="Daily Battles",k.DailyBossBattles="Daily Boss Battles",k.InitialCutsceneSpawn="Initial Cutscene Spawn",k.FinalCutsceneSpawn="Final Cutscene Spawn"}(F||(F={}))},98938:(k,B,U)=>{"use strict";var F;U.d(B,{t:()=>F}),function(k){k.BattlePass="battle-pass",k.DailyLoginCalendar="daily-login-calendar",k.Ultimates="ultimates",k.ZoneQuests="zone-quests",k.LocalZoneQuests="local-zone-quests",k.PlayerGoals="ftue-player-goal-quests",k.DynamicStore="dynamic-store",k.Festival="festival",k.StateChallenge="state-challenge",k.NationalCup="national-cup",k.FireflyForest="firefly-forest",k.Shiverchill="shiverchill",k.BonfireSpire="bonfire-spire",k.Skywatch="skywatch",k.ShipwreckShore="shipwreck-shore",k.AcademyEndgame="academy-endgame",k.FireflyForestHard="firefly-forest-hard",k.ShiverchillHard="shiverchill-hard",k.BonfireSpireHard="bonfire-spire-hard",k.SkywatchHard="skywatch-hard",k.ShipwreckShoreHard="shipwreck-shore-hard",k.AcademyEndgameHard="academy-endgame-hard"}(F||(F={}))},58776:(k,B,U)=>{"use strict";var F;U.d(B,{t:()=>F}),function(k){k.IN_PROGRESS="in-progress",k.COMPLETE="complete",k.STOPPED="stopped"}(F||(F={}))},62886:(k,B,U)=>{"use strict";var F;U.d(B,{T:()=>F}),function(k){k.ANSWER_QUESTION_CORRECTLY="AnswerQuestionCorrectly",k.ANSWER_QUESTION_INCORRECTLY="AnswerQuestionIncorrectly",k.ATTACH_CLASS_CODE="AttachClassCode",k.ATTACH_PARENT="AttachParent",k.BUTTON_CLICK="ButtonClick",k.CAST_ASTRAL_SPELL="CastAstralSpell",k.CAST_FIRE_SPELL="CastFireSpell",k.CAST_ICE_SPELL="CastIceSpell",k.CAST_NEUTRAL_SPELL="CastNeutralSpell",k.CAST_PHYSICAL_SPELL="CastPhysicalSpell",k.CAST_PLANT_SPELL="CastPlantSpell",k.CAST_SHADOW_SPELL="CastShadowSpell",k.CAST_SPELL="CastSpell",k.CAST_STORM_SPELL="CastStormSpell",k.CAST_WATER_SPELL="CastWaterSpell",k.COLLECT_ITEM="CollectItem",k.COMPLETE_CUTSCENE="CompleteCutscene",k.COMPLETE_LOOT_DASH="CompleteLootDash",k.COMPLETE_PROFILE_QUIZ="CompleteProfileQuiz",k.DEFEAT_ENCOUNTER="DefeatEncounter",k.DEFEAT_QUEST_ENCOUNTER="DefeatQuestEncounter",k.DEFEAT_UNIT="DefeatUnit",k.ENTER_MAP="EnterMap",k.EQUIP_ITEM="EquipItem",k.EVOLVE_PET="EvolvePet",k.FSM_COMPLETE_SEQUENCE="FsmCompleteSequence",k.GAIN_PET_XP="GainPetXp",k.LET_UNIT_ESCAPE="LetUnitEscape",k.LOSE_ANY_BATTLE="LoseAnyBattle",k.MAKE_TASK_PROGRESS="MakeTaskProgress",k.MERGE_PET="MergePet",k.NONE="None",k.OPEN_CHEST="OpenChest",k.PLAY_AFTER_HOURS="PlayAfterHours",k.PLAY_ANY_BATTLE="PlayAnyBattle",k.PLAY_MINUTES="PlayMinutes",k.PURCHASE_FROM_STORE="PurchaseFromStore",k.PURCHASE_ITEM="PurchaseItem",k.PURCHASE_PET_LEVEL="PurchasePetLevel",k.QUEST_OBJECT_STATE_EVALUATED="QuestObjectStateEvaluated",k.RECEIVE_ITEM="ReceiveItem",k.RECEIVE_MULTIPLE_ITEM="ReceiveMultipleItem",k.REMOVE_ITEM="RemoveItem",k.REMOVE_MULTIPLE_ITEM="RemoveMultipleItem",k.RESCUE_PET="RescuePet",k.SPIN_WHEEL="SpinWheel",k.START_QUEST="StartQuest",k.SPEAK_WITH_NPC="SpeakWithNPC",k.TRADE_WITH_ULLA="TradeWithUlla",k.USE_ITEM="UseItem",k.WIN_TUTORIAL_BATTLE="WinTutorialBattle",k.WIN_BATTLE="WinBattle",k.WIN_ANY_BATTLE="WinAnyBattle",k.WIN_LOOT_DASH="WinLootDash"}(F||(F={}))},29891:(k,B,U)=>{"use strict";var F;U.d(B,{s:()=>F}),function(k){k.ACTIVATE_INFINITE_TIER="ActivateInfiniteTier",k.COMPLETE_TUTORIAL="CompleteTutorial",k.GOT_ITEM="GotItem",k.ENSURE_ITEM="EnsureItem",k.GOT_PET="GotPet",k.MEMBER_JAR_GOT_ITEM="MemberJarGotItem",k.GIVE_BATTLE_PASS_XP="GiveBattlePassXp",k.GIVE_ULTIMATE="GiveUltimate",k.LOAD_PREFAB="LoadPrefab",k.ENABLE_INPUT="EnableInput",k.SHOW_COLLECTED_ITEM="ShowCollectedItem",k.SEND_QUEST_SEGMENT_EVENT="SendQuestSegmentEvent",k.SEND_PLAYER_GOALS_SEGMENT_EVENT="SendPlayerGoalsSegmentEvent",k.SUBTRACT_INFINITE_BATTLE_PASS_XP="SubtractInfiniteBattlePassXp",k.MAKE_TASK_PROGRESS="MakeTaskProgress",k.MARK_QUEST_COMPLETE="MarkQuestComplete",k.MARK_TASK_COMPLETE="MarkTaskComplete",k.PLAY_DIALOGUE="PlayDialogue",k.OFFER_TELEPORT="OfferTeleport",k.SEND_CUSTOM_SEGMENT_EVENT="SendCustomSegmentEvent",k.SEND_TOASTER_NOTIFICATION="SendToasterNotification",k.SET_DAILY_LOGIN_CALENDER_TIMESTAMP="SetDailyLoginCalendarTimestamp",k.REMOVE_UNSECURE_ITEM="RemoveUnsecureItem",k.TELEPORT_TO_MAP="TeleportToMap",k.TRIGGER_STORE_OFFER="TriggerStoreOffer",k.SEND_QUEST_EVENT_VIA_HUB="SendQuestEventViaHub",k.BROADCAST="Broadcast"}(F||(F={}))},7247:(k,B,U)=>{"use strict";var F;U.d(B,{i:()=>F}),function(k){k.ITEM_RESTRICTIONS="ItemRestrictions",k.SHOP_RESTRICTIONS="ShopRestrictions",k.PET_RESTRICTIONS="PetRestrictions",k.UNIT_RESTRICTIONS="UnitRestrictions",k.UNIQUE_ENCOUNTER_RESTRICTIONS="UniqueEncounterRestrictions"}(F||(F={}))},24522:(k,B,U)=>{"use strict";var F;U.d(B,{n:()=>F}),function(k){k.DATE_BEFORE="DateIsBefore",k.DATE_AFTER="DateIsAfter",k.HAS_EXPERIMENT_FEATURE="HasExperimentFeature",k.HAS_MEMBER_FEATURE="HasMemberFeature",k.HAS_TOTAL_BATTLE_PASS_XP="HasTotalBattlePassXp",k.HAS_QUEST_SYSTEM="HasGameQuestSystem",k.DAILY_LOGIN_CALENDAR_CHECK_DATE="DailyLoginCalendarCheckDate",k.IS_DURING_SCHOOL_HOURS="IsDuringSchoolHours",k.IS_MEMBER="IsMember",k.HAS_PET_ON_TEAM_WITH_ELEMENT="HasPetOnTeamWithElement",k.ALL_PETS_ON_TEAM_HAVE_ELEMENT="AllPetsOnTeamHaveElement",k.IN_BATTLE_OF_TYPE="InBattleOfType",k.REMAINING_HEALTH="RemainingHealth",k.IS_DURING_WEEKEND="IsDuringWeekend",k.HAS_MET_STATE_CHALLENGE_GOAL="HasMetStateChallengeGoal",k.IS_IN_ZONE="IsInZone",k.IS_WEARING_GEAR="IsWearingGear",k.HAS_APPEARANCE="HasAppearance",k.MEETS_CAMPAIGN_REPLAY_NARRATIVE_REQUIREMENT="MeetsCampaignReplayNarrativeRequirement",k.IS_QUEST_TASK_COMPLETE="IsQuestTaskComplete",k.IS_LEVEL="IsLevel",k.HAS_LOCALE="HasLocale",k.MEETS_FEATURE_REQUIREMENT="MeetsFeatureRequirement",k.BATTLE_HAS_ENEMY="BattleHasEnemy"}(F||(F={}))},60157:(k,B,U)=>{"use strict";var F;function G(k){return k.taskEventType===F.Battle}function j(k){return k.taskEventType===F.Encounter}function $(k){return k.taskEventType===F.Item}function H(k){return k.taskEventType===F.Shop}function V(k){return k.taskEventType===F.Pet}function W(k){return k.taskEventType===F.Unit}U.d(B,{An:()=>W,M6:()=>H,NT:()=>V,Q9:()=>G,Rf:()=>j,Z7:()=>F,hr:()=>$}),function(k){k.Battle="Battle",k.Encounter="Encounter",k.Item="Item",k.Shop="Shop",k.Pet="Pet",k.StateChallenge="StateChallenge",k.Unit="Unit"}(F||(F={}))},65741:(k,B,U)=>{"use strict";var F,G;U.d(B,{d:()=>F,k:()=>G}),function(k){k.ACTIVE="active",k.INACTIVE="inactive"}(F||(F={})),function(k){k.COMPLETED="completed",k.IN_PROGRESS="in-progress",k.NOT_STARTED="not-started"}(G||(G={}))},94428:(k,B,U)=>{"use strict";U.d(B,{H9:()=>G,oW:()=>F});var F,G;!function(k){k.WizardDash="wizardDash"}(F||(F={})),function(k){k.PlayerProgressUpdated="playerProgressUpdated",k.QuizEnded="quizEnded"}(G||(G={}))},24227:(k,B,U)=>{"use strict";U.d(B,{j:()=>j});var F=U(87490),G=U(24652);class j{static getBossElementFromBossType(k){let B;switch(k){case G.ts.AstralDragon:B=F.EElementType.Astral;break;case G.ts.FireDragon:B=F.EElementType.Fire;break;case G.ts.PhysicalDragon:B=F.EElementType.Physical;break;case G.ts.ShadowDragon:B=F.EElementType.Shadow;break;case G.ts.IceWyrm:case G.ts.IceDragon:B=F.EElementType.Ice}return null!=B?B:F.EElementType.Astral}static getRiftsPetReuseCost(k,B,U){var F,G,j,$,H;let V=0;if(void 0!==B.petCooldownMs&&null!==B.petCooldownMs){const $=Math.max(0,k.timestamp+(null!==(F=B.petCooldownMs)&&void 0!==F?F:0)-U);V=Math.ceil($/1e3)*(null!==(G=B.reuseCostPerSecond)&&void 0!==G?G:0)*Math.max((null!==(j=B.costMultiplierPerUse)&&void 0!==j?j:0)*k.reuseCount,1)}else V=(null!==($=B.flatCost)&&void 0!==$?$:0)*(1+(null!==(H=B.costMultiplierPerUse)&&void 0!==H?H:0)*k.reuseCount);return Math.ceil(V)}}},24652:(k,B,U)=>{"use strict";U.d(B,{Hz:()=>W,Y1:()=>F,cn:()=>G,rI:()=>V,ts:()=>j,vA:()=>q});var F,G,j,$=U(88022),H=U(36648);!function(k){k.KeystonesUnlocked="keystonesUnlocked",k.LevelLock="levelLock",k.OwnPetsOfElement="ownPetsOfElement",k.OwnPetsOfRarity="ownPetsOfRarity",k.PuppetMasterDefeated="puppetMasterDefeated"}(F||(F={})),function(k){k.Normal="normal",k.Boss="boss"}(G||(G={})),function(k){k.AstralDragon="astralDragon",k.FireDragon="fireDragon",k.PhysicalDragon="physicalDragon",k.ShadowDragon="shadowDragon",k.IceWyrm="iceWyrm",k.IceDragon="iceDragon"}(j||(j={}));const V={[j.AstralDragon]:[H.q.Key_pose_dragon_astral],[j.FireDragon]:[H.q.Key_pose_dragon_fire],[j.PhysicalDragon]:[H.q.Key_pose_dragon_physical],[j.ShadowDragon]:[H.q.Key_pose_dragon_shadow],[j.IceWyrm]:[$._.Ui_prebattle_json,"boss-ice-wyrm"],[j.IceDragon]:[H.q.Key_pose_dragon_ice]},W={[j.AstralDragon]:H.q.Background_boss_rift_sky,[j.FireDragon]:H.q.Background_boss_rift_sky,[j.PhysicalDragon]:H.q.Background_boss_rift_sky,[j.ShadowDragon]:H.q.Background_boss_rift_sky,[j.IceWyrm]:H.q.Background_boss_rift_ice,[j.IceDragon]:H.q.Background_boss_rift_ice},q={[j.AstralDragon]:"NPC_NAME_DRAGON_ASTRAL",[j.FireDragon]:"NPC_NAME_DRAGON_FIRE",[j.PhysicalDragon]:"NPC_NAME_DRAGON_PHYSICAL",[j.ShadowDragon]:"NPC_NAME_DRAGON_SHADOW",[j.IceWyrm]:"NPC_NAME_ICE_WORM",[j.IceDragon]:"NPC_NAME_DRAGON_ICE"}},42448:(k,B,U)=>{"use strict";U.d(B,{BN:()=>H,Bs:()=>rt,CN:()=>Q,JG:()=>at,N3:()=>Z,Qm:()=>ct,R7:()=>et,T7:()=>ht,Ty:()=>nt,VS:()=>Y,X5:()=>W,_u:()=>ot,a6:()=>q,aK:()=>K,d:()=>st,fW:()=>it,h5:()=>z,ni:()=>X,vP:()=>$,wJ:()=>V});var F=U(99625),G=U(64270),j=U(87490);const $=3;j.EElementType.Astral,j.EElementType.Physical,j.EElementType.Shadow,j.EElementType.Fire;var H,V,W;!function(k){k[k.PortalOneKey=1]="PortalOneKey",k[k.PortalTwoKey=2]="PortalTwoKey",k[k.PortalThreeKey=3]="PortalThreeKey"}(H||(H={})),function(k){k.RewardDetermined="rewardDetermined"}(V||(V={})),function(k){k.Astral="astral",k.Default="default",k.Fire="fire",k.Ice="ice",k.Physical="physical",k.Plant="plant",k.Shadow="shadow",k.Storm="storm",k.Water="water"}(W||(W={}));const q={[W.Astral]:"#A4F1EE",[W.Default]:"#DDB2A5",[W.Fire]:"#FDA97B",[W.Ice]:"#B1F4F5",[W.Physical]:"#C6BCB7",[W.Plant]:"#A6FCA3",[W.Shadow]:"#C8ADFA",[W.Storm]:"#B7B0F0",[W.Water]:"#79BCFD"},K={[W.Astral]:14348986,[W.Default]:14529189,[W.Fire]:16765601,[W.Ice]:15138815,[W.Physical]:15587521,[W.Plant]:14744759,[W.Shadow]:15976433,[W.Storm]:12509680,[W.Water]:9890047},z={[W.Astral]:"#94E8FD",[W.Default]:"#FFFFFF",[W.Fire]:"#FF9C6D",[W.Ice]:"#91DFF8",[W.Physical]:"#BBB2AD",[W.Plant]:"#9CF19D",[W.Shadow]:"#B9A5F1",[W.Storm]:"#ABA8E6",[W.Water]:"#7FCDFF"},Y={[W.Astral]:1,[W.Default]:.15,[W.Fire]:1,[W.Ice]:1,[W.Physical]:1,[W.Plant]:1,[W.Shadow]:1,[W.Storm]:1,[W.Water]:1};var Q,X;!function(k){k.NoPetsOfElement="noPetsOfElement",k.NoPetsOfRarity="noPetsOfRarity",k.OnlyPetsOfElement="onlyPetsOfElement",k.OnlyPetsOfRarity="onlyPetsOfRarity"}(Q||(Q={})),function(k){k.Portal1="portal1",k.Portal2="portal2",k.Portal3="portal3"}(X||(X={}));const Z={id:X.Portal1,location:{x:640,y:140},shopNpcPrefab:F.l.Portal1ShopNPC,shopNpcLocation:{x:540,y:340}},J={id:X.Portal2,location:{x:280,y:200},shopNpcPrefab:F.l.Portal2ShopNPC,shopNpcLocation:{x:180,y:400}},tt={id:X.Portal3,location:{x:1e3,y:200},shopNpcPrefab:F.l.Portal3ShopNPC,shopNpcLocation:{x:900,y:400}},et={[X.Portal1]:Z,[X.Portal2]:J,[X.Portal3]:tt},it={[X.Portal1]:H.PortalOneKey,[X.Portal2]:H.PortalTwoKey,[X.Portal3]:H.PortalThreeKey},st={[X.Portal1]:G.GA.RiftsPortal1Shop,[X.Portal2]:G.GA.RiftsPortal2Shop,[X.Portal3]:G.GA.RiftsPortal3Shop},nt={[X.Portal1]:28,[X.Portal2]:29,[X.Portal3]:30},at={28:X.Portal1,29:X.Portal2,30:X.Portal3};var rt;!function(k){k.DynamicStoreModalHeaderText="RIFTS_DYNAMIC_STORE_MODAL_HEADER_TEXT",k.DynamicStoreModalBodyText="RIFTS_DYNAMIC_STORE_MODAL_BODY_TEXT"}(rt||(rt={}));const ot=["currency","gold","item","pet"],ht=[28,29,30];var ct;!function(k){k.TemporaryMemberModal="TemporaryMemberModal"}(ct||(ct={}))},43516:(k,B,U)=>{"use strict";U.d(B,{v:()=>F});var F;U(48417);!function(k){k.OFFER_ACTIVE="Offer active",k.NO_ACTIVE_OFFER="No active offer",k.OFFER_ENDING_SOON="Offer ending soon",k.OFFER_IN_GRACE_PERIOD="Offer in grace period"}(F||(F={}))},86913:(k,B,U)=>{"use strict";var F;U.d(B,{u:()=>F}),function(k){k.Main="main",k.Side="side",k.FeaturedSpawn="featuredSpawn",k.AfterSchool="afterSchool"}(F||(F={}))},24030:(k,B,U)=>{"use strict";U.d(B,{$:()=>$});var F,G=U(98938);!function(k){k.StateChallenge="StateChallengeQuests",k.NationalCup="NationalCupQuests"}(F||(F={}));var j=U(8820);const $=k=>{var B;return null===(B=(k=>{switch(k){case j.a.StateChallenge:return{questId:F.StateChallenge,tag:G.t.StateChallenge};case j.a.NationalCup:return{questId:F.NationalCup,tag:G.t.NationalCup};default:return}})(k))||void 0===B?void 0:B.questId}},8820:(k,B,U)=>{"use strict";var F;U.d(B,{a:()=>F}),function(k){k.StateChallenge="STATE_CHALLENGE",k.NationalCup="NATIONAL_CUP",k.SparkCup="SPARK_CUP",k.None="NONE"}(F||(F={}))},43523:(k,B,U)=>{"use strict";U.d(B,{P:()=>F});const F=(0,U(77601).gb)({key:"status-effects",activateAssociatedExperiments:1,default:!1})},46701:(k,B,U)=>{"use strict";U.d(B,{Q:()=>F});const F=(0,U(77601).gb)({key:"universal-team-selection",activateAssociatedExperiments:1,default:{enabled:!1}})},76253:(k,B,U)=>{"use strict";var F;U.d(B,{B:()=>F}),function(k){k.None="",k.FestivalPortal="Festival-Portal",k.MemberLockedRifts="Member-Locked-Rifts",k.MemberLockedRiftsPlay="Member-Locked-Rifts-Play",k.PostBattleFlow="Post-Battle-Flow",k.WizardBank="Wizard-Bank",k.WizardCostumes="Wizard-Costumes"}(F||(F={}))},4903:(k,B,U)=>{"use strict";var F,G;U.d(B,{W:()=>G,s:()=>F}),function(k){k.MemberLockedRiftsMemberIntro="member-locked-rifts-member-intro",k.MemberLockedRiftsNonMemberHome="member-locked-rifts-nonmember-home",k.MemberLockedRiftsNonMemberSchool="member-locked-rifts-nonmember-school",k.PostBattleFlowHome="post-battle-flow-home",k.PostBattleFlowSchool="post-battle-flow-school",k.ArcadiaLink="arcadia-link",k.WizardBank="wizard-bank",k.WizardCostumesTutorial="wizard-costumes-tutorial"}(F||(F={})),function(k){k.SD="480",k.HD="720",k.FullHD="1080"}(G||(G={}))},80003:(k,B,U)=>{"use strict";U.d(B,{D:()=>F,d:()=>$});var F,G=U(77601),j=U(63011);!function(k){k.NonMember="non_member",k.Core="core",k.Plus="plus",k.Ultra="ultra"}(F||(F={}));const $=(0,G.gb)({key:"wizard-bank",activateAssociatedExperiments:1,default:{enabled:!1,allowances:{}},evaluate:k=>k.enabled?k:Object.assign(Object.assign({},k),{allowances:{[F.Ultra]:{requireAnyMemberFeature:[j.D.ULTRA_BONUS_COINS],reward:{currency:27,value:880},recurrence:"monthly.every.1"}}})})},32389:(k,B,U)=>{"use strict";U.d(B,{q:()=>F});const F=(0,U(77601).gb)({key:"wizard-costumes",default:{enabled:!1}})},50654:(k,B,U)=>{"use strict";var F;U.d(B,{V:()=>F}),function(k){k.Food="food",k.Potion="potion"}(F||(F={}))},95066:(k,B,U)=>{"use strict";var F;U.d(B,{d:()=>F}),function(k){k.Increment="increment",k.Decrement="decrement",k.Timing="timing"}(F||(F={}))},36525:(k,B,U)=>{"use strict";U.d(B,{i:()=>F});class F{constructor(){this.key=null,this.value=null}setKey(k){this.key=k}getKey(){return this.key}setValue(k){this.value=k}getValue(){return this.value}isValid(){return this.validateKey()&&this.validateValue()}serialize(){if(this.isValid())return{key:this.key,value:this.value};throw new Error("Invalid stats data.")}deserialize(k){this.setKey(k.key),this.setValue(k.value)}validateKey(){return"string"==typeof this.key&&this.key.length>0&&(k=>{const B=k.toLowerCase().match(/^([a-z.\-_0-9])+/g);return!!B&&(void 0!==(null==B?void 0:B[0])&&B[0].length===k.length)})(this.key)}validateValue(){return Number.isInteger(this.value)}}},84959:(k,B,U)=>{"use strict";U.d(B,{x:()=>z});var F=U(8674),G=U(79687),j=U(2872),$=U(85933),H=U(96051);class V extends H.B{constructor(){super(...arguments),this.name=null}setName(k){this.name=k}getName(){return this.name}isValid(){return this.name&&this.name.isValid()}}var W=U(55110);class q extends H.B{constructor(){super(...arguments),this.appearance=null}setAppearance(k){this.appearance=k}getAppearance(){return this.appearance}isValid(){return this.appearance&&this.appearance.isValid()}}class K extends $.z{deserialize(k){if(k&&1===k.version){const B=new q;return B.setAppearance(new V),B.getAppearance().setName(new W.S),null!==k.appearance.name&&void 0!==k.appearance.name&&(B.getAppearance().getName().setFirstName(k.appearance.name.first),B.getAppearance().getName().setMiddleName(k.appearance.name.middle),B.getAppearance().getName().setLastName(k.appearance.name.last),B.getAppearance().getName().setNickname(k.appearance.name.nick)),void 0===B.getAppearance().getName().getNickname()&&B.getAppearance().getName().setNickname(null),B.isValid()?B:null}return null}serialize(k){return k.isValid()?{version:1,appearance:{name:{first:k.getAppearance().getName().getFirstName(),middle:k.getAppearance().getName().getMiddleName(),last:k.getAppearance().getName().getLastName(),nick:k.getAppearance().getName().getNickname()}}}:null}}let z=class extends j.k{constructor(){super(),this.factoriesContainer=null,this.factoriesContainer=new G.Container,this.factoriesContainer.bind("v1").to(K)}getPlayer(k){if(this.factoriesContainer.isBound(`v${k.version}`)){return this.factoriesContainer.get(`v${k.version}`).deserialize(k)}return console.log("Unable to deserialize player"),null}getAppearance(k){const B=this.factoriesContainer.get("v1").deserialize({appearance:k,version:1});return B?B.getAppearance():(console.log("Unable to deserialize appearance"),null)}};z=(0,F.Cg)([(0,G.injectable)(),(0,F.Sn)("design:paramtypes",[])],z)},55110:(k,B,U)=>{"use strict";U.d(B,{S:()=>G});var F=U(96051);class G extends F.B{constructor(){super(...arguments),this.firstName=null,this.middleName=null,this.lastName=null,this.nickname=null}setFirstName(k){this.firstName=k}getFirstName(){return this.firstName}setMiddleName(k){this.middleName=k}getMiddleName(){return this.middleName}setLastName(k){this.lastName=k}getLastName(){return this.lastName}setNickname(k){this.nickname=k}getNickname(){return this.nickname}isValid(){const k=null===this.firstName||void 0===this.firstName||this.firstName>0,B=null===this.middleName||void 0===this.middleName||this.middleName>0,U=null===this.lastName||void 0===this.lastName||this.lastName>0,F=null===this.nickname||void 0===this.nickname||this.nickname>0;return k||console.log(`NameData firstName invalid: ${this.firstName}`),B||console.log(`NameData middleName invalid: ${this.middleName}`),U||console.log(`NameData lastName invalid: ${this.lastName}`),F||console.log(`NameData nickname invalid: ${this.nickname}`),k&&B&&U&&F}}},12049:(k,B,U)=>{"use strict";U.d(B,{J:()=>j});var F=U(95891),G=U(96051);class j extends G.B{constructor(){super(...arguments),this.type=null,this.ID=-1,this.cost=[]}getType(){return this.type}setType(k){this.type=k}getID(){return this.ID}setID(k){this.ID=k}getCost(){return this.cost}setCost(k){this.cost=k}isValid(){return null!==this.cost&&this.cost.length>0&&(0,F.every)(this.cost,(k=>k.isValid()))&&null!==this.type&&this.type.length>0&&this.ID>0}}},96051:(k,B,U)=>{"use strict";U.d(B,{B:()=>F});class F{}},85933:(k,B,U)=>{"use strict";U.d(B,{z:()=>$});var F,G=U(8674),j=U(79687);let $=F=class{deserializeCollection(k){return F.deserializeCollection(k,this.deserialize)}serializeCollection(k){return F.serializeCollection(k,this.serialize)}static deserializeCollection(k,B){const U=[];for(let F=0;F{"use strict";U.d(B,{k:()=>j});var F=U(8674),G=U(79687);let j=class{};j=(0,F.Cg)([(0,G.injectable)()],j)},90661:(k,B,U)=>{"use strict";U.d(B,{O:()=>F});class F{static areBitsSet(k,B){return(k&B)===B}static isBitSet(k,B){return F.areBitsSet(k,1<{"use strict";var F;U.d(B,{B:()=>F}),function(k){k.FEATURE_HOUSE_MOVING="FEATURE_HOUSE_MOVING",k.FEATURE_HOUSE_VISITING="FEATURE_HOUSE_VISITING",k.FEATURE_STYLIST="FEATURE_STYLIST",k.FEATURE_CLOUD_MOUNT="FEATURE_CLOUD_MOUNT",k.FEATURE_SOCIAL_FEED="FEATURE_SOCIAL_FEED",k.FEATURE_BADGES="FEATURE_BADGES",k.FEATURE_BATTLE_TUTORIAL="FEATURE_BATTLE_TUTORIAL",k.FEATURE_ACADEMY="FEATURE_ACADEMY",k.FEATURE_ACADEMY_TOWERS="FEATURE_ACADEMY_TOWERS",k.FEATURE_TOWERS_PROMPT="FEATURE_TOWERS_PROMPT",k.FEATURE_SUMMERFEST_CUTSCENES="FEATURE_SUMMERFEST_CUTSCENES",k.FEATURE_SPRINGFEST_CUTSCENES="FEATURE_SPRINGFEST_CUTSCENES",k.FEATURE_STARLIGHT_CUTSCENES="FEATURE_STARLIGHT_CUTSCENES",k.FEATURE_PUMPKINFEST_CUTSCENES="FEATURE_PUMPKINFEST_CUTSCENES",k.FEATURE_WINTERFEST_CUTSCENES="FEATURE_WINTERFEST_CUTSCENES",k.FEATURE_TOWERTOWN="FEATURE_TOWERTOWN",k.BREADCRUMB_CLICKED_WORLD_MAP_BUTTON="BREADCRUMB_CLICKED_WORLD_MAP_BUTTON",k.BREADCRUMB_CLICKED_WORLD_MAP_HOUSE="BREADCRUMB_CLICKED_WORLD_MAP_HOUSE",k.BREADCRUMB_CLICKED_HOUSE_LOCK_BUTTON="BREADCRUMB_CLICKED_HOUSE_LOCK_BUTTON",k.BREADCRUMB_CLICKED_HOUSE_MOVE_BUTTON="BREADCRUMB_CLICKED_HOUSE_MOVE_BUTTON",k.BREADCRUMB_CLICKED_CARD_VISIT_BUTTON="BREADCRUMB_CLICKED_CARD_VISIT_BUTTON",k.BREADCRUMB_CLICKED_CARD_STYLIST_BUTTON="BREADCRUMB_CLICKED_CARD_STYLIST_BUTTON",k.BREADCRUMB_CLICKED_DAB="BREADCRUMB_CLICKED_DAB",k.BREADCRUMB_CLICKED_DAB_EMOTE_BUTTON="BREADCRUMB_CLICKED_DAB_EMOTE_BUTTON",k.BREADCRUMB_CLICKED_DAB_DANCE_BUTTON="BREADCRUMB_CLICKED_DAB_DANCE_BUTTON",k.BREADCRUMB_CLICKED_DAB_DAB_BUTTON="BREADCRUMB_CLICKED_DAB_DAB_BUTTON",k.FEATURE_TUTORIAL="FEATURE_TUTORIAL",k.BREADCRUMB_TUTORIAL_COMPLETE="BREADCRUMB_TUTORIAL_COMPLETE",k.BREADCRUMB_TITAN_INTRO="BREADCRUMB_TITAN_INTRO",k.BREADCRUMB_TITAN_WATCHED_INTRO="BREADCRUMB_TITAN_WATCHED_INTRO",k.BREADCRUMB_TITAN_HARVEY_TALKED="BREADCRUMB_TITAN_HARVEY_TALKED",k.FEATURE_TITAN_UNLOCKED="BREADCRUMB_TITAN_UNLOCKED_HUD_BUTTON",k.BREADCRUMB_TITAN_UNLOCKED_HUD_BUTTON="BREADCRUMB_TITAN_UNLOCKED_HUD_BUTTON",k.BREADCRUMB_TITAN_UNLOCKED_DIALOGUE="BREADCRUMB_TITAN_UNLOCKED_DIALOGUE",k.BREADCRUMB_TITAN_UNLOCKED_BUTTONS="BREADCRUMB_TITAN_UNLOCKED_BUTTONS",k.BREADCRUMB_CLOUD_MOUNT_TOGGLED="BREADCRUMB_CLOUD_MOUNT_TOGGLED",k.BREADCRUMB_SOCIAL_FEED_OPENED="BREADCRUMB_SOCIAL_FEED_OPENED",k.BREADCRUMB_CLICKED_SOCIAL_BUTTON="BREADCRUMB_CLICKED_SOCIAL_BUTTON",k.BREADCRUMB_CLICKED_BADGES_BUTTON="BREADCRUMB_CLICKED_BADGES_BUTTON",k.BREADCRUMB_UNLOCK_ACADEMY="BREADCRUMB_UNLOCK_ACADEMY",k.BREADCRUMB_UNLOCK_ACADEMY_NOOT_DIALOGUE="BREADCRUMB_UNLOCK_ACADEMY_NOOT_DIALOGUE",k.BREADCRUMB_FIRST_BATTLE_STARTED="BREADCRUMB_FIRST_BATTLE_STARTED",k.BREADCRUMB_FIRST_BATTLE_FINISHED="BREADCRUMB_FIRST_BATTLE_FINISHED",k.BREADCRUMB_FIRST_NEAR_DEFEAT="BREADCRUMB_FIRST_NEAR_DEFEAT",k.BREADCRUMB_FIRST_ENEMY_HURT="BREADCRUMB_FIRST_ENEMY_HURT",k.BREADCRUMB_FIRST_NFACTOR_BONUS="BREADCRUMB_FIRST_NFACTOR_BONUS",k.BREADCRUMB_FIRST_ENERGY_GAINED="BREADCRUMB_FIRST_ENERGY_GAINED",k.BREADCRUMB_FIRST_AOE_READY="BREADCRUMB_FIRST_AOE_READY",k.BREADCRUMB_FIRST_AOA_CHARGED="BREADCRUMB_FIRST_AOA_CHARGED",k.BREADCRUMB_FIRST_AOA_USED="BREADCRUMB_FIRST_AOA_USED",k.BREADCRUMB_AUTO_ATTACK_TUTORIAL="BREADCRUMB_AUTO_ATTACK_TUTORIAL",k.BREADCRUMB_FIRST_PET_RESCUABLE="BREADCRUMB_FIRST_PET_RESCUABLE",k.BREADCRUMB_FIRST_PET_RESCUED="BREADCRUMB_FIRST_PET_RESCUED",k.BREADCRUMB_FREE_RESCUE="BREADCRUMB_FREE_RESCUE",k.BREADCRUMB_EARTH_TOWER="BREADCRUMB_EARTH_TOWER",k.BREADCRUMB_FIRE_TOWER="BREADCRUMB_FIRE_TOWER",k.BREADCRUMB_ICE_TOWER="BREADCRUMB_ICE_TOWER",k.BREADCRUMB_WATER_TOWER="BREADCRUMB_WATER_TOWER",k.BREADCRUMB_STORM_TOWER="BREADCRUMB_STORM_TOWER",k.BREADCRUMB_ACADEMY_SECOND_FLOOR="BREADCRUMB_ACADEMY_SECOND_FLOOR",k.BREADCRUMB_ACADEMY_UNPLACED_KEYSTONES="BREADCRUMB_ACADEMY_UNPLACED_KEYSTONES",k.BREADCRUMB_ACADEMY_NO_KEYSTONES="BREADCRUMB_ACADEMY_NO_KEYSTONES",k.BREADCRUMB_ACADEMY_VISITED="BREADCRUMB_ACADEMY_VISITED",k.BREADCRUMB_COMPLETED_ELEVATOR="BREADCRUMB_COMPLETED_ELEVATOR",k.BREADCRUMB_ACADEMY_VISITED_AFTER_RECIEVING_KEYSTONE="BREADCRUMB_ACADEMY_VISITED_AFTER_RECIEVING_KEYSTONE",k.BREADCRUMB_ACADEMY_PEDESTAL_ROOM_VISITED_AFTER_RECIEVING_KEYSTONE="BREADCRUMB_ACADEMY_PEDESTAL_ROOM_VISITED_AFTER_RECIEVING_KEYSTONE",k.BREADCRUMB_ACADEMY_TOWER_LOBBY_VISITED_AFTER_PLACING_KEYSTONE="BREADCRUMB_ACADEMY_TOWER_LOBBY_VISITED_AFTER_PLACING_KEYSTONE",k.FIRST_TIME_PROMPT="FIRST_TIME_PROMPT",k.NOOT_TOWER_PROMPT="NOOT_TOWER_PROMPT",k.FEATURE_COOP_BATTLE="FEATURE_COOP_BATTLE",k.BREADCRUMB_COOP_BATTLE_START="BREADCRUMB_COOP_BATTLE_START",k.BREADCRUMB_COOP_PARTY_SELECT="BREADCRUMB_COOP_PARTY_SELECT",k.BREADCRUMB_COOP_CRYSTAL_INTRO="BREADCRUMB_COOP_CRYSTAL_INTRO",k.BREADCRUMB_SUMMERFEST_INTRO="BREADCRUMB_SUMMERFEST_INTRO",k.BREADCRUMB_FIRST_SUMMERFEST_WHEEL_CLICK="BREADCRUMB_FIRST_SUMMERFEST_WHEEL_CLICK",k.BREADCRUMB_FIRST_SUMMERFEST_STYLIST_CLICK="BREADCRUMB_FIRST_SUMMERFEST_STYLIST_CLICK",k.BREADCRUMB_FIRST_SUMMERFEST_NICKNAMER_CLICK="BREADCRUMB_FIRST_SUMMERFEST_NICKNAMER_CLICK",k.BREADCRUMB_STARLIGHT_INTRO="BREADCRUMB_STARLIGHT_INTRO",k.BREADCRUMB_PUMPKINFEST_INTRO="BREADCRUMB_PUMPKINFEST_INTRO",k.BREADCRUMB_WINTERFEST_INTRO="BREADCRUMB_WINTERFEST_INTRO",k.BREADCRUMB_SPRINGFEST_INTRO="BREADCRUMB_SPRINGFEST_INTRO",k.BREADCRUMB_FIRST_SPRINGFEST_DON_ZORRO_CLICK="BREADCRUMB_FIRST_SPRINGFEST_DON_ZORRO_CLICK",k.BREADCRUMB_FIRST_SPRINGFEST_HARRIET_HOOD_CLICK="BREADCRUMB_FIRST_SPRINGFEST_HARRIET_HOOD_CLICK",k.FEATURE_DUNGEONS="BREADCRUMB_FEATURE_DUNGEONS",k.BREADCRUMB_STARTED_CRYSTAL_CAVERNS="BREADCRUMB_STARTED_CRYSTAL_CAVERNS",k.FEATURE_ULTIMATES="FEATURE_ULTIMATES",k.BREADCRUMB_ULTIMATES_FTUE="BREADCRUMB_ULTIMATES_FTUE",k.BREADCRUMB_ULTIMATES_SUBSPACE_NOTIFICATION="BREADCRUMB_ULTIMATES_SUBSPACE_NOTIFICATION",k.FEATURE_ANTI_CHURN_2="BREADCRUMB_FEATURE_ANTI_CHURN_2",k.BREADCRUMB_NEW_MEMBER="BREADCRUMB_NEW_MEMBER",k.BREADCRUMB_SEEN_NEW_MEMBER_AD="BREADCRUMB_SEEN_NEW_MEMBER_AD",k.FEATURE_QUEST_GOALS="FEATURE_QUEST_GOALS",k.BREADCRUMB_NEXT_GOAL_INTRO="BREADCRUMB_NEXT_GOAL_INTRO",k.FEATURE_WEEKLY_CHALLENGE="FEATURE_WEEKLY_CHALLENGE",k.BREADCRUMB_FIRST_CHALLENGE_COMPLETE="BREADCRUMB_FIRST_CHALLENGE_COMPLETE",k.FEATURE_PET_EVOLUTION="FEATURE_PET_EVOLUTION",k.BREADCRUMB_NONMEMBER_FIRST_PET_EVOLUTION="BREADCRUMB_NONMEMBER_FIRST_PET_EVOLUTION",k.FEATURE_PET_UPGRADE_FTUE="FEATURE_PET_UPGRADE_FTUE",k.BREADCRUMB_LEVELLED_UP_PET_FIRST_TIME="BREADCRUMB_LEVELLED_UP_PET_FIRST_TIME",k.BREADCRUMB_SEEN_YOUR_TEAM_MENU="BREADCRUMB_SEEN_YOUR_TEAM_MENU",k.FEATURE_PET_GEAR="FEATURE_PET_GEAR",k.BREADCRUMB_EQUIP_PET_GEAR_FTUE="BREADCRUMB_EQUIP_PET_GEAR_FTUE",k.BREADCRUMB_RECEIVE_PET_GEAR_AD_GIFT="BREADCRUMB_RECEIVE_PET_GEAR_AD_GIFT",k.BREADCRUMB_PET_GEAR_FTUE_STEP_START="BREADCRUMB_PET_GEAR_FTUE_STEP_START",k.FEATURE_PETS_IN_ZONES="FEATURE_PETS_IN_ZONES",k.BREADCRUMB_PETS_IN_ZONES_BUTTON_FTUE="BREADCRUMB_PETS_IN_ZONES_BUTTON_FTUE",k.FEATURE_ZONE_ENTRY_ILLUSTRATION="FEATURE_ZONE_ENTRY_ILLUSTRATION",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_LAMPLIGHT="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_LAMPLIGHT",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FOREST="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FOREST",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILL="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILL",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCH="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCH",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIRE="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIRE",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECK="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECK",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FORESTHARD="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FORESTHARD",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILLHARD="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILLHARD",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCHHARD="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCHHARD",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIREHARD="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIREHARD",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECKHARD="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECKHARD",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FORESTEXPERT="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FORESTEXPERT",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILLEXPERT="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILLEXPERT",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCHEXPERT="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCHEXPERT",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIREEXPERT="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIREEXPERT",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECKEXPERT="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECKEXPERT",k.FEATURE_ZONE_LOCK_CUTSCENE="FEATURE_ZONE_LOCK_CUTSCENE",k.BREADCRUMB_PUPPETMASTER_WORLD_MAP_SEQUENCE="BREADCRUMB_PUPPETMASTER_WORLD_MAP_CUTSCENE",k.FEATURE_FIREFLY_QUEST_REVISIONS="FEATURE_FIREFLY_QUEST_REVISIONS",k.BREADCRUMB_SHIVERCHILL_UNLOCKED="BREADCRUMB_SHIVERCHILL_UNLOCKED",k.FEATURE_ZONE_UNLOCKED_POPUP="FEATURE_ZONE_UNLOCKED_POPUP",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL="BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE="BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK="BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH="BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIVERCHILL="BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIVERCHILL",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_BONFIRE="BREADCRUMB_ZONE_UNLOCKED_ANIM_BONFIRE",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIPWRECK="BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIPWRECK",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_SKYWATCH="BREADCRUMB_ZONE_UNLOCKED_ANIM_SKYWATCH",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_ACADEMY="BREADCRUMB_ZONE_UNLOCKED_ANIM_ACADEMY",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER="BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DYNO="BREADCRUMB_ZONE_UNLOCKED_ANIM_DYNO",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_HOUSE="BREADCRUMB_ZONE_UNLOCKED_ANIM_HOUSE",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_TOWERTOWN="BREADCRUMB_ZONE_UNLOCKED_ANIM_TOWERTOWN",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_LAMPLIGHT="BREADCRUMB_ZONE_UNLOCKED_ANIM_LAMPLIGHT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM="BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE="BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE",k.FEATURE_ZONE_UNLOCKED_POPUP_HARD="FEATURE_ZONE_UNLOCKED_POPUP_HARD",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL_HARD="BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL_HARD",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE_HARD="BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE_HARD",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK_HARD="BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK_HARD",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH_HARD="BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIVERCHILL_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIVERCHILL_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_BONFIRE_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_BONFIRE_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIPWRECK_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIPWRECK_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_SKYWATCH_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_SKYWATCH_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_ACADEMY_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_ACADEMY_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DYNO_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_DYNO_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_HOUSE_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_HOUSE_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_TOWERTOWN_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_TOWERTOWN_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_LAMPLIGHT_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_LAMPLIGHT_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE_HARD",k.FEATURE_ZONE_UNLOCKED_POPUP_EXPERT="FEATURE_ZONE_UNLOCKED_POPUP_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL_EXPERT="BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE_EXPERT="BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK_EXPERT="BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH_EXPERT="BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIVERCHILL_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIVERCHILL_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_BONFIRE_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_BONFIRE_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIPWRECK_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIPWRECK_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_SKYWATCH_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_SKYWATCH_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_ACADEMY_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_ACADEMY_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DYNO_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_DYNO_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_HOUSE_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_HOUSE_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_TOWERTOWN_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_TOWERTOWN_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_LAMPLIGHT_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_LAMPLIGHT_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE_EXPERT",k.FEATURE_ENDGAME_QUEST="FEATURE_ENDGAME_QUEST",k.BREADCRUMB_ENDGAME_QUEST_SAW_WORLD_MAP_DIALOGUE="BREADCRUMB_ENDGAME_QUEST_SAW_WORLD_MAP_DIALOGUE",k.BREADCRUMB_ENDGAME_QUEST_SAW_KEYSTONE_DIALOGUE="BREADCRUMB_ENDGAME_QUEST_SAW_KEYSTONE_DIALOGUE",k.BREADCRUMB_ENDGAME_QUEST_SAW_NOOT_ACADEMY_DIALOGUE="BREADCRUMB_ENDGAME_QUEST_SAW_NOOT_ACADEMY_DIALOGUE",k.BREADCRUMB_ENDGAME_QUEST_FIRST_ACADEMY_VISIT_WITH_ALL_GEMS="BREADCRUMB_ENDGAME_QUEST_FIRST_ACADEMY_VISIT_WITH_ALL_GEMS",k.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PIPPET="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PIPPET",k.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_FIREFLY="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_FIREFLY",k.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIVERCHILL="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIVERCHILL",k.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_BONFIRE="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_BONFIRE",k.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIPWRECK="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIPWRECK",k.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SKYWATCH="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SKYWATCH",k.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PUPPET_MASTER="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PUPPET_MASTER",k.BREADCRUMB_ENDGAME_QUEST_FIRST_CLICK_POST_PUPPET_MASTER_PEDESTAL="BREADCRUMB_ENDGAME_QUEST_FIRST_CLICK_POST_PUPPET_MASTER_PEDESTAL",k.BREADCRUMB_ENDGAME_QUEST_WALK_SEQUENCE_SEEN="BREADCRUMB_ENDGAME_QUEST_WALK_SEQUENCE_SEEN",k.FEATURE_LEADERBOARD="FEATURE_LEADERBOARD",k.BREADCRUMB_LEADERBOARD_INTRO_VIEWED="BREADCRUMB_LEADERBOARD_INTRO_VIEWED",k.BREADCRUMB_LEADERBOARD_NOTIFICATION_VIEWED="BREADCRUMB_LEADERBOARD_NOTIFICATION_VIEWED",k.BREADCRUMB_STUDENT_LEADERBOARD_PRIZE_CLAIMED="BREADCRUMB_STUDENT_LEADERBOARD_PRIZE_CLAIMED",k.FEATURE_BATTLE_PASS="FEATURE_BATTLE_PASS",k.BREADCRUMB_BATTLE_PASS_COMPLEX_FTUE_VIEWED="BREADCRUMB_BATTLE_PASS_COMPLEX_FTUE_VIEWED",k.BREADCRUMB_STUDENT_LEADERBOARD_NOTIFICATION_VIEWED="BREADCRUMB_STUDENT_LEADERBOARD_NOTIFICATION_VIEWED",k.FEATURE_CHARGED_LEVELS="FEATURE_CHARGED_LEVELS",k.BREADCRUMB_TUTORIAL_REMINDER_MAIL_SENT="BREADCRUMB_TUTORIAL_REMINDER_MAIL_SENT",k.BREADCRUMB_DECAY_IMMUNITY_MODAL_SEEN="BREADCRUMB_DECAY_IMMUNITY_MODAL_SEEN",k.BREADCRUMB_CHARGED_LEVELS_CLEARED="BREADCRUMB_CHARGED_LEVELS_CLEARED",k.FEATURE_PROGRESSION_EVENTS="FEATURE_PROGRESSION_EVENTS",k.FIRST_POST_TUTORIAL_BATTLE_STARTED="FIRST_POST_TUTORIAL_BATTLE_STARTED",k.FIRST_POST_TUTORIAL_BATTLE_WON="FIRST_POST_TUTORIAL_BATTLE_WON",k.BREADCRUMB_REACHED_LEVEL_2="BREADCRUMB_REACHED_LEVEL_2",k.BREADCRUMB_REACHED_LEVEL_3="BREADCRUMB_REACHED_LEVEL_3",k.BREADCRUMB_REACHED_LEVEL_4="BREADCRUMB_REACHED_LEVEL_4",k.BREADCRUMB_REACHED_LEVEL_5="BREADCRUMB_REACHED_LEVEL_5",k.FEATURE_RIFTS="FEATURE_RIFTS",k.BREADCRUMB_RIFTS_AFTER_FIRST_CUTSCENE_SEEN="BREADCRUMB_RIFTS_AFTER_FIRST_CUTSCENE_SEEN",k.BREADCRUMB_RIFTS_FIRST_VISIT_PRE_PM_DEFEAT_CUTSCENE_SEEN="BREADCRUMB_RIFTS_FIRST_VISIT_PRE_PM_DEFEAT_CUTSCENE_SEEN",k.BREADCRUMB_RIFTS_FIRST_VISIT_POST_PM_DEFEAT_CUTSCENE_SEEN="BREADCRUMB_RIFTS_FIRST_VISIT_POST_PM_DEFEAT_CUTSCENE_SEEN",k.BREADCRUMB_FIRST_RIFT_KEY_OBTAINED="BREADCRUMB_FIRST_RIFT_KEY_OBTAINED",k.BREADCRUMB_RIFTS_GOT_FIRST_DRAGON_ORB="BREADCRUMB_RIFTS_GOT_FIRST_DRAGON_ORB",k.BREADCRUMB_RIFTS_FIRST_DRAGON_ORB_CUTSCENE_SEEN="BREADCRUMB_RIFTS_FIRST_DRAGON_ORB_CUTSCENE_SEEN",k.BREADCRUMB_RIFTS_FIRST_PHYSICAL_BATTLE_CUTSCENE_SEEN="BREADCRUMB_RIFTS_FIRST_PHYSICAL_BATTLE_CUTSCENE_SEEN",k.BREADCRUMB_RIFTS_STARTED_FIRST_BOSS_RIFT="BREADCRUMB_RIFTS_STARTED_FIRST_DRAGON_RIFT",k.BREADCRUMB_RIFTS_DEFEATED_FIRST_BOSS="BREADCRUMB_RIFTS_DEFEATED_FIRST_DRAGON",k.BREADCRUMB_RIFTS_OPENED_RIFT_SELECTION_MENU_FIRST_TIME="BREADCRUMB_RIFTS_OPENED_RIFT_SELECTION_MENU_FIRST_TIME",k.BREADCRUMB_RIFTS_STARTED_FIRST_RIFT_RUN="BREADCRUMB_RIFTS_STARTED_FIRST_RIFT_RUN",k.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_ROUND="BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_ROUND",k.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN_OR_LOSE="BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN_OR_LOSE",k.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN="BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN",k.BREADCRUMB_RIFTS_COMPLETED_FIRST_MAX_TIER_RIFT_RUN="BREADCRUMB_RIFTS_COMPLETED_FIRST_MAX_TIER_RIFT_RUN",k.FEATURE_SEGMENTED_OFFERS="FEATURE_SEGMENTED_OFFERS",k.BREADCRUMB_SEGMENTED_OFFERS_OFFER_AVAILABLE="BREADCRUMB_SEGMENTED_OFFERS_OFFER_AVAILABLE",k.BREADCRUMB_SEGMENTED_OFFERS_FIRST_OFFER_SEEN="BREADCRUMB_SEGMENTED_OFFERS_FIRST_OFFER_SEEN",k.BREADCRUMB_SEGMENTED_OFFERS_FIRST_BATTLE_LOST="BREADCRUMB_SEGMENTED_OFFERS_FIRST_BATTLE_LOST",k.BREADCRUMB_SEGMENTED_OFFERS_SUPPRESS_LAST_CHANCE="BREADCRUMB_SEGMENTED_OFFERS_SUPPRESS_LAST_CHANCE",k.FEATURE_PET_MERGE="FEATURE_PET_MERGE",k.BREADCRUMB_PET_MERGE_FTUE_STARTED="BREADCRUMB_PET_MERGE_FTUE_STARTED",k.BREADCRUMB_PET_MERGE_FTUE_INGREDIENTS_GIVEN="BREADCRUMB_PET_MERGE_FTUE_INGREDIENTS_GIVEN",k.BREADCRUMB_PET_MERGE_FTUE_COMPLETED="BREADCRUMB_PET_MERGE_FTUE_COMPLETED",k.FEATURE_CAMPAIGN_REPLAY="FEATURE_CAMPAIGN_REPLAY",k.BREADCRUMB_HARD_MODE_UNLOCKED_POPUP_SEEN="BREADCRUMB_HARD_MODE_UNLOCKED_POPUP_SEEN",k.BREADCRUMB_EXPERT_MODE_UNLOCKED_POPUP_SEEN="BREADCRUMB_EXPERT_MODE_UNLOCKED_POPUP_SEEN",k.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_HARD_MODE="BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_HARD_MODE",k.BREADCRUMB_CAMPAIGN_REPLAY_CATCHUP_SEEN="BREADCRUMB_CAMPAIGN_REPLAY_CATCHUP_SEEN",k.BREADCRUMB_CAMPAIGN_REPLAY_HARD_INTRO_SEEN="BREADCRUMB_CAMPAIGN_REPLAY_HARD_INTRO_SEEN",k.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FTUE_COMPLETED="BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FTUE_COMPLETED",k.BREADCRUMB_CAMPAIGN_REPLAY_HARD_SHIVERCHILL_UNLOCKED="BREADCRUMB_CAMPAIGN_REPLAY_HARD_SHIVERCHILL_UNLOCKED",k.BREADCRUMB_CAMPAIGN_REPLAY_EXPERT_SHIVERCHILL_UNLOCKED="BREADCRUMB_CAMPAIGN_REPLAY_EXPERT_SHIVERCHILL_UNLOCKED",k.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_EXPERT_MODE="BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_EXPERT_MODE",k.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE="BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE",k.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE_STARTED="BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE_STARTED",k.FEATURE_UNIQUE_PETS="FEATURE_UNIQUE_PETS",k.BREADCRUMB_UNIQUE_PETS_INTRO_SEQUENCE="BREADCRUMB_UNIQUE_PETS_INTRO_SEQUENCE",k.FEATURE_RESTRICTIONS="FEATURE_RESTRICTIONS",k.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_MET_FTUE="BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_MET",k.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_PRE_FTUE="BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_PRE",k.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_POST_FTUE="BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_POST",k.BREADCRUMB_WHITE_GLOVE_RESCUE_FTUE="BREADCRUMB_WHITE_GLOVE_RESCUE_FTUE",k.BREADCRUMB_WHITE_GLOVE_MERGE_FTUE="BREADCRUMB_WHITE_GLOVE_MERGE_FTUE",k.BREADCRUMB_WHITE_GLOVE_ELEMENT_FTUE="BREADCRUMB_WHITE_GLOVE_ELEMENT_FTUE",k.BREADCRUMB_WHITE_GLOVE_RARITY_FTUE="BREADCRUMB_WHITE_GLOVE_RARITY_FTUE",k.BREADCRUMB_WHITE_GLOVE_LEVEL_FTUE="BREADCRUMB_WHITE_GLOVE_PET_LEVEL_FTUE",k.FEATURE_AFTER_SCHOOL_WIDGET="FEATURE_AFTER_SCHOOL_WIDGET",k.BREADCRUMB_AFTER_SCHOOL_WIDGET_FTUE_COMPLETED="BREADCRUMB_AFTER_SCHOOL_WIDGET_FTUE_COMPLETED",k.FEATURE_STATUS_EFFECTS="FEATURE_STATUS_EFFECTS",k.BREADCRUMB_STATUS_EFFECTS_FTUE_COMPLETED="BREADCRUMB_STATUS_EFFECTS_FTUE_COMPLETED",k.BREADCRUMB_STATUS_EFFECT_CAST_IN_BATTLE="BREADCRUMB_STATUS_EFFECT_CAST_IN_BATTLE"}(F||(F={}))},7408:(k,B,U)=>{"use strict";U.d(B,{C:()=>$});var F=U(15821);class G{constructor(k){this.name="",this.breadcrumbs={},this.name=k}addBreadcrumb(k,B,U){return B>=0&&B<32?this.breadcrumbs[k]={index:B,completes:U}:console.log(`addBreadcrumb - Breadcrumb was not added. index must be between [0, 32], provided index was ${B}`),this}getBreadcrumbMask(k){return F.A.isDefined(this.breadcrumbs[k])?1<{"use strict";U.d(B,{V:()=>j});const F=JSON.parse('{"currency-27":{"currency-1":{"from":[1,20,40,190,340,860,1600,5600],"to":[1,45,100,525,1060,2850,5670,20000],"roundToNearest":1},"currency-13":{"from":[1,2,18,162,1445,12790],"to":[10,100,1000,10000,100000,1000000],"roundToNearest":1},"currency-15":{"from":[1,2,18,162,1445,12790],"to":[10,100,1000,10000,100000,1000000],"roundToNearest":1},"currency-12":{"from":[1,2,18,162,1445,12790],"to":[10,100,1000,10000,100000,1000000],"roundToNearest":1},"currency-14":{"from":[1,2,18,162,1445,12790],"to":[10,100,1000,10000,100000,1000000],"roundToNearest":1},"currency-16":{"from":[1,2,18,162,1445,12790],"to":[10,100,1000,10000,100000,1000000],"roundToNearest":1},"currency-11":{"from":[1,25,100,200,500,1000,10000],"to":[1,5,18,146,1170,5266,13458],"roundToNearest":1},"currency-3":{"from":[1,25,100,200,500,1000,10000],"to":[1,5,18,146,1170,5266,13458],"roundToNearest":1},"currency-19":{"from":[1,25,100,200,500,1000,10000],"to":[1,5,18,146,1170,5266,13458],"roundToNearest":1}}}');var G=U.t(F,2);class j{static setOverrideRates(k){Object.keys(k).forEach((B=>{j.EXCHANGE_DATA[B]=Object.assign(Object.assign({},j.EXCHANGE_DATA[B]),k[B])}))}static from(k){return{to:j.getExchangeRate.bind(j,k)}}static applyExchangeRate(k,B){var U,F;if(k<=0)return 0;if(j.isLinearExchangeRate(B))return j.roundToNearest(k*B,1);if(0===B.from.length||0===B.to.length||B.from.length!==B.to.length)return k;if(1===B.to.length)return j.roundToNearest(k*(B.to[0]/B.from[0]),null!==(U=B.roundToNearest)&&void 0!==U?U:1);const G=B.from.findIndex((B=>B>k)),$=-1===G?B.from.length-2:0===G?0:G-1,H=B.from[$],V=B.from[$+1],W=B.to[$],q=B.to[$+1],K=k-H;return j.roundToNearest(W+K*(q-W)/(V-H),null!==(F=B.roundToNearest)&&void 0!==F?F:1)}static roundToNearest(k,B){return Math.ceil(k/B)*B}static getExchangeRate(k,B){var U,F,G,$;const H=`currency-${k}`,V=`currency-${B}`;if(null===(U=j.EXCHANGE_DATA[H])||void 0===U?void 0:U[V])return null===(F=j.EXCHANGE_DATA[H])||void 0===F?void 0:F[V];if(null===(G=j.EXCHANGE_DATA[V])||void 0===G?void 0:G[H]){const k=null===($=j.EXCHANGE_DATA[V])||void 0===$?void 0:$[H];return j.isLinearExchangeRate(k)?1/k:{from:k.to,to:k.from}}return 1}static isLinearExchangeRate(k){return"number"==typeof k}}j.EXCHANGE_DATA=Object.assign({},G)},77601:(k,B,U)=>{"use strict";U.d(B,{gb:()=>$,mq:()=>V,y8:()=>H});var F=U(8674);const G=Symbol(),j={};function $({key:k,activateAssociatedExperiments:B=0,evaluate:U,default:$}){const H="object"==typeof B?B.when:B,V="object"==typeof B?B.canActivate:()=>(0,F.sH)(this,void 0,void 0,(function*(){return!0})),W=(k,B)=>{V(k,B).then((k=>{k&&B.ensureExperimentActivated()}))},q=()=>{};let K=q,z=q;switch(H){case 0:K=W;break;case 1:z=W}return j[k]={key:k,onSetup:K,onPostEvaluate:z,evaluate:null!=U?U:k=>k,default:$},{[G]:void 0,key:k,toString:()=>`Feature(${k})`}}function H(){return Object.keys(j)}class V{constructor(k){this._featureContexts={},this._activatedExperiments={};const B=Object.create(k.contextBase);B.evaluate=k=>this.evaluate(k),this._sharedContext=B,this._innerGetFeature=k.get,this._activateExperimentForFeature=B=>{var U;if(!k.activate)return;const F=this._innerGetFeature(B);if(!(null===(U=F.experimentResult)||void 0===U?void 0:U.inExperiment)||!F.experiment)return;const G=F.experiment.key;this._activatedExperiments[G]||(k.activate(F),this._activatedExperiments[G]=!0)}}setup(){for(const k of Object.keys(j)){const B=this.getOrCreateFeatureContext(k);B[G].onSetup(this.evaluateSilent(B),B)}}evaluate(k){const B=this.getOrCreateFeatureContext(k);if(!B)return this._innerGetFeature(W(k)).value;const U=this.evaluateSilent(B);return B[G].onPostEvaluate(U,B),U}evaluateSilent(k){var B;const U=k[G],F=null!==(B=this._innerGetFeature(U.key).value)&&void 0!==B?B:U.default;return U.evaluate(F,k)}getOrCreateFeatureContext(k){const B=j[W(k)];if(!B)return;if(B.key in this._featureContexts)return this._featureContexts[B.key];const U=Object.create(this._sharedContext);return U[G]=B,U.ensureExperimentActivated=()=>this._activateExperimentForFeature(B.key),this._featureContexts[B.key]=U,U}static irreversibleClearGlobalState(){for(const k of Object.keys(j))delete j[k]}}function W(k){return"string"==typeof k?k:k.key}},1717:(k,B,U)=>{"use strict";var F,G;U.d(B,{$:()=>G,u:()=>F}),function(k){k.RequireAny="RequireAny",k.RequireAll="RequireAll",k.RequireNone="RequireNone"}(F||(F={})),function(k){k.Rescue="rescue",k.EvolutionTier="evolution",k.Element="element",k.Level="level",k.MergeRank="mergeRank",k.Rarity="rarity"}(G||(G={}))},8394:(k,B,U)=>{"use strict";U.d(B,{p:()=>H,u:()=>V});var F=U(10471),G=U(50508);const j=[].concat(["pet"]).concat(["riftRunKey"]).concat(["costume"]).concat(G.p),$={currency:F.B};function H(k,B){var U;return j.includes(k)||(null===(U=$[k])||void 0===U?void 0:U.includes(B))}function V(k,B){return 1===arguments.length?B=>V(k,B):!!B&&B.type===k}},12596:(k,B,U)=>{"use strict";U.d(B,{R:()=>F});class F{static parseDateToTimestamp(k){if(null==k)return;if("number"==typeof k)return k;if(""===k)return;const B=new Date(k).getTime();return isNaN(B)?void 0:B}}},48417:(k,B,U)=>{"use strict";U.d(B,{D:()=>F});const F={AfterSchoolWidget:{GetRewardsStatus:"afterSchoolWidget.getRewardStatus",ClaimReward:"afterSchoolWidget.claimReward",ResetState:"afterSchoolWidget.resetState"},Battle:{Start:"battle.start",Action:"battle.action",Resume:"battle.resume",Escape:"battle.escape",Debug:{KillGore:"battle.debug.killGore",PreventDefeat:"battle.debug.preventDefeat",ForceBattleResult:"battle.debug.forceBattleResult",OverrideHomeTeamAffixes:"battle.debug.overrideHomeTeamAffixes",OverrideAwayTeamAffixes:"battle.debug.overrideAwayTeamAffixes",AddStatusEffectToUnits:"battle.debug.addStatusEffectToUnits",RemoveStatusEffectsFromUnit:"battle.debug.removeStatusEffectsFromUnit",OverrideUnitDodgeChance:"battle.debug.overrideUnitDodgeChance",SetUnitHealth:"battle.debug.setUnitHealth",SimulateBattle:"battle.debug.simulateBattle.start",SimulateStatusEffectCalculations:"battle.debug.simulateStatusEffectCalculations"},Duel:{CancelInvite:"battle.duel.cancelInvite",CreateChannel:"battle.duel.createChannel",Join:"battle.duel.join",RejectInvite:"battle.duel.rejectInvite",SendInvite:"battle.duel.sendInvite",WaitPing:"battle.duel.waitPing",OpponentDisconnect:"battle.duel.opponentDisconnect"},ClearBattleState:"battle.clearBattleState"},BattlePass:{GetPastUnclaimedRewards:"battlePass.getPastUnclaimedRewards",ClaimPastRewards:"battlePass.claimPastRewards",CompleteExpiredClaimTasks:"battlePass.completeExpiredClaimTasks",GetBattlePassXpData:"battlePass.getBattlePassXpData",Debug:"battlePass.debug",UpdateActiveQuests:"battlePass.updateActiveQuests"},BattleStats:{RecordEnd:"battleStats.recordEnd",GetBattleStats:"battleStats.getBattleStats",Debug:{OverrideMatchmakingBattleStreak:"battleStats.debug.overrideMatchmakingBattleStreak"}},CampaignReplay:{SetFeatureProgress:"campaignReplay.setFeatureProgressFromClient",GetCampaignReplayData:"campaignReplay.getCampaignReplayData",UnlockDifficultyMode:"campaignReplay.unlockDifficultyMode",SetCurrentDifficulty:"campaignReplay.setCurrentDifficulty",Debug:{ForceUnlockDifficultyMode:"campaignReplay.debugForceUnlockDifficultyMode",ResetData:"campaignReplay.debugResetData"}},Character:{CheckItems:"character.checkItems",Update:"character.update",ToolsUpdate:"character.toolsUpdate",GetFields:"character.getFields",GetFieldsOnInitialLogin:"character.getFieldsOnInitialLogin",GetMultiple:"character.getMultiple",GetPlayerAppearance:"getPlayerAppearance",UpdateCachedAppearance:"updateCachedAppearance"},ChargedLevels:{AbandonChargedLevelLosses:"chargedLevels.AbandonChargedLevelLosses",RecuperateChargedLevelLosses:"chargedLevels.RecuperateChargedLevelLosses",GetChargedLevelProgressData:"chargedLevels.GetChargedLevelProgressData",SendTutorialReminderMailer:"chargedLevels.sendTutorialReminderMailer",AwardMemberOnlyChargedLevelXp:"chargedLevels.awardMemberOnlyChargedLevelXp",UpdateDecayImmunity:"chargedLevels.updateDecayImmunity",ClearChargedLevelData:"chargedLevels.clearChargedLevelData",Debug:{SetChargedLevel:"chargedLevels.debug.setChargedLevel"}},Cooldowns:{SetCooldownFromNow:"setCooldownFromNow",SetCooldownFromCategory:"setCooldownFromCategory",Debug:{SetCooldownTimestamp:"cooldowns.debug.setCooldownTimestamp",ClearCooldown:"cooldowns.debug.clearCooldown",ClearAllCooldowns:"cooldowns.debug.clearAllCooldowns"}},CustomerSupport:{AfterCharacterChanged:"customerSupport.afterCharacterChanged"},DailyLoginCalendar:{UpdateActiveQuests:"dailyLoginCalendar.updateActiveQuests"},Debug:{ResetPlayer:"debug.resetPlayer",RemoveAllPets:"debug.removeAllPets",ForceCompleteFtueQuest:"debug.forceCompleteFtueQuest"},DuelsStadium:{GetAllDailyDuelsUsed:"duelsStadium.getAllDailyDuelsUsed"},DynamicStore:{Debug:{AddDefeatedPet:"store.debug.addDefeatedPet",RemoveDefeatedPet:"store.debug.removeDefeatedPet",ListDefeatedPets:"store.debug.listDefeatedPets",ClearDefeatedPets:"store.debug.clearDefeatedPets",ResetStoreProgress:"store.debug.resetStoreProgress"},PurchaseItem:"store.purchaseItem",GetStore:"store.getStore",GetStoreConfiguration:"store.getStoreConfiguration",GetNextSectionExpiry:"store.getNextSectionExpiry",GetHudWidgetItems:"store.getHudWidgetItems"},Education:{ReloadEducationData:"education.reloadEducationData"},ElementalBoosts:{GetCurrentElementalBoost:"elementalBoosts.GetCurrentElementalBoost",UpdateElementalBoosts:"elementalBoosts.UpdateElementalBoosts"},Endgame:{Debug:{SetProgress:"endgame.debug.setProgress"},GetProgress:"endgame.getProgress",SetProgress:"endgame.setProgress"},Events:{EnterWorld:"events.enterWorld"},Experiment:{LoadOverrides:"experiment.loadOverrides"},Festival:{GetChestData:"festival.getChestData",SetChestDate:"festival.setChestDate",SetChestSpins:"festival.setChestSpins",GetSeenCompletedTaskData:"festival.getSeenCompletedTaskData",SetCompletedTasksSeen:"festival.setCompletedTasksSeen"},FeaturedSpawn:{GetConfig:"featuredSpawn.getConfig"},GameStore:{GetStore:"gameStore.getStore"},HardCurrency:{Spend:"hardCurrency.spend",GrantCaptureTutorialMagicoin:"hardCurrency.grantCaptureTutorialMagicoin",ClaimMonthlyAllowance:"hardCurrency.claimMagicoinAllowance",ClaimAllowances:"hardCurrency.claimAllowances",GetAllowanceClaimData:"hardCurrency.getAllowanceClaimData"},Hud:{GetHudData:"Hud.getHudData"},Interactables:{OpenInteractable:"interactables.openInteractable",GetInteractableDropRate:"interactables.getInteractableDropRate",GetCooldowns:"interactables.getCooldowns",SetCooldown:"interactables.setCooldown"},LegacySpawn:{GetLegacySpawnData:"legacySpawn.getLegacySpawnData"},LootDash:{CompleteLootDashMatch:"lootDash.completeLootDashMatch",Debug:"lootDash.debug",SavePreviousMatchData:"lootDash.savePreviousMatchData",StartLootDashMatch:"lootDash.startLootDashMatch"},MagicoinBattleRewards:{ClaimMemberRewards:"magicoinBattleRewards.claimMemberRewards"},MemberJar:{GetMemberJarData:"memberJar.getMemberJarData",UpdateMemberJarRewards:"memberJar.updateMemberJarRewards",ResetMemberJarData:"memberJar.resetMemberJarData"},MembershipUpgradeReward:{CheckMemberUpgradeReward:"membershipUpgradeReward.checkMemberUpgradeReward",GetCollectedRewardsData:"membershipUpgradeReward.getCollectedRewardsData",CollectMemberUpgradeReward:"membershipUpgradeReward.collectMemberUpgradeReward"},Mail:{DeleteMail:"mail.deleteMail",DebugMail:"mail.debugMail",ReadMail:"mail.readMail",CollectMailRewards:"mail.collectMailRewards"},MultiplayerMessage:{SendMessage:"MultiplayerMessage.sendMessage"},StateChallenge:{StateChallengeRewards:"StateChallenge.sendMailRewards",NationalCupRewards:"StateChallenge.sendNationalCupMailRewards",GetStateChallengeGoalsData:"StateChallenge.getStateChallengeGoalsData",ClaimStateChallengeGoalsRewards:"StateChallenge.claimStateChallengeGoalsRewards",ClaimPreviousStateChallengeGoalsRewards:"StateChallenge.claimPreviousStateChallengeGoalsRewards",HasUnclaimedPreviousStateChallengeGoalsRewards:"StateChallenge.hasUnclaimedPreviousStateChallengeGoalsRewards",GetMilestonesRewardDataForEducation:"StateChallenge.getMilestonesRewardDataForEducation",GetEndOfChallengeRewards:"StateChallenge.getEndOfChallengeRewards",GetRewardsGrantingPeriodEndDate:"StateChallenge.getRewardsGrantingPeriodEndDate",GetProdigyCupConfigData:"StateChallenge.getProdigyCupConfigData"},OTP:{FetchOptions:"otp.fetchOptions",CollectPurchasedItems:"otp.collectPurchasedItems",UpdatePurchaseHistory:"otp.updatePurchaseHistory"},PetInventory:{GetPetInventoryData:"petInventory.getPetInventoryData",UpdateSlots:"petInventory.updateSlots",SetSlots:"petInventory.setSlots"},PetGearInventory:{CreateItem:"petGearInventory.createItem",SeenItem:"petGearInventory.seenItem",ListItem:"petGearInventory.listItem",ClearItems:"petGearInventory.clearItems",DeleteItems:"petGearInventory.deleteItem",ReceiveAdGift:"petGearInventory.receiveAdGift"},PetMerge:{Debug:{BulkUpdatePetMergeRank:"petMerge.debug.bulkUpdatePetMergeRank"},PerformMergeAction:"petMerge.performMergeAction"},Quests:{GetQuestData:"quests.getQuestData",GetQuestProgress:"quests.getQuestProgress",SendQuestEvent:"quests.sendQuestEvent",SetQuestTaskProgressTimestamp:"quests.setQuestTaskProgressTimestamp"},QuickQuiz:{Debug:"quickQuiz.debug",End:"quickQuiz.end",Start:"quickQuiz.start"},Restrictions:{GetRestrictionOffers:"restrictions.getRestrictionOffers",MarkFreeRestrictionOfferClaimed:"restrictions.markFreeRestrictionOfferClaimed"},Rifts:{AttemptSecureUnlockNextRiftTier:"rifts.attemptSecureUnlockNextRiftTier",Debug:{AddRiftsKeys:"rifts.debug.addRiftsKeys",AddRiftsStoreCurrency:"rifts.debug.addRiftsStoreCurrency",SetRiftRunDebug:"rifts.debug.setRiftRunDebug"},ExpireRiftPetCooldown:"rifts.expireRiftPetCooldown",GetTierData:"rifts.getTierData",GetConfig:"rifts.getConfig",GetFirstTimeRewardsData:"rifts.getFirstTimeRewardsData",GetInventory:"rifts.getInventory",GetSelectedPortal:"rifts.getSelectedPortal",RerollRiftBuffModifier:"rifts.rerollRiftBuffModifier",RerollRiftOpponents:"rifts.rerollRiftOpponents",ResetRiftRun:"rifts.resetRiftRun",ReuseRiftPet:"rifts.reuseRiftPet",UpdateRiftsConfigVersion:"rifts.updateRiftsConfigVersion",StartRiftRun:"rifts.startRiftRun",StartBossRift:"rifts.startBossRift",UpdateSelectedPortal:"rifts.updateSelectedPortal",UpdateTierUnlockProgress:"rifts.updateTierUnlockProgress"},SecureInventory:{DebugGiveSecureItems:"secureInventory.debugGiveSecureItems",RemoveAllSecureItemsByType:"secureInventory.removeAllSecureItemsByType"},SegmentedOffers:{RedeemOffer:"segmentedOffers.redeemOffer",GetOffers:"segmentedOffers.getOffers"},Social:{GetFriendsStatuses:"social.getFriendsStatuses",SetStatus:"social.setStatus"},Time:{GetPlayerTimezoneOffset:"time.getPlayerTimezoneOffset",GetPlayerTimezoneEntity:"time.getPlayerTimezoneEntity",SetPlayerDebugTime:"time.setPlayerDebugTime"},Ultimates:{GetQuestData:"ultimates.getQuestData",GetQuestProgress:"ultimates.getQuestProgress",SendQuestEvent:"ultimates.sendQuestEvent",GetQuestBattleData:"ultimates.getQuestBattleData",UpdateActiveQuests:"ultimates.updateActiveQuests"},Kennel:{UnsecureAdd:"kennel.unsecureAdd",Update:"kennel.update",Remove:"kennel.remove",Evolve:"kennel.evolve",MemberUpgradeEvolve:"kennel.memberUpgradeEvolve",Migrate:"kennel.migrate",Claim:"kennel.claim"},Videos:{GetConfig:"videos.getConfig"},WeekendEvents:{UpdateActiveQuests:"weekendEvents.updateActiveQuests",GetCurrentEventsData:"weekendEvents.getCurrentEventsData",GetFestivalConfigData:"weekendEvents.getFestivalConfigData",CompletePastFestivals:"weekendEvents.completePastFestivals"},WizardCostumes:{Debug:"wizardCostumes.debug",MarkCostumesSeen:"wizardCostumes.markCostumesSeen"},WizardWatch:{GetWizardWatchData:"wizardWatch.getWizardWatchData"},WeeklyChallenge:{GetWeeklyChallengeData:"weeklyChallenge.getWeeklyChallengeData"},World:{CreateChannel:"world.createChannel",GetWorldList:"world.getWorldList"},ZoneMap:{CreateChannel:"zonemap.createChannel"},UniversalTeamSelect:{GetUtsConfig:"universalTeamSelect.getUtsConfig"},AssetExperiments:{getAllExperimentsWithCustomData:"assetExperiments.getAllExperimentsWithCustomData",getAssetsForExperimentsVariations:"assetExperiments.getAssetsForExperimentsVariations"},WizardName:{GetWizardNames:"wizardName.getWizardNames"}}},5491:(k,B,U)=>{"use strict";var F;U.d(B,{V:()=>F}),function(k){k.Pet="pet",k.Dorm="dorm",k.Follow="follow",k.Player="player"}(F||(F={}))},17446:(k,B,U)=>{"use strict";var F;U.d(B,{E:()=>F}),function(k){k[k.Common=0]="Common",k[k.Uncommon=1]="Uncommon",k[k.Rare=2]="Rare",k[k.Heroic=3]="Heroic",k[k.Legendary=4]="Legendary"}(F||(F={}))},65240:(k,B,U)=>{"use strict";var F;U.d(B,{C:()=>F}),function(k){k.Achievement="Achievement",k.AfterSchoolWidget="after_school_widget",k.BattleChest="battle-chest",k.BattlePass="treasure-track",k.Shop="game_shop",k.Container="container",k.DailyLoginCalendar="daily_login_calendar_reward",k.UnifiedStore="unified_store",k.Interactable="Interactable",k.LevelUp="level-up",k.WorldChest="world-chest",k.WorldMemberChest="world-member-chest",k.QuestChest="quest-chest",k.QuestReward="quest-reward",k.Festival="festival",k.FestivalPrizeWheel="festival-prize-wheel",k.FestivalBossLootWheel="festival-boss-loot-wheel",k.MiniGame="mini-game",k.PrizeWheel="prize-wheel",k.Battle="battle",k.Npc="npc",k.Leaderboard="leaderboard",k.ParentGoals="parent-goal",k.ConversionJar="conversion-jar",k.ConversionOffer="conversion-offer",k.PetSlots="pet-slots",k.PetEvolution="pet-evolution",k.PetMerge="pet_merge",k.PetRescue="pet-rescue",k.PostBattle="post-battle",k.StateChallengeMilestone="state_challenge_milestone",k.StateChallengeOnboarding="state_challenge_onboarding",k.StateChallengePodium="state_challenge_podium",k.Tutorial="tutorial",k.PetRoster="pet-roster",k.WizardDashLootBag="wizard_dash_loot_bag",k.InitialMemberBonus="initial-member-bonus",k.ChargedLevelRenewal="charged-level-renewal",k.DynamicStore="DynamicStore",k.RemoveUnsecureItem="remove-unsecure-item",k.FestivalDailyRespawnBossBattle="festival-daily-respawn-boss-battle",k.FestivalCurrencyReset="festival-currency-reset",k.FestivalCurrencyConversion="festival-currency-conversion",k.Otp="otp",k.WhiteGloveService="white-glove-service",k.WizardBank="wb_modal"}(F||(F={}))},63011:(k,B,U)=>{"use strict";var F;U.d(B,{D:()=>F}),function(k){k.BATTLE_PASS_PREMIUM="battlepass_premium",k.DAILY_LOGIN_CALENDAR_ULTIMATE_REWARD="daily_login_calendar_ultimate_reward",k.DAILY_LOGIN_CALENDAR_THRESHOLD_REWARD="daily_login_calendar_threshold_reward",k.LEGACY_EPICS="epics_v1",k.WIZARD_DASH_LEVEL_1_REVIVES="wizard_dash_level_1_revives",k.WIZARD_DASH_LEVEL_2_REVIVES="wizard_dash_level_2_revives",k.MYTHICAL_EPICS="epics_v2",k.ULTIMATE_MEMBERBOX="ultimate_memberbox",k.CORE_COINS="coins_350",k.PLUS_AND_ULTRA_COINS="coins_720",k.ULTRA_BONUS_COINS="bonus_coins_880",k.ULTIMATE_BONUS_COINS="bonus_coins_ultimate_bundle_880",k.CHARGED_LEVELS_DECAY_IMMUNITY="charged_levels_decay_immunity",k.MEMBERSHIP_UPGRADE_REWARD_SMALL="membership_upgrade_reward_small",k.MEMBERSHIP_UPGRADE_REWARD_MEDIUM="membership_upgrade_reward_medium",k.MEMBERSHIP_UPGRADE_REWARD_LARGE="membership_upgrade_reward_large",k.PET_MERGE_UPSELL_REPEATABLE="pet_merge_upsell_repeatable",k.PET_EVOLUTION_UPSELL_REPEATABLE="pet_evolution_upsell_repeatable",k.MEMBER_LEVEL_BOOST="member_level_boost"}(F||(F={}))},66582:(k,B,U)=>{"use strict";var F;U.d(B,{_$:()=>F,kG:()=>j,rH:()=>G}),function(k){k[k.NonMember=0]="NonMember",k[k.MemberLevelUp=1]="MemberLevelUp",k[k.MemberUltimateMath=2]="MemberUltimateMath",k[k.MemberUltimateBundle=3]="MemberUltimateBundle",k[k.MemberCore=101]="MemberCore",k[k.MemberPlus=102]="MemberPlus",k[k.MemberUltra=103]="MemberUltra"}(F||(F={}));const G={[F.NonMember]:"NonMember",[F.MemberLevelUp]:"MemberLevelUp",[F.MemberUltimateMath]:"MemberUltimateMath",[F.MemberUltimateBundle]:"MemberUltimateBundle",[F.MemberCore]:"MemberCore",[F.MemberPlus]:"MemberPlus",[F.MemberUltra]:"MemberUltra"},j=[F.MemberUltra,F.MemberUltimateBundle,F.MemberUltimateMath]},2952:(k,B,U)=>{"use strict";var F;U.d(B,{P:()=>F}),function(k){k.FX="fx",k.Move="move",k.HostTeam="create_co_op_team",k.TeamDisbanded="co_op_team_disbanded",k.TeamUpdated="co_op_team_updated",k.HostHeartbeat="co_op_host_heartbeat",k.SyncHealth="co_op_health_sync",k.PlayerAttacked="player_attacked",k.PlayersDefeated="players_defeated",k.TitanAttacked="titan_attacked",k.TitanDefeated="titan_defeated",k.Chat="chat",k.Catapult="catapult",k.Transform="transform",k.Change="change",k.Info="info",k.CoopTeam="coopTeam"}(F||(F={}))},17516:(k,B,U)=>{"use strict";var F;U.d(B,{m:()=>F}),function(k){k.DuelInvite="DuelInvite",k.DuelInviteRejection="DuelInviteRejection",k.DuelInviteCancellation="DuelInviteCancellation",k.RequestJoinTeam="request_co_op_team_join",k.JoinTeam="join_co_op_team",k.JoinTeamFailed="join_co_op_team_failed",k.ReloadEducationData="reload_education_data",k.StartCoOpTitanMatch="start_co_op_titan",k.QuestionAnswered="question_answered",k.PlayerLeftTeam="co_op_player_left_team",k.PlayerRejoinTeam="co_op_player_rejoin_team",k.PlayerJoined="player_joined",k.QuickQuizJoinRequest="quick_quiz_join_request"}(F||(F={}))},92579:(k,B,U)=>{"use strict";var F;U.d(B,{a:()=>F}),function(k){k.offline="offline",k.available="available",k.unavailable="unavailable"}(F||(F={}))},73678:(k,B,U)=>{"use strict";var F;U.d(B,{A_:()=>F,D3:()=>G,s0:()=>j}),function(k){k.FOREST="forest",k.SHIVERCHILL="shiverchill",k.SKYWATCH="skywatch",k.BONFIRE="bonfire_spire",k.SHIPWRECK="shipwreck_shore",k.ACADEMY="academy",k.FORESTHARD="forest_hard",k.SHIVERCHILLHARD="shiverchill_hard",k.SKYWATCHHARD="skywatch_hard",k.BONFIREHARD="bonfire_spire_hard",k.SHIPWRECKHARD="shipwreck_shore_hard",k.ACADEMYHARD="academy_hard",k.FORESTEXPERT="forest_expert",k.SHIVERCHILLEXPERT="shiverchill_expert",k.SKYWATCHEXPERT="skywatch_expert",k.BONFIREEXPERT="bonfire_spire_expert",k.SHIPWRECKEXPERT="shipwreck_shore_expert",k.ACADEMYEXPERT="academy_expert",k.LAMPLIGHT="lamplight",k.DYNO="dyno",k.HOUSE="house",k.DARKTOWER="darktower",k.ARCHIVES="archives",k.EARTHTOWER="earthtower",k.ICETOWER="icetower",k.STORMTOWER="stormtower",k.FIRETOWER="firetower",k.WATERTOWER="watertower",k.ASTRALTOWER="astraltower",k.TOWERTOWN="tower_town",k.CRYSTALCAVERNS="crystal_caverns",k.DRAGONISLE="dragon_isle",k.MOON="moon",k.SPRINGFESTGROTTO_BUNNY="springfest_grotto_bunny",k.SPRINGFESTGROTTO_FOX="springfest_grotto_fox"}(F||(F={}));const G=[F.BONFIRE,F.FOREST,F.SHIPWRECK,F.SHIVERCHILL,F.SKYWATCH],j=[...[F.FOREST,F.SHIVERCHILL,F.BONFIRE,F.SHIPWRECK,F.SKYWATCH],...[F.FORESTHARD,F.SHIVERCHILLHARD,F.BONFIREHARD,F.SHIPWRECKHARD,F.SKYWATCHHARD]]},10044:(k,B,U)=>{"use strict";var F;U.d(B,{y:()=>F}),function(k){k[k.Left=1]="Left",k[k.Right=-1]="Right"}(F||(F={}))},61468:(k,B,U)=>{"use strict";U.d(B,{l:()=>$});var F=U(95891),G=U.n(F),j=U(15821);class ${static getRandomItem(k,B=0,U=0){let F=U;if(!k)return null;U<1&&(F=k.length);const G=B+Math.floor(Math.random()*F);return void 0===k[G]?null:k[G]}static getAddedItems(k,B){return B.filter((B=>!k.includes(B)))}static countUniqueItems(k){return new Set(k).size}static rightPad(k,B,U){return k.length>=B?k.slice():k.concat(Array(B-k.length).fill(U))}static leftPad(k,B,U){return k.length>=B?k.slice():Array(B-k.length).fill(U).concat(k)}static pad(k,B,U,F=!1){return F?$.leftPad(k,B,U):$.rightPad(k,B,U)}static guaranteeArray(k){return j.A.isDefined(k)?Array.isArray(k)?k:[k]:[]}static arraysHaveSameElements(k,B){return G().isEmpty(G().xor(k,B))}}},59287:(k,B,U)=>{"use strict";U.d(B,{K:()=>G});var F=U(95891);class G{static sanitizeName(k){return F.replace(k,/ /g,"_").toLowerCase()}static getWorldChannelName(k){return G.sanitizeName(`world-${k}`)}static getZoneMapChannelName(k,B){return G.sanitizeName(`map-${k}-${B}`)}}},38170:(k,B,U)=>{"use strict";U.d(B,{r:()=>F});class F{static toDateObject(k){return k instanceof Date?k:new Date(k)}static toDateUtcMs(k){return F.toDateObject(k).getTime()}static toDateIsoString(k){return F.toDateObject(k).toISOString()}static isDateWithinRange(k,B,U){const G=F.toDateUtcMs(k),j=F.toDateUtcMs(B),$=F.toDateUtcMs(U);return G>=j&&G<=$}static millisecondsBetween(k,B){return Math.abs(B.getTime()-k.getTime())}static daysBetween(k,B){return Math.floor(F.millisecondsBetween(k,B)/864e5)}static monthsBetween(k,B){const U=B.getMonth()-k.getMonth()+12*(B.getFullYear()-k.getFullYear());return B.getDate()>=k.getDate()?U:U-1}}},28085:(k,B,U)=>{"use strict";U.d(B,{ES:()=>j,Um:()=>H,mg:()=>$});var F=U(95891),G=U.n(F);function j(k,B){const U=(k,B)=>{if(Array.isArray(k)){if(Array.isArray(B))return B;for(const F in B){const j=parseInt(F);isNaN(j)||(G().isNil(k[j])?k[j]=B[F]:G().mergeWith(k[j],B[F],U))}}},F=G().cloneDeep(k),j=G().cloneDeep(B);return G().mergeWith(F,j,U),F}function $(k){return G().cloneDeep(k)}function H(k,B){return Object.values(B).includes(k)}},30628:(k,B,U)=>{"use strict";U.d(B,{B:()=>F});class F{static toArray(k,B){const U=k.encode(B).finish();return Array.prototype.slice.apply(U)}static fromArray(k,B){const U=new Uint8Array(B);return k.decode(U)}}},88131:(k,B,U)=>{"use strict";var F;U.d(B,{Q:()=>G}),function(k){k.ObjectNotUnwrappedResult="object-not-unwrapped-result"}(F||(F={}));class G{static success(k){return new this(!0,k)}static error(k){return new this(!1,k)}static fromJSON(k){var B;const U="string"==typeof k?JSON.parse(k):k;return"value"in U==!1?this.error(null!==(B=U.error)&&void 0!==B?B:F.ObjectNotUnwrappedResult):this.success(U.value)}constructor(k,B){k?this._value=B:(this.error=B,this._throwable=new Error(null==B?void 0:B.toString()))}get(){return this._value}isSuccess(){return!this._throwable}expect(k){var B;if(this.isSuccess())return this.get();throw new Error(null!==(B=null!=k?k:this._throwable.message)&&void 0!==B?B:"Expected success but got failure",{cause:this._throwable})}toJSON(){return this.isSuccess()?{value:Object.assign({},this.get())}:{error:this.error}}}},25531:(k,B,U)=>{"use strict";U.d(B,{w:()=>F});class F{static format(k,...B){return F.replaceMultiple(k,B.map(((k,B)=>`{${B}}`)),...B)}static replaceMultiple(k,B,...U){if(F.isNullOrEmpty(k))throw new Error("Unsupported string value");if(""===k.trim())return k;if(B.length!==U.length)throw new Error("Search values and replace values args must have the same length.");let G=k;for(let F=0;F{"use strict";U.d(B,{A:()=>F});class F{static isDefined(k){return null!=k}static traverseIfObject(k,B){return B&&k&&"object"==typeof k?k[B]:k}static isDeepEqualOrNullishAcyclic(k,B){if(!F.isDefined(k)&&!F.isDefined(B))return!0;if(typeof k!=typeof B)return!1;if("object"!=typeof k)return k===B;const U=k,G=B,j=new Set;for(const F of Object.keys(U))j.add(F);for(const F of Object.keys(G))j.add(F);let $=!0;return j.forEach((k=>{$&&($=F.isDeepEqualOrNullishAcyclic(U[k],G[k]))})),$}}},35120:(k,B,U)=>{"use strict";U.d(B,{q:()=>F});class F{static get instance(){return this._instance}get game(){return this._game}get prodigy(){return this._prodigy}set prodigy(k){this._prodigy||(this._prodigy=k)}constructor(k){F._instance||(F._instance=this),window.__PNP__=this,this._game=k}destroy(){F._instance=null,this._game=null,this._prodigy=null}}},95925:(k,B,U)=>{"use strict";var F;U.d(B,{i:()=>F}),function(k){k[k.JSON=0]="JSON",k[k.Image=1]="Image",k[k.Atlas=2]="Atlas",k[k.Music=3]="Music",k[k.Sound=4]="Sound",k[k.Spine=5]="Spine"}(F||(F={}))},66572:(k,B,U)=>{"use strict";U.d(B,{a:()=>Q});var F,G=U(8674),j=U(62459),$=U(79687),H=U(91207),V=U(34829),W=U(23034),q=U(17425),K=U(30405),z=U(35120),Y=U(51477);let Q=F=class{get assetsArray(){return this._assetsArray}get loader(){return this._loader}set flagProvider(k){this._flagProvider=k}constructor(k){this.game=null,this._assetsArray=[],this._loader=null,this._fileDownloadTimes={},this.game=k;for(let B=1;B<=7;++B)q.K.commonAssetsCached[H.E.getIconForType("emote",B)]=!0;for(let B=1;B<=5;++B)q.K.commonAssetsCached[H.E.getIconForType("dance",B)]=!0;this.addLegacyAssetCommonCacheGuids(),this.game.load.onReset.add(this.reset.bind(this)),this.setLoader(),this._loader.onLoadComplete.add(this.loadComplete.bind(this),this),this._loader.onFileStart.add(this.fileWasStarted,this),this._loader.onFileComplete.add(this.fileWasCompleted,this)}setLoader(){this._loader=this.game.load,this._loader.crossOrigin="anonymous",this._loader.baseURL=V.s.get("GameConstants.Build.ASSETS_LOCATION")}assets(k,B,U=!0){if("string"==typeof k){for(let U=0;U{this.assets(k,((k,B)=>{B?U():F()}),B)}))}))}reset(k=!1){if(k)for(let B=this._assetsArray.length-1;B>=0;B--){const k=this._assetsArray[B];k.isCancellable&&(k.callbacks=[],this._assetsArray.splice(B,1))}this.setLoader()}loadComplete(k){k&&j.VyI.log("Loader completed with errors.",j.$bb.Error);for(let B=this._assetsArray.length-1;B>=0;B--){const k=this._assetsArray[B];let U=!1;if(!k.isLoading)continue;k.isLoading=!1;let F=!1;for(let B=0;B=0;k--){const B=this._assetsArray[k];if(!B.isLoading)continue;let U=!0;for(let k=0;k{const G=F.getHeader("Content-Length");j.Aq$.isDefined(G)?(k.size=parseInt(G,10)+U,this.sendDownloadMetric(B.key)):j.VyI.log(`Missing Content-Length header for ${B.key}`,j.$bb.Error)}))}else j.VyI.log("Unable to log file metrics because file has no data.",j.$bb.Warning);break;case"audio":{const U=new j.u1k;U.setBaseURI(B.requestUrl).setMethod(j.iXQ.Head),z.q.instance.prodigy.gameContainer.get("30b-3020").sendRequest(U).then((U=>{const F=U.getHeader("Content-Length");j.Aq$.isDefined(F)?(k.size=parseInt(F,10),this.sendDownloadMetric(B.key)):j.VyI.log(`Missing Content-Length header for ${B.key}`,j.$bb.Error)}));break}case"script":break;default:j.VyI.log(`Loading metric could not handle file type of: ${B.type}`,j.$bb.Error)}this.sendDownloadMetric(B.key)}}}sendDownloadMetric(k){const B=this._fileDownloadTimes[k];if(B&&j.Aq$.isDefined(B.size)){z.q.instance.prodigy.gameContainer.get("2a1-fed9").assetDownloaded(B.size,(B.end-B.start)/1e3)}}addLegacyAssetCommonCacheGuids(){const k=Object.keys(q.K.commonAssetsCached);for(let B=0;B{"use strict";U.d(B,{A:()=>W});var F=U(8674),G=U(62459),j=U(79687),$=U(23034),H=U(95925),V=U(66572);let W=class{constructor(k,B,U){this.assetLoader=null,this.cache=null,this.assetDictionary=null,this.assetLoader=k,this.cache=B,this.assetDictionary=U}loadAssets(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=(null==B?void 0:B.tag)?k.map((k=>`${k}_${B.tag}`)):k;return new Promise((k=>{this.assetLoader.assets(U,k)}))}))}loadAssetsNotCancellable(k){return(0,F.sH)(this,void 0,void 0,(function*(){return new Promise((B=>{this.assetLoader.assets(k,B,!1)}))}))}isLoaded(k,B){switch(B){case H.i.JSON:return this.cache.checkJSONKey(k);case H.i.Image:return this.cache.checkImageKey(k);case H.i.Music:case H.i.Sound:return this.cache.checkSoundKey(k);case H.i.Spine:return this.cache.checkJSONKey(k)&&this.cache.checkImageKey(`${k}.png`)&&this.cache.checkTextKey(`${k}Atlas`)}return!1}getAsset(k,B){switch(B){case H.i.JSON:return this.cache.getJSON(k);case H.i.Image:return this.cache.getImage(k);case H.i.Atlas:return this.cache.getFrameData(k)}return null}assignAssetData(k,B){this.assetDictionary.assignAssets({[k]:B})}loadSingleAsset(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return yield this.loadAssets([k]),this.getAsset(k,B)}))}};W=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("aa9-c54b")),(0,F.Qj)(1,(0,j.inject)("05c-8928")),(0,F.Qj)(2,(0,j.inject)("c9c-9511")),(0,F.Sn)("design:paramtypes",[V.a,G.l2R,$.s])],W)},51477:(k,B,U)=>{"use strict";U.d(B,{n:()=>nt});var F=U(62459),G=(U(96571),U(34829)),j=U(88225);class ${constructor(k){this.callbacks={},this.listeners={},this.broadcastIdCount=0,this.game=k}clear(){let k;for(const B in this.callbacks)for(const U in this.callbacks[B]){for(k=0;this.callbacks[B][U].length>k;)this.callbacks[B][U].persistent?k++:this.callbacks[B][U].pop();0===k&&(this.callbacks[B][U]=void 0,delete this.callbacks[B][U])}for(const B in this.listeners)for(const U in this.listeners[B]){for(k=0;this.listeners[B][U].length>k;)this.listeners[B][U].persistent?k++:this.listeners[B][U].pop();0===k&&(this.listeners[B][U]=void 0,delete this.listeners[B][U])}}addAppListener(k,B,U,G,$=null){let H=F.Aq$.isDefined(G)?G:this.game;F.Aq$.isDefined(k)&&F.Aq$.isDefined(B)&&F.Aq$.isDefined(U)||F.VyI.log("addAppListener - Invalid arguments",F.$bb.Error),H=this.hashContext(H),void 0===this.callbacks[H]&&(this.callbacks[H]={}),void 0===this.listeners[H]&&(this.listeners[H]={}),void 0===this.callbacks[H][k]&&(this.callbacks[H][k]=[]),void 0===this.listeners[H][k]&&(this.listeners[H][k]=[]),this.callbacks[H][k].push(B),this.listeners[H][k].push(U);const V=this.callbacks[H][k].persistent;F.Aq$.isDefined(V)&&$!==V&&j.captureException(new Error(`ROX-1681: Adding a listener to broadcast event ${k}, which previously had a listener with a persistent flag of ${V}, but has been overridden with ${$}. There might be missed callbacks for this event!`)),this.callbacks[H][k].persistent=F.Aq$.isDefined($),this.listeners[H][k].persistent=F.Aq$.isDefined($)}removeAppListener(k,B,U){let G=F.Aq$.isDefined(U)?U:this.game;if(F.Aq$.isDefined(k)){if(G=this.hashContext(G),void 0!==this.callbacks[G]&&void 0!==this.callbacks[G][k]&&void 0!==this.listeners[G]&&void 0!==this.listeners[G][k]){for(let U=0;U=this._prevTime+1e3&&(this.record&&(this._framerate=1e3*this._frames/(k-this._prevTime),this._rollingCount++,this._rollingSum+=this._framerate,this._fpsRecordsSinceLastPing.push(Math.round(this._framerate))),this._prevTime=k,this._frames=0),k>=this._timeAtLastPing+this._pingPeriodMs){const B=Math.round(F.cj9.average(...this._fpsRecordsSinceLastPing));let U=0,G=0;for(let k=0;k{"use strict";U.d(B,{y:()=>V});var F=U(8674),G=U(62459);class j{constructor(){this.x=0,this.y=0}get width(){if(G.o5U.isDesktop())return G.DX_.width;{const k=G.DX_.width,B=window.innerWidth;return k{this.onDeviceReady()}))}getOffset(k,B=new G.I9Y){const U=k.getBoundingClientRect(),F=this.scrollY,j=this.scrollX,$=document.documentElement.clientTop,H=document.documentElement.clientLeft;return B.x=U.left+j-H,B.y=U.top+F-$,B}getScreenOrientation(){return window.innerHeight>window.innerWidth?"portrait":"landscape"}onDeviceReady(){this.scrollX=window.pageXOffset,this.scrollY=window.pageYOffset}}class V{get boundingParent(){var k;return this.parentIsWindow||this.isFullScreen&&!this._createdFullScreenTarget?null:null===(k=this._game.canvas)||void 0===k?void 0:k.parentNode}get isFullScreen(){return G.DX_.isFullScreen()}get currentScaleMode(){return this.isFullScreen?this.fullScreenScaleMode:this.scaleMode}get isPortrait(){return"portrait"===this.screenOrientation}get isLandscape(){return"landscape"===this.screenOrientation}constructor(k,B=0,U=0){this._forceLandscape=!1,this._forcePortrait=!1,this._incorrectOrientation=!1,this.pageAlignHorizontally=!1,this.pageAlignVertically=!1,this.onOrientationChange=new G.HN0,this.enterIncorrectOrientation=new G.HN0,this.leaveIncorrectOrientation=new G.HN0,this.onFullScreenInit=new G.HN0,this.onFullScreenChange=new G.HN0,this.onFullScreenError=new G.HN0,this.scaleFactor=new G.I9Y(1,1),this._scaleFactorInverted=new G.I9Y(1,1),this.margin={left:0,top:0,right:0,bottom:0,x:0,y:0},this.bounds=new G.M_G,this.aspectRatio=0,this.sourceAspectRatio=0,this.canvasOffset=new G.I9Y(0,0),this.windowConstraints={right:"layout",bottom:""},this.scaleMode=V.NO_SCALE,this.fullScreenScaleMode=V.NO_SCALE,this.parentIsWindow=!1,this.parentNode=null,this.parentScaleFactor=new G.I9Y(1,1),this.trackParentInterval=2e3,this.onSizeChange=new G.HN0,this._onResizeContext=null,this._pendingScaleMode=null,this._gameSize=new G.M_G,this._lastUpdate=0,this._updateThrottle=0,this._updateThrottleReset=100,this._parentBounds=new G.M_G,this._tempBounds=new G.M_G,this._lastReportedCanvasSize=new G.M_G,this._lastReportedGameSize=new G.M_G,this._booted=!1,this._dom=new H(k.device),this._game=k,this.width=B,this.height=U,this.screenOrientation=this._dom.getScreenOrientation(),window.recalculateCanvasOffset=()=>{this.recalculateCanvasOffset()},k.config&&this.parseConfig(k.config),this.setupScale(B,U)}boot(){this._orientationChange=k=>{this.orientationChange(k)},this._windowResize=k=>{this.windowResize(k)},window.addEventListener("orientationchange",this._orientationChange,!1),window.addEventListener("resize",this._windowResize,!1),this._fullScreenChange=k=>{this.fullScreenChange(k)},this._fullScreenError=k=>{this.fullScreenError(k)},document.addEventListener("webkitfullscreenchange",this._fullScreenChange,!1),document.addEventListener("mozfullscreenchange",this._fullScreenChange,!1),document.addEventListener("MSFullscreenChange",this._fullScreenChange,!1),document.addEventListener("fullscreenchange",this._fullScreenChange,!1),document.addEventListener("webkitfullscreenerror",this._fullScreenError,!1),document.addEventListener("mozfullscreenerror",this._fullScreenError,!1),document.addEventListener("MSFullscreenError",this._fullScreenError,!1),document.addEventListener("fullscreenerror",this._fullScreenError,!1),this._game.onResume.add(this._gameResumed,this),this.recalculateCanvasOffset(),this.bounds.setTo(this.canvasOffset.x,this.canvasOffset.y,this.width,this.height),this.setGameSize(this._game.width,this._game.height),this.screenOrientation=this._dom.getScreenOrientation(),this._booted=!0,null!==this._pendingScaleMode&&(this.scaleMode=this._pendingScaleMode,this._pendingScaleMode=null)}parseConfig(k){void 0!==k.scaleMode&&(this._booted?this.scaleMode=k.scaleMode:this._pendingScaleMode=k.scaleMode),void 0!==k.fullScreenScaleMode&&(this.fullScreenScaleMode=k.fullScreenScaleMode),k.fullScreenTarget&&(this.fullScreenTarget=k.fullScreenTarget),this.pageAlignHorizontally=k.alignH||!1,this.pageAlignVertically=k.alignV||!1}setupScale(k,B){let U;const F=new G.M_G;let j,$;this._game.parent&&("string"==typeof this._game.parent?U=document.getElementById(this._game.parent):this._game.parent&&1===this._game.parent.nodeType&&(U=this._game.parent)),U?(this.parentNode=U,this.parentIsWindow=!1,this.getParentBounds(this._parentBounds),F.width=this._parentBounds.width,F.height=this._parentBounds.height):(this.parentNode=null,this.parentIsWindow=!0,F.width=this._dom.visualBounds.width,F.height=this._dom.visualBounds.height),"number"==typeof k?j=k:(this.parentScaleFactor.x=parseInt(k,10)/100,j=F.width*this.parentScaleFactor.x),"number"==typeof B?$=B:(this.parentScaleFactor.y=parseInt(B,10)/100,$=F.height*this.parentScaleFactor.y),j=Math.floor(j),$=Math.floor($),this._gameSize.setTo(0,0,j,$),this.updateDimensions(j,$,!1)}setGameSize(k,B){this._gameSize.setTo(0,0,k,B),this.currentScaleMode!==V.RESIZE&&this.updateDimensions(k,B,!0),this.queueUpdate(!0)}_gameResumed(){this.queueUpdate(!0)}queueUpdate(k){k&&(this._parentBounds.width=0,this._parentBounds.height=0),this._updateThrottle=this._updateThrottleReset}updateDimensions(k,B,U){this.width=k*this.parentScaleFactor.x,this.height=B*this.parentScaleFactor.y,this._game.width=this.width,this._game.height=this.height,this.sourceAspectRatio=this.width/this.height,this.updateScalingAndBounds(),U&&(this.currentScaleMode===V.RESIZE&&this._game.renderer.autoDensity||this._game.renderer.resize(this.width,this.height))}updateScalingAndBounds(){this.scaleFactor.x=this._game.width/this.width,this.scaleFactor.y=this._game.height/this.height,this._scaleFactorInverted.x=this.width/this._game.width,this._scaleFactorInverted.y=this.height/this._game.height,this.aspectRatio=this.width/this.height,this._game.canvas&&this.recalculateCanvasOffset(),this.bounds.setTo(this.canvasOffset.x,this.canvasOffset.y,this.width,this.height),this._game.input&&this._game.input.scale&&this._game.input.scale.setTo(this.scaleFactor.x,this.scaleFactor.y)}getParentBounds(k=new G.M_G,B){const U=B||this.boundingParent,F=this._dom.visualBounds,j=this._dom.layoutBounds;if(U){const B=U.getBoundingClientRect(),G=U.offsetParent?U.offsetParent.getBoundingClientRect():U.getBoundingClientRect();k.setTo(B.left-G.left,B.top-G.top,B.width,B.height);const $=this.windowConstraints;let H;$.right&&(H="layout"===$.right?j:F,k.x=Math.min(k.right,H.width)-k.width),$.bottom&&(H="layout"===$.bottom?j:F,k.y=Math.min(k.bottom,H.height)-k.height)}else k.setTo(0,0,F.width,F.height);return k.setTo(Math.round(k.x),Math.round(k.y),Math.round(k.width),Math.round(k.height)),k}setResizeCallback(k,B){this._onResize=k,this._onResizeContext=B}signalSizeChange(){if(!G.M_G.sameDimensions(this.bounds,this._lastReportedCanvasSize)||!G.M_G.sameDimensions(new G.M_G(0,0,this._game.width,this._game.height),this._lastReportedGameSize)){const k=this.width,B=this.height;this._lastReportedCanvasSize.setTo(0,0,k,B),this._lastReportedGameSize.setTo(0,0,this._game.width,this._game.height),this.onSizeChange.dispatch(this,k,B)}}setMinMax(k,B,U,F){this.minWidth=k,this.minHeight=B,void 0!==U&&(this.maxWidth=U),void 0!==F&&(this.maxHeight=F)}preUpdate(){if(this._game.time.timeMS=400?0:100,this.recalculateCanvasOffset();const B=this._parentBounds.width,U=this._parentBounds.height,F=this.getParentBounds(this._parentBounds,this.parentNode),j=F.width!==B||F.height!==U,$=this.updateOrientationState();(j||$)&&(this._onResize&&this._onResize.call(this._onResizeContext,this,F),this.updateLayout(),this.signalSizeChange());let H=2*this._updateThrottle;this._updateThrottle0&&(this.width=Math.min(this.width,this.maxWidth)),this.maxHeight>0&&(this.height=Math.min(this.height,this.maxHeight)))}createFullScreenTarget(){const k=document.createElement("div");return k.style.margin="0",k.style.padding="0",k.style.background="#000",k}cleanupCreatedTarget(){const k=this._createdFullScreenTarget;if(k&&k.parentNode){const B=k.parentNode;B.insertBefore(this._game.canvas,k),B.removeChild(k)}this._createdFullScreenTarget=null}prepScreenMode(k){const B=!!this._createdFullScreenTarget,U=this._createdFullScreenTarget||this.fullScreenTarget;k?(B||this.fullScreenScaleMode===V.EXACT_FIT)&&U!==this._game.canvas&&(this._fullScreenRestore={targetWidth:U.style.width,targetHeight:U.style.height},U.style.width="100%",U.style.height="100%"):(this._fullScreenRestore&&(U.style.width=this._fullScreenRestore.targetWidth,U.style.height=this._fullScreenRestore.targetHeight,this._fullScreenRestore=null),this.updateDimensions(this._gameSize.width,this._gameSize.height,!0),this.resetCanvas())}fullScreenChange(k){this.event=k,this.isFullScreen?(this.prepScreenMode(!0),this.updateLayout(),this.queueUpdate(!0)):(this.prepScreenMode(!1),this.cleanupCreatedTarget(),this.updateLayout(),this.queueUpdate(!0)),this.onFullScreenChange.dispatch(this,this.width,this.height)}fullScreenError(k){this.event=k,this.cleanupCreatedTarget(),this.onFullScreenError.dispatch(this)}destroy(){this._game.onResume.remove(this._gameResumed,this),window.removeEventListener("orientationchange",this._orientationChange,!1),window.removeEventListener("resize",this._windowResize,!1),document.removeEventListener("webkitfullscreenchange",this._fullScreenChange,!1),document.removeEventListener("mozfullscreenchange",this._fullScreenChange,!1),document.removeEventListener("MSFullscreenChange",this._fullScreenChange,!1),document.removeEventListener("fullscreenchange",this._fullScreenChange,!1),document.removeEventListener("webkitfullscreenerror",this._fullScreenError,!1),document.removeEventListener("mozfullscreenerror",this._fullScreenError,!1),document.removeEventListener("MSFullscreenError",this._fullScreenError,!1),document.removeEventListener("fullscreenerror",this._fullScreenError,!1),this.onOrientationChange.dispose(),this.enterIncorrectOrientation.dispose(),this.leaveIncorrectOrientation.dispose(),this.onFullScreenInit.dispose(),this.onFullScreenChange.dispose(),this.onFullScreenError.dispose(),this.onSizeChange.dispose()}startFullScreen(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.isFullScreen)return!1;try{let k=this.fullScreenTarget;k||(this.cleanupCreatedTarget(),this._createdFullScreenTarget=this.createFullScreenTarget(),k=this._createdFullScreenTarget);const B={targetElement:k};if(this.onFullScreenInit.dispatch(this,B),this._createdFullScreenTarget){const B=this._game.canvas;B.parentNode.insertBefore(k,B),k.appendChild(B)}const U=k,F=U.requestFullscreen||U.mozRequestFullscreen||U.msRequestFullscreen||U.requestFullScreen||U.mozRequestFullScreen||U.msRequestFullScreen;F?yield F.call(k):U.webkitRequestFullscreen?yield U.webkitRequestFullscreen(k.ALLOW_KEYBOARD_INPUT):U.webkitRequestFullScreen?yield U.webkitRequestFullScreen(k.ALLOW_KEYBOARD_INPUT):G.VyI.log("Platform doesn't support fullscreen API.",G.$bb.Warning)}catch(e){return G.RQr.logError(e,"Unable to go full screen."),setTimeout((()=>this.fullScreenError()),10),!1}return!0}))}stopFullScreen(){if(!this.isFullScreen)return!1;const k=document,B=k.cancelFullScreen||k.exitFullscreen||k.webkitCancelFullScreen||k.webkitExitFullscreen||k.msCancelFullScreen||k.msExitFullscreen||k.mozCancelFullScreen||k.mozExitFullscreen;return B?(B.call(k),!0):(G.VyI.log("Unable to leave full screen.",G.$bb.Error),!1)}recalculateCanvasOffset(){this._dom.getOffset(this._game.canvas,this.canvasOffset)}}V.EXACT_FIT=0,V.NO_SCALE=1,V.SHOW_ALL=2,V.RESIZE=3},10778:(k,B,U)=>{"use strict";U.d(B,{i:()=>V});var F=U(8674),G=U(62459),j=U(35120);class ${static validateAnimationFile(k){if(!editorAPI)return G.VyI.log("Not in editor mode",G.$bb.Error),null;if(!k)return G.VyI.log("no path",G.$bb.Warning),null;if(!editorAPI.readFileSync(k))return G.VyI.log("Path not valid / can`t read contents",G.$bb.Warning),null;const B=editorAPI.readFileSync(k).toString();if(!B)return G.VyI.log("Not a Valid File",G.$bb.Warning),null;const U=JSON.parse(B);if(!U)return G.VyI.log("Not a Valid Json",G.$bb.Warning),null;const F=U;return F?F.tweens?F:(G.VyI.log("Timeline has no tweens!",G.$bb.Warning),null):(G.VyI.log("Not a valid animation file",G.$bb.Warning),null)}static processNewTimelineFromGUID(k,B,U){const F=new G.Kfn,j=new Map;return U.forEach(((k,U)=>{B[U]&&j.set(k,[...j.get(k)||[],B[U]])})),k.tweens.forEach(((k,B)=>{const U=j.get(B);if(!U)return;const G=F.addGameObjects(U);k.from&&k.to?F.fromTo(G,k.how.duration,k.from,k.to,k.ease,k.how.delay):k.to?F.to(G,k.how.duration,k.to,k.ease,k.how.delay):k.from&&F.from(G,k.how.duration,k.from,k.ease,k.how.delay)})),F}static loadTimelineFromGUID(k){return(0,F.sH)(this,void 0,void 0,(function*(){return new Promise((B=>{j.q.instance.prodigy.load.assets([k],(()=>{const U=j.q.instance.game.cache.getJSON(k);B(U)}))}))}))}}class H extends G.$KW{constructor(){super(...arguments),this.tweenInfoNodes=[],this.firstFocus=!0,this.processedTweens=[],this.tweenLinks=[]}checkAndProcessAnimationPath(k){this.validationTimeline=$.validateAnimationFile(k),this.validationTimeline&&(this.processedTweens=[],this.validationTimeline.tweens.forEach((k=>{const B=k;B&&0!==B.GameObjectLinks.length&&this.processedTweens.push(B)})))}generate(k,B){return this.currentState=k,this.firstFocus&&(this.firstFocus=!1,k.playMode||this.checkAndProcessAnimationPath(k.animationPath)),k.playMode?this._editorAPI.switchFocusToPlayMode():this._editorAPI.switchFocusToEditMode(),G.XRp.createVertical(this.regenerateUI())}regenerateUI(){const k=[];let B;if(B=this.currentState.playMode?G.X9M.create({buttonText:"STOP",id:"Stop-animation",buttonIcon:G.a2l.Stop,onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{playMode:!1})}}):G.X9M.create({buttonText:"PLAY",id:"play-animation",buttonIcon:G.a2l.Play,onClick:()=>{this.currentState.animationPath?0!==this.currentState.gameObjects.length?this._editorAPI.modifyComponent(this._componentGuid,{playMode:!0}):this._editorAPI.showPopup("You haven`t assigned any objects :(","Nothing to animate"):this._editorAPI.showPopup("Please pick a valid .animation file first!","Uh oh")}}),k.push(G._Lw.line()),k.push(G.XRp.createHorizontal([G._Lw.line(),B,G._Lw.line()])),k.push(G._Lw.blankLine()),this.currentState.playMode)return k;const U=G.Hnb.create({allowedExtensions:["animation"],id:"animation",path:this.currentState.animationPath,onChange:k=>{this.clearAnimationData(),this.checkAndProcessAnimationPath(k);const B=`${k}.meta`,U=JSON.parse(this._editorAPI.readFileSync(B).toString());this._editorAPI.modifyComponent(this._componentGuid,{cachedAnimationGUID:U.guid,animationPath:k})}});return k.push(G.XRp.createVerticalContainer([G._Lw.halfBlankLine(),G.XRp.createHorizontal([G._Lw.line(),U,G._Lw.line()]),G._Lw.halfBlankLine()],{title:"Pick Animation File",isCollapsible:!1})),k.push(G._Lw.halfBlankLine()),this.validationTimeline&&k.push(G.XRp.createVerticalContainer(this.generateGameObjectNodes(),{isCollapsible:!1,title:"Game Objects"})),k}clearAnimationData(){this.validationTimeline=null,this._editorAPI.modifyComponent(this._componentGuid,{animationPath:null,gameObjects:[],gameObjectPositionList:[]})}generateIndexedPositionsForGameObjects(){const k=[];for(let B=0;B{this.generateIndexedPositionsForGameObjects()}}))}}let V=class extends G.uAl{constructor(){super(...arguments),this.playMode=!1,this.gameObjects=[],this.gameObjectPositionList=[]}create(){if(super.create(),!this.gameObject)return this.animationMode(!1),void G.VyI.log("Game Object not loaded or ready for animation",G.$bb.Warning);this.animationMode(this.playMode&&this.gameObject.activeInHierarchy)}playAnimation(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=yield $.loadTimelineFromGUID(this.cachedAnimationGUID);B?(null===(k=this._animationWrapper)||void 0===k||k.destroyTimeline(),this._animationWrapper=$.processNewTimelineFromGUID(B,this.gameObjects,this.gameObjectPositionList),this._animationWrapper.restart()):G.VyI.log("animation File not found / Not a valid JSON",G.$bb.Error)}))}animationMode(k){k&&this.playAnimation().catch((k=>{G.VyI.log(`Timeline processing failed: ${G.RQr.stringify(k)}`,G.$bb.Error)}))}destroy(){var k;null===(k=this._animationWrapper)||void 0===k||k.destroyTimeline(),super.destroy()}};(0,F.Cg)([(0,G.tW2)("animation"),(0,F.Sn)("design:type",String)],V.prototype,"animationPath",void 0),(0,F.Cg)([(0,G.tW2)(),(0,F.Sn)("design:type",String)],V.prototype,"cachedAnimationGUID",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"playMode",void 0),(0,F.Cg)([(0,G.ERr)(),(0,G.SZi)(),(0,F.Sn)("design:type",Array)],V.prototype,"gameObjects",void 0),(0,F.Cg)([(0,G.g11)(),(0,G.SZi)(),(0,F.Sn)("design:type",Array)],V.prototype,"gameObjectPositionList",void 0),V=(0,F.Cg)([(0,G.EVk)("AnimationPreview",G.YH6.animation),(0,G.WR4)(H)],V)},15521:(k,B,U)=>{"use strict";U.d(B,{Z:()=>G});var F=U(57308);class G{static bringToTop(k){return k.parent?(k.parent.setChildIndex(k,k.parent.children.length-1),k):k}static sendToBack(k){return k.parent?(k.parent.setChildIndex(k,0),k):k}static moveUp(k){if(!k.parent)return k;if(k.parent instanceof F.Y)k.parent.moveUp(k);else{const B=k.parent.getChildIndex(k);B0&&k.parent.setChildIndex(k,B-1)}return k}}},74560:(k,B,U)=>{"use strict";U.d(B,{m:()=>G});var F=U(59231);class G{static setInputHandler(k,B){k.input=B}static setInputEnabled(k,B,U){B?k.input?k.input&&!k.input.enabled&&k.input.start():(G.setInputHandler(k,new F.l(U)),k.input.start()):k.input&&k.input.enabled&&k.input.stop()}static isInputEnabled(k){var B;return!!(null===(B=k.input)||void 0===B?void 0:B.enabled)}}},29569:(k,B,U)=>{"use strict";U.d(B,{U:()=>H});var F=U(8674),G=U(62459),j=U(15016),$=U(35120);class H extends G.mk0{get input(){return $.q.instance.game.input}shutdown(){G.wa5.destroyActiveScene(),$.q.instance.prodigy.notifications.resumeAll(),super.shutdown()}getParentalConsentBanner(){return(0,F.sH)(this,void 0,void 0,(function*(){return H._parentalConsentUiHandler.getBannerGameObject()}))}showParentalConsentBanner(k){this._parentalConsentLoadPromise=H._parentalConsentUiHandler.showBanner(k)}hideParentalConsentBanner(){var k;null===(k=this._parentalConsentLoadPromise)||void 0===k||k.cancel(),H._parentalConsentUiHandler.hideBanner()}}H._parentalConsentUiHandler=new j.R},93690:(k,B,U)=>{"use strict";U.d(B,{p:()=>nt});var F=U(62459),G=U(68910),j=U(98252),$=U(74560),H=U(18741),V=U(82366),W=U(35120);class q{get justDown(){const k=this._justDown;return this._justDown=!1,k}get justUp(){const k=this._justUp;return this._justUp=!1,k}get enabled(){return this._enabled}set enabled(k){const B=!!k;B!==this._enabled&&(B||this.reset(!1),this._enabled=B)}get game(){return W.q.instance.game}constructor(k){this._enabled=!0,this.event=null,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.timeDown=0,this.duration=0,this.timeUp=-2500,this.durationUp=-2500,this.repeats=0,this.onDown=new F.HN0,this.onHoldContext=null,this.onUp=new F.HN0,this._justDown=!1,this._justUp=!1,this.keyCode=k}update(){this._enabled&&(this.isDown?(this.duration=this.game.time.timeMS-this.timeDown,this.repeats++,this.onHoldCallback&&this.onHoldCallback.call(this.onHoldContext,this)):this.durationUp=this.game.time.timeMS-this.timeUp)}processKeyDown(k){this._enabled&&(this.event=k,this.isDown||(this.altKey=k.altKey,this.ctrlKey=k.ctrlKey,this.shiftKey=k.shiftKey,this.isDown=!0,this.isUp=!1,this.timeDown=this.game.time.timeMS,this.duration=0,this.durationUp=this.game.time.timeMS-this.timeUp,this.repeats=0,this._justDown=!0,this.onDown.dispatch(this)))}processKeyUp(k){this._enabled&&(this.event=k,this.isUp||(this.isDown=!1,this.isUp=!0,this.timeUp=this.game.time.timeMS,this.duration=this.game.time.timeMS-this.timeDown,this.durationUp=0,this._justUp=!0,this.onUp.dispatch(this)))}reset(k=!0){this.isDown=!1,this.isUp=!0,this.timeUp=this.game.time.timeMS,this.duration=0,this.durationUp=-2500,this._enabled=!0,this._justDown=!1,this._justUp=!1,k&&(this.onDown.removeAll(),this.onUp.removeAll(),this.onHoldCallback=null,this.onHoldContext=null)}downDuration(k=50){return this.isDown&&this.duration{this.processKeyDown(k)},this._onKeyUp=k=>{this.processKeyUp(k)},this._onKeyPress=k=>{this.processKeyPress(k)},window.addEventListener("keydown",this._onKeyDown,!1),window.addEventListener("keyup",this._onKeyUp,!1),window.addEventListener("keypress",this._onKeyPress,!1),this.active=!0,this.enabled=!0,!0)}stop(){window.removeEventListener("keydown",this._onKeyDown),window.removeEventListener("keyup",this._onKeyUp),window.removeEventListener("keypress",this._onKeyPress),this._onKeyDown=null,this._onKeyUp=null,this._onKeyPress=null,this.active=!1}destroy(){this.stop(),this.clearCaptures();for(let k=0;k0;)this._keys[this._i]&&this._keys[this._i].update()}processKeyDown(k){if(this.event=k,!this.game.input.enabled||!this.enabled)return;const B=k.keyCode;this._capture[B]&&k.preventDefault(),this._keys[B]||(this._keys[B]=new q(B)),this._keys[B].processKeyDown(k),this._k=B,this.onDownCallback&&this.onDownCallback.call(this.callbackContext,k)}processKeyPress(k){this.pressEvent=k,this.game.input.enabled&&this.enabled&&this.onPressCallback&&this.onPressCallback.call(this.callbackContext,String.fromCharCode(k.charCode),k)}processKeyUp(k){if(this.event=k,!this.game.input.enabled||!this.enabled)return;const B=k.keyCode;this._capture[B]&&k.preventDefault(),this._keys[B]||(this._keys[B]=new q(B)),this._keys[B].processKeyUp(k),this.onUpCallback&&this.onUpCallback.call(this.callbackContext,k)}reset(k=!0){this.event=null;let B=this._keys.length;for(;B-- >0;)this._keys[B]&&this._keys[B].reset(k)}downDuration(k,B=50){return this._keys[k]?this._keys[k].downDuration(B):null}upDuration(k,B=50){return this._keys[k]?this._keys[k].upDuration(B):null}justPressed(k){return this._keys[k]?this._keys[k].justPressed():null}justReleased(k){return this._keys[k]?this._keys[k].justReleased():null}isDown(k){return this._keys[k]?this._keys[k].isDown:null}}class Y{addMouseWheelCallback(k){return this.input.mouseWheel.callbacks.push(k)}removeMouseWheelCallback(k){const B=this.input.mouseWheel.callbacks.indexOf(k,0);B>-1&&this.input.mouseWheel.callbacks.splice(B,1)}get wheelDelta(){return this.input.mouseWheel.delta}get game(){return F.W$e.instance.game}get input(){return W.q.instance.game.input}constructor(){this.capture=!1,this.stopOnGameOut=!1,this.callbackContext=this.game}start(){if(F.o5U.isAndroidStockBrowser()&&this.input.touch.active)return!1;if(void 0!==this._onMouseDown)return!1;this._onMouseDown=k=>{this.onMouseDown(k)},this._onMouseMove=k=>{this.onMouseMove(k)},this._onMouseUp=k=>{this.onMouseUp(k)},this._onMouseUpGlobal=k=>{this.onMouseUpGlobal(k)},this._onMouseOutGlobal=k=>{this.onMouseOutGlobal(k)},this._onMouseOut=k=>{this.onMouseOut(k)},this._onMouseOver=k=>{this.onMouseOver(k)};const k=this.game.renderer.events.domElement;return k.addEventListener("mousedown",this._onMouseDown,!0),k.addEventListener("mousemove",this._onMouseMove,!0),k.addEventListener("mouseup",this._onMouseUp,!0),window.addEventListener("mouseup",this._onMouseUpGlobal,!0),window.addEventListener("mouseout",this._onMouseOutGlobal,!0),k.addEventListener("mouseover",this._onMouseOver,!0),k.addEventListener("mouseout",this._onMouseOut,!0),this.active=!0,this.enabled=!0,!0}onMouseDown(k){this.event=k,this.capture&&k.preventDefault(),this.mouseDownCallback&&this.mouseDownCallback.call(this.callbackContext,k),this.input.enabled&&this.enabled&&(k.identifier=0,this.input.mousePointer.start(k))}onMouseMove(k){this.event=k,this.capture&&k.preventDefault(),this.mouseMoveCallback&&this.mouseMoveCallback.call(this.callbackContext,k),this.input.enabled&&this.enabled&&(k.identifier=0,this.input.mousePointer.move(k))}onMouseUp(k){this.event=k,this.capture&&k.preventDefault(),this.mouseUpCallback&&this.mouseUpCallback.call(this.callbackContext,k),this.input.enabled&&this.enabled&&(k.identifier=0,this.input.mousePointer.stop(k))}onMouseUpGlobal(k){this.input.mousePointer.withinGame||(this.mouseUpCallback&&this.mouseUpCallback.call(this.callbackContext,k),k.identifier=0,this.input.mousePointer.stop(k))}onMouseOutGlobal(k){this.event=k,this.capture&&k.preventDefault(),this.input.mousePointer.withinGame=!1,this.input.enabled&&this.enabled&&(this.input.mousePointer.stop(k),this.input.mousePointer.resetButtons())}onMouseOut(k){this.event=k,this.capture&&k.preventDefault(),this.input.mousePointer.withinGame=!1,this.mouseOutCallback&&this.mouseOutCallback.call(this.callbackContext,k),this.input.enabled&&this.enabled&&this.stopOnGameOut&&(k.identifier=0,this.input.mousePointer.stop(k))}onMouseOver(k){this.event=k,this.capture&&k.preventDefault(),this.input.mousePointer.withinGame=!0,this.mouseOverCallback&&this.mouseOverCallback.call(this.callbackContext,k)}stop(){const k=this.game.canvas;k.removeEventListener("mousedown",this._onMouseDown,!0),k.removeEventListener("mousemove",this._onMouseMove,!0),k.removeEventListener("mouseup",this._onMouseUp,!0),k.removeEventListener("mouseover",this._onMouseOver,!0),k.removeEventListener("mouseout",this._onMouseOut,!0),window.removeEventListener("mouseup",this._onMouseUpGlobal,!0),window.removeEventListener("mouseout",this._onMouseOutGlobal,!0),this.active=!1}}class Q{get game(){return F.W$e.instance.game}constructor(){this.active=!1,this.callbacks=[],this.delta=0,this.preventDefault=!0,this.element=this.game.canvas,this.callbackContext=this.game,this.wheelEventName=j.pF.getWheelEventName(),this.boundOnWheelHandler=this.onWheelHandler.bind(this)}start(){return!(!this.wheelEventName||this.active)&&(this.element.addEventListener(this.wheelEventName,this.boundOnWheelHandler,!0),this.active=!0,!0)}stop(){this.active&&(this.element.removeEventListener(this.wheelEventName,this.boundOnWheelHandler,!0),this.active=!1)}onWheelHandler(k){this.preventDefault&&k.preventDefault(),this.delta=F.cj9.clamp(-k.deltaY,-1,1);for(let B=0;B{this.onPointerDown(k)},this._onMSPointerMove=k=>{this.onPointerMove(k)},this._onMSPointerUp=k=>{this.onPointerUp(k)},this._onMSPointerUpGlobal=k=>{this.onPointerUpGlobal(k)},this._onMSPointerOut=k=>{this.onPointerOut(k)},this._onMSPointerOver=k=>{this.onPointerOver(k)};const k=this.game.canvas;return k.addEventListener("MSPointerDown",this._onMSPointerDown,!1),k.addEventListener("MSPointerMove",this._onMSPointerMove,!1),k.addEventListener("MSPointerUp",this._onMSPointerUp,!1),k.addEventListener("pointerdown",this._onMSPointerDown,!1),k.addEventListener("pointermove",this._onMSPointerMove,!1),k.addEventListener("pointerup",this._onMSPointerUp,!1),k.style["-ms-content-zooming"]="none",k.style["-ms-touch-action"]="none",window.addEventListener("MSPointerUp",this._onMSPointerUpGlobal,!0),k.addEventListener("MSPointerOver",this._onMSPointerOver,!0),k.addEventListener("MSPointerOut",this._onMSPointerOut,!0),window.addEventListener("pointerup",this._onMSPointerUpGlobal,!0),k.addEventListener("pointerover",this._onMSPointerOver,!0),k.addEventListener("pointerout",this._onMSPointerOut,!0),this.active=!0,!0}onPointerDown(k){this.input.executeTouchLockCallbacks(!1,k),this.event=k,this.capture&&k.preventDefault(),this.pointerDownCallback&&this.pointerDownCallback.call(this.callbackContext,k),this.input.enabled&&this.enabled&&(k.identifier=k.pointerId,"mouse"===k.pointerType||k.pointerType===X.POINTER_TYPE?this.input.mousePointer.start(k):this.input.startPointer(k))}onPointerMove(k){this.event=k,this.capture&&k.preventDefault(),this.pointerMoveCallback&&this.pointerMoveCallback.call(this.callbackContext,k),this.input.enabled&&this.enabled&&(k.identifier=k.pointerId,"mouse"===k.pointerType||k.pointerType===X.POINTER_TYPE?this.input.mousePointer.move(k):this.input.updatePointer(k))}onPointerUp(k){this.input.executeTouchLockCallbacks(!0,k),this.event=k,this.capture&&k.preventDefault(),this.pointerUpCallback&&this.pointerUpCallback.call(this.callbackContext,k),k.identifier=k.pointerId,"mouse"===k.pointerType||k.pointerType===X.POINTER_TYPE?this.input.mousePointer.stop(k,!this.input.enabled||!this.enabled):this.input.stopPointer(k,!this.input.enabled||!this.enabled)}onPointerUpGlobal(k){if("mouse"!==k.pointerType&&k.pointerType!==X.POINTER_TYPE||this.input.mousePointer.withinGame){const B=this.input.getPointerFromIdentifier(k.identifier);B&&B.withinGame&&this.onPointerUp(k)}else this.onPointerUp(k)}onPointerOut(k){var B;let U;this.event=k,this.capture&&k.preventDefault(),"mouse"===k.pointerType||k.pointerType===X.POINTER_TYPE?this.input.mousePointer.withinGame=!1:(U=this.input.getPointerFromIdentifier(k.identifier),U&&(U.withinGame=!1)),null===(B=this.input.mouse.mouseOutCallback)||void 0===B||B.call(this.input.mouse.callbackContext,k),this.input.enabled&&this.enabled&&this.input.mouse.stopOnGameOut&&(k.identifier=0,U?U.stop(k):this.input.mousePointer.stop(k))}onPointerOver(k){if(this.event=k,this.capture&&k.preventDefault(),"mouse"===k.pointerType||k.pointerType===X.POINTER_TYPE)this.input.mousePointer.withinGame=!0;else{const B=this.input.getPointerFromIdentifier(k.identifier);B&&(B.withinGame=!0)}this.input.mouse.mouseOverCallback&&this.input.mouse.mouseOverCallback.call(this.input.mouse.callbackContext,k)}stop(){const k=this.game.canvas;k.removeEventListener("MSPointerDown",this._onMSPointerDown,!1),k.removeEventListener("MSPointerMove",this._onMSPointerMove,!1),k.removeEventListener("MSPointerUp",this._onMSPointerUp,!1),k.removeEventListener("pointerdown",this._onMSPointerDown,!1),k.removeEventListener("pointermove",this._onMSPointerMove,!1),k.removeEventListener("pointerup",this._onMSPointerUp,!1),window.removeEventListener("MSPointerUp",this._onMSPointerUpGlobal,!0),k.removeEventListener("MSPointerOver",this._onMSPointerOver,!0),k.removeEventListener("MSPointerOut",this._onMSPointerOut,!0),window.removeEventListener("pointerup",this._onMSPointerUpGlobal,!0),k.removeEventListener("pointerover",this._onMSPointerOver,!0),k.removeEventListener("pointerout",this._onMSPointerOut,!0),this.active=!1}}X.POINTER_TYPE=4;class Z{get time(){return W.q.instance.game.time}constructor(k,B){this.event=null,this.isDown=!1,this.isUp=!0,this.timeDown=0,this.timeUp=0,this.altKey=!1,this.shiftKey=!1,this.ctrlKey=!1,this.value=0,this.onDown=new F.HN0,this.onUp=new F.HN0,this.parent=k,this.buttonCode=B}start(k,B){this.isDown||(this.isDown=!0,this.isUp=!1,this.timeDown=this.time.timeMS,this.event=k,this.value=B,k&&(this.altKey=k.altKey,this.shiftKey=k.shiftKey,this.ctrlKey=k.ctrlKey),this.onDown.dispatch(this,B))}stop(k,B){this.isUp||(this.isDown=!1,this.isUp=!0,this.timeUp=this.time.timeMS,this.event=k,this.value=B,k&&(this.altKey=k.altKey,this.shiftKey=k.shiftKey,this.ctrlKey=k.ctrlKey),this.onUp.dispatch(this,B))}startStop(k,B,U){k?this.start(B,U):this.stop(B,U)}justPressed(k=250){return this.isDown&&this.timeDown+k>this.time.timeMS}justReleased(k=250){return this.isUp&&this.timeUp+k>this.time.timeMS}reset(){this.isDown=!1,this.isUp=!0,this.timeDown=this.time.timeMS,this.altKey=!1,this.shiftKey=!1,this.ctrlKey=!1}destroy(){this.onDown.dispose(),this.onUp.dispose(),this.parent=null}get duration(){return this.isUp?-1:this.time.timeMS-this.timeDown}}var J,tt=U(59231);!function(k){k[k.CURSOR=1]="CURSOR",k[k.CONTACT=2]="CONTACT"}(J||(J={}));J.CURSOR,J.CONTACT;class et{get duration(){return this.isUp?-1:this.game.time.timeMS-this.timeDown}get game(){return W.q.instance.game}constructor(k,B){this.exists=!0,this.identifier=0,this._holdSent=!1,this._history=[],this._nextDrop=0,this._stateReset=!1,this.withinGame=!1,this.clientX=-1,this.clientY=-1,this.pageX=-1,this.pageY=-1,this.screenX=-1,this.screenY=-1,this.rawMovementX=0,this.rawMovementY=0,this.movementX=0,this.movementY=0,this.x=-1,this.y=-1,this.isDown=!1,this.isUp=!0,this.timeDown=0,this.timeUp=0,this.previousTapTime=0,this.totalTouches=0,this.msSinceLastClick=Number.MAX_VALUE,this.targetObject=null,this.interactiveCandidates=[],this.active=!1,this.dirty=!1,this.position=new F.I9Y,this.positionDown=new F.I9Y,this.positionUp=new F.I9Y,this.downObject=null,this.circle=new F.jlt(0,0,44),this.worldPosition={x:0,y:0},this.id=k,this.isMouse=0===k,this.pointerMode=F.Aq$.isDefined(B)?B:J.CURSOR|J.CONTACT,this.leftButton=new Z(this,1),this.middleButton=new Z(this,4),this.rightButton=new Z(this,2),this.backButton=new Z(this,8),this.forwardButton=new Z(this,16),this.eraserButton=new Z(this,32)}resetButtons(){this.isDown=!1,this.isUp=!0,this.isMouse&&(this.leftButton.reset(),this.middleButton.reset(),this.rightButton.reset(),this.backButton.reset(),this.forwardButton.reset(),this.eraserButton.reset())}processButtonsDown(k,B){switch(k){case 0:this.leftButton.start(B);break;case 2:this.rightButton.start(B);break;case 1:this.middleButton.start(B);break;case 3:this.backButton.start(B);break;case 4:this.forwardButton.start(B)}}processButtonsUp(k,B){switch(k){case 0:this.leftButton.stop(B);break;case 2:this.rightButton.stop(B);break;case 1:this.middleButton.stop(B);break;case 3:this.backButton.stop(B);break;case 4:this.forwardButton.stop(B)}}processButtonsUpDown(k,B){const U=B.type.toLowerCase().substr(-4),F="down"===U,G="move"===U;void 0!==k?(F&&1===k&&B.ctrlKey&&(k=2),this.leftButton.startStop(Boolean(1&k),B),this.rightButton.startStop(Boolean(2&k),B),this.middleButton.startStop(Boolean(4&k),B),this.backButton.startStop(Boolean(8&k),B),this.forwardButton.startStop(Boolean(16&k),B),this.eraserButton.startStop(Boolean(32&k),B)):void 0!==B.button?F&&B.ctrlKey&&0===B.button?this.rightButton.start(B):F?this.processButtonsDown(B.button,B):G||this.processButtonsUp(B.button,B):F?B.ctrlKey?this.rightButton.start(B):this.leftButton.start(B):(this.leftButton.stop(B),this.rightButton.stop(B))}updateButtons(k){this.button=k.button,this.processButtonsUpDown(k.buttons,k),this.isUp=!0,this.isDown=!1,(this.leftButton.isDown||this.rightButton.isDown||this.middleButton.isDown||this.backButton.isDown||this.forwardButton.isDown||this.eraserButton.isDown)&&(this.isUp=!1,this.isDown=!0)}start(k){const B=this.game.input;return F.Aq$.isDefined(k.pointerId)&&(this.pointerId=k.pointerId),this.identifier=k.identifier,this.target=k.target,this.isMouse?this.updateButtons(k):(this.isDown=!0,this.isUp=!1),this.active=!0,this.withinGame=!0,this.dirty=!1,this._history=[],this.msSinceLastClick=this.game.time.timeMS-this.timeDown,this.timeDown=this.game.time.timeMS,this._holdSent=!1,this.move(k,!0),this.positionDown.set(this.x,this.y),(0===B.multiInputOverride||1===B.multiInputOverride||2===B.multiInputOverride&&0===B.totalActivePointers)&&(B.x=this.x,B.y=this.y,B.position.setTo(this.x,this.y),B.onDown.dispatch(this,k),B.resetSpeed(this.x,this.y)),this._stateReset=!1,this.totalTouches++,null!==this.targetObject&&(this.targetObject._touchedHandler(this),this.downObject=this.targetObject),this}update(){const k=this.game.input;this.active&&(this.updateWorldPosition(),this.dirty&&(this.dirty=!1),!1===this._holdSent&&this.duration>=k.holdRate&&((0===k.multiInputOverride||1===k.multiInputOverride||2===k.multiInputOverride&&0===k.totalActivePointers)&&k.onHold.dispatch(this),this._holdSent=!0),k.recordPointerHistory&&this.game.time.timeMS>=this._nextDrop&&(this._nextDrop=this.game.time.timeMS+k.recordRate,this._history.push({x:this.position.x,y:this.position.y}),this._history.length>k.recordLimit&&this._history.shift()))}updateWorldPosition(){this.worldPosition.x=this.x,this.worldPosition.y=this.y;const k=F.i7d.main;if(k){const B=k.GameObject.transform.worldPosition;this.worldPosition.x=this.x+B.x-k.viewportSize.getHalfWidth(),this.worldPosition.y=this.y+B.y-k.viewportSize.getHalfHeight()}}move(k,B=!1){const U=this.game.input;return U.pollLocked?null:(void 0!==k.button&&(this.button=k.button),this.isMouse&&this.updateButtons(k),this.clientX=k.clientX,this.clientY=k.clientY,this.pageX=k.pageX,this.pageY=k.pageY,this.screenX=k.screenX,this.screenY=k.screenY,this.isMouse&&U.pointerLock.locked&&!B&&(this.rawMovementX=F.Aq$.isDefined(k.movementX)?k.movementX:F.Aq$.isDefined(k.mozMovementX)?k.mozMovementX:F.Aq$.isDefined(k.webkitMovementX)?k.webkitMovementX:0,this.rawMovementY=F.Aq$.isDefined(k.movementY)?k.movementY:F.Aq$.isDefined(k.mozMovementY)?k.mozMovementY:F.Aq$.isDefined(k.webkitMovementY)?k.webkitMovementY:0,this.movementX+=this.rawMovementX,this.movementY+=this.rawMovementY),this.x=(this.pageX-this.game.scale.canvasOffset.x)*U.scale.x,this.y=(this.pageY-this.game.scale.canvasOffset.y)*U.scale.y,this.updateWorldPosition(),this.position.set(this.x,this.y),this.circle.x=this.x,this.circle.y=this.y,(0===U.multiInputOverride||1===U.multiInputOverride||2===U.multiInputOverride&&0===U.totalActivePointers)&&(U.activePointer=this,U.x=this.x,U.y=this.y,U.position.setTo(U.x,U.y),U.circle.x=U.x,U.circle.y=U.y),this.withinGame=this.game.scale.bounds.contains(this.pageX,this.pageY),U.onPointerMove.dispatch(this,this.x,this.y,B,k),null===this.targetObject||this.game.paused||!0!==this.targetObject.isDragged?this.processInteractiveObjects(B):!1===this.targetObject.update(this)&&(this.targetObject=null),this)}processInteractiveObjects(k=!1){var B,U;let F=-1,G=null;const j=[];this.interactiveCandidates=[],this.game.renderer.events.rootBoundary.rootTarget||(this.game.renderer.events.rootBoundary.rootTarget=this.game.stage);const $=this.game.renderer.events.rootBoundary.hitTest(this.x,this.y);let H=null==$?void 0:$.input;if(void 0===H&&(H=null),Math.round(this.x)!==Math.round(this.worldPosition.x)||Math.round(this.y)!==Math.round(this.worldPosition.y)){const k=this.game.renderer.events.rootBoundary.hitTest(this.worldPosition.x,this.worldPosition.y),U=null!==(B=null==k?void 0:k.input)&&void 0!==B?B:null;j.push(U)}j.push(H);for(let V=0;V=0&&this.duration<=$.tapRate))){const B=this.timeUp-this.previousTapTime<$.doubleTapRate;$.onTap.dispatch(this,B,k),this.previousTapTime=this.timeUp}const H="mouseout"===(null===(U=k.type)||void 0===U?void 0:U.toLowerCase());return this.isMouse&&!H?this.updateButtons(k):(this.isDown=!1,this.isUp=!0),this.id>0&&(this.active=!1),this.withinGame=this.game.scale.bounds.contains(k.pageX,k.pageY),this.pointerId=null,this.identifier=null,this.positionUp.set(this.x,this.y),B||(null===(F=this.targetObject)||void 0===F||F._releasedHandler(this),null===(G=this.downObject)||void 0===G||G._releasedHandler(this),null===(j=this.downObject)||void 0===j||j._pointerOutHandler(this)),this.targetObject=null,this.downObject=null,this}justPressed(k){return!0===this.isDown&&this.timeDown+(F.Aq$.isDefined(k)?k:this.game.input.justPressedRate)>this.game.time.timeMS}justReleased(k){return this.isUp&&this.timeUp+(F.Aq$.isDefined(k)?k:this.game.input.justReleasedRate)>this.game.time.timeMS}reset(){!1===this.isMouse&&(this.active=!1),this.pointerId=null,this.identifier=null,this.dirty=!1,this.totalTouches=0,this._holdSent=!1,this._history.length=0,this._stateReset=!0,this.resetButtons(),this.targetObject&&this.targetObject._releasedHandler(this),this.targetObject=null}resetMovement(){this.movementX=0,this.movementY=0}}class it{get game(){return F.W$e.instance.game}constructor(){this.active=!1,this.locked=!1,this.onChange=new F.HN0,this.onError=new F.HN0;const k=this.game.device;this.element=this.game.canvas,this.boundOnChangeHandler=this.onChangeHandler.bind(this),this.boundOnErrorHandler=this.onErrorHandler.bind(this),this.pointerLockElement=k.pointerLockElement,this.pointerlockchange=k.pointerlockchange,this.pointerlockerror=k.pointerlockerror}start(){return!(!j.pF.hasPointerLockSupport()||this.active)&&(this.element.requestPointerLock||(this.element.requestPointerLock=this.element.mozRequestPointerLock||this.element.webkitRequestPointerLock),document.exitPointerLock||(document.exitPointerLock=document.mozExitPointerLock||document.webkitExitPointerLock),document.addEventListener(this.pointerlockchange,this.boundOnChangeHandler,!0),document.addEventListener(this.pointerlockerror,this.boundOnErrorHandler,!0),this.active=!0,!0)}stop(){this.active&&(document.removeEventListener(this.pointerlockchange,this.boundOnChangeHandler,!0),document.removeEventListener(this.pointerlockerror,this.boundOnErrorHandler,!0),this.active=!1)}request(){this.active&&!this.locked&&this.element.requestPointerLock()}exit(){document.exitPointerLock()}onChangeHandler(k){this.locked=document[this.pointerLockElement]===this.element,this.onChange.dispatch(this.locked,k)}onErrorHandler(k){this.onError.dispatch(k)}cleanUp(){this.onChange.dispose(),this.onError.dispose()}}class st{get game(){return F.W$e.instance.game}constructor(){this.active=!1,this.enabled=!0,this.callbackContext=this.game}start(){return!!j.pF.hasTouchSupport()&&(void 0===this._onTouchStart&&(this._onTouchStart=this.onTouchStart.bind(this),this._onTouchMove=this.onTouchMove.bind(this),this._onTouchEnd=this.onTouchEnd.bind(this),this._onTouchEnter=this.onTouchEnter.bind(this),this._onTouchLeave=this.onTouchLeave.bind(this),this._onTouchCancel=this.onTouchCancel.bind(this),this.game.canvas.addEventListener("touchstart",this._onTouchStart,!1),this.game.canvas.addEventListener("touchmove",this._onTouchMove,!1),this.game.canvas.addEventListener("touchend",this._onTouchEnd,!1),this.game.canvas.addEventListener("touchcancel",this._onTouchCancel,!1),this.game.canvas.addEventListener("touchenter",this._onTouchEnter,!1),this.game.canvas.addEventListener("touchleave",this._onTouchLeave,!1),this.active=!0,!0))}consumeDocumentTouches(){this._documentTouchMove=k=>{k.preventDefault()},document.addEventListener("touchmove",this._documentTouchMove,!1)}onTouchStart(k){if(this.game.input.executeTouchLockCallbacks(!1,k),this.event=k,this.game.input.enabled&&this.enabled){this.touchStartCallback&&this.touchStartCallback.call(this.callbackContext,k),this.preventDefault&&k.preventDefault();for(let B=0;B0&&this._pollCounter=nt.MAX_POINTERS)return null;const k=this.pointers.length+1,B=new et(k,J.CONTACT);return this.pointers.push(B),this[`pointer${k}`]=B,B}update(){if(this.keyboard&&this.keyboard.update(),this.pollLocked)this._pollCounter++;else{this.speed.x=this.position.x-this._oldPosition.x,this.speed.y=this.position.y-this._oldPosition.y,this._oldPosition.copyFrom(this.position),this.mousePointer.update();for(let k=0;k=0&&this.countActivePointers(this.maxPointers)>=this.maxPointers)return null;if(!this.pointer1.active)return this.pointer1.start(k);if(!this.pointer2.active)return this.pointer2.start(k);for(let U=2;U0;F++)B=this.pointers[F],B.active&&U--;return k-U}getPointer(k=!1){let B;for(let U=0;U$.m.isInputEnabled(U),set:k=>{$.m.setInputEnabled(U,k,U),U.cursor=k?"pointer":"auto"},configurable:!0}),U.inputEnabled=B}}nt.MAX_POINTERS=10},59231:(k,B,U)=>{"use strict";U.d(B,{l:()=>W,q:()=>F});var F,G=U(62459),j=U(88225),$=U(68910),H=U(35120),V=U(15521);!function(k){k[k.Default=0]="Default",k[k.Shape=1]="Shape",k[k.Passthrough=2]="Passthrough"}(F||(F={}));class W{get game(){return H.q.instance.game}constructor(k){this.enabled=!1,this.checked=!1,this.priorityID=0,this.attachToCamera=!0,this.useHandCursor=!1,this._setHandCursor=!1,this.isDragged=!1,this.allowHorizontalDrag=!0,this.allowVerticalDrag=!0,this.bringToTop=!1,this.snapOffset=null,this.snapOnDrag=!1,this.snapOnRelease=!1,this.snapX=0,this.snapY=0,this.snapOffsetX=0,this.snapOffsetY=0,this.draggable=!1,this.boundsRect=null,this.boundsSprite=null,this.dragOffset=new G.I9Y,this.dragFromCenter=!1,this.dragStopBlocksInputUp=!1,this.dragStartPoint=new G.I9Y,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this.downPoint=new G.I9Y,this.snapPoint=new G.I9Y,this._dragPoint=new G.I9Y,this._dragPhase=!1,this._pendingDrag=!1,this._dragTimePass=!1,this._dragDistancePass=!1,this._wasEnabled=!1,this._pointerData=[],this.sprite=k,this._pointerData.push({id:0,x:0,y:0,camX:0,camY:0,isDown:!1,isUp:!1,isOver:!1,isOut:!1,timeOver:0,timeOut:0,timeDown:0,timeUp:0,downDuration:0,isDragged:!1}),this._pointerData.push({id:0,x:0,y:0,camX:0,camY:0,isDown:!1,isUp:!1,isOver:!1,isOut:!1,timeOver:0,timeOut:0,timeDown:0,timeUp:0,downDuration:0,isDragged:!1})}getHandlerType(){return F.Default}start(k=0,B=!1){if(!1===this.enabled){this.useHandCursor=B,this.priorityID=k;for(let k=0;k<10;k++)this._pointerData[k]={id:k,x:0,y:0,isDown:!1,isUp:!1,isOver:!1,isOut:!1,timeOver:0,timeOut:0,timeDown:0,timeUp:0,downDuration:0,isDragged:!1};this.snapOffset=new G.I9Y,this.enabled=!0,this.sprite.eventMode="static",this._wasEnabled=!0}return this.sprite.events.onAddedToGroup.add(this.addedToGroup,this),this.sprite.events.onRemovedFromGroup.add(this.removedFromGroup,this),this.sprite}addedToGroup(){this._dragPhase||this._wasEnabled&&!this.enabled&&this.start()}removedFromGroup(){this._dragPhase||(this.enabled?(this._wasEnabled=!0,this.stop()):this._wasEnabled=!1)}reset(){this.enabled=!1,this.sprite.eventMode="none";for(let k=0;k<10;k++)this._pointerData[k]={id:k,x:0,y:0,isDown:!1,isUp:!1,isOver:!1,isOut:!1,timeOver:0,timeOut:0,timeDown:0,timeUp:0,downDuration:0,isDragged:!1}}stop(){!1!==this.enabled&&(this.enabled=!1,this.sprite.eventMode="none")}destroy(){this.enabled=!1,this.sprite&&(this._setHandCursor&&(this.game.canvas.style.cursor="",this._setHandCursor=!1),this.sprite.eventMode="none",this._pointerData.length=0,this.boundsRect=null,this.boundsSprite=null,this.sprite=null)}validForInput(k){var B,U;return!(!(this.enabled&&this.sprite&&this.sprite.transform&&0!==(null===(B=this.sprite.worldScale)||void 0===B?void 0:B.x)&&0!==(null===(U=this.sprite.worldScale)||void 0===U?void 0:U.y))||this.priorityID=k}pointerX(k=0){return this._pointerData[k].x}pointerY(k=0){return this._pointerData[k].y}pointerDown(k=0){var B,U;return null!==(U=null===(B=this._pointerData[k])||void 0===B?void 0:B.isDown)&&void 0!==U&&U}pointerUp(k=0){var B,U;return null!==(U=null===(B=this._pointerData[k])||void 0===B?void 0:B.isUp)&&void 0!==U&&U}pointerTimeDown(k=0){return this._pointerData[k].timeDown}pointerTimeUp(k=0){return this._pointerData[k].timeUp}pointerOver(k=0){var B,U,F;if(!this.enabled)return!1;if(void 0===k){for(let k=0;k<10;k++)if(null===(B=this._pointerData[k])||void 0===B?void 0:B.isOver)return!0;return!1}return null!==(F=null===(U=this._pointerData[k])||void 0===U?void 0:U.isOver)&&void 0!==F&&F}pointerOut(k=0){if(!this.enabled)return!1;if(void 0!==k)return this._pointerData[k].isOut;for(let B=0;B<10;B++)if(this._pointerData[B].isOut)return!0}pointerTimeOver(k=0){return this._pointerData[k].timeOver}pointerTimeOut(k=0){return this._pointerData[k].timeOut}pointerDragged(k=0){return this._pointerData[k].isDragged}checkPointerDown(k){var B,U,F;if(!(k&&k.isDown&&this.enabled&&(null===(B=this.sprite)||void 0===B?void 0:B.parent)&&this.sprite.visible&&this.sprite.parent.visible&&0!==(null===(U=this.sprite.worldScale)||void 0===U?void 0:U.x)&&0!==(null===(F=this.sprite.worldScale)||void 0===F?void 0:F.y)))return!1;const G=this.attachToCamera?k.position:k.worldPosition;return this.game.input.hitTest(this.sprite,G)}checkPointerOver(k){var B,U,F;if(!(this.enabled&&(null===(B=this.sprite)||void 0===B?void 0:B.parent)&&this.sprite.visible&&this.sprite.parent.visible&&0!==(null===(U=this.sprite.worldScale)||void 0===U?void 0:U.x)&&0!==(null===(F=this.sprite.worldScale)||void 0===F?void 0:F.y)))return!1;const G=this.attachToCamera?k.position:k.worldPosition;return this.game.input.hitTest(this.sprite,G)}update(k){var B,U;return!!(null===(B=this.sprite)||void 0===B?void 0:B.parent)&&(this.enabled&&this.sprite.visible&&this.sprite.parent.visible?this._pendingDrag?(this._dragDistancePass||(this._dragDistancePass=G.cj9.distance(k.x,k.y,this.downPoint.x,this.downPoint.y)>=this.dragDistanceThreshold),this._dragDistancePass&&this._dragTimePass&&this.startDrag(k),!0):this.draggable&&this._draggedPointerID===k.id?this.updateDrag(k,!1):!!(null===(U=this._pointerData[k.id])||void 0===U?void 0:U.isOver)&&(this.checkPointerOver(k)?(this._pointerData[k.id].x=k.x-this.sprite.x,this._pointerData[k.id].y=k.y-this.sprite.y,!0):(this._pointerOutHandler(k),!1)):(this._pointerOutHandler(k),!1))}_pointerOverHandler(k,B=!1){var U,F,G,j,$;if(null===this.sprite)return;const H=this._pointerData[k.id];if(H&&(!1===H.isOver||k.dirty)){const V=!1===H.isOver;H.isOver=!0,H.isOut=!1,H.timeOver=this.game.time.timeMS,H.x=k.x-this.sprite.x,H.y=k.y-this.sprite.y,this.useHandCursor&&!1===H.isDragged&&(this.game.canvas.style.cursor="pointer",this._setHandCursor=!0),!B&&V&&this.sprite&&(null===(U=this.sprite.events)||void 0===U||U.onInputOver.dispatch(this.sprite,k),null===($=null===(j=null===(G=null===(F=this.sprite)||void 0===F?void 0:F._events)||void 0===G?void 0:G.pointerover)||void 0===j?void 0:j.fn)||void 0===$||$.call(j,this.getMouseEvent(k))),this.sprite.parent&&this.sprite.parent.onChildInputOver&&this.sprite.parent.onChildInputOver.dispatch(this.sprite,k)}}getMouseEvent(k){return{data:{isPrimary:0===k.button||1===k.id,global:{x:k.x,y:k.y}},stopPropagation:()=>{}}}_pointerOutHandler(k,B=!1){var U,F,G,j,$;if(null===this.sprite)return;const H=this._pointerData[k.id];H&&(H.isOver=!1,H.isOut=!0,H.timeOut=this.game.time.timeMS,this.useHandCursor&&!1===H.isDragged&&(this.game.canvas.style.cursor="",this._setHandCursor=!1),!B&&this.sprite&&(null===(U=this.sprite.events)||void 0===U||U.onInputOut.dispatch(this.sprite,k),null===($=null===(j=null===(G=null===(F=this.sprite)||void 0===F?void 0:F._events)||void 0===G?void 0:G.pointerout)||void 0===j?void 0:j.fn)||void 0===$||$.call(j,this.getMouseEvent(k)),this.sprite&&this.sprite.parent&&this.sprite.parent.onChildInputOut&&this.sprite.parent.onChildInputOut.dispatch(this.sprite,k)))}_touchedHandler(k){var B,U,F,G,$;if(null===this.sprite)return;const H=this._pointerData[k.id];if(H&&!H.isDown&&H.isOver){if(H.isDown=!0,H.isUp=!1,H.timeDown=this.game.time.timeMS,this.downPoint.set(k.x,k.y),k.dirty=!0,this.sprite){{const k=[];let B=this.sprite.parent;for(;B;)k.unshift(B.name),B=B.parent;j.addBreadcrumb({category:"ui.click",message:k.join(" > ")})}if(null===(B=this.sprite.events)||void 0===B||B.onInputDown.dispatch(this.sprite,k),null===($=null===(G=null===(F=null===(U=this.sprite)||void 0===U?void 0:U._events)||void 0===F?void 0:F.pointerdown)||void 0===G?void 0:G.fn)||void 0===$||$.call(G,this.getMouseEvent(k)),this.sprite&&this.sprite.parent&&this.sprite.parent.onChildInputDown&&this.sprite.parent.onChildInputDown.dispatch(this.sprite,k),null===this.sprite)return}this.draggable&&!1===this.isDragged&&(0===this.dragTimeThreshold&&0===this.dragDistanceThreshold?this.startDrag(k):(this._pendingDrag=!0,this._dragDistancePass=0===this.dragDistanceThreshold,this.dragTimeThreshold>0?(this._dragTimePass=!1,this.game.time.events.addTimer(this.dragTimeThreshold,this.dragTimeElapsed,this,k)):this._dragTimePass=!0)),this.bringToTop&&V.Z.bringToTop(this.sprite)}}dragTimeElapsed(k){this._dragTimePass=!0,this._pendingDrag&&this.sprite&&this._dragDistancePass&&this.startDrag(k)}_releasedHandler(k){var B,U,F,j,$,H,V,W,q;if(null===this.sprite)return;const K=this._pointerData[k.id];if(K&&K.isDown&&k.isUp){K.isDown=!1,K.isUp=!0,K.timeUp=this.game.time.timeMS,K.downDuration=K.timeUp-K.timeDown;let z=this.checkPointerOver(k);this.sprite&&(this.dragStopBlocksInputUp&&(!this.dragStopBlocksInputUp||this.draggable&&this.isDragged&&this._draggedPointerID===k.id)||null===(B=this.sprite.events)||void 0===B||B.onInputUp.dispatch(this.sprite,k,z),null===($=null===(j=null===(F=null===(U=this.sprite)||void 0===U?void 0:U._events)||void 0===F?void 0:F.pointerup)||void 0===j?void 0:j.fn)||void 0===$||$.call(j,this.getMouseEvent(k)),G.o5U.isMobile()&&(null===(q=null===(W=null===(V=null===(H=this.sprite)||void 0===H?void 0:H._events)||void 0===V?void 0:V.pointerout)||void 0===W?void 0:W.fn)||void 0===q||q.call(W,this.getMouseEvent(k))),this.sprite&&this.sprite.parent&&this.sprite.parent.onChildInputUp&&this.sprite.parent.onChildInputUp.dispatch(this.sprite,k,z),z&&(z=this.checkPointerOver(k))),K.isOver=z,!z&&this.useHandCursor&&(this.game.canvas.style.cursor="default",this._setHandCursor=!1),k.dirty=!0,this._pendingDrag=!1,this.draggable&&this.isDragged&&this._draggedPointerID===k.id&&this.stopDrag(k)}}updateDrag(k,B=!1){var U,F,j,H;const V=this.dragOffset,W=this._dragPoint,q=this._pointerData[k.id],K=this.snapPoint,z=this.sprite,Y=z instanceof $.Graphics;if(!("texture"in z)&&!Y)return G.VyI.log("Error: Sprite does not implement IImage",G.$bb.Error),!1;if(k.isUp)return this.stopDrag(k),!1;const Q=this.globalToLocal(k),X=Q.x+W.x+V.x,Z=Q.y+W.y+V.y;let J,tt;if(z.fixedToCamera){const k=z.cameraOffset,B=k.x,j=k.y,$=null!==(F=null===(U=this.game.stage.camera)||void 0===U?void 0:U.GameObject.transform.worldPosition)&&void 0!==F?F:G.I9Y.ZERO;this.allowHorizontalDrag&&(k.x=X-$.x),this.allowVerticalDrag&&(k.y=Z-$.y),this.boundsRect&&this.checkBoundsRect(),this.boundsSprite&&this.checkBoundsSprite(),this.snapOnDrag&&(k.x=Math.round((k.x-this.snapOffsetX%this.snapX)/this.snapX)*this.snapX+this.snapOffsetX%this.snapX,k.y=Math.round((k.y-this.snapOffsetY%this.snapY)/this.snapY)*this.snapY+this.snapOffsetY%this.snapY,K.setTo(k.x,k.y)),J=k.x-B,tt=k.y-j}else{const k=null!==(H=null===(j=this.game.stage.camera)||void 0===j?void 0:j.GameObject.transform.worldPosition)&&void 0!==H?H:G.I9Y.ZERO,B=k.x-q.camX,U=k.y-q.camY,F=z.x,$=z.y;this.allowHorizontalDrag&&(z.x=X+B),this.allowVerticalDrag&&(z.y=Z+U),this.boundsRect&&this.checkBoundsRect(),this.boundsSprite&&this.checkBoundsSprite(),this.snapOnDrag&&(z.x=Math.round((z.x-this.snapOffsetX%this.snapX)/this.snapX)*this.snapX+this.snapOffsetX%this.snapX,z.y=Math.round((z.y-this.snapOffsetY%this.snapY)/this.snapY)*this.snapY+this.snapOffsetY%this.snapY,K.setTo(z.x,z.y)),J=z.x-F,tt=z.y-$}return this.sprite.events.onDragUpdate.dispatch(z,k,X,Z,K,B,J,tt),!0}justOver(k=0,B=500){return!!this._pointerData[k]&&(this._pointerData[k].isOver&&this.overDuration(k)this.boundsRect.right&&(this.sprite.cameraOffset.x=this.boundsRect.right-this.sprite.width),this.sprite.cameraOffset.ythis.boundsRect.bottom&&(this.sprite.cameraOffset.y=this.boundsRect.bottom-this.sprite.height);else{const k=this.sprite.getBounds();k.leftthis.boundsRect.right&&(this.sprite.x=this.boundsRect.right-(this.sprite.width-this.sprite.getOffsetX())),k.topthis.boundsRect.bottom&&(this.sprite.y=this.boundsRect.bottom-(this.sprite.height-this.sprite.getOffsetY()))}}checkBoundsSprite(){if(this.sprite.fixedToCamera&&this.boundsSprite.fixedToCamera)this.sprite.cameraOffset.xthis.boundsSprite.cameraOffset.x+this.boundsSprite.width&&(this.sprite.cameraOffset.x=this.boundsSprite.cameraOffset.x+this.boundsSprite.width-this.sprite.width),this.sprite.cameraOffset.ythis.boundsSprite.cameraOffset.y+this.boundsSprite.height&&(this.sprite.cameraOffset.y=this.boundsSprite.cameraOffset.y+this.boundsSprite.height-this.sprite.height);else{const k=this.sprite.getBounds();k.leftthis.boundsSprite.right&&(this.sprite.x=this.boundsSprite.right-(this.sprite.width-this.sprite.getOffsetX())),k.topthis.boundsSprite.bottom&&(this.sprite.y=this.boundsSprite.bottom-(this.sprite.height-this.sprite.getOffsetY()))}}}},60881:(k,B,U)=>{"use strict";U.d(B,{D:()=>F});class F{}F.A="A".charCodeAt(0),F.B="B".charCodeAt(0),F.C="C".charCodeAt(0),F.D="D".charCodeAt(0),F.E="E".charCodeAt(0),F.F="F".charCodeAt(0),F.G="G".charCodeAt(0),F.H="H".charCodeAt(0),F.I="I".charCodeAt(0),F.J="J".charCodeAt(0),F.K="K".charCodeAt(0),F.L="L".charCodeAt(0),F.M="M".charCodeAt(0),F.N="N".charCodeAt(0),F.O="O".charCodeAt(0),F.P="P".charCodeAt(0),F.Q="Q".charCodeAt(0),F.R="R".charCodeAt(0),F.S="S".charCodeAt(0),F.T="T".charCodeAt(0),F.U="U".charCodeAt(0),F.V="V".charCodeAt(0),F.W="W".charCodeAt(0),F.X="X".charCodeAt(0),F.Y="Y".charCodeAt(0),F.Z="Z".charCodeAt(0),F.ZERO="0".charCodeAt(0),F.ONE="1".charCodeAt(0),F.TWO="2".charCodeAt(0),F.THREE="3".charCodeAt(0),F.FOUR="4".charCodeAt(0),F.FIVE="5".charCodeAt(0),F.SIX="6".charCodeAt(0),F.SEVEN="7".charCodeAt(0),F.EIGHT="8".charCodeAt(0),F.NINE="9".charCodeAt(0),F.NUMPAD_0=96,F.NUMPAD_1=97,F.NUMPAD_2=98,F.NUMPAD_3=99,F.NUMPAD_4=100,F.NUMPAD_5=101,F.NUMPAD_6=102,F.NUMPAD_7=103,F.NUMPAD_8=104,F.NUMPAD_9=105,F.NUMPAD_MULTIPLY=106,F.NUMPAD_ADD=107,F.NUMPAD_ENTER=108,F.NUMPAD_SUBTRACT=109,F.NUMPAD_DECIMAL=110,F.NUMPAD_DIVIDE=111,F.F1=112,F.F2=113,F.F3=114,F.F4=115,F.F5=116,F.F6=117,F.F7=118,F.F8=119,F.F9=120,F.F10=121,F.F11=122,F.F12=123,F.F13=124,F.F14=125,F.F15=126,F.COLON=186,F.EQUALS=187,F.COMMA=188,F.UNDERSCORE=189,F.PERIOD=190,F.QUESTION_MARK=191,F.TILDE=192,F.OPEN_BRACKET=219,F.BACKWARD_SLASH=220,F.CLOSED_BRACKET=221,F.QUOTES=222,F.BACKSPACE=8,F.TAB=9,F.CLEAR=12,F.ENTER=13,F.SHIFT=16,F.CONTROL=17,F.ALT=18,F.CAPS_LOCK=20,F.ESC=27,F.SPACEBAR=32,F.PAGE_UP=33,F.PAGE_DOWN=34,F.END=35,F.HOME=36,F.LEFT=37,F.UP=38,F.RIGHT=39,F.DOWN=40,F.PLUS=43,F.MINUS=44,F.INSERT=45,F.DELETE=46,F.HELP=47,F.NUM_LOCK=144,F.BACK_QUOTE=192},49237:(k,B,U)=>{"use strict";U.d(B,{$:()=>H});var F=U(8674),G=U(62459),j=U(12808),$=U(76974);let H=class extends j.u{constructor(){super(...arguments),this.onClick=new G.HN0,this.onEnabledClick=new G.HN0,this.onDisabledClick=new G.HN0}onUp(k,B,U){if(!this.shouldDebounce()){if(this._lastClickTime=Date.now(),this.currentState===$.K.Down&&U){const k=[];k.push(this.onClick.dispatchAsync()),this.getButtonState()===$.K.Down?k.push(this.onEnabledClick.dispatchAsync()):this.getButtonState()===$.K.Disabled&&k.push(this.onDisabledClick.dispatchAsync()),this.awaitingListeners=!0,Promise.all(k).catch(G.RQr.createHandler("Rejected promise in Button.onUp")).finally((()=>{var k,B;null===(B=null===(k=this.gameObject)||void 0===k?void 0:k.isDestroyed)||void 0===B||B||(this.awaitingListeners=!1)}))}super.onUp(k,B,U)}}onDown(k,B){this.shouldDebounce()||super.onDown(k,B)}destroy(){this.onClick.dispose(),this.onEnabledClick.dispose(),this.onDisabledClick.dispose(),super.destroy()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onClick",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onEnabledClick",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onDisabledClick",void 0),H=(0,F.Cg)([(0,G.EVk)("Button",G.YH6.ui)],H)},12808:(k,B,U)=>{"use strict";U.d(B,{u:()=>V});var F=U(8674),G=U(62459),j=U(76974),$=U(56163),H=U(13930);class V extends $.t{constructor(){super(...arguments),this._transition=null,this._currentState=V.DEFAULT_STATE,this._isTransitionLocked=!1,this._awaitingListeners=!1,this._lastClickTime=0}get transition(){return this._transition}set awaitingListeners(k){this._awaitingListeners=k,this.applyCurrentState()}get currentState(){return this._currentState}set currentState(k){const B=this._currentState;this._currentState=k,this.onStateChanged(this._currentState,B)}postCreate(){super.postCreate(),this.applyCurrentState(),G.Aq$.isDefined(this._initialLockedState)&&this.lockState(this._initialLockedState)}update(){super.update(),this._delayedLockState&&(this.lockState(this._delayedLockState),this._delayedLockState=null)}shouldDebounce(){return this.debounceTimeMs>0&&Date.now(){"use strict";var F;U.d(B,{K:()=>F}),function(k){k[k.Over=0]="Over",k[k.Down=1]="Down",k[k.Up=2]="Up",k[k.Disabled=3]="Disabled"}(F||(F={}))},24519:(k,B,U)=>{"use strict";U.d(B,{v:()=>V});var F,G=U(8674),j=U(62459),$=U(76974),H=U(13930);let V=F=class extends H.e{constructor(){super(...arguments),this._upStateObject=null,this._downStateObject=null,this._overStateObject=null,this._disabledStateObject=null,this.currentStateObject=null,this.avoidEmptyStates=!1}postCreate(){super.postCreate(),this._upStateObject&&(this._upStateObject.active=!1),this._downStateObject&&(this._downStateObject.active=!1),this._overStateObject&&(this._overStateObject.active=!1),this._disabledStateObject&&(this._disabledStateObject.active=!1),this.currentStateObject&&(this.currentStateObject.active=!0)}update(){var k;super.update(),!(null===(k=this.currentStateObject)||void 0===k?void 0:k.activeInHierarchy)&&this.avoidEmptyStates&&(this.currentStateObject=this.getStateObject(F.DEFAULT_STATE),this.currentStateObject&&this.gameObject.onActiveInHierarchyChanged.dispatch())}setState(k){this.currentStateObject&&(this.currentStateObject.active=!1),this.currentStateObject=this.getStateObject(k),this.currentStateObject?this.currentStateObject.active=!0:this.avoidEmptyStates&&(this.currentStateObject=this.getStateObject(F.DEFAULT_STATE),this.currentStateObject&&(this.currentStateObject.active=!0))}getStateObject(k){switch(k){case $.K.Up:return this._upStateObject;case $.K.Down:return this._downStateObject;case $.K.Over:return this._overStateObject;case $.K.Disabled:return this._disabledStateObject;default:return null}}};V.DEFAULT_STATE=$.K.Up,(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],V.prototype,"_upStateObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],V.prototype,"_downStateObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],V.prototype,"_overStateObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],V.prototype,"_disabledStateObject",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],V.prototype,"avoidEmptyStates",void 0),V=F=(0,G.Cg)([(0,j.EVk)("GameObjectTransition",j.YH6.transition)],V)},56163:(k,B,U)=>{"use strict";U.d(B,{t:()=>$});var F=U(8674),G=U(62459),j=U(35120);let $=class extends G.y4o{constructor(){super(...arguments),this._collisionBox=null,this._root=null,this._interactableStartupValues={events:new G.sVA(null)},this._size=new G.or0}get inputEnabled(){return!!this._collisionBox&&this._collisionBox.inputEnabled}set inputEnabled(k){this._collisionBox?(this._collisionBox.inputEnabled=k,this.applyUseHandCursorSetting(this._collisionBox,this.useHandCursor)):this._interactableStartupValues.inputEnable=k}get useHandCursor(){return!(!this._collisionBox||!this._collisionBox.input)&&this._collisionBox.input.useHandCursor}set useHandCursor(k){this._collisionBox?this.applyUseHandCursorSetting(this._collisionBox,k):this._interactableStartupValues.useHandCursor=k}get onInputDown(){return this.getCurrentEvents().onInputDown}get onInputUp(){return this.getCurrentEvents().onInputUp}get onInputOver(){return this.getCurrentEvents().onInputOver}get onInputOut(){return this.getCurrentEvents().onInputOut}getCurrentEvents(){return this._collisionBox?this._collisionBox.events:this._interactableStartupValues.events}create(){super.create();const k=this.getCollisionBox().events;k.onInputDown.add(this.onDown,this),k.onInputUp.add(this.onUp,this),k.onInputOver.add(this.onOver,this),k.onInputOut.add(this.onOut,this),G.Aq$.isDefined(this._interactableStartupValues.inputEnable)&&(this.inputEnabled=this._interactableStartupValues.inputEnable),G.Aq$.isDefined(this._interactableStartupValues.useHandCursor)&&this.applyUseHandCursorSetting(this._collisionBox,this._interactableStartupValues.useHandCursor),this.updateCollisionBox(),this.destroyStartupValues()}setInputPriority(k){const B=this.getCollisionBox();B&&(B.input.priorityID=k)}isInputTarget(k){var B;return(null===(B=k.interactiveCandidates)||void 0===B?void 0:B.length)>0&&k.interactiveCandidates[k.interactiveCandidates.length-1].sprite===this.getCollisionBox()}destroy(){var k;if(this._collisionBox){const k=this._collisionBox.events;k&&(k.onInputDown.removeAll(this),k.onInputUp.removeAll(this),k.onInputOver.removeAll(this),k.onInputOut.removeAll(this)),this._collisionBox.destroy&&this._collisionBox.destroy()}this._collisionBox=null,this.destroyStartupValues(),null===(k=this._root)||void 0===k||k.destroy(),super.destroy()}destroyStartupValues(){this._interactableStartupValues&&(this._interactableStartupValues.events&&this._interactableStartupValues.events.destroy(),this._interactableStartupValues.events=null,this._interactableStartupValues=null)}getDimensions(){const k=this._collisionBox&&!this._collisionBox._destroyed,B=k?this._collisionBox.width:0,U=k?this._collisionBox.height:0;return this._size.setTo(B,U),this._size}getCollisionBox(k=!0){return k&&!this._collisionBox&&this.createInternalCollisionBox(),this._collisionBox}onDown(k,B){}onUp(k,B,U){}onOver(k,B){}onOut(k,B){}applyUseHandCursorSetting(k,B){(null==k?void 0:k.input)&&(k.input.useHandCursor=B)}createInternalCollisionBox(){var k;this._root=j.q.instance.game.add.group(void 0,null===(k=this.gameObject)||void 0===k?void 0:k.name),this.setRootContainer(this._root),this._collisionBox=j.q.instance.game.add.sprite(0,0,"","",this._root);const B=this._collisionBox.events;this._interactableStartupValues.events.parent=this._collisionBox.events.parent,this._collisionBox.events=this._interactableStartupValues.events,this._interactableStartupValues.events=B,this._collisionBox.width=10,this._collisionBox.height=10,this._collisionBox.alpha=0,this._collisionBox.inputEnabled=!0}updateCollisionBox(){const k=this.getCollisionBox();if(this.GameObject.legacyTransform){const B=this.GameObject.legacyTransform;k.width=B.width,k.height=B.height}k.inputEnabled=this.inputEnabled,this.applyUseHandCursorSetting(k,this.useHandCursor)}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean),(0,F.Sn)("design:paramtypes",[Boolean])],$.prototype,"inputEnabled",null),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean),(0,F.Sn)("design:paramtypes",[Boolean])],$.prototype,"useHandCursor",null),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0),(0,F.Sn)("design:paramtypes",[])],$.prototype,"onInputDown",null),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0),(0,F.Sn)("design:paramtypes",[])],$.prototype,"onInputUp",null),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0),(0,F.Sn)("design:paramtypes",[])],$.prototype,"onInputOver",null),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0),(0,F.Sn)("design:paramtypes",[])],$.prototype,"onInputOut",null),$=(0,F.Cg)([(0,G.EVk)("Interactable",G.YH6.input)],$)},54422:(k,B,U)=>{"use strict";U.d(B,{E:()=>$});var F=U(8674),G=U(62459),j=U(35120);let $=class extends G.uAl{constructor(){super(...arguments),this._enableContinuousPress=!1,this._onKeyDown=new G.HN0,this._isEnabled=!0}get onKeyDown(){return this._onKeyDown}create(){super.create(),G.Aq$.isDefined(this._keyCode)&&this.initialize(this._keyCode,null,this._enableContinuousPress)}initialize(k,B=null,U=!1){this._keyCode=k,B&&this._onKeyDown.add(B),this._onKeyHandler=()=>{this._isEnabled&&this.GameObject.active&&this._onKeyDown.dispatch()},this._key=j.q.instance.game.input.keyboard.addKey(this._keyCode),this._key.onDown.add(this._onKeyHandler,this),this._enableContinuousPress=U,this._enableContinuousPress&&(this.update=()=>{this._key.isDown&&this._onKeyHandler()})}setEnabled(k){this._isEnabled=k}destroy(){this._key&&(this._key.onDown.remove(this._onKeyHandler,this),this._onKeyHandler=null,this._onKeyDown.dispose()),super.destroy()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],$.prototype,"_keyCode",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_enableContinuousPress",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"_onKeyDown",void 0),$=(0,F.Cg)([(0,G.EVk)("KeyListener",G.YH6.input)],$)},83133:(k,B,U)=>{"use strict";U.d(B,{l:()=>V});var F=U(8674),G=U(62459),j=U(11647),$=U(12808),H=U(76974);let V=class extends((0,j.o)($.u)){constructor(){super(...arguments),this._autoAddToParentGroup=!1,this.onSelected=this.createTidySignal(),this.onSelectedStatusChanged=this.createTidySignal(),this.onUnselected=this.createTidySignal(),this.onLockedClick=this.createTidySignal(),this.onSelectedLockedClick=this.createTidySignal(),this._selected=!1,this._isSelectionLocked=!1}get isSelectionLocked(){return this._isSelectionLocked}set isSelectionLocked(k){this._isSelectionLocked=k}setSelected(k){this._selected=k,this.onSelectedStatusChanged.dispatch(k),this.applyCurrentState()}isSelected(){return this._selected}onUp(k,B,U){this.shouldDebounce()||(this._lastClickTime=Date.now(),this.currentState===H.K.Down&&U&&(this._isSelectionLocked?this.onSelectedLockedClick.dispatch():(this.isStateLocked()&&this.onLockedClick.dispatch(),this.isStateLocked()&&this.getLockedState()===H.K.Disabled||(this.dispatchFromReverseState(),this.setSelected(!this.isSelected())))),super.onUp(k,B,U))}dispatchFromCurrentState(){this._isSelectionLocked?this.onSelectedLockedClick.dispatch():this._selected?this.onSelected.dispatch():this.onUnselected.dispatch()}dispatchFromReverseState(){this._selected?this.onUnselected.dispatch():this.onSelected.dispatch()}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_autoAddToParentGroup",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onSelected",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onSelectedStatusChanged",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onUnselected",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onLockedClick",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onSelectedLockedClick",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_selected",void 0),V=(0,F.Cg)([(0,G.EVk)("Toggle",G.YH6.ui)],V)},94566:(k,B,U)=>{"use strict";U.d(B,{O:()=>H});var F=U(8674),G=U(62459),j=U(11647),$=U(83133);let H=class extends((0,j.o)(G.uAl)){constructor(){super(...arguments),this.autoAddChildren=!1,this.allowMultiSelect=!1,this.allowNoSelection=!1,this.toggleObjects=[],this.defaultIndex=[],this.onSelectedLockedClick=this.createTidySignal(),this.onSelectedChangedByClick=this.createTidySignal()}postCreate(){super.postCreate(),this.autoAddChildren&&this.addListenerToSignal(this.gameObject.onChildAdded,(k=>this.onChildAdded(k)));const k=0===this.defaultIndex.length||this.defaultIndex[0]>this.toggleObjects.length-1;for(let B=0;Bthis.listenToItem(k)))}onChildAdded(k){const B=k.findComponentInChildren($.l,!0);B&&this.addSelectable(B)}listenToItem(k){this.addListenerToSignal(k.onSelected,(()=>this.clicked(k))),this.addListenerToSignal(k.onSelectedLockedClick,(()=>this.clickLocked(k)))}clicked(k){if(!this.allowMultiSelect)for(let B=0;Bthis.toggleObjects[k])))}setSelected(...k){k.length>1&&!this.allowMultiSelect&&k.splice(1);for(const B of this.toggleObjects){const U=k.includes(B);U?B.isSelectionLocked=!0:this.setItemSelected(B,U)}}getToggles(){return this.toggleObjects}setDefaultSelectionIndex(...k){k.length>1&&!this.allowMultiSelect&&k.splice(1),this.defaultIndex=k}removeSelectable(k){const B=this.toggleObjects.indexOf(k);-1!==B&&(k.onSelected.remove(this.clicked,this),k.onSelectedLockedClick.remove(this.clickLocked,this),this.toggleObjects.splice(B,1))}clearSelectables(){this.toggleObjects.forEach((k=>this.removeSelectable(k)))}setItemSelected(k,B){k.setSelected(B),k.isSelectionLocked=!this.allowMultiSelect&&B}setItemSelectedByIndex(k,B){this.setItemSelected(this.toggleObjects[k],B)}destroy(){super.destroy()}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"autoAddChildren",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"allowMultiSelect",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"allowNoSelection",void 0),(0,F.Cg)([(0,G.MnK)($.l),(0,G.SZi)(),(0,F.Sn)("design:type",Array)],H.prototype,"toggleObjects",void 0),(0,F.Cg)([(0,G.g11)(),(0,G.SZi)(),(0,F.Sn)("design:type",Array)],H.prototype,"defaultIndex",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onSelectedLockedClick",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onSelectedChangedByClick",void 0),H=(0,F.Cg)([(0,G.EVk)("ToggleGroup",G.YH6.ui)],H)},13930:(k,B,U)=>{"use strict";U.d(B,{e:()=>j});var F=U(8674),G=U(62459);let j=class extends G.uAl{setState(k){}};j=(0,F.Cg)([(0,G.EVk)("Transition (abstract)")],j)},47716:(k,B,U)=>{"use strict";U.d(B,{H:()=>$});var F=U(8674),G=U(62459),j=U(11472);let $=class extends j.B{constructor(){super(...arguments),this._dataSource=null,this._createSection=()=>{const k=new G._mx;return k.addComponent(G.K16),k},this._createCell=()=>{const k=new G._mx;return k.addComponent(G.K16),k},this._numColumns=2,this._columnBuffer=15,this._sectionBuffer=15,this._rowHeight=115,this._sectionHeight=50}get dataSource(){return this._dataSource}set dataSource(k){this._dataSource=k}set createSection(k){this._createSection=k}set createCell(k){this._createCell=k}set numColumns(k){this._numColumns=k}get numColumns(){return this._numColumns}set columnBuffer(k){this._columnBuffer=k}get columnBuffer(){return this._columnBuffer}set sectionBuffer(k){this._sectionBuffer=k}get sectionBuffer(){return this._sectionBuffer}set rowHeight(k){this._rowHeight=k}get rowHeight(){return this._rowHeight}set sectionHeight(k){this._sectionHeight=k}get sectionHeight(){return this._sectionHeight}populateContentView(){super.populateContentView();let k=-(this._sectionHeight+this._sectionBuffer);for(let B=0;B{"use strict";U.d(B,{$:()=>W});var F,G=U(8674),j=U(62459),$=U(35120),H=U(5269),V=U(56163);let W=F=class extends V.t{constructor(){super(...arguments),this._pressed=!1,this._direction=H.H.Vertical,this._nib=null,this.resizingEnabled=!1,this.minNibSize=F.DEFAULT_NIB_SIZE,this.maxNibSize=F.DEFAULT_NIB_SIZE,this._scrollView=null}set direction(k){this._direction=k}get direction(){return this._direction}set horizontal(k){k&&(this._direction=H.H.Horizontal)}create(){super.create(),$.q.instance.game.input.addMoveCallback(this.moveNib,this)}initialize(k,B){this._nib=k||this._nib,this._scrollView=B||this._scrollView}onDown(k,B){this._pressed=!0,this.moveNib(B,B.x,B.y)}onUp(k,B,U){this._pressed=!1,this._scrollView.scrollReleaseListener.dispatch(this.getPercent())}moveNib(k,B,U){this._pressed&&(this.direction===H.H.Vertical?this._nib.legacyTransform.y=U-this.getCollisionBox().worldTransform.ty-this._nib.legacyTransform.height/2:this._nib.legacyTransform.x=B-this.getCollisionBox().worldTransform.tx-this._nib.legacyTransform.width/2,this.limitMovement(),this._scrollView.scrollBarListener.dispatch(this.getPercent(),this._direction))}limitMovement(){this.direction===H.H.Vertical?this._nib.legacyTransform.ythis.maxNibY()&&(this._nib.legacyTransform.y=this.maxNibY()):this._nib.legacyTransform.xthis.maxNibX()&&(this._nib.legacyTransform.x=this.maxNibX())}scrollToPercent(k){this.direction===H.H.Vertical?this._nib.legacyTransform.y=-this.maxNibY()*k:this._nib.legacyTransform.x=this.maxNibX()*k,this.limitMovement()}getPercent(){return this.direction===H.H.Vertical?this._nib.legacyTransform.y/(this.getCollisionBox().height-this._nib.legacyTransform.height):this._nib.legacyTransform.x/(this.getCollisionBox().width-this._nib.legacyTransform.width)}setNibSize(k){if(!this.resizingEnabled)return;const B=this._nib.legacyTransform.scaleX,U=this._nib.legacyTransform.scaleY,F=j.cj9.clamp((this.maxNibSize-this.minNibSize)*k+this.minNibSize,this.minNibSize,this.maxNibSize);this.direction===H.H.Vertical?this._nib.legacyTransform.height=F:this._nib.legacyTransform.width=F,this.limitMovement(),this._nib.findComponent(j.V09).resetImages(),this._nib.legacyTransform.scaleX=B,this._nib.legacyTransform.scaleY=U}maxNibY(){return this.getCollisionBox().height+this.getCollisionBox().y-this._nib.legacyTransform.height}maxNibX(){return this.getCollisionBox().width+this.getCollisionBox().x-this._nib.legacyTransform.width}destroy(){$.q.instance.game.input.deleteMoveCallback(this.moveNib,this),super.destroy()}};W.DEFAULT_NIB_SIZE=87,(0,G.Cg)([(0,j.vkK)(),(0,j.nKb)("isHorizontal"),(0,G.Sn)("design:type",Boolean),(0,G.Sn)("design:paramtypes",[Boolean])],W.prototype,"horizontal",null),(0,G.Cg)([(0,j.x4W)("nib"),(0,G.Sn)("design:type",j._mx)],W.prototype,"_nib",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W.prototype,"resizingEnabled",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],W.prototype,"minNibSize",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],W.prototype,"maxNibSize",void 0),(0,G.Cg)([(0,j.x4W)("scrollView"),(0,G.Sn)("design:type",Function)],W.prototype,"_scrollView",void 0),W=F=(0,G.Cg)([(0,j.EVk)("ScrollBar",j.YH6.ui)],W)},11472:(k,B,U)=>{"use strict";U.d(B,{B:()=>Y});var F,G=U(8674),j=U(62459),$=U(95891),H=U(68910),V=U(35120),W=U(5269),q=U(56163),K=U(12420),z=U(89400);let Y=F=class extends q.t{get direction(){return this._direction}set vertical(k){this._direction=k?this._direction|W.H.Vertical:this._direction&W.H.Vertical}set horizontal(k){this._direction=k?this._direction|W.H.Horizontal:this._direction&W.H.Horizontal}constructor(){super(),this._direction=W.H.None,this.isKinematic=!0,this.verticalScrollBar=null,this.horizontalScrollBar=null,this.contentView=null,this.wheelStep=40,this.wheelOnOver=!0,this.allowMouseWheel=!0,this.allowTouch=!0,this._readyForInput=!1,this.scrollBarListener=new j.HN0,this.scrollReleaseListener=new j.HN0,this._pressedDown=!1,this._timestamp=0,this._startX=0,this._startY=0,this._velocityX=0,this._velocityY=0,this._velocityWheel=0,this._mouseWheelCallback=null,this._verticalScrollingEnabled=!0,this._horizontalScrollingEnabled=!0,this._mouseOverCell=null,this._mouseDownCell=null,this._mouseDragCell=null,this._previousContentViewWidth=0,this._previousContentViewHeight=0,this._lastSimulateTime=0,this._lastSimulatePoint=new H.Point,this._shouldSimulateInUpdate=!1,this.scrollBarListener.add(this.scrollToPercent.bind(this),this)}create(){super.create();const k=V.q.instance.game.add.graphics(0,0,this.GameObject.legacyTransform.group);k.beginFill(0),k.drawRect(0,0,this.GameObject.legacyTransform.width,this.GameObject.legacyTransform.height),k.inputEnabled=!1,this.GameObject.legacyTransform.group.mask=k,this.updateScrollEnabled(W.H.Horizontal),this.updateScrollEnabled(W.H.Vertical),this._shouldSimulateInUpdate=j.o5U.isDesktop()}populateContentView(){this.contentView||(this.contentView=new j._mx(this.GameObject),this.contentView.addComponent(j.K16))}firstUpdate(){super.firstUpdate(),V.q.instance.game.input.addMoveCallback(this.onMoveListener,this),this._mouseWheelCallback=this.mouseWheelListener.bind(this),V.q.instance.game.input.mouse.addMouseWheelCallback(this._mouseWheelCallback),this._readyForInput=!0}onMoveListener(k,B,U){this._readyForInput&&this.allowTouch&&this.moveCanvas(k,B,U)}mouseWheelListener(k){this._readyForInput&&this.allowMouseWheel&&this.mouseWheel(k)}update(){if(super.update(),this.isKinematic&&(this._direction&W.H.Vertical)===W.H.Vertical&&Math.abs(this._velocityWheel)>F.velocityThreshold&&(this.contentView.legacyTransform.y+=this._velocityWheel,this.limitMovement(),this._velocityWheel*=F.deceleration),this._shouldSimulateInUpdate){const k=V.q.instance.game.input.activePointer;Date.now()-this._lastSimulateTime>F.SIMULATE_DELAY_MS&&(this._lastSimulatePoint.x!==k.x||this._lastSimulatePoint.y!==k.y)&&this.simulateMouseHover(k)}this.horizontalScrollBar&&this._previousContentViewWidth!==this.contentView.legacyTransform.width&&(this._previousContentViewWidth=this.contentView.legacyTransform.width,this.horizontalScrollBar.setNibSize(this.getCollisionBox().width/this._previousContentViewWidth),this.updateScrollEnabled(W.H.Horizontal)),this.verticalScrollBar&&this._previousContentViewHeight!==this.contentView.legacyTransform.height&&(this._previousContentViewHeight=this.contentView.legacyTransform.height,this.verticalScrollBar.setNibSize(this.getCollisionBox().height/this._previousContentViewHeight),this.updateScrollEnabled(W.H.Vertical))}simulateMouseHover(k,B){var U,F;if(this._lastSimulateTime=Date.now(),this._lastSimulatePoint.x=k.x,this._lastSimulatePoint.y=k.y,!this.isInputTarget(k))return null===(U=this._mouseOverCell)||void 0===U||U.onOut.dispatch(k),this._mouseOverCell=null,void(this._mouseDownCell=null);for(const G of B||this.contentView.findComponentsInChildren(z.B)){if(!G.GameObject.active){G===this._mouseOverCell&&(this._mouseOverCell=null,this._mouseDownCell=null);continue}const B=this.isPointerOverCell(k,G);if(B&&this._mouseOverCell===G)return;if(B&&this._mouseOverCell!==G)return null===(F=this._mouseOverCell)||void 0===F||F.onOut.dispatch(k),this._mouseOverCell=G,void G.onOver.dispatch(k);B||this._mouseOverCell!==G||(G.onOut.dispatch(k),this._mouseOverCell=null,this._mouseDownCell=null)}}onDown(k,B){var U;this._startX=B.x,this._startY=B.y,this._pressedDown=!0,this._velocityWheel=0,this._timestamp=Date.now(),this._velocityY=this._velocityX=0,(null===(U=this._mouseOverCell)||void 0===U?void 0:U.GameObject)&&this.isPointerOverCell(B,this._mouseOverCell)||this.simulateMouseHover(B),this._mouseOverCell&&(this._mouseOverCell.onDown.dispatch(B),this._mouseDownCell=this._mouseOverCell)}onUp(k,B,U){var F;if(this._pressedDown=!1,this._mouseDownCell)return this._mouseDownCell.onClick.dispatch(),void(this._mouseDownCell=null);this._mouseDragCell&&(this._mouseDragCell.onUp.dispatch(B),this._mouseDragCell=null),this.scrollReleaseListener.dispatch(this.getPercent(this.direction)),null===(F=this._mouseOverCell)||void 0===F||F.onOver.dispatch(B)}moveCanvas(k,B,U){var G;if(this._pressedDown&&this._mouseDownCell&&(this._mouseDragCell=this._mouseDownCell),this.shouldScroll(this.direction)&&this._pressedDown){const j=Date.now(),$=j-this._timestamp;this._timestamp=j;let H=0;(this._direction&W.H.Horizontal)===W.H.Horizontal&&(H=B-this._startX,this._startX=B,this._velocityX=H*F.displacement/($+1)*F.initialAcceleration+this._velocityX*F.finalAcceleration,this.contentView.legacyTransform.x+=H,this.limitMovement()),(this._direction&W.H.Vertical)===W.H.Vertical&&(H=U-this._startY,this._startY=U,this._velocityY=H*F.displacement/($+1)*F.initialAcceleration+this._velocityY*F.finalAcceleration,this.contentView.legacyTransform.y+=H,this.limitMovement()),this._mouseDownCell&&!this.withinTapThreshold(k,this.direction)&&this.shouldScroll(this.direction)&&(null===(G=this._mouseOverCell)||void 0===G||G.onOver.dispatch(k),this._mouseDownCell=null)}}withinTapThreshold(k,B){return B===W.H.Horizontal?Math.abs(k.x-k.positionDown.x)<=F.tapThreshold:Math.abs(k.y-k.positionDown.y)<=F.tapThreshold}mouseWheel(k){if(k.preventDefault(),!this.shouldScroll(this.direction))return;const B=this.isInputTarget(V.q.instance.game.input.activePointer),U=this.horizontalScrollBar&&this.horizontalScrollBar.isInputTarget(V.q.instance.game.input.activePointer)||this.verticalScrollBar&&this.verticalScrollBar.isInputTarget(V.q.instance.game.input.activePointer);if(this.wheelOnOver&&!B&&!U)return;const F=120*V.q.instance.game.input.mouse.wheelDelta/this.wheelStep;this.isKinematic?this._velocityWheel+=F:(this.contentView.legacyTransform.y+=F,this.limitMovement())}limitMovement(){const k=this.getCollisionBox();if((this._direction&W.H.Vertical)===W.H.Vertical){let B=this.contentView.legacyTransform.y;const U=this.contentView.legacyTransform.height,F=$.last(this.contentView.children),G=F?j.Htv.getHeight(F):0;B>k.y&&(B=k.y),B<-(U-k.height-k.y+G)&&(B=U>k.height?-(U-k.height-k.y+G):k.y),this.contentView.legacyTransform.y=B,this.verticalScrollBar&&this.verticalScrollBar.scrollToPercent(B/(U-k.height-k.y+G))}if((this._direction&W.H.Horizontal)===W.H.Horizontal){let B=this.contentView.legacyTransform.x;const U=this.contentView.legacyTransform.width,F=$.last(this.contentView.children),G=F?j.Htv.getWidth(F):0;B>k.x&&(B=k.x),B<-(U-k.width-k.x+G)&&(B=U>k.width?-(U-k.width-k.x+G):k.x),this.contentView.legacyTransform.x=B,this.horizontalScrollBar&&this.horizontalScrollBar.scrollToPercent(B/(U-k.width-k.x+G))}}getPercent(k){return k===W.H.Horizontal&&this.horizontalScrollBar?this.horizontalScrollBar.getPercent():k===W.H.Vertical&&this.verticalScrollBar?this.verticalScrollBar.getPercent():0}scrollToPercent(k,B){if(!this.shouldScroll(B))return;const U=this.getCollisionBox(),F=$.last(this.contentView.children),G=(k,B,U,F,G)=>-G*(k-B-U+F);B===W.H.Vertical?(this.contentView.legacyTransform.y=G(this.contentView.legacyTransform.height,U.height,U.y,F?j.Htv.getHeight(F):0,k),this._velocityWheel=0):this.contentView.legacyTransform.x=G(this.contentView.legacyTransform.width,U.width,U.x,F?j.Htv.getWidth(F):0,k),this.limitMovement()}scrollToPercentTween(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this.shouldScroll(B))return;this.tweenCleanup();const F=this.getPercent(B);if(0===k-F)return;const G={value:F};this._scrollTween=V.q.instance.game.tweens.create(G,this),this._scrollTween.onUpdate.add((()=>this.scrollToPercent(G.value,B)));const $=B===W.H.Vertical?this.contentView.legacyTransform.height:this.contentView.legacyTransform.width,H=1e3*U/(1e3*U/$)*k;this._scrollTween.to({value:k},H,j.GS3.Quadratic.Out).start(),yield this._scrollTween.onTweenComplete.asPromise().catch((()=>j.RQr.createHandler("[ScrollView.scrollToPercentTween] Error scrolling to percent"))),this.tweenCleanup()}))}scrollByPixels(k,B){this.shouldScroll(B)&&(B===W.H.Vertical?this.contentView.legacyTransform.y+=k:this.contentView.legacyTransform.x+=k,this.limitMovement())}updateScrollEnabled(k){this.contentView&&(k===W.H.Vertical&&(this._verticalScrollingEnabled=this.contentView.legacyTransform.height>this.getCollisionBox().height,this.verticalScrollBar&&(this.verticalScrollBar.GameObject.legacyTransform.group.visible=this._verticalScrollingEnabled),this._verticalScrollingEnabled||(this._velocityWheel=0)),k===W.H.Horizontal&&(this._horizontalScrollingEnabled=this.contentView.legacyTransform.width>this.getCollisionBox().width,this.horizontalScrollBar&&(this.horizontalScrollBar.GameObject.legacyTransform.group.visible=this._horizontalScrollingEnabled)))}shouldScroll(k){return k===W.H.Vertical?this._verticalScrollingEnabled:k===W.H.Horizontal?this._horizontalScrollingEnabled:void 0}isPointerOverCell(k,B){const U=B.GameObject.legacyTransform;return j.M_G.containsRaw(U.group.getGlobalPosition().x,U.group.getGlobalPosition().y,U.width,U.height,k.x,k.y)}destroy(){this.tweenCleanup(),this.scrollBarListener.dispose(),this.scrollReleaseListener.dispose(),this.GameObject.legacyTransform.group.mask instanceof H.Container&&this.GameObject.legacyTransform.group.mask.destroy(),this.GameObject.legacyTransform.group.mask=null,V.q.instance.game.input.deleteMoveCallback(this.onMoveListener,this),V.q.instance.game.input.mouse.removeMouseWheelCallback(this._mouseWheelCallback),this._mouseWheelCallback=null,super.destroy()}tweenCleanup(){j.Aq$.isDefined(this._scrollTween)&&(this._scrollTween.destroy(),this._scrollTween=null)}};Y.deceleration=.95,Y.velocityThreshold=.1,Y.tapThreshold=5,Y.initialAcceleration=.8,Y.finalAcceleration=.8,Y.displacement=1e3,Y.SIMULATE_DELAY_MS=100,(0,G.Cg)([(0,j.vkK)(),(0,j.Lr6)(0),(0,j.nKb)("verticalScrolling"),(0,G.Sn)("design:type",Boolean),(0,G.Sn)("design:paramtypes",[Boolean])],Y.prototype,"vertical",null),(0,G.Cg)([(0,j.vkK)(),(0,j.Lr6)(0),(0,j.nKb)("horizontalScrolling"),(0,G.Sn)("design:type",Boolean),(0,G.Sn)("design:paramtypes",[Boolean])],Y.prototype,"horizontal",null),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Y.prototype,"isKinematic",void 0),(0,G.Cg)([(0,j.MnK)(K.$),(0,G.Sn)("design:type",K.$)],Y.prototype,"verticalScrollBar",void 0),(0,G.Cg)([(0,j.MnK)(K.$),(0,G.Sn)("design:type",K.$)],Y.prototype,"horizontalScrollBar",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Y.prototype,"contentView",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Y.prototype,"wheelStep",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Y.prototype,"wheelOnOver",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Y.prototype,"allowMouseWheel",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Y.prototype,"allowTouch",void 0),Y=F=(0,G.Cg)([(0,j.EVk)("ScrollView",j.YH6.ui),(0,G.Sn)("design:paramtypes",[])],Y)},53153:(k,B,U)=>{"use strict";U.d(B,{y:()=>$});var F=U(62459),G=U(76974),j=U(89400);class $ extends j.B{constructor(){super(...arguments),this._base=null}postCreate(){super.postCreate(),this.setState(this._base.currentState),this.onOver.add((()=>{this.setState(G.K.Over)})),this.onOut.add((()=>{this.setState(G.K.Up)})),this.onDown.add((()=>{this.setState(G.K.Down)}))}setState(k,B=!1){!B&&this.isDisabled()||(this._base.unlockState(),this._base.lockState(k))}setDisabled(k){this.setState(k?G.K.Disabled:G.K.Up,!0)}isDisabled(){return this._base.getButtonState()===G.K.Disabled}updateContentView(k){this.onClick.add((()=>{k.callback()}))}setText(k){this._base.GameObject.findComponentsInChildren(F.EYj).forEach((B=>B.text=k))}}},89400:(k,B,U)=>{"use strict";U.d(B,{B:()=>j});var F=U(8674),G=U(62459);class j extends G.uAl{constructor(){super(...arguments),this._contentView=null,this.onClick=new G.HN0,this.onOver=new G.HN0,this.onOut=new G.HN0,this.onDown=new G.HN0,this.onUp=new G.HN0}destroy(){this.onClick.dispose(),this.onOver.dispose(),this.onOut.dispose(),this.onDown.dispose(),this.onUp.dispose(),super.destroy()}}(0,F.Cg)([(0,G.x4W)("contentView"),(0,F.Sn)("design:type",G._mx)],j.prototype,"_contentView",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"onClick",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"onOver",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"onOut",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"onDown",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"onUp",void 0)},76501:(k,B,U)=>{"use strict";U.d(B,{W:()=>j});var F=U(89400),G=U(33961);class j{get data(){return this._data}set data(k){this._data=k}constructor(k=[]){this._data=[],this._data=k}numberOfItemsInSection(k){return this._data[k]?this._data[k].cells.length:0}titleForSection(k){return this._data[k]?this._data[k].title:""}updateSection(k,B){const U=B.findComponentInChildren(G.C);return U&&U.updateContentView(this._data[k]),B}updateCellAt(k,B,U){const G=U.findComponentInChildren(F.B);return G&&G.updateContentView(this._data[k].cells[B]),U}}},33961:(k,B,U)=>{"use strict";U.d(B,{C:()=>j});var F=U(8674),G=U(62459);class j extends G.uAl{constructor(){super(...arguments),this._contentView=null}}(0,F.Cg)([(0,G.x4W)("contentView"),(0,F.Sn)("design:type",G._mx)],j.prototype,"_contentView",void 0)},25456:(k,B,U)=>{"use strict";U.d(B,{l:()=>H});var F=U(8674),G=U(62459),j=U(83133),$=U(53153);let H=class extends $.y{constructor(){super(...arguments),this._toggle=null}postDeserialize(){super.postDeserialize(),this._base=this._toggle}create(){super.create(),this.onClick.add((()=>{this.isDisabled()||this.doToggle()}))}setSelected(k){this._toggle.isSelectionLocked||(this._toggle.setSelected(k),this.setState(this._toggle.currentState))}lockToggle(k){this._toggle.isSelectionLocked=k}isSelected(){return this._toggle.isSelected()}doToggle(){this.setSelected(!this.isSelected())}};(0,F.Cg)([(0,G.MnK)(j.l),(0,F.Sn)("design:type",j.l)],H.prototype,"_toggle",void 0),H=(0,F.Cg)([(0,G.EVk)("ScrollViewToggle")],H)},77801:(k,B,U)=>{"use strict";U.d(B,{f:()=>H});var F=U(8674),G=U(62459),j=U(73797),$=U(35120);let H=class extends G.uAl{constructor(){super(...arguments),this._touching=!1,this.onStartTouching=new G.HN0,this.onTouching=new G.HN0,this.onStopTouching=new G.HN0}create(){super.create();const k=$.q.instance.game.broadcaster;k.addAppListener(j.pm.MovePlayer,this.pathTo.bind(this),this),k.addAppListener(j.pm.StopPlayer,this.stopMovement.bind(this),this),k.addAppListener(j.pm.GetTarget,this.getPosition.bind(this),this)}destroy(){const k=$.q.instance.game.broadcaster;k.removeAppListener(j.pm.MovePlayer,this),k.removeAppListener(j.pm.StopPlayer,this),k.removeAppListener(j.pm.GetTarget,this),this.onStartTouching.dispose(),this.onStopTouching.dispose(),this.onTouching.dispose(),super.destroy()}update(){if(super.update(),this._touching){const k=$.q.instance.game.input.activePointer;if(k.isDown){const B={x:k.x,y:k.y},U=G.i7d.main;if(U){const k=U.viewportSize,F=U.GameObject.transform.worldPosition;B.x+=F.x-k.getHalfWidth(),B.y+=F.y-k.getHalfHeight()}B.x=Math.round(B.x),B.y=Math.round(B.y);const F=this.pathTo(B.x,B.y);F&&this._touchStarted?this.onTouching.dispatch(B):F&&!this._touchStarted&&(this._touchStarted=!0,this.onStartTouching.dispatch())}else this.stopTouching()}}startMovement(k){return this._touching=!0,!!this.pathTo(k.x,k.y)&&(this._touchStarted=!0,this.onStartTouching.dispatch(),!0)}pathTo(k,B){const U=this._pathfinder.findPath(this._pathLocomotion.GameObject.transform.worldPosition,{x:k,y:B});return!!U&&(this._pathLocomotion.setPath(U),!0)}stopMovement(){this._pathLocomotion.stop(),this.stopTouching()}stopTouching(){this._touching=!1,this._touchStarted&&(this.onStopTouching.dispatch(),this._touchStarted=!1)}getPosition(){return this._pathLocomotion.GameObject.transform.worldPosition}};(0,F.Cg)([(0,G.MnK)(G.KhP),(0,F.Sn)("design:type",G.KhP)],H.prototype,"_pathLocomotion",void 0),(0,F.Cg)([(0,G.Cdj)("Pathfinder"),(0,F.Sn)("design:type",G.wGs)],H.prototype,"_pathfinder",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onStartTouching",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onTouching",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onStopTouching",void 0),H=(0,F.Cg)([(0,G.S1F)(),(0,G.EVk)("ClickAndHoldPathfinder",G.YH6.input)],H)},18741:(k,B,U)=>{"use strict";U.d(B,{f:()=>F});class F{static setCanvasPool(k){this.canvasPool=k}static create(k,B,U){return this.canvasPool.create(k,B,U)}static getFirst(){return this.canvasPool.getFirst()}static remove(k){this.canvasPool.remove(k)}static removeByCanvas(k){this.canvasPool.removeByCanvas(k)}static getTotal(){return this.canvasPool.getTotal()}static getFree(){return this.canvasPool.getFree()}static log(){console.log("CanvasPool: %s used, %s free, %s total",this.getTotal(),this.getFree(),this.canvasPool.length)}}F.setCanvasPool(new class{constructor(){this.pool=[]}get length(){return this.pool.length}create(k,B=1,U=1){const F=this.getFirst();let G;return-1===F?(G=document.createElement("canvas"),this.pool.push({parent:k,canvas:G})):(this.pool[F].parent=k,G=this.pool[F].canvas),G.height=U,G.width=B,G}remove(k){this.pool.forEach((B=>{B.parent===k&&(B.parent=null,B.canvas.width=1,B.canvas.height=1)}))}removeByCanvas(k){this.pool.forEach((B=>{B.canvas===k&&(B.parent=null,B.canvas.width=1,B.canvas.height=1)}))}getTotal(){return this.pool.filter((k=>k.parent)).length}getFree(){return this.pool.filter((k=>!k.parent)).length}getFirst(){const k=this.pool;for(let B=0;B{"use strict";U.d(B,{N:()=>j});var F=U(68910),G=U(35120);class j extends F.Container{get stage(){return G.q.instance.game.stage}get worldPosition(){return this.getGlobalPosition()}get worldScale(){return this.transform.scale}set worldScale(k){this.transform.scale.set(k.x,k.y)}get worldRotation(){return this.transform.rotation}set worldRotation(k){this.transform.rotation=k}constructor(){super()}bringChildToTop(k){this.setChildIndex(k,this.children.length-1)}sendChildToBack(k){this.setChildIndex(k,0)}static bringChildToTop(k,B){k.setChildIndex(B,k.children.length-1)}static sendChildToBack(k,B){k.setChildIndex(B,0)}destroy(k={children:!0}){super.destroy(k)}}},82366:(k,B,U)=>{"use strict";U.d(B,{A:()=>V});var F=U(62459),G=U(68910),j=U(35120),$=U(74560),H=U(64835);class V extends G.Graphics{get inputEnabled(){return $.m.isInputEnabled(this)}set inputEnabled(k){$.m.setInputEnabled(this,k,this)}get left(){return F.J6z.getLeft(this)}set left(k){F.J6z.setLeft(this,k)}getOffsetX(){return F.J6z.getOffsetX(this.getBounds())}getOffsetY(){return F.J6z.getOffsetY(this.getBounds())}get right(){return F.J6z.getRight(this)}set right(k){F.J6z.setRight(this,k)}get offsetX(){return F.J6z.getOffsetX(this)}set offsetX(k){F.VyI.log("Cannot set offset of x.",F.$bb.Warning)}get offsetY(){return F.J6z.getOffsetY(this)}set offsetY(k){F.VyI.log("Cannot set offset of y.",F.$bb.Warning)}get top(){return F.J6z.getTop(this)}set top(k){F.J6z.setTop(this,k)}get bottom(){return F.J6z.getBottom(this)}set bottom(k){F.J6z.setBottom(this,k)}get centerX(){return F.J6z.getCenterX(this)}set centerX(k){F.J6z.setCenterX(this,k)}get centerY(){return F.J6z.getCenterY(this)}set centerY(k){F.J6z.setCenterY(this,k)}get z(){return this.zIndex}set z(k){this.zIndex=k}destroy(k){this._destroyed||(this.clear(),this.events&&this.events.onDestroy.dispatch(this),this.input&&this.input.destroy(),this.events&&this.events.destroy(),j.q.instance.game.tweens.removeFrom(this,!1),this.filters=null,this.mask=null,this.exists=!1,this.visible=!1,this.renderable=!1,super.destroy(k))}bringChildToTop(k){H.N.bringChildToTop(this,k)}sendChildToBack(k){H.N.sendChildToBack(this,k)}get worldPosition(){return this.getGlobalPosition()}get worldScale(){return this.transform.scale}set worldScale(k){this.transform.scale.set(k.x,k.y)}get worldRotation(){return this.transform.rotation}set worldRotation(k){this.transform.rotation=k}get stage(){return j.q.instance.game.stage}constructor(k,B=0,U=0){super(),this.exists=!0,this.anchor=new G.Point,this.renderable=!0,this.tint=16777215,this.blendMode=G.BLEND_MODES.NORMAL,this.currentPath=null,this.isMask=!1,this.position.set(B,U),this.previousPosition=new G.Point(B,U),this.events=new F.sVA(this)}drawTriangle(k){const B=new G.Polygon(k);this.drawPolygon(B)}}},57308:(k,B,U)=>{"use strict";U.d(B,{W:()=>F,Y:()=>V});var F,G=U(62459),j=U(68910),$=U(35120),H=U(64835);!function(k){k[k.SORT_ASCENDING=0]="SORT_ASCENDING",k[k.SORT_DESCENDING=1]="SORT_DESCENDING"}(F||(F={}));class V extends H.N{get world(){return new j.Point(this.worldTransform.tx,this.worldTransform.ty)}get worldGamePosition(){return new j.Point(this.worldPosition.x/window.innerWidth*this._game.width,this.worldPosition.y/window.innerHeight*this._game.height)}get z(){return this.zIndex}set z(k){this.zIndex=k}get bounds(){let k;return k=this._bounds.getRectangle(k),k}set bounds(k){this._bounds.minX=k.x,this._bounds.maxX=k.x+k.width,this._bounds.minY=k.y,this._bounds.maxY=k.y+k.height}destroy(k={children:!0}){var B;this.pendingDestroy=!1,this.onDestroy&&(this.onDestroy.dispatch(this,k.children,!k.texture),null===(B=this.onDestroy)||void 0===B||B.dispose()),this.events&&(this.events.onDestroy.dispatch(this),this.events.destroy()),this.removeFromParent(),this._game=null,this.filters=null,this.mask=null,this.onDestroy=null,this.exists=!1,this.visible=!1,this.renderable=!1,super.destroy(k)}get left(){return G.J6z.getLeft(this)}set left(k){G.J6z.setLeft(this,k)}get right(){return G.J6z.getRight(this)}set right(k){G.J6z.setRight(this,k)}get offsetX(){return G.J6z.getOffsetX(this)}set offsetX(k){G.VyI.log("Cannot set offset of x.",G.$bb.Warning)}get offsetY(){return G.J6z.getOffsetY(this)}set offsetY(k){G.VyI.log("Cannot set offset of y.",G.$bb.Warning)}get top(){return G.J6z.getTop(this)}set top(k){G.J6z.setTop(this,k)}get bottom(){return G.J6z.getBottom(this)}set bottom(k){G.J6z.setBottom(this,k)}get centerX(){return G.J6z.getCenterX(this)}set centerX(k){G.J6z.setCenterX(this,k)}get centerY(){return G.J6z.getCenterY(this)}set centerY(k){G.J6z.setCenterY(this,k)}get anchor(){return new j.Point(0,0)}constructor(k,B=k.stage,U="group",F=!1){super(),this.onDestroy=new G.HN0,this.exists=!0,this.pendingDestroy=!1,this._sortProperty="z",this.fixedToCamera=!1,this._game=k,this.name=U,this.events=new G.sVA(this),F?($.q.instance.game.stage.addChild(this),this.z=$.q.instance.game.stage.children.length):B&&(B.addChild(this),this.z=B.children.length)}add(k,B=-1){const U=G.Aq$.isDefined(B)?B:this.length;return B>-1&&B0){const B=this.getIndex(k),U=this.getAt(B-1);U&&this.swap(k,U)}return k}swap(k,B){this.swapChildren(k,B),this.updateZ()}updateZ(){let k=this.children.length;for(;k-- >0;)this.children[k].zIndex=k}getIndex(k){return this.children.indexOf(k)}getAt(k){return k<0||k>=this.children.length?null:this.getChildAt(k)}callAll(k,B,...U){if(!G.Aq$.isDefined(k))return;const F=k.split(".");let j,$,H=B;if(G.Aq$.isDefined(H)&&""!==H?"string"==typeof H&&(j=H.split(".")):H=null,U.length>0){$=[];for(let k=0;kB.name===k))}update(){for(let k=this.children.length;k>=0;--k){const B=this.children[k];B&&!B._destroyed&&!1!==B.exists&&"function"==typeof B.update&&B.update($.q.instance.game.time.deltaMS)}}remove(k,B=!1){const U=null!==this.removeChild(k);return B&&k.destroy(),U&&this.updateZ(),U}removeBetween(k,B=this.children.length-1,U=!1,F=!1){if(0===this.children.length)return;if(k>B||k<0||B>=this.children.length)return void G.VyI.log(`Unable to remove between because index was out of bounds startIndex: ${k} endIndex: ${B} children length: ${this.children.length}`,G.$bb.Error);let j=B;for(;j>=k;){const k=this.children[j];F||void 0===k.events||k.events.onRemovedFromGroup.dispatch(k,this);const B=this.removeChild(k);U&&B&&B.destroy(),j--}this.updateZ()}}},92150:(k,B,U)=>{"use strict";U.d(B,{_:()=>q});var F=U(62459),G=U(68910);class j{get paused(){return this.isPaused}set paused(k){this.isPaused=k,k?this.pauseStartTime=F.W$e.instance.game.time.timeMS:this.isPlaying&&(this.timeNextFrame=F.W$e.instance.game.time.timeMS+this.delay)}get reversed(){return this.isReversed}set reversed(k){this.isReversed=k}get frameTotal(){return this.frames.length}get frame(){return null!==this.currentFrame?this.currentFrame.index:this.frameIndex}set frame(k){this.currentFrame=this.frameData.getFrame(this.frames[k]),null!==this.currentFrame&&(this.frameIndex=k,this.parent.setFrame(this.currentFrame),this.onUpdate&&this.onUpdate.dispatch(this,this.currentFrame))}get speed(){return 1e3/this.delay}set speed(k){k>0&&(this.delay=1e3/k)}get enableUpdate(){return null!==this.onUpdate}set enableUpdate(k){k&&null===this.onUpdate?this.onUpdate=new F.HN0:k||null===this.onUpdate||(this.onUpdate.dispose(),this.onUpdate=null)}constructor(k,B,U,G,j=60,$=!1){this.frames=[],this.frameIndex=0,this.frameDiff=0,this.frameSkip=1,this.timeLastFrame=0,this.timeNextFrame=0,this.pauseStartTime=0,this.isReversed=!1,this.loopCount=0,this.isFinished=!1,this.isPlaying=!1,this.isPaused=!1,this.onStart=new F.HN0,this.onUpdate=null,this.onComplete=new F.HN0,this.onLoop=new F.HN0,this.parent=k,this.name=B,this.frames=G,this.delay=1e3/j,this.loop=$,this.frameData=U,this.currentFrame=this.frameData.getFrame(this.frames[this.frameIndex]),this.frameIndex=0,F.W$e.instance.game.onPause.add(this.onPause,this),F.W$e.instance.game.onResume.add(this.onResume,this)}play(k,B){return F.Aq$.isDefined(k)&&!isNaN(k)&&(this.delay=1e3/k),F.Aq$.isDefined(B)&&(this.loop=B),this.isPlaying=!0,this.isFinished=!1,this.paused=!1,this.loopCount=0,this.timeLastFrame=F.W$e.instance.game.time.timeMS,this.timeNextFrame=F.W$e.instance.game.time.timeMS+this.delay,this.frameIndex=this.isReversed?this.frames.length-1:0,this.updateCurrentFrame(!1,!0),this.parent.events.onAnimationStart.dispatch(this.parent,this),this.onStart.dispatch(this.parent,this),this.parent.animations.currentAnim=this,this.parent.animations.currentFrame=this.currentFrame,this}restart(){this.isPlaying=!0,this.isFinished=!1,this.paused=!1,this.loopCount=0,this.timeLastFrame=F.W$e.instance.game.time.timeMS,this.timeNextFrame=F.W$e.instance.game.time.timeMS+this.delay,this.frameIndex=0,this.currentFrame=this.frameData.getFrame(this.frames[this.frameIndex]),this.parent.updateFrame(this.frameIndex),this.parent.animations.currentAnim=this,this.parent.animations.currentFrame=this.currentFrame,this.onStart.dispatch(this.parent,this)}reverse(){return this.reversed=!this.reversed,this}reverseOnce(){return this.onComplete.addOnce(this.reverse,this),this.reverse()}setFrame(k,B=!1){let U=null;if("string"==typeof k){for(let G=0;G=this.timeNextFrame)&&(this.frameSkip=1,this.frameDiff=F.W$e.instance.game.time.timeMS-this.timeNextFrame,this.timeLastFrame=F.W$e.instance.game.time.timeMS,this.frameDiff>this.delay?(this.frameSkip=Math.floor(this.frameDiff/this.delay),this.frameDiff-=this.frameSkip*this.delay):this.frameDiff=0,this.timeNextFrame=F.W$e.instance.game.time.timeMS+(this.delay-this.frameDiff),this.isReversed?this.frameIndex-=this.frameSkip:this.frameIndex+=this.frameSkip,!this.isReversed&&this.frameIndex>=this.frames.length||this.isReversed&&this.frameIndex<=-1?this.loop?(this.frameIndex=Math.abs(this.frameIndex)%this.frames.length,this.currentFrame=this.frameData.getFrame(this.frames[this.frameIndex]),this.parent.updateFrame(this.frames[this.frameIndex]),this.loopCount++,this.parent.events.onAnimationLoop.dispatch(this.parent,this),this.onLoop.dispatch(this.parent,this),!this.onUpdate||(this.onUpdate.dispatch(this,this.currentFrame),!!this.frameData)):(this.complete(),!1):this.updateCurrentFrame(!0)))}updateCurrentFrame(k,B=!1){if(!this.frameData)return!1;const U=this.currentFrame?this.currentFrame.index:-1;return this.currentFrame=this.frameData.getFrame(this.frames[this.frameIndex]),this.currentFrame&&(B||U!==this.currentFrame.index)&&this.parent.updateFrame(this.frames[this.frameIndex]),!this.onUpdate||!k||(this.onUpdate.dispatch(this,this.currentFrame),!!this.frameData)}next(k=1){let B=this.frameIndex+k;B>=this.frames.length&&(this.loop?B%=this.frames.length:B=this.frames.length-1),B!==this.frameIndex&&(this.frameIndex=B,this.updateCurrentFrame(!0))}previous(k=1){let B=this.frameIndex-k;B<0&&(this.loop?B=this.frames.length+B:B++),B!==this.frameIndex&&(this.frameIndex=B,this.updateCurrentFrame(!0))}updateFrameData(k){this.frameData=k,this.currentFrame=this.frameData?this.frameData.getFrame(this.frames[this.frameIndex%this.frames.length]):null}destroy(){this.frameData&&(F.W$e.instance.game.onPause.remove(this.onPause,this),F.W$e.instance.game.onResume.remove(this.onResume,this),this.parent=null,this.frames=null,this.frameData=null,this.currentFrame=null,this.isPlaying=!1,this.onStart.dispose(),this.onLoop.dispose(),this.onComplete.dispose(),this.onUpdate&&this.onUpdate.dispose())}complete(){this.frameIndex=this.frames.length-1,this.currentFrame=this.frameData.getFrame(this.frames[this.frameIndex]),this.updateCurrentFrame(!1),this.isPlaying=!1,this.isFinished=!0,this.paused=!1,this.parent.events.onAnimationComplete.dispatch(this.parent,this),this.onComplete.dispatch(this.parent,this)}static generateFrameNames(k,B,U,G="",j=0){const $=[];let H="";if(B=U;V--)H=F.Aq$.pad(V.toString(),j,"0",1),H=k+H+G,$.push(H);return $}}class ${get onLoaded(){return this._onLoaded}get frameData(){return this._frameData}get frameTotal(){return this._frameData.total}get paused(){return this.currentAnim.isPaused}set paused(k){this.currentAnim.paused=k}get name(){return this.currentAnim?this.currentAnim.name:(F.VyI.log("Current animation not defined",F.$bb.Warning),null)}get frame(){return this.currentFrame?this.currentFrame.index:(F.VyI.log("Current frame not defined",F.$bb.Warning),null)}set frame(k){if(!this.isLoaded)return this._frameLoadedListener&&this.onLoaded.remove(this._frameLoadedListener),this._frameLoadedListener=this.onFrameLoaded.bind(this,k),void this.onLoaded.addOnce(this._frameLoadedListener);if(this._frameLoadedListener=null,this.sprite.setTexture(F.W$e.instance.game.cache.getTexture(this.sprite.key,k)),this._frameData){const B=this._frameData.getFrame(k);this.currentFrame=B||this.currentFrame}else F.VyI.log(`Cannot set frame index: ${k}`,F.$bb.Error)}onFrameLoaded(k){this.frame=k}get frameName(){return this.currentFrame?this.currentFrame.name:(F.VyI.log("Current frame name not defined",F.$bb.Warning),null)}set frameName(k){F.Aq$.isDefined(k)||(F.VyI.log("Animation Manager frame name set with no name.",F.$bb.Error),console.trace()),this.sprite.setTexture(F.W$e.instance.game.cache.getTexture(this.sprite.key,k));const B=this._frameData.getFrameByName(k);B?this.currentFrame=B:F.VyI.log(`Cannot set frameName: ${k} for sprite with key: ${this.sprite.key} and frameData total: ${this.frameData.total}`,F.$bb.Error)}constructor(k){this.updateIfVisible=!0,this.isLoaded=!1,this._onLoaded=new F.HN0,this._animations=new Map,this.sprite=k}destroy(){this._animations&&this._animations.clear(),this._onLoaded.dispose(),this._animationLoadedListener=null,this._frameLoadedListener=null,this._animations=null,this._frameData=null,this.currentAnim=null,this.currentFrame=null,this.sprite=null}loadFrameData(k,B=0){return!!k&&(this.isLoaded&&this._animations.forEach((B=>{B.updateFrameData(k)})),this._frameData=k,"string"==typeof B?this.frameName=B:this.frame=B,this.isLoaded=!0,this._onLoaded.dispatch(),!0)}copyFrameData(k,B=0){return!!k&&(this._frameData=k.clone(),this.isLoaded&&this._animations.forEach((k=>{k.updateFrameData(this._frameData)})),"string"==typeof B?this.frameName=B:this.frame=B,this.isLoaded=!0,this._onLoaded.dispatch(),!0)}add(k,B,U=60,G=!1,$=!1){let H=[];if(B)H=B;else{const B=this._frameData.getFrames();for(let U=0;Uthis._frameData.total)return!1}else if(!1===this._frameData.checkFrameName(k[U]))return!1;return!0}play(k,B,U){var F;return this.isLoaded?(this._animationLoadedListener=null,this._animations.has(k)?this.currentAnim===this._animations.get(k)?!1===this.currentAnim.isPlaying?(this.currentAnim.paused=!1,this.currentAnim.play(B,U)):this.currentAnim:((null===(F=this.currentAnim)||void 0===F?void 0:F.isPlaying)&&this.currentAnim.stop(),this.currentAnim=this._animations.get(k),this.currentAnim.paused=!1,this.currentFrame=this.currentAnim.currentFrame,this.currentAnim.play(B,U)):void 0):(this._animationLoadedListener&&this.onLoaded.remove(this._animationLoadedListener),this._animationLoadedListener=this.play.bind(this,k,B,U),this.onLoaded.addOnce(this._animationLoadedListener),this.currentAnim)}stop(k=null,B=!1){!this.currentAnim||k&&k!==this.currentAnim.name||this.currentAnim.stop(B)}update(){return!(this.updateIfVisible&&!this.sprite.visible)&&(!(!this.currentAnim||!this.currentAnim.update())&&(this.currentFrame=this.currentAnim.currentFrame,!0))}next(k=1){this.currentAnim&&(this.currentAnim.next(k),this.currentFrame=this.currentAnim.currentFrame)}previous(k=1){this.currentAnim&&(this.currentAnim.previous(k),this.currentFrame=this.currentAnim.currentFrame)}getAnimation(k){return this._animations.has(k)?this._animations.get(k):null}}var H=U(35120),V=U(74560),W=U(64835);class q extends G.Sprite{get inputEnabled(){return V.m.isInputEnabled(this)}set inputEnabled(k){V.m.setInputEnabled(this,k,this)}get smoothed(){return F.qFr.getSmoothed(this.texture)}set smoothed(k){F.qFr.setSmoothed(this.texture,k)}get left(){return F.J6z.getLeft(this)}set left(k){F.J6z.setLeft(this,k)}get right(){return F.J6z.getRight(this)}set right(k){F.J6z.setRight(this,k)}getOffsetX(){return F.J6z.getOffsetX(this.getBounds())}getOffsetY(){return F.J6z.getOffsetY(this.getBounds())}get top(){return F.J6z.getTop(this)}set top(k){F.J6z.setTop(this,k)}get bottom(){return F.J6z.getBottom(this)}set bottom(k){F.J6z.setBottom(this,k)}get centerX(){return F.J6z.getCenterX(this)}set centerX(k){F.J6z.setCenterX(this,k)}get centerY(){return F.J6z.getCenterY(this)}set centerY(k){F.J6z.setCenterY(this,k)}get frame(){return this._frame}set frame(k){this._frame=k,this.setTexture(this.game.cache.getTexture(this.key,k))}get frameName(){return this.animations.frameName}set frameName(k){k&&this.updateFrame(k)}setTexture(k,B=!1){B&&this.texture.baseTexture.destroy(),this.texture=k}updateTransform(){super.updateTransform(),this.transformCallback.dispatch(this.worldTransform,this.parent.worldTransform)}get world(){return new G.Point(this.worldTransform.tx,this.worldTransform.ty)}get z(){return this.zIndex}set z(k){this.zIndex=k}get bounds(){let k;return k=this._bounds.getRectangle(k),k}set bounds(k){this._bounds.minX=k.x,this._bounds.maxX=k.x+k.width,this._bounds.minY=k.y,this._bounds.maxY=k.y+k.height}setFrame(k){const B=this.texture;this.texture.frame=k,B.frame.x=k.x,B.frame.y=k.y,B.frame.width=k.width,B.frame.height=k.height,k instanceof F.wIr&&k.trimmed?(B.trim?(B.trim.x=k.spriteSourceSizeX,B.trim.y=k.spriteSourceSizeY,B.trim.width=k.sourceSizeW,B.trim.height=k.sourceSizeH):B.trim=new G.Rectangle(k.spriteSourceSizeX,k.spriteSourceSizeY,k.sourceSizeW,k.sourceSizeH),B.frame.width=k.sourceSizeW,B.frame.height=k.sourceSizeH):k instanceof F.wIr&&!k.trimmed&&B.trim&&(B.trim=null),k instanceof F.wIr&&k.rotated&&(B.rotated=!0),B.requiresReTint=!0,B.updateUvs()}destroy(k){this.pendingDestroy=!1,this.events&&this.events.onDestroy.dispatch(this),this.input&&this.input.destroy(),this.animations&&this.animations.destroy(),this.events&&this.events.destroy(),this.transformCallback.dispose(),F.W$e.instance.game.tweens.removeFrom(this,!1),this.filters=null,this.mask=null,this.exists=!1,this.visible=!1,this.renderable=!1,this.texture&&"function"==typeof this.texture.off||(this.texture=G.Texture.EMPTY),super.destroy(k)}bringChildToTop(k){W.N.bringChildToTop(this,k)}sendChildToBack(k){W.N.sendChildToBack(this,k)}get worldPosition(){return this.getGlobalPosition()}get worldScale(){return this.transform.scale}set worldScale(k){this.transform.scale=k}get worldRotation(){return this.transform.rotation}set worldRotation(k){this.transform.rotation=k}get stage(){return F.W$e.instance.game.stage}get name(){var k;return null!==(k=this._customName)&&void 0!==k?k:this._autoGeneratedName}set name(k){this._customName=k}constructor(k,B=0,U=0,j,H,V){super(V||(j?k.cache.getTexture(j,H):null)),this.fixedToCamera=!1,this.scaleMin=null,this.scaleMax=null,this.transformCallbackContext=null,this.transformCallback=new F.HN0,this.pendingDestroy=!1,this.exists=!0,this.game=k,this.key=j,this.position.set(B,U),this.previousPosition=new G.Point(B,U),this.events=new F.sVA(this),this.bounds=new G.Rectangle,this.animations=new $(this),this.updateTexture(H),this.cameraOffset=new G.Point(B,U)}loadTexture(k,B){const U=F.Aq$.isDefined(B)?B:0;this.setTexture(F.W$e.instance.game.cache.getTexture(k,U)),this.key=k,this.updateTexture(U)}updateFrame(k){this.setTexture(F.W$e.instance.game.cache.getTexture(this.key,k)),this.refreshAutoGeneratedName()}update(){this.animations&&this.animations.currentAnim&&this.animations.update();for(let k=this.children.length-1;k>-1;--k){const B=this.children[k];B&&!B._destroyed&&!1!==B.exists&&"function"==typeof B.update&&B.update()}}updateTexture(k){const B=F.Aq$.isDefined(k)?k:0,U=this.texture.baseTexture.scaleMode===G.SCALE_MODES.LINEAR;if(F.Aq$.isDefined(this.key)){this.animations.stop();this.animations.loadFrameData(this.game.cache.getFrameData(this.key),B)||(this.animations.currentFrame=null)}U||(this.texture.baseTexture.scaleMode=1),this.refreshAutoGeneratedName()}refreshAutoGeneratedName(){var k,B,U;if(this._autoGeneratedName="",this.key){const F=null!==(U=null===(B=null===(k=H.q.instance.prodigy.assets.getAsset(this.key))||void 0===k?void 0:k.data)||void 0===B?void 0:B.filename)&&void 0!==U?U:this.key;this._autoGeneratedName=this.frameName?`${F}/${this.frameName}`:F}}}},52080:(k,B,U)=>{"use strict";U.d(B,{Y:()=>$});var F=U(62459),G=U(68910),j=U(35120);class $ extends G.RenderTexture{get rotated(){return 0!==this.rotate}set rotated(k){F.VyI.log("Deprecated. Please set rotate instead",F.$bb.Warning)}setFrame(k){this.frame=k}get crop(){return this.orig}set crop(k){this.orig=k}constructor(k,B){super(k,B),this._renderer=j.q.instance.game.renderer?j.q.instance.game.renderer:G.autoDetectRenderer()}clear(){const k=this._renderer;if(k.renderTexture){const B=k.renderTexture.current;if(k.renderTexture.bind(this),k.renderTexture.clear(),B!==this&&(null===B||(null==B?void 0:B.baseTexture))){const U=k.renderTexture.sourceFrame,F=k.renderTexture.destinationFrame;k.renderTexture.bind(B,U,F)}}}render(k,B=null,U=!1,F=!1){const G={renderTexture:this,clear:U,transform:B,skipUpdateTransform:F};this._renderer.render(k,G)}renderXY(k,B,U,F=!1){this.render(k,new G.Matrix(1,0,0,1,B,U),F,!1)}renderRawXY(k,B,U,F){this.render(k,new G.Matrix(1,0,0,1,B,U),F,!0)}destroy(k){this._renderer=null,super.destroy(k)}}},30442:(k,B,U)=>{"use strict";U.d(B,{k:()=>$});var F=U(62459),G=U(68910),j=U(74560);class $ extends G.Sprite{get inputEnabled(){return j.m.isInputEnabled(this)}set inputEnabled(k){j.m.setInputEnabled(this,k,this)}get smoothed(){return F.qFr.getSmoothed(this.texture)}set smoothed(k){F.qFr.setSmoothed(this.texture,k)}updateTransform(){super.updateTransform(),this.transformCallback.dispatch(this.worldTransform,this.parent.worldTransform)}get worldScale(){return new G.Point(this.worldTransform.a,this.worldTransform.d)}get z(){return this.zIndex}set z(k){this.zIndex=k}constructor(k,B=0,U=0,j,$,H){super(H||(j?k.cache.getTexture(j,$):G.Texture.EMPTY)),this.fixedToCamera=!1,this.transformCallback=new F.HN0,this.game=k,this.events=new F.sVA(this),this.key=j,this.position.set(B,U),this.previousPosition=new G.Point(B,U),this.cameraOffset=new G.Point(B,U)}destroy(k){var B;this._destroyed||(this.events&&(this.events.onDestroy.dispatch(this),this.events.destroy()),null===(B=this.input)||void 0===B||B.destroy(),this.transformCallback.dispose(),this.game.tweens.removeFrom(this,!1),this.texture&&"function"==typeof this.texture.off||(this.texture=G.Texture.EMPTY),super.destroy(k))}getOffsetX(){return F.J6z.getOffsetX(this.getBounds())}getOffsetY(){return F.J6z.getOffsetY(this.getBounds())}setTexture(k,B){k!==this.key&&(this.key=k);const U=this.game.cache.getTexture(this.key,B);U!==this.texture?this.texture=U:F.VyI.log(`Redundant set texture call in object ${this.name}`,F.$bb.Warning)}}},24190:(k,B,U)=>{"use strict";U.d(B,{C:()=>V});var F=U(62459),G=U(68910),j=U(35120),$=U(74560),H=U(64835);class V extends G.TilingSprite{get inputEnabled(){return $.m.isInputEnabled(this)}set inputEnabled(k){$.m.setInputEnabled(this,k,this)}get smoothed(){return F.qFr.getSmoothed(this.texture)}set smoothed(k){F.qFr.setSmoothed(this.texture,k)}getOffsetX(){return F.J6z.getOffsetX(this.getBounds())}getOffsetY(){return F.J6z.getOffsetY(this.getBounds())}get left(){return F.J6z.getLeft(this)}set left(k){F.J6z.setLeft(this,k)}get right(){return F.J6z.getRight(this)}set right(k){F.J6z.setRight(this,k)}get offsetX(){return F.J6z.getOffsetX(this)}set offsetX(k){F.VyI.log("Cannot set offset of x.",F.$bb.Warning)}get offsetY(){return F.J6z.getOffsetY(this)}set offsetY(k){F.VyI.log("Cannot set offset of y.",F.$bb.Warning)}get top(){return F.J6z.getTop(this)}set top(k){F.J6z.setTop(this,k)}get bottom(){return F.J6z.getBottom(this)}set bottom(k){F.J6z.setBottom(this,k)}get centerX(){return F.J6z.getCenterX(this)}set centerX(k){F.J6z.setCenterX(this,k)}get centerY(){return F.J6z.getCenterY(this)}set centerY(k){F.J6z.setCenterY(this,k)}get frame(){return this._frame}set frame(k){this._frame=k,this.setTexture(this.game.cache.getTexture(this.key,k))}setTexture(k,B=!1){B&&this.texture.baseTexture.destroy(),this.texture=k}setFrame(k){const B=this.texture;this.texture.frame=k,B.frame.x=k.x,B.frame.y=k.y,B.frame.width=k.width,B.frame.height=k.height,k instanceof F.wIr&&k.trimmed?(B.trim?(B.trim.x=k.spriteSourceSizeX,B.trim.y=k.spriteSourceSizeY,B.trim.width=k.sourceSizeW,B.trim.height=k.sourceSizeH):B.trim=new G.Rectangle(k.spriteSourceSizeX,k.spriteSourceSizeY,k.sourceSizeW,k.sourceSizeH),B.frame.width=k.sourceSizeW,B.frame.height=k.sourceSizeH):k instanceof F.wIr&&!k.trimmed&&B.trim&&(B.trim=null),k instanceof F.wIr&&k.rotated&&(B.rotated=!0),B.updateUvs()}updateTransform(){super.updateTransform(),this.transformCallback&&this.transformCallback.call(this.transformCallbackContext,this.worldTransform,this.parent.worldTransform)}get world(){return new G.Point(this.worldTransform.tx,this.worldTransform.ty)}get z(){return this.zIndex}set z(k){this.zIndex=k}get bounds(){let k;return k=this._bounds.getRectangle(k),k}set bounds(k){this._bounds.minX=k.x,this._bounds.maxX=k.x+k.width,this._bounds.minY=k.y,this._bounds.maxY=k.y+k.height}destroy(k){this.pendingDestroy=!1,this.events&&this.events.onDestroy.dispatch(this),this.input&&this.input.destroy(),this.events&&this.events.destroy(),j.q.instance.game.tweens.removeFrom(this,!1),this.filters=null,this.mask=null,this.exists=!1,this.visible=!1,this.renderable=!1,this.texture&&"function"==typeof this.texture.off||(F.VyI.log("TileSprite had no texture assigned, which causes a stack trace in PIXI JS.",F.$bb.Warning),this.texture=G.Texture.EMPTY),super.destroy(k)}bringChildToTop(k){H.N.bringChildToTop(this,k)}sendChildToBack(k){H.N.sendChildToBack(this,k)}get worldPosition(){return this.getGlobalPosition()}get worldScale(){return this.transform.scale}set worldScale(k){this.transform.scale=k}get worldRotation(){return this.transform.rotation}set worldRotation(k){this.transform.rotation=k}get stage(){return j.q.instance.game.stage}constructor(k,B=0,U=0,j=256,$=256,H=null,W){super(V.getTexture(H),j,$),this.fixedToCamera=!1,this.scaleMin=null,this.scaleMax=null,this.transformCallbackContext=null,this.pendingDestroy=!1,this.exists=!0,this.game=k,this.tileScale=new G.ObservablePoint(null,null,1,1),this.tilePosition=new G.ObservablePoint(null,null),this.frameWidth=0,this.frameHeight=0,this.texture.frame.width=this.frameWidth,this.texture.frame.height=this.frameHeight,this.width=j,this.height=$,this.key=H,this.position.set(B,U),this.previousPosition=new G.Point(B,U),this.events=new F.sVA(this),this.bounds=new G.Rectangle,this.loadTexture(this.key,W),this.cameraOffset=new G.Point(B,U)}static getTexture(k,B){return k?j.q.instance.game.cache.getTexture(k,B):new G.Texture(new G.BaseTexture)}loadTexture(k,B){const U=F.Aq$.isDefined(B)?B:0;this.setTexture(j.q.instance.game.cache.getTexture(k,U)),this.key=k,this.updateTexture(U)}updateFrame(k){this.setTexture(j.q.instance.game.cache.getTexture(this.key,k))}updateTexture(k){F.Aq$.isDefined(k);this.texture.baseTexture.scaleMode===G.SCALE_MODES.LINEAR||(this.texture.baseTexture.scaleMode=1)}}},9591:(k,B,U)=>{"use strict";U.d(B,{w:()=>q});var F=U(68910);class G extends F.BaseTexture{get source(){return this.resource.source}set source(k){this.resource&&(this.resource.source=k)}constructor(k,B=F.SCALE_MODES.LINEAR,U=1){super(k,{scaleMode:B,resolution:U})}static fromCanvas(k,B,U=1){return 0===k.width&&(k.width=1),0===k.height&&(k.height=1),new G(k,B,U)}}class j extends F.utils.CanvasRenderTarget{clear(k,B,U,F){const G=void 0===k?0:k,j=void 0===k?0:B,$=void 0===U?this.canvas.width:U,H=void 0===F?this.canvas.height:F;this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(G,j,$,H)}}var $=U(57308),H=U(52080),V=U(62459);class W extends F.Texture{get rotated(){return 0!==this.rotate}set rotated(k){V.VyI.log("Deprecated. Please set rotate instead",V.$bb.Warning)}constructor(k,B,U,F){super(k,B,U,F),this.isTiling=!1,this.requiresReTint=!1}setFrame(k){this.frame=k}static fromCanvas(k,B=F.SCALE_MODES.LINEAR){const U=G.fromCanvas(k,B);return new W(U)}}class q extends H.Y{get canvas(){return this._renderTarget.canvas}get renderTarget(){return this._renderTarget}constructor(k,B,U=256,G=256){super(new F.BaseRenderTexture({width:U,height:G}),new F.Rectangle(0,0,U,G)),this._renderTarget=new j(U,G),this._game=k}clear(k,B,U,F){this.renderTarget.clear(k,B,U,F)}destroy(k){this._renderTarget.destroy(),this._renderTarget=null,super.destroy(k)}draw(k){const B=k.texture.baseTexture.scaleMode;k.texture.baseTexture.setStyle(F.SCALE_MODES.NEAREST),this.render(k);const U=this.renderTarget.context;return U.save(),U.drawImage(k.texture.baseTexture.resource.source,k.texture.frame.x,k.texture.frame.y,k.texture.frame.width,k.texture.frame.height,k.x,k.y,k.width,k.height),U.restore(),k.texture.baseTexture.setStyle(B),this}drawGroup(k){const B=k=>{k instanceof F.Sprite||k instanceof F.AnimatedSprite?this.draw(k):k instanceof $.Y&&this.drawGroup(k)},U=k.children.length;for(let F=0;F{const F=new W(new G($,j));this._game.cache.addImage(k,F),B.call(U||null,F),$.onload=null}),$.src=this.canvas.toDataURL("image/png"),!B){const B=new W(new G($,j));return this._game.cache.addImage(k,B),B}return null}processPixelRGB(k,B,U,F,G,j){const $=void 0!==U?U:0,H=void 0!==F?F:0,V=void 0!==G?G:this._renderTarget.width,W=void 0!==j?j:this._renderTarget.height,q=$+V,K=H+W,z=this._renderer.extract.pixels(this);let Y;const Q={r:0,g:0,b:0,a:0,h:0,s:0,v:0,l:0,color:0,color32:0,rgba:"rgba(0, 0, 0, 0)"};let X,Z,J,tt,et;for(let it=H;it{"use strict";U.d(B,{d:()=>H});var F=U(62459),G=U(95891),j=U(77938),$=U(35120);class H{static createParticleEmitter(k,B,U,G,j){const $=new F._mx(k),V=$.addComponent(F.dLy);U&&V.setPosition(U.x,U.y);const W=$.addComponent(F.okU);return H.applyLegacyParticleSystem(W,B,G,j),W}static applyLegacyParticleSystem(k,B,U,H){G.defaults(U,{x1:0,y1:0,x2:0,y2:0});const V=j.t.getItem("particleEffect",B).data;if($.q.instance.prodigy.load.isFileLoaded(V.particle.image)||$.q.instance.prodigy.load.assets(V.particle.image),k.totalParticles=V.emitter.repeat,V.emitter.frequency.min?k.emitPerSecond.setMinMax(1e3/V.emitter.frequency.min,1e3/V.emitter.frequency.max):k.emitPerSecond.setMinMax(1e3/V.emitter.frequency,1e3/V.emitter.frequency),V.emitter.burstFrequency&&(k.burstTime=new F.AA4,k.burstTime.setMinMax(.001*V.emitter.burstFrequency.min,.001*V.emitter.burstFrequency.max)),V.particle.lifespan){const B=new F.ZxM;V.particle.lifespan.min?B.life.setMinMax(.001*V.particle.lifespan.min,.001*V.particle.lifespan.max):B.life.setMinMax(.001*V.particle.lifespan,.001*V.particle.lifespan),k.initializers.push(B)}const W=new F.Qgu;if(W.imageGuid=V.particle.image,W.frame=V.particle.frame,k.initializers.push(W),V.particle.animations){const B=new F.ibt;B.frames=V.particle.animations.clouds.frames,B.fps=V.particle.animations.clouds.frameRate,B.loop=V.particle.animations.clouds.loop,k.behaviours.push(B)}if(U&&"LINE_ZONE"===U.type){const B=new F.mYY;B.lineLocation.type=F.UvC.Random,B.point1.setTo(U.x1,U.y1),B.point2.setTo(U.x2,U.y2),k.initializers.push(B)}if(V.particle.vx&&V.particle.vy){G.defaults(V.particle,{vx:{min:0,max:0},vy:{min:0,max:0}});const B=new F.l_K;B.x.type=B.y.type=F.UvC.Random,B.x.setMinMax(30*V.particle.vx.min,30*V.particle.vx.max),B.y.setMinMax(30*V.particle.vy.min,30*V.particle.vy.max),k.initializers.push(B)}if(V.particle.rotation){const B=new F.Lzo;B.speed.setMinMax(V.particle.rotation.delta.min,V.particle.rotation.delta.max),k.initializers.push(B);const U=new F.f84;U.rotation.setMinMax(V.particle.rotation.initial.min,V.particle.rotation.initial.max),k.initializers.push(U)}if(V.particle.alpha)for(let G=0;G{k.behaviours.push(B)})),k}}},98013:(k,B,U)=>{"use strict";U.d(B,{l:()=>H});var F=U(64835),G=U(57308),j=U(30442),$=U(24190);class H{static toggleDisplayObjSettings(k,B){if(k&&(k.visible=B,k.renderable=B,k instanceof j.k||k instanceof $.C?(k.exists=B,!B&&k.inputEnabled&&(k.inputEnabled=!1)):k instanceof G.Y&&(k.exists=B,!B&&k.interactiveChildren&&(k.interactiveChildren=!1)),k instanceof F.N))for(let U=0;Uk[B]U[B]?1:k.zIndexk[B]U[B]?-1:0)),H.updateZ(k))}static updateZ(k){let B=k.children.length;for(;B-- >0;)k.children[B].zIndex=B}static removeAll(k,B=!1){const U=k.removeChildren();if(B)for(let F=0;F{"use strict";var F;U.d(B,{H:()=>F}),function(k){k[k.None=0]="None",k[k.Vertical=1]="Vertical",k[k.Horizontal=2]="Horizontal"}(F||(F={}))},88701:(k,B,U)=>{"use strict";U.d(B,{C:()=>$});var F=U(24521),G=U(35120),j=U(23029);class ${getMaxCount(k){var B;const U=j.R.loadData(F.r.PlayerStorageMaxCount_json);return null!==(B=U.itemMaxCount[k])&&void 0!==B?B:U.itemMaxCount.default}getOwnedCount(k,B){const U=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return"dorm"===k?U.house.getOwned(B):"pet"===k?U.kennel.amountOfPet(B):U.backpack.hasItem(k,B)}}},91207:(k,B,U)=>{"use strict";U.d(B,{E:()=>q,P:()=>W});var F=U(62459),G=U(36648),j=U(40671),$=U(56942),H=U(35120),V=U(44094);const W={};class q{static getAssetDependencies(k){const B=k.slice();return k.forEach((k=>{var U;const F=null===(U=q.dependencyMapper)||void 0===U?void 0:U.getPrefabDependencyList(k);null==F||F.forEach((k=>{B.includes(k)||B.push(k)}))})),B}static removeAssetsFromCache(k){k.forEach((k=>{const B=H.q.instance.prodigy.assets.getAsset(k);switch(B.type){case"spine":H.q.instance.prodigy.load.removeSpine(k);break;case"json":case"streamed-map":case"tiledMap":case"streamedMap":H.q.instance.game.cache.removeJSON(k);break;case"sprite":case"spritesheet":case"single-image":case"singleImage":case"atlas":H.q.instance.game.cache.removeImage(k);break;case"audio":case"sfx":case"bgm":H.q.instance.game.cache.removeSound(k);break;default:F.VyI.log(`Attempted to remove an asset of type ${B.type}, but a matching case was not found`,F.$bb.Warning)}}))}static getGameImageGuidByName(k){const B=G.q[k];return B||(F.VyI.log(`No asset named ${k} found in ESingleimageGameAssets enum. Try \`npm run generate:localAssetEnums\``,F.$bb.Warning),console.error(`No asset named ${k} found in ESingleimageGameAssets enum.`),q.MISSING_ASSET_GUID)}static getGameSpineGuidByName(k){const B=$.Q[k];return B||(F.VyI.log(`No asset named ${k} found in ESpineGameAssets enum. Try \`npm run generate:localAssetEnums\``,F.$bb.Warning),console.error(`No asset named ${k} found in ESpineGameAssets enum.`),q.MISSING_ASSET_GUID)}static getIconForType(k,B,U){let F;F="gold"===k?"Icon_currency_1":`Icon_${k}_${B}`,U&&(F+=U);const G=W[F];return G||this.getGameImageGuidByName(F)}static getDormImage(k,B){const U=`${V.$.capitalizeFirstLetter(k)}_dorm_${B}`;return this.getGameImageGuidByName(U)}static getDormItem(k,B){const U=`${V.$.capitalizeFirstLetter(k)}_dorm_${B}_json`;if($.Q[U])return $.Q[U];const j=`${V.$.capitalizeFirstLetter(k)}_dorm_${B}`;return G.q[j]?G.q[j]:(F.VyI.log(`No asset named ${j} found in either ESingleimageGameAssets or ESpineGameAssets. Try \`npm run generate:localAssetEnums\``,F.$bb.Warning),console.error(`No asset named ${j} found in either ESingleimageGameAssets or ESpineGameAssets.`),q.MISSING_ASSET_GUID)}static getTitanSpine(k){const B=`Default_titan_${k}_json`;return this.getGameSpineGuidByName(B)}static getTowerTownImage(k){const B=V.$.capitalizeFirstLetter(V.$.replaceAll(k,"-","_"));return this.getGameImageGuidByName(B)}static getTowerTownIcon(k){const B=`${V.$.capitalizeFirstLetter(V.$.replaceAll(k,"-","_"))}_icon`;return this.getGameImageGuidByName(B)}static getSpellGuids(k){var B,U,G,$;const H=[];for(const W of k){const k=null===(G=null===(U=null===(B=null==W?void 0:W.metadata)||void 0===B?void 0:B.assets)||void 0===U?void 0:U.default)||void 0===G?void 0:G.assetKey,q=`${V.$.capitalizeFirstLetter(k)}_spell`,K=null!==($=F.Aq$.isDefined(k)?j.z[q]:void 0)&&void 0!==$?$:j.z.Spell_storm_ioncannon_single_spell;H.push(K)}return H}static getImageGuidsFromGearGuids(k){const B=[];for(const G of k){const k=H.q.instance.game.cache.getJSON(G);if(k)try{B.push(...k.imageIDs)}catch(U){F.RQr.logError(U,`Failed to parse gear JSON for ${G}`)}}return B}static resolveSingleImageAssetSource(k,B){return B?`singleImage-${B}`:k}}q.MISSING_ASSET_GUID=G.q.Missing_asset},46808:(k,B,U)=>{"use strict";U.d(B,{T:()=>F});const F={1:"fc803f64-b097-4a02-9ccd-065a52f64d9f",2:"504d0d3f-da75-43dd-92ba-fe5a30187a98",3:"cb8a15b2-266f-4c7f-8d76-4df2e6128ea3",4:"3c5fc766-a784-48e9-b076-d45a0cfd1b1c",5:"bde236b5-b4e9-487e-98bb-260b68e1d508",6:"33921ba4-9f23-4b2f-b2b0-e2353ab80abc",7:"89946068-4db0-4ddb-bccb-16d2581aa2c4",8:"1d3b76f4-fb53-4c1d-82c2-3ab22372b314",9:"af47e456-af04-48ad-b12c-0c798e11f16f",10:"4a389156-2c69-4e74-8790-d55d464823f3",11:"36e72540-094c-4907-8f7f-e80dd07cc418",12:"8527f4be-1522-4ceb-8161-c45c61d9b553",13:"711f7aaf-c73a-45dc-a38c-8fce87d3a4ee",14:"212a3c6e-0113-4c17-a647-f0362a5203c9",15:"5207b7a8-d8f8-47e0-9db3-4998301c1df8",16:"223de309-a870-4aed-adaa-5cbe162c5659",17:"a9e11847-274a-406c-8599-93e017f4bc61",18:"01eb52e2-1dc9-4f65-99b7-157604cc777b",19:"c8062699-3d21-4fbd-9e5d-af23e8a9f969",20:"69bad6cf-14b6-412e-a50c-292cc979727a",21:"f0279fc2-fd10-44ee-b6d9-15c1635f42bb",22:"72fcf275-814c-406d-a7fd-a38cd3abaf51",23:"4ef72dff-a973-467c-8f7d-35883c5ec2a5",24:"14227a70-675e-4dda-90ec-13013d75df46",26:"096be956-d921-4b01-94cf-5296b2ad9dee",27:"30e7a29b-11ba-43b2-bd47-44bd53e31c69",28:"4c912ea4-5042-49b0-ac2f-137cca73c26f",29:"423af034-ebdf-406b-9ebb-18421ed7caa8",30:"9bedbfff-f5e9-47aa-bc9b-22ccfb0904d1",31:"02ad1891-5703-477d-9de8-14148e9aff74",32:"68cb0ab3-f4df-48b6-97e3-b51008bec534",33:"18ef3003-27e5-46fc-b71a-e59165184d9a",34:"ee399d49-98ac-4e40-a608-ddb51f4c0e87",35:"b4abfa7e-97d4-4d44-b342-75a6bc828896",36:"c955c422-dd5f-42ce-bf12-bf7b04e17ab1",37:"48ee416d-121b-45d2-83ed-37f0c5f2ffe7",38:"8e2aed7d-ab4e-4424-814a-b2b169891551",39:"c7179c8b-30a9-409a-8eb3-d132b660c0ac",40:"a1bd4731-a40a-4891-8cfd-6556e741c10d",41:"e5ecea46-b0a0-47ea-a0d6-fce83e3ea403",42:"514acf6d-258c-4830-bc54-7acda35afa20",43:"2762f59d-5aa4-4257-ad69-76cc508bf31d",44:"ddcc451d-87d8-43eb-85de-d5583367adfa",45:"0d57eaa5-96d9-4270-aacc-917e8957dcae",46:"4e3cf812-02d1-4a90-8611-bc2783f08f82",47:"b9e3faf7-de48-4a5f-85dd-bad1dbae21e9",48:"ed80cdbb-c6a6-4560-b28d-548a6f586f61",49:"0f5e554e-6640-4f35-aa08-5d9103c77231",50:"ed74cc80-3253-4820-9368-488434b7a019",51:"34247c91-a5c8-43d6-a462-2f24c20a0c50",52:"65207ca3-d40d-4e8f-a241-cc7f33ca9bdb",53:"5d45505f-721b-4c3c-b81f-7c862c3a172f",54:"e3bccf0e-2afd-4f08-a113-0e653b79a2d7",55:"71a7c42f-f624-4ac1-882d-256ae0566f2c",56:"05bee47c-6bee-4961-b90b-9e47dbcbf6d7",57:"9282f708-e29e-4427-b9b6-450b710542ad",58:"521eb027-0b88-479c-aa01-70f6b9598d70",59:"9349868c-3a29-47fe-8e77-ee003c8252e5",60:"f8fad4de-39bd-4ae8-8e72-e0a9b1ee7c06",61:"fd4a87c7-bd55-4dd1-9811-7be2859b9e20",62:"1a445a03-4696-4255-863b-ce63cbb0753c",63:"6ea9f2e8-3440-4c31-a895-d4d00b218d5a",64:"5b26adea-cd56-478d-b787-f979e78cc136",65:"6dfe4559-a044-40e8-850b-8b2496516e27",66:"e0eb302d-d4cf-4162-a1a8-fa14b2e1ad01",67:"48eb9712-a0ad-4a6d-93f4-f0c9c7dbbd23",68:"71356bbf-7525-4350-be62-6a28d6efce72",69:"7c530624-38bd-4e98-b6a9-4023db5660bf",70:"2e7d24a5-a7aa-45b5-9269-8cd3f972f4b4",71:"c3f4f422-e0a6-48ed-92ae-5b98281ee2bd",72:"f6dbd550-f849-4254-8c96-490327804add",73:"dde06240-581b-4a49-ac08-1a678b4670f5",74:"20afb102-02db-45e7-b3d6-5c0985965a1a",75:"fc95e252-4c38-4cb9-bfe9-38839c054e00",76:"f098c29c-b502-49e6-a6ff-be7b70e95fb2",77:"4188e5ff-c5e3-48ab-8ed6-6447c2ac7665",78:"e691781a-5ef1-43fc-b1c4-1113ea9ad0da",79:"632ea709-d268-4aa0-8792-4c0957c1829c",80:"91e08ac0-7aa4-4a2b-853d-b1850d86c32e",81:"60197ca4-edac-4623-a47c-0d949ddff287",82:"ac3e6cab-d35e-4a46-bcc7-f3603b0186a8",84:"905106d0-0376-4006-8dbf-5852c553ee6a",85:"d17939e1-10d6-4fae-8695-1a70059c7564",87:"51050525-d8bb-4fcc-8db6-6a5bfa19a9e6",88:"65b1cc51-052b-4ee9-8c52-4b808d009a57",89:"a4ce522d-ec9a-4f59-9875-15041ffdb810",90:"57697f5a-34d8-4d25-85e3-0770f71f4b3e",91:"c16c8fac-546e-4a8f-9699-96afe7d42bf2",92:"40a830be-16fe-4c13-99ed-24cf2d2acfaf",93:"e19ecfda-8a24-4a40-92bd-035c7c7e79f2",94:"b942553b-a06a-4c8c-b0a0-160effb3ec7f",95:"d17a542f-7dd9-43cb-ba9d-9fa34eb31e22",96:"a77d89fb-0220-4cc8-b50d-d84720b2dfd5",97:"5f1fc64c-f981-461c-967d-de22ba1c1500",98:"fe2b6457-7aa9-42b9-bcc9-c47ef41b8eb6",99:"9e0a7aab-93ac-4980-946e-25035091b8b2",100:"76ac585a-4bec-4c1b-958c-76d19b28dd8e",101:"24ec6c09-a2d4-4872-8d10-f8fdf8951a10",103:"f80b20e9-24ce-4f0c-852f-09efd8903b32",104:"0be93aaf-2599-432b-8319-d25b7d3e4023",105:"34767edb-4b03-48c6-b2eb-c150132d4b97",106:"56cd1746-83d6-43a6-b809-b1600abbcda4",107:"1f0be7f9-b5b9-4c2a-a34a-33db79e712d6",108:"04b2dca3-c52e-4fef-afd3-171d8e1ee624",109:"02c62104-a3c5-44ad-acbc-d02398349e1f",110:"7e90ec3c-2d07-4fe5-b988-71712f531108",111:"be607cec-dcbd-4d1c-8f61-40ff7286279f",121:"2f9ad04e-f86f-434e-beb3-482c05a3e99e",122:"eb5a918a-3042-44ba-ae91-40445f35e8fc",123:"8898a24e-c4c6-450b-b682-005af5b15d6b",125:"e604ea87-d9c3-4fd2-b572-bdbaf660949a",128:"4ba5ecb4-f37b-4222-a1f0-723ca2ed5cfa",131:"78543d0f-99f7-4779-85a0-fd5b4f1d8658",134:"c37e0a92-7388-453a-9b3e-da705f84c1f9",136:"69c4ab16-bd61-4b1c-a899-9591324cb922",137:"4213f26e-6502-4e1c-a0ab-155a252792fa",138:"1dd59d6e-6bbc-44e8-b50f-80b60ed4abb0",139:"5997e7d2-1e39-4dcd-923e-d9596703a358",140:"695f8d56-8dee-413f-acb7-d8d1d269286b",141:"28bc7b7d-291a-429d-a618-5dfa0b0ed829",142:"8334b8dd-a9a3-45c7-918d-38deaa562c04",143:"9db71127-4b69-474b-a14f-2f8e14492157",144:"75c94731-e067-4b07-ae7d-53520eff2dd8",145:"64d59196-1650-40cf-ba3d-0e1ba89f5063",146:"3261fd98-0e15-4334-9f66-7ccd7991ee92",147:"2c1a7a79-398b-4c1e-acec-e877db67468e",149:"c4f5f284-e29c-489b-bc3d-3d093f71ba11",150:"fd48539b-0b8e-4e4b-9e3e-ada16d096a68",151:"c9340a5c-d410-4835-bcd7-3e5f27a61e5c",152:"08f72fe4-cf27-44e9-9b22-eca718b4c84b",153:"f44accf3-0868-4fee-9903-4a6a31cb7d17",154:"7dda15a9-d786-486c-9699-214c9d303c15",155:"b5d1f28e-d15d-4144-92b1-4597be72a854",156:"352d96fd-87a0-42c6-86ba-f5f5f2fbd199",158:"6026dfea-1840-4632-a262-e0fefbfb2d37",159:"dd3d3de4-5a08-42e2-92df-510a9ec718e6",160:"b451c4b0-180b-402d-840b-26f383d0edfc",161:"14284996-79c0-44c2-a36b-9cffece19bc4",162:"4d8a543d-f259-4399-8bd9-95984910a158",163:"23cb292f-e6e2-4f3c-88a5-fcaf8bdf179c",164:"d0dcb964-e294-44c8-b39d-65aae4346034",165:"7564f48e-bfa9-4b94-96ae-e628e30d3b7b",166:"384bdfdf-ce86-4f1c-9f7b-be95d344b250",167:"50d655d4-5e85-46c8-8e46-c33a449ca975",168:"cb02d3b3-66a3-428a-86eb-9ce6ff58f707",169:"1de822c9-13b3-4b99-aded-e340240c382c",170:"cdd7bfe7-ebda-4a1c-80b1-e023608200b3",171:"34022fb5-3e06-4f9e-9e7d-afc2d3a5d223",172:"2142f025-9e21-4f6b-a964-6cfef5d1bc6d",173:"336e0c9c-cd1c-4301-b52a-b98e5fa5d9ba",174:"9518748a-13e3-4f2e-852b-4e42bd85ca02",175:"9e6845cb-93e4-4780-8567-058bf635f143",176:"c36b4076-771b-4e60-abaf-ddf0d4c86930",177:"94e1fe77-0dbe-4bbf-95e5-ea707007ed5c",178:"43a6e25e-06ba-402e-98b6-633e2c9018b7",179:"dfdd5ce8-8445-43a0-aaf0-3ab6d5b7d8d1",180:"80fe2449-99e6-4f0d-bdd6-8179802906cd",181:"d0886b67-9670-4eef-b452-0cd4f0a42d19",182:"1579afec-dff4-41a0-936f-4111f4f96cb3",183:"c6982a43-eb94-41bd-8684-777ab5bd19c7",184:"5f41427d-83e6-4de4-ac63-f14d0fc3447e",185:"48c32834-70fd-494c-bd4b-5d685c06eee1",186:"e647a8e2-fa3c-4aa2-94f8-c1a652a734af",187:"25901cbc-1f86-46bf-9b6b-494de314da2f",188:"6658ac4f-8942-4f2a-9694-49a5942f0e9a",189:"2dc4e86e-6667-4d39-9938-48539933a198",190:"7a3692c0-8cef-4962-a759-bcdd049a3184",191:"4d35970b-6c0d-4a82-a0ea-b49acdeece27",192:"9da76592-c6fd-4435-873e-df5681edb1b9",193:"0cbeb534-cf83-4788-97c4-bb7bceed8e84",194:"db7991d2-4bb6-4849-a9d2-43f3df2a45fb",195:"20f58865-7c92-4b2c-9e8b-e44b024fa102",196:"b3424a57-d677-4d5e-9094-046c94cb3365",197:"c211f913-5ab3-4244-8fb5-1ef606760b42",198:"b611fcac-649e-4993-b135-3a29c49b870f",199:"c60bce9b-9f18-46f0-a29f-dcb64da8fbaa",200:"2acaaf48-000f-48b0-8160-d7116868ee2e",201:"39470ffd-5db7-49e5-9b0b-3365f386c002",202:"4ebfee10-3b01-429e-a815-a5a2afdad49c",203:"f640ee73-5520-4062-be29-72bae4e60e6e",204:"9e1081ce-6b5b-44b0-a3bb-17f03b746d32",205:"50342091-df38-4d10-86d5-4b62ab768233",206:"137f95a6-1efe-40bb-b5e3-5d73da563226",207:"f74b757b-499d-4d7e-82bc-44870a73d7ec",208:"2d9e07e9-e5c9-4328-ad3d-7b76921e093f",211:"1c053f80-afa4-4de7-83a9-7bd8658b01cb",212:"3af064db-2afc-493c-930a-0b5591be4729",213:"606e07d8-e4dc-46fe-bd18-20fd59e29dc1",214:"770d667d-f843-4269-95d6-3e1496233792",215:"d52e1378-ee03-46d7-94a4-eabe3a7726ab",216:"7baf54d3-a94f-4217-a02c-de7a432d6473",217:"f98eb440-a797-4315-96fa-58c36a040b47",218:"e3df5753-c17c-4b08-9627-11d136a75347",219:"7f4c0349-a4c2-471e-849e-418bc6f30b9a",220:"1e5c1c74-9b7e-4484-b118-d4023d624ac2",222:"99b8c066-153f-4b64-8f31-f013999bd6e8",223:"817a489d-a299-4873-8889-d37f96a20879",224:"34b23e5f-0dff-43b8-bfff-90d1bf005095",225:"603e642d-43f7-435d-adf8-111edc412559",226:"ad167b80-ec13-4619-95fe-198a3dcf76c5",227:"d43edf90-57c6-44c0-b4df-01ea8fc2921b",228:"bf29d664-f591-431c-af02-dfa8ec0c6b57",229:"08027796-5d46-4e0a-b0aa-c428f0cf56f9",230:"deaf21f9-e416-437b-a348-38cf09bf8023",231:"1a816b0b-02b3-47ce-9d20-9a7728707697",232:"366bbcde-0f91-4f9b-ba36-11537a853b13",233:"6a8bfe5b-80a8-4f8f-96ba-8355ca13383b",234:"89bc34ad-a329-4d95-9d0a-81345dd3842b",235:"dece6029-923b-43a5-b114-dce4e3c77c93",236:"4b2943f7-f0a7-4a6b-a86a-18b49719e0c2",237:"83b0a5fd-afac-4336-b35c-d56592e8b7c6",238:"7b25559d-d6f2-4a16-9d0c-24d2b9fe1118",239:"3bdc600b-52e8-4267-b091-6c86ad4fd630",240:"fab69025-5aaa-4f86-b4c4-eea77d7b3734",241:"02b7bd8b-fea0-467c-aa98-5ab25670607c",242:"ad005f96-ace1-427f-b7eb-a84d0fe6264a",243:"c50c7501-139f-4d4d-a18c-8d07dfd8fa50",244:"48479669-ed5a-4848-b260-343ab900084d",245:"fd5f0b3c-4985-4063-8578-592845359f4e",246:"5a328e09-a4ef-4738-9aa9-1cb8d760826d",247:"510f2023-d98b-4671-be05-143e5accc46a",248:"49a3cb34-0e8e-44fa-9087-da28f6ac3262",249:"aba7150b-4e2b-41db-8f88-9833a7905e5e",250:"223a0cdc-8788-46dd-8654-96526508df14",251:"ff3837c0-5acb-4f1d-9581-b42634a9a5f4",252:"0b599ffd-5823-4b6b-930a-af1d4411f111",253:"ac2837f7-5ccb-4059-8a74-ee2267b28eae",254:"432cc4d2-be65-4a34-b1af-bd6415121788",255:"4d7789ce-6b07-459b-9580-67fdd9f0ad4e",256:"64f957f0-95ab-49a4-a8f1-8fb2d412962f",257:"d9b2b923-1cef-4701-bb6b-66cf4fb18a7f",258:"f3ec331d-35b8-421e-90a7-314ef44f0887",259:"da4c7159-fbb2-4b7c-9f96-1b88e91b7c88",260:"7858415c-b99f-4f6d-bff3-d9bf5e66f8dc",261:"5673ba5e-d1a8-40b2-8cfd-2d91fdca9977",262:"e64ef4fa-2ae2-46f2-bfd8-ae4dab232e46",263:"8089f5bf-ad38-42e8-ae5b-6c77b9d60e2e",264:"84b152d0-8202-420c-89bc-22a129ede8bf",265:"cf0cfdeb-04d0-4218-8fb6-be4c31a186f8",266:"56e2cb99-bcff-4bc1-ab86-1631fc1c82c8",267:"5e758c86-4462-4abd-9a4e-fa1b0fbcf0f7",268:"c74886af-7e0d-41b1-b347-cf2b5ced4885",269:"cfa2a157-1044-46cc-b7f7-fedc7f1a9efd",270:"12c7cd6a-8528-4f37-9db3-2c37422cfdad",271:"5072a2e8-93eb-478c-900a-80b8a6649496",272:"81140ff9-5019-4538-909e-ecd0f4a96508",273:"df4c4416-f741-4a2d-8f3a-a4417fc592c6",274:"62292d8d-279f-406b-93ff-cfaf076b58aa",275:"f42ddee5-4e78-44bd-bd3d-d9cbdb586bea",276:"4cb02221-b4fe-46b8-ad53-3ac666ae9d81",277:"80b17525-4e04-44a3-9c71-27b895a4e024",278:"35f406ed-3d0e-41d7-b9c6-a5286ba584dc",279:"91e32f85-b86e-4024-874e-c0d6352fc92d",280:"8f9744b7-1e48-4b25-af31-e983dad3cfe1",281:"31fe7b8f-b748-437b-9069-dee8587d8014",282:"8be164c6-81de-425c-84ea-7f0f5101ca4c",283:"1e2a857c-8213-4425-8264-bccffe30bf18",284:"903f80d7-8550-4469-a299-291251fe5cdf",285:"4c780a71-5340-4cd3-84f0-a188391b8edb",286:"e776d8a6-115a-46fa-b2e8-00ce0241d654",287:"a82ab69c-02a3-40c8-a834-8385a80aebf1",289:"65d81152-57d7-4976-a35d-866f93ae5815",291:"e3dc2984-f573-42cf-baf0-f1378b58701e",292:"fb7e84ef-e017-4834-a0ce-4cc11dffc8d2",293:"1913f297-e6b6-4361-9eb6-080f71921f87",294:"bd404e85-187e-4418-a4c8-8138c889808a",295:"d6e4a580-1b94-4c5d-b77b-f390863f8ba4",296:"aedb7485-8e26-498c-8b7d-e717987c08f7",297:"bcf28ad1-373b-4fd7-bc43-1e159725341d",298:"ec303811-f85f-413f-9634-8caabfd06d2f",299:"0b7c3353-6edc-4c40-992a-8a23cae62ee3",300:"f3c0de9d-4197-41ce-8506-9b9b3ee59a86",301:"37e9abcd-f9e8-4759-a14d-a69c44d42833",302:"354ee9b9-050b-4c02-962e-57dce14347c9",303:"0526a8bd-8dff-4ecb-a9af-7deecbabd66b",304:"1ac4dce7-c3a2-4341-ac23-02a5a4f6615e",305:"30f45757-15fb-4e3d-84e0-5d0e7c24f5a4",306:"bc4f37ea-dd54-4a7c-97d5-9f64e3a9b2c8",307:"a3d578cd-085b-4c7d-8d5c-5ac2728b517a",308:"21ab0b7c-d369-4ba6-9787-24d385447f1d",309:"3bba2a66-fa68-432e-875a-7f24223ff0d0",310:"e1442215-f547-4d1e-8b20-bd9952bb9b2c",311:"ae5bdf4f-d891-4452-ab71-647090e19bbe",312:"cc2a740d-91ad-4148-af3f-ba8565d5a2b9",313:"811ff008-78cc-4ed3-bc80-3275890ff601",314:"7c097985-7087-4043-abc7-985918c9c5d4",315:"dbe28384-132d-4ba1-9597-f5693a5c2e47",316:"e8281bf1-1e28-4240-9568-9d6669265283",317:"92fe4952-eb5c-47bb-8bf3-0fc019d6c49a",318:"5b6e5f17-5c5e-432b-a31b-2e8d726b7e0c",319:"920cf589-b733-4530-a515-0cb2cf52197d",320:"5c305e63-28e3-4cca-8be4-5910196c4d5f",321:"2d92dc5a-4bf9-40e9-9e8d-e3927b0b006c",322:"4e547add-25b8-4120-8c3f-abd47ad321fd",323:"74a944e6-b977-4ab1-8676-62f6b3fa0852",325:"012158f8-2e88-4289-bc27-8ca0af20ae33",326:"3a8f6b3a-fdb4-40e2-bb2f-f510c8dc7970",327:"99756734-c409-4a1c-9e2b-fb184385abfb",328:"63644092-6e0c-4008-b9bf-56e052e13bda",329:"c83f5774-380a-4bcd-9704-37b75eb535ac",330:"914cb856-6ae8-4492-bd57-195b4727dfe0",331:"b4933d6f-4730-445d-b4d9-d80153ea1e38",332:"37b4be5c-46be-4db7-8830-a427be35944f",333:"b6eead11-6a94-4926-b209-a48c833fb284",334:"d35485e1-ba06-4762-a8eb-8309202d1bbd",335:"e260bc51-a481-463f-b2a8-d371934176e6",336:"2100645f-a74d-432b-9cbb-240600dbd60c",337:"5d2d8057-1d1a-4fdb-86db-163c94d7d7cd",338:"c63d2ffd-78e9-4e0b-af32-9cb9729ee579",339:"f45d1d33-8e2f-4c9c-a47e-4cf1db19a1ca",340:"174e9865-8ac6-459f-abed-f6049c437d8a",341:"5b15b8d1-d9b9-4d50-90bc-e2420a380a8b",343:"7f9a4ec0-0d90-4b0f-a4f9-025a93bca33e",344:"c9d3b0f0-1385-4b5f-b73b-f755384c6d06",345:"826fde9e-0f3a-4ae2-b50d-13940715f87f",346:"3528ffb5-8832-4313-a612-c502cd69d9c4",348:"156dbee9-e95d-4694-93c6-03b7aa8e98c5",349:"503b6560-6454-44ce-897f-fb674c4de2a7",350:"a405b70f-e6de-4ae6-8f3f-beed6d9ff4c2",351:"34d38842-b451-4a6d-9c0c-bb815b376e79",352:"71f54c3a-e70f-475b-be02-ac446e464434",353:"8c28dd05-f858-4a22-b49f-44e0508da235",354:"1a6b96e1-7505-4786-935e-cc99b5903dfa",357:"988176d0-042d-48e6-89a1-4e74ea299ed9",358:"4872669c-77d5-4f02-96ac-dca4174fc076",359:"4143b4b9-7cc5-4088-9e07-edd2eb9409cc",360:"3909edca-f54d-4cad-90d7-6af556567289",361:"dc93dfc6-5aa8-4521-b827-d85cc1ccb7a7",362:"6f82f043-fad8-4549-b8ee-777661f42659",363:"529faa7d-c2b9-4093-be2c-e846a7108135",364:"43705ebf-a99d-4052-ba1f-db23639584e5",365:"847f69fd-cca6-40af-878c-84aba7177752",366:"027d61cb-8ec9-48f2-9ae6-5d202b1afac9",367:"cbfbce18-4263-4f68-b6ad-ccd75b3fc45f",368:"ce8b1180-02b5-4ce7-8e0d-f64739a1300b",369:"1c1e6d7f-cf57-456b-bb6e-7002dfd06b9e",370:"cbe930d4-390b-479c-adc3-45983a21357c",371:"9107925c-10db-48c5-8be3-c79442878f50",372:"3123994a-1477-447c-8c63-6015ab50065d",373:"9c798ef5-555b-4c03-b7c3-213652d21fa3",374:"6b3964e2-d7e7-4b09-9269-0fd0510607e6",375:"00d18425-5436-453f-aabb-2507cbfb8886",376:"8950987c-6f03-4f45-a161-a2fdcb48d11b",377:"d31a96eb-8190-4bc0-8a2c-93df4ce837d8",378:"f0105505-d0d4-41de-882b-db53c4cf184c",379:"e71144dd-f093-4a36-b40b-79330b2c402f",380:"77758c5c-fc35-42f3-af54-b2afd2c62bae",381:"22b45ec9-fe31-4cd5-a1f0-39aafecf1a89",382:"87a018f2-463a-4df5-8282-a1baf5d2abe0",383:"dc392e6f-3bb5-4c22-ab64-1ece78d4b720",384:"079367aa-95f4-4a69-b611-0d8f5cadd88d",385:"563a4fcf-fd69-48f7-a33f-3aeb9cbbab12",386:"f2d8e404-9426-4bc3-997b-20ee9614787b",387:"b8fe6772-4e70-45db-ac94-03807d2c29cf",388:"12dc2816-1bc7-4c91-8ec2-49f9e71fc56c",389:"dc9fe622-a67a-4b88-bdf3-f91931f84ac2",390:"0591ca90-f9c8-43af-a85b-5629e9c71bf6",392:"93877c15-e507-46d5-9534-31fba16886bd",394:"fc775cb1-3fc9-4ca9-a6c4-44e09fb241bd",395:"cc209739-9ca6-4781-8b81-d2369dab2477",396:"cba4e27b-007a-421b-ae3d-ca80bb7725f7",397:"c32fbece-26d7-43b7-bcad-698cd540b465",398:"04e0b298-53ac-452c-9f4f-477ee891cee2",399:"bb95e49c-7053-4edb-9bb2-2d22a1a4d8fd",400:"af3d0a70-f46e-4bdc-90a8-78b13e9e75d6",401:"9048c6aa-ce8d-425d-9c14-efeb73cb3055",402:"9d21ed51-3879-4e7c-a998-a2403b193965",403:"aa2a8aa2-2eae-4e74-bebe-cc95eb57c917",404:"a6b0b5e6-04f5-4156-a113-77d6f0ed461c",405:"2148f49b-9ee4-4e60-ae71-60637575caa3",406:"84f91d37-1a29-423a-8869-7d6df2d58411",407:"4f4ca7b6-9e03-44d4-a7f5-f254372fe451",408:"f4b85b2b-0865-4e0f-8bc2-92a42f9a9297",409:"16a826f9-8d6d-4e6d-92bb-2c67fb5aa5a8",410:"c913c045-2053-469f-aae9-64cabf3e22f8",411:"53fe1e6b-3e89-4750-9a82-80ef6b7a3da7",412:"14c030c3-e163-4167-a472-d57062c278a9",413:"fed14908-e145-4d1a-ae31-7fe23cc1fccd",415:"147e34f5-e1a4-4186-8d71-b1760e105081",417:"ecf56d28-6b95-4e39-add2-2527fae268b4",418:"3824fd5e-d75f-4db5-9ef7-4bdaf8e25b77",419:"da0068bc-3803-4b05-8bda-f76f96a91a8b",420:"5591e0ad-ecc6-494a-9121-4f4f9171fee2",421:"0704badf-9000-44e0-af63-42de090cfe62",422:"79470531-f247-41ab-9eae-7fe353f669e2",423:"819901b9-7cf0-4541-b1fb-e873f8c2dc3b",424:"d2cdc4f1-9e27-4b36-ad39-9b9c6d9d8558",426:"c778624c-abce-49cf-8363-426fee511af0",427:"c2a0bc7a-2fee-4e7b-a32c-62e32f4f90c5",428:"6181e9e3-bd5d-4e4c-827a-714e370e960e",429:"3e59e756-697c-46e5-9d68-6d6f024bfc5f",430:"73d018c9-176b-4f9a-ad9f-bb62d5fc4aae",431:"078a5b4a-0019-46e7-a078-df1d9ffa46ab",432:"1c141553-8b65-4dd6-9398-3e4e458f8ddb",433:"419e1bcb-9354-4eae-8ab3-a650c4188540",434:"cb5675f1-a15c-4e61-9a93-feceb823d6e1",435:"8aa8df9a-e2ed-4751-9188-d0527e41fbab",438:"51511cac-c7c9-4d10-bb33-a78c42f5ec68",439:"cba8f9c9-b62c-4873-a571-57e29977ae5c",440:"54d80c70-5534-4a9b-86b2-208d52e07772",441:"97c8db6d-57ea-4be2-aff8-aba319fed26f",442:"2a318f65-0bae-4e36-b551-84f93be3eede",444:"7885b29f-39fc-4577-8145-63dfbceff6e5",445:"48eaae11-08d6-4d6a-861a-d307655ad48e",446:"82acc4ed-cae0-4424-9bbe-27456d90adab",447:"aef5d065-6408-4e5e-a6f5-bdc395ce578e",448:"e84b5762-b3d5-448b-9cb3-3d0985fcd04d",449:"612a1513-1a3b-4595-897a-86520dd1085f",450:"2521a48e-7f55-4879-ac68-dd74bd1487a2",453:"70c0a518-8be9-4213-880a-9e969145fbb8",455:"81ac35d7-d7c5-45a8-b30c-3e0ed97297ff",456:"f78090fc-5f1e-48dc-8215-2825d4eec7fb",457:"026d935c-bcf3-4a4d-85fa-c757e464b020",458:"86c8c8fe-6fb5-47a5-81b8-00b9f9c91810",459:"3508c69a-337e-47fb-b694-9bd81bcf0200",460:"f7e5db39-39fb-4bea-8b2a-1515077d59d6",461:"b55a5daa-5286-4981-bca3-65a1fbeadfb0",463:"44cb5816-7653-4c8b-941f-27905efa541b",465:"373cceb4-7f45-4036-8a49-7de1c3ac67d6",466:"0d366e67-7073-4a92-86ba-f92b9782ad83",467:"af453859-a3bb-45f4-8137-ec59b3843a52",468:"ec371e9c-5108-48dc-91dc-f90e204868ad",469:"358d439c-9469-437f-a4d2-f0141aee13b5",470:"82920f4f-16e2-49d0-b138-0e3189f59769",471:"4202a0d0-28c6-42e9-a685-23e8452513ff",472:"0d729724-f289-4e92-af91-33c01bc80ec2",473:"5933364b-663b-40bb-84ac-ad2865a29a99",474:"0ab532ea-6c66-409f-8869-f030fbca04c6",475:"baf20088-5ecc-4def-941a-b0a57a0b74a1",479:"04c98e28-ed1f-416c-81d3-4fc0784cf51a",480:"12a01b2f-9bdc-4562-9fe9-5b385632cd61",481:"043bdba6-97c8-45ce-9ecc-1752efb7065c",482:"bda88deb-aca1-423c-bf56-6ed7f614a5d9",483:"b7b5dd59-f0bb-44b8-bae6-29ed6e99fbd4",485:"8f7c6c8a-9d45-4e7f-8f7c-ab52017dca0c",486:"3c7dd26d-b97a-47f4-bd2f-78c59d1c51aa",487:"e91873dd-cf4a-43bb-893f-31102f45108f",488:"f23663c4-440a-4c4f-8d47-d91ee72e5b15",489:"bcf8417b-6359-43e7-9785-2210028b6d20",490:"afc9e698-77b8-4aae-af6d-31898c9f4faa",491:"dbbab5c9-3c7c-47ab-a896-3a757191aa1b",492:"2900f01c-02af-4819-92ab-5b8f5cb70b4c",493:"b6fa975a-3c68-4fbd-8dbf-7b310fbb0ea5",494:"b89030af-5691-4493-b95b-6c55914a363d",495:"5b7fa77c-e106-49d1-8a50-fd30d6add7d0",496:"2d7788b8-e481-4f5d-aa39-b8c52ac29170",497:"666f2649-ace0-4696-9780-d034685220e2",498:"16b34b84-6ca3-4641-9353-aac17071c28a",499:"070c7f92-2031-4aaa-b70b-a941bb3e1ca1",501:"6f1b9955-bab3-41ad-b547-25edaeb5ede9",502:"7f569c4c-25b8-4b44-8177-526b8ab8157b",503:"deb4a8a1-51f0-426b-b93e-e10124aac6f5",504:"0779b9be-f064-41cc-86d0-1880bb1fd21b",505:"dfeb3c65-9c38-451b-84a2-30695868d579",506:"534113f9-fd78-4330-96cb-60ae8bd5e6bf",507:"171721fb-5707-4ca6-a63a-720ceb050943",508:"e614e66d-6b42-47f9-8cfa-08ed393f42a7",509:"b18a2200-71d6-4b84-8953-bc2b2fb1d2cc",510:"f249ac19-1c03-424b-9cec-71ef1ca0bc0c",511:"0124ca74-995c-4ac0-94cd-5882208a64ff",512:"34dc3421-4b81-4317-ba07-c49c197a17ed",513:"c2b1f0d2-b105-4e84-a25e-4767eb5d891d",514:"fa5bf8a3-11a4-40cc-a01b-741011b0cb0c",515:"f6c73014-0236-41e8-a800-3377f3445a6f",516:"7b7e6f0d-4f5b-4fcf-981d-6e0bfdf041c1",517:"44c2887e-33bb-4079-b86d-eb6c51355254",518:"67a7bd11-9c7a-42e4-a18d-3ee7e70ca835",519:"81a31dc9-e710-409f-abe0-575f12761e94",520:"b22652bb-f0ef-4d81-be04-655b16e3a779",521:"c248c8b1-4fae-42ed-8ef5-800be0d43eb3",522:"6c13c725-e537-4bb4-8692-f60ed2d0a86a",523:"cc44b924-9b89-45a1-93c3-d957262ad0c2",524:"545d11fe-d959-46f7-a5ec-fd87b7b99485",525:"cb7c9d1e-812d-4ba7-9033-c8b90d9d9fe2",526:"4ab7d0d5-5304-4c57-9a27-db2268af61ec",527:"cf900e63-412d-4e36-a708-1808d347e79f",528:"55dd2d85-d0ef-4e64-9941-a1bdf15510cb",529:"9d679a90-8501-4940-9516-82850969e803",530:"3419ced9-d7aa-41bd-9e5a-d6be9d8beb29",531:"8950c958-8bca-4c31-a8d6-fbd0720ca4e1",532:"b609e72a-928c-48d6-ab30-829f4fe7a705",533:"dd4dc09f-9d51-40b5-8846-6393951c2bdd",534:"ac514889-4da6-48d5-87aa-466390fc728f",535:"445d5673-7b53-43d1-b8c5-4be32170061f",536:"f5f8abfe-6766-4981-ad51-edc544561bf8",537:"b388ddef-c031-4e98-ae1c-e32975e7fb00",539:"34a7a6af-968e-460b-8f8e-802b9ba7440c",540:"da6bd42e-06e0-4dc5-b976-caf20800ba67",541:"5c4a143c-6103-4499-b9d5-354947fc4ca8",542:"096c42b7-328f-4c0a-96c5-b73a6d5ae0a3",543:"04d027a6-0c1f-44ca-8533-0b4cdbf1625d",544:"2ec4f959-a938-42d8-9dc4-c81d2aa10ee6",545:"36cb2e5d-2f22-478a-ba0e-ab457e71cae3",546:"a67c78cd-5248-4c80-be20-c1628ba91b03",547:"4f8ef35e-4f88-4a91-8504-50aa4c0b818c",548:"1363552b-404e-4934-8a63-e3722ac40985",549:"e93677d9-c599-40f5-a1e0-29f8e18703ff",550:"af62580e-21e5-492c-95fd-1f9269b8dce4",551:"940aa9a9-d8ba-40fe-8460-c2fd906a0187",552:"2326a266-af06-471d-91ac-2922aa209e6e",554:"dff034f0-d1e4-4863-aa9f-9fc92e92467f",555:"ff0b8d68-96a0-43f1-ae16-43d04f32bcf3",560:"e741c190-7589-4ab2-9a85-8668b3c4210a",561:"2df094ca-b6bd-4ca1-aeb3-be207554ddba",562:"a36349f7-a54a-47e2-9847-3400811999f7",563:"757fd180-0ff6-45e1-97c2-aa98f96f555b",564:"eb5cd5c8-25dd-4f7f-a72b-441a22e0f741",565:"505ae35e-457c-4dfb-a633-170572a4cdd7",566:"6681990d-e0bb-405f-96d5-959779ec0ca8",567:"9c4f6c89-7f71-445e-8471-2a3ea3c9629c",568:"5f381732-e54c-4979-b8fd-aca5397c8c6b",569:"2561442e-2c52-47f9-9a7e-2a20636e4498",570:"9e3ab9de-9b8a-4f21-8b6f-29edc0a1ba40",571:"a0d3dd32-5238-43b2-b475-603291ec6c92",572:"f70cce4d-e26c-4b8d-8ec4-13d249d99897",573:"2040e562-f68c-4c50-a6fe-1261dd1a266c",576:"cbfdca48-c3aa-438f-a67f-4d26d317e74d",577:"fd84b30d-b484-4f4d-9b46-e9f3976001cb",578:"f027a0e2-6d68-4e54-93ec-8e98fe5c2fe9",579:"4ce8d681-6a12-4845-b10f-ebf42407afde",580:"0ca8c9f6-2491-4de5-9bbd-5bd7f11c4279",581:"5c30e061-478b-4eb3-aa29-cb10ee3c1ffa",582:"29f4b7f5-e3ba-446e-8cfc-72b5989ea676",583:"8e9027db-2ad9-484f-8cf8-bcde815666ad",584:"579ffa03-9580-492c-ad39-52b5e4c1ab41",585:"298d257a-cfc4-410f-b88f-7490a5919f60",586:"8d7d1956-7cae-43f6-ae50-5e6c864b27c5",587:"4e95401f-26d8-4579-95aa-92c2e0848e17",588:"07a17daa-a30a-41e8-8a5c-341c2141910d",589:"bfea05f6-bb3d-472d-ad13-2601f2f565e1",590:"7aa91b45-f736-468b-a230-f701e4e5d537",591:"a898481f-808d-48dd-91db-cb9441348489",592:"6f2053ec-0878-4085-a82c-82a175a34a24",594:"699b2e8b-3fa0-41d7-a611-5afa37d8a5db",595:"edb041a3-1ca6-4227-aad1-375d9f64152f",596:"76bfd317-9e3d-4aaf-ac97-6feec08665a4",597:"bb0e4fe9-0e05-42b9-a1c6-8661eb5af225",598:"239994b5-7083-45e2-a3ad-e50ca244de35",601:"3e8bba0f-fc57-4411-8180-ac8948aa48ed",602:"cb5e8924-3786-4bf9-bba2-093015746764",604:"6aa5e0b9-7545-4667-94a1-ae40a3a30948",605:"decb2378-402e-4aa8-8c3c-60d53a3eb645",606:"81b1f0c0-a916-418d-819e-503b6cf2e1db",607:"ce934a91-04c7-426f-8f15-e0e7cf286b95",609:"1a6c4a6b-6b28-4bd7-87c9-d6b85bd5214e",610:"2521f763-4cda-4591-a900-a22b2165e0a6",611:"6a8dfea7-4502-4076-bd16-b836a8c26dd8",612:"f510a78c-c78e-4925-aa9a-f39e27e598d7",613:"af15c3bd-ba60-44ff-a3a6-b92fd7809ad6",614:"62f060d8-fe93-442f-8ee8-8fd134c62dc0",615:"c7db91ad-cca1-4b93-9d2e-7405e26fab5d",616:"3cf83603-330a-4678-b0d4-2168d2f2eaee",617:"b8f1822d-03b5-4810-bae3-26ba898324c1",618:"c73d11f1-e4b7-41d6-bf14-a7b77d9c479d",619:"a49b5e5a-be60-4e4d-bd7d-d17997631f50",620:"be90c9bf-2ec5-4056-93a1-e110fb943698",622:"ec57fae7-32d4-47e6-8d8d-7e29facca662",623:"02fdb444-8d07-4d29-a6e0-d838bd055fd2",624:"e60eb95d-edd6-4059-aa5f-277638962bf4",625:"b1c32946-40e5-4300-a9e1-ffebeca08c8d",626:"071a9314-cf6e-4f72-96e3-1178184c8740",627:"d7f0d300-5a11-402c-8e3f-19799012508b",628:"58577cd9-84d6-4ed6-aecb-a29fb9caaee4",629:"fcae3fa5-7f32-4534-a4f5-b681d2703bdb",630:"6caba0df-9b6b-492c-afeb-b99819731377",631:"21b3713a-c1fc-400e-93fd-5549bff7bbbc",632:"84d242fd-9351-49af-b7bc-80c63b642562",633:"cd7aebb2-b11c-4d0a-b42b-6375df078236",634:"77d7d87e-aee7-4586-88fb-b32c02aba256",635:"9b53da2f-8af0-4c29-801e-5572b4069455",636:"533091ab-295a-4cfe-8125-bb510b2f2642",638:"ecf56d28-6b95-4e39-add2-2527fae268b4",639:"956e86c9-3164-409d-9601-4ee7a68f22ff",640:"5f0eacd7-0dcd-4326-9856-4a20f3601365",641:"0b472392-029d-4f18-b03a-30585867d61c",642:"69653e47-a7bd-4d50-9d61-5e472da55d51",643:"6c070d30-d2d9-4f65-ba99-0e0c593e0374",644:"c9d43dce-e6fe-4893-be1a-57c7bd5d199c",645:"aba58103-a05e-47e6-90fb-8dcf6f46756b",647:"37a4238b-4bcf-4da7-9853-d249281c53fc"}},29738:(k,B,U)=>{"use strict";U.d(B,{s:()=>H,O:()=>K});var F=U(8674),G=U(62459),j=U(86663);const $=(0,U(77601).gb)({key:"rpg-game-locale-control",activateAssociatedExperiments:0,default:{enabled:!1}});var H,V=U(35120),W=U(76277),q=U(19850);!function(k){k.EnUs="en-us",k.Es="es",k.PtBr="pt-BR",k.DeDe="de",k.FrFr="fr",k.JaJp="ja"}(H||(H={}));class K{static get localeCode(){return this._localeCode}static determineLocale(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=j.qg(window.location.search);if(K.setLocaleCodeByString(null!==(k=B.locale)&&void 0!==k?k:B.lang))return;const U=yield this.getLocaleFromGraphQL();K.setLocaleCodeByString(U)}))}static setHTMLLangAttribute(k){document.documentElement.lang=k}static setLocaleCodeByString(k){var B;const U=null!==(B=null==k?void 0:k.toLowerCase())&&void 0!==B?B:"";if(this.isValidLocale(U))return this._localeCode=U,this.setHTMLLangAttribute(this._localeCode),!0;const F=`${U.split("-")[0]}-`;for(const G of Object.values(H))if(G.startsWith(F))return this._localeCode=G,this.setHTMLLangAttribute(this._localeCode),!0;return!1}static isEnglishLocale(){return this._localeCode===H.EnUs}static isValidLocale(k){return Object.values(H).includes(k)}static getLocaleFromGraphQL(){return(0,F.sH)(this,void 0,void 0,(function*(){try{const k=V.q.instance.prodigy.gameContainer.get("40f-f847");yield k.loginPromise;const B=V.q.instance.prodigy.gameContainer.get("8bb-7057");return(yield B.sendRequest("query PlayerLocale { viewer { languageTag } }")).data.viewer.languageTag}catch(e){return void G.RQr.logError(e,"Error fetching locale from GraphQL")}}))}static tryApplyLocaleOverrideFromFeatureProvider(){const k=(0,W.G)($);if(k.enabled&&G.Aq$.isDefined(k.overrideLocale)){if(K.setLocaleCodeByString(k.overrideLocale)){const k=new q.K(K.localeCode);V.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).setDataSource(k)}}}}K._localeCode=H.EnUs},34829:(k,B,U)=>{"use strict";U.d(B,{A:()=>j,s:()=>G});var F=U(62459);class G{static get(k){return this.constants[k]}static set(k,B){this.constants[k]=B}static setLogLevel(k){if("number"==typeof k)F.VyI.setLogLevel(k);else switch(k){case"dev":case"verbose":case"all":F.VyI.setLogLevel(F.$bb.Verbose);break;case"warn":F.VyI.setLogLevel(F.$bb.Warning);break;case"error":default:F.VyI.setLogLevel(F.$bb.Error)}}static setDrops(k,B){0}static setSpawnRandomization(k){0}static getSpawnRandomization(){return!1}static setGameConstant(k,B){this.constants[k]=B}static addExperimentConstant(k){0}static setNFactor(k){0}static setCrit(k){0}static setEscapeChance(k){0}static setBench(k){0}static scaleEncounterDistance(k){0}static setRespawnTime(k=120){0}static getGameSpeed(){0}static setGameSpeed(k){0}static setFeedLimit(k){0}static overrideUserRank(k){0}static overrideUserPoints(k){0}static setUnlimitedWheelSpins(k){0}static setWheelSpinDuration(k){0}static setMonsterRadiusVisible(k){0}static setMonsterSpawnDebugLogging(k=!0){0}static setMaintainAspectRatio(k){0}static overrideLastLogin(k){0}static overrideDateToday(k){0}static resetMaxPlayerLimit(){return!!G.isMaxOnScreenOrigSet&&(this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_MOBILE"]=G.maxOnScreenPlayersMobileOrig,this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_PC"]=G.maxOnScreenPlayersPCOrig,!0)}static setMaxPlayerLimit(k){G.isMaxOnScreenOrigSet||(G.isMaxOnScreenOrigSet=!0,G.maxOnScreenPlayersMobileOrig=this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_MOBILE"],G.maxOnScreenPlayersPCOrig=this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_PC"]),F.o5U.isMobile()?this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_MOBILE"]=k:this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_PC"]=k}static getMaxPlayerLimit(){return F.o5U.isMobile()?this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_MOBILE"]:this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_PC"]}static setKillGore(k){0}static setForceCast(k){this.constants["GameConstants.Battle.FORCE_CAST"]=k}static setForceOpponentCast(k){0}static setMorphDuration(k){0}static setCharacterCreationDate(k,B,U,F=0,G=0){0}static setSplitTestLane(k){this.constants["GameConstants.Features.SplitTests.DEBUG_LANE"]=k}static setHardCodedItemTablesAwardAll(k){0}static getHardCodedItemTablesAwardAll(){return!1}static setFreeBattleRewards(k){0}static setMemberBattleRewards(k){0}static getFreeBattleRewards(){return null}static getMemberBattleRewards(){return null}}G.constants=window.__PNP_CONSTANTS_RAW__={"GameConstants.Build.VERSION":"2026.25.0","GameConstants.Build.SHOW_FPS":!1,"GameConstants.Build.SHOW_DEBUG_VALUES":[],"GameConstants.Build.MUTE_BGM":!1,"GameConstants.Build.FRAMEWORK_LOG_LEVEL":2,"GameConstants.Build.ASSETS_LOCATION":"https://cdn.prodigygame.com/game/assets/","GameConstants.Build.ASSETS_FOLDER":"v1_cache","GameConstants.Build.TELEPORT":"","GameConstants.Build.QUEST":[],"GameConstants.Build.ITEM_TYPE":[],"GameConstants.Build.KILL_GORE":!1,"GameConstants.Build.EASY_MODE":!1,"GameConstants.Build.MEMBERSHIP":!1,"GameConstants.Build.SCALE_MODE":0,"GameConstants.Build.ADD_PLAYER_FPS_THRESHOLD_LIMIT":20,"GameConstants.Build.ADD_PLAYER_FPS_THRESHOLD_RENABLE":25,"GameConstants.Build.MAX_ON_SCREEN_PLAYERS_PC":30,"GameConstants.Build.MAX_ON_SCREEN_PLAYERS_MOBILE":20,"GameConstants.Build.MAX_ON_SCREEN_FPS_LIMITED":5,"GameConstants.Build.MIN_ON_SCREEN_PLAYERS":5,"GameConstants.Build.SKIN_FOREGROUND_FPS_THRESHOLD_LIMIT":25,"GameConstants.Build.ENABLE_FRAMERATE_METRICS":!0,"GameConstants.Build.ENABLE_LOADING_METRICS":!0,"GameConstants.Build.ENABLE_ADVANCED_METRICS":!0,"GameConstants.Build.DRAW_TRIGGERS":!1,"GameConstants.Tower.MAX_FREE_MEMBER_FLOOR":5,"GameConstants.Debug.AUTOSAVE_ENABLED":!0,"GameConstants.Debug.POPUPS_ENABLED":!0,"GameConstants.Debug.PLAYER_CARDS_ENABLED":!0,"GameConstants.Debug.ENABLE_MAP":!1,"GameConstants.Debug.BYPASS_ENTRY_SCREENS":!1,"GameConstants.Debug.GET_PET":[],"GameConstants.Debug.SET_LEVEL":0,"GameConstants.Debug.DISABLE_ACHIEVEMENTS":!1,"GameConstants.Debug.GET_GOLD":0,"GameConstants.Debug.GET_SPELL":0,"GameConstants.Debug.COMPLETE_TUTORIAL":!1,"GameConstants.Debug.FORCE_DROPS":[],"GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE":1,"GameConstants.Debug.MONSTER_RESPAWN_TIME":120,"GameConstants.Debug.WIZARDS_ENABLED":!0,"GameConstants.Debug.AUTO_RESOLVE_BATTLES_ENABLED":!1,"GameConstants.Debug.GAME_SPEED":1,"GameConstants.Debug.FAST_GAME_SPEED":0,"GameConstants.Debug.FSM_LOGGING":!1,"GameConstants.Debug.DEBUG_LOCALIZATION":!1,"GameConstants.Debug.VERBOSE_LOCALIZATION":!1,"GameConstants.Debug.AUTO_RESOLVE_TOWER_BATTLES_ENABLED":!1,"GameConstants.Debug.EDUCATION_ENABLED":!0,"GameConstants.Debug.EDUCATION_LOGGING_ENABLED":!1,"GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT":1,"GameConstants.Debug.UNLIMITED_WHEEL_SPINS":!1,"GameConstants.Debug.SKIP_MEMBERSHIP_WEBSITE":!1,"GameConstants.Debug.GIVES_MEMBERSHIP_AFTER_SKIP_WEBSITE":!1,"GameConstants.Debug.MONSTER_RADIUS_VISIBLE":!1,"GameConstants.Debug.MONSTER_SPAWN_LOGGING_ENABLED":!1,"GameConstants.Debug.CLOSE_BATTLE_RESULTS_SCREEN":!1,"GameConstants.Debug.ADD_FAKE_PLAYERS_TO_SCREEN":0,"GameConstants.Debug.WINNER_EVERY_TIME":!1,"GameConstants.Debug.DEBUG_TEST_SCREEN":!1,"GameConstants.Debug.NEXT_SKILL_ID":void 0,"GameConstants.Debug.PA_COOLDOWN_EXPIRED":void 0,"GameConstants.Debug.DEPRECATED_IOS":!1,"GameConstants.Debug.SCHOOL_START_HOUR":8,"GameConstants.Debug.SCHOOL_END_HOUR":16,"GameConstants.Debug.USER_DATA_PLATFORM":void 0,"GameConstants.Mailer.TEST_MAIL":!1,"GameConstants.FriendsList.TEST_FRIENDS_LIST":!1,"GameConstants.Debug.ENV_URL":"","GameConstants.Features.ENABLE_HOUSE_MOVING":!0,"GameConstants.Features.Wheel.COOLDOWN":5,"GameConstants.Features.Wheel.DEFAULT_SPINS":1,"GameConstants.Features.Wheel.MEMBER_SPINS":2,"GameConstants.Features.Wheel.SPIN_TIME":15e3,"GameConstants.Features.SplitTests.PLAY_AT_HOME":!0,"GameConstants.Features.SplitTests.CHARACTER_CREATION_TIME":0,"GameConstants.Features.LevelLock.ACADEMY":15,"GameConstants.Features.ParentLink.TIMEOUT":864e5,"GameConstants.Features.DailyQuestions.NOTIFICATION_TIMEOUT":9e5,"GameConstants.Features.ENABLE_MONSTER_SPAWNING":!0,"GameConstants.Battle.VALID_PARENT_EMAIL_STARS_PERCENTAGE":.05,"GameConstants.Battle.MEMBER_STARS_PERCENTAGE":.5,"GameConstants.Battle.MAX_NUM_PETS":1,"GameConstants.Battle.ATTACK_DAMAGE_OVERRIDE":null,"GameConstants.Battle.ESCAPE_CHANCE":.75,"GameConstants.Battle.CATCH_COST":50,"GameConstants.Battle.CATCH_COST_GOLD":500,"GameConstants.Battle.ALWAYS_SWITCH":!1,"GameConstants.Battle.FORCE_CAST":-1,"GameConstants.Battle.FORCE_OPPONENT_CAST":-1,"GameConstants.Battle.ENEMY_ACCURACY_OVERRIDE":-1,"GameConstants.Battle.SET_BENCH":null,"GameConstants.Battle.FORCE_TARGETING_ENABLED":!1,"GameConstants.Battle.AUTOMATION_ACTIONS":[],"GameConstants.Battle.AUTO_ATTACK_ENABLED":!1,"GameConstants.Battle.AUTO_ATTACK_PAUSE":!1,"GameConstants.Battle.AUTO_ATTACK_TARGET":0,"GameConstants.Battle.SKIP_ENEMY_TURN":!1,"GameConstants.Battle.SKIP_PLAYER_TURN":!1,"GameConstants.Battle.HIDE_TEMP_HEALTHBAR":!1,"GameConstants.Battle.SHOW_HITBOXES":!1,"GameConstants.Mira.MAX_HP":1e5,"GameConstants.Mira.DIFFICULTY":10,"GameConstants.Grandoff.MAX_HP":12e3,"GameConstants.Grandoff.DIFFICULTY":3,"GameConstants.Pippet.MAX_HP":null,"GameConstants.Pippet.DIFFICULTY":3,"GameConstants.Cebollini.MAX_HP":null,"GameConstants.Cebollini.DIFFICULTY":8,"GameConstants.ShadowGerald.MAX_HP":null,"GameConstants.ShadowGerald.DIFFICULTY":7,"GameConstants.Gerald.MAX_HP":null,"GameConstants.Gerald.DIFFICULTY":8,"GameConstants.OldOne.MAX_HP":null,"GameConstants.OldOne.DIFFICULTY":8,"GameConstants.IceWyrm1.MAX_HP":null,"GameConstants.IceWyrm1.DIFFICULTY":8,"GameConstants.IceWyrm2.MAX_HP":null,"GameConstants.IceWyrm2.DIFFICULTY":8,"GameConstants.FrostyStorm.MAX_HP":null,"GameConstants.FrostyStorm.DIFFICULTY":8,"GameConstants.StormyStorm.MAX_HP":null,"GameConstants.StormyStorm.DIFFICULTY":8,"GameConstants.RainyStorm.MAX_HP":null,"GameConstants.RainyStorm.DIFFICULTY":8,"GameConstants.SandyStorm.MAX_HP":null,"GameConstants.SandyStorm.DIFFICULTY":8,"GameConstants.Inactivity.DIALOG_TIMER_SECONDS":1500,"GameConstants.Inactivity.LOG_OUT_TIMER_SECONDS":300,"GameConstants.Inactivity.CANNOT_CONNECT_TIMER_SECONDS":120,"GameConstants.Inactivity.NETWORK_BOOT_TIMER_SECONDS":6e4,"GameConstants.Audio.DEFAULT_SOUND_VOLUME":.5,"GameConstants.Audio.DEFAULT_MUSIC_VOLUME":.25,"GameConstants.Audio.DEFAULT_VOICE_VOLUME":.5,"GameConstants.LocationSelection.NONE":"none","GameConstants.LocationSelection.HOME":"home","GameConstants.LocationSelection.SCHOOL":"school","GameConstants.PVP.INVITE_TIMEOUT":6e4,"GameConstants.PVP.OVERRIDE_USER_RANK":null,"GameConstants.PVP.OVERRIDE_USER_POINTS":null,"GameConstants.PVP.OVERRIDE_USER_LEADERBOARD":null,"GameConstants.PVP.BOT_TEAM":null,"GameConstants.PVP.TIMER_ENABLED":!0,"GameConstants.PVP.STARS_PER_QUESTION":10,"GameConstants.TITAN.HP_MULTIPLIER":1.5,"GameConstants.CO_OP_TITAN.TITAN_HP":10,"GameConstants.CO_OP_TITAN.CRYSTAL_HP":5,"GameConstants.CO_OP_TITAN.ATTACK_FREQUENCY":2,"GameConstants.CO_OP_TITAN.TITAN_DIFFICULTY":5,"GameConstants.CO_OP_TITAN.TITAN_BOUNTY":10,"GameConstants.CO_OP_TITAN.HOST_HEARTBEAT_TIME":5e3,"GameConstants.CO_OP_TITAN.CLIENT_HEARTBEAT_TIMEOUT":2e4,"GameConstants.DailyQuestions.OVERRIDE_LAST_LOGIN":-1,"GameConstants.DailyQuestions.OVERRIDE_DATE_TODAY":-1,"GameConstants.MorphMarbles.MORPH_DURATION_OVERRIDE":null,"GameConstants.Network.CORTEX_ROOT":void 0},G.isMaxOnScreenOrigSet=!1,G.DAY_IN_MS=864e5,G.HOURS_IN_MS=36e5,G.MINUTES_IN_MS=6e4,G.SECONDS_IN_MS=1e3,G.MAX_SAFE_INTEGER=9007199254740991,G.TOWER_COMMON_ROOM_SHORTFORM="CR",G.TOWER_WARDEN_ROOM_SHORTFORM="WR",G.TARGET_FPS_40_MS=25,G.SECONDS_TO_MILLISECONDS_MULTIPLIER=1e3;const j=G},84643:(k,B,U)=>{"use strict";U.d(B,{h:()=>$});var F=U(8674),G=U(79687),j=U(13956);let $=class{debugSetConstant(k,B){0}get spawnCooldownDurationSeconds(){return this._encounterConstantsProvider.constants.spawnCooldownDuration}get weightedEncounterLevelProbabilities(){const k=this._encounterConstantsProvider.constants;return{same:k.spawnLevelChanceSame,lower:k.spawnLevelChanceLower,higher:k.spawnLevelChanceHigher}}get weightedBenchLevelProbabilities(){const k=this._encounterConstantsProvider.constants;return{same:k.benchLevelChanceSame,lower:k.benchLevelChanceLower,lowest:k.benchLevelChanceLowest}}get threatIndicatorLevel(){return this._encounterConstantsProvider.constants.threatIndicatorLevel}get encounterRatesPerDifficultyModeAndRarity(){return this._encounterConstantsProvider.constants.encounterRatesPerRarity}get encounterRatesPerDifficultyModeAndEvolutionTier(){return this._encounterConstantsProvider.constants.encounterRatesPerEvolutionTier}};(0,F.Cg)([(0,j.b)("cd4-b78f"),(0,F.Sn)("design:type",Object)],$.prototype,"_encounterConstantsProvider",void 0),$=(0,F.Cg)([(0,G.injectable)()],$)},19850:(k,B,U)=>{"use strict";U.d(B,{K:()=>$});var F,G=U(62459);!function(k){k.LocalizedText_csv="fc0987d5-cf10-4938-851b-164d261a026a"}(F||(F={}));var j=U(23029);class ${constructor(k){this.dataLoadPromise=new G.bnh,j.R.loadExternalData(F.LocalizedText_csv,{tag:k,isCancellable:!1}).then((k=>{this._languageData=k,this.dataLoadPromise.resolve()})).catch((k=>{G.RQr.logError(k,"Failed to load local localization data"),this.dataLoadPromise.reject(k)}))}getValue(k){return this._languageData?this._languageData[k]:(G.VyI.log(`Language data not yet available. Failed to fetch key ${k}`,G.$bb.Warning),null)}}},23029:(k,B,U)=>{"use strict";U.d(B,{R:()=>V});var F=U(8674),G=U(62459);const j=JSON.parse('{"c56d5e8f-8ae7-4fe2-9771-58bd051834ca":{"battleConstants":{"baseLevelMinimum":1,"baseLevelMaximum":100,"baseLevelMaximumConfig":{"regular":100,"hard":150,"expert":200},"aoaSpellId":"1100","rescueSpellId":"1101","fumbleSpellId":"1103","multipliers":{"physical":1,"stabElement":0,"criticalHit":0.5,"finalDamage":1,"mythicDamage":1,"mythicHealth":2.5,"enemyNerf":{"min":0.72,"bonus":0.28},"hitChanceScaling":{"chanceHitOffset":0.780214333333333,"chanceHitCoefSquared":0.00000372024,"chanceHitCoefPrime":0.0013244}},"minimumHitChance":0.55,"maximumHitChance":1,"primaryStatModifier":{"tier1":0.25,"tier2":0.4},"secondaryStatModifier":{"tier1":0.15,"tier2":0.25},"equipmentModifierBaseValues":{"health":500,"power":200},"divisors":{"level":25,"aoa":3,"physical":4,"magical":2,"speedCrit":13650,"enemyNerf":34,"mergeRank":10},"damageRange":{"aoa":{"min":100,"max":9999},"spell":{"min":1,"max":9999}},"elementalMultiplier":[{"name":"physical","weakness":"neutral","resistance":"neutral","data":{"astral":1,"fire":1,"ice":1,"physical":1,"plant":1,"shadow":1,"storm":1,"water":1,"neutral":1}},{"name":"fire","weakness":"water","resistance":"ice","data":{"astral":1,"fire":1,"ice":1.75,"physical":1,"plant":1,"shadow":1,"storm":1,"water":0.571428571,"neutral":1}},{"name":"ice","weakness":"fire","resistance":"plant","data":{"astral":1,"fire":0.571428571,"ice":1,"physical":1,"plant":1.75,"shadow":1,"storm":1,"water":1,"neutral":1}},{"name":"plant","weakness":"ice","resistance":"storm","data":{"astral":1,"fire":1,"ice":0.571428571,"physical":1,"plant":1,"shadow":1,"storm":1.75,"water":1,"neutral":1}},{"name":"storm","weakness":"plant","resistance":"water","data":{"astral":1,"fire":1,"ice":1,"physical":1,"plant":0.571428571,"shadow":1,"storm":1,"water":1.75,"neutral":1}},{"name":"water","weakness":"storm","resistance":"fire","data":{"astral":1,"fire":1.75,"ice":1,"physical":1,"plant":1,"shadow":1,"storm":0.571428571,"water":1,"neutral":1}},{"name":"shadow","weakness":"astral","resistance":"astral","data":{"astral":1.45,"fire":1,"ice":1,"physical":1,"plant":1,"shadow":1,"storm":1,"water":1,"neutral":1}},{"name":"astral","weakness":"shadow","resistance":"shadow","data":{"astral":1,"fire":1,"ice":1,"physical":1,"plant":1,"shadow":1.45,"storm":1,"water":1,"neutral":1}},{"name":"neutral","data":{"astral":1,"fire":1,"ice":1,"physical":1,"plant":1,"shadow":1,"storm":1,"water":1,"neutral":1}}],"rescue":{"damageThreshold":0.5},"minPlayerHeartsOnEndBattle":20,"ai":{"accuracyPenalty":{"max":0.3,"levelCap":30},"fumbleChanceIncrease":0.05},"difficultyStreak":{"min":-3,"max":2},"difficultyStreakBench":{"min":-1,"max":5},"difficultyStreakLoseStep":0.05,"difficultyStreakWinStep":0.025,"xp":{"base":10,"miniBoss":25,"singularBoss":100,"repeatableBoss":75,"illusionBoss":333,"finalBoss":1000,"cloakedWizard":20,"pippet":25,"mythic":30,"titan":30},"spawns":{"spawnLevelChanceSame":0.5,"spawnLevelChanceHigher":0.2,"spawnLevelChanceLower":0.3,"benchLevelChanceSame":0.45,"benchLevelChanceLower":0.35,"benchLevelChanceLowest":0.25,"spawnCooldownDuration":660,"threatIndicatorLevel":2,"encounterRatesPerRarity":{"regular":{"0":0.45,"1":0.35,"2":0.1,"3":0.07,"4":0.03},"hard":{"0":0.1,"1":0.2,"2":0.5,"3":0.15,"4":0.05},"expert":{"0":0.06,"1":0.12,"2":0.42,"3":0.25,"4":0.15}},"encounterRatesPerEvolutionTier":{"regular":{"1":1.5,"2":1.25,"3":1,"4":0},"hard":{"1":1,"2":1.25,"3":1,"4":0},"expert":{"1":1,"2":1.15,"3":1.5,"4":0}}},"unitStatDefaults":{"initiative":5}}},"3bf8a670-5afc-4113-8d51-eec627555d6a":{"ID":1,"name":"Rift Key 1","data":{"rarity":2}},"38f2fe53-fe57-4046-b642-cbf34807ddfb":{"ID":2,"name":"Rift Key 2","data":{"rarity":2}},"478eefb5-a10f-41c1-abb2-7b4a38d17193":{"ID":3,"name":"Rift Key 3","data":{"rarity":2}}}');var $=U(35120),H=U(95925);class V{static get _assetLoader(){var k;return null!==(k=this._cachedAssetLoader)&&void 0!==k?k:this._cachedAssetLoader=$.q.instance.prodigy.gameContainer.get(G.t5G.AssetLoader)}static get dataBundleLoadPromise(){return this._dataBundleLoadPromise}static initialize(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this._assetLoader.loadAssets([this.BUNDLE_ASSET_ID]),this._dataBundle=this._assetLoader.getAsset(this.BUNDLE_ASSET_ID,H.i.JSON),this._dataBundleLoadPromise.resolve()}))}static loadData(k){var B;return null!==(B=j[k])&&void 0!==B?B:this._dataBundle[k]}static loadExternalData(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U;const F=B.tag?`${k}_${B.tag}`:k;return null===(U=B.isCancellable)||void 0===U||U?yield this._assetLoader.loadAssets([F]):yield this._assetLoader.loadAssetsNotCancellable([F]),this._assetLoader.getAsset(F,H.i.JSON)}))}}V.BUNDLE_ASSET_ID="clientBundledData",V._dataBundleLoadPromise=new G.bnh},43846:(k,B,U)=>{"use strict";U.d(B,{k:()=>$});var F=U(62459),G=U(35120);let j;function $(k,...B){return null!=j||(j=G.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService)),j.getText(k,...B)}},1195:(k,B,U)=>{"use strict";U.d(B,{E:()=>Z});var F=U(8674),G=U(62459),j=U(79687),$=U(35120),H=U(70215),V=U(48235),W=U(73797),q=U(48813),K=U(88225),z=U(13956),Y=U(80403);class Q{get areAvailable(){return""!==this.password&&""!==this.username}get username(){var k;return null!==(k=this._username)&&void 0!==k?k:""}get password(){var k;return null!==(k=this._password)&&void 0!==k?k:""}constructor(){this.fetchLoginCredentials()}fetchLoginCredentials(){this.ready||(this.ready=new Promise(((k,B)=>{this._gqlRequestSender.sendRequest("query PlayerLoginDetails { viewer { username password } }",void 0,void 0,{retryCount:3}).then((B=>{var U,F;if(!(null===(F=null===(U=null==B?void 0:B.data)||void 0===U?void 0:U.viewer)||void 0===F?void 0:F.password))throw new Error("[Fetch Login Credentials] Login details not found in response.");this._username=B.data.viewer.username,this._password=B.data.viewer.password,k()})).catch((k=>{K.captureException(k),G.RQr.logError(k,"Failed to get player login details"),B(new Error("Failed to get player login details."))}))})))}}(0,F.Cg)([(0,z.b)("8bb-7057"),(0,F.Sn)("design:type",Y.K)],Q.prototype,"_gqlRequestSender",void 0);var X=U(82209);let Z=class extends X.z{constructor(){super(...arguments),this._activeMemberships=[],this.onStatChanged=new G.HN0}get player(){return this._player}get loginCredentials(){return this._loginCredentials}get activeMemberships(){return this._activeMemberships}initialize(k){this._player=k,$.q.instance.game.broadcaster.addAppListener(W.H3.MembershipResponseReceived,this.refreshMembershipData,this,void 0,!0)}initLoginCredentials(){var k;this._loginCredentials=null!==(k=this._loginCredentials)&&void 0!==k?k:new Q,Promise.all([this._loginCredentials.ready,q.T.ready]).then((()=>{V.W.checkMemberUpgradeReward().catch(G.RQr.createHandler("Failed to check member upgrade reward")),this._player.name.setFallbackName(this._loginCredentials.username)})).catch(G.RQr.createHandler("Failed to set fallback name for logged-in player"))}logout(){this._player&&(this._player.saveEnabled=!1,this._player=null,$.q.instance.game.broadcaster.removeAppListener(W.H3.MembershipResponseReceived,this.refreshMembershipData,this)),this.onStatChanged.dispose()}addStars(k){const B=this._player.data.stars,U=this.getLevel(),F=this.getBaseHearts();this._player.addStars(k),this.dispatchStatChange(H.$.Stars,this._player.data.stars,B);const G=this.getLevel();if(G>U){this.dispatchStatChange(H.$.Level,G,U),this.dispatchStatChange(H.$.MaxHearts,this.getBaseHearts(),F);const k=this._player.getBamSpells(U),B=this._player.getBamSpells(G);for(let U=0;U{"use strict";U.d(B,{z:()=>H});var F=U(8674),G=U(79687),j=U(95891),$=U.n(j);let H=class{constructor(){this._player=null}get player(){return this._player}initialize(k){this._player=k}getFirstName(){return this._player.appearance.name.getFirstName()}getMiddleName(){return this._player.appearance.name.getMiddleName()}getLastName(){return this._player.appearance.name.getLastName()}getNickname(){return this._player.appearance.name.getNickname()}getAppearance(){const k=this._player.appearance,B=this._player.equipment;return{face:k.getFace(),hair:{style:k.getHair().style,color:k.getHair().color},hat:B.getHat(),skin:k.getSkinColor(),eyeColor:k.getEyeColor(),outfit:B.getOutfit(),boot:B.getBoots(),weapon:B.getWeapon(),costume:B.getCostume()}}getStars(){return this._player.getPlayerData().stars}getUserID(){return this._player.userID}getLevel(){return this._player.getLevel()}getChargedLevel(){return this._player.getChargedLevel()}getChargedLevelCap(){return this._player.getChargedLevelCap()}getChargedLevelData(){return $().clone(this._player.data.chargedLevelData)}getBaseHearts(){return this._player.getBaseMaxHearts(this.getLevel())}isMember(){return this._player.hasMembership()}isActivePlayer(){return!1}};H=(0,F.Cg)([(0,G.injectable)()],H)},47008:(k,B,U)=>{"use strict";U.d(B,{W:()=>$});var F=U(8674),G=U(79687),j=U(325);let $=class{constructor(){this._subject=j.Q.Math}initialize(k){switch(k){case"ELA":this._subject=j.Q.ELA;break;case"SCIENCE":this._subject=j.Q.Science;break;case"MATH":default:this._subject=j.Q.Math}}getSubject(){return this._subject}};$=(0,F.Cg)([(0,G.injectable)()],$)},16571:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";var tslib__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(8674),_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(62459),_misc_components_EComponentPath__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(28152),_IDataProviderComponent__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(44317);let DataEvalComponent=class DataEvalComponent extends _prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.uAl{constructor(){super(...arguments),this.dataProviders=[],this.condition="{0} === {1}",this.evaluateOnCreate=!0,this.onTrue=new _prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.HN0,this.onFalse=new _prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.HN0,this.onResult=new _prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.HN0}create(){super.create(),this.evaluateOnCreate&&this.evaluate()}destroy(){this.onTrue.dispose(),this.onFalse.dispose(),this.onResult.dispose(),super.destroy()}evaluate(){const values=this.dataProviders.map((k=>k.getData())),windowVars={Utils:_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.Aq$},oldWindowValues={};for(const k in windowVars)oldWindowValues[k]=window[k],window[k]=windowVars[k];const finalCondition=this.condition.replace(/{(\d+)}/g,((k,B)=>`values[${B}]`)),result=eval(finalCondition);return Object.assign(window,oldWindowValues),result?this.onTrue.dispatch():this.onFalse.dispatch(),this.onResult.dispatch(result),result}};(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.SZi)(),(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.MnK)(_IDataProviderComponent__WEBPACK_IMPORTED_MODULE_2__._),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Sn)("design:type",Array)],DataEvalComponent.prototype,"dataProviders",void 0),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.W_S)(),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Sn)("design:type",String)],DataEvalComponent.prototype,"condition",void 0),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.vkK)(),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Sn)("design:type",Boolean)],DataEvalComponent.prototype,"evaluateOnCreate",void 0),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.bbQ)(),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Sn)("design:type",_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.HN0)],DataEvalComponent.prototype,"onTrue",void 0),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.bbQ)(),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Sn)("design:type",_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.HN0)],DataEvalComponent.prototype,"onFalse",void 0),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.bbQ)(),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Sn)("design:type",_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.HN0)],DataEvalComponent.prototype,"onResult",void 0),DataEvalComponent=(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.EVk)("DataEval",_misc_components_EComponentPath__WEBPACK_IMPORTED_MODULE_1__.Y.data,"Evaluates conditions from data providers")],DataEvalComponent)},44317:(k,B,U)=>{"use strict";U.d(B,{_:()=>j});var F=U(8674),G=U(62459);let j=class extends G.uAl{constructor(){super(...arguments),this._onDataRelay=new G.HN0,this._relayedDataIsSpreadArray=!1}getData(){throw new Error("Method not implemented.")}relayData(){const k=this.getData();Array.isArray(k)&&this._relayedDataIsSpreadArray?this._onDataRelay.dispatch(...k):this._onDataRelay.dispatch(k)}destroy(){this._onDataRelay.dispose(),super.destroy()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"_onDataRelay",void 0),(0,F.Cg)([(0,G.vkK)({toolTip:"Is the relayed data an array that should be spread when dispatched? Useful when the listener function requires multiple parameters."}),(0,F.Sn)("design:type",Boolean)],j.prototype,"_relayedDataIsSpreadArray",void 0),j=(0,F.Cg)([(0,G.EVk)("IDataProviderComponent")],j)},35757:(k,B,U)=>{"use strict";U.d(B,{u:()=>$});var F=U(62459),G=U(77938),j=U(88022);class ${constructor(){this.legacyData=null,this.legacyData=U(7640)}get(k){const B=G.t.getItem("dialogue",k);let U=null;return B?(U=B.data,""===U.avatar.frameName&&(U.avatar.frameName="face_0")):F.VyI.log(`Failed to find dialogue item with id: ${k}`,F.$bb.Error),U}getLegacy(k,B){let U=null;if(F.Aq$.isDefined(this.legacyData[k])){const G=this.legacyData[k][B];F.Aq$.isDefined(G)?(U=$.createDefaultData(),U.nameKey=$.LEGACY_ATLAS_IDS[k].name,U.avatar.atlas=$.LEGACY_ATLAS_IDS[k].atlas,F.Aq$.isDefined(G.face)&&(U.avatar.frameName=`face_${G.face}`),F.Aq$.isDefined(G.anim)&&(U.avatar.animationMod=`${G.anim}`),F.Aq$.isDefined(G.textKey)&&(U.textKey=G.textKey),F.Aq$.isDefined(G.audio)&&(U.audio.tag=G.audio.tag,U.audio.s=G.audio.s,U.audio.d=G.audio.d),F.Aq$.isDefined(G.dimmed)&&(U.avatar.dimmed=G.dimmed)):F.VyI.log(`Failed to find legacy dialogue index: ${B} for key: ${k}`,F.$bb.Error)}else F.VyI.log(`Failed to find legacy dialogue key: ${k}`,F.$bb.Error);return U}static createDefaultData(){return{nameKey:"",textKey:"",avatar:{atlas:"",frameName:"",animationMod:"",spineAttachment:""},audio:{tag:"",s:0,d:1}}}}$.LEGACY_ATLAS_IDS={benni:{atlas:j._.Npc_face_benni_json,name:"NPC_NAME_BENNI"},bok:{atlas:j._.Npc_face_bok_json,name:"SHIVERCHILL_GUARDIAN"},boombox:{atlas:j._.Npc_face_boombox_json,name:"NPC_NAME_BOOMBOX"},broccolina:{atlas:j._.Npc_face_broccolina_json,name:"NPC_NAME_BROCCOLINA"},cebollini:{atlas:j._.Npc_face_cebollini_json,name:"NPC_NAME_CEBOLLINI"},clankboot:{atlas:j._.Npc_face_clankboot_json,name:"NPC_NAME_CLANKBOOT"},cumulo:{atlas:j._.Npc_face_cumulo_json,name:"NPC_NAME_CUMULO"},eugene:{atlas:j._.Npc_face_eugene_json,name:"NPC_NAME_EUGENE"},eve:{atlas:j._.Npc_face_eve_json},flora:{atlas:j._.Npc_face_flora_json,name:"NPC_NAME_FLORA"},florian:{atlas:j._.Npc_face_florian_json,name:"NPC_NAME_FLORIAN"},gale:{atlas:j._.Npc_face_gale_json,name:"NPC_NAME_GALE"},guard:{atlas:j._.Npc_face_guard_json,name:"NPC_NAME_GUARD"},harvey:{atlas:j._.Npc_face_harvey_json,name:"NPC_NAME_HARVEY"},howard_cornelius:{atlas:j._.Npc_face_howard_cornelius_json,name:"NPC_NAME_HOWARD_CORNELIUS"},julia_ghoulia:{atlas:j._.Npc_face_julia_ghoulia_json,name:"NPC_NAME_JULIA_GHOULIA"},mama_star:{atlas:j._.Npc_face_mamastar_json,name:"NPC_NAME_MAMA_STAR"},merchant:{atlas:j._.Npc_face_merchant_json,name:"NPC_NAME_MERCHANT"},mira:{atlas:j._.Npc_face_mira_json,name:"NPC_NAME_MIRA_SHADE"},morris:{atlas:j._.Npc_face_morris_json,name:"NPC_NAME_MORRIS"},"mozza-ella":{atlas:j._.Npc_face_mozza_ella_json,name:"NPC_NAME_MOZZA_ELLE"},mugs:{atlas:j._.Npc_face_mugs_json,name:"NPC_NAME_MUGS"},noot:{atlas:j._.Npc_face_noot_json,name:"NPC_NAME_NOOT"},pippet:{atlas:j._.Npc_face_pippet_json,name:"NPC_NAME_PIPPET"},puppetmaster:{atlas:j._.Npc_face_puppetmaster_raster_json,name:"NPC_NAME_PUPPETMASTER"},scoog:{atlas:j._.Npc_face_scoog_json,name:"NPC_NAME_PROFESSOR_SCOOG"},slime_guard:{atlas:j._.Npc_face_slime_guard_json,name:"NPC_NAME_GUARD_SLIME"},slime_queen:{atlas:j._.Npc_face_slime_queen_json,name:"NPC_NAME_QUEEN_GOO_LIA"},slime_worker:{atlas:j._.Npc_face_slime_worker_json,name:"NPC_NAME_WORKER_SLIME"},slurpy:{atlas:j._.Npc_face_slurpy_json,name:"NPC_NAME_SLURPY"},stache:{atlas:j._.Npc_face_stache_json,name:"NPC_NAME_STACHE"},toy:{atlas:j._.Npc_face_toy_json,name:"NPC_NAME_TOY_MERCHANT"},wizard:{atlas:j._.Npc_face_wizard_json,name:"NPC_NAME_WIZARD"},"bargo-bunny":{atlas:j._.Npc_face_bargo_bunny_json,name:"NPC_NAME_BARGO"},"don-zorro":{atlas:j._.Npc_face_don_zorro_json,name:"NPC_NAME_DON_ZORRO"},verna:{atlas:j._.Npc_face_verna_json,name:"NPC_NAME_VERNA"},harriet:{atlas:j._.Npc_face_harriet_json,name:"NPC_NAME_HARRIET_HOOD"},"sir-vey":{atlas:j._.Npc_face_sir_vey_json,name:"NPC_NAME_SIR_VEY"},potion:{atlas:j._.Npc_face_potion_json,name:"NPC_NAME_SCIENTIST_SLIME"},windsail:{atlas:j._.Npc_face_windsail_json,name:"NPC_NAME_EVE"},swoopy:{atlas:j._.Npc_face_swoopy_json,name:"NPC_NAME_SWOOPY"},jim:{atlas:j._.Npc_face_jim_json,name:"NPC_NAME_JELLY_JIM"},fishthing:{atlas:j._.Npc_face_fishthing_json,name:"NPC_NAME_MERCHANT"}}},23034:(k,B,U)=>{"use strict";U.d(B,{s:()=>Y});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U(64794),V=U(52498),W=U(44094),q=U(21314),K=U(34829),z=U(77938);let Y=class{constructor(k,B){this.assets=null,this.assets={},k.getCurrentEnvironment()!==V.h.QABox&&(this.assets["feature-flag-data"]={type:"json",fullURL:`${B.getCDNRootUrl()}/flags/${k.getEnvironmentString()}/prodigy-game.json`})}getAsset(k){const B=this.findAsset(k);if(B)return B;let U=null,F=null;const j=0===k.indexOf("horizontal-dorm")||0===k.indexOf("vertical-dorm")||0===k.indexOf("sheets-dorm"),V=0===k.indexOf("default-pet-")||0===k.indexOf("reduced-pet-")||0===k.indexOf("small-pet-"),q=0===k.indexOf("male-outfit-")||0===k.indexOf("female-outfit-"),K=0===k.indexOf("above-mount-")||0===k.indexOf("below-mount-"),Y=k.indexOf("tt-deco")>-1;if(0===k.indexOf("icon-")){if(U=k.split("-"),U.length>2)if("storeTab"===U[1]){const B=this.getAsset(`singleImage-${parseInt(U[2])+22}`);this.assets[k]={type:"singleImage",v:$.get(B,"metadata.v",1),key:k}}else F=z.t.getItemMetadata(U[1],parseInt(U[2])),this.assets[k]={type:"singleImage",v:$.get(F,"vIcon",1)}}else if(j||V||q||K||0===k.indexOf("default-boss-")||0===k.indexOf("default-follow-")||0===k.indexOf("default-titan-"))U=k.split("-"),U.length>2&&(F=z.t.getItemMetadata(U[1],parseInt(U[2])),G.Aq$.isDefined(F)&&(this.assets[k]=F.assets[U[0]]));else if(0===k.indexOf("default-emote-"))U=k.split("-"),U.length>2&&(F=z.t.getItemMetadata(U[1],parseInt(U[2])).assets[U[0]],G.Aq$.isDefined(F)&&(this.assets[k]={type:F.type,v:G.Aq$.isDefined(F)&&G.Aq$.isDefined(F.v)?F.v:1}));else if(Y){const B=k.substring(0,k.length-5),U=z.t.getItemsWithFilter(H.D.ASSET_TYPE_DECORATION,(k=>k.data.tag===B));1===U.length&&(this.assets[k]={type:"singleImage",v:$.get(U[0].metadata,"vIcon",1)})}else W.$.containsURL(k)?(U=k.split("-"),U.length>1&&(this.assets[k]={type:U[0],fullURL:U.slice(1).join("-")})):this.assets[k]={};return this.assets[k]}findAsset(k){var B,U,F,j,$,H,V,W,q,K,z;let Y=this.assets[k];if(!Y){const Q=null===(B=window.legacyAssetMappings)||void 0===B?void 0:B[k];Q&&(Y=this.assets[Q]),Y?(Y.guidMapping=Q,"tileset"===Y.type&&(Y.w||(Y.w=null!==(j=null===(F=null===(U=null==Y?void 0:Y.data)||void 0===U?void 0:U.data)||void 0===F?void 0:F.w)&&void 0!==j?j:null!==(H=null===($=null==Y?void 0:Y.data)||void 0===$?void 0:$.w)&&void 0!==H?H:40),Y.h||(Y.h=null!==(q=null===(W=null===(V=null==Y?void 0:Y.data)||void 0===V?void 0:V.data)||void 0===W?void 0:W.h)&&void 0!==q?q:Y.h=null!==(z=null===(K=null==Y?void 0:Y.data)||void 0===K?void 0:K.h)&&void 0!==z?z:40))):G.VyI.log(`No legacy asset mapping found for ${k}`,G.$bb.Warning)}return Y}getImageBounds(k){const B=this.getAsset(k);return G.Aq$.isDefined(B)?[B.x,B.y,B.w,B.h]:[0,0,0,0]}getImagePivots(k){const B=this.getAsset(k);if(G.Aq$.isDefined(B)){return[G.Aq$.isDefined(B.pivotX)?B.pivotX:null,G.Aq$.isDefined(B.pivotY)?B.pivotY:null]}return[null,null]}assignAssets(k){for(const B in k)G.Aq$.isDefined(B)&&0!==B.length&&"undefined"!==B&&(this.assets[B]=k[B])}};Y.ASSET_FOLDER=K.s.get("GameConstants.Build.ASSETS_FOLDER"),Y.VERBOSE_LOGGING=!1,Y=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("6a1-4b92")),(0,F.Qj)(1,(0,j.inject)("be9-3278")),(0,F.Sn)("design:paramtypes",[Object,q.p])],Y)},40549:(k,B,U)=>{"use strict";U.d(B,{r:()=>G});var F=U(50654);class G{static isPotionConsumable(k){return k.type===F.V.Potion}static isFoodConsumable(k){return k.type===F.V.Food}}},34992:(k,B,U)=>{"use strict";U.d(B,{g:()=>ht});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U(20748),V=U(99625),W=U(51151),q=U(65240),K=U(65050),z=U(35120),Y=U(51477),Q=U(73797),X=U(23891),Z=U(57324),J=U(95057),tt=U(98252),et=U(53452),it=U(47255),st=U(10312),nt=U(4631),at=U(88701),rt=U(77938);function ot(k,B){k[B].functionName=B}let ht=class{constructor(k,B){this.game=null,this.localizer=null,this.membershipParentOpen=!1,this.game=k,this.localizer=B}runFunction(k,B,U,F,j){this.doesFunctionExist(k)?this[k].apply(this,[B,U,F,j]):G.VyI.log(`Error ${k} not found in MailerMethods`,G.$bb.Verbose)}doesFunctionExist(k){return G.Aq$.isDefined(this[k])}openStore(k){z.q.instance.prodigy.open.store(parseInt(k[0]))}singleUseGotItem(k,B,U,F){const G=B=>{const G=F&&F.length>0?F[0]:null;z.q.instance.prodigy.open.gotItem(B,G,void 0,void 0,void 0,void 0,this.getCustomItemReceivedSegmentData(k,U)),this.game.broadcaster.broadcast(Q.zr.GiftBoxOpened,Q.HG.Mailer,[]),this.game.broadcaster.broadcast(Q.zr.MarkAsRead,Q.HG.MailView,[void 0,U])};if(et.b.isDebugMailData(U))G(B);else{z.q.instance.prodigy.gameContainer.get("535-27b9").collectMailRewards(U).then((k=>{G(et.b.mergeSecureUnsecure(k.rewards,k.unsecuredRewards))})).catch((k=>{z.q.instance.prodigy.open.message(this.localizer.getText("ERROR_DIALOG_BODY"))}))}}openGiftBox(k,B,U){if(this.game.broadcaster.broadcast(Q.zr.GiftBoxOpened,Q.HG.Mailer,[]),et.b.isDebugMailData(U))z.q.instance.prodigy.open.reward(U,B);else{z.q.instance.prodigy.gameContainer.get("535-27b9").collectMailRewards(U).then((k=>{z.q.instance.prodigy.open.reward(U,et.b.mergeSecureUnsecure(k.rewards,k.unsecuredRewards))})).catch((k=>{z.q.instance.prodigy.open.message(this.localizer.getText("ERROR_DIALOG_BODY"))}))}}openMembershipSignUp(){const k=z.q.instance.prodigy.gameContainer;if(k.get("c47-20b6").purchase.sendFunnelStart({type:"Click-Member-Box-Mail",category:"Mailbox",contentId:void 0,adType:J.R.Alternative}),!this.membershipParentOpen){this.membershipParentOpen=!0;z.q.instance.prodigy.open.membershipParent(void 0,{conversionFunnelName:it.o.FunnelClickMemberBoxMail,conversionStaticOrVideo:J.R.Alternative}).onClose=()=>{this.membershipParentOpen=!1,k.get("c47-20b6").purchase.sendFunnelQuit("Purchase-Handoff","Close-Clicked")}}}openWizardNameSelector(k,B,U,F){const G=F.pop(),j=F.pop();z.q.instance.prodigy.open.wizardNameSelector(!0,j,G)}openPromoPetEgg(k,B,U,F){z.q.instance.prodigy.gameContainer.get("c47-20b6").yourMail.sendOpenEpicSelectorEvent(U.id);const G=F&&F.length>0?F[0]:null,j=z.q.instance.prodigy.open.prefabMenu(V.l.LegacyEpicsChoicePopup);j.onPrefabLoaded.addOnce((k=>{const F=new at.C,[H,V]=$.partition(B,(k=>F.getOwnedCount(k.type,k.ID)>0)),W=V.concat(H).slice(0,3).map((k=>k));k.findComponentInChildren(Z.m).setItems(W);const q=k.findComponentInChildren(X.f);q.onItemAwarded.addOnce(((k,B,F)=>{this.game.broadcaster.broadcast(Q.zr.GiftBoxOpened,Q.HG.Mailer,[]),this.game.broadcaster.broadcast(Q.zr.MarkAsRead,Q.HG.MailView,[void 0,U]),z.q.instance.prodigy.gameContainer.get("c47-20b6").yourMail.sendClosedEpicSelectorEvent(W.map((k=>k.ID)),B)})),q.onComplete.addOnce((()=>{j.close(),null==G||G()}))}))}openLink(k,B,U,F){const j=F&&F.length>0?F[0]:null;tt.pF.isNativeApp()||G.o5U.isMobile()?z.q.instance.prodigy.open.message(this.localizer.getText("OPEN_URL_IN_APP")):G.Aq$.isDefined(k[0])?z.q.instance.prodigy.open.messageBox(this.localizer.getText("NOW_LEAVING_PRODIGY"),(()=>{j&&j(),st.I.openWebsite(k[0])})):G.VyI.log("ERROR: Not a valid link!",G.$bb.Verbose)}openLinkAtHome(k,B,U,F){z.q.instance.prodigy.classModeController.isClassMode()?z.q.instance.prodigy.open.message(this.localizer.getText("OPEN_URL_AT_HOME")):this.openLink(k,B,U,F)}teleport(k){const B=k[0].split("-");z.q.instance.prodigy.classModeController.isLockedZone(B[0])?z.q.instance.prodigy.classModeController.onClassMode(B[0]):this.handleLeaving((()=>{z.q.instance.prodigy.world.it.call(z.q.instance.prodigy.world,...k)}))}openChargedLevelsTutorial(k,B,U,F){const j=F.shift();G.VyI.log("[openChargedLevelsTutorial] called",G.$bb.Verbose),j()}goToTitanMap(){z.q.instance.prodigy.titansNetworkHandler.titan?z.q.instance.prodigy.titansNetworkHandler.isTitanAlive()?this.gotTitan(z.q.instance.prodigy.titansNetworkHandler.titan):this.showTitanErrorMessage():(this.game.broadcaster.addAppListener(Q.RZ.GotTitans,this.gotTitan.bind(this),this,"Titan"),z.q.instance.prodigy.titansNetworkHandler.getTitans())}gotTitan(k){if(this.game.broadcaster.removeAppListener(Q.RZ.GotTitans,this,"Titan"),k){const B=rt.t.getItem("titan",k.assetID);G.Aq$.isDefined(B)&&this.handleLeaving((()=>{z.q.instance.prodigy.world.it(`${B.data.zone}-Titan`)}))}else this.showTitanErrorMessage()}showTitanErrorMessage(){z.q.instance.prodigy.open.messageBoxOkay(this.localizer.getText("TITAN_INACTIVE"))}handleLeaving(k){const B=z.q.instance.prodigy.world.getCurrentZone();z.q.instance.prodigy.world.getZone(B).handleLeaving(nt.j.teleport,k)}goToTreasureTrack(){var k,B;null===(k=z.q.instance)||void 0===k||k.prodigy.open.menuCloseAll(),null===(B=z.q.instance)||void 0===B||B.prodigy.open.battlePassMenu()}getCustomItemReceivedSegmentData(k,B){if(null==k?void 0:k.includes(q.C.FestivalCurrencyConversion))return{source_type:q.C.FestivalCurrencyConversion,source_id:z.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.getFestivalInstanceName(),instance_id:B.id.toString(),instance_type:K.N.UI}}};(0,F.Cg)([(0,H.sg)(2e3),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Array,Array,W.MailData,Array]),(0,F.Sn)("design:returntype",void 0)],ht.prototype,"singleUseGotItem",null),(0,F.Cg)([ot,(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Array,Array,W.MailData]),(0,F.Sn)("design:returntype",void 0)],ht.prototype,"openGiftBox",null),(0,F.Cg)([ot,(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],ht.prototype,"openMembershipSignUp",null),ht=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("51c-03a0")),(0,F.Qj)(1,(0,j.inject)(G.$Bt.LocalizationService)),(0,F.Sn)("design:paramtypes",[Y.n,G.dTp])],ht)},36545:(k,B,U)=>{"use strict";U.d(B,{R:()=>F});class F{static getRandomHint(k){return F.data[k][Math.floor(Math.random()*F.data[k].length)]}}F.data={none:[{textKey:"HINT_0"},{textKey:"HINT_1"},{textKey:"HINT_3"},{textKey:"HINT_4"},{textKey:"HINT_5"},{textKey:"HINT_6"},{textKey:"HINT_7"},{textKey:"HINT_8"},{textKey:"HINT_9"},{textKey:"HINT_10"},{textKey:"HINT_11"},{textKey:"HINT_12"},{textKey:"HINT_13"},{textKey:"HINT_14"},{textKey:"HINT_15"},{textKey:"HINT_16"},{textKey:"HINT_17"},{textKey:"HINT_18"},{textKey:"HINT_19"},{textKey:"HINT_20"},{textKey:"HINT_21"},{textKey:"HINT_22"},{textKey:"HINT_23"},{textKey:"HINT_24"},{textKey:"HINT_25"},{textKey:"HINT_26"}]}},47315:(k,B,U)=>{"use strict";var F,G;U.d(B,{X:()=>F}),function(k){k.Single="single",k.AOE="aoe",k.None="none"}(F||(F={})),function(k){k.Team="team",k.Unit="unit"}(G||(G={}))},77938:(k,B,U)=>{"use strict";U.d(B,{t:()=>q});var F,G=U(8674),j=U(62459);!function(k){k["costume-1"]="d5be4cfb-ba49-4031-9c32-c01b2c368e18",k["costume-2"]="039d6295-85f4-4501-b6c7-d52c9a1d458f",k["costume-3"]="46da74b2-31c5-415d-adf6-a0d22bdb57d9",k["costume-4"]="07ebed37-6651-4f94-bc0a-e9bf9a429119",k["costume-5"]="42fee354-cab4-4300-b07b-ce4955b5a4bb",k["costume-6"]="02521cc1-60aa-4428-9a88-7a1bd5842552",k["costume-7"]="650a7499-8ee8-494d-818e-417a81c5f7dc",k["riftRunKey-1"]="3bf8a670-5afc-4113-8d51-eec627555d6a",k["riftRunKey-2"]="38f2fe53-fe57-4046-b642-cbf34807ddfb",k["riftRunKey-3"]="478eefb5-a10f-41c1-abb2-7b4a38d17193"}(F||(F={}));var $=U(88022),H=U(35120),V=U(91207),W=(U(34829),U(23029));class q{static mergeData(k){k&&(q.data?q.data=Object.assign(Object.assign({},q.data),k):q.data=k,this.processItems(k))}static parseData(k){q.data=k,this.processItems(k)}static processItems(k){var B,U,F;const G={outfit:4e-4,weapon:5e-4,hat:.001,boots:.001,item:.025,currency:1},$=[1,.75,.5,.25,.1];for(const H in k)if(k.hasOwnProperty(H)){const U=k[H];for(let k=0;k0){let k=0;G.hasOwnProperty(H)&&(k=G[H]);let B=1;j.Aq$.isDefined(F.data.rarity)&&F.data.rarity<$.length&&(B=$[F.data.rarity]);const U=k*B*F.data.drop;if(U>0){const k={type:H,ID:F.ID,R:U};q.drops.push(k)}}}}this._prefabDataProvider||(this._prefabDataProvider=H.q.instance.prodigy.gameContainer.get(j.t5G.PrefabDataProvider)),null===(F=null===(U=this._prefabDataProvider)||void 0===U?void 0:U.rebuildPrefabGuidMap)||void 0===F||F.call(U)}static getItem(k,B){if("gold"===k)return this.getItem("currency",1);if("firework"===k||"projectile"===k)return this.getItem("item",B);const U=q.itemMap[`${k}-${B}`];return j.Aq$.isDefined(U)?U:null}static secureGetItem(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=this.getItem(k,B);if(U)return U;if(F[`${k}-${B}`])try{let U=W.R.loadData(F[`${k}-${B}`]);return U||(U=yield W.R.loadExternalData(F[`${k}-${B}`],{})),Object.assign({type:k,ID:B},U)}catch(e){j.RQr.logError(e,`Failed to load item ${k}-${B}`)}return null}))}static doesExist(k,B){return null!==q.getItem(k,B)}static getRandomItem(k){const B=q.data[k];return j.Aq$.isDefined(B)&&B.length>0?B[Math.floor(B.length*Math.random())]:null}static getItemDrops(k){let B=q.drops.slice();j.Aq$.isDefined(k)&&(B=B.concat(k));const U=[];for(let F=0;Fj.Aq$.isDefined(k.data.drop)&&k.data.drop>0&&j.Aq$.isDefined(k.data.rarity)&&k.data.rarity===B))}static getRawItems(k,B){return j.Aq$.isDefined(B)?q.getItemsWithFilter(k,(k=>j.Aq$.isDefined(k.data.rarity)&&k.data.rarity===B)):q.data.hasOwnProperty(k)?q.data[k]:[]}static getRandomizedDropsFromCreatures(k,B,U){const F=[],G=[];if(j.Aq$.isDefined(k)){let B;for(let U=0;U0&&F.push(G[0]),F}static getRangeByAmount(k,B,U){const F=[];for(let G=B;G<=B+U-1;G++){const B=q.data[k][G];j.Aq$.isDefined(B)&&F.push(B)}return F}static getItemCount(k){return j.Aq$.isDefined(q.data[k])?q.data[k].length:0}}q.itemMap={},q.drops=[]},5898:(k,B,U)=>{"use strict";U.d(B,{f:()=>F,l:()=>$});var F,G=U(62459),j=U(95891);!function(k){k[k.Kills=0]="Kills",k[k.QuestionsCorrect=1]="QuestionsCorrect",k[k.GoldEarned=2]="GoldEarned",k[k.GoldSpent=3]="GoldSpent",k[k.ArchivesRuns=4]="ArchivesRuns",k[k.GoldenPagesEarned=5]="GoldenPagesEarned",k[k.ArchiveEnemiesDefeated=6]="ArchiveEnemiesDefeated",k[k.AcademyPagesEarned=7]="AcademyPagesEarned"}(F||(F={}));class ${constructor(){this.updated=!1,this.data={progress:{}}}init(k){j.isEmpty(k)||(this.data=k)}getDataAndClear(){return this.updated=!1,this.data}setTag(k,B){this.data[k]=B,this.updated=!0}getTag(k){var B;return null!==(B=this.data[k])&&void 0!==B?B:0}increment(k,B){this.setTag(k,this.getTag(k)+B)}getProgress(k){var B;return null!==(B=this.data.progress[k])&&void 0!==B?B:0}setProgress(k,B){this.data.progress[k]=B}complete(k){G.Aq$.isDefined(this.data.progress)||(this.data.progress={}),G.Aq$.isDefined(this.data.progress[k])?this.data.progress[k]++:this.data.progress[k]=1,this.updated=!0}}},96535:(k,B,U)=>{"use strict";U.d(B,{W:()=>ce});var F=U(8674),G=U(62459),j=U(88225),$=U(95891),H=U.n($),V=U(44329),W=U(47708),q=U(97495),K=U(2090);const z=(0,U(77601).gb)({key:"username-in-game-display",activateAssociatedExperiments:1,default:{enabled:!1}});var Y=U(58776),Q=U(7247),X=U(4903),Z=U(95066),J=U(36525),tt=U(55110),et=U(90633),it=U(8394),st=U(5491),nt=U(65240),at=U(66582),rt=U(73678),ot=U(66207),ht=U(80105),ct=U(13956),dt=U(35120),lt=U(50503),ut=U(2212),ft=U(48235),bt=U(55122),pt=U(64794),vt=U(41340),gt=U(59510),mt=U(24473),yt=U(45918),_t=U(80434),Et=U(52191),wt=U(73797),Tt=U(77981),St=U(23891),At=U(23082);class Ct{static updateEducationData(k,B){var U,F;return Ct.processHomework(null!==(U=null==k?void 0:k.homework)&&void 0!==U?U:[],null!==(F=null==B?void 0:B.homework)&&void 0!==F?F:[]),Object.assign(Object.assign({},k),B)}static processHomework(k,B){const U=dt.q.instance.prodigy.gameContainer.get("c47-20b6").educationData;for(const F of B){k.find((k=>k.homeworkID===F.homeworkID))||U.handleNewClassAssignment(F)}for(const F of k){B.find((k=>k.homeworkID===F.homeworkID))||U.handleRemovedClassAssignment(F)}}}var Ot=U(76599),It=U(48813),Dt=U(76277),Rt=U(40392),Pt=U(98252),Mt=U(34612),Nt=U(22023),xt=U(23748);class Lt{static convertLegacyStarsToModern(k,B){if(!G.Aq$.isDefined(k))return 0;const U=this.legacyLevelFromStars(k),F=this.legacyStarsToLevel(U-1),j=(k-F)/(this.legacyStarsToLevel(U)-F),$=bt.s.xpRequiredForLevel(U,B),H=bt.s.xpRequiredForLevel(U+1,B);return Math.floor(xt.z.clampedLerp($,H,j))}static legacyStarsToLevel(k){if(k<1)return 0;let B=0;for(let U=1;U<=k;U++)B+=this.legacyEnemiesPerLevel(U);return 100*B}static legacyLevelFromStars(k){for(let B=1;B<=100;B++)if(k=F)k.stars=H.cumulativeXp[W-1],k.nextLevelProgressPercent=1;else{const F=qt.D.getCurrentLevelProgressPercent(W,V,U.cumulativeXp,1),G=bt.s.xpRequiredForLevel(W,B),j=bt.s.xpRequiredForLevel(W+1,B)-G;k.stars=G+Math.round(j*F),k.nextLevelProgressPercent=qt.D.getCurrentLevelProgressPercent(W,k.stars,H.cumulativeXp,1)}G.VyI.log(`[Level curve migration] stars translated: ${V} -> ${k.stars}`,G.$bb.Info),G.VyI.log(`[Level curve migration] Percent to next level: ${100*k.nextLevelProgressPercent}%`,G.$bb.Info)}}var zt=U(77938),Yt=U(21492),Qt=U(5898),Xt=U(51894),Zt=U(27293),Jt=U(39984),te=U(48208),ee=U(37465);class ie{get newRescuedPets(){return this._newRescuedPets}init(k){this._newRescuedPets=null!=k?k:{}}getDataAndClear(){return this.updated=!1,this._newRescuedPets}getNumberOfNewRescues(k){var B,U;return null!==(U=null===(B=this._newRescuedPets[k])||void 0===B?void 0:B.length)&&void 0!==U?U:0}addNewRescue(k,B){const U=H().uniq(H().flatMap(this._newRescuedPets)).length;dt.q.instance.prodigy.gameContainer.get("fa6-b1fc").getZonesForPetId(k).then((F=>{F.forEach((B=>{this._newRescuedPets[B]?this._newRescuedPets[B].includes(k)||(this._newRescuedPets[B].push(k),this.updated=!0):(this._newRescuedPets[B]=[k],this.updated=!0)}));const G=H().uniq(H().flatMap(this._newRescuedPets)).length;U!==G&&this.sendBadgeUpdatedEvent(B,G,U)})).catch(G.RQr.createHandler("Error adding a new rescue"))}clearNewRescues(){this._newRescuedPets={},this.updated=!0}clearRescuesForZone(k){this._newRescuedPets[k]=[],this.updated=!0}clearNewestRescuesByAmount(k,B){var U;null===(U=this._newRescuedPets[B])||void 0===U||U.splice(0,k),this.updated=!0}sendBadgeUpdatedEvent(k,B,U){dt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendBadgeUpdatedEvent({button_name:`pet_menu_${k}`,badge_value:B,previous_badge_value:U})}}var se=U(129),ne=U(57797);class ae{constructor(){this._updated=!1,this._dailyBattleLimit=1,this._dailyBattleCount=0,this._dailyBossBattleRematchCount=0,this._isDailyBattleComplete=new Map,this._dailyBattleRefreshInterval=Wt.s.DAY_IN_MS,this._lastStarted=new Date(0),this._dailyPlacementMap=new Map,this._dailyEncounterMap=new Map,this._festivalProgress={instanceID:0,viewedProgressMenu:!1},this._isFestivalDailyBattle=!1,this._currentWheelID=0,this.isNewFestivalWheel=!1,this.inPostBattleFlow=!1}get updated(){return this._updated}get dailyBattleLimit(){return this._dailyBattleLimit}get dailyBattleCount(){return this._dailyBattleCount}get dailyBossBattleRematchCount(){return this._dailyBossBattleRematchCount}set dailyBossBattleRematchCount(k){this._dailyBossBattleRematchCount=k}isDailyBattleComplete(k){var B;return null!==(B=this._isDailyBattleComplete.get(k))&&void 0!==B&&B}get dailyBattleRefreshInterval(){return this._dailyBattleRefreshInterval}get festivalType(){return this._festivalType}get lastStarted(){return this._lastStarted}getDailyBattlePlacement(k){return this._dailyPlacementMap.get(k)}getDailyBattleEncounter(k){return this._dailyEncounterMap.get(k)}setDailyBattleEncounter(k,B){this._dailyEncounterMap.set(k,B)}get viewedProgressMenu(){return this._festivalProgress.viewedProgressMenu}set viewedProgressMenu(k){this._festivalProgress.viewedProgressMenu=k}get isFestivalDailyBattle(){return this._isFestivalDailyBattle}set isFestivalDailyBattle(k){this._isFestivalDailyBattle=k}get currentWheelID(){return this._currentWheelID}set currentWheelID(k){this._currentWheelID!==k&&(this._currentWheelID=k,this.isNewFestivalWheel=!0)}get currentWheelEndDate(){return this._currentWheelEndDate}set currentWheelEndDate(k){this._currentWheelEndDate=k}init(k){var B,U,F;k&&(this._festivalType=k.festivalType,this._dailyBattleCount=null!==(B=k.currentDailyBattleCount)&&void 0!==B?B:0,this._dailyBossBattleRematchCount=null!==(U=k.currentDailyBossBattleRematchCount)&&void 0!==U?U:0,G.Aq$.isDefined(k.lastStarted)?k.lastStarted>Date.now()?(G.VyI.log(`Last daily start time ${k.lastStarted.toString()} is in the future. Resetting.}`,G.$bb.Error),this._lastStarted=new Date(0)):this._lastStarted=new Date(k.lastStarted):this._lastStarted=new Date(0),this._dailyPlacementMap=Array.isArray(k.placementMap)?new Map(k.placementMap):new Map,this._dailyEncounterMap=Array.isArray(k.encounterMap)?new Map(k.encounterMap):new Map,this._isDailyBattleComplete=Array.isArray(k.isDailyBattleComplete)?new Map(k.isDailyBattleComplete):new Map,this._festivalProgress={instanceID:k.festivalID,viewedProgressMenu:null!==(F=k.viewedProgressMenu)&&void 0!==F&&F})}reset(){this.init({festivalType:"",currentDailyBattleCount:0,currentDailyBossBattleRematchCount:0,lastStarted:0,isDailyBattleComplete:new Map,placementMap:new Map,encounterMap:new Map,festivalID:0,viewedProgressMenu:!1})}start(k,B,U,F,G){this._festivalType=k,this._dailyPlacementMap=U,this._dailyEncounterMap=F,this._dailyBattleLimit=B,G&&(this._dailyBattleRefreshInterval=G*Wt.s.HOURS_IN_MS),this.isExpired(k)&&(this._lastStarted=Bt.R.getNow(),this._dailyBattleCount=0,this._dailyBossBattleRematchCount=0,this._dailyBattleRefreshInterval%Wt.s.DAY_IN_MS==0&&this._lastStarted.setHours(0,0,0,0),this._isDailyBattleComplete=new Map),this._updated=!0}playedBattle(k){if(this._updated=!0,!0!==this._isDailyBattleComplete.get(k))return k===ne.je.Normal?(this._dailyBattleCount++,void(this._dailyBattleCount>=this._dailyBattleLimit&&this._isDailyBattleComplete.set(ne.je.Normal,!0))):void this._isDailyBattleComplete.set(k,!0)}isExpired(k){return this._festivalType!==k||Date.now()>this._lastStarted.getTime()+this._dailyBattleRefreshInterval}setFestival(k){this._festivalProgress.instanceID!==k&&(this._festivalProgress={instanceID:k,viewedProgressMenu:!1}),this._updated=!0}getFestivalInstanceName(){return`${dt.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestivalName()}-${(new Date).getFullYear()}`}getFestivalProgress(){G.VyI.log("getFestivalProgress can only be used in debug builds",G.$bb.Error)}getData(){var k;return{festivalType:this._festivalType,currentDailyBattleCount:this._dailyBattleCount,currentDailyBossBattleRematchCount:this._dailyBossBattleRematchCount,lastStarted:G.Aq$.isDefined(this._lastStarted)?this._lastStarted.getTime():0,isDailyBattleComplete:this._isDailyBattleComplete,placementMap:this._dailyPlacementMap,encounterMap:this._dailyEncounterMap,festivalID:this._festivalProgress.instanceID,viewedProgressMenu:null!==(k=this._festivalProgress.viewedProgressMenu)&&void 0!==k&&k}}getDataAndClear(){return this._updated=!1,this.getData()}}var re=U(3032),oe=U(10592),he=U(84938);class ce extends se.a{get saveEnabled(){return this._saveEnabled}set saveEnabled(k){this._saveEnabled=k}get memberStartDate(){return dt.q.instance.prodigy.gameContainer.get("3a0-8003").memberStartDate}get memberEndDate(){return dt.q.instance.prodigy.gameContainer.get("3a0-8003").memberEndDate}get difficultyUnlocks(){var k;return null===(k=this.data)||void 0===k?void 0:k.difficultyUnlocks}get currentDifficulty(){var k;return null===(k=this.data)||void 0===k?void 0:k.currentDifficulty}get highestDifficultyUnlocked(){var k;return null!==(k=[q.i.Expert,q.i.Hard,q.i.Regular].find((k=>{var B;return null===(B=this.difficultyUnlocks)||void 0===B?void 0:B[k]})))&&void 0!==k?k:q.i.Regular}get locationSelectionType(){switch(this._locationSelectionType){case"home":case"school":case"none":return this._locationSelectionType;default:return this._locationSelectionType="home",this._locationSelectionType}}get isInBattle(){return dt.q.instance.game.state.current===At.G.SecureBattleRevamp}get lastVisitedDate(){return this._lastVisitedDate}get ultimateQuestId(){return this._ultimateQuestId}get ultimateTaskId(){return this._ultimateTaskId}setUltimateSessionStatus(k,B="",U=0,F=!1){if(k===oe.n.None||k===oe.n.Transition?(this._ultimateQuestId="",this._ultimateTaskId=0):(this._ultimateQuestId=B,this._ultimateTaskId=U),this._ultimateSessionStatus!==k&&!this._ultimateSessionStatusLocked){const B=this._ultimateSessionStatus;this._ultimateSessionStatus=k,this._ultimateSessionStatusLocked=F,this.onSessionStatusChange.dispatch(this._ultimateSessionStatus,B)}}get ultimateSessionStatus(){return this._ultimateSessionStatus}get educationData(){return this._educationData}get goalId(){return this._goalId}get hasGrade(){return this._educationData.chosenGrade>0}get userDataPlatform(){return this._userDataPlatform}set userDataPlatform(k){this._userDataPlatform=k}constructor(k){super(k),this._saveEnabled=!1,this.curriculumTreeID=null,this.parentEmail=null,this.registerDate=null,this.owners=[],this.classIDs=null,this.playerParents=[],this.playerTeachers=[],this.onEquipmentChange=new G.HN0,this.onSessionStatusChange=new G.HN0,this.membershipUpsell={tier:null,interval:null,upgradeOptions:[]},this.memberPrompt=!1,this.seenMapTransitionPromptThisSession=!1,this._locationSelectionType="none",this.username=null,this.grade=null,this.world=null,this.earlyBirdLastChance=!1,this.answerStreak=0,this.battleStreak=0,this.parentalLink=!1,this.isClassCodeAttached=!1,this.updated=!1,this.lastVisited=null,this.memberShareDate=null,this.tutorialCompletedThisSession=!1,this.hasUsedTicket=!1,this.onFaintData=null,this._ultimateSessionStatus=oe.n.None,this._ultimateSessionStatusLocked=!1,this._ultimateQuestId="",this._ultimateTaskId=0,this.dailyQuestions=null,this.daily=null,this._educationData=null,this._goalId=null,this._userDataPlatform="prodigy",this.battleResumeData=void 0,this.inProgressRestrictionsSeen=[],this.completedRestrictionProgressBarsSeen=[],this.completedRestrictionUnlockAnimationsSeen=[],this.coOpTeamHandler=null,this._unknownItemNameForAnalytics="Unknown Item",this._playerContainer=null,this.emotes=null,this.dailyQuestions=new te.V,this.daily=new ae,this.newPetRescueData=new ie,this._remoteLogger=dt.q.instance.prodigy.gameContainer.get("e59-eea6"),dt.q.instance.game.broadcaster.addAppListener(wt.Y1.ClosePetsMenu,this.clearTransitionSessionStatus,this,void 0,!0),dt.q.instance.game.state.onStateChange.add(((k,B)=>{B===At.G.TileScreen&&this.clearTransitionSessionStatus()}))}hasMembership(){return dt.q.instance.prodigy.gameContainer.get("3a0-8003").isMember}hasLegacyMembership(){const k=this.hasMembership(),B=dt.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirementsDeprecated(15);return k&&!B}hasMembershipFeatureAccess(k){return dt.q.instance.prodigy.gameContainer.get("3a0-8003").hasFeatureAccess(k)}getActiveMembershipId(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this.hasMembership())return;const k=yield this.sendMembershipQueryRequest(),B=this.filterForMathMemberships(k.data.viewer.activeMemberships);return 0!==B.length?B[0].id:void 0}))}getAllActiveMemberships(){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.sendMembershipQueryRequest()).data.viewer.activeMemberships}))}getActiveMathMembership(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this.hasMembership())return;const k=yield this.sendMembershipQueryRequest(),B=this.filterForMathMemberships(k.data.viewer.activeMemberships);return 0!==B.length?B[0]:void 0}))}getMembershipUpsellData(){return(0,F.sH)(this,arguments,void 0,(function*(k=!1){return!k&&G.Aq$.isDefined(this._membershipUpsellFetchPromise)?this._membershipUpsellFetchPromise:(this._membershipUpsellFetchPromise=null,this.fetchMembershipUpsell())}))}fetchMembershipUpsell(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this.hasMembership())return this.membershipUpsell.tier=at._$.NonMember,this.membershipUpsell.upgradeOptions=[],this._membershipUpsellFetchPromise=Promise.resolve(this.membershipUpsell),this.membershipUpsell;const k=yield this.sendMembershipQueryRequest();return this._membershipUpsellFetchPromise=Promise.resolve(this.processMembershipUpgradeOptions(k)),this.membershipUpsell=yield this._membershipUpsellFetchPromise,this.membershipUpsell}))}processMembershipUpgradeOptions(k){var B;const U=this.filterForMathMemberships(k.data.viewer.activeMemberships);if(0===U.length)return;const F=U[0].currentPackage.tier,G=null===(B=U[0].plan)||void 0===B?void 0:B.interval;return this.membershipUpsell.upgradeOptions=U[0].upgradeOptions,1===F?this.membershipUpsell.tier=at._$.MemberLevelUp:2===F&&(this.membershipUpsell.tier=U[0].upgradeOptions.length>0?at._$.MemberUltimateMath:at._$.MemberUltimateBundle),this.membershipUpsell.interval=G,this.membershipUpsell.ownerIsPartialUser=U[0].ownerIsPartialUser,this.membershipUpsell.ownerHasSSOCredentials=U[0].ownerHasSSOCredentials,this.membershipUpsell}filterForMathMemberships(k){return(null!=k?k:[]).filter((k=>k.categories.includes(Tt.r.Math)))}getDailyQuestions(){return this.dailyQuestions}getUpdatedData(k=!1,B=!0){const U={},F=[{data:this.equipment,name:"equipment"},{data:this.tutorial,name:"tutorial"},{data:this.appearance,name:"appearance"},{data:this.kennel,name:"pets"},{data:this.encounters,name:"encounters"},{data:this.quests,name:"quests"},{data:this.house,name:rt.A_.HOUSE},{data:this,name:"data"},{data:this.backpack,name:"inventory"},{data:this.state,name:"state"},{data:this.achievements,name:"achievements"}];this.validateLevel();for(let j=0;j-1?new Date(F):new Date(U.getServerTimeMs()),$=Wt.s.get("GameConstants.DailyQuestions.OVERRIDE_LAST_LOGIN"),H=$>-1?new Date($):new Date(this.lastVisited),V=k.data,K=G.Aq$.isDefined(V),z=K?V.dailyQuestions:null;this.dailyQuestions.init(z,4,j,H,(()=>{this.updated=!0}));const Y=K?V.daily:null;return this.daily.init(Y),this.newPetRescueData.init(K?V.newPetRescueData:{}),V&&!V.playerTitanData&&(V.playerTitanData={titanBattleProgress:0,seenTitanBattleProgress:0,titanID:0}),V&&!V.lastStoreVisitLevels&&(V.lastStoreVisitLevels={}),V&&!V.unifiedStore&&(V.unifiedStore={viewMoreStoresButtonClicks:0,viewMoreStoresButtonViews:0}),V&&!V.difficultyUnlocks&&(V.difficultyUnlocks=W.Al),Rt.i.DIFFICULTY_MODE=null!==(B=V.currentDifficulty)&&void 0!==B?B:q.i.Regular,mt.S.updateRewardedState().catch(G.RQr.createHandler("[ActivePlayer] Error updating seven levels reward state")),mt.S.calculateFeatureEligibility(),dt.q.instance.prodigy.gameContainer.get("8f8-d5bc").updateRiftsConfigVersion().catch(G.RQr.createHandler("[ActivePlayer] Error updating rifts config to latest version")),It.T.ready.then((()=>{this.validateLevel(),this.updated=!0,bt.s.validatePlayerAndPetXp(),this.updateChargedLevelsData().catch(G.RQr.createHandler("[ActivePlayer] Error updating charged level data")),this.fetchMembershipUpsell().catch(G.RQr.createHandler("[ActivePlayer] Error fetching membership upsell"))})).catch(G.RQr.createHandler("[ActivePlayer] Error awaiting the experiment manager")),ut.J.featureDataHealthCheck(),V.settings||(V.settings={}),Object.values(he._).forEach((k=>{var B;const U=he.B[k];if(!(null===(B=null==U?void 0:U.data)||void 0===B?void 0:B.storedKey))return;const F=U.data.storedKey;G.Aq$.isDefined(V.settings[F])||(V.settings[F]=U.data.defaultValue,this.updated=!0),U.setStoredValue(V.settings[F]),U.onStoredValueChanged.add((k=>{this.getPlayerData().settings[F]=k,this.updated=!0}))})),!0}return!1}transformPlayer(k,B,U,F){super.transformPlayer(k,B,U,F),this.updated=!0}getLatestClassIDLegacy(){return G.Aq$.isDefined(this.classIDs)&&this.classIDs.length>0?this.classIDs[this.classIDs.length-1]:0}getEnergy(){return G.Aq$.isDefined(this.data.energy)?this.data.energy:0}setEnergy(k){super.setEnergy(k),this.updated=!0}set team(k){this.data.team=k,this.updated=!0}get team(){return this.data.team}getRegisterDate(){return G.Aq$.isDefined(this.registerDate)&&"string"==typeof this.registerDate&&(this.registerDate=G.Aq$.isDefined(this.registerDate)?new Date(this.registerDate):null),this.registerDate}setParentEmail(k){this.parentEmail=k,this.updated=!0}hasValidatedParentEmail(){return G.Aq$.isDefined(this.playerParents)&&this.playerParents.length>0}hasValidatedTeacherEmail(){return G.Aq$.isDefined(this.playerTeachers)&&this.playerTeachers.length>0}getAnswerStreak(){return this.answerStreak}heal(){this.changeCurrentHearts(Wt.s.MAX_SAFE_INTEGER);const k=this.kennel.getPets();for(let B=0;Bk+B.questions.length),0)===G.skills.reduce(((k,B)=>k+B.correct+B.incorrect),0)&&dt.q.instance.prodigy.gameContainer.get("c47-20b6").educationData.handleClassAssignmentCompleted(G)}}getPlayerClass(){return G.Aq$.isDefined(this.data)?this.data.defaultClass:""}setPlayerClass(k){this.data.defaultClass=k}addSpell(k){G.Aq$.isDefined(this.data.spells)||(this.data.spells=[]),Ft.J.inArray(this.data.spells,k)||(this.data.spells.push(k),G.Aq$.isDefined(this.data.spellbook)&&!Ft.J.inArray(this.data.spellbook,k)&&this.data.spellbook.length<6&&this.data.spellbook.push(k)),this.updated=!0}unlockMemberItems(){this.hasMembership()&&(this.memberPrompt=!1,this.updated=!0,G.Aq$.isDefined(this.getPlayerData().nm)?this.getPlayerData().nm=2:(G.Aq$.isDefined(this.getPlayerData().startDate)&&this.getPlayerData().startDate<(new Date).getTime()&&(this.getPlayerData().daysToConvert=((new Date).getTime()-this.getPlayerData().startDate)/864e5),this.getPlayerData().nm=1),this.backpack.unlockAllItems())}setZone(k,B){var U,F,$;if(G.Aq$.isDefined(B)&&B.indexOf("scene")>-1)return;dt.q.instance.prodigy.world.getZone(k);const H=(0,Dt.G)(K.u).enabled&&ut.J.isZoneMapDifficultyModeAgnostic(B)?Rt.i.DIFFICULTY_MODE:null!==(F=null===(U=Rt.i.getZoneData(k))||void 0===U?void 0:U.difficultyMode)&&void 0!==F?F:q.i.Regular;H!==this.currentDifficulty&&(dt.q.instance.prodigy.gameContainer.get("ba4-af03").setCurrentDifficulty(H),Rt.i.setDifficultyMode(H));const V=this.getPlayerData();V.zone=B,Ut.w.isTitanMap(B)||(null!==($=V.lastVisitedMapForZone)&&void 0!==$||(V.lastVisitedMapForZone={}),V.lastVisitedMapForZone[k]=B),this.updated=!0,j.setTag("zone",B)}getLastVisitedMapForZone(k){var B;return null===(B=this.getPlayerData().lastVisitedMapForZone)||void 0===B?void 0:B[k]}changeGold(k){k>0?(this.achievements.increment(Qt.f.GoldEarned,k),dt.q.instance.game.broadcaster.broadcast(wt.ib.ItemReceived,void 0,[{ID:1,type:"gold",N:k,balance:this.getGold()+k}])):k<0&&(this.achievements.increment(Qt.f.GoldSpent,Math.min(Math.max(this.getPlayerData().gold,0),Math.abs(k))),dt.q.instance.game.broadcaster.broadcast(wt.ib.ItemConsumed,void 0,[{ID:1,type:"gold",N:k,balance:this.getGold()+k}])),this.getPlayerData().gold=this.getGold()+k,this.getPlayerData().gold<0&&delete this.getPlayerData().gold,this.getPlayerData().gold>Wt.s.MAX_SAFE_INTEGER&&(this.getPlayerData().gold=1e9),this.updated=!0}getInteractionIdForEquipAnalytics(k){var B;const U=dt.q.instance.prodigy.gameContainer.get("c47-20b6");return k&&null!==(B=U.featureCommon.getCurrentButtonID(k))&&void 0!==B?B:kt.$.generateUID()}equip(k,B){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U=!1,F){var j;const $=yield zt.t.secureGetItem(B,k);if(1===(null===(j=null==$?void 0:$.data)||void 0===j?void 0:j.member)&&!this.hasMembership())return U&&dt.q.instance.prodigy.open.membershipInfo(void 0,{conversionFunnelName:jt.o.FunnelUseMemberLockedItem,conversionFunnelMetadata:`${B}-${k}`}),!1;const H=this.equipment.getData()[B];switch(B){case"follow":this.equipment.setFollow(k);break;case"hat":this.equipment.setHat(k);break;case"outfit":this.equipment.setOutfit(k);break;case"weapon":this.equipment.setWeapon(k);break;case"spellRelic":this.equipment.setSpellRelic(k);break;case"boots":this.equipment.setBoots(k);break;case"mount":this.equipment.setMount(k);break;case"costume":this.equipment.setCostume(k);break;default:return G.VyI.log(`Unrecognized equipment type ${B}.`,G.$bb.Warning),!1}const V=dt.q.instance.prodigy.gameContainer.get("c47-20b6"),W=this.getInteractionIdForEquipAnalytics(F);if(V.item.sendItemEquippedEvent({item_name:$?Ft.J.getItemName($):this._unknownItemNameForAnalytics,item_type:B,item_id:k},W),G.Aq$.isDefined(H)){const k=yield zt.t.secureGetItem(B,H);V.item.sendItemUnequippedEvent({item_name:k?Ft.J.getItemName(k):this._unknownItemNameForAnalytics,item_type:B,item_id:H},W)}return"costume"===B&&$&&this.sendWizardCostumesAnalytics($,F),this.onEquipmentChange.dispatch(B,!0),!0}))}unEquip(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=yield zt.t.secureGetItem(B,k);switch(B){case"follow":this.equipment.setFollow(null);break;case"hat":this.equipment.setHat(null);break;case"outfit":this.equipment.setOutfit(null);break;case"weapon":this.equipment.setWeapon(null);break;case"spellRelic":this.equipment.setSpellRelic(null);break;case"boots":this.equipment.setBoots(null);break;case"mount":this.equipment.setMount(null);break;case"costume":this.equipment.setCostume(null);break;default:return G.VyI.log(`Unrecognized equipment type ${B}.`,G.$bb.Warning),!1}return dt.q.instance.prodigy.gameContainer.get("c47-20b6").item.sendItemUnequippedEvent({item_name:F?Ft.J.getItemName(F):this._unknownItemNameForAnalytics,item_type:B,item_id:k},this.getInteractionIdForEquipAnalytics(U)),"costume"===B&&F&&this.sendWizardCostumesAnalytics(F,U),this.onEquipmentChange.dispatch(B,!1),!0}))}sendWizardCostumesAnalytics(k,B){const U=dt.q.instance.prodigy.gameContainer.get("c47-20b6");U.playerIdentityAvatar.sendPlayerAvatarUpdatedEvent("costume",Ft.J.getItemName(k),{transaction_id:B?U.featureCommon.getCurrentButtonID(B):void 0})}updateMembershipVideoAdData(k){const B=dt.q.instance.prodigy.gameContainer.get("a03-308f").getServerTimeMs();this.data.membershipVideoTimeStamp=B,this.updated=!0}completeDaily(k,B){this.getPlayerData()[k].isComplete=B,this.updated=!0}setSpinDate(k){this.getPlayerData()[`spinDate${k}`]=Bt.R.getDateTime(),this.updated=!0}spinWheel(k){this.getPlayerData()[`numSpins${k}`]++,this.updated=!0}canSpin(k){return[3].indexOf(k)>=0?0===this.getPlayerData()[`numSpins${k}`]||1===this.getPlayerData()[`numSpins${k}`]&&this.hasMembership()||Wt.s.get("GameConstants.Debug.UNLIMITED_WHEEL_SPINS"):G.Aq$.isDefined(this.getPlayerData()[`numSpins${k}`])?this.getPlayerData()[`spinDate${k}`]!==Bt.R.getDateTime()?(this.setSpinDate(k),this.getPlayerData()[`numSpins${k}`]=0,!0):0===this.getPlayerData()[`numSpins${k}`]||1===this.getPlayerData()[`numSpins${k}`]&&this.hasMembership()||Wt.s.get("GameConstants.Debug.UNLIMITED_WHEEL_SPINS"):(this.setSpinDate(k),this.getPlayerData()[`numSpins${k}`]=0,!0)}canPurchaseSpin(k,B){var U;if(!B.purchaseSpinDialogueID)return!1;const F=null!==(U=B.purchaseSpinCount)&&void 0!==U?U:1,G=this.hasMembership()?2+F:1+F;return this.getPlayerData()[`numSpins${k}`]k+(B&&!B.isKnockedOut()?B.getCurrentHearts():0)),0)}addBattle(){this.getPlayerData().battleCounter=this.getBattles()+1,this.updated=!0}addWin(){this.getPlayerData().win=this.getWins()+1,this.updateStreak(!0),this.updateWinLossRatio(),this.updated=!0}addLoss(){this.getPlayerData().loss=this.getLosses()+1,this.updateStreak(!1),this.updateWinLossRatio(),this.updated=!0}updateStreak(k=!1){let B=this.getBattleStreak();B=k?B<0?1:B+=1:B>0?-1:B-=1,this.getPlayerData().battleStreak=$.clamp(B,-ce.PLAYER_BATTLE_STREAK_CAP,ce.PLAYER_BATTLE_STREAK_CAP)}updateWinLossRatio(){this.getPlayerData().winLossRatio=$.round(this.getWins()/(this.getWins()+this.getLosses()),2)}processDeserter(){return!!G.Aq$.isDefined(this.getPlayerData().deserter)&&(delete this.getPlayerData().deserter,this.updated=!0,!0)}completeTower(k){k>this.getTowerProgress()&&(this.getPlayerData().tower=k),this.updated=!0}isBlockedByDarkTowerMemberGate(){const k=this.getTowerProgress();return!this.hasMembership()&&k<100&&k>=Wt.s.get("GameConstants.Tower.MAX_FREE_MEMBER_FLOOR")}swapSpells(k,B){if(G.Aq$.isDefined(k)&&G.Aq$.isDefined(B)){G.Aq$.isDefined(this.getPlayerData().spellbook)||(this.getPlayerData().spellbook=this.getAllAttacks().slice(0,6));for(let U=0;U0}hasCompletedTutorial(){const k=$.get(dt.q.instance.prodigy.world.zones,rt.A_.HOUSE,null);return G.Aq$.isDefined(k)&&$.get(k.getQuestState(),"ID",0)>1}hasCompletedTowerTownTutorial(){const k=new vt.Y(this.game);return k.init(),k.isBreadcrumbComplete(gt.M.TutorialCompleted)}setAllowsHouseVisitors(k){super.setAllowsHouseVisitors(k),this.updated=!0}hasUnclaimedMembershipRewards(){return this.shouldRewardCloudMount()||this.shouldRewardFromSegmentedOffer()||ft.W.hasRewardAvailable}shouldRewardCloudMount(){return this.hasMembership()&&0===this.backpack.hasItem("mount",1)}shouldRewardFromSegmentedOffer(){const k=dt.q.instance.prodigy.gameContainer.get("a02-c2b2");return!(!k.userHasOfferAvailable()||!k.meetsMembershipRequirement)&&k.rewardsForCurrentUserSegment.length>0}rewardMembershipPrizes(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B={type:"mount",ID:1},U=dt.q.instance.prodigy.gameContainer.get("a02-c2b2"),{meetsMembershipRequirement:F,rewardsForCurrentUserSegment:j}=U,$=[...F&&U.userHasOfferAvailable()?j:[],...this.shouldRewardCloudMount()?[B]:[],...ft.W.hasRewardAvailable?yield ft.W.collectMemberUpgradeReward():[]];if(this.hasMembership()&&$.length>0){this.shouldRewardCloudMount()&&Ft.J.bagItem(B,this.game,"got-item",void 0),j.length>0&&U.redeemActiveOffer();const F=new G._mx,H=F.addComponent(St.f);return H.addItems($,!0),H.onComplete.addOnce((()=>{null==k||k(),dt.q.instance.prodigy.game.broadcaster.broadcast(wt.H3.MembershipRewardsFlowComplete),F.destroy()})),H.showPetsInPetCardFormat=!0,H.sourceType=nt.C.ConversionOffer,dt.q.instance.prodigy.open.rewardCloudMountMenu((()=>H.awardItem())),!0}return null==k||k(),!1}))}isItemOwned(k){let B=this.backpack.hasItem(k.type,k.ID)>0;if("dorm"===k.type)B=this.house.getOwned(k.ID)>=9;else if("dormbg"===k.type){const U=zt.t.getItem("dormbg",k.ID).data;B=G.Aq$.isDefined(U)&&U.tag===this.house.getCurrentHouseTag()}else"pet"===k.type?B=this.kennel.hasPet(k.ID):"item"===k.type?B=this.backpack.hasItem(k.type,k.ID)>=99:"hair"===k.type?B=this.appearance.getHair().style===k.ID:"eyeColor"===k.type?B=this.appearance.getEyeColor()===k.ID:"skinColor"===k.type?B=this.appearance.getSkinColor()===k.ID:"hairColor"===k.type?B=this.appearance.getHair().color===k.ID:"face"===k.type?B=this.appearance.getFace()===k.ID:"mathTownInterior"===k.type?B=this.backpack.hasItem(k.type,k.ID)>0:"mathTownFrame"!==k.type&&"mathTownDecor"!==k.type||(B=this.backpack.hasItem(k.type,k.ID)>=99);return B}getItemCount(k,B){if((0,it.p)(k,B))return this._secureInventory.getCount({type:k,id:B});switch(k){case"dorm":return this.house.getOwned(B);case"pet":return this.kennel.amountOfPet(B);case"currency":return 1===B?this.getGold():this.backpack.hasItem(k,B);case"gold":return this.getGold()}return this.backpack.hasItem(k,B)}hasHouseItem(k){return"dorm"===k.type&&this.house.getOwned(k.ID)>0}anyPetsAboveLevel(k){const B=this.kennel.getPets();for(let U=0;Uk)return!0;return!1}getDrops(){return super.getDrops().concat({type:"gold",N:100},zt.t.getItemDrops())}checkVersion(){var k,B,U,F,j,H,W,K,z,Y,Q,Z,J;const it=G.Aq$.isDefined(this.getPlayerData().versionID)?this.getPlayerData().versionID:0;if(it<1&&(G.Aq$.isDefined(this.state.data.zone)&&G.Aq$.isDefined(this.state.data.zone.lamplight)&&delete this.state.data.zone.lamplight,G.Aq$.isDefined(this.state.data.zone)&&G.Aq$.isDefined(this.state.data.zone.house)&&delete this.state.data.zone.house,this.state.updated=!0),it<2&&this.kennel.hasPet(125)&&this.backpack.add("follow",125),it<3){let k=this.state.get("zone-forest-quest-ID");G.Aq$.isDefined(k)&&k>=12&&this.state.set("zone-forest-quest",{ID:13}),k=this.state.get("zone-shiverchill-quest-ID"),G.Aq$.isDefined(k)&&k>=15&&this.state.set("zone-shiverchill-quest",{ID:16}),k=this.state.get("zone-skywatch-quest-ID"),G.Aq$.isDefined(k)&&k>=13&&this.state.set("zone-skywatch-quest",{ID:14}),k=this.state.get("zone-bonfire_spire-quest-ID"),G.Aq$.isDefined(k)&&k>=14&&this.state.set("zone-bonfire_spire-quest",{ID:15})}if(it<4){G.Aq$.isDefined(this.getPlayerData().stars)||(this.getPlayerData().stars=0),this.getPlayerData().stars=10*this.getPlayerData().stars,this.changeCurrentHearts(Wt.s.MAX_SAFE_INTEGER);const k=this.kennel.getPets();for(let B=0;B0&&this.backpack.consume("weapon",1e3,1),1e3===this.equipment.getWeapon()&&this.equipment.setWeapon(0)),it<9){let k=this.backpack.hasItem("weapon",1e3);k>0&&this.backpack.consume("weapon",1e3,k),1e3===this.equipment.getWeapon()&&this.equipment.setWeapon(0),k=this.backpack.hasItem("weapon",96),k>0&&this.backpack.consume("weapon",96,k),96===this.equipment.getWeapon()&&this.equipment.setWeapon(0)}if(it<10||it<14){const k=G.Aq$.isDefined(Number.MAX_SAFE_INTEGER)?Number.MAX_SAFE_INTEGER:9007199254740991;if(G.Aq$.isDefined(this.getPlayerData().playerTransformation)&&(G.Aq$.isDefined(this.getPlayerData().playerTransformation.maxTime)&&this.getPlayerData().playerTransformation.maxTime===k||G.Aq$.isDefined(this.getPlayerData().playerTransformation.timeRemaining)&&this.getPlayerData().playerTransformation.timeRemaining===k)){const k=this.getMaxTimeForCurrentMorphMarbleEffect();this.getPlayerData().playerTransformation.maxTime=k,this.getPlayerData().playerTransformation.timeRemaining=k}}if(it<11&&G.Aq$.isDefined(this.getPlayerData().playerTransformation)&&G.Aq$.isDefined(this.getPlayerData().playerTransformation.transformID)&&this.getPlayerData().playerTransformation.transformID>-1&&!G.Aq$.isDefined(this.getPlayerData().playerTransformation.timeRemaining)){const k=this.getMaxTimeForCurrentMorphMarbleEffect();this.getPlayerData().playerTransformation.maxTime=k,this.getPlayerData().playerTransformation.timeRemaining=k}if(it<12){const k=dt.q.instance.prodigy.world.getZone(rt.A_.HOUSE);k.getState("hasClickedPlayerCardVisit")&&dt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(et.B.FEATURE_HOUSE_VISITING,et.B.BREADCRUMB_CLICKED_CARD_VISIT_BUTTON),k.getState("hasClickedWorldMap")&&dt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(et.B.FEATURE_HOUSE_VISITING,et.B.BREADCRUMB_CLICKED_WORLD_MAP_BUTTON),k.getState("hasClickedLockButton")&&dt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(et.B.FEATURE_HOUSE_VISITING,et.B.BREADCRUMB_CLICKED_HOUSE_LOCK_BUTTON);const B=k.getState("houseMovingBreadcrumbs");G.Aq$.isDefined(B)&&(B>=0&&dt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(et.B.FEATURE_HOUSE_MOVING,et.B.BREADCRUMB_CLICKED_WORLD_MAP_BUTTON),B>=1&&dt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(et.B.FEATURE_HOUSE_MOVING,et.B.BREADCRUMB_CLICKED_WORLD_MAP_HOUSE),B>=2&&dt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(et.B.FEATURE_HOUSE_MOVING,et.B.BREADCRUMB_CLICKED_HOUSE_MOVE_BUTTON)),Ft.J.safeDeleteObjectProperty(this.getPlayerData(),"arenaRank"),Ft.J.safeDeleteObjectProperty(this.getPlayerData(),"arenaScore"),G.Aq$.isDefined(this.achievements)&&delete this.achievements.data.progress[13]}if(it<13&&Ft.J.safeDeleteObjectProperty(this.getPlayerData(),"reward"),it<15&&G.Aq$.isDefined(this.kennel.data)){const B=[],U=[...this.kennel.data];for(let F=0;F{var B;return j.name===(null===(B=null==k?void 0:k.data)||void 0===B?void 0:B.name)})))||void 0===k?void 0:k.ID;if(!G.Aq$.isDefined($)||$<=0)continue;let H=!0;for(const k of B)if($===k){U.splice(F,1),F--,H=!1;break}H&&(B.push($),U[F]={ID:$,stars:0,level:1}),this.kennel.updated=!0}this.kennel.populateKennel(U)}if(it<16&&(delete this.state.data.useOldTutorialPath,!this.hasCompletedTutorial())){delete this.getPlayerData().zone,delete this.state.data.zone.house,delete this.state.data.zone.lamplight;const k=[1,4,7,10],B=this.kennel.data.filter((B=>!$.includes(k,B.ID)));this.kennel.populateKennel(B)}if(it<17&&dt.q.instance.prodigy.world.getZone(rt.A_.LAMPLIGHT).isOnSequence(1,3)&&(this.getPlayerData().zone="lamplight-B0"),it<18&&(delete this.getPlayerData().spinDate,delete this.getPlayerData().numSpins),it<19&&this.hasCompletedTutorial()&&(null===this.appearance.getName()&&this.appearance.setName(new tt.S),G.Aq$.isDefined(this.appearance.getName().getFirstName())||(this.appearance.getName().setFirstName(Yt.C.getRandomFirstName()),this.appearance.updated=!0),G.Aq$.isDefined(this.appearance.getName().getMiddleName())&&G.Aq$.isDefined(this.appearance.getName().getLastName())||(this.appearance.getName().setMiddleName(Yt.C.getRandomMiddleName()),this.appearance.getName().setLastName(Yt.C.getRandomLastName()),this.appearance.updated=!0)),it<20){let k=this.state.get("zone-lamplight");$.get(this.data,"isNewTutorial",!1)&&(k=this.state.get("zone-house")),$.get(k,"quest.ID",0)>=2&&G.Aq$.isDefined(this.backpack)&&this.backpack.hasItem("key",13)>0||(this.state.data.tutorial={},this.state.data.zone={},this.state.data.world={},this.state.data.breadcrumbs={},this.state.updated=!0,this.backpack.data.key=[],this.backpack.updated=!0),delete this.data.isNewTutorial}if(it<21){const k={bonfire_spire:[{questID:5,relicID:1},{questID:11,relicID:2},{questID:14,relicID:3}],shiverchill:[{questID:3,relicID:4},{questID:10,relicID:5},{questID:14,relicID:6}],skywatch:[{questID:4,relicID:7},{questID:10,relicID:8},{questID:13,relicID:9}],shipwreck_shore:[{questID:3,relicID:10},{questID:7,relicID:11},{questID:11,relicID:12}],forest:[{questID:4,relicID:13},{questID:8,relicID:14},{questID:12,relicID:15}]};Object.keys(k).forEach((B=>{for(let U=0;U{if(k.timesRescued>0){const U=zt.t.getItem("pet",k.ID);let F=Nt.P8.findPreviousEvolution(U,B);for(;F;)F&&this.encounters.getPetTimesRescued(F.ID)<1&&this.encounters.addToPetTimesRescued(F.ID,k.timesRescued),F=Nt.P8.findPreviousEvolution(F,B)}};k.pets.forEach(U)}if(it<34){const k=this.encounters.getDataAndClear();$.remove(k.pets,(k=>Nt.P8.isPetACrystalMonster(k.ID))),$t.h.STARTER_PETS.forEach((B=>{const U=k.pets.find((k=>k.ID===B));(!U||U.timesRescued<1)&&this.encounters.addToPetTimesBattled(B,1)}))}if(34===it){const k=this.encounters.getDataAndClear(),B=zt.t.getCategoryItems("pet"),U=dt.q.instance.prodigy.gameContainer.get("a03-308f").getServerTimeMs();for(let G=0;G{if(k.timesRescued>0){const U=zt.t.getItem("pet",k.ID);let F=Nt.P8.findPreviousEvolution(U,B);for(;F;)this.encounters.getPetTimesRescued(F.ID)<1&&this.encounters.addToPetTimesRescued(F.ID,k.timesRescued),F=Nt.P8.findPreviousEvolution(F,B)}};k.pets.forEach(F)}if(it<35&&0===this.backpack.hasItem("mount",1)&&this.equipment.setMount(null),it<38&&this.state.data.breadcrumbs&&Ft.J.safeDeleteObjectProperty(this.state.data.breadcrumbs,"BREADCRUMB_FEATURE_ANTI_CHURN_2"),it<39&&(this.achievements.setTag(Qt.f.Kills,this.achievements.data.kills),delete this.achievements.data.kills,this.achievements.setTag(Qt.f.QuestionsCorrect,this.achievements.data.qC),delete this.achievements.data.qC,this.achievements.setTag(Qt.f.GoldEarned,this.achievements.data.gE),delete this.achievements.data.gE,this.achievements.setTag(Qt.f.GoldSpent,this.achievements.data.gS),delete this.achievements.data.gS),it<41&&this.kennel.data.filter((k=>G.Aq$.isDefined(k.catchDate))).sort(((k,B)=>k.catchDate-B.catchDate)).forEach((k=>{this.encounters.setPetFirstRescuedDate(k.ID,k.catchDate)})),it<42){const k=new Date("2022-10-01").getTime();this.encounters.getDataAndClear().pets.filter((k=>k.timesRescued>0&&!G.Aq$.isDefined(k.firstRescuedDate))).forEach((B=>this.encounters.setPetFirstRescuedDate(B.ID,k)))}if(it<43&&0===this.appearance.getFace()&&this.appearance.setFace(Zt.q.DEFAULT_FACE),it<44){for(const k of this.kennel.data)k.uniqueID=(0,V.Ak)();this.kennel.updated=!0}if(it<45&&It.T.ready.then((()=>{var k;const B=dt.q.instance.prodigy.world.getZone(rt.A_.SHIVERCHILL);6===(null===(k=B.getState("quest"))||void 0===k?void 0:k.ID)&&!G.Aq$.isDefined(B.getState("furnace"))&&(this.state.data.zone[rt.A_.SHIVERCHILL]={})})).catch(G.RQr.createHandler("ActivePlayer.ts: Could not find experiment manager ")),it<47&&It.T.ready.then((()=>{var k,B,U,F,j;if(this.hasCompletedTutorial()){const H=dt.q.instance.prodigy.world.getZone(rt.A_.FOREST),V=(null===(k=this.data)||void 0===k?void 0:k.questSystem)===re.p.Legacy,W=!G.Aq$.isDefined(null===(B=this.data)||void 0===B?void 0:B.questSystem),q=!$.isEqual(null===(U=H.getQuestState())||void 0===U?void 0:U.req,null===(F=H.getCurrentQuest())||void 0===F?void 0:F.req),K=H.getCurrentQuestID()>5&&this.encounters.getPetTimesRescued(Ht.c.PET_AWARD_ID)<1;if(V||W&&(q||K)){H.migrateQuestProgress();const k=dt.q.instance.prodigy.world.getZone(rt.A_.SHIVERCHILL).questHub;this.data.lastVisitedMapForZone[rt.A_.SHIVERCHILL]=k,(null===(j=this.data)||void 0===j?void 0:j.zone.includes(rt.A_.SHIVERCHILL))&&(this.data.zone=k)}}})).catch(G.RQr.createHandler("ActivePlayer.ts: Could not find experiment manager ")),it<48&&this.appearance.gender&&delete this.appearance.gender,it<49&&(G.Aq$.isDefined(this.data.questSystem)&&"object"!=typeof this.data.questSystem&&delete this.data.questSystem,this.setQuestSystem(rt.A_.FOREST,re.p.Revised)),it<50){const k=1===this.equipment.getOutfit(),B=this.backpack.hasItem("outfit",1)>0;k&&!B&&this.equipment.setOutfit(null)}if(it<51&&!G.Aq$.isDefined(this.data.nextLevelProgressPercent)&&It.T.ready.then((()=>{Kt.legacyMigrateCreatureToLevelCurve(this.getPlayerData(),st.V.Player),this.forceSaveCharacter()})).catch(G.RQr.createHandler("[ActivePlayer] Error awaiting the experiment manager")),it<52&&It.T.ready.then((()=>{for(const k of this.kennel.data)Kt.legacyMigrateCreatureToLevelCurve(k,st.V.Player);this.kennel.updated=!0,this.forceSaveCharacter()})).catch(G.RQr.createHandler("[ActivePlayer] Error awaiting the experiment manager")),it<53&&G.Aq$.isDefined(this.data.rate)&&delete this.data.rate,it<54&&(G.Aq$.isDefined(this.getQuestSystem("ftue"))?this.getQuestSystem("ftue")===re.p.RevisedWithPlayerGoals?this.setQuestSystem("playerGoals",re.p.PlayerGoalsFtue):this.setQuestSystem("playerGoals",re.p.PlayerGoalsPostFtue):this.hasStartedTutorial()?this.setQuestSystem("playerGoals",re.p.PlayerGoalsPostFtue):this.setQuestSystem("playerGoals",re.p.PlayerGoalsFtue),this.forceSaveCharacter()),it<55&&this.kennel.hasPet(245)){const k=zt.t.getItem("pet",245),B=null==k?void 0:k.data.unlockFollow;G.Aq$.isDefined(B)&&this.backpack.hasItem("follow",B)<1&&this.backpack.add("follow",B)}if(it<56&&delete this.data.battleSystem,it<57&&Array.isArray(this.data.lastStoreVisit)){const k={};this.data.lastStoreVisit.forEach((B=>k[B[0]]=B[1])),delete this.data.lastStoreVisit,this.data.lastStoreVisitLevels=k}if(it<58&&!1===(null===(j=this.difficultyUnlocks)||void 0===j?void 0:j.hard)){dt.q.instance.prodigy.world.getZone(rt.A_.FORESTHARD).setState("quest",{})}if(it<59&&(G.Aq$.isDefined(this.data.bountyScore)&&delete this.data.bountyScore,this.backpack.consume("key",5,100),this.backpack.consume("key",6,100),this.backpack.consume("key",7,100),this.backpack.consume("item",84,100),this.backpack.consume("item",85,100),this.backpack.consume("item",86,100),this.state.set("world-bounties",void 0)),it<60){const k=dt.q.instance.prodigy.world.getZone(rt.A_.SHIVERCHILL).getState("quest");if(12===(null==k?void 0:k.ID)&&0===k.seq){const B=this.backpack.hasItem("item",74);if(3===B||4===B?k.seq=1:5===B&&(k.seq=2),k.state)for(let U=1;U<=5;U++)k.state[U.toString()]=U<=B?1:0;this.state.data.zone[rt.A_.SHIVERCHILL].quest.seq=k.seq,this.state.data.zone[rt.A_.SHIVERCHILL].quest.state=k.state,this.state.updated=!0}}if(it<61&&(null===(H=this.state.data.zone[rt.A_.SHIVERCHILLHARD])||void 0===H||delete H.uniqueEncounters,this.state.updated=!0),it<62){const k=new Map([["C12-shipwreck_shore_C12_R1_boss",{assetType:"hat",assetID:270}],["C9-shipwreck_shore_C9_R1_boss",{assetType:"weapon",assetID:271}],["B6-shipwreck_shore_B6_R1_boss",{assetType:"boots",assetID:145}],["B2-shipwreck_shore_B2_R1_boss",{assetType:"outfit",assetID:262}]]),B=dt.q.instance.prodigy.world.getZone(rt.A_.SHIPWRECKHARD);for(const[G,j]of k)B.getState(`uniqueEncounters-${G}`)&&!this.backpack.hasItem(j.assetType,j.assetID)&&this.backpack.add(j.assetType,j.assetID);const U=B.getState("quest");(null==U?void 0:U.ID)&&U.ID>11&&(this.backpack.hasItem("spellRelic",59)||this.backpack.add("spellRelic",59));const F=dt.q.instance.prodigy.world.getZone(rt.A_.SHIVERCHILLHARD).getState("quest");(null==F?void 0:F.ID)&&F.ID>13&&(this.backpack.hasItem("spellRelic",57)||this.backpack.add("spellRelic",57)),this.state.updated=!0}if(it<63){const k=dt.q.instance.prodigy.world.getZone(rt.A_.SHIVERCHILLHARD).getState("quest"),B=this.state.data.zone[rt.A_.SHIVERCHILLHARD];if(1===(null==k?void 0:k.ID)&&2===(null==k?void 0:k.seq)){const k=["shiverchill_B10_S1_special","shiverchill_B10_S2_special","shiverchill_B10_S3_special"];for(const U of k)G.Aq$.isDefined(null===(K=null===(W=null==B?void 0:B.uniqueEncounters)||void 0===W?void 0:W.B10)||void 0===K?void 0:K[U])&&delete B.uniqueEncounters.B10[U]}if(8===(null==k?void 0:k.ID)&&1===(null==k?void 0:k.seq)){const k=["shiverchill_B7_S1_special","shiverchill_B7_S2_special"],U=["shiverchill_B6_S1_special","shiverchill_B6_S2_special"];for(const F of k)G.Aq$.isDefined(null===(Y=null===(z=null==B?void 0:B.uniqueEncounters)||void 0===z?void 0:z.B7)||void 0===Y?void 0:Y[F])&&delete B.uniqueEncounters.B7[F];for(const F of U)G.Aq$.isDefined(null===(Z=null===(Q=null==B?void 0:B.uniqueEncounters)||void 0===Q?void 0:Q.B6)||void 0===Z?void 0:Z[F])&&delete B.uniqueEncounters.B6[F]}this.state.updated=!0}if(it<64&&(null===(J=this.data.questSystem)||void 0===J||delete J.zoneUnlockType,this.state.updated=!0),it<65){const k=this.getPlayerData(),B=k.postBattleMemberVideo;B&&(k.featureInteractionTimestamps=Object.assign(Object.assign(Object.assign({},k.featureInteractionTimestamps),B.lastWatchedTimestamp&&{[X.s.PostBattleFlowHome]:{timestamp:B.lastWatchedTimestamp,videoId:B.lastWatchedVideoId}}),B.lastWatchedSchoolTimestamp&&{[X.s.PostBattleFlowSchool]:{timestamp:B.lastWatchedSchoolTimestamp,videoId:B.lastWatchedSchoolVideoId}}),delete k.postBattleMemberVideo)}if(it<66){const k=dt.q.instance.prodigy.world.getZone(rt.A_.BONFIREHARD),B=k.getState("quest"),U=this.backpack.hasItem("key",12,q.i.Hard)>0,F=this.hasFoundKeystone(rt.A_.BONFIREHARD);void 0!==(null==B?void 0:B.ID)&&B.ID>=1&&(!F&&U&&B.ID<=12?(B.ID=13,B.seq=0,k.setState("lever1",1),k.setState("lever2",1),k.setState("lever3",1)):F&&U&&B.ID<=14&&(B.ID=15,B.seq=0,k.setState("lever1",1),k.setState("lever2",1),k.setState("lever3",1)))}it<66&&(this.getPlayerData().versionID=66,this.updated=!0)}validateTutorialState(){const k=this.hasCompletedTutorial(),B=this.hasStartedTutorial(),U=dt.q.instance.prodigy.gameContainer.get("f91-8211"),$="ftue",H=this.getQuestSystem($)===re.p.Legacy,V=!G.Aq$.isDefined(this.data.zone);if(V&&!this.hasQuestSystemProperty($))return this.setQuestSystem($,re.p.RevisedWithPlayerGoals),void this.setQuestSystem("playerGoals",re.p.PlayerGoalsFtue);V||k||U.getQuestStatus(yt.M.FTUE).then((k=>(0,F.sH)(this,void 0,void 0,(function*(){var F,V,W,q,K;const z=k===Y.t.COMPLETE,Q=k===Y.t.IN_PROGRESS;if(z){new Et.G("",0).markTutorialComplete(),dt.q.instance.prodigy.world.it("forest-C8");const k=new Error("[User State Error] Tutorial completion flag does not match tutorial quest progress. See ActivePlayer.validateTutorialState()");j.captureException(k),G.RQr.logError(k,"")}if(Q){const k=this.data.zone,B=yield U.getTasksInProgress(void 0,[yt.M.FTUE]),$=null===(K=null===(q=null===(W=null===(V=null===(F=null==B?void 0:B[0])||void 0===F?void 0:F.onSetupTasks)||void 0===V?void 0:V[0])||void 0===W?void 0:W.featureRequirements)||void 0===q?void 0:q.requirements)||void 0===K?void 0:K[0].currentMap;if(G.Aq$.isDefined($)&&$!==k){dt.q.instance.prodigy.world.it($);const k=new Error("[User State Error] User is on the wrong map for their current tutorial step. See ActivePlayer.validateTutorialState()");j.captureException(k),G.RQr.logError(k,"")}}if(H)this.setQuestSystem($,re.p.RevisedWithPlayerGoals),this.setQuestSystem("playerGoals",re.p.PlayerGoalsFtue),this.resetAccount();else if(B){const B="ftue";switch(k){case Y.t.IN_PROGRESS:G.Aq$.isDefined(this.getQuestSystem(B))||(this.setQuestSystem(B,re.p.Revised),delete this.state.data.zone.academy.quest,this.state.updated=!0);break;case Y.t.COMPLETE:new Et.G("",0).markTutorialComplete();break;default:throw new Error("[ActivePlayer] QuestTaskStatus unknown")}}})))).catch(G.RQr.createHandler("[ActivePlayer] Error when checking a player state with data from legacy and revamped tutorial"))}validateQuestState(){const k=dt.q.instance.prodigy.gameContainer.get("a25-68f4"),B=this.highestDifficultyUnlocked,U=Gt.N.getCoreZonesInOrder(B).map((k=>({zoneInfo:k,keyAsset:Vt.b.ZONE_KEYSTONES[k.zone],questManagerMapEntry:_t.n[k.zone],hasFoundKeyStone:this.hasFoundKeystone(k.zone)})));k.managerSetupPromise.then((()=>{U.forEach((({keyAsset:U,questManagerMapEntry:F,hasFoundKeyStone:j})=>{if(!G.Aq$.isDefined(U)||!G.Aq$.isDefined(F))return;const{questTag:$,questId:H}=F,V=k.questManagerMap.get($);null==V||V.getQuestStatus(H).then((k=>{j||k!==Y.t.COMPLETE||Ft.J.bagItem({type:"key",ID:U,N:1,data:{seed:0,difficultyMode:B}},dt.q.instance.prodigy.game,"unknown",void 0,{source_type:nt.C.QuestReward})})).catch(G.RQr.createHandler("[ActivePlayer] Error getting quest task status in validateQuestState"))})),U.forEach((({zoneInfo:B,questManagerMapEntry:U})=>{const{questTag:F}=U,j=k.questManagerMap.get(F);null==j||j.getTasksInProgress().then((k=>k.forEach((k=>this.validateUniqueEncounterTaskState(B.zone,k))))).catch(G.RQr.createHandler("[ActivePlayer] Error getting tasks in progress in validateQuestState"))}));const F=B===q.i.Hard?dt.q.instance.prodigy.world.getZone(rt.A_.SHIVERCHILLHARD):dt.q.instance.prodigy.world.getZone(rt.A_.SHIVERCHILL),j=F.getState("quest");12===(null==j?void 0:j.ID)&&0===j.seq?this.validateCollectItemQuest(F,74,["quest-state-1","quest-state-2","quest-state-3"]):12===(null==j?void 0:j.ID)&&1===j.seq&&this.validateCollectItemQuest(F,74,["quest-state-1","quest-state-2","quest-state-3","quest-state-4","quest-state-5"]);const $=B===q.i.Hard?dt.q.instance.prodigy.world.getZone(rt.A_.SKYWATCHHARD):dt.q.instance.prodigy.world.getZone(rt.A_.SKYWATCH),H=$.getState("quest");12===(null==H?void 0:H.ID)&&0===H.seq&&this.validateCollectItemQuest($,82,["quest-state-0","quest-state-1"]),Mt.F.validateZoneProgressionType()})).catch(G.RQr.createHandler("[ActivePlayer] Error awaiting quest manager hub in validateQuestState"))}validateUniqueEncounterTaskState(k,B){var U,F,G,j,$,H;const V=dt.q.instance.prodigy.world.getZone(k),W=null===(U=B.taskDefinition.completionRequirements.conditions)||void 0===U?void 0:U.find((k=>k.type===Q.i.UNIQUE_ENCOUNTER_RESTRICTIONS));if(!W)return;const q=null!==(j=null===(G=null===(F=V.getQuestState())||void 0===F?void 0:F.req)||void 0===G?void 0:G.N)&&void 0!==j?j:0,K=null!==(H=null===($=W.data)||void 0===$?void 0:$.ids)&&void 0!==H?H:[],z=K.filter((k=>this.state.get(k)));z.slice(0,Math.max(0,q-(K.length-z.length))).forEach((k=>{this.state.set(k,void 0)}))}validateCollectItemQuest(k,B,U){const F=this.backpack.hasItem("item",B,k.difficultyMode),G=U.reduce(((B,U)=>B+(k.getState(U)?1:0)),0),j=G-F;if(j>=0)for(let $=j;$-1)for(let k=117;k<=122;k++){const B=zt.t.getItem("item",k).data;if(G.Aq$.isDefined(B.effect)&&G.Aq$.isDefined(B.effect.transform)&&B.effect.transform===this.getPlayerData().playerTransformation.transformType&&G.Aq$.isDefined(B.effect.ID)&&B.effect.ID===this.getPlayerData().playerTransformation.transformID)return G.Aq$.isDefined(B.effect.time)?B.effect.time:0}return 0}addAssets(k){for(let B=0;B{this.forceSaveCharacter(k,!1)}));const F=this.saveEnabled;this.saveEnabled=!0,this.updated=!0,U.onPlayerSaved.addOnce((()=>{k&&k()})),U.updateCharacter(),this.saveEnabled=F}resetAccount(){G.VyI.log("Resetting account!",G.$bb.Verbose),this.data.level=bt.s.minLevel,this.data.stars=0,this.data.storedMemberStars=0,this.updated=!0,this.tutorial.setData({zones:{},menus:{}}),this.tutorial.updated=!0,this.backpack=new Xt.H;const k=$.filter(this.kennel.data,(k=>k.ID<=133&&k.ID>=125));let B;if(this.kennel.populateKennel(k),$.forEach(this.kennel.data,(k=>{this.backpack.add("follow",zt.t.getItem("pet",k.ID).data.unlockFollow)})),this.backpack.updated=!0,this.kennel.updated=!0,this.data.lastStoreVisitLevels={},this.appearance.setName(new tt.S),this.name.init(this.appearance.getName()),this.equipment.clearData(),this.encounters.setData(null),this.encounters.updated=!0,this.state.data.breadcrumbs[pt.D.FEATURE_NAME]&&(B=this.state.data.breadcrumbs[pt.D.FEATURE_NAME]),this.state.data.tutorial={},G.Aq$.isDefined(this.state.data.zone))for(const U in this.state.data.zone){const k=ce.ACCOUNT_RESET_ZONE_KEEPERS.indexOf(U)>-1;this.state.data.zone.hasOwnProperty(U)&&!k&&(this.state.data.zone[U]=void 0)}else this.state.data.zone={};this.state.data.world={},this.state.data.breadcrumbs={},B&&(this.state.data.breadcrumbs[pt.D.FEATURE_NAME]=B),this.state.data.keystones=null,this.state.updated=!0}validateLevel(){const k=bt.s.minLevel,B=bt.s.activePlayerLevelCap;if(!G.Aq$.isDefined(this.data.level)){const B=new J.i;B.setKey("prodigy_game.APIClient.InvalidLvlValidate"),B.setValue(1),this._remoteLogger.logStat(B,Z.d.Increment),G.VyI.log("Invalid level found, so setting to level 1.",G.$bb.Error),this.data.level=k,this.data.stars=bt.s.xpRequiredForLevel(k,st.V.Player)}this.currentMaxLevel=B}setChargedLevelsData(k){var B,U,F;const j=null===(B=this.data.chargedLevelData)||void 0===B?void 0:B.chargedLevel,$=null==k?void 0:k.chargedLevel;this.data.chargedLevelData=k,null!==(U=(F=this.data).unsecureChargedLevelData)&&void 0!==U||(F.unsecureChargedLevelData={});const H=new Date(this.data.chargedLevelData.decayImmunityExpiryDate),V=new Date;if(G.Aq$.isDefined(j)&&G.Aq$.isDefined($)&&j!==$){this.data.chargedLevelData.hasJustReachedConversionMilestone||(this.data.chargedLevelData.hasJustReachedConversionMilestone=ce.CHARGED_LEVELS_CONVERSION_MILESTONES.some((k=>k>j&&k<=$))||$===this.data.chargedLevelData.chargedLevelCap);dt.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendPlayerProgressionAdvancedEvent({progressionType:"Charged Level",progressionNewValue:(this.getLevel()+$).toString(),progressionPreviousValue:(this.getLevel()+j).toString(),creatureName:"Player"},{pointType:"stars",pointCount:this.getStars()+this.data.chargedLevelData.chargedLevelCumulativeXp},{decay_is_frozen:G.Aq$.isDefined(this.data.chargedLevelData.decayImmunityExpiryDate)&&H>V})}}updateChargedLevelsData(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U,F;const G=dt.q.instance.prodigy.gameContainer.get("639-22b8"),j=dt.q.instance.prodigy.breadcrumbManager;if(!j.isBreadcrumbComplete(et.B.FEATURE_CHARGED_LEVELS,et.B.BREADCRUMB_CHARGED_LEVELS_CLEARED)&&ut.J.shouldClearChargedLevels)return yield G.clearChargedLevelData(),void j.completeBreadcrumb(et.B.FEATURE_CHARGED_LEVELS,et.B.BREADCRUMB_CHARGED_LEVELS_CLEARED);const $=yield G.GetChargedLevelProgressData(),H=null!==(B=null===(k=this.data.chargedLevelData)||void 0===k?void 0:k.hasReceivedFreeChargedLevel)&&void 0!==B&&B;$.hasJustReachedConversionMilestone=null!==(F=null===(U=this.data.chargedLevelData)||void 0===U?void 0:U.hasJustReachedConversionMilestone)&&void 0!==F&&F,this.setChargedLevelsData($),this.data.chargedLevelData&&(this.data.chargedLevelData.hasJustReceivedFreeChargedLevel=!H&&$.hasReceivedFreeChargedLevel)}))}setSegmentedOfferState(k){this.data.segmentedOfferState=k,this.forceSaveCharacter()}clearSegmentedOfferState(){this.data.segmentedOfferState=void 0,this.forceSaveCharacter()}onEducationLoaded(k){this._educationData=Ct.updateEducationData(this._educationData,k)}setEducation(k,B){this._educationData.chosenGrade=k,this._educationData.grade=k,this._educationData.curriculumTreeID=B}initEducation(){dt.q.instance.prodigy.education.initialize($.cloneDeep(this._educationData)),Wt.s.get("GameConstants.Debug.EDUCATION_LOGGING_ENABLED")?dt.q.instance.prodigy.education.enableLogging():dt.q.instance.prodigy.education.disableLogging()}isPlayingAtSchool(){return"school"===this.locationSelectionType}setLocation(k){"school"===k&&dt.q.instance.prodigy.classModeController.setClassMode(),this._locationSelectionType=k}get playerContainer(){return this._playerContainer}set playerContainer(k){this._playerContainer=k}get isZoneQuestEnabled(){return this.ultimateSessionStatus===oe.n.None||this.ultimateSessionStatus===oe.n.CollectingItems}get isTrackingQuestEnabled(){return this.ultimateSessionStatus===oe.n.TrackingNPC||this.ultimateSessionStatus===oe.n.TamingUltimate}getUltimatePetId(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=dt.q.instance.prodigy.gameContainer.get("e50-b09b"),B=yield k.getQuestMetaData(this.ultimateQuestId);return null==B?void 0:B.petID}))}clearTransitionSessionStatus(){this._ultimateSessionStatus===oe.n.Transition&&this.setUltimateSessionStatus(oe.n.None)}unlockSessionStatus(){this._ultimateSessionStatusLocked=!1}setQuestSystem(k,B){var U,F;null!==(U=(F=this.data).questSystem)&&void 0!==U||(F.questSystem={}),this.data.questSystem[k]=B,this.updated=!0}getQuestSystem(k){var B,U;return null!==(B=(U=this.data).questSystem)&&void 0!==B||(U.questSystem={}),this.data.questSystem[k]}hasQuestSystemProperty(k){var B;return null===(B=this.data.questSystem)||void 0===B?void 0:B.hasOwnProperty(k)}isOnRevisedQuestline(k){var B;switch(null===(B=this.data.questSystem)||void 0===B?void 0:B[k]){case re.p.Revised:case re.p.RevisedWithPlayerGoals:return!0}return!1}getMemberTier(){return dt.q.instance.prodigy.gameContainer.get("3a0-8003").memberTier}isAtMaxMembershipTier(){const k=this.getMemberTier(),B=k===at._$.MemberPlus||k===at._$.MemberUltimateMath,U=k===at._$.MemberUltra||k===at._$.MemberUltimateBundle;return Pt.pF.eligibleForMembershipPurchaseForMultipleTiers()?U:B}setDefeatedPetsData(k){this.data.defeatedPets=k,this.updated=!0}getDefeatedPetsData(){var k,B;null!==(k=(B=this.data).defeatedPets)&&void 0!==k||(B.defeatedPets={featureFunnelId:kt.$.generateUID(),lastFunnelDate:new Date(Date.now()),funnelStepsSeen:{}});const U=dt.q.instance.prodigy.gameContainer.get("7a1-ff33").getResetTime();return this.data.defeatedPets.lastFunnelDate>=U&&this.setDefeatedPetsData(Object.assign(Object.assign({},this.data.defeatedPets),{funnelStepsSeen:{},featureFunnelId:kt.$.generateUID(),lastFunnelDate:new Date(Date.now())})),this.data.defeatedPets}sendMembershipQueryRequest(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=dt.q.instance.prodigy.gameContainer.get("8bb-7057");return ot.D.isFeatureEnabled()?k.sendRequest("\nquery upgradeOptions ($source: UpgradeOptionSource!) {\n viewer{\n id\n username\n name\n activeMemberships {\n id\n startDate\n categories\n ownerIsPartialUser\n ownerHasSSOCredentials\n plan {\n id\n amount\n currency\n name\n interval\n }\n upgradeOptions(input: { source: $source }) {\n membershipPlans {\n id\n amount\n currency\n name\n }\n package {\n id\n name\n tier\n }\n }\n currentPackage {\n name\n tier\n id\n }\n }\n isParent\n }\n}",{source:Pt.pF.getDeviceSource()}):k.sendRequest("\nquery upgradeOptions {\n viewer{\n id\n username\n name\n activeMemberships {\n id\n startDate\n categories\n ownerIsPartialUser\n ownerHasSSOCredentials\n plan {\n id\n amount\n currency\n name\n interval\n }\n upgradeOptions {\n membershipPlans {\n id\n amount\n currency\n name\n }\n package {\n id\n name\n tier\n }\n }\n currentPackage {\n name\n tier\n id\n }\n }\n isParent\n }\n}")}))}isUsernameInGameDisplayEnabled(){var k,B,U,F;const j=(0,Dt.G)(z);if(!(null==j?void 0:j.enabled))return!1;if(G.Aq$.isDefined(null===(k=this.data)||void 0===k?void 0:k.lastLoginAtHome)&&G.Aq$.isDefined(null===(B=this.data)||void 0===B?void 0:B.lastLoginAtSchool))return!1;if(G.Aq$.isDefined(j.numberSessionsToShowUsername)){return(null!==(F=null===(U=this.data)||void 0===U?void 0:U.sessionCount)&&void 0!==F?F:0)<=j.numberSessionsToShowUsername}return!0}shouldShowUsernameAbovePlayer(){return this.isUsernameInGameDisplayEnabled()}shouldShowWizardNameAbovePlayer(){return!this.isUsernameInGameDisplayEnabled()||!!(0,Dt.G)(z).showBothNames}hasMembershipUpgradeOptions(){var k,B;return((null===(B=null===(k=this.membershipUpsell)||void 0===k?void 0:k.upgradeOptions)||void 0===B?void 0:B.length)||0)>0}canPurchaseMembershipInGame(){return!this.hasMembership()||!1===this.membershipUpsell.ownerIsPartialUser&&!1===this.membershipUpsell.ownerHasSSOCredentials&&this.hasMembershipUpgradeOptions()}addExperimentToEligiblilityList(k){var B,U;null!==(B=(U=this.data).experimentEligibilityList)&&void 0!==B||(U.experimentEligibilityList=[]),G.Aq$.isDefined(k)&&!this.data.experimentEligibilityList.includes(k)&&(this.data.experimentEligibilityList.push(k),this.updated=!0)}removeExperimentFromEligibilityList(k){if(!G.Aq$.isDefined(this.data.experimentEligibilityList))return;const B=this.data.experimentEligibilityList.indexOf(k);-1!==B&&(this.data.experimentEligibilityList.splice(B,1),this.updated=!0)}doMembershipLapsedCheck(){const k=dt.q.instance.prodigy.gameContainer.get("3a0-8003").memberTier!==at._$.NonMember;!k&&this.data.wasMemberLastSession&&dt.q.instance.prodigy.game.broadcaster.broadcast(wt.H3.MembershipLapsedBetweenSessions),this.data.wasMemberLastSession=k}}ce.ACCOUNT_RESET_ZONE_KEEPERS=[rt.A_.TOWERTOWN],ce.PLAYER_BATTLE_STREAK_CAP=3,ce.CHARGED_LEVELS_CONVERSION_MILESTONES=[2,10,20],(0,F.Cg)([(0,ct.b)("61f-37d6"),(0,F.Sn)("design:type",ht.U)],ce.prototype,"_secureInventory",void 0)},51894:(k,B,U)=>{"use strict";U.d(B,{H:()=>Y});var F,G=U(62459),j=U(95359),$=U(97495);!function(k){k.Unit="unit",k.Team="team"}(F||(F={}));var H=U(35120),V=U(73797),W=U(30226),q=U(40549),K=U(77938),z=U(5898);class Y{constructor(){this.data=null,this.updated=!1,this.onKeyAddedToBackpack=new G.HN0,this.data={hat:[],boots:[],weapon:[],outfit:[],item:[],fossil:[],key:[],relic:[],currency:[],follow:[],mount:[],spellRelic:[],costume:[]}}static sortBackpackGearByStats(k){k.sort(((k,B)=>{var U,F,G,j,$,H,V,W;const q=null!==(j=null!==(G=null!==(F=null!==(U=k.hp)&&void 0!==U?U:0+k.power)&&void 0!==F?F:0+k.defence)&&void 0!==G?G:0+k.speed)&&void 0!==j?j:0,K=null!==(W=null!==(V=null!==(H=null!==($=B.hp)&&void 0!==$?$:0+B.power)&&void 0!==H?H:0+B.defence)&&void 0!==V?V:0+B.speed)&&void 0!==W?W:0;return q===K?B.ID-k.ID:K-q}))}getDataAndClear(){return this.updated=!1,this.data}unlockAllItems(){for(const k in this.data){const B=this.data[k];for(let k=0;k{switch(k){case"weapon":this.data.weapon.forEach((k=>{var B,U;const F=K.t.getItem("weapon",k.ID);k.power=null===(U=null===(B=F.data)||void 0===B?void 0:B.stats)||void 0===U?void 0:U.power}));break;case"hat":this.data.hat.forEach((k=>{var B,U;const F=K.t.getItem("hat",k.ID);k.hp=null===(U=null===(B=F.data)||void 0===B?void 0:B.stats)||void 0===U?void 0:U.hp}));break;case"outfit":this.data.outfit.forEach((k=>{var B,U;const F=K.t.getItem("outfit",k.ID);k.defence=null===(U=null===(B=F.data)||void 0===B?void 0:B.stats)||void 0===U?void 0:U.defence}));break;case"boots":this.data.boots.forEach((k=>{var B,U;const F=K.t.getItem("boots",k.ID);k.speed=null===(U=null===(B=null==F?void 0:F.data)||void 0===B?void 0:B.stats)||void 0===U?void 0:U.speed}))}}))}setItemDifficulties(){var k,B;null===(k=this.data.key)||void 0===k||k.forEach((k=>{var B;return null!==(B=k.difficulty)&&void 0!==B?B:k.difficulty=$.i.Regular})),null===(B=this.data.item)||void 0===B||B.forEach((k=>{var B,U;const F=K.t.getItem(k.type,k.ID);(null===(B=null==F?void 0:F.data)||void 0===B?void 0:B.quest)&&(null!==(U=k.difficulty)&&void 0!==U||(k.difficulty=$.i.Regular))}))}getTotalUnique(){let k=0;for(const B in this.data)k+=this.data[B].length;return k}setKeyItemData(k,B,U){if(G.Aq$.isDefined(this.data.key)){for(let F=0;Fk.ID===B))}hasItem(k,B,U=null){var F;if("gold"===k||"currency"===k&&1===B)return 0;const G=this.getItem(k,B,U);return G?null!==(F=G.N)&&void 0!==F?F:1:0}hasItems(k){let B=0;for(let U=0;U0&&B++}return B}hasItemsOfType(k){return this.getBackpackItemsByType(k).length>0}hasMaxQuantityOfItem(k,B){return"currency"!==k&&this.hasItem(k,B)>=99}addKeyItem(k,B,U){var F,j,V;G.Aq$.isDefined(this.data.key)||(this.data.key=[]);const W=this.data.key,q=null!==(V=null!==(F=null==U?void 0:U.difficultyMode)&&void 0!==F?F:null===(j=H.q.instance.prodigy.world.getCurrentZoneObject())||void 0===j?void 0:j.difficultyMode)&&void 0!==V?V:$.i.Regular;for(let G=0;G99&&"currency"!==k&&(tt.N=99),H.q.instance.game.broadcaster.broadcast(V.ib.ItemReceived,void 0,[{ID:B,type:k,N:F,balance:tt.N}]),void(this.updated=!0);const it={ID:B,type:k};J>1&&(it.N=J),U&&(it.L=1);const st=null===(Z=K.t.getItem(k,B))||void 0===Z?void 0:Z.data;st&&(Object.keys(j.IE).map((k=>j.IE[k])).forEach((k=>{var B,U;it[k]=null!==(U=null===(B=st.stats)||void 0===B?void 0:B[k])&&void 0!==U?U:0})),(null==st?void 0:st.quest)&&(it.difficulty=et)),this.data[k].push(it),H.q.instance.game.broadcaster.broadcast(V.ib.ItemReceived,void 0,[{ID:B,type:k,N:F}]),this.updated=!0}consume(k,B,U=1){let F=U;if(isNaN(F)&&(G.VyI.log(`Trying to consume item type: ${k} ID: ${B} with quantity NaN. Defaulting to 1.`,G.$bb.Error),F=1),G.Aq$.isDefined(k)){const j=this.getItem(k,B);if(G.Aq$.isDefined(j)){const $=this.data[k];if(j.ID===B)return G.Aq$.isDefined(j.N)?(j.N-=F,1===j.N?delete j.N:j.N<=0&&$.splice($.indexOf(j),1)):$.splice($.indexOf(j),1),H.q.instance.game.broadcaster.broadcast(V.ib.ItemConsumed,void 0,[{ID:B,type:k,N:U,balance:j.N}]),void(this.updated=!0)}}}getBackpackItemsByType(k,B=null){var U,F;const j=this.data[k],V=null!==(F=null!=B?B:null===(U=H.q.instance.prodigy.world.getCurrentZoneObject())||void 0===U?void 0:U.difficultyMode)&&void 0!==F?F:$.i.Regular;return G.Aq$.isDefined(j)?j.filter((B=>!(Y.invalidItems.some((U=>U.ID===B.ID&&U.type===k))||B.difficulty&&B.difficulty!==V))):[]}getItemCount(k){let B=0;for(let U=0;U{"use strict";U.d(B,{s:()=>F});const F=["boots","hat","outfit","weapon","mount","follow"]},38487:(k,B,U)=>{"use strict";U.d(B,{s:()=>$});var F=U(62459),G=U(67462),j=U(39984);class $ extends j.e{constructor(k,B){super(k),this.showHealthBar=!1,this.data.level=B.level,this.data.nickname=B.nickname,this.source=B}getAttacks(k){return this.source.attacks||[]}getMaxHearts(){return this.source.maxHP}getName(){return this.source.name}getElement(){return this.source.element}getID(){return this.source.ID}getStarReward(){return F.Aq$.isDefined(this.source.starBonus)?this.source.starBonus:super.getStarReward()}chooseAction(k,B,U,F,G,j){return!1}getBamSpells(k){const B=this.getAttacks(),U=[];for(let F=0;F0?[`default-boss-${k}`]:[]}}},37639:(k,B,U)=>{"use strict";U.d(B,{K:()=>K});var F=U(62459),G=U(5491),j=U(50503),$=U(67462),H=U(77938),V=U(27293),W=U(56463),q=U(39984);class K extends q.e{constructor(k){super(k),this.creatureType=G.V.Player,this.appearance=null,this.equipment=null,this.appearance=new V.q,this.equipment=new W.C}init(k){return!!super.init(k)&&(F.Aq$.isDefined(k.appearance)&&this.appearance.init(k.appearance),F.Aq$.isDefined(k.equipment)&&this.equipment.init(k.equipment),F.Aq$.isDefined(k.data)&&F.Aq$.isDefined(k.data.level)&&(this.data.level=k.data.level),!0)}createDataClone(){const k=super.createDataClone();return k.equipment=this.equipment,k}getBamSpells(k=this.getLevel()){const B=[],U=[],F=[this.getNativeSpell(U,$.U.Native),this.getNativeSpell(B,$.U.Native)];return this.getEquipmentSpell($.U.Weapon).ID>0&&F.push(this.getEquipmentSpell($.U.Weapon)),this.getEquipmentSpell($.U.SpellRelic).ID>0&&F.push(this.getEquipmentSpell($.U.SpellRelic)),F}getStatPower(){return 5}getStatHealth(){return 5}getHeartBonus(){return this.equipment.getHeartBonuses()}getDamageBonus(){return this.equipment.getDamageBonuses()}getMaxHearts(k=null){const B=F.Aq$.isDefined(k)?k:this.getLevel(),U=Math.min(Math.floor(j.A.getCreatureHP(this,B)*this.getHeartBonus()),q.e.MAX_HEARTS);return Math.round(U*this.modifiers.maxHearts)}getEquipmentSpell(k){const B=this.equipment.getEquipment(k);if(F.Aq$.isDefined(B)&&B>0){const U=H.t.getItem(k,B);if(F.Aq$.isDefined(U)&&F.Aq$.isDefined(U.data)&&F.Aq$.isDefined(U.data.spellID))return{ID:U.data.spellID,type:k,locked:!1}}return $.x.getLockedEquipmentBamSpell(k)}getNativeSpell(k,B){const U=this.getLevel();for(let G=k.length-1;G>0;G--){const F=k[G];if(U>=F.level)return{ID:F.spellID,locked:!1,type:B,unlockLevel:F.level}}const F=k[0];return{ID:F.spellID,locked:F.level>U,type:B,unlockLevel:F.level}}}},27293:(k,B,U)=>{"use strict";U.d(B,{q:()=>$});var F=U(62459),G=U(95891),j=U(77938);class ${constructor(){this.hairColor=null,this.hairStyle=null,this.skinColor=null,this.eyeColor=null,this.face=null}init(k){F.Aq$.isDefined(k.hair)&&F.Aq$.isDefined(k.hair.style)||(k.hair={style:this.getRandomDefaultHair(),color:1},F.Aq$.isDefined(k.hairStyle)&&(k.hair.style=k.hairStyle),F.Aq$.isDefined(k.hairColor)&&(k.hair.color=k.hairColor)),this.hairColor=G.get(k,"hair.color",1),this.hairStyle=G.get(k,"hair.style",this.getRandomDefaultHair()),this.skinColor=k.skinColor,this.eyeColor=k.eyeColor,this.face=k.face}getRandomDefaultHair(){return Math.random()<.5?1:16}getHair(){return j.t.doesExist("hair",this.hairStyle)&&j.t.doesExist("hairColor",this.hairColor)?{style:this.hairStyle,color:this.hairColor}:{style:this.getRandomDefaultHair(),color:1}}setHair(k,B){this.getHair(),F.Aq$.isDefined(k)&&j.t.doesExist("hair",k)&&k!==this.hairStyle&&(this.hairStyle=k),F.Aq$.isDefined(B)&&j.t.doesExist("hairColor",B)&&B!==this.hairColor&&(this.hairColor=B)}getFace(){return F.Aq$.isDefined(this.face)&&j.t.doesExist("face",this.face)||(this.face=$.DEFAULT_FACE),this.face}setFace(k){j.t.doesExist("face",k)&&this.face!==k&&(this.face=k)}getEyeColor(){return j.t.doesExist("eyeColor",this.eyeColor)?this.eyeColor:1}setEyeColor(k){j.t.doesExist("eyeColor",k)&&(this.eyeColor=k)}getSkinColor(){return j.t.doesExist("skinColor",this.skinColor)?this.skinColor:1}setSkinColor(k){j.t.doesExist("skinColor",k)&&(this.skinColor=k)}}$.DEFAULT_FACE=20},56463:(k,B,U)=>{"use strict";U.d(B,{C:()=>j});var F=U(62459),G=U(77938);class j{constructor(){this.follow=null,this.hat=null,this.outfit=null,this.weapon=null,this.spellRelic=null,this.boots=null,this.mount=null}init(k){this.follow=k.follow,this.hat=k.hat,this.outfit=k.outfit,this.weapon=k.weapon,this.spellRelic=k.spellRelic,this.boots=k.boots,this.mount=k.mount,this.costume=k.costume}getFollow(){return this.follow}setFollow(k){this.follow=k}getHat(){return this.hat}setHat(k){this.hat=k}getOutfit(){return this.outfit}setOutfit(k){this.outfit=k}getWeapon(){return this.weapon}setWeapon(k){this.weapon=k}getSpellRelic(){return this.spellRelic}setSpellRelic(k){this.spellRelic=k}getBoots(){return this.boots}setBoots(k){this.boots=k}setMount(k){this.mount=k}getMount(){return this.mount}setCostume(k){this.costume=k}getCostume(){return this.costume}getHeartBonuses(){return this.calculateAffixBonus("hearts")}getDamageBonuses(){return this.calculateAffixBonus("damage")}calculateAffixBonus(k){const B="hearts"===k||"damage"===k;let U=B?1:0;const j=this.getAllAffixes();for(let $=0;$0)return k}return[]}getEquipment(k){let B=0;switch(k){case"follow":B=this.follow;break;case"hat":B=this.hat;break;case"outfit":B=this.outfit;break;case"weapon":B=this.weapon;break;case"spellRelic":B=this.spellRelic;break;case"boots":B=this.boots;break;case"mount":B=this.mount;break;case"costume":B=this.costume}return F.Aq$.isDefined(B)&&B>0?B:null}getData(){return{follow:this.follow,hat:this.hat,outfit:this.outfit,weapon:this.weapon,spellRelic:this.spellRelic,boots:this.boots,mount:this.mount,costume:this.costume}}}},34574:(k,B,U)=>{"use strict";U.d(B,{T:()=>F,d:()=>j});var F,G=U(62459);!function(k){k.NotHostingTeam="NOT_HOSTING_TEAM",k.TeamFull="TEAM_FULL",k.AlreadyJoined="ALREADY_JOINED",k.Timeout="TIMEOUT"}(F||(F={}));class j{constructor(){this.hostID=null,this.streak=0,this.teamMembers=[],this.readyMembers=[],this.maxTeamSize=3,this.onTeamMemberJoined=new G.HN0,this.onTeamMemberLeft=new G.HN0,this.onTeamMemberReady=new G.HN0}get HostID(){return this.hostID}set HostID(k){this.hostID=k}get Streak(){return this.streak}set Streak(k){this.streak=k}get TeamMembers(){return this.teamMembers}set TeamMembers(k){this.teamMembers=k}get ReadyMembers(){return this.readyMembers}set ReadyMembers(k){this.readyMembers=k}get MaxTeamSize(){return this.maxTeamSize}set MaxTeamSize(k){this.maxTeamSize=k}get OnTeamMemberJoined(){return this.onTeamMemberJoined}get OnTeamMemberLeft(){return this.onTeamMemberLeft}get OnTeamMemberReady(){return this.onTeamMemberReady}addPlayer(k,B=null){return this.teamMembers.indexOf(k)>-1?(null!==B&&(B.reason=F.AlreadyJoined),!1):this.teamMembers.length>=this.maxTeamSize?(null!==B&&(B.reason=F.TeamFull),!1):(this.teamMembers.push(k),this.readyMembers.push(k),this.streak=0,this.onTeamMemberReady.dispatch(k),this.onTeamMemberJoined.dispatch(k),!0)}removePlayer(k){const B=this.teamMembers.indexOf(k);if(B>-1){this.teamMembers.splice(B,1);this.readyMembers.indexOf(k)>-1&&this.readyMembers.splice(B,1),this.streak=0,this.onTeamMemberLeft.dispatch(k)}else G.VyI.log("User was not found in team while removing",G.$bb.Warning)}readyUpPlayer(k){if(this.teamMembers.indexOf(k)>-1){-1===this.readyMembers.indexOf(k)?(this.readyMembers.push(k),this.onTeamMemberReady.dispatch(k)):G.VyI.log("User is already ready",G.$bb.Warning)}else G.VyI.log("User was not found in team to ready-up",G.$bb.Warning)}destroy(){this.hostID=null,this.readyMembers=[],this.teamMembers=[],this.onTeamMemberJoined.dispose(),this.onTeamMemberReady.dispose(),this.onTeamMemberLeft.dispose()}}},39984:(k,B,U)=>{"use strict";U.d(B,{e:()=>st});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(95359),V=U(24521),W=U(87490);var q=U(6452),K=U(5491),z=U(35120),Y=U(50503),Q=U(55122),X=U(73797),Z=U(68152),J=U(23748),tt=U(22023),et=U(23029),it=U(77938);class st{get currentMaxLevel(){var k;return null!==(k=this._currentMaxLevel)&&void 0!==k?k:Q.s.maxLevelConfig.regular}set currentMaxLevel(k){this._currentMaxLevel=Math.trunc(k)}set team(k){this.data.team=k}get team(){return this.data.team}removeTeam(){delete this.data.team}get bench(){return tt.P8.getPetBench(this.data.ID)}constructor(k){this.justLeveled=!1,this.starsEarned=0,this.data={},this.modifiers=null,this.type="B",this.creatureType=K.V.Pet,this._currentMaxLevel=Q.s.maxLevelConfig.regular,this.source=null,this.game=null,this.inPVP=!1,this.catchAttempt=0,this.starsToProcess=0,this.starsRewardBase=100,this.starsReward=100,this.pvpHP=0,this.isOpponent=!1,this.showHealthBar=!0,this.onHPChange=new G.HN0,this.aoaTier=1,this.game=k,this.resetModifiers()}init(k){return G.Aq$.isDefined(k)}createDataClone(){const k=new this.constructor(this.game);return k.setData(j.cloneDeep(this.data)),k}setData(k){this.data=k}static getHeartsFromCurve(k,B,U){const F=st.HP_BONUS[k];return 20*(Math.floor((F+20)*U/100)-Math.floor((F+20)*(B-1)/100))}static getLevelPercent(k,B,U){const F=st.levelFromStars(k,B,U);if(F>=U)return 1;const G=st.starsToLevel(F+1,B),j=st.starsToLevel(F,B);return(k-j)/(G-j)}static getAttacksFromCurve(k,B,U){const F=[];for(let j=0;j=B&&$.lvl<=U&&G.Aq$.isDefined($.a)&&F.push($.a)}return F}static getEvolutionsFromCurve(k,B,U){const F=[];let j=!1;for(let $=0;$=B&&H.lvl<=U&&G.Aq$.isDefined(V)&&F.push(H)}if(j){let k=F.length;for(;k-- >0;)G.Aq$.isDefined(F[k].e)&&F[k].e>0&&F.splice(k,1)}return F}static getAttacksOfType(k,B=null){const U=[];for(let F=0;F(G.Aq$.isDefined(U)&&(F>=B.length||U!==B[F])&&k.push({oldId:B[F],newId:U,newlyUnlocked:!G.Aq$.isDefined(B[F])}),k)),[])}getAvailableEvolutions(k=this.getLevel()){const B=st.getEvolutionsFromCurve(this.getLevelingCurve(k),1,k),U=this.getID();let F=[];B.sort(((k,B)=>k.lvl-B.lvl));let G=j.findIndex(B,(k=>k.evolveID===U));G<=-1&&(G=j.findIndex(B,(k=>k.e===U)));const $=G+1;return $>=0&&$this.getMaxHearts()&&(this.data.hp=this.getMaxHearts()),k=this.data.hp):k=this.getMaxHearts(),J.z.validateInt(k,this.getMaxHearts())}getMaxHearts(k){const B=G.Aq$.isDefined(k)?k:this.getLevel();return Math.min(Math.floor(Y.A.getCreatureHP(this,B)),st.MAX_HEARTS)}getBaseMaxHearts(k){return this.getMaxHearts(k)}updateModifier(k,B){"potion"===k?this.modifiers.potion=B:"barrier"===k?this.modifiers.barrier=B:G.Aq$.isDefined(this.modifiers[k])&&(this.modifiers[k]+=B,this.modifiers[k]<=0&&(this.modifiers[k]=.01))}registerIncomingAttack(k,B,U,F){}changeCurrentHeartsPercent(k){const B=Math.round(this.getMaxHearts()*k);this.changeCurrentHearts(B)}changeCurrentHearts(k,B=0){const U=this.getCurrentHearts();this.setCurrentHearts(U+k,B)}setCurrentHearts(k,B=0){const U=this.getCurrentHearts(),F=G.cj9.clamp(k,B,this.getMaxHearts());this.inPVP?this.pvpHP=Math.round(F):this.data.hp=Math.round(F),this.onHPChange.dispatch(this,F-U)}processStars(){this.starsToProcess>0?this.addStars(this.starsToProcess):this.game.broadcaster.broadcast(X.ig.AnimationDone,this)}addStars(k,B=!1,U=!1){if(B)return!1;if(this.isOpponent)return!1;const F=Math.round(k);let j=!1;this.starsToProcess=0;const $=this.getLevel(),H=z.q.instance.prodigy.gameContainer.get("c47-20b6"),V=it.t.getItem("pet",this.getID());if(this.game.broadcaster.broadcast(X.ig.StarsAdded,this,null),$>=this.currentMaxLevel)return G.Aq$.isDefined(V)&&H.playerProgression.sendPlayerProgressionRestrictedEvent({progressionType:"Pet Level",progressionAction:"level_capped",progressionValue:this.getLevel().toString(),creatureName:V.data.name},{pointType:"stars",pointCount:this.getStars()}),!1;if(G.Aq$.isDefined(this.data.stars)?this.data.stars+=F:this.data.stars=F,U||(this.starsEarned+=F),this.data.level=st.levelFromStars(this.data.stars,this.creatureType,this.currentMaxLevel),this.data.nextLevelProgressPercent=st.getLevelPercent(this.getStars(),this.creatureType,this.currentMaxLevel),$!==this.data.level){const k=this.data.level-$;if(k>0){const k=z.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let B;this.data===k.data&&this.data.ID===k.data.ID?B={progressionType:"Player Level",creatureName:"Player"}:G.Aq$.isDefined(V)&&(B={progressionType:"Pet Level",creatureName:V.data.name}),H.playerProgression.sendPlayerProgressionAdvancedEvent(Object.assign(Object.assign({},B),{progressionNewValue:this.getLevel().toString(),progressionPreviousValue:$.toString()}),{pointType:"stars",pointCount:this.getStars()})}this.justLeveled=!0,j=!0,this.game.broadcaster.broadcast(X.ig.LevelUp,this,[k]),this.game.broadcaster.broadcast(X.ig.AnyLevelUp,null,[k]),this.game.broadcaster.broadcast(X.ig.AnyLevelUp,X.HG.WeekendEventsLevelUp,[k])}return j}getStarsToLevel(){const k=this.getStars(),B=this.getLevel()>=this.currentMaxLevel?this.getLevel():this.getLevel()+1,U=st.starsToLevel(B,this.creatureType);return Math.max(0,U-k)}getStarsToMaxLevel(){const k=this.getStars(),B=st.starsToLevel(this.currentMaxLevel,this.creatureType);return Math.max(0,B-k)}getPercentToLevel(){if(this.getLevel()>=100)return 1;const k=st.levelFromStars(this.getStars(),this.creatureType,this.currentMaxLevel),B=st.starsToLevel(k,this.creatureType),U=st.starsToLevel(k+1,this.creatureType);return(this.getStars()-B)/(U-B)}getStars(){var k;return G.Aq$.isDefined(this.data.stars)||(this.data.stars=0),J.z.validateInt(null===(k=this.data)||void 0===k?void 0:k.stars,0)}getStarRewardByDamage(k){const B=this.getMaxHearts(this.getLevel()),U=this.getCurrentHearts();let F=0,G=k;return G>=U?(G=U,F=Math.floor(this.starsRewardBase*(G/B)),Fit.t.getItem("spell",k.ID).metadata.assets))}getAvailableSpells(k=this.getLevel()){const B=this.getBattleAssetSpecifier(),U=it.t.getItem(B.type,B.id).data.spells.filter((B=>B.level<=k)),F=j.groupBy(U,(k=>k.slot));return Object.values(F).reduce(((k,B)=>(k[B[0].slot-1]=j.maxBy(B,(k=>k.level)).id,k)),[])}getBattleAssetSpecifier(){return{type:"pet",id:this.getID()}}}st.MAX_HEARTS=5e4,st.HP_BONUS={"A+":4,A:3,"A-":2,"B+":1,B:0,"B-":-1,"C+":-2,C:-3,"C-":-4}},48208:(k,B,U)=>{"use strict";U.d(B,{V:()=>W});var F=U(62459),G=U(35120),j=U(19586),$=U(34829),H=U(90661),V=U(77938);class W{constructor(){this.data=W.getDefaultData(),this.previousData=null,this.currentDay=0,this.rewards=null,this.onDataUpdated=new F.HN0}static isNewWeek(k,B,U=1){let F=(7-B.getDay()+U)%7;0===F&&(F=7);const G=B.getTime()+864e5*F,j=new Date(G);return j.setHours(0),j.setSeconds(0),j.setMilliseconds(0),k.getTime()>=j.getTime()}static isNewDay(k,B){const U=new Date(k.getFullYear(),k.getMonth(),k.getDate()),F=new Date(B.getFullYear(),B.getMonth(),B.getDate());return U.getTime()>F.getTime()}static hasDayPassed(k,B,U=1){let F=k-U;F<0&&(F+=7);let G=B-U;return G<0&&(G+=7),Gk.original.ID===G.ID&&k.original.type===G.type&&k.replacements.length>0));if(k>=0){const B=F[k].replacements;for(let k=0;k=this.getNumRequired(this.currentDay)&&(this.setDayComplete(this.currentDay,!0),this.giveReward(this.currentDay,B,U,F))}clearPreviousData(){this.previousData=null}hasPreviousData(){return F.Aq$.isDefined(this.previousData)}giveReward(k,B,U,F=null){const G=this.getRewards(k,F);for(let j=0;j{"use strict";U.d(B,{F:()=>K});var F=U(8674),G=U(62459),j=U(79687),$=U(51151),H=U(63011),V=U(66582),W=U(37251),q=U(13956);let K=class{get data(){return this._data}get isMember(){var k,B;return!(null===(B=null===(k=this._data)||void 0===k?void 0:k.active)||void 0===B||!B)}get memberTier(){return this.hasFeatureAccess(H.D.BATTLE_PASS_PREMIUM)?this.hasFeatureAccess(H.D.ULTIMATE_MEMBERBOX)?this.hasFeatureAccess(H.D.ULTIMATE_BONUS_COINS)||this.hasFeatureAccess(H.D.ULTRA_BONUS_COINS)?V._$.MemberUltra:V._$.MemberPlus:V._$.MemberCore:V._$.NonMember}get memberStartDate(){return this._memberStartDate}get memberEndDate(){return this._memberEndDate}hasFeatureAccess(k){var B,U,F;return null!==(F=null===(U=null===(B=this._data)||void 0===B?void 0:B.features)||void 0===U?void 0:U.includes(k))&&void 0!==F&&F}updateFeatureAccess(){return(0,F.sH)(this,void 0,void 0,(function*(){try{const k=yield this._catalyst.featureAccess.update();return this._data=this.convertFeatureAccessResponseToMembership(k),this.updateMembershipDates(),this._data}catch(k){throw k}}))}refreshMembership(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._data)return null;const k=yield this._catalyst.featureAccess.update(),B=this.convertFeatureAccessResponseToMembership(k);return B&&(this._data=B,this.updateMembershipDates()),this._data}))}convertFeatureAccessResponseToMembership(k){return $.Membership.create(k.data)}updateMembershipDates(){var k;(null===(k=this._data)||void 0===k?void 0:k.active)&&(G.Aq$.isDefined(this._data.membershipStartTs)?this._memberStartDate=new Date(this._data.membershipStartTs).toISOString():this._memberStartDate=(new Date).toISOString(),G.Aq$.isDefined(this._data.membershipEndTs)?this._memberEndDate=new Date(this._data.membershipEndTs).toISOString():this._memberEndDate=null)}debugSetMembership(k=!0,B=(new Date).toISOString(),U){}};(0,F.Cg)([(0,q.b)("00d-b27e"),(0,F.Sn)("design:type",W.X)],K.prototype,"_catalyst",void 0),K=(0,F.Cg)([(0,j.injectable)()],K)},13729:(k,B,U)=>{"use strict";U.d(B,{W:()=>F,f:()=>G});const F=["hat","weapon","outfit","boots","follow","spellRelic","mount","costume"],G=["hair","eyeColor","skinColor","hairColor","face"]},73722:(k,B,U)=>{"use strict";U.d(B,{V:()=>G});var F=U(62459);class G{static get instance(){var k;return null!==(k=this._instance)&&void 0!==k?k:this._instance=new G}get selectedLocation(){return this._selectedLocation}set selectedLocation(k){this._initComplete?F.VyI.log("Selected location is already set through identity.",F.$bb.Warning):this._selectedLocation=k}constructor(){if(this._initComplete=!1,!G._instance){G._instance=this;const k=window.SW.Load.userInfo?JSON.parse(window.SW.Load.userInfo()):null;(null==k?void 0:k.premises)&&(this._selectedLocation=k.premises,this._initComplete=!0)}}isInitComplete(){return this._initComplete}}},37465:(k,B,U)=>{"use strict";U.d(B,{o:()=>dt,u:()=>ct});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(44329),V=U(24521);const W=(0,U(77601).gb)({key:"fab-no-pet-inventory-limit",default:!1});var q=U(90633),K=U(65240),z=U(76277),Y=U(35120),Q=U(72772),X=U(25834),Z=U(73797),J=U(13956),tt=U(22023),et=U(44094),it=U(69698),st=U(6413),nt=U(34829),at=U(23029),rt=U(77938),ot=U(55734),ht=U(63834);function ct(k,B){const U=[],F=new Set;G.Aq$.isDefined(k.data.team)&&0===k.data.team?k.data.team>=st.h.MAX_TEAM_SIZE&&(k.team=k.data.team=st.h.MAX_TEAM_SIZE-1):(k.team=k.data.team=0,k.kennel.updated=!0);for(const j of B)G.Aq$.isDefined(j.team)&&(U[j.team]||j.team===k.data.team||j.team>=st.h.MAX_TEAM_SIZE?(delete j.team,F.add(j)):U[j.team]=j),G.Aq$.isDefined(j.temporaryTeamPosition)&&(delete j.temporaryTeamPosition,F.add(j)),G.Aq$.isDefined(j.uniqueID)||(j.uniqueID=(0,H.Ak)(),F.add(j));return F.size>0&&(k.kennel.updated=!0),U}class dt{get data(){return this._petData}get petTeam(){return this._petTeam}constructor(k,B){this._petData=[],this._petTeam=new Array(st.h.MAX_TEAM_SIZE).fill(null),this.onPetRemoved=new G.HN0,this.updated=!1,this.player=k,this._encounterInfo=B}getDataAndClear(){return this._bridge.saveUpdatedPets(...this._petData),this.updated=!1,this._petData}populateKennel(k){this._petData=k,this._petTeam.fill(null);ct(this.player,this._petData).forEach((k=>{this._petTeam[k.team]=this.createNewPet(k)})),this._petTeam[this.player.data.team]=this.player}refreshPetTeamData(){this.refreshPetInTeamPosition(1),this.refreshPetInTeamPosition(2)}refreshPetInTeamPosition(k){const B=this.petTeam[k];null!==B&&this.setTeamPosition(B.data,k)}getPets(k=!1){return k?this._petData.filter((k=>!G.Aq$.isDefined(k.team))):this._petData}getPrimaryPets(k=!1){let B=this.getPets(k);return tt.P8.showUniquePetsFeature()&&k&&(B=B.filter((k=>!this.getPetTeamIDs().includes(k.ID)))),tt.P8.filterPrimaryPets(B)}getPrimaryPetById(k){return tt.P8.getPrimaryPet(k,this.getPets())}getPetByID(k){var B;return null!==(B=this._petData.find((B=>B.ID===k)))&&void 0!==B?B:null}getAllPetsByID(k){return this._petData.filter((B=>B.ID===k))}getPetByUniqueID(k){var B;return null!==(B=this._petData.find((B=>B.uniqueID===k)))&&void 0!==B?B:null}petCanEquipGearType(k,B){var U;const F=rt.t.getItem("pet",k);return null===(U=null==F?void 0:F.data.gearEquipSlots)||void 0===U?void 0:U.includes(B)}equipGearForPet(k,B){var U;const F=this.getPetByUniqueID(k),j=Q.I.getPetWithEquippedGearByUniqueId(B.uuid),{type:$,id:H}=B.data.asset;if(!F)return this.sendItemEquipFailedEvent(F,B,"Pet does not exist"),void G.VyI.log(`Cannot equip ${B.itemID}, pet with ID ${k} does not exist!`,G.$bb.Warning);if(!this.petCanEquipGearType(F.ID,$))return this.sendItemEquipFailedEvent(F,B,"Pet does not support this gear type"),void G.VyI.log(`Cannot equip ${B.itemID}, pet ${null==F?void 0:F.ID} does not have the gear slot ${$}`,G.$bb.Warning);let V=null;j&&(null!=V||(V=et.$.generateUID()),this.unequipGearForPet(j.uniqueID,$,V)),null!==(U=F.gear)&&void 0!==U||(F.gear={}),G.Aq$.isDefined(F.gear[$])&&(null!=V||(V=et.$.generateUID()),this.unequipGearForPet(F.uniqueID,$,V)),F.gear[$]=B.uuid,Y.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(q.B.FEATURE_PET_GEAR,q.B.BREADCRUMB_EQUIP_PET_GEAR_FTUE)||(Y.q.instance.game.broadcaster.broadcast(Z.bI.FtueCompleted),Y.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(q.B.FEATURE_PET_GEAR,q.B.BREADCRUMB_EQUIP_PET_GEAR_FTUE),Q.I.updateCachedPetGearTutorialFlag().catch((k=>G.RQr.logError(k,"Error updating cached pet gear tutorial flag")))),this.sendItemEquipEvent(F,B,V),this.updated=!0}unequipGearForPet(k,B,U){var F;const j=this.getPetByUniqueID(k);j?(null!==(F=j.gear)&&void 0!==F||(j.gear={}),G.Aq$.isDefined(j.gear[B])&&this.sendItemUnequipEvent(j,B,U),j.gear[B]=null,this.updated=!0):G.VyI.log(`Cannot unequip pet with ID ${k}, it does not exist!`,G.$bb.Warning)}sendItemEquipEvent(k,B,U){const{type:F,id:G}=B.data.asset,j=rt.t.getItem(F,G);Y.q.instance.prodigy.game.broadcaster.broadcast(Z.ig.GearUpdate,null,[k]),this._segment.item.sendItemEquippedEvent({pet_id:k.ID,item_name:j.data.name,item_type:F,item_id:G},U)}sendItemEquipFailedEvent(k,B,U){const{type:F,id:G}=B.data.asset,j=rt.t.getItem(F,G);this._segment.item.sendItemEquipFailedEvent({fail_reason:U,pet_id:k.ID,item_name:j.data.name,item_type:F,item_id:G})}sendItemUnequipEvent(k,B,U){Y.q.instance.prodigy.gameContainer.get("d69-defe").getPetGearByUniqueId(k.gear[B]).then((B=>{const{type:F,id:G}=B.data.asset,j=rt.t.getItem(F,G);Y.q.instance.prodigy.game.broadcaster.broadcast(Z.ig.GearUpdate,null,[k]),this._segment.item.sendItemUnequippedEvent({pet_id:k.ID,item_name:j.data.name,item_type:F,item_id:G},U)})).catch(G.RQr.createHandler(`Error sending item_unequipped event, gear with uuid ${k.gear[B]} not found`))}createNewPet(k){return new ht.r(this.player.game,k)}setTeamPosition(k,B,U=!0){const F=this.getTeamPosition(B);if(!this.isCreatureCurrentPlayer(F)){if(F)F.removeTeam(),F.setData(k),F.team=B;else{const U=this.createNewPet(k);U.team=B,this._petTeam[B]=U}U&&(this.updated=!0)}}getTeamPosition(k){return this._petTeam[k]}removeAtTeamPosition(k,B=!0){const U=this.getTeamPosition(k);this.isCreatureCurrentPlayer(U)||U&&(U.removeTeam(),this._petTeam[k]=null,B&&(this.updated=!0))}swapTeamPositions(k,B){if(!this.canSwapPositions(k,B))return;const U=this.getTeamPosition(k),F=this.getTeamPosition(B);U&&(U.team=B),F&&(F.team=k),this._petTeam[k]=F,this._petTeam[B]=U,this.updated=!0}setTemporaryTeamPosition(k,B){const U=this.getPetByID(k);G.Aq$.isDefined(U)&&(U.temporaryTeamPosition=B,this.updated=!0)}addPet(k,B,U,F,G){const j={ID:k,hp:null!=B?B:nt.s.MAX_SAFE_INTEGER,stars:null!=U?U:0,level:null!=F?F:1,nickname:G,levelCaught:F,catchDate:this._timeManager.getServerTimeMs(),uniqueID:(0,H.Ak)()};this.addPetFromData(j)&&this._bridge.add(j)}addPetFromData(k){if(!G.Aq$.isDefined(k.ID))return G.VyI.log("Malformed pet data.",G.$bb.Error),!1;if(!k.uniqueID||this._petData.find((B=>B.uniqueID===k.uniqueID)))return G.VyI.log("Invalid uniqueID",G.$bb.Error,k.uniqueID),!1;const B=new ot.R(this.player.game,k);this._petData.push(k),this.updated=!0;const U=this.findEmptyTeamIndex();if(-1!==U){const B=this.getAllPetsByID(k.ID);tt.P8.showUniquePetsFeature()&&B.length>1?this.replaceDuplicateOnTeam(k.ID):this.setTeamPosition(k,U)}if(this._encounterInfo.addToPetTimesRescued(k.ID),1===this._encounterInfo.getPetTimesRescued(k.ID)&&this.player.newPetRescueData.addNewRescue(k.ID,Y.q.instance.prodigy.world.getCurrentZone()),tt.P8.canPetEvolve(B,B.getLevel())){Y.q.instance.prodigy.gameContainer.get("5c7-e02d").refreshAffordableEvolutionsCache()}return!0}removePet(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this._segment.item.beginSecureItemTransaction();this.removePetData(k),k.uniqueID&&(yield this._bridge.remove(k.uniqueID)),B.flush({sink_type:K.C.PetRoster,sink_id:k.ID,transaction_id:et.$.generateUID()})}))}removePetData(k){G.Aq$.isDefined(k.team)&&this.removeAtTeamPosition(k.team),$().remove(this._petData,k),this.updated=!0,this.player.forceSaveCharacter();Y.q.instance.prodigy.gameContainer.get("5c7-e02d").refreshAffordableEvolutionsCache(),this.onPetRemoved.dispatch(k)}findEmptyTeamIndex(){return this.petTeam.findIndex((k=>!k))}findFirstFilledIndex(){return this.petTeam.findIndex((k=>k))}hasPet(k){const B=this.getPets(!1).find((B=>B.ID===k));return G.Aq$.isDefined(B)}amountOfPet(k){return this.getPets(!1).filter((B=>B.ID===k)).length}getNumPets(k=!1){return this.getPets(k).length}getNumUniquePets(){return new Set(this.getPets().map((k=>k.ID))).size}getTotalUniquePets(){return rt.t.getItemCount("pet")-this.getOwnershipRestrictedPetCount()}getMaxKennelSize(){let k;if((0,z.G)(W))k=nt.s.MAX_SAFE_INTEGER;else{const B=this.getOwnershipRestrictedPetCount();k=(rt.t.getItemCount("pet")-B)*st.h.MAX_KENNEL_SIZE_MULTIPLIER}const B=Y.q.instance.prodigy.gameContainer.get("8b9-bad1").petInventoryData.permanentSlots;return Math.max(B,k)}getOwnershipRestrictedPetCount(){var k;const B=at.R.loadData(V.r.PetOwnershipRestrictions_json);return null!==(k=null==B?void 0:B.noOwnership.length)&&void 0!==k?k:0}isFull(){return this.getNumPets(!1)>=this.getMaxKennelSize()}canSwapPositions(k,B,U=0){const F=this.getTeamPosition(k),G=this.getTeamPosition(B);return!(k===U&&null===G||B===U&&null===F)}isCreatureCurrentPlayer(k){return k===this.player}getPetTeamIDs(){return this.getPetTeam(!1).map((k=>k.getID()))}getPetTeam(k){return k?this.petTeam.filter((k=>!this.isCreatureCurrentPlayer(k))):this.petTeam.filter((k=>k&&!this.isCreatureCurrentPlayer(k)))}isPetOnTeam(k){var B,U;return null!==(U=null===(B=this.petTeam)||void 0===B?void 0:B.some((B=>(null==B?void 0:B.getID())===k)))&&void 0!==U&&U}setPlayerToFrontPosition(){this.petTeam.findIndex((k=>k===this.player))>0&&(this.petTeam.splice(this.petTeam.indexOf(this.player),1),this.petTeam.unshift(this.player))}setPetToTopPosition(){1===this.findEmptyTeamIndex()&&this.petTeam[2]&&this.swapTeamPositions(2,1)}isPrimaryPet(k){if(!k.ID)return G.VyI.log("Cannot check if pet is primary, pet ID is not defined",G.$bb.Warning),!1;const B=this.getPrimaryPetById(k.ID);return(null==B?void 0:B.uniqueID)===k.uniqueID}replaceDuplicateOnTeam(k){const B=this.getPetTeam(!1).find((B=>B.getID()===k)),U=this.getPrimaryPetById(k);if(U&&B&&U.uniqueID!==B.data.uniqueID){this.unequipGearForPet(B.data.uniqueID,"petHat"),this.unequipGearForPet(B.data.uniqueID,"petRelic");const k=B.team;this.removeAtTeamPosition(B.team),this.setTeamPosition(U,k)}}destroy(){this.onPetRemoved.dispose()}}(0,F.Cg)([(0,J.b)("a03-308f"),(0,F.Sn)("design:type",it.V)],dt.prototype,"_timeManager",void 0),(0,F.Cg)([(0,J.b)("c47-20b6"),(0,F.Sn)("design:type",Function)],dt.prototype,"_segment",void 0),(0,F.Cg)([(0,J.b)(X.T),(0,F.Sn)("design:type",X.T)],dt.prototype,"_bridge",void 0)},86051:(k,B,U)=>{"use strict";var F;U.d(B,{K:()=>G}),function(k){k[k.BAM=3]="BAM",k[k.BOOST_SELECT=4]="BOOST_SELECT",k[k.COLISEUM=8]="COLISEUM",k[k.SERVER=11]="SERVER",k[k.SERVER_SELECT=12]="SERVER_SELECT",k[k.WORLD_MAP=14]="WORLD_MAP",k[k.NICKNAMER=18]="NICKNAMER",k[k.STYLIST=21]="STYLIST",k[k.BESTIARY=23]="BESTIARY"}(F||(F={}));class G{}G.BAM={INTRO:{menu:F.BAM,ID:0}},G.BOOST_SELECT={INTRO:{menu:F.BOOST_SELECT,ID:0}},G.COLISEUM={INTRO:{menu:F.COLISEUM,ID:0}},G.SERVER={INTRO:{menu:F.SERVER,ID:0}},G.SERVER_SELECT={INTRO:{menu:F.SERVER_SELECT,ID:0}},G.WORLD_MAP={INTRO:{menu:F.WORLD_MAP,ID:0}},G.NICKNAMER={INTRO:{menu:F.NICKNAMER,ID:0}},G.STYLIST={INTRO:{menu:F.STYLIST,ID:0}},G.BESTIARY={INTRO:{menu:F.BESTIARY,ID:0}}},55734:(k,B,U)=>{"use strict";U.d(B,{R:()=>J});var F=U(8674),G=U(62459),j=U(93893),$=U(58182),H=U(35120),V=U(50503),W=U(55122),q=U(73797),K=U(76277),z=U(67462),Y=U(30226),Q=U(77938),X=U(47315),Z=U(39984);class J extends Z.e{constructor(k,B,U=null){super(k),this.nickname=null,this.setData(B),this.currentMaxLevel=null!=U?U:W.s.maxLevelConfig.regular}setData(k){if(super.setData(k),!G.Aq$.isDefined(this.data))return;this.data.ID=k.ID,G.Aq$.isDefined(this.data.ID)||"number"!=typeof k.gameID||(this.data.ID=k.gameID),this.nickname=this.data.nickname,delete this.data.R;const B=Q.t.getItem("pet",this.data.ID);this.source=B.data,G.Aq$.isDefined(B.metadata.assets.default)&&(this.source.assetType=B.metadata.assets.default.type,this.source.defaultScale=B.metadata.assets.default.defaultScale),this.type=this.source.life}getAttacks(k=null){const B=[],U=this.getBamSpells();for(let F=0;Fk.level)),F[0]+=U[k]):F=G.singleShot.map((k=>k.level));for(let j=1;j0)throw new Error("Cannot evolve a pet that has evolved before");this.data.evolutionCount=B+1,W.kennel.addPet(k)}else this.data.ID=k,this.source=Q.t.getItem("pet",this.data.ID).data,this.type=this.source.life;W.encounters.addToPetTimesRescued(k),this.game.broadcaster.broadcast(q.ig.Evolved,null,[this]),W.kennel.updated=!0,W.kennel.refreshPetTeamData()}))}getID(){return this.data.ID}getName(){return G.Aq$.isDefined(this.nickname)?this.nickname:this.source.name}getFirstName(){return this.source.name}getElement(){return this.source.element}generate(k,B){const U=Math.max(1,k-B);this.data.stars=Z.e.starsToLevel(U,this.creatureType),this.data.level=U}getLevelingCurve(k){const B=[],U=[],F=Q.t.getItem("pet",this.getID()).data.curve;for(let j=0;j{"use strict";U.d(B,{s:()=>W});var F=U(62459),G=U(35120),j=U(62901),$=U(87337),H=U(12676),V=U(39984);class W extends V.e{init(k){return!!super.init(k)&&(this.name=G.q.instance.prodigy.gameContainer.resolve(j.r),this.name.init(k.npc_name),this.npcType=k.npc_type,this.sendNpcDiscoveredEvent(k),!0)}sendNpcDiscoveredEvent(k){var B;const U=G.q.instance.prodigy.gameContainer,j=U.get(F.$Bt.LocalizationService);if(!k)return;const V=k.npc_type===$.ac.Merchant?H.N.Merchant:H.N.Noot,W=null!==(B=k.npc_id)&&void 0!==B?B:V;U.get("c47-20b6").gameWorld.sendNpcDiscoveredEvent({npc_name:k.npc_name?j.getText(k.npc_name):V,npc_type:k.npc_type,npc_id:W,x_coord:k.x_coord,y_coord:k.y_coord,npc_animation_id:k.npc_animation_id})}getBamSpells(k){return[]}getStatPower(){return 5}getStatHealth(){return 5}getNpcType(){var k;return null!==(k=this.npcType)&&void 0!==k?k:$.ac.Merchant}}},129:(k,B,U)=>{"use strict";U.d(B,{a:()=>St});var F=U(87490),G=U(62459),j=U(95359),$=U(113),H=U(10471),V=U(97495),W=U(5491),q=U(73678),K=U(35120),z=U(55122),Y=U(23748),Q=U(22023),X=U(30226),Z=U(87820),J=U(34829),tt=U(77938),et=U(21492),it=U(5898),st=U(51894),nt=U(56997),at=U(37639),rt=U(27293),ot=U(39984);class ht{constructor(k){this._data={},this.updated=!1,this._timeManager=k}getDataAndClear(){return this.updated=!1,this._data}setData(k){var B,U,F;this._data.ads=null!==(B=null==k?void 0:k.ads)&&void 0!==B?B:[],this._data.pets=null!==(U=null==k?void 0:k.pets)&&void 0!==U?U:[],this._data.offers=null!==(F=null==k?void 0:k.offers)&&void 0!==F?F:[]}hasResolvedOffer(k){return this._data.offers.includes(k)}getResolvedOffers(){var k;return null!==(k=this._data.offers)&&void 0!==k?k:[]}setOfferResolved(k,B=!0){const U=this._data.offers.indexOf(k);B&&-1===U?(this._data.offers.push(k),this.updated=!0):B||-1===U||(this._data.offers.splice(U,1),this.updated=!0)}debugClearResolvedOffers(){0}hasSeenAd(k){return this._data.ads.includes(k)}getSeenAds(){return this._data.ads}setSeenAds(k){this._data.ads=[...k],this.updated=!0}hasPetBeenEncountered(k){return this.isPetOwned(k)||G.Aq$.isDefined(this.getPetEncounterByID(k))}getPetEncounterByID(k){return this._data.pets.find((B=>B.ID===k))}createNewPetEncounter(k){this.updated=!0,this._data.pets.push({ID:k,firstSeenDate:this._timeManager.getServerTimeMs(),timesBattled:0,timesRescued:0,rescueAttempts:0})}onPetEncountered(k){!this.getPetEncounterByID(k)&&Q.P8.hasValidOrdinal(tt.t.getItem("pet",k))&&(this.createNewPetEncounter(k),this.updated=!0)}addToPetTimesBattled(k,B=1){if(B<1)return void G.VyI.log("quantityToAdd in addToPetTimesBattled can not be less than 1",G.$bb.Warning);if(!Q.P8.hasValidOrdinal(tt.t.getItem("pet",k)))return;this.updated=!0,this.onPetEncountered(k);this.getPetEncounterByID(k).timesBattled+=B}addToPetTimesRescued(k,B=1){if(B<1)return void G.VyI.log("quantityToAdd in addToPetTimesRescued can not be less than 1",G.$bb.Warning);if(!Q.P8.hasValidOrdinal(tt.t.getItem("pet",k)))return;this.updated=!0,this.onPetEncountered(k);this.getPetEncounterByID(k).timesRescued+=B,this.setPetFirstRescuedDate(k)}addToPetRescueAttempts(k,B=1){if(B<1)return void G.VyI.log("quantityToAdd in addToPetTimesRescuable can not be less than 1",G.$bb.Warning);if(!Q.P8.hasValidOrdinal(tt.t.getItem("pet",k)))return;this.updated=!0,this.onPetEncountered(k);const U=this.getPetEncounterByID(k);U.rescueAttempts||(U.rescueAttempts=0),U.rescueAttempts+=B}setPetFirstRescuedDate(k,B){if(!Q.P8.hasValidOrdinal(tt.t.getItem("pet",k)))return;this.onPetEncountered(k);const U=this.getPetEncounterByID(k);G.Aq$.isDefined(U.firstRescuedDate)||(U.firstRescuedDate=null!=B?B:this._timeManager.getServerTimeMs())}getPetTimesBattled(k){const B=this.getPetEncounterByID(k);return B?B.timesBattled:0}getPetTimesRescued(k){const B=this.getPetEncounterByID(k);return G.Aq$.isDefined(B)&&B.timesRescued>0?B.timesRescued:this.isPetOwned(k)?1:0}getPetFirstRescuedDate(k){var B;return null===(B=this.getPetEncounterByID(k))||void 0===B?void 0:B.firstRescuedDate}isPetOwned(k){return K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.amountOfPet(k)>0}getPetRescueAttempts(k){const B=this.getPetEncounterByID(k);return(null==B?void 0:B.rescueAttempts)?B.rescueAttempts:0}getAllTotalPetsRescued(){return this._data.pets.filter((k=>k.timesRescued>0)).length}}var ct=U(95891),dt=U(96282);class lt{constructor(){this.data={bg:{active:1,own:[1]},items:{},currentHouseTag:"suburbs"},this.updated=!1}getDataAndClear(){return this.updated=!1,this.data}getItems(){return this.data.items}hasItems(k){return ct.sumBy(k,(k=>"dorm"===k.type&&this.data.items[k.ID]?1:0))}setItems(k){G.Aq$.isDefined(k)&&(G.Aq$.isDefined(k.items)||(k.items=this.data.items),G.Aq$.isDefined(k.bg)||(k.bg=this.data.bg),G.Aq$.isDefined(k.currentHouseTag)||(k.currentHouseTag=this.data.currentHouseTag),this.data=k,G.Aq$.isDefined(this.data.active)||(this.add(17),this.add(3),this.add(18),this.add(18),this.add(14),this.add(1),this.add(13),this.data.active=[],this.setActive(17,480,160,1,0,0,0,0),this.setActive(3,400,160,1,0,0,0,0),this.setActive(18,440,100,1,0,0,0,0),this.setActive(18,840,100,1,0,0,0,0),this.setActive(14,880,240,1,0,0,0,0),this.setActive(1,880,140,1,0,0,0,0),this.setActive(13,640,80,1,0,0,0,0)))}add(k){let B=this.data.items[k];G.Aq$.isDefined(B)||(B=this.data.items[k]={N:0,A:[]}),B.N<9&&B.N++,this.updated=!0}getSortedActive(){const k=[];if(!G.Aq$.isDefined(this.data.active))return k;for(const B in this.data.items)for(let U=0;Uk.z-B.z)),k}snapDormItems(){var k,B;const U=dt.G.HOUSE_ITEM_GRID_SNAP_INTERVAL;null===(B=null===(k=this.data)||void 0===k?void 0:k.active)||void 0===B||B.forEach((k=>{k.x%U!=0&&(k.x=G.cj9.snapToCeil(k.x,U),this.updated=!0),k.y%U!=0&&(k.y=G.cj9.snapToFloor(k.y,U),this.updated=!0)}))}setAllInactive(){this.data.active=[],this.updated=!0}setActive(k,B,U,F,j,$,H,V){const W=this.data.items[k];if(G.Aq$.isDefined(W)&&W.N>this.getActive(k)){const G={ID:k,x:B,y:U,dx:j,dy:$,z:F,anchorY:H,r:V,stack:[]};return this.data.active.push(G),this.updated=!0,G}return null}updateActive(k,B,U,F,G,j,$,H,V){for(let W=0;W=9}getActive(k){let B=0;if(G.Aq$.isDefined(this.data.active))for(let U=0;U=0&&G.Aq$.isDefined(F[H])&&F[H]>0&&$++}return $}getDungeonState(k,B){let U=this._dungeonStates[B];if(!U){U=K.q.instance.prodigy.gameContainer.resolve(k),this._dungeonStates[B]=U;let F=this.getDungeonSchema(B);F?U.setData(F):(F=U.getInitializationData(),this.data.dungeons[B]=F,U.setData(F,!0))}return U}getDungeonSchema(k){return this.data.dungeons||(this.data.dungeons={},this._updated=!0),this.data.dungeons[k]}}class Tt{constructor(){this.data={zones:{},menus:{}},this.updated=!1}getDataAndClear(){return this.updated=!1,this.data}setData(k){G.Aq$.isDefined(k.zones)||(k.zones={}),G.Aq$.isDefined(k.menus)||(k.menus={}),this.data=k}getMenuValue(k){return this.getValue("menus",k.menu,k.ID)}setMenuValue(k,B){this.setValue("menus",k.menu,k.ID,B)}setValue(k,B,U=0,F=1){G.Aq$.isDefined(this.data[k][B])||(this.data[k][B]=[]),this.data[k][B][U]!==F&&(this.data[k][B][U]=F,this.updated=!0)}getValue(k,B,U=0){if(!G.Aq$.isDefined(this.data[k][B]))return 0;const F=this.data[k][B];return G.Aq$.isDefined(F[U])?F[U]:0}}class St extends at.K{get isFocusModeEnabled(){return this._isFocusModeEnabled}static fromCharacter(k,B){var U,F,G,j,$;const H=null===(U=B.appearance)||void 0===U?void 0:U.name,V=new St(k);V.appearance.init({name:{first:null!==(F=null==H?void 0:H.getFirstName())&&void 0!==F?F:1,middle:null!==(G=null==H?void 0:H.getMiddleName())&&void 0!==G?G:1,last:null!==(j=null==H?void 0:H.getLastName())&&void 0!==j?j:1,nick:null!==($=null==H?void 0:H.getNickname())&&void 0!==$?$:null},hair:B.appearance.getHair(),skinColor:B.appearance.getSkinColor(),eyeColor:B.appearance.getEyeColor(),face:B.appearance.getFace()}),V.equipment.setHat(B.equipment.getHat()),V.equipment.setWeapon(B.equipment.getWeapon()),V.equipment.setOutfit(B.equipment.getOutfit()),V.equipment.setBoots(B.equipment.getBoots());const W=B.equipment.getCostume();return W&&V.equipment.setCostume(W),V.backpack=new st.H,V.data=Object.assign({},B.data),V}constructor(k){super(k),this.tutorial=null,this.kennel=null,this.encounters=null,this.quests=null,this.house=null,this.backpack=null,this.achievements=null,this.state=null,this.et=!1,this.userID=0,this.appearanceChanged=!1,this.chatID=null,this.emoteID=null,this.danceID=null,this.grade=null,this.world=null,this.coOpTeam=null,this.earlyBirdLastChance=!1,this.transformID=null,this.currentVideoSkillId=null,this._isFocusModeEnabled=!1,this.appearance=new mt(K.q.instance.prodigy.gameContainer.get("1f0-d3d9")),this.equipment=new _t,this.backpack=new st.H,this.achievements=new it.l,this.encounters=new ht(K.q.instance.prodigy.gameContainer.get("a03-308f")),this.kennel=new ut.o(this,this.encounters),this.quests=new Et,this.state=new wt,this.house=new lt,this.house.setItems(this.house.data),this.tutorial=new Tt}createRandom(){this.equipment.setHat(tt.t.getRandomItem("hat").ID),this.equipment.setWeapon(tt.t.getRandomItem("weapon").ID),this.equipment.setOutfit(tt.t.getRandomItem("outfit").ID)}getRevampHealth(){const k=this.getLevel()+this.getChargedLevel(),B=tt.t.getItem("boss",32);return Q.P8.getBattleStats(B,k,null)[F.EStat.Hp]+this.getGearBattleStats().total[F.EStat.Hp]}canCatch(){return!1}getID(){return this.userID}init(k){var B;return!!super.init(k)&&(G.Aq$.isDefined(k.userID)?this.userID=k.userID:G.Aq$.isDefined(k.id)&&(this.userID=parseInt(k.id)),G.Aq$.isDefined(k.data)&&(this.data=X.J.getObject(k.data),this.currentMaxLevel=z.s.getPlayerLevelCap(this)),G.Aq$.isDefined(k.pets)&&this.kennel.populateKennel(X.J.getObject(k.pets)),G.Aq$.isDefined(k.tutorial)&&this.tutorial.setData(X.J.getObject(k.tutorial)),G.Aq$.isDefined(k.state)&&this.state.setData(X.J.getObject(k.state)),this.house.setItems(G.Aq$.isDefined(k.house)?X.J.getObject(k.house):this.house.data),G.Aq$.isDefined(k.inventory)&&this.backpack.setItems(X.J.getObject(k.inventory)),G.Aq$.isDefined(k.quests)&&this.quests.setQuests(X.J.getObject(k.quests)),G.Aq$.isDefined(k.achievements)&&this.achievements.init(X.J.getObject(k.achievements)),G.Aq$.isDefined(k.isMember)&&(this.et=1===k.isMember),(null===(B=k.appearance)||void 0===B?void 0:B.morph)&&(this.getPlayerData().playerTransformation={transformType:k.appearance.morph.type,transformID:k.appearance.morph.ID}),this.encounters.setData(k.encounters),k.isTowerTownEnabled&&(this._isFocusModeEnabled=!0),this.name=K.q.instance.prodigy.gameContainer.resolve(et.C),this.name.init(this.appearance.getName()),!0)}initFromProtobuf(k){let B=null,U=null;k.appearance&&(B={hair:{style:k.appearance.hair.styleID,color:k.appearance.hair.colorID},eyeColor:k.appearance.eyeColorID,skinColor:k.appearance.skinColorID,face:k.appearance.faceID},k.appearance.morph&&(U={transformType:""!==k.appearance.morph.type?k.appearance.morph.type:null,transformID:k.appearance.morph.ID>0?k.appearance.morph.ID:null}));let F=null;k.equipment&&(F={boots:k.equipment.bootsID>0?k.equipment.bootsID:null,hat:k.equipment.hatID>0?k.equipment.hatID:null,weapon:k.equipment.weaponID>0?k.equipment.weaponID:null,outfit:k.equipment.outfitID>0?k.equipment.outfitID:null});let G=null;k.name&&(G={first:k.name.first>0?k.name.first:null,middle:k.name.middle>0?k.name.middle:null,last:k.name.last>0?k.name.last:null,nick:k.name.nick>0?k.name.nick:null},B?B.name=G:B={name:G}),this.init({appearance:B,equipment:F,data:{level:k.level,team:k.team,playerTransformation:U},isMember:k.member,userID:k.userID})}hasMembership(){return this.et}setMembership(k){G.Aq$.isDefined(k)?this.et=1===k.isMember:this.et=!0}transformPlayer(k,B,U,F){var G,j,$;if(k===W.V.Player)this.getPlayerData().playerTransformation=null;else{const H=J.s.get("GameConstants.MorphMarbles.MORPH_DURATION_OVERRIDE");this.getPlayerData().playerTransformation={transformType:k,transformID:B,maxTime:null!==(G=null!=H?H:U)&&void 0!==G?G:0,timeRemaining:Math.max(null!==($=null!==(j=null!=H?H:F)&&void 0!==j?j:U)&&void 0!==$?$:0,0)}}}isPlayerTransformed(){return!!this.getPlayerData().playerTransformation}getAttacks(k=null){return G.Aq$.isDefined(this.getPlayerData().spellbook)?this.getPlayerData().spellbook.length<6&&(this.getPlayerData().spellbook=this.getAllAttacks().splice(0,6)):this.getPlayerData().spellbook=this.getAllAttacks().splice(0,6),G.Aq$.isDefined(k)?ot.e.getAttacksOfType(this.getPlayerData().spellbook,k):this.getPlayerData().spellbook}getAllAttacks(){const k=ot.e.getAttacksFromCurve(St.LEVEL_CURVE,1,this.getLevel());if(G.Aq$.isDefined(this.getPlayerData().spells))for(let B=0;B-1?this.backpack.hasMaxQuantityOfItem(k,B):"dorm"===k&&this.house.hasMaxQuantityOfItem(B)}hasFoundKeystone(k){let B;switch(k){case q.A_.BONFIRE:B=$.O.Bonfire;break;case q.A_.FOREST:B=$.O.Firefly;break;case q.A_.SHIPWRECK:B=$.O.Shipwreck;break;case q.A_.SHIVERCHILL:B=$.O.Shiverchill;break;case q.A_.SKYWATCH:B=$.O.Skywatch;break;case q.A_.BONFIREHARD:B=`${$.O.Bonfire}_${V.i.Hard}`;break;case q.A_.FORESTHARD:B=`${$.O.Firefly}_${V.i.Hard}`;break;case q.A_.SHIPWRECKHARD:B=`${$.O.Shipwreck}_${V.i.Hard}`;break;case q.A_.SHIVERCHILLHARD:B=`${$.O.Shiverchill}_${V.i.Hard}`;break;case q.A_.SKYWATCHHARD:B=`${$.O.Skywatch}_${V.i.Hard}`;break;case q.A_.FORESTEXPERT:case q.A_.SHIVERCHILLEXPERT:case q.A_.BONFIREEXPERT:case q.A_.SHIPWRECKEXPERT:case q.A_.SKYWATCHEXPERT:return!1}const U=Z.b.ZONE_KEYSTONES[k],F=K.q.instance.prodigy.world.getZone(k).difficultyMode;return this.backpack.hasItem("key",U,F)>0||this.state.get(`keystones-${B}`)>0}hasFoundAllKeystones(){return q.D3.every((k=>this.hasFoundKeystone(k)))}getNumKeystones(){return q.D3.reduce(((k,B)=>k+(this.hasFoundKeystone(B)?1:0)),0)}getBattleAssetSpecifier(){return{type:"boss",id:32}}getGearBattleStats(){var k,B;const U={boots:{},follow:{},hat:{},mount:{},outfit:{},weapon:{},total:{power:0,defence:0,speed:0,hp:0}};for(const F of nt.s){const G=tt.t.getItem(F,this.equipment.getEquipment(F));for(const $ of Object.values(j.IE)){const j=null===(B=null===(k=null==G?void 0:G.data)||void 0===k?void 0:k.stats)||void 0===B?void 0:B[$];j&&(U[F][$]=j,U.total[$]+=j)}}return U}getGrowthBattleStats(k){const B=tt.t.getItem("pet",k.ID),U=Q.P8.isPetOnTeam(k)?k.level+this.getChargedLevel():k.level;return Q.P8.getBattleStats(B,U,k.uniqueID)}}St.LEVEL_CURVE=[{lvl:1,a:31},{lvl:5,a:32},{lvl:12,a:33},{lvl:22,a:34},{lvl:38,a:35},{lvl:52,a:36}]},3032:(k,B,U)=>{"use strict";var F,G;U.d(B,{p:()=>F}),function(k){k.Legacy="legacy",k.Revised="revised",k.RevisedWithPlayerGoals="revised-with-player-goals",k.PlayerGoalsFtue="player-goals-ftue",k.PlayerGoalsPostFtue="player-goals-post-ftue",k.ZoneUnlockedByLevel="zone-unlocked-by-level",k.ZoneUnlockedLinearCampaign="zone-unlocked-linear-campaign"}(F||(F={})),function(k){k.LastWatchedVideoId="lastWatchedVideoId",k.LastWatchedTimestamp="lastWatchedTimestamp",k.LastWatchedSchoolVideoId="lastWatchedSchoolVideoId",k.LastWatchedSchoolTimestamp="lastWatchedSchoolTimestamp"}(G||(G={}))},63834:(k,B,U)=>{"use strict";U.d(B,{r:()=>H});var F=U(37016),G=U(35120),j=U(22023),$=U(55734);class H extends $.R{get currentMaxLevel(){var k,B,U;return this._currentMaxLevel=j.P8.getMaxOwnableLevel(null===(k=this.data)||void 0===k?void 0:k.ID,null!==(U=null===(B=this.data)||void 0===B?void 0:B.mergeRank)&&void 0!==U?U:F.qd.MIN),super.currentMaxLevel}set currentMaxLevel(k){super.currentMaxLevel=k}constructor(k,B){super(k,B)}createDataClone(){const k=super.createDataClone();return k.currentMaxLevel=this.currentMaxLevel,k}addStars(k,B,U){const F=super.addStars(k,B,U);return G.q.instance.prodigy.gameContainer.get("306-5359").kennel.updated=!0,F}}},10592:(k,B,U)=>{"use strict";var F;U.d(B,{n:()=>F}),function(k){k[k.None=0]="None",k[k.CollectingItems=1]="CollectingItems",k[k.TrackingNPC=2]="TrackingNPC",k[k.TamingUltimate=3]="TamingUltimate",k[k.Transition=4]="Transition"}(F||(F={}))},80974:(k,B,U)=>{"use strict";U.d(B,{H:()=>H});var F=U(62459),G=U(35120),j=U(30226),$=U(73722);class H{constructor(k,B,U,F){this.serverList=null!=k?k:null,this.onServerSelectedCallback=null!=B?B:null,this.onSchoolCallback=U,this.onHomeCallback=F}onServerSelected(k,B){var U;null===(U=this.onServerSelectedCallback)||void 0===U||U.call(this,k,B)}applyServerSelectMode(){"school"===$.V.instance.selectedLocation?this.onSchoolSelected():"home"===$.V.instance.selectedLocation?this.onHomeSelected():F.VyI.log("Location is not valid.",F.$bb.Warning)}onSchoolSelected(){var k,B;null===(k=this.onSchoolCallback)||void 0===k||k.call(this);const U=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;U.setLocation("school"),U.data.lastLoginAtSchool=Date.now(),U.data.sessionCount=(null!==(B=U.data.sessionCount)&&void 0!==B?B:0)+1,G.q.instance.prodigy.open.server(this.serverList,this.onServerSelected.bind(this),!0)}onHomeSelected(){var k,B;null===(k=this.onHomeCallback)||void 0===k||k.call(this);const U=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;U.setLocation("home"),j.J.isDateWithinSchoolDayAndHours()?U.data.lastLoginAtSchool=Date.now():U.data.lastLoginAtHome=Date.now(),U.data.sessionCount=(null!==(B=U.data.sessionCount)&&void 0!==B?B:0)+1,G.q.instance.prodigy.open.server(this.serverList,this.onServerSelected.bind(this),!1)}}},84938:(k,B,U)=>{"use strict";U.d(B,{_:()=>G,B:()=>W});var F,G,j=U(8674),$=U(62459);class H{constructor(k,B=0){this.priority=B,this.apply=k}}class V{constructor(k,B=[]){this.baseValue=k,this.lenses=B}addLens(k){return this.lenses.push(k),{remove:()=>{this.lenses=this.lenses.filter((B=>B!==k))}}}getValue(){return this.lenses.sort(((k,B)=>B.priority-k.priority)).reduce(((k,B)=>B.apply(k)),this.baseValue)}}!function(k){k.MusicVolume="musicVolume",k.EffectVolume="effectVolume",k.VoiceVolume="voiceVolume",k.ScreenShake="screenShake"}(G||(G={}));let W=F=class{get value(){return this._lensedValue.getValue()}constructor(k){this.onChanged=new $.HN0,this.onStoredValueChanged=new $.HN0,this._tweens=new Set,this.data=k,this._lensedValue=new V(k.defaultValue),this.dispatchValue=this.dispatchValue.bind(this)}destroy(){this.onChanged.dispose(),this.onStoredValueChanged.dispose(),this._tweens.forEach((k=>{k.stop(!0),k.destroy()})),this._tweens.clear(),this._lensedValue.lenses=[]}setStoredValue(k){this._lensedValue.baseValue=k,this.onChanged.dispatch(this.value),this.onStoredValueChanged.dispatch(k)}addLens(k){const B=this._lensedValue.addLens(k);return this.onChanged.dispatch(this.value),{remove:()=>{B.remove(),this.onChanged.dispatch(this.value)}}}addSmoothedLensMultiplier(k,B=.5,U=1,F=$.GS3.Cubic.InOut){const G={mult:1},j=new H((k=>k*G.mult));let V=this.addLens(j),W=$.W$e.instance.game.add.tween(G,this,!1).to({mult:k},1e3*B,F);W.onUpdate.add(this.dispatchValue,this),this._tweens.add(W),W.start();const q=()=>{this.onChanged.dispatch(this.value),W&&(W.destroy(),this._tweens.delete(W),W=void 0)};return W.onTweenComplete.add(q),{remove:()=>{W&&W.stop(!0),W=$.W$e.instance.game.add.tween(G,this,!1).to({mult:1},1e3*U,F),W.onUpdate.add(this.dispatchValue,this),this._tweens.add(W),W.start(),W.onTweenComplete.add((()=>{q(),null==V||V.remove(),V=void 0})),window.setTimeout((()=>{null==V||V.remove()}),1e3*U+100)}}}dispatchValue(){this.onChanged.dispatch(this.value)}};W.musicVolume=new F({name:"SETTINGS_MUSIC_VOLUME",description:"The volume of the music",defaultValue:.5,minValue:0,maxValue:1,storedKey:"bgmVolume"}),W.effectVolume=new F({name:"SETTINGS_EFFECT_VOLUME",description:"The volume of the sound effects",defaultValue:.5,minValue:0,maxValue:1,storedKey:"sfxVolume"}),W.voiceVolume=new F({name:"SETTINGS_VOICE_VOLUME",description:"The volume of the voice",defaultValue:.5,minValue:0,maxValue:1,storedKey:"voiceVolume"}),W.screenShake=new F({name:"SETTINGS_SCREEN_SHAKE",description:"The intensity of the screen shake",defaultValue:1,minValue:0,maxValue:1,storedKey:"screenShake"}),W=F=(0,j.Cg)([(0,$.V84)(),(0,j.Sn)("design:paramtypes",[Object])],W)},89360:(k,B,U)=>{"use strict";U.d(B,{h:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(71586);class H{static get instance(){var k;return null!==(k=this._instance)&&void 0!==k?k:this._instance=new H}get autoSurfaceSessionInterval(){return this._autoSurfaceSessionInterval}constructor(){this._data=null,this._updatePending=null,this._autoSurfaceSessionInterval=0,H._instance||(H._instance=this)}getData(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;if(this._data||this.updateData(!1),G.Aq$.isDefined(this._updatePending)&&(yield this._updatePending),null===(k=this._data)||void 0===k?void 0:k.weeklyChallengeData){const k={isTransition:this._data.isTransition,weeklyChallengeData:this._data.weeklyChallengeData};return this._data.isTransition=!1,k}return Promise.reject()}))}updateData(k=!0){if(G.Aq$.isDefined(this._updatePending))return;const B=j.q.instance.prodigy.gameContainer.get("7d7-b2cc");B&&(this._updatePending=new G.bnh,B.getPlayerWeeklyChallengeData(this._goalMidPointValue,this._multiplierValue,this._goalMinValue,this._goalMaxValue).then((B=>{this._data={isTransition:!0,weeklyChallengeData:B},k&&this.sendToSegment(B),this._updatePending.resolve(),this._updatePending=null})).catch((k=>{this._updatePending.reject(),this._updatePending=null,G.VyI.log(`WeeklyChallengeData update failed: ${G.RQr.stringify(k)}`,G.$bb.Warning)})))}sendToSegment(k){if(null==k?void 0:k.currentChallenge){let B=-1;k.timeRemaining>0&&(B=Math.round(2.7777777777777776e-7*k.timeRemaining));const U=Date.now(),F=`${$.R.getISOYearNumber(U)}w${$.R.getISOWeekNumber(U)}`;k.currentChallenge.progressCount{"use strict";U.d(B,{s:()=>W});var F=U(62459),G=U(35120),j=U(62901),$=U(37639),H=U(27293);class V extends H.q{init(k){super.init(k),this.name=k.name}getName(){return this.name}setName(k){this.name=k}}class W extends $.K{constructor(k){super(k),this.appearance=new V}init(k){var B;return!!super.init(k)&&(F.Aq$.isDefined(null===(B=k.data)||void 0===B?void 0:B.ID)&&(this.data.ID=k.data.ID),this.name=G.q.instance.prodigy.gameContainer.resolve(j.r),this.name.init(this.appearance.getName()),!0)}getID(){var k;return null!==(k=this.data.ID)&&void 0!==k?k:0}}},86896:(k,B,U)=>{"use strict";U.d(B,{B:()=>G});var F=U(38487);class G extends F.s{constructor(k,B){super(k,B)}}},70570:(k,B,U)=>{"use strict";U.d(B,{l:()=>tt});var F=U(8674),G=U(62459),j=U(95891),$=U(88022),H=U(56942),V=U(35120),W=U(50503),q=U(60250),K=U(18633),z=U(43531),Y=U(96216),Q=U(67462),X=U(38487),Z=U(77938);var J=U(78673);class tt extends X.s{static createTeam(k,B){const U=new tt(k,B);return[U,new J.y(k,U,q.G.left),new J.y(k,U,q.G.right)]}constructor(k,B){super(k,B),this.onBracerBreak=new G.HN0,this._aspenFrostContainer=null,this._config=null,this.aoaTier=2,this.showHealthBar=!0,this.modifiers.takenDamageMultiplier=0,this.modifiers.barrier={offset:{x:0,y:-110},scale:{x:1,y:1}},this._config=(()=>{const k=V.q.instance.prodigy.gameContainer.get("80c-6fa4"),B=Z.t.getItem("boss",19).data;return j.merge({},B,k.getValue("aspenFrostConfigOverrides"))})(),this.source.maxHP=W.A.getCreatureHP(this)}setBossContainer(k){this._aspenFrostContainer=k}getConfig(){return this._config}getStatHealth(){return this._config.battle.hpStat}getAssets(){return j.concat(super.getAssets(),"voice-36-1",$._.Npc_face_aspen_json,$._.Boss_aspen_extras_json,H.Q.Spine_npc_aspen_json,this._config.battle.yetiAttacks.map((k=>`spell-${k}`)),this._config.battle.spiderAttacks.map((k=>`spell-${k}`)))}getBamSpells(k){return this._config.battle.yetiAttacks.map((k=>({ID:k,locked:!1,type:Q.U.Native})))}chooseAction(k,B,U,F,G,j){if(this._aspenFrostContainer.bracerCount>0){G(B,F,j,this._aspenFrostContainer.bracerCount>1?94:93,W.A.rollMissChance(k,B.getSource().modifiers.miss))}else this.runYetiExitSequence(j);return!0}runYetiExitSequence(k){return(0,F.sH)(this,void 0,void 0,(function*(){let B;const U=()=>(B=new G.bnh).resolve,F=this.game.state.get("Battle"),W=(k,B)=>{Y.M.radialCloud(this.game,this._aspenFrostContainer.parent,k.x,k.y,B,$._.Boss_aspen_extras_json,"purple-cloud")};for(let k=7;k>0;--k)W({x:this._aspenFrostContainer.position.x+tt.YETI_SMOKE_OFFSET.x,y:this._aspenFrostContainer.position.y+tt.YETI_SMOKE_OFFSET.y},tt.SAND_CLOUD_RADIUS_YETI),k>1&&(yield G.Egh.timeout(200));this._aspenFrostContainer.visible=!1;const q=this.game.add.spine(0,0,H.Q.Spine_npc_aspen_json);q.x=this._aspenFrostContainer.x,q.y=this._aspenFrostContainer.y,q.setAnimationByName(0,"idle",!0),this._aspenFrostContainer.parent.addChildAt(q,0),F.rightStatusUI.moveOffScreen();const Q=new z.rD(this.game),X=Q.dataProvider;Q.addEvents([{dialogueData:X.get(983),blockInput:!0}]),Q.start(!0,U()),yield B,this.game.add.tween(q,this).to({alpha:0},1e3,void 0,!0).onTweenComplete.addOnce(U());for(const k of F.teams[1].team.filter((k=>k instanceof K.Z)))this.game.add.tween(k,this).to({alpha:0},1e3,void 0,!0);yield B,yield G.Egh.timeout(2e3);const Z=V.q.instance.prodigy.battle,J=yield Z.replaceOpponentTeam(j.merge(this._config.spiderBattle,{starOverride:F.mods.starOverride,disableHealing:F.mods.disableHealing}),!1);for(const k of J.team)k.visible=!1;yield G.Egh.timeout(1e3);const et=[{x:q.x+tt.LEFT_PILE_OFFSET.x,y:q.y+tt.LEFT_PILE_OFFSET.y},{x:q.x+tt.RIGHT_PILE_OFFSET.x,y:q.y+tt.RIGHT_PILE_OFFSET.y}];for(let k=2;k>0;--k)W(et[0],tt.SAND_CLOUD_RADIUS_SPIDER),W(et[1],tt.SAND_CLOUD_RADIUS_SPIDER),k>1&&(yield G.Egh.timeout(200));const it=J.team.map(((k,B)=>{const U={x:k.x,y:k.y};return k.position.set(et[B].x+tt.SPIDER_SPAWN_OFFSET.x,et[B].y+tt.SPIDER_SPAWN_OFFSET.y),k.parent.setChildIndex(k,0),k.visible=!0,U}));this._aspenFrostContainer.hideBracerPiles(),yield G.Egh.timeout(3e3),J.team.forEach(((k,B)=>{k.walk(),this.game.add.tween(k,this).to({x:it[B].x,y:it[B].y},1e3,void 0,!0).onTweenComplete.addOnce((()=>{k.stand(),k.flip()}))})),F.rightStatusUI.moveOnScreen(),yield G.Egh.timeout(1500),k()}))}}tt.YETI_SMOKE_OFFSET={x:0,y:-100},tt.LEFT_PILE_OFFSET={x:-98,y:0},tt.RIGHT_PILE_OFFSET={x:68,y:0},tt.SPIDER_SPAWN_OFFSET={x:0,y:50},tt.SAND_CLOUD_RADIUS_SPIDER=100,tt.SAND_CLOUD_RADIUS_YETI=500},78673:(k,B,U)=>{"use strict";U.d(B,{y:()=>$});var F=U(95891),G=U(50503),j=U(38487);class $ extends j.s{get boss(){return this._aspenFrostBoss}constructor(k,B,U){super(k,F.merge(Object.assign({},B.source),B.getConfig().tree.creature)),this._aspenFrostBoss=null,this.aoaTier=2,this._aspenFrostBoss=B,this.source.maxHP=G.A.getCreatureHP(this),this.onHPChange.add((()=>{this.getCurrentHearts()<=0&&this._aspenFrostBoss.onBracerBreak.dispatch(U)}))}chooseAction(k,B,U,F,G,j){return this._aspenFrostBoss.chooseAction(k,B,U,F,G,j)}getName(){return this._aspenFrostBoss.getName()}getStatHealth(){return this._aspenFrostBoss.getConfig().tree.hpStat}}},7914:(k,B,U)=>{"use strict";U.d(B,{b:()=>H});var F=U(62459),G=U(35120),j=U(50503),$=U(38487);class H extends $.s{chooseAction(k,B,U,$,H,V){const W=B,q=k/j.A.MAX_DIFFICULTY,K=W.source.getCurrentHearts(){"use strict";U.d(B,{t:()=>H});var F=U(62459),G=U(50503),j=U(77938),$=U(38487);class H extends $.s{chooseAction(k,B,U,$,H,V){const W=B;if(W.miniBoss)return!1;const q=k/G.A.MAX_DIFFICULTY;W.updateClouds();const K={fire:0,ice:0,water:0,plant:0,storm:0,astral:0},z=$.getCurrentSource().getCurrentBamSpells();for(let F=0;FQ&&(Y=F,Q=z[F]);if("fire"===Y)W.waterMode();else if("ice"===Y){const k=Math.random();k<.34?W.earthMode():k<.67?W.iceMode():W.waterMode()}else if("plant"===Y){const k=Math.random();k<.34?W.earthMode():k<.67?W.iceMode():W.stormMode()}else if("storm"===Y)W.iceMode();else if("water"===Y)Math.random()<.5?W.earthMode():W.stormMode();else{const k=Math.random();k<.25?W.earthMode():k<.5?W.iceMode():k<.75?W.waterMode():W.stormMode()}const X=W.attacks;if(X.length<=0)return V(),!0;const Z=G.A.getBestAttack(X,this,$.getCurrentSource(),1-q);return F.Aq$.isDefined(Z)?(H(B,$,V,Z,Math.random()<.25-.25*q),!0):(V(),!0)}}},75915:(k,B,U)=>{"use strict";U.d(B,{u:()=>J});var F=U(8674),G=U(62459),j=U(95891),$=U(88022),H=U(56942),V=U(50503),W=U(95946),q=U(52239),K=U(29949),z=U(67462),Y=U(38487),Q=U(35120),X=U(77938);var Z;!function(k){k[k.shadow=0]="shadow",k[k.element1=1]="element1",k[k.element2=2]="element2",k[k.element3=3]="element3",k[k.element4=4]="element4",k[k.stunned=5]="stunned"}(Z||(Z={}));class J extends Y.s{static createTeam(k,B){return[new J(k,B)]}constructor(k,B){super(k,B),this._bossContainer=null,this._bossContainerGameObject=null,this._config=null,this._currentElement=W.a.Shadow,this._currentEnergy=0,this._currentState=Z.shadow,this.aoaTier=2,this.showHealthBar=!0,this._config=(()=>{const k=Q.q.instance.prodigy.gameContainer.get("80c-6fa4"),B=X.t.getItem("boss",18).data;return j.merge({},B,k.getValue("crystalGolemConfigOverrides"))})(),this.source.maxHP=V.A.getCreatureHP(this),j.merge(this.modifiers,this._config.creatureModifiers)}getAssets(){return j.concat(super.getAssets(),H.Q.Default_boss_18_json,$._.Boss_aspen_extras_json,H.Q.Spine_flash_json,j.flatMap(j.values(this._config.battle.attacks)).map((k=>`spell-${k}`)))}getBamSpells(k){return j.flattenDeep(j.values(this._config.battle.attacks).map((k=>k.map((k=>({ID:k,locked:!1,type:z.U.Native}))))))}setBossContainer(k){this._bossContainer=k,this._bossContainerGameObject=new G._mx,this._bossContainerGameObject.addComponent(G.K16),this._bossContainer.add(this._bossContainerGameObject.legacyTransform.group),this._bossContainer.castDelay=this._config.battle.castDelay}setTeam(k){this._team=k,this._team.hasManagedEnergy=!0}getConfig(){return this._config}getStatHealth(){return this._config.battle.hpStat}chooseAction(k,B,U,F,G,$){var H;U.setEnergy(this._currentEnergy);let W=$,q=0;switch(this._currentState){case Z.element4:q=j.sample(this._config.battle.attacks[this._currentElement].filter((k=>!new K.I(k).isSingleShot()))),U.setEnergy(this._currentEnergy=0),W=()=>{this.stun().then((()=>{$()}))};break;case Z.stunned:return $(),!0;default:q=j.sample(this._config.battle.attacks[this._currentElement].filter((k=>new K.I(k).isSingleShot())))}return(null!==(H=this._animationPromise)&&void 0!==H?H:Promise.resolve()).then((()=>{this._animationPromise=null,G(B,F,W,q,V.A.rollMissChance(k,B.getSource().modifiers.miss))})),!0}registerIncomingAttack(k,B,U,F){if(this._currentState!==Z.stunned&&F.damage>=this.getCurrentHearts())return void this.stun();const G=new K.I(B);switch(this._currentState){case Z.shadow:if(!U){const k=G.getElement();let B=W.a.Shadow;B=j.includes(J.SWAP_ELEMENTS,k)?k:j.sample(J.SWAP_ELEMENTS),this.switchElement(B),++this._currentState}break;case Z.stunned:if(!U&&!G.isSingleShot()){G.getValue("animationType")===q.i.aoa?F.damage=Math.floor(1.25*F.damage):F.damage*=3;const k=this._bossContainer.displayDamage;this._bossContainer.displayDamage=(B,U,G)=>{this._bossContainer.showAoeDamage(F,G),this._bossContainer.displayDamage=k}}(U||F.damage{"use strict";U.d(B,{e:()=>z});var F=U(62459),G=U(95891),j=U(35120),$=U(50503),H=U(77938),V=U(47315),W=U(38487),q=U(55734),K=U(47223);class z extends W.s{get bossCharacter(){return this._bossCharacter}static createTeam(k,B){const U={ID:117,level:B.level},F=new z(k,B),G=k=>(k.actionChooser=F,k.aoaTier=2,k);return[G(new q.R(k,Object.assign({},U))),G(new q.R(k,U)),F]}constructor(k,B){super(k,B),this._bossContainer=null,this._bossContainerGameObject=null,this._config=null,this.showHealthBar=!0,this._config=(()=>{const k=j.q.instance.prodigy.gameContainer.get("80c-6fa4"),B=H.t.getItem("boss",21).data;return G.merge({},B,k.getValue("crystalThiefConfigOverrides"))})(),this._config.wizard.data=B,"string"==typeof B.nameKey&&(this._config.wizard.appearance.name=B.nameKey),this._bossCharacter=new K.s(k);const U=Object.assign({},this._config.wizard);U.data.hp=this.source.maxHP=$.A.getCreatureHP(this),this._bossCharacter.aoaTier=2,this._bossCharacter.init(U),this._bossCharacter.actionChooser=this,G.merge(this.modifiers,this._config.creatureModifiers),this._bossCharacter.modifiers=Object.assign({},this.modifiers)}setBossContainer(k){this._bossContainer=k,this._bossContainerGameObject=new F._mx,this._bossContainerGameObject.addComponent(F.K16),this._bossContainer.add(this._bossContainerGameObject.legacyTransform.group),this._bossContainer.battleShy=this._config.battle.battleShy,this._bossContainer.forceWeaponVisual=!0}getConfig(){return this._config}getStatHealth(){return this._config.battle.hpStat}getAssets(){return G.concat(super.getAssets(),this._bossCharacter.getSpellAssets())}getBamSpells(k){return this._bossCharacter.getCurrentBamSpells()}chooseAction(k,B,U,G,W,q){if(B===this._bossContainer){const j=B.source.getCurrentBamSpells(),K=[],z=[];for(let k=0;k=3&&z.length>0&&(U.changeEnergy(-3),Y=z[F.cj9.between(0,z.length-1)]),!F.Aq$.isDefined(Y))return F.VyI.log("Invalid attack, skipping turn",F.$bb.Warning),q(),!0;W(B,G,q,Y,$.A.rollMissChance(k,B.getSource().modifiers.miss))}else j.q.instance.prodigy.battle.chooseAction(k,!1,B,G.getCurrent(),U,G,W,null,q);return!0}}},66726:(k,B,U)=>{"use strict";U.d(B,{x:()=>G});var F=U(38487);class G extends F.s{}},84705:(k,B,U)=>{"use strict";U.d(B,{Y:()=>K});var F=U(62459),G=U(95891),j=U(50503),$=U(67462),H=U(56942),V=U(38487),W=U(35120),q=U(77938);class K extends V.s{static createTeam(k,B){return[new K(k,B)]}constructor(k,B){super(k,B),this._bossContainer=null,this._bossContainerGameObject=null,this._config=null,this._nextSpellIndex=0,this.aoaTier=2,this.showHealthBar=!0,this._config=(()=>{const k=W.q.instance.prodigy.gameContainer.get("80c-6fa4"),B=q.t.getItem("boss",20).data;return G.merge({},B,k.getValue("glaciasConfigOverrides"))})(),this.source.maxHP=j.A.getCreatureHP(this),G.merge(this.modifiers,this._config.creatureModifiers)}setBossContainer(k){this._bossContainer=k,this._bossContainerGameObject=new F._mx,this._bossContainerGameObject.addComponent(F.K16),this._bossContainer.add(this._bossContainerGameObject.legacyTransform.group),this._bossContainer.castDelay=this._config.battle.castDelay}getConfig(){return this._config}getStatHealth(){return this._config.battle.hpStat}getAssets(){return G.concat(super.getAssets(),H.Q.Default_boss_20_json,this._config.battle.attacks.map((k=>`spell-${k}`)))}getBamSpells(k){return this._config.battle.attacks.map((k=>({ID:k,locked:!1,type:$.U.Native})))}chooseAction(k,B,U,F,G,$){const H=this._config.battle.attacks[this._nextSpellIndex];if(++this._nextSpellIndex>=this._config.battle.attacks.length){this._nextSpellIndex=0;this.game.state.getCurrentState().teams[1].changeEnergy(-3)}return G(B,F,$,H,j.A.rollMissChance(k,B.getSource().modifiers.miss)),!0}}},8811:(k,B,U)=>{"use strict";U.d(B,{C:()=>G});var F=U(38487);class G extends F.s{}},30424:(k,B,U)=>{"use strict";U.d(B,{d:()=>j});var F=U(50503),G=U(38487);class j extends G.s{chooseAction(k,B,U,G,j,$){const H=k/F.A.MAX_DIFFICULTY,V=B.source.source.attacks;if(V.length<=0)return $(),!0;const W=F.A.getBestAttack(V,this,G.getCurrentSource(),1-H),q=.25-.25*k;return j(B,G,$,W,Math.random(){"use strict";U.d(B,{K:()=>H});var F=U(62459),G=U(50503),j=U(77938),$=U(38487);class H extends $.s{chooseAction(k,B,U,j,$,H){const V=k/G.A.MAX_DIFFICULTY,W=B.source.source.attacks,q=G.A.getBestAttack(W,B.getSource(),j.getCurrentSource(),1-V);return F.Aq$.isDefined(q)?($(B,j,H,q,Math.random()<.25-.25*k),!0):(H(),!0)}getDrops(){return super.getDrops().concat({type:"gold",N:100},j.t.getItemDrops())}}},20786:(k,B,U)=>{"use strict";U.d(B,{i:()=>nt,F:()=>at});var F=U(62459),G=U(95891),j=U(35120),$=U(51742),H=U(36648),V=U(56942),W=U(50503),q=U(74452),K=U(1434),z=U(8674),Y=U(79687);let Q=class{constructor(k,B){this._fsmID=null,this._fsmVariables={},this._sharedFSMVariables={},this._instancedFSMVariableQueue=[],this._currentInstanceVariables={onComplete:null,variables:{}},this._fsmService=null,this._fsmController=null,this._fsmController=B,this._fsmService=k,this._instancedFSMVariableQueue.push(this._currentInstanceVariables)}setID(k){return this._fsmID=k,this}setSharedVariables(k){return this._sharedFSMVariables=Object.assign({},k),this}setSharedVariableValue(k,B){return this._sharedFSMVariables[k]=B,this}setInstanceVariables(k){return this._currentInstanceVariables.variables=Object.assign({},k),this}setInstanceVariableValue(k,B){return this._currentInstanceVariables.variables[k]=B,this}getVariableValue(k){return this._fsmVariables[k]}setChainedFSM(k){return this.setOnCompleteCallback(k.execute.bind(k)),this}setOnCompleteCallback(k){return this._currentInstanceVariables.onComplete=k,this}execute(){let k=this._currentInstanceVariables;this._instancedFSMVariableQueue.length>1&&(k=this._instancedFSMVariableQueue.shift()),this._fsmVariables=Object.assign(Object.assign({},this._sharedFSMVariables),k.variables),this._fsmController.execute(this._fsmService.getStateMachine(this._fsmID),this._fsmVariables,k.onComplete)}queueVariablesInstance(){return this._currentInstanceVariables={onComplete:null,variables:{}},this._instancedFSMVariableQueue.push(this._currentInstanceVariables),this}getInstancedVariablesQueue(){return this._instancedFSMVariableQueue}};Q=(0,z.Cg)([(0,Y.injectable)(),(0,z.Qj)(0,(0,Y.inject)(F.$Bt.FSMService)),(0,z.Qj)(1,(0,Y.inject)(F.$Bt.IFSMController)),(0,z.Sn)("design:paramtypes",[F.CQn,Object])],Q);const X=(...k)=>{const B=[...k],U=[];let F=null,G=null;for(;B.length>0;){const k=B.findIndex((k=>k instanceof Q)),j=k>-1?B[k]:null;let $=null;if(j?($=k>0?Z.bind(null,[...B.splice(0,k),j.execute.bind(j)]):j.execute.bind(j),B.shift()):$=Z.bind(null,B.splice(0)),F){if(G){let k=U.find((k=>k.chainedFSM===G));k||(k={chainedFSM:G,count:0}),U.push(k);G.getInstancedVariablesQueue()[k.count].onComplete=$,++k.count}}else F=$;j&&(G=j)}return F};function Z(k){const B=k.length;for(let U=0;U({ID:k,locked:!1,type:tt.U.Native})))}}var nt;!function(k){k.Wyrm="Above Ground",k.Burying="Burying Underground",k.Underground="Underground",k.Emerging="Emerging",k.Taunting="Taunting",k.Shuffling="Rocks Shuffling",k.Stunned="Stunned",k.ReturningToMiddle="Returning To Middle",k.Roaring="Roaring"}(nt||(nt={}));class at extends et.s{get currentState(){return this._currentState}get teamPosition(){return this._currentTeamPosition}static createTeam(k,B){return[new at(k,B)]}constructor(k,B){super(k,B),this._currentState=nt.Wyrm,this._wyrmContainer=null,this._rocksContainers=[],this._config=null,this._currentTeamPosition=q.I.Middle,this._wyrmSpells=null,this._rocksSpells=null,this._chainedFSMCache={},this._previousHearts=0,this._phaseHPThreshold=0,this._previousRockCount=0,this._destroyedRockForm=!1,this._previousMissedSpellCount=0,this.aoaTier=2,this.showHealthBar=!0,this._config=(()=>{const k=j.q.instance.prodigy.gameContainer.get("80c-6fa4"),B=it.t.getItem("boss",17).data;return G.merge({},B,k.getValue("shadowWyrmConfigOverrides"))})(),this._wyrmSpells=this.buildSpellsList(this._config.battle.wyrmAttacks),this._rocksSpells=this.buildSpellsList(this._config.battle.rockAttacks),G.merge(this.modifiers,this._config.creatureModifiers);const U=j.q.instance.prodigy.gameContainer;this._chainedFSMCache[nt.Burying]=U.resolve(Q).setID(117).setSharedVariables({shadowWyrmBoss:this}),this._chainedFSMCache[nt.Stunned]=U.resolve(Q).setID(120).setSharedVariables({fsmController:U.get(F.$Bt.IFSMController),fsmService:U.get(F.$Bt.FSMService),game:this.game,shadowWyrmBoss:this}),this._chainedFSMCache[nt.Shuffling]=U.resolve(Q).setID(118).setSharedVariables({gameObjectFactory:this.game.add,positions:at.WYRM_POSITIONS}),this._chainedFSMCache[nt.Emerging]=U.resolve(Q).setID(119).setSharedVariables({shadowWyrmBoss:this,emergeAnimation:"emerge"}),this._chainedFSMCache[nt.Taunting]=U.resolve(Q).setID(122).setSharedVariables({shadowWyrmBoss:this}),this._chainedFSMCache[nt.Roaring]=U.resolve(Q).setID(123).setSharedVariables({shadowWyrmBoss:this,game:this.game}),this.source.maxHP=W.A.getCreatureHP(this)*this._config.battle.hpModifier,this._previousHearts=this.getCurrentHearts(),this._phaseHPThreshold=this.getMaxHearts()*this._config.battle.phaseHPThresholdPercentage,this._previousRockCount=this.getActiveRockCount(),this._previousMissedSpellCount=j.q.instance.prodigy.battle.battleStats.spellsFailed}changeCurrentHearts(k,B){super.changeCurrentHearts(k,B),this._currentState===nt.Underground&&(this._destroyedRockForm=!0),this._currentTeamPosition!==q.I.Middle&&this.getBossTeam().onCurrentMemberHPChange.dispatch(this,k)}setBossContainer(k){this._wyrmContainer=k,this._wyrmContainer.OnLoad.addOnce((()=>{this.setSharedVariableValueForStates("shadowWyrmSpine",this._wyrmContainer.spine,[nt.Burying,nt.Stunned,nt.Roaring,nt.Taunting,nt.Emerging])})),this.setSharedVariableValueForStates("shadowWyrmContainer",this._wyrmContainer,[nt.Emerging,nt.Stunned]);for(let B=0;B<2;++B){const k=at.WYRM_POSITIONS[B+1],U=new K.K(this.game,null,new st(this.game,this),k.x,k.y);U.flip(),U.startLoad(),this._rocksContainers.push(U),this.parentContainerToBattleLayer(U,this._rocksContainers.length)}this._chainedFSMCache[nt.Shuffling].setSharedVariableValue("rocks",[this._wyrmContainer,...this._rocksContainers])}getConfig(){return this._config}getStatHealth(){return this._config.battle.hpStat}isKnockedOut(){return this._currentState===nt.Wyrm&&super.isKnockedOut()}getAssets(){return G.concat(super.getAssets(),H.q.Cc_shadowWyrm_mound,V.Q.Default_boss_17_json,$.c.Sfx_wyrmroar,this._config.battle.rockAttacks.map((k=>`spell-${k}`)),this._config.battle.wyrmAttacks.map((k=>`spell-${k}`)))}getCurrentBamSpells(){return this._currentState===nt.Underground?this._rocksSpells:this._wyrmSpells}chooseAction(k,B,U,$,H,V){const W=this.getCurrentHearts(),K=this.getActiveRockCount(),z=this._previousHearts!==W,Y=this._previousRockCount!==K,Q=j.q.instance.prodigy.battle.battleStats.spellsFailed,Z=this._previousMissedSpellCount!==Q;if(this._previousHearts=W,this._previousRockCount=K,this._previousMissedSpellCount=Q,this._currentState===nt.Wyrm&&(this.getCurrentHearts()>this.getPhaseHPThreshold()||!z)){const k=j.q.instance.prodigy.battle,U=this.game.state.getCurrentState();k.chooseAction(this._config.battle.difficulty,!1,B,$.getCurrent(),U.teams[1],$,((k,B,U,F,G,j)=>{H(k,B,U,F,G)}),null,V)}else{if(this.getCurrentHearts()<=0){const k=[];return this._currentState===nt.Underground&&k.push(this._chainedFSMCache[nt.Emerging].queueVariablesInstance()),this._currentTeamPosition!==q.I.Middle?k.push(...this.getReturnToMiddleFSMChain()):k.push((()=>{this.setHiddenUnderground(!1),this.getBossTeam().resetOverriddenPositions(),this.setState(nt.Wyrm)})),X(...k)(),!0}switch(this._currentState){case nt.Wyrm:X(this._chainedFSMCache[nt.Burying].queueVariablesInstance(),(()=>{this.setHiddenUnderground(!0),this.getBossTeam().resetOverriddenPositions()}),this.getAttackAndShuffleFSMChain(H,B,$,V))();break;case nt.Underground:{const k=this.getActiveRockCount();if(this._destroyedRockForm)this._destroyedRockForm=!1,2===k?X((()=>{this.setHiddenUnderground(!1);const k=this.getBossTeam();this._rocksContainers.forEach((B=>{k.resetContainerOverriddenPosition(B)}))}),this._chainedFSMCache[nt.Stunned].queueVariablesInstance(),V)():X(...this.getRevealFSMChain(),this.bindAttackCallback(H,B,$,V,G.sample(this._config.battle.wyrmAttacks)))();else if(k>0)if(Y)X(this._chainedFSMCache[nt.Emerging].queueVariablesInstance(),this._chainedFSMCache[nt.Taunting].queueVariablesInstance(),this._chainedFSMCache[nt.Burying].queueVariablesInstance(),this.getAttackAndShuffleFSMChain(H,B,$,V))();else{const k=X(this._chainedFSMCache[nt.Emerging].queueVariablesInstance(),this._chainedFSMCache[nt.Burying].queueVariablesInstance(),this.getAttackAndShuffleFSMChain(H,B,$,V));Z?this.game.time.events.addTimer(1e3,k,this):k()}else X(...this.getTauntAndReturnToMiddleFSMChain(),this.bindAttackCallback(H,B,$,V,73))();break}case nt.Stunned:{const k=X(...this.getClearStunFSMChain(),this.bindAttackCallback(H,B,$,V,G.sample(this._config.battle.wyrmAttacks)));Z?this.game.time.events.addTimer(1e3,k,this):k();break}default:F.VyI.log("Shadow Wyrm is choosing action in unhandled state!!!!!",F.$bb.Error)}}return!0}getShuffleFSMChain(k){const B=this._chainedFSMCache[nt.Shuffling],U=this._config.rockShuffle[this.getActiveRockCount()+1];return[B.setInstanceVariableValue("shuffleCount",k).setInstanceVariableValue("startRockTimeElapsed",U.timeElapsed.start).setInstanceVariableValue("endRockTimeElapsed",U.timeElapsed.end).setInstanceVariableValue("startRockDelay",U.delay.start).setInstanceVariableValue("endRockDelay",U.delay.end).queueVariablesInstance(),()=>{const k=B.getVariableValue("updatedRockPositions"),U=Object.keys(k).find((B=>k[B]===this._currentTeamPosition));this.setWyrmLocation(parseInt(U,10));const G=this.getBossTeam(),j=this._rocksContainers.length;for(let B=0;BF.cj9.fuzzyEqual(B.x,k.x)&&F.cj9.fuzzyEqual(B.y,k.y)));G.overrideTeamPositionForContainer(k,U),this.parentContainerToBattleLayer(k,U)}}]}getAttackAndShuffleFSMChain(k,B,U,F){return this.bindAttackCallback(k,B,U,(()=>{if(this.game.state.getCurrentState().teams[0].isDefeated())F();else{const k=this._config.rockShuffle[this.getActiveRockCount()+1].shuffleCount;X(...this.getShuffleFSMChain(J.o.integerInRange(k.min,k.max)),F)()}}),G.sample(this._config.battle.rockAttacks))}getRevealFSMChain(){const k=[this._chainedFSMCache[nt.Emerging].queueVariablesInstance()];return this._currentTeamPosition!==q.I.Middle&&(k.push(this._chainedFSMCache[nt.Roaring].queueVariablesInstance()),k.push(...this.getReturnToMiddleFSMChain())),k.push((()=>{this.setHiddenUnderground(!1),this.getBossTeam().resetOverriddenPositions()})),k}getTauntAndReturnToMiddleFSMChain(){const k=[this._chainedFSMCache[nt.Emerging].queueVariablesInstance(),this._chainedFSMCache[nt.Taunting].queueVariablesInstance()];return this._currentTeamPosition!==q.I.Middle?k.push(...this.getReturnToMiddleFSMChain()):k.push((()=>{this.setHiddenUnderground(!1),this.getBossTeam().resetOverriddenPositions()})),k}getClearStunFSMChain(){return this._currentTeamPosition!==q.I.Middle?[this._chainedFSMCache[nt.Roaring].queueVariablesInstance(),...this.getReturnToMiddleFSMChain()]:[()=>{this._wyrmContainer.idle(),this.getBossTeam().resetOverriddenPositions(),this.setState(nt.Wyrm)}]}getReturnToMiddleFSMChain(){return[this._chainedFSMCache[nt.Burying].queueVariablesInstance(),()=>{this.swapWyrmToMiddle(),this.setHiddenUnderground(!1),this.getBossTeam().resetOverriddenPositions()},this._chainedFSMCache[nt.Emerging].queueVariablesInstance()]}swapWyrmToMiddle(){const k=at.WYRM_POSITIONS[q.I.Middle],B=this._rocksContainers.find((B=>F.cj9.fuzzyEqual(B.x,k.x)&&F.cj9.fuzzyEqual(B.y,k.y))),U=this._currentTeamPosition;this.setContainerLocation(B,this._currentTeamPosition),this.setWyrmLocation(q.I.Middle),B.position.copyFrom(at.WYRM_POSITIONS[U]),this._wyrmContainer.position.copyFrom(k)}getActiveRockCount(){return this._currentState===nt.Wyrm?this._rocksContainers.length:this._rocksContainers.filter((k=>k.source.getCurrentHearts()>0)).length}setState(k){this._currentState=k,this._currentState===nt.Underground?this.modifiers.takenDamageMultiplier=this._config.battle.undergroundDamageMultiplier:this.modifiers.takenDamageMultiplier=1}setWyrmLocation(k){this._currentTeamPosition=k,this.setContainerLocation(this._wyrmContainer,k)}setContainerLocation(k,B){this.getBossTeam().overrideTeamPositionForContainer(k,B),this.parentContainerToBattleLayer(k,B)}buildSpellsList(k){return k.map((k=>({ID:k,locked:!1,type:tt.U.Native})))}setSharedVariableValueForStates(k,B,U){const F=U.length;for(let G=0;G{B.setTargetable(k),B.source.data.hp=k?1:0,B.ran=!1}));const B=this.getBossTeam();B.team=k?[this._wyrmContainer,...this._rocksContainers]:[this._wyrmContainer]}getPhaseHPThreshold(){return this._phaseHPThreshold}bindAttackCallback(k,B,U,F,G){return k.bind(null,this._wyrmContainer,U,F,G,W.A.rollMissChance(this._config.battle.difficulty),{dmgMod:this._config.battle.damageModifier})}}at.WYRM_POSITIONS=[new F.I9Y(935,500),new F.I9Y(1065,390),new F.I9Y(1065,610)]},10655:(k,B,U)=>{"use strict";U.d(B,{A:()=>G});var F=U(38487);class G extends F.s{constructor(k,B){super(k,B),this.showHealthBar=!0}}},83668:(k,B,U)=>{"use strict";U.d(B,{o:()=>$});var F,G=U(62459),j=U(50751);!function(k){k[k.Seen=0]="Seen",k[k.Defeated=1]="Defeated",k[k.StatusCount=2]="StatusCount"}(F||(F={}));class $ extends j.I{setBossSeen(k,B=!0){const U=this.getPersistentBossesStatus(),j=this.getBitIndexForBossStatus(k,F.Seen);this.setPersistentBossesStatus(B?G.OQO.setBit(U,j):G.OQO.clearBit(U,j))}isBossSeen(k){return G.OQO.isBitSet(this.getPersistentBossesStatus(),this.getBitIndexForBossStatus(k,F.Seen))}setBossDefeated(k,B=!0){this.setBossDefeatedAllTime(k,B),this.setBossDefeatedCurrentRun(k,B)}setBossDefeatedAllTime(k,B=!0){const U=this.getPersistentBossesStatus(),j=this.getBitIndexForBossStatus(k,F.Defeated);this.setPersistentBossesStatus(B?G.OQO.setBit(U,j):G.OQO.clearBit(U,j))}setBossDefeatedCurrentRun(k,B=!0){const U=this.getRunBossesStatus();this.setRunBossesStatus(B?G.OQO.setBit(U,k):G.OQO.clearBit(U,k))}isBossDefeatedAllTime(k){return G.OQO.isBitSet(this.getPersistentBossesStatus(),this.getBitIndexForBossStatus(k,F.Defeated))}isBossDefeatedCurrentRun(k){return G.OQO.isBitSet(this.getRunBossesStatus(),k)}isMakaluSeen(){return this.isBossSeen(1)}setMakaluSeen(){this.setBossSeen(1)}isGrumpyYetiSeen(){return this.isBossSeen(0)}setGrumpyYetiSeen(){this.setBossSeen(0)}isCrystalGolemSeen(){return this.isBossSeen(2)}setCrystalGolemSeen(){this.setBossSeen(2)}isGlaciasSeen(){return this.isBossSeen(3)}setGlaciasSeen(){this.setBossSeen(3)}isWinstonVonLootSeen(){return this.isBossSeen(4)}setWinstonVonLootSeen(){this.setBossSeen(4)}isMakaluDefeatedAllTime(){return this.isBossDefeatedAllTime(1)}isMakaluDefeatedCurrentRun(){return this.isBossDefeatedCurrentRun(1)}setMakaluDefeated(){this.setBossDefeated(1)}isGrumpyYetiDefeatedAllTime(){return this.isBossDefeatedAllTime(0)}isGrumpyYetiDefeatedCurrentRun(){return this.isBossDefeatedCurrentRun(0)}setGrumpyYetiDefeated(){this.setBossDefeated(0)}isCrystalGolemDefeatedAllTime(){return this.isBossDefeatedAllTime(2)}isCrystalGolemDefeatedCurrentRun(){return this.isBossDefeatedCurrentRun(2)}setCrystalGolemDefeated(){this.setBossDefeated(2)}isGlaciasDefeatedAllTime(){return this.isBossDefeatedAllTime(3)}isGlaciasDefeatedCurrentRun(){return this.isBossDefeatedCurrentRun(3)}setGlaciasDefeated(){this.setBossDefeated(3)}isWinstonVonLootDefeatedAllTime(){return this.isBossDefeatedAllTime(4)}isWinstonVonLootDefeatedCurrentRun(){return this.isBossDefeatedCurrentRun(4)}setWinstonVonLootDefeated(){this.setBossDefeated(4)}getBitIndexForBossStatus(k,B){return k*F.StatusCount+B}}},50751:(k,B,U)=>{"use strict";U.d(B,{I:()=>V});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U(10044);let V=class{get updated(){return this._updated}constructor(k){this._updated=!1,this._data=null,this._currentPlayer=null,this._currentPlayer=k}getInitializationData(){return{persistentData:{bossesStatus:0}}}getDataAndClear(){return this._updated=!1,this._data}setData(k,B=!1){k&&(this._data=k,this._updated=this._updated||B)}getCurrentMap(){var k;return null!==(k=this.getRunSchema().currentMap)&&void 0!==k?k:null}setCurrentMap(k){this.getRunSchema().currentMap=k,this._updated=!0}getLevel(){var k;return null!==(k=this.getRunSchema().level)&&void 0!==k?k:1}isRunStarted(){return!($.isEmpty(this.getRunSchema())&&$.isEmpty(this.getPhaseSchema()))}setCheckpoint(k,B,U){this.getPhaseSchema().checkpoint={index:k,location:{x:B.x,y:B.y},facingDirection:U},this._updated=!0}getCheckpointIndex(){var k,B;return null!==(B=null===(k=this.getPhaseSchema().checkpoint)||void 0===k?void 0:k.index)&&void 0!==B?B:-1}getCheckpointLocation(){var k,B;return null!==(B=null===(k=this.getPhaseSchema().checkpoint)||void 0===k?void 0:k.location)&&void 0!==B?B:null}getFacingDirection(){var k,B;return null!==(B=null===(k=this.getPhaseSchema().checkpoint)||void 0===k?void 0:k.facingDirection)&&void 0!==B?B:H.y.Left}getCompletedRuns(){var k;return null!==(k=this.getPersistentSchema().completedRuns)&&void 0!==k?k:0}setCompletedRuns(k){this.getPersistentSchema().completedRuns=k,this._updated=!0}setPersistentBossesStatus(k){this.getPersistentSchema().bossesStatus=k,this._updated=!0}getPersistentBossesStatus(){var k;return null!==(k=this.getPersistentSchema().bossesStatus)&&void 0!==k?k:0}setRunBossesStatus(k){this.getRunSchema().bossesStatus=k,this._updated=!0}getRunBossesStatus(){var k;return null!==(k=this.getRunSchema().bossesStatus)&&void 0!==k?k:0}getSeed(){var k;return null!==(k=this.getRunSchema().seed)&&void 0!==k?k:0}setMapObjectCompleted(k,B){const U=this.getMapObjectsID(k),F=this.getPhaseSchema();let j=F.mapObjectStatus;j||(j={},F.mapObjectStatus=j),j[U.objectsIndex]=B?G.OQO.setBit(j[U.objectsIndex],U.bit):G.OQO.clearBit(j[U.objectsIndex],U.bit),this._updated=!0}isMapObjectCompleted(k){const B=this.getPhaseSchema().mapObjectStatus;if(B){const U=this.getMapObjectsID(k),F=B[U.objectsIndex];return!!G.Aq$.isDefined(F)&&G.OQO.isBitSet(F,U.bit)}return!1}setConditionActive(k,B){const U=this.getPhaseSchema();U.conditionStatus||(U.conditionStatus={}),U.conditionStatus[k]=B}isConditionActive(k){const B=this.getPhaseSchema();return!!B.conditionStatus&&B.conditionStatus[k]}getActiveConditions(){const k=this.getPhaseSchema();return k.conditionStatus?Object.keys(k.conditionStatus).filter((B=>k.conditionStatus[B])):[]}startDungeonRun(){const k=this.getRunSchema();k.bossesStatus=0,k.currentMap=null,k.level=this._currentPlayer.getLevel(),k.seed=Date.now(),this.resetPhaseData()}resetPhaseData(){this._data?(this._data.phaseData={},this._updated=!0):G.VyI.log("Dungeon was reset without having data initialized",G.$bb.Warning)}resetRunData(){this._data?(this._data.runData={},this.resetPhaseData(),this._updated=!0):G.VyI.log("Dungeon was reset without having data initialized",G.$bb.Warning)}resetAllData(){this._data?(this._data.persistentData={},this.resetPhaseData(),this.resetRunData(),this._updated=!0):G.VyI.log("Dungeon was reset without having data initialized",G.$bb.Warning)}isValid(){const k=this.getRunSchema();return G.Aq$.isDefined(k.seed)&&G.Aq$.isDefined(k.currentMap)}getMapObjectsID(k){const B=Math.floor(k/32);return{objectsIndex:B,bit:k-32*B}}getPersistentSchema(){return this._data.persistentData||(this._data.persistentData={}),this._data.persistentData}getRunSchema(){return this._data.runData||(this._data.runData={}),this._data.runData}getPhaseSchema(){return this._data.phaseData||(this._data.phaseData={}),this._data.phaseData}};V=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("e20-0fb0")),(0,F.Sn)("design:paramtypes",[Object])],V)},21492:(k,B,U)=>{"use strict";U.d(B,{C:()=>K});var F,G=U(8674),j=U(62459),$=U(79687),H=U(95891),V=U(55110),W=U(87392),q=U(77938);let K=F=class{constructor(k){this.data=null,this.localizer=null,this.localizer=k}init(k){this.data=k}initFromProtobuf(k){this.data=new V.S,this.data.setFirstName(k.first>0?k.first:null),this.data.setMiddleName(k.middle>0?k.middle:null),this.data.setLastName(k.last>0?k.last:null),this.data.setNickname(k.nick>0?k.nick:null)}getName(){return this.validateNameData(),null===this.data.getNickname()?this.getFullName():q.t.getItem("nickname",this.data.getNickname()).data.value.replace("{first}",q.t.getItem("name",this.data.getFirstName()).data.value).replace("{middle}",q.t.getItem("name",this.data.getMiddleName()).data.value).replace("{last}",q.t.getItem("name",this.data.getLastName()).data.value)}getNameWithoutNickname(){return this.validateNameData(),this.getFullName()}getFirstName(){this.validateNameData();const k=this.data.getFirstName();return k>0?q.t.getItem("name",k).data.value:this.getFallbackName()}generateRandomName(){this.data=new V.S,this.data.setFirstName(F.getRandomFirstName()),this.data.setMiddleName(F.getRandomMiddleName()),this.data.setLastName(F.getRandomLastName())}getFullName(){if(j.Aq$.isDefined(this.data.getFirstName())){const k=q.t.getItem("name",this.data.getFirstName()).data.value;if(j.Aq$.isDefined(this.data.getMiddleName())&&j.Aq$.isDefined(null===this.data.getLastName())){const B=`${q.t.getItem("name",this.data.getMiddleName()).data.value}${q.t.getItem("name",this.data.getLastName()).data.value}`;return`${k} ${H.capitalize(B)}`}return k}return this.getFallbackName()}validateNameData(){if(this.data&&this.data.isValid()){j.Aq$.isDefined(this.data.getFirstName())&&0===q.t.getItemsWithFilter("name",(k=>0===k.data.type&&k.ID===this.data.getFirstName())).length&&this.data.setFirstName(F.getRandomFirstName());const k=this.data.getMiddleName(),B=this.data.getLastName(),U=this.data.getNickname();j.Aq$.isDefined(k)&&j.Aq$.isDefined(B)?(0===q.t.getItemsWithFilter("name",(k=>0===k.data.type&&k.ID===this.data.getFirstName())).length&&this.data.setFirstName(F.getRandomFirstName()),0===q.t.getItemsWithFilter("name",(B=>1===B.data.type&&B.ID===k)).length&&this.data.setMiddleName(F.getRandomMiddleName()),0===q.t.getItemsWithFilter("name",(k=>2===k.data.type&&k.ID===B)).length&&this.data.setLastName(F.getRandomLastName()),j.Aq$.isDefined(U)&&0===q.t.getItemsWithFilter("nickname",(k=>k.ID===U)).length&&this.data.setNickname(null)):(this.data.setMiddleName(null),this.data.setLastName(null),this.data.setNickname(null))}else this.generateRandomName()}static getRandomFirstName(){return H.sample(W.f.getFilteredFirstNames()).ID}static getRandomMiddleName(){return H.sample(W.f.getFilteredMiddleNames()).ID}static getRandomLastName(){return H.sample(W.f.getFilteredLastNames()).ID}getData(){return this.data}getFallbackName(){var k;return null!==(k=this._fallbackName)&&void 0!==k?k:this.localizer.getText("FALLBACK_NAME_WIZARD")}setFallbackName(k){this._fallbackName=k}};K=F=(0,G.Cg)([(0,$.injectable)(),(0,G.Qj)(0,(0,$.inject)(j.$Bt.LocalizationService)),(0,G.Sn)("design:paramtypes",[j.dTp])],K)},62901:(k,B,U)=>{"use strict";U.d(B,{r:()=>$});var F=U(8674),G=U(62459),j=U(79687);let $=class{constructor(k){this.first=null,this.last=null,this.nick=null,this.localizer=null,this.localizer=k}init(k,B=null,U=null){this.first=k,this.last=B,this.nick=U}getName(){return G.Aq$.isDefined(this.nick)?this.localizer.getText(this.nick).replace("{first}",this.localizer.getText(this.first)).replace("{last}",this.localizer.getText(this.last)):G.Aq$.isDefined(this.last)?this.getNameWithoutNickname():this.getFirstName()}getNameWithoutNickname(){return`${this.localizer.getText(this.first)} ${this.localizer.getText(this.last)}`}getFirstName(){return G.Aq$.isDefined(this.first)?this.localizer.getText(this.first):""}generateRandomName(){}};$=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)(G.$Bt.LocalizationService)),(0,F.Sn)("design:paramtypes",[G.dTp])],$)},30705:(k,B,U)=>{"use strict";U.d(B,{b:()=>F});class F{static debugGUI(k,B,U,F){}static removeDebugGUI(k){}static setPropertyValue(k,B,U){}}},45373:(k,B,U)=>{"use strict";U(8674),U(79600),U(62459),U(35120),U(34829),U(23748),U(20404),U(44094)},54950:(k,B,U)=>{"use strict";U.d(B,{S:()=>at});var F=U(8674),G=U(62459),j=U(79687),$=U(99625),H=U(5491),V=U(35120),W=U(38443),q=U(77938),K=U(85697),z=U(55800),Y=U(80573),Q=U(52156),X=U(62430),Z=U(9831),J=U(68152),tt=U(80060),et=U(37773),it=U(97317),st=U(65732),nt=U(88022);let at=class{constructor(k){this._prefabLoader=null,this._prefabLoader=k}loadFollowPrefab(k,B,U=null){var F,j;(0,J.v)(B>0,`Invalid follow ID was provided: ${B}`);let H=null;if("legacy"===k)H=this._prefabLoader.loadFromGUID($.l.RealLegacyFollow,U),H.findComponentInChildren(z.a).setFollowID(B);else if("pet"===k){const G=q.t.getItem("pet",B);(0,J.v)(!!G,`Pet with ID '${B}' could not be found`);const j=null!==(F=G.metadata.assets.default)&&void 0!==F?F:G.metadata.assets.reduced;(0,J.v)(!!j,`Pet with ID '${B}' has no default asset defined`),j.type===Z.V.spriteSheet?(H=this._prefabLoader.loadFromGUID($.l.SpritesheetPetFollow,U),H.findComponentInChildren(Q.X).setAsset(B)):(H=this._prefabLoader.loadFromGUID($.l.SpinePetFollow,U),H.findComponentInChildren(X.N).setAssetID(B));const W=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player,K="pet"===k&&!W.kennel.isPetOnTeam(B);tt.d.updateInjectedValues(H,{[st.E.ChargedCreatureEffectTier]:et.e.getActivePlayerChargedLevelTier(),[st.E.ChargedCreatureEffectDisplayType]:et.e.activePlayerHasChargedLevels&&!K?it.X$.IDLE:it.X$.HIDDEN})}else"spine"===k&&(H=this._prefabLoader.loadFromGUID($.l.SpineFollow,U),H.findComponentInChildren(X.N).setAssetID(B));if(!G.o5U.isMobile()){const U="pet"===k?"pet":"follow",F=q.t.getItem(U,B),$=null===(j=null==F?void 0:F.data)||void 0===j?void 0:j.particleEffects;G.Aq$.isDefined($)&&V.q.instance.prodigy.load.assets([nt._.Particles_json],(()=>{for(let k=0;k<$.length;++k)W.d.createParticleEmitter(H,$[k].ID,new G.I9Y($[k].x,$[k].y)).GameObject.sendToBack()}))}return H}loadHitboxAppearancePrefab(k,B,U){(0,J.v)([H.V.Pet,H.V.Dorm,H.V.Follow].indexOf(k)>-1,"Unsupported hitbox appearance type");const F=q.t.getItem(k,B);let G;if(k===H.V.Pet){"spine"===F.metadata.assets.default.type?(G=this._prefabLoader.loadFromGUID($.l.DynamicSpinePet,U),G.findComponentInChildren(X.N).setAssetID(F.ID)):(G=this._prefabLoader.loadFromGUID($.l.DynamicSpritesheetPet,U),G.findComponentInChildren(Q.X).setAsset(F.ID))}else k===H.V.Dorm?(G=this._prefabLoader.loadFromGUID($.l.MorphedSingleImageDorm,U),G.findComponentInChildren(K.o).setDormItemID(F.ID,"vertical")):k===H.V.Follow&&((0,J.v)("legacy"===F.metadata.type||"spine"===F.metadata.type,"Unsupported follower type"),"legacy"===F.metadata.type?(G=this._prefabLoader.loadFromGUID($.l.MorphedLegacyFollow,U),G.findComponentInChildren(z.a).setFollowID(F.ID)):"spine"===F.metadata.type&&(G=this._prefabLoader.loadFromGUID($.l.MorphedSpineFollow,U),G.findComponentInChildren(X.N).setAssetID(F.ID)));return G.findComponentInChildren(Y.n).setData(k,B),G}loadAppearancePrefab(k,B,U){(0,J.v)("pet"===k,"Unsupported appearance type");const F=q.t.getItem(k,B);let G;const j=F.metadata.assets.default;if(j)"spine"===j.type?(G=this._prefabLoader.loadFromGUID($.l.SpinePet,U),G.findComponentInChildren(X.N).setAssetID(F.ID)):(G=this._prefabLoader.loadFromGUID($.l.SpritesheetPet,U),G.findComponentInChildren(Q.X).setAsset(F.ID));else{F.metadata.assets.reduced&&(G=this._prefabLoader.loadFromGUID($.l.SpritesheetPet,U),G.findComponentInChildren(Q.X).setAsset(F.ID,"pet","reduced"))}return G}};at=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("d0e-64fd")),(0,F.Sn)("design:paramtypes",[G.wNP])],at)},52491:(k,B,U)=>{"use strict";U.d(B,{A:()=>V});var F,G=U(8674),j=U(62459),$=U(35120),H=U(28152);let V=F=class extends j.uAl{constructor(){super(...arguments),this._depth=0,this._destroyLayerOnDestroy=!0}create(){super.create();const k=j.wa5.getActiveScene().addLayer(F.LEGACY_MENU_LAYER_NAME,this._depth,!0),B=$.q.instance.prodigy.open;this._previousMenuLayer=B.menuLayer,this._previousMenusGameObject=B.menusGameObject,B.menuLayer=k,this._addedMenuLayer=k,B.menusGameObject=null}destroy(){var k;const B=$.q.instance.prodigy.open,U=B.menuLayer===this._addedMenuLayer;U&&(B.menuLayer=this._previousMenuLayer,B.menusGameObject=this._previousMenusGameObject),this._destroyLayerOnDestroy&&(U?j.wa5.getActiveScene().destroyLayer(F.LEGACY_MENU_LAYER_NAME):null===(k=this._addedMenuLayer)||void 0===k||k.destroy(),delete this._addedMenuLayer),super.destroy()}};V.LEGACY_MENU_LAYER_NAME="legacyMenuLayer",(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],V.prototype,"_depth",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],V.prototype,"_destroyLayerOnDestroy",void 0),V=F=(0,G.Cg)([(0,j.EVk)("BindLegacyMenuLayer",H.Y.ui)],V)},5885:(k,B,U)=>{"use strict";U.d(B,{E:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this.onOpenComplete=new G.HN0}create(){super.create(),this.chestAnimator.OnAnimationComplete.addOnce((()=>{this.chestAnimator.playAnimation("idle",!0),this.inputObject.active=!0,this.guideHandAnimator.GameObject.active=!0,this.guideHandAnimator.play()}),this)}destroy(){this.onOpenComplete.dispose(),this.chestAnimator.OnAnimationComplete.removeAll(this),super.destroy()}open(){this.guideHandAnimator.GameObject.active=!1,this.chestAnimator.playAnimation("open",!1),this.chestAnimator.OnAnimationComplete.addOnce((()=>{this.onOpenComplete.dispatch()}),this)}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onOpenComplete",void 0),(0,F.Cg)([(0,G.MnK)(G.uAl),(0,F.Sn)("design:type",Object)],$.prototype,"chestAnimator",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],$.prototype,"inputObject",void 0),(0,F.Cg)([(0,G.MnK)(G.uAl),(0,F.Sn)("design:type",Object)],$.prototype,"guideHandAnimator",void 0),$=(0,F.Cg)([(0,G.EVk)("BossChest",j.Y.object)],$)},9531:(k,B,U)=>{"use strict";U.d(B,{K:()=>Y});var F=U(8674),G=U(62459),j=U(51742),$=U(35120),H=U(28152),V=U(27812),W=U(31029),q=U(92591),K=U(79825),z=U(30488);let Y=class extends W.u{constructor(){super(...arguments),this.alertSFX=j.c.Sfx_world,this.animationController=null,this._circleTrigger=null,this._waitingForAnimationController=!1,this._skipWalkAnimationOnDelayedRun=!1}update(){super.update(),this._waitingForAnimationController&&this.animationController&&(this.run(this._skipWalkAnimationOnDelayedRun),this._waitingForAnimationController=!1)}run(k=!1){if(!this.animationController)return G.VyI.log("PlayMonsterAlertFSMComponent: Animation controller not ready, waiting for it to be initialized before running.",G.$bb.Warning),this._waitingForAnimationController=!0,void(this._skipWalkAnimationOnDelayedRun=k);const B=!0===k?215:115;this.execute(B,{game:$.q.instance.game,playerLocomotion:this._playerLocomotion,circleTrigger:this._circleTrigger,monsterTransform:this.animationController.GameObject.transform,chatBubble:this._chatBubble,animationController:this.animationController,monsterWalkAnimator:this.monsterWalk,monsterWalkPosition:this._mainPlayer.transform.worldPosition,sfxVolumeType:K.h.BgmSfx})}};(0,F.Cg)([(0,G.Bak)(),(0,F.Sn)("design:type",String)],Y.prototype,"alertSFX",void 0),(0,F.Cg)([(0,G.Cdj)("PlayerLocomotion"),(0,F.Sn)("design:type",G.KhP)],Y.prototype,"_playerLocomotion",void 0),(0,F.Cg)([(0,G.Cdj)("MainPlayerGameObject"),(0,F.Sn)("design:type",G._mx)],Y.prototype,"_mainPlayer",void 0),(0,F.Cg)([(0,G.MnK)(q.K),(0,F.Sn)("design:type",q.K)],Y.prototype,"animationController",void 0),(0,F.Cg)([(0,G.MnK)(z.E),(0,F.Sn)("design:type",z.E)],Y.prototype,"_circleTrigger",void 0),(0,F.Cg)([(0,G.MnK)(V.I),(0,F.Sn)("design:type",V.I)],Y.prototype,"monsterWalk",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Y.prototype,"_chatBubble",void 0),Y=(0,F.Cg)([(0,G.EVk)("PlayMonsterAlertFSM",H.Y.animation)],Y)},72055:(k,B,U)=>{"use strict";U.d(B,{Q:()=>G});var F=U(62459);class G extends F.y4o{constructor(){super(...arguments),this._groupContainer=null}create(){super.create(),this._groupContainer=F.W$e.instance.game.add.container(F.W$e.instance.game.stage),this._groupContainer.name=this.GameObject.name,this.setRootContainer(this._groupContainer)}getDimensions(){return this.GameObject.transform instanceof F.XVE?this.GameObject.transform.rectTransformDimensions:new F.or0(this._groupContainer.width,this._groupContainer.height)}destroy(){this.clearRootContainer(),this._groupContainer&&this._groupContainer.destroy(),this._groupContainer=null,super.destroy()}}},63860:(k,B,U)=>{"use strict";U.d(B,{e:()=>ft});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U.n($),V=U(99625),W=U(96703);var q;U(48417);!function(k){k.School="School",k.Home="Home"}(q||(q={}));var K,z,Y=U(89067),Q=U(90633),X=U(35120),Z=U(73797),J=U(46784),tt=U(41674),et=U(76277),it=U(13956),st=U(40579),nt=U(83634),at=U(30226),rt=U(67665),ot=U(65240),ht=U(96810),ct=U(44094),dt=U(71586);!function(k){k.AfterSchoolWidgetFtueAdvanceCallback="AFTER_SCHOOL_WIDGET_FTUE_ADVANCE_CALLBACK",k.AfterSchoolWidgetFtueCompleteCallback="AFTER_SCHOOL_WIDGET_FTUE_COMPLETE_CALLBACK",k.AfterSchoolWidgetFtueStep="AFTER_SCHOOL_WIDGET_FTUE_STEP"}(K||(K={})),function(k){k.NOT_STARTED="NOT_STARTED",k.STEP_1_WIDGET_INTRO_DIALOGUE="STEP_1_WIDGET_INTRO_DIALOGUE",k.STEP_2_CLICK_ON_GOLD_REWARD="STEP_2_CLICK_ON_GOLD_REWARD",k.STEP_3_COLLECT_GOLD_REWARD="STEP_3_COLLECT_GOLD_REWARD",k.STEP_4_MAGICOIN_REWARD_DIALOGUE="STEP_4_MAGICOIN_REWARD_DIALOGUE",k.STEP_5_CLICK_ON_MAGICOIN_REWARD="STEP_5_CLICK_ON_MAGICOIN_REWARD",k.STEP_6A_DIALOGUE_PLAY_AT_HOME="STEP_6A_DIALOGUE_PLAY_AT_HOME",k.STEP_7A_WAIT_FOR_CLOSE="STEP_7A_WAIT_FOR_CLOSE",k.STEP_8A_COMPLETE="STEP_8A_COMPLETE",k.STEP_6B_COLLECT_MAGICOIN_REWARD="STEP_6B_COLLECT_MAGICOIN_REWARD",k.STEP_7B_DIALOGUE_PLAY_EVERY_DAY="STEP_7B_DIALOGUE_PLAY_EVERY_DAY",k.STEP_8B_COMPLETE="STEP_8B_COMPLETE"}(z||(z={}));class lt{constructor(){this._funnelId=null}static get initialized(){return G.Aq$.isDefined(this._instance)}static get instance(){var k;return null!==(k=this._instance)&&void 0!==k?k:this._instance=new lt}begin(){this._currentStep=0;const k=dt.R.getNowWithServerTimezoneOffset(),B=at.J.isDateWithinSchoolDayAndHours(k);this._stepPath=B?lt.AFTER_SCHOOL_WIDGET_FTUE_STEPS_SCHOOL_HOURS:lt.AFTER_SCHOOL_WIDGET_FTUE_STEPS_HOME_HOURS,this._funnelName=B?"after_school_widget_school_ftue":"after_school_widget_home_ftue",X.q.instance.prodigy.gameContainer.rebind(K.AfterSchoolWidgetFtueAdvanceCallback).toConstantValue(this.advanceFtueStep.bind(this)),X.q.instance.prodigy.gameContainer.rebind(K.AfterSchoolWidgetFtueCompleteCallback).toConstantValue(this.completeFtue.bind(this)),X.q.instance.game.broadcaster.addAppListener(Z.vy.FtueFunnelProgressionStepComplete,this.handFtueFunnelProgressionStepComplete,this,void 0),this.advanceFtueStep(),this.sendFtueFunnelStep(1)}handFtueFunnelProgressionStepComplete(k){this.sendFtueFunnelStep(k)}advanceFtueStep(){this._currentStep++,this._currentStep>=this._stepPath.length?G.VyI.log("AfterSchoolWidgetFtueTracker: FTUE session reached the end of the path",G.$bb.Info):(X.q.instance.prodigy.gameContainer.rebind(K.AfterSchoolWidgetFtueStep).toConstantValue(this._stepPath[this._currentStep]),X.q.instance.game.broadcaster.broadcast(Z.vy.FtueStepAdvanced,void 0,[this._stepPath[this._currentStep]]),G.VyI.log(`Advancing FTUE step: ${this._stepPath[this._currentStep]}`,G.$bb.Info))}completeFtue(){G.VyI.log("AfterSchoolWidgetFtueTracker: FTUE session completed",G.$bb.Info),X.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(Q.B.FEATURE_AFTER_SCHOOL_WIDGET,Q.B.BREADCRUMB_AFTER_SCHOOL_WIDGET_FTUE_COMPLETED),this.destroy()}sendFtueFunnelStep(k){const B="after_school_widget_school_ftue"===this._funnelName?lt.FUNNEL_STEPS_SCHOOL_HOURS:lt.FUNNEL_STEPS_HOME_HOURS;if(k<1||k>B.length)return void G.VyI.log(`AfterSchoolWidgetFtueTracker: Invalid funnel step index ${k}`,G.$bb.Warning);G.Aq$.isDefined(this._funnelId)||(k>1&&G.VyI.log(`AfterSchoolWidgetFtueTracker: Funnel step ${k} send without starting funnel`,G.$bb.Warning),this._funnelId=ct.$.generateUID());const U=X.q.instance.prodigy.gameContainer.get("c47-20b6"),F={funnelType:"tutorial",funnelName:this._funnelName,funnelId:this._funnelId,stepName:B[k-1],stepIndex:k};U.playerProgression.sendAfterSchoolWidgetFunnelAdvancedEvent(F)}destroy(){this._funnelId=null,X.q.instance.game.broadcaster.removeAppListener(Z.vy.FtueFunnelProgressionStepComplete,this,void 0),X.q.instance.prodigy.gameContainer.unbind(K.AfterSchoolWidgetFtueAdvanceCallback),X.q.instance.prodigy.gameContainer.unbind(K.AfterSchoolWidgetFtueStep),lt._instance=null}}lt.AFTER_SCHOOL_WIDGET_FTUE_STEPS_SCHOOL_HOURS=[z.NOT_STARTED,z.STEP_1_WIDGET_INTRO_DIALOGUE,z.STEP_2_CLICK_ON_GOLD_REWARD,z.STEP_3_COLLECT_GOLD_REWARD,z.STEP_4_MAGICOIN_REWARD_DIALOGUE,z.STEP_5_CLICK_ON_MAGICOIN_REWARD,z.STEP_6A_DIALOGUE_PLAY_AT_HOME,z.STEP_7A_WAIT_FOR_CLOSE,z.STEP_8A_COMPLETE],lt.AFTER_SCHOOL_WIDGET_FTUE_STEPS_HOME_HOURS=[z.NOT_STARTED,z.STEP_1_WIDGET_INTRO_DIALOGUE,z.STEP_2_CLICK_ON_GOLD_REWARD,z.STEP_3_COLLECT_GOLD_REWARD,z.STEP_4_MAGICOIN_REWARD_DIALOGUE,z.STEP_5_CLICK_ON_MAGICOIN_REWARD,z.STEP_6B_COLLECT_MAGICOIN_REWARD,z.STEP_7B_DIALOGUE_PLAY_EVERY_DAY,z.STEP_8B_COMPLETE],lt.FUNNEL_STEPS_SCHOOL_HOURS=[ht.h.AfterSchoolWidgetHUDButtonHighlighted,ht.h.AfterSchoolWidgetHUDButtonClicked,ht.h.AfterSchoolWidgetNootExplainsDailyGift,ht.h.AfterSchoolWidgetPlayerAdvancesToRewardScreen,ht.h.AfterSchoolWidgetPlayerCollectsSchoolReward,ht.h.AfterSchoolWidgetNootExplainsHowToGetMagicoin,ht.h.AfterSchoolWidgetPlayerReturnsToRewardScreen,ht.h.AfterSchoolWidgetPlayerClicksCollectAtHomeButton,ht.h.AfterSchoolWidgetNootOopsDialog,ht.h.AfterSchoolWidgetCollectMagicoinTooltipShown,ht.h.AfterSchoolWidgetNootRemindsPlayersToReturnAfterSchool,ht.h.AfterSchoolWidgetTutorialComplete],lt.FUNNEL_STEPS_HOME_HOURS=[ht.h.AfterSchoolWidgetHUDButtonHighlighted,ht.h.AfterSchoolWidgetHUDButtonClicked,ht.h.AfterSchoolWidgetNootExplainsDailyGift,ht.h.AfterSchoolWidgetPlayerAdvancesToRewardScreen,ht.h.AfterSchoolWidgetPlayerCollectsSchoolReward,ht.h.AfterSchoolWidgetNootExplainsHowToGetMagicoin,ht.h.AfterSchoolWidgetPlayerReturnsToRewardScreen,ht.h.AfterSchoolWidgetPlayerCollectsHomeReward,ht.h.AfterSchoolWidgetNootRemindsPlayersToReturnDaily,ht.h.AfterSchoolWidgetCollectMagicoinTooltipShownAtHome,ht.h.AfterSchoolWidgetTutorialComplete];var ut=U(85985);let ft=class{constructor(){this.onSchoolRewardStateSet=new G.HN0,this.onHomeRewardStateSet=new G.HN0,this.onDataSet=new G.HN0,X.q.instance.game.state.onStateChange.add(this.updateHudButton.bind(this)),X.q.instance.game.broadcaster.addAppListener(Z.Y1.HUDRevampButtonAttentionGranted,this.handleHudRevampButtonAttentionGranted.bind(this),this,void 0,!0)}handleHudRevampButtonAttentionGranted(k){var B;k===Y.ts.AfterSchoolWidget&&this.isFtueAvailable()&&(lt.initialized&&(null===(B=lt.instance)||void 0===B||B.destroy()),lt.instance.begin())}openAfterSchoolWidgetRewardsScreenFromHud(){lt.initialized&<.instance.sendFtueFunnelStep(2),X.q.instance.prodigy.open.prefabMenu(V.l.AfterSchoolWidgetRewardsScreen,void 0,void 0,void 0,void 0,void 0,{interfaceName:J.B.AfterSchoolWidget,interfaceType:tt.Wm.Modal,instanceType:"reward",originType:tt.$N.ButtonClick,custom:{item_list:{home_reward:JSON.stringify(this._cachedRewardStatus.homeReward),school_reward:JSON.stringify(this._cachedRewardStatus.schoolReward)}}},!0)}isFtueAvailable(){return!!G.Aq$.isDefined(this._cachedRewardStatus)&&((0,et.G)(W.K).enabled&&"Available"===ut.J.calculateSchoolState()&&"Collected"!==ut.J.calculateHomeState()&&!X.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Q.B.FEATURE_AFTER_SCHOOL_WIDGET,Q.B.BREADCRUMB_AFTER_SCHOOL_WIDGET_FTUE_COMPLETED))}setData(k){this._cachedRewardStatus=k,this.refreshDataOnExpiration(),this.setHomeState(),this.setSchoolState(),this.updateHudButton(),this.onDataSet.dispatch(k)}getData(){return H().cloneDeep(this._cachedRewardStatus)}setHomeState(k=ut.J.calculateHomeState()){const B=this.getData(),U=Date.now();let F=0;switch(k){case"Locked":F=B.homeRewardWindow.start;break;case"Collected":F=B.homeRewardWindow.lockedStart}if(F>U){const k=F-U;this._homeRewardTimeout&&clearTimeout(this._homeRewardTimeout),this._homeRewardTimeout=setTimeout((()=>this.setHomeState()),k)}this.homeRewardState!==k&&(this.homeRewardState=k,this.onHomeRewardStateSet.dispatch(k))}setSchoolState(k=ut.J.calculateSchoolState()){this.schoolRewardState!==k&&(this.schoolRewardState=k,this.onSchoolRewardStateSet.dispatch(k))}refreshDataOnExpiration(){var k,B;const{homeRewardWindow:U,schoolRewardWindow:F}=this.getData(),j=Date.now(),$=Math.max(null!==(k=U.end)&&void 0!==k?k:0,null!==(B=F.end)&&void 0!==B?B:0)-j;$>0&&(this._dataExpirationTimeout&&clearTimeout(this._dataExpirationTimeout),this._dataExpirationTimeout=setTimeout((()=>{this.refreshData().catch((k=>{G.VyI.log(`AfterSchoolWidgetService: Caught Error - ${G.RQr.stringify(k)}`,G.$bb.Verbose)}))}),$))}refreshData(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this._afterSchoolWidgetNetworkHandler.getRewardStatus();this.setData(k)}))}updateHudButton(){var k,B;if(!(0,et.G)(W.K).enabled)return;if(!G.Aq$.isDefined(this._cachedRewardStatus))return void G.VyI.log("AfterSchoolWidgetService: Reward status not yet fetched",G.$bb.Error);if(!G.Aq$.isDefined(this._hudService))return void G.VyI.log("AfterSchoolWidgetService: HUD service not initialized",G.$bb.Error);const U=this._cachedRewardStatus.homeRewardWindow,F=this._cachedRewardStatus.schoolRewardWindow,j=Math.min(null!==(k=F.start)&&void 0!==k?k:1/0,null!==(B=U.start)&&void 0!==B?B:1/0)-Date.now();j<=0?this.showCollectableRewardLabel():this._hudService.updateCachedLabelData(Y.ts.AfterSchoolWidget,{labelValue:j,pillColour:"#DB1E75"}),this._hudButtonTimeout&&clearTimeout(this._hudButtonTimeout),this._hudButtonTimeout=setTimeout(this.showCollectableRewardLabel.bind(this),j)}showCollectableRewardLabel(){const k=X.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);this._hudService.updateCachedLabelData(Y.ts.AfterSchoolWidget,{labelValue:k.getText("PLUS_ULTRA_BONUS_COLLECT"),pillColour:"#098E00"})}claimSchoolReward(){return(0,F.sH)(this,void 0,void 0,(function*(){this.setSchoolState("Collected");try{const k=yield this._afterSchoolWidgetNetworkHandler.claimReward(q.School);if(k.amount){const B={ID:k.ID,type:k.type,N:k.amount};at.J.bagItem(B,X.q.instance.game,"got-item",void 0,{source_type:ot.C.AfterSchoolWidget,sink_type:ot.C.AfterSchoolWidget})}return yield this.refreshData(),!0}catch(k){return G.VyI.log(`AfterSchoolWidgetRewardsComponent: Caught Error - ${G.RQr.stringify(k)}`,G.$bb.Verbose),!1}}))}claimHomeReward(){return(0,F.sH)(this,void 0,void 0,(function*(){this.setHomeState("Collected");try{const k=this._segment.item.beginSecureItemTransaction();return yield this._afterSchoolWidgetNetworkHandler.claimReward(q.Home),k.flush({transaction_id:"AfterSchoolWidget",source_type:ot.C.AfterSchoolWidget,sink_type:ot.C.AfterSchoolWidget}),yield this.refreshData(),!0}catch(k){return G.VyI.log(`AfterSchoolWidgetRewardsComponent: Caught Error - ${G.RQr.stringify(k)}`,G.$bb.Verbose),!1}}))}};(0,F.Cg)([(0,it.b)("2a3-4b97"),(0,F.Sn)("design:type",nt.Z)],ft.prototype,"_afterSchoolWidgetNetworkHandler",void 0),(0,F.Cg)([(0,it.b)("c47-20b6"),(0,F.Sn)("design:type",rt.Y)],ft.prototype,"_segment",void 0),(0,F.Cg)([(0,it.b)("cc9-a3f0"),(0,F.Sn)("design:type",st.W)],ft.prototype,"_hudService",void 0),ft=(0,F.Cg)([(0,j.injectable)(),(0,F.Sn)("design:paramtypes",[])],ft)},85985:(k,B,U)=>{"use strict";U.d(B,{J:()=>V});var F=U(8674),G=U(79687),j=U(35120),$=U(96703),H=U(76277);let V=class{static calculateSchoolState(){const k=j.q.instance.prodigy.gameContainer.get("e94-c727").getData();return Date.now()>=k.schoolRewardWindow.start?"Available":"Collected"}static calculateHomeState(){const k=j.q.instance.prodigy.gameContainer.get("e94-c727").getData(),B=Date.now();return B>=k.homeRewardWindow.start?"Available":B>=k.homeRewardWindow.lockedStart?"Locked":"Collected"}static showDailyLoginCalendar(){const k=(0,H.G)($.K);return!((null==k?void 0:k.enabled)&&(null==k?void 0:k.replaceLoginCalendar))}};V=(0,F.Cg)([(0,G.injectable)()],V)},52743:(k,B,U)=>{"use strict";U.d(B,{Z:()=>V});var F=U(8674),G=U(62459),j=U(79687),$=U(15821),H=U(35120);let V=class{constructor(){this.onBannerQueueUpdated=new G.HN0,this._nextBannerId=0,this._bannerRegistry=new Map,this._bannerStack=[],this._bannersToDelete=[]}processBannerDelete(){if(this._bannersToDelete.length>0){this._bannerStack=this._bannerStack.filter((k=>!this._bannersToDelete.includes(k.id)));for(const k of this._bannersToDelete)this._bannerRegistry.delete(k);this._bannersToDelete=[],this.onBannerQueueUpdated.dispatch(this._bannerStack)}}postBanner(k){const B=this._nextBannerId,U=Object.assign({id:B},k);return this._bannerRegistry.has(B)||this._bannerStack.push(U),this._bannerRegistry.set(B,U),this.onBannerQueueUpdated.dispatch(this._bannerStack),this._nextBannerId++,B}deleteBanner(k){this._bannersToDelete.includes(k)||(0===this._bannersToDelete.length&&H.q.instance.game.app.ticker.addOnce(this.processBannerDelete.bind(this)),this._bannersToDelete.push(k))}updateBanner(k,B){const U=this._bannerRegistry.get(k);$.A.isDefined(U)&&(Object.entries(B).forEach((([k,B])=>{U[k]=B})),this.onBannerQueueUpdated.dispatch(this._bannerStack))}getStack(){return[...this._bannerStack]}};V=(0,F.Cg)([(0,j.injectable)()],V)},71543:(k,B,U)=>{"use strict";U.d(B,{p:()=>z});var F=U(8674),G=U(62459),j=U(28628),$=U(24652),H=U(35120),V=U(23082),W=U(13956),q=U(14117);const K=[33,34,35,36,38,39,40,41,42,43,44,45,46,47];class z{static resumeBattle(){var k,B,U,F,W;if(!z.canResumeBattle())return!1;const q=this._activePlayer.battleResumeData;if(!G.Aq$.isDefined(q)){return!!(null===(k=z._riftsSyncedDataStore.cache)||void 0===k?void 0:k.currentRiftRunProgress)&&(H.q.instance.game.state.get(V.G.Rifts).resumeRiftRun(!1),this._activePlayer.battleResumeData=void 0,!0)}if(!G.Aq$.isDefined(q.battleType)||!j.Mb.includes(q.battleType))return!1;if(q.nextBattleIsResume=!0,q.battleType===j.gu.NormalRiftRun){const k=null===(B=z._riftsSyncedDataStore.cache)||void 0===B?void 0:B.currentRiftRunProgress;return k?k.type!==$.cn.Normal?(q.nextBattleIsResume=!1,!1):(H.q.instance.game.state.get(V.G.Rifts).resumeRiftRun(G.Aq$.isDefined(k.chosenOpponentTeamIndex)),!0):(q.nextBattleIsResume=!1,!1)}if(void 0!==(null===(U=q.data)||void 0===U?void 0:U.battleTriggerData))return H.q.instance.prodigy.game.input.enabled=!1,H.q.instance.prodigy.world.it(q.data.battleTriggerData.encounterMap,null===(F=q.data.battleTriggerData)||void 0===F?void 0:F.encounterPosition.x,null===(W=q.data.battleTriggerData)||void 0===W?void 0:W.encounterPosition.y),!0;const K={},Y=k=>{H.q.instance.prodigy.world.it(H.q.instance.prodigy.world.getCurrentMap(),void 0,void 0,{battleResult:k})};return H.q.instance.prodigy.battle.start(K,(()=>Y(j.XK.Escape)),(()=>Y(j.XK.Victory)),(()=>Y(j.XK.Defeat)),K.onFaint),!0}static canResumeBattle(){return!!this._activePlayer.hasCompletedTutorial()}static shouldStoreTriggerDataWithBattle(k){var B;if(!0===k.isQuestEncounter)return!0;if(G.Aq$.isDefined(k.boss))return!0;if("QuestBattle"===H.q.instance.prodigy.battle.battleStats.type)return!0;return!!(null!==(B=k.opponent)&&void 0!==B?B:[]).some((k=>{var B,U;return K.includes(null!==(U=null===(B=k.data)||void 0===B?void 0:B.ID)&&void 0!==U?U:-1)}))}}(0,F.Cg)([(0,W.b)("306-5359"),(0,F.Sn)("design:type",Function)],z,"_activePlayer",void 0),(0,F.Cg)([(0,W.b)("9ac-9677"),(0,F.Sn)("design:type",q.M)],z,"_riftsSyncedDataStore",void 0)},50503:(k,B,U)=>{"use strict";U.d(B,{A:()=>Y});var F,G=U(62459);!function(k){k.DamageBonus="damage",k.BonusCriticalHitChance="critChance",k.HealthBonus="health",k.DamageReduction="damageReduction",k.ElementalDamageResistance="elementalResistance"}(F||(F={}));class j{static isElementalPotionAffix(k){return j.ELEMENTAL_POTION_AFFIXES.indexOf(k.type)>-1}static isOffensivePotion(k){return j.OFFENSIVE_POTION_TYPES.indexOf(k.affix.type)>-1}static isDefensivePotion(k){return j.DEFENSIVE_POTION_TYPES.indexOf(k.affix.type)>-1}}j.ELEMENTAL_POTION_AFFIXES=[F.ElementalDamageResistance],j.OFFENSIVE_POTION_TYPES=[F.DamageBonus,F.BonusCriticalHitChance],j.DEFENSIVE_POTION_TYPES=[F.DamageReduction,F.ElementalDamageResistance];var $=U(35120),H=U(34829),V=U(40549),W=U(77938),q=U(23748),K=U(55122),z=U(94393);class Y{static getStrengths(k){return this.weakList[k]}static getWeaknesses(k){return this.strongList[k]}static getElementsStrongAgainst(k){const B=[];for(const U in this.strongList)this.strongList[U].indexOf(k)>-1&&B.push(U);return B}static isWeakAgainst(k,B){return!!G.Aq$.isDefined(Y.weakList[k])&&Y.weakList[k].indexOf(B)>-1}static isStrongAgainst(k,B){return!!G.Aq$.isDefined(Y.strongList[k])&&Y.strongList[k].indexOf(B)>-1}static rollMissChance(k,B=0){const U=H.A.get("GameConstants.Battle.ENEMY_ACCURACY_OVERRIDE");if(G.Aq$.isDefined(U)&&U>=0)return Math.random()>=U;const F=q.z.clampedLerp(this.missDifficultyRange[0],this.missDifficultyRange[1],k/Y.MAX_DIFFICULTY);return Math.random()0,elementAdvantage:K.elementAdvantage,nFactor:1,miss:!1};G.Aq$.isDefined(K.nFactor)&&(Z.nFactor=K.nFactor);const J=H.A.get("GameConstants.Battle.ATTACK_DAMAGE_OVERRIDE");if(G.Aq$.isDefined(J))return Z.damage=J,Z;const tt=G.Aq$.isDefined(U.modifiers.takenDamageMultiplier)?U.modifiers.takenDamageMultiplier:1;return Z.damage=K.damage*(K.elementAdvantage+X+z+Q+this.nFactorMap[K.nFactor]+K.damageModifiers+1)*tt,Z.damage=Math.round(Z.damage),Z}static getLevel1Hp(k){return this.hpMidValue/this.hpStatRange*Math.pow(Math.pow(this.hpStatRange,.25),k-1)}static getHpInc(k){return this.hpMidIncrement/this.hpStatRange*Math.pow(Math.pow(this.hpStatRange,.25),k-1)}static calculateSpellDamage(k,B,U){var F;const G=k.getStatPower(),j=k.getLevel(),$=null!==(F=W.t.getItem("spell",U).data.tier)&&void 0!==F?F:1,H=this.getLevel1Hp(G),V=this.getHpInc(G),q=1/this.hitsPerKillLevel1*H;return(q+q/(99/((H+99*V)/this.hitsPerKillLevel100/this.spellTierMultipliers[2]/q-1))*(j-1))*this.spellTierMultipliers[$-1]}static getTypeAdvantage(k,B){return Y.isStrongAgainst(k.element,B.getElement())?.2:Y.isWeakAgainst(k.element,B.getElement())?-.2:0}static applyModifiers(k,B,U,$){var H,q,K,z;const Y=U.modifiers,Q=$.modifiers;if(G.Aq$.isDefined(Y)){if(G.Aq$.isDefined(Y.potion)&&0!==Y.potion){const B=W.t.getItem("item",Y.potion).data;if(V.r.isPotionConsumable(B)){const U=B.affix,G=U.type;G===F.BonusCriticalHitChance?k.criticalChance=U.amount:G===F.DamageBonus&&(k.damageModifiers+=U.amount)}}G.Aq$.isDefined(Y.damage)&&(k.damageModifiers+=Y.damage-1),k.elementAdvantage*=null!==(q=null===(H=Y.elementalAdvantageMultipliers)||void 0===H?void 0:H.outgoing)&&void 0!==q?q:1}if(G.Aq$.isDefined(Q)){if(G.Aq$.isDefined(Q.potion)&&0!==Q.potion){const B=W.t.getItem("item",Q.potion).data;if(V.r.isPotionConsumable(B)){const U=B.affix,G=U.type;j.isElementalPotionAffix(U)&&G===F.ElementalDamageResistance?U.elements.indexOf(k.attackElementType)>-1&&(k.elementAdvantage-=U.amount):G===F.DamageReduction&&(k.damageModifiers-=U.amount)}}G.Aq$.isDefined(Q.ignoreElement)&&Q.ignoreElement>0&&(k.elementAdvantage=Math.min(k.elementAdvantage,0)),k.elementAdvantage*=null!==(z=null===(K=Q.elementalAdvantageMultipliers)||void 0===K?void 0:K.incoming)&&void 0!==z?z:1}return G.Aq$.isDefined(B)&&(G.Aq$.isDefined(B.dmgMod)&&(k.damageModifiers+=B.dmgMod),G.Aq$.isDefined(B.nFactor)&&(k.nFactor=B.nFactor)),k}static getBestAttack(k,B,U,F){if(k.length<=0)return null;const G=[];for(let $=0;$B.dmg-k.dmg));let j=G[G.length-1].ID;for(let $=0;$F){j=G[$].ID;break}return j}static getEnemyLevel(k,B){return G.cj9.clamp(Math.round(((this.hpMidValue+this.hpMidIncrement*(k-1))/this.difficultyHitsToKill[B]*3-this.hpMidValue)/this.hpMidIncrement)+1,K.s.minLevel,K.s.activePlayerLevelCap)}static getAllOutAttackDamage(k,B,U){let F=1;return F=U?Y.allOutAttackBossDamage[B.aoaTier][k.getLiving().length]:Y.allOutAttackDamage[B.aoaTier][k.getLiving().length],G.Aq$.isDefined(B.modifiers.takenDamageMultiplier)&&(F*=B.modifiers.takenDamageMultiplier),{damage:B.getMaxHearts()*F,critical:!1,elementAdvantage:0,nFactor:1,miss:!1}}static calculateXP(k,B){const U=k*($.q.instance.prodigy.gameContainer.get("12b-405a").getMultiplier(B,z.R.Xp)-1),F=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasValidatedParentEmail()?k*H.A.get("GameConstants.Battle.VALID_PARENT_EMAIL_STARS_PERCENTAGE"):0,G=k*H.A.get("GameConstants.Battle.MEMBER_STARS_PERCENTAGE"),j=k+U+F;return{baseXp:Math.ceil(k),memberXp:Math.ceil(G),totalNonMemberXp:Math.ceil(j)}}}Y.ALL_OUT_ATTACK_ENERGY_COST=10,Y.MAX_DIFFICULTY=10,Y.AI_SWITCH_COOLDOWN=1,Y.criticalChance=.05,Y.criticalBonus=.15,Y.randomBaseRange=[-.01,.01],Y.nFactorMap=[-1,0,0,.15,.3,.5,1,1.5,1.5,1.5,1.5],Y.hitsPerKillLevel1=3,Y.hitsPerKillLevel100=3,Y.spellTierMultipliers=[1,1.2,1.4],Y.missDifficultyRange=[.35,.25],Y.difficultyHitsToKill={0:4,1:3.6,2:3.5,3:3.4,4:3.3,5:3.2,6:3.1,7:3,8:3,9:3,10:3},Y.xpConstant=1.042,Y.hpMidValue=500,Y.hpMidIncrement=100,Y.hpStatRange=1.25,Y.hpMaxStat=9,Y.strongList={fire:["ice","earth","plant","ice & fire"],water:["fire","ice & fire"],earth:["water"],plant:["water"],storm:["water"],mech:["water"],ice:["storm","mech"],shadow:["fire","water","earth","plant","storm","mech","ice"],wizard:["shadow"],astral:["shadow"]},Y.weakList={fire:["water","fire","shadow"],water:["earth","plant","storm","mech","water","shadow"],earth:["fire","ice & fire","earth","plant","shadow"],plant:["fire","ice & fire","plant","earth","shadow"],storm:["ice","ice & fire","storm","mech","shadow"],mech:["ice","ice & fire","mech","storm","shadow"],ice:["fire","ice & fire","ice","shadow"],shadow:["wizard","astral"],wizard:[],astral:[]},Y.allOutAttackDamage={1:{1:.34,2:.67,3:1},2:{1:.2,2:.3,3:.4}},Y.allOutAttackBossDamage={1:{1:.2,2:.3,3:.5},2:{1:.2,2:.3,3:.4}}},8693:(k,B,U)=>{"use strict";var F;U.d(B,{J:()=>F}),function(k){k.Miss="miss",k.Hit="normal-hit",k.CriticalHit="critical-hit",k.Cast="cast"}(F||(F={}))},50084:(k,B,U)=>{"use strict";U.d(B,{n:()=>Et,a:()=>wt});var F,G=U(8674),j=U(62459),$=U(95891),H=U.n($),V=U(62248),W=U(99625),q=U(56942);!function(k){k[k.AddNewPet=0]="AddNewPet",k[k.RemovePet=1]="RemovePet",k[k.PurchaseStandardBundle=2]="PurchaseStandardBundle"}(F||(F={}));var K=U(223),z=U(62886),Y=U(60157),Q=U(90633),X=U(5491),Z=U(65240),J=U(35120),tt=U(43846),et=U(77938),it=U(73797),st=U(75017),nt=U(51972),at=U(76277),rt=U(10670),ot=U(96810),ht=U(41674),ct=U(64353),dt=U(95057),lt=U(53661),ut=U(22023),ft=U(30226),bt=U(47255),pt=U(55122),vt=U(70760),gt=U(7247),mt=U(86283),yt=U(87490);const _t=Symbol();var Et;!function(k){k[k.CannotAfford=0]="CannotAfford"}(Et||(Et={}));class wt{constructor(k,B){this.onQuestionOpen=new j.HN0,this.onQuestionClose=new j.HN0,this.onRescueContinue=new j.HN0,this.onRescueDismissed=new j.HN0,this.onRescueFailed=new j.HN0,this.game=k,B&&(this._unitComponent=B,this._unitContainer=B.creature,this.creatureAssetID=B.creature.id),this.localizer=J.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService)}start(){const k=et.t.getItem("pet",this.creatureAssetID),B=J.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=J.q.instance.prodigy.gameContainer.get("5c7-e02d"),F=U.petAcquisitionCost(k.ID,V.l6.Rescue),G=U.canAfford(F),j=J.q.instance.prodigy.gameContainer.get("c47-20b6");j.playerProgression.sendPetHardCurrencyFunnelAdvancedEventIfApplicable(V.l6.Rescue,ot.l.PetHardCurrencyIntention,k.ID),mt.D.isFree(J.q.instance.prodigy.breadcrumbManager)?this.continueToRescueConfirmation():mt.D.isKennelFull(B)?B.hasMembership()?this.kennelFullPopup():this.catchMorePetsPopup():G?this.continueToRescueConfirmation():(j.item.sendInsufficientCurrencyEvent(F,{sink_type:Z.C.PetRescue,sink_id:k.ID}),(0,at.G)(K.l).enabled||(B.hasMembership()?this.onRescueFailed.dispatch(Et.CannotAfford):this.showInsufficientResourcePopup(k,this._unitContainer)))}catchMemberPetPopup(k=!1){const B={conversionFunnelName:k?bt.o.FunnelCatchEvolvedPet:bt.o.FunnelCatchMemberLockedPet,conversionFunnelMetadata:this.creatureAssetID},U=ft.J.showYouTubeMembershipAd(this.game,!0)?dt.R.Video:dt.R.Static;J.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:k?"Catch-Evolved-Pet":"Catch-Member-Locked-Pet",category:"Pet",contentId:`pet-${this.creatureAssetID}`,adType:U}),this.showMemberAd(B,st.p.MEMBER_PETS)}showMemberAd(k,B){var U;const F=J.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(ft.J.shouldSuppressAd(F,void 0)){const k={bodyText:null,xPosition:1340,yPosition:720,arrowXRelPos:1.1,arrowDirection:nt.i.DOWN};J.q.instance.prodigy.open.memberAdSuppressionToolTip(k,!1,!1).onDismissalClick.add((()=>{this.onRescueDismissed.dispatch()}))}else{const B=null===(U=et.t.getItem("pet",this.creatureAssetID))||void 0===U?void 0:U.data;let F=null;j.Aq$.isDefined(B)&&(F=J.q.instance.prodigy.open.unifiedConversionFlow((()=>{J.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelQuit("Click-Membership","Close-Clicked"),this.recheckCriteria()}),k,void 0,{CONTEXTUAL_CHASE_PET_SPINE_GUID:q.Q[`Spine_pet_${this.creatureAssetID}_json`],CONTEXTUAL_CHASE_PET_NAME:B.name})),j.Aq$.isDefined(F)||J.q.instance.prodigy.open.membershipInfo((()=>{this.recheckCriteria()}),k)}this.sendPetCapturedFailedSegmentEvent("Member Locked")}catchMorePetsPopup(){const k={conversionFunnelName:bt.o.FunnelCatchMorePets,conversionFunnelMetadata:this.creatureAssetID},B=ft.J.showYouTubeMembershipAd(this.game,!0)?dt.R.Video:dt.R.Static;J.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:"Pet-Limit",category:"Pet",contentId:`pet-${this.creatureAssetID}`,adType:B}),this.showMemberAd(k,st.p.MEMBER_PETS)}recheckCriteria(){J.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasMembership()?this.start():this.onRescueDismissed.dispatch()}kennelFullPopup(){J.q.instance.prodigy.open.messageBoxPrefab({title:"MESSAGE_TITLE_UH_OH",text:"TOO_MANY_PETS",confirmCallback:()=>{this.onRescueDismissed.dispatch()}}),this.sendPetCapturedFailedSegmentEvent("Full Kennel")}showPetSlotsFullPopup(){J.q.instance.prodigy.open.prefabMenu(W.l.Rescue_AtHardCapTooltip,(()=>{this.onRescueDismissed.dispatch()}),void 0,!1).skipRenderTransparencyLayer=!0}showUpsellPopup(k,B=0){const U=J.q.instance.prodigy.gameContainer.get("c47-20b6");U.purchase.sendFunnelStart({type:"Pet-Hard-Currency-Insufficient-Resources-Rescue",category:"Pet",adType:dt.R.UnifiedConversionFlow,contentId:`${k.type}-${k.ID}`,adVersion:ct.P.getAdVersion(bt.o.FunnelNotEnoughCurrency)});const F=this.getMembershipConversionAwareModalResultHandler(this._unitContainer,(()=>{U.purchase.sendFunnelQuit("Click-Membership","Close-Clicked")}));J.q.instance.prodigy.open.unifiedConversionFlow(F,{conversionFunnelName:bt.o.FunnelNotEnoughCurrency},{type:ht.$N.Battle,id:U.battle.currentBattleID},{[lt.FK.OtpMissingMagicoin]:B})}continueToRescueConfirmation(){const k=wt.getTaskEventData(this.creatureAssetID);wt.sendQuestRescueEvent(k),wt.setCooldownsOnRescue(k),this.onRescueContinue.dispatch()}static getTaskEventData(k){var B;const U=null===(B=et.t.getItem("pet",k))||void 0===B?void 0:B.data;return{params:{taskEventType:Y.Z7.Pet,rarity:U.rarity,itemType:"pet",source:Z.C.PetRescue,id:k,element:U.affinity,level:U.level}}}static sendQuestRescueEvent(k){J.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(z.T.RESCUE_PET,k).catch(j.RQr.createHandler("Error sending a quest event for rescuing a pet"))}static rescuePet(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){const G=ut.P8.showUniquePetsFeature()?this.RESCUED_PET_LEVEL:Math.min(B.level,ut.P8.getMaxOwnableLevel(B.id)),$={type:"pet",ID:B.id,N:1,data:{level:G,stars:pt.s.xpRequiredForLevel(G,X.V.Pet),nickname:B.nickname}},H=()=>{ft.J.bagItem($,J.q.instance.game,"on-catch-pet",void 0,{source_type:Z.C.PostBattle,sink_type:Z.C.PetRescue,transaction_id:U})};if(k)H();else{const k=J.q.instance.prodigy.gameContainer.get("5c7-e02d"),G=k.petAcquisitionCost($.ID,V.l6.Rescue);try{yield k.spend(null!=G?G:F,{sink_type:Z.C.PetRescue,sink_id:B.id,transaction_id:U})}catch(q){return void j.RQr.logError(q,"Post battle: Not enough Magicoin to rescue pet")}H()}wt.grantUnlockFollow($.ID,U,Z.C.PostBattle),G0||ft.J.bagItem({type:"follow",ID:$},J.q.instance.game,"on-catch-pet",void 0,{source_type:U,transaction_id:B})}static setCooldownsOnRescue(k){const B=j.wa5.getActiveScene().container.get("BattleController");if(!j.Aq$.isDefined(B.battleCooldownConfig))return;if(!B.battleCooldownConfig.onAction.includes(yt.EBattleAction.RescuePet))return;if(j.Aq$.isDefined(B.battleCooldownConfig.actionRestrictions[yt.EBattleAction.RescuePet])&&B.battleCooldownConfig.actionRestrictions[yt.EBattleAction.RescuePet].type===gt.i.PET_RESTRICTIONS){const U=new vt.F;if(j.Aq$.isDefined(k.params)&&!U.isReady(B.battleCooldownConfig.actionRestrictions[yt.EBattleAction.RescuePet].data,k.params))return}const U=J.q.instance.prodigy.gameContainer.get("e67-6525");"number"==typeof B.battleCooldownConfig.duration?U.setCooldownFromNow(B.battleCooldownConfig.id,B.battleCooldownConfig.duration).catch(j.RQr.createHandler("Error setting cooldown via number after rescue")):U.setCooldownFromCategory(B.battleCooldownConfig.id,B.battleCooldownConfig.duration).catch(j.RQr.createHandler("Error setting cooldown via category after rescue"))}static receivePet(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=J.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=ut.P8.showUniquePetsFeature()?this.RESCUED_PET_LEVEL:Math.min(k.level,ut.P8.getMaxOwnableLevel(k.id)),$={type:"pet",ID:k.id,N:1,data:{level:G,stars:pt.s.xpRequiredForLevel(G,X.V.Pet),nickname:k.nickname}};if(k[_t]){const k=J.q.instance.prodigy.gameContainer.get("8b9-bad1");yield k.fetchPetInventoryData(),U.kennel.isFull()&&(yield k.updateSlots(F.AddNewPet,B))}else{const U=J.q.instance.prodigy.gameContainer.get("5c7-e02d");yield U.spend(U.petAcquisitionCost($.ID,V.l6.Rescue),{sink_type:Z.C.PetRescue,sink_id:k.id,transaction_id:B})}ft.J.bagItem($,J.q.instance.game,"on-catch-pet",void 0,{source_type:Z.C.Battle,transaction_id:B}),wt.grantUnlockFollow($.ID,B,Z.C.Battle),J.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Q.B.FEATURE_BATTLE_TUTORIAL,Q.B.BREADCRUMB_FIRST_PET_RESCUED)||J.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(Q.B.FEATURE_BATTLE_TUTORIAL,Q.B.BREADCRUMB_FIRST_PET_RESCUED),U.hasCompletedTutorial()&&U.forceSaveCharacter(),G{J.q.instance.prodigy.open.prefabMenu(W.l.PetRescueCardSequence,B,void 0,void 0,void 0,{PET_RESCUE_CREATURE_DATA:{ID:k.id,level:G,name:k.name,nickname:k.nickname}})}));j.wa5.getActiveScene().container.get("BattleController").onRescueCompleted(),J.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendPetHardCurrencyFunnelAdvancedEventIfApplicable(V.l6.Rescue,ot.l.PetHardCurrencyTransactionComplete,$.ID)}))}sendPetCapturedFailedSegmentEvent(k){var B,U,F;const G=null===(B=et.t.getItem("pet",this.creatureAssetID))||void 0===B?void 0:B.data,j=J.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel;J.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendBattlePetCaptureFailedEvent({petName:null!==(U=this._unitContainer.nickname)&&void 0!==U?U:null==G?void 0:G.name,petLevel:this._unitContainer.level,petElement:null==G?void 0:G.element,petType:ut.P8.getPetEvolutionType(this.creatureAssetID),petRarity:null==G?void 0:G.rarity,petRank:null!==(F=this._unitComponent.data.mergeRank)&&void 0!==F?F:0,failReason:k,previousPetCopies:j.amountOfPet(G.ID),captureSource:rt.z2.InBattle})}showInsufficientResourcePopup(k,B){var U,F;J.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:"Pet-Hard-Currency-Insufficient-Resources-Rescue",category:"Pet",contentId:`pet-${this.creatureAssetID}`,adType:dt.R.Static});const G=(0,tt.k)("MAGICOIN"),j=this.getMembershipConversionAwareModalResultHandler(B,(()=>{this.sendPetCapturedFailedSegmentEvent("Insufficient Magicoin")})),$={PET_RESCUE_ID:null==k?void 0:k.ID,PET_RESCUE_NAME:null===(U=null==k?void 0:k.data)||void 0===U?void 0:U.name,PET_RESCUE_RARITY:null===(F=null==k?void 0:k.data)||void 0===F?void 0:F.rarity,PET_RESCUE_LEVEL:B.level.toString(),[lt.n7.InsufficientResource]:G};if(!J.q.instance.prodigy.open.unifiedConversionFlow(j,{conversionFunnelName:"Pet-Hard-Currency-Insufficient-Resources-Rescue"},void 0,$)){J.q.instance.prodigy.open.prefabMenu(W.l.EvolvedPet_InsufficientResources,void 0,void 0,void 0,void 0,$).onDestroy.addOnce(j)}}getMembershipConversionAwareModalResultHandler(k,B=H().noop){let U=()=>{B(),this.onRescueDismissed.dispatch()};return J.q.instance.game.broadcaster.addAppListener(it.H3.MembershipResponseReceived,(B=>{"success"===B&&(U=()=>{k[_t]=!0,this.continueToRescueConfirmation()})}),this),()=>{U()}}destroy(){J.q.instance.game.broadcaster.removeAppListener(it.H3.MembershipResponseReceived,this),this.onQuestionOpen.dispose(),this.onQuestionClose.dispose(),this.onRescueContinue.dispose(),this.onRescueDismissed.dispose(),this.onRescueFailed.dispose()}}wt.RESCUED_PET_LEVEL=1},86283:(k,B,U)=>{"use strict";U.d(B,{D:()=>q});var F=U(62459),G=U(90633),j=U(5491),$=U(35120),H=U(77938),V=U(39984),W=U(22023);class q{static clearNewlyRescuableUnitsSeen(){q._seenIds.clear()}static filterForNewlyRescuable(k){const B=k.filter((k=>!this._seenIds.has(k.data.unitId)));return B.forEach((k=>this._seenIds.add(k.data.unitId))),B}static isFree(k){return!k.isBreadcrumbComplete(G.B.FEATURE_BATTLE_TUTORIAL,G.B.BREADCRUMB_FREE_RESCUE)}static isAtPetLimit(k){return k.kennel.getPets().filter((k=>!W.P8.isPetEpic(k.ID))).length>=k.kennel.getMaxKennelSize()}static isMemberPet(k){return F.Aq$.isDefined(H.t.getItem("pet",k).data.member)}static hasRemainingRescueAttempts(k,B){const U=k.hasMembership()?2:1;return B.catchAttempt0}static isKennelFull(k){return k.kennel.isFull()}static sendPetLevelRestrictedSegmentEvent(k,B,U){$.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendPlayerProgressionRestrictedEvent({progressionType:"Pet Level",progressionAction:"level_reset",progressionValue:B.toString(),creatureName:k},{pointType:"stars",pointCount:V.e.starsToLevel(B,j.V.Pet)},{transaction_id:U})}static getPetRescueEventData(k,B){return{is_rescuable:B.isARescuableUnit(),is_new_pet:!q.hasBeenRescuedPreviously(k,B.creature.id),number_owned:k.kennel.getPets(!1).reduce(((k,U)=>U.ID===B.creature.id?k+1:k),0),times_battled:k.encounters.getPetTimesBattled(B.creature.id),times_rescued:k.encounters.getPetTimesRescued(B.creature.id)}}static sendPetRescueAvailableEvent(k){const B=$.q.instance.prodigy.gameContainer.get("306-5359");$.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendBattlePetRescueAvailableEvent({pet_name:k.name,pet_element:k.data.element,pet_rarity:k.data.rarity,pet_level:k.level,pet_type:W.P8.getPetEvolutionType(k.creature.id),is_new_pet:!q.hasBeenRescuedPreviously(B,k.creature.id),number_owned:B.kennel.getPets(!1).reduce(((B,U)=>U.ID===k.creature.id?B+1:B),0),times_battled:B.encounters.getPetTimesBattled(k.creature.id),times_rescued:B.encounters.getPetTimesRescued(k.creature.id)})}}q._seenIds=new Set},87239:(k,B,U)=>{"use strict";U.d(B,{x:()=>q});var F=U(62459),G=U(35120),j=U(36648),$=U(77938),H=U(44094),V=U(30226),W=U(95946);class q{static getUnlockedSpellDisplayInformation(k){const B=$.t.getItem("spellV2",k.oldId),U=$.t.getItem("spellV2",k.newId),F=V.J.convertLegacyElements(U.data.element);return{spellIcon:[j.q[H.$.capitalizeFirstLetter(U.metadata.assets.icon.assetKey)],void 0],newSpellName:U.data.name,oldSpellName:null==B?void 0:B.data.name,elementType:F}}static getElementDisplayName(k){var B;const U=null!==(B=this._elementLocalizationMap[k])&&void 0!==B?B:"";return G.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText(U)}}q._elementLocalizationMap={[W.a.Fire]:"ELEMENT_FIRE",[W.a.Plant]:"ELEMENT_PLANT",[W.a.Water]:"ELEMENT_WATER",[W.a.Ice]:"ELEMENT_ICE",[W.a.Storm]:"ELEMENT_STORM",[W.a.Astral]:"ELEMENT_ASTRAL",[W.a.Shadow]:"ELEMENT_SHADOW",[W.a.Physical]:"ELEMENT_PHYSICAL"}},74452:(k,B,U)=>{"use strict";U.d(B,{I:()=>Nt,u:()=>Gt});var F=U(8674),G=U(62459),j=U(95891),$=U(68910),H=U(56942),V=U(35120),W=U(57308),q=U(98013),K=U(34829),z=U(77938),Y=U(38487),Q=U(86896),X=U(70570),Z=U(78673),J=U(7914),tt=U(25048),et=U(75915),it=U(79484),st=U(66726),nt=U(84705),at=U(8811),rt=U(30424),ot=U(82329),ht=U(20786),ct=U(10655),dt=U(37639),lt=U(55734),ut=U(129),ft=U(73797),bt=U(93709),pt=U(59968);class vt extends bt.H{constructor(k,B,U,F,G,j){super(k,B,U,F,G),this._spineKey=j}setup(){const k=V.q.instance.prodigy.create.element(this.sprites,0,0);this._spine=this.game.add.spine(0,0,this._spineKey),this.idle(),k.add(this._spine),this.complete=!0,this.loading=!1,this._onLoad.dispatch(),this.setHitbox(z.t.getItem("boss",this.source.getID()).metadata.assets.default.hitbox)}idle(){this._spine.setAnimationByName(0,"idle",!0),this._spine.setToSetupPose()}attack(){pt.R.prototype.attack.call(this),this._spine.setAnimationByName(0,"attack",!1),this._spine.addAnimationByName(0,"idle",!0),this._spine.setToSetupPose()}}var gt=U(18633),mt=U(95946),yt=U(23082),_t=U(96216),Et=U(44661),wt=U(88022);class Tt extends bt.H{constructor(k,B,U,F,G){super(k,B,U,F,G),this._currentElement=mt.a.Shadow,this._aoeDamageDisplayContainers=[]}setup(){this.cacheBoss(),this._sprite=V.q.instance.prodigy.create.element(this.sprites,0,0),this._spine=this.game.add.spine(0,0,Tt.SPINE_TAGS[mt.a.Shadow]),this.idle(),this._sprite.add(this._spine),this.complete=!0,this._onLoad.dispatch(),this._flashSpine=this.game.add.spine(0,0,H.Q.Spine_flash_json);this.game.state.get(yt.G.Battle).groupFarFront.addChild(this._flashSpine),this.setHitbox(z.t.getItem("boss",this.source.getID()).metadata.assets.default.hitbox);for(let k=0;k<3;++k)this._aoeDamageDisplayContainers[k]=new Et.V(this.game,this);this._aoeDamageDisplayContainers[1].offset={x:Gt.HORIZONTAL_TEAM_OFFSET,y:-Gt.VERTICAL_TEAM_OFFSET},this._aoeDamageDisplayContainers[2].offset={x:Gt.HORIZONTAL_TEAM_OFFSET,y:Gt.VERTICAL_TEAM_OFFSET}}switchElement(k,B){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U=!0){if(k!==this._currentElement){const F=this.game.state.get(yt.G.Battle),j=Tt.SPINE_TAGS[this._currentElement];this._currentElement=k,B&&(yield this.fadeOut());const $=this._spine;if(U&&(this._sprite.remove(this._spine,!0),V.q.instance.prodigy.load.removeSpine(j)),yield Promise.all([new Promise((B=>{V.q.instance.prodigy.load.assets(Tt.SPINE_TAGS[k],B)})),G.Egh.timeout(500)]),this._spine=this.game.add.spine(0,0,Tt.SPINE_TAGS[k]),this._sprite.add(this._spine),U||(this._sprite.remove($,!0),V.q.instance.prodigy.load.removeSpine(j)),F.rightStatusUI.setElement(k),B)return this.fadeIn()}}))}idle(){this._spine.setAnimationByName(0,"idle",!0)}attack(){pt.R.prototype.attack.call(this),this._spine.setAnimationByName(0,"attack",!1),this._spine.addAnimationByName(0,"idle",!0),this._spine.setToSetupPose()}fadeOut(){return(0,F.sH)(this,void 0,void 0,(function*(){this._spine.setAnimationByName(0,"changeOut",!1),this._flashSpine.x=this.x+Tt.FLASH_OFFSET.x,this._flashSpine.y=this.y+Tt.FLASH_OFFSET.y,this._flashSpine.setToSetupPose(!0),this._flashSpine.setAnimationByName(0,"changeOut",!1),this._flashSpine.visible=!0,yield Promise.all([new Promise((k=>{this._spine.onComplete.addOnce(k)})),new Promise((k=>{this._flashSpine.onComplete.addOnce(k)}))])}))}fadeIn(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._spine.setAnimationByName(0,"changeIn",!1),this._spine.addAnimationByName(0,"idle",!0),this._spine.setToSetupPose(),this._flashSpine.setToSetupPose(!0),this._flashSpine.setAnimationByName(0,"changeIn",!1),this._flashSpine.onComplete.addOnce((()=>{this._flashSpine.visible=!1})),new Promise((k=>{this._spine.onComplete.addOnce(k)}))}))}die(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._spine.setAnimationByName(0,"death",!1),new Promise((k=>{this._spine.onComplete.addOnce(k)}))}))}resurrect(){return(0,F.sH)(this,void 0,void 0,(function*(){yield new Promise((k=>{V.q.instance.prodigy.load.assets(Tt.SPINE_TAGS[mt.a.Shadow],k)}));const k=()=>{_t.M.radialCloud(this.game,this,Tt.SAND_CLOUD_OFFSET.x,Tt.SAND_CLOUD_OFFSET.y,Tt.SAND_CLOUD_RADIUS,wt._.Boss_aspen_extras_json,"purple-cloud"),_t.M.radialCloud(this.game,this,Tt.SAND_CLOUD_OFFSET.x,Tt.SAND_CLOUD_OFFSET.y,Tt.SAND_CLOUD_RADIUS,wt._.Boss_aspen_extras_json,"purple-cloud")};let B=!1;for(let U=Tt.SAND_CLOUD_COUNT;U>0||!B;--U)k(),U===Tt.SAND_CLOUD_COUNT-Tt.SAND_CLOUD_BOSS_SPAWN&&this.switchElement(mt.a.Shadow,!1,!1).then((()=>{B=!0})),yield G.Egh.timeout(Tt.SAND_CLOUD_INTERVAL);return this._spine.setAnimationByName(0,"reveal",!1),new Promise((k=>{this._spine.onComplete.addOnce((()=>{this._spine.setAnimationByName(0,"idle",!0),k()}))}))}))}showAoeDamage(k,B){const U=k.damage,F=Math.floor(U/3),G=U-2*F;for(let $=0;$<3;++$)this._aoeDamageDisplayContainers[$].showDamage(j.merge({},k,{damage:2!==$?F:G}),!1,0===$?B:void 0)}}Tt.SAND_CLOUD_RADIUS=900,Tt.SAND_CLOUD_COUNT=40,Tt.SAND_CLOUD_BOSS_SPAWN=30,Tt.SAND_CLOUD_OFFSET={x:50,y:-100},Tt.SAND_CLOUD_INTERVAL=50,Tt.FLASH_OFFSET={x:0,y:-150},Tt.SPINE_TAGS={shadow:H.Q.Default_boss_18_json,fire:H.Q.Fire_boss_18_json,water:H.Q.Water_boss_18_json,plant:H.Q.Plant_boss_18_json,ice:H.Q.Ice_boss_18_json,storm:H.Q.Storm_boss_18_json};var St=U(37946);class At extends St.v{setup(){super.setup(),this.setHitbox(z.t.getItem("boss",21).metadata.assets.default.hitbox)}}var Ct=U(99687);class Ot extends bt.H{constructor(k,B,U,F,G){super(k,B,U,F,G)}setup(){this.cacheBoss();const k=V.q.instance.prodigy.create.element(this.sprites,0,0);this._spine=this.game.add.spine(0,0,Ot.BOSS_GLACIAS_ASSET),this.idle(),k.add(this._spine),this.complete=!0,this._onLoad.dispatch(),this.setHitbox(z.t.getItem("boss",this.source.getID()).metadata.assets.default.hitbox)}getListOfAssets(){const k=bt.H.getAssets(this.source);return k.push(Ot.BOSS_GLACIAS_ASSET),k}idle(){this._spine.setAnimationByName(0,"idle",!0),this._spine.setToSetupPose()}attack(){pt.R.prototype.attack.call(this),this._spine.setAnimationByName(0,"attack",!1),this._spine.addAnimationByName(0,"idle",!0),this._spine.setToSetupPose()}}Ot.BOSS_GLACIAS_ASSET=H.Q.Default_boss_20_json;class It extends bt.H{constructor(k,B,U,F,G){super(k,B,U,F,G)}setup(){this.cacheBoss();const k=V.q.instance.prodigy.create.element(this.sprites,0,0);this.spine=this.game.add.spine(0,0,It.BOSS_OLD_ONE_ASSET),this.idle(),k.add(this.spine),this.showName("Old One"),this.nameText.GameObject.legacyTransform.y=-430,this.nameText.GameObject.legacyTransform.x-=10,this.visible=!0}getListOfAssets(){const k=bt.H.getAssets(this.source);return k.push(It.BOSS_OLD_ONE_ASSET),k}idle(){this.spine.setAnimationByName(0,"idle",!0),this.spine.setToSetupPose()}attack(){pt.R.prototype.attack.call(this),this.spine.setAnimationByName(0,"attack",!1),this.spine.addAnimationByName(0,"idle",!0),this.spine.setToSetupPose()}}It.BOSS_OLD_ONE_ASSET=H.Q.Default_boss_15_json;class Dt extends bt.H{constructor(k,B,U,F,G){super(k,B,U,F,G)}startLoad(){this.outOfDate=!1,this.loading=!0,V.q.instance.prodigy.load.assets(["spine-15"],this.setup.bind(this))}setup(){this.cacheBoss();const k=V.q.instance.prodigy.create.element(this.sprites,0,0);this.spine=this.game.add.spine(0,0,"spine-15"),this.visible=!0,this.idle(),k.add(this.spine),this.complete=!0,this.loading=!1}idle(){this.spine.setAnimationByName(0,"idle",!0),this.spine.setToSetupPose()}attack(){pt.R.prototype.attack.call(this),this.spine.setAnimationByName(0,"attack",!1),this.spine.addAnimationByName(0,"idle",!0),this.spine.setToSetupPose()}}var Rt=U(91207),Pt=U(51742);class Mt extends bt.H{constructor(k,B,U,F,G){U.modifiers.barrier={offset:{x:60,y:-160},scale:{x:2.33,y:2.33}},super(k,B,U,F,G)}setup(){this.cacheBoss(),V.q.instance.prodigy.load.assets(Pt.c.Sfx_attack_royal_roar);const k=V.q.instance.prodigy.create.element(this.sprites,0,0);this.spine=this.game.add.spine(100,-100,Rt.E.getTitanSpine(this.source.source.ID)),this.idle(),k.add(this.spine),k.scale.x=1.75,k.scale.y=1.75,this.setHitbox(z.t.getItem("titan",this.source.getID()).metadata.assets.default.hitbox),this.complete=!0,this.loading=!1,this._onLoad.dispatch()}idle(){this.spine.setAnimationByName(0,"idle",!0),this.spine.setToSetupPose()}attack(){pt.R.prototype.attack.call(this),this.spine.setAnimationByName(0,"attack",!1),this.spine.addAnimationByName(0,"idle",!0),this.spine.setToSetupPose()}retreat(){this.spine.setAnimationByName(0,"knockout",!1)}getListOfAssets(){return[Rt.E.getTitanSpine(this.source.source.ID)]}}var Nt,xt,Lt=U(32740),kt=U(63693),Bt=U(27625),Ut=U(50664),Ft=U(30226);!function(k){k[k.Middle=0]="Middle",k[k.Back=1]="Back",k[k.Front=2]="Front"}(Nt||(Nt={})),function(k){k.Front="pet-rescue-front",k.Back="pet-rescue-behind"}(xt||(xt={}));class Gt{set hasManagedEnergy(k){this._hasManagedEnergy=k}get hasManagedEnergy(){return this._hasManagedEnergy}constructor(k,B,U,F,$,H,V,W){this.team=[],this.enableComboAnimations=!0,this.bossTeam=!1,this.offScreenX=0,this.offScreenY=0,this.onScreenX=0,this.onScreenY=0,this.y=0,this.currentEnergy=0,this.maxEnergy=10,this._hasManagedEnergy=!1,this.playerEnergySource=null,this.onEnergyChangeStart=new G.HN0,this.onCurrentMemberSwitch=new G.HN0,this.onCurrentMemberHPChange=new G.HN0,this.onMoveCreatureOut=new G.HN0,this.onMoveCreatureIn=new G.HN0,this.onCreatureRanAway=new G.HN0,this._creatureContainerPosition=[],this.game=k,this.presortTeam(U),this.playerControlled=F,this.offScreenX=$,this.offScreenY=H,this.onScreenX=V,this.onScreenY=W;for(let G=0;G=Gt.MAX_TEAM_COUNT);G++)this.team.push(this.makeContainer(G,U[G],this.offScreenX));this.playerEnergySource=Gt.findFirstPlayer(this.team),this.registerSignals(),this.playerControlled&&j.forEach(this.team,(k=>{k instanceof Lt.M&&k.cacheAssets()})),K.A.get("GameConstants.Battle.SHOW_HITBOXES")&&this.team.forEach(((k,B)=>{k.loading?k.OnLoad.addOnce((()=>{this.drawBounds(B)})):this.drawBounds(B)}))}makeContainer(k,B,U){let F,$;const H=this.game.state.getCurrentState();let W;if(1===k?($=this.offScreenY-Gt.VERTICAL_TEAM_OFFSET,F=H.groupBack):2===k?($=this.offScreenY+Gt.VERTICAL_TEAM_OFFSET,F=H.groupFront):($=this.offScreenY,F=H.groupMiddle),B instanceof ut.a){const k=V.q.instance.prodigy.create.player(F,B,1,U,$,this.playerControlled);k.forceWeaponVisual=!0,k.loadedCallback=()=>{k.hideName(),k.createHealthBar().getOverlay().scale.x=this.playerControlled?1:-1},W=k}else if(B instanceof dt.K){const k=V.q.instance.prodigy.create.character(F,B,1,U,$,!1);k.forceWeaponVisual=!0,k.loadedCallback=()=>{k.hideName(),k.createHealthBar().getOverlay().scale.x=this.playerControlled?1:-1},W=k}else if(B instanceof lt.R){const k=V.q.instance.prodigy.create.monster(F,B,2,U,$,!1);if(!this.playerControlled){V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.encounters.addToPetTimesBattled(B.data.ID)}k.loadedCallback=k=>{j.includes([130,131,132,133],k.source.data.ID)&&(k.battleScale=1),k.sprites.scale.x=k.battleScale,k.sprites.scale.y=k.battleScale,k.width=Math.round(k.width),k.height=Math.round(k.height),k.hideName(),k.createHealthBar().getOverlay().scale.x=this.playerControlled?1:-1},W=k}else if(B instanceof tt.t)W=V.q.instance.prodigy.create.cloudBoss(F,B,U,$,B.source.element),this.bossTeam=!0;else if(B instanceof J.b){const k=V.q.instance.prodigy.create.bonfireBoss(F,B,U,$);this.bossTeam=!0,k.scale.x=.75,k.scale.y=.75,W=k}else if(B instanceof rt.d){const k=new It(this.game,F,B,U-400,$);this.bossTeam=!0,W=k}else if(B instanceof ot.K){const k=new Dt(this.game,F,B,U-400,$);this.bossTeam=!0,W=k}else if(B instanceof st.x)W=V.q.instance.prodigy.create.forestBoss(F,B,U,$),this.bossTeam=!0;else if(B instanceof ct.A){const k=new Mt(this.game,F,B,U,$);k.flip(),this.bossTeam=!0,W=k}else if(B instanceof at.C)W=V.q.instance.prodigy.create.shiverchillBoss(F,B,U-350,$),W.flip(),this.bossTeam=!0;else if(B instanceof X.l){const k=V.q.instance.prodigy.create.aspenFrostBoss(F,B,U,$);W=k,B.setBossContainer(k),this.bossTeam=!0}else if(B instanceof Z.y)W=new gt.Z(this.game,F,B,U,$);else if(B instanceof nt.Y){const k=new Ot(this.game,F,B,U,$);W=k,B.setBossContainer(k),this.bossTeam=!0}else if(B instanceof it.e){const k=new At(this.game,F,ut.a.fromCharacter(this.game,B.bossCharacter),1,U,$,!1,{hideMount:!0});k.createHealthBar().getOverlay().scale.x=-1,W=k,B.setBossContainer(k)}else if(B instanceof ht.F)W=V.q.instance.prodigy.create.shadowWyrmBoss(F,B,U-350,$),W.flip(),B.setBossContainer(W),this.bossTeam=!0;else if(B instanceof et.u){const k=new Tt(this.game,F,B,U,$);W=k,B.setBossContainer(k),B.setTeam(this),this.bossTeam=!0}else if(B instanceof Q.B){if(52===B.source.ID)B.source.useShadowAssets=!0,W=V.q.instance.prodigy.create.forestBoss(F,B,U,$);else{const k=new vt(this.game,F,B,U,$,B.source.spineKey);k.flip(),W=k}this.bossTeam=!0}else if(B instanceof Y.s){const k=V.q.instance.prodigy.create.boss(F,B,U,$);this.bossTeam=!0,G.Aq$.isDefined(B.source.spriteOffsetY)&&(k.sprites.y+=B.source.spriteOffsetY),G.Aq$.isDefined(B.source.spriteOffsetX)&&(k.sprites.x+=B.source.spriteOffsetX),G.Aq$.isDefined(B.source.battleScale)&&(k.sprites.scale.x=B.source.battleScale,k.sprites.scale.y=B.source.battleScale),W=k}return W.startLoad(),W.flip(),W.pairs=[],W.visible=!1,W.getSource().isOpponent=!this.playerControlled,W.getSource().starsEarned=0,this.bossTeam&&W.createHealthBar(),W}static findFirstPlayer(k){const B=k.find((k=>k instanceof St.v&&k.isMainPlayer));return G.Aq$.isDefined(B)?B.source:null}getCurrentEnergy(){return this.currentEnergy}getMaxEnergy(){return this.maxEnergy}changeEnergy(k){this.currentEnergy=Math.min(this.currentEnergy+k,this.maxEnergy),this.currentEnergy<0&&(G.VyI.log(`Energy at ${this.currentEnergy} below 0. Clamping.`,G.$bb.Error),this.currentEnergy=0),this.playerControlled&&k<0&&(V.q.instance.prodigy.battle.battleStats.energyCost-=k),this.onEnergyChangeStart.dispatch(this.currentEnergy),this.updatePlayerEnergy()}setEnergy(k){this.currentEnergy=Math.min(k,this.maxEnergy),this.onEnergyChangeStart.dispatch(this.currentEnergy),this.updatePlayerEnergy()}updatePlayerEnergy(){G.Aq$.isDefined(this.playerEnergySource)&&this.playerEnergySource.setEnergy(this.getCurrentEnergy())}registerSignals(){for(let k=0;k=0;--U)for(;!this.team[U].complete;)yield G.Egh.timeout(10);const k=this.onRightSide()?Gt.HORIZONTAL_TEAM_OFFSET:-Gt.HORIZONTAL_TEAM_OFFSET,B=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;for(let U=0;U=Gt.MAX_TEAM_COUNT);U++){if(this.team[U].getSource().isKnockedOut())continue;const F=this.team[U];F.visible=!0;const G=this.onScreenX+(U===Nt.Middle?0:k);F.walkIntoBattle?F.speed=10:F.x=G,this.team[U].setPath([{x:G,y:F.y}],(()=>{F===B.playerContainer&&B.playerContainer.stopHeavy()}))}this.enableComboAnimations&&(this.game.broadcaster.broadcast(ft.J3.PvpComboMeterMoveIn,this,[]),this.enableComboAnimations=!1),this.onCurrentMemberSwitch.dispatch(this.getCurrent().source)}))}onRightSide(){return this.offScreenX>=this.game.width}movePlayerIn(k,B){G.Aq$.isDefined(B)&&(B.complete?(this.team[0]=B,this.getCurrent().visible=!0,this.getCurrent().speed=10,this.onCurrentMemberSwitch.dispatch(this.getCurrent().source),this.enableComboAnimations&&(this.game.broadcaster.broadcast(ft.J3.PvpComboMeterMoveIn,this,[]),this.enableComboAnimations=!1),this.getCurrent().walkIntoBattle?(this.getCurrent().speed=10,this.getCurrent().setPath([{x:this.onScreenX,y:this.getCurrent().y}],k)):(this.getCurrent().x=this.onScreenX,this.getCurrent().y=this.onScreenY,this.getCurrent().setPath([{x:this.onScreenX,y:this.getCurrent().y}],k)),this.onMoveCreatureIn.dispatch()):this.game.time.events.addTimer(10,this.movePlayerIn.bind(this,k,B),this))}movePlayerOut(k,B,U=!1){B.speed=30,B.setPath([{x:this.offScreenX+(this.offScreenX<0?-40:40),y:B.y}],(()=>{U&&(B.alpha=0),null==k||k()}),4),B===this.getCurrent()&&this.onMoveCreatureOut.dispatch()}swapPlayerIn(k,B){const U=this.team[k];this.jumpAnimation(U,this.onScreenX,this.onScreenY,B),this.swapCurrent(k),this.onCurrentMemberSwitch.dispatch(this.getCurrent().source)}swapPlayerOut(k,B){this.jumpAnimation(this.getCurrent(),k,B)}swapCurrent(k){const B=this.getCurrent();this.team[0]=this.team[k],this.team[k]=B}jumpAnimation(k,B,U,F){const j=Math.min(k.y,U)-75;this.game.add.tween(k,this).to({x:B},500,G.GS3.Linear.None,!0);const $=this.game.add.tween(k,this).to({y:U},250,G.GS3.Quadratic.In,!1);$.onTweenComplete.add((()=>{q.l.sortChildren(k.parent,"y",W.W.SORT_ASCENDING)})),G.Aq$.isDefined(F)&&$.onTweenComplete.add(F),this.game.add.tween(k,this).to({y:j},250,G.GS3.Quadratic.Out,!0).chain($)}fakeSwap(k,B,U){this.jumpAnimation(k,B.x,B.y),this.jumpAnimation(B,k.x,k.y,U)}swapPlayersHop(k,B){const U=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=this.team[B];if(this.getCurrent()&&!this.getCurrent().isDefeated()){const U=F.parent;this.getCurrent().parent.addChild(F),U.addChild(this.getCurrent()),this.swapPlayerOut(F.x,F.y),this.swapPlayerIn(B,k)}else{const U=this.game.state.getCurrentState();U.groupMiddle&&U.groupMiddle.addChild(F),this.swapPlayerIn(B,k)}const G=this.team[B];V.q.instance.prodigy.gameContainer.get("c47-20b6").battle.sendBattlePositionChangedEvent({team:this.playerControlled?kt.B1.Player:kt.B1.Opponent,name:F.getSource().getName()===U.getName()?"Player":F.getSource().getName(),health:F.getSource().getCurrentHearts(),character_2_name:G.getSource().getName()===U.getName()?"Player":G.getSource().getName(),character_2_health:G.getSource().getCurrentHearts(),position_new:kt.Io.Front,position_old:Object.values(kt.Io)[B],automatic:!this.playerControlled}),this.onCurrentMemberSwitch.dispatch(this.getCurrent().source)}failRun(k){const B=(k,B)=>{for(let U=0;U=Gt.MAX_TEAM_COUNT);U++){const k=this.team[U];k.speed=10,0===U?k.setPath([{x:k.x+200,y:null}],B):k.setPath([{x:k.x+200,y:null}])}};V.q.instance.prodigy.audio.playSFX(8,"run"),this.getCurrent().speed=40;for(let U=0;U=Gt.MAX_TEAM_COUNT);U++)0===U?this.team[U].setPath([{x:this.team[U].x-200,y:null}],B.bind(this,this.team[U],k),4):this.team[U].setPath([{x:this.team[U].x-200,y:null}],B.bind(this,this.team[U],void 0),4)}runAway(k=this.getCurrent(),B){if(k.captured)return;k.ran=!0;const U=()=>{B&&B()};if(this.onCreatureRanAway.dispatch(k.source),k.shouldPlayRetreatOnDefeat())k.retreat(U);else if(this.bossTeam){const B=this.game.add.tween(k,this).to({alpha:0},500,G.GS3.Linear.None);B.onTweenComplete.add(U),B.start()}else V.q.instance.prodigy.audio.playSFX(8,"run"),k.speed=40,k.flip(),k.moonwalk(),this.game.time.events.addTimer(500,this.movePlayerOut.bind(this,U,k,!0),this)}rescue(k){this.getCurrent().captured=!0,this.rescueCelebrationAnimation(k)}rescueCelebrationAnimation(k){const B=this.getCurrent(),U=this.getCurrent().parent,F=new G.oWr({color:Number.parseInt("FFFFFF",16),tintIntensity:0,blend:G.PzZ.Lighten});B.sprites.filters=[F];const j=this.game.add.tween(F,this).to({tintIntensity:1},900,G.GS3.Quadratic.In,!1,1300),$=this.game.add.tween(F,this).to({tintIntensity:0},300,G.GS3.Quadratic.In,!1,900);j.chain($),j.start();const V=new Bt.I(this.game,U);V.position.set(B.x,B.y),U.swapChildren(B,V),V.populate({spineKey:H.Q.Spine_pet_battle_rescue_json}),V.playAnimation(xt.Back,!1);const W=new Bt.I(this.game,B);W.populate({spineKey:H.Q.Spine_pet_battle_rescue_json}),W.playAnimation(xt.Front,!1,(()=>{this.game.time.events.addTimer(0,(()=>{this.game.state.get(yt.G.Battle).groupFront.addChild(B),this.game.add.tween(B.sprites,this).to({alpha:0},800,G.GS3.Quadratic.In,!0);const U=new Bt.I(this.game,B);U.populate({spineKey:H.Q.Spine_battle_transport_json}),U.playAnimation("exit",!1,k)}),this)}))}doPetRescueAnimation(k){this.game.state.get(yt.G.Battle).groupFront.addChild(this.getCurrent()),V.q.instance.prodigy.audio.playSFX(8,"run"),this.getCurrent().speed=40,this.getCurrent().moonwalk(),this.game.add.tween(this.getCurrent(),this).to({x:this.getCurrent().x+20},1500,G.GS3.Linear.None,!0).onTweenComplete.add((()=>{this.getCurrent().speed=30,this.getCurrent().setPath([{x:-100,y:this.onScreenY+Gt.VERTICAL_TEAM_OFFSET+this.getCurrent().height/4},{x:380,y:this.onScreenY+Gt.VERTICAL_TEAM_OFFSET+this.getCurrent().height/4}],k,4)}),this)}runAwayTeam(k){if(!G.Aq$.isDefined(this.getCurrent().captured))if(this.bossTeam)this.game.add.tween(this.getCurrent(),this).to({alpha:0},500,G.GS3.Linear.None).start();else{V.q.instance.prodigy.audio.playSFX(8,"run");for(let k=0;k=Gt.MAX_TEAM_COUNT);k++)this.team[k].speed=40,this.team[k].flip(),this.team[k].moonwalk(),this.team[k].ran=!0,this.game.time.events.addTimer(500,this.movePlayerOut.bind(this,null,this.team[k]),this);G.Aq$.isDefined(k)&&this.game.time.events.addTimer(500,k,this)}}runAwayDefeated(k){const B=this.getUnRun();let U=!1;for(let F=0;FU)&&(B=F,U=$)}}return B}getDrops(){let k=[];for(let U=0;Uk.getSource().isKnockedOut()&&!k.captured&&!k.ran))}getCurrent(){var k;return null!==(k=this.getContainerAtOverriddenPosition(Nt.Middle))&&void 0!==k?k:this.team[0]}getCurrentSource(){return this.getCurrent().source}getCreatures(k=!1){const B=[];for(const U of this.team)U.captured&&!k||B.push(U.source);return B}getLiving(){const k=[],B=this.getTeamSize();for(let U=0;U{F.sprites.scale.x=-Math.abs(F.sprites.scale.x)}),2e3),F.visible=!0,this.team[k]=F}drawBounds(k){let B=16711680;k===Nt.Back?B=65280:k===Nt.Front&&(B=255);const U=this.team[k],F=new $.Rectangle(U.getHitboxLeft(),U.getHitboxTop(),U.getHitboxWidth(),U.getHitboxHeight());Ut.F.drawBounds(this.game,U.sprites,F,B)}destroy(){this.unregisterAllSignals(),this.game=null,this.playerEnergySource=null,j.forEach(this.team,(k=>{k.destroy()})),this.team=[]}getTeamPositionForContainer(k){const B=this.getOverriddenPositionForContainer(k);return B?B.position:this.team.indexOf(k)}overrideTeamPositionForContainer(k,B){const U=this.getOverriddenPositionForContainer(k);U?U.position=B:this._creatureContainerPosition.push({container:k,position:B})}getContainerAtOverriddenPosition(k){var B;return null===(B=this._creatureContainerPosition.find((B=>B.position===k)))||void 0===B?void 0:B.container}resetContainerOverriddenPosition(k){const B=this._creatureContainerPosition.findIndex((B=>B.container===k));B>-1&&this._creatureContainerPosition.splice(B,1)}resetOverriddenPositions(){this._creatureContainerPosition=[]}getOverriddenPositionForContainer(k){return this._creatureContainerPosition.find((B=>B.container===k))}}Gt.MAX_TEAM_COUNT=3,Gt.HORIZONTAL_TEAM_OFFSET=130,Gt.VERTICAL_TEAM_OFFSET=110},94393:(k,B,U)=>{"use strict";U.d(B,{R:()=>G,n:()=>ct});var F,G,j=U(8674),$=U(62459),H=U(79687),V=U(95891),W=U.n(V),q=U(99625),K=U(36648),z=U(57797),Y=U(73678),Q=U(35120),X=U(53880),Z=U(65050),J=U(41674),tt=U(46784),et=U(21738),it=U(30065),st=U(76277),nt=U(71698),at=U(46902),rt=U(13956),ot=U(51540),ht=U(73797);!function(k){k.Xp="Xp",k.Currency="Currency",k.TitanShard="TitanShard",k.Springfest="Springfest",k.Summerfest="Summerfest",k.Pumpkinfest="Pumpkinfest",k.Winterfest="Winterfest",k.StarlightFestival="Starlight",k.MoonlightFestival="Moonlight",k.GenericFestival="Generic"}(G||(G={}));let ct=F=class{constructor(){this._festivalConfigs=[],this.ELEMENTAL_ZONES=[Y.A_.BONFIRE,Y.A_.FOREST,Y.A_.SHIPWRECK,Y.A_.SHIVERCHILL,Y.A_.SKYWATCH],this.INSTANCE_ZONES=[Y.A_.ARCHIVES,Y.A_.ASTRALTOWER,Y.A_.CRYSTALCAVERNS,Y.A_.DARKTOWER,Y.A_.EARTHTOWER,Y.A_.FIRETOWER,Y.A_.ICETOWER,Y.A_.LAMPLIGHT,Y.A_.STORMTOWER,Y.A_.WATERTOWER],this.lastFetchTime=0,this._eventMap={},this._meetsFeatureRequirement=!1,this._listeningForLevelUp=!1}awaitLoad(){return(0,j.sH)(this,void 0,void 0,(function*(){return Date.now()>this.lastFetchTime+18e5&&(this.lastFetchTime=Date.now(),this._fetchPromise=this.fetchData()),yield this._fetchPromise,this}))}fetchData(){return(0,j.sH)(this,void 0,void 0,(function*(){const{gameContainer:k}=Q.q.instance.prodigy,B=Q.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let U=(yield this.getEventDataRequest()).weeks;this._festivalConfigs=(yield this.getFestivalConfigRequest()).festivals,U=U.filter((({internal:k,accountIds:U})=>!k||U.split(",").some((k=>+k.trim()===B.userID)))),this._eventMap=W().groupBy(U,(({type:k})=>k));const G=F.FESTIVALS.findIndex((k=>this._eventMap[k])),j=k.get("e20-0fb0").player.daily,H=(0,st.G)(nt.o),V=k.get("db5-fb6e");if(this._meetsFeatureRequirement=yield V.meetsRequirements(69),G>=0&&H.enabled){const k=this._eventMap[F.FESTIVALS[G]];if(!k)return void $.VyI.log(`WeekendEvents.fetchData - No festival events found for ${F.FESTIVALS[G]}`,$.$bb.Error);const B=k[0];this._activeFestival={type:G,startDate:B.startDate,endDate:B.endDate,aboutScreen:B.aboutScreen,entityId:B.entityId,zone:B.zone},j.setFestival(B.id),this._eventMap=W().omit(this._eventMap,F.FESTIVALS)}else this._activeFestival=void 0,this._meetsFeatureRequirement=!1,j.setFestival(0);this._listeningForLevelUp||(this._listeningForLevelUp=!0,Q.q.instance.game.broadcaster.addAppListener(ht.ig.AnyLevelUp,this.onPlayerLevelUp,this,ht.HG.WeekendEventsLevelUp,!0))}))}onPlayerLevelUp(){return(0,j.sH)(this,void 0,void 0,(function*(){if(!this._activeFestival||this._meetsFeatureRequirement)return;const{gameContainer:k}=Q.q.instance.prodigy,B=k.get("db5-fb6e");if(this._meetsFeatureRequirement=yield B.meetsRequirements(69),!this._meetsFeatureRequirement)return;k.get("99d-5e9e").completeRootTask().catch($.RQr.createHandler("Error completing festival root task and NONE events on level up")),Q.q.instance.prodigy.skin.applyFestival().then((()=>{Q.q.instance.game.broadcaster.broadcast(ht.Y1.HUDRevampButtonVisibilityRefreshRequested),Q.q.instance.game.broadcaster.broadcast(ht.Y1.CheckForHUDAttention)})).catch($.RQr.createHandler("Error initializing festival on level up"))}))}getActiveFestivalName(){var k;const B=null===(k=this.getActiveFestival())||void 0===k?void 0:k.type;return void 0!==B?F.FESTIVALS[B].toLowerCase():""}getFestivalConfig(){if(this._activeFestival&&this._activeFestival.type>=0){const k=this._activeFestival.type;return W().findLast(this._festivalConfigs,(B=>B.name===F.FESTIVALS[k]))}}handleFestivalProgressPopup(k,B){var U,F,G,j,H,V,W,Y,it;if(!this.getActiveFestival())return void(null==k||k());const st=Q.q.instance.prodigy.open.menus;let nt=st.length;window.setTimeout((()=>{nt=st.length}));const at=()=>{if(st.length<=nt)null==k||k();else{const B=st[st.length-1];if(B instanceof et.y){const k=B.onClose;B.onClose=()=>{at(),null==k||k()}}else null==k||k()}},rt=Q.q.instance.prodigy.gameContainer.get("99d-5e9e").getAllProgressTaskCounts(),ot=this.getFestivalConfig(),ht=Q.q.instance.prodigy.gameContainer.get($.$Bt.LocalizationService),ct=ht.getText("X_REWARDS",(null===(U=null==ot?void 0:ot.tintableBanner)||void 0===U?void 0:U.titleText)?ht.getText(null===(F=null==ot?void 0:ot.tintableBanner)||void 0===F?void 0:F.titleText):ht.getText("FESTIVAL")),dt=Q.q.instance.prodigy.open.prefabMenu(q.l.FestivalProgressMenu,at,!0,!0,!0,{[X.d.StoryTabActive]:(null!==(G=rt[z.xK.Story])&&void 0!==G?G:0)>0,[X.d.CoopTabActive]:(null!==(j=rt[z.xK.Coop])&&void 0!==j?j:0)>0,[X.d.SeasonTabActive]:(null!==(H=rt[z.xK.Season])&&void 0!==H?H:0)>0,[X.d.RiftsTabActive]:(null!==(V=rt[z.xK.Rifts])&&void 0!==V?V:0)>0,[X.d.MemberTabActive]:(null!==(W=rt[z.xK.Member])&&void 0!==W?W:0)>0,[X.d.BackgroundImageGuid]:null!==(Y=null==ot?void 0:ot.backgroundImageGuid)&&void 0!==Y?Y:K.q.Background_starlight,[X.d.TitleText]:ct,[X.d.BannerFillColor]:null===(it=null==ot?void 0:ot.tintableBanner)||void 0===it?void 0:it.bannerFillColor},Object.assign({interfaceName:tt.B.FestivalProgressionWindow,interfaceType:J.Wm.Modal,originType:J.$N.AutoSurfaced,originID:"festival",instanceType:Z.N.Interface},B),!0,!1,void 0,!1,!0);return dt.createContainer=!1,dt}isMultiZone(k){return k===at.Q.Global||k===at.Q.AllZones||k===at.Q.AllInstances}getZoneDisplayName(k){const B=Q.q.instance.prodigy.gameContainer.get($.$Bt.LocalizationService);return k===at.Q.AllInstances?B.getText("ALL_NON_ELEMENTAL_ZONES"):k===at.Q.AllZones?B.getText("ALL_ELEMENTAL_ZONES"):k===at.Q.Global?B.getText("PARENT_ATTACH_WORLDS"):Q.q.instance.prodigy.world.getZone(k).name}getRandomZoneID(k){const B=this.ELEMENTAL_ZONES,U=this.INSTANCE_ZONES;return k===at.Q.AllZones?$.lv2.getRandomItem(B):k===at.Q.AllInstances?$.lv2.getRandomItem(U):$.lv2.getRandomItem(B.concat(U))}getTitanShardMultiplier(){var k,B;return null!==(B=null===(k=this._eventMap[G.TitanShard])||void 0===k?void 0:k[0].bonusMultiplier)&&void 0!==B?B:1}getActiveFestival(){return this._meetsFeatureRequirement?this._activeFestival:void 0}getActiveFestivalWithoutRestrictions(){return this._activeFestival}getEvents(k){var B;return null!==(B=this._eventMap[k])&&void 0!==B?B:[]}getMultiplier(k,B){var U,F,G;const j=this.ELEMENTAL_ZONES.includes(k);return null!==(G=null===(F=null===(U=this._eventMap[B])||void 0===U?void 0:U.find((({zone:B})=>B===k||B===at.Q.Global||B===at.Q.AllZones&&j||B===at.Q.AllInstances&&!j)))||void 0===F?void 0:F.bonusMultiplier)&&void 0!==G?G:1}getEventDataRequest(){return(0,j.sH)(this,void 0,void 0,(function*(){const k=yield this._networkHandler.getCurrentEventsData();return k||($.RQr.createHandler("Error loading the weekend events entity"),{weeks:[]})}))}getFestivalConfigRequest(){return(0,j.sH)(this,void 0,void 0,(function*(){const k=yield this._networkHandler.getFestivalConfigData();return k||($.RQr.createHandler("Error loading the festival config entity"),{festivals:[]})}))}getFestivalIcon(){const k=this.getFestivalConfig();switch(null==k?void 0:k.name){case F.FESTIVALS[it.Q.Springfest]:return K.q.Hud_springfest;case F.FESTIVALS[it.Q.Pumpkinfest]:return K.q.Hud_pumpkinfest;case F.FESTIVALS[it.Q.StarlightFestival]:return K.q.Hud_starlight;case F.FESTIVALS[it.Q.Summerfest]:return K.q.Hud_summerfest;case F.FESTIVALS[it.Q.Winterfest]:return K.q.Hud_winterfest;case F.FESTIVALS[it.Q.MoonlightFestival]:return K.q.Hud_moonlightfest;case F.FESTIVALS[it.Q.GenericFestival]:default:return $.VyI.log("No valid active festival found when fetching HUD icon",$.$bb.Warning),""}}};ct.REQUEST_TIMEOUT_DURATION_MS=1e4,ct.REQUEST_RETRY_COUNT=5,ct.FESTIVALS=[G.Springfest,G.Summerfest,G.Pumpkinfest,G.Winterfest,G.StarlightFestival,G.MoonlightFestival,G.GenericFestival],(0,j.Cg)([(0,rt.b)("4fd-fef7"),(0,j.Sn)("design:type",ot.v)],ct.prototype,"_networkHandler",void 0),ct=F=(0,j.Cg)([(0,H.injectable)()],ct)},95946:(k,B,U)=>{"use strict";var F;U.d(B,{a:()=>F}),function(k){k.Astral="astral",k.Fire="fire",k.Ice="ice",k.Physical="physical",k.Plant="plant",k.Shadow="shadow",k.Storm="storm",k.Water="water",k.Neutral="neutral",k.Earth="earth",k.Wizard="wizard",k.Mech="mech"}(F||(F={}))},52239:(k,B,U)=>{"use strict";var F;U.d(B,{i:()=>F}),function(k){k.beam="beam",k.projectile="projectile",k.aoe="aoe",k.aoa="aoa"}(F||(F={}))},29949:(k,B,U)=>{"use strict";U.d(B,{I:()=>H});var F=U(62459),G=U(95891),j=U(77938),$=U(52239);class H{constructor(k){this.spellData=j.t.getItem("spell",k)}getEasing(k){if(F.Aq$.isDefined(this.spellData.metadata.animationData[k])){const B=this.spellData.metadata.animationData[k].split(".");return F.GS3[B[0]][B[1]]}return F.GS3.Linear.None}getName(){return this.spellData.data.name}getInt(k){return F.Aq$.isDefined(this.spellData.metadata.animationData[k])?parseInt(this.spellData.metadata.animationData[k]):0}getValue(k){return this.spellData.metadata.animationData[k]}isSingleShot(){return!G.includes([$.i.aoe,$.i.aoa],this.spellData.metadata.animationData.animationType)}getElement(){return this.spellData.data.element}}},2221:(k,B,U)=>{"use strict";U.d(B,{f:()=>H});var F=U(8674),G=U(62459),j=U(95891),$=U(35120);class H extends G.s3P{getShardCount(){const k=j.find(this.battleTeams,(k=>1===k.ID)).IsDefeated()?this.winningTiers:this.losingTiers,B=$.q.instance.prodigy.gameContainer.get("12b-405a").getTitanShardMultiplier();for(let U=0;U=k[U].questionsCorrect)return Math.floor(k[U].shards*B);return 0}}(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],H.prototype,"battleTeams",void 0),(0,F.Cg)([(0,G.fFd)("LosingPrizeTiers"),(0,F.Sn)("design:type",Array)],H.prototype,"losingTiers",void 0),(0,F.Cg)([(0,G.fFd)("WinningPrizeTiers"),(0,F.Sn)("design:type",Array)],H.prototype,"winningTiers",void 0),(0,F.Cg)([(0,G.fFd)("BattleStats"),(0,F.Sn)("design:type",Object)],H.prototype,"stats",void 0)},70215:(k,B,U)=>{"use strict";var F;U.d(B,{$:()=>F}),function(k){k[k.MaxHearts=0]="MaxHearts",k[k.Level=1]="Level",k[k.Spell=2]="Spell",k[k.Stars=3]="Stars"}(F||(F={}))},35997:(k,B,U)=>{"use strict";U.d(B,{k:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this.mods={},this.onBattleStart=new G.HN0,this.onEscape=new G.HN0,this.onVictory=new G.HN0,this.onDefeat=new G.HN0}startBattle(){this.onBattleStart.dispatch();const k=j.q.instance.prodigy.world.getCurrentZone(),B=j.q.instance.prodigy.world.getZone(k).getBattleMods(),U=Object.assign(Object.assign(Object.assign({},this.mods),{pets:this.mods.pets?[...this.mods.pets]:void 0}),B);j.q.instance.prodigy.battle.start(U,(()=>this.onEscapeCallback()),(()=>this.onVictoryCallback()),(()=>this.onDefeatCallback()),U.onFaint)}setMods(k){this.mods=k}onEscapeCallback(){this.onEscape.dispatch(),this.disposeSignals(),this.onEscapeTeleport&&this.teleport(this.onEscapeTeleport)}onVictoryCallback(){this.onVictory.dispatch(),this.disposeSignals(),this.onVictoryTeleport&&this.teleport(this.onVictoryTeleport)}onDefeatCallback(){this.onDefeat.dispatch(),this.disposeSignals(),this.onDefeatTeleport&&this.teleport(this.onDefeatTeleport)}disposeSignals(){this.onEscape.dispose(),this.onVictory.dispose(),this.onDefeat.dispose()}teleport(k){var B,U;j.q.instance.prodigy.world.it(k.mapKey,null===(B=k.coordinates)||void 0===B?void 0:B.x,null===(U=k.coordinates)||void 0===U?void 0:U.y)}destroy(){this.onBattleStart.dispose(),super.destroy()}};(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],H.prototype,"mods",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onBattleStart",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onEscape",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onVictory",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onDefeat",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],H.prototype,"onEscapeTeleport",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],H.prototype,"onVictoryTeleport",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],H.prototype,"onDefeatTeleport",void 0),H=(0,F.Cg)([(0,G.EVk)("StartBattle",$.Y.battle)],H)},76007:(k,B,U)=>{"use strict";U.d(B,{k:()=>$});var F=U(8674),G=U(48417),j=U(76546);class $ extends j.D{constructor(){super(...arguments),this._getXpPromises={}}getPastUnclaimedRewards(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(G.D.BattlePass.GetPastUnclaimedRewards,{})}))}claimPastUnclaimedReward(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(G.D.BattlePass.ClaimPastRewards,{})}))}completeExpiredClaimQuests(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(G.D.BattlePass.CompleteExpiredClaimTasks,{questId:k,claimableTaskIds:B})}))}getBattlePassXpData(k){return(0,F.sH)(this,void 0,void 0,(function*(){return void 0===this._getXpPromises[k]&&(this._getXpPromises[k]=this.makeCloudscriptRequest(G.D.BattlePass.GetBattlePassXpData,{questId:k}),this._getXpPromises[k].finally((()=>this._getXpPromises[k]=void 0))),this._getXpPromises[k]}))}callDebugRoute(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return Promise.resolve()}))}callBattlePassSchedulerRouteDebug(){return(0,F.sH)(this,void 0,void 0,(function*(){return Promise.resolve()}))}}},9475:(k,B,U)=>{"use strict";U.d(B,{S:()=>it});var F=U(8674),G=U(62459),j=U(88022),$=U(26738),H=U(68834),V=U(58776),W=U(62886),q=U(29891),K=U(24522),z=U(66582),Y=U(15821),Q=U(13956),X=U(68152),Z=U(56567),J=U(38156),tt=U(1959),et=U(91207);class it{constructor(k,B,U,F){this._experimentFeatureTaskIds=[],this._mythicalEpicPetIds=[],this._questId=k,this._metaData=B,this._tasks=U,this.dataVersion=F}parseTaskData(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F={};let G=1;const j={},H=new Z.f;for(const K of k)if(!K.taskDefinition.metadata.experimentTaskId||this._experimentFeatureTaskIds.includes(K.taskDefinition.metadata.experimentTaskId)){if(K.taskDefinition.metadata.tier){const k=this.handleTierTask(K,B,F);(null==k?void 0:k.isCompleted)&&(G=Math.max(G,k.tier))}K.taskDefinition.metadata.questGoalTaskType&&(yield this.handleQuestGoalTask(K,B,j,H)),!this._ftueTaskData&&K.taskDefinition.metadata.isFtue&&(this._ftueTaskData={buttonId:K.taskDefinition.completionRequirements.data.id,isCompleted:K.taskProgress.status===V.t.COMPLETE}),K.taskDefinition.metadata.tierTaskType!==$.m.INFINITE_GOAL&&K.taskDefinition.metadata.tierTaskType!==$.m.INFINITE_CLAIM||this.handleInfiniteTierTask(K,U),K.taskProgress.status===V.t.COMPLETE&&K.taskDefinition.metadata.isExperimentGate&&this._experimentFeatureTaskIds.push(K.taskID)}this._infiniteTierData&&(this._infiniteTierData.tier=Object.keys(F).length+1,this._infiniteTierData.battlePassXpRequired=F[this._infiniteTierData.tier-1].battlePassXpRequired,F[this._infiniteTierData.tier]=this._infiniteTierData),F[Math.min(G+1,Object.keys(F).length)].isCurrentTier=!0,this._tiers=F,this._questGoals=Object.values(j);let W=U.total,q=0;for(const k of Object.values(this._tiers))k.isInfiniteTier||(k.targetProgress=k.battlePassXpRequired-q,k.currentProgress=Math.min(k.targetProgress,W),q+=k.targetProgress,W-=k.currentProgress)}))}handleTierTask(k,B,U){var F,j,H,W;const q=k.taskDefinition.metadata.tier,z=k.taskDefinition.metadata.tierTaskType;if(!q||!z)return G.VyI.log(`Missing tier metadata for task ${k.taskID} in quest ${k.questID}`,G.$bb.Error),null;U[q]||(U[q]={tier:q,isCurrentTier:!1,isCompleted:!1,targetProgress:0,currentProgress:0,topPremiumReward:null,bottomPremiumReward:null,freeReward:null,battlePassXpRequired:0,isInfiniteTier:!1});const Q=U[q];switch(z){case $.m.GOAL:Q.isCompleted=k.taskProgress.status===V.t.COMPLETE;const U=null===(F=k.taskDefinition.preconditions)||void 0===F?void 0:F.find((k=>k.type===K.n.HAS_TOTAL_BATTLE_PASS_XP));Q.battlePassXpRequired=null!==(H=null===(j=null==U?void 0:U.data)||void 0===j?void 0:j.battlePassXpRequired)&&void 0!==H?H:0;const q=null===(W=null==U?void 0:U.data)||void 0===W?void 0:W.battlePassXpId;q&&!this._battlePassXpId&&(this._battlePassXpId=q);break;case $.m.PREMIUM_REWARD_CLAIM:Q.bottomPremiumReward?(Q.topPremiumReward=this.parseRewardData(k,B),(0,X.v)(Y.A.isDefined(Q.topPremiumReward.itemDrop),`Reward is missing item drop data. ${k.taskID}`)):(Q.bottomPremiumReward=this.parseRewardData(k,B),(0,X.v)(Y.A.isDefined(Q.bottomPremiumReward.itemDrop),`Reward is missing item drop data. ${k.taskID}`));break;case $.m.FREE_REWARD_CLAIM:Q.freeReward=this.parseRewardData(k,B),(0,X.v)(Y.A.isDefined(Q.freeReward.itemDrop),`Reward is missing item drop data. ${k.taskID}`);break;case $.m.PREMIUM_GATE:break;default:G.VyI.log(`BattlePassQuestData: Unknown tier task type: ${z}. QuestID: ${k.questID}. TaskID: ${k.taskID}`,G.$bb.Warning)}return Q}handleInfiniteTierTask(k,B){var U,F,G,j,H;switch(this._infiniteTierData||(this._infiniteTierData={tier:0,isCurrentTier:Y.A.isDefined(B.currentInfinite),isCompleted:!1,targetProgress:0,currentProgress:0,timesCompleted:void 0,timesClaimed:void 0,battlePassXpRequired:0,isInfiniteTier:!0,freeReward:{rewardId:"",itemDrop:this._metaData.infiniteTier.reward,isMystery:!1,claimed:!1,claimable:!1,membershipTier:z._$.NonMember}}),k.taskDefinition.metadata.tierTaskType){case $.m.INFINITE_GOAL:this._infiniteTierData.targetProgress=k.taskDefinition.preconditions[0].data.infiniteXpRequired,this._infiniteTierData.currentProgress=null!==(U=B.currentInfinite)&&void 0!==U?U:0,this._infiniteTierData.timesCompleted=null!==(G=null===(F=k.taskProgress.data)||void 0===F?void 0:F.timesCompleted)&&void 0!==G?G:0;break;case $.m.INFINITE_CLAIM:this._infiniteTierData.timesClaimed=null!==(H=null===(j=k.taskProgress.data)||void 0===j?void 0:j.progress)&&void 0!==H?H:0,this._infiniteTierData.freeReward.rewardId=k.taskDefinition.completionRequirements.data.id}Y.A.isDefined(this._infiniteTierData.timesCompleted)&&Y.A.isDefined(this._infiniteTierData.timesClaimed)&&(this._infiniteTierData.freeReward.claimable=this._infiniteTierData.timesCompleted>this._infiniteTierData.timesClaimed)}handleQuestGoalTask(k,B,U,j){return(0,F.sH)(this,void 0,void 0,(function*(){var F,V,W,q,z;const Q=k.taskDefinition.metadata.questGoalTaskType;if(!Q)return G.VyI.log(`Missing quest goal task type for task ${k.taskID} in quest ${k.questID}`,G.$bb.Error),null;let Z;Q===$.x.GOAL?Z=k.taskID:Q===$.x.CLAIM&&(Z=k.taskDefinition.prerequisites[0],(0,X.v)(Y.A.isDefined(Z),`Claim task is missing a prerequisite. ${k.taskID}`)),U[Z]||(U[Z]={goalTaskId:Z,claimTaskId:"",questType:"",questDescription:"",questGoalType:null,targetProgress:0,currentProgress:0,reward:null,hasStarted:!1,isExpired:!1,comingSoonDate:null,sortPriority:k.taskDefinition.metadata.sortPriority});const tt=U[Z];switch(Q){case $.x.GOAL:tt.goalTaskId=k.taskID,tt.questType=k.taskDefinition.metadata.questGoalType,tt.questGoalType=k.taskDefinition.completionRequirements.type,tt.targetProgress=k.taskDefinition.completionRequirements.data.target,tt.currentProgress=null!==(V=null===(F=k.taskProgress.data)||void 0===F?void 0:F.progress)&&void 0!==V?V:0,tt.questDescription=J.n.getQuestDescriptionFromDefinition(k.taskDefinition);const U=null!==(W=k.taskDefinition.metadata.questGoalName)&&void 0!==W?W:null;tt.questGoButtonAction=U?this.getGoButtonActionByName(U):this.getGoButtonActionByType(tt.questGoalType),tt.isMemberQuest=!1,tt.hasStarted=!0,tt.isExpired=!1;for(const B of k.taskDefinition.preconditions||[])B.type===K.n.DATE_AFTER&&(tt.hasStarted=yield j.check(K.n.DATE_AFTER,B.data)),B.type===K.n.DATE_BEFORE&&(tt.isExpired=!(yield j.check(K.n.DATE_BEFORE,B.data))),B.type===K.n.IS_MEMBER&&(tt.isMemberQuest=!0);const G=tt.questType===H.bm.Bonus&&!tt.hasStarted;tt.comingSoonDate=G?new Date(null===(z=null===(q=k.taskDefinition.preconditions)||void 0===q?void 0:q.find((k=>k.type===K.n.DATE_AFTER)))||void 0===z?void 0:z.data.date):null;break;case $.x.CLAIM:tt.claimTaskId=k.taskID,tt.reward=this.parseRewardData(k,B)}return tt}))}getGoButtonActionByName(k){let B;switch(k){case H.UA.BecomeAMember:B=H.Nz.BecomeAMember}return B}getGoButtonActionByType(k){let B;switch(k){case W.T.EVOLVE_PET:B=H.Nz.EvolvePet}return B}parseRewardData(k,B){var U,F;if(!k)return null;let G,j;const H=null!==(U=k.taskDefinition.onComplete)&&void 0!==U?U:[];for(const $ of H)$.type!==q.s.GOT_ITEM?$.type!==q.s.GIVE_ULTIMATE?$.type!==q.s.GIVE_BATTLE_PASS_XP||(G=$.data.xpToGive):(j={ID:$.data.id,type:"pet",N:1},this._mythicalEpicPetIds.push($.data.id)):j=$.data.itemDrops[0];(0,X.v)(Y.A.isDefined(j)||Y.A.isDefined(G),`Reward has no item drop or battle pass xp data. ${k.taskID}`);let W=z._$.NonMember;k.taskDefinition.metadata.tierTaskType===$.m.PREMIUM_REWARD_CLAIM&&(W=k.taskDefinition.metadata.isUltimate?z._$.MemberUltimateMath:z._$.MemberLevelUp);const K={rewardId:k.taskDefinition.completionRequirements.data.id,claimable:B.includes(k.taskDefinition.id),claimed:k.taskProgress.status===V.t.COMPLETE,isMystery:null!==(F=k.taskDefinition.metadata.isMystery)&&void 0!==F&&F,membershipTier:W};return j&&(K.itemDrop=j),G&&(K.battlePassXp=G),K}addQuantityToChaseItemData(k,B,U){var F;const G=U?1:null!==(F=k.N)&&void 0!==F?F:1,j=U?this.getMiniChaseItemsUltimate().find((k=>182===k.id&&"item"===k.type)):this.getMiniChaseItemsUltimate().find((B=>B.id===k.ID&&B.type===k.type));if(j&&(Y.A.isDefined(j.quantity)?j.quantity+=G:j.quantity=G),!B){const B=U?this.getMiniChaseItemsLevelUp().find((k=>182===k.id&&"item"===k.type)):this.getMiniChaseItemsLevelUp().find((B=>B.id===k.ID&&B.type===k.type));B&&(Y.A.isDefined(B.quantity)?B.quantity+=G:B.quantity=G)}}getStartDate(){return new Date(this._metaData.startDate).getTime()}getEndDate(){return new Date(this._metaData.endDate).getTime()}getQuestID(){return this._questId}getTasks(){return this._tasks}getNumTiers(){return Object.values(this._tiers).filter((k=>!k.isInfiniteTier)).length}getCurrentTierData(){var k;return null!==(k=Object.values(this._tiers).find((k=>k.isCurrentTier)))&&void 0!==k?k:this._tiers[0]}getCurrentTier(){var k;return this.hasInfiniteTier()&&(null===(k=this.getInfiniteTierData())||void 0===k?void 0:k.isCurrentTier)?this.getNumTiers()+1:this.getCurrentTierData().tier}getAllTierData(){return Object.values(this._tiers)}getTierData(k){return this._tiers[k]}getTiersWithReward(k,B){return Object.values(this._tiers).filter((U=>[U.freeReward,U.bottomPremiumReward,U.topPremiumReward].some((U=>{var F,G;return(null===(F=null==U?void 0:U.itemDrop)||void 0===F?void 0:F.ID)===k&&(null===(G=null==U?void 0:U.itemDrop)||void 0===G?void 0:G.type)===B})))).map((k=>k.tier)).sort(((k,B)=>k-B))}getUnclaimedRewards(){var k,B,U,F,G,j;const $=[];for(const H of this.getAllTierData())H.isInfiniteTier||((null===(k=H.freeReward)||void 0===k?void 0:k.claimable)&&!(null===(B=H.freeReward)||void 0===B?void 0:B.claimed)&&$.push(H.freeReward.itemDrop),(null===(U=H.topPremiumReward)||void 0===U?void 0:U.claimable)&&!(null===(F=H.topPremiumReward)||void 0===F?void 0:F.claimed)&&$.push(H.topPremiumReward.itemDrop),(null===(G=H.bottomPremiumReward)||void 0===G?void 0:G.claimable)&&!(null===(j=H.bottomPremiumReward)||void 0===j?void 0:j.claimed)&&$.push(H.bottomPremiumReward.itemDrop));if(this.hasInfiniteTier()){const k=this.getInfiniteTierData();let B=k.timesCompleted-k.timesClaimed;for(;B>0;)$.push(k.freeReward.itemDrop),B--}return $}hasInfiniteTier(){var k;const B=null===(k=this._metaData.infiniteTier)||void 0===k?void 0:k.enabled;return(!0===B||void 0===B)&&Y.A.isDefined(this.getInfiniteTierData())}getInfiniteTierData(){return this._infiniteTierData}getNumUnclaimedRewards(){return this.getUnclaimedRewards().length}getTitle(){return this._metaData.title}getSeasonName(){return this._metaData.seasonName}getCurrentTierProgress(){return this.getCurrentTierData().currentProgress}getCurrentTierProgressTarget(){return this.getCurrentTierData().targetProgress}getPremiumTrackName(){return this._metaData.premiumTrackName}getPremiumTrackIconAtlasGuid(){return j._.Ui_battle_pass_json}getPremiumTrackIconFrameName(){return this._metaData.premiumTrackIconFrame}getHomeScreenPromoImageGuid(){return this._metaData.homeScreenPromoImageGuid}getHomeScreenPromoImageURL(){return this._metaData.homeScreenPromoImageURL}getQuestsScreenPanelImageGuid(){return this._metaData.questsScreenPanelImageGuid}getQuestsScreenPanelImageURL(){return this._metaData.questsScreenPanelImageURL}getRewardsScreenPanelImageGuid(){var k;return null===(k=this._metaData.rewardsScreenLeftPanelData)||void 0===k?void 0:k.rewardsScreenPanelImageGuid}getRewardsScreenPanelImageURL(){var k;return null===(k=this._metaData.rewardsScreenLeftPanelData)||void 0===k?void 0:k.rewardsScreenPanelImageURL}getUltimateActivatedTextColour(){var k;return null===(k=this._metaData.rewardsScreenLeftPanelData)||void 0===k?void 0:k.ultimateActivatedTextColour}getChasePrizes(){var k;return null!==(k=this._metaData.chasePrizes.chasePrizes)&&void 0!==k?k:[]}getChaseHeroPoseImageGuid(){return et.E.resolveSingleImageAssetSource(this._metaData.mythicalEpicHeroPoseImageGuid,this._metaData.mythicalEpicHeroPoseImageURL)}getMythicalEpicPetIds(){return this._mythicalEpicPetIds}getChasePetsLevelUp(){return this._metaData.chasePrizes.chasePrizesLevelupMember?this._metaData.chasePrizes.chasePrizesLevelupMember.filter((k=>"pet"===k.type)):[]}getChasePetsUltimate(){return this._metaData.chasePrizes.chasePrizesUltimateMember?this._metaData.chasePrizes.chasePrizesUltimateMember.filter((k=>"pet"===k.type)):[]}getMiniChaseItemsLevelUp(){return this._metaData.chasePrizes.chasePrizesLevelupMember?this._metaData.chasePrizes.chasePrizesLevelupMember.filter((k=>{if(k.experiment){return Y.A.traverseIfObject(this._featureProvider.getFeatureValue(k.experiment.feature),k.experiment.variable)===k.experiment.value===k.experiment.result}return!0})):[]}getMiniChaseItemsUltimate(){return this._metaData.chasePrizes.chasePrizesUltimateMember?this._metaData.chasePrizes.chasePrizesUltimateMember.filter((k=>{if(k.experiment){return Y.A.traverseIfObject(this._featureProvider.getFeatureValue(k.experiment.feature),k.experiment.variable)===k.experiment.value===k.experiment.result}return!0})):[]}hasMadeQuestProgress(){return this._tasks.some((k=>{var B;return k.taskDefinition.metadata.questGoalTaskType===$.x.GOAL&&(k.taskProgress.status===V.t.COMPLETE||(null===(B=k.taskProgress.data)||void 0===B?void 0:B.progress)>0)}))}getQuestTypes(){return this._metaData.questTypes.map((k=>k.name))}getQuests(k){return k?this._questGoals.filter((B=>B.questType===k||k===H.bm.All)):this._questGoals}getQuestsToShow(k){return this.getQuests(k).filter((k=>k.hasStarted&&!k.isExpired||k.comingSoonDate))}getCompletedUnclaimedQuests(){return this.getQuests().filter((k=>k.reward.claimable&&!k.reward.claimed))}getQuestComingSoonDate(k){let B=null;for(let U=0;U{var B,U;return(null===(B=k.reward)||void 0===B?void 0:B.claimable)&&!(null===(U=k.reward)||void 0===U?void 0:U.claimed)})).length}getQuestById(k){return this._questGoals.find((B=>B.goalTaskId===k))}getFtueTask(){return this._ftueTaskData}getFtueFrames(){return this._metaData.ftueFrames}getXpId(){return this._battlePassXpId}getThreeTierCoreChaseItems(){var k;return null===(k=this._metaData.threeTierChasePrizes)||void 0===k?void 0:k.chasePrizes.coreChaseItems}getThreeTierPlusChaseItems(){var k;return null===(k=this._metaData.threeTierChasePrizes)||void 0===k?void 0:k.chasePrizes.plusChaseItems}getThreeTierUltraChaseItems(){var k;return null===(k=this._metaData.threeTierChasePrizes)||void 0===k?void 0:k.chasePrizes.ultraChaseItems}getThreeTierCoreLabels(){var k,B,U;return null!==(U=null===(B=null===(k=this._metaData.threeTierChasePrizes)||void 0===k?void 0:k.chasePrizeGroupLocalizationKeys)||void 0===B?void 0:B.coreLocalizationKeys.map((k=>this._localizer.getText(k))))&&void 0!==U?U:tt.A.CHASE_PRIZE_GROUP_LOC_KEYS.coreLocalizationKeys.map((k=>this._localizer.getText(k)))}getThreeTierPlusLabels(){var k,B,U;return null!==(U=null===(B=null===(k=this._metaData.threeTierChasePrizes)||void 0===k?void 0:k.chasePrizeGroupLocalizationKeys)||void 0===B?void 0:B.plusLocalizationKeys.map((k=>this._localizer.getText(k))))&&void 0!==U?U:tt.A.CHASE_PRIZE_GROUP_LOC_KEYS.plusLocalizationKeys.map((k=>this._localizer.getText(k)))}getThreeTierUltraLabels(){var k,B,U;return null!==(U=null===(B=null===(k=this._metaData.threeTierChasePrizes)||void 0===k?void 0:k.chasePrizeGroupLocalizationKeys)||void 0===B?void 0:B.ultraLocalizationKeys.map((k=>this._localizer.getText(k))))&&void 0!==U?U:tt.A.CHASE_PRIZE_GROUP_LOC_KEYS.ultraLocalizationKeys.map((k=>this._localizer.getText(k)))}getThreeTierCoreAnimatedPets(){var k;return null===(k=this._metaData.threeTierChasePrizes)||void 0===k?void 0:k.chasePrizeAnimatedPets.corePets}getThreeTierPlusAnimatedPets(){var k;return null===(k=this._metaData.threeTierChasePrizes)||void 0===k?void 0:k.chasePrizeAnimatedPets.plusPets}getThreeTierUltraAnimatedPets(){var k;return null===(k=this._metaData.threeTierChasePrizes)||void 0===k?void 0:k.chasePrizeAnimatedPets.ultraPets}getBattlePassChasePets(){const k=new Set,B=B=>{null==B||B.forEach((B=>{"pet"===B.type&&k.add(B.id)}))};return B(this.getChasePrizes()),B(this.getChasePetsLevelUp()),B(this.getChasePetsUltimate()),k}}it.DEFAULT_MAGICOIN_AMOUNT=1600,(0,F.Cg)([(0,Q.b)("073-6f3b"),(0,F.Sn)("design:type",Object)],it.prototype,"_featureProvider",void 0),(0,F.Cg)([(0,Q.b)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],it.prototype,"_localizer",void 0)},38156:(k,B,U)=>{"use strict";U.d(B,{n:()=>K});var F=U(8674),G=U(62459),j=U(28344),$=U(63011),H=U(66582),V=U(35120),W=U(76277),q=U(44094);class K{static hasBattlePassAccess(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("db5-fb6e"),B=(0,W.G)(j.y).enabled,U=yield k.meetsRequirements(70);return!B||U}))}static getQuestDescriptionFromDefinition(k){var B,U;return this.getQuestDescription(null!==(U=null===(B=k.metadata)||void 0===B?void 0:B.questGoalName)&&void 0!==U?U:k.completionRequirements.type,k.completionRequirements.data.target,k.localizationKey)}static getQuestDescription(k,B,U){const F=null!=U?U:`BATTLE_PASS_QUEST_${k.replace(/ /g,"").toUpperCase()}`,j=V.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);let $;return $=(null==j?void 0:j.hasText(F))?j.getText(F,B):`${q.$.toTitleCase(k)} x${B}`,$.trim().replace(/ +/g," ")}static playerMembershipMeetsRewardMembership(k){const B=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=B.hasMembership(),F=B.hasMembershipFeatureAccess($.D.ULTIMATE_MEMBERBOX);return!(!U||!F)||(U&&!F?!(k===H._$.MemberUltimateMath||k===H._$.MemberUltimateBundle):k===H._$.NonMember)}}},1959:(k,B,U)=>{"use strict";U.d(B,{A:()=>F});class F{}F.CHASE_PRIZES={coreChaseItems:[{id:11,type:"currency"},{id:139,type:"follow"},{id:181,type:"follow"},{id:27,type:"currency"}],plusChaseItems:[{id:171,type:"pet"},{id:139,type:"follow"},{id:181,type:"follow"},{id:300,type:"follow"},{id:39,type:"petHat"},{id:41,type:"petHat"},{id:27,type:"currency"},{id:27,type:"currency"}],ultraChaseItems:[{id:171,type:"pet"},{id:243,type:"pet"},{id:39,type:"petHat"},{id:41,type:"petHat"},{id:139,type:"follow"},{id:181,type:"follow"},{id:300,type:"follow"},{id:13,type:"mount"},{id:1,type:"currency"},{id:1,type:"currency"},{id:11,type:"currency"},{id:11,type:"currency"}]},F.CHASE_PRIZE_GROUP_LOC_KEYS={coreLocalizationKeys:["CORE_SHARDS","TT_CHASE_PRIZE_CORE_BUDDIES","350"],plusLocalizationKeys:["TT_CHASE_PRIZE_PLUS_MYTHICS!","TT_CHASE_PRIZE_PLUS_BUDDIES!","TT_CHASE_PRIZE_PLUS_PET_GEAR","720"],ultraLocalizationKeys:["TT_CHASE_PRIZE_ULTRA_NEW_MYTHICS","TT_CHASE_PRIZE_ULTRA_PET_GEAR","TT_CHASE_PRIZE_ULTRA_MORE_BUDDIES","TT_CHASE_PRIZE_ULTRA_MOUNT","TT_CHASE_PRIZE_ULTRA_EVEN_MORE"]},F.MAGICOIN_COUNT_TO_DISPLAY=1600},90817:(k,B,U)=>{"use strict";U.d(B,{cM:()=>G,gz:()=>z});var F,G,j=U(8674),$=U(62459),H=U(35120),V=U(73797),W=U(96810),q=U(90633),K=U(44094);!function(k){k.FtueAdvanceCallback="CAMPAIGN_REPLAY_FTUE_ADVANCE_CALLBACK",k.HardModeFtueStep="CAMPAIGN_REPLAY_HARD_MODE_FTUE_STEP"}(F||(F={})),function(k){k.NOT_STARTED="NOT_STARTED",k.STEP_1_NOOT_DIALOGUE_INTRO="STEP_1_NOOT_DIALOGUE_INTRO",k.STEP_2_CLICK_ON_DIFFICULTY_SELECTOR="STEP_2_CLICK_ON_DIFFICULTY_SELECTOR",k.STEP_3_CLICK_ON_HARD_MODE_UNLOCK="STEP_3_CLICK_ON_HARD_MODE_UNLOCK",k.STEP_4A_REQUIREMENTS_NOT_MET_CLICK_CLOSE="STEP_4A_REQUIREMENTS_NOT_MET_CLICK_CLOSE",k.STEP_5A_CLOSE_DIFFICULTY_SELECTOR="STEP_5A_CLOSE_DIFFICULTY_SELECTOR",k.STEP_6A_RESUME_WORLD_MAP_NORMAL="STEP_6A_RESUME_WORLD_MAP_NORMAL",k.STEP_4B_REQUIREMENTS_MET_CLICK_CLOSE="STEP_4B_REQUIREMENTS_MET_CLICK_CLOSE",k.STEP_5B_ENTER_HARD_MODE="STEP_5B_ENTER_HARD_MODE",k.STEP_6B_CONFIRM_ENTER_HARD_MODE="STEP_6B_CONFIRM_ENTER_HARD_MODE",k.STEP_7B_NOOT_HARD_MODE_INTRO="STEP_7B_NOOT_HARD_MODE_INTRO",k.STEP_8B_ENTER_FIREFLY_HARD_MODE="STEP_8B_ENTER_FIREFLY_HARD_MODE"}(G||(G={}));class z{constructor(){this.onFtueResolved=new $.HN0,this._funnelId=K.$.generateUID()}static get initialized(){return $.Aq$.isDefined(this._instance)}static get instance(){var k;return null!==(k=this._instance)&&void 0!==k?k:this._instance=new z}beginHardModeFtue(){return(0,j.sH)(this,void 0,void 0,(function*(){yield H.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirements(59);this._currentStep=0,this._stepPath=z.HARD_MODE_FTUE_STEPS,H.q.instance.prodigy.gameContainer.rebind(F.FtueAdvanceCallback).toConstantValue(this.advanceFtueStep.bind(this)),this.advanceFtueStep()}))}beginHardModeFirstEntryExperience(){this._currentStep=0,this._stepPath=z.HARD_MODE_FTUE_STEPS_ENTRY_ONLY,H.q.instance.prodigy.gameContainer.rebind(F.FtueAdvanceCallback).toConstantValue(this.advanceFtueStep.bind(this)),H.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(q.B.FEATURE_CAMPAIGN_REPLAY,q.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE_STARTED),this.advanceFtueStep()}advanceFtueStep(){this._currentStep++,this._currentStep>=this._stepPath.length?$.VyI.log("CampaignReplayFtueSessionTracker: FTUE session reached the end of the path",$.$bb.Info):(H.q.instance.prodigy.gameContainer.rebind(F.HardModeFtueStep).toConstantValue(this._stepPath[this._currentStep]),H.q.instance.game.broadcaster.broadcast(V.sn.HardModeFtueStepAdvanced,void 0,[this._stepPath[this._currentStep]]),this.handleFtueStepAnalytics(this._stepPath[this._currentStep]),$.VyI.log(`Advancing FTUE step: ${this._stepPath[this._currentStep]}`,$.$bb.Info))}cancelSession(){$.VyI.log("CampaignReplayFtueSessionTracker: FTUE session canceled",$.$bb.Info),H.q.instance.game.broadcaster.broadcast(V.sn.HardModeFtueCanceled),this.onFtueResolved.dispatch(),this.destroy()}completeFtue(k){$.VyI.log("CampaignReplayFtueSessionTracker: FTUE session completed",$.$bb.Info),H.q.instance.game.broadcaster.broadcast(V.sn.HardModeFtueCompleted),H.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(q.B.FEATURE_CAMPAIGN_REPLAY,q.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FTUE_COMPLETED),this.onFtueResolved.dispatch(),this.sendAnalyticsStepEvent(W.l.CampaignReplayFtueEnterHardMode,7),k&&H.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(q.B.FEATURE_CAMPAIGN_REPLAY,q.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE),this.destroy()}handleFtueStepAnalytics(k){switch(k){case G.STEP_1_NOOT_DIALOGUE_INTRO:this.sendAnalyticsStepEvent(W.l.CampaignReplayFtueMapScreenOpened,3);break;case G.STEP_3_CLICK_ON_HARD_MODE_UNLOCK:this.sendAnalyticsStepEvent(W.l.CampaignReplayFtueModal,4);break;case G.STEP_4B_REQUIREMENTS_MET_CLICK_CLOSE:this.sendAnalyticsStepEvent(W.l.CampaignReplayFtueRestrictions,5),this.sendAnalyticsStepEvent(W.l.CampaignReplayFtueQualifyForHardMode,6)}}sendAnalyticsStepEvent(k,B){const U=H.q.instance.prodigy.gameContainer.get("c47-20b6"),F={funnelName:"campaign_replay_ftue",funnelType:"tutorial",funnelId:this._funnelId,stepName:k},G={step_index:B};U.playerProgression.sendFunnelAdvancedEvent(F,G)}destroy(){this.onFtueResolved.dispose(),H.q.instance.prodigy.gameContainer.unbind(F.FtueAdvanceCallback),H.q.instance.prodigy.gameContainer.unbind(F.HardModeFtueStep),this._funnelId=null,z._instance=null}}z.HARD_MODE_FTUE_STEPS=[G.NOT_STARTED,G.STEP_1_NOOT_DIALOGUE_INTRO,G.STEP_2_CLICK_ON_DIFFICULTY_SELECTOR,G.STEP_5B_ENTER_HARD_MODE,G.STEP_6B_CONFIRM_ENTER_HARD_MODE,G.STEP_7B_NOOT_HARD_MODE_INTRO,G.STEP_8B_ENTER_FIREFLY_HARD_MODE],z.HARD_MODE_FTUE_STEPS_ENTRY_ONLY=[G.STEP_6B_CONFIRM_ENTER_HARD_MODE,G.STEP_7B_NOOT_HARD_MODE_INTRO,G.STEP_8B_ENTER_FIREFLY_HARD_MODE]},90975:(k,B,U)=>{"use strict";U.d(B,{Y:()=>V});var F=U(90633),G=U(93867),j=U(84399),$=U(35120),H=U(40295);class V{static meetsNarrativeIntroRequirements(){return j.R.isFeatureEnabled()&&G.U.isStepComplete(H.B.PuppetMasterDefeated)&&!$.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(F.B.FEATURE_CAMPAIGN_REPLAY,F.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_INTRO_SEEN)}static meetsNarrativeCatchupRequirements(){const k=$.q.instance.prodigy.gameContainer.get("306-5359");return j.R.isFeatureEnabled()&&k.getChargedLevel()>0&&!G.U.isStepComplete(H.B.PuppetMasterDefeated)&&!$.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(F.B.FEATURE_CAMPAIGN_REPLAY,F.B.BREADCRUMB_CAMPAIGN_REPLAY_CATCHUP_SEEN)}static meetsEitherCutsceneRequirement(){return V.meetsNarrativeIntroRequirements()||V.meetsNarrativeCatchupRequirements()}}},2212:(k,B,U)=>{"use strict";U.d(B,{J:()=>tt});var F=U(62459),G=U(99625),j=U(47708),$=U(97495),H=U(40295),V=U(90633),W=U(73678),q=U(35120),K=U(40392),z=U(13021),Y=U(30226),Q=U(93867),X=U(84399),Z=U(55122),J=U(90975);class tt{static shouldShowHardModeUnlockedPopup(){const k=q.q.instance.prodigy.breadcrumbManager,B=q.q.instance.prodigy.gameContainer.get("db5-fb6e");return X.R.isFeatureEnabled()&&!k.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_HARD_MODE_UNLOCKED_POPUP_SEEN)&&!k.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_HARD_MODE)&&B.meetsRequirementsDeprecated(59)}static shouldShowExpertModeUnlockedPopup(){const k=q.q.instance.prodigy.breadcrumbManager,B=q.q.instance.prodigy.gameContainer.get("db5-fb6e");return X.R.isFeatureEnabled()&&!k.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_EXPERT_MODE_UNLOCKED_POPUP_SEEN)&&!k.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_EXPERT_MODE)&&B.meetsRequirementsDeprecated(60)}static showDifficultyUnlockedPopup(k,B=(()=>null)){if(k===$.i.Regular)return F.VyI.log("There is no difficulty unlocked popup for regular difficulty",F.$bb.Warning),void B();const U=q.q.instance.prodigy.breadcrumbManager;q.q.instance.prodigy.open.prefabMenu(G.l.DifficultyUnlockedModal,B,!0,!0,!1,{DifficultyMode:k});const j=k===$.i.Hard?V.B.BREADCRUMB_HARD_MODE_UNLOCKED_POPUP_SEEN:V.B.BREADCRUMB_EXPERT_MODE_UNLOCKED_POPUP_SEEN;U.completeBreadcrumb(V.B.FEATURE_CAMPAIGN_REPLAY,j),tt.sendDifficultyUnlockedEvent(k)}static sendFeatureUnlockedEvent(k,B,U){const F={feature_name:k,feature_type:B,lock_type:U};q.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFeatureUnlockedEvent(F)}static sendDifficultyUnlockedEvent(k){this.sendFeatureUnlockedEvent(`${k}-mode`,"difficulty-mode","player-level")}static get meetsNarrativeIntroRequirements(){return J.Y.meetsNarrativeIntroRequirements()}static get meetsNarrativeCatchupRequirements(){return J.Y.meetsNarrativeCatchupRequirements()}static get shouldClearChargedLevels(){if(J.Y.meetsEitherCutsceneRequirement())return!1;return q.q.instance.prodigy.gameContainer.get("306-5359").hasChargedLevelsEnabled()}static canShowNarrativeIntro(k){if(!k)return!1;const B=k.split("-")[0];return(Y.J.isCoreZone(B)||B===W.A_.HOUSE||B===W.A_.LAMPLIGHT)&&"lamplight-B3"!==k&&(this.meetsNarrativeIntroRequirements||this.meetsNarrativeCatchupRequirements)}static shouldShowWorldMapHardModeFtue(){return q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_INTRO_SEEN)&&!q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FTUE_COMPLETED)}static shouldShowWorldMapHardModeFirstEntryDialogue(){const k=K.i.DIFFICULTY_MODE===$.i.Hard,B=q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FTUE_COMPLETED),U=!q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE);return k&&B&&U}static hasStartedHardModeFirstEntryDialogueButNeverCompleted(){const k=q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FTUE_COMPLETED),B=!q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE),U=q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE_STARTED);return k&&B&&U}static getHighestUnlockedDifficulty(){const k=q.q.instance.prodigy.gameContainer.get("db5-fb6e");return k.meetsRequirementsDeprecated(60)?$.i.Expert:k.meetsRequirementsDeprecated(59)?$.i.Hard:$.i.Regular}static featureDataHealthCheck(){const k=q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_INTRO_SEEN),B=q.q.instance.prodigy.gameContainer.get("306-5359").data.campaignReplayProgressStep;if(k&&B===j.q6.NotStarted){q.q.instance.prodigy.gameContainer.get("ba4-af03").setProgress({step:j.q6.HardModeIntroduced})}}static shouldShowHardModePbfBannerWarning(){var k;const B=q.q.instance.prodigy.gameContainer.get("306-5359");return X.R.isFeatureEnabled()&&!Q.U.isStepComplete(H.B.PuppetMasterDefeated)&&!1===(null===(k=B.difficultyUnlocks)||void 0===k?void 0:k.hard)&&B.getLevel()===Z.s.maxLevelConfig.regular}static isZoneMapDifficultyModeAgnostic(k){const B=k.split("-")[0],U=q.q.instance.prodigy.world.getZone(B);return!0===(null==U?void 0:U.difficultyModeAgnostic)||z.w.isTitanMap(k)}}},72379:(k,B,U)=>{"use strict";U.d(B,{g:()=>et});var F=U(8674),G=U(62459),j=U(79687),$=U(99625),H=U(63011),V=U(38170),W=U(35120),q=U(1195),K=U(19586),z=U(96494),Y=U(90633),Q=U(13956),X=U(84642),Z=U(35571),J=U(84399),tt=U(55122);let et=class{get chargedLevelsProgressData(){return this._chargedLevelsProgressData}get showedThisSession(){return this._showedThisSession}get hasAccessToChargedLevels(){return this._loggedInPlayer.player.getLevel()>=tt.s.activePlayerLevelCap&&!this.isAboutToStartHardMode}get isPlayerInGoodStanding(){return this._chargedLevelsProgressData.chargedLevel>0}get isLosingLevels(){var k;return(null===(k=this._chargedLevelsProgressData)||void 0===k?void 0:k.recuperableXp)>0}get isAboutToStartHardMode(){return J.R.isFeatureEnabled()&&this._featureRequirements.meetsRequirementsDeprecated(66)}get shouldShowRetention(){return X.x.arePopupsEnabled&&this.hasAccessToChargedLevels&&!this._showedThisSession&&this.isLosingLevels}get shouldShowConversionModal(){var k,B;const U=this.hasAccessToChargedLevels&&!this._loggedInPlayer.player.hasMembershipFeatureAccess(H.D.CHARGED_LEVELS_DECAY_IMMUNITY)&&null!==(B=null===(k=this._loggedInPlayer.player.data.chargedLevelData)||void 0===k?void 0:k.hasJustReachedConversionMilestone)&&void 0!==B&&B;return this._loggedInPlayer.player.data.chargedLevelData.hasJustReachedConversionMilestone=!1,U}get shouldShowDecayImmunityModal(){var k;const B=this._loggedInPlayer.player.hasMembershipFeatureAccess(H.D.CHARGED_LEVELS_DECAY_IMMUNITY),U=this.hasAccessToChargedLevels&&B&&G.Aq$.isDefined(null===(k=this._loggedInPlayer.player.data.chargedLevelData)||void 0===k?void 0:k.decayImmunityExpiryDate)&&!this._breadcrumbManager.isBreadcrumbComplete(Y.B.FEATURE_CHARGED_LEVELS,Y.B.BREADCRUMB_DECAY_IMMUNITY_MODAL_SEEN);return!B&&this._breadcrumbManager.isBreadcrumbComplete(Y.B.FEATURE_CHARGED_LEVELS,Y.B.BREADCRUMB_DECAY_IMMUNITY_MODAL_SEEN)&&this._breadcrumbManager.resetBreadcrumb(Y.B.FEATURE_CHARGED_LEVELS,Y.B.BREADCRUMB_DECAY_IMMUNITY_MODAL_SEEN),U}get shouldShowDecayImmunityNotification(){var k,B,U;const F=new Date,G=new Date(null===(k=this.chargedLevelsProgressData)||void 0===k?void 0:k.decayImmunityExpiryDate),j=V.r.daysBetween(F,G);if(F.getTime()>=G.getTime()||isNaN(j)||j<=0)return!1;return this._loggedInPlayer.player.hasMembershipFeatureAccess(H.D.CHARGED_LEVELS_DECAY_IMMUNITY)&&(null!==(U=null===(B=this._loggedInPlayer.player.data.unsecureChargedLevelData)||void 0===B?void 0:B.decayImmunityNotificationDays)&&void 0!==U?U:0)!==j&&!this.shouldShowDecayImmunityModal}init(k){this._chargedLevelsProgressData=k,this._loggedInPlayer.player.setChargedLevelsData(k)}abandonChargedLevelLosses(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._loggedInPlayer.player,B=k.getStars(),{chargedLevel:U,chargedLevelCumulativeXp:F}=k.data.chargedLevelData,G=yield this._chargedLevelsNetworkHandler.abandonChargedLevelLosses();k.setChargedLevelsData(G);W.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendPlayerProgressionRestrictedEvent({progressionType:"Charged Level",progressionAction:"charge_reset",progressionValue:`${U}`,creatureName:"Player"},{pointType:"stars",pointCount:B+F})}))}recuperateChargedLevelLosses(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=this._loggedInPlayer.player,F=U.getStars(),{chargedLevel:G,chargedLevelXpForCurrentLevel:j}=U.data.chargedLevelData,$=yield this._chargedLevelsNetworkHandler.recuperateChargedLevelLosses();this._loggedInPlayer.player.setChargedLevelsData($);W.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendPlayerProgressionRestrictedEvent({progressionType:"Charged Level",progressionAction:"charge_renewed",progressionValue:`${G}`,creatureName:"Player",currencyType:k,currencyAmount:B},{pointType:"stars",pointCount:j+F})}))}showChargedLevelsRetentionModal(k){if(!this.shouldShowRetention)return void k();this._showedThisSession=!0;const B=this._loggedInPlayer.player.playerContainer;(null==B?void 0:B.isFacingLeft())&&B.flip(),this.showModal($.l.Charged_level_retention,k)}showChargedLevelsConversionModal(k){this.showModal($.l.ContextualPrompt_ChargedLevelsUltraUpsell,k)}showChargedLevelsDecayImmunityModal(k){this.showModal($.l.ChargedLevelsDecayImmunityModal,k)}showChargedLevelsDecayImmunityNotification(){var k;const B=new Date,U=new Date(null===(k=this.chargedLevelsProgressData)||void 0===k?void 0:k.decayImmunityExpiryDate),F=V.r.daysBetween(B,U);if(B.getTime()>=U.getTime()||isNaN(F)||F<=0)return;const j=W.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),$=j.getText("CHARGED_LEVEL_DECAY_IMMUNITY_NOTIFICATION_TITLE"),H=j.getText("CHARGED_LEVEL_DECAY_IMMUNITY_NOTIFICATION_BODY",F,1===F?"":"s");W.q.instance.prodigy.notifications.initGenericNotification(K._.CHARGEDLEVELFREEZECOUNTDOWN,{modal:{action:"",title:$,body:H}}),this._loggedInPlayer.player.data.unsecureChargedLevelData.decayImmunityNotificationDays=F,this._loggedInPlayer.player.forceSaveCharacter()}showModal(k,B){W.q.instance.prodigy.open.prefabMenu(k,B).createContainer=!1}};(0,F.Cg)([(0,Q.b)("639-22b8"),(0,F.Sn)("design:type",Z.e)],et.prototype,"_chargedLevelsNetworkHandler",void 0),(0,F.Cg)([(0,Q.b)("e20-0fb0"),(0,F.Sn)("design:type",q.E)],et.prototype,"_loggedInPlayer",void 0),(0,F.Cg)([(0,Q.b)("12f-4e29"),(0,F.Sn)("design:type",z.F)],et.prototype,"_breadcrumbManager",void 0),(0,F.Cg)([(0,Q.b)("db5-fb6e"),(0,F.Sn)("design:type",Object)],et.prototype,"_featureRequirements",void 0),et=(0,F.Cg)([(0,j.injectable)()],et)},37773:(k,B,U)=>{"use strict";U.d(B,{e:()=>$});var F=U(35120),G=U(55122),j=U(97317);class ${static getActivePlayerChargedLevelTier(){const k=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return this.getPlayerChargedLevelTier(k)}static get activePlayerHasChargedLevels(){return F.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getChargedLevel()>0}static getPlayerChargedLevelTier(k){return this.getChargedLevelTierFromLevel(k.getChargedLevel())}static getChargedLevelTierFromLevel(k){return k>=j.QT.MAX_NONMEMBER_CHARGED_LEVEL?j.Bv.MAX_CHARGE:k>=1?j.Bv.CHARGED:j.Bv.NO_CHARGE}static formatDuelOpponentChargedLevel(k){const B=G.s.maxLevelConfig.regular;if(k.data.level>B){const U=k.data.level-B;k.data.chargedLevelData={chargedLevel:U,chargedLevelCap:U},k.data.level=B}}}},34578:(k,B,U)=>{"use strict";var F;U.d(B,{m:()=>F}),function(k){k.ChargedLevelAnimationTier="CHARGED_LEVEL_ANIMATION_TIER",k.ShowChargedLevels="SHOW_CHARGED_LEVELS",k.Retention="CHARGED_LEVELS_RETENTION"}(F||(F={}))},97317:(k,B,U)=>{"use strict";var F,G,j;U.d(B,{Bv:()=>F,QT:()=>j,Vh:()=>$,X$:()=>G}),function(k){k.NO_CHARGE="NO_CHARGE",k.CHARGED="CHARGED",k.MAX_CHARGE="MAX_CHARGE"}(F||(F={})),function(k){k.HIDDEN="HIDDEN",k.IDLE="IDLE",k.REVEAL_TO_IDLE="REVEAL_TO_IDLE",k.CHARGE_LOST="CHARGE_LOST",k.CHARGE_KEPT="CHARGE_KEPT"}(G||(G={})),function(k){k[k.MAX_NONMEMBER_CHARGED_LEVEL=25]="MAX_NONMEMBER_CHARGED_LEVEL",k[k.MAX_MEMBER_CHARGED_LEVEL=50]="MAX_MEMBER_CHARGED_LEVEL"}(j||(j={}));const $="#068200"},65732:(k,B,U)=>{"use strict";var F;U.d(B,{E:()=>F}),function(k){k.PlayerChargedLevel="PLAYER_CHARGED_LEVEL",k.PlayerChargedLevelCap="PLAYER_CHARGED_LEVEL_CAP",k.ChargedCreatureEffectTier="CHARGED_CREATURE_EFFECT_TIER",k.ChargedCreatureEffectDisplayType="CHARGED_CREATURE_EFFECT_DISPLAY_TYPE",k.ChargeRevealEffectEnabled="CHARGE_REVEAL_EFFECT_ENABLED",k.MemberRetentionGroup="MEMBER_RETENTION_GROUP",k.ShowXpBar="CHARGED_LEVELS_SHOW_XP_BAR",k.ShowTierUp="CHARGED_LEVELS_SHOW_TIER_UP",k.LevelTierIdleAnimation="CHARGED_LEVELS_TIER_IDLE_ANIMATION",k.LevelTierUpgradeAnimation="CHARGED_LEVELS_TIER_UPGRADE_ANIMATION"}(F||(F={}))},47969:(k,B,U)=>{"use strict";U.d(B,{m:()=>z});var F=U(8674),G=U(62459),j=U(79687),$=U(35537),H=U(95891),V=U.n(H);let W=class{constructor(){this._cooldowns=Promise.resolve({})}get cache(){return this._cooldowns.then((k=>V().clone(k)))}isCooldownActive(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.getCooldownTimestamp(k);if(void 0===B)return!1;return B>(yield this.getTimeNow())}))}isCooldownExpired(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.getCooldownTimestamp(k);if(void 0===B)return!1;return B<=(yield this.getTimeNow())}))}getCooldownRemainingTime(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.getCooldownTimestamp(k);if(void 0===B)return 0;const U=yield this.getTimeNow();return Math.max(0,B-U)}))}getCooldownTimestamp(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.isValidCooldownKey(k))return(yield this._cooldowns)[k]}))}isValidCooldownKey(k){return V().isString(k)?!V().isEmpty(k)||(this.logError("[BaseCooldownDataProvider] Invalid cooldown key: Cooldown key cannot be an empty string."),!1):(this.logError("[BaseCooldownDataProvider] Invalid cooldown key: Cooldown key must be a string. Got: "+typeof k),!1)}};W=(0,F.Cg)([(0,j.injectable)()],W);var q,K=U(69698);let z=class extends W{constructor(){super(...arguments),this._cooldownRecord={},this[q]="cooldownChanges"}getTimeNow(){return this._timeManager.getServerTimeMs()}[(q=$.sE,$.JN)](k){return(0,F.sH)(this,void 0,void 0,(function*(){G.Aq$.isDefined(k.cooldowns)&&this.setCooldowns(k.cooldowns)}))}setCooldowns(k){this._cooldowns=Promise.resolve(k),this._cooldownRecord=k}logError(k){G.VyI.log(`[CooldownsDataStore] ${k}`,G.$bb.Error)}isCachedCooldownActive(k){const B=this._cooldownRecord[k];return void 0!==B&&B>Date.now()}};(0,F.Cg)([(0,j.inject)("a03-308f"),(0,F.Sn)("design:type",K.V)],z.prototype,"_timeManager",void 0),z=(0,F.Cg)([(0,j.injectable)()],z)},29638:(k,B,U)=>{"use strict";U.d(B,{S:()=>H});var F=U(8674),G=U(62459),j=U(99625),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this.hideStartButton=!1}run(){this.hideStartButton?(this.startButton.active=!1,this._prefabLoader.loadWithDependenciesFromGUID(j.l.AdventureMap_ScrollViewLarge,this.gameObject).catch(G.RQr.createHandler("Failed to load AdventureMapScrollBox"))):this._prefabLoader.loadWithDependenciesFromGUID(j.l.AdventureMap_ScrollViewSmall,this.gameObject).catch(G.RQr.createHandler("Failed to load AdventureMapScrollBox"))}};(0,F.Cg)([(0,G.Cdj)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],H.prototype,"_prefabLoader",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"hideStartButton",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],H.prototype,"startButton",void 0),H=(0,F.Cg)([(0,G.EVk)("InitAdventureMapScrollBox",$.Y.adventureUi)],H)},48235:(k,B,U)=>{"use strict";U.d(B,{W:()=>K});var F=U(8674),G=U(62459),j=U(65240),$=U(35120),H=U(73797),V=U(48417),W=U(76546);class q extends W.D{checkMemberUpgradeReward(){return(0,F.sH)(this,arguments,void 0,(function*(k={}){return this.makeCloudscriptRequest(V.D.MembershipUpgradeReward.CheckMemberUpgradeReward,k,!1)}))}getCollectedRewardsData(){return(0,F.sH)(this,arguments,void 0,(function*(k={}){return this.makeCloudscriptRequest(V.D.MembershipUpgradeReward.GetCollectedRewardsData,k,!1)}))}collectMemberUpgradeReward(){return(0,F.sH)(this,arguments,void 0,(function*(k={}){return this.makeCloudscriptRequest(V.D.MembershipUpgradeReward.CollectMemberUpgradeReward,k,!1)}))}}class K{static get hasRewardAvailable(){var k;return null!==(k=this._hasRewardAvailable)&&void 0!==k&&k}static getCollectedRewardsData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.networkHandler.getCollectedRewardsData()}))}static checkMemberUpgradeReward(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.networkHandler.checkMemberUpgradeReward();return this._hasRewardAvailable=null==k?void 0:k.hasRewardAvailable,this.hasRewardAvailable}))}static collectMemberUpgradeReward(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=$.q.instance.prodigy.gameContainer.get("c47-20b6").item.beginSecureItemTransaction(),B=yield this.networkHandler.collectMemberUpgradeReward();if(!G.Aq$.isDefined(B))return G.VyI.log("Member Upgrade Reward is empty",G.$bb.Error),k.flush({}),[];const U=B.map((k=>{const{type:B,id:U,quantity:F}=k;if(!(F<=0))return{ID:U,type:B,N:F}})).filter(G.Aq$.isDefined);if(U.length>0){let k=!1;for(const B of U)if("currency"===B.type&&27===B.ID){k=!0;break}k&&$.q.instance.game.broadcaster.broadcast(H.Lk.HardCurrencyPurchased)}return k.flush({source_type:j.C.ConversionOffer}),U}))}}K.networkHandler=new q},45024:(k,B,U)=>{"use strict";U.d(B,{e:()=>$});var F=U(35120),G=U(62459),j=U(30226);class $ extends class{constructor(k,B,U,F,G,j){this.game=null,this.player=null,this.stateName=null,this.questId=0,this.defaultValue=null,this.completeValue=null,this.game=k,this.player=B,this.stateName=U,this.questId=F,this.defaultValue=G,this.completeValue=j}isInitialized(){return G.Aq$.isDefined(this.player.state.get(this.stateName))}init(){this.player.state.set(this.stateName,{questId:this.questId,dateId:j.J.getDateId(),questState:this.defaultValue})}isComplete(){return this.player.state.get(`${this.stateName}-questState`)===this.completeValue}complete(){this.player.state.set(`${this.stateName}-questState`,this.completeValue)}hasDateIdChanged(){return j.J.getDateId()!==this.player.state.get(`${this.stateName}-dateId`)}}{constructor(k,B){super(k,B,$.data.stateName,$.data.questId,$.data.defaultValue,$.data.completeDialogue)}getSpawn(){const k=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=(new Date).getDate()+k.getLatestClassIDLegacy();return this.game.seededRandom.pick($.data.spawns,B)}}$.data={stateName:"world-dailyQuests-0",questId:0,defaultValue:0,completeValue:1,completeDialogue:8,bonusStars:10,spawns:[{location:"forest-B7",dialogue:3},{location:"skywatch-A0",dialogue:5},{location:"bonfire_spire-A1",dialogue:6},{location:"shipwreck_shore-C12",dialogue:7},{location:"shiverchill-A11",dialogue:7}]}},43518:(k,B,U)=>{"use strict";U.d(B,{M:()=>z});var F=U(8674),G=U(28344),j=U(58776),$=U(34829),H=U(96535),V=U(76277),W=U(13956),q=U(69698),K=U(85985);class z{static hasDailyLoginCalendarAccess(){return(0,F.sH)(this,void 0,void 0,(function*(){return!(0,V.G)(G.y).enabled||this._featureRequirements.meetsRequirements(71)}))}static canAutoSurfaceDailyLoginCalendar(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._activePlayer.hasCompletedTutorial())return!1;if(!(yield z.hasDailyLoginCalendarAccess()))return!1;if(!K.J.showDailyLoginCalendar())return!1;if(this._activePlayer.data.dailyLoginCalendarSuppress)return!1;const[k,B,U]=yield Promise.all([z.isTaskReadyToCollect(),z.hasStandardTrackEnded(),z.hasUltimateTrackEnded()]);return k&&!B&&!U}))}static isTaskReadyToCollect(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this._timeManager.getServerTimeMs(),U=(yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata()).endDate,F=yield this.getProgressOfTaskInProgress(k);return Math.min(null!=F?F:U,U)<=B}))}static getProgressOfTaskInProgress(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;const F=this._timeManager.getServerTimeMs(),G=yield this._dailyLoginCalendarQuestManager.getActiveStandardTrack(),H=null!=k?k:G.find((k=>k.taskProgress.status===j.t.IN_PROGRESS)),V=null!==(U=null===(B=null==H?void 0:H.taskProgress.data)||void 0===B?void 0:B.progress)&&void 0!==U?U:0;return V-F>=2*$.A.DAY_IN_MS?0:V}))}static hasUltimateTrackEnded(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._timeManager.getServerTimeMs();return(yield this._dailyLoginCalendarQuestManager.getActiveUltimateTrackMetadata()).endDate<=k}))}static hasStandardTrackEnded(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._timeManager.getServerTimeMs();return(yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata()).endDate<=k}))}}(0,F.Cg)([(0,W.b)("306-5359"),(0,F.Sn)("design:type",H.W)],z,"_activePlayer",void 0),(0,F.Cg)([(0,W.b)("a03-308f"),(0,F.Sn)("design:type",q.V)],z,"_timeManager",void 0),(0,F.Cg)([(0,W.b)("a71-dfcf"),(0,F.Sn)("design:type",Function)],z,"_dailyLoginCalendarQuestManager",void 0),(0,F.Cg)([(0,W.b)("db5-fb6e"),(0,F.Sn)("design:type",Object)],z,"_featureRequirements",void 0)},10730:(k,B,U)=>{"use strict";U.d(B,{v:()=>j});var F=U(35120),G=U(88022);class j{constructor(k){this._dungeonStartRoomExitAreaEvent=null,this.id=k}setup(k){this._map=k;const B=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(0===this.id){k.toggleDynamicLayer(k.game,1,!0,0),this._dungeonStartRoomExitAreaEvent=k.addAreaEvent(k.game,k.screen,{x:640,y:180,w:120,h:120,canReTrigger:!0},null,null,null,(()=>{const U=B.backpack.hasItem("currency",18);F.q.instance.prodigy.open.dungeonExitMenu(k.zone.ID,5,U,!1,null,(()=>{this.moveOffDungeonStartRoomExit()}))}));const U=F.q.instance.prodigy.create.sprite(640,180,G._.General_core_json,"empty",{x:.5,y:.5},null,200,200);U.events.onInputUp.add((()=>{k.walkToDoorway(640,220,null)})),U.alpha=0,U.inputEnabled=!0,k.screen.content.addChild(U)}else 1===this.id&&k.addAreaEvent(k.game,k.screen,{x:640,y:400,w:150,h:150,canReTrigger:!0},null,null,null,(()=>{const U=B.backpack.hasItem("currency",18);U<5?F.q.instance.prodigy.open.dungeonExitMenu(k.zone.ID,5,U):k.zone.openWheel(k.screen,k.zone.prizeWheelId)}))}moveOffDungeonStartRoomExit(){if(!this._dungeonStartRoomExitAreaEvent)return;const k=this._map.screen.user;k.setValidPath(this._map.screen.path,this._dungeonStartRoomExitAreaEvent.x,k.y+k.height/2)}}},28930:(k,B,U)=>{"use strict";var F;U.d(B,{O:()=>F}),function(k){k[k.North=0]="North",k[k.East=1]="East",k[k.South=2]="South",k[k.West=3]="West"}(F||(F={}))},63343:(k,B,U)=>{"use strict";U.d(B,{E:()=>$});var F=U(62459),G=U(35120),j=U(96810);class ${static sendFunnelAdvancedEvent(k,B){const U=G.q.instance.prodigy.gameContainer.get("c47-20b6"),F=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;U.playerProgression.sendFunnelAdvancedEvent({funnelName:"Defeated Pets",funnelType:"dynamic_store",stepName:k,funnelId:F.getDefeatedPetsData().featureFunnelId},{step_index:B},!0)}static recordDefeatedPetsFunnelStep(k){const B=G.q.instance.prodigy.gameContainer.get("306-5359"),U=B.getDefeatedPetsData(),j=this.STEP_NAME_TO_INDEX[k];return!(!F.Aq$.isDefined(j)||U.funnelStepsSeen[j])&&(U.funnelStepsSeen[j]=!0,B.setDefeatedPetsData(U),this.sendFunnelAdvancedEvent(k,j),!0)}}$.STEP_NAME_TO_INDEX={[j.l.DynamicStoreDefeatedPet]:1,[j.l.DynamicStoreLostPetsMain]:2,[j.l.DynamicStoreLostPetsTab]:3,[j.l.DynamicStoreLostPetViewed]:4,[j.l.DynamicStoreLostPetPurchased]:5}},71391:(k,B,U)=>{"use strict";U.d(B,{D:()=>W});var F=U(8674),G=U(62459),j=U(17446),$=U(8770),H=U(80060),V=U(30226);let W=class extends G.uAl{constructor(){super(...arguments),this.expectingMultipleAdditions=!1,this._isVisible=!1,this._index=0}create(){super.create();for(const k of this._labelsParent.children)k.active=!1}show(){return(0,F.sH)(this,void 0,void 0,(function*(){this._index=0,this._isVisible=!0,this._runningAddition=Promise.resolve(),this._show.playAnimation()}))}addPet(k){this._runningAddition=this._runningAddition.then((()=>(0,F.sH)(this,void 0,void 0,(function*(){return this.addAnimationSequence(k)})))).catch(G.RQr.createHandler("Failed to animate added pet"))}hide(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this._isVisible){this._hide.playAnimation(),this._isVisible=!1;for(const k of this._labelsParent.children)k.active=!1}}))}addAnimationSequence(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B;0===this._index&&this._firstIncrementDecoration.playAnimation(),this._increment.playAnimation();const U=G.Egh.timeout(this.findEventMillis(this._increment,"next"));if(this._index++,yield G.Egh.timeout(this.findEventMillis(this._increment,"incrementCounter")),this._index<=this._labelsParent.children.length){const U=null!==(B=k.rarity)&&void 0!==B?B:j.E.Common,F=this._labelsParent.children[this._index-1];F.active=!0,H.d.updateInjectedValues(F,{LABEL_TEXT:`${V.J.convertRarityToText(U)}!`,LABEL_FILL:G.TZp.decimalToHex($.TZ.lerpRgb($.Hh[U],G.yQ0.WHITE,this._labelFillWhiteMix)),LABEL_STROKE:G.TZp.decimalToHex($.TZ.lerpRgb($.Hh[U],G.yQ0.BLACK,this._labelStrokeBlackMix)),LABEL_USE_FAST_IN:this.expectingMultipleAdditions})}else G.VyI.log("Attempted to display way too many defeated pet rarities",G.$bb.Warning);yield U}))}findEventMillis(k,B){var U;const F=k.timeline.tweens.find((k=>{var U;return(null===(U=k.customData)||void 0===U?void 0:U.eventName)===B}));return F?1e3*(null!==(U=F.how.delay)&&void 0!==U?U:0):0}};(0,F.Cg)([(0,G.MnK)(G.bTj),(0,G.YLv)("Animation to display the icon, played before any additions start"),(0,F.Sn)("design:type",G.bTj)],W.prototype,"_show",void 0),(0,F.Cg)([(0,G.MnK)(G.bTj),(0,G.YLv)("Animation to hide the icon, played after all additions end"),(0,F.Sn)("design:type",G.bTj)],W.prototype,"_hide",void 0),(0,F.Cg)([(0,G.MnK)(G.bTj),(0,G.YLv)("Played alongside the first addition after showing"),(0,F.Sn)("design:type",G.bTj)],W.prototype,"_firstIncrementDecoration",void 0),(0,F.Cg)([(0,G.MnK)(G.bTj),(0,G.YLv)("Played on each addition, in sequence. \nThe timeline should have two steps with a customData.eventName of: \nnext: Moment when the next addition should start\nincrementCounter: Moment when the counter text should update"),(0,F.Sn)("design:type",G.bTj)],W.prototype,"_increment",void 0),(0,F.Cg)([(0,G.ERr)(),(0,G.YLv)("Object containing a bunch of labels, which will be enabled in sequence as the counter updates"),(0,F.Sn)("design:type",G._mx)],W.prototype,"_labelsParent",void 0),(0,F.Cg)([(0,G.g11)(),(0,G.YLv)("Portion of white to mix with the rarity color for the label text fill"),(0,F.Sn)("design:type",Number)],W.prototype,"_labelFillWhiteMix",void 0),(0,F.Cg)([(0,G.g11)(),(0,G.YLv)("Portion of black to mix with the rarity color for the label text stroke/outline"),(0,F.Sn)("design:type",Number)],W.prototype,"_labelStrokeBlackMix",void 0),W=(0,F.Cg)([(0,G.EVk)("DefeatedPetsBattleIcon")],W)},76016:(k,B,U)=>{"use strict";U.d(B,{P:()=>F});var F,G=U(8674),j=U(62459),$=U(64270),H=U(15821),V=U(26932),W=U(13956),q=U(64868);!function(k){k.Available="DYNAMIC_STORE_ACCESS_POINT_AVAILABLE",k.HasNotification="DYNAMIC_STORE_ACCESS_POINT_HAS_NOTIFICATION",k.WantsAttention="DYNAMIC_STORE_ACCESS_POINT_WANTS_ATTENTION",k.MillisecondsRemaining="DYNAMIC_STORE_ACCESS_POINT_MILLISECONDS_REMAINING",k.StoreClosedCallback="DYNAMIC_STORE_ACCESS_POINT_STORE_CLOSED",k.JustSeenSegmentedOfferPopup="DYNAMIC_STORE_ACCESS_POINT_JUST_SEEN_SEGMENTED_OFFER_POPUP"}(F||(F={}));let K=class extends V.z{bindContext(){const k=q._.hasDefeatedPetStore();this.updateValue(F.Available,k),k&&(this.updateValue(F.HasNotification,!1),this.updateValue(F.StoreClosedCallback,(()=>{this.refresh().catch(j.RQr.createHandler("Failed to update dynamic store access point"))})),this.refresh().catch(j.RQr.createHandler("Failed to initialize dynamic store access point")))}unbindContext(){this.updateValue(F.Available,!1),this.updateValue(F.WantsAttention,!1),this.updateValue(F.HasNotification,!1),this.updateValue(F.MillisecondsRemaining,null),this.updateValue(F.StoreClosedCallback,null)}refresh(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U;const{store:G,offerReadById:j}=(yield this._dynamicStore.getDynamicStoreUIData({storeKey:$.GA.PetShop})).expect("failed to get store data"),V=Object.values(j).some((k=>!k));this.updateValue(F.HasNotification,V);const W=G.sections.find((k=>k.id===$.Xx.DefeatedPets));if(H.A.isDefined(W)&&(null!==(B=null===(k=W.offers)||void 0===k?void 0:k.length)&&void 0!==B?B:0)>0){const k=(null!==(U=W.expiresAt)&&void 0!==U?U:0)-Date.now();k>0&&this.updateValue(F.MillisecondsRemaining,k)}}))}};(0,G.Cg)([(0,W.b)("84d-05d4"),(0,G.Sn)("design:type",Object)],K.prototype,"_dynamicStore",void 0),K=(0,G.Cg)([(0,j.EVk)("DynamicStoreAccessPoint")],K)},77992:(k,B,U)=>{"use strict";U.d(B,{W:()=>Ot});var F,G=U(8674),j=U(62459),$=U(88022),H=U(99625),V=U(34656),W=U(64270),q=U(39324),K=U(58776),z=U(8394),Y=U(66582),Q=U(88131),X=U(15821),Z=U(35120),J=U(83133),tt=U(94566),et=U(77938),it=U(28047),st=U(85540),nt=U(43858),at=U(46784),rt=U(65050),ot=U(41674),ht=U(90744),ct=U(13956),dt=U(642),lt=U(95057),ut=U(16847),ft=U(21097),bt=U(79424),pt=U(89192),vt=U(53661),gt=U(88217),mt=U(77713),yt=U(11191),_t=U(10711),Et=U(6719),wt=U(80060),Tt=U(86283),St=U(64868),At=U(55080),Ct=U(96797);let Ot=F=class extends it.v{constructor(){super(...arguments),this.onPurchaseStarted=this.createTidySignal(),this.onPurchaseFinished=this.createTidySignal(),this.onPurchaseFailed=this.createTidySignal(),this.onTabSelected=this.createTidySignal(),this.onItemSelected=this.createTidySignal(),this.onWalletsLoaded=this.createTidySignal(),this.onStoreLoaded=this.createTidySignal(),this.onStoreSelected=this.createTidySignal(),this._selectedCardData=null,this._walletsLoading=!1}create(){super.create(),this._walletsLoading=!0}postCreate(){super.postCreate(),this.addListenerToSignal(this._tabSpawner.onPrefabSpawned,(k=>this.onTabLoaded(k))),this._gameNativeAppNotificationProvider.triggerNotification({id:q.fK.ShopVisitNotification})}initialize(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G,$,q,K,z,Y,Q,tt,et;if(!X.A.isDefined(k))return void j.VyI.log("Dynamic Store: Error initializing store: no valid data",j.$bb.Error);this._shelfScrollLink.scrollToTop(),this._data=k;const{store:it,offerReadById:st,specialOffer:at,storeKey:rt}=k,{sections:ot}=it;null===(B=this.headerNavigation)||void 0===B||B.setSelectedTabForKey(null!=rt?rt:"");const ht=[],ct=[];for(const k of ot){const{offers:B}=k;!V.j.specialOfferSectionHasContent(k,at)&&(0,_t.ty)(k)||(ht.push(this.createInjectedTabData(k,B.every((k=>st[k.task.id])))),k.id===W.Xx.SpecialOffer&&at?ct.push(...this.addSpecialOfferShelf(at,k)):ct.push(...this.addItemsSection(k,B,st)))}this._tabSpawner.destroySpawnedPrefabs();const dt=ht.map((k=>k.DYNAMIC_STORE_TAB_ICON[0]));if(yield Z.q.instance.prodigy.load.assetsAsPromise(dt),null===(F=null===(U=this.gameObject)||void 0===U?void 0:U.isDestroyed)||void 0===F||F)return;const[lt]=yield Promise.all([this._shelfSpawner.spawnPrefabsWithData(ct),this._tabSpawner.spawnDefaultPrefabsFromDataArray(ht)]);if(null===($=null===(G=this.gameObject)||void 0===G?void 0:G.isDestroyed)||void 0===$||$)return;for(const k of lt){const{config:B,attachedObject:U}=k,F=null==k?void 0:k.GameObject;if(!X.A.isDefined(F))break;switch(null==B?void 0:B.prefabGuid){case H.l.DynamicStoreSectionHeader:const G=null!==(q=F.findComponent(bt.D))&&void 0!==q?q:F.addComponent(bt.D);G.stateId=this._shelfScrollLink.contextId,G.isTab=!1,G.register(null==B?void 0:B.data.DYNAMIC_STORE_SHELF_CATEGORY),F.hasComponent(gt.B)||F.addComponent(gt.B),null===(z=null===(K=F.parent)||void 0===K?void 0:K.findComponent(yt.N))||void 0===z||z.triggerSort(),k.keepAlive=!0;break;case H.l.StoreItemCard:const j=null==U?void 0:U.findComponent(J.l);if(X.A.isDefined(j)&&(this._itemCardToggleGroup.addSelectable(j),this._selectedCardData)){const k=null===(Y=this._selectedCardData.dynamicStoreData)||void 0===Y?void 0:Y.offers,B=null==U?void 0:U.findComponent(nt.j).getItemData();k&&(null===(Q=null==B?void 0:B.dynamicStoreData)||void 0===Q?void 0:Q.offers)&&k[0].task.id===B.dynamicStoreData.offers[0].task.id&&j.setSelected(!0)}case H.l.DynamicStoreBundlesPanel:default:F.findComponents(gt.B).map((k=>k.destroy())),null===(et=null===(tt=F.parent)||void 0===tt?void 0:tt.findComponent(yt.N))||void 0===et||et.triggerSort(),k.keepAlive=!1}}this.setupWallets();const ut=this.getInjectedValue("DYNAMIC_STORE_SCROLL_TO");X.A.isDefined(ut)&&ht.find((k=>k.DYNAMIC_STORE_SHELF_CATEGORY===ut))&&this._shelfScrollLink.scrollToGroup(ut),this.onStoreLoaded.dispatch()}))}refreshStoreContents(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.initialize(this._data)}))}notifyWalletsLoaded(){this._walletsLoading=!1,this.onWalletsLoaded.dispatch()}setupWallets(){var k;this._walletMap=new Map,null===(k=this._walletContainer)||void 0===k||k.findComponentsInChildren(ut.n).forEach((k=>{this._walletMap.set(k.currencyID,{display:k,tooltipX:k.GameObject.transform.worldPosition.x,tooltipY:k.GameObject.transform.worldPosition.y})}))}createSectionShelfData(k,B,U){var F,G;if(0===B.length)return[{prefabGuid:H.l.DynamicStoreEmptySection,data:{DYNAMIC_STORE_SHELF_EMPTY_TITLE:null===(F=k.emptySectionInfo)||void 0===F?void 0:F.title,DYNAMIC_STORE_SHELF_EMPTY_SUBTITLE:null===(G=k.emptySectionInfo)||void 0===G?void 0:G.subtitle}}];const $=(0,_t.K8)(B,U),W=[],q=St._.areBundlesEnabled(),[Q,J]=$.reduce((([k,B],U)=>{var F,G;return null!==(G=null===(F=U.additionalItems)||void 0===F?void 0:F.length)&&void 0!==G&&G?q&&!(0,st.w)(U)&&k.push(U):B.push(U),[k,B]}),[[],[]]),tt=Q.map((B=>{var U;const F=B.dynamicStoreData.isNew,G=B.additionalItems.map((k=>({[vt.AP.ItemCardData]:{item:et.t.getItem(k.type,k.ID),quantity:k.N},[vt.AP.ItemCardIsNew]:F})));let $;const H=null===(U=B.dynamicStoreData)||void 0===U?void 0:U.offers.find((k=>k.progress.status!==K.t.COMPLETE));X.A.isDefined(null==H?void 0:H.expiresAt)&&($=H.expiresAt-Z.q.instance.prodigy.timeManager.getLocalTimeMs());const W=(0,z.p)("currency",B.currencyID)&&this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(B.currencyAmount),q=H?V.j.getItemRewards(H.task):[],Q=(0,_t.H9)(q)&&this._player.getMemberTier()===Y._$.NonMember,J=(0,_t.$U)(q,this._player.getLevel()),tt=q.reduce(((k,B)=>{var U,F,G;return Math.max(k,null!==(G=null===(F=null===(U=et.t.getItem(B.type,B.ID))||void 0===U?void 0:U.data)||void 0===F?void 0:F.lockLevel)&&void 0!==G?G:0)}),0),it=X.A.isDefined(B.item.ID)&&!Tt.D.hasBeenRescuedPreviously(this._player,B.item.ID);return{prefabGuid:this.getBundlePrefab(k),data:{DYNAMIC_STORE_BUNDLE_OFFER_TITLE:B.dynamicStoreData.title,DYNAMIC_STORE_BUNDLE_OFFER_SUBTITLE:B.dynamicStoreData.subtitle,DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_DATA:[{PET_ID:B.item.ID}],DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_NAME:B.item.data.name,DYNAMIC_STORE_BUNDLE_ADDITIONAL_OFFERS:G,DYNAMIC_STORE_BUNDLE_PURCHASE_BUTTON_CALLBACK:()=>{this._segment.featureCommon.sendButtonEvent({buttonName:`bundle_${B.dynamicStoreData.offers[0].task.id}`,interfaceType:ot.Wm.Shop,interfaceName:at.B.DynamicStoreBundle}),Q?Z.q.instance.prodigy.open.membershipInfo(void 0):this.buyBundle(B).catch(j.RQr.createHandler("Error purchasing bundle"))},DYNAMIC_STORE_BUNDLE_PRICE_AMOUNT:B.currencyAmount,DYNAMIC_STORE_BUNDLE_PRICE_CURRENCY:B.currencyID,DYNAMIC_STORE_BUNDLE_IS_NEW:F,DYNAMIC_STORE_BUNDLE_PET_IS_NEW:it,DYNAMIC_STORE_BUNDLE_HARD_CURRENCY_LOCKED:W,DYNAMIC_STORE_BUNDLE_MEMBER_LOCKED:Q,DYNAMIC_STORE_BUNDLE_LEVEL_LOCKED:J&&!Q,DYNAMIC_STORE_BUNDLE_LEVEL_NEEDED:this._localizer.getText("ITEMCARD_LEVEL",tt),DYNAMIC_STORE_BUNDLE_LEVEL_MESSAGE:this._localizer.getText("STORE_TOOLTIP_MESSAGE_7",tt,this._player.getLevel()),DYNAMIC_STORE_BUNDLE_TIME_REMAINING:$}}})),it=J.map((B=>({prefabGuid:H.l.StoreItemCard,data:{DYNAMIC_STORE_ITEM_DATA:B,DYNAMIC_STORE_SHELF_SELECT_CARD:this.onItemCardSelected.bind(this,k.label.toLocaleLowerCase())}})));return W.push(...tt,...it),W}getBundlePrefab(k){const B=k.prefabGUID;return B&&Object.values(H.l).includes(B)?B:H.l.DynamicStoreBundlesPanel}addSpecialOfferShelf(k,B){const U=!!X.A.isDefined(B.expiresAt)&&B.expiresAt-Z.q.instance.prodigy.timeManager.getLocalTimeMs();return[{prefabGuid:H.l.DynamicStoreSectionHeader,data:{DYNAMIC_STORE_SHELF_CATEGORY:B.id.toString(),DYNAMIC_STORE_SHELF_LABEL:B.label,DYNAMIC_STORE_SHELF_MILLISECONDS_REMAINING:U,DYNAMIC_STORE_SHELF_CURRENCIES:{},DYNAMIC_STORE_SHELF_HEADER_COLOUR:B.colour}},{prefabGuid:H.l.DynamicStoreSegmentedOffersPanel,data:Object.assign({},Ct.P.getFullOfferInjectableProperties(k))}]}addItemsSection(k,B,U){if(0===B.length&&!k.emptySectionInfo)return[];const F=!!X.A.isDefined(k.expiresAt)&&k.expiresAt-Z.q.instance.prodigy.timeManager.getLocalTimeMs(),G={};return B.forEach((k=>{var B;const{currency:U}=k.task.metadata;if(X.A.isDefined(U)){const k=null!==(B=G[U])&&void 0!==B?B:0;G[U]=k+1}})),[{prefabGuid:H.l.DynamicStoreSectionHeader,data:{DYNAMIC_STORE_SHELF_CATEGORY:k.id.toString(),DYNAMIC_STORE_SHELF_LABEL:k.label,DYNAMIC_STORE_SHELF_MILLISECONDS_REMAINING:F,DYNAMIC_STORE_SHELF_CURRENCIES:G,DYNAMIC_STORE_SHELF_HEADER_COLOUR:k.colour}},...this.createSectionShelfData(k,B,U)]}createInjectedTabData(k,B){var U,F;const G=k.id.toString();return Object.assign(Object.assign({DYNAMIC_STORE_SHELF_CATEGORY:G,DYNAMIC_STORE_TAB_TEXT:k.label,DYNAMIC_STORE_TAB_ICON:Et.y.toInjectionParams(k.icon),DYNAMIC_STORE_TAB_UNREAD:!B},X.A.isDefined(k.config.segmentData)?{DYNAMIC_STORE_TAB_SEGMENT_NAME:null===(U=k.config.segmentData)||void 0===U?void 0:U.tabName,DYNAMIC_STORE_TAB_SEGMENT_INTERFACE_TYPE:null===(F=k.config.segmentData)||void 0===F?void 0:F.interfaceType,DYNAMIC_STORE_TAB_SHOP_TAB_NAME:{shop_tab_name:this._data.store.label.toLowerCase().replace(/\W/g,"-")}}:void 0),{DYNAMIC_STORE_TAB_ON_SELECTED:()=>{this.onTabSelected.dispatch(G)}})}onItemCardSelected(k,B){var U,G,j,$;const H=B.getItemData();if(!H.dynamicStoreData)throw new Error("Item card does not have dynamicStoreData");const W=H.dynamicStoreData.offers[0],q=V.j.getItemRewards(W.task)[0],z=H.dynamicStoreData.offers.reduce(((k,B)=>k+(B.progress.status===K.t.COMPLETE?1:0)),0),Y=(0,_t.uA)(W,((k,B)=>{var U;return null===(U=et.t.getItem(k,B))||void 0===U?void 0:U.data})),Q=this._walletMap.get(H.currencyID);Q&&(this._itemPreview.overrideCurrencyTooltipPosition.x=Q.tooltipX,this._itemPreview.overrideCurrencyTooltipPosition.y=Q.tooltipY+F.CURRENCY_TOOLTIP_Y_OFFSET),this.renderItemPreview(H),this._selectedCardData=H;for(const F of H.dynamicStoreData.offers)null===(G=(U=this._data).onOfferSeen)||void 0===G||G.call(U,F.task.id);B.setNewBadge(!1),this.onItemSelected.dispatch(k,H),this._segment.shop.sendDynamicStoreItemViewedEvent({storeKey:this._data.storeKey,itemType:null!==(j=H.item.type)&&void 0!==j?j:"",itemId:null!==($=H.item.ID)&&void 0!==$?$:0,cost:Y,category:k,categoryId:k,isOwned:this._player.isItemOwned({type:q.type,ID:q.ID}),itemStack:H.dynamicStoreData.itemQuantity-z,instanceId:this._segment.featureCommon.getCurrentInterfaceID(at.B.UnifiedStore)})}renderItemPreview(k){this._itemPreview.renderSelectedItem(k,(k=>(0,G.sH)(this,void 0,void 0,(function*(){return this.buyStoreItem(k)})))),this._itemPreview.onPurchaseFailure.removeAll(this),this._itemPreview.onPurchaseFailure.add(this.handlePurchaseFailure,this)}handlePurchaseFailure(k,B){var U,F,G,H,V;if(X.A.isDefined(k)){let j=null===(U=k.dynamicStoreData)||void 0===U?void 0:U.offers[0].task,$=k;if(j||(j=null===(G=null===(F=this._selectedCardData)||void 0===F?void 0:F.dynamicStoreData)||void 0===G?void 0:G.offers[0].task,$=this._selectedCardData),j){const k=(null!==(V=null===(H=$.additionalItems)||void 0===H?void 0:H.length)&&void 0!==V?V:0)>0;this.sendPurchaseFailedEvent(j,Object.assign(Object.assign({},$.item),{type:k?"bundle":$.item.type,id:k?+j.id:$.item.ID,cost:{type:"currency",ID:$.currencyID,N:$.currencyAmount}}),B,k?{bundleName:j.metadata.displayName}:void 0)}}const W=Z.q.instance.prodigy,q=W.gameContainer.get(j.$Bt.LocalizationService);switch(B){case ft.WE.OfferExpired:W.open.confirmationDialogWideButtons(new dt.k(q.getText("DYNAMIC_STORE_LEAVE"),(()=>{this.gameObject.destroyDeferred()}),q.getText("DIALOG_STAY"),void 0,{atlas:$._.Ui_store_json,name:"icon-large-exclamation"},void 0,550,q.getText("MESSAGE_TITLE_OOPS"),q.getText("DYNAMIC_STORE_ERROR_OFFER_EXPIRED_BODY")));break;case ft.WE.NotEnoughCurrency:case ft.WE.MemberLocked:case ft.WE.LevelLocked:break;default:j.RQr.logError(B,"Error confirming store purchase"),W.open.message(q.getText("NETWORK_ERROR"))}}buyStoreItem(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G,j,$,H;if(!k.dynamicStoreData)return Q.Q.error(ft.WE.NoData);const W=k.dynamicStoreData.offers.find((k=>k.progress.status!==K.t.COMPLETE));if(!W)return Q.Q.error(ft.WE.AllPurchased);if((null!==(B=W.expiresAt)&&void 0!==B?B:1/0)<=Z.q.instance.prodigy.timeManager.getLocalTimeMs())return Q.Q.error(ft.WE.OfferExpired);if((null!==(F=null===(U=k.item.data)||void 0===U?void 0:U.member)&&void 0!==F?F:0)>0&&this._player.getMemberTier()===Y._$.NonMember)return Q.Q.error(ft.WE.MemberLocked);try{const k=V.j.getItemRewards(W.task)[0];this.onPurchaseStarted.dispatch();const B=this._data.store.sections.find((k=>k.id===W.task.metadata.category)),U=yield this._dynamicStoreQuestManager.purchaseItem({offer:W,storeKey:this._data.storeKey,storeCategory:null!==(G=null==B?void 0:B.label.toLowerCase())&&void 0!==G?G:"Unknown",categoryId:null==B?void 0:B.id.toString(),itemSegmentData:{instance_type:rt.N.Interface,instance_id:this._segment.featureCommon.getCurrentInterfaceID(at.B.UnifiedStore),sink_type:k.type,sink_id:k.ID}});this.completeItemPurchase(W);const F=this._itemCardToggleGroup.getToggles();for(const G of F){const k=null===(j=G.GameObject)||void 0===j?void 0:j.findComponentInParent(nt.j);if(X.A.isDefined(k)){const B=null!==(H=null===($=k.getItemData().dynamicStoreData)||void 0===$?void 0:$.offers)&&void 0!==H?H:[];for(const U of B)U.task.id===W.task.id&&k.updateTask(W)}}return Q.Q.success(U)}catch(e){return this.onPurchaseFailed.dispatch(),Q.Q.error(e)}}))}buyBundle(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G;if(!this._paymentManager.canAfford({currency:k.currencyID,value:k.currencyAmount}))return this.handlePurchaseFailure(k,ft.WE.NotEnoughCurrency),this._segment.purchase.sendFunnelStart({type:"Dynamic-Store-Hard-Currency-Insufficient-Resources-Bundle",category:"Dynamic-Store-Hard-Currency-Insufficient-Resources-Store",contentId:k.dynamicStoreData.offers[0].task.id.toString(),adType:lt.R.UnifiedConversionFlow}),yield Z.q.instance.prodigy.open.battlePassUltimateMemberUpsellModal(),void(yield this.refreshStoreContents());const j=yield this.buyStoreItem(k);if(j.isSuccess()){for(const j of null!==(U=null===(B=k.dynamicStoreData)||void 0===B?void 0:B.offers)&&void 0!==U?U:[])null===(G=(F=this._data).onOfferSeen)||void 0===G||G.call(F,j.task.id),this._data.offerReadById[j.task.id]=!0;yield this.refreshStoreContents()}else this.handlePurchaseFailure(k,j.error)}))}sendPurchaseFailedEvent(k,B,U,F){var G,j;const $=this._data.store.sections.find((B=>B.id===k.metadata.category));this._segment.shop.sendDynamicStorePurchaseFailedEvent({storeKey:this._data.storeKey,itemType:B.type,itemId:B.id,cost:{type:B.cost.type,currency:B.cost.ID,value:B.cost.N},category:null!==(G=null==$?void 0:$.label.toLowerCase())&&void 0!==G?G:k.metadata.category,categoryId:null!==(j=null==$?void 0:$.id.toString())&&void 0!==j?j:k.metadata.category,failReason:U,funnelId:this._segment.purchase.getFunnelID(),instanceId:this._segment.featureCommon.getCurrentInterfaceID(at.B.UnifiedStore),bundleData:F})}completeItemPurchase(k){var B;this.onPurchaseFinished.dispatch(k.task.metadata.category);const U=Z.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=(0,_t.uA)(k,((k,B)=>{var U;return null===(U=et.t.getItem(k,B))||void 0===U?void 0:U.data}));this.onCurrencySpent(F.currency,U.getCurrencyAmount(F.currency,F.type));const G=k.progress.data,j=(0,_t.Nx)(k);X.A.isDefined(G)?(G.timesCompleted=(null!==(B=G.timesCompleted)&&void 0!==B?B:0)+1,G.timesCompleted>=j&&(k.progress.status=K.t.COMPLETE)):1===j?k.progress.status=K.t.COMPLETE:k.progress.data={progress:0,timesCompleted:1}}onCurrencySpent(k,B){const U=this._walletMap.get(k);U&&U.display.playSpendEffect(B)}onTabLoaded(k){const B=k.findComponent(J.l);this._tabToggleGroup.addSelectable(B)}onGroupChanged(k,B){var U,F;const{onOfferSeen:G,store:j}=this._data;if(G){const B=null!==(F=null===(U=j.sections.find((B=>B.id===k)))||void 0===U?void 0:U.offers)&&void 0!==F?F:[];for(const k of B)G(k.task.id)}wt.d.updateInjectedValues(B.GameObject,{DYNAMIC_STORE_TAB_UNREAD:!1})}onPooledObjectEnter(k,B){var U,F;switch(B.prefabGuid){case H.l.StoreItemCard:const B=k.findComponentInChildren(J.l);if(this._itemCardToggleGroup.addSelectable(B),this._selectedCardData){const G=null===(U=this._selectedCardData.dynamicStoreData)||void 0===U?void 0:U.offers,j=k.findComponent(nt.j).getItemData();G&&(null===(F=null==j?void 0:j.dynamicStoreData)||void 0===F?void 0:F.offers)&&G[0].task.id===j.dynamicStoreData.offers[0].task.id&&B.setSelected(!0)}break;case H.l.DynamicStoreSectionHeader:}}onPooledObjectExit(k,B){switch(B.prefabGuid){case H.l.StoreItemCard:const B=k.findComponentInChildren(J.l);(null==B?void 0:B.isSelected())&&B.setSelected(!1),this._itemCardToggleGroup.removeSelectable(B);break;case H.l.DynamicStoreBundlesPanel:case H.l.DynamicStoreSectionHeader:}}handleNavigationTabSelection(k){this._itemCardToggleGroup.setSelected(),this._selectedCardData=null,this.selectStoreWithKey(k.key)}selectStoreWithKey(k){if(X.A.isDefined(k)){if(k===W.g0.AllShops)return void(X.A.isDefined(this.allShopsMenuContainer)&&(this.allShopsMenuContainer.active=!0));X.A.isDefined(this.allShopsMenuContainer)&&(this.allShopsMenuContainer.active=!1),this.onStoreSelected.dispatch(k)}}handleDataLoadOrError(k){var B,U,F;if(!k.isSuccess())switch(j.VyI.log(null!==(U=null===(B=k.error)||void 0===B?void 0:B.message)&&void 0!==U?U:"There was an error loading store data",j.$bb.Error),null===(F=k.error)||void 0===F?void 0:F.message){case W.IF.StoreKeyNotFound:return this.allShopsMenuContainer.active=!0,void this.onStoreLoaded.dispatch();default:return void Z.q.instance.prodigy.open.networkError((()=>this.gameObject.destroyDeferred()))}const G=k.get();if("string"==typeof G.DYNAMIC_STORE_DATA)return this.selectStoreWithKey(G.DYNAMIC_STORE_DATA),void this.onStoreLoaded.dispatch();wt.d.updateInjectedValues(this.gameObject,G)}};Ot.CURRENCY_TOOLTIP_Y_OFFSET=20,(0,G.Cg)([(0,ct.b)("7a1-ff33"),(0,G.Sn)("design:type",At.s)],Ot.prototype,"_dynamicStoreQuestManager",void 0),(0,G.Cg)([(0,ct.b)("743-fd51"),(0,G.Sn)("design:type",ht.E)],Ot.prototype,"_paymentManager",void 0),(0,G.Cg)([(0,ct.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Ot.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ot.prototype,"onPurchaseStarted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ot.prototype,"onPurchaseFinished",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ot.prototype,"onPurchaseFailed",void 0),(0,G.Cg)([(0,j.MnK)(pt.V),(0,G.Sn)("design:type",pt.V)],Ot.prototype,"_shelfScrollLink",void 0),(0,G.Cg)([(0,j.MnK)(tt.O),(0,G.Sn)("design:type",tt.O)],Ot.prototype,"_tabToggleGroup",void 0),(0,G.Cg)([(0,j.MnK)(mt.h),(0,G.Sn)("design:type",mt.h)],Ot.prototype,"_tabSpawner",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ot.prototype,"onTabSelected",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ot.prototype,"onItemSelected",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ot.prototype,"onWalletsLoaded",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ot.prototype,"onStoreLoaded",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ot.prototype,"onStoreSelected",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ot.prototype,"_walletContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ot.prototype,"allShopsMenuContainer",void 0),Ot=F=(0,G.Cg)([(0,j.EVk)("DynamicStore")],Ot)},282:(k,B,U)=>{"use strict";U.d(B,{Cv:()=>j});var F,G,j;U(53661);!function(k){k.Shelf="shelf",k.Header="header",k.SpecialOffer="special-offer",k.EmptyShelf="empty-shelf",k.Bundle="bundle"}(F||(F={})),function(k){k.DYNAMIC_STORE_BUNDLE_TITLE="DYNAMIC_STORE_BUNDLE_OFFER_TITLE",k.DYNAMIC_STORE_BUNDLE_SUBTITLE="DYNAMIC_STORE_BUNDLE_OFFER_SUBTITLE",k.DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_ID="DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_ID",k.DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_NAME="DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_NAME",k.DYNAMIC_STORE_BUNDLE_ADDITIONAL_OFFERS="DYNAMIC_STORE_BUNDLE_ADDITIONAL_OFFERS",k.DYNAMIC_STORE_BUNDLE_PURCHASE_BUTTON_CALLBACK="DYNAMIC_STORE_BUNDLE_PURCHASE_BUTTON_CALLBACK",k.DYNAMIC_STORE_BUNDLE_PRICE_AMOUNT="DYNAMIC_STORE_BUNDLE_PRICE_AMOUNT",k.DYNAMIC_STORE_BUNDLE_PRICE_CURRENCY="DYNAMIC_STORE_BUNDLE_PRICE_CURRENCY",k.DYNAMIC_STORE_BUNDLE_IS_NEW="DYNAMIC_STORE_BUNDLE_IS_NEW",k.DYNAMIC_STORE_BUNDLE_HARD_CURRENCY_LOCKED="DYNAMIC_STORE_BUNDLE_HARD_CURRENCY_LOCKED",k.DYNAMIC_STORE_BUNDLE_MEMBER_LOCKED="DYNAMIC_STORE_BUNDLE_MEMBER_LOCKED",k.DYNAMIC_STORE_BUNDLE_LEVEL_LOCKED="DYNAMIC_STORE_BUNDLE_LEVEL_LOCKED",k.DYNAMIC_STORE_BUNDLE_LEVEL_NEEDED="DYNAMIC_STORE_BUNDLE_LEVEL_NEEDED",k.DYNAMIC_STORE_BUNDLE_LEVEL_MESSAGE="DYNAMIC_STORE_BUNDLE_LEVEL_MESSAGE"}(G||(G={})),function(k){k.CouldNotGetOffers="could-not-get-store-offers"}(j||(j={}))},37816:(k,B,U)=>{"use strict";U.d(B,{q:()=>V});var F=U(8674),G=U(62459),j=U(69811),$=U(83133),H=U(11647);let V=class extends((0,H.o)(G.uAl)){constructor(){super(...arguments),this.onTabSelected=this.createTidySignal(),this._graphicsSwappers=[]}get data(){return this._data}get toggle(){return this._toggle}init(k){this.toggle.setSelected(!0),this.toggle.inputEnabled=!0,this._data=k,this.addListenerToSignal(this.toggle.onSelected,(()=>this.onTabSelected.dispatch(this._data))),G.Aq$.isDefined(this.labelComponent)&&(this.labelComponent.text=k.label),this._graphicsSwappers=this.gameObject.findComponentsInChildren(j.y)}swapGraphic(k){this._graphicsSwappers.forEach((B=>B.selectGraphicAtIndex(k)))}};(0,F.Cg)([(0,G.Pqz)($.l),(0,F.Sn)("design:type",$.l)],V.prototype,"_toggle",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],V.prototype,"labelComponent",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onTabSelected",void 0),V=(0,F.Cg)([(0,G.EVk)("HeaderNavigationTab")],V)},50379:(k,B,U)=>{"use strict";U.d(B,{c:()=>F});const F={label:"All Shops",key:U(64270).g0.AllShops}},24595:(k,B,U)=>{"use strict";U.d(B,{V:()=>K});var F=U(8674),G=U(62459),j=U(64270),$=U(94566),H=U(69811),V=U(11647),W=U(37816),q=U(50379);let K=class extends((0,V.o)(G.uAl)){constructor(){super(...arguments),this.onTabDataLoaded=this.createTidySignal(),this.onTabSelected=this.createTidySignal(),this.includeAllShopsTab=!1,this._selectedTabKey="",this._storeTabsObjects=[],this._didSetup=!1}postCreate(){var k;this._toggleGroup=null===(k=this.tabsContainerObject)||void 0===k?void 0:k.findComponent($.O)}setup(k){const B=Object.entries(k).map((([k,B])=>{var U;return{key:k,label:G.Aq$.isDefined(B.nameLocalizationKey)&&""!==B.nameLocalizationKey&&null!==(U=this._baseLocalizer.getText(B.nameLocalizationKey))&&void 0!==U?U:B.label,metadata:Object.assign({},B)}}));this._storeTabsData=[...B],this.includeAllShopsTab&&this._storeTabsData.unshift(q.c),this.setTabsData(this._storeTabsData),this._didSetup=!0}updateHeader(k){if(!G.Aq$.isDefined(k.metadata))return;const B=k.metadata.cover;this.backgroundGraphicSwapper.selectGraphicAtIndex(B),this._storeTabsObjects.forEach((k=>k.GameObject.active=!1));const U=this._storeTabsObjects.map(((k,U)=>(0,F.sH)(this,void 0,void 0,(function*(){return this.updateTab(U,B)}))));Promise.all(U).catch(G.RQr.createHandler("HeaderNavigationTabsControllerComponent: Could not update tabs."))}updateTab(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U,F;if(this._storeTabsObjects[k].swapGraphic(B),this._storeTabsData[k].key===j.g0.AllShops)return void(this._storeTabsObjects[k].GameObject.active=this.includeAllShopsTab);if(!G.Aq$.isDefined(this._storeTabsData[k].metadata))return void(this._storeTabsObjects[k].GameObject.active=!1);const $=null===(F=null===(U=this._storeTabsData[k])||void 0===U?void 0:U.metadata)||void 0===F?void 0:F.cover;this._storeTabsObjects[k].GameObject.active=$===B}))}setSelectedTabForKey(k){var B,U,F;if(this._selectedTabKey=k,!this._didSetup)return void this.addOneTimeListenerToSignal(this.onTabDataLoaded,(()=>this.setSelectedTabForKey(k)));const G=this.tabsContainerObject.children.findIndex((k=>{var B;return this._selectedTabKey===(null===(B=k.findComponent(W.q))||void 0===B?void 0:B.data.key)}));G>=0?(null===(B=this._toggleGroup)||void 0===B||B.setItemSelectedByIndex(G,!0),null===(U=this._toggleGroup)||void 0===U||U.setSelectedIndex(G),this.updateHeader(this._storeTabsData[G])):null===(F=this._toggleGroup)||void 0===F||F.setSelected()}setTabsData(k,B=0){var U;G.Aq$.isDefined(this.tabsContainerObject)&&(null===(U=this._toggleGroup)||void 0===U||U.clearSelectables(),this.tabsContainerObject.children.forEach((k=>k.destroyDeferred())),Promise.all(k.map(((k,B)=>(0,F.sH)(this,void 0,void 0,(function*(){return[yield this._prefabLoader.loadWithDependenciesFromGUID(this.tabPrefab,this.tabsContainerObject),k,B]}))))).then((k=>{var U;k.forEach((([k,B,U])=>{var F;const j=k.findComponent(W.q);this.tabsContainerObject.addChildAt(k,U),G.Aq$.isDefined(j)&&(this._storeTabsObjects.push(j),null===(F=this._toggleGroup)||void 0===F||F.addSelectable(j.toggle),this.addListenerToSignal(j.onTabSelected,this.setSelectedTab.bind(this)),j.init(B))})),this._selectedTabKey?this.setSelectedTabForKey(this._selectedTabKey):null===(U=this._toggleGroup)||void 0===U||U.setSelectedIndex(B),this.onTabDataLoaded.dispatch()})).catch((k=>{var B,U;G.VyI.log("There was an error creating the tabs",G.$bb.Error),G.VyI.log(null===(U=(B=k).toString)||void 0===U?void 0:U.call(B),G.$bb.Error)})))}setSelectedTab(k){this.onTabSelected.dispatch(k),this.updateHeader(k)}};(0,F.Cg)([(0,G.Cdj)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],K.prototype,"_baseLocalizer",void 0),(0,F.Cg)([(0,G.i0J)(G.Z$z.Prefab),(0,F.Sn)("design:type",String)],K.prototype,"tabPrefab",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],K.prototype,"tabsContainerObject",void 0),(0,F.Cg)([(0,G.MnK)(H.y),(0,F.Sn)("design:type",H.y)],K.prototype,"backgroundGraphicSwapper",void 0),(0,F.Cg)([(0,G.Cdj)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],K.prototype,"_prefabLoader",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],K.prototype,"onTabDataLoaded",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],K.prototype,"onTabSelected",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],K.prototype,"includeAllShopsTab",void 0),K=(0,F.Cg)([(0,G.EVk)("HeaderNavigationTabsController")],K)},55301:(k,B,U)=>{"use strict";U.d(B,{X:()=>G,o:()=>j});var F=U(64270);const G={1:[F.GA.PetShop],2:[F.GA.WizardCenter,"ab9ae0de-23f9-41de-8a36-ef5fdd96dd51"],4:[F.GA.SpecialOffers],5:[F.GA.RegionShop,"ea1443ff-9180-46ed-98f2-4b3299e272b2"],6:[F.GA.RegionShop,"c3755249-2988-4b00-ad85-c26fa7469a2e"],7:[F.GA.RegionShop,"13bececf-ea11-49ac-b3e6-b14d83a0d246"],8:[F.GA.RegionShop,"f9d01a0c-c701-4f49-8358-96ba8823c26b"],13:[F.GA.StarlightShop],14:[F.GA.PumpkinfestShop],15:[F.GA.WinterfestShop],37:[F.GA.SummerfestShop],71:[F.GA.MoonlightShop],70:[F.GA.FestivalShop],72:[F.GA.SpringfestShop],25:[F.GA.SpringfestShop,"6dc8149e-bb87-4976-8c24-170becc12b77"],24:[F.GA.SpringfestShop,"d5803109-5aeb-498f-8bda-5e59fba845fc"],19:[F.GA.RegionShop,"08e2e778-6192-46d8-a153-63f179000734"],21:[F.GA.TitanShop],22:[F.GA.TitanShop],35:[F.GA.AcademyShop],36:[F.GA.AcademyShop],46:[F.GA.WizardCenter]},j=[40,41,42,43,44,23,9,11,12,47,66,68,69]},42959:(k,B,U)=>{"use strict";U.d(B,{I:()=>Z});var F,G=U(8674),j=U(62459),$=U(79687),H=U(34656),V=U(64270),W=U(88131),q=U(96535),K=U(55080),z=U(282),Y=U(34829),Q=U(15821),X=U(55328);let Z=F=class{constructor(){this._cachedWidgetItems=void 0,this._lastWidgetItemFetchTime=0}getDynamicStoreUIData(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F;null!==(B=k.storeSegmentIdentifier)&&void 0!==B||(k.storeSegmentIdentifier=V.qO.DynamicStore);const G=yield this._dynamicStoreQuestManager.getStoreOffers(k.storeKey);if(!G.isSuccess())return j.VyI.log(`${G.error}`,j.$bb.Error),W.Q.error(null!==(U=G.error)&&void 0!==U?U:z.Cv.CouldNotGetOffers);const $=G.get(),q=this.getPlayerData(),K=this._segmentedOffers.userCanReceiveSegmentedOffers()?this._segmentedOffers.activeOffer:void 0,Y={},Q=Object.assign(Object.assign({},$),{sections:$.sections.filter((k=>k.id===V.Xx.SpecialOffer?H.j.specialOfferSectionHasContent(k,K):k.offers.length>0||!!k.emptySectionInfo))});for(const k of Q.sections)for(const B of null!==(F=k.offers)&&void 0!==F?F:[])Y[B.task.id]=B.task.id in q.seenOffers;return this.cleanupUnusedPlayerData(q,Y),W.Q.success({store:Q,offerReadById:Y,specialOffer:K,onOfferSeen:k=>this.markOfferRead(k),storeKey:k.storeKey})}))}markOfferRead(k){this.getPlayerData().seenOffers[k]=Date.now(),this._player.updated=!0,this._dynamicStoreQuestManager.sendHudButtonData().catch(j.RQr.createHandler("DynamicStoreDataProvider: Could not update HUD buttons."))}getPlayerData(){var k,B;return null!==(k=(B=this._player.data).dynamicStore)&&void 0!==k||(B.dynamicStore={seenOffers:{}}),this._player.data.dynamicStore}cleanupUnusedPlayerData(k,B){const U=Date.now(),F=U-2592e6;for(const[G,j]of Object.entries(k.seenOffers))B[G]?k.seenOffers[G]=U:(!0===j||j=this._lastWidgetItemFetchTime+F.WIDGET_ITEM_FETCH_COOLDOWN)&&(this._cachedWidgetItems=(yield this._networkHandler.getHudWidgetItems()).hudWidgetitems,this._lastWidgetItemFetchTime=Date.now()),this._cachedWidgetItems}))}};Z.WIDGET_ITEM_FETCH_COOLDOWN=Y.s.HOURS_IN_MS,(0,G.Cg)([(0,$.inject)("306-5359"),(0,G.Sn)("design:type",q.W)],Z.prototype,"_player",void 0),(0,G.Cg)([(0,$.inject)("a02-c2b2"),(0,G.Sn)("design:type",Function)],Z.prototype,"_segmentedOffers",void 0),(0,G.Cg)([(0,$.inject)("7a1-ff33"),(0,G.Sn)("design:type",K.s)],Z.prototype,"_dynamicStoreQuestManager",void 0),(0,G.Cg)([(0,$.inject)("9ea-3f44"),(0,G.Sn)("design:type",X.v)],Z.prototype,"_networkHandler",void 0),Z=F=(0,G.Cg)([(0,$.injectable)()],Z)},64007:(k,B,U)=>{"use strict";U.d(B,{_:()=>G});var F=U(87490);class G{}G.ELEMENT_BOOST_TEXT_CONFIG={[F.EElementType.Fire]:{localizationKey:"ELEMENTAL_BOOST_POPUP_FIRE",descriptionLocalizationKey:"ELEMENTAL_BOOST_DESC_FIRE",textColor:"#ffdd00",textStrokeColor:"#aa133d"},[F.EElementType.Ice]:{localizationKey:"ELEMENTAL_BOOST_POPUP_ICE",descriptionLocalizationKey:"ELEMENTAL_BOOST_DESC_ICE",textColor:"#a8fbff",textStrokeColor:"#375db0"},[F.EElementType.Physical]:{localizationKey:"ELEMENTAL_BOOST_POPUP_PHYSICAL",descriptionLocalizationKey:"ELEMENTAL_BOOST_DESC_PHYSICAL",textColor:"#d6eff0",textStrokeColor:"#4a4d76"},[F.EElementType.Plant]:{localizationKey:"ELEMENTAL_BOOST_POPUP_PLANT",descriptionLocalizationKey:"ELEMENTAL_BOOST_DESC_PLANT",textColor:"#bcd442",textStrokeColor:"#2b561f"},[F.EElementType.Storm]:{localizationKey:"ELEMENTAL_BOOST_POPUP_STORM",descriptionLocalizationKey:"ELEMENTAL_BOOST_DESC_STORM",textColor:"#fdf051",textStrokeColor:"#744274"},[F.EElementType.Water]:{localizationKey:"ELEMENTAL_BOOST_POPUP_WATER",descriptionLocalizationKey:"ELEMENTAL_BOOST_DESC_WATER",textColor:"#5cd0fd",textStrokeColor:"#0f4a8f"}}},99842:(k,B,U)=>{"use strict";U.d(B,{s:()=>$});var F=U(8674),G=U(95891),j=U(56567);class ${static sampleRandomEncounter(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U,H;const V=yield Promise.all(Object.values(k.encounters).map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return[yield $.meetsPreconditions(null!=B?B:new j.f,k.preconditions),k]}))))),W=[];let q=0;for(const[k,B]of V)k&&(W.push(B),q+=null!==(U=B.weight)&&void 0!==U?U:0);let K=Math.random()*q;for(const k of W)if(K-=null!==(H=k.weight)&&void 0!==H?H:0,K<=0)return k;return G.sample(W)}))}static meetsPreconditions(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){let U=!0;for(const F of null!=B?B:[])if(U=yield k.check(F.type,F.data),!U)break;return!!U}))}}},15571:(k,B,U)=>{"use strict";U.d(B,{p:()=>Z});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U.n($),V=U(35120),W=U(1195),q=U(77938),K=U(65068),z=U(3001),Y=U(80434),Q=U(5708),X=U(78889);let Z=class{constructor(){this.objectiveTypes=[K.q.RestrictedEncounter,K.q.RestrictedEncounterBlocking]}getObjectives(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=this.getActiveRestrictedEncounters(),U=V.q.instance.prodigy.world.getCurrentZone(),j=null===(k=Y.n[U])||void 0===k?void 0:k.questTag;if(!G.Aq$.isDefined(j))return[];const $=yield this._questManagerHub.getTasksInProgress([j]),W=yield Promise.all(B.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,H,V,W,z,Y,Q;const{requirementsId:Z}=k,J=null===(B=yield this.getRestrictionsForRequirements(Z))||void 0===B?void 0:B.data;if(!G.Aq$.isDefined(J))return[];const{requirements:tt}=null!==(U=this._featureRequirements.getProgressForRequirements(J))&&void 0!==U?U:{requirements:[]},et=[],{overrideQuestIds:it}=k,st=null!==(H=null===(F=$.get(j))||void 0===F?void 0:F.some((k=>{const{questID:B,taskID:U}=k;return null==it?void 0:it.some((k=>k===`${B}.${U}`))})))&&void 0!==H&&H?K.q.RestrictedEncounterBlocking:K.q.RestrictedEncounter;if(tt.every((k=>Object.values(k).every((({progress:k})=>{const[B,U]=k;return B>=U}))))){const B=q.t.getItem(null!==(V=k.assetType)&&void 0!==V?V:"boss",k.assetId);return et.push({id:`${Z}-${J.name}-*`,text:this._localizer.getText("DEFEAT_ENEMY",null!==(Q=null!==(z=null===(W=null==B?void 0:B.data)||void 0===W?void 0:W.nickname)&&void 0!==z?z:null===(Y=null==B?void 0:B.data)||void 0===Y?void 0:Y.name)&&void 0!==Q?Q:"the enemy"),progress:{current:0,target:1},type:st}),et}return X.yd({requirements:tt,objectiveIdPrefix:`${Z}-${J.name}`,type:st})})))));return H().flatten(W)}))}startEncounter(k,B,U){var F,j,$,V;if(!G.Aq$.isDefined(k))return;const{data:W}=this._playerDataProvider.player,q=null!==(F=W.restrictedEncounters)&&void 0!==F?F:{},K=null!==(j=q[W.zone])&&void 0!==j?j:[],z=null!==($=X.Lj(B))&&void 0!==$?$:0,Y=null!==(V=B.uniqueId)&&void 0!==V?V:z,Q=X.Wo(B),Z={requirementsId:k,encounterUniqueId:Y,assetType:Q,assetId:z,overrideQuestIds:U},J=K.findIndex((k=>k.encounterUniqueId===Y));if(-1!==J){if(H().isEqual(K[J],Z))return;K[J]=Z}else K.push(Z);q[W.zone]=K,this._playerDataProvider.player.data.restrictedEncounters=q,this._playerDataProvider.player.updated=!0,this._playerDataProvider.player.forceSaveCharacter()}getActiveRestrictedEncounters(k){var B,U;const{data:F,state:j}=this._playerDataProvider.player,{restrictedEncounters:$}=F;if(!G.Aq$.isDefined($))return[];const V=[];G.Aq$.isDefined(k)?V.push(...null!==(B=null==$?void 0:$[k])&&void 0!==B?B:[]):V.push(...H().flatten(Object.values($)));const W=[];for(const G of V){const{encounterUniqueId:k}=G;null!==(U=j.get(k.toString()))&&void 0!==U&&U?this.stopEncounter(G):W.push(G)}return W}stopEncounter(k){if(!this._playerDataProvider)return;const{data:B}=this._playerDataProvider.player,{restrictedEncounters:U}=B;if(G.Aq$.isDefined(U))for(const[F,G]of Object.entries(U)){const B=null==G?void 0:G.filter((B=>B.encounterUniqueId!==k.encounterUniqueId));if((null==B?void 0:B.length)!==(null==G?void 0:G.length))return this._playerDataProvider.player.data.restrictedEncounters[F]=B,void(this._playerDataProvider.player.updated=!0)}}getRestrictionsForRequirements(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this._restrictionsProvider.getRestrictionById(k)}))}};(0,F.Cg)([(0,j.inject)("b73-c131"),(0,F.Sn)("design:type",Q.X)],Z.prototype,"_restrictionsProvider",void 0),(0,F.Cg)([(0,j.inject)("e20-0fb0"),(0,F.Sn)("design:type",W.E)],Z.prototype,"_playerDataProvider",void 0),(0,F.Cg)([(0,j.inject)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],Z.prototype,"_localizer",void 0),(0,F.Cg)([(0,j.inject)("a25-68f4"),(0,F.Sn)("design:type",z.n)],Z.prototype,"_questManagerHub",void 0),(0,F.Cg)([(0,j.inject)("db5-fb6e"),(0,F.Sn)("design:type",Object)],Z.prototype,"_featureRequirements",void 0),Z=(0,F.Cg)([(0,j.injectable)()],Z)},46571:(k,B,U)=>{"use strict";U.d(B,{p:()=>H});var F=U(8674),G=U(79687),j=U(62459),$=U(45895);let H=class{constructor(){this._eventEncounterDataProviders=[]}getProviders(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){const $=yield Promise.all(this._eventEncounterDataProviders.filter((k=>j.Aq$.isDefined(k)&&B&&k.isEnabledByDefault?!U.includes(k.tag):G.includes(k.tag))).map((B=>(0,F.sH)(this,void 0,void 0,(function*(){return[yield B.getPriority(k),B]})))));return $.sort((([k],[B])=>k-B)),$}))}};(0,F.Cg)([(0,G.multiInject)($.A),(0,F.Sn)("design:type",Array)],H.prototype,"_eventEncounterDataProviders",void 0),H=(0,F.Cg)([(0,G.injectable)()],H)},24800:(k,B,U)=>{"use strict";U.d(B,{p:()=>z});var F,G=U(8674),j=U(79687),$=U(62459),H=U(50996),V=U(94393),W=U(99842),q=U(35120),K=U(73678);let z=F=class{constructor(){this.tag=H.I.FestivalEncounterDataProvider,this.isEnabledByDefault=!0}isActive(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;const U=null===(B=this._weekendEvents.getActiveFestival())||void 0===B?void 0:B.type,F=this._weekendEvents.getFestivalConfig(),G=q.q.instance.prodigy.world.getCurrentZone();if(!$.Aq$.isDefined(F)||!$.Aq$.isDefined(U))return!1;if(!(null==F?void 0:F.festivalDailyData.allowInCoreZones)&&K.s0.includes(G))return!1;for(const j of F.festivalDailyData.zoneEncounterEntities){if(yield W.s.meetsPreconditions(k.preconditionChecker,j.preconditions))return this._selectedEncounterEntity=j,!0}return!1}))}getPriority(k){return(0,G.sH)(this,void 0,void 0,(function*(){return H.X[this.tag]}))}getEncounterData(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(!k.isOnCooldown&&$.Aq$.isDefined(this._selectedEncounterEntity)){const B=F.encounterCache[k.spawnId];if(!!$.Aq$.isDefined(B)&&(yield W.s.meetsPreconditions(k.preconditionChecker,B.preconditions)))return Object.assign(Object.assign({},B),{bench:this._selectedEncounterEntity.bench});const U=yield W.s.sampleRandomEncounter(this._selectedEncounterEntity,k.preconditionChecker);return $.Aq$.isDefined(U)?(F.encounterCache[k.spawnId]=U,Object.assign(Object.assign({},F.encounterCache[k.spawnId]),{bench:this._selectedEncounterEntity.bench})):void 0}}))}static clearCachedEncounters(){F.encounterCache={}}};z.encounterCache={},(0,G.Cg)([(0,j.inject)("12b-405a"),(0,G.Sn)("design:type",V.n)],z.prototype,"_weekendEvents",void 0),z=F=(0,G.Cg)([(0,j.injectable)()],z)},45895:(k,B,U)=>{"use strict";U.d(B,{A:()=>F});const F=Symbol.for("EVENT_ENCOUNTER_DATA_PROVIDER")},50996:(k,B,U)=>{"use strict";var F;U.d(B,{I:()=>F,X:()=>G}),function(k){k.FestivalEncounterDataProvider="FestivalEncounterDataProvider",k.FeaturedSpawnEncounterDataProvider="FeaturedSpawnEncounterDataProvider"}(F||(F={}));const G={[F.FestivalEncounterDataProvider]:0,[F.FeaturedSpawnEncounterDataProvider]:1}},7170:(k,B,U)=>{"use strict";var F;U.d(B,{E:()=>F}),function(k){k.Disabled="disabled"}(F||(F={}))},78889:(k,B,U)=>{"use strict";U.d(B,{$Q:()=>J,BQ:()=>rt,LT:()=>et,Lj:()=>q,OI:()=>Z,Ue:()=>Y,W0:()=>X,Wo:()=>K,Yu:()=>at,bU:()=>Q,cB:()=>z,h9:()=>it,o_:()=>st,sK:()=>tt,wd:()=>nt,yd:()=>ot});var F=U(62459),G=U(28628),j=U(15821),$=U(35120),H=U(77938),V=U(129),W=U(7170);function q(k){var B,U,G;return et(k)?null!==(B=k.boss.ID)&&void 0!==B?B:0:it(k)?32:J(k)?null!==(U=k.encounter[0].ID)&&void 0!==U?U:0:tt(k)?null!==(G=k.pets[0].ID)&&void 0!==G?G:0:void F.VyI.log("EncounterDataUtils.getEncounterAssetId: unable to find a valid asset ID for encounter data",F.$bb.Warning)}function K(k){return Q(k)||!j.A.isDefined(k)?null:J(k)?"pet":et(k)||it(k)?"boss":tt(k)?"pet":null}function z(k){const B=K(k);if(null===B)return null;const U=q(k);return H.t.getItem(B,U)}function Y(k){return j.A.isDefined(k)&&!Q(k)}function Q(k){return"string"==typeof k&&Object.values(W.E).includes(k)}function X(k){var B,U,F,G,$,H;return!!j.A.isDefined(k)&&(!!Q(k)||(j.A.isDefined(k.boss)||(null!==(U=null===(B=k.pets)||void 0===B?void 0:B.length)&&void 0!==U?U:0)>0||(null!==(G=null===(F=k.opponent)||void 0===F?void 0:F.length)&&void 0!==G?G:0)>0||(null!==(H=null===($=k.encounter)||void 0===$?void 0:$.length)&&void 0!==H?H:0)>0))}function Z(k){const{player:B}=$.q.instance.game.rootContainer.get("e20-0fb0");B.encounters.onPetEncountered(k)}function J(k){var B,U;return(null!==(U=null===(B=k.encounter)||void 0===B?void 0:B.length)&&void 0!==U?U:0)>0}function tt(k){var B;return j.A.isDefined(null===(B=k.pets)||void 0===B?void 0:B[0])}function et(k){var B;return j.A.isDefined(null===(B=k.boss)||void 0===B?void 0:B.ID)}function it(k){return j.A.isDefined(k.opponent)}function st(k){var B;if(!J(k)||!j.A.isDefined(k.encounter[0].ID))return!1;const{player:U}=$.q.instance.game.rootContainer.get("e20-0fb0");return null!==(B=k.showNewIndicator)&&void 0!==B?B:!nt(k)&&!at(k)&&U.hasCompletedTutorial()&&U.encounters.getPetTimesBattled(k.encounter[0].ID)<1}function nt(k){return k.revampBattleType===G.gu.ZoneMiniboss}function at(k){const{player:B}=$.q.instance.game.rootContainer.get("e20-0fb0"),{threatIndicatorLevel:U}=$.q.instance.game.rootContainer.get("d1f-4da3");return j.A.isDefined(k.minLevel)&&!nt(k)&&!j.A.isDefined(k.showGuideHand)&&k.minLevel-B.getLevel()>U}function rt(k){const B=[248,253,252,254,251,250,249,255],U=[188,193,192,194,191,190,189,195],F=new V.a($.q.instance.prodigy.game);return F.init(k),k.useMetadataGear||(B.includes(F.equipment.getHat())||F.equipment.setHat(248),U.includes(F.equipment.getOutfit())||F.equipment.setOutfit(188),F.appearance.setHair(53)),F}function ot(k){const{requirements:B,objectiveIdPrefix:U,type:F,includeComplete:G}=k,$=[];for(const[H,V]of B.entries()){const k=Object.entries(V);for(const[B,{text:V,progress:W}]of k)if(j.A.isDefined(V)){const[k,j]=W;if(k>=j&&!G)continue;$.push({id:`${U}-${B}-${H}`,text:V,progress:{current:k,target:j},type:"function"==typeof F?F(B):F})}}return $}},28029:(k,B,U)=>{"use strict";U.d(B,{E:()=>H});var F=U(62459),G=U(95891),j=U(68910),$=U(35120);class H{static addConfetti(k){const B=$.q.instance.game,U=new F._mx(k);U.name="Confetti",U.addComponent(F.dLy);const V=new F.CIs;V.xLocation.setMinMax(-8,B.width+8),V.yLocation.setMinMax(-8,B.height+8);const W=new F.mYY;W.point1.set(-8,-8),W.point2.set(B.width+8,-8);const{width:q,height:K}=j.Texture.WHITE,z=new F.Ayx;z.callback=k=>{if(k.life=1,k.motionOffset=G.random(2*Math.PI),k.velocity.set(G.random(3,40,!0),80),k.angularVelocities=[G.random(-10,10,!0),G.random(5,12,!0),G.random(-5,7,!0)],!k.graphic){const B=new F._mx(k.gameObject);B.addComponent(F.dLy),k.graphic=B.addComponent(F.vYh),k.graphic.setTexture(j.Texture.WHITE)}k.tint=G.sample(H.CONFETTO_COLORS),this.applyParticleTint(k)};const Y=new F.nbL;Y.callback=(k,U)=>{const F=.001*B.time.timeMS;k.life=k.position.y{"use strict";U.d(B,{U:()=>et});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(28628),V=U(40295),W=U(90633),q=U(35120),K=U(77938),z=U(96535),Y=U(10670),Q=U(13956),X=U(73678),Z=U(50503),J=U(64653),tt=U(90804);class et{static fetchProgress(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.progressData=yield this._networkHandler.getProgress(),this.progressData}))}static pushProgress(k){return(0,F.sH)(this,void 0,void 0,(function*(){this.progressData=$().clone(k),yield this._networkHandler.setProgress(k)}))}static isStepComplete(k){const B=Object.keys(V.B);return B.indexOf(k)<=B.indexOf(this.progressData.step)}static getCurrentStep(){return this.progressData.step}static getNextStep(){const k=Object.values(V.B);return k[k.indexOf(this.progressData.step)+1]}static isEndgameQuestActive(){return![V.B.NotStarted,V.B.PuppetMasterDefeated].includes(this.progressData.step)}static hasDefeatedPippet(){return this.isStepComplete(V.B.PippetDefeated)}static locallyAdvanceQuest(){const k=Object.values(V.B),B=k.indexOf(this.progressData.step);this.progressData.step=k[B+1];let U=null,F=null;switch(this.progressData.step){case V.B.PippetDefeated:U=4,F=Y.jT.PippetBattleWon;break;case V.B.Guardian1Defeated:U=6,F=Y.jT.IllusionBoss1BattleWon;break;case V.B.Guardian2Defeated:U=8,F=Y.jT.IllusionBoss2BattleWon;break;case V.B.Guardian3Defeated:U=10,F=Y.jT.IllusionBoss3BattleWon;break;case V.B.Guardian4Defeated:U=12,F=Y.jT.IllusionBoss4BattleWon;break;case V.B.Guardian5Defeated:U=14,F=Y.jT.IllusionBoss5BattleWon}F&&q.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(U,F)}static shouldShowEndgameQuestBanner(k){return!!this.isEndgameQuestActive()&&(![X.A_.ACADEMY,X.A_.ARCHIVES,X.A_.DRAGONISLE,X.A_.TOWERTOWN].includes(k)&&(k!==X.A_.LAMPLIGHT||!G.Aq$.isDefined(q.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival())))}static shouldShowEndgameNootWorldMapDialogue(){return et.progressData.step===V.B.LastKeystoneCutsceneViewed&&!q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(W.B.FEATURE_ENDGAME_QUEST,W.B.BREADCRUMB_ENDGAME_QUEST_SAW_WORLD_MAP_DIALOGUE)}static getCurrentGuardianIndex(){const k=Object.values(V.B),B=k.indexOf(this.progressData.step)-k.indexOf(V.B.PippetDefeated);return B>=0&&B<5?B:-1}static shouldShowPuppetMasterDefeatCelebration(){const k=Date.now()-this._activePlayer.data.puppetMasterDefeatDate;return k{q.q.instance.game.broadcaster.broadcast("Prodigy.Events.Endgame.MISSED_PUPPET_MASTER_GEAR_AWARDED")}),!0)}}et.CELEBRATION_MIN_TIME_MS=864e5,et.CELEBRATION_MAX_TIME_MS=18144e5,et.CELEBRATION_MAX_VIEWS=3,(0,F.Cg)([(0,Q.b)("306-5359"),(0,F.Sn)("design:type",z.W)],et,"_activePlayer",void 0),(0,F.Cg)([(0,Q.b)("23e-f53d"),(0,F.Sn)("design:type",J.C)],et,"_networkHandler",void 0)},64653:(k,B,U)=>{"use strict";U.d(B,{C:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(76546);let H=class extends $.D{getProgress(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Endgame.GetProgress,{},!1)}))}setProgress(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(j.D.Endgame.SetProgress,k,!1)}))}debugSetProgress(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(j.D.Endgame.Debug.SetProgress,k,!1)}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},75781:(k,B,U)=>{"use strict";U.d(B,{E:()=>Y});var F=U(62459),G=U(99625),j=U(40295),$=U(90633),H=U(35120),V=U(43846),W=U(43531),q=U(10670),K=U(73678),z=U(93867);class Y{static runCollectedLastKeystoneSequence(){H.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(1,q.jT.AllGemsCollected,$.B.BREADCRUMB_ENDGAME_QUEST_SAW_NOOT_ACADEMY_DIALOGUE),this.runKeystoneSequence([1408],!0)}static runAllKeystonesSequenceOnMapSetup(k){H.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(1,q.jT.AllGemsCollected,$.B.BREADCRUMB_ENDGAME_QUEST_SAW_NOOT_ACADEMY_DIALOGUE),H.q.instance.prodigy.world.getCurrentZone()===K.A_.ACADEMY?this.runKeystoneSequence([1474,1476],!1,k):this.runKeystoneSequence([1474],!0,k)}static runKeystoneSequence(k,B,U){z.U.pushProgress({step:j.B.LastKeystoneCutsceneViewed}).catch(F.RQr.createHandler("Error setting endgame quest progress"));const $=new W.rD,q=$.dataProvider,K=H.q.instance.prodigy.gameContainer.get("d0e-64fd");let Y;const Q=()=>{Y.then((k=>k.destroy())).catch(F.RQr.createHandler("Error destroying keystone dialog"))},X=k.map((k=>({dialogueData:q.get(k),blockInput:!0})));X.splice(X.length-1,0,{callback:()=>Y=K.loadWithDependenciesFromGUID(G.l.AllKeystonesCelebration)}),B?X.push({dialogueData:q.get(1409),yesButtonText:(0,V.k)("GO_NOW"),noButtonText:(0,V.k)("NOT_NOW"),yes:()=>{H.q.instance.prodigy.open.map({onClose:()=>{null==U||U().catch(F.RQr.createHandler("GotAllKeystonesSequence closeCallback notNowCallback Error"))}}),Q()},no:()=>{Q(),null==U||U().catch(F.RQr.createHandler("GotAllKeystonesSequence closeCallback notNowCallback Error"))},blockInput:!0}):X.push({callback:()=>{Q(),null==U||U().catch(F.RQr.createHandler("GotAllKeystonesSequence closeCallback notNowCallback Error"))}}),$.addEvents(X),$.start(!0)}}},90804:(k,B,U)=>{"use strict";U.d(B,{p:()=>F});class F{}F.PUPPET_MASTER_GEAR_DROPS=[{type:"hat",ID:240,N:1},{type:"outfit",ID:180,N:1},{type:"boots",ID:125,N:1},{type:"weapon",ID:251,N:1}]},87539:(k,B,U)=>{"use strict";U.d(B,{m:()=>F});class F{static getGuardianData(k){return U(56351)[k]}}},68607:(k,B,U)=>{"use strict";U.d(B,{n:()=>K});var F,G=U(8674),j=U(62459),$=U(35120),H=U(82351),V=U(28152),W=U(29834),q=U(80110);let K=F=class extends j.uAl{constructor(){super(...arguments),this._centerFX=[],this._centerThresholds=[],this._centerAnimationNames=[],this._centerSounds=[],this._centerSpellIDs=[],this._leftFX=[],this._leftThresholds=[],this._leftAnimationNames=[],this._leftSounds=[],this._rightFX=[],this._rightThresholds=[],this._rightAnimationNames=[],this._rightSounds=[],this._centerIndex=0,this._leftIndex=0,this._rightIndex=0}setDamage(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const G={fx:B?this._leftFX:this._rightFX,index:B?this._leftIndex:this._rightIndex,thresholds:B?this._leftThresholds:this._rightThresholds,animations:B?this._leftAnimationNames:this._rightAnimationNames,soundFX:B?this._leftSounds:this._rightSounds},$=this._centerSpellIDs.includes(U);if(!$&&!this.sideThresholdMet(k,G))return;this.startScreenShake(),yield j.Egh.timeout(F.ANIMATION_DELAY_MS),$&&(this._centerIndex=this.setDamagePercentage(1,{fx:this._centerFX,index:this._centerIndex,thresholds:this._centerThresholds,animations:this._centerAnimationNames,soundFX:this._centerSounds}));const H=this.setDamagePercentage(k,G);B?this._leftIndex=H:this._rightIndex=H,yield j.Egh.timeout(F.END_DELAY_MS)}))}getAnimators(){return[...this._leftFX,...this._centerFX,...this._rightFX]}startScreenShake(){return(0,G.sH)(this,void 0,void 0,(function*(){yield j.Egh.timeout(F.SHAKE_DELAY_MS),this._screenShake.run()}))}sideThresholdMet(k,B){return!(B.index>=B.fx.length)&&k>=B.thresholds[B.index]}setDamagePercentage(k,B){if(B.index>=B.fx.length)return B.index;let U=B.thresholds[B.index];const G=[];for(;k>=U&&(B.fx[B.index].playAnimation(B.animations[B.index],!1),G.push(B.soundFX[B.index]),B.index+=1,!(B.index>=B.fx.length));)U=B.thresholds[B.index];return 1===G.length?$.q.instance.prodigy.audio.playSFXFromGUID(G[0]):G.length>1&&(G.includes(H.B.Sfx_large_explosion_with_glass)?$.q.instance.prodigy.audio.playSFXFromGUID(H.B.Sfx_large_explosion_with_glass):$.q.instance.prodigy.audio.playSFXFromGUID(F.DEFAULT_EXPLOSION_SOUND_FOR_MANY)),B.index}};K.SHAKE_DELAY_MS=200,K.ANIMATION_DELAY_MS=400,K.END_DELAY_MS=300,K.DEFAULT_EXPLOSION_SOUND_FOR_MANY=H.B.Sfx_long_explosion_with_rubble_A,(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(W.j),(0,G.Sn)("design:type",Array)],K.prototype,"_centerFX",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.g11)(),(0,G.Sn)("design:type",Array)],K.prototype,"_centerThresholds",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],K.prototype,"_centerAnimationNames",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.gfw)(H.B),(0,G.Sn)("design:type",Array)],K.prototype,"_centerSounds",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],K.prototype,"_centerSpellIDs",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(W.j),(0,G.Sn)("design:type",Array)],K.prototype,"_leftFX",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.g11)(),(0,G.Sn)("design:type",Array)],K.prototype,"_leftThresholds",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],K.prototype,"_leftAnimationNames",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.gfw)(H.B),(0,G.Sn)("design:type",Array)],K.prototype,"_leftSounds",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(W.j),(0,G.Sn)("design:type",Array)],K.prototype,"_rightFX",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.g11)(),(0,G.Sn)("design:type",Array)],K.prototype,"_rightThresholds",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],K.prototype,"_rightAnimationNames",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.gfw)(H.B),(0,G.Sn)("design:type",Array)],K.prototype,"_rightSounds",void 0),(0,G.Cg)([(0,j.MnK)(q.g),(0,G.Sn)("design:type",q.g)],K.prototype,"_screenShake",void 0),K=F=(0,G.Cg)([(0,j.EVk)("DynamicBattleBackgroundFX",V.Y.effect)],K)},44367:(k,B,U)=>{"use strict";U.d(B,{z:()=>V});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(13956);class V extends G.s3P{static getFeatureVariables(){var k;return $().cloneDeep(null===(k=this._featureProvider)||void 0===k?void 0:k.getFeatureValue(this._featureName))}static isFeatureEnabled(){var k;return null===(k=this._featureProvider)||void 0===k?void 0:k.isOn(this._featureName)}}(0,F.Cg)([(0,H.b)("073-6f3b"),(0,F.Sn)("design:type",Object)],V,"_featureProvider",void 0)},82885:(k,B,U)=>{"use strict";U.d(B,{J:()=>H});var F=U(95891),G=U.n(F),j=U(28085),$=U(44367);class H extends $.z{static isFeatureEnabled(){var k,B;return super.isFeatureEnabled()&&null!==(B=null===(k=this.getVariables())||void 0===k?void 0:k.enabled)&&void 0!==B&&B}static getVariables(){return this.getDefaultConfigCloneWithOverrides()}static getDefaultConfigCloneWithOverrides(){const k=this.getFeatureVariables();return k?(0,j.ES)(this._defaultConfig,k):G().cloneDeep(this._defaultConfig)}}},84399:(k,B,U)=>{"use strict";U.d(B,{R:()=>W});var F=U(8674),G=U(99625),j=U(29887),$=U(13956),H=U(73678),V=U(82885);class W extends V.J{static isFeatureEnabled(){return this._featureRequirements.meetsRequirementsDeprecated(66)&&super.isFeatureEnabled()}static isZoneAvailable(k){var B;return null===(B=this._defaultConfig.zones)||void 0===B?void 0:B.includes(k)}static sendActivationEvent(){this._featureRequirements.meetsRequirementsDeprecated(66)&&this._segmentExperimentTracker.track("campaign-replay")}}W._featureName="campaign-replay",W._defaultConfig={enabled:!1,maps:{"forest_hard-A3":G.l.ForestA3Hard,"forest_hard-A4":G.l.ForestA4Hard,"forest_hard-A5":G.l.ForestA5Hard,"forest_hard-B5":G.l.ForestB5Hard,"forest_hard-B6":G.l.ForestB6Hard,"forest_hard-B7":G.l.ForestB7Hard,"forest_hard-B8":G.l.ForestB8Hard,"forest_hard-C4":G.l.ForestC4Hard,"forest_hard-C7":G.l.ForestC7Hard,"forest_hard-C8":G.l.ForestC8Hard,"forest_hard-D3":G.l.ForestD3Hard,"shiverchill_hard-A2":G.l.ShiverchillA2Hard,"shiverchill_hard-A3":G.l.ShiverchillA3Hard,"shiverchill_hard-A4":G.l.ShiverchillA4Hard,"shiverchill_hard-A5":G.l.ShiverchillA5Hard,"shiverchill_hard-A6":G.l.ShiverchillA6Hard,"shiverchill_hard-A7":G.l.ShiverchillA7Hard,"shiverchill_hard-A9":G.l.ShiverchillA9Hard,"shiverchill_hard-A10":G.l.ShiverchillA10Hard,"shiverchill_hard-A11":G.l.ShiverchillA11Hard,"shiverchill_hard-B1":G.l.ShiverchillB1Hard,"shiverchill_hard-B2":G.l.ShiverchillB2Hard,"shiverchill_hard-B3":G.l.ShiverchillB3Hard,"shiverchill_hard-B6":G.l.ShiverchillB6Hard,"shiverchill_hard-B7":G.l.ShiverchillB7Hard,"shiverchill_hard-B8":G.l.ShiverchillB8Hard,"shiverchill_hard-B9":G.l.ShiverchillB9Hard,"shiverchill_hard-B10":G.l.ShiverchillB10Hard,"skywatch_hard-A0":G.l.SkywatchA0Hard,"skywatch_hard-A1":G.l.SkywatchA1Hard,"skywatch_hard-B1":G.l.SkywatchB1Hard,"skywatch_hard-B2":G.l.SkywatchB2Hard,"skywatch_hard-B3":G.l.SkywatchB3Hard,"skywatch_hard-C1":G.l.SkywatchC1Hard,"skywatch_hard-C2":G.l.SkywatchC2Hard,"skywatch_hard-C3":G.l.SkywatchC3Hard,"skywatch_hard-C4":G.l.SkywatchC4Hard,"skywatch_hard-D1":G.l.SkywatchD1Hard,"skywatch_hard-D2":G.l.SkywatchD2Hard,"skywatch_hard-D3":G.l.SkywatchD3Hard,"skywatch_hard-E1":G.l.SkywatchE1Hard,"skywatch_hard-E2":G.l.SkywatchE2Hard,"skywatch_hard-E3":G.l.SkywatchE3Hard,"skywatch_hard-E4":G.l.SkywatchE4Hard,"skywatch_hard-E5":G.l.SkywatchE5Hard,"bonfire_spire_hard-A1":G.l.BonfireSpireA1Hard,"bonfire_spire_hard-A4":G.l.BonfireSpireA4Hard,"bonfire_spire_hard-B1":G.l.BonfireSpireB1Hard,"bonfire_spire_hard-B2":G.l.BonfireSpireB2Hard,"bonfire_spire_hard-B4":G.l.BonfireSpireB4Hard,"bonfire_spire_hard-B5":G.l.BonfireSpireB5Hard,"bonfire_spire_hard-C1":G.l.BonfireSpireC1Hard,"bonfire_spire_hard-C2":G.l.BonfireSpireC2Hard,"bonfire_spire_hard-C3":G.l.BonfireSpireC3Hard,"bonfire_spire_hard-C4":G.l.BonfireSpireC4Hard,"bonfire_spire_hard-C6":G.l.BonfireSpireC6Hard,"bonfire_spire_hard-D1":G.l.BonfireSpireD1Hard,"bonfire_spire_hard-D2":G.l.BonfireSpireD2Hard,"bonfire_spire_hard-D3":G.l.BonfireSpireD3Hard,"bonfire_spire_hard-D4":G.l.BonfireSpireD4Hard,"bonfire_spire_hard-D5":G.l.BonfireSpireD5Hard,"bonfire_spire_hard-D6":G.l.BonfireSpireD6Hard,"bonfire_spire_hard-E5":G.l.BonfireSpireE5Hard,"bonfire_spire_hard-E6":G.l.BonfireSpireE6Hard,"shipwreck_shore_hard-A1":G.l.ShipwreckShoreA1Hard,"shipwreck_shore_hard-A2":G.l.ShipwreckShoreA2Hard,"shipwreck_shore_hard-A3":G.l.ShipwreckShoreA3Hard,"shipwreck_shore_hard-A4":G.l.ShipwreckShoreA4Hard,"shipwreck_shore_hard-A5":G.l.ShipwreckShoreA5Hard,"shipwreck_shore_hard-A7":G.l.ShipwreckShoreA7Hard,"shipwreck_shore_hard-B2":G.l.ShipwreckShoreB2Hard,"shipwreck_shore_hard-B4":G.l.ShipwreckShoreB4Hard,"shipwreck_shore_hard-B5":G.l.ShipwreckShoreB5Hard,"shipwreck_shore_hard-B6":G.l.ShipwreckShoreB6Hard,"shipwreck_shore_hard-B7":G.l.ShipwreckShoreB7Hard,"shipwreck_shore_hard-B8":G.l.ShipwreckShoreB8Hard,"shipwreck_shore_hard-B10":G.l.ShipwreckShoreB10Hard,"shipwreck_shore_hard-B11":G.l.ShipwreckShoreB11Hard,"shipwreck_shore_hard-B12":G.l.ShipwreckShoreB12Hard,"shipwreck_shore_hard-B13":G.l.ShipwreckShoreB13Hard,"shipwreck_shore_hard-C6":G.l.ShipwreckShoreC6Hard,"shipwreck_shore_hard-C7":G.l.ShipwreckShoreC7Hard,"shipwreck_shore_hard-C8":G.l.ShipwreckShoreC8Hard,"shipwreck_shore_hard-C9":G.l.ShipwreckShoreC9Hard,"shipwreck_shore_hard-C10":G.l.ShipwreckShoreC10Hard,"shipwreck_shore_hard-C11":G.l.ShipwreckShoreC11Hard,"shipwreck_shore_hard-C12":G.l.ShipwreckShoreC12Hard},zones:[H.A_.FOREST,H.A_.FORESTHARD,H.A_.SHIVERCHILLHARD,H.A_.BONFIRE,H.A_.BONFIREHARD,H.A_.SKYWATCH,H.A_.SKYWATCHHARD,H.A_.SHIPWRECKHARD]},(0,F.Cg)([(0,$.b)("47f-ab6a"),(0,F.Sn)("design:type",j.p)],W,"_segmentExperimentTracker",void 0),(0,F.Cg)([(0,$.b)("db5-fb6e"),(0,F.Sn)("design:type",Object)],W,"_featureRequirements",void 0)},15218:(k,B,U)=>{"use strict";U.d(B,{A:()=>$});var F=U(8674),G=U(62459),j=U(13956);class $ extends G.s3P{static get featureVariables(){var k;return this._featureVariables||(this._featureVariables=null===(k=$._featureProvider)||void 0===k?void 0:k.getFeatureValue("difficulty-progression")),this._featureVariables}static get useRevisedDifficulty(){var k,B;return null!==(B=null===(k=this.featureVariables)||void 0===k?void 0:k.useRevisedDifficulty)&&void 0!==B&&B}static get experimentSpawnVariation(){var k;return null===(k=this.featureVariables)||void 0===k?void 0:k.spawnVariationKey}}(0,F.Cg)([(0,j.b)("073-6f3b"),(0,F.Sn)("design:type",Object)],$,"_featureProvider",void 0)},71796:(k,B,U)=>{"use strict";U.d(B,{k:()=>$});var F=U(8674),G=U(62459),j=U(13956);class $ extends G.s3P{static get useRevisedDifficulty(){return this._featureProvider.isOn("difficulty-scaling")}}(0,F.Cg)([(0,j.b)("073-6f3b"),(0,F.Sn)("design:type",Object)],$,"_featureProvider",void 0)},81137:(k,B,U)=>{"use strict";U.d(B,{x:()=>G});var F=U(82885);class G extends F.J{}G._featureName="hud-revamp-2025",G._defaultConfig={enabled:!1}},34616:(k,B,U)=>{"use strict";U.d(B,{N:()=>j});const F={enableMemberJar:!0,maximumSavedBattleCount:10};var G=U(44367);class j extends G.z{static get maximumSavedBattleCount(){return this.featureVariables.maximumSavedBattleCount}static get featureVariables(){var k;return null!==(k=this.getFeatureVariables())&&void 0!==k?k:F}}j._featureName="member-jar"},17148:(k,B,U)=>{"use strict";U.d(B,{k:()=>$});var F=U(62459),G=U(50788),j=U(76277);class ${static get cachedDisabledEvolutionFeature(){return F.Aq$.isDefined(this._cachedDisabledEvolutionFeature)||(this._cachedDisabledEvolutionFeature=(0,j.G)(G.F)),this._cachedDisabledEvolutionFeature}}$._cachedDisabledEvolutionFeature=void 0},46725:(k,B,U)=>{"use strict";U.d(B,{D:()=>$});var F=U(99625),G=U(73678),j=U(82885);class $ extends j.J{static isPrefabZoneAvailable(k){const B=this.getVariables();return this.isFeatureEnabled()&&B.zones.includes(k)||B.generallyAvailableZones.includes(k)}static getAvailablePrefabMap(k){const B=this.getVariables();return this.isFeatureEnabled()&&B.maps[k]||B.generallyAvailableMaps[k]}}$._featureName="prefab-scenes",$._defaultConfig={enabled:!1,zones:[],maps:{},generallyAvailableZones:[G.A_.FOREST,G.A_.SHIVERCHILL,G.A_.BONFIRE,G.A_.SKYWATCH,G.A_.SHIPWRECK,G.A_.MOON],generallyAvailableMaps:{"forest-A3":F.l.ForestA3,"forest-A4":F.l.ForestA4,"forest-A5":F.l.ForestA5,"forest-B5":F.l.ForestB5,"forest-B6":F.l.ForestB6,"forest-B7":F.l.ForestB7,"forest-B8":F.l.ForestB8,"forest-C4":F.l.ForestC4,"forest-C7":F.l.ForestC7,"forest-C8":F.l.ForestC8,"forest-D3":F.l.ForestD3,"shiverchill-A10":F.l.ShiverchillA10,"shiverchill-A11":F.l.ShiverchillA11,"shiverchill-A2":F.l.ShiverchillA2,"shiverchill-A3":F.l.ShiverchillA3,"shiverchill-A4":F.l.ShiverchillA4,"shiverchill-A5":F.l.ShiverchillA5,"shiverchill-A6":F.l.ShiverchillA6,"shiverchill-A7":F.l.ShiverchillA7,"shiverchill-A9":F.l.ShiverchillA9,"shiverchill-B1":F.l.ShiverchillB1,"shiverchill-B10":F.l.ShiverchillB10,"shiverchill-B2":F.l.ShiverchillB2,"shiverchill-B3":F.l.ShiverchillB3,"shiverchill-B6":F.l.ShiverchillB6,"shiverchill-B7":F.l.ShiverchillB7,"shiverchill-B8":F.l.ShiverchillB8,"shiverchill-B9":F.l.ShiverchillB9,"bonfire_spire-A1":F.l.BonfireSpireA1,"bonfire_spire-A4":F.l.BonfireSpireA4,"bonfire_spire-B1":F.l.BonfireSpireB1,"bonfire_spire-B2":F.l.BonfireSpireB2,"bonfire_spire-B4":F.l.BonfireSpireB4,"bonfire_spire-B5":F.l.BonfireSpireB5,"bonfire_spire-C1":F.l.BonfireSpireC1,"bonfire_spire-C2":F.l.BonfireSpireC2,"bonfire_spire-C3":F.l.BonfireSpireC3,"bonfire_spire-C4":F.l.BonfireSpireC4,"bonfire_spire-C6":F.l.BonfireSpireC6,"bonfire_spire-D1":F.l.BonfireSpireD1,"bonfire_spire-D2":F.l.BonfireSpireD2,"bonfire_spire-D3":F.l.BonfireSpireD3,"bonfire_spire-D4":F.l.BonfireSpireD4,"bonfire_spire-D5":F.l.BonfireSpireD5,"bonfire_spire-D6":F.l.BonfireSpireD6,"bonfire_spire-E5":F.l.BonfireSpireE5,"bonfire_spire-E6":F.l.BonfireSpireE6,"shipwreck_shore-A1":F.l.ShipwreckShoreA1,"shipwreck_shore-A2":F.l.ShipwreckShoreA2,"shipwreck_shore-A3":F.l.ShipwreckShoreA3,"shipwreck_shore-A4":F.l.ShipwreckShoreA4,"shipwreck_shore-A5":F.l.ShipwreckShoreA5,"shipwreck_shore-A7":F.l.ShipwreckShoreA7,"shipwreck_shore-B10":F.l.ShipwreckShoreB10,"shipwreck_shore-B11":F.l.ShipwreckShoreB11,"shipwreck_shore-B12":F.l.ShipwreckShoreB12,"shipwreck_shore-B13":F.l.ShipwreckShoreB13,"shipwreck_shore-B2":F.l.ShipwreckShoreB2,"shipwreck_shore-B4":F.l.ShipwreckShoreB4,"shipwreck_shore-B5":F.l.ShipwreckShoreB5,"shipwreck_shore-B6":F.l.ShipwreckShoreB6,"shipwreck_shore-B7":F.l.ShipwreckShoreB7,"shipwreck_shore-B8":F.l.ShipwreckShoreB8,"shipwreck_shore-C10":F.l.ShipwreckShoreC10,"shipwreck_shore-C11":F.l.ShipwreckShoreC11,"shipwreck_shore-C12":F.l.ShipwreckShoreC12,"shipwreck_shore-C6":F.l.ShipwreckShoreC6,"shipwreck_shore-C7":F.l.ShipwreckShoreC7,"shipwreck_shore-C8":F.l.ShipwreckShoreC8,"shipwreck_shore-C9":F.l.ShipwreckShoreC9,"skywatch-A0":F.l.SkywatchA0,"skywatch-A1":F.l.SkywatchA1,"skywatch-B1":F.l.SkywatchB1,"skywatch-B2":F.l.SkywatchB2,"skywatch-B3":F.l.SkywatchB3,"skywatch-C1":F.l.SkywatchC1,"skywatch-C2":F.l.SkywatchC2,"skywatch-C3":F.l.SkywatchC3,"skywatch-C4":F.l.SkywatchC4,"skywatch-D1":F.l.SkywatchD1,"skywatch-D2":F.l.SkywatchD2,"skywatch-D3":F.l.SkywatchD3,"skywatch-E1":F.l.SkywatchE1,"skywatch-E2":F.l.SkywatchE2,"skywatch-E3":F.l.SkywatchE3,"skywatch-E4":F.l.SkywatchE4,"skywatch-E5":F.l.SkywatchE5,"moon-A1":F.l.MoonA1,"moon-B1":F.l.MoonB1,"moon-C1":F.l.MoonC1,"moon-D1":F.l.MoonD1,"academy-CR1":F.l.AcademyCR1,"academy-CR2":F.l.AcademyCR2,"academy-GH1":F.l.AcademyGH1,"academy-GH2":F.l.AcademyGH2,"academy-GH3":F.l.AcademyGH3,"lamplight-C3":F.l.LamplightC3,"springfest_grotto_bunny-A3":F.l.SpringfestGrottoBunnyA3,"springfest_grotto_fox-A3":F.l.SpringfestGrottoFoxA3,"springfest_grotto_bunny-A9":F.l.SpringfestGrottoBunnyA9,"springfest_grotto_fox-A9":F.l.SpringfestGrottoFoxA9,"springfest_grotto_bunny-B2":F.l.SpringfestGrottoBunnyB2,"springfest_grotto_fox-B2":F.l.SpringfestGrottoFoxB2,"springfest_grotto_bunny-B7":F.l.SpringfestGrottoBunnyB7,"springfest_grotto_fox-B7":F.l.SpringfestGrottoFoxB7}}},66207:(k,B,U)=>{"use strict";U.d(B,{D:()=>j});var F=U(95525),G=U(44367);class j extends G.z{static getVariables(){return super.getFeatureVariables()}static isFeatureEnabled(){var k;return super.isFeatureEnabled()&&(null===(k=this.getVariables())||void 0===k?void 0:k.enabled)}static getVariant(){const k=this.getVariables();return this.isFeatureEnabled()&&(null==k?void 0:k.variant)?k.variant:0}static getVariantForUpgrading(){if(this.isFeatureEnabled()){let k=this.getVariant();return 0===k&&(k=2),k}return 0}}j._featureName=F.w.key},36233:(k,B,U)=>{"use strict";U.d(B,{p:()=>W});var F=U(8674),G=U(38170),j=U(29887),$=U(13956),H=U(96797),V=U(44367);class W extends V.z{static isFeatureEnabled(){var k;return super.isFeatureEnabled()&&(null===(k=this.getFeatureVariables())||void 0===k?void 0:k.enabled)}static getVariables(){return super.getFeatureVariables()}static sendActivationEvent(){const k=this.getVariables();k&&(G.r.isDateWithinRange(Date.now(),k.startDate,k.endDate)||k.enabled&&H.P.isOfferInGracePeriod(k))&&this._segmentExperimentTracker.track("segmented-offers")}}W._featureName="segmented-offers",(0,F.Cg)([(0,$.b)("47f-ab6a"),(0,F.Sn)("design:type",j.p)],W,"_segmentExperimentTracker",void 0)},64868:(k,B,U)=>{"use strict";U.d(B,{_:()=>G});var F=U(82885);class G extends F.J{static hasDefeatedPetStore(){const k=this.getVariables();return this.isFeatureEnabled()&&!!(null==k?void 0:k.defeatedPetStore)}static getPetCostTableVariantKey(){var k;const B=this.getVariables();return this.isFeatureEnabled()&&null!==(k=null==B?void 0:B.petCostTableVariantKey)&&void 0!==k?k:""}static getExcludedCategoriesFromLegacyStore(){var k;if(!this.isFeatureEnabled())return[];const B=this.getVariables();return null!==(k=null==B?void 0:B.excludedCategoriesFromLegacyStore)&&void 0!==k?k:[]}static hasUnifiedStore(){var k;const B=this.getVariables();return this.isFeatureEnabled()&&null!==(k=null==B?void 0:B.hasUnifiedStore)&&void 0!==k&&k}static areBundlesEnabled(){var k;const B=this.getVariables();return this.isFeatureEnabled()&&null!==(k=null==B?void 0:B.enableBundles)&&void 0!==k&&k}static isFeatureEnabled(){var k,B;return super.isFeatureEnabled()&&null!==(B=null===(k=this.getVariables())||void 0===k?void 0:k.enabled)&&void 0!==B&&B}}G._featureName="store-revamp",G._defaultConfig={enabled:!1,defeatedPetStore:{expireAtLocalHour:4,battlesToPrompt:3},hasUnifiedStore:!1,petCostTableVariantKey:"",excludedCategoriesFromLegacyStore:["Pets"],enableBundles:!1}},53151:(k,B,U)=>{"use strict";U.d(B,{h:()=>G});var F=U(44367);class G extends F.z{static getVariables(){return super.getFeatureVariables()}static get autoPopTreasureTrack(){var k;const B=this.getVariables();return this.isFeatureEnabled()&&null!==(k=null==B?void 0:B.autoPopTreasureTrack)&&void 0!==k&&k}static isFeatureEnabled(){var k;return super.isFeatureEnabled()&&(null===(k=this.getVariables())||void 0===k?void 0:k.enabled)}}G._featureName="treasure-track-ux"},35488:(k,B,U)=>{"use strict";U.d(B,{J:()=>z});var F=U(8674),G=U(79687),j=U(62459),$=U(13956),H=U(7001);const V=(0,U(77601).gb)({key:"featured-spawn",activateAssociatedExperiments:0,default:{enabled:!0}});var W=U(76277),q=U(47969),K=U(12596);let z=class{constructor(){this.FEATURED_SPAWN_ID="featured-spawn"}loadData(){return(0,F.sH)(this,void 0,void 0,(function*(){try{const k=yield this._networkHandler.getFeaturedSpawnData();this._cachedData=k}catch(k){this._cachedData=void 0,j.VyI.log(`Error loading Featured Spawn Data: ${k}`,j.$bb.Error)}}))}cacheData(k){return(0,F.sH)(this,void 0,void 0,(function*(){k?this._cachedData=k:yield this.loadData()}))}getCachedData(){return this._cachedData}getTimeUntilExpiry(){var k;const B=K.R.parseDateToTimestamp(null===(k=this._cachedData)||void 0===k?void 0:k.endDate);return void 0!==B?Math.max(0,B-Date.now()):0}shouldShowMapPin(k,B){return this._featureRequirements.meetsRequirementsDeprecated(72)&&this.isActive()&&this.isZoneValid(k,B)&&!this.isOnCooldown()}isActive(){if(!this._cachedData)return!1;if(!(0,W.G)(V).enabled)return!1;const k=Date.now(),B=K.R.parseDateToTimestamp(this._cachedData.startDate),U=K.R.parseDateToTimestamp(this._cachedData.endDate);return!(void 0!==B&&B>k)&&(!(void 0!==U&&U{"use strict";U.d(B,{t:()=>F});const F=(0,U(77601).gb)({key:"festival-launch-modal",default:!1,activateAssociatedExperiments:0})},51540:(k,B,U)=>{"use strict";U.d(B,{v:()=>$});var F=U(8674),G=U(48417),j=U(67238);class $ extends j.D{completePastFestivals(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(G.D.WeekendEvents.CompletePastFestivals,{},!0)}))}callFestivalSchedulerRouteDebug(){return(0,F.sH)(this,void 0,void 0,(function*(){return Promise.resolve()}))}getCurrentEventsData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(G.D.WeekendEvents.GetCurrentEventsData,{},!1)}))}getFestivalConfigData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(G.D.WeekendEvents.GetFestivalConfigData,{},!1)}))}getChestData(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.call(G.D.Festival.GetChestData,{chestID:k},!0)}))}setChestDate(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.call(G.D.Festival.SetChestDate,{chestID:k,newDateMs:B},!0)}))}setChestSpins(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.call(G.D.Festival.SetChestSpins,{chestID:k,newSpins:B},!0)}))}getSeenCompletedTaskData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.call(G.D.Festival.GetSeenCompletedTaskData,{},!0)}))}setCompletedTasksSeen(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.call(G.D.Festival.SetCompletedTasksSeen,{festivalQuestId:k,taskIds:B},!0)}))}}},43754:(k,B,U)=>{"use strict";U.d(B,{W:()=>gt});var F=U(8674),G=U(62459),j=U(79687),$=U(62248),H=U(26077),V=U(24521),W=U(10471),q=U(77601);const K=(0,q.gb)({key:"allow-spending-earned-magicoin",activateAssociatedExperiments:1,default:!1}),z=(0,q.gb)({key:"force-mem",activateAssociatedExperiments:1,default:!1});var Y,Q=U(37016),X=U(80003),Z=U(65240),J=U(35120),tt=U(23029),et=U(1195),it=U(77938);!function(k){k.Rescue="rescue",k.Evolution="evolution",k.LostPet="lostPetCost"}(Y||(Y={}));var st=U(82885);class nt extends st.J{static get petCostTableVariationKey(){var k;return null===(k=this.getVariables())||void 0===k?void 0:k.petCostTableVariantKey}}nt._featureName="pet-capture-and-evo-costs",nt._defaultConfig={enabled:!1,petCostTableVariantKey:"evoCostRarityBaseV2"};var at,rt=U(73797),ot=U(46784),ht=U(65050),ct=U(76277),dt=U(68152),lt=U(22023),ut=U(71586),ft=U(30226),bt=U(47968),pt=U(80105),vt=U(44094);let gt=at=class{constructor(k,B,U){this.onBalanceChanged=new G.HN0,this.onAffordableCacheChanged=new G.HN0,this._cachedAffordablePetsAmount=-1,this._cachedPetCosts=new Map,this._previousBalances=new Map,this._secureInventory=k,this._secureInventory.onChange.add((k=>{"currency"===k.type&&W.B.includes(k.id)&&(this._cachedAffordablePetsAmount=-1,this.onBalanceChanged.dispatch({currency:k.id,value:k.quantity}),this._previousBalances.set(k.id,k.quantity))}),this),J.q.instance.game.broadcaster.addAppListener(rt.ig.AnyLevelUp,(()=>{this._cachedAffordablePetsAmount=-1}),this,null,!0),W.B.forEach((k=>{this._previousBalances.set(k,this.getBalance(k))})),B.getActiveMembershipId().catch((()=>null)).then((k=>{G.Aq$.isDefined(k)&&this.onBalanceChanged.add((F=>{var G,j,$,H;const V=B.player;null!==(G=(H=V.data).seenHardCurrencyIds)&&void 0!==G||(H.seenHardCurrencyIds=[]),V.data.seenHardCurrencyIds.includes(F.currency)||(V.updated=!0,V.data.seenHardCurrencyIds.push(F.currency),U.item.sendItemReceivedEvent(F.currency,null===($=null===(j=it.t.getItem("currency",F.currency))||void 0===j?void 0:j.data)||void 0===$?void 0:$.name,"currency",F.value,{transaction_id:k,source_type:Z.C.InitialMemberBonus}))}),this)}),G.RQr.createHandler("Unable to track initial hard currency balance"))}destroy(){this.onBalanceChanged.dispose(),this.onAffordableCacheChanged.dispose(),this._secureInventory.onChange.removeAll(this),J.q.instance.game.broadcaster.removeAppListener(rt.ig.AnyLevelUp,this)}getBalance(k){var B,U;return null!==(U=null===(B=this._secureInventory.get({type:"currency",id:k}))||void 0===B?void 0:B.quantity)&&void 0!==U?U:0}getPreviousBalance(k){var B;return null!==(B=this._previousBalances.get(k))&&void 0!==B?B:0}canAfford(k){return!G.Aq$.isDefined(k)||(!this.isHardCurrencyMemberLocked(k.value)||!W.h.includes(k.currency))&&k.value<=this.getBalance(k.currency)}isHardCurrencyMemberLocked(k=0){const B=this.getBalance(27);return!((0,ct.G)(K)&&k<=B)&&(!!(0,ct.G)(z)&&!J.q.instance.prodigy.gameContainer.get("306-5359").hasMembership())}spend(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){if(!G.Aq$.isDefined(k))return;const U=this._segment.item.beginSecureItemTransaction();yield this._networkHandler.spend(k,B.transaction_id),U.flush(B)}))}grantCaptureTutorialMagicoin(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this._segment.item.beginSecureItemTransaction(),U="Tutorial";yield this._networkHandler.grantCaptureTutorialMagicoin(U),B.flush(Object.assign({transaction_id:U,source_type:Z.C.Tutorial},k))}))}claimAllowances(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this._segment.item.beginSecureItemTransaction(),{backpackRewards:U}=yield this._networkHandler.claimAllowances(k),F={};if(F.transaction_id=vt.$.generateUID(),(0,ct.G)(X.d).enabled)F.source_type=Z.C.WizardBank,F.source_id=Z.C.WizardBank,F.source_name=Z.C.WizardBank,F.instance_type=ht.N.ShopVisit,F.instance_id=this._segment.featureCommon.getCurrentInterfaceID(ot.B.WizardBank);else{const k=yield J.q.instance.prodigy.gameContainer.get("8dc-04eb").getCurrentBattlePassData().catch((k=>(G.RQr.logError(k,"Error fetching battle pass for analytics"),null)));k&&(F.source_type=Z.C.BattlePass,F.source_id=`${k.getQuestID()}-ultra-bonus-${ut.R.getCurrentMonthName()}`,F.source_name="Ultra Bonus",F.instance_type=ht.N.BattlePass,F.instance_id=k.getQuestID())}for(const k of U)ft.J.bagItem(k,J.q.instance.game,"got-item",void 0,F);B.flush(F)}))}getAllowanceClaimData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._networkHandler.getAllowanceClaimData()}))}petAcquisitionCost(k,B){var U;const F=+k,j=this._cachedPetCosts.get(F);if(null==j?void 0:j.has(B))return{currency:27,value:j.get(B)};if(!(B===$.l6.Evolution||B===$.l6.Rescue))return;const V=it.t.getItem("pet",k);if(!(null==V?void 0:V.data))return void G.VyI.log(`petAcquisitionCost: Pet data does not exist for pet: ${k}`,G.$bb.Error);const W=this.getTables().variants[nt.petCostTableVariationKey],q=H.$N[V.data.rarity]+(null!==(U=H.gW[V.data.category])&&void 0!==U?U:""),K=lt.P8.GetEvolutionaryLine(V),z=K.length,Y=1+K.indexOf(F);try{const k=W[q][z][Y][B];if(G.VyI.log(`The pet acquisition cost for pet ${V.ID} (${V.name}) is ${k}`,G.$bb.Info,{variation:nt.petCostTableVariationKey,kind:q,totalEvolutionLevels:z,evolutionLevel:Y,source:B,evolutionId:F}),0===k)return;return this._cachedPetCosts.has(F)||this._cachedPetCosts.set(F,new Map),this._cachedPetCosts.get(F).set(B,k),{currency:27,value:k}}catch(Q){throw G.VyI.log("Pet evolution does not fit cost tables",G.$bb.Error,{kind:q,totalEvolutionLevels:z,evolutionLevel:Y,source:B,evolutionId:F}),Q}}petMergeIngredientCost(k){var B,U,F,j,W,q;const K=+k,z=it.t.getItem("pet",K);(0,dt.v)(null==z?void 0:z.data,`Pet data does not exist for pet: ${k}`);const Y=tt.R.loadData(V.r.PetMergeCosts_json),X=Q._T,Z=Y.mergeCostDefaults.variants[X.defaultPetCostTableVariantKey],J=Y.mergeCostOverrides.variants[X.overridePetCostTableVariantKey],et=H.$N[z.data.rarity]+(null!==(B=H.gW[z.data.category])&&void 0!==B?B:""),st=null!==(F=null===(U=z.data.evolution)||void 0===U?void 0:U.totalEvos)&&void 0!==F?F:0,nt=null!==(W=null===(j=z.data.evolution)||void 0===j?void 0:j.tier)&&void 0!==W?W:0;(0,dt.v)(st>0&&nt>0,`Evolution data does not exist for pet: ${k}`);try{return{currency:27,value:G.Aq$.isDefined(J)&&G.Aq$.isDefined(null===(q=J[K])||void 0===q?void 0:q.mergeBaseCost)?J[K].mergeBaseCost:Z[et][st][nt][$.l6.Merge]}}catch(at){throw G.VyI.log("Pet is not found in merge cost tables",G.$bb.Error,{kind:et,totalEvolutionLevels:st,evolutionLevel:nt,petId:K}),at}}postProcessPets(){var k;const B=this.getTables().levelCapsEvolutionVariant[at.CONSTANTS_DEFAULT.evolutionLevelCapVariantKey],U=it.t.getCategoryItems("pet"),F=this.collectPetEvolutionsByDestinationPetId(U);for(const G of U){const U=F.get(G.ID);if(!U)continue;let j=-2;for(let B=G.ID;B;B=null===(k=F.get(B))||void 0===k?void 0:k.evolvedFrom)j++;U.curve.lvl=B.level[j]}}collectPetEvolutionsByDestinationPetId(k){const B=new Map;for(const U of k)for(const k of U.data.curve)G.Aq$.isDefined(k.evolveID)&&B.set(k.evolveID,{evolvedFrom:U.ID,curve:k});return B}getAmountOfAffordableEvolutions(){if(-1!==this._cachedAffordablePetsAmount)return this._cachedAffordablePetsAmount;const k=J.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return this._cachedAffordablePetsAmount=k.kennel.getPets().filter((B=>this.canAfford(this.petAcquisitionCost(B.ID,$.l6.Evolution))&<.P8.canPetEvolve(k.kennel.createNewPet(B),B.level))).length,this.onAffordableCacheChanged.dispatch(),this._cachedAffordablePetsAmount}refreshAffordableEvolutionsCache(){this._cachedAffordablePetsAmount=-1,this._cachedAffordablePetsAmount=this.getAmountOfAffordableEvolutions()}getTables(){return tt.R.loadData(V.r.PetEvolutionandRescueCosts_json)}};gt.CONSTANTS_DEFAULT={captureTutorialCurrencyAmount:5,evolutionTutorialCurrencyAmount:15,initialCurrencyCountExistingMember:1540,petCostTableVariantKey:"evoCostRarityBaseV2",evolutionLevelCapVariantKey:"evoLvlCapV1",goToRegularPets:!1,petEvolutionAutoPrompt:{skipIfSchool:!0,skipIfExpensive:!1}},(0,F.Cg)([(0,j.inject)("231-9111"),(0,F.Sn)("design:type",bt.b)],gt.prototype,"_networkHandler",void 0),(0,F.Cg)([(0,j.inject)("c47-20b6"),(0,F.Sn)("design:type",Function)],gt.prototype,"_segment",void 0),gt=at=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("61f-37d6")),(0,F.Qj)(1,(0,j.inject)("e20-0fb0")),(0,F.Qj)(2,(0,j.inject)("c47-20b6")),(0,F.Sn)("design:paramtypes",[pt.U,et.E,Function])],gt)},88038:(k,B,U)=>{"use strict";U.d(B,{_:()=>W});var F=U(8674),G=U(62248),j=U(1195),$=U(13956),H=U(30226),V=U(43754);class W{static shouldAutomaticallyPromptEvolution(k,B){var U,F,j,$,W;const q=null!==(F=null===(U=V.W.CONSTANTS_DEFAULT)||void 0===U?void 0:U.petEvolutionAutoPrompt)&&void 0!==F?F:{};if((null===(j=q.skipIfSchool)||void 0===j||j)&&(H.J.isSchoolHours()||this._player.player.isPlayingAtSchool()))return!1;if(this._automaticEvolutionPromptImpressions>=(null!==($=q.maxAutomaticImpressionsPerSession)&&void 0!==$?$:1/0))return!1;if(this._battlesUntilNextPrompt>0)return!1;if(null===(W=q.skipIfExpensive)||void 0===W||W){const U=k.petAcquisitionCost(B,G.l6.Evolution);if(!k.canAfford(U))return!1}return!0}static automaticEvolutionPromptShown(){this._automaticEvolutionPromptImpressions++}static anyEvolutionPromptShown(){var k,B,U;this._evolutionPromptImpressions++,this._battlesUntilNextPrompt=null!==(U=null===(B=null===(k=V.W.CONSTANTS_DEFAULT)||void 0===k?void 0:k.petEvolutionAutoPrompt)||void 0===B?void 0:B.battlesBetweenPrompts)&&void 0!==U?U:0}static postBattleFlowShown(){this._battlesUntilNextPrompt--}static reset(){this._automaticEvolutionPromptImpressions=0,this._evolutionPromptImpressions=0,this._battlesUntilNextPrompt=0}}(0,F.Cg)([(0,$.b)("e20-0fb0"),(0,F.Sn)("design:type",j.E)],W,"_player",void 0),W.reset()},55839:(k,B,U)=>{"use strict";U.d(B,{x:()=>Y});var F,G=U(8674),j=U(62459),$=U(79687),H=U(95891),V=U.n(H),W=U(35120),q=U(68231),K=U(80403);class z{}z.CLASS_VS_CLASS_QUERY="\n query cvcQuery {\n viewer {\n currentClassroom {\n node {\n currentClassroomCup {\n classroomVersusClassroomLeaderboard {\n cycle {\n startsAt\n endsAt\n }\n entry {\n node {\n classroomId\n rank\n displayName\n totalAnswersCorrect\n }\n }\n entries {\n nodes {\n classroomId\n rank\n displayName\n totalAnswersCorrect\n }\n }\n }\n }\n classroomCups(filterBy: {status: COMPLETED}) {\n nodes {\n classroomVersusClassroomLeaderboard {\n entry {\n node {\n rank\n }\n }\n }\n }\n }\n }\n }\n }\n }\n ",z.STUDENT_VS_STUDENT_QUERY="\n query svsQuery ($studentId: ID!, $first: Int!) {\n viewer {\n currentClassroom {\n node {\n currentClassroomCup {\n studentVersusStudentLeaderboard {\n cycle {\n startsAt\n endsAt\n }\n entry (studentId: $studentId) {\n node {\n studentId\n rank\n totalAnswersCorrect\n }\n }\n entries (first: $first) {\n nodes {\n studentId\n rank\n totalAnswersCorrect\n }\n }\n }\n }\n classroomCups(filterBy: {status: COMPLETED}) {\n nodes {\n studentVersusStudentLeaderboard {\n entry (studentId: $studentId) {\n node {\n rank\n totalAnswersCorrect\n }\n }\n entries (first: $first) {\n nodes {\n studentId\n rank\n totalAnswersCorrect\n }\n }\n }\n }\n }\n }\n }\n }\n }\n ",z.STUDENT_VS_STUDENT_PREVIOUS_RANK_QUERY="\n query svsQuery ($studentId: ID!) {\n viewer {\n currentClassroom {\n node {\n classroomCups(filterBy: {status: COMPLETED}) {\n nodes {\n studentVersusStudentLeaderboard {\n entry (studentId: $studentId) {\n node {\n rank\n totalAnswersCorrect\n }\n }\n }\n }\n }\n }\n }\n }\n }\n ";let Y=F=class{constructor(k){this._isThrottleClassVersusClassEnabled=!1,this._isThrottleStudentVersusStudentEnabled=!1,this._graphQl=k}sendRequestClassVersusClass(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U;try{const G=yield this._graphQl.sendRequest(z.CLASS_VS_CLASS_QUERY),j=null===(U=null===(B=null===(k=null==G?void 0:G.data)||void 0===k?void 0:k.viewer)||void 0===B?void 0:B.currentClassroom)||void 0===U?void 0:U.node;return(null==j?void 0:j.currentClassroomCup)?(this._isThrottleClassVersusClassEnabled||(this.sendRequestClassVersusClass=V().throttle(this.sendRequestClassVersusClass,F.REQUEST_THROTTLE_TIME_MS,{trailing:!1}),this._isThrottleClassVersusClassEnabled=!0),j):null}catch(e){return j.VyI.log(`Error sending request: ${j.RQr.stringify(e)}`,j.$bb.Error),null}}))}sendRequestStudentVersusStudent(){return(0,G.sH)(this,arguments,void 0,(function*(k=100){var B,U,G;const $=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;try{const j=yield this._graphQl.sendRequest(z.STUDENT_VS_STUDENT_QUERY,{studentId:$.userID,first:k}),H=null===(G=null===(U=null===(B=null==j?void 0:j.data)||void 0===B?void 0:B.viewer)||void 0===U?void 0:U.currentClassroom)||void 0===G?void 0:G.node;return(null==H?void 0:H.currentClassroomCup)?(this._isThrottleStudentVersusStudentEnabled||(this.sendRequestStudentVersusStudent=V().throttle(this.sendRequestStudentVersusStudent,F.REQUEST_THROTTLE_TIME_MS,{trailing:!1}),this._isThrottleStudentVersusStudentEnabled=!0),H):null}catch(e){return j.VyI.log(`Error sending request: ${j.RQr.stringify(e)}`,j.$bb.Error),null}}))}fetchSvSPreviousRank(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,$,H;const V=W.q.instance.prodigy.gameContainer.get("306-5359");try{const j=yield this._graphQl.sendRequest(z.STUDENT_VS_STUDENT_PREVIOUS_RANK_QUERY,{studentId:V.userID}),W=null===(H=null===($=null===(G=null===(F=null===(U=null===(B=null===(k=null==j?void 0:j.data.viewer.currentClassroom)||void 0===k?void 0:k.node)||void 0===B?void 0:B.classroomCups)||void 0===U?void 0:U.nodes)||void 0===F?void 0:F[0])||void 0===G?void 0:G.studentVersusStudentLeaderboard)||void 0===$?void 0:$.entry)||void 0===H?void 0:H.node;return W||null}catch(e){return j.VyI.log(`Error sending request: ${j.RQr.stringify(e)}`,j.$bb.Error),null}}))}};Y.REQUEST_THROTTLE_TIME_MS=.8*q.Z.REFRESH_TIMEOUT_MS,Y=F=(0,G.Cg)([(0,$.injectable)(),(0,G.Qj)(0,(0,$.inject)("8bb-7057")),(0,G.Sn)("design:paramtypes",[K.K])],Y)},42113:(k,B,U)=>{"use strict";U.d(B,{n:()=>at,O:()=>ot});var F=U(8674),G=U(62459),j=U(96535),$=U(28152),H=U(96494),V=U(90633),W=U(13956),q=U(80060),K=U(44094);class z{constructor(k){this._data=k}get hasClassroom(){return G.Aq$.isDefined(this._data)}}class Y extends z{constructor(k){super(k)}get cycle(){var k,B;return null===(B=null===(k=this._data)||void 0===k?void 0:k.currentClassroomCup)||void 0===B?void 0:B.classroomVersusClassroomLeaderboard.cycle}get entries(){var k,B,U;return null===(U=null===(B=null===(k=this._data)||void 0===k?void 0:k.currentClassroomCup)||void 0===B?void 0:B.classroomVersusClassroomLeaderboard.entries)||void 0===U?void 0:U.nodes.map(Y.convertClassroomToEntry)}get currentUserEntry(){var k,B,U;return Y.convertClassroomToEntry(null===(U=null===(B=null===(k=this._data)||void 0===k?void 0:k.currentClassroomCup)||void 0===B?void 0:B.classroomVersusClassroomLeaderboard.entry)||void 0===U?void 0:U.node)}get previousUserEntry(){var k,B,U,F,G,j;return Y.convertClassroomToEntry(null===(j=null===(G=null===(F=null===(U=null===(B=null===(k=this._data)||void 0===k?void 0:k.classroomCups)||void 0===B?void 0:B.nodes)||void 0===U?void 0:U[0])||void 0===F?void 0:F.classroomVersusClassroomLeaderboard)||void 0===G?void 0:G.entry)||void 0===j?void 0:j.node)}get previousRank(){var k;return null===(k=this.previousUserEntry)||void 0===k?void 0:k.rank}get previousCyclePrize(){}static convertClassroomToEntry(k){if(k)return{id:k.classroomId,displayName:k.displayName,rank:k.rank,totalAnswersCorrect:k.totalAnswersCorrect}}}var Q,X=U(24521),Z=U(28085),J=U(35120),tt=U(23029),et=U(21492);!function(k){k[k.First=0]="First",k[k.Second=1]="Second",k[k.Third=2]="Third",k[k.TopHalf=3]="TopHalf",k[k.BottomHalf=4]="BottomHalf"}(Q||(Q={}));class it extends z{constructor(k){var B,U,F;super(k),this._entries=null===(F=null===(U=null===(B=this._data)||void 0===B?void 0:B.currentClassroomCup)||void 0===U?void 0:U.studentVersusStudentLeaderboard.entries)||void 0===F?void 0:F.nodes.map(it.convertStudentToEntry.bind(it,this.currentStudentId)),this._entries&&it.addSvsPrizeData(this._entries)}get cycle(){var k,B;return null===(B=null===(k=this._data)||void 0===k?void 0:k.currentClassroomCup)||void 0===B?void 0:B.studentVersusStudentLeaderboard.cycle}get entries(){return this._entries}get currentUserEntry(){var k;const B=this.currentStudentId;if(B)return null===(k=this._entries)||void 0===k?void 0:k.find((k=>k.id===B))}get previousUserEntry(){var k,B,U,F,G;return it.convertStudentToEntry(this.currentStudentId,null===(G=null===(F=null===(U=null===(B=null===(k=this._data.classroomCups)||void 0===k?void 0:k.nodes)||void 0===B?void 0:B[0])||void 0===U?void 0:U.studentVersusStudentLeaderboard)||void 0===F?void 0:F.entry)||void 0===G?void 0:G.node)}get previousRank(){var k;return null===(k=this.previousUserEntry)||void 0===k?void 0:k.rank}get previousCyclePrize(){var k,B,U,F,G,j,$;const H=this.currentStudentId;if(!H)return;const V=null===(j=null===(G=null===(F=null===(U=null===(B=null===(k=this._data)||void 0===k?void 0:k.classroomCups)||void 0===B?void 0:B.nodes)||void 0===U?void 0:U[0])||void 0===F?void 0:F.studentVersusStudentLeaderboard)||void 0===G?void 0:G.entries)||void 0===j?void 0:j.nodes.map(it.convertStudentToEntry.bind(it,H));return it.addSvsPrizeData(V),null===($=null==V?void 0:V.find((k=>k.id===H)))||void 0===$?void 0:$.prize}get currentStudentId(){var k,B,U;return null===(U=null===(B=null===(k=this._data)||void 0===k?void 0:k.currentClassroomCup)||void 0===B?void 0:B.studentVersusStudentLeaderboard.entry)||void 0===U?void 0:U.node.studentId}static convertStudentToEntry(k,B){var U,F;if(!B)return;let G="";if(B.studentId===k){G=J.q.instance.prodigy.gameContainer.get("306-5359").name.getName()}else{const k=null===(F=null===(U=J.q.instance.prodigy.friendsListNetworkHandler.classList.find((k=>`${k.userID}`===B.studentId)))||void 0===U?void 0:U.appearance)||void 0===F?void 0:F.name;if(k){const B=J.q.instance.prodigy.gameContainer.resolve(et.C);B.initFromProtobuf(k),G=B.getName()}}return{id:B.studentId,displayName:G,rank:B.rank,totalAnswersCorrect:B.totalAnswersCorrect}}static addSvsPrizeData(k){var B;const U=tt.R.loadData(X.r.SvSLeaderboardRewards_json),F=U.topSpots.length,G=k.filter((B=>B.rank>0&&B.rank<=k.length&&B.totalAnswersCorrect>0)),j=null===(B=G[G.length-1])||void 0===B?void 0:B.rank;for(const $ of G)$.rank<=F?($.prize=(0,Z.mg)(U.topSpots[$.rank-1]),$.prizeIcon=$.rank-1):$.rank<=F+Math.ceil((j-F)/2)?($.prize=(0,Z.mg)(U.remainingTop),$.prizeIcon=Q.TopHalf):($.prize=(0,Z.mg)(U.remainingBottom),$.prizeIcon=Q.BottomHalf)}}var st,nt,at,rt=U(55839);!function(k){k.CurrentClassroomDisplayName="LEADERBOARD_CURRENT_CLASSROOM_DISPLAY_NAME",k.CurrentClassroomPreviousRank="LEADERBOARD_CURRENT_CLASSROOM_PREVIOUS_RANK",k.ShowNonQualifiedWindow="LEADERBOARD_SHOW_NON_QUALIFIED_WINDOW",k.CurrentLeaderboardType="LEADERBOARD_CURRENT_LEADERBOARD_TYPE"}(nt||(nt={})),function(k){k.ClassLeaderboard="classLeaderboard",k.StudentLeaderboard="studentLeaderboard"}(at||(at={}));let ot=st=class extends G.uAl{constructor(){super(...arguments),this.onCvCDataUpdate=new G.HN0,this.onSvSDataUpdate=new G.HN0,this.onLeaderboardResults=new G.HN0,this.onLeaderboardPrize=new G.HN0,this.onMsTimeRemainingUpdate=new G.HN0,this.onInvalidClassCode=new G.HN0,this.onDataUpdateStart=new G.HN0,this._updateOnCreate=!0,this.currentMenuType=at.ClassLeaderboard,this._initialized=!1}static get cachedCycleEndDate(){return st._cachedCycleEndDate}create(){super.create(),this._updateOnCreate&&this.updateLeaderboardData()}updateLeaderboardData(k){this.onDataUpdateStart.dispatch(),this.currentMenuType=null!=k?k:this.currentMenuType;const B=this.currentMenuType===at.ClassLeaderboard;(()=>(0,F.sH)(this,void 0,void 0,(function*(){return B?new Y(yield this._leaderboardService.sendRequestClassVersusClass()):new it(yield this._leaderboardService.sendRequestStudentVersusStudent())})))().then((k=>{var U,F,j,$;if(null==k?void 0:k.hasClassroom){const H=k.currentUserEntry,V=null==H?void 0:H.id,W={};W[nt.CurrentLeaderboardType]=this.currentMenuType,W[nt.ShowNonQualifiedWindow]=!H&&B;let z=k.previousRank;if(!B&&(null===(U=k.previousUserEntry)||void 0===U?void 0:U.totalAnswersCorrect)<=0&&(z=null),W[nt.CurrentClassroomPreviousRank]=null!==(F=K.$.addOrdinalSuffix(z))&&void 0!==F?F:this._localizer.getText("LEADERBOARDS_PREVIOUS_UNRANKED"),!this._initialized||!st._cachedCycleEndDate||Date.now()>st._cachedCycleEndDate){this._initialized=!0;let B="";(null==H?void 0:H.displayName)&&(B=K.$.truncate(H.displayName,st.DISPLAY_NAME_MAX,!0)),W[nt.CurrentClassroomDisplayName]=B;const U=k.cycle;U&&(st._cachedCycleEndDate=new Date(U.endsAt).getTime())}if(q.d.updateInjectedValues(this.GameObject,W),st._cachedCycleEndDate){const U=st._cachedCycleEndDate-Date.now();this.onMsTimeRemainingUpdate.dispatch(U);const F=this.currentMenuType===at.ClassLeaderboard?this._player.data.lastActiveLeaderboardDate:this._player.data.lastActiveStudentLeaderboardDate,W=B?G.Aq$.isDefined(k.previousRank):(null===(j=k.previousUserEntry)||void 0===j?void 0:j.totalAnswersCorrect)>0;if(G.Aq$.isDefined(F)&&F!==st._cachedCycleEndDate&&W){if(this.onLeaderboardResults.dispatch(),(null===($=k.previousCyclePrize)||void 0===$?void 0:$.length)>0){const B=k.previousCyclePrize[0];this.onLeaderboardPrize.dispatch(B.type,B.ID,B.N)}}else{this.updateSavedCurrentCycle();const U=k.entries;if(U){const k=U.findIndex((k=>k.id===V));(B?this.onCvCDataUpdate:this.onSvSDataUpdate).dispatch(U,V,H,k)}}}}else this.onInvalidClassCode.dispatch()})).catch(G.RQr.createHandler("Error sending Leaderboard request"))}updateSavedCurrentCycle(){switch(this.currentMenuType){case at.ClassLeaderboard:this._player.data.lastActiveLeaderboardDate!==st._cachedCycleEndDate&&(this._player.data.lastActiveLeaderboardDate=st._cachedCycleEndDate,this._breadcrumbManager.resetBreadcrumb(V.B.FEATURE_LEADERBOARD,V.B.BREADCRUMB_LEADERBOARD_NOTIFICATION_VIEWED));break;case at.StudentLeaderboard:this._player.data.lastActiveStudentLeaderboardDate!==st._cachedCycleEndDate&&(this._player.data.lastActiveStudentLeaderboardDate=st._cachedCycleEndDate,this._breadcrumbManager.resetBreadcrumb(V.B.FEATURE_LEADERBOARD,V.B.BREADCRUMB_STUDENT_LEADERBOARD_NOTIFICATION_VIEWED),this._breadcrumbManager.resetBreadcrumb(V.B.FEATURE_LEADERBOARD,V.B.BREADCRUMB_STUDENT_LEADERBOARD_PRIZE_CLAIMED))}}retrievePreviousSvSRankData(){return(0,F.sH)(this,void 0,void 0,(function*(){return st._hasFetchedPreviousCycleSvs||(st._previousCycleSvs=yield this._leaderboardService.fetchSvSPreviousRank(),st._hasFetchedPreviousCycleSvs=!0),st._previousCycleSvs}))}destroy(){this.onCvCDataUpdate.dispose(),this.onSvSDataUpdate.dispose(),this.onLeaderboardResults.dispose(),this.onLeaderboardPrize.dispose(),this.onMsTimeRemainingUpdate.dispose(),this.onInvalidClassCode.dispose(),this.onDataUpdateStart.dispose(),super.destroy()}};ot.DISPLAY_NAME_MAX=70,ot._previousCycleSvs=null,ot._hasFetchedPreviousCycleSvs=!1,(0,F.Cg)([(0,W.b)("b1f-9a70"),(0,F.Sn)("design:type",rt.x)],ot.prototype,"_leaderboardService",void 0),(0,F.Cg)([(0,W.b)("306-5359"),(0,F.Sn)("design:type",j.W)],ot.prototype,"_player",void 0),(0,F.Cg)([(0,G.Cdj)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],ot.prototype,"_localizer",void 0),(0,F.Cg)([(0,G.Cdj)("12f-4e29"),(0,F.Sn)("design:type",H.F)],ot.prototype,"_breadcrumbManager",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],ot.prototype,"onCvCDataUpdate",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],ot.prototype,"onSvSDataUpdate",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],ot.prototype,"onLeaderboardResults",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],ot.prototype,"onLeaderboardPrize",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],ot.prototype,"onMsTimeRemainingUpdate",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],ot.prototype,"onInvalidClassCode",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],ot.prototype,"onDataUpdateStart",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],ot.prototype,"_updateOnCreate",void 0),ot=st=(0,F.Cg)([(0,G.EVk)("LeaderboardDataProvider",$.Y.leaderboard)],ot)},2072:(k,B,U)=>{"use strict";U.d(B,{e:()=>K});var F=U(8674),G=U(62459),j=U(79687),$=U(35120),H=U(15218),V=U(79600),W=U(48417);class q{static getLegacySpawnData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeLegacySpawnRequest(W.D.LegacySpawn.GetLegacySpawnData)}))}static makeLegacySpawnRequest(k){return(0,F.sH)(this,arguments,void 0,(function*(k,B={}){try{const U=$.q.instance.prodigy.gameContainer.get("00d-b27e"),F=yield U.cloudScript.timeoutMS(q.NETWORK_TIMEOUT_DURATION_MS).setRetryOption({retryCount:q.NETWORK_RETRY_COUNT}).execute(k,B);if(!F.isOK())throw new V.CatalystSdkError(V.EErrorCode.Unknown,"Unknown Catalyst SDK Error",`${F.status}: ${JSON.stringify(F.data)}`);return F.data}catch(U){throw new Error(`Error calling Cloudscript ${k}. ${U}`)}}))}}q.NETWORK_TIMEOUT_DURATION_MS=1e4,q.NETWORK_RETRY_COUNT=2;let K=class{constructor(){this.assetLoader=$.q.instance.prodigy.gameContainer.get(G.t5G.AssetLoader),this._getDataDirty=!1}loadDataSchemaFromJson(k){return(0,F.sH)(this,void 0,void 0,(function*(){return yield this.assetLoader.loadAssets([k]),$.q.instance.game.cache.getJSON(k)}))}getMaximumSpawnsForMap(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,G;const j=(yield this.fetchLegacySpawnData()).get(k);return H.A.useRevisedDifficulty?null!==(F=null!==(U=null===(B=null==j?void 0:j.variations)||void 0===B?void 0:B.maxSpawnCount)&&void 0!==U?U:null==j?void 0:j.default.length)&&void 0!==F?F:0:null!==(G=null==j?void 0:j.default.length)&&void 0!==G?G:0}))}getSpawnDataForMap(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=(yield this.fetchLegacySpawnData()).get(k);return B?this.getVariation(B):[]}))}getAllSpawnDataInZone(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=[],U=yield this.fetchLegacySpawnData();return Array.from(U.keys()).forEach((F=>{if(F.startsWith(k)){const k=this.getVariation(U.get(F));B.push(...k)}})),B}))}getVariation(k){var B,U,F;return H.A.useRevisedDifficulty?null!==(U=null!==(B=k.variations[H.A.experimentSpawnVariation])&&void 0!==B?B:k.default)&&void 0!==U?U:[]:null!==(F=k.default)&&void 0!==F?F:[]}fetchLegacySpawnData(){return(0,F.sH)(this,void 0,void 0,(function*(){return!this._getDataDirty&&G.Aq$.isDefined(this._getSpawnsPromise)||(this._getSpawnsPromise=new Promise(((k,B)=>{q.getLegacySpawnData().then((B=>{this._getDataDirty=!1;const U=new Map;B.spawns.forEach((k=>{U.set(k.mapId,k)})),k(U)})).catch((k=>{this._getDataDirty=!0,B(new Error(k))}))}))),this._getSpawnsPromise}))}};K=(0,F.Cg)([(0,j.injectable)()],K)},55122:(k,B,U)=>{"use strict";U.d(B,{s:()=>V});var F=U(62459),G=U(6452),j=U(5491),$=U(35120),H=U(71790);class V{static get minLevel(){return this.battleConstants.constants.baseLevelMinimum}static get maxLevelConfig(){return this.battleConstants.constants.baseLevelMaximumConfig}static getPlayerLevelCap(k){var B,U;const G=k.getPlayerData();return F.Aq$.isDefined(null==G?void 0:G.difficultyUnlocks)?(null===(B=G.difficultyUnlocks)||void 0===B?void 0:B.expert)?this.battleConstants.constants.baseLevelMaximumConfig.expert:(null===(U=G.difficultyUnlocks)||void 0===U?void 0:U.hard)?this.battleConstants.constants.baseLevelMaximumConfig.hard:this.battleConstants.constants.baseLevelMaximumConfig.regular:(F.VyI.log("Player difficulty unlock data is undefined",F.$bb.Warning),this.battleConstants.constants.baseLevelMaximum)}static get activePlayerLevelCap(){const k=$.q.instance.prodigy.gameContainer.get("306-5359");return this.getPlayerLevelCap(k)}static get baseLevelRequiredForChargedLevels(){var k,B;const U=$.q.instance.prodigy.gameContainer.get("306-5359");return(null===(k=U.difficultyUnlocks)||void 0===k?void 0:k.expert)||(null===(B=U.difficultyUnlocks)||void 0===B?void 0:B.hard)?this.battleConstants.constants.baseLevelMaximumConfig.expert:this.battleConstants.constants.baseLevelMaximum}static calculatePlayerOverflowXp(k){const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=this.xpRequiredForLevel(this.activePlayerLevelCap,j.V.Player),F=Math.min(U,B.getStars())-U+k;return Math.max(0,F)}static validatePlayerAndPetXp(){const k=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player;V.validateCreatureXp(k.data,j.V.Player,V.activePlayerLevelCap),k.kennel.data.forEach((k=>{V.validateCreatureXp(k,j.V.Pet,V.activePlayerLevelCap)})),k.updated=!0,k.kennel.updated=!0}static xpRequiredForLevel(k,B){const U=G.D.getLevelCurve(),j=G.D.getXpRequiredForLevel(k,U.cumulativeXp,1);return null===j?(F.VyI.log(`Level curve for ${B} is missing required data for level ${k}`,F.$bb.Error),G.D.getXpRequiredForLevel(U.cumulativeXp.length-1,U.cumulativeXp,1)):j}static validateCreatureXp(k,B,U){const j=G.D.getLevelCurve().cumulativeXp;if(F.Aq$.isDefined(k.nextLevelProgressPercent)||(k.nextLevelProgressPercent=G.D.getCurrentLevelProgressPercent(k.level,k.stars,j,1)),k.level>=U&&(k.nextLevelProgressPercent=1),!F.Aq$.isDefined(k.stars)||1===k.nextLevelProgressPercent||0===k.nextLevelProgressPercent)return void(k.stars=V.xpRequiredForLevel(k.level,B));const $=G.D.getCurrentLevelProgressPercent(k.level,k.stars,j,1);if(!(Math.abs(k.nextLevelProgressPercent-$)<.001)){const U=k.stars;k.stars=G.D.getXpFromNextLevelProgressPercent(k.level,k.nextLevelProgressPercent,j,1),F.VyI.log(`${B} xp adjusted to new level curve ${k.level} at ${k.stars} stars\n Old xp: ${U} -> New xp: ${k.stars}`,F.$bb.Info)}}}V.battleConstants=new H.T},18332:(k,B,U)=>{"use strict";U.d(B,{I:()=>ct});var F=U(8674),G=U(62459),j=U(85880),$=U(95891),H=U.n($),V=U(68910),W=U(88022),q=U(82351),K=U(99625),z=U(56942),Y=U(70156),Q=U(78746),X=U(35120),Z=U(49237),J=U(28152),tt=U(34603),et=U(67665),it=U(24110),st=U(53661),nt=U(80060),at=U(54174),rt=U(66397);const ot={[Q.Os.Battle]:"wave-battle",[Q.Os.Treasure]:"treasure-rush"},ht={[Q.Os.Battle]:{actionTitle:"Waves",largeIconFrame:"info-stage-wave",smallIconFrame:"stage-battle"},[Q.Os.Treasure]:{actionTitle:"Attacks",largeIconFrame:"info-stage-chest",smallIconFrame:"stage-treasure"}};let ct=class extends G.uAl{constructor(){super(...arguments),this._stageIntroSpine=z.Q.Spine_stage_intros_json,this._stagePositions=[],this._opponentPlayerPieces={},this._numberOfPiecesSetup=0,this._matchboardElementTweens=[],this._reviveCountTextProperties=new V.TextStyle({fontSize:56,fill:G.yQ0.WHITE,strokeThickness:12,stroke:G.yQ0.ORANGE,fontFamily:G.dBt.PaytoneOne,lineJoin:"round",trim:!0}),this._lootBagWidgetTextProperties=new V.TextStyle({fontSize:72,fill:G.yQ0.WHITE,strokeThickness:20,stroke:G.Q1f.hexToColor("#363636").color,fontFamily:G.dBt.PaytoneOne,lineJoin:"round",trim:!0})}get fullScreenCardRoot(){return this._fullScreenCardRoot}create(){super.create(),this._infoWidgetsOnScreenPos={x:this._infoWidgetsRoot.transform.localPosition.x,y:this._infoWidgetsRoot.transform.localPosition.y},this._infoWidgetsOffScreenPos={x:1280,y:this._infoWidgetsOnScreenPos.y},this._matchboardOnScreenPos={x:this._matchboardRectTransform.anchoredPivotOffset.x,y:this._matchboardRectTransform.anchoredPivotOffset.y},this._matchboardOffScreenPos={x:this._matchboardOnScreenPos.x,y:-this._matchboardOnScreenPos.y},this._stageGridLayoutOffset=this._stageGridLayout.GameObject.transform.sizeDelta.width/2,this._matchboardOffset=this._matchboardRectTransform.sizeDelta.width/2,this.setupMatchboardZones(),this._exitButton.GameObject.active=!this._lootDashManager.matchController.isQuickQuiz,this._fullScreenCardRoot.active=!1,this._lootDashManager.matchController.onOpponentAdvanced.add(this.handleOpponentStageUpdate,this),this._lootDashManager.matchController.onOpponentJoined.add((k=>{const B=k-this._numberOfPiecesSetup;this.setupOpponents(this._lootDashManager.matchController.opponents.slice(-B))})),this._lootDashPlayerPinTransform.GameObject.active=!1,this._highPlatformYPos=this._lootDashPlayerPinTransform.anchoredPivotOffset.y,this._lowPlatformYPos=this._highPlatformYPos+12,this.setupOpponents(this._lootDashManager.matchController.opponents),this.setupPlayerPiece()}postCreate(){super.postCreate(),this._stageInfoWidgetOnScreenPos={x:this._stageInfoWidgetRoot.transform.localPosition.x,y:this._stageInfoWidgetRoot.transform.localPosition.y},this._stageInfoWidgetOffScreenPos={x:this._stageInfoWidgetOnScreenPos.x,y:-(this._stageInfoWidgetSortingAnchor.getRootContainer().getBounds().height+10)},this.setupMathStreakWidget(),this.setupLootBagWidget(),this.updateStageInfoWidget(!1).catch(G.RQr.createHandler("Error setting up stage info widget")),this._lootBagWaveCompleteIcon.active=!1,this._lootBagWaveCompleteText.GameObject.active=!1}setupMatchboardZones(){const k=this._lootDashManager.matchController.getCurrentZoneStages(),B=this._lootDashManager.matchController.currentStageIndex,U=[],F=[];for(let G=0;GB,[st.eV.StageType]:j.stageType})),F.push(nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,K.l.LootDashStageOverlay,{[st.eV.StageHasMultiplePlayers]:0===G}))}Promise.all(U).then((k=>{for(const B of k)this._stageGridLayout.GameObject.addChild(B),this._stagePositions.push(B.transform.anchoredPivotOffset);this._lootDashPlayerPinTransform.setAnchoredPivotOffset(this._stagePositions[0].x,this._highPlatformYPos),this._lootDashPlayerPinTransform.GameObject.active=!0,this.cacheMatchboardAsBitmap(),this._lootDashManager.matchController.onBattleDataChanged.add((()=>{this.handleBattleDataChanged().catch(G.RQr.createHandler("LootDashBattleUIComponent: Error handling battle data changed"))}),this),this.handleBattleDataChanged().catch(G.RQr.createHandler("LootDashBattleUIComponent: Error handling initial battle data change"))})).catch(G.RQr.createHandler("LootDashBattleUIComponent: Error initializing battle UI")),Promise.all(F).then((k=>{for(const B of k)this._stageOverlayGridLayout.GameObject.addChild(B)})).catch(G.RQr.createHandler("LootDashBattleUIComponent: Error initializing stage overlays"))}setupOpponents(k){this._numberOfPiecesSetup+=k.length;const B=[];for(let U=0;U{B.forEach(((B,U)=>{const F=k[U],j=F.currentStageIndex;this._stagePositions[j]?(B.active=!1,B.transform.setPosition(this._stagePositions[j].x,this._highPlatformYPos),this._lootDashManager.matchController.getPlayerHeadSprite(F.playerId).then((k=>{this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!1,nt.d.updateInjectedValues(B,{[st.eV.MatchBoardPieceName]:`Loot Dash Opponent ${F.playerId}`,[st.eV.MatchBoardPieceHeadTexture]:k.texture}),this.cacheMatchboardAsBitmap()})).catch(G.RQr.createHandler("LootDashBattleUIComponent: Error loading opponent head sprite")),this._opponentPlayerPieces[F.playerId]=B,j!==this._lootDashManager.matchController.currentStageIndex&&this.handleOpponentStageUpdate(F.playerId,j)):B.destroy()}))})).catch(G.RQr.createHandler("LootDashBattleUIComponent: Error loading opponent prefab"))}setupPlayerPiece(){this._numberOfPiecesSetup++;const k=X.q.instance.prodigy.gameContainer.get("e20-0fb0").getUserID();this._lootDashManager.matchController.getPlayerHeadSprite(k).then((k=>{this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!1,nt.d.updateInjectedValues(this._lootDashPlayerPinTransform.GameObject,{[st.eV.MatchBoardPieceName]:"Main player piece",[st.eV.MatchBoardPieceHeadTexture]:k.texture}),this.cacheMatchboardAsBitmap()})).catch(G.RQr.createHandler("LootDashBattleUIComponent: Error loading player head sprite"))}handleBattleDataChanged(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U,F,j;const $=H().cloneDeep(this._lootDashManager.matchController.lootDashMatchData),V=this._lootDashMatchData;if(void 0===V)return this._mathStreakWidgetSpine.setAnimationByName(0,at.h2[`PipFill${null!==(k=$.currentMathStreak)&&void 0!==k?k:0}`],!1),this._lootBagCountText.text=Object.values($.lootBagData).reduce(((k,B)=>k+B),0).toString(),yield Promise.all([this.updateStageInfoWidget(!1),this.advancePlayerToStage(this._lootDashManager.matchController.currentStageIndex,!0)]),void(this._lootDashMatchData=$);const W=this._lootDashManager.matchController.getCurrentZoneStages().length,q=this._lootDashManager.matchController.currentStageIndex,K=null!==(U=null===(B=null==V?void 0:V.currentStage)||void 0===B?void 0:B.stageIndex)&&void 0!==U?U:-1;if(this.updateStageInfoWidget(q!==K).catch(G.RQr.createHandler("Error updating stage info widget")),q(null!==(F=null==V?void 0:V.lootBagData.fromStreak)&&void 0!==F?F:0)?Q.s9:$.currentMathStreak,B=null!==(j=null==V?void 0:V.currentMathStreak)&&void 0!==j?j:0;this.handleMathStreakChange(B,k)}this._lootDashMatchData=$}))}getStagePosition(k){return k>=this._stagePositions.length?this._matchboardTrackEndIcon.GameObject.transform.localPosition:this._stagePositions[k]}advancePlayerToStage(k){return(0,F.sH)(this,arguments,void 0,(function*(k,B=!1){if(this._lootDashManager.matchController.currentStageIndex<1)return;const U=B?1:at.I1.DEFAULT_TWEEN_DURATION,G=this._stageGridLayout.GameObject.children[k-1].transform.localPosition.x;yield this.adjustMatchboardElementSize(this._completedTrackTransform,{width:Math.abs(G+this._stageGridLayoutOffset),height:this._completedTrackTransform.sizeDelta.height},U),this.updateStage(k-1);for(const F of this._lootDashManager.matchController.opponents)F.currentStageIndex===k-1&&this.updateOpponentPiece(F.playerId),B||this.playSfx(q.B.Loot_dash_matchboard_move);const j=this._stagePositions[k].x;yield Promise.all([this.moveMatchboardElement(this._lootDashPlayerPinTransform.GameObject,{x:j,y:this._highPlatformYPos},U).then((()=>(0,F.sH)(this,void 0,void 0,(function*(){return null!=B?B:this.rotatePlayerPinEnd()})))),this.adjustMatchboardElementSize(this._inProgressTrackTransform,{width:Math.abs(j+this._stageGridLayoutOffset),height:this._inProgressTrackTransform.sizeDelta.height},U),null!=B?B:this.rotatePlayerPinStart()]);for(const F of this._lootDashManager.matchController.opponents)F.currentStageIndex===k&&this.updateOpponentPiece(F.playerId);this.updateStage(k)}))}rotatePlayerPinStart(){return(0,F.sH)(this,void 0,void 0,(function*(){this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!1;const k=this.tweenGameObjectRotation(this._lootDashPlayerPinTransform.GameObject,at.I1.PLAYER_PIN_ROTATE_START_AMOUNT,at.I1.PLAYER_PIN_ROTATE_START_TWEEN_DURATION);this._matchboardElementTweens.push(k),yield k.onTweenComplete.asPromise(),this._matchboardElementTweens.splice(this._matchboardElementTweens.indexOf(k),1),this.cacheMatchboardAsBitmap()}))}rotatePlayerPinEnd(){return(0,F.sH)(this,void 0,void 0,(function*(){this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!1;const k=this.tweenGameObjectRotation(this._lootDashPlayerPinTransform.GameObject,0,at.I1.PLAYER_PIN_ROTATE_END_TWEEN_DURATION,G.GS3.generateCustomElasticEase(at.I1.PLAYER_PIN_ROTATE_ELASTIC_STRENGTH,at.I1.PLAYER_PIN_ROTATE_ELASTICITY,!1,!0));this._matchboardElementTweens.push(k),yield k.onTweenComplete.asPromise(),this._matchboardElementTweens.splice(this._matchboardElementTweens.indexOf(k),1),this.cacheMatchboardAsBitmap()}))}movePlayerPinToEndOfMatchboard(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._stagePositions[this._stagePositions.length-1].x,B=Math.round(this._stageGridLayout.GameObject.transform.sizeDelta.width/2);yield this.adjustMatchboardElementSize(this._completedTrackTransform,{width:k+B,height:this._inProgressTrackTransform.sizeDelta.height},at.I1.DEFAULT_TWEEN_DURATION),this.updateStage(this._stagePositions.length-1);for(const F of this._lootDashManager.matchController.opponents)F.currentStageIndex===this._stagePositions.length-1&&this.updateOpponentPiece(F.playerId);this.playSfx(q.B.Loot_dash_matchboard_move);const U=this._matchboardTrackEndIcon.GameObject.transform.anchoredPivotOffset.x;yield Promise.all([this.moveMatchboardElement(this._lootDashPlayerPinTransform.GameObject,{x:U,y:this._highPlatformYPos},at.I1.DEFAULT_TWEEN_DURATION),this.adjustMatchboardElementSize(this._inProgressTrackTransform,{width:U+this._matchboardOffset,height:this._inProgressTrackTransform.sizeDelta.height},at.I1.DEFAULT_TWEEN_DURATION)])}))}moveMatchboardElement(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!1;const F=this.tweenGameObjectPosition(k,{x:B.x,y:B.y},U);this._matchboardElementTweens.push(F),yield F.onTweenComplete.asPromise(),this._matchboardElementTweens.splice(this._matchboardElementTweens.indexOf(F),1),this.cacheMatchboardAsBitmap()}))}adjustMatchboardElementSize(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!1;const F=this.tweenRectTransformSize(k,{width:B.width,height:B.height},U);this._matchboardElementTweens.push(F),yield F.onTweenComplete.asPromise(),this._matchboardElementTweens.splice(this._matchboardElementTweens.indexOf(F),1),this.cacheMatchboardAsBitmap()}))}hideAll(){return(0,F.sH)(this,void 0,void 0,(function*(){yield Promise.all([this.setInfoWidgetsVisibility(!1),this.hideMatchboard()])}))}showAll(){return(0,F.sH)(this,void 0,void 0,(function*(){yield Promise.all([this.setInfoWidgetsVisibility(!0),this.showMatchboard()])}))}setInfoWidgetsVisibility(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=k?this._infoWidgetsOnScreenPos:this._infoWidgetsOffScreenPos;this.isGameObjectAtWorldPosition(this._infoWidgetsRoot,B)||(yield this.tweenGameObjectPosition(this._infoWidgetsRoot,B).onTweenComplete.asPromise())}))}isGameObjectAtWorldPosition(k,B){return k.transform.worldPosition.x===B.x&&k.transform.worldPosition.y===B.y}showMatchboard(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.moveMatchboardElement(this._matchboardRectTransform.GameObject,this._matchboardOnScreenPos,at.I1.DEFAULT_TWEEN_DURATION)}))}hideMatchboard(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.moveMatchboardElement(this._matchboardRectTransform.GameObject,this._matchboardOffScreenPos,at.I1.DEFAULT_TWEEN_DURATION)}))}hideStageInfoWidget(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.tweenGameObjectPosition(this._stageInfoWidgetRoot,this._stageInfoWidgetOffScreenPos).onTweenComplete.asPromise()}))}showStageInfoWidget(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.tweenGameObjectPosition(this._stageInfoWidgetRoot,this._stageInfoWidgetOnScreenPos).onTweenComplete.asPromise()}))}tweenGameObjectPosition(k,B,U=at.I1.DEFAULT_TWEEN_DURATION){const F={x:k.transform.localPosition.x,y:k.transform.localPosition.y},G=X.q.instance.game.add.tween(F,this);return G.to(B,U),G.onUpdate.add((()=>{k.transform.setPosition(F.x,F.y)})),G.start(),G}tweenGameObjectRotation(k,B,U=at.I1.DEFAULT_TWEEN_DURATION,F){const G=X.q.instance.game.add.tween(k.transform,this);return G.to({localRotation:B},U,F),G.start(),G}handleOpponentStageUpdate(k,B){const U=this._lootDashManager.matchController.currentStageIndex===B,F=this.getStagePosition(B).x,j=U?this._highPlatformYPos:this._lowPlatformYPos;this._opponentPlayerPieces[k].active=!0;const $=at.I1.DEFAULT_TWEEN_DURATION,H=window.setTimeout((()=>{this._opponentPiecesRoot.addChildAt(this._opponentPlayerPieces[k],this._opponentPiecesRoot.children.length-1)}),$/3);this.moveMatchboardElement(this._opponentPlayerPieces[k],{x:F,y:j},$).then((()=>{this.updateOpponentPiece(k),this.updateStage(B)})).catch((k=>{clearTimeout(H),G.RQr.logError(k,"LootDashBattleUIComponent: Error moving opponent player piece after update")})),this.updateStage(B-1)}updateOpponentPiece(k){const B=this._lootDashManager.matchController.currentStageIndex,U=this._lootDashManager.matchController.getOpponentData(k).currentStageIndex,F=B===U,G=this._opponentPlayerPieces[k];G.transform.localPosition.x!==this.getStagePosition(U).x||(G.active=!F,G.transform.setPositionY(F?this._highPlatformYPos:this._lowPlatformYPos))}updateStage(k){if(k<0||k>=this._stagePositions.length)return;let B=this._lootDashManager.matchController.opponents.filter((B=>B.currentStageIndex===k)).length;this._lootDashManager.matchController.currentStageIndex===k&&B++,nt.d.updateInjectedValues(this._stageGridLayout.GameObject.children[k],{[st.eV.StageCurrent]:k===this._lootDashManager.matchController.currentStageIndex,[st.eV.StageCompleted]:kthis._lootDashManager.matchController.currentStageIndex,[st.eV.ShowStageIcon]:0===B}),nt.d.updateInjectedValues(this._stageOverlayGridLayout.GameObject.children[k],{[st.eV.StageHasMultiplePlayers]:B>1})}tweenRectTransformSize(k,B,U=at.I1.DEFAULT_TWEEN_DURATION){const F={width:k.sizeDelta.width,height:k.sizeDelta.height},G=X.q.instance.game.add.tween(F,this);return G.to(B,U),G.onUpdate.add((()=>{k.setSizeDelta(F.width,F.height)})),G.start(),G}showReviveSequence(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield X.q.instance.prodigy.load.assetsAsPromise([z.Q.Spine_revive_json]),this._fullScreenCardSpine.setAsset(z.Q.Spine_revive_json);const B=k===Y.eA?"∞":(k+1).toString(),U=new V.Text(B,this._reviveCountTextProperties);U.scale.set(1,-1),U.anchor.set(.5,.5),U.position._x-=2;const F=this._fullScreenCardSpine.getSlot(at.I1.REVIVE_ANIMATION_SLOT_NAME).data.index;this._fullScreenCardSpine.getSpine().getSlotContainerByIndex(F).addChild(U),this._fullScreenCardSpine.getSpine().onEvent.addOnce(((B,F)=>{F.data.name===at.I1.REVIVE_UPDATE_EVENT_NAME&&(U.text=k===Y.eA?"∞":k.toString())})),this.playSfx(q.B.Loot_dash_revive),this._fullScreenCardRoot.active=!0,this._fullScreenCardSpine.setAnimationByName(0,at.I1.REVIVE_ANIMATION_NAME,!0),yield this._fullScreenCardSpine.getSpine().onComplete.asPromise(),this._fullScreenCardRoot.active=!1}))}showLootBagReceivedSequence(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this._lootBagWidgetSpine.getRootContainer();B.cacheAsBitmap=!1;const U=this._lootDashManager.matchController.lootDashMatchData,F=Object.values(U.lootBagData).reduce(((k,B)=>k+B),0);this.playSfx(q.B.Loot_dash_loot_bag_added),this._lootBagWidgetRoot.active=!0,this._lootBagWidgetSpine.setAnimationByName(0,at.Fi.Receive,!1),yield this._lootBagWidgetSpine.getSpine().onComplete.asPromise();for(let G=0;Gk[at.I1.MATH_STREAK_LOOT_BAG_ATTACHMENT_NAME])))||void 0===k?void 0:k[at.I1.MATH_STREAK_LOOT_BAG_ATTACHMENT_NAME],U=null==B?void 0:B.region.texture;U&&this._mathStreakIconGraphic.setTexture(U)}setupLootBagWidget(){this._lootBagWidgetRoot.active=!0;X.q.instance.prodigy.load.assetsAsPromise([z.Q.Lootbag_widget_json]).then((()=>{this._lootBagWidgetSpine.getRootContainer().cacheAsBitmap=!0})).catch(G.RQr.createHandler("LootDashBattleUiComponent: Failed to load loot bag widget spine")),this._lootBagWidgetSpine.setAsset(z.Q.Lootbag_widget_json),this._lootBagCountText=new V.Text((0).toString(),this._lootBagWidgetTextProperties),this._lootBagCountText.scale.set(1,-1),this._lootBagCountText.anchor.set(.5,.5);const k=this._lootBagWidgetSpine.getSlot(at.I1.LOOT_BAG_ANIMATION_SLOT_NAME).data.index;this._lootBagWidgetSpine.getSpine().getSlotContainerByIndex(k).addChild(this._lootBagCountText);const B=this._lootBagWidgetRoot.transform.worldPosition;this._lootBagIconTargetPosition={x:B.x-21,y:B.y-21}}updateStageInfoWidget(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this._lootDashManager.matchController.lootDashMatchData,U=B.currentStage;if(!U)return void this._stageInfoWidgetRoot.transform.setPosition(this._stageInfoWidgetOffScreenPos.x,this._stageInfoWidgetOffScreenPos.y);const F=ht[U.stageType],j=X.q.instance.game.cache.getTexture(W._.Ui_loot_dash_json,F.largeIconFrame);let $;switch(U.stageType){case Q.Os.Battle:$=`${B.currentWaveIndex+1} / ${U.waves.length}`;break;case Q.Os.Treasure:$=`${B.currentWaveIndex}`}const H=B.stageData[B.currentStage.stageIndex+1];let V;H&&(V=X.q.instance.game.cache.getTexture(W._.Ui_loot_dash_json,ht[H.stageType].smallIconFrame)),this._stageInfoWidgetSortingAnchor.getRootContainer().cacheAsBitmap=!1,k&&(yield this.hideStageInfoWidget(),yield G.Egh.timeout(at.I1.STAGE_INFO_WIDGET_UPDATE_DELAY_MS)),nt.d.updateInjectedValues(this.GameObject,{[st.eV.StageInfoWidgetActionTitle]:F.actionTitle,[st.eV.StageInfoWidgetActionProgress]:$,[st.eV.StageInfoWidgetCurrentStageIcon]:j,[st.eV.StageInfoWidgetNextStageIcon]:V,[st.eV.StageInfoWidgetShowFinishLine]:void 0===H}),yield this.showStageInfoWidget(),this._stageInfoWidgetSortingAnchor.getRootContainer().cacheAsBitmap=!0}))}handleMathStreakChange(k,B){let U;if(B<=0?(U=k<=0?at.h2.EmptyStateStar:at.h2[`PipLoss${k}`],k!==B&&(this.playSfx(q.B.Loot_dash_math_streak_reset),this._segment.lootDash.sendMathStreakResetEvent(k))):(U=at.h2[`PipFill${B}`],k!==B&&(this.playSfx(q.B.Loot_dash_math_streak_increased),this._segment.lootDash.sendMathStreakContinuedEvent(B))),U){const k=this._mathStreakWidgetSpine;k.getRootContainer().cacheAsBitmap=!1,k.setAnimationByName(0,U,!1),k.getSpine().onComplete.addOnce((()=>{U===at.h2.PipFill5?this.playStreakCompleteSequence().catch(G.RQr.createHandler("Failed to play math streak complete sequence")):k.getRootContainer().cacheAsBitmap=!0}))}}playStreakCompleteSequence(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._mathStreakWidgetSpine,B=this._lootBagMathStreakIcon;k.getRootContainer().cacheAsBitmap=!1,this.playSfx(q.B.Loot_dash_math_streak_complete),k.setAnimationByName(0,at.h2.PipFillFull,!1),yield k.getSpine().onComplete.asPromise(),B.active=!0,k.setAnimationByName(0,at.h2.FullStateNoIcon,!1),yield k.getSpine().onComplete.asPromise();const U=B.transform.worldPosition,F=G.GS3.Quadratic.InOut,j=G.GS3.generateCustomBackEase(-250,!0,!1);yield this.animateLootBagIcon(B,U,F,j),B.active=!1,B.transform.worldPosition={x:U.x,y:U.y},yield this.showLootBagReceivedSequence(1),k.setAnimationByName(0,at.h2.PipFillEmpties,!1),yield k.getSpine().onComplete.asPromise(),k.setAnimationByName(0,at.h2.EmptyStateStar,!1),k.getRootContainer().cacheAsBitmap=!0}))}animateLootBagIcon(k,B,U,$){return(0,F.sH)(this,void 0,void 0,(function*(){const F=this._lootBagIconTargetPosition,H={value:0},V=j.os.parseEase(U.value),W=j.os.parseEase($.value),q=X.q.instance.game.add.tween(H,this);q.to({value:1},at.I1.LOOT_BAG_TWEEN_TIME_MS,G.GS3.Quadratic.Out,!0),q.onUpdate.add((()=>{k.transform.worldPosition={x:V(H.value)*(F.x-B.x)+B.x,y:W(H.value)*(F.y-B.y)+B.y}})),yield q.onTweenComplete.asPromise()}))}animateWaveEndLootBagScale(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._lootBagWaveCompleteParent.transform.worldScale,B=j.os.parseEase(G.GS3.generateCustomBackEase(-7,!0,!1).value),U={value:0},F=X.q.instance.game.add.tween(U,this);F.to({value:1},at.I1.LOOT_BAG_WAVE_COMPLETE_ICON_SCALE_TIME,G.GS3.Quadratic.Out,!0),F.onUpdate.add((()=>{this._lootBagWaveCompleteParent.transform.setScale(B(U.value)*k.x)})),F.start(),yield F.onTweenComplete.asPromise()}))}cacheMatchboardAsBitmap(){this._matchboardElementTweens.length<=0&&(this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!0)}playSfx(k){X.q.instance.prodigy.audio.playSFXFromGUID(k)}destroy(){var k,B,U,F;X.q.instance.game.tweens.removeAllFromOwner(this),null===(B=null===(k=this._lootDashManager.matchController)||void 0===k?void 0:k.onBattleDataChanged)||void 0===B||B.removeAll(this),null===(F=null===(U=this._lootDashManager.matchController)||void 0===U?void 0:U.onOpponentAdvanced)||void 0===F||F.remove(this.handleOpponentStageUpdate,this),super.destroy()}};(0,F.Cg)([(0,G.Bak)(),(0,F.Sn)("design:type",String)],ct.prototype,"_stageIntroSpine",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],ct.prototype,"_infoWidgetsRoot",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],ct.prototype,"_stageInfoWidgetRoot",void 0),(0,F.Cg)([(0,G.MnK)(it.B),(0,F.Sn)("design:type",it.B)],ct.prototype,"_stageInfoWidgetSortingAnchor",void 0),(0,F.Cg)([(0,G.MnK)(G.v2j),(0,F.Sn)("design:type",G.v2j)],ct.prototype,"_mathStreakWidgetSpine",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],ct.prototype,"_lootBagMathStreakIcon",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],ct.prototype,"_mathStreakIconGraphic",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],ct.prototype,"_lootBagWidgetRoot",void 0),(0,F.Cg)([(0,G.MnK)(G.v2j),(0,F.Sn)("design:type",G.v2j)],ct.prototype,"_lootBagWidgetSpine",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],ct.prototype,"_lootBagWaveCompleteParent",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],ct.prototype,"_lootBagWaveCompleteIcon",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],ct.prototype,"_lootBagWaveCompleteText",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],ct.prototype,"_fullScreenCardRoot",void 0),(0,F.Cg)([(0,G.MnK)(G.v2j),(0,F.Sn)("design:type",G.v2j)],ct.prototype,"_fullScreenCardSpine",void 0),(0,F.Cg)([(0,G.MnK)(Z.$),(0,F.Sn)("design:type",Z.$)],ct.prototype,"_exitButton",void 0),(0,F.Cg)([(0,G.MnK)(it.B),(0,F.Sn)("design:type",it.B)],ct.prototype,"_matchboardSortingAnchor",void 0),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],ct.prototype,"_matchboardRectTransform",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],ct.prototype,"_opponentPiecesRoot",void 0),(0,F.Cg)([(0,G.MnK)(G.Sz7),(0,F.Sn)("design:type",G.Sz7)],ct.prototype,"_stageGridLayout",void 0),(0,F.Cg)([(0,G.MnK)(G.Sz7),(0,F.Sn)("design:type",G.Sz7)],ct.prototype,"_stageOverlayGridLayout",void 0),(0,F.Cg)([(0,G.MnK)(tt._),(0,F.Sn)("design:type",tt._)],ct.prototype,"_matchboardTrackStartIcon",void 0),(0,F.Cg)([(0,G.MnK)(tt._),(0,F.Sn)("design:type",tt._)],ct.prototype,"_matchboardTrackEndIcon",void 0),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],ct.prototype,"_lootDashPlayerPinTransform",void 0),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],ct.prototype,"_completedTrackTransform",void 0),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],ct.prototype,"_inProgressTrackTransform",void 0),(0,F.Cg)([(0,G.Cdj)("cfe-9c2c"),(0,F.Sn)("design:type",rt.K)],ct.prototype,"_lootDashManager",void 0),(0,F.Cg)([(0,G.Cdj)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],ct.prototype,"_prefabLoader",void 0),(0,F.Cg)([(0,G.Cdj)("c47-20b6"),(0,F.Sn)("design:type",et.Y)],ct.prototype,"_segment",void 0),ct=(0,F.Cg)([(0,G.EVk)("LootDashBattleUI",J.Y.lootDash)],ct)},54174:(k,B,U)=>{"use strict";var F,G,j;U.d(B,{Fi:()=>G,I1:()=>$,_c:()=>j,h2:()=>F}),function(k){k.EmptyStateStar="empty-state-star",k.FullStateLootbag="full-state-lootbag",k.FullStateNoIcon="full-state-no-icon",k.PipFill0="empty-state-star",k.PipFill1="pip-fill-1",k.PipFill2="pip-fill-2",k.PipFill3="pip-fill-3",k.PipFill4="pip-fill-4",k.PipFill5="pip-fill-5",k.PipFillEmpties="pip-fill-empties",k.PipFillFull="pip-fill-full",k.PipLoss1="pip-loss-1",k.PipLoss2="pip-loss-2",k.PipLoss3="pip-loss-3",k.PipLoss4="pip-loss-4"}(F||(F={})),function(k){k.Idle="idle",k.Receive="lootbag-recieve",k.Fill="lootbag-fill",k.Finish="lootbag-finish"}(G||(G={})),function(k){k.None="none",k.Fireworks="fireworks",k.FireworksLess="fireworks-less",k.FireworksSingle="fireworks-single"}(j||(j={}));class ${}$.REVIVE_ANIMATION_NAME="revive-idle",$.REVIVE_UPDATE_EVENT_NAME="tick-down",$.REVIVE_ANIMATION_SLOT_NAME="numbers",$.LOOT_BAG_ANIMATION_SLOT_NAME="numbers",$.StageIntroAnimationName="stage-idle",$.MATH_STREAK_LOOT_BAG_ATTACHMENT_NAME="lootbag",$.DEFAULT_TWEEN_DURATION=500,$.LOOT_BAG_TWEEN_TIME_MS=1e3,$.LOOT_BAG_WAVE_COMPLETE_TEXT_TWEEN_TIME_MS=1e3,$.LOOT_BAG_WAVE_COMPLETE_DELAY_TIME_MS=1e3,$.LOOT_BAG_WAVE_COMPLETE_ICON_SCALE_TIME=300,$.STAGE_INFO_WIDGET_UPDATE_DELAY_MS=500,$.PLAYER_PIN_ROTATE_START_TWEEN_DURATION=1e3,$.PLAYER_PIN_ROTATE_START_AMOUNT=-17,$.PLAYER_PIN_ROTATE_END_TWEEN_DURATION=600,$.PLAYER_PIN_ROTATE_ELASTIC_STRENGTH=2.6,$.PLAYER_PIN_ROTATE_ELASTICITY=.5},61895:(k,B,U)=>{"use strict";U.d(B,{B:()=>it});var F=U(8674),G=U(62459),j=U(56942),$=U(52551),H=U(78746),V=U(12022),W=U(66582),q=U(35120),K=U(91207),z=U(77938),Y=U(23082),Q=U(53661),X=U(87331),Z=U(22023),J=U(80060),tt=U(66207);const et=[W._$.NonMember,W._$.MemberCore,W._$.MemberLevelUp];class it{static getInjectedValuesForNoMoreRevivesModal(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=q.q.instance.prodigy.gameContainer.get("e20-0fb0"),j=yield F.fetchMembershipUpsell();if(!et.includes(null!=U?U:j.tier))return;const $=null!=B?B:tt.D.isFeatureEnabled(),H=q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),K=V.G.getNumberOfRevivesFromMemberTier(W._$.MemberCore,k),z=V.G.getNumberOfRevivesFromMemberTier(W._$.MemberUltra,k),Y=V.G.getNumberOfRevivesFromMemberTier(W._$.MemberLevelUp,k),X=V.G.getNumberOfRevivesFromMemberTier(W._$.MemberUltimateMath,k),Z=H.getText("NO_MORE_REVIVES");let J="",it="",st="",nt="",at="",rt="",ot=!1,ht=!1,ct=!1,dt=!1;switch(null!=U?U:j.tier){case W._$.NonMember:$?(J=H.getText("BE_ULTRA_READY_AND_GET_MORE"),it=H.getText("MEMBERSHIP_TIER_NAME_CORE"),nt=H.getText("PLUS_AND_ULTRA"),at=`x${K}`,rt=`x${z}`,ht=!0):(J=H.getText("MEMBERS_GET_MORE_REVIVES"),it=H.getText("LEVEL_UP_MEMBER"),st=H.getText("ULTIMATE_MEMBER"),at=`x${Y}`,rt=`x${X}`,ot=!0);break;case W._$.MemberCore:case W._$.MemberLevelUp:$?(J=H.getText("BE_ULTRA_READY_AND_GET_MORE"),nt=H.getText("PLUS_AND_ULTRA"),rt=`x${z}`,dt=!0):(J=H.getText("ULTIMATE_MEMBERS_GET_MORE_REVIVES"),st=H.getText("ULTIMATE_MEMBER"),rt=`x${X}`,ct=!0)}return{[Q.eV.NoMoreRevivesBannerTextCore]:it,[Q.eV.NoMoreRevivesBannerTextPlus]:st,[Q.eV.NoMoreRevivesBannerTextUltra]:nt,[Q.eV.NoMoreRevivesLineOneText]:Z,[Q.eV.NoMoreRevivesLineTwoText]:J,[Q.eV.NoMoreRevivesReviveAmountTextCore]:at,[Q.eV.NoMoreRevivesReviveAmountTextPlusAndUltra]:rt,[Q.eV.NoMoreRevivesShowCoreAndPlus]:ot,[Q.eV.NoMoreRevivesShowCoreAndUltra]:ht,[Q.eV.NoMoreRevivesShowPlusOnly]:ct,[Q.eV.NoMoreRevivesShowUltraOnly]:dt}}))}static getInjectedValuesForOwnedPetCardPet(k,B=!1){var U,F;const G=z.t.getItem("pet",k.ID);return{PET_ID:k.ID,PET_DATA:k,PET:k,NAME:null!==(F=null!==(U=k.nickname)&&void 0!==U?U:k.name)&&void 0!==F?F:G.data.name,LEVEL:k.level,MERGE_RANK:Z.P8.getPetDisplayMergeRank(k.ID,k.uniqueID),SHOW_MERGE_RANK_BADGE:Z.P8.canPetAccessMergeRanks(k.ID),INPUT_ENABLED:!0,SELECTED:!1,ICON:K.E.getIconForType("pet",k.ID),SHOW_ON_TEAM:B,SHOW_EVOLVE:!1,SHOW_UPGRADE:!1,SHOW_GUIDE_HAND:!1,SHOW_ELEMENT_ICON:!0,SHOW_MEMBERLOCK_ICON:!1,SHOW_STAT_ICON:!1,SHOW_LEVEL_ICON:!0,SHOW_PET_GEAR:!0}}static getInjectedValuesForOwnedPetCardBackpackItem(k,B){var U;const F=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G="follow"===B?F.equipment.getFollow()===k:F.equipment.getMount()===k,j=z.t.getItem(B,k);return{NAME:null===(U=null==j?void 0:j.data)||void 0===U?void 0:U.name,INPUT_ENABLED:!0,ICON:K.E.getIconForType(B,k),SHOW_ON_TEAM:G,SHOW_EVOLVE:!1,SHOW_UPGRADE:!1,SHOW_GUIDE_HAND:!1,SHOW_ELEMENT_ICON:!1,SHOW_STAT_ICON:!0,SHOW_LEVEL_ICON:!1,SHOW_PET_GEAR:!1,SHOW_MEMBERLOCK_ICON:X.G.shouldShowMemberLockIcon(j,F),SHOW_MERGE_RANK_BADGE:!1,STAT_ICON_DISPLAY_ITEM_ID:k,STAT_ICON_DISPLAY_ITEM_TYPE:B,ITEM_CARD_DATA:j,MERGE_RANK:0}}static getInjectedValuesForFilledTeamCardPet(k){var B,U;const F=z.t.getItem("pet",k.data.ID);return{PET_ID:k.data.ID,PET_DATA:k.data,NAME:null!==(U=null!==(B=k.data.nickname)&&void 0!==B?B:k.data.name)&&void 0!==U?U:F.data.name,LEVEL:k.data.level,MERGE_RANK:Z.P8.getPetDisplayMergeRank(k.data.ID,k.data.uniqueID),SHOW_MERGE_RANK_BADGE:Z.P8.canPetAccessMergeRanks(k.data.ID),INPUT_ENABLED:!0,SPINE_GUID:j.Q[`Spine_pet_${k.data.ID}_json`],SHOW_SPINE:!0,SHOW_EMPTY_STATE:!1,SHOW_MEMBERLOCK_ICON:!1,SHOW_LEVEL:!0,SHOW_REPLACE_TOOLTIP:!1}}static setupPrefabWithRetainedContext(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){const F=q.q.instance.prodigy.gameContainer.get("d0e-64fd"),j=yield J.d.loadWithInjectedValuesAndDependenciesFromGUID(F,k,B),$=j.transform;return $.setPivot(.5,.5),$.setAnchorMin(0,0),$.setAnchorMax(0,0),j.name=U,it.moveObjectContextToGameObject(j,B),G&&(j.parent=G),j.setLayer(void 0,!0),j}))}static moveObjectContextToGameObject(k,B){const U=k.addComponent(G.bE_);for(const G in B)U.Container.bind(G).toConstantValue(B[G]);const F=k.parent;k.parent=null,F.destroy()}static cancelQuickQuiz(){var k,B,U;const F=q.q.instance.prodigy.gameContainer.get("cfe-9c2c"),j=q.q.instance.prodigy.gameContainer.get("fc2-cb0a"),$=q.q.instance.game.state.current,V=void 0!==j.currentQuickQuizId&&!G.Aq$.isDefined(F.matchController)&&$!==Y.G.LootDashTransport;if($===Y.G.LootDashTransport||V)return null===(k=F.transportModalTimer)||void 0===k||k.onTimerCompleted.removeAll(),F.transportModalTimer=void 0,j.leaveQuickQuiz(),q.q.instance.prodigy.open.menuCloseAll(),void it.openQuickQuizCancelledPopup((()=>{j.handleQuizExitFlowComplete()}));if(!(null===(B=F.matchController)||void 0===B?void 0:B.matchType)||!(null===(U=F.matchController)||void 0===U?void 0:U.isQuickQuiz))return;[H.zM.FindingAMatch,H.zM.WaitingForPlayers].includes(F.lootDashState)&&(F.cancelMatchmaking(),it.openQuickQuizCancelledPopup((()=>F.setState(H.zM.MatchEndedByServer))))}static openQuickQuizCancelledPopup(k,B=!0){const U=$.w.getConfig(H.B1.QuickQuiz),F=q.q.instance.prodigy.open.message(q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("LOOT_DASH_QUICK_QUIZ_CANCELLED"));if(B){const B=window.setTimeout((()=>{F.close()}),U.quickQuizConfigs.quickQuizCancelledTimeoutMs);F.onClose=()=>{window.clearTimeout(B),k()}}else F.onClose=()=>{k()}}}},66397:(k,B,U)=>{"use strict";U.d(B,{K:()=>yt});var F=U(8674),G=U(62459),j=U(79687),$=U(30334),H=U(82351),V=U(36648),W=U(28628),q=U(52551),K=U(70156),z=U(78746),Y=U(12022),Q=U(63011),X=U(35120),Z=U(129),J=U(23082),tt=U(68152),et=U(4764),it=U(83267),st=U(62886),nt=U(91207),at=U(571),rt=U(36164);class ot{get isQuickQuiz(){return this.matchType===z.B1.QuickQuiz}get isHomeMatch(){return this.matchType===z.B1.Home}get numCurrentPlayers(){return this._numBotOpponents+this._numLiveOpponents+1}get numBotOpponents(){return this._numBotOpponents}get numLiveOpponents(){return this._numLiveOpponents}get totalStages(){var k,B;return null!==(B=null===(k=this._lootDashMatchData.stageData)||void 0===k?void 0:k.length)&&void 0!==B?B:0}get opponents(){return this._opponents}get lootDashMatchData(){return this._lootDashMatchData}constructor(k,B,U){this.onMatchJoined=new G.HN0,this.onOpponentJoined=new G.HN0,this.onOpponentAdvanced=new G.HN0,this.onBattleDataChanged=new G.HN0,this._numBotOpponents=0,this._numLiveOpponents=0,this._isCleanedUp=!1,this._opponents=[],this._playerHeadSprites={},this._networkHandler=k,this._playerProvider=B,this.config=U}get currentWaveIndex(){return this._lootDashMatchData.currentWaveIndex}get numWavesInCurrentStage(){var k,B;return null!==(B=null===(k=this._lootDashMatchData.currentStage)||void 0===k?void 0:k.waves.length)&&void 0!==B?B:0}get currentStageIndex(){var k,B;return null!==(B=null===(k=this._lootDashMatchData.currentStage)||void 0===k?void 0:k.stageIndex)&&void 0!==B?B:0}set revivesRemaining(k){this._revivesRemaining=k,this.onBattleDataChanged.dispatch()}get revivesRemaining(){return this._revivesRemaining}setStageData(k){this._lootDashMatchData.stageData=k}setCurrentStageData(k){var B;(null===(B=this._lootDashMatchData.currentStage)||void 0===B?void 0:B.stageIndex)!==k.stageIndex&&(this._lootDashMatchData.currentStage=k,this._lootDashMatchData.currentWaveIndex=0,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredThisStage=0,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisStage=0,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredThisWave=0,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisWave=0,this.onBattleDataChanged.dispatch())}getCurrentZoneStages(){const k=this._lootDashMatchData.stageData.filter((k=>{var B,U;return k.zoneIndex===(null!==(U=null===(B=this._lootDashMatchData.currentStage)||void 0===B?void 0:B.zoneIndex)&&void 0!==U?U:0)}));return k.sort(((k,B)=>k.stageIndex-B.stageIndex)),k}setCurrentWaveIndex(k){this._lootDashMatchData.currentWaveIndex!==k&&(this._lootDashMatchData.currentWaveIndex=k,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredThisWave=0,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisWave=0,this.onBattleDataChanged.dispatch())}setCurrentMathStreak(k,B){B&&(this._lootDashMatchData.lootBagData=B),this._lootDashMatchData.currentMathStreak=k,this.onBattleDataChanged.dispatch()}setLootBagData(k){this._lootDashMatchData.lootBagData=k,this.onBattleDataChanged.dispatch()}getOpponentData(k){return this._opponents.find((B=>B.playerId===k))}getPlayerHeadSprite(k){return(0,F.sH)(this,void 0,void 0,(function*(){return G.Aq$.isDefined(this._playerHeadSprites[k])||(this._playerHeadSprites[k]=at.z.createHeadFromAppearanceData(k===this._playerProvider.getUserID()?this._playerProvider.getAppearance():this.getOpponentData(k).appearanceData,{trimTransparentPixels:!1})),this._playerHeadSprites[k]}))}getLootBagRewards(){var k,B;return(null!==(B=null===(k=this._lootDashMatchData.matchRewards)||void 0===k?void 0:k.rewards)&&void 0!==B?B:[]).map((k=>k.itemData))}getMemberLootBagRewards(){var k,B;return(null!==(B=null===(k=this._lootDashMatchData.matchRewards)||void 0===k?void 0:k.memberRewards)&&void 0!==B?B:[]).map((k=>k.itemData))}joinMatch(){this._lootDashMatchData={currentWaveIndex:0,currentMathStreak:0,matchCompletionState:z.Cr.Unfinished,lootBagData:{fromStreak:0,fromTreasureRush:0,fromFeaturedItems:0,fromMemberBonus:0,fromPlacement:0,fromWaveComplete:0},questionsAnsweredData:{totalQuestionsAnswered:0,totalQuestionsAnsweredCorrectly:0,questionsAnsweredThisStage:0,questionsAnsweredCorrectlyThisStage:0,questionsAnsweredThisWave:0,questionsAnsweredCorrectlyThisWave:0}},X.q.instance.prodigy.gameContainer.get("c47-20b6").lootDash.sendMatchmakingStartedEvent(),X.q.instance.prodigy.education.onQuestionAnswered.add(this.updateQuestionsAnsweredData,this)}updateQuestionsAnsweredData(k){this._lootDashMatchData.questionsAnsweredData.totalQuestionsAnswered++,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredThisStage++,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredThisWave++,k&&(this._lootDashMatchData.questionsAnsweredData.totalQuestionsAnsweredCorrectly++,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisStage++,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisWave++)}stageIntroComplete(){0===this._lootDashMatchData.currentStage.zoneIndex&&0===this._lootDashMatchData.currentStage.stageIndex&&this._networkHandler.startMatch({matchType:this.matchType}).then((k=>{this.handleStartMatchResponse(k)})).catch(G.RQr.createHandler("Error calling to start match"))}handleStartMatchResponse(k){this._startTime=Date.now(),this._lootDashMatchData.currentStreak=k.playerStreak,this.cleanUpOpponentAssets()}completeMatch(k){this._endTime=Date.now(),this._networkHandler.completeMatch({}).then((k=>{this.handleCompleteMatchResponse(k)})).catch(G.RQr.createHandler("Error completing Loot Dash match"))}handleCompleteMatchResponse(k){this.lootDashMatchData.matchCompletionState=Y.G.getMatchCompletionState(!0,k.exitedEarly,k.ranOutOfRevives),this.lootDashMatchData.placement=k.finishPlace,this.lootDashMatchData.lootBagData=k.lootBags,this.lootDashMatchData.currentStreak=k.playerStreak,k.ranOutOfRevives&&X.q.instance.prodigy.gameContainer.get("c47-20b6").lootDash.sendNoMoreRevivesEvent(),this.lootDashMatchData.matchRewards={rewards:k.rewards,memberRewards:k.memberRewards},this.onBattleDataChanged.dispatch(),1===k.finishPlace&&X.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(st.T.WIN_LOOT_DASH,{}).catch(G.RQr.createHandler("Error sending WinLootDash event")),k.finishPlace>=1&&X.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(st.T.COMPLETE_LOOT_DASH,{}).catch(G.RQr.createHandler("Error sending CompleteLootDash event"))}cleanUpOpponentAssets(){var k,B,U,F,j,$,H,V,W;const q={hat:{},hair:{},face:{},skin:{},eyeColor:{},outfit:{},weapon:{},boot:{},costume:{}},K=[...this._opponents.map((k=>k.appearanceData)),this._playerProvider.getAppearance()];for(const G of K)q.hat[G.hat]=(null!==(k=q.hat[G.hat])&&void 0!==k?k:0)+1,q.hair[G.hair.style]=(null!==(B=q.hair[G.hair.style])&&void 0!==B?B:0)+1,q.face[G.face]=(null!==(U=q.face[G.face])&&void 0!==U?U:0)+1,q.skin[G.skin]=(null!==(F=q.skin[G.skin])&&void 0!==F?F:0)+1,q.eyeColor[G.eyeColor]=(null!==(j=q.eyeColor[G.eyeColor])&&void 0!==j?j:0)+1,q.outfit[G.outfit]=(null!==($=q.outfit[G.outfit])&&void 0!==$?$:0)+1,q.weapon[G.weapon]=(null!==(H=q.weapon[G.weapon])&&void 0!==H?H:0)+1,q.boot[G.boot]=(null!==(V=q.boot[G.boot])&&void 0!==V?V:0)+1,q.costume[G.costume]=(null!==(W=q.costume[G.costume])&&void 0!==W?W:0)+1;for(const z of this._opponents)this.getPlayerHeadSprite(z.playerId).then((()=>{var k;const B=[];for(const U of Object.keys(q)){const F="hair"===U?null===(k=z.appearanceData.hair)||void 0===k?void 0:k.style:z.appearanceData[U];if(F&&--q[U][F]<=0){const k=rt.R[`${U}Map`];k&&B.push(k[F])}}B.length>0&&(nt.E.getImageGuidsFromGearGuids(B).forEach((k=>X.q.instance.game.cache.removeImage(k))),B.forEach((k=>X.q.instance.game.cache.removeJSON(k))))})).catch(G.RQr.createHandler(`Error getting player head sprite for ${z.playerId}`))}cleanup(){this._isCleanedUp=!0,this.onMatchJoined.dispose(),this.onOpponentJoined.dispose(),this.onOpponentAdvanced.dispose(),this.onBattleDataChanged.dispose(),X.q.instance.prodigy.education.onQuestionAnswered.remove(this.updateQuestionsAnsweredData,this)}}var ht=U(32389),ct=U(94428),dt=U(76277),lt=U(13956),ut=U(32073);class ft extends ot{constructor(k,B,U){super(k,B,U),this.matchType=z.B1.QuickQuiz,this.matchmakingType=z.gK.Multiplayer,this.opponentUpdatesToProcess=[],this._opponentAdvancedDelayMs=1e4,this._opponentAdvancedDelayTimeouts={};for(const F of this._quickQuizManager._allMessages)this.handleMultiplayerMessage(F);this._quickQuizManager.onQuickQuizMessageReceived.add(this.handleMultiplayerMessage,this)}joinMatch(){super.joinMatch(),window.setImmediate((()=>{this.onMatchJoined.dispatch(),this.onOpponentJoined.dispatch(this.numCurrentPlayers,this.numCurrentPlayers===this.config.matchSetup.maximumPlayers)}))}handleMultiplayerMessage(k){switch(k.type){case"channelData":this.handleCustomChannelDataMessage(k.channelData);break;case"userList":this.handleUserListMessage(k.userList);break;case"playerJoined":this.handlePlayerJoined(k.playerInfo);break;case"playerLeft":break;case"broadcastAction":const B=k.actionInfo;if(!B)return;switch(B.type){case ct.H9.QuizEnded:this.beginForcedEndQuickQuiz();break;case ct.H9.PlayerProgressUpdated:const k=B.data;k.playerId!==this._playerProvider.getUserID()&&this.handleOpponentUpdate(k)}}}beginForcedEndQuickQuiz(){if(this._lootDashMatchData.matchCompletionState!==z.Cr.Unfinished)return;const k=G.wa5.getActiveScene().container.get("BattleController");k&&k.type===W.gu.LootDash&&k.endLootDashQuickQuiz()}handleUserListMessage(k){for(const B of k)this.handlePlayerJoined(B)}handleCustomChannelDataMessage(k){const B=void 0!==this._channelData;this._channelData=k;for(const U of this._opponents){const k=U.currentStageIndex;U.currentStageIndex=this.getPlayerStageIndex(U.playerId),B&&U.currentStageIndex!==k&&this.handleOpponentUpdate({playerId:U.playerId,stageIndex:U.currentStageIndex-1,time:0})}}handlePlayerJoined(k){if(this._playerProvider.getUserID().toString()===k.userID)return;if(this._opponents.some((B=>B.playerId.toString()===k.userID)))return;this._numLiveOpponents++,this._opponents.push({playerId:Number.parseInt(k.userID),currentStageIndex:this.getPlayerStageIndex(Number.parseInt(k.userID)),appearanceData:{face:k.appearance.appearance.face,hair:{color:k.appearance.appearance.hair.color,style:k.appearance.appearance.hair.style},hat:k.appearance.equipment.hat,skin:k.appearance.appearance.skinColor,eyeColor:k.appearance.appearance.eyeColor,outfit:k.appearance.equipment.outfit,weapon:k.appearance.equipment.weapon,boot:k.appearance.equipment.boots,costume:(0,dt.G)(ht.q).enabled?k.appearance.equipment.costume:void 0}}),this.onOpponentJoined.dispatch(this.numCurrentPlayers,this.numCurrentPlayers===this.config.matchSetup.maximumPlayers);let B=this.config.matchboard.batchUpdatesAtPlayerCount;!G.Aq$.isDefined(this.batchUpdateInterval)&&this.numCurrentPlayers>=this.getPlayerCountToBatchUpdatesAt()&&(this.batchUpdateInterval=window.setInterval(this.handleBatchedOpponentUpdates.bind(this),B))}getPlayerStageIndex(k){var B;let U=0;(null===(B=this._channelData)||void 0===B?void 0:B[`playerProgress-${k}`])&&(U=this._channelData[`playerProgress-${k}`].stageTime.stageIndex+1);let F=0;const G=this.getOpponentData(k);return G&&(F=G.currentStageIndex),Math.max(U,F)}handleOpponentUpdate(k){this.numCurrentPlayers>=this.getPlayerCountToBatchUpdatesAt()?this.opponentUpdatesToProcess.push(k):this.advanceOpponent(k)}advanceOpponent(k){this.getOpponentData(k.playerId).currentStageIndex=k.stageIndex+1,this._opponentAdvancedDelayTimeouts[k.playerId]=window.setTimeout((()=>{this.onOpponentAdvanced.dispatch(k.playerId,k.stageIndex+1),this._opponentAdvancedDelayTimeouts[k.playerId]=void 0}),this._opponentAdvancedDelayMs)}handleBatchedOpponentUpdates(){this.opponentUpdatesToProcess.forEach((k=>this.advanceOpponent(k))),this.opponentUpdatesToProcess.length=0}getPlayerCountToBatchUpdatesAt(){return this.config.matchboard.batchUpdatesAtPlayerCount}completeMatch(k){if(super.completeMatch(k),k){const k=this._quickQuizManager.currentAssignmentId;G.Aq$.isDefined(k)&&k>-1&&ut.v.markAssignmentAsCompleted(k)}ut.v.addCompletedQuickQuizId(this._quickQuizManager.currentQuickQuizId),this._quickQuizManager.leaveQuickQuizChannel()}cleanup(){this._quickQuizManager.onQuickQuizMessageReceived.remove(this.handleMultiplayerMessage,this),window.clearInterval(this.batchUpdateInterval);for(const k of Object.values(this._opponentAdvancedDelayTimeouts))window.clearTimeout(k);super.cleanup()}}(0,F.Cg)([(0,lt.b)("fc2-cb0a"),(0,F.Sn)("design:type",et.w)],ft.prototype,"_quickQuizManager",void 0);class bt{static getMatchController(k,B,U,F){if(!k||!bt.matchControllerMap[k])throw new Error(`No match controller found for match type: ${k}`);return new bt.matchControllerMap[k](B,U,F)}}bt.matchControllerMap={[z.B1.Home]:class extends ot{constructor(){super(...arguments),this.matchType=z.B1.Home,this.matchmakingType=z.gK.Bots,this._matchmakingTimeouts=[],this._opponentsPaused=!1}set opponentsPaused(k){this._opponentsPaused=k}joinMatch(){super.joinMatch();const k=this.config.matchSetup.maximumPlayers;this._numBotOpponents=Math.floor(Math.random()*k),this._numLiveOpponents=0;for(let U=0;U{this._isCleanedUp||(this.onMatchJoined.dispatch(),this.beginMatchmaking())})).catch(G.RQr.createHandler("Error joining match"))}beginMatchmaking(){const k=this.config.matchSetup.maximumTimeBetweenBotJoinsMs,B=this.config.matchSetup.maximumPlayers,U=this.numCurrentPlayers>=B;this.onOpponentJoined.dispatch(this.numCurrentPlayers,U);const F=B-this.numCurrentPlayers;for(let j=0;j{this._numBotOpponents++,this.onOpponentJoined.dispatch(this.numCurrentPlayers,this.numCurrentPlayers===B)}),G.cj9.random(0,k)))}handleStartMatchResponse(k){super.handleStartMatchResponse(k),X.q.instance.prodigy.gameContainer.get("c47-20b6").lootDash.sendBotDataRetrievedEvent(k.botDistribution),this._stageTimes=k.stageTimes.map((k=>Object.assign(Object.assign({},k),{playerId:this.opponents[k.playerId].playerId}))),this.startOpponents()}startOpponents(){this._remainingStageTimes=this._stageTimes.slice(),this._opponentInterval=window.setInterval((()=>{if(this._opponentsPaused)return;const k=Date.now()-this._startTime;for(;this._remainingStageTimes.length>0&&this._remainingStageTimes[0].time!(k instanceof Z.a)));U.featuredFollowEquipped=F.featuredFollows.includes(G.equipment.getFollow()),U.featuredFollowOwned=F.featuredFollows.some((k=>G.backpack.hasItem("follow",k))),!U.featuredFollowEquipped&&U.featuredFollowOwned&&U.numFeaturedItemsThatCouldBeEquipped++,U.featuredMountEquipped=F.featuredMounts.includes(G.equipment.getMount()),U.featuredMountOwned=F.featuredMounts.some((k=>G.backpack.hasItem("mount",k))),!U.featuredMountEquipped&&U.featuredMountOwned&&U.numFeaturedItemsThatCouldBeEquipped++;let $=0;for(let W=0;WH&&(U.numFeaturedItemsThatCouldBeEquipped+=V-H),U.numFeaturedItemsEquipped=(U.featuredPetEquippedInSlot1?1:0)+(U.featuredPetEquippedInSlot2?1:0)+(U.featuredFollowEquipped?1:0)+(U.featuredMountEquipped?1:0),U.cappedNumFeaturedItemsOwned=Math.min(U.numFeaturedPetsOwned,2)+(U.featuredFollowOwned?1:0)+(U.featuredMountOwned?1:0),U}))}joinMatch(){return(0,F.sH)(this,void 0,void 0,(function*(){this._matchController=bt.getMatchController(this.matchType,this.networkHandler,this._playerProvider,this.config),this._matchController.onMatchJoined.addOnce((()=>this.setState(z.zM.WaitingForPlayers))),X.q.instance.prodigy.gameContainer.get("c47-20b6").lootDash.lootDashMatchController=this._matchController,this._matchController.joinMatch(),this.immediateStart=void 0,this._matchType=z.B1.Home}))}matchmakingComplete(k,B){this._matchmakingTimeouts.push(window.setTimeout((()=>{this.setState(z.zM.MatchStartingSoon),window.setTimeout((()=>{this.setState(z.zM.MatchStartingNow),X.q.instance.prodigy.gameContainer.get("a25-68f4").getBattleStartQuestData(W.gu.LootDash).catch((k=>{G.RQr.createHandler("Error getting battle quest data, starting battle with no quest data")(k)})).then((k=>{this.startBattle(k)})).catch(G.RQr.createHandler("Error continuing the battle start function in LootDashManager"))}),B)}),k))}cancelMatchmaking(){this.cleanupMatch(this._matchController),this._matchmakingTimeouts.forEach(window.clearTimeout),this._matchmakingTimeouts.length=0,this.setState(z.zM.LobbyDefault)}startBattle(k){this.matchController.revivesRemaining=this.getNumberOfStartingRevives();const B={battleType:W.gu.LootDash,lootDashMatchType:this.matchController.matchType,opponents:{units:{}},difficulty:$.z,activeQuestIDs:null==k?void 0:k.questIDs,questEventsToSend:null==k?void 0:k.questEvents};this.matchController.isQuickQuiz&&(B.quickQuizId=et.w.instance().currentQuickQuizId);const U={backgroundID:[V.q.Battle_wizarddash_bg,V.q.Battle_wizarddash_fg],backgroundMusicID:H.B.Loot_dash_background_music,defeatData:{preventDefaultTeleport:!0},onVictory:this.handlePostBattle.bind(this),onDefeat:this.handlePostBattle.bind(this),onEscape:this.handlePostBattle.bind(this),showQiBadgeAnimations:!1};X.q.instance.game.state.states.get(J.G.SecureBattleRevamp).startBattleRequest(B,U)}cleanupMatch(k){k.cleanup(),this.matchController===k&&(X.q.instance.prodigy.gameContainer.get("c47-20b6").lootDash.lootDashMatchController=null,this._matchController=null)}handlePostBattle(){const k=G.wa5.getActiveScene().container.get("BattleController"),B=k.postBattleExpressModeController.isEnabled;if(k.prefabRoot.destroy(),this.matchController.isQuickQuiz){X.q.instance.prodigy.gameContainer.get("fc2-cb0a").handleQuizExitFlowComplete()}else B?X.q.instance.prodigy.world.teleportToCurrentMap():X.q.instance.prodigy.open.lootDashMenu()}};yt=(0,F.Cg)([(0,j.injectable)(),(0,F.Sn)("design:paramtypes",[])],yt)},99015:(k,B,U)=>{"use strict";U.d(B,{C:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(76546);let H=class extends $.D{claimMemberRewards(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(j.D.MagicoinBattleRewards.ClaimMemberRewards,{})}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},82142:(k,B,U)=>{"use strict";U.d(B,{gT:()=>pe});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U(20748),V=U(35120),W=U(51477),q=U(29738),K=(U(34829),U(2272)),z=U(75329),Y=U(29546),Q=U(70399),X=U(64794),Z=U(90736),J=U(51365),tt=U(43844),et=U(94909),it=U(80070),st=U(66930),nt=U(42862),at=U(40410),rt=U(59510),ot=U(99625),ht=U(15521),ct=U(51972),dt=U(48199),lt=U(50348),ut=U(21457),ft=U(10312),bt=U(91207),pt=U(90161),vt=U(21573),gt=U(99332),mt=U(39258),yt=U(43054),_t=U(69046);class Et{get factory(){return this._factory}constructor(k){this._factory=k}}var wt=U(41666),Tt=U(14991);class St{constructor(k,B,U,F=Tt.v.Visible){this._state=Tt.v.Visible,this._tween=null,this._factoryProvider=U,this._toVisible=k,this._toHidden=B,this._state=F}get state(){return this._state}get isTweening(){return this._state===Tt.v.SlidingIn||this._state===Tt.v.SlidingOut}cancel(k=!1){this._tween&&this.isTweening&&this._tween.stop(k)}slide(k,B=0,U=null){k&&!this.isTweening&&(this._state===Tt.v.Hidden?(this._state=Tt.v.SlidingOut,this._tween=this._factoryProvider.factory.tween(k.legacyTransform.group,this).to(this._toVisible,B)):this._state===Tt.v.Visible&&(this._state=Tt.v.SlidingIn,this._tween=this._factoryProvider.factory.tween(k.legacyTransform.group,this).to(this._toHidden,B)),this._tween.onTweenComplete.add((()=>{this._tween.onTweenComplete.removeAll(),this._state=this._state===Tt.v.SlidingIn?Tt.v.Hidden:Tt.v.Visible,this._tween=null,U&&U()}),this),this._tween.start())}}class At{get width(){return this._component?this._component.width:0}set width(k){this._component&&(this._component.width=k)}get text(){return this._component?this._component.text:null}set text(k){this._component&&(this._component.text=k)}get gameObject(){return this._gameObject}get onComponentLoaded(){return this._componentLoadedSignal}constructor(k,B,U){this._componentLoadedSignal=new G.HN0,this._prefabLoader=B,this._parent=U,this._factoryProvider=new Et(k.add),V.q.instance.prodigy.load.assets([X.D.ATLAS_STORE],this.assetsReady.bind(this))}destroy(){(this._tween.isTweening||this._tween.state===Tt.v.Visible)&&(this._tween.cancel(),this.setVisible(!1)),this._componentLoadedSignal.dispose(),this._gameObject.destroy()}setVisible(k,B=At.SLIDE_DURATION_MS,U=X.D.TOOLTIP_STAY_DURATION,F){this._component&&(B<=0?this._component.root.legacyTransform.y=k?X.D.SPACE_16PX:-this._component.height-X.D.SPACE_16PX:this._tween.isTweening||this._tween.slide(this._component.root,B,F),k&&G.Aq$.isDefined(U)&&U>0&&setTimeout((()=>{this.setVisible(!1,B,0,(()=>{this.destroy()}))}),U))}assetsReady(k,B){this._gameObject=this._prefabLoader.loadFromGUID(X.D.UI_TOOLTIP_PREFAB,this._parent),this._component=this._gameObject.findComponent(wt.Z),this._gameObject.legacyTransform.x=V.q.instance.game.width/2,this._component&&(this._component.root.legacyTransform.y=-this._component.height-X.D.SPACE_16PX,this._tween=new St({y:X.D.SPACE_16PX},{y:-this._component.height-X.D.SPACE_16PX},this._factoryProvider,Tt.v.Hidden),this._componentLoadedSignal.dispatch())}}At.SLIDE_DURATION_MS=0;class Ct extends pt.R{get itemSelected(){return this._itemSelected}get selectionChanged(){return this._selectionChanged}constructor(k,B,U,F,j,$,H,W,q=null,K=null){super(k,B?B.legacyTransform.group:void 0,U,F,[X.D.ATLAS_STORE,X.D.ATLAS_TOWERTOWN_MISC,X.D.ATLAS_BUTTONS]),this._towerTownBreadcrumbManager=null,this._pages=new Map,this._smallItems=new Map,this._slots=new Map,this._itemSelected=new G.HN0,this._selectionChanged=new G.HN0,this._selection={},this._currentFilter=gt.R.Rooms,this._building=!1,this._parentGameObject=null,this._parentGameObject=B,this._toolTip=j,this._storeManager=H,this._decorator=$,this._spriteFactory=W,this._towerTownBreadcrumbManager=q,this._closeCallback=K,this._selection.decorations=new Map,V.q.instance.prodigy.load.assets(X.D.TAB_CLICK_SFX)}create(){this._ui=this._prefabLoader.loadFromGUID(X.D.UI_CHOOSE_FLOOR_LOOK_PREFAB,this._parentGameObject),this._floorComponent=this._ui.findComponent(mt.p),this._floorComponent.commands.add(this.execute,this),this._towerTownBreadcrumbManager&&!this._towerTownBreadcrumbManager.isBreadcrumbComplete(rt.M.TutorialCompleted)||(this._toolTip.width=250,this._toolTip.text=V.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("TT_CHOOSE_FLOOR_TITLE"),this._toolTip.setVisible(!0,At.SLIDE_DURATION_MS,null)),this._floorComponent.largeItemPointer.active=!1,this._floorComponent.smallItemPointer.active=!1,this._floorComponent.smallItemContainer.active=!1,this._floorComponent.largeItemContainer.active=!1,this.makeLargePrefabs(X.D.UI_LARGE_LIST_ITEM_PREFAB,this._floorComponent.largeItemPoints),this.makeSmallPrefabs(X.D.UI_SMALL_LIST_ITEM_PREFAB,this._floorComponent.smallItemPoints),this._decorator&&(this._decorator.itemSelected.add((k=>{this.applyDecoration(k)}),this),this._decorator.removeSelected.add((k=>{this.removeDecoration(k)}),this)),this._spriteFactory.assetsReady.add(this.assetsReady.bind(this)),this.createPage(gt.R.Rooms,this._floorComponent.largeItemPoints),this.createPage(gt.R.Frames,this._floorComponent.largeItemPoints),this.createPage(gt.R.Decorations,this._floorComponent.smallItemPoints),this.startBuildingButton.onClick.add(this.consumeItems,this),this._mathTower.uiFactory.screen.backgroundGameObject.addChild(this.startBuildingButton.GameObject),this.updateView()}close(){this._toolTip.destroy(),this.removeListeners(),this.startBuildingButton.GameObject.destroy(),!this._building&&this._closeCallback&&this._closeCallback(),this._ui.destroy(),super.close()}get quitButton(){return this._floorComponent.quitButton}get startBuildingButton(){return this._floorComponent.startBuildingButton}get roomsToggleButton(){return this._floorComponent.roomsToggle}get framesToggleButton(){return this._floorComponent.framesToggle}get decorationsToggleButton(){return this._floorComponent.decorationsToggle}createPage(k,B){this._pages[k]={assetType:this.getAssetType(k),pageSize:B.length,pageCount:this._storeManager.getBackpackPageCount(this.getAssetType(k),B.length),currentPage:0,hardPoints:B}}execute(k){switch(k){case gt.R.Rooms:case gt.R.Frames:case gt.R.Decorations:V.q.instance.prodigy.audio.playSFX(X.D.TAB_CLICK_SFX_ID,X.D.TAB_CLICK),this._currentFilter=k,this._currentFilter!==gt.R.Decorations&&(this._currentIndex=-1),this._decorator.showPoints(this._currentFilter===gt.R.Decorations),this.updateView();break;case gt.R.StartBuilding:this._building=!0,this._itemSelected.dispatch(this._selection);break;case gt.R.PageLeft:V.q.instance.prodigy.audio.playSFX(X.D.BUTTON_CLICK_SFX_ID,X.D.BUTTON_CLICK),this.pageLeft();break;case gt.R.PageRight:V.q.instance.prodigy.audio.playSFX(X.D.BUTTON_CLICK_SFX_ID,X.D.BUTTON_CLICK),this.pageRight()}}applyDecoration(k){this._currentIndex=k}removeDecoration(k){this._selection.decorations.delete(k),this.selectionChanged.dispatch(this._selection),this.updateCounter(k,1),this._slots.delete(this._currentIndex),this.applyDecoration(k)}pageLeft(){const k=this._pages[this._currentFilter];k.currentPage>0&&k.currentPage--,this.updatePageButtons(),this.updateView()}pageRight(){const k=this._pages[this._currentFilter];k.currentPage0),this._floorComponent.pageRightEnabled(k.currentPage0&&this._currentIndex>=0&&!this._slots.has(this._currentIndex)){this._selection.decorations.set(this._currentIndex,this._selectedDecor);const B=this._storeManager.getItemImageName(X.D.ASSET_TYPE_DECORATION,this._selectedDecor);this._decorator.setAsset(this._currentIndex,bt.E.getTowerTownImage(B)),this._slots.set(this._currentIndex,k),this.updateCounter(this._currentIndex)}}this.updateCursor(),this._selectionChanged&&this._selectionChanged.dispatch(this._selection)}updateCounter(k,B=-1){const U=this._slots.get(k);if(!G.Aq$.isDefined(U))return;let F=this._smallItems.get(U);if(G.Aq$.isDefined(F)){F+=B,this._smallItems.set(U,F);const k=this._pages[this._currentFilter],G=k.hardPoints.length;for(let B=0;B{const F=B.findComponentInChildren(yt.R);B.active&&F&&F.assetID===k&&F.assetType===U&&(this._floorComponent.largeItemPointer.legacyTransform.group.position=B.legacyTransform.group.position,this._floorComponent.largeItemPointer.active=this._currentFilter!==gt.R.Decorations)}),this)}makeLargePrefabs(k,B){B.forEach((B=>{const U=this._prefabLoader.loadFromGUID(k,B).findComponentInChildren(yt.R);if(U){const k=V.q.instance.prodigy.create.sprite(0,0,X.D.ATLAS_TOWERTOWN_MISC,"interior-ui-mask"),B=V.q.instance.prodigy.create.sprite(0,0,X.D.ATLAS_TOWERTOWN_MISC,"frame-ui-interior");k.scale.set(.5,.5),B.scale.set(.5,.5),U.frame.legacyTransform.group.addChild(k),U.interior.legacyTransform.group.addChild(B),U.selected.add(this.selectAsset,this)}}))}makeSmallPrefabs(k,B){B.forEach((B=>{const U=this._prefabLoader.loadFromGUID(k,B).findComponentInChildren(_t.t);U&&(U.counterVisible=!1,U.selected.add(this.selectAsset,this))}))}removeListeners(){$.union(this._floorComponent.largeItemPoints,this._floorComponent.smallItemPoints).forEach((k=>{const B=k.findComponentInChildren(vt.s);B&&B.selected.removeAll()}))}consumeItems(){this.startBuildingButton.onClick.remove(this.consumeItems,this),this.consume(X.D.ASSET_TYPE_FRAME,this._selection.frameID),this.consume(X.D.ASSET_TYPE_INTERIOR,this._selection.roomID),this._selection.decorations.forEach((k=>{this.consume(X.D.ASSET_TYPE_DECORATION,k)}))}consume(k,B){if(!G.Aq$.isDefined(k)||!G.Aq$.isDefined(B))return;const U=this._storeManager.consume(k,B);G.VyI.log(`Asset of type '${k}' (${B}) was ${U?"consumed":"ignored"}.`,G.$bb.Verbose)}showCounter(k,B,U){return this._currentFilter===k&&!this._storeManager.isDefaultItem(B,U)}destroy(){this._itemSelected.dispose(),this._selectionChanged.dispose(),super.destroy()}}var Ot=U(3836),It=U(68910),Dt=U(27314);class Rt{get itemSelected(){return this._itemSelected}get removeSelected(){return this._removeSelected}constructor(k,B,U){this._itemSelected=new G.HN0,this._removeSelected=new G.HN0,this._gameObjects=[],this._components=[],this._prefabLoader=B,this._parent=U,V.q.instance.prodigy.load.assets([X.D.ATLAS_TOWERTOWN_MISC],this.assetsReady.bind(this))}destroy(){this._removeSelected.dispose(),this._itemSelected.dispose(),this._components.forEach((k=>{k.destroy()})),this._gameObjects.forEach((k=>{k.destroy()}))}showPoints(k){this._gameObjects.forEach((B=>{B.active=k}),this),this._components.forEach((B=>{B.showHardPoint(k)}),this)}setAsset(k,B){this._components[k].setAsset(B),this.showPointer(Rt.HIDE_ITEMS),this.showPopup(k)}assetsReady(k,B){for(let U=0;U{j.clearAsset(),this.showPointer(U),this.removeSelected.dispatch(U)}),this),j.onSelect.add((()=>{j.popupShowing?(this.showPointer(Rt.HIDE_ITEMS),this.showPopup(U)):(this.showPopup(Rt.HIDE_ITEMS),this.showPointer(U)),this.itemSelected.dispatch(U)}),this),this._gameObjects.push(k),this._components.push(j)}this._gameObjects[1].parent=this._parent,this._gameObjects[2].parent=this._parent,this._gameObjects[3].parent=this._parent,this._gameObjects[0].parent=this._parent,this._gameObjects[4].parent=this._parent}addPoints(k,B){return new It.Point(k.x+B.x,k.y+B.y)}showPopup(k){for(let B=0;B{this.game.broadcaster.broadcast(X.D.MESSAGE_ENABLE_NAVIGATION)})))}onFloatlingFlingClicked(){V.q.instance.prodigy.audio.playSFX(X.D.BUTTON_CLICK_SFX_ID,X.D.BUTTON_CLICK),this._mathTower.startFloatlingFling()}onStoreButtonClicked(){V.q.instance.prodigy.audio.playSFX(X.D.BUTTON_CLICK_SFX_ID,X.D.BUTTON_CLICK),this.game.broadcaster.broadcast(X.D.MESSAGE_DISABLE_NAVIGATION),this._mathTower.openStore()}onClickSettings(){V.q.instance.prodigy.audio.playSFX(X.D.BUTTON_CLICK_SFX_ID,X.D.BUTTON_CLICK),this._mathTower.openSettings((()=>{this.game.broadcaster.broadcast(X.D.MESSAGE_ENABLE_NAVIGATION)}))}updateBreadcrumbsLocked(){this._component&&(this.updateButtonLockedFromBreadcrumb(this._component.floatlingFlingButton,rt.M.FlingUnlocked,rt.M.FlingTutorialComplete),this.updateButtonLockedFromBreadcrumb(this._component.storeButton,rt.M.FlingTutorialComplete,rt.M.StoreFirstPurchaseComplete))}updateButtonLockedFromBreadcrumb(k,B,U){this._breadcrumbManager.isBreadcrumbComplete(B)?(k.inputEnabled=!0,k.unlockState(),this._breadcrumbManager.isBreadcrumbComplete(U)?this._guideHand.get(U)&&(this._guideHand.get(U).destroy(),this._guideHand.delete(U)):this._guideHand.get(U)||this._guideHand.set(U,Nt.o.highlightObjectOnLayer(this.game,100,0,k.GameObject.legacyTransform.group,void 0))):(k.inputEnabled=!1,k.lockState(Pt.K.Disabled))}close(){this.removeListeners(),super.close()}toggleVisible(k=!0){if(this._component)if(this._tweenToPullTab.state===Tt.v.Hidden)this._component.GameObject.active=k;else{let B=this._tweenToHide.state===(k?Tt.v.Hidden:Tt.v.Visible);this._tweenToHide.isTweening&&!B&&(this._tweenToHide.cancel(!0),B=!0),B&&(this._component.sliderButton.inputEnabled=!1,this._tweenToHide.slide(this._component.hudUI,Lt.SLIDE_HIDE_DURATION_MS,(()=>{this._visible=this._tweenToHide.state===Tt.v.Visible,this._component.sliderButton.inputEnabled=!0})))}else this._callOnComponentLoad=this.toggleVisible.bind(this,k)}get floatlingFlingButton(){return this._component.floatlingFlingButton}toggleFlingButton(k){this._component&&(this._breadcrumbManager.isBreadcrumbComplete(rt.M.FlingTutorialComplete)||(!this._guideHand.get(rt.M.FlingTutorialComplete)&&k?this._guideHand.set(rt.M.FlingTutorialComplete,Nt.o.highlightObjectOnLayer(this.game,100,0,this._component.floatlingFlingButton.GameObject.legacyTransform.group,void 0)):this._guideHand.get(rt.M.FlingTutorialComplete)&&!k&&(this._guideHand.get(rt.M.FlingTutorialComplete).destroy(),this._guideHand.delete(rt.M.FlingTutorialComplete))),this.toggleButton(this._component.floatlingFlingButton,k))}toggleWorldMapButton(k){this._component&&this.toggleButton(this._component.chooseTownButton,k)}bringToTop(){G.Aq$.isDefined(this._gameObject)&&this._gameObject.bringToFront()}removeListeners(){this._component.chooseTownButton.onClick.dispose(),this._component.floatlingFlingButton.onClick.dispose(),this._component.storeButton.onClick.dispose(),this._component.settingsButton.onClick.dispose(),this._component.sliderButton.onClick.dispose()}slideUI(){V.q.instance.prodigy.audio.playSFX(X.D.BUTTON_CLICK_SFX_ID,X.D.BUTTON_CLICK),this._visible&&!this._tweenToPullTab.isTweening&&(this._component.sliderButton.inputEnabled=!1,this._tweenToPullTab.slide(this._component.hudUI,Lt.SLIDE_DURATION_MS,(()=>{this._component.setSlideIndicator(this._tweenToPullTab.state),this._component.sliderButton.inputEnabled=!0})))}toggleButton(k,B){k.inputEnabled=B,B?k.unlockState():k.lockState(Pt.K.Disabled)}}Lt.TOWER_TOWN_UI_PREFAB=21,Lt.UI_X_HIDE=-79,Lt.UI_X_FULL_HIDE=-179,Lt.UI_X_SHOW=0,Lt.SLIDE_DURATION_MS=200,Lt.SLIDE_HIDE_DURATION_MS=400,(0,F.Cg)([(0,H.sg)(X.D.BUTTON_DEBOUNCE_TIME),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],Lt.prototype,"onOpenWorldMap",null),(0,F.Cg)([(0,H.sg)(X.D.BUTTON_DEBOUNCE_TIME),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],Lt.prototype,"onFloatlingFlingClicked",null),(0,F.Cg)([(0,H.sg)(X.D.BUTTON_DEBOUNCE_TIME),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],Lt.prototype,"onStoreButtonClicked",null),(0,F.Cg)([(0,H.sg)(X.D.BUTTON_DEBOUNCE_TIME),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],Lt.prototype,"onClickSettings",null),(0,F.Cg)([(0,H.sg)(X.D.BUTTON_DEBOUNCE_TIME),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],Lt.prototype,"slideUI",null);var kt=U(27292);class Bt extends pt.R{get rightButton(){return this._moveFloorComponent.rightButton}get leftButton(){return this._moveFloorComponent.leftButton}get cancelButton(){return this._moveFloorComponent.cancelButton}get saveButton(){return this._moveFloorComponent.saveButton}get warningQuitButton(){return this._moveFloorComponent.warningQuitButton}get warningObject(){return this._moveFloorComponent.warningObject}get arrowObject(){return this._moveFloorComponent.arrowObject}constructor(k,B,U,F,G=!0){super(k,B?B.legacyTransform.group:void 0,U,F,[X.D.ATLAS_TOWERTOWN_MISC,X.D.ATLAS_BUTTONS,X.D.ATLAS_DIALOGUES]),this._enableTooltip=G,this._parentGameObject=B}create(){this._gameObject=this.prefabLoader.loadFromGUID(X.D.UI_MOVE_FLOOR,this._parentGameObject),this._moveFloorComponent=this._gameObject.findComponent(kt.B),this._tooltip=this._mathTower.uiFactory.tooltip(this._mathTower.uiFactory.localizer.getText(X.D.HEADER_MOVE_FLOOR),this._enableTooltip,X.D.MOVE_HEADER_WIDTH,0,0),this._mathTower.uiFactory.screen.backgroundGameObject.addChild(this.rightButton.GameObject),this._mathTower.uiFactory.screen.backgroundGameObject.addChild(this.leftButton.GameObject),this._mathTower.uiFactory.screen.backgroundGameObject.addChild(this._moveFloorComponent.warningObject),this._mathTower.uiFactory.screen.backgroundGameObject.addChild(this._moveFloorComponent.arrowObject),this._moveFloorComponent.warningObject.active=!1,this._moveFloorComponent.arrowObject.active=!1}close(){this._moveFloorComponent&&this.disposeComponent(),this._gameObject&&(this._gameObject.destroy(),this._tooltip.setVisible(!1,0)),super.close()}disposeComponent(){this.rightButton.onClick.dispose(),this.leftButton.onClick.dispose(),this.saveButton.onClick.dispose(),this.cancelButton.onClick.dispose(),this.warningQuitButton.onClick.dispose(),this.rightButton.GameObject.destroy(),this.leftButton.GameObject.destroy(),this._moveFloorComponent.warningObject.destroy(),this._moveFloorComponent.arrowObject.destroy()}setWarningText(k){this._moveFloorComponent.warningText.text=k}hideUI(){this.rightButton.GameObject.active=!1,this.leftButton.GameObject.active=!1,this._gameObject.active=!1}}var Ut=U(6145);class Ft extends Mt.W{constructor(k,B,U,F=null){super(k,B,X.D.BASE_MENU_ASSET_ID,void 0,[""]),this._onClose=null,this._newGradeUI=null,this._component=null,this._prefabLoader=U,this._onClose=F}create(){this._newGradeUI=this._prefabLoader.loadFromGUID(X.D.UI_NEW_GRADE_PREFAB),this.parent.addChild(this._newGradeUI.legacyTransform.group),this._component=this._newGradeUI.findComponent(Ut.Q),this._component.closeButton.onClick.add((()=>{V.q.instance.prodigy.audio.playSFX(18,"pop"),this.close()}))}close(){G.Aq$.isDefined(this._onClose)&&this._onClose(),this.removeListeners(),this._newGradeUI.destroy(),super.close()}removeListeners(){this._component.closeButton.onClick.dispose()}}var Gt=U(56942),jt=U(40295),$t=U(75214),Ht=U(87337),Vt=U(23748),Wt=U(93867),qt=U(77175);class Kt extends pt.R{get quitButton(){return this._rooftopComponent.quitButton}get attackButton(){return this._rooftopComponent.attackButton}get topBanner(){return this._rooftopComponent.topBanner}get battleButton(){return this._rooftopComponent.battleButton}get onShadowSummoned(){return this._shadowSummonedSignal}get onVictory(){return this._victorySignal}get onDefeat(){return this._defeatSignal}get onIncorrectAnswer(){return this._incorrectAnswerSignal}get onCorrectAnswer(){return this._correctAnswerSignal}constructor(k,B,U,F,j,$){super(k,B?B.legacyTransform.group:void 0,U,F,[X.D.ATLAS_TOWERTOWN_MISC,X.D.SPINE_STUBBORN_SHADOW,X.D.SPINE_SHADOW_PORTAL,X.D.SPINE_SHADOW_CLASH]),this._puppetMaster=null,this._shadowSummonedSignal=new G.HN0,this._victorySignal=new G.HN0,this._defeatSignal=new G.HN0,this._incorrectAnswerSignal=new G.HN0,this._correctAnswerSignal=new G.HN0,this._parentGameObject=null,this._parentGameObject=B,this._floor=j,this._characterController=$}create(){const k=this.prefabLoader.loadFromGUID(X.D.UI_ROOFTOP_MASTERY,this._parentGameObject);this._rooftopComponent=k.findComponent(qt.W),this._gameObject=k,V.q.instance.prodigy.open.menuLayer.addChild(this._rooftopComponent.GameObject.legacyTransform.group),this.attackButton.GameObject.parent=null,this.battleButton.GameObject.parent=null,this._mathTower.uiFactory.screen.background.addChild(this.attackButton.GameObject.legacyTransform.group),this._mathTower.uiFactory.screen.background.addChild(this.battleButton.GameObject.legacyTransform.group),this._portalSpine=V.q.instance.prodigy.create.spine(0,0,X.D.SPINE_SHADOW_PORTAL,this._mathTower.uiFactory.screen.background),this._stubbornShadowSpine=V.q.instance.prodigy.create.spine(0,0,X.D.SPINE_STUBBORN_SHADOW,this._mathTower.uiFactory.screen.background),this._shadowBeamSpine=V.q.instance.prodigy.create.spine(0,0,X.D.SPINE_SHADOW_CLASH,this._mathTower.uiFactory.screen.background),this._lightBeamSpine=V.q.instance.prodigy.create.spine(0,0,X.D.SPINE_SHADOW_CLASH,this._mathTower.uiFactory.screen.background),this._clashSpine=V.q.instance.prodigy.create.spine(0,0,X.D.SPINE_SHADOW_CLASH,this._mathTower.uiFactory.screen.background),this._spellSpine=V.q.instance.prodigy.create.spine(0,0,X.D.SPINE_SHADOW_CLASH,this._mathTower.uiFactory.screen.background),this._stubbornShadowSpine.visible=!1,this._portalSpine.visible=!1,this._shadowBeamSpine.visible=!1,this._clashSpine.visible=!1,this._lightBeamSpine.visible=!1,this._lightMask=this._mathTower.game.add.graphics(0,0,this._mathTower.uiFactory.screen.background),this._darkMask=this._mathTower.game.add.graphics(0,0,this._mathTower.uiFactory.screen.background)}close(){this._gameObject.destroy(),this.attackButton.GameObject.destroy(),this.battleButton&&(this.battleButton.onClick.removeAll(),this.battleButton.GameObject&&this.battleButton.GameObject.destroy()),this.resetPlayer(),this._stubbornShadowSpine.destroy(),this._portalSpine.destroy(),this._lightBeamSpine.destroy(),this._shadowBeamSpine.destroy(),this._clashSpine.destroy(),this._spellSpine.destroy(),this._shadowSummonedSignal.dispose(),this._victorySignal.dispose(),this._defeatSignal.dispose(),this._incorrectAnswerSignal.dispose(),this._correctAnswerSignal.dispose(),this._lightMask.destroy(),this._darkMask.destroy(),super.close()}setAttackButtonPosition(k){this.attackButton.GameObject.legacyTransform.group.position=k}toggleStaticUIVisibility(k){this._rooftopComponent.GameObject.active=k}spawnStubbornShadow(k,B){this._stubbornShadowSpine.position.set(k,B),this._stubbornShadowSpine.visible=!0,this._stubbornShadowSpine.setToSetupPose(),this._stubbornShadowSpine.setAnimationByName(0,X.D.STUBBORN_SHADOW_IDLE_ANIMATION,!0)}summonStubbornShadow(k,B){this._portalSpine.visible=!0,this._portalSpine.position.set(k,B+X.D.SHADOW_PORTAL_OFFSET.y),this._portalSpine.setToSetupPose(),this._portalSpine.rotation=G.cj9.degToRad(90),this._portalSpine.setAnimationByName(0,X.D.PORTAL_APPEAR_ANIMATION,!1),this._portalSpine.addAnimationByName(0,X.D.PORTAL_IDLE_ANIMATION,!1),this._portalSpine.onComplete.add((()=>{this.finishShadowSummon(k,B)}),this),setTimeout((()=>{V.q.instance.prodigy.audio.playSFX(X.D.TOWER_TOWN_SFX_ID,X.D.STUBBORN_SHADOW_DROP)}),500)}spawnPortalFTUE(k,B){const U=Wt.U.isStepComplete(jt.B.PuppetMasterDefeated)?X.D.STUBBORN_SHADOW_OFFSET_X:0;this._portalSpine.visible=!0,this._portalSpine.position.set(k+U,B+X.D.SHADOW_PORTAL_OFFSET.y),this._portalSpine.rotation=G.cj9.degToRad(90),this._portalSpine.setToSetupPose(),this._portalSpine.setAnimationByName(0,X.D.SHADOW_PORTAL_ANIMATION_APPEAR,!1),this._portalSpine.addAnimationByName(0,X.D.SHADOW_PORTAL_ANIMATION_IDLE,!0)}startBattle(){this.topBanner.legacyTransform.x=0,this._beamStart=this._stubbornShadowSpine.position.x+X.D.SPELL_CLASH_START_OFFSET,this._beamEnd=this._stubbornShadowSpine.position.x+X.D.SPELL_CLASH_END_OFFSET,this.quitButton.inputEnabled=!1,this._characterController.float(!1),this._stubbornShadowSpine.setAnimationByName(0,X.D.STUBBORN_SHADOW_DEFEND_ANIMATION,!1),this._stubbornShadowSpine.onComplete.add(this.startBeams.bind(this))}makePlayerAttack(){const k=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;G.Aq$.isDefined(k.equipment.getEquipment("weapon"))?this.doAttackAnimation():k.equip(25,"weapon").then((()=>this.doAttackAnimation())).catch(G.RQr.createHandler("RooftopMasteryInterface:makePlayerAttack Error equipping training wand"))}doAttackAnimation(){this._characterController.playerContainer.forceWeaponVisual=!0,this._mathTower.uiFactory.screen.user.attack(),this._characterController.playerContainer.OnLoad.add((()=>{this._characterController.float(!1),this._characterController.playerContainer.OnLoad.removeAll(this)}),this),this._characterController.playerContainer.reload()}resetPlayer(){this._characterController.playerContainer.forceWeaponVisual=!1,this._characterController.playerContainer.reload((()=>{this._characterController.float(!0)}))}startBeams(){this._stubbornShadowSpine.onComplete.removeAll(),this._stubbornShadowSpine.setAnimationByName(0,X.D.STUBBORN_SHADOW_SUSTAIN_ANIMATION,!0),this._lightBeamSpine.position.set(this._beamStart+X.D.SPELL_CLASH_END_OFFSET,this._stubbornShadowSpine.position.y+X.D.SPELL_CLASH_Y_OFFSET),this._lightBeamSpine.setAnimationByName(0,X.D.BEAM_TRAVEL_ANIMATION,!0),this._lightBeamSpine.scale.x=X.D.BEAM_SCALE_X,this._lightBeamSpine.visible=!0,this._shadowBeamSpine.position.set(this._stubbornShadowSpine.position.x-X.D.SPELL_CLASH_X_OFFSET,this._stubbornShadowSpine.position.y+X.D.SPELL_CLASH_Y_OFFSET),this._shadowBeamSpine.setAnimationByName(0,X.D.SHADOW_BEAM_TRAVEL_ANIMATION,!0),this._shadowBeamSpine.scale.x=-X.D.BEAM_SCALE_X,this._shadowBeamSpine.visible=!0,this.makePlayerAttack(),this._spellSpine.position.set(this._beamStart+X.D.SPELL_CLASH_END_OFFSET,this._stubbornShadowSpine.position.y+X.D.SPELL_CLASH_Y_OFFSET),this._spellSpine.setAnimationByName(0,X.D.SPELL_SUMMON_ANIMATION,!1),this._spellSpine.addAnimationByName(0,X.D.SPELL_TRAVEL_ANIMATION,!0),this._spellSpine.scale.set(.5),this._clashSpine.visible=!0,this._clashSpine.setAnimationByName(0,X.D.SPELL_CLASH_ANIMATION,!0),this._clashSpine.scale.set(X.D.SPELL_CLASH_SCALE),this._clashSpine.position.set(this._stubbornShadowSpine.position.x,this._stubbornShadowSpine.position.y+X.D.SPELL_CLASH_Y_OFFSET),this.setTheta(this._mathTower.education.getSkillById(this._floor.skillID).theta),this.startAttack()}startAttack(){this.attackButton.GameObject.active=!1,this.quitButton.inputEnabled=!1,this.mathTower.openQuestionForStubbornShadow(this.mathTower.activeFloor.skillID,this.onQuestionAnswered.bind(this))}onQuestionAnswered(k){let B=this._mathTower.education.getSkillById(this._floor.skillID).theta;const U=this._mathTower.game.add.tween(this,this).to({_currentTheta:B});U.onUpdate.add(this.updateTheta.bind(this)),U.onTweenComplete.add(this.onThetaTweenFinished.bind(this,k)),U.start(),this.quitButton.inputEnabled=!0}onThetaTweenFinished(k){this.updateTheta(),this._currentTheta>=X.D.THETA_MAXIMUM?this.defeatShadow():(this.attackButton.GameObject.active=!0,k?this._correctAnswerSignal.dispatch():this._incorrectAnswerSignal.dispatch())}defeatShadow(){this.attackButton.GameObject.active=!1,this._stubbornShadowSpine.setAnimationByName(0,X.D.STUBBORN_SHADOW_DEATH_ANIMATION,!1),this._stubbornShadowSpine.onEnd.add(this.finishBeams.bind(this)),this._lightBeamSpine.onEnd.addOnce((()=>{this._victorySignal.dispatch()}),this),setTimeout((()=>{V.q.instance.prodigy.audio.playSFX(X.D.TOWER_TOWN_SFX_ID,X.D.STUBBORN_SHADOW_DEFEAT)}),500)}finishBeams(){this.attackButton.GameObject.active=!1,this._lightBeamSpine.setAnimationByName(0,X.D.BEAM_END_ANIMATION,!1),this._shadowBeamSpine.setAnimationByName(0,X.D.SHADOW_BEAM_END_ANIMATION,!1),this._clashSpine.setAnimationByName(0,X.D.SPELL_CLASH_END_ANIMATION,!1),this._spellSpine.setAnimationByName(0,X.D.SPELL_END_ANIMATION,!1),this._lightBeamSpine.onComplete.add((()=>{this._lightBeamSpine.visible=!1,this._lightBeamSpine.onComplete.dispose()})),this._shadowBeamSpine.onComplete.add((()=>{this._shadowBeamSpine.visible=!1,this._shadowBeamSpine.onComplete.dispose()})),this._clashSpine.onComplete.add((()=>{this._clashSpine.visible=!1,this._clashSpine.onComplete.dispose()})),this._spellSpine.onComplete.add((()=>{this._spellSpine.visible=!1,this._spellSpine.onComplete.dispose()}))}setTheta(k){this._currentTheta=k;const B=Vt.z.normalizeRange(X.D.THETA_MINIMUM,X.D.THETA_MAXIMUM,k),U=this._beamEnd-this._beamStart;this._clashSpine.x=this._beamStart+U*B,this._lightMask.clear(),this._lightMask.beginFill(X.D.SPELL_MASK_FILL),this._lightMask.drawRect(this._beamStart-X.D.SPELL_MASK_SKIN_WIDTH,this._clashSpine.y-X.D.SPELL_MASK_OFFSET_Y,this._clashSpine.x-this._beamStart+X.D.SPELL_MASK_SKIN_WIDTH,X.D.SPELL_MASK_HEIGHT),this._lightBeamSpine.mask=this._lightMask,this._darkMask.clear(),this._darkMask.beginFill(X.D.SPELL_MASK_FILL),this._darkMask.drawRect(this._clashSpine.x,this._clashSpine.y-X.D.SPELL_MASK_OFFSET_Y,this._beamEnd-this._clashSpine.x+X.D.SPELL_MASK_SKIN_WIDTH,X.D.SPELL_MASK_HEIGHT),this._shadowBeamSpine.mask=this._darkMask}updateTheta(){this.setTheta(this._currentTheta)}resumeBattle(k,B){this._stubbornShadowSpine.position.set(k,B),this._stubbornShadowSpine.visible=!0,this.quitButton.inputEnabled=!1,this.startBattle()}finishShadowSummon(k,B){this._stubbornShadowSpine.position.set(k,B),this._stubbornShadowSpine.visible=!0,this._portalSpine.onComplete.removeAll(),this._portalSpine.setAnimationByName(0,X.D.PORTAL_IDLE_ANIMATION,!0),this._stubbornShadowSpine.setAnimationByName(0,X.D.STUBBORN_SHADOW_APPEAR_ANIMATION,!1),this._stubbornShadowSpine.addAnimationByName(0,X.D.STUBBORN_SHADOW_IDLE_ANIMATION,!0),this._stubbornShadowSpine.onComplete.add((()=>{this._portalSpine.setAnimationByName(0,X.D.PORTAL_DISAPPEAR_ANIMATION,!1),this._shadowSummonedSignal.dispatch(),this._stubbornShadowSpine.onComplete.removeAll()}),this)}spawnPMAndStubbornShadowFTUE(k,B){if(this._stubbornShadowSpine.position.set(k+X.D.STUBBORN_SHADOW_OFFSET_X,B+X.D.STUBBORN_SHADOW_OFFSET_Y),this._stubbornShadowSpine.visible=!0,this._stubbornShadowSpine.setAnimationByName(0,X.D.STUBBORN_SHADOW_ANIMATION_APPEAR,!1),this._stubbornShadowSpine.addAnimationByName(0,X.D.STUBBORN_SHADOW_ANIMATION_IDLE,!0),!Wt.U.isStepComplete(jt.B.PuppetMasterDefeated)){this._puppetMaster=new $t.p(this.game,"NPC_NAME_PUPPETMASTER",Gt.Q.Spine_npc_puppetmaster_json,Ht.ac.Boss,this._mathTower.uiFactory.screen.background,k,B+X.D.SHADOW_PORTAL_OFFSET.y,"idle",null,!0);const U=k+X.D.PUPPET_MASTER_PORTAL_OFFSET_X,F=B;this.game.add.tween(this._puppetMaster,this).to({x:U,y:F},X.D.PUPPET_MASTER_TWEEN_TO_PORTAL_DELAY_MS).start()}}removePMandPortalFTUE(k,B){const U=k,F=B+X.D.SHADOW_PORTAL_OFFSET.y,G=this.game.add.tween(this._puppetMaster,this).to({x:U,y:F},X.D.PUPPET_MASTER_TWEEN_TO_PORTAL_DELAY_MS);V.q.instance.prodigy.effects.resizeContainer(this._puppetMaster,0,X.D.PUPPET_MASTER_TWEEN_TO_PORTAL_DELAY_MS),G.start(),G.onTweenComplete.add((()=>{this._puppetMaster.destroy(),this._puppetMaster=null,G.onTweenComplete.dispose()})),this.removePortalFTUE()}removePortalFTUE(){this._portalSpine.onComplete.add((()=>{this._portalSpine.setAnimationByName(0,X.D.SHADOW_PORTAL_ANIMATION_DISAPPEAR,!1),this._portalSpine.onComplete.dispose()}))}}var zt=U(14151);class Yt extends pt.R{get cleanButton(){return this._shroudLockComponent.cleanButton}get gameObject(){return this._gameObject}get quitButton(){return this._shroudLockComponent.quitButton}get onCloudAppear(){return this._cloudAppeared}get cloudSpine(){return this._cloudSpine}constructor(k,B,U,F){super(k,B?B.legacyTransform.group:void 0,U,F,[X.D.ATLAS_TOWERTOWN_MISC]),this._cloudAppeared=new G.HN0,this._parentGameObject=null,this._parentGameObject=B}create(){this._cloudSpine=V.q.instance.prodigy.create.spine(0,0,X.D.SPINE_SHROUD_CLOUD);const k=this.prefabLoader.loadFromGUID(X.D.UI_SHROUD_LOCK_PREFAB,this._parentGameObject);this._shroudLockComponent=k.findComponent(zt.q),this._rightBar=V.q.instance.prodigy.create.sprite(this._shroudLockComponent.rightBarTransform.x,this._shroudLockComponent.rightBarTransform.y),this._leftBar=V.q.instance.prodigy.create.sprite(this._shroudLockComponent.leftBarTransform.x,this._shroudLockComponent.leftBarTransform.y),this._middleBar=V.q.instance.prodigy.create.sprite(this._shroudLockComponent.middleBarTransform.x,this._shroudLockComponent.middleBarTransform.y),k.legacyTransform.group.addChild(this._leftBar),k.legacyTransform.group.addChild(this._rightBar),k.legacyTransform.group.addChild(this._middleBar),this._rightBar.loadTexture(X.D.ATLAS_TOWERTOWN_MISC,X.D.FRAME_RIGHT_BAR),this._leftBar.loadTexture(X.D.ATLAS_TOWERTOWN_MISC,X.D.FRAME_LEFT_BAR),this._middleBar.loadTexture(X.D.ATLAS_TOWERTOWN_MISC,X.D.FRAME_MIDDLE_BAR),this._middleBar.anchor.x=0,this._middleBar.width=0,this._rightBar.visible=!1,this.setShroudCleansRemainingUI(),this._gameObject=k,V.q.instance.prodigy.open.menuLayer.addChild(this._shroudLockComponent.GameObject.legacyTransform.group),this._mathTower.uiFactory.screen.background.addChild(this._cloudSpine),this._mathTower.uiFactory.screen.background.addChild(this._shroudLockComponent.cleanButton.GameObject.legacyTransform.group)}close(){this._cloudSpine.pendingDestroy=!0,G.Aq$.isDefined(this.cleanButton)&&(this.cleanButton.onClick.removeAll(),this.cleanButton.GameObject&&this.cleanButton.GameObject.destroy()),this._leftBar.destroy(),this._rightBar.destroy(),this._middleBar.destroy(),G.Aq$.isDefined(this._gameObject)&&(this._gameObject.destroy(),this._gameObject=null),this._cloudAppeared.dispose(),super.close()}setShroudCleansRemainingUI(k=X.D.SHROUD_CLEAN_SPELLS){const B=Math.min(X.D.SHROUD_CLEAN_SPELLS,Math.max(0,k)),U=this._rightBar.x-(this._leftBar.x+this._leftBar.width);this._middleBar.width=U*(X.D.SHROUD_CLEAN_SPELLS-B)*(1/X.D.SHROUD_CLEAN_SPELLS),this._rightBar.visible=B<=0,this._shroudLockComponent.statusText=`Spells remaining: ${B}`}setCleanButtonPosition(k){this._shroudLockComponent.cleanButton.GameObject.legacyTransform.group.position=k}makeCloudAppear(k=0,B=0,U=!1){this._cloudSpine.position.set(k,B),this._cloudSpine.setToSetupPose(),U||this._cloudSpine.setAnimationByName(0,"fade in",!1),this._cloudSpine.addAnimationByName(0,"idle",!0),this._cloudAppeared.dispatch()}makeCloudDisappear(k){V.q.instance.prodigy.audio.playSFX(X.D.TOWER_TOWN_SFX_ID,X.D.CLEAR_SHROUD),this._cloudSpine.setToSetupPose(),this._cloudSpine.setAnimationByName(0,"fade out",!1),k&&this._cloudSpine.onComplete.add(k)}bringToTop(){ht.Z.bringToTop(this.gameObject.legacyTransform.group),ht.Z.bringToTop(this.cloudSpine),ht.Z.bringToTop(this.cleanButton.GameObject.legacyTransform.group)}hideUI(){this.quitButton.GameObject.active=!1,this._shroudLockComponent.header.active=!1,this._rightBar.visible=!1,this._leftBar.visible=!1,this._middleBar.visible=!1,this._shroudLockComponent.buttonBG.active=!1}setQuitButtonVisibility(k){this.quitButton.GameObject.active=k,this._shroudLockComponent.buttonBG.active=k}}class Qt{constructor(){this._assetsReady=new G.HN0}get assetsReady(){return this._assetsReady}getItemGuid(k){return bt.E.getTowerTownImage(k.data.tag)}getSprites(k){this._items=k;const B=[];k.forEach((k=>B.push(this.getItemGuid(k)))),V.q.instance.prodigy.load.assets(B,this.assetsLoaded.bind(this))}assetsLoaded(k,B){const U=[];this._items.forEach((k=>{U.push({bitmapData:this.createSprite(k.data.tag),imageName:k.data.tag,ID:k.ID,count:k.count})})),this._assetsReady.dispatch(U)}createSprite(k){const B=bt.E.getTowerTownImage(k);return V.q.instance.prodigy.create.sprite(0,0,B).texture}}var Xt=U(49237);let Zt=class extends G.uAl{constructor(){super(...arguments),this._okayButton=null,this._closeButton=null,this._headerText=null,this._bodyText=null,this._okayButtonText=[]}get okayButton(){return this._okayButton}get closeButton(){return this._closeButton}get headerText(){return this._headerText.TextObject.text}set headerText(k){this._headerText.text=k}get bodyText(){return this._bodyText.TextObject.text}set bodyText(k){this._bodyText.text=k}get okayButtonText(){return this._okayButtonText[0].TextObject.text}set okayButtonText(k){this._okayButtonText.forEach((B=>B.text=k))}};(0,F.Cg)([(0,G.x4W)("okayButton"),(0,F.Sn)("design:type",Xt.$)],Zt.prototype,"_okayButton",void 0),(0,F.Cg)([(0,G.x4W)("closeButton"),(0,F.Sn)("design:type",Xt.$)],Zt.prototype,"_closeButton",void 0),(0,F.Cg)([(0,G.x4W)("headerText"),(0,F.Sn)("design:type",G.EYj)],Zt.prototype,"_headerText",void 0),(0,F.Cg)([(0,G.x4W)("bodyText"),(0,F.Sn)("design:type",G.EYj)],Zt.prototype,"_bodyText",void 0),(0,F.Cg)([(0,G.x4W)("okayButtonText"),(0,F.Sn)("design:type",Array)],Zt.prototype,"_okayButtonText",void 0),Zt=(0,F.Cg)([(0,G.EVk)("HatStoreAdvertComponent")],Zt);class Jt extends Mt.W{constructor(k,B,U,F){super(k,U,200),this._prefabLoader=null,this._closeCallback=null,this._prefabLoader=B,this._closeCallback=F}create(){super.create(),this._ui=this._prefabLoader.loadFromGUID(X.D.UI_TOWER_TOWN_MALL_HATSTORE_AD),this.parent.addChild(this._ui.legacyTransform.group),this._ui.legacyTransform.group.fixedToCamera=!0,this._ui.legacyTransform.group.cameraOffset=new It.Point(0,0),this._component=this._ui.findComponent(Zt),this._component.closeButton.onClick.add((()=>{this.close()})),this._component.okayButton.onClick.add((()=>{this.close()})),this.game.broadcaster.broadcast(X.D.MESSAGE_DISABLE_NAVIGATION)}close(){this._closeCallback&&this._closeCallback(),V.q.instance.prodigy.audio.playSFX(18,"pop"),super.close()}destroy(){this._component.closeButton.onClick.dispose(),this._component.okayButton.onClick.dispose(),this._ui.destroy(),super.destroy()}}var te=U(47716),ee=U(12420),ie=U(76501),se=U(43531),ne=U(95946),ae=U(30376),re=U(36730);class oe extends Mt.W{constructor(k,B,U){super(k,U,200,void 0,[X.D.ATLAS_BUTTONS,X.D.ATLAS_TOWERTOWN_MISC,X.D.ATLAS_TOWERTOWN,X.D.ATLAS_STORE,X.D.ATLAS_BAM,X.D.ATLAS_SHARED,X.D.ATLAS_PANELS]),this._prefabLoader=null,this._breadcrumbManager=null,this._uiFactory=null,this._mainUI=null,this._scrollViewObject=null,this._scrollView=null,this._scrollBarObject=null,this._scrollBar=null,this._mainComponent=null,this._uiFactory=B,this._prefabLoader=V.q.instance.prodigy.gameContainer.get("d0e-64fd"),this._breadcrumbManager=V.q.instance.prodigy.gameContainer.get(Q.G.BreadcrumbManager)}create(){super.create(),this._mainUI=this._prefabLoader.loadFromGUID(X.D.UI_TOWER_TOWN_MALL_PREFAB),this._mainComponent=this._mainUI.findComponent(re.f),this.parent.addChild(this._mainUI.legacyTransform.group),this._mainUI.legacyTransform.group.fixedToCamera=!0,this._mainUI.legacyTransform.group.cameraOffset=new It.Point(0,0),this._scrollViewObject=this._prefabLoader.loadFromGUID(X.D.UI_TOWER_TOWN_MALL_SCROLLVIEW,this._mainUI),this._scrollView=this._scrollViewObject.findComponentInChildren(te.H),this._scrollBarObject=this._prefabLoader.loadFromGUID(X.D.UI_TOWER_TOWN_MALL_SCROLLBAR,this._mainUI),this._scrollBar=this._scrollBarObject.findComponentInChildren(ee.$),this._mainComponent.closeButton.onClick.add((()=>{this.game.broadcaster.broadcast(X.D.MESSAGE_ENABLE_NAVIGATION),V.q.instance.prodigy.audio.playSFX(18,"pop"),this.close()})),this._mainComponent.GameObject.legacyTransform.group.fixedToCamera=!0,this.fillMall()}update(){super.update(),this._scrollView}destroy(){this.checkBreadcrumb(),this._mainComponent.closeButton.onClick.dispose(),this._mainUI.destroy(),this._scrollViewObject.destroy(),this._scrollBarObject.destroy(),super.destroy()}checkBreadcrumb(){if(!this._breadcrumbManager.isBreadcrumbComplete(rt.M.StoreFirstPurchaseComplete)){const k=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(k.backpack.getBackpackItemsByType(X.D.ASSET_TYPE_FRAME).length+k.backpack.getBackpackItemsByType(X.D.ASSET_TYPE_INTERIOR).length+k.backpack.getBackpackItemsByType(X.D.ASSET_TYPE_DECORATION).length>X.D.DEFAULT_ITEM_COUNT){this._breadcrumbManager.completeBreadcrumb(rt.M.StoreFirstPurchaseComplete),this._uiFactory.hud.updateBreadcrumbsLocked();const k=new se.rD(this.game),B=[];X.D.STORE_FTUE_OUTRO_DIALOGUE.forEach((U=>{B.push({dialogueData:k.dataProvider.get(U),blockInput:!0})})),k.addEvents(B),k.start()}}}fillMall(){const k=[],B=[],U={cells:B};k.push(U),B.push({type:ne.a.Fire,storeID:X.D.STORE_FIRE,playerCurrency:this.getCurrency(X.D.FIRE_RESEARCH_CURRENCY)}),B.push({type:ne.a.Ice,storeID:X.D.STORE_ICE,playerCurrency:this.getCurrency(X.D.ICE_RESEARCH_CURRENCY)}),B.push({type:ne.a.Plant,storeID:X.D.STORE_PLANT,playerCurrency:this.getCurrency(X.D.PLANT_RESEARCH_CURRENCY)}),B.push({type:ne.a.Storm,storeID:X.D.STORE_STORM,playerCurrency:this.getCurrency(X.D.STORM_RESEARCH_CURRENCY)}),B.push({type:ne.a.Water,storeID:X.D.STORE_WATER,playerCurrency:this.getCurrency(X.D.WATER_RESEARCH_CURRENCY)}),B.push({storeID:X.D.STORE_HAT,playerCurrency:0,hatStore:!0}),this._scrollView._createCell=()=>{const k=this._prefabLoader.loadFromGUID(X.D.UI_TOWER_TOWN_MALL_SHOP_PREFAB,null);return k.findComponentInChildren(ae.l).onClick.add((k=>{V.q.instance.prodigy.audio.playSFX(18,"pop"),k===X.D.STORE_HAT?this._uiFactory.openHatStore((()=>{this._uiFactory.openStore()})):V.q.instance.prodigy.open.store(k,(()=>{this._uiFactory.openStore()})),this.close()})),k},this._scrollView.dataSource=new ie.W(k),this._scrollBar._scrollView=this._scrollView,this._scrollView.verticalScrollBar=this._scrollBar,this._scrollView.populateContentView()}getCurrency(k){return V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("currency",k)}}var he=U(82443);class ce extends Mt.W{constructor(k,B,U,F,j=null){super(k,B,X.D.BASE_MENU_ASSET_ID,void 0,[""]),this._townUpdateData=null,this._onClose=null,this._updateUI=null,this._component=null,this._localizer=V.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),this._prefabLoader=U,this._townUpdateData=F,this._onClose=j}create(){this._updateUI=this._prefabLoader.loadFromGUID(X.D.UI_TOWER_TOWN_UPDATE),this.parent.addChild(this._updateUI.legacyTransform.group),this._component=this._updateUI.findComponent(he.O),this._component.closeButton.onClick.add((()=>{this.close()})),this.checkTownProgress(this._townUpdateData)}close(){G.Aq$.isDefined(this._onClose)&&this._onClose(),this.removeListeners(),this._updateUI.destroy(),super.close()}removeListeners(){this._component.closeButton.onClick.dispose()}checkTownProgress(k){this._component.blocksText=`${k.blocks} ${this._localizer.getText(X.D.TT_UPDATE_BLOCKS_BUILT)}`,this._component.floorsText=`${k.floors} ${this._localizer.getText(X.D.TT_UPDATE_FLOORS_MADE)}`,this._component.shroudsText=`${k.shrouds} ${this._localizer.getText(X.D.TT_UPDATE_SHROUDS_CLEARED)}`}}class de{get hud(){return this._hud||this.start(),this._hud}get localizer(){return this._localizer}get screen(){return this._screen}constructor(k,B,U,F){this._prefabLoader=V.q.instance.prodigy.gameContainer.get("d0e-64fd"),this._root=U.uiLayerGameObject,this._game=k,this._mathTower=B,this._screen=U,this._localizer=V.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),this._map=F}destroy(){this._hud&&(this._hud.close(),this._hud.destroy()),this._scrim&&this._scrim.destroy()}start(){this._hud||(this._hud=new Lt(this._game,this._mathTower,this._root,this._prefabLoader)),this._scrim||(this._scrim=this._game.add.graphics(0,0),this._scrim.beginFill(16777215,X.D.SCRIM_ALPHA),this._scrim.drawRect(0,0,this._game.width*X.D.SCRIM_SCALE_X,this._game.height*X.D.SCRIM_SCALE_Y),this._scrim.visible=!1)}chooseFloorLook(k,B=null){const U=new G._mx(this.screen.backgroundGameObject);U.addComponent(G.K16),U.legacyTransform.x+=k.x,U.legacyTransform.y+=k.y;const F=new At(this._game,this._prefabLoader,this._root),j=new Rt(this._game,this._prefabLoader,U),$=new Qt,H=G.Aq$.isDefined(B)&&!B.isBreadcrumbComplete(rt.M.TutorialCompleted),W=new Ct(this._game,this._root,this._mathTower,this._prefabLoader,F,j,V.q.instance.prodigy.gameContainer.get(Q.G.StoreManager),$,B,H?null:()=>{j.destroy(),F.destroy()});return W.itemSelected.add((()=>{j.destroy(),F.destroy()}),this),W}openStore(){V.q.instance.prodigy.open.fromFactory((()=>new oe(this._game,this,V.q.instance.prodigy.open.menuLayer)))}openHatStore(k){V.q.instance.prodigy.open.fromFactory((()=>new Jt(this._game,this._prefabLoader,V.q.instance.prodigy.open.menuLayer,k)))}openUpdate(k,B){V.q.instance.prodigy.open.fromFactory((()=>new ce(this._game,V.q.instance.prodigy.open.menuLayer,this._prefabLoader,k,B)))}openNewGradePopup(k){this._game.broadcaster.broadcast(X.D.MESSAGE_DISABLE_NAVIGATION),V.q.instance.prodigy.open.fromFactory((()=>new Ft(this._game,V.q.instance.prodigy.open.menuLayer,this._prefabLoader,k)))}buildInterface(k,B=null){return new Ot._(this._game,this._screen.backgroundGameObject,this._mathTower,this._prefabLoader,B||this._mathTower.activeFloor,k.x+X.D.IN_PROGRESS_PREFAB_X_OFFSET,k.y+X.D.IN_PROGRESS_PREFAB_Y_OFFSET,B?Ot.i.QuickReno:null)}shroudLockInterface(){return new Yt(this._game,this._screen.backgroundGameObject,this._mathTower,this._prefabLoader)}tooltip(k,B=!0,U=X.D.TOOLTIP_WIDTH,F=X.D.TOOLTIP_SLIDE_DURATION,G=X.D.TOOLTIP_STAY_DURATION){const j=new At(this._game,this._prefabLoader,this._root);return j.onComponentLoaded.add(this.onTooltipLoad.bind(this,j,B,k,U,F,G)),j}buttonTooltip(k,B,U,F=ct.i.LEFT,G){const j=F===ct.i.LEFT||F===ct.i.RIGHT?.5:void 0,$=F===ct.i.UP||F===ct.i.DOWN?.5:void 0,H=this.getTooltipX(U.GameObject,F),V=this.getTooltipY(U.GameObject,F);return dt.A.displayToolTipManual(k,this._root,{arrowDirection:F,bodyText:B,xPosition:H,yPosition:V,proceedButtonCallback:G,arrowYRelPos:j,arrowXRelPos:$})}rooftopMasteryInterface(k){return new Kt(this._game,this._screen.backgroundGameObject,this._mathTower,this._prefabLoader,k,this._map.characterController)}moveFloorInterface(k=!0){return new Bt(this._game,this._root,this._mathTower,this._prefabLoader,k)}showTowerTownIsOpen(k,B){const U=this._localizer.getText(X.D.TT_TOWER_TOWN_OPEN),F=this._localizer.getText(X.D.TT_TOWER_WORK_DONE),G=this._localizer.getText(X.D.TT_START_BUILDING);this.showBanner(U,F,G,X.D.POPUP_TOWER_TOWN_OPEN,k,void 0,void 0,B)}showInfinityTowerIsOpen(k,B){const U=this._localizer.getText(X.D.TT_INFINITY_TOWER_OPEN),F=this._localizer.getText(X.D.TT_INFINITY_TOWER_OPEN_BODY),G=this._localizer.getText(X.D.TT_START_BUILDING);this.showBanner(U,F,G,X.D.POPUP_INFINITY_TOWER_OPEN,k,void 0,void 0,B)}showInfinityTowerIsClosed(){const k=this._localizer.getText(X.D.TT_INFINITY_TOWER_CLOSED),B=this._localizer.getText(X.D.TT_TOWER_CLOSED_BODY),U=this._localizer.getText(X.D.TT_TOWER_CLOSED_LINKTXT),F=this._localizer.getText(X.D.TT_TOWER_CLOSED_FOOTER);this._game.broadcaster.broadcast(X.D.MESSAGE_DISABLE_NAVIGATION),V.q.instance.prodigy.open.bannerDialog(new ut.Z(U,(()=>{ft.I.openWebsite(this.localizer.getText(X.D.TT_TOWER_CLOSED_LINK))}),de.INFINITY_TOWER_DIALOG_WIDTH,k,B,!0,X.D.POPUP_INFINITY_TOWER_CLOSE,null,!0,(()=>{this._game.broadcaster.broadcast(X.D.MESSAGE_ENABLE_NAVIGATION),this._game.broadcaster.broadcast(X.D.MESSAGE_ENABLE_BUTTON)}),!0,F))}spawnScrim(k,B,U=!1){let F,G;U?(F=this._map.townRenderer.infinityRenderer,G=F.getFloor(F.floors.length-1)):(F=this._map.townRenderer.towerRenderers[k],G=F.getFloor(B)),ht.Z.bringToTop(F.legacyTransform.group),F.floors.forEach((k=>{k&&k.decorations.forEach((k=>{ht.Z.bringToTop(k.GameObject.legacyTransform.group)}))})),F.legacyTransform.group.addChild(this._scrim),this._scrim.x=-this._mathTower.game.width*X.D.SCRIM_OFFSET_X_IN_SCREENS,this._scrim.y=-this._mathTower.game.height*X.D.SCRIM_OFFSET_Y_IN_SCREENS,this._scrim.visible=!0,ht.Z.bringToTop(G.legacyTransform.group),G.decorations.forEach((k=>{ht.Z.bringToTop(k.GameObject.legacyTransform.group)}))}spawnInfinityScrim(){this.spawnScrim(-1,-1,!0)}despawnScrim(){this._scrim&&(this._scrim.visible=!1)}showNewTownPopup(k){V.q.instance.prodigy.open.topHeavyInformationDialog(new z.Z(X.D.POPUP_NEW_TOWN_BUTTON,k,K.E.Small,X.D.NEW_TOWN_POPUP_SIZE,X.D.POPUP_NEW_TOWN_TITLE,X.D.POPUP_NEW_TOWN_BODY,!0,X.D.ATLAS_SWOOPY_FACE,X.D.ATLAS_SWOOPY_FACE_FRAME_DEFAULT,ot.l.TopHeavyHeader,ot.l.BannerDialogFooter,ot.l.TopHeavyBody))}showBanner(k,B,U,F,G,j=de.INFINITY_TOWER_DIALOG_WIDTH,$,H){if(V.q.instance.prodigy.open.isMenuOpen(lt.L))return;const W=!!$||void 0,q=H?()=>{H()}:()=>{this._game.broadcaster.broadcast(X.D.MESSAGE_ENABLE_NAVIGATION)};this._game.broadcaster.broadcast(X.D.MESSAGE_DISABLE_NAVIGATION),V.q.instance.prodigy.open.bannerDialog(new ut.Z(U,(()=>{G&&G()}),j,k,B,!0,F,null,!0,q,W,$))}onTooltipLoad(k,B,U,F,G,j){k.width=F,k.text=U,B&&k.setVisible(!0,G,j)}getTooltipX(k,B,U=0){const F=k.legacyTransform.group.getGlobalPosition().x-k.legacyTransform.group.pivot.x;switch(B){case ct.i.DOWN:case ct.i.UP:return F+Math.ceil(k.legacyTransform.group.width/2);case ct.i.LEFT:return F+k.legacyTransform.group.width;case ct.i.RIGHT:return F-U}}getTooltipY(k,B,U=0){const F=k.legacyTransform.group.getGlobalPosition().y-k.legacyTransform.group.pivot.y;switch(B){case ct.i.LEFT:case ct.i.RIGHT:return F+Math.ceil(k.legacyTransform.group.height/2);case ct.i.UP:return F+k.legacyTransform.group.height;case ct.i.DOWN:return F-U}}}de.INFINITY_TOWER_DIALOG_WIDTH=700;class le{static removeFloorsWithDuplicateSkillIds(k){const B=[...k.floors].filter((k=>k.skillID)),U=(0,$.uniqBy)(B,"skillID");return B.filter((k=>!(0,$.includes)(U,k))).forEach((B=>{(0,$.remove)(k.floors,B)})),k}static removeFloorsThatArePreConstruction(k){return(0,$.remove)(k.floors,(k=>k.isPreConstruction)),k}static removeFloorsWithSkillIdsThatMatch(k,B){return(0,$.remove)(k.floors,(k=>!k.isComplete&&(0,$.includes)(B,k.skillID))),k}static removeSkillIdFromInfinityTowerFloors(k){return(null==k?void 0:k.isInfinityTower)&&k.floors.forEach((k=>{k.skillID=null})),k}}const ue=[Z.L.EDUCATION_QUESTION_INTERFACE_CLOSE,Z.L.EDUCATION_QUESTION_INTERFACE_OPEN,Z.L.FLOATLING_SET_LAST_THROWN,Z.L.FLOOR_AWARD_FLOATLINGS,Z.L.FLOOR_SET_BLOCK_COUNT,Z.L.TOWER_PUSH_FLOOR,Z.L.TOWER_REMOVE_FLOOR];var fe,be;!function(k){k[k[1/0]=0]="Infinity",k[k.Build=1]="Build"}(fe||(fe={})),function(k){k.FLOOR_BUILDING_INFINITY="TowerTownInfinityTower",k.FLOOR_BUILDING="TowerTownFloorBuilding",k.QUICK_RENOVATION="TowerTownQuickRenovation",k.SHROUD_CLEAR="ShadowShroud",k.STUBBORN_SHADOW="StubbornShadow",k.TUTORIAL="TowerTownTutorialBuilding"}(be||(be={}));let pe=class extends it.v{get isClickable(){return this._isClickable}get isInfinity(){return this._isInfinity}set isInfinity(k){this._isInfinity=k}get currentTown(){return this._town}get currentGrade(){return this._gradeID}get uiFactory(){return this._uiFactory}get stateManager(){return this._stateManager}set stateManager(k){this._stateManager=k}buildUIFactory(k,B){this._uiFactory=new de(this.game,this,k,B)}constructor(k,B,U,F){super(),this._town=null,this._towerMode=fe.Build,this._gradeID="",this.newGrade=!1,this._isClickable=!0,this._isInfinity=!1,this._game=k,this._storage=B,this._education=U,this._events=F,this.registerEducationHandler(this._education)}showWorldMap(k=null){V.q.instance.prodigy.open.map({onClose:k})}destroy(){this.onUpdate&&this.onUpdate.dispose(),this.uiFactory&&this.uiFactory.destroy()}getGrade(){var k;return null!==(k=this._education.getGrade())&&void 0!==k?k:X.D.DEFAULT_EDUCATION_GRADE}setCurrentTown(k,B=!1){let U=this._storage.getTown(k);const F=this._storage.getTownIDs();return parseInt(k)!==X.D.TUTORIAL_GRADE&&F.length>0&&!F.includes(k)&&(this.newGrade=!0),U?(this.unregisterTownHandler(U),U.onUpdate.remove(this.conditionallySaveTown.bind(this)),this.sanitizeTown(U)):U=new et.J,this.registerTownHandler(U),B||U.onUpdate.add(this.conditionallySaveTown.bind(this)),this._gradeID=k,this._town=U,this._town.init(B),this.notifyUpdate(Z.L.TOWER_TOWN_SET_CURRENT_TOWN),U}sanitizeTown(k){const B=this.education.getMobileUnfriendlySkillIds();le.removeSkillIdFromInfinityTowerFloors(k.infinityTower),[...k.towers,k.infinityTower].filter((k=>k)).forEach((k=>{le.removeFloorsWithDuplicateSkillIds(k),le.removeFloorsThatArePreConstruction(k),le.removeFloorsWithSkillIdsThatMatch(k,B)}))}conditionallySaveTown(k){const B=!!this._town&&this._town.isTutorialTown;(0,$.includes)(ue,k.getFinalNotification().type)&&!B&&this.saveTown()}saveTown(){this.setTown()}forceSaveTown(){this.setTown()}setTown(){this._storage.setTown(this._gradeID,this._town),this.notifyUpdate(Z.L.TOWER_TOWN_SAVE_TOWN)}isEnabledForPlayer(k){const B=Y.X.isMathSubjectRequirementMet(),U=q.O.isEnglishLocale();return k.isFocusModeEnabled&&B&&U}startFloatlingFling(){this._isClickable&&this.notifyUpdate(Z.L.TOWER_TOWN_FLOATLING_FLING_START)}fireEvent(k,B){this.events.handleNotification(this,new J.L(this,k,null,B))}startHideAndSeek(){throw new Error("Start hide and seek.")}openSettings(k=null){this._isClickable&&(this.game.broadcaster.broadcast(X.D.MESSAGE_DISABLE_NAVIGATION),V.q.instance.prodigy.open.optionsMenu(k),this.notifyUpdate(Z.L.TOWER_TOWN_SETTINGS_OPEN))}showTownUpdate(k,B){const U={blocks:k.totalNewBlocks,floors:k.totalNewFloors,shrouds:k.totalShroudsCleared,shadows:k.totalNewStubbornShadows};this._uiFactory.openUpdate(U,B)}showNewGradePopup(k){this._uiFactory.openNewGradePopup(k)}openStore(){this._uiFactory.openStore(),this.notifyUpdate(Z.L.TOWER_TOWN_STORE_OPEN)}openQuestionForShroud(k){this.openQuestionInterfaceThenEmitNotifications(be.SHROUD_CLEAR,!0,null,!0,k)}openQuestionForStubbornShadow(k,B){this.openQuestionInterfaceThenEmitNotifications(be.STUBBORN_SHADOW,!1,k,!0,B)}openQuestionForFloorBuilding(k,B){this.openQuestionInterfaceThenEmitNotifications(be.FLOOR_BUILDING,!1,k,!1,B)}openQuestionForInfinityFloorBuilding(k){this.openQuestionInterfaceThenEmitNotifications(be.FLOOR_BUILDING_INFINITY,!0,null,!1,k)}openQuestionForQuickRenovation(k,B){this.openQuestionInterfaceThenEmitNotifications(be.QUICK_RENOVATION,!1,k,!0,B)}openQuestionForTutorial(k){this.openQuestionInterfaceThenEmitNotifications(be.TUTORIAL,!0,null,!1,k)}openQuestionInterfaceThenEmitNotifications(k,B,U,F,G){if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){G&&G(!0,10,1,!1,!1,{});return}this._education.openQuestionInterface(B,U,F,((B,U,F,j,$,H)=>{const V={eventType:k,skill:H,wasCorrect:B};this.fireEvent(Z.L.TOWER_TOWN_QUESTION_ANSWERED,V),G&&G(B,U,F,!1,!1,H)}))}shouldUseBuildMode(){return this._towerMode===fe.Build}shouldUseInfinityTowerMode(){const k=this.getGrade(),B=this._education.getPendingSkillsByGrade(k).length;return this._towerMode===fe.Infinity||0===B}get activeInfinityFloor(){return(0,$.last)(this._town.infinityTower.floors)}get activeFloor(){return this.isInfinity?this.activeInfinityFloor:(0,$.last)(this._town.floors)}getActiveFloorIndexes(){if(this.isInfinity)return new G.I9Y(-1,-1);const k=this.currentTown,B=this.activeFloor;for(let U=k.towers.length-1;U>=0;--U){const F=k.towers[U].floors.indexOf(B);if(F>=0)return new G.I9Y(U,F)}return new G.I9Y(0,0)}get activeTower(){return this.isInfinity?this._town.infinityTower:(0,$.last)(this._town.towers)}get currentSkillID(){const k=this._education.getCurrentSkillByGrade(this.getGrade());return k?k.ID:null}get game(){return this._game}get education(){return this._education}get events(){return this._events}removeTowers(){(0,$.range)(this._town.towers.length).forEach((()=>{this._town.removeTower()}))}hasMinimumFloorsToMove(k){return k.floors.length>tt.o.MINIMUM_FLOOR_COUNT}isTopFloorOfTower(k,B){return B===k.floors.length-1}canMoveFloorToPrevTower(k,B){return 0===B&&G.Aq$.isDefined(k)&&k.floors.length{const B=k.getFinalNotification().type;if(this.conditionallySaveTown(k),B===Z.L.EDUCATION_SET_ALGORITHM){const k=this._education.isCurrentAlgorithmBasicOrGameChallenge(),B=this._towerMode;this._towerMode=k?fe.Build:fe.Infinity,this._towerMode!==B&&this.notifyUpdate(Z.L.TOWER_TOWN_INFINITY_TOWER_OPEN)}}))}getFloatlingsForFling(){return this.isInfinity?this.currentTown.infinityTower.getWanderingFloatlings():this.currentTown.getWanderingFloatlings()}hasAvailableFloatlings(){return this.stateManager.map.breadCrumbManager.isBreadcrumbComplete(rt.M.FlingTutorialComplete)?this.isInfinity?this.currentTown.infinityTower.getFloatlings().length>0:this.currentTown.getAllFloatlings().length>0:this.getFloatlingsForFling().length>=X.D.FLING_FTUE_FLOATLING_COUNT}handleUpdate(k){const B=super.handleUpdate(k);return this.events.handleNotification(this,B),B}setClickable(k){this._isClickable=k}redirectTowerTownPopup(){return V.q.instance.prodigy.open.informationDialog(new z.Z(X.D.POPUP_TOWER_TOWN_GO_TO_BUTTON,(()=>{V.q.instance.prodigy.world.it(X.D.TOWER_TOWN_MAP)}),K.E.Medium,600,X.D.POPUP_TOWER_TOWN_GO_TO,X.D.POPUP_TOWER_TOWN_REDIRECT,!0,X.D.ATLAS_SWOOPY_FACE,X.D.ATLAS_SWOOPY_FACE_FRAME_DEFAULT))}};(0,F.Cg)([(0,H.sg)(500,{leading:!1}),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],pe.prototype,"saveTown",null),pe=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("51c-03a0")),(0,F.Qj)(1,(0,j.inject)(Q.G.Storage)),(0,F.Qj)(2,(0,j.inject)(Q.G.Education)),(0,F.Qj)(3,(0,j.inject)(Q.G.Events)),(0,F.Sn)("design:paramtypes",[W.n,at.w,st.V,nt.s])],pe)},26023:(k,B,U)=>{"use strict";U.d(B,{k:()=>nt});var F=U(62459),G=U(35120),j=U(70399),$=U(82142),H=U(66930),V=U(42862),W=U(40410),q=U(6191),K=U(41340),z=U(8674),Y=U(79687),Q=U(95891),X=U(77938),Z=U(64794);let J=class{constructor(){this._items=new Map,this._itemsReady=!1}get items(){return this._itemsReady||(this.lazyLoadItems(),this._itemsReady=!0),this._items}getItems(k){const B=this.items.get(k);return B||[]}isDefaultItem(k,B){const U=this.items.get(k);return U&&Q.find(U,(k=>k===B))===B}lazyLoadItems(){this._items.set(Z.D.ASSET_TYPE_INTERIOR,[]),this._items.set(Z.D.ASSET_TYPE_FRAME,[]);const k=X.t.getItemsWithFilter(Z.D.ASSET_TYPE_INTERIOR,(k=>Q.get(k,"data.tag")&&k.data.tag.endsWith("-1"))).map((k=>k.ID)),B=X.t.getItemsWithFilter(Z.D.ASSET_TYPE_FRAME,(k=>Q.get(k,"data.tag")&&k.data.tag.endsWith("-1"))).map((k=>k.ID));this._items.get(Z.D.ASSET_TYPE_INTERIOR).push(...k),this._items.get(Z.D.ASSET_TYPE_FRAME).push(...B)}};J=(0,z.Cg)([(0,Y.injectable)()],J);var tt=U(25863),et=U(51477),it=U(59510);let st=class{get assets(){return this._assetsLoaded||(this._assetsLoaded=!0,this.addAssets()),this._assets}get backpack(){return G.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack}constructor(k,B,U){this._assetsLoaded=!1,this._assets=new Map,this._imageNames=new Map,this._itemProvider=B,this._breadcrumbManager=U}getBackpackItems(k,B){const U=this.backpack.getBackpackItemsByType(k);if(0===U.length)return[];let F=this.assets.get(k);return F&&0!==F.length?(B&&(F=F.filter((k=>k.data.tag&&k.data.tag.indexOf(`-${B}-`)>=0))),F=F.filter((k=>Q.find(U,(B=>B.ID===k.ID&&k.data.tag&&k.data.tag.indexOf("-bp-")<0)))),Q.sortBy(F,(k=>k.ID))):[]}getBackpackItem(k,B){const U=this.backpack.getBackpackItemsByType(k);return Q.find(U,(k=>k.ID===B))}getBackpackPageCount(k,B,U){const F=this.getBackpackItems(k,U);return F&&0!==F.length?Math.ceil(F.length/B):0}getPagedBackpackItems(k,B,U,F){const G=this.getBackpackItems(k,F);if(!G||0===G.length)return[];const j=B*U;return G.slice(j,j+U)}getItemDataAt(k,B,U,F){const G=this.assets.get(k),j=B*F+U;return j>=G.length?null:G[j].data}getItemData(k,B){const U=Q.find(this.assets.get(k),(k=>k.ID===B));return F.Aq$.isDefined(U)?U.data:null}getItemImageName(k,B,U){const G=`${k}-${B}${F.Aq$.isDefined(U)&&U?"-bp":""}`;let j=this._imageNames.get(G);if(j)return j;const $=Q.find(this.assets.get(k),(k=>k.ID===B));if(null==$?void 0:$.data){if(F.Aq$.isDefined(U)&&U){const k=$.data.tag.split("-"),B=k.shift(),U=k.shift();return k.unshift("bp"),k.unshift(U),k.unshift(B),j=k.join("-"),this._imageNames.set(G,j),j}return j=$.data.tag,this._imageNames.set(G,j),j}return null}getPage(k,B,U){const F=this.assets.get(k);if(!F||0===F.length)return[];const G=[],j=B*U,$=F.slice(j,j+U);return $.forEach((k=>G.push(k.data))),$}getPageCount(k,B){return this.assets.get(k).length>0?Math.ceil(this._assets.get(k).length/B):0}awardDefaultItems(k){const B=[];this._itemProvider.getItems(Z.D.ASSET_TYPE_FRAME).forEach((k=>B.push({type:Z.D.ASSET_TYPE_FRAME,ID:k})));const U=this._breadcrumbManager.isBreadcrumbComplete(it.M.DefaultFramesReceived),F=this._breadcrumbManager.isBreadcrumbComplete(it.M.DefaultItemsReceived);if(U)F?k():this.awardDefaultRooms(k);else{this._breadcrumbManager.completeBreadcrumb(it.M.DefaultFramesReceived);G.q.instance.prodigy.open.gotItem(B,this.awardDefaultRooms.bind(this,k)).setInputEnabled(!1)}}awardDefaultRooms(k){const B=[];this._itemProvider.getItems(Z.D.ASSET_TYPE_INTERIOR).forEach((k=>B.push({type:Z.D.ASSET_TYPE_INTERIOR,ID:k}))),this._breadcrumbManager.completeBreadcrumb(it.M.DefaultItemsReceived);G.q.instance.prodigy.open.gotItem(B,k).setInputEnabled(!1)}pushDefaultItems(){const k=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this._itemProvider.getItems(Z.D.ASSET_TYPE_INTERIOR).forEach((B=>{k.backpack.add(Z.D.ASSET_TYPE_INTERIOR,B)})),this._itemProvider.getItems(Z.D.ASSET_TYPE_FRAME).forEach((B=>{k.backpack.add(Z.D.ASSET_TYPE_FRAME,B)}))}hasDefaultItems(){const k=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=this._itemProvider.getItems(Z.D.ASSET_TYPE_FRAME).every((B=>k.backpack.hasItem(Z.D.ASSET_TYPE_FRAME,B)>0)),U=this._itemProvider.getItems(Z.D.ASSET_TYPE_INTERIOR).every((B=>k.backpack.hasItem(Z.D.ASSET_TYPE_INTERIOR,B)>0));return B&&U}isDefaultItem(k,B){return this._itemProvider.isDefaultItem(k,B)}removeDefaultItems(){const k=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this._itemProvider.getItems(Z.D.ASSET_TYPE_INTERIOR).forEach((B=>{k.backpack.consume(Z.D.ASSET_TYPE_INTERIOR,B)})),this._itemProvider.getItems(Z.D.ASSET_TYPE_FRAME).forEach((B=>{k.backpack.consume(Z.D.ASSET_TYPE_FRAME,B)}))}consume(k,B){return k!==Z.D.ASSET_TYPE_INTERIOR&&!this._itemProvider.isDefaultItem(k,B)&&(this.backpack.consume(k,B,1),!0)}addAssets(){const k={};this.addByType(Z.D.ASSET_TYPE_INTERIOR,k),this.addByType(Z.D.ASSET_TYPE_FRAME,k),this.addByType(Z.D.ASSET_TYPE_DECORATION,k),G.q.instance.prodigy.assets.assignAssets(k)}addByType(k,B){this._assets.set(k,[]);const U=X.t.getItemsWithFilter(k,(k=>!0));U&&U.length>0&&U.forEach((U=>{U.data.tag?B[U.data.tag]=U.metadata:B[U.data.name]=U.metadata,this._assets.get(k).push(U)}))}};st=(0,z.Cg)([(0,Y.injectable)(),(0,z.Qj)(0,(0,Y.inject)("51c-03a0")),(0,z.Qj)(1,(0,Y.inject)(j.G.DefaultItems)),(0,z.Qj)(2,(0,Y.inject)(j.G.BreadcrumbManager)),(0,z.Sn)("design:paramtypes",[et.n,J,K.Y])],st);class nt extends F.PQK{installBindings(){window.__pnp_safeBind(G.q.instance.prodigy.gameContainer,j.G.MathTower).to($.gT).asSingleton(),window.__pnp_safeBind(G.q.instance.prodigy.gameContainer,j.G.Storage).to(W.w).asSingleton(),window.__pnp_safeBind(G.q.instance.prodigy.gameContainer,j.G.StorageSerializer).to(q.Y).asSingleton(),window.__pnp_safeBind(G.q.instance.prodigy.gameContainer,j.G.StoreManager).to(st).asSingleton(),window.__pnp_safeBind(G.q.instance.prodigy.gameContainer,j.G.BreadcrumbManager).to(K.Y).asSingleton(),window.__pnp_safeBind(G.q.instance.prodigy.gameContainer,j.G.DefaultItems).to(J).asSingleton(),window.__pnp_safeBind(G.q.instance.prodigy.gameContainer,j.G.Education).to(H.V).asSingleton(),window.__pnp_safeBind(G.q.instance.prodigy.gameContainer,j.G.DialogueFactory).to(tt.Y),window.__pnp_safeBind(G.q.instance.prodigy.gameContainer,j.G.Events).to(V.s)}}},70399:(k,B,U)=>{"use strict";var F;U.d(B,{G:()=>F}),function(k){k.MathTower="MathTower",k.DefaultItems="DefaultItems",k.Storage="Storage",k.StorageSerializer="StorageSerializer",k.StoreManager="StoreManager",k.BreadcrumbManager="TowerTownBreadcrumbManager",k.Education="Education",k.DialogueFactory="DialogueFactory",k.Events="Events"}(F||(F={}))},64794:(k,B,U)=>{"use strict";U.d(B,{D:()=>z});var F=U(62459),G=U(99625),j=U(95946),$=U(88022),H=U(56942),V=U(36648),W=U(85855),q=U(51742),K=U(84317);class z{}z.FEATURE_NAME="FEATURE_TOWERTOWN",z.TOWER_TOWN_MAP="tower_town-A1",z.TOWER_TOWN_TUTORIAL_MAP="tower_town-A0",z.MAP_INFINITY_TOWER_CONSTRUCTION="towertown-default-1",z.CURRENCY_FIRE=21,z.CURRENCY_ICE=22,z.CURRENCY_PLANT=23,z.CURRENCY_WATER=24,z.CURRENCY_STORM=25,z.ATLAS_CORE=$._.General_core_json,z.ATLAS_CORE_2=$._.General_core_2_json,z.ATLAS_ICONS=$._.General_icons_json,z.ATLAS_MATH_TOWER=$._.Popup_member_modular_json,z.ATLAS_SWOOPY_FACE=$._.Npc_face_swoopy_json,z.ATLAS_SHARED=$._.Ui_shared_json,z.ATLAS_UI_TITAN=$._.Ui_titan_json,z.ATLAS_SHIPWRECK_PROGRESS=$._.Ui_shipwreck_progress_json,z.ATLAS_SHIVERCHILL_PROGRESS=$._.Ui_shiverchill_progress_json,z.ATLAS_BAM=$._.Ui_bam_json,z.ATLAS_BUTTONS=$._.Ui_buttons_json,z.ATLAS_DIALOGUES=$._.Ui_dialogues_json,z.ATLAS_STORE=$._.Ui_store_json,z.ATLAS_REGISTRATION=$._.Ui_registration_json,z.ATLAS_TOWERTOWN_MISC=$._.Ui_towertown_misc_json,z.ATLAS_TOWERTOWN=$._.Ui_towertown_json,z.ATLAS_UI_ICONS=$._.Ui_icons_json,z.ATLAS_PANELS=$._.Ui_panels_json,z.ATLAS_FLING_TARGETS=$._.Floatling_fling_json,z.ATLAS_RESEARCH_POINTS=$._.Ui_towertown_samples_json,z.ATLAS_FLAGS=$._.Ui_towertown_flags_json,z.ATLAS_TOPIC_ICONS=$._.Icon_topic_pixel_json,z.ATLAS_SWOOPY_FACE_FRAME_LAUGH="face_0",z.ATLAS_SWOOPY_FACE_FRAME_DEFAULT="face_1",z.ATLAS_SWOOPY_FACE_FRAME_THINK="face_2",z.SPINE_SHADOW_PORTAL=H.Q.Spine_shadowportal_json,z.SPINE_SMART_BLOCK_VFX=H.Q.Spine_smartblock_vfx_json,z.SPINE_FLOATING_FIRE_1=H.Q.Spine_npc_floatling_fire1_json,z.SPINE_FLOATING_ICE_1=H.Q.Spine_npc_floatling_ice1_json,z.SPINE_FLOATLING_PLANT_1=H.Q.Spine_npc_floatling_plant1_json,z.SPINE_FLOATLING_STORM_1=H.Q.Spine_npc_floatling_storm1_json,z.SPINE_LUMIN_TREE=H.Q.Spine_lumintree_json,z.SPINE_SWOOPY=H.Q.Spine_npc_swoopy_json,z.SPINE_FLING_SHIMMER=H.Q.Spine_floatlingfling_zoneshimmer_json,z.SPINE_STUBBORN_SHADOW=H.Q.Spine_stubbornshadow_json,z.SPINE_SHROUD_CLOUD=H.Q.Spine_shroud_json,z.SPINE_SHADOW_CLASH=H.Q.Spine_shadowclash_json,z.SPINE_FLAGPOLE=H.Q.Spine_smoke_flagmask_json,z.FLOATLING_FLING_BACKGROUND=V.q.Bg_floatling_fling,z.FLOATLING_FLING_RESEARCH_ICONS=V.q.Spot_samples,z.POPUP_NO_FLOATLINGS_ICON=V.q.Sleeping_floatlings_pop_up,z.POPUP_INFINITY_TOWER_CLOSE=V.q.Infinitytower_closed,z.POPUP_INFINITY_TOWER_OPEN=V.q.Infinitytower_open,z.POPUP_TOWER_TOWN_OPEN=V.q.Towertown_open,z.FRAME_LEFT_BAR="meter-fill-left-green",z.FRAME_RIGHT_BAR="meter-fill-right-green",z.FRAME_MIDDLE_BAR="meter-fill-mid-green",z.ASSET_ORANGE_FLAG_FRAME="skill-flag-g-ss",z.ASSET_BLUE_FLAG_FRAME="skill-flag-p-a",z.ASSET_RED_FLAG_FRAME="skill-flag-dm-p",z.ASSET_PURPLE_FLAG_FRAME="skill-flag-m",z.ASSET_TURQOISE_FLAG_FRAME="skill-flag-ns-n",z.UI_BUILD_COMPONENT_PREFAB=24,z.UI_ADD_FLOOR_PREFAB=G.l.AddFloor,z.UI_ARROW_HUD_PREFAB=G.l.CameraControlHUD,z.UI_CHOOSE_FLOOR_LOOK_PREFAB=G.l.ChooseFloorLook,z.UI_LARGE_LIST_ITEM_PREFAB=G.l.FloorListLargeItem,z.UI_SMALL_LIST_ITEM_PREFAB=G.l.FloorListSmallItem,z.UI_TOOLTIP_PREFAB=G.l.ToolTip,z.UI_SHROUD_LOCK_PREFAB=G.l.MathTowerShroudLock,z.UI_DECORATION_POINTS_PREFAB=G.l.FloorDecorationPlacer,z.UI_RESEARCH_POINTS_PANEL_PREFAB=G.l.FloatlingFlingResearchPointPanel,z.UI_CORNER_PREFAB=G.l.CornerQuit,z.UI_TOWER_TOWN_MALL_PREFAB=G.l.TowerTownMallInterface,z.UI_TOWER_TOWN_MALL_SHOP_PREFAB=G.l.TowerTownMallShopComponent,z.UI_TOWER_TOWN_MALL_SCROLLVIEW=G.l.TowerTownShopScrollView,z.UI_TOWER_TOWN_MALL_SCROLLBAR=G.l.TowerTownMallScrollBar,z.UI_TOWER_TOWN_MALL_HATSTORE_AD=G.l.HatStoreAdvertisement,z.UI_TUTORIAL_TAG=G.l.TutorialTag,z.UI_ROOFTOP_MASTERY=G.l.RooftopMastery,z.UI_MOVE_FLOOR=G.l.MoveFloor,z.UI_TOWER_TOWN_UPDATE=G.l.TowerTownUpdate,z.UI_QUICK_RENOVATION=G.l.QuickRenovationComponent,z.UI_INFINITY_TOWER_TOP_RIGHT_CONTAINER=G.l.InfinityTowerTopRightContainer,z.UI_CLOSED_RED_MESSAGE=G.l.ClosedRedRectangleMessage,z.UI_SMALL_WARNING_MESSAGE=G.l.SmallWarningMessage,z.UI_NEW_GRADE_PREFAB=G.l.NewTownPopup,z.POPUP_NO_FLOATLINGS_TITLE="FF_POPUP_NO_FLOATLING_TITLE",z.POPUP_NO_FLOATLINGS_BODY="FF_POPUP_NO_FLOATLING_BODY",z.POPUP_NO_FLOATLINGS_CONFIRM="BUTTON_OKAY_CAPITAL",z.POPUP_FLING_FINISH_TITLE="FF_POPUP_FINISH_TITLE",z.POPUP_FLING_FINISH_BODY="FF_POPUP_FINISH_BODY",z.POPUP_FLING_FINISH_BUTTON="BUTTON_OKAY_CAPITAL",z.POPUP_FLING_COLLECT_TITLE="FF_POPUP_COLLECT_TITLE",z.POPUP_FLING_COLLECT_BODY="FF_POPUP_COLLECT_BODY",z.FLING_CLICK_AND_DRAG="FF_CLICK_AND_DRAG",z.TOOLTIP_FLOOR_FINISHED="TT_TOOLTIP_FLOOR_COMPLETE",z.HEADER_MOVE_FLOOR="TT_MOVE_FLOOR_HEADER",z.WARNING_TOP_FORWARD="TT_MOVE_FLOOR_TOP_ONLY_FORWARD",z.WARNING_BOTTOM_BACK="TT_MOVE_FLOOR_BOTTOM_ONLY_BACK",z.MOVE_FLOOR_MINIMUM_WARNING="TT_MOVE_FLOOR_MINIMUM_WARNING",z.MOVE_FLOOR_TOP_BOTTOM="TT_MOVE_FLOOR_TOP_BOTTOM_ONLY",z.MOVE_FLOOR_PREV_TALL="TT_MOVE_FLOOR_PREV_TALL",z.MOVE_FLOOR_NEXT_TALL="TT_MOVE_FLOOR_NEXT_TALL",z.MOVE_FLOOR_FIRST="TT_MOVE_FIRST_FLOOR",z.POPUP_FLING_QUIT_CONFIRM="BUTTON_QUIT_CAPITAL",z.POPUP_FLING_QUIT_DECLINE="BUTTON_STAY_TEAM",z.POPUP_FLING_QUIT_TITLE="BUTTON_QUIT_QUESTION",z.POPUP_FLING_QUIT_BODY="FF_QUIT_BODY",z.TT_ROOMMATES="TT_ROOMMATES",z.TT_BLOCKED_FLOOR="TT_MOVE_FLOOR_BLOCKED",z.POPUP_STUBBORN_SHADOW_QUIT_BODY="TT_STUBBORN_SHADOW_QUIT_BODY",z.POPUP_STUBBORN_SHADOW_QUIT_TITLE="BUTTON_QUIT_QUESTION",z.POPUP_STUBBORN_SHADOW_QUIT_BUTTON="BUTTON_QUIT_CAPITAL",z.POPUP_STUBBORN_SHADOW_STAY_BUTTON="BUTTON_STAY_TEAM",z.POPUP_SHROUD_QUIT_BODY="TT_SHROUD_QUIT_CONFIRM_BODY",z.POPUP_SHROUD_QUIT_TITLE="BUTTON_QUIT_QUESTION",z.POPUP_SHROUD_QUIT_BUTTON="BUTTON_QUIT_CAPITAL",z.POPUP_SHROUD_STAY_BUTTON="BUTTON_STAY_TEAM",z.POPUP_CHOOSE_FLOOR_QUIT_BUTTON="BUTTON_QUIT_CAPITAL",z.POPUP_CHOOSE_FLOOR_STAY_BUTTON="BUTTON_STAY_TEAM",z.POPUP_CHOOSE_FLOOR_QUIT_TITLE="BUTTON_QUIT_QUESTION",z.POPUP_CHOOSE_FLOOR_QUIT_BODY="TT_CHOOSE_FLOOR_QUIT_BODY",z.TT_TOWER_WORK_DONE="TT_TOWER_WORK_DONE",z.TT_START_BUILDING="TT_START_BUILDING",z.TT_TOWER_TOWN_OPEN="TT_TOWER_TOWN_OPEN",z.TT_INFINITY_TOWER_OPEN_BODY="TT_INFINITY_TOWER_OPEN_BODY",z.TT_INFINITY_TOWER_OPEN="TT_INFINITY_TOWER_OPEN",z.TT_FINISH_TOWER_FIRST="TT_FINISH_TOWER_FIRST",z.TT_FINISH_TOWER_ON_ADD="TT_FINISH_TOWER_ON_ADD",z.TT_TOWER_CLOSED_LINKTXT="TT_TOWER_CLOSED_LINKTXT",z.TT_TOWER_CLOSED_FOOTER="TT_TOWER_CLOSED_FOOTER",z.TT_TOWER_CLOSED_BODY="TT_TOWER_CLOSED_BODY",z.TT_INFINITY_TOWER_CLOSED="TT_INFINITY_TOWER_CLOSED",z.TT_TOWER_CLOSED_LINK="TT_TOWER_CLOSED_LINK",z.TT_STORE_TOO_MANY_ITEMS="STORE_TOOLTIP_MESSAGE_2",z.TT_STORE_ALREADY_OWNED="STORE_TOOLTIP_MESSAGE_5",z.TT_STORE_ITEM_LOCKED="STORE_TOOLTIP_MESSAGE_6",z.TT_STORE_ITEM_BUY_LOCKED="STORE_TOOLTIP_MESSAGE_4",z.TT_STORE_YOU_NEED_MORE="STORE_TOOLTIP_MESSAGE_3",z.TT_STORE_ITEM_LOCKED_HEADER="STORE_TOOLTIP_HEADER_4",z.TT_STORE_NOT_ENOUGH_HEADER="STORE_TOOLTIP_HEADER_3",z.TT_UPDATE_SHROUDS_CLEARED="TT_UPDATE_SHROUDS_CLEARED",z.TT_UPDATE_BLOCKS_BUILT="TT_UPDATE_BLOCKS_BUILT",z.TT_UPDATE_FLOORS_MADE="TT_UPDATE_FLOORS_MADE",z.POPUP_TOWER_TOWN_REDIRECT="TOWER_TOWN_REDIRECT",z.POPUP_TOWER_TOWN_GO_TO="TOWER_TOWN_GO_POPUP",z.POPUP_TOWER_TOWN_GO_TO_BUTTON="TOWER_TOWN_GO_BUTTON",z.POPUP_NEW_TOWN_BUTTON="NEW_TOWN_POPUP_BUTTON",z.POPUP_NEW_TOWN_TITLE="NEW_TOWN_POPUP_TITLE",z.POPUP_NEW_TOWN_BODY="NEW_TOWN_POPUP_BODY",z.ASSET_TYPE_DECORATION="mathTownDecor",z.ASSET_TYPE_FRAME="mathTownFrame",z.ASSET_TYPE_INTERIOR="mathTownInterior",z.ASSET_TYPE_STREET_FURNITURE="mathTowerOrnament",z.BASE_MENU_ASSET_ID=74,z.PUPPETMASTER_BGM=W.V.Bgm_puppetmaster,z.TOWER_TOWN_BGM=W.V.Bgm_towertown,z.FLOATLING_FLING_BGM=W.V.Bgm_floatlingfling,z.PUPPETMASTER_BGM_ID=12,z.TOWER_TOWN_BGM_ID=27,z.FLOATLING_FLING_BGM_ID=28,z.SHADOW_PORTAL_OPEN=q.c.Sfx_academy_portal_open,z.SHADOW_PORTAL_CLOSE=q.c.Sfx_academy_portal_close,z.TOWER_TOWN_SFX=q.c.Sfx_tower_town,z.FLOATLING_FLING_SFX=q.c.Sfx_floatling_fling,z.TAB_CLICK_SFX=q.c.Sfx_tab_click,z.SHADOW_PORTAL_OPEN_ID=34,z.SHADOW_PORTAL_CLOSE_ID=35,z.TOWER_TOWN_SFX_ID=48,z.FLOATLING_FLING_SFX_ID=47,z.BUTTON_CLICK_SFX_ID=18,z.TAB_CLICK_SFX_ID=50,z.LAND_FLOATLING="landaFloatling",z.LAUNCH_FLOATLING="launchaFloatling",z.CLEAR_SHROUD="clearaShroud",z.COMPLETE_FLOOR="completeaFloor",z.STUBBORN_SHADOW_DEFEAT="defeataStubbornShadow",z.STUBBORN_SHADOW_DEFEND="StubbornShadowDefend",z.STUBBORN_SHADOW_DROP="droppingaStubbornShadow",z.DROP_BLOCK="droppingaBlock",z.BUTTON_CLICK="pop",z.TAB_CLICK="pop",z.FLAG_SMOKE_ANIMATION="spine-smoke-flagmask",z.PORTAL_APPEAR_ANIMATION="appear",z.PORTAL_IDLE_ANIMATION="idle",z.PORTAL_DISAPPEAR_ANIMATION="disappear2",z.STUBBORN_SHADOW_APPEAR_ANIMATION="appear",z.STUBBORN_SHADOW_IDLE_ANIMATION="idle",z.STUBBORN_SHADOW_DEFEND_ANIMATION="defend",z.STUBBORN_SHADOW_SUSTAIN_ANIMATION="sustain",z.STUBBORN_SHADOW_DEATH_ANIMATION="die",z.BEAM_TRAVEL_ANIMATION="beam-travel",z.BEAM_END_ANIMATION="beam-end",z.SHADOW_BEAM_TRAVEL_ANIMATION="beam-travel-shadow",z.SHADOW_BEAM_END_ANIMATION="beam-end-shadow",z.SPELL_SUMMON_ANIMATION="summon-create",z.SPELL_TRAVEL_ANIMATION="summon-travel",z.SPELL_END_ANIMATION="summon-end",z.SPELL_CLASH_ANIMATION="cap-clash",z.SPELL_CLASH_END_ANIMATION="cap-end",z.SHADOW_PORTAL_ANIMATION_APPEAR="appear",z.SHADOW_PORTAL_ANIMATION_IDLE="idle",z.SHADOW_PORTAL_ANIMATION_DISAPPEAR="disappear2",z.STUBBORN_SHADOW_ANIMATION_APPEAR="appear",z.STUBBORN_SHADOW_ANIMATION_IDLE="idle",z.TOWN_BG_COLOR=8703726,z.TUTORIAL_BG_COLOR=1585480,z.DEFAULT_EDUCATION_GRADE=1,z.DEFAULT_ITEM_COUNT=10,z.ADD_FLOOR_BUTTON_OFFSET=45,z.BLOCK_FALL_DURATION_SECONDS=.2,z.BLOCK_FALL_HEIGHT=250,z.BLOCK_OFFSET_X=34,z.BLOCK_OFFSET_Y=54,z.CAMERA_Y_OFFSET=298,z.CAMERA_Y_OFFSET_QUICK_RENO=268,z.CAMERA_X_OFFSET=-500,z.PLAYER_CAMERA_OFFSET_X=180,z.PLAYER_CAMERA_OFFSET_Y=680,z.PLAYER_FLING_OFFSET_X=100,z.PLAYER_FLING_OFFSET_Y=500,z.SWOOPY_OFFSET_X=-25,z.SWOOPY_OFFSET_Y=-90,z.FLOOR_HEIGHT=134,z.FLOOR_WIDTH=416,z.FLOOR_TUTORIAL_OFFSET=320,z.GAME_CHALLENGE_SCENARIO_ID=10001,z.MAX_SMART_BLOCKS=10,z.TUTORIAL_SMART_BLOCKS=5,z.RENDERER_JUMP_PERCENTAGE=.5,z.RENDERER_OFFSET_PERCENTAGE=.25,z.RENDERER_OFFSET_PERCENTAGE_INFINITY_TOWER=.5,z.TOWER_BASE_Y=450,z.PLAYER_BASE_Y=450,z.UI_BUILD_INTERFACE_X=250,z.UI_BUILD_INTERFACE_Y=250,z.UI_BUILD_INTERFACE_X_OFFSET=20,z.MAX_DECORATION_SLOTS=5,z.FRAME_HEIGHT=196,z.FRAME_WIDTH=416,z.FRAME_HALF_WIDTH=208,z.IN_PROGRESS_PREFAB_X_OFFSET=-169,z.IN_PROGRESS_PREFAB_Y_OFFSET=-19,z.FLOOR_LOOK_PREFAB_X_OFFSET=-200,z.FLOOR_LOOK_PREFAB_Y_OFFSET=-120,z.BLOCK_APPEAR_TIMESCALE=2.5,z.BLOCK_FALL_TIMESCALE=1.5,z.BLOCK_FALL_MULTIPLE_DELAY=300,z.BLOCK_FALL_SHAKE_DISTANCE=20,z.BLOCK_FALL_SHAKE_IN_TIME=50,z.BLOCK_FALL_SHAKE_OUT_TIME=200,z.BLOCK_FALL_SHAKE_ANIMATION_DELAY=230,z.MS_DAY=864e5,z.TOOLTIP_SLIDE_DURATION=500,z.TOOLTIP_WIDTH=380,z.TOOLTIP_STAY_DURATION=3e3,z.TOOLTIP_OFFSET_X=125,z.MOVE_HEADER_WIDTH=340,z.STUBBORN_SHADOW_OFFSET_X=140,z.STUBBORN_SHADOW_OFFSET_Y=-90,z.STUBBORN_SHADOW_PLAYER_OFFSET_X=-350,z.STUBBORN_SHADOW_PLAYER_OFFSET_Y=0,z.SHADOW_PORTAL_OFFSET=new F.I9Y(0,-250),z.SPELL_CLASH_START_OFFSET=-400,z.SPELL_CLASH_END_OFFSET=-40,z.SPELL_CLASH_X_OFFSET=20,z.SPELL_CLASH_Y_OFFSET=30,z.SPELL_CLASH_SCALE=.7,z.SPELL_MASK_FILL=0,z.SPELL_MASK_SKIN_WIDTH=60,z.SPELL_MASK_HEIGHT=200,z.SPELL_MASK_OFFSET_Y=100,z.BEAM_SCALE_X=.9,z.BUTTON_FLASH_DURATION_MS=150,z.LUMIN_TREE_OFFSET_Y=40,z.MOVE_FLOOR_BUTTON_OFFSET_X=200,z.MOVE_FLOOR_WARNING_OFFSET_X=-175,z.MOVE_FLOOR_WARNING_OFFSET_Y=-110,z.WARNING_ARROW_OFFSET_X=20,z.WARNING_ARROW_OFFSET_Y=-7,z.FLOOR_FINISHED_TOOLTIP_WIDTH=350,z.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_X=120,z.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_Y=90,z.FLAG_VISIBILITY_DELAY_MS=200,z.STUBBORN_SHADOW_BOUNDS_OFFSET_X=300,z.STUBBORN_SHADOW_CAMERA_OFFSET_X=600,z.NO_SKILL_FLAG_ICON_ID=-1,z.TOWER_RENDERER_CAMERA_HEIGHT=8,z.PUPPET_MASTER_PORTAL_OFFSET_X=-50,z.PUPPET_MASTER_TWEEN_TO_PORTAL_DELAY_MS=1200,z.BUTTON_DEBOUNCE_TIME=300,z.CHARACTER_TWEEN_DELAY_MS=200,z.SCRIM_ALPHA=.6,z.SCRIM_SCALE_X=20,z.SCRIM_SCALE_Y=40,z.SCRIM_OFFSET_X_IN_SCREENS=3,z.SCRIM_OFFSET_Y_IN_SCREENS=10,z.NEW_TOWN_POPUP_SIZE=300,z.FLOATLING_WALK_AREA=new F.M_G(-250,50,500,200),z.FLOATLING_WALK_PIXELS_PER_SECOND=70,z.FLOATLING_WALK_MIN_IDLE_MS=3e3,z.FLOATLING_WALK_MAX_IDLE_MS=1e4,z.FLOATLING_IMMEDIATE_WALK_RATIO=.2,z.FLOATLING_FLOOR_X_OFFSET=50,z.FLOATLING_FLOOR_Y_OFFSET=-35,z.FLOATLING_MAX_COUNT_DISPLAYED=8,z.FLOATLING_FLOAT_MIN_START_Y_OFFSET=-700,z.FLOATLING_FLOAT_MAX_START_Y_OFFSET=-500,z.FLOATLING_FLOAT_HALF_ARC_WIDTH=50,z.FLOATLING_FLOAT_MIN_DELAY_MS=0,z.FLOATLING_FLOAT_MAX_DELAY_MS=400,z.FLOATLING_FLOAT_LAST_FLOATED_OFFSET_MS=600,z.FLOATLING_FLOAT_PIXELS_PER_SECOND=60,z.FLOATLING_FLY_AWAY_MS=1700,z.BUTTON_OFFSET_X=65,z.BUTTON_OFFSET_Y=34,z.SHROUD_OFFSET_Y=30,z.SHROUD_CLEAN_SPELLS=20,z.THETA_MAXIMUM=3,z.THETA_MINIMUM=-3,z.TUTORIAL_GRADE=-1,z.DIALOGUE_SHROUD_FTUE_1=914,z.DIALOGUE_SHROUD_FTUE_2=915,z.DIALOGUE_SHROUD_FTUE_3=916,z.DIALOGUE_SHROUD_FTUE_4=917,z.DIALOGUE_SHROUD_FTUE_POST_ENDGAME_1=1455,z.DIALOGUE_START_CLICKING_BUTTON=920,z.DIALOGUE_CHOOSE_THE_LOOK=921,z.DIALOGUE_CAST_SPELLS_FOR_BLOCKS=922,z.DIALOGUE_SPEED_UP_BLOCK_NUMBERS=923,z.DIALOGUE_FORCE_CORRECT_ANSWER=924,z.DIALOGUE_ALL_DONE=925,z.DIALOGUE_RETURNING_FLOATLINGS=926,z.DIALOGUE_GATHERED_KNOWLEDGE=927,z.DIALOGUE_LETS_GET_TO_WORK=928,z.DIALOGUE_THANK_GOODNESS=945,z.DIALOGUE_LUMIN_TREE=946,z.DIALOGUE_SHOW_YOU=947,z.DIALOGUE_BUILDING_BASICS=952,z.DIALOGUE_FLOATLING_TYPES=953,z.DIALOGUE_WEAKENED_PUPPETMASTER=954,z.FLING_FTUE_MISSED=959,z.FLING_FTUE_POST_FLING=939,z.FLING_FTUE_INTRO_DIALOGUES=[937,949,938,950,951],z.FLING_FTUE_OUTRO_DIALOGUES=[969,970],z.STORE_FTUE_OUTRO_DIALOGUE=[971,972,973],z.DIALOGUE_WELCOME_BACK=960,z.DIALOGUE_STUBBORN_SHADOW_FTUE_1=929,z.DIALOGUE_STUBBORN_SHADOW_FTUE_2=956,z.DIALOGUE_STUBBORN_SHADOW_FTUE_3=930,z.DIALOGUE_STUBBORN_SHADOW_FTUE_4=931,z.DIALOGUE_STUBBORN_SHADOW_FTUE_5=933,z.DIALOGUE_STUBBORN_SHADOW_FTUE_6=957,z.DIALOGUE_STUBBORN_SHADOW_FTUE_7=974,z.DIALOGUE_STUBBORN_SHADOW_FTUE_8=935,z.DIALOGUE_STUBBORN_SHADOW_FTUE_9=958,z.DIALOGUE_STUBBORN_SHADOW_POST_ENDGAME_FTUE_1=1456,z.DIALOGUE_STUBBORN_SHADOW_POST_ENDGAME_FTUE_2=1457,z.DIALOGUE_STUBBORN_SHADOW_DUEL_CHOICE=934,z.FLAG_ORANGE_SKILL_IDS=[1,2,8,42,46,47],z.FLAG_BLUE_SKILL_IDS=[28,29,30,41,45,50,54,73,84],z.FLAG_RED_SKILL_IDS=[14,60,75],z.FLAG_PURPLE_SKILL_IDS=[9,48,49,62,81,82],z.STORE_PLANT=40,z.STORE_FIRE=41,z.STORE_ICE=42,z.STORE_WATER=43,z.STORE_STORM=44,z.STORE_HAT=-1,z.ZONE_CURRENCY_IDS=[13,15,16,12,14],z.ZONE_CURRENCY_PAYOUT=10,z.SHROUD_CORRECT_PAYOUT=1,z.ROOFTOP_CORRECT_PAYOUT=1,z.FIRE_RESEARCH_CURRENCY=21,z.ICE_RESEARCH_CURRENCY=22,z.PLANT_RESEARCH_CURRENCY=23,z.WATER_RESEARCH_CURRENCY=24,z.STORM_RESEARCH_CURRENCY=25,z.FLING_PIP_SPREAD=.07,z.FLING_PIP_COUNT=12,z.FLING_GRAVITY=98,z.FLING_GRAVITY_POWER=3,z.FLING_FIRE_POWER_MULTIPLIER=2,z.FLING_FIRE_POWER_MAX=600,z.FLING_MIN_DRAG_DISTANCE=50,z.FLING_CAMERA_TWEEN_IN_MS=1e3,z.FLING_CAMERA_TWEEN_OUT_MS=3e3,z.FLING_CAMERA_LEAVE_DELAY_MS=1e3,z.FLING_PLAYER_DELAY_OFFSET_MS=100,z.FLING_MAX_COUNT_DISPLAYED=10,z.FLING_WAITING_SPAWN_OFFSET=400,z.FLING_WAITING_SPAWN_TWEEN_MS=2e3,z.FLING_WAITING_SHARED_OFFSET=100,z.FLING_WAITING_INDIVIDUAL_OFFSET=25,z.FLING_WAITING_MIN_X=-180,z.FLING_WAITING_MAX_X=-100,z.FLING_FTUE_POINTS_PER_SHOT=140,z.FLING_FTUE_INTRO_DIALOGUE_Y_OFFSET=120,z.FLING_FTUE_FLOATLING_COUNT=2,z.FLING_SCORE_MANAGER_X=532,z.FLING_SCORE_MANAGER_Y=32,z.SPACE_16PX=16,z.STATE_BUILD="build",z.STATE_CAMERA="camera",z.STATE_CHOOSE_FLOOR="chooseFloor",z.STATE_START="start",z.STATE_SHROUD="shroud",z.STATE_ROOFTOP="rooftop",z.STATE_MOVE="move",z.STATE_FLING="fling",z.STATE_INFINITY="infinity",z.STATE_INFINITY_CHOOSE_FLOOR="infinityChooseFloor",z.STATE_INFINITY_BUILD="infinityBuild",z.STATE_QUICK_RENO="quickReno",z.STATE_TUTORIAL_START="tutorialStart",z.STATE_TUTORIAL_BUILD="tutorialBuild",z.STATE_TUTORIAL_CHOOSE_FLOOR="tutorialFloor",z.STATE_TUTORIAL_END="tutorialEnd",z.TUTORIAL_CUTSCENE="tower_town-intro",z.MESSAGE_DISABLE_NAVIGATION="tt-navigation-disable",z.MESSAGE_ENABLE_NAVIGATION="tt-navigation-enable",z.MESSAGE_DISABLE_FLING_BUTTON="tt-fling-button-disable",z.MESSAGE_ENABLE_FLING_BUTTON="tt-fling-button-enable",z.MESSAGE_ENABLE_BUTTON="tt-enable-button",z.MESSAGE_DISABLE_BUTTON="tt-disable-button",z.ELEMENT_STRINGS=[j.a.Plant,j.a.Ice,j.a.Storm,j.a.Fire,j.a.Water],z.FLING_CURRENCY_ORDER=[z.CURRENCY_PLANT,z.CURRENCY_ICE,z.CURRENCY_STORM,z.CURRENCY_FIRE,z.CURRENCY_WATER],z.MAX_FLOATLING_LEVELS=5,z.POINTER_BOUNCE_MS=750,z.DECORATION_PREFAB_HEIGHT=46,z.DECORATION_FLOOR_OFFSET=20,z.DECORATION_OFFSETS=[new F.I9Y(-z.FRAME_WIDTH/2,-z.FRAME_HEIGHT/2+z.DECORATION_PREFAB_HEIGHT/2-z.DECORATION_FLOOR_OFFSET),new F.I9Y(-z.FRAME_WIDTH/2,-z.FRAME_HEIGHT+z.DECORATION_PREFAB_HEIGHT),new F.I9Y(0,-z.FRAME_HEIGHT+z.DECORATION_PREFAB_HEIGHT),new F.I9Y(z.FRAME_WIDTH/2,-z.FRAME_HEIGHT+z.DECORATION_PREFAB_HEIGHT),new F.I9Y(z.FRAME_WIDTH/2,-z.FRAME_HEIGHT/2+z.DECORATION_PREFAB_HEIGHT/2-z.DECORATION_FLOOR_OFFSET)],z.DEFAULT_FLOOR_ROOM_ID=1,z.DEFAULT_FLOOR_FRAME_ID=2,z.TILESET_CLOUD=K.t.Tileset_cloud_png,z.TILESET_CLOUD_NEW=K.t.Tileset_cloud_new_png,z.TILESET_COLLISIONS=K.t.Tileset_collisions_png,z.TILESET_FOREST_NEW=K.t.Tileset_forest_new_png,z.TILESET_GENERIC=K.t.Tileset_generic_png,z.TILESET_GENERIC_NEW=K.t.Tileset_generic_new_png,z.TILESET_MATH_TOWER_BASIC="tileset-math-tower-basic",z.TILESET_TUTORIAL_SUBSPACE=K.t.Tileset_tutorial_subspace_png,z.TILESET_INFINITY_TOWER_CONSTRUCTION=K.t.Tileset_infinity_tower_construction_png,z.TILESET_OUTSIDE=K.t.Tileset_outside_png,z.TILESET_TOWERTOWN_BASIC=K.t.Tileset_towertown_basic_png,z.TILESET_TOWN_NEW=K.t.Tileset_town_new_png},90736:(k,B,U)=>{"use strict";var F;U.d(B,{L:()=>F}),function(k){k[k.BREADCRUMB=0]="BREADCRUMB",k[k.FLOOR_AWARD_FLOATLINGS=1]="FLOOR_AWARD_FLOATLINGS",k[k.FLOOR_PUSH_FLOATLING=2]="FLOOR_PUSH_FLOATLING",k[k.FLOOR_SET_BLOCK_COUNT=3]="FLOOR_SET_BLOCK_COUNT",k[k.FLOOR_SET_DECORATION_POSITIONS=4]="FLOOR_SET_DECORATION_POSITIONS",k[k.FLOOR_SET_DECORATIONS=5]="FLOOR_SET_DECORATIONS",k[k.FLOOR_SET_EXTERNAL_BUILD=6]="FLOOR_SET_EXTERNAL_BUILD",k[k.FLOOR_SET_FRAME_ID=7]="FLOOR_SET_FRAME_ID",k[k.FLOOR_SET_HAS_SHROUD=8]="FLOOR_SET_HAS_SHROUD",k[k.FLOOR_SET_NUM_SPELLS=9]="FLOOR_SET_NUM_SPELLS",k[k.FLOOR_SET_ROOM_ID=10]="FLOOR_SET_ROOM_ID",k[k.FLOOR_SET_SKILL_ID=11]="FLOOR_SET_SKILL_ID",k[k.FLOOR_SET_STATE=12]="FLOOR_SET_STATE",k[k.FLOOR_START_BUILDING=13]="FLOOR_START_BUILDING",k[k.TOWER_CREATE_FLOOR=14]="TOWER_CREATE_FLOOR",k[k.TOWER_MOVE_FLOOR=15]="TOWER_MOVE_FLOOR",k[k.TOWER_PUSH_FLOOR=16]="TOWER_PUSH_FLOOR",k[k.TOWER_REMOVE_FLOOR=17]="TOWER_REMOVE_FLOOR",k[k.TOWER_ROOM_BUILT=18]="TOWER_ROOM_BUILT",k[k.TOWER_COMPLETED=19]="TOWER_COMPLETED",k[k.TOWER_SET_ACTIVE_TOWER=20]="TOWER_SET_ACTIVE_TOWER",k[k.TOWER_SET_INFINITY_TOWER=21]="TOWER_SET_INFINITY_TOWER",k[k.TOWER_SET_SIDEWALK_ID=22]="TOWER_SET_SIDEWALK_ID",k[k.TOWN_CREATE_INFINITY_TOWER=23]="TOWN_CREATE_INFINITY_TOWER",k[k.TOWN_CREATE_TOWER=24]="TOWN_CREATE_TOWER",k[k.TOWN_PUSH_TOWER=25]="TOWN_PUSH_TOWER",k[k.TOWN_REMOVE_TOWER=26]="TOWN_REMOVE_TOWER",k[k.TOWN_FIND_DESCENDED_FLOATLINGS_TOWER=27]="TOWN_FIND_DESCENDED_FLOATLINGS_TOWER",k[k.FLOATLING_SET_ELEMENT=28]="FLOATLING_SET_ELEMENT",k[k.FLOATLING_SET_EXPLORER_LEVEL=29]="FLOATLING_SET_EXPLORER_LEVEL",k[k.FLOATLING_SET_FLOOR_ASSOCIATION=30]="FLOATLING_SET_FLOOR_ASSOCIATION",k[k.FLOATLING_SET_GEAR_ELEMENT=31]="FLOATLING_SET_GEAR_ELEMENT",k[k.FLOATLING_SET_LAST_THROWN=32]="FLOATLING_SET_LAST_THROWN",k[k.FLOATLING_SET_PERSONALITY=33]="FLOATLING_SET_PERSONALITY",k[k.FLOATLING_SET_STATE=34]="FLOATLING_SET_STATE",k[k.TOWER_TOWN_FLOATLING_FLING_END=35]="TOWER_TOWN_FLOATLING_FLING_END",k[k.TOWER_TOWN_FLOATLING_FLING_START=36]="TOWER_TOWN_FLOATLING_FLING_START",k[k.TOWER_TOWN_INFINITY_TOWER_OPEN=37]="TOWER_TOWN_INFINITY_TOWER_OPEN",k[k.TOWER_TOWN_QUESTION_ANSWERED=38]="TOWER_TOWN_QUESTION_ANSWERED",k[k.TOWER_TOWN_SAVE_TOWN=39]="TOWER_TOWN_SAVE_TOWN",k[k.TOWER_TOWN_SET_CURRENT_TOWN=40]="TOWER_TOWN_SET_CURRENT_TOWN",k[k.TOWER_TOWN_SETTINGS_OPEN=41]="TOWER_TOWN_SETTINGS_OPEN",k[k.TOWER_TOWN_STORE_OPEN=42]="TOWER_TOWN_STORE_OPEN",k[k.EDUCATION_QUESTION_ANSWER=43]="EDUCATION_QUESTION_ANSWER",k[k.EDUCATION_QUESTION_ANSWER_CORRECT=44]="EDUCATION_QUESTION_ANSWER_CORRECT",k[k.EDUCATION_QUESTION_ANSWER_INCORRECT=45]="EDUCATION_QUESTION_ANSWER_INCORRECT",k[k.EDUCATION_QUESTION_INTERFACE_CLOSE=46]="EDUCATION_QUESTION_INTERFACE_CLOSE",k[k.EDUCATION_QUESTION_INTERFACE_OPEN=47]="EDUCATION_QUESTION_INTERFACE_OPEN",k[k.EDUCATION_SET_ALGORITHM=48]="EDUCATION_SET_ALGORITHM",k[k.EDUCATION_SKILL_LOCKED=49]="EDUCATION_SKILL_LOCKED",k[k.EDUCATION_SKILL_MASTERED=50]="EDUCATION_SKILL_MASTERED",k[k.EDUCATION_SKILL_UNLOCKED=51]="EDUCATION_SKILL_UNLOCKED"}(F||(F={}))},58604:(k,B,U)=>{"use strict";U.d(B,{R:()=>$});var F=U(90736);class G{get assetID(){return this._assetID}set assetID(k){this._assetID=k}}var j=U(80070);class $ extends j.v{constructor(){super(...arguments),this._decorations=new Map}get count(){return this._decorations.size}get keys(){return Array.from(this._decorations.keys())}removeAt(k){return!!this._decorations.has(k)&&(this._decorations.delete(k),this.notifyUpdate(F.L.FLOOR_SET_DECORATIONS),!0)}getAt(k){return this._decorations.has(k)?this._decorations.get(k):null}clear(){this._decorations.clear(),this.notifyUpdate(F.L.FLOOR_SET_DECORATIONS)}setAt(k,B){const U=new G;U.assetID=B,this._decorations.set(k,U),this.notifyUpdate(F.L.FLOOR_SET_DECORATIONS)}flush(){const k=this.keys.map((k=>this.getAt(k))).filter((k=>null!==k));return this.clear(),k}}},96417:(k,B,U)=>{"use strict";U.d(B,{b:()=>q,a:()=>V});var F,G=U(95946),j=U(64794),$=U(90736),H=U(81670);!function(k){k[k.Stubborn=0]="Stubborn",k[k.Shy=1]="Shy",k[k.Socialite=2]="Socialite",k[k.ChillDude=3]="ChillDude"}(F||(F={}));var V,W=U(80070);!function(k){k[k.Wandering=0]="Wandering",k[k.Awake=1]="Awake",k[k.Asleep=2]="Asleep",k[k.Floating=3]="Floating",k[k.ScaredAway=4]="ScaredAway"}(V||(V={}));class q extends W.v{constructor(){super(...arguments),this._state=V.Asleep,this._gearElement=0,this._explorerLevel=0,this._lastThrown=0,this._floor=null,this._personality=F.ChillDude,this._element=G.a.Fire}get state(){return this._state}set state(k){this._state!==k&&(this._state=k,this.notifyUpdate($.L.FLOATLING_SET_STATE))}get gearElement(){return this._gearElement}set gearElement(k){this._gearElement=k,this.notifyUpdate($.L.FLOATLING_SET_GEAR_ELEMENT)}get explorerLevel(){return this._explorerLevel}set explorerLevel(k){this._explorerLevel=k,this.notifyUpdate($.L.FLOATLING_SET_EXPLORER_LEVEL)}get lastThrown(){return this._lastThrown}set lastThrown(k){this._lastThrown=k,this.updateState(),this.notifyUpdate($.L.FLOATLING_SET_LAST_THROWN)}get floor(){return this._floor}set floor(k){this._floor=k,this.notifyUpdate($.L.FLOATLING_SET_FLOOR_ASSOCIATION)}get element(){return this._element}set element(k){this._element=k,this.notifyUpdate($.L.FLOATLING_SET_ELEMENT)}get personality(){return this._personality}set personality(k){this._personality=k,this.notifyUpdate($.L.FLOATLING_SET_PERSONALITY)}get spineID(){return`spine-${H.s.getFloatlingAssetID(this.element,this.explorerLevel)}`}get researchPointID(){return`researchpoint-sm-${this.element}`}updateState(){this.state!==V.Floating&&this.state!==V.ScaredAway&&(this.lastThrown<=Date.now()-j.D.MS_DAY?this.state!==V.Wandering&&(this.state=V.Awake):this.state=V.Asleep)}static organizeFloatlings(k){const B=new Map;return j.D.ELEMENT_STRINGS.forEach((k=>{B.set(k,[])})),k.forEach((k=>{let U=!1;for(let F=0;FB.get(k.element)[F].explorerLevel){B.get(k.element).splice(F,0,k),U=!0;break}U||B.get(k.element).push(k)})),B}}},9439:(k,B,U)=>{"use strict";U.d(B,{Z:()=>X});var F=U(62459),G=U(95891),j=U(35120),$=U(76945),H=U(70399),V=U(64794),W=U(90736),q=U(15678),K=U(58604),z=U(96417),Y=U(39666),Q=U(80070);class X extends Q.v{get hasShroud(){return this._hasShroud}get isComplete(){return this.state===Y.u.Complete}get isPreConstruction(){return this.state===Y.u.ChooseLook}get roomID(){return this._roomID}set roomID(k){this._roomID=k,this.notifyUpdate(W.L.FLOOR_SET_ROOM_ID)}get skillID(){return this._skillID}set skillID(k){this._skillID=k,this.notifyUpdate(W.L.FLOOR_SET_SKILL_ID)}get frameID(){return this._frameID}set frameID(k){this._frameID=k,this.notifyUpdate(W.L.FLOOR_SET_FRAME_ID)}get blockCount(){return this._blockCount}set blockCount(k){this._blockCount!==k&&(this._blockCount=k,this.notifyUpdate(W.L.FLOOR_SET_BLOCK_COUNT))}get hasMaxBlocks(){return this.blockCount>=V.D.MAX_SMART_BLOCKS}get isQuickReno(){return this.state===Y.u.QuickReno}get isExternalBuild(){return this._isExternalBuild}set isExternalBuild(k){this._isExternalBuild=k,this.notifyUpdate(W.L.FLOOR_SET_EXTERNAL_BUILD)}get state(){return this._state}set state(k){this._state!==k&&(this._state=k,this.notifyUpdate(W.L.FLOOR_SET_STATE))}get floatlings(){return this._floatlings}get decorations(){return this._decorations}get decorationPositions(){return this._decorationPositions}set decorationPositions(k){if(k.length>V.D.MAX_DECORATION_SLOTS)throw new Error(`Maximum decorations cannot exceed ${V.D.MAX_DECORATION_SLOTS}`);this._decorationPositions=k,this.notifyUpdate(W.L.FLOOR_SET_DECORATION_POSITIONS)}getRestingFloatlings(){return this.floatlings.filter((k=>(k.updateState(),k.state===z.a.Asleep||k.state===z.a.Awake)))}getFloatlingsInState(k){return this.floatlings.filter((B=>B.state===k))}getFloatingFloatlings(){return this.floatlings.filter((k=>k.state===z.a.Floating))}constructor(){var k,B,U;super(),this._roomID=0,this._skillID=0,this._frameID=0,this._blockCount=0,this._isExternalBuild=!1,this._hasShroud=!1,this._state=Y.u.ChooseLook,this._decorations=new K.R,this._decorationPositions=[{x:-160,y:-80},{x:-160,y:-135},{x:0,y:-135},{x:160,y:-135},{x:160,y:-80}],this._floatlings=[],this._mathTower=null!==(U=null===(B=null===(k=j.q.instance)||void 0===k?void 0:k.prodigy)||void 0===B?void 0:B.gameContainer.get(H.G.MathTower))&&void 0!==U?U:null,this.registerDecorHandler(this._decorations)}calculateShroudStatus(){var k;if(!(null===(k=null==this?void 0:this._mathTower)||void 0===k?void 0:k.education))return;const B=this._mathTower.education.getSkillById(this._skillID),U=q.g.answersToUnlock(B);this._hasShroud=B&&U>0,this.notifyUpdate(W.L.FLOOR_SET_HAS_SHROUD,this._hasShroud)}cleansRemaining(k=null){var B,U,F;const G=k||(null===(U=null===(B=this._mathTower)||void 0===B?void 0:B.education)||void 0===U?void 0:U.getSkillById(this._skillID)),j=G&&null!==(F=q.g.answersToUnlock(G))&&void 0!==F?F:0;return Math.max(j,0)}onShroudQuestionAnswered(){this._hasShroud&&(this.notifyUpdate(W.L.FLOOR_SET_NUM_SPELLS),this.calculateShroudStatus())}generateRandomFloatlings(k=5,B=0){((k,B)=>(0,G.range)(B).map((()=>{const B=new z.b;return B.gearElement=$.o.seededRange(2,3,k),B.element=(0,G.first)((0,G.shuffle)([...V.D.ELEMENT_STRINGS])),B.explorerLevel=$.o.seededRange(0,4,k),B})))(this.skillID,k).forEach((k=>{k.lastThrown=B,this.pushFloatling(k)}))}awardFloatlings(k){const B=k.getItemData(V.D.ASSET_TYPE_INTERIOR,this.roomID);if(!F.Aq$.isDefined(B))return;let U=0,G="";B.occupantLevels.forEach((k=>{const F=new z.b;F.element=V.D.ELEMENT_STRINGS[Number.parseInt(B.element)],F.explorerLevel=k,this.pushFloatling(F),U++,G=F.element})),this.notifyUpdate(W.L.FLOOR_AWARD_FLOATLINGS,{floatlingCount:U,element:G})}pushFloatling(k){this._floatlings.push(k),k.floor=this,this.registerFloatlingHandler(k),this.notifyUpdate(W.L.FLOOR_PUSH_FLOATLING)}get isRenovating(){return(this.isQuickReno||this.state===Y.u.UnderConstruction)&&this._isExternalBuild}setComplete(k=!1,B=V.D.MAX_SMART_BLOCKS){this.blockCount=B,this.isExternalBuild=k,this.state=Y.u.Complete}isInBlueprintState(){return!this.hasMaxBlocks&&X.FULL_STATES.every((k=>this.state!==k))}setReadyForRenovation(){this.isExternalBuild=!0,this.state=Y.u.Complete}setRenovation(){this.isExternalBuild=!0,this.state=Y.u.QuickReno}setRenoConstruction(){this.blockCount=this.hasMaxBlocks?0:this.blockCount,this.isExternalBuild=!0,this.state=Y.u.UnderConstruction}get canReceiveFloatlings(){return this.isComplete&&!this.isExternalBuild&&0===this.floatlings.length}registerFloatlingHandler(k){k.onUpdate.add(this.handleUpdate.bind(this))}registerDecorHandler(k){k.onUpdate.add(this.handleUpdate.bind(this))}}X.FULL_STATES=[Y.u.Complete,Y.u.ChooseLook,Y.u.QuickReno,Y.u.RooftopMastery]},39666:(k,B,U)=>{"use strict";var F;U.d(B,{u:()=>F}),function(k){k[k.Complete=0]="Complete",k[k.UnderConstruction=1]="UnderConstruction",k[k.SkillLocked=2]="SkillLocked",k[k.RooftopMastery=3]="RooftopMastery",k[k.TowerRoof=4]="TowerRoof",k[k.ChooseLook=5]="ChooseLook",k[k.QuickReno=6]="QuickReno",k[k.MoveFloor=7]="MoveFloor"}(F||(F={}))},51365:(k,B,U)=>{"use strict";U.d(B,{L:()=>j});var F=U(95891),G=U(90736);class j{get source(){return this._source}get child(){return this._child}get type(){return this._type}get value(){return this._value}constructor(k,B,U,F){this._source=k,this._child=U,this._type=B,this._value=F}getLastChild(){return(0,F.last)(this.traverseNotificationTree(this._child))}getChildren(){return this.traverseNotificationTree(this._child)}getFinalNotification(){return this._child?this.getLastChild():this}getStringType(){return Object.keys(G.L).find((k=>{if(G.L[k]===this._type)return k}))}traverseNotificationTree(k){const B=[],U=k=>{k._child&&(B.push(k._child),U(k._child))};return k&&(B.push(k),U(k)),B}}},43844:(k,B,U)=>{"use strict";U.d(B,{o:()=>q});var F=U(95891),G=U(90736),j=U(58604),$=U(96417),H=U(9439),V=U(39666),W=U(80070);class q extends W.v{get ornamentPositions(){return this._ornamentsPositions}get floors(){return this._floors}get ornaments(){return this._ornaments}get sideWalkAssetID(){return this._sideWalkAssetID}set sideWalkAssetID(k){this._sideWalkAssetID=k,this.notifyUpdate(G.L.TOWER_SET_SIDEWALK_ID)}get isInfinityTower(){return this._isInfinityTower}set isInfinityTower(k){this._isInfinityTower=k,this.notifyUpdate(G.L.TOWER_SET_INFINITY_TOWER)}get isActiveTower(){return this._isActiveTower}set isActiveTower(k){this._isActiveTower=k,this.notifyUpdate(G.L.TOWER_SET_ACTIVE_TOWER)}constructor(k=!1){super(),this._sideWalkAssetID=0,this._isInfinityTower=!1,this._isActiveTower=!1,this._ornaments=new j.R,this._floors=[],this._ornamentsPositions=[{x:-200,y:70},{x:-100,y:70},{x:0,y:70},{x:100,y:70},{x:200,y:70}],this._isInfinityTower=k,this._isActiveTower=!0}createFloor(k,B=!1){if(!this.canAddFloor())return null;const U=new H.Z;return U.skillID=this.isInfinityTower?null:k,U.isExternalBuild=B,this._floors.push(U),this.registerFloorHandler(U),this.notifyUpdate(G.L.TOWER_CREATE_FLOOR,{skillID:k,isInfinityTower:this.isInfinityTower}),U}hasSkillLockedFloors(){return(0,F.filter)(this._floors,(k=>k.state===V.u.SkillLocked)).length>0}canRemoveFloor(){return!this._isInfinityTower&&this._floors.length>q.MINIMUM_FLOOR_COUNT}canAddFloor(){return this._isInfinityTower||this._floors.length=q.MINIMUM_FLOOR_COUNT}takeFloorFrom(k,B=!1,U=!0){return!!(B||k.canRemoveFloor()&&this.canAddFloor())&&(this.pushFloor(k.removeFromBottom(!1),U),k.isActiveTower&&0===k.floors.length&&(this.isActiveTower=!0),!0)}moveFloorTo(k,B=!1,U=!0){return!!(B||this.canRemoveFloor()&&k.canAddFloor())&&(k.addFloor(this._floors.pop(),!1),k.isActiveTower&&(this.isActiveTower=!1),U&&this.notifyUpdate(G.L.TOWER_MOVE_FLOOR),!0)}getFloatlings(){const k=[];for(let B=0;Bk.getFloatlingsInState($.a.Wandering))).filter((k=>k)))}removeFromTop(){const k=this._floors.pop();this.unregisterFloorHandler(k),this.notifyUpdate(G.L.TOWER_REMOVE_FLOOR)}removeFromBottom(k=!0){const B=this._floors.shift();return this.unregisterFloorHandler(B),k&&this.notifyUpdate(G.L.TOWER_REMOVE_FLOOR),B}removeFloors(k,B,U=!0){this._floors.splice(k,B).forEach((k=>{this.unregisterFloorHandler(k)})),U&&this.notifyUpdate(G.L.TOWER_REMOVE_FLOOR)}addFloor(k,B=!0){this._floors.unshift(k),B&&this.notifyUpdate(G.L.TOWER_CREATE_FLOOR,{skillID:k.skillID,isInfinityTower:this.isInfinityTower})}pushFloor(k,B=!0,U=!1){if(this.canAddFloor()){const j=(0,F.last)(this._floors);return U&&j&&j.state!==V.u.Complete?(this._floors.pop(),this._floors.push(k),this._floors.push(j)):this._floors.push(k),this.registerFloorHandler(k),B&&this.notifyUpdate(G.L.TOWER_PUSH_FLOOR),!0}return!1}registerFloorHandler(k){k.onUpdate.add(this.handleUpdate.bind(this))}unregisterFloorHandler(k){k.onUpdate.remove(this.handleUpdate.bind(this))}}q.MINIMUM_FLOOR_COUNT=3,q.MAXIMUM_FLOOR_COUNT=28},94909:(k,B,U)=>{"use strict";U.d(B,{J:()=>W});var F=U(95891),G=U(90736),j=U(96417),$=U(39666),H=U(43844),V=U(80070);class W extends V.v{get towers(){return this._towers}get floors(){return(0,F.flatten)(this.towers.map((k=>k.floors)))}constructor(){super(),this._towers=[],this.isTutorialTown=!1,this._infinityTower=null,this._floatlingsScared=!1,this.onUpdate.add(this.handleTowerUpdate.bind(this))}init(k=!1){const B=(0,F.last)(this.floors);B&&B.state===$.u.RooftopMastery&&(this._floatlingsScared=!0,this.setAllFloatlingsState(j.a.ScaredAway)),this.isTutorialTown=k}canCreateTower(k){if(this._towers.length===W.MAX_TOWERS)return!1;return(W.MAX_TOWERS-this._towers.length)*H.o.MAXIMUM_FLOOR_COUNT>=k}get skillCount(){return(0,F.sumBy)(this.towers,(k=>k.floors.length))}get infinityTower(){return this._infinityTower}getPage(k,B){const U=Math.max(0,k)*B;return this._towers.slice(U,U+B)}getPageCount(k){const B=Math.max(1,k);return Math.ceil(this._towers.length/B)}createTower(){const k=new H.o;return this._towers.push(k),this.registerTowerHandler(k),this.notifyUpdate(G.L.TOWN_CREATE_TOWER),k}removeTower(){const k=this._towers.pop();this.notifyUpdate(G.L.TOWN_REMOVE_TOWER),this.unregisterTowerHandler(k)}createInfinityTower(){return this._infinityTower||(this._infinityTower=new H.o(!0)),this.registerTowerHandler(this._infinityTower),this.notifyUpdate(G.L.TOWN_CREATE_INFINITY_TOWER),this._infinityTower}getWanderingFloatlings(){return(0,F.flatten)(this.towers.map((k=>k.getWanderingFloatlings())))}getAllFloatlings(){return(0,F.flatten)(this.towers.map((k=>k.getFloatlings())))}pushTower(k){this._towers.push(k),this.registerTowerHandler(k),this.notifyUpdate(G.L.TOWN_PUSH_TOWER)}getIndexesOfFloor(k){const B={floorIndex:-1,towerIndex:-1};for(let U=0;U=0){B.towerIndex=U;break}return B}setAllFloatlingsState(k){this.floors.forEach((B=>{B.floatlings.forEach((B=>{B.state=k}))}))}registerTowerHandler(k){k.onUpdate.add(this.handleUpdate.bind(this))}unregisterTowerHandler(k){k.onUpdate.remove(this.handleUpdate.bind(this))}handleTowerUpdate(k){switch(k.getFinalNotification().type){case G.L.TOWN_CREATE_TOWER:this.towers.length>1&&(this.towers[this.towers.length-2].isActiveTower=!1);break;case G.L.TOWN_REMOVE_TOWER:this.towers.length>0&&(this.towers[this.towers.length-1].isActiveTower=!0);break;case G.L.FLOOR_SET_STATE:k.getLastChild().source.state===$.u.RooftopMastery?(this._floatlingsScared=!0,this.setAllFloatlingsState(j.a.ScaredAway)):this._floatlingsScared&&(this._floatlingsScared=!1,this.setAllFloatlingsState(j.a.Asleep))}}}W.MAX_TOWERS=14},80070:(k,B,U)=>{"use strict";U.d(B,{v:()=>V});var F=U(8674),G=U(62459),j=U(79687),$=U(90736),H=U(51365);let V=class{constructor(){this._onUpdate=new G.HN0}get onUpdate(){return this._onUpdate}notifyUpdate(k,B){this.onUpdate.dispatch(new H.L(this,k,null,B))}handleUpdate(k){const B=new H.L(this,$.L.BREADCRUMB,k);return this._onUpdate.dispatch(B),B}};V=(0,F.Cg)([(0,j.injectable)()],V)},66930:(k,B,U)=>{"use strict";U.d(B,{V:()=>Y});var F=U(8674),G=U(62459),j=U(79687),$=U(35120),H=U(51477),V=U(90736),W=U(80070),q=U(64794),K=U(15678);class z{static isTypeBasicOrGameChallenge(k,B){return B.isDefaultSkillSelectionType(k)||B.isAlgorithmTypeGameChallenge(k)}static getSkills(k){return k.skills?k.skills.filter((k=>K.g.isAvailable(k))):[]}static getBasicAlgorithm(k){return k.getBasicAlgorithm()}static getCurrentAlgorithm(k){return k.getNextAlgorithm()}static openQuestionAtSkill(k,B,U=!1,F){k.showGameChallenge(B,q.D.GAME_CHALLENGE_SCENARIO_ID,0,!1,0,0,F,U)}static openQuestion(k,B=!1,U){k.question(U,{forceAnswerBonus:!1,energyCost:0,allowTutorials:!0,canInstantWin:!1,isUserInBattle:!1,disableLock:B})}}let Y=class extends W.v{getEducationSystemAPI(){const k=this._externalFactory.getEducationSystemAPI();if(!k)return G.VyI.log("Trying to use education system API in a non-math context.",G.$bb.Error),null;const B=k.getNextAlgorithm().type;return this._currentAlgorithmType!==B&&(this._currentAlgorithmType=B,this.notifyUpdate(V.L.EDUCATION_SET_ALGORITHM,B)),k}constructor(k){super(),this._externalFactory=null,this._externalFactory=$.q.instance.prodigy.education}getGrade(){return this.getEducationSystemAPI().getAlgorithmGrade()}openQuestionInterface(k,B,U,F){const G=k?this.getNextSkill():this.getSkillById(B),j=(k,B,U)=>{const j=G?G.ID:null,$=this.getSkillById(j);this.notifyUpdate(V.L.EDUCATION_QUESTION_ANSWER,$),this.notifyUpdate(k?V.L.EDUCATION_QUESTION_ANSWER_CORRECT:V.L.EDUCATION_QUESTION_ANSWER_INCORRECT,$),this.notifyUpdate(V.L.EDUCATION_QUESTION_INTERFACE_CLOSE,$),this.notifyUpdatesIfSkillChanged(G,$),F&&F(k,B,U,!1,!1,$)};k?z.openQuestion(this._externalFactory,U,j):G?z.openQuestionAtSkill(this._externalFactory,B,U,j):F&&F(!0),this.notifyUpdate(V.L.EDUCATION_QUESTION_INTERFACE_OPEN,G)}getNextSkill(){return this.getEducationSystemAPI().getNextAlgorithm().nextSkill}isCurrentAlgorithmBasicOrGameChallenge(){return z.isTypeBasicOrGameChallenge(this._currentAlgorithmType,this.getEducationSystemAPI())}getMobileUnfriendlySkillIds(){return this.getEducationSystemAPI().nonMobileFriendlySkillIds}getSkills(){const k=this.getEducationSystemAPI(),B=z.getBasicAlgorithm(k);return z.getSkills(B).filter((B=>K.g.isSkillIdMobileFriendly(B.ID,k.nonMobileFriendlySkillIds)))}getSkillsByGrade(k){return K.g.getSkillsByGrade(this.getSkills(),k)}getCurrentSkillByGrade(k){return K.g.getCurrentSkillByGrade(this.getSkills(),k)}getSkillsMasteredByGrade(k){return K.g.getSkillsMasteredByGrade(this.getSkills(),k)}getPendingSkillsByGrade(k){return K.g.getPendingSkillsByGrade(this.getSkills(),k)}getSkillById(k){const B=this.getEducationSystemAPI().getAllAlgorithmSkills();return K.g.getSkillById(B,k)}notifyUpdatesIfSkillChanged(k,B){k&&B&&k.ID===B.ID&&(K.g.determineJustLocked(k,B)&&this.notifyUpdate(V.L.EDUCATION_SKILL_LOCKED,B),K.g.determineJustUnlocked(k,B)&&this.notifyUpdate(V.L.EDUCATION_SKILL_UNLOCKED,B),K.g.determineJustMastered(k,B)&&this.notifyUpdate(V.L.EDUCATION_SKILL_MASTERED,B))}};Y=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("51c-03a0")),(0,F.Sn)("design:paramtypes",[H.n])],Y)},42862:(k,B,U)=>{"use strict";U.d(B,{s:()=>z});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U(35120),V=U(51477),W=U(64794),q=U(90736),K=U(37747);let z=class{get educationApi(){return this._educationApi||(this._educationApi=H.q.instance.prodigy.education.getEducationSystemAPI(),this._educationApi||G.VyI.log("Trying to use education system API in a non-math context.",G.$bb.Error)),this._educationApi}constructor(k){this._game=k}handleNotification(k,B){const U=this.getNotification(B),F=this.getTowerID(k),j=this.getActiveFloorID(k);switch(U.type){case q.L.TOWER_TOWN_FLOATLING_FLING_START:H.q.instance.prodigy.gameContainer.get("c47-20b6").economy.sendMinigameEvent("floatling-fling",!0);break;case q.L.TOWER_TOWN_FLOATLING_FLING_END:H.q.instance.prodigy.gameContainer.get("c47-20b6").economy.sendMinigameEvent("floatling-fling",!1);break;case q.L.FLOOR_AWARD_FLOATLINGS:const B=U.value;H.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.towerTownEvents.sendFloatlingCreatedEvent(B.element,B.floatlingCount);break;case q.L.FLOOR_START_BUILDING:const $={towerID:F,floorID:j,isInfinityFloor:k.isInfinity,algorithmType:k.isInfinity?this.getAlgoType():k.currentGrade};H.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.towerTownEvents.sendFloatlingFloorCreatedEvent($);break;case q.L.TOWN_CREATE_TOWER:H.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.towerTownEvents.sendFloatlingTowerCreatedEvent(F);break;case q.L.TOWER_COMPLETED:const V=k.currentTown.towers[F].floors.length;H.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.towerTownEvents.sendFloatlingTowerCompletedEvent(F,V);break;case q.L.TOWER_ROOM_BUILT:const W=G.Aq$.isDefined(k.stateManager.switchParams.quickRenoFloor),K=W?k.stateManager.switchParams.quickRenoFloor:k.activeFloor,z=[];for(let k=0;k{"use strict";U.d(B,{w:()=>Z});var F=U(8674),G=U(62459),j=U(79687),$=U(35120),H=U(51477),V=U(70399),W=U(95891);class q{static deepKeyRename(k,B){return this.deepMapKeys(k,(k=>B[k]||k))}static deepMapKeys(k,B){if(!W.isObject(k))return k;const U=k=>k.map((k=>this.deepMapKeys(k,B))),F=k=>this.deepMapKeys(k,B);return Object.keys(k||{}).reduce(((G,j)=>{const $=W.isArray(k[j])?U(k[j]):W.isObject(k[j])?F(k[j]):k[j];return Object.assign(Object.assign({},G),{[B(j)]:$})}),{})}}const K={blockCount:1,decorations:2,element:3,explorerLevel:4,floatlings:5,floors:6,frameID:7,gearElement:8,hasShroud:9,infinityTower:10,isActiveTower:11,isExternalBuild:12,isInfinityTower:13,lastThrown:14,numSpells:15,personality:16,roomID:17,sideWalkAssetID:18,skillID:19,towers:20,type:21};class z{static compressKeys(k){return q.deepKeyRename(k,K)}static decompressKeys(k){return q.deepKeyRename(k,W.invert(K))}}var Y,Q=U(73678),X=U(6191);let Z=Y=class{constructor(k,B){this._serializer=B}getTown(k){const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return this._serializer.deserialize(z.decompressKeys(B.state.get(this.getTownPath(k))))}getTownIDs(){const k=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return G.Aq$.isDefined(k.state.get(`zone-${Y.TOWERTOWER_ZONE}-towns`))?Object.keys(k.state.get(`zone-${Y.TOWERTOWER_ZONE}-towns`)):[]}setTown(k,B){const U=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=this._serializer.serialize(B);F&&U.state.set(this.getTownPath(k),z.compressKeys(F))}getTownPath(k){return`zone-${Y.TOWERTOWER_ZONE}-towns-${k}`}};Z.TOWERTOWER_ZONE=Q.A_.TOWERTOWN,Z=Y=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("51c-03a0")),(0,F.Qj)(1,(0,j.inject)(V.G.StorageSerializer)),(0,F.Sn)("design:paramtypes",[H.n,X.Y])],Z)},6191:(k,B,U)=>{"use strict";U.d(B,{Y:()=>z});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U(64794),V=U(96417),W=U(39666),q=U(94909);class K{static log(k,B){G.VyI.log(`- TOWER TOWN - ${k}`,B)}}let z=class{serialize(k){if(!k)return K.log("Could not serialize town in StorageSerializer because it was null",G.$bb.Verbose),null;const B=null!==k.infinityTower?this.serializeTower(k.infinityTower):void 0;return{towers:k.towers.length>0?Array.from($.map(k.towers,this.serializeTower.bind(this))):void 0,infinityTower:B}}deserialize(k){return k||K.log("Could not deserialize townState in StorageSerializer because it was null",G.$bb.Verbose),k?this.deserializeTown(k):null}serializeTower(k){return{sideWalkAssetID:k.sideWalkAssetID,isInfinityTower:k.isInfinityTower,isActiveTower:k.isActiveTower,decorations:k.ornaments.count>0?this.serializeDecorContainer(k.ornaments):void 0,floors:k.floors.length>0?Array.from($.map(k.floors,this.serializeFloor.bind(this))):void 0}}serializeFloor(k){const B=k.roomID,U=k.skillID,F=k.frameID,G=k.blockCount,j=k.isExternalBuild,H=k.state,V=k.hasShroud;return{roomID:B,skillID:U,frameID:F,blockCount:G,isExternalBuild:j,type:H,decorations:0!==k.decorations.count?this.serializeDecorContainer(k.decorations):void 0,floatlings:k.floatlings&&k.floatlings.length>0?Array.from($.map(k.floatlings,this.serializeFloatling.bind(this))):void 0,numSpells:0,hasShroud:V}}serializeDecorContainer(k){const B=[],U=k.keys;return $.forEach(U,(U=>{const F=k.getAt(U).assetID;B.push({slot:U,assetID:F})})),B}serializeFloatling(k){return{gearElement:k.gearElement,explorerLevel:k.explorerLevel,lastThrown:k.lastThrown,personality:k.personality,element:k.element}}deserializeTown(k){const B=new q.J;if(k.infinityTower){const U=B.createInfinityTower();this.deserializeTower(U,k.infinityTower)}return k.towers&&k.towers.length>0&&this.deserializeTowers(B,k.towers),B}deserializeTowers(k,B){$.forEach(B,(B=>{const U=k.createTower();this.deserializeTower(U,B)}))}deserializeTower(k,B){k.sideWalkAssetID=B.sideWalkAssetID,k.isInfinityTower=B.isInfinityTower,k.isActiveTower=B.isActiveTower,this.deserializeDecorations(k.ornaments,B.decorations),this.deserializeFloors(k,B.floors)}deserializeDecorations(k,B){B&&$.forEach(B,(B=>{G.Aq$.isDefined(B.atlasID)&&!G.Aq$.isDefined(B.assetID)?k.setAt(B.slot,B.atlasID):(B.atlasID=void 0,k.setAt(B.slot,B.assetID))}))}deserializeFloors(k,B){B&&B.length>0&&$.forEach(B,(B=>{const U=k.createFloor(B.skillID,B.isExternalBuild);this.deserializeDecorations(U.decorations,B.decorations),U.blockCount=B.blockCount,U.frameID=B.frameID,U.roomID=B.roomID,B.type===W.u.Complete&&U.blockCount0&&$.forEach(B,(B=>{const U=new V.b;this.shallowCopy(B,U),U.floor=k,k.pushFloatling(U)}))}shallowCopy(k,B){for(const U in k)B[U]=k[U]}};z=(0,F.Cg)([(0,j.injectable)()],z)},41340:(k,B,U)=>{"use strict";U.d(B,{Y:()=>W});var F=U(8674),G=U(79687),j=U(35120),$=U(51477),H=U(64794),V=U(59510);let W=class{constructor(k){this._breadcrumbManager=j.q.instance.prodigy.breadcrumbManager}completeBreadcrumb(k){this._breadcrumbManager.completeBreadcrumb(H.D.FEATURE_NAME,k)}isBreadcrumbComplete(k){return this._breadcrumbManager.isBreadcrumbComplete(H.D.FEATURE_NAME,k)}resetBreadcrumb(k){this._breadcrumbManager.resetBreadcrumb(H.D.FEATURE_NAME,k)}resetBreadcrumbs(){this._breadcrumbManager.resetBreadcrumbs(H.D.FEATURE_NAME)}init(){this._breadcrumbManager.breadcrumbConfig.addFeature(H.D.FEATURE_NAME).addBreadcrumb(V.M.DefaultItemsReceived,0).addBreadcrumb(V.M.ShroudTutorialCompleted,1).addBreadcrumb(V.M.FlingTutorialComplete,2).addBreadcrumb(V.M.TutorialCompleted,3).addBreadcrumb(V.M.ShroudTutorialFirstTime,4).addBreadcrumb(V.M.FlingUnlocked,5).addBreadcrumb(V.M.StoreFirstPurchaseComplete,6).addBreadcrumb(V.M.DefaultFramesReceived,7).addBreadcrumb(V.M.StubbornShadowTutorialOneCompleted,8).addBreadcrumb(V.M.StubbornShadowTutorialTwoCompleted,9)}};W=(0,F.Cg)([(0,G.injectable)(),(0,F.Qj)(0,(0,G.inject)("51c-03a0")),(0,F.Sn)("design:paramtypes",[$.n])],W)},59510:(k,B,U)=>{"use strict";var F;U.d(B,{M:()=>F}),function(k){k.DefaultItemsReceived="DefaultItemsReceived",k.TutorialCompleted="TutorialComplete",k.ShroudTutorialFirstTime="ShroudTutorialFirstTime",k.ShroudTutorialCompleted="ShroudTutorialCompleted",k.FlingUnlocked="FlingUnlocked",k.FlingTutorialComplete="FlingTutorialComplete",k.StoreFirstPurchaseComplete="StoreFirstPurchaseComplete",k.DefaultFramesReceived="DefaultFramesReceived",k.StubbornShadowTutorialOneCompleted="StubbornShadowTutorialOneCompleted",k.StubbornShadowTutorialTwoCompleted="StubbornShadowTutorialTwoCompleted"}(F||(F={}))},25863:(k,B,U)=>{"use strict";U.d(B,{Y:()=>q});var F=U(8674),G=U(79687),j=U(30405),$=U(70399),H=U(64794),V=U(43531);class W{constructor(k,B){this._events=[],this._showGuideHand=B,this._controller=new V.rD(k)}addDialogue(k,B=!0,U=null){return this._events.push({dialogueConfig:{dialogueData:this._controller.dataProvider.get(k),blockInput:B},condition:U}),this}addAction(k,B=null){return this._events.push({dialogueConfig:{callback:k},condition:B}),this}addGuideHand(k,B=0,U=0){return this.addAction((()=>{this._showGuideHand.addGuideHand(k,B,U)})),this}removeGuideHand(k){return this.addAction((()=>{this._showGuideHand.removeGuideHand(k)})),this}start(k,B){const U=[];for(let F=0;F{"use strict";U.d(B,{m:()=>je});var F=U(35120),G=U(11624),j=U(87820),$=U(70399),H=U(64794),V=U(73678),W=U(62459),q=U(56942),K=U(85855),z=U(40295),Y=U(73797),Q=U(75214),X=U(87337),Z=U(79340),J=U(93867);class tt extends Z.Z{constructor(k,B){super(k,"A1",B.concat([q.Q.Spine_shadowportal_json,K.V.Bgm_towertown,K.V.Bgm_floatlingfling]),"towertown-default-2")}setup(k,B,U){super.setup(k,B,U)}start(k,B){super.start(k,B,this.zone.bgmID),k.broadcaster.broadcast(Y.Y1.HideHUD,Y.HG.HUD);const U=F.q.instance.prodigy.gameContainer.get(W.$Bt.IFSMController),G=F.q.instance.prodigy.gameContainer.get(W.$Bt.FSMService),j=J.U.isStepComplete(z.B.PuppetMasterDefeated);this._puppet=j?new Q.p(k,"NPC_NAME_STUBBORN_SHADOW",239,X.ac.Boss,B.content,640,260,"idle"):new Q.p(k,"NPC_NAME_PUPPETMASTER",q.Q.Spine_npc_puppetmaster_json,X.ac.Boss,B.content,640,320,"idle"),U.execute(G.getStateMachine(200),{game:k,screen:B,scene:this,player:B.user,puppet:this._puppet,dialogueIDs:j?[1452,1453]:[918,919],path:B.path,pathfinder:B.path,isPuppetMaster:!j})}cleanup(){this._puppet&&(this._puppet.destroy(),this._puppet=null),super.cleanup()}tweenPuppet(){F.q.instance.game.add.tween(this._puppet,this).to({x:1400},tt._walkTweenMS).start()}}tt._walkTweenMS=1700;var et=U(8674),it=U(95891),st=U(88022),nt=U(60881),at=U(75781),rt=U(68910),ot=U(43844),ht=U(15678);class ct{constructor(k,B,U){this._currentState=null,this._states=new Map,this._mathTower=k,this._mathTower.stateManager=this,this._prefabLoader=B,this._map=U,this._localizer=F.q.instance.prodigy.gameContainer.get(W.$Bt.LocalizationService),this._dialogueController=F.q.instance.prodigy.dialogue.create(),this._switchParams={}}addState(k,B){this._states.set(k,B),B.init(this)}changeToState(k,B={}){this._states.has(k)&&(this._switchParams=B,W.Aq$.isDefined(this._currentState)&&this._currentState.onExit(k),this._currentState=this._states.get(k),this._currentState.onEnter())}update(){this._currentState.onUpdate}get states(){return this._states}get currentState(){return this._currentState}get mathTower(){return this._mathTower}get switchParams(){return this._switchParams}get prefabLoader(){return this._prefabLoader}get localizer(){return this._localizer}get dialogueController(){return this._dialogueController}nextTowerAvailable(){const k=this._mathTower.currentTown,B=k.towers.length>0,U=k.towers[k.towers.length-1].floors.length>=ot.o.MINIMUM_FLOOR_COUNT,F=this._mathTower.education.getPendingSkillsByGrade(this._mathTower.getGrade()),G=k.canCreateTower(F.length);return!B||U&&G}nextFloorPosition(k=!1){if(this.mathTower.isInfinity)return this.nextInfinityFloorPosition();const B=this._mathTower.currentTown;let U=0===B.towers.length?0:B.towers.length-1,F=0===B.towers.length?0:B.towers[U].floors.length;return B.towers.length>0&&!B.towers[U].canAddFloor()&&!k&&(U++,F=1),this.getFloorPosition(U,F)}moveToNextFloor(k=!1){const B=this._mathTower.currentTown;let U=0===B.towers.length?0:B.towers.length-1,F=0===B.towers.length?0:B.towers[U].floors.length;B.towers.length>0&&!B.towers[U].canAddFloor()&&!k&&(U++,F=1),this._map.townRenderer.moveToFloor(U,F)}nextInfinityFloorPosition(){return new rt.Point(-F.q.instance.game.width*H.D.RENDERER_OFFSET_PERCENTAGE_INFINITY_TOWER,H.D.TOWER_BASE_Y-H.D.FLOOR_HEIGHT*this.mathTower.currentTown.infinityTower.floors.length)}getFloorPosition(k,B){const U=this._mathTower.game.width*H.D.RENDERER_JUMP_PERCENTAGE,F=this._mathTower.game.width*H.D.RENDERER_OFFSET_PERCENTAGE;return new rt.Point(k*U+F,H.D.TOWER_BASE_Y-H.D.FLOOR_HEIGHT*B)}getCameraPosition(){return new W.I9Y(this._map.pageCamera.x,this._map.pageCamera.y)}isSkillMastered(k){const B=this._mathTower.education.getSkillById(k);return ht.g.isSkillMastered(B)}isSkillLocked(k){const B=this._mathTower.education.getSkillById(k);return ht.g.isSkillLocked(B)}get map(){return this._map}}var dt,lt=U(90736),ut=U(34603),ft=U(29834),bt=U(28402),pt=U(76945),vt=U(96417),gt=U(51365);!function(k){k.IDLE="idle",k.WALK="walk",k.SLEEP="sleep"}(dt||(dt={}));class mt extends W.uAl{constructor(){super(...arguments),this.researchScore=1}get activeTween(){return this._activeTween}set activeTween(k){this._activeTween&&this._activeTween.onDestroy.removeAll(this),this._activeTween=k,this._activeTween.onDestroy.add(this.onActiveTweenDestroyed,this)}set floatling(k){this._floatling!==k&&(this._floatling=k,this._floatling.onUpdate.add(this.updateFloatlingState,this),this.spine.setAsset(k.spineID,(()=>{this.animator.create(),this.walkTarget=null,this._researchPoint.setAsset(H.D.ATLAS_RESEARCH_POINTS,k.researchPointID),this._elementType=H.D.ELEMENT_STRINGS.indexOf(k.element),this.researchScore=k.explorerLevel+1,this.updateFloatlingState(new gt.L(k,lt.L.FLOATLING_SET_STATE)),this.onFloatingAssetLoaded.dispatch()})))}get floatling(){return this._floatling}get spine(){return this._spine}get elementType(){return this._elementType}get walkTarget(){return this._walkTarget}set walkTarget(k){this._walkTarget=k,k?(this.playAnimation(dt.WALK),k.x>this.GameObject.legacyTransform.x?this.GameObject.legacyTransform.group.scale.set(1,1):this.GameObject.legacyTransform.group.scale.set(-1,1)):this.playAnimation(dt.IDLE)}get waitingToDescend(){return this._waitingToDescend}set waitingToDescend(k){this._waitingToDescend=k}playAnimation(k,B=!0){this.animator.playAnimation(k,B)}create(){super.create(),this._game=F.q.instance.game;const k=new W._mx(this.GameObject);k.addComponent(W.K16),this._spine=k.addComponent(bt.v),this.animator=this.spine.GameObject.addComponent(ft.j);const B=new W._mx(this.GameObject);B.addComponent(W.K16),this._researchPoint=B.addComponent(ut._),this._researchPoint.GameObject.legacyTransform.y=30,this._researchPoint.setAnchor(.5,1),this._researchPoint.GameObject.active=!1,this._waitingToDescend=!1,this.onFloatingAssetLoaded=new W.HN0}destroy(){this.onFloatingAssetLoaded.dispose(),super.destroy()}onDisable(){super.onDisable(),window.clearTimeout(this._floatDownTimerHandle),this.activeTween&&this.activeTween.stop(!1),this._game.time.events.remove(this._walkTargetTimerEvent),this._walkTargetTimerEvent=null,this._wanderBounds=null,this._floatling&&this._floatling.onUpdate.removeAll(this)}set researchPointVisible(k){this._researchPoint.GameObject.active=k}get researchPointVisible(){return this._researchPoint.GameObject.active}startWandering(k,B=!0){this._wanderBounds=k,this.setRandomWalkTarget(),B&&this.GameObject.legacyTransform.group.position.copyFrom(this.walkTarget)}setRandomWalkTarget(){this._game.time.events.remove(this._walkTargetTimerEvent),this._walkTargetTimerEvent=null,W.Aq$.isDefined(this._wanderBounds)&&(this.walkTarget=new W.I9Y(pt.o.integerInRange(this._wanderBounds.x,this._wanderBounds.width+this._wanderBounds.x),pt.o.integerInRange(this._wanderBounds.y,this._wanderBounds.height+this._wanderBounds.y)))}update(){switch(super.update(),this.floatling.state){case vt.a.Wandering:this.updateWalk();break;case vt.a.Floating:this.updateFloat()}}updateFloat(){var k;this._activeTween&&(null===(k=this.GameObject)||void 0===k?void 0:k.legacyTransform)&&this.walkTarget&&(this.GameObject.legacyTransform.y+=H.D.FLOATLING_FLOAT_PIXELS_PER_SECOND*this._game.time.deltaMS*.001,this.GameObject.legacyTransform.y>this.walkTarget.y&&(this._activeTween.stop(!1),this._activeTween=null,this.floatling.state=vt.a.Wandering,this._onFinishFloatDown&&this._onFinishFloatDown(),this._onFinishFloatDown=null))}updateWalk(){if(W.Aq$.isDefined(this._walkTarget)){const k=new W.I9Y(this._walkTarget.x-this.GameObject.legacyTransform.group.position.x,this._walkTarget.y-this.GameObject.legacyTransform.group.position.y);let B=H.D.FLOATLING_WALK_PIXELS_PER_SECOND*this._game.time.deltaMS*.001;B>k.getMagnitude()?(this.GameObject.legacyTransform.group.position.copyFrom(this._walkTarget),this.walkTarget=null,this._walkTargetTimerEvent=this._game.time.events.addTimer(this.getWalkDelay(),this.setRandomWalkTarget,this)):(B=Math.min(B,k.getMagnitude()),k.normalize(),k.multiply(new W.I9Y(B,B)),this.GameObject.legacyTransform.group.position.set(this.GameObject.legacyTransform.group.position.x+k.x,this.GameObject.legacyTransform.group.position.y+k.y))}}getWalkDelay(){return pt.o.integerInRange(H.D.FLOATLING_WALK_MIN_IDLE_MS,H.D.FLOATLING_WALK_MAX_IDLE_MS)}floatDown(k,B,U){this.floatling.state=vt.a.Floating,this._onFinishFloatDown=U;let F=0;if(!B){this.GameObject.legacyTransform.x=this.GameObject.legacyTransform.x-H.D.FLOATLING_FLOAT_HALF_ARC_WIDTH,this.GameObject.legacyTransform.group.visible=!1;const k=Date.now();F=pt.o.realInRange(H.D.FLOATLING_FLOAT_MIN_DELAY_MS,H.D.FLOATLING_FLOAT_MAX_DELAY_MS),mt.lastFloatlingSendTime+H.D.FLOATLING_FLOAT_LAST_FLOATED_OFFSET_MS>k&&(F+=mt.lastFloatlingSendTime+H.D.FLOATLING_FLOAT_LAST_FLOATED_OFFSET_MS-k),mt.lastFloatlingSendTime=F+k}this._walkTarget=new W.I9Y(this.GameObject.legacyTransform.x,k),window.clearTimeout(this._floatDownTimerHandle),this._waitingToDescend=!0,this._floatDownTimerHandle=window.setTimeout(this.beginTweenSideToSide.bind(this,this.GameObject.legacyTransform.x+H.D.FLOATLING_FLOAT_HALF_ARC_WIDTH,B),F)}beginTweenSideToSide(k,B){this._activeTween&&this._activeTween.stop(),this.playAnimation(dt.IDLE),this.GameObject.legacyTransform.group.visible=!0,B||(this.GameObject.legacyTransform.y=W.i7d.main.viewMatrix.ty+pt.o.realInRange(H.D.FLOATLING_FLOAT_MIN_START_Y_OFFSET,H.D.FLOATLING_FLOAT_MAX_START_Y_OFFSET)),this._waitingToDescend=!1,this._activeTween=this._game.add.tween(this.GameObject.legacyTransform,this).to({x:k},1e3,W.GS3.Quadratic.InOut).yoyo(!0).loop(!0).start()}updateFloatlingState(k){if(k.getFinalNotification().type===lt.L.FLOATLING_SET_STATE)switch(k.getFinalNotification().source.state){case vt.a.ScaredAway:this.playAnimation(dt.IDLE),this._game.add.tween(this.GameObject.legacyTransform.group,this).to({y:W.i7d.main.viewMatrix.ty-W.i7d.main.viewportSize.height+100,alpha:0},H.D.FLOATLING_FLY_AWAY_MS,W.GS3.Quadratic.In,!0).onTweenComplete.add((()=>{this.GameObject.active=!1}));break;case vt.a.Asleep:this.playAnimation(dt.SLEEP)}}onActiveTweenDestroyed(){this._activeTween=null}}mt.lastFloatlingSendTime=0;var yt=U(20748),_t=U(39666),Et=U(25735);class wt{init(k){this._owner=k,this._mathTower=k.mathTower}onEnter(){}onExit(){}onUpdate(){}switchState(k,B={}){this._owner.changeToState(k,B)}}class Tt extends wt{constructor(){super(...arguments),this._defaultReturnState=H.D.STATE_CAMERA,this._activeFloor=null,this._floorPosition=null}onEnter(){this._activeFloor=this._owner.switchParams.quickRenoFloor,W.Aq$.isDefined(this._activeFloor)||(this._activeFloor=this._mathTower.activeFloor),this._buildInterface=this.getBuildInterface(),this._quitButtonObject=this._owner.prefabLoader.loadFromGUID(H.D.UI_CORNER_PREFAB,F.q.instance.prodigy.open.menusGameObject),this._quitButton=this._quitButtonObject.findComponent(Et.I).quitButton,this._buildInterface.onCreate.add(this.prefabCreated.bind(this)),this._buildInterface.floorFinishedSignal.add(this.floorFinished.bind(this)),this._buildInterface.wrongAnswerSignal.add(this.wrongAnswer.bind(this)),this._buildInterface.onBuildAnimationComplete.add(this.buildAnimationFinished.bind(this)),this._floorPosition=this._activeFloor.isRenovating?this._owner.switchParams.position:this._owner.nextFloorPosition();const k=new W.I9Y;k.x=this._floorPosition.x-W.i7d.main.viewMatrix.tx,k.y=this._floorPosition.y-W.i7d.main.viewMatrix.ty+60,this._flagpoleSpine=F.q.instance.prodigy.create.spine(k.x,k.y,H.D.SPINE_FLAGPOLE,this._mathTower.uiFactory.screen.foreground),this._flagpoleSpine.visible=!1,this.spawnScrim()}spawnScrim(){const k=this._mathTower.currentTown.getIndexesOfFloor(this._activeFloor);this._mathTower.uiFactory.spawnScrim(k.towerIndex,k.floorIndex)}getBuildInterface(){if(!this._activeFloor.isRenovating)return this._floorPosition=this._owner.nextFloorPosition(),this._owner.mathTower.uiFactory.buildInterface(this._floorPosition);this._floorPosition=this._owner.switchParams.position;const k=this._activeFloor;return this._owner.mathTower.uiFactory.buildInterface(this._floorPosition,k)}onExit(){this._buildInterface.close(),this._quitButton.onClick.removeAll(),this._quitButtonObject.destroy(),this._mathTower.uiFactory.despawnScrim()}prefabCreated(){this._quitButton.onClick.add(this.quitButtonClicked.bind(this)),this._buildInterface.buildButton.onClick.add(this.buildButtonClicked.bind(this)),this._activeFloor.hasMaxBlocks?this.floorFinished():this.buildButtonClicked()}quitButtonClicked(){if(F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._activeFloor.isRenovating){const k=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this._activeFloor.decorations.flush().forEach((B=>{k.backpack.add(H.D.ASSET_TYPE_DECORATION,B.assetID)})),this._activeFloor.setReadyForRenovation()}this.switchState(this._defaultReturnState)}buildButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._quitButton.inputEnabled=!1,this._buildInterface.buildFloor()}buildAnimationFinished(){this._quitButton.inputEnabled=!0}wrongAnswer(){if(this._quitButton.inputEnabled=!0,this._owner.isSkillLocked(this._activeFloor.skillID)){this._activeFloor.state=_t.u.SkillLocked;const k=this._mathTower.currentTown.towers.length-1,B=this._mathTower.currentTown.towers[k].floors.length-1;this.switchState(H.D.STATE_SHROUD,{towerIndex:k,floorIndex:B})}}floorFinished(){let k=H.D.STATE_CAMERA;const B=this._mathTower.education.getSkillById(this._activeFloor.skillID);!B||ht.g.isSkillMastered(B)||this._activeFloor.isRenovating?(this.completeFloor(),this._flagpoleSpine.visible=!0,this._flagpoleSpine.addAnimationByName(0,H.D.FLAG_SMOKE_ANIMATION,!1),this._mathTower.uiFactory.tooltip(this._owner.localizer.getText(H.D.TOOLTIP_FLOOR_FINISHED),!0,H.D.FLOOR_FINISHED_TOOLTIP_WIDTH)):(this._activeFloor.state=_t.u.RooftopMastery,k=H.D.STATE_ROOFTOP);const U=this._mathTower.currentTown.towers.length-1,F=this._mathTower.currentTown.towers[U].floors.length-1;this._mathTower.fireEvent(lt.L.TOWER_ROOM_BUILT),this.switchState(k,{towerIndex:U,floorIndex:F})}completeFloor(){F.q.instance.prodigy.audio.playSFX(H.D.TOWER_TOWN_SFX_ID,H.D.COMPLETE_FLOOR),this._activeFloor.setComplete()}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],Tt.prototype,"quitButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],Tt.prototype,"buildButtonClicked",null);var St,At=U(15521),Ct=U(51972),Ot=U(59510);class It extends W.JTX{get x(){return this._x}set x(k){this._x=this.bounds?Math.max(this.bounds.left,Math.min(this.bounds.right-this.cameraWidth,k)):k,this._fakeCamera.viewMatrix.tx=this._x,this._fakeCamera.GameObject.transform.worldPosition.x=this._x,this._fakeCamera.GameObject.transform.onWorldMatrixChanged.dispatch(),this.gameObject.legacyTransform.x=-this._x}get y(){return this._y}set y(k){this._y=this.bounds?Math.max(this.bounds.top,Math.min(this.bounds.bottom-this.cameraHeight,k)):k,this._fakeCamera.viewMatrix.ty=this._y,this._fakeCamera.GameObject.transform.worldPosition.y=this._y,this._fakeCamera.GameObject.transform.onWorldMatrixChanged.dispatch(),this.gameObject.legacyTransform.y=-this._y}get bounds(){return this._bounds}set bounds(k){k?(this._bounds=W.M_G.clone(k),this.updateBounds()):this._bounds=k}get cameraWidth(){return this._game.width}get cameraHeight(){return this._game.height}constructor(){super(),this._x=0,this._y=0,this._bounds=new W.M_G(0,0,0,0),this._game=F.q.instance.game}create(){super.create(),this._fakeCamera={viewMatrix:{ty:this.y,tx:this.x,isTranslateOnly:()=>!0},viewportSize:{height:this.cameraHeight,width:this.cameraWidth,getHalfWidth:()=>this.cameraWidth/2,getHalfHeight:()=>this.cameraHeight/2},GameObject:{transform:{worldPosition:{x:this.x,y:this.y},onWorldMatrixChanged:new W.HN0}},setCameraActive:()=>{}},W.i7d._main=this._fakeCamera,this._initialBounds=new W.M_G(0,0,this.cameraWidth,this.cameraHeight),this.bounds=W.M_G.clone(this._initialBounds)}destroy(){W.i7d._main=null,this.gameObject&&(this.gameObject.legacyTransform.x=0,this.gameObject.legacyTransform.y=0),super.destroy()}updateBounds(){this.x=this._x,this.y=this._y}}!function(k){k[k.UP=0]="UP",k[k.DOWN=1]="DOWN",k[k.LEFT=2]="LEFT",k[k.RIGHT=3]="RIGHT"}(St||(St={}));class Dt extends It{clearQueues(){this._verticalQueue=null,this._horizontalQueue=null}get CanMoveUp(){return this._canMoveUp}get CanMoveDown(){return this._canMoveDown}get CanMoveLeft(){return this._canMoveLeft}get CanMoveRight(){return this._canMoveRight}get onAtEdgeChanged(){return this._onAtEdgeChanged}get onBlockedMoveAttempt(){return this._onBlockedMoveAttempt}get onBeginHorizontalTween(){return this._onBeginHorizontalTween}get onBeginVerticalTween(){return this._onBeginVerticalTween}get onUpdateHorizontalTween(){return this._onUpdateHorizontalTween}get onUpdateVerticalTween(){return this._onUpdateVerticalTween}get onEndHorizontalTween(){return this._onEndHorizontalTween}get onEndVerticalTween(){return this._onEndVerticalTween}constructor(){super(),this._cameraTransitionTimeMS=300,this.transitionEase=W.GS3.Exponential.Out,this._onFullScrollComplete=new W.HN0,this._fullScrollH=!1,this._fullScrollV=!1,this._canMoveUp=!0,this._canMoveDown=!0,this._canMoveLeft=!0,this._canMoveRight=!0,this._onAtEdgeChanged=new W.HN0,this._onBlockedMoveAttempt=new W.HN0,this._onBeginHorizontalTween=new W.HN0,this._onBeginVerticalTween=new W.HN0,this._onUpdateHorizontalTween=new W.HN0,this._onUpdateVerticalTween=new W.HN0,this._onEndHorizontalTween=new W.HN0,this._onEndVerticalTween=new W.HN0,this.transitionDistance={x:F.q.instance.game.width,y:F.q.instance.game.height},this._signalBindings=[],this._canMoveLeft=!0,this._broadcaster=this._game.broadcaster}onEnable(){super.onEnable();for(let k=0;k{this.scrollUp(k)}:this.CanMoveUp?(this.scrollVertical(this.y-this.transitionDistance.y,0,k),this._broadcaster.broadcast(H.D.MESSAGE_DISABLE_BUTTON)):this.blockedMoveAttempt(St.UP)}scrollDown(k=!1){W.Aq$.isDefined(this._verticalTween)&&this._verticalTween.isRunning?this._verticalQueue=()=>{this.scrollDown(k)}:this.CanMoveDown?(this.scrollVertical(this.y+this.transitionDistance.y,0,k),this._broadcaster.broadcast(H.D.MESSAGE_DISABLE_BUTTON)):this.blockedMoveAttempt(St.DOWN)}scrollLeft(k=!1){W.Aq$.isDefined(this._horizontalTween)&&this._horizontalTween.isRunning?this._horizontalQueue=()=>{this.scrollLeft(k)}:this.CanMoveLeft?(this.scrollHorizontal(this.x-this.transitionDistance.x,k),this._broadcaster.broadcast(H.D.MESSAGE_DISABLE_BUTTON)):this.blockedMoveAttempt(St.LEFT)}scrollRight(k=!1){W.Aq$.isDefined(this._horizontalTween)&&this._horizontalTween.isRunning?this._horizontalQueue=()=>{this.scrollRight(k)}:this.CanMoveRight?(this.scrollHorizontal(this.x+this.transitionDistance.x,k),this._broadcaster.broadcast(H.D.MESSAGE_DISABLE_BUTTON)):this.blockedMoveAttempt(St.RIGHT)}scrollVertical(k,B=0,U=!1){if(!this.Active)return void this.cleanup();const F=Math.min(this.bounds.bottom,Math.max(this.bounds.top,k));this.checkVerticalLimits(F),this._verticalTween=this._game.add.tween(this,this).to({y:F},this._cameraTransitionTimeMS,this.transitionEase,!0,B),this._verticalTween.onTweenComplete.add(this.onCompleteVertical.bind(this)),this.onBeginVerticalTween.dispatch(F,U),this._verticalTween.onUpdate.add(this.onUpdateVerticalTween.dispatch,this.onUpdateVerticalTween)}scrollHorizontal(k,B=!1){if(!this.Active)return void this.cleanup();const U=Math.min(this.bounds.right-this.cameraWidth,Math.max(this.bounds.left,k));this.checkHorizontalLimits(U),this._horizontalTween=this._game.add.tween(this,this).to({x:U},this._cameraTransitionTimeMS,this.transitionEase,!0),this._horizontalTween.onTweenComplete.add(this.onCompleteHorizontal.bind(this)),this.onBeginHorizontalTween.dispatch(U,B),this._horizontalTween.onUpdate.add(this.onUpdateHorizontalTween.dispatch,this.onUpdateHorizontalTween)}scrollToPosition(k,B){this._fullScrollH=!1,this._fullScrollV=!1,this.scrollHorizontal(k),this.scrollVertical(B)}get onFullScrollCompleted(){return this._onFullScrollComplete}onCompleteVertical(){this._verticalTween=null,this.onEndVerticalTween.dispatch(),this._fullScrollV=!0,this._fullScrollH&&(this._onFullScrollComplete.dispatch(),this._fullScrollH=!1,this._fullScrollV=!1),this.checkVerticalLimits(this.y),this._verticalQueue&&(this._verticalQueue(),this._verticalQueue=null),this._broadcaster.broadcast(H.D.MESSAGE_ENABLE_BUTTON)}onCompleteHorizontal(){if(this._horizontalTween=null,this.onEndHorizontalTween.dispatch(),this._fullScrollH=!0,this._fullScrollV&&(this._onFullScrollComplete.dispatch(),this._fullScrollH=!1,this._fullScrollV=!1),this.checkHorizontalLimits(this.x),this._horizontalQueue)return this._horizontalQueue(),void(this._horizontalQueue=null);this._broadcaster.broadcast(H.D.MESSAGE_ENABLE_BUTTON)}blockedMoveAttempt(k){this.cleanup(),this.onBlockedMoveAttempt.dispatch(k)}cleanup(){this._broadcaster.broadcast(H.D.MESSAGE_ENABLE_BUTTON)}setTransitionDistanceScreenRatio(k,B){this.transitionDistance.x=this._game.width*k,this.transitionDistance.y=this._game.height*B}updateBounds(){super.updateBounds(),this.checkVerticalLimits(this.y),this.checkHorizontalLimits(this.x)}checkVerticalLimits(k=0){if(!this.bounds)return;const B=k>this.bounds.top&&this.cameraHeightthis.bounds.left&&this.cameraWidth0;this.shouldAddNewFloor()?this._shouldHaveShroud||this._shouldHaveShadow||!k||this.spawnAddFloorPrefab():this.spawnInProgressFloorPrefab();const B=this._owner.map.breadCrumbManager;if(this._shouldHaveShroud)this.spawnShroudCloud();else if(this._shouldHaveShadow){if(!B.isBreadcrumbComplete(Ot.M.StubbornShadowTutorialOneCompleted)){const k=this._mathTower.currentTown.towers.length-1,B=this._mathTower.currentTown.towers[k].floors.length-1;return void this.switchState(H.D.STATE_ROOFTOP,{towerIndex:k,floorIndex:B})}B.isBreadcrumbComplete(Ot.M.StubbornShadowTutorialTwoCompleted)||B.completeBreadcrumb(Ot.M.StubbornShadowTutorialTwoCompleted),this.spawnStubbornShadow()}this.bringHUDToTop(),this._hudInterface.forceEnabledLeft=!0,this._pageCamera.onBlockedMoveAttempt.add(this.onBlockedMoveAttempt,this),this._owner.switchParams.shroudComplete&&!B.isBreadcrumbComplete(Ot.M.ShroudTutorialCompleted)&&(B.completeBreadcrumb(Ot.M.ShroudTutorialCompleted),this._owner.dialogueController.addEvents([{callback:()=>{this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_DISABLE_NAVIGATION)}},{dialogueData:this._owner.dialogueController.dataProvider.get(H.D.DIALOGUE_SHROUD_FTUE_4),blockInput:!0},{callback:()=>{this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_ENABLE_NAVIGATION)}}]),this._owner.dialogueController.start(!0)),this._owner.moveToNextFloor(this._shouldHaveShadow),this._owner.map.townRenderer.onFloorClicked.add(this.onFloorClicked.bind(this)),this.setupHorizontalTween(),this._pageCamera.onBeginVerticalTween.add((()=>{this._addFloorTooltip&&this._addFloorTooltip.close()}),this),Pt.firstTimeInState&&this._mathTower.shouldUseInfinityTowerMode()&&this._owner.map.showInfinityTowerDialog(),Pt.firstTimeInState=!1;const U=this._owner.mathTower.hasAvailableFloatlings()?H.D.MESSAGE_ENABLE_FLING_BUTTON:H.D.MESSAGE_DISABLE_FLING_BUTTON;this._mathTower.game.broadcaster.broadcast(U)}shouldAddNewFloor(){return!this._activeFloor||!this._activeSkill||this._activeFloor.isExternalBuild||this._activeFloor.hasMaxBlocks}closeAllInterfaces(){this._buildInterface&&(this._buildInterface.close(),this._buildInterface=null),this._shroudInterface&&(this._shroudInterface.close(),this._shroudInterface=null),this._rooftopInterface&&(this._rooftopInterface.close(),this._rooftopInterface=null),this._moveFloorInterface&&(this._moveFloorInterface.close(),this._moveFloorInterface=null),this._addFloorTooltip&&this._addFloorTooltip.close()}onExit(){this._owner.switchParams.keepHud||this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_DISABLE_NAVIGATION),W.Aq$.isDefined(this._addFloor)&&this._addFloor.GameObject&&(this._addFloor.addFloorButton.onClick.removeAll(),this._addFloor.GameObject.destroy(),this._addFloor=null),this.closeAllInterfaces(),this._owner.map.townRenderer.onFloorClicked.removeAll(),this._pageCamera.onBeginVerticalTween.removeAll(this),this._pageCamera.onBeginHorizontalTween.removeAll(this),this._pageCamera.onBlockedMoveAttempt.removeAll(this),this._hudInterface.forceEnabledLeft=!1}spawnAddFloorPrefab(){const k=this._owner.prefabLoader.loadFromGUID(H.D.UI_ADD_FLOOR_PREFAB,this._owner.map.screen.backgroundGameObject);At.Z.bringToTop(this._owner.map.screen.user),this._addFloor=k.findComponent(Rt.R),k.legacyTransform.group.position=this._owner.nextFloorPosition(),this._owner.nextTowerAvailable()||this._addFloor.removeNewTowerButton(),this._addFloor.addFloorButton.onClick.add(this.onAddFloorButtonClicked.bind(this)),this._mathTower.currentTown.towers[this._mathTower.currentTown.towers.length-1].floors.length===ot.o.MAXIMUM_FLOOR_COUNT?this.onNewTowerButtonClicked():this._addFloor.newTowerButton.onClick.add(this.onNewTowerButtonClicked.bind(this))}spawnInProgressFloorPrefab(){const k=this._owner.getFloorPosition(this._activeFloorIndex.x,this._activeFloorIndex.y+1),B=this._mathTower.activeFloor;this._buildInterface=this._mathTower.uiFactory.buildInterface(k),this._buildInterface.onCreate.add(this.inProgressPrefabCreated.bind(this)),B.hasShroud&&this._buildInterface.onCreate.add(this.setBuildButtonVisible.bind(this,!1)),this._owner.moveToNextFloor()}spawnShroudCloud(){this._shroudInterface=this._mathTower.uiFactory.shroudLockInterface(),this._shroudInterface.onCreate.add(this.onShroudInterfaceCreated.bind(this))}spawnStubbornShadow(){const k=this._mathTower.currentTown.towers[this._troubledFloorIndex.x].floors[this._troubledFloorIndex.y];this._rooftopInterface=this._mathTower.uiFactory.rooftopMasteryInterface(k),this._rooftopInterface.onCreate.add(this.onRooftopInterfaceCreated.bind(this))}inProgressPrefabCreated(){this._buildInterface.buildButton.onClick.add((()=>{this._mathTower.isClickable&&(this._mathTower.shouldUseInfinityTowerMode()?this.showButtonTooltip(this._buildInterface.buildButton):(this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_DISABLE_NAVIGATION),this.switchState(H.D.STATE_BUILD,{keepHud:!0})))}),this),W.Aq$.isDefined(this._shroudInterface)&&W.Aq$.isDefined(this._shroudInterface.gameObject)&&(this._shroudInterface.bringToTop(),this.bringHUDToTop())}onAddFloorButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._mathTower.isClickable&&(this._mathTower.shouldUseInfinityTowerMode()?this.showButtonTooltip(this._addFloor.addFloorButton):(this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_DISABLE_NAVIGATION,{keepHud:!0}),this._pageCamera.onBeginHorizontalTween.removeAll(this),this._pageCamera.onBeginHorizontalTween.addOnce((()=>{this.setupHorizontalTween()}),this),this._owner.moveToNextFloor(),this._pageCamera.onFullScrollCompleted.add(this.cameraFinishedScrolling.bind(this))))}showButtonTooltip(k){const B=this._mathTower.uiFactory.localizer.getText(H.D.TT_FINISH_TOWER_ON_ADD);this._addFloorTooltip=this._mathTower.uiFactory.buttonTooltip(this._addFloorTooltip,B,k,Ct.i.DOWN,this.changeState.bind(this,H.D.STATE_INFINITY,{enteringInfinity:!0}))}cameraFinishedScrolling(){this._pageCamera.onFullScrollCompleted.removeAll(),this._pageCamera.clearQueues(),this.switchState(H.D.STATE_CHOOSE_FLOOR)}onBlockedMoveAttempt(k){k===St.LEFT&&this._owner.map.showInfinityTowerDialog(!0)}onNewTowerButtonClicked(){this._mathTower.isClickable&&(this.closeAllInterfaces(),F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._mathTower.activeTower.isActiveTower=!1,this._mathTower.fireEvent(lt.L.TOWER_COMPLETED),this._addFloor.GameObject.active=!1,this._owner.map.townRenderer.towerRenderers[this._mathTower.currentTown.towers.length-1].onLuminTreeSpawned.add(this.switchState.bind(this,H.D.STATE_CAMERA)),this._mathTower.currentTown.createTower())}bringHUDToTop(){this._hudInterface.parent.setChildIndex(this._hudInterface,this._hudInterface.parent.children.length-1),this._mathTower.uiFactory.hud.bringToTop()}onShroudInterfaceCreated(){const k=this._owner.getFloorPosition(this._troubledFloorIndex.x,this._troubledFloorIndex.y+1);this._shroudInterface.setCleanButtonPosition(new rt.Point(k.x-H.D.BUTTON_OFFSET_X,k.y+H.D.BUTTON_OFFSET_Y)),this._shroudInterface.onCloudAppear.add(this.bringHUDToTop.bind(this)),this._shroudInterface.makeCloudAppear(k.x,k.y+H.D.SHROUD_OFFSET_Y,!0),this._shroudInterface.hideUI(),this._shroudInterface.cleanButton.onClick.add(this.cleanButtonClicked.bind(this)),this._owner.moveToNextFloor()}onRooftopInterfaceCreated(){this._rooftopInterface.toggleStaticUIVisibility(!1),this._rooftopInterface.attackButton.GameObject.active=!1;const k=this._owner.nextFloorPosition(!0);this._rooftopInterface.spawnStubbornShadow(k.x,k.y+H.D.STUBBORN_SHADOW_OFFSET_Y),this._rooftopInterface.battleButton.GameObject.legacyTransform.group.position.x=k.x,this._rooftopInterface.battleButton.GameObject.legacyTransform.group.position.y=k.y+H.D.BUTTON_OFFSET_Y,this._rooftopInterface.battleButton.onClick.add(this.battleButtonClicked.bind(this))}setBuildButtonVisible(k){this._buildInterface.buildButton.GameObject.active=k}cleanButtonClicked(){this._mathTower.isClickable&&(this._mathTower.shouldUseInfinityTowerMode()?this.showButtonTooltip(this._shroudInterface.cleanButton):this.switchState(H.D.STATE_SHROUD,{questionOnEnter:!0,towerIndex:this._troubledFloorIndex.x,floorIndex:this._troubledFloorIndex.y}))}battleButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._mathTower.isClickable&&(this._mathTower.shouldUseInfinityTowerMode()?this.showButtonTooltip(this._rooftopInterface.battleButton):this.switchState(H.D.STATE_ROOFTOP,{resumeBattle:!0,towerIndex:this._troubledFloorIndex.x,floorIndex:this._troubledFloorIndex.y}))}onFloorClicked(k,B){if(!this._mathTower.isClickable)return;F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK);const U=this._mathTower.currentTown;if(U.towers[k].floors[B].isExternalBuild)return void(this._owner.currentState!==this._owner.states.get(H.D.STATE_QUICK_RENO)&&(this._owner.map.townRenderer.towerRenderers[k].floors[B].onQuickRenoClicked(),this._owner.map.townRenderer.moveToFloor(k,B+1),this._pageCamera.clearQueues(),this.switchState(H.D.STATE_QUICK_RENO,{towerIndex:k,floorIndex:B})));const G=U.towers.length,j=U.towers[k],$=k-1>=0?U.towers[k-1]:null,V=k+1{F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._moveFloorInterface.warningObject.active=!1,this._moveFloorInterface.arrowObject.active=!1}))}setupHorizontalTween(){this._pageCamera.onBeginHorizontalTween.add((()=>{this._addFloorTooltip&&this._addFloorTooltip.close()}),this)}changeState(k,B={}){this._owner.changeToState(k,B)}}Pt.firstTimeInState=!0,(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],Pt.prototype,"onAddFloorButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],Pt.prototype,"onNewTowerButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],Pt.prototype,"cleanButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],Pt.prototype,"battleButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[Number,Number]),(0,et.Sn)("design:returntype",void 0)],Pt.prototype,"onFloorClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[String,Object]),(0,et.Sn)("design:returntype",void 0)],Pt.prototype,"changeState",null);var Mt=U(642),Nt=U(2272);class xt extends wt{constructor(){super(...arguments),this._returnState=H.D.STATE_CAMERA,this._buildState=H.D.STATE_BUILD}onEnter(){const k=this._owner.nextFloorPosition();this._chooseFloor=this._mathTower.uiFactory.chooseFloorLook(k),this._chooseFloor.onCreate.add(this.onChooseFloorInterfaceCreated.bind(this)),this._chooseFloor.selectionChanged.add(this.selectionChanged.bind(this)),this._towerIndex=this._mathTower.currentTown.towers.length-1,this._floorIndex=this._mathTower.currentTown.towers[this._towerIndex].floors.length}onExit(){this._chooseFloor.close(),this._mathTower.uiFactory.despawnScrim()}onChooseFloorInterfaceCreated(){this.bindButtons(),this.setupTempFloor();const k=this.getFloorPosition();this._chooseFloor.startBuildingButton.GameObject.legacyTransform.group.position.set(k.x-H.D.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_X,k.y+H.D.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_Y),this.spawnScrim()}spawnScrim(){this._mathTower.uiFactory.spawnScrim(this._towerIndex,this._floorIndex)}getFloorPosition(){return this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1)}bindButtons(){this._chooseFloor.quitButton.onClick.add(this.quitPopup.bind(this)),this._chooseFloor.startBuildingButton.onClick.add(this.onStartBuildingClicked.bind(this))}setupTempFloor(){const k=this.getActiveTower();this._tempFloor=k.createFloor(this._mathTower.currentSkillID),this._tempFloor.blockCount=H.D.MAX_SMART_BLOCKS,this._tempFloor.roomID=1,this._tempFloor.frameID=2}getActiveTower(){let k=this._mathTower.activeTower;return(!W.Aq$.isDefined(k)||k.floors.length>=ot.o.MAXIMUM_FLOOR_COUNT)&&(k=this._mathTower.currentTown.createTower()),k}quitPopup(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),F.q.instance.prodigy.open.confirmationDialog(new Mt.k(this._owner.localizer.getText(H.D.POPUP_CHOOSE_FLOOR_QUIT_BUTTON),this.onQuitClicked.bind(this),this._owner.localizer.getText(H.D.POPUP_CHOOSE_FLOOR_STAY_BUTTON),void 0,{atlas:H.D.ATLAS_STORE,name:"icon-large-exclamation"},Nt.E.Small,void 0,this._owner.localizer.getText(H.D.POPUP_CHOOSE_FLOOR_QUIT_TITLE),this._owner.localizer.getText(H.D.POPUP_CHOOSE_FLOOR_QUIT_BODY)))}onQuitClicked(){this._mathTower.activeTower.removeFromTop(),this.switchState(this._returnState)}onStartBuildingClicked(){this._tempFloor.blockCount=ht.g.determineNewBlockCount(this._mathTower.education.getSkillById(this._tempFloor.skillID),this._tempFloor),this._mathTower.fireEvent(lt.L.FLOOR_START_BUILDING),this._mathTower.activeFloor.state=_t.u.UnderConstruction,this.switchState(this._buildState)}selectionChanged(k){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._tempFloor.roomID=W.Aq$.isDefined(k.roomID)?k.roomID:1,this._tempFloor.frameID=W.Aq$.isDefined(k.frameID)?k.frameID:2,this._tempFloor.decorations.clear(),k.decorations&&k.decorations.forEach(((k,B)=>{this._tempFloor.decorations.setAt(B,k)}))}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],xt.prototype,"quitPopup",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],xt.prototype,"onQuitClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],xt.prototype,"onStartBuildingClicked",null);var Lt=U(75329),kt=U(65240),Bt=U(49237),Ut=U(8182),Ft=U(48199),Gt=U(43531),jt=U(23748);class $t extends W.uAl{constructor(){super(...arguments),this._objects=[],this._deltaX=0,this._deltaY=0}get objects(){return this._objects}get deltaX(){return this._deltaX}set deltaX(k){this._deltaX=k;for(let B=0;BH.D.ELEMENT_STRINGS.map((U=>`${k}${U}${B}`)))("bucket-")),this.targets.setAnchor(.5,1),this.targets.deltaX=170,this.shimmerSpines=[];for(let B=0;B{k.setAnimationByName(0,`idle-${H.D.ELEMENT_STRINGS[B]}`,!0)}))}isInTarget(k,B){const U=H.D.ELEMENT_STRINGS.indexOf(B);if(U>-1){const B=this.targets.objects[U].legacyTransform.x+this.GameObject.legacyTransform.x-this._targetHalfWidth,F=this.targets.objects[U].legacyTransform.x+this.GameObject.legacyTransform.x+this._targetHalfWidth;if(k>B&&k{k.GameObject.active=!1})),this._floatlingRenderers=[],this._floatling&&(this._floatling.GameObject.active=!1,this._floatling=null),this.canFire=!1}enableInput(){this._game.input.onDown.removeAll(this),this._game.input.onUp.removeAll(this),this._game.input.onDown.add(this.onMouseDown,this),this._game.input.onUp.add(this.onMouseUp,this),this._mouseDownWhileCanFire=!1}disableInput(){this._game.input.onDown.removeAll(this),this._game.input.onUp.removeAll(this),this.onMouseUp(),this._startMousePosition=null}spawnFloatlings(k){this._floatlingRenderers=[],this._floatlings=k;const B=Math.min(k.length,H.D.FLING_MAX_COUNT_DISPLAYED);for(let F=0;F{k.playAnimation(dt.IDLE)})),this._floatlingRenderers.push(k)}readyNextFloatling(){if(0===this._floatlingRenderers.length)return;const k=this._floatlingRenderers[0];k.activeTween&&k.activeTween.isRunning?k.activeTween.onTweenComplete.add(this.readyNextFloatling,this):this.setFloatling(this._floatlingRenderers.shift())}setFloatling(k){this._floatling=k;const B=this.GameObject.legacyTransform.group.children.length-1;this.GameObject.legacyTransform.group.setChildIndex(this._floatling.GameObject.legacyTransform.group,B),this.GameObject.legacyTransform.group.setChildIndex(this._frontElasticImage.GameObject.legacyTransform.group,B),this.GameObject.legacyTransform.group.setChildIndex(this._foregroundImage.GameObject.legacyTransform.group,B),this._game.add.tween(this._floatling.GameObject.legacyTransform.group,this).to({x:0},500,W.GS3.Linear.None,!0);const U=this._game.add.tween(this._floatling.GameObject.legacyTransform.group,this).to({y:-100},250,W.GS3.Quadratic.Out,!1),F=this._game.add.tween(this._floatling.GameObject.legacyTransform.group,this).to({y:0},250,W.GS3.Quadratic.In,!1);F.onTweenComplete.add((()=>{this.canFire=!0,this.targets.highlightTarget(k.elementType),this._floatlingTweeningToSling=!1})),U.chain(F),U.start(),this._floatlingTweeningToSling=!0,this._floatlings.length>0&&this.spawnFloatling();for(let G=0;G{k.playAnimation(dt.WALK)})),k.activeTween.onTweenComplete.add((()=>{k.playAnimation(dt.IDLE)})),k.activeTween.start()}}fireFloatling(){this._floatling.spine.setSlotVisibility("shadow",!1),this._startMousePosition=null,this._firingTime=0,this.canFire=!1,this.hidePips(),this._game.add.tween(this._slingImage.GameObject.legacyTransform.group,this).to({rotation:0,x:0,y:0},400,W.GS3.Elastic.Out,!0),this._slingTarget={x:0,y:0},F.q.instance.prodigy.audio.playSFX(H.D.FLOATLING_FLING_SFX_ID,H.D.LAUNCH_FLOATLING)}onMouseDown(){this.canFire&&(this._mouseDownWhileCanFire=!0,this._game.input.activePointer.justPressed&&(this._startMousePosition={x:this._game.input.activePointer.position.x,y:this._game.input.activePointer.position.y}))}onMouseUp(){if(this.canFire&&this._mouseDownWhileCanFire)return this._mouseDistance{this._pips[B].setAlpha(0)}),B*k)}normalizePosition(){this._mousePosition.x=Math.min(this._mousePosition.x,this._startMousePosition.x),this._mousePosition.y=Math.max(this._mousePosition.y,this._startMousePosition.y)}elasticTransform(k){let B=Math.sqrt(this._slingImage.GameObject.legacyTransform.x*this._slingImage.GameObject.legacyTransform.x+this._slingImage.GameObject.legacyTransform.y*this._slingImage.GameObject.legacyTransform.y);B/=61;const U=Math.atan2(this._slingImage.GameObject.legacyTransform.y,this._slingImage.GameObject.legacyTransform.x);this._elasticMatrix.a=B*Math.cos(U),this._elasticMatrix.b=B*Math.sin(U),this._elasticMatrix.c=Math.sin(0),this._elasticMatrix.d=Math.cos(0),this._elasticMatrix.tx=k.legacyTransform.group.x,this._elasticMatrix.ty=k.legacyTransform.group.y,k.legacyTransform.group.transform.setFromMatrix(this._elasticMatrix)}update(){if(super.update(),this.elasticTransform(this._backElasticImage.GameObject),this.elasticTransform(this._frontElasticImage.GameObject),this._firingTime>=0){this._firingTime+=F.q.instance.game.time.deltaMS/1e3;const k=this.getArcPosition(this._fireAngle,this._firePower,this._firingTime);return this._floatling.GameObject.legacyTransform.group.position.set(k.x,k.y),void(k.y>this.targets.getHeightAt(k.x)&&this.endShot())}if(this._slingImage.GameObject.legacyTransform.x=jt.z.clampedLerp(this._slingImage.GameObject.legacyTransform.x,this._slingTarget.x,.1),this._slingImage.GameObject.legacyTransform.y=jt.z.clampedLerp(this._slingImage.GameObject.legacyTransform.y,this._slingTarget.y,.1),this._floatling&&(this._floatlingTweeningToSling||(this._floatling.GameObject.legacyTransform.group.position.x=this._slingImage.GameObject.legacyTransform.x,this._floatling.GameObject.legacyTransform.group.position.y=this._slingImage.GameObject.legacyTransform.y)),!this._startMousePosition)return this._firePower=0,void(this._slingTarget={x:0,y:0});this._game.input.activePointer.isDown&&(this._mousePosition={x:this._game.input.activePointer.position.x,y:this._game.input.activePointer.position.y},this.normalizePosition());const k={x:this._mousePosition.x-this._startMousePosition.x,y:this._mousePosition.y-this._startMousePosition.y};if(this._fireAngle=this.calculateFireAngle(k),this._firePower=this.calculateFirePower(this._mousePosition,this._startMousePosition),this._mouseDistance0}destroy(){this._onLand.dispose(),super.destroy()}}var Wt=U(65826),qt=U(15016);class Kt extends W.uAl{create(){super.create(),this._game=F.q.instance.game;const k=new W._mx(this.GameObject);k.addComponent(W.K16),this.scorePrefabs=k.addComponent($t),this.scorePrefabs.generateFromPrefab(H.D.UI_RESEARCH_POINTS_PANEL_PREFAB,5),this.scorePrefabs.deltaX=145,this.texts=[],this.scores=[];const B=F.q.instance.prodigy.gameContainer.get("580-3bea");Wt.b.statusRequiresConsent(B.consentStatus)&&(this.scorePrefabs.GameObject.legacyTransform.y+=qt.R.HUD_RESERVE_HEIGHT);for(let U=0;U{this.texts[k].text=this.scores[k].toString()})),U.chain(F),U.start()}getCombinedScore(){let k=0;for(let B=0;B{k.state=vt.a.Awake})),this._postGameSignal.addOnce(B),this.GameObject.parent.legacyTransform.group.setChildIndex(this.GameObject.legacyTransform.group,this.GameObject.parent.children.length-1),this.GameObject.active=!0,this._oldCameraBounds=this.camera.bounds,this._oldCameraPosition={x:this.camera.x,y:this.camera.y},this.GameObject.legacyTransform.y=-this.camera.bounds.height-1*this.camera.cameraHeight,this.GameObject.legacyTransform.x=this.camera.x,this.camera.bounds=null,this.camera.Active=!1;const U=this.isFtue?H.D.FLING_FTUE_INTRO_DIALOGUE_Y_OFFSET:0;this._game.add.tween(this.camera,this).to({x:this.GameObject.legacyTransform.x,y:this.GameObject.legacyTransform.y+U},H.D.FLING_CAMERA_TWEEN_IN_MS,W.GS3.Quadratic.Out,!0).onUpdateCallback(this.camera.onUpdateVerticalTween.dispatch,this.camera.onUpdateVerticalTween).onTweenComplete.add((()=>{this._catapult.Active=!0,this._catapult.spawnFloatlings(this._floatlings.slice(0)),this.isFtue?this.startFTUE():(this._quitButton.GameObject.active=!0,this.startCatapult())})),this._game.add.tween(this._scoreManager.GameObject.legacyTransform.group,this).to({y:H.D.FLING_SCORE_MANAGER_Y+U},H.D.FLING_CAMERA_TWEEN_IN_MS,W.GS3.Quadratic.Out,!0),this.characterController.tweenToPosition({x:this.GameObject.legacyTransform.group.position.x+H.D.PLAYER_FLING_OFFSET_X,y:this.GameObject.legacyTransform.group.position.y+H.D.PLAYER_FLING_OFFSET_Y},H.D.FLING_CAMERA_TWEEN_IN_MS,H.D.FLING_PLAYER_DELAY_OFFSET_MS,W.GS3.Quadratic.Out),F.q.instance.prodigy.audio.playBGM(H.D.FLOATLING_FLING_BGM_ID,!0)}startCatapult(){this._catapult.onLand.add(this.onFloatlingLand,this),this._catapult.readyNextFloatling()}onFloatlingLand(k,B){B.floatling.lastThrown=Date.now(),k?this.animateFloatlingScore(B):this._game.add.tween(B.GameObject.legacyTransform.group,this).to({y:300,alpha:0},500,W.GS3.Quadratic.In,!0).onTweenComplete.add(this.onFloatlingScoreTweenEnd.bind(this,B)),this._catapult.readyNextFloatling()}animateFloatlingScore(k){k.researchPointVisible=!0,this._scoreManager.addScore(k.elementType,this.isFtue?H.D.FLING_FTUE_POINTS_PER_SHOT:k.researchScore);const B=this._scoreManager.scorePrefabs.objects[k.elementType].legacyTransform.group,U=this._catapult.GameObject.legacyTransform.group,F=B.getGlobalPosition(),G=F.x-U.x+.5*B.width,j=F.y-U.y;this._game.add.tween(k.GameObject.legacyTransform.group,this).to({x:G,y:j,alpha:0},500,W.GS3.Quadratic.In,!0).onTweenComplete.add(this.onFloatlingScoreTweenEnd.bind(this,k))}onFloatlingScoreTweenEnd(k){k.GameObject.destroy(),this._catapult.hasFloatlings()||this.awardPoints(this.showEndPopup.bind(this))}startFTUE(){this._ftueTutorialLabel=this._prefabLoader.loadFromGUID(H.D.UI_TUTORIAL_TAG,F.q.instance.prodigy.open.menusGameObject),this._ftueTutorialLabel.legacyTransform.group.position.set(32,32);const k=new Gt.rD(this._game),B=[];for(let U=0;U{this._game.add.tween(this.camera,this).to({x:this.GameObject.legacyTransform.x,y:this.GameObject.legacyTransform.y},H.D.FLING_CAMERA_TWEEN_IN_MS,W.GS3.Quadratic.Out,!0).onTweenComplete.add((()=>{this.showHowToFlingFTUE()})),this._game.add.tween(this._scoreManager.GameObject.legacyTransform.group,this).to({y:H.D.FLING_SCORE_MANAGER_Y},H.D.FLING_CAMERA_TWEEN_IN_MS,W.GS3.Quadratic.Out,!0)}}),k.addEvents(B),k.start()}showHowToFlingFTUE(){this._catapult.readyNextFloatling(),this._catapult.onLand.add(this.onFloatlingLandFTUE,this),this._ftueTooltip=this._prefabLoader.load(10,this.GameObject).findComponent(Ut.p),this._ftueTooltip=Ft.A.displayToolTipAuto(this._ftueTooltip,this.GameObject,{bodyText:F.q.instance.prodigy.gameContainer.get(W.$Bt.LocalizationService).getText(H.D.FLING_CLICK_AND_DRAG),xPosition:300,yPosition:164}),this._ftueTooltip._timeout.stop();const k=new W._mx(this.GameObject);k.addComponent(W.K16),this._ftueHand=k.addComponent(ut._),this._ftueHand.setAsset(H.D.ATLAS_ICONS,"help"),this._ftueHand.GameObject.legacyTransform.group.position.set(450,256),this._ftueHandTween=this._game.add.tween(this._ftueHand.GameObject.legacyTransform.group,this).to({x:350,y:400},2e3,W.GS3.Quadratic.In,!0,500).loop(!0)}onFloatlingLandFTUE(k,B){if(k){B.floatling.lastThrown=Date.now(),this.animateFloatlingScore(B),this.onFloatlingScoredFTUE();const k=new Gt.rD(this._game);k.addEvents([{dialogueData:k.dataProvider.get(H.D.FLING_FTUE_POST_FLING),blockInput:!0},{callback:this.showFTUEEndPopup.bind(this)}]),k.start()}else{const k=new Gt.rD(this._game);k.addEvents([{dialogueData:k.dataProvider.get(H.D.FLING_FTUE_MISSED),blockInput:!0},{callback:this._catapult.setFloatling.bind(this._catapult,B)}]),k.start()}}onFloatlingScoredFTUE(){this._catapult.onLand.removeAll(),this._ftueHandTween.stop(),this._ftueHand.GameObject.destroy(),this._ftueTooltip.GameObject.destroy(),this._ftueTooltip=null}showEndPopup(){F.q.instance.prodigy.open.informationDialog(new Lt.Z(H.D.POPUP_FLING_FINISH_BUTTON,(()=>{this.returnToGame()}),Nt.E.Medium,void 0,H.D.POPUP_FLING_FINISH_TITLE,H.D.POPUP_FLING_FINISH_BODY,!0,H.D.ATLAS_SWOOPY_FACE,H.D.ATLAS_SWOOPY_FACE_FRAME_DEFAULT))}showFTUEEndPopup(){F.q.instance.prodigy.open.informationDialog(new Lt.Z(H.D.POPUP_NO_FLOATLINGS_CONFIRM,this.startCatapult.bind(this),Nt.E.Medium,void 0,H.D.POPUP_FLING_COLLECT_TITLE,H.D.POPUP_FLING_COLLECT_BODY,!0,H.D.FLOATLING_FLING_RESEARCH_ICONS))}onQuitClick(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._catapult.disableInput();const k=F.q.instance.prodigy.gameContainer.get(W.$Bt.LocalizationService);F.q.instance.prodigy.open.confirmationDialog(new Mt.k(k.getText(H.D.POPUP_FLING_QUIT_CONFIRM),(()=>{this.awardPoints(this.returnToGame.bind(this))}),k.getText(H.D.POPUP_FLING_QUIT_DECLINE),(()=>{this._catapult.enableInput()}),{atlas:H.D.ATLAS_STORE,name:"icon-large-exclamation"},Nt.E.Small,void 0,k.getText(H.D.POPUP_FLING_QUIT_TITLE),k.getText(H.D.POPUP_FLING_QUIT_BODY),!0))}awardPoints(k){if(!this.GameObject.active)return;this._quitButton.onClick.removeAll(this),this._quitButton.GameObject.active=!1,this._ftueTutorialLabel&&(this._ftueTutorialLabel.destroy(),this.breadcrumbManager.completeBreadcrumb(Ot.M.FlingTutorialComplete));const B=this._scoreManager.scores,U=[];for(let F=0;F0&&U.push({type:"currency",ID:H.D.FLING_CURRENCY_ORDER[F],N:B[F]});F.q.instance.prodigy.gameContainer.get("c47-20b6");U.length>0?F.q.instance.prodigy.open.gotItem(U,k,null,null,null,null,{source_type:kt.C.MiniGame}):k()}returnToGame(){this._floatlings.forEach((k=>{k.state=vt.a.Wandering})),this._game.add.tween(this.camera,this).to({x:this._oldCameraPosition.x,y:0},H.D.FLING_CAMERA_TWEEN_OUT_MS,W.GS3.Quadratic.Out,!0,H.D.FLING_CAMERA_LEAVE_DELAY_MS).onUpdateCallback(this.camera.onUpdateVerticalTween.dispatch,this.camera.onUpdateVerticalTween).onTweenComplete.add(this.onFinishReturnToGame,this),this.characterController.tweenToPosition({x:this._oldCameraPosition.x+H.D.PLAYER_CAMERA_OFFSET_X,y:H.D.PLAYER_CAMERA_OFFSET_Y},H.D.FLING_CAMERA_TWEEN_OUT_MS,H.D.FLING_CAMERA_LEAVE_DELAY_MS+H.D.FLING_PLAYER_DELAY_OFFSET_MS,W.GS3.Quadratic.Out),F.q.instance.prodigy.audio.playBGM(H.D.TOWER_TOWN_BGM_ID,!0)}onFinishReturnToGame(){if(this.isFtue){this._isFtue=!1;const k=new Gt.rD(this._game),B=[];H.D.FLING_FTUE_OUTRO_DIALOGUES.forEach((U=>{B.push({dialogueData:k.dataProvider.get(U),blockInput:!0})})),B.push({callback:this.onFinishReturnToGame.bind(this)}),k.addEvents(B),k.start()}else this.GameObject.active=!1,this.camera.Active=!0,this.camera.bounds=this._oldCameraBounds,this._postGameSignal.dispatch()}destroy(){this._postGameSignal.dispose(),super.destroy()}}class Yt extends wt{constructor(k){super(),this._floatlingPool=k}init(k){super.init(k),this.createFloatlingFling(),this._mathTower.onUpdate.add((k=>{k.type===lt.L.TOWER_TOWN_FLOATLING_FLING_START&&this.switchState(H.D.STATE_FLING)}))}onEnter(){super.onEnter();const k=this._owner.mathTower.getFloatlingsForFling();0!==k.length?(this._floatlingFling.startFloatlingFling(k,this.onFinishFloatlingFling.bind(this)),this._mathTower.events.handleNotification(this._mathTower,new gt.L(this._mathTower,lt.L.TOWER_TOWN_FLOATLING_FLING_START))):this.showNoFloatlingPopup()}createFloatlingFling(){const k=new W._mx(this._owner.map.screen.backgroundGameObject);k.addComponent(W.K16),this._floatlingFling=k.addComponent(zt),this._floatlingFling.breadcrumbManager=this._owner.map.breadCrumbManager,this._floatlingFling.camera=this._owner.map.pageCamera,this._floatlingFling.GameObject.active=!1,this._floatlingFling.characterController=this._owner.map.characterController,this._floatlingFling.floatlingPool=this._floatlingPool}showNoFloatlingPopup(){F.q.instance.prodigy.open.informationDialog(new Lt.Z(H.D.POPUP_NO_FLOATLINGS_CONFIRM,(()=>{this.returnToTownState()}),Nt.E.Medium,void 0,H.D.POPUP_NO_FLOATLINGS_TITLE,H.D.POPUP_NO_FLOATLINGS_BODY,!0,H.D.POPUP_NO_FLOATLINGS_ICON))}onFinishFloatlingFling(){this._owner.map.refreshVisibleTown(),this._mathTower.uiFactory.hud.updateBreadcrumbsLocked(),this.returnToTownState(),this._mathTower.notifyUpdate(lt.L.TOWER_TOWN_FLOATLING_FLING_END),this._mathTower.fireEvent(lt.L.TOWER_TOWN_FLOATLING_FLING_END)}returnToTownState(){this._mathTower.isInfinity?this.switchState(H.D.STATE_INFINITY):this.switchState(H.D.STATE_CAMERA)}}var Qt=U(3836);class Xt extends Tt{constructor(){super(),this._defaultReturnState=H.D.STATE_INFINITY}getBuildInterface(){const k=this._owner.nextInfinityFloorPosition();return this._activeFloor=this._mathTower.activeFloor,new Qt._(this._owner.mathTower.game,this._owner.map.screen.backgroundGameObject,this._owner.mathTower,this._owner.prefabLoader,this._activeFloor,k.x+H.D.IN_PROGRESS_PREFAB_X_OFFSET,k.y+H.D.IN_PROGRESS_PREFAB_Y_OFFSET,Qt.i.Infinity)}wrongAnswer(){this._quitButton.inputEnabled=!0}floorFinished(){this.completeFloor(),this._mathTower.uiFactory.tooltip(this._owner.localizer.getText(H.D.TOOLTIP_FLOOR_FINISHED),!0,H.D.FLOOR_FINISHED_TOOLTIP_WIDTH),this._owner.map.townRenderer.checkAwardFloatlings(this._mathTower.activeInfinityFloor),this._mathTower.fireEvent(lt.L.TOWER_ROOM_BUILT),this.switchState(this._defaultReturnState)}spawnScrim(){this._mathTower.uiFactory.spawnInfinityScrim()}}class Zt extends xt{constructor(){super(),this._buildState=H.D.STATE_INFINITY_BUILD,this._returnState=H.D.STATE_INFINITY}getActiveTower(){return this._mathTower.currentTown.infinityTower}getFloorPosition(){return this._owner.nextInfinityFloorPosition()}spawnScrim(){this._mathTower.uiFactory.spawnInfinityScrim()}onQuitClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._mathTower.currentTown.infinityTower.removeFromTop(),this.switchState(this._returnState)}onStartBuildingClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._tempFloor.blockCount=0,this._mathTower.fireEvent(lt.L.FLOOR_START_BUILDING),this._mathTower.activeInfinityFloor.state=_t.u.UnderConstruction,this.switchState(this._buildState)}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],Zt.prototype,"onQuitClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],Zt.prototype,"onStartBuildingClicked",null);var Jt=U(76974),te=U(52080),ee=U(1041);class ie extends wt{constructor(k){super(),this._maxFloorAmount=100,this._townRenderer=k}init(k){super.init(k),this._map=k.map,this.createMap()}createMap(){const k=F.q.instance.game.width,B=F.q.instance.game.height;this._parent=new W._mx(this._townRenderer.GameObject),setTimeout((()=>{this._townRenderer.GameObject.legacyTransform.group.setChildIndex(this._parent.legacyTransform.group,0)})),this._parent.addComponent(W.K16).group.position.set(-k,0);const U=new W._mx(this._parent);U.addComponent(W.K16);const G=new W._mx(this._parent);G.addComponent(W.K16);const j=new te.Y(new rt.BaseRenderTexture({width:k,height:B})),$=new te.Y(new rt.BaseRenderTexture({width:k,height:B})),V=F.q.instance.prodigy.create.element(U.legacyTransform.group,0,0),q=F.q.instance.prodigy.create.element(G.legacyTransform.group,0,0),K=new ee.Z(F.q.instance.prodigy.gameContainer);K.init(this._map.game,V,q,{background:U,foreground:G},{mapName:H.D.MAP_INFINITY_TOWER_CONSTRUCTION,assets:H.D.TILESET_INFINITY_TOWER_CONSTRUCTION},(()=>{j.clear(),j.renderXY(V,0,0,!0),U.legacyTransform.group.addChild(F.q.instance.prodigy.create.image(0,0,void 0,void 0,j)),$.clear(),$.renderXY(q,0,0,!0),G.legacyTransform.group.addChild(F.q.instance.prodigy.create.image(0,0,void 0,void 0,$)),V.destroy(),q.destroy(),K.processAnimations(this._map.game,{above:G,below:U})}))}onEnter(){super.onEnter(),this._mathTower.isInfinity=!0,this.setupTower(),this._owner.mathTower.activeFloor&&!this._owner.mathTower.activeFloor.hasMaxBlocks?this.spawnInProgressFloorPrefab():(this.clearMidFloors(),this.setupAddFloorPrefab()),this.setupCamera(),this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_ENABLE_NAVIGATION),this._map.pageCamera.onBeginHorizontalTween.add(this.onHorizontalTween,this);const k=this._owner.mathTower.hasAvailableFloatlings()?H.D.MESSAGE_ENABLE_FLING_BUTTON:H.D.MESSAGE_DISABLE_FLING_BUTTON;this._mathTower.game.broadcaster.broadcast(k)}onExit(k){super.onExit(),this._map.pageCamera.onFullScrollCompleted.removeAll(this),this._map.pageCamera.onBeginHorizontalTween.removeAll(this),W.Aq$.isDefined(this._addFloor)&&this._addFloor.GameObject&&(this._addFloor.addFloorButton.onClick.removeAll(),this._addFloor.GameObject.destroy(),this._addFloor=null),this._buildInterface&&(this._buildInterface.close(),this._buildInterface=null),k!==H.D.STATE_INFINITY_BUILD&&k!==H.D.STATE_INFINITY_CHOOSE_FLOOR&&k!==H.D.STATE_FLING?this.cleanup():this._owner.switchParams.keepHud||this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_DISABLE_NAVIGATION)}cleanup(){this._mathTower.isInfinity=!1,this._map.pageCamera.onEnable(),this._townRenderer.GameObject.active=!0,this._townRenderer.updateBounds(),this._map.cameraHUDInterface.forceEnabledRight=!1,this._map.pageCamera.onBlockedMoveAttempt.removeAll(this)}spawnInProgressFloorPrefab(){const k=this._owner.nextFloorPosition();this._buildInterface=this._mathTower.uiFactory.buildInterface(k),this._buildInterface.onCreate.add(this.inProgressPrefabCreated.bind(this))}inProgressPrefabCreated(){this._buildInterface.buildButton.onClick.add(this.onBuildButtonClicked.bind(this)),this._buildInterface.buildButton.inputEnabled=this._mathTower.shouldUseInfinityTowerMode(),this._buildInterface.buildButton.currentState=this._mathTower.shouldUseInfinityTowerMode()?Jt.K.Up:Jt.K.Disabled}onBuildButtonClicked(){this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_DISABLE_NAVIGATION,{keepHud:!0}),this.switchState(H.D.STATE_INFINITY_BUILD)}onHorizontalTween(k){k===-F.q.instance.game.width&&this.switchState(H.D.STATE_CAMERA)}setupTower(){this._owner.mathTower.currentTown.infinityTower||this._owner.mathTower.currentTown.createInfinityTower()}setupCamera(){const k=F.q.instance.game.width,B=F.q.instance.game.height;this._map.pageCamera.onDisable();const U=this._map.pageCamera.bounds.width,G=-k,j=-H.D.FLOOR_HEIGHT*this._mathTower.currentTown.infinityTower.floors.length,$=-j+B;this._map.pageCamera.bounds.setTo(G,j,U,$),this._map.pageCamera.updateBounds(),this._map.pageCamera.onEndVerticalTween.add((()=>{this._owner.switchParams.backToTowerTown&&this.switchState(H.D.STATE_CAMERA)})),this._map.pageCamera.onFullScrollCompleted.add(this.onFinishTransitionIn,this),this._owner.switchParams.enteringInfinity?this._map.pageCamera.scrollToPosition(-k,0):this.scrollToTop()}clearMidFloors(){const k=this._owner.mathTower.currentTown.infinityTower.floors.length;if(k<=this._maxFloorAmount)return;const B=k-this._maxFloorAmount,U=Math.ceil(this._maxFloorAmount/2);this._owner.mathTower.currentTown.infinityTower.removeFloors(U,B,!0)}setupAddFloorPrefab(){const k=this._owner.prefabLoader.loadFromGUID(H.D.UI_ADD_FLOOR_PREFAB,this._map.screen.backgroundGameObject);this._addFloor=k.findComponent(Rt.R),k.legacyTransform.group.position=this._owner.nextFloorPosition(),this._addFloor.addFloorButton.onClick.add(this.onAddFloorButtonClicked.bind(this)),this._addFloor.addFloorButton.inputEnabled=this._mathTower.shouldUseInfinityTowerMode(),this._addFloor.addFloorButton.currentState=this._mathTower.shouldUseInfinityTowerMode()?Jt.K.Up:Jt.K.Disabled,this._addFloor.removeNewTowerButton()}onAddFloorButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_DISABLE_NAVIGATION,{keepHud:!0}),this.switchState(H.D.STATE_INFINITY_CHOOSE_FLOOR)}onFinishTransitionIn(){this._map.pageCamera.onFullScrollCompleted.removeAll(this);const k=this._map.pageCamera.bounds;k.width=F.q.instance.game.width,this._map.pageCamera.bounds=k,this._map.cameraHUDInterface.forceEnabledRight=!0,this._map.pageCamera.onBlockedMoveAttempt.add(this.onBlockedMoveAttempt,this),this.scrollToTop(1e3)}onBlockedMoveAttempt(k){k===St.RIGHT&&this._owner.changeToState(H.D.STATE_CAMERA)}scrollToTop(k=0){this._map.pageCamera.scrollVertical(this._owner.nextInfinityFloorPosition().y-.5*F.q.instance.game.height,k)}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],ie.prototype,"onBuildButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],ie.prototype,"onAddFloorButtonClicked",null);class se extends wt{get towerIndex(){return this._towerIndex}get floorIndex(){return this._floorIndex}onEnter(){this._moveInterface=this._mathTower.uiFactory.moveFloorInterface(),this._moveInterface.onCreate.add(this.onMoveFloorInterfaceCreated.bind(this)),this._towerIndex=this._owner.switchParams.towerIndex,this._floorIndex=this._owner.switchParams.floorIndex,this.checkTowerFloorBoundaries()&&(this._mathTower.currentTown.towers[this._towerIndex].floors[this._floorIndex].state=_t.u.MoveFloor),this._owner.map.pageCamera.onFullScrollCompleted.add(this.cameraFinishedScrolling.bind(this),this)}onExit(){this.checkTowerFloorBoundaries()&&(this._mathTower.currentTown.towers[this._towerIndex].floors[this._floorIndex].state=_t.u.Complete),this._mathTower.uiFactory.despawnScrim(),this._moveInterface.close(),this._owner.map.pageCamera.onFullScrollCompleted.removeAll(this)}checkTowerFloorBoundaries(){return this._towerIndexot.o.MINIMUM_FLOOR_COUNT;B&&F?(this._moveInterface.leftButton.lockState(Jt.K.Disabled),this._moveInterface.leftButton.onClick.add(this.leftButtonClicked.bind(this,!0)),this._moveInterface.rightButton.unlockState(),this._moveInterface.rightButton.currentState=Jt.K.Up,this._moveInterface.rightButton.onClick.add(this.rightButtonClicked.bind(this))):U&&F?(this._moveInterface.rightButton.lockState(Jt.K.Disabled),this._moveInterface.rightButton.onClick.add(this.rightButtonClicked.bind(this,!0)),this._moveInterface.leftButton.unlockState(),this._moveInterface.leftButton.currentState=Jt.K.Up,this._moveInterface.leftButton.onClick.add(this.leftButtonClicked.bind(this))):(this._moveInterface.rightButton.lockState(Jt.K.Disabled),this._moveInterface.rightButton.onClick.add(this.rightButtonClicked.bind(this,!0)),this._moveInterface.leftButton.lockState(Jt.K.Disabled),this._moveInterface.leftButton.onClick.add(this.leftButtonClicked.bind(this,!0)))}onSaveClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._revertCallback=null,this.switchState(H.D.STATE_CAMERA),this._mathTower.forceSaveTown()}onCancelClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this.reverseChanges(),this._revertCallback=null,this.switchState(H.D.STATE_CAMERA)}leftButtonClicked(k=!1){if(F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),k){const k=this._mathTower.currentTown.towers[this._towerIndex].floors.length>ot.o.MINIMUM_FLOOR_COUNT?H.D.WARNING_TOP_FORWARD:H.D.MOVE_FLOOR_MINIMUM_WARNING;this._moveInterface.warningObject.active=!0,this._moveInterface.arrowObject.active=!0;const B=this._moveInterface.leftButton.GameObject.legacyTransform.group.position,U=this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1);this._moveInterface.warningObject.legacyTransform.group.position.set(U.x-H.D.FLOOR_WIDTH/1.5,B.y+H.D.MOVE_FLOOR_WARNING_OFFSET_Y),this._moveInterface.arrowObject.legacyTransform.group.position.set(B.x+H.D.WARNING_ARROW_OFFSET_X,B.y+H.D.WARNING_ARROW_OFFSET_Y),this._moveInterface.setWarningText(this._owner.localizer.getText(k)),this._moveInterface.warningQuitButton.onClick.add(this.warningQuitButtonClicked.bind(this))}else this.bottomToTop(),this._revertCallback?this._revertCallback=null:this._revertCallback=this.topToBottom.bind(this),this.initMoveButtons()}rightButtonClicked(k=!1){if(F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),k){const k=this._mathTower.currentTown.towers[this._towerIndex].floors.length>ot.o.MINIMUM_FLOOR_COUNT?H.D.WARNING_BOTTOM_BACK:H.D.MOVE_FLOOR_MINIMUM_WARNING;this._moveInterface.warningObject.active=!0,this._moveInterface.arrowObject.active=!0;const B=this._moveInterface.rightButton.GameObject.legacyTransform.group.position,U=this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1);this._moveInterface.warningObject.legacyTransform.group.position.set(U.x-70,B.y+H.D.MOVE_FLOOR_WARNING_OFFSET_Y),this._moveInterface.arrowObject.legacyTransform.group.position.set(B.x+H.D.WARNING_ARROW_OFFSET_X,B.y+H.D.WARNING_ARROW_OFFSET_Y),this._moveInterface.setWarningText(this._owner.localizer.getText(k)),this._moveInterface.warningQuitButton.onClick.add(this.warningQuitButtonClicked.bind(this))}else this.topToBottom(),this._revertCallback?this._revertCallback=null:this._revertCallback=this.bottomToTop.bind(this),this.initMoveButtons()}topToBottom(){let k=this._mathTower.currentTown.towers[this._towerIndex+1];W.Aq$.isDefined(k)||(k=this._mathTower.currentTown.createTower()),this._mathTower.currentTown.towers[this._towerIndex].moveFloorTo(k,!0,!1),this._towerIndex++,this._floorIndex=0,this._mathTower.currentTown.towers[this._towerIndex].notifyUpdate(lt.L.TOWER_MOVE_FLOOR),this._mathTower.currentTown.towers[this._towerIndex-1].notifyUpdate(lt.L.TOWER_MOVE_FLOOR)}bottomToTop(){const k=this._mathTower.currentTown.towers[this._towerIndex-1];k.takeFloorFrom(this._mathTower.currentTown.towers[this._towerIndex],!0,!1),0===this._mathTower.currentTown.towers[this._towerIndex].floors.length&&(this._mathTower.currentTown.towers[this._towerIndex-1].isActiveTower=!1),this._mathTower.currentTown.towers[this._towerIndex].notifyUpdate(lt.L.TOWER_MOVE_FLOOR),this._towerIndex--,this._floorIndex=k.floors.length-1,this._mathTower.currentTown.towers[this._towerIndex].notifyUpdate(lt.L.TOWER_MOVE_FLOOR)}reverseChanges(){this._revertCallback&&this._revertCallback()}warningQuitButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._moveInterface.warningObject.active=!1,this._moveInterface.arrowObject.active=!1}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],se.prototype,"onSaveClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],se.prototype,"onCancelClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[Boolean]),(0,et.Sn)("design:returntype",void 0)],se.prototype,"leftButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[Boolean]),(0,et.Sn)("design:returntype",void 0)],se.prototype,"rightButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],se.prototype,"warningQuitButtonClicked",null);class ne extends wt{constructor(){super(...arguments),this._returnState=H.D.STATE_CAMERA,this._buildState=H.D.STATE_BUILD}onEnter(){this._towerIndex=this._owner.switchParams.towerIndex,this._floorIndex=this._owner.switchParams.floorIndex,this._activeFloor=this._mathTower.currentTown.towers[this._towerIndex].floors[this._floorIndex],this._owner.map.townRenderer.towerRenderers[this._towerIndex].floors[this._floorIndex].setFloorVisibility(!0),this._activeFloor.roomID=H.D.DEFAULT_FLOOR_ROOM_ID,this._activeFloor.frameID=H.D.DEFAULT_FLOOR_FRAME_ID,this._activeFloor.setRenovation(),this._owner.map.pageCamera.onFullScrollCompleted.addOnce(this.cameraFinishedScrolling.bind(this),this)}cameraFinishedScrolling(){const k=this._owner.getFloorPosition(this._towerIndex,this._floorIndex);this._chooseFloor=this._mathTower.uiFactory.chooseFloorLook(k),this._chooseFloor.onCreate.add(this.onChooseFloorInterfaceCreated.bind(this)),this._chooseFloor.selectionChanged.add(this.selectionChanged.bind(this)),this._owner.map.refreshVisibleTown(),this._mathTower.uiFactory.spawnScrim(this._towerIndex,this._floorIndex)}onExit(){this._chooseFloor.close(),this._mathTower.uiFactory.despawnScrim()}onChooseFloorInterfaceCreated(){this.bindButtons();const k=this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1);this._chooseFloor.startBuildingButton.GameObject.legacyTransform.group.position.set(k.x-H.D.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_X,k.y+H.D.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_Y)}bindButtons(){this._chooseFloor.quitButton.onClick.add(this.quitPopup.bind(this)),this._chooseFloor.startBuildingButton.onClick.add(this.onStartBuildingClicked.bind(this))}quitPopup(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),F.q.instance.prodigy.open.confirmationDialog(new Mt.k(this._owner.localizer.getText(H.D.POPUP_CHOOSE_FLOOR_QUIT_BUTTON),this.onQuitClicked.bind(this),this._owner.localizer.getText(H.D.POPUP_CHOOSE_FLOOR_STAY_BUTTON),void 0,{atlas:H.D.ATLAS_STORE,name:"icon-large-exclamation"},Nt.E.Small,void 0,this._owner.localizer.getText(H.D.POPUP_CHOOSE_FLOOR_QUIT_TITLE),this._owner.localizer.getText(H.D.POPUP_CHOOSE_FLOOR_QUIT_BODY)))}onQuitClicked(){this._owner.map.townRenderer.towerRenderers[this._towerIndex].floors[this._floorIndex].setQuickRenoPrefabVisibility(!0),this._owner.map.townRenderer.towerRenderers[this._towerIndex].floors[this._floorIndex].setFloorVisibility(!1),this._activeFloor.decorations.clear(),this._activeFloor.setComplete(!0,this._activeFloor.blockCount),this.switchState(this._returnState)}onStartBuildingClicked(){this._activeFloor.setRenoConstruction();const k=this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1),B=this._activeFloor;this.switchState(this._buildState,{quickRenoFloor:B,position:k})}selectionChanged(k){this._activeFloor.roomID=W.Aq$.isDefined(k.roomID)?k.roomID:H.D.DEFAULT_FLOOR_ROOM_ID,this._activeFloor.frameID=W.Aq$.isDefined(k.frameID)?k.frameID:H.D.DEFAULT_FLOOR_FRAME_ID,this._activeFloor.decorations.clear(),k.decorations&&k.decorations.forEach(((k,B)=>{this._activeFloor.decorations.setAt(B,k)}))}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],ne.prototype,"quitPopup",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],ne.prototype,"onStartBuildingClicked",null);class ae{constructor(){this.items=[]}getRewards(){return this.items}addOneOf(k){const B=pt.o.integerInRange(0,k.length);this.items.push(k[B])}add(k){this.items.push(k)}}class re extends wt{onEnter(){this._dialogueController=this._owner.dialogueController,this._towerIndex=this._owner.switchParams.towerIndex,this._floorIndex=this._owner.switchParams.floorIndex,this._activeFloor=this._mathTower.currentTown.towers[this._towerIndex].floors[this._floorIndex],this._topFloorIndex=this._mathTower.currentTown.towers[this._towerIndex].floors.length-1,this._rooftopInterface=this._mathTower.uiFactory.rooftopMasteryInterface(this._activeFloor),this._rooftopInterface.onCreate.add(this.onRooftopInterfaceCreated.bind(this))}onExit(){this._owner.map.characterController.Active=!0,this._owner.map.townRenderer.updateBounds(0),this._rooftopInterface.close()}startFTUE(){const k=this._owner.nextFloorPosition(),B=J.U.isStepComplete(z.B.PuppetMasterDefeated);this._dialogueController.addEvents([{dialogueData:this._dialogueController.dataProvider.get(H.D.DIALOGUE_STUBBORN_SHADOW_FTUE_1),blockInput:!0},{callback:()=>{this._rooftopInterface.spawnPortalFTUE(k.x,k.y)}},{dialogueData:this._dialogueController.dataProvider.get(H.D.DIALOGUE_STUBBORN_SHADOW_FTUE_2),blockInput:!0},{callback:()=>{this._rooftopInterface.spawnPMAndStubbornShadowFTUE(k.x,k.y)}},{dialogueData:this._dialogueController.dataProvider.get(B?H.D.DIALOGUE_STUBBORN_SHADOW_POST_ENDGAME_FTUE_1:H.D.DIALOGUE_STUBBORN_SHADOW_FTUE_3),blockInput:!0},{dialogueData:this._dialogueController.dataProvider.get(B?H.D.DIALOGUE_STUBBORN_SHADOW_POST_ENDGAME_FTUE_2:H.D.DIALOGUE_STUBBORN_SHADOW_FTUE_4),blockInput:!0},{callback:()=>{B?this._rooftopInterface.removePortalFTUE():this._rooftopInterface.removePMandPortalFTUE(k.x,k.y)}}]),this._dialogueController.addEvents([{dialogueData:this._dialogueController.dataProvider.get(H.D.DIALOGUE_STUBBORN_SHADOW_FTUE_5),blockInput:!0},{dialogueData:this._dialogueController.dataProvider.get(H.D.DIALOGUE_STUBBORN_SHADOW_FTUE_6),blockInput:!0}]),this._dialogueController.start(!0,this.onFirstFTUEEnd.bind(this))}onFirstFTUEEnd(){this._owner.map.breadCrumbManager.completeBreadcrumb(Ot.M.StubbornShadowTutorialOneCompleted),this._mathTower.education.isCurrentAlgorithmBasicOrGameChallenge()?this.onShadowAppeared():(this._dialogueController.addEvents([{dialogueData:this._dialogueController.dataProvider.get(H.D.DIALOGUE_STUBBORN_SHADOW_FTUE_7),blockInput:!0}]),this._dialogueController.start(!0,this.switchState.bind(this,H.D.STATE_CAMERA)))}onRooftopInterfaceCreated(){const k=this._owner.getFloorPosition(this._towerIndex,this._topFloorIndex+1);k.set(k.x+-H.D.BUTTON_OFFSET_X,k.y+H.D.BUTTON_OFFSET_Y),this._rooftopInterface.setAttackButtonPosition(k),this._rooftopInterface.attackButton.GameObject.active=!1,this._rooftopInterface.battleButton.GameObject.active=!1,this._rooftopInterface.quitButton.onClick.add(this.onQuitButtonClicked.bind(this)),this._rooftopInterface.attackButton.onClick.add(this.onAttackButtonClicked.bind(this)),this._rooftopInterface.onVictory.add(this.onVictory.bind(this)),this._rooftopInterface.onDefeat.add(this.onDefeat.bind(this)),this._rooftopInterface.onIncorrectAnswer.add(this.onWrongAnswer.bind(this)),this._rooftopInterface.onCorrectAnswer.add(this.onCorrectAnswer.bind(this,!1));const B=J.U.isStepComplete(z.B.PuppetMasterDefeated);this._rooftopInterface.topBanner.legacyTransform.x=B?-280:0;const U=this._owner.getFloorPosition(this._towerIndex,this._topFloorIndex+1),F=U.x+=H.D.STUBBORN_SHADOW_PLAYER_OFFSET_X,G=U.y+=H.D.STUBBORN_SHADOW_PLAYER_OFFSET_Y;this._owner.map.characterController.tweenToPosition(new W.I9Y(F,G),150),this._owner.map.characterController.Active=!1,setTimeout((()=>{this.updateCameraBounds()}),H.D.CHARACTER_TWEEN_DELAY_MS)}updateCameraBounds(){const k=this._owner.getFloorPosition(this._towerIndex,this._topFloorIndex+1);k.set(k.x+H.D.STUBBORN_SHADOW_OFFSET_X,k.y+H.D.STUBBORN_SHADOW_OFFSET_Y),this._owner.map.townRenderer.updateBounds(-H.D.STUBBORN_SHADOW_BOUNDS_OFFSET_X),this._owner.map.pageCamera.scrollToPosition(k.x-H.D.STUBBORN_SHADOW_CAMERA_OFFSET_X,k.y-H.D.CAMERA_Y_OFFSET),this._owner.map.pageCamera.onFullScrollCompleted.addOnce(this.cameraFinishedScrolling.bind(this,k.x,k.y),this)}cameraFinishedScrolling(k,B){this._owner.map.breadCrumbManager.isBreadcrumbComplete(Ot.M.StubbornShadowTutorialOneCompleted)?this._owner.switchParams.resumeBattle?this._rooftopInterface.resumeBattle(k,B):(this._rooftopInterface.onShadowSummoned.add(this.onShadowAppeared.bind(this)),this.makeStubbornShadowAppear()):this.startFTUE()}onQuitButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),F.q.instance.prodigy.open.confirmationDialog(new Mt.k(this._owner.localizer.getText(H.D.POPUP_STUBBORN_SHADOW_QUIT_BUTTON),this.switchState.bind(this,H.D.STATE_CAMERA),this._owner.localizer.getText(H.D.POPUP_STUBBORN_SHADOW_STAY_BUTTON),void 0,{atlas:H.D.ATLAS_STORE,name:"icon-large-exclamation"},Nt.E.Small,void 0,this._owner.localizer.getText(H.D.POPUP_STUBBORN_SHADOW_QUIT_TITLE),this._owner.localizer.getText(H.D.POPUP_STUBBORN_SHADOW_QUIT_BODY)))}makeStubbornShadowAppear(){const k=this._owner.getFloorPosition(this._towerIndex,this._topFloorIndex+1);k.set(k.x+H.D.STUBBORN_SHADOW_OFFSET_X,k.y+H.D.STUBBORN_SHADOW_OFFSET_Y),this._rooftopInterface.summonStubbornShadow(k.x,k.y)}onShadowAppeared(){this._dialogueController.addEvents([{dialogueData:this._dialogueController.dataProvider.get(H.D.DIALOGUE_STUBBORN_SHADOW_DUEL_CHOICE),blockInput:!0,yes:this.onDuelStarted.bind(this),no:this.switchState.bind(this,H.D.STATE_CAMERA)}]),this._dialogueController.start(!0)}onDuelStarted(){this._rooftopInterface.startBattle()}onAttackButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._rooftopInterface.startAttack()}onVictory(){this._activeFloor.state=_t.u.Complete,this.onCorrectAnswer(!0,this.onVictoryEnd.bind(this))}onVictoryEnd(){this._owner.map.breadCrumbManager.isBreadcrumbComplete(Ot.M.StubbornShadowTutorialTwoCompleted)?this.switchState(H.D.STATE_CAMERA):this.startFTUEEnding()}startFTUEEnding(){this._dialogueController.addEvents([{dialogueData:this._dialogueController.dataProvider.get(H.D.DIALOGUE_STUBBORN_SHADOW_FTUE_8),blockInput:!0},{dialogueData:this._dialogueController.dataProvider.get(H.D.DIALOGUE_STUBBORN_SHADOW_FTUE_9),blockInput:!0},{callback:()=>{this._owner.map.breadCrumbManager.completeBreadcrumb(Ot.M.StubbornShadowTutorialTwoCompleted)}}]),this._dialogueController.start(!0,this.switchState.bind(this,H.D.STATE_CAMERA))}onDefeat(){this.switchState(H.D.STATE_SHROUD)}onWrongAnswer(){const k=this._mathTower.education.getSkillById(this._activeFloor.skillID);ht.g.isSkillLocked(k)&&this.switchState(H.D.STATE_SHROUD,{towerIndex:this._towerIndex,floorIndex:this._floorIndex})}onCorrectAnswer(k,B){const U=H.D.ROOFTOP_CORRECT_PAYOUT+(k?H.D.ZONE_CURRENCY_PAYOUT:0);this.giveCurrency(U,B)}giveCurrency(k,B){const U=this._owner.map.storeManager.getItemData(H.D.ASSET_TYPE_INTERIOR,this._owner.mathTower.activeFloor.roomID);if(!U)return;const G=new ae;G.add({type:"currency",ID:H.D.ZONE_CURRENCY_IDS[Number.parseInt(U.element)],N:k}),F.q.instance.prodigy.open.gotItem(G.getRewards(),B)}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],re.prototype,"onQuitButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],re.prototype,"onAttackButtonClicked",null);class oe extends wt{onEnter(){if(this._towerIndex=this._owner.switchParams.towerIndex,this._floorIndex=this._owner.switchParams.floorIndex,this._activeFloor=this._mathTower.currentTown.towers[this._towerIndex].floors[this._floorIndex],!this._activeFloor.hasMaxBlocks){const k=this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1);this._buildInterface=this._mathTower.uiFactory.buildInterface(k),this._buildInterface.onCreate.add(this.onBuildInterfaceCreated.bind(this))}this._shroudInterface=this._mathTower.uiFactory.shroudLockInterface(),this._shroudInterface.onCreate.add(this.onShroudInterfaceCreated.bind(this)),this._owner.map.townRenderer.moveToFloor(this._towerIndex,this._floorIndex+1)}onExit(){this._shroudInterface.pendingClose=!0,W.Aq$.isDefined(this._buildInterface)&&(this._buildInterface.pendingClose=!0)}onShroudInterfaceCreated(){const k=this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1);if(this._shroudInterface.setCleanButtonPosition(new rt.Point(k.x-H.D.BUTTON_OFFSET_X,k.y+H.D.BUTTON_OFFSET_Y)),this._shroudInterface.makeCloudAppear(k.x,k.y+H.D.SHROUD_OFFSET_Y),this._shroudInterface.cleanButton.GameObject.active=!1,this._shroudInterface.setShroudCleansRemainingUI(this._activeFloor.cleansRemaining()),this._owner.map.breadCrumbManager.isBreadcrumbComplete(Ot.M.ShroudTutorialFirstTime))this.initUI();else{this._shroudInterface.setQuitButtonVisibility(!1);const k=J.U.isStepComplete(z.B.PuppetMasterDefeated);this._owner.dialogueController.addEvents([{dialogueData:this._owner.dialogueController.dataProvider.get(k?H.D.DIALOGUE_SHROUD_FTUE_POST_ENDGAME_1:H.D.DIALOGUE_SHROUD_FTUE_1),blockInput:!0},{dialogueData:this._owner.dialogueController.dataProvider.get(H.D.DIALOGUE_SHROUD_FTUE_2),blockInput:!0}]),this._owner.dialogueController.start(!0,this.initUI.bind(this))}}initUI(){this._shroudInterface.setQuitButtonVisibility(!0),this._shroudInterface.cleanButton.GameObject.active=!0,this._shroudInterface.quitButton.onClick.add(this.onQuitButtonClicked.bind(this)),this._shroudInterface.cleanButton.onClick.add(this.onCleanButtonClicked.bind(this)),!this._owner.switchParams.questionOnEnter&&this._owner.map.breadCrumbManager.isBreadcrumbComplete(Ot.M.ShroudTutorialFirstTime)||this.onCleanButtonClicked()}onQuitButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),F.q.instance.prodigy.open.confirmationDialog(new Mt.k(this._owner.localizer.getText(H.D.POPUP_SHROUD_QUIT_BUTTON),(()=>{this.switchState(H.D.STATE_CAMERA)}),this._owner.localizer.getText(H.D.POPUP_SHROUD_STAY_BUTTON),void 0,{atlas:H.D.ATLAS_STORE,name:"icon-large-exclamation"},Nt.E.Small,void 0,this._owner.localizer.getText(H.D.POPUP_SHROUD_QUIT_TITLE),this._owner.localizer.getText(H.D.POPUP_SHROUD_QUIT_BODY)))}onCleanButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._mathTower.openQuestionForShroud(this.onQuestionAnswered.bind(this))}onQuestionAnswered(k){this._activeFloor.onShroudQuestionAnswered(),this._shroudInterface.setShroudCleansRemainingUI(this._activeFloor.cleansRemaining()),this._owner.map.breadCrumbManager.isBreadcrumbComplete(Ot.M.ShroudTutorialFirstTime)||H.D.SHROUD_CLEAN_SPELLS-this._activeFloor.cleansRemaining()!=1?k?this.giveCurrency(H.D.SHROUD_CORRECT_PAYOUT,this.checkEndOfShroud.bind(this,k)):this.checkEndOfShroud(k):(this._shroudInterface.setQuitButtonVisibility(!1),this._shroudInterface.cleanButton.GameObject.active=!1,this._owner.map.breadCrumbManager.completeBreadcrumb(Ot.M.ShroudTutorialFirstTime),this._owner.dialogueController.addEvents([{dialogueData:this._owner.dialogueController.dataProvider.get(H.D.DIALOGUE_SHROUD_FTUE_3),blockInput:!0}]),this._owner.dialogueController.start(!0,(()=>{this._shroudInterface.cleanButton.GameObject.active=!0,this._shroudInterface.setQuitButtonVisibility(!0)})))}checkEndOfShroud(k){if(this._activeFloor.cleansRemaining()<=0){const B=k?H.D.SHROUD_CORRECT_PAYOUT:0;this.giveCurrency(H.D.ZONE_CURRENCY_PAYOUT+B,this.wrapUpState.bind(this))}}wrapUpState(){this._activeFloor.state=_t.u.UnderConstruction,this._shroudInterface.cleanButton.GameObject.active=!1,this._shroudInterface.makeCloudDisappear(this.switchState.bind(this,H.D.STATE_CAMERA,{shroudComplete:!0}))}onBuildInterfaceCreated(){this._buildInterface.buildButton.GameObject.active=!1,W.Aq$.isDefined(this._shroudInterface.gameObject)&&this._shroudInterface.bringToTop()}giveCurrency(k,B){const U=this._owner.map.storeManager.getItemData(H.D.ASSET_TYPE_INTERIOR,this._activeFloor.roomID);let G;G=U?H.D.ZONE_CURRENCY_IDS[Number.parseInt(U.element)]:H.D.ZONE_CURRENCY_IDS[pt.o.integerInRange(0,H.D.ZONE_CURRENCY_IDS.length)];const j=new ae;j.add({type:"currency",ID:G,N:k}),F.q.instance.prodigy.open.gotItem(j.getRewards(),B)}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],oe.prototype,"onQuitButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],oe.prototype,"onCleanButtonClicked",null);class he extends wt{onEnter(){this.onCreateHUD()}onCreateHUD(){this._owner.map.breadCrumbManager.isBreadcrumbComplete(Ot.M.DefaultItemsReceived)?(this._owner.map.storeManager.hasDefaultItems()||this._owner.map.storeManager.pushDefaultItems(),window.setTimeout((()=>{this.switchState(H.D.STATE_CAMERA)}),100)):(this._mathTower.uiFactory.hud.toggleVisible(!1),this._owner.map.storeManager.awardDefaultItems(this.onDefaultItemsAwarded.bind(this)))}onDefaultItemsAwarded(){this.switchState(H.D.STATE_CAMERA)}}var ce=U(82680),de=U(22162);class le extends ce.W{get forceEnabledUp(){return this._forceEnabledUp}set forceEnabledUp(k){k!==this._forceEnabledUp&&(this._forceEnabledUp=k,this.updateButtonLock(k||this._pageCamera.CanMoveUp,this._component.upButton))}get forceEnabledDown(){return this._forceEnabledDown}set forceEnabledDown(k){k!==this._forceEnabledDown&&(this._forceEnabledDown=k,this.updateButtonLock(k||this._pageCamera.CanMoveDown,this._component.downButton))}get forceEnabledRight(){return this._forceEnabledRight}set forceEnabledRight(k){k!==this._forceEnabledRight&&(this._forceEnabledRight=k,this.updateButtonLock(k||this._pageCamera.CanMoveRight,this._component.rightButton))}get forceEnabledLeft(){return this._forceEnabledLeft}set forceEnabledLeft(k){k!==this._forceEnabledLeft&&(this._forceEnabledLeft=k,this.updateButtonLock(k||this._pageCamera.CanMoveLeft,this._component.leftButton))}constructor(k,B,U,F){super(k,U.legacyTransform.group,H.D.UI_BUILD_COMPONENT_PREFAB,void 0,[H.D.ATLAS_STORE,H.D.ATLAS_TOWERTOWN,H.D.ATLAS_TOWERTOWN_MISC,H.D.ATLAS_BUTTONS]),this._component=null,this._parentGameObject=null,this._forceEnabledUp=!1,this._forceEnabledDown=!1,this._forceEnabledRight=!1,this._forceEnabledLeft=!1,this._pageCamera=B,this._prefabLoader=F,this._parentGameObject=U;const G=this._prefabLoader.loadFromGUID(H.D.UI_ARROW_HUD_PREFAB,this._parentGameObject);this._component=G.findComponent(de.B)}create(){this._component.upButton.onClick.add((()=>{this._pageCamera.scrollUp()}),this),this._component.downButton.onClick.add((()=>{this._pageCamera.scrollDown()}),this),this._component.leftButton.onClick.add((()=>{this._pageCamera.scrollLeft()}),this),this._component.rightButton.onClick.add((()=>{this._pageCamera.scrollRight()}),this),this._pageCamera.onAtEdgeChanged.add(this.updateButtonStates,this),this.updateButtonStates(),this._pageCamera.onBeginVerticalTween.add(this.onKeystrokeOfVerticalTween,this),this._pageCamera.onBeginHorizontalTween.add(this.onKeystrokeOfHorizontalTween,this)}onKeystrokeOfVerticalTween(k,B){B&&(this._pageCamera.y-k>0?this.makeScrollButtonPop(this._component.upButton,"CanMoveUp",this.forceEnabledUp):this.makeScrollButtonPop(this._component.downButton,"CanMoveDown",this.forceEnabledDown))}onKeystrokeOfHorizontalTween(k,B){B&&(this._pageCamera.x-k>0?this.makeScrollButtonPop(this._component.leftButton,"CanMoveLeft",this.forceEnabledLeft):this.makeScrollButtonPop(this._component.rightButton,"CanMoveRight",this.forceEnabledRight))}makeScrollButtonPop(k,B,U){const F=this._pageCamera[B]||U;this.updateButtonLock(!1,k),setTimeout(this.updateButtonLock.bind(this,F,k),H.D.BUTTON_FLASH_DURATION_MS)}close(){this.removeListeners(),super.close()}removeListeners(){this._component.upButton.onClick.removeAll(this),this._component.downButton.onClick.removeAll(this),this._component.leftButton.onClick.removeAll(this),this._component.rightButton.onClick.removeAll(this),this._pageCamera.onAtEdgeChanged.removeAll(this)}updateButtonLock(k,B){k?B.inputEnabled||(B.unlockState(),B.inputEnabled=!0):B.inputEnabled&&(B.lockState(Jt.K.Disabled),B.inputEnabled=!1)}updateButtonStates(){this.updateButtonLock(this._pageCamera.CanMoveUp||this.forceEnabledUp,this._component.upButton),this.updateButtonLock(this._pageCamera.CanMoveDown||this.forceEnabledDown,this._component.downButton),this.updateButtonLock(this._pageCamera.CanMoveLeft||this.forceEnabledLeft,this._component.leftButton),this.updateButtonLock(this._pageCamera.CanMoveRight||this.forceEnabledRight,this._component.rightButton)}}var ue=U(99625),fe=U(84317),be=U(92150);class pe{constructor(k,B){this._container=B.background.getChildAt(2),this._camera=k,this._screen=B,this.checkBackgroundLoaded()}destroy(){window.clearTimeout(this._timeoutID),this._camera.onUpdateHorizontalTween.removeAll(this)}checkBackgroundLoaded(){this._container.children.length>0?this.createBackgroundClone():this._timeoutID=window.setTimeout(this.checkBackgroundLoaded.bind(this),1)}createBackgroundClone(){this._backgroundImage=this._container.getChildAt(0),this._backgroundImage.addChild(new be._(this._screen.prodigyGame,F.q.instance.game.width,0,void 0,void 0,this._backgroundImage.texture)),this._camera.onUpdateHorizontalTween.add(this.updatePositions,this)}updatePositions(){this._backgroundImage.position.x=this._camera.x-this._camera.x%F.q.instance.game.width}}var ve=U(97071),ge=U(83726),me=(U(34829),U(9439));class ye{get town(){return this._town}get floor(){return this._floor}get skill(){return this._skill}get previousBlockCount(){return this._previousBlockCount}get newBlockCount(){return this._newBlockCount}get shouldAddStubbornShadow(){return this._shouldAddStubbornShadow}get shroudIsClearing(){return this._shroudIsClearing}get shouldAddShroud(){return this._shouldAddShroud}get hasRun(){return this._hasRun}constructor(k,B,U){this._shouldAddStubbornShadow=!1,this._newBlockCount=0,this._previousBlockCount=0,this._shroudIsClearing=!1,this._shouldAddShroud=!1,this._hasRun=!1,U&&(B.skillID=U.ID),this._shouldAddShroud=!B.hasShroud&&B.cleansRemaining(U)>0;const F=this._shouldAddShroud||B.isRenovating;this._newBlockCount=F?B.blockCount:ht.g.determineNewBlockCount(U,B),this._shroudIsClearing=B.hasShroud&&0===B.cleansRemaining(U),this._previousBlockCount=B.blockCount,this._shouldAddStubbornShadow=!!U&&ht.g.shouldHaveStubbornShadow(U,this._newBlockCount),this._town=k,this._floor=B,this._skill=U}applyChange(){this.hasRun||(this.apply(),this._hasRun=!0)}}class _e extends ye{apply(){const k=(0,it.last)(this.town.towers)||this.town.createTower();(k.canAddFloor()?k:this.town.createTower()).pushFloor(this.floor,!0,this.floor.isExternalBuild),this.floor.blockCount=this.newBlockCount}}class Ee extends ye{constructor(k,B,U,F=!1,G=B.state){super(k,B,U),this._hasIncorrectState=F,this._expectedState=G}apply(){this.floor.blockCount=this.newBlockCount,this._hasIncorrectState&&(this._expectedState!==_t.u.Complete||this.floor.isExternalBuild?this.floor.state=this._expectedState:this.floor.setComplete())}}class we{get _allChanges(){return[...this._updates,...this._additions]}get hasPendingChanges(){return this._allChanges.some((k=>!k.hasRun))}get additions(){return this._additions}get updates(){return this._updates}get totalNewFloors(){return this._additions.length}get totalNewBlocks(){return this._updates.map((k=>k.newBlockCount-k.previousBlockCount)).reduce(((k,B)=>k+B),0)}get totalNewShrouds(){return this._allChanges.map((k=>k.shouldAddShroud?1:0)).reduce(((k,B)=>k+B),0)}get totalShroudsCleared(){return this._allChanges.map((k=>k.shroudIsClearing?1:0)).reduce(((k,B)=>k+B),0)}get totalNewStubbornShadows(){return this._allChanges.map((k=>k.shouldAddStubbornShadow?1:0)).reduce(((k,B)=>k+B),0)}get totalUpdateChanges(){return(0,it.sum)([this.totalNewBlocks,this.totalNewFloors,this.totalShroudsCleared])}constructor(k,B){this._updates=k,this._additions=B}applyChanges(){this._allChanges.filter((k=>!k.hasRun)).forEach((k=>{k.applyChange()}))}}class Te{static hasIncorrectFloorState(k,B,U=!1){return k.state!==this.determineExpectedFloorState(k,B,U)}static determineExpectedFloorState(k,B,U=!1){return B&&U?ht.g.isSkillMastered(B)?_t.u.Complete:ht.g.isSkillLocked(B)?_t.u.SkillLocked:ht.g.shouldHaveStubbornShadow(B,ht.g.determineNewBlockCount(B,k))?_t.u.RooftopMastery:U?_t.u.UnderConstruction:_t.u.Complete:_t.u.Complete}}class Se{static generateTownUpdateSummary(k,B,U){return new we(Se.generateUpdates(k,B),Se.generateAdditions(k,U))}static generateAdditions(k,B){return B.map((B=>{if(!k.floors.find((k=>k.skillID===B.ID)))return new _e(k,(k=>{const B=new me.Z,U=pt.o.seededRange(1,5,k);return B.frameID=U+1,B.isExternalBuild=!0,B.roomID=U,B.skillID=k,B.state=_t.u.Complete,B})(B.ID),B)})).filter((k=>k))}static generateUpdates(k,B){const U=k.floors.length>0?k.floors[k.floors.length-1]:null;return k.floors.map((F=>{const G=this.findSkillByFloor(F,B),j=F===U;if(this.shouldUpdateFloor(F,G,j)){const B=Te.hasIncorrectFloorState(F,G,j),U=Te.determineExpectedFloorState(F,G,j);return new Ee(k,F,G,B,U)}})).filter((k=>k))}static findSkillByFloor(k,B){return B.find((B=>B.ID===k.skillID))}static shouldUpdateFloor(k,B,U=!1){return!B||k.skillID===B.ID&&(Te.hasIncorrectFloorState(k,B,U)||ht.g.getBlockDiscrepancy(B,k)>0||ht.g.shouldHaveStubbornShadow(B,ht.g.determineNewBlockCount(B,k)))}}class Ae extends W.uAl{constructor(){super(...arguments),this._playerTransitionTimeMS=1e3,this._floatTweenTimeMS=1400,this._wasGrounded=!0,this.transitionEase=W.GS3.Exponential.Out,this._playerContainer=null,this._floatling=null,this._camera=null}get playerContainer(){return this._playerContainer}set playerContainer(k){this.gameObject.legacyTransform.group.addChild(k),this._playerContainer=k}get floatling(){return this._floatling}set floatling(k){this._floatling=k}get camera(){return this._camera}set camera(k){this._camera&&(this._camera.onBeginHorizontalTween.removeAll(this),this._camera.onBeginVerticalTween.removeAll(this)),this._camera=k,this._camera&&(this._camera.onBeginHorizontalTween.add(this.onBeginHorizontalCameraMovement,this),this._camera.onBeginVerticalTween.add(this.onBeginVerticalCameraMovement,this))}create(){super.create(),this._game=F.q.instance.game}onEnable(){super.onEnable(),this._camera&&(this._camera.onBeginHorizontalTween.add(this.onBeginHorizontalCameraMovement,this),this._camera.onBeginVerticalTween.add(this.onBeginVerticalCameraMovement,this))}onDisable(){super.onDisable(),this._camera&&(this._camera.onBeginHorizontalTween.removeAll(this),this._camera.onBeginVerticalTween.removeAll(this))}onBeginHorizontalCameraMovement(k){this.Active&&(this._horizontalTween&&this._horizontalTween.stop(),this._horizontalTween=this._game.add.tween(this._playerContainer,this).to({x:k+H.D.PLAYER_CAMERA_OFFSET_X},this._playerTransitionTimeMS,this.transitionEase,!0))}onBeginVerticalCameraMovement(k){if(!this.Active)return;this._verticalTween&&this._verticalTween.stop();let B=k+H.D.PLAYER_CAMERA_OFFSET_Y;this._camera.CanMoveDown||(B=H.D.PLAYER_CAMERA_OFFSET_Y),this._verticalTween=this._game.add.tween(this._playerContainer,this).to({y:B},this._playerTransitionTimeMS,this.transitionEase,!0),this._verticalTween.onTweenComplete.removeAll(this),this.checkGrounded(B)}tweenToPosition(k,B=this._playerTransitionTimeMS,U=0,F=this.transitionEase){this.Active&&(this._verticalTween&&this._verticalTween.stop(),this._horizontalTween&&this._horizontalTween.stop(),this._horizontalTween=this._game.add.tween(this._playerContainer,this).to({x:k.x},B,F,!0,U),this._verticalTween=this._game.add.tween(this._playerContainer,this).to({y:k.y},B,F,!0,U),this._verticalTween.onTweenComplete.removeAll(this),this.checkGrounded(k.y))}tweenFloatling(k,B){this._swoopyTween&&this._swoopyTween.stop(),this._swoopyTween=this._game.add.tween(this._floatling,this).to({x:k,y:B-20},this._floatTweenTimeMS,W.GS3.Quadratic.InOut).to({x:k,y:B},this._floatTweenTimeMS,W.GS3.Quadratic.InOut).loop(!0),this._swoopyTween.start()}float(k){k?this.playerContainer.float(!0):(this.playerContainer.float(!1),this.playerContainer.stand())}checkGrounded(k){this.floatling&&(!this._wasGrounded&&k>H.D.PLAYER_BASE_Y?(this.playerContainer.isMounted()||this.float(!1),this._wasGrounded=!0,this.floatling.position.set(H.D.SWOOPY_OFFSET_X-10,0),this.tweenFloatling(H.D.SWOOPY_OFFSET_X-10,0)):this._wasGrounded&&k<=H.D.PLAYER_BASE_Y&&(this.float(!0),this.floatling.position.set(H.D.SWOOPY_OFFSET_X,H.D.SWOOPY_OFFSET_Y),this.tweenFloatling(H.D.SWOOPY_OFFSET_X,H.D.SWOOPY_OFFSET_Y),this._wasGrounded=!1))}}class Ce extends ge.T{constructor(){super(...arguments),this._mathTower=null,this._storeManager=null,this._prefabLoader=null,this._breadcrumbManager=null}get characterController(){return this._characterController}setup(k,B,U){super.setup(k,B,U),this._breadcrumbManager.init(),k.transparent=!1;const G=B.backgroundGameObject.addComponent(W.bE_),j=new ve.p(this.game);G.Installers.push(j),G.runInstallers(),this._towerRoot=new W._mx(B.backgroundGameObject),this.setupCameraController(),F.q.instance.prodigy.notifications.pause(this)}cleanup(){this._mathTower.destroy(),this.screen&&(this.screen.showMenu=!0),this._pageCamera.Active=!1,this._pageCamera.destroy(),F.q.instance.prodigy.notifications.resume(this),F.q.instance.prodigy.load.removeAssets(),super.cleanup()}setupCameraController(){this._pageCamera=this.screen.backgroundGameObject.addComponent(Dt),this._pageCamera.setTransitionDistanceScreenRatio(.5,.5)}setupCharacterController(){const k=F.q.instance.prodigy.create.spine(H.D.SWOOPY_OFFSET_X,H.D.SWOOPY_OFFSET_Y,H.D.SPINE_SWOOPY);k.setToSetupPose(),k.setAnimationByName(0,"pickup",!0),this.screen.user.addChild(k),this.screen.user.hideName(),this.screen.user.float(!0),this.zone.hideFollow(this.screen),this._characterController=this.screen.backgroundGameObject.addComponent(Ae),this._characterController.playerContainer=this.screen.user,this._characterController.floatling=k,this._characterController.camera=this._pageCamera,this._characterController.tweenToPosition(new W.I9Y(this._pageCamera.x,this._pageCamera.y))}generateTown(k=!1){const B=k?H.D.TUTORIAL_GRADE:this._mathTower.getGrade();this._town=this._mathTower.setCurrentTown(String(B),k)}refreshVisibleTown(){this._townRenderer.refreshVisibleFloors()}get pageCamera(){return this._pageCamera}get breadCrumbManager(){return this._breadcrumbManager}get storeManager(){return this._storeManager}get townRenderer(){return this._townRenderer}showInfinityTowerDialog(k=!1){this._stateManager.currentState!==this._stateManager.states.get(H.D.STATE_BUILD)&&(!this._mathTower.isInfinity&&this._mathTower.shouldUseInfinityTowerMode()?this._mathTower.uiFactory.showInfinityTowerIsOpen(this.onGoToInfinityButtonClicked.bind(this),this.onCloseInfinityTowerOpenDialog.bind(this)):this._mathTower.shouldUseBuildMode()&&(this._mathTower.isInfinity?this._mathTower.uiFactory.showTowerTownIsOpen(this.onGoToTowerTownClicked.bind(this),this.onCloseTowerTownOpenDialog.bind(this)):k&&!this._mathTower.isInfinity&&this._mathTower.uiFactory.showInfinityTowerIsClosed()))}onCloseTowerTownOpenDialog(){this._stateManager.changeToState(H.D.STATE_INFINITY,{backToTowerTown:!0})}onGoToTowerTownClicked(){this._stateManager.changeToState(H.D.STATE_INFINITY,{backToTowerTown:!0})}onCloseInfinityTowerOpenDialog(){this._stateManager.changeToState(H.D.STATE_CAMERA)}onGoToInfinityButtonClicked(){this._stateManager.changeToState(H.D.STATE_INFINITY,{enteringInfinity:!0})}generateTownUpdateSummary(k,B){const U=this._mathTower.education.getSkillsByGrade(B),F=this._mathTower.education.getSkillsMasteredByGrade(B);return Se.generateTownUpdateSummary(k,U,F)}}var Oe=U(91207),Ie=U(30857);class De extends W._mx{get decorations(){return this._decorations}set floatlingPool(k){this._floatlingPool=k}set decorationPool(k){this._decorationPool=k}get onClick(){return this._onClickSignal}constructor(k,B,U){super(B),this._underConstruction=!1,this._decorationIDs=[],this._decorationPositions=[],this._mathTower=null,this._decorations=[],this._storeManager=null,this._prefabLoader=null,this._quickRenoPrefab=null,this._quickRenoComponent=null,this._onClickSignal=new W.HN0,this._onFinishAssetLoad=null,this._storeManager=k,this._game=F.q.instance.game,this.addComponent(W.K16),this._mathTower=U;const G=new W._mx(this);G.addComponent(W.K16),this._skillBadgeFlag=G.addComponent(ut._),this._skillBadgeFlag.setAnchor(1,1);const j=this._skillBadgeFlag.GameObject.legacyTransform.group;j.scale.set(-1,1),j.position.x+=183,j.position.y-=60,j.visible=!1;const $=j.parent;j.setParent(this.legacyTransform.group),j.updateTransform(),j.setParent($);const H=new W._mx(this);H.addComponent(W.K16),this._skillBadge=H.addComponent(ut._),this._skillBadge.setAnchor(1,1);const V=this._skillBadge.GameObject.legacyTransform.group;V.position.x+=275,V.position.y-=80,V.visible=!1;const q=V.parent;V.setParent(this.legacyTransform.group),V.updateTransform(),V.setParent(q);const K=new W._mx(this);K.addComponent(W.K16),this._interior=K.addComponent(ut._);const z=new W._mx(this);z.addComponent(W.K16),this._frameLeft=z.addComponent(ut._);const Y=new W._mx(this);Y.addComponent(W.K16),this._frameRight=Y.addComponent(ut._),this._interior.setAnchor(.5,1),this._frameLeft.setAnchor(1,1),this._frameRight.setAnchor(1,1),this._frameRight.GameObject.legacyTransform.group.scale.set(-1,1);const Q=this._frameRight.GameObject.legacyTransform.group.parent;j.setParent(this.legacyTransform.group),this._frameRight.GameObject.legacyTransform.group.updateTransform(),this._frameRight.GameObject.legacyTransform.group.setParent(Q),this._flattenedSprite=F.q.instance.prodigy.create.image(0,0,null,null),this._flattenedSprite.anchor.set(.5,1),this._flattenedSprite.alpha=.75,this.legacyTransform.group.addChild(this._flattenedSprite),this._frameLeft.setInputEnabled(!0),this._frameRight.setInputEnabled(!0),this._frameLeft.getEvents().onInputDown.add(this.floorClicked.bind(this)),this._frameRight.getEvents().onInputDown.add(this.floorClicked.bind(this)),this._prefabLoader=F.q.instance.prodigy.gameContainer.get("d0e-64fd")}hideFloor(){this.disposeDecorations(),this.disposeFloatlings(),this._onFinishAssetLoad=null,this.active=!1,this._floor.onUpdate.removeAll(this),this._floor=null,W.Aq$.isDefined(this._quickRenoPrefab)&&this.removeQuickRenoPrefab()}floorClicked(){this._onClickSignal.dispatch()}disposeDecorations(){this._decorations.forEach((k=>{this.legacyTransform.group.removeChild(k.GameObject.legacyTransform.group),k.GameObject.active=!1})),this._decorations=[],this._decorationIDs=[],this._decorationPositions=[]}disposeFloatlings(){this._floatlingLeft&&(this._floatlingLeft.GameObject&&(this._floatlingLeft.GameObject.active=!1),this._floatlingLeft=null),this._floatlingRight&&(this._floatlingRight.GameObject&&(this._floatlingRight.GameObject.active=!1),this._floatlingRight=null)}updateInterior(){this._interiorID=this._storeManager.getItemImageName(H.D.ASSET_TYPE_INTERIOR,this._floor.roomID,this._underConstruction),this._interior.setAsset(Oe.E.getTowerTownImage(this._interiorID)).catch(W.RQr.createHandler("Error setting _interior"))}updateFrame(){this._frameID=this._storeManager.getItemImageName(H.D.ASSET_TYPE_FRAME,this._floor.frameID,this._underConstruction),this._frameLeft.setAsset(Oe.E.getTowerTownImage(this._frameID)).catch(W.RQr.createHandler("Error setting _frameLeft")),this._frameRight.setAsset(Oe.E.getTowerTownImage(this._frameID)).catch(W.RQr.createHandler("Error setting _frameRight"))}updateUnderConstruction(k=!1){const B=this._floor.isInBlueprintState();(this._underConstruction!==B||k)&&(this._underConstruction=B,this.updateInterior(),this.updateFrame(),this.updateDecorations(this._underConstruction),this.setObjectVisibility(this._underConstruction),this._underConstruction&&this.loadForBlueprint())}loadForBlueprint(){this._onFinishAssetLoad=this.drawTexture.bind(this),F.q.instance.prodigy.load.assets([this._frameID,this._interiorID,...this._decorationIDs].map((k=>Oe.E.getTowerTownImage(k))),(()=>{W.Aq$.isDefined(this._onFinishAssetLoad)&&this._onFinishAssetLoad()}))}displayFloor(k){if(this._floor){if(!this._floor.isExternalBuild&&this._floor===k)return;this._floor.onUpdate.removeAll(this)}this._floor=k,this._floor.onUpdate.add(this.onFloorUpdate,this),this.onUpdateFloorState(!0),this.updateFloatlings(),this.updateFlag()}setObjectVisibility(k){this._flattenedSprite.visible=k,this._frameRight.GameObject.active=!k,this._frameLeft.GameObject.active=!k,this._interior.GameObject.active=!k,this._decorations.forEach((B=>{B.GameObject.active=!k})),this.legacyTransform.group.setChildIndex(k?this._flattenedSprite:this._interior.GameObject.legacyTransform.group,0)}drawTexture(){const k=this._game.add.renderTexture(H.D.FRAME_WIDTH,H.D.FRAME_HEIGHT);this._frameLeft.setAsset(Oe.E.getTowerTownImage(this._frameID)).catch(W.RQr.createHandler("Error setting _frameLeft for drawTexture")),this._frameRight.setAsset(Oe.E.getTowerTownImage(this._frameID)).catch(W.RQr.createHandler("Error setting _frameRight for drawTexture")),this._interior.setAsset(Oe.E.getTowerTownImage(this._interiorID)).catch(W.RQr.createHandler("Error setting _interior for drawTexture"));const B=this._interior.sprite.visible,U=this._frameLeft.sprite.visible,F=this._frameRight.sprite.visible;this._frameRight.sprite.scale.x=-1,this._interior.sprite.visible=!0,this._frameLeft.sprite.visible=!0,this._frameRight.sprite.visible=!0,k.renderXY(this._interior.sprite,H.D.FRAME_HALF_WIDTH,H.D.FRAME_HEIGHT),k.renderXY(this._frameLeft.sprite,H.D.FRAME_HALF_WIDTH,H.D.FRAME_HEIGHT),k.renderXY(this._frameRight.sprite,H.D.FRAME_HALF_WIDTH,H.D.FRAME_HEIGHT),this._interior.sprite.visible=B,this._frameLeft.sprite.visible=U,this._frameRight.sprite.visible=F,this._frameRight.sprite.scale.x=1;for(let G=0;Gk.state===B.state?0:k.state===vt.a.Awake?1:-1)),this.removeFloatlings(k,this._floatlingLeft),this.removeFloatlings(k,this._floatlingRight),this._floatlingLeft=this.trySetFloatling(k,this._floatlingLeft,-1),this._floatlingRight=this.trySetFloatling(k,this._floatlingRight,1)}removeFloatlings(k,B){if(B){const U=k.indexOf(B.floatling);U>=0&&k.splice(U,1)}}trySetFloatling(k,B,U=1){let F=B;return 0===k.length?(F&&(F.GameObject.active=!1),null):(F||(F=this.getFloatling(H.D.FLOATLING_FLOOR_X_OFFSET*U,H.D.FLOATLING_FLOOR_Y_OFFSET)),F.floatling=k[0],k.splice(0,1),F)}getFloatling(k,B){const U=this._floatlingPool.getObject().findComponent(mt);return this.legacyTransform.group.addChildAt(U.GameObject.legacyTransform.group,1),U.GameObject.legacyTransform.group.alpha=0,this._game.add.tween(U.GameObject.legacyTransform.group,this).to({alpha:1},500).start(),U.GameObject.legacyTransform.group.position.set(k,B),U}updateDecorations(k=!1){this.disposeDecorations(),this._floor.decorations.keys.forEach((B=>{const U=this._floor.decorations.getAt(B);if(U){const F=this._decorationPool.getObject();this.parent.addChild(F);const G=this._floor.decorationPositions[B],j=this.legacyTransform.group;F.legacyTransform.group.position.set(G.x+j.position.x,G.y+j.position.y);const $=this._storeManager.getItemImageName(H.D.ASSET_TYPE_DECORATION,U.assetID,k),V=F.findComponent(ut._);V.setAsset(Oe.E.getTowerTownImage($)),this._decorations.push(V),this._decorationPositions.push(G),this._decorationIDs.push($)}}),this)}onFloatlingStateChange(k){k.state===vt.a.Floating&&k.floor!==this._mathTower.activeFloor&&(this._floatlingLeft&&this._floatlingLeft.floatling===k&&(this._floatlingLeft.GameObject.legacyTransform.y+=this.legacyTransform.y,this.parent.descendFloatling(this._floatlingLeft,!0),this._floatlingLeft=null),this._floatlingRight&&this._floatlingRight.floatling===k&&(this._floatlingRight.GameObject.legacyTransform.y+=this.legacyTransform.y,this.parent.descendFloatling(this._floatlingRight,!0),this._floatlingRight=null),this.updateFloatlings())}onFloorUpdate(k){let B=!1;switch(k.getFinalNotification().type){case lt.L.FLOOR_SET_STATE:this.onUpdateFloorState(),this.updateFlag(this._floor.isComplete);break;case lt.L.FLOOR_SET_ROOM_ID:B=!0,this.updateInterior();break;case lt.L.FLOOR_SET_FRAME_ID:B=!0,this.updateFrame();break;case lt.L.FLOOR_SET_DECORATIONS:B=!0,this.updateDecorations();break;case lt.L.FLOATLING_SET_STATE:this.onFloatlingStateChange(k.getFinalNotification().source)}B&&this._underConstruction&&this.loadForBlueprint()}onUpdateFloorState(k=!1){this._floor.isExternalBuild&&!this._floor.isRenovating?(this.setQuickRenoPrefabVisibility(!0),this.setFloorVisibility(!1)):(this.setQuickRenoPrefabVisibility(!1),this.updateUnderConstruction(k))}setQuickRenoPrefabVisibility(k){W.Aq$.isDefined(this._quickRenoPrefab)||(this._quickRenoPrefab=this._prefabLoader.loadFromGUID(H.D.UI_QUICK_RENOVATION,this),this._quickRenoComponent=this._quickRenoPrefab.findComponent(Ie.G),this._quickRenoComponent.quickRenovationButton.onClick.add(this.floorClicked.bind(this))),this._quickRenoPrefab.active=k}removeQuickRenoPrefab(){this._quickRenoPrefab.destroy(),this._quickRenoPrefab=null}setFloorVisibility(k){this._frameLeft.GameObject.active=k,this._frameRight.GameObject.active=k,this._interior.GameObject.active=k,W.Aq$.isDefined(this._flattenedSprite)&&(this._flattenedSprite.visible=k)}onQuickRenoClicked(){this.setFloorVisibility(!0),this.setQuickRenoPrefabVisibility(!1)}updateFlag(k=!1){if(this._floor)if(!this._floor.isComplete||this._floor.isExternalBuild||this._mathTower.isInfinity||this._mathTower.currentTown.isTutorialTown)this._skillBadge.GameObject.legacyTransform.group.visible=!1,this._skillBadgeFlag.GameObject.legacyTransform.group.visible=!1;else{const k=this._mathTower.education.getSkillById(this._floor.skillID);if(k&&W.Aq$.isDefined(k.topicGameIconAssetId)){const B=k.topicGameIconAssetId;this.setFlag(B),this._skillBadge.setAsset(H.D.ATLAS_TOPIC_ICONS,`topic-pixel-${B}`),this._skillBadge.GameObject.legacyTransform.group.visible=!0}else this.setFlag(H.D.NO_SKILL_FLAG_ICON_ID),this._skillBadge.GameObject.legacyTransform.group.visible=!1;this._skillBadgeFlag.GameObject.legacyTransform.group.visible=!0}}setFlag(k){it.includes(H.D.FLAG_ORANGE_SKILL_IDS,k)?this._skillBadgeFlag.setAsset(H.D.ATLAS_FLAGS,H.D.ASSET_ORANGE_FLAG_FRAME):it.includes(H.D.FLAG_BLUE_SKILL_IDS,k)?this._skillBadgeFlag.setAsset(H.D.ATLAS_FLAGS,H.D.ASSET_BLUE_FLAG_FRAME):it.includes(H.D.FLAG_RED_SKILL_IDS,k)?this._skillBadgeFlag.setAsset(H.D.ATLAS_FLAGS,H.D.ASSET_RED_FLAG_FRAME):it.includes(H.D.FLAG_PURPLE_SKILL_IDS,k)?this._skillBadgeFlag.setAsset(H.D.ATLAS_FLAGS,H.D.ASSET_PURPLE_FLAG_FRAME):this._skillBadgeFlag.setAsset(H.D.ATLAS_FLAGS,H.D.ASSET_TURQOISE_FLAG_FRAME)}destroy(){this._onClickSignal.dispose(),super.destroy()}}var Re=U(36648);class Pe extends W._mx{get onFloorClicked(){return this._floorClickedSignal}get onLuminTreeSpawned(){return this._luminTreeSpawnedSignal}constructor(k,B,U,G,j){super(B),this.floors=[],this.descendingFloatlings=[],this._floorClickedSignal=new W.HN0,this._luminTreeSpawnedSignal=new W.HN0,this.addComponent(W.K16),this._mathTower=k,this._floorPool=U,this._ornamentPool=G,this._floatlingPool=j,this._game=F.q.instance.game,this.groundFloatlingContainer=new W._mx(this),this.groundFloatlingContainer.addComponent(W.K16),this._luminTreeSpine=null}set tower(k){W.Aq$.isDefined(this._tower)&&(this._tower.onUpdate.removeAll(this),this.hideTower()),this._tower=k,this._tower.onUpdate.add(this.onTowerUpdate,this),this.floors=[];for(let B=0;B{At.Z.bringToTop(k.GameObject.legacyTransform.group)}));const F=!this._tower.isActiveTower,G=U>=this._tower.floors.length-1,j=!this._tower.isInfinityTower,$=0===this._mathTower.education.getPendingSkillsByGrade(this._mathTower.getGrade()).length,H=0===this._tower.floors.length;F&&G&&j||j&&$?this.spawnLuminTree():W.Aq$.isDefined(this._luminTreeSpine)&&this.setLuminTreeVisibility(!1),j&&$&&H&&this.setLuminTreeVisibility(!1),W.Aq$.isDefined(this._luminTreeSpine)&&At.Z.bringToTop(this._luminTreeSpine),At.Z.bringToTop(this.groundFloatlingContainer.legacyTransform.group)}refreshFloor(k,B=!1){this.floors[k]||(this.floors[k]=this._floorPool.getObject(),this.addChild(this.floors[k]),this.floors[k].legacyTransform.y=-k*H.D.FLOOR_HEIGHT),this.floors[k].displayFloor(this._tower.floors[k]),this.floors[k].onClick.removeAll(),this.floors[k].onClick.add(this.floorClicked.bind(this,k)),B&&this.realignTower()}realignTower(){this.floors.forEach((k=>{k&&At.Z.bringToTop(k.legacyTransform.group)}))}getFloor(k){return this.floors[k]||this.refreshFloor(k,!0),this.floors[k]}spawnLuminTree(k=!0){const B=-this._tower.floors.length*H.D.FLOOR_HEIGHT-H.D.LUMIN_TREE_OFFSET_Y;if(W.Aq$.isDefined(this._luminTreeSpine))return this.setLuminTreeVisibility(!0),void(this._luminTreeSpine.y=B);W.Aq$.isDefined(this._luminTreeSpine)||(this._luminTreeSpine=F.q.instance.prodigy.create.spine(0,B,H.D.SPINE_LUMIN_TREE,this.legacyTransform.group),this._luminTreeSpine.setToSetupPose(),k?(this._luminTreeSpine.setAnimationByName(0,"grow",!1),this._luminTreeSpine.onComplete.add(this.luminTreeSpawned.bind(this))):this._luminTreeSpine.setAnimationByName(0,"idle-noglow",!0)),this._luminTreeSpine.y=B}setLuminTreeVisibility(k){this._luminTreeSpine.visible=k}luminTreeSpawned(){this._luminTreeSpine.onComplete.removeAll(),this._luminTreeSpine.setAnimationByName(0,"idle-noglow",!0),this._luminTreeSpawnedSignal.dispatch()}renderOrnaments(){if(!W.Aq$.isDefined(this.ornaments)){this.ornaments=[];for(let k=0;k0;)0===k.get(U[B]).length?(k.delete(U[B]),U.splice(B,1)):(this.addGroundFloatling(k.get(U[B]).shift()),B++),B%=U.length;this.updateGroundFloatlingBounds()}addGroundFloatling(k){const B=this._floatlingPool.getObject().findComponent(mt);B.floatling=k,this.groundFloatlings.push(B),this.groundFloatlingContainer.addChild(B.GameObject)}disposeGroundFloatlings(){this.groundFloatlings&&(this.groundFloatlings.forEach((k=>{k.GameObject.active=!1})),this.groundFloatlings=null)}spawnAndDescendFloatlings(k){const B=this._floatlingPool.getObject().findComponent(mt);B.onFloatingAssetLoaded.addOnce((()=>{this.descendFloatling(B,!1)})),B.floatling=k}descendFloatling(k,B){this.groundFloatlingContainer.addChild(k.GameObject),At.Z.bringToTop(this.groundFloatlingContainer.legacyTransform.group),this.descendingFloatlings.push(k),B||(k.GameObject.legacyTransform.x=(H.D.FRAME_HALF_WIDTH+50)*(2*pt.o.integerInRange(0,2)-1)),k.floatDown(H.D.FLOATLING_WALK_AREA.y+H.D.FLOATLING_WALK_AREA.height,B,this.onFinishDescend.bind(this,k))}onFinishDescend(k){k.floatling.lastThrown=0;const B=this.descendingFloatlings.indexOf(k);this.descendingFloatlings.splice(B,1),-1===this._tower.floors.indexOf(k.floatling.floor)?this._tower.notifyUpdate(lt.L.TOWN_FIND_DESCENDED_FLOATLINGS_TOWER,k):this.addFloatlingRendererToGround(k)}addFloatlingRendererToGround(k){if(W.Aq$.isDefined(this.groundFloatlings)){if(this.groundFloatlings.push(k),this.updateGroundFloatlingBounds(!1),k.GameObject.parent!==this.groundFloatlingContainer){const B=k.GameObject.legacyTransform.group.getGlobalPosition().clone();this.groundFloatlingContainer.addChild(k.GameObject),k.GameObject.legacyTransform.group.updateTransform();const U=k.GameObject.legacyTransform.group.getGlobalPosition().clone();k.GameObject.legacyTransform.group.position=new rt.Point(k.GameObject.legacyTransform.group.position.x-(U.x-B.x),k.GameObject.legacyTransform.group.position.y-(U.y-B.y))}}else k.GameObject.active=!1}offsetWaitingViews(){const k=W.i7d.main;this.descendingFloatlings.filter((k=>k.waitingToDescend)).forEach((B=>{B.GameObject.legacyTransform.y=k.viewMatrix.ty-k.viewportSize.height,this.descendFloatling(B,!0)}))}updateGroundFloatlingBounds(k=!0){const B=W.M_G.clone(H.D.FLOATLING_WALK_AREA);B.height=B.height/this.groundFloatlings.length;for(let U=0;UH.D.FLOATLING_IMMEDIATE_WALK_RATIO&&this.groundFloatlings[U].setRandomWalkTarget(),B.y+=B.height,At.Z.bringToTop(this.groundFloatlings[U].GameObject.legacyTransform.group)}onTowerUpdate(k){switch(k.getFinalNotification().type){case lt.L.TOWER_CREATE_FLOOR:case lt.L.TOWER_MOVE_FLOOR:case lt.L.TOWER_PUSH_FLOOR:case lt.L.TOWER_REMOVE_FLOOR:this.renderFloors(this._floorsStart,this._floorsEnd);break;case lt.L.FLOOR_PUSH_FLOATLING:const B=k.getFinalNotification().source;B.isExternalBuild?(this.disposeGroundFloatlings(),this.renderFloors(this._floorsStart,this._floorsEnd)):this.spawnAndDescendFloatlings(B.floatlings[B.floatlings.length-1])}}destroy(){this._floorClickedSignal.dispose(),this._luminTreeSpawnedSignal.dispose(),super.destroy()}}class Me extends W.uAl{constructor(){super(...arguments),this._towerRenderers=[],this._mathTower=null,this._leftMostIndex=0,this._rightMostIndex=0,this._bottomMostIndex=0,this._topMostIndex=0,this._floorClickedSignal=new W.HN0}get infinityRenderer(){return this._infinityRenderer}get towerRenderers(){return this._towerRenderers}set town(k){this._town&&this._town.onUpdate.removeAll(this),this._town=k,this._town.onUpdate.add(this.onTownUpdate,this),this.refreshRenderers()}get floorPool(){return this._floorPool}get decorationPool(){return this._decorationPool}get floatlingPool(){return this._floatlingPool}get bottomMostIndex(){return this._bottomMostIndex}get topMostIndex(){return this._topMostIndex}get onFloorClicked(){return this._floorClickedSignal}create(){super.create(),this._game=F.q.instance.game,this._floorPool=new W.iyL(this.createFloor.bind(this)),this._decorationPool=new W.iyL(this.createDecoration.bind(this)),this._floatlingPool=new W.iyL(this.createFloatling.bind(this),this.resetFloatling.bind(this))}init(k,B,U,F=!1,G){this._mathTower=G,this._camera=B,this._storeManager=U,this.town=k,this._isTutorial=F,this._camera.onBeginHorizontalTween.add(this.onBeginHorizontalMove,this),this._camera.onUpdateVerticalTween.add(this.onVerticalMove,this),this._mathTower.onUpdate.add(this.onMathTowerUpdate.bind(this))}moveToFloor(k,B){const U=this._camera.transitionDistance.x*(k%2==0?k:k-1),F=H.D.TOWER_BASE_Y-H.D.FLOOR_HEIGHT*B-H.D.CAMERA_Y_OFFSET;this._camera.scrollToPosition(U,F)}onBeginHorizontalMove(k){k=this._camera.x-this._camera.transitionDistance.x?(this._leftMostIndex>0&&(this._leftMostIndex--,this._towerRenderers[this._leftMostIndex].renderFloors(this._bottomMostIndex,this._topMostIndex)),this._camera.onEndHorizontalTween.addOnce(this.onEndHorizontalStep,this)):k>this._camera.x&&k<=this._camera.x+this._camera.transitionDistance.x?(this._rightMostIndex{this._camera.onUpdateHorizontalTween.remove(this.onHorizontalMove),this.findHorizontalEdgeIndexes()})))}onEndHorizontalStep(){!this.isTowerOnScreen(this._leftMostIndex)&&this._leftMostIndex0&&(this._towerRenderers[this._rightMostIndex].hideTower(),this._rightMostIndex--)}onHorizontalMove(){this.findHorizontalEdgeIndexes();for(let k=0;k=this._leftMostIndex&&k<=this._rightMostIndex?this._towerRenderers[k].renderFloors(this._bottomMostIndex,this._topMostIndex):this._towerRenderers[k].hideTower()}onVerticalMove(){const k=this._bottomMostIndex,B=this._topMostIndex;if(this.findVerticalEdgeIndexes(),this._bottomMostIndex!==k||this._topMostIndex!==B){if(this._mathTower.isInfinity)return void this._infinityRenderer.renderFloors(this._bottomMostIndex,this._topMostIndex);for(let k=this._leftMostIndex;k<=this._rightMostIndex;k++)this._towerRenderers[k]&&this._towerRenderers[k].renderFloors(this._bottomMostIndex,this._topMostIndex)}}floorClicked(k,B){this._floorClickedSignal.dispatch(k,B)}isTowerOnScreen(k){if(k<0||k>=this._towerRenderers.length)return!1;const B=this._towerRenderers[k].legacyTransform.group.position.x-this._camera.x;return B>0&&B=this.bottomMostIndex&&k=this._towerRenderers.length){this._leftMostIndex--;break}for(this._rightMostIndex=this._towerRenderers.length-1;this._rightMostIndex>-1&&!this.isTowerOnScreen(this._rightMostIndex);)if(this._rightMostIndex--,this._rightMostIndex<0){this._rightMostIndex++;break}}findVerticalEdgeIndexes(){this._bottomMostIndex=-Math.floor((this._camera.y+this._camera.cameraHeight-H.D.TOWER_BASE_Y)/H.D.FLOOR_HEIGHT)-1,this._topMostIndex=this._bottomMostIndex+H.D.TOWER_RENDERER_CAMERA_HEIGHT,this._bottomMostIndex=Math.max(this._bottomMostIndex,0)}refreshVisibleFloors(){if(this._mathTower.isInfinity)this._infinityRenderer.renderFloors(this._bottomMostIndex,this._topMostIndex);else if(0!==this._towerRenderers.length)for(let k=this._leftMostIndex;k<=this._rightMostIndex;k++)this._towerRenderers[k].renderFloors(this._bottomMostIndex,this._topMostIndex)}createFloatling(){const k=new W._mx(this.GameObject);return k.addComponent(W.K16),k.addComponent(mt),k}resetFloatling(k){k.active=!0,k.legacyTransform.group.alpha=1,k.legacyTransform.group.visible=!0,k.legacyTransform.group.scale.set(1,1);k.findComponent(mt).spine.setSlotVisibility("shadow",!0)}createFloor(){const k=new De(this._storeManager,null,this._mathTower);return k.floatlingPool=this._floatlingPool,k.decorationPool=this._decorationPool,k}createDecoration(){const k=new W._mx;k.addComponent(W.K16);return k.addComponent(ut._).setAnchor(.5,.5),k}checkAwardFloatlings(k){k.canReceiveFloatlings&&k.awardFloatlings(this._storeManager)}offsetWaitingFloatlings(){this._mathTower.isInfinity?this._infinityRenderer&&this._infinityRenderer.offsetWaitingViews():this._towerRenderers.forEach((k=>{k.offsetWaitingViews()}))}onTownUpdate(k){if(this.GameObject.active)switch(k.getFinalNotification().type){case lt.L.TOWN_CREATE_TOWER:case lt.L.TOWN_PUSH_TOWER:this.addTowerRenderer(!0);break;case lt.L.TOWN_REMOVE_TOWER:this._towerRenderers.pop().destroy(),this._rightMostIndex>=this._towerRenderers.length&&(this._rightMostIndex=this._towerRenderers.length-1);break;case lt.L.TOWER_CREATE_FLOOR:case lt.L.TOWER_PUSH_FLOOR:case lt.L.TOWER_MOVE_FLOOR:case lt.L.TOWER_REMOVE_FLOOR:this.updateBounds(),this.refreshVisibleFloors();break;case lt.L.FLOOR_SET_STATE:this._isTutorial||this.checkAwardFloatlings(k.getLastChild().source);break;case lt.L.TOWN_FIND_DESCENDED_FLOATLINGS_TOWER:const B=k.getLastChild().value;if(-1!==this._infinityRenderer.tower.floors.indexOf(B.floatling.floor))break;for(let k=0;k(0,et.sH)(this,void 0,void 0,(function*(){if(!this.breadCrumbManager.isBreadcrumbComplete(Ot.M.TutorialCompleted))return F.q.instance.prodigy.world.playScene(H.D.TUTORIAL_CUTSCENE),void this.cleanup(!1);this.setupRenderers(),this.setupCharacterController(),this.setupFTUEElements(),this.setupNavButtons(F.q.instance.prodigy.open.menusGameObject),this.setupHUD(),this.setupStateManager(),this.setupNotifications(),setTimeout(this.processTownUpdates.bind(this),500)})),j=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player;J.U.progressData.step===z.B.NotStarted&&j.hasFoundAllKeystones()?at.E.runAllKeystonesSequenceOnMapSetup(G):G().catch(W.RQr.createHandler("TowerTownMap setup error finishing setup"))}cleanup(k=!0){var B;this.game.broadcaster.removeAppListener(H.D.MESSAGE_DISABLE_NAVIGATION,this),this.game.broadcaster.removeAppListener(H.D.MESSAGE_ENABLE_NAVIGATION,this),this.game.broadcaster.removeAppListener(H.D.MESSAGE_DISABLE_FLING_BUTTON,this),this.game.broadcaster.removeAppListener(H.D.MESSAGE_ENABLE_FLING_BUTTON,this),this.game.broadcaster.removeAppListener(H.D.MESSAGE_ENABLE_BUTTON,this),this.game.broadcaster.removeAppListener(H.D.MESSAGE_DISABLE_BUTTON,this),this._town&&this._town.onUpdate.removeAll(this),this._repeatingBackgroundController&&this._repeatingBackgroundController.destroy(),this.screen&&(k&&(null===(B=this.screen.menuBar)||void 0===B||B.destroy(),this.screen.menuBar=null),this.screen.showMenu=!0,this.screen.user.showName(),this.screen.user.float(!1)),this._mathTower.isInfinity=!1,this._hudContainer&&this._hudContainer.destroy(),this._mathTower.education.onUpdate.removeAll(this),super.cleanup()}setupCameraController(){super.setupCameraController(),this._pageCamera.registerKeyListeners(nt.D.UP,nt.D.DOWN,nt.D.LEFT,nt.D.RIGHT),this._pageCamera.registerKeyListeners(nt.D.W,nt.D.S,nt.D.A,nt.D.D)}setupNotifications(){this._mathTower.education.onUpdate.add(this.onEducationNotification,this)}generateTown(k=!1){super.generateTown(k);this._mathTower.currentTown.towers.length>0?this._mathTower.activeTower.isActiveTower=!0:this._mathTower.currentTown.createTower(),this.addCurrentTownAssets()}addCurrentTownAssets(){const k=[st._.Towertown_frames_store_json,st._.Towertown_interiors_store_json];W.Mnj.addAll(this.assets,k)}setupRenderers(){this._requiredLayers.forEach((k=>{let B=W.wa5.getActiveScene().getLayer(k);B||(B=W.wa5.getActiveScene().addLayer(k)),B.attachToCamera=!0}));const k=new W._mx(this.screen.backgroundGameObject);k.addComponent(W.K16),this._townRenderer=k.addComponent(Me),this._townRenderer.init(this._town,this._pageCamera,this._storeManager,!1,this._mathTower),this._repeatingBackgroundController=new pe(this.pageCamera,this.screen),this.game.stage.setBackgroundColor(H.D.TOWN_BG_COLOR)}setupCharacterController(){this.screen.user.position.set(H.D.PLAYER_CAMERA_OFFSET_X,H.D.PLAYER_CAMERA_OFFSET_Y),W.Aq$.isDefined(this.screen.user.follow)&&this.screen.user.follow.position.set(H.D.PLAYER_CAMERA_OFFSET_X,H.D.PLAYER_CAMERA_OFFSET_Y),super.setupCharacterController()}setupFTUEElements(){this._awakeFloatlings=this._mathTower.getFloatlingsForFling().length,this.breadCrumbManager.isBreadcrumbComplete(Ot.M.FlingUnlocked)&&!this.breadCrumbManager.isBreadcrumbComplete(Ot.M.FlingTutorialComplete)&&this._awakeFloatlings{this._mathTower.setClickable(!0)}),this),this.game.broadcaster.addAppListener(H.D.MESSAGE_DISABLE_BUTTON,(()=>{this._mathTower.setClickable(!1)}),this)}setupStateManager(){this._stateManager=new ct(this._mathTower,this._prefabLoader,this),this._stateManager.addState(H.D.STATE_CAMERA,new Pt(this._pageCamera,this.cameraHUDInterface)),this._stateManager.addState(H.D.STATE_CHOOSE_FLOOR,new xt),this._stateManager.addState(H.D.STATE_BUILD,new Tt),this._stateManager.addState(H.D.STATE_START,new he),this._stateManager.addState(H.D.STATE_SHROUD,new oe),this._stateManager.addState(H.D.STATE_ROOFTOP,new re),this._stateManager.addState(H.D.STATE_MOVE,new se),this._stateManager.addState(H.D.STATE_INFINITY,new ie(this._townRenderer)),this._stateManager.addState(H.D.STATE_INFINITY_CHOOSE_FLOOR,new Zt),this._stateManager.addState(H.D.STATE_INFINITY_BUILD,new Xt),this._stateManager.addState(H.D.STATE_FLING,new Yt(this._townRenderer.floatlingPool)),this._stateManager.addState(H.D.STATE_QUICK_RENO,new ne)}disableNavigation(){this._mathTower.uiFactory.hud.toggleVisible(!1),this._mathTower.setClickable(!1),this._hudContainer.active=!1,this._pageCamera.onDisable()}enableNavigation(){this._mathTower.uiFactory.hud.toggleVisible(!0),this._hudContainer.active=!0,this._mathTower.setClickable(!0),this._pageCamera.onEnable()}enableFlingButton(){this._mathTower.uiFactory.hud.toggleFlingButton(!0)}disableFlingButton(){this._mathTower.uiFactory.hud.toggleFlingButton(!1)}setAllFloatlingsLastThrownTime(k,B){for(let U=0;U{U.lastThrown=k,U.state=B}))}processTownUpdates(){const k=this.generateTownUpdateSummary(this._town,this._mathTower.getGrade());k.hasPendingChanges?(this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_DISABLE_NAVIGATION),k.applyChanges(),k.totalUpdateChanges>0?(this._stateManager.dialogueController.addEvents([{dialogueData:this._stateManager.dialogueController.dataProvider.get(H.D.DIALOGUE_WELCOME_BACK),blockInput:!0,yes:()=>{this._mathTower.showTownUpdate(k,(()=>{F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this.startNewGradeSequence()}))},no:this.startNewGradeSequence.bind(this)}]),this._stateManager.dialogueController.start(!0)):this.startNewGradeSequence()):this.startNewGradeSequence()}startNewGradeSequence(){this._mathTower.newGrade?(this._mathTower.newGrade=!1,this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_DISABLE_NAVIGATION),this._mathTower.uiFactory.openNewGradePopup((()=>{this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_ENABLE_NAVIGATION),setTimeout((()=>{this.startGame()}),500)}))):this.startGame()}startGame(){this._mathTower.uiFactory.start(),this._stateManager.changeToState(H.D.STATE_START),this.setupInfinityTowerListener()}setupInfinityTowerListener(){this._mathTower.onUpdate.add((k=>{k.type===lt.L.TOWER_TOWN_INFINITY_TOWER_OPEN&&this.showInfinityTowerDialog()}))}checkFlingBreadcrumb(k){this.breadCrumbManager.isBreadcrumbComplete(Ot.M.FlingUnlocked)||k.state===vt.a.Wandering&&(this._awakeFloatlings++,this._awakeFloatlings>=H.D.FLING_FTUE_FLOATLING_COUNT&&(this.breadCrumbManager.completeBreadcrumb(Ot.M.FlingUnlocked),this._mathTower.uiFactory.hud.updateBreadcrumbsLocked()))}beginFloatlingWander(){const k=(0,it.shuffle)(this.townRenderer.floatlingPool.aliveList.generateArray());for(let U=0;U{this._buildInterface.forceRightAnswer(),this._buildInterface.buildButton.inputEnabled=!1}))}floorFinished(){this.completeFloor(),this.switchState(H.D.STATE_TUTORIAL_END)}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],Le.prototype,"buildButtonClicked",null);class ke extends wt{constructor(k){super(),this._toolTip=null,this._towerTownBreadcrumbManager=k}onEnter(){this._dialogueController=new xe.Y(this._mathTower);const k=this._owner.nextFloorPosition();this._chooseFloor=this._mathTower.uiFactory.chooseFloorLook(k,this._towerTownBreadcrumbManager),this._chooseFloor.onCreate.add(this.setupTempFloor.bind(this)),this._chooseFloor.onCreate.add(this.bindButtons.bind(this)),this._chooseFloor.selectionChanged.add(this.selectionChanged.bind(this)),this._toolTip=Ft.A.displayToolTipSpeech(this._toolTip,F.q.instance.prodigy.open.menusGameObject,{bodyText:F.q.instance.prodigy.gameContainer.get(W.$Bt.LocalizationService).getText("TT_FTUE_CHOOSE_FLOOR"),xPosition:315,yPosition:350,arrowXRelPos:.7,arrowDirection:Ct.i.DOWN}),this._owner.map.screen.backgroundGameObject.addChild(this._toolTip.GameObject)}bindButtons(){this._chooseFloor.startBuildingButton.onClick.add(this.onStartBuildingClicked.bind(this)),this._chooseFloor.quitButton.lockState(Jt.K.Disabled),this._chooseFloor.quitButton.inputEnabled=!1,this._chooseFloor.framesToggleButton.GameObject.destroy(),this._chooseFloor.decorationsToggleButton.GameObject.destroy();const k=this.getFloorPosition(),B=k.x-H.D.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_X;this._chooseFloor.startBuildingButton.GameObject.legacyTransform.group.position.set(B,k.y+H.D.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_Y)}getFloorPosition(){const k=this._mathTower.currentTown.towers.length-1,B=this._mathTower.currentTown.towers[k].floors.length;return this._owner.getFloorPosition(k+.5,B)}setupTempFloor(){let k=this._mathTower.activeTower;(!W.Aq$.isDefined(k)||k.floors.length>=ot.o.MAXIMUM_FLOOR_COUNT)&&(k=this._mathTower.currentTown.createTower()),this._tempFloor=k.createFloor(this._mathTower.currentSkillID),this._tempFloor.blockCount=H.D.MAX_SMART_BLOCKS,this._tempFloor.roomID=1,this._tempFloor.frameID=2,this._tempFloor.blockCount=ht.g.determineNewBlockCount(this._mathTower.education.getSkillById(this._tempFloor.skillID),this._tempFloor),this._dialogueController.addGuideHand(this._chooseFloor.roomsToggleButton.GameObject.legacyTransform.group,this._mathTower.game.width/2,30)}onStartBuildingClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._mathTower.uiFactory.tooltip(F.q.instance.prodigy.gameContainer.get(W.$Bt.LocalizationService).getText("TT_FTUE_TUTORIAL"),!0,250,0,0),this._toolTip.close(),this._tempFloor.blockCount=0,this._chooseFloor.close(),this._mathTower.activeFloor.state=_t.u.UnderConstruction,this._dialogueController.showCastSpells((()=>{this.switchState(H.D.STATE_TUTORIAL_BUILD)}))}selectionChanged(k){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._tempFloor.roomID=W.Aq$.isDefined(k.roomID)?k.roomID:1,this._tempFloor.frameID=W.Aq$.isDefined(k.frameID)?k.frameID:2,this._tempFloor.decorations.clear(),k.decorations&&k.decorations.forEach((B=>{this._tempFloor.decorations.setAt(B,k.decorations.get(B))})),this._hasChanged||(this._toolTip=Ft.A.displayToolTipSpeech(this._toolTip,F.q.instance.prodigy.open.menusGameObject,{bodyText:F.q.instance.prodigy.gameContainer.get(W.$Bt.LocalizationService).getText("TT_FTUE_START_BUILDING"),xPosition:640,yPosition:245,arrowXRelPos:.5,arrowDirection:Ct.i.DOWN}),this._hasChanged=!0)}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],ke.prototype,"onStartBuildingClicked",null);var Be=U(96810);class Ue extends wt{constructor(k,B){super(),this.tweenDelayMS=500,this.tweenFloatHorizontally=1e3,this.tweenFloatVertically=2800,this._pageCamera=k,this._breadcrumbManager=B}onEnter(){this._pageCamera.Active=!0,this._dialogueController=new xe.Y(this._mathTower),this._dialogueController.showAllDone(this.spawnFloatlings.bind(this))}onExit(){this._pageCamera.Active=!1}spawnFloatlings(){const k=this.createFloatling(364,-100);this.tweenFloatling(k,420,400);const B=this.createFloatling(924,-100);this.tweenFloatling(B,988,445,600),this._dialogueController.showTutorialCompleted(this.completeTutorial.bind(this))}completeTutorial(){this._owner.map.storeManager.removeDefaultItems(),this._breadcrumbManager.completeBreadcrumb(Ot.M.TutorialCompleted),F.q.instance.prodigy.world.it(H.D.TOWER_TOWN_MAP),F.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:"Tower Town",funnelType:"tutorial",stepName:Be.l.TutorialComplete})}createFloatling(k,B){const U=F.q.instance.prodigy.create.spine(k,B,H.D.SPINE_SWOOPY);return U.setToSetupPose(),U.setAnimationByName(0,"idle",!0),U}tweenFloatling(k,B,U,F=0){const G=this._mathTower.game.add.tween(k,this).to({x:B},this.tweenFloatHorizontally,W.GS3.Quadratic.InOut).delay(this.tweenDelayMS+F).yoyo(!0),j=this._mathTower.game.add.tween(k,this).to({y:U},this.tweenFloatVertically,W.GS3.Quadratic.InOut).delay(F);G.start(),j.start()}}class Fe extends wt{constructor(k){super(),this._pageCamera=k}onEnter(){this._pageCamera.Active=!0,this._dialogueController=new xe.Y(this._mathTower),this._owner.map.storeManager.pushDefaultItems(),this.spawnAddFloorPrefab()}onExit(){this._pageCamera.Active=!1,this._toolTip.destroy(),W.Aq$.isDefined(this._addFloor)&&W.Aq$.isDefined(this._addFloor.GameObject)&&(this._addFloor.addFloorButton.onClick.removeAll(),this._addFloor.GameObject.destroy()),W.Aq$.isDefined(this._buildInterface)&&this._buildInterface.close()}spawnAddFloorPrefab(){const k=this._owner.prefabLoader.loadFromGUID(H.D.UI_ADD_FLOOR_PREFAB,this._owner.map.screen.backgroundGameObject);this._addFloor=k.findComponent(Rt.R),k.legacyTransform.group.position=this._owner.nextFloorPosition(),k.legacyTransform.group.position.x+=H.D.FLOOR_TUTORIAL_OFFSET,this._addFloor.newTowerButton.GameObject.destroy(),this._addFloor.addFloorButton.GameObject.legacyTransform.y+=H.D.ADD_FLOOR_BUTTON_OFFSET,this._owner.moveToNextFloor(),this._addFloor.addFloorButton.onClick.add(this.onAddFloorButtonClicked.bind(this)),this._toolTip=this._mathTower.uiFactory.tooltip(F.q.instance.prodigy.gameContainer.get(W.$Bt.LocalizationService).getText("TT_FTUE_TUTORIAL"),!0,250,0,0),this._addFloor.addFloorButton.inputEnabled=!1,F.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:"Tower Town",funnelType:"tutorial",stepName:Be.l.TutorialStart});const B=new W.I9Y(this._addFloor.addFloorButton.GameObject.legacyTransform.width,0);this._dialogueController.showSwoopyIntroduction(this._addFloor.addFloorButton.GameObject,B,(()=>{this._addFloor.addFloorButton.inputEnabled=!0}))}onAddFloorButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._dialogueController.removeGuideHand(this._addFloor.addFloorButton.GameObject.legacyTransform.group),this.switchState(H.D.STATE_TUTORIAL_CHOOSE_FLOOR)}}class Ge extends Ce{constructor(k,B,U,F,G,j){super(k,"A0","TOWER_TOWN_TUTORIAL_MAP",235,480,["towertown-A0"],j,"towertown-tutorial"),this._mathTower=B,this._breadcrumbManager=U,this._storeManager=F,this._prefabLoader=G}setup(k,B,U){super.setup(k,B,U);const G=F.q.instance.prodigy.create.spine(300,480,H.D.SPINE_SWOOPY,B.background);G.setToSetupPose(),G.setAnimationByName(0,"idle",!0),B.user.hideName(),this._pageCamera=B.backgroundGameObject.addComponent(Dt);const j=new W._mx(B.backgroundGameObject);j.addComponent(W.K16),this._townRenderer=j.addComponent(Me),this._townRenderer.init(this._town,this._pageCamera,this._storeManager,!this._breadcrumbManager.isBreadcrumbComplete(Ot.M.TutorialCompleted),this._mathTower),this._mathTower.buildUIFactory(B,this),B.showMenu=!1,k.broadcaster.broadcast(Y.Y1.HideHUD,Y.HG.HUD),this._stateManager=new ct(this._mathTower,this._prefabLoader,this),this._stateManager.addState(H.D.STATE_TUTORIAL_START,new Fe(this._pageCamera)),this._stateManager.addState(H.D.STATE_TUTORIAL_CHOOSE_FLOOR,new ke(this._breadcrumbManager)),this._stateManager.addState(H.D.STATE_TUTORIAL_BUILD,new Le),this._stateManager.addState(H.D.STATE_TUTORIAL_END,new Ue(this._pageCamera,this._breadcrumbManager)),this._stateManager.changeToState(H.D.STATE_TUTORIAL_START),k.stage.setBackgroundColor(H.D.TUTORIAL_BG_COLOR)}cleanup(){super.cleanup()}}class je extends j.b{constructor(k){super(k),this.difficultyModeAgnostic=!0,this.name="TowerTownZone",this.ID=je.ZONE_ID,this.battleBG="towertown-default-2",this.defaultOnFaint="towertown-A1",this.questHub="towertown-A1",this.states=["firstVisit"],this.bgmID=H.D.TOWER_TOWN_BGM_ID,this.zoneIndex=G.P.TowerTown;const B=F.q.instance.prodigy.gameContainer.get($.G.MathTower),U=F.q.instance.prodigy.gameContainer.get($.G.StoreManager),j=F.q.instance.prodigy.gameContainer.get("d0e-64fd"),V=F.q.instance.prodigy.gameContainer.get($.G.BreadcrumbManager);this.maps={A0:new Ge(this,B,V,U,j,je.ASSETS),A1:new Ne(this,B,V,U,j,je.ASSETS)},this.scenes={intro:new tt(this,je.ASSETS)}}teleport(k,B,U,F,G){this.maps[k].generateTown("A0"===k),super.teleport(k,B,U,F,G)}teleportLoad(){F.q.instance.prodigy.load.removeAssets(!0),super.teleportLoad()}}je.ZONE_ID=V.A_.TOWERTOWN,je.ASSETS=[H.D.ATLAS_CORE,H.D.ATLAS_CORE_2,H.D.ATLAS_ICONS,H.D.ATLAS_UI_TITAN,H.D.ATLAS_SHIPWRECK_PROGRESS,H.D.ATLAS_SHIVERCHILL_PROGRESS,H.D.ATLAS_BUTTONS,H.D.ATLAS_DIALOGUES,H.D.ATLAS_STORE,H.D.ATLAS_REGISTRATION,H.D.ATLAS_TOWERTOWN_MISC,H.D.ATLAS_TOWERTOWN,H.D.ATLAS_PANELS,H.D.ATLAS_FLING_TARGETS,H.D.ATLAS_RESEARCH_POINTS,H.D.ATLAS_FLAGS,H.D.ATLAS_TOPIC_ICONS,H.D.ATLAS_SWOOPY_FACE,H.D.SPINE_SHADOW_PORTAL,H.D.SPINE_FLOATING_FIRE_1,H.D.SPINE_FLOATING_ICE_1,H.D.SPINE_FLOATLING_PLANT_1,H.D.SPINE_FLOATLING_STORM_1,H.D.SPINE_LUMIN_TREE,H.D.SPINE_SWOOPY,H.D.SPINE_FLING_SHIMMER,H.D.SPINE_STUBBORN_SHADOW,H.D.SPINE_SHROUD_CLOUD,H.D.SPINE_FLAGPOLE,H.D.PUPPETMASTER_BGM,H.D.TOWER_TOWN_BGM,H.D.FLOATLING_FLING_BGM,H.D.SHADOW_PORTAL_OPEN,H.D.SHADOW_PORTAL_CLOSE,H.D.TOWER_TOWN_SFX,H.D.FLOATLING_FLING_SFX,H.D.TILESET_CLOUD,H.D.TILESET_CLOUD_NEW,H.D.TILESET_COLLISIONS,H.D.TILESET_FOREST_NEW,H.D.TILESET_GENERIC,H.D.TILESET_GENERIC_NEW,H.D.TILESET_MATH_TOWER_BASIC,H.D.TILESET_TUTORIAL_SUBSPACE,H.D.TILESET_INFINITY_TOWER_CONSTRUCTION,H.D.TILESET_OUTSIDE,H.D.TILESET_TOWERTOWN_BASIC,H.D.TILESET_TOWN_NEW]},90161:(k,B,U)=>{"use strict";U.d(B,{R:()=>j});var F=U(82680),G=U(64794);class j extends F.W{constructor(k,B,U,F,j){super(k,B,G.D.BASE_MENU_ASSET_ID,void 0,j),this._mathTower=U,this._prefabLoader=F}get mathTower(){return this._mathTower}get prefabLoader(){return this._prefabLoader}}},3836:(k,B,U)=>{"use strict";U.d(B,{_:()=>z,i:()=>F});var F,G=U(62459),j=U(35120),$=U(76974),H=U(64794),V=U(15678),W=U(84938),q=U(90161),K=U(50860);!function(k){k[k.Normal=0]="Normal",k[k.Tutorial=1]="Tutorial",k[k[1/0]=2]="Infinity",k[k.QuickReno=3]="QuickReno"}(F||(F={}));class z extends q.R{constructor(k,B,U,j,$,V,W,q=F.Normal){super(k,B?B.legacyTransform.group:void 0,U,j,[H.D.ATLAS_MATH_TOWER,H.D.SPINE_SMART_BLOCK_VFX]),this._onBuildAnimationComplete=new G.HN0,this._onFloorFinished=new G.HN0,this._onWrongAnswer=new G.HN0,this._parentGameObject=null,this._state=F.Normal,this._parentGameObject=B,this._floor=$,this._compX=V,this._compY=W,this._state=q}create(){const k=this.prefabLoader.load(H.D.UI_BUILD_COMPONENT_PREFAB,this._parentGameObject);k.legacyTransform.group.position=k.legacyTransform.group.position.set(k.legacyTransform.group.position.x+this._compX,k.legacyTransform.group.position.y+this._compY),this._inProgressComponent=k.findComponent(K.v);for(let B=0;B{this.floorFinished()}),this._state===F.Tutorial?this.quickBuild(k):this._state===F.QuickReno?this.onSkillMastered(k):this.startBlockAnimation(k,B,!0,!0)}forceRightAnswer(){this.quickBuild(this._floor.blockCount)}onSkillMastered(k){this._floor.blockCount=H.D.MAX_SMART_BLOCKS,this.dropBlocks(k,H.D.MAX_SMART_BLOCKS,this.floorFinished.bind(this))}dropBlocks(k,B,U){for(let F=k;F{if(this.game){let k;F===B-1&&(k=U),this.startBlockAnimation(F,k,!1,!1)}}),(F-k)*H.D.BLOCK_FALL_MULTIPLE_DELAY)}quickBuild(k){this._floor.blockCount{this._inProgressComponent.buildButton.inputEnabled=!0,this._inProgressComponent.buildButton.currentState=$.K.Up,this._onBuildAnimationComplete.dispatch()}))):this.onSkillMastered(k)}get buildButton(){return this._inProgressComponent.buildButton}get onBuildAnimationComplete(){return this._onBuildAnimationComplete}get floorFinishedSignal(){return this._onFloorFinished}get wrongAnswerSignal(){return this._onWrongAnswer}get gameObject(){return this._gameObject}floorFinished(){this._state===F.QuickReno&&(this._state=F.Normal),this._inProgressComponent.buildButton.inputEnabled=!0,this._inProgressComponent.buildButton.currentState=$.K.Up,setTimeout((()=>{this._onFloorFinished.dispatch()}),100)}qiCallback(k){const B=this.mathTower.education.getSkillById(this._floor.skillID);V.g.isSkillMastered(B)&&this._state!==F.QuickReno?this.onSkillMastered(this._floor.blockCount):k?this.onRightAnswer(this._floor.blockCount):(this._inProgressComponent.buildButton.inputEnabled=!0,this._inProgressComponent.buildButton.currentState=$.K.Up,this._onWrongAnswer.dispatch())}infinityQiCallback(k){k?this.onRightAnswer(this._floor.blockCount++):(this._inProgressComponent.buildButton.inputEnabled=!0,this._inProgressComponent.buildButton.currentState=$.K.Up,this._onWrongAnswer.dispatch())}startBlockAnimation(k,B,U=!1,F=!1){this._inProgressComponent.setBlockEnabled(k,!0),this._inProgressComponent.setBlockGraphicVisible(k,!1),this._floor.blockCount=k+1;const G=this._inProgressComponent.blocks[k],$=j.q.instance.prodigy.create.spine(H.D.BLOCK_OFFSET_X,H.D.BLOCK_OFFSET_Y-H.D.BLOCK_FALL_HEIGHT,H.D.SPINE_SMART_BLOCK_VFX);G.legacyTransform.group.addChild($),$.setToSetupPose(),$.setAnimationByName(0,"appear",!1).timeScale=H.D.BLOCK_APPEAR_TIMESCALE,$.onComplete.add(this.makeBlockTween.bind(this,k,$,B,U,F)),j.q.instance.prodigy.audio.playSFX(H.D.TOWER_TOWN_SFX_ID,H.D.DROP_BLOCK)}makeBlockTween(k,B,U,F=!1,G=!1){this._inProgressComponent.blocks[k];B.y=H.D.BLOCK_OFFSET_Y,B.setToSetupPose(),B.setAnimationByName(0,"land2",!1).timeScale=H.D.BLOCK_FALL_TIMESCALE,this.shakeScreen(H.D.BLOCK_FALL_SHAKE_ANIMATION_DELAY);B.onComplete.removeAll(),B.onComplete.add((()=>{F&&(this._inProgressComponent.buildButton.inputEnabled=!0,this._inProgressComponent.buildButton.currentState=$.K.Up),this._inProgressComponent.setBlockGraphicVisible(k,!0),window.setTimeout((()=>{this.deleteSpine(B)}),1),G&&this._onBuildAnimationComplete.dispatch()}).bind(this)),U&&B.onComplete.add(U)}deleteSpine(k){k.visible=!1,k.pendingDestroy=!0}shakeScreen(k=0){const B=this.game.world.getChildAt(0),U=this.game.add.tween(B,this).to({y:H.D.BLOCK_FALL_SHAKE_DISTANCE*W.B.screenShake.value},H.D.BLOCK_FALL_SHAKE_IN_TIME,G.GS3.Linear.None,!1,k),F=this.game.add.tween(B,this).to({y:0},H.D.BLOCK_FALL_SHAKE_OUT_TIME,G.GS3.Bounce.Out);U.chain(F),U.start()}}},14991:(k,B,U)=>{"use strict";var F;U.d(B,{v:()=>F}),function(k){k[k.Visible=0]="Visible",k[k.Hidden=1]="Hidden",k[k.SlidingOut=2]="SlidingOut",k[k.SlidingIn=3]="SlidingIn"}(F||(F={}))},67844:(k,B,U)=>{"use strict";U.d(B,{R:()=>V});var F=U(8674),G=U(62459),j=U(49237),$=U(28152),H=U(64794);let V=class extends G.uAl{constructor(){super(...arguments),this._addFloorButton=null,this._newTowerButton=null}get addFloorButton(){return this._addFloorButton}get newTowerButton(){return this._newTowerButton}removeNewTowerButton(){this.newTowerButton.GameObject.destroy(),this.addFloorButton.GameObject.legacyTransform.y+=H.D.ADD_FLOOR_BUTTON_OFFSET}};(0,F.Cg)([(0,G.x4W)("addFloorButton"),(0,F.Sn)("design:type",j.$)],V.prototype,"_addFloorButton",void 0),(0,F.Cg)([(0,G.x4W)("newTowerButton"),(0,F.Sn)("design:type",j.$)],V.prototype,"_newTowerButton",void 0),V=(0,F.Cg)([(0,G.EVk)("AddFloorComponent",$.Y.towerTown)],V)},21573:(k,B,U)=>{"use strict";U.d(B,{s:()=>G});var F=U(62459);class G extends F.uAl{constructor(){super(...arguments),this._selected=new F.HN0}get selected(){return this._selected}onSelection(){this._selected.dispatch(this.assetID,this.assetType)}destroy(){this._selected.dispose(),super.destroy()}}},22162:(k,B,U)=>{"use strict";U.d(B,{B:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._upButton=null,this._downButton=null,this._leftButton=null,this._rightButton=null}get upButton(){return this._upButton}get downButton(){return this._downButton}get leftButton(){return this._leftButton}get rightButton(){return this._rightButton}};(0,F.Cg)([(0,G.x4W)("upButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_upButton",void 0),(0,F.Cg)([(0,G.x4W)("downButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_downButton",void 0),(0,F.Cg)([(0,G.x4W)("leftButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_leftButton",void 0),(0,F.Cg)([(0,G.x4W)("rightButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_rightButton",void 0),H=(0,F.Cg)([(0,G.EVk)("CameraControlHUD",$.Y.ui)],H)},25735:(k,B,U)=>{"use strict";U.d(B,{I:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._quitButton=null}get quitButton(){return this._quitButton}};(0,F.Cg)([(0,G.x4W)("QuitButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_quitButton",void 0),H=(0,F.Cg)([(0,G.EVk)("CornerQuitComponent",$.Y.towerTown)],H)},99332:(k,B,U)=>{"use strict";var F;U.d(B,{R:()=>F}),function(k){k[k.StartBuilding=0]="StartBuilding",k[k.Quit=1]="Quit",k[k.Rooms=2]="Rooms",k[k.Frames=3]="Frames",k[k.Decorations=4]="Decorations",k[k.PageLeft=5]="PageLeft",k[k.PageRight=6]="PageRight"}(F||(F={}))},39258:(k,B,U)=>{"use strict";U.d(B,{p:()=>q});var F=U(8674),G=U(62459),j=U(49237),$=U(76974),H=U(83133),V=U(28152),W=U(99332);let q=class extends G.uAl{constructor(){super(...arguments),this._largeItems=[],this._smallItems=[],this._commandSignal=new G.HN0}get commands(){return this._commandSignal}get largeItemPointer(){return this._largeItemPointer}get smallItemPointer(){return this._smallItemPointer}get largeItemContainer(){return this._largeItemContainer}get smallItemContainer(){return this._smallItemContainer}get largeItemPoints(){return this._largeItems}get smallItemPoints(){return this._smallItems}get quitButton(){return this._quit}get startBuildingButton(){return this._startBuilding}get roomsToggle(){return this._rooms}get framesToggle(){return this._frames}get decorationsToggle(){return this._decorations}pageLeftEnabled(k){this.setPageButtonEnabled(this._pageLeft,k)}pageRightEnabled(k){this.setPageButtonEnabled(this._pageRight,k)}setPageButtonEnabled(k,B){B?(k.unlockState(),k.currentState=$.K.Up):k.lockState($.K.Disabled),k.inputEnabled=B}create(){super.create(),this._startBuilding.onClick.add((()=>{this._commandSignal.dispatch(W.R.StartBuilding)})),this._quit.onClick.add((()=>{this._commandSignal.dispatch(W.R.Quit)})),this._rooms.onSelected.add((()=>{this._commandSignal.dispatch(W.R.Rooms)})),this._frames.onSelected.add((()=>{this._commandSignal.dispatch(W.R.Frames)})),this._decorations.onSelected.add((()=>{this._commandSignal.dispatch(W.R.Decorations)})),this._pageLeft.onClick.add((()=>{this._commandSignal.dispatch(W.R.PageLeft)})),this._pageRight.onClick.add((()=>{this._commandSignal.dispatch(W.R.PageRight)}))}destroy(){super.destroy(),this._startBuilding.onClick.dispose(),this._quit.onClick.dispose(),this._rooms.onSelected.dispose(),this._frames.onSelected.dispose(),this._decorations.onSelected.dispose(),this._pageLeft.onClick.dispose(),this._pageRight.onClick.dispose(),this._commandSignal.dispose()}};(0,F.Cg)([(0,G.x4W)("startBuilding"),(0,F.Sn)("design:type",j.$)],q.prototype,"_startBuilding",void 0),(0,F.Cg)([(0,G.x4W)("quit"),(0,F.Sn)("design:type",j.$)],q.prototype,"_quit",void 0),(0,F.Cg)([(0,G.x4W)("pageLeft"),(0,F.Sn)("design:type",j.$)],q.prototype,"_pageLeft",void 0),(0,F.Cg)([(0,G.x4W)("pageRight"),(0,F.Sn)("design:type",j.$)],q.prototype,"_pageRight",void 0),(0,F.Cg)([(0,G.x4W)("rooms"),(0,F.Sn)("design:type",H.l)],q.prototype,"_rooms",void 0),(0,F.Cg)([(0,G.x4W)("frames"),(0,F.Sn)("design:type",H.l)],q.prototype,"_frames",void 0),(0,F.Cg)([(0,G.x4W)("decorations"),(0,F.Sn)("design:type",H.l)],q.prototype,"_decorations",void 0),(0,F.Cg)([(0,G.x4W)("largeItemPointer"),(0,F.Sn)("design:type",G._mx)],q.prototype,"_largeItemPointer",void 0),(0,F.Cg)([(0,G.x4W)("smallItemPointer"),(0,F.Sn)("design:type",G._mx)],q.prototype,"_smallItemPointer",void 0),(0,F.Cg)([(0,G.x4W)("largeItemContainer"),(0,F.Sn)("design:type",G._mx)],q.prototype,"_largeItemContainer",void 0),(0,F.Cg)([(0,G.x4W)("smallItemContainer"),(0,F.Sn)("design:type",G._mx)],q.prototype,"_smallItemContainer",void 0),(0,F.Cg)([(0,G.x4W)("largeItems"),(0,F.Sn)("design:type",Array)],q.prototype,"_largeItems",void 0),(0,F.Cg)([(0,G.x4W)("smallItems"),(0,F.Sn)("design:type",Array)],q.prototype,"_smallItems",void 0),q=(0,F.Cg)([(0,G.EVk)("DecorateFloorComponent",V.Y.towerTown)],q)},27314:(k,B,U)=>{"use strict";U.d(B,{V:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(49237),H=U(28152),V=U(64794);let W=class extends G.uAl{constructor(){super(...arguments),this._selected=new G.HN0,this._deleted=new G.HN0,this._image=null,this._tween=null}get onDelete(){return this._deleted}get onSelect(){return this._selected}get popupShowing(){return this._popup&&this._popup.active}create(){super.create(),this._deleteButton.onClick.add((()=>{this._deleted.dispatch()}),this),this._selectButton.onClick.add((()=>{this._selected.dispatch()}),this),this.showPopup(!1),this.showSelected(!1),this._tween=j.q.instance.game.add.tween(this._pointer.legacyTransform.group,this).to({y:-V.D.SPACE_16PX},V.D.POINTER_BOUNCE_MS,G.GS3.Quadratic.InOut).yoyo(!0).loop(!0).start()}destroy(){this._deleteButton.onClick.dispose(),this._selectButton.onClick.dispose(),this._selected.dispose(),this._deleted.dispose(),j.q.instance.game.tweens.remove(this._tween),this.clearAsset(),this.showPopup(!1),this.showSelected(!1),super.destroy()}setAsset(k){this.clearAsset(),this._image=j.q.instance.prodigy.create.sprite(0,0,k),this._image.inputEnabled=!0,this._image.events.onInputDown.add((()=>{this.showPopup(!0),this.onSelect.dispatch()}),this),this._itemSpawn.legacyTransform.group.addChild(this._image),this.showHardPoint(!1)}clearAsset(){this._image&&(this._image.events.onInputDown.dispose(),this._itemSpawn.legacyTransform.group.removeChild(this._image),this._image.destroy(),this._image=null),this.showHardPoint(!0)}showPointer(k){this._pointer.active=k}showHardPoint(k){this.showPopup(!1),this._image?this._selectButton.GameObject.active=!1:(this.showSelected(!1),this._selectButton.GameObject.active=k)}showPopup(k){this._popup.active=k}showSelected(k){this._selectButton.GameObject.active=!0,this._solid.active=k,this._pointer.active=k,this._dashed.active=!k}};(0,F.Cg)([(0,G.x4W)("deleteButton"),(0,F.Sn)("design:type",$.$)],W.prototype,"_deleteButton",void 0),(0,F.Cg)([(0,G.x4W)("selectButton"),(0,F.Sn)("design:type",$.$)],W.prototype,"_selectButton",void 0),(0,F.Cg)([(0,G.x4W)("pointer"),(0,F.Sn)("design:type",G._mx)],W.prototype,"_pointer",void 0),(0,F.Cg)([(0,G.x4W)("popup"),(0,F.Sn)("design:type",G._mx)],W.prototype,"_popup",void 0),(0,F.Cg)([(0,G.x4W)("itemSpawn"),(0,F.Sn)("design:type",G._mx)],W.prototype,"_itemSpawn",void 0),(0,F.Cg)([(0,G.x4W)("solid"),(0,F.Sn)("design:type",G._mx)],W.prototype,"_solid",void 0),(0,F.Cg)([(0,G.x4W)("dashed"),(0,F.Sn)("design:type",G._mx)],W.prototype,"_dashed",void 0),W=(0,F.Cg)([(0,G.EVk)("DecorationHardPoint",H.Y.towerTown)],W)},43054:(k,B,U)=>{"use strict";U.d(B,{R:()=>W});var F=U(8674),G=U(62459),j=U(49237),$=U(28152),H=U(79979),V=U(21573);let W=class extends V.s{get assetID(){return this._assetID}get assetType(){return this._assetType}get assetVisual(){return this._assetVisual}get assetVisualMirror(){return this._assetVisualMirror}get interior(){return this._interiorRoot}get frame(){return this._frameRoot}get counterText(){return this._counterText.TextObject.text}set counterText(k){this._counterText.text=k}get counter(){const k=this._counterText.TextObject.text;return k?parseInt(k):0}set counter(k){this._counterText.text=k.toString()}get counterVisible(){return this._counterRoot.active}set counterVisible(k){this._counterRoot.active=k}create(){super.create(),this._button.onClick.add(this.onSelection,this)}setData(k,B,U,F){this._assetType=k,this._assetID=B,this.counter=U,this._counterRoot.active=F}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],W.prototype,"_frameRoot",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],W.prototype,"_interiorRoot",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],W.prototype,"_counterRoot",void 0),(0,F.Cg)([(0,G.MnK)(H.Y),(0,F.Sn)("design:type",H.Y)],W.prototype,"_assetVisual",void 0),(0,F.Cg)([(0,G.MnK)(H.Y),(0,F.Sn)("design:type",H.Y)],W.prototype,"_assetVisualMirror",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],W.prototype,"_counterText",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],W.prototype,"_button",void 0),W=(0,F.Cg)([(0,G.EVk)("LargeAssetListComponent",$.Y.towerTown)],W)},27292:(k,B,U)=>{"use strict";U.d(B,{B:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._rightButton=null,this._leftButton=null,this._cancelButton=null,this._saveButton=null,this._warningQuitButton=null,this._warningObject=null}get leftButton(){return this._leftButton}get rightButton(){return this._rightButton}get saveButton(){return this._saveButton}get cancelButton(){return this._cancelButton}get warningQuitButton(){return this._warningQuitButton}get warningObject(){return this._warningObject}get warningText(){return this._warningText}get arrowObject(){return this._arrowObject}};(0,F.Cg)([(0,G.x4W)("rightButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_rightButton",void 0),(0,F.Cg)([(0,G.x4W)("leftButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_leftButton",void 0),(0,F.Cg)([(0,G.x4W)("cancelButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_cancelButton",void 0),(0,F.Cg)([(0,G.x4W)("saveButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_saveButton",void 0),(0,F.Cg)([(0,G.x4W)("warningQuitButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_warningQuitButton",void 0),(0,F.Cg)([(0,G.x4W)("warningObject"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_warningObject",void 0),(0,F.Cg)([(0,G.x4W)("text"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_warningText",void 0),(0,F.Cg)([(0,G.x4W)("arrowObject"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_arrowObject",void 0),H=(0,F.Cg)([(0,G.EVk)("MoveFloorComponent",$.Y.towerTown)],H)},6145:(k,B,U)=>{"use strict";U.d(B,{Q:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._buildButton=null,this._body=null,this._title=null}get closeButton(){return this._buildButton}};(0,F.Cg)([(0,G.x4W)("buildButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_buildButton",void 0),(0,F.Cg)([(0,G.x4W)("body"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_body",void 0),(0,F.Cg)([(0,G.x4W)("title"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_title",void 0),H=(0,F.Cg)([(0,G.EVk)("NewTownPopupComponent",$.Y.towerTown)],H)},30857:(k,B,U)=>{"use strict";U.d(B,{G:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{get newTag(){return this._newTag}get quickRenovationButton(){return this._quickRenovationButton}get newTagText(){return this._newTagText}get bodyText(){return this._bodyText}setNewTagVisibility(k){this._newTag.active=k}};(0,F.Cg)([(0,G.x4W)("newTag"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_newTag",void 0),(0,F.Cg)([(0,G.x4W)("newTagText"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_newTagText",void 0),(0,F.Cg)([(0,G.x4W)("bodyText"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_bodyText",void 0),(0,F.Cg)([(0,G.x4W)("quickRenovationButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_quickRenovationButton",void 0),H=(0,F.Cg)([(0,G.EVk)("QuickRenovationComponent",$.Y.towerTown)],H)},77175:(k,B,U)=>{"use strict";U.d(B,{W:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._quitButton=null,this._attackButton=null,this._battleButton=null,this._topBanner=null}get topBanner(){return this._topBanner}get quitButton(){return this._quitButton}get attackButton(){return this._attackButton}get battleButton(){return this._battleButton}};(0,F.Cg)([(0,G.x4W)("quitButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_quitButton",void 0),(0,F.Cg)([(0,G.x4W)("attackButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_attackButton",void 0),(0,F.Cg)([(0,G.x4W)("battleButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_battleButton",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],H.prototype,"_topBanner",void 0),H=(0,F.Cg)([(0,G.EVk)("RooftopMasteryComponent",$.Y.towerTown)],H)},14151:(k,B,U)=>{"use strict";U.d(B,{q:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._quitButton=null,this._leftBarTransform=null,this._rightBarTransform=null,this._middleBarTransform=null,this._statusText=null,this._cleanButton=null,this._header=null,this._buttonBG=null}get quitButton(){return this._quitButton}get header(){return this._header}get buttonBG(){return this._buttonBG}get cleanButton(){return this._cleanButton}get leftBarTransform(){return this._leftBarTransform}get rightBarTransform(){return this._rightBarTransform}get middleBarTransform(){return this._middleBarTransform}set statusText(k){this._statusText.text=k}};(0,F.Cg)([(0,G.x4W)("QuitButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_quitButton",void 0),(0,F.Cg)([(0,G.x4W)("LeftBar"),(0,F.Sn)("design:type",G.K16)],H.prototype,"_leftBarTransform",void 0),(0,F.Cg)([(0,G.x4W)("RightBar"),(0,F.Sn)("design:type",G.K16)],H.prototype,"_rightBarTransform",void 0),(0,F.Cg)([(0,G.x4W)("MiddleBar"),(0,F.Sn)("design:type",G.K16)],H.prototype,"_middleBarTransform",void 0),(0,F.Cg)([(0,G.x4W)("StatusText"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_statusText",void 0),(0,F.Cg)([(0,G.x4W)("CleanButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_cleanButton",void 0),(0,F.Cg)([(0,G.x4W)("ShroudHeader"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_header",void 0),(0,F.Cg)([(0,G.x4W)("ButtonBG"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_buttonBG",void 0),H=(0,F.Cg)([(0,G.EVk)("ShroudLockComponent",$.Y.towerTown)],H)},69046:(k,B,U)=>{"use strict";U.d(B,{t:()=>V});var F=U(8674),G=U(62459),j=U(49237),$=U(28152),H=U(21573);let V=class extends H.s{constructor(){super(...arguments),this._counterRoot=null,this._assetRoot=null,this._counterText=null,this._button=null}get counterVisible(){return this._counterRoot.active}set counterVisible(k){this._counterRoot.active=k}get assetRoot(){return this._assetRoot}get counter(){const k=this._counterText.TextObject.text;return k?parseInt(k):0}set counter(k){this._counterText.text=k.toString()}get assetID(){return this._assetID}get assetType(){return this._assetType}create(){super.create(),this._button=this.GameObject.findComponent(j.$),this._button.onClick.add(this.onSelection,this)}setData(k,B,U,F){this._assetType=k,this._assetID=B,this.counter=U,this._counterRoot.active=F}};(0,F.Cg)([(0,G.x4W)("counterRoot"),(0,F.Sn)("design:type",G._mx)],V.prototype,"_counterRoot",void 0),(0,F.Cg)([(0,G.x4W)("assetRoot"),(0,F.Sn)("design:type",G._mx)],V.prototype,"_assetRoot",void 0),(0,F.Cg)([(0,G.x4W)("counterText"),(0,F.Sn)("design:type",G.EYj)],V.prototype,"_counterText",void 0),V=(0,F.Cg)([(0,G.EVk)("SmallAssetListComponent",$.Y.towerTown)],V)},41666:(k,B,U)=>{"use strict";U.d(B,{Z:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(64794);let H=class extends G.uAl{get root(){return this._root}get height(){return this._toolTip?this._toolTip.legacyTransform.group.height:0}get width(){return this._toolTip.legacyTransform.group.width}set width(k){this._toolTip.legacyTransform.anchorX=.5,this._toolTip.legacyTransform.group.x+=$.D.TOOLTIP_OFFSET_X,this._toolTip.legacyTransform.group.width=k}get text(){return this._text.text}set text(k){this._text.text=k}};(0,F.Cg)([(0,G.x4W)("root"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_root",void 0),(0,F.Cg)([(0,G.x4W)("toolTip"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_toolTip",void 0),(0,F.Cg)([(0,G.x4W)("text"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_text",void 0),H=(0,F.Cg)([(0,G.EVk)("ToolTipComponent",j.Y.ui)],H)},50860:(k,B,U)=>{"use strict";U.d(B,{v:()=>W});var F=U(8674),G=U(62459),j=U(49237),$=U(28152),H=U(25132),V=U(64794);let W=class extends G.uAl{constructor(){super(...arguments),this._buildButton=null,this._blocks=[]}get buildButton(){return this._buildButton}set buildButton(k){this._buildButton=k}get blocks(){return this._blocks}setBlockEnabled(k,B){k<0||k>=V.D.MAX_SMART_BLOCKS||(this._blocks[k].active=B)}setBlockGraphicVisible(k,B){this._blocks[k]&&(this._blocks[k].findComponent(H.$)._singleImage.alpha=B?1:0)}};(0,F.Cg)([(0,G.x4W)("buildButton"),(0,F.Sn)("design:type",j.$)],W.prototype,"_buildButton",void 0),(0,F.Cg)([(0,G.x4W)("blocks"),(0,F.Sn)("design:type",Array)],W.prototype,"_blocks",void 0),W=(0,F.Cg)([(0,G.EVk)("TowerTownInProgressFloor",$.Y.towerTown)],W)},20583:(k,B,U)=>{"use strict";U.d(B,{u:()=>V});var F=U(8674),G=U(62459),j=U(49237),$=U(28152),H=U(14991);let V=class extends G.uAl{constructor(){super(...arguments),this._chooseTownButton=null,this._floatlingFlingButton=null,this._storeButton=null,this._settingsButton=null,this._sliderButton=null,this._hudUI=null,this._chevrons=[]}get chooseTownButton(){return this._chooseTownButton}get floatlingFlingButton(){return this._floatlingFlingButton}get storeButton(){return this._storeButton}get settingsButton(){return this._settingsButton}get sliderButton(){return this._sliderButton}get hudUI(){return this._hudUI}setSlideIndicator(k){this._chevrons.forEach((B=>{B.GameObject.legacyTransform.group.scale.x=k===H.v.Hidden?-1:1}))}};(0,F.Cg)([(0,G.x4W)("chooseTownButton"),(0,F.Sn)("design:type",j.$)],V.prototype,"_chooseTownButton",void 0),(0,F.Cg)([(0,G.x4W)("floatlingFlingButton"),(0,F.Sn)("design:type",j.$)],V.prototype,"_floatlingFlingButton",void 0),(0,F.Cg)([(0,G.x4W)("storeButton"),(0,F.Sn)("design:type",j.$)],V.prototype,"_storeButton",void 0),(0,F.Cg)([(0,G.x4W)("settingsButton"),(0,F.Sn)("design:type",j.$)],V.prototype,"_settingsButton",void 0),(0,F.Cg)([(0,G.x4W)("sliderButton"),(0,F.Sn)("design:type",j.$)],V.prototype,"_sliderButton",void 0),(0,F.Cg)([(0,G.x4W)("hudUI"),(0,F.Sn)("design:type",G._mx)],V.prototype,"_hudUI",void 0),(0,F.Cg)([(0,G.x4W)("chevrons"),(0,F.Sn)("design:type",Array)],V.prototype,"_chevrons",void 0),V=(0,F.Cg)([(0,G.EVk)("TowerTownHUDComponent",$.Y.towerTown)],V)},30376:(k,B,U)=>{"use strict";U.d(B,{l:()=>q});var F=U(8674),G=U(62459),j=U(95891),$=U(49237),H=U(89400),V=U(28152),W=U(95946);let q=class extends H.B{constructor(){super(...arguments),this._elementalMap=new Map,this._button=null,this._headerText=null,this._currencyText=null,this._jars=[],this._colourSplash=[]}get headerText(){return this._headerText.TextObject.text}set headerText(k){this._headerText.text=k}get currencyText(){return this._currencyText.TextObject.text}set currencyText(k){this._currencyText.text=k}create(){super.create(),this._elementalMap.set(W.a.Fire,0),this._elementalMap.set(W.a.Ice,1),this._elementalMap.set(W.a.Plant,2),this._elementalMap.set(W.a.Storm,3),this._elementalMap.set(W.a.Water,4)}destroy(){super.destroy()}updateContentView(k){this._storeID=k.storeID;const B=!!G.Aq$.isDefined(k.hatStore)&&k.hatStore;if(this._jars.forEach((k=>k.active=!1)),this._colourSplash.forEach((k=>k.active=!1)),this._headerText.GameObject.active=!B,this._currencyText.GameObject.active=!B,this._cartIcon.active=!B,this._hatStoreText.active=B,this._hatIcon.active=B,this._hatStoreColourSplash.active=B,!B){const B=this._elementalMap.get(k.type);this.headerText=`${j.capitalize(k.type)} Shop`,this.currencyText=k.playerCurrency.toString(),this._jars[B].active=!0,this._colourSplash[B].active=!0}this._button.onClick.add((()=>{this.onClick.dispatch(this._storeID)}))}};(0,F.Cg)([(0,G.x4W)("button"),(0,F.Sn)("design:type",$.$)],q.prototype,"_button",void 0),(0,F.Cg)([(0,G.x4W)("header"),(0,F.Sn)("design:type",G.EYj)],q.prototype,"_headerText",void 0),(0,F.Cg)([(0,G.x4W)("currency"),(0,F.Sn)("design:type",G.EYj)],q.prototype,"_currencyText",void 0),(0,F.Cg)([(0,G.x4W)("jars"),(0,F.Sn)("design:type",Array)],q.prototype,"_jars",void 0),(0,F.Cg)([(0,G.x4W)("hatStoreText"),(0,F.Sn)("design:type",G._mx)],q.prototype,"_hatStoreText",void 0),(0,F.Cg)([(0,G.x4W)("hatStoreColourSplash"),(0,F.Sn)("design:type",G._mx)],q.prototype,"_hatStoreColourSplash",void 0),(0,F.Cg)([(0,G.x4W)("cartIcon"),(0,F.Sn)("design:type",G._mx)],q.prototype,"_cartIcon",void 0),(0,F.Cg)([(0,G.x4W)("hatIcon"),(0,F.Sn)("design:type",G._mx)],q.prototype,"_hatIcon",void 0),(0,F.Cg)([(0,G.x4W)("colourSplashes"),(0,F.Sn)("design:type",Array)],q.prototype,"_colourSplash",void 0),q=(0,F.Cg)([(0,G.EVk)("TowerTownShopComponent",V.Y.towerTown)],q)},36730:(k,B,U)=>{"use strict";U.d(B,{f:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._closeButton=null}get closeButton(){return this._closeButton}};(0,F.Cg)([(0,G.x4W)("closeButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_closeButton",void 0),H=(0,F.Cg)([(0,G.EVk)("TowerTownShoppingMallComponent",$.Y.towerTown)],H)},82443:(k,B,U)=>{"use strict";U.d(B,{O:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._blocksText=null,this._shroudsText=null,this._floorsText=null,this._closeButton=null}set blocksText(k){this._blocksText.text=k}set shroudsText(k){this._shroudsText.text=k}set floorsText(k){this._floorsText.text=k}get closeButton(){return this._closeButton}};(0,F.Cg)([(0,G.x4W)("blocksText"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_blocksText",void 0),(0,F.Cg)([(0,G.x4W)("shroudsText"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_shroudsText",void 0),(0,F.Cg)([(0,G.x4W)("floorsText"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_floorsText",void 0),(0,F.Cg)([(0,G.x4W)("closeButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_closeButton",void 0),H=(0,F.Cg)([(0,G.EVk)("TowerTownUpdateComponent",$.Y.towerTown)],H)},81670:(k,B,U)=>{"use strict";U.d(B,{s:()=>G});var F=U(64794);class G{static getFloatlingAssetID(k,B){const U=F.D.ELEMENT_STRINGS.indexOf(k);return-1===U?0:this.floatlingSpineIDs[U][B+1]}}G.floatlingSpineIDs={},G.FLOATLING_PREFIX="spine-npc-floatling-"},15678:(k,B,U)=>{"use strict";U.d(B,{g:()=>j});var F=U(95891),G=U(64794);class j{static determineJustLocked(k,B){return!this.isSkillLocked(k)&&this.isSkillLocked(B)}static determineJustUnlocked(k,B){return this.isSkillLocked(k)&&!this.isSkillLocked(B)}static determineJustMastered(k,B){return!this.isSkillMastered(k)&&this.isSkillMastered(B)}static shouldHaveShroud(k){return this.isSkillLocked(k)}static shouldHaveStubbornShadow(k,B){return!this.isSkillMastered(k)&&!this.isSkillLocked(k)&&this.isBlockCountIsAtMaximumAllowed(B)&&this.isSkillCorrectCountAtBlockCountMaximum(k)}static getBlockDiscrepancy(k,B){const U=k.totalCorrectCount-B.blockCount,F=G.D.MAX_SMART_BLOCKS-B.blockCount;return F=G.D.MAX_SMART_BLOCKS}static isSkillCorrectCountAtBlockCountMaximum(k){return k.totalCorrectCount>=G.D.MAX_SMART_BLOCKS}static getCurrentSkillByGrade(k,B){return(0,F.first)(this.getSkillsByGrade(k,B).filter((k=>!this.isSkillMastered(k)&&!this.isSkillLocked(k))))}static getSkillsByGrade(k,B){return k.filter((k=>k.grade===B))}static getSkillsMasteredByGrade(k,B){return(0,F.orderBy)(k.filter((k=>this.isSkillMastered(k))),["dateMastered"]).filter((k=>k.grade===B))}static getPendingSkillsByGrade(k,B){return k.filter((k=>!this.isSkillMastered(k)&&k.grade===B))}static getSkillById(k,B){return(0,F.find)(k,["ID",B])}static answersToUnlock(k){return k?k.lock:0}static isAvailable(k){return k.isAvailable}static isSkillMastered(k){return k.hasBeenMastered}static isSkillLocked(k){return k.lock>0}static hasMaximumTheta(k){return k.theta===G.D.THETA_MAXIMUM}static hasMinimumTheta(k){return k.theta===G.D.THETA_MINIMUM}static isSkillIdMobileFriendly(k,B){return!(0,F.includes)(B,k)}}},82271:(k,B,U)=>{"use strict";U.d(B,{S:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(76546);let H=class extends $.D{getMemberJarData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.MemberJar.GetMemberJarData,{},!1)}))}updateMemberJarRewards(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B={rewardsToAppend:k.filter((k=>!k.isSecure))};return this.makeCloudscriptRequest(j.D.MemberJar.UpdateMemberJarRewards,B,!1)}))}resetMemberJarData(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B={sevenlevelsExperimentRedeemed:k};return this.makeCloudscriptRequest(j.D.MemberJar.ResetMemberJarData,B,!1)}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},78365:(k,B,U)=>{"use strict";U.d(B,{Q:()=>j});var F=U(24521),G=U(23029);class j{static getMemberJarDropData(){return G.R.loadData(F.r.MemberJarData_json)}}},47917:(k,B,U)=>{"use strict";U.d(B,{P:()=>Y});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(29834),V=U(97518),W=U(64353),q=U(95057),K=U(47255),z=U(34616);let Y=class extends G.uAl{constructor(){super(...arguments),this._hideWhenEmpty=!1,this._syncRibbonVisibilityWithJar=!0,this._thresholds=[],this.onUpdateViewItemCount=new G.HN0,this.onReadyToOpenJar=new G.HN0,this.onJarAppearFinished=new G.HN0,this.onJarUseFinished=new G.HN0,this.onJarRewardsSequenceFinished=new G.HN0,this._stopOngoingAnimation=new G.HN0}create(){super.create(),this._thresholds.sort(((k,B)=>B.atLeastFraction-k.atLeastFraction)),this._jarVisual&&this._hideWhenEmpty&&(this._jarVisual.GameObject.active=!1),this._ribbonVisual&&this._hideWhenEmpty&&this._syncRibbonVisibilityWithJar&&(this._ribbonVisual.active=!1),this._jarIsFullGameObject&&(this._jarIsFullGameObject.active=!1),this._rewardCountText&&(this._rewardCountText.GameObject.active=!1),this._goldCountText&&(this._goldCountText.GameObject.active=!1),this._currencyCountText&&(this._currencyCountText.GameObject.active=!1),this._moreItemsCountText&&(this._moreItemsCountText.GameObject.active=!1),this._starCountText&&(this._starCountText.GameObject.active=!1)}showEntityUpdate(k){this.updateView(k,!0)}showEntity(k){this.updateView(k,!1)}showEntityRedeem(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._jarVisual)return;this._jarVisual.GameObject.active=!0;const B=this.findThreshold(k);B.useAnimation&&(this._jarVisual.playAnimation(B.useAnimation,!1,!0),yield this.completeVisualAnimation());const U=this.findThreshold({savedBattleCount:0,savedRewards:[]});this._jarVisual.playAnimation(U.idleAnimation,!0)}))}updateView(k,B){var U;const F=this.countTotalRewardsInEntity(k),G=this.countCurrentStoredStars(),j=F.total+G,$=!this._hideWhenEmpty||j>0;this.onUpdateViewItemCount.dispatch(j),(null===(U=this._jarVisual)||void 0===U?void 0:U.GameObject)&&(this._jarVisual.GameObject.active=$),this._ribbonVisual&&this._syncRibbonVisibilityWithJar&&(this._ribbonVisual.active=$),this._rewardCountText&&(this._rewardCountText.setTextArguments(j),this._rewardCountText.GameObject.active=j>0),this._goldCountText&&(this._goldCountText.setTextArguments(F.gold),this._goldCountText.GameObject.active=!0),this._currencyCountText&&(this._currencyCountText.setTextArguments(F.currency),this._currencyCountText.GameObject.active=!0),this._moreItemsCountText&&(this._moreItemsCountText.setTextArguments(F.moreItems,1===F.moreItems?"":"s"),this._moreItemsCountText.GameObject.active=!0),this._starCountText&&(this._starCountText.setTextArguments(G,1===G?"":"s"),this._starCountText.GameObject.active=!0),this._jarIsFullGameObject.active=this.isJarFull(k),this.gameObject.active?this.animateJar(k,B):this.openJarIfReady(k)}isJarFull(k){return k.savedBattleCount>=z.N.maximumSavedBattleCount}animateJar(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=this.findThreshold(k);if(B){if(this._jarVisual.playAnimation(U.appearAnimation,!1,!0),!(yield this.completeVisualAnimation()))return;this.onJarAppearFinished.dispatch()}this.openJarIfReady(k),B&&G.Aq$.isDefined(U.nextAnimation)?this._jarVisual.playAnimation(U.nextAnimation,!0):this._jarVisual.playAnimation(U.idleAnimation,!0)}))}completeVisualAnimation(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._stopOngoingAnimation.dispatch(),Promise.race([this._jarVisual.OnAnimationComplete.asPromise().then((()=>!0),(()=>!1)),this._stopOngoingAnimation.asPromise().then((()=>!1),(()=>!1))])}))}findThreshold(k){var B;const U=0===k.savedBattleCount?Math.min(k.savedRewards.length,1):k.savedBattleCount;return null!==(B=this._thresholds.find((k=>U>=k.atLeastFraction*z.N.maximumSavedBattleCount)))&&void 0!==B?B:this._thresholds[0]}countTotalRewardsInEntity(k){let B=0,U=0,F=0;for(const{itemType:G,quantity:j}of k.savedRewards)switch(G){case"gold":B+=j;break;case"currency":U+=j;break;default:F+=j}return{gold:B,currency:U,moreItems:F,total:B+U+F}}countCurrentStoredStars(){var k;return null!==(k=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.storedMemberStars)&&void 0!==k?k:0}isReadyToOpenJar(k){const B=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return(this.countTotalRewardsInEntity(k).total>0||this.countCurrentStoredStars()>0)&&B.hasMembership()}openJarIfReady(k){this.isReadyToOpenJar(k)&&this.onReadyToOpenJar.dispatch(k)}completeRewardsSequence(){this.onJarRewardsSequenceFinished.dispatch()}destroy(){this._stopOngoingAnimation.dispose(),this.onUpdateViewItemCount.dispose(),this.onReadyToOpenJar.dispose(),this.onJarAppearFinished.dispose(),this.onJarUseFinished.dispose(),this.onJarRewardsSequenceFinished.dispose(),super.destroy()}sendPurchaseFunnelStart(k="Member-Jar",B="Member-Jar"){const U=j.q.instance.prodigy.gameContainer.get("c47-20b6"),F=W.P.shouldUseUnifiedConversionFlow(K.o.FunnelMemberJar)?q.R.UnifiedConversionFlow:q.R.Static;U.purchase.sendFunnelStart({adType:F,category:k,contentId:void 0,type:B,adVersion:W.P.getAdVersion(K.o.FunnelMemberJar)})}};(0,F.Cg)([(0,G.MnK)(H.j),(0,F.Sn)("design:type",H.j)],Y.prototype,"_jarVisual",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Y.prototype,"_ribbonVisual",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Y.prototype,"_jarIsFullGameObject",void 0),(0,F.Cg)([(0,G.MnK)(V.R),(0,F.Sn)("design:type",V.R)],Y.prototype,"_rewardCountText",void 0),(0,F.Cg)([(0,G.MnK)(V.R),(0,F.Sn)("design:type",V.R)],Y.prototype,"_starCountText",void 0),(0,F.Cg)([(0,G.MnK)(V.R),(0,F.Sn)("design:type",V.R)],Y.prototype,"_goldCountText",void 0),(0,F.Cg)([(0,G.MnK)(V.R),(0,F.Sn)("design:type",V.R)],Y.prototype,"_currencyCountText",void 0),(0,F.Cg)([(0,G.MnK)(V.R),(0,F.Sn)("design:type",V.R)],Y.prototype,"_moreItemsCountText",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_hideWhenEmpty",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_syncRibbonVisibilityWithJar",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Array)],Y.prototype,"_thresholds",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onUpdateViewItemCount",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onReadyToOpenJar",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onJarAppearFinished",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onJarUseFinished",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onJarRewardsSequenceFinished",void 0),Y=(0,F.Cg)([(0,G.EVk)("MemberJarController",$.Y.membership)],Y)},24473:(k,B,U)=>{"use strict";U.d(B,{S:()=>Y});var F=U(8674),G=U(46791),j=U(5491),$=U(63011),H=U(15821),V=U(35120),W=U(76277),q=U(48235),K=U(55122),z=U(78365);class Y{static updateRewardedState(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield q.W.getCollectedRewardsData();this.isRewarded=H.A.isDefined(null==k?void 0:k.rewarded[$.D.MEMBER_LEVEL_BOOST])}))}static isFeatureEnabled(){return(0,W.G)(G.a).enabled}static isEligibleForFeature(){const k=this.isFeatureEnabled(),B=this.playerNearLevelCap();return k&&!this.isRewarded&&!B}static calculateFeatureEligibility(){const k=V.q.instance.prodigy.gameContainer.get("306-5359");k.hasMembership()||k.addExperimentToEligiblilityList(G.a.key)}static canReceiveReward(){const k=this.isEligibleForFeature(),B=V.q.instance.prodigy.gameContainer.get("306-5359");return k&&B.hasMembership()}static playerNearLevelCap(){var k,B;const U=V.q.instance.prodigy.gameContainer.get("306-5359");return U.getLevel()+(null!==(B=null===(k=z.Q.getMemberJarDropData().memberLevelBoost)||void 0===k?void 0:k.levels)&&void 0!==B?B:0)>U.currentMaxLevel}static redeemReward(){var k;const B=V.q.instance.prodigy.gameContainer.get("306-5359"),U=z.Q.getMemberJarDropData().memberLevelBoost.levels,F=B.getLevel(),G=F+U,$=null!==(k=B.data.stars)&&void 0!==k?k:K.s.xpRequiredForLevel(F,j.V.Player),H=K.s.xpRequiredForLevel(G,j.V.Player)-$;B.addStars(H),this.isRewarded=!0,B.forceSaveCharacter();V.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendPlayerProgressionAdvancedEvent({progressionType:"Player Level",creatureName:"Player",progressionNewValue:G.toString(),progressionPreviousValue:F.toString(),progressionSubType:"membership-bonus"},{pointType:"stars",pointCount:H})}}},63731:(k,B,U)=>{"use strict";U.d(B,{Z:()=>V});var F=U(8674),G=U(79687),j=U(95891),$=U.n(j),H=U(93288);let V=class{constructor(){this._objectiveSources=[]}registerSource(k){this._objectiveSources.push(k)}getObjectives(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield Promise.all(this._objectiveSources.filter((B=>0===B.objectiveTypes.length||B.objectiveTypes.some((B=>{var U,F;return null===(F=null===(U=null==k?void 0:k.types)||void 0===U?void 0:U.includes(B))||void 0===F||F})))).map((B=>(0,F.sH)(this,void 0,void 0,(function*(){var U;return(yield B.getObjectives()).filter(((B,U,F)=>{var G,j,$,H;return!(null!==(j=null===(G=null==k?void 0:k.types)||void 0===G?void 0:G.includes(B.type))&&void 0!==j&&!j)&&(null===(H=null===($=null==k?void 0:k.filter)||void 0===$?void 0:$.call(k,B,U,F))||void 0===H||H)})).sort(null!==(U=null==k?void 0:k.sort)&&void 0!==U?U:()=>0)})))));return $().flatten(B)}))}};(0,F.Cg)([(0,G.multiInject)(H._),(0,F.Sn)("design:type",Array)],V.prototype,"_objectiveSources",void 0),V=(0,F.Cg)([(0,G.injectable)()],V)},93288:(k,B,U)=>{"use strict";U.d(B,{_:()=>F});const F=Symbol.for("OBJECTIVE_SOURCE")},65068:(k,B,U)=>{"use strict";var F;U.d(B,{q:()=>F}),function(k){k.RestrictedEncounter="restricted-encounter",k.RestrictedEncounterBlocking="restricted-encounter-blocking",k.QuestTask="quest-task",k.HardModeRequirement="hard-mode-requirement",k.QuestState="quest-state"}(F||(F={}))},49126:(k,B,U)=>{"use strict";U.d(B,{x:()=>Q});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U.n($),V=U(99625),W=U(35120),q=U(67665),K=U(88061),z=U(43754),Y=U(65240);let Q=class{constructor(){this._uncollectedTransactions=[]}get hasUncollectedTransactions(){return this._uncollectedTransactions.length>0}queueUncollectedTransactions(...k){for(const B of k)this._uncollectedTransactions.some((k=>k.transactionID===B.transactionID))||this._uncollectedTransactions.push(B)}acknowledgeUncollectedTransactions(){return(0,F.sH)(this,void 0,void 0,(function*(){if(0!==this._uncollectedTransactions.length)try{let k=0;for(const{quantity:G}of this._uncollectedTransactions)k+=G;const B=this._hardCurrency.getBalance(27),U=yield new Promise((U=>{let F;F=W.q.instance.prodigy.open.prefabMenu(V.l.OTPCelebrationModal,void 0,void 0,void 0,void 0,{OTP_CELEBRATION_GAINS_TEXT:`+${k}`,OTP_CELEBRATION_INITIAL_VALUE:B,OTP_CELEBRATION_FINAL_VALUE:B+k,OTP_CELEBRATION_CLOSE_CALLBACK:()=>U(F)})})),F=W.q.instance.prodigy.open.showFullScreenSpinner();try{const k=this._segment.item.beginSecureItemTransaction(),B=yield this._otpNetwork.collectPurchasedItems(this._uncollectedTransactions);k.flush({transaction_id:B[0],source_type:Y.C.Otp,source_id:B[0]}),H().pullAllWith(this._uncollectedTransactions,B,((k,B)=>k.transactionID===B))}finally{F.destroy(),U.close()}if(this._uncollectedTransactions.length>0){const k=this._uncollectedTransactions.map((k=>k.transactionID)).join("\n");yield new Promise((B=>W.q.instance.prodigy.open.message(this._localizer.getText("ONE_TIME_PURCHASE_ACKNOWLEDGE_FAILED",k),B)))}this._segment.purchase.sendFunnelComplete()}catch(e){const B=e instanceof Error?e.message:"unknown error";G.VyI.log(`Error acknowledging transaction: ${B}`,G.$bb.Error)}}))}updatePurchaseHistory(k){this._otpNetwork.updatePurchaseHistory(k.quantity).catch(G.RQr.createHandler("Error updating spend amounts."))}};(0,F.Cg)([(0,j.inject)("295-41dc"),(0,F.Sn)("design:type",K.o)],Q.prototype,"_otpNetwork",void 0),(0,F.Cg)([(0,j.inject)("c47-20b6"),(0,F.Sn)("design:type",q.Y)],Q.prototype,"_segment",void 0),(0,F.Cg)([(0,j.inject)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],Q.prototype,"_localizer",void 0),(0,F.Cg)([(0,j.inject)("5c7-e02d"),(0,F.Sn)("design:type",z.W)],Q.prototype,"_hardCurrency",void 0),Q=(0,F.Cg)([(0,j.injectable)()],Q)},89517:(k,B,U)=>{"use strict";U.d(B,{Y:()=>Q,F:()=>Z});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U.n($),V=U(65240),W=U(35120),q=U(1195),K=U(34992),z=U(73797),Y=U(80403);const Q=Symbol("ParentGoalDataProvider"),X=["parentReward","parentRewardMember"];let Z=class{constructor(k,B,U){this.goal=null,this.onChange=new G.HN0,this._lastChangedAt=null,this._localCorrectAnswerCount=0,this._isInitialized=!1,this._graphQl=k,this._playerDataProvider=B,this._externalMethods=U,W.q.instance.prodigy.game.broadcaster.addAppListener(z.zr.UpdateMailCounters,this.onMailChanged.bind(this),this,z.HG.MailerButton,!0),W.q.instance.prodigy.game.broadcaster.addAppListener(z.zr.UpdateMailCounters,this.onMailChanged.bind(this),this,z.HG.Mailer,!0)}claimAllRewards(){const k=this.goal;if(!k)return void G.VyI.log("Attempted to claim nonexistent goal, ignoring.",G.$bb.Warning);if(!k.isComplete)return void G.VyI.log("Attempted to claim incomplete goal, ignoring.",G.$bb.Warning,k);this.setGoal(null);const B={source_type:V.C.ParentGoals,source_id:"parent"},U=this.getPlayerGoalData();if(null==U?void 0:U.lastUnclaimedGoal){for(const k of this.findMailRewardsExcept(U.lastUnclaimedGoal.previousRewardMailIds)){if(k.isOpened)continue;const U=null==k?void 0:k.gameMethod;this._externalMethods.runFunction(null==U?void 0:U.name,null==U?void 0:U.params,k.attachments,k,[B]),W.q.instance.prodigy.mailNetworkHandler.deleteMail(k)}U.lastUnclaimedGoal=null}else k.rewards.length>0&&W.q.instance.prodigy.open.gotItem(k.rewards,void 0,!0,void 0,void 0,!1,B)}refresh(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.isStale())try{yield this.refreshAsync()}catch(k){G.VyI.log("ParentGoalDataProvider Refresh failed:",G.$bb.Error,k)}}))}setGoal(k){var B;H().isEqual(k,this.goal)||this._isInitialized&&(null==k?void 0:k.id)&&(null==k?void 0:k.id)!==(null===(B=this.goal)||void 0===B?void 0:B.id)||(k&&this.goal&&!k.isComplete||(this._localCorrectAnswerCount=0),this.goal=k,this._lastChangedAt=new Date,this._isInitialized=!0,this.onChange.dispatch(k))}markStale(){this._lastChangedAt=null}destroy(){this._educationQuestionAnswered.destroy(),this.onChange.dispose(),W.q.instance.prodigy.game.broadcaster.removeAppListener(z.zr.UpdateMailCounters,this,z.HG.MailerButton),W.q.instance.prodigy.game.broadcaster.removeAppListener(z.zr.UpdateMailCounters,this,z.HG.Mailer)}refreshAsync(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this.getPlayerGoalData();if(this.restoreGoalFromPlayerData())return;const B=yield function(k){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield k.sendRequest("\n query getActiveGoal {\n viewer {\n activeGoal {\n id\n goalTarget\n questionsAnswered\n studentCompletedAt\n giftSentAt\n reward {\n id\n type\n }\n }\n }\n }\n ")).data.viewer.activeGoal}))}(this._graphQl);if(!B)return void this.setGoal(null);const U=[];B.reward&&U.push({ID:B.reward.id,type:B.reward.type,N:1}),this._localCorrectAnswerCount=Math.max(B.questionsAnswered,this._localCorrectAnswerCount),this.setGoal({id:B.id,rewards:U,progress:this._localCorrectAnswerCount,target:B.goalTarget,isComplete:!1}),B.studentCompletedAt&&(k.lastUnclaimedGoal={goal:this.goal,previousRewardMailIds:this.findMailRewardsExcept([]).map((k=>k.id))})}))}findMailRewardsExcept(k=[]){return W.q.instance.prodigy.mailNetworkHandler.mailList.filter((B=>X.includes(B.name)&&!k.includes(B.id)))}isStale(){const k=W.q.instance.prodigy.education;if(!this._educationQuestionAnswered&&k&&(this._educationQuestionAnswered=k.onQuestionAnswered.add(this.onQuestionAnswered.bind(this))),!this._lastChangedAt)return!0;const B=this._lastChangedAt.valueOf()+3e5;return Date.now()>B}onMailChanged(){this.restoreGoalFromPlayerData()}onQuestionAnswered(k){this.markStale(),k&&this.goal&&this._localCorrectAnswerCount++}getPlayerGoalData(){var k;const B=this._playerDataProvider.player.data;return null!==(k=B.parentGoal)&&void 0!==k||(B.parentGoal={}),B.parentGoal}restoreGoalFromPlayerData(){const k=this.getPlayerGoalData();if(!k.lastUnclaimedGoal)return!1;const{previousRewardMailIds:B,goal:U}=k.lastUnclaimedGoal,F=this.findMailRewardsExcept(B);return 0===F.length?(this.setGoal(Object.assign(Object.assign({},U),{isComplete:!1})),!0):F.every((k=>k.isOpened))?(this.getPlayerGoalData().lastUnclaimedGoal=null,this.markStale(),this.setGoal(null),!0):(this.setGoal(Object.assign(Object.assign({},U),{isComplete:!0})),!0)}};Z=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("8bb-7057")),(0,F.Qj)(1,(0,j.inject)("e20-0fb0")),(0,F.Qj)(2,(0,j.inject)("eb9-3fdf")),(0,F.Sn)("design:paramtypes",[Y.K,q.E,K.g])],Z)},10674:(k,B,U)=>{"use strict";U.d(B,{q:()=>Y});var F=U(8674),G=U(62459),j=U(79687),$=U(35120),H=U(77938),V=U(73797),W=U(90633),q=U(13956),K=U(60126),z=U(72772);let Y=class{get allPetGear(){return(()=>(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.fetchPetGear()).items})))()}get allEquippedPetGear(){return(()=>(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.allPetGear).filter((k=>z.I.getPetWithEquippedGearByUniqueId(k.uuid)))})))()}get petRelics(){return(()=>(0,F.sH)(this,void 0,void 0,(function*(){return this.getPetGearByType("petRelic")})))()}get petHats(){return(()=>(0,F.sH)(this,void 0,void 0,(function*(){return this.getPetGearByType("petHat")})))()}constructor(){this._fetchIsInFlight=!1,this._equippedGear=[],$.q.instance.game.broadcaster.addAppListener(V.bI.PetGearAdClicked,this.getPetGearAdGifts,this,void 0,!0)}getPetGearByType(k){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.fetchPetGear()).items.filter((B=>{var U;return(null===(U=B.data.asset)||void 0===U?void 0:U.type)===k}))}))}getPetGearByUniqueId(k){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.fetchPetGear()).items.find((B=>B.uuid===k))}))}refreshPetGear(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;if(this._petGearFetchPromise&&this._fetchIsInFlight)return this._petGearFetchPromise;{const B=null===(k=yield this._petGearFetchPromise)||void 0===k?void 0:k.items;return this._petGearFetchPromise=null,this.fetchPetGear().then((k=>(this.checkForPlayerReceivedFirstPetGear(B,null==k?void 0:k.items),k)))}}))}fetchPetGear(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this._petGearFetchPromise)return this._petGearFetchPromise;this._fetchIsInFlight=!0;try{return yield this._petGearFetchPromise=this._networkHandler.getOwnedPetGear().finally((()=>this._fetchIsInFlight=!1))}catch(k){return G.RQr.logError(k,"Failed to fetch pet gear"),this._petGearFetchPromise=null,{items:[]}}}))}checkForPlayerReceivedFirstPetGear(k=[],B=[]){0===k.length&&B.length>0&&$.q.instance.game.broadcaster.broadcast(V.bI.ReceivedPetGear)}getSortedPetGearByType(k){return(0,F.sH)(this,void 0,void 0,(function*(){this._equippedGear=yield this.allEquippedPetGear;const B=yield this.getPetGearByType(k);if(B.sort(this.byId.bind(this)).sort(this.byRarity.bind(this)).sort(this.byNew.bind(this)).sort(this.byEquipped.bind(this)),z.I.shouldShowPetGearTutorialCached&&!$.q.instance.prodigy.gameContainer.get("e20-0fb0").isMember()){const k=B.map((k=>H.t.getItem(k.data.asset.type,k.data.asset.id))).findIndex((k=>{var B;return 1!==(null===(B=null==k?void 0:k.data)||void 0===B?void 0:B.member)}));if(-1!==k){const U=B.splice(k,1)[0];B.unshift(U)}}return B}))}byId(k,B){return Number(k.itemID.split("-").slice(-1))-Number(B.itemID.split("-").slice(-1))}byRarity(k,B){return H.t.getItem(B.data.asset.type,B.data.asset.id).data.rarity-H.t.getItem(k.data.asset.type,k.data.asset.id).data.rarity}byNew(k,B){var U,F,j,$;return G.Aq$.isDefined(null===(U=k.data)||void 0===U?void 0:U.seenAt)||G.Aq$.isDefined(null===(F=B.data)||void 0===F?void 0:F.seenAt)?G.Aq$.isDefined(null===(j=k.data)||void 0===j?void 0:j.seenAt)?G.Aq$.isDefined(null===($=B.data)||void 0===$?void 0:$.seenAt)?0:1:-1:0}byEquipped(k,B){return this._equippedGear.includes(k)&&this._equippedGear.includes(B)?0:this._equippedGear.includes(k)?-1:this._equippedGear.includes(B)?1:0}markGearAsSeen(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(0===k.length)return null;const B=yield this._networkHandler.markGearAsSeen(k);return(yield this.allPetGear).forEach((k=>{var U;const F=B.items.find((B=>B.uuid===k.uuid));(null===(U=null==F?void 0:F.data)||void 0===U?void 0:U.seenAt)&&(k.data.seenAt=F.data.seenAt)})),B.items}))}getPetGearAdGifts(){return(0,F.sH)(this,void 0,void 0,(function*(){if($.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(W.B.FEATURE_PET_GEAR,W.B.BREADCRUMB_RECEIVE_PET_GEAR_AD_GIFT))return G.VyI.log("Cannot received pet gear ad gift. Gift has already been received.",G.$bb.Warning),[];let k;try{k=yield this._networkHandler.getPetGearAdGifts()}catch(B){return G.RQr.logError(B,"Failed to get pet gear ad gifts from WW ad"),[]}if($.q.instance.game.broadcaster.removeAppListener(V.bI.PetGearAdClicked,this,void 0),$.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(W.B.FEATURE_PET_GEAR,W.B.BREADCRUMB_RECEIVE_PET_GEAR_AD_GIFT),k.items.length>0){const B=[...yield this.allPetGear];$.q.instance.prodigy.open.gotItem(k.items.map((k=>H.t.getItem(k.data.asset.type,k.data.asset.id))),(()=>this.checkForPlayerReceivedFirstPetGear(B,k.items)),!0,null,null,!0),(yield this.allPetGear).push(...k.items)}else G.VyI.log("Cannot received pet gear ad gift. Gift response returned no items.",G.$bb.Warning);return k.items}))}};(0,F.Cg)([(0,q.b)("1e8-b306"),(0,F.Sn)("design:type",K.L)],Y.prototype,"_networkHandler",void 0),Y=(0,F.Cg)([(0,j.injectable)(),(0,F.Sn)("design:paramtypes",[])],Y)},41935:(k,B,U)=>{"use strict";U.d(B,{o:()=>z});var F=U(8674),G=U(62459),j=U(28152),$=U(28402),H=U(20597);class V{}V.petGearHatMap=[null,"c18d1717-37ff-4c83-aa15-a219bef52c26","67678c5a-2a3f-40f6-ace3-57bd791c0050","60b22020-28c9-47b8-a316-e945d3bbf431","d4683af0-3b7c-4bd4-b840-915a0b9ece4c","01f39c50-17ee-4b9c-8414-223bab88bf4a","dc0ca518-c75d-4d8f-864c-97bb5b27744d","34e2cd40-f396-4e07-b13c-a4f34e8afca1","fc395621-9bc5-4130-a5ab-901bfeecdbf1","0b572c65-3e16-44ee-93aa-4ab77fe51c1d","a80205c4-c2fc-4dbc-aefa-3dba91c9b48d","28849986-cc38-4196-bcea-894c0e3f4431","d6f4ca6c-57aa-4c01-8f9a-a29c43f1969b","e5db148d-9924-4f22-b544-ea22d2de0bea","11d6eb66-fbe3-4c79-a7d6-fa78299776d6","ad0d0fad-9082-4464-aa20-e0e4f28c635a","74a62e4c-bf9b-46cf-8f7c-c80feb2aa266","57f0121e-1305-4252-9f9d-051d2174729e","d6d5410f-7228-41f5-921f-0d1dc5286aa7","e5f54cca-f111-4a78-b491-8e32f198f3b7","83876be2-9bfe-4f18-bba2-7b1648621cbb","f5c6df09-3563-48c1-bc99-478a9c857d05","855aafa0-a50d-424a-b357-28d7f1f1b837","3f5e1303-56da-4fd0-9b2d-97f1c3b4bdc4","7febfab4-2799-4055-bc4b-f3e53b47d0d3","de7cfa29-2d45-4bcf-ba76-f520d268ee81","a88b291e-016f-4d81-a7aa-299dfd6a52b6","0ca819f0-9d61-4f50-83c3-bc59b466b718","27463a4a-27f7-4d22-822b-ba51342384ce","f9b09b2f-1ea4-4ad2-8352-babb6bd8a1cf","a8f487bf-38c1-4385-98d4-367f0fab3c1a","df1a1025-6b95-47dc-83ca-9b048a898c70","31b394b7-cc54-46b9-b239-b0db25592041","8cd26676-9113-4a8f-ab53-6309ab337359","dc1c4e5d-e9ff-4a7c-9fa6-8c16d34fd783","60c236fc-20f4-41f7-87ac-b5c1fd64d6b3","fdb5d8f4-f435-409e-a4d0-53a872038706","c4cef804-cd06-492d-9f4f-15993eadd7a1","78e9db0f-9622-4403-bae9-3c5a79e026c4","af57df98-b771-431d-9350-78ac38678375","0afb318d-d004-49b5-8be1-269f9cbc3240","a213bfaa-7010-4748-aeb4-c6aade659397","33155a7e-7202-4068-be8e-7f69a3b998dd","5dec792b-06d6-4576-8d6c-6099a383a8a7","fc505f6d-04c5-4bca-b18b-7380d64e367a","e7897421-1d27-49c3-b058-2f5fda1891c9","999ec657-8bc0-4dde-8422-0b5c134f7bbe","a193a9fe-a6a9-44d4-af6c-9e4bb614b635","af31ea7c-52a2-4c52-a6d1-eade789b41b8","bee1ca65-8cf9-4ba5-8bcb-1e4c77c2cd75","7a88fa27-7770-4b3a-96a1-d40611b374b6","feea9557-c418-468d-a569-e3fbd93dcfa9","efa3e8a5-cad5-4b36-b77b-8527a20e196a","c09d9af3-246c-4dce-84e6-9bdb98360d80","6cdd225f-6988-4887-8874-9309b0f7dd6b","7e6b9e0c-97dd-4736-afd5-fa452ba1fde1","de9d8419-e0a8-4d51-8063-055cd04c52bb","3029f156-7c20-4b12-b91a-eb48485275c2","4c2a3e1c-7275-4dd9-b32d-e74fa7540e81","173155db-924e-4eb5-ba7e-8dd6384406e9","272911eb-aac9-4b4c-b138-877f6811a070","046238ac-70ed-4c85-87c1-438533ed8f0e","ecd671d2-5813-445c-bd17-d2991a072756","7eae0ef1-09a9-4b8a-883e-68d2487089da","2120297d-d3a7-4f53-bd7a-08ebbd7a4a4c","413eea9a-b379-40db-94fc-da6ae1cc6f3b","8c5f1923-45c5-4747-8c96-9024a1410993","4bb9ec14-17d5-4a80-a6dd-3c2dbac71a1c","1abec9d7-410d-4621-844f-8d66e764bf42","3593e514-1410-4ab0-9eaa-db16483acc62","0dbd3a3b-cd61-4427-addc-13eb128318f9","0804fa95-9402-46dd-bbdd-767738c9ab19","8f7e640e-9207-40e4-b54c-70da3a935269","c2dd3f50-349e-4444-8d65-d9e435a937c2","88eab339-1e39-4adf-af76-007754c60e03","79d899cf-3607-4ee1-ac5b-8c31a181f009","9c9a3a17-18eb-4d3b-a975-ba2f645fc5b1","370402eb-ebae-4cc3-bba2-db852d4f1354","c7f67d62-71c0-432c-8b00-619cd2a96f14","48c91acc-55e8-4042-8bad-e6ed6865db0d","c57d5879-665b-45d0-8136-882030bd9bba","094f0584-03db-48ee-ada6-c0f9981e229b","53f27a7d-e90e-47e2-8ac5-a5645d99c7a8","13471571-21c2-4269-8581-eb6afdc73c8b","cdf895c9-0fbf-4240-8cd9-26d7d02396cb","ad755ea7-b4d2-483c-8036-ff58bf8dc7b2","2c966c38-70c8-4f2a-b997-a62bc58ad2ac","b1fae9a9-43ee-40e2-aafb-f488a8f4a2e8","14923276-d3b9-4c2e-b171-994359e0516f","251609c3-973f-4608-8922-a7b52380a4b1","1a218c90-d2bf-47f1-b908-fa1a91308335","5c469219-eaf1-420f-87f3-5c38eb12ab80","c94915bb-f301-4e04-9a0d-b894347d7c3e","1727c866-bd17-4415-b72e-b3b9e80e7d31","c7f9fc22-b640-437a-b589-242f72c85210","230da12b-5f02-46cf-b465-1a6838d7de6e","8aba827d-6966-47fe-a78e-7f8e53000ff6","a923762a-8f94-423f-af3a-632124095aad","809546ff-d30a-4b7f-9191-0b8464f58466","a14164c9-4b4a-4e65-a133-f9d3562645a3","45f2a05c-26ff-48a1-9165-e9d9534da385","2e042b99-849c-4604-bd76-23caee75de7a","a66002a0-ea33-4403-810c-77dde379d567","4c4202e8-e309-48f7-8eae-4ef2f50d91b0","3162e771-dc1d-4fe8-b309-ad04b891530f","cf0ec8b5-87dd-4b9b-bcab-b7602c08facf","03979f2e-170c-4b8f-9f3e-79bf03e9f380","3d689bc4-1375-424d-8a0d-4544f86e1a43","8ea606cb-4163-4021-a6d9-6b0f857733a4","950a5a67-bade-4e9b-b8b5-4fb7fb4bd77c","9f21dace-aa8c-4b3f-bfdd-a5deedd45621","e5ac591f-280e-4ea2-a2ee-91aa30416995","58ef7d8e-8747-492d-90e8-fbd5fc0f27bf","e1bfd055-4057-4345-bbb7-e113d2eeaeb5","2a0b4469-9154-4100-a17b-a9e7c653e181","2aabc034-feca-4c84-8bed-40f59159d1fa","095f2e67-261b-436f-a75b-eee3603f9b3c","6352271b-8d28-4cec-80aa-ad5dfe562f35","25042c90-1655-4070-a5fa-357135e72a5b","34d849ff-dc51-44f1-9b5e-43ae896a5951","add2cc97-2d16-4907-9c0d-d8d9cb2821bb","c2228f53-34d5-4b6e-a15f-bc35a7efccfb","36c6280d-a75f-46d2-bbca-2bf398af3b0a","5b687c8e-9e5b-4dfa-ad0c-603d67a510c9","386529bd-8a53-4a16-ab09-922effb7eece","ea7ad051-7bfd-46ac-8e0f-46d6a77db97c","da131b4a-1085-4e16-89bd-aade3aa3119b","f5a6256c-e538-4864-8afc-1f760645dc71","5afac8d4-4dc3-4030-aa1f-75c792b6a040","4fbd2a8a-9a76-4cb5-b1ad-10a6cf03d2d8","03242b34-4e4d-4ed8-8dc8-9620857f5eef","e269228b-e118-4347-bf7e-4e99c6953321","40f85224-82f9-467e-b805-2bfafcc14b14","a11a394c-2c30-42c8-b9fd-9fa36765d8cf","af880135-c488-4ee0-9ec7-d0d7d97f3b77","a50495ee-ec97-44fd-9311-052ff8f2c065","af79c264-2964-4533-80b8-b5c12b9c9ed2","471132f9-fee5-4e42-bd87-25ff266b5bad","e79fe436-b88c-43cd-95e1-692126ff1879","4a512fe3-3c81-4834-8204-256189f3b433","54c8e0b4-492a-41f9-9d00-483c77089f8d","0ac02e40-7185-4fb4-806b-1fca584b8fc0","92e7a1c1-adf9-471b-9210-9aa7042a7570","fba609cf-1bdd-4360-a4a9-0aac30cccba2","50d5d82e-dbc6-42a7-81ce-d1351847b4e8"],V.petGearRelicMap=[null,"e565e4c1-faae-4bcd-b7bf-17a8fa82b02b","4d3daa38-8555-4a59-b579-a7d413ff08bf","dcb4587b-aeb7-4ecb-868e-623a2b8977c8","8c436fee-63b9-4071-9c13-ec9921394876","972ce5a9-4070-4d03-ac82-f973b179bb17","330ba7e3-d4ae-4726-bfdc-2fefcbcfd560","e4167afb-90c3-449b-9ca9-db25394151d7","93180782-3435-4dff-8453-d18eefae6af4","c6019d63-b342-468b-bd90-a8b164a9745a","c2228638-f7f6-434b-b3a0-6c5fdac4dcbc","9774fc88-dae9-41e4-8e74-ea989a68ca86","2cca773e-8d77-40f4-90fa-2415aa2042c8","6c74a732-898d-4d2e-bf74-b3db5caf2c08","0fae1ecf-a12e-4468-89d1-5cfe2c731491","fe432bf4-6c82-44ea-87a0-21473c7f6e0f","43cc6964-12af-4613-bb78-84babbdf6d1c","1a9f5e0d-2f38-43e7-aed3-d3baa11d5980","ca7f8d50-79f5-4c9b-9fde-117ed074df8f","805a0ec5-973a-4db2-a8a7-578a72af1908","d4f4a307-b49c-41ae-9db0-f50be7c5a34d","b277ebdc-dfc1-4f65-bac7-981485143571","e5329b54-bc62-48f0-9933-459ae3d5215f","d58552a8-b331-4d4a-a6be-4af863cb30fb","9f1239fc-22c5-40b8-bf8b-27d5aea2fa29","0776bafe-00ad-4330-9a8d-d27192e16f8f","f6724e18-c0b6-4362-affb-635dcdcb243e","726b27a5-10c6-469d-a866-24af58dfd98e","c0c9004c-0551-43e2-aa51-b64fd37f25b2","549ab8d1-d30b-4b0e-b74f-7f447bf72d27","74aad4b1-3092-4eb2-a626-245c6c07753b","508fbc3b-21fd-4167-938c-47c5c2479448","85bddfa9-200b-4bfa-a50a-b987f02047db","6ba91cdc-c03e-4911-97ab-46ade2083212","26de7583-5a04-4131-ac83-6f6b0180b461","8c4640ac-3f23-45ef-be2d-6921df9897e9","488d398a-b817-4f7c-b703-6c8bbdc3c9fd","0203ff16-a092-4e73-9ce7-d06f4aac4187","efcacc62-980b-4bd2-9467-fe2ec6fbb447","3e811936-f217-4bdb-abdd-e9b5cd02e998","c9cf1589-ce23-4682-a6a6-42d74f583548","dd6f3b75-55f9-415f-9a37-3a63e86dfb6c","5baf22dc-712f-44c0-839e-b8badfb49363","aaf601e3-c687-4be1-bd6d-a8403359b5ff","ceeadb29-0a91-4595-b31a-90367e14ca80","0cd748e1-138d-439c-98b8-fa0b5a095a40","076bec69-6c02-4be8-b223-77be44dce933","64890b30-d47e-4f46-8449-15c498b2a21e","07b99689-35e2-4945-91fb-1bc1592b2b16","a54397d2-62e7-493b-be0a-a84115a10490","57317ac7-83ca-4b91-be0f-d4c49daec19d","9ad61d70-64a9-4ca3-9796-5f9f68830ea3","61e85783-4439-4a4d-9f8d-53fad913a396","ac42c1b5-df00-4085-91bd-9cff255339c4","6192506b-85e4-4d65-b737-9430a8d579e7","601d1546-3271-4546-812a-366b985ad2eb","181a5ac1-274f-49da-9967-44f8c7148402","1685b401-15f1-4038-8aa1-2be1d3adfaea","ee19ef9a-d86b-468c-985a-86adfbb9aa0e","d5fbbb82-4e63-4317-8da5-a50e66779aa1","cac0cc28-49d9-40ff-85a6-9f6bd48f0207","ebc964a9-efe5-4608-906c-905fe3129a84","2829c626-044b-4304-bea3-44499dcdc6fd","a38ecc5b-e12a-4446-a312-bdb44fc3c07f","283a5111-09f6-40da-b88b-ea9106132484","acf5ee98-2c62-4698-952d-415672291fea","9ce2daf1-c131-4f36-85c0-ac289c1a49ba","ad888910-ec1d-48ee-9826-40b12bee66d2","0e5f6804-7dc5-4baf-a620-3b495d80611c","8053a052-e5dd-4cfc-9c1f-08906df52b1f","425739cd-0799-4524-b22c-e43e619dc1f7","57f6149d-563c-440b-85ff-59a6de9c1bb0","478a1bd5-e744-4bca-8b50-0c4cdc130a62","525889df-7480-4f94-800c-0cf66c537f6c","5ce905e3-a51c-4bd1-9008-21130218ed74","9c906f80-30d0-422d-99bf-44e5fa6bf923","d28078ac-6725-4c36-a55b-efd86774cf7e","05ba9cf4-8309-48b4-afed-b56475696c99","e3f5797f-723b-4026-9d7b-b99e6195630c","981307c5-7c64-408f-89c0-b7ca703ff476","730e515b-6839-4aac-a8c1-be91f0741025","00d7b723-22c6-48d9-a8f5-ee4023ab28f3","e2edc611-1d4a-4e9b-86d0-096042235f31","3d519399-5ca4-44ef-b8ba-7441f4765e45",null,"965eaef4-dd2c-4238-9c3a-050d95276064","c8e39757-794e-4cda-8ee6-eebc454e8fb8","1201b04b-a8f9-4b39-b1a1-a03d6bc0648b","84e5c0eb-84d6-4802-8f1d-2fa3857cd3c2","fcc7bc89-d241-4d26-9ff9-4c289e3283ce","a1140b9a-ce6d-46cf-9732-53666636bff8","5939ade6-c16b-4450-87cf-12e6f2eaf01b","d80e68c1-6778-435c-8277-cdc41cd05ec1","310ceb0d-c2e6-4260-b2ca-623c196a37e5","8ae5832a-f7a0-4d2c-aa7b-e0830ca17c43","bdfaf06f-9f73-427b-a40a-ec9cd373f231","9db5fa89-8776-474b-b637-5b4129e93a08","57ea3485-1f46-4ba8-8249-866dcd69c9c5","8c7af42d-a8cd-4ecd-9b93-5800849fabca","04fa078a-fd27-4b8d-8582-bf311b119be5","b0bc9e82-6762-4e47-86ea-ffc656fb81cc","1535696a-8ef4-43b2-b5b2-4fe4f1dbee90","6b14784b-e0aa-41c3-b9a2-7f9fb6acd314","a6399d08-f382-467b-9645-249ac5e34ae5","23e4bd78-7044-4da0-a8bc-01e6bbd27894","72d20335-aef9-4f52-94ff-ec279afb217d","e40e146a-e771-4447-82fb-f21ec8dc81f0","312728aa-efbf-45ae-92f1-e7ce6731c4d5","26afd9ae-428d-41f5-ad25-b5b24d9dca28","897de8ae-c5b1-477a-b55b-d38755eb7c32","28c17bb1-7aa8-4b06-972d-e9ca342f3b9a","37a37fa2-ff26-4014-9bf6-1ab7e82b56a1","97009a93-f624-40b1-be4e-dba7ff045107","3b59a5cb-e398-4ee7-998f-5feed720aea2","d89e4244-49f7-42bc-950e-d5df948e23a3","4f2eed9c-c31c-45b3-9193-76a2464be96e","cc05f3a5-679f-4f2b-9890-4837b8b84858","a8c9420d-022e-474f-bd1e-32379019c17a","b2e7103b-24f7-4fa4-b0a0-e06b9a78f1b7","2464648d-3369-4e23-b875-1c63ab4bcf1d","63da5755-04ae-42ef-b7d1-3efc9549ecde","6e605402-8361-40bf-8ebf-db4920b6b1fb","498c6410-0c03-4c95-9528-a735c50e0bf0","299ec8a6-067e-474f-83cd-45ad8ab239d4","80228696-4f96-415c-bf56-3783be400034","0f3e1a6e-fbe1-48b3-85b8-936f3ebda7ef","cbf576af-6cf7-4295-9087-8a4e7e5ba812","6b91fe88-1bdb-4913-8e93-f0b9dbd6dc6d","e2e91b6d-0fbc-46ca-8806-c2948e47c1b2","d81cc11b-6e53-4967-815c-aac25938e5d9","20596f74-b851-409e-b5fc-a92ea2d3a690","4e169c5c-d879-4ada-b196-f11b2988729c","7552a74a-781a-47b5-8143-43821edb59b7","a31e5862-b1e5-46db-a309-5806245a5399","ce2e4781-f17f-4dbd-ac7f-7bee9b7ee31d","01a441ff-33b2-42ab-8d91-555cd856b093","03482cdc-8bd5-4fc1-8e82-dfccbd242562","e82cecde-c21d-46d6-9356-f79ef72994f2","c28dcabc-d74c-4ab3-889a-2131d86d036a","c08aadf9-c509-433c-bf34-64827859efc9","cff2b8d1-ac5d-4814-864b-838ae4f3487e","694dbbdc-a285-4642-87a5-7f0c8edb8b88","dc57e08b-186f-47b1-8238-7cb01d8889e1","2a6c788b-f4fc-4337-8f32-498166af2e39","d93c2ded-e8f2-4e97-8990-3d52701d6b01","ae3e80fc-26aa-4e2b-93bc-80181c1dd25c","1b08a939-882c-4bcc-aba8-ee2ef14a0770","384f58c0-8156-4d04-8926-42d71bedcaaa"];var W=U(62889),q=U(53661),K=U(10674);let z=class extends G.uAl{constructor(){super(...arguments),this.runOnCreate=!0}set petData(k){this._petData=k}get petData(){var k;return null!==(k=this._petData)&&void 0!==k?k:this.getInjectedValue(q.hi.PetCreatureData)}create(){super.create(),this.runOnCreate&&this.updateGear().catch(G.RQr.createHandler("[PetGearLoadoutComponent] Could not update gear on create"))}updateGear(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,j,$,H,V,W;if(k||this.petData)try{this._spine.isLoaded||(yield this._spine.OnLoaded.asPromise());const G=null!==(B=null==k?void 0:k.petHat)&&void 0!==B?B:null===(F=null===(U=this.petData)||void 0===U?void 0:U.gear)||void 0===F?void 0:F.petHat,q=null!==(j=null==k?void 0:k.petRelic)&&void 0!==j?j:null===(H=null===($=this.petData)||void 0===$?void 0:$.gear)||void 0===H?void 0:H.petRelic,K="number"==typeof G?G:null===(V=yield this._inventoryManager.getPetGearByUniqueId(G))||void 0===V?void 0:V.data.asset.id,z="number"==typeof q?q:null===(W=yield this._inventoryManager.getPetGearByUniqueId(q))||void 0===W?void 0:W.data.asset.id;yield Promise.all([this.setGearOfType(null!=K?K:0,"petHat"),this.setGearOfType(null!=z?z:0,"petRelic")]),yield this._gearManager.refresh()}catch(q){G.RQr.createHandler("[PetGearLoadoutComponent] error updating gear")}}))}setGearOfType(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=this.getPetGearMapByCategory(B),F=this.getGearSlotIndexByCategory(B),j=U[k];if(!j)return void(yield this._gearManager.setGearAt(F,null,!1));const $=yield W.M.loadGearElementFromGuid(j);G.Aq$.isDefined($)?yield this._gearManager.setGearAt(F,$,!1):G.RQr.createHandler(`[PetGearLoadoutComponent] Failed to parse GearElement from file for ${j} of type ${B}`)}))}getPetGearMapByCategory(k){switch(k){case"petHat":return V.petGearHatMap;case"petRelic":return V.petGearRelicMap}}getGearSlotIndexByCategory(k){switch(k){case"petHat":return 0;case"petRelic":return 1}}};(0,F.Cg)([(0,G.Cdj)("d69-defe"),(0,F.Sn)("design:type",K.q)],z.prototype,"_inventoryManager",void 0),(0,F.Cg)([(0,G.Pqz)(H.B),(0,F.Sn)("design:type",H.B)],z.prototype,"_gearManager",void 0),(0,F.Cg)([(0,G.Pqz)($.v),(0,F.Sn)("design:type",$.v)],z.prototype,"_spine",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],z.prototype,"runOnCreate",void 0),z=(0,F.Cg)([(0,G.EVk)("PetGearLoadout",j.Y.player)],z)},19592:(k,B,U)=>{"use strict";var F;U.d(B,{R:()=>F}),function(k){k[k.petRelic=0]="petRelic",k[k.petHat=1]="petHat"}(F||(F={}))},72772:(k,B,U)=>{"use strict";U.d(B,{I:()=>Q});var F=U(8674),G=U(62459),j=U(90156),$=U(35120),H=U(77938),V=U(76277),W=U(90633),q=U(3119),K=U(25480),z=U(56625),Y=U(73678);class Q{static get shouldShowPetGearTutorialCached(){return Q.cachedTutorialEnabledFlag}static updateCachedPetGearTutorialFlag(){return(0,F.sH)(this,void 0,void 0,(function*(){return Q.shouldShowPetGearTutorial()}))}static getEquippablePetGears(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=$.q.instance.prodigy.gameContainer.get("e20-0fb0"),B=yield $.q.instance.prodigy.gameContainer.get("d69-defe").allPetGear;return k.isMember()?B:B.filter((k=>{var B,U;return 1!==(null===(U=null===(B=H.t.getItem(k.data.asset.type,k.data.asset.id))||void 0===B?void 0:B.data)||void 0===U?void 0:U.member)}))}))}static shouldShowPetGearTutorial(){return(0,F.sH)(this,void 0,void 0,(function*(){if($.q.instance.prodigy.gameContainer.get("12f-4e29").isBreadcrumbComplete(W.B.FEATURE_PET_GEAR,W.B.BREADCRUMB_EQUIP_PET_GEAR_FTUE))return this.cachedTutorialEnabledFlag=!1,this.cachedTutorialEnabledFlag;if((0,V.G)(j.m))return this.cachedTutorialEnabledFlag=!1,this.cachedTutorialEnabledFlag;const k=$.q.instance.prodigy.world.getCurrentZone(),B=$.q.instance.prodigy.gameContainer.get("e20-0fb0"),U=![Y.A_.CRYSTALCAVERNS,Y.A_.DARKTOWER,Y.A_.TOWERTOWN].includes(k),F=$.q.instance.prodigy.open.menus.length>0,G=$.q.instance.prodigy.open.isMenuOpen(K.u),Q=$.q.instance.prodigy.open.isMenuOpen(q.o),X=B.player.kennel.getPets().map((k=>H.t.getItem("pet",k.ID))).some((k=>{var B;return(null===(B=k.data.gearEquipSlots)||void 0===B?void 0:B.length)>0})),Z=yield $.q.instance.prodigy.gameContainer.get("d69-defe").allPetGear,J=(null==Z?void 0:Z.length)>0,tt=B.isMember()||Z.map((k=>H.t.getItem(k.data.asset.type,k.data.asset.id))).some((k=>{var B;return 1!==(null===(B=null==k?void 0:k.data)||void 0===B?void 0:B.member)}));return this.cachedTutorialEnabledFlag=U&&X&&J&&tt&&(!F||G||Q)&&z.s.canShowFtue(),this.cachedTutorialEnabledFlag}))}static getPetGearStats(k){var B,U,F;return null!==(F=null===(U=null===(B=H.t.getItem(k.data.asset.type,k.data.asset.id))||void 0===B?void 0:B.data)||void 0===U?void 0:U.stats)&&void 0!==F?F:{}}static getPetWithEquippedGearByUniqueId(k){return $.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPets().find((B=>{var U,F;return(null===(U=B.gear)||void 0===U?void 0:U.petHat)===k||(null===(F=B.gear)||void 0===F?void 0:F.petRelic)===k}))}static getEquippedGearForPetByUniqueId(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPetByUniqueID(k);return B?this.getEquippedGearForPet(B):{}}))}static getEquippedGearForPet(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;const F=$.q.instance.prodigy.gameContainer.get("d69-defe");return{petHat:yield F.getPetGearByUniqueId(null===(B=k.gear)||void 0===B?void 0:B.petHat),petRelic:yield F.getPetGearByUniqueId(null===(U=k.gear)||void 0===U?void 0:U.petRelic)}}))}static getStatsOfEquippedGearForPet(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=$.q.instance.prodigy.gameContainer.get("d69-defe");return(yield Promise.all(Object.values(null!=k?k:{}).map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return B.getPetGearByUniqueId(k)})))))).filter(G.Aq$.isDefined).map(Q.getPetGearStats).reduce(((k,B)=>(Object.entries(B).forEach((([B,U])=>{var F;null!==(F=k[B])&&void 0!==F||(k[B]=0),k[B]+=U})),k)),{})}))}}Q.cachedTutorialEnabledFlag=!1},52382:(k,B,U)=>{"use strict";U.d(B,{H:()=>Z});var F=U(8674),G=U(62459),j=U(99625),$=U(83133),H=U(94566),V=U(28152),W=U(76642),q=U(94325),K=U(53661),z=U(10674),Y=U(19592),Q=U(72772),X=U(9195);let Z=class extends G.uAl{constructor(){super(...arguments),this._maxCardAmount=20,this._cardWidth=130,this._cardHeight=130,this._startIndexOfCurrentRange=0,this._cachedContentViewLastY=0,this._nextContentViewY=0,this._prevContentViewY=0,this._lastRowIndex=16,this._loading=!1,this.onGridInitialized=new G.HN0,this.onGearCardSelected=new G.HN0,this.onGridDisplayed=new G.HN0,this.onEquippedGearChanged=new G.HN0,this.onEmptyGrid=new G.HN0}create(){const k=Object.create(null,{create:{get:()=>super.create}});return(0,F.sH)(this,void 0,void 0,(function*(){k.create.call(this),this._assetType=this._petGearIdentifier===Y.R.petHat?"petHat":"petRelic",this._allGearData=yield this._inventoryManager.getSortedPetGearByType(this._assetType),this._equippedGear=this._allGearData.find((k=>{var B;return(null===(B=Q.I.getPetWithEquippedGearByUniqueId(k.uuid))||void 0===B?void 0:B.uniqueID)===this._activePetData.uniqueID})),this._recycledContainer=new G._mx,this._objectPool=new G.iyL(this.createGearCard.bind(this),null,this.recycleGearCard.bind(this)),this._objectPool.allocate(this._maxCardAmount),this.onEmptyGrid.dispatch(0===this._allGearData.length),this.initialize()}))}initialize(){this._startIndexOfCurrentRange=0,this._cachedContentViewLastY=0,this._nextContentViewY=this.calcNextYThreshold(),this._prevContentViewY=this.calcPrevYThreshold(),this._displayedGearData=this._allGearData.slice(0,Math.min(this._maxCardAmount,this._allGearData.length)),this._displayedGearData.forEach((k=>{this.addGearCard(k)})),this.calcLastRowIndex(),this.resizeContentArea(),this._gearGrid.updateAll(!1),this._objectPool.aliveList.forEach((k=>{var B;null===(B=k.findComponentInChildren($.l))||void 0===B||B.setSelected(!1)})),this.onGridInitialized.dispatch()}onDisplayed(){var k,B;this.onGridDisplayed.dispatch(null!==(B=null!==(k=this._selectedGear)&&void 0!==k?k:this._equippedGear)&&void 0!==B?B:null)}resizeContentArea(){const k=this._gearGrid.GameObject.findComponent(G.XVE);k.setSizeDelta(k.widthDelta,this._gearGrid.yPositionOffset+Math.ceil(this._allGearData.length/this._gearGrid.fixedColumnCount)*this._gearGrid.rowSpacing)}createGearCard(){let k=new G._mx;return k=this._prefabLoader.loadFromGUID(j.l.PetGearItemCard),k}recycleGearCard(k){const B=k.findComponent(X.M);B.unbindContext(),B.onEquip.removeAll(),B.onUnequip.removeAll(),B.onSelect.removeAll();const U=k.findComponentInChildren($.l);U.onUnselected.dispatch(),this._toggleGroup.removeSelectable(U),this._toggleGroup.setSelectedIndex(-1),k.transform.setPosition(-this._cardHeight,-this._cardHeight),this._recycledContainer.addChild(k)}addGearCard(k,B=!1){var U;const F=this._objectPool.getObject();F.findComponent(G.bE_).Container.rebind(K._R.PetGearItemData).toConstantValue(k),F.findComponent(G.bE_).Container.rebind(K.hi.PetCreatureData).toConstantValue(this._activePetData);const j=F.findComponent(X.M);j.bindContext(),j.onEquip.add(this.swapEquippedItem.bind(this)),j.onSelect.add(this.setCardSelected.bind(this,j)),(null===(U=j.equippedPetData)||void 0===U?void 0:U.uniqueID)===this._activePetData.uniqueID&&(this._equippedGear=j.gearData,G.Aq$.isDefined(this._selectedGear)||(this._selectedGear=this._equippedGear));const H=F.findComponentInChildren($.l);this._toggleGroup.addSelectable(H),this._selectedGear===j.gearData&&(j.setSelected(!0),this._toggleGroup.setItemSelected(H,!0)),B?this._gearGrid.GameObject.addChildAt(F,0):this._gearGrid.GameObject.addChild(F)}removeGearCard(k=!1){const B=this._gearGrid.GameObject.children.length;if(B<=0)return;const U=k?0:B-1,F=this._gearGrid.GameObject.children[U];F.parent=null,this._objectPool.recycleObject(F)}updateActiveGearCards(k=!1){this._startIndexOfCurrentRange=k?Math.max(this._startIndexOfCurrentRange-this._gearGrid.fixedColumnCount,0):this._startIndexOfCurrentRange+this._gearGrid.fixedColumnCount;const B=Math.min(this._startIndexOfCurrentRange+this._maxCardAmount,this._allGearData.length);this._displayedGearData=this._allGearData.slice(this._startIndexOfCurrentRange,B),k||this.calcLastRowIndex();const U=this._displayedGearData.slice(k?0:this._lastRowIndex,k?this._gearGrid.fixedColumnCount:this._displayedGearData.length);k&&U.reverse(),U.forEach((B=>{this.addGearCard(B,k)}))}getVisibleGearCardByIndex(k=0){return k<0||k>=this._gearGrid.GameObject.children.length?null:this._gearGrid.GameObject.children[k]}update(){if(super.update(),this._scrollView.getVisibleLocalRange().x!==this._cachedContentViewLastY&&!this._loading){this._cachedContentViewLastY=this._scrollView.getVisibleLocalRange().x,!0===this._tooltip.parent.active&&(this._tooltip.parent.active=!1);const k=Math.abs(this._cachedContentViewLastY);if(k>this._nextContentViewY){this._loading=!0;for(let k=0;k=0;k--)if(k%this._gearGrid.fixedColumnCount==0){this._lastRowIndex=k;break}}calcNextYThreshold(){if(this._startIndexOfCurrentRange+this._maxCardAmount>=this._allGearData.length)return 1/0;return this._gearGrid.yPositionOffset+this._gearGrid.rowSpacing*(Math.floor(this._startIndexOfCurrentRange/this._gearGrid.fixedColumnCount)+1)}calcPrevYThreshold(){if(0===this._startIndexOfCurrentRange)return 0;return this._gearGrid.yPositionOffset+this._gearGrid.rowSpacing*Math.floor(this._startIndexOfCurrentRange/this._gearGrid.fixedColumnCount)}swapEquippedItem(){if(this._equippedGear){const k=this._gearGrid.GameObject.children.find((k=>k.findComponent(X.M).gearData===this._equippedGear));null==k||k.findComponent(X.M).unequipItem()}this._equippedGear=this._selectedGear,this.onEquippedGearChanged.dispatch(this._equippedGear)}setCardSelected(k){this._selectedGear=k.gearData,this.setTooltip(k),this.onGearCardSelected.dispatch(k);const B=this.gameObject.findComponentInChildren(G.bE_,!0);if(G.Aq$.isDefined(B)){const k=B.Container.get(K._R.PetGearItemInfoDataProvider);null==k||k.setGearItem(this._selectedGear);const U=B.Container.get(K._R.PetGearPetPreviewDataProvider);null==U||U.setGearPreviewItem(this._selectedGear)}}setTooltip(k){if(this._selectedGear===this._equippedGear||!(null==k?void 0:k.equippedPetData))return void(this._tooltip.parent.active=!1);const B=this._gearGrid.GameObject.children.indexOf(k.GameObject)%4==3?.75:.5,U=k.GameObject.transform.worldPosition.x+this._cardWidth/2,F=k.GameObject.transform.worldPosition.y+this._cardHeight/2;this._tooltip.parent.transform.setPosition(U,F+87),this._tooltip.parent.findComponent(G.XVE).setPivot(B,.5),this._tooltip.findComponent(G.XVE).setAnchorMin(B,0),this._tooltip.findComponent(G.XVE).setAnchorMax(B,0),this._tooltip.parent.active=!0;const j=this._tooltip.parent.findComponentInChildren(W.S);j.onDispatch.removeAll(),j.addListener((()=>{k.equipItem(),this._tooltip.parent.active=!1}))}resetSelection(){this._toggleGroup.setSelectedIndex(-1);const k=this._gearGrid.GameObject.children.find((k=>k.findComponent(X.M).gearData===this._selectedGear));null==k||k.findComponentInChildren($.l).onUnselected.dispatch()}destroy(){this.onGridInitialized.dispose(),this.onGearCardSelected.dispose(),this.onGridDisplayed.dispose(),this.onEquippedGearChanged.dispose(),this.onEmptyGrid.dispose();const k=this._allGearData.filter((k=>{var B;return!G.Aq$.isDefined(null===(B=k.data)||void 0===B?void 0:B.seenAt)})).map((k=>({itemID:k.itemID,uuid:k.uuid})));this._inventoryManager.markGearAsSeen(k).catch(G.RQr.createHandler("[Pet Gear Inventory Manager] Failed to mark gear as seen")).finally((()=>{this._objectPool.destroy(!0),this._recycledContainer.destroy(),super.destroy()}))}};(0,F.Cg)([(0,G.Cdj)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],Z.prototype,"_prefabLoader",void 0),(0,F.Cg)([(0,G.Cdj)("d69-defe"),(0,F.Sn)("design:type",z.q)],Z.prototype,"_inventoryManager",void 0),(0,F.Cg)([(0,G.Cdj)(K.hi.PetCreatureData),(0,F.Sn)("design:type",Object)],Z.prototype,"_activePetData",void 0),(0,F.Cg)([(0,G.gfw)(Y.R),(0,F.Sn)("design:type",Number)],Z.prototype,"_petGearIdentifier",void 0),(0,F.Cg)([(0,G.MnK)(G.JTA),(0,F.Sn)("design:type",G.JTA)],Z.prototype,"_gearGrid",void 0),(0,F.Cg)([(0,G.MnK)(q.C),(0,F.Sn)("design:type",q.C)],Z.prototype,"_scrollView",void 0),(0,F.Cg)([(0,G.MnK)(H.O),(0,F.Sn)("design:type",H.O)],Z.prototype,"_toggleGroup",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Z.prototype,"_tooltip",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Z.prototype,"onGridInitialized",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Z.prototype,"onGearCardSelected",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Z.prototype,"onGridDisplayed",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Z.prototype,"onEquippedGearChanged",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Z.prototype,"onEmptyGrid",void 0),Z=(0,F.Cg)([(0,G.EVk)("PetGearInventoryGridManager",V.Y.uiPet)],Z)},9195:(k,B,U)=>{"use strict";U.d(B,{M:()=>et});var F=U(8674),G=U(62459),j=U(17446),$=U(35120),H=U(91207),V=U(1195),W=U(77938),q=U(28152),K=U(34603),z=U(26932),Y=U(26004),Q=U(64353),X=U(95057),Z=U(53661),J=U(47255),tt=U(72772);let et=class extends z.z{constructor(){super(...arguments),this.onEquip=new G.HN0,this.onUnequip=new G.HN0,this.onSelect=new G.HN0}get gearData(){return this._gearData}get equippedPetData(){return this._equippedPetData}create(){super.create()}destroy(){this.unbindContext(),this.onEquip.dispose(),this.onUnequip.dispose(),this.onSelect.dispose(),super.destroy()}bindContext(){var k,B,U,F;this._gearData=this._context.Container.get(Z._R.PetGearItemData),this._equippedPetData=tt.I.getPetWithEquippedGearByUniqueId(this._gearData.uuid),this._itemAssetData=W.t.getItem(this._gearData.data.asset.type,this._gearData.data.asset.id),this._context.Container.rebind(Z._R.PetGearItemIcon).toConstantValue(this.getGearIcon(this._gearData)),this._context.Container.rebind(Z._R.PetGearItemRarity).toConstantValue(this.getCardRarityIcon(null===(k=this._itemAssetData.data)||void 0===k?void 0:k.rarity)),this._context.Container.rebind(Z._R.PetGearItemMember).toConstantValue(null===(B=this._itemAssetData.data)||void 0===B?void 0:B.member),this._context.Container.rebind(Z._R.PetGearItemNew).toConstantValue(!G.Aq$.isDefined(null===(U=this._gearData.data)||void 0===U?void 0:U.seenAt)),this._context.Container.rebind(Z._R.PetGearItemEquipped).toConstantValue(G.Aq$.isDefined(this._equippedPetData)&&this._activePetData===this._equippedPetData),this._context.Container.rebind(Z._R.PetGearShowPetIcon).toConstantValue(G.Aq$.isDefined(this._equippedPetData)),this._context.Container.rebind(Z._R.PetGearPetIcon).toConstantValue(this.getPetIcon(null===(F=this._equippedPetData)||void 0===F?void 0:F.ID)),this.refreshCard(),this.gameObject.active=!0}unbindContext(){this.setSelected(!1),this._context.Container.unbind(Z._R.PetGearItemData),this._context.Container.unbind(Z._R.PetGearItemIcon),this._context.Container.unbind(Z._R.PetGearItemMember),this._context.Container.unbind(Z._R.PetGearItemNew),this._context.Container.unbind(Z._R.PetGearItemRarity),this._context.Container.unbind(Z._R.PetGearItemSelected),this._context.Container.unbind(Z._R.PetGearItemEquipped),this._context.Container.unbind(Z._R.PetGearShowPetIcon),this._context.Container.unbind(Z._R.PetGearPetIcon);const k=this.gameObject.findComponentsInChildren(K._);k&&k.forEach((k=>{var B;(null===(B=k.sprite)||void 0===B?void 0:B.frameName)||(k.sprite.key=null)})),this.refreshCard()}refreshCard(){this.gameObject.findComponentsInChildren(Y.B).forEach((k=>k.consume()))}equipItem(){var k;if(null===(k=this._activePetData)||void 0===k?void 0:k.uniqueID){if(this._itemAssetData.data.member&&!this._playerData.isMember()){const k={conversionFunnelName:J.o.FunnelPetGear,conversionStaticOrVideo:X.R.Modal},B=Q.P.shouldUseUnifiedConversionFlow(J.o.FunnelPetGear)?X.R.UnifiedConversionFlow:X.R.Modal;return $.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:"Equip-Member-Locked-Pet-Gear",category:"Pet-Gear",contentId:this.gearData.itemID,adType:B,adVersion:Q.P.getAdVersion(J.o.FunnelPetGear)}),void $.q.instance.prodigy.open.membershipInfo(null,k)}this.onEquip.dispatch(),this._playerData.player.kennel.equipGearForPet(this._activePetData.uniqueID,this._gearData),this._equippedPetData=this._activePetData,this._context.Container.rebind(Z._R.PetGearItemEquipped).toConstantValue(!0),this._context.Container.rebind(Z._R.PetGearShowPetIcon).toConstantValue(!0),this._context.Container.rebind(Z._R.PetGearPetIcon).toConstantValue(this.getPetIcon(this._activePetData.ID)),this.refreshCard()}}unequipItem(){var k;(null===(k=this._activePetData)||void 0===k?void 0:k.uniqueID)&&(this.onUnequip.dispatch(),this._playerData.player.kennel.unequipGearForPet(this._activePetData.uniqueID,this._gearData.itemID.split("-")[0]),this._equippedPetData=null,this._context.Container.rebind(Z._R.PetGearItemEquipped).toConstantValue(!1),this._context.Container.rebind(Z._R.PetGearShowPetIcon).toConstantValue(!1),this._context.Container.rebind(Z._R.PetGearPetIcon).toConstantValue(null),this.refreshCard())}setSelected(k){var B,U;k&&this.onSelect.dispatch(),G.Aq$.isDefined(null===(U=null===(B=this._gearData)||void 0===B?void 0:B.data)||void 0===U?void 0:U.seenAt)||this._context.Container.rebind(Z._R.PetGearItemNew).toConstantValue(!k),this._context.Container.rebind(Z._R.PetGearItemSelected).toConstantValue(k),this.refreshCard()}getGearIcon(k){return H.E.getIconForType(k.data.asset.type,k.data.asset.id)}getPetIcon(k){return k?H.E.getIconForType("pet",k):null}getCardRarityIcon(k){return`${j.E[k].toLowerCase()}-130x130`}};(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",V.E)],et.prototype,"_playerData",void 0),(0,F.Cg)([(0,G.Cdj)(Z.hi.PetCreatureData),(0,F.Sn)("design:type",Object)],et.prototype,"_activePetData",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],et.prototype,"onEquip",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],et.prototype,"onUnequip",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],et.prototype,"onSelect",void 0),et=(0,F.Cg)([(0,G.EVk)("PetGearItemCardDataProvider",q.Y.uiPet)],et)},91020:(k,B,U)=>{"use strict";U.d(B,{t:()=>Y});var F,G=U(8674),j=U(62459),$=U(88022),H=U(36648),V=U(17446),W=U(77938),q=U(28152),K=U(26932),z=U(26004);let Y=F=class extends K.z{bindContext(){var k,B,U,G;const j=W.t.getItem(null===(B=null===(k=this._petGearItem)||void 0===k?void 0:k.data)||void 0===B?void 0:B.asset.type,null===(G=null===(U=this._petGearItem)||void 0===U?void 0:U.data)||void 0===G?void 0:G.asset.id),V=$._.Ui_pet_gear_json;this._petGearItem&&j?(this._context.Container.rebind("PetGearSlotIcon").toConstantValue(H.q[`Icon_${j.type}_${j.ID}`]),this._context.Container.rebind("PetGearSlotBackground").toConstantValue([V,F.RARITY_SLOT_ASSET_MAP[j.data.rarity]])):(this._context.Container.rebind("PetGearSlotIcon").toConstantValue("empty"),this._context.Container.rebind("PetGearSlotBackground").toConstantValue([V,"pet-gear-slot-empty"])),this.gameObject.findComponentsInChildren(z.B,!1).forEach((k=>k.consume()))}};Y.RARITY_SLOT_ASSET_MAP={[V.E.Common]:"pet-gear-slot-common",[V.E.Uncommon]:"pet-gear-slot-uncommon",[V.E.Rare]:"pet-gear-slot-rare",[V.E.Heroic]:"pet-gear-slot-heroic",[V.E.Legendary]:"pet-gear-slot-legendary"},Y.GEAR_TYPE_TO_SLOT_IDENTIFIER_MAP={petRelic:"PetRelicSlotContainer",petHat:"PetHatSlotContainer"},(0,G.Cg)([(0,j.Cdj)("PetGearSlotData",!1),(0,G.Sn)("design:type",Object)],Y.prototype,"_petGearItem",void 0),Y=F=(0,G.Cg)([(0,j.EVk)("PetGearSlotDataProvider",q.Y.uiPet)],Y)},9860:(k,B,U)=>{"use strict";U.d(B,{n:()=>Q});var F,G=U(8674),j=U(62459),$=U(79687),H=U(65240),V=U(35120),W=U(73797),q=U(41674),K=U(13956),z=U(35537),Y=U(65933);let Q=class{get petInventoryData(){return this._isInitialized||j.VyI.log("PetInventoryDataProvider has not been initialized",j.$bb.Error),this._petInventoryData}constructor(){this._petInventoryData=null,this.onPetInventoryDataUpdated=new j.HN0,this._isInitialized=!1,this[F]="petInventoryChangedData",V.q.instance.prodigy.game.broadcaster.addAppListener(W.H3.MembershipResponseReceived,this.handleMembershipChange.bind(this),this,void 0,!0)}fetchPetInventoryData(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._networkHandler.getPetInventoryData();return this._petInventoryData=k,k}))}updateSlots(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=V.q.instance.prodigy.gameContainer.get("c47-20b6").item.beginSecureItemTransaction();yield Promise.all([this._networkHandler.updateSlots(k),this.onPetInventoryDataUpdated.asPromise()]),U.flush({sink_type:H.C.PetSlots,transaction_id:B})}))}setSlots(k){return(0,G.sH)(this,void 0,void 0,(function*(){0}))}destroy(){this.onPetInventoryDataUpdated.dispose(),V.q.instance.prodigy.game.broadcaster.removeAppListener(W.H3.MembershipResponseReceived,this,void 0)}refresh(){this.fetchPetInventoryData().then((()=>{this._isInitialized=!0})).catch((k=>{j.RQr.logError(k,"Failed to fetch pet inventory data")}))}handleMembershipChange(k){"success"===k&&this.refresh()}[(F=z.sE,z.JN)](k){return(0,G.sH)(this,void 0,void 0,(function*(){if(k.bonusJustClaimed&&k.previousSlotsValue!==k.entity.permanentSlots){V.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendPetSlotUnlockedEvent(q.No.MemberGiftAwarded,k.entity.permanentSlots,k.previousSlotsValue)}this._isInitialized=!0,this._petInventoryData=k.entity,this.onPetInventoryDataUpdated.dispatch()}))}};Q.PET_SLOT_GROUP_COUNT=3,Q.PET_SLOT_COST_VARIANT_BASE_STRING="slotsThresholdsV",(0,G.Cg)([(0,K.b)("f32-d326"),(0,G.Sn)("design:type",Y.Y)],Q.prototype,"_networkHandler",void 0),Q=(0,G.Cg)([(0,$.injectable)(),(0,G.Sn)("design:paramtypes",[])],Q)},16383:(k,B,U)=>{"use strict";U.d(B,{l:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(16847),V=U(9860);let W=class extends G.uAl{create(){super.create(),this._petInventoryDataProvider.onPetInventoryDataUpdated.add(this.updateDisplay,this)}updateDisplay(){const k=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this._playerWallet&&(this._playerWallet.updateCurrencyID(1),this._playerWallet.updateAmount(k.getGold()))}destroy(){this._petInventoryDataProvider.onPetInventoryDataUpdated.remove(this.updateDisplay,this),super.destroy()}};(0,F.Cg)([(0,G.Cdj)("8b9-bad1"),(0,F.Sn)("design:type",V.n)],W.prototype,"_petInventoryDataProvider",void 0),(0,F.Cg)([(0,G.MnK)(H.n),(0,F.Sn)("design:type",H.n)],W.prototype,"_playerWallet",void 0),W=(0,F.Cg)([(0,G.EVk)("PetInventoryController",$.Y.petRescue)],W)},11848:(k,B,U)=>{"use strict";U.d(B,{N:()=>st});var F=U(8674),G=U(62459),j=U(21574),$=U(50788),H=U(37016),V=U(96989),W=U(90633),q=U(65240),K=U(35120),z=U(29738),Y=U(77938),Q=U(76277),X=U(68152),Z=U(56625),J=U(22023),tt=U(30226),et=U(6413),it=U(73678);class st{static get shouldShowPetMergeTutorial(){return st._cacheInValidTutorialState&&z.O.isEnglishLocale()}static set shouldShowPetMergeTutorial(k){st._cacheInValidTutorialState=k}static hasSeenPetMergeFTUE(){return K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(W.B.FEATURE_PET_MERGE,W.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED)}static awardPetMergeFtueIngredients(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;if(K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(W.B.FEATURE_PET_MERGE,W.B.BREADCRUMB_PET_MERGE_FTUE_INGREDIENTS_GIVEN))return;const B=K.q.instance.prodigy.gameContainer,U=B.get("306-5359"),F=U.kennel;let j=st.getChosenPetForMergeRankFTUE(B,U,F);if(!G.Aq$.isDefined(j)){const k=Y.t.getItem("pet",et.h.STARTER_PETS[0]);tt.J.bagItem(k,K.q.instance.prodigy.game,"got-pet",void 0,{source_type:q.C.QuestReward}),j=F.data[F.data.length-1]}if(!(0,Q.G)($.J)){(0,X.v)(G.Aq$.isDefined(j),"Unable to gift pet merge ingredients for FTUE");let B=Y.t.getItem("pet",j.ID);const U=(0,Q.G)($.J)?V.Y.getMerge2RecipeForPet(B.ID,B.data.rarity,j.mergeRank):V.Y.getRecipeForPet(B.data.evolution.totalEvos,j.mergeRank);B=null!==(k=J.P8.getRequiredPetMergeIngredient(B,U))&&void 0!==k?k:B;for(let k=0;kU.forceSaveCharacter(k)))}))}static getChosenPetForMergeRankFTUE(k,B,U){const F=null!=k?k:K.q.instance.prodigy.gameContainer,j=null!=B?B:F.get("306-5359"),W=null!=U?U:j.kennel,q=J.P8.showUniquePetsFeature()?W.getPrimaryPets():W.getPets(),z=(0,Q.G)($.J),X=q.filter((k=>{if(!J.P8.canPetAccessMergeRanks(k.ID)||k.mergeRank===H.qd.MAX)return!1;if(!z)return!0;const B=Y.t.getItem("pet",k.ID),U=V.Y.getMerge2RecipeForPet(k.ID,B.data.rarity,k.mergeRank);return!!G.Aq$.isDefined(U)&&k.level>=U.requiredLevel})),Z=J.P8.sortPetList(X);return Z.length>0?Z[0]:null}static cacheCanShowPetMergeTutorial(){if(!z.O.isEnglishLocale())return this._cacheInValidTutorialState=!1,this._cacheInValidTutorialState;const k=K.q.instance.prodigy.gameContainer.get("12f-4e29"),B=st.hasSeenPetMergeFTUE();if(!J.P8.canPlayerAccessPetMergeFeature()||B)return this._cacheInValidTutorialState=!1,this._cacheInValidTutorialState;const U=K.q.instance.prodigy.world.getCurrentZone();let F=![it.A_.CRYSTALCAVERNS,it.A_.DARKTOWER,it.A_.TOWERTOWN,it.A_.HOUSE].includes(U);const G=k.isBreadcrumbComplete(W.B.FEATURE_PET_MERGE,W.B.BREADCRUMB_PET_MERGE_FTUE_STARTED);if(U!==it.A_.ACADEMY||k.isBreadcrumbComplete(W.B.BREADCRUMB_UNLOCK_ACADEMY,W.B.BREADCRUMB_UNLOCK_ACADEMY_NOOT_DIALOGUE)||(F=!1),!F)return this._cacheInValidTutorialState=!1,this._cacheInValidTutorialState;let H;H=!(J.P8.showUniquePetsFeature()&&!G)||k.isBreadcrumbComplete(W.B.FEATURE_UNIQUE_PETS,W.B.BREADCRUMB_UNIQUE_PETS_INTRO_SEQUENCE);if(!Z.s.canShowFtue()||!H)return this._cacheInValidTutorialState=!1,this._cacheInValidTutorialState;if((0,Q.G)($.J)){const k=null!==st.getChosenPetForMergeRankFTUE();this._cacheInValidTutorialState=k}else{const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this._cacheInValidTutorialState=k.getLevel()>=j.g.config.minimumPlayerLevel}return this._cacheInValidTutorialState}}st._cacheInValidTutorialState=!1},12472:(k,B,U)=>{"use strict";U.d(B,{r:()=>Y});var F=U(62459),G=U(95891),j=U.n(G),$=U(50788),H=U(37016),V=U(96989),W=U(76277),q=U(22023),K=U(35120),z=U(77938);class Y{static getOwnedIngredientsForRecipe(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=F.kennel.getPets();if((0,W.G)($.J)){return F.kennel.getAllPetsByID(+k.ID).filter((B=>B.uniqueID!==k.uniqueID))}return j().chain(G).filter((F=>V.Y.isCompatibleIngredient(B,(k=>k===F.uniqueID?F:void 0),k,{type:H.J1.Pet,uniqueId:F.uniqueID},U))).sortBy([k=>k.mergeRank,k=>{var B,U,F;return null===(F=null===(U=null===(B=z.t.getItem("pet",k.ID))||void 0===B?void 0:B.data)||void 0===U?void 0:U.evolution)||void 0===F?void 0:F.tier},"level"]).value()}static getMergeIngredientInfo(k){var B,U,G,j;const K=null!==(B=q.P8.getPetDisplayMergeRank(k.ID,k.uniqueID))&&void 0!==B?B:H.qd.MIN,Q=z.t.getItem("pet",k.ID),X={requiredIngredientsCount:0,validPetIngredientCount:0,mergeRecipe:void 0},Z=k=>z.t.getItem("pet",k),J=B=>{var U;return null!==(U=q.P8.getPetDisplayMergeRank(k.ID,B))&&void 0!==U?U:H.qd.MIN};if((0,W.G)($.J)){if(X.mergeRecipe=V.Y.getMerge2RecipeForPet(k.ID,Q.data.rarity,K),F.Aq$.isDefined(X.mergeRecipe)&&V.Y.isMerge2Recipe(X.mergeRecipe)){const B=Y.getOwnedIngredientsForRecipe(k,Z,X.mergeRecipe);X.requiredIngredientsCount=null!==(G=null===(U=X.mergeRecipe)||void 0===U?void 0:U.ingredientCount)&&void 0!==G?G:0;const F=V.Y.getMergedIngredientCountPerPet(J,B,k,Q.data.rarity);X.validPetIngredientCount=Object.values(F).reduce(((k,B)=>k+B),0),X.willLevelOnMerge=B.some((B=>B.level>k.level))}}else{if(X.mergeRecipe=V.Y.getRecipeForPet(Q.data.evolution.totalEvos,K),!F.Aq$.isDefined(X.mergeRecipe))return;const B=Y.getOwnedIngredientsForRecipe(k,Z,X.mergeRecipe);X.requiredIngredientsCount=null!==(j=X.mergeRecipe.ingredientCount)&&void 0!==j?j:0,X.validPetIngredientCount=B.length,X.willLevelOnMerge=B.some((B=>B.level>k.level))}return X}}},4234:(k,B,U)=>{"use strict";U.d(B,{m:()=>tt});var F,G=U(8674),j=U(87490),$=U(62459),H=U(79687);!function(k){k.Hard_map_spawn_constants="195f52c5-daf3-4d6a-80f3-05f67043e2a3",k.Hard_zone_constants="e1194526-45fc-4bf3-8d8c-37475b83204f",k.Regular_map_spawn_constants="d186f15e-4a39-47fe-9005-6c14066475ea",k.Regular_zone_constants="07f88337-a630-4af0-baad-8fb01e5383c0"}(F||(F={}));var V,W=U(97495),q=U(35120),K=U(77938),z=U(22023),Y=U(30226),Q=U(73678),X=U(95946),Z=U(84399),J=U(46725);let tt=V=class{getPetsInZone(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;const U=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let F=[],G=!0;const j=q.q.instance.prodigy.world.getZone(k).difficultyMode;if(J.D.isPrefabZoneAvailable(k)||Z.R.isZoneAvailable(k)||j!==W.i.Regular){const U=yield this.getZoneConfig(k,j);F=null!==(B=null==U?void 0:U.rescuablePets)&&void 0!==B?B:[],G=!1}if(0===F.length){const B=q.q.instance.prodigy.gameContainer.get("e5b-e931");F=(yield B.getAllSpawnDataInZone(k)).reduce(((k,B)=>{var U;return k.concat(null!==(U=B.mods.encounter)&&void 0!==U?U:[])}),[]).map((k=>k.ID))}const $=new Map,H=new Map;return F.forEach((k=>{const B=K.t.getItem("pet",k);if(B&&!$.has(k)&&($.set(k,{ID:k,name:B.data.name,data:B.data,benchType:"main",firstRescuedDate:U.encounters.getPetFirstRescuedDate(k)}),G)){z.P8.getPetBench(k).forEach((B=>{const F=K.t.getItem("pet",B.petID);F&&!$.has(B.petID)&&H.set(F.ID,{ID:F.ID,name:F.data.name,data:F.data,benchType:"bench",fromBench:k,firstRescuedDate:U.encounters.getPetFirstRescuedDate(F.ID)})}))}})),Array.from(H.keys()).forEach((k=>{$.has(k)||$.set(k,H.get(k))})),Array.from($.values()).sort(((k,B)=>k.data.ordinal-B.data.ordinal)).sort(((B,U)=>B.data.element===U.data.element?0:B.data.element===V.ElementForZoneID[k]?-1:1)).sort(((k,B)=>{var U,F;return(null!==(U=B.firstRescuedDate)&&void 0!==U?U:0)-(null!==(F=k.firstRescuedDate)&&void 0!==F?F:0)}))}))}getZoneConfig(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=(null!=B?B:q.q.instance.prodigy.world.getZone(k).difficultyMode)===W.i.Regular?F.Regular_zone_constants:F.Hard_zone_constants;yield q.q.instance.prodigy.gameContainer.get($.t5G.AssetLoader).loadAssets([U]);return(yield q.q.instance.game.cache.getJSON(U))[k.replace("_hard","")]}))}getPetsInCurrentZone(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.getPetsInZone(q.q.instance.prodigy.world.getCurrentZone())}))}getZonesForPetId(k){return(0,G.sH)(this,void 0,void 0,(function*(){return Y.J.asyncFilter(Object.values(Q.A_),(B=>(0,G.sH)(this,void 0,void 0,(function*(){return(yield this.getPetsInZone(B)).some((B=>B.ID===k))}))))}))}getMinMaxEnemyLevelsForZone(k){return(0,G.sH)(this,void 0,void 0,(function*(){let B;return(J.D.isPrefabZoneAvailable(k)||Z.R.isZoneAvailable(k))&&(B=yield this.getZoneConfig(k)),$.Aq$.isDefined(B)||(B=yield this.getZoneConfig(k,W.i.Regular)),null==B?void 0:B.enemyLevels}))}};tt.ElementForZoneID={[Q.A_.FOREST]:j.ELegacyElementType.Earth,[Q.A_.BONFIRE]:X.a.Fire,[Q.A_.SHIPWRECK]:X.a.Water,[Q.A_.SHIVERCHILL]:X.a.Ice,[Q.A_.SKYWATCH]:X.a.Storm,[Q.A_.FORESTHARD]:j.ELegacyElementType.Earth,[Q.A_.BONFIREHARD]:X.a.Fire,[Q.A_.SHIPWRECKHARD]:X.a.Water,[Q.A_.SHIVERCHILLHARD]:X.a.Ice,[Q.A_.SKYWATCHHARD]:X.a.Storm},tt=V=(0,G.Cg)([(0,H.injectable)()],tt)},36811:(k,B,U)=>{"use strict";U.d(B,{V:()=>Y});var F=U(8674),G=U(62459),j=U(99625),$=U(10727),H=U(35120),V=U(46784),W=U(65050),q=U(41674),K=U(76277),z=U(13956);class Y{static loadPlayerGoalsHUDIcon(){return this._prefabLoader.loadWithDependenciesFromGUID(j.l.FtuePlayerGoalsHudIcon)}static openPlayerGoalsIfPrizeReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){if((0,K.G)($.d3).enabled)return;const B=H.q.instance.prodigy.gameContainer.get("d65-d7bb");yield B.updateQuestProgress(),yield B.sendQuestEventPromise;B.surfacedTasks.some((k=>B.isPrizeReady(k)))&&(yield new Promise((B=>{H.q.instance.prodigy.open.prefabMenu(j.l.FtuePlayerGoals,B,!0,!0,!1,{},{interfaceName:V.B.PlayerGoals,interfaceType:q.Wm.Modal,originType:k,instanceType:W.N.UI})})))}))}}(0,F.Cg)([(0,z.b)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],Y,"_prefabLoader",void 0)},10551:(k,B,U)=>{"use strict";U.d(B,{d:()=>K});var F=U(8674),G=U(62459),j=U(62886),$=U(35120),H=U(13956),V=U(30226),W=U(3606),q=U(44677);class K{static initializePlayerGoals(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this._questManager.preloadQuestProgress(),yield K.sendStartQuest(),yield K.sendPlayAfterHoursQuestEvent(),yield K.sendAttachParentQuestEvent(),yield K.sendAttachClassCodeQuestEvent()}))}static get loggedInPlayer(){return $.q.instance.prodigy.gameContainer.get("e20-0fb0")}static sendStartQuest(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._questManager.sendQuestEvent(j.T.START_QUEST,{id:"player-goals-quest-start"})}))}static sendPlayAfterHours(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._questManager.sendQuestEvent(j.T.PLAY_AFTER_HOURS,{})}))}static sendPlayAfterHoursQuestEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){V.J.isNightTime()&&(yield K.sendPlayAfterHours())}))}static sendAttachParent(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._questManager.sendQuestEvent(j.T.ATTACH_PARENT,{})}))}static sendAttachParentQuestEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){this.loggedInPlayer.player.hasValidatedParentEmail()&&(yield K.sendAttachParent())}))}static sendAttachClassCode(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._questManager.sendQuestEvent(j.T.ATTACH_CLASS_CODE,{id:"player-goals-collect-class-code-attach"})}))}static sendAttachClassCodeQuestEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){let k=[];try{k=yield q.p.requestClassCodes()}catch(e){return void G.VyI.log(`Error requesting class codes: ${e.code}`,G.$bb.Error)}if(k.length>0)try{(yield q.p.hasAttachedClassCode())||(yield K.sendAttachClassCode())}catch(e){return void G.VyI.log(`Error getting attached classcode quest status: ${e.code}`,G.$bb.Error)}}))}static sendCompleteProfileQuizEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._questManager.sendQuestEvent(j.T.COMPLETE_PROFILE_QUIZ,{id:"player-goals-profile-quiz"})}))}}(0,F.Cg)([(0,H.b)("d65-d7bb"),(0,F.Sn)("design:type",W.n)],K,"_questManager",void 0)},44677:(k,B,U)=>{"use strict";U.d(B,{p:()=>H});var F=U(8674),G=U(3606),j=U(13956),$=U(35120);class H{static requestClassCodes(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=$.q.instance.prodigy.gameContainer.get("c97-bd0d");return(yield k.getClassCodes()).data.player.classrooms}))}static get isQuestComplete(){return this._questManager.isQuestComplete}static hasAttachedClassCode(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._questManager.hasAttachedClassCode()}))}static availableQuestTasks(){return this._questManager.availableTasks}static pairedTaskByQuestEventId(k){return this._questManager.pairedTasks.find((B=>{var U,F,G,j;const $=null===(F=null===(U=B.taskDefinition)||void 0===U?void 0:U.metadata)||void 0===F?void 0:F.goalCardData,H=null===(j=null===(G=B.awardTask.taskDefinition)||void 0===G?void 0:G.metadata)||void 0===j?void 0:j.goalCardData,V=null==$?void 0:$.questEventId,W=null==H?void 0:H.questEventId;return V===k||W===k}))}}(0,F.Cg)([(0,j.b)("d65-d7bb"),(0,F.Sn)("design:type",G.n)],H,"_questManager",void 0)},46855:(k,B,U)=>{"use strict";U.d(B,{r:()=>V});var F=U(62459),G=U(5491),j=U(35120),$=U(39984),H=U(55122);class V{constructor(k,B,U,F){this._player=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player,this.maxLevel=F,this.baseMaxLevel=F,this.updateCreatureXpBarInformation(k,B,U)}updateCreatureXpBarInformation(k,B,U){this.levels=[],this.starsRequiredForEachLevel=[],this.currentCreatureStars=k,this.starsToAward=U.totalNonMemberXp+(this._player.hasMembership()?U.memberXp:0);const F=H.s.activePlayerLevelCap,G=$.e.levelFromStars(this.currentCreatureStars+this.starsToAward,B,F),V=$.e.levelFromStars(k,B,F);if(this.currentRelativeStars=this.currentCreatureStars-$.e.starsToLevel(V,B),this.creatureType=B,this.shouldDisplayChargedLevelXp(G)){const k=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=k.data.chargedLevelData,U=H.s.activePlayerLevelCap,F=k.getLevel()>=U?k.getLevel():U,$=B.newLevelData.levelsGained.map((k=>k.level+F)),W=B.newLevelData.levelsGained.map((k=>k.relativeXp));if(V>=U)this.levels=$,this.currentRelativeStars=B.newLevelData.startingLevelRelativeXp,this.starsRequiredForEachLevel=W,this.starsToAward=this.levels[0]=this.maxLevel){const k=$.e.starsToLevel(this.maxLevel,B)-this.currentCreatureStars;this.starsToAward=Math.min(k,this.starsToAward),this.starsToAward=Math.max(0,this.starsToAward)}V=H.s.activePlayerLevelCap&&(null===(U=$.newLevelData.levelsGained)||void 0===U?void 0:U.length)>0}getStarsBetweenLevels(k){const B=k.concat(k[k.length-1]+1).filter((k=>k<=H.s.activePlayerLevelCap)).map((k=>$.e.starsToLevel(k,this.creatureType)));return B.map(((k,U)=>k-(B[U-1]||0))).splice(1)}getLevels(k,B){return Array.from({length:Math.min(B,this.maxLevel)-k+1},((B,U)=>U+k))}}},59754:(k,B,U)=>{"use strict";U.d(B,{I:()=>rt});var F=U(8674),G=U(62459),j=U(66582),$=U(35120),H=U(96535),V=U(63352),W=U(73797),q=U(28152),K=U(41674),z=U(67665),Y=U(15485),Q=U(46784),X=U(19633),Z=U(95057),J=U(16847),tt=U(53661),et=U(40743),it=U(47255),st=U(43754),nt=U(99015),at=U(8838);let rt=class extends G.uAl{constructor(){super(...arguments),this.onActionsComplete=new G.HN0}postCreate(){var k,B,U,F;if(super.postCreate(),this._postBattleFlowData=this.getInjectedValue(tt.uo.PostBattleFlowData),!this._postBattleFlowData)return;this._segmentConversionFunnelTrigger={type:"MC-Battle-Reward",category:"battles",contentId:this._segment.postBattleFlow.getBattleId(),adType:Z.R.UnifiedConversionFlow};const j=this._currentPlayer.hasMembership(),$=null!==(k=this._postBattleFlowData.rewards.find((k=>"currency"===k.type&&27===k.ID)))&&void 0!==k?k:void 0,H=null!==(B=this._postBattleFlowData.memberRewards.find((k=>"currency"===k.type&&27===k.ID)))&&void 0!==B?B:void 0,V=$&&null!==(U=$.N)&&void 0!==U?U:1,W=H&&null!==(F=H.N)&&void 0!==F?F:1,q=this._hardCurrencyDataProvider.getBalance(27)-V-(j?W:0);this._freeRewardsMagicoinAmountText.text=`x${V}`,this._memberRewardsMagicoinAmountText.text=`x${W}`,this._currencyDisplay.updateAmount(q),this._getFreeRewardsButton.onClick.addOnce((()=>{this._currencyDisplay.playEarnEffect(q+V),j||this._segment.purchase.sendFunnelTriggerImpression(this._segmentConversionFunnelTrigger)}),this),this._getMemberRewardsButton.onClick.add(this.startConversionFunnel,this),this._collectAllRewardsButton.onClick.addOnce((()=>{this._currencyDisplay.playEarnEffect(q+V+W)}),this),this.setWizardBankChestStates().catch(G.RQr.createHandler("PostBattleFlowMagicoinRewardDisplayComponent: Failed to set wizard bank chest states")),j?this._collectAllRewardsButton.onClick.add(this.onActionsComplete.dispatch,this.onActionsComplete):this._collectAllRewardsButton.onClick.add(this.claimMemberRewardsAfterConversion,this)}destroy(){$.q.instance.prodigy.game.broadcaster.removeAppListener(W.H3.MembershipResponseReceived,this),this._getFreeRewardsButton.onClick.removeAll(),this._getMemberRewardsButton.onClick.removeAll(),this._collectAllRewardsButton.onClick.removeAll(),this.onActionsComplete.dispose(),super.destroy()}claimMemberRewardsAfterConversion(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._segment.item.beginSecureItemTransaction();yield this._magicoinBattleRewardsNetworkHandler.claimMemberRewards(),k.flush(this._segment.postBattleFlow.getItemReceivedMetadata()),this.onActionsComplete.dispatch()}))}setWizardBankChestStates(){return(0,F.sH)(this,void 0,void 0,(function*(){yield Promise.all([this._coreMemberBankChestStateManager.onStateUpdated.asPromise(),this._plusMemberBankChestStateManager.onStateUpdated.asPromise(),this._ultraMemberBankChestStateManager.onStateUpdated.asPromise()]);switch(this._featureAccessData.memberTier){case j._$.NonMember:this._coreMemberBankChestStateManager.setState(at.T.Closed),this._plusMemberBankChestStateManager.setState(at.T.Closed),this._ultraMemberBankChestStateManager.setState(at.T.Closed);break;case j._$.MemberCore:this._coreMemberBankChestStateManager.setState(at.T.Open),this._plusMemberBankChestStateManager.setState(at.T.Closed),this._ultraMemberBankChestStateManager.setState(at.T.Closed);break;case j._$.MemberPlus:this._coreMemberBankChestStateManager.setState(at.T.Open),this._plusMemberBankChestStateManager.setState(at.T.Open),this._ultraMemberBankChestStateManager.setState(at.T.Closed);break;case j._$.MemberUltra:default:this._coreMemberBankChestStateManager.setState(at.T.Open),this._plusMemberBankChestStateManager.setState(at.T.Open),this._ultraMemberBankChestStateManager.setState(at.T.Open)}}))}startConversionFunnel(){this._segment.featureCommon.sendButtonEvent({buttonName:Y.k.PostBattleFlowMagicoinGetMemberRewards,destinationName:Q.B.MembershipParentAd,interfaceName:Q.B.PostBattleFlowMagicoinRewardDisplay,interfaceType:K.Wm.Screen,saveClickInfo:Y.k.PostBattleFlowMagicoinGetMemberRewards}),this._segment.purchase.sendFunnelStart(this._segmentConversionFunnelTrigger),$.q.instance.prodigy.open.unifiedConversionFlow(void 0,{conversionFunnelName:it.o.FunnelPostBattleMagicoinGetMemberRewards,conversionStage:it.o.StagePostBattleMagicoinClickGetMemberRewards},{id:Y.k.PostBattleFlowMagicoinGetMemberRewards,type:K.$N.ButtonClick})}};(0,F.Cg)([(0,G.Cdj)("306-5359"),(0,F.Sn)("design:type",H.W)],rt.prototype,"_currentPlayer",void 0),(0,F.Cg)([(0,G.Cdj)("358-48b9"),(0,F.Sn)("design:type",nt.C)],rt.prototype,"_magicoinBattleRewardsNetworkHandler",void 0),(0,F.Cg)([(0,G.Cdj)("5c7-e02d"),(0,F.Sn)("design:type",st.W)],rt.prototype,"_hardCurrencyDataProvider",void 0),(0,F.Cg)([(0,G.Cdj)("3a0-8003"),(0,F.Sn)("design:type",V.F)],rt.prototype,"_featureAccessData",void 0),(0,F.Cg)([(0,G.Cdj)("c47-20b6"),(0,F.Sn)("design:type",z.Y)],rt.prototype,"_segment",void 0),(0,F.Cg)([(0,G.MnK)(J.n),(0,F.Sn)("design:type",J.n)],rt.prototype,"_currencyDisplay",void 0),(0,F.Cg)([(0,G.MnK)(X.S),(0,F.Sn)("design:type",X.S)],rt.prototype,"_getFreeRewardsButton",void 0),(0,F.Cg)([(0,G.MnK)(X.S),(0,F.Sn)("design:type",X.S)],rt.prototype,"_getMemberRewardsButton",void 0),(0,F.Cg)([(0,G.MnK)(X.S),(0,F.Sn)("design:type",X.S)],rt.prototype,"_collectAllRewardsButton",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],rt.prototype,"_freeRewardsMagicoinAmountText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],rt.prototype,"_memberRewardsMagicoinAmountText",void 0),(0,F.Cg)([(0,G.MnK)(et.r),(0,F.Sn)("design:type",et.r)],rt.prototype,"_coreMemberBankChestStateManager",void 0),(0,F.Cg)([(0,G.MnK)(et.r),(0,F.Sn)("design:type",et.r)],rt.prototype,"_plusMemberBankChestStateManager",void 0),(0,F.Cg)([(0,G.MnK)(et.r),(0,F.Sn)("design:type",et.r)],rt.prototype,"_ultraMemberBankChestStateManager",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],rt.prototype,"onActionsComplete",void 0),rt=(0,F.Cg)([(0,G.EVk)("PostBattleFlowMagicoinRewardDisplay",q.Y.postBattleFlow)],rt)},68788:(k,B,U)=>{"use strict";U.d(B,{D:()=>re});var F,G=U(8674),j=U(62459),$=U(99625),H=U(28628),V=U(83798),W=U(39596),q=U(50788),K=U(49754),z=U(35120),Y=U(49237),Q=U(29738),X=U(1195),Z=U(55734),J=U(73797),tt=U(70704),et=U(79399),it=U(93833),st=U(98998),nt=U(41674),at=U(67665),rt=U(66998),ot=U(76277),ht=U(85515),ct=U(94236),dt=U(53661),lt=U(80060),ut=U(60985),ft=U(1312);!function(k){k.Win="win",k.Loss="loss",k.Draw="draw",k.Timeout="timeout",k.Run="run"}(F||(F={}));var bt=U(2212),pt=U(55122),vt=U(56718),gt=U(81914),mt=U(90633),yt=U(65050);class _t{constructor(k,B,U,F,G,$){this.onComplete=new j.HN0,this.onEvent=new j.HN0,this.postBattleFlowData=k,this.continueButton=B,this.rewardsBar=U,this.animationsInProgress=F,this.segment=z.q.instance.prodigy.gameContainer.get("c47-20b6"),this._mainFlowContainer=G,this._rescueFlowContainer=$}setup(k,B){var U;j.Aq$.isDefined(null===(U=this.continueButton)||void 0===U?void 0:U.GameObject)&&(this.continueButton.GameObject.active=!0),this.rewardsBar.active=!0,this._expressModeEnabled=k,B&&(this._interfaceName=B,this.sendInterfaceOpenedEvent())}sendInterfaceOpenedEvent(){this.segment.featureCommon.sendInterfaceEvent({interfaceName:this._interfaceName,interfaceType:nt.Wm.Screen,instanceType:yt.N.Interface,originType:nt.$N.Battle,originID:this.segment.postBattleFlow.getBattleId()})}onAllAnimationsComplete(){}sendPlayerProgressionEvent(k){this.segment.playerProgression.sendFunnelAdvancedEvent({funnelName:"Post Battle Flow",funnelType:"battle",stepName:k,funnelId:this.segment.postBattleFlow.getBattleId()})}dispatchClickToProceed(){this.continueButton.onClick.dispatch(),this.continueButton.onEnabledClick.dispatch()}enableExpressMode(){this._expressModeEnabled=!0,this._waitingForInput&&this.dispatchClickToProceed()}destroy(){this.onComplete.dispose(),this.onEvent.dispose()}}class Et extends _t{setup(k){super.setup(k),this._fsmController=z.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),this._fsmService=z.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService)}}class wt extends Et{constructor(){super(...arguments),this.FSM_ID=57}setup(k){super.setup(k),this.rewardsBar.active=!1;const B=z.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=B.hasCompletedTutorial(),F=z.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(mt.B.BREADCRUMB_UNLOCK_ACADEMY,mt.B.BREADCRUMB_UNLOCK_ACADEMY_NOOT_DIALOGUE),G=z.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirementsDeprecated(12),j=B.backpack.hasItem("key",22)>0;this._expressModeEnabled||!U||F||!G||j?this.onComplete.dispatch():(this.continueButton.GameObject.active=!1,this._fsmController.execute(this._fsmService.getStateMachine(this.FSM_ID),{game:z.q.instance.game,menu:this},null))}runNextEvent(){var k;this.onComplete.dispatch(),(null===(k=this.continueButton)||void 0===k?void 0:k.GameObject)&&(this.continueButton.GameObject.active=!0)}}class Tt extends _t{getPrefabInjectionParams(){return{}}setup(k,B){var U,F;super.setup(k,B);const G=z.q.instance.prodigy.gameContainer.get("d0e-64fd");this._prefabPromise=lt.d.loadWithInjectedValuesAndDependenciesFromGUID(G,this.PREFAB_GUID,Object.assign(Object.assign({},this.getPrefabInjectionParams()),{[dt.uo.PostBattleFlowData]:this.postBattleFlowData,[dt.uo.PostBattleFlowNumberOfRegularRewardCards]:vt.S.combineRewards(null!==(U=this.postBattleFlowData.rewards)&&void 0!==U?U:[]).length,[dt.uo.PostBattleFlowNumberOfMemberRewardCards]:vt.S.combineRewards(null!==(F=this.postBattleFlowData.memberRewards)&&void 0!==F?F:[]).length})).then((k=>(this.rewardsBar.addChild(k),this.continueButton.onClick.addOnce((()=>k.destroy()),this),k.onDestroy.add((()=>this.onComplete.dispatch())),k))).catch(j.RQr.createHandler(`Failed to load prefab ${this.PREFAB_GUID}.`))}}class St extends Tt{constructor(){super(...arguments),this.PREFAB_GUID=$.l.Charged_levels_tutorial}setup(k){super.setup(k),this.continueButton.GameObject.active=!1,this._mainFlowContainer&&(this._mainFlowContainer.active=!0),this._rescueFlowContainer&&(this._rescueFlowContainer.active=!1),this._prefabPromise.then((k=>{k.transform.setPosition(-this.rewardsBar.transform.worldPosition.x,-this.rewardsBar.transform.worldPosition.y)}))}}var At,Ct=U(88038);!function(k){k.RewardsAnimationFinished="REWARDS_ANIMATION_FINISHED",k.EvolveAutoSurfaced="EVOLVE_AUTO_SURFACED",k.StandardXPBarSequenceFinished="STANDARD_XP_BAR_SEQUENCE_FINISHED",k.RescueFlowFinished="RESCUE_FLOW_FINISHED"}(At||(At={}));class Ot extends _t{constructor(){super(...arguments),this._timeBetweenPrompts=500}setup(k){super.setup(k),this._mainFlowContainer&&(this._mainFlowContainer.active=!0),this._rescueFlowContainer&&(this._rescueFlowContainer.active=!1),this.continueButton.GameObject.active=!1,this.rewardsBar.active=!1,this._expressModeEnabled?this.onComplete.dispatch():this.openEvolutionPrompts().catch(j.RQr.createHandler("Failed to open evolution prompts"))}openEvolutionPrompts(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=z.q.instance.prodigy.gameContainer.get("5c7-e02d"),B=this.postBattleFlowData.creatures.filter((k=>k.canEvolve)).sort(((k,B)=>k.creature.justLeveled&&!B.creature.justLeveled?-1:B.creature.justLeveled&&!k.creature.justLeveled?1:B.creature.getLevel()-k.creature.getLevel()));B.length>0&&this.onEvent.dispatch(At.EvolveAutoSurfaced),Ct._.postBattleFlowShown();for(const U of B)if(Ct._.shouldAutomaticallyPromptEvolution(k,U.creature.getID())){this._waitingForInput=!0;const k=ct.K.openEvolutionPromptIfEligible(U.creature,U.originalCreature,this._expressModeEnabled,nt.k.PostBattleWin);this._expressModeEnabled&&this.dispatchClickToProceed(),yield k,this._waitingForInput=!1,Ct._.automaticEvolutionPromptShown(),yield j.Egh.timeout(this._timeBetweenPrompts)}this.onComplete.dispatch()}))}dispatchClickToProceed(){ct.K.attemptToForceSkip()}}var It=U(46784),Dt=U(47917),Rt=U(96810),Pt=U(54234);class Mt extends Tt{constructor(){super(...arguments),this.PREFAB_GUID=$.l.RewardsDisplay}setup(k,B){super.setup(k,null!=B?B:It.B.PostBattleFlowStandardRewardDisplay),this.continueButton.GameObject.active=this.animationsInProgress.counter<=0,this.continueButton.onClick.addOnce((()=>{z.q.instance.prodigy.gameContainer.get("c47-20b6").postBattleFlow.sendButtonEvent("post_battle_rewards","battle_rewards_dismiss"),this._waitingForInput=!1})),this.setupRewardAnimationFinishedEvent(),this.sendPlayerProgressionEvent(Rt.l.PostBattleFlowRewardsDisplay)}setupRewardAnimationFinishedEvent(){this._prefabPromise.then((k=>{k.findComponent(Pt.I).onRewardsDisplayFilled.addOnce((()=>{this.onEvent.dispatch(At.RewardsAnimationFinished),this._waitingForInput=!0,this._expressModeEnabled&&this.dispatchClickToProceed()}))})).catch(j.RQr.createHandler("PostBattleFlowRewardDisplayState.setupRewardAnimationFinishedEvent failed"))}onAllAnimationsComplete(){super.onAllAnimationsComplete(),this.continueButton.GameObject.active=!0}}class Nt extends Mt{constructor(){super(...arguments),this.PREFAB_GUID=$.l.MemberJarRewardsDisplay}getPrefabInjectionParams(){return{[dt.uo.PostBattleFlowContinueCallback]:()=>{this.dispatchClickToProceed()}}}setup(k){z.q.instance.prodigy.gameContainer.get("e20-0fb0").isMember()||this.animationsInProgress.counter>0&&this.animationsInProgress.increment(),super.setup(k,It.B.PostBattleFlowMemberJarRewardDisplay),this.continueButton.GameObject.active=!1}setupRewardAnimationFinishedEvent(){this._prefabPromise.then((k=>{k.findComponentInChildren(Dt.P).onJarRewardsSequenceFinished.addOnce((()=>{this.onEvent.dispatch(At.RewardsAnimationFinished),this._waitingForInput=!0,this._expressModeEnabled&&this.dispatchClickToProceed()}))})).catch(j.RQr.createHandler("PostBattleFlowJarRewardDisplayState.setupRewardAnimationFinishedEvent failed"))}onAllAnimationsComplete(){}}var xt=U(59754);class Lt extends Mt{constructor(){super(...arguments),this.PREFAB_GUID=$.l.MagicoinRewardsDisplay}getPrefabInjectionParams(){return{[dt.uo.PostBattleFlowContinueCallback]:()=>{this.dispatchClickToProceed()}}}setup(k){super.setup(k,It.B.PostBattleFlowMagicoinRewardDisplay),this.continueButton.GameObject.active=!1}setupRewardAnimationFinishedEvent(){this._prefabPromise.then((k=>{k.findComponent(xt.I).onActionsComplete.addOnce((()=>{this.onEvent.dispatch(At.RewardsAnimationFinished),this._waitingForInput=!0,this._expressModeEnabled&&this.dispatchClickToProceed()}))})).catch(j.RQr.createHandler("PostBattleFlowMagicoinRewardDisplayState.setupRewardAnimationFinishedEvent failed"))}onAllAnimationsComplete(){}}var kt=U(5491);class Bt extends _t{setup(k){super.setup(k),this.continueButton.GameObject.active=!1,this.rewardsBar.active=!1,this._mainFlowContainer&&(this._mainFlowContainer.active=!0),this._rescueFlowContainer&&(this._rescueFlowContainer.active=!1),this.setupNootTipScreen()}setupNootTipScreen(){const k=this.postBattleFlowData.creatures.filter((k=>k.creature.creatureType===kt.V.Pet)).map((k=>k.creature.data.uniqueID));z.q.instance.prodigy.open.postBattleLossMenu(k,this.postBattleFlowData.nootTipBattleInfo,this.onComplete.dispatch.bind(this.onComplete))}}class Ut extends _t{setup(k){super.setup(k),this.onEvent.dispatch(At.RewardsAnimationFinished),this.onComplete.dispatch()}}var Ft=U(87490),Gt=U(55346),jt=U(58347);class $t extends _t{constructor(){super(...arguments),this.PBF_RESCUE_LATER="PBF_RESCUE_LATER",this.PBF_CONTINUE_LOC_KEY="PBF_CONTINUE",this.PBF_RESCUE_PETS_LOC_KEY="PBF_RESCUE_PETS",this.PBF_PETS_ARE_RESCUED_LOC_KEY="PBF_PETS_ARE_RESCUED",this._rescuablePets=[],this._rescuePetQueue=[]}setup(k){var B;super.setup(k),(null===(B=this.postBattleFlowData)||void 0===B?void 0:B.rescuablePets)&&0!==this.postBattleFlowData.rescuablePets.length?(this._mainFlowContainer&&(this._mainFlowContainer.active=!1),this._rescueFlowContainer&&(this._rescueFlowContainer.active=!0),this.setupRescuablePets().catch((k=>{j.VyI.log("Failed to setup rescuable pets",j.$bb.Error,k)}))):this.onEvent.dispatch(At.RescueFlowFinished)}runRescuePetQueue(k){return(0,G.sH)(this,void 0,void 0,(function*(){for(this._rescuePetQueue.push(k);this._rescuePetQueue.length>0;){const k=this._rescuePetQueue.pop();k&&(yield k)}}))}setupRescuablePets(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=z.q.instance.prodigy.gameContainer.get("d0e-64fd"),B=j.wa5.getActiveScene().container.get(dt.sD.RescuablePetsContainer);yield k.preloadFromGUIDWithDependencies($.l.RescuablePet);const U=this.getRescueScreenState();this.postBattleFlowData.rescuablePets.forEach((F=>{const H=k.loadFromGUID($.l.RescuablePet,B).findComponent(Gt.fL);H?(this._rescuablePets.push(H),H.setup(F,U.showMembershipButton,(()=>this.updateRescuablePetsUI(this.getRescueScreenState().showMembershipButton)),(k=>(0,G.sH)(this,void 0,void 0,(function*(){return this.runRescuePetQueue(k)}))))):j.VyI.log("RescuablePetComponent not found on RescuablePet prefab",j.$bb.Error)})),this.updatePetsRescuedState(U.hasPetToRescue),U.showMembershipButton&&(z.q.instance.prodigy.game.broadcaster.addAppListener(J.H3.MembershipResponseReceived,this.handleMembershipChange,this),z.q.instance.prodigy.game.broadcaster.addAppListener(J.H3.MembershipRewardsFlowComplete,this.handleMembershipRewardsFlowComplete,this)),z.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:It.B.PetRescueWindow,interfaceType:nt.Wm.Window,originType:nt.$N.AutoSurfaced,instanceType:yt.N.UI})}))}getRescueScreenState(){const k=z.q.instance.prodigy.gameContainer,B=k.get("306-5359").canPurchaseMembershipInGame(),U=k.get("5c7-e02d"),F=(0,ot.G)(jt.F);let G=B,j=!1,$=Number.MAX_SAFE_INTEGER;return this.postBattleFlowData.rescuablePets.forEach((k=>{var H;if(k.battleStatus===Ft.EUnitBattleStatus.Defeated&&(j=!0),k.battleStatus===Ft.EUnitBattleStatus.Defeated&&(null===(H=k.cost)||void 0===H?void 0:H.value)>0){const j=U.canAfford(k.cost);$=Math.min($,k.cost.value),(F||j&&B)&&(G=!1)}})),j||(G=!1),U.isHardCurrencyMemberLocked($)&&(G=!0),{showMembershipButton:G,hasPetToRescue:j}}updatePetsRescuedState(k){const B=z.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),U={[dt.uo.PostBattleFlowRescueContinueButtonText]:k?B.getText(this.PBF_RESCUE_LATER):B.getText(this.PBF_CONTINUE_LOC_KEY),[dt.uo.PostBattleFlowRescueTitle]:k?B.getText(this.PBF_RESCUE_PETS_LOC_KEY):B.getText(this.PBF_PETS_ARE_RESCUED_LOC_KEY),[dt.uo.PostBattleFlowShowClouds]:k};lt.d.updateInjectedValues(this._rescueFlowContainer,U)}updateRescuablePetsUI(k){let B=!1;this._rescuablePets.forEach((U=>{U.updateUI(),U.isRescued||(B=!0,U.updateButtons(k))})),this.updatePetsRescuedState(B)}handleMembershipChange(k){const B="success"===k;this.updateRescuablePetsUI(!B),B||lt.d.updateInjectedValues(this._rescueFlowContainer,{[dt.uo.EnableRescueButtonInput]:!0})}handleMembershipRewardsFlowComplete(){return(0,G.sH)(this,void 0,void 0,(function*(){this.updateRescuablePetsUI(!1)}))}destroy(){super.destroy(),z.q.instance.prodigy.game.broadcaster.removeAppListener(J.H3.MembershipResponseReceived,this),z.q.instance.prodigy.game.broadcaster.removeAppListener(J.H3.MembershipRewardsFlowComplete,this)}}var Ht=U(42448),Vt=U(44357),Wt=U(74958);class qt extends _t{setup(k){super.setup(k),this.showDialogueIfNecessary().catch((()=>{j.RQr.createHandler("Error displaying Post Battle Flow Rift Key Obtained dialogue."),this.onComplete.dispatch()}))}showDialogueIfNecessary(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,j;const $=z.q.instance.prodigy,H=$.gameContainer.get("e20-0fb0").player,V=$.gameContainer.get("61f-37d6"),[W,q,K]=[null!==(B=null===(k=V.get({type:"riftRunKey",id:Ht.BN.PortalOneKey}))||void 0===k?void 0:k.quantity)&&void 0!==B?B:0,null!==(F=null===(U=V.get({type:"riftRunKey",id:Ht.BN.PortalTwoKey}))||void 0===U?void 0:U.quantity)&&void 0!==F?F:0,null!==(j=null===(G=V.get({type:"riftRunKey",id:Ht.BN.PortalThreeKey}))||void 0===G?void 0:G.quantity)&&void 0!==j?j:0],Y=Math.max(W,q,K)>0,Q=H.hasCompletedTutorial(),X=$.breadcrumbManager.isBreadcrumbComplete(mt.B.FEATURE_RIFTS,mt.B.BREADCRUMB_FIRST_RIFT_KEY_OBTAINED);Q&&!X&&Y&&(this.rewardsBar.active=!1,yield(0,Vt.v$)([1596]),z.q.instance.prodigy.gameContainer.get("c47-20b6").rifts.sendRiftsFunnelAdvancedEvent(Wt.fk.RiftsReceiveFirstRiftKey),$.breadcrumbManager.completeBreadcrumb(mt.B.FEATURE_RIFTS,mt.B.BREADCRUMB_FIRST_RIFT_KEY_OBTAINED),this.rewardsBar.active=!0),this.onComplete.dispatch()}))}}class Kt extends _t{setup(k){super.setup(k),this._mainFlowContainer&&(this._mainFlowContainer.active=!0),this._rescueFlowContainer&&(this._rescueFlowContainer.active=!1),this.continueButton.GameObject.active=!1,this.rewardsBar.active=!1}onAllAnimationsComplete(){this.onEvent.dispatch(At.StandardXPBarSequenceFinished)}}var zt,Yt=U(28344),Qt=U(4903),Xt=U(34829),Zt=U(84415),Jt=U(30226),te=U(48982),ee=U(1716),ie=U(52157),se=U(3374);!function(k){k.PetEvolution="1-evolve/in-game-pet-evolution",k.PetCollect="2-collect/in-game-pet-collect",k.MythicalEpics="3-mythical-epics/in-game-mythical-epics",k.PlayAtHome="4-play-at-home/in-game-play-at-home",k.Magicoin="5-magicoin/in-game-magicoin"}(zt||(zt={}));class ne extends _t{constructor(){super(...arguments),this._isAtSchool=!1,this.et=!1}setup(k){super.setup(k),this.continueButton.GameObject.active=!1,this.rewardsBar.active=!1,this._activePlayer=z.q.instance.prodigy.gameContainer.get("e20-0fb0").player,this._isAtSchool=this._activePlayer.isPlayingAtSchool()||Jt.J.isDateWithinSchoolDayAndHours(new Date(Date.now())),this.et=this._activePlayer.hasMembership(),this.isVideoReady().then((k=>{k?(this.openVideoPlayerMenu(),this._waitingForInput=!1):this.onComplete.dispatch()})).catch((()=>{j.RQr.createHandler("[PostBattleFlowVideoState] Error getting whether video is ready"),this.onComplete.dispatch()}))}isVideoReady(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,j;if(Xt.s.get("GameConstants.Battle.SKIP_POST_BATTLE_VIDEOS"))return!1;const $=(0,ot.G)(Yt.y).enabled,H=yield(new ie.L).isReady({questId:ee.E.id,taskId:"2-0"});if($&&!H)return!1;if(!this._activePlayer.hasCompletedTutorial())return!1;if(!this.checkRequiredBreadcrumbsComplete())return!1;yield this.refreshVideoData();const V=null!==(U=null===(B=null===(k=this._currentVideoTypeData)||void 0===k?void 0:k.metadata)||void 0===B?void 0:B.showToMembers)&&void 0!==U&&U;if(this.et&&!V)return!1;const W=null!==(j=null===(G=null===(F=this._currentVideoTypeData)||void 0===F?void 0:F.metadata)||void 0===G?void 0:G.frequencyHours)&&void 0!==j?j:0;return Zt.a.isFeatureReadyForNextInteraction(this._videoType,3600*W)}))}checkRequiredBreadcrumbsComplete(){const k=z.q.instance.prodigy.breadcrumbManager;return Array.from(ne.REQUIRED_BREADCRUMBS.entries()).every((([B,U])=>k.isBreadcrumbComplete(B,U)))}openVideoPlayerMenu(){var k,B,U,F,G,j;const $=Object.keys(null!==(U=null===(B=null===(k=this._currentVideoTypeData)||void 0===k?void 0:k.data)||void 0===B?void 0:B.videos)&&void 0!==U?U:{});if($.length<=0)return void this.onComplete.dispatch();const H=te.h.selectNextVideoInFeature(this._videoType,$);Zt.a.saveTimestampData(this._videoType,{videoId:H});const V=null===(G=null===(F=this._currentVideoTypeData)||void 0===F?void 0:F.data)||void 0===G?void 0:G.videos[H];z.q.instance.prodigy.open.postBattleMembershipVideoMenu(H,V,null===(j=this._currentVideoTypeData)||void 0===j?void 0:j.metadata,this._isAtSchool,this.onComplete.dispatch.bind(this.onComplete))}refreshVideoData(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=se.C.getVideosDataProvider(),B=this.postBattleFlowData.battleType,U=this._isAtSchool?`${B}-school`:`${B}-home`;if(this._currentVideoTypeData=yield k.getVideosDataByType(U),this._videoType=U,!this._currentVideoTypeData){const B=this._isAtSchool?Qt.s.PostBattleFlowSchool:Qt.s.PostBattleFlowHome;this._currentVideoTypeData=yield k.getVideosDataByType(B),this._videoType=B}}))}}ne.REQUIRED_BREADCRUMBS=new Map([[mt.B.FEATURE_ZONE_ENTRY_ILLUSTRATION,mt.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FOREST]]);class ae extends _t{setup(k){super.setup(k),this._mainFlowContainer&&(this._mainFlowContainer.active=!0),this._rescueFlowContainer&&(this._rescueFlowContainer.active=!1),this.continueButton.GameObject.active=!1,this.rewardsBar.active=!1}}let re=class extends j.uAl{set continueButton(k){this._continueButton=k}get animationsInProgressSemaphore(){return this._animationsInProgressSemaphore}constructor(){super(),this._activePartyMembers=[],this._onActiveTeamChanged=new j.HN0,this._onStateEvent=new j.HN0,this._onActiveTeamInitialized=new j.HN0,this._onShowStarsGained=new j.HN0,this._stateIndex=0,this._expressModeEnabled=!1,this._showPostLossFlow=!1,this.POST_BATTLE_VIDEO_EXEMPT_TYPES=[H.gu.Tutorial1,H.gu.Tutorial1Revised,H.gu.Tutorial2,H.gu.Tutorial2Revised,H.gu.Tutorial3,H.gu.StatusEffectsTutorial,H.gu.Duel,H.gu.MatchmakingDuel,H.gu.MatchmakingBotDuel];{this._starJarController=new st.b;const k=(0,ot.G)(q.F);z.q.instance.game.broadcaster.addAppListener(k?J.ig.Merged:J.ig.Evolved,(()=>{const k=this._postBattleFlowData.creatures.filter((k=>k.creature instanceof Z.R)).map((k=>k.creature));this.updatePetSpines(k),this._onActiveTeamChanged.dispatch(k)}),this,null)}}postCreate(){var k,B;super.postCreate(),this._postBattleFlowData=this.getInjectedValue(dt.uo.PostBattleFlowData),this._rewardsScalingInfo=this.getInjectedValue(dt.uo.PostBattleFlowRewardsScalingInfo),this._segment.playerProgression.clearPlayerProgressionDataForFunnelName("Post Battle Flow"),this._segment.postBattleFlow.sendPostBattleFlowOpensEvent(),this.updatePetSpines();const U=this.getInjectedValue(dt.uo.PostBattleFlowVictory);this.showXpWarningMessage(U);const F=this._player.player.isPlayingAtSchool(),G=this._player.player.hasMembership();let j=!1;const $=(0,ot.G)(V.G);if($.enabled){const k=$.unlockLevel;j=this._player.getLevel(){const B=k.creature;return B instanceof Z.R&&B.data.level===B.currentMaxLevel}));G||F||!K||ft.s.startRecording("PostBattleFlowManager","post_battle_flow"),this._statesInOrder=[];const z=this.getInjectedValue(dt.uo.PostBattleFlowBattleType);if(this._showPostLossFlow=!U&&vt.S.isPostLossFlowAvailable(z),this._showPostLossFlow)this.setupPostDefeatStates();else{const k=U&&!this.POST_BATTLE_VIDEO_EXEMPT_TYPES.includes(z)&&Q.O.isEnglishLocale();this.setupPostBattleStates(q,k)}(null===(B=null===(k=this._postBattleFlowData.creatures[0].creatureXpBarInformation)||void 0===k?void 0:k.levels)||void 0===B?void 0:B.length)>1?this.playerLevelUpCelebrationFlow():this.setupDefaultFlow()}setupPostBattleStates(k,B){var U,F,G,j,$;(0,ot.G)(K.H).enabled&&this._statesInOrder.push($t),(0,ot.G)(q.F)||this._statesInOrder.push(Ot),(null===(U=this._postBattleFlowData)||void 0===U?void 0:U.magicoinRewardGranted)?this._statesInOrder.push(Lt):(null===(G=null===(F=this._postBattleFlowData)||void 0===F?void 0:F.rewards)||void 0===G?void 0:G.length)>0||(null===($=null===(j=this._postBattleFlowData)||void 0===j?void 0:j.memberRewards)||void 0===$?void 0:$.length)>0?(this._statesInOrder.push(k?Nt:Mt),this._statesInOrder.push(qt)):this._statesInOrder.push(Ut),this._statesInOrder.push(wt),B&&this._statesInOrder.push(ne);{this._activePartyMembers.push(this._centrePartyMember),this._centrePlayerGameObject.active=!0,this._postBattleFlowData.creatures.length>1&&(this._activePartyMembers.push(this._leftPartyMember),this._leftPetSpineRootContainer.visible=!0),this._postBattleFlowData.creatures.length>2&&(this._activePartyMembers.push(this._rightPartyMember),this._rightPetSpineRootContainer.visible=!0);const k=this._postBattleFlowData.creatures.filter((k=>k.creature instanceof Z.R)).map((k=>k.creature));this._onActiveTeamInitialized.dispatch(k)}}setupPostDefeatStates(){this._expressModeEnabled=!0,this._statesInOrder.push(Bt)}finishRescueFlow(){this._animationsInProgressSemaphore.initialize(this._postBattleFlowData.creatures.length),this.completeCurrentState(),this.setupPostBattleFlowMemberComponentsForParty(),this._activePartyMembers[0].shouldShowChargedLevelUnlock()&&this._statesInOrder.splice(2,0,St)}setupDefaultFlow(){this._showPostLossFlow?this.setupNextState():(0,ot.G)(K.H).enabled?(this._statesInOrder.splice(1,0,Kt),this.setupNextState()):(this._animationsInProgressSemaphore.initialize(this._postBattleFlowData.creatures.length),this._statesInOrder.unshift(Kt),this.setupNextState(),this.setupPostBattleFlowMemberComponentsForParty())}playerLevelUpCelebrationFlow(){this._rewardsBar.active=!1,(0,ot.G)(K.H).enabled?(this._statesInOrder.splice(1,0,ae),this.setupNextState()):(this._animationsInProgressSemaphore.initialize(this._postBattleFlowData.creatures.length),this._statesInOrder.unshift(ae),this.setupNextState(),this.setupPostBattleFlowMemberComponentsForParty(),this._activePartyMembers[0].shouldShowChargedLevelUnlock()&&this._statesInOrder.splice(1,0,St))}initPetLevelUp(){this.setupPostBattleFlowMemberComponentsForParty()}evolvePet(k){const B=this._postBattleFlowData.creatures[k];if(!(B&&B.creature instanceof Z.R))return void j.VyI.log(`Warning: attempted to evolve pet in post battle flow with invalid index ${k}`,j.$bb.Warning);const U=this._postBattleFlowData.creatures[k];ct.K.openEvolutionPromptIfEligible(U.creature,U.originalCreature,!1,nt.k.PostBattleWin).then((k=>{k&&(this._leftPartyMember.enableEvolveButtonInput(!0),this._rightPartyMember.enableEvolveButtonInput(!0))})).catch(j.RQr.createHandler("Error showing evolution summary in post battle flow"))}showMergeMenu(k){const B=this._postBattleFlowData.creatures[k];if(!(B&&B.creature instanceof Z.R))return void j.VyI.log(`Warning: attempted to merge pet in post battle flow with invalid index ${k}`,j.$bb.Warning);const U=this._postBattleFlowData.creatures[k];z.q.instance.prodigy.open.petMergeMenu(U.creature.data,nt.k.PostBattleWin,(()=>{this._leftPartyMember.enableMergeButtonInput(!0),this._rightPartyMember.enableMergeButtonInput(!0),this._leftPartyMember.updateMergeBadgeRank(),this._rightPartyMember.updateMergeBadgeRank()}))}destroy(){var k,B;null===(B=null===(k=z.q.instance.game.state.getCurrentState())||void 0===k?void 0:k.endCombat)||void 0===B||B.call(k,F.Win),ft.s.stopRecording(),this._onActiveTeamChanged.dispose(),this._onStateEvent.dispose(),this._onActiveTeamInitialized.dispose(),this._onShowStarsGained.dispose(),z.q.instance.game.broadcaster.removeAppListener(J.ig.Evolved,this),super.destroy()}setupNextState(){var k,B,U,F,G;if(this._stateIndex>=this._statesInOrder.length)return void(0===(null===(B=null===(k=this._postBattleFlowData)||void 0===k?void 0:k.rewards)||void 0===B?void 0:B.length)&&0===(null===(F=null===(U=this._postBattleFlowData)||void 0===U?void 0:U.memberRewards)||void 0===F?void 0:F.length)?(this._continueButton.GameObject.active=!0,this._continueButton.onClick.addOnce((()=>{this._segment.postBattleFlow.sendPBFClosedEvent(),this.endPostBattleFlow()})),this._expressModeEnabled&&(this._continueButton.onClick.dispatch(),this._continueButton.onEnabledClick.dispatch())):(this._segment.postBattleFlow.sendPBFClosedEvent(),this.endPostBattleFlow()));const $=new this._statesInOrder[this._stateIndex](this._postBattleFlowData,this._continueButton,this._rewardsBar,this._animationsInProgressSemaphore.semaphore,this._mainFlowContainer,this._rescueFlowContainer);if($.onComplete.addOnce((()=>{this._stateIndex++,$.destroy(),this.setupNextState()})),$.onEvent.add((k=>{this._onStateEvent.dispatch(k)})),j.Aq$.isDefined(null===(G=this._continueButton)||void 0===G?void 0:G.GameObject)){this._continueButton.GameObject.findComponentInChildren(j.EYj).text=this._stateIndex===this._statesInOrder.length-1?this._baseLocalizer.getText("BUTTON_DONE"):this._baseLocalizer.getText("DIALOG_CONTINUE")}this._currentState=$,$.setup(this._expressModeEnabled)}onAllAnimationsComplete(){this._currentState.onAllAnimationsComplete()}redeemStarsThroughMemberJar(){const k=this._starJarController.getNumberOfStoredStars(),B={baseXp:0,memberXp:Math.round(k/this._postBattleFlowData.creatures.length),totalNonMemberXp:0},U=pt.s.calculatePlayerOverflowXp(B.memberXp);return this._postBattleFlowData.awardXp(B),this._player.player.data.storedMemberStars=0,this._postBattleFlowData.saveCharacterData(),U>0&&this._postBattleFlowData.awardChargedLevelStarJarXp({baseXp:0,memberXp:U,totalNonMemberXp:0}).catch(j.RQr.createHandler("[PostBattleFlowManagerComponent] Failed to award charged level star jar xp.")),{totalStarsAwarded:k,starJarXpGained:B}}visuallyRedeemStarsThroughMemberJar(k){this._animationsInProgressSemaphore.initialize(this._postBattleFlowData.creatures.length),this._centrePartyMember.visuallyAwardPartyMemberXpOutsideOfSetup(k),this._leftPartyMember.visuallyAwardPartyMemberXpOutsideOfSetup(k),this._rightPartyMember.visuallyAwardPartyMemberXpOutsideOfSetup(k)}completeCurrentState(){this._currentState.onComplete.dispatch()}incrementAnimationsInProgress(){this._animationsInProgressSemaphore.increment()}decrementAnimationsInProgress(){this._animationsInProgressSemaphore.decrement()}updatePetSpines(k){const B=null!=k?k:this._postBattleFlowData.creatures.filter((k=>k.creature instanceof Z.R)).map((k=>k.creature));this._petSpinesComponent.updatePetSpines(B)}enableExpressMode(k){var B;this._expressModeEnabled=!0,j.Aq$.isDefined(k)&&this.showForceEndDialog(k).catch(j.RQr.createHandler("PostBattleFlowManagerComponent.enableExpressMode failed")),null===(B=this._currentState)||void 0===B||B.enableExpressMode()}showXpWarningMessage(k){const B=ut.R.shouldShowRewardsScalingWarning(this._rewardsScalingInfo)||bt.J.shouldShowHardModePbfBannerWarning();this._scaledRewardsWarning.active=k&&B}showForceEndDialog(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;const U=z.q.instance.prodigy.gameContainer.get("d0e-64fd");if(this._forceEndDialog=yield lt.d.loadWithInjectedValuesAndDependenciesFromGUID(U,$.l.WarningToaster,{NOTIFICATION_BODY_TEXT:k}),this._forceEndDialog.setLayer(ht.E.Ui),!j.Aq$.isDefined(this._forceEndDialog))return;const F=null===(B=this._forceEndDialog.findChildByName("FromBottom"))||void 0===B?void 0:B.findComponent(rt.s);null==F||F.runInTween()}))}setupPostBattleFlowMemberComponentsForParty(){var k,B;let U=0;for(let F=0;F{"use strict";U.d(B,{O:()=>it});var F=U(8674),G=U(62459),j=U(88022),$=U(50788),H=U(5491),V=U(76277),W=U(53661),q=U(80060),K=U(1195),z=U(77938),Y=U(39984),Q=U(28152),X=U(25809),Z=U(95913),J=U(72162),tt=U(55122),et=U(50475);let it=class extends G.uAl{constructor(){super(...arguments),this._onXpGained=new G.HN0,this._onMemberXpGained=new G.HN0,this._onLevelUp=new G.HN0,this._onChargedLevelUp=new G.HN0,this._onSpellLearned=new G.HN0,this._onStatGained=new G.HN0,this._onStarsGained=new G.HN0}setup(k,B,U,F=!0){this._xpGained=k,this._creatureInformation=B,F&&(this._xpBar.GameObject.active=!0,this._xpBar.onLevelUp.addOnce(((k,B)=>{const U=this.buildPopupMessagePropertiesForCreatureForLevelUp(B);this._levelUpPopupMessageManager.playPopupMessageAnimations(U).catch(G.RQr.createHandler("Failed to play level up popup message animations."))})),this._xpBar.setup(this._creatureInformation.creatureXpBarInformation,U,!0,this.shouldShowChargedLevelUnlock()),this._onStarsGained.dispatch(this._creatureInformation.creatureXpBarInformation.starsToAward),this.playPopupMessagesForCreatureXpGain(),(0,V.G)($.F)&&this.updateMergeBadgeRank())}visuallyAwardPartyMemberXpOutsideOfSetup(k){this._xpBar.GameObject.active&&(this._xpGained=k,this._creatureInformation.updateMainCreatureInformation(this._creatureInformation.creature,k),this._xpBar.fakeAwardXp(!1,k),this.playPopupMessagesForCreatureXpGain())}shouldShowChargedLevelUnlock(){var k,B;return this._creatureInformation.creatureXpBarInformation.creatureType===H.V.Player&&(null===(B=null===(k=this._currentPlayer.player.data)||void 0===k?void 0:k.chargedLevelData)||void 0===B?void 0:B.hasJustReceivedFreeChargedLevel)}buildPopupMessagePropertiesForCreatureForLevelUp(k){const B=[];if(0===k){const k=this._creatureInformation.creatureXpBarInformation.creatureType===H.V.Player&&this._creatureInformation.creatureXpBarInformation.levels[0]>tt.s.activePlayerLevelCap?Z.v4.chargeUp(this._onChargedLevelUp):Z.v4.levelUp(this._onLevelUp);B.push(k)}if(B.push(...Z.v4.battleStats(this._creatureInformation.statIncreases,this._onStatGained)),k===this._creatureInformation.creatureXpBarInformation.levels.length-2){const k=this.buildSpellLearnedPopupMessagesForCreatureLevelUp();B.push.apply(B,k)}return B}buildSpellLearnedPopupMessagesForCreatureLevelUp(){const k=[];for(const B of this._creatureInformation.unlockedSpellsDisplayInformation)k.push(Z.v4.spell(B,this._onSpellLearned));return k}playPopupMessageForPetChargedLevel(){if(!this._creatureInformation)return;const k=this._creatureInformation.creature.getBattleAssetSpecifier(),B=z.t.getItem(k.type,k.id),U=null==B?void 0:B.data,F=this._creatureInformation.creature.getLevel()+this._currentPlayer.getChargedLevel()-1,j=this._creatureInformation.creature.getLevel()+this._currentPlayer.getChargedLevel(),$=Y.e.getStatIncreasesFromLevelUps(U,F,j),H=Z.v4.battleStats($);this._levelUpPopupMessageManager.playPopupMessageAnimations(H).catch(G.RQr.createHandler("Failed to play level up popup message animations."))}playPopupMessagesForCreatureXpGain(){const k=[];this._currentPlayer.getLevel()>=tt.s.activePlayerLevelCap||(this._xpGained.totalNonMemberXp&&k.push({type:J.m0.Stat,statIncreaseAmount:this._xpGained.baseXp,atlasGuid:j._.Ui_postbattle_json,atlasFrameName:"small-levelup",showSignal:this._onXpGained}),this._currentPlayer.isMember()&&this._xpGained.memberXp&&k.push({type:J.m0.Stat,statIncreaseAmount:this._xpGained.memberXp,atlasGuid:j._.Ui_postbattle_json,atlasFrameName:"small-levelup-member",showSignal:this._onMemberXpGained}),k.length>0&&this._xpGainedPopupMessageManager.playPopupMessageAnimations(k).catch(G.RQr.createHandler("Failed to play wizard XP gained popup messages")))}destroy(){this._onXpGained.dispose(),this._onMemberXpGained.dispose(),this._onLevelUp.dispose(),this._onChargedLevelUp.dispose(),this._onSpellLearned.dispose(),this._onStatGained.dispose(),this._onStarsGained.dispose(),super.destroy()}enableEvolveButtonInput(k){this._xpBar.evolveButton.setButtonEnabled(k)}enableMergeButtonInput(k){this._xpBar.mergeButton.setButtonEnabled(k)}updateMergeBadgeRank(){var k;q.d.updateInjectedValues(this._xpBar.GameObject,{[W.hi.YourPetPanelPetMergeRank]:null!==(k=this._creatureInformation.creature.data.mergeRank)&&void 0!==k?k:0})}};(0,F.Cg)([(0,G.MnK)(et.B),(0,F.Sn)("design:type",et.B)],it.prototype,"_xpBar",void 0),(0,F.Cg)([(0,G.MnK)(X.g),(0,F.Sn)("design:type",X.g)],it.prototype,"_levelUpPopupMessageManager",void 0),(0,F.Cg)([(0,G.MnK)(X.g),(0,F.Sn)("design:type",X.g)],it.prototype,"_xpGainedPopupMessageManager",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],it.prototype,"_onXpGained",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],it.prototype,"_onMemberXpGained",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],it.prototype,"_onLevelUp",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],it.prototype,"_onChargedLevelUp",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],it.prototype,"_onSpellLearned",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],it.prototype,"_onStatGained",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],it.prototype,"_onStarsGained",void 0),(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",K.E)],it.prototype,"_currentPlayer",void 0),it=(0,F.Cg)([(0,G.EVk)("PostBattleFlowPartyMember",Q.Y.postBattleFlow)],it)},54234:(k,B,U)=>{"use strict";U.d(B,{I:()=>X});var F=U(8674),G=U(62459),j=U(83798),$=U(39596),H=U(1195),V=U(77938),W=U(28152),q=U(76277),K=U(53661),z=U(80060),Y=U(56718);const Q=["r-common","r-uncommon","r-rare","r-heroic","r-legendary"];let X=class extends G.uAl{constructor(){super(...arguments),this._displayRegular=!0,this._displayMember=!0,this._rewardScalingThresholds=[4],this._rewardScalingRowSpacings=[84],this._rewardScalingColumnSpacings=[104],this._rewardScalingValues=[.6],this._rewardScalingColumnAmounts=[4],this.onRewardsDisplayFilled=new G.HN0,this.onThresholdExceeded=new G.HN0}postCreate(){const k=Object.create(null,{postCreate:{get:()=>super.postCreate}});return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;if(k.postCreate.call(this),this._postBattleFlowData=this.getInjectedValue(K.uo.PostBattleFlowData),!this._postBattleFlowData)return;const G=this._loggedInPlayer.isMember();let H=(0,q.G)($.g)||!this._loggedInPlayer.player.isPlayingAtSchool()||G;const W=(0,q.G)(j.G);if(W.enabled&&H){const k=W.unlockLevel;H=this._player.getLevel()>=k}const X=Symbol();let Z=[];this._postBattleFlowData.rewards&&this._displayRegular&&(Z=Z.concat(this._postBattleFlowData.rewards)),this._postBattleFlowData.memberRewards&&this._displayMember&&H&&(Z=Z.concat(this._postBattleFlowData.memberRewards.map((k=>Object.assign(Object.assign({},k),{[X]:!G}))))),Z=Y.S.combineRewards(Z),this._gridLayout.GameObject.active=!1;const J=(yield Promise.all(Z.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return[k,yield V.t.secureGetItem(k.type,k.ID)]})))))).filter((([,k])=>null==k?void 0:k.data));for(const[k,{data:F}]of J){const G=null!==(B=k.N)&&void 0!==B?B:1,j=null!==(U=F.rarity)&&void 0!==U?U:0,$=Q[j],V=k[X],W=yield z.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._cardPrefabGuid,{[K.uo.PostBattleFlowRewardCardAssetId]:k.ID,[K.uo.PostBattleFlowRewardCardAssetType]:k.type,[K.uo.PostBattleFlowRewardCardFrame]:$,[K.uo.PostBattleFlowRewardCardMoreThanOneItem]:G>1,[K.uo.PostBattleFlowRewardCardAmountText]:`x${G}`,[K.uo.PostBattleFlowRewardCardMemberItem]:F.member&&!H,[K.uo.PostBattleFlowRewardCardIsLocked]:V||F.member&&H});if(Z.length>this._rewardScalingThresholds[0]){const k=this._rewardScalingThresholds.findIndex(((k,B)=>B===this._rewardScalingThresholds.length-1||Z.length>k&&Z.length<=this._rewardScalingThresholds[B+1]));this._gridLayout.setRowSpacing(this._rewardScalingRowSpacings[k]),this._gridLayout.setColumnSpacing(this._rewardScalingColumnSpacings[k]),this._gridLayout.setFixedColumnCount(this._rewardScalingColumnAmounts[k]),W.transform.setScale(this._rewardScalingValues[k]),this.onThresholdExceeded.dispatch()}if(!this._gridLayout.GameObject)return;this._gridLayout.GameObject.addChild(W)}this.onRewardsDisplayFilled.dispatch(),this._gridLayout.GameObject.active=!0}))}destroy(){this.onRewardsDisplayFilled.dispose(),this.onThresholdExceeded.dispose(),super.destroy()}};(0,F.Cg)([(0,G.MnK)(G.JTA),(0,F.Sn)("design:type",G.JTA)],X.prototype,"_gridLayout",void 0),(0,F.Cg)([(0,G.i0J)(G.Z$z.Prefab),(0,F.Sn)("design:type",String)],X.prototype,"_cardPrefabGuid",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],X.prototype,"_displayRegular",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],X.prototype,"_displayMember",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.g11)(),(0,F.Sn)("design:type",Array)],X.prototype,"_rewardScalingThresholds",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.g11)(),(0,F.Sn)("design:type",Array)],X.prototype,"_rewardScalingRowSpacings",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.g11)(),(0,F.Sn)("design:type",Array)],X.prototype,"_rewardScalingColumnSpacings",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.g11)(),(0,F.Sn)("design:type",Array)],X.prototype,"_rewardScalingValues",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.g11)(),(0,F.Sn)("design:type",Array)],X.prototype,"_rewardScalingColumnAmounts",void 0),(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",Object)],X.prototype,"_loggedInPlayer",void 0),(0,F.Cg)([(0,G.Cdj)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],X.prototype,"_prefabLoader",void 0),(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",H.E)],X.prototype,"_player",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],X.prototype,"onRewardsDisplayFilled",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],X.prototype,"onThresholdExceeded",void 0),X=(0,F.Cg)([(0,G.EVk)("PostBattleFlowRewardsDisplay",W.Y.postBattleFlow)],X)},50475:(k,B,U)=>{"use strict";U.d(B,{B:()=>J});var F,G=U(8674),j=U(62459),$=U(5491),H=U(35120),V=U(28152),W=U(26004),q=U(93171),K=U(19633),z=U(72379),Y=U(37773),Q=U(65732),X=U(97317),Z=U(55122);let J=F=class extends j.uAl{constructor(){super(...arguments),this.runOnSetup=!0,this.onSetup=new j.HN0,this.onLevelUp=new j.HN0,this.onChargedLevelUnlocked=new j.HN0,this.onBarCompletelyFinishedAnimating=new j.HN0,this.onPreviewBarReachLevelUp=new j.HN0,this._skipFakeAwardXp=!1}get _canShowChargedLevels(){var k;return(null===(k=this._creatureXpBarInformation)||void 0===k?void 0:k.creatureType)===$.V.Player}setup(k,B=10,U=!1,F=!1){const G=k.levels[0];this._creatureXpBarInformation=k,this._barFillSpeed=B,this.showPreviewBar=this.delayPreview=U,this.showChargedLevelUnlock=F,this.levelText.text=G.toString(),this.onSetup.dispatch(G,0);const j=Z.s.baseLevelRequiredForChargedLevels,$=this._creatureXpBarInformation.levels[0]>j;this._canShowChargedLevels&&this.showChargedLevelUnlock&&G<=j?this.showChargedLevelUnlockSequence():($&&this.showBarWithChargedLevels(),this.runOnSetup?this.fakeAwardXp():this._creatureXpBarInformation.levels[0]>=this._creatureXpBarInformation.maxLevel?(this.progressBar.setValue(1),this.showBarAtMaxLevel()):this.progressBar.setValue(this._creatureXpBarInformation.currentRelativeStars/this._creatureXpBarInformation.starsRequiredForEachLevel[0]))}drainXpBar(k){this._barFillSpeed=k>0?30:10,this.progressBar.setValue(1),this.progressBar.tweenValue(0),k<=0||this.progressBar.onComplete.addOnce((()=>{var B,U,F;const G=null!==(F=null===(U=null===(B=this._chargedLevelsProgressManager)||void 0===B?void 0:B.chargedLevelsProgressData)||void 0===U?void 0:U.chargedLevel)&&void 0!==F?F:0,j=this._creatureXpBarInformation.baseMaxLevel+G+(k-1);j>this._creatureXpBarInformation.maxLevel?this.showBarWithChargedLevels():this.showBarAtNonMaxLevel(),this.levelText.text=j.toString(),this.drainXpBar(k-1)}))}fakeAwardXp(k=!0,B){if(this._numTimesXpBarFilled=0,this._skipFakeAwardXp)return;k||this._creatureXpBarInformation.updateCreatureXpBarInformation(this._creatureXpBarInformation.currentCreatureStars+this._starsEarned,this._creatureXpBarInformation.creatureType,B),this._starsToAddToBar=this._starsEarned=this._creatureXpBarInformation.starsToAward;const U=this._creatureXpBarInformation.currentRelativeStars/this._creatureXpBarInformation.starsRequiredForEachLevel[0];this.previewProgressBar.setValue(U),this.progressBar.setValue(U),0===this._starsToAddToBar?(this._creatureXpBarInformation.levels[0]>=this._creatureXpBarInformation.maxLevel&&(this.progressBar.setValue(1),this.showBarAtMaxLevel()),this.showPreviewBar?this.showPreviewBar=!1:(this.progressBar.onComplete.dispatch(),this.onBarCompletelyFinishedAnimating.dispatch())):this.delayPreview||this.tweenBar(this._creatureXpBarInformation.currentRelativeStars)}tweenBar(k=0){if(this.previewProgressBar&&this.progressBar&&this.GameObject&&this._starsToAddToBar){let B=1,U=this._creatureXpBarInformation.starsRequiredForEachLevel[this._numTimesXpBarFilled],F=k+this._starsToAddToBar===this._creatureXpBarInformation.starsRequiredForEachLevel[this._numTimesXpBarFilled];k+this._starsToAddToBar{this.tweenBar(this._creatureXpBarInformation.currentRelativeStars)})),1===B&&G.onComplete.addOnce((()=>{if(this._canShowChargedLevels&&this.showChargedLevelUnlock&&$)this.showBarAtMaxLevel(),this.progressBar.setValue(1),this.onChargedLevelUnlocked.dispatch();else{const k=this._canShowChargedLevels&&this._creatureXpBarInformation.levels[this._numTimesXpBarFilled]>this._creatureXpBarInformation.maxLevel;this.onPreviewBarReachLevelUp.dispatch(k)}}))):(1===B&&G.onComplete.addOnce((()=>{this._canShowChargedLevels&&$?this.levelText.text=this._creatureXpBarInformation.maxLevel.toString():this.onLevelUp.dispatch(this._creatureXpBarInformation.levels[this._numTimesXpBarFilled+1],this._numTimesXpBarFilled)}),this),F&&G.onComplete.addOnce((()=>{this.onBarCompletelyFinishedAnimating.dispatch()}))),G.fillSpeedMS=0===this._numTimesXpBarFilled?Math.min((U-k)/this._barFillSpeed*1e3,3e3):Math.min((U-k)/this._barFillSpeed*1e3,1e3),G.tweenValue(B)}}resetXpBar(){if(0===this._numTimesXpBarFilled?this._starsToAddToBar-=this._creatureXpBarInformation.starsRequiredForEachLevel[this._numTimesXpBarFilled]-this._creatureXpBarInformation.currentRelativeStars:this._starsToAddToBar-=this._creatureXpBarInformation.starsRequiredForEachLevel[this._numTimesXpBarFilled],this._numTimesXpBarFilled++,this._numTimesXpBarFilled>=this._creatureXpBarInformation.levels.length)return void this.onBarCompletelyFinishedAnimating.dispatch();const k=this._creatureXpBarInformation.levels[this._numTimesXpBarFilled];if(this.levelText.text=k.toString(),k>=this._creatureXpBarInformation.maxLevel)this.showBarAtMaxLevel(),this.progressBar.setValue(1),this.onBarCompletelyFinishedAnimating.dispatch();else{(this._creatureXpBarInformation.levels[this._numTimesXpBarFilled]>Z.s.baseLevelRequiredForChargedLevels?this.showBarWithChargedLevels.bind(this):this.showBarAtNonMaxLevel.bind(this))(),this.progressBar.setValue(0),this.previewProgressBar.setValue(0),this.tweenBar()}}setXPBarToZero(){this.showBarAtNonMaxLevel(),this.progressBar.setValue(0)}showChargedLevelUnlockSequence(){this.showBarAtMaxLevel(),this.progressBar.setValue(1),this.onChargedLevelUnlocked.dispatch(),this._creatureXpBarInformation.levels.unshift(Z.s.baseLevelRequiredForChargedLevels),this._creatureXpBarInformation.starsRequiredForEachLevel.unshift(0),this._starsToAddToBar=this._starsEarned=this._creatureXpBarInformation.starsToAward,this._skipFakeAwardXp=!0}getChargedXpBarAnimations(){var k;const B=Y.e.getActivePlayerChargedLevelTier();return B===X.Bv.NO_CHARGE?null:null!==(k=F.CHARGED_LEVELS_TIER_ANIMATIONS[B])&&void 0!==k?k:null}playChargedTierUpgradeAnimations(k){var B;const U=this._creatureXpBarInformation.maxLevel,F=X.QT.MAX_NONMEMBER_CHARGED_LEVEL+U,G=X.QT.MAX_MEMBER_CHARGED_LEVEL+U;k!==F&&k!==G||(null===(B=this.gameObjectContext)||void 0===B||B.Container.rebind(Q.E.ShowTierUp).toConstantValue(!0),this.gameObject.findComponentsInChildren(W.B).forEach((k=>k.consume())))}showBarWithChargedLevels(){var k,B;this.progressBar.setFillColor("#A6FFFE"),this.previewProgressBar.setInnerColor("#5D8789"),this.previewProgressBar.setOuterColor("#612531"),this._maxLevelText.active=!1,null===(k=this.gameObjectContext)||void 0===k||k.Container.rebind(Q.E.ShowXpBar).toConstantValue(!0),null===(B=this.gameObjectContext)||void 0===B||B.Container.rebind(Q.E.LevelTierIdleAnimation).toConstantValue(this.getChargedXpBarAnimations()),this.gameObject.findComponentsInChildren(W.B).forEach((k=>k.consume()))}showBarAtMaxLevel(){this.progressBar.setFillColor("#A7E34E"),this.previewProgressBar.setInnerColor("#A7E34E"),this.previewProgressBar.setOuterColor("#2E573A"),this._maxLevelText.active=!0,this._canShowChargedLevels&&Y.e.getActivePlayerChargedLevelTier()===X.Bv.MAX_CHARGE&&(this._maxLevelText.findComponent(j.EYj).text=H.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MAX_CHARGE"))}showBarAtNonMaxLevel(k=!1){var B,U;this.progressBar.setFillColor("#F8CC38"),this.previewProgressBar.setInnerColor("#9D4539"),this.previewProgressBar.setOuterColor("#612531"),this._maxLevelText.active=!1,k||(null===(B=this.gameObjectContext)||void 0===B||B.Container.rebind(Q.E.ShowXpBar).toConstantValue(!1),null===(U=this.gameObjectContext)||void 0===U||U.Container.rebind(Q.E.LevelTierIdleAnimation).toConstantValue(X.Bv.NO_CHARGE),this.gameObject.findComponentsInChildren(W.B).forEach((k=>k.consume())))}destroy(){super.destroy(),this.onSetup.dispose(),this.onLevelUp.dispose(),this.onChargedLevelUnlocked.dispose(),this.onBarCompletelyFinishedAnimating.dispose(),this.onPreviewBarReachLevelUp.dispose()}};J.CHARGED_LEVELS_TIER_ANIMATIONS={[X.Bv.CHARGED]:"tier-2-idle",[X.Bv.MAX_CHARGE]:"tier-4-idle"},(0,G.Cg)([(0,j.Cdj)("62e-110e"),(0,G.Sn)("design:type",z.g)],J.prototype,"_chargedLevelsProgressManager",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],J.prototype,"runOnSetup",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],J.prototype,"levelText",void 0),(0,G.Cg)([(0,j.MnK)(q.a),(0,G.Sn)("design:type",q.a)],J.prototype,"progressBar",void 0),(0,G.Cg)([(0,j.MnK)(q.a),(0,G.Sn)("design:type",q.a)],J.prototype,"previewProgressBar",void 0),(0,G.Cg)([(0,j.MnK)(j.bE_),(0,G.Sn)("design:type",j.bE_)],J.prototype,"gameObjectContext",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],J.prototype,"onSetup",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],J.prototype,"onLevelUp",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],J.prototype,"onChargedLevelUnlocked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],J.prototype,"onBarCompletelyFinishedAnimating",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],J.prototype,"onPreviewBarReachLevelUp",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],J.prototype,"_maxLevelText",void 0),(0,G.Cg)([(0,j.MnK)(K.S),(0,G.Sn)("design:type",K.S)],J.prototype,"evolveButton",void 0),(0,G.Cg)([(0,j.MnK)(K.S),(0,G.Sn)("design:type",K.S)],J.prototype,"mergeButton",void 0),J=F=(0,G.Cg)([(0,j.EVk)("XpBar",V.Y.postBattleFlow)],J)},55346:(k,B,U)=>{"use strict";U.d(B,{fL:()=>gt});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(27842);let V=class extends G.uAl{constructor(){super(...arguments),this._lastPlayedMap=new Map,this._timesPlayedMap=new Map}playXpGain(){this.playSound(this._xpPlayer)}playMemberXpGain(){this.playSound(this._memberXpPlayer)}playXpParticleTrail(){this.playSound(this._xpParticleTrail)}playLevelUp(){this.playSound(this._levelUpPlayer)}playChargedLevelUp(){this.playSound(this._chargedLevelUpPlayer)}playChargedLevelUnlocked(){this.playSound(this._chargedLevelUnlocked)}playLevelUpCelebrationFanfare(){this.playSound(this._levelUpCelebrationFanfare)}playSpellLearned(){this.playSound(this._spellLearnedPlayer)}playStatGained(){this.playSound(this._statGainedPlayer)}playBarFilled(){this.playSoundSingular(this._barFillPlayer)}stopBarFilled(){this.stopSoundSingular(this._barFillPlayer)}playSound(k){const B=Date.now();B-(this._lastPlayedMap.has(k)?this._lastPlayedMap.get(k):0)>50&&(k.play(),this._lastPlayedMap.set(k,B))}playSoundSingular(k){k.isPlaying()||k.play();const B=this._timesPlayedMap.has(k)?this._timesPlayedMap.get(k):0;this._timesPlayedMap.set(k,B+1)}stopSoundSingular(k){if(!k.isPlaying())return void this._timesPlayedMap.set(k,0);const B=this._timesPlayedMap.has(k)?this._timesPlayedMap.get(k):0;B-1==0&&k.stop(),this._timesPlayedMap.set(k,B-1)}pauseBGM(){j.q.instance.prodigy.audio.pauseBGM()}resumeBGM(){j.q.instance.prodigy.audio.resumeBGM()}destroy(){this._lastPlayedMap.clear(),this._timesPlayedMap.clear(),super.destroy()}};(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_xpPlayer",void 0),(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_memberXpPlayer",void 0),(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_xpParticleTrail",void 0),(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_levelUpPlayer",void 0),(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_chargedLevelUpPlayer",void 0),(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_chargedLevelUnlocked",void 0),(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_levelUpCelebrationFanfare",void 0),(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_spellLearnedPlayer",void 0),(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_statGainedPlayer",void 0),(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_barFillPlayer",void 0),V=(0,F.Cg)([(0,G.EVk)("PostBattleFlowAudioController",$.Y.postBattleFlow)],V);U(59754),U(68788),U(81914),U(54234);var W=U(95057);let q=class extends G.uAl{create(){super.create(),this.pbfSegment=j.q.instance.prodigy.gameContainer.get("c47-20b6").postBattleFlow}sendButtonEvent(k,B){this.pbfSegment.sendButtonEvent(k,B)}sendChestOpenEvent(k){this.pbfSegment.sendChestOpenEvent(k)}sendChestFailedToOpenEvent(k,B){this.pbfSegment.sendChestFailedToOpenEvent(k,B)}sendStarJarFunnelStartEvent(){j.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:"NonMember-Star-Jar",category:"Star-Jar",contentId:this.pbfSegment.getBattleId(),adType:W.R.PostBattleBanner})}};q=(0,F.Cg)([(0,G.EVk)("PostBattleFlowSegment",G.YH6.ui)],q);var K=U(87490),z=U(99625),Y=U(50788),Q=U(49754),X=U(17446),Z=U(66582),J=U(77938),tt=U(96535),et=U(73797),it=U(53661),st=U(8770),nt=U(22023),at=U(80060),rt=U(44094),ot=U(30226),ht=U(91462),ct=U(76277),dt=U(10670),lt=U(71041),ut=U(53671),ft=U(50084),bt=U(86283),pt=U(43754),vt=U(99979);let gt=class extends G.uAl{get isRescued(){return this._isRescued}setup(k,B,U,F){this._petRescueUnitData=k,this._isRescued=k.battleStatus===K.EUnitBattleStatus.Rescued;const G=this._petRescueUnitData.cost;this._isFreeToRescue=void 0===G||0===G.value,this.setupPetInfo(),this._onPetRescued=U,this._rescuePetQueue=F,this.updateUI(),this.updateButtons(B),at.d.updateInjectedValues(this.GameObject,{[it.uo.PetRescued]:this._isRescued,[it.uo.EnableRescueButtonInput]:!this._isRescued})}setupPetInfo(){var k;const B=J.t.getItem("pet",this._petRescueUnitData.asset.id),U=vt.gI.getElementIconTexture(B.data.element);this._elementIcon.setTexture(U),this._petName.text=B.data.name;const F=null!==(k=B.data.rarity)&&void 0!==k?k:X.E.Common;this._petRarity.text=ot.J.convertRarityToText(F),this._petRarity.stroke=st.wB[F],this._newPetText.active=!bt.D.hasBeenRescuedPreviously(this._activePlayer,this._petRescueUnitData.asset.id),at.d.updateInjectedValues(this.GameObject,{PET_ID:B.ID})}updateUI(){const k=this._petRescueUnitData.cost;if(this._petRescuedFrontAnimation.active=this._isRescued,this._petRescuedBackAnimation.active=this._isRescued,this._rescuedAura.active=this._isRescued,this._magicoinRescueButton.amount=k?k.value:0,(0,ct.G)(Y.J)){this._mergeBarContainer.active=!0;const k=this._activePlayer.kennel.getPrimaryPetById(this._petRescueUnitData.asset.id);G.Aq$.isDefined(k)?this._mergeBar.setup(k,!0):this._mergeBar.setup({ID:this._petRescueUnitData.asset.id,level:this._petRescueUnitData.level},!0)}}updateButtons(k){at.d.updateInjectedValues(this.GameObject,{[it.uo.ShowFreeRescueButton]:this._isFreeToRescue,[it.uo.ShowMagicoinButton]:!this._isFreeToRescue&&!k,[it.uo.ShowMembershipButton]:!this._isFreeToRescue&&k})}rescueWithMagicoin(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this.performMagicoinRescue();this._rescuePetQueue&&(yield this._rescuePetQueue(k))}))}performMagicoinRescue(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._petRescueUnitData.cost;!k||this._hardCurrencyDataProvider.canAfford(k)?yield this.rescuePet(!1):this._activePlayer.canPurchaseMembershipInGame()?this.showInsufficientResourcePopup():j.q.instance.prodigy.open.messageBoxPrefab({text:"YOU_DONT_HAVE_ENOUGH_MAGICOIN",confirmCallback:()=>{this.setRescueButtonEnabled(!0)}})}))}rescuePet(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;const F=J.t.getItem("pet",this._petRescueUnitData.asset.id),$=rt.$.generateUID(),H=this._activePlayer.kennel.amountOfPet(F.ID),V=(0,ct.G)(Q.H),W={currency:27,value:V.magicoinCost};yield ft.a.rescuePet(k,{id:this._petRescueUnitData.asset.id,name:F.data.name,nickname:F.data.nickname,level:this._petRescueUnitData.level},$,V.enabled&&V.magicoinCost>0?W:void 0).catch((k=>{G.VyI.log("Failed to rescue pet",G.$bb.Error,k),this.sendPetCapturedFailedSegmentEvent("Rescue API Failed")})),j.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendBattlePetCapturedEvent({petName:null!==(B=this._petRescueUnitData.nickname)&&void 0!==B?B:F.data.name,petLevel:this._petRescueUnitData.level,petElement:F.data.element,petType:nt.P8.getPetEvolutionType(F.ID),petRarity:F.data.rarity,petRank:null!==(U=this._petRescueUnitData.mergeRank)&&void 0!==U?U:0,previousPetCopies:H,captureSource:dt.z2.PostBattle},{transaction_id:$}),this.updatePetRescuedUI()}))}updatePetRescuedUI(){this._isRescued=!0,this._onPetRescued(),at.d.updateInjectedValues(this.GameObject,{[it.uo.PetRescued]:!0})}openMembershipPage(){const k=this.gameObject.findComponentInParent(ht.M);if(k){j.q.instance.prodigy.game.broadcaster.addAppListener(et.H3.MembershipRewardsFlowComplete,this.handleMembershipRewardsFlowComplete,this),j.q.instance.prodigy.game.broadcaster.addAppListener(et.H3.MembershipResponseReceived,this.handleMembershipChange,this),k.onComplete.addOnce((()=>this.setRescueButtonEnabled(!0)));this._activePlayer.getMemberTier()===Z._$.NonMember?k.initiateMembershipPurchase():k.initiateMembershipPurchaseUpgradeWithIFrame().catch(G.RQr.createHandler("Failed to initiate membership upgrade purchase"))}else G.VyI.log("ProcessWebPurchaseComponent not found in parent hierarchy",G.$bb.Error)}showInsufficientResourcePopup(){var k,B,U,F;const G=J.t.getItem("pet",this._petRescueUnitData.asset.id);j.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:"Pet-Hard-Currency-Insufficient-Resources-Rescue",category:"Pet",contentId:`pet-${this._petRescueUnitData.asset.id}`,adType:W.R.Static});const $=this._baseLocalizer.getText("MAGICOIN");j.q.instance.prodigy.open.prefabMenu(z.l.EvolvedPet_InsufficientResources,void 0,void 0,void 0,void 0,{PET_RESCUE_ID:null==G?void 0:G.ID,PET_RESCUE_NAME:null===(k=null==G?void 0:G.data)||void 0===k?void 0:k.name,PET_RESCUE_RARITY:null===(B=null==G?void 0:G.data)||void 0===B?void 0:B.rarity,PET_RESCUE_LEVEL:null!==(F=null===(U=this._petRescueUnitData.level)||void 0===U?void 0:U.toString())&&void 0!==F?F:"Pet Name",[it.n7.InsufficientResource]:$}).onDestroy.addOnce((()=>{this.sendPetCapturedFailedSegmentEvent(`Insufficient ${$}`),this.setRescueButtonEnabled(!0)}))}sendPetCapturedFailedSegmentEvent(k){var B,U;const F=null===(B=J.t.getItem("pet",this._petRescueUnitData.asset.id))||void 0===B?void 0:B.data,G=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel;j.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendBattlePetCaptureFailedEvent({petName:null==F?void 0:F.name,petLevel:this._petRescueUnitData.level,petElement:null==F?void 0:F.element,petType:nt.P8.getPetEvolutionType(this._petRescueUnitData.asset.id),petRarity:null==F?void 0:F.rarity,petRank:null!==(U=this._petRescueUnitData.mergeRank)&&void 0!==U?U:0,failReason:k,previousPetCopies:G.amountOfPet(F.ID),captureSource:dt.z2.PostBattle})}handleMembershipChange(k){const B="success"===k;j.q.instance.prodigy.game.broadcaster.removeAppListener(et.H3.MembershipResponseReceived,this),B||j.q.instance.prodigy.game.broadcaster.removeAppListener(et.H3.MembershipRewardsFlowComplete,this)}handleMembershipRewardsFlowComplete(){return(0,F.sH)(this,void 0,void 0,(function*(){j.q.instance.prodigy.game.broadcaster.removeAppListener(et.H3.MembershipRewardsFlowComplete,this),yield this.rescuePet(!0),this.setRescueButtonEnabled(!1)}))}setRescueButtonEnabled(k){at.d.updateInjectedValues(this.gameObject,{[it.uo.EnableRescueButtonInput]:k})}destroy(){j.q.instance.prodigy.game.broadcaster.removeAppListener(et.H3.MembershipRewardsFlowComplete,this),j.q.instance.prodigy.game.broadcaster.removeAppListener(et.H3.MembershipResponseReceived,this)}};(0,F.Cg)([(0,G.Cdj)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],gt.prototype,"_baseLocalizer",void 0),(0,F.Cg)([(0,G.Cdj)("306-5359"),(0,F.Sn)("design:type",tt.W)],gt.prototype,"_activePlayer",void 0),(0,F.Cg)([(0,G.Cdj)("5c7-e02d"),(0,F.Sn)("design:type",pt.W)],gt.prototype,"_hardCurrencyDataProvider",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],gt.prototype,"_elementIcon",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],gt.prototype,"_petName",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],gt.prototype,"_mergeBarContainer",void 0),(0,F.Cg)([(0,G.MnK)(ut.J),(0,F.Sn)("design:type",ut.J)],gt.prototype,"_mergeBar",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],gt.prototype,"_petRarity",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],gt.prototype,"_newPetText",void 0),(0,F.Cg)([(0,G.MnK)(lt.Eo),(0,F.Sn)("design:type",lt.Eo)],gt.prototype,"_magicoinRescueButton",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],gt.prototype,"_rescuedAura",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],gt.prototype,"_petRescuedFrontAnimation",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],gt.prototype,"_petRescuedBackAnimation",void 0),gt=(0,F.Cg)([(0,G.EVk)("RescuablePet",$.Y.postBattleFlow)],gt);U(50475);var mt=U(36648),yt=U(34829);let _t=class extends G.uAl{constructor(){super(...arguments),this._source=mt.q.Xp_stardust,this._autoRun=!1,this.onStartParticles=new G.HN0,this.onStopParticles=new G.HN0}create(){super.create(),this._autoRun&&this.run()}run(k=!1){if(k){const k=j.q.instance.prodigy.game.time.events.loop(yt.s.TARGET_FPS_40_MS,this.gameObject.update,this.gameObject);this.gameObject.onDestroy.addOnce((()=>j.q.instance.prodigy.game.time.events.remove(k)))}const B=new G.Qgu,U=new G.mYY;U.point1.setTo(this._linePoint1.x,this._linePoint1.y),U.point2.setTo(this._linePoint2.x,this._linePoint2.y);const F=new G.ZxM;F.life.setMinMax(this._lifespan.x,this._lifespan.y),F.life.type=G.UvC.Random;const $=new G.U8B;this.particleTargetDirection?$.angle.setMinMax(this.getAngle()*G.cj9.RAD_TO_DEG,this.getAngle()*G.cj9.RAD_TO_DEG):$.angle.setMinMax(this._angle.x*G.cj9.RAD_TO_DEG,this._angle.y*G.cj9.RAD_TO_DEG),$.angle.type=G.UvC.PhasePerSample,$.speed.setMinMax(this._speed.x,this._speed.y);const H=new G.hQR;H.scale.setMinMax(this._scale.x,this._scale.y);const V=new G.m$y;V.endAlpha=this._alpha.x,V.startAtLifePercentage=this._alpha.y,j.q.instance.prodigy.load.assets([mt.q.Xp_stardust],(()=>{B.imageGuid=this._source,this._frame&&(B.frame=this._frame),this._particleSystem=this.gameObject.addComponent(G.okU),this._particleSystem.emitPerSecond.setMinMax(this._particlePerSecond,this._particlePerSecond),this._particleSystem.initializers=[B,U,F,$,H],this._particleSystem.behaviours=[V],this.onStartParticles.dispatch()}))}stopParticles(){var k,B;this._particleSystem&&(null===(B=null===(k=this._particleSystem)||void 0===k?void 0:k.emitPerSecond)||void 0===B||B.setMinMax(0,0),this.onStopParticles.dispatch())}getAngle(){const k=new G.I9Y(this.particleTargetDirection.transform.worldPosition.x,this.particleTargetDirection.transform.worldPosition.y);k.subtract(this.gameObject.transform.worldPosition),k.normalize();let B=Math.acos(k.y);return k.x<0&&(B*=-1),B}destroy(){var k;this.stopParticles(),null===(k=this._particleSystem)||void 0===k||k.destroy(),this._particleSystem=null,this.onStartParticles.dispose(),this.onStopParticles.dispose(),super.destroy()}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],_t.prototype,"particleTargetDirection",void 0),(0,F.Cg)([(0,G.Bak)(),(0,G.W_S)(),(0,F.Sn)("design:type",String)],_t.prototype,"_source",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],_t.prototype,"_frame",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],_t.prototype,"_particlePerSecond",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],_t.prototype,"_lifespan",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],_t.prototype,"_speed",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],_t.prototype,"_angle",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],_t.prototype,"_linePoint1",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],_t.prototype,"_linePoint2",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],_t.prototype,"_scale",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],_t.prototype,"_alpha",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],_t.prototype,"_autoRun",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],_t.prototype,"onStartParticles",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],_t.prototype,"onStopParticles",void 0),_t=(0,F.Cg)([(0,G.EVk)("XpParticleTrail",$.Y.postBattleFlow)],_t)},85773:(k,B,U)=>{"use strict";U.d(B,{b:()=>Q});var F=U(8674),G=U(87490),j=U(62459),$=U(82351),H=(U(34829),U(35757)),V=U(57502),W=U(13956),q=U(22023),K=U(30226);const z=JSON.parse('{"nootBattleTips":[{"dialogueId":1827,"showCriteria":"mergeAvailable"},{"dialogueId":1828,"showCriteria":"evolutionAvailable"},{"dialogueId":1829,"showCriteria":"elementalTypeWeakness"},{"dialogueId":1830},{"dialogueId":1831},{"dialogueId":1832},{"dialogueId":1833},{"dialogueId":1834},{"dialogueId":1835,"showCriteria":"schoolOnly"}]}');var Y;let Q=Y=class extends j.uAl{constructor(){super(...arguments),this._teamPets=[]}setup(k,B){this._teamPets=k,this._nootTipBattleInfo=B;const U=this.filterTips(this.processNootBattleTips()),F=Math.floor(Math.random()*U.length);this.assignTip(U[F])}processNootBattleTips(){return z.nootBattleTips.map((k=>({dialogueId:k.dialogueId,showCriteria:k.showCriteria})))}filterTips(k){return k.filter((k=>"mergeAvailable"===k.showCriteria?this._teamPets.some((k=>q.P8.canPetMerge(k.data))):"evolutionAvailable"===k.showCriteria?this._teamPets.some((k=>q.P8.canPetEvolve(k,k.getLevel()))):"schoolOnly"===k.showCriteria?K.J.isDateWithinSchoolDayAndHours():"elementalTypeWeakness"!==k.showCriteria||j.Aq$.isDefined(this._nootTipBattleInfo.enemyElementWeakness)))}assignTip(k){const B=(new H.u).get(k.dialogueId);"elementalTypeWeakness"===k.showCriteria?(this._textComponent.text=this._localizer.getText(B.textKey,this._nootTipBattleInfo.enemyElementWeakness),this._dialogueAudio={tag:Y.NOOT_VO_ELEMENTAL_WEAKNESS[this._nootTipBattleInfo.enemyElementWeakness]}):(this._textComponent.text=this._localizer.getText(B.textKey),this._dialogueAudio=B.audio)}playTipAudio(){this._playDialogueAudioComponent.playAudioData(this._dialogueAudio)}};Q.NOOT_VO_ELEMENTAL_WEAKNESS={[G.EElementType.Plant]:$.B.Voice_PostBattle_LossFlow_Noot_03_plant,[G.EElementType.Fire]:$.B.Voice_PostBattle_LossFlow_Noot_04_fire,[G.EElementType.Water]:$.B.Voice_PostBattle_LossFlow_Noot_05_water,[G.EElementType.Storm]:$.B.Voice_PostBattle_LossFlow_Noot_06_storm,[G.EElementType.Astral]:$.B.Voice_PostBattle_LossFlow_Noot_07_astral,[G.EElementType.Shadow]:$.B.Voice_PostBattle_LossFlow_Noot_08_shadow},(0,F.Cg)([(0,W.b)(j.$Bt.LocalizationService),(0,F.Sn)("design:type",j.dTp)],Q.prototype,"_localizer",void 0),(0,F.Cg)([(0,j.MnK)(j.EYj),(0,F.Sn)("design:type",j.EYj)],Q.prototype,"_textComponent",void 0),(0,F.Cg)([(0,j.MnK)(V.W),(0,F.Sn)("design:type",V.W)],Q.prototype,"_playDialogueAudioComponent",void 0),Q=Y=(0,F.Cg)([(0,j.EVk)("NootBattleTip")],Q)},56718:(k,B,U)=>{"use strict";U.d(B,{S:()=>W});var F=U(62459),G=U(77601),j=U(28628);const $=(0,G.gb)({key:"fab-post-loss-flow",activateAssociatedExperiments:0,default:!1}),H=[j.gu.Basic,j.gu.FireflyQ2Miniboss,j.gu.FireflyQ3Miniboss,j.gu.FireflyQ8TriptropTrio,j.gu.FireflyQ12Gerald,j.gu.SkywatchCloudMiniboss,j.gu.SkywatchCloudBoss,j.gu.SkywatchQ11Bitbots,j.gu.SkywatchQ6Swarm,j.gu.ShiverchillQ6Ghosts,j.gu.ShiverchillQ7IceWyrm,j.gu.ShiverchillQ13IceWyrm,j.gu.BonfireQ12Guardian,j.gu.BonfireQ13Cebollini,j.gu.ShipwreckQ11OldOne,j.gu.EndgamePippet,j.gu.EndGameGuardianFirefly,j.gu.EndGameGuardianShiverchill,j.gu.EndGameGuardianSkywatch,j.gu.EndGameGuardianBonfire,j.gu.EndGameGuardianShipwreck,j.gu.EndGamePuppetMaster];var V=U(76277);class W{static isPostLossFlowAvailable(k){return(0,V.G)($)&&H.includes(k)}static combineRewards(k){const B=[];return k.forEach((k=>{const U=B.findIndex((B=>F.Aq$.isDefined(null==k?void 0:k.N)&&B.type===k.type&&("gold"===k.type||B.ID===k.ID)));U>=0?B[U].N+=k.N:B.push(k)})),B}}},20117:(k,B,U)=>{"use strict";U.d(B,{tN:()=>F,w5:()=>H});var F,G,j=U(22023),$=U(77938);!function(k){k.PetInSlot="PET_IN_SLOT",k.ShowCta="SHOW_CTA",k.PetID="PET_ID",k.PetGear="PET_GEAR",k.CtaTipArgs="CTA_TIP_ARGS",k.CloseCTA="CLOSE_CTA",k.CloseAllCTAs="CLOSE_ALL_CTA",k.OnCtasCompleted="ON_CTAS_COMPLETED"}(F||(F={})),function(k){k.ButtonCallback="BUTTON_CALLBACK",k.ButtonText="BUTTON_TEXT",k.CurrentEvolution="CURRENT_PET_ASSET_ID",k.NextEvolution="NEXT_PET_ASSET_ID",k.CurrentLevelText="CURRENT_LEVEL",k.NextLevelText="NEXT_LEVEL",k.CurrentMergeRank="CURRENT_MERGE_RANK",k.NextMergeRank="NEXT_MERGE_RANK"}(G||(G={}));class H{static getMergeCtaArgs(k,B){const U=k.pet.data.mergeRank;return{type:0,buttonCallback:B.openMergeModal.bind(B,k),currentMergeRank:U,nextMergeRank:U+1}}static getEvolutionCtaArgs(k,B){const{pet:U}=k,F=$.t.getItem("pet",U.data.ID),G=j.P8.findNextEvolution(F);return{type:2,buttonCallback:B.openEvolutionMenu.bind(B,k),currentEvoID:F.ID,nextEvoID:G.ID}}static GetInjectionValuesForCtaTipContent(k){switch(k.type){case 0:return H.GetMergeCtaTipInjectionValues(k);case 2:return H.GetEvolveCtaTipInjectionValues(k);case 1:return H.GetLevelUpCtaTipInjectionValues(k);default:return{}}}static GetCtaTipButtonInjectionValues(k){return Object.assign(Object.assign({},k.buttonText&&{[G.ButtonText]:k.buttonText}),k.buttonCallback&&{[G.ButtonCallback]:k.buttonCallback})}static GetEvolveCtaTipInjectionValues(k){return Object.assign(Object.assign({},H.GetCtaTipButtonInjectionValues(k)),{[G.CurrentEvolution]:k.currentEvoID,[G.NextEvolution]:k.nextEvoID})}static GetMergeCtaTipInjectionValues(k){return Object.assign(Object.assign({},H.GetCtaTipButtonInjectionValues(k)),{[G.CurrentMergeRank]:k.currentMergeRank,[G.NextMergeRank]:k.nextMergeRank})}static GetLevelUpCtaTipInjectionValues(k){return Object.assign(Object.assign({},H.GetCtaTipButtonInjectionValues(k)),{[G.CurrentLevelText]:k.currentLevel,[G.NextLevelText]:k.nextLevel})}}},96217:(k,B,U)=>{"use strict";U.d(B,{Q:()=>et});var F,G=U(8674),j=U(62459),$=U(35120),H=U(1195),V=U(63834),W=U(73797),q=U(41674),K=U(13956),z=U(94236),Y=U(53661),Q=U(22023),X=U(80060),Z=U(11848),J=U(85773),tt=U(20117);!function(k){k.TryAgainCallback="TRY_AGAIN_CALLBACK",k.ContinueCallback="CONTINUE_CALLBACK",k.NootTipText="NOOT_TIP_TEXT",k.NootTipExtended="NOOT_TIP_EXTENDED"}(F||(F={}));let et=class extends j.uAl{constructor(){super(...arguments),this._teamSlotContainers=[],this._teamSlotPetCta=[],this._teamPets=[],this._canAccessMergeFeature=Q.P8.canPlayerAccessPetMergeFeature()&&Z.N.hasSeenPetMergeFTUE(),this._getCtaFunctions=new Map([[0,[k=>this._canAccessMergeFeature&&Q.P8.canPetAccessMergeRanks(k.data.ID)&&Q.P8.canPetMerge(k.data),k=>tt.w5.getMergeCtaArgs(k,this)]],[2,[k=>!!k&&Q.P8.canPetEvolve(k,k.getLevel()),k=>tt.w5.getEvolutionCtaArgs(k,this)]]])}postCreate(){super.postCreate(),$.q.instance.prodigy.game.broadcaster.addAppListener(W.ig.EvolveEnd,this.onPetEvolved,this)}setUpScreen(k){this._playerContainer.active=!0,this._hasOpenCTAs=!1,this._teamSlotContainers.forEach(((k,B)=>{this._teamSlotPetCta.push({index:B,container:k})})),this._teamPets=k.teamUids?k.teamUids.map((k=>new V.r($.q.instance.prodigy.game,this._loggedInPlayer.player.kennel.getPetByUniqueID(k)))):this._loggedInPlayer.player.kennel.getPetTeam(!1),this._nootTipBattleInfo=k.nootTipBattleInfo,this._nootBattleTipComponent.setup(this._teamPets,this._nootTipBattleInfo),this.updateTeamSlots(this._teamPets);const B=Object.assign(Object.assign(Object.assign({},this.getNootTipInjections(!this._hasOpenCTAs)),{[F.ContinueCallback]:k.continueCallback.bind(this)}),k.tryAgainCallback&&{[F.TryAgainCallback]:k.tryAgainCallback.bind(this)});X.d.updateInjectedValues(this.gameObject,B),this._nootBattleTipComponent.playTipAudio()}updateTeamSlots(k){this._teamSlotPetCta.forEach(((B,U)=>{const F=k[U];F&&(B.pet=F,this.updateTeamSlot(B))}))}updateTeamSlot(k){var B,U;const{pet:F,container:G}=k;if(!F)return;const j={contentArgs:[]};let $={[tt.tN.PetInSlot]:Q.P8.isPetOnTeam(F.data),[tt.tN.PetID]:F.data.ID,[tt.tN.PetGear]:F.data.gear,[tt.tN.OnCtasCompleted]:this.onAllCTAsComplete.bind(this),[Y.hi.SpinePetEvolveIdle]:Q.P8.canPetEvolve(F,F.getLevel())},H=!1;for(const[V,W]of this._getCtaFunctions){W[0](F)&&(H=!0,null!==(B=j.startingType)&&void 0!==B||(j.startingType=V),null===(U=j.contentArgs)||void 0===U||U.push(W[1](k)))}this._hasOpenCTAs||(this._hasOpenCTAs=H),$=Object.assign(Object.assign(Object.assign({},$),{[tt.tN.ShowCta]:H}),H&&{[tt.tN.CtaTipArgs]:j}),X.d.updateInjectedValues(G,$)}getNootTipInjections(k){return{[F.NootTipExtended]:k}}updateOrCloseCtaOfType(k,B,U){const[F,G]=this._getCtaFunctions.get(k),{pet:j,container:$}=B,H=F(j);let V=Object.assign({},U);if(H){const k={contentArgs:[G(B)]};V=Object.assign(Object.assign({},V),{[tt.tN.CtaTipArgs]:k}),this._hasOpenCTAs=!0}else V=Object.assign(Object.assign({},V),{[tt.tN.CloseCTA]:!1});X.d.updateInjectedValues($,V)}openMergeModal(k){$.q.instance.prodigy.open.petMergeMenu(k.pet.data,q.k.PostBattleLose).onPetMergeSuccess.addOnce((()=>this.onPetMerged(k)))}validateTeam(){const k=this._loggedInPlayer.player.kennel.getPetTeam(!1);this._teamSlotPetCta.forEach((B=>{const U=k.find((k=>{var U;return k.data.uniqueID===(null===(U=B.pet)||void 0===U?void 0:U.data.uniqueID)}));U?B.pet=U:(B.pet=void 0,X.d.updateInjectedValues(B.container,{[tt.tN.CloseAllCTAs]:!1,[tt.tN.PetInSlot]:!1}))})),this._teamPets=k}onPetMerged(k){this.validateTeam(),this.updateOrCloseCtaOfType(0,k)}openEvolutionMenu(k){z.K.openEvolutionPromptIfEligible(k.pet,null,!1,q.k.PostBattleLose).catch(j.RQr.createHandler("Failed to open evolution prompt"))}onPetEvolved(k){const B=this._teamSlotPetCta.find((B=>{var U;return(null===(U=B.pet)||void 0===U?void 0:U.data.uniqueID)===k}));B&&(this.validateTeam(),this.updateOrCloseCtaOfType(2,B),this._teamSlotPetCta.forEach((k=>{k.pet&&this.updateTeamSlot(k)})),X.d.updateInjectedValues(this.gameObject,this.getNootTipInjections(!this._hasOpenCTAs)))}onAllCTAsComplete(){this._hasOpenCTAs?this._hasOpenCTAs=!1:X.d.updateInjectedValues(this.gameObject,this.getNootTipInjections(!0))}destroy(){$.q.instance.prodigy.game.broadcaster.removeAppListener(W.ig.EvolveEnd,this),this._teamSlotContainers=[],this._teamSlotPetCta=[],super.destroy()}};(0,G.Cg)([(0,K.b)("e20-0fb0"),(0,G.Sn)("design:type",H.E)],et.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],et.prototype,"_teamSlotContainers",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_playerContainer",void 0),(0,G.Cg)([(0,j.MnK)(J.b),(0,G.Sn)("design:type",J.b)],et.prototype,"_nootBattleTipComponent",void 0),et=(0,G.Cg)([(0,j.EVk)("PostLossFlowUpgradeScreen")],et)},79368:(k,B,U)=>{"use strict";U.d(B,{k:()=>Pt});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U.n($),V=U(70472),W=U(6670),q=U(58776),K=U(62886),z=U(29891),Y=U(35120),Q=U(88355);class X extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B;setTimeout((()=>Y.q.instance.game.broadcaster.broadcast(`Prodigy.Events.${k.category}.${k.event}`)),null!==(B=k.timeout)&&void 0!==B?B:0)}))}}var Z=U(52191);class J extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){Y.q.instance.prodigy.game.input.enabled=k.enabled}))}}var tt=U(96165);class et extends tt.I{doTask(k){const B=Object.create(null,{doTask:{get:()=>super.doTask}});return(0,F.sH)(this,void 0,void 0,(function*(){const U=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=k.itemDrops.reduce(((k,B)=>{var F,j;if(!H().isNumber(B.ID)||!H().isString(B.type))return G.VyI.log("EnsureHasItemTaskHandler: Invalid item drop data",G.$bb.Warning),k;let $=null!==(F=B.N)&&void 0!==F?F:1;"key"===B.type&&$>1&&($=1);const V=$-(null!==(j=U.getItemCount(B.type,B.ID))&&void 0!==j?j:0);return V>0&&k.push(Object.assign(Object.assign({},B),{N:V})),k}),[]);if(0===F.length)return;const j=Object.assign(Object.assign({},k),{itemDrops:F});yield B.doTask.call(this,j)}))}}var it=U(97806),st=U(52269),nt=U(99625),at=U(80060);class rt extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){k.leaveNetworkZone&&Y.q.instance.prodigy.gameContainer.get("c97-bd0d").leaveZone(),yield at.d.loadWithInjectedValuesAndDependenciesFromGUID(Y.q.instance.prodigy.gameContainer.get("d0e-64fd"),k.guid,k.injectedValues).catch(G.RQr.createHandler(`[LoadPrefabCompleteHandler] Could not load prefab: ${nt.l[k.guid]}`))}))}}var ot=U(1195),ht=U(73797),ct=U(13956),dt=U(34616),lt=U(82271);class ut extends tt.I{doTask(k){const B=Object.create(null,{doTask:{get:()=>super.doTask}});return(0,F.sH)(this,void 0,void 0,(function*(){if(this._loggedInPlayer.isMember())return B.doTask.call(this,k);const U=Y.q.instance.prodigy.game;(yield this._memberJarNetworkHandler.getMemberJarData()).savedBattleCount>=dt.N.maximumSavedBattleCount?U.broadcaster.broadcast(ht.oI.ItemsLost,U,k.itemDrops):U.broadcaster.broadcast(ht.oI.ItemsSaved,U,k.itemDrops)}))}}(0,F.Cg)([(0,ct.b)("e20-0fb0"),(0,F.Sn)("design:type",ot.E)],ut.prototype,"_loggedInPlayer",void 0),(0,F.Cg)([(0,ct.b)("097-a053"),(0,F.Sn)("design:type",lt.S)],ut.prototype,"_memberJarNetworkHandler",void 0);class ft extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){return new Promise((B=>{var U,F,j,$;const H=Y.q.instance.prodigy.gameContainer.get("b5b-6fa4"),V=Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),W=V.getText(null!==(U=k.yesButtonLocalizationKey)&&void 0!==U?U:"BUTTON_OKAY_CAPITAL"),q=V.getText(null!==(F=k.noButtonLocalizationKey)&&void 0!==F?F:"NOT_NOW_CAPITAL"),K=Y.q.instance.prodigy.world;H.addEvents([{dialogueData:H.dataProvider.get(k.dialogueID),blockInput:!0,yes:K.it.bind(K,k.targetMapTag,null===(j=k.position)||void 0===j?void 0:j.x,null===($=k.position)||void 0===$?void 0:$.y),nextButtonText:q,yesButtonText:W,isCancelButtonVisible:!0}]),H.start(!0,B,k.reenableInputOnClose,k.clearExistingDialogue)}))}))}}var bt=U(61468),pt=U(43531);class vt extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){return new Promise((B=>{pt.rD.runDialogueSequence(bt.l.guaranteeArray(k.dialogueIDs),B,k.reenableInputOnClose,k.clearExistingDialogue)}))}))}}var gt=U(65240),mt=U(77938);class yt extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=Y.q.instance.prodigy.gameContainer.get("c47-20b6");for(const F of k.itemDrops){if(!F.ID){G.VyI.log(`ItemDrop ID is undefined for type: ${F.type}. Skipping removal.`,G.$bb.Error);continue}B.backpack.consume(F.type,F.ID,F.N);const j=mt.t.getItem(F.type,F.ID);U.item.sendItemRemovedEvent(j.ID,j.name,j.type,F.N,this.getCustomSegmentData(j,k.sourceType))}null==B||B.forceSaveCharacter()}))}getCustomSegmentData(k,B){const U={sink_type:gt.C.RemoveUnsecureItem,sink_id:k.ID,source_type:B};if(B===gt.C.FestivalCurrencyReset){const k=Y.q.instance.prodigy.gameContainer.get("12b-405a"),B=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily;U.instance_type=k.getActiveFestivalName()||"unknown festival",U.instance_id=B.getFestivalInstanceName()}return U}}class _t extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){Y.q.instance.prodigy.gameContainer.get("c47-20b6").sendCustomEvent(k.segmentEventType,k.segmentEventData)}))}}var Et=U(41674);class wt extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=Y.q.instance.prodigy.gameContainer.get("c47-20b6");if(k.funnelStepId){const U={funnelName:"player_goals",funnelType:"feature",stepName:k.stepName},F={step_index:k.funnelStepId};B.playerProgression.sendFunnelAdvancedEvent(U,F)}if(k.goalId){const U=k.goalName;B.economy.sendGoalAchievedEvent(U,k.goalId.toString(),Et.yO.Ftue,Et.ss.FtueGoals,!1)}}))}}class Tt extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield Y.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(k.eventType,k.eventData)}))}}class St extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){Y.q.instance.prodigy.notifications.initGenericNotification(k.notificationType)}))}}var At=U(34454);class Ct extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=new G._mx;At.w.startTaskCompleteDialogue(B,k.petID,this._questID)}))}}class Ot extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=Y.q.instance.prodigy.world;if(B.getCurrentMap()===k.targetMapTag&&!k.allowSameMapWarp)return;const U=new Promise((U=>{var F,G;B.it(k.targetMapTag,null===(F=k.position)||void 0===F?void 0:F.x,null===(G=k.position)||void 0===G?void 0:G.y,void 0,{shutdownLoadState:!1,callback:()=>{U()}})}));k.awaitLoad&&(yield U,k.loadTimeout&&(k.disablePopups&&Y.q.instance.prodigy.notifications.pause(this),Y.q.instance.prodigy.game.input.enabled=!1,yield new Promise((B=>setTimeout(B,k.loadTimeout))),Y.q.instance.prodigy.game.input.enabled=!0,k.disablePopups&&Y.q.instance.prodigy.notifications.resume(this)))}))}}class It extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B;yield Y.q.instance.prodigy.gameContainer.get("7a1-ff33").queueStoreOfferTrigger(k.offerId,null!==(B=k.instantTrigger)&&void 0!==B&&B)}))}}const Dt={[z.s.COMPLETE_TUTORIAL]:Z.G,[z.s.GOT_ITEM]:tt.I,[z.s.ENSURE_ITEM]:et,[z.s.GOT_PET]:st.uu,[z.s.MEMBER_JAR_GOT_ITEM]:ut,[z.s.GIVE_ULTIMATE]:it.N,[z.s.LOAD_PREFAB]:rt,[z.s.ENABLE_INPUT]:J,[z.s.OFFER_TELEPORT]:ft,[z.s.PLAY_DIALOGUE]:vt,[z.s.SHOW_COLLECTED_ITEM]:Ct,[z.s.SEND_PLAYER_GOALS_SEGMENT_EVENT]:wt,[z.s.SEND_CUSTOM_SEGMENT_EVENT]:_t,[z.s.SEND_TOASTER_NOTIFICATION]:St,[z.s.REMOVE_UNSECURE_ITEM]:yt,[z.s.TELEPORT_TO_MAP]:Ot,[z.s.TRIGGER_STORE_OFFER]:It,[z.s.SEND_QUEST_EVENT_VIA_HUB]:Tt,[z.s.BROADCAST]:X};var Rt=U(56567);let Pt=class{constructor(){this.onQuestTaskStart=new G.HN0,this.onQuestTaskComplete=new G.HN0,this._getProgressDirty=!1,this._tags=[]}setup(){return(0,F.sH)(this,void 0,void 0,(function*(){}))}getQuestData(k){return(0,F.sH)(this,void 0,void 0,(function*(){const{active:B,inactive:U}=yield this.fetchQuestData();return B.has(k)||U.has(k)?B.get(k)||U.get(k):(G.VyI.log(`Tried getting quest data for quest ${k} but it doesn't exist.`,G.$bb.Warning),null)}))}forceEnableDataUpdate(){this._getDataPromise=null}fetchQuestData(){return(0,F.sH)(this,void 0,void 0,(function*(){if(G.Aq$.isDefined(this._getDataPromise))return this._getDataPromise;const k={tags:this._tags};return this._getDataPromise=new Promise(((B,U)=>{this._questNetworkHandler.getQuestData(k).then((k=>{const U=new Map,F=new Map;k.activeQuests.forEach((k=>{U.set(k.id,k)})),k.inactiveQuests.forEach((k=>{F.set(k.id,k)})),B({active:U,inactive:F})})).catch((k=>{this.forceEnableDataUpdate(),U(new Error(k))}))})),this._getDataPromise}))}getQuestProgress(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.getQuestData(k);if(!B)return G.VyI.log(`No quest progress available for ${k} because the quest data doesn't exist.`,G.$bb.Warning),null;const{active:U,inactive:F}=yield this.fetchQuestProgress(),j=U.get(k)||F.get(k);return(yield W.f.preprocessQuestProgress(B,j)).fullProgress}))}getRawQuestProgress(k){return(0,F.sH)(this,void 0,void 0,(function*(){const{active:B,inactive:U}=yield this.fetchQuestProgress();return B.get(k)||U.get(k)||null}))}preloadQuestProgress(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.fetchQuestProgress()}))}questProgressHasBeenLoaded(){return G.Aq$.isDefined(this._getProgressPromise)}fetchQuestProgress(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._getProgressDirty&&G.Aq$.isDefined(this._getProgressPromise))return this._getProgressPromise;const k=!G.Aq$.isDefined(this._getProgressPromise),B={tags:this._tags};return this._getProgressPromise=new Promise(((U,F)=>{this._questNetworkHandler.getQuestProgress(B).then((B=>{this._getProgressDirty=!1;const F=new Map,j=new Map;B.activeQuests.forEach((k=>{F.set(k.id,k)})),B.inactiveQuests.forEach((k=>{j.set(k.id,k)})),U({active:F,inactive:j}),k&&this.sendQuestEvent(K.T.NONE,{}).catch(G.RQr.createHandler(`Error sending NONE quest event. ${JSON.stringify(this._tags)}`))})).catch((k=>{this._getProgressDirty=!0,F(new Error(k))}))})),this._getProgressPromise}))}processQuestProgressResponse(k){return(0,F.sH)(this,arguments,void 0,(function*(k,B={}){var U,F,j,$,H,V,K,z,Y,Q,X;const{active:Z,inactive:J}=yield this.fetchQuestProgress();for(const tt of k.activeQuests){if((null===(U=Z.get(tt.id))||void 0===U?void 0:U.status)===q.t.COMPLETE)continue;const k=yield this.getQuestData(tt.id);if(!G.Aq$.isDefined(k))continue;const J=null!==(j=null===(F=Z.get(tt.id))||void 0===F?void 0:F.tasks)&&void 0!==j?j:[],et=new Set,it=new Map,st=[];J.forEach((B=>{var U;if(B.status===q.t.COMPLETE){et.add(B.id);const F=k.tasks.find((k=>k.id===B.id));(null===(U=null==F?void 0:F.metadata)||void 0===U?void 0:U.isExperimentGate)&&st.push(B.id)}it.set(B.id,B)}));const nt={};if(tt.status!==q.t.COMPLETE&&tt.tasks)for(const B of tt.tasks)if(B.status!==q.t.COMPLETE&&(null===($=B.data)||void 0===$?void 0:$.timesCompleted)>0){const k=it.get(B.id);(null!==(V=null===(H=null==k?void 0:k.data)||void 0===H?void 0:H.timesCompleted)&&void 0!==V?V:0)<(null===(K=B.data)||void 0===K?void 0:K.timesCompleted)&&(nt[B.id]=(null===(z=B.data)||void 0===z?void 0:z.timesCompleted)-(null!==(Q=null===(Y=null==k?void 0:k.data)||void 0===Y?void 0:Y.timesCompleted)&&void 0!==Q?Q:0))}for(const U of k.tasks){if(!U)continue;if(et.has(U.id))continue;const F=U.id;let j=0,$=[];if(nt[F]?j=nt[F]:tt.status===q.t.COMPLETE?j=1:($=W.f.getTasksOfStatus(tt.tasks,q.t.COMPLETE),$.includes(F)&&(j=1)),j>0){if(U.metadata&&(U.metadata.parentCompleted=tt.status===q.t.COMPLETE),!J[U.id]||W.f.shouldProcessOnCompleteHandlers(J[U.id]))for(let k=0;kW.f.isPrerequisiteValid(B,k,st,U))).every((k=>$.includes(k)))&&this.onQuestTaskStart.dispatch(U)}Z.set(tt.id,tt)}for(const G of k.inactiveQuests)J.set(G.id,G)}))}getQuestTasks(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.getQuestData(k);if(null===B)return[];const U=yield this.getQuestProgress(k),F=[];if(null==U?void 0:U.tasks)for(const G of B.tasks)for(const B of U.tasks)if(B.id===G.id){F.push(new V.A(k,G,B));break}return F}))}getTasksInProgress(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){var F;const G=yield this.fetchQuestData();let j=[];const $=null!=B?B:Array.from(G.active.keys());for(const B of $){const $=null!==(F=G.active.get(B))&&void 0!==F?F:G.inactive.get(B);if((null==k?void 0:k.length)>0&&!this.questDataHasTags($,k))continue;const H=yield this.getQuestProgress(B),V=yield W.f.getTasksInProgress($,H,new Rt.f(null==U?void 0:U.params));j=j.concat(V)}return j}))}isTaskInProgress(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.getTasksInProgress(void 0,[k])).some((k=>k.taskID===B))}))}isTaskCompleted(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){var F,G,j;const $=yield this.getQuestProgress(k),H=null===(F=null==$?void 0:$.tasks)||void 0===F?void 0:F.find((k=>k.id===B)),V=(null==H?void 0:H.status)===q.t.COMPLETE,W=!!U&&(null!==(j=null===(G=null==H?void 0:H.data)||void 0===G?void 0:G.timesCompleted)&&void 0!==j?j:0)>0;return V||W}))}getQuestStatus(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B;const U=yield this.getQuestProgress(k);return null!==(B=null==U?void 0:U.status)&&void 0!==B?B:null}))}getOverallProgress(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.fetchQuestData(),B=[],U=Array.from(k.active.keys()).concat(Array.from(k.inactive.keys()));for(const F of U)B.push(yield this.getQuestProgress(F));return B}))}sendQuestEvent(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=this._segment.quests.beginQuestEventTransaction();try{if((yield this.shouldSendQuestEvents([k],B,U)).some((B=>B===k))){this._sendQuestEventPromise=this._questNetworkHandler.sendQuestEvent({eventType:k,eventData:B,questIDs:U,tags:this._tags});const F=yield this._sendQuestEventPromise;return yield this.processQuestProgressResponse(F),F}return{activeQuests:[],inactiveQuests:[]}}finally{F.flush({})}}))}preSendQuestEventViaHub(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){if((yield this.shouldSendQuestEvents([k],B)).some((B=>B===k))){const k=this.getCurrentQuestID();return{manager:this,questIDs:void 0!==k?[k]:yield this.getAllActiveQuestIDs(),tags:this._tags}}return{manager:this,questIDs:[],tags:[]}}))}postSendQuestEventViaHub(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){k&&(yield this.processQuestProgressResponse(k))}))}shouldSendQuestEvents(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=yield this.getTasksInProgress(void 0,void 0,B),G=[];for(const j of k)F.some((k=>!(Array.isArray(U)&&U.length>0&&!U.includes(k.questID))&&k.shouldSendEvent(j,B)))&&G.push(j);return G}))}getQuestMetaData(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.getQuestData(k);return null==B?void 0:B.metadata}))}updateQuestProgress(k){return(0,F.sH)(this,void 0,void 0,(function*(){try{const B=k?{questIDs:[k],tags:this._tags}:{tags:this._tags},U=yield this._questNetworkHandler.getQuestProgress(B);(U.activeQuests.length>0||U.inactiveQuests.length>0)&&(yield this.processQuestProgressResponse(U))}catch(B){throw this._getProgressDirty=!0,B}}))}getQuestIDsFromItem(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=yield this.getTasksInProgress(),F=[];return U.forEach((U=>{U.taskDefinition.completionRequirements.type===K.T.COLLECT_ITEM&&U.taskDefinition.completionRequirements.data.id===k&&U.taskDefinition.completionRequirements.data.type===B&&F.push(U.questID)})),F}))}getAllActiveQuestIDs(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.fetchQuestData();return this.getQuestIDsFromQuestData(B.active,k)}))}getAllInactiveQuestIDs(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.fetchQuestData();return this.getQuestIDsFromQuestData(B.inactive,k)}))}setupValidTasks(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=new G.bnh,F=G.wa5.getActiveScene().container.get(G.$Zn.PopupHandler);null==F||F.delayPopupsUntil(U),yield this._sendQuestEventPromise;const j=yield this.getTasksInProgress(k,B),$=[];j.forEach((k=>{k.onSetupTasks.filter((k=>Dt[k.type]&&(!k.featureRequirements||this._featureRequirements.meetsRequirementsDeprecated(k.featureRequirements)))).forEach((B=>{$.push(new Dt[B.type](k.questID,k.taskID).doTask(B.data).catch(G.RQr.createHandler(`Error performing onSetup task handler. ${B.type}`)))}))})),yield Promise.all($),U.resolve()}))}beginAllAvailableQuests(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=(yield this.getTasksInProgress(k)).filter((k=>0===k.taskDefinition.prerequisites.length&&k.taskProgress.status!==q.t.COMPLETE));for(const k of B)yield this.sendQuestEvent(k.type,Object.assign({},k.taskDefinition.completionRequirements.data),[k.questID])}))}questDataHasTags(k,B){return H().intersection(B,k.tags).length>0}getQuestIDsFromQuestData(k,B){return(null==B?void 0:B.length)>0?Array.from(k.values()).filter((k=>this.questDataHasTags(k,B))).map((k=>k.id)):Array.from(k.keys())}getCurrentQuestID(){}cleanup(){this.onQuestTaskStart.dispose(),this.onQuestTaskComplete.dispose()}reenter(){}getTags(){return this._tags}getQuestObjectStates(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.getQuestData(k);return null==B?void 0:B.states}))}isCutsceneTaskInProgress(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return yield this._sendQuestEventPromise,(yield this.getTasksInProgress(k,B)).some((k=>k.taskDefinition.isCutscene))}))}};(0,F.Cg)([(0,j.inject)("a6a-6157"),(0,F.Sn)("design:type",Object)],Pt.prototype,"_questNetworkHandler",void 0),(0,F.Cg)([(0,j.inject)("db5-fb6e"),(0,F.Sn)("design:type",Object)],Pt.prototype,"_featureRequirements",void 0),(0,F.Cg)([(0,j.inject)("c47-20b6"),(0,F.Sn)("design:type",Function)],Pt.prototype,"_segment",void 0),Pt=(0,F.Cg)([(0,j.injectable)()],Pt)},63536:(k,B,U)=>{"use strict";U.d(B,{$:()=>V});var F=U(8674),G=U(79687),j=U(48417),$=U(76546),H=U(45918);let V=class extends $.D{getQuestData(){return(0,F.sH)(this,arguments,void 0,(function*(k={}){return this.makeCloudscriptRequest(j.D.Quests.GetQuestData,k,!1)}))}getQuestProgress(){return(0,F.sH)(this,arguments,void 0,(function*(k={}){return this.makeCloudscriptRequest(j.D.Quests.GetQuestProgress,k,!1)}))}setQuestProgressTimestamp(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Quests.SetQuestTaskProgressTimestamp,k,!1)}))}sendQuestEvent(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Quests.SendQuestEvent,k,!1)}))}debugSetFtueQuestComplete(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Debug.ForceCompleteFtueQuest,{questIds:[H.M.FTUE]},!1)}))}};V=(0,F.Cg)([(0,G.injectable)()],V)},52437:(k,B,U)=>{"use strict";U.d(B,{$:()=>z});var F=U(8674),G=U(62459),j=U(65240),$=U(35120),H=U(1195),V=U(28152),W=U(85604),q=U(43531),K=U(23082);let z=class extends G.uAl{constructor(){super(...arguments),this._questNPCName=W.y.Flora,this._screen=null,this._dialogueController=null}create(){var k;super.create(),this._screen=$.q.instance.game.state.get(K.G.TileScreen),null===(k=this._screen.events)||void 0===k||k.push(this)}process(k,B,U){this._dialogueController&&this._dialogueController.close();const F=this._playerDataProvider.player,H=null!=k?k:$.q.instance.prodigy.world.getZone($.q.instance.prodigy.world.getCurrentZone());if(!F.isZoneQuestEnabled)return;if(this._dialogueController=new q.rD($.q.instance.game),!G.Aq$.isDefined(H.getQuestState()))return H.startQuest(1).onQuestEventDialogue("onStart"),this.queueEventText(H,"onStart",1),this._dialogueController.addEvents([{callback:()=>{this._screen.process()}}]),void this._dialogueController.start();const V=H.getQuestState().ID,W=H.getQuest(V);if(H.isQuestComplete(V)&&!W.chain)this.queueEventText(H,"onComplete",V),W.onQuestEventDialogue("onComplete"),this._dialogueController.addEvents([{callback:()=>{F.saveEnabled=!1,W.end(),G.Aq$.isDefined(W.reward)&&W.reward.length>0?(H.completeQuest(V),$.q.instance.prodigy.open.gotItem(W.reward,(()=>{F.saveEnabled=!0,this._screen.process()}),null,"advanced-quest-event-reward",null,null,{source_type:j.C.QuestReward})):(H.completeQuest(V),F.saveEnabled=!0,this._screen.process())}}]),this._dialogueController.start();else if(!H.isQuestStarted(V)&&G.Aq$.isDefined(W))this.queueEventText(H,"onStart",V),W.onQuestEventDialogue("onStart"),this._dialogueController.addEvents([{callback:()=>{H.startQuest(V),this._screen.process()}}]),this._dialogueController.start();else if(U&&G.Aq$.isDefined(W))this.queueEventText(H,"onStart",V),W.onQuestEventDialogue("onStart"),this._dialogueController.start();else if(U){const k=$.q.instance.prodigy.event.create();k.text(39,this._questNPCName),k.start()}}queueEventText(k,B,U){const F=k.getQuest(U);if(G.Aq$.isDefined(F[B]))for(let G=0;G{"use strict";U.d(B,{G:()=>W});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(73678);const W={id:`quest-${G.t.BonfireSpireHard}`,tags:[G.t.LocalZoneQuests,G.t.BonfireSpireHard],metadata:{zoneId:V.A_.BONFIREHARD},tasks:[{id:"1-0",prerequisites:[],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-introduction`}},metadata:{locations:[`${V.A_.BONFIREHARD}-B1`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-lever1-off`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[515,516]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_PULL_LEVER",metadata:{locations:[`${V.A_.BONFIREHARD}-D1`]}},{id:"2-0",prerequisites:["1-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-lever2-off`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[517,518]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_PULL_LEVER",metadata:{locations:[`${V.A_.BONFIREHARD}-C2`]}},{id:"3-0",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-lever3-off`}},localizationKey:"QUESTS_BONFIRE_SPIRE_PULL_LEVER",metadata:{locations:[`${V.A_.BONFIREHARD}-D4`]}},{id:"3-1",prerequisites:["3-0"],completionRequirements:{type:j.T.NONE,data:{}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[519,520,521]}}}],localizationKey:"",metadata:{locations:[]}},{id:"4-0",prerequisites:["3-1"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:88,target:1}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[522,523]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_COLLECT_RAISINS",metadata:{locations:[`${V.A_.BONFIREHARD}-C3`]}},{id:"5-0",prerequisites:["4-0"],completionRequirements:{type:j.T.BUTTON_CLICK,data:{id:`${V.A_.BONFIRE}-ingredient-added`}},localizationKey:"QUESTS_BONFIRE_SPIRE_ADD_INGREDIENT",metadata:{locations:[`${V.A_.BONFIREHARD}-E6`]}},{id:"5-1",prerequisites:["5-0"],completionRequirements:{type:j.T.NONE,data:{}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[524,525]}}}],localizationKey:"",metadata:{locations:[]}},{id:"6-0",prerequisites:["5-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-Q6-attend-dinner`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[526,527,528,529,530]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_ATTEND_DINNER",metadata:{locations:[`${V.A_.BONFIREHARD}-D5`]}},{id:"7-0",prerequisites:["6-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:89,target:3}},localizationKey:"QUESTS_BONFIRE_SPIRE_COLLECT_COOKING_TOOLS",metadata:{locations:[{location:`${V.A_.BONFIREHARD}-D4`,disallowedStates:{"quest-state-2":1}},{location:`${V.A_.BONFIREHARD}-C2`,disallowedStates:{"quest-state-1":1}},{location:`${V.A_.BONFIREHARD}-D1`,disallowedStates:{"quest-state-0":1}}]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:j.T.NONE,data:{}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[531,532,533]}}}],localizationKey:"",metadata:{locations:[]}},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-Q8-guards`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[534,535]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_TALK_TO_GUARDS",metadata:{locations:[`${V.A_.BONFIREHARD}-C6`]}},{id:"9-0",prerequisites:["8-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:90,target:2}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"item",ID:91,N:1}],additionalDialogueIds:{succeedingDialogue:[536,537]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_SAVE_GATHERERS",metadata:{locations:[`${V.A_.BONFIREHARD}-A4`]}},{id:"10-0",prerequisites:["9-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-Q10-food-stolen`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[538,539,540,541,542,543]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_OFFER_DISH",metadata:{locations:[`${V.A_.BONFIREHARD}-C6`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[92]}}],data:{}},localizationKey:"QUESTS_BONFIRE_SPIRE_FIND_KEY",metadata:{locations:[`${V.A_.BONFIREHARD}-C4`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-Q11-received-strong-fire-relic`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"item",ID:92,N:1}],additionalDialogueIds:{succeedingDialogue:[544,545,546]},isFake:!0}}],metadata:{locations:[`${V.A_.BONFIREHARD}-C4`]}},{id:"12-0",prerequisites:["11-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.BonfireQ12Guardian}},localizationKey:"QUESTS_BONFIRE_SPIRE_UNLOCK_CHEST",metadata:{locations:[`${V.A_.BONFIREHARD}-A4`]}},{id:"12-1",prerequisites:["12-0"],completionRequirements:{type:j.T.OPEN_CHEST,data:{id:`${V.A_.BONFIREHARD}-chestGuardian`}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[547,548,549]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_UNLOCK_CHEST",metadata:{locations:[`${V.A_.BONFIREHARD}-A4`]}},{id:"13-0",prerequisites:["12-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.BonfireQ13Cebollini}},localizationKey:"QUESTS_BONFIRE_SPIRE_DEFEAT_CHEF",metadata:{locations:[`${V.A_.BONFIREHARD}-D6`]}},{id:"13-1",prerequisites:["13-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-Q13-post-battle`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[550,551]}}}],metadata:{locations:[`${V.A_.BONFIREHARD}-D6`]}},{id:"14-0",prerequisites:["13-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-Q14-attend-dinner`}},localizationKey:"QUESTS_BONFIRE_SPIRE_TALK_TO_QUEEN",metadata:{locations:[`${V.A_.BONFIREHARD}-D5`]}},{id:"14-1",prerequisites:["14-0"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"slurpy"}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"key",ID:11}],additionalDialogueIds:{precedingDialogue:[554,555,556],succeedingDialogue:[557]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_TALK_TO_SLURPY",metadata:{locations:[`${V.A_.BONFIREHARD}-B1`]}}]}},63674:(k,B,U)=>{"use strict";U.d(B,{K:()=>q});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(24522),W=U(73678);const q={id:`quest-${G.t.BonfireSpire}`,tags:[G.t.LocalZoneQuests,G.t.BonfireSpire],metadata:{zoneId:W.A_.BONFIRE},tasks:[{id:"0-0",prerequisites:[],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.BONFIRE}-B1`}},preconditions:[{type:V.n.IS_IN_ZONE,data:{zone:[W.A_.BONFIRE]}}],metadata:{locations:[]}},{id:"1-0",prerequisites:["0-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-introduction`}},onComplete:[{type:$.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:j.T.BUTTON_CLICK,eventData:{id:`${W.A_.BONFIRE}-introduction`}}}],metadata:{locations:[`${W.A_.BONFIRE}-B1`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-lever1-off`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[515,516]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_PULL_LEVER",metadata:{locations:[`${W.A_.BONFIRE}-D1`]}},{id:"2-0",prerequisites:["1-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-lever2-off`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[517,518]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_PULL_LEVER",metadata:{locations:[`${W.A_.BONFIRE}-C2`]}},{id:"3-0",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-lever3-off`}},localizationKey:"QUESTS_BONFIRE_SPIRE_PULL_LEVER",metadata:{locations:[`${W.A_.BONFIRE}-D4`]}},{id:"3-1",prerequisites:["3-0"],completionRequirements:{type:j.T.NONE,data:{}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"hat",ID:65}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[519,520,521]}}}],localizationKey:"",metadata:{locations:[]}},{id:"4-0",prerequisites:["3-1"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:88,target:1}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{succeedingDialogue:[522,523]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_COLLECT_RAISINS",metadata:{locations:[`${W.A_.BONFIRE}-C3`]}},{id:"5-0",prerequisites:["4-0"],completionRequirements:{type:j.T.BUTTON_CLICK,data:{id:`${W.A_.BONFIRE}-ingredient-added`}},localizationKey:"QUESTS_BONFIRE_SPIRE_ADD_INGREDIENT",metadata:{locations:[`${W.A_.BONFIRE}-E6`]}},{id:"5-1",prerequisites:["5-0"],completionRequirements:{type:j.T.NONE,data:{}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:1}],additionalDialogueIds:{precedingDialogue:[509,510],succeedingDialogue:[524,525]}}}],localizationKey:"",metadata:{locations:[]}},{id:"6-0",prerequisites:["5-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-Q6-attend-dinner`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[526,527,528,529,530]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_ATTEND_DINNER",metadata:{locations:[`${W.A_.BONFIRE}-D5`]}},{id:"7-0",prerequisites:["6-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:89,target:3}},localizationKey:"QUESTS_BONFIRE_SPIRE_COLLECT_COOKING_TOOLS",metadata:{locations:[{location:`${W.A_.BONFIRE}-D4`,disallowedStates:{"quest-state-2":1}},{location:`${W.A_.BONFIRE}-C2`,disallowedStates:{"quest-state-1":1}},{location:`${W.A_.BONFIRE}-D1`,disallowedStates:{"quest-state-0":1}}]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:j.T.NONE,data:{}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"outfit",ID:56,N:1}],additionalDialogueIds:{succeedingDialogue:[531,532,533]}}}],localizationKey:"",metadata:{locations:[]}},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-Q8-guards`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[534,535]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_TALK_TO_GUARDS",metadata:{locations:[`${W.A_.BONFIRE}-C6`]}},{id:"9-0",prerequisites:["8-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:90,target:2}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"item",ID:91,N:1}],additionalDialogueIds:{succeedingDialogue:[536,537]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_SAVE_GATHERERS",metadata:{locations:[`${W.A_.BONFIRE}-A4`]}},{id:"10-0",prerequisites:["9-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-Q10-food-stolen`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[538,539,540,541,542,543]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_OFFER_DISH",metadata:{locations:[`${W.A_.BONFIRE}-C6`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[92]}}],data:{}},localizationKey:"QUESTS_BONFIRE_SPIRE_FIND_KEY",metadata:{locations:[`${W.A_.BONFIRE}-C4`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-Q11-received-strong-fire-relic`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:2,N:1}],additionalDialogueIds:{precedingDialogue:[509,510]}}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"item",ID:92,N:1}],additionalDialogueIds:{succeedingDialogue:[544,545,546]},isFake:!0}}],metadata:{locations:[`${W.A_.BONFIRE}-C4`]}},{id:"12-0",prerequisites:["11-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.BonfireQ12Guardian}},localizationKey:"QUESTS_BONFIRE_SPIRE_UNLOCK_CHEST",metadata:{locations:[`${W.A_.BONFIRE}-A4`]}},{id:"12-1",prerequisites:["12-0"],completionRequirements:{type:j.T.OPEN_CHEST,data:{id:`${W.A_.BONFIRE}-chestGuardian`}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{succeedingDialogue:[547,548,549]}}},{type:$.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:j.T.BUTTON_CLICK,eventData:{id:`${W.A_.BONFIRE}-chestGuardian`}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_UNLOCK_CHEST",metadata:{locations:[`${W.A_.BONFIRE}-A4`]}},{id:"13-0",prerequisites:["12-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.BonfireQ13Cebollini}},localizationKey:"QUESTS_BONFIRE_SPIRE_DEFEAT_CHEF",metadata:{locations:[`${W.A_.BONFIRE}-D6`]}},{id:"13-1",prerequisites:["13-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-Q13-post-battle`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"weapon",ID:81,N:1}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[550,551]}}}],metadata:{locations:[`${W.A_.BONFIRE}-D6`]}},{id:"14-0",prerequisites:["13-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-Q14-attend-dinner`}},localizationKey:"QUESTS_BONFIRE_SPIRE_TALK_TO_QUEEN",metadata:{locations:[`${W.A_.BONFIRE}-D5`]}},{id:"14-1",prerequisites:["14-0"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"slurpy"}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:3},{type:"key",ID:11}],additionalDialogueIds:{precedingDialogue:[554,555,510,556],succeedingDialogue:[557]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_TALK_TO_SLURPY",metadata:{locations:[`${W.A_.BONFIRE}-B1`]}}]}},88919:(k,B,U)=>{"use strict";U.d(B,{C:()=>q});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(24522),W=U(73678);const q={id:`quest-${G.t.FireflyForestHard}`,tags:[G.t.LocalZoneQuests,G.t.FireflyForestHard],metadata:{zoneId:W.A_.FORESTHARD},tasks:[{id:"0-0",prerequisites:[],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.FORESTHARD}-C8`}},preconditions:[{type:V.n.IS_IN_ZONE,data:{zone:[W.A_.FORESTHARD]}}],metadata:{locations:[]}},{id:"1-0",prerequisites:["0-0"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{target:2},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-forest_hard-uniqueEncounters-C7-forest_C7_Q2_special","zone-forest_hard-uniqueEncounters-C7-forest_C7_S2_special"]}}]},metadata:{locations:[`${W.A_.FORESTHARD}-C7`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q1-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}}],metadata:{locations:[`${W.A_.FORESTHARD}-C7`]}},{id:"2-0",prerequisites:["1-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.FireflyQ2Miniboss}},localizationKey:"QUEST_DEFEAT_MONSTER",metadata:{locations:[`${W.A_.FORESTHARD}-C7`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q2-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}},{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[1349]}}],metadata:{locations:[`${W.A_.FORESTHARD}-C7`]}},{id:"3-0",prerequisites:["2-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q3-intro`}},metadata:{locations:[`${W.A_.FORESTHARD}-B7`]}},{id:"3-1",prerequisites:["3-0"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{type:"pet",id:20,target:2},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-forest_hard-uniqueEncounters-B7-forest_B7_S2_special","zone-forest_hard-uniqueEncounters-B7-forest_B7_Q1_special"]}}]},localizationKey:"QUESTS_FOREST_DEFEAT_LUMINITES",metadata:{locations:[`${W.A_.FORESTHARD}-B7`]}},{id:"3-2",prerequisites:["3-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q3-miniboss-intro`}},localizationKey:"QUEST_DEFEAT_MONSTER",metadata:{locations:[`${W.A_.FORESTHARD}-B7`]}},{id:"3-3",prerequisites:["3-2"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.FireflyQ3Miniboss}},localizationKey:"QUEST_DEFEAT_MONSTER",metadata:{locations:[`${W.A_.FORESTHARD}-B7`]}},{id:"3-4",prerequisites:["3-3"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q3-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}},{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[1370,1371]}}],metadata:{locations:[`${W.A_.FORESTHARD}-B7`]}},{id:"4-0",prerequisites:["3-4"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"florian"}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{}],showGotItem:!1}}],localizationKey:"QUEST_FIND_FLORIAN",metadata:{locations:[`${W.A_.FORESTHARD}-B6`]}},{id:"5-0",prerequisites:["4-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q5-florian`}},localizationKey:"QUEST_JOB_COMPLETE",metadata:{locations:[`${W.A_.FORESTHARD}-B6`]}},{id:"5-1",prerequisites:["5-0"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"bok"}},onComplete:[{type:$.s.GOT_PET,data:{id:80,showPetsInCardFormat:!0,claimToken:"16c7deee-f3a8-4599-856b-acb1884aeb40",playerLevelDeltaMin:0,playerLevelDeltaMax:0}}],localizationKey:"QUEST_GO_TO_SHIVERCHILL",metadata:{locations:[`${W.A_.SHIVERCHILLHARD}-A10`]}},{id:"5-2",prerequisites:["5-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q5-bok`}},metadata:{locations:[`${W.A_.SHIVERCHILLHARD}-A10`]}},{id:"6-1",prerequisites:["5-2"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.QuestPippet}},localizationKey:"QUEST_DEFEAT_PIPPET",metadata:{locations:[`${W.A_.FORESTHARD}-B5`]}},{id:"6-2",prerequisites:["6-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q6-post-battle`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"item",ID:67}],additionalDialogueIds:{succeedingDialogue:[306,307]}}}],metadata:{locations:[`${W.A_.FORESTHARD}-B5`]}},{id:"6-3",prerequisites:["6-2"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"merchant"}},localizationKey:"QUEST_TRANSLATE_NOTE",metadata:{locations:[`${W.A_.FORESTHARD}-C4`]}},{id:"6-4",prerequisites:["6-3"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q6-noot`}},localizationKey:"QUEST_BATTLE_SPRIKES",metadata:{locations:[`${W.A_.FORESTHARD}-D3`]}},{id:"6-5",prerequisites:["6-4"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[24]}}],data:{}},localizationKey:"QUEST_BATTLE_SPRIKES",metadata:{locations:[`${W.A_.FORESTHARD}-D3`]}},{id:"6-6",prerequisites:["6-5"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.FORESTHARD}-D3`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:["item"],ID:[24],N:1}],isFake:!0}},{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[310,311,312]}}],metadata:{locations:[`${W.A_.FORESTHARD}-D3`]}},{id:"7-0",prerequisites:["6-6"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:24,target:5}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[331],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[313,314,315]}}}],metadata:{locations:[{location:`${W.A_.FORESTHARD}-A4`,disallowedStates:{"quest-state-1":1,"quest-state-2":1}},{location:`${W.A_.FORESTHARD}-A5`,disallowedStates:{"quest-state-3":1,"quest-state-4":1,"quest-state-5":1}}]}},{id:"8-0",prerequisites:["7-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.FireflyQ8TriptropTrio}},localizationKey:"QUEST_DEFEAT_TRIPTROP_TRIO",metadata:{locations:[`${W.A_.FORESTHARD}-A3`]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}}],metadata:{locations:[`${W.A_.FORESTHARD}-A3`]}},{id:"9-0",prerequisites:["8-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:"find-gerald"}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}}],localizationKey:"QUESTS_FOREST_FIND_GERALD",metadata:{locations:[`${W.A_.FORESTHARD}-D3`]}},{id:"10-0",prerequisites:["9-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:"fixed-flute"}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}}],localizationKey:"QUESTS_FOREST_FIX_FLUTE",metadata:{locations:[`${W.A_.FORESTHARD}-A5`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[70]}}],data:{}},localizationKey:"QUESTS_FOREST_COLLECT_FLUTE",metadata:{locations:[`${W.A_.FORESTHARD}-A3`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.FORESTHARD}-A3`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[331],succeedingDialogue:[325,326]}}}],metadata:{locations:[`${W.A_.FORESTHARD}-A3`]}},{id:"12-1",prerequisites:["11-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.FireflyQ12Gerald}},localizationKey:"QUESTS_FOREST_DEFEAT_GERALD",metadata:{locations:[`${W.A_.FORESTHARD}-D3`]}},{id:"12-2",prerequisites:["12-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q12-post-battle`}},metadata:{locations:[`${W.A_.FORESTHARD}-D3`]}},{id:"12-3",prerequisites:["12-2"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q12-quest-complete`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"key",ID:3}]}}],metadata:{locations:[`${W.A_.FORESTHARD}-D3`]}},{id:"13-0",prerequisites:["12-3"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.SHIVERCHILLHARD}-A10`}},metadata:{locations:[`${W.A_.SHIVERCHILLHARD}-A10`]}}]}},1716:(k,B,U)=>{"use strict";U.d(B,{E:()=>q});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(24522),W=U(73678);const q={id:`quest-${G.t.FireflyForest}`,tags:[G.t.LocalZoneQuests,G.t.FireflyForest],metadata:{zoneId:W.A_.FOREST},tasks:[{id:"0-0",prerequisites:[],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.FOREST}-C8`}},preconditions:[{type:V.n.IS_IN_ZONE,data:{zone:[W.A_.FOREST]}}],metadata:{locations:[]}},{id:"1-0",prerequisites:["0-0"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{target:2},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-forest-uniqueEncounters-C7-forest_C7_Q2_special","zone-forest-uniqueEncounters-C7-forest_C7_S2_special"]}}]},metadata:{locations:[`${W.A_.FOREST}-C7`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q1-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}]}}],metadata:{locations:[`${W.A_.FOREST}-C7`]}},{id:"2-0",prerequisites:["1-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.FireflyQ2Miniboss}},localizationKey:"QUEST_DEFEAT_MONSTER",metadata:{locations:[`${W.A_.FOREST}-C7`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q2-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}]}},{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[1349]}}],metadata:{locations:[`${W.A_.FOREST}-C7`]}},{id:"3-0",prerequisites:["2-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q3-intro`}},localizationKey:"QUEST_LEVEL_UP",metadata:{locations:[`${W.A_.FOREST}-B7`]}},{id:"3-1",prerequisites:["3-0"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{target:2},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-forest-uniqueEncounters-B7-forest_B7_S2_special","zone-forest-uniqueEncounters-B7-forest_B7_Q1_special"]}}]},localizationKey:"QUEST_LEVEL_UP",metadata:{locations:[`${W.A_.FOREST}-B7`]}},{id:"3-2",prerequisites:["3-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q3-miniboss-intro`}},localizationKey:"QUEST_DEFEAT_MONSTER",metadata:{locations:[`${W.A_.FOREST}-B7`]}},{id:"3-3",prerequisites:["3-2"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.FireflyQ3Miniboss}},localizationKey:"QUEST_DEFEAT_MONSTER",metadata:{locations:[`${W.A_.FOREST}-B7`]}},{id:"3-4",prerequisites:["3-3"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q3-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}]}},{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[1370,1371]}}],metadata:{locations:[`${W.A_.FOREST}-B7`]}},{id:"4-0",prerequisites:["3-4"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"florian"}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:13}],showGotItem:!1}}],localizationKey:"QUEST_FIND_FLORIAN",metadata:{locations:[`${W.A_.FOREST}-B6`]}},{id:"5-0",prerequisites:["4-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q5-florian`}},localizationKey:"QUEST_JOB_COMPLETE",metadata:{locations:[`${W.A_.FOREST}-B6`]}},{id:"5-1",prerequisites:["5-0"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"bok"}},onComplete:[{type:$.s.GOT_PET,data:{id:79,showPetsInCardFormat:!0,claimToken:"877e5cbb-48fb-4e88-bde4-6abd96fe4275",playerLevelDeltaMin:0,playerLevelDeltaMax:0}},{type:$.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:j.T.BUTTON_CLICK,eventData:{id:`${W.A_.FOREST}-Q5-bok-receive-pet`}}}],localizationKey:"QUEST_GO_TO_SHIVERCHILL",metadata:{locations:[`${W.A_.SHIVERCHILL}-A10`]}},{id:"5-2",prerequisites:["5-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q5-bok`}},metadata:{locations:[`${W.A_.SHIVERCHILL}-A10`]}},{id:"6-1",prerequisites:["5-2"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.QuestPippet}},localizationKey:"QUEST_DEFEAT_PIPPET",metadata:{locations:[`${W.A_.FOREST}-B5`]}},{id:"6-2",prerequisites:["6-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q6-post-battle`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"item",ID:67}],additionalDialogueIds:{succeedingDialogue:[306,307]}}}],metadata:{locations:[`${W.A_.FOREST}-B5`]}},{id:"6-3",prerequisites:["6-2"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"merchant"}},localizationKey:"QUEST_TRANSLATE_NOTE",metadata:{locations:[`${W.A_.FOREST}-C4`]}},{id:"6-4",prerequisites:["6-3"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q6-noot`}},localizationKey:"QUEST_BATTLE_SPRIKES",metadata:{locations:[`${W.A_.FOREST}-D3`]}},{id:"6-5",prerequisites:["6-4"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[24]}}],data:{}},localizationKey:"QUEST_BATTLE_SPRIKES",metadata:{locations:[`${W.A_.FOREST}-D3`]}},{id:"6-6",prerequisites:["6-5"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.FOREST}-D3`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}]}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:["item"],ID:[24],N:1}],isFake:!0}},{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[310,311,312]}}],metadata:{locations:[`${W.A_.FOREST}-D3`]}},{id:"7-0",prerequisites:["6-6"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:24,target:5}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[331],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{succeedingDialogue:[313,314,315]}}}],metadata:{locations:[{location:`${W.A_.FOREST}-A4`,disallowedStates:{"quest-state-1":1,"quest-state-2":1}},{location:`${W.A_.FOREST}-A5`,disallowedStates:{"quest-state-3":1,"quest-state-4":1,"quest-state-5":1}}]}},{id:"8-0",prerequisites:["7-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.FireflyQ8TriptropTrio}},localizationKey:"QUEST_DEFEAT_TRIPTROP_TRIO",metadata:{locations:[`${W.A_.FOREST}-A3`]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:14}]}}],metadata:{locations:[`${W.A_.FOREST}-A3`]}},{id:"9-0",prerequisites:["8-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:"find-gerald"}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}]}}],localizationKey:"QUESTS_FOREST_FIND_GERALD",metadata:{locations:[`${W.A_.FOREST}-D3`]}},{id:"10-0",prerequisites:["9-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:"fixed-flute"}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}]}}],localizationKey:"QUESTS_FOREST_FIX_FLUTE",metadata:{locations:[`${W.A_.FOREST}-A5`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[70]}}],data:{}},localizationKey:"QUESTS_FOREST_COLLECT_FLUTE",metadata:{locations:[`${W.A_.FOREST}-A3`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.FOREST}-A3`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[331],succeedingDialogue:[325,326]}}}],metadata:{locations:[`${W.A_.FOREST}-A3`]}},{id:"12-1",prerequisites:["11-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.FireflyQ12Gerald}},localizationKey:"QUESTS_FOREST_DEFEAT_GERALD",metadata:{locations:[`${W.A_.FOREST}-D3`]}},{id:"12-2",prerequisites:["12-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q12-post-battle`}},metadata:{locations:[`${W.A_.FOREST}-D3`]}},{id:"12-3",prerequisites:["12-2"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q12-quest-complete`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"key",ID:3}]}}],metadata:{locations:[`${W.A_.FOREST}-D3`]}},{id:"13-0",prerequisites:["12-3"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.SHIVERCHILL}-A10`}},metadata:{locations:[`${W.A_.SHIVERCHILL}-A10`]}}]}},57144:(k,B,U)=>{"use strict";U.d(B,{r:()=>q});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(24522),W=U(73678);const q={id:`quest-${G.t.ShipwreckShoreHard}`,tags:[G.t.LocalZoneQuests,G.t.ShipwreckShoreHard],metadata:{zoneId:W.A_.SHIPWRECKHARD},tasks:[{id:"0-0",prerequisites:[],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.SHIPWRECKHARD}-B12`}},preconditions:[{type:V.n.IS_IN_ZONE,data:{zone:[W.A_.SHIPWRECKHARD]}}],metadata:{locations:[]}},{id:"1-0",prerequisites:["0-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"key",id:14,target:1}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[668,669,670,671]}}}],metadata:{locations:[`${W.A_.SHIPWRECKHARD}-C10`]}},{id:"2-0",prerequisites:["1-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q2-jelly-jim-intro`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[708]}}}],localizationKey:"QUESTS_SHIPWRECK_FIND_JIM",metadata:{locations:[`${W.A_.SHIPWRECKHARD}-C9`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q2-1-quest-complete`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[672,673,674]}}}],localizationKey:"QUESTS_SHIPWRECK_LOOK_AROUND",metadata:{locations:[`${W.A_.SHIPWRECKHARD}-A7`]}},{id:"3-0",prerequisites:["2-1"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:112,target:1}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[676,677,678,679,680,681,682,683]}}],metadata:{locations:[`${W.A_.SHIPWRECKHARD}-A7`]}},{id:"4-0",prerequisites:["3-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"key",id:15,target:1}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[684,685]}}}],metadata:{locations:[`${W.A_.SHIPWRECKHARD}-B7`]}},{id:"5-0",prerequisites:["4-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q5-clear-ink`}},localizationKey:"QUESTS_SHIPWRECK_CLEAR_INK",metadata:{locations:[{location:`${W.A_.SHIPWRECKHARD}-A7`,requiredStates:{inkA7:0}},{location:`${W.A_.SHIPWRECKHARD}-B6`,requiredStates:{inkB6:0}},{location:`${W.A_.SHIPWRECKHARD}-B5`,requiredStates:{inkB5:0}},{location:`${W.A_.SHIPWRECKHARD}-A5`}]}},{id:"5-1",prerequisites:["5-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q5-quest-complete`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[686,687,688,689]}}}],metadata:{locations:[`${W.A_.SHIPWRECKHARD}-A5`]}},{id:"6-0",prerequisites:["5-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q6-get-camera`}},onComplete:[{type:$.s.GOT_ITEM,data:{additionalDialogueIds:{precedingDialogue:[709,710]},itemDrops:[{type:"key",ID:16,N:1}]}},{type:$.s.GOT_ITEM,data:{additionalDialogueIds:{precedingDialogue:[708]},itemDrops:[{type:"gold",ID:1,N:400}]}}],localizationKey:"QUESTS_SHIPWRECK_GET_CAMERA",metadata:{locations:[`${W.A_.SHIPWRECKHARD}-C9`]}},{id:"6-1",prerequisites:["6-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q6-1-take-photo`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[690,691,692]}}}],localizationKey:"QUESTS_SHIPWRECK_TAKE_PHOTO",metadata:{locations:[`${W.A_.SHIPWRECKHARD}-A5`]}},{id:"7-0",prerequisites:["6-1"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:113,target:3}},metadata:{locations:[`${W.A_.SHIPWRECKHARD}-A2`]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q7-quest-complete`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[658,675],succeedingDialogue:[693,697,695]}}}],metadata:{locations:[`${W.A_.SHIPWRECKHARD}-A2`]}},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{type:"pet",id:119,target:4},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-shipwreck_shore_hard-uniqueEncounters-B8-shipwreck_shore_B8_S1_special","zone-shipwreck_shore_hard-uniqueEncounters-B8-shipwreck_shore_B8_S2_special","zone-shipwreck_shore_hard-uniqueEncounters-B7-shipwreck_shore_B7_S1_special","zone-shipwreck_shore_hard-uniqueEncounters-B7-shipwreck_shore_B7_S3_special"]}}]},metadata:{locations:[{location:`${W.A_.SHIPWRECKHARD}-B8`,uniqueEncounters:{B8:["shipwreck_shore_B8_S1_special","shipwreck_shore_B8_S2_special"]}},{location:`${W.A_.SHIPWRECKHARD}-B7`,uniqueEncounters:{B7:["shipwreck_shore_B7_S1_special","shipwreck_shore_B7_S3_special"]}}]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q8-quest-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[696,658],succeedingDialogue:[697,698,699]}}}],metadata:{locations:[`${W.A_.SHIPWRECKHARD}-B8`,`${W.A_.SHIPWRECKHARD}-B7`]}},{id:"9-0",prerequisites:["8-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q9-open-door`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[700]}}}],localizationKey:"QUESTS_SHIPWRECK_OPEN_DOOR",metadata:{locations:[`${W.A_.SHIPWRECKHARD}-B6`]}},{id:"10-0",prerequisites:["9-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:114,target:1}},metadata:{locations:[`${W.A_.SHIPWRECKHARD}-B7`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.ShipwreckQ11OldOne}},localizationKey:"QUESTS_SHIPWRECK_DEFEAT_BOSS",metadata:{locations:[`${W.A_.SHIPWRECKHARD}-C6`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q11-post-battle`}},localizationKey:"QUESTS_SHIPWRECK_TALK_TO_EVE",metadata:{locations:[`${W.A_.SHIPWRECKHARD}-C6`]}},{id:"11-2",prerequisites:["11-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q11-quest-end`}},localizationKey:"QUESTS_SHIPWRECK_TALK_TO_EVE",metadata:{locations:[`${W.A_.SHIPWRECKHARD}-B12`]}},{id:"11-3",prerequisites:["11-2"],completionRequirements:{type:j.T.NONE,data:{}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:800},{type:"key",ID:17,N:1}],additionalDialogueIds:{precedingDialogue:[658,675,702]}}}],localizationKey:"QUESTS_SHIPWRECK_TALK_TO_EVE",metadata:{locations:[`${W.A_.SHIPWRECKHARD}-B12`]}}]}},76175:(k,B,U)=>{"use strict";U.d(B,{J:()=>q});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(24522),W=U(73678);const q={id:`quest-${G.t.ShipwreckShore}`,tags:[G.t.LocalZoneQuests,G.t.ShipwreckShore],metadata:{zoneId:W.A_.SHIPWRECK},tasks:[{id:"0-0",prerequisites:[],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.SHIPWRECK}-B12`}},preconditions:[{type:V.n.IS_IN_ZONE,data:{zone:[W.A_.SHIPWRECK]}}],metadata:{locations:[]}},{id:"1-0",prerequisites:["0-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"key",id:14,target:1}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[668,669,670,671]}}}],metadata:{locations:[`${W.A_.SHIPWRECK}-C10`]}},{id:"2-0",prerequisites:["1-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q2-jelly-jim-intro`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[708]}}}],localizationKey:"QUESTS_SHIPWRECK_FIND_JIM",metadata:{locations:[`${W.A_.SHIPWRECK}-C9`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q2-1-quest-complete`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"boots",ID:32,N:1}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[672,673,674]}}}],localizationKey:"QUESTS_SHIPWRECK_LOOK_AROUND",metadata:{locations:[`${W.A_.SHIPWRECK}-A7`]}},{id:"3-0",prerequisites:["2-1"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:112,target:1}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[676,677,678,679,680,681,682,683]}}],metadata:{locations:[`${W.A_.SHIPWRECK}-A7`]}},{id:"4-0",prerequisites:["3-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"key",id:15,target:1}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[684,685]}}}],metadata:{locations:[`${W.A_.SHIPWRECK}-B7`]}},{id:"5-0",prerequisites:["4-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q5-clear-ink`}},localizationKey:"QUESTS_SHIPWRECK_CLEAR_INK",metadata:{locations:[{location:`${W.A_.SHIPWRECK}-A7`,requiredStates:{inkA7:0}},{location:`${W.A_.SHIPWRECK}-B6`,requiredStates:{inkB6:0}},{location:`${W.A_.SHIPWRECK}-B5`,requiredStates:{inkB5:0}},{location:`${W.A_.SHIPWRECK}-A5`}]}},{id:"5-1",prerequisites:["5-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q5-quest-complete`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[686,687,688,689]}}}],metadata:{locations:[`${W.A_.SHIPWRECK}-A5`]}},{id:"6-0",prerequisites:["5-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q6-get-camera`}},onComplete:[{type:$.s.GOT_ITEM,data:{additionalDialogueIds:{precedingDialogue:[709,710]},itemDrops:[{type:"key",ID:16,N:1}]}},{type:$.s.GOT_ITEM,data:{additionalDialogueIds:{precedingDialogue:[708]},itemDrops:[{type:"gold",ID:1,N:200}]}}],localizationKey:"QUESTS_SHIPWRECK_GET_CAMERA",metadata:{locations:[`${W.A_.SHIPWRECK}-C9`]}},{id:"6-1",prerequisites:["6-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q6-1-take-photo`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"outfit",ID:61,N:1}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[690,691,692]}}}],localizationKey:"QUESTS_SHIPWRECK_TAKE_PHOTO",metadata:{locations:[`${W.A_.SHIPWRECK}-A5`]}},{id:"7-0",prerequisites:["6-1"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:113,target:3}},metadata:{locations:[`${W.A_.SHIPWRECK}-A2`]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q7-quest-complete`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"spellRelic",ID:11,N:1}],additionalDialogueIds:{precedingDialogue:[658,675],succeedingDialogue:[693,697,695]}}}],metadata:{locations:[`${W.A_.SHIPWRECK}-A2`]}},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{target:4},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-shipwreck_shore-uniqueEncounters-B8-shipwreck_shore_B8_S1_special","zone-shipwreck_shore-uniqueEncounters-B8-shipwreck_shore_B8_S2_special","zone-shipwreck_shore-uniqueEncounters-B7-shipwreck_shore_B7_S1_special","zone-shipwreck_shore-uniqueEncounters-B7-shipwreck_shore_B7_S3_special"]}}]},metadata:{locations:[{location:`${W.A_.SHIPWRECK}-B8`,uniqueEncounters:{B8:["shipwreck_shore_B8_S1_special","shipwreck_shore_B8_S2_special"]}},{location:`${W.A_.SHIPWRECK}-B7`,uniqueEncounters:{B7:["shipwreck_shore_B7_S1_special","shipwreck_shore_B7_S3_special"]}}]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q8-quest-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[696,658],succeedingDialogue:[697,698,699]}}}],metadata:{locations:[`${W.A_.SHIPWRECK}-B8`,`${W.A_.SHIPWRECK}-B7`]}},{id:"9-0",prerequisites:["8-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q9-open-door`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"hat",ID:80,N:1}],additionalDialogueIds:{succeedingDialogue:[700]}}}],localizationKey:"QUESTS_SHIPWRECK_OPEN_DOOR",metadata:{locations:[`${W.A_.SHIPWRECK}-B6`]}},{id:"10-0",prerequisites:["9-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:114,target:1}},metadata:{locations:[`${W.A_.SHIPWRECK}-B7`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.ShipwreckQ11OldOne}},localizationKey:"QUESTS_SHIPWRECK_DEFEAT_BOSS",metadata:{locations:[`${W.A_.SHIPWRECK}-C6`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q11-post-battle`}},localizationKey:"QUESTS_SHIPWRECK_TALK_TO_EVE",metadata:{locations:[`${W.A_.SHIPWRECK}-C6`]}},{id:"11-2",prerequisites:["11-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q11-quest-end`}},localizationKey:"QUESTS_SHIPWRECK_TALK_TO_EVE",metadata:{locations:[`${W.A_.SHIPWRECK}-B12`]}},{id:"11-3",prerequisites:["11-2"],completionRequirements:{type:j.T.NONE,data:{}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"spellRelic",ID:12,N:1},{type:"key",ID:17,N:1}],additionalDialogueIds:{precedingDialogue:[658,675,702]}}}],localizationKey:"QUESTS_SHIPWRECK_TALK_TO_EVE",metadata:{locations:[`${W.A_.SHIPWRECK}-B12`]}}]}},38693:(k,B,U)=>{"use strict";U.d(B,{S:()=>W});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(73678);const W={id:`quest-${G.t.ShiverchillHard}`,tags:[G.t.LocalZoneQuests,G.t.ShiverchillHard],metadata:{zoneId:V.A_.SHIVERCHILLHARD},tasks:[{id:"1-0",prerequisites:[],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"bok"}},metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A10`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SHIVERCHILLHARD}-B10`}},localizationKey:"QUESTS_SHIVERCHILL_INVESTIGATE_FURNACE_ROOM",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B10`]}},{id:"1-2",prerequisites:["1-1"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{target:3},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-shiverchill_hard-uniqueEncounters-B10-shiverchill_B10_S1_special","zone-shiverchill_hard-uniqueEncounters-B10-shiverchill_B10_S2_special","zone-shiverchill_hard-uniqueEncounters-B10-shiverchill_B10_S3_special"]}}]},localizationKey:"QUESTS_SHIVERCHILL_CLEAR_FURNACE_ROOM",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B10`]}},{id:"1-3",prerequisites:["1-2"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q1-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[339,334,340,341]}}}],metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B10`]}},{id:"2-0",prerequisites:["1-3"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[71]}}],data:{}},localizationKey:"QUESTS_SHIVERCHILL_FIND_POWER_CRYSTAL",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A9`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q2-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[342,343]}}}],metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A9`]}},{id:"3-0",prerequisites:["2-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q3-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[344,345]}}}],localizationKey:"QUESTS_SHIVERCHILL_LIGHT_FIRST_FURNACE",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B10`]}},{id:"4-0",prerequisites:["3-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q4-shake`}},localizationKey:"QUESTS_SHIVERCHILL_EXPLORE_CAVES",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A7`]}},{id:"4-1",prerequisites:["4-0"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"shiverchill-miner"}},localizationKey:"QUESTS_SHIVERCHILL_EXPLORE_CAVES",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A7`]}},{id:"4-2",prerequisites:["4-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q4-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"item",ID:75,N:1}],additionalDialogueIds:{succeedingDialogue:[349]}}}],metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A7`]}},{id:"5-0",prerequisites:["4-2"],completionRequirements:{type:j.T.OPEN_CHEST,data:{id:"shiverchill_hard-chest1"}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[350,334,351],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"item",ID:72,N:1}],additionalDialogueIds:{succeedingDialogue:[352]}}}],localizationKey:"QUESTS_SHIVERCHILL_GET_BOKS_SHOVEL",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B6`]}},{id:"6-0",prerequisites:["5-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.ShiverchillQ6Ghosts}},localizationKey:"QUESTS_SHIVERCHILL_FREE_MINER",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A7`]}},{id:"6-1",prerequisites:["6-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q6-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[353,354]}}}],metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A7`]}},{id:"7-0",prerequisites:["6-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.ShiverchillQ7IceWyrm}},localizationKey:"QUESTS_SHIVERCHILL_FIND_POWER_CRYSTALS",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B8`]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q7-post-battle`}},metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B8`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[355,356,334,357]}}}]},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q8-pippet-encounter-complete`}},localizationKey:"QUESTS_SHIVERCHILL_DEFEAT_CLOAKERS",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A7`]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{type:"pet",id:90,target:3},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-shiverchill_hard-uniqueEncounters-B6-shiverchill_B6_S1_special","zone-shiverchill_hard-uniqueEncounters-B6-shiverchill_B6_S2_special","zone-shiverchill_hard-uniqueEncounters-B7-shiverchill_B7_S1_special","zone-shiverchill_hard-uniqueEncounters-B7-shiverchill_B7_S2_special"]}}]},metadata:{locations:[{location:`${V.A_.SHIVERCHILLHARD}-B7`,uniqueEncounters:{B7:["shiverchill_B7_S1_special","shiverchill_B7_S2_special"]}},{location:`${V.A_.SHIVERCHILLHARD}-B6`,uniqueEncounters:{B6:["shiverchill_B6_S1_special","shiverchill_B6_S2_special"]}}]}},{id:"8-2",prerequisites:["8-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q8-end`}},metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B7`,`${V.A_.SHIVERCHILLHARD}-B6`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[358]}}}]},{id:"9-0",prerequisites:["8-2"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:71,target:1}},localizationKey:"QUESTS_SHIVERCHILL_COLLECT_POWER_CRYSTAL",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A6`]}},{id:"9-1",prerequisites:["9-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q9-end`}},metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A6`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[342,343]}}}]},{id:"10-0",prerequisites:["9-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q10-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[359,360]}}}],localizationKey:"QUESTS_SHIVERCHILL_LIGHT_SECOND_FURNACE",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B10`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q11-end`}},localizationKey:"QUESTS_SHIVERCHILL_CHECK_THRONE_ROOM",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B3`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[362,334,363,364,365]}}}]},{id:"12-0",prerequisites:["11-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:74,target:3}},localizationKey:"QUESTS_SHIVERCHILL_COLLECT_CRYSTALS",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A3`]}},{id:"12-1",prerequisites:["12-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:74,target:5}},localizationKey:"QUESTS_SHIVERCHILL_COLLECT_CRYSTALS",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B3`]}},{id:"12-2",prerequisites:["12-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q12-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[366,334,367]}}}],metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B3`]}},{id:"13-0",prerequisites:["12-2"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILLHARD}-Q13-start`}},localizationKey:"QUESTS_SHIVERCHILL_DEFEAT_ICE_WORM",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A4`]}},{id:"13-1",prerequisites:["13-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.ShiverchillQ13IceWyrm}},localizationKey:"QUESTS_SHIVERCHILL_DEFEAT_ICE_WORM",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A4`]}},{id:"13-2",prerequisites:["13-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILLHARD}-Q13-post-battle`}},metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A4`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[342,343]}}}]},{id:"14-0",prerequisites:["13-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q14-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[368,369]}}}],localizationKey:"QUESTS_SHIVERCHILL_LIGHT_THIRD_FURNACE",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B10`]}},{id:"15-0",prerequisites:["14-0"],localizationKey:"QUESTS_SHIVERCHILL_GO_TO_THRONE_ROOM",completionRequirements:{type:j.T.FSM_COMPLETE_SEQUENCE,data:{}},metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B2`]}}]}},99689:(k,B,U)=>{"use strict";U.d(B,{a:()=>W});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(73678);const W={id:`quest-${G.t.Shiverchill}`,tags:[G.t.LocalZoneQuests,G.t.Shiverchill],metadata:{zoneId:V.A_.SHIVERCHILL},tasks:[{id:"1-0",prerequisites:[],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"bok"}},onComplete:[{type:$.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:j.T.BUTTON_CLICK,eventData:{id:`${V.A_.SHIVERCHILL}-A10-bok-start-quest`}}}],metadata:{locations:[`${V.A_.SHIVERCHILL}-A10`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SHIVERCHILL}-B10`}},localizationKey:"QUESTS_SHIVERCHILL_INVESTIGATE_FURNACE_ROOM",metadata:{locations:[`${V.A_.SHIVERCHILL}-B10`]}},{id:"1-2",prerequisites:["1-1"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{target:3},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-shiverchill-uniqueEncounters-B10-shiverchill_B10_S1_special","zone-shiverchill-uniqueEncounters-B10-shiverchill_B10_S2_special","zone-shiverchill-uniqueEncounters-B10-shiverchill_B10_S3_special"]}}]},localizationKey:"QUESTS_SHIVERCHILL_CLEAR_FURNACE_ROOM",metadata:{locations:[`${V.A_.SHIVERCHILL}-B10`]}},{id:"1-3",prerequisites:["1-2"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q1-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[339,334,340,341]}}}],metadata:{locations:[`${V.A_.SHIVERCHILL}-B10`]}},{id:"2-0",prerequisites:["1-3"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[71]}}],data:{}},localizationKey:"QUESTS_SHIVERCHILL_FIND_POWER_CRYSTAL",metadata:{locations:[`${V.A_.SHIVERCHILL}-A9`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q2-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[342,343]}}}],metadata:{locations:[`${V.A_.SHIVERCHILL}-A9`]}},{id:"3-0",prerequisites:["2-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q3-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:4,N:1}],additionalDialogueIds:{precedingDialogue:[333],succeedingDialogue:[344,345]}}}],localizationKey:"QUESTS_SHIVERCHILL_LIGHT_FIRST_FURNACE",metadata:{locations:[`${V.A_.SHIVERCHILL}-B10`]}},{id:"4-0",prerequisites:["3-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q4-shake`}},localizationKey:"QUESTS_SHIVERCHILL_EXPLORE_CAVES",metadata:{locations:[`${V.A_.SHIVERCHILL}-A7`]}},{id:"4-1",prerequisites:["4-0"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"shiverchill-miner"}},localizationKey:"QUESTS_SHIVERCHILL_EXPLORE_CAVES",metadata:{locations:[`${V.A_.SHIVERCHILL}-A7`]}},{id:"4-2",prerequisites:["4-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q4-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100},{type:"item",ID:75,N:1}],additionalDialogueIds:{succeedingDialogue:[349]}}}],metadata:{locations:[`${V.A_.SHIVERCHILL}-A7`]}},{id:"5-0",prerequisites:["4-2"],completionRequirements:{type:j.T.OPEN_CHEST,data:{id:"shiverchill-chest1"}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[350,334,351],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100},{type:"item",ID:72,N:1}],additionalDialogueIds:{succeedingDialogue:[352]}}}],localizationKey:"QUESTS_SHIVERCHILL_GET_BOKS_SHOVEL",metadata:{locations:[`${V.A_.SHIVERCHILL}-B6`]}},{id:"6-0",prerequisites:["5-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.ShiverchillQ6Ghosts}},localizationKey:"QUESTS_SHIVERCHILL_FREE_MINER",metadata:{locations:[`${V.A_.SHIVERCHILL}-A7`]}},{id:"6-1",prerequisites:["6-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q6-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"hat",ID:54,N:1}],additionalDialogueIds:{succeedingDialogue:[353,354]}}}],metadata:{locations:[`${V.A_.SHIVERCHILL}-A7`]}},{id:"7-0",prerequisites:["6-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.ShiverchillQ7IceWyrm}},localizationKey:"QUESTS_SHIVERCHILL_FIND_POWER_CRYSTALS",metadata:{locations:[`${V.A_.SHIVERCHILL}-B8`]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q7-post-battle`}},metadata:{locations:[`${V.A_.SHIVERCHILL}-B8`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[355,356,334,357]}}}]},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q8-pippet-encounter-complete`}},localizationKey:"QUESTS_SHIVERCHILL_DEFEAT_CLOAKERS",metadata:{locations:[`${V.A_.SHIVERCHILL}-A7`]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{type:"pet",id:90,target:3},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-shiverchill-uniqueEncounters-B6-shiverchill_B6_S1_special","zone-shiverchill-uniqueEncounters-B6-shiverchill_B6_S2_special","zone-shiverchill-uniqueEncounters-B7-shiverchill_B7_S1_special","zone-shiverchill-uniqueEncounters-B7-shiverchill_B7_S2_special"]}}]},metadata:{locations:[{location:`${V.A_.SHIVERCHILL}-B7`,uniqueEncounters:{B7:["shiverchill_B7_S1_special","shiverchill_B7_S2_special"]}},{location:`${V.A_.SHIVERCHILL}-B6`,uniqueEncounters:{B6:["shiverchill_B6_S1_special","shiverchill_B6_S2_special"]}}]}},{id:"8-2",prerequisites:["8-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q8-end`}},metadata:{locations:[`${V.A_.SHIVERCHILL}-B7`,`${V.A_.SHIVERCHILL}-B6`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[358]}}}]},{id:"9-0",prerequisites:["8-2"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:71,target:1}},localizationKey:"QUESTS_SHIVERCHILL_COLLECT_POWER_CRYSTAL",metadata:{locations:[`${V.A_.SHIVERCHILL}-A6`]}},{id:"9-1",prerequisites:["9-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q9-end`}},metadata:{locations:[`${V.A_.SHIVERCHILL}-A6`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[342,343]}}}]},{id:"10-0",prerequisites:["9-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q10-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:5,N:1}],additionalDialogueIds:{precedingDialogue:[333],succeedingDialogue:[359,360]}}}],localizationKey:"QUESTS_SHIVERCHILL_LIGHT_SECOND_FURNACE",metadata:{locations:[`${V.A_.SHIVERCHILL}-B10`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q11-end`}},localizationKey:"QUESTS_SHIVERCHILL_CHECK_THRONE_ROOM",metadata:{locations:[`${V.A_.SHIVERCHILL}-B3`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[362,334,363,364,365]}}}]},{id:"12-0",prerequisites:["11-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:74,target:3}},localizationKey:"QUESTS_SHIVERCHILL_COLLECT_CRYSTALS",metadata:{locations:[`${V.A_.SHIVERCHILL}-A3`]}},{id:"12-1",prerequisites:["12-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:74,target:5}},localizationKey:"QUESTS_SHIVERCHILL_COLLECT_CRYSTALS",metadata:{locations:[`${V.A_.SHIVERCHILL}-B3`]}},{id:"12-2",prerequisites:["12-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q12-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"outfit",ID:47,N:1}],additionalDialogueIds:{succeedingDialogue:[366,334,367]}}}],metadata:{locations:[`${V.A_.SHIVERCHILL}-B3`]}},{id:"13-0",prerequisites:["12-2"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q13-start`}},onComplete:[{type:$.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:j.T.BUTTON_CLICK,eventData:{id:`${V.A_.SHIVERCHILL}-Q13-cutscene-start-finished`}}}],localizationKey:"QUESTS_SHIVERCHILL_DEFEAT_ICE_WORM",metadata:{locations:[`${V.A_.SHIVERCHILL}-A4`]}},{id:"13-1",prerequisites:["13-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.ShiverchillQ13IceWyrm}},localizationKey:"QUESTS_SHIVERCHILL_DEFEAT_ICE_WORM",metadata:{locations:[`${V.A_.SHIVERCHILL}-A4`]}},{id:"13-2",prerequisites:["13-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q13-post-battle`}},metadata:{locations:[`${V.A_.SHIVERCHILL}-A4`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[342,343]}}}]},{id:"14-0",prerequisites:["13-2"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q14-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:6,N:1}],additionalDialogueIds:{precedingDialogue:[333],succeedingDialogue:[368,369]}}}],localizationKey:"QUESTS_SHIVERCHILL_LIGHT_THIRD_FURNACE",metadata:{locations:[`${V.A_.SHIVERCHILL}-B10`]}},{id:"15-0",prerequisites:["14-0"],localizationKey:"QUESTS_SHIVERCHILL_GO_TO_THRONE_ROOM",completionRequirements:{type:j.T.FSM_COMPLETE_SEQUENCE,data:{}},metadata:{locations:[`${V.A_.SHIVERCHILL}-B2`]}},{id:"15-1",prerequisites:["15-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q15-end`}},localizationKey:"QUESTS_SHIVERCHILL_SPEAK_WITH_BOK",onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"weapon",ID:74,N:1}]}}],metadata:{locations:[`${V.A_.SHIVERCHILL}-A10`]}}]}},97340:(k,B,U)=>{"use strict";U.d(B,{x:()=>W});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(73678);const W={id:`quest-${G.t.SkywatchHard}`,tags:[G.t.LocalZoneQuests,G.t.SkywatchHard],metadata:{zoneId:V.A_.SKYWATCHHARD},tasks:[{id:"1-0",prerequisites:[],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:`${V.A_.SKYWATCH}-introduction`}},metadata:{locations:[`${V.A_.SKYWATCHHARD}-A1`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{type:"pet",id:72,target:3},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-skywatch_hard-uniqueEncounters-B2-skywatch_B2_S1_special","zone-skywatch_hard-uniqueEncounters-B2-skywatch_B2_S2_special","zone-skywatch_hard-uniqueEncounters-B2-skywatch_B2_S3_special"]}}]},localizationKey:"QUESTS_SKYWATCH_DEFEAT_CLOUD_NEEKS",metadata:{locations:[`${V.A_.SKYWATCHHARD}-B2`]}},{id:"1-2",prerequisites:["1-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q1-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[414,422],succeedingDialogue:[423,424,425,426]}}}],metadata:{locations:[`${V.A_.SKYWATCHHARD}-B2`]}},{id:"2-0",prerequisites:["1-2"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCHHARD}-C2`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCHHARD}-C2`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q2-thief-C2`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCHHARD}-C2`]}},{id:"2-2",prerequisites:["2-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q2-2-thief-flees`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCH}-C1`]}},{id:"2-3",prerequisites:["2-2"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q2-3-thief-flees`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCHHARD}-C3`]}},{id:"2-4",prerequisites:["2-3"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[87]}}],data:{}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCHHARD}-C4`]}},{id:"2-5",prerequisites:["2-4"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q2-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[427,428,429]}}}],metadata:{locations:[`${V.A_.SKYWATCHHARD}-C4`]}},{id:"3-0",prerequisites:["2-5"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q3-note`}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_FIND_BROCCOLINA",metadata:{locations:[`${V.A_.SKYWATCHHARD}-B2`]}},{id:"3-1",prerequisites:["3-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-A0-found-broccolina`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"key",ID:8,N:1}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[430,431,432]}}}],localizationKey:"QUESTS_SKYWATCH_FIND_BROCCOLINA",metadata:{locations:[`${V.A_.SKYWATCHHARD}-A0`]}},{id:"4-0",prerequisites:["3-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q4-trim-vines-D1`}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCHHARD}-D1`]}},{id:"4-1",prerequisites:["4-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q4-trim-vines-D2`}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCHHARD}-D2`]}},{id:"4-2",prerequisites:["4-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q4-clogged-machine`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[433,434,435,436]}}}],localizationKey:"QUESTS_SKYWATCH_INSPECT_MACHINE",metadata:{locations:[`${V.A_.SKYWATCHHARD}-D3`]}},{id:"5-0",prerequisites:["4-2"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:56,target:3}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[415],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[437,438]}}}],localizationKey:"QUESTS_SKYWATCH_FIND_CLUES",metadata:{locations:[{location:`${V.A_.SKYWATCHHARD}-D2`,disallowedStates:{"quest-state-1":1}},{location:`${V.A_.SKYWATCHHARD}-C3`,disallowedStates:{"quest-state-2":1}},{location:`${V.A_.SKYWATCHHARD}-B3`,disallowedStates:{"quest-state-3":1}}]}},{id:"6-0",prerequisites:["5-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:81,target:1}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_GET_FACTORY_KEY",metadata:{locations:[`${V.A_.SKYWATCHHARD}-D1`]}},{id:"6-1",prerequisites:["6-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchQ6Swarm}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_ENTER_FACTORY",metadata:{locations:[`${V.A_.SKYWATCHHARD}-D1`]}},{id:"6-2",prerequisites:["6-1"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCHHARD}-D1`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[439]}}}],localizationKey:"QUESTS_SKYWATCH_ENTER_FACTORY",metadata:{locations:[`${V.A_.SKYWATCHHARD}-D1`]}},{id:"7-0",prerequisites:["6-2"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[49]}}],data:{target:5}},localizationKey:"",metadata:{locations:[{location:`${V.A_.SKYWATCHHARD}-E1`,uniqueEncounters:{E1:["skywatch_E1_S1_special","skywatch_E1_S2_special"]}},{location:`${V.A_.SKYWATCHHARD}-E3`,uniqueEncounters:{E3:["skywatch_E3_S1_special","skywatch_E3_S2_special","skywatch_E3_Q1_special"]}}]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q7-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"key",ID:9,N:1}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[440,441,442]}}}],localizationKey:"",metadata:{locations:[`${V.A_.SKYWATCHHARD}-E1`,`${V.A_.SKYWATCHHARD}-E3`]}},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchCloudMiniboss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCHHARD}-B3`]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q8-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[443]}}}],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCHHARD}-B3`]}},{id:"9-0",prerequisites:["8-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchCloudMiniboss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCHHARD}-C4`]}},{id:"9-1",prerequisites:["9-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q9-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[414],succeedingDialogue:[444]}}}],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCHHARD}-C4`]}},{id:"10-0",prerequisites:["9-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchCloudMiniboss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCHHARD}-D3`]}},{id:"10-1",prerequisites:["10-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q10-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[445,446,447]}}}],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCHHARD}-D3`]}},{id:"11-0",prerequisites:["10-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchQ11Bitbots}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_FIND_EUGENE",metadata:{locations:[`${V.A_.SKYWATCHHARD}-E2`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCHHARD}-E2`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[464,465,466,467,468,469]}}}],localizationKey:"QUESTS_SKYWATCH_FIND_EUGENE",metadata:{locations:[`${V.A_.SKYWATCHHARD}-E2`]}},{id:"11-2",prerequisites:["11-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q11-end`}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[415,448,449,450]}}],localizationKey:"QUESTS_SKYWATCH_FIND_EUGENE",metadata:{locations:[`${V.A_.SKYWATCHHARD}-E2`]}},{id:"12-0",prerequisites:["11-2"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:82,target:2}},onComplete:[{type:$.s.REMOVE_UNSECURE_ITEM,data:{itemDrops:[{type:"item",ID:82,N:2}]}},{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[414],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"item",ID:83,N:1}],additionalDialogueIds:{succeedingDialogue:[451,452]}}}],localizationKey:"QUESTS_SKYWATCH_COLLECT_KEY_PARTS",metadata:{locations:[{location:`${V.A_.SKYWATCHHARD}-D3`,disallowedStates:{"quest-state-0":1}},{location:`${V.A_.SKYWATCHHARD}-C3`,disallowedStates:{"quest-state-1":1}}]}},{id:"13-0",prerequisites:["12-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchCloudBoss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_DEFEAT_BOSS",metadata:{locations:[`${V.A_.SKYWATCHHARD}-E4`]}},{id:"13-1",prerequisites:["13-0"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCHHARD}-E4`}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[51]}},{type:$.s.OFFER_TELEPORT,data:{dialogueID:1753,targetMapTag:`${V.A_.SKYWATCHHARD}-A1`,position:{x:600,y:360}}}],localizationKey:"QUESTS_SKYWATCH_DEFEAT_BOSS",metadata:{locations:[`${V.A_.SKYWATCHHARD}-E4`]}},{id:"13-2",prerequisites:["13-1"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCHHARD}-A1`}},onComplete:[{type:$.s.GOT_ITEM,data:{additionalDialogueIds:{precedingDialogue:[453,454,455]},itemDrops:[{type:"key",ID:10,N:1}]}}],localizationKey:"QUESTS_SKYWATCH_TALK_TO_BENNI",metadata:{locations:[`${V.A_.SKYWATCHHARD}-A1`]}}]}},64891:(k,B,U)=>{"use strict";U.d(B,{x:()=>W});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(73678);const W={id:`quest-${G.t.Skywatch}`,tags:[G.t.LocalZoneQuests,G.t.Skywatch],metadata:{zoneId:V.A_.SKYWATCH},tasks:[{id:"1-0",prerequisites:[],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:`${V.A_.SKYWATCH}-introduction`}},onComplete:[{type:$.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:j.T.BUTTON_CLICK,eventData:{id:`${V.A_.SKYWATCH}-introduction`}}}],metadata:{locations:[`${V.A_.SKYWATCH}-A1`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{type:"pet",id:72,target:3},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-skywatch-uniqueEncounters-B2-skywatch_B2_S1_special","zone-skywatch-uniqueEncounters-B2-skywatch_B2_S2_special","zone-skywatch-uniqueEncounters-B2-skywatch_B2_S3_special"]}}]},localizationKey:"QUESTS_SKYWATCH_DEFEAT_CLOUD_NEEKS",metadata:{locations:[`${V.A_.SKYWATCH}-B2`]}},{id:"1-2",prerequisites:["1-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q1-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[414,422],succeedingDialogue:[423,424,425,426]}}}],metadata:{locations:[`${V.A_.SKYWATCH}-B2`]}},{id:"2-0",prerequisites:["1-2"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCH}-C2`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCH}-C2`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q2-thief-C2`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCH}-C2`]}},{id:"2-2",prerequisites:["2-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q2-2-thief-flees`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCH}-C1`]}},{id:"2-3",prerequisites:["2-2"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q2-3-thief-flees`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCH}-C3`]}},{id:"2-4",prerequisites:["2-3"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[87]}}],data:{}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCH}-C4`]}},{id:"2-5",prerequisites:["2-4"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q2-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[427,428,429]}}}],metadata:{locations:[`${V.A_.SKYWATCH}-C4`]}},{id:"3-0",prerequisites:["2-5"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q3-note`}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_FIND_BROCCOLINA",metadata:{locations:[`${V.A_.SKYWATCH}-B2`]}},{id:"3-1",prerequisites:["3-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-A0-found-broccolina`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"key",ID:8,N:1}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[430,431,432]}}}],localizationKey:"QUESTS_SKYWATCH_FIND_BROCCOLINA",metadata:{locations:[`${V.A_.SKYWATCH}-A0`]}},{id:"4-0",prerequisites:["3-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q4-trim-vines-D1`}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCH}-D1`]}},{id:"4-1",prerequisites:["4-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q4-trim-vines-D2`}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCH}-D2`]}},{id:"4-2",prerequisites:["4-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q4-clogged-machine`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:7,N:1}],additionalDialogueIds:{precedingDialogue:[415,460],succeedingDialogue:[433,434,435,436]}}}],localizationKey:"QUESTS_SKYWATCH_INSPECT_MACHINE",metadata:{locations:[`${V.A_.SKYWATCH}-D3`]}},{id:"5-0",prerequisites:["4-2"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:56,target:3}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[415],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{succeedingDialogue:[437,438]}}}],localizationKey:"QUESTS_SKYWATCH_FIND_CLUES",metadata:{locations:[{location:`${V.A_.SKYWATCH}-D2`,disallowedStates:{"quest-state-1":1}},{location:`${V.A_.SKYWATCH}-C3`,disallowedStates:{"quest-state-2":1}},{location:`${V.A_.SKYWATCH}-B3`,disallowedStates:{"quest-state-3":1}}]}},{id:"6-0",prerequisites:["5-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:81,target:1}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_GET_FACTORY_KEY",metadata:{locations:[`${V.A_.SKYWATCH}-D1`]}},{id:"6-1",prerequisites:["6-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchQ6Swarm}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_ENTER_FACTORY",metadata:{locations:[`${V.A_.SKYWATCH}-D1`]}},{id:"6-2",prerequisites:["6-1"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCH}-D1`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[439]}}}],localizationKey:"QUESTS_SKYWATCH_ENTER_FACTORY",metadata:{locations:[`${V.A_.SKYWATCH}-D1`]}},{id:"7-0",prerequisites:["6-2"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[49]}}],data:{target:5}},localizationKey:"",metadata:{locations:[{location:`${V.A_.SKYWATCH}-E1`,uniqueEncounters:{E1:["skywatch_E1_S1_special","skywatch_E1_S2_special"]}},{location:`${V.A_.SKYWATCH}-E3`,uniqueEncounters:{E3:["skywatch_E3_S1_special","skywatch_E3_S2_special","skywatch_E3_Q1_special"]}}]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q7-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"key",ID:9,N:1}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[440,441,442]}}}],localizationKey:"",metadata:{locations:[`${V.A_.SKYWATCH}-E1`,`${V.A_.SKYWATCH}-E3`]}},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchCloudMiniboss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCH}-B3`]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q8-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"outfit",ID:5,N:1}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[443]}}}],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCH}-B3`]}},{id:"9-0",prerequisites:["8-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchCloudMiniboss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCH}-C4`]}},{id:"9-1",prerequisites:["9-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q9-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[414],succeedingDialogue:[444]}}}],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCH}-C4`]}},{id:"10-0",prerequisites:["9-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchCloudMiniboss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCH}-D3`]}},{id:"10-1",prerequisites:["10-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q10-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:8,N:1}],additionalDialogueIds:{precedingDialogue:[415,460],succeedingDialogue:[445,446,447]}}}],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCH}-D3`]}},{id:"11-0",prerequisites:["10-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchQ11Bitbots}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_FIND_EUGENE",metadata:{locations:[`${V.A_.SKYWATCH}-E2`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCH}-E2`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"hat",ID:8,N:1}],additionalDialogueIds:{precedingDialogue:[464,465,466,467,468,469]}}}],localizationKey:"QUESTS_SKYWATCH_FIND_EUGENE",metadata:{locations:[`${V.A_.SKYWATCH}-E2`]}},{id:"11-2",prerequisites:["11-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q11-end`}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[415,448,449,450]}}],localizationKey:"QUESTS_SKYWATCH_FIND_EUGENE",metadata:{locations:[`${V.A_.SKYWATCH}-E2`]}},{id:"12-0",prerequisites:["11-2"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:82,target:2}},onComplete:[{type:$.s.REMOVE_UNSECURE_ITEM,data:{itemDrops:[{type:"item",ID:82,N:2}]}},{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[414],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"item",ID:83,N:1}],additionalDialogueIds:{succeedingDialogue:[451,452]}}},{type:$.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:j.T.BUTTON_CLICK,eventData:{id:`${V.A_.SKYWATCH}-collect-key-parts`}}}],localizationKey:"QUESTS_SKYWATCH_COLLECT_KEY_PARTS",metadata:{locations:[{location:`${V.A_.SKYWATCH}-D3`,disallowedStates:{"quest-state-0":1}},{location:`${V.A_.SKYWATCH}-C3`,disallowedStates:{"quest-state-1":1}}]}},{id:"13-0",prerequisites:["12-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchCloudBoss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_DEFEAT_BOSS",metadata:{locations:[`${V.A_.SKYWATCH}-E4`]}},{id:"13-1",prerequisites:["13-0"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCH}-E4`}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[51]}},{type:$.s.OFFER_TELEPORT,data:{dialogueID:1753,targetMapTag:"skywatch-A1",position:{x:600,y:360}}}],localizationKey:"QUESTS_SKYWATCH_DEFEAT_BOSS",metadata:{locations:[`${V.A_.SKYWATCH}-E4`]}},{id:"13-2",prerequisites:["13-1"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCH}-A1`}},onComplete:[{type:$.s.GOT_ITEM,data:{additionalDialogueIds:{precedingDialogue:[453,454,455]},itemDrops:[{type:"spellRelic",ID:9,N:1},{type:"key",ID:10,N:1}]}}],localizationKey:"QUESTS_SKYWATCH_TALK_TO_BENNI",metadata:{locations:[`${V.A_.SKYWATCH}-A1`]}}]}},18587:(k,B,U)=>{"use strict";U.d(B,{R:()=>lt});var F=U(8674),G=U(62459),j=U(26738),$=U(89067),H=U(98938),V=U(58776),W=U(62886),q=U(29891),K=U(24522),z=U(51151),Y=U(65240),Q=U(61468),X=U(53151),Z=U(40579),J=U(35120),tt=U(65050),et=U(67665),it=U(13956),st=U(25480),nt=U(69698),at=U(46014),rt=U(76007),ot=U(9475),ht=U(79368),ct=U(97806),dt=U(96165);class lt extends ht.k{constructor(){super(...arguments),this._tags=[H.t.BattlePass],this._latestDataVersion=0,this._getDataQueue=[],this.onDataChanged=new G.HN0,this.onSlowServerRequest=new G.HN0,this.onAllSlowServerRequestsCompleted=new G.HN0,this.onQuestRewardAutoCollected=new G.HN0,this._currentSlowRequestCount=0,this._lastQuestEventTime=0,this._timeouts={},this._slowRequests={},this._requestCount=0,this._lastProcessedVersion=0,this._battlePassPetIds=null}setup(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=J.q.instance.prodigy.gameContainer.get("737-e070");this._battleQuestEventHandler=k,this._battleQuestEventHandler.onChange.add(this.questProgressCallback,this),this.rollOverCompletedQuests().catch(G.RQr.createHandler("Error rolling over completed quests for the battle pass")),this.completeRootTask().catch(G.RQr.createHandler("Error completing root task for the battle pass")),X.h.isFeatureEnabled()&&this.claimAllUnclaimedQuests().catch(G.RQr.createHandler("Error claiming all unclaimed quests in the battle pass")),this.onDataChanged.add((()=>{this.setupBonusQuestRollover(),this.setupSeasonRollover(),this.sendHudButtonData()}))}))}cleanup(){this.onDataChanged.dispose(),this.onSlowServerRequest.dispose(),this.onAllSlowServerRequestsCompleted.dispose(),this.onQuestRewardAutoCollected.dispose(),this._battleQuestEventHandler.onChange.remove(this.questProgressCallback,this),super.cleanup()}getTasksInProgress(k,B,U){const G=Object.create(null,{getTasksInProgress:{get:()=>super.getTasksInProgress}});return(0,F.sH)(this,void 0,void 0,(function*(){const F=this.getCurrentQuestID()?[this.getCurrentQuestID()]:B;return G.getTasksInProgress.call(this,k,F,U)}))}getCurrentBattlePassData(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;if(void 0===this._currentBattlePass&&(yield this.updateBattlePassData()),null===this._currentBattlePass)return null;const B=this._latestDataVersion!==(null===(k=this._currentBattlePass)||void 0===k?void 0:k.dataVersion),U=this._getDataQueue.length>0;return(B||U)&&(yield new Promise((k=>this._getDataQueue.push(k)))),this._currentBattlePass}))}getCachedBattlePassData(){return this._currentBattlePass}updateBattlePassData(){return(0,F.sH)(this,void 0,void 0,(function*(){this._latestDataVersion++;const k=this._latestDataVersion,B=yield this.getAllActiveQuestIDs(),U=this._timeManager.getServerTimeMs();let F;for(const W of B){const k=yield this.getQuestMetaData(W);if(new Date(k.startDate).getTime()k.taskDefinition.id)),V),setTimeout((()=>{k===this._latestDataVersion&&(this._currentBattlePass=H,this.dispatchAndClearQueue())}),0))}))}dispatchAndClearQueue(){for(this.onDataChanged.dispatch();this._getDataQueue.length>0;)this._getDataQueue.shift().call(null)}setupBonusQuestRollover(){var k;const B=null===(k=this._currentBattlePass)||void 0===k?void 0:k.getQuestComingSoonDate();if(B){const k=this._timeManager.getServerTimeMs(),U=B.getTime();if(this._bonusQuestRolloverTimeoutId&&window.clearTimeout(this._bonusQuestRolloverTimeoutId),U-k>6048e5)return;this._bonusQuestRolloverTimeoutId=window.setTimeout((()=>{this.updateBattlePassData().catch(G.RQr.createHandler("Failed to refresh battle pass data"))}),U-k)}}setupSeasonRollover(){var k;const B=null===(k=this._currentBattlePass)||void 0===k?void 0:k.getEndDate();if(!B)return;const U=this._timeManager.getServerTimeMs();this._seasonRolloverTimeoutId&&window.clearTimeout(this._seasonRolloverTimeoutId),B-U>6048e5||(this._seasonRolloverTimeoutId=window.setTimeout((()=>{this.onDataChanged.addOnce((()=>{this.completeRootTask().catch(G.RQr.createHandler("Error completing root task for the battle pass"))})),this.updateBattlePassData().catch(G.RQr.createHandler("Failed to refresh battle pass data"))}),B-U))}preloadPreviousUnclaimedRewards(){return(0,F.sH)(this,void 0,void 0,(function*(){0!==(yield this._networkHandler.getPastUnclaimedRewards()).unclaimedRewards.length&&(this._unclaimedRewardsMail=new z.MailData({isOpened:!1,subject:this._localizer.getText("BATTLE_PASS_UNCLAIMED_REWARDS_MAIL_SUBJECT"),sendDate:Date.now().toString(),extension:{name:at.R.BattlePass,deleteMailOnClose:!1,trashButtonVisible:!1}}))}))}getUnclaimedRewardsMail(){return this._unclaimedRewardsMail}claimUnclaimedBattlePassRewards(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._segment.quests.beginQuestEventTransaction(),B=yield this._networkHandler.claimPastUnclaimedReward(),U=[];let F=[];B.unclaimedRewards.forEach((k=>{k.type===q.s.GOT_ITEM?F.push(k.data):k.type===q.s.GIVE_ULTIMATE&&U.push(k.data)}));for(const G of U)yield new ct.N(null,null).doTask({id:G.ID,showPetMenu:!1,sourceType:Y.C.BattlePass});for(F=st.u.mergeItems(F);F.length>0;){const k=F.splice(0,5);yield new dt.I("mailer","mailer").doTask({itemDrops:k,sourceType:Y.C.BattlePass})}this._unclaimedRewardsMail=void 0,k.flush({})}))}preSendQuestEventViaHub(k,B){const U=Object.create(null,{preSendQuestEventViaHub:{get:()=>super.preSendQuestEventViaHub}});return(0,F.sH)(this,void 0,void 0,(function*(){if(!this.getCurrentQuestID())return{manager:this,questIDs:[],tags:[]};const F=yield this.battlePassPreSendQuestEvent(),G=yield U.preSendQuestEventViaHub.call(this,k,B);return Object.assign(Object.assign({},G),{requestID:F})}))}battlePassPreSendQuestEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){this._lastQuestEventTime=Date.now(),this._requestCount+=1;const k=this._requestCount;return this._slowRequests[k]=!1,this._timeouts[k]=window.setTimeout((()=>{this._slowRequests[k]=!0,this._currentSlowRequestCount++,Date.now()>=this._lastQuestEventTime+1500&&this.onSlowServerRequest.dispatch()}),1500),k}))}sendQuestEvent(k,B,U){const G=Object.create(null,{sendQuestEvent:{get:()=>super.sendQuestEvent}});return(0,F.sH)(this,void 0,void 0,(function*(){var U;const F=null!==(U=this._currentBattlePass)&&void 0!==U?U:yield this.getCurrentBattlePassData(),j=null==F?void 0:F.getQuestID();if(!j)return{activeQuests:[],inactiveQuests:[]};const $=yield this.battlePassPreSendQuestEvent(),H=yield G.sendQuestEvent.call(this,k,B,[j]);return yield this.battlePassPostSendQuestEvent(H,$),H}))}postSendQuestEventViaHub(k,B){const U=Object.create(null,{postSendQuestEventViaHub:{get:()=>super.postSendQuestEventViaHub}});return(0,F.sH)(this,void 0,void 0,(function*(){(this._currentBattlePass||(yield this.getCurrentBattlePassData()))&&(yield U.postSendQuestEventViaHub.call(this,k),yield this.battlePassPostSendQuestEvent(k,B))}))}battlePassPostSendQuestEvent(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U;if(k&&k.activeQuests.length>0){const k=null!==(U=this._currentBattlePass)&&void 0!==U?U:yield this.getCurrentBattlePassData();yield this.updateQuestDataAndProcessDifferences(k)}B&&(this._timeouts[B]&&(window.clearTimeout(this._timeouts[B]),delete this._timeouts[B]),void 0!==this._slowRequests[B]&&(this._slowRequests[B]&&(this._currentSlowRequestCount--,0===this._currentSlowRequestCount&&this.onAllSlowServerRequestsCompleted.dispatch()),delete this._slowRequests[B]))}))}questProgressCallback(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B;if(!k.progressResponses)return;for(const F of k.progressResponses)yield this.processQuestProgressResponse(F);const U=null!==(B=this._currentBattlePass)&&void 0!==B?B:yield this.getCurrentBattlePassData();yield this.updateQuestDataAndProcessDifferences(U)}))}updateQuestDataAndProcessDifferences(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(!k)return;yield this.updateBattlePassData();const B=yield this.getCurrentBattlePassData();B&&B.dataVersion!==this._lastProcessedVersion&&(this.processQuestProgress(k,B),this._lastProcessedVersion=B.dataVersion)}))}processQuestProgress(k,B){const U=[],F=new Map;null==k||k.getTasks().forEach((k=>{k.taskDefinition.metadata.questGoalTaskType===j.x.GOAL&&(k.taskProgress.status===V.t.COMPLETE?U.push(k.taskID):k.taskProgress.status===V.t.IN_PROGRESS&&F.set(k.taskID,k))}));const $=[],H=[];null==B||B.getTasks().forEach((k=>{k.taskDefinition.metadata.questGoalTaskType===j.x.GOAL&&(k.taskProgress.status===V.t.COMPLETE?$.push(k.taskID):k.taskProgress.status===V.t.IN_PROGRESS&&H.push(k))}));const W=J.q.instance.prodigy.gameContainer.get("c47-20b6");Q.l.getAddedItems(U,$).forEach((k=>{var U;const F=null==B?void 0:B.getTasks().find((B=>B.taskID===k));if(!F)return;const j=null==B?void 0:B.getQuests().find((B=>B.goalTaskId===k));if(!j)return;W.battlePass.sendQuestGoalCompleteEvent(F);const $=null!==(U=j.reward.battlePassXp)&&void 0!==U?U:0;let H="default";X.h.isFeatureEnabled()&&(H="auto_collected",this.sendRewardClaimedEvent(j.reward.rewardId).then((()=>this.onQuestRewardAutoCollected.dispatch(j))).catch(G.RQr.createHandler(`Failed to claim battle pass reward ${j.reward.rewardId}`))),et.Y.track("Player Progression Points Earned",{point_type:"treasure_points",point_count:$,instance_type:tt.N.BattlePass,instance_id:B.getSeasonName(),transaction_id:W.battlePass.goalCompleteTransactionId,claim_type:H})})),H.forEach((k=>{var B,U,G,j,$,H,V;const q=null===(G=null===(U=null===(B=k.taskDefinition.preconditions)||void 0===B?void 0:B.find((k=>k.type===K.n.DATE_BEFORE)))||void 0===U?void 0:U.data)||void 0===G?void 0:G.date,z=F.get(k.taskID),Y=null!==($=null===(j=null==z?void 0:z.taskProgress.data)||void 0===j?void 0:j.progress)&&void 0!==$?$:0;Y!==(null===(H=k.taskProgress.data)||void 0===H?void 0:H.progress)&&W.battlePass.sendQuestGoalUpdatedEvent(k,(null===(V=k.taskProgress.data)||void 0===V?void 0:V.progress)-Y,q)}))}sendRewardClaimedEvent(k){return(0,F.sH)(this,arguments,void 0,(function*(k,B=1){yield this.sendQuestEvent(W.T.BUTTON_CLICK,{id:k,progressToAdd:B})}))}sendFtueViewedEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=(yield this.getCurrentBattlePassData()).getFtueTask();k&&!k.isCompleted&&(yield this.sendQuestEvent(W.T.BUTTON_CLICK,{id:k.buttonId}))}))}sendGainPetXpEvent(k){return(0,F.sH)(this,void 0,void 0,(function*(){k<=0||(yield this.sendQuestEvent(W.T.GAIN_PET_XP,{progressToAdd:k}))}))}rollOverCompletedQuests(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.getCurrentBattlePassData();if(null===k)return;const B=[];for(const U of this._currentBattlePass.getQuests())U.isExpired&&U.reward.claimable&&B.push(U.claimTaskId);if(B.length>0){const U=yield this._networkHandler.completeExpiredClaimQuests(k.getQuestID(),B);yield this.processQuestProgressResponse(U),yield this.updateBattlePassData()}}))}getBattlePassXpData(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B;const U=null!=k?k:null===(B=yield this.getCurrentBattlePassData())||void 0===B?void 0:B.getQuestID();if(U)return this._currentBattlePassXp||(this._currentBattlePassXp=(yield this._networkHandler.getBattlePassXpData(U)).data),this._currentBattlePassXp}))}completeRootTask(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.getCurrentBattlePassData();if(null===k)return;const B=k.getTasks().find((k=>"root"===k.taskID));B&&(yield this.sendQuestEvent(B.type,Object.assign({},B.taskDefinition.completionRequirements.data)))}))}claimAllUnclaimedQuests(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.getCurrentBattlePassData();null!==k&&k.getCompletedUnclaimedQuests().forEach((k=>{this.sendRewardClaimedEvent(k.reward.rewardId).catch(G.RQr.createHandler(`Failed to claim battle pass reward ${k.reward.rewardId}`))}))}))}getCurrentQuestID(){if(this._currentBattlePass)return this._currentBattlePass.getQuestID()}sendHudButtonData(){this.getCurrentBattlePassData().then((k=>{if(!G.Aq$.isDefined(k))return;const B=this._currentBattlePass.getNumUnclaimedRewards()+this._currentBattlePass.getUnclaimedQuestCount();if(this._hudService.updateNotificationBadge($.ts.TreasureTrack,B),B>0){const k=J.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);this._hudService.updateCachedLabelData($.ts.TreasureTrack,{labelValue:k.getText("PLUS_ULTRA_BONUS_COLLECT")})}else{const B=J.q.instance.prodigy.gameContainer.get("a03-308f"),U=k.getEndDate()-B.getServerTimeMs();this._hudService.updateCachedLabelData($.ts.TreasureTrack,{labelValue:U})}})).catch(G.RQr.createHandler("BattlePassQuestManager: Could not send hud button data."))}buildBattlePassPetIdsCache(){const k=this._currentBattlePass;if(!k)return void(this._battlePassPetIds=new Set);const B=new Set;k.getMythicalEpicPetIds().forEach((k=>B.add(k))),k.getBattlePassChasePets().forEach((k=>B.add(k))),this._battlePassPetIds=B}isPetBattlePassReward(k){return null===this._battlePassPetIds&&this.buildBattlePassPetIdsCache(),this._battlePassPetIds.has(k)}reenter(){this.setupBonusQuestRollover(),this.setupSeasonRollover()}}(0,F.Cg)([(0,it.b)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],lt.prototype,"_localizer",void 0),(0,F.Cg)([(0,it.b)("b26-31af"),(0,F.Sn)("design:type",rt.k)],lt.prototype,"_networkHandler",void 0),(0,F.Cg)([(0,it.b)("a03-308f"),(0,F.Sn)("design:type",nt.V)],lt.prototype,"_timeManager",void 0),(0,F.Cg)([(0,it.b)("cc9-a3f0"),(0,F.Sn)("design:type",Z.W)],lt.prototype,"_hudService",void 0)},60031:(k,B,U)=>{"use strict";U.d(B,{k:()=>st});var F,G,j=U(8674),$=U(62459),H=U(79687);!function(k){k.SinglePetChasePrize="SinglePetChasePrize"}(F||(F={})),function(k){k.STANDARD_TRACK_QUEST_TAG="standard-quest-track",k.ULTIMATE_TRACK_QUEST_TAG="ultimate-quest-track"}(G||(G={}));var V=U(98938),W=U(35120),q=U(34829),K=U(96810),z=U(13956),Y=U(68152);const Q=Math.pow(2,31)-1;function X(){let k;return function B(U,F){(0,Y.v)($.Aq$.isDefined(U),"Timeout expects a non-nullish endTime."),(0,Y.v)("number"==typeof U||U instanceof Date,"Timeout expects a Date object or a number. Received: "+typeof U),clearTimeout(k);const G=Date.now();let j="number"==typeof U?U:U.getTime()-G;(0,Y.v)(j>0,"Timeout expects a positive duration.");let H=0;j>Q&&(H=j-Q,j=Q),k=setTimeout((()=>{clearTimeout(k),H>0?B(H,F):null==F||F()}),j)}}var Z=U(69698),J=U(79368),tt=U(58776),et=U(89067),it=U(40579);let st=class extends J.k{constructor(){super(...arguments),this._ultimateTimer=X(),this._standardTimer=X(),this.onDataChanged=new $.HN0,this.onTimeUpdated=new $.HN0,this._tags=[V.t.DailyLoginCalendar]}setup(){return(0,j.sH)(this,void 0,void 0,(function*(){this.sendHudButtonData().catch($.RQr.createHandler("DailyLoginCalendarQuestManager: Failed to send HUD button data."))}))}sendQuestEvent(k,B,U){const F=Object.create(null,{sendQuestEvent:{get:()=>super.sendQuestEvent}});return(0,j.sH)(this,void 0,void 0,(function*(){var U;const j=yield this.getActiveQuestId(G.STANDARD_TRACK_QUEST_TAG),H=yield this.getActiveQuestId(G.ULTIMATE_TRACK_QUEST_TAG);if(!$.Aq$.isDefined(j)||!$.Aq$.isDefined(H))return $.VyI.log("Daily Login Calendar did not have an active Standard and Ultimates track",$.$bb.Error),{activeQuests:[],inactiveQuests:[]};const V=yield F.sendQuestEvent.call(this,k,B,[j,H]),W=V.activeQuests.find((k=>k.id===j));return this.sendQuestProgressUpdateEvent(yield this.getActiveStandardTrack(),null!==(U=null==W?void 0:W.tasks)&&void 0!==U?U:[]),this.onDataChanged.dispatch(),V}))}sendQuestProgressUpdateEvent(k,B){var U,F;if(0===B.length)return;const G=(null!==(F=null===(U=B[B.length-1].data)||void 0===U?void 0:U.timesCompleted)&&void 0!==F?F:0)>0?B.length:B.length-1,j=G+2,$="daily_login_calendar",H="feature";let V=K.l.DailyLoginCalendarNthReward;1===G?(V=K.l.DailyLoginCalendarFirstReward,this._segment.playerProgression.sendFunnelAdvancedEvent({funnelName:$,funnelType:H,stepName:K.l.DailyLoginCalendarAssigned},{step_index:1}),this._segment.playerProgression.sendFunnelAdvancedEvent({funnelName:$,funnelType:H,stepName:K.l.DailyLoginCalendarViewed},{step_index:2})):G===k.length-1?V=K.l.DailyLoginCalendarComplete:G===k.length&&(V=K.l.DailyLoginCalendarLoopingReward),this._segment.playerProgression.sendFunnelAdvancedEvent({funnelName:$,funnelType:H,stepName:V},{step_index:j},!0)}getActiveStandardTrack(){return(0,j.sH)(this,void 0,void 0,(function*(){return this.getActiveQuestTrack(G.STANDARD_TRACK_QUEST_TAG)}))}getActiveUltimateTrack(){return(0,j.sH)(this,void 0,void 0,(function*(){return this.getActiveQuestTrack(G.ULTIMATE_TRACK_QUEST_TAG)}))}getActiveQuestTrack(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=yield this.getActiveQuestId(k);return $.Aq$.isDefined(B)?this.getQuestTasks(B):[]}))}getActiveStandardTrackMetadata(){return(0,j.sH)(this,void 0,void 0,(function*(){const k=yield this.getActiveQuestTrackMetadata(G.STANDARD_TRACK_QUEST_TAG);return this.updateToNewEventTimer(k.endDate,this._standardTimer),k}))}getActiveUltimateTrackMetadata(){return(0,j.sH)(this,void 0,void 0,(function*(){const k=yield this.getActiveQuestTrackMetadata(G.ULTIMATE_TRACK_QUEST_TAG);return this.updateToNewEventTimer(k.endDate,this._ultimateTimer),k}))}updateToNewEventTimer(k,B){B(this.getDurationUntilCron(k),(()=>{this.forceUpdate()}))}forceUpdate(){this.clearQuestID(),this.forceEnableDataUpdate(),this.onDataChanged.dispatch()}getDurationUntilCron(k){let B=Math.max(k-this._timeManager.getServerTimeMs(),0);return B+=q.A.MINUTES_IN_MS,B+=3*q.A.SECONDS_IN_MS,B}getActiveQuestTrackMetadata(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=yield this.getActiveQuestId(k);return $.Aq$.isDefined(B)?yield this.getQuestMetaData(B):{uuid:"",startDate:Date.now()-2*q.A.DAY_IN_MS,endDate:Date.now()-q.A.DAY_IN_MS}}))}getActiveQuestId(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=yield this.getAllActiveQuestIDs([k]);if(B.length<1)return void $.VyI.log("No active quests found for Daily Login Calendar",$.$bb.Error);const U=this.getCachedQuestIdByTag(k);if($.Aq$.isDefined(U))return U;const F=this._timeManager.getServerTimeMs();for(const G of B){const B=yield this.getQuestMetaData(G);if(new Date(B.startDate).getTime()k.taskProgress.status===tt.t.IN_PROGRESS)),G=(yield this.getActiveStandardTrackMetadata()).endDate,j=Math.min(null!==(B=null===(k=null==F?void 0:F.taskProgress.data)||void 0===k?void 0:k.progress)&&void 0!==B?B:G,G);return{targetDate:j,calendarIsEnding:j===G,calendarEnded:U>=G}}))}sendHudButtonData(){return(0,j.sH)(this,void 0,void 0,(function*(){const k=(yield this.getTimerData()).targetDate-W.q.instance.prodigy.gameContainer.get("a03-308f").getServerTimeMs();this._hudService.updateCachedLabelData(et.ts.LoginRewards,{labelValue:k})}))}};(0,j.Cg)([(0,z.b)("a03-308f"),(0,j.Sn)("design:type",Z.V)],st.prototype,"_timeManager",void 0),(0,j.Cg)([(0,z.b)("cc9-a3f0"),(0,j.Sn)("design:type",it.W)],st.prototype,"_hudService",void 0),st=(0,j.Cg)([(0,H.injectable)()],st)},55080:(k,B,U)=>{"use strict";U.d(B,{s:()=>gt});var F,G=U(8674),j=U(62459),$=U(79687),H=U(99625),V=U(10471),W=U(34656),q=U(64270),K=U(89067),z=U(98938),Y=U(58776),Q=U(8394),X=U(65240);!function(k){k.Bundle="bundle"}(F||(F={}));var Z=U(66582),J=U(88131),tt=U(35120),et=U(91620),it=U(40579),st=U(77938),nt=U(73797),at=U(46784),rt=U(65050),ot=U(41674),ht=U(90744),ct=U(13956),dt=U(21097),lt=U(53661),ut=U(10711),ft=U(55328),bt=U(64868),pt=U(43754),vt=U(79368);class gt extends vt.k{constructor(){super(...arguments),this._tags=[z.t.DynamicStore],this._defeatedPetOffers=[],this.onDefeatedPetOffersUpdated=new j.HN0,this.onStoreOffersUpdated=new j.HN0,this._nextStoreExpiryCache=-1,this._pendingOfferTriggers=[],this._triggeredOffersThisSession=[]}setup(){return(0,G.sH)(this,void 0,void 0,(function*(){this.updateDefeatedPetOffers().catch(j.RQr.createHandler("Could not get defeated pet offers.")),this.sendHudButtonData().catch(j.RQr.createHandler("DynamicStoreQuestManager: Could not send HUD button data."));tt.q.instance.prodigy.gameContainer.get("737-e070").onChange.add(this.questProgressCallback,this),this.preloadQuestProgress().catch(j.RQr.createHandler("Error preloading quest progress for dynamic store"))}))}cleanup(){this.onStoreOffersUpdated.dispose(),this.onDefeatedPetOffersUpdated.dispose(),super.cleanup()}getDefeatedPetOffers(){return this._defeatedPetOffers}getResetTime(){return this._resetTime}updateDefeatedPetOffers(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;this.forceEnableDataUpdate();const B=(yield this.getStoreOffers(q.GA.PetShop)).expect().sections.find((({id:k})=>k===q.Xx.DefeatedPets));if(!(null==B?void 0:B.expiresAt))return j.VyI.log("Could not find a valid Defeated Pets section in store, returning empty set",j.$bb.Error,B),{defeatedPetOffers:[],resetTime:new Date};this._resetTime=new Date(B.expiresAt),this._defeatedPetOffers=B.offers;const U={resetTime:this._resetTime,defeatedPetOffers:B.offers};return null===(k=this.onDefeatedPetOffersUpdated)||void 0===k||k.dispatch(U),this.sendHudButtonData().catch(j.RQr.createHandler("DynamicStoreQuestManager: Could not send HUD button data.")),U}))}getStoreOffers(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this._networkHandler.getStoreOffers(k)}))}getNextOfferExpiry(){return(0,G.sH)(this,void 0,void 0,(function*(){if(-1===this._nextStoreExpiryCache&&(this._nextStoreExpiryCache=yield this._networkHandler.getNextSectionExpiry()),this._segmentedOffers.userCanReceiveSegmentedOffers()){const k=yield this._segmentedOffers.getActiveOfferAsync();if(j.Aq$.isDefined(k)){const B=new Date(k.endDate).getTime();return Math.min(this._nextStoreExpiryCache,B)}}return this._nextStoreExpiryCache}))}purchaseItem(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;tt.q.instance.game.broadcaster.broadcast(nt.zg.PurchaseStarted);const{offer:U,storeKey:G,storeCategory:j,categoryId:$,itemSegmentData:H}=Object.assign({},k);yield this.preloadQuestProgress();const V=(0,ut.uA)(U,((k,B)=>{var U;return null===(U=st.t.getItem(k,B))||void 0===U?void 0:U.data})),q=W.j.getItemRewards(U.task),K=q[0],z=q.length>1,Y=(0,Q.p)(null!==(B=V.type)&&void 0!==B?B:"currency",V.currency),Z=this._segment.quests.beginQuestEventTransaction(),J=this._segment.shop.getDynamicStoreSourceId(G),et=this._segment.shop.startDynamicStoreTransaction(J),it="string"==typeof k.itemSegmentData.instance_id?k.itemSegmentData.instance_id:this._segment.featureCommon.getCurrentInterfaceID(at.B.UnifiedStore),ot=z?{bundleName:U.task.metadata.displayName}:void 0,ht=this.validateOfferPurchase(U);if(!ht.isSuccess())throw this.broadcastPurchaseFailed(ht.error),this._segment.shop.sendDynamicStorePurchaseFailedEvent({storeKey:G,itemType:z?F.Bundle:K.type,itemId:z?+U.task.id:K.ID,cost:V,category:j,categoryId:$,instanceId:it,bundleData:ot,failReason:ht.error,funnelId:this._segment.purchase.getFunnelID()}),new Error(`Error purchasing item: ${ht.error}`);this._lastTransactionStoreName=G;const ct=yield this._networkHandler.purchaseItem(U.task.id,et);if(!ct.activeQuests.find((k=>k.id===gt.STORE_QUEST_ID)))throw Z.flush({}),this.broadcastPurchaseFailed(dt.WE.ServerPurchaseFailed),new Error("Error purchasing item. Cloudscript item purchase did not go through");return Y||(yield this._paymentManager.spend(V,"dynamicStore",Object.assign(Object.assign({},H),{transaction_id:et,instance_type:rt.N.ShopVisit,instance_id:it,sink_id:J,sink_type:X.C.Shop,sink_name:G}))),this.forceEnableDataUpdate(),yield this.processQuestProgressResponse(ct,{customSegmentData:{instance_type:rt.N.ShopVisit,interface_name:at.B.UnifiedStore,transaction_id:et,instance_id:it,source_name:G}}),Z.flush(Object.assign(Object.assign({},H),{transaction_id:et,instance_type:rt.N.ShopVisit,instance_id:it,source_id:J,source_type:X.C.Shop,source_name:G,sink_id:J,sink_type:X.C.Shop,sink_name:G})),this._segment.shop.sendDynamicStorePurchaseCompletedEvent({storeKey:G,itemType:z?F.Bundle:K.type,itemId:z?+U.task.id:K.ID,cost:V,category:j,categoryId:$,instanceId:it,bundleData:ot}),tt.q.instance.prodigy.game.broadcaster.broadcast(nt.zg.PurchaseSuccessful),!0}))}sendHudButtonData(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=(yield this.getNextOfferExpiry())-tt.q.instance.prodigy.gameContainer.get("a03-308f").getServerTimeMs();this._hudService.updateCachedLabelData(K.ts.Shop,{labelValue:k});const B=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=this.getDefeatedPetOffers();let F=0;if(j.Aq$.isDefined(B.data.dynamicStore)){let k=0;for(const F of U)B.data.dynamicStore.seenOffers[F.task.id]&&++k;F=U.length-k}else F=U.length;this._hudService.updateNotificationBadge(K.ts.Shop,F)}))}getLastTransactionStore(){return this._lastTransactionStoreName}questProgressCallback(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(j.Aq$.isDefined(k.progressResponses))for(const B of k.progressResponses)yield this.processQuestProgressResponse(B)}))}validateOfferPurchase(k){var B,U;if((null!==(B=k.expiresAt)&&void 0!==B?B:1/0)<=tt.q.instance.prodigy.timeManager.getLocalTimeMs())return J.Q.error(dt.WE.OfferExpired);const F=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=(0,ut.uA)(k,((k,B)=>{var U;return null===(U=st.t.getItem(k,B))||void 0===U?void 0:U.data})),j=W.j.getItemRewards(k.task);if((0,ut.H9)(j)&&F.getMemberTier()===Z._$.NonMember)return J.Q.error(dt.WE.MemberLocked);if((0,ut.$U)(j,F.getLevel()))return J.Q.error(dt.WE.LevelLocked);if(!this._paymentManager.canAfford(G)){const k=(0,Q.p)(null!==(U=G.type)&&void 0!==U?U:"currency",G.currency);return J.Q.error(k?dt.WE.NotEnoughCurrency:dt.WE.NotEnoughUnsecureCurrency)}return J.Q.success(!0)}broadcastPurchaseFailed(k){tt.q.instance.game.broadcaster.broadcast(nt.zg.PurchaseFailed,void 0,[k])}queueStoreOfferTrigger(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=!1){if(this._triggeredOffersThisSession.includes(k)||!bt._.areBundlesEnabled())return;const U=(yield this.getTasksInProgress()).find((B=>B.taskID===k));if(j.Aq$.isDefined(U)){const k=U.taskDefinition;this._pendingOfferTriggers.push({questId:gt.STORE_QUEST_ID,task:k,progress:{id:k.id,status:Y.t.IN_PROGRESS}}),B&&(yield this.triggerCurrentOffer())}}))}canTriggerOffer(){return bt._.isFeatureEnabled()&&this._pendingOfferTriggers.length>0}triggerCurrentOffer(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._pendingOfferTriggers.shift();if(!j.Aq$.isDefined(k))return;const B=(0,ut.K8)([k])[0],U=B.dynamicStoreData.isNew,F=B.additionalItems.map((k=>({[lt.AP.ItemCardData]:{item:st.t.getItem(k.type,k.ID),quantity:k.N},[lt.AP.ItemCardIsNew]:U}))),G=(0,Q.p)("currency",B.currencyID)&&V.h.includes(B.currencyID)&&this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(B.currencyAmount),$=`bundle_${B.dynamicStoreData.offers[0].task.id}`,W={DYNAMIC_STORE_BUNDLE_OFFER_TITLE:B.dynamicStoreData.title,DYNAMIC_STORE_BUNDLE_OFFER_SUBTITLE:B.dynamicStoreData.subtitle,DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_DATA:[{PET_ID:B.item.ID}],DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_NAME:B.item.data.name,DYNAMIC_STORE_BUNDLE_ADDITIONAL_OFFERS:F,DYNAMIC_STORE_BUNDLE_PURCHASE_BUTTON_CALLBACK:()=>{this._segment.featureCommon.sendButtonEvent({buttonName:$,interfaceType:ot.Wm.Modal,interfaceName:$});const B={offer:k,storeKey:q.GA.OfferPopup,storeCategory:k.task.metadata.category,categoryId:k.task.metadata.category,itemSegmentData:{instance_type:rt.N.Interface,instance_id:this._segment.featureCommon.getCurrentInterfaceID(at.B.StoreBundlesPopup),sink_type:"bundle",sink_id:k.questId}};this.purchaseItem(B).catch(j.RQr.createHandler("Error purchasing triggered bundle"))},DYNAMIC_STORE_BUNDLE_PRICE_AMOUNT:B.currencyAmount,DYNAMIC_STORE_BUNDLE_PRICE_CURRENCY:B.currencyID,DYNAMIC_STORE_BUNDLE_IS_NEW:U,DYNAMIC_STORE_BUNDLE_HARD_CURRENCY_LOCKED:G};this._triggeredOffersThisSession.push(k.task.id),yield new Promise((k=>{tt.q.instance.prodigy.open.prefabMenu(H.l.StoreBundlePopup,k,void 0,void 0,void 0,Object.assign(Object.assign({},W),{BUNDLE_POPUP_INTERFACE_NAME:$}))}))}))}getCurrentQuestID(){return gt.OFFER_TRIGGER_QUEST_ID}}gt.STORE_QUEST_ID="DynamicStoreItems",gt.OFFER_TRIGGER_QUEST_ID="DynamicStoreOfferTriggers",(0,G.Cg)([(0,$.inject)("743-fd51"),(0,G.Sn)("design:type",ht.E)],gt.prototype,"_paymentManager",void 0),(0,G.Cg)([(0,$.inject)("9ea-3f44"),(0,G.Sn)("design:type",ft.v)],gt.prototype,"_networkHandler",void 0),(0,G.Cg)([(0,$.inject)("a02-c2b2"),(0,G.Sn)("design:type",et.D)],gt.prototype,"_segmentedOffers",void 0),(0,G.Cg)([(0,ct.b)("cc9-a3f0"),(0,G.Sn)("design:type",it.W)],gt.prototype,"_hudService",void 0),(0,G.Cg)([(0,ct.b)("5c7-e02d"),(0,G.Sn)("design:type",pt.W)],gt.prototype,"_hardCurrencyDataProvider",void 0)},53037:(k,B,U)=>{"use strict";U.d(B,{q:()=>gt});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U.n($),V=U(51540),W=U(57797),q=U(98938),K=U(58776),z=U(24522),Y=U(61468),Q=U(35120),X=U(13956),Z=U(69698),J=U(15821);class tt{constructor(k){this._experimentFeatureTaskIds=[],this._questId=k.questId,this._metaData=k.metadata,this._progressTasks=k.allTasks,this._questStates=k.states,this._videoAssets=k.videos,this._seenCompletedTasks=k.seenCompletedTasks,this.dataVersion=k.dataVersion}parseTaskData(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;const F=[],G=[];for(let j=0;j{var B,U;return k.taskProgress.status===K.t.COMPLETE||(null!==(U=null===(B=k.taskProgress.data)||void 0===B?void 0:B.progress)&&void 0!==U?U:0)>0}))}getQuestById(k){return this._progressTasks.find((B=>B.taskID===k))}getUnclaimedQuestCount(k,B=!0){let U=0,F=0,G=0,j=0,$=0,H=0;return this._progressTasks.filter((B=>{var U;return!k||(null===(U=B.taskDefinition.metadata)||void 0===U?void 0:U.questGoalType)===k})).forEach((k=>{var V,W,q;if(k.taskProgress.status!==K.t.COMPLETE)return;if(!B&&k.getTimeUntilExpiry()<0)return;const z=this._claimTasks.find((B=>B.taskID===`${k.taskID}-${gt.FESTIVAL_CLAIM_STRING}`));z&&(null==z?void 0:z.taskProgress.status)!==K.t.COMPLETE&&!(null===(V=null==z?void 0:z.taskProgress.data)||void 0===V?void 0:V.timesCompleted)&&(U++,(null===(W=k.taskDefinition.metadata)||void 0===W?void 0:W.isMemberLocked)?F++:G++,this._seenCompletedTasks.taskIds.includes(k.taskID)||(j++,(null===(q=k.taskDefinition.metadata)||void 0===q?void 0:q.isMemberLocked)?$++:H++))})),{unclaimedQuestCount:U,unclaimedMemberCount:F,unclaimedNonMemberCount:G,unseenQuestCount:j,unseenMemberCount:$,unseenNonMemberCount:H}}getVideoAsset(k){var B;const U=null===(B=this._metaData.videoTypes)||void 0===B?void 0:B[k];if(J.A.isDefined(U))return this._videoAssets[U]}updateSeenCompletedTasks(k,B){this._seenCompletedTasks=class{static updateSeenCompletedTasks(k,B,U){var F;const G=[];if(J.A.isDefined(k)&&B===k.festivalId)for(const j of null!==(F=k.taskIds)&&void 0!==F?F:[])G.includes(j)||G.push(j);for(const j of null!=U?U:[])G.includes(j)||G.push(j);return{festivalId:B,taskIds:G}}}.updateSeenCompletedTasks(this._seenCompletedTasks,k,B)}}var et,it=U(79368),st=U(89067),nt=U(40579),at=U(96535),rt=U(77938),ot=U(65240),ht=U(19586),ct=U(65068),dt=U(92240),lt=U(73797),ut=U(94310),ft=U(56567),bt=U(76277),pt=U(71698),vt=U(3374);let gt=et=class extends it.k{constructor(){super(...arguments),this.objectiveTypes=[ct.q.QuestState],this._tags=[q.t.Festival],this._latestDataVersion=0,this._lastProcessedVersion=0,this._getDataQueue=[],this.onDataChanged=new G.HN0,this.onSlowServerRequest=new G.HN0,this.onAllSlowServerRequestsCompleted=new G.HN0,this._currentSlowRequestCount=0,this._lastQuestEventTime=0,this._timeouts={},this._slowRequests={},this._requestCount=0}setup(){return(0,F.sH)(this,void 0,void 0,(function*(){this.onDataChanged.add((()=>{this.sendHudButtonData()})),Q.q.instance.game.broadcaster.addAppListener(lt.H3.MembershipResponseReceived,(()=>{this.sendHudButtonData()}),this),this.completePastFestivals(),yield this.getCurrentFestivalQuestData().catch(G.RQr.createHandler("Error getting quests for festival")),this.completeRootTask().catch(G.RQr.createHandler("Error completing root task for festival quests"));const k=Q.q.instance.prodigy.gameContainer.get("737-e070");this._festivalQuestEventHandler=k,this._festivalQuestEventHandler.onChange.add(this.questProgressCallback,this)}))}cleanup(){this.onDataChanged.dispose(),this.onSlowServerRequest.dispose(),this.onAllSlowServerRequestsCompleted.dispose(),this._festivalQuestEventHandler.onChange.remove(this.questProgressCallback,this),super.cleanup()}reenter(){this._currentFestivalQuests=void 0,this._getProgressPromise=void 0}getTasksInProgress(k,B,U){const G=Object.create(null,{getTasksInProgress:{get:()=>super.getTasksInProgress}});return(0,F.sH)(this,void 0,void 0,(function*(){const F=this.getCurrentQuestID()?[this.getCurrentQuestID()]:B;return G.getTasksInProgress.call(this,k,F,U)}))}getCurrentFestivalQuestData(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;if(void 0===this._currentFestivalQuests&&(yield this.updateFestivalQuestData()),null===this._currentFestivalQuests)return null;const B=this._latestDataVersion!==(null===(k=this._currentFestivalQuests)||void 0===k?void 0:k.dataVersion),U=this._getDataQueue.length>0;return(B||U)&&(yield new Promise((k=>this._getDataQueue.push(k)))),this._currentFestivalQuests}))}getCachedFestivalQuestData(){return this._currentFestivalQuests}completePastFestivals(){this._networkHandler.completePastFestivals().then((k=>{var B;if(!k)return;const U=Q.q.instance.prodigy.gameContainer.get("c47-20b6");null===(B=k.updatedFestivals)||void 0===B||B.forEach((k=>{var B,F;if(!k.metadata.festivalCurrencyId)return;const G=rt.t.getItem("currency",k.metadata.festivalCurrencyId),j=null!==(F=null===(B=this._activePlayer.backpack.getItem(G.type,G.ID))||void 0===B?void 0:B.N)&&void 0!==F?F:0;this._activePlayer.backpack.consume("currency",k.metadata.festivalCurrencyId,9999999),U.item.sendItemRemovedEvent(G.ID,G.name,G.type,j,{sink_type:ot.C.FestivalCurrencyConversion,sink_id:G.ID,source_type:ot.C.FestivalCurrencyConversion,instance_type:k.id,instance_id:k.id})})),k.updatedFestivals.length>0&&this._activePlayer.forceSaveCharacter()})).catch(G.RQr.createHandler("Error completing past festivals"))}updateFestivalQuestData(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,j;this._latestDataVersion++;const $=this._latestDataVersion;let H=null;const V=(0,bt.G)(pt.o);if(!V.enabled)return this._currentFestivalQuests=null,void this.dispatchAndClearQueue();{const G=yield this.getAllActiveQuestIDs(),j=this._timeManager.getServerTimeMs();for(const $ of G){const G=yield this.getQuestMetaData($),W=null!==(B=null===(k=null==V?void 0:V.startDates)||void 0===k?void 0:k[$])&&void 0!==B?B:new Date(G.startDate).getTime(),q=null!==(F=null===(U=null==V?void 0:V.endDates)||void 0===U?void 0:U[$])&&void 0!==F?F:new Date(G.endDate).getTime();if(W{$===this._latestDataVersion&&(this._currentFestivalQuests=Q,this.dispatchAndClearQueue())}),0))}))}dispatchAndClearQueue(){var k;for(this.onDataChanged.dispatch();this._getDataQueue.length>0;)null===(k=this._getDataQueue.shift())||void 0===k||k.call(null)}shouldSendQuestEvents(k,B,U){const G=Object.create(null,{shouldSendQuestEvents:{get:()=>super.shouldSendQuestEvents}});return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.isFestivalLocked())?[]:G.shouldSendQuestEvents.call(this,k,B,U)}))}preSendQuestEventViaHub(k,B){const U=Object.create(null,{preSendQuestEventViaHub:{get:()=>super.preSendQuestEventViaHub}});return(0,F.sH)(this,void 0,void 0,(function*(){if(!this.getCurrentQuestID())return{manager:this,questIDs:[],tags:[]};if(yield this.isFestivalLocked())return{manager:this,questIDs:[],tags:[]};const F=yield this.festivalPreSendQuestEvent(),G=yield U.preSendQuestEventViaHub.call(this,k,B);return Object.assign(Object.assign({},G),{requestID:F})}))}festivalPreSendQuestEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){this._lastQuestEventTime=Date.now(),this._requestCount+=1;const k=this._requestCount;return this._slowRequests[k]=!1,this._timeouts[k]=window.setTimeout((()=>{this._slowRequests[k]=!0,this._currentSlowRequestCount++,Date.now()>=this._lastQuestEventTime+1500&&this.onSlowServerRequest.dispatch()}),1500),k}))}sendQuestEvent(k,B,U){const G=Object.create(null,{sendQuestEvent:{get:()=>super.sendQuestEvent}});return(0,F.sH)(this,void 0,void 0,(function*(){var U;const F=null!==(U=this._currentFestivalQuests)&&void 0!==U?U:yield this.getCurrentFestivalQuestData(),j=null==F?void 0:F.getQuestID();if(!j)return{activeQuests:[],inactiveQuests:[]};const $=yield this.festivalPreSendQuestEvent(),H=yield G.sendQuestEvent.call(this,k,B,[j]);return yield this.festivalPostSendQuestEvent(H,$),H}))}postSendQuestEventViaHub(k,B){const U=Object.create(null,{postSendQuestEventViaHub:{get:()=>super.postSendQuestEventViaHub}});return(0,F.sH)(this,void 0,void 0,(function*(){(yield this.isFestivalLocked())||(this._currentFestivalQuests||(yield this.getCurrentFestivalQuestData()))&&(yield U.postSendQuestEventViaHub.call(this,k),yield this.festivalPostSendQuestEvent(k,B))}))}festivalPostSendQuestEvent(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U;if(k&&k.activeQuests.length>0){const k=null!==(U=this._currentFestivalQuests)&&void 0!==U?U:yield this.getCurrentFestivalQuestData();yield this.updateQuestDataAndProcessDifferences(k)}B&&(this._timeouts[B]&&(window.clearTimeout(this._timeouts[B]),delete this._timeouts[B]),void 0!==this._slowRequests[B]&&(this._slowRequests[B]&&(this._currentSlowRequestCount--,0===this._currentSlowRequestCount&&this.onAllSlowServerRequestsCompleted.dispatch()),delete this._slowRequests[B]))}))}questProgressCallback(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B;if(yield this.isFestivalLocked())return;if(!k.progressResponses)return;for(const F of k.progressResponses)yield this.processQuestProgressResponse(F);const U=null!==(B=this._currentFestivalQuests)&&void 0!==B?B:yield this.getCurrentFestivalQuestData();U&&(yield this.updateQuestDataAndProcessDifferences(U))}))}updateQuestDataAndProcessDifferences(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.updateFestivalQuestData();const B=yield this.getCurrentFestivalQuestData();null!==B&&B.dataVersion!==this._lastProcessedVersion&&(this.processQuestProgress(k,B),this._lastProcessedVersion=B.dataVersion)}))}processQuestProgress(k,B){const U=[],F=[];null==k||k.getProgressTasks().forEach((k=>{k.taskProgress.status===K.t.COMPLETE?U.push(k.taskID):k.taskProgress.status===K.t.IN_PROGRESS&&F.push(k)}));const j=[],$=[];null==B||B.getProgressTasks().forEach((k=>{k.taskProgress.status===K.t.COMPLETE?j.push(k.taskID):k.taskProgress.status===K.t.IN_PROGRESS&&$.push(k)})),U.forEach((k=>{const B=this._currentFestivalQuests.getClaimTasks().find((B=>B.taskID===`${k}-${et.FESTIVAL_CLAIM_STRING}`));if(B&&B.taskProgress.status!==K.t.COMPLETE){Q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.viewedProgressMenu=!1}}));const H=Q.q.instance.prodigy.gameContainer.get("c47-20b6"),V=Y.l.getAddedItems(U,j);V.forEach((k=>{var U;const F=null==B?void 0:B.getTasks().find((B=>B.taskID===k));if(F&&(H.festival.sendQuestGoalCompleteEvent(F),this.canSendToaster(F)&&Q.q.instance.prodigy.notifications.initGenericNotification(ht._.FESTIVALQUESTGOALCOMPLETED)),(null===(U=null==F?void 0:F.taskDefinition.metadata)||void 0===U?void 0:U.questGoalType)===W.xK.Story&&F.taskDefinition.metadata.storyMetadata){let k=F.taskDefinition.metadata.storyMetadata.segmentFunnelStepName;k||(k=F.taskID),H.festival.sendFestivalFunnelAdvancedEvent(k)}}));const q=[...V];$.forEach((k=>{var B,U,G,j,$,V,W,K;let Y=null===(G=null===(U=null===(B=k.taskDefinition.preconditions)||void 0===B?void 0:B.find((k=>k.type===z.n.DATE_BEFORE)))||void 0===U?void 0:U.data)||void 0===G?void 0:G.date;Y||(Y=new Date(this._currentFestivalQuests.getEndDate()).toISOString());const Q=F.find((B=>B.taskID===k.taskID)),X=null!==($=null===(j=null==Q?void 0:Q.taskProgress.data)||void 0===j?void 0:j.progress)&&void 0!==$?$:0;X!==(null===(V=k.taskProgress.data)||void 0===V?void 0:V.progress)&&(H.festival.sendQuestGoalUpdatedEvent(k,(null!==(K=null===(W=k.taskProgress.data)||void 0===W?void 0:W.progress)&&void 0!==K?K:0)-X,Y),q.push(k.taskID))})),this.processMainObjective(q).catch(G.RQr.createHandler("Error processing Festival main objective"))}sendRewardClaimedEvent(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;const F=(null!==(U=null===(B=this._currentFestivalQuests)||void 0===B?void 0:B.getClaimTasks())&&void 0!==U?U:[]).find((B=>B.taskID===k));F?yield this.sendQuestEvent(F.type,Object.assign({},F.taskDefinition.completionRequirements.data)):G.VyI.log(`FestivalQuestManager.sendRewardClaimedEvent: claim task not found for ${k}`,G.$bb.Error)}))}getClaimTask(k){var B,U;const F=[],G=null!==(U=null===(B=this._currentFestivalQuests)||void 0===B?void 0:B.getClaimTasks())&&void 0!==U?U:[];for(let j=0;j"root"===k.taskID));B&&(yield this.sendQuestEvent(B.type,Object.assign({},B.taskDefinition.completionRequirements.data)))}))}getCurrentQuestID(){if(this._currentFestivalQuests)return this._currentFestivalQuests.getQuestID()}getProgressTasks(){var k,B;return null!==(B=null===(k=this._currentFestivalQuests)||void 0===k?void 0:k.getProgressTasks())&&void 0!==B?B:[]}getProgressTaskCount(k){var B,U;return null!==(U=null===(B=this._currentFestivalQuests)||void 0===B?void 0:B.getProgressTasks().filter((B=>{var U;return k&&(null===(U=B.taskDefinition.metadata)||void 0===U?void 0:U.questGoalType)===k&&!B.taskDefinition.metadata.isHiddenQuest&&B.getTimeUntilExpiry()>=0})).length)&&void 0!==U?U:0}getAllProgressTaskCounts(){var k;const B={};return null===(k=this._currentFestivalQuests)||void 0===k||k.getProgressTasks().forEach((k=>{var U,F;const G=null===(U=k.taskDefinition.metadata)||void 0===U?void 0:U.questGoalType;G&&(B[G]=(null!==(F=B[G])&&void 0!==F?F:0)+1)})),B}getCompletedTaskCount(k,B,U,F){let G=0;return this.getProgressTasks().forEach((j=>{var $,H,V,W;if(j.taskProgress.status===K.t.COMPLETE){if("root"===j.taskID||(null===($=j.taskDefinition.metadata)||void 0===$?void 0:$.isHiddenQuest))return;if(!F&&j.getTimeUntilExpiry()<0)return;if(k&&(null===(H=j.taskDefinition.metadata)||void 0===H?void 0:H.questGoalType)!==k)return;if(B&&(null===(V=j.taskDefinition.metadata)||void 0===V?void 0:V.questGoalTaskType)!==B)return;if(U){const k=this.getClaimTask(j.taskID);if(k.taskProgress.status!==K.t.COMPLETE&&!(null===(W=k.taskProgress.data)||void 0===W?void 0:W.timesCompleted))return}G++}})),G}getStoryTaskCount(){var k,B;return null!==(B=null===(k=this._currentFestivalQuests)||void 0===k?void 0:k.getProgressTasks().filter((k=>{var B;return(null===(B=k.taskDefinition.metadata)||void 0===B?void 0:B.questGoalTaskType)===W.wD.STORY&&!k.taskDefinition.metadata.isHiddenQuest&&k.getTimeUntilExpiry()>=0})).length)&&void 0!==B?B:0}isFestivalTaskCompleted(k){var B,U;return(null===(U=null===(B=this._currentFestivalQuests)||void 0===B?void 0:B.getTasks().find((B=>B.taskDefinition.id===k)))||void 0===U?void 0:U.taskProgress.status)===K.t.COMPLETE}willFestivalTaskComplete(k,B,U){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U,F=1){var G,j;let $;const H=this.getCurrentQuestID();H&&($=[H]);const V=(yield this.getTasksInProgress(this._tags,$)).find((B=>B.taskDefinition.id===k));return!(!(null==V?void 0:V.eventMatchesTask(B,U))||!(null==V?void 0:V.taskDefinition.completionRequirements.data.target))&&((null===(G=V.taskProgress.data)||void 0===G?void 0:G.progress)?V.taskProgress.status===K.t.IN_PROGRESS&&(null===(j=V.taskProgress.data)||void 0===j?void 0:j.progress)>=V.taskDefinition.completionRequirements.data.target-F:V.taskDefinition.completionRequirements.data.target-F<=0)}))}sendHudButtonData(){this.getCurrentFestivalQuestData().then((k=>{if(!J.A.isDefined(k))return;const{unclaimedQuestCount:B,unclaimedNonMemberCount:U,unseenMemberCount:F}=k.getUnclaimedQuestCount();if(this._hudService.updateNotificationBadge(st.ts.Festival,this._activePlayer.hasMembership()?B:U+F),this._activePlayer.hasMembership()&&B>0||U>0){const k=Q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);this._hudService.updateCachedLabelData(st.ts.Festival,{labelValue:k.getText("PLUS_ULTRA_BONUS_COLLECT")})}else{const B=Q.q.instance.prodigy.gameContainer.get("a03-308f"),U=k.getEndDate()-B.getServerTimeMs();this._hudService.updateCachedLabelData(st.ts.Festival,{labelValue:U})}})).catch(G.RQr.createHandler("FestivalQuestManager: Could not send hud button data."))}canSendToaster(k){var B,U,F,G,j;return!0!==(null===(B=k.taskDefinition.metadata)||void 0===B?void 0:B.isHiddenQuest)&&(null===(U=k.taskDefinition.metadata)||void 0===U?void 0:U.questGoalTaskType)!==W.wD.CLAIM&&(null===(F=k.taskDefinition.metadata)||void 0===F?void 0:F.questGoalType)!==W.xK.Story&&(null===(G=k.taskDefinition.metadata)||void 0===G?void 0:G.questGoalType)!==W.xK.Coop&&!0!==(null===(j=k.taskDefinition.metadata)||void 0===j?void 0:j.isExperimentGate)&&"root"!==k.taskDefinition.id}isFestivalInTimeframe(){var k;const B=null===(k=this._currentFestivalQuests)||void 0===k?void 0:k.getMetadata(),U=this._timeManager.getServerTimeMs();return void 0!==B&&new Date(B.startDate).getTime()super.isCutsceneTaskInProgress}});return(0,F.sH)(this,void 0,void 0,(function*(){return!!this.isFestivalInTimeframe()&&U.isCutsceneTaskInProgress.call(this,k,B)}))}setupValidTasks(k,B){const U=Object.create(null,{setupValidTasks:{get:()=>super.setupValidTasks}});return(0,F.sH)(this,void 0,void 0,(function*(){if(!(yield this.isFestivalLocked()))return this.isFestivalInTimeframe()?U.setupValidTasks.call(this,k,B):Promise.resolve()}))}markCompletedTasksSeen(k){var B,U,F;const j=[];for(const G of this.getProgressTasks())k&&(null===(U=null===(B=G.taskDefinition)||void 0===B?void 0:B.metadata)||void 0===U?void 0:U.questGoalType)!==k||G.taskProgress.status===K.t.COMPLETE&&j.push(G.taskID);const $=this.getCurrentQuestID();void 0!==$&&(this._networkHandler.setCompletedTasksSeen($,j).catch(G.RQr.createHandler("Error setting completed festival tasks as seen")),null===(F=this._currentFestivalQuests)||void 0===F||F.updateSeenCompletedTasks($,j),this.sendHudButtonData())}processMainObjective(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;if(void 0===this.getCurrentQuestID()||!this._currentFestivalQuests)return;const F=yield dt.h.calculateStateWithPreconditions(ut.L.MainObjective,this._currentFestivalQuests.getStates(),this._currentFestivalQuests.getTasks().map((k=>k.taskProgress)),new ft.f);H().isEqual(this._mainObjectiveState,F)&&!k.includes(null===(U=null===(B=this._mainObjectiveState)||void 0===B?void 0:B.objective)||void 0===U?void 0:U.progressTaskId)||(this._mainObjectiveState=F,Q.q.instance.game.broadcaster.broadcast(lt.GR.ObjectiveUpdated))}))}getObjectives(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U,F;if(void 0===this.getCurrentQuestID()||!this._currentFestivalQuests)return[];if(yield this.isFestivalLocked())return[];if(this._mainObjectiveState=yield dt.h.calculateStateWithPreconditions(ut.L.MainObjective,this._currentFestivalQuests.getStates(),this._currentFestivalQuests.getTasks().map((k=>k.taskProgress)),new ft.f),!(null===(k=this._mainObjectiveState)||void 0===k?void 0:k.objective))return[];const j=Q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),$=null!==(B=this._mainObjectiveState.objective.localizationKey?j.getText(this._mainObjectiveState.objective.localizationKey):this._mainObjectiveState.objective.text)&&void 0!==B?B:"";let H;if(J.A.isDefined(this._mainObjectiveState.objective.progressTaskId)){const k=yield this.getQuestProgress(this.getCurrentQuestID()),B=null===(U=null==k?void 0:k.tasks)||void 0===U?void 0:U.find((k=>k.id===this._mainObjectiveState.objective.progressTaskId)),G=this._currentFestivalQuests.getTasks().find((k=>k.taskID===this._mainObjectiveState.objective.progressTaskId));J.A.isDefined(null===(F=null==B?void 0:B.data)||void 0===F?void 0:F.progress)&&J.A.isDefined(null==G?void 0:G.taskDefinition.completionRequirements.data.target)&&(H={current:B.data.progress,target:G.taskDefinition.completionRequirements.data.target})}return[{id:this._mainObjectiveState.objective.id,text:$,type:ct.q.QuestState,location:this._mainObjectiveState.objective.location,guideHand:this._mainObjectiveState.objective.guideHand,progress:H}]}))}};gt.FESTIVAL_ROOT_TASK_ID="root",gt.FESTIVAL_CLAIM_STRING="claim",(0,F.Cg)([(0,X.b)("4fd-fef7"),(0,F.Sn)("design:type",V.v)],gt.prototype,"_networkHandler",void 0),(0,F.Cg)([(0,X.b)("a03-308f"),(0,F.Sn)("design:type",Z.V)],gt.prototype,"_timeManager",void 0),(0,F.Cg)([(0,X.b)("306-5359"),(0,F.Sn)("design:type",at.W)],gt.prototype,"_activePlayer",void 0),(0,F.Cg)([(0,X.b)("4fc-916d"),(0,F.Sn)("design:type",vt.C)],gt.prototype,"_videosDataProvider",void 0),(0,F.Cg)([(0,X.b)("cc9-a3f0"),(0,F.Sn)("design:type",nt.W)],gt.prototype,"_hudService",void 0),gt=et=(0,F.Cg)([(0,j.injectable)()],gt)},87761:(k,B,U)=>{"use strict";U.d(B,{B:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(79368);class H extends $.k{constructor(){super(...arguments),this._legacyQuestIdTracker=void 0}processQuestProgressResponse(k){const B=Object.create(null,{processQuestProgressResponse:{get:()=>super.processQuestProgressResponse}});return(0,F.sH)(this,void 0,void 0,(function*(){yield B.processQuestProgressResponse.call(this,k),this.updateQuestTracker()}))}updateQuestProgress(k){const B=Object.create(null,{updateQuestProgress:{get:()=>super.updateQuestProgress}});return(0,F.sH)(this,void 0,void 0,(function*(){this._getProgressDirty=!0,yield B.updateQuestProgress.call(this,k)}))}preSendQuestEventViaHub(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U;return(null===(U=j.q.instance.prodigy.world.getCurrentZoneObject())||void 0===U?void 0:U.difficultyMode)===this._difficultyMode&&(yield this.sendQuestEvent(k,B)),{manager:this,questIDs:[],tags:[]}}))}sendQuestEvent(k,B,U){const G=Object.create(null,{sendQuestEvent:{get:()=>super.sendQuestEvent}});return(0,F.sH)(this,void 0,void 0,(function*(){var F,j;return null!==(F=this._legacyQuestIdTracker)&&void 0!==F||(this._legacyQuestIdTracker=null===(j=this.getZoneObject())||void 0===j?void 0:j.getCurrentQuestID()),G.sendQuestEvent.call(this,k,B,U)}))}getZoneObject(){const k=j.q.instance.prodigy.world.getZone(this._zoneId);if(G.Aq$.isDefined(k))return k;G.VyI.log("No zone found for local zone quest manager",G.$bb.Warning)}getCurrentQuestIDAndSequence(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;return null===(k=(yield this.getTasksInProgress())[0])||void 0===k?void 0:k.taskID.toString()}))}updateQuestTracker(){const k=this.getZoneObject();if(!k)return;const B=k.getCurrentQuestID();if(G.Aq$.isDefined(B)&&B!==this._legacyQuestIdTracker){const U=j.q.instance.prodigy.gameContainer.get("c47-20b6");k.allQuestsAreComplete?U.quests.sendZoneQuestlineCompleteEvent(this._zoneId):U.quests.sendZoneQuestStartedEvent(this._zoneId,B),this._legacyQuestIdTracker=B}}}},3606:(k,B,U)=>{"use strict";U.d(B,{n:()=>et});var F=U(8674),G=U(62459),j=U(13027),$=U(70472);class H extends $.A{constructor(k,B,U,F){super(k,B,U),this.awardTask=F}}var V=U(98938),W=U(58776),q=U(62886),K=U(35120),z=U(1195),Y=U(3032),Q=U(73797),X=U(13956),Z=U(30226),J=U(79368),tt=U(56567);class et extends J.k{get awardAvailable(){return this._awardAvailable}get awardsAvailableCount(){return this._awardsAvailableCount}get availableTasks(){return this._availableTasks}get isQuestComplete(){return this._questComplete}get sendQuestEventPromise(){return this._sendQuestEventPromise}constructor(){super(),this._awardAvailable=!1,this.onDataChanged=new G.HN0,this._awardsAvailableCount=0,this._questComplete=!1,this._tags=[V.t.PlayerGoals],K.q.instance.game.broadcaster.addAppListener(Q.Ii.Victory,(()=>{this.onVictory().catch(G.RQr.createHandler("PlayerGoalsQuestManager.onVictory"))}),this,void 0,!0)}sendQuestEvent(k,B,U){const G=Object.create(null,{sendQuestEvent:{get:()=>super.sendQuestEvent}});return(0,F.sH)(this,void 0,void 0,(function*(){const F=yield G.sendQuestEvent.call(this,k,B,U);return this.onDataChanged.dispatch(null==B?void 0:B.id),F}))}onVictory(){return(0,F.sH)(this,void 0,void 0,(function*(){this.isQuestComplete||(yield this.sendQuestEvent(q.T.WIN_ANY_BATTLE,{}))}))}preloadQuestProgress(){const k=Object.create(null,{preloadQuestProgress:{get:()=>super.preloadQuestProgress}});return(0,F.sH)(this,void 0,void 0,(function*(){yield k.preloadQuestProgress.call(this),yield this.updateFlags()}))}processQuestProgressResponse(k){const B=Object.create(null,{processQuestProgressResponse:{get:()=>super.processQuestProgressResponse}});return(0,F.sH)(this,void 0,void 0,(function*(){yield B.processQuestProgressResponse.call(this,k),yield this.updateFlags()}))}updateFlags(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.getQuestProgress(et.PLAYER_GOALS_QUEST_ID);this._questTasks=yield this.getQuestTasks(et.PLAYER_GOALS_QUEST_ID);const B=yield this.getTasksInProgress([V.t.PlayerGoals]),U=this.sortByQuestOrder(this._questTasks),F=yield this.filterByPreconditions(U);if(this._pairedTasks=this.pairTasks(F),this._surfacedTasks=this.filterCompletedTasks(this._pairedTasks),this._availableTasks=this._pairedTasks.filter((k=>k.taskProgress.status!==W.t.COMPLETE||(null==k?void 0:k.awardTask.taskProgress.status)!==W.t.COMPLETE)),this._questComplete=(null==k?void 0:k.status)===W.t.COMPLETE||0===B.length,this._questComplete)return this._awardAvailable=!1,void(this._awardsAvailableCount=0);const G=this.filterByAwardTasks(yield this.getTasksInProgress([V.t.PlayerGoals])),j=[];this.surfacedTasks.forEach((k=>j.push(null==k?void 0:k.awardTask)));const $=G.filter((k=>j.some((B=>B.taskID===k.taskID))&&this.shouldAwardAutoSurface(k)));this._awardAvailable=$.length>0,this._awardsAvailableCount=$.length}))}get surfacedTasks(){return this._surfacedTasks}get pairedTasks(){return this._pairedTasks}isTaskComplete(k){return(null==k?void 0:k.taskProgress.status)===W.t.COMPLETE}isGoalTask(k){var B;return(null===(B=null==k?void 0:k.taskDefinition.prerequisites)||void 0===B?void 0:B[0])===et.PLAYER_GOALS_START_QUEST_TASK_ID}isAwardTask(k){var B;const U=null===(B=k.taskDefinition.prerequisites)||void 0===B?void 0:B[0];return G.Aq$.isDefined(U)&&U!==et.PLAYER_GOALS_START_QUEST_TASK_ID}isAwardBlocked(k){return!!et.BLOCK_AWARD_IN_TUTORIAL.includes(k.taskID)&&(this.isAwardTask(k)&&!this._loggedInPlayer.player.hasCompletedTutorial())}shouldAwardAutoSurface(k){return et.BLOCK_AUTO_SURFACE_BEFORE_TUTORIAL_COMPLETE.includes(k.taskID)?this.isAwardTask(k)&&this._loggedInPlayer.player.hasCompletedTutorial():this.isAwardTask(k)}sortByQuestOrder(k){const B=k.concat(),U=Object.values(j.k);return B.sort(((k,B)=>U.indexOf(k.taskID)-U.indexOf(B.taskID)))}filterByPreconditions(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=k.concat(),U=new tt.f;return Z.J.asyncFilter(B,(k=>(0,F.sH)(this,void 0,void 0,(function*(){let B=!0;if(!this._loggedInPlayer.areLoginCredentialsValid()&&k.taskID===j.k.ProfileQuiz||!this._loggedInPlayer.areLoginCredentialsValid()&&k.taskID===j.k.ProfileQuizGotItem)return!1;for(const F of k.taskDefinition.preconditions||[])if(B=yield U.check(F.type,F.data),!B)break;return B}))))}))}filterByGoalTasks(k){return k.filter((k=>this.isGoalTask(k)))}filterByAwardTasks(k){return k.filter((k=>this.isAwardTask(k)))}filterCompletedTasks(k,B=4){const U=k.concat();for(;U.length>B&&this.isTaskComplete(U[0].awardTask);)U.shift();return U.length=B,U}pairTasks(k){const B=k.concat(),U=[],F=this.filterByGoalTasks(B),G=this.filterByAwardTasks(B);return F.forEach((k=>{const B=G.find((B=>{var U;return k.taskID===(null===(U=B.taskDefinition.prerequisites)||void 0===U?void 0:U[0])})),F=new H(k.questID,k.taskDefinition,k.taskProgress,B);U.push(F)})),U}getBattleGoal(){switch(this._loggedInPlayer.player.getQuestSystem("playerGoals")){case Y.p.PlayerGoalsFtue:return j.k.BattleTwoGotItem;case Y.p.PlayerGoalsPostFtue:case Y.p.RevisedWithPlayerGoals:case Y.p.Revised:case Y.p.Legacy:default:return j.k.BattleTwoGotItemB}}getParentAttachGoal(){switch(this._loggedInPlayer.player.getQuestSystem("playerGoals")){case Y.p.PlayerGoalsPostFtue:return j.k.ParentAttachB;case Y.p.PlayerGoalsFtue:case Y.p.RevisedWithPlayerGoals:case Y.p.Revised:case Y.p.Legacy:default:return j.k.ParentAttach}}hasCompletedBattles(){return this.isTaskComplete(this._pairedTasks.find((k=>k.taskID===this.getBattleGoal()||k.awardTask.taskID===this.getBattleGoal())))}hasAttachedParent(){return this.isTaskComplete(this._pairedTasks.find((k=>k.taskID===this.getParentAttachGoal()||k.awardTask.taskID===this.getParentAttachGoal())))}hasAttachedClassCode(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.isTaskComplete(this._pairedTasks.find((k=>k.taskID===j.k.ClassCode)))}))}isPrizeReady(k){return this.isTaskComplete(k)&&!this.isTaskComplete(k.awardTask)&&!this.isAwardBlocked(k.awardTask)}cleanup(){this.onDataChanged.dispose(),super.cleanup()}}et.BLOCK_AUTO_SURFACE_BEFORE_TUTORIAL_COMPLETE=[j.k.ParentAttachGotItem,j.k.ParentAttachGotItemB,j.k.PlayAfterHoursGotItem,j.k.ClassCode,j.k.ClassCodeGotItem],et.BLOCK_AWARD_IN_TUTORIAL=[j.k.PlayAfterHoursGotItem,j.k.ClassCodeGotItem],et.PLAYER_GOALS_QUEST_ID="FtuePlayerGoalQuests",et.PLAYER_GOALS_START_QUEST_TASK_ID=1,(0,F.Cg)([(0,X.b)("e20-0fb0"),(0,F.Sn)("design:type",z.E)],et.prototype,"_loggedInPlayer",void 0)},3001:(k,B,U)=>{"use strict";U.d(B,{n:()=>Q});var F=U(8674),G=U(62459),j=U(79687),$=U(28628),H=U(98938),V=U(62886),W=U(60157),q=U(35120),K=U(13956),z=U(63536),Y=U(80434);let Q=class{constructor(){this._questManagerMap=new Map,this.managerSetupPromise=new Promise((k=>{this._onSetupComplete=k}))}get questManagerMap(){return this._questManagerMap}init(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.setup()}))}setup(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=q.q.instance.prodigy.gameContainer;this._questManagerMap.set(H.t.BattlePass,k.get("8dc-04eb")),this._questManagerMap.set(H.t.Festival,k.get("99d-5e9e")),this._questManagerMap.set(H.t.ZoneQuests,k.get("f91-8211")),this._questManagerMap.set(H.t.DailyLoginCalendar,k.get("a71-dfcf")),this._questManagerMap.set(H.t.PlayerGoals,k.get("d65-d7bb")),this._questManagerMap.set(H.t.DynamicStore,k.get("7a1-ff33")),Object.values(Y.n).forEach((B=>{this._questManagerMap.set(B.questTag,k.get(B.injectionKey))})),yield Promise.all(Array.from(this._questManagerMap.values()).map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return k.setup()}))))),q.q.instance.prodigy.education.onQuestionAnswered.add(this.onQuestionAnswered,this),setInterval((()=>{this.sendQuestEventViaHub(V.T.PLAY_MINUTES,{progressToAdd:5}).catch(G.RQr.createHandler("Unable to send PlayMinutes quest event"))}),3e5),this._onSetupComplete()}))}sendQuestEventViaHub(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=this._segment.quests.beginQuestEventTransaction(),G=yield Promise.all(Array.from(this._questManagerMap,(U=>(0,F.sH)(this,[U],void 0,(function*([,U]){return U.preSendQuestEventViaHub(k,B)}))))),j=new Set,$=new Set;for(const k of G)k.questIDs.forEach((k=>j.add(k))),k.tags.forEach((k=>$.add(k)));const H=Array.from(j),V=Array.from($);let W;H.length>0&&V.length>0&&(W=yield this._questNetworkHandler.sendQuestEvent({eventType:k,eventData:B,questIDs:H,tags:V})),yield Promise.all(G.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return k.manager.postSendQuestEventViaHub(W,k.requestID)}))))),U.flush({})}))}getBattleStartQuestData(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U={params:{taskEventType:W.Z7.Battle,battleType:null!=k?k:$.gu.Basic,battleSubType:B,allies:[],enemies:[]}},F=[V.T.PLAY_ANY_BATTLE,V.T.WIN_ANY_BATTLE,V.T.LOSE_ANY_BATTLE],G=yield this.shouldSendQuestEvents(F,U);return{questIDs:G.ids,questEvents:G.events}}))}getCurrentQuestIDs(){const k=[];return this._questManagerMap.forEach((B=>{const U=B.getCurrentQuestID();U&&k.push(U)})),k}shouldSendQuestEvents(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=yield Promise.all(Array.from(this._questManagerMap,(U=>(0,F.sH)(this,[U],void 0,(function*([,U]){const F=yield U.shouldSendQuestEvents(k,B);return{id:U.getCurrentQuestID(),taskTypes:F}}))))),G=new Set,j=new Set;for(const k of U)k.id&&k.taskTypes.length>0&&(G.add(k.id),k.taskTypes.forEach((k=>j.add(k))));return{ids:Array.from(G),events:Array.from(j)}}))}onQuestionAnswered(k){return(0,F.sH)(this,void 0,void 0,(function*(){k?yield this.sendQuestEventViaHub(V.T.ANSWER_QUESTION_CORRECTLY,{}):yield this.sendQuestEventViaHub(V.T.ANSWER_QUESTION_INCORRECTLY,{})}))}reenter(){q.q.instance.prodigy.education.onQuestionAnswered.remove(this.onQuestionAnswered,this),this._questManagerMap.forEach((k=>{k.cleanup(),k.reenter()})),this.init()}isCutsceneTaskInProgress(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=yield Promise.all(Array.from(this._questManagerMap.values()).map((k=>(0,F.sH)(this,void 0,void 0,(function*(){const B=k.getCurrentQuestID();return k.isCutsceneTaskInProgress(void 0,B?[B]:[])})))));return null!==(k=null==B?void 0:B.some((k=>!0===k)))&&void 0!==k&&k}))}setupValidTasks(){return(0,F.sH)(this,void 0,void 0,(function*(){yield Promise.all(Array.from(this._questManagerMap.values()).map((k=>(0,F.sH)(this,void 0,void 0,(function*(){const B=k.getCurrentQuestID();return k.setupValidTasks(void 0,B?[B]:[])})))))}))}getTasksInProgress(){return(0,F.sH)(this,arguments,void 0,(function*(k=[]){const B=new Map;return 0===k.length?yield Promise.all(Array.from(this._questManagerMap,(k=>(0,F.sH)(this,[k],void 0,(function*([k,U]){const F=yield U.getTasksInProgress();B.set(k,F)}))))):yield Promise.all(Array.from(this._questManagerMap,(U=>(0,F.sH)(this,[U],void 0,(function*([U,F]){var G;if(k.includes(U)){const k=null!==(G=yield null==F?void 0:F.getTasksInProgress())&&void 0!==G?G:[];B.set(U,k)}}))))),B}))}};(0,F.Cg)([(0,K.b)("a6a-6157"),(0,F.Sn)("design:type",z.$)],Q.prototype,"_questNetworkHandler",void 0),(0,F.Cg)([(0,K.b)("c47-20b6"),(0,F.Sn)("design:type",Function)],Q.prototype,"_segment",void 0),Q=(0,F.Cg)([(0,j.injectable)()],Q)},76846:(k,B,U)=>{"use strict";U.d(B,{C:()=>z});var F=U(8674),G=U(79687),j=U(98938),$=U(8820),H=U(2980),V=U(59219),W=U(79368),q=U(24030),K=U(4766);class z extends W.k{constructor(){super(...arguments),this._tags=[j.t.StateChallenge,j.t.NationalCup],this._isInitialized=!1,this._isDataDirty=!1,this._hasUnclaimedPreviousRewardsCache=void 0}setup(){const k=Object.create(null,{setup:{get:()=>super.setup}});return(0,F.sH)(this,void 0,void 0,(function*(){this._isInitialized||(yield k.setup.call(this),this._stateChallengesDataProvider.onNewDataProcessed.add((()=>this.markDataAsDirty())),this._isInitialized=!0)}))}getStateChallengeGoalsProgress(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._currentProgressData||this._isDataDirty){this._isDataDirty=!1;const k=this._stateChallengesDataProvider.getGoalsParametersData();this._currentProgressData=yield this._stateChallengesNetworkHandler.getStateChallengeGoalsData(null!=k?k:{questionsAnswered:0,competition:$.a.None})}return this._currentProgressData}))}markDataAsDirty(){this._isDataDirty=!0,this._hasUnclaimedPreviousRewardsCache=void 0}checkHasUnclaimedPreviousRewards(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(void 0!==this._hasUnclaimedPreviousRewardsCache)return this._hasUnclaimedPreviousRewardsCache;const{hasUnclaimedRewards:B}=yield this._stateChallengesNetworkHandler.hasUnclaimedPreviousStateChallengeGoalsRewards(k);return this._hasUnclaimedPreviousRewardsCache=B,B}))}cacheChallengeStartTaskIds(k,B){this._currentChallengeStartTaskId=k,this._previousChallengeStartTaskId=B}getCurrentChallengeUniqueId(){var k;return null===(k=this._currentChallengeStartTaskId)||void 0===k?void 0:k.split("_")[0]}getPreviousChallengeUniqueId(){var k;return null===(k=this._previousChallengeStartTaskId)||void 0===k?void 0:k.split("_")[0]}getPreviousChallengeStartTaskId(){return this._previousChallengeStartTaskId}claimStateChallengeGoalsReward(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this._stateChallengesDataProvider.getGoalsParametersData(),U=yield this._stateChallengesNetworkHandler.claimStateChallengeGoalsRewards(k,null!=B?B:{questionsAnswered:0,competition:$.a.None});return yield this.processQuestProgressResponse(U),this._isDataDirty=!0,U}))}processPreviousChallengeRewardsResponse(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.processQuestProgressResponse(k),this._isDataDirty=!0}))}sendClassCodeQuestEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!(yield this.isClassCodeQuestCompleted())){const k=this._segment.quests.beginQuestEventTransaction();this.markDataAsDirty(),yield this.claimStateChallengeGoalsReward(z.CLASS_CODE_QUEST_CLAIM_ID),k.flush({})}}))}isClassCodeQuestCompleted(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=null!==(k=(0,q.$)(this._stateChallengesDataProvider.viewableCompetitionPhase))&&void 0!==k?k:"";return this.isTaskCompleted(B,z.CLASS_CODE_QUEST_TASK_ID)}))}sendCurrentChallengeStartedEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){this._currentChallengeStartTaskId&&((yield this.isCurrentChallengeStarted())||(this.markDataAsDirty(),yield this.claimStateChallengeGoalsReward(`${this.getCurrentChallengeUniqueId()}_claim_start`)))}))}sendPreviousChallengeStartedEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B;if(this._previousChallengeStartTaskId&&!(yield this.isPreviousChallengeStarted())){const U=K.H.getPreviousChallengeCompetition(this._stateChallengesDataProvider.viewableCompetitionPhase,new Date(Date.now()),this._stateChallengesDataProvider.finalsPhaseEndDate),F={questionsAnswered:null!==(B=null===(k=this._stateChallengesDataProvider.getSchoolEntryForPreviousChallenge())||void 0===k?void 0:k.correctAnswers)&&void 0!==B?B:0,competition:U},G=yield this._stateChallengesNetworkHandler.claimPreviousStateChallengeGoalsRewards(F,`${this.getPreviousChallengeUniqueId()}_claim_start`);yield this.processQuestProgressResponse(G),this.markDataAsDirty()}}))}isCurrentChallengeStarted(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;if(!this._currentChallengeStartTaskId)return!1;const B=null!==(k=(0,q.$)(this._stateChallengesDataProvider.viewableCompetitionPhase))&&void 0!==k?k:"";return this.isTaskCompleted(B,this._currentChallengeStartTaskId)}))}isPreviousChallengeStarted(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._previousChallengeStartTaskId)return!1;const k=K.H.getPreviousChallengeCompetition(this._stateChallengesDataProvider.viewableCompetitionPhase,new Date(Date.now()),this._stateChallengesDataProvider.finalsPhaseEndDate),B=(0,q.$)(k);return!!B&&this.isTaskCompleted(B,this._previousChallengeStartTaskId)}))}}z.CLASS_CODE_QUEST_TASK_ID="id-2025_milestone_classcode",z.CLASS_CODE_QUEST_CLAIM_ID="id-2025_claim_classcode",(0,F.Cg)([(0,G.inject)("a96-1470"),(0,F.Sn)("design:type",V.E)],z.prototype,"_stateChallengesNetworkHandler",void 0),(0,F.Cg)([(0,G.inject)("0f9-dd7b"),(0,F.Sn)("design:type",H.v)],z.prototype,"_stateChallengesDataProvider",void 0)},45918:(k,B,U)=>{"use strict";U.d(B,{M:()=>F,k:()=>W});var F,G=U(8674),j=U(98938),$=U(35120),H=U(84642),V=U(79368);!function(k){k.FTUE="ZoneQuest-Ftue"}(F||(F={}));class W extends V.k{constructor(){super(...arguments),this._tags=[j.t.ZoneQuests]}fetchQuestData(){const k=Object.create(null,{fetchQuestData:{get:()=>super.fetchQuestData}});return(0,G.sH)(this,void 0,void 0,(function*(){try{return yield k.fetchQuestData.call(this)}catch(B){throw $.q.instance.prodigy.gameContainer.get("306-5359").hasCompletedTutorial()||H.x.showErrorMessageThenReturnToCurrentMap(),new Error(`ZoneQuestManager: Failed to fetch quest data from server. Original error: ${B.message}`)}}))}}},80434:(k,B,U)=>{"use strict";U.d(B,{n:()=>pt});var F=U(98938),G=U(73678),j=U(8674),$=U(97495),H=U(70472),V=U(58776),W=U(62886),q=U(93867),K=U(87761);class z extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.ACADEMY,this._tags=[F.t.LocalZoneQuests,F.t.AcademyEndgame],this._difficultyMode=$.i.Regular}getTasksInProgress(k,B,U){return(0,j.sH)(this,void 0,void 0,(function*(){const k=`quest-${F.t.AcademyEndgame}`,B=q.U.getNextStep();return B?[new H.A(k,{id:B,prerequisites:[],completionRequirements:{type:W.T.NONE,data:{}}},{id:B,status:V.t.IN_PROGRESS})]:[]}))}}var Y=U(28433);class Q extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.BONFIREHARD,this._tags=[F.t.LocalZoneQuests,F.t.BonfireSpireHard],this._difficultyMode=$.i.Hard}getCurrentQuestID(){return Y.G.id}}var X=U(63674);class Z extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.BONFIRE,this._tags=[F.t.LocalZoneQuests,F.t.BonfireSpire],this._difficultyMode=$.i.Regular}getCurrentQuestID(){return X.K.id}}var J=U(88919);class tt extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.FORESTHARD,this._tags=[F.t.LocalZoneQuests,F.t.FireflyForestHard],this._difficultyMode=$.i.Hard}getCurrentQuestID(){return J.C.id}}var et=U(1716);class it extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.FOREST,this._tags=[F.t.LocalZoneQuests,F.t.FireflyForest],this._difficultyMode=$.i.Regular}getCurrentQuestID(){return et.E.id}}var st=U(57144);class nt extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.SHIPWRECKHARD,this._tags=[F.t.LocalZoneQuests,F.t.ShipwreckShoreHard],this._difficultyMode=$.i.Hard}getCurrentQuestID(){return st.r.id}}var at=U(76175);class rt extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.SHIPWRECK,this._tags=[F.t.LocalZoneQuests,F.t.ShipwreckShore],this._difficultyMode=$.i.Regular}getCurrentQuestID(){return at.J.id}}var ot=U(38693);class ht extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.SHIVERCHILLHARD,this._tags=[F.t.LocalZoneQuests,F.t.ShiverchillHard],this._difficultyMode=$.i.Hard}getCurrentQuestID(){return ot.S.id}}var ct=U(99689);class dt extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.SHIVERCHILL,this._tags=[F.t.LocalZoneQuests,F.t.Shiverchill],this._difficultyMode=$.i.Regular}getCurrentQuestID(){return ct.a.id}}var lt=U(97340);class ut extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.SKYWATCHHARD,this._tags=[F.t.LocalZoneQuests,F.t.SkywatchHard],this._difficultyMode=$.i.Hard}getCurrentQuestID(){return lt.x.id}}var ft=U(64891);class bt extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.SKYWATCH,this._tags=[F.t.LocalZoneQuests,F.t.Skywatch],this._difficultyMode=$.i.Regular}getCurrentQuestID(){return ft.x.id}}const pt={[G.A_.FOREST]:{injectionKey:"985-7051",questId:`quest-${F.t.FireflyForest}`,questTag:F.t.FireflyForest,manager:it},[G.A_.SHIVERCHILL]:{injectionKey:"c16-888b",questId:`quest-${F.t.Shiverchill}`,questTag:F.t.Shiverchill,manager:dt},[G.A_.BONFIRE]:{injectionKey:"474-b78a",questId:`quest-${F.t.BonfireSpire}`,questTag:F.t.BonfireSpire,manager:Z},[G.A_.SHIPWRECK]:{injectionKey:"3e8-8772",questId:`quest-${F.t.ShipwreckShore}`,questTag:F.t.ShipwreckShore,manager:rt},[G.A_.SKYWATCH]:{injectionKey:"496-af48",questId:`quest-${F.t.Skywatch}`,questTag:F.t.Skywatch,manager:bt},[G.A_.ACADEMY]:{injectionKey:"933-6c74",questId:`quest-${F.t.AcademyEndgame}`,questTag:F.t.AcademyEndgame,manager:z},[G.A_.FORESTHARD]:{injectionKey:"123-14b6",questId:`quest-${F.t.FireflyForestHard}`,questTag:F.t.FireflyForestHard,manager:tt},[G.A_.SHIVERCHILLHARD]:{injectionKey:"246-64db",questId:`quest-${F.t.ShiverchillHard}`,questTag:F.t.ShiverchillHard,manager:ht},[G.A_.BONFIREHARD]:{injectionKey:"c82-7848",questId:`quest-${F.t.BonfireSpireHard}`,questTag:F.t.BonfireSpireHard,manager:Q},[G.A_.SHIPWRECKHARD]:{injectionKey:"cbb-cf01",questId:`quest-${F.t.ShipwreckShoreHard}`,questTag:F.t.ShipwreckShoreHard,manager:nt},[G.A_.SKYWATCHHARD]:{injectionKey:"38d-437e",questId:`quest-${F.t.SkywatchHard}`,questTag:F.t.SkywatchHard,manager:ut}}},88355:(k,B,U)=>{"use strict";U.d(B,{y:()=>F});class F{constructor(k,B){this._questID=k,this._taskID=B}}},52191:(k,B,U)=>{"use strict";U.d(B,{G:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(86051),H=U(88355);class V extends H.y{doTask(){return(0,F.sH)(this,void 0,void 0,(function*(){this.markTutorialComplete()}))}markTutorialComplete(){const k=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=k.tutorial;k.state.set("zone-house-quest",{ID:2}),k.state.set("zone-academy-quest",{ID:2}),k.state.set("tutorial-0",4),B.setMenuValue($.K.WORLD_MAP.INTRO,1),B.setMenuValue($.K.BESTIARY.INTRO,1),k.backpack.hasItem("key",13)||k.backpack.add("key",13),k.tutorialCompletedThisSession=!0,j.q.instance.prodigy.gameContainer.get("d65-d7bb").updateFlags().catch(G.RQr.createHandler("onTutorialComplete: error updating player goals quest manager flags")),k.forceSaveCharacter(),k.saveEnabled=!1}}},97806:(k,B,U)=>{"use strict";U.d(B,{N:()=>$});var F=U(8674),G=U(55122),j=U(52269);class $ extends j.uu{doTask(k){const B=Object.create(null,{doTask:{get:()=>super.doTask}});return(0,F.sH)(this,void 0,void 0,(function*(){var U,F;yield B.doTask.call(this,Object.assign(Object.assign({},k),{usePlayerLevel:!0,minLevel:G.s.minLevel,maxLevel:G.s.activePlayerLevelCap-j.Ai,showPetMenu:!1!==k.showPetMenu,showPetCard:null!==(U=k.showPetCard)&&void 0!==U?U:k.showGotItem,showPetsInCardFormat:null!==(F=k.showPetsInCardFormat)&&void 0!==F&&F}))}))}}},96165:(k,B,U)=>{"use strict";U.d(B,{I:()=>Q});var F,G=U(8674),j=U(62459),$=U(8394),H=U(65240),V=U(35120),W=U(23891),q=U(65050),K=U(41674),z=U(88355);!function(k){k.FreePrize="free-prize",k.PremiumPrize1="prem-prize-1",k.PremiumPrize2="prem-prize-2",k.Claim="claim"}(F||(F={}));const Y={[F.FreePrize]:"Free",[F.PremiumPrize1]:"Core",[F.PremiumPrize2]:"Plus",[F.Claim]:"magicoin quest"};class Q extends z.y{doTask(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,G;const $=V.q.instance.prodigy.gameContainer.get("c47-20b6"),K=new j._mx,z=K.addComponent(W.f);let X=!1,Z=!1;for(const F of k.itemDrops){const B=Q.processSecureItemReceived($,F,k.sourceType);B.award&&(X=!0,z.addItem(F.type,F.ID,F.N,B.secure),"currency"===F.type&&27===F.ID&&(Z=!0))}if(!X)return void K.destroy();k.isFake&&z.setItemRewardAsFake(),k.sourceType&&(z.sourceType=k.sourceType);let J=q.N.BattlePass;if(k.sourceType===H.C.Festival){J=null!==(U=null===(B=V.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig())||void 0===B?void 0:B.name)&&void 0!==U?U:"unknown festival"}else k.sourceType===H.C.UnifiedStore||k.sourceType===H.C.DynamicStore?J=q.N.ShopVisit:k.sourceType!==H.C.StateChallengeOnboarding&&k.sourceType!==H.C.StateChallengeMilestone&&k.sourceType!==H.C.StateChallengePodium||(J=q.N.StateChallenge);const tt={source_type:k.sourceType,source_id:`${this._questID}-${this._taskID}`,instance_type:J,instance_id:this._questID};if(k.sourceType===H.C.BattlePass){let k="unknown";const B=null===(G=this._taskID)||void 0===G?void 0:G.toString();(null==B?void 0:B.includes(F.FreePrize))?k=Y[F.FreePrize]:(null==B?void 0:B.includes(F.PremiumPrize1))?k=Y[F.PremiumPrize1]:(null==B?void 0:B.includes(F.PremiumPrize2))?k=Y[F.PremiumPrize2]:(null==B?void 0:B.includes(F.Claim))&&Z?k=Y[F.Claim]:(null==B?void 0:B.includes("mailer"))&&(k="mailer"),tt.source_name=k}else if(k.sourceType===H.C.DynamicStore){const k=V.q.instance.prodigy.gameContainer.get("7a1-ff33").getLastTransactionStore();tt.source_name=k}for(const F of k.itemDrops)$.quests.questEventTransaction.setIndividualData(F.type,F.ID,tt);z.awardSilently=!1===k.showGotItem,z.showPetsInPetCardFormat=!0===k.showPetsInCardFormat,z.customSegmentMetadata=tt,z.additionalDialogueIds=k.additionalDialogueIds,z.awardItem(),z.awardSilently||(yield z.onComplete.asPromise()),K.destroy()}))}static processSecureItemReceived(k,B,U){var F;if("item"===B.type&&184===B.ID){const G=V.q.instance.prodigy.gameContainer.get("8b9-bad1"),$=G.petInventoryData.permanentSlots-B.N,W=G.petInventoryData.permanentSlots;if(U===H.C.BattlePass){const B=null===(F=k.item.getSourceTransactionData(U))||void 0===F?void 0:F.transaction_id;k.featureCommon.sendPetSlotUnlockedEvent(K.No.TreasureTrack,W,$,B)}else j.VyI.log("Pet slot sourceType is not valid",j.$bb.Warning);return G.fetchPetInventoryData().catch(j.RQr.createHandler("Error fetching pet inventory data")),{award:!1,secure:!0}}return("petHat"===B.type||"petRelic"===B.type)&&V.q.instance.prodigy.gameContainer.get("d69-defe").refreshPetGear().catch(j.RQr.createHandler("GotItemTaskCompleteHandler: Error refreshing pet gear")),{award:!0,secure:(0,$.p)(B.type,B.ID)}}}},52269:(k,B,U)=>{"use strict";U.d(B,{Ai:()=>q,uu:()=>K});var F=U(8674),G=U(62459),j=U(61468),$=U(35120),H=U(43485),V=U(55122),W=U(88355);const q=-5;class K extends W.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,W,K,z,Y;const Q=$.q.instance.prodigy.gameContainer.get("e50-b09b");Q.questProgressHasBeenLoaded()&&(yield Q.updateQuestProgress());const X=new G._mx,Z=X.addComponent(H.j);k.sourceType&&(Z.sourceType=k.sourceType);const J=null===(B=k.usePlayerLevel)||void 0===B||B,tt=j.l.guaranteeArray(k.id).map((k=>"number"==typeof k?k:parseInt(k)))[0];k.claimToken&&(yield $.q.instance.prodigy.gameContainer.get("f45-d827").claim(k.claimToken,tt)),Z.showPetsInPetCardFormat=null===(F=null!==(U=k.showPetsInCardFormat)&&void 0!==U?U:k.showPetCard)||void 0===F||F,Z.init(tt,1,!0),Z.setPlayerLevelDelta(null!==(W=k.playerLevelDeltaMin)&&void 0!==W?W:-10,null!==(K=k.playerLevelDeltaMax)&&void 0!==K?K:q,J);const et=V.s.minLevel,it=V.s.activePlayerLevelCap-q;Z.setLevelMinMax(null!==(z=k.minLevel)&&void 0!==z?z:et,null!==(Y=k.maxLevel)&&void 0!==Y?Y:it),Z.awardSilently=!1===k.showPetCard,k.customSegmentData&&(Z.customSegmentMetadata=k.customSegmentData),Z.awardItem(),Z.awardSilently||(yield Z.onComplete.asPromise()),k.showPetMenu&&$.q.instance.prodigy.open.pets(),X.destroy()}))}}},55337:(k,B,U)=>{"use strict";U.d(B,{F:()=>F});class F{getCacheKey(k){return null}}},52157:(k,B,U)=>{"use strict";U.d(B,{L:()=>$});var F=U(8674),G=U(35120),j=U(55337);class $ extends j.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=G.q.instance.prodigy.gameContainer.get("a25-68f4"),U=Array.from(B.questManagerMap.values()).map((B=>(0,F.sH)(this,void 0,void 0,(function*(){return B.isTaskCompleted(k.questId,String(k.taskId))}))));return(yield Promise.all(U)).some((k=>k))||!1}))}getCacheKey(k){return`IsQuestTaskComplete:${k.questId}:${k.taskId}`}}},56567:(k,B,U)=>{"use strict";U.d(B,{f:()=>Ot});var F=U(8674),G=U(62459);var j=U(24522),$=U(5491),H=U(35120),V=U(55337);class W extends V.F{isReady(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const B=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return B.kennel.petTeam.length>0&&B.kennel.petTeam.filter((k=>(null==k?void 0:k.creatureType)===$.V.Pet)).every((B=>B.getElement()===k.element))}))}getCacheKey(k){return`AllPetsOnTeamHaveElement${k.element}`}}class q extends V.F{isReady(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return!0}))}getCacheKey(k){return`BattleHasEnemy${k.enemies.map((k=>`${k.unitType}:${k.assetId}`)).join("|")}`}}function K(k,B){const U=[];for(const F of B)k.hasOwnProperty(F)||U.push(F);return U}class z extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=K(k,["battlePassXpId"]);if(B.length>0)throw new Error(`BattlePassXpPreconditionHandler: Missing required properties: ${B.join(", ")}`);if(!G.Aq$.isDefined(k.battlePassXpRequired)&&!G.Aq$.isDefined(k.infiniteXpRequired))throw new Error('BattlePassXpPreconditionHandler: One of "battlePassXpRequired" or "infiniteXpRequired" is required');const U=H.q.instance.prodigy.gameContainer.get("8dc-04eb"),F=yield U.getBattlePassXpData(k.battlePassXpId);return F&&G.Aq$.isDefined(k.battlePassXpRequired)?F.total>=k.battlePassXpRequired:!!(F&&G.Aq$.isDefined(k.infiniteXpRequired)&&G.Aq$.isDefined(F.currentInfinite))&&F.currentInfinite>=k.infiniteXpRequired}))}getCacheKey(k){return`BattlePassXp:${k.battlePassXpId}:${k.battlePassXpRequired}`}}var Y=U(58776),Q=U(34829),X=U(13956),Z=U(69698);class J extends V.F{isReady(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U;const F=(yield this._dailyLoginCalendarQuestManager.getActiveStandardTrack()).find((k=>k.taskProgress.status===Y.t.IN_PROGRESS)),G=this._timeManager.getServerTimeMs(),j=null!==(U=null===(B=null===(k=null==F?void 0:F.taskProgress)||void 0===k?void 0:k.data)||void 0===B?void 0:B.progress)&&void 0!==U?U:0,$=G>=j,H=j-G>=2*Q.A.DAY_IN_MS;return $||H}))}getCacheKey(){return"DailyLoginCalendarCheckDatePreconditionHandler"}}(0,F.Cg)([(0,X.b)("a03-308f"),(0,F.Sn)("design:type",Z.V)],J.prototype,"_timeManager",void 0),(0,F.Cg)([(0,X.b)("a71-dfcf"),(0,F.Sn)("design:type",Function)],J.prototype,"_dailyLoginCalendarQuestManager",void 0);class tt extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=K(k,["date"]);if(B.length>0)throw new Error(`DateAfterPreconditionHandler: Missing required properties: ${B.join(", ")}`);const U=H.q.instance.prodigy.gameContainer.get("a03-308f");return new Date(k.useClientTime?Date.now():U.getServerTimeMs())>=new Date(k.date)}))}getCacheKey(k){return`DateAfter:${k.date}:${k.useClientTime?"client":"server"}`}}class et extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.getMillisecondsUntilDate(k)>0}))}getMillisecondsUntilDate(k){const B=K(k,["date"]);if(B.length>0)throw new Error(`DateBeforePreconditionHandler: Missing required properties: ${B.join(", ")}`);const U=H.q.instance.prodigy.gameContainer.get("a03-308f"),F=new Date(k.useClientTime?Date.now():U.getServerTimeMs());return new Date(k.date).valueOf()-F.valueOf()}getCacheKey(k){return`DateBefore:${k.date}:${k.useClientTime?"client":"server"}`}}class it extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return!(k.hairStyle&&!k.hairStyle.some((k=>{var U;return k===(null===(U=B.appearance.getHair())||void 0===U?void 0:U.style)})))&&(!(k.hairColor&&!k.hairColor.some((k=>{var U;return k===(null===(U=B.appearance.getHair())||void 0===U?void 0:U.color)})))&&(!(k.skinColor&&!k.skinColor.some((k=>k===B.appearance.getSkinColor())))&&(!(k.eyeColor&&!k.eyeColor.some((k=>k===B.appearance.getEyeColor())))&&!(k.face&&!k.face.some((k=>k===B.appearance.getFace()))))))}))}getCacheKey(k){var B,U,F,G,j;return`HasAppearance\n HairStyle${null===(B=k.hairStyle)||void 0===B?void 0:B.map((k=>k.toString())).join("|")}\n HairColor${null===(U=k.hairColor)||void 0===U?void 0:U.map((k=>k.toString())).join("|")}\n SkinColor${null===(F=k.skinColor)||void 0===F?void 0:F.map((k=>k.toString())).join("|")}\n EyeColor${null===(G=k.eyeColor)||void 0===G?void 0:G.map((k=>k.toString())).join("|")}\n Face${null===(j=k.face)||void 0===j?void 0:j.map((k=>k.toString())).join("|")}`}}class st extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=H.q.instance.prodigy.gameContainer.get("073-6f3b");return function(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=K(k,["experimentFeatureId","experimentType","expectedValue"]);if(U.length>0)throw new Error(`ExperimentFeatureHandler: Missing required properties: ${U.join(", ")}`);if("json"!==k.experimentType&&k.experimentType!==typeof k.expectedValue)throw new Error(`ExperimentFeatureHandler: Expected value type (${typeof k.expectedValue}) does not match the experiment type (${k.experimentType})`);let F=yield B(k.experimentFeatureId);if("json"===k.experimentType){if(void 0===k.valuePath)throw new Error("ExperimentFeatureHandler: valuePath is required for json experiment types");for(let B=0;B(0,F.sH)(this,void 0,void 0,(function*(){return B.getFeatureValue(k)}))))}))}getCacheKey(k){let B=`ExperimentFeature:${k.experimentFeatureId}:${k.expectedValue.toString()}`;return"json"===k.experimentType&&k.valuePath&&(B+=`:${k.valuePath.join(".")}`),B}}class nt extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){return H.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getQuestSystem(k.questId)===k.questSystem}))}getCacheKey(k){return`HasGameQuest:${k.questId}:${k.questSystem}`}}class at extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=K(k,["feature"]);if(B.length>0)throw new Error(`HasMemberFeaturePreconditionHandler: Missing required properties: ${B.join(", ")}`);return H.q.instance.prodigy.gameContainer.get("3a0-8003").hasFeatureAccess(k.feature)}))}getCacheKey(k){return`HasMemberFeature:${k.feature}`}}class rt extends V.F{isReady(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return!0}))}getCacheKey(){return null}}class ot extends V.F{isReady(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return H.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.petTeam.some((B=>B.getElement()===k.element))}))}getCacheKey(k){return`HasPetOnTeamWithElement${k.element}`}}var ht=U(60157);class ct extends V.F{isReady(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){let U,F;if(B&&(0,ht.Q9)(B))U=B.battleType,F=B.battleSubType;else{const k=G.wa5.getActiveScene().container.get("BattleController");if(!k)return!1;U=k.type,F=k.subType}return!!k.battleType.some((k=>k===U))&&!(k.battleSubType&&!k.battleSubType.some((k=>k===F)))}))}getCacheKey(k){var B;return`InBattleOfType${k.battleType.map((k=>k.toString())).join("|")}-${null===(B=k.battleSubType)||void 0===B?void 0:B.join("|")}`}}var dt=U(71586),lt=U(30226);class ut extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const k=dt.R.getNowWithServerTimezoneOffset();return lt.J.isDateWithinSchoolHours(k)&<.J.isSchoolDay(k)}))}getCacheKey(k){return"IsDuringSchoolHours"}}class ft extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const k=dt.R.getNowWithServerTimezoneOffset();return lt.J.isWeekend(k)}))}getCacheKey(k){return"IsDuringWeekend"}}class bt extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=H.q.instance.prodigy.world;return!(k.zone&&!k.zone.some((k=>k===B.getCurrentZone())))&&!(k.map&&!k.map.some((k=>k===B.getCurrentMap())))}))}getCacheKey(k){var B,U;return`IsInZone\n Zone${null===(B=k.zone)||void 0===B?void 0:B.map((k=>k.toString())).join("|")}\n Map${null===(U=k.map)||void 0===U?void 0:U.join("|")}`}}class pt extends V.F{isReady(){return(0,F.sH)(this,void 0,void 0,(function*(){return H.q.instance.prodigy.gameContainer.get("3a0-8003").isMember}))}getCacheKey(){return"IsMember"}}var vt=U(52157),gt=U(77938);class mt extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(k.follow&&!k.follow.some((k=>k===B.equipment.getFollow())))return!1;if(k.followRarity){const U=gt.t.getItem("follow",B.equipment.getFollow());if(U&&!k.followRarity.some((k=>{var B;return k===(null===(B=U.data)||void 0===B?void 0:B.rarity)})))return!1}if(k.hat&&!k.hat.some((k=>k===B.equipment.getHat())))return!1;if(k.hatRarity){const U=gt.t.getItem("hat",B.equipment.getHat());if(U&&!k.hatRarity.some((k=>{var B;return k===(null===(B=U.data)||void 0===B?void 0:B.rarity)})))return!1}if(k.outfit&&!k.outfit.some((k=>k===B.equipment.getOutfit())))return!1;if(k.outfitRarity){const U=gt.t.getItem("outfit",B.equipment.getOutfit());if(U&&!k.outfitRarity.some((k=>{var B;return k===(null===(B=U.data)||void 0===B?void 0:B.rarity)})))return!1}if(k.weapon&&!k.weapon.some((k=>k===B.equipment.getWeapon())))return!1;if(k.weaponRarity){const U=gt.t.getItem("weapon",B.equipment.getWeapon());if(U&&!k.weaponRarity.some((k=>{var B;return k===(null===(B=U.data)||void 0===B?void 0:B.rarity)})))return!1}if(k.spellRelic&&!k.spellRelic.some((k=>k===B.equipment.getSpellRelic())))return!1;if(k.spellRelicRarity){const U=gt.t.getItem("spellRelic",B.equipment.getSpellRelic());if(U&&!k.spellRelicRarity.some((k=>{var B;return k===(null===(B=U.data)||void 0===B?void 0:B.rarity)})))return!1}if(k.boots&&!k.boots.some((k=>k===B.equipment.getBoots())))return!1;if(k.bootsRarity){const U=gt.t.getItem("boots",B.equipment.getBoots());if(U&&!k.bootsRarity.some((k=>{var B;return k===(null===(B=U.data)||void 0===B?void 0:B.rarity)})))return!1}if(k.mount&&!k.mount.some((k=>k===B.equipment.getMount())))return!1;if(k.mountRarity){const U=gt.t.getItem("mount",B.equipment.getMount());if(U&&!k.mountRarity.some((k=>{var B;return k===(null===(B=U.data)||void 0===B?void 0:B.rarity)})))return!1}return!0}))}getCacheKey(k){var B,U,F,G,j,$,H,V,W,q,K,z,Y,Q;return`IsWearingGear\n Follow${null===(B=k.follow)||void 0===B?void 0:B.map((k=>k.toString())).join("|")}\n FollowRarity${null===(U=k.followRarity)||void 0===U?void 0:U.map((k=>k.toString())).join("|")}\n Hat${null===(F=k.hat)||void 0===F?void 0:F.map((k=>k.toString())).join("|")}\n HatRarity${null===(G=k.hatRarity)||void 0===G?void 0:G.map((k=>k.toString())).join("|")}\n Outfit${null===(j=k.outfit)||void 0===j?void 0:j.map((k=>k.toString())).join("|")}\n OutfitRarity${null===($=k.outfitRarity)||void 0===$?void 0:$.map((k=>k.toString())).join("|")}\n Weapon${null===(H=k.weapon)||void 0===H?void 0:H.map((k=>k.toString())).join("|")}\n WeaponRarity${null===(V=k.weaponRarity)||void 0===V?void 0:V.map((k=>k.toString())).join("|")}\n SpellRelic${null===(W=k.spellRelic)||void 0===W?void 0:W.map((k=>k.toString())).join("|")}\n SpellRelicRarity${null===(q=k.spellRelicRarity)||void 0===q?void 0:q.map((k=>k.toString())).join("|")}\n Boots${null===(K=k.boots)||void 0===K?void 0:K.map((k=>k.toString())).join("|")}\n BootsRarity${null===(z=k.bootsRarity)||void 0===z?void 0:z.map((k=>k.toString())).join("|")}\n Mount${null===(Y=k.mount)||void 0===Y?void 0:Y.map((k=>k.toString())).join("|")}\n MountRarity${null===(Q=k.mountRarity)||void 0===Q?void 0:Q.map((k=>k.toString())).join("|")}`}}var yt=U(90975);class _t extends V.F{isReady(){return(0,F.sH)(this,void 0,void 0,(function*(){return yt.Y.meetsNarrativeCatchupRequirements()||yt.Y.meetsNarrativeIntroRequirements()}))}getCacheKey(){return"MeetsCampaignReplayNarrativeRequirement"}}class Et extends V.F{isReady(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return!0}))}getCacheKey(k){return`RemainingHealth${k.wizardPercent}|${k.petPercent}|${k.teamPercent}`}}class wt extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getLevel();return!(k.minLevel&&B&&Bk.maxLevel)}))}getCacheKey(k){return`IsLevel\n MinLevel${k.minLevel}\n MaxLevel${k.maxLevel}`}}var Tt=U(29738);class St extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){return k.validLocales.includes(Tt.O.localeCode)}))}getCacheKey(k){var B;return`HasLocale\n ValidLocales${null===(B=k.validLocales)||void 0===B?void 0:B.map((k=>k.toString())).join("|")}`}}class At extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=H.q.instance.prodigy.gameContainer.get("db5-fb6e");return yield B.meetsRequirements(k.requirementID)}))}getCacheKey(k){return`MeetsFeatureRequirement_${k.requirementID}`}}const Ct={[j.n.DATE_BEFORE]:et,[j.n.DATE_AFTER]:tt,[j.n.HAS_EXPERIMENT_FEATURE]:st,[j.n.HAS_MEMBER_FEATURE]:at,[j.n.HAS_TOTAL_BATTLE_PASS_XP]:z,[j.n.HAS_QUEST_SYSTEM]:nt,[j.n.DAILY_LOGIN_CALENDAR_CHECK_DATE]:J,[j.n.IS_DURING_SCHOOL_HOURS]:ut,[j.n.IS_MEMBER]:pt,[j.n.HAS_PET_ON_TEAM_WITH_ELEMENT]:ot,[j.n.ALL_PETS_ON_TEAM_HAVE_ELEMENT]:W,[j.n.IN_BATTLE_OF_TYPE]:ct,[j.n.REMAINING_HEALTH]:Et,[j.n.IS_DURING_WEEKEND]:ft,[j.n.HAS_MET_STATE_CHALLENGE_GOAL]:rt,[j.n.IS_IN_ZONE]:bt,[j.n.HAS_APPEARANCE]:it,[j.n.IS_WEARING_GEAR]:mt,[j.n.MEETS_CAMPAIGN_REPLAY_NARRATIVE_REQUIREMENT]:_t,[j.n.IS_QUEST_TASK_COMPLETE]:vt.L,[j.n.IS_LEVEL]:wt,[j.n.HAS_LOCALE]:St,[j.n.MEETS_FEATURE_REQUIREMENT]:At,[j.n.BATTLE_HAS_ENEMY]:q};class Ot extends class{constructor(){this.reset()}doCheck(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){let F=k.getCacheKey(B);if(F&&!0===(null==B?void 0:B.negateResult)&&(F=`${F}-negate`),F&&F in this._resultsCache)return this._resultsCache[F];let G=yield k.isReady(B,U);return!0===(null==B?void 0:B.negateResult)&&(G=!G),F&&(this._resultsCache[F]=G),G}))}reset(){this._resultsCache={},this._cache={}}}{constructor(k){super(),this._taskParams=k}check(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=Ct[k];if(void 0===U)return G.VyI.log(`No precondition handler found for type: ${k}. Treating precondition as unmet (false).`,G.$bb.Warning),!1;const F=new U;return this.doCheck(F,B,this._taskParams)}))}}},32073:(k,B,U)=>{"use strict";U.d(B,{v:()=>X});var F=U(62459),G=U(68910),j=U(99625),$=U(65741),H=U(94428),V=U(35120),W=U(29738),q=U(23082),K=U(29546),z=U(13021),Y=U(61895),Q=U(19145);class X{static canBeTransportedToQuickQuiz(k={}){if(!W.O.isEnglishLocale())return{canBeTransported:!1,info:"Player is not in English locale"};const B=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=[q.G.CharCreate,q.G.CharSelect,q.G.SplashScreen,q.G.Loading],G=V.q.instance.game.state.current;if(U.includes(G))return{canBeTransported:!1,info:`${G} is not an eligible state`};if(G===q.G.PrefabScene){if(V.q.instance.game.state.getCurrentState().prefabGameAssets.includes(j.l.DuelsStadiumMenu))return{canBeTransported:!1,info:"Player is in the duels stadium menu"};if(!k.skipPendingLoadCheck){const k=V.q.instance.game.state.get(q.G.Loading);if(null==k?void 0:k.isLoadingAdditional)return{canBeTransported:!1,info:"Loading screen still has pending tasks"}}}if(!B.hasCompletedTutorial())return{canBeTransported:!1,info:"Player has not completed the tutorial"};if(V.q.instance.prodigy.education.isQuestionInterfaceOpen)return{canBeTransported:!1,info:"Question interface is open"};if(z.w.isInTitanParty())return{canBeTransported:!1,info:"Player is in a titan party"};if(!k.skipOpenMenuCheck){if(V.q.instance.prodigy.open.menus.length>0||V.q.instance.prodigy.open.renderMenus.length>0)return{canBeTransported:!1,info:"Player is in a menu"}}if(!k.skipBattleCanEndInstantlyCheck){if(G===q.G.SecureBattleRevamp){const k=F.wa5.getActiveScene().container.get("BattleController");if(!(null==k?void 0:k.canBattleEndInstantly())&&!(null==k?void 0:k.isBattleBeingForciblyEndedMidBattle()))return{canBeTransported:!1,info:"Battle can not end right now"}}if(G===q.G.CoOp){if(!V.q.instance.game.state.getCurrentState().canBattleEndInstantly())return{canBeTransported:!1,info:"CoOp Battle can not end right now"}}}return V.q.instance.prodigy.gameContainer.get("c97-bd0d").canUseMultiplayer()?Q.Z.instance.isInProgress()?{canBeTransported:!1,info:"Spell Status Effects Tutorial is in progress"}:{canBeTransported:!0,info:""}:{canBeTransported:!1,info:"Multiplayer is currently unavailable"}}static canBeTransportedFromBattleToQuickQuiz(){return!!V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasCompletedTutorial()}static transportPlayerToQuickQuiz(k,B){const U=new G.Sprite(V.q.instance.game.renderer.generateTexture(V.q.instance.game.world,{region:new G.Rectangle(0,0,V.q.instance.game.width,V.q.instance.game.height)}));switch(U.filters=[new G.filters.BlurFilter],k){case H.oW.WizardDash:X.ensureMapCallsCleanup(),V.q.instance.game.state.start(q.G.LootDashTransport,!0,U,B);break;default:return void F.RQr.createHandler("transportPlayerToQuickQuiz: Quick quiz type does not exist")}}static cancelQuickQuiz(k){switch(k){case H.oW.WizardDash:Y.B.cancelQuickQuiz();break;default:return void F.RQr.createHandler("transportPlayerToQuickQuiz: Quick quiz type does not exist")}}static addCompletedQuickQuizId(k){var B;const U=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;U.data.quickQuizData=null!==(B=U.data.quickQuizData)&&void 0!==B?B:{completedQuizIds:[]},U.data.quickQuizData.completedQuizIds.push(k),U.data.quickQuizData.completedQuizIds=U.data.quickQuizData.completedQuizIds.slice(-10),U.updated=!0}static markAssignmentAsCompleted(k){V.q.instance.prodigy.gameContainer.get("c97-bd0d").completeAssignment(k)}static hasCompletedQuickQuiz(k){var B,U;return null!==(U=null===(B=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.quickQuizData)||void 0===B?void 0:B.completedQuizIds.includes(k))&&void 0!==U&&U}static getPlayerProgressFromChannelData(k){const B=k[`playerProgress-${V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.userID}`];return B?B.progress:$.k.NOT_STARTED}static isInValidSubjectForQuickQuiz(){return K.X.isMathSubjectRequirementMet()}static ensureMapCallsCleanup(){if(V.q.instance.game.state.current===q.G.TileScreen){V.q.instance.game.state.getCurrentState().forceMapCleanupOnShutdown()}}}},4764:(k,B,U)=>{"use strict";U.d(B,{w:()=>st});var F=U(8674),G=U(62459),j=U(79687),$=U(65741),H=U(94428);class V{static getChannelName(k){return`quickQuiz-${k}`}}var W=U(35120),q=U(29738),K=U(71543),z=U(32073),Y=(U(48417),U(17516)),Q=U(96535),X=U(23082),Z=U(13956),J=U(76546),tt=U(80403),et=U(70330);class it extends J.D{constructor(k){super(),this._quickQuizManager=k,this._synapse.onNotificationReceived.add(this.handleSynapseNotifications,this)}cleanUp(){this._synapse.onNotificationReceived.remove(this.handleSynapseNotifications,this)}handleSynapseNotifications(k){switch(k.type){case Y.m.QuickQuizJoinRequest:let B;if(B=W.q.instance.game.state.current===X.G.CoOp?W.q.instance.game.state.getCurrentState():G.wa5.getActiveScene().container.get("BattleController"),B&&z.v.canBeTransportedFromBattleToQuickQuiz()){const U=this._localizer.getText("LOOT_DASH_QUICK_QUIZ_CANCELLING_BATTLE");if(this._quickQuizManager.currentQuickQuizId)return B.enablePostBattleExpressMode(U),void this._quickQuizManager.setMayHavePendingActiveQuizzes();const F=G.wa5.getActiveScene().container.get("RemoteConfig");if(F&&(this._activePlayer.battleResumeData={battleType:B.type,data:F.clientState}),!B.canBattleEndInstantly()){const F={enablePostBattleFlowExpressMode:!0,forceEndMessageText:U};return void B.beginEndingBattle((()=>{this._quickQuizManager.attemptToJoinQuickQuiz(k.data.quizType,k.data.quickQuizId,k.data.channelName)}),F)}}this._quickQuizManager.attemptToJoinQuickQuiz(k.data.quizType,k.data.quickQuizId,k.data.channelName)}}joinQuickQuizChannel(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this._synapse.joinFeatureChannel(k,this.handleChannelMessages.bind(this))}))}leaveQuickQuizChannel(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this._synapse.leaveFeatureChannel(k)}))}handleChannelMessages(k){this._quickQuizManager.handleChannelMessages(k)}callDebugRoute(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return Promise.resolve()}))}getActiveQuickQuizData(){return(0,F.sH)(this,void 0,void 0,(function*(){return yield this.getActiveQuizzesFromGraphQL()}))}getActiveQuizzesFromGraphQL(){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this._graphQlRequestSender.sendRequest("\n query getActiveQuickQuizzes {\n viewer {\n quickQuizzes {\n id\n startDate\n endDate\n assignment {\n id\n }\n }\n }\n }\n ")).data.viewer.quickQuizzes.sort(((k,B)=>k.startDate-B.startDate)).map((k=>({id:k.id,type:H.oW.WizardDash,assignmentId:k.assignment.id,startDate:k.startDate,endDate:k.endDate})))}))}}(0,F.Cg)([(0,Z.b)("779-a746"),(0,F.Sn)("design:type",et.d)],it.prototype,"_synapse",void 0),(0,F.Cg)([(0,Z.b)("8bb-7057"),(0,F.Sn)("design:type",tt.K)],it.prototype,"_graphQlRequestSender",void 0),(0,F.Cg)([(0,Z.b)("306-5359"),(0,F.Sn)("design:type",Q.W)],it.prototype,"_activePlayer",void 0),(0,F.Cg)([(0,Z.b)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],it.prototype,"_localizer",void 0);let st=class{get currentQuickQuizId(){return this._currentQuickQuizId}get currentQuickQuizType(){return this._currentQuickQuizType}get currentAssignmentId(){return this._quizIdToAssignmentIdMap.get(this._currentQuickQuizId)}get waitingToTransport(){return G.Aq$.isDefined(this._timerID)}constructor(){this.onQuickQuizMessageReceived=new G.HN0,this.onQuickQuizExitFlowComplete=new G.HN0,this.checkForValidStateIntervalMs=5e3,this._mayHavePendingActiveQuizzes=!0,this._quizIdToAssignmentIdMap=new Map,this._startTime=0,this._allMessages=[],this._onCustomDataReceived=new G.HN0,this.quickQuizNetworkHandler=new it(this);W.q.instance.prodigy.gameContainer.get("c97-bd0d").onSocketReconnect.add((()=>this.onSocketReconnect()))}cleanUp(){this._startTime=0,this.quickQuizNetworkHandler.cleanUp(),this.onQuickQuizExitFlowComplete.dispose(),this.onQuickQuizMessageReceived.dispose(),this._onCustomDataReceived.dispose()}static instance(){return W.q.instance.prodigy.gameContainer.get("fc2-cb0a")}joinQuickQuizIfActive(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(!q.O.isEnglishLocale())return;if(!z.v.isInValidSubjectForQuickQuiz())return;if(!this._mayHavePendingActiveQuizzes)return;const B=yield this.fetchActiveQuickQuizData();this._mayHavePendingActiveQuizzes=!1;for(const U of B)this.attemptToJoinQuickQuiz(U.type,U.id,V.getChannelName(U.id),k)}))}attemptToJoinQuickQuiz(k,B,U,F){if(q.O.isEnglishLocale()&&z.v.isInValidSubjectForQuickQuiz())if(z.v.hasCompletedQuickQuiz(B))G.VyI.log(`Quick Quiz ${B} has already been completed. Ignoring attempt to join.`,G.$bb.Info);else{if(!this._currentQuickQuizId)return z.v.canBeTransportedToQuickQuiz(F).canBeTransported?(this._currentQuickQuizId=B,this._currentQuickQuizType=k,this._currentChannelName=U,window.clearInterval(this._timerID),this._timerID=void 0,void this.joinQuickQuiz().catch((k=>{G.RQr.logError(k,`Failed to join quick quiz ${this._currentQuickQuizId}, ${this._currentQuickQuizType}`),this.leaveQuickQuiz()}))):void this.createTransportTimer();this._mayHavePendingActiveQuizzes=!0}}createTransportTimer(){G.Aq$.isDefined(this._timerID)||(this._timerID=window.setInterval((()=>{z.v.canBeTransportedToQuickQuiz().canBeTransported&&(window.clearInterval(this._timerID),this._timerID=void 0,this._mayHavePendingActiveQuizzes=!0,this.joinQuickQuizIfActive().catch((k=>{G.RQr.logError(k,`Failed to join quick quiz ${this._currentQuickQuizId}, ${this._currentQuickQuizType}`),this.leaveQuickQuiz()})))}),this.checkForValidStateIntervalMs))}joinQuickQuiz(){return(0,F.sH)(this,void 0,void 0,(function*(){this._quizIdToAssignmentIdMap.has(this._currentQuickQuizId)||(yield this.fetchActiveQuickQuizData(),this._quizIdToAssignmentIdMap.has(this._currentQuickQuizId)||G.VyI.log(`QuickQuizManager: Quick Quiz ID not found in map for quick quiz ${this._currentQuickQuizId}`,G.$bb.Error)),yield this.quickQuizNetworkHandler.joinQuickQuizChannel(this._currentChannelName);const k=(yield this._onCustomDataReceived.asPromise())[0],B=z.v.getPlayerProgressFromChannelData(k);if(B===$.k.COMPLETED)return z.v.addCompletedQuickQuizId(this._currentQuickQuizId),void this.leaveQuickQuiz();z.v.transportPlayerToQuickQuiz(this._currentQuickQuizType,B)}))}leaveQuickQuizChannel(){this.quickQuizNetworkHandler.leaveQuickQuizChannel(this._currentChannelName).catch(G.RQr.createHandler("Failed to leave quick quiz channel"))}leaveQuickQuiz(){this.leaveQuickQuizChannel(),this._currentQuickQuizId=void 0,this._currentQuickQuizType=void 0,this._currentChannelName=void 0,this._allMessages.length=0}handleChannelMessages(k){switch(this._allMessages.push(k),k.type){case"channelData":const B=k.channelData;B.quizStatus===$.d.INACTIVE&&this.leaveQuickQuiz(),this._startTime=B.matchStartTime,this._onCustomDataReceived.dispatch(B);break;case"broadcastAction":const U=k.actionInfo;if(!U)return;switch(U.type){case H.H9.QuizEnded:z.v.cancelQuickQuiz(this._currentQuickQuizType),this.leaveQuickQuizChannel()}}this.onQuickQuizMessageReceived.dispatch(k)}handleQuizExitFlowComplete(){this.leaveQuickQuiz(),this.onQuickQuizExitFlowComplete.dispatch(),this.joinQuickQuizIfActive({skipBattleCanEndInstantlyCheck:!0}).then((()=>{this.currentQuickQuizId||!this.waitingToTransport&&K.p.resumeBattle()||W.q.instance.prodigy.world.teleportToCurrentMap()})).catch((k=>{G.RQr.logError(k,`Failed to join quick quiz ${this._currentQuickQuizId}, ${this._currentQuickQuizType}`),this.leaveQuickQuiz()}))}setMayHavePendingActiveQuizzes(){this._mayHavePendingActiveQuizzes=!0}onSocketReconnect(){this.setMayHavePendingActiveQuizzes(),this.joinQuickQuizIfActive().then((()=>{this._currentQuickQuizId&&W.q.instance.prodigy.education.loadAndInitEducationData().catch(G.RQr.createHandler("SplashScreen: Error reloading education data"))})).catch((k=>{G.RQr.logError(k,`Failed to join quick quiz ${this._currentQuickQuizId}, ${this._currentQuickQuizType}`),this.leaveQuickQuiz()}))}getMillisecondsSinceStart(){return W.q.instance.prodigy.gameContainer.get("a03-308f").getServerTimeMs()-this._startTime}fetchActiveQuickQuizData(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.quickQuizNetworkHandler.getActiveQuickQuizData();for(const B of k)this._quizIdToAssignmentIdMap.set(B.id,B.assignmentId);return k}))}};st=(0,F.Cg)([(0,j.injectable)(),(0,F.Sn)("design:paramtypes",[])],st)},43579:(k,B,U)=>{"use strict";U.d(B,{Nx:()=>H,TQ:()=>$,_l:()=>j,fs:()=>W,wS:()=>V});var F,G=U(97495);!function(k){k.DifficultyMode="DIFFICULTY_MODE",k.SelectedState="SELECTED_STATE",k.MaxLevel="MAX_LEVEL",k.TitleColor="TITLE_COLOR"}(F||(F={}));const j="DIFFICULTY_MODE";var $,H;!function(k){k.Unselected="#AB5947",k.RegularSelected="#363636",k.HardSelected="#4132CF",k.ExpertSelected="#D734D4"}($||($={})),function(k){k.Select="select",k.Unlock="unlock",k.Current="current",k.ComingSoon="coming-soon"}(H||(H={}));const V={[G.i.Regular]:void 0,[G.i.Hard]:59,[G.i.Expert]:60};var W;!function(k){k.RegularHeaderText="GO_TO_EASY_MODE",k.RegularBodyText="ARE_YOU_SURE_EASY_MODE",k.HardHeaderText="GO_TO_HARD_MODE",k.HardBodyText="ARE_YOU_SURE_HARD_MODE",k.ExpertHeaderText="GO_TO_EXPERT_MODE",k.ExpertBodyText="ARE_YOU_SURE_EXPERT_MODE",k.ZoneUnavailableForDifficultyText="ZONE_UNAVAILABLE_FOR_DIFFICULTY"}(W||(W={}))},9579:(k,B,U)=>{"use strict";U.d(B,{a:()=>Y});var F=U(8674),G=U(62459),j=U(35120),$=U(1717),H=U(30226),V=U(15821),W=U(58776);const q=JSON.parse('{"i":{"N4":{"requirements":[{"dynamicStoreItemPurchaseCount":{"id":"white-glove-service-normal-mode-restrictions-free-offer","purchaseCount":1}},{"accountCreationDate":{"after":1759354069533}},{"difficultyUnlocked":"hard"},{"restrictionMet":"normal-academy-27-pet-collection"}],"evaluationStrategy":"RequireNone"}}}'),K={[$.$.Rescue]:"BATTLE_RULES_DESCRIPTION_PETS_RESCUED",[$.$.EvolutionTier]:"BATTLE_RULES_DESCRIPTION_EVOLUTION_LEVEL",[$.$.Element]:"BATTLE_RULES_DESCRIPTION_ELEMENTAL_PET",[$.$.Level]:"BATTLE_RULES_DESCRIPTION_PET_LEVEL",[$.$.MergeRank]:"BATTLE_RULES_DESCRIPTION_MERGE_RANK",[$.$.Rarity]:"BATTLE_RULES_DESCRIPTION_RARITY"},z={[$.$.Rescue]:"BATTLE_RULES_DESCRIPTION_PETS_RESCUED_SINGULAR",[$.$.EvolutionTier]:"BATTLE_RULES_DESCRIPTION_EVOLUTION_LEVEL_SINGULAR",[$.$.Element]:"BATTLE_RULES_DESCRIPTION_ELEMENTAL_PET_SINGULAR",[$.$.Level]:"BATTLE_RULES_DESCRIPTION_PET_LEVEL_SINGULAR",[$.$.MergeRank]:"BATTLE_RULES_DESCRIPTION_MERGE_RANK_SINGULAR",[$.$.Rarity]:"BATTLE_RULES_DESCRIPTION_RARITY_SINGULAR"};class Y{static getRequirementsResult(k){return(0,F.sH)(this,void 0,void 0,(function*(){return j.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirements(k)}))}static isEligibleForFreePetPack(){return(0,F.sH)(this,void 0,void 0,(function*(){return j.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirements(q.i.N4)}))}static hasReceivedFreePetPack(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=j.q.instance.prodigy.gameContainer.get("7a1-ff33"),B=(yield k.getTasksInProgress()).find((k=>{var B;return k.taskID===(null===(B=q.i.N4.requirements[0].dynamicStoreItemPurchaseCount)||void 0===B?void 0:B.id)}));return!!B&&B.taskProgress.status===W.t.COMPLETE}))}static markFreePetPackAsClaimed(){j.q.instance.prodigy.gameContainer.get("9ea-3f44").markFreeRestrictionOfferClaimed().catch(G.RQr.createHandler("RestrictionHelper: Error marking free pet pack as claimed"))}static tryResetPlayerLastUnmetBattleRequirements(){const k=j.q.instance.prodigy.gameContainer.get("306-5359");k.data.lastUnmetBattleRequirements&&Y.getRequirementsResult(k.data.lastUnmetBattleRequirements.featureRequirements).then((k=>{k&&Y.resetPlayerLastUnmetBattleRequirements()})).catch(G.RQr.createHandler("[RestrictedSpawnPointComponent]: Error opening battle restrictions popup with provided requirements"))}static resetPlayerLastUnmetBattleRequirements(){const k=j.q.instance.prodigy.gameContainer.get("306-5359");k.data.lastUnmetBattleRequirements=void 0,k.updated=!0}static getRuleDescriptionKey(k){var B;const U=Y.getRuleType(k);return 1===k.petCount&&null!==(B=z[U])&&void 0!==B?B:K[U]}static getRuleDescriptionArgs(k,B){var U,F,G,j,V,W,q,K;switch(k){case $.$.EvolutionTier:return null!==(F=null===(U=null==B?void 0:B.evolutionTier)||void 0===U?void 0:U.toString())&&void 0!==F?F:"";case $.$.Element:return null!==(G=null==B?void 0:B.affinity)&&void 0!==G?G:"";case $.$.Level:return null!==(V=null===(j=null==B?void 0:B.level)||void 0===j?void 0:j.toString())&&void 0!==V?V:"";case $.$.MergeRank:return null!==(q=null===(W=null==B?void 0:B.mergeRank)||void 0===W?void 0:W.toString())&&void 0!==q?q:"";case $.$.Rarity:return H.J.convertRarityToText(null!==(K=null==B?void 0:B.rarity)&&void 0!==K?K:0);default:return""}}static getRuleType(k){return V.A.isDefined(null==k?void 0:k.evolutionTier)?$.$.EvolutionTier:V.A.isDefined(null==k?void 0:k.affinity)?$.$.Element:V.A.isDefined(null==k?void 0:k.level)?$.$.Level:V.A.isDefined(null==k?void 0:k.mergeRank)?$.$.MergeRank:V.A.isDefined(null==k?void 0:k.rarity)?$.$.Rarity:$.$.Rescue}}},53040:(k,B,U)=>{"use strict";U.d(B,{y:()=>z});var F=U(8674),G=U(62459),j=U(99625),$=U(642),H=U(35120),V=U(2272),W=U(75329),q=U(99429),K=U(77997);class z{static handleAbuseReportResponsePromise(k){return(0,F.sH)(this,void 0,void 0,(function*(){try{200===(yield k).getHttpStatusCode()?z.displayReportingSuccessDialog():z.displayReportingFailureDialog()}catch(B){z.displayReportingFailureDialog()}}))}static displayReportingSuccessDialog(){const k=H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);H.q.instance.prodigy.open.informationDialog(new W.Z(k.getText("BUTTON_OKAY"),void 0,V.E.Small,q.K.CONFIRM_WIDTH,k.getText("REPORT_SUCCESS_TITLE"),k.getText("REPORT_SUCCESS_BODY"),void 0,void 0,void 0,j.l.DefaultHeader,j.l.DefaultFooter))}static displayReportingFailureDialog(){const k=H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);H.q.instance.prodigy.open.informationDialog(new W.Z(k.getText("BUTTON_OKAY"),void 0,V.E.Small,q.K.CONFIRM_WIDTH,k.getText("REPORT_FAILED_TITLE"),k.getText("REPORT_FAILED_BODY"),void 0,void 0,void 0,j.l.ErrorDialogHeader,j.l.DefaultFooter))}static openReportHouseConfirmationDialog(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield H.q.instance.game.renderer.extract.base64(H.q.instance.game.world),B=H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);H.q.instance.prodigy.open.confirmationDialogNoIconButtons(new $.k(B.getText("BUTTON_NO"),void 0,B.getText("BUTTON_YES"),(()=>{this.reportHouse(k)}),void 0,V.E.Small,q.K.CONFIRM_WIDTH,B.getText("REPORT_MODAL_TITLE"),B.getText("CONFIRM_REPORT")))}))}static reportHouse(k){const B=H.q.instance.prodigy.gameContainer.get("bbf-3165"),U=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=H.q.instance.prodigy.world.getZone(H.q.instance.prodigy.world.getCurrentZone()).screen,j=null==F?void 0:F.saveTag.split("-").pop(),$={clientID:K.Z,userID:U.userID.toString(),reportedUserID:null!=j?j:"",reason:"Inappropriate House",category:"House",screenshot:k};z.handleAbuseReportResponsePromise(B.reportAbuse($)).catch(G.RQr.createHandler("Error sending abuse report"))}}},87557:(k,B,U)=>{"use strict";U.d(B,{V:()=>q});var F=U(8674),G=U(62459),j=U(95891),$=U(35120),H=U(28152),V=U(77997),W=U(53040);let q=class extends G.uAl{setReportedUserID(k){this.reportedUserID=k}reportPlayer(k,B){if(!(0,j.isNumber)(this.reportedUserID))return;const U=$.q.instance.prodigy.gameContainer.get("bbf-3165"),F=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player,H={clientID:V.Z,userID:F.userID.toString(),reportedUserID:this.reportedUserID.toString(),reason:B,category:k,screenshot:void 0};W.y.handleAbuseReportResponsePromise(U.reportAbuse(H)).catch(G.RQr.createHandler("Error reporting player"))}};q=(0,F.Cg)([(0,G.EVk)("ReportPlayer",H.Y.reporting)],q)},77997:(k,B,U)=>{"use strict";U.d(B,{Z:()=>F,v:()=>G});const F="1",G="enableReporting"},5708:(k,B,U)=>{"use strict";U.d(B,{X:()=>$});var F=U(8674),G=U(79687),j=U(6030);let $=class{getRestrictionById(k){return j[k]}};$=(0,F.Cg)([(0,G.injectable)()],$)},37050:(k,B,U)=>{"use strict";U.d(B,{Q:()=>J});var F=U(8674),G=U(62459),j=U(79687),$=U(77601),H=U(42448);const V=(0,$.gb)({key:"rifts-pet-reuse-data",default:{enabled:!1,portal:H.ni.Portal2,data:{reuseCostPerSecond:.01,petCooldownMs:36e5,costMultiplierPerUse:1}},activateAssociatedExperiments:0});var W,q=U(38170),K=U(35120),z=U(34829),Y=U(76277),Q=U(44094),X=U(30226),Z=U(38560);let J=W=class{constructor(){this._riftsTierTotalDataMap={[H.ni.Portal1]:void 0,[H.ni.Portal2]:void 0,[H.ni.Portal3]:void 0},this._lastRiftsDataFetchMapMs={[H.ni.Portal1]:void 0,[H.ni.Portal2]:void 0,[H.ni.Portal3]:void 0}}get riftsConfig(){return this._riftsConfig}get riftsTierTotalData(){return this.selectedPortalId?this._riftsTierTotalDataMap[this.selectedPortalId]:void 0}static getRiftsDataProvider(){return K.q.instance.prodigy.gameContainer.get("196-d3a5")}fetchRiftsConfig(){return(0,F.sH)(this,void 0,void 0,(function*(){this._riftsConfig?this._lastRiftsConfigFetchMs&&q.r.toDateUtcMs(Date.now())-this._lastRiftsConfigFetchMs>z.s.MINUTES_IN_MS&&(this._riftsConfig=yield this._riftsNetworkHandler.getRiftsConfig(),this._lastRiftsConfigFetchMs=q.r.toDateUtcMs(Date.now())):(this._riftsConfig=yield this._riftsNetworkHandler.getRiftsConfig(),this._lastRiftsConfigFetchMs=q.r.toDateUtcMs(Date.now()));const k=(0,Y.G)(V);return k.enabled&&this._riftsConfig[k.portal]&&(this._riftsConfig[k.portal].options.petReuseData=k.data),this._riftsConfig}))}fetchRiftsTierData(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this.selectedPortalId&&(this.selectedPortalId=yield this._riftsNetworkHandler.getSelectedPortalId(),!this.selectedPortalId))return;const k=this._lastRiftsDataFetchMapMs[this.selectedPortalId];try{this._riftsTierTotalDataMap[this.selectedPortalId]?k&&q.r.toDateUtcMs(Date.now())-k>z.s.MINUTES_IN_MS&&(this._riftsTierTotalDataMap[this.selectedPortalId]=yield this._riftsNetworkHandler.getRiftsTierData(this.selectedPortalId),this._lastRiftsDataFetchMapMs[this.selectedPortalId]=q.r.toDateUtcMs(Date.now())):(this._riftsTierTotalDataMap[this.selectedPortalId]=yield this._riftsNetworkHandler.getRiftsTierData(this.selectedPortalId),this._lastRiftsDataFetchMapMs[this.selectedPortalId]=q.r.toDateUtcMs(Date.now()))}catch(B){return}return this._riftsTierTotalDataMap[this.selectedPortalId]}))}getRiftsPortalConfig(){if(this.selectedPortalId&&this._riftsConfig)return this._riftsConfig[this.selectedPortalId];G.VyI.log("RiftsDataProvider: Missing data when attempting get the rifts portal config",G.$bb.Error)}getActiveRiftsPortalIds(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.fetchRiftsConfig();if(!k)return;const B=Object.values(H.ni),U=[],F=q.r.toDateUtcMs(Date.now());for(const j of B){const B=k[j];if(!B)continue;if(G.Aq$.isDefined(B.enabled)&&!B.enabled)continue;const $=B.startDate?q.r.toDateUtcMs(B.startDate):void 0,H=B.endDate?q.r.toDateUtcMs(B.endDate):void 0;(void 0===$&&void 0===H||void 0===$&&H&&H>F||void 0===H&&$&&$F)&&U.push(j)}return U}))}getRiftRunEntryCost(k){var B,U,F,G;const j=W.getRiftsDataProvider().getRiftsPortalConfig();return null!==(G=null===(F=null===(U=null===(B=null==j?void 0:j.options)||void 0===B?void 0:B.entryCostData)||void 0===U?void 0:U[k])||void 0===F?void 0:F.quantity)&&void 0!==G?G:W._DEFAULT_ENTRY_COST}getRiftKeyMagicoinCost(){var k,B;const U=W.getRiftsDataProvider().getRiftsPortalConfig();return null!==(B=null===(k=null==U?void 0:U.options)||void 0===k?void 0:k.keyMagicoinCost)&&void 0!==B?B:W._DEFAULT_KEY_MAGICOIN_COST}getCurrentRiftsId(){var k;return null===(k=this.getRiftsPortalConfig())||void 0===k?void 0:k.riftsId}static getBuffRerollCost(k){var B,U,F;const G=W.getRiftsDataProvider().getRiftsPortalConfig();let j=W._DEFAULT_BUFF_REROLL_MAGICOIN_COST,$=W._DEFAULT_BUFF_REROLL_MAGICOIN_COST_MULTIPLIER*k;return(null===(B=null==G?void 0:G.options)||void 0===B?void 0:B.buffRerollData)&&(j=null!==(U=G.options.buffRerollData.baseMagicoinRerollCost)&&void 0!==U?U:W._DEFAULT_BUFF_REROLL_MAGICOIN_COST,$=Math.pow(null!==(F=G.options.buffRerollData.rerollCostMultiplier)&&void 0!==F?F:W._DEFAULT_BUFF_REROLL_MAGICOIN_COST_MULTIPLIER,k)),Math.ceil(j*$)}static getOpponentsRerollCost(k){var B,U,F;const G=W.getRiftsDataProvider().getRiftsPortalConfig();let j=W._DEFAULT_OPPONENTS_REROLL_MAGICOIN_COST,$=W._DEFAULT_OPPONENTS_REROLL_MAGICOIN_COST_MULTIPLIER*k;return(null===(B=null==G?void 0:G.options)||void 0===B?void 0:B.opponentsRerollData)&&(j=null!==(U=G.options.opponentsRerollData.baseMagicoinRerollCost)&&void 0!==U?U:W._DEFAULT_OPPONENTS_REROLL_MAGICOIN_COST,$=Math.pow(null!==(F=G.options.opponentsRerollData.rerollCostMultiplier)&&void 0!==F?F:W._DEFAULT_OPPONENTS_REROLL_MAGICOIN_COST_MULTIPLIER,k)),Math.ceil(j*$)}static canRerollBuff(k){var B;const U=W.getRiftsDataProvider().getRiftsPortalConfig();let F;return(null===(B=null==U?void 0:U.options)||void 0===B?void 0:B.buffRerollData)&&(F=U.options.buffRerollData.maxRerolls),void 0===F||k{"use strict";U.d(B,{n:()=>bt});var F=U(8674),G=U(87490),j=U(62459),$=U(85855),H=U(99625),V=U(36648),W=U(24652),q=U(35120),K=U(23082),z=U(20705),Y=U(74958),Q=U(13956),X=U(43714),Z=U(58707),J=U(642),tt=U(2272),et=U(53661),it=U(54865),st=U(80060),nt=U(71790),at=U(37050),rt=U(1551),ot=U(43503),ht=U(68836),ct=U(14117),dt=U(68387),lt=U(90500),ut=U(72955),ft=U(82781);class bt extends z.f{constructor(){super(...arguments),this.persistentPrefabs=[]}get modifierGridPrefab(){return this._modifierGridPrefab}init(k=ut.I){const B=j.wa5.getActiveScene().container;B.bind(G.BattleConstants).to(G.BattleConstants).asSingleton(),B.bind(G.ConstantsDataProvider).to(nt.T).asSingleton(),q.q.instance.prodigy.load.assetsAsPromise([$.V.Bgm_intro,V.q.Sparkle]).then((()=>{q.q.instance.prodigy.audio.playBGM($.V.Bgm_intro,!0),q.q.instance.prodigy.audio.resumeBGM()})).catch(j.RQr.createHandler("Failed to load the Rifts into BGM.")),this.addBackgroundFill(k===ft.Q?"#639D95":void 0),new it.w(k).start().catch(j.RQr.createHandler("Failed to start the RiftsStateMachine"))}setRiftRunProgress(k){switch(ht.T.riftTier=k.currentRiftTier,k.type){case W.cn.Normal:ht.T.firstBattleCompleted=k.round>1;const B=q.q.instance.prodigy.gameContainer.get("c47-20b6");B.rifts.riftRunUuid=k.riftRunSegmentUuid,B.rifts.riftRunRoundUuid=k.riftRunRoundSegmentUuid,j.Aq$.isDefined(k.chosenOpponentTeamIndex)&&(ht.T.chosenOpponentTeamIndex=k.chosenOpponentTeamIndex,ht.T.chosenHomeTeamPetUids=k.chosenHomeTeamPetUids)}}resumeRiftRun(k){var B;if(ht.T.canResumeBattle=k,k)q.q.instance.game.state.start(K.G.Rifts,void 0,ft.Q);else switch(null===(B=this._riftsSyncedDataStore.cache.currentRiftRunProgress)||void 0===B?void 0:B.type){case W.cn.Normal:ht.T.sawBuffPopup=!1,q.q.instance.game.state.start(K.G.Rifts,void 0,lt.R);break;case W.cn.Boss:q.q.instance.game.state.start(K.G.Rifts,void 0,dt.O);break;default:ot.L.resetRiftRunProgressAndTeleportToDragonIsle(null).catch(j.RQr.createHandler("RiftsScreen: Failed to reset rift run progress and teleport to Dragon Isle when resuming a rift run with no specified rift tier type"))}}static onRiftRunClose(k){const B=q.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);q.q.instance.prodigy.open.confirmationDialog(new J.k(B.getText("BUTTON_QUIT_CAPITAL"),(()=>{ot.L.resetRiftRunProgressAndTeleportToDragonIsle(k).catch(j.RQr.createHandler("RiftsScreen: Failed to reset rift run progress and teleport to Dragon Isle"))}),B.getText("BUTTON_BACK_CAPITAL"),(()=>q.q.instance.prodigy.open.menuCloseAll()),void 0,tt.E.Medium,void 0,B.getText("RIFT_RUN_CLOSE_POPUP_TITLE"),B.getText("RIFT_RUN_CLOSE_POPUP_BODY")))}addBackgroundFill(k="#ddb2a5"){const B=new j._mx;B.name="BackgroundFill",B.layer="background",B.addComponent(j.dLy);const U=B.addComponent(j.Lom);U.setSize(new j.or0(1920,1080)),U.setColor(k),j.wa5.getActiveScene().addGameObject(B)}initPersistentPrefabs(){return(0,F.sH)(this,void 0,void 0,(function*(){this.persistentPrefabs.length||(this.persistentPrefabs=yield Promise.all([rt.Q.addModifierGridPrefab().then((k=>this._modifierGridPrefab=k)),rt.Q.addProgressTrackPrefab()]))}))}destroyPersistentPrefabs(){for(const k of this.persistentPrefabs)k.destroy();this.persistentPrefabs.length=0}updateModifierGrid(){rt.Q.updateModifierGridPrefab(this._modifierGridPrefab)}showBuffPopup(){var k,B;const U=this._riftsSyncedDataStore.cache.currentRiftRunProgress;if(!U)return void j.VyI.log("RiftsScreen: Cannot show buff popup if current rift run is undefined",j.$bb.Error);if(U.type!==W.cn.Normal)return void j.VyI.log("RiftsScreen: Cannot show buff popup if current rift run is not a normal rift",j.$bb.Error);const F=U.buffModifier;if(!F)return void j.VyI.log("RiftsScreen: Cannot show buff popup if buff modifier is undefined",j.$bb.Error);const G=null!==(k=null==U?void 0:U.numBuffRerolls)&&void 0!==k?k:0,$=at.Q.canRerollBuff(G),V=at.Q.getBuffRerollCost(G),K=U.currentRiftTier,z=q.q.instance.prodigy.gameContainer.get("5c7-e02d");q.q.instance.prodigy.open.prefabMenu(H.l.RiftRunModifierPopup,(()=>{var k;const B=null===(k=q.q.instance.prodigy.open.menus[q.q.instance.prodigy.open.menus.length-1].prefab.findComponentInChildren(X.x))||void 0===k?void 0:k.GameObject;B&&rt.Q.animateModifierIconToGrid(B,0),this.injectToHeaderPrefab({[et.bL.ShowMagicoin]:!z.isHardCurrencyMemberLocked(V)}).catch(j.RQr.createHandler("Failed to inject magicoin show into header prefab"))}),void 0,!0,!1,{IS_BUFF:!0,MODIFIER_ICON:bt.getGuidForModifierIcon(null!==(B=F.icon)&&void 0!==B?B:""),MODIFIER_NAME:F.caption,MODIFIER_DESCRIPTION:F.description,MODIFIER_GOLD_BONUS:0,MODIFIER_REROLL_COST:V,SHOW_MC_COST:!z.isHardCurrencyMemberLocked(V),SHOW_MEMBER_ICON:z.isHardCurrencyMemberLocked(V),CAN_REROLL_MODIFIER:$,MAGICOIN_BALANCE:z.getBalance(27),RIFT_TIER:K});q.q.instance.prodigy.gameContainer.get("c47-20b6").rifts.sendRiftRunBonusOffered(F),this.injectToHeaderPrefab({[et.bL.ShowMagicoin]:!1}).catch(j.RQr.createHandler("Failed to inject magicoin show into header prefab"))}injectToHeaderPrefab(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._headerPrefab){const k=q.q.instance.prodigy.gameContainer.get("d0e-64fd");this._headerPrefab=yield k.loadWithDependenciesFromGUID(H.l.RiftRunMenuBackground),j.wa5.getActiveScene().addGameObject(this._headerPrefab)}st.d.updateInjectedValues(this._headerPrefab,k)}))}handleNotEnoughCurrency(k,B){var U;this._headerPrefab||j.VyI.log("RiftsScreen: Cannot handle not enough currency since the header prefab is not initialized",j.$bb.Error);const F=null===(U=this._headerPrefab)||void 0===U?void 0:U.findComponentInChildren(Z.b);null==F||F.tryDismissTooltip(),null==F||F.handleNotEnoughCurrency(k,Y.Aj.RIFT_ENCOUNTER_REROLL_TYPE,B)}closeNotEnoughCurrencyTooltip(){var k;const B=null===(k=this._headerPrefab)||void 0===k?void 0:k.findComponentInChildren(Z.b);null==B||B.tryDismissTooltip()}shutdown(){var k;this.closeNotEnoughCurrencyTooltip(),null===(k=this._headerPrefab)||void 0===k||k.destroy(),this._headerPrefab=null,this.destroyPersistentPrefabs(),super.shutdown()}static getGuidForModifierIcon(k){return V.q[`Effect_${k}_small`]}}(0,F.Cg)([(0,Q.b)("9ac-9677"),(0,F.Sn)("design:type",ct.M)],bt.prototype,"_riftsSyncedDataStore",void 0)},1551:(k,B,U)=>{"use strict";U.d(B,{Q:()=>nt});var F,G,j=U(8674),$=U(62459),H=U(88022),V=U(99625),W=U(24652),q=U(42448),K=U(35120),z=U(29834),Y=U(23082),Q=U(13956),X=U(85515),Z=U(43714);!function(k){k.StepSpacing="STEP_SPACING",k.StepData="STEP_DATA"}(F||(F={})),function(k){k.TrackBackingColor="TRACK_BACKING_COLOR",k.OuterCircleColor="OUTER_CIRCLE_COLOR",k.InnerCircleColor="INNER_CIRCLE_COLOR",k.IconImage="ICON_IMAGE",k.IsCurrentStep="IS_CURRENT_STEP",k.ProgressIndicatorOuter="PROGRESS_INDICATOR_OUTER"}(G||(G={}));var J,tt=U(80060),et=U(77713),it=U(39785),st=U(68836);!function(k){k.DefaultBorderColor="#655466",k.CurrentStepBorderColor="#00466E",k.FinalCurrentStepBorderColor="#7D1E3D",k.CompletedStepBorderColor="#55772F",k.DefaultInnerCircleColor="#ABA5C4",k.CurrentStepInnerCircleColor="#3D99D1",k.FinalCurrentStepInnerCircleColor="#F68F00",k.CompletedStepInnerCircleColor="#A6C755"}(J||(J={}));class nt{static addProgressTrackPrefab(){return(0,j.sH)(this,arguments,void 0,(function*(k=this.PROGRESS_TRACK_X,B=this.PROGRESS_TRACK_Y){const U=yield tt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,V.l.ProgressTrack,this.getProgressTrackInjectionData());return U.transform.setPosition(k,B),U}))}static getProgressTrackInjectionData(){const k=K.q.instance.prodigy.gameContainer.get("9ac-9677").cache.currentRiftRunProgress,B=(null==k?void 0:k.type)===W.cn.Normal?q.vP:1,U=(null==k?void 0:k.type)===W.cn.Normal?k.round:1;return{[F.StepSpacing]:20,[F.StepData]:Array.from({length:B},((k,F)=>{const j=F===U-1,$=F===B-1,V=F0?this.getModifierGridInjectionData():this.getEmptyModifierGridInjectionData());return F.transform.setPosition(k,B),F}))}static updateModifierGridPrefab(k){const B=this.getModifierGridInjectionData();k.findComponentInChildren(et.h).GameObject.children.forEach(((k,U)=>{tt.d.updateInjectedValues(k,B.MODIFIERS[U])}))}static getModifierGridInjectionData(){const k=K.q.instance.prodigy.gameContainer.get("9ac-9677").cache.currentRiftRunProgress;if(!k)return{MODIFIERS:[]};switch(k.type){case W.cn.Boss:return{MODIFIERS:k.bossRiftModifiers.map((k=>({IS_BUFF:!1,DISABLED:!1,MODIFIER_ICON:it.n.getGuidForModifierIcon(k.icon),MODIFIER_TEXT:"",MODIFIER_TOOLTIP_TITLE:k.caption,MODIFIER_TOOLTIP_TEXT:k.description})))};case W.cn.Normal:const B=k.buffModifier,U=[...k.chosenNerfModifiers];return st.T.chosenModifier&&U.push(st.T.chosenModifier),{MODIFIERS:[{IS_BUFF:!0,DISABLED:!1,MODIFIER_ICON:it.n.getGuidForModifierIcon(B.icon),MODIFIER_TEXT:"",MODIFIER_TOOLTIP_TITLE:B.caption,MODIFIER_TOOLTIP_TEXT:B.description},...U.map((k=>({IS_BUFF:!1,DISABLED:!1,MODIFIER_ICON:it.n.getGuidForModifierIcon(k.icon),MODIFIER_TEXT:"",MODIFIER_TOOLTIP_TITLE:k.caption,MODIFIER_TOOLTIP_TEXT:k.description}))),...Array.from({length:3-U.length},(()=>({IS_BUFF:!1,DISABLED:!0})))]};default:return{MODIFIERS:[]}}}static getEmptyModifierGridInjectionData(){return{MODIFIERS:Array.from({length:4},(()=>({IS_BUFF:!1,DISABLED:!0})))}}static animateModifierIconToGrid(k,B){const U=k.findComponentInChildren(z.j),F=U.GameObject.parent,G=K.q.instance.game.state.get(Y.G.Rifts),j=k.findComponentInChildren(Z.x),H=G.modifierGridPrefab.children[0].children[B].transform;F.active=!0;const V=k.transform.worldPosition;k.layer=X.E.UiLayer,k.parent=null,k.transform.worldPosition=V,j.setMovement(H.worldPosition.x-H.fullWidth/2,H.worldPosition.y-H.fullHeight/2),j.startTween(),j.onComplete.addOnce((()=>{var B;null===(B=k.findComponentInChildren($.okU))||void 0===B||B.destroy(),U.GameObject.active=!0,U.playAnimation("add-fx",!1),U.OnAnimationComplete.addOnce((()=>{k.destroy(),G.updateModifierGrid()}))}))}}nt.PROGRESS_TRACK_X=1243,nt.PROGRESS_TRACK_Y=134,nt.MODIFIER_GRID_X=37,nt.MODIFIER_GRID_Y=134,nt.MODIFIER_GRID_X_IN_BATTLE=18,nt.MODIFIER_GRID_Y_IN_BATTLE=50,(0,j.Cg)([(0,Q.b)("d0e-64fd"),(0,j.Sn)("design:type",$.wNP)],nt,"_prefabLoader",void 0)},43503:(k,B,U)=>{"use strict";U.d(B,{L:()=>rt});var F=U(8674),G=U(62459),j=U(99625),$=U(36648),H=U(24227),V=U(24652),W=U(42448),q=U(90633),K=U(73678),z=U(38170);class Y{static ceilAboveEpsilon(k){return Math.ceil(k-Y.EPSILON)}static round(k,B){const U=Math.pow(10,B);return Math.round(k*U)/U}static weightedRandom(k,B=100){var U;const F=k.reduce(((k,U)=>{var F;return k+(null!==(F=U.weight)&&void 0!==F?F:B)}),0);let G=Math.random()*F;for(const j of k)if(G-=null!==(U=j.weight)&&void 0!==U?U:B,G<=0)return j;return k[0]}}Y.EPSILON=1e-4;var Q=U(35120),X=U(91207),Z=U(77938),J=U(46784),tt=U(65050),et=U(41674),it=U(44094),st=U(97447),nt=U(30226),at=U(24409);class rt{static getWeightedRouletteReward(k){const B=Y.weightedRandom(k),U=Z.t.getItem(B.type,B.id),F=null==U?void 0:U.data;if(!U||!F)return G.VyI.log("RiftsUtil#getWeightedRouletteReward: Item not found",G.$bb.Error),null;return{type:B.type,ID:B.id,N:B.quantity,data:{name:nt.J.getLocalizationNameKey(F),flavorText:nt.J.getLocalizationFlavorKey(F),rarity:F.rarity}}}static visuallyAdjustDragonRouletteRewards(k){const B=k.reduce(((k,B)=>k+B.weight),0),U=k.filter((k=>"gold"===k.type||"currency"===k.type)).reduce(((k,B)=>k+B.weight),0),F=B-U;let G=1,j=1;if(F>0){const k=.3;G=B*(1-k)/U,j=B*k/F}return k.map((k=>{const B="gold"===k.type||"currency"===k.type?k.weight*G:k.weight*j;return{type:k.type,ID:k.id,N:k.quantity,R:B}}))}static canResumeRiftRun(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U,F,j,$;const H=Q.q.instance.prodigy.gameContainer.get("196-d3a5"),V=Q.q.instance.prodigy.gameContainer.get("9ac-9677"),[W,q,K]=yield Promise.all([H.fetchRiftsConfig(),H.fetchRiftsTierData(),H.getActiveRiftsPortalIds()]),z=null!==(B=null===(k=V.cache.currentRiftRunProgress)||void 0===k?void 0:k.currentRiftTier)&&void 0!==B?B:void 0;return!(!(W&&q&&H.selectedPortalId&&(null===(U=W[H.selectedPortalId])||void 0===U?void 0:U.riftsId)===(null===(F=null==V?void 0:V.cache)||void 0===F?void 0:F.currentRiftsId))||G.Aq$.isDefined(z)&&(null===(j=q[z])||void 0===j?void 0:j.type)!==(null===($=V.cache.currentRiftRunProgress)||void 0===$?void 0:$.type)||!(null==K?void 0:K.includes(H.selectedPortalId)))}))}static resetRiftRunProgressAndTeleportToDragonIsle(k){return(0,F.sH)(this,void 0,void 0,(function*(){k?yield k.goToState(at.y):Q.q.instance.prodigy.world.it(st.j.MAP_KEY),yield Q.q.instance.prodigy.gameContainer.get("8f8-d5bc").resetRiftRun()}))}static getBossDisplayDataFromBossType(k){var B;const U=Q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),F=H.j.getBossElementFromBossType(k);let j="",$="",W="",q="";const K=V.vA[k];return j=K?U.getText(K):it.$.toTitleCase(k),W=V.rI[k][0],q=null!==(B=V.rI[k][1])&&void 0!==B?B:"",$=V.Hz[k],{name:j,keyPoseAtlasGuid:W,keyPoseFrame:q,element:F,tierBackgroundImageGuid:$}}static setUpIconGuidOverrides(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=Q.q.instance.prodigy.gameContainer.get("196-d3a5"),U=yield B.fetchRiftsConfig();for(const F of W.T7){const B=W.JG[F];if(!U||!G.Aq$.isDefined(B))continue;const j=null===(k=U[B])||void 0===k?void 0:k.currencyTheme;if(!j)continue;const H=`Rifts_currency_${j}`;$.q[H]&&(X.P[`Icon_currency_${F}`]=$.q[H],X.P[`Icon_currency_${F}_store`]=$.q[`${H}_store`])}}))}static shouldShowRiftsCycleModal(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=Q.q.instance.prodigy.gameContainer.get("196-d3a5"),U=yield B.fetchRiftsConfig();if(!U)return!1;const F=Q.q.instance.prodigy.gameContainer.get("306-5359");let G=!1;return Object.values(W.ni).forEach((B=>{this.checkRiftsCycleData(U[B],B,k)&&(G=!0)})),F.forceSaveCharacter(),G}))}static checkRiftsCycleData(k,B,U){var F,G,j,$,H,V,W,Y,X,Z,J,tt,et,it;let st=!0,nt=!0;const at=null!==(F=(it=Q.q.instance.prodigy.gameContainer.get("306-5359").data).rifts)&&void 0!==F?F:it.rifts={};null!==(G=at.cycleData)&&void 0!==G||(at.cycleData={});const rt=z.r.toDateUtcMs(Date.now()),ot=(null==k?void 0:k.startDate)?z.r.toDateUtcMs(k.startDate):void 0,ht=(null==k?void 0:k.endDate)?z.r.toDateUtcMs(k.endDate):void 0;let ct=null!==($=null===(j=at.cycleData[B])||void 0===j?void 0:j.modalSeenCount)&&void 0!==$?$:0,dt=null!==(V=null===(H=at.cycleData[B])||void 0===H?void 0:H.skippedResets)&&void 0!==V?V:0;return(null===(W=null==k?void 0:k.options.cycleModalData)||void 0===W?void 0:W.cycleId)!==(null===(Y=at.cycleData[B])||void 0===Y?void 0:Y.lastSeenCycleId)&&(ct=0,dt=0),U!==K.A_.DRAGONISLE?(st=!1,nt=!1):(null==k?void 0:k.enabled)?ot&&ot>rt||ht&&ht=k.options.cycleModalData.maxTimesSeen?st=!1:(null===(tt=null==k?void 0:k.options.cycleModalData)||void 0===tt?void 0:tt.riftsToSkipCount)&&ct>0&&dt{"use strict";U.d(B,{L:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{enter(k=0,B){const U=function(){this.gameObject.active=!0,this._cardEnterTween.resetToStart(),this._cardEnterTween.playAnimation(),B&&this._cardEnterTween.onTweenComplete.addOnce(B)}.bind(this);window.setTimeout(U,k)}exit(k=0,B){const U=function(){this._cardExitTween.playAnimation(),this._cardExitTween.onTweenComplete.addOnce((()=>{B&&B()}))}.bind(this);window.setTimeout(U,k)}};(0,F.Cg)([(0,G.MnK)(G.bTj),(0,F.Sn)("design:type",G.bTj)],$.prototype,"_cardEnterTween",void 0),(0,F.Cg)([(0,G.MnK)(G.bTj),(0,F.Sn)("design:type",G.bTj)],$.prototype,"_cardExitTween",void 0),$=(0,F.Cg)([(0,G.EVk)("RiftRunOpponentCardAnimationController",j.Y.rifts)],$)},68836:(k,B,U)=>{"use strict";U.d(B,{T:()=>G});class F{static clear(){this.chosenModifier=null,this.riftTier=1,this.chosenHomeTeamPetUids=void 0,this.sawBuffPopup=!1}}F.riftTier=1,F.sawBuffPopup=!1;class G extends F{static clear(){super.clear(),this.chosenOpponentTeamIndex=-1,this.usedPetUids=[],this.reward=void 0,this.isFinalBattle=!1,this.firstBattleCompleted=!1,this.canResumeBattle=!1}}G.chosenOpponentTeamIndex=-1,G.usedPetUids=[],G.isFinalBattle=!1},14117:(k,B,U)=>{"use strict";U.d(B,{M:()=>z,R:()=>G});var F,G,j=U(8674),$=U(62459),H=U(79687),V=U(24652),W=U(35120),q=U(35537),K=U(24227);!function(k){k[k.Available=1]="Available",k[k.OnCooldown=2]="OnCooldown",k[k.Expired=3]="Expired"}(G||(G={}));let z=class{constructor(){this[F]="riftsSyncedData"}get cache(){return this._cache}init(k){$.Aq$.isDefined(this._cache)?$.VyI.log("RiftsSyncedDataStore was already initialized",$.$bb.Warning):this._cache=k}getUsedPetMetadata(k){var B,U,F,G;const j=W.q.instance.prodigy.gameContainer.get("196-d3a5");if(!$.Aq$.isDefined(j.selectedPortalId))return;const H=null===(U=null===(B=this._cache[j.selectedPortalId])||void 0===B?void 0:B.metaProgress.usedPetData)||void 0===U?void 0:U[k];return(null===(F=this._cache.currentRiftRunProgress)||void 0===F?void 0:F.type)===V.cn.Normal&&$.Aq$.isDefined(H)&&(null===(G=this._cache.currentRiftRunProgress)||void 0===G?void 0:G.usedPetUids.includes(k))?{timestamp:void 0,currentlyAvailable:!1,reuseCount:0}:H}getUsedPetReuseCost(k){var B,U;const F=this.getUsedPetMetadata(k),G=null===(U=null===(B=W.q.instance.prodigy.gameContainer.get("196-d3a5").getRiftsPortalConfig())||void 0===B?void 0:B.options)||void 0===U?void 0:U.petReuseData;return $.Aq$.isDefined(null==F?void 0:F.timestamp)&&G?K.j.getRiftsPetReuseCost(F,G,Date.now()):0}isPetAvailableForUse(k){return this.getPetCooldownStatus(k)!==G.OnCooldown}getPetCooldownStatus(k){var B,U;const F=this.getUsedPetMetadata(k),j=W.q.instance.prodigy.gameContainer.get("196-d3a5");if(!F)return G.Available;const H=F.currentlyAvailable?G.Available:G.OnCooldown;if(void 0===F.timestamp||F.currentlyAvailable)return H;const V=null===(U=null===(B=j.getRiftsPortalConfig())||void 0===B?void 0:B.options)||void 0===U?void 0:U.petReuseData;return $.Aq$.isDefined(V)&&void 0!==(null==V?void 0:V.petCooldownMs)?Date.now()>=F.timestamp+V.petCooldownMs?G.Expired:G.OnCooldown:H}hasUsedPets(){var k,B,U;if((null===(k=this._cache.currentRiftRunProgress)||void 0===k?void 0:k.type)!==V.cn.Normal)return!1;const F=W.q.instance.prodigy.gameContainer.get("196-d3a5");return(null===(B=this._cache.currentRiftRunProgress)||void 0===B?void 0:B.usedPetUids.length)>0||Object.values(null!==(U=this._cache[F.selectedPortalId].metaProgress.usedPetData)&&void 0!==U?U:{}).length>0}[(F=q.sE,q.JN)](k){return(0,j.sH)(this,void 0,void 0,(function*(){this._cache=k}))}getRiftsEntityPortalEntryData(){const k=W.q.instance.prodigy.gameContainer.get("196-d3a5");if(k.selectedPortalId)return this._cache[k.selectedPortalId];$.VyI.log("RiftsSyncedDataStore: No selected portal ID when attempting to fetch the portal entry data",$.$bb.Error)}};z=(0,j.Cg)([(0,H.injectable)()],z)},68387:(k,B,U)=>{"use strict";U.d(B,{O:()=>et});var F,G=U(8674),j=U(87490),$=U(62459),H=U(68910),V=U(88022),W=U(99625),q=U(24652),K=U(35120),z=U(23082),Y=U(53661),Q=U(37050),X=U(39785),Z=U(43503),J=U(11673),tt=U(53027);!function(k){k.AllModifierData="ALL_MODIFIER_DATA",k.OnNext="ON_NEXT",k.BossKeyPose="BOSS_KEY_POSE",k.BossName="NAME",k.WeaknessIcon="WEAKNESS_ICON",k.BossIsSilhouetted="BOSS_IS_SILHOUETTED",k.ShowBossInfo="SHOW_INFO"}(F||(F={}));class et extends J.O{constructor(){super(...arguments),this.bossBackgroundColors={[j.EElementType.Fire]:{background:"#E2B48B",pattern:"#F1C69C"},[j.EElementType.Ice]:{background:"#86B5C6",pattern:"#96C5D6"},[j.EElementType.Plant]:{background:"#C1CC90",pattern:"#D4DFA6"},[j.EElementType.Storm]:{background:"#A58EAF",pattern:"#B49EBE"},[j.EElementType.Water]:{background:"#93A9E9",pattern:"#A3B9F9"},[j.EElementType.Shadow]:{background:"#9F99BD",pattern:"#ABA5C7"},[j.EElementType.Physical]:{background:"#93877B",pattern:"#9F9387"},[j.EElementType.Astral]:{background:"#E3D09D",pattern:"#F2DFAE"}}}enter(){const k=Object.create(null,{enter:{get:()=>super.enter}});return(0,G.sH)(this,void 0,void 0,(function*(){var B;const U=K.q.instance.game.state.get(z.G.Rifts),G=yield Z.L.canResumeRiftRun(),J=this._riftsSyncedDataStore.cache.currentRiftRunProgress;if(!U||!G||(null==J?void 0:J.type)!==q.cn.Boss||!J.bossType)return void(yield Z.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine));yield U.initPersistentPrefabs();const et=Z.L.getBossDisplayDataFromBossType(J.bossType),it=this._riftsSyncedDataStore.getRiftsEntityPortalEntryData(),st=this.bossBackgroundColors[et.element],nt=this.getRestriction(),at=Q.Q.getRestrictionBadgeData(nt);this._prefabHeaderInjectionValues={[Y.bL.HeaderTitle]:et.name,[Y.bL.OnClose]:()=>{X.n.onRiftRunClose(this._stateMachine)},[Y.bL.ShowRiftKeys]:!1,[Y.bL.BackgroundHex]:st.background,[Y.bL.GradientHex]:H.Color.shared.setValue(st.background.toLowerCase()).toNumber(),[Y.bL.DiamondsHex]:st.pattern,[Y.bL.DiamondsAlpha]:.8};const rt=$.wa5.getActiveScene().container.get(j.BattleConstants),ot=!$.Aq$.isDefined(null===(B=it.metaProgress.bossDefeats)||void 0===B?void 0:B[J.bossType]);this._prefabGUID=W.l.BossRiftScreen,this._prefabInjectionValues={[F.AllModifierData]:J.bossRiftModifiers.map((k=>({IS_BUFF:!1,DISABLED:!1,MODIFIER_ICON:X.n.getGuidForModifierIcon(k.icon),MODIFIER_NAME:k.caption,MODIFIER_DESCRIPTION:k.description,MODIFIER_TEXT:"",MODIFIER_GOLD_BONUS:0}))),[F.BossKeyPose]:[et.keyPoseAtlasGuid,et.keyPoseFrame],[F.BossName]:et.name,[F.WeaknessIcon]:[V._.Ui_battle_revamp_json,`icon-mini-element-${rt.getElementalWeakness(et.element)}`],[F.BossIsSilhouetted]:ot,[F.ShowBossInfo]:!ot,[F.OnNext]:()=>{this._stateMachine.goToState(tt.t).catch($.RQr.createHandler("BossRiftScreenState: Error transitioning to TeamSelectionState"))},[Y.Fm.ShowRestrictionBadge]:at.showRestrictionBadge,[Y.Fm.RestrictionBadgeTest]:at.restrictionBadgeText},yield k.enter.call(this)}))}}},86498:(k,B,U)=>{"use strict";U.d(B,{j:()=>V});var F=U(8674),G=U(35120),j=U(68836),$=U(72955),H=U(11673);class V extends H.O{enter(){const k=Object.create(null,{enter:{get:()=>super.enter}});return(0,F.sH)(this,void 0,void 0,(function*(){yield k.enter.call(this);G.q.instance.prodigy.gameContainer.get("c47-20b6").rifts.cachedCurrentBossRiftProgress=void 0,j.T.clear(),yield this._stateMachine.goToState($.I)}))}}},84060:(k,B,U)=>{"use strict";U.d(B,{n:()=>W});var F=U(8674),G=U(90633),j=U(35120),$=U(68836),H=U(72955),V=U(87427);class W extends V.I{enter(){const k=Object.create(null,{enter:{get:()=>super.enter}});return(0,F.sH)(this,void 0,void 0,(function*(){yield k.enter.call(this);const B=$.T.firstBattleCompleted&&!j.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(G.B.FEATURE_RIFTS,G.B.BREADCRUMB_RIFTS_AFTER_FIRST_CUTSCENE_SEEN),U=$.T.firstBattleCompleted;$.T.clear(),this._segment.rifts.cachedCurrentNormalRiftProgress=void 0,this._segment.rifts.riftInstanceUuid=void 0,B?j.q.instance.prodigy.world.playScene("dragon_isle-postFirstRift"):yield this._stateMachine.goToState(H.I,{didRiftBattle:U})}))}}},24409:(k,B,U)=>{"use strict";U.d(B,{y:()=>W});var F=U(8674),G=U(24652),j=U(35120),$=U(97447),H=U(68836),V=U(87427);class W extends V.I{enter(){const k=Object.create(null,{enter:{get:()=>super.enter}});return(0,F.sH)(this,void 0,void 0,(function*(){yield k.enter.call(this);let B=!1;const U=this._riftsSyncedDataStore.cache.currentRiftRunProgress;switch(null==U?void 0:U.type){case G.cn.Boss:this._segment.rifts.cachedCurrentBossRiftProgress=void 0,B=!0,H.T.clear();break;case G.cn.Normal:this._segment.rifts.cachedCurrentNormalRiftProgress=void 0,this._segment.rifts.riftInstanceUuid=void 0,B=H.T.firstBattleCompleted,H.T.clear()}this._segment.rifts.riftInstanceUuid=void 0,j.q.instance.prodigy.world.it($.j.MAP_KEY,void 0,void 0,{didRiftBattle:B})}))}}},53232:(k,B,U)=>{"use strict";U.d(B,{X:()=>q});var F=U(8674),G=U(24652),j=U(68836),$=U(43503),H=U(86498),V=U(84060),W=U(11673);class q extends W.O{enter(){const k=Object.create(null,{enter:{get:()=>super.enter}});return(0,F.sH)(this,void 0,void 0,(function*(){yield k.enter.call(this);const B=this._riftsSyncedDataStore.cache.currentRiftRunProgress;if(!B)return j.T.clear(),void(yield $.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine));switch(null==B?void 0:B.type){case G.cn.Boss:yield this._stateMachine.goToState(H.j);break;case G.cn.Normal:yield this._stateMachine.goToState(V.n)}}))}}},90500:(k,B,U)=>{"use strict";U.d(B,{R:()=>yt});var F,G=U(8674),j=U(87490),$=U(62459),H=U(68910),V=U(88022),W=U(99625),q=U(36648),K=U(54300),z=U(24652),Y=U(42448),Q=U(35120),X=U(77938),Z=U(23082),J=U(74958),tt=U(90744),et=U(13956),it=U(43714),st=U(64353),nt=U(95057),at=U(53661),rt=U(22023),ot=U(80060),ht=U(44094),ct=U(77713),dt=U(47255),lt=U(37050),ut=U(39785),ft=U(1551),bt=U(43503),pt=U(82436),vt=U(68836),gt=U(11673),mt=U(53027);!function(k){k.AllOpponentsData="ALL_OPPONENTS_DATA",k.RerollOpponents="REROLL_OPPONENTS",k.ContentAlphaTween="CONTENT_ALPHA_TWEEN",k.OpponentTeamData="OPPONENT_TEAM_DATA",k.IsMemberOption="IS_MEMBER_OPTION",k.IsMemberOptionLocked="IS_MEMBER_OPTION_LOCKED",k.CardSelectedCallback="CARD_SELECTED_CALLBACK",k.ModifierIcon="MODIFIER_ICON",k.ModifierName="MODIFIER_NAME",k.ModifierDescription="MODIFIER_DESCRIPTION",k.ModifierGoldBonus="MODIFIER_GOLD_BONUS",k.PetId="PET_ID",k.PetName="PET_NAME",k.WeaknessIcon="WEAKNESS_ICON",k.PetScale="PET_SCALE",k.PetWidthLimit="PET_WIDTH_LIMIT",k.PetHeightLimit="PET_HEIGHT_LIMIT",k.OnPetLoaded="ON_PET_LOADED",k.IsRarePet="IS_RARE_PET",k.InputBlock="INPUT_BLOCK"}(F||(F={}));class yt extends gt.O{constructor(){super(...arguments),this._teamLoadedFlags=[!1,!1,!1]}enter(){const k=Object.create(null,{enter:{get:()=>super.enter}});return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,j,H,V,q;if(!((yield this.updateCachedRiftRunProgress())&&(yield bt.L.canResumeRiftRun())&&$.Aq$.isDefined(this._currentRiftProgress.nextOpponentTeamOptions)))return void(yield bt.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine));this._segment.rifts.sendRiftRunOpponentSelectionMenuOpenedEvent(),vt.T.chosenModifier=null;const z=Q.q.instance.game.state.get(Z.G.Rifts);yield z.initPersistentPrefabs();const X=null!==(B=this._currentRiftProgress.numOpponentRerolls)&&void 0!==B?B:0,J=lt.Q.canRerollOpponents(X),tt=lt.Q.getOpponentsRerollCost(X),et=Q.q.instance.prodigy.gameContainer.get("5c7-e02d"),it=this.getRiftsKeyId(),st=null!==(j=null===(U=this._secureInventory.get({type:"riftRunKey",id:it}))||void 0===U?void 0:U.quantity)&&void 0!==j?j:0,nt=Q.q.instance.prodigy.gameContainer.get("196-d3a5"),rt=nt.getRiftsPortalConfig();let ot=Y.X5.Default,ht=!1;rt&&nt.selectedPortalId&&(ot=null!==(H=null==rt?void 0:rt.menuTheme)&&void 0!==H?H:Y.X5.Default,ht=null!==(V=null==rt?void 0:rt.storeEnabled)&&void 0!==V&&V),this._prefabHeaderInjectionValues={[at.bL.HeaderTitle]:this._localizer.getText("RIFTS_HEADER_TITLE_OPPONENT_SELECTION"),[at.bL.OnClose]:()=>ut.n.onRiftRunClose(this._stateMachine),[at.bL.ShowHeaderText]:!0,[at.bL.ShowMagicoin]:!et.isHardCurrencyMemberLocked(tt),[at.bL.ShowMagicoinText]:!1,[at.bL.ShowRiftKeys]:!1,[at.bL.StoreEnabled]:ht,[at.bL.StoreKey]:nt.selectedPortalId?Y.d[nt.selectedPortalId]:void 0,[at.bL.RiftCurrencyId]:Y.Ty[null!==(q=nt.selectedPortalId)&&void 0!==q?q:Y.ni.Portal1],[at.bL.RiftKeyAmount]:this.getRiftKeyComparisonText(st),[at.bL.RiftKeyIcon]:K.p[`riftRunKey-${it}`],[at.bL.BackgroundHex]:Y.a6[ot],[at.bL.GradientHex]:Y.aK[ot],[at.bL.DiamondsHex]:Y.h5[ot],[at.bL.DiamondsAlpha]:Y.VS[ot]},this._prefabGUID=W.l.RiftRunOpponentSelection,this._prefabInjectionValues={[F.AllOpponentsData]:this.getAllOpponentTeamsData(this._currentRiftProgress.nextOpponentTeamOptions,this._currentRiftProgress),[F.RerollOpponents]:()=>(0,G.sH)(this,void 0,void 0,(function*(){return this.rerollOpponents()})),[at.bL.OpponentsRerollCost]:tt,[at.bL.ShowRerollMagicoinCost]:!et.isHardCurrencyMemberLocked(tt),[at.bL.ShowRerollMemberIcon]:et.isHardCurrencyMemberLocked(tt),[at.bL.CanRerollOpponents]:J},yield k.enter.call(this)}))}updateCachedRiftRunProgress(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._riftsSyncedDataStore.cache.currentRiftRunProgress;return k&&k.type===z.cn.Normal?(this._currentRiftProgress=k,!0):(yield bt.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine),!1)}))}onOpponentCardsSpawned(k){this._teamLoadedFlags[k]=!0,this._teamLoadedFlags.indexOf(!1)>=0||this.showOpponentCardAnimation(!0)}getAllOpponentTeamsData(k,B,U=!1){return U||this._segment.rifts.sendRiftRunEncounterOffered(k,B.currentRiftTier),k.map(((k,B)=>this.getAllOpponentsData(k,B)))}getAllOpponentsData(k,B){this._teamLoadedFlags=[!1,!1,!1];const U=2===B,j={petsToLoad:k.petIds.length,teamIndex:B};return{[F.CardSelectedCallback]:()=>(0,G.sH)(this,void 0,void 0,(function*(){var F;if(!U||this._player.hasMembership()){vt.T.chosenOpponentTeamIndex=B,vt.T.chosenModifier=k.nerfModifier;const U=null===(F=this._prefabRoot.children[0].children[B].findComponentInChildren(it.x))||void 0===F?void 0:F.GameObject;U&&ft.Q.animateModifierIconToGrid(U,this._currentRiftProgress.round),this._stateMachine.goToState(mt.t).catch($.RQr.createHandler("Failed to go to TeamSelectionState"))}else yield this.openMembershipPrompt()})),[F.IsMemberOption]:U,[F.IsMemberOptionLocked]:U&&!this._player.hasMembership(),[F.ModifierIcon]:q.q[`Effect_${k.nerfModifier.icon}_small`],[F.ModifierName]:k.nerfModifier.caption,[F.ModifierDescription]:k.nerfModifier.description,[F.ModifierGoldBonus]:k.nerfModifier.goldReward,[F.OpponentTeamData]:k.petIds.map((k=>this.getOpponentDataFromPetID(k,j)))}}getOpponentDataFromPetID(k,B){var U,G;const W=Q.q.instance.prodigy.gameContainer.get("196-d3a5").getRiftsPortalConfig(),q=X.t.getItem("pet",k),K=rt.P8.getElementType(q),z=$.wa5.getActiveScene().container.get(j.BattleConstants).getElementalWeakness(K);return{[F.IsRarePet]:null!==(U=null==W?void 0:W.options.rarePetIds.includes(k))&&void 0!==U&&U,[F.PetId]:k,[F.PetName]:null===(G=null==q?void 0:q.data)||void 0===G?void 0:G.name,[F.WeaknessIcon]:[V._.Ui_battle_revamp_json,`icon-mini-element-${z}`],[F.PetScale]:[-1,1],[F.PetWidthLimit]:180,[F.PetHeightLimit]:120,[F.OnPetLoaded]:k=>{var U;null===(U=k.getSpine().pixiSpine)||void 0===U||U.hackTextureBySlotName("shadow",H.Texture.EMPTY);const F=k.getRootContainer().getBounds(),G=k.GameObject.transform.worldPosition.y-F.bottom;k.GameObject.transform.setPosition(0,G),0==--B.petsToLoad&&this.onOpponentCardsSpawned(B.teamIndex)}}}openMembershipPrompt(){return(0,G.sH)(this,void 0,void 0,(function*(){const k={round:this._currentRiftProgress.round,nerf_modifier:this._currentRiftProgress.nextOpponentTeamOptions[2].nerfModifier,opponent_team_pet_ids:this._currentRiftProgress.nextOpponentTeamOptions[2].petIds},B=st.P.shouldUseUnifiedConversionFlow(dt.o.FunnelRiftRunMemberLockedOpponentOption)?nt.R.UnifiedConversionFlow:nt.R.DynamicMemberPrompt;return Q.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:"Rift-Run-Member-Locked-Opponent-Option",category:"Rifts",contentId:JSON.stringify(k),adType:B,adVersion:st.P.getAdVersion(dt.o.FunnelRiftRunMemberLockedOpponentOption)}),new Promise((B=>{Q.q.instance.prodigy.open.membershipInfo(B,{conversionFunnelName:dt.o.FunnelRiftRunMemberLockedOpponentOption,conversionFunnelMetadata:JSON.stringify(k)})}))}))}rerollOpponents(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U;const G=null!==(B=null===(k=this._currentRiftProgress)||void 0===k?void 0:k.numOpponentRerolls)&&void 0!==B?B:0,j={currency:27,value:lt.Q.getOpponentsRerollCost(G)};if(!this._paymentManager.canAfford(j)){const k=JSON.stringify(null===(U=this._currentRiftProgress)||void 0===U?void 0:U.nextOpponentTeamOptions);return void Q.q.instance.game.state.get(Z.G.Rifts).handleNotEnoughCurrency(j,k)}$.wa5.getActiveScene().container.get(F.InputBlock).GameObject.active=!0;const H=this._segment.item.beginSecureItemTransaction();this._riftsNetworkHandler.rerollRiftOpponents().then((()=>{this.showOpponentCardAnimation(!1);const k=Object.assign(Object.assign({},this._segment.rifts.getRiftTransactionData()),{sink_type:J.Aj.RIFT_ENCOUNTER_REROLL_TYPE,sink_id:ht.$.generateUID()});this._segment.rifts.sendRiftRunEncounterRerolled(this._currentRiftProgress.nextOpponentTeamOptions,this._currentRiftProgress.currentRiftTier,j.value,k.transaction_id,k.sink_id),H.flush(k)})).catch($.RQr.createHandler("Error rerolling rift opponents"))}))}showOpponentCardAnimation(k){const B=this._prefabRoot.findComponentsInChildren(pt.L);null==B||B.forEach(((U,G)=>{const j=k?G===B.length-1:0===G,H=k?150*G:150*(B.length-(G+1)),V=j?()=>{var B;if(k){if(!vt.T.sawBuffPopup&&1===(null===(B=this._currentRiftProgress)||void 0===B?void 0:B.round)){const k=Q.q.instance.game.state.get(Z.G.Rifts);vt.T.sawBuffPopup=!0,k.showBuffPopup()}$.wa5.getActiveScene().container.get(F.InputBlock).GameObject.active=!1}else this.refreshOpponents()}:void 0;k?U.enter(H,V):U.exit(H,V)}))}refreshOpponents(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;yield this.updateCachedRiftRunProgress();const U=null!==(k=this._currentRiftProgress.numOpponentRerolls)&&void 0!==k?k:0,G=lt.Q.canRerollOpponents(U),j=lt.Q.getOpponentsRerollCost(U),$=Q.q.instance.prodigy.gameContainer.get("5c7-e02d");this._prefabRoot.findComponentInChildren(ct.h).destroySpawnedPrefabs(),ot.d.updateInjectedValues(this._prefabRoot,{[at.bL.OpponentsRerollCost]:j,[at.bL.CanRerollOpponents]:G,[at.bL.ShowRerollMagicoinCost]:!$.isHardCurrencyMemberLocked(j),[at.bL.ShowRerollMemberIcon]:$.isHardCurrencyMemberLocked(j),[F.AllOpponentsData]:this.getAllOpponentTeamsData(null!==(B=this._currentRiftProgress.nextOpponentTeamOptions)&&void 0!==B?B:[],this._currentRiftProgress,!0)})}))}exit(){const k=Object.create(null,{exit:{get:()=>super.exit}});return(0,G.sH)(this,void 0,void 0,(function*(){Q.q.instance.game.state.get(Z.G.Rifts).closeNotEnoughCurrencyTooltip(),yield k.exit.call(this)}))}}(0,G.Cg)([(0,et.b)("743-fd51"),(0,G.Sn)("design:type",tt.E)],yt.prototype,"_paymentManager",void 0)},72955:(k,B,U)=>{"use strict";U.d(B,{I:()=>vt});var F,G,j=U(8674),$=U(62459),H=U(95891),V=U.n(H),W=U(54300),q=U(99625),K=U(58776),z=U(24652),Y=U(42448),Q=U(90633),X=U(38170),Z=U(35120),J=U(34829),tt=U(77938),et=U(73797),it=U(74958),st=U(53661),nt=U(77713),at=U(10711),rt=U(80060),ot=U(30226),ht=U(97447),ct=U(68836),dt=U(37050),lt=U(43503),ut=U(68387),ft=U(24409),bt=U(90500),pt=U(11673);!function(k){k.RiftRunTiersData="RIFT_RUN_TIERS_DATA",k.FocusedCardIndex="FOCUSED_CARD_INDEX",k.FirstTimeMaxRiftCompleted="FIRST_TIME_MAX_RIFT_COMPLETED",k.MaxRiftPopupOnClick="MAX_RIFT_POPUP_ON_CLICK",k.MaxRiftCardTeaserAlpha="MAX_RIFT_CARD_TEASER_ALPHA",k.RiftHeading="RIFT_HEADING",k.RiftSubHeading="RIFT_SUB_HEADING",k.RewardHeading="REWARD_HEADING",k.EnterRiftButtonText="ENTER_RIFT_BUTTON_TEXT",k.OnEnterRift="ON_ENTER_RIFT",k.LockRiftButton="LOCK_RIFT_BUTTON",k.RarePetsData="RARE_PETS_DATA",k.RiftRunRewardsData="RIFT_RUN_REWARDS_DATA",k.RiftKeyEntryCost="RIFT_KEY_ENTRY_COST",k.RiftKeyIcon="RIFT_KEY_ICON",k.RiftKeyIconSmall="RIFT_KEY_ICON_SMALL",k.MagicoinEntryCost="MAGICOIN_ENTRY_COST",k.ShowRiftKeyOnly="SHOW_RIFT_KEY_ONLY",k.ShowMagicoinOnly="SHOW_MAGICOIN_ONLY",k.ShowRiftKeyAndMagicoin="SHOW_RIFT_KEY_AND_MAGICOIN",k.ShowRiftSubHeading="SHOW_RIFT_SUB_HEADING",k.TierType="TIER_TYPE",k.BossKeyPoseData="BOSS_KEY_POSE_DATA",k.BossBackgroundImageGuid="BOSS_BACKGROUND_IMAGE_GUID",k.RiftTierLocked="RIFT_TIER_LOCKED",k.PreviousTierCompleteText="PREVIOUS_TIER_COMPLETE_TEXT",k.PreviousTierComplete="PREVIOUS_TIER_COMPLETE",k.UnlockConditionMet="UNLOCK_CONDITION_MET",k.UnlockConditionText="UNLOCK_CONDITION_TEXT",k.UnlockConditionTextSize="UNLOCK_CONDITION_TEXT_SIZE",k.InputBlocker="INPUT_BLOCKER",k.MaxRiftTierPopup="MAX_RIFT_TIER_POPUP"}(F||(F={})),function(k){k.RiftsHeaderTitleRiftSelection="RIFTS_HEADER_TITLE_RIFT_SELECTION",k.RiftsSelectionHeading="RIFTS_SELECTION_HEADING",k.RiftsSelectionRewardHeading="RIFTS_SELECTION_REWARD_HEADING",k.RiftsSelectionFirstTimeRewardHeading="RIFTS_SELECTION_FIRST_TIME_REWARD_HEADING",k.RiftsSelectionRewardsHeading="RIFTS_SELECTION_REWARDS_HEADING",k.RiftsSelectionEnterButton="RIFTS_SELECTION_ENTER_BUTTON",k.RiftsPreviousTierCompleteUnlockText="RIFTS_PREVIOUS_TIER_COMPLETE_UNLOCK_TEXT",k.RiftsKeystonesUnlockText="RIFTS_KEYSTONES_UNLOCK_TEXT",k.RiftsPuppetMasterDefeatedUnlockText="RIFTS_PUPPET_MASTER_DEFEATED_UNLOCK_TEXT",k.RiftsLevelLockUnlockText="RIFTS_LEVEL_LOCK_UNLOCK_TEXT",k.RiftsCurrentTierDragonsDefeatedUnlockText="RIFTS_CURRENT_TIER_DRAGON_DEFEATED_UNLOCK_TEXT",k.RiftsOwnPetsUnlockText="RIFTS_OWN_PETS_UNLOCK_TEXT"}(G||(G={}));class vt extends pt.O{enter(){return(0,j.sH)(this,arguments,void 0,(function*(k={didRiftBattle:!1}){var B,U,F,G,j;const H=Z.q.instance.prodigy.gameContainer;yield this.createLoadingOverlay();const V=H.get("8f8-d5bc"),W=H.get("196-d3a5"),q=W.getRiftsPortalConfig();if(!W.selectedPortalId||!q)return $.VyI.log("RiftsSelectionMenuState: No selected portal ID or portal config found",$.$bb.Error),void Z.q.instance.prodigy.world.it(ht.j.MAP_KEY);const K=H.get("84d-05d4"),z=H.get("9ea-3f44");let X,J,tt="";try{yield this._riftsNetworkHandler.updateSelectedPortal(W.selectedPortalId);const[k,H,Q,et]=yield Promise.all([W.fetchRiftsTierData(),this._riftsNetworkHandler.attemptSecureUnlockNextRiftTier(W.selectedPortalId),q.storeEnabled?K.getDynamicStoreUIData({storeKey:Y.d[W.selectedPortalId]}):void 0,q.storeEnabled?z.getStoreConfigurationEntity():void 0]);if(!k)return $.RQr.logError(void 0,"RiftSelectionMenuState: Error fetching rifts data"),this.destroyLoadingOverlay(),void Z.q.instance.prodigy.world.it(ht.j.MAP_KEY);this._riftsTierData=k,this._firstTimeRewardsData=yield V.getFirstTimeRewardsData(),(null==Q?void 0:Q.isSuccess())&&(X=Q.get(),J=null===(U=null===(B=null==et?void 0:et.storeConfigEntity)||void 0===B?void 0:B[null==X?void 0:X.storeKey])||void 0===U?void 0:U.nameLocalizationKey,tt=null!==(j=null===(G=null===(F=null==et?void 0:et.storeConfigEntity)||void 0===F?void 0:F[null==X?void 0:X.storeKey])||void 0===G?void 0:G.label)&&void 0!==j?j:"")}catch(e){return $.RQr.logError(e,"RiftSelectionMenuState: Error fetching rifts data"),this.destroyLoadingOverlay(),void Z.q.instance.prodigy.world.it(ht.j.MAP_KEY)}it.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(it.fk.RiftsOpenRiftSelectionMenu,Q.B.BREADCRUMB_RIFTS_OPENED_RIFT_SELECTION_MENU_FIRST_TIME),this._riftsEntityPortalEntry=this._riftsSyncedDataStore.getRiftsEntityPortalEntryData(),W.riftsConfig&&W.selectedPortalId&&(this._riftsPortalConfig=W.riftsConfig[W.selectedPortalId]),yield this.setUpMenu({enterParams:k,riftsDataProvider:W,riftsPortalConfig:q,dynamicStoreUiData:X,dynamicStoreNameLocalizationKey:J,dynamicStoreBackupName:tt})}))}setUpMenu(k){const B=Object.create(null,{enter:{get:()=>super.enter}});return(0,j.sH)(this,void 0,void 0,(function*(){var U,j,H,V,K,Q,tt;const rt=Z.q.instance.prodigy.gameContainer;k.enterParams.didRiftBattle||this._segment.rifts.sendRiftsSelectionMenuOpenedEvent();(yield this.attemptUnsecureUnlockNextRiftTier())&&(this._riftsEntityPortalEntry=this._riftsSyncedDataStore.getRiftsEntityPortalEntryData()),this._hardCurrencyDataProvider=rt.get("5c7-e02d");const ot=this.getRiftsKeyId(),ht=null!==(j=null===(U=this._secureInventory.get({type:"riftRunKey",id:ot}))||void 0===U?void 0:U.quantity)&&void 0!==j?j:0,ct=rt.get("5c7-e02d").getBalance(27),ut=dt.Q.getOpponentsRerollCost((null===(H=this._riftsSyncedDataStore.cache.currentRiftRunProgress)||void 0===H?void 0:H.type)===z.cn.Normal&&null!==(K=null===(V=this._riftsSyncedDataStore.cache.currentRiftRunProgress)||void 0===V?void 0:V.numOpponentRerolls)&&void 0!==K?K:0),bt=this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(ut);let pt=Y.X5.Default;this._riftsPortalConfig&&(pt=null!==(tt=null===(Q=this._riftsPortalConfig)||void 0===Q?void 0:Q.menuTheme)&&void 0!==tt?tt:Y.X5.Default),this._prefabHeaderInjectionValues={[st.bL.HeaderTitle]:this._localizer.getText(G.RiftsHeaderTitleRiftSelection),[st.bL.OnClose]:()=>{Z.q.instance.game.canvas.style.cursor="",this._stateMachine.goToState(ft.y,k.enterParams).catch($.RQr.createHandler("Error exiting dragon rift menu"))},[st.bL.OpponentsRerollCost]:ut,[st.bL.RiftCurrencyId]:Y.Ty[k.riftsDataProvider.selectedPortalId],[st.bL.RiftKeyAmount]:this.getRiftKeyComparisonText(ht),[st.bL.RiftKeyIcon]:W.p[`riftRunKey-${ot}`],[st.bL.ShowHeaderText]:!1,[st.bL.ShowMagicoin]:!bt,[st.bL.ShowMagicoinText]:!0,[st.bL.ShowRiftKeys]:!0,[st.bL.ShowRerollMagicoinCost]:!bt,[st.bL.ShowRerollMemberIcon]:bt,[st.bL.ShowTooltip]:!1,[st.bL.StoreEnabled]:k.riftsPortalConfig.storeEnabled,[st.bL.StoreKey]:Y.d[k.riftsDataProvider.selectedPortalId],[st.bL.MenuInterfaceName]:it.zE[k.riftsDataProvider.selectedPortalId],[st.bL.BackgroundHex]:Y.a6[pt],[st.bL.GradientHex]:Y.aK[pt],[st.bL.DiamondsHex]:Y.h5[pt],[st.bL.DiamondsAlpha]:Y.VS[pt],[st.n7.TimeRemainingMs]:this._riftsPortalConfig.endDate?X.r.toDateUtcMs(this._riftsPortalConfig.endDate)-X.r.toDateUtcMs(Date.now()):0,[st.n7.ShowTimeRemaining]:$.Aq$.isDefined(this._riftsPortalConfig.endDate)},this._prefabGUID=q.l.RiftsSelectionMenu,this._prefabInjectionValues={[F.RiftRunTiersData]:this.getRiftRunCardsData(ht,ct),[F.FocusedCardIndex]:Object.keys(this._riftsTierData).length-this._riftsEntityPortalEntry.metaProgress.maxRiftTier-1},yield B.enter.call(this),this._inputBlocker=$.wa5.getActiveScene().container.get(F.InputBlocker),this._inputBlocker.GameObject.active=!1;const vt=lt.L.getRiftsModalLastSeenTime(k.riftsDataProvider.selectedPortalId,Y.Qm.TemporaryMemberModal);if(k.riftsPortalConfig.options.useTemporaryMemberModal&&(!vt||Date.now()-vt>=J.A.DAY_IN_MS))Z.q.instance.prodigy.open.openMemberLockedGoldRiftModal(),lt.L.setRiftsModalLastSeenTime(k.riftsDataProvider.selectedPortalId,Y.Qm.TemporaryMemberModal);else{const B=(0,at.KQ)(Y.d[k.riftsDataProvider.selectedPortalId]);k.riftsPortalConfig.storeEnabled&&k.dynamicStoreUiData&&(!B||Date.now()-B>=J.A.DAY_IN_MS)&&(this.openDynamicStoreModal(k),(0,at._m)(Y.d[k.riftsDataProvider.selectedPortalId]))}const gt=this._prefabRoot.findComponentInChildren(nt.h);gt?gt.onAllPrefabsSpawned.addOnce((()=>this.destroyLoadingOverlay())):this.destroyLoadingOverlay(),Z.q.instance.game.broadcaster.addAppListener(et.Lk.HardCurrencyPurchased,this.updateRiftRunCardsButtons,this)}))}exit(){const k=Object.create(null,{exit:{get:()=>super.exit}});return(0,j.sH)(this,void 0,void 0,(function*(){Z.q.instance.game.broadcaster.removeAppListener(et.Lk.HardCurrencyPurchased,this.updateRiftRunCardsButtons,this),yield k.exit.call(this)}))}getRiftRunCardsData(k=0,B=0){var U,H,V,q,K,Y,Q;const X=Z.q.instance.prodigy.gameContainer.get("196-d3a5"),J=this._riftsEntityPortalEntry.metaProgress.maxRiftTier,et=[];for(let Z=Object.keys(this._riftsTierData).length;Z>0;Z--){const it=Z>J,nt=this._riftsTierData[Z],at=Z-1>0?this._riftsTierData[Z-1]:void 0,rt=null==nt?void 0:nt.firstTimeReward;let ht;const ct=!!rt&&(!$.Aq$.isDefined(this._firstTimeRewardsData[Z])||!this._firstTimeRewardsData[Z]),ut=[];ct&&rt&&(ht=null===(U=tt.t.getItem(rt.type,rt.id))||void 0===U?void 0:U.data,ut.push({type:rt.type,id:rt.id,hasItem:null!==(H=this._firstTimeRewardsData[Z])&&void 0!==H&&H}));const ft=X.getRiftRunEntryCost(Z),bt=Math.min(k,ft),pt=ft-bt,gt=X.getRiftKeyMagicoinCost()*pt,mt=this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(gt),yt=dt.Q.getRestrictionBadgeData(null==nt?void 0:nt.restriction);let _t;nt.type===z.cn.Boss&&(_t=lt.L.getBossDisplayDataFromBossType(nt.bossType));const Et={[F.RiftHeading]:(null==nt?void 0:nt.type)===z.cn.Boss?null==_t?void 0:_t.name:this._localizer.getText(G.RiftsSelectionHeading,Z),[F.RiftSubHeading]:this._localizer.getText(G.RiftsSelectionHeading,Z),[F.ShowRiftSubHeading]:nt.type===z.cn.Boss,[F.RewardHeading]:this._localizer.getText(ct?G.RiftsSelectionFirstTimeRewardHeading:G.RiftsSelectionRewardsHeading,ct&&rt&&ht?ot.J.getItemName(rt):""),[F.OnEnterRift]:()=>(0,j.sH)(this,void 0,void 0,(function*(){nt?yield this.enterRiftTier(Z,nt,bt,gt):$.VyI.log(`RiftSelectionMenuState: No rift tier data found for tier ${Z}`,$.$bb.Warning)})),[F.LockRiftButton]:this.shouldLockEnterButtonForTier(Z,B,k),[F.RarePetsData]:[null!==(V=this._riftsPortalConfig.options.rarePetIds.slice(0,Z).map((k=>({type:"pet",id:k}))).reverse())&&void 0!==V?V:[],it,vt.MAX_RARE_PETS],[F.RiftRunRewardsData]:[ct?ut:this.getFeaturedRiftRunTierRewards(nt,Z),it,vt.MAX_RIFT_RUN_REWARDS],[F.RiftKeyIcon]:W.p[`riftRunKey-${this.getRiftsKeyId()}`],[F.RiftKeyIconSmall]:`icon-rift-key-small-${this.getRiftsKeyId()}`,[F.RiftKeyEntryCost]:mt?ft:bt,[F.MagicoinEntryCost]:gt,[F.ShowRiftKeyOnly]:Boolean(bt>0&><=0||mt),[F.ShowMagicoinOnly]:Boolean(bt<=0&>>0&&!mt),[F.ShowRiftKeyAndMagicoin]:Boolean(bt>0&>>0&&!mt),[F.TierType]:nt.type,[F.BossKeyPoseData]:[null==_t?void 0:_t.keyPoseAtlasGuid,null==_t?void 0:_t.keyPoseFrame],[F.BossBackgroundImageGuid]:null==_t?void 0:_t.tierBackgroundImageGuid,[st.Fm.ShowRestrictionBadge]:yt.showRestrictionBadge,[st.Fm.RestrictionBadgeTest]:yt.restrictionBadgeText},wt={};if(it){wt[F.RiftTierLocked]=!0;let k=0;const B=null!==(q=null==at?void 0:at.numTierCompletionsToUnlockNextTier)&&void 0!==q?q:1;if(Z===J+1&&(k=null!==(K=this._riftsEntityPortalEntry.metaProgress.riftTierUnlockData.maxTierCompletions)&&void 0!==K?K:0,k>B&&(k=B)),Z>1&&(wt[F.PreviousTierCompleteText]=this._localizer.getText(G.RiftsPreviousTierCompleteUnlockText,Z-1,k,null!==(Y=null==at?void 0:at.numTierCompletionsToUnlockNextTier)&&void 0!==Y?Y:1)),k>=B&&(wt[F.PreviousTierComplete]=!0),null===(Q=null==nt?void 0:nt.unlockCondition)||void 0===Q?void 0:Q.condition){const k=Z-1;wt[F.UnlockConditionText]=this.getUnlockConditionText(nt.unlockCondition,k),this._riftsEntityPortalEntry.metaProgress.riftTierUnlockData.hasMetUnlockCondition&&(wt[F.UnlockConditionMet]=!0)}}et.push(Object.assign(Object.assign({},Et),wt))}return et}updateRiftRunCardsButtons(){var k,B,U;const G=this._prefabRoot.findComponentInChildren(nt.h);if(!G)return;const j=Z.q.instance.prodigy.gameContainer.get("196-d3a5"),$=this.getRiftsKeyId(),H=null!==(B=null===(k=this._secureInventory.get({type:"riftRunKey",id:$}))||void 0===k?void 0:k.quantity)&&void 0!==B?B:0,V=this._hardCurrencyDataProvider.getBalance(27),W=this._riftsEntityPortalEntry.metaProgress.maxRiftTier;for(let q=Math.min(W>0?W+1:W+2,null!==(U=j.getMaxRiftTier())&&void 0!==U?U:-1);q>0;q--){const k=this.shouldLockEnterButtonForTier(q,V,H),B={[F.LockRiftButton]:k};rt.d.updateInjectedValues(G.GameObject.children[G.GameObject.children.length-q],B)}}shouldLockEnterButtonForTier(k,B,U){const F=Z.q.instance.prodigy.gameContainer.get("196-d3a5"),G=F.getRiftRunEntryCost(k),j=Math.min(U,G),$=G-j,H=F.getRiftKeyMagicoinCost()*$;return this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(H)?j{var B,U;let F=0;if("currency"!==k.type&&"gold"!==k.type){const G=tt.t.getItem(k.type,k.id);G&&(F=null!==(U=null===(B=null==G?void 0:G.data)||void 0===B?void 0:B.rarity)&&void 0!==U?U:0)}return{id:k.id,type:k.type,rarity:F}})),(k=>`${k.id}_${k.type}_${k.rarity}`));return V().orderBy(F,[k=>"currency"===k.type||"gold"===k.type,"rarity"],["asc","desc"]).slice(0,Math.min(vt.MAX_RIFT_RUN_REWARDS,F.length)).map((k=>({type:k.type,id:k.id,hasItem:this._player.getItemCount(k.type,k.id)>0&&!Y._u.includes(k.type)})))}getUnlockConditionText(k,B){switch(k.condition){case z.Y1.KeystonesUnlocked:return this._localizer.getText(G.RiftsKeystonesUnlockText,k.value,k.value>1?"s":"");case z.Y1.PuppetMasterDefeated:return this._localizer.getText(G.RiftsPuppetMasterDefeatedUnlockText);case z.Y1.LevelLock:return this._localizer.getText(G.RiftsLevelLockUnlockText,k.value);case z.Y1.OwnPetsOfElement:return this._localizer.getText(G.RiftsOwnPetsUnlockText,k.value,k.data.element);case z.Y1.OwnPetsOfRarity:return this._localizer.getText(G.RiftsOwnPetsUnlockText,k.value,ot.J.convertRarityToText(k.data.rarity).toLowerCase());default:return""}}openDynamicStoreModal(k){const B=Z.q.instance.prodigy.gameContainer.get($.$Bt.LocalizationService),U=k.dynamicStoreUiData.store,F=k.dynamicStoreUiData.offerReadById,G=[...U.sections.reduce(((k,B)=>(k.push(...B.offers),k)),[])].filter((k=>k.progress.status===K.t.IN_PROGRESS)),j=k.dynamicStoreNameLocalizationKey&&B?B.getText(k.dynamicStoreNameLocalizationKey):k.dynamicStoreBackupName,H=k.riftsDataProvider.selectedPortalId;Z.q.instance.prodigy.open.dynamicStoreModal({[st.YM.BodyText]:B.getText(Y.Bs.DynamicStoreModalBodyText,j),[st.YM.HeaderText]:j,[st.YM.OfferData]:G,[st.YM.OfferReadById]:F,[st.YM.ShowTimer]:H!==Y.ni.Portal1,[st.YM.StoreKey]:Y.d[H],[st.n7.TimeRemainingMs]:k.riftsPortalConfig.endDate?new Date(k.riftsPortalConfig.endDate).getTime()-Date.now():void 0})}attemptUnsecureUnlockNextRiftTier(){return(0,j.sH)(this,void 0,void 0,(function*(){var k,B,U;let F=!1;const G=Z.q.instance.prodigy.gameContainer.get("196-d3a5");if(!Z.q.instance.prodigy.gameContainer.get("9ac-9677").cache||this._riftsEntityPortalEntry.metaProgress.maxRiftTier>=(null!==(k=G.getMaxRiftTier())&&void 0!==k?k:-1)||this._riftsEntityPortalEntry.metaProgress.riftTierUnlockData.hasMetUnlockCondition)return F;const j=this._riftsTierData[this._riftsEntityPortalEntry.metaProgress.maxRiftTier+1];if(!(null===(B=null==j?void 0:j.unlockCondition)||void 0===B?void 0:B.condition))return F;const $=Z.q.instance.prodigy.gameContainer.get("8f8-d5bc");switch(null===(U=null==j?void 0:j.unlockCondition)||void 0===U?void 0:U.condition){case z.Y1.KeystonesUnlocked:this._player.getNumKeystones()>=j.unlockCondition.value&&(yield $.updateTierUnlockProgress()),F=!0;break;case z.Y1.LevelLock:this._player.getLevel()>=j.unlockCondition.value&&(yield $.updateTierUnlockProgress()),F=!0}return F}))}enterRiftTier(k,B,U,G){return(0,j.sH)(this,void 0,void 0,(function*(){const j=$.wa5.getActiveScene().container.get(F.InputBlocker);(null==j?void 0:j.GameObject)&&(j.GameObject.active=!0);try{switch(B.type){case z.cn.Normal:ct.T.riftTier=k,yield this._riftsNetworkHandler.startRiftRun(k,{[this.getRiftsKeyId()]:U},G>0),yield this._stateMachine.goToState(bt.R);break;case z.cn.Boss:ct.T.riftTier=k,yield this._riftsNetworkHandler.startBossRift(k,B.bossType),yield this._stateMachine.goToState(ut.O);break;default:$.VyI.log(`RiftSelectionMenuState: Unknown rift tier type for rift ${k}`,$.$bb.Error)}}catch(e){$.RQr.logError(e,`RiftSelectionMenuState: Error entering rift ${k}`)}finally{(null==j?void 0:j.GameObject)&&(j.GameObject.active=!1)}}))}}vt.MAX_RARE_PETS=6,vt.MAX_RIFT_RUN_REWARDS=3},11673:(k,B,U)=>{"use strict";U.d(B,{O:()=>et});var F=U(8674),G=U(62459),j=U(99625),$=U(42448),H=U(35120),V=U(96535),W=U(70005),q=U(23082),K=U(13956),z=U(85515),Y=U(56617),Q=U(53661),X=U(38920),Z=U(80060),J=U(80105),tt=U(87427);class et extends tt.I{enter(k){const B=Object.create(null,{enter:{get:()=>super.enter}});return(0,F.sH)(this,void 0,void 0,(function*(){if(this._preloadAssets&&(yield H.q.instance.prodigy.load.assetsAsPromise(this._preloadAssets)),this._prefabHeaderInjectionValues){let k=this._prefabHeaderInjectionValues;k=Object.assign({[Q.n7.ShowTimeRemaining]:!1},this._prefabHeaderInjectionValues),yield H.q.instance.game.state.get(q.G.Rifts).injectToHeaderPrefab(k)}this._prefabGUID&&(this._prefabRoot=yield Z.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGUID,this._prefabInjectionValues),G.wa5.getActiveScene().addGameObject(this._prefabRoot.parent)),yield B.enter.call(this,k)}))}createLoadingOverlay(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=H.q.instance.prodigy.gameContainer.get("d0e-64fd");this._loadingOverlay=yield k.loadWithDependenciesFromGUID(j.l.LoadingOverlay),this._loadingOverlay.addComponent(W.h),this._loadingOverlay.layer=z.E.Result;const B=this._loadingOverlay.findComponentInChildren(Y.i);null==B||B.showLoadingUI()}))}destroyLoadingOverlay(){if(!this._loadingOverlay)return;const k=this._loadingOverlay.findComponentInChildren(Y.i);null==k||k.forceHideLoadingUI(),this._loadingOverlay.destroyDeferred(),this._loadingOverlay=void 0}getRiftKeyComparisonText(k){var B;const U=null===(B=H.q.instance.prodigy.gameContainer.get("196-d3a5").getRiftsPortalConfig())||void 0===B?void 0:B.options.maxRiftRunKeys;return U?(0,X.RL)(k,U):k.toString()}getRiftsKeyId(){var k;const B=H.q.instance.prodigy.gameContainer.get("196-d3a5");return B.selectedPortalId&&null!==(k=$.fW[B.selectedPortalId])&&void 0!==k?k:$.BN.PortalOneKey}getRestriction(){var k,B;const U=H.q.instance.prodigy.gameContainer.get("196-d3a5").riftsTierTotalData;if(!U)return;let F;const G=null===(k=this._riftsSyncedDataStore.cache.currentRiftRunProgress)||void 0===k?void 0:k.currentRiftTier;return G&&(F=null===(B=U[G])||void 0===B?void 0:B.restriction),F}exit(){const k=Object.create(null,{exit:{get:()=>super.exit}});return(0,F.sH)(this,void 0,void 0,(function*(){var B;null===(B=this._prefabRoot)||void 0===B||B.destroy(),yield k.exit.call(this)}))}}(0,F.Cg)([(0,K.b)("306-5359"),(0,F.Sn)("design:type",V.W)],et.prototype,"_player",void 0),(0,F.Cg)([(0,K.b)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],et.prototype,"_localizer",void 0),(0,F.Cg)([(0,K.b)("61f-37d6"),(0,F.Sn)("design:type",J.U)],et.prototype,"_secureInventory",void 0)},87427:(k,B,U)=>{"use strict";U.d(B,{I:()=>V});var F=U(8674),G=U(13956),j=U(63546),$=U(38560),H=U(14117);class V extends j.${}(0,F.Cg)([(0,G.b)("8f8-d5bc"),(0,F.Sn)("design:type",$.B)],V.prototype,"_riftsNetworkHandler",void 0),(0,F.Cg)([(0,G.b)("9ac-9677"),(0,F.Sn)("design:type",H.M)],V.prototype,"_riftsSyncedDataStore",void 0)},82781:(k,B,U)=>{"use strict";U.d(B,{Q:()=>rt});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(30334),V=U(28628),W=U(24652),q=U(42448),K=U(90633),z=U(35120),Y=U(96535),Q=U(23082),X=U(74958),Z=U(13956),J=U(80494),tt=U(68836),et=U(43503),it=U(84060),st=U(53232),nt=U(90500),at=U(87427);class rt extends at.I{enter(){const k=Object.create(null,{enter:{get:()=>super.enter}});return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,j,K,Y;yield k.enter.call(this);const X=this._riftsSyncedDataStore.cache.currentRiftRunProgress;if(!X||X.type!==W.cn.Normal)return void(yield et.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine));const Z=z.q.instance.prodigy.gameContainer.get("196-d3a5"),J=Z.getCurrentRiftsId(),it=yield z.q.instance.prodigy.gameContainer.get("a25-68f4").getBattleStartQuestData(V.gu.NormalRiftRun,J),st={battleType:V.gu.NormalRiftRun,battleSubType:J,difficulty:H.z,chosenOpponentTeamIndex:tt.T.chosenOpponentTeamIndex,chosenHomeTeamPetUids:tt.T.chosenHomeTeamPetUids,activeQuestIDs:it.questIDs,questEventsToSend:it.questEvents},nt=z.q.instance.game.state.states.get(Q.G.SecureBattleRevamp);if(!(yield et.L.canResumeRiftRun()))return yield Promise.all([nt.clearBattle(st),et.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine)]),void(this._player.battleResumeData=void 0);const at=null==X?void 0:X.currentRiftTier;let ot;Z.riftsTierTotalData&&at&&(ot=null===(B=Z.riftsTierTotalData[at])||void 0===B?void 0:B.battleBackgrounds),ot||(ot=rt.DEFAULT_RIFT_RUN_BATTLE_BACKGROUNDS);const ht=null!==(U=null==X?void 0:X.chosenNerfModifiers)&&void 0!==U?U:[],ct=!G.Aq$.isDefined(X.chosenOpponentTeamIndex)||!tt.T.canResumeBattle,dt=null!==(F=(Y=this._player.data).battleResumeDataClient)&&void 0!==F?F:Y.battleResumeDataClient={};dt.currentBackground||(dt.currentBackground=$().sample(ot),this._player.forceSaveCharacter());const lt={backgroundID:dt.currentBackground,onVictory:this.victoryCallback.bind(this),onDefeat:this.defeatCallback.bind(this),onEscape:this.defeatCallback.bind(this),guaranteedDrops:[{type:"gold",N:null!==(K=null===(j=tt.T.chosenModifier)||void 0===j?void 0:j.goldReward)&&void 0!==K?K:ht[ht.length-1].goldReward}]};X.round===q.vP&&(tt.T.isFinalBattle=!0),this._segment.rifts.cachedCurrentNormalRiftProgress=$().cloneDeep(X),tt.T.chosenModifier&&this._segment.rifts.cachedCurrentNormalRiftProgress.chosenNerfModifiers.push(tt.T.chosenModifier),tt.T.chosenHomeTeamPetUids.length>0&&this._segment.rifts.cachedCurrentNormalRiftProgress.usedPetUids.push(...tt.T.chosenHomeTeamPetUids),this._segment.rifts.sendRiftRunRoundStartedEvent(),tt.T.chosenModifier=null,ct?nt.startBattleRequest(st,lt):nt.resumeBattleRequest(st,lt)}))}cleanUpClientData(){var k;(null===(k=this._player.data.battleResumeDataClient)||void 0===k?void 0:k.currentBackground)&&(delete this._player.data.battleResumeDataClient.currentBackground,this._player.forceSaveCharacter())}victoryCallback(){var k;const B=this._riftsSyncedDataStore.cache.currentRiftRunProgress;if(tt.T.firstBattleCompleted=!0,this.cleanUpClientData(),X.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(X.fk.RiftsCompleteFirstRiftRunRound,K.B.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_ROUND),this._segment.rifts.sendRiftRunRoundCompletedEvent("win"),B&&B.type===W.cn.Normal){const U=this._riftsSyncedDataStore.cache.currentPortalId;if(U&&this._riftsSyncedDataStore.cache[U]){const B=null!==(k=this._riftsSyncedDataStore.cache[U].metaProgress.usedPetData)&&void 0!==k?k:{};this._segment.rifts.sendPetCooldownStartedEvents(B)}this._segment.rifts.riftRunRoundUuid=B.riftRunRoundSegmentUuid,z.q.instance.game.state.start(Q.G.Rifts,void 0,nt.R)}else X.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(X.fk.RiftsCompleteRiftRunWinOrLose,K.B.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN_OR_LOSE),X.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(X.fk.RiftsCompleteRiftRunWin,K.B.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN),this._segment.rifts.sendRiftRunCompletedEvent(),z.q.instance.game.state.start(Q.G.Rifts,void 0,it.n)}defeatCallback(){this.cleanUpClientData(),tt.T.firstBattleCompleted=!0,X.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(X.fk.RiftsCompleteRiftRunWinOrLose,K.B.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN_OR_LOSE),this._segment.rifts.sendRiftRunRoundCompletedEvent("loss"),z.q.instance.game.state.start(Q.G.Rifts,void 0,st.X)}}rt.DEFAULT_RIFT_RUN_BATTLE_BACKGROUNDS=[J.t.BattleBonfireInside,J.t.BattleBonfireLava,J.t.BattleBonfireOutside,J.t.BattleForestGeneric,J.t.BattleForestOutside,J.t.BattleShipwreckInside,J.t.BattleShipwreckOutside,J.t.BattleShipwreckUnderwater,J.t.BattleShiverchillInside,J.t.BattleShiverchillOutside,J.t.BattleSkywatchInside,J.t.BattleSkywatchOutside],(0,F.Cg)([(0,Z.b)("306-5359"),(0,F.Sn)("design:type",Y.W)],rt.prototype,"_player",void 0)},53027:(k,B,U)=>{"use strict";U.d(B,{t:()=>Et});var F=U(8674),G=U(87490),j=U(62459),$=U(95891),H=U.n($),V=U(88022),W=U(99625),q=U(60035),K=U(24652),z=U(42448),Y=U(35120),Q=U(91207),X=U(77938),Z=U(51972),J=U(23082),tt=U(53661),et=U(22023),it=U(80060),st=U(44094),nt=U(47255),at=U(37050),rt=U(39785),ot=U(43503),ht=U(68836),ct=U(14117),dt=U(68387),lt=U(90500),ut=U(11673),ft=U(30334),bt=U(82351),pt=U(28628),vt=U(86498),gt=U(53232),mt=U(87427),yt=U(82781);class _t extends mt.I{enter(){const k=Object.create(null,{enter:{get:()=>super.enter}});return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,G,$;yield k.enter.call(this);const V=Y.q.instance.prodigy.gameContainer.get("196-d3a5"),W=this._riftsSyncedDataStore.cache.currentRiftRunProgress,q=V.riftsTierTotalData,z=(null==W?void 0:W.currentRiftTier)?null==q?void 0:q[null==W?void 0:W.currentRiftTier]:void 0;if(!W||W.type!==K.cn.Boss||(null==z?void 0:z.type)!==K.cn.Boss)return void(yield ot.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine));const Q=V.getCurrentRiftsId(),X=Y.q.instance.prodigy.gameContainer.get("c47-20b6").rifts,Z=yield Y.q.instance.prodigy.gameContainer.get("a25-68f4").getBattleStartQuestData(pt.gu.BossRiftRun,Q);let tt="";!j.Aq$.isDefined(null==z?void 0:z.useParallaxBackground)||z.useParallaxBackground||(tt=null!==(U=H().sample(null!==(B=z.battleBackgrounds)&&void 0!==B?B:yt.Q.DEFAULT_RIFT_RUN_BATTLE_BACKGROUNDS))&&void 0!==U?U:""),X.cachedCurrentBossRiftProgress=H().cloneDeep(W);const et={battleType:pt.gu.BossRiftRun,battleSubType:Q,difficulty:ft.z,chosenHomeTeamPetUids:null!==(F=ht.T.chosenHomeTeamPetUids)&&void 0!==F?F:[],activeQuestIDs:Z.questIDs,questEventsToSend:Z.questEvents},it={backgroundID:tt,backgroundMusicID:null!==($=_t.BOSS_BGM[null!==(G=W.bossType)&&void 0!==G?G:K.ts.AstralDragon])&&void 0!==$?$:bt.B.Bgm_battle_astral_dragon,onVictory:this.victoryCallback.bind(this),onDefeat:this.defeatCallback.bind(this),onEscape:this.defeatCallback.bind(this)};Y.q.instance.game.state.states.get(J.G.SecureBattleRevamp).startBattleRequest(et,it)}))}victoryCallback(){var k;const B=this._riftsSyncedDataStore.cache.currentPortalId;if(B&&this._riftsSyncedDataStore.cache[B]){const U=null!==(k=this._riftsSyncedDataStore.cache[B].metaProgress.usedPetData)&&void 0!==k?k:{};this._segment.rifts.sendPetCooldownStartedEvents(U)}this._segment.rifts.sendBossRiftCompletedEvent("win"),Y.q.instance.game.state.start(J.G.Rifts,void 0,vt.j)}defeatCallback(){this._segment.rifts.sendBossRiftCompletedEvent("loss"),Y.q.instance.game.state.start(J.G.Rifts,void 0,gt.X)}}_t.BOSS_BGM={[K.ts.AstralDragon]:bt.B.Bgm_battle_astral_dragon,[K.ts.FireDragon]:bt.B.Bgm_battle_astral_dragon,[K.ts.PhysicalDragon]:bt.B.Bgm_battle_physical_dragon,[K.ts.ShadowDragon]:bt.B.Bgm_battle_shadow_dragon,[K.ts.IceWyrm]:bt.B.Bgm_battle_astral_dragon,[K.ts.IceDragon]:bt.B.Bgm_battle_astral_dragon};class Et extends ut.O{constructor(){super(...arguments),this._teamPetIndices=[-1,-1],this._selectedSlotIndex=0,this._showPetSelectionDrawerSignal=new j.HN0,this._hidePetSelectionDrawerSignal=new j.HN0}enter(){const k=Object.create(null,{enter:{get:()=>super.enter}});return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;const $=this._riftsSyncedDataStore.cache.currentRiftRunProgress;if(!$)return void(yield ot.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine));this._currentRiftProgress=$;const H=j.wa5.getActiveScene().container;Y.q.instance.prodigy.gameContainer.get("196-d3a5").getRiftsPortalConfig();this._restriction=this.getRestriction(),this._restrictionBadgeData=at.Q.getRestrictionBadgeData(this._restriction),this._sortedPets=this.getSortedAndFilteredPets(this._restriction);let q=0;if(this._sortedPets.some(((k,B)=>!(k.disabledData||!this._riftsSyncedDataStore.isPetAvailableForUse(k.uniqueID))&&(this._teamPetIndices[q++]=B,q>=2))),this._prefabHeaderInjectionValues={[tt.bL.HeaderTitle]:this._localizer.getText("RIFTS_HEADER_TITLE_TEAM_SELECTION"),[tt.bL.OnClose]:()=>{rt.n.onRiftRunClose(this._stateMachine)}},this._currentRiftProgress.type===K.cn.Boss?this._prefabHeaderInjectionValues[tt.bL.OnBack]=()=>(0,F.sH)(this,void 0,void 0,(function*(){yield this._stateMachine.goToState(dt.O)})):this._prefabHeaderInjectionValues[tt.bL.OnBack]=()=>(0,F.sH)(this,void 0,void 0,(function*(){ht.T.chosenModifier=null;Y.q.instance.game.state.get(J.G.Rifts).updateModifierGrid(),yield this._stateMachine.goToState(lt.R)})),this._prefabGUID=W.l.RiftRunTeamSelection,this._prefabInjectionValues={ON_CHANGE_0:()=>{this.showPetSelectionDrawer(0)},ON_CHANGE_1:()=>{this.showPetSelectionDrawer(1)},ON_ELEMENTS:()=>(0,F.sH)(this,void 0,void 0,(function*(){yield this.showElementsPopup()})),ON_START_RIFT:()=>(0,F.sH)(this,void 0,void 0,(function*(){const k=this._teamPetIndices.map((k=>{var B;return null===(B=this._sortedPets[k])||void 0===B?void 0:B.uniqueID})).filter((k=>k));this._currentRiftProgress.type===K.cn.Boss?(ht.T.chosenHomeTeamPetUids=k,yield this._stateMachine.goToState(_t)):(ht.T.chosenHomeTeamPetUids=k,yield this._stateMachine.goToState(yt.Q))})),ON_HOME_TEAM_SPAWNED:()=>{const k=H.get("PLAYER_TRANSFORM"),B=H.get("HOME_TEAM_TRANSFORM");k.GameObject.parent=B.GameObject},PLAYER_NAME:this._player.name.getName(),PLAYER_CONTAINER_WIDTH:200,PLAYER_CONTAINER_HEIGHT:170,WEAK_TO_OFFSET:18,PEDESTAL_ASSET:[V._.Ui_rifts_json,"base-cool-grey-light"],HOME_TEAM_DATA:this._teamPetIndices.map((k=>{var B,U;if(k>=0){const F=this._sortedPets[k],G=X.t.getItem("pet",F.ID),j=et.P8.getElementType(G);return Object.assign(Object.assign({},this.getCommonPetInjectionData(j)),{IS_RARE_PET:!1,PET_ID:F.ID,PET_NAME:null!==(U=null!==(B=F.nickname)&&void 0!==B?B:F.name)&&void 0!==U?U:G.data.name})}return{IS_RARE_PET:!1,PET_NAME:"",WEAKNESS_ICON:""}}))},this._currentRiftProgress.type===K.cn.Boss&&this._currentRiftProgress.bossType){const k=this._riftsSyncedDataStore.getRiftsEntityPortalEntryData(),F=ot.L.getBossDisplayDataFromBossType(this._currentRiftProgress.bossType),$=j.wa5.getActiveScene().container.get(G.BattleConstants).getElementalWeakness(F.element),H=!j.Aq$.isDefined(null===(U=null===(B=k.metaProgress)||void 0===B?void 0:B.bossDefeats)||void 0===U?void 0:U[this._currentRiftProgress.bossType]);this._prefabInjectionValues.BOSS_KEY_POSE=[F.keyPoseAtlasGuid,F.keyPoseFrame],this._prefabInjectionValues.BOSS_NAME=st.$.toTitleCase(F.name),this._prefabInjectionValues.BOSS_WEAKNESS_ICON=[V._.Ui_battle_revamp_json,`icon-mini-element-${$}`],this._prefabInjectionValues.BOSS_IS_SILHOUETTED=H,this._prefabInjectionValues.IS_BOSS_BATTLE=!0,this._prefabInjectionValues[tt.Fm.ShowRestrictionBadge]=this._restrictionBadgeData.showRestrictionBadge,this._prefabInjectionValues[tt.Fm.RestrictionBadgeTest]=this._restrictionBadgeData.restrictionBadgeText}else if(this._currentRiftProgress.type===K.cn.Normal){const k=Y.q.instance.prodigy.gameContainer.get("196-d3a5").getRiftsPortalConfig();this._prefabInjectionValues.BOSS_IS_SILHOUETTED=!1,this._prefabInjectionValues.SHOW_INFO=!1,this._prefabInjectionValues.OPPONENT_TEAM_DATA=this._currentRiftProgress.nextOpponentTeamOptions[ht.T.chosenOpponentTeamIndex].petIds.map((B=>{var U;const F=X.t.getItem("pet",B),G=et.P8.getElementType(F);return Object.assign(Object.assign({},this.getCommonPetInjectionData(G)),{IS_RARE_PET:null!==(U=null==k?void 0:k.options.rarePetIds.includes(B))&&void 0!==U&&U,PET_ID:B,PET_NAME:F.data.name,PET_SCALE:[-1,1]})}))}yield k.enter.call(this),yield this.setupPetDrawer()}))}getSortedAndFilteredPets(k){const B=H().cloneDeep(this._player.kennel.getPrimaryPets());(this._currentRiftProgress.type===K.cn.Boss?this._currentRiftProgress.bossRiftModifiers:this._currentRiftProgress.type===K.cn.Normal?[...this._currentRiftProgress.chosenNerfModifiers,ht.T.chosenModifier]:[]).forEach((k=>{k.type===q.z.RemovePetsByElement?B.forEach((B=>{const U=X.t.getItem("pet",B.ID);et.P8.getElementType(U)===k.element&&(B.disabledData={disabledBy:k.element,disabledIcon:rt.n.getGuidForModifierIcon(k.icon)})})):k.type===q.z.RemovePetsByRarity&&B.forEach((B=>{const U=X.t.getItem("pet",B.ID);B.disabledData&&this.isEElementType(B.disabledData.disabledBy)||U.data.rarity===k.rarity&&(B.disabledData={disabledBy:k.rarity,disabledIcon:rt.n.getGuidForModifierIcon(k.icon)})}))})),k&&B.forEach((B=>{var U,F;const G=null===(U=X.t.getItem("pet",B.ID))||void 0===U?void 0:U.data;if(null!==(F=B.disabledData)&&void 0!==F?!F:G)switch(k.type){case z.CN.OnlyPetsOfElement:G.affinity!==k.data.element&&(B.disabledData={disabledBy:k.data.element,restriction:k});break;case z.CN.NoPetsOfElement:G.affinity===k.data.element&&(B.disabledData={disabledBy:k.data.element,restriction:k});break;case z.CN.OnlyPetsOfRarity:G.rarity!==k.data.rarity&&(B.disabledData={disabledBy:k.data.rarity,restriction:k});break;case z.CN.NoPetsOfRarity:G.rarity===k.data.rarity&&(B.disabledData={disabledBy:k.data.rarity,restriction:k})}}));return H().chain(B).filter("ID").orderBy([k=>j.Aq$.isDefined(k.disabledData),k=>k.mergeRank,k=>k.level],["asc","desc","desc"]).value()}setupPetDrawer(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U;this._drawerCloseOverlay=j.wa5.getActiveScene().container.get("DRAWER_CLOSE_OVERLAY");const F=Y.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("PET_DRAWER_ALREADY_USED"),G=null===(B=null===(k=Y.q.instance.prodigy.gameContainer.get("196-d3a5").getRiftsPortalConfig())||void 0===k?void 0:k.options)||void 0===B?void 0:B.petReuseData,$={START_OFFSCREEN_X:-800,TWEEN_IN_SIGNAL:this._showPetSelectionDrawerSignal,TWEEN_OUT_SIGNAL:this._hidePetSelectionDrawerSignal,ON_CLOSE:()=>{this.hidePetSelectionDrawer()},PET_DATA:this._sortedPets.reduce(((k,B,U)=>{var $,H,V,W;const q=X.t.getItem("pet",B.ID);if(!q)return j.VyI.log(`Pet with ID ${B.ID} not found in items`,j.$bb.Error),k;const K={DISABLED:!1,OVERLAY_TEXT:"",DISABLED_ICON:"",PET_ID:B.ID,PET_DATA:B,NAME:null!==(H=null!==($=B.nickname)&&void 0!==$?$:B.name)&&void 0!==H?H:q.data.name,LEVEL:B.level,MERGE_RANK:et.P8.getPetDisplayMergeRank(B.ID,B.uniqueID),SHOW_MERGE_RANK_BADGE:et.P8.canPetAccessMergeRanks(B.ID),SHOW_UPGRADE:!1,SHOW_EVOLVE:!1,SHOW_ON_TEAM:this._teamPetIndices.includes(U),SHOW_GUIDE_HAND:!1,INPUT_ENABLED:!this._teamPetIndices.includes(U)&&!this._sortedPets[U].disabledData,ON_CLICK:()=>{this.selectPet(U),this.hidePetSelectionDrawer()},ON_DISABLED_CLICK:()=>{this.showPetReuseInterface(B,q,U)},SHOW_TIME_REMAINING:!1};if(this._riftsSyncedDataStore.getPetCooldownStatus(B.uniqueID)===ct.R.Expired){const k=this._riftsSyncedDataStore.getUsedPetMetadata(B.uniqueID);this._riftsNetworkHandler.expireRiftPetCooldown(B.uniqueID).then((()=>{var U;this._segment.rifts.sendCooldownTimerEnded(k.cooldownID,B.uniqueID,null!==(U=null==G?void 0:G.petCooldownMs)&&void 0!==U?U:0)})).catch(j.RQr.createHandler("Error expiring pet cooldown"))}if(this._riftsSyncedDataStore.isPetAvailableForUse(B.uniqueID))B.disabledData&&(K.DISABLED=!0,K.DISABLED_ICON=null!==(W=B.disabledData.disabledIcon)&&void 0!==W?W:"");else{const k=this._riftsSyncedDataStore.getUsedPetMetadata(B.uniqueID);if(j.Aq$.isDefined(G)&&j.Aq$.isDefined(null==G?void 0:G.petCooldownMs)&&j.Aq$.isDefined(k.timestamp)){const B=k.timestamp+(null!==(V=null==G?void 0:G.petCooldownMs)&&void 0!==V?V:0)-Date.now();K.SHOW_TIME_REMAINING=!0,K.TIME_REMAINING_MS=B}else K.OVERLAY_TEXT=F;K.DISABLED=!0}return k.push(K),k}),[]),PET_GRID_FIXED_ROW_COUNT:Math.ceil(this._sortedPets.length/4),[tt.Fm.ShowRestrictionBadge]:this._restrictionBadgeData.showRestrictionBadge,[tt.Fm.RestrictionBadgeTest]:this._restrictionBadgeData.restrictionBadgeText};this._petSelectionDrawer?it.d.updateInjectedValues(this._petSelectionDrawer,$):(this._petSelectionDrawer=yield it.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,W.l.PetSelectionDrawer,$),this._petSelectionDrawer.parent=this._prefabRoot,this._drawerCloseOverlay.onClicked.add(this.hidePetSelectionDrawer,this)),this._riftsSyncedDataStore.hasUsedPets()&&this.setupPetReuseCta(),null!==(U=this._petSpawner)&&void 0!==U||(this._petSpawner=j.wa5.getActiveScene().container.get(tt.oX.PetCardPetSpawner))}))}exit(){const k=Object.create(null,{exit:{get:()=>super.exit}});return(0,F.sH)(this,void 0,void 0,(function*(){this._showPetSelectionDrawerSignal.dispose(),this._hidePetSelectionDrawerSignal.dispose(),yield k.exit.call(this)}))}getCommonPetInjectionData(k){const B=j.wa5.getActiveScene().container.get(G.BattleConstants).getElementalWeakness(k);return{ELEMENT_ICON:[V._.Ui_battle_revamp_json,`icon-mini-element-${k}`],PEDESTAL_ASSET:[V._.Ui_rifts_json,"base-cool-grey-light"],PET_CONTAINER_WIDTH:200,PET_CONTAINER_HEIGHT:170,WEAK_TO_OFFSET:18,WEAKNESS_ICON:[V._.Ui_battle_revamp_json,`icon-mini-element-${B}`],PET_WIDTH_LIMIT:200,PET_HEIGHT_LIMIT:150}}getReusablePetInjectionData(k,B){var U,F,G,j;return{PET_RESCUE_CREATURE_DATA:{ID:k.ID,name:k.name,level:k.level},PET_RESCUE_NAME:null!==(F=null===(U=null==B?void 0:B.data)||void 0===U?void 0:U.name)&&void 0!==F?F:"",PET_RESCUE_RARITY:null!==(j=null===(G=null==B?void 0:B.data)||void 0===G?void 0:G.rarity)&&void 0!==j?j:0,PET_RESCUE_STAMP_ENABLED:!1}}showPetSelectionDrawer(k){this._selectedSlotIndex=k,this._drawerCloseOverlay.GameObject.active=!0,this._showPetSelectionDrawerSignal.dispatch()}hidePetSelectionDrawer(){this._drawerCloseOverlay.GameObject.active=!1,this._hidePetSelectionDrawerSignal.dispatch()}setupPetReuseCta(){const k=j.wa5.getActiveScene().container.get("DRAWER_TWEEN_IN_ON_COMPLETE_SIGNAL"),B=j.wa5.getActiveScene().container.get("DRAWER_PET_GRID_LAYOUT_GAME_OBJECT");k.addOnce((()=>{const k=Q.E.getIconForType("currency",27);Y.q.instance.prodigy.load.assetsAsPromise([k]).then((()=>{const k=this._sortedPets.findIndex((k=>!1===this._riftsSyncedDataStore.isPetAvailableForUse(k.uniqueID))),U=B.children[k];Y.q.instance.prodigy.prefabFactory.createTooltip(U.transform,"REUSE_PET_MAGICOIN",{arrowDirection:Z.i.LEFT,iconGUID:Q.E.getIconForType("currency",27),titleKey:"PET_LOCKED"})})).catch(j.RQr.createHandler("TeamSelectionState: Failed to load magicoin icon for pet reuse tooltip"))}),this)}showElementsPopup(){return(0,F.sH)(this,void 0,void 0,(function*(){yield new Promise((k=>{Y.q.instance.prodigy.open.prefabMenu(W.l.ElementalWeaknessChartPopup,k,void 0,!0,!1)}))}))}selectPet(k,B=!1){var U,F;const G=this._teamPetIndices[this._selectedSlotIndex];this._teamPetIndices[this._selectedSlotIndex]=k;const $=k>=0?this._sortedPets[k]:null;if($){const k=X.t.getItem("pet",$.ID),G=et.P8.getElementType(k),H=j.wa5.getActiveScene().container.get("HOME_TEAM_TRANSFORM"),V=k=>{k.setAnimationByName(0,"evolution",!1),k.GameObject.active=!0,k.getSpine().onComplete.addOnce((()=>{k.GameObject.active=!1}))};it.d.updateInjectedValues(H.GameObject.children[this._selectedSlotIndex],Object.assign(Object.assign(Object.assign({},this.getCommonPetInjectionData(G)),{IS_RARE_PET:!1,PET_ID:$.ID,PET_NAME:null!==(F=null!==(U=$.nickname)&&void 0!==U?U:$.name)&&void 0!==F?F:k.data.name}),B&&{REVIVE_UPPER_SPINE:V,REVIVE_LOWER_SPINE:V}))}else{const k=j.wa5.getActiveScene().container.get("HOME_TEAM_TRANSFORM");it.d.updateInjectedValues(k.GameObject.children[this._selectedSlotIndex],{IS_RARE_PET:!1,PET_NAME:"",WEAKNESS_ICON:""})}if(G>=0){const k={INPUT_ENABLED:!0,SHOW_ON_TEAM:!1};this._petSpawner.updateInjectionData(G,k)}if($){const k=this._sortedPets.indexOf($),B={INPUT_ENABLED:!1,SHOW_ON_TEAM:!0};this._petSpawner.updateInjectionData(k,B)}}showPetReuseInterface(k,B,U){var F,G,$;const H=null!==(F=this._sortedPets[U].uniqueID)&&void 0!==F?F:"";if(this._riftsSyncedDataStore.isPetAvailableForUse(H)||!k.uniqueID)return;const V=Y.q.instance.prodigy.gameContainer.get("5c7-e02d"),q=Y.q.instance.prodigy.gameContainer.get("196-d3a5"),K=this._riftsSyncedDataStore.getUsedPetMetadata(k.uniqueID),z=null===($=null===(G=q.getRiftsPortalConfig())||void 0===G?void 0:G.options)||void 0===$?void 0:$.petReuseData;if(!z||!K)return;const Q=this.getReusablePetInjectionData(k,B),X=V.getBalance(27);Q.PET_EVOLUTION_CARD_BALANCE=X;const Z=Y.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);j.Aq$.isDefined(null==z?void 0:z.petCooldownMs)&&j.Aq$.isDefined(null==K?void 0:K.timestamp)?(Q[tt.n7.TimeRemainingMs]=K.timestamp+z.petCooldownMs-Date.now(),Q[tt.n7.TitleText]=Z.getText("RIFTS_USE_PET_AGAIN")):(Q[tt.n7.TitleText]=Z.getText("RIFTS_USE_PET_AGAIN_NO_TIME"),Q[tt.n7.ShowTimeRemaining]=!1);const J=this._riftsSyncedDataStore.getUsedPetReuseCost(H);Q.PET_EVOLUTION_CARD_COST_BALANCE=J,Q.REUSE_PET_CALLBACK=()=>{if(X>=J){const k=this._segment.item.beginSecureItemTransaction(),B=this._segment.rifts.getRiftTransactionData();this._riftsNetworkHandler.reuseRiftPet(H).then((()=>{var k,F;const G=null!==(k=null==z?void 0:z.petCooldownMs)&&void 0!==k?k:0,j=G>0?Math.max(0,(K.timestamp+G-Date.now())/1e3):0;this._segment.rifts.sendCooldownTimeSkipped(null!==(F=K.cooldownID)&&void 0!==F?F:"",H,G/1e3,j,J,B.transaction_id),this.hidePetSelectionDrawer(),this._petSpawner.updateInjectionData(U,{INPUT_ENABLED:!0,DISABLED:!1,SHOW_TIME_REMAINING:!1,OVERLAY_TEXT:"",DISABLED_ICON:""}),this.selectPet(U,!0)})).catch(j.RQr.createHandler("TeamSelectionState: Error in the reuse pet flow")).finally((()=>k.flush(B)))}else Y.q.instance.prodigy.open.unifiedConversionFlow(void 0,{conversionFunnelName:nt.o.FunnelNotEnoughCurrencyRifts})},it.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,W.l.RiftRunReusePetModal,Q).then((()=>{this._segment.rifts.sendOpenPetReuseInterface()})).catch(j.RQr.createHandler("Team Selection: Error loading reuse pet modal"))}isEElementType(k){return Object.values(G.EElementType).includes(k)}}},13302:(k,B,U)=>{"use strict";var F,G;U.d(B,{X:()=>F,h:()=>G}),function(k){k.Small="small",k.Normal="normal",k.Medium="medium",k.Large="large",k.Huge="huge"}(F||(F={})),function(k){k[k.Home=0]="Home",k[k.Away=1]="Away"}(G||(G={}))},52850:(k,B,U)=>{"use strict";U.d(B,{e:()=>Z});var F=U(8674),G=U(62459),j=U(36648),$=U(28628),H=U(32389),V=U(51151),W=U(35120),q=U(129),K=U(89360),z=U(73797),Y=U(23082),Q=U(10670),X=U(76277);class Z{static get _duelInviteService(){return W.q.instance.prodigy.gameContainer.get("636-444c")}static get _localPlayer(){return W.q.instance.prodigy.gameContainer.get("e20-0fb0").player}static invite(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=this.getActiveInvites().find((k=>k.userID===B.userID));if(!F)return this.rejectAllInvites(),this.sendInvite(k,B,U);this.acceptInvite(k,F,U)}))}static getActiveInvites(){return this._duelInviteService.getInvites()}static getPlayerFromInvite(k){var B;const U=new q.a(W.q.instance.game);return k instanceof V.DuelInviteProto?U.initFromProtobuf({userID:k.userID,appearance:k.appearance,equipment:k.equipment,name:k.name,team:k.team,member:k.member,level:k.level}):(k.name&&(k.appearance?k.appearance.name=k.name:k.appearance={name:k.name}),U.init({userID:k.userID,appearance:k.appearance,equipment:{follow:k.equipment.followID,hat:k.equipment.hatID,outfit:k.equipment.outfitID,weapon:k.equipment.weaponID,spellRelic:k.equipment.spellRelicID,boots:k.equipment.bootsID,mount:k.equipment.mountID,costume:(0,X.G)(H.q).enabled?k.equipment.costumeID:void 0},isMember:k.member,data:{level:k.level,playerTransformation:null===(B=k.appearance)||void 0===B?void 0:B.morph}})),U}static acceptInvite(k,B,U){this._duelInviteService.acceptInvite(B),this.getActiveInvites().filter((k=>k!==B)).forEach((k=>{this.rejectInvite(k)}));const F=this.getPlayerFromInvite(B),j=B instanceof V.DuelInviteProto?B.roomID:B.channelName;W.q.instance.prodigy.gameContainer.get("a25-68f4").getBattleStartQuestData(this.getBattleTypeFromVariant(k)).catch((k=>{G.RQr.createHandler("Error getting battle quest data, starting battle with no quest data")(k)})).then((B=>{this.startBattle(k,F,this._localPlayer,j,U,B)})).catch(G.RQr.createHandler("Error continuing the battle start function in DuelInviteUI"))}static rejectInvite(k){this._duelInviteService.rejectInvite(k)}static rejectAllInvites(){for(const k of this.getActiveInvites())this.rejectInvite(k)}static sendInvite(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F={},j=new G.bnh,$=this._duelInviteService;$.onInviteSent.add((k=>j.resolve(k)),F),$.onInviteFailed.add((k=>j.reject(k)),F),j.finally((()=>{$.onInviteSent.removeAll(F),$.onInviteFailed.removeAll(F)})),$.sendInvite(B);const H=yield j,q=H instanceof V.DuelInviteProto?H.roomID:H.channelName;W.q.instance.prodigy.gameContainer.get("a25-68f4").getBattleStartQuestData(this.getBattleTypeFromVariant(k)).catch((k=>{G.RQr.createHandler("Error getting battle quest data, starting battle with no quest data")(k)})).then((F=>{this.startBattle(k,this._localPlayer,B,q,U,F)})).catch(G.RQr.createHandler("Error continuing the battle start function in DuelInviteUI"))}))}static startBattle(k,B,U,F,G,H){var V;const q=W.q.instance.game,K=B===W.q.instance.prodigy.gameContainer.get("e20-0fb0").player?U:B,X=q.broadcaster.broadcast(z.pm.GetTarget,q,[!0]),Z=q.state.current,J=k=>{G?G():this.onBattleEnd(q,Z,X,k)};W.q.instance.prodigy.battle.battleStats.type="PVP-Duel";const tt=W.q.instance.game.state.states.get(Y.G.SecureBattleRevamp),et={battleType:this.getBattleTypeFromVariant(k),hostUserId:`${B.getID()}`,guestUserId:`${U.getID()}`,roomId:null===(V=W.q.instance.game.state.get(Y.G.DuelMatchmaking).roomConfig)||void 0===V?void 0:V.id,activeQuestIDs:null==H?void 0:H.questIDs,questEventsToSend:null==H?void 0:H.questEvents},it={backgroundID:[j.q.Battle_coliseum_outside_bg,j.q.Battle_coliseum_outside_fg],onVictory:()=>J($.XK.Victory),onEscape:()=>J($.XK.Escape),onDefeat:()=>J($.XK.Defeat),opponent:K,channelName:F,clearWorld:k!==Q.VB.DuelsStadium,defeatData:{preventDefaultTeleport:!0}};tt.startBattleRequest(et,it)}static onBattleEnd(k,B,U,F){if(B===Y.G.Tower){const B=k.state.get(Y.G.Tower);B.startX=U.x,B.startY=U.y,W.q.instance.prodigy.start(Y.G.Tower)}else W.q.instance.prodigy.world.it(this._localPlayer.data.zone,U.x,U.y,{battleResult:F});W.q.instance.prodigy.gameContainer.get("0f1-c356").onWeeklyChallengeBattleEnd("PVP-Duel").then((()=>{K.h.instance.updateData()})).catch((k=>{G.VyI.log(`BattleStats update failed at duel pvp battle end: ${G.RQr.stringify(k)}`,G.$bb.Warning)}))}static getBattleTypeFromVariant(k){return k===Q.VB.DuelsStadium?$.gu.MatchmakingDuel:$.gu.Duel}}},66840:(k,B,U)=>{"use strict";U.d(B,{D:()=>z});var F=U(8674),G=U(62459),j=U(43846),$=U(28152),H=U(80060),V=U(17710),W=U(35120),q=U(30226),K=U(88022);let z=class extends G.uAl{constructor(){super(...arguments),this._addTurnsRemainingText=!1}setStatusEffect(k,B){const U=this._addTurnsRemainingText?`${k.remainingDuration} ${(0,j.k)(1===k.remainingDuration?"STATUS_EFFECT_TURN":"STATUS_EFFECT_TURNS")}`:`${k.remainingDuration}`,F=W.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),$=q.J.getLocalizationActiveNameKey("statusEffect",k.statusEffectId),z=F.hasText($)?F.getText($):F.getText(q.J.getLocalizationNameKey("statusEffect",k.statusEffectId)),Y=q.J.getLocalizationActiveFlavorKey("statusEffect",k.statusEffectId),Q=F.hasText(Y)?F.getText(Y):F.getText(q.J.getLocalizationFlavorKey("statusEffect",k.statusEffectId)),X=V.D.formatStatusEffectDescription(Q,k.remainingDuration,B);H.d.updateInjectedValues(this.GameObject,{SPELL_STATUS_EFFECT_NAME:z,SPELL_STATUS_EFFECT_DESCRIPTION:X,SPELL_STATUS_EFFECT_DURATION:U});const Z={atlas:K._.Ui_spell_effect_icons_json,frame:k.itemData.icon};this._icon.updateAsset(Z.atlas,Z.frame)}};(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],z.prototype,"_icon",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],z.prototype,"_addTurnsRemainingText",void 0),z=(0,F.Cg)([(0,G.EVk)("ActiveStatusEffectUI",$.Y.battleRevamp)],z)},75935:(k,B,U)=>{"use strict";U.d(B,{k:()=>K});var F=U(8674),G=U(62459),j=U(95891),$=U(99625),H=U(28152),V=U(19690),W=U(94325),q=U(66840);let K=class extends G.uAl{constructor(){super(...arguments),this._transformsToApplyHeightReferenceTo=[]}displayEffects(k,B){var U;const F=(null!==(U=this._gridLayout.GameObject.children)&&void 0!==U?U:[]).map((k=>k.findComponent(q.D))).filter((k=>!!k));F.forEach((k=>{k.GameObject.active=!1}));(0,j.clone)(k).reverse().forEach(((k,U)=>{if(U>=F.length){const k=this.addNewEntry();F.push(k)}const G=F[U];G.setStatusEffect(k,B),G.GameObject.active=!0})),this._gridLayout.onUpdated.addOnce(this.onGridLayoutUpdated,this),this._gridLayout.updateAll()}addNewEntry(){const k=(0,V.Ks)().loadFromGUID($.l.StatusEffect,this._gridLayout.GameObject);return this._gridLayout.GameObject.addChild(k),k.findComponent(q.D)}updateHeight(){const k=this.getClampedScrollAreaHeight();this._transformsToApplyHeightReferenceTo.forEach((B=>{B.heightDelta=k+8})),this._scrollView.rectTransform.heightDelta=k}getClampedScrollAreaHeight(){var k;const B=this._gridLayoutContainer.heightDelta;if(B<=274)return B;const U=null!==(k=this._gridLayout.GameObject.children)&&void 0!==k?k:[];let F=0;for(let j=0;j{"use strict";U.d(B,{k:()=>G,y:()=>it});var F,G,j=U(8674),$=U(87490),H=U(62459),V=U(88022),W=U(82351),q=U(36648),K=U(43523),z=U(76277),Y=U(35120),Q=U(83133),X=U(28152),Z=U(10670),J=U(80060),tt=U(44094),et=U(81531);!function(k){k.Astral1="4BDDFB",k.Astral2="8085FF",k.Astral3="FF9CB8",k.Fire="FDA915",k.Ice="BBF1FF",k.Physical="D7F5EB",k.Plant="C0E894",k.Shadow="F597E7",k.Storm="FFD406",k.Water="6DC7FF",k.Neutral="91FFEC",k.Disabled="8A827F",k.Cooldown="D5CBC4"}(G||(G={}));let it=F=class extends H.uAl{constructor(){super(...arguments),this.index=-1,this._activeUnit=null,this.onActionSelected=new H.HN0,this.onActionOnCooldownSelected=new H.HN0,this.onActionUnavailable=new H.HN0,this.onActionAvailable=new H.HN0,this.onActionDisabled=new H.HN0,this.onInactiveSelected=new H.HN0,this._sendOnInactiveSelected=!1,this._inactiveMsgArg=null}initialize(){this._inactiveMsgKey="",this._inactiveMsgArg=null,this._displayObject.active=!0,this._activeUnit=this._battleController.activeUnit,this._mainSpellList=this._activeUnit.spells.filter((k=>this._gameDataProvider.getItem("spellV2",k.spellId).data.showSpellcard)),this.checkValidity()}checkValidity(){var k,B,U;if(null===(k=this._activeUnit)||void 0===k?void 0:k.data){if(this.type===$.EBattleAction.CastSpell&&this.index>=0){if(this._mainSpellList.length<=this.index)return void this.onActionUnavailable.dispatch();const k=this.getSpellData();if(!k)return;const G=this._gameDataProvider.getItem("spellV2",k.spellId),j=G.data;(0,z.G)(K.P)||(j.statusEffects=[]);const H=G.metadata,W=k.currentCooldown>0||this.isOneUseSpell(k.currentCooldown)||k.isLocked||this._activeUnit.currentMp0?Z=F.COOLDOWN_TEXT:W&&(Z=F.IS_LOCKED_TEXT);const et={SPELLCARD_COLOR_STATE:Z,SPELLCARD_COOLDOWN_BARS_TOTAL:Y,SPELLCARD_COOLDOWN_BARS_CURRENT:Q,SPELLCARD_COOLDOWN_1:this.getCooldownBarColor(Q,1,j.element),SPELLCARD_COOLDOWN_2:this.getCooldownBarColor(Q,2,j.element),SPELLCARD_COOLDOWN_3:this.getCooldownBarColor(Q,3,j.element),SPELLCARD_CENTRE_ICON:X,SPELLCARD_MINI_ICON:[V._.Ui_battle_revamp_json,`icon-mini-element-${j.element}${W?"-cooldown":""}`],SPELL_HAS_STATUS_EFFECT:$.Util.isDefined(j.statusEffects)&&j.statusEffects.length>0};if(this._activeUnit.affixes.length){let k;this._activeUnit.affixes.find((B=>{var U;return B.type===$.EAffixType.AdditiveDamageMultiplier&&(k=null===(U=B.instances.find((k=>k.element)))||void 0===U?void 0:U.element)})),$.Util.singleOrArrayIncludes(k,j.element)&&(et.SPELLCARD_BOOST_ICON=[V._.Ui_battle_revamp_json,"icon-mini-buff-chevron"])}if(J.d.updateInjectedValues(this.GameObject.parent,et),this.onActionAvailable.dispatch(),this._activeUnit.currentMp0)return this._inactiveMsgKey=1===k.currentCooldown?"BATTLE_REVAMP_ON_COOLDOWN":"BATTLE_REVAMP_ON_COOLDOWN_PLURAL",void(this._inactiveMsgArg=k.currentCooldown)}if(this.type===$.EBattleAction.RescuePet){if(!this._battleController.isRescueAvailable())return void this.onActionUnavailable.dispatch();this.onActionAvailable.dispatch()}}else H.VyI.log("Invalid data on active unit.",H.$bb.Error)}checkValidTargets(k,B=!1){if(k.team===$.ESpellTeamTarget.Own&&k.unit===$.ESpellUnitTarget.Ally){if(!this._battleController.getUnits().some((k=>{var B;return k.data.teamId===(null===(B=this._activeUnit)||void 0===B?void 0:B.data.teamId)&&k!==this._activeUnit&&k.isTargetable})))return B&&(this._inactiveMsgKey="BATTLE_REVAMP_NO_VALID_ALLY_TARGETS",this._sendOnInactiveSelected=!0),!1}return!0}isOneUseSpell(k){return-1===k}getCooldownBarColor(k,B,U){let j=F.COOLDOWN_TEXT;return this.isOneUseSpell(k)?j=F.IS_LOCKED_TEXT:k>=B&&(j=U===$.EElementType.Astral?`${$.EElementType.Astral}${B}`:U),G[tt.$.capitalizeFirstLetter(j)]}getSpellData(){var k;return this.type===$.EBattleAction.CastSpell&&this.index>=0?null===(k=this._mainSpellList)||void 0===k?void 0:k[this.index]:this.type===$.EBattleAction.RescuePet?{spellId:this._battleController.battleConstants.rescueSpellId,isLocked:!1,currentCooldown:0}:null}sendActionData(){const k=this.getSpellData();if(k){Y.q.instance.prodigy.audio.playSFXFromGUID(W.B.Sfx_spell_card_select);const B=this._gameDataProvider.getItem("spellV2",k.spellId).data,U=this._battleController.battleConstants.rescueSpellId===k.spellId;if(Y.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendBattleInterfaceClickedEvent({object_name:`Spell Card ${B.name}`,object_type:U?Z.zA.Action:Z.zA.Spell}),0!==k.currentCooldown)return this.onActionOnCooldownSelected.dispatch(k),void(this._battleController.selectedSpell=k);this._sendOnInactiveSelected&&this.onInactiveSelected.dispatch()}this.onActionSelected.dispatch(k),this._battleController.selectedSpell=k}sendInactiveMessage(){this.clearInactiveMessage(),this._inactiveMsgArg?this._battleController.textLog.showMessage(this._inactiveMsgKey,this._inactiveMsgArg):this._battleController.textLog.showMessage(this._inactiveMsgKey)}clearInactiveMessage(){this._battleController.textLog.clearMessageQueue()}destroy(){this.onActionSelected.dispose(),this.onActionUnavailable.dispose(),this.onActionAvailable.dispose(),this.onActionDisabled.dispose(),this.onActionOnCooldownSelected.dispose(),this.onInactiveSelected.dispose(),super.destroy()}};it.COOLDOWN_TEXT="cooldown",it.IS_LOCKED_TEXT="disabled",(0,j.Cg)([(0,H.gfw)($.EBattleAction),(0,j.Sn)("design:type",String)],it.prototype,"type",void 0),(0,j.Cg)([(0,H.g11)(),(0,j.Sn)("design:type",Number)],it.prototype,"index",void 0),(0,j.Cg)([(0,H.Cdj)("BattleController"),(0,j.Sn)("design:type",Function)],it.prototype,"_battleController",void 0),(0,j.Cg)([(0,H.Cdj)("GameDataProvider"),(0,j.Sn)("design:type",et.q)],it.prototype,"_gameDataProvider",void 0),(0,j.Cg)([(0,H.MnK)(Q.l),(0,j.Sn)("design:type",Q.l)],it.prototype,"_toggle",void 0),(0,j.Cg)([(0,H.ERr)(),(0,j.Sn)("design:type",H._mx)],it.prototype,"_displayObject",void 0),(0,j.Cg)([(0,H.bbQ)(),(0,j.Sn)("design:type",H.HN0)],it.prototype,"onActionSelected",void 0),(0,j.Cg)([(0,H.bbQ)(),(0,j.Sn)("design:type",H.HN0)],it.prototype,"onActionOnCooldownSelected",void 0),(0,j.Cg)([(0,H.bbQ)(),(0,j.Sn)("design:type",H.HN0)],it.prototype,"onActionUnavailable",void 0),(0,j.Cg)([(0,H.bbQ)(),(0,j.Sn)("design:type",H.HN0)],it.prototype,"onActionAvailable",void 0),(0,j.Cg)([(0,H.bbQ)(),(0,j.Sn)("design:type",H.HN0)],it.prototype,"onActionDisabled",void 0),(0,j.Cg)([(0,H.bbQ)(),(0,j.Sn)("design:type",H.HN0)],it.prototype,"onInactiveSelected",void 0),it=F=(0,j.Cg)([(0,H.EVk)("BattleActionData",X.Y.battleRevamp)],it)},77823:(k,B,U)=>{"use strict";U.d(B,{u:()=>$});var F=U(8674),G=U(79687),j=U(39984);let $=class{get teamCurrentHP(){return this._teamCurrentHP}constructor(k){this._activePlayer=k.player}refreshTeamCurrentHP(){const k=[];this._activePlayer.kennel.petTeam.forEach((B=>{if(B){const U=B.getCurrentHearts();k.push(Math.min(Math.round(U),j.e.MAX_HEARTS))}})),this._teamCurrentHP=k}getTeamCurrentHP(){return this._teamCurrentHP||this.refreshTeamCurrentHP(),this._teamCurrentHP}};$=(0,F.Cg)([(0,G.injectable)(),(0,F.Qj)(0,(0,G.inject)("e20-0fb0")),(0,F.Sn)("design:paramtypes",[Object])],$)},86323:(k,B,U)=>{"use strict";U.d(B,{I:()=>q});var F=U(8674),G=U(62459),j=U(5491),$=U(35120),H=U(63834),V=U(28152),W=U(68788);let q=class extends G.y4o{constructor(){super(...arguments),this.onClosed=new G.HN0,this.onOpened=new G.HN0,this.onStarted=new G.HN0,this._dropDownStart=new G.I9Y,this._groupContainer=null,this._postBattleFlowManager=null}create(){super.create(),this._groupContainer=$.q.instance.game.add.container($.q.instance.game.stage),this._groupContainer.name=this.GameObject.name,this.setRootContainer(this._groupContainer)}getDimensions(){return G.or0.ZERO}getBattleCreatures(k){const B=$.q.instance.prodigy.gameContainer.get("306-5359");return[B,...k.map((k=>{var U;if(!k.includes(j.V.Player)){const F=null===(U=/^pet-(.*)$/.exec(k))||void 0===U?void 0:U[1];if(F){const k=B.kennel.getPetByUniqueID(F);if(k)return new H.r(B.game,k)}}return null})).filter((k=>k))]}show(k,B,U,F,j){const H=this.getBattleCreatures(k),V=F.rewards;F.skipChests&&(V.length=0,F.memberRewards.length=0),$.q.instance.prodigy.prefabFactory.openPostBattleFlow({currentTeamCreatures:H,victory:B,battleType:U,postBattleRewards:{xpGained:F.xpGained,rewards:V,memberRewards:F.memberRewards,rewardsScalingInfo:F.rewardsScalingInfo,rescuablePets:F.rescuablePets,magicoinRewardGranted:F.magicoinRewardGranted},nootTipInfo:j}).promise.then((k=>{this.onOpened.dispatch(),this._postBattleFlowManager=k.findComponentInChildren(W.D),this._postBattleFlowManager?(this._postBattleFlowManager.OnDestroy.addOnce((()=>this.onResultClosed())),this.onStarted.dispatch(k)):this.onResultClosed()})).catch(G.RQr.createHandler("Error with post battle flow menu"))}onResultClosed(){this.onClosed.dispatch()}destroy(){this.onClosed.dispose(),this.onOpened.dispose(),this.onStarted.dispose(),super.destroy()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],q.prototype,"onOpened",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],q.prototype,"onStarted",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],q.prototype,"_dropDownStart",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_dropDownDuration",void 0),q=(0,F.Cg)([(0,G.EVk)("BattleRevampResult",V.Y.battleRevamp)],q)},64019:(k,B,U)=>{"use strict";U.d(B,{cs:()=>J,pV:()=>G});var F,G,j,$=U(8674),H=U(87490),V=U(62459),W=U(95891),q=U.n(W),K=U(28628),z=U(28152),Y=U(13302),Q=U(630),X=U(63761),Z=U(83269);!function(k){k.None="none",k.AllUnits="all",k.NonWizardUnits="nonWizard",k.WizardUnits="wizard"}(G||(G={})),function(k){k[k.FrontTop=0]="FrontTop",k[k.FrontMiddle=1]="FrontMiddle",k[k.FrontBottom=2]="FrontBottom",k[k.BackMiddle=3]="BackMiddle",k[k.Middle=4]="Middle",k[k.HugeUnit=5]="HugeUnit"}(j||(j={}));let J=F=class extends V.uAl{constructor(){super(...arguments),this._units=[],this.teleportInBehaviour=G.None}get id(){return this._id}get units(){return this._units.filter((k=>k.creature))}get rawUnits(){return this._units}get wizard(){return this.units.find((k=>k.type===K.uj.Wizard))}setData(k,B,U){this._id=k,this._teamData=B,this._unitData=U,this.positionTeamMembers(U)}positionTeamMembers(k){const B=1===q().keys(q().pickBy(k,{type:K.uj.Wizard})).length,U=Z.B.getUnitContainer(k[0].type).defaultSize,G=k.every((k=>void 0!==k.slot));B&&k.sort(((k,B)=>k.type===K.uj.Wizard?-1:B.type===K.uj.Wizard?1:0)),k.forEach(((j,$)=>{const W=j.type===K.uj.Boss?X.H0.None:U===Y.X.Huge?X.H0.Immediate:j.teamId===H.ETeamId.Home?X.H0.Astral:X.H0.Shadow;let q=j.slot;1===k.length&&j.type!==K.uj.Boss&&U===Y.X.Huge&&(q=K.Ie.HugeUnit);const z=F.TEAM_UNIT_SLOT_MAP[q],Q=this.units.find((k=>k.type===K.uj.Wizard));this.addUnitToSlot(j,G&&V.Aq$.isDefined(z)?z:this.getFallbackUnitPosition($),W,B&&Q?Q:void 0)}))}getFallbackUnitPosition(k){switch(k){case 0:return F.TEAM_UNIT_SLOT_MAP[K.Ie.BackMiddle];case 1:return F.TEAM_UNIT_SLOT_MAP[K.Ie.FrontTop];case 2:return F.TEAM_UNIT_SLOT_MAP[K.Ie.FrontBottom];default:return F.TEAM_UNIT_SLOT_MAP[K.Ie.FrontMiddle]}}addUnitToSlot(k,B,U,F){var G;const j=this._units[null!==(G=k.unitSlot)&&void 0!==G?G:B];return j.setData(k,U,F,k.scale),j}teleportIn(){return(0,$.sH)(this,void 0,void 0,(function*(){const k=[];this._units.forEach((B=>{if(B.creature){const U=this.teleportInBehaviour===G.AllUnits||this.teleportInBehaviour===G.NonWizardUnits&&B.data.type!==K.uj.Wizard||this.teleportInBehaviour===G.WizardUnits&&B.data.type===K.uj.Wizard;k.push(B.enterBattle(U))}})),yield Promise.all(k)}))}teleportOut(){return(0,$.sH)(this,void 0,void 0,(function*(){const k=[];this._units.forEach((B=>{B.creature&&B.isAlive()&&k.push(B.playDefeated())})),yield Promise.all(k)}))}awaitUnitsLoaded(){return(0,$.sH)(this,void 0,void 0,(function*(){return Promise.all(this.units.map((k=>(0,$.sH)(this,void 0,void 0,(function*(){k.creature||(yield k.onDataSet.asPromise()),yield k.loadPromise})))))}))}getUnitIndex(k){return this._units.findIndex((B=>B===k))}isRescuable(){const k=this.getInjectedValue("BattleController");return this.units.some((B=>B.data.teamId===k.rightTeamId&&B.type===K.uj.Pet&&B.data.catchChance>=0&&!B.controllerUnit))}destroy(){super.destroy(),this._units.length=0}};J.TEAM_UNIT_SLOT_MAP={[K.Ie.FrontTop]:j.FrontTop,[K.Ie.FrontMiddle]:j.FrontMiddle,[K.Ie.FrontBottom]:j.FrontBottom,[K.Ie.BackMiddle]:j.BackMiddle,[K.Ie.Middle]:j.Middle,[K.Ie.HugeUnit]:j.HugeUnit},(0,$.Cg)([(0,V.SZi)(),(0,V.MnK)(Q.Xc),(0,$.Sn)("design:type",Array)],J.prototype,"_units",void 0),(0,$.Cg)([(0,V.gfw)(G),(0,$.Sn)("design:type",String)],J.prototype,"teleportInBehaviour",void 0),J=F=(0,$.Cg)([(0,V.EVk)("BattleRevampTeam",z.Y.battleRevamp)],J)},630:(k,B,U)=>{"use strict";U.d(B,{GH:()=>$,Xc:()=>Ut,jN:()=>j,rC:()=>G});var F,G,j,$,H,V=U(8674),W=U(87490),q=U(62459),K=U(95891),z=U.n(K),Y=U(20748),Q=U(62248),X=U(88022),Z=U(82351),J=U(99625),tt=U(36648),et=U(28628),it=U(37016),st=U(43523),nt=U(35120),at=U(49237),rt=U(91207),ot=U(77938),ht=U(28152),ct=U(37468),dt=U(29834),lt=U(23082),ut=U(76277),ft=U(96810),bt=U(70703),pt=U(66998),vt=U(26004),gt=U(3583),mt=U(96304),yt=U(34958),_t=U(16847),Et=U(6719),wt=U(80060),Tt=U(44094),St=U(86283),At=U(34578),Ct=U(97317),Ot=U(55122),It=U(13302),Dt=U(81531),Rt=U(35856),Pt=U(29143),Mt=U(46352),Nt=U(88331),xt=U(99057),Lt=U(63761),kt=U(83269),Bt=U(92611);!function(k){k.Entrance="entrance",k.Exit="exit",k.ExitToStore="exit-to-store"}(G||(G={})),function(k){k.TransitionUnit="unit-show-hide",k.TransitionUi="healthbar-hide",k.StoreParticleStart="particle-start"}(j||(j={})),function(k){k.PetMergeRank="PET_MERGE_RANK",k.PetMergeBadge="PET_MERGE_BADGE"}($||($={})),function(k){k.Apply="apply",k.ApplyLarge="apply-large",k.Sustain="sustain"}(H||(H={}));let Ut=F=class extends q.uAl{constructor(){super(...arguments),this.onDataSet=new q.HN0,this.onTurnTimerExpired=new q.HN0,this.onUnitDefeated=new q.HN0,this.onUnitRevived=new q.HN0,this.onInfoTooltipShown=new q.HN0,this.onInfoTooltipHidden=new q.HN0,this.onHpSet=new q.HN0,this.onApplyDamage=new q.HN0,this._unitTooltipIsShowing=!1,this.loadPromise=Promise.resolve(),this.isRescued=!1,this.turnIndicatorOffset=null,this.onDefeatAnimationStarted=new q.HN0,this.onDefeatAnimationFinished=new q.HN0,this._defeatAnimationPlaying=!1,this.cleanUpOnDefeat=!1,this.affixes=[],this.statusEffects=[],this.onStatusEffectsChanged=new q.HN0,this.unitNameForSegment=null,this._isTargetable=!0}get creature(){return this._creature}get data(){return this._data}get overlayParent(){return this._overlayParent}get levelUi(){return this._levelUi}get statusEffectContainer(){return this._statusEffectContainer}get storeTeleportPriority(){return this._storeTeleportPriority}get unitTooltipIsShowing(){return this._unitTooltipIsShowing}set unitTooltipIsShowing(k){this._unitTooltipIsShowing!==k&&(this._unitTooltipIsShowing=k,k?this.onInfoTooltipShown.dispatch():this.onInfoTooltipHidden.dispatch())}get _teleportAnimator(){var k;switch(null===(k=this._creature)||void 0===k?void 0:k.teleportType){case Lt.H0.Astral:return this._teleportAnimatorAstral;case Lt.H0.ShadowBig:return this._teleportAnimatorShadowBig;case Lt.H0.Shadow:default:return this._teleportAnimatorShadow}}get size(){return this._creature.size}set size(k){this._creature.size=k,this.targetComponent.size=k}get scale(){return this._characterRoot.transform.localScale.y}set scale(k){this._characterRoot.transform.setScale(k)}get spellOriginOffset(){return this.size===It.X.Huge?{x:40,y:100}:{x:0,y:0}}get element(){return this.data.element}set element(k){this.data.element=k,this.updateWeaknessIcon()}create(){super.create();const{x:k,y:B}=this._newIndicator.transform.localPosition;this.createUnitTooltipTrigger()}destroy(){this.controllerUnit=null,this.onDataSet.dispose(),this.onTurnTimerExpired.dispose(),this.onUnitDefeated.dispose(),this.onUnitRevived.dispose(),this.onInfoTooltipShown.dispose(),this.onInfoTooltipHidden.dispose(),this.onHpSet.dispose(),this.onApplyDamage.dispose(),this.hideWaitingMessage(),this.onDefeatAnimationStarted.dispose(),this.onDefeatAnimationFinished.dispose(),this.onStatusEffectsChanged.dispose(),super.destroy()}fadeOut(){return(0,V.sH)(this,arguments,void 0,(function*(k=!0){var B;yield null===(B=this._creature)||void 0===B?void 0:B.fadeOut(500).then((()=>{var B;k&&(this.GameObject.destroy(),null===(B=this.ultimatesUi)||void 0===B||B.GameObject.destroy())}))}))}fadeIn(){return(0,V.sH)(this,void 0,void 0,(function*(){this._creature.visible=!0,yield this._creature.fadeIn(500)}))}get hitbox(){return this._creature.hitbox}getHitboxCenter(){const k=this._creature.hitbox;return{x:k.x+.5*k.w,y:k.y+.5*k.h}}enterBattle(k){return(0,V.sH)(this,arguments,void 0,(function*(k,B=!1,U=!1){var F;this._creature||(yield this.onDataSet.asPromise(),yield this.loadPromise),this._creature.ran=!1,null===(F=this._hpBarSequence)||void 0===F||F.setupPulse(this._data.health.current/this._data.health.max),k?yield this.playTeleport(G.Entrance,B,U):(this._creature.visible=!0,this._creature.handleEnter(),B&&(this.uiContent.active=!0,this.uiContent.findComponent(bt.x).targetComponent.getRootContainer().alpha=1))}))}setData(k,B,U,G=1){if(this.statusEffects.length=0,this.uiContent.active=!0,this._data=k,this.controllerUnit=U,this.scale=G,!k)return this.clearData(),void this.onDataSet.dispatch();this._battleController.onChoosingSpell.removeAll(this),this._battleController.onChoosingSpell.add((()=>{this.updatePetRescueTooltip(),this.updateIdleStatusEffect()})),this._battleController.onSpellCardSelected.removeAll(this),this._battleController.onSpellCardSelected.add((()=>{this.updatePetRescueTooltip()}),this),this._battleController.onSpellCardUnselected.removeAll(this),this._battleController.onSpellCardUnselected.add((()=>{this.updatePetRescueTooltip()}),this),this._battleController.onSpellTargetChosen.removeAll(this),this._battleController.onSpellTargetChosen.add((()=>{this.updatePetRescueTooltip(),this.hideIdleStatusEffect()}),this),this._battleController.onBattleEnded.removeAll(this),this._battleController.onBattleEnded.add((()=>{this.updatePetRescueTooltip()}),this);const j=new(kt.B.getUnitContainer(k.type));this._creature=j,this.loadPromise=j.setData(k,this._characterRoot,B).then((()=>{j.size===It.X.Normal&&G{this.statusEffects.push(k)})),k.statusEffects.length=0}clearData(){this.uiContent&&(this.uiContent.active=!1),this._unitTooltipTrigger.active=!1,this._data=null,this.isRescued=!1,this._creature&&(this._creature.creatureGameObject&&(this._creature.creatureGameObject.active=!1),this._creature.destroy(),this._creature=null),this._unitShield&&(this._unitShield.active=!1)}setUnitTooltipTriggerEnabled(k){this._unitTooltipTrigger&&(this._unitTooltipTrigger.active=k)}get battleId(){var k;return null===(k=this._data)||void 0===k?void 0:k.unitId}get name(){return this._creature.name||this.defaultName}set name(k){this._creature.name=k}get defaultName(){const k=this._data.teamId===this._battleController.leftTeam.id?nt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.name.getFallbackName():this._localizer.getText("FALLBACK_NAME_WIZARD");switch(this.type){case et.uj.Wizard:return k;default:return Tt.$.capitalizeFirstLetter(this.type)}}get level(){return this._data.level}get currentHp(){return this._data.health.current}get maxHp(){return this._data.health.max}get currentMp(){return this._data.mp.current}get maxMp(){return this._data.mp.max}get type(){return this._data.type}get spells(){return this._data.spells}isAlive(){return!this.isDefeated()}isDefeated(){return this.isKnockedOut()||this.isRescued}isKnockedOut(){return this.currentHp<=0}get isTargetable(){return this._isTargetable&&!this.isDefeated()}set isTargetable(k){this._isTargetable=k}isARescuableUnit(){var k,B;return(null===(k=this._data)||void 0===k?void 0:k.catchChance)>=0&&(null===(B=this._data)||void 0===B?void 0:B.teamId)===this._battleController.rightTeam.id&&this.type===et.uj.Pet&&this.isTargetable&&!this.controllerUnit}isInARescuableState(){var k;return this.isARescuableUnit()&&this._data.health.current<=(null!==(k=this._data.catchHealth)&&void 0!==k?k:this._data.health.max*this._battleController.battleConstants.rescueDamageThreshold)}playAttackAnimation(){this._creature.attack()}playSummonAnimation(){this._creature.summon()}playLevelUp(){this._creature.levelUp()}playHurt(){this._creature.hurt()}playWalk(){this._creature.walk()}defeatUnit(){return(0,V.sH)(this,arguments,void 0,(function*(k=G.Exit){this.onUnitDefeated.dispatch(),this.removeAllStatusEffects(),yield this.playDefeated(k)}))}reviveUnit(){this.onUnitRevived.dispatch()}playDefeated(){return(0,V.sH)(this,arguments,void 0,(function*(k=G.Exit){this._creature&&(this._creature.ran?this._defeatAnimationPlaying&&(yield this.onDefeatAnimationFinished.asPromise()):(this._creature.ran=!0,this.hideWaitingMessage(),this.onDefeatAnimationStarted.dispatch(),this._defeatAnimationPlaying=!0,this.setNewIndicatorActive(!1),this._creature.teleportType===Lt.H0.None||this._creature.teleportType===Lt.H0.Immediate?(yield this._creature.defeated(),this.uiContent.active=!1,this._unitTooltipTrigger.active=!1,this._unitShield&&(this._unitShield.active=!1)):yield this.playTeleport(k,!1),this._defeatAnimationPlaying=!1,this.cleanUpOnDefeat&&(yield this.cleanUpAssets()),this.onDefeatAnimationFinished.dispatch()))}))}cleanUpAssets(){return(0,V.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,j;const $=[...this.getInjectedValue("LeftTeamUnits"),...this.getInjectedValue("RightTeamUnits")].filter((k=>!k.isDefeated()||!k.cleanUpOnDefeat));if($.map((k=>k.creature.id)).includes(this.creature.id))return;const H=nt.q.instance.game.state.states.get(lt.G.SecureBattleRevamp).getUnitAssets({[this.data.unitId]:this.data});rt.E.removeAssetsFromCache(H);const V=z().flatMap($.map((k=>k.spells))),W=V.map((k=>k.spellId)),K=this.spells.filter((k=>!W.includes(k.spellId))),Y=V.map((k=>this._gameDataProvider.getItem("spellV2",k.spellId))),Q=K.map((k=>this._gameDataProvider.getItem("spellV2",k.spellId))),X=[],Z=[];for(const q of Y)(null===(U=null===(B=null===(k=null==q?void 0:q.metadata)||void 0===k?void 0:k.assets)||void 0===B?void 0:B.icon)||void 0===U?void 0:U.assetKey)&&X.push(Tt.$.capitalizeFirstLetter(q.metadata.assets.icon.assetKey));for(const z of Q){const k=(null===(j=null===(G=null===(F=null==z?void 0:z.metadata)||void 0===F?void 0:F.assets)||void 0===G?void 0:G.icon)||void 0===j?void 0:j.assetKey)?Tt.$.capitalizeFirstLetter(z.metadata.assets.icon.assetKey):null;!X.includes(k)&&q.Aq$.isDefined(tt.q[k])&&Z.push(tt.q[k],tt.q[`${k}_cooldown`])}for(const q of Z)nt.q.instance.game.cache.removeImage(q);const J=rt.E.getSpellGuids(Y),et=rt.E.getSpellGuids(Q),it=rt.E.getAssetDependencies(J),st=rt.E.getAssetDependencies(et),at=z().difference(st,it);rt.E.removeAssetsFromCache(at),this._creature.animator instanceof dt.j&&this._creature.animator.spine.destroy(),this._creature.creatureGameObject.destroy(),q.C1c.markTextureGarbageCollectionFrame(),yield q.Egh.timeout(0),q.C1c.garbageCollectTextures()}))}playEscaped(){return(0,V.sH)(this,void 0,void 0,(function*(){var k;const B=nt.q.instance.game,U=this._creature.creatureGameObject.transform,F=(null===(k=this._data)||void 0===k?void 0:k.teamId)===this._battleController.rightTeam.id?B.width+100:-100,G=B.add.tween(U.localPosition,U).to({x:F},2e3,q.GS3.Quadratic.In);this.uiContent.active=!1,this._creature.flip(),this._creature.walk(),G.start(),yield G.onTweenComplete.asPromise()}))}setNewIndicatorActive(k=!0){if(!this._creature)return;const B=nt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=this._creature.id,F=!St.D.hasBeenRescuedPreviously(B,U);this._newIndicator.active=F&&k}showRarity(){return(0,V.sH)(this,void 0,void 0,(function*(){var k;yield null===(k=this._rarityDisplay)||void 0===k?void 0:k.showRarity(this._data.rarity)}))}updateRescuableUI(){return(0,V.sH)(this,arguments,void 0,(function*(k=!0){this.isARescuableUnit()?(this.setNewIndicatorActive(!0),k&&(yield this.showRarity())):this.setNewIndicatorActive(!1)}))}hasAccessToSpell(k){return this.spells.some((B=>B.spellId===k))}setRescueCost(k,B,U,F){this._rescueCost.GameObject&&(this._rescueCost.GameObject.active=k),k&&(this._rescueCost.updateCurrencyID(B),this._rescueCost.updateAmount(U,F),this.getInjectedValue("c47-20b6").playerProgression.sendPetHardCurrencyFunnelAdvancedEventIfApplicable(Q.l6.Rescue,ft.l.PetHardCurrencyImpression))}setOwnedCount(k){var B,U;null===(U=null===(B=this.gameObject)||void 0===B?void 0:B.isDestroyed)||void 0===U||U||wt.d.updateInjectedValues(this.gameObject,{OWNED_COUNT:q.Aq$.isDefined(k)?this._localizer.getText(k?"PET_RESCUE_OWNED_COUNT":"PET_RESCUE_NOT_OWNED",...k?[k]:[]):""})}fadeUi(k,B){return(0,V.sH)(this,void 0,void 0,(function*(){const U=this.uiContent.findComponent(bt.x);U.startTween(k,null!=B?B:U.targetComponent.getRootContainer().alpha),yield U.onComplete.asPromise()}))}updateWeaknessIcon(){const k=this._battleController.battleConstants;this._weaknessIcon.updateAsset(X._.Ui_battle_revamp_json,`icon-mini-element-${k.getElementalWeakness(this._data.element)}`)}setupMergeRankUi(){const k=this._data.teamId===W.ETeamId.Away,B=this._data.mergeRank;if(this.type!==et.uj.Pet)return;const U=void 0===B||B===it.qd.MIN,G={};U||(G[$.PetMergeRank]=B),k&&(G[$.PetMergeBadge]=Et.y.toInjectionParams({atlas:X._.Ui_battle_revamp_json,frame:`${F.PET_MERGE_BADGE_PREFIX}-purple`})),wt.d.updateInjectedValues(this.petMergeUi,G),this.petMergeUi.active=!U}setupIndicators(){this.updateWeaknessIcon(),this._creature.shouldShowLevel()?this._levelText.text=`${this._data.level}`:this._levelUi.active=!1,this.hpBar.setFromValues(this._data.health.current,this._data.health.max),this.mpBar.init(this._data.mp),this._data.teamId!==this._battleController.leftTeamId&&this.ultimatesUi&&this._battleController.type===et.gu.Ultimates&&this._questDataProvider.getCurrentQuestData().then((k=>{const B=nt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=k.find((k=>k.questID===B.ultimateQuestId)),F=Number(B.ultimateTaskId)>0?U.getTamingLevel()+1:1;this.ultimatesUi.init(F,this._data.nickname)})).catch(q.RQr.createHandler("Error initializing mythics taming progress UI")),this.processUnitShield(),this.setupMergeRankUi()}setupRarityDisplay(){if(this._rarityDisplay){const k=Math.min(this.hitbox.h,F.UNIT_RARITY_MAX_YSHIFT);this._rarityDisplay.GameObject.transform.setPositionY(-k)}}setupChargedLevels(){if(this._creature instanceof Bt.N&&this._creature.chargedLevel>0){const k=Ct.QT.MAX_NONMEMBER_CHARGED_LEVEL,B=this.gameObject.findComponent(q.bE_);this._levelText.text=`${this._creature.level+this._creature.chargedLevel}`,B.Container.rebind(At.m.ShowChargedLevels).toConstantValue(!0),B.Container.rebind(At.m.ChargedLevelAnimationTier).toConstantValue(this._creature.chargedLevel>=k?"max-charged":"charged"),this.gameObject.findComponentsInChildren(vt.B).forEach((k=>k.consume()))}}setupUnitTooltip(){this.unitTooltipPopupContainer=this._unitTooltipTrigger.findComponent(q.y4o).getRootContainer();const k=this.GameObject.transform.worldPosition;this._unitTooltipTrigger.transform.setPosition(k.x,k.y);const B=this._unitTooltipTrigger.findComponentInChildren(at.$),U=B.GameObject.transform;if(U.setPosition(this.hitbox.x,this.hitbox.y),U.setSizeDelta(this.hitbox.w,this.hitbox.h),B.onClick.removeAll(),B.onClick.add((()=>{this._battleController.onClickUnitTooltip(this.battleId)})),this.petRescueTooltip){const k=this.petRescueTooltip.findComponentInChildren(at.$);k.onClick.removeAll(),k.onClick.add((()=>{this._battleController.onClickUnitTooltip(this.battleId)}))}}updateHp(k){var B;const U=this._data.health.current;this._data.health.current=q.cj9.clamp(k,0,this.maxHp),this.hpBar.setFromValues(this._data.health.current,this._data.health.max,!0),null===(B=this._hpBarSequence)||void 0===B||B.triggerShake(this._data.health.current/this._data.health.max),this.onHpSet.dispatch(this._data.health.current,U)}updateMp(k){k===this.maxMp?this.refillMp():(this._data.mp.current=q.cj9.clamp(k,0,this.maxMp),this.mpBar.GameObject.active&&this.mpBar.updateMp(this._data.mp.current))}updateLevel(k){this._data.level=q.cj9.clamp(k,Ot.s.minLevel,Ot.s.activePlayerLevelCap),this._creature.shouldShowLevel()&&(this._levelText.text=`${this._data.level}`)}updatePetRescueTooltip(){if(!this.petRescueTooltip||!this.isARescuableUnit())return;this.petRescueTooltip.active=!0;const k=this.petRescueTooltip.findComponentInChildren(pt.s),B=this._battleController.isHighlightingRescue,U=this._battleController.isChoosingSpell,F=this._battleController.isPerformingAction,G=null!==this._battleController.selectedSpell,j=this._unitTooltipIsShowing;!this.isInARescuableState()||!U&&!B||F||G||j?(this.setNewIndicatorActive(!0),k.runOutTween()):(this.setNewIndicatorActive(!1),k.runInTween())}updateIdleStatusEffect(k=!1){if(!this._battleController.isChoosingSpell&&!k)return void this.hideIdleStatusEffect();const B=this.statusEffects.filter((k=>k.itemData.type===W.EStatusEffectType.DOT));if(0===B.length)return void this.hideIdleStatusEffect();const U=B[0];this._battleController.statusEffectAnimationController.queueAnimationAction(J.l[U.itemData.animationData.statusEffectPrefab],this._statusEffectContainer,gt.c.getIdleAnimation(U.remainingDuration),!0,this.size)}hideIdleStatusEffect(){this._battleController.statusEffectAnimationController.hideAnimationOfType(W.EStatusEffectType.DOT,this._statusEffectContainer)}updatePersistentStatusEffects(){const k=this.statusEffects.filter((k=>k.itemData.type===W.EStatusEffectType.Bomb));if(0===k.length)return void this.hideActivePersistentStatusEffect();const B=k.sort(((k,B)=>k.remainingDuration-B.remainingDuration))[0];this._battleController.statusEffectAnimationController.queueAnimationAction(J.l[B.itemData.animationData.statusEffectPrefab],this._statusEffectContainer,gt.c.getIdleAnimation(B.remainingDuration),!0,this.size)}hideActivePersistentStatusEffect(){this._battleController.statusEffectAnimationController.hideAnimationOfType(W.EStatusEffectType.Bomb,this._statusEffectContainer)}alertMpEmpty(){return(0,V.sH)(this,arguments,void 0,(function*(k=!1){return nt.q.instance.prodigy.audio.playSFXFromGUID(Z.B.Sfx_empty_mp),k?this.mpBar.alertMpEmptyAnimExtreme():this.mpBar.alertMpEmptyAnim()}))}onSelectSpell(k){k?this.mpBar.onSelectSpell(k.cost):this.mpBar.onSelectSpell(0)}processUnitShield(){this._unitShield&&(this._unitShield.active=this._data.type===et.uj.Titan)}refillMp(){this._data.mp.current=this.maxMp,this.mpBar.GameObject.active&&(nt.q.instance.prodigy.audio.playSFXFromGUID(Z.B.Sfx_mp_refilled),this.mpBar.refillMp())}playTeleport(k,B){return(0,V.sH)(this,arguments,void 0,(function*(k,B,U=!1){var F;const $=k===G.Entrance;this.controllerUnit&&(null===(F=this.controllerUnit)||void 0===F||F.playSummonAnimation(),yield q.Egh.timeout(500)),this.playTeleportAudio($),$||(yield this._creature.handleExit()),this._creature.visible=!$,this._teleportAnimator.GameObject.active=!0,this._teleportAnimator.playAnimation(k,!1,!0),this._teleportAnimator.spine.onEvent.add(((F,$)=>{switch($.data.name){case j.TransitionUnit:this._creature.visible=k===G.Entrance,this._unitTooltipTrigger.active=!this._battleController.isUnitTooltipLocked()&&k===G.Entrance,B&&k===G.Entrance&&(this.uiContent.active=!0,this.fadeUi(1).catch(q.RQr.createHandler("Error showing UI"))),U&&k===G.Entrance&&(this._healAnimation.GameObject.active=!0,this._healAnimation.OnAnimationComplete.addOnce((()=>this._healAnimation.GameObject.active=!1)),this._healAnimation.playAnimation(this._creature.teleportType===Lt.H0.ShadowBig?H.ApplyLarge:H.Apply,!1,!0),this._creature instanceof Bt.N&&this._creature.setFollowPosition());break;case j.TransitionUi:this.uiContent.active=k===G.Entrance,this._unitTooltipTrigger.active=!this._battleController.isUnitTooltipLocked()&&k===G.Entrance,this.ultimatesUi&&(this.ultimatesUi.GameObject.active=!1);break;case j.StoreParticleStart:{const k=this._storeParticleContainer.children[0];k&&(k.active=!0);break}}}),this),yield this._teleportAnimator.OnAnimationComplete.asPromise(),this._teleportAnimator.spine.onEvent.removeAll(this),this._teleportAnimator.GameObject.active=!1}))}playStoreTeleport(){return(0,V.sH)(this,void 0,void 0,(function*(){yield this.playTeleport(G.ExitToStore,!1)}))}playTeleportAudio(k){if(k)nt.q.instance.prodigy.audio.playSFXFromGUID(Z.B.Sfx_wizard_team_teleport);else{this._data.teamId===this._battleController.rightTeamId&&this._creature.teleportType===Lt.H0.Astral?nt.q.instance.prodigy.audio.playSFXFromGUID(Z.B.Sfx_teleport_rescue):nt.q.instance.prodigy.audio.playSFXFromGUID(Z.B.Sfx_teleport_defeat)}}createWaitingMessage(k,B,U){const F={MESSAGE:this._localizer.getText(B),TIMEOUT:U};if(this._waitingMessage)wt.d.updateInjectedValues(this._waitingMessage,F);else{const B=nt.q.instance.prodigy.gameContainer.get("d0e-64fd");this._waitingMessage=wt.d.loadWithInjectedValuesFromGUID(B,k,F,this.gameObject);const U=Math.max(this.gameObject.transform.worldPosition.y+this.hitbox.y,this._waitingMessage.transform.fullHeight);this._waitingMessage.transform.setPosition(0,U-this.gameObject.transform.worldPosition.y)}}hideWaitingMessage(){this._waitingMessage&&(this._waitingMessage.destroyDeferred(),this._waitingMessage=null)}showOpponentWaitingMessage(k){this.createWaitingMessage(J.l.DuelWaitingMessage,k)}showCasterWaitingMessage(k){this.createWaitingMessage(J.l.DuelTurnTimer,void 0,k);const B=this._waitingMessage.findComponentInChildren(yt.P);B.tweenValue(0),B.onComplete.addOnce((()=>this.onTurnTimerExpired.dispatch()))}updateLayerByPrefix(k){const B=`${k}${this.layerLevel}`;this.updateLayerByName(B)}updateLayerByName(k){this.GameObject.setLayer(k,!1),this.creature.creatureGameObject.setLayer(k,!0),this.statusEffectContainer.setLayer(k,!0),this.uiContent.setLayer(k,!0)}showAffix(k){return(0,V.sH)(this,void 0,void 0,(function*(){const B=this.affixes.find((B=>B.type===k.type));if(B)B.instances.push(k),this.updateAffixQuantity(B);else{const B=this.getAffixIcon(k),U=B?yield this.addAffixIcon(B):void 0;if(this.affixes.push({type:k.type,instances:[k],prefab:U}),k.type===W.EAffixType.Shield){const k=this.size===It.X.Huge?3:It.X?2:1;this.creature.addBarrier(Lt.HW.LegacySprite,null,0,0,k,k)}}}))}getAffixIcon(k){if(!(0,ut.G)(st.P))switch(k.type){case W.EAffixType.AdditiveDamageMultiplier:if(k.element){const B=F.ELEMENTAL_BUFF_ICONS[Array.isArray(k.element)?k.element[0]:k.element];if(B)return{atlas:X._.Ui_battle_revamp_json,frame:B}}break;case W.EAffixType.Revive:return tt.q.Effect_revive_mini;case W.EAffixType.Shield:return{atlas:X._.Ui_battle_revamp_json,frame:"icon-small-shield-titan"}}}addAffixIcon(k){return(0,V.sH)(this,void 0,void 0,(function*(){yield Et.y.loadAssets(k);const B=wt.d.loadWithInjectedValuesFromGUID(this.getInjectedValue("d0e-64fd"),J.l.VisibleAffixIcon,{ICON_GUID:Et.y.toInjectionParams(k)});return this.affixContainer.parent.active=!0,this.affixContainer.addChild(B),this.affixBackground.active=!0,B}))}updateAffixQuantity(k){if(!k.prefab)return;const B=k.instances.length;wt.d.updateInjectedValues(k.prefab,{NUMBER:B>1?`${B}`:""})}removeAffix(k){var B;let U=-1;const F=this.affixes.findIndex((B=>(U=B.instances.findIndex((B=>B.id===k)))>-1));if(F<0)return;const G=this.affixes[F];G.instances.splice(U,1),G.instances.length>0?this.updateAffixQuantity(G):(this.affixes.splice(F,1),null===(B=G.prefab)||void 0===B||B.destroy(),this.affixes.length<=0&&(this.affixContainer.parent.active=!1,this.affixBackground.active=!1,G.type===W.EAffixType.Shield&&(this.creature.breakBarrier(),this.creature.removeBarrier(!1))))}addStatusEffect(k){var B;const U=null===(B=ot.t.getItem("statusEffect",k.statusEffectId))||void 0===B?void 0:B.data;if(!U)throw new Error(`Status effect item data with ID ${k.statusEffectId} not found.`);const F=Object.assign(Object.assign({},k),{itemData:U});return this.statusEffects.push(F),this.updateDisplayedStatusEffects(),F}removeStatusEffect(k){const B=this.statusEffects.findIndex((B=>B.id===k));B>=0&&(this.statusEffects.splice(B,1),this.onStatusEffectsChanged.dispatch()),this._statusEffectIndicators.updateDisplayedEffects(this.statusEffects,this._data)}removeAllStatusEffects(){this.statusEffects.length>0&&(this.statusEffects.length=0,this.updateDisplayedStatusEffects(),this.updatePersistentStatusEffects())}modifyStatusEffect(k,B){const U=this.statusEffects.find((B=>B.id===k));if(U){const k=U.remainingDuration;U.remainingDuration=B,k!==B&&(this.onStatusEffectsChanged.dispatch(),this._statusEffectIndicators.updateDisplayedEffects(this.statusEffects))}}updateDisplayedStatusEffects(){this.onStatusEffectsChanged.dispatch(),this._statusEffectIndicators.updateDisplayedEffects(this.statusEffects,this.data)}showAsInteractive(k){const B=this._unitTooltipTrigger.findComponentInChildren(at.$);B&&(B.useHandCursor=k)}createUnitTooltipTrigger(){this._unitTooltipTrigger=new q._mx(this.GameObject);const k=this._unitTooltipTrigger.addComponent(q.XVE);k.setAnchorMin(0,0),k.setAnchorMax(1,1),k.setPivot(0,0),k.setPosition(0,0),this._unitTooltipTrigger.setLayer("unit-tooltip-input-bottom",!0),this._unitTooltipTrigger.addComponent(at.$)}};Ut.UNIT_TOOLTIP_HEIGHT_MAX=100,Ut.UNIT_RARITY_MAX_YSHIFT=150,Ut.PET_MERGE_BADGE_PREFIX="icon-pet-merge",Ut.SMALL_UNIT_SCALE_THRESHOLD=.6,Ut.ELEMENTAL_BUFF_ICONS={[W.EElementType.Fire]:"icon-mini-buff-fire",[W.EElementType.Ice]:"icon-mini-buff-ice",[W.EElementType.Physical]:"icon-mini-buff-physical",[W.EElementType.Plant]:"icon-mini-buff-plant",[W.EElementType.Storm]:"icon-mini-buff-storm",[W.EElementType.Water]:"icon-mini-buff-water"},(0,V.Cg)([(0,q.Cdj)("200-7dc0"),(0,V.Sn)("design:type",Object)],Ut.prototype,"_questDataProvider",void 0),(0,V.Cg)([(0,q.Cdj)("BattleController"),(0,V.Sn)("design:type",Function)],Ut.prototype,"_battleController",void 0),(0,V.Cg)([(0,q.Cdj)(q.$Bt.LocalizationService),(0,V.Sn)("design:type",q.dTp)],Ut.prototype,"_localizer",void 0),(0,V.Cg)([(0,q.Cdj)("GameDataProvider"),(0,V.Sn)("design:type",Dt.q)],Ut.prototype,"_gameDataProvider",void 0),(0,V.Cg)([(0,q.MnK)(Rt.Ri),(0,V.Sn)("design:type",Rt.Ri)],Ut.prototype,"targetComponent",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"_overlayParent",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"_characterRoot",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"uiContent",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"_newIndicator",void 0),(0,V.Cg)([(0,q.MnK)(_t.n),(0,V.Sn)("design:type",_t.n)],Ut.prototype,"_rescueCost",void 0),(0,V.Cg)([(0,q.MnK)(q.vYh),(0,V.Sn)("design:type",q.vYh)],Ut.prototype,"_weaknessIcon",void 0),(0,V.Cg)([(0,q.MnK)(q.EYj),(0,V.Sn)("design:type",q.EYj)],Ut.prototype,"_levelText",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"_levelUi",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"petMergeUi",void 0),(0,V.Cg)([(0,q.MnK)(ct.z),(0,V.Sn)("design:type",ct.z)],Ut.prototype,"hpBar",void 0),(0,V.Cg)([(0,q.MnK)(mt.j),(0,V.Sn)("design:type",mt.j)],Ut.prototype,"_hpBarSequence",void 0),(0,V.Cg)([(0,q.MnK)(Pt.e),(0,V.Sn)("design:type",Pt.e)],Ut.prototype,"mpBar",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"affixContainer",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"affixBackground",void 0),(0,V.Cg)([(0,q.MnK)(xt.M),(0,V.Sn)("design:type",xt.M)],Ut.prototype,"ultimatesUi",void 0),(0,V.Cg)([(0,q.MnK)(dt.j),(0,V.Sn)("design:type",dt.j)],Ut.prototype,"_teleportAnimatorAstral",void 0),(0,V.Cg)([(0,q.MnK)(dt.j),(0,V.Sn)("design:type",dt.j)],Ut.prototype,"_teleportAnimatorShadow",void 0),(0,V.Cg)([(0,q.MnK)(dt.j),(0,V.Sn)("design:type",dt.j)],Ut.prototype,"_teleportAnimatorShadowBig",void 0),(0,V.Cg)([(0,q.MnK)(dt.j),(0,V.Sn)("design:type",dt.j)],Ut.prototype,"_healAnimation",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"_statusEffectContainer",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"_unitShield",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"missedTurnX",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"_storeParticleContainer",void 0),(0,V.Cg)([(0,q.g11)(),(0,V.Sn)("design:type",Number)],Ut.prototype,"_storeTeleportPriority",void 0),(0,V.Cg)([(0,q.MnK)(Mt.Z),(0,V.Sn)("design:type",Mt.Z)],Ut.prototype,"_rarityDisplay",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"petRescueTooltip",void 0),(0,V.Cg)([(0,q.MnK)(Nt.m),(0,V.Sn)("design:type",Nt.m)],Ut.prototype,"_statusEffectIndicators",void 0),(0,V.Cg)([(0,Y.sg)(500),(0,V.Sn)("design:type",Function),(0,V.Sn)("design:paramtypes",[Boolean]),(0,V.Sn)("design:returntype",void 0)],Ut.prototype,"playTeleportAudio",null),Ut=F=(0,V.Cg)([(0,q.EVk)("BattleRevampUnit",ht.Y.battleRevamp)],Ut)},15160:(k,B,U)=>{"use strict";U.d(B,{F:()=>it});var F,G=U(8674),j=U(62459),$=U(62248),H=U(99625),V=U(35120),W=U(28152),q=U(16847),K=U(80060),z=U(43754),Y=U(13302),Q=U(13956),X=U(81531),Z=U(17710),J=U(21001),tt=U(35856),et=U(87490);let it=F=class extends j.uAl{constructor(){super(...arguments),this.onRescueCurrencyBalanceShown=new j.HN0,this.onRescueCurrencyBalanceHidden=new j.HN0,this._battleActions=[],this.battleTargets=[],this._currentActionData=null,this.onTargetConfirmed=new j.HN0,this.onActionChange=new j.HN0,this.onHardCurrencyBalanceTooltipHidden=new j.HN0}create(){this._battleActions=this.GameObject.findComponentsInChildren(J.y),this._battleActions.forEach(((k,B)=>{k.onActionSelected.add(this.processActionSelected.bind(this,B),this),k.onActionOnCooldownSelected.add(this.processActionOnCooldownSelected.bind(this,B))}))}initialize(){const k=this.getInjectedValue("d0e-64fd"),B=this.getInjectedValue(j.$Bt.LocalizationService);this.hideRescueUi(),this._spellTooltips=this._battleActions.map((U=>{var G,j,$;if(U.type===et.EBattleAction.RescuePet)return null;const V=U.getSpellData();if(!V)return null;const W=this._gameDataProvider.getItem("spellV2",V.spellId).data;if(!W)return null;const q=this._battleController.getActiveUnitSpellData(V.spellId),z=null!==(G=null==q?void 0:q.spellPower)&&void 0!==G?G:0,Y=null!==(j=null==q?void 0:q.spellAccuracy)&&void 0!==j?j:0,Q=null===($=W.flags)||void 0===$?void 0:$.find((k=>k.flag===et.ESpellFlag.ChangeHp)),X=this._spellLevelBonusConstants.getDisplaySpellPower(Q?Q.flagValue:z,!!Q),J=this._spellLevelBonusConstants.getDisplaySpellAccuracy(Y),tt=W.cooldown<0?B.getText("SPELL_COOLDOWN_NEVER"):0===W.cooldown?B.getText("SPELL_COOLDOWN_NONE"):`${W.cooldown}`,it=Z.D.getStatusEffectInjectedValues(W),st=K.d.loadWithInjectedValuesFromGUID(k,H.l.RevampSpellTooltip,Object.assign({TOOLTIP_IS_IN_COOLDOWN:V.currentCooldown>0,TOOLTIP_ELEMENT:W.element,TOOLTIP_NAME:W.name,TOOLTIP_POWER:X,TOOLTIP_ACCURACY:J,TOOLTIP_COOLDOWN:tt,TOOLTIP_SELECTED:!1},it),this._spellTooltipContainer);return st.transform.setPosition(0,F.SPELL_TOOLTIP_OFFSCREEN_Y),st})),this.battleTargets=this.GameObject.findComponentsInChildren(tt.Ri),this._battleController.getUnits().forEach((k=>{this.battleTargets.push(k.targetComponent)}));for(const U of this.battleTargets)U.onTargetSelected.removeAll(this),U.onTargetSelected.add(this.processTargetSelected,this);this._spellTooltipTweens=Array(this._spellTooltips.length).fill(void 0),this._rescueCurrencyBalance.GameObject.onActiveChanged.remove(this.onRescueCurrencyBalanceActiveChanged,this),this._rescueCurrencyBalance.GameObject.onActiveChanged.add(this.onRescueCurrencyBalanceActiveChanged,this),this._rescueCurrencyBalance.GameObject.onDestroy.remove(this.onRescueCurrencyBalanceDestroyed,this),this._rescueCurrencyBalance.GameObject.onDestroy.addOnce(this.onRescueCurrencyBalanceDestroyed,this)}onRescueCurrencyBalanceActiveChanged(){this._rescueCurrencyBalance.GameObject.active?this.onRescueCurrencyBalanceShown.dispatch():this.onRescueCurrencyBalanceHidden.dispatch()}onRescueCurrencyBalanceDestroyed(){this._rescueCurrencyBalance.GameObject.active&&this.onRescueCurrencyBalanceHidden.dispatch()}processActionSelected(k,B){var U,F,G;this._currentActionData=B;const j=B?this._gameDataProvider.getItem("spellV2",B.spellId).data:null,$=null===(U=null==j?void 0:j.target)||void 0===U?void 0:U.team,H=null===(F=null==j?void 0:j.target)||void 0===F?void 0:F.unit;this.onActionChange.dispatch(j);const V=this._battleController.rightTeam.rawUnits,W=(null==B?void 0:B.spellId)===this._battleController.battleConstants.rescueSpellId;this.setRescueIndicators(V,W);const q=()=>this._battleController.activeUnit.data.teamId===this._battleController.leftTeamId?this._battleController.activeUnit:null;for(const K of this.battleTargets){const k=()=>K.isMultiTarget?(H===et.ESpellUnitTarget.Team||H===et.ESpellUnitTarget.Random)&&K.targets.every((k=>k.size!==Y.X.Huge)):!K.isTargetDisabled()&&(H===et.ESpellUnitTarget.Single&&(!W||K.singleTarget.isInARescuableState())||H===et.ESpellUnitTarget.Self&&K.singleTarget===q()||H===et.ESpellUnitTarget.Ally&&K.singleTarget!==q()||(H===et.ESpellUnitTarget.Team||H===et.ESpellUnitTarget.Random)&&K.singleTarget.size===Y.X.Huge),U=()=>K.teamId===this._battleController.rightTeamId&&$===et.ESpellTeamTarget.Enemy||K.teamId===this._battleController.leftTeamId&&$===et.ESpellTeamTarget.Own,F=B&&k()&&U();let V=tt.Bp.Standard;if(j)if(null===(G=j.flags)||void 0===G?void 0:G.some((k=>k.flag===et.ESpellFlag.Rescue)))V=tt.Bp.Rescue;else if(K.teamId===this._battleController.leftTeamId)V=K.size===Y.X.Small?tt.Bp.AssistSmall:tt.Bp.Assist;else{const k=K.singleTarget;if(k)switch(this._battleController.battleConstants.getElementalAdvantage(j.element,k.data.element)){case et.EElementalAdvantage.Strong:V=tt.Bp.Effective;break;case et.EElementalAdvantage.Weak:V=tt.Bp.Ineffective}}K.updateTargetInteractive(F,V,null==j?void 0:j.element)}this.showTooltip(B,k,j)}setRescueIndicators(k,B){var U;let F;for(const G of k){if(!j.Aq$.isDefined(null===(U=null==G?void 0:G.creature)||void 0===U?void 0:U.id))continue;if(!(B&&G.isInARescuableState())){G.setRescueCost(!1),G.setOwnedCount(null);continue}const k=this._hardCurrency.petAcquisitionCost(G.creature.id,$.l6.Rescue);j.Aq$.isDefined(k)?(G.setRescueCost(!0,k.currency,k.value),null!=F||(F=k.currency)):(G.setRescueCost(!0,27,0),F=27);const H=this.getInjectedValue("306-5359").kennel.getPets().filter((k=>k.ID===G.creature.id)).length;G.setOwnedCount(H)}this.setHardCurrencyBalanceDisplay(B&&j.Aq$.isDefined(F)?{currency:F,value:this._hardCurrency.getBalance(F)}:null)}setHardCurrencyBalanceDisplay(k){var B;(null===(B=this._rescueCurrencyBalance)||void 0===B?void 0:B.GameObject)&&(j.Aq$.isDefined(k)?(this._rescueCurrencyBalance.GameObject.active=!0,this._rescueCurrencyBalance.updateCurrencyID(k.currency),this._rescueCurrencyBalance.updateAmount(k.value)):this._rescueCurrencyBalance.GameObject.active=!1)}processActionOnCooldownSelected(k,B){if(this._currentActionData=B,B){const U=this._gameDataProvider.getItem("spellV2",B.spellId).data;this.showTooltip(B,k,U)}}showTooltip(k,B,U){if(k&&this._spellTooltips[B]){this._spellTooltips[B].bringToFront();const G=0!==k.currentCooldown?F.SPELL_TOOLTIP_COOLDOWN_KEY:U.element;K.d.updateInjectedValues(this._spellTooltips[B],{TOOLTIP_SELECTED:!0,TOOLTIP_ELEMENT:G,TOOLTIP_IS_IN_COOLDOWN:0!==k.currentCooldown}),this.tweenTooltipToY(B,F.SPELL_TOOLTIP_ONSCREEN_Y)}this.dismissActionTooltips(B,k)}showHardCurrencyBalanceTooltip(k){const B=this._hardCurrency.petAcquisitionCost(k.id,$.l6.Rescue);if(!j.Aq$.isDefined(B))return;const U=this._hardCurrency.getBalance(B.currency);for(const F of this._battleController.rightTeam.rawUnits)F.creature===k&&F.setRescueCost(!0,B.currency,B.value,U);this._rescueCurrencyBalance.updateCurrencyID(B.currency),this._rescueCurrencyBalance.updateBudgetDifference(B.value-U)}dispatchOnHardCurrencyBalanceTooltipHidden(){this.onHardCurrencyBalanceTooltipHidden.dispatch()}dismissActionTooltips(k,B){for(let U=0;U{if(H){const B=q.percent+.4*Math.sin(q.percent*Math.PI);this._spellTooltips[k].transform.setPositionY(G+B*$)}else this._spellTooltips[k].transform.setPositionY(G+q.percent*$)})),K.onTweenComplete.addOnce((()=>{this._spellTooltips[k].transform.setPositionY(B)}))}processTargetSelected(k){this.onTargetConfirmed.dispatch(this._currentActionData,k)}targetRoulette(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const G=this.battleTargets.filter((B=>!B.isMultiTarget&&!B.isTargetDisabled()&&B.canBeTargetedBySpell(k,U.data.teamId)));if(G.length<=1)return;const j=B.targetComponent;G.forEach((k=>k.updateTargetInteractive(!1)));const $=(F.ROULETTE_SLOW_WAIT_TIME-F.ROULETTE_FAST_WAIT_TIME)/F.ROULETTE_ITERATIONS/(G.length-1);let H=F.ROULETTE_FAST_WAIT_TIME;for(let k=0;k{k.updateTargetInteractive(!1)}))}hideRescueUi(){var k;if(null===(k=this._battleController.rightTeam)||void 0===k?void 0:k.rawUnits)for(const B of this._battleController.rightTeam.rawUnits)B.setNewIndicatorActive(!1),B.setRescueCost(!1),B.setOwnedCount(null);this.setHardCurrencyBalanceDisplay(null)}destroy(){var k;if(this._battleActions)for(const B of this._battleActions)B.onActionSelected.remove(this.processActionSelected,this),B.onActionOnCooldownSelected.remove(this.processActionOnCooldownSelected,this);if(this._battleActions=null,this.battleTargets)for(const B of this.battleTargets)B.onTargetSelected.remove(this.processTargetSelected,this);if(this.battleTargets=null,this._spellTooltipTweens)for(const B of this._spellTooltipTweens)null==B||B.destroy();if(this.hideRescueUi(),null===(k=this._battleController.rightTeam)||void 0===k?void 0:k.rawUnits)for(const B of this._battleController.rightTeam.rawUnits)B.setRescueCost(!1),B.setOwnedCount(null);this._hardCurrency.onBalanceChanged.removeAll(this),this.onActionChange.dispose(),this.onTargetConfirmed.dispose(),this.onHardCurrencyBalanceTooltipHidden.dispose(),this.onRescueCurrencyBalanceShown.dispose(),this.onRescueCurrencyBalanceHidden.dispose(),super.destroy()}};it.SPELL_TOOLTIP_TWEEN_DURATION_OUT_MS=200,it.SPELL_TOOLTIP_TWEEN_DURATION_IN_MS=200,it.SPELL_TOOLTIP_OFFSCREEN_Y=150,it.SPELL_TOOLTIP_ONSCREEN_Y=-5,it.SPELL_TOOLTIP_COOLDOWN_KEY="cooldown",it.POWER_METER_SEGMENTS=10,it.ROULETTE_FAST_WAIT_TIME=75,it.ROULETTE_SLOW_WAIT_TIME=150,it.ROULETTE_FINAL_TARGET_WAIT_TIME=300,it.ROULETTE_ITERATIONS=4,(0,G.Cg)([(0,j.Cdj)("BattleController"),(0,G.Sn)("design:type",Function)],it.prototype,"_battleController",void 0),(0,G.Cg)([(0,j.Cdj)("5c7-e02d"),(0,G.Sn)("design:type",z.W)],it.prototype,"_hardCurrency",void 0),(0,G.Cg)([(0,j.Cdj)("GameDataProvider"),(0,G.Sn)("design:type",X.q)],it.prototype,"_gameDataProvider",void 0),(0,G.Cg)([(0,Q.b)("98d-7b90"),(0,G.Sn)("design:type",et.SpellLevelBonusConstants)],it.prototype,"_spellLevelBonusConstants",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],it.prototype,"_spellTooltipContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],it.prototype,"dismissalOverlayObject",void 0),(0,G.Cg)([(0,j.MnK)(q.n),(0,G.Sn)("design:type",q.n)],it.prototype,"_rescueCurrencyBalance",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],it.prototype,"onTargetConfirmed",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],it.prototype,"onActionChange",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],it.prototype,"onHardCurrencyBalanceTooltipHidden",void 0),it=F=(0,G.Cg)([(0,j.EVk)("BattleTargetController",W.Y.battleRevamp)],it)},35856:(k,B,U)=>{"use strict";U.d(B,{Bp:()=>G,Ri:()=>tt,fO:()=>j});var F,G,j,$=U(8674),H=U(87490),V=U(62459),W=U(68910),q=U(35120),K=U(35084),z=U(29834),Y=U(36045),Q=U(10670),X=U(13302),Z=U(28402),J=U(99979);!function(k){k.Standard="attack-idle",k.Effective="attack-weakness-idle",k.Ineffective="resist-idle",k.Assist="assist-idle",k.AssistSmall="assist-idle-small",k.Rescue="rescue-idle"}(G||(G={})),function(k){k.DownTarget="down-target",k.UpTarget="up-target",k.SelectTarget="select-target"}(j||(j={}));let tt=F=class extends V.uAl{constructor(){super(...arguments),this.isMultiTarget=!1,this.targets=[],this._unitHitboxes=[],this._size=X.X.Normal,this.onTargetSelected=new V.HN0}get singleTarget(){return 1===this.targets.length&&this.targets[0].data?this.targets[0]:null}get teamId(){var k,B;return null===(B=null===(k=this.targets.find((k=>k.data)))||void 0===k?void 0:k.data)||void 0===B?void 0:B.teamId}get size(){return this._size}set size(k){this._size=k;const B=F.TARGET_ELLIPSE_SIZES[k];this._groundTargetTransform.setSizeDelta(B.x,B.y)}postCreate(){super.postCreate(),this.configureTarget()}configureTarget(){this.size=this._size;const k=[...this._unitHitboxes];for(const B of this.targets)if(!B.creature||B.creature.isLoaded){if(B.data){const U=B.hitbox;if(this.isMultiTarget){const k=this.groundTarget.findComponentInChildren(K.n);if(k){k.onHoverEnterInputUp.add((()=>{B.targetComponent.setArrowVisible(!0)}));const U=()=>{B.targetComponent.setArrowVisible(!1)};k.onHoverExitInputUp.add(U),k.onInputUpOutside.add(U)}}else{const k=F.TARGET_INPUT_DATA[this._size];this._inputOverlayTransform.setSizeDelta(k.w,k.h),this._inputOverlayTransform.setPositionY(k.y),this._targetArrow.setPosition(0,U.y+F.ARROW_Y),this._targetArrow.worldPosition={x:this._targetArrow.worldPosition.x,y:Math.max(F.MIN_ARROW_Y,this._targetArrow.worldPosition.y)}}const G=k.pop();G&&(G.GameObject.findComponent(Y.X).Active=!0,G.setPosition(U.x,U.y),G.setSizeDelta(U.w,U.h))}}else B.creature.onLoaded.addOnce((()=>{this.configureTarget()}));for(const B of k)B.GameObject.findComponent(Y.X).Active=!1}sendTargetData(){var k;const B=this.targets[0].data.teamId===this._battleController.leftTeamId?(null===(k=this.singleTarget)||void 0===k?void 0:k.battleId)===this._battleController.activeUnit.battleId?Q.zA.Self:Q.zA.Ally:Q.zA.Enemy;q.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendBattleInterfaceClickedEvent({object_name:"Target",object_type:B}),this.onTargetSelected.dispatch(this)}updateTargetInteractive(k=!1,B=G.Standard,U){if(!this.isMultiTarget&&!this.singleTarget)return;const F=k&&this.canShowTargetUi();if(this._targetArrow.Active=!1,this._targetArrowElement.GameObject.active=!1,this.groundTarget.active=!1,F){this.groundTarget.active=!0;for(const k of this.groundTarget.children)k.active=!0}if(!this.isMultiTarget&&(this._targetArrow.GameObject.findComponent(z.j).playAnimation(B,!0),U&&(B===G.Effective||B===G.Ineffective))){const k=this._targetArrow.GameObject.findComponent(Z.v).getSpine(),B=J.gI.getElementIconTexture(U);if(B){const{width:U,height:F}=this._targetArrowElement.GameObject.transform.sizeDelta;k.pixiSpine.hackTextureBySlotName("targeting-arrow-element",B,new W.Rectangle(0,0,U,F))}}}setArrowVisible(k){const B=k&&this.canShowTargetUi();this._targetArrow.GameObject.active=B,this._targetArrow.GameObject.findComponent(z.j).seekTo(0)}playGroundTargetAnimation(k,B=!1){k===j.SelectTarget&&this._groundTargetSpineAnimator.OnAnimationComplete.addOnce((()=>{this._battleController.getUnits().forEach((k=>{k.targetComponent.groundTarget.active=!1}))})),this._groundTargetSpineAnimator.playAnimation(`${k}${F.TARGET_ANIMATION_SIZE_SUFFIXES[this._size]}`,B)}canShowTargetUi(){var k;return this.isMultiTarget||(null===(k=this.singleTarget)||void 0===k?void 0:k.isAlive())&&this.singleTarget.isTargetable}isTargetDisabled(){var k;return!(null===(k=this.singleTarget)||void 0===k?void 0:k.isTargetable)}canBeTargetedBySpell(k,B){switch(k){case H.ESpellTeamTarget.All:case H.ESpellTeamTarget.Any:return!0;case H.ESpellTeamTarget.Enemy:return B!==this.targets[0].data.teamId;case H.ESpellTeamTarget.Own:return B===this.targets[0].data.teamId}}highlightAndWait(k,B){return(0,$.sH)(this,void 0,void 0,(function*(){this.groundTarget.active=!0,this.setArrowVisible(!0),B&&this.playGroundTargetAnimation(B,!1),yield V.Egh.timeout(k),this.groundTarget.active=!1,this.setArrowVisible(!1)}))}destroy(){this.onTargetSelected.dispose(),super.destroy()}};tt.ARROW_Y=135,tt.MIN_ARROW_Y=210,tt.TARGET_ELLIPSE_SIZES={[X.X.Small]:{x:136,y:48},[X.X.Normal]:{x:260,y:95},[X.X.Medium]:{x:450,y:150},[X.X.Large]:{x:797,y:293},[X.X.Huge]:{x:797,y:293}},tt.TARGET_INPUT_DATA={[X.X.Small]:{x:0,y:32,w:136,h:250},[X.X.Normal]:{x:0,y:50,w:260,h:300},[X.X.Medium]:{x:0,y:75,w:450,h:400},[X.X.Large]:{x:0,y:150,w:800,h:550},[X.X.Huge]:{x:0,y:150,w:800,h:775}},tt.TARGET_ANIMATION_SIZE_SUFFIXES={[X.X.Small]:"-small",[X.X.Normal]:"-single",[X.X.Medium]:"-med",[X.X.Large]:"-aoe",[X.X.Huge]:"-aoe"},(0,$.Cg)([(0,V.vkK)(),(0,$.Sn)("design:type",Boolean)],tt.prototype,"isMultiTarget",void 0),(0,$.Cg)([(0,V.SZi)(),(0,V.MnK)("BattleRevampUnitComponent"),(0,$.Sn)("design:type",Array)],tt.prototype,"targets",void 0),(0,$.Cg)([(0,V.MnK)(V.dLy),(0,$.Sn)("design:type",V.dLy)],tt.prototype,"_targetArrow",void 0),(0,$.Cg)([(0,V.MnK)(V.vYh),(0,$.Sn)("design:type",V.vYh)],tt.prototype,"_targetArrowElement",void 0),(0,$.Cg)([(0,V.ERr)(),(0,$.Sn)("design:type",V._mx)],tt.prototype,"groundTarget",void 0),(0,$.Cg)([(0,V.MnK)(V.XVE),(0,$.Sn)("design:type",V.XVE)],tt.prototype,"_groundTargetTransform",void 0),(0,$.Cg)([(0,V.MnK)(z.j),(0,$.Sn)("design:type",z.j)],tt.prototype,"_groundTargetSpineAnimator",void 0),(0,$.Cg)([(0,V.MnK)(V.XVE),(0,$.Sn)("design:type",V.XVE)],tt.prototype,"_inputOverlayTransform",void 0),(0,$.Cg)([(0,V.SZi)(),(0,V.MnK)(V.XVE),(0,$.Sn)("design:type",Array)],tt.prototype,"_unitHitboxes",void 0),(0,$.Cg)([(0,V.Cdj)("BattleController"),(0,$.Sn)("design:type",Function)],tt.prototype,"_battleController",void 0),(0,$.Cg)([(0,V.gfw)(X.X),(0,$.Sn)("design:type",String),(0,$.Sn)("design:paramtypes",[String])],tt.prototype,"size",null),(0,$.Cg)([(0,V.bbQ)(),(0,$.Sn)("design:type",V.HN0)],tt.prototype,"onTargetSelected",void 0),tt=F=(0,$.Cg)([(0,V.EVk)("BattleTargetData")],tt)},83441:(k,B,U)=>{"use strict";U.d(B,{O:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(29834);let H=class extends G.uAl{get spineAnimator(){return this._spineAnimator}};(0,F.Cg)([(0,G.MnK)($.j),(0,F.Sn)("design:type",$.j)],H.prototype,"_spineAnimator",void 0),H=(0,F.Cg)([(0,G.EVk)("BattleUnitAnimatorRelay",j.Y.battleRevamp)],H)},89584:(k,B,U)=>{"use strict";U.d(B,{h:()=>st});var F,G,j,$,H,V=U(8674),W=U(87490),q=U(62459),K=U(88022),z=U(82351),Y=U(35120),Q=U(28152),X=U(29834),Z=U(53885),J=U(97518),tt=U(99979);!function(k){k.NORMAL_FILL="#FFFFFF",k.NORMAL_STROKE="#363636",k.MISS_FILL="#B2B2B2",k.MISS_STROKE="#363636",k.CRITICAL_FILL="#FFF540",k.CRITICAL_STROKE="#9C341A",k.EFFECTIVE_FILL="#FFF540",k.EFFECTIVE_STROKE="#9C341A",k.INEFFECTIVE_FILL="#A8E9FF",k.INEFFECTIVE_STROKE="#094E86",k.HEAL_FILL="#A0E772",k.HEAL_STROKE="#29484A",k.DODGE_FILL="#B2B2B2",k.DODGE_STROKE="#363636"}(G||(G={})),function(k){k.NORMAL_ANIM="damage-normal",k.MISS_ANIM="effect-miss",k.CRITICAL_ANIM="effect-critical",k.EFFECTIVE_ANIM="effect-powerful",k.INEFFECTIVE_ANIM="effect-resist",k.DODGE_ANIM="dodge"}(j||(j={})),function(k){k.INDICATOR_SLOT="indicator",k.DAMAGE_SLOT="damage",k.BACKING_SLOT="backing"}($||($={})),function(k){k.MISS_TEXT="BATTLE_REVAMP_TEXT_MISS",k.CRITICAL_TEXT="BATTLE_REVAMP_TEXT_CRITICAL",k.EFFECTIVE_TEXT="BATTLE_REVAMP_TEXT_EFFECTIVE",k.INEFFECTIVE_TEXT="BATTLE_REVAMP_TEXT_INEFFECTIVE",k.FUMBLE_TEXT="BATTLE_REVAMP_TEXT_FUMBLE",k.REFLECT_TEXT="BATTLE_REVAMP_TEXT_REFLECT",k.ABSORB_TEXT="BATTLE_REVAMP_TEXT_ABSORB",k.DODGE_TEXT="BATTLE_REVAMP_TEXT_DODGE"}(H||(H={}));const et={[W.EDamageInformation.Effective]:"spell-hit-powerful",[W.EDamageInformation.Ineffective]:"spell-hit-resist"},it={[W.EDamageInformation.Effective]:2,[W.EDamageInformation.Ineffective]:0};let st=F=class extends q.uAl{constructor(){super(...arguments),this._onAnimationComplete=new q.HN0,this._animationName=j.NORMAL_ANIM}postCreate(){super.postCreate(),this.GameObject.active=!1;const k=this._spineComponent.getSlot($.DAMAGE_SLOT),B=this._spineComponent.getSpine().getSlotContainer(k);this._damageText.GameObject.transform.setScale(1,-1),this._criticalObj.transform.setScale(1,-1),this._criticalHitBacking.transform.setScale(1,-1),this._criticalHitBackingLarge.transform.setScale(1,-1),B.addChild(this._groupRelayNumber.getRootContainer());const U=this._spineComponent.getSlot($.INDICATOR_SLOT),F=this._spineComponent.getSpine().getSlotContainer(U);this._indicatorSettings.GameObject.transform.setScale(1,-1),F.addChild(this._groupRelayIndicator.getRootContainer()),this._elementalDisplay.active=!1,this._groupRelayNumber.GameObject.active=!1,this._groupRelayIndicator.GameObject.active=!1}setupAndDisplay(k,B,U,$,V,K={}){var z,Y,Q,X;const{onlyShowDamageNumber:Z,onlyShowIndicator:J,deemphasizeIndicator:tt,suppressSfx:et}=K;this._transform.setPosition(k,B),this._damageText.text=Math.abs(U.damage).toString(),et||(Z?this.playHitInfoSfx(U):this._spineAnimator.spine.onEvent.addOnce((()=>this.playHitInfoSfx(U)),this)),q.OQO.areBitsSet(U.damageInformation,W.EDamageInformation.Reflected)?(this._animationName=j.EFFECTIVE_ANIM,this._indicatorText.setLocalizationKey(H.REFLECT_TEXT),this.setTextColor(G.INEFFECTIVE_FILL,G.INEFFECTIVE_STROKE),this._damageText.GameObject.active=!1):q.OQO.areBitsSet(U.damageInformation,W.EDamageInformation.Missed)?(this.setTextColor(G.MISS_FILL,G.MISS_STROKE),this._animationName=j.MISS_ANIM,this._indicatorText.setLocalizationKey(null!==(z=U.textKey)&&void 0!==z?z:H.MISS_TEXT),this._damageText.GameObject.active=!1):q.OQO.areBitsSet(U.damageInformation,W.EDamageInformation.Absorb)?(this._animationName=j.INEFFECTIVE_ANIM,this._indicatorText.setLocalizationKey(H.ABSORB_TEXT),this.setTextColor(G.HEAL_FILL,G.HEAL_STROKE)):q.OQO.areBitsSet(U.damageInformation,W.EDamageInformation.Heal)?(this.setTextColor(G.HEAL_FILL,G.HEAL_STROKE),this._animationName=j.NORMAL_ANIM,this._indicatorSettings.GameObject.parent.active=!1):q.OQO.areBitsSet(U.damageInformation,W.EDamageInformation.CriticalHit)?(this.setTextColor(G.CRITICAL_FILL,G.CRITICAL_STROKE),this._animationName=j.CRITICAL_ANIM,this._indicatorSettings.GameObject.active=!1,this._criticalObj.active=!0,this._damageText.text.length<3?this._criticalHitBacking.active=!0:this._criticalHitBackingLarge.active=!0):q.OQO.areBitsSet(U.damageInformation,W.EDamageInformation.Dodge)?(this.setTextColor(G.DODGE_FILL,G.DODGE_STROKE),Z?this._animationName=j.INEFFECTIVE_ANIM:(this._transform.setPositionY(B+F.DODGE_ANIMATION_OFFSET_Y),this._animationName=j.DODGE_ANIM,this._indicatorText.setLocalizationKey(H.DODGE_TEXT),this._indicatorText.localizedText.fontSize=F.DODGE_TEXT_SIZE,this._indicatorText.GameObject.transform.setPositionY(this._indicatorText.GameObject.transform.localPosition.y+F.DODGE_INDICATOR_TEXT_OFFSET_Y))):q.OQO.areBitsSet(U.damageInformation,W.EDamageInformation.Effective)?(this.showElementalDisplay(U,$),this._indicatorText.setLocalizationKey(null!==(Y=U.textKey)&&void 0!==Y?Y:H.EFFECTIVE_TEXT),this.setTextColor(G.EFFECTIVE_FILL,G.EFFECTIVE_STROKE),this._animationName=j.EFFECTIVE_ANIM):q.OQO.areBitsSet(U.damageInformation,W.EDamageInformation.Ineffective)?(this.showElementalDisplay(U,$),this._indicatorText.setLocalizationKey(null!==(Q=U.textKey)&&void 0!==Q?Q:H.INEFFECTIVE_TEXT),this.setTextColor(G.INEFFECTIVE_FILL,G.INEFFECTIVE_STROKE),this._animationName=j.INEFFECTIVE_ANIM):q.OQO.areBitsSet(U.damageInformation,W.EDamageInformation.Fumble)?(this._transform.setPositionY(B+F.FUMBLE_TEXT_OFFSET_Y),this.setTextColor(G.INEFFECTIVE_FILL,G.INEFFECTIVE_STROKE),this._animationName=j.INEFFECTIVE_ANIM,this._indicatorText.setLocalizationKey(null!==(X=U.textKey)&&void 0!==X?X:H.FUMBLE_TEXT),this._damageText.GameObject.active=!1):(this.setTextColor(G.NORMAL_FILL,G.NORMAL_STROKE),this._animationName=j.NORMAL_ANIM,this._indicatorSettings.GameObject.parent.active=!1),Z&&(this._indicatorText.GameObject.active=!1,this._criticalObj.active=!1,this._elementalDisplay.active=!1),J&&(this._damageText.GameObject.active=!1,this._criticalHitBacking.active=!1,this._criticalHitBackingLarge.active=!1),tt&&(this._indicatorText.localizedText.fontSize=20),this._spineAnimator.OnAnimationComplete.addOnce((()=>{this._spineAnimator.spine.onEvent.removeAll(this),null==V||V(),this._onAnimationComplete.dispatch()})),this.GameObject.active=!0,this.playAnim(),this._groupRelayIndicator.GameObject.active=!0,this._groupRelayNumber.GameObject.active=!0}setTextColor(k,B){this._damageText.fill=k,this._damageText.stroke=B,this._indicatorSettings.fill=k,this._indicatorSettings.stroke=B}playAnim(){this._spineAnimator.playAnimation(this._animationName,!1)}destroy(){this._onAnimationComplete.dispose(),super.destroy()}playHitInfoSfx(k){let B;if(q.OQO.areBitsSet(k.damageInformation,W.EDamageInformation.Reflected))B=z.B.Sfx_resist_hit;else{if(q.OQO.areBitsSet(k.damageInformation,W.EDamageInformation.Absorb))return;q.OQO.areBitsSet(k.damageInformation,W.EDamageInformation.CriticalHit)?B=z.B.Sfx_critial_hit:q.OQO.areBitsSet(k.damageInformation,W.EDamageInformation.Dodge)?B=z.B.Sfx_Dodge:q.OQO.areBitsSet(k.damageInformation,W.EDamageInformation.Effective)?B=z.B.Sfx_powerful_hit:q.OQO.areBitsSet(k.damageInformation,W.EDamageInformation.Ineffective)&&(B=z.B.Sfx_resist_hit)}B&&Y.q.instance.prodigy.audio.playSFXFromGUID(B)}showElementalDisplay(k,B){if(!B)return;this._elementalDisplay.active=!0;const U=tt.gI.getElementIconTexture(B);let F;this._elementalIcon.setTexture(U);const G=this._elementalIcon.GameObject.transform.localPosition.y;q.OQO.areBitsSet(k.damageInformation,W.EDamageInformation.Effective)?(F=et[W.EDamageInformation.Effective],this._elementalIcon.GameObject.transform.setPositionY(G+it[W.EDamageInformation.Effective])):q.OQO.areBitsSet(k.damageInformation,W.EDamageInformation.Ineffective)&&(F=et[W.EDamageInformation.Ineffective],this._elementalIcon.GameObject.transform.setPositionY(G+it[W.EDamageInformation.Ineffective]));const j=Y.q.instance.prodigy.game.cache.getTexture(K._.Ui_battle_revamp_json,F);this._damageEffectShield.setTexture(j),this._damageEffectShield.GameObject.transform.setSizeDelta(j.width,j.height)}};st.FUMBLE_TEXT_OFFSET_Y=50,st.DODGE_ANIMATION_OFFSET_Y=-90,st.DODGE_INDICATOR_TEXT_OFFSET_Y=-8,st.DODGE_TEXT_SIZE=28,(0,V.Cg)([(0,q.MnK)(q.XVE),(0,V.Sn)("design:type",q.XVE)],st.prototype,"_transform",void 0),(0,V.Cg)([(0,q.MnK)(q.v2j),(0,V.Sn)("design:type",q.v2j)],st.prototype,"_spineComponent",void 0),(0,V.Cg)([(0,q.MnK)(X.j),(0,V.Sn)("design:type",X.j)],st.prototype,"_spineAnimator",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],st.prototype,"_criticalHitBacking",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],st.prototype,"_criticalHitBackingLarge",void 0),(0,V.Cg)([(0,q.MnK)(q.EYj),(0,V.Sn)("design:type",q.EYj)],st.prototype,"_damageText",void 0),(0,V.Cg)([(0,q.MnK)(q.EYj),(0,V.Sn)("design:type",q.EYj)],st.prototype,"_indicatorSettings",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],st.prototype,"_criticalObj",void 0),(0,V.Cg)([(0,q.MnK)(J.R),(0,V.Sn)("design:type",J.R)],st.prototype,"_indicatorText",void 0),(0,V.Cg)([(0,q.MnK)(Z.u),(0,V.Sn)("design:type",Z.u)],st.prototype,"_groupRelayNumber",void 0),(0,V.Cg)([(0,q.MnK)(Z.u),(0,V.Sn)("design:type",Z.u)],st.prototype,"_groupRelayIndicator",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],st.prototype,"_elementalDisplay",void 0),(0,V.Cg)([(0,q.MnK)(q.vYh),(0,V.Sn)("design:type",q.vYh)],st.prototype,"_damageEffectShield",void 0),(0,V.Cg)([(0,q.MnK)(q.vYh),(0,V.Sn)("design:type",q.vYh)],st.prototype,"_elementalIcon",void 0),(0,V.Cg)([(0,q.bbQ)(),(0,V.Sn)("design:type",q.HN0)],st.prototype,"_onAnimationComplete",void 0),st=F=(0,V.Cg)([(0,q.EVk)("HitInfoController",Q.Y.battleRevamp)],st)},29143:(k,B,U)=>{"use strict";U.d(B,{e:()=>V});var F,G=U(8674),j=U(62459),$=U(28152),H=U(29834);let V=F=class extends j.uAl{constructor(){super(...arguments),this.mpAnimators=[],this._mpFxAnimators=[]}init(k){this._maxMp=k.max,this._currentMp=k.current,this._middlePoint=Math.round((k.max-1)/2),this.initEmptyMp(),this.updateIndicator(!0)}updateMp(k){this._currentMp=k,this.updateIndicator()}refillMp(){this.activateFx(),this._currentMp=this._maxMp,this._emptyMp.active=!1,this._mpFxAnimators.forEach(((k,B)=>{B{B===this._middlePoint?k.playAnimation("teal_pulse-overlay",!1,!0):k.GameObject.active=!1})),yield this._mpFxAnimators[this._middlePoint].OnAnimationComplete.asPromise(),j.Egh.timeout(F.ALERT_TIMER_MS)}))}alertMpEmptyAnimExtreme(){return(0,G.sH)(this,void 0,void 0,(function*(){this.activateFx();for(let k=0;k{U{B{this.updateIndicator()}),this),k.playAnimation("fx-full",!1))}))}updateIndicator(k=!1,B=0){const U=this._maxMp-this._currentMp;this.mpAnimators.forEach(((F,G)=>{G{k.active=B{"use strict";U.d(B,{Z:()=>q});var F=U(8674),G=U(62459),j=U(68910),$=U(17446),H=U(28152),V=U(29834);const W={[$.E.Uncommon]:"uncommon",[$.E.Rare]:"rare",[$.E.Heroic]:"heroic",[$.E.Legendary]:"legendary"};let q=class extends G.uAl{showRarity(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=W[k],U=G.Aq$.isDefined(B);if(this.GameObject.active=U,U){this._animator.playAnimation(B,!1,!0);const U=this.getRarityTextComponent(k);U&&(U.GameObject.active=!0,this.attachRarityTextToSlot(U)),yield this._animator.OnAnimationComplete.asPromise(),U&&(U.GameObject.active=!1)}}))}getRarityTextComponent(k){switch(k){case $.E.Uncommon:return this._uncommonText;case $.E.Rare:return this._rareText;case $.E.Heroic:return this._heroicText;case $.E.Legendary:return this._legendaryText;default:return null}}attachRarityTextToSlot(k){const B=k.getRootContainer(),U=this._animator.spine,F=U.getSlot("text"),G=U.getSpine().getSlotContainer(F);G.removeChildren();const $=G.addChild(new j.Container);$.scale.y=-1,$.addChild(B),$.position.set(.5*-B.width,.5*B.height)}};(0,F.Cg)([(0,G.MnK)(V.j),(0,F.Sn)("design:type",V.j)],q.prototype,"_animator",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],q.prototype,"_uncommonText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],q.prototype,"_rareText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],q.prototype,"_heroicText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],q.prototype,"_legendaryText",void 0),q=(0,F.Cg)([(0,G.EVk)("Rarity",H.Y.battleRevamp)],q)},72748:(k,B,U)=>{"use strict";U.d(B,{N:()=>H});var F=U(8674),G=U(62459),j=U(28829),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._unitsToHighlight=[]}destroy(){this._unitsToHighlight=[],super.destroy()}startSequence(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){0!==k.length&&(this._unitsToHighlight=k,this._overlay.setFocusLayer("overlay-top"),this.GameObject.active=!0,this.registerUnitsToFocus(),yield this._overlay.showOverlay(),this.showRescueAvailableLogMessage(B),yield this._overlay.playGlowAnimations(),yield this._overlay.hideOverlay(),B.GameObject.setLayer("overlay",!0),this.GameObject.active=!1)}))}showRescueAvailableLogMessage(k){k.GameObject.setLayer("overlay-top",!0),k.showMessage("BATTLE_REVAMP_RESCUE_AVAILABLE")}registerUnitsToFocus(){this._unitsToHighlight.forEach((k=>{var B,U,F;const j=k.creature.creatureGameObject,$=k.uiContent,H=null!==(F=null===(U=null===(B=k.petRescueTooltip)||void 0===B?void 0:B.findComponentInChildren(G.jsv))||void 0===U?void 0:U.GameObject)&&void 0!==F?F:null;this._overlay.addFocusableGameObject(j,void 0,!0,{applyGlow:!0}),this._overlay.addFocusableGameObject($,void 0,!0),H&&this._overlay.addFocusableGameObject(H)}))}};(0,F.Cg)([(0,G.MnK)(j.q),(0,F.Sn)("design:type",j.q)],H.prototype,"_overlay",void 0),H=(0,F.Cg)([(0,G.EVk)("RescueAvailableSequence",$.Y.battleRevamp)],H)},18278:(k,B,U)=>{"use strict";U.d(B,{b:()=>K});var F,G=U(8674),j=U(62459),$=U(35120),H=U(28152),V=U(90614),W=U(90351),q=U(15160);let K=F=class extends j.uAl{constructor(){super(...arguments),this.onUiReady=new j.HN0,this._initialCardXPositions=[]}destroy(){this.onUiReady.dispose(),this._tween&&(this._tween.stop().destroy(),this._tween=null),super.destroy()}tweenSpellCards(k,B=!0){k&&(this._spellCardsContainer.active=!0),this.inputBlocker.active=!0,this._spellCards||(this._spellCards=this._spellCardsContainer.children.slice(0,-1),this._spellCards.forEach(((k,B)=>{this._initialCardXPositions.push(this._spellCardsGrid.getLayoutPositionX(B))})));const U=this._spellCards.filter((k=>k.active));if(U.forEach(((B,U)=>{k?B.transform.setPositionX(0):B.transform.setPositionX(this._initialCardXPositions[U])})),0===U.length)return;const G=k?this._initialCardXPositions[U.length-1]:0,j=U.pop(),H={x:j.transform.localPosition.x};this._tween=$.q.instance.game.add.tween(H,this).to({x:G},this.getSlideDuration(U.length),W.K.getEasingFunctionFromEnum(W.i.ExponentialOut),!0,F.SPELL_CARD_SLIDE_DELAY_MS),this._tween.onUpdate.add((()=>{j.transform.setPositionX(H.x),U.forEach(((B,U)=>{k?0===B.transform.localPosition.x&&j.transform.localPosition.x>=this._initialCardXPositions[U]&&B.transform.setPositionX(this._initialCardXPositions[U]):B.active&&j.transform.localPosition.x<=this._initialCardXPositions[U]&&(B.active=!1)}))})),this._tween.onTweenComplete.addOnce((()=>{this._spellCardsGrid.updateAll(),$.q.instance.game.tweens.remove(this._tween),this._tween=null,k||this._spellCards.forEach((k=>{k.active=!1})),B&&(this.inputBlocker.active=!1),this.onUiReady.dispatch(k,!0)}))}getSpellCardAtIndex(k){var B,U,F;return this._spellCardsContainer?(null===(B=this._spellCardsContainer.children)||void 0===B?void 0:B[k])||j.VyI.log(`Spell card is undefined at index: ${k}`,j.$bb.Warning):j.VyI.log("Spell card container is undefined",j.$bb.Warning),null===(F=null===(U=this._spellCardsContainer)||void 0===U?void 0:U.children)||void 0===F?void 0:F[k]}getSpellCards(){var k;return this._spellCardsContainer||j.VyI.log("Spell card container is undefined",j.$bb.Warning),null===(k=this._spellCardsContainer)||void 0===k?void 0:k.children}hideSpellCards(){this._spellCardsContainer.active=!1,this.targetController.hideTargets()}getSlideDuration(k){switch(k){case 1:return 400;case 2:return 500;case 3:return 600;case 4:default:return 700}}hidePetRescue(){var k;(null===(k=this._petRescueTween.GameObject)||void 0===k?void 0:k.active)&&(this.inputBlocker.active=!0,this._petRescueTween.startTween())}};K.SPELL_CARD_SLIDE_DELAY_MS=100,(0,G.Cg)([(0,j.Cdj)("BattleController"),(0,G.Sn)("design:type",Function)],K.prototype,"controller",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],K.prototype,"_spellCardsContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],K.prototype,"inputBlocker",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],K.prototype,"petRescueCard",void 0),(0,G.Cg)([(0,j.MnK)(j.JTA),(0,G.Sn)("design:type",j.JTA)],K.prototype,"_spellCardsGrid",void 0),(0,G.Cg)([(0,j.MnK)(V.P),(0,G.Sn)("design:type",V.P)],K.prototype,"_petRescueTween",void 0),(0,G.Cg)([(0,j.MnK)(q.F),(0,G.Sn)("design:type",q.F)],K.prototype,"targetController",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],K.prototype,"onUiReady",void 0),K=F=(0,G.Cg)([(0,j.EVk)("SpellCardsController",H.Y.battleRevamp)],K)},88331:(k,B,U)=>{"use strict";U.d(B,{m:()=>V});var F=U(8674),G=U(62459),j=U(95891),$=U(28152),H=U(66840);let V=class extends G.uAl{create(){super.create(),this.updateDisplayedEffects([])}updateDisplayedEffects(k,B){var U;const F=(null!==(U=this._gridLayout.GameObject.children)&&void 0!==U?U:[]).map((k=>k.findComponent(H.D))).filter((k=>!!k));this._overflowIndicator.active=k.length>F.length,F.forEach((k=>{k.GameObject.active=!1}));(0,j.clone)(k).sort(((B,U)=>k.indexOf(U)-k.indexOf(B))).forEach(((k,U)=>{if(U{"use strict";U.d(B,{K:()=>X,W:()=>F});var F,G=U(8674),j=U(62459),$=U(68910),H=U(35120),V=U(28152),W=U(29834),q=U(70703),K=U(97518),z=U(33744),Y=U(46459),Q=U(28829);!function(k){k.Click="click",k.StraightIdle="straight-idle"}(F||(F={}));let X=class extends j.uAl{constructor(){super(...arguments),this.onDialogueDisplayComplete=new j.HN0}setDialogueTextKey(k,...B){this._nootDialogueLocalizationKey.localizationKey=k,this._nootDialogueLocalizationKey.setTextArguments(...B)}playNootWidgetIn(k=!0,B){k&&this._nootWidgetInAnimation.onComplete.addOnce((()=>{this.playFadeInDialogue(B)})),this._nootWidgetInAnimation.startTween()}playNootWidgetOut(){this._nootWidgetOutAnimation.startTween()}updateDialogue(k,B){this._panelOutAnimation.onComplete.addOnce((()=>{this.setDialogueTextKey(k),this.playFadeInDialogue(B)})),this.playFadeOutDialogue()}playFadeInDialogue(k){this._panelInAnimation.onComplete.addOnce((()=>{j.Aq$.isDefined(k)&&H.q.instance.prodigy.audio.playVoice(k,null),this.onDialogueDisplayComplete.dispatch()})),this._textInAnimation.startTween(),this._panelInAnimation.startTween()}playFadeOutDialogue(){this._textOutAnimation.startTween(),this._panelOutAnimation.startTween()}enableGuideHand(k=!0,B=F.Click,U=new $.Point(0,0),G=0){if(this.guideHandAnimator.GameObject.active=k,k){this.guideHandAnimator.playAnimation(B,!0,!0);const k=this.guideHandAnimator.GameObject.findComponentInChildren(j.XVE);k.worldPosition=U,k.setRotation(G)}else this.guideHandAnimator.stopAnimation()}setGuideHandLayer(k){const B=this.guideHandAnimator.GameObject.layer;return this.guideHandAnimator.GameObject.setLayer(k,!0),B}destroy(){this.onDialogueDisplayComplete.dispose(),super.destroy()}};(0,G.Cg)([(0,j.MnK)(z.N),(0,G.Sn)("design:type",z.N)],X.prototype,"overlayInputBlocker",void 0),(0,G.Cg)([(0,j.MnK)(K.R),(0,G.Sn)("design:type",K.R)],X.prototype,"_nootDialogueLocalizationKey",void 0),(0,G.Cg)([(0,j.MnK)(Y._),(0,G.Sn)("design:type",Y._)],X.prototype,"_nootWidgetInAnimation",void 0),(0,G.Cg)([(0,j.MnK)(Y._),(0,G.Sn)("design:type",Y._)],X.prototype,"_nootWidgetOutAnimation",void 0),(0,G.Cg)([(0,j.MnK)(q.x),(0,G.Sn)("design:type",q.x)],X.prototype,"_textInAnimation",void 0),(0,G.Cg)([(0,j.MnK)(q.x),(0,G.Sn)("design:type",q.x)],X.prototype,"_textOutAnimation",void 0),(0,G.Cg)([(0,j.MnK)(q.x),(0,G.Sn)("design:type",q.x)],X.prototype,"_panelInAnimation",void 0),(0,G.Cg)([(0,j.MnK)(q.x),(0,G.Sn)("design:type",q.x)],X.prototype,"_panelOutAnimation",void 0),(0,G.Cg)([(0,j.MnK)(W.j),(0,G.Sn)("design:type",W.j)],X.prototype,"guideHandAnimator",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],X.prototype,"dismissalOverlay",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],X.prototype,"onDialogueDisplayComplete",void 0),(0,G.Cg)([(0,j.MnK)(Q.q),(0,G.Sn)("design:type",Q.q)],X.prototype,"focusOverlay",void 0),X=(0,G.Cg)([(0,j.EVk)("TutorialController",V.Y.battleRevamp)],X)},99057:(k,B,U)=>{"use strict";U.d(B,{M:()=>V});var F,G=U(8674),j=U(62459),$=U(28152),H=U(29834);!function(k){k.InBattle="pulse",k.Unlock="idle",k.EndBattle="FULL"}(F||(F={}));let V=class extends j.uAl{init(k,B){this.GameObject.active=!0,this._friendshipLevel=k,this._heartAnimator.playAnimation(this.getAnimationName(F.InBattle),!0),this._name.text=B}battleWin(){return(0,G.sH)(this,void 0,void 0,(function*(){return this._heartAnimator.playAnimation(this.getAnimationName(F.Unlock),!1),yield this._heartAnimator.OnAnimationComplete.asPromise(),this._heartAnimator.playAnimation(this.getAnimationName(F.EndBattle),!0),j.Egh.timeout(200)}))}getAnimationName(k){return`Heart-${this._friendshipLevel}-${k}`}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],V.prototype,"_name",void 0),(0,G.Cg)([(0,j.MnK)(H.j),(0,G.Sn)("design:type",H.j)],V.prototype,"_heartAnimator",void 0),V=(0,G.Cg)([(0,j.EVk)("UltimatesUI",$.Y.battleRevamp)],V)},19176:(k,B,U)=>{"use strict";U.d(B,{$:()=>X});var F=U(8674),G=U(87490),j=U(62459),$=U(62248),H=U(88022),V=U(28628),W=U(35120),q=U(28152),K=U(66998),z=U(80060),Y=U(75935),Q=U(47215);let X=class extends j.uAl{constructor(){super(...arguments),this.onPetRescueButtonClicked=new j.HN0,this.onTooltipClosed=new j.HN0,this._unit=null}showTooltipForUnit(k){if(!k||this._unit)return void this.hideTooltip();this._unit=k,this._unitOriginalCreatureLayer=this._unit.creature.creatureGameObject.layer,this._headerModule.active=!0,this._background.active=!0;if(this._headerModule.findComponent(Q.u).setUnitInfo(this._unit),this._rescueModule.active=this._unit.isInARescuableState(),this._background.setLayer("unit-tooltip-input-bottom",!0),this._unit.updateLayerByName("unit-tooltip-input-bottom"),this._statusEffectsModule.active=this._unit.statusEffects.length>0,this._statusEffectsModule.active){this._statusEffectsModule.findComponent(Y.k).displayEffects(this._unit.statusEffects,this._unit.data)}const B=this._unit.data.teamId===G.ETeamId.Home?230:-230;this._tooltipObject.transform.worldPosition={x:this._unit.hpBar.GameObject.transform.worldPosition.x+B,y:this._unit.GameObject.transform.worldPosition.y},this.updateActiveTooltip(),this._inOutAnimation.runInTween(),this.ensureOnScreen()}updateActiveTooltip(){this._unit&&(this.updateInjectedValues(),this._unit.unitTooltipIsShowing=!0)}updateInjectedValues(){var k,B,U,F,G,j,q,K;const Y=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player,Q=Y.kennel.getPets().filter((k=>{var B;return k.ID===(null===(B=this._unit)||void 0===B?void 0:B.creature.id)})).length,X=W.q.instance.prodigy.gameContainer.get("5c7-e02d"),Z=(null===(k=this._unit)||void 0===k?void 0:k.type)===V.uj.Pet?X.petAcquisitionCost(null===(B=this._unit)||void 0===B?void 0:B.creature.id,$.l6.Rescue):void 0,J=!(null==Z?void 0:Z.value)||0===Z.value;let tt="";(null===(U=this._unit)||void 0===U?void 0:U.isInARescuableState())&&(tt=J?this._baseLocalizer.getText("ITEMCARD_FREE"):null===(F=null==Z?void 0:Z.value)||void 0===F?void 0:F.toString());const et=X.isHardCurrencyMemberLocked(null==Z?void 0:Z.value),it=J||X.canAfford(Z),st=Y.canPurchaseMembershipInGame(),nt=!it&&st||!J&&et;z.d.updateInjectedValues(this._tooltipObject,{PET_RESCUE_OWNED_COUNT:Q,UNIT_TOOLTIP_NAME:null!==(j=null===(G=this._unit)||void 0===G?void 0:G.data.nickname)&&void 0!==j?j:null===(q=this._unit)||void 0===q?void 0:q.name,UNIT_TOOLTIP_RESCUE_COST:nt?"":tt,UNIT_TOOLTIP_RESCUE_SHOW_MC:!nt&&!J,UNIT_TOOLTIP_RESCUE_SHOW_MEMBER:nt,UNIT_TOOLTIP_AFFINITY:[H._.Ui_battle_revamp_json,`icon-mini-element-${null===(K=this._unit)||void 0===K?void 0:K.data.element}`]})}dispatchPetRescueButtonClicked(){var k;(null===(k=this._unit)||void 0===k?void 0:k.isInARescuableState())&&this.onPetRescueButtonClicked.dispatch(this._unit)}hideTooltip(){this._unit&&(this._unit.updateLayerByName(this._unitOriginalCreatureLayer),this._unit.unitTooltipIsShowing=!1,this._unit.updatePetRescueTooltip(),this._inOutAnimation.runOutTween(),this.onTooltipClosed.dispatch(),this.onPetRescueButtonClicked.dispose()),this._unit=null}moveOffScreen(){this._tooltipObject.transform.worldPosition={x:-1e3,y:-1e3}}destroy(){this.onPetRescueButtonClicked.dispose(),this.onTooltipClosed.dispatch(),this.onTooltipClosed.dispose(),super.destroy()}ensureOnScreen(){if(!this._unit)return;const k=this._tooltipObject.transform,B=W.q.instance.prodigy.game.height,U=this._tooltipObject.findComponent(j.hQi);U.onResizeComplete.addOnce((()=>{const U=this._tooltipObject.findComponent(j.jsv),F=U.getRootContainer().getBounds().top,G=U.getRootContainer().getBounds().bottom;if(F<0)k.worldPosition={x:k.worldPosition.x,y:k.worldPosition.y-F};else if(G>B){const U=G-B;k.worldPosition={x:k.worldPosition.x,y:k.worldPosition.y-U}}})),U.sizeToChildren()}};(0,F.Cg)([(0,j.ERr)(),(0,F.Sn)("design:type",j._mx)],X.prototype,"_tooltipObject",void 0),(0,F.Cg)([(0,j.ERr)(),(0,F.Sn)("design:type",j._mx)],X.prototype,"_background",void 0),(0,F.Cg)([(0,j.ERr)(),(0,F.Sn)("design:type",j._mx)],X.prototype,"_headerModule",void 0),(0,F.Cg)([(0,j.ERr)(),(0,F.Sn)("design:type",j._mx)],X.prototype,"_statusEffectsModule",void 0),(0,F.Cg)([(0,j.ERr)(),(0,F.Sn)("design:type",j._mx)],X.prototype,"_rescueModule",void 0),(0,F.Cg)([(0,j.MnK)(K.s),(0,F.Sn)("design:type",K.s)],X.prototype,"_inOutAnimation",void 0),(0,F.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,F.Sn)("design:type",j.dTp)],X.prototype,"_baseLocalizer",void 0),X=(0,F.Cg)([(0,j.EVk)("UnitInfoTooltip",q.Y.battleRevamp)],X)},47215:(k,B,U)=>{"use strict";U.d(B,{u:()=>q});var F=U(8674),G=U(62459),j=U(88022),$=U(17446),H=U(35120),V=U(28152),W=U(80060);let q=class extends G.uAl{constructor(){super(...arguments),this._commonRarityGameObjects=[],this._uncommonRarityGameObjects=[],this._rareRarityGameObjects=[],this._heroicRarityGameObjects=[],this._legendaryRarityGameObjects=[],this._unit=null}setUnitInfo(k){var B;this._unit&&(this._unit.unitTooltipIsShowing=!1,this._unit.updatePetRescueTooltip()),this._unit=k,this.updateActiveTooltip(),this.updateRarityDisplay(null===(B=this._unit)||void 0===B?void 0:B.data.rarity),this.updateRectTransform()}getActiveTransform(){const k=this._elementName.active?this._elementName:this._elementNameRarity.active?this._elementNameRarity:this._elementNameRarityOwned.active?this._elementNameRarityOwned:void 0;return null==k?void 0:k.transform}updateRectTransform(){if(!this._unit)return;const k=this.getActiveTransform();if(k){const B=this.GameObject.transform;B&&B.setSizeDelta(k.sizeDelta.width,k.sizeDelta.height)}}updateRarityDisplay(k){G.Aq$.isDefined(k)&&(this._commonRarityGameObjects.forEach((B=>B.active=k===$.E.Common)),this._uncommonRarityGameObjects.forEach((B=>B.active=k===$.E.Uncommon)),this._rareRarityGameObjects.forEach((B=>B.active=k===$.E.Rare)),this._heroicRarityGameObjects.forEach((B=>B.active=k===$.E.Heroic)),this._legendaryRarityGameObjects.forEach((B=>B.active=k===$.E.Legendary)))}updateActiveTooltip(){if(!this._unit)return;const k=this._unit.isARescuableUnit(),B=G.Aq$.isDefined(this._unit.data.rarity);this._elementName.active=!k&&!B,this._elementNameRarity.active=!k&&B,this._elementNameRarityOwned.active=k&&B,this.updateInjectedValues(),this._unit.unitTooltipIsShowing=!0}updateInjectedValues(){var k,B,U,F;const G=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPets().filter((k=>{var B;return k.ID===(null===(B=this._unit)||void 0===B?void 0:B.creature.id)})).length;W.d.updateInjectedValues(this.gameObject,{PET_RESCUE_OWNED_COUNT:G,UNIT_TOOLTIP_NAME:null!==(B=null===(k=this._unit)||void 0===k?void 0:k.data.nickname)&&void 0!==B?B:null===(U=this._unit)||void 0===U?void 0:U.name,UNIT_TOOLTIP_AFFINITY:[j._.Ui_battle_revamp_json,`icon-mini-element-${null===(F=this._unit)||void 0===F?void 0:F.data.element}`]})}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],q.prototype,"_elementName",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],q.prototype,"_elementNameRarity",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],q.prototype,"_elementNameRarityOwned",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],q.prototype,"_commonRarityGameObjects",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],q.prototype,"_uncommonRarityGameObjects",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],q.prototype,"_rareRarityGameObjects",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],q.prototype,"_heroicRarityGameObjects",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],q.prototype,"_legendaryRarityGameObjects",void 0),q=(0,F.Cg)([(0,G.EVk)("UnitInfoTooltipHeader",V.Y.battleRevamp)],q)},91631:(k,B,U)=>{"use strict";U.d(B,{W:()=>$});var F=U(62459),G=U(35120),j=U(88022);class $ extends F.mcf{constructor(k,B=0,U=0,F=1,H=1){super();const V=G.q.instance.prodigy.create;this._barrierSprite=V.sprite(0,0,j._.Boss_titan_barrier_json,"1",{x:.5,y:.5},(k=>this.addBarrierSpritesheet("deflect",[1,2,3,4,5,6,7,8,9,10],k))),this._breakSprite=V.sprite(0,0,j._.Boss_titan_barrier_break_json,"1",{x:.5,y:.5},(k=>this.addBarrierSpritesheet("break",[1,2,3,4,5,6,7,8,9,10],k))),this._sparkSprite=V.sprite($.SPARK_POSITION.x,$.SPARK_POSITION.y,j._.Boss_titan_spark_json,"1",{x:.5,y:.5},(k=>this.addBarrierSpritesheet("spark",[1,2,3],k))),this.addChild(this._barrierSprite,this._breakSprite,this._sparkSprite),this.position.set(B,U),this.scale.set(F,H),k.addChild(this)}addBarrierSpritesheet(k,B,U){U.alpha=0,U.name=k,U.smoothed=!1;U.animations.add(k,B,10,!1).onComplete.add((()=>{U.alpha=0}),U)}playHitAnimation(){this._barrierSprite.animations.stop(),this._sparkSprite.animations.stop(),this._barrierSprite.alpha=1,this._sparkSprite.alpha=1,this._barrierSprite.animations.play("deflect",10),this._sparkSprite.animations.play("spark",10)}playBreakAnimation(){this._breakSprite.alpha=1,this._sparkSprite.alpha=1,this._breakSprite.animations.play("break",10),this._sparkSprite.animations.play("spark",10)}}$.SPARK_POSITION={x:-165,y:19}},38340:(k,B,U)=>{"use strict";U.d(B,{H:()=>z});var F=U(8674),G=U(62459),j=U(99625),$=U(56942),H=U(29834),V=U(13956),W=U(34234),q=U(13302),K=U(63761);class z extends K.cw{setData(k,B,U){const G=Object.create(null,{setData:{get:()=>super.setData}});return(0,F.sH)(this,void 0,void 0,(function*(){var F;yield G.setData.call(this,k,B,U),this.hitbox.w<=z.SMALL_CREATURE_WIDTH_MAXIMUM||(1===(null===(F=this._battleController.getTeamById(k.teamId))||void 0===F?void 0:F.units.length)?this.size=q.X.Large:this.size=q.X.Medium)}))}createRenderables(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this._prefabLoader.loadWithDependenciesFromGUID(j.l.AnimatedSpineCreature,U);this._creatureGameObject=k,k.active=!1;const F=k.findComponentInChildren(H.j);return this._animator=F,yield new Promise((k=>{F.spine.setAsset(z.getBossSpineId(B.metadata.assets,B.ID),k)})),k}))}static getBossSpineId(k,B){var U,F;return G.Aq$.isDefined(null===(U=k.battle)||void 0===U?void 0:U.assetKey)?$.Q[k.battle.assetKey]:"spine"===(null===(F=k.default)||void 0===F?void 0:F.type)&&k.default.assetKey?$.Q[k.default.assetKey]:`default-boss-${B}`}}z.defaultSize=q.X.Large,z.SMALL_CREATURE_WIDTH_MAXIMUM=200,(0,F.Cg)([(0,W.d)("BattleController"),(0,F.Sn)("design:type",Function)],z.prototype,"_battleController",void 0),(0,F.Cg)([(0,V.b)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],z.prototype,"_prefabLoader",void 0)},39674:(k,B,U)=>{"use strict";U.d(B,{j:()=>Y});var F=U(8674),G=U(62459),j=U(1195),$=U(13956),H=U(80060),V=U(37773),W=U(97317),q=U(65732),K=U(41935),z=U(63761);class Y extends z.cw{createRenderables(k,B,U){const j=Object.create(null,{createRenderables:{get:()=>super.createRenderables}});return(0,F.sH)(this,void 0,void 0,(function*(){var F;if(this.isOpponent){const B="number"==typeof k.asset.id?k.asset.id:parseInt(k.asset.id);this._loggedInPlayer.player.encounters.addToPetTimesBattled(B)}const $=yield j.createRenderables.call(this,k,B,U);return k.petGear&&(null===(F=$.findComponentInChildren(K.o))||void 0===F||F.updateGear(Object.assign({},k.petGear)).catch(G.RQr.createHandler("Unable to update pet gear"))),H.d.updateInjectedValues($,{[q.E.ChargedCreatureEffectTier]:V.e.getChargedLevelTierFromLevel(k.chargedLevel),[q.E.ChargedCreatureEffectDisplayType]:k.chargedLevel>0?W.X$.IDLE:W.X$.HIDDEN}),$}))}}(0,F.Cg)([(0,$.b)("e20-0fb0"),(0,F.Sn)("design:type",j.E)],Y.prototype,"_loggedInPlayer",void 0)},63761:(k,B,U)=>{"use strict";U.d(B,{HW:()=>j,H0:()=>G,cw:()=>nt});var F,G,j,$=U(8674),H=U(62459),V=U(35120),W=U(21492),q=U(29834),K=U(51315),z=U(93833),Y=U(13956),Q=U(34234),X=U(54950),Z=U(13302),J=U(81531),tt=U(83441),et=U(91631),it=U(28402);!function(k){k.Activate="activate",k.Deactive="deactive",k.Hit="hit",k.Idle="idle"}(F||(F={}));class st{constructor(k,B,U=0,G=0,j=1,$=1){this._barrierGameObject=new H._mx(k);const V=this._barrierGameObject.addComponent(H.dLy);V.setPosition(V.localPosition.x+U,V.localPosition.y+G),V.setScale(j,$);const W=this._barrierGameObject.addComponent(it.v);this._barrierAnimator=W.GameObject.addComponent(q.j),W.setAsset(B,(()=>{this._barrierAnimator.OnAnimationComplete.addOnce((()=>{this._barrierAnimator.playAnimation(F.Idle,!0)})),this._barrierAnimator.playAnimation(F.Activate,!1)}))}playHitAnimation(){this._barrierAnimator.OnAnimationComplete.addOnce((()=>{this._barrierAnimator.playAnimation(F.Idle,!0)})),this._barrierAnimator.spine&&this._barrierAnimator.playAnimation(F.Hit,!1)}playBreakAnimation(){this._barrierAnimator.OnAnimationComplete.addOnce((()=>{this.destroy()})),this._barrierAnimator.playAnimation(F.Deactive,!1)}destroy(){var k,B;null===(k=this._barrierAnimator)||void 0===k||k.destroy(),null===(B=this._barrierGameObject)||void 0===B||B.destroy(),this._barrierGameObject=null}}!function(k){k.Astral="astral",k.Shadow="shadow",k.ShadowBig="shadowBig",k.None="none",k.Immediate="immediate"}(G||(G={})),function(k){k.LegacySprite="legacySprite",k.Spine="spine"}(j||(j={}));class nt{constructor(){this._fadeAnimation=null,this.shouldFadeOnDefeat=!0,this.castSpellSfx=null,this.isLoaded=!1,this.onLoaded=new H.HN0,this.ran=!1}get creatureGameObject(){return this._creatureGameObject}get rootContainer(){return this._rootContainer}get animator(){return this._animator}get visible(){return this._creatureGameObject.active}set visible(k){this._creatureGameObject.active=k}get barrier(){return this._barrier}setData(k,B,U){return(0,$.sH)(this,void 0,void 0,(function*(){var F,G,j,$,V,W,q,K,Y,Q,X,J,tt;const et=k.asset,it=et?this._gameDataProvider.getItem(et.type,et.id):null;et&&(this.id="number"==typeof et.id?et.id:parseInt(et.id),this.name=H.Aq$.isDefined(it.data.nameKey)?this._localizer.getText(it.data.nameKey):it.data.name),this.nickname=k.nickname,this.isOpponent=k.teamId!==this._leftTeamId,this.teleportType=U,this.level=k.level,this.chargedLevel=null!==(F=k.chargedLevel)&&void 0!==F?F:0,this._rootContainer=B.findComponent(z.$).rootContainer,this._creatureGameObject=yield this.createRenderables(k,it,B),this.isOpponent&&this.flip(),H.Aq$.isDefined(null===($=null===(j=null===(G=null==it?void 0:it.metadata)||void 0===G?void 0:G.assets)||void 0===j?void 0:j.battle)||void 0===$?void 0:$.shouldFadeOnDefeat)&&(this.shouldFadeOnDefeat=null===(q=null===(W=null===(V=null==it?void 0:it.metadata)||void 0===V?void 0:V.assets)||void 0===W?void 0:W.battle)||void 0===q?void 0:q.shouldFadeOnDefeat),H.Aq$.isDefined(null===(Q=null===(Y=null===(K=null==it?void 0:it.metadata)||void 0===K?void 0:K.assets)||void 0===Y?void 0:Y.battle)||void 0===Q?void 0:Q.castSpellSfx)&&(this.castSpellSfx=null===(tt=null===(J=null===(X=null==it?void 0:it.metadata)||void 0===X?void 0:X.assets)||void 0===J?void 0:J.battle)||void 0===tt?void 0:tt.castSpellSfx),this.addAnimationRemaps(it),this._creatureGameObject.setLayer(B.layer,!0),this.idle(),this.size=Z.X.Normal,this.recalculateHitbox(),this.isLoaded=!0,this.onLoaded.dispatch()}))}createRenderables(k,B,U){return(0,$.sH)(this,void 0,void 0,(function*(){var F,G,j,$,H;const V=this._prefabAppearanceLoader.loadAppearancePrefab(k.asset.type,k.asset.id,U);V.active=!1;const W=null!==(G=null===(F=B.metadata.assets.default)||void 0===F?void 0:F.battleScale)&&void 0!==G?G:1;return V.transform.setScale(W,W),this._animator=null!==(H=null!==($=null===(j=V.findComponentInChildren(tt.O))||void 0===j?void 0:j.spineAnimator)&&void 0!==$?$:V.findComponentInChildren(q.j))&&void 0!==H?H:V.findComponentInChildren(K.K),V}))}addAnimationRemaps(k){var B,U,F;if(this._animator instanceof q.j&&k){const G=this._animator.spine,j=null===(F=null===(U=null===(B=k.metadata)||void 0===B?void 0:B.assets)||void 0===U?void 0:U.battle)||void 0===F?void 0:F.animations;(null==j?void 0:j.idle)&&G.addAnimationRemap("idle",null==j?void 0:j.idle),(null==j?void 0:j.attack)&&G.addAnimationRemap("attack",null==j?void 0:j.attack),(null==j?void 0:j.defeat)&&G.addAnimationRemap("defeat",null==j?void 0:j.defeat)}}addBarrier(k,B,U=0,F=0,G=1,$=1){switch(k){case j.LegacySprite:this._barrier=new et.W(this._rootContainer,U,F,G,$);break;case j.Spine:H.Aq$.isDefined(B)&&(this._barrier=new st(this._creatureGameObject,B,U,F,G,$))}}removeBarrier(k=!0){var B;k&&(null===(B=this._barrier)||void 0===B||B.destroy()),this._barrier=null}get width(){return this._rootContainer.width}get height(){return this._rootContainer.height}get worldScale(){return this._creatureGameObject.transform.worldScale}get worldPosition(){return this._creatureGameObject.transform.worldPosition}get hitbox(){return this._hitbox}destroy(){this.onLoaded.dispose(),this._fadeAnimation&&(V.q.instance.game.tweens.remove(this._fadeAnimation),this._fadeAnimation=null)}fadeOut(){return(0,$.sH)(this,arguments,void 0,(function*(k=nt.FADE_OUT_TIME_MS){this._fadeAnimation=V.q.instance.game.add.tween(this._rootContainer,this,!0).to({alpha:0},k,H.GS3.Quadratic.In,!0),yield this._fadeAnimation.onTweenComplete.asPromise()}))}fadeIn(){return(0,$.sH)(this,arguments,void 0,(function*(k=nt.FADE_OUT_TIME_MS){this._rootContainer.alpha=0,this._fadeAnimation=V.q.instance.game.add.tween(this._rootContainer,this,!0).to({alpha:1},k,H.GS3.Quadratic.In,!0),yield this._fadeAnimation.onTweenComplete.asPromise()}))}flip(){this._creatureGameObject.transform.setScale(-this._creatureGameObject.transform.localScale.x,this._creatureGameObject.transform.localScale.y)}idle(){this._animator.playAnimation("idle",!0)}attack(){this._animator instanceof q.j&&this._animator.OnAnimationComplete.addOnce((()=>{this.idle()})),this._animator.playAnimation("attack",!1)}summon(){this.attack()}defeated(){return(0,$.sH)(this,void 0,void 0,(function*(){this.breakBarrier(),this._animator instanceof q.j&&this._animator.hasAnimation("defeat")&&(this._animator.playAnimation("defeat",!1),yield this._animator.OnAnimationComplete.asPromise()),this.shouldFadeOnDefeat&&(yield this.fadeOut())}))}breakBarrier(){var k;null===(k=this._barrier)||void 0===k||k.playBreakAnimation()}hurt(){var k;null===(k=this._barrier)||void 0===k||k.playHitAnimation()}walk(){this._animator.playAnimation("walk",!0)}levelUp(){this._animator.playAnimation("attack",!1)}shouldShowLevel(){return!0}recalculateHitbox(){const k=this.visible;this.visible=!0;const B=this._rootContainer.getBounds();this.visible=k,this._hitbox={x:B.x-this._rootContainer.worldTransform.tx,y:B.y-this._rootContainer.worldTransform.ty,w:B.width,h:B.height}}getNameFromAppearance(k){if(!k)return;const B=k.name;if(!H.Aq$.isDefined(B))return;if("string"==typeof B)return this._localizer.getText(B);return this.getNameResolver(B).getName()}getNameResolver(k){const B=V.q.instance.prodigy.gameContainer.resolve(W.C);return B.initFromProtobuf(k),B}handleExit(){return(0,$.sH)(this,void 0,void 0,(function*(){}))}handleEnter(){}}nt.defaultSize=Z.X.Normal,nt.FADE_OUT_TIME_MS=2e3,(0,$.Cg)([(0,Q.d)("LeftTeamId"),(0,$.Sn)("design:type",String)],nt.prototype,"_leftTeamId",void 0),(0,$.Cg)([(0,Y.b)("b2a-9519"),(0,$.Sn)("design:type",X.S)],nt.prototype,"_prefabAppearanceLoader",void 0),(0,$.Cg)([(0,Y.b)(H.$Bt.LocalizationService),(0,$.Sn)("design:type",H.dTp)],nt.prototype,"_localizer",void 0),(0,$.Cg)([(0,Q.d)("GameDataProvider"),(0,$.Sn)("design:type",J.q)],nt.prototype,"_gameDataProvider",void 0)},83269:(k,B,U)=>{"use strict";U.d(B,{B:()=>et});var F=U(28628),G=U(38340),j=U(8674),$=U(62459),H=U(29834),V=U(28402),W=U(63761);class q extends W.cw{get animator(){return this._animator}setData(k,B,U){const F=Object.create(null,{setData:{get:()=>super.setData}});return(0,j.sH)(this,void 0,void 0,(function*(){this._spineGuid=`${k.asset.id}`,this.name=this.getNameFromAppearance(k.appearance),yield F.setData.call(this,Object.assign(Object.assign({},k),{asset:null}),B,U)}))}createRenderables(k,B,U){return(0,j.sH)(this,void 0,void 0,(function*(){const k=new $._mx(U);k.active=!1,k.addComponent($.dLy);const B=k.addComponent(V.v);return yield new Promise((k=>B.setAsset(this._spineGuid,k))),this._animator=k.addComponent(H.j),k}))}idle(){this._animator.hasAnimation("idle")&&super.idle()}attack(){this._animator.hasAnimation("attack")&&super.attack()}}var K=U(39674),z=U(99625),Y=U(56942),Q=U(13956),X=U(13302),Z=U(91631);class J extends W.cw{setData(k,B,U){const F=Object.create(null,{setData:{get:()=>super.setData}});return(0,j.sH)(this,void 0,void 0,(function*(){yield F.setData.call(this,k,B,U),this.size=X.X.Huge}))}createRenderables(k,B,U){return(0,j.sH)(this,void 0,void 0,(function*(){const k=B.metadata.assets.battle,F=yield this._prefabLoader.loadWithDependenciesFromGUID(z.l.AnimatedSpineCreature,U);this._barrier=new Z.W(this._rootContainer,J.BARRIER_DATA.offset.x,J.BARRIER_DATA.offset.y,J.BARRIER_DATA.scale.x,J.BARRIER_DATA.scale.y),this._animator=F.findComponentInChildren(H.j);const G=Y.Q[k.assetKey],j=F.findComponentInChildren($.v2j);return F.transform.setScale(1.75,1.75),yield new Promise((k=>{j.setAsset(G,k)})),j.getSpine().transform.scale.set(1,1),F}))}addAnimationRemaps(k){super.addAnimationRemaps(k),this._animator.spine.addAnimationRemap("defeat","knockout")}shouldShowLevel(){return!1}defeated(){return(0,j.sH)(this,void 0,void 0,(function*(){this._barrier.playBreakAnimation(),this._animator.playAnimation("defeat",!1),yield this._animator.OnAnimationComplete.asPromise()}))}}J.defaultSize=X.X.Huge,J.BARRIER_DATA={offset:{x:-60,y:-60},scale:{x:2.4,y:2.4}},(0,j.Cg)([(0,Q.b)("d0e-64fd"),(0,j.Sn)("design:type",$.wNP)],J.prototype,"_prefabLoader",void 0);var tt=U(92611);class et{static getUnitContainer(k){switch(k){case F.uj.Titan:return J;case F.uj.Boss:return G.H;case F.uj.Wizard:return tt.N;case F.uj.Object:return q;case F.uj.Pet:default:return K.j}}}},92611:(k,B,U)=>{"use strict";U.d(B,{N:()=>at});var F,G=U(8674),j=U(62459),$=U(99625),H=U(32389),V=U(35120),W=U(77938),q=U(129),K=U(63115),z=U(64889),Y=U(99737),Q=U(41538),X=U(75777),Z=U(76277),J=U(44357),tt=U(24521),et=U(23029);!function(k){k.hearts="hearts",k.damage="damage"}(F||(F={}));class it{static getRevampLabelForAffix(k){const B=V.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);switch(k.type){case F.hearts:return B.getText("PLAYER_CARD_REVAMP_HEALTH_BONUS");case F.damage:return B.getText("PLAYER_CARD_REVAMP_POWER_BONUS");default:return""}}static getRevampBonusForLegacyAffix(k){const B=et.R.loadData(tt.r.BattleRevampConstants_json).battleConstants.equipmentModifierBaseValues;if(!k.valuePercent)return 0;switch(k.type){case F.hearts:return Math.round(k.amount*B.health);case F.damage:return Math.round(k.amount*B.power)}}static getTotalRevampHealthBonusFromAffixes(k){return k.reduce(((k,B)=>{const U=W.t.getItem("affix",B).data;let G=k;return U.type===F.hearts&&(G+=this.getRevampBonusForLegacyAffix(U)),G}),0)}static isFollowContainer(k){return void 0!==k.stopMoving&&void 0===k.setup}static isFollowSpineContainer(k){return void 0!==k.stopMoving&&void 0!==k.setup}static isPet(k){return void 0!==k.createDog&&void 0!==k.createCat}static isLegacyGameObject(k){return void 0!==k.handleGameObjectDestroy&&void 0!==k.visible}}var st=U(28080),nt=U(63761);class at extends nt.cw{constructor(){super(...arguments),this._scale=1}setData(k,B,U){const F=Object.create(null,{setData:{get:()=>super.setData}});return(0,G.sH)(this,void 0,void 0,(function*(){var G,j;this._scale=B.transform.localScale.y,yield F.setData.call(this,Object.assign(Object.assign({},k),{asset:null}),B,U),this.id="number"==typeof(null===(G=k.asset)||void 0===G?void 0:G.id)?k.asset.id:Number.parseInt(null===(j=k.asset)||void 0===j?void 0:j.id),this.name=this.getNameFromAppearance(k.appearance)}))}getNameResolver(k){const B=super.getNameResolver(k);return this.isOpponent||B.setFallbackName(V.q.instance.prodigy.gameContainer.get("e20-0fb0").loginCredentials.username),B}createRenderables(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){var B,F;const G=new q.a(V.q.instance.game);G.appearance.init(Object.assign(Object.assign({},k.appearance),{name:void 0}));const $=this.isOpponent&&!(0,Z.G)(H.q).enabled?Object.assign(Object.assign({},k.equipment),{costume:void 0}):k.equipment;G.equipment.init($),k.appearance.morph&&G.setData({playerTransformation:{transformType:k.appearance.morph.type,transformID:k.appearance.morph.ID}}),G.data.level=k.level;const W=j.Aq$.isDefined(k.chargedLevel)&&k.chargedLevel>0;G.data.chargedLevelData={chargedLevelsEnabled:W,chargedLevel:null!==(B=k.chargedLevel)&&void 0!==B?B:0,chargedLevelCap:null!==(F=k.chargedLevel)&&void 0!==F?F:0,chargedLevelXpForCurrentLevel:0,chargedLevelXpRequiredForNextLevel:0,chargedLevelCumulativeXp:0,hasReceivedFreeChargedLevel:!0,newLevelData:{levelsGained:[],startingLevelRelativeXp:0,xpGained:0},recuperableLevels:0,recuperableXp:0,costToKeepLevels:0,daysUntilLevelDecay:0,lastVisited:(new Date).toISOString()};const Y=yield st.D.createWizardObject(G,!1);Y.active=!1,U.addChild(Y),this._animation=Y.findComponentInChildren(z.$);const Q=Y.findComponentInChildren(K.T);return Q&&(Q.transformationChecker=this,Q.updateMountAppearance()),this.renderFollowContainer(G,U),Y}))}renderFollowContainer(k,B){const U=k.equipment.getFollow();if(at.FOLLOW_MORPH_MARBLE_BLACKLIST.includes(U))return;const F=W.t.getItem("follow",U);if(!F)return;this.followContainer=V.q.instance.prodigy.create.follow(this._rootContainer,F.ID,1,null,at.WIZARD_FOLLOW_OFFSET_X,at.WIZARD_FOLLOW_OFFSET_Y);const G=V.q.instance.prodigy.gameContainer.get("d0e-64fd"),j=Object.keys(F.data.stats).find((k=>F.data.stats[k]>0)),H={power:$.l.BuddyParticlePower,defence:$.l.BuddyParticleDefence,speed:$.l.BuddyParticleSpeed,hp:$.l.BuddyParticleHp};this._followParticles=G.loadFromGUID(H[j],B),this._followParticles.transform.setPosition(at.WIZARD_FOLLOW_OFFSET_X,at.WIZARD_FOLLOW_OFFSET_Y),this._followParticles.active=!1,(this.followContainer instanceof Y.z||this.followContainer instanceof Q.g||this.followContainer instanceof X.i)&&this.followContainer.startLoad()}setFollowPosition(k,B){this.followContainer&&this.followContainer.transform.position.set(null!=k?k:at.WIZARD_FOLLOW_OFFSET_X,null!=B?B:at.WIZARD_FOLLOW_OFFSET_Y)}idle(){this._animation.changeState(4)}attack(){this._animation.changeState(2)}summon(){this._animation.changeState(3)}walk(){this._animation.changeState(1)}levelUp(){this._animation.changeState(5)}recalculateHitbox(){const k=at.WIZARD_WIDTH*this._scale,B=at.WIZARD_HEIGHT*this._scale;this._hitbox={x:-k>>1,y:-B,w:k,h:B}}isTransformed(){return this._animation.isTransformed()}set visible(k){this._creatureGameObject.active=k,this.followContainer&&(this.followContainer.visible=k)}flip(){super.flip(),this.followContainer&&(it.isLegacyGameObject(this.followContainer)||it.isPet(this.followContainer)?(this.followContainer.transform.position.x=-this.followContainer.transform.position.x,this.followContainer.transform.scale.x=-this.followContainer.transform.scale.x):(it.isFollowContainer(this.followContainer)||it.isFollowSpineContainer(this.followContainer))&&(this.followContainer.x=-this.followContainer.x,this.followContainer.scale.x=-this.followContainer.scale.x))}handleExit(){return(0,G.sH)(this,void 0,void 0,(function*(){this.followContainer&&(yield(0,J.Qx)(this,this.followContainer,{x:0,y:0,duration:1e3,ease:j.GS3.Linear.None}))}))}handleEnter(k=2e3){this.followContainer&&(this._followParticles.active=!0,V.q.instance.game.time.events.addTimer(k,(()=>{this._followParticles.active=!1}),this),V.q.instance.game.add.tween(this.followContainer,this,!0).to({alpha:1},k/4,j.GS3.Quadratic.In,!0))}}at.WIZARD_HEIGHT=115,at.WIZARD_WIDTH=120,at.WIZARD_FOLLOW_OFFSET_X=-100,at.WIZARD_FOLLOW_OFFSET_Y=-80,at.FOLLOW_MORPH_MARBLE_BLACKLIST=[234,232,199,218]},65725:(k,B,U)=>{"use strict";U.d(B,{R:()=>X,V:()=>Q});var F=U(8674),G=U(99625),j=U(28628),$=U(57797),H=U(8394),V=U(65240),W=U(35120),q=U(96535),K=U(65050),z=U(13956),Y=U(60155);const Q=["currency","gold","item","pet"];class X extends Y.V{getUnitDataForTeam(k,B){var U;const F=this._activePlayer.daily,G=super.getUnitDataForTeam(k,B),H=G.find((k=>{var B,U;return k.asset.id===(null===(U=null===(B=F.getDailyBattleEncounter($.je.Boss))||void 0===B?void 0:B.boss)||void 0===U?void 0:U.ID)}));if(H){const k=null!==(U=H.slot)&&void 0!==U?U:j.Ie.FrontBottom;G.forEach((B=>{B.slot===j.Ie.BackMiddle&&B.asset.id!==H.asset.id&&(B.slot=k)})),H.slot=j.Ie.BackMiddle}return G}showBattleResult(k,B,U,j){const $=Object.create(null,{showBattleResult:{get:()=>super.showBattleResult}});return(0,F.sH)(this,arguments,void 0,(function*(k,B,U,F,j=!0){var H,q;if(!j)return;const z=null===(q=null===(H=W.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig())||void 0===H?void 0:H.festivalDailyData)||void 0===q?void 0:q.bossBattleRouletteData;let Y=[],Q=[{type:"currency",ID:1,N:50}];z&&(Y=this.processRewards(z.items),Q=this.processRewards(z.fallbackItems)),yield new Promise((k=>{W.q.instance.prodigy.open.bossRewards(Y,K.N.FestivalDailyBossRouletteSpin,G.l.BossRewardUIwithnorespin,void 0,Q,k,void 0,void 0,void 0,{instanceId:this._activePlayer.daily.getFestivalInstanceName(),sourceType:V.C.FestivalBossLootWheel})})),yield $.showBattleResult.call(this,k,B,U,F,j)}))}processRewards(k){let B=k.map((k=>Object.assign(Object.assign({},k),{isSecure:(0,H.p)(k.type,k.ID)})));return B=B.filter((k=>Q.includes(k.type)||this._activePlayer.getItemCount(k.type,k.ID)<=0)),B}}X.FESTIVAL_DAILY_BOSS_BATTLE_ID="festivalDailyBoss",(0,F.Cg)([(0,z.b)("306-5359"),(0,F.Sn)("design:type",q.W)],X.prototype,"_activePlayer",void 0)},73032:(k,B,U)=>{"use strict";U.d(B,{o:()=>j});var F=U(8674),G=U(62459);class j{constructor(){this.onPostBattleExpressModeComplete=new G.HN0}get isEnabled(){return this._isEnabled}get hasStarted(){return this._isEnabled&&G.Aq$.isDefined(this._postBattleFlowManager)}enable(k){return(0,F.sH)(this,void 0,void 0,(function*(){this._isEnabled=!0,G.Aq$.isDefined(this._postBattleFlowManager)?this.start(k):this._message=k}))}start(k){this._postBattleFlowManager.enableExpressMode(k)}setPostBattleFlowManager(k){G.Aq$.isDefined(this._postBattleFlowManager)||(this._postBattleFlowManager=k,this._postBattleFlowManager.OnDestroy.addOnce((()=>{this._isEnabled&&this.onPostBattleExpressModeComplete.dispatch()})),this._isEnabled&&this.start(this._message))}destroy(){this.onPostBattleExpressModeComplete.dispose()}}},60155:(k,B,U)=>{"use strict";U.d(B,{Y:()=>le,V:()=>be});var F=U(8674),G=U(87490),j=U(62459),$=U(95891),H=U.n($),V=U(88022),W=U(82351),q=U(85855),K=U(24521),z=U(99625),Y=U(51742),Q=U(36648),X=U(40671),Z=U(56942),J=U(60035),tt=U(28628),et=U(62886),it=U(46701),st=U(73678),nt=U(15821),at=U(35120),rt=U(34829),ot=U(23029),ht=U(77938),ct=U(37465),dt=U(73797),lt=U(16495),ut=U(34603),ft=U(71857),bt=U(36279),pt=U(43531),vt=U(23082),gt=U(81617),mt=U(76277),yt=U(65050),_t=U(41674),Et=U(67665),wt=U(15485),Tt=U(46784),St=U(70703),At=U(2224),Ct=U(98400),Ot=U(13956),It=U(34234),Dt=U(42430),Rt=U(3583),Pt=U(17425),Mt=U(60985),Nt=U(44094),xt=U(50084),Lt=U(86283),kt=U(94393),Bt=U(71796),Ut=U(78365),Ft=U(68788),Gt=U(56718),jt=U(13302),$t=U(21001),Ht=U(64019),Vt=U(15160),Wt=U(83441),qt=U(72748),Kt=U(18278),zt=U(19176),Yt=U(63761),Qt=U(81531),Xt=U(58203),Zt=U(60668),Jt=U(95807);class te extends Jt.Z{constructor(k){super(),this.callback=k}enter(){this.callback()}}var ee=U(52516),ie=U(63046),se=U(43503);class ne extends Jt.Z{constructor(k){super(),this._storedSegmentData=k,this.nextState=this.nextState.bind(this)}enter(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.battleController.type===tt.gu.NormalRiftRun){const k=yield se.L.canResumeRiftRun(),B=j.wa5.getActiveScene().container.get("NetworkHandler");if(!k)return void(yield Promise.all([se.L.resetRiftRunProgressAndTeleportToDragonIsle(null),B.clearBattleState()]))}this.battleController.onResumeBattle().then((()=>{this.sendBattleResumeSegmentData(),this.nextState()})).catch((k=>{j.RQr.logError(k,"Error resuming a battle"),this.stateMachine.showThrownErrorDialog(k)}))}))}nextState(){this.stateMachine.goToState(ie.B)}sendBattleResumeSegmentData(){const k=this.stateMachine.getStartOrResumeSegmentData();this.stateMachine.segment.battleRevamp.sendBattleResumedEvent(Object.assign({battle_id:this.battleController.battleId,battle_type:this.stateMachine.segment.battleRevamp.getSegmentBattleType(this.stateMachine.battleType),battle_variant:this.stateMachine.segment.battleRevamp.getBattleVariant(this.stateMachine.battleType,k.variantData),battle_difficulty:k.difficulty,player_team_size:this.stateMachine.homeTeam.units.length,enemy_team_size:this.stateMachine.awayTeam.units.length,resumedData:this._storedSegmentData},k.instance))}}var ae,re,oe=U(37987),he=U(21945),ce=U(60604),de=U(73032);!function(k){k.SmallActivate="activate-player-small",k.SmallIdle="idle-player-small",k.SmallDeactivate="deactivate-player-small",k.NormalActivate="activate-player",k.NormalIdle="idle-player",k.NormalDeactivate="deactivate-player",k.LargeActivate="activate-boss",k.LargeIdle="idle-boss",k.LargeDeactivate="deactivate-boss"}(ae||(ae={})),function(k){k.ConcurrentPlay="animation-concurrent-play"}(re||(re={}));const le={delay:200,duration:1600,bgStartScale:.95,bgEndScale:1,fgStartScale:.82,fgEndScale:1},ue=[Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.FrontBottom],Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.FrontTop],Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.BackMiddle],Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.FrontMiddle],Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.Middle]],fe=[Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.FrontBottom],Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.FrontTop],Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.FrontMiddle],Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.BackMiddle],Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.Middle]];class be{get isAnsweringQuestion(){return this._isAnsweringQuestion}get isChoosingSpell(){return this._isChoosingSpell}get isPerformingAction(){return this._isPerformingAction}get isHighlightingRescue(){return this._isHighlightingRescue}get prefabRoot(){return this._prefabRoot}get spellRoot(){return this._spellRoot}getAssetList(){return this._baseAssets}get statusEffectAnimationController(){return this._statusEffectAnimationController||(this._statusEffectAnimationController=new Rt.c),this._statusEffectAnimationController}get battleConstants(){return this._battleConstants}get leftTeamId(){return G.ETeamId.Home}get rightTeamId(){return G.ETeamId.Away}get activeUnit(){return this._activeUnit}set activeUnitSpellData(k){this._activeUnitSpellData=k}get battleBackgroundFX(){return this._battleBackgroundFX}getSpellComponentById(k){return this._spellComponents.get(k)}getBattlePrefab(){return z.l.RevampBattleScene}getActiveUnitSpellData(k){var B;return null===(B=this._activeUnitSpellData)||void 0===B?void 0:B.find((B=>B.spellId===k))}constructor(k){var B;this.allowVideoLessons=!0,this.selectedSpell=null,this._isAnsweringQuestion=!1,this._isChoosingSpell=!1,this._isPerformingAction=!1,this._isHighlightingRescue=!1,this._baseAssets=[Y.c.Sfx_bar_fill,Y.c.Sfx_results_screen,Y.c.Sfx_battle,q.V.Bgm_victory,q.V.Bgm_battle,Z.Q.Spine_xpbar_json,Z.Q.Spine_character_shine_json,V._.Ui_battle_revamp_json,V._.Ui_battle_revamp_legacy_json,Q.q.Particle_petstore_orb_1,Q.q.Particle_petstore_1,Q.q.Battle_interstitial_bg,W.B.Sfx_critial_hit,W.B.Sfx_Dodge,W.B.Sfx_empty_mp,W.B.Sfx_fumble_poof,W.B.Sfx_heal,W.B.Sfx_mp_refilled,W.B.Sfx_powerful_hit,W.B.Sfx_resist_hit,W.B.Sfx_spell_card_hover,W.B.Sfx_spell_card_select,W.B.Sfx_teleport_defeat,W.B.Sfx_teleport_rescue,W.B.Sfx_unit_select,W.B.Sfx_vs_animation,W.B.Sfx_wizard_team_teleport,W.B.Sfx_unit_buff_positive,Y.c.Sfx_qi_button_default,Y.c.Sfx_qi_button_disabled,Y.c.Sfx_qi_positive_action,Y.c.Sfx_qi_negative_action],this._stateMachinePromise=new j.bnh,this.postBattleExpressModeController=new de.o,this._spellCardBattleActionData=[],this._battleTargetControllerComponent=null,this.onChoosingSpell=new j.HN0,this.onSpellCardSelected=new j.HN0,this.onSpellCardUnselected=new j.HN0,this.onSpellTargetChosen=new j.HN0,this.onSpellCardsRemoved=new j.HN0,this.onBattleEnded=new j.HN0,this._spellComponents=new Map,this._battleVisualCenterPositionX=700,this._showIndicator=!0,this._isUnitTooltipLocked=!1,this._battleBackgroundFX=null,this._spellBookShowing=!1,this._ignoreUnitEntranceUIWhenMoving=!1,this.awardedXpData=null,this.postBattleRescuablePets=[],this.magicoinRewardGranted=!1,this._paintedBackgroundZoomConfigs=le,this._forceEndBattle=!1,this.hasMpOverrides=!1,this._spellCardsHidden=!0,this.type=null!==(B=k.battleType)&&void 0!==B?B:tt.gu.Basic,this.subType=k.battleSubType,this.battleCooldownConfig=k.cooldown,this._updateTimer=at.q.instance.prodigy.game.time.events.loop(rt.s.TARGET_FPS_40_MS,this.update,this)}update(){this._statusEffectAnimationController&&this._statusEffectAnimationController.update()}bindNetworkHandler(){j.wa5.getActiveScene().container.bind("NetworkHandler").to(Xt.m).asSingleton()}requestBattleStart(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this._networkHandler.createBattle(k)}))}requestBattleSimulation(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;return(null===(U=null===(B=k.debug)||void 0===B?void 0:B.battleSim)||void 0===U?void 0:U.simCount)?this._networkHandler.createBattleSim(k):{simData:"Sim count did not exist in the config"}}))}requestBattleResume(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._networkHandler.resumeBattle()}))}getLoadingScreen(k){const B=new gt.R;return B.data=Object.assign(Object.assign({},B.data),k),B}initBattlePrefab(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,$;const H=j.wa5.getActiveScene(),V=this.leftTeamId,W=this.rightTeamId;H.container.bind("LeftTeamId").toConstantValue(V),H.container.bind("RightTeamId").toConstantValue(W),H.container.bind("976-9e42").toConstantValue(new Ct.w(at.q.instance.prodigy.education));const q=this.getUnitSpellData(k.state.units,null===(B=k.preload)||void 0===B?void 0:B.spellV2),Y=this.preloadUnitSpellIcons(q),Q=this.getBattlePrefab();let X=yield this._prefabLoader.loadWithDependenciesFromGUID(Q);this._prefabRoot=X,yield this.loadUnitInfoTooltip(),Q!==z.l.RevampBattleScene&&(X=X.findComponentInChildren(oe.$).GameObject);const Z=X.findComponent(oe.$);H.addGameObject(this._prefabRoot),this.preloadUnitSpells(q).then((k=>{this._spellRoot=k,X.addChild(k)})).catch(j.RQr.createHandler("Error preloading unit spells"));const J=ot.R.loadData(K.r.BattleRevampConstants_json).battleConstants,tt=X.findComponent(j.bE_);tt.Container.bind(G.ConstantsDataProvider).toConstantValue({constants:J}),tt.Container.bind("Constants").to(G.BattleConstants).asSingleton(),this._battleConstants=tt.Container.get("Constants"),this.leftTeam=tt.getInjectedValue("BattleHomeTeam"),this.leftTeam.setData(V,k.state.teams[V],this.getUnitDataForTeam(k,V)),H.container.bind("LeftTeamUnits").toConstantValue(this.leftTeam.units),this.rightTeam=tt.getInjectedValue("BattleAwayTeam"),this.rightTeam.setData(W,k.state.teams[W],this.getUnitDataForTeam(k,W)),H.container.bind("RightTeamUnits").toConstantValue(this.rightTeam.units),null===(U=k.state.statusEffects)||void 0===U||U.forEach((k=>{var B;null===(B=this.getUnitById(k.unitId))||void 0===B||B.addStatusEffect(k)})),this.shouldNotifyWhenRescueAvailable=this.rightTeam.isRescuable(),this.textLog=tt.getInjectedValue("BattleLog"),X.findComponentInChildren(At.Y).playBgmID(null!==(F=this._localConfig.backgroundMusicID)&&void 0!==F?F:2),Z.battleType=this.type,Z.battleController=this,Z.difficulty=null===($=k.state.config)||void 0===$?void 0:$.difficulty,Z.onVictory.addOnce((()=>{at.q.instance.game.broadcaster.broadcast(dt.Ii.Victory)})),this.registerBattleEndHandlers(Z),yield Promise.all([Y,this.leftTeam.awaitUnitsLoaded(),this.rightTeam.awaitUnitsLoaded(),this.setupBattleBackgrounds()]),this.battleResult=Z.battleResult,this.mapRoot=Z.mapRoot,this._stateMachine=Z,this._stateMachinePromise.resolve(Z),this._stateMachine.onStateChange.add(this.handleStateChange,this),this.initBattleStats(),this._stateMachine.stateUpdateQueue.push(...this.processBattleStateUpdates(k.updates));const et=this._prefabLoader.loadFromGUID(z.l.RescueAvailableSequence);this._rescueAvailableSequence=null==et?void 0:et.findComponentInChildren(qt.N)}))}registerBattleEndHandlers(k){const B=at.q.instance.prodigy.gameContainer.get("306-5359"),U=k=>{(0,mt.G)(it.Q).enabled&&(0,ct.u)(B,B.kennel.getPets()),k()};k.onVictory.addOnce((()=>U(this._localConfig.onVictory))),k.onDefeat.addOnce((()=>U(this._localConfig.onDefeat))),k.onEscape.addOnce((()=>U(this._localConfig.onEscape)))}setupBattleBackgrounds(){return(0,F.sH)(this,void 0,void 0,(function*(){let k;if("string"==typeof this._localConfig.backgroundID){const B=this._prefabRoot.findComponent(j.BSH);k=B.onMapLoaded.asPromise(),B.loadMap(this._localConfig.backgroundID)}else k=Promise.all(this._localConfig.backgroundID.map(((k,B)=>(0,F.sH)(this,void 0,void 0,(function*(){const U=new j._mx(this._prefabRoot);U.layer=0===B?"backgroundImage":"foregroundImage";const F=U.addComponent(j.XVE);0!==B&&(this._foregroundTransform=F);const G=U.addComponent(ut._);yield G.setAsset(k),G.sizeToSourceImage()})))));return k}))}startStateMachine(){this._foregroundTransform&&(this.setZoom(this._paintedBackgroundZoomConfigs.bgStartScale,this._paintedBackgroundZoomConfigs.fgStartScale),window.setTimeout((()=>this.zoomCamera(this._paintedBackgroundZoomConfigs.bgStartScale,this._paintedBackgroundZoomConfigs.bgEndScale,this._paintedBackgroundZoomConfigs.fgStartScale,this._paintedBackgroundZoomConfigs.fgEndScale,this._paintedBackgroundZoomConfigs.duration)),this._paintedBackgroundZoomConfigs.delay)),this._stateMachine.goToStart()}resumeLastBattleState(k){this._stateMachine.goToState(ne,k)}getUnitSpellData(k,B=[]){const U=new Set(B);for(const F of Object.values(k))for(const k of F.spells)U.add(k.spellId);return Array.from(U.values()).map((k=>this._gameDataProvider.getItem("spellV2",k))).map((k=>this.applyExperimentOverrides(k)))}getTotalTeamDamagePercentage(k,B=!1){let U=!1;if(B){const B=this._stateMachine.stateUpdateQueue.find((k=>k.type===G.EBattleStateUpdate.EndBattle));B&&B.victoriousTeamId!==k&&(U=!0)}const F=this.getUnits().filter((B=>B.data.teamId===k)),j=F.reduce(((k,B)=>k+B.data.health.max),0),$=F.reduce(((k,B)=>k+B.data.health.current),0);return U?1:1-$/j}applyExperimentOverrides(k){var B;return(null===(B=null==k?void 0:k.metadata)||void 0===B?void 0:B.experiments)?(k.metadata.experiments.filter((k=>{const B=this._featureProvider.getFeatureValue(k.featureName);return nt.A.traverseIfObject(B,k.featureVariable)})).forEach((B=>{var U,F;Object.keys(null!==(U=B.data)&&void 0!==U?U:[]).forEach((U=>{k.data[U]=Object.assign(k.data[U],B.data[U])})),Object.keys(null!==(F=B.metadata)&&void 0!==F?F:[]).forEach((U=>{k.data[U]=Object.assign(k.metadata[U],B.metadata[U])}))})),k):k}preloadUnitSpellIcons(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F;const G=[];for(const j of k){const k=(null===(F=null===(U=null===(B=null==j?void 0:j.metadata)||void 0===B?void 0:B.assets)||void 0===U?void 0:U.icon)||void 0===F?void 0:F.assetKey)?Nt.$.capitalizeFirstLetter(j.metadata.assets.icon.assetKey):null;nt.A.isDefined(Q.q[k])&&G.push(Q.q[k],Q.q[`${k}_cooldown`])}return new Promise(((k,B)=>{at.q.instance.prodigy.load.assets(G,((U,F)=>{F?k():B(new Error(`App.instance.prodigy.load failed for assets ${G.join(", ")}`))}))}))}))}preloadUnitSpells(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=new j._mx;B.name="SpellRoot";return B.addComponent(j.dLy).setPositionX(this._battleVisualCenterPositionX),yield Promise.all(k.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){var U,F,G,j;const $=null===(G=null===(F=null===(U=null==k?void 0:k.metadata)||void 0===U?void 0:U.assets)||void 0===F?void 0:F.default)||void 0===G?void 0:G.assetKey,H=`${Nt.$.capitalizeFirstLetter($)}_spell`,V=null!==(j=nt.A.isDefined($)?X.z[H]:void 0)&&void 0!==j?j:X.z.Spell_storm_ioncannon_single_spell,W=B.addComponent(Dt.o,!1);this._spellComponents.set(`${k.ID}`,W),W.spellGUID=V,yield new Promise(((k,B)=>{at.q.instance.prodigy.load.assets([V],(()=>{at.q.instance.game.cache.getJSON(V)?k():B(new Error(`${H} - ${V} not loaded, does it exist in ESpellGameAssets?`))}))})),W.create(),W.postCreate(),yield W.preloadAssets()}))))),B}))}initBattleStats(){this.battleStats=new bt.g,this.battleStats.type=tt.gu.Basic,this.battleStats.startTime=at.q.instance.prodigy.timeManager.getServerTimeMs(),this.battleStats.endTime=bt.g.INVALID_TIME,this.battleStats.consumablesUsed=[],this.battleStats.enemySpellsCast=0,this.battleStats.energyCost=0,this.battleStats.epicAttack=null,this.battleStats.spellsCast=0,this.battleStats.spellsFailed=0,this.battleStats.pets=[],this.battleStats.petsRescued=[]}onStartBattle(){return(0,F.sH)(this,arguments,void 0,(function*(k=!0){at.q.instance.prodigy.gameContainer.get("306-5359").saveEnabled=!1,this.applyModifiers(),this.getUnits().filter((k=>(null==k?void 0:k.type)===tt.uj.Wizard)).forEach(this.remapStandAnimation);const B=[];B.push(this.leftTeam.teleportIn()),B.push(this.rightTeam.teleportIn()),yield j.Egh.timeout(2e3),yield this.playIntroSequence(),k&&(yield this.setSpellBookVisible(!0)),this.getUnits().forEach((k=>{k.uiContent.findComponent(St.x).startTween(),k.ultimatesUi&&this.type===tt.gu.Ultimates&&k.ultimatesUi.GameObject.findComponent(St.x).startTween()})),this.setupUnitTooltip(),yield Promise.all(B)}))}highlightRescuableUnits(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this.getTeam(jt.h.Away).units.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return k.updateRescuableUI()}))));yield Promise.all(k)}))}onResumeBattle(){return(0,F.sH)(this,void 0,void 0,(function*(){at.q.instance.prodigy.gameContainer.get("306-5359").saveEnabled=!1,this.applyModifiers(),this.getUnits().filter((k=>(null==k?void 0:k.type)===tt.uj.Wizard)).forEach(this.remapStandAnimation);const k=[];this.getUnits().forEach((B=>k.push(B.enterBattle(!1,!0)))),yield this.setSpellBookVisible(!0),this.setupUnitTooltip(),this.highlightRescuableUnits().catch((k=>j.RQr.logError(k,"Error: Could not highlight rescuable units"))),yield Promise.all(k)}))}playIntroSequence(){return(0,F.sH)(this,void 0,void 0,(function*(){at.q.instance.prodigy.audio.playSFXFromGUID(W.B.Sfx_vs_animation),this._stateMachine.introAnimator.GameObject.active=!0,yield(0,lt.ye)(this._stateMachine.introAnimator,"vs")}))}applyModifiers(){const k=j.wa5.getActiveScene().container.get("Modifiers");for(const B of k)switch(B.type){case J.z.TurnTimer:B.teamId===this.leftTeamId&&this.useTurnTimer(1e3*B.seconds)}}remapStandAnimation(k){var B,U,F,G,$,H;const V=(null===(G=null===(F=null===(U=null===(B=k.creature)||void 0===B?void 0:B.creatureGameObject)||void 0===U?void 0:U.findComponentInChildren(Wt.O,!0))||void 0===F?void 0:F.spineAnimator)||void 0===G?void 0:G.spine)||(null===(H=null===($=k.creature)||void 0===$?void 0:$.creatureGameObject)||void 0===H?void 0:H.findComponentInChildren(j.v2j,!0));null==V||V.addAnimationRemap(ft.$.STAND,ft.$.STOP_HEAVY)}zoomCamera(k,B,U,F,G){const $={progress:0};at.q.instance.game.tweens.create($,this,!0).to({progress:1},G,j.GS3.Quadratic.InOut).start().onUpdate.add((()=>{this.setZoom(j.cj9.linear(k,B,$.progress),j.cj9.linear(U,F,$.progress))}))}setZoom(k,B){var U;j.i7d.main.GameObject.transform.setScale(1/k),null===(U=this._foregroundTransform)||void 0===U||U.setScale(B)}processBattleStateUpdates(k){return k}onPlayerAction(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this._networkHandler.doBattleAction(k,this.battleId),U=yield this.handleWaitingMessage(B),F=this.processBattleStateUpdates(U);return this.updateBattleStats(k,F),F}))}attemptEscape(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._networkHandler.escapeBattle(),B=yield this.handleWaitingMessage(k),U=this.processBattleStateUpdates(B);this._stateMachine.stateUpdateQueue.push(...U),this._stateMachine.goToState(ie.B)}))}handleWaitingMessage(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=j.Egh.timeout(be.NETWORK_LAG_MESSAGE_DELAY_MS),U=yield Promise.race([k,B]);if(Array.isArray(U))return U;this._stateMachine.isShowingNetworkErrorDialog()||this._stateMachine.showErrorDialog(oe.D.Connection,void 0,!0);const F=yield k;return this._stateMachine.hideErrorDialog(),F}))}updateBattleStats(k,B){switch(k.type){case G.EBattleAction.PowerUp:k.correctAnswer?this.battleStats.spellsCast++:this.battleStats.spellsFailed++;break;case G.EBattleAction.CastSpell:this.battleStats.spellEnergyCost=1,++this.battleStats.energyCost}}beginEndingBattle(k,B={}){this.beginEndingBattleAndGotoState([te,k],B)}beginEndingBattleAndGotoState(k,B={}){this._forceEndState=k,this.canBattleEndInstantly()?this._stateMachine.goToState(...this._forceEndState):(this._forceEndBattle=!0,B.enablePostBattleFlowExpressMode&&this.enablePostBattleExpressMode(B.forceEndMessageText))}enablePostBattleExpressMode(k){this.postBattleExpressModeController.enable(k).catch(j.RQr.createHandler("Failed to enable express mode on post-battle menus"))}canBattleEndInstantly(){return this._stateMachine&&this.canBattleEndDelayed()&&this._stateMachine.currentState instanceof ee.W}isBattleBeingForciblyEndedMidBattle(){return this._forceEndState&&this._stateMachine&&this._stateMachine.currentState instanceof this._forceEndState[0]&&!this.postBattleExpressModeController.hasStarted}canBattleEndDelayed(){var k;return 0===this._stateMachine.stateUpdateQueue.length&&!this.isAnsweringQuestion&&(null===(k=this.activeUnit)||void 0===k?void 0:k.data.teamId)===this.leftTeamId}onEndGame(k){return(0,F.sH)(this,arguments,void 0,(function*(k,B=!0){var U;const F=at.q.instance.prodigy;if(k&&B){const k=null!==(U=this._localConfig.victoryMusicID)&&void 0!==U?U:1;F.audio.isBGMPlaying(Pt.K.getAssetID("bgm",k))||F.audio.playBGM(k,!0)}this.setUnitTooltipUi(!1),this.hideSpellCards(!0,(()=>{this.setSpellBookVisible(!1).catch(j.RQr.createHandler("Error hiding spell book"))}));const G=[];for(let j=0;j{k.assetIDs.forEach((k=>{at.q.instance.prodigy.load.removeSpine(k)}))})),this.onBattleEnded.dispatch()}))}onVictory(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){at.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(et.T.WIN_BATTLE,{type:this.type}).catch(j.RQr.createHandler(`Could not send quest event for battle won: ${this.type}`));const F=at.q.instance.prodigy.gameContainer.get("3a0-8003");yield F.refreshMembership();const G=at.q.instance.prodigy.gameContainer.get("306-5359");yield G.updateChargedLevelsData(),yield this.showBattleResult(!1,k,B,U,!0)}))}onDefeat(){return(0,F.sH)(this,arguments,void 0,(function*(k=!1){const B=Gt.S.isPostLossFlowAvailable(this.type);B||k||!Bt.k.useRevisedDifficulty||(yield this.showDefeatedDialogue()),this._forceEndBattle&&(this._forceEndBattle=!1,this._stateMachine.goToState(...this._forceEndState)),B&&(yield this.showBattleResult(!0,void 0,void 0,void 0,!1))}))}onEscape(){return(0,F.sH)(this,void 0,void 0,(function*(){}))}handleBattleStartError(k){return(0,F.sH)(this,void 0,void 0,(function*(){return!0}))}completeBattle(k,B,U){this._stateMachine.completeBattle(k,void 0,null==B?void 0:B.rewardsScalar,U)}getTeam(k){return[this.leftTeam,this.rightTeam][k]}getTeamById(k){return this.leftTeamId===k?this.leftTeam:this.rightTeamId===k?this.rightTeam:void 0}getUnits(){return[...this.leftTeam.units,...this.rightTeam.units]}getUnitById(k){return this.getUnits().find((B=>B.battleId===k))}deactivateTurnIndicator(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=this._stateMachine.turnIndicator;B.GameObject.active&&(B.OnAnimationComplete.removeAll(B.playAnimation),B.playAnimation(be.TURN_INDICATOR_DEACTIVATE_ANIMATIONS[(null===(k=this._activeUnit)||void 0===k?void 0:k.size)||jt.X.Normal],!1,!0),yield B.OnAnimationComplete.asPromise(),B.GameObject.active=!1)}))}setActiveUnit(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F;if(!this._spellCardsHidden){null===(B=this.spellCardsController)||void 0===B||B.hidePetRescue();const k=new j.bnh;this.hideSpellCards(!0,k.resolve),yield k.catch(j.RQr.createHandler("Error: Could not clean up battle revamp unit ui"))}if(this._previousUnitId=null===(U=this._activeUnit)||void 0===U?void 0:U.battleId,this._activeUnit=k,k){k.creature.isOpponent||(this.showSpellCards(!0,!1),yield this.spellCardsController.onUiReady.asPromise()),yield this.setUnitIndicator(k);const B=this.getTeam(jt.h.Away).units.filter((k=>k.isInARescuableState()));let U=[],G=[];this.isRescueAvailable(!1)&&!k.creature.isOpponent&&(U=Lt.D.filterForNewlyRescuable(B),U.length>0&&(G=U,this.hideVisibleUnitTooltips(),this._isHighlightingRescue=!0,yield null===(F=this._rescueAvailableSequence)||void 0===F?void 0:F.startSequence(G,this.textLog),this.shouldNotifyWhenRescueAvailable=!1,this._isHighlightingRescue=!1));const j=this.getUnits().find((k=>k.battleId===this._previousUnitId));this._showIndicator&&(k.creature.isOpponent&&!(null==j?void 0:j.creature.isOpponent)?this.textLog.showMessage("BATTLE_REVAMP_ENEMY_TURN"):k.creature.isOpponent||(this.isRescueAvailable()&&this.shouldNotifyWhenRescueAvailable?(this.textLog.showMessage("BATTLE_REVAMP_RESCUE_AVAILABLE"),this.shouldNotifyWhenRescueAvailable=!1):k.currentMp>0&&((null==j?void 0:j.creature.isOpponent)||!j)&&this.textLog.showMessage("BATTLE_REVAMP_YOUR_TURN"))),this.getTeam(jt.h.Away).units.filter((k=>!G.includes(k))).forEach((k=>{k.updatePetRescueTooltip()})),U.forEach((k=>{Lt.D.sendPetRescueAvailableEvent(k)}))}}))}setUnitIndicator(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;const F=this._stateMachine.turnIndicator,G=k.GameObject.transform.worldPosition;k.turnIndicatorOffset&&(G.x+=k.turnIndicatorOffset.x,G.y+=k.turnIndicatorOffset.y),(null===(B=F.GameObject.transform.worldPosition)||void 0===B?void 0:B.x)===G.x&&(null===(U=F.GameObject.transform.worldPosition)||void 0===U?void 0:U.y)===G.y&&this._stateMachine.turnIndicator.GameObject.active||(yield this.deactivateTurnIndicator(),F.GameObject.transform.setPosition(G.x,G.y),F.GameObject.active=this._showIndicator,this._showIndicator&&(F.playAnimation(be.TURN_INDICATOR_ACTIVATE_ANIMATIONS[k.size],!1,!0),F.OnAnimationComplete.addOnce((()=>{F.playAnimation(be.TURN_INDICATOR_IDLE_ANIMATIONS[k.size],!0)}),F.playAnimation),yield Promise.race([F.spine.waitForEvent(re.ConcurrentPlay),F.OnAnimationComplete.asPromise()])))}))}setSpellBookVisible(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=k?this._stateMachine.spellBookMoveIn:this._stateMachine.spellBookMoveOut;k!==this._spellBookShowing&&(this._spellBookShowing=k,B.startTween(),yield B.onComplete.asPromise())}))}showSpellCards(k,B=!0){var U;if(this._spellCardsHidden=!1,!this.spellCardsPrefab){this.spellCardsPrefab=this._prefabLoader.loadFromGUID(z.l.RevampActionMenu),this.spellCardsController=this.spellCardsPrefab.findComponentInChildren(Kt.b),this._battleTargetControllerComponent=this.spellCardsPrefab.findComponentInChildren(Vt.F),this.spellCardsController.getSpellCards().forEach((k=>{const B=k.findComponentInChildren($t.y);B&&this._spellCardBattleActionData.push(B)}));const k=this.spellCardsController.petRescueCard.findComponentInChildren($t.y);k&&this._spellCardBattleActionData.push(k)}this.spellCardsController.onUiReady.removeAll(),this._spellCardBattleActionData.forEach((k=>k.initialize())),null===(U=this._battleTargetControllerComponent)||void 0===U||U.initialize(),k?this.spellCardsController.tweenSpellCards(!0,B):(this.spellCardsController.onUiReady.dispatch(!0,!1),this.spellCardsController.inputBlocker.active=!1)}updateSpellCards(){this.hideSpellCards(!1,(()=>{this.showSpellCards(!1)}))}hideSpellCards(k,B){this._spellCardsHidden=!0,this.onSpellCardsRemoved.dispatch(),this.spellCardsPrefab?k?(this.spellCardsController.targetController.dismissActionTooltips(0,null),B&&this.spellCardsController.onUiReady.addOnce(B),this.spellCardsController.tweenSpellCards(!1)):(this.spellCardsController.onUiReady.dispatch(!1,!1),null==B||B()):null==B||B()}showUnitTooltip(k){if(this._isUnitTooltipLocked)return;const B=this.getUnits().find((B=>B.battleId===k));this.showUnitInfoTooltip(B)}hideVisibleUnitTooltips(){this.setVisibleUnitInfoTooltip(null)}setUnitTooltipUi(k){this._isUnitTooltipLocked||(this.hideVisibleUnitTooltips(),this.getUnits().forEach((B=>{k&&B.isAlive()?B.setUnitTooltipTriggerEnabled(!0):B.setUnitTooltipTriggerEnabled(!1)})))}updateInteractionPointerForUnits(){this.getUnits().forEach((k=>{k.showAsInteractive(this._isChoosingSpell&&(null==k?void 0:k.isAlive())&&!this._isUnitTooltipLocked)}))}setUnitTooltipLock(k){this._isUnitTooltipLocked=!1,this.setUnitTooltipUi(!k),this._isUnitTooltipLocked=k,this.updateInteractionPointerForUnits()}isUnitTooltipLocked(){return this._isUnitTooltipLocked}setupUnitTooltip(){this.onSpellCardSelected.add(this.setUnitTooltipUi.bind(this,!1)),this.onSpellCardUnselected.add(this.setUnitTooltipUi.bind(this,!0)),this.onSpellTargetChosen.add(this.setUnitTooltipUi.bind(this,!0)),this._isUnitTooltipLocked||this.setUnitTooltipUi(!0)}useTurnTimer(k){this.onChoosingSpell.removeAll(this),this.onChoosingSpell.add((()=>{this.activeUnit.showCasterWaitingMessage(k),this.activeUnit.onTurnTimerExpired.addOnce((()=>{this.activeUnit.onSelectSpell(null),this.spellCardsController.targetController.hideTargets(),this.hideSpellCards(!0),this._stateMachine.goToState(he.N,{type:G.EBattleAction.Fumble})}),this)}),this);const B=()=>{var k,B;null===(k=this.activeUnit)||void 0===k||k.hideWaitingMessage(),null===(B=this.activeUnit)||void 0===B||B.onTurnTimerExpired.removeAll(this)};this.onSpellTargetChosen.add(B),this.onSpellCardsRemoved.add(B)}showBattleResult(k,B,U,$){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U,F,$=!0){var V,W;const q=null!==(V=null==F?void 0:F.rewardsScalar)&&void 0!==V?V:1,K=this.getEarnedXP();Mt.R.addDebugMessage("\nNon-member rewards:\n");const z=this.getScalableBattleDrops();B&&B.length>0&&z.push(...B.map((k=>({type:k.type,ID:k.ID,N:k.quantity,isSecure:!!k.isSecure}))));const Y=this.getNonScalableBattleDrops(),Q=Mt.R.bucketRewards([...Mt.R.bucketAndScaleRewards(z,q),...Y]);Mt.R.addDebugMessage("\nMember rewards:\n");const X=this.getScalableMemberBattleDrops();U&&U.length>0&&X.push(...U.map((k=>({type:k.type,ID:k.ID,N:k.quantity}))));const Z=this.getNonScalableMemberBattleDrops(),J=Mt.R.bucketRewards([...Mt.R.bucketAndScaleRewards(X,q),...Z]);Mt.R.outputDebugMessages();const et=new j.bnh;this.battleResult.onClosed.add((()=>{et.resolve(),this._forceEndBattle&&(this._forceEndBattle=!1,this._stateMachine.goToState(...this._forceEndState))})),this.battleResult.onStarted.addOnce((k=>{const B=k.findComponentInChildren(Ft.D);this.postBattleExpressModeController.setPostBattleFlowManager(B)}));const it=this.getTeam(jt.h.Away).units.map((k=>k.data)),st=H().orderBy(it,[k=>k.type===tt.uj.Boss?1:0,k=>k.level,k=>{var B;return null!==(B=k.mergeRank)&&void 0!==B?B:0}],["desc","desc","desc"])[0],nt={enemyElementWeakness:null!==(W=this.battleConstants.getElementalWeakness(st.element))&&void 0!==W?W:G.EElementType.Astral};return this.battleResult.show(this.getUnitsToAward(),$,this.type,{xpGained:K,rewards:Q,memberRewards:J,rewardsScalingInfo:F,rescuablePets:this.postBattleRescuablePets,skipChests:k,magicoinRewardGranted:this.magicoinRewardGranted},nt),et}))}getEarnedXP(){var k,B;return null!==(B=null===(k=this.awardedXpData)||void 0===k?void 0:k.xpGained)&&void 0!==B?B:{baseXp:0,memberXp:0,totalNonMemberXp:0}}getUnitsToAward(){var k;return(null===(k=this.awardedXpData)||void 0===k?void 0:k.unitsToAward.length)>0?this.awardedXpData.unitsToAward:this.leftTeam.units.map((k=>k.battleId))}getUnitDataForTeam(k,B){return Object.keys(k.state.units).reduce(((U,F)=>{const G=k.state.units[F];return G.teamId===B&&(G.unitId||(G.unitId=F),U.push(G)),U}),[])}getGuaranteedDrops(){var k;const B=[],U=[],F=null===(k=this._localConfig.guaranteedDrops)||void 0===k?void 0:k.filter(nt.A.isDefined);if(nt.A.isDefined(F)){let k;for(let G=0;G0&&B.push(U[0]),this.debugCurrencyDrops("guaranteed drops",B),B}getScalableBattleDrops(){const k=at.q.instance.prodigy.world.getCurrentZone(),B=at.q.instance.prodigy.gameContainer.get("12b-405a").getMultiplier(k,kt.R.Currency),U=at.q.instance.prodigy.world.getCurrentCurrency(),F=Ut.Q.getMemberJarDropData(),G=this.getDropsFromMemberJarData(F.nonMemberDrops,U,B);return this._localConfig.scaleGuaranteedDrops&&G.push(...this.getGuaranteedDrops()),G}getNonScalableBattleDrops(){return this._localConfig.scaleGuaranteedDrops?[]:this.getGuaranteedDrops()}getScalableMemberBattleDrops(){const k=[];at.q.instance.prodigy.world.getCurrentZone()===st.A_.ARCHIVES&&k.push({type:"gold",N:150});const B=at.q.instance.prodigy.world.getCurrentCurrency(),U=Ut.Q.getMemberJarDropData(),F=this.getDropsFromMemberJarData(U.memberDrops,B,1);return k.push(...F),k}getNonScalableMemberBattleDrops(){return[]}getDropsFromMemberJarData(k,B,U){const F=[],G=this.rightTeam.units.length;if(k.goldPerEnemy>0){const B=k.goldPerEnemy*G*U;Mt.R.addDebugMessage(`Gold per enemy total: ${B}`),F.push({type:"gold",N:B})}if(k.gold>0){const B=k.gold*U;Mt.R.addDebugMessage(`Gold: ${B}`),F.push({type:"gold",N:B})}if(nt.A.isDefined(B)&&1!==B&&k.zoneCurrency>0){const G=k.zoneCurrency*U;Mt.R.addDebugMessage(`Zone Currency ID ${B}: ${G}`),F.push({type:"currency",ID:B,N:G})}if(k.festivalCurrencyPerEnemy>0||k.festivalCurrency>0){at.q.instance.prodigy.skin.getActiveFestivals().forEach((B=>{const U=ht.t.getItemDrops(B.getBattleDrops(G,k.festivalCurrencyPerEnemy,k.festivalCurrency));F.push(...U)}))}return F}getDefeatData(){return this._localConfig.defeatData}showDefeatedDialogue(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=new pt.rD(at.q.instance.game);k.addEvents([{dialogueData:k.dataProvider.get(1535),type:pt.fA.DEFAULT,blockInput:!0}]);const B=new j.bnh;return k.start(!0,(()=>{B.resolve()})),B}))}alertActiveUnitMpEmpty(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this._activeUnit.alertMpEmpty()}))}castActionResultsDisplayTriggered(){}getStateOverride(k){return this._forceEndBattle&&this.canBattleEndDelayed()?(this._forceEndBattle=!1,this._forceEndState):null}isRescueAvailable(k=!0){return!!this._activeUnit.spells.some((k=>k.spellId===this.battleConstants.rescueSpellId))&&(!!this.rightTeam.isRescuable()&&(!!this.getUnits().some((k=>k.isInARescuableState()))&&(!k||this._activeUnit.currentMp>0)))}isRescueInSpellPool(){return this.getUnits().some((k=>k.hasAccessToSpell(this.battleConstants.rescueSpellId)))}moveUnitToTeam(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){var $,H;const V=k.isAlive(),W=this.getTeamById(B),q=fe.find((k=>kB.setAnimationByName(0,"pet-rescue-front",!1)));const U=new j._mx(k.creature.creatureGameObject).addComponent(j.v2j);U.GameObject.sendToBack(),U.setAsset(Z.Q.Spine_pet_shadow_effect_back_json,(()=>U.setAnimationByName(0,"pet-rescue-back",!1))),yield Promise.all([B.getSpine().onComplete.asPromise(),U.getSpine().onComplete.asPromise(),this.setActiveUnit(null),(()=>(0,F.sH)(this,void 0,void 0,(function*(){var B;yield j.Egh.timeout(2800),null===(B=k.creature.animator.spine)||void 0===B||B.getSpine().setTint(16777215)})))()]),yield k.playDefeated()}else yield Promise.all([this.setActiveUnit(null),k.playDefeated()]);K.setData(Object.assign(Object.assign({},k.data),{teamId:B}),null!=U?U:k.creature.teleportType),K.loadPromise.then((()=>(0,F.sH)(this,void 0,void 0,(function*(){if(K.creature.creatureGameObject.active=!1,K.uiContent.active=!1,K.uiContent.findComponent(St.x).targetComponent.getRootContainer().alpha=0,K.setUnitTooltipTriggerEnabled(!1),V){if(G){const k=K.creature.creatureGameObject;k.onActiveChanged.add((()=>{k.active&&(G(K),k.onActiveChanged.removeAll(this))}),this)}yield K.enterBattle(!0,!this._ignoreUnitEntranceUIWhenMoving)}K.creature.teleportType=z,K.controllerUnit=Y})))).catch(j.RQr.createHandler("Unable to load moved unit")),K.transferStatusEffectData(k),K.updateDisplayedStatusEffects(),K.updateIdleStatusEffect(),K.updatePersistentStatusEffects(),k.clearData();const J=j.wa5.getActiveScene().container;J.rebind("LeftTeamUnits").toConstantValue(this.leftTeam.units),J.rebind("RightTeamUnits").toConstantValue(this.rightTeam.units)}))}addUnitToTeam(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=this.getUnitSpellData({[k.unitId]:k});yield this.preloadUnitSpells(U),yield this.preloadUnitSpellIcons(U);const $=at.q.instance.game.state.states.get(vt.G.SecureBattleRevamp);yield at.q.instance.prodigy.load.assetsAsPromise($.getUnitAssets({[k.unitId]:k}));const H=this.getTeamById(B),V=ue.find((k=>k(0,F.sH)(this,void 0,void 0,(function*(){W.creature.creatureGameObject.active=!1,W.uiContent.active=!1,W.uiContent.findComponent(St.x).targetComponent.getRootContainer().alpha=0,W.setUnitTooltipTriggerEnabled(!1),yield W.enterBattle(!0,!this._ignoreUnitEntranceUIWhenMoving),yield W.updateRescuableUI()})))).catch(j.RQr.createHandler("Unable to load added unit"));const q=j.wa5.getActiveScene().container;q.rebind("LeftTeamUnits").toConstantValue(this.leftTeam.units),q.rebind("RightTeamUnits").toConstantValue(this.rightTeam.units)}))}handleStateChange(k){this._isAnsweringQuestion=k instanceof Zt.o,this._isChoosingSpell=k instanceof ee.W,this._isPerformingAction=k instanceof ce.a||k instanceof he.N,this.updateInteractionPointerForUnits()}onRescueCompleted(){this.rightTeam.units.forEach((k=>{k.setNewIndicatorActive(k.isARescuableUnit())}))}onNewRound(k){1===k&&this.highlightRescuableUnits().catch((k=>j.RQr.logError(k,"Error: Could not highlight rescuable units")))}cleanUpSpellCards(){this.spellCardsController=null,this.spellCardsPrefab&&(this.spellCardsPrefab.destroy(),this.spellCardsPrefab=null)}destroy(){var k,B,U;at.q.instance.prodigy.game.time.events.remove(this._updateTimer),null===(k=this._unitInfoTooltip)||void 0===k||k.GameObject.destroy(),this._stateMachinePromise=null;const F=j.wa5.getActiveScene();this._prefabRoot&&(F.removeGameObject(this._prefabRoot),this._prefabRoot.destroy()),this._prefabRoot=null,F.container.unbind("LeftTeamId"),F.container.unbind("RightTeamId"),F.container.unbind("976-9e42"),F.container.unbind("LeftTeamUnits"),F.container.unbind("RightTeamUnits"),F.container.unbind("NetworkHandler"),this.leftTeam=null,this.rightTeam=null,this.battleStats=null,this._rescueAvailableSequence=null,this._stateMachine&&(this._stateMachine.onVictory.removeAll(this),this._stateMachine.onDefeat.removeAll(this),this._stateMachine.onEscape.removeAll(this),this._stateMachine.onStateChange.removeAll(this),this._stateMachine.battleController=null),this.battleResult&&this.battleResult.onClosed.removeAll(this),this.battleResult=null,this._stateMachine=null,this._activeUnit=null,this.mapRoot=null,this._spellComponents.clear(),this.onChoosingSpell.dispose(),this.onSpellCardSelected.dispose(),this.onSpellCardUnselected.dispose(),this.onSpellTargetChosen.dispose(),this.onSpellCardsRemoved.dispose(),this.onBattleEnded.dispose(),this.cleanUpSpellCards(),Lt.D.clearNewlyRescuableUnitsSeen(),null===(B=this.postBattleExpressModeController)||void 0===B||B.destroy(),null===(U=this._statusEffectAnimationController)||void 0===U||U.destroy()}setVisibleUnitInfoTooltip(k){var B,U;if(this.isPerformingAction)return;const F=null!==(B=null==k?void 0:k.isInARescuableState())&&void 0!==B&&B;k&&F&&(this._unitInfoTooltip.onPetRescueButtonClicked.removeAll(this),this._unitInfoTooltip.onPetRescueButtonClicked.add((()=>{this.sendUnitTooltipRescueButtonClickedEvent(),this.attemptToRescueUnit(k)}),this)),this.updateWalletDisplay(F),k&&k.onInfoTooltipHidden.addOnce(this.hideUnitInfoTooltip.bind(this),this),null===(U=this._unitInfoTooltip)||void 0===U||U.showTooltipForUnit(k),this.sendShowUnitTooltipEvent(k)}loadUnitInfoTooltip(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B;const U=yield this._prefabLoader.loadWithDependenciesFromGUID(z.l.FullUnitInfo);this._unitInfoTooltip=U.findComponent(zt.$),null===(B=null===(k=this._unitInfoTooltip)||void 0===k?void 0:k.onTooltipClosed)||void 0===B||B.addOnce(this.hideUnitInfoTooltip.bind(this),this)}))}onClickUnitTooltip(k){this.isChoosingSpell&&this.showUnitTooltip(k)}showUnitInfoTooltip(k){(null==k?void 0:k.isAlive())&&this.setVisibleUnitInfoTooltip(k),k.updatePetRescueTooltip()}sendShowUnitTooltipEvent(k){var B;const U={interfaceName:Tt.B.BattlePetInfoWidget,interfaceType:_t.Wm.InfoPanel,instanceType:yt.N.UI,originType:_t.$N.ButtonClick};nt.A.isDefined(k)||(U.closeMethod=_t.Lv.Toggle),null===(B=this._segment)||void 0===B||B.featureCommon.sendInterfaceEvent(U)}sendUnitTooltipRescueButtonClickedEvent(){const k={buttonName:wt.k.PetRescuePayMagicoin,interfaceName:Tt.B.BattlePetInfoWidget,interfaceType:_t.Wm.InfoPanel,destinationName:Tt.B.PetRescueAttempt};this._segment.featureCommon.sendButtonEvent(k)}attemptToRescueUnit(k){if(!nt.A.isDefined(k)||!k.isInARescuableState())return;const B=new xt.a(at.q.instance.prodigy.game,k),U=k.battleId,F=()=>{this.onSpellTargetChosen.dispatch(),this.spellCardsController.inputBlocker.active=!0,this._stateMachine.goToState(he.N,{type:G.EBattleAction.CastSpell,id:this.battleConstants.rescueSpellId,targets:[U]}),k.updatePetRescueTooltip()};B.onRescueContinue.add((()=>{F(),B.destroy()})),B.onRescueDismissed.add((()=>{B.destroy()})),B.onRescueFailed.add((U=>{var F,G,j,$;U===xt.n.CannotAfford?(null===(G=null===(F=null==this?void 0:this.spellCardsController)||void 0===F?void 0:F.targetController)||void 0===G||G.showHardCurrencyBalanceTooltip(k.creature),null===($=null===(j=null==this?void 0:this.spellCardsController)||void 0===j?void 0:j.targetController)||void 0===$||$.onHardCurrencyBalanceTooltipHidden.addOnce((()=>B.onRescueDismissed.dispatch()))):B.destroy()})),B.start()}updateWalletDisplay(k){var B,U;let F;if(k){F={currency:27,value:at.q.instance.prodigy.gameContainer.get("306-5359").getCurrencyAmount(27)}}null===(U=null===(B=this.spellCardsController)||void 0===B?void 0:B.targetController)||void 0===U||U.setHardCurrencyBalanceDisplay(F)}debugCurrencyDrops(k,B){const U=B.filter((k=>"gold"===k.type||"currency"===k.type)).map((k=>`${k.type} ${k.ID}: ${k.N}`)),F=U.length>0?U.join(", "):"None";Mt.R.addDebugMessage(`${k}:\n${F}`)}hideUnitInfoTooltip(){this._unitInfoTooltip.onPetRescueButtonClicked.removeAll(this),this.sendShowUnitTooltipEvent(null),this.updateWalletDisplay(!1)}getStartBattleDebug(){const k=at.q.instance.prodigy.battle,B=[],U=[],F=[];this.getTeam(jt.h.Away).units.forEach((k=>{var G;"pet"===k.data.type&&(B.push(k.data.asset.id),U.push(k.level),F.push(null!==(G=k.data.mergeRank)&&void 0!==G?G:0))}));const G=null==k?void 0:k.battleMods;return G&&(G.encounter=void 0,G.maxTeamSize=void 0,G.minTeamSize=void 0,G.pets=void 0),`startBattle([${B.join(",")}], [${U.join(",")}], [${F.join(",")}], ${JSON.stringify(null!=G?G:{})})`}}be.NETWORK_LAG_MESSAGE_DELAY_MS=4e3,be.TURN_INDICATOR_ACTIVATE_ANIMATIONS={[jt.X.Small]:ae.SmallActivate,[jt.X.Normal]:ae.NormalActivate,[jt.X.Medium]:ae.LargeActivate,[jt.X.Large]:ae.LargeActivate,[jt.X.Huge]:ae.LargeActivate},be.TURN_INDICATOR_IDLE_ANIMATIONS={[jt.X.Small]:ae.SmallIdle,[jt.X.Normal]:ae.NormalIdle,[jt.X.Medium]:ae.LargeIdle,[jt.X.Large]:ae.LargeIdle,[jt.X.Huge]:ae.LargeIdle},be.TURN_INDICATOR_DEACTIVATE_ANIMATIONS={[jt.X.Small]:ae.SmallDeactivate,[jt.X.Normal]:ae.NormalDeactivate,[jt.X.Medium]:ae.LargeDeactivate,[jt.X.Large]:ae.LargeDeactivate,[jt.X.Huge]:ae.LargeDeactivate},(0,F.Cg)([(0,It.d)("NetworkHandler"),(0,F.Sn)("design:type",Xt.m)],be.prototype,"_networkHandler",void 0),(0,F.Cg)([(0,Ot.b)("073-6f3b"),(0,F.Sn)("design:type",Object)],be.prototype,"_featureProvider",void 0),(0,F.Cg)([(0,Ot.b)("d0e-64fd"),(0,F.Sn)("design:type",j.wNP)],be.prototype,"_prefabLoader",void 0),(0,F.Cg)([(0,It.d)("GameDataProvider"),(0,F.Sn)("design:type",Qt.q)],be.prototype,"_gameDataProvider",void 0),(0,F.Cg)([(0,Ot.b)("c47-20b6"),(0,F.Sn)("design:type",Et.Y)],be.prototype,"_segment",void 0),(0,F.Cg)([(0,It.d)("LocalConfig"),(0,F.Sn)("design:type",Object)],be.prototype,"_localConfig",void 0)},71790:(k,B,U)=>{"use strict";U.d(B,{T:()=>V});var F=U(8674),G=U(87490),j=U(79687),$=U(24521),H=U(23029);let V=class{get constants(){var k,B;return null!==(B=null===(k=H.R.loadData($.r.BattleRevampConstants_json))||void 0===k?void 0:k.battleConstants)&&void 0!==B?B:(new G.HardCodedConstantsDataProvider).constants}};V=(0,F.Cg)([(0,j.injectable)()],V)},80494:(k,B,U)=>{"use strict";var F;U.d(B,{t:()=>F}),function(k){k.BattleAcademyClassroomIceTower="battle-academy-classroom-icetower",k.BattleAcademyClassroom="battle-academy-classroom",k.BattleAcademyGh="battle-academy-gh",k.BattleAcademyGhStairs="battle-academy-gh-stairs",k.BattleAcademyOfficeIceTower="battle-academy-office-icetower",k.BattleAcademyOffice="battle-academy-office",k.BattleArchives="battle-archives",k.BattleBonfireInside="battle-bonfire-inside",k.BattleBonfireLava="battle-bonfire-lava",k.BattleBonfireOutside="battle-bonfire-outside",k.BattleBonfireTitan="battle-bonfire-titan",k.BattleForestGeneric="battle-forest-generic",k.BattleForestOutside="battle-forest-outside",k.BattleLamplightOutside="battle-lamplight-outside",k.BattleLamplightOutsidePumpkinFest="battle-lamplight-outside-pumpkinfest",k.BattleLamplightOutsidePumpkinFestNight="battle-lamplight-outside-pumpkinfest-night",k.BattleLamplightOutsideSpringfest="battle-lamplight-outside-springfest",k.BattleLamplightOutsideWinterfest="battle-lamplight-outside-winterfest",k.BattleLamplightOutsideSummerfest="battle-lamplight-outside-summerfest",k.BattleLamplightOutsideStarlight="battle-lamplight-outside-starlight",k.BattleMoon="battle-moon",k.BattleMoonlight="battle-moonlight",k.BattleShipwreckInside="battle-shipwreck-inside",k.BattleShipwreckOutside="battle-shipwreck-outside",k.BattleShipwreckUnderwater="battle-shipwreck-underwater",k.BattleShiverchillInside="battle-shiverchill-inside",k.BattleShiverchillOutside="battle-shiverchill-outside",k.BattleSkywatchInside="battle-skywatch-inside",k.BattleSkywatchOutside="battle-skywatch-outside",k.BattleTowerInside="battle-tower-inside",k.BattleGrotto="battle-grotto"}(F||(F={}))},81531:(k,B,U)=>{"use strict";U.d(B,{q:()=>j});var F=U(95891),G=U(77938);class j{constructor(k){this._overrides=null!=k?k:{}}getItem(k,B){var U;const j=G.t.getItem(k,B),$=null===(U=this._overrides[k])||void 0===U?void 0:U[`${B}`];return F.merge({},j,$)}}},17710:(k,B,U)=>{"use strict";U.d(B,{D:()=>Q});var F=U(91323),G=U(87490),j=U(62459),$=U(88022),H=U(43523),V=U(25531),W=U(29738),q=U(43846),K=U(77938),z=U(76277),Y=U(30226);class Q{static formatStatusEffectDescription(k,B,U){const G=Q.getTargetReplacementString(U),j=W.O.isEnglishLocale()?(0,F.t)("turn",B):(0,q.k)("STATUS_EFFECT_TURNS");return V.w.replaceMultiple(k,["{NUMBER_OF_TURNS}","{TURNS}","{TARGET}"],B,j,G)}static getStatusEffectInjectedValues(k){var B,U,F;!1===(0,z.G)(H.P)&&(k.statusEffects=[]);const G=null===(B=k.statusEffects)||void 0===B?void 0:B[0],V=null==G?void 0:G.statusEffectId;if(!j.Aq$.isDefined(V))return{SPELL_HAS_STATUS_EFFECT:!1};const W=K.t.getItem("statusEffect",V),X=null==W?void 0:W.data,Z=null!==(F=null===(U=null==G?void 0:G.duration)||void 0===U?void 0:U.remainingDuration)&&void 0!==F?F:0,J=W?Y.J.getItemName(W):"",tt=W?(0,q.k)(Y.J.getLocalizationFlavorKey(W)):"";return{SPELL_HAS_STATUS_EFFECT:!0,SPELL_STATUS_EFFECT_NAME:J,SPELL_STATUS_EFFECT_DESCRIPTION:Q.formatStatusEffectDescription(tt,Z),SPELL_STATUS_EFFECT_ICON:[$._.Ui_spell_effect_icons_json,X.icon]}}static getTargetReplacementString(k){switch(null==k?void 0:k.statGrowthTrackName){case G.EStatGrowthTrackName.Boss:case G.EStatGrowthTrackName.IllusionBoss:case G.EStatGrowthTrackName.PuppetMaster:return(0,q.k)("TARGET_BOSS");case G.EStatGrowthTrackName.Miniboss:case G.EStatGrowthTrackName.Pippet:return(0,q.k)("TARGET_MINIBOSS");case G.EStatGrowthTrackName.Wizard:case G.EStatGrowthTrackName.HoodedWizard:return(0,q.k)("TARGET_WIZARD");case G.EStatGrowthTrackName.DragonBoss:return(0,q.k)("TARGET_DRAGON");default:return(0,q.k)("TARGET_PET")}}}},23506:(k,B,U)=>{"use strict";U.d(B,{V:()=>j});var F=U(62459),G=U(59685);class j{static getBotPersonalityInstanceConfig(k,B){var U;const G=this.globalDuelBotPersonalityConfig.streakConfig.reduce(((k,B)=>B.playerStreak>k?B.playerStreak:k),-1/0),j=this.globalDuelBotPersonalityConfig.streakConfig.reduce(((k,B)=>B.playerStreakk.playerStreak===$)))&&void 0!==U?U:this.globalDuelBotPersonalityConfig.streakConfig[0],V=this.globalDuelBotPersonalityConfig.timingsConfig;return{timings:{questionAnswer:{timings:{average:F.cj9.random(V.questionAnswer.timings.average.min,V.questionAnswer.timings.average.max),variance:V.questionAnswer.timings.variance},maxTimeOverPlayer:V.questionAnswer.maxTimeOverPlayer},spellChoiceTimings:{average:F.cj9.random(V.spellChoiceTimings.average.min,V.spellChoiceTimings.average.max),variance:V.spellChoiceTimings.variance}},streakModifiers:H,personalityType:k}}}j.GLOBAL_DUEL_BOT_TIME_CONFIG={questionAnswer:{timings:{average:{min:15,max:35},variance:.3},maxTimeOverPlayer:8},spellChoiceTimings:{average:{min:4,max:8},variance:.3}},j.GLOBAL_DUEL_BOT_STREAK_BASED_CONFIG=[{playerStreak:-2,questionAnswerPenalty:.66,levelOffset:-3,streakOffset:0,elementalPrep:G.E.Dumb},{playerStreak:-1,questionAnswerPenalty:.33,levelOffset:-2,streakOffset:0,elementalPrep:G.E.Dumb},{playerStreak:0,questionAnswerPenalty:.25,levelOffset:-1,streakOffset:0,elementalPrep:G.E.Dumb},{playerStreak:1,questionAnswerPenalty:.25,levelOffset:0,streakOffset:0,elementalPrep:G.E.Dumb},{playerStreak:2,questionAnswerPenalty:.2,levelOffset:0,streakOffset:0,elementalPrep:G.E.Ok},{playerStreak:3,questionAnswerPenalty:.15,levelOffset:0,streakOffset:1,elementalPrep:G.E.Ok},{playerStreak:4,questionAnswerPenalty:.1,levelOffset:1,streakOffset:1,elementalPrep:G.E.Smart},{playerStreak:5,questionAnswerPenalty:.1,levelOffset:1,streakOffset:2,elementalPrep:G.E.Smart},{playerStreak:6,questionAnswerPenalty:.05,levelOffset:2,streakOffset:3,elementalPrep:G.E.Tricky},{playerStreak:7,questionAnswerPenalty:.05,levelOffset:3,streakOffset:4,elementalPrep:G.E.Tricky},{playerStreak:8,questionAnswerPenalty:0,levelOffset:4,streakOffset:5,elementalPrep:G.E.Reversed}],j.globalDuelBotPersonalityConfig={timingsConfig:j.GLOBAL_DUEL_BOT_TIME_CONFIG,streakConfig:j.GLOBAL_DUEL_BOT_STREAK_BASED_CONFIG}},39070:(k,B,U)=>{"use strict";U.d(B,{i:()=>K});var F=U(8674),G=U(62459),j=U(88541),$=U(35120),H=U(71586),V=U(30226),W=U(4845);class q extends W.P{validateRoom(k){return super.validate({room:k.room,inSchoolHours:k.inSchoolHours,playerLevel:k.player.getLevel(),isMember:k.isMember,numBattlesUsed:k.numBattlesUsed},[()=>this.meetsEntryCostRequirement(k.room,k.player)])}meetsEntryCostRequirement(k,B){if(!k.entryCost)return{eligible:!0};const U=Array.isArray(k.entryCost)?k.entryCost:[k.entryCost],F=U.every((k=>{var U,F;return"gold"===k.type?B.getGold()>=k.amount:(null===(F=B.backpack.getItem(k.type,null!==(U=k.id)&&void 0!==U?U:-1))||void 0===F?void 0:F.N)>=k.amount}));return this._noEntryCostKeys.tooltip.body.args=[U[0].amount,U[0].type],this.getEligibilityObject(F,W.R.NoEntryCost)}}class K{static getValidatedRoomsConfig(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=j.GM;B.rooms=B.rooms.filter((k=>k.active));const U=$.q.instance.prodigy.gameContainer.get("56f-1ccb"),F=yield U.getDailyDuelUses(),W=H.R.getNowWithServerTimezoneOffset(),K=new q($.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService)),z=B.rooms.map((B=>{var U,G;return Object.assign(Object.assign(Object.assign({},B),K.validateRoom({room:B,player:k,inSchoolHours:V.J.isDateWithinSchoolHours(W)&&V.J.isSchoolDay(W),isMember:k.hasMembership(),numBattlesUsed:null!==(U=F[B.id])&&void 0!==U?U:0})),{numBattlesUsed:null!==(G=F[B.id])&&void 0!==G?G:0})}));return Object.assign(Object.assign({},B),{rooms:z})}))}}},75408:(k,B,U)=>{"use strict";U.d(B,{d:()=>ot});var F,G=U(8674),j=U(62459),$=U(95891),H=U(88022),V=U(99625),W=U(36648),q=U(88541),K=U(4845),z=U(35120),Y=U(43846),Q=U(73797),X=U(23082),Z=U(13956),J=U(64353),tt=U(95057),et=U(31211),it=U(6719),st=U(47255),nt=U(52491),at=U(64007),rt=U(39070);!function(k){k.PlayerPosition="PLAYER_POSITION",k.OnClose="ON_CLOSE",k.RoomsData="ROOMS_DATA",k.BackingColor="BACKING_COLOR",k.HeaderImage="HEADER_IMAGE",k.HeaderTextColor="HEADER_TEXT_COLOR",k.RoomName="ROOM_NAME",k.IsFindMatchDisabled="IS_FIND_MATCH_DISABLED",k.IsRoomCardDisabled="IS_ROOM_CARD_DISABLED",k.IsLockedLevel="IS_LOCKED_LEVEL",k.IsLockedTime="IS_LOCKED_TIME",k.LockBarColor="LOCK_BAR_COLOR",k.LockMessage="LOCK_MESSAGE",k.BorderColor="BORDER_COLOR",k.ContentBackingColor="CONTENT_BACKING_COLOR",k.ContentBorderColor="CONTENT_BORDER_COLOR",k.RewardIcon="REWARD_ICON",k.RewardText="REWARD_TEXT",k.KeyStates="KEY_STATES",k.KeyState="KEY_STATE",k.LowerLockVisible="LOWER_LOCK_VISIBLE",k.LowerLockCalendar="LOWER_LOCK_CALENDAR",k.LowerLockLock="LOWER_LOCK_LOCK",k.LowerLockMessage="LOWER_LOCK_MESSAGE",k.CostBackingColor="COST_BACKING_COLOR",k.CostText="COST_TEXT",k.CostTextColor="COST_TEXT_COLOR",k.CostIcon="COST_ICON",k.OnClickFindMatch="ON_CLICK_FIND_MATCH",k.NumBattlesUsed="NUM_BATTLES_USED",k.ElementalBoostText="ELEMENTAL_BOOST_TEXT",k.ElementalBoostTextColor="ELEMENTAL_BOOST_TEXT_COLOR",k.ElementalBoostTextStrokeColor="ELEMENTAL_BOOST_TEXT_STROKE_COLOR",k.ElementalBoostIcon="ELEMENTAL_BOOST_ICON"}(F||(F={}));class ot{static openDuelsStadiumMenu(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=j.wa5.getActiveScene().container.get(F.PlayerPosition),U=null!=B?B:z.q.instance.game.broadcaster.broadcast(Q.pm.GetTarget,z.q.instance.game,[!0]),G=yield rt.i.getValidatedRoomsConfig(),H=$.uniq(G.rooms.reduce(((k,B)=>(B.style.headerImage&&k.push(it.y.toInjectionParams(B.style.headerImage)[0]),B.style.headerImageDisabled&&k.push(it.y.toInjectionParams(B.style.headerImageDisabled)[0]),B.prizeIcon&&k.push(it.y.toInjectionParams(B.prizeIcon)[0]),k)),[]));z.q.instance.prodigy.audio.playBGM(z.q.instance.prodigy.world.getZone(z.q.instance.prodigy.world.getCurrentZone()).bgmID,!0),z.q.instance.prodigy.startPrefabScene([V.l.DuelsStadiumMenu],{preloadAssets:H,injectedValues:Object.assign(Object.assign({},yield ot.getElementalBoostInjectionDictionary()),{[F.OnClose]:null!=k?k:ot.getCloseToMapCallback.bind(this,U),[F.RoomsData]:G.rooms.map((k=>{var B,G,j,$,H,V,W,Y,Q,Z,J,tt,et,st;const nt=!k.eligible&&!!(null===(G=null===(B=k.ineligibleReason)||void 0===B?void 0:B.card)||void 0===G?void 0:G.topMessage);let at=k.style;nt&&k.ineligibleReason.type!==K.R.TimeOfDayLocked&&(at=Object.assign(Object.assign(Object.assign({},at),q.Ct),{headerImage:at.headerImageDisabled}));return{[F.BackingColor]:at.backingColor,[F.HeaderImage]:it.y.toInjectionParams(at.headerImage),[F.HeaderTextColor]:at.headerTextColor,[F.RoomName]:this._localizer.getText(k.nameKey),[F.IsRoomCardDisabled]:nt,[F.IsFindMatchDisabled]:!k.eligible&&(null===(j=k.ineligibleReason)||void 0===j?void 0:j.type)!==K.R.NoMembership,[F.IsLockedLevel]:!k.eligible&&(null===($=k.ineligibleReason)||void 0===$?void 0:$.type)===K.R.LevelLocked,[F.IsLockedTime]:!k.eligible&&(null===(H=k.ineligibleReason)||void 0===H?void 0:H.type)===K.R.TimeOfDayLocked,[F.LockBarColor]:at.lockBarColor,[F.LockMessage]:null===(W=null===(V=k.ineligibleReason)||void 0===V?void 0:V.card)||void 0===W?void 0:W.topMessage,[F.BorderColor]:at.borderColor,[F.ContentBackingColor]:at.contentBackingColor,[F.ContentBorderColor]:at.contentBorderColor,[F.KeyStates]:this.getKeyStatesInjectionList(k),[F.LowerLockVisible]:!!(null===(Q=null===(Y=k.ineligibleReason)||void 0===Y?void 0:Y.card)||void 0===Q?void 0:Q.bottomMessage),[F.LowerLockCalendar]:(null===(Z=k.ineligibleReason)||void 0===Z?void 0:Z.type)===K.R.NoBattlesAvailable,[F.LowerLockLock]:[K.R.LevelLocked,K.R.TimeOfDayLocked].includes(null===(J=k.ineligibleReason)||void 0===J?void 0:J.type),[F.LowerLockMessage]:null===(et=null===(tt=k.ineligibleReason)||void 0===tt?void 0:tt.card)||void 0===et?void 0:et.bottomMessage,[F.RewardText]:`${this.itemAmountToInjectionParams(k.prize)}\n${this._localizer.getText("GOLD")}`,[F.RewardIcon]:it.y.toInjectionParams(k.prizeIcon),[F.CostBackingColor]:at.costBackingColor,[F.CostText]:this.itemAmountToInjectionParams(k.entryCost),[F.CostTextColor]:k.eligible||(null===(st=k.ineligibleReason)||void 0===st?void 0:st.type)!==K.R.NoEntryCost?void 0:"#b80000",[F.OnClickFindMatch]:()=>{var B;if(k.eligible)return z.q.instance.prodigy.gameContainer.get("c47-20b6").duelsStadium.sendRoomSelectedEvent(k),z.q.instance.game.state.start(X.G.DuelMatchmaking,void 0,U,k.id);(null===(B=k.ineligibleReason)||void 0===B?void 0:B.type)===K.R.NoMembership&&this.openMembershipPrompt()}}}))})})}))}static itemAmountToInjectionParams(k){return`${k?(Array.isArray(k)?k[0]:k).amount:(0,Y.k)("ITEMCARD_FREE")}`}static getCloseToMapCallback(k){const B=j.wa5.getActiveScene().getLayer(nt.A.LEGACY_MENU_LAYER_NAME);z.q.instance.prodigy.open.menuLayer=B,z.q.instance.prodigy.open.map({onCloseButtonClicked:()=>{const B=z.q.instance.prodigy.gameContainer.get("306-5359");z.q.instance.prodigy.world.it(B.data.zone,null==k?void 0:k.x,null==k?void 0:k.y)}})}static getKeyStatesInjectionList(k){const B=Math.min(k.numBattlesUsed,k.freeBattles),U=Math.max(0,k.freeBattles-k.numBattlesUsed),G=Math.max(0,k.numBattlesUsed-k.freeBattles),j=k.memberBattles-G;return[...$.range(B).map((()=>({[F.KeyState]:q.d6.FreeUsed}))),...$.range(U).map((()=>({[F.KeyState]:q.d6.Free}))),...$.range(G).map((()=>({[F.KeyState]:q.d6.MemberUsed}))),...$.range(j).map((()=>({[F.KeyState]:q.d6.Member})))]}static openMembershipPrompt(){let k=!1;const B=J.P.shouldUseUnifiedConversionFlow(st.o.FunnelLockedStadiumRoom)?tt.R.UnifiedConversionFlow:tt.R.DynamicMemberPrompt;z.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:"Stadium-Member-Locked-Room",category:"Duels",contentId:null,adType:B,adVersion:J.P.getAdVersion(st.o.FunnelLockedStadiumRoom)});const U=z.q.instance.prodigy.open;U.membershipInfo((()=>{z.q.instance.prodigy.gameContainer.get("306-5359").hasMembership()&&!k&&(k=!0,ot.openDuelsStadiumMenu().catch(j.RQr.createHandler("Failed to open Duels Stadium Menu after closing membership prompt")))}),{conversionFunnelName:st.o.FunnelLockedStadiumRoom});const F=U.menus.find((k=>k instanceof et.v));F&&F.onCreate.addOnce((()=>{var k;return null===(k=F.prefabGameObject)||void 0===k?void 0:k.setLayer(nt.A.LEGACY_MENU_LAYER_NAME,!0)}))}static getElementalBoostInjectionDictionary(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=z.q.instance.prodigy.gameContainer.get("ce9-b630");yield k.cacheElementalBoost();const B=at._.ELEMENT_BOOST_TEXT_CONFIG[k.elementalBoost];return{[F.ElementalBoostText]:this._localizer.getText(B.localizationKey),[F.ElementalBoostTextColor]:B.textColor,[F.ElementalBoostTextStrokeColor]:B.textStrokeColor,[F.ElementalBoostIcon]:[H._.Ui_battle_revamp_json,`icon-mini-element-${k.elementalBoost}`]}}))}static getElementalBoostModifierIconInjectionData(k){const B=at._.ELEMENT_BOOST_TEXT_CONFIG[k];return{IS_BUFF:!0,DISABLED:!1,MODIFIER_ICON:ot.getGuidForBoostIcon(k),MODIFIER_TEXT:"",MODIFIER_TOOLTIP_TITLE:this._localizer.getText(B.localizationKey),MODIFIER_TOOLTIP_TEXT:this._localizer.getText(B.descriptionLocalizationKey)}}static getGuidForBoostIcon(k){return W.q[`Effect_${k}_buff_2_small`]}}(0,G.Cg)([(0,Z.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],ot,"_localizer",void 0)},58203:(k,B,U)=>{"use strict";U.d(B,{m:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(76546);let H=class extends $.D{get networkRequestBehaviour(){return{timeoutMs:3e4,retryCount:185,retryIntervalMs:1e3,retryIncrementMs:1e3,retryMaxDelayMs:1e4}}createBattle(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Battle.Start,{config:k})}))}createBattleSim(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Battle.Debug.SimulateBattle,{config:k})}))}doStatusEffectSim(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Battle.Debug.SimulateStatusEffectCalculations,{config:k})}))}doBattleAction(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Battle.Action,{action:k,battleId:B})}))}doDebugCommand(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){0}))}resumeBattle(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Battle.Resume,null)}))}escapeBattle(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Battle.Escape,null,!0)}))}clearBattleState(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(j.D.Battle.ClearBattleState,{},!0)}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},60668:(k,B,U)=>{"use strict";U.d(B,{o:()=>q});var F=U(87490),G=U(62459),j=U(35120),$=U(34829),H=U(44094),V=U(95807),W=U(21945);class q extends V.Z{constructor(){super(),this._qiOpenTimeout=window.setTimeout((()=>{this.fireFailureSegmentEvent()}),2e4),this.openQI=this.openQI.bind(this)}enter(){this.openQI()}openQI(){this.battleController.alertActiveUnitMpEmpty().then((()=>{if(G.wa5.getActiveScene().container.rebind("84a-1738").toConstantValue(Date.now()),$.s.get("GameConstants.Debug.EDUCATION_ENABLED")){const k=G.wa5.getActiveScene().container.get("976-9e42");k.OnQuestionOpened.addOnce((()=>window.clearTimeout(this._qiOpenTimeout))),k.OnQuestionAnswered.addOnce(this.onQuestionAnswered.bind(this)),k.open({forceAnswerBonus:!0,energyCost:0,allowTutorials:this.battleController.allowVideoLessons,canInstantWin:!1,showTopicBadgeAnimations:this.battleController.showQiBadgeAnimations})}else this.onQuestionAnswered(Math.random()<$.s.get("GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT"),0,10)})).catch((k=>{G.RQr.logError(k,"Error opening question interface"),this.stateMachine.showThrownErrorDialog(k)}))}onQuestionAnswered(k,B,U,G,j,$,H){k&&this.battleController.textLog.showMessage("BATTLE_REVAMP_TEXT_POWER_UP"),this.stateMachine.segment.battleRevamp.updateQuestionData(k,H),this.stateMachine.goToState(W.N,{type:F.EBattleAction.PowerUp,correctAnswer:k,nFactor:null!=U?U:1})}fireFailureSegmentEvent(){j.q.instance.prodigy.gameContainer.get("c47-20b6").sendCustomEvent("Answer Question State No QI",{instance_id:H.$.generateUID(),battleId:this.battleController.battleId,battleType:this.battleController.type})}exit(){window.clearTimeout(this._qiOpenTimeout)}}},52516:(k,B,U)=>{"use strict";U.d(B,{W:()=>Q});var F=U(8674),G=U(87490),j=U(62459),$=U(82351),H=U(35120),V=U(50084),W=U(34234),q=U(81531),K=U(60668),z=U(95807),Y=U(21945);class Q extends z.Z{enter(){this.battleController.activeUnit.currentMp<=0?this.stateMachine.goToState(K.o):(this.attachTargetSignals(),this.battleController.onChoosingSpell.dispatch())}exit(){const k=this.battleController.spellCardsController.targetController;k.onTargetConfirmed.removeAll(this),k.onActionChange.removeAll(this.battleController.activeUnit)}attachTargetSignals(){this.battleController.updateSpellCards();const k=this.battleController.spellCardsController.targetController;k.onTargetConfirmed.add(this.processTargetConfirmed,this),k.onActionChange.add(this.battleController.activeUnit.onSelectSpell,this.battleController.activeUnit)}processTargetConfirmed(k,B){var U;try{const F=B.targets.filter((k=>j.Aq$.isDefined(k.battleId)&&k.isTargetable)).map((k=>k.battleId));H.q.instance.prodigy.audio.playSFXFromGUID($.B.Sfx_unit_select);const W=()=>{this.battleController.onSpellTargetChosen.dispatch(),this.battleController.spellCardsController.inputBlocker.active=!0,this.stateMachine.goToState(Y.N,{type:G.EBattleAction.CastSpell,id:k.spellId,targets:F})};if(null===(U=this._gameDataProvider.getItem("spellV2",k.spellId).data.flags)||void 0===U?void 0:U.some((k=>k.flag===G.ESpellFlag.Rescue))){const k=this.battleController.rightTeam.units.find((k=>k.data.unitId===F[0])),B=new V.a(H.q.instance.prodigy.game,k);B.onRescueContinue.add((()=>{W(),B.destroy()})),B.onRescueDismissed.add((()=>{this.attachTargetSignals(),B.destroy()})),B.onRescueFailed.add((U=>{if(U===V.n.CannotAfford){const U=this.battleController.spellCardsController.targetController;U.showHardCurrencyBalanceTooltip(k.creature),U.onHardCurrencyBalanceTooltipHidden.addOnce((()=>B.onRescueDismissed.dispatch()))}else B.destroy()})),B.start()}else W()}catch(e){j.RQr.logError(e,"Error processing target"),this.stateMachine.showThrownErrorDialog(e)}}}(0,F.Cg)([(0,W.d)("GameDataProvider"),(0,F.Sn)("design:type",q.q)],Q.prototype,"_gameDataProvider",void 0)},78355:(k,B,U)=>{"use strict";U.d(B,{$:()=>H});var F=U(62459),G=U(35120),j=U(23082),$=U(95807);class H extends $.Z{enter(){this.battleController.onDefeat().then((()=>{const k=this.battleController.getDefeatData();if(!(null==k?void 0:k.preventDefaultTeleport)){const B=G.q.instance.game;(null==k?void 0:k.teleportData)&&B.state.states.get(j.G.Faint).updateTeleportData(null==k?void 0:k.teleportData),B.state.start(j.G.Faint,!1)}this.stateMachine.onDefeat.dispatch()})).catch((k=>{F.RQr.logError(k,"Error in battle defeat state"),this.stateMachine.showThrownErrorDialog(k)}))}}},69297:(k,B,U)=>{"use strict";U.d(B,{L:()=>j});var F=U(62459),G=U(95807);class j extends G.Z{enter(){this.battleController.onEscape().then((()=>{this.stateMachine.onEscape.dispatch()})).catch((k=>{F.RQr.logError(k,"Error in EscapeBattleState"),this.stateMachine.showThrownErrorDialog(k)}))}}},63046:(k,B,U)=>{"use strict";U.d(B,{B:()=>Rt});var F=U(87490),G=U(62459),j=U(35120),$=U(52516),H=U(95807),V=U(52855);class W extends V.a{enter(){const k=this._data,B=this.battleController.getUnitById(k.affix.unitId);null==B||B.showAffix(k.affix).catch(G.RQr.createHandler("Error adding affix to unit")).finally((()=>this.stateMachine.goToState(Rt)))}}var q=U(8674),K=U(40671),z=U(77938),Y=U(10670),Q=U(42430),X=U(30226);class Z extends V.a{constructor(k){super(k),this.statusEffectId=k.statusEffects[0].statusEffectId}enter(){const k=this.battleController.spellRoot.addComponent(Q.o);this.handleUpdate(k).catch(G.RQr.createHandler(`${this._data.type}: Error handling update for ${this.statusEffectId}`)).finally((()=>{k.destroy(),this.stateMachine.goToState(Rt)}))}handleUpdate(k){return(0,q.sH)(this,void 0,void 0,(function*(){const B=z.t.getItem("statusEffect",this.statusEffectId);if(!B)throw new Error("Status effect item not found");const U=Object.assign({id:this.statusEffectId},B.data),F=[],G=this._data.statusEffects;for(let k=0;k{F.forEach((k=>this.handleDamageApplied(k)))})),k.OnDestroy.add((()=>{F.forEach((k=>this.handleSpellCompleted(k)))})),yield k.preloadAssets(),yield k.begin({targets:F.map((k=>({unitId:k.battleId,gameObject:k.creature.creatureGameObject,statusEffectContainer:k.statusEffectContainer}))),manager:k,multiHit:1});for(const k of F)if(k.data.health.current<=0){const B=this.battleController.activeUnit;k.battleId===(null==B?void 0:B.battleId)&&(yield this.battleController.deactivateTurnIndicator()),yield this.defeatUnits([k])}}else F.forEach((k=>this.handleSpellCompleted(k)))}))}getSpellGuid(k){}updateBattleUnit(k){return(0,q.sH)(this,void 0,void 0,(function*(){}))}handleDamageApplied(k){}handleSpellCompleted(k){}getSpellGuidFromName(k){if(!k)return;const B=K.z[k];if(X.J.isGuid(B))return B;G.VyI.log(`"${k}" is not a valid spell`,G.$bb.Error)}sendSegmentEvent(k,B){var U,j;const $=this.stateMachine.segment.battleRevamp,H=B.map((k=>k.unitId)),V=H.map((k=>this.battleController.getUnitById(k))).filter((k=>void 0!==k));if(0===V.length)return void G.VyI.log(`No target battle units found for status effect ID ${k.id}`,G.$bb.Error);const W=V[0].data.teamId===F.ETeamId.Home?Y.B1.Player:Y.B1.Opponent,q=k.type;let K,z,Q,X;k.affixes.forEach((k=>{var B;k.type===F.EAffixType.Stat&&(K=k.stat,z=null!==(B=k.amount)&&void 0!==B?B:k.multiplier),k.type!==F.EAffixType.ApplyDamage&&k.type!==F.EAffixType.BonusElement||(Q=k.element),k.type!==F.EAffixType.ApplyDamage&&k.type!==F.EAffixType.ApplyHealing||(X=k.whenToTrigger)}));const Z={spell_id:B[0].spellId,status_effect_id:k.id.toString(),target_team:W,effect_type:q,modified_stat:K,modified_stat_value:z,element:Q,trigger_type:X};if(this._data.type===F.EBattleStateUpdate.AddStatusEffect){const k=B[0].remainingDuration;let U;X===F.EWhenToTrigger.WhenDurationExpires?U=k:X!==F.EWhenToTrigger.StartOfTurn&&X!==F.EWhenToTrigger.EndOfTurn||(U=1),$.sendSpellStatusEffectAppliedEvent(Object.assign({hit_targets:H,intended_targets:this._data.intendedTargets,rounds_active:k,rounds_till_triggered:U},Z))}if(this._data.type===F.EBattleStateUpdate.TriggerStatusEffect){const k=B[0].remainingDuration,F=null!==(j=null===(U=this._data.hitData)||void 0===U?void 0:U.damage)&&void 0!==j?j:0;$.sendSpellStatusEffectTriggeredEvent(Object.assign({target:H[0],number_of_times_triggered:B[0].timesTriggered,rounds_remains_active:k,damage:F},Z))}}}class J extends V.a{enter(){const k=this._data,B=k.unitData;this.battleController.addUnitToTeam(Object.assign({unitId:k.unitId},B),B.teamId).then((()=>{j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`${k.unitId} added to team ${B.teamId}`,G.$bb.Info),this.stateMachine.goToState(Rt)})).catch(G.RQr.createHandler(`Error adding ${k.unitId} to team ${B.teamId}`))}}var tt=U(28628),et=U(71543),it=U(74640);class st extends V.a{enter(){var k,B,U;const F=this._data,G=F.victoriousTeamId?F.victoriousTeamId===this.battleController.leftTeam.id?tt.XK.Victory:tt.XK.Defeat:tt.XK.Escape,$=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player;F.xpToAward&&(this.battleController.awardedXpData=F.xpToAward),this.battleController.postBattleRescuablePets=null!==(k=F.rescuablePets)&&void 0!==k?k:[],this.battleController.magicoinRewardGranted=null!==(B=F.magicoinRewardGranted)&&void 0!==B&&B,$.battleStreak=null===(U=null==F?void 0:F.lifetimeBattleStats)||void 0===U?void 0:U.battleStreak;const H=F.resumePreviousBattleData;H&&et.p.canResumeBattle()&&($.battleResumeData={battleType:H.battleType,data:H.clientState}),this.stateMachine.goToState(it.G,{battleResult:G,rewards:F.rewards,memberRewards:F.memberRewards,rewardsScalingInfo:F.rewardsScalingInfo,magicoinRewardGranted:F.magicoinRewardGranted,magicoinRewardEligible:F.magicoinRewardEligible,magicoinRewardGuaranteed:F.magicoinRewardGuaranteed})}}var nt=U(60604);U(34829);class at extends V.a{enter(){this.stateMachine.goToState(Rt)}}var rt=U(62886),ot=U(60157),ht=U(13956),ct=U(55080);class dt extends V.a{enter(){var k;const B=this.battleController.getUnitById(this._data.unitId);this._featureFlags.getValue("enableVerboseSecureBattle",!1)&&G.VyI.log("Unit defeated",G.$bb.Info,null==B?void 0:B.isDefeated(),null==B?void 0:B.isRescued,B),B&&!B.isRescued&&(null===(k=this._dynamicStore)||void 0===k||k.forceEnableDataUpdate(),this.sendDefeatUnitEvent(B)),this.stateMachine.goToState(Rt)}sendDefeatUnitEvent(k){const B=j.q.instance.prodigy.gameContainer.get("a25-68f4"),U={params:{taskEventType:ot.Z7.Unit,unitType:k.data.type,id:k.creature.id,name:k.creature.name,nickname:k.creature.nickname,team:k.data.teamId}};B.sendQuestEventViaHub(rt.T.DEFEAT_UNIT,U).catch(G.RQr.createHandler("Error sending a quest event for defeating a unit"))}}(0,q.Cg)([(0,ht.b)("80c-6fa4"),(0,q.Sn)("design:type",Object)],dt.prototype,"_featureFlags",void 0),(0,q.Cg)([(0,ht.b)("7a1-ff33"),(0,q.Sn)("design:type",ct.s)],dt.prototype,"_dynamicStore",void 0);class lt extends V.a{enter(){this.run(this._data).catch((k=>{G.RQr.logError(k,"Error letting unit escape from battle"),this.stateMachine.showThrownErrorDialog(k)}))}run(k){return(0,q.sH)(this,void 0,void 0,(function*(){j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`[Battle Revamp] A unit has escaped! Unit ID: ${k.unitId}`,G.$bb.Verbose);const B=this.battleController.getUnitById(k.unitId);B&&(yield B.playEscaped(),this.sendUnitEscapedEvent(B)),this.stateMachine.goToState(Rt)}))}sendUnitEscapedEvent(k){const B=j.q.instance.prodigy.gameContainer.get("a25-68f4"),U={params:{taskEventType:ot.Z7.Unit,unitType:k.data.type,id:k.creature.id,name:k.creature.name,nickname:k.creature.nickname,team:k.data.teamId}};B.sendQuestEventViaHub(rt.T.LET_UNIT_ESCAPE,U).catch(G.RQr.createHandler("Error sending a quest event for a unit escaping"))}}var ut=U(99625),ft=U(5491),bt=U(31029),pt=U(80060),vt=U(55122),gt=U(46855);class mt extends V.a{enter(){this.playerData=j.q.instance.prodigy.gameContainer.get("e20-0fb0");const k=this._data,B=this.battleController.getUnitById(k.unitId);G.VyI.log(`[Battle Revamp] A unit has levelled up to level ${k.level}`,G.$bb.Info),this.battleController.type===tt.gu.FireflyQ2Miniboss&&B.type===tt.uj.Wizard?this.runFireflyQ2LevelUpTutorial(k,B).catch((k=>{G.RQr.logError(k,"Error running FireflyQ2 LevelUp Tutorial"),this.stateMachine.showThrownErrorDialog(k)})):(B.updateLevel(k.level),this.stateMachine.goToState(Rt))}applyStarBonus(k,B){if(k.type===tt.uj.Wizard){const k=vt.s.xpRequiredForLevel(B,ft.V.Player),U=this.playerData.getStars();this.playerData.player.addStars(k-U)}else{const U=vt.s.xpRequiredForLevel(B,ft.V.Pet),F=this.battleController.leftTeam.getUnitIndex(k),G=this.playerData.player.kennel.petTeam.filter((k=>(null==k?void 0:k.creatureType)===ft.V.Pet)),j=G.length<2||F<2?G[0]:G[1],$=j.getStars();j.addStars(U-$)}}runFireflyQ2LevelUpTutorial(k,B){return(0,q.sH)(this,void 0,void 0,(function*(){const U=this.playerData.getStars(),F=vt.s.xpRequiredForLevel(k.level,ft.V.Player)-U,$=j.q.instance.prodigy.gameContainer.get("d0e-64fd"),H={baseXp:F,memberXp:0,totalNonMemberXp:F},V=(yield pt.d.loadWithInjectedValuesAndDependenciesFromGUID($,ut.l.FireflyQ2MidBattleTutorial,{xpBarPositionX:B.creature.worldPosition.x-5,xpBarPositionY:B.creature.worldPosition.y+77,particleLife:B.creature.worldPosition.x<500?new G.I9Y(1.6,1.6):new G.I9Y(.6,.6),creatureXpBarData:new gt.r(U,ft.V.Pet,H,vt.s.activePlayerLevelCap)})).findComponentInChildren(bt.u);V.run(),this.battleController.rightTeam.units.forEach((k=>{k.levelUi.setLayer("result",!0),k.creature.creatureGameObject.setLayer("result",!0)})),B.levelUi.setLayer("result",!0),B.creature.creatureGameObject.setLayer("result",!0),yield V.fsmVariables.applyLevelUp.onDispatch.asPromise(),B.creature.isOpponent||this.applyStarBonus(B,k.level),B.playLevelUp(),B.updateLevel(k.level),yield V.onComplete.asPromise(),this.battleController.rightTeam.units.forEach((k=>{k.levelUi.setLayer(void 0,!0),k.creature.creatureGameObject.setLayer(void 0,!0)})),B.levelUi.setLayer(void 0,!0),B.creature.creatureGameObject.setLayer(void 0,!0),this.stateMachine.goToState(Rt)}))}}class yt extends V.a{enter(){const k=this._data,B=this.battleController.getUnitById(k.unitId);k.mpResult>B.currentMp&&this.sendMpRecoverySegmentData(B,k.mpResult-B.currentMp),B.updateMp(k.mpResult),j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`${k.unitId} MP has been updated and it is now ${B.currentMp} !`,G.$bb.Info),this.stateMachine.goToState(Rt)}}class _t extends V.a{enter(){const k=this._data,B=this.battleController.getUnitById(k.unitId);B&&(B.spells.find((B=>B.spellId===k.spellId)).currentCooldown=k.cooldown,j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`${k.unitId} spell ${k.spellId} cooldown is now ${k.cooldown} !`,G.$bb.Info)),this.stateMachine.goToState(Rt)}}class Et extends V.a{enter(){const k=this._data,B=this.battleController.getUnitById(k.unitId);this.battleController.moveUnitToTeam(B,k.teamId).then((()=>{j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`${k.unitId} moved to team ${k.teamId}`,G.$bb.Info),this.stateMachine.goToState(Rt)})).catch(G.RQr.createHandler(`Error moving ${k.unitId} to team ${k.teamId}`))}}class wt extends V.a{enter(){const k=this._data.round;this.stateMachine.round=k,this.stateMachine.segment.battleRevamp.setRoundNumber(k),this.battleController.onNewRound(k),j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`Start of battle round ${k}`,G.$bb.Verbose),this.stateMachine.goToState(Rt)}}class Tt extends V.a{enter(){const k=this._data;for(const B of this.battleController.getUnits())B.removeAffix(k.affixId);this.stateMachine.goToState(Rt)}}class St extends V.a{enter(){var k;const B=this._data,U=this.battleController.getUnitById(B.unitId);U.updateHp(B.hpResult),U.reviveUnit();const $=[U.enterBattle(!0,!0,!0).then((()=>{U.updateRescuableUI(!1).catch(G.RQr.createHandler(`Error updating rescuable UI for ${B.unitId}`))}))];(null===(k=this.stateMachine.stateUpdateQueue[0])||void 0===k?void 0:k.type)===F.EBattleStateUpdate.ReviveUnit&&$.push(G.Egh.timeout(500)),Promise.race($).then((()=>{j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`${B.unitId} revived with ${B.hpResult} HP`,G.$bb.Info),this.stateMachine.goToState(Rt)})).catch(G.RQr.createHandler(`Error reviving ${B.unitId}`))}}var At=U(80313);class Ct extends V.a{enter(){const k=this._data;j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`Skipping turn for unit ${k.unitId}`,G.$bb.Info),V.a.createHitInfoText(this.battleController.getUnitById(k.unitId),{damage:0,damageInformation:F.EDamageInformation.Fumble,textKey:"BATTLE_REVAMP_TEXT_SKIP_TURN"}),this.stateMachine.goToState(Rt)}}var Ot=U(82351),It=U(8693),Dt=U(63761);class Rt extends H.Z{enter(){const k=this.battleController.getStateOverride(this.stateMachine.stateUpdateQueue[0]);if(k)return void this.stateMachine.goToState(k[0],...k.slice(1));const B=this.stateMachine.stateUpdateQueue.shift();if(!B)return void this.stateMachine.goToState($.W);j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`ProcessStateUpdateQueue - Processing state ${JSON.stringify(B)}`,G.$bb.Verbose);const U=Rt.STATE_UPDATES[B.type];U?this.stateMachine.goToState(U,B):this.stateMachine.goToState(Rt)}}Rt.STATE_UPDATES={[F.EBattleStateUpdate.CastSpell]:nt.a,[F.EBattleStateUpdate.ModifyMp]:yt,[F.EBattleStateUpdate.ModifyLevel]:mt,[F.EBattleStateUpdate.ModifySpellCooldown]:_t,[F.EBattleStateUpdate.ModifyUnitTeam]:Et,[F.EBattleStateUpdate.AddUnit]:J,[F.EBattleStateUpdate.ReviveUnit]:St,[F.EBattleStateUpdate.AddAffix]:W,[F.EBattleStateUpdate.RemoveAffix]:Tt,[F.EBattleStateUpdate.AddStatusEffect]:class extends Z{getSpellGuid(k){return this.getSpellGuidFromName(k.applySpell)}updateBattleUnit(k){return(0,q.sH)(this,void 0,void 0,(function*(){k.unitComponent.addStatusEffect(k.statusEffectInstance)}))}handleSpellCompleted(k){k.updateIdleStatusEffect(),k.updatePersistentStatusEffects()}},[F.EBattleStateUpdate.TriggerStatusEffect]:class extends Z{getSpellGuid(k){return this.getSpellGuidFromName(k.triggerSpell)}updateBattleUnit(k){return(0,q.sH)(this,void 0,void 0,(function*(){const B=k.clientStatusEffect.affixes;for(let U=0;U{G.RQr.logError(k,"Error changing active unit in TriggerStatusEffectStateUpdate"),this.stateMachine.showThrownErrorDialog(k)})))}}))}handleDamageApplied(k){const B=this._data.hitData;if(!B)return;j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`${k.creature.name} triggered status ${this.statusEffectId} and hit points changed by ${B.damage}!`,G.$bb.Info),k.onApplyDamage.dispatch(B),V.a.createHitInfoText(k,B,this._data.element),k.updateHp(B.hpResult),B.damageInformation&F.EDamageInformation.Heal?j.q.instance.prodigy.audio.playSFXFromGUID(Ot.B.Sfx_heal):(j.q.instance.prodigy.audio.playSFX(8,It.J.Hit),B.hpResult>0?(k.playHurt(),this.checkAndTriggerLowHealthAnimation(k,B.damage)):k.creature.teleportType===Dt.H0.Immediate&&k.playDefeated().catch(G.RQr.createHandler("Error playing defeat animation")))}handleSpellCompleted(k){var B,U;k.updateIdleStatusEffect(),null!==(U=null===(B=this._data)||void 0===B?void 0:B.isBeingRemoved)&&void 0!==U&&U||k.updatePersistentStatusEffects()}},[F.EBattleStateUpdate.RemoveStatusEffect]:class extends Z{getSpellGuid(k){return this.getSpellGuidFromName(k.removeSpell)}updateBattleUnit(k){return(0,q.sH)(this,void 0,void 0,(function*(){k.unitComponent.removeStatusEffect(k.statusEffectInstance.id)}))}handleSpellCompleted(k){k.updatePersistentStatusEffects()}},[F.EBattleStateUpdate.ModifyStatusEffect]:class extends Z{updateBattleUnit(k){return(0,q.sH)(this,void 0,void 0,(function*(){k.unitComponent.modifyStatusEffect(k.statusEffectInstance.id,k.statusEffectInstance.remainingDuration),k.unitComponent.updatePersistentStatusEffects()}))}},[F.EBattleStateUpdate.SetActiveUnit]:At.x,[F.EBattleStateUpdate.EndBattle]:st,[F.EBattleStateUpdate.SkipTurn]:Ct,[F.EBattleStateUpdate.NewRound]:wt,[F.EBattleStateUpdate.Escape]:lt,[F.EBattleStateUpdate.DefeatUnit]:dt,[F.EBattleStateUpdate.DebugMessage]:at}},37987:(k,B,U)=>{"use strict";U.d(B,{D:()=>G,$:()=>lt});var F,G,j=U(8674),$=U(62459),H=U(99625),V=U(28628),W=U(35120),q=U(10778),K=U(29834),z=U(23082),Y=U(46784),Q=U(65050),X=U(67665),Z=U(53661),J=U(90614),tt=U(80060),et=U(27488),it=U(68836),st=U(86323),nt=U(64019),at=U(10670),rt=U(30226),ot=U(86283),ht=U(63046),ct=U(95807);class dt extends ct.Z{constructor(){super(),this.nextState=this.nextState.bind(this)}enter(){return(0,j.sH)(this,void 0,void 0,(function*(){this.battleController.onStartBattle().then((()=>{this.sendBattleStartSegmentData(),this.battleController.getUnits().forEach((k=>{this.sendBattleParticipantSegmentData(k)})),this.nextState()})).catch((k=>{$.RQr.logError(k,"Error starting a battle"),this.stateMachine.showThrownErrorDialog(k)}))}))}nextState(){this.stateMachine.goToState(ht.B)}sendBattleStartSegmentData(){const k=this.stateMachine.getStartOrResumeSegmentData(),B=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily;B.isFestivalDailyBattle&&(k.instance=Object.assign(Object.assign({},k.instance),{instance_type:Q.N.FestivalDaily,instance_id:B.getFestivalInstanceName()}),B.isFestivalDailyBattle=!1);const{requirements:U}=$.wa5.getActiveScene().container.get("LocalConfig"),F=$.Aq$.isDefined(U)&&U.length>0;this.stateMachine.segment.battleRevamp.sendBattleStartEvent(Object.assign({battle_id:this.battleController.battleId,battle_type:this.stateMachine.segment.battleRevamp.getSegmentBattleType(this.stateMachine.battleType),battle_variant:this.stateMachine.segment.battleRevamp.getBattleVariant(this.stateMachine.battleType,k.variantData),battle_difficulty:k.difficulty,player_team_size:this.stateMachine.homeTeam.units.length,enemy_team_size:this.stateMachine.awayTeam.units.length,is_restricted:F,restrictions:U},k.instance)),this.stateMachine.segment.postBattleFlow.init()}sendBattleParticipantSegmentData(k){var B;const U=k.type===V.uj.Wizard&&!k.creature.isOpponent,F=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=k.type!==V.uj.Wizard||k.creature.isOpponent?void 0:rt.J.createGearMetadata(F.equipment.getData()),j=k.type===V.uj.Pet&&$.Aq$.isDefined(k.data.petGear)?rt.J.createPetGearMetadata(k.data.petGear):void 0,H=this.stateMachine.segment.battleRevamp,q=!k.creature.isOpponent||this.battleController.rightTeam.isRescuable();H.sendBattleParticipantEnteredEvent({team:k.creature.isOpponent?at.B1.Opponent:at.B1.Player,character_name:H.getUnitName(U,k),character_level:k.level,character_rank:k.type===V.uj.Pet?null!==(B=k.data.mergeRank)&&void 0!==B?B:0:void 0,character_hp:k.currentHp,character_mp:k.currentMp,character_id:k.data.unitId,position:H.getUnitPosition(k,this.battleController),character_element:k.data.element,character_type:H.getBattleCharacterType(U,k.creature.id,q),character_rarity:H.getUnitRarity(U,k.data.rarity),character_max_hp:k.maxHp,character_max_mp:k.maxMp,character_power:k.data.stats.power,character_defence:k.data.stats.defence,character_speed:k.data.stats.speed,character_order:k.data.stats.initiative,crit_chance:k.data.stats.critDamage,crit_damage:this.battleController.battleConstants.criticalHitBonus,element_advantage:this.battleController.battleConstants.getElementalResistance(k.data.element),element_weakness:this.battleController.battleConstants.getElementalWeakness(k.data.element),spells_available:k.data.spells.map((k=>({spellId:k.spellId,currentCooldown:k.currentCooldown}))),is_rescuable:k.isARescuableUnit(),is_new_pet:!ot.D.hasBeenRescuedPreviously(F,k.creature.id),number_owned:F.kennel.getPets(!1).reduce(((B,U)=>U.ID===k.creature.id?B+1:B),0),times_battled:F.encounters.getPetTimesBattled(k.creature.id),times_rescued:F.encounters.getPetTimesRescued(k.creature.id),gear_hat:k.type===V.uj.Wizard?null==G?void 0:G.hat:null==j?void 0:j.hat,gear_hat_rarity:k.type===V.uj.Wizard?null==G?void 0:G.hat_rarity:null==j?void 0:j.hat_rarity,gear_relic:k.type===V.uj.Wizard?null==G?void 0:G.relic:null==j?void 0:j.relic,gear_relic_rarity:k.type===V.uj.Wizard?null==G?void 0:G.relic_rarity:null==j?void 0:j.relic_rarity,gear_outfit:null==G?void 0:G.outfit,gear_outfit_rarity:null==G?void 0:G.outfit_rarity,gear_boots:null==G?void 0:G.boots,gear_boots_rarity:null==G?void 0:G.boots_rarity,gear_weapon:null==G?void 0:G.weapon,gear_weapon_rarity:null==G?void 0:G.weapon_rarity,gear_buddy:null==G?void 0:G.follow,gear_buddy_rarity:null==G?void 0:G.follow_rarity})}}!function(k){k.Connection="BATTLE_REVAMP_ERROR_NETWORK",k.Server="BATTLE_REVAMP_ERROR_RETRY",k.Client="BATTLE_REVAMP_ERROR_FATAL"}(G||(G={}));let lt=F=class extends $.JTX{constructor(){super(...arguments),this.RETRY_HIDE_DURATION=2e3,this.stateUpdateQueue=[],this.round=0,this._currentState=null,this.onStateChange=new $.HN0,this.onVictory=new $.HN0,this.onDefeat=new $.HN0,this.onEscape=new $.HN0,this._battleCompleted=!1}get currentState(){return this._currentState}goToStart(){this.goToState(dt)}goToState(k,...B){try{this._currentState&&(this._currentState.exit(),this._currentState.destroy()),this._currentState=new k(...B),this._currentState.stateMachine=this,this._currentState.battleController=this.battleController,this.onStateChange.dispatch(this._currentState),this._currentState.enter()}catch(e){$.RQr.logError(e,`Error transitioning to ${k.name} state`),this.showThrownErrorDialog(e)}}update(){var k;null===(k=this._currentState)||void 0===k||k.update(),super.update()}destroy(){this._currentState&&(this._currentState.exit(),this._currentState.destroy()),this._currentState=null,this.battleController=null,this.homeTeam=null,this.awayTeam=null,this.mapRoot=null,this.battleResult=null,this.onVictory.dispose(),this.onDefeat.dispose(),this.onEscape.dispose(),this.onStateChange.dispose(),this.hideErrorDialog(),super.destroy()}showThrownErrorDialog(k){k instanceof et.r?this.showNetworkErrorDialog(k):this.showErrorDialog(void 0,k)}showNetworkErrorDialog(k){0===k.code?this.showErrorDialog(G.Connection,k,!0):k.code>=500&&k.code<600?this.showErrorDialog(G.Server,k):this.showErrorDialog(G.Client,k)}isShowingNetworkErrorDialog(){return Boolean(this._errorDialogPromise)}showErrorDialog(k=G.Client,B,U){this.showErrorDialogAsync(k,B,U).catch($.RQr.createHandler("Error showing error dialog"))}showErrorDialogAsync(){return(0,j.sH)(this,arguments,void 0,(function*(k=G.Client,B,U){if(W.q.instance.game.state.current!==z.G.SecureBattleRevamp)return;const V=this.getInjectedValue($.$Bt.LocalizationService),q={[Z.ZE.Title]:V.getText("BATTLE_REVAMP_ERROR_TITLE"),[Z.ZE.Message]:V.getText(k),[Z.ZE.CTAButtonEnabled]:null!=U&&U,[Z.ZE.CTAButtonFunction]:()=>(0,j.sH)(this,void 0,void 0,(function*(){return this.hideErrorDialogForRetry()}))};if(Boolean(this._errorDialogPromise))tt.d.updateInjectedValues(yield this._errorDialogPromise,q);else{const k=this.getInjectedValue("d0e-64fd");this._errorDialogPromise=tt.d.loadWithInjectedValuesAndDependenciesFromGUID(k,H.l.PaperDialogInjectionConfigured,q),this._errorDialogPromise.then((k=>{W.q.instance.game.state.current!==z.G.SecureBattleRevamp&&k.destroy()})).catch($.RQr.createHandler("Error cleaning up error dialog after state transition"))}if(!this._battleCompleted&&k===G.Client){if(this.completeBattle("error",this.getErrorMessage(B)),B){W.q.instance.prodigy.gameContainer.get("11d-01b8").trackError(B)}$.Egh.timeout(F.FATAL_ERROR_BATTLE_EXIT_DELAY_MS).finally((()=>{var k;null===(k=this.getInjectedValue("BattleState"))||void 0===k||k.handleFatalBattleError()}))}}))}hideErrorDialogForRetry(){return(0,j.sH)(this,void 0,void 0,(function*(){Boolean(this._errorDialogPromise)&&this._errorDialogPromise.promise.then((k=>{k.active=!1,setTimeout((()=>{k&&(k.active=!0)}),this.RETRY_HIDE_DURATION)})).catch($.RQr.createHandler("Error hiding and re-enabling error dialog"))}))}hideErrorDialog(){Boolean(this._errorDialogPromise)&&(this._errorDialogPromise.cancel(),this._errorDialogPromise.promise.then((k=>k.destroy())).catch($.RQr.createHandler("Error cleaning up error dialog")),this._errorDialogPromise=null)}completeBattle(k,B,U,F){var G,j,H,V,W;if(!this._battleCompleted){const{requirements:q}=$.wa5.getActiveScene().container.get("LocalConfig"),K=$.Aq$.isDefined(q)&&q.length>0;this.segment.battleRevamp.sendBattleCompleteEvent({outcome:k,rewards_scalar:U,magicoin_dropped:null!==(G=null==F?void 0:F.granted)&&void 0!==G&&G,magicoin_drop_eligible:null!==(j=null==F?void 0:F.eligible)&&void 0!==j&&j,magicoin_drop_was_guaranteed:null!==(H=null==F?void 0:F.guaranteed)&&void 0!==H&&H,magicoin_drop_amount_free:null!==(V=null==F?void 0:F.freeRewardAmount)&&void 0!==V?V:null,magicoin_drop_amount_member:null!==(W=null==F?void 0:F.memberRewardAmount)&&void 0!==W?W:null,error_detail:B,is_restricted:K,restrictions:q})}this._battleCompleted=!0}getErrorMessage(k){if($.Aq$.isDefined(k))return k instanceof Error&&k.message?k.message:JSON.stringify(k)}getStartOrResumeSegmentData(){var k;const B={};let U=this.segment.gameWorld.getCurrentInstanceTypeAndID(),F=this.difficulty;switch(this.battleType){case V.gu.Basic:case V.gu.FestivalDailyBoss:B.units=this.battleController.rightTeam.units;break;case V.gu.Ultimates:B.questData=null===(k=this.battleController)||void 0===k?void 0:k.currentQuestData;break;case V.gu.MatchmakingBotDuel:U={instance_id:this.segment.featureCommon.getCurrentInterfaceID(Y.B.DuelsStadium),instance_type:Q.N.DuelsStadium},F=this.segment.duelsStadium.botDifficulty;break;case V.gu.NormalRiftRun:U={instance_id:this.segment.rifts.riftInstanceUuid,instance_type:Q.N.RiftRun},F=it.T.riftTier;break;case V.gu.BossRiftRun:U={instance_id:this.segment.rifts.riftInstanceUuid,instance_type:Q.N.BossRift},F=it.T.riftTier}return B.instanceType=U.instance_type,{variantData:B,instance:U,difficulty:F}}};lt.FATAL_ERROR_BATTLE_EXIT_DELAY_MS=5e3,(0,j.Cg)([(0,$.MnK)(nt.cs),(0,j.Sn)("design:type",nt.cs)],lt.prototype,"homeTeam",void 0),(0,j.Cg)([(0,$.MnK)(nt.cs),(0,j.Sn)("design:type",nt.cs)],lt.prototype,"awayTeam",void 0),(0,j.Cg)([(0,$.ERr)(),(0,j.Sn)("design:type",$._mx)],lt.prototype,"mapRoot",void 0),(0,j.Cg)([(0,$.MnK)(st.I),(0,j.Sn)("design:type",st.I)],lt.prototype,"battleResult",void 0),(0,j.Cg)([(0,$.MnK)(K.j),(0,j.Sn)("design:type",K.j)],lt.prototype,"introAnimator",void 0),(0,j.Cg)([(0,$.MnK)(q.i),(0,j.Sn)("design:type",q.i)],lt.prototype,"lowHealthPreviewComponent",void 0),(0,j.Cg)([(0,$.MnK)(K.j),(0,j.Sn)("design:type",K.j)],lt.prototype,"turnIndicator",void 0),(0,j.Cg)([(0,$.MnK)(J.P),(0,j.Sn)("design:type",J.P)],lt.prototype,"spellBookMoveIn",void 0),(0,j.Cg)([(0,$.MnK)(J.P),(0,j.Sn)("design:type",J.P)],lt.prototype,"spellBookMoveOut",void 0),(0,j.Cg)([(0,$.Cdj)("c47-20b6"),(0,j.Sn)("design:type",X.Y)],lt.prototype,"segment",void 0),lt=F=(0,j.Cg)([(0,$.EVk)("SecureBattleRevampStateMachine")],lt)},95807:(k,B,U)=>{"use strict";U.d(B,{Z:()=>F});class F{enter(){}exit(){}update(){}destroy(){}}},21945:(k,B,U)=>{"use strict";U.d(B,{N:()=>$});var F=U(62459),G=U(63046),j=U(95807);class $ extends j.Z{constructor(k){super(),this._action=k}enter(){this.battleController.onPlayerAction(this._action).then((k=>{this.stateMachine.stateUpdateQueue.push(...k),this.stateMachine.goToState(G.B)})).catch((k=>{F.RQr.logError(k,"SendPlayerActionState.enter:playerAction.sendRequest"),this.stateMachine.showThrownErrorDialog(k)}))}}},74640:(k,B,U)=>{"use strict";U.d(B,{G:()=>z});var F=U(62459),G=U(28628),j=U(75172),$=U(10670),H=U(24047),V=U(78355),W=U(69297),q=U(95807),K=U(28496);class z extends q.Z{constructor(k){var B,U,F;super(),this._magicoinRewardGranted=!1,this._magicoinRewardEligible=!1,this._magicoinRewardGuaranteed=!1,this._battleResult=k.battleResult,this._rewards=k.rewards,this._memberRewards=k.memberRewards,this._rewardsScalingInfo=k.rewardsScalingInfo,this._magicoinRewardGranted=null!==(B=k.magicoinRewardGranted)&&void 0!==B&&B,this._magicoinRewardEligible=null!==(U=k.magicoinRewardEligible)&&void 0!==U&&U,this._magicoinRewardGuaranteed=null!==(F=k.magicoinRewardGuaranteed)&&void 0!==F&&F}enter(){var k,B,U,q;const z=this.stateMachine.segment;F.C1c.markTextureGarbageCollectionFrame(),this.battleController.getUnits().forEach((k=>{var B;const U=k.type===G.uj.Wizard&&!k.creature.isOpponent;z.battleRevamp.sendBattleParticipantOutcomesEvent({team:k.creature.isOpponent?$.B1.Opponent:$.B1.Player,character_name:this.stateMachine.segment.battleRevamp.getUnitName(U,k),character_id:k.data.unitId,character_level:k.level,character_rank:k.type===G.uj.Pet?null!==(B=k.data.mergeRank)&&void 0!==B?B:0:void 0,character_hp:k.currentHp,character_mp:k.currentMp,position:z.battleRevamp.getUnitPosition(k,this.battleController),status:k.currentHp<=0?$.rW.Unconscious:$.rW.Conscious})}));const Y=this._magicoinRewardGranted?null===(B=null===(k=this._rewards)||void 0===k?void 0:k.find((k=>"currency"===k.type&&27===k.ID)))||void 0===B?void 0:B.quantity:void 0,Q=this._magicoinRewardGranted?null===(q=null===(U=this._memberRewards)||void 0===U?void 0:U.find((k=>"currency"===k.type&&27===k.ID)))||void 0===q?void 0:q.quantity:void 0,X={granted:this._magicoinRewardGranted,eligible:this._magicoinRewardEligible,guaranteed:this._magicoinRewardGuaranteed,freeRewardAmount:null!=Y?Y:null,memberRewardAmount:null!=Q?Q:null};this._magicoinRewardGranted&&z.funnel.sendStep(H.F.MagicoinBattleRewardsIntro,"feature",j.T.FirstDropReceived,j.h.FirstDropReceived),this.battleController.completeBattle(this._battleResult===G.XK.Victory?"win":"loss",this._rewardsScalingInfo,X),this.battleController.onEndGame(this._battleResult===G.XK.Victory).then((()=>{F.C1c.garbageCollectTextures(),this._battleResult===G.XK.Victory?this.stateMachine.goToState(K.u,this._rewards,this._memberRewards,this._rewardsScalingInfo):this._battleResult===G.XK.Defeat?this.stateMachine.goToState(V.$):this._battleResult===G.XK.Escape&&this.stateMachine.goToState(W.L)})).catch((k=>{F.RQr.logError(k,"Error in the end battle state"),this.stateMachine.showThrownErrorDialog(k)}))}}},28496:(k,B,U)=>{"use strict";U.d(B,{u:()=>j});var F=U(62459),G=U(95807);class j extends G.Z{constructor(k,B,U){super(),this._rewards=k,this._memberRewards=B,this._rewardsScalingInfo=U}enter(){this.battleController.onVictory(this._rewards,this._memberRewards,this._rewardsScalingInfo).then((()=>{this.stateMachine.onVictory.dispatch()})).catch((k=>{F.RQr.logError(k,"Error in victory state"),this.stateMachine.showThrownErrorDialog(k)}))}}},60604:(k,B,U)=>{"use strict";U.d(B,{a:()=>lt});var F=U(8674),G=U(87490),j=U(62459),$=U(95891),H=U.n($),V=U(20748),W=U(82351),q=U(56942),K=U(28628),z=U(62886),Y=U(35120),Q=U(50084),X=U(28402),Z=U(98193),J=U(10670),tt=U(13956),et=U(34234),it=U(39571),st=U(22023),nt=U(44094),at=U(8693),rt=U(630),ot=U(63761),ht=U(81531),ct=U(63046),dt=U(52855);class lt extends dt.a{enter(){this.castSpell(this._data).catch((k=>{j.RQr.logError(k,"Error casting spell"),this.stateMachine.showThrownErrorDialog(k)}))}exit(){this.battleController.selectedSpell=null}castSpell(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,$;const V=this.battleController.activeUnit;let K;for(const H of k.targets){for(const k of H.hits)if(j.OQO.areBitsSet(k.damageInformation,G.EDamageInformation.Reflected)){K=k;break}if(K)break}K&&dt.a.createHitInfoText(V,K);const z=Object.assign(Object.assign({},this._gameDataProvider.getItem("spellV2",k.id).data),{id:k.id}),Z=null!==(U=null===(B=z.flags)||void 0===B?void 0:B.some((k=>k.flag===G.ESpellFlag.Rescue)))&&void 0!==U&&U,J=k.id===this.battleController.battleConstants.fumbleSpellId;Z||J||(null==V?void 0:V.data.teamId)!==this.battleController.leftTeam.id||this.sendBattlePassCastSpellEvent(z.element),Y.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&j.VyI.log(`Spell ${k.id} has been cast by ${null==V?void 0:V.battleId}`,j.$bb.Verbose),z.target.unit===G.ESpellUnitTarget.Random&&(null==V?void 0:V.data.teamId)===this.battleController.leftTeam.id&&(yield this.battleController.spellCardsController.targetController.targetRoulette(z.target.team,this.battleController.getUnitById(k.targets[0].unitId),V));const tt=this.battleController.getSpellComponentById(k.id);yield tt.loadPromise;const et=Y.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1),st=new j.v14,ht=[],ut=H().cloneDeep(k.targets);let ft=0;const bt=new Map,pt=(B,U=!1)=>{var F,$,H,K,Q,Z;const J=ut.find((k=>k.unitId===(null==B?void 0:B.data.unitId))),tt=null!==(F=k.targets.find((k=>k.unitId===(null==B?void 0:B.data.unitId))).hits.length)&&void 0!==F?F:0,it=(null!==($=bt.get(B))&&void 0!==$?$:-1)+1;bt.set(B,it);const nt=1===(null==J?void 0:J.hits.length),rt=null==J?void 0:J.hits.shift();if(!rt)return!1;if(et&&j.VyI.log(`${J.unitId} has been hit and took ${rt.damage} damage!`,j.$bb.Info),B.onApplyDamage.dispatch(rt),(rt.damage||rt.mpDamage||!this.spellFlagsIncludeAny(z.flags,lt.NO_DAMAGE_SPELL_FLAGS))&&(!rt.damage&&rt.mpDamage||(U||(j.OQO.areBitsSet(rt.damageInformation,G.EDamageInformation.Reflected)&&(rt.damageInformation&=~G.EDamageInformation.Reflected),rt.hitCount=tt,rt.hitIndex=it,dt.a.createHitInfoText(B,rt,z.element,st.push())),B.updateHp(rt.hpResult),ft+=rt.damage),rt.mpDamage&&B.updateMp(rt.mpResult)),U||this.spellFlagsIncludeAny(z.flags,lt.NO_SOUND_SPELL_FLAGS)||(rt.damageInformation&G.EDamageInformation.Missed?Y.q.instance.prodigy.audio.playSFX(8,at.J.Miss):rt.damageInformation&G.EDamageInformation.Heal?Y.q.instance.prodigy.audio.playSFXFromGUID(W.B.Sfx_heal):rt.damageInformation&G.EDamageInformation.Fumble?Y.q.instance.prodigy.audio.playSFXFromGUID(W.B.Sfx_fumble_poof):(Y.q.instance.prodigy.audio.playSFX(8,at.J.Hit),rt.hpResult>0||!nt?(B.playHurt(),this.checkAndTriggerLowHealthAnimation(B,rt.damage)):B.creature.teleportType===ot.H0.Immediate&&B.playDefeated().catch(j.RQr.createHandler("Error playing defeat animation")))),this.findSpellFlag(z.flags,G.ESpellFlag.Rescue)){const k=null==V?void 0:V.data.teamId;if(k){const U=null===(H=this.battleController.getTeamById(k))||void 0===H?void 0:H.wizard;U&&(B.controllerUnit=U)}B.creature.teleportType=ot.H0.Astral,ht.push(B)}else if(this.findSpellFlag(z.flags,G.ESpellFlag.StealUnit)){const k=st.push(),U=k=>{var B;const U=new j._mx(k.creature.creatureGameObject).addComponent(X.v);U.GameObject.name="goop-front-spine",U.GameObject.addComponent(j.dLy).setPositionY(5),U.setAsset(q.Q.Spine_pet_shadow_effect_front_json,(()=>U.setAnimationByName(0,"idle",!0)));const F=new j._mx(k.creature.creatureGameObject).addComponent(X.v);F.GameObject.name="goop-back-spine",F.GameObject.sendToBack(),F.setAsset(q.Q.Spine_pet_shadow_effect_back_json,(()=>F.setAnimationByName(0,"idle",!0))),null===(B=k.creature.animator.spine)||void 0===B||B.getSpine().setTint(12421347)};this.battleController.moveUnitToTeam(B,V.data.teamId,ot.H0.Shadow,U).catch(j.RQr.createHandler(`Error moving ${null===(K=null==B?void 0:B.data)||void 0===K?void 0:K.unitId} to ${V.data.teamId} team`)).finally(k)}else rt.hpResult<=0&&0===J.hits.length&&ht.push(B);if((null===(Q=rt.affixes)||void 0===Q?void 0:Q.length)>0)for(const k of rt.affixes)this.playBuffSound(),B.showAffix(k).catch(j.RQr.createHandler("Error adding affix to unit"));if((null===(Z=rt.removedAffixes)||void 0===Z?void 0:Z.length)>0)for(const k of rt.removedAffixes)B.removeAffix(k);return!0};let vt;tt.onApplyDamage.add(((k,B)=>pt(k.findComponentInParent(rt.Xc,!0),B)),this),V&&this.battleController.getUnits().forEach((k=>{k===V?k.updateLayerByPrefix(it.a.ActiveSideCast):k.data.teamId===V.data.teamId?k.layerLevel{const B=this.battleController.getUnitById(k.unitId);B&>.push({unitId:k.unitId,gameObject:B.creature.creatureGameObject,statusEffectContainer:B.statusEffectContainer})})),yield tt.begin({caster:vt,targets:gt,manager:tt,multiHit:null!==(F=z.hits)&&void 0!==F?F:1,spellOriginOffset:null==V?void 0:V.spellOriginOffset});do{mt=!1;for(const k of ut)k.hits.length>0&&(mt=!0,pt(this.battleController.getUnitById(k.unitId)));mt&&(yield j.Egh.timeout(500))}while(mt);tt.onApplyDamage.removeAll(this),yield null===($=this.battleController.battleBackgroundFX)||void 0===$?void 0:$.setDamage(this.battleController.getTotalTeamDamagePercentage((null==V?void 0:V.data.teamId)===G.ETeamId.Away?G.ETeamId.Home:G.ETeamId.Away,!0),(null==V?void 0:V.data.teamId)===G.ETeamId.Away,z.id),ht.find((k=>k.battleId===(null==V?void 0:V.battleId)))&&(yield this.battleController.deactivateTurnIndicator()),yield this.defeatUnits(ht),this.battleController.castActionResultsDisplayTriggered(),yield st.all();const yt=nt.$.generateUID();let _t=0;if(Z)if(1===k.targets.length){const B=this.battleController.getUnitById(k.targets[0].unitId),U=B.creature;et&&j.VyI.log(`${U.name} has been rescued!`,j.$bb.Info);_t=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.amountOfPet(U.id),yield Q.a.receivePet(U,yt),B.isRescued=!0}else j.VyI.log("Rescue spell requires a single target.",j.$bb.Error);J?this.sendMpRecoverySegmentData(V,0):this.sendBattleActionSegmentData({spellId:k.id,activeUnit:V,spellData:z,totalHitDamage:ft,targetData:k.targets,captureTransactionId:yt,previousPetCopies:_t,appliedStatusEffects:k.statusEffectsApplied}),this.stateMachine.goToState(ct.B)}))}sendBattleActionSegmentData(k){var B,U,F,j,$,H,V;const W=k.activeUnit,q=k.spellData,z=k.targetData.map((k=>k.unitId)),Y=z.length>0?this.battleController.getUnitById(z[0]):void 0,Q=this.stateMachine.segment.battleRevamp,X=W?W.creature.isOpponent?J.B1.Opponent:J.B1.Player:void 0;if(Q.sendBattleActionPerformedEvent({team:X,character_name:W?W.type!==K.uj.Wizard||W.creature.isOpponent?W.name:Z.z.PLAYER_SEGMENT_ID:void 0,character_id:null==W?void 0:W.data.unitId,mp_cost:q.cost,action_name:q.name,action_type:k.spellId===this.battleController.battleConstants.rescueSpellId?"Rescue":q.element,action_damage:k.totalHitDamage,action_modifier:(null==W?void 0:W.affixes.find((k=>k.type===G.EAffixType.AdditiveDamageMultiplier&&k.instances.some((k=>G.Util.singleOrArrayIncludes(k.element,q.element))))))?"duel_element_boost":void 0,target_name:1===z.length?null==Y?void 0:Y.name:q.target.unit,target_type:q.target,target_team:Y?Y.data.teamId===G.ETeamId.Home?J.B1.Player:J.B1.Opponent:void 0,target_hits:k.targetData.map((k=>{const B=this.battleController.getUnitById(k.unitId);return{target_id:k.unitId,target_name:null==B?void 0:B.name,target_position:Q.getUnitPosition(B,this.battleController),target_hp:null==B?void 0:B.currentHp,hits:Q.getHitInformation(k.hits)}})),target_hp:z.map((k=>this.battleController.getUnitById(k).currentHp)).reduce(((k,B)=>k+B),0),target_mp:z.map((k=>this.battleController.getUnitById(k).currentMp)).reduce(((k,B)=>k+B),0),intended_status_effects:null!==(U=null===(B=k.spellData.statusEffects)||void 0===B?void 0:B.map((k=>k.statusEffectId)))&&void 0!==U?U:[],status_effects_applied:k.appliedStatusEffects?Object.keys(k.appliedStatusEffects).map(Number):[]}),(null===(F=null==q?void 0:q.flags)||void 0===F?void 0:F.some((k=>k.flag===G.ESpellFlag.Rescue)))&&1===z.length){const B=Y;this.stateMachine.segment.battleRevamp.sendBattlePetCapturedEvent({petName:null!==($=null===(j=B.creature)||void 0===j?void 0:j.nickname)&&void 0!==$?$:B.name,petLevel:B.level,petElement:B.data.element,petType:st.P8.getPetEvolutionType(null===(H=B.creature)||void 0===H?void 0:H.id),petRarity:B.data.rarity,petRank:null!==(V=B.data.mergeRank)&&void 0!==V?V:0,previousPetCopies:k.previousPetCopies,captureSource:J.z2.InBattle},{transaction_id:k.captureTransactionId})}}findSpellFlag(k,B){if(k)return k.find((k=>k.flag===B))}spellFlagsIncludeAny(k,B){return!!k&&k.some((k=>B.has(k.flag)))}sendBattlePassCastSpellEvent(k){const B=Y.q.instance.prodigy.gameContainer.get("a25-68f4"),U=`Cast${nt.$.capitalizeFirstLetter(k)}Spell`;B.sendQuestEventViaHub(U,{}).catch(j.RQr.createHandler(`Error sending a battle pass quest event for casting a spell of the ${k} element`)),B.sendQuestEventViaHub(z.T.CAST_SPELL,{}).catch(j.RQr.createHandler("Error sending a battle pass quest event for casting a spell"))}playBuffSound(){Y.q.instance.prodigy.audio.playSFXFromGUID(W.B.Sfx_unit_buff_positive)}}lt.NO_DAMAGE_SPELL_FLAGS=new Set([G.ESpellFlag.Rescue,G.ESpellFlag.StealUnit,G.ESpellFlag.NoDamage]),lt.NO_SOUND_SPELL_FLAGS=new Set([G.ESpellFlag.Rescue,G.ESpellFlag.StealUnit,G.ESpellFlag.NoDamage]),(0,F.Cg)([(0,et.d)("GameDataProvider"),(0,F.Sn)("design:type",ht.q)],lt.prototype,"_gameDataProvider",void 0),(0,F.Cg)([(0,tt.b)("84d-05d4"),(0,F.Sn)("design:type",Object)],lt.prototype,"_dynamicStore",void 0),(0,F.Cg)([(0,V.sg)(200),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],lt.prototype,"playBuffSound",null)},52855:(k,B,U)=>{"use strict";U.d(B,{a:()=>st});var F=U(8674),G=U(87490),j=U(62459),$=U(95891),H=U.n($),V=U(99625),W=U(28628),q=U(35120),K=U(98193),z=U(630),Y=U(89584);class Q{static isHitEffective(k){return(k.damageInformation&G.EDamageInformation.Effective)===G.EDamageInformation.Effective}static isHitIneffective(k){return(k.damageInformation&G.EDamageInformation.Ineffective)===G.EDamageInformation.Ineffective}static isHitAbsorbed(k){return(k.damageInformation&G.EDamageInformation.Absorb)===G.EDamageInformation.Absorb}static extractParallelHitInfos(k,B,U){let F=[];if(B){if(F.push(k),U){const B=[G.EDamageInformation.Absorb,G.EDamageInformation.Effective,G.EDamageInformation.Ineffective],U=this.extractFirstMatchingDamage(k,B);U&&F.push(U)}return F}const j=this.extractFirstMatchingDamage(k,[G.EDamageInformation.CriticalHit,G.EDamageInformation.Dodge]),$=this.extractFirstMatchingDamage(k,[G.EDamageInformation.Effective,G.EDamageInformation.Ineffective]);return j&&$&&!this.isHitAbsorbed(k)&&F.push(j,$),0===F.length&&F.push(k),F}static extractFirstMatchingDamage(k,B){for(const U of B)if((k.damageInformation&U)===U)return Object.assign(Object.assign({},k),{damageInformation:U});return null}static getPrimaryDisplayConfig(k){if(!j.Aq$.isDefined(Q.primaryDisplayConfigs[k]))return null;for(const[B,U]of Object.entries(Q.primaryDisplayConfigs)){const F=Number(B);if((k&F)===F)return U}return null}}Q.primaryDisplayConfigs={[G.EDamageInformation.CriticalHit]:{textOffsetY:50,delayNext:800},[G.EDamageInformation.Dodge]:{textOffsetY:-25,delayNext:400}};var X=U(95807),Z=U(71391),J=U(64868),tt=U(63343),et=U(96810),it=U(34234);class st extends X.Z{constructor(k){super(),this._data=k}static createHitInfoText(k,B,U,F){const{hitCount:G,hitIndex:$}=B,H=j.Aq$.isDefined(G)&&G>1,W=H&&0===$,K=Q.extractParallelHitInfos(B,H,W);let z=0;K.forEach(((B,G)=>{var j,$;const X=q.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromGUID(V.l.RevampSpellHitInfo).findComponent(Y.h),Z=k.creature.worldPosition.x;let J=Math.max(k.creature.worldPosition.y+k.creature.hitbox.y,st.DAMAGE_TEXT_MIN_Y),tt=null;const et={onlyShowDamageNumber:!1,onlyShowIndicator:!1};H?(et.onlyShowDamageNumber=!0,1===G&&W&&(et.onlyShowDamageNumber=!1,et.onlyShowIndicator=!0,et.suppressSfx=!0)):G>0?(et.onlyShowIndicator=!0,et.deemphasizeIndicator=!0):K.length>1&&(tt=Q.getPrimaryDisplayConfig(B.damageInformation)),tt&&(J+=null!==(j=tt.textOffsetY)&&void 0!==j?j:0),setTimeout((()=>X.setupAndDisplay(Z,J,B,U,G===K.length-1?F:void 0,et)),z),z+=null!==($=null==tt?void 0:tt.delayNext)&&void 0!==$?$:0}))}sendMpRecoverySegmentData(k,B){k.creature.isOpponent||this.stateMachine.segment.battleRevamp.sendBattleMpRecoveryAttemptedEvent({character_name:k.type===W.uj.Wizard?K.z.PLAYER_SEGMENT_ID:k.name,success:!(B<=0),mp_recovered:B,automatic:!0})}checkAndTriggerLowHealthAnimation(k,B){var U;if(!(null==k?void 0:k.data))return;const F=this.battleController.leftTeam.units.filter((k=>k.isAlive())),G=1===F.length?F[0]:void 0,$=!!G&&G.currentHp/G.maxHp<.5;!k.creature.isOpponent&&B>0&&$&&1===F.length&&(null===(U=this.stateMachine.lowHealthPreviewComponent)||void 0===U?void 0:U.GameObject)&&(this.stateMachine.lowHealthPreviewComponent.GameObject.active=!0,this.stateMachine.lowHealthPreviewComponent.playAnimation().catch((k=>{j.VyI.log(`Unable to play low health background pulse: ${j.RQr.stringify(k)}`,j.$bb.Error)})))}defeatUnits(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;const $=this.stateMachine.stateUpdateQueue.filter((k=>k.type===G.EBattleStateUpdate.DefeatUnit)),V=J._.hasDefeatedPetStore()?this._defeatedPetsIcon:void 0,{true:W=[],false:q=[]}=H().groupBy(k,(k=>{var B;return!!(null===(B=$.find((B=>B.unitId===k.battleId)))||void 0===B?void 0:B.storedInDefeatedPets)}));if(W.sort(((k,B)=>k.storeTeleportPriority-B.storeTeleportPriority)),null===(B=this.battleController.spellCardsController)||void 0===B||B.hidePetRescue(),yield Promise.all(q.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return k.defeatUnit(z.rC.Exit)}))))),0===W.length||!V)return;tt.E.recordDefeatedPetsFunnelStep(et.l.DynamicStoreDefeatedPet),yield V.show(),V.expectingMultipleAdditions=W.length>1;const K=[];for(let k=0;k(0,F.sH)(this,void 0,void 0,(function*(){yield B.defeatUnit(z.rC.ExitToStore),V.addPet(B.data)}))))),yield j.Egh.timeout(null!==(U=st.EXIT_TO_STORE_STAGGER_MS[k])&&void 0!==U?U:0)}yield Promise.all(K),yield V.hide()}))}}st.DAMAGE_TEXT_MIN_Y=190,st.EXIT_TO_STORE_STAGGER_MS=[150,250,250,250],(0,F.Cg)([(0,it.d)("DefeatedPetsIcon",!1),(0,F.Sn)("design:type",Z.D)],st.prototype,"_defeatedPetsIcon",void 0)},80313:(k,B,U)=>{"use strict";U.d(B,{x:()=>H});var F=U(62459),G=U(35120),j=U(63046),$=U(52855);class H extends $.a{enter(){const k=this._data,B=this.battleController.getUnits().find((B=>B.battleId===k.unitId));this.battleController.activeUnitSpellData=k.spellData,this.stateMachine.segment.battleRevamp.setTurn(k.turn),this.battleController.setActiveUnit(B).then((()=>{var k;G.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&F.VyI.log(`Active unit has been switched to ${null===(k=this.battleController.activeUnit)||void 0===k?void 0:k.battleId}!`,F.$bb.Info),this.stateMachine.goToState(j.B)})).catch((k=>{F.RQr.logError(k,"Error changing active unit"),this.stateMachine.showThrownErrorDialog(k)}))}}},61404:(k,B,U)=>{"use strict";U.d(B,{Q:()=>F});class F{static getWaveFadeFragment(){return"precision highp float;\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float time;\nuniform float fade;\nuniform float amplitude;\nuniform float frequency;\n\t\nvoid main(void) {\n float xOff = sin(vTextureCoord.y * frequency + time) * amplitude;\n vec2 coord = vTextureCoord + vec2(xOff, 0.0);\n vec2 mirrored = abs(mod(coord + 1.0, 2.0) - 1.0);\n vec4 color = texture2D(uSampler, mirrored);\n color *= fade;\n gl_FragColor = color;\n}\n"}static getStarfieldFragment(){return"#define PI 3.14159\nprecision highp float;\nvarying vec2 vTextureCoord;\nuniform float time;\nuniform float alpha;\nuniform vec3 bgColor;\nuniform vec3 trail1;\nuniform vec3 trail2;\n\n\nvec2 line(vec2 radialCoords, float time) {\n float angle = radialCoords.x;\n float dist = radialCoords.y;\n dist *= 0.05;\n angle *= 256.0; // multiple around\n float interRadialDistance = sin(angle * PI);\n angle = floor(angle); // round the angle\n float offset = sin(angle * 13.37); // randomized distance offset\n float speed = cos(angle * 123.45) * 0.2 + 0.5;\n float inverseTrailSize = 70.0;\n \n float yv = fract(dist + time * speed + offset) * inverseTrailSize;\n float f = yv;\n yv = yv * 0.3;\n yv = smoothstep(0.0, 1.0, yv);\n yv = 1.0 - yv;\n yv *= speed * 5.0; // faster = brighter\n \n \n \n return vec2(min(1.0, yv * interRadialDistance * interRadialDistance), f);\n}\n\nvoid main(void) {\n vec2 p = vTextureCoord * 2.0 - 1.0;\n float radialFade = length(p) - 0.01;\n float angle = atan(p.x, p.y) / PI;\n float radialStretch = 2.5 / radialFade;\n vec2 radialCoords = vec2(angle, radialStretch);\n vec2 c1 = line(radialCoords, time);\n\n float revRadialFade = 1.0 - radialFade;\n c1.x *= 1.0 - revRadialFade * revRadialFade;\n\n // vec3 col = mix(trail1, trail2, max(min(c1.y, 1.),0.)); // blend color along trail\n // vec3 col = mix(trail1, trail2, (fract(angle* 13.37))); // blend color along star\n vec3 col = mix(trail1, trail2, floor(fract(angle* 13.37)*1.99)); // stars only color 1/2\n\n col = mix(bgColor, col, c1.x);\n\n // Output to screen\n gl_FragColor = vec4(col * alpha, alpha);\n}\n"}}},45855:(k,B,U)=>{"use strict";U.d(B,{g:()=>z});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(94596),V=U(90351),W=U(68910),q=U(61404);class K extends W.Filter{constructor(k=0){super(W.defaultFilterVertex,q.Q.getStarfieldFragment(),{time:k,bgColor:[.161,.059,.275],trail1:[.729,.612,.718],trail2:[.514,.102,.561]}),this.alpha=1,this.timeSeconds=k}apply(k,B,U,F){this.uniforms.time=this.timeSeconds,this.uniforms.alpha=this.alpha,k.applyFilter(this,B,U,F)}}let z=class extends H.b{constructor(){super(...arguments),this.DEFAULT_FADE_DURATION_MS=2e3,this.speed=.5,this.fadeValue=1,this._fadeInDurationMs=this.DEFAULT_FADE_DURATION_MS,this._fadeOutDurationMs=this.DEFAULT_FADE_DURATION_MS,this._fadeInEase=V.i.LinearNone,this._fadeOutEase=V.i.LinearNone}initialize(){super.initialize(),this._starfieldFilter=new K,this._filterList.push(this._starfieldFilter)}fadeIn(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.fade(0,1,this._fadeInDurationMs,this._fadeInEase)}))}fadeOut(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.fade(1,0,this._fadeOutDurationMs,this._fadeOutEase)}))}fade(k,B,U,$){return(0,F.sH)(this,void 0,void 0,(function*(){if(this._tween)return void G.VyI.log("Cannot start fade, a fade is already in progress.",G.$bb.Warning);this.fadeValue=k;const F={fade:k};this._tween=j.q.instance.game.add.tween(F,this).to({fade:B},U,V.K.getEasingFunctionFromEnum($),!0),this._tween.onUpdate.add((()=>{this.fadeValue=F.fade})),yield this._tween.onTweenComplete.asPromise(),this._tween=null}))}update(){super.update(),this._starfieldFilter&&(this._starfieldFilter.timeSeconds=j.q.instance.game.time.timeMS/1e3*this.speed,this._starfieldFilter.alpha=this.fadeValue)}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"speed",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_fadeInDurationMs",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_fadeOutDurationMs",void 0),(0,F.Cg)([(0,G.gfw)(V.i),(0,F.Sn)("design:type",String)],z.prototype,"_fadeInEase",void 0),(0,F.Cg)([(0,G.gfw)(V.i),(0,F.Sn)("design:type",String)],z.prototype,"_fadeOutEase",void 0),z=(0,F.Cg)([(0,G.EVk)("StarfieldFilter",$.Y.effect)],z)},99979:(k,B,U)=>{"use strict";U.d(B,{XP:()=>F,bf:()=>V,gI:()=>W});var F,G=U(87490),j=U(88022),$=U(35120);!function(k){k.fire="icon-mini-element-fire",k.water="icon-mini-element-water",k.plant="icon-mini-element-plant",k.ice="icon-mini-element-ice",k.storm="icon-mini-element-storm",k.shadow="icon-mini-element-shadow",k.physical="icon-mini-element-physical",k.astral="icon-mini-element-astral"}(F||(F={}));const H={[G.EElementType.Fire]:F.fire,[G.EElementType.Water]:F.water,[G.EElementType.Plant]:F.plant,[G.EElementType.Ice]:F.ice,[G.EElementType.Storm]:F.storm,[G.EElementType.Shadow]:F.shadow,[G.EElementType.Physical]:F.physical,[G.EElementType.Astral]:F.astral};var V;!function(k){k.fire="elemental-base-fire",k.water="elemental-base-water",k.plant="elemental-base-earth",k.ice="elemental-base-ice",k.storm="elemental-base-storm",k.shadow="elemental-base-shadow",k.physical="elemental-base-physical",k.astral="elemental-base-astral"}(V||(V={}));G.EElementType.Fire,V.fire,G.EElementType.Water,V.water,G.EElementType.Plant,V.plant,G.EElementType.Ice,V.ice,G.EElementType.Storm,V.storm,G.EElementType.Shadow,V.shadow,G.EElementType.Physical,V.physical,G.EElementType.Astral,V.astral;class W{static getElementIconTexture(k){const B=H[k];return $.q.instance.game.cache.getTexture(j._.Ui_battle_revamp_json,B)}}},25834:(k,B,U)=>{"use strict";U.d(B,{T:()=>Y});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U.n($),V=U(50508),W=U(8394),q=U(15821),K=U(1195),z=U(80105);let Y=class{constructor(){this._hasPopulatedFromSecure=!1,this._previouslyUsedByUniqueId={}}initialize(){const k=this._player.player.kennel;{const B=this._inventory.getAllOfType("pet").map((k=>{const B={uniqueID:k.data.uniqueId};return this.updateDataFromSecurePet(B,k),B}));k.populateKennel(B),this._hasPopulatedFromSecure=!0}this._inventory.onChange.removeAll(this),this._inventory.onChange.add((B=>(0,F.sH)(this,void 0,void 0,(function*(){var U;if(!(0,W.u)("pet",B))return;let F=k.data.find((k=>k.uniqueID===B.data.uniqueId));if(0===B.quantity)return void(F&&(this._previouslyUsedByUniqueId[F.uniqueID]=F,k.removePetData(F)));let G=!1;F||(F=null!==(U=this._previouslyUsedByUniqueId[B.data.uniqueId])&&void 0!==U?U:{uniqueID:B.data.uniqueId},G=!0),this.updateDataFromSecurePet(F,B),this.updateTeamAssignment(B.data,F),G&&k.addPetFromData(F)}))),this)}getSecureData(k){var B;return null===(B=this._inventory.getAllOfType("pet").find((B=>{var U;return(null===(U=B.data)||void 0===U?void 0:U.uniqueId)===k})))||void 0===B?void 0:B.data}add(k){this._net.add(k).then((B=>{const U=this._inventory.getAllOfType("pet").find((k=>k.data.uniqueId===B));if(!U)throw new Error("Returned pet does not exist in inventory");this.updateDataFromSecurePet(k,U)})).catch(G.RQr.createHandler("Failed to create secure pet"))}remove(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this._net.remove(k)}))}saveUpdatedPets(...k){if(!this._hasPopulatedFromSecure)return;const B=[],U=H().keyBy(k,"uniqueID");for(const F of this._inventory.getAllOfType("pet")){const{uniqueId:k}=F.data,j=U[k];if(!G.Aq$.isDefined(null==j?void 0:j.uniqueID))continue;const $={uniqueID:k};this.updateDataFromSecurePet($,F);const V=H().omit(j,["hp","foreignSpells","evolve"]);q.A.isDeepEqualOrNullishAcyclic($,V)||B.push({id:{type:F.type,id:F.id,uuid:F.uuid},data:j})}0!==B.length&&this._net.update(B).catch(G.RQr.createHandler(`Could not save updated pets ${JSON.stringify(k.map((k=>k.uniqueID)))}`))}updateDataFromSecurePet(k,B){var U;const F=B.data;if((null==F?void 0:F.uniqueId)!==k.uniqueID)throw new Error("Attempted to overwrite one pet with another");k.ID=B.id,k.nickname=F.nickname,k.level=F.level.current,k.nextLevelProgressPercent=F.level.percentToNext,k.stars=F.level.stars,k.levelCaught=F.caught.level,k.catchDate=F.caught.date,k.mergeRank=F.mergeRank,k.team=F.positionInTeam,k.temporaryTeamPosition=F.temporaryTeamPosition,k.evolutionCount=F.evolutionCount,null!==(U=k.gear)&&void 0!==U||(k.gear={});for(const G of V.p)k.gear[G]=F.gear[G]}updateTeamAssignment(k,B){var U;if(k.positionInTeam===B.team)return;const F=this._player.player.kennel;G.Aq$.isDefined(B.team)&&(null===(U=F.getTeamPosition(B.team))||void 0===U?void 0:U.data)===B&&F.removeAtTeamPosition(B.team),G.Aq$.isDefined(k.positionInTeam)&&F.setTeamPosition(B,k.positionInTeam)}};(0,F.Cg)([(0,j.inject)("e20-0fb0"),(0,F.Sn)("design:type",K.E)],Y.prototype,"_player",void 0),(0,F.Cg)([(0,j.inject)("61f-37d6"),(0,F.Sn)("design:type",z.U)],Y.prototype,"_inventory",void 0),(0,F.Cg)([(0,j.inject)("f45-d827"),(0,F.Sn)("design:type",Function)],Y.prototype,"_net",void 0),Y=(0,F.Cg)([(0,j.injectable)()],Y)},80105:(k,B,U)=>{"use strict";U.d(B,{U:()=>K});var F,G=U(8674),j=U(62459),$=U(79687),H=U(95891),V=U.n(H),W=U(35537);const q="stackable";let K=class{constructor(){this.onChange=new j.HN0,this._cacheByPath={},this._cacheByUuid={},this[F]="secureInventoryChanges"}initialize(k){this._cacheByPath={},this._cacheByUuid={};for(const B of k)this.replaceItem(B)}get(k){var B;if(j.Aq$.isDefined(k))return"string"==typeof k?this._cacheByUuid[k]:V().get(this._cacheByPath,[k.type,k.id,null!==(B=k.uuid)&&void 0!==B?B:q])}getAllOfType(k){var B;const U=[];for(const F of Object.values(null!==(B=this._cacheByPath[k])&&void 0!==B?B:{}))for(const k of Object.values(F))U.push(k);return U}getCount(k){var B,U;if(!j.Aq$.isDefined(k))return 0;const F=V().get(this._cacheByPath,[k.type,k.id],{});return j.Aq$.isDefined(k.uuid)?null!==(U=null===(B=F[k.uuid])||void 0===B?void 0:B.quantity)&&void 0!==U?U:0:Object.values(F).map((k=>k.quantity)).reduce(((k,B)=>k+B),0)}[(F=W.sE,W.JN)](k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=new Map;for(const U of k)B.set(U,this.replaceItem(U));for(const U of k){const k=B.get(U);V().isEqual(U,k)||this.onChange.dispatch(U,k)}}))}destroy(){this.onChange.dispose()}replaceItem(k){var B;const U=null!==(B=k.uuid)&&void 0!==B?B:q,F=[k.type,k.id,U],G=V().get(this._cacheByPath,F);return k.quantity>0?(V().setWith(this._cacheByPath,F,k,Object),this._cacheByUuid[U]=k):(V().unset(this._cacheByPath,F),delete this._cacheByUuid[U]),G}};K=(0,G.Cg)([(0,$.injectable)()],K)},91620:(k,B,U)=>{"use strict";U.d(B,{D:()=>ct});var F,G=U(8674),j=U(62459),$=U(79687),H=U(90633),V=U(8394),W=U(98252),q=U(35120),K=U(1195),z=U(77938),Y=U(73797),Q=U(67665),X=U(96494),Z=U(13956),J=U(30226),tt=U(82885);!function(k){k.DualPackage="dual-package",k.UltraFocused="ultra-focused"}(F||(F={}));class et extends tt.J{}et._featureName="contextual-offers",et._defaultConfig={enabled:!1,promptVariant:void 0};var it=U(10674),st=U(43516),nt=U(36233);class at{getAvailableOffers(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=nt.p.getVariables();return(null==k?void 0:k.enabled)?[k]:[]}))}}var rt=U(3519),ot=U(96797);class ht{getAvailableOffers(){return(0,G.sH)(this,void 0,void 0,(function*(){try{return(yield this._networkHandler.getSegmentedOffers()).offers}catch(k){return j.VyI.log(`Error loading Segmented Offers: ${k}`,j.$bb.Error),[]}}))}}(0,G.Cg)([(0,Z.b)("eee-e872"),(0,G.Sn)("design:type",rt.U)],ht.prototype,"_networkHandler",void 0);let ct=class{get meetsMembershipRequirement(){return this._meetsMembershipRequirement}constructor(){this._dataSources=[new ht,new at],this._meetsMembershipRequirement=!1,q.q.instance.prodigy.game.broadcaster.addAppListener(Y.H3.MembershipResponseReceived,this.handleMembershipChange.bind(this),this,void 0,!0)}loadOffersFromData(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!j.Aq$.isDefined(this._cachedData)){for(const k of this._dataSources){const B=yield k.getAvailableOffers();if(B.length>0){this._cachedData=B;break}}this.checkOfferAssignment().then(this.processMembershipRequirement.bind(this)).catch(j.RQr.createHandler("Failed to process segmented offer membership requirement"))}}))}getActiveOfferAsync(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;return j.Aq$.isDefined(this._loadDataPromise)||(this._loadDataPromise=this.loadOffersFromData()),yield this._loadDataPromise,null===(k=this._cachedData)||void 0===k?void 0:k.find((k=>ot.P.isOfferActive(k)||ot.P.isOfferInGracePeriod(k)))}))}checkOfferAssignment(){return(0,G.sH)(this,void 0,void 0,(function*(){!this.userHasOfferAvailable()&&j.Aq$.isDefined(this.activeOffer)&&(yield this.assignActiveOfferToPlayer(),this._segment.segmentedOffers.sendSegmentedOfferAssignedEvent(this.activeOffer,ot.P.getUserSegmentIndex(this.activeOffer)),this.setBreadcrumbUserHasOfferAvailable())}))}destroy(){q.q.instance.prodigy.game.broadcaster.removeAppListener(Y.H3.MembershipResponseReceived,this,void 0)}handleMembershipChange(k){"success"===k&&this.processMembershipRequirement().catch(j.RQr.createHandler("Failed to process segmented offer membership requirement"))}processMembershipRequirement(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this.activeOffer)return void(this._meetsMembershipRequirement=!1);if(this.isPlayerOfferStateValid()||(this._loggedInPlayer.player.clearSegmentedOfferState(),yield this.assignActiveOfferToPlayer()),!j.Aq$.isDefined(this._loggedInPlayer.player.data.segmentedOfferState))return void(this._meetsMembershipRequirement=!1);const k=this._loggedInPlayer.player.data.segmentedOfferState;if(void 0===k.startingMembership)return void(this._meetsMembershipRequirement=this._loggedInPlayer.isMember());const B=yield this._loggedInPlayer.player.getActiveMathMembership();if(!j.Aq$.isDefined(B)||!this._loggedInPlayer.isMember())return yield this.assignActiveOfferToPlayer(),void(this._meetsMembershipRequirement=!1);k.startingMembership===B.currentPackage.id?(this._loggedInPlayer.player.data.segmentedOfferState.upgradeOptions=(null==B?void 0:B.upgradeOptions)||[],this._loggedInPlayer.player.forceSaveCharacter(),this._meetsMembershipRequirement=!1):this._meetsMembershipRequirement=!0}))}isPlayerOfferStateValid(){var k;return this.activeOffer?(null===(k=this._loggedInPlayer.player.data.segmentedOfferState)||void 0===k?void 0:k.offerId)===this.activeOffer.id:void 0===this._loggedInPlayer.player.data.segmentedOfferState}get currentOfferStatus(){const k=this.activeOffer;return k&&this._loggedInPlayer.player.hasCompletedTutorial()?ot.P.isOfferEndingSoon(k)?st.v.OFFER_ENDING_SOON:ot.P.isOfferInGracePeriod(k)?st.v.OFFER_IN_GRACE_PERIOD:st.v.OFFER_ACTIVE:st.v.NO_ACTIVE_OFFER}get rewardsForCurrentUserSegment(){const k=this.activeOffer;if(!k)return[];const B=ot.P.getUserSegment(k);return B?B.rewards:[]}get activeOffer(){var k;if(void 0!==this._cachedData)return null===(k=this._cachedData)||void 0===k?void 0:k.find((k=>ot.P.isOfferActive(k)||ot.P.isOfferInGracePeriod(k)));j.VyI.log("Attemping to read active segmented offer before it was loaded. Try getActiveOfferAsync() to first load the data",j.$bb.Warning)}assignActiveOfferToPlayer(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;this.activeOffer&&(this._loggedInPlayer.isMember()?this._loggedInPlayer.player.setSegmentedOfferState({offerId:this.activeOffer.id,startingMembership:null===(B=null===(k=yield this._loggedInPlayer.player.getActiveMathMembership())||void 0===k?void 0:k.currentPackage)||void 0===B?void 0:B.id,upgradeOptions:(yield this._loggedInPlayer.player.getMembershipUpsellData()).upgradeOptions}):this._loggedInPlayer.player.setSegmentedOfferState({offerId:this.activeOffer.id,startingMembership:void 0,upgradeOptions:[]}))}))}redeemActiveOffer(){const k=this.rewardsForCurrentUserSegment,B=this.activeOffer;k.length>0&&(this.resetSurfacingBreadcrumbs(),this._loggedInPlayer.player.clearSegmentedOfferState(),this._networkHandler.redeemOffer(B.id,ot.P.getUserSegmentIndex(B)).then((k=>{k.items.some((k=>"petHat"===k.type||"petRelic"===k.type))&&this._petGearInventory.refreshPetGear().catch(j.RQr.createHandler("Failed to refresh pet gear after redeeming segmented offer"))})).catch(j.RQr.createHandler(`Failed to redeem segmented offer. Offer ID: ${B.id}.`)).finally((()=>{this._loggedInPlayer.player.encounters.setOfferResolved(B.id)})),k.forEach((k=>{var B,U,F;(0,V.p)(k.type,k.ID)?this._segment.item.sendItemReceivedEvent(k.ID,null===(U=null===(B=z.t.getItem(k.type,k.ID))||void 0===B?void 0:B.data)||void 0===U?void 0:U.name,k.type,null!==(F=k.N)&&void 0!==F?F:1,{source_type:"segmented_offers_reward"}):J.J.bagItem(k,q.q.instance.prodigy.game,"got-item",void 0)})),this.processMembershipRequirement().catch(j.RQr.createHandler("Failed to process segmented offer membership requirement")))}rejectActiveOffer(){const k=this.activeOffer;k&&ot.P.isOfferInGracePeriod(k)&&(this.resetSurfacingBreadcrumbs(),this._loggedInPlayer.player.encounters.setOfferResolved(k.id),this._loggedInPlayer.player.clearSegmentedOfferState(),this.processMembershipRequirement().catch(j.RQr.createHandler("Failed to process segmented offer membership requirement")))}userHasChangedSegment(){const k=this.activeOffer,B=this._currentSegmentIndex;return!!k&&(this._currentSegmentIndex=ot.P.getUserSegmentIndex(k),j.Aq$.isDefined(B)&&j.Aq$.isDefined(this._currentSegmentIndex)&&this._currentSegmentIndex!==B)}userCanReceiveSegmentedOffers(){const k=this._loggedInPlayer.player.hasCompletedTutorial(),B=!this._loggedInPlayer.isMember()||this._loggedInPlayer.player.hasMembershipUpgradeOptions();return k&&B&&!W.pF.isNativeApp()}userHasEligibleOfferAvailable(){return this.currentOfferStatus!==st.v.NO_ACTIVE_OFFER&&this.userCanReceiveSegmentedOffers()}shouldAutoSurfaceSegmentedOffers(){return!this._loggedInPlayer.player.isPlayingAtSchool()||!et.isFeatureEnabled()}userHasLastChance(){return this.currentOfferStatus===st.v.OFFER_IN_GRACE_PERIOD&&!this._breadcrumbManager.isBreadcrumbComplete(H.B.FEATURE_SEGMENTED_OFFERS,H.B.BREADCRUMB_SEGMENTED_OFFERS_SUPPRESS_LAST_CHANCE)}userHasOfferAvailable(){return this._breadcrumbManager.isBreadcrumbComplete(H.B.FEATURE_SEGMENTED_OFFERS,H.B.BREADCRUMB_SEGMENTED_OFFERS_OFFER_AVAILABLE)}userHasSeenFirstOffer(){return this._breadcrumbManager.isBreadcrumbComplete(H.B.FEATURE_SEGMENTED_OFFERS,H.B.BREADCRUMB_SEGMENTED_OFFERS_FIRST_OFFER_SEEN)}userHasSeenFirstBattleLost(){return this._breadcrumbManager.isBreadcrumbComplete(H.B.FEATURE_SEGMENTED_OFFERS,H.B.BREADCRUMB_SEGMENTED_OFFERS_FIRST_BATTLE_LOST)}setBreadcrumbUserHasOfferAvailable(){this.activeOffer&&this._breadcrumbManager.completeBreadcrumb(H.B.FEATURE_SEGMENTED_OFFERS,H.B.BREADCRUMB_SEGMENTED_OFFERS_OFFER_AVAILABLE)}setBreadcrumbHasSeenFirstOffer(){this._breadcrumbManager.completeBreadcrumb(H.B.FEATURE_SEGMENTED_OFFERS,H.B.BREADCRUMB_SEGMENTED_OFFERS_FIRST_OFFER_SEEN)}setBreadcrumbHasSeenFirstBattleLost(){this._breadcrumbManager.completeBreadcrumb(H.B.FEATURE_SEGMENTED_OFFERS,H.B.BREADCRUMB_SEGMENTED_OFFERS_FIRST_BATTLE_LOST)}resetSurfacingBreadcrumbs(){this._breadcrumbManager.resetBreadcrumbs(H.B.FEATURE_SEGMENTED_OFFERS)}};(0,G.Cg)([(0,Z.b)("e20-0fb0"),(0,G.Sn)("design:type",K.E)],ct.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,Z.b)("12f-4e29"),(0,G.Sn)("design:type",X.F)],ct.prototype,"_breadcrumbManager",void 0),(0,G.Cg)([(0,Z.b)("c47-20b6"),(0,G.Sn)("design:type",Q.Y)],ct.prototype,"_segment",void 0),(0,G.Cg)([(0,Z.b)("eee-e872"),(0,G.Sn)("design:type",rt.U)],ct.prototype,"_networkHandler",void 0),(0,G.Cg)([(0,Z.b)("d69-defe"),(0,G.Sn)("design:type",it.q)],ct.prototype,"_petGearInventory",void 0),ct=(0,G.Cg)([(0,$.injectable)(),(0,G.Sn)("design:paramtypes",[])],ct)},3519:(k,B,U)=>{"use strict";U.d(B,{U:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(67238);let H=class extends $.D{redeemOffer(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return this.call(j.D.SegmentedOffers.RedeemOffer,{offerId:k,segmentIndex:B},!0)}))}getSegmentedOffers(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.call(j.D.SegmentedOffers.GetOffers,{},!0)}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},96797:(k,B,U)=>{"use strict";U.d(B,{P:()=>J});var F=U(99625),G=U(38170);class j{static isOfferInDateRange(k,B){return G.r.isDateWithinRange(B,k.startDate,k.endDate)}static isOfferInGracePeriodDateRange(k,B){const U=new Date(k.endDate).getTime(),F=U+k.gracePeriodDays*j.DAY_IN_MS;return G.r.isDateWithinRange(B,U,F)}}j.DAY_IN_MS=864e5;var $=U(35120),H=U(91207),V=U(34829),W=U(77938),q=U(65050),K=U(96810),z=U(41674),Y=U(64353),Q=U(95057),X=U(53661),Z=U(47255);class J{static isOfferActive(k){return j.isOfferInDateRange(k,Date.now())&&!J.userHasResolvedOffer(k)}static isOfferEndingSoon(k){const B=new Date(k.endDate).getTime(),U=B-k.endingSoonDays*V.A.DAY_IN_MS;return G.r.isDateWithinRange(Date.now(),U,B)&&!J.userHasResolvedOffer(k)}static isOfferInGracePeriod(k){return j.isOfferInGracePeriodDateRange(k,Date.now())&&!J.userHasResolvedOffer(k)}static userHasResolvedOffer(k){return $.q.instance.prodigy.gameContainer.get("e20-0fb0").player.encounters.hasResolvedOffer(k.id)}static getUserSegment(k){const B=$.q.instance.prodigy.gameContainer.get("db5-fb6e");return k.segments.sort(((k,B)=>k.priority-B.priority)).find((k=>B.meetsRequirementsDeprecated({requirements:k.featureRequirements})))}static getUserSegmentIndex(k){const B=$.q.instance.prodigy.gameContainer.get("db5-fb6e");return k.segments.sort(((k,B)=>k.priority-B.priority)).findIndex((k=>B.meetsRequirementsDeprecated({requirements:k.featureRequirements})))}static openConfiguredModal(k){const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=$.q.instance.prodigy.gameContainer.get("a02-c2b2"),G=$.q.instance.prodigy.gameContainer.get("c47-20b6");J.sendInterfaceOpenEvents(G,U.activeOffer,B),$.q.instance.prodigy.open.prefabMenu(F.l.SegmentedOffersModal,k,void 0,!0,void 0,J.getFullOfferInjectableProperties(U.activeOffer))}static getFullOfferInjectableProperties(k){const B=$.q.instance.prodigy.gameContainer.get("a02-c2b2"),U=J.getItemInjectableProperties(B.rewardsForCurrentUserSegment),F=$.q.instance.prodigy.gameContainer.get("c47-20b6");return Object.assign({[X.ht.SegmentedOffersTimeRemainingMS]:J.getOfferTimeRemaining(k),[X.ht.SegmentedOffersEnding]:J.isOfferInGracePeriod(k),[X.ht.SegmentedOffersRejected]:B.rejectActiveOffer.bind(B),[X.ht.SegmentedOffersFunnelAdvancedCTA]:J.sendCtaFunnelAdvancedEvent.bind(this,F,k),[X.ht.SegmentedOffersFunnelAdvancedGotMembership]:J.sendMembershipFunnelAdvancedEvent.bind(this,F,k)},U)}static getItemInjectableProperties(k){"pet"!==k[0].type&&k.forEach(((B,U)=>{"pet"===B.type&&(k.splice(U,1),k.unshift(B))}));const B={};return k.forEach(((k,U)=>{B[X.ht.SegmentedOffersItemName+U]=W.t.getItem(k.type,k.ID).data.name,B[X.ht.SegmentedOffersItemIcon+U]=H.E.getIconForType(k.type,k.ID),B[X.ht.SegmentedOffersItemQuantity+U]=`x${k.N}`,B[X.ht.SegmentedOffersItemId+U]=k.ID})),B}static getOfferTimeRemaining(k){const B=new Date(k.endDate).getTime();return Math.max(B-Date.now(),0)}static sendInterfaceOpenEvents(k,B,U,F=!0){k.featureCommon.sendInterfaceEvent({interfaceName:"segmented_offers_main",interfaceType:z.Wm.Window,instanceType:q.N.UI,originType:F?z.$N.AutoSurfaced:z.$N.ButtonClick,originID:"button-click"}),k.playerProgression.sendPlayerProgressionAdvancedEvent({progressionType:"segmented_offers",progressionSubType:B.id,progressionNewValue:(U.encounters.getResolvedOffers().length+1).toString(),progressionPreviousValue:U.encounters.getResolvedOffers().length.toString(),creatureName:"Player"})}static sendCtaFunnelAdvancedEvent(k,B){k.playerProgression.sendFunnelAdvancedEvent({funnelName:B.id,funnelType:"segmented_offers",stepName:K.l.SegmentedOffersClicked},{step_index:3});const U=Y.P.shouldUseUnifiedConversionFlow(Z.o.FunnelSegmentedOffers)?Q.R.UnifiedConversionFlow:Q.R.Static;k.purchase.sendFunnelStart({adType:U,category:"segmented-offers",contentId:B.id,type:"Click-Button-Segmented-Offers",adVersion:Y.P.getAdVersion(Z.o.FunnelSegmentedOffers)})}static sendMembershipFunnelAdvancedEvent(k,B){k.playerProgression.sendFunnelAdvancedEvent({funnelName:B.id,funnelType:"segmented_offers",stepName:K.l.SegmentedOffersGotMembership},{step_index:4})}}},19145:(k,B,U)=>{"use strict";U.d(B,{Z:()=>J});var F=U(8674),G=U(95891),j=U.n(G),$=U(62459),H=U(35120),V=U(44357),W=U(90633),q=U(77578),K=U(28628);const z="tutorial-quests",Y={revampBattleType:K.gu.StatusEffectsTutorial,difficulty:7,opponent:[{data:{ID:62},appearance:{skinColor:3,eyeColor:7,hair:{style:10,color:1}},equipment:{hat:129,boots:57,outfit:114,weapon:152},name:"NPC_NAME_FTUE_WIZARD"}],pets:[{ID:51}],screen:"battle-academy-gh-stairs"};var Q,X=U(73678);!function(k){k.Intro="Intro",k.PreBattleAcademyCutscene="PreBattleAcademyCutscene",k.Battle="Battle",k.PostBattleAcademyCutscene="PostBattleAcademyCutscene"}(Q||(Q={}));const Z=[Q.Intro,Q.PreBattleAcademyCutscene,Q.Battle,Q.PostBattleAcademyCutscene];class J{static get instance(){var k;return null!==(k=this._instance)&&void 0!==k?k:this._instance=new J}constructor(){this._currentStepIndex=-1,this._segment=H.q.instance.prodigy.gameContainer.get("c47-20b6")}isInProgress(){return this._currentStepIndex>=0}runSpellStatusEffectsTutorial(k=(()=>null)){(0,V.dD)(!1),this._previousMap=H.q.instance.prodigy.world.getCurrentMap(),this._currentStepIndex=0,this.runSequence().then((()=>{this.handleTutorialCompletion()})).catch((k=>{$.VyI.log(`Error running Spell Status Effects Tutorial: ${k}`,$.$bb.Error)})).finally(this.leaveTutorial.bind(this,k))}runSequence(){return(0,F.sH)(this,void 0,void 0,(function*(){for(;this._currentStepIndex>=0&&this._currentStepIndex{H.q.instance.prodigy.world.getZone(X.A_.ACADEMY).getScene("statusEffectFTUE1").onSceneComplete.addOnce((()=>{k()})),H.q.instance.prodigy.world.playScene("academy-statusEffectFTUE1")}))}))}playAcademyPostBattleCutscene(){return(0,F.sH)(this,void 0,void 0,(function*(){return new Promise((k=>{H.q.instance.prodigy.world.getZone(X.A_.ACADEMY).getScene("statusEffectFTUE2").onSceneComplete.addOnce((()=>{k()})),H.q.instance.prodigy.world.playScene("academy-statusEffectFTUE2")}))}))}startBattle(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.getFTUEBattleMods();return new Promise((B=>{H.q.instance.prodigy.battle.start(k,(()=>{this._segment.statusEffects.sendStatusEffectFtueEvent(q.K.StatusEffectFTUEBattleCompleted),B()}),(()=>{B()}),(()=>{B()})),this._segment.statusEffects.sendStatusEffectFtueEvent(q.K.StatusEffectFTUEBattleStarted)}))}))}getFTUEBattleMods(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=H.q.instance.prodigy.gameContainer.get($.t5G.AssetLoader);yield B.loadAssets([z]);const U=H.q.instance.game.cache.getJSON(z),F=null!==(k=null==U?void 0:U["status-effects-tutorial"])&&void 0!==k?k:Y;return j().cloneDeep(F)}))}handleTutorialCompletion(){this._segment.statusEffects.sendStatusEffectFtueEvent(q.K.StatusEffectFTUECompleted),H.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(W.B.FEATURE_STATUS_EFFECTS,W.B.BREADCRUMB_STATUS_EFFECTS_FTUE_COMPLETED)}static canShowSpellStatusEffectsTutorial(){const k=[];H.q.instance.prodigy.world.getZone(X.A_.FOREST).getCurrentQuestID()>3||k.push("The player has not progressed far enough in the game");H.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(W.B.FEATURE_STATUS_EFFECTS,W.B.BREADCRUMB_STATUS_EFFECTS_FTUE_COMPLETED)&&k.push("Tutorial has already been viewed");const B=k.join("\n");return{canBeTransported:0===k.length,info:B}}leaveTutorial(k){this._currentStepIndex=-1,k(),H.q.instance.prodigy.world.it(this._previousMap),(0,V.dD)(!0)}escapeTutorial(){if(this.isInProgress()){this._currentStepIndex=-1;const k=H.q.instance.prodigy.gameContainer.get("b5b-6fa4");k.isDialogueInProgress()&&k.close(!0),this.leaveTutorial((()=>null))}}}},45224:(k,B,U)=>{"use strict";U.d(B,{f:()=>F});class F{}F.HARRIET_NAME="NPC_NAME_HARRIET_HOOD",F.DON_ZORRO_NAME="NPC_NAME_DON_ZORRO",F.BARGO_NAME="NPC_NAME_BARGO",F.VERNA_NAME="NPC_NAME_VERNA",F.HARRIET_NAME_SEGMENT="harriet_hood",F.DON_ZORRO_NAME_SEGMENT="don_zorro",F.TOWN_CENTRE="lamplight-B3",F.HARRIET_ZONE="lamplight-A1",F.DON_ZORRO_ZONE="lamplight-D3",F.BARGO_ZONE="lamplight-B2",F.VERNA_ZONE="lamplight-C3-arena",F.MAGIC_EGGS_CURRENCY_ID=17,F.FOX_HATS=[123,124,125,229,261,262,263,285],F.BUNNY_HATS=[126,127,128,222,228,259,260,265,285]},37623:(k,B,U)=>{"use strict";var F;U.d(B,{O:()=>F}),function(k){k.POINTS="UI_POINTS",k.YOUR_CLASS="UI_YOUR_CLASS",k.YOUR_SCHOOL="UI_YOUR_SCHOOL",k.YOU_QUALIFIED="STATE_CHALLENGES_QUALIFIED",k.YOUR_PRIZES="STATE_CHALLENGES_PRIZES",k.HIGHEST_MILESTONE="STATE_CHALLENGES_HIGHEST_MILESTONE",k.NEXT_CHALLENGE="STATE_CHALLENGES_NEXT_CHALLENGE",k.STATE_CHALENGES_STARTS="STATE_CHALENGES_STARTS",k.STATE_CHALLENGES_ENDS_IN="STATE_CHALLENGES_ENDS_IN",k.STATE_CHALLENGES_ON_NOW="STATE_CHALLENGES_ON_NOW",k.STATE_CHALLENGES_CHAMPION_DESCRIPTION="STATE_CHALLENGES_CHAMPION_DESCRIPTION",k.STATE_CHALLENGES_QUALIFIED_DESCRIPTION="STATE_CHALLENGES_QUALIFIED_DESCRIPTION",k.STATE_CHALLENGE_DESCRIPTION="STATE_CHALLENGE_DESCRIPTION",k.STATE_CHALLENGES_CURRENT_TITLE="STATE_CHALLENGES_CURRENT_TITLE",k.STATE_CHALLENGES_CHAMPION_TITLE="STATE_CHALLENGES_CHAMPION_TITLE",k.LEADERBOARDS_SUBHEADING_CORRECT_ANSWERS="LEADERBOARDS_SUBHEADING_CORRECT_ANSWERS",k.CHEST_REWARD_CONGRATULATIONS="CHEST_REWARD_CONGRATULATIONS",k.STATE_CHALLENGES_CLASS_DESCRIPTION="STATE_CHALLENGES_CLASS_DESCRIPTION",k.STATE_CHALLENGES_ONLY_CLASS_DESCRIPTION="STATE_CHALLENGES_ONLY_CLASS_DESCRIPTION",k.STATE_CHALLENGES_RANK="STATE_CHALLENGES_RANK",k.STATE_CHALLENGES_TOTAL_CORRECT="STATE_CHALLENGES_TOTAL_CORRECT",k.STATE_CHALLENGES_THIS_MONTH="STATE_CHALLENGES_THIS_MONTH",k.STATE_CHALLENGES_CLAIM_REWARDS="STATE_CHALLENGES_CLAIM_REWARDS",k.STATE_CHALLENGE_CELEBRATION_BOX="STATE_CHALLENGE_CELEBRATION_BOX",k.NATIONAL_CUP_ENDED="NATIONAL_CUP_ENDED",k.NATIONAL_CUP_ENDED_LONG="NATIONAL_CUP_ENDED_LONG",k.NATIONAL_CUP_TITLE="NATIONAL_CUP_TITLE",k.NATIONAL_CUP_DESCRIPTION="NATIONAL_CUP_DESCRIPTION",k.NATIONAL_CUP_RESULTS_PENDING="NATIONAL_CUP_RESULTS_PENDING",k.NATIONAL_CUP_RESULTS_PENDING_LONG="NATIONAL_CUP_RESULTS_PENDING_LONG",k.NATIONAL_CUP_RESULTS_OFFICIAL="NATIONAL_CUP_RESULTS_OFFICIAL",k.BUTTON_NEXT_CAPITAL="BUTTON_NEXT_CAPITAL"}(F||(F={}))},4766:(k,B,U)=>{"use strict";U.d(B,{H:()=>G});var F=U(8820);class G{static getEndDateForCurrentChallenge(k,B,U){if(k===F.a.NationalCup&&U)return U;if(k===F.a.StateChallenge){const k=B.getUTCFullYear(),U=B.getUTCMonth();return new Date(Date.UTC(k,U+1,1,G.ROLLOVER_HOUR_UTC)-1)}}static isInDowntime(k,B,U,j){if(k===F.a.NationalCup){if(!U)return!1;const k=B.getTime()-U.getTime();return k>=0&&kk.month===V));return null===(H=null==W?void 0:W.currentSchool)||void 0===H?void 0:H.node}static getMsUntilEndOfCurrentChallenge(k,B,U){const F=G.getEndDateForCurrentChallenge(k,B,U);return F?F.getTime()-B.getTime():0}static getDaysUntilEndOfCurrentChallenge(k,B,U){let j;return j=k===F.a.NationalCup&&U?U:G.getEndDateForCurrentChallenge(k,B,U),j?Math.max(0,Math.ceil((j.getTime()-B.getTime())/864e5)):0}static getRepresentativeDateForPreviousChallenge(k,B,U,j){if(G.getPreviousChallengeCompetition(k,B,j)===F.a.NationalCup&&U&&j){const k=(U.getTime()+j.getTime())/2;return new Date(k)}const{month:$,year:H}=G.getPreviousStateChallengeMonthYear(B);return new Date(Date.UTC(H,$-1,15))}static getPreviousChallengeCompetition(k,B,U){return k===F.a.NationalCup&&U&&B>U?F.a.NationalCup:F.a.StateChallenge}}G.ROLLOVER_HOUR_UTC=8,G.ROLLOVER_WINDOW_MS=36e5*G.ROLLOVER_HOUR_UTC},2980:(k,B,U)=>{"use strict";U.d(B,{W:()=>G,v:()=>Z});var F,G,j=U(8674),$=U(62459),H=U(79687),V=U(95891),W=U.n(V),q=U(8820),K=U(35120),z=U(59114),Y=U(4766),Q=U(88912),X=U(87490);!function(k){k.CLASSROOM="CLASSROOM",k.SCHOOL="SCHOOL"}(G||(G={}));let Z=F=class{constructor(){this._isCurrentlyInDownTime=!1,this._totalPhaseCorrectAnswers=0,this._hasValidClassroom=void 0,this._isInitialized=!1,this._isInRewardsGrantingPeriod=!1,this.onNewDataProcessed=new $.HN0,this._hasAnimationPlayed=!1,this._activeCompetitionPhase=q.a.None,this._viewableCompetitionPhase=q.a.None}get isCurrentlyInDownTime(){return this._isCurrentlyInDownTime}get downtimeTitleLocalizationKeyOverride(){var k;return null===(k=this._prodigyCupConfigData)||void 0===k?void 0:k.downtimeTitleLocalizationKeyOverride}get downtimeSubtitleLocalizationKeyOverride(){var k;return null===(k=this._prodigyCupConfigData)||void 0===k?void 0:k.downtimeSubtitleLocalizationKeyOverride}get cachedRolloverHourUTC(){var k;return null===(k=this._prodigyCupConfigData)||void 0===k?void 0:k.rolloverHourUTC}get nationalCupResultsValidated(){var k;return null===(k=this._prodigyCupConfigData)||void 0===k?void 0:k.nationalCupResultsValidated}get currentClassroomData(){return this._currentClassroomData}get totalPhaseCorrectAnswers(){return this._totalPhaseCorrectAnswers}get endDate(){return this._endDate}get finalsPhaseStartDate(){return this._finalsPhaseStartDate}get finalsPhaseEndDate(){return this._finalsPhaseEndDate}get lastUpdated(){return this._lastUpdated}get isInitialized(){return this._isInitialized}get isInRewardsGrantingPeriod(){return this._isInRewardsGrantingPeriod}get hasAnimationPlayed(){return this._hasAnimationPlayed}get classroomRacerIds(){return this._classroomRacerIds}get schoolRacerIds(){return this._schoolRacerIds}get classroomPortraitIds(){return this._classroomPortraitIds}get schoolPortraitIds(){return this._schoolPortraitIds}get lastClassCodeFetched(){return this._lastClassCodeFetched}get activeCompetitionPhase(){return this._activeCompetitionPhase}get viewableCompetitionPhase(){return this._viewableCompetitionPhase}hasValidClassroom(){return(0,j.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,j;if($.Aq$.isDefined(this._hasValidClassroom))return this._hasValidClassroom;if("US"!==(null===(k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.geolocationData.country)||void 0===k?void 0:k.iso_code))return this._hasValidClassroom=!1,!1;const H=K.q.instance.prodigy.gameContainer.get("a96-1470"),V=K.q.instance.prodigy.gameContainer.get("c97-bd0d"),[W,q]=yield Promise.all([H.isEligibleForMenu(),V.getCurrentClassCode()]),z=null!==(j=null===(G=null===(F=null===(U=null===(B=q)||void 0===B?void 0:B.data)||void 0===U?void 0:U.player)||void 0===F?void 0:F.currentClassroom)||void 0===G?void 0:G.code)&&void 0!==j?j:void 0;return $.Aq$.isDefined(z)&&(this._lastClassCodeFetched=z),this._hasValidClassroom=!$.Aq$.isDefined(z)||$.Aq$.isDefined(z)&&z.length>0&&W,this._hasValidClassroom}))}getCurrentSchoolRanking(){return(0,j.sH)(this,void 0,void 0,(function*(){var k;return yield this.initialize(),null===(k=this._currentSchoolData)||void 0===k?void 0:k.rank}))}getSchoolEntryForPreviousChallenge(){return this._previousChallengeResults}getSchoolQualificationStatus(){return(0,j.sH)(this,void 0,void 0,(function*(){return this._qualificationStatus}))}getStateChallengesLeaderboard(k){if(!this._isInitialized||!this._currentClassroomData&&!this._currentSchoolData)return void $.VyI.log("StateChallengesDataProvider: getStateChallengesLeaderboard: Data not initialized",$.$bb.Warning);const B=k===G.CLASSROOM;return{myEntry:B?this._currentClassroomData:this._currentSchoolData,competitorEntries:B?this._stateChallengeClassroomRankingMap:this._stateChallengeSchoolRankingMap}}static getNextRolloverMs(k){const B=new Date(k),U=Date.UTC(B.getUTCFullYear(),B.getUTCMonth(),B.getUTCDate(),Y.H.ROLLOVER_HOUR_UTC);return k=this._cacheExpiresAt&&(this._initializationPromise=void 0,this._isInitialized=!1),this._initializationPromise||(this._initializationPromise=(()=>(0,j.sH)(this,void 0,void 0,(function*(){yield this.checkAndCacheDownTimeState(),$.Aq$.isDefined(this._lastClassCodeFetched)&&this._hasValidClassroom&&(yield this.requestAndCacheProdigyCupData())})))()),this._initializationPromise}))}debugLogStateChallengesLeaderboard(k){const B=this.getStateChallengesLeaderboard(k);X.Util.isDefined(B)?$.VyI.log(`StateChallengesDataProvider from cache: ${B}`,$.$bb.Info):this.initialize().then((()=>{const B=this.getStateChallengesLeaderboard(k);B?($.VyI.log("StateChallenge Leaderboard retrieved from database",$.$bb.Info),$.VyI.log(`StateChallengesDataProvider: ${B}`,$.$bb.Info)):$.VyI.log("StateChallengesDataProvider: debug: No leaderboard data available",$.$bb.Error)})).catch((k=>{$.VyI.log("StateChallengesDataProvider: debug: Error initializing data",$.$bb.Error,k)}))}requestAndCacheProdigyCupData(){return(0,j.sH)(this,void 0,void 0,(function*(){var k,B,U,G,j,H,V,Y;this._isInRewardsGrantingPeriod=!1;const Q=K.q.instance.prodigy.gameContainer.get("a96-1470"),X=yield Q.fetchStateChallengesData();if(!X||!$.Aq$.isDefined(null===(B=null===(k=null==X?void 0:X.data)||void 0===k?void 0:k.viewer)||void 0===B?void 0:B.currentClassroom))return void $.VyI.log("StateChallengesDataProvider: requestAndCacheStateChallengesData: No data received",$.$bb.Error);const Z=null===(U=X.data.viewer.currentClassroom.node)||void 0===U?void 0:U.classroomMonthlyLeaderboard,J=null===(j=null===(G=X.data.viewer.currentClassroom.node)||void 0===G?void 0:G.currentProdigyCup)||void 0===j?void 0:j.stateChallengesPhase,tt=null!==(Y=null===(V=null===(H=X.data.viewer.currentClassroom.node)||void 0===H?void 0:H.currentProdigyCup)||void 0===V?void 0:V.finalsPhase)&&void 0!==Y?Y:null;if(!$.Aq$.isDefined(Z)||!$.Aq$.isDefined(J))return void $.VyI.log("StateChallengesDataProvider: requestAndCacheStateChallengesData: Incomplete data received",$.$bb.Warning);if(this._activeCompetitionPhase=F.determineActivePhase(J,tt),this._viewableCompetitionPhase=this.determineViewableCompetitionPhase(tt),this._activeCompetitionPhase===q.a.None||this._activeCompetitionPhase===q.a.SparkCup){const{rewardsGrantingPeriodEndDate:k}=yield Q.getRewardsGrantingPeriodEndDate(this._viewableCompetitionPhase);this._isInRewardsGrantingPeriod=$.Aq$.isDefined(k)&&Date.now()<=new Date(k).getTime()}this.cacheFinalsPhaseDates(tt,J),this._viewableCompetitionPhase===q.a.NationalCup?this.cacheNationalCupData(tt,J.stateChallenges.nodes,Z):this.cacheStateChallengeData(J,Z),this._cacheExpiresAt=F.getNextRolloverMs(Date.now());const et=[...z.yT.classViewPetIds],it=[...z.yT.schoolViewPetIds];this._classroomRacerIds=W().sampleSize(et,2),this._schoolRacerIds=W().sampleSize(it,2),this._classroomPortraitIds=W().sampleSize(et,3),this._schoolPortraitIds=W().sampleSize(it,3),this._isInitialized=!0,this.onNewDataProcessed.dispatch()}))}cacheFinalsPhaseDates(k,B){if(X.Util.isDefined(null==k?void 0:k.startDate))this._finalsPhaseStartDate=new Date(k.startDate);else{const k=new Date(B.endDate);this._finalsPhaseStartDate=new Date(Date.UTC(k.getUTCFullYear(),k.getUTCMonth()+1,1))}X.Util.isDefined(null==k?void 0:k.endDate)&&(this._finalsPhaseEndDate=new Date(k.endDate))}determineViewableCompetitionPhase(k){if(this._activeCompetitionPhase===q.a.NationalCup||this._activeCompetitionPhase===q.a.StateChallenge)return this._activeCompetitionPhase;return null!==k&&k.competition===q.a.NationalCup&&new Date(k.endDate).getTime()=k&&U<=F){if(B.competition===q.a.SparkCup)return q.a.SparkCup;if(B.competition===q.a.NationalCup)return q.a.NationalCup}}const F=new Date(k.startDate).getTime(),G=new Date(k.endDate).getTime();return U>=F&&U<=G?q.a.StateChallenge:q.a.None}processLeaderboard(k,B,U){k.forEach((k=>{if(void 0===k.rank||void 0===B.rank)return;const F=Math.abs(k.rank-B.rank)<=2,G=k.rank<=3&&!U.has(k.rank);k!==B&&(F||G)&&U.set(k.rank,k)}))}cacheStateChallengeData(k,B){var U,F,G,j,H,V,W,q,K,z,Q,X,Z,J,tt,et;const it=null==B?void 0:B.currentLeaderboard,st=k.currentStateChallenge;if(!$.Aq$.isDefined(it)||!$.Aq$.isDefined(st))return void $.VyI.log("StateChallengesDataProvider: cacheStateChallengeData: Missing classroom or school node",$.$bb.Warning);if(this._lastUpdated=new Date(k.lastUpdated),this._endDate=k.endDate?new Date(k.endDate):new Date((new Date).getFullYear(),4,1),this._qualificationStatus={qualifiedForNationalCup:$.Aq$.isDefined(k.nationalCupQualificationDate),wonStateChallenge:$.Aq$.isDefined(k.stateChallengeWinnerDate)},this._currentClassroomData=null===(F=null===(U=it.node)||void 0===U?void 0:U.currentClassroom)||void 0===F?void 0:F.node,this._currentSchoolData=null===(j=null===(G=st.node)||void 0===G?void 0:G.currentSchool)||void 0===j?void 0:j.node,!$.Aq$.isDefined(this._currentClassroomData)||!$.Aq$.isDefined(this._currentSchoolData))return void $.VyI.log("StateChallengesDataProvider: cacheStateChallengeData: Missing current classroom or school data",$.$bb.Warning);this._previousChallengeResults=Y.H.findPreviousChallengeResults(k.stateChallenges.nodes,this._viewableCompetitionPhase,new Date(Date.now())),this._totalPhaseCorrectAnswers=null!==(V=null===(H=k.stateChallenges.nodes)||void 0===H?void 0:H.reduce(((k,B)=>{var U,F,G;return k+(null!==(G=null===(F=null===(U=B.currentSchool)||void 0===U?void 0:U.node)||void 0===F?void 0:F.correctAnswers)&&void 0!==G?G:0)}),0))&&void 0!==V?V:0,this._stateChallengeClassroomRankingMap=new Map,this._stateChallengeSchoolRankingMap=new Map;const nt=k.currentStateChallenge;this.processLeaderboard(null!==(q=null===(W=B.currentLeaderboard.node.leaderboard)||void 0===W?void 0:W.nodes)&&void 0!==q?q:[],this._currentClassroomData,this._stateChallengeClassroomRankingMap),this.processLeaderboard(null!==(Q=null===(z=null===(K=B.currentLeaderboard.node.leaderboard)||void 0===K?void 0:K.nodes)||void 0===z?void 0:z.slice(0,3))&&void 0!==Q?Q:[],this._currentClassroomData,this._stateChallengeClassroomRankingMap),this.processLeaderboard(null!==(Z=null===(X=nt.node.nearRankings)||void 0===X?void 0:X.nodes)&&void 0!==Z?Z:[],this._currentSchoolData,this._stateChallengeSchoolRankingMap),this.processLeaderboard(null!==(et=null===(tt=null===(J=nt.node.topRankings)||void 0===J?void 0:J.nodes)||void 0===tt?void 0:tt.slice(0,3))&&void 0!==et?et:[],this._currentSchoolData,this._stateChallengeSchoolRankingMap)}cacheNationalCupData(k,B,U){var F,G,j,H,V;const W=U.currentLeaderboard;$.Aq$.isDefined(W)&&$.Aq$.isDefined(k.currentFinalsSchoolEntry)?(this._lastUpdated=new Date(k.lastUpdated),this._endDate=new Date(k.endDate),this._qualificationStatus={},this._currentClassroomData=null===(G=null===(F=W.node)||void 0===F?void 0:F.currentClassroom)||void 0===G?void 0:G.node,this._currentSchoolData=k.currentFinalsSchoolEntry,this._previousChallengeResults=Y.H.findPreviousChallengeResults(B,this._viewableCompetitionPhase,new Date(Date.now()),k.currentFinalsSchoolEntry,this._endDate),this._totalPhaseCorrectAnswers=k.currentFinalsSchoolEntry.correctAnswers,$.Aq$.isDefined(this._currentClassroomData)?(this._stateChallengeClassroomRankingMap=new Map,this._stateChallengeSchoolRankingMap=new Map,this.processLeaderboard(null!==(H=null===(j=U.currentLeaderboard.node.leaderboard)||void 0===j?void 0:j.nodes)&&void 0!==H?H:[],this._currentClassroomData,this._stateChallengeClassroomRankingMap),this.processLeaderboard(null!==(V=k.leaderboard)&&void 0!==V?V:[],this._currentSchoolData,this._stateChallengeSchoolRankingMap),this.isInNationalCupRewardCollectionPeriod()&&!this.nationalCupResultsValidated&&(this._currentSchoolData.rank=void 0,this.processLeaderboard([],this._currentSchoolData,this._stateChallengeSchoolRankingMap),this._previousChallengeResults.rank=void 0)):$.VyI.log("StateChallengesDataProvider: cacheNationalCupData: Missing current classroom data",$.$bb.Warning)):$.VyI.log("StateChallengesDataProvider: cacheNationalCupData: Missing classroom or finals school entry",$.$bb.Warning)}getGoalsParametersData(){if(this._isInitialized&&(this._currentSchoolData||this._currentClassroomData))return{questionsAnswered:this._currentSchoolData.correctAnswers,competition:this._viewableCompetitionPhase};$.VyI.log("StateChallengesDataProvider: getGoalsParametersData: Data not initialized",$.$bb.Warning)}getGoalsParametersDataForPreviousChallenge(){if(!this._isInitialized||!this._previousChallengeResults)return void $.VyI.log("StateChallengesDataProvider: getGoalsParametersDataForPreviousChallenge: Data not initialized",$.$bb.Warning);return{questionsAnswered:this._previousChallengeResults.correctAnswers,competition:Y.H.getPreviousChallengeCompetition(this.viewableCompetitionPhase,new Date(Date.now()),this._finalsPhaseEndDate)}}setAnimationPlayed(){this._hasAnimationPlayed=!0}checkAndCacheDownTimeState(){return(0,j.sH)(this,void 0,void 0,(function*(){var k;if($.Aq$.isDefined(this._prodigyCupConfigData))return;const B=K.q.instance.prodigy.gameContainer.get("a96-1470"),U=yield B.getProdigyCupConfigData();this._prodigyCupConfigData=U,(null==U?void 0:U.isInDowntimeEvent)?this._isCurrentlyInDownTime=!0:null===(k=null==U?void 0:U.useClientSideDowntimeCalculations)||void 0===k||k?this._isCurrentlyInDownTime=Y.H.isInDowntime(this._viewableCompetitionPhase,new Date(Date.now()),this._finalsPhaseEndDate,null==U?void 0:U.rolloverHourUTC):this._isCurrentlyInDownTime=!1}))}isInNationalCupRewardCollectionPeriod(){return this._activeCompetitionPhase===q.a.None&&this._viewableCompetitionPhase===q.a.NationalCup}isInStateChallengesRewardCollectionPeriod(){return(this._activeCompetitionPhase===q.a.None||this._activeCompetitionPhase===q.a.SparkCup)&&this._viewableCompetitionPhase===q.a.StateChallenge}isInActiveCompetition(){return this._activeCompetitionPhase===q.a.StateChallenge||this._activeCompetitionPhase===q.a.NationalCup}getCurrentChallengeSuffixForSegmentEvents(){return this.getCompetitionPhaseSuffixForSegmentEvents(this.activeCompetitionPhase)}getPreviousChallengeSuffixForSegmentEvents(){const k=Y.H.getPreviousChallengeCompetition(this.viewableCompetitionPhase,new Date(Date.now()),this._finalsPhaseEndDate);return this.getCompetitionPhaseSuffixForSegmentEvents(k)}getCompetitionPhaseSuffixForSegmentEvents(k){return Q.jp[k]}};Z=F=(0,j.Cg)([(0,H.injectable)()],Z)},77510:(k,B,U)=>{"use strict";U.d(B,{z:()=>Q});var F=U(8674),G=U(62459),j=U(79687),$=U(89067),H=U(13956),V=U(40579),W=U(76277),q=U(35120);const K=(0,U(77601).gb)({key:"state-challenges",activateAssociatedExperiments:1,default:{enabled:!1}});var z=U(4766),Y=U(2980);let Q=class{constructor(){this.onPauseButtonClicked=new G.HN0,this._isMenuPaused=!1}get isMenuPaused(){return this._isMenuPaused}hasActiveChallengeOrRewards(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=q.q.instance.prodigy.gameContainer.get("0f9-dd7b");if(yield k.initialize(),k.isInActiveCompetition())return!0;if(k.isInRewardsGrantingPeriod){const B=k.getGoalsParametersDataForPreviousChallenge();if(!B)return!1;return q.q.instance.prodigy.gameContainer.get("43a-6f08").checkHasUnclaimedPreviousRewards(B)}return!1}))}isFeatureAvailable(){return(0,F.sH)(this,void 0,void 0,(function*(){return(0,W.G)(K).enabled&&q.q.instance.prodigy.gameContainer.get("0f9-dd7b").hasValidClassroom()}))}setupHudButton(){return(0,F.sH)(this,void 0,void 0,(function*(){if(yield this._stateChallengesDataProvider.checkAndCacheDownTimeState(),this._stateChallengesDataProvider.isCurrentlyInDownTime)return;let k=z.H.getMsUntilEndOfCurrentChallenge(this._stateChallengesDataProvider.activeCompetitionPhase,new Date(Date.now()),this._stateChallengesDataProvider.endDate);k>0&&(k+=86399999),this._hudService.updateCachedLabelData($.ts.StateChallenges,{labelValue:k});const B=yield this._stateChallengesDataProvider.getCurrentSchoolRanking();this._stateChallengesDataProvider.isInActiveCompetition()&&G.Aq$.isDefined(B)&&B<30&&this._hudService.updateSecondaryLabel($.ts.StateChallenges,B)}))}toggleMenuPause(){this._isMenuPaused=!this._isMenuPaused,this.onPauseButtonClicked.dispatch(this._isMenuPaused)}};(0,F.Cg)([(0,j.inject)("0f9-dd7b"),(0,F.Sn)("design:type",Y.v)],Q.prototype,"_stateChallengesDataProvider",void 0),(0,F.Cg)([(0,H.b)("cc9-a3f0"),(0,F.Sn)("design:type",V.W)],Q.prototype,"_hudService",void 0),Q=(0,F.Cg)([(0,j.injectable)()],Q)},88912:(k,B,U)=>{"use strict";U.d(B,{U4:()=>F,jp:()=>$});var F,G,j=U(8820);!function(k){k[k.Bronze=100]="Bronze",k[k.Silver=1e4]="Silver",k[k.Gold=1e5]="Gold",k[k.Diamond=5e5]="Diamond"}(F||(F={})),function(k){k.NationalCup="-nc",k.None=""}(G||(G={}));const $={[j.a.NationalCup]:G.NationalCup,[j.a.StateChallenge]:G.None,[j.a.SparkCup]:G.None,[j.a.None]:G.None}},54140:(k,B,U)=>{"use strict";U.d(B,{X:()=>Y});var F=U(62459),G=U(88818),j=U(24522),$=U(8820),H=U(35120),V=U(38920),W=U(44094),q=U(88912),K=U(59114),z=U(37623);class Y{static getStateChallengeRacersInjectionData(k,B,U,G,j){const $=j.getStateChallengesLeaderboard(k),H=$.myEntry.rank,V=k=>$.competitorEntries.get(H+k),W=F.Aq$.isDefined(H)?V(1):void 0,q=!F.Aq$.isDefined(W)||3===H,z=1===H,Q=q?V(-2):W,X=V(z?2:-1);let Z=K.yT.defaultRacerOffsets;$.competitorEntries.size>0&&F.Aq$.isDefined(H)&&(q?Z=K.yT.heroLastRacerOffsets:z&&(Z=K.yT.heroFirstRacerOffsets));return[{petId:G[0],node:Q,index:0,xOffset:Z[0]},{petId:U,node:$.myEntry,index:1,xOffset:Z[1]},{petId:G[1],node:X,index:2,xOffset:Z[2]}].map((({petId:k,node:U,index:F,xOffset:G})=>Y.createFootracePetInjectionDataFromLeaderboardNode(k,B,U,F,G))).filter(F.Aq$.isDefined)}static createFootracePetInjectionDataFromLeaderboardNode(k,B,U,j,$){var V;if(!U)return void F.VyI.log("StateChallengesMenu: createFootracePetInjectionDataFromLeaderboardNode: node is undefined",F.$bb.Warning);let q=G.Q2.Walk;const Y=H.q.instance.prodigy.gameContainer.get("a94-4ba3");return Y&&(q=Y.isMenuPaused?G.Q2.Idle:G.Q2.Walk),{STATE_CHALLENGES_FOOTRACE_PET_ID:k,STATE_CHALLENGES_FOOTRACE_PET_POSITION:[$,K.yT.yOffsets[j]],STATE_CHALLENGES_FOOTRACE_PETS_INITIAL_ANIMATION:q,STATE_CHALLENGES_RACER_NAME:W.$.truncate(null!==(V=U.displayName)&&void 0!==V?V:"",25,!0),STATE_CHALLENGES_RACER_RANK:U.rank?W.$.addOrdinalSuffix(U.rank):z.O.NATIONAL_CUP_RESULTS_PENDING,STATE_CHALLENGES_RACER_ANSWERS:U.correctAnswers,STATE_CHALLENGES_SCHOOL_VIEW_ACTIVE:!1,STATE_CHALLENGES_CLASS_VIEW_ACTIVE:!1,STATE_CHALLENGES_ANSWERS_VISIBLE:1!==j,STATE_CHALLENGES_SELF_BUBBLE_VISIBLE:1===j,STATE_CHALLENGES_SELF_IDENTIFIER_TEXT:B}}static getMilestoneBackingFrame(k){return k>=q.U4.Diamond?K.yT.postChallengeMilestoneAssetMap[q.U4.Diamond]:k>=q.U4.Gold?K.yT.postChallengeMilestoneAssetMap[q.U4.Gold]:k>=q.U4.Silver?K.yT.postChallengeMilestoneAssetMap[q.U4.Silver]:(q.U4.Bronze,K.yT.postChallengeMilestoneAssetMap[q.U4.Bronze])}static getQuestionsAnsweredFromTaskInThousandFormat(k){return(0,V.Hk)(Y.getQuestionsAnsweredFromTask(k),void 0,",")}static getQuestionsAnsweredFromTask(k){var B;const U=null==k?void 0:k.preconditions;if(U)for(const G of U){const k=null===(B=G.data)||void 0===B?void 0:B.questionsAnswered;if(G.type===j.n.HAS_MET_STATE_CHALLENGE_GOAL&&F.Aq$.isDefined(k))return k}return 0}static getCurrentChallengeDisplayName(k){const B=H.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService);if(k===$.a.NationalCup)return B.getText(z.O.NATIONAL_CUP_TITLE);const U=`MONTH_NAME_${(new Date).getUTCMonth()+1}`;return B.getText(z.O.STATE_CHALLENGES_CURRENT_TITLE,B.getText(U))}}},21953:(k,B,U)=>{"use strict";var F,G;U.d(B,{V:()=>F,Z:()=>G}),function(k){k.HasMilestoneRewardReady="HAS_MILESTONE_REWARD_READY",k.HasOutstandingPrerequisiteTasks="HAS_OUTSTANDING_PREREQUISITE_TASKS",k.IsCurrentChallengeStarted="IS_CURRENT_CHALLENGE_STARTED",k.WasPreviousChallengeStarted="WAS_PREVIOUS_CHALLENGE_STARTED",k.AllMilestonesFinished="ALL_MILESTONES_FINISHED",k.HasMilestoneInProgress="HAS_MILESTONE_IN_PROGRESS",k.CurrentMilestoneProgressValues="CURRENT_MILESTONE_PROGRESS_VALUES",k.QuestionsRemainingToNextMilestone="QUESTIONS_REMAINING_TO_NEXT_MILESTONE",k.DisplayRewardAssetIcon="DISPLAY_REWARD_ASSET_ICON",k.DisplayRewardQuantity="DISPLAY_REWARD_QUANTITY",k.CurrentMilestoneProgressData="CURRENT_MILESTONE_PROGRESS_DATA",k.NextMilestoneBackground="NEXT_MILESTONE_BACKGROUND",k.ShowSeeRewardsButton="SHOW_SEE_REWARDS_BUTTON"}(F||(F={})),function(k){k.DisplayCardRewardIndex="DISPLAY_CARD_REWARD_INDEX",k.DisplayCardRewardAssetIcon="DISPLAY_CARD_REWARD_ASSET_ICON",k.DisplayCardRewardQuantity="DISPLAY_CARD_REWARD_QUANTITY",k.DisplayCardQuestionsAnswered="DISPLAY_CARD_QUESTIONS_ANSWERED",k.DisplayCardIsCollected="DISPLAY_CARD_IS_COLLECTED",k.DisplayCardReadyToCollect="DISPLAY_CARD_READY_TO_COLLECT",k.DisplayCardIsActive="DISPLAY_CARD_IS_ACTIVE",k.DisplayCardCollectCallback="DISPLAY_CARD_COLLECT_CALLBACK",k.DisplayCardBackground="DISPLAY_CARD_BACKGROUND",k.DisplayCardIsFocused="DISPLAY_CARD_IS_FOCUSED",k.DisplayCardCollectButtonEnabledState="DISPLAY_CARD_COLLECT_BUTTON_ENABLED_STATE"}(G||(G={}))},25431:(k,B,U)=>{"use strict";U.d(B,{b:()=>Z});var F=U(8674),G=U(62459),j=U(29891),$=U(24522),H=U(35120),V=U(30405),W=U(38920),q=U(4766),K=U(24030),z=U(88912),Y=U(54140),Q=U(21953),X=U(59114);class Z{static getData(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U,F,j,V;const J=H.q.instance.prodigy.gameContainer.get("0f9-dd7b"),tt=H.q.instance.prodigy.gameContainer.get("43a-6f08");if(yield J.initialize(),!G.Aq$.isDefined(J.getGoalsParametersData()))return void G.RQr.createHandler("[StateChallengeGoalsDataProvider] StateChallengesDataProvider is not initialized");const et=null!==(B=null===(k=J.getGoalsParametersData())||void 0===k?void 0:k.questionsAnswered)&&void 0!==B?B:0,it=yield tt.getStateChallengeGoalsProgress(),st=H.q.instance.prodigy.gameContainer.get("a03-308f"),nt=new Date(st.getServerTimeMs()),at=J.viewableCompetitionPhase,rt=q.H.getPreviousChallengeCompetition(at,nt,J.endDate),ot=Z.getFilteredTasks(it,nt),ht=yield Z.fetchPreviousChallengeTasks(it);let ct,dt;for(const G of ot){const k=G.id;if(k.endsWith("_start")){ct=k;break}}for(const G of ht){const k=G.id;if(k.endsWith("_start")){dt=k;break}}const lt=null!==(U=(0,K.$)(J.viewableCompetitionPhase))&&void 0!==U?U:"",ut=null!==(F=(0,K.$)(rt))&&void 0!==F?F:"",ft=!!ct&&(yield tt.isTaskCompleted(lt,ct)),bt=!!dt&&(yield tt.isTaskCompleted(ut,dt));tt.cacheChallengeStartTaskIds(ct,dt);const pt=[],vt=[],gt=[];for(const $ of it.taskProgress){const k=$.taskProgressSchema.id;G.Aq$.isDefined(Z.getMilestoneIndexFromTaskId(k))?(pt.push($),vt.push(k)):gt.push($)}const mt=pt.length>0,yt=gt.length>0;let _t,Et=0,wt=ot.length+1,Tt={ID:"",type:"",quantity:0};if(mt){const k=pt[0];Tt=Z.getRewardAssetDataFromTaskComplete(k.taskDefinition.onComplete),_t=Y.X.getMilestoneBackingFrame(Y.X.getQuestionsAnsweredFromTask(k.taskDefinition))}for(const G of ot){const k=Z.getMilestoneIndexFromTaskId(G.id);if(void 0!==k){const B=null===(j=G.preconditions)||void 0===j?void 0:j.find((k=>k.type===$.n.HAS_MET_STATE_CHALLENGE_GOAL));if(B){const U=B.data.questionsAnswered;if(U>et){Et=U,wt=k,!mt&&G.onComplete&&(_t=Y.X.getMilestoneBackingFrame(Et),Tt=Z.getRewardAssetDataFromTaskComplete(G.onComplete));break}}}}const St=0===pt.length&&0===Et,At=St&&!mt;if(At&&ot.length>0){const k=ot[ot.length-1],B=null===(V=k.preconditions)||void 0===V?void 0:V.find((k=>k.type===$.n.HAS_MET_STATE_CHALLENGE_GOAL));if(B){Et=B.data.questionsAnswered,_t=Y.X.getMilestoneBackingFrame(Et),Tt=Z.getRewardAssetDataFromTaskComplete(k.onComplete)}}const Ct={};for(const G of ot){const k=G.id,B=Z.getMilestoneIndexFromTaskId(k);void 0!==B&&(Ct[String(B)]={task:G,index:B,isCollectible:vt.includes(k),isComplete:B1?`+${Tt.quantity}`:"",[Q.V.CurrentMilestoneProgressData]:Ct,[Q.V.NextMilestoneBackground]:_t||X.yT.postChallengeMilestoneAssetMap[z.U4.Diamond],[Q.V.ShowSeeRewardsButton]:Ot||At}}))}static getPreviousChallengeMilestoneRewards(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield Z.fetchPreviousChallengeTasks(),B=[];for(const U of k){const k=Z.getMilestoneIndexFromTaskId(U.id);void 0!==k&&B.push(...Z.getRewardsFromTaskComplete(k,U.onComplete))}return B}))}static getRewardsFromTaskComplete(k,B=[]){var U,F;const G=[];for(const $ of B)if($.type===j.s.GOT_PET||$.type===j.s.GOT_ITEM)for(const B of null!==(F=null===(U=$.data)||void 0===U?void 0:U.itemDrops)&&void 0!==F?F:[])(null==B?void 0:B.ID)&&G.push({type:B.type,id:Number(B.ID),milestoneIndex:k});return G}static fetchPreviousChallengeTasks(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;const F=H.q.instance.prodigy.gameContainer.get("0f9-dd7b"),G=H.q.instance.prodigy.gameContainer.get("43a-6f08"),j=H.q.instance.prodigy.gameContainer.get("a96-1470"),$=H.q.instance.prodigy.gameContainer.get("a03-308f");yield F.initialize();const V=new Date($.getServerTimeMs()),W=q.H.getRepresentativeDateForPreviousChallenge(F.viewableCompetitionPhase,V,F.finalsPhaseStartDate,F.endDate),K=F.viewableCompetitionPhase,z=q.H.getPreviousChallengeCompetition(K,V,F.endDate),Y=z===K?null!=k?k:yield G.getStateChallengeGoalsProgress():yield j.getStateChallengeGoalsData({questionsAnswered:null!==(U=null===(B=F.getSchoolEntryForPreviousChallenge())||void 0===B?void 0:B.correctAnswers)&&void 0!==U?U:0,competition:z});return Y?Z.getFilteredTasks(Y,W):[]}))}static getMilestoneIndexFromTaskId(k){const B=k.split("_"),U=B[B.length-1];return V.o.isNumber(U)?Number(U):void 0}static getRewardAssetDataFromTaskComplete(k=[]){var B,U;for(const F of k)if(F.type===j.s.GOT_ITEM||F.type===j.s.GOT_PET){const k=null===(B=F.data.itemDrops)||void 0===B?void 0:B[0];if(null==k?void 0:k.ID)return{ID:k.ID.toString(),type:k.type,quantity:null!==(U=k.N)&&void 0!==U?U:1}}return{ID:"",type:"",quantity:0}}static getFilteredTasks(k,B){return k.questDefinition.tasks.filter((k=>{if(!k.preconditions||!Array.isArray(k.preconditions))return!1;const U=k.preconditions.find((k=>k.type===$.n.DATE_AFTER)),F=k.preconditions.find((k=>k.type===$.n.DATE_BEFORE)),G=U?new Date(U.data.date):void 0,j=F?new Date(F.data.date):void 0;return!(!G||!j)&&(B>=G&&B<=j)}))}}},59114:(k,B,U)=>{"use strict";U.d(B,{E2:()=>F,Tz:()=>G,yT:()=>H});var F,G,j,$=U(88912);class H{}H.classViewHeroPetId=136,H.classViewPetIds=[145,139,148,142,216,48,59,20,264],H.schoolViewHeroPetId=138,H.schoolViewPetIds=[147,141,150,144,280,49,60,22,266],H.yOffsets=[-330,-230,-100],H.defaultRacerOffsets=[718,885,1025],H.heroFirstRacerOffsets=[885,1025,718],H.heroLastRacerOffsets=[1025,718,885],H.introAnimationStartPositions=[{x:-400,y:-330},{x:-650,y:-330},{x:-900,y:-330},{x:-550,y:-230},{x:-800,y:-230},{x:-1050,y:-230},{x:-400,y:-100},{x:-650,y:-100},{x:-900,y:-100}],H.introAnimationHeroPosition={x:-100,y:-230},H.bannerTrophyAssets=["state-challenges-trophy-gold-small","state-challenges-trophy-silver-small","state-challenges-trophy-bronze-small"],H.postChallengeTrophyAssets=["state-challenges-trophy-gold","state-challenges-trophy-silver","state-challenges-trophy-bronze"],H.postChallengeMilestoneAssetMap={[$.U4.Bronze]:"state-challenges-milestone-bronze",[$.U4.Silver]:"state-challenges-milestone-silver",[$.U4.Gold]:"state-challenges-milestone-gold",[$.U4.Diamond]:"state-challenges-milestone-diamond"},function(k){k.STATE_CHALLENGES_SHOW_HEADER="STATE_CHALLENGES_SHOW_HEADER",k.STATE_CHALLENGES_DOWNTIME_TITLE_OVERRIDE="STATE_CHALLENGES_DOWNTIME_TITLE_OVERRIDE",k.STATE_CHALLENGES_DOWNTIME_SUBTITLE_OVERRIDE="STATE_CHALLENGES_DOWNTIME_SUBTITLE_OVERRIDE"}(F||(F={})),function(k){k.STATE_CHALLENGES_LR_TWEEN="STATE_CHALLENGES_LR_TWEEN",k.STATE_CHALLENGES_RL_TWEEN="STATE_CHALLENGES_RL_TWEEN",k.STATE_CHALLENGES_BG_INTRO_TWEEN="STATE_CHALLENGES_BG_INTRO_TWEEN",k.STATE_CHALLENGES_BG_IDLE_TWEEN="STATE_CHALLENGES_BG_IDLE_TWEEN"}(G||(G={})),function(k){k.STATE_CHALLENGES_SCHOOL_NATIONAL_QUALIFIED="STATE_CHALLENGES_SCHOOL_NATIONAL_QUALIFIED",k.STATE_CHALLENGES_SCHOOL_WON_CHALLENGE="STATE_CHALLENGES_SCHOOL_WON_CHALLENGE"}(j||(j={}))},74712:(k,B,U)=>{"use strict";U.d(B,{j:()=>K});var F,G=U(8674),j=U(62459),$=U(95891),H=U(68910),V=U(99625),W=U(5822),q=U(47287);let K=F=class extends j.uAl{constructor(){super(...arguments),this._gameDiscoveryEvents=[]}configure(k,B,U,G,W){var q;let K;this._backgroundImage.image.texture.baseTexture.scaleMode=H.SCALE_MODES.LINEAR,K=k?B?[B,...$.chain(F.AD_PREFABS).without(B).shuffle().value(),V.l.StaticAd_SoMuchMore]:[...$.shuffle(F.AD_PREFABS),V.l.StaticAd_SoMuchMore]:[B];for(const F of K){const U=new j._mx,G=k?this._carousel.GameObject.transform:this._content.transform,$=U.addComponent(j.XVE);$.setAnchorMin(0,0),$.setAnchorMax(0,0),$.setPivot(0,0),$.setSizeDelta(G.fullWidth,G.fullHeight),this._prefabLoader.loadWithDependenciesFromGUID(F,U).catch(j.RQr.createHandler(`Failed to load prefab ${B}`)),null===(q=this._carousel)||void 0===q||q.addObject(U),this._content.addChild(U)}for(const F of this._gameDiscoveryEvents)F.value=null!=U?U:"MemberButton"}};K.AD_PREFABS=[V.l.StaticAd_LevelUpFaster,V.l.StaticAd_MemberBoxes,V.l.StaticAd_MemberChests],(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],K.prototype,"_backgroundImage",void 0),(0,G.Cg)([(0,j.MnK)(q.g),(0,G.Sn)("design:type",q.g)],K.prototype,"_carousel",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],K.prototype,"_content",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(W.u),(0,G.Sn)("design:type",Array)],K.prototype,"_gameDiscoveryEvents",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],K.prototype,"_prefabLoader",void 0),K=F=(0,G.Cg)([(0,j.EVk)("StaticAdConfig")],K)},34454:(k,B,U)=>{"use strict";U.d(B,{w:()=>K});var F,G=U(8674),j=U(62459),$=U(99625),H=U(35120),V=U(28152),W=U(43531),q=U(18206);let K=F=class extends j.uAl{constructor(){super(...arguments),this.onReady=new j.HN0}static startTaskCompleteDialogue(k,B,U){W.rD.runDialogueSequence([F.DIALOGUE_COMPLETED_TASK],(()=>{H.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID($.l.UltimatesWanderingNPCBeginTrackingPopup).then((k=>{k.findComponent(F).init(B,U)})).catch(j.RQr.createHandler("[startTaskCompleteDialogue] Error when loading Ultimates Wandering NPC Begin Tracking Popup"))})).setParent(j.wa5.getActiveScene().getLayer(k.layer))}init(k,B){this._petID=k,this._segmentOpenPropertiesComponent.originID=B,this.onReady.dispatch()}openPetQuestProgress(){H.q.instance.prodigy.open.pets()}destroy(){this.onReady.dispose(),super.destroy()}};K.DIALOGUE_COMPLETED_TASK=1271,(0,G.Cg)([(0,j.MnK)(q.y),(0,G.Sn)("design:type",q.y)],K.prototype,"_segmentOpenPropertiesComponent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],K.prototype,"onReady",void 0),K=F=(0,G.Cg)([(0,j.EVk)("TaskCompleteDialogue",V.Y.ultimates)],K)},37155:(k,B,U)=>{"use strict";U.d(B,{i:()=>K});var F,G=U(8674),j=U(62459),$=U(56942),H=U(35120),V=U(77938),W=U(28152),q=U(29834);let K=F=class extends j.uAl{get petSpine(){return this._petSpine}init(k){var B,U;const F=V.t.getItem("pet",k),G=null===(U=null===(B=null==F?void 0:F.metadata)||void 0===B?void 0:B.assets)||void 0===U?void 0:U.default;if(null==G?void 0:G.assetKey){const k=$.Q[G.assetKey];H.q.instance.prodigy.load.assets([k],this.setAnimation.bind(this,k))}else j.VyI.log(`Pet ${k} doesn't have a default value or an assetKey configured to it`,j.$bb.Error)}setAnimation(k){this._petSpine.setAsset(k,(()=>{this._petSpineAnimator.playAnimation(F.DEFAULT_ANIMATION,!0)}))}};K.DEFAULT_ANIMATION="idle",(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],K.prototype,"_petSpine",void 0),(0,G.Cg)([(0,j.MnK)(q.j),(0,G.Sn)("design:type",q.j)],K.prototype,"_petSpineAnimator",void 0),K=F=(0,G.Cg)([(0,j.EVk)("UltimatePet",W.Y.ultimates)],K)},52322:(k,B,U)=>{"use strict";U.d(B,{v:()=>V});var F=U(8674),G=U(62459),j=U(24521),$=U(23029),H=U(28152);let V=class extends G.uAl{static changeNextLocation(){this._changeLocation=!0}static getUltimatesPetLocation(k){if(this._changeLocation||!this._previousLocation[k]||""===this._previousLocation[k]){this._changeLocation=!1;const B=$.R.loadData(j.r.UltimatesPetLocationConfig_json).ultimatesData.find((B=>B.id===k));if(!B)return G.VyI.log(`Provided petID does not exist within generic config: ${k}`,G.$bb.Error),"";this._previousLocation[k]=G.lv2.getRandomItem(B.locationIDs.filter((B=>B!==this._previousLocation[k])))}return this._previousLocation[k]}};V._previousLocation={0:""},V._changeLocation=!1,V=(0,F.Cg)([(0,G.EVk)("UltimatesLocation",H.Y.ultimates)],V)},87742:(k,B,U)=>{"use strict";var F;U.d(B,{e:()=>F}),function(k){k[k.Start=0]="Start",k[k.QuestAccepted=1]="QuestAccepted",k[k.Found=2]="Found",k[k.QuestCompleted=3]="QuestCompleted"}(F||(F={}))},9421:(k,B,U)=>{"use strict";var F;U.d(B,{b:()=>F}),function(k){k[k.TrackLocked=0]="TrackLocked",k[k.TrackUnlocked=1]="TrackUnlocked",k[k.TrackInProgress=2]="TrackInProgress",k[k.Finished=3]="Finished"}(F||(F={}))},33359:(k,B,U)=>{"use strict";U.d(B,{P:()=>V});var F=U(8674),G=U(62459),j=U(10592),$=U(28152),H=U(67818);let V=class extends G.uAl{constructor(){super(...arguments),this.selfDestroy=!1}create(){super.create(),this.setInterface(),this._loggedInPlayer.player.onSessionStatusChange.addOnce(this.checkSelfDestroy,this)}checkSelfDestroy(k,B){this.gameObject&&!this.selfDestroy&&(this.noLongerTaming(k)||this.noLongerTracking(k))&&this.gameObject.destroy()}noLongerTaming(k){return this._tamingUI.active&&k!==j.n.TamingUltimate}noLongerTracking(k){return this._npcQuestUI.active&&k!==j.n.TrackingNPC}setInterface(){switch(this._loggedInPlayer.player.ultimateSessionStatus){case j.n.CollectingItems:this._collectingItemsUI.active=!0,this._npcQuestUI.active=!1,this._tamingUI.active=!1;break;case j.n.TrackingNPC:this._collectingItemsUI.active=!1,this._npcQuestUI.active=!0,this._tamingUI.active=!1;break;case j.n.TamingUltimate:this._collectingItemsUI.active=!1,this._npcQuestUI.active=!1,this._tamingUI.active=!0;break;default:this._collectingItemsUI.active=!1,this._npcQuestUI.active=!1,this._tamingUI.active=!1}}setupTamingUI(k,B=!1){this._petIcon.setItemID(k)}cancelTracking(){this.selfDestroy=!0,this._loggedInPlayer.player.setUltimateSessionStatus(j.n.None,"",0)}destroy(){this._loggedInPlayer.player.onSessionStatusChange.remove(this.checkSelfDestroy,this),super.destroy()}};(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",Object)],V.prototype,"_loggedInPlayer",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],V.prototype,"_collectingItemsUI",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],V.prototype,"_npcQuestUI",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],V.prototype,"_tamingUI",void 0),(0,F.Cg)([(0,G.MnK)(H.i),(0,F.Sn)("design:type",H.i)],V.prototype,"_petIcon",void 0),V=(0,F.Cg)([(0,G.EVk)("UltimatesTaskViewer",$.Y.ultimatesUi)],V)},2775:(k,B,U)=>{"use strict";U.d(B,{m:()=>Y});var F=U(8674),G=U(62459),j=U(79687),$=U(58776),H=U(62886),V=U(35120),W=U(77938),q=U(40392),K=U(435);const z="ultimates";let Y=class{getCurrentQuestData(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("e50-b09b"),B=yield k.getAllActiveQuestIDs([z]),U=yield k.getAllInactiveQuestIDs([z]),F=[];for(const $ of B.concat(U))try{const U=yield k.getQuestMetaData($),G=yield k.getQuestTasks($),j=this.processServerQuest($,U,G,B.includes($));F.push(j)}catch(j){G.RQr.logError(j,`Failed to setup and process quest data for ${$}. Skipping.`)}return F}))}processServerQuest(k,B,U,F){const G={petID:B.petID,questID:k,seen:this.isEpicSeen(U),startButtonID:this.getButtonID(U),status:{active:F,completed:U.every((k=>k.taskProgress.status===$.t.COMPLETE)),taskID:0},deadline:new Date(B.endDate),tracks:this.generateTaskTracks(U)};return new K.p(G)}getButtonID(k){return k.find((k=>k.type===H.T.BUTTON_CLICK)).taskDefinition.completionRequirements.data.id}isEpicSeen(k){return k.filter((k=>k.type===H.T.WIN_BATTLE)).some((k=>k.taskProgress.status===$.t.COMPLETE||k.taskProgress.data.progress>0))}generateTaskTracks(k){const B=[];return k.filter((k=>k.type===H.T.WIN_BATTLE)).forEach((U=>{var F,G;const j=U.taskDefinition.prerequisites[0],H=k.find((k=>k.taskID===j)),V=H.taskDefinition.prerequisites[0],K=k.find((k=>k.taskID===V)),z=K.taskDefinition.completionRequirements.data.type,Y=K.taskDefinition.completionRequirements.data.id,Q=K.taskDefinition.completionRequirements.data.target,X=W.t.getItem(z,Y);B.push({collectionTask:{active:this.isTaskActive(k,K),completed:K.taskProgress.status===$.t.COMPLETE,taskID:V,itemType:z,itemID:Y,targetZone:q.i.getZoneData(X.data.targetZone),verb:"Collect",subject:X.data.name,targetAmount:Q,currentAmount:null!==(G=null===(F=K.taskProgress.data)||void 0===F?void 0:F.progress)&&void 0!==G?G:Q},tradeTask:{active:this.isTaskActive(k,H),completed:H.taskProgress.status===$.t.COMPLETE,taskID:j},tameTask:{active:this.isTaskActive(k,U),completed:U.taskProgress.status===$.t.COMPLETE,taskID:U.taskID}})})),B}isTaskActive(k,B){return B.taskDefinition.prerequisites.every((B=>k.find((k=>k.taskID===B)).taskProgress.status===$.t.COMPLETE))}};Y=(0,F.Cg)([(0,j.injectable)()],Y)},435:(k,B,U)=>{"use strict";U.d(B,{p:()=>W});var F=U(35120),G=U(10592),j=U(40392),$=U(87742),H=U(9421),V=U(52322);class W{constructor(k){this._data=k}getProgressData(){let k=$.e.QuestCompleted;this._data.status.completed||(k=this._data.seen?$.e.Found:this._data.tracks.some((k=>k.collectionTask.active))?$.e.QuestAccepted:$.e.Start);const B=this._data.tracks.some((k=>k.tradeTask.completed));return{questState:k,petId:this._data.petID,totalCollectionTasks:this.getTotalTaskTracks(),accomplishedCollectionTasks:this.getAccomplishedCollectionTasks(),tamingLevel:this.getTamingLevel(),deadline:this._data.deadline,questId:this._data.questID,nameUnlocked:B}}getTamingTaskCardData(){return this._data.tracks.map((k=>{var B,U,$;let W=H.b.Finished;const q=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.tradeTask.completed||(W=k.tradeTask.active&&q.ultimateSessionStatus===G.n.TrackingNPC&&q.ultimateQuestId===this.questID&&q.ultimateTaskId===k.tradeTask.taskID?H.b.TrackInProgress:k.tradeTask.active?H.b.TrackUnlocked:H.b.TrackLocked);let K=H.b.Finished;k.tameTask.completed||(K=k.tameTask.active&&q.ultimateSessionStatus===G.n.TamingUltimate&&q.ultimateQuestId===this.questID&&q.ultimateTaskId===k.tameTask.taskID?H.b.TrackInProgress:k.tameTask.active?H.b.TrackUnlocked:H.b.TrackLocked);const z=V.v.getUltimatesPetLocation(this._data.petID);return{collectingZone:null===(B=k.collectionTask.targetZone)||void 0===B?void 0:B.getName(),collectingZoneID:null===(U=k.collectionTask.targetZone)||void 0===U?void 0:U.zone,tamingZone:null===($=j.i.getZoneData(z.split("-")[0]))||void 0===$?void 0:$.getName(),iconItemType:k.collectionTask.itemType,iconItemID:k.collectionTask.itemID,descriptionVerb:k.collectionTask.verb,descriptionSubject:k.collectionTask.subject,targetAmount:k.collectionTask.targetAmount,currentAmount:k.collectionTask.currentAmount,npcStatus:W,epicStatus:K,trackingTaskId:k.tradeTask.taskID,tamingTaskId:k.tameTask.taskID,collectingTaskId:k.collectionTask.taskID}}))}getTotalTaskTracks(){return this._data.tracks.length}getTotalTasks(){return this._data.tracks.map((k=>Object.keys(k).length)).reduce(((k,B)=>k+B),0)}getCompletedTasks(){return this._data.tracks.map((k=>Object.keys(k).map((B=>k[B].completed?1:0)).reduce(((k,B)=>k+B),0))).reduce(((k,B)=>k+B),0)}getAccomplishedCollectionTasks(){return this._data.tracks.filter((k=>k.collectionTask.completed)).length}getTamingLevel(){return this._data.tracks.reduce(((k,B)=>k+(B.tameTask.completed?1:0)),0)}isTamed(){return this._data.status.completed}getTamedData(){return F.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPetByID(this._data.petID)}getUntamedCardData(){return{id:this._data.petID,accomplishedTasks:this.getCompletedTasks(),totalTasks:this.getTotalTasks()}}isActive(){return this._data.status.active}getCollectionTask(k){return this._data.tracks[k].collectionTask}setTradeQuestActiveState(k,B){this._data.tracks[k].tradeTask.active=B}setEpicQuestActiveState(k,B){this._data.tracks[k].tameTask.active=B}activateCollectionTasks(){this._data.tracks.forEach((k=>{k.collectionTask.active=!0}))}getQuestItem(k){this._data.tracks[k].collectionTask.currentAmount+=1,this._data.tracks[k].collectionTask.currentAmount>=this._data.tracks[k].collectionTask.targetAmount&&(this._data.tracks[k].collectionTask.completed=!0)}collectionQuestsStarted(){return this._data.tracks.some((k=>k.collectionTask.active))}completeTradeQuest(k){this._data.tracks[k].tradeTask.completed=!0}completeTamingQuest(k){this._data.tracks[k].tameTask.completed=!0,this._data.tracks.every((k=>k.tameTask.completed))&&(this._data.status.completed=!0)}setSeenState(k){this._data.seen=k}get buttonID(){return this._data.startButtonID}get questID(){return this._data.questID}getTradeTaskID(k){return this._data.tracks[k].tradeTask.taskID}getTamingTaskID(k){return this._data.tracks[k].tameTask.taskID}get petID(){return this._data.petID}}},19506:(k,B,U)=>{"use strict";U.d(B,{J:()=>W});var F=U(62459),G=U(90633),j=U(35120),$=U(56625),H=U(22023),V=U(73678);class W{static runUniquePetsIntroSequence(k){j.q.instance.prodigy.gameContainer.get("12f-4e29").completeBreadcrumb(G.B.FEATURE_UNIQUE_PETS,G.B.BREADCRUMB_UNIQUE_PETS_INTRO_SEQUENCE),this.updatePlayerKennel();const B=j.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService),U=j.q.instance.prodigy.gameContainer.get("b5b-6fa4"),$=[1754,1755,1756,1757],H=$.map(((F,G)=>{let H={dialogueData:U.dataProvider.get(F),blockInput:!0};return G===$.length-1&&(H=Object.assign(Object.assign({},H),{yesButtonText:B.getText("PET_BOOK_TEXT"),noButtonText:B.getText("NOT_NOW"),yes:()=>{j.q.instance.prodigy.open.pets(k)},no:k})),H}));U.addEvents(H),U.start(!0)}static canShowUniquePetsIntro(){if(!H.P8.showUniquePetsFeature())return!1;const k=j.q.instance.prodigy.gameContainer.get("12f-4e29");if(k.isBreadcrumbComplete(G.B.FEATURE_UNIQUE_PETS,G.B.BREADCRUMB_UNIQUE_PETS_INTRO_SEQUENCE))return!1;const B=j.q.instance.prodigy.world.getCurrentZone(),U=![V.A_.DARKTOWER,V.A_.TOWERTOWN].includes(B),F=k.isBreadcrumbComplete(G.B.FEATURE_PET_MERGE,G.B.BREADCRUMB_PET_MERGE_FTUE_STARTED),W=k.isBreadcrumbComplete(G.B.FEATURE_PET_MERGE,G.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED);return U&&!(F&&!W)&&$.s.canShowFtue()}static updatePlayerKennel(){var k,B;const U=j.q.instance.prodigy.gameContainer.get("306-5359").kennel,F=U.getPrimaryPets();for(const j of U.data)F.find((k=>k.uniqueID===j.uniqueID))||((null===(k=j.gear)||void 0===k?void 0:k.petHat)&&U.unequipGearForPet(j.uniqueID,"petHat"),(null===(B=j.gear)||void 0===B?void 0:B.petRelic)&&U.unequipGearForPet(j.uniqueID,"petRelic"));const G=U.getPetTeam(!1).map((k=>k.data));if(G.some((k=>!F.find((B=>B.uniqueID===k.uniqueID)))))for(const j of G)U.removeAtTeamPosition(j.team)}}},94995:(k,B,U)=>{"use strict";U.d(B,{V:()=>$});var F=U(8674),G=U(67238),j=U(48417);class $ extends G.D{getUtsConfig(){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.call(j.D.UniversalTeamSelect.GetUtsConfig,{},!0)).data}))}}},11288:(k,B,U)=>{"use strict";U.d(B,{O:()=>Q});var F=U(8674),G=U(79687),j=U(62459),$=U(28628),H=U(35120),V=U(99625),W=U(76277),q=U(46701),K=U(15821),z=U(29438),Y=U(16905);let Q=class{constructor(){this._config=void 0,this.requiredNumPets=3}setup(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!(0,W.G)(q.Q).enabled)return;const k=H.q.instance.prodigy.gameContainer.get("88d-8cb1");this._config=yield k.getUtsConfig()}))}initiateTeamSelection(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){if(!(0,W.G)(q.Q).enabled)return void G();if(this.shouldShowTeamSelectionUi(k,B)){H.q.instance.prodigy.open.prefabMenu(V.l.UniversalTeamSelectionMenu).onPrefabLoaded.addOnce((k=>{const F=k.findComponent(Y.I);try{(0,$.zJ)(U),F.setup(U.opponents.units)}catch(V){j.RQr.createHandler("UniversalTeamSelectionService: Failed to assert battle start config")(V)}F.setBackgroundImage(B.screen).catch((k=>{j.RQr.createHandler("UniversalTeamSelectionService: Failed to set background image")(k)})),F.onBattleStart.addOnce((()=>{G()}));H.q.instance.prodigy.gameContainer.get("306-5359").data.utsMenuSeenDate=Date.now()}))}else G()}))}shouldShowTeamSelectionUi(k,B){var U;const F=H.q.instance.prodigy.gameContainer.get("306-5359");if(K.A.isDefined(F.data.utsMenuSeenDate)){const k=(0,W.G)(q.Q).menuCooldownMs;if(K.A.isDefined(k)){if(Date.now()-F.data.utsMenuSeenDate0)||G.displayConditions.every((k=>(0,z.W)(k,B))))))}};Q=(0,F.Cg)([(0,G.injectable)()],Q)},29438:(k,B,U)=>{"use strict";U.d(B,{W:()=>G});var F=U(83195);function G(k,B){switch(k){case F.X.TEAM_RESTRICTED:return!0;default:return!1}}},83195:(k,B,U)=>{"use strict";var F;U.d(B,{X:()=>F}),function(k){k.TEAM_RESTRICTED="TEAM_RESTRICTED"}(F||(F={}))},16905:(k,B,U)=>{"use strict";U.d(B,{I:()=>dt});var F,G=U(8674),j=U(87490),$=U(62459),H=U(95891),V=U(88022),W=U(28628),q=U(15821),K=U(35120),z=U(77938),Y=U(37465),Q=U(129),X=U(28152),Z=U(46784),J=U(65050),tt=U(41674),et=U(67665),it=U(53661),st=U(8763),nt=U(22023),at=U(80060),rt=U(6413),ot=U(28080),ht=U(71790),ct=U(79259);!function(k){k.PlayerName="PLAYER_NAME",k.StarCount="STAR_COUNT",k.WizardAvatar="UTS_WIZARD_AVATAR",k.BackgroundImage="BACKGROUND_IMAGE",k.ForegroundImage="BACKGROUND_FG_IMAGE",k.SlotSelected="UTS_SLOT_SELECTED",k.PetId="UTS_PET_ID",k.PetName="UTS_PET_NAME",k.PetStarCount="UTS_PET_STAR_COUNT",k.WeaknessIcon="UTS_WEAKNESS_ICON",k.IsRarePet="UTS_IS_RARE_PET",k.ElementIcon="UTS_ELEMENT_ICON",k.IsHomeTeam="UTS_IS_HOME_TEAM"}(F||(F={}));let dt=class extends $.uAl{constructor(){super(...arguments),this._homeTeamPetSlots=[],this._teamDrawerPetSlots=[],this._additionalDrawerPetSlots=[],this._awayTeamPetSlots=[],this.onBattleStart=new $.HN0,this.onLeaveBattle=new $.HN0,this._activeTeamSelectionIndex=0,this._cachedTeamIds=[],this._cachedPetDrawerIds=[]}setup(k){const B=$.wa5.getActiveScene().container;B.bind(j.BattleConstants).to(j.BattleConstants).asSingleton(),B.bind(j.ConstantsDataProvider).to(ht.T).asSingleton(),this._player=K.q.instance.prodigy.gameContainer.get("306-5359");const U=(0,Y.u)(this._player,this._player.kennel.getPets()).filter((k=>q.A.isDefined(k))),G=rt.h.MAX_TEAM_SIZE-1;if(U.lengthB.level-k.level)).splice(0,G-U.length),B=U.map((k=>k.team));k.forEach(((k,F)=>{const G=B.includes(F)?F+1:F;k.team=G>=this._homeTeamPetSlots.length?0:G,U.push(k)}))}U.forEach(((k,B)=>{const U=k.ID;this._cachedTeamIds.push(U),this._cachedPetDrawerIds.push(U),at.d.updateInjectedValues(this._teamDrawerPetSlots[B],st.j.GetOwnedPetCardInjectionValues(k,this.onPetCardClicked.bind(this),!1,!0,!0)),this.setPetData(!0,B,k)})),this.setAwayTeam(k),this.setDrawerPets(k),at.d.updateInjectedValues(this.gameObject,{[F.PlayerName]:this._player.getName(),[F.StarCount]:this._player.getLevel()}),this.sendInterfaceOpenedEvent(this._player,k)}destroy(){this.onBattleStart.dispose(),this.onLeaveBattle.dispose(),super.destroy()}startBattle(){this._player.kennel.setTemporaryTeamPosition(this._cachedTeamIds[0],1),this._player.kennel.setTemporaryTeamPosition(this._cachedTeamIds[1],2),this.onBattleStart.dispatch()}setAwayTeam(k){Object.values(k).filter((k=>k.asset.type!==W.uj.Wizard)).forEach(((k,B)=>{this.setPetData(!1,B,k)}));const B=Object.values(k).find((k=>k.asset.type===W.uj.Wizard));B&&this.setupEnemyWizard(B).catch($.RQr.createHandler("Error setting up enemy wizard in universal team selection menu"))}setupEnemyWizard(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=this._awayTeamPetSlots[this._awayTeamPetSlots.length-1],U=new Q.a(K.q.instance.game);U.appearance.init(Object.assign(Object.assign({},k.appearance),{name:void 0})),U.equipment.init(k.equipment);const G=yield ot.D.createWizardObject(U,!1);G.setLayer(void 0,!0),at.d.updateInjectedValues(B,{[F.WizardAvatar]:G,[F.PetName]:k.appearance.name,[F.PetStarCount]:k.level,[F.IsHomeTeam]:!1,[F.IsRarePet]:!0,[F.SlotSelected]:!1}),B.active=!0}))}setPetData(k,B,U){var G,H,W,q,K;const Y=null!==(G=null==U?void 0:U.ID)&&void 0!==G?G:U.asset.id,Q=null!==(H=null==U?void 0:U.level)&&void 0!==H?H:U.level,X=k?this._homeTeamPetSlots[B]:this._awayTeamPetSlots[B];X.active=!0;const Z=z.t.getItem("pet",Y),J=nt.P8.getElementType(Z),tt=$.wa5.getActiveScene().container.get(j.BattleConstants).getElementalWeakness(J);at.d.updateInjectedValues(X,{[F.IsRarePet]:!1,[F.PetId]:Z.ID,[F.PetName]:null!==(q=null===(W=Z.data)||void 0===W?void 0:W.nickname)&&void 0!==q?q:null===(K=Z.data)||void 0===K?void 0:K.name,[F.PetStarCount]:Q,[F.ElementIcon]:[V._.Ui_battle_revamp_json,`icon-mini-element-${J}`],[F.WeaknessIcon]:[V._.Ui_battle_revamp_json,`icon-mini-element-${tt}`],[F.IsHomeTeam]:k,[F.SlotSelected]:!!k&&this._activeTeamSelectionIndex===B})}setBackgroundImage(k){return(0,G.sH)(this,void 0,void 0,(function*(){let B=k;if("string"==typeof k){const U=ct[k];B=null!=U?U:k}yield K.q.instance.prodigy.load.assetsAsPromise(B),at.d.updateInjectedValues(this.gameObject,{[F.BackgroundImage]:Array.isArray(B)?B[0]:B,[F.ForegroundImage]:Array.isArray(B)?B[1]:null})}))}setActiveTeamSelectionIndex(k){if(this._activeTeamSelectionIndex===k)return;const B=this._homeTeamPetSlots[this._activeTeamSelectionIndex];at.d.updateInjectedValues(B,{[F.SlotSelected]:!1}),this._activeTeamSelectionIndex=k;const U=this._homeTeamPetSlots[k];at.d.updateInjectedValues(U,{[F.SlotSelected]:!0})}setDrawerPets(k){var B;const U=K.q.instance.prodigy.gameContainer.get("306-5359"),F=$.wa5.getActiveScene().container.get(j.BattleConstants),G={};Object.values(k).forEach((k=>{var B;const U=z.t.getItem("pet",k.asset.id),j=nt.P8.getElementType(U),$=F.getElementalWeakness(j);G[$]=(null!==(B=G[$])&&void 0!==B?B:0)+1}));const H=U.kennel.getPets(!1).filter((k=>!this._cachedTeamIds.includes(k.ID))).sort(((k,B)=>B.level-k.level)),V=H.slice(0,2),W=H.filter((k=>{if(V.includes(k))return!1;const B=z.t.getItem("pet",k.ID),U=nt.P8.getElementType(B);return void 0!==G[U]}));W.sort(((k,B)=>{var U,F;const j=z.t.getItem("pet",k.ID),$=nt.P8.getElementType(j),H=z.t.getItem("pet",B.ID),V=nt.P8.getElementType(H);return(null!==(U=G[V])&&void 0!==U?U:0)-(null!==(F=G[$])&&void 0!==F?F:0)})),V.push(null!==(B=W[0])&&void 0!==B?B:H[2]),V.filter((k=>q.A.isDefined(k))).forEach(((k,B)=>{const U=this._additionalDrawerPetSlots[B];U.active=!0,this._cachedPetDrawerIds.push(k.ID),at.d.updateInjectedValues(U,st.j.GetOwnedPetCardInjectionValues(k,this.onPetCardClicked.bind(this),!1,!0,!0))}))}onPetCardClicked(k){if(this._cachedTeamIds.includes(k.ID))return;const B=this._player.kennel.getPetByID(k.ID);this.setPetData(!0,this._activeTeamSelectionIndex,B);const U=this._cachedTeamIds[this._activeTeamSelectionIndex];this._cachedTeamIds[this._activeTeamSelectionIndex]=k.ID,Array.from([...this._teamDrawerPetSlots,...this._additionalDrawerPetSlots]).forEach(((k,B)=>{at.d.updateInjectedValues(k,{[it.ML.ShowOnTeam]:this._cachedTeamIds.includes(this._cachedPetDrawerIds[B])})})),0===this._activeTeamSelectionIndex&&this.setActiveTeamSelectionIndex(this._activeTeamSelectionIndex+1);const F=z.t.getItem("pet",U);this._segment.featureCommon.sendTeamUpdatedEvent(k.name,F.data.name,{update_type:tt.jR.Manual,instanceType:J.N.UniversalTeamSelection})}sendInterfaceOpenedEvent(k,B){const U={opponents:this.mapPetsToAnalyticsInfo(B,k),suggestedPets:this.mapPetsToAnalyticsInfo(this._cachedPetDrawerIds,k)};this._segment.featureCommon.sendInterfaceEvent({interfaceName:Z.B.UniversalTeamSelection,interfaceType:tt.Wm.Screen,instanceType:J.N.UniversalTeamSelection,originType:tt.$N.AutoSurfaced},{map_entered_instance_type:this._segment.gameWorld.getCurrentInstanceTypeAndID(J.N.OpenWorld).instance_type,map_entered_instance_id:this._segment.gameWorld.getCurrentInstanceTypeAndID(J.N.OpenWorld).instance_id,item_list:U})}mapPetsToAnalyticsInfo(k,B){return Array.isArray(k)?k.map((k=>{var U,F;const G=z.t.getItem("pet",k),j=B.kennel.getPetByID(k);return{name:null!==(U=j.nickname)&&void 0!==U?U:G.name,level:j.level,rank:null!==(F=j.mergeRank)&&void 0!==F?F:0}})):(0,H.map)(k,(k=>{var B,U;let F="";if(k.asset.type===W.uj.Wizard)F=k.appearance.name;else{F=null===(B=z.t.getItem("pet",k.asset.id).data)||void 0===B?void 0:B.name}return{name:F,level:k.level,rank:null!==(U=k.mergeRank)&&void 0!==U?U:0}}))}};(0,G.Cg)([(0,$.Cdj)("c47-20b6"),(0,G.Sn)("design:type",et.Y)],dt.prototype,"_segment",void 0),(0,G.Cg)([(0,$.SZi)(),(0,$.ERr)(),(0,G.Sn)("design:type",Array)],dt.prototype,"_homeTeamPetSlots",void 0),(0,G.Cg)([(0,$.SZi)(),(0,$.ERr)(),(0,G.Sn)("design:type",Array)],dt.prototype,"_teamDrawerPetSlots",void 0),(0,G.Cg)([(0,$.SZi)(),(0,$.ERr)(),(0,G.Sn)("design:type",Array)],dt.prototype,"_additionalDrawerPetSlots",void 0),(0,G.Cg)([(0,$.SZi)(),(0,$.ERr)(),(0,G.Sn)("design:type",Array)],dt.prototype,"_awayTeamPetSlots",void 0),dt=(0,G.Cg)([(0,$.EVk)("UniversalTeamSelectionMenu",X.Y.universalTeamSelection)],dt)},3374:(k,B,U)=>{"use strict";U.d(B,{C:()=>H});var F=U(8674),G=U(79687),j=U(35120),$=U(37962);let H=class{get videosConfig(){return this._videosConfig}static getVideosDataProvider(){return j.q.instance.prodigy.gameContainer.get("4fc-916d")}fetchVideosConfig(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._videosConfig||(this._videosConfig=yield this._videosNetworkHandler.getVideosConfig()),this._videosConfig}))}getVideosDataByType(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.fetchVideosConfig();return null==B?void 0:B[k]}))}};(0,F.Cg)([(0,G.inject)("7c8-742f"),(0,F.Sn)("design:type",$.j)],H.prototype,"_videosNetworkHandler",void 0),H=(0,F.Cg)([(0,G.injectable)()],H)},13367:(k,B,U)=>{"use strict";U.d(B,{m:()=>z});var F,G=U(8674),j=U(62459),$=U(95891),H=U(68910),V=U(35120),W=U(28152),q=U(87337),K=U(12676);let z=F=class extends j.uAl{constructor(){super(...arguments),this._onWanderingNPCPresent=new j.HN0,this._onWanderingNPCNotPresent=new j.HN0}static getSeededLocation(k){return""}create(){super.create(),H.Ticker.shared.addOnce(this.checkForWanderingNPC,this)}destroy(){this._onWanderingNPCPresent.dispose(),this._onWanderingNPCNotPresent.dispose(),H.Ticker.shared.remove(this.checkForWanderingNPC,this),super.destroy()}checkForWanderingNPC(){(F.getSeededLocation()===this.generateLocationID()?this._onWanderingNPCPresent:this._onWanderingNPCNotPresent).dispatch()}generateLocationID(){const k=V.q.instance.prodigy.world.getCurrentMap(),{x:B,y:U}=this.gameObject.transform.worldPosition;return`${k}-${Math.round(B)}-${Math.round(U)}`}sendDiscoveryEvent(k){const B=F.getSeededLocation();if(B===this.generateLocationID()){const U=B.split("-");V.q.instance.prodigy.gameContainer.get("c47-20b6").gameWorld.sendNpcDiscoveredEvent({npc_name:K.N.Ulla,npc_type:q.ac.QuestGiver,npc_id:"580",npc_animation_id:k,x_coord:(0,$.toInteger)(U[2]),y_coord:(0,$.toInteger)(U[3])})}}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],z.prototype,"_onWanderingNPCPresent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],z.prototype,"_onWanderingNPCNotPresent",void 0),z=F=(0,G.Cg)([(0,j.EVk)("WanderingNPC",W.Y.ultimates)],z)},78703:(k,B,U)=>{"use strict";U.d(B,{o:()=>z});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(28402);class V extends G.m$y{update(k,B){const U=k.gameObject.findComponent(H.v);null!==U?null===U.getSpine()?k.alpha=0:U.alpha=G.cj9.linear(this.startAlpha,this.endAlpha,B):super.update(k,B)}}class W extends G.l28{constructor(){super(...arguments),this.loopAnimation=!0}initialize(k){if(k.alpha=0,!k.gameObject.renderer){const B=k.gameObject.addComponent(H.v);k.gameObject.renderer=B}k.gameObject.renderer.setAsset(this.asset,(()=>{G.Aq$.isDefined(this.animationName)&&this.animationName.length>0&&k.gameObject.renderer.setAnimationByName(0,this.animationName,this.loopAnimation)}))}}var q=U(76945);class K extends G.l28{constructor(){super(...arguments),this.loopAnimation=!0}initialize(k){const B=k.gameObject.renderer;if(B){if(B.isLoaded){const k=B.getSpine().skeleton.data.animations,U=q.o.integerInRange(0,k.length);B.setAnimationByName(0,k[U].name,this.loopAnimation)}}else G.VyI.log("No Spine Found On Particle!!",G.$bb.Error)}}let z=class extends G.uAl{constructor(){super(...arguments),this._assetGUID=null,this._noteSpeed=80,this._waveHeight=200,this._noteScale=4,this._noteLifeSeconds=4,this._notesPerSecond=1,this._angleRAD=1}fireTrail(k){var B;k&&this.gameObject.transform.setPosition(k.worldPosition.x,k.worldPosition.y);const U=this.gameObject.addComponent(G.okU);U.emitPerSecond.setMinMax(this._notesPerSecond,this._notesPerSecond);const F=new W;F.asset=(null===(B=this._asset)||void 0===B?void 0:B.length)>0?this._asset:this._assetGUID;const j=new K;j.loopAnimation=!0;const $=new G.ZxM;$.life.setMinMax(this._noteLifeSeconds,this._noteLifeSeconds),$.life.type=G.UvC.Random;const H=k?this.getFireAngle(k):this._angleRAD,q=new G.U8B;q.angle.setMinMax(H*G.cj9.RAD_TO_DEG,H*G.cj9.RAD_TO_DEG),q.angle.type=G.UvC.PhasePerSample,q.speed.setMinMax(this._noteSpeed,this._noteSpeed);const z=new G.mYY;z.point1.setTo(0,this._waveHeight),z.point2.setTo(0,-this._waveHeight);const Y=new G.hQR;Y.scale.setMinMax(this._noteScale,this._noteScale);const Q=new V;Q.endAlpha=0,Q.startAtLifePercentage=.9,U.initializers=[F,j,$,Y,z,q],U.behaviours=[Q]}getFireAngle(k){const B=new G.I9Y(j.q.instance.game.width/2,j.q.instance.game.height/2);B.subtract(k.worldPosition),B.normalize();let U=Math.acos(B.y);return B.x<0&&(U*=-1),U}};(0,F.Cg)([(0,G.Bak)(),(0,G.i0J)(G.Z$z.Spine),(0,F.Sn)("design:type",String)],z.prototype,"_assetGUID",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],z.prototype,"_asset",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_noteSpeed",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_waveHeight",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_noteScale",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_noteLifeSeconds",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_notesPerSecond",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_angleRAD",void 0),z=(0,F.Cg)([(0,G.EVk)("WanderingNPCTrail",$.Y.ultimates)],z)},12270:(k,B,U)=>{"use strict";U.d(B,{E:()=>j});var F=U(80003),G=U(66582);(0,U(39938).n)(F.D,"WizardBankAllowance");const j=new Map([[G._$.NonMember,F.D.NonMember],[G._$.MemberCore,F.D.Core],[G._$.MemberPlus,F.D.Plus],[G._$.MemberUltra,F.D.Ultra]])},8838:(k,B,U)=>{"use strict";U.d(B,{T:()=>F});var F,G=U(39938);!function(k){k.Open="Open",k.Closed="Closed",k.Disabled="Disabled"}(F||(F={})),(0,G.n)(F,"WizardBankChest")},60228:(k,B,U)=>{"use strict";U.d(B,{Bz:()=>W,Ug:()=>q,cR:()=>V});var F=U(8674),G=U(62459),j=U(89067),$=U(35120),H=U(98252);function V(k){const{currency:B,value:U}=k;return 27===B&&U>0}function W(k){const B=$.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);if(!H.pF.isNativeApp()||H.pF.eligibleVersionForMobileMembershipPurchaseForMultipleTiers())return B.getText(j.Jr[k])}function q(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=$.q.instance.prodigy.gameContainer,B=k.get("231-9111"),U=k.get("cc9-a3f0"),F=k.get("3a0-8003"),H=k.get(G.$Bt.LocalizationService),V=(yield B.getAllowanceClaimData()).totalClaimable,q=j.Uk[F.memberTier],K=V.reduce(((k,B)=>k+B.value),0);U.updateNotificationBadge(q,K>0?"!":void 0),U.updateCachedLabelData(q,{labelValue:K>0?H.getText("PLUS_ULTRA_BONUS_COLLECT"):W(q)})}))}},84234:(k,B,U)=>{"use strict";U.d(B,{W:()=>W});var F,G=U(8674),j=U(62459),$=U(79687),H=U(80105),V=U(2265);let W=F=class{constructor(k){this._seenCostumeIds=[],this.onCostumeDataChanged=new j.HN0,this._networkHandler=new V.l,this._secureInventory=k}initializeCostumeData(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;this._currentCostumePoolData=null==k?void 0:k.pools,this._seenCostumeIds=null!==(B=null==k?void 0:k.seenCostumeIds)&&void 0!==B?B:[],this.onCostumeDataChanged.dispatch()}))}getCurrentCostumePoolData(){var k;const B=Date.now();return null===(k=this._currentCostumePoolData)||void 0===k?void 0:k.filter((k=>(!k.startDate||k.startDate<=B)&&(!k.endDate||k.endDate>=B)))}getCurrentCostumePool(){var k;return null===(k=this.getCurrentCostumePoolData())||void 0===k?void 0:k[0]}getSeenCostumeIds(){return this._seenCostumeIds}getUnseenCostumeIds(){return[...this.getCurrentPoolCostumeIds(),...this.getOwnedCostumes().map((k=>k.id))].filter((k=>!this._seenCostumeIds.includes(k)))}markAllCurrentCostumesAsSeen(){return(0,G.sH)(this,void 0,void 0,(function*(){if(0===this.getUnseenCostumeIds().length)return;const k=new Set([...this._seenCostumeIds,...this.getCurrentPoolCostumeIds()]);this._seenCostumeIds=Array.from(k),yield this._networkHandler.markCostumesSeen(this._seenCostumeIds),this.onCostumeDataChanged.dispatch()}))}getCurrentPoolCostumeIds(){var k;const B=[];return(null!==(k=this.getCurrentCostumePoolData())&&void 0!==k?k:[]).forEach((k=>k.sections.forEach((k=>B.push(...k.costumeIds))))),B}getCostumesToDisplayForFtuePopup(){const k=this.getCurrentCostumePool();return k?k.sections.reduce(((k,B)=>k.concat(B.costumeIds)),[]).slice(-F.NUM_FTUE_COSTUMES):[]}getOwnedCostumes(){return this._secureInventory.getAllOfType("costume")}cleanup(){this.onCostumeDataChanged.dispose()}};W.NUM_FTUE_COSTUMES=6,W=F=(0,G.Cg)([(0,$.injectable)(),(0,G.Qj)(0,(0,$.inject)("61f-37d6")),(0,G.Sn)("design:paramtypes",[H.U])],W)},33587:(k,B,U)=>{"use strict";U.d(B,{z:()=>W});var F=U(8674),G=U(79687),j=U(4903),$=U(35120),H=U(73797),V=U(84415);let W=class{initListeners(){$.q.instance.prodigy.game.broadcaster.addAppListener(H.H3.MembershipLapsedBetweenSessions,this.onMembershipLapsed,this,void 0,!0)}onMembershipLapsed(){V.a.clearFeatureTimestamp(j.s.WizardCostumesTutorial)}};W=(0,F.Cg)([(0,G.injectable)()],W)},32367:(k,B,U)=>{"use strict";U.d(B,{r:()=>ut});var F=U(8674),G=U(62459),j=U(99625),$=U(4903),H=U(35120),V=U(73797),W=U(28152),q=U(28047),K=U(63746),z=U(72799),Y=U(1195),Q=U(97252);let X=class extends G.uAl{constructor(){super(...arguments),this._runOnCreate=!1,this.onGearTypeEquipped=new G.HN0,this.onGearTypeNotEquipped=new G.HN0}create(){this._currentPlayer?this._gearType?this._runOnCreate&&this.isGearTypeEquipped():G.VyI.log("EquippedGearTypeComponent: No gear type specified, unable to check gear type",G.$bb.Error):G.VyI.log("EquippedGearTypeComponent: No current player found, unable to check gear type",G.$bb.Error)}destroy(){this.onGearTypeEquipped.dispose(),this.onGearTypeNotEquipped.dispose(),super.destroy()}isGearTypeEquipped(){this._currentPlayer.player.equipment.getData()[this._gearType]?this.onGearTypeEquipped.dispatch():this.onGearTypeNotEquipped.dispatch()}unEquipGearType(){return(0,F.sH)(this,arguments,void 0,(function*(k=!0){const B=this._currentPlayer.player.equipment.getData()[this._gearType];B&&(yield this._currentPlayer.player.unEquip(B,this._gearType),k&&this.isGearTypeEquipped())}))}};(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",Y.E)],X.prototype,"_currentPlayer",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],X.prototype,"_runOnCreate",void 0),(0,F.Cg)([(0,G.gfw)(Q.At),(0,F.Sn)("design:type",String)],X.prototype,"_gearType",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],X.prototype,"onGearTypeEquipped",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],X.prototype,"onGearTypeNotEquipped",void 0),X=(0,F.Cg)([(0,G.EVk)("EquippedGearType",W.Y.utility)],X);var Z=U(23082),J=U(15485),tt=U(46784),et=U(65050),it=U(96073),st=U(24047),nt=U(41674),at=U(94325),rt=U(21418),ot=U(53661),ht=U(84415),ct=U(3374),dt=U(84234),lt=U(19609);let ut=class extends q.v{constructor(){super(...arguments),this._menuFullyInitialized=new G.HN0,this._onScreenEquippedGearGuards=new Set,this._onScreenItemCards=new Set,this._videoType=$.s.WizardCostumesTutorial,this.onCostumeSelected=new G.HN0,this.onCostumeEquipped=new G.HN0}get firstCostumeCard(){const[k]=this._onScreenItemCards;return k.GameObject.findComponent(G.y4o).getRootContainer()}create(){super.create();const k=this._wizardCostumesDataProvider.getCurrentCostumePool();if(!k)return void G.VyI.log("WizardCostumesMenuComponent#create: No active costume pool found. Unable to initialize the menu.",G.$bb.Error);this._contentRoot.alpha=0,this._contentRoot.updateFilter();const B=H.q.instance.game.state.get(Z.G.TileScreen);(null==B?void 0:B.gameRenderCache)&&(B.gameRenderCache.visible=!1);const U=this.initialize({currentCostumePool:k}).catch(G.RQr.createHandler("WizardCostumesMenuComponent#create: Failed to initialize the menu with the provided data."));this.sendCostumesFunnelStep(it.j.MenuOpen,it.t.MenuOpen),this._howItWorksButton.active=!1;const F=lt.hD.isFtueFlowActive();let j=!1;const $=[U,this.refreshVideoData().then((()=>{if(!G.Aq$.isDefined(this._currentVideoTypeData))return this._howItWorksButton.active=!1,void G.VyI.log("WizardCostumesMenuComponent: No video data found for the current video type.",G.$bb.Warning);if(this._howItWorksButton.active=!0,this.shouldAutoPlayVideo()){j=!0,this.sendCostumesFunnelStep(it.j.TutorialVideoStarted,it.t.TutorialVideoStarted);const k=()=>{this.sendCostumesFunnelStep(it.j.TutorialVideoFinished,it.t.TutorialVideoFinished),F&<.hD.start(this)};this.openVideoMenu(!0,k)}})).catch(G.RQr.createHandler("WizardCostumesMenuComponent#create: Failed to refresh video data on menu creation."))];F&&$.push(lt.hD.preloadOverlay().catch(G.RQr.createHandler("WizardCostumesMenuComponent#create: Failed to preload FTUE overlay."))),Promise.all($).then((()=>{F&&!j&<.hD.start(this),this._contentRoot.alpha=1,this._contentRoot.updateFilter(),this._menuFullyInitialized.dispatch()})).catch(G.RQr.createHandler("WizardCostumesMenuComponent#create error"))}setScrollEnabled(k){this._scrollView.lockScrollWheel=!k,this._scrollView.contentDraggingEnabled=k}resetScrollPosition(){this._scrollView.scrollToPercent(0)}destroy(){this._player.onEquipmentChange.remove(this.handleEquippedStatus,this),this._menuFullyInitialized.dispose(),this.onCostumeSelected.dispose(),this.onCostumeEquipped.dispose(),super.destroy()}initialize(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(!k)return void G.VyI.log("WizardCostumesMenuComponent#initialize: No menu data provided. Unable to initialize the menu.",G.$bb.Error);this._wizardCostumesMenuData=k;const{currentCostumePool:B}=this._wizardCostumesMenuData,U=[];for(const k of B.sections)U.push(...this.addItemsSection({id:k.nameLocKey,label:this._baseLocalizer.getText(k.nameLocKey),colour:k.colour,expiresAt:B.endDate,displayEquippedGearCard:k.displayEquippedGearCard},k.costumeIds));const F=this._player.equipment.getCostume();F&&this._itemPreview.renderSelectedItem({id:F,type:"costume",cost:{}},void 0,!0);const $=yield this._shelfSpawner.spawnPrefabsWithData(U),H=[],V=[];$.forEach((k=>{k.config&&k.attachedObject&&[j.l.ItemCard,j.l.ItemCard_EquippedGear].includes(k.config.prefabGuid)&&(H.push(k.attachedObject.findComponentInChildren(z.M).onRenderComplete.asPromise()),V.push(k.attachedObject.findComponent(G.y4o).getRootContainer()))})),V.forEach((k=>k.alpha=0)),yield Promise.all(H),V.forEach((k=>k.alpha=1)),yield this._wizardCostumesDataProvider.markAllCurrentCostumesAsSeen(),this._player.onEquipmentChange.add(this.handleEquippedStatus,this)}))}addItemsSection(k,B){const U=!!G.Aq$.isDefined(k.expiresAt)&&k.expiresAt-H.q.instance.prodigy.timeManager.getLocalTimeMs();return[{prefabGuid:j.l.DynamicStoreSectionHeader,data:{DYNAMIC_STORE_SHELF_LABEL:k.label,DYNAMIC_STORE_SHELF_MILLISECONDS_REMAINING:U,DYNAMIC_STORE_SHELF_HEADER_COLOUR:k.colour,DYNAMIC_STORE_SHELF_CURRENCIES:[]}},...this.createSectionShelfData(k,B)]}createSectionShelfData(k,B){const U=B.map((k=>({prefabGuid:j.l.ItemCard,data:{[ot.Tl.Data]:{id:k,type:"costume"}}})));return k.displayEquippedGearCard&&U.unshift({prefabGuid:j.l.ItemCard_EquippedGear,data:{}}),U}onPooledObjectEnter(k,B){switch(B.prefabGuid){case j.l.ItemCard:{const U=k.findComponentInChildren(K.Z);if(!U)return G.VyI.log("WizardCostumesMenuComponent#onPooledObjectEnter: Failed to find an ItemCardComponent in ItemCard prefab. Hiding the object.",G.$bb.Error),void(k.active=!1);const F=B.data[ot.Tl.Data];null==U||U.initializeItemCard(F,(()=>{this.onItemCardClicked(F.id).catch(G.RQr.createHandler("WizardCostumesMenuComponent#onPooledObjectEnter: Failed to handle item card click event."))})),U.setNewNotificationBadgeVisibility(this._wizardCostumesDataProvider.getUnseenCostumeIds().includes(F.id)),this._onScreenItemCards.add(U),this.adjustRectTransformsForItemCards(k);break}case j.l.ItemCard_EquippedGear:{const B=k.findComponent(X);if(!B)return G.VyI.log("WizardCostumesMenuComponent#onPooledObjectEnter: Failed to find an EquippedGearTypeComponent in ItemCard_EquippedGear prefab. Hiding the object.",G.$bb.Error),void(k.active=!1);this._onScreenEquippedGearGuards.add(B),B.isGearTypeEquipped(),this.adjustRectTransformsForItemCards(k);break}}}onPooledObjectExit(k,B){switch(B.prefabGuid){case j.l.ItemCard:{const B=k.findComponentInChildren(K.Z);B&&this._onScreenItemCards.delete(B);break}case j.l.ItemCard_EquippedGear:{const B=k.findComponent(X);B&&this._onScreenEquippedGearGuards.delete(B);break}}}adjustRectTransformsForItemCards(k){var B;const U=k.findComponent(G.XVE);if(!U)return G.VyI.log("WizardCostumesMenuComponent#adjustRectTransformsForItemCards: Failed to find a RectTransform in the Item Card or ItemCard_EquippedGear prefab. Hiding the object.",G.$bb.Error),void(k.active=!1);U.setAnchorMin(0,0),U.setAnchorMax(0,0),U.setPivot(0,0);const F=null===(B=k.parent)||void 0===B?void 0:B.findComponent(G.XVE);F?(F.setAnchorMin(0,0),F.setAnchorMax(0,0),F.setPivot(0,0)):(G.VyI.log("WizardCostumesMenuComponent#adjustRectTransformsForItemCards: Failed to find a RectTransform in parent of the Item Card or ItemCard_EquippedGear prefab. Hiding the object.",G.$bb.Error),k.active=!1)}onItemCardClicked(k){return(0,F.sH)(this,void 0,void 0,(function*(){this._onScreenItemCards.forEach((B=>{var U;(null===(U=B.itemCardData)||void 0===U?void 0:U.id)===k&&B.setNewNotificationBadgeVisibility(!1)})),this._segment.featureCommon.sendButtonEvent({buttonName:J.k.CostumesItemCardButton,interfaceName:tt.B.WizardCostumesMenu,interfaceType:nt.Wm.Menu,instanceType:et.N.Interface,destinationName:tt.B.ItemInfo,saveClickInfo:J.k.CostumesItemCardButton}),H.q.instance.prodigy.open.itemInfo({ID:k,type:"costume"},void 0,rt.s.WizardCostumesMenu,J.k.CostumesItemCardButton),this.onCostumeSelected.dispatch(),this.sendCostumesFunnelStep(it.j.CostumePreview,it.t.CostumePreview)}))}handleEquippedStatus(){const k=this._player.equipment.getCostume(),B=G.Aq$.isDefined(k)&&0!==k;this._player.appearanceChanged=!0,H.q.instance.game.broadcaster.broadcast(V.J8.PlayerAppearanceUpdated),this._onScreenEquippedGearGuards.forEach((k=>k.isGearTypeEquipped())),this._onScreenItemCards.forEach((U=>{var F;U.setEquippedIconVisibility(B&&(null===(F=U.itemCardData)||void 0===F?void 0:F.id)===k)})),B&&k?(this._itemPreview.renderSelectedItem({id:k,type:"costume",cost:{}},void 0,!0),this.onCostumeEquipped.dispatch(),this.sendCostumesFunnelStep(it.j.CostumeEquipped,it.t.CostumeEquipped)):this._itemPreview.setToDefaultState()}sendCostumesFunnelStep(k,B){this._segment.funnel.sendStep(st.F.Costumes,"feature",k,B)}shouldAutoPlayVideo(){const k=H.q.instance.prodigy.gameContainer.get("306-5359");return!ht.a.doesFeatureTimestampExist(k,this._videoType)}openVideoMenu(k=!1,B){var U,F,$;Object.keys(null!==($=null===(F=null===(U=this._currentVideoTypeData)||void 0===U?void 0:U.data)||void 0===F?void 0:F.videos)&&void 0!==$?$:{}).length<=0?G.VyI.log("WizardCostumesMenuComponent#openVideoMenu: No valid videos to show for the current video type. Skipping video menu.",G.$bb.Warning):H.q.instance.prodigy.open.genericVideoMenu({videoMenuGuid:j.l.WizardCostumesVideoMenu,videoTypeData:this._currentVideoTypeData,saveTimestamp:!0,showCountdown:k,onClose:B})}refreshVideoData(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=ct.C.getVideosDataProvider();this._currentVideoTypeData=yield k.getVideosDataByType(this._videoType)}))}};(0,F.Cg)([(0,G.Cdj)("6e9-d1dd"),(0,F.Sn)("design:type",dt.W)],ut.prototype,"_wizardCostumesDataProvider",void 0),(0,F.Cg)([(0,G.Cdj)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],ut.prototype,"_baseLocalizer",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],ut.prototype,"_howItWorksButton",void 0),(0,F.Cg)([(0,G.MnK)(G.jsv),(0,F.Sn)("design:type",G.jsv)],ut.prototype,"_contentRoot",void 0),(0,F.Cg)([(0,G.MnK)(at.C),(0,F.Sn)("design:type",at.C)],ut.prototype,"_scrollView",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],ut.prototype,"_menuFullyInitialized",void 0),ut=(0,F.Cg)([(0,G.EVk)("WizardCostumesMenu",W.Y.wizardCostumes)],ut)},2265:(k,B,U)=>{"use strict";U.d(B,{l:()=>$});var F=U(8674),G=U(48417),j=U(76546);class $ extends j.D{markCostumesSeen(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(G.D.WizardCostumes.MarkCostumesSeen,{costumeIds:k},!1)}))}callDebugRoute(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return Promise.resolve()}))}}},19609:(k,B,U)=>{"use strict";U.d(B,{Ts:()=>Y,hD:()=>X});var F=U(8674),G=U(62459),j=U(99625),$=U(35120),H=U(96535),V=U(73797),W=U(13956),q=U(68152),K=U(84415);const z="wizardCostumesFtueSeen",Y=12;var Q;!function(k){k.Initialize="Initialize",k.HighlightFirstCostume="Step 1",k.PointAtFirstCostume="Step 2",k.PointAtWearButton="Step 3",k.AfterEquip="Step 4",k.HighlightBackpackTab="Step 5",k.PointAtBackpackTab="Step 6",k.InsideBackpack="Step 7",k.InsideBackpack2="Step 7.1",k.PointAtCostumesTab="Step 8",k.BackInCostumes="Step 9",k.Complete="Complete"}(Q||(Q={}));class X{constructor(){this._currentStep=Q.Initialize}static isFtueFlowActive(){return X._ftueFlowActive}static shouldShowFtue(){return!K.a.doesFeatureTimestampExist(X._activePlayer,z)}static initFtue(){const k=X._activePlayer;X._ftueFlowActive=!0,k.saveEnabled=!1;const B=k.equipment.getCostume();G.Aq$.isDefined(B)&&0!==B&&(k.equipment.setCostume(0),k.appearanceChanged=!0,$.q.instance.game.broadcaster.broadcast(V.J8.PlayerAppearanceUpdated))}static completeFtue(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=X._activePlayer;K.a.saveTimestampData(z),k.saveEnabled=!0,X._ftueFlowActive=!1,yield new Promise((B=>k.forceSaveCharacter(B)))}))}static preloadOverlay(){return(0,F.sH)(this,void 0,void 0,(function*(){return X._preloadPromise||(X._preloadPromise=(()=>(0,F.sH)(this,void 0,void 0,(function*(){return $.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(j.l.WizardCostumesFTUEOverlay).then((k=>k.active=!1))})))()),X._preloadPromise}))}static start(k){X._instance?X._instance._menuComponent=k:(X._instance=new X,X._instance._menuComponent=k,X.preloadOverlay().then((k=>{var B;k.active=!0,null===(B=X._instance)||void 0===B||B.run({stringState:G.Uoy.getInjectedValue(k,"STRING_STATE"),highlightGraphic:G.Uoy.getInjectedValue(k,"HIGHLIGHT_GRAPHIC"),audioPlayer:G.Uoy.getInjectedValue(k,"AUDIO_PLAYER")})})).catch(G.RQr.createHandler("WizardCostumesTutorialController.start: Failed to load tutorial prefab")))}run(k){var B,U;this._highlightGraphic=k.highlightGraphic,this._audioPlayer=k.audioPlayer,null===(B=this._menuComponent)||void 0===B||B.resetScrollPosition(),null===(U=this._menuComponent)||void 0===U||U.setScrollEnabled(!1),this.setState=B=>{this._currentStep=B,k.stringState.setValue(B),this.handleStateChange()},this.setState(Q.HighlightFirstCostume)}handleStateChange(){switch(this._currentStep){case Q.HighlightFirstCostume:(0,q.v)(this._menuComponent);const k=this._menuComponent.firstCostumeCard,B=$.q.instance.game.renderer.generateTexture(k);this._highlightGraphic.setTexture(B),this._highlightGraphic.GameObject.transform.setPosition(k.getBounds().x,k.getBounds().y),this._audioPlayer.onDialogueAudioComplete.addOnce((()=>{this.setState(Q.PointAtFirstCostume)}));break;case Q.PointAtFirstCostume:(0,q.v)(this._menuComponent),this._menuComponent.onCostumeSelected.addOnce((()=>{this.setState(Q.PointAtWearButton)}));break;case Q.PointAtWearButton:(0,q.v)(this._menuComponent),this._highlightGraphic.setTexture(void 0),this._menuComponent.onCostumeEquipped.addOnce((()=>{this.setState(Q.AfterEquip)}));break;case Q.AfterEquip:this._audioPlayer.onDialogueAudioComplete.addOnce((()=>{this.setState(Q.HighlightBackpackTab)}));break;case Q.HighlightBackpackTab:(0,q.v)(this._menuComponent),this._audioPlayer.onDialogueAudioComplete.addOnce((()=>{this.setState(Q.PointAtBackpackTab)})),this._menuComponent.headerNavigation.tabsContainerObject.children[1].layer="CostumesFTUEDimmer";break;case Q.PointAtBackpackTab:(0,q.v)(this._menuComponent),this._menuComponent.headerNavigation.tabsContainerObject.children[1].layer="default",this._menuComponent.OnDestroy.addOnce((()=>{this._menuComponent=void 0,this.setState(Q.InsideBackpack)}));break;case Q.InsideBackpack:this._audioPlayer.onDialogueAudioComplete.addOnce((()=>{this.setState(Q.InsideBackpack2)}));break;case Q.InsideBackpack2:this._audioPlayer.onDialogueAudioComplete.addOnce((()=>{this.setState(Q.PointAtCostumesTab)}));break;case Q.PointAtCostumesTab:$.q.instance.prodigy.open.onPrefabMenuOpened.addOnce((k=>{k===j.l.WizardCostumesMenu&&this.setState(Q.BackInCostumes)}));break;case Q.BackInCostumes:this._audioPlayer.onDialogueAudioComplete.addOnce((()=>(0,F.sH)(this,void 0,void 0,(function*(){this.setState(Q.Complete),X._instance=void 0,yield X.completeFtue()}))))}}}X._ftueFlowActive=!1,X.ftuePopupLoading=!1,(0,F.Cg)([(0,W.b)("306-5359"),(0,F.Sn)("design:type",H.W)],X,"_activePlayer",void 0)},41012:(k,B,U)=>{"use strict";U.d(B,{e:()=>K});var F=U(8674),G=U(62459),j=U(28344),$=U(29738),H=U(34829),V=U(96535),W=U(76277),q=U(13956);class K{static hasWizardWatchAccess(){return(0,F.sH)(this,void 0,void 0,(function*(){return!!$.O.isEnglishLocale()&&(!(0,W.G)(j.y).enabled||this._featureRequirements.meetsRequirements(7))}))}static canAutoSurfaceWizardWatch(){return(0,F.sH)(this,void 0,void 0,(function*(){return!!(yield K.hasWizardWatchAccess())&&(!(this._activePlayer.tutorialCompletedThisSession||!this._activePlayer.hasCompletedTutorial())&&!(G.Aq$.isDefined(this._activePlayer.data.wwCooldownTime)&&Date.now()-this._activePlayer.data.wwCooldownTime<2*H.A.HOURS_IN_MS))}))}}(0,F.Cg)([(0,q.b)("306-5359"),(0,F.Sn)("design:type",V.W)],K,"_activePlayer",void 0),(0,F.Cg)([(0,q.b)("db5-fb6e"),(0,F.Sn)("design:type",Object)],K,"_featureRequirements",void 0)},52250:(k,B,U)=>{"use strict";U(10778);var F=U(49237),G=(U(12808),U(8674)),j=U(62459);let $=class extends j.uAl{logOver(){this.logMessage("over")}logOut(){this.logMessage("out")}logDown(){this.logMessage("down")}logUp(){this.logMessage("up")}logClick(){this.logMessage("click")}logMessage(k){j.VyI.log(`Got button event: ${k}`,j.$bb.Info)}};$=(0,G.Cg)([(0,j.EVk)("ButtonTester",j.YH6.ui)],$);var H=U(24519),V=U(56163),W=(U(54422),U(28152));let q=class extends j.uAl{constructor(){super(...arguments),this.direction=j.e$E.Vertical,this.spacing=10,this.offset=0,this.fitChildren=!0,this.ignoreInactive=!0}postCreate(){this.gameObject.onChildAdded.add(this.updateLayout,this),this.gameObject.onChildRemoved.add(this.updateLayout,this);for(const k of this.gameObject.children)this.onChildAdded(k,!1);this.updateLayout()}destroy(){this.gameObject.onChildAdded.remove(this.updateLayout,this),this.gameObject.onChildRemoved.remove(this.updateLayout,this);for(const k of this.gameObject.children){k.onActiveChanged.remove(this.updateLayout,this);const B=k.transform;B instanceof j.XVE&&B.onDimensionsChanged.remove(this.updateLayout,this)}super.destroy()}onChildAdded(k,B=!0){k.onActiveChanged.add(this.updateLayout,this);const U=k.transform;U instanceof j.XVE&&U.onDimensionsChanged.add(this.updateLayout,this),B&&this.updateLayout()}onChildRemoved(k,B=!0){k.onActiveChanged.remove(this.updateLayout,this);const U=k.transform;U instanceof j.XVE&&U.onDimensionsChanged.remove(this.updateLayout,this),B&&this.updateLayout()}updateLayout(){let k=this.offset;for(const B of this.gameObject.children){if(this.ignoreInactive&&!B.active)continue;const U=B.transform;U&&(this.direction===j.e$E.Vertical?U.setPositionY(k):U.setPositionX(k),k+=this.spacing,U instanceof j.XVE&&(this.direction===j.e$E.Vertical?k+=U.sizeDelta.height:k+=U.sizeDelta.width))}if(this.fitChildren){const B=this.gameObject.transform;if(B instanceof j.XVE){const U=new j.or0(B.sizeDelta.width,B.sizeDelta.height);this.direction===j.e$E.Vertical?U.height=k:U.width=k,B.setSizeDelta(U.width,U.height)}}}};(0,G.Cg)([(0,j.gfw)(j.e$E),(0,G.Sn)("design:type",String)],q.prototype,"direction",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],q.prototype,"spacing",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],q.prototype,"offset",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"fitChildren",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"ignoreInactive",void 0),q=(0,G.Cg)([(0,j.EVk)("ListLayout",W.Y.uiLayout)],q);U(47716);var K=U(12420),z=U(11472),Y=U(53153);let Q=class extends Y.y{constructor(){super(...arguments),this._button=null}postDeserialize(){super.postDeserialize(),this._base=this._button}};(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Q.prototype,"_button",void 0),Q=(0,G.Cg)([(0,j.EVk)("ScrollViewButton")],Q);var X=U(89400),Z=(U(76501),U(33961));U(25456);let J=class extends H.v{constructor(){super(...arguments),this._selectedStateObject=null,this._selectable=null}postCreate(){super.postCreate(),this._selectedStateObject&&(this._selectedStateObject.active=this._selectable.isSelected())}getStateObject(k){return this._selectable.isSelected()?this._selectedStateObject:super.getStateObject(k)}};(0,G.Cg)([(0,j.x4W)("selectedStateObject"),(0,G.Sn)("design:type",j._mx)],J.prototype,"_selectedStateObject",void 0),(0,G.Cg)([(0,j.x4W)("selectable"),(0,G.Sn)("design:type",Object)],J.prototype,"_selectable",void 0),J=(0,G.Cg)([(0,j.EVk)("SelectedGameObjectTransition",j.YH6.transition)],J);var tt=U(35120);let et=class extends j.uAl{get scrollBarListener(){return this._scrollView.scrollBarListener}get scrollReleaseListener(){return this._scrollView.scrollReleaseListener}create(){super.create(),this._barWidth=this._sliderTrack.legacyTransform.width,this._barHeight=this._sliderTrack.legacyTransform.height,this._contentView=new j._mx(this.GameObject),this._contentView.addComponent(j.K16),this._contentViewChild=new j._mx(this._contentView),this._contentViewChild.addComponent(j.K16),this._scrollViewObject=new j._mx,this._scrollViewObject.addComponent(j.K16),this._scrollView=this._scrollViewObject.addComponent(z.B,!1),this._scrollView.allowMouseWheel=!1,this._scrollView.horizontal=!0,this._scrollView.contentView=this._contentView,this._scrollView.create(),this._scrollBar=this.GameObject.addComponent(K.$),this._scrollBar.horizontal=!0,this._scrollBar.useHandCursor=!0,this._scrollBar.initialize(this._sliderNib,this._scrollView),this._scrollView.scrollBarListener.add(this.updateSlider.bind(this)),this._sliderMask=tt.q.instance.game.add.graphics(0,0,this._sliderFill.legacyTransform.group),this._sliderMask.beginFill(0),this._sliderMask.drawRect(0,0,this._barWidth,this._barHeight),this._sliderMask.inputEnabled=!1,this._sliderFill.legacyTransform.group.mask=this._sliderMask}setInputPriority(k){this._scrollBar.setInputPriority(k)}getPercent(){return this._scrollBar.getPercent()}scrollToPercent(k){this._scrollBar.scrollToPercent(k),this.updateSlider()}updateSlider(){this._sliderMask.x=this._sliderNib.legacyTransform.x-this._barWidth+this._sliderNib.legacyTransform.width/2}destroy(){this._scrollBar.destroy(),this._scrollView.destroy(),this._scrollViewObject.destroy(),this._contentView.destroy(),this._contentViewChild.destroy(),this._sliderMask.destroy(),this._sliderFill.destroy(),this._sliderTrack.destroy(),this._sliderNib.destroy(),super.destroy()}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_sliderFill",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_sliderTrack",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_sliderNib",void 0),et=(0,G.Cg)([(0,j.EVk)("Slider",j.YH6.ui)],et);var it,st=U(83133);U(13930);!function(k){k.Vertical="vertical",k.Horizontal="horizontal"}(it||(it={}));class nt extends j.$KW{generate(k,B){return j.XRp.createVertical([this.waveFunction(k),this.gridLayout(k)])}waveFunction(k){var B,U,F,G,$;const H=j.Gme.checkboxGroup({id:"applyForY",labelValue:"Apply for Y",inputValue:k.applyForY||!1,labelTooltip:"If it should apply on the Y coordinates"}),V=j.Gme.checkboxGroup({id:"avoidDuplicatePositions",labelValue:"Avoid Dup. Pos.",inputValue:k.avoidDuplicatePositions||!1,labelTooltip:"Tries to avoid duplicate positions making the positioning seem continuous"}),W=j.Gme.numberGroup({id:"amplitude",labelValue:"Amplitude",inputValue:null!==(B=k.amplitude)&&void 0!==B?B:50,inputUpdateMode:j.JGO.OnTheFly,labelTooltip:"How high and how low will items be placed"}),q=j.Gme.numberGroup({id:"frequency",labelValue:"Frequecy",inputValue:null!==(U=k.frequency)&&void 0!==U?U:1.1,inputUpdateMode:j.JGO.OnTheFly,labelTooltip:"Increases and decreases how frequent overtime the cycle repeats"}),K=j.Gme.numberGroup({id:"phase",labelValue:"Phase",inputValue:null!==(F=k.phase)&&void 0!==F?F:5.35,inputUpdateMode:j.JGO.OnTheFly,labelTooltip:"At which point the wave start, used to advance or retreat the starting point"}),z=j.Gme.numberGroup({id:"timeFraction",labelValue:"Time Fraction",inputValue:null!==(G=k.timeFraction)&&void 0!==G?G:5,inputUpdateMode:j.JGO.OnTheFly,labelTooltip:"Controls how many items are contained in a full wave"}),Y=j.Gme.numberGroup({id:"roundStep",labelValue:"Round Step",inputValue:null!==($=k.roundStep)&&void 0!==$?$:10,inputUpdateMode:j.JGO.OnTheFly,labelTooltip:"Snap to positions following this gap"}),Q=j.XRp.createVertical([W,q,K],{title:"Wave Length Configs",isContainer:!0,startCollapsed:!1}),X=j.XRp.createVertical([z,Y],{title:"Position Fine Tuning",isContainer:!0,startCollapsed:!1});return j.XRp.createVertical([H,V,Q,X],{title:"Wave Function Configs",startCollapsed:!1,isContainer:!0})}gridLayout(k){const B=j.Gme.numberGroup({id:"fixedRowCount",labelValue:"fixedRowCount",inputValue:k.fixedRowCount}),U=j.Gme.numberGroup({id:"fixedColumnCount",labelValue:"fixedColumnCount",inputValue:k.fixedColumnCount}),F=j.Gme.checkboxGroup({id:"dynamicRowHeight",labelValue:"dynamicRowHeight",inputValue:k.dynamicRowHeight}),G=j.Gme.checkboxGroup({id:"dynamicColumnWidth",labelValue:"dynamicColumnWidth",inputValue:k.dynamicColumnWidth}),$=j.Gme.numberGroup({id:"rowSpacing",labelValue:"rowSpacing",inputValue:k.rowSpacing}),H=j.Gme.numberGroup({id:"columnSpacing",labelValue:"columnSpacing",inputValue:k.columnSpacing}),V=j.Gme.numberGroup({id:"xPositionOffset",labelValue:"xPositionOffset",inputValue:k.xPositionOffset}),W=j.Gme.numberGroup({id:"yPositionOffset",labelValue:"yPositionOffset",inputValue:k.yPositionOffset}),q=j.Gme.numberGroup({id:"alignmentAnchorX",labelValue:"alignmentAnchorX",inputValue:k.alignmentAnchorX}),K=j.Gme.numberGroup({id:"alignmentAnchorY",labelValue:"alignmentAnchorY",inputValue:k.alignmentAnchorY}),z=j.Gme.enumGroup({id:"fillPriority",labelValue:"Fill Priority",selectValue:k.fillPriority},it),Y=j.Gme.checkboxGroup({id:"reverseFillRow",labelValue:"reverseFillRow",inputValue:k.reverseFillRow}),Q=j.Gme.checkboxGroup({id:"reverseFillColumn",labelValue:"reverseFillColumn",inputValue:k.reverseFillColumn}),X=j.Gme.numberGroup({id:"indexOffset",labelValue:"indexOffset",inputValue:k.indexOffset}),Z=j.NyS.create({id:"onUpdated",label:"On Updated",signalValue:k.onUpdated,componentGUID:this._componentGuid}),J=j.Gme.enumGroup({id:"lastLineAlignment",labelValue:"Last Line Alignment",selectValue:k.lastLineAlignment},j.DEw);return j.XRp.createVertical([B,U,F,G,$,H,V,W,q,K,z,Y,Q,X,Z,J],{title:"Grid Layout Configs",startCollapsed:!1,isContainer:!0})}}let at=class extends j.PEP{constructor(){super(...arguments),this.amplitude=50,this.frequency=1.1,this.phase=5.35,this.timeFraction=5,this.roundStep=10,this._yCache=[],this._yCacheI=0,this.applyForY=!0,this.avoidDuplicatePositions=!1,this._fixedRowCount=0,this._fixedColumnCount=0,this._dynamicRowHeight=!1,this._dynamicColumnWidth=!1,this._rowSpacing=0,this._columnSpacing=0,this._xPositionOffset=0,this._yPositionOffset=0,this._alignmentAnchorX=0,this._alignmentAnchorY=0,this._fillPriority=it.Horizontal,this._reverseFillRow=!1,this._reverseFillColumn=!1,this._indexOffset=0,this.onUpdated=new j.HN0,this._lastLineAlignment=j.DEw.Start}get fixedRowCount(){return this._fixedRowCount}get fixedColumnCount(){return this._fixedColumnCount}get dynamicRowHeight(){return this._dynamicRowHeight}get dynamicColumnWidth(){return this._dynamicColumnWidth}get rowSpacing(){return this._rowSpacing}get columnSpacing(){return this._columnSpacing}get xPositionOffset(){return this._xPositionOffset}get yPositionOffset(){return this._yPositionOffset}get alignmentAnchorX(){return this._alignmentAnchorX}get alignmentAnchorY(){return this._alignmentAnchorY}get fillPriority(){return this._fillPriority}get indexOffset(){return this._indexOffset}set indexOffset(k){this._indexOffset=k}postDeserialize(){super.postDeserialize(),this._fixedRowCount<1&&this._fixedColumnCount<1?(j.VyI.log("At least one direction in grid needs to be a fixed size",j.$bb.Error),this._fixedRowCount=1,this._fixedColumnCount=1):this._fixedRowCount<1&&this._fixedColumnCount>=1?(this._fillPriority=it.Horizontal,this._reverseFillRow=!1):this._fixedRowCount>=1&&this._fixedColumnCount<1&&(this._fillPriority=it.Vertical,this._reverseFillColumn=!1)}destroy(){this.onUpdated.dispose(),super.destroy()}setFixedColumnCount(k){this._fixedColumnCount=k,this.updateAll()}setFixedRowCount(k){this._fixedRowCount=k,this.updateAll()}setXOffset(k){this._xPositionOffset=k,this.updateAll()}setYOffset(k){this._yPositionOffset=k,this.updateAll()}waveFunction(k){const B=this.getColumn(k);let U=this.amplitude*Math.sin(2*Math.PI*this.frequency*(B/this.timeFraction)+this.phase);return U=j.cj9.snapTo(U,this.roundStep),U}getLayoutPositionX(k){const B=this.getColumn(k+this._indexOffset),U=this.getTotalCellCount(),F=this.getGameObjectList().length;if(this.fillPriority===it.Vertical||1===this.getColumnCount()||this._dynamicColumnWidth||F===U||k+this._indexOffset=1&&(B=this._fixedRowCount-1-B),B}getColumn(k){let B;return B=this._fillPriority===it.Horizontal?k%this._fixedColumnCount:Math.floor(k/this._fixedRowCount),this._reverseFillColumn&&this._fixedColumnCount>=1&&(B=this._fixedColumnCount-1-B),B}getRowCount(){const k=this.getGameObjectList().length+this._indexOffset;return this._fillPriority===it.Horizontal?Math.ceil(k/this._fixedColumnCount):Math.min(k,this._fixedRowCount)}getColumnCount(){const k=this.getGameObjectList().length+this._indexOffset;return this._fillPriority===it.Horizontal?Math.min(k,this._fixedColumnCount):Math.ceil(k/this._fixedRowCount)}getTotalCellCount(){if(this._fixedRowCount>0&&this._fixedColumnCount>0)return this._fixedRowCount*this._fixedColumnCount}isFilled(){return this._fixedRowCount>=1&&this._fixedColumnCount>=1&&this.getGameObjectList().length>=this._fixedRowCount*this._fixedColumnCount}isEmpty(){return this.getGameObjectList().length<=0}setRowSpacing(k){this._rowSpacing=k,this.updateAll()}setColumnSpacing(k){this._columnSpacing=k,this.updateAll()}updateAll(k=!0){const B=this.updateCachedDimensions();super.updateAll(k),this.onUpdated.dispatch(B)}updateCachedDimensions(){this._yCache.length=0,this._yCacheI=0;const k=Math.max(1,this.getRowCount()),B=Math.max(1,this.getColumnCount()),U=new Array(k).fill(0),F=new Array(B).fill(0),G=this.getGameObjectList();for(let V=G.length-1;V>=0;--V){const k=this.getRow(V),B=this.getColumn(V),$=G[V],H=j.Htv.getWidth($),W=j.Htv.getHeight($);U[k]=Math.max(U[k],W),F[B]=Math.max(F[B],H)}this._cachedColumnX=new Array(B),this._cachedRowY=new Array(k);let $=this._xPositionOffset,H=this._yPositionOffset;for(let j=0;jArray($).fill(1))),this._tileSize=U.getTileDimensions().width>>1;const W=U.getLayers().filter((k=>{var B,U;return!j.Aq$.isDefined(null===(B=k.properties)||void 0===B?void 0:B.isAbove)&&!j.Aq$.isDefined(null===(U=k.properties)||void 0===U?void 0:U.reference)}));for(const k of W){if(!Array.isArray(k.data))continue;const j=null!==(B=ct.get(k,"properties.toggle"))&&void 0!==B?B:ct.get(k,"properties.dynamicToggle",-1);let W=V.get(j);W||V.set(j,W=Array(H).fill(void 0).map((()=>Array($).fill(1)))),k.data.forEach(((k,B)=>{const j=this.getTileCollisionString(U,F,k);if(j)for(let U=0;U<4;++U){const k=parseInt(j[U]);if(1===k||6===k){const F=B%G.width,j=Math.floor(B/G.width);W[(j<<1)+(1&U)][(F<<1)+(U>>1)]=1===k?0:k}}}))}return this._collisionDataByGroup=V,this.buildFinalCollisionData(),this._finalCollisionData}))}setToggleGroupVisibility(k,B){B?this._disabledGroups.delete(k):this._disabledGroups.add(k),this._finalCollisionData&&this.buildFinalCollisionData()}loadMap(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=tt.q.instance.game;let U=B.cache.getJSON(k);if(U)return new j.i4g(U);const F=tt.q.instance.prodigy;if(yield F.load.assetsAsPromise(k),U=B.cache.getJSON(k),U)return new j.i4g(U);throw new Error(`Failed to load map data for "${k}"`)}))}getTileCollisionString(k,B,U){var F,G,$;const H=k.getTilesetForTile(U);if(!H)return null;const V=B.getTilesets().find((k=>k.name===H.name&&k.tileproperties));if(!V)return null;const W=(U&~j.DXe.all)-(null!==(F=H.firstgid)&&void 0!==F?F:0),q=null===($=null===(G=V.tileproperties)||void 0===G?void 0:G[W])||void 0===$?void 0:$.x;if(!q)return null;const K=0!=(U&j.DXe.flippedHorizontally),z=0!=(U&j.DXe.flippedVertically);let Y=q;if(0!=(U&j.DXe.flippedDiagonally)){if(Y=this.transformCollisionString(q,[3,1,2,0]),K)return this.transformCollisionString(q,[2,3,0,1]);if(z)return this.transformCollisionString(q,[1,0,3,2])}else{if(K)return this.transformCollisionString(q,[1,0,3,2]);if(z)return this.transformCollisionString(q,[2,3,0,1])}return Y}transformCollisionString(k,B){return B.map((B=>k[B])).join("")}buildFinalCollisionData(){(0,ut.v)(this._finalCollisionData,"Final collision data not initialized"),this._finalCollisionData.forEach((k=>k.fill(1)));for(const[k,B]of Array.from(this._collisionDataByGroup.entries()))if(!this._disabledGroups.has(k))for(let U=0;UYt.t.getCategoryItems(k).map((k=>{var B,U;return{label:`${(k?Qt.J.getItemName(k):"Unknown")||"Unknown"} (${null!==(B=null==k?void 0:k.ID)&&void 0!==B?B:"?"})`,value:String(null!==(U=null==k?void 0:k.ID)&&void 0!==U?U:"")}})).filter((k=>!!k.value)).sort(((k,B)=>Number(k.value)-Number(B.value)))}!function(k){k[k.Button=0]="Button",k[k.Toggle=1]="Toggle",k[k.InputButton=2]="InputButton",k[k.Info=3]="Info",k[k.InfoWithCopyButton=4]="InfoWithCopyButton",k[k.DropdownInput=5]="DropdownInput"}(jt||(jt={})),function(k){k.MapInfo="Map Info",k.Battle="Battle",k.Economy="Economy",k.Menus="Menus",k.Game="Game",k.Warps="Warps",k.Misc="Misc",k.Inventory="Inventory",k.Pets="Pets",k.Campaign="Campaign",k.Feature="Feature",k.Key="Key",k.General="General",k.GrowthbookFeatures="GrowthbookFeatures",k.WizardDash="WizardDash",k.DailyLogin="DailyLogin",k.PrefabScenes="PrefabScenes",k.DarkTower="Dark Tower",k.Rifts="Rifts",k.Encounters="Encounters",k.WizardCostumes="WizardCostumes",k.HudAttention="HUD Attention",k.RegularZones="Regular Zones",k.HardZones="Hard Zones",k.ExpertZones="Expert Zones",k.BattleUnits="Battle Units"}($t||($t={})),function(k){k.DebugMenuGoToCategory="debugMenu.goToCategory",k.DebugMenuFilterGrowthbookFeatures="debugMenu.filterGrowthbookFeatures",k.ToggleDebugMenu="toggleDebugMenu",k.Answer="answer",k.Snow="snow",k.OpenOptionsMenu="openOptionsMenu",k.CloseMenus="closeMenus",k.GetGold="getGold",k.GetCurrency="getCurrency",k.GetEpic="getEpic",k.GetSpell="getSpell",k.EasyMode="easyMode",k.HardMode="hardMode",k.KillGore="killGore",k.PreventDefeatHomeTeam="battleRevamp.preventDefeat",k.PreventDefeatEnemyTeam="battleRevamp.preventDefeat",k.BattleUnitOverrideDodge="battleRevamp.overrideUnitDodgeChance",k.BattleUnitSetHealth="battleRevamp.setUnitHealth",k.BattleSetTeamHealth="battleRevamp.setTeamHealth",k.GrabBag="grabBag",k.MaintainAspectRatio="maintainAspectRatio",k.Player="player",k.ScaleEncounterDistance="scaleEncounterDistance",k.DisableBlockingEncounters="encounters.disableBlockingEncounters",k.ResetCooldowns="encounters.resetCooldowns",k.ResetAllUniqueEncounters="encounters.resetAllUniqueEncounters",k.ResetUniqueEncountersForMap="encounters.resetUniqueEncountersForMap",k.ResetUniqueEncountersForZone="encounters.resetUniqueEncountersForZone",k.SetEnemyAccuracy="setEnemyAccuracy",k.SetGameSpeed="setGameSpeed",k.SetLevel="setLevel",k.SetMorphDuration="setMorphDuration",k.SetMembership="setMembership",k.GetMembership="getMembership",k.OpenFirstNameSelector="openFirstNameSelector",k.OpenWizardNameSelector="openWizardNameSelector",k.OpenPlayer="openPlayer",k.OpenPlayerInToolbox="openPlayerInToolbox",k.ResetAccount="resetAccount",k.ShowFpsGraph="showFpsGraph",k.EnableSkynet="enableSkynet",k.DisableSkynet="disableSkynet",k.Tp="tp",k.WarpTour="warpTour",k.CancelWarpTour="cancelWarpTour",k.PrintMousePositionOnClick="printMousePositionOnClick",k.SetGameConstant="setGameConstant",k.SetFeatureFlag="setFeatureFlag",k.RenderPrefab="renderPrefab",k.WarpMode="enableWarpMode",k.JSError="jsError",k.GetPet="getPet",k.GetPets="getPets",k.SetTriggerAreaVisibility="setTriggerAreaVisibility",k.ShowAreaEvents="showAreaEvents",k.ShowCollisions="showCollisions",k.EnablePlayerCards="enablePlayerCards",k.SetRespawnTime="setRespawnTime",k.OpenStore="openStore",k.BattleRevampKillGore="battleRevamp.killGore",k.CompleteTutorial="completeTutorial",k.UnlockAcademy="unlockAcademy",k.GetAllKeystones="getAllKeystones",k.ResetAllKeystones="resetAllKeystones",k.SetEndgameQuestStep="setQuestStep",k.GetLastKeystone="getLastKeystone",k.ResetBreadcrumbFeature="resetBreadcrumbFeature",k.ResetPrizeWheelSpins="resetPrizeWheelSpins",k.ShowDialogueDebug="showDialogueDebug",k.ShowImage="showImage",k.SetUnlimitedWheelSpins="setUnlimitedWheelSpins",k.SetDebugSubject="setDebugSubject",k.EnableTimeOverride="enableTimeOverride",k.ReenterWorld="reenterWorld",k.GetItemType="getItemType",k.GetAllUnownedPetGear="getAllUnownedPetGear",k.ClearResolvedOffers="clearResolvedOffers",k.SetPetLevel="setPetLevel",k.SetAllPetLevels="setAllPetLevels",k.GetAllUnownedPets="getAllUnownedPets",k.GetSecureItem="getSecureItem",k.GetSecureItems="getSecureItems",k.GetPetGearItem="getPetGearItem",k.AddPetSlots="addPetSlots",k.RemoveAllSecureItemsByType="removeAllSecureItemsByType",k.RemoveAllPets="removeAllPets",k.StartQuickQuiz="quickQuiz.quickStart",k.EndQuickQuiz="quickQuiz.endLast",k.EndAllQuickQuizzesForPlayer="quickQuiz.endAllForThisPlayer",k.UsePrefabScenes="usePrefabScenes",k.SetDlcTaskCollectTo="dlc.setDLCTaskCollectImmediate",k.GetRiftsKeys="getRiftsKeys",k.GetRiftsStoreCurrency="getRiftsStoreCurrency",k.ToggleInputAreas="toggleInputAreaPreview",k.EditStatusEffects="battleRevamp.editStatusEffects",k.BurnMagicoin="burnMagicoin",k.GoToDarkTowerFloor="tpTowerFloor",k.StartBattle="startBattle",k.CopyBattleToClipboard="copyBattleToClipboard",k.OpenWindow="window.open",k.ClaimAllowance="claimAllowance",k.SetLocale="locale.set",k.SkipPostBattleVideos="skipPostBattleVideos",k.UseDebugSegmentLogger="useDebugSegmentLogger",k.EnableOutfitDebugMenu="enableOutfitDebugMenu",k.GrantCostumeItem="wizardCostumes.grantCostumeItem",k.GrantAllCostumeItems="wizardCostumes.grantAllCostumeItems",k.OpenWizardCostumesMenu="wizardCostumes.openWizardCostumesMenu",k.OpenWizardCostumesFtuePopup="wizardCostumes.openWizardCostumesFtuePopup",k.ResetViewedCostumes="wizardCostumes.resetViewedCostumes",k.ResetViewedCostumesTutorial="wizardCostumes.resetViewedTutorial",k.ResetWizardCostumesFtue="wizardCostumes.resetWizardCostumesFtue",k.RenderCostumeById="wizardCostumes.renderCostumeById",k.CreateEquippedGearItemCard="wizardCostumes.createEquippedGearItemCard",k.GetCurrentCostumePoolData="wizardCostumes.getCurrentCostumePoolData",k.ForceHighlightHudButton="hudAttention.forceHighlight",k.ResetHudButtonCooldown="hudAttention.resetCooldown",k.SetWasMemberLastSession="setWasMemberLastSession"}(Ht||(Ht={}));const Zt=[{type:jt.Button,command:Ht.EnableTimeOverride,title:"Enable Time Override",description:"Opens the time override menu",closeMenu:!0},{type:jt.InputButton,command:Ht.SetLocale,title:"Set Locale",description:`Sets the game locale (${Object.values(It.s).map((k=>`"${k}"`)).join(", ")}). Use "en-pseudo" for pseudo-translation.`,args:{args:["en-us"],inputIdx:0},closeMenu:!1},{type:jt.Button,command:Ht.ReenterWorld,title:"Reload World",description:"Loads the initial scene again",closeMenu:!0},{type:jt.Button,command:Ht.Answer,title:"Open QI",description:"Opens up an education content question.",closeMenu:!0},{type:jt.Button,command:Ht.CloseMenus,title:"Close Menus",description:"Close all Menus"},{type:jt.Button,command:Ht.OpenPlayerInToolbox,title:"Toolbox",description:"Opens player data in toolbox"},{type:jt.Button,command:Ht.ResetAccount,title:"Reset Account",description:"Resets the account, wiping all game data",closeMenu:!0,buttonOptions:{text:"Reset",type:Pt.vX.Ruby,icon:Pt.XN.Close}}],Jt=[{type:jt.Button,command:Ht.ResetHudButtonCooldown,title:"Reset Shop Cooldown",description:"Resets the cooldown for Shop HUD button attention",args:{args:["Shop"]}},{type:jt.Button,command:Ht.ResetHudButtonCooldown,title:"Reset Treasure Track Cooldown",description:"Resets the cooldown for Treasure Track HUD button attention",args:{args:["TreasureTrack"]}},{type:jt.Button,command:Ht.ResetHudButtonCooldown,title:"Reset Festival Cooldown",description:"Resets the cooldown for Festival HUD button attention",args:{args:["Festival"]}},{type:jt.Button,command:Ht.ResetHudButtonCooldown,title:"Reset StateChallenges Cooldown",description:"Resets the cooldown for StateChallenges HUD button attention",args:{args:["StateChallenges"]}},{type:jt.Button,command:Ht.ResetHudButtonCooldown,title:"Reset AfterSchoolWidget Cooldown",description:"Resets the cooldown for AfterSchoolWidget HUD button attention",args:{args:["AfterSchoolWidget"]}},{type:jt.Button,command:Ht.ForceHighlightHudButton,title:"Highlight Treasure Track",description:"Force highlights the Treasure Track HUD button",args:{args:["TreasureTrack"]}},{type:jt.Button,command:Ht.ForceHighlightHudButton,title:"Highlight Festival Button",description:"Force highlights the Festival HUD button",args:{args:["Festival"]}},{type:jt.Button,command:Ht.ForceHighlightHudButton,title:"Highlight StateChallenges Button",description:"Force highlights the StateChallenges HUD button",args:{args:["StateChallenges"]}},{type:jt.Button,command:Ht.ForceHighlightHudButton,title:"Highlight AfterSchoolWidget Button",description:"Force highlights the AfterSchoolWidget HUD button",args:{args:["AfterSchoolWidget"]}}],te=[{category:$t.WizardDash,data:[{type:jt.InputButton,command:Ht.StartQuickQuiz,title:"StartQuickQuiz",description:"Starts a debug Quick Quiz with optional id prefix",args:{args:["id"],inputIdx:0},closeMenu:!0},{type:jt.Button,command:Ht.EndQuickQuiz,title:"End QuickQuiz",description:"Ends the last debug Quick Quiz created this session",closeMenu:!0},{type:jt.Button,command:Ht.EndAllQuickQuizzesForPlayer,title:"End All Quick Quizzes",description:"Ends all debug Quick Quizzes for this player",closeMenu:!0}]},{category:$t.DailyLogin,data:[{type:jt.Button,command:Ht.SetDlcTaskCollectTo,title:"DLC Reward",description:"Immediately sets the next DLC reward to ready to collect",closeMenu:!0}]},{category:$t.PrefabScenes,data:[{type:jt.Toggle,command:Ht.UsePrefabScenes,title:"Use Prefab Scenes",description:"Toggles whether to use prefab scenes",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>zt.D.isFeatureEnabled()}]},{category:$t.DarkTower,data:[{type:jt.Button,command:Ht.Tp,title:"Go to Lobby",description:"Teleports to the Dark Tower lobby",args:{args:["darktower-A1"]},closeMenu:!0},{type:jt.InputButton,command:Ht.GoToDarkTowerFloor,title:"Go to Floor",description:"Teleports to a specified floor (1-100)",args:{args:[100],inputIdx:0,useArgsValueAsDefault:!0},closeMenu:!0}]},{category:$t.Rifts,data:[{type:jt.InputButton,command:Ht.GetRiftsKeys,title:"Add Portal 1 Keys",description:"Enter the amount of rifts keys for portal 1 to gain",args:{args:[Vt.ni.Portal1,3],inputIdx:1,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetRiftsKeys,title:"Add Portal 2 Keys",description:"Enter the amount of rifts keys for portal 2 to gain",args:{args:[Vt.ni.Portal2,3],inputIdx:1,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetRiftsKeys,title:"Add Portal 3 Keys",description:"Enter the amount of rifts keys for portal 3 to gain",args:{args:[Vt.ni.Portal3,3],inputIdx:1,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetRiftsStoreCurrency,title:"Add Portal 1 Currency",description:"Enter the amount of rifts store currency for portal 1 to gain",args:{args:[28,Vt.ni.Portal1,100],inputIdx:2,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetRiftsStoreCurrency,title:"Add Portal 2 Currency",description:"Enter the amount of rifts store currency for portal 2 to gain",args:{args:[29,Vt.ni.Portal2,100],inputIdx:2,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetRiftsStoreCurrency,title:"Add Portal 3 Currency",description:"Enter the amount of rifts store currency for portal 3 to gain",args:{args:[30,Vt.ni.Portal3,100],inputIdx:2,useArgsValueAsDefault:!0}}]},{category:$t.WizardCostumes,data:[{type:jt.Button,command:Ht.OpenWizardCostumesMenu,title:"Open Wizard Costumes Menu",description:"Open the Wizard Costumes menu",closeMenu:!0},{type:jt.Button,command:Ht.OpenWizardCostumesFtuePopup,title:"Open FTUE Popup",description:"Open the Wizard Costumes FTUE popup",closeMenu:!0},{type:jt.InputButton,command:Ht.GrantCostumeItem,title:"Get Costume Item",description:"Grant a costume item by Id",args:{args:[1],inputIdx:0,useArgsValueAsDefault:!0}},{type:jt.Button,command:Ht.GrantAllCostumeItems,title:"Get All Costumes",description:"Grants all costume items to the player"},{type:jt.Button,command:Ht.RemoveAllSecureItemsByType,title:"Remove All Costumes",description:"Removes all costume inventory items from the player",args:{args:["costume"]},buttonOptions:{type:Pt.vX.Ruby,icon:Pt.XN.Close,text:""}},{type:jt.Button,command:Ht.ResetViewedCostumes,title:"Reset Viewed Costumes",description:"Reset the viewed costumes list so all costumes appear as new"},{type:jt.Button,command:Ht.ResetViewedCostumesTutorial,title:"Reset Video Viewed",description:"Reset the costumes video so it will auto-play when the menu is opened"},{type:jt.Button,command:Ht.ResetWizardCostumesFtue,title:"Reset Costumes FTUE",description:"Reset the wizard costumes FTUE so it will trigger again"},{type:jt.InputButton,command:Ht.RenderCostumeById,title:"Render Costume by Id",description:"Renders a costume on the item card by Id",args:{args:[1],inputIdx:0,useArgsValueAsDefault:!0}},{type:jt.Button,command:Ht.CreateEquippedGearItemCard,title:"Create Equipped Gear Item Card",description:"Creates an equipped gear item card"},{type:jt.Button,command:Ht.GetCurrentCostumePoolData,title:"Get Costume Pool Data",description:"Logs the current active costume pool data to the console"}]},{category:$t.HudAttention,data:Jt}],ee=[{type:jt.Button,command:Ht.UseDebugSegmentLogger,title:"Segment Logger",description:"Logs segment events to the console"},{type:jt.Button,command:Ht.ShowFpsGraph,title:"Toggle FPS Graph",description:""},{type:jt.Button,command:Ht.PrintMousePositionOnClick,title:"Log Mouse Position",description:"Prints mouse position on click"},{type:jt.Button,command:Ht.MaintainAspectRatio,title:"Aspect Ratio",description:"Sets the game window to 16:9"},{type:jt.InputButton,command:Ht.SetGameSpeed,title:"Game Speed",description:"Enter the game speed.",args:{args:[1],inputIdx:0,useArgsValueAsDefault:!0}},{type:jt.Button,command:Ht.EnableSkynet,title:"Enable Skynet",args:{args:[.5,50]},description:"Begins spawning fake players into the scene until there are 50 fake players"},{type:jt.Button,command:Ht.DisableSkynet,title:"Disable Skynet",description:"Stops spawning fake players into the scene, and clear any fake players"},{type:jt.Toggle,command:Ht.ShowCollisions,title:"Show Collisions",description:"Toggles the visibility of collision boxes. Warning: If you try to open a menu with this active there will be issues.",args:{selectedArgs:[!0],unselectedArgs:[!1]},closeMenu:!0,disableMenuToggle:!0},{type:jt.Toggle,command:Ht.ToggleInputAreas,title:"Toggle Input Preview",description:"Toggles the preview of the instantiated input areas",args:{selectedArgs:[!0],unselectedArgs:[!1]}},{type:jt.Toggle,command:Ht.EnablePlayerCards,title:"Toggle hiding player cards",description:"Toggle hiding the player cards",args:{selectedArgs:[!1],unselectedArgs:[!0]}},{type:jt.InputButton,command:Ht.SetRespawnTime,title:"Respawn Time",description:"Sets the respawn time for monsters in seconds.",args:{args:[120],inputIdx:0,useArgsValueAsDefault:!0}},{type:jt.Toggle,command:Ht.ShowAreaEvents,title:"Show Area Events",description:"Toggles the visibility of area events",args:{selectedArgs:[!0],unselectedArgs:[!1]}},{type:jt.Toggle,command:Ht.SetGameConstant,title:"Inactivity Timer",description:"Toggles between 10s and the default (25 mins)",args:{selectedArgs:["GameConstants.Inactivity.DIALOG_TIMER_SECONDS",10],unselectedArgs:["GameConstants.Inactivity.DIALOG_TIMER_SECONDS",1500]}},{type:jt.Toggle,command:Ht.SetTriggerAreaVisibility,title:"Show Trigger Areas",description:"Toggles the visibility of trigger areas",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>Kt.s.get("GameConstants.Build.DRAW_TRIGGERS")}],ie=[{type:jt.InputButton,command:Ht.StartBattle,title:"Start Battle",description:"Enter as 1 or 1,2,3. PetIds-first box, then levels then merge rank.",args:{args:[[1,2,3],[0,0,0],[0,0,0]],inputIdx:[0,1,2],useArgsValueAsDefault:!0},closeMenu:!0}],se=[{type:jt.Button,command:Ht.CopyBattleToClipboard,title:"Copy Battle Command",description:"Copies startBattle debug command to clipboard for the current battle",buttonOptions:{text:"Copy",type:Pt.vX.Sapphire,icon:Pt.XN.Info}},{type:jt.Button,command:Ht.EditStatusEffects,title:"Edit Status Effects",description:"Opens the debug menu to add and remove status effects",closeMenu:!0,buttonOptions:{text:"Open",type:Pt.vX.Sapphire},feature:Wt.P},{type:jt.InputButton,command:Ht.BattleSetTeamHealth,title:"Set Home Health",description:"Sets the health of all home team units to the entered value",args:{args:["home",100],inputIdx:1,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.BattleSetTeamHealth,title:"Set Enemy Health",description:"Sets the health of all enemy team units to the entered value",args:{args:["enemy",100],inputIdx:1,useArgsValueAsDefault:!0}}],ne=[{type:jt.InputButton,command:Ht.Tp,title:"Warp",description:"Warp to the entered location",args:{args:[Ft.A_.HOUSE],inputIdx:0,useArgsValueAsDefault:!0},closeMenu:!0},{type:jt.InputButton,command:Ht.WarpTour,title:"Warp Tour",description:"Warp to all maps! Enter the delay between warps, and the zone to warp to (leave blank for all zones)",args:{args:[2,"all zones"],inputIdx:[0,1],useArgsValueAsDefault:!0},closeMenu:!0},{type:jt.Button,command:Ht.CancelWarpTour,title:"Cancel Warp Tour",description:"Cancel an ongoing warp tour",closeMenu:!0},{type:jt.Toggle,command:Ht.WarpMode,title:"Warp Mode",description:"Toggles between walking and warping in the map",args:{selectedArgs:[!0],unselectedArgs:[!1]}}],ae=[{type:jt.InputButton,command:Ht.GetGold,title:"Gold",description:"Enter the amount to gain",args:{args:[1e3],inputIdx:0,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetSecureItem,title:"Magicoin",description:"Enter the amount to gain",args:{args:["currency",27,1e3],inputIdx:2,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.BurnMagicoin,title:"Burn Magicoin",description:"Enter the amount to lose",args:{args:[1e3],inputIdx:0,useArgsValueAsDefault:!0}},{type:jt.Button,command:Ht.ClearResolvedOffers,title:"Clear Resolved Offers",description:"Clears seen segmented upsell offers so they can appear again"},{type:jt.InputButton,command:Ht.GetCurrency,title:"Hot-Hots",description:"Enter the amount to gain",args:{args:[12,1e3],inputIdx:1,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetCurrency,title:"Florans",description:"Enter the amount to gain",args:{args:[13,1e3],inputIdx:1,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetCurrency,title:"Yars",description:"Enter the amount to gain",args:{args:[14,1e3],inputIdx:1,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetCurrency,title:"Shivers",description:"Enter the amount to gain",args:{args:[15,1e3],inputIdx:1,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetCurrency,title:"Aeros",description:"Enter the amount to gain",args:{args:[16,1e3],inputIdx:1,useArgsValueAsDefault:!0}},{type:jt.Button,command:Ht.ResetPrizeWheelSpins,title:"Reset Wheel Spins",description:"Resets the prize wheel so you can spin again"},{type:jt.Toggle,command:Ht.SetUnlimitedWheelSpins,title:"Unlimited Wheel Spins",description:"Allows for unlimited wheel spins",args:{selectedArgs:[!0],unselectedArgs:[!1]}},{type:jt.InputButton,command:Ht.ClaimAllowance,title:"Claim Monthly Allowance",description:"Valid options: ultra, plus, core, non_member",args:{args:["ultra"],inputIdx:0,useArgsValueAsDefault:!0},feature:qt.d}],re=[{type:jt.Toggle,command:Ht.ScaleEncounterDistance,title:"Disable Regular Encounters",description:"Toggles whether regular encounters can trigger",args:{selectedArgs:[0],unselectedArgs:[1]},initialValue:()=>0===Kt.s.get("GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE")},{type:jt.Toggle,command:Ht.DisableBlockingEncounters,title:"Disable Blocking Encounters",description:"Toggles whether cloaked wizards block map exits",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>Kt.s.get("GameConstants.Debug.DISABLE_BLOCKING_ENCOUNTERS")},{type:jt.Toggle,command:Ht.SetTriggerAreaVisibility,title:"Show Trigger Areas",description:"Toggles the visibility of trigger areas",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>Kt.s.get("GameConstants.Build.DRAW_TRIGGERS")},{type:jt.Button,command:Ht.ResetCooldowns,title:"Reset Cooldowns",description:"Resets all active encounter cooldowns",closeMenu:!0},{type:jt.Button,command:Ht.ResetAllUniqueEncounters,title:"Reset All Unique Encounters",description:"Reset defeated unique encounters. Cause all unique encounters in the game to respawn.",closeMenu:!0},{type:jt.Button,command:Ht.ResetUniqueEncountersForZone,title:"Reset Uniques for this Zone",description:"Reset defeated unique encounters in this zone only.",closeMenu:!0},{type:jt.Button,command:Ht.ResetUniqueEncountersForMap,title:"Reset Uniques for this Map",description:"Reset defeated unique encounters on this map only.",closeMenu:!0}],oe=[{category:$t.Encounters,data:re},{type:jt.Toggle,command:Ht.EasyMode,title:"Easy Mode",description:"Turns easy mode on, all answers are correct",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>{var k;return!1===(null===(k=Kt.s.get("GameConstants.Debug.EDUCATION_ENABLED"))||void 0===k||k)}},{type:jt.Toggle,command:Ht.HardMode,title:"Hard Mode",description:"Turns hard mode on, all answers are incorrect",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>0===Kt.s.get("GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT")},{type:jt.Toggle,command:Ht.KillGore,title:"Kill Gore",description:"Spells deal max damage",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>{var k;return!0===(null!==(k=Kt.s.get("GameConstants.Build.KILL_GORE"))&&void 0!==k&&k)}},{type:jt.Toggle,command:Ht.PreventDefeatEnemyTeam,title:"Prevent Defeat (Away)",description:"Prevent enemy team units from being defeated",args:{selectedArgs:[!0,1],unselectedArgs:[!1,1]}},{type:jt.Toggle,command:Ht.PreventDefeatHomeTeam,title:"Prevent Defeat (Home)",description:"Prevent home team units from being defeated",args:{selectedArgs:[!0,0],unselectedArgs:[!1,0]}},{type:jt.Toggle,command:Ht.SetEnemyAccuracy,title:"Toggle Enemy Accuracy",description:"Toggles 100% enemy accuracy",args:{selectedArgs:[!0,1],unselectedArgs:[!1,0]},initialValue:()=>1===Kt.s.get("GameConstants.Battle.ENEMY_ACCURACY_OVERRIDE")},{type:jt.Toggle,command:Ht.SkipPostBattleVideos,title:"Skip Post Battle Videos",description:"Skips videos in post-battle flow",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>{var k;return!0===(null!==(k=Kt.s.get("GameConstants.Battle.SKIP_POST_BATTLE_VIDEOS"))&&void 0!==k&&k)}}],he=[{type:jt.Button,command:Ht.SetMembership,title:"Enable Membership",description:"Grants membership for this session"},{type:jt.Button,command:Ht.EnableOutfitDebugMenu,title:"Outfit Debug Menu",description:"Change screens to create the menu"},{type:jt.Button,command:Ht.GrabBag,title:"Grab Bag",description:"Give the player a random assortment of all items & equipment"},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Item",description:"Pick by name, or type an item id",args:{args:["item",0],inputIdx:1},options:Xt("item")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Buddy",description:"Pick by name, or type a buddy id",args:{args:["follow",0],inputIdx:1},options:Xt("follow")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Mount",description:"Pick by name, or type a mount id",args:{args:["mount",0],inputIdx:1},options:Xt("mount")},{type:jt.DropdownInput,command:Ht.GetSpell,title:"Get Spell",description:"Pick by name, or type a spell id (0 to 52 are safe)",args:{args:[0],inputIdx:0},options:Xt("spell")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Wand",description:"Pick by name, or type a wand id",args:{args:["weapon",0],inputIdx:1},options:Xt("weapon")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Hat",description:"Pick by name, or type a hat id",args:{args:["hat",0],inputIdx:1},options:Xt("hat")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Outfit",description:"Pick by name, or type an outfit id",args:{args:["outfit",0],inputIdx:1},options:Xt("outfit")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Boots",description:"Pick by name, or type a boots id",args:{args:["boots",0],inputIdx:1},options:Xt("boots")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Fossil",description:"Pick by name, or type a fossil id",args:{args:["fossil",0],inputIdx:1},options:Xt("fossil")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Key Item",description:"Pick by name, or type a key item id",args:{args:["key",0],inputIdx:1},options:Xt("key")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Relic",description:"Pick by name, or type a relic id",args:{args:["spellRelic",0],inputIdx:1},options:Xt("spellRelic")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Dorm Item",description:"Pick by name, or type a dorm item id",args:{args:["dorm",0],inputIdx:1},options:Xt("dorm")},{type:jt.InputButton,command:Ht.SetMorphDuration,title:"Set Morph Duration",description:"Set the duration of the morph marbles in minutes",args:{args:[5],inputIdx:0,useArgsValueAsDefault:!0}}],ce=[{type:jt.DropdownInput,command:Ht.GetPets,title:"Get Pets",description:"Pick a pet by name, or type a comma-separated list of pet ids (ex: 100, 13, 290). Leave blank to get a random pet.",args:{args:[""],inputIdx:0},options:Xt("pet")},{type:jt.InputButton,command:Ht.SetAllPetLevels,title:"Set Pet Level",description:"Set the level of all pets in your kennel to the entered value",args:{args:[50],inputIdx:0,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetAllUnownedPets,title:"Get All Unowned Pets",description:"Gets all pets you don't currently have",args:{args:[99]},closeMenu:!0},{type:jt.DropdownInput,command:Ht.RemoveAllPets,title:"Remove Pets",description:"Pick a pet by name, or type a comma-separated list of pet ids (ex: 100, 13, 290). Leave blank to remove all pets.",args:{args:[""],inputIdx:0,useArgsValueAsDefault:!0},options:Xt("pet")},{type:jt.InputButton,command:Ht.GetPetGearItem,title:"Get Pet Hat",description:"Grant a specific pet hat by id",args:{args:["petHat",0],inputIdx:1}},{type:jt.InputButton,command:Ht.GetPetGearItem,title:"Get Pet Relic",description:"Grant a specific pet relic by id",args:{args:["petRelic",0],inputIdx:1}},{type:jt.InputButton,command:Ht.GetAllUnownedPetGear,title:"Get Pet Gear",description:"Gets all pet gear you don't currently have. Restart may be required to view items"}],de=[{type:jt.Button,command:Ht.SetMembership,title:"Enable Membership",description:"Grants membership for this session"},{type:jt.Toggle,command:Ht.SetWasMemberLastSession,title:"Set WasMemberLastSession",description:"Sets the wasMemberLastSession flag in player data",args:{selectedArgs:[!0],unselectedArgs:[!1]}},{type:jt.InputButton,command:Ht.SetLevel,title:"Set Player Level",description:"Set the player level, level will be 1 higher than the number input (ie; 99 will become level 100)",args:{args:[50],inputIdx:0,useArgsValueAsDefault:!0}},{type:jt.Button,command:Ht.CompleteTutorial,title:"Complete Tutorial",description:"Completes the tutorial"},{type:jt.Button,command:Ht.UnlockAcademy,title:"Unlock Academy",description:"Sets the player to level 15 and skips the entering the academy cutscene."},{type:jt.Button,command:Ht.ResetAllKeystones,title:"Reset All Keystones",description:"Resets all keystones"},{type:jt.Button,command:Ht.GetAllKeystones,title:"Get All Keystones",description:"Gives the player all keystones"},{type:jt.Button,command:Ht.GetLastKeystone,title:"Get Last Keystone",description:"Gives the player the last keystone, might affect the Pippet cutscene"},{type:jt.InputButton,command:Ht.ShowDialogueDebug,title:"Show Dialogue",description:"Open the dialogue for a given ID",args:{args:[100],inputIdx:0},closeMenu:!0},{type:jt.InputButton,command:Ht.SetEndgameQuestStep,title:"Endgame Quest Step",description:"Not Started: 0, Keystone Cutscene: 1, Pippet Defeated: 2, Guardians Defeated: 3-7",args:{args:[0],inputIdx:0}},{type:jt.Button,command:Ht.SetEndgameQuestStep,title:"Defeat Puppet Master",description:"Set the endgame quest step to 8, Puppet Master Defeated",args:{args:[8]}},{type:jt.Button,command:Ht.ResetBreadcrumbFeature,title:"Reset Endgame",description:"Resets the endgame Puppet Master quests",args:{args:["FEATURE_ENDGAME_QUEST"]}}],le="UNIT_ID_PLACEHOLDER",ue=[{type:jt.InfoWithCopyButton,title:"Copy unit id",description:le,command:void 0},{type:jt.Toggle,command:Ht.BattleUnitOverrideDodge,title:"Set dodge chance",description:"True=100% dodge, False=0% dodge",args:{selectedArgs:[le,!0],unselectedArgs:[le,!1]}},{type:jt.InputButton,command:Ht.BattleUnitSetHealth,title:"Set Health",description:"Set the unit's health to the entered value",args:{args:[le,100],inputIdx:1,useArgsValueAsDefault:!0}}];var fe=U(97495),be=U(77601);class pe{static setOverrideValue(k,B,U){pe.unitOverrides[k]||(pe.unitOverrides[k]={}),pe.unitOverrides[k][B]=U}static getOverrideValue(k,B){var U;return null===(U=pe.unitOverrides[k])||void 0===U?void 0:U[B]}}pe.unitOverrides={};const ve=[Ft.A_.HOUSE,Ft.A_.EARTHTOWER,Ft.A_.ICETOWER,Ft.A_.STORMTOWER,Ft.A_.FIRETOWER,Ft.A_.WATERTOWER,Ft.A_.ASTRALTOWER,Ft.A_.CRYSTALCAVERNS];class ge{getRootCategories(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=[{category:$t.General,data:this.getGeneralCommands()},{category:$t.Feature,data:this.getFeatureCommands()},{category:$t.Economy,data:ae},{category:$t.Game,data:ee},{category:$t.Battle,data:this.getBattleCommands()},{category:$t.Inventory,data:he},{category:$t.Pets,data:ce},{category:$t.Campaign,data:de},{category:$t.Warps,data:this.getWarpCommands()},{category:$t.MapInfo,data:yield this.getMapInfo()}];return this.checkForDisabledCommands(k),this.filterEmptyCategories(k)}))}static getGrowthbookFeatures(){var k;window.debugMenu.filterGrowthbookFeatures=k=>{window.debugMenu.growthbookFilter=k,ye.reloadViewWithNewData(ge.getGrowthbookFeatures())};const B={type:jt.InputButton,command:Ht.DebugMenuFilterGrowthbookFeatures,title:"Filter features",description:"Type to filter features by name",args:{args:[""],inputIdx:0},buttonOptions:{text:"Search",icon:Pt.XN.Info,type:Pt.vX.Sapphire}},U=null!==(k=window.debugMenu.growthbookFilter)&&void 0!==k?k:"";return[B,...(0,be.y8)().filter((k=>k.toLowerCase().includes(U.toLowerCase()))).map((k=>({type:jt.Button,command:Ht.OpenWindow,args:{args:[`https://growthbook.prv.prodigygame.com/features/${k}`]},title:k,description:"Click to open Growthbook page",buttonOptions:{text:"",icon:Pt.XN.Right,type:Pt.vX.Sapphire},feature:{key:k}})))]}checkForDisabledCommands(k){k.forEach((k=>{"type"in k&&k.feature&&!(0,Bt._)(k.feature)&&(k.type=jt.Button,k.description=`Feature disabled: (${k.feature.key}). Click to open GrowthBook.`,k.buttonOptions={text:"",icon:Pt.XN.Right,type:Pt.vX.Sapphire},k.command=Ht.OpenWindow,k.args={args:[`https://growthbook.prv.prodigygame.com/features/${k.feature.key}`]}),"category"in k&&Array.isArray(k.data)&&this.checkForDisabledCommands(k.data)}))}filterEmptyCategories(k){return k.filter((k=>"type"in k||!(!("category"in k)||!Array.isArray(k.data))&&(k.data=this.filterEmptyCategories(k.data),k.data.length>0)))}getGeneralCommands(){return[...Zt]}getFeatureCommands(){return[{category:$t.GrowthbookFeatures,data:ge.getGrowthbookFeatures()},...te]}getWarpCommands(){var k;const B=ne,U=[],F=null===(k=tt.q.instance)||void 0===k?void 0:k.prodigy.world;return F&&U.push({category:$t.RegularZones,data:this.getZonesCategoryData(F,(k=>k.difficultyMode===fe.i.Regular))},{category:$t.HardZones,data:this.getZonesCategoryData(F,(k=>k.difficultyMode===fe.i.Hard))},{category:$t.ExpertZones,data:this.getZonesCategoryData(F,(k=>k.difficultyMode===fe.i.Expert))}),[...U,...B]}getBattleCommands(){const k=oe;let B;const U=j.wa5.getActiveScene().container.get("BattleController");return B=U?[...se,this.getBattleUnitCommands(U)]:ie,[...B,...k]}getBattleUnitCommands(k){const B=k.getUnits().map((k=>{const B=xt.$.capitalizeFirstLetter(k.data.teamId),U=k.data.unitId,F=k.name,G=`${B} - ${k.data.slot}`,j=[];return ue.forEach((k=>{const B=JSON.parse(xt.$.replaceAll(JSON.stringify(k),le,U)),F=k.command;F&&(B.initialValue=()=>pe.getOverrideValue(U,F)),j.push(B)})),{category:G,data:j,description:`Debug commands for "${F}"`}}));return{category:$t.BattleUnits,data:B,description:"Commands for individual battle units"}}getMapInfo(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,$,H,V,W;const q=[];return q.push({type:jt.InfoWithCopyButton,command:void 0,title:"Current Map",description:tt.q.instance.prodigy.world.getCurrentMap()},{type:jt.Info,command:void 0,title:"Multiplayer room",description:null!==(B=null===(k=j.wa5.getActiveScene().container.get("c5f-aceb"))||void 0===k?void 0:k.multiplayerRoomID)&&void 0!==B?B:"none"},{type:jt.InfoWithCopyButton,command:void 0,title:"Character ID",description:null!==(G=null===(F=null===(U=tt.q.instance.prodigy.gameContainer.get("e20-0fb0"))||void 0===U?void 0:U.player)||void 0===F?void 0:F.getID().toString())&&void 0!==G?G:"No ID found"},{type:jt.Info,command:null,title:"Scene Type",description:(null===($=j.wa5.getActiveScene())||void 0===$?void 0:$.container.get("IS_PREFAB_MAP"))?"Prefab":"Legacy"},{type:jt.Info,command:null,title:"Current Quest",description:null!==(W=yield null===(V=null===(H=j.wa5.getActiveScene())||void 0===H?void 0:H.container.get("a78-11c7"))||void 0===V?void 0:V.getCurrentQuestIDAndSequence())&&void 0!==W?W:"None Found"}),q}))}getZonesCategoryData(k,B=(()=>!0)){return Object.values(k.zones).filter((k=>!ve.includes(k.ID))).filter(B).map((B=>({category:`${B.name} ${B.difficultyMode!==fe.i.Regular?B.difficultyMode:""}`,data:this.getMapCommandsData(B,k)})))}getMapCommandsData(k,B){var U,F;const G=k.ID;return G===Ft.A_.DARKTOWER?null!==(F=null===(U=te.find((k=>k.category===$t.DarkTower)))||void 0===U?void 0:U.data)&&void 0!==F?F:[]:Object.entries(k.maps).map((([k,U])=>{let F=`Go to map ${U.zoneName}`,j=k;return U.zoneName===B.getCurrentMap()&&(j+=" (current)",F="Refresh current map"),{type:jt.Button,command:Ht.Tp,title:j,description:F,args:{args:[`${G}-${k}`]},closeMenu:!0}}))}}var me;let ye=me=class extends j.uAl{constructor(){super(...arguments),this._debugMenuDataProvider=new ge,this._categoryTabComponents=[],this._categoryBreadcrumbs=[]}postCreate(){super.postCreate(),window.debugMenu.goToCategory=(k,B)=>{this.openCategory(k,B)},window.debugMenu.reloadView=k=>{this._scrollViewParent.findComponent(Te).clearCommands(),this.loadCategory(me.LastOpenedCategory,k).catch(j.RQr.createHandler("Error trying to open a prefab in DebugMenu"))},this.openInitialCategory()}static reloadViewWithNewData(k){window.debugMenu.reloadView(k)}createCategoryTabs(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=Rt.l.DebugMenuCategoryTab;for(let k=this._categoryTabParent.children.length-1;k>=0;k--)this._categoryTabParent.children[k].destroy();this._categoryTabComponents.length=0;for(let U=0;Uk.category===me.LastOpenedCategory));-1===B&&(B=0);j.wa5.getActiveScene().container.get("BattleController")&&(B=k.findIndex((k=>k.category===$t.Battle))),this.openCategory(k[B].category,k[B].data)}))}openCategory(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){this.resetCategoryTabs();const U=this._categoryBreadcrumbs.length,F=this._categoryBreadcrumbs.findIndex((B=>B.category===k));F>=0&&this._categoryBreadcrumbs.splice(F);const G=yield this._debugMenuDataProvider.getRootCategories();if(G.some((B=>B.category===k))&&(this._categoryBreadcrumbs.length=0),this._categoryBreadcrumbs.push({category:k,data:B}),U!==this._categoryBreadcrumbs.length&&this.createCategoryTabs(this._categoryBreadcrumbs.length>1?this._categoryBreadcrumbs:G).then((()=>{var B;return null===(B=this._categoryTabComponents.find((B=>B.category===k)))||void 0===B?void 0:B.setSelected(!0)})).catch(j.RQr.createHandler("Error trying to create the category tabs")),!j.Aq$.isDefined(this._currentCategoryObj)||this._currentCategory!==k){if(this._currentCategoryObj){this._currentCategoryObj.findComponent(Te).clearCommands()}this.loadCategory(k,B).catch(j.RQr.createHandler("Error trying to open a prefab in DebugMenu"))}}))}resetCategoryTabs(){for(const k of this._categoryTabComponents)k.setSelected(!1)}loadCategory(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=this._scrollViewParent,F=U.findComponent(Te);yield F.populateCategory(k,B),U.transform.setPosition(0,0),this._currentCategory=k,me.LastOpenedCategory=k,this._currentCategoryObj=U}))}closeDebugMenu(){me.runCloseDebugMenu()}static runCloseDebugMenu(){}};var _e;(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ye.prototype,"_scrollViewParent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ye.prototype,"_categoryTabParent",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],ye.prototype,"_prefabLoader",void 0),ye=me=(0,G.Cg)([(0,j.EVk)("DebugMenuController",W.Y.debug)],ye);let Ee=_e=class extends j.uAl{constructor(){super(...arguments),this._inputParams=[],this._defaultValue=[]}get getInputParams(){return this._inputParams}destroy(){this.destroyDatalist(),this.destroyInputField(),super.destroy()}destroyDatalist(){this._datalistInputParam&&this._datalistInputListener&&(this._datalistInputParam.htmlInputElement.removeEventListener("input",this._datalistInputListener),this._datalistInputParam.htmlInputElement.removeAttribute("list")),this._datalist&&this._datalist.remove(),this._datalist=null,this._datalistInputListener=null,this._datalistInputParam=null}setParent(k){this._parent=k}setInfo(k){var B,U,F;if(this._info=k,this._commandDisabledBackground.active=!1,k.type===jt.Info||k.type===jt.InfoWithCopyButton)return void this.setInfoOnlyDebugFields(k);_e.isButtonArgs(k.args)&&k.args.useArgsValueAsDefault&&(this._defaultValue=dt().cloneDeep(k.args.args)),this.setTitle(k.title),this.setDescription(k.description),this.updateButton(null===(B=k.buttonOptions)||void 0===B?void 0:B.text,null===(U=k.buttonOptions)||void 0===U?void 0:U.type,null===(F=k.buttonOptions)||void 0===F?void 0:F.icon),j.Aq$.isDefined(k.initialValue)&&this.updateState("function"==typeof k.initialValue?k.initialValue():k.initialValue);const G=this.getFunc(this._info.command);G?this.setFunction(G,this._info.args):this.setValid(!1),k.feature&&!(0,Bt._)(k.feature)&&(this._commandDisabledBackground.active=!0)}setInfoOnlyDebugFields(k){this.setTitle(k.title),this.setDescription(k.description),this._commandButton&&(k.type===jt.InfoWithCopyButton?(this._commandButton.onClick.add((()=>{const B=k.description;navigator.clipboard.writeText(B).catch((k=>{j.VyI.log(`Failed to copy debug text: ${String(k)}`,j.$bb.Error)}))})),this.updateButton("Copy",Pt.vX.Sapphire,Pt.XN.Info)):this._commandButton.GameObject.active=!1),this._commandToggle&&(this._commandToggle.GameObject.active=!1),this._inputParams.forEach((k=>{k.GameObject.active=!1}))}getFunc(k){return null==k?void 0:k.split(".").reduce(((k,B)=>k&&k[B]),window)}setTitle(k){this._commandTitle.text=k}setDescription(k){this._commandDescription.text=k}updateButton(k,B,U){j.Aq$.isDefined(this._commandButton)&&(this._commandButton.text=null!=k?k:"Select",this._commandButton.iconPosition=Ut.d.NONE,U&&(this._commandButton.iconPosition=Ut.d.RIGHT,this._commandButton.icon=U),this._commandButton.type=null!=B?B:Pt.vX.Emerald,this._commandButton.regenerateButton())}setFunction(k,B){this._commandButton?(this.setButton(k,B),this._functionValid=!0,0!==this._inputParams.length&&this.setUpInputField()):this._commandToggle&&(this.setToggle(k,B),this._functionValid=!0)}setButton(k,B){this._commandButton.onClick.add((()=>{B?k(...(null==B?void 0:B.args)||[]):k()}))}setToggle(k,B){this._info.title in _e.DebugState&&this._commandToggle.setSelected(_e.DebugState[this._info.title]),B?(this._commandToggle.onSelected.add(k,void 0,void 0,...B.selectedArgs),this._commandToggle.onUnselected.add(k,void 0,void 0,...B.unselectedArgs)):(this._commandToggle.onSelected.add(k),this._commandToggle.onUnselected.add(k))}setValid(k){this._functionValid=k}getNumberOfActiveInputs(){const k=this._info.args;if(!j.Aq$.isDefined(null==k?void 0:k.inputIdx))return 0;return Lt.l.guaranteeArray(k.inputIdx).length}setUpInputField(){const k=this.getNumberOfActiveInputs();this._inputParams.forEach(((B,U)=>{if(U>=k)return void(B.GameObject.active=!1);const F=k-U-1,G=this._info.title+F;G in _e.DebugState&&(B.text=_e.DebugState[G]),B.GameObject.active=!0,B.enablePerKeyEvents(!0),B.onTextChanged.add(this.readInputField,this,void 0,B,F),B.onClear.add(this.readInputField,this,void 0,B,F),this.readInputField(B.text,B,F),this._info.type===jt.DropdownInput&&0===F&&j.Aq$.isDefined(this._info.options)&&this.setUpDatalist(B,F)}))}setUpDatalist(k,B){var U;const F=this._info.options,G="function"==typeof F?F():F;if(!G||0===G.length)return;const j=document.createElement("datalist"),$=this._info.title.replace(/[^a-z0-9]/gi,"-").toLowerCase();j.id=`debug-dropdown-${$}-${B}`,G.forEach((k=>{const B=document.createElement("option");B.value=k.value,B.textContent=k.label,j.appendChild(B)}));(null!==(U=document.getElementById("external-ui"))&&void 0!==U?U:document.body).appendChild(j);const H=k.htmlInputElement;H.setAttribute("list",j.id),this._datalistInputListener=()=>{this.readInputField(H.value,k,B)},H.addEventListener("input",this._datalistInputListener),this._datalist=j,this._datalistInputParam=k}readInputField(k,B,U){var F;const G=k,$=this._info.args;let H;if(!j.Aq$.isDefined($.inputIdx)||"number"!=typeof $.inputIdx&&!Array.isArray($.inputIdx))return;H="number"==typeof $.inputIdx?$.inputIdx:$.inputIdx[U];const V=_e.isInputFieldValueValid(this._info,G,H);this._inputValid=this.isWarp()?this.isWarpValid(V.output):V.valid;const W=!this._inputValid&&""===G&&(null===(F=this._defaultValue)||void 0===F?void 0:F.length)>0;W&&(B.htmlInputElement.placeholder=this._defaultValue[H],this._inputValid=this.isWarp()?this.isWarpValid(this._defaultValue[H]):this._inputValid),this._commandButton.inputEnabled=this._inputValid||W,this._inputValid&&!W&&(this.updateState(V.output,U),$.args[H]=V.output)}static isInputFieldValueValid(k,B,U){const F=k.args;if("string"==typeof F.args[U])return{valid:!0,output:B};if("number"==typeof F.args[U]){const k=parseFloat(B);if(!isNaN(k))return{valid:!0,output:k}}else if(Array.isArray(F.args[U])&&""!==B){const k=B.split(",");if("number"==typeof F.args[U][0]){if(k.some((k=>""===k)))return{valid:!1,output:null};const B=k.map((k=>k.trim())).map(Number);return B.some(isNaN)?{valid:!1,output:null}:{valid:!0,output:B}}if("string"==typeof F.args[U][0]){return{valid:!0,output:k.map((k=>k))}}}return{valid:!1,output:null}}isValid(){const k=this._info.type===jt.InputButton||this._info.type===jt.DropdownInput;return this._functionValid&&(!k||this._inputValid)}isWarp(){return this._parent&&this._parent.getCategory()===$t.Warps&&this._info.command!==Ht.WarpTour}isWarpValid(k){return k===Ft.A_.HOUSE||tt.q.instance.prodigy.world.isValidLocation(k)}destroyInputField(){this._inputParams&&this._inputParams.forEach((k=>{k.destroy()}))}checkOptionalProps(){this._info.disableMenuToggle&&(ye._allowKeystrokeToOpenDebugMenu=!1),this._info.closeMenu&&ye.runCloseDebugMenu()}logPress(){this.isValid()?j.VyI.log(`PRESSED - Running command assigned to ${this._info.title}`,j.$bb.Info):this._functionValid?this._inputValid||j.VyI.log(`${this._info.title} has invalid inputs`,j.$bb.Error):j.VyI.log(`${this._info.title} has no function assigned`,j.$bb.Error),this.isValid()?this.checkOptionalProps():this._defaultValue.length>0&&(j.VyI.log(`${this._info.title} using default values`,j.$bb.Info),this.checkOptionalProps())}logSelected(){this.isValid()?(j.VyI.log(`SELECTED - Running command assigned to ${this._info.title}`,j.$bb.Info),this.updateState(!0)):j.VyI.log(`${this._info.title} has no function assigned`,j.$bb.Error),this.isValid()&&this.checkOptionalProps()}logUnselected(){this.isValid()?(j.VyI.log(`UNSELECTED - Running command assigned to ${this._info.title}`,j.$bb.Info),this.updateState(!1)):j.VyI.log(`${this._info.title} has no function assigned`,j.$bb.Error),this.isValid()&&this.checkOptionalProps()}updateState(k,B=-1){var U;this._commandButton&&(null===(U=this._info.args)||void 0===U?void 0:U.shouldNotPersistInput)||(_e.DebugState[this._info.title+(-1!==B?B:"")]=k)}static isButtonArgs(k){return"object"==typeof k&&null!==k&&Array.isArray(k.args)&&("number"==typeof k.inputIdx||Array.isArray(k.inputIdx))}};var we;Ee.DebugState={},(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ee.prototype,"_commandTitle",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ee.prototype,"_commandDescription",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Ee.prototype,"_commandButton",void 0),(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],Ee.prototype,"_commandToggle",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ee.prototype,"_commandDisabledBackground",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(kt.S),(0,G.Sn)("design:type",Array)],Ee.prototype,"_inputParams",void 0),Ee=_e=(0,G.Cg)([(0,j.EVk)("DebugMenuCommand",W.Y.debug)],Ee);let Te=we=class extends j.uAl{constructor(){super(...arguments),this._commandComponents=[]}getCategory(){return this._category}populateCategory(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){this._category=k,this._commands=B,yield this.createCommandButtons(),this._scrollView.setScrollPosition(0)}))}clearCommands(){for(let k=this._buttonParent.children.length;k--;)this._buttonParent.children[k].destroy();this._commandComponents=[]}destroyInputFields(){for(let k=this._commandComponents.length;k--;)this._commandComponents[k].destroyInputField()}createCommandButtons(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=Rt.l.DebugMenuCommand,B=Rt.l.DebugMenuToggle,U=Rt.l.DebugMenuInputField;let F=0;for(const j of this._commands){const G=yield this.createCommandButton(j,k,B,U);this._commandComponents.push(G),G.GameObject.transform.setPosition(0,100*F+50),F++}const G=this._buttonParent.findComponent(j.XVE);G?G.setSizeDelta(G.sizeDelta.width,100*F):j.VyI.log("RectTransform was not found on the debug category button parent!",j.$bb.Error)}))}createCommandButton(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){var G;let j,$=k;switch("category"in k&&($={type:jt.Button,args:{args:[k.category,k.data]},title:xt.$.toTitleCase(k.category),description:null!==(G=k.description)&&void 0!==G?G:`Show ${xt.$.toTitleCase(k.category)} commands`,command:Ht.DebugMenuGoToCategory,buttonOptions:{text:"Open",type:Pt.vX.Sapphire}}),$.type){default:case jt.Button:j=B;break;case jt.Toggle:j=U;break;case jt.InputButton:case jt.DropdownInput:j=we.inputFieldValid($)?F:B}const H=(yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,j,{},this._buttonParent)).findComponent(Ee);return H.setParent(this),H.setInfo($),H}))}static inputFieldValid(k){const B=k.args;if(j.Aq$.isDefined(null==B?void 0:B.inputIdx)){const k=Lt.l.guaranteeArray(B.inputIdx);if(k.length>0&&k.every((k=>Number.isInteger(k)&&k>=0&&k0&&this._tween.to({y:0},this._bottomDelayMS),this._tween.to({y:this._distance},.5*this._duration,G),(null!==(B=this._topDelayMS)&&void 0!==B?B:0)>0&&this._tween.to({y:this._distance},this._topDelayMS),this._tween.to({y:0},.5*this._duration,G),this._tween.loop(!0).start(),this._tween.onUpdate.add((()=>{this.GameObject.legacyTransform?this.GameObject.legacyTransform.y=this._initialY+U.y:F.setPosition(F.localPosition.x,this._initialY+U.y)})),this.IsActiveInHierarchy||this._tween.pause()}onEnable(){var k;null===(k=this._tween)||void 0===k||k.resume(),super.onEnable()}onDisable(){var k;null===(k=this._tween)||void 0===k||k.pause(),super.onDisable()}updatePosition(k){this._initialY=k.y,this.GameObject.legacyTransform?(this.GameObject.legacyTransform.x=k.x,this.GameObject.legacyTransform.y=k.y):this.GameObject.transform.setPosition(k.x,k.y)}destroy(){tt.q.instance.game.tweens.remove(this._tween),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ie.prototype,"_distance",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ie.prototype,"_duration",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ie.prototype,"_topDelayMS",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ie.prototype,"_bottomDelayMS",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ie.prototype,"_easingCategory",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ie.prototype,"_easingType",void 0),Ie=(0,G.Cg)([(0,j.EVk)("BobTransform",W.Y.motion)],Ie);U(5885);let De=class extends j.uAl{loadItemRewards(){}getItem(){}removeItem(k,B){}};De=(0,G.Cg)([(0,j.EVk)("BountyRunBossItemProvider")],De);let Re=class extends j.uAl{restartDungeon(){this.completeRun(),this._dungeonState.startDungeonRun(),this._dungeonState.setCurrentMap(this._startingMap),tt.q.instance.prodigy.world.it(this._startingMap)}leaveDungeon(){this.completeRun(),tt.q.instance.prodigy.world.it(this._hubMap)}completeRun(){this._dungeonState.setCompletedRuns(this._dungeonState.getCompletedRuns()+1),this._dungeonState.resetRunData()}};(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],Re.prototype,"_dungeonState",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Re.prototype,"_hubMap",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Re.prototype,"_startingMap",void 0),Re=(0,G.Cg)([(0,j.EVk)("CompleteDungeonUI",W.Y.adventureUi)],Re);let Pe=class extends j.uAl{continueDungeonRun(){tt.q.instance.prodigy.world.it(this._dungeonState.getCurrentMap())}};(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],Pe.prototype,"_dungeonState",void 0),Pe=(0,G.Cg)([(0,j.EVk)("ContinueDungeonRun",W.Y.adventure)],Pe);var Me=U(10044);let Ne=class extends j.uAl{constructor(){super(...arguments),this._onPlayerSpawned=new j.HN0}spawnPlayer(){var k;let B=0,U=0,F=1;const G=this._dungeonState.getCheckpointLocation();if(this._injectedSpawnPosition)B=this._injectedSpawnPosition.x,U=this._injectedSpawnPosition.y,F=null!==(k=this._injectedSpawnDirection)&&void 0!==k?k:1;else if(G)B=G.x,U=G.y,F=this._dungeonState.getFacingDirection();else{const k=this.GameObject.transform,G=k.worldPosition;B=G.x,U=G.y,F=k.localScale.x}j.i7d.main.GameObject.transform.setPosition(B,U),this._player.transform.setPosition(B,U),this._player.transform.setScale(F,1),this._player.findComponentInChildren(j.mZY)._loadedBounds={left:B,right:B,top:U,bottom:U},this._onPlayerSpawned.dispatch()}destroy(){this._onPlayerSpawned.dispose(),super.destroy()}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ne.prototype,"_player",void 0),(0,G.Cg)([(0,j.Cdj)("InitData-spawnPosition"),(0,G.Sn)("design:type",j.I9Y)],Ne.prototype,"_injectedSpawnPosition",void 0),(0,G.Cg)([(0,j.Cdj)("InitData-spawnFacingDirection"),(0,G.Sn)("design:type",Number)],Ne.prototype,"_injectedSpawnDirection",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],Ne.prototype,"_dungeonState",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ne.prototype,"_onPlayerSpawned",void 0),Ne=(0,G.Cg)([(0,j.EVk)("DungeonPlayerSpawner")],Ne);let xe=class extends j.uAl{getSpawnData(){return null}};xe=(0,G.Cg)([(0,j.EVk)("SpawnDataProvider (abstract)")],xe);let Le=class extends xe{getSpawnData(){const k=this._dungeonState.getCheckpointLocation();return k?{location:new j.I9Y(k.x,k.y),facingDirection:this._dungeonState.getFacingDirection()}:null}};(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],Le.prototype,"_dungeonState",void 0),Le=(0,G.Cg)([(0,j.EVk)("DungeonSpawnDataProvider",W.Y.mapSpawning)],Le);let ke=class extends j.uAl{enter(){this._dungeonState.resetRunData(),this._dungeonState.startDungeonRun(),this._dungeonState.setCurrentMap(this._startingMap),tt.q.instance.prodigy.world.it(this._startingMap)}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ke.prototype,"_startingMap",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],ke.prototype,"_dungeonState",void 0),ke=(0,G.Cg)([(0,j.EVk)("EnterDungeon",W.Y.adventure)],ke);var Be=U(31029);let Ue=class extends Be.u{};Ue=(0,G.Cg)([(0,j.EVk)("HealStone")],Ue);var Fe=U(35084);let Ge=class extends j.uAl{constructor(){super(...arguments),this._inputPaddingOnHover=new j.I9Y(5,5),this._applied=!1}create(){super.create(),this._hoverInput&&(this._hoverInput.onHoverEnter.add(this.applyOffset,this),this._hoverInput.onHoverExit.add(this.removeOffset,this))}destroy(){this._hoverInput&&(this._hoverInput.onHoverEnter.remove(this.applyOffset,this),this._hoverInput.onHoverExit.remove(this.removeOffset,this)),super.destroy()}onDisable(){super.onDisable(),this.removeOffset()}applyOffset(){if(this._applied)return;this._hoverInput.setOffset(-this._offset.x-this._inputPaddingOnHover.x,-this._offset.y-this._inputPaddingOnHover.y,!1),this._hoverInput.setSize(this._hoverInput.width+2*this._inputPaddingOnHover.x,this._hoverInput.height+2*this._inputPaddingOnHover.y);const k=this.GameObject.transform.localPosition;this.GameObject.transform.setPosition(k.x+this._offset.x,k.y+this._offset.y),this._applied=!0}removeOffset(){if(!this._applied)return;this._hoverInput.setOffset(0,0,!1),this._hoverInput.setSize(this._hoverInput.width-2*this._inputPaddingOnHover.x,this._hoverInput.height-2*this._inputPaddingOnHover.x);const k=this.GameObject.transform.localPosition;this.GameObject.transform.setPosition(k.x-this._offset.x,k.y-this._offset.y),this._applied=!1}};(0,G.Cg)([(0,j.MnK)(Fe.n),(0,G.Sn)("design:type",Fe.n)],Ge.prototype,"_hoverInput",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],Ge.prototype,"_offset",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],Ge.prototype,"_inputPaddingOnHover",void 0),Ge=(0,G.Cg)([(0,j.EVk)("HoverOffset",W.Y.ui)],Ge);var je,$e=U(68910),He=U(92150),Ve=U(88022);let We=je=class extends j.y4o{constructor(){super(...arguments),this.onStart=new j.HN0,this.onEnd=new j.HN0}create(){super.create(),this.setRootContainer(this._container=new $e.Container)}destroy(){this.onStart.dispose(),this.onEnd.dispose(),this._container.destroy(),super.destroy()}start(){this._topBox?j.VyI.log("Attempted to start a cutscene when one is already active",j.$bb.Warning):(this.showLetterbox(),this.onStart.dispatch())}end(){this._topBox?(this.hideLetterbox(),this.onEnd.dispatch()):j.VyI.log("Attempted to end a cutscene when none is active",j.$bb.Warning)}showLetterbox(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;const U=tt.q.instance.game,F=U.width,G=U.height,$=U.state.getCurrentState();null===(B=null===(k=$.getParentalConsentBanner)||void 0===k?void 0:k.call($))||void 0===B||B.then((k=>{k&&(k.active=!1)})),this._topBox=new He._(U,0,-je.BOX_HEIGHT,Ve._.Tiled_sprites_json,"overlay-small"),this._topBox.width=F,this._topBox.height=je.BOX_HEIGHT,this._container.addChild(this._topBox),this._bottomBox=new He._(U,0,G,Ve._.Tiled_sprites_json,"overlay-small"),this._bottomBox.width=F,this._bottomBox.height=je.BOX_HEIGHT,this._container.addChild(this._bottomBox);const H=U.add.tween(this._topBox,this).to({y:0},je.TWEEN_DURATION_MS,j.GS3.Quadratic.Out).start();return U.add.tween(this._bottomBox,this).to({y:G-je.BOX_HEIGHT},je.TWEEN_DURATION_MS,j.GS3.Quadratic.Out).start(),new Promise((k=>{H.onTweenComplete.add(k)}))}))}hideLetterbox(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;const U=tt.q.instance.game,F=U.state.getCurrentState();null===(B=null===(k=F.getParentalConsentBanner)||void 0===k?void 0:k.call(F))||void 0===B||B.then((k=>{k&&(k.active=!0)}));const G=U.add.tween(this._topBox,this).to({y:-je.BOX_HEIGHT},je.TWEEN_DURATION_MS,j.GS3.Quadratic.Out).start();return U.add.tween(this._bottomBox,this).to({y:U.height},je.TWEEN_DURATION_MS,j.GS3.Quadratic.Out).start(),new Promise((k=>{G.onTweenComplete.add((()=>{this._topBox.destroy(),this._bottomBox.destroy(),this._topBox=this._bottomBox=null,k()}))}))}))}};We.BOX_HEIGHT=50,We.TWEEN_DURATION_MS=1e3,(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],We.prototype,"onStart",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],We.prototype,"onEnd",void 0),We=je=(0,G.Cg)([(0,j.EVk)("Letterbox",W.Y.adventure)],We);let qe=class extends j.uAl{constructor(){super(...arguments),this._shouldCheckMembership=!0,this.membershipSuppressOn=new j.HN0,this.membershipSuppressOff=new j.HN0,this._runOnLoad=!1,this.shouldSuppressAd=!1}create(){super.create(),this.checkForMemberSuppression(),this._runOnLoad&&this.run()}run(){this.checkForMemberSuppression(),this.shouldSuppressAd?this.membershipSuppressOn.dispatch():this.membershipSuppressOff.dispatch()}checkForMemberSuppression(){this.shouldSuppressAd=Qt.J.shouldSuppressAd(this._loggedInPlayer.player,this._shouldCheckMembership)}destroy(){this.membershipSuppressOn.dispose(),this.membershipSuppressOff.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],qe.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],qe.prototype,"_shouldCheckMembership",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],qe.prototype,"membershipSuppressOn",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],qe.prototype,"membershipSuppressOff",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],qe.prototype,"_runOnLoad",void 0),qe=(0,G.Cg)([(0,j.EVk)("MembershipSuppressionGuard",W.Y.membership)],qe);var Ke=U(34603),ze=U(51972);let Ye=class extends j.uAl{constructor(){super(...arguments),this._tooltipPositionX=0,this._tooltipPositionY=0,this._tooltipPositionArrow=0}postCreate(){super.postCreate(),this._membershipSuppression&&this.updateLockState(this._membershipSuppression.shouldSuppressAd)}updateLockState(k){this._lockImage.GameObject.active=k,this._sparkles&&k&&(this._sparkles.active=!k),this._mainImage.sprite.tint=k?3355443:16777215}run(){tt.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:this._tooltipPositionX,yPosition:this._tooltipPositionY,arrowXRelPos:this._tooltipPositionArrow,arrowDirection:ze.i.DOWN})}};(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],Ye.prototype,"_mainImage",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],Ye.prototype,"_lockImage",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ye.prototype,"_sparkles",void 0),(0,G.Cg)([(0,j.MnK)(qe),(0,G.Sn)("design:type",qe)],Ye.prototype,"_membershipSuppression",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ye.prototype,"_tooltipPositionX",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ye.prototype,"_tooltipPositionY",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ye.prototype,"_tooltipPositionArrow",void 0),Ye=(0,G.Cg)([(0,j.EVk)("LockInteractable",W.Y.adventure)],Ye);var Qe=U(76945);class Xe{static fromRange(k,B){return class{static isDefined(k){return null!=k}static valueIsRange(k){return null!==k&&"object"==typeof k&&"min"in k&&"max"in k}static valueIsWeightedTable(k){return Array.isArray(k)&&k.length>0&&"weight"in k[0]&&"value"in k[0]}}.valueIsRange(k)?Math.floor(Math.random()*(k.max-k.min)+k.min):Math.floor(Math.random()*(null!=B?B:0-k)+k)}}class Ze{static shuffle(k,B=!0){const U=ct.shuffle(Array.from(k));if(!B&&k.length>1&&U.length>1&&U[0]===k[k.length-1]){const k=U.shift(),B=Math.floor(Math.random()*(U.length-1)+1);U.splice(B,0,k)}return U}static selectElement(k){return k[Xe.fromRange(0,k.length)]}static selectElements(k,B){return ct.sampleSize(B,k)}static selectFromWeightedTable(k){return Ze.selectByWeight(k,(k=>k.weight)).value}static selectByWeight(k,B){const U=k.map(B),F=Math.random()*ct.sum(U);let G=0;return k[ct.findIndex(U,(k=>(G+=k,F({ID:k.ID,type:k.type})));return k.push({ID:U.fallback.ID,type:U.fallback.type}),k}const F=this.removeOwnedItems(U.items,U.fallback),G=[];for(let $=0;$k.weight));k!==U.fallback&&(F.splice(F.indexOf(k),1),U.fallback.weight+=k.weight),j.Aq$.isDefined(k.N)&&"number"!=typeof k.N?G.push({ID:k.ID,type:k.type,N:Qe.o.integerInRange(k.N.min,k.N.max+1)}):G.push({ID:k.ID,type:k.type,N:k.N})}return G}removeOwnedItems(k,B){const U=k.length,F=[];B.weight=0;for(let G=0;G0&&F.push(B),F}};(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],Je.prototype,"_tables",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Je.prototype,"_loggedInPlayer",void 0),Je=(0,G.Cg)([(0,j.EVk)("LootTables",W.Y.root)],Je);let ti=class extends j.JTX{getItems(){const k=Qe.o.integerInRange(this._minItems,this._maxItems+1);return this.tables.getRandomItems(this.tableName,k)}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ti.prototype,"tableName",void 0),(0,G.Cg)([(0,j.fFd)("LootTables"),(0,G.Sn)("design:type",Je)],ti.prototype,"tables",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],ti.prototype,"_minItems",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],ti.prototype,"_maxItems",void 0),ti=(0,G.Cg)([(0,j.EVk)("LootProvider",W.Y.root)],ti);let ei=class extends j.uAl{saveCheckpoint(){}};(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],ei.prototype,"_checkpointPosition",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],ei.prototype,"_mainPlayer",void 0),ei=(0,G.Cg)([(0,j.EVk)("CheckpointBase (abstract)")],ei);let ii=class extends ei{saveCheckpoint(){var k;this._index>this._dungeonState.getCheckpointIndex()&&this._dungeonState.setCheckpoint(this._index,null!==(k=this._checkpointPosition.worldPosition)&&void 0!==k?k:this.GameObject.transform.worldPosition,this._mainPlayer.transform.localScale.x)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],ii.prototype,"_index",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],ii.prototype,"_dungeonState",void 0),ii=(0,G.Cg)([(0,j.EVk)("MapCheckpoint",W.Y.adventure)],ii);let si=class extends j.uAl{constructor(){super(...arguments),this._onMapObjectComplete=new j.HN0,this._onMapObjectIncomplete=new j.HN0}postCreate(){super.postCreate(),this._dungeonState&&(this.isCompleted()?this._onMapObjectComplete.dispatch():this._onMapObjectIncomplete.dispatch())}destroy(){this._onMapObjectComplete.dispose(),this._onMapObjectIncomplete.dispose(),super.destroy()}completeMapObject(){this._dungeonState.setMapObjectCompleted(this.mapObjectID,!0),this._onMapObjectComplete.dispatch()}isCompleted(){return this._dungeonState.isMapObjectCompleted(this.mapObjectID)}};(0,G.Cg)([(0,j.Mts)(),(0,G.Sn)("design:type",Number)],si.prototype,"mapObjectID",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],si.prototype,"_dungeonState",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],si.prototype,"_onMapObjectComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],si.prototype,"_onMapObjectIncomplete",void 0),si=(0,G.Cg)([(0,j.EVk)("MapSaveCompletionState",W.Y.adventure)],si);var ni=U(48975),ai=U(79421);let ri=class extends j.y4o{constructor(){super(...arguments),this.minerAtlas=Ve._.Npc_sprite_gnome_json,this._npcMiner=null,this._minerSize=new j.or0}create(){super.create();const k=tt.q.instance.game;this._npcMiner=new ai.N(k,null,null,null,0,0,new ni.s(k),9,6,null),this._npcMiner.stand(),this._minerSize.setTo(this._npcMiner.width,this._npcMiner.height),this.setRootContainer(this._npcMiner)}destroy(){this._npcMiner.destroy(),super.destroy()}getDimensions(){return this._minerSize}};(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],ri.prototype,"minerAtlas",void 0),ri=(0,G.Cg)([(0,j.EVk)("MinerNPC",W.Y.object)],ri);var oi=U(28402),hi=U(54336);let ci=class extends j.uAl{constructor(){super(...arguments),this.monsterIDs=[1],this._battleDifficulty=1,this._battleScreen="battle-shiverchill-outside",this._saveStateComponent=null,this._battleStars=null}create(){super.create()}startBattle(){const k=tt.q.instance.prodigy,B=k.world.getCurrentMap(),U=new j.I9Y;U.copyFrom(this._respawnPosition.worldPosition);const F=this._dungeonState,G=this._mainPlayer.transform.localScale.x,$=this._saveStateComponent.mapObjectID;k.battle.battleStats.type="DungeonMonsterBattle",k.battle.start({screen:this._battleScreen,encounter:this.monsterIDs.map((k=>({ID:k,level:this._dungeonState.getLevel()}))),difficulty:this._battleDifficulty,starOverride:this._battleStars,disableHealing:!0},(()=>{k.world.it(B)}),(()=>{F.setMapObjectCompleted($,!0),k.world.it(B,U.x,U.y,{playerDirection:G})}),null,this._loggedInPlayer.player.data.zone)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],ci.prototype,"_battleDifficulty",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ci.prototype,"_battleScreen",void 0),(0,G.Cg)([(0,j.MnK)(si),(0,G.Sn)("design:type",si)],ci.prototype,"_saveStateComponent",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],ci.prototype,"_dungeonState",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],ci.prototype,"_respawnPosition",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ci.prototype,"_allowCatching",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],ci.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],ci.prototype,"_battleStars",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],ci.prototype,"_loggedInPlayer",void 0),ci=(0,G.Cg)([(0,j.EVk)("StartDungeonBattle",W.Y.adventure)],ci);let di=class extends j.uAl{constructor(){super(...arguments),this._monsterID=null,this._spine=null,this._startBattle=null}create(){super.create();const k=Yt.t.getItem("pet",this._monsterID).metadata;this._spine.setAsset(`spine-${k.assets.default.ID}`),this._startBattle.monsterIDs=[this._monsterID]}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],di.prototype,"_monsterID",void 0),(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],di.prototype,"_spine",void 0),(0,G.Cg)([(0,j.MnK)(ci),(0,G.Sn)("design:type",ci)],di.prototype,"_startBattle",void 0),di=(0,G.Cg)([(0,j.EVk)("MonsterEncounter",W.Y.adventure)],di);var li=U(65240),ui=U(41674),fi=U(65050),bi=U(67665),pi=U(51742);class vi extends Be.u{constructor(){super(...arguments),this._containerType=ui.ZF.WorldChest,this._instanceType=fi.N.OpenWorld,this.openSoundEffect=pi.c.Sfx_ui,this.revealItemSoundEffect=pi.c.Sfx_world}showOpenChest(){this._chestImage.setFrameName(this._chestOpenFrameName)}}(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],vi.prototype,"_segment",void 0),(0,G.Cg)([(0,j.gfw)(ui.ZF),(0,G.Sn)("design:type",String)],vi.prototype,"_containerType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],vi.prototype,"_containerID",void 0),(0,G.Cg)([(0,j.gfw)(fi.N),(0,G.Sn)("design:type",String)],vi.prototype,"_instanceType",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],vi.prototype,"_interactableGameObject",void 0),(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],vi.prototype,"openSoundEffect",void 0),(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],vi.prototype,"revealItemSoundEffect",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],vi.prototype,"_chestTransform",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],vi.prototype,"_chestOpenFrameName",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],vi.prototype,"_chestImage",void 0);let gi=class extends vi{run(){var k;const B=this._lootProvider.getItems();if(null===(k=this._interactableGameObject)||void 0===k?void 0:k.transform){const k=tt.q.instance.prodigy.world.getCurrentZone();this._containerID=`${k}-${this._interactableGameObject.transform.worldPosition.x}-${this._interactableGameObject.transform.worldPosition.y}`}this._segment.container.sendContainerOpenedEvent(this._containerType,this._containerID,this._instanceType),this.execute(145,{game:tt.q.instance.game,chestTransform:this._chestTransform,openChestFSM:this,chestItems:B,itemCount:B.length,mapSaveState:this._mapSaveState,sourceType:this._containerType===ui.ZF.WorldChest?li.C.WorldChest:li.C.WorldMemberChest,sourceID:this._containerID,transactionID:this._segment.container.getCurrentContainerTransactionID()})}};(0,G.Cg)([(0,j.MnK)(ti),(0,G.Sn)("design:type",ti)],gi.prototype,"_lootProvider",void 0),(0,G.Cg)([(0,j.MnK)(si),(0,G.Sn)("design:type",si)],gi.prototype,"_mapSaveState",void 0),gi=(0,G.Cg)([(0,j.EVk)("OpenChestFSM",W.Y.adventureFsm)],gi);var mi=U(43531);let yi=class extends j.uAl{constructor(){super(...arguments),this._dialogueIDs=[],this._onFinished=new j.HN0,this._attachToGameObjectLayer=!1}destroy(){this._onFinished.dispose(),super.destroy()}play(){const k=mi.rD.runDialogueSequence(Lt.l.guaranteeArray(this._dialogueIDs),(()=>{this._onFinished.dispatch()}));this._attachToGameObjectLayer&&k.setParent(j.wa5.getActiveScene().getLayer(this.GameObject.layer))}};(0,G.Cg)([(0,j.SZi)(),(0,j.g11)(),(0,G.Sn)("design:type",Array)],yi.prototype,"_dialogueIDs",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yi.prototype,"_onFinished",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],yi.prototype,"_attachToGameObjectLayer",void 0),yi=(0,G.Cg)([(0,j.EVk)("PlayDialogue",W.Y.ui)],yi);var _i=U(51941);let Ei=class extends j.uAl{create(){var k;let B;if(super.create(),null===(k=this.gameObject.findComponentInChildren(_i.c))||void 0===k||k.onLoadComplete.add((()=>{this.gameObject.active=!0})),B=this._dungeonState.getCheckpointIndex(),-1===B){const k=this._dungeonState.getCurrentMap(),U=this.phaseNames.indexOf(k);U>=0?B=this.phaseDefaultIDs[U]:k&&j.VyI.log(`No phase name for ${k}`,j.$bb.Error)}const U=ct.sortedIndex(this.checkpointIDs,B),F=this.gameObject.legacyTransform,G=this.checkpointsParent.children[U].legacyTransform;F.x=G.x,F.y=G.y}};(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],Ei.prototype,"_dungeonState",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ei.prototype,"checkpointsParent",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.g11)(),(0,G.Sn)("design:type",Array)],Ei.prototype,"checkpointIDs",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],Ei.prototype,"phaseNames",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.g11)(),(0,G.Sn)("design:type",Array)],Ei.prototype,"phaseDefaultIDs",void 0),Ei=(0,G.Cg)([(0,j.EVk)("PlayerPinProgress",W.Y.adventureUi)],Ei);let wi=class extends Be.u{run(){this._fsmData&&j.Aq$.isDefined(this._fsmData.ID)&&this.execute(this._fsmData.ID,this._fsmData.variables)}};(0,G.Cg)([(0,j.Cdj)("InitData-playFSM"),(0,G.Sn)("design:type",Object)],wi.prototype,"_fsmData",void 0),wi=(0,G.Cg)([(0,j.EVk)("PlayInitDataFSM",W.Y.animation)],wi);var Ti=U(9531);let Si=class extends j.JTX{postCreate(){if(super.postCreate(),this._playerProvider){const k=[],B=this._bossIDs.length;for(let j=0;j0?1===G?this._localizer.getText("ADVENTURE_REMAINING_REWARDS_SINGLE"):this._localizer.getText("ADVENTURE_REMAINING_REWARDS",G):""}}};(0,G.Cg)([(0,j.fFd)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Si.prototype,"_playerProvider",void 0),(0,G.Cg)([(0,j.Cdj)("Localization"),(0,G.Sn)("design:type",j.dTp)],Si.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Si.prototype,"_labelText",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],Si.prototype,"_bossIDs",void 0),Si=(0,G.Cg)([(0,j.EVk)("RemainingRewards",W.Y.adventureUi)],Si);let Ai=class extends Be.u{run(){const k=this._lootProviderComponent.getItems();this.execute(135,{game:tt.q.instance.game,spine:this._interactableSpine.getSpine(),items:k.length>0?k:null,saveComponent:this._saveCompletionComponent,revealAnimationName:this._revealAnimationName})}};(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],Ai.prototype,"_interactableSpine",void 0),(0,G.Cg)([(0,j.MnK)(si),(0,G.Sn)("design:type",si)],Ai.prototype,"_saveCompletionComponent",void 0),(0,G.Cg)([(0,j.MnK)(ti),(0,G.Sn)("design:type",ti)],Ai.prototype,"_lootProviderComponent",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ai.prototype,"_revealAnimationName",void 0),Ai=(0,G.Cg)([(0,j.EVk)("RevealInteractableItemFSM",W.Y.adventureFsm)],Ai);var Ci=U(28628);class Oi{static getBossAssetID(k){const B=Object.keys(Oi.BOSS_ID_MAP).find((B=>Oi.BOSS_ID_MAP[B]===k));return B?parseInt(B,10):null}static getBossEnum(k){var B;return null!==(B=Oi.BOSS_ID_MAP[k])&&void 0!==B?B:null}static getRevampBattleType(k){return Oi.REVAMP_BATTLE_TYPES[k]}}Oi.BOSS_ID_MAP={19:0,20:3,21:4,17:1,18:2},Oi.REVAMP_BATTLE_TYPES={0:Ci.gu.CrystalCavernsGrumpyYeti,4:Ci.gu.CrystalCavernsCrystalThief,3:Ci.gu.CrystalCavernsGlacias,1:Ci.gu.CrystalCavernsMakalu,2:Ci.gu.CrystalCavernsCrystalGolem};var Ii=U(83668);let Di=class extends j.uAl{constructor(){super(...arguments),this.preloadAtlas=Ve._.Ui_cc_adventure_map_json}create(){super.create();let k=Rt.l.AdventureMap_RowUnrevealed;{const B=Yt.t.getItemData("boss",Oi.getBossAssetID(this.bossID));this._crystalCavernsState.isBossDefeatedCurrentRun(this.bossID)?k=Rt.l.AdventureMap_RowDone:this._crystalCavernsState.getCheckpointIndex()===B.battleCheckpointID&&(k=Rt.l.AdventureMap_RowCurrent)}this._prefabLoader.loadFromGUID(k,this.gameObject)}};(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],Di.prototype,"preloadAtlas",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Di.prototype,"bossID",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ii.o)],Di.prototype,"_crystalCavernsState",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Di.prototype,"_prefabLoader",void 0),Di=(0,G.Cg)([(0,j.EVk)("RewardRowBacking",W.Y.adventureUi)],Di);var Ri=U(5822);let Pi=class extends Ri.u{};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pi.prototype,"_firstEntryEvent",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pi.prototype,"_reentryEvent",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],Pi.prototype,"_dungeonState",void 0),Pi=(0,G.Cg)([(0,j.EVk)("SendStartDungeonMetric",W.Y.adventure)],Pi);var Mi=U(19464);let Ni=class extends j.uAl{teleportPlayer(){this._dungeonState.resetPhaseData(),this._dungeonState.setCurrentMap(this._destinationMap),tt.q.instance.prodigy.world.it(this._destinationMap),tt.q.instance.prodigy.gameContainer.get("c47-20b6").playerMovementAndDiscovery.sendCrystalCavernsMilestoneReachedEvent(Mi.lT.Complete)}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ni.prototype,"_destinationMap",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],Ni.prototype,"_dungeonState",void 0),Ni=(0,G.Cg)([(0,j.EVk)("TransitionDungeonPhases",W.Y.adventure)],Ni);var xi=U(79009),Li=U(5668),ki=U(54950);let Bi=class extends j.PQK{installBindings(){const k=tt.q.instance.prodigy.gameContainer;this.Container.bind("Localization").toConstantValue(k.get(j.$Bt.LocalizationService)),this.Container.bind("d30-0043").toConstantValue(tt.q.instance.prodigy.open),this.Container.bind("AnimationData").toConstantValue(new xi.F(U(34500))),this.Container.bind("b2a-9519").to(ki.S).asSingleton(),this.Container.bind("c5f-aceb").toConstantValue(new Li.D(this.Container,k.get("c97-bd0d")))}};Bi=(0,G.Cg)([(0,j.Og1)("AdventureInstaller","Installer")],Bi);var Ui,Fi=U(26932),Gi=U(13956),ji=U(63860);!function(k){k.afterSchoolWidgetSchoolRewardState="AFTER_SCHOOL_WIDGET_SCHOOL_REWARD_STATE",k.afterSchoolWidgetHomeRewardState="AFTER_SCHOOL_WIDGET_HOME_REWARD_STATE",k.afterSchoolWidgetRewardTooltipActive="AFTER_SCHOOL_WIDGET_REWARD_TOOLTIP_ACTIVE",k.afterSchoolWidgetRewardTooltipState="AFTER_SCHOOL_WIDGET_REWARD_TOOLTIP_STATE",k.afterSchoolWidgetSchoolRewardAmount="AFTER_SCHOOL_WIDGET_SCHOOL_REWARD_AMOUNT",k.afterSchoolWidgetHomeRewardAmount="AFTER_SCHOOL_WIDGET_HOME_REWARD_AMOUNT"}(Ui||(Ui={}));let $i=class extends Fi.z{constructor(){super(...arguments),this.onSchoolRewardClaimed=new j.HN0,this.onHomeRewardClaimed=new j.HN0}create(){super.create(),this.bindContext()}bindContext(){this.schoolRewardStateSignalBinding=this._afterSchoolWidgetService.onSchoolRewardStateSet.add((k=>this.refreshSchoolRewardState(k))),this.homeRewardStateSignalBinding=this._afterSchoolWidgetService.onHomeRewardStateSet.add((k=>this.refreshHomeRewardState(k))),this.rewardDataSignalBinding=this._afterSchoolWidgetService.onDataSet.add((()=>this.refreshRewardValues())),this.refreshSchoolRewardState(),this.refreshHomeRewardState(),this.refreshRewardValues()}refreshSchoolRewardState(k=this._afterSchoolWidgetService.schoolRewardState){j.Aq$.isDefined(k)&&(this.updateValue(Ui.afterSchoolWidgetSchoolRewardState,k),this.refreshToolTipState())}refreshHomeRewardState(k=this._afterSchoolWidgetService.homeRewardState){j.Aq$.isDefined(k)&&(this.updateValue(Ui.afterSchoolWidgetHomeRewardState,k),this.refreshToolTipState())}refreshToolTipState(){const{homeRewardState:k,schoolRewardState:B}=this._afterSchoolWidgetService,U=this._afterSchoolWidgetService.isFtueAvailable();"Locked"===k?(this.updateValue(Ui.afterSchoolWidgetRewardTooltipState,"Locked"),this.updateValue(Ui.afterSchoolWidgetRewardTooltipActive,!U)):"Collected"===B&&"Collected"===k?(this.updateValue(Ui.afterSchoolWidgetRewardTooltipState,"Collected"),this.updateValue(Ui.afterSchoolWidgetRewardTooltipActive,!U)):this.updateValue(Ui.afterSchoolWidgetRewardTooltipActive,!1)}refreshRewardValues(){const k=this._afterSchoolWidgetService.getData().homeReward,B=this._afterSchoolWidgetService.getData().schoolReward;this.updateValue(Ui.afterSchoolWidgetHomeRewardAmount,k.amount),this.updateValue(Ui.afterSchoolWidgetSchoolRewardAmount,B.amount)}claimSchoolReward(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._afterSchoolWidgetService.claimSchoolReward();this.onSchoolRewardClaimed.dispatch(k)}))}claimHomeReward(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._afterSchoolWidgetService.claimHomeReward();this.onHomeRewardClaimed.dispatch(k)}))}destroy(){this.onHomeRewardClaimed.dispose(),this.onSchoolRewardClaimed.dispose(),this.schoolRewardStateSignalBinding.destroy(),this.homeRewardStateSignalBinding.destroy(),this.rewardDataSignalBinding.destroy(),super.destroy()}};(0,G.Cg)([(0,Gi.b)("e94-c727"),(0,G.Sn)("design:type",ji.e)],$i.prototype,"_afterSchoolWidgetService",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$i.prototype,"onSchoolRewardClaimed",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$i.prototype,"onHomeRewardClaimed",void 0),$i=(0,G.Cg)([(0,j.EVk)("AfterSchoolWidgetRewards",W.Y.afterSchoolWidget)],$i);var Hi=U(18344);let Vi=class extends j.uAl{constructor(){super(...arguments),this.iconGraphicComponents=[]}postCreate(){super.postCreate(),j.Aq$.isDefined(this.bannerText)&&this.setBannerText(this.bannerText),j.Aq$.isDefined(this.iconGraphicAsset)&&this.setIconGraphicAsset(this.iconGraphicAsset)}init(k){this._definition=k,this.setBannerText(k.text),this.setIconGraphicAsset(k.iconGuid)}getDefinition(){return Object.assign({},this._definition)}setIconGraphicAsset(k){if(j.Aq$.isDefined(k)){if(this.iconGraphicAsset=k,!j.Aq$.isDefined(this.iconGraphicAsset))for(const k of this.iconGraphicComponents)k.GameObject.active=!1;this._assetLoader.loadAssets([this.iconGraphicAsset]).then((()=>{for(const k of this.iconGraphicComponents)k.GameObject.active=!0,k.updateAsset(this.iconGraphicAsset)})).catch((k=>{j.VyI.log(k,j.$bb.Error)}))}}setBannerText(k){this.bannerText=k,j.Aq$.isDefined(this.bannerTextComponent)&&(this.bannerTextComponent.text=k)}};(0,G.Cg)([(0,j.Cdj)(j.t5G.AssetLoader),(0,G.Sn)("design:type",Hi.A)],Vi.prototype,"_assetLoader",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Vi.prototype,"bannerTextComponent",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Vi.prototype,"bannerText",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",Array)],Vi.prototype,"iconGraphicComponents",void 0),(0,G.Cg)([(0,j.i0J)(j.Z$z.SingleImage),(0,G.Sn)("design:type",String)],Vi.prototype,"iconGraphicAsset",void 0),Vi=(0,G.Cg)([(0,j.EVk)("BannerControllerComponent")],Vi);var Wi=U(11647),qi=U(52743);let Ki=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.maxBannersToShow=3,this._isLoadingBanners=!1}postCreate(){super.postCreate(),this.updateBanners(this._bannerQueueManager.getStack()).catch((k=>j.VyI.log(k,j.$bb.Error))),this.addListenerToSignal(this._bannerQueueManager.onBannerQueueUpdated,(k=>{this.updateBanners(k).catch((k=>j.VyI.log(k,j.$bb.Error)))}))}updateBanners(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;if(this._isLoadingBanners)return;this._isLoadingBanners=!0;const U=null!==(B=this.contentContainerObject)&&void 0!==B?B:this.gameObject,F=U.children.map((k=>k.findComponent(Vi)));for(let G=0;G=1}}(0,G.Cg)([(0,j.x4W)("left"),(0,G.Sn)("design:type",zi.k)],Qi.prototype,"_left",void 0),(0,G.Cg)([(0,j.x4W)("right"),(0,G.Sn)("design:type",zi.k)],Qi.prototype,"_right",void 0),(0,G.Cg)([(0,j.x4W)("middle"),(0,G.Sn)("design:type",zi.k)],Qi.prototype,"_middle",void 0);let Xi=class extends Vi{constructor(){super(...arguments),this.progress=0,this.target=1}postCreate(){super.postCreate(),this.setProgress(this.progress,this.target)}init(k){super.init(k),this.setProgress(k.progress.current,k.progress.target)}setProgress(k,B){var U;this.progress=k,this.target=B;const F=Math.min(k/B,1);j.Aq$.isDefined(this.progressLabelTextComponent)&&(this.progressLabelTextComponent.text=`${k}/${B}`),null===(U=this.progressBarComponent)||void 0===U||U.setValue(F)}};(0,G.Cg)([(0,j.MnK)(Qi),(0,G.Sn)("design:type",Qi)],Xi.prototype,"progressBarComponent",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Xi.prototype,"progressLabelTextComponent",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Xi.prototype,"progress",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Xi.prototype,"target",void 0),Xi=(0,G.Cg)([(0,j.EVk)("ProgressBannerController")],Xi);var Zi=U(35997);let Ji=class extends j.uAl{constructor(){super(...arguments),this._onLoad=new j.HN0}create(){super.create(),tt.q.instance.prodigy.titansNetworkHandler.getTitans().then((()=>{this._onLoad.dispatch()}))}destroy(){this._onLoad.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ji.prototype,"_onLoad",void 0),Ji=(0,G.Cg)([(0,j.EVk)("AwaitTitan",W.Y.titan)],Ji);let ts=class extends j.uAl{constructor(){super(...arguments),this._onAlive=new j.HN0,this._onDead=new j.HN0}check(){tt.q.instance.prodigy.titansNetworkHandler.isTitanAlive()?this._onAlive.dispatch():this._onDead.dispatch()}destroy(){this._onAlive.dispose(),this._onDead.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ts.prototype,"_onAlive",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ts.prototype,"_onDead",void 0),ts=(0,G.Cg)([(0,j.EVk)("IsTitanAliveGuard",W.Y.titan)],ts);let es=class extends j.uAl{constructor(){super(...arguments),this._onNew=new j.HN0,this._onNotNew=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.check()}destroy(){this._onNew.dispose(),this._onNotNew.dispose(),super.destroy()}check(){tt.q.instance.prodigy.titansNetworkHandler.isNewTitan()?this._onNew.dispatch():this._onNotNew.dispatch()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],es.prototype,"_onNew",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],es.prototype,"_onNotNew",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],es.prototype,"_runOnLoad",void 0),es=(0,G.Cg)([(0,j.EVk)("IsTitanNewGuard",W.Y.titan)],es);var is=U(65116),ss=U(49037);let ns=class extends j.uAl{setDestination(){const k=tt.q.instance.prodigy.titansNetworkHandler.titan;if(k){const B=`${Yt.t.getItem("titan",k.assetID).data.zone}-Titan`;this.canTeleport&&(this.canTeleport.mapTag=B),this.teleport&&(this.teleport.mapTag=B)}}};(0,G.Cg)([(0,j.MnK)(is.$),(0,G.Sn)("design:type",is.$)],ns.prototype,"canTeleport",void 0),(0,G.Cg)([(0,j.MnK)(ss.q),(0,G.Sn)("design:type",ss.q)],ns.prototype,"teleport",void 0),ns=(0,G.Cg)([(0,j.EVk)("SetTitanTeleportComponents",W.Y.titan)],ns);let as=class extends j.uAl{constructor(){super(...arguments),this._duelInviteUpdate=new j.HN0}create(){super.create(),this.fireSignalBasedOnCurrentDuelInviteState(),this._duelInviteService.onInviteReceived.add(this.fireSignalBasedOnCurrentDuelInviteState,this),this._duelInviteService.onInviteRemoved.add(this.fireSignalBasedOnCurrentDuelInviteState,this),this._duelInviteService.onInviteCancelled.add(this.fireSignalBasedOnCurrentDuelInviteState,this)}destroy(){this._duelInviteUpdate.dispose(),this._duelInviteService.onInviteReceived.remove(this.fireSignalBasedOnCurrentDuelInviteState,this),this._duelInviteService.onInviteCancelled.remove(this.fireSignalBasedOnCurrentDuelInviteState,this),this._duelInviteService.onInviteRemoved.remove(this.fireSignalBasedOnCurrentDuelInviteState,this),super.destroy()}fireSignalBasedOnCurrentDuelInviteState(){this._duelInviteUpdate.dispatch(this._duelInviteService.getInvites().length>0)}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],as.prototype,"_duelInviteUpdate",void 0),(0,G.Cg)([(0,j.Cdj)("636-444c"),(0,G.Sn)("design:type",Object)],as.prototype,"_duelInviteService",void 0),as=(0,G.Cg)([(0,j.EVk)("DuelInviteUpdate",W.Y.titan)],as);var rs=U(56942),os=U(52156),hs=U(53661),cs=U(18587);let ds=class extends j.uAl{constructor(){super(...arguments),this._generalChaseItems=[],this._levelupChaseItems=[],this._ultimateChaseItems=[]}create(){const k=Object.create(null,{create:{get:()=>super.create}});return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G,$,H,V;k.create.call(this),this._battlePassQuestData=yield this._questManager.getCurrentBattlePassData();const W=this._battlePassQuestData.getChasePetsLevelUp(),q=this._battlePassQuestData.getChasePetsUltimate(),K=null===(B=W[0])||void 0===B?void 0:B.id,z=null===(U=q[0])||void 0===U?void 0:U.id,Y=null===(F=q[1])||void 0===F?void 0:F.id,Q={};j.Aq$.isDefined(K)&&(Q[hs.XU.LevelupMythicGuid]=rs.Q[`Spine_pet_${K}_json`]),j.Aq$.isDefined(z)&&(Q[hs.XU.MythicGuid]=rs.Q[`Spine_pet_${z}_json`]),j.Aq$.isDefined(Y)&&(Q[hs.XU.UltimateMemberPetGuid]=rs.Q[`Spine_pet_${Y}_json`]),Nt.d.updateInjectedValues(this.gameObject,Q);const X=this._battlePassQuestData.getMiniChaseItemsUltimate();for(let k=0;kk&&(this._ultimateChaseItems[k].findComponentInChildren(j.EYj).text=1===X[k].quantity?"":null!==($=null===(G=X[k].quantity)||void 0===G?void 0:G.toString())&&void 0!==$?$:"",this._ultimateChaseItems[k].findComponentInChildren(os.X).setAsset(X[k].id,X[k].type).catch((B=>{j.VyI.log(`Battle pass was unable to load asset for ultimate chase item at index ${k}`,j.$bb.Error)})));const Z=this._battlePassQuestData.getMiniChaseItemsLevelUp();for(let k=0;kk&&(this._levelupChaseItems[k].findComponentInChildren(j.EYj).text=1===Z[k].quantity?"":null!==(V=null===(H=Z[k].quantity)||void 0===H?void 0:H.toString())&&void 0!==V?V:"",this._levelupChaseItems[k].findComponentInChildren(os.X).setAsset(Z[k].id,Z[k].type).catch((B=>{j.VyI.log(`Battle pass was unable to load asset for level up chase item at index ${k}`,j.$bb.Error)})));const J=this._loggedInPlayer.isMember();this._nonMemberCTA.active=!J,this._levelUpMemberCTA.active=J,this._battlePassQuestData||j.VyI.log("Battle pass track was unable to retrieve quest data for the current battle pass.",j.$bb.Error)}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],ds.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],ds.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],ds.prototype,"_generalChaseItems",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],ds.prototype,"_levelupChaseItems",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],ds.prototype,"_ultimateChaseItems",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ds.prototype,"_nonMemberCTA",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ds.prototype,"_levelUpMemberCTA",void 0),ds=(0,G.Cg)([(0,j.EVk)("BattlePassChaseItemsController",W.Y.battlePass)],ds);var ls=U(90633),us=U(46784),fs=U(91207);let bs=class extends j.uAl{constructor(){super(...arguments),this._battlePassAtlas=Ve._.Ui_battle_pass_json,this._complexFtue=!1,this._paginationBubbleSize=20,this._paginationBubbles=[],this._ftueFrames=[],this._additionalUiElements=[],this._currentFrame=0,this._finalFrameNextButtonTextKey="BUTTON_START_NOW"}create(){super.create(),this._closeCallback=this.getInjectedValue(hs.XU.CloseCallback),this._battlePassQuestManager.getCurrentBattlePassData().then((k=>(0,G.sH)(this,void 0,void 0,(function*(){const B=[];this._ftueFrames=k.getFtueFrames(),this._frameAmount=this._complexFtue?this._ftueFrames.length:1;for(let k=0;k{k.empty.Active=this._currentFrame!==B,k.full.Active=this._currentFrame===B}));else{this._paginationBubbleGrid.GameObject.active=!1;for(let k=0;k{this.handleNextClicked().catch(j.RQr.createHandler("BattlePassFtueComponent: Error setting up the next button click handler"))}))}))}handleNextClicked(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._currentFrame===this._frameAmount-1)return yield this.completeFtue(!1),void tt.q.instance.prodigy.open.battlePassMenu(us.B.BattlePassFtue,ui.$N.AutoSurfaced,this._closeCallback);yield this.loadFrame(this._currentFrame+1),this.setUpPaginationBubbles(),yield this.setUpNextButton()}))}completeFtue(){return(0,G.sH)(this,arguments,void 0,(function*(k=!0){if(this._complexFtue){tt.q.instance.prodigy.gameContainer.get("12f-4e29").completeBreadcrumb(ls.B.FEATURE_BATTLE_PASS,ls.B.BREADCRUMB_BATTLE_PASS_COMPLEX_FTUE_VIEWED)}yield this._battlePassQuestManager.sendFtueViewedEvent(),this._modal.destroyDeferred(),k&&this._closeCallback()}))}};(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],bs.prototype,"_battlePassAtlas",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],bs.prototype,"_modal",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],bs.prototype,"_frameImage",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],bs.prototype,"_frameGameObject",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],bs.prototype,"_nextButton",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],bs.prototype,"_nextButtonText",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],bs.prototype,"_complexFtue",void 0),(0,G.Cg)([(0,j.MnK)(j.JTA),(0,G.Sn)("design:type",j.JTA)],bs.prototype,"_paginationBubbleGrid",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],bs.prototype,"_battlePassQuestManager",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],bs.prototype,"_localizer",void 0),bs=(0,G.Cg)([(0,j.EVk)("BattlePassFtue",W.Y.battlePass)],bs);var ps=U(36648),vs=U(97518);let gs=class extends j.uAl{constructor(){super(...arguments),this._chasePrizeImages=[]}create(){super.create(),this.setupUi().catch(j.RQr.createHandler("BattlePassHomeScreen: Failed to set up chase prizes."))}destroy(){this._goToQuestsTab.onClick.remove(this.goToQuestsTab),this._goToIntroModal.onClick.remove(this.showIntro),super.destroy()}setupUi(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=yield this._battlePassQuestManager.getCurrentBattlePassData(),U=B.getHomeScreenPromoImageGuid(),F=fs.E.resolveSingleImageAssetSource(U,B.getHomeScreenPromoImageURL());if(null===(k=this._splashArt)||void 0===k||k.setAsset(F).catch(j.RQr.createHandler(`BattlePassHomeScreen: Failed to load splash art image ${U}`)),this._chasePrizeImages[0]){const k=B.getChaseHeroPoseImageGuid();this._chasePrizeImages[0].setAsset(k).catch(j.RQr.createHandler(`BattlePassHomeScreen: Failed to load chase prize image ${k}`))}const G=B.getChasePrizes();for(let H=1;H0?k.setBarText(U):k.setBarText((0,ms.k)(this.textToDisplay))}};(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],_s.prototype,"fillColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],_s.prototype,"innerColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],_s.prototype,"outerColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],_s.prototype,"textOutlineColor",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],_s.prototype,"textToDisplay",void 0),_s=(0,G.Cg)([(0,j.EVk)("ProgressBarState",W.Y.battlePass)],_s);var Es,ws,Ts,Ss,As,Cs,Os=U(29834),Is=U(15485),Ds=U(21418),Rs=U(96165);!function(k){k.Common="common-130x130",k.Uncommon="uncommon-130x130",k.Rare="rare-130x130",k.Heroic="heroic-130x130",k.Legendary="legendary-130x130"}(Es||(Es={})),function(k){k.Free="select-nonmember",k.Premium="select-member",k.Ultimate="frame-ultramember-diamond"}(ws||(ws={})),function(k){k.Free="frame-free-offseason",k.Core="select-member_offseason",k.Plus="frame-ultramember-diamond-offseason"}(Ts||(Ts={})),function(k){k.Common="#C5D1F5",k.Uncommon="#53A18A",k.Rare="#3B61C5",k.Heroic="#7E44CC",k.Legendary="#EFA378"}(Ss||(Ss={})),function(k){k.Common="#CCD7F9",k.Uncommon="#E3EFCA",k.Rare="#B6CFFB",k.Heroic="#F7CFF7",k.Legendary="#F3D07F"}(As||(As={})),function(k){k.MysteryRewardClaimSwitch="switch"}(Cs||(Cs={}));const Ps=["#363636","#FFFFFF","#FFFFFF","#FFFFFF","#363636"],Ms="generic",Ns={19:"academy-scroll",16:"aeros",2:"candy-corn",3:"generic",10:"generic",21:"generic",13:"florans",1:"gold",18:"academy-scroll",12:"hothots",22:"generic",8:"gold",17:"magic-egg",5:"magic-snowflake",7:"gold",23:"generic",20:"sand-dollar",15:"shivers",6:"gold",4:"star-shards",25:"generic",11:"titan-shards",9:"generic",14:"yars",27:"magicoin"};var xs=U(66582);let Ls=class extends j.uAl{setUp(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;if(!this.gameObject||this.GameObject.isDestroyed)return;if(!k)return void(this.gameObject.active=!1);switch(this.gameObject.active=!0,this._levelUpMemberIcon.active=!1,this._ultimateMemberIcon.active=!1,k.membershipTier){case xs._$.NonMember:break;case xs._$.MemberLevelUp:case xs._$.MemberCore:this._levelUpMemberIcon.active=!0;break;case xs._$.MemberUltimateMath:case xs._$.MemberUltimateBundle:case xs._$.MemberPlus:case xs._$.MemberUltra:this._ultimateMemberIcon.active=!0;break;default:j.VyI.log(`Unhandled member tier ${k.membershipTier} ${xs._$[k.membershipTier]}, presenting as Ultimate as a fallback`,j.$bb.Warning),this._ultimateMemberIcon.active=!0}const U=k.itemDrop.N;U>1&&!k.isMystery?(this._counterText.Active=!0,this._counterText.text=`x${U}`):this._counterText.Active=!1;const F=null!==(B=Yt.t.getItem(k.itemDrop.type,k.itemDrop.ID).data.rarity)&&void 0!==B?B:0,G=k.isMystery?182:k.itemDrop.ID,$=k.isMystery?"item":k.itemDrop.type;yield Promise.all([this._background.setAsset(Ve._.Ui_battle_pass_json,Object.values(Es)[F]),this._itemImageDataLoader.setAsset(G,$)])}))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ls.prototype,"_levelUpMemberIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ls.prototype,"_ultimateMemberIcon",void 0),(0,G.Cg)([(0,j.MnK)(os.X),(0,G.Sn)("design:type",os.X)],Ls.prototype,"_itemImageDataLoader",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],Ls.prototype,"_background",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ls.prototype,"_counterText",void 0),Ls=(0,G.Cg)([(0,j.EVk)("BattlePassItemCard",W.Y.battlePass)],Ls);let ks=class extends j.uAl{constructor(){super(...arguments),this.onRewardClaimed=new j.HN0}setup(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(dt().isEqual(this._infiniteTierData,k))return;this._infiniteTierData=k,this._currentTierIcon.active=k.isCurrentTier,this.setUpProgressBar(k);const B=k.timesCompleted-k.timesClaimed;this._claimButtonSparkle.GameObject.active=B>0,this.setUpClaimButton(k,B),this._itemCardSparkle.GameObject.active=B>0,this._itemCard&&k.freeReward&&(yield this._itemCard.setUp(k.freeReward).catch(j.RQr.createHandler("Failed to set up the item card in the battle pass infinite tier")),this.assignListenerToSignal(this._itemCardButton.onClick,this.itemCardClickEvent))}))}destroy(){this.onRewardClaimed.dispose(),super.destroy()}claimRewards(k){var B;this._claimButtonParent.active=!1,this._claimButtonSparkle.GameObject.active=!1,this._itemCardSparkle.GameObject.active=!1;const U=k.freeReward.rewardId,F=k.timesCompleted-k.timesClaimed;this._questManager.sendRewardClaimedEvent(U,F).then((()=>{new Rs.I(null,null).doTask({itemDrops:[{ID:k.freeReward.itemDrop.ID,type:k.freeReward.itemDrop.type,N:k.freeReward.itemDrop.N*F}],showGotItem:!1,sourceType:li.C.BattlePass}).catch(j.RQr.createHandler("BattlePassInfiniteTierComponent: Failed to grant reward"))})).catch(j.RQr.createHandler(`BattlePassInfiniteTierComponent: Failed to claim battle pass reward ${U}`)),this._claimedAnimationAnimator.GameObject.active=!0;const G=k.freeReward,$=("currency"===G.itemDrop.type||"gold"===G.itemDrop.type)&&null!==(B=Ns[G.itemDrop.ID])&&void 0!==B?B:Ms;this._claimedAnimationAnimator.playAnimation($,!1)}setUpProgressBar(k){if(!this._progressBarState)return void j.VyI.log("BattlePassInfiniteTierComponent does not have a progress bar state assigned.",j.$bb.Error);const B=k.currentProgress/k.targetProgress,U=k.isCurrentTier?`${k.currentProgress} / ${k.targetProgress}`:"--";this._progressBarState.applyStateToProgressBar(this._progressBar,B,U)}setUpClaimButton(k,B){B<=0?this._claimButtonParent.active=!1:(this._claimButtonParent.active=!0,this._claimButton.useHandCursor=!0,this.setUpClaimButtonText(B),this.assignListenerToSignal(this._claimButton.onClick,this.claimButtonClickEvent))}assignListenerToSignal(k,B){k.has(B,this)||k.add(B,this)}setUpClaimButtonText(k){let B=(0,ms.k)("BTN_COLLECT");k>1&&(B+=` x${k}`),this._claimButton.text=B,this._claimButton.regenerateButton()}claimButtonClickEvent(){this._claimButton.onClick.removeAll(),this.claimRewards(this._infiniteTierData),this._claimedAnimationAnimator.OnAnimationComplete.addOnce((()=>{this.onRewardClaimed.dispatch()}));const k=tt.q.instance.prodigy.gameContainer.get("c47-20b6");k.battlePass.generateRewardClaimedTransactionId(),k.featureCommon.sendButtonEvent({buttonName:Is.k.BattlePassClaimInfiniteTierButton,interfaceName:us.B.BattlePassMenu,interfaceType:ui.Wm.BattlePass,transactionId:k.battlePass.rewardClaimedTransactionId})}itemCardClickEvent(){const k="gold"===this._infiniteTierData.freeReward.itemDrop.type?"currency":this._infiniteTierData.freeReward.itemDrop.type;tt.q.instance.prodigy.open.itemInfo({ID:this._infiniteTierData.freeReward.itemDrop.ID,L:0,type:k},null,Ds.s.View)}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ks.prototype,"onRewardClaimed",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ks.prototype,"_currentTierIcon",void 0),(0,G.Cg)([(0,j.MnK)(Ls),(0,G.Sn)("design:type",Ls)],ks.prototype,"_itemCard",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],ks.prototype,"_itemCardButton",void 0),(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],ks.prototype,"_itemCardSparkle",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ks.prototype,"_claimButtonParent",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],ks.prototype,"_claimButton",void 0),(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],ks.prototype,"_claimButtonSparkle",void 0),(0,G.Cg)([(0,j.MnK)(ys.z),(0,G.Sn)("design:type",ys.z)],ks.prototype,"_progressBar",void 0),(0,G.Cg)([(0,j.MnK)(_s),(0,G.Sn)("design:type",_s)],ks.prototype,"_progressBarState",void 0),(0,G.Cg)([(0,j.MnK)(_s),(0,G.Sn)("design:type",_s)],ks.prototype,"_upcomingTierProgressBarState",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],ks.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],ks.prototype,"_claimedAnimationAnimator",void 0),ks=(0,G.Cg)([(0,j.EVk)("BattlePassInfiniteTier",W.Y.battlePass)],ks);var Bs=U(63011),Us=U(64353),Fs=U(95057),Gs=U(98252),js=U(66207);let $s=class extends j.uAl{constructor(){super(...arguments),this._chaseRewardsDisplay=[]}create(){super.create(),this.updateMembershipButton(),this.setUpBattlePassDataUi().catch(j.RQr.createHandler("BattlePassLeftPanel: Failed to set up panel data")),this._battlePassQuestManager.getCurrentBattlePassData().then((k=>(0,G.sH)(this,void 0,void 0,(function*(){if(!k)return;const B=k.getChasePrizes();for(let k=1;kthis.updateMembershipButton())).catch((k=>j.RQr.logError(k,"Failed to open battle pass ultimate member upsell modal")))}destroy(){super.destroy(),this._memberUnlockButton.onClick.removeAll()}};(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],$s.prototype,"_battlePassQuestManager",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",Array)],$s.prototype,"_chaseRewardsDisplay",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],$s.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],$s.prototype,"_memberUnlockButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$s.prototype,"_memberIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$s.prototype,"_ultimateMemberIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$s.prototype,"_memberUnlockText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$s.prototype,"_ultimateMemberUnlockText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$s.prototype,"_currentUltimateMemberText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$s.prototype,"_chaseRewardsParent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$s.prototype,"_ultraMembershipWidget",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],$s.prototype,"_backgroundImage",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],$s.prototype,"_ultimateActivatedText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$s.prototype,"_mythicPet",void 0),$s=(0,G.Cg)([(0,j.EVk)("BattleLeftPanelComponent",W.Y.battlePass)],$s);let Hs=class extends j.uAl{create(){const k=Object.create(null,{create:{get:()=>super.create}});return(0,G.sH)(this,void 0,void 0,(function*(){k.create.call(this);const B=yield this._questManager.getCurrentBattlePassData();if(!B)return void j.VyI.log("Battle pass track was unable to retrieve quest data for the current battle pass.",j.$bb.Error);const U=this.getInjectedValue(hs.XU.ItemTierNumber),F=B.getTierData(U);if(!F)return void j.VyI.log(`Battle pass track was unable to retrieve tier data for tier ${U}.`,j.$bb.Error);const G=dt().chain([F.topPremiumReward,F.bottomPremiumReward]).reject((k=>k.claimable||k.claimed)).sortBy((k=>k.membershipTier)).value();if(js.D.isFeatureEnabled())this._levelUpMemberVisuals.active=!1,this._ultimateMemberVisuals.active=!1,this._ultraMemberVisuals.active=!0;else{const k=dt().last(G).membershipTier!==xs._$.MemberLevelUp;this._levelUpMemberVisuals.active=!k,this._ultimateMemberVisuals.active=k,this._ultraMemberVisuals.active=!1}G.length>=2?yield Promise.all([this.setUpItemCard(this._leftPremiumItemCard,G[0]),this.setUpItemCard(this._rightPremiumItemCard,G[1])]):1===G.length?yield this.setUpItemCard(this._midPremiumItemCard,G[0]):j.VyI.log(`${G.length} rewards were eligible to display`,j.$bb.Error)}))}setUpItemCard(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=yield this._prefabLoader.loadWithDependenciesFromGUID(Rt.l.BattlePassLargeItemCard);U.parent=k,yield U.findComponentInChildren(Ls).setUp(B)}))}};(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],Hs.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Hs.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Hs.prototype,"_midPremiumItemCard",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Hs.prototype,"_leftPremiumItemCard",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Hs.prototype,"_rightPremiumItemCard",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Hs.prototype,"_levelUpMemberVisuals",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Hs.prototype,"_ultimateMemberVisuals",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Hs.prototype,"_ultraMemberVisuals",void 0),Hs=(0,G.Cg)([(0,j.EVk)("BattlePassMembershipModal",W.Y.battlePass)],Hs);var Vs=U(68834),Ws=U(53151),qs=U(94566),Ks=U(69698);let zs=class extends j.uAl{postCreate(){super.postCreate(),this._closeCallback=this.getInjectedValue(hs.XU.CloseCallback),this._homeTabToggle.onSelected.add(this.loadScreen,this,0,Vs.H2.Home),this._rewardsTabToggle.onSelected.add(this.loadScreen,this,0,Vs.H2.Rewards),this._questsTabToggle.onSelected.add(this.loadScreen,this,0,Vs.H2.Quests),this._battlePassQuestManager.getCurrentBattlePassData().then((k=>{const B=this.getInjectedValue(hs.XU.FocusTabOverride);k?B?this.openScreenAndSwitchTab(B):Ws.h.isFeatureEnabled()?this.openScreenAndSwitchTab(Vs.H2.Rewards):k.hasMadeQuestProgress()?this.openScreenAndSwitchTab(Vs.H2.Quests):this.openScreenAndSwitchTab(Vs.H2.Home):(this.openScreenAndSwitchTab(Vs.H2.Rewards),this._homeTabToggle.GameObject.active=!1,this._questsTabToggle.GameObject.active=!1)})).catch(j.RQr.createHandler("BattlePassMenuBarControllerComponent: Error setting default tab state"))}loadScreen(k){(()=>(0,G.sH)(this,void 0,void 0,(function*(){let B;switch(this._loadingScreen.active=!0,this._inputBlocker.active=!0,this._screenContainer.children.forEach((k=>{k.destroy()})),this._screenContainer.children.length=0,k){case Vs.H2.Home:B=yield this.openHomeScreen();break;case Vs.H2.Rewards:B=yield this.openRewardsScreen();break;case Vs.H2.Quests:yield this.openQuestsScreen()}if(B){const k=B.transform;k.setPivot(.5,.5),k.setAnchorMin(0,0),k.setAnchorMax(0,0)}this._loadingScreen.active=!1,this._inputBlocker.active=!1,this.sendTabSegmentEvent(k)})))().catch(j.RQr.createHandler("Error loading a screen in the battle pass menu"))}openHomeScreen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._battlePassQuestManager.getCurrentBattlePassData();if(!k)return null;const B=k.getEndDate()-this._timeManager.getServerTimeMs();return Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.BattlePassHomeScreen,{[hs.n7.TimeRemainingMs]:B,[hs.XU.MenuBarQuestsTabOpenCallback]:this.openScreenAndSwitchTab.bind(this,Vs.H2.Quests),[hs.XU.DestroyBattlePassMenuCallback]:this.destroyBattlePassMenu.bind(this),[hs.XU.CloseCallback]:this._closeCallback.bind(this)},this._screenContainer)}))}openRewardsScreen(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F;const G=yield this._battlePassQuestManager.getCurrentBattlePassData(),$=G?G.getEndDate()-this._timeManager.getServerTimeMs():0,H={[hs.n7.TimeRemainingMs]:$,[hs.XU.PremiumTrackIconAtlasGuid]:null==G?void 0:G.getPremiumTrackIconAtlasGuid(),[hs.XU.PremiumTrackIconFrameName]:null==G?void 0:G.getPremiumTrackIconFrameName(),[hs.XU.PremiumTrackName]:null==G?void 0:G.getPremiumTrackName()};if(j.Aq$.isDefined(G)){const $=null==G?void 0:G.getChasePetsUltimate(),V=null==G?void 0:G.getChasePrizes(),W=null!==(B=null===(k=$[0])||void 0===k?void 0:k.id)&&void 0!==B?B:null===(U=V[0])||void 0===U?void 0:U.id,q=null===(F=$[1])||void 0===F?void 0:F.id;j.Aq$.isDefined(W)&&(H[hs.XU.MythicGuid]=rs.Q[`Spine_pet_${W}_json`]),j.Aq$.isDefined(q)&&(H[hs.XU.UltimateMemberPetGuid]=rs.Q[`Spine_pet_${q}_json`])}const V=js.D.isFeatureEnabled()?Rt.l.BattlePassThreeTierRewardsScreen:Rt.l.BattlePassRewardsScreen;return Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,V,H,this._screenContainer)}))}openQuestsScreen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._battlePassQuestManager.getCurrentBattlePassData();if(!k)return;const B=k.getEndDate()-this._timeManager.getServerTimeMs(),U=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.BattlePassQuestsScreen,{[hs.n7.TimeRemainingMs]:B,[hs.XU.MenuBarRewardTabOpenCallback]:this.openScreenAndSwitchTab.bind(this,Vs.H2.Rewards),[hs.XU.DestroyBattlePassMenuCallback]:this.destroyBattlePassMenu.bind(this),[hs.XU.CloseCallback]:this._closeCallback.bind(this)});this._screenContainer.addChild(U)}))}openScreenAndSwitchTab(k){this.loadScreen(k),this._menuTabToggleGroup.setItemSelected(this._homeTabToggle,k===Vs.H2.Home),this._menuTabToggleGroup.setItemSelected(this._rewardsTabToggle,k===Vs.H2.Rewards),this._menuTabToggleGroup.setItemSelected(this._questsTabToggle,k===Vs.H2.Quests)}sendTabSegmentEvent(k){this._segment.featureCommon.sendTabEvent({tabName:`treasure_track_${k}_tab`,interfaceName:us.B.BattlePassMenu,interfaceType:ui.Wm.BattlePass})}closeBattlePassMenu(){var k;null===(k=this._closeCallback)||void 0===k||k.call(this),this.gameObject.destroyDeferred()}destroyBattlePassMenu(){this.gameObject.destroyRootDeferred()}};(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],zs.prototype,"_homeTabToggle",void 0),(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],zs.prototype,"_rewardsTabToggle",void 0),(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],zs.prototype,"_questsTabToggle",void 0),(0,G.Cg)([(0,j.MnK)(qs.O),(0,G.Sn)("design:type",qs.O)],zs.prototype,"_menuTabToggleGroup",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],zs.prototype,"_loadingScreen",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],zs.prototype,"_screenContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],zs.prototype,"_inputBlocker",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],zs.prototype,"_battlePassQuestManager",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],zs.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("a03-308f"),(0,G.Sn)("design:type",Ks.V)],zs.prototype,"_timeManager",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],zs.prototype,"_segment",void 0),zs=(0,G.Cg)([(0,j.EVk)("BattlePassMenuBarController",W.Y.battlePass)],zs);let Ys=class extends j.uAl{constructor(){super(...arguments),this.onBattlePassActive=new j.HN0,this.onNoBattlePassActive=new j.HN0,this.onUnclaimedRewardCountChanged=new j.HN0,this.onUnclaimedQuestCountChanged=new j.HN0,this.onUnclaimedRewardAndQuestCountChanged=new j.HN0,this.onBattlePassDataChanged=new j.HN0,this.onSlowServerRequest=new j.HN0,this.onAllSlowServerRequestsCompleted=new j.HN0,this._hasBattlePassActiveOffSeason=!0}create(){super.create(),this.handleQuestDataChange(),this._battlePassQuestManager.onDataChanged.add(this.handleQuestDataChange,this),this._battlePassQuestManager.onSlowServerRequest.add(this.handleSlowServerRequest,this),this._battlePassQuestManager.onAllSlowServerRequestsCompleted.add(this.handleSlowServerRequestsCompleted,this),this._hasBattlePassActiveOffSeason=js.D.isFeatureEnabled()}destroy(){this.onBattlePassActive.dispose(),this.onNoBattlePassActive.dispose(),this.onUnclaimedRewardCountChanged.dispose(),this.onUnclaimedQuestCountChanged.dispose(),this.onUnclaimedRewardAndQuestCountChanged.dispose(),this.onBattlePassDataChanged.dispose(),this.onSlowServerRequest.dispose(),this.onAllSlowServerRequestsCompleted.dispose(),this._battlePassQuestManager.onDataChanged.remove(this.handleQuestDataChange,this),this._battlePassQuestManager.onSlowServerRequest.remove(this.handleSlowServerRequest,this),this._battlePassQuestManager.onAllSlowServerRequestsCompleted.remove(this.handleSlowServerRequestsCompleted,this),this._battlePassQuestManager.hudButton===this.gameObject&&(this._battlePassQuestManager.hudButton=null),super.destroy()}handleQuestDataChange(){this._battlePassQuestManager.getCurrentBattlePassData().then((k=>{if(!k&&!this._hasBattlePassActiveOffSeason)return this.onNoBattlePassActive.dispatch(),void(this._previousActiveStatus=!1);if(!0!==this._previousActiveStatus&&(this.onBattlePassActive.dispatch(),this._previousActiveStatus=!0),!k)return;this.onBattlePassDataChanged.dispatch();const B=this._unclaimedRewardCount!==k.getNumUnclaimedRewards(),U=this._unclaimedQuestCount!==k.getUnclaimedQuestCount();if(this._unclaimedRewardCount=k.getNumUnclaimedRewards(),this._unclaimedQuestCount=k.getUnclaimedQuestCount(),B&&this.onUnclaimedRewardCountChanged.dispatch(this._unclaimedRewardCount>0,this._unclaimedRewardCount),U&&this.onUnclaimedQuestCountChanged.dispatch(this._unclaimedQuestCount>0,this._unclaimedQuestCount),B||U&&!Ws.h.isFeatureEnabled()){let k=this._unclaimedRewardCount;Ws.h.isFeatureEnabled()||(k+=this._unclaimedQuestCount),this.onUnclaimedRewardAndQuestCountChanged.dispatch(k>0,k)}})).catch(j.RQr.createHandler("BattlePassQuestDataComponent::handleQuestDataChange Failed to get battle pass quest data"))}handleSlowServerRequest(){this.onSlowServerRequest.dispatch()}handleSlowServerRequestsCompleted(){this.onAllSlowServerRequestsCompleted.dispatch()}sendFtueViewedEvent(){this._battlePassQuestManager.sendFtueViewedEvent().catch(j.RQr.createHandler("BattlePassQuestDataComponent: Failed to send battle pass FTUE viewed event"))}setGameObjectAsHudButton(){this._battlePassQuestManager.hudButton=this.gameObject}};(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],Ys.prototype,"_battlePassQuestManager",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ys.prototype,"onBattlePassActive",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ys.prototype,"onNoBattlePassActive",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ys.prototype,"onUnclaimedRewardCountChanged",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ys.prototype,"onUnclaimedQuestCountChanged",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ys.prototype,"onUnclaimedRewardAndQuestCountChanged",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ys.prototype,"onBattlePassDataChanged",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ys.prototype,"onSlowServerRequest",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ys.prototype,"onAllSlowServerRequestsCompleted",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Ys.prototype,"_hasBattlePassActiveOffSeason",void 0),Ys=(0,G.Cg)([(0,j.EVk)("BattlePassQuestData",W.Y.battlePass)],Ys);var Qs=U(99246);let Xs=class extends Qs.I{constructor(){super(...arguments),this.interfaceName=void 0,this.getInstanceIdFromInterface=!1}getPropertiesObject(){let k=this.instanceId;this.getInstanceIdFromInterface&&this.interfaceName&&(k=this._segment.featureCommon.getCurrentInterfaceID(this.interfaceName));return{buttonName:this.buttonName,destinationName:this.destinationName,elementType:this._elementType,elementID:this.elementId,interfaceName:this.interfaceName,interfaceType:this._interfaceType,saveClickInfo:this.saveClickInfo,instanceId:k,instanceType:this.instanceType}}};(0,G.Cg)([(0,Gi.b)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],Xs.prototype,"_segment",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xs.prototype,"buttonName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xs.prototype,"destinationName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xs.prototype,"elementId",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xs.prototype,"_elementType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xs.prototype,"interfaceName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xs.prototype,"_interfaceType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xs.prototype,"saveClickInfo",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Xs.prototype,"getInstanceIdFromInterface",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xs.prototype,"instanceId",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xs.prototype,"instanceType",void 0),Xs=(0,G.Cg)([(0,j.EVk)("SegmentButtonPropertiesProvider",W.Y.analytics)],Xs);class Zs extends j.uFJ{constructor(){super(...arguments),this.totalLifetime=3,this.burstTime=.4,this.lingerTime=2.4}update(k,B){const U=this.totalLifetime-k.life;if(Utt.q.instance.prodigy.game.time.events.remove(k)))}const B=new j.Qgu,U=new j.mYY;U.point1.setTo(this._linePoint1.x,this._linePoint1.y),U.point2.setTo(this._linePoint2.x,this._linePoint2.y);const F=new Js(this.totalAnimationTime,this._maxBurstSpeed),G=new Zs,$=this.GameObject.transform.worldMatrix.applyInverse(this.particleTargetDirection.transform.worldPosition);G.endLocationX=$.x,G.endLocationY=$.y,G.totalLifetime=this.totalAnimationTime,G.burstTime=this._burstTime,G.lingerTime=this._lingerTime,tt.q.instance.prodigy.load.assets([ps.q.Xp_stardust],(()=>{B.imageGuid=this._source,this._frame&&(B.frame=this._frame),this._particleSystem=this.gameObject.addComponent(j.okU),this._particleSystem.emitPerSecond.setMinMax(this._particlePerSecond,this._particlePerSecond),this._particleSystem.initializers=[B,U,F],this._particleSystem.behaviours=[G],this._particleSystem.worldSpace=!0,this._particleSystem.emit(this._totalParticles),this._particleSystem.emitPerSecond.setMinMax(1e-5,1e-5),this.onStartParticles.dispatch()}))}stopParticles(){this._particleSystem&&(this._particleSystem.destroy(),this._particleSystem=null,this.onStopParticles.dispatch())}destroy(){this.stopParticles(),this.onStartParticles.dispose(),this.onStopParticles.dispose(),super.destroy()}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],tn.prototype,"particleTargetDirection",void 0),(0,G.Cg)([(0,j.Bak)(),(0,j.W_S)(),(0,G.Sn)("design:type",String)],tn.prototype,"_source",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],tn.prototype,"_frame",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tn.prototype,"_particlePerSecond",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],tn.prototype,"_linePoint1",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],tn.prototype,"_linePoint2",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],tn.prototype,"_autoRun",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],tn.prototype,"onStartParticles",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],tn.prototype,"onStopParticles",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tn.prototype,"_totalParticles",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tn.prototype,"totalAnimationTime",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tn.prototype,"_burstTime",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tn.prototype,"_lingerTime",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tn.prototype,"_maxBurstSpeed",void 0),tn=(0,G.Cg)([(0,j.EVk)("ParticleBurstAndZip",W.Y.animation)],tn);var en=U(47255);let sn=class extends j.uAl{constructor(){super(...arguments),this.SINGLE_REWARD_QUEST_HEIGHT=124,this.DOUBLE_REWARD_QUEST_HEIGHT=154,this.MAGICOIN_ANIM_SPINE="magicoin",this.MAGICOIN_ICON_SIZE_DELTA=52,this.XP_ICON_FRAME_NAME="xp-icon-80x80",this.XP_ANIM_SPINE="treasure-token-burst",this.XP_ICON_SIZE_DELTA=33}create(){super.create(),this._closeCallback=this.getInjectedValue(hs.XU.CloseCallback),this._destroyBattlePassMenuCallback=this.getInjectedValue(hs.XU.DestroyBattlePassMenuCallback)}setup(k,B){B&&(this._particleAnimation.particleTargetDirection=B);const U=j.Aq$.isDefined(k.comingSoonDate),F=k.questType;this.goButton.GameObject.active=!1,this._questCompleteIcon.active=!1,this._questData=k,this._questType.text=this._baseLocalizer.getText(Vs.IC[F]),this._questTypeComingSoon.text=this._baseLocalizer.getText(Vs.IC[F]),this._questDescription.text=k.questDescription,this._lockedIcon.active=U,this._questTypeContainer.active=!U,this._questTypeContainerComingSoon.active=U,this.setupClaimButton(k.reward),!k.questGoButtonAction||k.reward.claimable||k.reward.claimed||k.comingSoonDate||this.setupGoButton(k.questGoButtonAction);if(!k.reward.itemDrop||!k.reward.battlePassXp?this.setupSingleReward(k.reward,U):this.setupDoubleReward(k.reward,U),k.reward.claimed)this._completeProgressBarState.applyStateToProgressBar(this._progressBar,1),this._questCompleteIcon.active=!0;else if(k.reward.claimable)this._claimableProgressBarState.applyStateToProgressBar(this._progressBar,1);else if(U)this._progressBar.setValue(1),this._comingSoonProgressBarState.applyStateToProgressBar(this._progressBar,1);else{const B=k.currentProgress/k.targetProgress,U=`${k.currentProgress} / ${k.targetProgress}`;this._normalProgressBarState.applyStateToProgressBar(this._progressBar,B,U)}this._memberIcon.active=k.isMemberQuest}setupGoButton(k){let B,U;switch(k){case Vs.Nz.EvolvePet:B=()=>{tt.q.instance.prodigy.open.pets(this._closeCallback),this._destroyBattlePassMenuCallback()},U=us.B.PetsWindow;break;case Vs.Nz.BecomeAMember:B=()=>{const k={conversionFunnelName:en.o.FunnelBattlePassMemberUnlock};tt.q.instance.prodigy.open.membershipInfo(this._closeCallback,k,"member-button"),this._destroyBattlePassMenuCallback()},U=us.B.KidsMlpModalNonMember}B&&(this._goButtonSegmentProperties.destinationName=U,this.goButton.GameObject.active=!0,this.goButton.onClick.addOnce(B,this))}updateQuestData(){this._questManager.getCurrentBattlePassData().then((k=>{var B;const U=k.getQuestById(null===(B=this._questData)||void 0===B?void 0:B.goalTaskId);U&&!ct.isEqual(this._questData,U)&&this.setup(U)})).catch(j.RQr.createHandler("BattlePassQuestGoalComponent::updateQuestData Failed to update battle pass quest data"))}setupSingleReward(k,B){this.gameObject.transform.fullHeight=this.SINGLE_REWARD_QUEST_HEIGHT,k.itemDrop?this.isMagicoinReward(k)?this.setUpMagicoinReward(k.itemDrop):this.setUpItemCard(k).catch(j.RQr.createHandler("Failed to set up a single reward item card for a battle pass quest goal")):this.setUpXpReward(k),this._doubleRewardContainer.active=!1,this._singleBackground.active=!B,this._singleBackgroundComingSoon.active=B}setupDoubleReward(k,B){this.gameObject.transform.fullHeight=this.DOUBLE_REWARD_QUEST_HEIGHT,k.itemDrop&&(this.isMagicoinReward(k)?this.setUpMagicoinReward(k.itemDrop):this.setUpItemCard(k).catch(j.RQr.createHandler("Failed to set up a single reward item card for a battle pass quest goal"))),this._secondaryRewardText.text=`+${k.battlePassXp}`,this._singleBackground.active=!1,this._singleBackgroundComingSoon.active=!1,this._doubleRewardContainer.active=!0,this._doubleBackground.active=!B,this._doubleBackgroundComingSoon.active=B}setUpItemCard(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=yield this._prefabLoader.loadWithDependenciesFromGUID(Rt.l.BattlePassItemCard);B.parent=this._primaryRewardAnchor,this._primaryRewardContainer.active=!1;const U=B.findComponent(Ls);yield U.setUp(k)}))}isMagicoinReward(k){var B,U;return"currency"===(null===(B=k.itemDrop)||void 0===B?void 0:B.type)&&27===(null===(U=k.itemDrop)||void 0===U?void 0:U.ID)}setUpMagicoinReward(k){this._primaryRewardText.text=`+${k.N}`,this._primaryRewardIcon.updateAsset(ps.q.Icon_currency_27);const B=this._primaryRewardIcon.GameObject.findComponent(j.XVE);B.setSizeDelta(this.MAGICOIN_ICON_SIZE_DELTA,this.MAGICOIN_ICON_SIZE_DELTA),B.setPositionY(-10)}setUpXpReward(k){this._primaryRewardText.text=`+${k.battlePassXp}`,this._primaryRewardIcon.updateAsset(Ve._.Ui_battle_pass_json,this.XP_ICON_FRAME_NAME);const B=this._primaryRewardIcon.GameObject.findComponent(j.XVE);B.setSizeDelta(this.XP_ICON_SIZE_DELTA,this.XP_ICON_SIZE_DELTA),B.setPositionY(-10)}setupClaimButton(k){var B;this.claimButton.GameObject.active=k.claimable,null===(B=this.claimButton.onClick)||void 0===B||B.removeAll(),k.claimable&&(this.claimButton.inputEnabled=!0,this.claimButton.onClick.add((()=>{this.claimButton.inputEnabled=!1,this.claimButton.onClick.removeAll(),this.isMagicoinReward(k)?this._claimAnimationSpineAnimator.playAnimation(this.MAGICOIN_ANIM_SPINE,!1):this._claimAnimationSpineAnimator.playAnimation(this.XP_ANIM_SPINE,!1),this.runParticleTrail(k),this._questManager.sendRewardClaimedEvent(k.rewardId).catch(j.RQr.createHandler(`Failed to claim battle pass reward ${k.rewardId}`)),this._segment.battlePass.generateRewardClaimedTransactionId(),this._segment.featureCommon.sendButtonEvent({buttonName:Is.k.BattlePassClaimQuestButton,interfaceName:us.B.BattlePassMenu,interfaceType:ui.Wm.BattlePass,transactionId:this._segment.battlePass.rewardClaimedTransactionId})})))}runParticleTrail(k){k.battlePassXp&&(this._particleAnimation.run(),this._particleAnimation.onStartParticles.add((()=>{window.setTimeout((()=>{this._particleAnimation.stopParticles()}),1e3*this._particleAnimation.totalAnimationTime)})))}destroy(){this.claimButton.onClick.removeAll(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],sn.prototype,"_segment",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],sn.prototype,"_questType",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],sn.prototype,"_questTypeComingSoon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_questTypeContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_questTypeContainerComingSoon",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],sn.prototype,"_questDescription",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],sn.prototype,"goButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],sn.prototype,"claimButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_doubleRewardContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_singleBackground",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_singleBackgroundComingSoon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_doubleBackground",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_doubleBackgroundComingSoon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_primaryRewardContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_primaryRewardAnchor",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],sn.prototype,"_primaryRewardIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],sn.prototype,"_primaryRewardText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],sn.prototype,"_secondaryRewardText",void 0),(0,G.Cg)([(0,j.MnK)(ys.z),(0,G.Sn)("design:type",ys.z)],sn.prototype,"_progressBar",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_memberIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_lockedIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_questCompleteIcon",void 0),(0,G.Cg)([(0,j.MnK)(_s),(0,G.Sn)("design:type",_s)],sn.prototype,"_normalProgressBarState",void 0),(0,G.Cg)([(0,j.MnK)(_s),(0,G.Sn)("design:type",_s)],sn.prototype,"_claimableProgressBarState",void 0),(0,G.Cg)([(0,j.MnK)(_s),(0,G.Sn)("design:type",_s)],sn.prototype,"_completeProgressBarState",void 0),(0,G.Cg)([(0,j.MnK)(_s),(0,G.Sn)("design:type",_s)],sn.prototype,"_comingSoonProgressBarState",void 0),(0,G.Cg)([(0,j.MnK)(tn),(0,G.Sn)("design:type",tn)],sn.prototype,"_particleAnimation",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],sn.prototype,"_claimAnimationSpineAnimator",void 0),(0,G.Cg)([(0,j.MnK)(Xs),(0,G.Sn)("design:type",Xs)],sn.prototype,"_goButtonSegmentProperties",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],sn.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],sn.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],sn.prototype,"_baseLocalizer",void 0),sn=(0,G.Cg)([(0,j.EVk)("BattlePassQuestGoal",W.Y.battlePass)],sn);let nn=class extends j.uAl{constructor(){super(...arguments),this._whiteXpIconTweenDuration=2,this._progressBarTweenInProgress=!1,this._hasBeenCreated=!1}postCreate(){super.postCreate(),this._goToRewardsCallback=this.getInjectedValue(hs.XU.MenuBarRewardTabOpenCallback),this.setUp().catch(j.RQr.createHandler("Error setting up the battle pass reward tracker on the quests screen")),this._hasBeenCreated=!0}setUp(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._questManager.getCurrentBattlePassData(),B=yield this._questManager.getBattlePassXpData(k.getXpId());this.setUpRewardDisplay(k,B).catch(j.RQr.createHandler("BattlePassQuestRewardTrackerComponent: Error setting up the reward display"))}))}updateQuestData(){!this._progressBarTweenInProgress&&this._hasBeenCreated&&this.setUp().catch(j.RQr.createHandler("Error queuing up the next quest data update for the quest tracker progress bar of the treasure track"))}destroy(){this._whiteXpIconTween&&tt.q.instance.game.tweens.remove(this._whiteXpIconTween),this._goToRewards.onClick.removeAll(),this._progressBar.onProgress.removeAll(),this._progressBar.onTweenValueComplete.removeAll(),super.destroy()}setUpRewardDisplay(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=k.getCurrentTier(),F=k.getAllTierData(),G=k.getTierData(U);if(!this._cachedTierData)return this.setTitleText(G),this._progressBar.setFromValues(G.currentProgress,G.targetProgress),this.setUpTopGroup(k),G.isInfiniteTier?(this._topPremiumRewardItemCard.GameObject.active=!1,this._freeRewardItemCard.GameObject.active=!1,this._bottomPremiumRewardItemCard.setUp(G.freeReward).catch(j.RQr.createHandler("Error setting up the infinite tier reward item card in the reward tracker of the treasure track"))):(this._topPremiumRewardItemCard.setUp(G.topPremiumReward).catch(j.RQr.createHandler("Error setting up the top premium reward item card in the reward tracker of the treasure track")),this._bottomPremiumRewardItemCard.setUp(G.bottomPremiumReward).catch(j.RQr.createHandler("Error setting up the bottom premium reward item card in the reward tracker of the treasure track")),this._freeRewardItemCard.setUp(G.freeReward).catch(j.RQr.createHandler("Error setting up the free reward item card in the reward tracker of the treasure track"))),this._cachedTierData=G,void(this._previousXpData=B);const $=B.total-this._previousXpData.total;this._previousXpData=B,$>0?(this.tweenWhiteXpIcon(),yield this.tweenProgressBar(F,this._cachedTierData.tier-1,$,this._cachedTierData.currentProgress)):this.setUpTopGroup(k)}))}tweenProgressBar(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){this._progressBarTweenInProgress=!0;const $=k[B],H=$.targetProgress;if(this._progressBar.onProgress.removeAll(),this._progressBar.onProgress.add(((k,B,U)=>{const F=Math.ceil(U*H);this._progressBar.setBarText(`${F} / ${H}`)})),U>=H-F)this._progressBar.tweenValue(1),this._progressBar.onTweenValueComplete.addOnce((()=>{(()=>(0,G.sH)(this,void 0,void 0,(function*(){const G=Math.min(B+1,k.length-1);yield this.onProgressBarFilled(k[G]),yield this.tweenProgressBar(k,G,U-(H-F),0)})))().catch(j.RQr.createHandler("Error tweening the progress bar for the reward tracker in the quests screen of the treasure track"))}),this);else{const k=F+U;this._progressBar.tweenValue(k/H),this._progressBar.onTweenValueComplete.addOnce((()=>{this._progressBar.setBarText(`${k} / ${H}`),this._cachedTierData=$,this._progressBarTweenInProgress=!1,this.setUp().catch(j.RQr.createHandler("Error queuing up the next progress bar update for the reward tracker in the quests screen of the treasure track"))}),this)}}))}onProgressBarFilled(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=[];k.isInfiniteTier?(this._topPremiumRewardItemCard.GameObject.active=!1,this._freeRewardItemCard.GameObject.active=!1,B.push(this._bottomPremiumRewardItemCard.setUp(k.freeReward))):(B.push(this._topPremiumRewardItemCard.setUp(k.topPremiumReward)),B.push(this._bottomPremiumRewardItemCard.setUp(k.bottomPremiumReward)),B.push(this._freeRewardItemCard.setUp(k.freeReward))),this.setTitleText(k),this._progressBar.setValue(0),this._progressBar.setBarText(`0 / ${k.targetProgress}`),yield Promise.all(B)}))}setUpTopGroup(k){const B=k.getNumUnclaimedRewards()>0;this._topGroupReadyToClaim.active=B,this._topGroupRegular.active=!B,this._goToRewards.onClick.add(this._goToRewardsCallback.bind(this))}tweenWhiteXpIcon(){if(this._whiteXpIconTween)return;const k={progress:0};this._whiteXpIconTween=tt.q.instance.prodigy.game.add.tween(k,this).to({progress:1},1e3*this._whiteXpIconTweenDuration,j.GS3.Linear.None,!1),this._whiteXpIconTween.onUpdate.add((()=>{let B;B=k.progress<=.5?j.cj9.inverseLerp(0,.5,k.progress):j.cj9.inverseLerp(1,.5,k.progress),this._whiteXpIcon.alpha=B})),this._whiteXpIconTween.onTweenComplete.add((()=>{this._whiteXpIcon.GameObject.active=!1,tt.q.instance.game.tweens.remove(this._whiteXpIconTween),this._whiteXpIconTween=null})),this._whiteXpIcon.alpha=0,this._whiteXpIcon.GameObject.active=!0,this._whiteXpIconTween.start()}setTitleText(k){this._treasureTitle.text=k.isInfiniteTier?(0,ms.k)("TT_INFINITE_TREASURE"):(0,ms.k)("TT_TREASURE_N",k.tier.toString())}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],nn.prototype,"_treasureTitle",void 0),(0,G.Cg)([(0,j.MnK)(ys.z),(0,G.Sn)("design:type",ys.z)],nn.prototype,"_progressBar",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],nn.prototype,"particleEndLocation",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],nn.prototype,"_whiteXpIcon",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],nn.prototype,"_whiteXpIconTweenDuration",void 0),(0,G.Cg)([(0,j.MnK)(Ls),(0,G.Sn)("design:type",Ls)],nn.prototype,"_topPremiumRewardItemCard",void 0),(0,G.Cg)([(0,j.MnK)(Ls),(0,G.Sn)("design:type",Ls)],nn.prototype,"_bottomPremiumRewardItemCard",void 0),(0,G.Cg)([(0,j.MnK)(Ls),(0,G.Sn)("design:type",Ls)],nn.prototype,"_freeRewardItemCard",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],nn.prototype,"_topGroupReadyToClaim",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],nn.prototype,"_topGroupRegular",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],nn.prototype,"_goToRewards",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],nn.prototype,"_questManager",void 0),nn=(0,G.Cg)([(0,j.EVk)("BattlePassQuestRewardTracker",W.Y.battlePass)],nn);let an=class extends j.uAl{constructor(){super(...arguments),this._questTabs=[]}postCreate(){super.postCreate(),this._closeCallback=this.getInjectedValue(hs.XU.CloseCallback),this._destroyBattlePassMenuCallback=this.getInjectedValue(hs.XU.DestroyBattlePassMenuCallback),this.setUpPanelImage().catch(j.RQr.createHandler("BattlePassQuestScreenControllerComponent: Failed to set up panel image")),this._battlePassQuestManager.getCurrentBattlePassData().then((k=>{const B=k.getQuestTypes(),U=B.map((k=>{const B=Vs.IC[k];if(!B)return k;const U=this._baseLocalizer.getText(B);return null!=U?U:k}));for(let F=0;F{this.populateQuests(B[F]).catch(j.RQr.createHandler(`Unable to populate quests for the ${B[F]} tab.`))}),this)}else k.active=!1}this.populateQuests(B[0]).catch(j.RQr.createHandler("Error populating quests in the battle pass quest screen controller component"))})).catch(j.RQr.createHandler("Error retrieving battle pass data for the battle pass quests screen"))}destroy(){var k;if(this._prefabLoadCancelablePromises)for(let B=0;B{const U=k=>{if(k.reward.claimable)return Number.MAX_VALUE;if(k.reward.claimed)return-Number.MAX_VALUE;if(k.sortPriority)return k.sortPriority;return k.currentProgress/k.targetProgress*100};return U(B)-U(k)})),F=this._questGridLayout,j=[];for(let k=0;k(0,G.sH)(this,void 0,void 0,(function*(){const B=Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.BattlePassQuestsComingSoonBanner,{[hs.n7.TimeRemainingMs]:k});this._prefabLoadCancelablePromises[0]=B,this._questGoalGameObjects[0]=yield B,this._questGoalGameObjects[0].name="QuestGoal-Banner"})))())}for(let k=0;k(0,G.sH)(this,void 0,void 0,(function*(){const B=U[k];if(!this._questGoalGameObjects[k+1]){const U=Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.BattlePassQuest,{[hs.XU.QuestDescription]:B.questDescription,[hs.XU.QuestType]:B.questType,[hs.XU.CloseCallback]:this._closeCallback.bind(this),[hs.XU.DestroyBattlePassMenuCallback]:this._destroyBattlePassMenuCallback.bind(this)});this._prefabLoadCancelablePromises[k+1]=U,this._questGoalGameObjects[k+1]=yield U,this._questGoalGameObjects[k+1].name=`QuestGoal-${k+1}`}const F=this._questGoalGameObjects[k+1].findComponent(sn);null==F||F.setup(B,this._rewardTracker.particleEndLocation)})))());yield Promise.all(j),H&&(this._questGoalGameObjects[0].active=!0,F.GameObject.addChild(this._questGoalGameObjects[0]));for(let k=1;k{tt.q.instance.prodigy.open.itemInfo(F)}));B||(this._cardOnClickButton.useHandCursor=!0);const H=this.getInjectedValue(hs.XU.RewardClaimedAnimationName),V=this.getInjectedValue(hs.XU.RewardMovementAnimationName),W=this.getInjectedValue(hs.XU.ItemTierNumber);this._claimedMovementAnimator.GameObject.active=!0,this._cardOnClickButton.onClick.add((()=>{if(k){this._cardOnClickButton.onClick.removeAll(),this._audioPlayer.play(),this._segment.battlePass.generateRewardClaimedTransactionId(),this._segment.featureCommon.sendButtonEvent({buttonName:Is.k.BattlePassClaimRewardButton,interfaceName:us.B.BattlePassMenu,interfaceType:ui.Wm.BattlePass,transactionId:this._segment.battlePass.rewardClaimedTransactionId}),this._cardOnClickButton.useHandCursor=!1;const k=(k,B)=>{B.data.name===Cs.MysteryRewardClaimSwitch&&$&&this._iconImage.setAsset(F.itemDrop.ID,F.itemDrop.type).catch(j.RQr.createHandler("[BattlePassRewardsScreenItemCard] Error setting the icon asset after mystery reward claim"))};this._claimedMovementAnimator.spine.onEvent.addOnce(k,this),this._claimedMovementAnimator.OnAnimationComplete.addOnce((()=>{$||this._claimedMovementAnimator.spine.onEvent.remove(k,this),this.onRewardClaimedComplete.dispatch()})),this.GameObject.findComponentsInChildren(rn.l).forEach((k=>{k.setup()})),this.onRewardClaimed.dispatch(),this._questManager.sendRewardClaimedEvent(F.rewardId).then((()=>this.onRewardClaimServerComplete.dispatch())).catch(j.RQr.createHandler(`Failed to claim battle pass reward ${F.rewardId}`)),this._claimedAnimationAnimator.playAnimation(H,!1),this._claimedMovementAnimator.playAnimation(V,!1)}else if(B)this._cardOnClickButton.useHandCursor=!1;else if(this._currentPlayer.player.isPlayingAtSchool()){const k=this._currentPlayer.player.getMemberTier(),B=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);let U="BATTLE_PASS_SCHOOL_MODE_CLAIM_TOOLTIP",F="";k!==xs._$.MemberLevelUp&&k!==xs._$.MemberCore||(U="BATTLE_PASS_SCHOOL_MODE_LEVEL_UP_CLAIM_TOOLTIP",F=B.getText(js.D.isFeatureEnabled()?"MEMBERSHIP_TIER_NAME_PLUS":"MEMBERSHIP_TIER_2_SHORT_NAME")),this._autoToolTip=on.A.displayToolTipAuto(this._autoToolTip,this._tooltipContainer,{bodyText:B.getText(U,F),xPosition:640,yPosition:100,arrowXRelPos:.7,arrowDirection:ze.i.DOWN})}else{let k=G?"Click-Ultimate-Item-Treasure-Track":"Click-Item-Treasure-Track";js.D.isFeatureEnabled()&&(k=G?"Click-Tier-2-Item-Treasure-Track":"Click-Tier-1-Item-Battle-Pass"),tt.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:k,category:"Treasure-Track",contentId:`${F.itemDrop.type}-${F.itemDrop.ID}`,adType:Fs.R.BattlePassUpsell}),js.D.isFeatureEnabled()?tt.q.instance.prodigy.open.itemInfo(F):tt.q.instance.prodigy.open.battlePassMembershipModal(W).catch(j.RQr.createHandler("Failed to open battle pass membership modal"))}}))}destroy(){this.onRewardClaimedComplete.dispose(),this.onRewardClaimed.dispose(),this.onRewardClaimServerComplete.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],cn.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],cn.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],cn.prototype,"_segment",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],cn.prototype,"_cardOnClickButton",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cn.prototype,"onRewardClaimedComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cn.prototype,"onRewardClaimed",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cn.prototype,"onRewardClaimServerComplete",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],cn.prototype,"_claimedAnimationAnimator",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],cn.prototype,"_claimedMovementAnimator",void 0),(0,G.Cg)([(0,j.MnK)(hn.J),(0,G.Sn)("design:type",hn.J)],cn.prototype,"_audioPlayer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cn.prototype,"_tooltipContainer",void 0),(0,G.Cg)([(0,j.MnK)(os.X),(0,G.Sn)("design:type",os.X)],cn.prototype,"_iconImage",void 0),cn=(0,G.Cg)([(0,j.EVk)("BattlePassRewardsScreenItemCard",W.Y.battlePass)],cn);var dn=U(223),ln=U(77981),un=U(89305),fn=U(9475),bn=U(1959);let pn=class extends j.uAl{constructor(){super(...arguments),this.coreChaseItems=[],this.plusChaseItems=[],this.ultraChaseItems=[],this.coreGroupLabels=[],this.plusGroupLabels=[],this.ultraGroupLabels=[],this.showOtpUpsell=!1}create(){const k=Object.create(null,{create:{get:()=>super.create}});return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G,$,H,V,W,q,K,z,Y,Q,X,Z,J,et,it,st,nt;k.create.call(this),this._battlePassQuestData=yield this._questManager.getCurrentBattlePassData();const at={};if(this._battlePassQuestData){const k=null===(B=this._battlePassQuestData)||void 0===B?void 0:B.getThreeTierPlusAnimatedPets(),H=null===(U=this._battlePassQuestData)||void 0===U?void 0:U.getThreeTierUltraAnimatedPets(),V=null!==(F=null==k?void 0:k[0])&&void 0!==F?F:void 0,W=null!==(G=null==H?void 0:H[0])&&void 0!==G?G:void 0,q=null!==($=null==H?void 0:H[1])&&void 0!==$?$:void 0;j.Aq$.isDefined(V)&&(at[hs.XU.LevelupMythicGuid]=rs.Q[`Spine_pet_${V}_json`]),j.Aq$.isDefined(W)&&(at[hs.XU.MythicGuid]=rs.Q[`Spine_pet_${W}_json`]),j.Aq$.isDefined(q)&&(at[hs.XU.UltimateMemberPetGuid]=rs.Q[`Spine_pet_${q}_json`]),at[hs.XU.MagicoinAmount]=fn.S.DEFAULT_MAGICOIN_AMOUNT}else at[hs.XU.MagicoinAmount]=fn.S.DEFAULT_MAGICOIN_AMOUNT;Nt.d.updateInjectedValues(this.gameObject,at);const rt=this._loggedInPlayer.player.getMemberTier(),ot=(0,Bt.G)(dn.l).enabled;let ht=!1,ct=!1,dt=!1;const lt=this.showOtpUpsell&&ot,ut=(0,un.nO)(ln.r.English);if(Gs.pF.eligibleForMembershipPurchaseForMultipleTiers()?rt===xs._$.NonMember?(ht=this.coreMemberCTA&&!lt,ct=!lt,dt=!0):(ht=this.coreMemberCTA&&rt===xs._$.MemberCore&&!lt,ct=(rt===xs._$.MemberCore||rt===xs._$.MemberPlus&&!ut)&&!lt,dt=!ut&&rt!==xs._$.MemberUltra):(ht=this.coreMemberCTA&&rt===xs._$.NonMember&&!Gs.pF.isNativeApp(),ct=rt===xs._$.NonMember||rt===xs._$.MemberCore),!(ht||ct||dt||lt)){const k=rt===xs._$.MemberUltra||this.showOtpUpsell?"YOU_DONT_HAVE_ENOUGH_MAGICOIN":"MEMBER_AD_VISIT_SITE_BODY";tt.q.instance.prodigy.open.message(this._localizer.getText(k)),this.GameObject.destroyDeferred()}if(ht){const k=null!==(H=bn.A.CHASE_PRIZES.coreChaseItems)&&void 0!==H?H:[];for(let U=0;UU){if(k[U].disable){this.coreChaseItems[U].active=!1;continue}this.coreChaseItems[U].findComponentInChildren(j.EYj).text=1===k[U].quantity?"":null!==(W=null===(V=k[U].quantity)||void 0===V?void 0:V.toString())&&void 0!==W?W:"",this.coreChaseItems[U].findComponentInChildren(os.X).setAsset(k[U].id,k[U].type).catch((k=>{j.VyI.log(`Battle pass was unable to load asset for level up chase item at index ${U}`,j.$bb.Error)}))}const B=null===(q=this._battlePassQuestData)||void 0===q?void 0:q.getThreeTierCoreLabels();for(let U=0;UU){if(k[U].disable){this.plusChaseItems[U].active=!1;continue}this.plusChaseItems[U].findComponentInChildren(j.EYj).text=1===k[U].quantity?"":null!==(Q=null===(Y=k[U].quantity)||void 0===Y?void 0:Y.toString())&&void 0!==Q?Q:"",this.plusChaseItems[U].findComponentInChildren(os.X).setAsset(k[U].id,k[U].type).catch((k=>{j.VyI.log(`Battle pass was unable to load asset for level up chase item at index ${U}`,j.$bb.Error)}))}const B=null===(X=this._battlePassQuestData)||void 0===X?void 0:X.getThreeTierPlusLabels();for(let U=0;UU){if(k[U].disable){this.ultraChaseItems[U].active=!1;continue}this.ultraChaseItems[U].findComponentInChildren(j.EYj).text=1===k[U].quantity?"":null!==(it=null===(et=k[U].quantity)||void 0===et?void 0:et.toString())&&void 0!==it?it:"",this.ultraChaseItems[U].findComponentInChildren(os.X).setAsset(k[U].id,k[U].type).catch((k=>{j.VyI.log(`Battle pass was unable to load asset for ultimate chase item at index ${U}`,j.$bb.Error)}))}const B=null===(st=this._battlePassQuestData)||void 0===st?void 0:st.getThreeTierUltraLabels();for(let U=0;U1&&(Z[`${V.ChaseItemUltraQuantityPrefix}${j}`]=X[j].quantity),Z[`${V.ChaseItemUltraPrefix}${j}`]=[X[j].id,X[j].type];const J=null!==(G=null==H?void 0:H.getThreeTierPlusChaseItems())&&void 0!==G?G:bn.A.CHASE_PRIZES.plusChaseItems,tt={};for(let j=0;j1&&(tt[`${V.ChaseItemPlusQuantityPrefix}${j}`]=J[j].quantity),tt[`${V.ChaseItemPlusPrefix}${j}`]=[J[j].id,J[j].type];const et=null!==($=null==H?void 0:H.getThreeTierCoreChaseItems())&&void 0!==$?$:bn.A.CHASE_PRIZES.coreChaseItems,it={};for(let j=0;j1&&(it[`${V.ChaseItemCoreQuantityPrefix}${j}`]=et[j].quantity),it[`${V.ChaseItemCorePrefix}${j}`]=[et[j].id,et[j].type];const st=null==H?void 0:H.getThreeTierCoreLabels(),nt=null==H?void 0:H.getThreeTierPlusLabels(),at=null==H?void 0:H.getThreeTierUltraLabels(),rt=Object.assign(Object.assign(Object.assign({},st.reduce(((k,B,U)=>Object.assign(Object.assign({},k),{[`${V.ChaseItemCoreTextPrefix}${U}`]:B})),{})),nt.reduce(((k,B,U)=>Object.assign(Object.assign({},k),{[`${V.ChaseItemPlusTextPrefix}${U}`]:B})),{})),at.reduce(((k,B,U)=>Object.assign(Object.assign({},k),{[`${V.ChaseItemUltraTextPrefix}${U}`]:B})),{})),ot=this._loggedInPlayer.player.getMemberTier(),ht={[V.IsPlayerCoreMember]:ot===xs._$.MemberCore,[V.IsPlayerPlusMember]:ot===xs._$.MemberPlus,[V.IsPlayerUltraMember]:ot===xs._$.MemberUltra,[V.ShowCorePanel]:xs._$.NonMember||ot===xs._$.MemberCore,[V.ShowCoreCta]:ot===xs._$.NonMember,[V.ShowPlusPanel]:ot!==xs._$.MemberUltra,[V.ShowPlusCta]:ot===xs._$.NonMember||ot===xs._$.MemberCore,[V.ShowUltraCta]:ot!==xs._$.MemberUltra};Nt.d.updateInjectedValues(this.gameObject,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Q),Z),tt),it),rt),ht))}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],vn.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],vn.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],vn.prototype,"_bindOnCreate",void 0),vn=(0,G.Cg)([(0,j.EVk)("BattlePassThreeTierChaseItemsDataProvider",W.Y.battlePass)],vn);var gn,mn=U(87490),yn=U(38156);let _n=gn=class extends j.uAl{constructor(){super(...arguments),this._itemCards=[],this._loadingSpinners=[],this._itemCardPromises=[],this._pauseUpdates=0}setup(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this._tierNumber)return this._tierNumber=k,this._questManager.onDataChanged.add((()=>{this.updateData().catch(j.RQr.createHandler("Failed to update tier after battle pass data update"))}),this),this.updateData()}))}updateData(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;if(this._pauseUpdates>0)return;const U=null===(k=yield this._questManager.getCurrentBattlePassData())||void 0===k?void 0:k.getTierData(this._tierNumber);if(U&&dt().isEqual(this._currentTierData,U))return;this._currentTierData=U,this._currentTierIcon.active=null!==(B=null==U?void 0:U.isCurrentTier)&&void 0!==B&&B,this._completedTierBackground.active=!1,this._currentTierBackground.active=!1,j.Aq$.isDefined(this._uncompletedTierBackground)&&(this._uncompletedTierBackground.active=!1),U&&(U.isCompleted?(this._completedTierBackground.active=!0,this._currentTierBackground.destroy()):U.isCurrentTier?(this._currentTierBackground.active=!0,this._completedTierBackground.destroy()):j.Aq$.isDefined(this._uncompletedTierBackground)&&(this._uncompletedTierBackground.active=!0)),this.setUpProgressBar(U);(U?[U.topPremiumReward,U.bottomPremiumReward,U.freeReward]:[{rewardId:gn.EMPTY_REWARD_ID,membershipTier:xs._$.MemberUltimateMath},{rewardId:gn.EMPTY_REWARD_ID,membershipTier:xs._$.MemberLevelUp},{rewardId:gn.EMPTY_REWARD_ID,membershipTier:xs._$.NonMember}]).forEach(((k,B)=>{var G,j;if(k){const $=null!==(G=null==U?void 0:U.tier)&&void 0!==G?G:B+1;this._itemCardPromises.push(this.setUpItemCard(this._itemCards[B],k,$,null!==(j=null==U?void 0:U.isCompleted)&&void 0!==j&&j,this._loadingSpinners[B]).then((()=>{this._itemCards[B].findComponentInChildren(F.$).getRootContainer().name=`Tier ${$} ${this._itemCards[B].name}`})))}})),yield Promise.all(this._itemCardPromises.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k.promise})))))}))}destroy(){this._itemCardPromises.forEach((k=>k.cancel())),this._questManager.onDataChanged.removeAll(this),super.destroy()}setUpItemCard(k,B,U,F,G){var $,H,V,W,q;const K=null===(V=Yt.t.getItem(null===($=B.itemDrop)||void 0===$?void 0:$.type,null===(H=B.itemDrop)||void 0===H?void 0:H.ID))||void 0===V?void 0:V.data,z=null!==(W=null==K?void 0:K.rarity)&&void 0!==W?W:0;let Y="";B.itemDrop?Y=("currency"===B.itemDrop.type||"gold"===B.itemDrop.type)&&null!==(q=Ns[B.itemDrop.ID])&&void 0!==q?q:Ms:G.active=!1;const Q=B.isMystery?"claim-mystery":"claim";let X="";(F&&!B.claimed||js.D.isFeatureEnabled())&&(X=B.membershipTier===xs._$.MemberUltimateMath?Ve._.Ui_battle_pass_ultimate_json:Ve._.Ui_battle_pass_json);let Z=ws.Free,J=0,et=Ts.Free;B.membershipTier===xs._$.MemberUltimateMath?(Z=ws.Ultimate,J=50,et=Ts.Plus):B.membershipTier===xs._$.MemberLevelUp&&(Z=ws.Premium,et=Ts.Core);let it=Rt.l.BattlePassRewardsScreenItemCard,st=B.membershipTier===xs._$.MemberLevelUp,nt=B.membershipTier===xs._$.MemberUltimateMath,at=F&&!B.claimed;if(js.D.isFeatureEnabled()){it=Rt.l.BattlePassRewardsScreenItemCardWithLock;const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getMemberTier();B.claimed||B.claimable?(st=!1,nt=!1):(st=st&&k===xs._$.NonMember,nt=nt&&(k===xs._$.NonMember||k===xs._$.MemberLevelUp||k===xs._$.MemberCore))}else{const k=Ws.h.isFeatureEnabled()&&yn.n.playerMembershipMeetsRewardMembership(B.membershipTier)||!Ws.h.isFeatureEnabled();at=at&&k}const rt=new j.kBN((($,H)=>{var V,W,q;Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,it,{[hs.XU.ItemCardRarityBackgroundAtlasGuid]:Ve._.Ui_battle_pass_json,[hs.XU.ItemCardRarityBackgroundFrameName]:Object.values(Es)[z],[hs.XU.ItemCardClaimableBorderAtlasGuid]:X,[hs.XU.ItemCardClaimableBorderFrameName]:Z,[hs.XU.ItemCardClaimableBorderFrameSizeDelta]:[J,J],[hs.XU.ItemCardOffSeasonStateAtlasGuid]:Ve._.Ui_battle_pass_ultimate_json,[hs.XU.ItemCardOffSeasonStateFrameName]:et,[hs.XU.ItemCardOffSeasonStateIsEnabled]:B.rewardId===gn.EMPTY_REWARD_ID,[hs.XU.ItemCardCollectedTextBackingColour]:Object.values(Ss)[z],[hs.XU.ItemCardCollectedTextBackingStrokeColour]:Object.values(As)[z],[hs.XU.ItemCardCollectedTextColour]:null!==(V=Ps[z])&&void 0!==V?V:"#FFFFFF",[hs.XU.ItemRewardId]:B.isMystery&&!B.claimed?182:null===(W=B.itemDrop)||void 0===W?void 0:W.ID,[hs.XU.ItemRewardType]:B.isMystery&&!B.claimed?"item":null===(q=B.itemDrop)||void 0===q?void 0:q.type,[hs.XU.ItemTierNumber]:U,[hs.XU.IsMysteryReward]:B.isMystery,[hs.XU.IsLevelupMemberReward]:st,[hs.XU.IsUltimateMemberReward]:nt,[hs.XU.Reward]:B,[hs.XU.RewardAmount]:B.itemDrop?`x${B.itemDrop.N}`:"",[hs.XU.RewardClaimable]:B.claimable,[hs.XU.RewardClaimed]:B.claimed,[hs.XU.RewardClaimedAnimationGuid]:rs.Q.Spine_claim_currency_json,[hs.XU.RewardClaimedAnimationName]:Y,[hs.XU.RewardMovementAnimationName]:Q,[hs.XU.ShowRewardClaimableAnimation]:at,[hs.XU.RewardClaimableAnimationName]:[B.membershipTier===xs._$.MemberUltimateMath?"idle-ready-ultimate":"idle-ready",!0],[hs.XU.ShowRewardAmount]:B.itemDrop&&!B.isMystery&&!B.claimed&&B.itemDrop.N>1,[hs.XU.TierComplete]:F,[hs.XU.ShouldHighlightCard]:!0}).then((B=>{if(rt.cancelled||!B||B.isDestroyed)(null==B?void 0:B.isDestroyed)||B.destroy();else{k.children.forEach((k=>{k.destroy()}));const U=B.transform;B.parent=k,U.setPivot(.5,.5),U.setAnchorMin(.5,.5),U.setAnchorMax(.5,.5);const F=B.findComponentInChildren(os.X);F&&(F.isLoaded?G.active=!1:F.onItemDataLoaded.addOnce((()=>{G.active=!1}))),this.setUpRewardClaimHandlers(B.findComponentInChildren(cn))}$()})).catch(j.RQr.createHandler("Failed to load an item card in a battle pass tier"))}));return rt}setUpRewardClaimHandlers(k){k.onRewardClaimed.addOnce((()=>{this._pauseUpdates+=2}));const B=()=>{this._pauseUpdates--,this.updateData().catch(j.RQr.createHandler("Failed to update tier after pausing for reward claim"))};k.onRewardClaimServerComplete.addOnce(B),k.onRewardClaimedComplete.addOnce(B)}setUpProgressBar(k){if(this._progressBarCompleteIcon.active=!1,this._xpIcon.active=!1,this.setTierTitle(k),k)if(k.isCompleted)this.claimableRewardsExist(k)?this.applyStateToProgressBar(this._claimableProgressBarState,1):(this.applyStateToProgressBar(this._completeProgressBarState,1),It.O.isEnglishLocale()&&(this._progressBarCompleteIcon.active=!0));else if(k.isCurrentTier){const B=k.currentProgress/k.targetProgress,U=`${k.currentProgress} / ${k.targetProgress}`;this.applyStateToProgressBar(this._normalProgressBarState,B,U),this._xpIcon.active=!0}else this.applyStateToProgressBar(this._normalProgressBarState,0,"--");else this.applyStateToProgressBar(this._normalProgressBarState,0,"")}claimableRewardsExist(k){return k.topPremiumReward.claimable||k.bottomPremiumReward.claimable||k.freeReward.claimable}applyStateToProgressBar(k,B,U){k&&mn.Util.isDefined(B)&&k.applyStateToProgressBar(this._progressBar,B,U)}setTierTitle(k){const B=k?`${k.tier}`:this._tierNumber.toString();(null==k?void 0:k.isCurrentTier)?(this._currentTierTitle.text=B,this._nonCurrentTierTitle.text=""):(this._currentTierTitle.text="",this._nonCurrentTierTitle.text=B)}};_n.EMPTY_REWARD_ID="empty",(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],_n.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],_n.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_n.prototype,"_currentTierBackground",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_n.prototype,"_completedTierBackground",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_n.prototype,"_uncompletedTierBackground",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],_n.prototype,"_nonCurrentTierTitle",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],_n.prototype,"_currentTierTitle",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],_n.prototype,"_itemCards",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],_n.prototype,"_loadingSpinners",void 0),(0,G.Cg)([(0,j.MnK)(_s),(0,G.Sn)("design:type",_s)],_n.prototype,"_normalProgressBarState",void 0),(0,G.Cg)([(0,j.MnK)(_s),(0,G.Sn)("design:type",_s)],_n.prototype,"_claimableProgressBarState",void 0),(0,G.Cg)([(0,j.MnK)(_s),(0,G.Sn)("design:type",_s)],_n.prototype,"_completeProgressBarState",void 0),(0,G.Cg)([(0,j.MnK)(ys.z),(0,G.Sn)("design:type",ys.z)],_n.prototype,"_progressBar",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_n.prototype,"_progressBarCompleteIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_n.prototype,"_xpIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_n.prototype,"_currentTierIcon",void 0),_n=gn=(0,G.Cg)([(0,j.EVk)("BattlePassTier",W.Y.battlePass)],_n);let En=class extends j.uAl{constructor(){super(...arguments),this.onComplete=new j.HN0,this._loadOnCreate=!1}create(){super.create(),this._loadOnCreate&&this.load().catch(j.RQr.createHandler("LoadPrefabComponent: Error loading prefab on create"))}load(k=this._prefabId){var B;const U=this.gameObject.findComponent(j.bE_),F=Object.entries(null!==(B=null==U?void 0:U.injections)&&void 0!==B?B:{}).map((([k,B])=>({injectionName:k,data:B})));if(j.Aq$.isDefined(this._prefabGuid))return this._loader.loadWithDependenciesFromGUID(this._prefabGuid,this._parent,void 0,F).then((k=>(this.onComplete.dispatch(),k))).catch(j.RQr.createHandler("Error loading prefab from guid!"));if(j.Aq$.isDefined(k)){const B=tt.q.instance.prodigy.gameContainer.get("PrefabService").getPrefab(k);return this._loader.loadFromJSONWithDependencies(B,this._parent,void 0,F).then((k=>(this.onComplete.dispatch(),k))).catch(j.RQr.createHandler(`LoadPrefabComponent: Could not load prefab id ${k}`))}return new j.kBN((k=>{k(null)}))}destroy(){this.onComplete.dispose(),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],En.prototype,"_prefabId",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],En.prototype,"_prefabGuid",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],En.prototype,"_parent",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],En.prototype,"_loader",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],En.prototype,"onComplete",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],En.prototype,"_loadOnCreate",void 0),En=(0,G.Cg)([(0,j.EVk)("LoadPrefab",W.Y.utility)],En);var wn,Tn=U(37394);let Sn=wn=class extends Tn.D{constructor(){super(...arguments),this.onSetupComplete=new j.HN0,this._tiersShownAtOnce=4,this._tiersMovedAtOnce=4,this._tierShowingBuffer=1,this._centerSlotFromLeft=2,this._tierGridTweenDurationMs=750,this._leftEdgeBuffer=-20,this._rightEdgeBuffer=-20,this._tiersArrayPromises=[],this._leftMostTierIndex=1}create(){super.create(),this.createAsync().catch(j.RQr.createHandler("BattlePassTrackComponent: Failed to initialize."))}createAsync(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=yield this._questManager.getCurrentBattlePassData();if(!this._tierGrid.GameObject||this._tierGrid.GameObject.isDestroyed)return;B||this._offSeasonDialog.load(),this._tierGridRectTransform=this._tierGrid.GameObject.transform,yield this.createTiers(B);const U=this.getInjectedValue(hs.XU.FocusTierOverride);if(U){const k=this.gameObject.findComponentInParent(j.bE_,!0);null==k||k.unbindInjectedValue(hs.XU.FocusTierOverride)}yield this.centerTierGridOnCurrentTier(null!=U?U:null!==(k=null==B?void 0:B.getCurrentTier())&&void 0!==k?k:1),this.onSetupComplete.dispatch(),this._questManager.onDataChanged.add(this.handleBattlePassDataChanged,this)}))}handleBattlePassDataChanged(){this.showTiers().catch(j.RQr.createHandler("Error updating tracks after battle pass data changed."))}destroy(){this._moveTrackTween&&tt.q.instance.game.tweens.remove(this._moveTrackTween),this._tiersArrayPromises.forEach((k=>{k.cancel()})),this.onSetupComplete.dispose(),this._questManager.onDataChanged.remove(this.handleBattlePassDataChanged,this),super.destroy()}update(){super.update(),this.contentDraggingEnabled&&(this._contentClicked&&!this._contentDragged?this.checkDragStartHorizontal():this._contentDragged&&this.dragContentHorizontal())}createTiers(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U;this._numberOfRegularTiers=null!==(B=null==k?void 0:k.getNumTiers())&&void 0!==B?B:wn._DEFAULT_TIERS_OFF_SEASON;const F=null!==(U=null==k?void 0:k.hasInfiniteTier())&&void 0!==U&&U,j=F?this._numberOfRegularTiers+1:this._numberOfRegularTiers;this._tiersArrayPromises=new Array(j);let $=Rt.l.BattlePassTier,H=Rt.l.BattlePassInfiniteTier;js.D.isFeatureEnabled()&&($=Rt.l.BattlePassThreeTier,H=Rt.l.BattlePassThreeTierInfiniteTier);for(let k=0;kk.active=!1));F&&(this._tiersArrayPromises[this._numberOfRegularTiers]=this._prefabLoader.loadWithDependenciesFromGUID(H).then((k=>k.active=!1)));(yield Promise.all(this._tiersArrayPromises.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k.promise})))))).forEach((k=>{this.setupTierGameObject(k)})),this._numberOfTierGridEntries=this._tierGrid.GameObject.children.length,this._maxIndex=this._numberOfTierGridEntries-this._tiersShownAtOnce+1}))}setupTierGameObject(k){k.active=!1;const B=k.transform;k.parent=this._tierGrid.GameObject,B.setPivot(.5,.5),B.setAnchorMin(0,0),B.setAnchorMax(0,0)}showTiers(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._questManager.getCurrentBattlePassData();if(!this.gameObject||this.gameObject.isDestroyed)return;const B=this._leftMostTierIndex-1,U=this._leftMostTierIndex+this._tiersShownAtOnce;for(let F=0;F=B&&G<=U,G>=B-this._tiersMovedAtOnce&&G<=U+this._tiersMovedAtOnce&&this.setupVisibleGridObject(k,$,F).catch(j.RQr.createHandler("BattlePassTrackComponent: Error setting up a visible battle pass tier"))}this.setupNotificationBadges(k,this._leftMostTierIndex)}))}setupNotificationBadges(k,B){if(!k)return;const U=B+this._tiersShownAtOnce-1,F=k.getAllTierData(),G=k.getInfiniteTierData().timesClaimed{var F,j,$;const H=(null===(F=k.freeReward)||void 0===F?void 0:F.claimable)||(null===(j=k.topPremiumReward)||void 0===j?void 0:j.claimable)||(null===($=k.bottomPremiumReward)||void 0===$?void 0:$.claimable)||k.isInfiniteTier&&G;k.tierU&&H&&(this._rewardsToTheRightNotificationBadge.active=!0)}))}setupVisibleGridObject(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){var F;const G=null==k?void 0:k.getAllTierData(),j=null!==(F=null==G?void 0:G[U])&&void 0!==F?F:{tier:U+1};if(j.isInfiniteTier)return this.setupInfiniteTierComponent(B,k);const $=B.findComponent(_n);yield $.setup(j.tier)}))}setupInfiniteTierComponent(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=k.findComponent(ks),F=B.getInfiniteTierData();U&&F&&(yield U.setup(F).catch(j.RQr.createHandler("Error setting up the infinite battle pass tier.")))}))}moveTrackToIndex(k,B=!0){this._leftMostTierIndex=j.cj9.clamp(k,1,this._maxIndex);const U=this.adjustForBuffer(this._tierGrid.GameObject.children[this._leftMostTierIndex-1].transform.localPosition.x);this.displayVisibleTiers(),this.buildTierGridTween(-U,B),this._moveTrackLeftButton.active=this._leftMostTierIndex1}centerTierGridOnCurrentTier(k){return(0,G.sH)(this,void 0,void 0,(function*(){this.moveTrackToIndex(k-this._centerSlotFromLeft+1,!1)}))}moveTrackRight(){this._moveTrackTween||this.moveTrackToIndex(this._leftMostTierIndex-this._tiersMovedAtOnce)}moveTrackLeft(){this._moveTrackTween||this.moveTrackToIndex(this._leftMostTierIndex+this._tiersMovedAtOnce)}buildTierGridTween(k,B=!0){const U=this._tierGridRectTransform.anchoredPivotOffset.y,F={value:this._tierGridRectTransform.anchoredPivotOffset.x};this._moveTrackTween=tt.q.instance.game.add.tween(F,this).to({value:k},B?this._tierGridTweenDurationMs:0,j.GS3.Quadratic.In,!1),this._moveTrackTween.onUpdate.add((()=>{this._tierGridRectTransform.setAnchoredPivotOffset(F.value,U)})),this._moveTrackTween.onTweenComplete.add((()=>{Qt.J.callAfterFrameDelay((()=>{this.showTiers().catch(j.RQr.createHandler("Error updating tiers after tween.")),this._moveTrackTween=null}),3)})),this._moveTrackTween.start()}adjustForBuffer(k){return 1===this._leftMostTierIndex?k-this._leftEdgeBuffer:this._leftMostTierIndex===this._maxIndex?k+this._rightEdgeBuffer:k}displayVisibleTiers(){for(let k=this._leftMostTierIndex-1;k1}dragContentHorizontal(){const k=tt.q.instance.game.input.activePointer.x-this._lastDragMousePosition.x;this.moveContent(k),super.dragContentHorizontal()}onMouseWheel(k){super.onMouseWheel(k);const B=-j.cj9.clamp(k.deltaY,-this._maximumMouseWheelSpeed,this._maximumMouseWheelSpeed);this.moveContent(B)}};Sn._DEFAULT_TIERS_OFF_SEASON=5,(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],Sn.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Sn.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.MnK)(j.JTA),(0,G.Sn)("design:type",j.JTA)],Sn.prototype,"_tierGrid",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Sn.prototype,"_moveTrackRightButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Sn.prototype,"_rewardsToTheLeftNotificationBadge",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Sn.prototype,"_moveTrackLeftButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Sn.prototype,"_rewardsToTheRightNotificationBadge",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Sn.prototype,"onSetupComplete",void 0),(0,G.Cg)([(0,j.MnK)(En),(0,G.Sn)("design:type",En)],Sn.prototype,"_offSeasonDialog",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Sn.prototype,"_tiersShownAtOnce",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Sn.prototype,"_tiersMovedAtOnce",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Sn.prototype,"_tierShowingBuffer",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Sn.prototype,"_centerSlotFromLeft",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Sn.prototype,"_tierGridTweenDurationMs",void 0),Sn=wn=(0,G.Cg)([(0,j.EVk)("BattlePassTrack",W.Y.battlePass)],Sn);var An=U(96535);let Cn=class extends j.uAl{constructor(){super(...arguments),this.onHardModeUnlocked=new j.HN0,this.onHardModeLocked=new j.HN0,this.onExpertModeUnlocked=new j.HN0,this.onExpertModeLocked=new j.HN0,this._runOnCreate=!1}create(){super.create(),this._runOnCreate&&this.checkDifficultyUnlocks()}checkDifficultyUnlocks(){const k=this._activePlayer.data.difficultyUnlocks;if(!j.Aq$.isDefined(k))return void j.RQr.createHandler("DifficultyUnlocksGuardComponent.checkDifficultyUnlocks: difficultyUnlocks is undefined");const B=!0===k[fe.i.Hard],U=!0===k[fe.i.Expert];B?this.onHardModeUnlocked.dispatch():this.onHardModeLocked.dispatch(),U?this.onExpertModeUnlocked.dispatch():this.onExpertModeLocked.dispatch()}destroy(){super.destroy(),this.onHardModeUnlocked.dispose(),this.onHardModeLocked.dispose(),this.onExpertModeUnlocked.dispose(),this.onExpertModeLocked.dispose()}};(0,G.Cg)([(0,Gi.b)("306-5359"),(0,G.Sn)("design:type",An.W)],Cn.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Cn.prototype,"onHardModeUnlocked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Cn.prototype,"onHardModeLocked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Cn.prototype,"onExpertModeUnlocked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Cn.prototype,"onExpertModeLocked",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Cn.prototype,"_runOnCreate",void 0),Cn=(0,G.Cg)([(0,j.EVk)("DifficultyUnlocksGuard",W.Y.utility)],Cn);var On=U(2212),In=U(2090);let Dn=class extends j.uAl{create(){super.create(),this.setupDifficultyOverlay()}setupDifficultyOverlay(){var k;const B=tt.q.instance.prodigy.world.getCurrentZoneObject(),U=(0,Bt.G)(In.u).enabled&&On.J.isZoneMapDifficultyModeAgnostic(this._mapTag),F=null!==(k=this._activePlayer.currentDifficulty)&&void 0!==k?k:fe.i.Regular,G=(null==B?void 0:B.ID)===Ft.A_.LAMPLIGHT&&tt.q.instance.prodigy.skin.isFestivalActive();if(U&&!G&&F!==fe.i.Regular)switch(F){case fe.i.Hard:this._hardModeOverlay&&(this._hardModeOverlay.active=!0);break;case fe.i.Expert:this._expertModeOverlay&&(this._expertModeOverlay.active=!0)}}};(0,G.Cg)([(0,j.Cdj)("ZONE_MAP_TAG"),(0,G.Sn)("design:type",String)],Dn.prototype,"_mapTag",void 0),(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],Dn.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Dn.prototype,"_hardModeOverlay",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Dn.prototype,"_expertModeOverlay",void 0),Dn=(0,G.Cg)([(0,j.EVk)("DifficultyOverlayDisplay",W.Y.zones)],Dn);var Rn=U(92591),Pn=U(16495);class Mn{constructor(){this._onFinished=new j.HN0}get onFinished(){return this._onFinished}enter(){}exit(){}update(){}destroy(){this._onFinished.dispose(),this._onFinished=null}finish(){this._onFinished.dispatch()}}class Nn extends Mn{constructor(k,B){super(),this._animationName=null,this._animators=null,this._animators=k,this._animationName=B}enter(){(0,Pn.sR)(this._animators,this._animationName,!0)}setAnimationName(k){this._animationName=k}setAnimators(k){this._animators=k}}var xn=U(6997);class Ln extends Mn{constructor(k,B){super(),this._animationName=null,this._animators=null,this._animatorSemaphore=null,this._animators=k,this._animationName=B}destroy(){var k;null===(k=this._animatorSemaphore)||void 0===k||k.destroy(),this._animatorSemaphore=null,super.destroy()}enter(){(0,ut.v)(null===this._animatorSemaphore,"Entering a state with a pending animation semaphore"),this._animatorSemaphore=new xn.o,this._animatorSemaphore.init((()=>{this.onFinished.dispatch()}),this._animators.length);const k=this._animators.length;for(let B=0;B=this.keepChargeCost;B?U?(k.changeGold(-1*this.keepChargeCost),this.onSpendCoins.dispatch()):this.onMemberInsufficientGold.dispatch():this.onShowMembershipModal.dispatch()}addMembershipPurchaseListener(){tt.q.instance.prodigy.game.broadcaster.addAppListener(jn.H3.MembershipResponseReceived,this.handleMembershipChange,this)}handleMembershipChange(k){"success"===k&&(tt.q.instance.prodigy.game.broadcaster.removeAppListener(jn.H3.MembershipResponseReceived,this),this.onSpendCoins.dispatch())}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],$n.prototype,"keepChargeCost",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$n.prototype,"onTaskComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$n.prototype,"onSpendCoins",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$n.prototype,"onMemberInsufficientGold",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$n.prototype,"onShowMembershipModal",void 0),$n=(0,G.Cg)([(0,j.EVk)("ChargedLevelsMembershipButton")],$n);var Hn,Vn=U(5491),Wn=U(88060),qn=U(90744),Kn=U(97651),zn=U(43754),Yn=U(55122),Qn=U(46855);!function(k){k.NumberLevelsLost="NUMBER_OF_LEVELS_LOST",k.KeepChargeCost="KEEP_CHARGE_COST",k.GoldCoins="GOLD_COINS",k.MagicoinAmount="MAGICOIN_AMOUNT",k.TargetGoldCoins="TARGET_GOLD_COINS",k.NotEnoughGold="CHARGED_LEVELS_NOT_ENOUGH_GOLD",k.XpBarInformation="CHARGED_LEVELS_XP_BAR_INFORMATION",k.OriginalCurrencyId="ORIGINAL_CURRENCY_ID",k.OriginalCurrencyAmount="ORIGINAL_CURRENCY_AMOUNT",k.OriginalCurrencyDifference="ORIGINAL_CURRENCY_DIFFERENCE",k.ConversionCurrencyId="CONVERSION_CURRENCY_ID",k.ConversionCurrencyAmount="CONVERSION_CURRENCY_AMOUNT",k.ConversionCurrencyDifference="CONVERSION_CURRENCY_DIFFERENCE",k.ShouldShowCurrencyConversion="SHOULD_SHOW_CURRENCY_CONVERSION",k.ConversionAnalyticsCustomData="CONVERSION_ANALYTICS_CUSTOM_DATA"}(Hn||(Hn={}));let Xn=class extends Fi.z{create(){var k;super.create(),void 0!==this._chargedLevelsProgressManager.chargedLevelsProgressData&&this.bindContext(),this._playerChargedLevelDataProvider=this._mainPlayer?this._mainPlayer.findComponentInChildren(Kn.e,!0):this._loggedInPlayer.player.playerContainer.playerPrefab.findComponentInChildren(Kn.e,!0),null===(k=this._mainPlayer)||void 0===k||k.findComponent(Wn.m).setFacingDirection(Me.y.Right)}abandonChargedLevelLosses(){this.bindCurrentChargedLevelTier(),this._chargedLevelsProgressManager.abandonChargedLevelLosses().then((()=>{var k;null===(k=this._playerChargedLevelDataProvider)||void 0===k||k.showChargeLostEffect()})).catch(j.RQr.createHandler("[ChargedLevelsRetentionDataProviderComponent] Failed to abandon charged level losses"))}recuperateChargedLevelLosses(k,B){this.bindCurrentChargedLevelTier(),this._chargedLevelsProgressManager.recuperateChargedLevelLosses(k,B).then((()=>{var k;null===(k=this._playerChargedLevelDataProvider)||void 0===k||k.showChargeKeptEffect()})).catch(j.RQr.createHandler("[ChargedLevelsRetentionDataProviderComponent] Failed to recuperate charged level losses"))}bindCurrentChargedLevelTier(){var k;const B=this._chargedLevelsProgressManager.chargedLevelsProgressData.recuperableLevels,U=this._chargedLevelsProgressManager.chargedLevelsProgressData.chargedLevel;null===(k=this._playerChargedLevelDataProvider)||void 0===k||k.bindChargedLevelTier(U+B)}bindContext(){var k,B;const U=null!==(k=this.gameObject.findComponentInParent(j.bE_,!1))&&void 0!==k?k:this._context,F=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=this._chargedLevelsProgressManager.chargedLevelsProgressData.chargedLevel,$=this._chargedLevelsProgressManager.chargedLevelsProgressData.recuperableXp,H=this._chargedLevelsProgressManager.chargedLevelsProgressData.recuperableLevels,V=H>1?"s":"",W=null!==(B=this._chargedLevelsProgressManager.chargedLevelsProgressData.costToKeepLevels)&&void 0!==B?B:0,q=0===W?F.getGold():F.getGold()-W,K=new Qn.r($,Vn.V.Player,{baseXp:0,memberXp:0,totalNonMemberXp:0},Yn.s.activePlayerLevelCap),z=this._paymentManager.exchange({currency:1,value:W},27).value,Y=F.getGold(),Q=this._hardCurrency.getBalance(27),X=Yn.s.activePlayerLevelCap;K.maxLevel=X+F.getChargedLevelCap(),K.levels=[X+G+H,X+G+H+1],K.currentCreatureStars=$,K.currentRelativeStars=$,K.starsRequiredForEachLevel=[$+1];this.bindTo(U,Hn.ShouldShowCurrencyConversion,!0),this.bindTo(U,Hn.KeepChargeCost,W),this.bindTo(U,Hn.GoldCoins,Y),this.bindTo(U,Hn.MagicoinAmount,Q),this.bindTo(U,Hn.TargetGoldCoins,q),this.bindTo(U,Hn.NotEnoughGold,q<0),this.bindTo(U,Hn.NumberLevelsLost,[H,V]),this.bindTo(U,Hn.XpBarInformation,K),this.bindTo(U,Hn.OriginalCurrencyId,1),this.bindTo(U,Hn.OriginalCurrencyAmount,W),this.bindTo(U,Hn.OriginalCurrencyDifference,W-Y),this.bindTo(U,Hn.ConversionCurrencyId,27),this.bindTo(U,Hn.ConversionCurrencyAmount,z),this.bindTo(U,Hn.ConversionCurrencyDifference,z-Q),this.bindTo(U,Hn.ConversionAnalyticsCustomData,{sink_type:li.C.ChargedLevelRenewal,sink_id:this._chargedLevelsProgressManager.chargedLevelsProgressData.chargedLevel+H})}bindTo(k,B,U){k.Container.hasBinding(B)||(k.Container.unbind(B),k.Container.bind(B).toConstantValue(U))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Xn.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("743-fd51"),(0,G.Sn)("design:type",qn.E)],Xn.prototype,"_paymentManager",void 0),(0,G.Cg)([(0,j.Cdj)("5c7-e02d"),(0,G.Sn)("design:type",zn.W)],Xn.prototype,"_hardCurrency",void 0),(0,G.Cg)([(0,j.Cdj)("62e-110e"),(0,G.Sn)("design:type",Bn.g)],Xn.prototype,"_chargedLevelsProgressManager",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],Xn.prototype,"_mainPlayer",void 0),Xn=(0,G.Cg)([(0,j.EVk)("ChargedLevelsRetentionDataProvider")],Xn);let Zn=class extends Fi.z{create(){super.create(),this.bindContext()}bindContext(){}bindValue(k,B,U){k.Container.hasBinding(B)||k.Container.bind(B).toConstantValue(U)}};Zn=(0,G.Cg)([(0,j.EVk)("ChargedLevelsTutorialDataProvider",W.Y.ui)],Zn);var Jn=U(65732),ta=(U(34578),U(35571));let ea=class extends j.uAl{run(){this._cloudscriptChargedLevels.sendTutorialReminderMailer().catch(j.RQr.createHandler("[SendChargedLevelsMail] Could not send tutorial reminder mailer"))}};(0,G.Cg)([(0,j.Cdj)("639-22b8"),(0,G.Sn)("design:type",ta.e)],ea.prototype,"_cloudscriptChargedLevels",void 0),ea=(0,G.Cg)([(0,j.EVk)("SendChargedLevelsMail")],ea);let ia=class extends j.JTX{constructor(){super(...arguments),this._isOnCoolDown=new j.HN0,this._isNotOnCoolDown=new j.HN0,this._identifier="",this._cooldownTime=0}get cooldownTime(){return this._cooldownTime}initialize(k,B){this._identifier=k,this._cooldownTime=B}checkCooldown(){this._identifier?tt.q.instance.prodigy.gameContainer.get("b50-4670").hasCooldown(this._identifier,this.cooldownTime).then((k=>{k?this._isOnCoolDown.dispatch():this._isNotOnCoolDown.dispatch()})).catch((k=>{j.VyI.log(`Failed to check for cooldown. ${k.message}`,j.$bb.Error)})):j.VyI.log("An identifier is required to use the CooldownComponent",j.$bb.Error)}destroy(){this._isOnCoolDown.dispose(),this._isNotOnCoolDown.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ia.prototype,"_isOnCoolDown",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ia.prototype,"_isNotOnCoolDown",void 0),ia=(0,G.Cg)([(0,j.EVk)("InteractablesCooldown",W.Y.cooldown)],ia);var sa=U(47969);let na=class extends j.uAl{constructor(){super(...arguments),this._coolownID="",this.onCooldown=new j.HN0,this.notOnCooldown=new j.HN0,this._runOnCreate=!1}create(){super.create(),this._runOnCreate&&this.run().catch(j.RQr.createHandler("Error running CheckCooldownComponent"))}run(){return(0,G.sH)(this,void 0,void 0,(function*(){(yield this._cooldowns.isCooldownActive(this._coolownID))?this.onCooldown.dispatch():this.notOnCooldown.dispatch()}))}destroy(){this.onCooldown.dispose(),this.notOnCooldown.dispose(),super.destroy()}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],na.prototype,"_coolownID",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],na.prototype,"onCooldown",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],na.prototype,"notOnCooldown",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],na.prototype,"_runOnCreate",void 0),(0,G.Cg)([(0,j.Cdj)("098-b402"),(0,G.Sn)("design:type",sa.m)],na.prototype,"_cooldowns",void 0),na=(0,G.Cg)([(0,j.EVk)("CheckCooldown",W.Y.cooldown)],na);var aa=U(86913);let ra=class extends j.uAl{constructor(){super(...arguments),this._coolownID="",this._runOnCreate=!1,this._setCooldownFromSpawnCooldown=!0,this._spawnCooldownCategory=aa.u.Main}create(){super.create(),this._runOnCreate&&this.run().catch(j.RQr.createHandler("Error running SetCooldownComponent"))}run(){return(0,G.sH)(this,arguments,void 0,(function*(k=""){if(""!==k&&(this._coolownID=k),this._setCooldownFromSpawnCooldown){tt.q.instance.prodigy.gameContainer.get("e67-6525").setCooldownFromCategory(this._coolownID,this._spawnCooldownCategory).catch(j.RQr.createHandler("Error setting cooldown from category in SetCooldownComponent"))}}))}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ra.prototype,"_coolownID",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ra.prototype,"_runOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ra.prototype,"_setCooldownFromSpawnCooldown",void 0),(0,G.Cg)([(0,j.gfw)(aa.u),(0,G.Sn)("design:type",String)],ra.prototype,"_spawnCooldownCategory",void 0),ra=(0,G.Cg)([(0,j.EVk)("SetCooldown",W.Y.cooldown)],ra);let oa=class extends j.uAl{constructor(){super(...arguments),this.onSFXComplete=new j.HN0,this._timeouts=[]}postCreate(){super.postCreate(),this._playOnCreate&&this.playSFX()}destroy(){this.onSFXComplete.dispose(),this._timeouts.forEach((k=>{window.clearTimeout(k)})),this._timeouts.length=0,super.destroy()}playSFX(){var k;const B=()=>{tt.q.instance.prodigy.audio.playSFX(this._sfxID,this._clipName,(()=>this.onSFXCompleteHandler()))};(null!==(k=this._delay)&&void 0!==k?k:0)>0?this._timeouts.push(window.setTimeout(B,this._delay)):B()}onSFXCompleteHandler(){this.onSFXComplete.dispatch()}};(0,G.Cg)([(0,j.W_S)(),(0,j.Bak)(),(0,G.Sn)("design:type",String)],oa.prototype,"_sfxTag",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],oa.prototype,"_sfxID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],oa.prototype,"_clipName",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],oa.prototype,"onSFXComplete",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],oa.prototype,"_delay",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],oa.prototype,"_playOnCreate",void 0),oa=(0,G.Cg)([(0,j.EVk)("PlaySoundEffect",W.Y.audio,"Deprecated use PlayAudioGUIDComponent instead")],oa);var ha=U(70570),ca=U(75915),da=U(79484),la=U(84705),ua=U(20786);const fa=new Map([[17,ua.F.createTeam],[18,ca.u.createTeam],[19,ha.l.createTeam],[20,la.Y.createTeam],[21,da.e.createTeam]]);let ba=class extends j.uAl{constructor(){super(...arguments),this._onBossDefeated=new j.HN0,this._onBossAlive=new j.HN0}create(){if(super.create(),this._crystalCavernsState){const k=this.getStateID();null!==k&&this._crystalCavernsState.isBossDefeatedCurrentRun(k)?(this._onBossDefeated.dispatch(),this.GameObject.active=!1):this._onBossAlive.dispatch()}}destroy(){this._onBossAlive.dispose(),this._onBossDefeated.dispose(),super.destroy()}markAsSeen(){const k=this.getStateID();null!==k&&this._crystalCavernsState.setBossSeen(k),this._segment.playerMovementAndDiscovery.sendCrystalCavernsMilestoneReachedEvent(Mi.lT.Boss)}getStateID(){return Oi.getBossEnum(this.bossID)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],ba.prototype,"bossID",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ii.o)],ba.prototype,"_crystalCavernsState",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ba.prototype,"_onBossDefeated",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ba.prototype,"_onBossAlive",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],ba.prototype,"_segment",void 0),ba=(0,G.Cg)([(0,j.EVk)("CrystalCavernsBossEncounter",W.Y.adventure)],ba);let pa=class extends j.uAl{constructor(){super(...arguments),this._introKey="COMBAT_BOSS_BATTLE",this._battleBackground="battle-shiverchill-inside",this._afterBattleFSM=null,this._battleStars=null,this._freeSwitching=!1,this._opponentSwitchDisabled=!1}startBattle(){const k=this._bossEncounter.bossID,B=Yt.t.getItem("boss",k).data,U=this._crystalCavernsState,F=this._currentPlayer.player.data.zone,G=this._mainPlayer.transform.localScale.x,$=new j.I9Y;$.copyFrom(this._afterBattlePosition.worldPosition);const H=new j.I9Y;H.copyFrom(this.GameObject.transform.worldPosition);const V=this._bossEncounter.getStateID();if(null!==V){this._bossEncounter.markAsSeen();const j=tt.q.instance.prodigy.battle;j.battleStats.type="DungeonBossBattle",j.start({adventureRewards:B.adventureRewards,intro:this._localization.getText(this._introKey),boss:{ID:k,level:this._crystalCavernsState.getLevel(),element:B.element,name:this._localization.getText(B.nameKey),nameKey:B.nameKey,attacks:B.attacks,bossFactory:fa.get(k)},screen:this._battleBackground,backgroundMusic:31,difficulty:B.battle.difficulty,targetingEnabled:this._targetingEnabled,starOverride:this._battleStars,freeTeamSwap:this._freeSwitching,disableHealing:!0,videoLessonInstantWinEnabled:!1,revampBattleType:Oi.getRevampBattleType(V)},(()=>{tt.q.instance.prodigy.world.it(F)}),(()=>{U.setBossDefeated(V);let k=null;void 0!==this._afterBattleFSM&&(k={runFSMOnLoad:{ID:this._afterBattleFSM,variables:{game:tt.q.instance.game,encounterX:H.x,encounterY:H.y,playerIdentifier:"MainPlayerGameObject"}},playerDirection:G}),tt.q.instance.prodigy.world.it(F,$.x,$.y,k)}),null,F)}else j.VyI.log(`Starting dungeon boss battle with unknown boss ${k}`,j.$bb.Warning)}};(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ii.o)],pa.prototype,"_crystalCavernsState",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],pa.prototype,"_afterBattlePosition",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],pa.prototype,"_introKey",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],pa.prototype,"_battleBackground",void 0),(0,G.Cg)([(0,j.MnK)(ba),(0,G.Sn)("design:type",ba)],pa.prototype,"_bossEncounter",void 0),(0,G.Cg)([(0,j.Cdj)("Localization"),(0,G.Sn)("design:type",j.dTp)],pa.prototype,"_localization",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],pa.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],pa.prototype,"_afterBattleFSM",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],pa.prototype,"_battleStars",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],pa.prototype,"_freeSwitching",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],pa.prototype,"_opponentSwitchDisabled",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],pa.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],pa.prototype,"_targetingEnabled",void 0),pa=(0,G.Cg)([(0,j.EVk)("StartCrystalCavernsBossBattle",W.Y.adventure)],pa);let va=class extends Be.u{constructor(){super(...arguments),this._spine=null,this._circleTrigger=null,this._facingDirection="right"}run(){this.execute(137,{game:tt.q.instance.game,playerObject:this._mainPlayer,playerTransform:this._mainPlayer.transform,facingDirection:this._facingDirection,circleTrigger:this._circleTrigger,encounterPosition:this._encounterPosition.worldPosition,startBattleComponent:this._startBattleComponent,monsterSpine:this._spine.getSpine(),bossEncounter:this,attackAnimationName:this._attackAnimationName,idleAnimationName:this._idleAnimationName})}playEncounterSFX(){this._encounterSoundEffect&&this._encounterSoundEffect.playSFX()}};(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],va.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],va.prototype,"_spine",void 0),(0,G.Cg)([(0,j.MnK)(hi.s),(0,G.Sn)("design:type",hi.s)],va.prototype,"_circleTrigger",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],va.prototype,"_encounterPosition",void 0),(0,G.Cg)([(0,j.MnK)(pa),(0,G.Sn)("design:type",pa)],va.prototype,"_startBattleComponent",void 0),(0,G.Cg)([(0,j.MnK)(oa),(0,G.Sn)("design:type",oa)],va.prototype,"_encounterSoundEffect",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],va.prototype,"_attackAnimationName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],va.prototype,"_idleAnimationName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],va.prototype,"_facingDirection",void 0),va=(0,G.Cg)([(0,j.EVk)("BossEncounterFSM",W.Y.adventureFsm)],va);let ga=class extends Be.u{constructor(){super(...arguments),this.preloadSFX=pi.c.Sfx_wyrmroar,this._spine=null,this._circleTrigger=null}run(){this.execute(138,{game:tt.q.instance.game,playerIdentifier:"MainPlayerGameObject",circleTrigger:this._circleTrigger,encounterPosition:this._encounterPosition.worldPosition,startBattleComponent:this._startBattleComponent,monsterSpine:this._spine.getSpine(),monsterTransform:this._spine.GameObject.transform})}};(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],ga.prototype,"preloadSFX",void 0),(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],ga.prototype,"_spine",void 0),(0,G.Cg)([(0,j.MnK)(hi.s),(0,G.Sn)("design:type",hi.s)],ga.prototype,"_circleTrigger",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],ga.prototype,"_encounterPosition",void 0),(0,G.Cg)([(0,j.MnK)(pa),(0,G.Sn)("design:type",pa)],ga.prototype,"_startBattleComponent",void 0),ga=(0,G.Cg)([(0,j.EVk)("MakaluEncounterFSM",W.Y.adventureFsm)],ga);let ma=class extends Be.u{run(){this.execute(140,{game:tt.q.instance.game,locomotion:this._playerLocomotion,playerObject:this._mainPlayer,circleTrigger:this._circleTrigger,encounterPosition:this._encounterPosition.worldPosition,exclamationMark:this._exclamationMarkGameObject,startBattleComponent:this._startBattleComponent})}};(0,G.Cg)([(0,j.Cdj)("PlayerLocomotion"),(0,G.Sn)("design:type",j.KhP)],ma.prototype,"_playerLocomotion",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],ma.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.MnK)(hi.s),(0,G.Sn)("design:type",hi.s)],ma.prototype,"_circleTrigger",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],ma.prototype,"_encounterPosition",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ma.prototype,"_exclamationMarkGameObject",void 0),(0,G.Cg)([(0,j.MnK)(pa),(0,G.Sn)("design:type",pa)],ma.prototype,"_startBattleComponent",void 0),ma=(0,G.Cg)([(0,j.EVk)("WinstonVonLootEncounterFSM",W.Y.adventureFsm)],ma);var ya=U(630);let _a=class extends Be.u{create(){var k;super.create(),(null===(k=this._dungeonState)||void 0===k?void 0:k.isBossDefeatedCurrentRun(4))||(this.GameObject.active=!1)}run(){this.execute(143,{game:tt.q.instance.game,winstonGameObject:this._winstonVonLootGameObject,winstonFadeDuration:this._fadeDuration,mapSaveComponent:this._mapSaveStateComponent,playerIdentifier:"MainPlayerGameObject",teleportGameObject:this._teleportSpine.GameObject,teleportSpine:this._teleportSpine.getSpine(),teleportName:ya.rC.Exit,teleportSfx:this._teleportSfx})}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_a.prototype,"_winstonVonLootGameObject",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],_a.prototype,"_fadeDuration",void 0),(0,G.Cg)([(0,j.MnK)(si),(0,G.Sn)("design:type",si)],_a.prototype,"_mapSaveStateComponent",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ii.o)],_a.prototype,"_dungeonState",void 0),(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],_a.prototype,"_teleportSpine",void 0),(0,G.Cg)([(0,j.MnK)(hn.J),(0,G.Sn)("design:type",hn.J)],_a.prototype,"_teleportSfx",void 0),_a=(0,G.Cg)([(0,j.EVk)("WinstonVonLootPostBattleFSM",W.Y.adventureFsm)],_a);let Ea=class extends j.uAl{constructor(){super(...arguments),this.bossID=1,this.bossName="yeti",this._atlas=Ve._.Ui_cc_boss_icons_json,this._border=null,this._bossImage=null,this._iconImage=null,this._isLarge=!1}create(){super.create();const k=this._isLarge?"large":"small";let B,U,F;B=this._crystalCavernsState.isBossSeen(this.bossID),U=this._crystalCavernsState.getCheckpointIndex(),F=this._crystalCavernsState.isBossDefeatedCurrentRun(this.bossID),this._bossImage.setAsset(this._atlas,`icon-${k}-${B?this.bossName:"questionmark"}`);const G=Yt.t.getItemData("boss",Oi.getBossAssetID(this.bossID));let $=null,H=null;F?(H=`icon-checkmark-${k}`,$=`icon-${k}-green`):U===G.battleCheckpointID?(H=`icon-sword-${k}`,$=`icon-${k}-blue`):$=`icon-${k}-grey`,this._border.setAsset(this._atlas,$),j.Aq$.isDefined(H)?this._iconImage.setAsset(this._atlas,H):this._iconImage.GameObject.active=!1}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ea.prototype,"bossID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ea.prototype,"bossName",void 0),(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],Ea.prototype,"_atlas",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ii.o)],Ea.prototype,"_crystalCavernsState",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],Ea.prototype,"_border",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],Ea.prototype,"_bossImage",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],Ea.prototype,"_iconImage",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Ea.prototype,"_isLarge",void 0),Ea=(0,G.Cg)([(0,j.EVk)("BossIconStatus",W.Y.adventureUi)],Ea);let wa=class extends j.PQK{installBindings(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.Container.bind("DungeonState").toConstantValue(k.state.getDungeonState(Ii.o,"crystal_caverns"))}};wa=(0,G.Cg)([(0,j.Og1)("CrystalCavernsInstaller","Installer")],wa);var Ta=U(80110);let Sa=class extends Be.u{constructor(){super(...arguments),this._spine=null,this._circleTrigger=null}run(){this.execute(141,{game:tt.q.instance.game,playerObject:this._mainPlayer,playerPathfinder:this._playerPathfinder,circleTrigger:this._circleTrigger,encounterPosition:this._encounterPosition.worldPosition,startBattleComponent:this._startBattleComponent,monsterSpine:this._spine.getSpine(),monsterTransform:this._spine.GameObject.transform,screenShakeComponent:this._screenShakeComponent,cameraTransform:j.i7d.main.GameObject.transform,cameraFollowController:this._mainPlayer.findComponentInChildren(j.mZY),golemRevealCameraPosition:this._golemRevealCameraPosition})}};var Aa;(0,G.Cg)([(0,j.Cdj)("PlayerPathfinder"),(0,G.Sn)("design:type",j.pV3)],Sa.prototype,"_playerPathfinder",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],Sa.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],Sa.prototype,"_spine",void 0),(0,G.Cg)([(0,j.MnK)(hi.s),(0,G.Sn)("design:type",hi.s)],Sa.prototype,"_circleTrigger",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Sa.prototype,"_encounterPosition",void 0),(0,G.Cg)([(0,j.MnK)(pa),(0,G.Sn)("design:type",pa)],Sa.prototype,"_startBattleComponent",void 0),(0,G.Cg)([(0,j.MnK)(Ta.g),(0,G.Sn)("design:type",Ta.g)],Sa.prototype,"_screenShakeComponent",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Sa.prototype,"_golemRevealCameraPosition",void 0),Sa=(0,G.Cg)([(0,j.EVk)("CrystalGolemEncounterFSM",W.Y.adventureFsm)],Sa);let Ca=Aa=class extends j.uAl{constructor(){super(...arguments),this._onMorphExpired=new j.HN0,this._playerData=null,this._lastMorphDataUpdate=0}create(){super.create(),this._playerData=this._loggedInPlayer.player.getPlayerData(),this._lastUpdateTime=Date.now()}update(){var k;super.update();const B=Date.now(),U=null===(k=this._playerData)||void 0===k?void 0:k.playerTransformation;if(U){const k=B-this._lastUpdateTime;U.timeRemaining-=k,B-this._lastMorphDataUpdate>Aa.FORCE_SAVE_TIME_MS&&(this._loggedInPlayer.player.updated=!0,this._lastMorphDataUpdate=B),U.timeRemaining<=0&&(this._onMorphExpired.dispatch(),this._loggedInPlayer.player.transformPlayer(Vn.V.Player))}this._lastUpdateTime=B}destroy(){this._playerData=null,this._onMorphExpired.dispose(),this._onMorphExpired=null,super.destroy()}};Ca.FORCE_SAVE_TIME_MS=3e4,(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ca.prototype,"_onMorphExpired",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Ca.prototype,"_loggedInPlayer",void 0),Ca=Aa=(0,G.Cg)([(0,j.EVk)("MorphExpiration",W.Y.playerAnimation)],Ca);var Oa=U(64889),Ia=U(87337);let Da=class extends j.uAl{constructor(){super(...arguments),this.onQuestionAnswered=new j.HN0,this.onQuestionAnsweredCorrectly=new j.HN0,this.onQuestionAnsweredIncorrectly=new j.HN0,this._isOpen=!1}destroy(){this.onQuestionAnswered.dispose(),this.onQuestionAnsweredCorrectly.dispose(),this.onQuestionAnsweredIncorrectly.dispose(),super.destroy()}answerQuestion(){if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){const _w=Math.random()<(window._.constants.get('GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT')||1);this.onQuestionAnswered.dispatch(_w,0,null);_w?this.onQuestionAnsweredCorrectly.dispatch(0,null):this.onQuestionAnsweredIncorrectly.dispatch(0,null);return}if(!this._isOpen){this._isOpen=!0;const k=tt.q.instance.game.input,B=k.enabled;k.enabled=!1;const U=tt.q.instance.prodigy.notifications;U.pause(this),U.clearNotifications(),tt.q.instance.prodigy.education.question(((F,G,j,$,H,V)=>{this._isOpen=!1,k.enabled=B,U.resume(this),this.onQuestionAnswered.dispatch(F,G,V),F?this.onQuestionAnsweredCorrectly.dispatch(G,V):this.onQuestionAnsweredIncorrectly.dispatch(G,V)}),{isUserInBattle:!1,allowTutorials:!0})}}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Da.prototype,"onQuestionAnswered",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Da.prototype,"onQuestionAnsweredCorrectly",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Da.prototype,"onQuestionAnsweredIncorrectly",void 0),Da=(0,G.Cg)([(0,j.EVk)("OpenQuestionInterface",W.Y.education)],Da);let Ra=class extends j.uAl{constructor(){super(...arguments),this.onQuestionAnsweredSuccessfully=new j.HN0,this.onAllQuestionsAnswered=new j.HN0,this._remainingQuestions=0}create(){super.create(),this._openQuestionInterfaceComponent&&this._openQuestionInterfaceComponent.onQuestionAnswered.add(this.questionWasAnswered,this),this._remainingQuestions=this._questionCount}destroy(){this._openQuestionInterfaceComponent&&this._openQuestionInterfaceComponent.onQuestionAnswered.remove(this.questionWasAnswered,this),this.onQuestionAnsweredSuccessfully.dispose(),this.onAllQuestionsAnswered.dispose(),super.destroy()}openQuestion(){this._remainingQuestions>0&&this._openQuestionInterfaceComponent.answerQuestion()}setQuestionsRemainingCount(k){this._questionCount=k,this._remainingQuestions=k}getQuestionsRemainingCount(){return this._remainingQuestions}questionWasAnswered(k){k&&(--this._remainingQuestions,this.onQuestionAnsweredSuccessfully.dispatch(this._remainingQuestions),this._remainingQuestions<=0&&this.onAllQuestionsAnswered.dispatch())}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ra.prototype,"onQuestionAnsweredSuccessfully",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ra.prototype,"onAllQuestionsAnswered",void 0),(0,G.Cg)([(0,j.MnK)(Da),(0,G.Sn)("design:type",Da)],Ra.prototype,"_openQuestionInterfaceComponent",void 0),Ra=(0,G.Cg)([(0,j.EVk)("AnswerQuestionsAmount",W.Y.education)],Ra);let Pa=class extends j.uAl{constructor(){super(...arguments),this._isHorizontal=!1,this._isGlowing=!1}create(){super.create(),this.updateBoardAnimation()}bringToFront(){const k=this._spineAnimator.GameObject.findComponent(oi.v).getRootContainer();k.parent.setChildIndex(k,k.parent.children.length-1)}setHorizontal(k){this._isHorizontal=k,this.updateBoardAnimation()}playGlow(){this._isGlowing=!0,this.updateBoardAnimation()}playGlowRotation(){var k;this._isGlowing=!0,null===(k=this._spineAnimator)||void 0===k||k.playAnimation(this._isHorizontal?this._horizontalGlowingRotationAnimation:this._verticalGlowingRotationAnimation,!1),this._isHorizontal=!this._isHorizontal}clearGlow(){this._isGlowing=!1,this.updateBoardAnimation()}isHorizontal(){return this._isHorizontal}getAnimationName(){return this._isGlowing?this._isHorizontal?this._horizontalGlowingIdleAnimation:this._verticalGlowingIdleAnimation:this._isHorizontal?this._horizontalIdleAnimation:this._verticalIdleAnimation}updateBoardAnimation(){var k;null===(k=this._spineAnimator)||void 0===k||k.playAnimation(this.getAnimationName(),!1)}};(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],Pa.prototype,"_spineAnimator",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Pa.prototype,"_isHorizontal",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pa.prototype,"_horizontalIdleAnimation",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pa.prototype,"_verticalIdleAnimation",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pa.prototype,"_horizontalGlowingIdleAnimation",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pa.prototype,"_verticalGlowingIdleAnimation",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pa.prototype,"_horizontalGlowingRotationAnimation",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pa.prototype,"_verticalGlowingRotationAnimation",void 0),Pa=(0,G.Cg)([(0,j.EVk)("MinecartTrackSupply",W.Y.adventureFsm)],Pa);let Ma=class extends j.uAl{constructor(){super(...arguments),this._railOffset=new j.I9Y,this._flipped=!1,this._horizontalBoardOffset=new j.I9Y,this._verticalBoardOffset=new j.I9Y,this._trackBoards=[]}create(){var k,B;super.create();const U=Math.ceil(this._boardCount/this._boardsPerLayer);for(let G=0;G0&&this._segment.gameWorld.sendWorldObjectDiscoveredEvent({object_type:Ia.u_.MinecartBridge,object_id:"0",x_coord:null===(k=this._trackBoards[0].GameObject)||void 0===k?void 0:k.transform.worldPosition.x,y_coord:null===(B=this._trackBoards[0].GameObject)||void 0===B?void 0:B.transform.worldPosition.y})}createLayer(k,B){const U=[];for(let F=0;F1?G=this._distanceBetweenBoards:F>0&&(G=-this._distanceBetweenBoards),B?k.transform.setPosition(this._horizontalBoardOffset.x,this._horizontalBoardOffset.y+G):k.transform.setPosition(this._verticalBoardOffset.x+G,this._verticalBoardOffset.y);const j=k.findComponentInChildren(Pa);j.setHorizontal(B),U.push(j)}return U}getBoards(){return this._trackBoards}getRail(){return this._trackRail}getBoardCount(){return this._boardCount}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ma.prototype,"_boardCount",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ma.prototype,"_boardsPerLayer",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ma.prototype,"_boardPrefabID",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ma.prototype,"_railPrefabID",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],Ma.prototype,"_railOffset",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ma.prototype,"_distanceBetweenBoards",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Ma.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],Ma.prototype,"_segment",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Ma.prototype,"_flipped",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],Ma.prototype,"_horizontalBoardOffset",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],Ma.prototype,"_verticalBoardOffset",void 0),Ma=(0,G.Cg)([(0,j.EVk)("MinecartTrackSuppliesPile",W.Y.adventure)],Ma);let Na=class extends Be.u{constructor(){super(...arguments),this.castSFX=pi.c.Sfx_battle,this.onBoardPlaced=new j.HN0,this.onRailPlaced=new j.HN0,this._boardIndex=0}create(){super.create();let k=0;this._suppliesPile&&(k=this._suppliesPile.getBoardCount()),this._answerQuestionAmount&&(this._answerQuestionAmount.setQuestionsRemainingCount(k),this._answerQuestionAmount.onQuestionAnsweredSuccessfully.add(this.placeBoard,this))}destroy(){this._answerQuestionAmount&&this._answerQuestionAmount.onQuestionAnsweredSuccessfully.remove(this.placeBoard,this),this.onBoardPlaced.dispose(),this.onRailPlaced.dispose(),super.destroy()}placeBoard(k){const B=this._suppliesPile.getBoards(),U=this._suppliesPile.getBoardCount()-1,F=B[U-this._boardIndex],G=this._boardPositionsParent.children[this._boardIndex].transform;F.bringToFront();const j=F.GameObject.parent.transform.worldMatrix,$=G.worldMatrix,H=new $e.Point;j.applyInverse(H,H),$.apply(H,H),++this._boardIndex,this.execute(132,{game:tt.q.instance.game,supply:F,sparklesGameObject:this._sparklesGameObject,playerAnimationController:this._mainPlayer.findComponentInChildren(Oa.$),supplyTransform:F.GameObject.transform,supplyStartingPosition:F.GameObject.transform.localPosition,supplyPosition:H,rotateSupply:this._isHorizontal===F.isHorizontal(),morphExpiration:this._mainPlayer.findComponentInChildren(Ca)},(()=>{this._boardIndex<=1?this._startingTrackDamage.active=!1:this._boardIndex>=B.length&&(this._endingTrackDamage.active=!1),this.onBoardPlaced.dispatch(),k<=0&&this.placeRail(),this._segment.gameWorld.sendWorldObjectUsedEvent({object_type:Ia.u_.MinecartBridge,object_id:""+(this._boardIndex-1)})}))}hasBoardsRemaining(){return this._boardIndex{this.onRailPlaced.dispatch(),this._segment.playerMovementAndDiscovery.sendCrystalCavernsMilestoneReachedEvent(Mi.lT.Bridge)}))}run(){}};(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],Na.prototype,"castSFX",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Na.prototype,"onBoardPlaced",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Na.prototype,"onRailPlaced",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Na.prototype,"_boardPositionsParent",void 0),(0,G.Cg)([(0,j.MnK)(Ma),(0,G.Sn)("design:type",Ma)],Na.prototype,"_suppliesPile",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Na.prototype,"_xpPerQuestion",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Na.prototype,"_startingTrackDamage",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Na.prototype,"_sparklesGameObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Na.prototype,"_endingTrackDamage",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],Na.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.MnK)(Ra),(0,G.Sn)("design:type",Ra)],Na.prototype,"_answerQuestionAmount",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Na.prototype,"_isHorizontal",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Na.prototype,"_railTransform",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Na.prototype,"_smokeTrailStart",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],Na.prototype,"_smokeCloudOffset",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Na.prototype,"_smokeCloudCount",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Na.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Na.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],Na.prototype,"_segment",void 0),(0,G.Cg)([(0,j.MnK)(si),(0,G.Sn)("design:type",si)],Na.prototype,"_mapSaveCompletion",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Na.prototype,"_minecartInputObject",void 0),Na=(0,G.Cg)([(0,j.EVk)("FixableMinecartTrack",W.Y.adventureFsm)],Na);let xa=class extends Be.u{run(){this.execute(142,{game:tt.q.instance.game,playerIdentifier:"MainPlayerGameObject"})}};xa=(0,G.Cg)([(0,j.EVk)("GolemPostBattleFSM",W.Y.adventureFsm)],xa);U(29638);var La=U(98013);let ka=class extends j.uAl{constructor(){super(...arguments),this._imageContainer=null}setData(k){this._drop=k,k&&(La.l.removeAll(this._imageContainer.legacyTransform.group,!0),tt.q.instance.prodigy.icon.createFromDataAdvanced(k,this._imageContainer.legacyTransform.group,0,0).catch(j.RQr.createHandler(`LootCardComponent: Failed to create item icon ${k.type}-${k.ID}`)))}getData(){return this._drop}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ka.prototype,"_imageContainer",void 0),ka=(0,G.Cg)([(0,j.EVk)("LootCardComponent",W.Y.adventureUi)],ka);let Ba=class extends j.JTX{constructor(){super(...arguments),this._unobtainedItemOpacity=.5}create(){super.create();{const k=this._crystalCavernsState.isBossDefeatedAllTime(this.bossID);if(this.lootCard.active=k,this.lockedGraphic.active=!k,k){const k={type:this.itemType,ID:this.itemID};this.lootCardComponent.setData(k),this._playerProvider.player.isItemOwned(k)||(this.iconContainer.group.alpha=this._unobtainedItemOpacity)}}}};(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ii.o)],Ba.prototype,"_crystalCavernsState",void 0),(0,G.Cg)([(0,j.fFd)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Ba.prototype,"_playerProvider",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ba.prototype,"bossID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ba.prototype,"itemType",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ba.prototype,"itemID",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ba.prototype,"_unobtainedItemOpacity",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ba.prototype,"lootCard",void 0),(0,G.Cg)([(0,j.MnK)(ka),(0,G.Sn)("design:type",ka)],Ba.prototype,"lootCardComponent",void 0),(0,G.Cg)([(0,j.MnK)(j.K16),(0,G.Sn)("design:type",j.K16)],Ba.prototype,"iconContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ba.prototype,"lockedGraphic",void 0),Ba=(0,G.Cg)([(0,j.EVk)("ItemSlotStatus",W.Y.adventureUi)],Ba);let Ua=class extends j.uAl{constructor(){super(...arguments),this.bossID=1,this.bossName="yeti"}create(){super.create(),this.bossStatus.bossID=this.bossID,this.bossStatus.bossName=this.bossName,this.itemSlot1.bossID=this.bossID,this.itemSlot1.itemType=this.item1Type,this.itemSlot1.itemID=this.item1ID,this.itemSlot2.bossID=this.bossID,this.itemSlot2.itemType=this.item2Type,this.itemSlot2.itemID=this.item2ID,this.itemSlot3.bossID=this.bossID,this.itemSlot3.itemType=this.item3Type,this.itemSlot3.itemID=this.item3ID,this.row.bossID=this.bossID}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ua.prototype,"bossID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ua.prototype,"bossName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ua.prototype,"item1Type",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ua.prototype,"item1ID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ua.prototype,"item2Type",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ua.prototype,"item2ID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ua.prototype,"item3Type",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ua.prototype,"item3ID",void 0),(0,G.Cg)([(0,j.MnK)(Ea),(0,G.Sn)("design:type",Ea)],Ua.prototype,"bossStatus",void 0),(0,G.Cg)([(0,j.MnK)(Ba),(0,G.Sn)("design:type",Ba)],Ua.prototype,"itemSlot1",void 0),(0,G.Cg)([(0,j.MnK)(Ba),(0,G.Sn)("design:type",Ba)],Ua.prototype,"itemSlot2",void 0),(0,G.Cg)([(0,j.MnK)(Ba),(0,G.Sn)("design:type",Ba)],Ua.prototype,"itemSlot3",void 0),(0,G.Cg)([(0,j.MnK)(Di),(0,G.Sn)("design:type",Di)],Ua.prototype,"row",void 0),Ua=(0,G.Cg)([(0,j.EVk)("InitRewardRow",W.Y.adventureUi)],Ua);let Fa=class extends j.uAl{constructor(){super(...arguments),this.onTutorialCompleted=new j.HN0}create(){super.create(),this._fixTrackComponent&&(this._fixTrackComponent.onBoardPlaced.addOnce(this.showFirstQuestionCorrectDialogue,this),this._fixTrackComponent.onRailPlaced.add(this.onTutorialCompleted.dispatch,this.onTutorialCompleted))}destroy(){this._fixTrackComponent&&(this._fixTrackComponent.onBoardPlaced.remove(this.showFirstQuestionCorrectDialogue,this),this._fixTrackComponent.onRailPlaced.remove(this.onTutorialCompleted.dispatch,this.onTutorialCompleted)),this.onTutorialCompleted.dispose(),super.destroy()}showSuppliesPileGuideHand(){this._guideHand.active=!0,this._guideHand.findComponent(Ie).updatePosition(this._suppliesPileLocation.localPosition)}showMinecartGuideHand(){this._guideHand.active=!0,this._guideHand.findComponent(Ie).updatePosition(this._minecartLocation.localPosition)}questionAnswered(k){this._guideHand.active=!1,k||(this._answerQuestionAmount.getQuestionsRemainingCount()>1?this._firstQuestionIncorrectDialogue.play():this._secondQuestionIncorrectDialogue.play())}completeTutorial(){this._tutorialSaveState.completeMapObject()}showFirstQuestionCorrectDialogue(){this._firstQuestionCorrectDialogue.play()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Fa.prototype,"onTutorialCompleted",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Fa.prototype,"_guideHand",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Fa.prototype,"_suppliesPileLocation",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Fa.prototype,"_minecartLocation",void 0),(0,G.Cg)([(0,j.MnK)(yi),(0,G.Sn)("design:type",yi)],Fa.prototype,"_firstQuestionCorrectDialogue",void 0),(0,G.Cg)([(0,j.MnK)(yi),(0,G.Sn)("design:type",yi)],Fa.prototype,"_firstQuestionIncorrectDialogue",void 0),(0,G.Cg)([(0,j.MnK)(yi),(0,G.Sn)("design:type",yi)],Fa.prototype,"_secondQuestionIncorrectDialogue",void 0),(0,G.Cg)([(0,j.MnK)(Ra),(0,G.Sn)("design:type",Ra)],Fa.prototype,"_answerQuestionAmount",void 0),(0,G.Cg)([(0,j.MnK)(Na),(0,G.Sn)("design:type",Na)],Fa.prototype,"_fixTrackComponent",void 0),(0,G.Cg)([(0,j.Cdj)("IntroMinecartSave"),(0,G.Sn)("design:type",si)],Fa.prototype,"_tutorialSaveState",void 0),Fa=(0,G.Cg)([(0,j.EVk)("MinecartFixingTutorialFSM",W.Y.adventureFsm)],Fa);var Ga=U(30488);let ja=class extends Be.u{create(){super.create(),this._minecartFixingTutorial.onTutorialCompleted.add(this._mapSaveState.completeMapObject,this._mapSaveState)}destroy(){this._minecartFixingTutorial.onTutorialCompleted.remove(this._mapSaveState.completeMapObject,this._mapSaveState),super.destroy()}run(){this.execute(144,{game:tt.q.instance.game,aspenExclamation:this._aspenExclamationMark,startTrigger:this._startTrigger,aspenStoreMarker:this._aspenStoreMarker,playerTransform:this._mainPlayer.transform,playerAspenPosition:this._startPosition.worldPosition,minecartFixingTutorial:this._minecartFixingTutorial})}};(0,G.Cg)([(0,j.MnK)(Ga.E),(0,G.Sn)("design:type",Ga.E)],ja.prototype,"_startTrigger",void 0),(0,G.Cg)([(0,j.MnK)(si),(0,G.Sn)("design:type",si)],ja.prototype,"_mapSaveState",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ja.prototype,"_aspenExclamationMark",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ja.prototype,"_aspenStoreMarker",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],ja.prototype,"_startPosition",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],ja.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("IntroMinecartFixing"),(0,G.Sn)("design:type",Fa)],ja.prototype,"_minecartFixingTutorial",void 0),ja=(0,G.Cg)([(0,j.EVk)("MinecartIntroTutorialFSM",W.Y.adventureFsm)],ja);let $a=class extends j.uAl{constructor(){super(...arguments),this._hideStartButton=!0,this._onMapClose=new j.HN0}destroy(){this._onMapClose.dispose(),super.destroy()}open(){tt.q.instance.prodigy.open.adventureMap(this._hideStartButton,(()=>{this._onMapClose.dispatch()}))}};var Ha;(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],$a.prototype,"_hideStartButton",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$a.prototype,"_onMapClose",void 0),$a=(0,G.Cg)([(0,j.EVk)("OpenAdventureMap",W.Y.adventureUi)],$a);let Va=Ha=class extends j.uAl{constructor(){super(...arguments),this.onHide=new j.HN0,this.onShow=new j.HN0,this._isShowing=!0}static make(k,B,U){const F=k.addComponent(Ha,!1);return F._trackObject=B,F._relativeBounds=U,F.create(),F}get isShowing(){return this._isShowing}create(){super.create();{const k=j.i7d.main;if(!k)return;const B=k.viewportSize;this._cameraTransform=k.GameObject.transform,this._cameraHalfWidth=B.getHalfWidth(),this._cameraHalfHeight=B.getHalfHeight(),this._cameraTransform.onWorldMatrixChanged.add(this.cull,this),this._trackObject.onWorldMatrixChanged.add(this.cull,this),this.cull()}}destroy(){var k,B;null===(k=this._cameraTransform)||void 0===k||k.onWorldMatrixChanged.remove(this.cull,this),null===(B=this._trackObject.onWorldMatrixChanged)||void 0===B||B.remove(this.cull,this),this.onHide.dispose(),this.onShow.dispose(),super.destroy()}cull(){const k=this._cameraTransform.worldPosition,B=this._trackObject.worldPosition,U=B.x-k.x,F=B.y-k.y,G=this._relativeBounds,j=U+G.left-this._cameraHalfWidth&&F+G.top-this._cameraHalfHeight;this._isShowing!==j&&(j?this.onShow.dispatch():this.onHide.dispatch()),this._isShowing=j}};(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Va.prototype,"_trackObject",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],Va.prototype,"_relativeBounds",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Va.prototype,"onHide",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Va.prototype,"onShow",void 0),Va=Ha=(0,G.Cg)([(0,j.EVk)("DynamicObjectCameraCulling",W.Y.map)],Va);let Wa=class extends j.uAl{constructor(){super(...arguments),this._hasValidPath=!1}create(){super.create(),this._followLocomotion&&this._followLocomotion.onPathStart.add(this.followLocomotionStarted,this),this._minFollowDistanceSq=this._minFollowDistance*this._minFollowDistance,this._maxFollowDistanceSq=this._maxFollowDistance*this._maxFollowDistance}destroy(){this._followLocomotion&&(this._followLocomotion.onPathStart.remove(this.followLocomotionStarted,this),this._followLocomotion=null),super.destroy()}update(){if(super.update(),this._followLocomotion){const k=this._followLocomotion.GameObject.transform.worldPosition,B=this._targetLocomotion.GameObject.transform.worldPosition,U=j.C1c.getDistanceSq(k,B);this._hasValidPath?Uthis._maxFollowDistanceSq&&this.updateFollowPath(B,k)}}setFollowDistance(k,B){this._minFollowDistance=k,this._maxFollowDistance=B,this._minFollowDistanceSq=k*k,this._maxFollowDistanceSq=B*B}setFollowLocomotion(k){this._followLocomotion&&this._followLocomotion.onPathStart.remove(this.followLocomotionStarted,this),(0,ut.v)(!!k,"Invalid pathLocomotion was set"),this._followLocomotion=k,this._followLocomotion.onPathStart.add(this.followLocomotionStarted,this)}followLocomotionStarted(){this._hasValidPath?this.updateFollowPath(this._targetLocomotion.GameObject.transform.worldPosition,this._followLocomotion.GameObject.transform.worldPosition):this._hasValidPath=!1}updateFollowPath(k,B){var U,F;const G=this._pathfinder?this._pathfinder.findPath(k,B):null===(U=j.W$e.instance.game.navMeshSystem.navMesh)||void 0===U?void 0:U.findPath(k,B);if(!G)return;const $=null===(F=this._followLocomotion.getPath())||void 0===F?void 0:F.slice(this._followLocomotion.currentPathSegment+1);this._targetLocomotion.setPath([...G,...null!=$?$:[]]),this._hasValidPath=!0}};var qa;(0,G.Cg)([(0,j.MnK)(j.KhP),(0,G.Sn)("design:type",j.KhP)],Wa.prototype,"_followLocomotion",void 0),(0,G.Cg)([(0,j.MnK)(j.KhP),(0,G.Sn)("design:type",j.KhP)],Wa.prototype,"_targetLocomotion",void 0),(0,G.Cg)([(0,j.Cdj)("Pathfinder"),(0,G.Sn)("design:type",j.wGs)],Wa.prototype,"_pathfinder",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Wa.prototype,"_minFollowDistance",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Wa.prototype,"_maxFollowDistance",void 0),Wa=(0,G.Cg)([(0,j.EVk)("FollowPathLocomotion",W.Y.motion)],Wa);let Ka=qa=class extends j.uAl{constructor(){super(...arguments),this._petFollowCount=0,this._followSpawnOffset=new j.I9Y,this._minimumFollowDistance=0,this._maximumFollowDistance=0,this._currentFollows=[],this._spawnedPetFollows=[],this._nextPathLocomotion=null}get spawnedPetFollows(){return this._spawnedPetFollows}get petFollowCount(){return this._petFollowCount}create(){super.create(),this._nextPathLocomotion=this._playerPathLocomotion}destroy(){this._playerPathLocomotion=null,super.destroy()}spawnBuddyFollow(k){const B=Yt.t.getItem("follow",k);if(!B)return;const U=B.metadata;let F=null,G=k;"legacy"===U.type?F="legacy":"spine"===U.type?F="spine":"pet"===U.type&&(F="pet",G=U.petID),(0,ut.v)(null!==F,`Invalid buddy follow was attempted to load with ID: ${k}`);const $=this._prefabAppearanceLoader.loadFollowPrefab(F,G,this._followParent);this._followParent||j.wa5.getActiveScene().addGameObject($),this.initializeFollowPrefab($),this._nextPathLocomotion=$.findComponentInChildren(j.KhP)}spawnPetFollow(k){const B=this._prefabAppearanceLoader.loadFollowPrefab("pet",k,this._followParent);this._followParent||j.wa5.getActiveScene().addGameObject(B),this.initializeFollowPrefab(B),this._nextPathLocomotion=B.findComponentInChildren(j.KhP),this._spawnedPetFollows.push(k)}destroyCurrentFollows(){const k=this._currentFollows.length;if(k>0){for(let B=0;B0){tt.q.instance.game.broadcaster.addAppListener(jn.ig.Evolved,this.petEvolved,this,null);for(const k of this.getPetsToFollow())this._followSpawner.spawnPetFollow(k)}const F=this._playerData.player,G=F.equipment.getFollow();if(j.Aq$.isDefined(G)){const j=null===(B=null===(k=Yt.t.getItem("follow",G))||void 0===k?void 0:k.metadata)||void 0===B?void 0:B.petID,$=null===(U=Yt.t.getItem("pet",j))||void 0===U?void 0:U.data;if((null==$?void 0:$.unlockFollow)&&(null==$?void 0:$.unlockFollow)===G){const k=F.kennel.amountOfPet(j),B=F.kennel.getPetTeamIDs()[0]===j;(this._petFollowCount<=0||k>=2||!B)&&this._followSpawner.spawnPetFollow(j)}else this._followSpawner.spawnBuddyFollow(G)}}unloadFollows(){tt.q.instance.game.broadcaster.removeAppListener(jn.ig.Evolved,this,null),tt.q.instance.game.broadcaster.removeAppListener(jn.Y1.ClosePetsMenu,this),this._followSpawner.destroyCurrentFollows()}getPetsToFollow(){if(this._petFollowCount<1)return[];const k=this._playerData.player.kennel.getPetTeamIDs();return k.length=Math.min(k.length,this._petFollowCount),k}petEvolved(k){this._playerData.player.kennel.petTeam.indexOf(k)>-1&&this.reloadFollows()}petMenuClosed(){const k=this._followSpawner.spawnedPetFollows,B=this.getPetsToFollow();(k.length!==B.length||k.some(((k,U)=>B[U]!==k)))&&this.reloadFollows()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],za.prototype,"_petFollowCount",void 0),(0,G.Cg)([(0,j.MnK)(Ka),(0,G.Sn)("design:type",Ka)],za.prototype,"_followSpawner",void 0),(0,G.Cg)([(0,j.Cdj)("377-3e7b"),(0,G.Sn)("design:type",Object)],za.prototype,"_playerData",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],za.prototype,"_loadOnCreate",void 0),za=(0,G.Cg)([(0,j.EVk)("PlayerPetAndFollowLoader",W.Y.follow)],za);let Ya=class extends Be.u{constructor(){super(...arguments),this._monsterJumpHeight=80}run(){const k=new j.I9Y;k.copyFrom(this._crystalMonster.transform.worldPosition);const B=new j.I9Y(k.x,k.y-this._monsterJumpHeight);this.execute(131,{game:tt.q.instance.game,playerObject:this._mainPlayer,playerStartPosition:this._initialPlayerPosition.worldPosition,playerTransform:this._mainPlayer.transform,camera:j.i7d.main.GameObject,playerWalkTarget:this._playerWalkTarget.worldPosition,nootWalkTarget:this._nootWalkTarget.worldPosition,playerFollowSpawner:this._mainPlayer.findComponentInChildren(za),nootTransform:this._nootGameObject.transform,nootAlertBubble:this._nootAlertBubble,playerAlertBubble:this._playerAlertBubble,nootQuestionBubble:this._nootQuestionBubble,monsterSpineTransform:this._crystalMonsterSpine.transform,monsterAlertBubble:this._crystalMonsterAlertBubble,monsterTransform:this._crystalMonster.transform,monsterJumpEnd:B,monsterJumpStart:k,monsterOffscreenPosition:this._monsterOffscreenPosition.worldPosition,monsterSpine:this._crystalMonsterSpine.findComponent(oi.v).getSpine(),nootGraphic:this._nootGraphic})}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ya.prototype,"_nootGameObject",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Ya.prototype,"_initialPlayerPosition",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Ya.prototype,"_playerWalkTarget",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Ya.prototype,"_nootWalkTarget",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ya.prototype,"_nootQuestionBubble",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ya.prototype,"_nootAlertBubble",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ya.prototype,"_playerAlertBubble",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ya.prototype,"_crystalMonster",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ya.prototype,"_crystalMonsterSpine",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ya.prototype,"_monsterJumpHeight",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ya.prototype,"_crystalMonsterAlertBubble",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],Ya.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Ya.prototype,"_monsterOffscreenPosition",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],Ya.prototype,"_nootGraphic",void 0),Ya=(0,G.Cg)([(0,j.EVk)("Phase1IntroFSM",W.Y.adventureFsm)],Ya);var Qa,Xa=U(88818),Za=U(24110),Ja=U(63068);let tr=Qa=class extends Be.u{constructor(){super(...arguments),this.minecartSoundEffect=pi.c.Sfx_minecart,this.minecartStopSoundEffect=pi.c.Sfx_minecartstop,this._gearElement=new j.KDe}create(){super.create(),this._gearElement.hiddenSlots.push(Xa.Cj.Weapon),this._minecartAnimator&&this._minecartSpine&&(this.playIdleAnimation(),this._minecartSpine.getSpine()?this.createMask():this._minecartSpine.OnLoaded.add(this.createMask,this,0,!1))}destroy(){this._mask&&this._mask.destroy(),super.destroy()}run(){var k;null===(k=this._mainPlayer.findComponentInChildren(Ja.n))||void 0===k||k.addExtraGear(this._gearElement);const B=new $e.Point;this._mainPlayer.parent.transform.worldMatrix.applyInverse(B,B),this._minecartEntryPoint.worldMatrix.apply(B,B);const U=new $e.Point;this.GameObject.parent.transform.worldMatrix.applyInverse(U,U),this._minecartDestination.worldMatrix.apply(U,U);const F=new $e.Point;this._mainPlayer.parent.transform.worldMatrix.applyInverse(F,F),this._minecartExit.worldMatrix.apply(F,F);const G=new j.I9Y;G.copyFrom(this.GameObject.transform.localPosition);const $=new j.I9Y(U.x-G.x,U.y-G.y);this.execute(134,{game:tt.q.instance.game,playerAnimationController:this._mainPlayer.findComponentInChildren(Oa.$),playerTransform:this._mainPlayer.transform,minecartInput:this._minecartInput,minecartEntryPosition:B,minecartEntryDuration:this._minecartEntryDuration,minecart:this,minecartTransform:this.GameObject.transform,minecartFrom:G,minecartDestination:U,minecartRideDuration:this._minecartRideDuration,playerMinecartDestination:new j.I9Y(B.x+$.x,B.y+$.y),minecartAnimator:this._minecartAnimator,minecartExitDuration:this._minecartExitDuration,minecartExitPosition:F,saveState:this._mapSaveComponent,minecartStopOffset:this._minecartRideDuration-100,morphExpiration:this._mainPlayer.findComponentInChildren(Ca),playerSpawnFollows:this._mainPlayer.findComponentInChildren(Ka),playerFollowLoader:this._mainPlayer.findComponentInChildren(za)})}checkTrackCompletion(){this._minecartTrackSaveState&&!this._minecartTrackSaveState.isCompleted()||(this._minecartInput.active=!0)}playMotionAnimation(){this._minecartAnimator.playAnimation(`${Qa.ANIMATION_NAMES[this._minecartMovementDirection]}-motion`,!0)}playIdleAnimation(){this._minecartAnimator.playAnimation(`${Qa.ANIMATION_NAMES[this._minecartMovementDirection]}-idle`,!0)}applyMaskToPlayer(){const k=this._mainPlayer.findComponentInChildren(Za.B);this._mask.visible=!0,k.getRootContainer().mask=this._mask}clearPlayerMask(){const k=this._mainPlayer.findComponentInChildren(Za.B);this._mask.visible=!1,k.getRootContainer().mask=null}addPlayerWeapon(){var k;null===(k=this._mainPlayer.findComponentInChildren(Ja.n))||void 0===k||k.removeExtraGear(this._gearElement)}createMask(){const k=this._minecartSpine.getSlot(this._maskSlotName),B=this._minecartSpine.getSpine().getSlotContainer(k),U=B.getChildAt(0),F=new j.or0(B.width/B.scale.x,B.height/B.scale.y);U.visible=!1,this._mask=tt.q.instance.game.add.graphics(),this._mask.clear(),this._mask.visible=!1,this._mask.beginFill(16776960,1),this._mask.drawRect(.5*-F.width+U.position.x,.5*-F.height+U.position.y,F.width,F.height),this._mask.endFill(),B.addChild(this._mask)}};tr.ANIMATION_NAMES={0:"X",1:"Y-D",2:"Y-U"},(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],tr.prototype,"minecartSoundEffect",void 0),(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],tr.prototype,"minecartStopSoundEffect",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],tr.prototype,"_minecartAnimator",void 0),(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],tr.prototype,"_minecartSpine",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tr.prototype,"_minecartMovementDirection",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],tr.prototype,"_maskSlotName",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],tr.prototype,"_minecartEntryPoint",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],tr.prototype,"_minecartDestination",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],tr.prototype,"_minecartExit",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],tr.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.MnK)(si),(0,G.Sn)("design:type",si)],tr.prototype,"_minecartTrackSaveState",void 0),(0,G.Cg)([(0,j.MnK)(si),(0,G.Sn)("design:type",si)],tr.prototype,"_mapSaveComponent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],tr.prototype,"_minecartInput",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tr.prototype,"_minecartEntryDuration",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tr.prototype,"_minecartRideDuration",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tr.prototype,"_minecartExitDuration",void 0),tr=Qa=(0,G.Cg)([(0,j.EVk)("RideableMinecart",W.Y.adventureFsm)],tr);const er={[Bs.D.MEMBERSHIP_UPGRADE_REWARD_SMALL]:200,[Bs.D.MEMBERSHIP_UPGRADE_REWARD_MEDIUM]:225,[Bs.D.MEMBERSHIP_UPGRADE_REWARD_LARGE]:575};var ir,sr=U(48235);!function(k){k.UpgradeMagicoinAmountCore="UPGRADE_MAGICOIN_AMOUNT_CORE",k.UpgradeMagicoinAmountPlus="UPGRADE_MAGICOIN_AMOUNT_PLUS",k.UpgradeMagicoinAmountPlusCumulative="UPGRADE_MAGICOIN_AMOUNT_PLUS_CUMULATIVE",k.UpgradeMagicoinAmountUltra="UPGRADE_MAGICOIN_AMOUNT_ULTRA",k.UpgradeMagicoinAmountUltraCumulative="UPGRADE_MAGICOIN_AMOUNT_ULTRA_CUMULATIVE"}(ir||(ir={}));let nr=class extends Fi.z{create(){super.create(),this._bindOnCreate&&this.bindContext().catch(j.RQr.createHandler("[MembershipUpgradeRewardDataProvider] Unable to bind context"))}bindContext(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield sr.W.getCollectedRewardsData(),B=this.getMagicoinRewardQuantityForFeature(k,Bs.D.MEMBERSHIP_UPGRADE_REWARD_SMALL),U=this.getMagicoinRewardQuantityForFeature(k,Bs.D.MEMBERSHIP_UPGRADE_REWARD_MEDIUM),F=this.getMagicoinRewardQuantityForFeature(k,Bs.D.MEMBERSHIP_UPGRADE_REWARD_LARGE);Nt.d.updateInjectedValues(this.gameObject,{[ir.UpgradeMagicoinAmountCore]:B,[ir.UpgradeMagicoinAmountPlus]:U,[ir.UpgradeMagicoinAmountPlusCumulative]:B+U,[ir.UpgradeMagicoinAmountUltra]:F,[ir.UpgradeMagicoinAmountUltraCumulative]:B+U+F})}))}getMagicoinRewardQuantityForFeature(k,B){return j.Aq$.isDefined(k.rewarded[B])?0:er[B]}destroy(){this.unbindContext(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],nr.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],nr.prototype,"_bindOnCreate",void 0),nr=(0,G.Cg)([(0,j.EVk)("MembershipUpgradeRewardDataProvider",j.YH6.injection)],nr);var ar,rr=U(30405);!function(k){k.QuestManager="QuestManager",k.TaskInfo="TASK_INFO",k.TaskRepeatableIndex="TASK_REPEATABLE_INDEX",k.TaskIndex="TASK_INDEX",k.TaskInProgressIndex="TASK_IN_PROGRESS_INDEX"}(ar||(ar={}));var or,hr=U(60031),cr=U(43518);!function(k){k.COMPLETE="complete",k.IN_PROGRESS="in-progress",k.LOCKED="locked"}(or||(or={}));let dr=class extends Fi.z{constructor(){super(...arguments),this.onAnimateCard=new j.HN0,this.onRefreshCards=new j.HN0,this.isCollecting=!1}create(){super.create(),this.bindContext().catch(j.RQr.createHandler("[DailyLoginCalendarCardComponent] Unable to retrieve daily login calendar metadata"))}postCreate(){super.postCreate(),this.runCalcTimeToCollect().catch(j.RQr.createHandler("[DailyLoginCalendarCardComponent] Unable to calculate time to collect"))}destroy(){this.onAnimateCard.dispose(),this.onRefreshCards.dispose(),super.destroy()}bindContext(){const k=Object.create(null,{bindContext:{get:()=>super.bindContext}});return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G,j;k.bindContext.call(this),this._task=this._context.Container.get(ar.TaskInfo),this._indexOfTaskInProgress=this._context.Container.get(ar.TaskInProgressIndex);const $=this._dataProvider.player.hasMembership(),H=this._task.taskProgress.results,V="complete"===this._task.taskProgress.status,W=this._index===this._indexOfTaskInProgress,q=null===(B=null==H?void 0:H[this._repeatableIndex])||void 0===B?void 0:B.result,K="in-progress"===this._task.taskProgress.status&&(null!==(G=null===(F=null===(U=this._task.taskProgress)||void 0===U?void 0:U.data)||void 0===F?void 0:F.timesCompleted)&&void 0!==G?G:0)>this._repeatableIndex,z=!$&&(V||K)&&"ItemsSaved"===q,Y=(V||K)&&"ItemsLost"===q,Q=V&&void 0===H||V&&$&&"ItemsSaved"===q||K&&!z&&!Y,X=this._timeManager.getServerTimeMs(),Z=W?yield cr.M.getProgressOfTaskInProgress(this._task):0,J=Math.max(Z-X,0),tt=(yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata()).endDate,et=yield cr.M.getProgressOfTaskInProgress(),it=Math.min(et,tt)===tt,st=X>=tt,nt=Object.assign(Object.assign({},this.getPrizes()),{IN_PROGRESS_TIME:J,SHOW_TIMER:!!J,SHOW_COLLECT_BUTTON:W&&!it&&!st,ENABLE_COLLECT_BUTTON:!st&&!this.isCollecting&&W&&J<=0,IS_READY_TO_COLLECT:!st&&J<=0,LABEL_COLLECTED:V||K,MEMBER_LABEL_COLLECTED:Q,MEMBER_LABEL_SAVED:z,MEMBER_LABEL_LOST:Y,TASK_PROGRESS:this.taskProgressStatus(it||st),SHOW_CALENDAR_ENDING:W&&(it||st),IS_REPEATED_TASK:null===(j=this._task.taskDefinition)||void 0===j?void 0:j.repeatable,CARD_INDEX:`${this._index}`});Nt.d.updateInjectedValues(this.gameObject,nt)}))}isTaskReadyToBeCollect(){return(0,G.sH)(this,void 0,void 0,(function*(){return cr.M.isTaskReadyToCollect()}))}runCalcTimeToCollect(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._index===this._indexOfTaskInProgress,B=this._timeManager.getServerTimeMs(),U=k?yield cr.M.getProgressOfTaskInProgress(this._task):0,F=(yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata()).endDate,G=B>=F,j=F{this.onTaskCollectAnimationEnded.dispatch()},this.refreshRewardCards=()=>(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this.getTasks();this._rewardCards.forEach(((B,U)=>{const F=U>=k.length?k[k.length-1]:k[U],G={[ar.TaskInfo]:F,[ar.TaskInProgressIndex]:this.getCurrentQuestIndex(k)};Nt.d.updateInjectedValues(B,G);const $=this.getCard(B);null==$||$.bindContext().catch(j.RQr.createHandler("[DailyLoginCalendarRewardsComponent]: Could not rebind context for reward cards")),null==$||$.runCalcTimeToCollect().catch(j.RQr.createHandler("[DailyLoginCalendarCardComponent] Unable to calculate time to collect"))}))}))}create(){super.create(),this.onLoadingStart.dispatch(),this.populateRewardCards().then((()=>(0,G.sH)(this,void 0,void 0,(function*(){return this.scrollToInProgress()})))).catch(j.RQr.createHandler("Error populating prizes")),this._dailyLoginCalendarQuestManager.onDataChanged.add(this.onDataChangedCallback,this),this._dailyLoginCalendarQuestManager.onTimeUpdated.add(this.onTimeUpdatedCallback,this),this.onMouseWheelHandler=this.onMouseWheelCallback.bind(this),tt.q.instance.game.input.mouse.addMouseWheelCallback(this.onMouseWheelHandler)}onTimeUpdatedCallback(){(()=>(0,G.sH)(this,void 0,void 0,(function*(){yield this.updateTasks(),yield this.refreshRewardCards()})))().catch(j.RQr.createHandler("Error updating time on DailyLoginCalendarRewardsComponent"))}onDataChangedCallback(){(()=>(0,G.sH)(this,void 0,void 0,(function*(){if((yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata()).uuid===this.currentUUID){if(yield this.checkPrizeCollectAnimation()){this.updateCurrentGameObjectInjections(),this.onTriggerTaskCollectAnimation.dispatch(),yield this.waitForSignal(this.onTaskCollectAnimationEnded);const k=this.getCard(this._currentTaskGameObject);null==k||k.onAnimateCard.dispatch(),yield this.waitForSignal(this.onTaskCollectAnimationEnded),yield rr.o.wait(1e3)}yield this.updateTasks(),yield this.refreshRewardCards(),yield this.updateCurrentTaskIndex(),this.onAnimationsFinished.dispatch()}else this.resetComponent()})))().catch(j.RQr.createHandler("Error updating data onDataChangedCallback"))}resetComponent(){this.onLoadingStart.dispatch(),this._container.children.forEach((k=>{k.active=!1,k.destroyDeferred()})),this._questTasks.length=0,this._rewardCards.length=0,this.populateRewardCards().then((()=>(0,G.sH)(this,void 0,void 0,(function*(){return this.scrollToInProgress()})))).catch(j.RQr.createHandler("Error populating prizes"))}checkPrizeCollectAnimation(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this.getCurrentQuestIndex(yield this._dailyLoginCalendarQuestManager.getActiveStandardTrack());return this._cachedCurrentIndex!==k}))}waitForSignal(k){return(0,G.sH)(this,void 0,void 0,(function*(){return new Promise((B=>{k.addOnce((()=>{B()}))}))}))}populateRewardCards(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F;this._container.children.length=0;const j=yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata();this.currentUUID=j.uuid;const $=[],H=yield this.getTasks();for(const G of H){const j=null!==(B=null===(k=G.taskDefinition)||void 0===k?void 0:k.repeatable)&&void 0!==B&&B;if(j&&"number"==typeof j)for(let k=0;k(0,G.sH)(this,[k,B],void 0,(function*({repeatableIndex:k,task:B},U){return yield rr.o.wait(10*U),this.instantiateChild(B,U,k,H)}))))),this._rewardCards.forEach((k=>{this._container.addChild(k),k.active=!0})),this._rewardCards}))}updateTasks(){return(0,G.sH)(this,void 0,void 0,(function*(){return this._questTasks=yield this._dailyLoginCalendarQuestManager.getActiveStandardTrack(),this._questTasks}))}getTasks(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;return(null===(k=this._questTasks)||void 0===k?void 0:k.length)||(yield this.updateTasks()),this._questTasks}))}instantiateChild(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){const G=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.CardDailyLoginCalendar,{[ar.TaskInfo]:k,[ar.TaskRepeatableIndex]:U,[ar.TaskIndex]:B,[ar.TaskInProgressIndex]:this.getCurrentQuestIndex(F)});return G.active=!1,G.name=`${G.name} ${k.taskID}`,G}))}scrollToInProgress(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this._scrollViewRef||!this._gridLayoutRef)return;const k=this._container.children,B=yield this.updateCurrentTaskIndex(),U=j.Htv.getWidth(k[0]),F=this._gridLayoutRef.columnSpacing,G=(U+F)*B-j.Htv.getWidth(this._scrollViewRef.GameObject)/2+U/2+2*F;this._scrollViewRef.setScrollPosition(-G),this.updateCurrentGameObjectInjections(),this.onLoadingEnd.dispatch()}))}updateCurrentTaskIndex(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._container.children,B=this.getCurrentQuestIndex(yield this.getTasks());return this._cachedCurrentIndex=B,this._currentTaskGameObject=k[B],this.updateCurrentGameObjectInjections(),B}))}updateCurrentGameObjectInjections(){var k,B;this._prefabRoot&&Nt.d.updateInjectedValues(this._prefabRoot,{CURRENT_TASK_GAME_OBJECT:this._currentTaskGameObject,CURRENT_TASK_COLLECT_BUTTON_GAME_OBJECT:null===(B=null===(k=this._currentTaskGameObject)||void 0===k?void 0:k.findChildByName("PrizeSlots"))||void 0===B?void 0:B.findChildByName("Button Collect")})}getCurrentQuestIndex(k){var B,U;let F=k.findIndex((k=>"in-progress"===k.taskProgress.status));return k[F].taskDefinition.repeatable&&(F+=null!==(U=null===(B=k[F].taskProgress.data)||void 0===B?void 0:B.timesCompleted)&&void 0!==U?U:0),F}getCard(k){if(!k||k.isDestroyed)return null;const B=k.findComponent(dr);return B||(j.VyI.log("%c DailyLoginCalendarRewardsComponent getCard `card` %O not found to `.bindContext`, or destroyed",j.$bb.Error,"color: #00FF00; background: #000;",B),null)}isTaskReadyToBeCollect(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.refreshRewardCards(),yield this.updateCurrentTaskIndex();const k=this.getCard(this._currentTaskGameObject),B=yield cr.M.hasStandardTrackEnded();this.onTaskPrizeReady.dispatch(!B&&!!(null==k?void 0:k.isTaskReadyToBeCollect()))}))}onMouseWheelCallback(){this._rewardPopover.active&&(this._rewardPopover.active=!1)}destroy(){this._dailyLoginCalendarQuestManager.onDataChanged.remove(this.onDataChangedCallback,this),this._dailyLoginCalendarQuestManager.onTimeUpdated.remove(this.onTimeUpdatedCallback,this),tt.q.instance.game.input.mouse.removeMouseWheelCallback(this.onMouseWheelHandler),this.onAnimationsFinished.dispose(),this.onTaskCollectAnimationEnded.dispose(),this.onTriggerTaskCollectAnimation.dispose(),this.onTaskPrizeReady.dispose(),this.onLoadingStart.dispose(),this.onLoadingEnd.dispose(),super.destroy()}};var ur;(0,G.Cg)([(0,j.ERr)(),(0,j.YLv)("Prefab Root to dispatch some injections"),(0,G.Sn)("design:type",j._mx)],lr.prototype,"_prefabRoot",void 0),(0,G.Cg)([(0,j.ERr)(),(0,j.YLv)("Root container for the Reward Cards"),(0,G.Sn)("design:type",j._mx)],lr.prototype,"_container",void 0),(0,G.Cg)([(0,j.MnK)(Mt.C),(0,j.YLv)("Reference to the `StandardScrollView` to be navigated"),(0,G.Sn)("design:type",Mt.C)],lr.prototype,"_scrollViewRef",void 0),(0,G.Cg)([(0,j.MnK)(at),(0,G.Sn)("design:type",at)],lr.prototype,"_gridLayoutRef",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],lr.prototype,"_rewardPopover",void 0),(0,G.Cg)([(0,j.Cdj)("a71-dfcf"),(0,G.Sn)("design:type",hr.k)],lr.prototype,"_dailyLoginCalendarQuestManager",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],lr.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],lr.prototype,"onLoadingStart",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],lr.prototype,"onLoadingEnd",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],lr.prototype,"onTriggerTaskCollectAnimation",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],lr.prototype,"onTaskPrizeReady",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],lr.prototype,"onAnimationsFinished",void 0),(0,G.Cg)([(0,j.Bak)(),(0,j.i0J)(j.Z$z.SingleImage),(0,G.Sn)("design:type",String)],lr.prototype,"preloadSingleImage",void 0),lr=(0,G.Cg)([(0,j.EVk)("DailyLoginCalendarRewards",void 0,"Populate items for DailyLoginCalendar")],lr);let fr=ur=class extends j.uAl{constructor(){super(...arguments),this._playNotificationSfx=new j.HN0,this.isCalendarEnded=new j.HN0}create(){super.create(),this._broadcaster=tt.q.instance.prodigy.game.broadcaster,this._runOnCreate&&this.run().catch(j.RQr.createHandler("Error running Daily Login Calendar Timer Data Provider")),this._dailyLoginCalendarQuestManager.onDataChanged.add(this.onDataChanges,this),this._dailyLoginCalendarQuestManager.onTimeUpdated.add(this.onDataChanges,this)}onDataChanges(){ur._hasPlayedNotificationSfx=!1,this.run().catch(j.RQr.createHandler("Error running Daily Login Calendar Timer Data Provider"))}run(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._timeManager.getServerTimeMs(),B=yield this._dailyLoginCalendarQuestManager.getTimerData();if(B.calendarEnded)return void this._broadcaster.broadcast(jn.rF.CalendarEnded,tt.q.instance.prodigy.game,[]);const U=B.targetDate>k?jn.rF.CountdownStarted:jn.rF.ReadyToCollect,F=[B.targetDate-k];this._broadcaster.broadcast(U,tt.q.instance.prodigy.game,F),B.calendarIsEnding&&this._broadcaster.broadcast(jn.rF.CalendarEnding,tt.q.instance.prodigy.game,[]),U===jn.rF.ReadyToCollect&&!ur._hasPlayedNotificationSfx&&this.IsActiveInHierarchy&&tt.q.instance.prodigy.world.getCurrentZone()!==Ft.A_.CRYSTALCAVERNS&&(ur._hasPlayedNotificationSfx=!0,this._playNotificationSfx.dispatch())}))}hasCalendarEnded(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=(yield cr.M.hasUltimateTrackEnded())&&(yield cr.M.hasStandardTrackEnded());return this.isCalendarEnded.dispatch(k),k}))}destroy(){super.destroy(),this._dailyLoginCalendarQuestManager.onDataChanged.remove(this.onDataChanges,this),this._dailyLoginCalendarQuestManager.onTimeUpdated.remove(this.onDataChanges,this),this.isCalendarEnded.dispose(),this._playNotificationSfx.dispose()}};fr._hasPlayedNotificationSfx=!1,(0,G.Cg)([(0,j.Cdj)("a03-308f"),(0,G.Sn)("design:type",Ks.V)],fr.prototype,"_timeManager",void 0),(0,G.Cg)([(0,j.Cdj)("a71-dfcf"),(0,G.Sn)("design:type",hr.k)],fr.prototype,"_dailyLoginCalendarQuestManager",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],fr.prototype,"_runOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],fr.prototype,"_playNotificationSfx",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],fr.prototype,"isCalendarEnded",void 0),fr=ur=(0,G.Cg)([(0,j.EVk)("Daily Login Calendar - Timer Data Provider",void 0,"Reads the current calendar time for the Daily Login Calendar")],fr);var br=U(6670),pr=U(58776),vr=U(56567);let gr=class extends Fi.z{constructor(){super(...arguments),this.onUltimatePrizeReady=new j.HN0,this._initialBind=!0}create(){super.create(),this._dailyLoginCalendarQuestManager.onDataChanged.add(this.tryBindContext,this),this._bindOnCreate&&this.tryBindContext(),tt.q.instance.prodigy.game.broadcaster.addAppListener(jn.H3.MembershipResponseReceived,this.handleMembershipChange,this)}tryBindContext(){this.bindContext().catch(j.RQr.createHandler("[DlcUltimateTrackDataProviderComponent] Failed to bind context"))}bindContext(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;const U=yield this._dailyLoginCalendarQuestManager.getActiveUltimateTrack(),F=yield this._dailyLoginCalendarQuestManager.getActiveUltimateTrackMetadata(),G=yield this.getRewardTask(U),$=this.getClaimTask(U),H=this.getClaimTaskProgress($),V=null!==(k=$.taskDefinition.completionRequirements.data.target)&&void 0!==k?k:H,W=Math.max(1,F.endDate-this._timeManager.getServerTimeMs()),q=(null===(B=null==G?void 0:G.taskProgress)||void 0===B?void 0:B.status)===pr.t.COMPLETE,K=[H,V,!this._initialBind,this._initialBind?0:1200],z={[hs.jP.ShouldShowMemberJar]:!1,[hs.jP.ThresholdPrizeMembershipTier]:xs._$.MemberUltimateBundle,[hs.jP.ThresholdPrizePackageFeatureKey]:"daily_login_calendar_threshold_reward",[hs.jP.UltimateTrackTimeRemaining]:W,[hs.jP.UltimateTrackRewardAvailable]:yield this.isUltimatePrizeReady(),[hs.jP.UltimateTrackRewardClaimed]:q,[hs.jP.UltimateTrackProgressBarFillData]:K};(null==F?void 0:F.prizeDisplayConfig)?(z[hs.jP.UltimateTrackRewardDisplayConfig]=F.prizeDisplayConfig,Object.entries(F.prizeDisplayConfig).forEach((([k,B])=>{z[`${hs.jP.UltimateTrackRewardDisplayConfig}.${k}`]=B}))):j.RQr.createHandler("[DlcUltimateTrackDataProviderComponent] No prize display config found in ultimate quest metadata"),Nt.d.updateInjectedValues(this.gameObject,z),this._initialBind=!1}))}checkIfUltimatePrizeReady(){return(0,G.sH)(this,void 0,void 0,(function*(){this.onUltimatePrizeReady.dispatch(yield this.isUltimatePrizeReady())}))}isUltimatePrizeReady(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;const U=yield this._dailyLoginCalendarQuestManager.getActiveUltimateTrack(),F=yield this.getRewardTask(U),G=this.getClaimTask(U),j=(null===(k=null==G?void 0:G.taskProgress)||void 0===k?void 0:k.status)===pr.t.COMPLETE,$=(null===(B=null==F?void 0:F.taskProgress)||void 0===B?void 0:B.status)===pr.t.COMPLETE;return j&&!$}))}getClaimTaskProgress(k){var B,U,F,G,j;return(null===(B=k.taskProgress)||void 0===B?void 0:B.status)===pr.t.COMPLETE?null!==(U=k.taskDefinition.completionRequirements.data.target)&&void 0!==U?U:0:null!==(j=null===(G=null===(F=null==k?void 0:k.taskProgress)||void 0===F?void 0:F.data)||void 0===G?void 0:G.progress)&&void 0!==j?j:0}handleMembershipChange(k){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.prodigy.game.broadcaster.removeAppListener(jn.H3.MembershipResponseReceived,this),yield this._playerProvider.fetchMembershipUpsell(),yield this.bindContext()}))}getClaimTask(k){return k[0]}getRewardTask(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=new vr.f,U=k.filter((B=>B!==this.getClaimTask(k)));return(yield br.f.filterTasksByPreconditions(U,B))[0]}))}destroy(){tt.q.instance.prodigy.game.broadcaster.removeAppListener(jn.H3.MembershipResponseReceived,this),this._dailyLoginCalendarQuestManager.onDataChanged.remove(this.tryBindContext,this),this.onUltimatePrizeReady.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],gr.prototype,"_playerProvider",void 0),(0,G.Cg)([(0,j.Cdj)("a71-dfcf"),(0,G.Sn)("design:type",hr.k)],gr.prototype,"_dailyLoginCalendarQuestManager",void 0),(0,G.Cg)([(0,j.Cdj)("a03-308f"),(0,G.Sn)("design:type",Ks.V)],gr.prototype,"_timeManager",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],gr.prototype,"_bindOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],gr.prototype,"onUltimatePrizeReady",void 0),gr=(0,G.Cg)([(0,j.EVk)("DailyLoginCalendarUltimateTrackDataProvider")],gr);var mr=U(43333);let yr=class extends j.uAl{postCreate(){super.postCreate(),this._dailyLoginCalendarQuestManager.onDataChanged.add(this.run,this),this._dailyLoginCalendarQuestManager.onTimeUpdated.add(this.run,this),this.run()}destroy(){this._dailyLoginCalendarQuestManager.onDataChanged.remove(this.run,this),this._dailyLoginCalendarQuestManager.onTimeUpdated.remove(this.run,this),super.destroy()}run(){this.updateTimerEndEvent().catch(j.RQr.createHandler("DailyLoginCalendarEndEventDataProvider bindContext error from updateTimerEndEvent"))}updateTimerEndEvent(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata(),B=this._timeManager.getServerTimeMs(),U=k.endDate-B,F=U<=0;tt.q.instance.prodigy.game.broadcaster.broadcast(jn.rF.CalendarTimeRemaining,tt.q.instance.prodigy.game,[U]),this._timerText&&F&&this._timerText.onTimerCompleted.dispatch()}))}};(0,G.Cg)([(0,j.Cdj)("a71-dfcf"),(0,G.Sn)("design:type",hr.k)],yr.prototype,"_dailyLoginCalendarQuestManager",void 0),(0,G.Cg)([(0,j.Cdj)("a03-308f"),(0,G.Sn)("design:type",Ks.V)],yr.prototype,"_timeManager",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],yr.prototype,"_timerText",void 0),yr=(0,G.Cg)([(0,j.EVk)("DailyLoginCalendarEndEvent",void 0,"")],yr);var _r=U(47728);let Er=class extends j.uAl{setItem(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U;const F=yield Yt.t.secureGetItem(k.type,k.ID);if(!F)throw new Error(`DailyLoginCalendarPrizeItemComponent setItem Item was not found for ${k.type}-${k.ID}`);const G=os.X.createImageLoadData(F);yield this._image.setAsset(G.source,G.frame),null===(U=null===(B=this._quantity.GameObject)||void 0===B?void 0:B.isDestroyed)||void 0===U||U||(this._quantity.text=`x ${k.N}`,"item"===F.type&&F.ID&&_r.x.isMorphMarbleAsset(F.ID)&&(this._morphMarbleIcon.active=!0))}))}};(0,G.Cg)([(0,j.MnK)(Ke._),(0,j.YLv)("Image of the prize item to be filled by invoking `setItem`"),(0,G.Sn)("design:type",Ke._)],Er.prototype,"_image",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,j.YLv)("Quantity of the prize item to be filled by invoking `setItem`"),(0,G.Sn)("design:type",j.EYj)],Er.prototype,"_quantity",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Er.prototype,"_morphMarbleIcon",void 0),Er=(0,G.Cg)([(0,j.EVk)("DailyLoginCalendarPrizeItem",void 0,"DailyLoginCalendar prize item consumer and display")],Er);U(28047);let wr=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.onShopSelected=this.createTidySignal()}setup(k){if(!j.Aq$.isDefined(this.shopButtonPrefab)||!j.Aq$.isDefined(this.shopButtonsContainerObject))return;const B=Object.entries(k);B.sort(((k,B)=>k[1].cover-B[1].cover)),Promise.all(B.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return this.createButtonForShop(k)}))))).then((k=>{k.filter((k=>j.Aq$.isDefined(k))).forEach(((k,B)=>{this.shopButtonsContainerObject.addChildAt(k,B)}))})).catch((k=>{throw k}))}createButtonForShop(k){return(0,G.sH)(this,void 0,void 0,(function*(){const[B,U]=k,{label:F,cover:G,itemBake:j,nameLocalizationKey:$}=U,H=$?this._baseLocalizer.getText($):void 0,V=[{injectionName:"SELECTED_BAKE",data:j},{injectionName:"SELECTED_COVER",data:G},{injectionName:"SELECTED_URL",data:`singleImage-${j}`},{injectionName:"USING_URL_IMAGE",data:"string"==typeof j}],W=yield this._prefabLoader.loadWithDependenciesFromGUID(this.shopButtonPrefab,this.shopButtonsContainerObject,!1,V);return Nt.d.updateInjectedValues(W,{SHOP_LABEL:null!=H?H:F,SHOP_KEY:B,SHOP_CLICKED_CB:()=>{this.onShopSelected.dispatch(B)}}),W}))}};(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],wr.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],wr.prototype,"_baseLocalizer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],wr.prototype,"onShopSelected",void 0),(0,G.Cg)([(0,j.i0J)(j.Z$z.Prefab),(0,G.Sn)("design:type",String)],wr.prototype,"shopButtonPrefab",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],wr.prototype,"shopButtonsContainerObject",void 0),wr=(0,G.Cg)([(0,j.EVk)("AllShopsMenuController")],wr);var Tr=U(10471),Sr=U(8394),Ar=U(59599);let Cr=class extends j.uAl{constructor(){super(...arguments),this._amount=0,this._currencyID=0}set amount(k){this._amount=k}set currency(k){this._currencyID=k}refresh(){const k=(0,Sr.p)("currency",this._currencyID)&&Tr.h.includes(this._currencyID)&&this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(this._amount);this._lockedState.setValue(k)}};(0,G.Cg)([(0,Gi.b)("5c7-e02d"),(0,G.Sn)("design:type",zn.W)],Cr.prototype,"_hardCurrencyDataProvider",void 0),(0,G.Cg)([(0,j.MnK)(Ar.f),(0,G.Sn)("design:type",Ar.f)],Cr.prototype,"_lockedState",void 0),Cr=(0,G.Cg)([(0,j.EVk)("DynamicStoreBundleLockedState",W.Y.store)],Cr);U(71391),U(76016),U(77992);var Or=U(16847);let Ir=class extends j.uAl{constructor(){super(...arguments),this.currencyDisplayComponents=[],this.currenciesToExclude=[]}setDisplayedCurrencies(k){const B=Object.entries(k).sort((([,k],[,B])=>B-k)).map((([k])=>parseInt(k,10))).filter((k=>!this.currenciesToExclude.includes(k)));for(const[U,F]of this.currencyDisplayComponents.entries()){const k=B[U];F.GameObject.active=j.Aq$.isDefined(k),F.GameObject.active&&F.updateCurrencyID(k)}}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Or.n),(0,G.Sn)("design:type",Array)],Ir.prototype,"currencyDisplayComponents",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.g11)(),(0,G.Sn)("design:type",Array)],Ir.prototype,"currenciesToExclude",void 0),Ir=(0,G.Cg)([(0,j.EVk)("DynamicStoreCurrencyDisplayContoller")],Ir);var Dr=U(64270),Rr=U(88131),Pr=U(55328);const Mr=[13,15,12,14,16,1,27];let Nr=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.onDataLoadStarted=this.createTidySignal(),this.onDataLoadFinished=this.createTidySignal(),this.onConfigurationEntityLoaded=this.createTidySignal()}postCreate(){this.loadStore().catch((k=>{this.dispatchError(k)})),this.loadConfig().catch((k=>{this.dispatchError(k)}))}loadStore(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;this.onDataLoadStarted.dispatch();const U=null!==(B=null!=k?k:this.storeName)&&void 0!==B?B:Dr.g0.AllShops;if(U===Dr.g0.AllShops)return void this.onDataLoadFinished.dispatch(Rr.Q.success({DYNAMIC_STORE_DATA:U}));const{player:F}=this._playerDataProvider,G=Mr.map((k=>({[hs.$u.CurrencyID]:k,[hs.$u.CurrencyAmount]:F.getCurrencyAmount(k)}))),j=yield this._dynamicStoreDataProvider.getDynamicStoreUIData({storeKey:U});if(j.isSuccess()){const k=j.get();this.onDataLoadFinished.dispatch(Rr.Q.success({MULTI_CURRENCY_WALLET_DATA:G,DYNAMIC_STORE_DATA:k,DYNAMIC_STORE_TAB_AMOUNT:k.store.sections.length}))}else this.dispatchError(j.error)}))}loadConfig(){return(0,G.sH)(this,void 0,void 0,(function*(){try{const{storeConfigEntity:k}=yield this._dynamicStoreRoute.getStoreConfigurationEntity();this.onConfigurationEntityLoaded.dispatch(k)}catch(e){this.dispatchError(e)}}))}dispatchError(k){if("string"==typeof k)return j.VyI.log(k,j.$bb.Error),void this.onDataLoadFinished.dispatch(Rr.Q.error(new Error(k)));const B=new Error(j.RQr.stringify(null!=k?k:"There was an error loading the dynamic store data"));j.VyI.log(B.message,j.$bb.Error),this.onDataLoadFinished.dispatch(Rr.Q.error(B))}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Nr.prototype,"onDataLoadStarted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Nr.prototype,"onDataLoadFinished",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Nr.prototype,"onConfigurationEntityLoaded",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Nr.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("84d-05d4"),(0,G.Sn)("design:type",Object)],Nr.prototype,"_dynamicStoreDataProvider",void 0),(0,G.Cg)([(0,Gi.b)("9ea-3f44"),(0,G.Sn)("design:type",Pr.v)],Nr.prototype,"_dynamicStoreRoute",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Nr.prototype,"storeName",void 0),Nr=(0,G.Cg)([(0,j.EVk)("DynamicStoreDataConsumer")],Nr);let xr=class extends j.uAl{get labelString(){return this._labelString}set labelString(k){this._labelString=(0,ms.k)(k),this.updateLabels()}get count(){return this._count}set count(k){this._count=k,this.updateLabels()}constructor(){super(),this.hideIfLessThanOne=!1,this._count=0,this._labelString=(0,ms.k)("MORE")}postCreate(){this.updateLabels()}updateLabels(){const k=this.hideIfLessThanOne&&this.count<1;this.gameObject.active=!k,this.counterText&&(this.counterText.text=`${this.getSignChar()}${this._count}`),this.labelText&&(this.labelText.text=this._labelString)}getSignChar(){return this._count>0?"+":""}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],xr.prototype,"hideIfLessThanOne",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String),(0,G.Sn)("design:paramtypes",[String])],xr.prototype,"labelString",null),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number),(0,G.Sn)("design:paramtypes",[Number])],xr.prototype,"count",null),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],xr.prototype,"counterText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],xr.prototype,"labelText",void 0),xr=(0,G.Cg)([(0,j.EVk)("ItemsCountCardController"),(0,G.Sn)("design:paramtypes",[])],xr);var Lr=U(71134),kr=U(43858),Br=U(10711);let Ur=class extends j.uAl{constructor(){super(...arguments),this._itemCards=[],this.onLoadingFinished=new j.HN0}postCreate(){var k,B;this._itemCards=null!==(B=null===(k=this.itemCardContainerObject)||void 0===k?void 0:k.findComponentsInChildren(kr.j))&&void 0!==B?B:[],this._itemCards.forEach((k=>{k.GameObject.active=!1})),this.onLoadingFinished.addOnce((()=>{var k;this.sendInterfaceOpenedEvent(),this._storeKey=this.getInjectedValue(hs.YM.StoreKey),!this._storeKey&&(null===(k=this.openStoreButton)||void 0===k?void 0:k.GameObject)&&(this.openStoreButton.GameObject.active=!1)}),this),this.setUpModal().catch(j.RQr.createHandler("DynamicStoreModalComponent: Failed to get store and quest data"))}setUpModal(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;const U=this.getInjectedValue(hs.YM.OfferData),F=this.getInjectedValue(hs.YM.OfferReadById);if(!U||0===U.length)return void this.gameObject.destroy();const G=(0,Br.K8)(U,F),j=G.slice(0,this._itemCards.length);for(let $=0;${var B;return null===(B=k.getItemData().item)||void 0===B?void 0:B.ID}));k.push(Math.max(this.moreItemsCardController.count,0)),this._segment.featureCommon.sendInterfaceEvent({interfaceName:us.B.DynamicStoreModal,interfaceType:ui.Wm.Window,instanceType:fi.N.UI,originType:ui.$N.AutoSurfaced},{item_list:k})}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ur.prototype,"itemCardContainerObject",void 0),(0,G.Cg)([(0,j.MnK)(xr),(0,G.Sn)("design:type",xr)],Ur.prototype,"moreItemsCardController",void 0),(0,G.Cg)([(0,j.MnK)(Lr.l),(0,G.Sn)("design:type",Lr.l)],Ur.prototype,"_prefabModal",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Ur.prototype,"openStoreButton",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ur.prototype,"onLoadingFinished",void 0),(0,G.Cg)([(0,Gi.b)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],Ur.prototype,"_segment",void 0),Ur=(0,G.Cg)([(0,j.EVk)("DynamicStoreModal",W.Y.store)],Ur);U(282),U(37816),U(50379),U(24595);var Fr,Gr,jr=U(69811);!function(k){k[k.Brown=0]="Brown",k[k.Grey=1]="Grey",k[k.Lavender=2]="Lavender",k[k.Blue=3]="Blue"}(Fr||(Fr={})),function(k){k[k.SpecialOffers=0]="SpecialOffers",k[k.PetStore=1]="PetStore",k[k.WizardCenter=2]="WizardCenter",k[k.TitanShop=3]="TitanShop",k[k.AcademyShop=4]="AcademyShop",k[k.RegionShop=5]="RegionShop",k[k.FestivalShop=6]="FestivalShop",k[k.LopsRiftShop=7]="LopsRiftShop",k[k.StarlightFestStore=8]="StarlightFestStore"}(Gr||(Gr={}));let $r=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.onShopButtonClicked=this.createTidySignal(),this._selectedCover=Fr.Brown,this._selectedBake=Gr.SpecialOffers}firstUpdate(){var k,B;null===(k=this.coverSwapper)||void 0===k||k.selectGraphicAtIndex(this.selectedCover),"string"!=typeof this._selectedBake&&(null===(B=this.itemBakeSwapper)||void 0===B||B.selectGraphicAtIndex(this._selectedBake))}set selectedCover(k){var B;this._selectedCover=k,null===(B=this.coverSwapper)||void 0===B||B.selectGraphicAtIndex(this._selectedCover)}get selectedCover(){return this._selectedCover}set selectedBake(k){var B;this._selectedBake=k,"string"!=typeof k&&(null===(B=this.itemBakeSwapper)||void 0===B||B.selectGraphicAtIndex(k))}get selectedBake(){return this._selectedBake}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$r.prototype,"onShopButtonClicked",void 0),(0,G.Cg)([(0,j.MnK)(jr.y),(0,G.Sn)("design:type",jr.y)],$r.prototype,"coverSwapper",void 0),(0,G.Cg)([(0,j.MnK)(jr.y),(0,G.Sn)("design:type",jr.y)],$r.prototype,"itemBakeSwapper",void 0),(0,G.Cg)([(0,j.gfw)(Fr),(0,G.Sn)("design:type",Number),(0,G.Sn)("design:paramtypes",[Number])],$r.prototype,"selectedCover",null),(0,G.Cg)([(0,j.gfw)(Gr),(0,G.Sn)("design:type",Object),(0,G.Sn)("design:paramtypes",[Object])],$r.prototype,"selectedBake",null),$r=(0,G.Cg)([(0,j.EVk)("ShopButtonController")],$r);let Hr=class extends j.uAl{constructor(){super(...arguments),this._parseOnCreate=!1,this.onEncounterAssetParsed=new j.HN0,this.onEncounterParsed=new j.HN0}create(){super.create(),this._parseOnCreate&&this.getEncounter().catch(j.RQr.createHandler("EncounterAssetParser: encounterAsset not set"))}parseEncounterAsset(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.encounterAsset?(yield this.assetLoader.loadAssets([this.encounterAsset]),this._spawnData=tt.q.instance.game.cache.getJSON(this.encounterAsset),this._spawnData):Promise.reject(new Error("EncounterAssetParser: encounterAsset not set"))}))}getEncounter(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.getEncounterById(this.encounterId)}))}getEncounterById(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._spawnData||(yield this.parseEncounterAsset()),this._spawnData[k])return this.onEncounterParsed.dispatch(this._spawnData[k]),this._spawnData[k];j.RQr.createHandler(`EncounterAssetParser: No encounter data found for ${k}`)}))}destroy(){this.onEncounterAssetParsed.dispose(),this.onEncounterParsed.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)(j.t5G.AssetLoader),(0,G.Sn)("design:type",Object)],Hr.prototype,"assetLoader",void 0),(0,G.Cg)([(0,j.tW2)("encounter"),(0,G.Sn)("design:type",String)],Hr.prototype,"encounterAsset",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Hr.prototype,"encounterId",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Hr.prototype,"_parseOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hr.prototype,"onEncounterAssetParsed",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hr.prototype,"onEncounterParsed",void 0),Hr=(0,G.Cg)([(0,j.EVk)("EncounterAssetParser",W.Y.mapSpawning)],Hr);var Vr=U(35488),Wr=U(62886),qr=U(87820),Kr=U(3001),zr=U(7170),Yr=U(78889),Qr=U(60157);let Xr=class extends j.uAl{getEncounterData(k){return(0,G.sH)(this,void 0,void 0,(function*(){}))}};(0,G.Cg)([(0,j.Cdj)("EncounterMapSpawnConstants"),(0,G.Sn)("design:type",Object)],Xr.prototype,"spawnConstants",void 0),Xr=(0,G.Cg)([(0,j.EVk)("BaseEncounterDataProvider")],Xr);var Zr=U(10727);const Jr=[{isEnabled:()=>(0,Bt.G)(Zr.d3).enabled,overrideMap:Zr.tZ}];var to,eo=U(22023),io=U(17446);class so{static rollMainEncounter(k,B=fe.i.Regular){return k.length<1?(j.VyI.log("Attempted to roll main encounter from an empty list of possible encounters",j.$bb.Error),{}):1===k.length?k[0]:k.every((k=>j.Aq$.isDefined(k.R)))?Ze.selectByWeight(k,(k=>1/k.R)):Ze.selectByWeight(k,(k=>so.getEncounterWeightByRarityAndEvolution(k,B)))}static getEncounterWeightByRarityAndEvolution(k,B){var U,F,G,$,H;if(!j.Aq$.isDefined(k.ID))return j.VyI.log("Encounter does not have an ID",j.$bb.Warning),0;const V=Yt.t.getItem("pet",k.ID);if(!V)return j.VyI.log(`Could not find pet data for encounter with ID ${k.ID}`,j.$bb.Warning),0;const W=tt.q.instance.prodigy.gameContainer.get("d1f-4da3");return W.encounterRatesPerDifficultyModeAndRarity[B][null!==(F=null===(U=V.data)||void 0===U?void 0:U.rarity)&&void 0!==F?F:io.E.Common]*W.encounterRatesPerDifficultyModeAndEvolutionTier[B][null!==(H=null===($=null===(G=V.data)||void 0===G?void 0:G.evolution)||void 0===$?void 0:$.tier)&&void 0!==H?H:1]}}let no=to=class extends Xr{constructor(){super(...arguments),this._repeatable=!0,this.useMapSpawnConstants=!1,this._encounterOverrides={}}getEncounterData(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G,$;if(!k.isOnCooldown){if(j.Aq$.isDefined(this._encountersDataSource)&&j.Aq$.isDefined(this._encounterId)){const k=this.getUniqueEncounterId();if(!this._repeatable&&j.Aq$.isDefined(this._player.state.get(k)))return;if(to.encounterDataCache[k])return to.encounterDataCache[k];let H=null;for(const B of Jr){if(!B.isEnabled())continue;const k=B.overrideMap[this._encountersDataSource];j.Aq$.isDefined(k)&&(yield tt.q.instance.prodigy.load.assetsAsPromise([k]),H=tt.q.instance.game.cache.getJSON(k))}const V=tt.q.instance.game.cache.getJSON(this._encountersDataSource),W=null!==(B=null==H?void 0:H[this._encounterId])&&void 0!==B?B:V[this._encounterId];if(!W)return void j.VyI.log(`No encounter found with ID ${this._encounterId}`,j.$bb.Warning);if(j.Aq$.isDefined(W.encounter)){const k=tt.q.instance.prodigy.world.getZone(this._zoneId);W.encounter=[so.rollMainEncounter(W.encounter,k.difficultyMode)],!j.Aq$.isDefined(W.pets)&&j.Aq$.isDefined(W.encounter[0].ID)&&(this.useMapSpawnConstants&&this.spawnConstants?(W.bench=null===(U=this.spawnConstants.benchRandoms)||void 0===U?void 0:U.map((k=>({petID:k,weight:1}))),W.minTeamSize=this.spawnConstants.minOptional,W.maxTeamSize=null!==(F=this.spawnConstants.maxOptional)&&void 0!==F?F:Math.min((null!==($=null===(G=W.bench)||void 0===G?void 0:G.length)&&void 0!==$?$:0)+1,3)):W.bench=eo.P8.getPetBench(W.encounter[0].ID))}return to.encounterDataCache[k]=Object.assign(Object.assign(Object.assign({},W),this._encounterOverrides),{unique:!this._repeatable,uniqueId:k}),to.encounterDataCache[k]}return Object.keys(this._encounterOverrides).length>0?this._encounterOverrides:void 0}}))}resetCachedEncounter(){delete to.encounterDataCache[this.getUniqueEncounterId()]}getUniqueEncounterId(){return`zone-${this._zoneId}-uniqueEncounters-${this._mapName}-${this.sanitizeEncounterId(this._encounterId)}`}sanitizeEncounterId(k){return k.replace(/-/g,"_")}};var ao,ro;no.encounterDataCache={},(0,G.Cg)([(0,j.Cdj)("ZoneId"),(0,G.Sn)("design:type",String)],no.prototype,"_zoneId",void 0),(0,G.Cg)([(0,j.Cdj)("MapTag"),(0,G.Sn)("design:type",String)],no.prototype,"_mapName",void 0),(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],no.prototype,"_player",void 0),(0,G.Cg)([(0,j.Bak)(),(0,j.tW2)("encounter"),(0,G.Sn)("design:type",String)],no.prototype,"_encountersDataSource",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],no.prototype,"_encounterId",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],no.prototype,"_repeatable",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],no.prototype,"_encounterOverrides",void 0),no=to=(0,G.Cg)([(0,j.EVk)("BasicEncounterDataProvider",W.Y.mapSpawning)],no),function(k){k.Optional="optional",k.Mandatory="mandatory",k.Special="special",k.FeaturedSpawn="featured-spawn"}(ro||(ro={}));let oo=ao=class extends Fi.z{constructor(){super(...arguments),this.spawnType=ro.Optional,this.spawnCooldownCategory=aa.u.Main,this._runOnCreate=!1,this.encounterDataProviders=[],this.isRespawnAllowed=!0,this._encounterValidators=[k=>j.Aq$.isDefined(k),k=>!Yr.Ue(k)||!(Yr.LT(k)&&66===k.boss.ID),k=>Yr.W0(k)]}get encounterData(){return this._encounterData}get isOnCooldown(){return this._cooldowns.isCooldownActive(this.spawnId)}get cooldownTimeRemaining(){return this._cooldowns.getCooldownRemainingTime(this.spawnId)}get hasExpiredCooldown(){return this._cooldowns.isCooldownExpired(this.spawnId)}create(){super.create(),this._runOnCreate&&this.run().catch(j.RQr.createHandler("Error running SpawnPoint"))}run(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this._encounterData){const k=new vr.f,B=yield Promise.all(this.encounterDataProviders.map((B=>(0,G.sH)(this,void 0,void 0,(function*(){return B.getEncounterData({isOnCooldown:yield this.isOnCooldown,spawnId:this.spawnId,preconditionChecker:k})})))));this._encounterData=B.find((k=>this._encounterValidators.every((B=>B(k)))))}yield this.bindContext()}))}bindContext(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,$,H,V,W,q,K,z,Y,Q,X,Z,J,tt,et,it;if(!this.IsActiveInHierarchy)return;if(!j.Aq$.isDefined(this._encounterData)||this._encounterData===zr.E.Disabled||!ao.SPAWNED_SINCE_COOLDOWN[this.spawnId]&&!1===this.isRespawnAllowed)return void this.gameObject.destroy();const st=Yr.cB(this._encounterData),nt=null===(k=null==st?void 0:st.data)||void 0===k?void 0:k.name,at=null==st?void 0:st.type;let rt,ot;if(Yr.$Q(this._encounterData))rt=this._encounterData.encounter[0].ID,ot=null!==(U=null===(B=null==st?void 0:st.data)||void 0===B?void 0:B.affinity)&&void 0!==U?U:null===(F=null==st?void 0:st.data)||void 0===F?void 0:F.element,j.Aq$.isDefined(this._encounterData.encounter[0].ID)&&(Yr.OI(this._encounterData.encounter[0].ID),this.updateValue("EncounterPetId",this._encounterData.encounter[0].ID));else if(rt=null!==(W=null!==($=null===(G=this._encounterData.boss)||void 0===G?void 0:G.ID)&&void 0!==$?$:null===(V=null===(H=this._encounterData.opponent)||void 0===H?void 0:H[0])||void 0===V?void 0:V.id)&&void 0!==W?W:null===(K=null===(q=this._encounterData.pets)||void 0===q?void 0:q[0])||void 0===K?void 0:K.ID,ot=null!==(Y=null===(z=null==st?void 0:st.data)||void 0===z?void 0:z.element)&&void 0!==Y?Y:null===(Q=null==st?void 0:st.data)||void 0===Q?void 0:Q.affinity,Yr.LT(this._encounterData)&&(null===(X=null==st?void 0:st.data)||void 0===X?void 0:X.category)===Ci.GJ.Wizard){const k=null!==(Z=st.metadata)&&void 0!==Z?Z:{};this.updateValue("EnemyWizardPlayerData",Yr.BQ(k))}else if(Yr.h9(this._encounterData)){const k=this._encounterData.opponent[0];this.updateValue("EnemyWizardPlayerData",Yr.BQ(k))}else Yr.sK(this._encounterData)&&(Yr.OI(this._encounterData.pets[0].ID),this.updateValue("EncounterPetId",this._encounterData.pets[0].ID));ao.SPAWNED_SINCE_COOLDOWN[this.spawnId]=!0,yield this.sendDiscoveryEvent(rt,nt,at,ot);const ht=this.createBattleConfig(),ct=Yr.Yu(this._encounterData),dt=Yr.wd(this._encounterData),lt=Yr.o_(this._encounterData);this.updateValue("EncounterSpawnId",this.spawnId),this.updateValue("CooldownCategory",this.spawnCooldownCategory),this.updateValue("EncounterShouldShowGuideHand",this._encounterData.showGuideHand),this.updateValue("EncounterShouldShowBossIndicator",dt),this.updateValue("EncounterShouldShowNewIndicator",lt),this.updateValue("EncounterShouldShowDifficultyIndicator",ct),this.updateValue("EncounterDifficultyIndicatorLevel",null!==(it=null!==(et=null===(tt=null===(J=this._encounterData.encounter)||void 0===J?void 0:J[0])||void 0===tt?void 0:tt.level)&&void 0!==et?et:this._encounterData.minLevel)&&void 0!==it?it:this._playerDataProvider.player.getLevel()),this.updateValue("EncounterDifficultyIndicatorTier",this._encounterData.minibossDifficulty),this.updateValue("EncounterBattleMods",ht)}))}createBattleConfig(){var k,B;const U={screen:null!==(k=tt.q.instance.prodigy.skin.getSkinOverrideBattleBg(this._mapTag))&&void 0!==k?k:this._battleBg,onFaint:null===(B=this._zone)||void 0===B?void 0:B.defaultOnFaint,addZoneCurrency:!0,cooldown:{id:this.spawnId,duration:this.spawnCooldownCategory,onResult:[Ci.XK.Victory],onAction:[],actionRestrictions:{}}};return j.Aq$.isDefined(this._encounterData)&&!Yr.bU(this._encounterData)?Object.assign(Object.assign({},U),dt().cloneDeep(this._encounterData)):U}sendDiscoveryEvent(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){const G={discovery_type:(yield this.hasExpiredCooldown)?"Spawned":"Existing",enemy_name:this._localization.getText(null!=B?B:"Unknown Enemy"),enemy_id:null!=k?k:0,enemy_type:null!=U?U:"Unknown Type",enemy_element:null!=F?F:"Unknown Element",spawn_type:this.spawnType,cooldown_type:this.spawnCooldownCategory,x_coord:this.gameObject.transform.worldPosition.x,y_coord:this.gameObject.transform.worldPosition.y};this._segment.gameWorld.sendEnemyDiscoveredEvent(G)}))}sendCooldownStartEvent(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=yield this._cooldowns.getCooldownRemainingTime(this.spawnId);if(B<=0)return;const U={cooldown_type:Ia.NM.SpawnPoint,cooldown_subtype:this.spawnCooldownCategory,cooldown_target_type:this.spawnType,cooldown_target_id:this.spawnId,cooldown_length:B,cooldown_trigger_type:Ia.J$.Battle,cooldown_trigger_id:null!==(k=this._segment.battleRevamp.battleId)&&void 0!==k?k:"unknown"};this._segment.gameWorld.sendCooldownTimerStartedEvent(U)}))}setEncounterDefeated(){var k,B;if(!this._encounterData||Yr.bU(this._encounterData))return;const U=null!==(k=Yr.Lj(this._encounterData))&&void 0!==k?k:0,F=this.getEncounterType(this._encounterData),G=this._encounterData.uniqueId,$=null!==(B=this._encounterData.isQuestEncounter)&&void 0!==B&&B;j.Aq$.isDefined(G)&&j.Aq$.isDefined(no.encounterDataCache[G])&&delete no.encounterDataCache[G],this._encounterData.unique&&j.Aq$.isDefined(G)&&this._playerDataProvider.player.state.set(G,!0);let H=Wr.T.DEFEAT_ENCOUNTER;$&&(H=Wr.T.DEFEAT_QUEST_ENCOUNTER),this.sendCooldownStartEvent().catch(j.RQr.createHandler(`Could not send cooldown start event for spawn point: ${this.spawnId}`)),this._questManager.sendQuestEventViaHub(H,{type:F,id:U,params:{taskEventType:Qr.Z7.Encounter,isQuestEncounter:$,uniqueId:G}}).catch(j.RQr.createHandler(`Could not send DEFEAT_ENCOUNTER quest event for encounter: ${F} ${U}`))}delayRespawn(){ao.SPAWNED_SINCE_COOLDOWN[this.spawnId]=!1}getEncounterType(k){return Yr.LT(k)?Ci.uj.Boss:Yr.wd(k)?Ci.uj.Miniboss:Yr.h9(k)?Ci.uj.Wizard:Ci.uj.Pet}destroy(){super.destroy()}};oo.SPAWNED_SINCE_COOLDOWN={},(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],oo.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("098-b402"),(0,G.Sn)("design:type",sa.m)],oo.prototype,"_cooldowns",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],oo.prototype,"_segment",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],oo.prototype,"_localization",void 0),(0,G.Cg)([(0,j.Cdj)("a25-68f4"),(0,G.Sn)("design:type",Kr.n)],oo.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.Cdj)("Zone"),(0,G.Sn)("design:type",qr.b)],oo.prototype,"_zone",void 0),(0,G.Cg)([(0,j.Cdj)("BattleBg"),(0,G.Sn)("design:type",String)],oo.prototype,"_battleBg",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_MAP_TAG"),(0,G.Sn)("design:type",String)],oo.prototype,"_mapTag",void 0),(0,G.Cg)([(0,j.gfw)(ro),(0,G.Sn)("design:type",String)],oo.prototype,"spawnType",void 0),(0,G.Cg)([(0,j.gfw)(aa.u),(0,G.Sn)("design:type",String)],oo.prototype,"spawnCooldownCategory",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],oo.prototype,"spawnId",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],oo.prototype,"_runOnCreate",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Xr),(0,G.Sn)("design:type",Array)],oo.prototype,"encounterDataProviders",void 0),oo=ao=(0,G.Cg)([(0,j.EVk)("SpawnPoint",W.Y.mapSpawning)],oo);let ho=class extends oo{bindContext(){const k=Object.create(null,{bindContext:{get:()=>super.bindContext}});return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F;if(yield k.bindContext.call(this),this.IsActiveInHierarchy&&(this.updateValue("ShouldShowFeaturedSpawnTimer",j.Aq$.isDefined(this._encounterData)),this.updateValue("FeaturedSpawnTimer",this._featuredSpawnService.getTimeUntilExpiry()),j.Aq$.isDefined(this.featureRequirement))){const k=tt.q.instance.prodigy.gameContainer.get("db5-fb6e");if(!(yield k.meetsRequirements(this.featureRequirement))){const G=k.getFeatureRequirementAsset(this.featureRequirement),j=null===(U=null===(B=null==G?void 0:G.data)||void 0===B?void 0:B.requirements)||void 0===U?void 0:U.find((k=>"level"in k)),$=null!==(F=null==j?void 0:j.level)&&void 0!==F?F:0,H=this._localization.getText("UNLOCKS_AT_LEVEL",$.toString());this.updateValue("ShouldShowFeaturedSpawnLockMessage",!0),this.updateValue("FeaturedSpawnLockMessage",H),this.updateValue("DisableTrigger",!0)}}}))}};(0,G.Cg)([(0,j.Cdj)("a2e-a635"),(0,G.Sn)("design:type",Vr.J)],ho.prototype,"_featuredSpawnService",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],ho.prototype,"featureRequirement",void 0),ho=(0,G.Cg)([(0,j.EVk)("FeaturedSpawnPoint",W.Y.mapSpawning)],ho);var co=U(87761);let lo=class extends Xr{constructor(){super(...arguments),this._taskIds=["0-0"]}getEncounterData(k){return(0,G.sH)(this,void 0,void 0,(function*(){return(yield this._localZoneQuestManager.getTasksInProgress()).some((k=>this._taskIds.some((B=>k.taskID===B))))?zr.E.Disabled:void 0}))}};(0,G.Cg)([(0,j.Cdj)("a78-11c7"),(0,G.Sn)("design:type",co.B)],lo.prototype,"_localZoneQuestManager",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],lo.prototype,"_taskIds",void 0),lo=(0,G.Cg)([(0,j.EVk)("QuestDisabledDataProvider",W.Y.mapSpawning)],lo);let uo=class extends no{constructor(){super(...arguments),this._taskIds=["0-0"]}getEncounterData(k){const B=Object.create(null,{getEncounterData:{get:()=>super.getEncounterData}});return(0,G.sH)(this,void 0,void 0,(function*(){const U=(yield this._localZoneQuestManager.getTasksInProgress()).some((k=>this._taskIds.some((B=>k.taskID===B)))),F=yield B.getEncounterData.call(this,Object.assign(Object.assign({},k),{isOnCooldown:!1}));return U&&j.Aq$.isDefined(F)?Object.assign(Object.assign({},F),{showGuideHand:!0,isQuestEncounter:!0}):void 0}))}};(0,G.Cg)([(0,j.Cdj)("a78-11c7"),(0,G.Sn)("design:type",co.B)],uo.prototype,"_localZoneQuestManager",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],uo.prototype,"_taskIds",void 0),uo=(0,G.Cg)([(0,j.EVk)("QuestEncounterDataProvider",W.Y.mapSpawning)],uo);let fo=class extends Xr{getEncounterData(k){return(0,G.sH)(this,void 0,void 0,(function*(){return{minLevel:20,maxLevel:30,encounter:[{ID:87}]}}))}};fo=(0,G.Cg)([(0,j.EVk)("TestEncounterDataProvider",W.Y.mapSpawning)],fo);var bo=U(24800),po=U(50996),vo=U(46571);let go=class extends Xr{constructor(){super(...arguments),this._areProvidersEnabledByDefault=!0,this._encounterProviderWhitelist=[],this._encounterProviderBlacklist=[],this._eventEncounterDataProviders=[],this._setupPromise=null}setupProviders(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this._setupPromise||(this._setupPromise=(()=>(0,G.sH)(this,void 0,void 0,(function*(){this._eventEncounterDataProviders=yield this._providerManager.getProviders(k,this._areProvidersEnabledByDefault,this._encounterProviderBlacklist,this._encounterProviderWhitelist)})))()),this._setupPromise}))}getEncounterData(k){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.setupProviders(k);for(const B of this._eventEncounterDataProviders){if(!(yield B[1].isActive(k)))continue;const U=yield B[1].getEncounterData(k);if(null!=U)return U}}))}static clearCachedEncounters(){bo.p.clearCachedEncounters()}};(0,G.Cg)([(0,j.Cdj)("df9-0276"),(0,G.Sn)("design:type",vo.p)],go.prototype,"_providerManager",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],go.prototype,"_areProvidersEnabledByDefault",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.gfw)(po.I),(0,G.Sn)("design:type",Array)],go.prototype,"_encounterProviderWhitelist",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.gfw)(po.I),(0,G.Sn)("design:type",Array)],go.prototype,"_encounterProviderBlacklist",void 0),go=(0,G.Cg)([(0,j.EVk)("EventsEncounterDataProvider")],go);const mo=(0,be.gb)({key:"white-glove-restrictions",activateAssociatedExperiments:1,default:{enabled:!0,disabledRestrictionTypes:[]}}),yo=(k,B)=>!!B.enabled&&(!B.disabledRestrictionTypes||!0===B.disabledRestrictionTypes.every((B=>B!==k)));var _o,Eo=U(9579),wo=U(56735),To=U(1312);!function(k){k.SelectedMode="SELECTED_MODE",k.NumRulesToDisplay="NUM_RULES_TO_DISPLAY",k.SelectedBossID="SELECTED_BOSS_ID",k.ShowNewRestrictionsMenu="SHOW_NEW_RESTRICTIONS_MENU",k.InterfaceOpenedSegmentCallback="INTERFACE_OPENED_SEGMENT_CALLBACK"}(_o||(_o={}));const So={plant:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-large-earth"},ice:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-large-ice"},fire:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-large-fire"},water:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-large-water"},storm:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-large-storm"},neutral:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-large-neutral"},physical:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-large-physical"},astral:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-large-astral"},shadow:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-large-shadow"},evolution:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-petevolution-indicator-arrows"},rescue:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-pet-collected"},level:{atlas:Ve._.Ui_postbattle_json,frame:"star-level"},mergeRank:{atlas:Ve._.Ui_raster_icons_json,frame:"pet-info-merge-badge"},common:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-pet-rarity-common"},uncommon:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-pet-rarity-uncommon"},rare:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-pet-rarity-rare"},heroic:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-pet-rarity-heroic"},legendary:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-pet-rarity-legendary"}};var Ao=U(5708),Co=U(15571);let Oo=class extends oo{constructor(){super(...arguments),this.overrideQuestIds=[],this._onConfirmBattle=new j.HN0,this._onClose=new j.HN0,this._onExit=new j.HN0,this.hasMetRequirements=!1,this.isInTrigger=!1,this._encounterValidators=[k=>j.Aq$.isDefined(k)]}destroy(){this._onConfirmBattle.dispose(),this._onClose.dispose(),this._onExit.dispose(),super.destroy()}create(){super.create(),this.editorSpawnRenderOnly&&(this.editorSpawnRenderOnly.Active=!1)}createBattleConfig(){var k;const B=super.createBattleConfig();return B.requirements=null===(k=this.getBattleRequirements())||void 0===k?void 0:k.requirements,B}openBattleRestrictionsPopup(){var k;const B=this.getBattleRequirements();if(!B)return void j.VyI.log("[RestrictedSpawnPointComponent]: No battle requirements found",j.$bb.Error);(0,ut.v)(this._encounterData&&!Yr.bU(this._encounterData),"Cannot apply restrictions to disabled encounters");const U=null!==(k=Yr.Lj(this._encounterData))&&void 0!==k?k:0;Eo.a.getRequirementsResult(B).then((k=>{var F,G,$;k?(this.clearUnmetBattleRequirementsIfMatch(U),Promise.all([Eo.a.isEligibleForFreePetPack(),Eo.a.hasReceivedFreePetPack()]).then((([k,B])=>{k||B||Eo.a.markFreePetPackAsClaimed()})).catch(j.RQr.createHandler("[RestrictedSpawnPointComponent]: Error checking if free pet pack has been received"))):this.saveLastUnmetBattleRequirements(U,B);const H=(0,Bt.G)(mo).enabled,V=null!==(G=null===(F=null==B?void 0:B.requirements)||void 0===F?void 0:F.length)&&void 0!==G?G:0;k||To.s.startRecording("RestrictedSpawnPointComponent","battle_restrictions_popup"),tt.q.instance.prodigy.open.prefabMenu(Rt.l.BattleRestrictionsPopup,(()=>{tt.q.instance.prodigy.audio.resumeBGM(),tt.q.instance.game.broadcaster.broadcast(jn.n8.RestrictionsClosed),To.s.stopRecording(),this._onClose.dispatch(),Eo.a.getRequirementsResult(B).then((k=>{k&&this.clearUnmetBattleRequirementsIfMatch(U)})).catch(j.RQr.createHandler("[RestrictedSpawnPointComponent]: Error opening battle restrictions popup with provided requirements"))}),!0,!1,!1,{EncounterConfirmRestrictedBattle:this.confirmBattle.bind(this),EncounterExitRestrictedBattle:this.exitBattleRestrictionsPopup.bind(this),EncounterBattleRequirements:B,EncounterBattleRequirementsMet:k,[_o.SelectedBossID]:U,[_o.ShowNewRestrictionsMenu]:H,[_o.NumRulesToDisplay]:V,[_o.InterfaceOpenedSegmentCallback]:this.sendEncounterDataAnalytics.bind(this)}),null===($=this._restrictedEncountersManager)||void 0===$||$.startEncounter(B.name,this._encounterData,this.overrideQuestIds)})).catch(j.RQr.createHandler("[RestrictedSpawnPointComponent]: Error opening battle restrictions popup with provided requirements"))}saveLastUnmetBattleRequirements(k,B){const U=tt.q.instance.prodigy.gameContainer.get("306-5359");U.data.lastUnmetBattleRequirements={bossID:k,featureRequirements:B,mapID:tt.q.instance.prodigy.world.getCurrentMap(),zoneID:tt.q.instance.prodigy.world.getCurrentZone(),isDoorBlocking:j.Aq$.isDefined(this.triggerToBlock)},U.updated=!0}clearUnmetBattleRequirementsIfMatch(k){var B,U;const F=tt.q.instance.prodigy.gameContainer.get("306-5359");(null===(U=null===(B=null==F?void 0:F.data)||void 0===B?void 0:B.lastUnmetBattleRequirements)||void 0===U?void 0:U.bossID)===k&&Eo.a.resetPlayerLastUnmetBattleRequirements()}getBattleRequirements(){var k;return null===(k=this._restrictionsProvider.getRestrictionById(this.requirementsKey))||void 0===k?void 0:k.data}instantOpenBattleRestrictionsPopupIfInRange(){this.isInTrigger&&this.openBattleRestrictionsPopup()}run(){const k=Object.create(null,{run:{get:()=>super.run}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.run.call(this),this._encounterData&&this.gameObject.active&&this.blockTrigger(!0)}))}blockTrigger(k){this.triggerToBlock&&!Kt.A.get("GameConstants.Debug.DISABLE_BLOCKING_ENCOUNTERS")&&(this.triggerToBlock.Active=!k)}confirmBattle(){tt.q.instance.prodigy.gameContainer.get("c47-20b6").whiteGlove.sendRestrictionFTUEEvent("Restricted battle started"),this._onClose.dispose(),this._onConfirmBattle.dispatch()}exitBattleRestrictionsPopup(){this._onExit.dispatch()}sendEncounterDataAnalytics(){var k,B,U,F,G,$,H,V,W;const q=this._encounterData,K=this.getBattleRequirements(),z=tt.q.instance.prodigy.gameContainer.get("306-5359"),Y=Object.assign(Object.assign({},K),{requirements:null==K?void 0:K.requirements.map((k=>{var B;return Object.assign(Object.assign({},k),{meetsRequirements:wo.p.checkIfMeetsRequirement(null==k?void 0:k.kennel,z),currentProgress:wo.p.getPetsSchema(null==k?void 0:k.kennel,z).length,targetProgress:null===(B=null==k?void 0:k.kennel)||void 0===B?void 0:B.petCount})}))}),Q=null===(k=q.pets)||void 0===k?void 0:k.map((k=>{var B;if(!j.Aq$.isDefined(k)||!j.Aq$.isDefined(k.ID))return;const U=Yt.t.getItem("pet",k.ID);return{id:k.ID,name:null===(B=null==U?void 0:U.data)||void 0===B?void 0:B.name,level:k.level}})),X=Yt.t.getItem("boss",q.boss.ID),Z={id:null!==(U=null===(B=q.boss)||void 0===B?void 0:B.ID)&&void 0!==U?U:null===(G=null===(F=q.opponent)||void 0===F?void 0:F[0])||void 0===G?void 0:G.id,name:null===($=null==X?void 0:X.data)||void 0===$?void 0:$.name,level:null===(H=q.boss)||void 0===H?void 0:H.level,minLevel:q.minLevel,maxLevel:q.maxLevel,type:null===(V=null==X?void 0:X.data)||void 0===V?void 0:V.type,element:null===(W=null==X?void 0:X.data)||void 0===W?void 0:W.affinity,restrictions:Y,pets:Q},J=tt.q.instance.prodigy.gameContainer.get("c47-20b6");J.whiteGlove.setCurrentRestrictionData(Y);const et={interfaceName:us.B.PreBattleScreen,interfaceType:ui.Wm.Modal,originType:ui.$N.RestrictedBattle,instanceType:fi.N.BattleRestriction},it=J.gameWorld.getCurrentInstanceTypeAndID(fi.N.OpenWorld),st={item_list:Z,map_entered_instance_type:it.instance_type,map_entered_instance_id:it.instance_id};J.featureCommon.sendInterfaceEvent(et,st)}get isOnCooldown(){return Promise.resolve(!1)}};(0,G.Cg)([(0,j.Cdj)("b73-c131"),(0,G.Sn)("design:type",Ao.X)],Oo.prototype,"_restrictionsProvider",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Oo.prototype,"requirementsKey",void 0),(0,G.Cg)([(0,j.W_S)(),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],Oo.prototype,"overrideQuestIds",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Oo.prototype,"_onConfirmBattle",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Oo.prototype,"_onClose",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Oo.prototype,"_onExit",void 0),(0,G.Cg)([(0,j.MnK)(Ga.E),(0,G.Sn)("design:type",Ga.E)],Oo.prototype,"triggerToBlock",void 0),(0,G.Cg)([(0,j.MnK)(j.ESH),(0,G.Sn)("design:type",j.ESH)],Oo.prototype,"editorSpawnRenderOnly",void 0),(0,G.Cg)([(0,j.Cdj)("615-fbad"),(0,G.Sn)("design:type",Co.p)],Oo.prototype,"_restrictedEncountersManager",void 0),Oo=(0,G.Cg)([(0,j.EVk)("RestrictedSpawnPoint",W.Y.mapSpawning)],Oo);var Io=U(84643);const Do=()=>(k,B)=>{const U=k.create;k.create=function(){this[B],U.call(this)}};var Ro=U(83726);let Po=class extends j.uAl{setComplete(){var k;if(!this._isPrefabMap)if("number"==typeof this._spawnId){const B=this._spawnId+1;if(this._map.zone.defeatMonster(this._petId,B,null!==(k=this._mods.unique)&&void 0!==k&&k,void 0,this._mods.isQuestEncounter),this._mods.unique)return;Ro.T.resetMonsterRespawn(this._map.mapMonsters[B],this._mods,this._encounterConstants.spawnCooldownDurationSeconds)}else this._map.zone.setState(this._spawnId,1)}};var Mo;(0,G.Cg)([(0,j.Cdj)("d1f-4da3"),(0,G.Sn)("design:type",Io.h)],Po.prototype,"_encounterConstants",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterSpawnId"),(0,G.Sn)("design:type",Object)],Po.prototype,"_spawnId",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterPetId"),(0,G.Sn)("design:type",Number)],Po.prototype,"_petId",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterBattleMods"),(0,G.Sn)("design:type",Object)],Po.prototype,"_mods",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterMap"),(0,G.Sn)("design:type",Ro.T)],Po.prototype,"_map",void 0),(0,G.Cg)([(0,j.Cdj)("IS_PREFAB_MAP"),Do(),(0,G.Sn)("design:type",Boolean)],Po.prototype,"_isPrefabMap",void 0),Po=(0,G.Cg)([(0,j.EVk)("SetZoneEncounterComplete",W.Y.mapSpawning)],Po);let No=Mo=class extends j.uAl{constructor(){super(...arguments),this.battleBackground="",this._spawnPoints=[]}create(){var k;super.create();const B=this.getInjectedValue("Zone"),U=j.Aq$.isDefined(this.battleBackground)&&this.battleBackground.length>0?this.battleBackground:B.battleBG;if(this._context.Container.bind("BattleBg").toConstantValue(U),this._context.Container.bind("EncounterZoneTag").toConstantValue(this._mapName),this._spawnPoints=this.gameObject.findComponentsInChildren(oo),j.Aq$.isDefined(Mo._disabledSpawnCache[this._mapName])){const k=Mo._disabledSpawnCache[this._mapName];this._spawnPoints.forEach((B=>{k.includes(B.spawnId)&&B.GameObject.destroy()}))}else if(j.Aq$.isDefined(this._constantsDataSource)){const B=tt.q.instance.game.cache.getJSON(this._constantsDataSource),U=B[this._mapName.replace("_hard","")];this._minimumOptionalSpawns=null===(k=B[this._mapName])||void 0===k?void 0:k.minOptional,this.determineDisabledSpawns(),this._context.Container.bind("EncounterMapSpawnConstants").toConstantValue(U)}this._spawnPoints.filter((k=>k.spawnType===ro.Optional)).filter((k=>k.IsActiveInHierarchy)).forEach((k=>{var B;null===(B=k.GameObject.findComponentInChildren(Zi.k))||void 0===B||B.onVictory.addOnce((()=>this.cycleDisabledSpawns(k.spawnId)))}))}determineDisabledSpawns(){if(!j.Aq$.isDefined(this._minimumOptionalSpawns))return void j.VyI.log("SpawnManagerComponent, no minimum number of optional spawns provided",j.$bb.Warning);const k=this._spawnPoints.filter((k=>k.spawnType===ro.Optional));if(k.length<=this._minimumOptionalSpawns)return void(Mo._disabledSpawnCache[this._mapName]=[]);const B=Xe.fromRange(this._minimumOptionalSpawns,k.length+1),U=k.length-B;if(U<=0)return void(Mo._disabledSpawnCache[this._mapName]=[]);const F=Ze.selectElements(U,k);Mo._disabledSpawnCache[this._mapName]=F.map((k=>k.spawnId)),F.forEach((k=>k.GameObject.destroy()))}cycleDisabledSpawns(k){var B;if(!j.Aq$.isDefined(Mo._disabledSpawnCache[this._mapName])||0===Mo._disabledSpawnCache[this._mapName].length)return;const U=Ze.selectElement(Mo._disabledSpawnCache[this._mapName]),F=Mo._disabledSpawnCache[this._mapName].indexOf(U);Mo._disabledSpawnCache[this._mapName][F]=k,null===(B=this._spawnPoints.find((k=>k.spawnId===U)))||void 0===B||B.delayRespawn()}};No._disabledSpawnCache={},(0,G.Cg)([(0,j.Bak)(),(0,j.tW2)("constants"),(0,G.Sn)("design:type",String)],No.prototype,"_constantsDataSource",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_MAP_TAG"),(0,G.Sn)("design:type",String)],No.prototype,"_mapName",void 0),(0,G.Cg)([(0,j.Pqz)(j.bE_),(0,G.Sn)("design:type",j.bE_)],No.prototype,"_context",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],No.prototype,"battleBackground",void 0),No=Mo=(0,G.Cg)([(0,j.EVk)("SpawnManager",W.Y.mapSpawning)],No);var xo,Lo=U(26004),ko=U(50503),Bo=U(23748),Uo=U(15218),Fo=U(2072);let Go=xo=class extends Fi.z{isEncounterEnabled(k){var B,U;const F=this._map.zone.getQuestState(),G=this._playerDataProvider.player.state.get(`zone-${this._map.zone.ID}-uniqueEncounters-${this._map.tag}`)||{},j=k.unique?k.isQuestEncounter?1===F.state[this._spawnId+1]:1===G[this._spawnId+1]:(null===(B=this._map.mapMonsters[this._spawnId+1])||void 0===B?void 0:B.respawn)>(new Date).getTime(),$=null===(U=this._map.questParams.enableMonsters)||void 0===U||U;return(k.isQuestEncounter||$)&&!j}create(){super.create(),this.bindContext()}getNewIndicatorVisibility(k){var B,U;const F=this._playerDataProvider.player;return null!==(U=null===(B=this._modsOverride)||void 0===B?void 0:B.showNewIndicator)&&void 0!==U?U:F.hasCompletedTutorial()&&F.encounters.getPetTimesBattled(k)<1}getDifficultyIndicatorVisibility(k){const B=this._playerDataProvider.player,U=tt.q.instance.prodigy.gameContainer.get("d1f-4da3");return Uo.A.useRevisedDifficulty&&k-B.getLevel()>U.threatIndicatorLevel}setPetEncountered(k){this._playerDataProvider.player.encounters.onPetEncountered(k)}getMonsterData(k){var B,U;const F=this._spawnId+1;if(!(null===(B=this._map.mapMonsters[F])||void 0===B?void 0:B.data)&&!(null===(U=this._map.mapMonsters[F])||void 0===U?void 0:U.monsterData)){const B=tt.q.instance.prodigy.battle.chooseRandomMonster(k);this._map.mapMonsters[F]={data:B,monsterData:B}}return this._map.mapMonsters[F].monsterData}bindContext(){this._spawnManager.getSpawnDataForMap(this._map.zoneName).then((k=>{var B,U,F,G,$,H,V;const W=j.Aq$.isDefined(null===(B=this._map.mapMonsters[this._spawnId+1])||void 0===B?void 0:B.respawn),q=null===(U=k[this._spawnId])||void 0===U?void 0:U.mods,K=this.getMonsterData(null!==(G=null===(F=this._modsOverride)||void 0===F?void 0:F.encounter)&&void 0!==G?G:q.encounter),z=Object.assign(Object.assign(Object.assign({},q),{range:(null==q?void 0:q.range)?Math.sqrt(q.range):xo.DEFAULT_ENCOUNTER_RANGE,screen:this._map.battleBG,onFaint:this._map.zone.defaultOnFaint,encounter:[K],addZoneCurrency:!0,monsterData:K}),this._modsOverride),Y=this.getDifficultyIndicatorVisibility(z.minLevel),Q=z.revampBattleType===Ci.gu.ZoneMiniboss,X=z.minLevel>=100?null===($=z.minLevel)||void 0===$?void 0:$.toString():null===(H=z.minLevel)||void 0===H?void 0:H.toString().concat("+"),Z=j.Aq$.isDefined(this._map.mapMonsters[this._spawnId+1]);if(!Q&&Z&&!z.isQuestEncounter&&Uo.A.useRevisedDifficulty){const k=tt.q.instance.prodigy.gameContainer.get("d1f-4da3");z.level=this.getMainEncounterLevelFromProbabilitySchema(k.weightedEncounterLevelProbabilities,z.minLevel,z.maxLevel),z.bench=eo.P8.getPetBench(z.encounter[0].ID),z.bench.forEach((B=>{B.level=this.getBenchLevelFromProbabilitySchema(k.weightedBenchLevelProbabilities,z.level)}))}else z.difficulty&&(z.minLevel=null,z.maxLevel=null);this._context.Container.rebind("EncounterBattleMods").toConstantValue(z),this._context.Container.rebind("EncounterPetId").toConstantValue(z.encounter[0].ID),this._context.Container.rebind("EncounterZoneTag").toConstantValue(this._map.zoneName),this._context.Container.rebind("EncounterEnabled").toConstantValue(this.isEncounterEnabled(z)),this._context.Container.rebind("EncounterTriggerRadius").toConstantValue(z.range*(null!==(V=Kt.A.get("GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE"))&&void 0!==V?V:1)),this._context.Container.rebind("EncounterScale").toConstantValue(this.getEncounterScale(z)),this._context.Container.rebind("EncounterSpawnTime").toConstantValue(W?1:0),this._context.Container.rebind("EncounterShouldShowGuideHand").toConstantValue(z.showGuideHand),this._context.Container.rebind("EncounterShouldShowBossIndicator").toConstantValue(Q),this._context.Container.rebind("EncounterShouldShowNewIndicator").toConstantValue(!(Q||Y)&&this.getNewIndicatorVisibility(z.encounter[0].ID)),this._context.Container.rebind("EncounterShouldShowDifficultyIndicator").toConstantValue(Y&&!z.showGuideHand&&!Q),this._context.Container.rebind("EncounterDifficultyIndicatorLevel").toConstantValue(Q?z.encounter[0].level:X),this._context.Container.rebind("EncounterDifficultyIndicatorTier").toConstantValue(z.minibossDifficulty),z.rangeRadiusOffset&&(this._context.Container.rebind("EncounterRadiusOffsetX").toConstantValue(z.rangeRadiusOffset.x),this._context.Container.rebind("EncounterRadiusOffsetY").toConstantValue(z.rangeRadiusOffset.y)),this.setPetEncountered(K.ID),this.gameObject.findComponentsInChildren(Lo.B).forEach((k=>k.consume()))})).catch(j.RQr.createHandler(`Could not get spawn data for map ${this._map.zoneName}`))}getEncounterScale(k){return k.flip||k.randDir&&Math.random()>.5?[-1,1]:[1,1]}getMainEncounterLevelFromProbabilitySchema(k,B,U){const F=B||Yn.s.minLevel,G=U||Yn.s.activePlayerLevelCap,$=this._playerDataProvider.getLevel();let H;const V=Object.keys(k),W=Object.values(k);switch(V[Bo.z.selectRandomWeightedSelection(W)]){case"higher":H=$+1;break;case"lower":H=$-1;break;default:H=$}return j.cj9.clamp(H,Math.max(F,Yn.s.minLevel),Math.min(G,Yn.s.maxLevelConfig.regular))}getBenchLevelFromProbabilitySchema(k,B){let U;const F=Object.keys(k),G=Object.values(k);switch(F[Bo.z.selectRandomWeightedSelection(G)]){case"lower":U=B-1;break;case"lowest":U=B-2;break;default:U=B}return j.cj9.clamp(U,Yn.s.minLevel,Yn.s.maxLevelConfig.regular)}unbindContext(){}};Go.DEFAULT_ENCOUNTER_RANGE=200,Go.DANGEROUS_ENCOUNTER_LEVEL_DEFICIT=7,(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Go.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("db5-fb6e"),(0,G.Sn)("design:type",Object)],Go.prototype,"_featureRequirements",void 0),(0,G.Cg)([(0,j.Cdj)("e5b-e931"),(0,G.Sn)("design:type",Fo.e)],Go.prototype,"_spawnManager",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterMap"),(0,G.Sn)("design:type",Ro.T)],Go.prototype,"_map",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterSpawnId"),(0,G.Sn)("design:type",Number)],Go.prototype,"_spawnId",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterOverrideMods"),(0,G.Sn)("design:type",Object)],Go.prototype,"_modsOverride",void 0),Go=xo=(0,G.Cg)([(0,j.EVk)("ZoneEncounterDataProvider",W.Y.mapSpawning)],Go);let jo=class extends Fi.z{get isEncounterEnabled(){var k;const B=this._map.zone.getState(this._spawnId),U=null===(k=this._map.questParams.enableWizards)||void 0===k||k,F=j.Aq$.isDefined(B)&&0!==B;return U&&!F&&!0}create(){super.create(),this.bindContext()}bindContext(){var k;const B=this.getBattleMods(this._assetId);this._context.Container.bind("EncounterBattleMods").toConstantValue(B),this._context.Container.rebind("EncounterZoneTag").toConstantValue(this._map.zoneName),this._context.Container.rebind("EncounterEnabled").toConstantValue(this.isEncounterEnabled),this._context.Container.rebind("EncounterTriggerRadius").toConstantValue(B.range*(null!==(k=Kt.A.get("GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE"))&&void 0!==k?k:1)),this._context.Container.rebind("EncounterSpawnTime").toConstantValue(0),this.gameObject.findComponentsInChildren(Lo.B).forEach((k=>k.consume()))}unbindContext(){}getBattleMods(k){var B,U;const F=Yt.t.getItem("boss",k),G=this._playerDataProvider.player.getLevel(),j=null!==(U=null===(B=F.data.battle.pets)||void 0===B?void 0:B.map((k=>({ID:parseInt(k.ID),level:ko.A.getEnemyLevel(G,k.difficulty)}))))&&void 0!==U?U:[];return{opponent:[{data:{ID:k,level:ko.A.getEnemyLevel(G,F.data.battle.difficulty)},appearance:F.metadata.appearance,equipment:F.metadata.equipment}],pets:j,difficulty:F.data.battle.difficulty,range:Go.DEFAULT_ENCOUNTER_RANGE,onEnd:this._map.zoneName,screen:this._map.battleBG,onFaint:this._map.zone.defaultOnFaint}}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],jo.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterMap"),(0,G.Sn)("design:type",Ro.T)],jo.prototype,"_map",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterSpawnId"),(0,G.Sn)("design:type",String)],jo.prototype,"_spawnId",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterAssetId"),(0,G.Sn)("design:type",Number)],jo.prototype,"_assetId",void 0),jo=(0,G.Cg)([(0,j.EVk)("WizardEncounterDataProvider",W.Y.mapSpawning)],jo);let $o=class extends j.PQK{installBindings(){var k,B;const U=null!==(B=null===(k=tt.q.instance.game.state.get(Tt.G.TileScreen).user)||void 0===k?void 0:k.playerPrefab)&&void 0!==B?B:j.wa5.getActiveScene().container.get("MainPlayerGameObject");this.Container.bind("TriggerTarget").toConstantValue(U),this.Container.bind("MainPlayerGameObject").toConstantValue(U),this.Container.bind("PlayerPathfinder").toConstantValue(U.findComponentInChildren(bt.f)),this.Container.bind("PlayerLocomotion").toConstantValue(U.findComponentInChildren(j.KhP))}};$o=(0,G.Cg)([(0,j.Og1)("ZoneEncounterInstaller","Installer")],$o);var Ho=U(40295),Vo=U(93867);let Wo=class extends j.uAl{constructor(){super(...arguments),this._targetStep=Ho.B.NotStarted,this._stepCompleted=new j.HN0,this._stepIsCurrent=new j.HN0,this._stepNotStarted=new j.HN0,this._stepNotCompleted=new j.HN0}checkStep(){let k=Vo.U.isStepComplete(this._targetStep);Vo.U.progressData.step===this._targetStep?this._stepIsCurrent.dispatch():k||this._stepNotStarted.dispatch();(k?this._stepCompleted:this._stepNotCompleted).dispatch()}destroy(){this._stepIsCurrent.dispose(),this._stepNotStarted.dispose(),this._stepCompleted.dispose(),this._stepNotCompleted.dispose(),super.destroy()}};(0,G.Cg)([(0,j.gfw)(Ho.B),(0,G.Sn)("design:type",String)],Wo.prototype,"_targetStep",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wo.prototype,"_stepCompleted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wo.prototype,"_stepIsCurrent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wo.prototype,"_stepNotStarted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wo.prototype,"_stepNotCompleted",void 0),Wo=(0,G.Cg)([(0,j.EVk)("CheckEndgameQuestStep",W.Y.utility)],Wo);let qo=class extends j.uAl{constructor(){super(...arguments),this.questIsActive=new j.HN0,this.questNotActive=new j.HN0,this.questActiveState=new j.HN0}create(){super.create(),this._checkOnCreate&&this.checkQuest()}destroy(){this.questIsActive.dispose(),this.questNotActive.dispose(),this.questActiveState.dispose(),super.destroy()}checkQuest(){const k=Vo.U.isEndgameQuestActive(),B=Vo.U.hasDefeatedPippet();this.questActiveState.dispatch(k),k?B?this.questIsActive.dispatch("ENDGAME_QUEST_BANNER_DEFEAT_PUPPET_MASTER"):this.questIsActive.dispatch("ENDGAME_QUEST_BANNER_GO_TO_ACADEMY"):this.questNotActive.dispatch()}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],qo.prototype,"_checkOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],qo.prototype,"questIsActive",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],qo.prototype,"questNotActive",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],qo.prototype,"questActiveState",void 0),qo=(0,G.Cg)([(0,j.EVk)("CheckOnEndgameQuest",W.Y.utility)],qo);U(68607);let Ko=class extends j.uAl{endgameQuestlocallyAdvance(){Vo.U.locallyAdvanceQuest()}};var zo;Ko=(0,G.Cg)([(0,j.EVk)("EndgameQuestLocallyAdvance",W.Y.utility)],Ko),function(k){k.IsEndgameQuestActive="IsEndgameQuestActive",k.EndgameQuestStep="EndgameQuestStep",k.IsEndgameQuestCompleted="IsEndgameQuestCompleted",k.ShouldShowEndgameCelebrationConfetti="ShouldShowEndgameCelebrationConfetti",k.ShouldShowPuppetMasterDefeatScene="ShouldShowPuppetMasterDefeatScene",k.ShouldShowMissedPuppetMasterGearScene="ShouldShowMissedPuppetMasterGearScene",k.AwardMissedPuppetMasterGearCallback="AwardMissedPuppetMasterGearCallback",k.SavePuppetMasterDefeatDateCallback="SavePuppetMasterDefeatDateCallback"}(zo||(zo={}));let Yo=class extends j.PQK{installBindings(){this.Container.bind(zo.IsEndgameQuestActive).toConstantValue(Vo.U.isEndgameQuestActive()),this.Container.bind(zo.EndgameQuestStep).toConstantValue(Vo.U.progressData.step),this.Container.bind(zo.IsEndgameQuestCompleted).toConstantValue(Vo.U.isStepComplete(Ho.B.PuppetMasterDefeated)),this.Container.bind(zo.ShouldShowEndgameCelebrationConfetti).toConstantValue(Vo.U.shouldShowPuppetMasterDefeatCelebration()),this.Container.bind(zo.ShouldShowPuppetMasterDefeatScene).toConstantValue(Vo.U.shouldShowPuppetMasterDefeatScene()),this.Container.bind(zo.ShouldShowMissedPuppetMasterGearScene).toConstantValue(Vo.U.shouldShowMissedPuppetMasterGearScene()),this.Container.bind(zo.AwardMissedPuppetMasterGearCallback).toConstantValue((()=>Vo.U.awardMissedPuppetMasterGear())),this.Container.bind(zo.SavePuppetMasterDefeatDateCallback).toConstantValue((()=>{tt.q.instance.prodigy.gameContainer.get("306-5359").data.puppetMasterDefeatDate=Date.now()}))}};Yo=(0,G.Cg)([(0,j.Og1)("EndgameQuestProgressInstaller","Installer")],Yo);var Qo=U(28029);let Xo=class extends j.uAl{create(){super.create(),this._showConfettiOnCreate&&this.showConfetti()}showConfetti(){var k;Qo.E.addConfetti(null!==(k=this._targetGameObject)&&void 0!==k?k:this.gameObject)}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Xo.prototype,"_showConfettiOnCreate",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Xo.prototype,"_targetGameObject",void 0),Xo=(0,G.Cg)([(0,j.EVk)("FullScreenConfetti",W.Y.effect)],Xo);var Zo=U(85126),Jo=U(113);let th=class extends j.uAl{constructor(){super(...arguments),this.PLACEMENT_EVENTS=new Map([[Jo.O.Firefly,"KEYSTONE_PLACED_EVENT_FIREFLY"],[Jo.O.Shiverchill,"KEYSTONE_PLACED_EVENT_SHIVERCHILL"],[Jo.O.Bonfire,"KEYSTONE_PLACED_EVENT_BONFIRE"],[Jo.O.Shipwreck,"KEYSTONE_PLACED_EVENT_SHIPWRECK"],[Jo.O.Skywatch,"KEYSTONE_PLACED_EVENT_SKYWATCH"]]),this.KEYSTONE_ORDER=new Map([["KEYSTONE_PLACED_EVENT_FIREFLY",1],["KEYSTONE_PLACED_EVENT_SHIVERCHILL",2],["KEYSTONE_PLACED_EVENT_BONFIRE",3],["KEYSTONE_PLACED_EVENT_SHIPWRECK",4],["KEYSTONE_PLACED_EVENT_SKYWATCH",5]]),this._placeGemsComplete=new j.HN0}placeRemainingGems(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=Zo.N.getKeystonesToPlace().map((k=>this.PLACEMENT_EVENTS.get(k)));if(k.sort(((k,B)=>this.KEYSTONE_ORDER.get(k)-this.KEYSTONE_ORDER.get(B))),k.length>0){for(let B=0;B{this.checkNumberOfAffordableEvolutions(50)}),this,null)}checkNumberOfAffordableEvolutions(k=0){j.Egh.timeout(k).then((()=>(0,G.sH)(this,void 0,void 0,(function*(){const k=this._hardCurrency.getAmountOfAffordableEvolutions();this._onNumberOfAffordablePets.dispatch(k>0,k)}))),j.RQr.createHandler("Could not count affordable evolutions"))}checkAllowanceData(k=qt.D.Ultra){this._hardCurrency.getAllowanceClaimData().then((B=>{var U,{totalClaimable:F}=B,j=(0,G.Tt)(B,["totalClaimable"]);const{[k]:$}=j;if(!oh.A.isDefined($))return;const H=$.availableToCollect?"available":"claimed",V=$.hasValidFeature?H:"needs_membership";this._onAllowanceClaimStatusChecked.dispatch(V),this._onAllowanceAmountChecked.dispatch($.reward.value),this._onAllowanceDaysToCollectChecked.dispatch(null!==(U=$.daysToCollect)&&void 0!==U?U:0),this._allowanceData=$})).catch(j.RQr.createHandler("error checking allowance data"))}claimAllowance(){return(0,G.sH)(this,arguments,void 0,(function*(k=qt.D.Ultra){try{yield this._hardCurrency.claimAllowances([k]),this.checkAllowanceData(k)}catch(B){j.RQr.logError(B,"Error claiming allowance")}}))}showAllowanceDetails(){if(!this._allowanceData)return void j.VyI.log("No allowance loaded, skipping modal",j.$bb.Warning);const{currency:k,value:B}=this._allowanceData.reward;this._segment.purchase.sendFunnelStart({type:"Click-Subscription-Tier-3-Treasure-Track",category:"Treasure-Track",contentId:`currency-${k}`,adType:Fs.R.BattlePassUpsell}),tt.q.instance.prodigy.open.itemInfo({claimable:this._allowanceData.hasValidFeature,claimed:this._allowanceData.hasValidFeature&&!this._allowanceData.availableToCollect,isMystery:!1,membershipTier:xs._$.MemberUltra,rewardId:"",itemDrop:{type:"currency",ID:k,N:B}})}checkTrackedCurrencyBalance(){Tr.B.includes(this._trackedCurrencyId)&&this._onTrackedCurrencyBalanceChecked.dispatch(this._hardCurrency.getBalance(this._trackedCurrencyId))}onBalanceChanged(k){this.checkNumberOfAffordableEvolutions(100),k.currency===this._trackedCurrencyId&&(this._hardCurrency.getPreviousBalance(k.currency)>k.value?this._onTrackedCurrencySpent.dispatch(k.value):this._onTrackedCurrencyEarned.dispatch(k.value))}destroy(){this._onNumberOfAffordablePets.dispose(),this._onAllowanceClaimStatusChecked.dispose(),this._onAllowanceAmountChecked.dispose(),this._onAllowanceDaysToCollectChecked.dispose(),this._onTrackedCurrencyBalanceChecked.dispose(),this._onTrackedCurrencyEarned.dispose(),this._onTrackedCurrencySpent.dispose(),this._hardCurrency.onBalanceChanged.remove(this.onBalanceChanged,this),this._hardCurrency.onAffordableCacheChanged.remove(this._affordableChangeCallback,this),tt.q.instance.game.broadcaster.removeAppListener(jn.ig.AnyLevelUp,this),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("5c7-e02d"),(0,G.Sn)("design:type",zn.W)],hh.prototype,"_hardCurrency",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],hh.prototype,"_segment",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],hh.prototype,"_trackedCurrencyId",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hh.prototype,"_onNumberOfAffordablePets",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hh.prototype,"_onAllowanceClaimStatusChecked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hh.prototype,"_onAllowanceAmountChecked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hh.prototype,"_onAllowanceDaysToCollectChecked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hh.prototype,"_onTrackedCurrencyEarned",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hh.prototype,"_onTrackedCurrencySpent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hh.prototype,"_onTrackedCurrencyBalanceChecked",void 0),hh=(0,G.Cg)([(0,j.EVk)("HardCurrencyDataProvider",W.Y.utility)],hh);var ch,dh,lh=U(42113);!function(k){k.InfoPanelRank="LEADERBOARD_PANEL_RANK",k.InfoPanelDisplayName="LEADERBOARD_PANEL_DISPLAY_NAME",k.InfoPanelCorrectAnswers="LEADERBOARD_PANEL_CORRECT_ANSWERS",k.InfoPanelBorderHex="LEADERBOARD_PANEL_BORDER_HEX",k.InfoPanelBackgroundHex="LEADERBOARD_PANEL_BACKGROUND_HEX",k.InfoPanelPrize="LEADERBOARD_PANEL_PRIZE_INFO"}(ch||(ch={})),function(k){k.Border="#0068A3",k.Background="#DEF5FF"}(dh||(dh={}));let uh=class extends j.uAl{constructor(){super(...arguments),this.isCurrentPlayer=!1}get entryId(){return this._entryId}updatePanelData(k){var B;this._entryId=k.id;const U={[ch.InfoPanelRank]:k.totalAnswersCorrect<=0?this._localizer.getText("LEADERBOARDS_PREVIOUS_UNRANKED"):k.rank,[ch.InfoPanelDisplayName]:xt.$.truncate(k.displayName,lh.O.DISPLAY_NAME_MAX,!0),[ch.InfoPanelCorrectAnswers]:k.totalAnswersCorrect};this.isCurrentPlayer&&(U[ch.InfoPanelBackgroundHex]=dh.Background,U[ch.InfoPanelBorderHex]=dh.Border);const F=null===(B=k.prize)||void 0===B?void 0:B[0];F&&j.Aq$.isDefined(k.prizeIcon)&&(U[ch.InfoPanelPrize]=[`${F.N}`,k.prizeIcon]),Nt.d.updateInjectedValues(this.GameObject,U)}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],uh.prototype,"_localizer",void 0),uh=(0,G.Cg)([(0,j.EVk)("LeaderboardInitPanel",W.Y.leaderboard)],uh);var fh=U(61985),bh=U(93833),ph=U(70548),vh=U(18206);let gh=class extends j.uAl{constructor(){super(...arguments),this._playerAvatar=null,this._previousCycleSvs=null}get isCvCViewed(){return this._breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_LEADERBOARD,ls.B.BREADCRUMB_LEADERBOARD_NOTIFICATION_VIEWED)}get isSvSViewed(){return this._breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_LEADERBOARD,ls.B.BREADCRUMB_STUDENT_LEADERBOARD_NOTIFICATION_VIEWED)}postCreate(){super.postCreate(),this._leaderboardDataProvider.retrievePreviousSvSRankData().then((k=>{this._previousCycleSvs=k,this.checkNotificationEnabled()})).catch(j.RQr.createHandler("Error retrieving previous SvS rank data"))}destroy(){var k;null===(k=this._playerAvatar)||void 0===k||k.destroy(),super.destroy()}checkNotificationEnabled(){var k;let B,U;this._previousCycleSvs&&!((null===(k=this._previousCycleSvs)||void 0===k?void 0:k.totalAnswersCorrect)<=0)||this.isSvSViewed||this._player.data.lastActiveStudentLeaderboardDate===lh.O.cachedCycleEndDate||this._breadcrumbManager.completeBreadcrumb(ls.B.FEATURE_LEADERBOARD,ls.B.BREADCRUMB_STUDENT_LEADERBOARD_PRIZE_CLAIMED),this.isSvSViewed?this.isCvCViewed||(B=this._player.data.lastActiveLeaderboardDate,U=lh.n.ClassLeaderboard,this._segmentInterfaceProperties.interfaceName="leaderboard-notification-popup-class-vs-class"):(B=this._player.data.lastActiveStudentLeaderboardDate,U=lh.n.StudentLeaderboard,this._segmentInterfaceProperties.interfaceName="leaderboard-notification-popup-student-vs-class",this._playerAvatar=tt.q.instance.prodigy.create.player(this._avatarRootContainer.rootContainer,this._player,1,0,0,!0,{isPreview:!0,headOnly:!0,hideMount:!0},!0,!1),this._playerAvatar.reload()),j.Aq$.isDefined(B)&&B!==lh.O.cachedCycleEndDate?this._leaderboardDataProvider.updateLeaderboardData(U):(tt.q.instance.game.broadcaster.broadcast(jn.Y1.UpdateSocialNotification,jn.HG.HUD),this.destroy())}showNotification(){this.isCreated&&!this.GameObject.isDestroyed&&(this._contentContainer.active=!0,this._autoTimeout.startTimer(),this._segmentInterfaceComponent.sendInterfaceEvent())}setRank(k){"1st"===k||"2nd"===k||"3rd"===k?(this._textRankSummaryTop.GameObject.active=!0,this._textRankSummary.GameObject.active=!1):(this._textRankSummaryTop.GameObject.active=!1,this._textRankSummary.GameObject.active=!0)}};(0,G.Cg)([(0,Gi.b)("306-5359"),(0,G.Sn)("design:type",An.W)],gh.prototype,"_player",void 0),(0,G.Cg)([(0,Gi.b)("12f-4e29"),(0,G.Sn)("design:type",sh.F)],gh.prototype,"_breadcrumbManager",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gh.prototype,"_contentContainer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],gh.prototype,"_textRankSummaryTop",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],gh.prototype,"_textRankSummary",void 0),(0,G.Cg)([(0,j.MnK)(fh.E),(0,G.Sn)("design:type",fh.E)],gh.prototype,"_autoTimeout",void 0),(0,G.Cg)([(0,j.MnK)(lh.O),(0,G.Sn)("design:type",lh.O)],gh.prototype,"_leaderboardDataProvider",void 0),(0,G.Cg)([(0,j.MnK)(ph.S),(0,G.Sn)("design:type",ph.S)],gh.prototype,"_segmentInterfaceComponent",void 0),(0,G.Cg)([(0,j.MnK)(vh.y),(0,G.Sn)("design:type",vh.y)],gh.prototype,"_segmentInterfaceProperties",void 0),(0,G.Cg)([(0,j.MnK)(bh.$),(0,G.Sn)("design:type",bh.$)],gh.prototype,"_avatarRootContainer",void 0),gh=(0,G.Cg)([(0,j.EVk)("LeaderboardNotification",W.Y.leaderboard)],gh);var mh=U(5269),yh=U(2385);let _h=class extends j.uAl{constructor(){super(...arguments),this._isInitialUpdate=!0}updatePanels(k,B){this._panelsDivider.active=!1;for(let G=this._panelsObj.children.length;--G>=0;)this._panelsObj.children[G].active&&this._panelsObj.children[G].destroy();let U=null;const F=[];for(const[G,$]of Object.entries(k))$.displayName&&($.totalAnswersCorrect<=0&&!j.Aq$.isDefined(U)&&(U=Number.parseInt(G)),F.push(new Promise((k=>{this._prefabLoader.loadWithDependenciesFromGUID(this._leaderboardType===lh.n.ClassLeaderboard?Rt.l.LeaderboardRankingPanel:Rt.l.LeaderboardSvSRankingPanel,this._panelsObj).then((U=>{const F=U.findComponent(uh);F&&(B===$.id&&(F.isCurrentPlayer=!0),F.updatePanelData($)),k()})).catch(j.RQr.createHandler("Error creating panel"))}))));Promise.all(F).then((()=>{this._isInitialUpdate&&(this._scrollView.scrollToPercent(100,mh.H.Vertical),this._scrollView.resetVelocityWheel(),this._isInitialUpdate=!1),U&&(this._panelsDivider.setRenderOrder(U),this._panelsDivider.active=!0),this._grid.updateAll()})).catch(j.RQr.createHandler("Error loading all panels"))}};(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],_h.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.MnK)(yh.I),(0,G.Sn)("design:type",yh.I)],_h.prototype,"_scrollView",void 0),(0,G.Cg)([(0,j.MnK)(j.JTA),(0,G.Sn)("design:type",j.JTA)],_h.prototype,"_grid",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_h.prototype,"_panelsObj",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_h.prototype,"_panelsDivider",void 0),(0,G.Cg)([(0,j.gfw)(lh.n),(0,G.Sn)("design:type",String)],_h.prototype,"_leaderboardType",void 0),_h=(0,G.Cg)([(0,j.EVk)("LeaderboardRankingView",W.Y.leaderboard)],_h);var Eh=U(93991);let wh=class extends j.uAl{setTintableBanner(){}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],wh.prototype,"_titleText",void 0),(0,G.Cg)([(0,j.MnK)(Eh.w),(0,G.Sn)("design:type",Eh.w)],wh.prototype,"_bannerLeftFill",void 0),(0,G.Cg)([(0,j.MnK)(Eh.w),(0,G.Sn)("design:type",Eh.w)],wh.prototype,"_flagLeftFill",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],wh.prototype,"_flagLeftImage",void 0),(0,G.Cg)([(0,j.MnK)(Eh.w),(0,G.Sn)("design:type",Eh.w)],wh.prototype,"_bannerRightFill",void 0),(0,G.Cg)([(0,j.MnK)(Eh.w),(0,G.Sn)("design:type",Eh.w)],wh.prototype,"_flagRightFill",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],wh.prototype,"_flagRightImage",void 0),wh=(0,G.Cg)([(0,j.EVk)("FlagTintableBanner (abstract)")],wh);let Th=class extends wh{constructor(){super(...arguments),this._rankDisplayText=""}setRank(k){this._rankDisplayText=k,this.setTintableBanner()}setTintableBanner(){let k,B;this._titleText.text=this._rankDisplayText;let U=!1,F=!1;switch(this._rankDisplayText){case"1st":U=!0,F=!0,k="0xD41E3C",B="icon-trophy-gold-large";break;case"2nd":U=!0,F=!0,k="0x4864BA",B="icon-trophy-silver-large";break;case"3rd":U=!0,F=!0,k="0x82AA28",B="icon-trophy-bronze-large";break;case"4th":case"5th":F=!0,k="0xFEB02E"}this._flagLeftGameObject.active=U,this._flagRightGameObject.active=U,this._flagDetailsLeftGameObject.active=U,this._flagDetailsRightGameObject.active=U,this._flagLeftImage.GameObject.active=U,this._flagRightImage.GameObject.active=U,U&&(this._flagLeftFill.disableTint(),this._flagLeftFill.hexTintColor=k,this._flagLeftFill.enableTint(),this._flagRightFill.disableTint(),this._flagRightFill.hexTintColor=k,this._flagRightFill.enableTint(),this._flagLeftImage.setAsset(Ve._.Ui_social_menu_json,B),this._flagRightImage.setAsset(Ve._.Ui_social_menu_json,B)),this._bannerLeftGameObject.active=F,this._bannerRightGameObject.active=F,F&&(this._bannerLeftFill.disableTint(),this._bannerLeftFill.hexTintColor=k,this._bannerLeftFill.enableTint(),this._bannerRightFill.disableTint(),this._bannerRightFill.hexTintColor=k,this._bannerRightFill.enableTint())}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Th.prototype,"_bannerLeftGameObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Th.prototype,"_flagLeftGameObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Th.prototype,"_flagDetailsLeftGameObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Th.prototype,"_bannerRightGameObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Th.prototype,"_flagRightGameObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Th.prototype,"_flagDetailsRightGameObject",void 0),Th=(0,G.Cg)([(0,j.EVk)("RankFlagTintableBanner")],Th);let Sh=class extends j.uAl{constructor(){super(...arguments),this._textCvC=[],this._textSvS=[],this._leaderboardType=lh.n.ClassLeaderboard}updateDisplay(k=this._leaderboardType){this._leaderboardType=k;for(const U of this._textCvC)U.GameObject.active=k===lh.n.ClassLeaderboard;for(const U of this._textSvS)U.GameObject.active=k===lh.n.StudentLeaderboard;this.continueButtonCvC.GameObject.active=k===lh.n.ClassLeaderboard;const B=k===lh.n.StudentLeaderboard&&!tt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_LEADERBOARD,ls.B.BREADCRUMB_STUDENT_LEADERBOARD_PRIZE_CLAIMED);this.continueButtonSvS.GameObject.active=k===lh.n.StudentLeaderboard&&!B,this.getPrizeButtonSvS.GameObject.active=k===lh.n.StudentLeaderboard&&B}};(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Sh.prototype,"continueButtonCvC",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Sh.prototype,"continueButtonSvS",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Sh.prototype,"getPrizeButtonSvS",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",Array)],Sh.prototype,"_textCvC",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",Array)],Sh.prototype,"_textSvS",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],Sh.prototype,"cvcCongratsText",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],Sh.prototype,"svsCongratsText",void 0),Sh=(0,G.Cg)([(0,j.EVk)("LeaderboardResultsDisplay",W.Y.leaderboard)],Sh);let Ah=class extends j.uAl{constructor(){super(...arguments),this._rankDisplayText="",this._leaderboardType=lh.n.ClassLeaderboard,this.onContinue=new j.HN0,this.onPrize=new j.HN0,this._initialized=!1}setRank(k){this._rankDisplayText=k}setLeaderboardType(k){this._leaderboardType=k}updateDisplay(){if(this._rankDisplayText){const k=this.GameObject.findComponentInChildren(Th);k&&k.setRank(this._rankDisplayText);const B=this.GameObject.findComponentInChildren(Sh);if(B){const k=this._leaderboardType===lh.n.ClassLeaderboard,U=k?B.cvcCongratsText:B.svsCongratsText;switch(this._rankDisplayText){case"1st":case"2nd":case"3rd":U.localizationKey=k?"LEADERBOARDS_RESULTS_RANK_TOP":"LEADERBOARDS_RESULTS_RANK_STUDENT_TOP";break;default:U.localizationKey=k?"LEADERBOARDS_RESULTS_RANK":"LEADERBOARDS_RESULTS_RANK_STUDENT"}U.setTextArguments(this._rankDisplayText),B.updateDisplay(this._leaderboardType),this._initialized||(this._initialized=!0,B.continueButtonCvC.onClick.add((()=>{this.onContinue.dispatch()})),B.continueButtonSvS.onClick.add((()=>{this.onContinue.dispatch()})),B.getPrizeButtonSvS.onClick.add((()=>{this.onPrize.dispatch()})))}}}destroy(){this.onContinue.dispose(),this.onPrize.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ah.prototype,"onContinue",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ah.prototype,"onPrize",void 0),Ah=(0,G.Cg)([(0,j.EVk)("LeaderboardResultsController",W.Y.leaderboard)],Ah);U(18332);var Ch=U(78746),Oh=U(90156),Ih=U(129),Dh=U(13693),Rh=U(44564),Ph=U(87331),Mh=U(99737),Nh=U(41538),xh=U(75777);let Lh=class extends j.uAl{refreshFollow(){const k=this._currentPlayer.player.equipment.getFollow();this._followContainer&&(this._followContainer.destroy(),this._followContainer=null),k&&(this._followContainer=tt.q.instance.prodigy.create.follow(this._spine.getRootContainer(),k,1,null),(this._followContainer instanceof xh.i||this._followContainer instanceof Mh.z||this._followContainer instanceof Nh.g)&&this._followContainer.startLoad())}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Lh.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],Lh.prototype,"_spine",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Lh.prototype,"_localizer",void 0),Lh=(0,G.Cg)([(0,j.EVk)("FollowDisplay",W.Y.lootDash)],Lh);var kh=U(61895),Bh=U(66397);let Uh=class extends j.uAl{constructor(){super(...arguments),this._equippedPetsSetup=!1,this._activeItemCards=[],this._itemCards=[],this._onTeamItemCardMap={},this._petFilledTeamCards=[],this._emptyFilledTeamCardInjectedValues={PET_ID:-1,PET_DATA:null,NAME:"Empty",LEVEL:0,MERGE_RANK:0,SHOW_MERGE_RANK_BADGE:!1,INPUT_ENABLED:!0,SHOW_SPINE:!1,SHOW_EMPTY_STATE:!0,SHOW_REPLACE_TOOLTIP:!1,SHOW_SELECTED:!1},this._petFilledTeamCardSelected=-1}get _filledTeamCardPrefab(){return Rt.l.FilledTeamCardInjectionConfiguredMergeRank}create(){this._lootDashManager.onStateDataChanged.add(this.handleStateDataChanged,this)}handleStateDataChanged(k,B){Ch.kL.includes(B)&&(this._teamUpdated||this._appearanceUpdated)&&(this._currentPlayer.player.kennel.updated=this._teamUpdated,this._currentPlayer.player.appearanceChanged=this._appearanceUpdated,this._teamUpdated=!1,this._appearanceUpdated=!1,this._currentPlayer.player.forceSaveCharacter())}setup(k){return(0,G.sH)(this,void 0,void 0,(function*(){this._itemType=k,this._noItemsText.GameObject.active=!1,this._teamUpdated=!1,this._appearanceUpdated=!1,this._onTeamItemCardMap={},this.setupRightPanel(),yield this.setupItemCards()}))}destroy(){this._itemCards.forEach((k=>{null===k.parent&&k.destroy()})),this._itemCardScrollViewSlider.onValueChanged.remove(this.setItemCardVisibilityOnScroll,this),this._lootDashManager.onStateDataChanged.remove(this.handleStateDataChanged,this),super.destroy()}setupRightPanel(){switch(this._itemType){case"pet":this.setActiveRightPanelDisplay(this._petRightSideContainer),this._itemCardHeaderText.text=this._baseLocalizer.getText("LOOT_DASH_YOUR_PETS"),this._equippedPetsSetup?this.resetStatesOfPetFilledTeamCards():(this.setupPetsFilledTeamCards().catch(j.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to set up the pet filled team cards")),this._equippedPetsSetup=!0);break;case"follow":this.setActiveRightPanelDisplay(this._followRightSideDisplay.GameObject),this.setupFollowRightPanel().catch(j.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to set up the follow right panel")),this._followRightSideDisplay.refreshFollow(),this._itemCardHeaderText.text=this._baseLocalizer.getText("LOOT_DASH_YOUR_BUDDIES");break;case"mount":this.setActiveRightPanelDisplay(this._mountRightSideContainer),this.setupMountRightPanel().catch(j.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to set up the mount right panel")),this._itemCardHeaderText.text=this._baseLocalizer.getText("LOOT_DASH_YOUR_MOUNTS")}}setupMountRightPanel(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._currentPlayer.player.equipment.getMount();this._mountFilledTeamCard?yield this.updateFilledTeamCardForBackpackItem(k,this._mountFilledTeamCard,"mount"):(this._mountFilledTeamCard=yield this.setupFilledTeamCardForBackpackItem(k,this._mountFilledTeamCardParent,"mount"),this._characterPreview.addCharacter(this._currentPlayer.player,this._characterPreviewSortingAnchor.getRootContainer()),this._characterPreview.setInputEnabled(!1))}))}setupFollowRightPanel(){return(0,G.sH)(this,void 0,void 0,(function*(){this._followFilledTeamCard?yield this.updateFilledTeamCardForBackpackItem(this._currentPlayer.player.equipment.getFollow(),this._followFilledTeamCard,"follow"):this._followFilledTeamCard=yield this.setupFilledTeamCardForBackpackItem(this._currentPlayer.player.equipment.getFollow(),this._followFilledTeamCardParent,"follow")}))}setActiveRightPanelDisplay(k){this._petRightSideContainer.active=k===this._petRightSideContainer,this._followRightSideDisplay.GameObject.active=k===this._followRightSideDisplay.GameObject,this._mountRightSideContainer.active=k===this._mountRightSideContainer}setupPetsFilledTeamCards(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._cardLoadingPromise)return;const k=this._currentPlayer.player.kennel.getPetTeam(!0),B=[];B.push((()=>(0,G.sH)(this,void 0,void 0,(function*(){var B;null===(B=this._petFilledTeamCards[0])||void 0===B||B.destroy(),this._petFilledTeamCards[0]=yield this.setupFilledTeamCardForPet(k[0],0),this._topPetFilledTeamCard.addChild(this._petFilledTeamCards[0])})))()),B.push((()=>(0,G.sH)(this,void 0,void 0,(function*(){var B;null===(B=this._petFilledTeamCards[1])||void 0===B||B.destroy(),this._petFilledTeamCards[1]=yield this.setupFilledTeamCardForPet(k[1],1),this._bottomPetFilledTeamCard.addChild(this._petFilledTeamCards[1])})))()),this._cardLoadingPromise=Promise.all(B),yield this._cardLoadingPromise.then((()=>{this._cardLoadingPromise=null})).catch(j.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Unable to create team cards"))}))}setupFilledTeamCardForPet(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){if(k){const U=kh.B.getInjectedValuesForFilledTeamCardPet(k);return this.addOnClickCallbacksToPetFilledCards(U,B),kh.B.setupPrefabWithRetainedContext(this._filledTeamCardPrefab,U,`equippedPet-${k.data.ID}`)}{const k=Object.assign({},this._emptyFilledTeamCardInjectedValues);return this.addOnClickCallbacksToPetFilledCards(k,B),kh.B.setupPrefabWithRetainedContext(this._filledTeamCardPrefab,k,"emptyPet")}}))}addOnClickCallbacksToPetFilledCards(k,B){k.ON_CLICK=()=>{this.onPetFilledTeamCardClicked(B)},k.ON_REMOVE_CLICK=()=>{this.onPetFilledTeamCardRemoveClicked(B)},k.ON_INFO_CLICK=()=>{this.onPetFilledTeamCardInfoClicked(B)}}updateFilledTeamCardForPet(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=B?kh.B.getInjectedValuesForFilledTeamCardPet(B):this._emptyFilledTeamCardInjectedValues;Nt.d.updateInjectedValues(this._petFilledTeamCards[k],U,!0),this.setupPetsFilledTeamCards().catch(j.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to set up the pet filled team cards"))}))}onPetCardClicked(k,B){const U=this._currentPlayer.player.kennel.getPetTeam(!0);let F=k;if(this.resetStatesOfPetFilledTeamCards(),U.some((k=>k&&k.data.uniqueID===B.uniqueID)))return;if(!U[0]||!U[1]){const G=U[0]?2:1;this.addPetToTeam(k,B,G),F=-1}this.setSelectedItemCard(F);const G=this._selectedItemCard>=0;for(const j of this._petFilledTeamCards)Nt.d.updateInjectedValues(j,{SHOW_REPLACE_TOOLTIP:G})}addPetToTeam(k,B,U){this._currentPlayer.player.kennel.setTeamPosition(B,U,!1);const F=this._currentPlayer.player.kennel.getPetTeam(!0);this._teamUpdated=!0,this.updateItemCardsForOnTeamPets(k,B),this.updateFilledTeamCardForPet(U-1,F[U-1]).catch(j.RQr.createHandler(`LootDashDetailedSelectionScreenComponent: Failed to update the ${1===U?"top":"bottom"} filled team card`))}setSelectedItemCard(k,B=!1){if(this._selectedItemCard>=0){const k=this._itemCards[this._selectedItemCard];Nt.d.updateInjectedValues(k,{SELECTED:!1})}if(!(this._selectedItemCard!==k&&k>=0))return this._selectedItemCard=-1,void this._petFilledTeamCards.forEach((k=>{Nt.d.updateInjectedValues(k,{SHOW_SELECTED:!1})}));{const U=this._itemCards[k];B||Nt.d.updateInjectedValues(U,{SELECTED:!0}),this._petFilledTeamCards.forEach((k=>{Nt.d.updateInjectedValues(k,{SHOW_SELECTED:!0})}))}this._selectedItemCard=k}onPetFilledTeamCardClicked(k){const B=this._petFilledTeamCards[k],U=this._currentPlayer.player.kennel.getPetTeam(!0)[k];this.resetStatesOfPetFilledTeamCards(),tt.q.instance.prodigy.audio.playSFX(18,"pop"),this._selectedItemCard>=0?this.swapEquippedPet(k):U?Nt.d.updateInjectedValues(B,{SHOW_REMOVE_TOOLTIP:!0}):this._petFilledTeamCardSelected===k?this._petFilledTeamCardSelected=-1:this._petFilledTeamCardSelected=k}onItemCardClicked(k){const B=this._itemCards[k],U=B.findComponent(j.bE_);switch(tt.q.instance.prodigy.audio.playSFX(18,"pop"),this._itemType){case"pet":const F=U.getInjectedValue("PET_DATA");this.onPetCardClicked(k,F);break;case"follow":case"mount":this.onBackpackItemCardClicked(B,k)}}onPetFilledTeamCardRemoveClicked(k){const B=0===k?1:2;this._currentPlayer.player.kennel.removeAtTeamPosition(B),this.resetStatesOfPetFilledTeamCards(),this.updateItemCardsForOnTeamPets(),this.updateFilledTeamCardForPet(k,null).catch(j.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to update the filled team card")),this._petFilledTeamCardSelected=-1}onPetFilledTeamCardInfoClicked(k){var B;const U=this._currentPlayer.player.kennel.getPetTeam(!0)[k].data,F=U.team,G=()=>{this.setupPetsFilledTeamCards().catch(j.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to set up the pet filled team cards after closing the pet menu")),this.setupItemCards().catch(j.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to set up pet cards after closing the pet menu"))};if((0,Bt.G)(Oh.m)){const j=null===(B=tt.q.instance)||void 0===B?void 0:B.prodigy.open.petDetailsMenu(U,G);j.onPetGearChanged.add(this.updateItemCardsForOnTeamPets.bind(this,k)),j.onRemovePetFromTeam.add(this.onPetFilledTeamCardRemoveClicked.bind(this,k)),j.onAddPetToTeam.add(this.addPetToTeam.bind(this,k,U,F))}else{tt.q.instance.prodigy.open.yourPetStandalone(U,{[hs.hi.YourPetPanelShowRightSideButtons]:!1}).onClose=G}this.resetStatesOfPetFilledTeamCards()}resetStatesOfPetFilledTeamCards(){const k={SHOW_SELECTED:!1,SHOW_REMOVE_TOOLTIP:!1,SHOW_REPLACE_TOOLTIP:!1};for(const B of this._petFilledTeamCards)Nt.d.updateInjectedValues(B,k,!0)}swapEquippedPet(k){const B=this._itemCards[this._selectedItemCard],U=B.findComponent(j.bE_).getInjectedValue("PET"),F=0===k?1:2;this._currentPlayer.player.kennel.removeAtTeamPosition(F,!1),this._currentPlayer.player.kennel.setTeamPosition(U,F,!1),this._teamUpdated=!0;const G=this._currentPlayer.player.kennel.petTeam.find((k=>k.data.uniqueID===U.uniqueID));this.updateItemCardsForOnTeamPets(this._selectedItemCard,U),this.updateFilledTeamCardForPet(k,G).catch(j.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to update the filled team card")),this.setSelectedItemCard(-1),Nt.d.updateInjectedValues(B,{SHOW_REPLACE_TOOLTIP:this._selectedItemCard>=0,SELECTED:!1},!0)}setupFilledTeamCardForBackpackItem(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){if(!k){const k=yield kh.B.setupPrefabWithRetainedContext(this._filledTeamCardPrefab,this._emptyFilledTeamCardInjectedValues,`empty-${U}`,B);return"mount"===U&&Nt.d.updateInjectedValues(k,{SHOW_EMPTY_STATE:!0,SHOW_EMPTY_ICON:!1,SHOW_EMPTY_TEXT:!1},!0),Nt.d.updateInjectedValues(k,{INPUT_ENABLED:!1},!0),k}const F=Yt.t.getItem(U,k),G=this.getInjectedValuesForFilledBackpackItemCard(F);return yield kh.B.setupPrefabWithRetainedContext(this._filledTeamCardPrefab,G,`equipped-${U}-${F.data.ID}`,B)}))}updateFilledTeamCardForBackpackItem(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){if(!k)return Nt.d.updateInjectedValues(B,this._emptyFilledTeamCardInjectedValues,!0),void("mount"===U&&Nt.d.updateInjectedValues(B,{SHOW_EMPTY_STATE:!0,SHOW_EMPTY_ICON:!1,SHOW_EMPTY_TEXT:!1},!0));const F=Yt.t.getItem(U,k),G=this.getInjectedValuesForFilledBackpackItemCard(F);Nt.d.updateInjectedValues(B,G,!0)}))}getInjectedValuesForFilledBackpackItemCard(k){var B;const U=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return{PET_ID:-1,PET_DATA:null,NAME:null!==(B=k.data.nickname)&&void 0!==B?B:k.data.name,LEVEL:0,INPUT_ENABLED:!1,SHOW_STAT_ICON:!0,SHOW_SPINE:!1,SHOW_EMPTY_STATE:!1,SHOW_LEVEL:!1,SHOW_MEMBERLOCK_ICON:Ph.G.shouldShowMemberLockIcon(k,U),SHOW_REPLACE_TOOLTIP:!1,STAT_ICON_DISPLAY_ITEM_ID:k.ID,STAT_ICON_DISPLAY_ITEM_TYPE:k.type}}setupItemCards(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=null!==(k=this._itemCards.length)&&void 0!==k?k:0;let U;switch(this.setSelectedItemCard(-1),this._itemType){case"pet":U=yield this.setupItemCardsForPets(B);break;case"follow":const k=(yield this._lootDashManager.getFeaturedItems()).featuredFollows;U=yield this.setupItemCardsForBackpackItems("follow",B,k);break;case"mount":const F=(yield this._lootDashManager.getFeaturedItems()).featuredMounts;U=yield this.setupItemCardsForBackpackItems("mount",B,F)}const F=Math.max(U,B);this._activeItemCards=[];for(let G=0;G=B&&Nt.d.updateInjectedValues(this._itemCards[G],{ON_CLICK:()=>this.onItemCardClicked(G)},!0),Gj.Aq$.isDefined(k)&&!(k instanceof Ih.a))).map((k=>null==k?void 0:k.data));let $=[...F,...this._currentPlayer.player.kennel.getPrimaryPets(!0)];if($.length<=0)return this._noItemsText.text=this._baseLocalizer.getText("LOOT_DASH_NO_PETS"),this._noItemsText.GameObject.active=!0,0;$=ct.orderBy($,[k=>U.includes(k.ID)?1:0,k=>k.mergeRank,k=>{var B,U;return"Mythic"===(null===(U=null===(B=Yt.t.getItem("pet",k.ID))||void 0===B?void 0:B.data)||void 0===U?void 0:U.category)?1:0},"level"],["desc","desc","desc","desc"]);const H=new Array(Math.max($.length-k,0));for(let j=0;j<$.length;j++)B.push((()=>(0,G.sH)(this,void 0,void 0,(function*(){const B=F.some((k=>(null==k?void 0:k.uniqueID)===$[j].uniqueID)),U=kh.B.getInjectedValuesForOwnedPetCardPet($[j],B);B&&(this._onTeamItemCardMap[j]=$[j]),jU.includes(k.ID)&&!U.includes(B.ID)?-1:U.includes(B.ID)&&!U.includes(k.ID)?1:0));if(j.length<=0){switch(k){case"follow":this._noItemsText.text=this._baseLocalizer.getText("LOOT_DASH_NO_BUDDIES");break;case"mount":this._noItemsText.text=this._baseLocalizer.getText("LOOT_DASH_NO_MOUNTS")}return this._noItemsText.GameObject.active=!0,0}const $=new Array(Math.max(j.length-B,0));for(let U=0;U(0,G.sH)(this,void 0,void 0,(function*(){const F=kh.B.getInjectedValuesForOwnedPetCardBackpackItem(j[U].ID,k);UB+U)}}updateItemCardsForOnTeamPets(k,B){j.Aq$.isDefined(k)&&B&&(this._onTeamItemCardMap[k]=B,Nt.d.updateInjectedValues(this._itemCards[k],{SHOW_ON_TEAM:!0}));const U=this._currentPlayer.player.kennel.petTeam.map((k=>null==k?void 0:k.data.uniqueID));for(const F of Object.keys(this._onTeamItemCardMap))this._onTeamItemCardMap[F]&&(U.includes(this._onTeamItemCardMap[F].uniqueID)||(this._onTeamItemCardMap[F]=null,Nt.d.updateInjectedValues(this._itemCards[F],{SHOW_ON_TEAM:!1})))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uh.prototype,"_petRightSideContainer",void 0),(0,G.Cg)([(0,j.MnK)(Lh),(0,G.Sn)("design:type",Lh)],Uh.prototype,"_followRightSideDisplay",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uh.prototype,"_mountRightSideContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uh.prototype,"_topPetFilledTeamCard",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uh.prototype,"_bottomPetFilledTeamCard",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Uh.prototype,"_itemCardHeaderText",void 0),(0,G.Cg)([(0,j.MnK)(j.Sz7),(0,G.Sn)("design:type",j.Sz7)],Uh.prototype,"_itemCardGridLayout",void 0),(0,G.Cg)([(0,j.MnK)(Rh.H),(0,G.Sn)("design:type",Rh.H)],Uh.prototype,"_itemCardScrollViewSlider",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uh.prototype,"_itemCardScrollArea",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],Uh.prototype,"_segment",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uh.prototype,"_followFilledTeamCardParent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uh.prototype,"_mountFilledTeamCardParent",void 0),(0,G.Cg)([(0,j.MnK)(Dh.Y),(0,G.Sn)("design:type",Dh.Y)],Uh.prototype,"_characterPreview",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Uh.prototype,"_noItemsText",void 0),(0,G.Cg)([(0,j.MnK)(Za.B),(0,G.Sn)("design:type",Za.B)],Uh.prototype,"_characterPreviewSortingAnchor",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Uh.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Uh.prototype,"_baseLocalizer",void 0),(0,G.Cg)([(0,j.Cdj)("cfe-9c2c"),(0,G.Sn)("design:type",Bh.K)],Uh.prototype,"_lootDashManager",void 0),Uh=(0,G.Cg)([(0,j.EVk)("LootDashDetailedSelectionScreen",W.Y.lootDash)],Uh);let Fh=class extends j.uAl{findAMatch(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=(yield this._lootDashManager.getFeaturedItemsEquippedData()).numFeaturedItemsThatCouldBeEquipped;if(0===k||this._lootDashManager.hasShownFeaturedItemsConfirmation)return void this._lootDashManager.setState(Ch.zM.FindingAMatch);const B=this.getNumLootBagsPlayerCouldEarn(k);this._lootDashManager.hasShownFeaturedItemsConfirmation=!0,Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.LootDashFeaturedItemConfirmationModal,{[hs.eV.FeaturedItemConfirmationModalHeaderText]:B>1?this._baseLocalizer.getText("LOOT_DASH_ADD_FEATURED_CONTENT_PLURAL",B):this._baseLocalizer.getText("LOOT_DASH_ADD_FEATURED_CONTENT",B),[hs.eV.FeaturedItemConfirmationModalBodyText]:this._baseLocalizer.getText("LOOT_DASH_CHANGE_TEAM"),[hs.eV.FeaturedItemConfirmationModalYesButtonCallback]:void 0,[hs.eV.FeaturedItemConfirmationModalNoButtonCallback]:()=>{this._lootDashManager.setState(Ch.zM.FindingAMatch)}}).catch(j.RQr.createHandler("LootDashFindAMatchPanelComponent: Error creating the featured item confirmation modal"))}))}getNumLootBagsPlayerCouldEarn(k){return k}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Fh.prototype,"_baseLocalizer",void 0),(0,G.Cg)([(0,j.Cdj)("cfe-9c2c"),(0,G.Sn)("design:type",Bh.K)],Fh.prototype,"_lootDashManager",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Fh.prototype,"_prefabLoader",void 0),Fh=(0,G.Cg)([(0,j.EVk)("LootDashFindAMatchPanel",W.Y.lootDash)],Fh);var Gh,jh=U(85515),$h=U(83267),Hh=U(4764);!function(k){k[k.Red=0]="Red",k[k.Yellow=1]="Yellow",k[k.Green=2]="Green"}(Gh||(Gh={}));let Vh=class extends j.uAl{constructor(){super(...arguments),this._characterSetupCancelablePromises=[],this._teleportingStarted=!1,this._setupId=0,this._exitAnimators=[],this._characters=[],this._characterLoadingSpinners=[],this._bannerIcons=[]}create(){super.create(),this._lootDashManager.onStateDataChanged.add(this.onStateDataChanged,this),this._charactersInitialized=new Array(this._characters.length).fill(!1),this._playerDataProvider=$h.E.createMockPlayerDataProvider()}destroy(){var k,B;this._lootDashManager.onStateDataChanged.remove(this.onStateDataChanged,this),null===(B=null===(k=this._lootDashManager.matchController)||void 0===k?void 0:k.onOpponentJoined)||void 0===B||B.remove(this.playerJoined,this),window.clearInterval(this._teleportingInterval),window.clearTimeout(this._teleportDelayTimeout),super.destroy()}onStateDataChanged(k){switch(k){case Ch.zM.FindingAMatch:this.setup(),this.setFindingAMatchElementStates();break;case Ch.zM.WaitingForPlayers:this.setWaitingForPlayersElementStates();break;case Ch.zM.MatchmakingComplete:this.setMatchmakingCompleteElementStates();break;case Ch.zM.MatchStartingSoon:this.setMatchStartingSoonState()}}setup(){this._setupId++,this.setDefaultElementStates(),this.initializeCharacterPrefab(this._characters[0],this._characterLoadingSpinners[0],this._currentPlayer.getAppearance()).catch(j.RQr.createHandler("LootDashWaitingRoomPanelComponent: Failed to load main player into the waiting room")),this._charactersInitialized[0]=!0,this.joinMatch().catch(j.RQr.createHandler("LootDashWaitingRoomPanelComponent: Failed to join a match"))}joinMatch(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this._lootDashManager.joinMatch(),this._lootDashManager.matchController.onOpponentJoined.add(this.playerJoined,this),this._lootDashManager.matchController.isQuickQuiz&&this._countdownTimer.onTimerCompleted.addOnce((()=>{this._lootDashManager.setState(Ch.zM.MatchmakingComplete)}))}))}setDefaultElementStates(){this._characters.forEach((k=>k.active=!1)),this._characterLoadingSpinners.forEach((k=>k.active=!1)),this._charactersInitialized=this._charactersInitialized.fill(!1),this._bannerIcons.forEach((k=>k.active=!1)),this._bannerIcons[Gh.Red].active=!0,this._countdownTimer.GameObject.active=!1,this._cancelButton.GameObject.active=!1,this._leaveMatchButton.GameObject.active=!1,this._bannerText.GameObject.active=!1,this._bottomText.GameObject.active=!1,this._extraPlayerCountObject.active=!1}setFindingAMatchElementStates(){this._characters.forEach((k=>k.active=!1)),this._bannerText.text=this._baseLocalizer.getText("LOOT_DASH_FINDING_MATCH"),this._bottomText.text=this._baseLocalizer.getText("LOOT_DASH_LOOKING_FOR_MATCH"),this._bannerText.GameObject.active=!0,this._bottomText.GameObject.active=!0,this._leaveMatchButton.GameObject.active=!1,this._cancelButton.GameObject.active=!this._lootDashManager.matchController.isQuickQuiz}setWaitingForPlayersElementStates(){this._bannerIcons.forEach((k=>k.active=!1)),this._bannerIcons[Gh.Yellow].active=!0,this._bannerText.text=this._baseLocalizer.getText("LOOT_DASH_MATCH_STARTS_IN"),this._bottomText.text=this._baseLocalizer.getText("LOOT_DASH_WAITING_FOR_PLAYERS"),this._cancelButton.GameObject.active=!1,this._countdownTimer.GameObject.active=!0,this._leaveMatchButton.GameObject.active=!this._lootDashManager.matchController.isQuickQuiz;const k=this._lootDashManager.config;let B=k.matchSetup.matchmakingTimeMs;if(this._lootDashManager.matchController.isQuickQuiz){const U=k.quickQuizConfigs.transportModalDurationMs;B-=Hh.w.instance().getMillisecondsSinceStart()-U,B=Math.max(B,k.quickQuizConfigs.miniumMatchmakingTimeMs)}this._countdownTimer.setCountdownTimeMS(B)}playerJoined(k,B){this._characters.forEach(((B,U)=>{U>0&&UU?(this._extraPlayerCountObject.active=!0,this._extraPlayerCountText.text="+"+(k-U)):this._extraPlayerCountObject.active=!1,B&&!this._lootDashManager.matchController.isQuickQuiz&&this._lootDashManager.setState(Ch.zM.MatchmakingComplete)}initializeCharacterPrefab(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){if(B.active=!0,k.children.length>0)return void this.setPlayerAppearance(k,B,U);const F=new j.kBN(((G,j)=>{Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.WizardInjectionConfigured,{"377-3e7b":this._playerDataProvider}).then((j=>{F.cancelled||(j.children[0].layer=jh.E.Default,j.parent=k,this.setPlayerAppearance(k,B,U)),G()})).catch(j)}));this._characterSetupCancelablePromises.push(F)}))}setPlayerAppearance(k,B,U){const F=this._setupId;k.findComponentInChildren(Ja.n).onAppearanceLoaded.add((()=>{this._teleportingStarted||(F===this._setupId?(B.active=!1,k.active=!0):k.active=!1)})),Nt.d.updateInjectedValues(k,{[hs.n7.WizardInjectionConfiguredAppearance]:U,[hs.n7.WizardInjectionConfiguredInputEnabled]:!1})}setMatchmakingCompleteElementStates(){if(this._bottomText.GameObject.active=!1,this._lootDashManager.matchController.isQuickQuiz)return void this.teleportPlayersOut();const k=this._lootDashManager.config;this._countdownTimer.setCountdownTimeMS(k.matchSetup.finalCountdownMs),this._teleportDelayTimeout=window.setTimeout(this.teleportPlayersOut.bind(this),700)}setMatchStartingSoonState(){this._bannerIcons.forEach((k=>k.active=!1)),this._bannerIcons[Gh.Green].active=!0,this._bannerText.text=this._baseLocalizer.getText("LOOT_DASH_GAME_ON"),this._bottomText.GameObject.active=!1,this._countdownTimer.GameObject.active=!1,this._leaveMatchButton.GameObject.active=!1,this._cancelButton.GameObject.active=!1}teleportPlayersOut(){const k=dt().sample([[0,1,2,3,4,5,6,7],[0,[4,1],[5,2],[6,3],7],[0,...dt().shuffle([1,2,3,4,5,6,7])],[[0,3],[4,7],[1,2],[5,6]]]);this._teleportingStarted=!0,this._teleportingInterval=window.setInterval((()=>{let B=k.shift();B=Array.isArray(B)?B:[B],B.forEach((k=>this.teleportPlayerOut(k))),0===k.length&&window.clearInterval(this._teleportingInterval)}),1e3/k.length)}teleportPlayerOut(k){if(k>0&&!this._charactersInitialized[k])return;const B=this._characters[k],U=this._exitAnimators[k];U.GameObject.active=!0,U.playAnimation(ya.rC.Exit,!1,!0),U.spine.onEvent.add(((U,F)=>{F.data.name===ya.jN.TransitionUnit&&(B.active=!1,k>0&&(this._characterLoadingSpinners[k-1].active=!1))}))}cancelMatchmaking(){this._lootDashManager.cancelMatchmaking(),this._characterSetupCancelablePromises.forEach((k=>k.cancel())),this._characterSetupCancelablePromises.length=0,window.clearInterval(this._teleportingInterval),window.clearTimeout(this._teleportDelayTimeout),this._exitAnimators.forEach((k=>{k.GameObject.active=!1,k.spine.onEvent.removeAll(),k.stopAnimation()})),this._teleportingStarted=!1}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Array)],Vh.prototype,"_exitAnimators",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Vh.prototype,"_characters",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Vh.prototype,"_characterLoadingSpinners",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Vh.prototype,"_bannerText",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Vh.prototype,"_bannerIcons",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Vh.prototype,"_bottomText",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],Vh.prototype,"_countdownTimer",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Vh.prototype,"_cancelButton",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Vh.prototype,"_leaveMatchButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Vh.prototype,"_extraPlayerCountObject",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Vh.prototype,"_extraPlayerCountText",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Vh.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("cfe-9c2c"),(0,G.Sn)("design:type",Bh.K)],Vh.prototype,"_lootDashManager",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Vh.prototype,"_baseLocalizer",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Vh.prototype,"_prefabLoader",void 0),Vh=(0,G.Cg)([(0,j.EVk)("LootDashWaitingRoomPanel",W.Y.lootDash)],Vh);var Wh,qh,Kh=U(70156);!function(k){k[k.Pet1=0]="Pet1",k[k.Pet2=1]="Pet2",k[k.Follow=2]="Follow",k[k.Mount=3]="Mount"}(Wh||(Wh={})),function(k){k.Add="ADD",k.Change="ITEM_TEXT_CHANGE"}(qh||(qh={}));const zh=[Ch.zM.LobbyDefault,Ch.zM.FindingAMatch,Ch.zM.WaitingForPlayers,Ch.zM.MatchmakingComplete,Ch.zM.MatchStartingSoon,Ch.zM.MatchStartingNow];let Yh=class extends j.uAl{constructor(){super(...arguments),this._featuredIconContainers=[],this._featuredItemSelectedIcons=[],this._featuredItemNotSelectedIcons=[],this._petTeamUniqueIds=[]}create(){super.create(),this._changePetButton.onClick.add((()=>{this.openDetailedSelection("pet")})),this._changeFollowButton.onClick.add((()=>{this.openDetailedSelection("follow")})),this._changeMountButton.onClick.add((()=>{this.openDetailedSelection("mount")})),this._lootDashManager.onStateDataChanged.add(this.onStateDataChanged,this),tt.q.instance.game.broadcaster.addAppListener(jn.H3.MembershipResponseReceived,(k=>{"success"===k&&this.setupMembershipElements()}),this)}destroy(){this._lootDashManager.onStateDataChanged.remove(this.onStateDataChanged,this),tt.q.instance.game.broadcaster.removeAppListener(jn.H3.MembershipResponseReceived,this),super.destroy()}onStateDataChanged(k,B){switch(k){case Ch.zM.LobbyDefault:this.setupMembershipElements(),this.setChangeButtonsVisibility(!0);break;case Ch.zM.FindingAMatch:case Ch.zM.WaitingForPlayers:this._getMoreRevivesButton.GameObject.active=!1,this.setChangeButtonsVisibility(!1)}zh.includes(k)&&!zh.includes(B)&&this.updatePanelContents().catch(j.RQr.createHandler("LootDashYourTeamPanelComponent: Failed to render the your team panel of the lobby"))}updatePanelContents(){return(0,G.sH)(this,void 0,void 0,(function*(){this.setupEquippedPets(),this.setupEquippedItems(),yield this.setFeaturedIconStatuses(),this.setupMembershipElements(),this._petTeamUniqueIds=this._currentPlayer.player.kennel.petTeam.filter((k=>!(k instanceof Ih.a))).map((k=>{var B;return null===(B=null==k?void 0:k.data)||void 0===B?void 0:B.uniqueID}))}))}setChangeButtonsVisibility(k){this._changePetButton.GameObject.active=k,this._changeFollowButton.GameObject.active=k,this._changeMountButton.GameObject.active=k}setFeaturedIconStatuses(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._lootDashManager.getFeaturedItemsEquippedData();k.featuredFollowOwned&&(this._featuredItemSelectedIcons[Wh.Follow].active=k.featuredFollowEquipped,this._featuredItemNotSelectedIcons[Wh.Follow].active=!k.featuredFollowEquipped),this._featuredIconContainers[Wh.Follow].active=k.featuredFollowOwned,k.featuredMountOwned&&(this._featuredItemSelectedIcons[Wh.Mount].active=k.featuredMountEquipped,this._featuredItemNotSelectedIcons[Wh.Mount].active=!k.featuredMountEquipped),this._featuredIconContainers[Wh.Mount].active=k.featuredMountOwned,0===k.numFeaturedPetsOwned?(this._featuredIconContainers[Wh.Pet1].active=!1,this._featuredIconContainers[Wh.Pet2].active=!1):(this._featuredIconContainers[Wh.Pet1].active=!0,this._featuredIconContainers[Wh.Pet2].active=!0,this._featuredItemSelectedIcons[Wh.Pet1].active=k.featuredPetEquippedInSlot1,this._featuredItemNotSelectedIcons[Wh.Pet1].active=!k.featuredPetEquippedInSlot1,this._featuredItemSelectedIcons[Wh.Pet2].active=k.featuredPetEquippedInSlot2,this._featuredItemNotSelectedIcons[Wh.Pet2].active=!k.featuredPetEquippedInSlot2,k.featuredPetEquippedInSlot1&&1===k.numFeaturedPetsOwned?this._featuredIconContainers[Wh.Pet2].active=!1:k.featuredPetEquippedInSlot2&&1===k.numFeaturedPetsOwned&&(this._featuredIconContainers[Wh.Pet1].active=!1)),k.cappedNumFeaturedItemsOwned>0?(this._featuredItemsEquippedText.text=`${k.numFeaturedItemsEquipped} / ${k.cappedNumFeaturedItemsOwned}`,this._equippedFeaturedItemsContainer.active=!0):this._equippedFeaturedItemsContainer.active=!1,0===k.cappedNumFeaturedItemsOwned&&(this._featuredItemsInfoContainer.active=!1)}))}setupEquippedPets(){const k=this._currentPlayer.player.kennel.petTeam.filter((k=>!(k instanceof Ih.a)));this.setupEquippedPet(k[0],this._petTeamUniqueIds[0],this._equippedPetLeft),this.setupEquippedPet(k[1],this._petTeamUniqueIds[1],this._equippedPetRight),k[0]&&k[1]?(this._changePetButton.text=this._baseLocalizer.getText(qh.Change),this._changePetButton.regenerateButton()):(this._changePetButton.text=this._baseLocalizer.getText(qh.Add),this._changePetButton.regenerateButton())}setupEquippedPet(k,B,U){k?(this.setupPetCard(k,U).catch(j.RQr.createHandler("LootDashYourTeamPanelComponent: Failed to render a pet card for a currently equipped pet")),U.active=!0):U.active=!1}setupPetCard(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U,F,G,j;const $=Yt.t.getItem("pet",k.data.ID);if(B.children.length>0){const G={PET_ID:k.data.ID,PET_DATA:k.data,NAME:null!==(F=null!==(U=k.data.nickname)&&void 0!==U?U:k.data.name)&&void 0!==F?F:$.data.name,LEVEL:k.data.level,MERGE_RANK:eo.P8.getPetDisplayMergeRank(k.data.ID,k.data.uniqueID),SHOW_MERGE_RANK_BADGE:eo.P8.canPetAccessMergeRanks(k.data.ID),ICON:fs.E.getIconForType("pet",k.data.ID),SHOW_ELEMENT_ICON:!0,SHOW_STAT_ICON:!1};return void Nt.d.updateInjectedValues(B,G)}const H={PET_ID:k.data.ID,PET_DATA:k.data,NAME:null!==(j=null!==(G=k.data.nickname)&&void 0!==G?G:k.data.name)&&void 0!==j?j:$.data.name,LEVEL:k.data.level,MERGE_RANK:eo.P8.getPetDisplayMergeRank(k.data.ID,k.data.uniqueID),SHOW_MERGE_RANK_BADGE:eo.P8.canPetAccessMergeRanks(k.data.ID),ICON:fs.E.getIconForType("pet",k.data.ID),SHOW_UPGRADE:!1,SHOW_EVOLVE:!1,SHOW_ON_TEAM:!1,SHOW_GUIDE_HAND:!1,INPUT_ENABLED:!1,SHOW_ELEMENT_ICON:!0,SHOW_STAT_ICON:!1},V=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.OwnedPetCardInjectionConfiguredMergeRank,H);if(B.isDestroyed)return void V.destroy();const W=V.transform;W.setPivot(.5,.5),W.setAnchorMin(0,0),W.setAnchorMax(0,0),V.name=`pet-${k.data.ID}`,V.parent=B}))}setupEquippedItems(){const k=this._currentPlayer.player.equipment.getFollow();this.setupEquippedItem(k,"follow",this._equippedFollowContainer,this._changeFollowButton,this._followImageItemDataLoader);const B=this._currentPlayer.player.equipment.getMount();this.setupEquippedItem(B,"mount",this._equippedMountContainer,this._changeMountButton,this._mountImageItemDataLoader)}setupEquippedItem(k,B,U,F,G){j.Aq$.isDefined(k)?(G.setAsset(k,B).catch(j.RQr.createHandler(`LootDashYourTeamPanelComponent: Failed to render the equipped ${B}`)),U.active=!0,F.text=this._baseLocalizer.getText(qh.Change),F.regenerateButton()):j.Aq$.isDefined(k)||(U.active=!1,F.text=this._baseLocalizer.getText(qh.Add),F.regenerateButton())}setupMembershipElements(){const k=this._lootDashManager.getNumberOfStartingRevives();this._reviveCountText.text=k===Kh.eA?"∞":`x${k}`;const B=this._currentPlayer.getMembershipUpsell().tier;B!==xs._$.MemberUltimateMath&&B!==xs._$.MemberUltimateBundle?this._getMoreRevivesButton.GameObject.active=!0:this._getMoreRevivesButton.GameObject.active=!1}openDetailedSelection(k){switch(k){case"pet":this._lootDashManager.setState(Ch.zM.SelectPets);break;case"follow":this._lootDashManager.setState(Ch.zM.SelectFollows);break;case"mount":this._lootDashManager.setState(Ch.zM.SelectMounts)}}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yh.prototype,"_equippedPetLeft",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yh.prototype,"_equippedPetRight",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Yh.prototype,"_changePetButton",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Yh.prototype,"_changeFollowButton",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Yh.prototype,"_changeMountButton",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Yh.prototype,"_getMoreRevivesButton",void 0),(0,G.Cg)([(0,j.MnK)(os.X),(0,G.Sn)("design:type",os.X)],Yh.prototype,"_followImageItemDataLoader",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yh.prototype,"_equippedFollowContainer",void 0),(0,G.Cg)([(0,j.MnK)(os.X),(0,G.Sn)("design:type",os.X)],Yh.prototype,"_mountImageItemDataLoader",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yh.prototype,"_equippedMountContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yh.prototype,"_equippedFeaturedItemsContainer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Yh.prototype,"_featuredItemsEquippedText",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Yh.prototype,"_featuredIconContainers",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Yh.prototype,"_featuredItemSelectedIcons",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Yh.prototype,"_featuredItemNotSelectedIcons",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yh.prototype,"_featuredItemsInfoContainer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Yh.prototype,"_reviveCountText",void 0),(0,G.Cg)([(0,j.Cdj)("cfe-9c2c"),(0,G.Sn)("design:type",Bh.K)],Yh.prototype,"_lootDashManager",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Yh.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Yh.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Yh.prototype,"_baseLocalizer",void 0),Yh=(0,G.Cg)([(0,j.EVk)("LootDashYourTeamPanel",W.Y.lootDash)],Yh);let Qh=class extends j.uAl{create(){this._lootDashManager.onStateDataChanged.add(this.onStateDataChanged,this)}destroy(){this._lootDashManager.onStateDataChanged.remove(this.onStateDataChanged,this),super.destroy()}onStateDataChanged(k){switch(k){case Ch.zM.LobbyDefault:this.yourTeamPanel.GameObject.active=!0,this.findAMatchPanel.GameObject.active=!0,this.waitingRoomPanel.GameObject.active=!1;break;case Ch.zM.FindingAMatch:this.yourTeamPanel.GameObject.active=!0,this.findAMatchPanel.GameObject.active=!1,this.waitingRoomPanel.GameObject.active=!0}}};(0,G.Cg)([(0,j.MnK)(Yh),(0,G.Sn)("design:type",Yh)],Qh.prototype,"yourTeamPanel",void 0),(0,G.Cg)([(0,j.MnK)(Fh),(0,G.Sn)("design:type",Fh)],Qh.prototype,"findAMatchPanel",void 0),(0,G.Cg)([(0,j.MnK)(Vh),(0,G.Sn)("design:type",Vh)],Qh.prototype,"waitingRoomPanel",void 0),(0,G.Cg)([(0,j.Cdj)("cfe-9c2c"),(0,G.Sn)("design:type",Bh.K)],Qh.prototype,"_lootDashManager",void 0),Qh=(0,G.Cg)([(0,j.EVk)("LootDashLobbyController",W.Y.lootDash)],Qh);let Xh=class extends j.uAl{constructor(){super(...arguments),this._screens={}}create(){super.create(),this._classCodeButton.onClick.add(this.openClassCodePopup.bind(this)),this.resetMenuToDefault(),this.loadScreen(Ch.mz.Lobby).then((()=>{this._lootDashManager.onStateDataChanged.add(this.onLootDashStateChanged,this),this._lootDashManager.immediateStart?this._lootDashManager.setState(Ch.zM.FindingAMatch):(this._lootDashManager.setState(Ch.zM.LobbyDefault),this._closeButton.GameObject.active=!0)})).catch(j.RQr.createHandler("LootDashMenuControllerComponent: Error loading initial lobby screen"))}destroy(){Object.keys(this._screens).forEach((k=>{null===this._screens[k].parent&&this._screens[k].destroy()})),this._lootDashManager.onStateDataChanged.remove(this.onLootDashStateChanged,this),this._classCodeButton.onClick.removeAll(),super.destroy()}onLootDashStateChanged(k,B){if(k!==B)switch(k){case Ch.zM.LobbyDefault:this.resetMenuToDefault(),this._closeButton.GameObject.active=!0,this.loadScreen(Ch.mz.Lobby).catch(j.RQr.createHandler("LootDashMenuControllerComponent: Error loading lobby screen"));break;case Ch.zM.SelectPets:this._headerText.text=Ch.Ns.ChooseAPet,this._closeButton.GameObject.active=!1,this._backButton.GameObject.active=!0,this.loadScreen(Ch.mz.DetailedSelection,"pet").catch(j.RQr.createHandler("LootDashMenuControllerComponent: Error loading pet selection screen"));break;case Ch.zM.SelectFollows:this._headerText.text=Ch.Ns.ChooseABuddy,this._closeButton.GameObject.active=!1,this._backButton.GameObject.active=!0,this.loadScreen(Ch.mz.DetailedSelection,"follow").catch(j.RQr.createHandler("LootDashMenuControllerComponent: Error loading follow selection screen"));break;case Ch.zM.SelectMounts:this._headerText.text=Ch.Ns.ChooseAMount,this._closeButton.GameObject.active=!1,this._backButton.GameObject.active=!0,this.loadScreen(Ch.mz.DetailedSelection,"mount").catch(j.RQr.createHandler("LootDashMenuControllerComponent: Error loading mount selection screen"));break;case Ch.zM.FindingAMatch:case Ch.zM.WaitingForPlayers:this._headerText.text=Ch.Ns.LootDash,this._closeButton.GameObject.active=!1,this._backButton.GameObject.active=!1,this._classCodeButton.GameObject.active=!1;break;case Ch.zM.MatchStartingNow:this.gameObject.destroy();break;case Ch.zM.MatchEndedByServer:this._closeButton.onEnabledClick.dispatch(),this.OnDestroy.addOnce((()=>{tt.q.instance.prodigy.gameContainer.get("fc2-cb0a").handleQuizExitFlowComplete()}))}}resetMenuToDefault(){this._headerText.text=Ch.Ns.LootDash,this._closeButton.GameObject.active=!1,this._backButton.GameObject.active=!1,this._backButton.onClick.removeAll(),this._backButton.onClick.addOnce((()=>{this._lootDashManager.setState(Ch.zM.LobbyDefault)})),this.updateClassCodeButtons().catch(j.RQr.createHandler("LootDashMenuControllerComponent: Error updating class code buttons"))}loadScreen(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B="pet"){switch(this._loadingScreen.active=!0,this._headerInputBlocker.active=!0,Object.keys(this._screens).forEach((B=>{this._screens[B]&&B!==k&&(this._screens[B].active=!1,this._screens[B].parent=null)})),k){case Ch.mz.Lobby:yield this.openLobbyScreen();break;case Ch.mz.DetailedSelection:yield this.openDetailedSelectionScreen(B)}this._loadingScreen.active=!1,this._headerInputBlocker.active=!1}))}openLobbyScreen(){return(0,G.sH)(this,void 0,void 0,(function*(){this._screens[Ch.mz.Lobby]||(this._screens[Ch.mz.Lobby]=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.LootDashLobby,{"377-3e7b":$h.E.createMockPlayerDataProvider()}));const k=this._screens[Ch.mz.Lobby];k.parent=this._screenContainer,k.active=!0}))}openDetailedSelectionScreen(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(!Ch.Mh.includes(k))throw new Error(`LootDashMenuControllerComponent: Invalid item type for detailed selection: ${k}`);this._screens[Ch.mz.DetailedSelection]||(this._screens[Ch.mz.DetailedSelection]=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.LootDashDetailedSelectionScreen,{}));const B=this._screens[Ch.mz.DetailedSelection];B.parent=this._screenContainer,B.active=!0;const U=B.findComponentInChildren(Uh);yield U.setup(k)}))}openClassCodePopup(){tt.q.instance.prodigy.open.prefabMenu(Rt.l.ClassCodePopup,void 0,void 0,void 0,void 0,{[hs.iu.ClassCodeSubmitSuccess]:this.updateClassCodeButtons.bind(this)})}updateClassCodeButtons(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F;if(this._lootDashManager.immediateStart)return void(this._classCodeButton.GameObject.active=!1);const G=tt.q.instance.prodigy.gameContainer.get("c97-bd0d"),j=null===(F=null===(U=null===(B=null===(k=yield G.getCurrentClassCode())||void 0===k?void 0:k.data)||void 0===B?void 0:B.player)||void 0===U?void 0:U.currentClassroom)||void 0===F?void 0:F.code;j?(this._classCodeButton.text=`${this._baseLocalizer.getText("CLASS_CODE_TITLE")} ${j}`,this._classCodeButton.regenerateButton(),this._classCodeButton.GameObject.active=!0):this._classCodeButton.GameObject.active=!0}))}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Xh.prototype,"_headerText",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Xh.prototype,"_backButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Xh.prototype,"_closeButton",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Xh.prototype,"_classCodeButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Xh.prototype,"_loadingScreen",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Xh.prototype,"_screenContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Xh.prototype,"_headerInputBlocker",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Xh.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("cfe-9c2c"),(0,G.Sn)("design:type",Bh.K)],Xh.prototype,"_lootDashManager",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Xh.prototype,"_baseLocalizer",void 0),Xh=(0,G.Cg)([(0,j.EVk)("LootDashMenuController",W.Y.lootDash)],Xh);let Zh=class extends j.uAl{constructor(){super(...arguments),this.onStateChange=new j.HN0,this.onBattleDataChanged=new j.HN0}create(){super.create(),this._lootDashManager.onStateDataChanged.add(this.onStateChange.dispatch),this._lootDashManager.matchController.onBattleDataChanged.add(this.onBattleDataChanged.dispatch)}destroy(){this.onStateChange.dispose(),this.onBattleDataChanged.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("cfe-9c2c"),(0,G.Sn)("design:type",Bh.K)],Zh.prototype,"_lootDashManager",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Zh.prototype,"onStateChange",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Zh.prototype,"onBattleDataChanged",void 0),Zh=(0,G.Cg)([(0,j.EVk)("LootDashStateData",W.Y.lootDash)],Zh);U(67844),U(21573),U(22162),U(25735),U(99332),U(39258),U(27314);let Jh=class extends j.uAl{constructor(){super(...arguments),this._header=null,this._counters=[]}get header(){return this._header.TextObject.text}set header(k){this._header.text=k}setOccupants(k,B){B&&B.length>-1&&(this.header=k.getText(Yi.D.TT_ROOMMATES,B.length),this.setLevelCounts(B))}setLevelCounts(k){const B=new Map;k.forEach((k=>{let U=B.get(k);j.Aq$.isDefined(U)?U++:U=1,B.set(k,U)}));for(let U=0;Uj.Aq$.isDefined(k.type))).map((k=>{var B,U;return{itemId:null!==(B=k.ID)&&void 0!==B?B:1,itemType:k.type,quantity:null!==(U=k.N)&&void 0!==U?U:1,isSecure:k.isSecure}}));if(this._memberJarController.isJarFull(B))return this._cachedPendingRewards=U,void this._memberJarController.showEntityUpdate(B);k.saveMemberStarsToJar();const F=yield this._memberJarNetworkHandler.updateMemberJarRewards(U);this._segment.conversionJar.sendConversionJarUpdated(Object.assign(Object.assign({},this._segment.conversionJar.memberJarUpdate(F)),{updateType:"Items Added",battleId:this._segment.postBattleFlow.getBattleId(),added:k.memberRewards,transactionId:this._segment.postBattleFlow.memberChestTransactionId})),this._memberJarController.showEntityUpdate(F)}))}redeemMemberJar(){this.isDestroyed()||this.redeemMemberJarContinue().catch(j.RQr.createHandler("Error redeeming member jar"))}redeemMemberJarContinue(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=this.GameObject.findComponentInParent(hc.D),U=xt.$.generateUID(),F=Object.assign({transaction_id:U,source_type:li.C.ConversionJar,source_id:"Member Jar"},this._gotItem.customSegmentMetadata),G=yield this._memberJarNetworkHandler.getMemberJarData(),j=cc.S.canReceiveReward();if(!j&&!this._memberJarController.isReadyToOpenJar(G))return void this.onRedeemAborted.dispatch();const $=G.savedRewards.concat(this._cachedPendingRewards).map((k=>({type:k.itemType,ID:k.itemId,N:k.quantity,isSecure:k.isSecure})));for(const Q of $)Q.isSecure?this.sendItemReceivedEvent(Q,F):Qt.J.bagItemByType(Q,tt.q.instance.game,void 0,void 0,F);let H,V=0;const W=tt.q.instance.prodigy.gameContainer.get("306-5359");if(j){W.data.storedMemberStars=0,cc.S.redeemReward();const k=dc.Q.getMemberJarDropData().memberLevelBoost.levels;$.push({type:"item",ID:252,N:k})}else{const U=null==B?void 0:B.redeemStarsThroughMemberJar();V=null!==(k=null==U?void 0:U.totalStarsAwarded)&&void 0!==k?k:0,H=null==U?void 0:U.starJarXpGained}const q=this._memberJarController.showEntityRedeem(G),K=yield this._memberJarNetworkHandler.resetMemberJarData(j);cc.S.isFeatureEnabled()||W.removeExperimentFromEligibilityList(lc.a.key),$.some((k=>rc.p.includes(k.type)))&&(yield tt.q.instance.prodigy.gameContainer.get("d69-defe").refreshPetGear()),this._segment.conversionJar.sendConversionJarUpdated(Object.assign(Object.assign({},this._segment.conversionJar.memberJarUpdate(K)),{updateType:"Items Claimed",battleId:this._segment.postBattleFlow.getBattleId(),removed:$,transactionId:U})),V>0&&$.push({type:"item",ID:177,N:V});let z=0;const Y=()=>{var k;this._gotItem.clearItems();for(let B=z;B{if(z<$.length)return Y(),void this._gotItem.awardItem();H&&(null==B||B.visuallyRedeemStarsThroughMemberJar(H)),this.onRedeemCompleted.dispatch()})),Y(),yield q,this.onRedeemSuccess.dispatch()}))}sendItemReceivedEvent(k,B){var U,F,G,j;tt.q.instance.prodigy.gameContainer.get("c47-20b6").item.sendItemReceivedEvent("gold"===k.type?0:k.ID,null!==(G=null===(F=null===(U=Yt.t.getItem(k.type,k.ID))||void 0===U?void 0:U.data)||void 0===F?void 0:F.name)&&void 0!==G?G:"unknown",k.type,null!==(j=k.N)&&void 0!==j?j:1,B)}destroy(){this.onRedeemSuccess.dispose(),this.onRedeemAborted.dispose(),this.onRedeemCompleted.dispose(),this.onUpdateComplete.dispose(),super.destroy()}isDestroyed(){return!this.GameObject||this.GameObject.isDestroyed}};(0,G.Cg)([(0,j.Cdj)("097-a053"),(0,G.Sn)("design:type",nc.S)],uc.prototype,"_memberJarNetworkHandler",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],uc.prototype,"_segment",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uc.prototype,"onUpdateComplete",void 0),(0,G.Cg)([(0,j.MnK)(sc.P),(0,G.Sn)("design:type",sc.P)],uc.prototype,"_memberJarController",void 0),(0,G.Cg)([(0,j.Pqz)(oc.f),(0,G.Sn)("design:type",oc.f)],uc.prototype,"_gotItem",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uc.prototype,"onRedeemSuccess",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uc.prototype,"onRedeemCompleted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uc.prototype,"onRedeemAborted",void 0),uc=(0,G.Cg)([(0,j.EVk)("MemberJarUpdate",W.Y.membership)],uc);let fc=class extends j.PQK{installBindings(){this.Container.bind("MEMBERS_GET_SEVEN_LEVELS_FEATURE_ENABLED").toConstantValue(cc.S.isFeatureEnabled());const k=cc.S.isEligibleForFeature();this.Container.bind("MEMBERS_GET_SEVEN_LEVELS_ENABLED").toConstantValue(k);const B=dc.Q.getMemberJarDropData().memberLevelBoost.levels,U=tt.q.instance.prodigy.gameContainer.get("306-5359").getLevel();this.Container.bind("MEMBERS_GET_SEVEN_LEVELS_PLAYER_LEVEL_CURRENT").toConstantValue(U),this.Container.bind("MEMBERS_GET_SEVEN_LEVELS_PLAYER_LEVEL_NEW").toConstantValue(U+B)}};fc=(0,G.Cg)([(0,j.Og1)("MembersGetSevenLevelsInstaller","Installer")],fc);var bc,pc=U(63731),vc=U(65068),gc=U(39144),mc=U(93054);function yc(k){const{text:B,progress:U}=k;return oh.A.isDefined(U)?{bannerType:Rt.l.ProgressBanner,text:B,progress:U}:{bannerType:Rt.l.GuidanceBanner,text:B}}let _c=bc=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.objectiveTypes=[],this._objectiveBannerMap=new Map}static isGuideHandActive(){return bc._guideHandActive}postCreate(){this.init()}destroy(){var k;this._objectiveBannerMap.forEach((k=>this._bannerQueueManager.deleteBanner(k))),null===(k=this._lastUsedGuideHand)||void 0===k||k.despawnGuideHand(),super.destroy()}init(){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.game.broadcaster.addAppListener(jn.n8.FactoryMenuClosed,(()=>{this.updateObjectives().catch(j.RQr.createHandler("Could not get latest objectives"))}),this),tt.q.instance.game.broadcaster.addAppListener(jn.GR.ObjectiveUpdated,(()=>{this.updateObjectives().catch(j.RQr.createHandler("Could not get latest objectives"))}),this);const k=yield this.getObjectives();for(const B of k)this.createBannerForObjective(B);this.createGuideHand(k)}))}getObjectives(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;return null===(k=this._objectiveLog)||void 0===k?void 0:k.getObjectives({types:this.objectiveTypes})}))}updateObjectives(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this.getObjectives();this.updateObjectiveBanners(k),this.createGuideHand(k)}))}createBannerForObjective(k){const B=yc(k),U=this._bannerQueueManager.postBanner(B);this._objectiveBannerMap.set(k.id,U)}updateObjectiveBanners(k){if(this.gameObject.isDestroyed)return;const B=k.map((({id:k})=>k)),U=[];for(const[F,G]of this._objectiveBannerMap.entries())B.includes(F)||(U.push(G),this._objectiveBannerMap.delete(F));U.forEach((k=>this._bannerQueueManager.deleteBanner(k)));for(const F of k)this._objectiveBannerMap.has(F.id)?this._bannerQueueManager.updateBanner(this._objectiveBannerMap.get(F.id),yc(F)):this.createBannerForObjective(F)}createGuideHand(k){var B;if(this.gameObject.isDestroyed)return;const U=k.find((k=>oh.A.isDefined(k.location)||oh.A.isDefined(k.guideHand)));oh.A.isDefined(null==U?void 0:U.guideHand)&&U.guideHand.targetMapTag===tt.q.instance.prodigy.world.getCurrentMap()?this.guideHandFromData(U):oh.A.isDefined(null==U?void 0:U.location)?this.guideHandFromLocation(U):(null===(B=this._lastUsedGuideHand)||void 0===B||B.despawnGuideHand(),bc._guideHandActive=!1)}guideHandFromLocation(k){var B,U,F,G;if(!oh.A.isDefined(k.location))return;const $=[k.location],H=mc.P.getTargetMapsFromLocations($),V=mc.P.findShortestPathsToAllOf(tt.q.instance.prodigy.world.getCurrentMap(),H);if(V.length>0){V.sort(((k,B)=>k.length-B.length));const k=V[0],$=k.length>1?k[1]:"";if(null!==(U=null===(B=j.wa5.getActiveScene())||void 0===B?void 0:B.container.get("IS_PREFAB_MAP"))&&void 0!==U&&U)this._lastUsedGuideHand=mc.P.manageTeleportTriggerGuideHands($);else{(null!==(G=null===(F=tt.q.instance.prodigy.world.getCurrentMapObject())||void 0===F?void 0:F.guideHandData)&&void 0!==G?G:[]).forEach((k=>{k.targetMapTag===$&&(this.guideHandSpawner.angle=k.angle,this.guideHandSpawner.spawnGuideHand(k.position,"").catch(j.RQr.createHandler("Failed to spawn guide hand")),this._lastUsedGuideHand=this.guideHandSpawner)}))}bc._guideHandActive=!0}}guideHandFromData(k){var B,U;if(!oh.A.isDefined(k.guideHand))return;this.guideHandSpawner.angle=k.guideHand.angle,this.guideHandSpawner.spawnGuideHand(k.guideHand.position,"").catch(j.RQr.createHandler("Failed to spawn guide hand")),this._lastUsedGuideHand=this.guideHandSpawner,bc._guideHandActive=!0;null!==(U=null===(B=j.wa5.getActiveScene())||void 0===B?void 0:B.container.get("IS_PREFAB_MAP"))&&void 0!==U&&U&&mc.P.despawnTeleportTriggerGuideHands()}};(0,G.Cg)([(0,j.SZi)(),(0,j.gfw)(vc.q),(0,G.Sn)("design:type",Array)],_c.prototype,"objectiveTypes",void 0),(0,G.Cg)([(0,j.MnK)(gc.P),(0,G.Sn)("design:type",gc.P)],_c.prototype,"guideHandSpawner",void 0),(0,G.Cg)([(0,j.Cdj)("e9c-fde5"),(0,G.Sn)("design:type",pc.Z)],_c.prototype,"_objectiveLog",void 0),(0,G.Cg)([(0,j.Cdj)("dce-fce4"),(0,G.Sn)("design:type",qi.Z)],_c.prototype,"_bannerQueueManager",void 0),_c=bc=(0,G.Cg)([(0,j.EVk)("CurrentObjectiveControllerComponent")],_c);let Ec=class extends j.uAl{constructor(){super(...arguments),this.tierTextComponents=[],this.defaultTierValues=[]}postCreate(){super.postCreate(),this.setTiers(this.defaultTierValues)}setTiers(k){for(let B=0;B{tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:Is.k.ParentGoalTrackerNotAttached,destinationName:"parent_goal_attach_modal",elementType:"parent_goal",interfaceType:ui.Wm.Modal,interfaceName:us.B.ParentGoalsTracker,saveClickInfo:Is.k.ParentGoalTrackerNotAttached}),tt.q.instance.prodigy.open.parentAttachMenu(null,Is.k.ParentGoalTrackerNotAttached,us.B.ParentGoalAttachModal,{SEGMENT_QR_CODE_NAME:Oc.ParentGoalAttachment})})))}exit(){this.parts.button.GameObject.active=!1,super.exit()}}function xc(k){var B;if(!k)return void Lc(Rt.l.ParentGoalStatusDialogNoGoal);const U=null===(B=k.rewards)||void 0===B?void 0:B[0],F=U?{id:U.ID,type:U.type,N:U.N,L:U.L,cost:U.cost,data:U.data,receivedThroughGotItemFlow:!0}:null,G={[hs.Tl.Data]:F};k.progress>=k.target?Lc(Rt.l.ParentGoalStatusDialogComplete,Object.assign({},G)):Lc(Rt.l.ParentGoalStatusDialogInProgress,Object.assign(Object.assign({},G),{promptLabelArgs:[k.target],completionLabelArgs:[k.progress,k.target],completionRatio:k.progress/k.target}))}function Lc(k,B){return tt.q.instance.prodigy.open.prefabMenu(k,void 0,!1,!0,!1,B,void 0,void 0,void 0,void 0,!0)}class kc extends Mc{constructor(){super(...arguments),this.onGoalAcquired=new j.HN0}enter(){super.enter(),this.parts.button.GameObject.active=!0,this.parts.notificationIndicator.active=!1,this.parts.spineButton.playAnimation("idle-nogoal",!0),this.destroyOnExit(this.parts.button.onEnabledClick.add((()=>{tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:Is.k.ParentGoalTrackerNoGoal,destinationName:"parent_goal_need_goal_modal",elementType:"parent_goal",interfaceType:ui.Wm.Modal,interfaceName:us.B.ParentGoalsTracker}),xc(null)}))),this.destroyOnExit(this.parts.dataProvider.onChange.add((k=>{k&&this.onGoalAcquired.dispatch()})))}exit(){this.parts.button.GameObject.active=!1,super.exit()}dispose(){this.onGoalAcquired.dispose(),super.dispose()}}class Bc extends Mc{constructor(){super(...arguments),this.onGoalCompleted=new j.HN0}enter(){super.enter(),this.parts.button.GameObject.active=!0,this.parts.progress.GameObject.active=!0,this.destroyOnExit(this.parts.button.onEnabledClick.add((()=>{const k=tt.q.instance.prodigy.gameContainer.get("c47-20b6"),B=this.parts.dataProvider.goal.progress>=this.parts.dataProvider.goal.target;k.featureCommon.sendButtonEvent({buttonName:B?Is.k.ParentGoalTrackerNeedReward:Is.k.ParentGoalTrackerInProgress,destinationName:B?"parent_goal_need_reward_modal":"parent_goal_status_modal",elementType:"parent_goal",interfaceType:ui.Wm.Modal,interfaceName:us.B.ParentGoalsTracker}),xc(this.parts.dataProvider.goal)}))),this.destroyOnExit(this.parts.dataProvider.onChange.add((()=>this.refresh()))),setTimeout(this.refresh.bind(this,!0),Bc.PROGRESS_BAR_INITIAL_WAIT_MS)}exit(){this.parts.progress.GameObject.active=!1,this.parts.button.GameObject.active=!1,super.exit()}dispose(){this.onGoalCompleted.dispose(),super.dispose()}refresh(k=!1){if(!this.parts.dataProvider.goal)return void this.onGoalCompleted.dispatch();const{progress:B,target:U,isComplete:F}=this.parts.dataProvider.goal;this.parts.notificationIndicator.active=0===B||B>=U;const G=this.parts.progress.getFillValue();let j=B/U;const $=j-G;$>0&&$this.onGoalCompleted.dispatch()))):G=U?this.parts.spineButton.playAnimation("fill-complete",!1):this.parts.spineButton.playAnimation("fill",!1,!0):this.parts.spineButton.playAnimation("idle-inprogress",!0)}}Bc.PROGRESS_BAR_INITIAL_WAIT_MS=150,Bc.MINIMUM_NORMALIZED_INCREMENT=.05;class Uc extends Mc{constructor(){super(...arguments),this.onGoalClaimed=new j.HN0,this._bounceTimeout=null}enter(){super.enter(),this.parts.button.GameObject.active=!0,this.parts.progress.GameObject.active=!0,this.parts.notificationIndicator.active=!0,this.playInitialAnimations(),this.destroyOnExit(this.parts.button.onEnabledClick.add((()=>{tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:Is.k.ParentGoalTrackerCollectReward,destinationName:"parent_goal_collect_reward",elementType:"parent_goal",interfaceType:ui.Wm.Modal,interfaceName:us.B.ParentGoalsTracker,saveClickInfo:Is.k.ParentGoalTrackerCollectReward}),this.parts.dataProvider.claimAllRewards()}))),this.destroyOnExit(this.parts.dataProvider.onChange.add((k=>{(null==k?void 0:k.isComplete)||this.onGoalClaimed.dispatch()})))}playAndSetupBounce(){this.parts.spineButton.playAnimation("gift-bounce",!1,!0),this._bounceTimeout=window.setTimeout(this.playAndSetupBounce.bind(this),Qe.o.integerInRange(Uc.BOUNCE_ANIMATION_REFRESH_MIN_MS,Uc.BOUNCE_ANIMATION_REFRESH_MAX_MS))}playInitialAnimations(){this.parts.progress.setValue(1,!1),this.parts.spineButton.playAnimation("idle-complete-gift",!0),this.parts.spineButtonBacking.GameObject.active=!0,this.parts.spineButtonBacking.playAnimation("idle-complete-glow",!0),this._bounceTimeout=window.setTimeout(this.playAndSetupBounce.bind(this),Qe.o.integerInRange(Uc.BOUNCE_ANIMATION_REFRESH_MIN_MS,Uc.BOUNCE_ANIMATION_REFRESH_MAX_MS))}exit(){this.parts.button.GameObject.active=!1,this.parts.progress.GameObject.active=!1,this.parts.notificationIndicator.active=!1,this.parts.spineButtonBacking.GameObject.active=!1,this.disposeBounceTimeout(),super.exit()}dispose(){this.onGoalClaimed.dispose(),this.disposeBounceTimeout(),super.dispose()}disposeBounceTimeout(){j.Aq$.isDefined(this._bounceTimeout)&&(clearTimeout(this._bounceTimeout),this._bounceTimeout=null)}}Uc.BOUNCE_ANIMATION_REFRESH_MIN_MS=2e3,Uc.BOUNCE_ANIMATION_REFRESH_MAX_MS=5e3;let Fc=class extends j.uAl{constructor(){super(...arguments),this._states=[],this._current=null,this._bindings=[]}create(){super.create(),this._noGoalButton.GameObject.active=!1,this._goalDetailButton.GameObject.active=!1,this._notificationIndicator.active=!1,this._goalProgress.GameObject.active=!1;const k=tt.q.instance.prodigy.gameContainer,B=k.get(Pc.Y),U=k.get("e20-0fb0"),F={dataProvider:B,button:this._noGoalButton,progress:this._goalProgress,notificationIndicator:this._notificationIndicator,spineButton:this._buttonSpine,spineButtonBacking:this._buttonSpineBacking},G={dataProvider:B,button:this._goalDetailButton,progress:this._goalProgress,notificationIndicator:this._notificationIndicator,spineButton:this._buttonSpine,spineButtonBacking:this._buttonSpineBacking};this._buttonSpineBacking.GameObject.active=!1;const j=new Nc(F),$=new kc(F),H=new Bc(G),V=new Uc(G);this._states.push(j,$,H,V);const W=()=>this.setState((()=>{if(!U.hasParentLinkedEmail())return j;const k=B.goal;return k?k.isComplete?V:H:$})());this._bindings.push($.onGoalAcquired.add(W),H.onGoalCompleted.add(W),V.onGoalClaimed.add(W)),B.refresh();tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:us.B.ParentGoalsTracker,interfaceType:ui.Wm.Menu,originType:ui.$N.AutoSurfaced,eventName:"interface_opened"}),W()}destroy(){for(const k of this._bindings)k.destroy();for(const k of this._states)k.dispose();super.destroy()}setState(k){var B;if(!k)throw new Error("Cannot transition to null state");null===(B=this._current)||void 0===B||B.exit(),this._current=k,this._current.enter()}};(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Fc.prototype,"_noGoalButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Fc.prototype,"_goalDetailButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Fc.prototype,"_notificationIndicator",void 0),(0,G.Cg)([(0,j.MnK)(ys.z),(0,G.Sn)("design:type",ys.z)],Fc.prototype,"_goalProgress",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],Fc.prototype,"_buttonSpine",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],Fc.prototype,"_buttonSpineBacking",void 0),Fc=(0,G.Cg)([(0,j.EVk)("ParentGoalTracker",W.Y.ui)],Fc);var Gc=U(46168),jc=U(16815),$c=U(8770);const Hc=Object.assign(Object.assign({},$c.Hh),{Unequipped:16774111}),Vc={[io.E.Legendary]:16777215,[io.E.Heroic]:16777215,[io.E.Rare]:16777215,[io.E.Uncommon]:16777215,[io.E.Common]:16777215,Unequipped:14732719};let Wc=class extends j.uAl{get creatureData(){var k,B,U,F;return null!==(k=this._creatureData)&&void 0!==k?k:this._parentCard instanceof jc.Z?null===(B=this._parentCard)||void 0===B?void 0:B.displayedCreature:null===(F=null===(U=this._parentCard)||void 0===U?void 0:U.creatureData)||void 0===F?void 0:F[0]}set creatureData(k){this._creatureData=k,this.isCreated&&this.onUpdateCard()}constructor(){super(),this._parentCard=null,this._kennel=this._playerData.player.kennel}create(){var k;super.create(),this.gameObject.active=!1,this._parentCard=this.GameObject.findComponentInParent(Gc.Q)||this.GameObject.findComponentInParent(jc.Z),null===(k=this._parentCard)||void 0===k||k.onUpdateDisplay.add(this.onUpdateCard.bind(this)),!this._parentCard&&this.creatureData&&this.onUpdateCard()}onUpdateCard(){var k,B,U;if(null===(k=this._parentCard)||void 0===k?void 0:k.containsPlayer)return void(this.gameObject.active=!1);if(!this.hasPetGearAvailable())return void(this.gameObject.active=!1);this.gameObject.active=!0;const F=this.creatureData;this.applyGearToIndicator(null===(B=null==F?void 0:F.gear)||void 0===B?void 0:B.petHat,this._indicatorHat),this.applyGearToIndicator(null===(U=null==F?void 0:F.gear)||void 0===U?void 0:U.petRelic,this._indicatorRelic)}fetchGearInfo(k,B){tt.q.instance.prodigy.gameContainer.get("d69-defe").getPetGearByUniqueId(k).then(B).catch((k=>{j.VyI.log(`[PetGearEquipStatusIndicator] Error setting indicator ${JSON.stringify(k)}`,j.$bb.Error)}))}hasPetGearAvailable(){const k=this.creatureData,B=this._kennel.petCanEquipGearType(k.ID,"petHat"),U=this._kennel.petCanEquipGearType(k.ID,"petRelic");return B||U}setIndicator(k,B){const U=k.findChildByName("Background"),F=k.findChildByName("Icon"),G=U.findComponent(j.vYh),$=F.findComponent(j.vYh),H=()=>G.tint=Hc[B],V=()=>$.tint=Vc[B];G.isCreated?H():G.onRootContainerSet.addOnce(H),$.isCreated?V():$.onRootContainerSet.addOnce(V)}applyGearToIndicator(k,B){this.setIndicator(B,"Unequipped"),k&&this.fetchGearInfo(k,(k=>{const U=Yt.t.getItem(k.data.asset.type,k.data.asset.id);this.setIndicator(B,U.data.rarity)}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Wc.prototype,"_playerData",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Wc.prototype,"_indicatorHat",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Wc.prototype,"_indicatorRelic",void 0),Wc=(0,G.Cg)([(0,j.EVk)("PetGearEquipStatusIndicator",W.Y.uiPetGear),(0,G.Sn)("design:paramtypes",[])],Wc);U(52382),U(9195);var qc=U(95913);const Kc={petHat:"PETGEAR_CATEGORY_PET_HAT",petRelic:"PETGEAR_CATEGORY_PET_RELIC"},zc={hp:"PETGEAR_BONUS_HP",power:"PETGEAR_BONUS_POWER",defence:"PETGEAR_BONUS_DEFENCE",speed:"PETGEAR_BONUS_SPEED"};let Yc=class extends Fi.z{constructor(){super(...arguments),this.onSelect=new j.HN0}create(){super.create(),this._bindOnCreate&&this.bindContext()}destroy(){this.onSelect.dispose(),this.unbindContext(),super.destroy()}bindContext(){var k,B,U,F;const G=this._context.Container.get(hs._R.PetGearItemData);if(!j.Aq$.isDefined(G))return void this.clearInfo();const $=Yt.t.getItem(G.data.asset.type,G.data.asset.id),H=null!==(B=null===(k=$.data)||void 0===k?void 0:k.rarity)&&void 0!==B?B:io.E.Common;let V;this._context.Container.rebind(hs._R.PetGearItemName).toConstantValue(Qt.J.getLocalizationNameKey($)),this._context.Container.rebind(hs._R.PetGearFlavourText).toConstantValue(Qt.J.getLocalizationFlavorKey($)),this._context.Container.rebind(hs._R.PetGearItemRarityLabel).toConstantValue(Qt.J.convertRarityToText(H)),this._context.Container.rebind(hs._R.PetGearItemRarity).toConstantValue(H),this._context.Container.rebind(hs._R.PetGearCategoryLabel).toConstantValue(Kc[G.data.asset.type]);let W=0;if(Object.entries(null!==(F=null===(U=$.data)||void 0===U?void 0:U.stats)&&void 0!==F?F:{}).forEach((([k,B])=>{B>W&&(W=B,V=k)})),V){this._context.Container.rebind(hs._R.PetGearBonusStatEnabled).toConstantValue(!0);const k=Yt.t.getItem("pet",this._petData.ID),B=eo.P8.getPetChargedLevelCumulative(this._petData),U=eo.P8.getBattleStats(k,B,this._petData.uniqueID);this._context.Container.rebind(hs._R.PetGearBonusStatAppliedAmount).toConstantValue(U[V]),this._context.Container.rebind(hs._R.PetGearBonusStatIcon).toConstantValue([Ve._.Ui_postbattle_json,qc.BV[V]]),this._context.Container.rebind(hs._R.PetGearBonusStatTextKey).toConstantValue(zc[V]),this._context.Container.rebind(hs._R.PetGearBonusStatAmountText).toConstantValue(`+${W}`)}else this._context.Container.rebind(hs._R.PetGearBonusStatEnabled).toConstantValue(!1);this.gameObject.findComponentsInChildren(Lo.B).forEach((k=>k.consume())),this.onSelect.dispatch(!0)}unbindContext(){this._context.Container.rebind(hs._R.PetGearFlavourText).toConstantValue(null),this._context.Container.rebind(hs._R.PetGearItemRarityLabel).toConstantValue(null),this._context.Container.rebind(hs._R.PetGearItemRarity).toConstantValue(null),this._context.Container.rebind(hs._R.PetGearCategoryLabel).toConstantValue(null),this._context.Container.rebind(hs._R.PetGearBonusStatEnabled).toConstantValue(!0),this._context.Container.rebind(hs._R.PetGearBonusStatAppliedAmount).toConstantValue(null),this._context.Container.rebind(hs._R.PetGearBonusStatIcon).toConstantValue(null),this._context.Container.rebind(hs._R.PetGearBonusStatTextKey).toConstantValue(null),this._context.Container.rebind(hs._R.PetGearBonusStatAmountText).toConstantValue(null),this.gameObject.findComponentsInChildren(Lo.B).forEach((k=>k.consume())),this.gameObject.active=!1}setGearItem(k){j.Aq$.isDefined(k)?(this._context.Container.rebind(hs._R.PetGearItemData).toConstantValue(k),this.bindContext()):this.clearInfo()}clearInfo(){this._context.Container.rebind(hs._R.PetGearItemName).toConstantValue("PETGEAR_NO_GEAR_SELECTED"),this._context.Container.rebind(hs._R.PetGearFlavourText).toConstantValue("PETGEAR_SELECT_GEAR_ON_RIGHT"),this.gameObject.findComponentsInChildren(Lo.B).forEach((k=>k.consume())),this.onSelect.dispatch(!1)}};(0,G.Cg)([(0,j.Cdj)(hs.hi.PetCreatureData),(0,G.Sn)("design:type",Object)],Yc.prototype,"_petData",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Yc.prototype,"_bindOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Yc.prototype,"onSelect",void 0),Yc=(0,G.Cg)([(0,j.EVk)("PetGearItemInfoDataProvider",W.Y.uiPet)],Yc);var Qc=U(10674);let Xc=class extends Fi.z{constructor(){super(...arguments),this._equippedGear={petRelic:null,petHat:null},this._previewGear={petRelic:null,petHat:null}}create(){super.create(),this._bindOnCreate&&this.bindContext()}destroy(){this.unbindContext(),super.destroy()}bindContext(){if(this._context.Container.rebind(hs.hi.YourPetPanelPetId).toConstantValue(this._petData.ID),j.Aq$.isDefined(this._petData.team)){const k=this._loggedInPlayer.getChargedLevel();this._context.Container.rebind(Jn.E.ChargedCreatureEffectTier).toConstantValue(Un.e.getChargedLevelTierFromLevel(k)),this._context.Container.rebind(Jn.E.ChargedCreatureEffectDisplayType).toConstantValue(k>0?Fn.X$.IDLE:Fn.X$.HIDDEN)}this.updateEquippedPetGearData().then((()=>{var k,B;this._context.Container.rebind(hs._R.PetGearPreviewLoadout).toConstantValue({petHat:null!==(k=this._previewGear.petHat)&&void 0!==k?k:this._equippedGear.petHat,petRelic:null!==(B=this._previewGear.petRelic)&&void 0!==B?B:this._equippedGear.petRelic}),this.invokeInjectionComponentsInChildren()})).catch((k=>{j.RQr.createHandler("[PetGearPetPreviewDataProviderComponent] Could not update equipped pet gear data")}))}invokeInjectionComponentsInChildren(){this.gameObject.findComponentsInChildren(Lo.B,!1).forEach((k=>k.consume()))}updateEquippedPetGearData(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F;(null===(k=this._petData.gear)||void 0===k?void 0:k.petHat)?this._equippedGear.petHat=(yield this._gearInventoryManager.getPetGearByUniqueId(null===(B=this._petData.gear)||void 0===B?void 0:B.petHat)).uuid:this._equippedGear.petHat=null,(null===(U=this._petData.gear)||void 0===U?void 0:U.petRelic)?this._equippedGear.petRelic=(yield this._gearInventoryManager.getPetGearByUniqueId(null===(F=this._petData.gear)||void 0===F?void 0:F.petRelic)).uuid:this._equippedGear.petRelic=null}))}unbindContext(){this._context.Container.rebind(hs.hi.YourPetPanelPetId).toConstantValue(null),this._context.Container.rebind(Jn.E.ChargedCreatureEffectTier).toConstantValue(null),this._context.Container.rebind(Jn.E.ChargedCreatureEffectDisplayType).toConstantValue(null),this._context.Container.rebind(hs._R.PetGearPreviewLoadout).toConstantValue(null),this.invokeInjectionComponentsInChildren()}setGearPreviewItem(k){j.Aq$.isDefined(k)?this._previewGear[k.data.asset.type]!==k.uuid&&(this._previewGear[k.data.asset.type]=k.uuid,this.bindContext()):this.clearGearPreviewItems()}clearGearPreviewItems(){this._previewGear.petRelic=null,this._previewGear.petHat=null,this.bindContext()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Xc.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("d69-defe"),(0,G.Sn)("design:type",Qc.q)],Xc.prototype,"_gearInventoryManager",void 0),(0,G.Cg)([(0,j.Cdj)(hs.hi.PetCreatureData),(0,G.Sn)("design:type",Object)],Xc.prototype,"_petData",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Xc.prototype,"_bindOnCreate",void 0),Xc=(0,G.Cg)([(0,j.EVk)("PetGearPetPreviewDataProvider",W.Y.uiPet)],Xc);U(91020);const Zc=Object.assign(Object.assign({},$c.Hh),{Unequipped:16777215});let Jc=class extends j.uAl{get creatureData(){return this._creatureData}set creatureData(k){this._creatureData=k,this.isCreated&&this.onUpdateCard()}constructor(){super(),this._kennel=this._playerData.player.kennel}create(){super.create(),this.gameObject.active=!1,this.creatureData&&this.onUpdateCard()}onUpdateCard(){var k,B;if(!this.hasPetGearAvailable())return void(this.gameObject.active=!1);this.gameObject.active=!0;const U=this.creatureData;this.applyGearToIndicator(null===(k=null==U?void 0:U.gear)||void 0===k?void 0:k.petHat,this._indicatorHat),this.applyGearToIndicator(null===(B=null==U?void 0:U.gear)||void 0===B?void 0:B.petRelic,this._indicatorRelic)}fetchGearInfo(k,B){tt.q.instance.prodigy.gameContainer.get("d69-defe").getPetGearByUniqueId(k).then(B).catch((k=>{j.VyI.log(`[PetGearEquipStatusIndicator] Error setting indicator ${JSON.stringify(k)}`,j.$bb.Error)}))}hasPetGearAvailable(){const k=this.creatureData,B=this._kennel.petCanEquipGearType(k.ID,"petHat"),U=this._kennel.petCanEquipGearType(k.ID,"petRelic");return B||U}setIndicator(k,B){const U="Unequipped"!==B,F={[hs.Wg.IconEnabled]:U,[hs.Wg.BackgroundEnabled]:!U,[hs.Wg.RarityTint]:Zc[B]};Nt.d.updateInjectedValues(k,F)}applyGearToIndicator(k,B){k?this.fetchGearInfo(k,(k=>{const U=Yt.t.getItem(k.data.asset.type,k.data.asset.id);this.setIndicator(B,U.data.rarity)})):this.setIndicator(B,"Unequipped")}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Jc.prototype,"_playerData",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Jc.prototype,"_indicatorHat",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Jc.prototype,"_indicatorRelic",void 0),Jc=(0,G.Cg)([(0,j.EVk)("PetGearSimpleEquipStatusIndicator",W.Y.uiPetGear),(0,G.Sn)("design:paramtypes",[])],Jc);var td=U(72772);let ed=class extends j.uAl{constructor(){super(...arguments),this.runOnCreate=!0,this.onShouldPlayTutorial=new j.HN0,this.onShouldNotPlayTutorial=new j.HN0}postCreate(){super.postCreate(),this.runOnCreate&&this.run()}run(){td.I.shouldShowPetGearTutorial().then((k=>{k?this.onShouldPlayTutorial.dispatch():this.onShouldNotPlayTutorial.dispatch()})).catch(j.RQr.createHandler("Error determining pet gear FTUE status."))}destroy(){this.onShouldPlayTutorial.dispose(),this.onShouldNotPlayTutorial.dispose(),super.destroy()}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ed.prototype,"runOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ed.prototype,"onShouldPlayTutorial",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ed.prototype,"onShouldNotPlayTutorial",void 0),ed=(0,G.Cg)([(0,j.EVk)("PetGearTutorialGuard",W.Y.uiPetGear,"Used to initiate the pet-gear FTUE sequence")],ed);let id=class extends j.uAl{constructor(){super(...arguments),this._injectionConsumes=[],this.onGearMenuLoading=new j.HN0,this.onGearMenuOpen=new j.HN0,this.onGearMenuClosed=new j.HN0}create(){var k,B,U,G,j;super.create(),this._petHatSlotContainer=this._context.Container.get("PetHatSlotContainer"),this._petRelicSlotContainer=this._context.Container.get("PetRelicSlotContainer"),null===(B=null===(k=this._petHatSlotContainer)||void 0===k?void 0:k.GameObject.findComponentInChildren(F.$))||void 0===B||B.onEnabledClick.add((()=>this.openGearMenu("petHat"))),null===(G=null===(U=this._petRelicSlotContainer)||void 0===U?void 0:U.GameObject.findComponentInChildren(F.$))||void 0===G||G.onEnabledClick.add((()=>this.openGearMenu("petRelic"))),this._injectionConsumes=null===(j=this.gameObject)||void 0===j?void 0:j.findComponentsInChildren(Lo.B,!1)}openGearMenu(k){const B=tt.q.instance.prodigy.open.yourPetGear(this._creatureDataSchema,k);B&&(this.onGearMenuLoading.dispatch(),B.onGearMenuOpen.add((()=>{this.onGearMenuOpen.dispatch()})),B.onGearMenuClosed.add((()=>{this.onGearMenuClosed.dispatch()})))}resolvePetGear(){var k;this._petItem=Yt.t.getItem("pet",this._creatureDataSchema.ID),this._canWearPetGear=(null===(k=this._petItem.data.gearEquipSlots)||void 0===k?void 0:k.length)>0,this.setGearEnabledState(),this._canWearPetGear&&this.bindPetGear().catch((()=>{j.RQr.createHandler("Failed to bind pet gear to the widget")})).finally((()=>{this.consumeInjections()}))}setGearEnabledState(){const k={[hs.hi.YourPetPanelPetGearShowGearPanel]:this._canWearPetGear,[hs.hi.YourPetPanelPetGearSlotsDisabled]:!this._canWearPetGear};Nt.d.updateInjectedValues(this.gameObject,k)}bindPetGear(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;const U=yield this._gearManager.getPetGearByUniqueId(null===(k=this._creatureDataSchema.gear)||void 0===k?void 0:k.petHat),F=yield this._gearManager.getPetGearByUniqueId(null===(B=this._creatureDataSchema.gear)||void 0===B?void 0:B.petRelic);this._petHatSlotContainer.Container.rebind("PetGearSlotData").toConstantValue(null!=U?U:{}),this._petRelicSlotContainer.Container.rebind("PetGearSlotData").toConstantValue(null!=F?F:{})}))}consumeInjections(){this._injectionConsumes.forEach((k=>k.consume()))}destroy(){this.onGearMenuLoading.dispose(),this.onGearMenuOpen.dispose(),this.onGearMenuClosed.dispose(),super.destroy()}};(0,G.Cg)([(0,Gi.b)("d69-defe"),(0,G.Sn)("design:type",Qc.q)],id.prototype,"_gearManager",void 0),(0,G.Cg)([(0,j.Pqz)(j.bE_),(0,G.Sn)("design:type",j.bE_)],id.prototype,"_context",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],id.prototype,"onGearMenuLoading",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],id.prototype,"onGearMenuOpen",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],id.prototype,"onGearMenuClosed",void 0),id=(0,G.Cg)([(0,j.EVk)("PetGearWidget",W.Y.uiPet)],id);var sd=U(41935),nd=(U(16383),U(58268)),ad=U(94596);let rd=class extends ad.b{initialize(){super.initialize();const k=new nd.N;k.desaturate(),this._filterList.push(k)}};rd=(0,G.Cg)([(0,j.EVk)("GreyscaleFilter",W.Y.effect)],rd);var od=U(67818);let hd=class extends j.uAl{setup(k,B){this._itemIcon.setItemID(k.ID),this._overlay.active=!B,B?(this._stateIcon.updateAsset(Ve._.Ui_raster_icons_json,"icon-medium-checkmark"),this._greyscaleFilter.removeFilter()):(this._stateIcon.updateAsset(Ve._.Ui_hard_currency_json,"icon-currency-27-small"),this._greyscaleFilter.applyFilter(),this._overlayTween.playAnimation())}};(0,G.Cg)([(0,j.MnK)(od.i),(0,G.Sn)("design:type",od.i)],hd.prototype,"_itemIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],hd.prototype,"_stateIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.bTj),(0,G.Sn)("design:type",j.bTj)],hd.prototype,"_overlayTween",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],hd.prototype,"_overlay",void 0),(0,G.Cg)([(0,j.MnK)(rd),(0,G.Sn)("design:type",rd)],hd.prototype,"_greyscaleFilter",void 0),hd=(0,G.Cg)([(0,j.EVk)("MergeIngredient")],hd);var cd=U(12472);let dd=class extends j.uAl{setup(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=!1){const U=Yt.t.getItem("pet",k.ID),F=cd.r.getMergeIngredientInfo(k),G=F.requiredIngredientsCount,j=eo.P8.getRequiredPetMergeIngredient(U,F.mergeRecipe);this.missingIngredientCount=B?0:G-F.validPetIngredientCount,this.ingredientCount=G,yield this._prefabLoader.preloadFromGUIDWithDependencies(this._ingredientPrefab);for(let $=0;${k.GameObject.active=!1})),this.onLoadingFinished.addOnce((()=>{this.sendInterfaceOpenedEvent(),ud.E.recordDefeatedPetsFunnelStep(eh.l.DynamicStoreLostPetsMain)}),this),this.getStoreAndQuestData().catch(j.RQr.createHandler("LostPetsModalControllerComponent: Failed to get store and quest data"))}getStoreAndQuestData(){return(0,G.sH)(this,void 0,void 0,(function*(){let k=this.getInjectedValue("LOST_PETS_OFFER_DATA"),B=this.getInjectedValue("LOST_PETS_RESET_TIME");if(!k||0===k.length){const U=yield this._dynamicStoreQuestManager.updateDefeatedPetOffers();B=U.resetTime,k=[...U.defeatedPetOffers].filter((k=>k.progress.status===pr.t.IN_PROGRESS))}if(!k||0===k.length)return void this.gameObject.destroy();const U=yield this._dynamicStoreDataProvider.getDynamicStoreUIData({storeKey:Dr.GA.PetShop});if(!this.gameObject)return;const{offerReadById:F}=U.expect();this.setLostPetQuests(k,F);const G=B.valueOf()-this._timeManager.getServerTimeMs();this.timerTextComponent.setCountdownTimeMS(G),this.onLoadingFinished.dispatch()}))}destroy(){this.onLoadingStarted.dispose(),this.onLoadingFinished.dispose(),super.destroy()}setLostPetQuests(k,B){var U,F;const G=(0,Br.K8)(k,B),j=G.slice(0,this._petItemCards.length);for(let $=0;${var B;return null===(B=k.getItemData().item)||void 0===B?void 0:B.ID}));k.push(Math.max(this.moreItemsCardController.count,0)),this._segment.featureCommon.sendInterfaceEvent({interfaceName:us.B.LostPetsMain,interfaceType:ui.Wm.Window,instanceType:fi.N.UI,originType:ui.$N.AutoSurfaced},{item_list:k})}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],pd.prototype,"petItemCardContainerObject",void 0),(0,G.Cg)([(0,j.MnK)(xr),(0,G.Sn)("design:type",xr)],pd.prototype,"moreItemsCardController",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],pd.prototype,"timerTextComponent",void 0),(0,G.Cg)([(0,j.MnK)(Lr.l),(0,G.Sn)("design:type",Lr.l)],pd.prototype,"_prefabModalComponent",void 0),(0,G.Cg)([(0,j.Cdj)("a03-308f"),(0,G.Sn)("design:type",Ks.V)],pd.prototype,"_timeManager",void 0),(0,G.Cg)([(0,Gi.b)("7a1-ff33"),(0,G.Sn)("design:type",bd.s)],pd.prototype,"_dynamicStoreQuestManager",void 0),(0,G.Cg)([(0,Gi.b)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],pd.prototype,"_segment",void 0),(0,G.Cg)([(0,Gi.b)("84d-05d4"),(0,G.Sn)("design:type",fd.I)],pd.prototype,"_dynamicStoreDataProvider",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],pd.prototype,"onLoadingStarted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],pd.prototype,"onLoadingFinished",void 0),pd=(0,G.Cg)([(0,j.EVk)("LostPetsModalController",void 0,"A plug-and-play controller component for the LostPetsModal.prefab. See in-code docs for more.")],pd);let vd=class extends j.uAl{constructor(){super(...arguments),this._commonElements=[],this._uncommonElements=[],this._rareElements=[],this._heroicElements=[],this._legendaryElements=[],this._textElements=[]}updateElements(k){let B,U;switch(this._commonElements.forEach((k=>{k.active=!1})),this._uncommonElements.forEach((k=>{k.active=!1})),this._rareElements.forEach((k=>{k.active=!1})),this._heroicElements.forEach((k=>{k.active=!1})),this._legendaryElements.forEach((k=>{k.active=!1})),k){case io.E.Common:default:B=this._commonElements,U=3552822;break;case io.E.Uncommon:B=this._uncommonElements,U=3552822;break;case io.E.Rare:B=this._rareElements,U=16777215;break;case io.E.Heroic:B=this._heroicElements,U=16777215;break;case io.E.Legendary:B=this._legendaryElements,U=3552822}B.forEach((k=>{k.active=!0})),this._textElements.forEach((k=>{k.fill=j.Q1f.numberToHexString(U)}))}};(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],vd.prototype,"_commonElements",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],vd.prototype,"_uncommonElements",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],vd.prototype,"_rareElements",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],vd.prototype,"_heroicElements",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],vd.prototype,"_legendaryElements",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",Array)],vd.prototype,"_textElements",void 0),vd=(0,G.Cg)([(0,j.EVk)("PetRescueMagicoinModal",W.Y.ui)],vd);let gd=class extends j.uAl{create(){super.create();tt.q.instance.prodigy.world.getCurrentZoneObject().createTopLeftNavigationButton()}};gd=(0,G.Cg)([(0,j.EVk)("PetListButton",W.Y.uiPet)],gd);U(4234);var md=U(3032);let yd=class extends j.uAl{constructor(){super(...arguments),this.onTrue=new j.HN0,this.onFalse=new j.HN0,this.onResult=new j.HN0}create(){super.create(),this._runOnCreate&&this.compare().catch(j.RQr.createHandler("CheckPlayerGoalsQuestSystemComponent create error running compare"))}destroy(){this.onTrue.dispose(),this.onFalse.dispose(),this.onResult.dispose(),super.destroy()}compare(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._loggedInPlayer.player.getQuestSystem("playerGoals"),B=this.anyOf.includes(k);(B?this.onTrue:this.onFalse).dispatch(),this.onResult.dispatch(B)}))}};(0,G.Cg)([(0,Gi.b)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],yd.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.gfw)(md.p),(0,G.Sn)("design:type",Array)],yd.prototype,"anyOf",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yd.prototype,"onTrue",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yd.prototype,"onFalse",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yd.prototype,"onResult",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],yd.prototype,"_runOnCreate",void 0),yd=(0,G.Cg)([(0,j.EVk)("CheckPlayerGoalsQuestSystem",W.Y.quest,"")],yd);var _d,Ed,wd=U(13027),Td=U(44357),Sd=U(3606);!function(k){k.HideCloseButton="HIDE_PLAYER_GOALS_CLOSE_BUTTON",k.DeliverPrize="DELIVER_PRIZE",k.HasPrize="HAS_PRIZE",k.HasNotPrize="HAS_NOT_PRIZE",k.GoalHeader="GOAL_HEADER",k.ShowAttachParentCTA="SHOW_PARENT_ATTACH_CTA",k.ShowClassCodeCTA="SHOW_CLASS_CODE_CTA",k.ShowMysteryBox="SHOW_MYSTERY_BOX",k.ReceivePrizeEvent="RECEIVE_PRIZE_EVENT",k.PrizeDescription="PRIZE_DESCRIPTION",k.PrizeImage="PRIZE_IMAGE_",k.ShowDivider="SHOW_DIVIDER",k.PrizeLayout="PRIZE_LAYOUT_",k.ClassCodeSuccess="FTUE_PLAYER_GOALS_CLASS_CODE_SUCCESS",k.ShowLoginCredentialsCTA="SHOW_LOGIN_CREDENTIALS_CTA",k.ShowProfileQuizCTA="SHOW_PROFILE_QUIZ_CTA",k.ProfileQuizBindings="PROFILE_QUIZ_BINDINGS",k.ProfileQuizComplete="PROFILE_QUIZ_COMPLETE",k.GoalFadeOut="GOAL_FADE_OUT",k.GoalFadeIn="GOAL_FADE_IN",k.GoalFadeDuration="GOAL_FADE_DURATION"}(_d||(_d={})),function(k){k.AwardsAvailable="FTUE_PLAYER_GOALS_AWARDS_AVAILABLE",k.QuestComplete="FTUE_PLAYER_GOALS_QUEST_COMPLETE",k.RightSideHudGameObject="FTUE_PLAYER_GOALS_RIGHT_SIDE_HUD_GAMEOBJECT"}(Ed||(Ed={}));var Ad=U(10551),Cd=U(44677);let Od=class extends Fi.z{constructor(){super(...arguments),this.SHOW_INTERVAL_MS=300,this.FADE_DURATION_MS=400,this.MAX_PRIZES_PER_GOAL=3,this._prizeIsBeingDelivered=!1,this._gridElements=[]}create(){var k;super.create(),null===(k=this._questManager)||void 0===k||k.onDataChanged.add(this.onQuestDataUpdated,this),this.tryBindContext()}onQuestDataUpdated(k){this._prizeIsBeingDelivered=!1;const B=Cd.p.pairedTaskByQuestEventId(k),U=this.getIndexCompletedTask(k);if(B&&-1!==U)return this._questTasks[U]=B,this.updateElement(U),this.updateContainer(),void this.animateTaskTransition(U).then((()=>{this.tryBindContext()})).catch(j.RQr.createHandler("PlayerGoalsDataProviderComponent onQuestDataUpdated animateTaskTransition"));this.tryBindContext()}getIndexCompletedTask(k){return this._questTasks.findIndex((B=>{var U,F,G,j,$,H;const V=null===(G=null===(F=null===(U=B.taskDefinition)||void 0===U?void 0:U.metadata)||void 0===F?void 0:F.goalCardData)||void 0===G?void 0:G.questEventId,W=null===(H=null===($=null===(j=B.awardTask.taskDefinition)||void 0===j?void 0:j.metadata)||void 0===$?void 0:$.goalCardData)||void 0===H?void 0:H.questEventId;return V===k||W===k}))}tryBindContext(){this.bindContext().catch(j.RQr.createHandler("[PlayerGoals] Unable to bind player goals"))}destroy(){var k;null===(k=this._questManager)||void 0===k||k.onDataChanged.remove(this.onQuestDataUpdated,this),super.destroy()}bindContext(){return(0,G.sH)(this,void 0,void 0,(function*(){this._questTasks=this._questTasks||this._questManager.surfacedTasks;for(let k=0;kthis._questManager.isPrizeReady(k)));(0,Td.QQ)(tt.q.instance.game,!B),this.updateValue(_d.HideCloseButton,B),this.updateValue(_d.ProfileQuizBindings,this.bindProfileQuiz()),this.updateValue(hs.V8.LoginDetailsUsername,this._loggedInPlayer.loginCredentials.username),this.updateValue(hs.V8.LoginDetailsPassword,this._loggedInPlayer.loginCredentials.password)}showMysteryBox(k){if(this._questManager.isAwardBlocked(k.awardTask))return!0;return this._questManager.isPrizeReady(k)||!this._questManager.isTaskComplete(k)}bindProfileQuiz(){return{[hs.V8.LoginDetailsUsername]:this._loggedInPlayer.loginCredentials.username,[hs.V8.LoginDetailsPassword]:this._loggedInPlayer.loginCredentials.password,[_d.ProfileQuizComplete]:(()=>{Ad.d.sendCompleteProfileQuizEvent().catch(j.RQr.createHandler("[PlayerGoals] Unable to send quest event for completion of profile quiz"))}).bind(this)}}animateTaskTransition(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=this._questManager.surfacedTasks;if(this._questTasks[0].taskID===B[0].taskID)return;yield rr.o.wait(1e3),yield this.fadeOutGoal(k,500);const U=this.fadeOutOthers(B),F=this.fadeInAll(B);yield Promise.all(U),yield Promise.all(F)}))}fadeOutOthers(k){var B;return!this.gameObject||(null===(B=this.gameObject)||void 0===B?void 0:B.isDestroyed)?[Promise.resolve()]:k.map(((k,B)=>(0,G.sH)(this,void 0,void 0,(function*(){const U=this.getTaskIndex(k);yield rr.o.wait(100*B),-1!==U&&(yield this.fadeOutGoal(U,450))}))))}fadeInAll(k){var B;return!this.gameObject||(null===(B=this.gameObject)||void 0===B?void 0:B.isDestroyed)?[Promise.resolve()]:k.map(((k,B)=>(0,G.sH)(this,void 0,void 0,(function*(){const U=200*(B+1),F=25*B;yield rr.o.wait(U-F),this._questTasks[B]=k,this.updateElement(B,!1),this.fadeInGoal(B,800).catch(j.RQr.createHandler("PlayerGoalsDataProviderComponent animateTaskTransition fadeInGoal"))}))))}getTaskIndex(k){return this._questTasks.findIndex((B=>k.taskID===B.taskID))}fadeOutGoal(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U;if(!this.gameObject||(null===(U=this.gameObject)||void 0===U?void 0:U.isDestroyed))return;const F=this._gridElements[k].findComponent(j.bE_);this.updateValue(_d.GoalFadeDuration,null!=B?B:this.FADE_DURATION_MS,F),this.updateValue(_d.GoalFadeOut,!0,F),yield rr.o.wait(null!=B?B:this.FADE_DURATION_MS)}))}fadeInGoal(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U;if(!this.gameObject||(null===(U=this.gameObject)||void 0===U?void 0:U.isDestroyed))return;const F=this._gridElements[k].findComponent(j.bE_);this.updateValue(_d.GoalFadeDuration,null!=B?B:this.FADE_DURATION_MS,F),this.updateValue(_d.GoalFadeIn,!0,F),yield rr.o.wait(null!=B?B:this.FADE_DURATION_MS)}))}};(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Od.prototype,"_gridElements",void 0),(0,G.Cg)([(0,j.Cdj)("d65-d7bb"),(0,G.Sn)("design:type",Sd.n)],Od.prototype,"_questManager",void 0),(0,G.Cg)([(0,Gi.b)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Od.prototype,"_loggedInPlayer",void 0),Od=(0,G.Cg)([(0,j.EVk)("PlayerGoalsDataProvider",W.Y.playerGoals)],Od);let Id=class extends Fi.z{constructor(){super(...arguments),this._bindOnPostCreate=!0}postCreate(){var k;super.postCreate(),null===(k=this._questManager)||void 0===k||k.onDataChanged.add(this.onQuestDataUpdated,this),this._bindOnPostCreate&&this.tryBindContext()}destroy(){super.destroy()}onQuestDataUpdated(){this.tryBindContext()}tryBindContext(){this.bindContext().catch(j.RQr.createHandler("[PlayerGoals] Unable to bind player goals"))}bindContext(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;if(!this.gameObject||(null===(k=this.gameObject)||void 0===k?void 0:k.isDestroyed))return;const B=Cd.p.isQuestComplete;this.updateValue(Ed.QuestComplete,B)}))}};(0,G.Cg)([(0,j.Cdj)("d65-d7bb"),(0,G.Sn)("design:type",Sd.n)],Id.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Id.prototype,"_bindOnPostCreate",void 0),Id=(0,G.Cg)([(0,j.EVk)("PlayerGoalsDataProviderHud",W.Y.playerGoals)],Id);var Dd=U(81137);let Rd=class extends j.uAl{constructor(){super(...arguments),this._playerGoalsSetup=!1}firstUpdate(){super.firstUpdate(),this.setupPlayerGoals().catch(j.RQr.createHandler("Error setting up the player goals for the player goals HUD component"))}setupPlayerGoals(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._playerGoalsSetup||Dd.x.isFeatureEnabled())return;if(this._playerGoalsSetup=!0,!j.Aq$.isDefined(this._playerGoalsHudIcon))return;const k=tt.q.instance.prodigy.gameContainer.get("d65-d7bb");yield k.sendQuestEventPromise;if(0===Cd.p.availableQuestTasks().length)return void(this._playerGoalsHudIcon.active=!1);if(k.surfacedTasks.some((B=>k.isPrizeReady(B)))){const k=new Promise((k=>tt.q.instance.game.broadcaster.addAppListener(jn.nN.PlayerGoalsPanelClosed,k,this)));yield k,tt.q.instance.game.broadcaster.removeAppListener(jn.nN.PlayerGoalsPanelClosed,this),this._playerGoalsHudIcon.active=!0}else this._playerGoalsHudIcon.active=!0}))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Rd.prototype,"_playerGoalsHudIcon",void 0),Rd=(0,G.Cg)([(0,j.EVk)("PlayerGoalsHud",W.Y.playerGoals)],Rd);let Pd=class extends j.uAl{constructor(){super(...arguments),this._playerGoalsQueuedSignal=new j.HN0,this._runOnCreate=!0}create(){super.create(),this._runOnCreate&&tt.q.instance.prodigy.notifications.queuedShowPlayerGoals&&this._playerGoalsQueuedSignal.dispatch()}destroy(){this._playerGoalsQueuedSignal.dispose(),super.destroy()}setPlayerGoalsQueued(k){tt.q.instance.prodigy.notifications.queuedShowPlayerGoals=k,k&&this._playerGoalsQueuedSignal.dispatch()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Pd.prototype,"_playerGoalsQueuedSignal",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Pd.prototype,"_runOnCreate",void 0),Pd=(0,G.Cg)([(0,j.EVk)("PlayerGoalsQueueing",W.Y.playerGoals)],Pd);let Md=class extends j.PQK{installBindings(){const k=tt.q.instance.prodigy.gameContainer;this.Container.bind(ar.QuestManager).toConstantValue(k.get("d65-d7bb"))}};Md=(0,G.Cg)([(0,j.Og1)("FtuePlayerGoalsQuestInstaller","Installer")],Md);U(55346);const Nd=new Map([[0,Rt.l.CtaTipBodyMergePet],[1,Rt.l.CtaTipBodyLevelPet],[2,Rt.l.CtaTipBodyEvolvePet]]);var xd=U(20117);let Ld=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.onAllCTAsCompleted=this.createTidySignal(),this._contentObjects=new Map}setUpTipWidget(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;if(!k.contentArgs||0===k.contentArgs.length)return;const U=[];k.contentArgs.forEach((k=>{if(this._contentObjects.has(k.type)){const{contentObject:B,completedCTA:U}=this._contentObjects.get(k.type);Nt.d.updateInjectedValues(B,xd.w5.GetInjectionValuesForCtaTipContent(k)),B.active=!1,U.setValue(!1)}else U.push(Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Nd.get(k.type),xd.w5.GetInjectionValuesForCtaTipContent(k),this._bodyContainer).then((B=>{this._contentObjects.set(k.type,{contentObject:B,completedCTA:B.findComponentInChildren(Ar.f)}),B.active=!1})).catch())})),j.Aq$.isDefined(k.startingType)?this._activeType=k.startingType:null!==(B=this._activeType)&&void 0!==B||(this._activeType=k.contentArgs[0].type),U.length>0?yield Promise.all(U).then((()=>this.setContentActive(this._activeType))).catch():this.setContentActive(this._activeType)}))}setContentActive(k){this._contentObjects.get(this._activeType).contentObject.active=!1,this._activeType=k,this._contentObjects.get(this._activeType).contentObject.active=!0}closeAllCtas(){for(const k of this._contentObjects.values()){const{contentObject:B,completedCTA:U}=k;B.active=!1,U.setValue(!0)}this.onAllCTAsCompleted.dispatch(),Nt.d.updateInjectedValues(this.gameObject,{[xd.tN.ShowCta]:!1})}closeCta(){let k=!1;this._contentObjects.get(this._activeType).completedCTA.setValue(!0);const B=this.findNextUncompletedCTAType();j.Aq$.isDefined(B)?(k=!0,this.setContentActive(B)):this.onAllCTAsCompleted.dispatch(),Nt.d.updateInjectedValues(this.gameObject,{[xd.tN.ShowCta]:k})}findNextUncompletedCTAType(){for(const[k,B]of this._contentObjects)if(!B.completedCTA.getValue())return k}};(0,G.Cg)([(0,Gi.b)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Ld.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ld.prototype,"_bodyContainer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ld.prototype,"onAllCTAsCompleted",void 0),Ld=(0,G.Cg)([(0,j.EVk)("CtaTipWidget")],Ld);U(85773),U(96217);let kd=class extends j.PQK{installBindings(){const k=tt.q.instance.prodigy.gameContainer;this.Container.bind(ar.QuestManager).toConstantValue(k.get("a71-dfcf"))}};kd=(0,G.Cg)([(0,j.Og1)("DailyLoginCalendarInstaller","Installer")],kd);let Bd=class extends j.PQK{installBindings(){const k=tt.q.instance.prodigy.gameContainer;this.Container.bind("a78-11c7").toConstantValue(k.get("123-14b6")),this.Container.bind(ar.QuestManager).toConstantValue(k.get("123-14b6"))}};Bd=(0,G.Cg)([(0,j.Og1)("FireflyForestHardZoneQuestInstaller","Installer")],Bd);let Ud=class extends j.PQK{installBindings(){const k=tt.q.instance.prodigy.gameContainer;this.Container.bind("a78-11c7").toConstantValue(k.get("985-7051")),this.Container.bind(ar.QuestManager).toConstantValue(k.get("985-7051"))}};Ud=(0,G.Cg)([(0,j.Og1)("FireflyForestZoneQuestInstaller","Installer")],Ud);let Fd=class extends j.PQK{installBindings(){const k=tt.q.instance.prodigy.gameContainer;this.Container.bind(ar.QuestManager).toConstantValue(k.get("f91-8211"))}};Fd=(0,G.Cg)([(0,j.Og1)("ZoneQuestInstaller","Installer")],Fd);let Gd=class extends En{constructor(){super(),this.maxSimultaneousPrefabs=1,this.onSpawned=new j.HN0,this._spawnCount=0,this._tag=`LimitedLoadPrefabComponent_${j.Aq$.generateGUID()}`}destroy(){this.onSpawned.dispose(),super.destroy()}load(){if(this.maxSimultaneousPrefabs>0){if(this._parent.children.filter((k=>k.hasOwnProperty(this._tag))).length>=this.maxSimultaneousPrefabs)return new j.kBN((k=>{k(null)}))}return this.maxTotalSpawns>0&&this._spawnCount>=this.maxTotalSpawns?new j.kBN((k=>{k(null)})):(this._spawnCount++,super.load().then((k=>(k&&(k[this._tag]=!0,this.onSpawned.dispatch(k)),k))))}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Gd.prototype,"maxSimultaneousPrefabs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Gd.prototype,"maxTotalSpawns",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Gd.prototype,"onSpawned",void 0),Gd=(0,G.Cg)([(0,j.EVk)("LimitedLoadPrefab",W.Y.utility,"Ensures that only a limited number of a certain prefab can be active at a time."),(0,G.Sn)("design:paramtypes",[])],Gd);class jd{static getDailyQuestState(k){const B=null!=k?k:tt.q.instance.prodigy.world.getCurrentZoneObject(),U=Qt.J.getDate(),F=B.getState("daily");if(!this.isDailyQuestState(F))return{date:U,flags:[1,1,1,1,1],rewards:0};if(F.date!==U){const k={date:U,flags:[1,1,1,1,1],rewards:F.rewards};return B.setState("daily",k),k}return F}static isDailyQuestState(k){return"object"==typeof k&&null!==k&&"date"in k&&"flags"in k&&"rewards"in k}}let $d=class extends j.uAl{constructor(){super(...arguments),this._dailyQuestItemSpawners=[],this.onDailyQuestCollected=new j.HN0,this.onAllDailyQuestsCompleted=new j.HN0,this._zone=null,this._spawnPromises=[]}get zone(){var k;return null!==(k=this._zone)&&void 0!==k?k:this._zone=tt.q.instance.prodigy.world.getCurrentZoneObject()}create(){super.create()}destroy(){for(const k of this._spawnPromises)k.cancel();this._spawnPromises.length=0,this.onDailyQuestCollected.dispose(),this.onAllDailyQuestsCompleted.dispose(),super.destroy()}getDailySpawnPointData(){const k=tt.q.instance.game.cache.getJSON(this._dailyQuestData);return k||(j.VyI.log("[DailyQuestComponent]: No spawn point data found",j.$bb.Error),null)}spawnDailyQuestItems(){var k,B;const U=this.getDailySpawnPointData();if(!U)return void j.VyI.log("[DailyQuestComponent]: No spawn point data available",j.$bb.Error);const F=null!==(B=null===(k=U.spawnPoints)||void 0===k?void 0:k[this._zoneMapTag])&&void 0!==B?B:0,G=this._dailyQuestItemSpawners.length;F===G?this.getDailySpawnPoints().forEach(((k,B)=>{var U;if(!k.collected&&k.mapTag===this._zoneMapTag){const F=this._dailyQuestItemSpawners[k.index];(null!==(U=F.GameObject.findComponent(j.bE_))&&void 0!==U?U:F.GameObject.addComponent(j.bE_)).Container.bind("ON_COLLECT_DAILY").toConstantValue((()=>{this.collectDailyQuest(B)})),this._spawnPromises.push(F.load())}})):j.VyI.log(`[DailyQuestComponent]: Mismatch between spawn point count (${F}) and spawner count (${G})`,j.$bb.Error)}getDailySpawnPoints(){const k=jd.getDailyQuestState(),B=this.getDailySpawnPointData();if(!k||!B)return j.VyI.log("[DailyQuestComponent]: Invalid daily state or spawn point data",j.$bb.Error),[];const U=new j.bsf(k.date),F=ct.flatMap(Object.entries(B.spawnPoints),(([k,B])=>Array.from({length:B},((B,U)=>({mapTag:k,index:U})))));return U.shuffle(F),F.length=Math.min(F.length,5),F.forEach(((B,U)=>{B.collected=1!==k.flags[U]})),F}getActiveDailySpawnPointsForMap(){return this.getDailySpawnPoints().filter((({mapTag:k,collected:B})=>k===this._zoneMapTag&&!B))}collectDailyQuest(k){if(!j.Aq$.isDefined(k))return void j.VyI.log("[DailyQuestComponent]: Invalid daily index",j.$bb.Error);const B=jd.getDailyQuestState();B?(B.flags[k]=0,this.zone.setState("daily",B),this.onDailyQuestCollected.dispatch(k),this.checkAllDailiesCompleted()):j.VyI.log("[DailyQuestComponent]: No daily quest state found",j.$bb.Error)}checkAllDailiesCompleted(){const k=jd.getDailyQuestState();if(!k)return!1;const B=k.flags.every((k=>0===k));return B&&this.onAllDailyQuestsCompleted.dispatch(),B}};(0,G.Cg)([(0,j.Cdj)("ZONE_MAP_TAG"),(0,G.Sn)("design:type",String)],$d.prototype,"_zoneMapTag",void 0),(0,G.Cg)([(0,j.Bak)(),(0,j.tW2)("daily"),(0,G.Sn)("design:type",String)],$d.prototype,"_dailyQuestData",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Gd),(0,G.Sn)("design:type",Array)],$d.prototype,"_dailyQuestItemSpawners",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$d.prototype,"onDailyQuestCollected",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$d.prototype,"onAllDailyQuestsCompleted",void 0),(0,G.Cg)([(k,B)=>{},(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",Array)],$d.prototype,"getDailySpawnPoints",null),$d=(0,G.Cg)([(0,j.EVk)("DailyQuest",W.Y.quest)],$d);U(52437);let Hd=class extends j.uAl{constructor(){super(...arguments),this._zoneID=Ft.A_.FOREST,this.onCreate=new j.HN0,this.onQuestStarted=new j.HN0,this.onQuestComplete=new j.HN0,this.onQuestIncomplete=new j.HN0,this.onSequenceComplete=new j.HN0,this.onSequenceIncomplete=new j.HN0,this.onCheckSequence=new j.HN0,this._zone=null}get zone(){var k;return null!==(k=this._zone)&&void 0!==k?k:this._zone=tt.q.instance.prodigy.world.getZone(this._zoneID)}create(){super.create(),this.onCreate.dispatch()}checkQuestStatus(k){var B;if(!j.Aq$.isDefined(k))return void j.VyI.log("[LegacyQuestStatusComponent]: No ID provided",j.$bb.Error);(this.zone.isQuestComplete(k)||(null===(B=this.zone.getQuestState())||void 0===B?void 0:B.ID)>k?this.onQuestComplete:this.onQuestIncomplete).dispatch()}checkQuestSequenceStatus(k,B){var U;if(!j.Aq$.isDefined(k)||!j.Aq$.isDefined(B))return void j.VyI.log("[LegacyQuestStatusComponent]: No ID(s) provided",j.$bb.Error);(this.zone.isSequenceComplete(k,B)||(null===(U=this.zone.getQuestState())||void 0===U?void 0:U.ID)>k?this.onSequenceComplete:this.onSequenceIncomplete).dispatch(B)}checkCurrentQuestSequenceStatus(k){var B;(null===(B=this.zone.getQuestState())||void 0===B?void 0:B.ID)===k&&this.onCheckSequence.dispatch(this.zone.getQuestState().seq)}checkQuestStarted(k,B){(j.Aq$.isDefined(B)?this.zone.isOnQuest(k)&&!this.zone.isSequenceComplete(k,B):this.zone.isOnQuest(k))&&this.onQuestStarted.dispatch()}setQuestComplete(k){if(!j.Aq$.isDefined(k))return void j.VyI.log("[LegacyQuestStatusComponent]: No ID provided",j.$bb.Error);this.zone.completeQuest(k);const B=tt.q.instance.game.state.get(Tt.G.TileScreen);B?B.process():j.VyI.log(`[LegacyQuestStatusComponent]: TileScreen not found during complete of Quest ${k}`,j.$bb.Error)}setQuestSequenceComplete(k,B){if(j.Aq$.isDefined(k)&&j.Aq$.isDefined(B)){if(this.zone.completeSequence(k,B),!this._isPrefabMap){const U=tt.q.instance.game.state.get(Tt.G.TileScreen);U?U.process():j.VyI.log(`[LegacyQuestStatusComponent]: TileScreen not found during complete of Quest ${k} Seq ${B}`,j.$bb.Error)}}else j.VyI.log("[LegacyQuestStatusComponent]: No ID(s) provided",j.$bb.Error)}destroy(){this.onCreate.dispose(),this.onCheckSequence.dispose(),this.onSequenceComplete.dispose(),this.onSequenceIncomplete.dispose(),this.onQuestStarted.dispose(),this.onQuestComplete.dispose(),this.onQuestIncomplete.dispose(),super.destroy()}};(0,G.Cg)([(0,j.gfw)(Ft.A_),(0,G.Sn)("design:type",String)],Hd.prototype,"_zoneID",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hd.prototype,"onCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hd.prototype,"onQuestStarted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hd.prototype,"onQuestComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hd.prototype,"onQuestIncomplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hd.prototype,"onSequenceComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hd.prototype,"onSequenceIncomplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hd.prototype,"onCheckSequence",void 0),(0,G.Cg)([(0,j.Cdj)("IS_PREFAB_MAP"),Do(),(0,G.Sn)("design:type",Boolean)],Hd.prototype,"_isPrefabMap",void 0),Hd=(0,G.Cg)([(0,j.EVk)("LegacyQuestStatus",W.Y.quest)],Hd);var Vd=U(25308);let Wd=class extends j.uAl{constructor(){super(...arguments),this._onEncounterComplete=new j.HN0,this._onPostBattleVictory=new j.HN0}create(){super.create(),this._currentZone=tt.q.instance.prodigy.world.getCurrentZoneObject()}startEncounter(){const k=this.getCutsceneAssetID(),B=this.getEncounterAssetID();B&&k?tt.q.instance.prodigy.prefabFactory.createPippetQuestEncounter(this._currentZone,k,B,(()=>this._onPostBattleVictory.dispatch()),(()=>this._onEncounterComplete.dispatch())).catch(j.RQr.createHandler(`Could not load the Pippet Encounter from guid: ${this.getEncounterAssetID()}`)):j.VyI.log(`Encounter or cutscene asset ID not defined for zone: ${this._currentZone.ID}`,j.$bb.Error)}getCutsceneAssetID(){switch(this._currentZone.ID){case Ft.A_.SHIVERCHILL:case Ft.A_.SHIVERCHILLHARD:return 202;case Ft.A_.BONFIRE:case Ft.A_.BONFIREHARD:return 204;case Ft.A_.SHIPWRECK:case Ft.A_.SHIPWRECKHARD:return 205;case Ft.A_.SKYWATCH:case Ft.A_.SKYWATCHHARD:return 206;default:return j.VyI.log(`Pippet quest encounter cutscene not defined for zone: ${this._currentZone.ID}`,j.$bb.Error),null}}getEncounterAssetID(){switch(this._currentZone.ID){case Ft.A_.SHIVERCHILL:return Vd.e.Shiverchill_quests_encounter;case Ft.A_.SHIVERCHILLHARD:return Vd.e.Shiverchill_hard_quests_encounter;case Ft.A_.BONFIRE:return Vd.e.Bonfire_spire_quests_encounter;case Ft.A_.BONFIREHARD:return Vd.e.Bonfire_spire_hard_quests_encounter;case Ft.A_.SHIPWRECK:return Vd.e.Shipwreck_quests_encounter;case Ft.A_.SHIPWRECKHARD:return Vd.e.Shipwreck_hard_quests_encounter;case Ft.A_.SKYWATCH:return Vd.e.Skywatch_quests_encounter;case Ft.A_.SKYWATCHHARD:return Vd.e.Skywatch_hard_quests_encounter;default:return j.VyI.log(`Pippet quest encounter not defined for zone: ${this._currentZone.ID}`,j.$bb.Error),null}}destroy(){this._onEncounterComplete.dispose(),this._onPostBattleVictory.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wd.prototype,"_onEncounterComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wd.prototype,"_onPostBattleVictory",void 0),Wd=(0,G.Cg)([(0,j.EVk)("PippetQuestEncounter",W.Y.quest)],Wd);var qd=U(79368);let Kd=class extends j.uAl{sendEvent(){this._buttonID&&""!==this._buttonID?this._questManager.sendQuestEvent(Wr.T.BUTTON_CLICK,{id:this._buttonID}).catch(j.RQr.createHandler("An error occurred while sending the button click event")):j.VyI.log("QuestButtonEventComponent attempted to send event with empty button id",j.$bb.Error)}};(0,G.Cg)([(0,j.Cdj)(ar.QuestManager),(0,G.Sn)("design:type",qd.k)],Kd.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Kd.prototype,"_buttonID",void 0),Kd=(0,G.Cg)([(0,j.EVk)("QuestButtonEvent",W.Y.ultimates)],Kd);var zd=U(91323),Yd=U(7247);let Qd=class extends j.uAl{constructor(){super(...arguments),this.onQuestTaskStart=new j.HN0,this.onQuestTaskComplete=new j.HN0,this.onQuestObjectiveChange=new j.HN0}getTag(){return this.tag}create(){var k;super.create(),this.localZoneQuestManager?(this.localZoneQuestManager.onQuestTaskStart.add((k=>{this.onQuestTaskStart.dispatch(k),this.setQuestObjective(k),this.addGuideHands().catch(j.RQr.createHandler("Failed to add guide hands"))}),this),this.localZoneQuestManager.onQuestTaskComplete.add((k=>{var B;this.onQuestTaskComplete.dispatch(k),(null===(B=k.metadata)||void 0===B?void 0:B.parentCompleted)&&this.onQuestObjectiveChange.dispatch("")}),this),this.localZoneQuestManager.getTasksInProgress().then((k=>{0!==k.length?this.setQuestObjective(k[0].taskDefinition):j.VyI.log("No tasks in progress",j.$bb.Verbose)})).catch(j.RQr.createHandler("Failed to get tasks in progress")),this.addGuideHands().catch(j.RQr.createHandler("Failed to add guide hands")),this.tag=null===(k=this._zoneMapTag)||void 0===k?void 0:k.split("-")[1]):j.VyI.log("No local zone quest manager found on quest manager component",j.$bb.Warning)}destroy(){var k,B;this.localZoneQuestManager&&(null===(k=this.localZoneQuestManager.onQuestTaskStart)||void 0===k||k.removeAll(this),null===(B=this.localZoneQuestManager.onQuestTaskComplete)||void 0===B||B.removeAll(this)),this.onQuestTaskStart.dispose(),this.onQuestTaskComplete.dispose(),this.onQuestObjectiveChange.dispose(),super.destroy()}setQuestObjective(k){var B,U,F,G,$,H,V,W;if(k.localizationKey)this.onQuestObjectiveChange.dispatch(this._localizer.getText(k.localizationKey));else if(k.completionRequirements.type===Wr.T.DEFEAT_ENCOUNTER||k.completionRequirements.type===Wr.T.DEFEAT_QUEST_ENCOUNTER){const F=null!==(B=tt.q.instance.prodigy.world.getCurrentZoneObject().getQuestState())&&void 0!==B?B:{},G=j.Aq$.isDefined(F.req)?F.req.N:null!==(U=k.completionRequirements.data.target)&&void 0!==U?U:1,$=k.completionRequirements.data.id;let H;if(H=It.O.isEnglishLocale()?`Defeat ${G} ${(0,zd.t)("Monster",G)}`:G>1?this._localizer.getText("DEFEAT_N_MONSTERS",G):this._localizer.getText("DEFEAT_1_MONSTER"),j.Aq$.isDefined($)){const k=Yt.t.getItem("pet",$);if(k){const B=eo.P8.getPetDisplayName(k,k);H=It.O.isEnglishLocale()?`Defeat ${G} ${(0,zd.t)(B,G)}`:this._localizer.getText("DEFEAT_N_NAMED_MONSTERS",G,B)}}this.onQuestObjectiveChange.dispatch(H)}else if(k.completionRequirements.type===Wr.T.COLLECT_ITEM){const B=k.completionRequirements.data.type,U=Number(k.completionRequirements.data.id);this.updateWithItemAmountRemaining(B,U,null!==(F=k.completionRequirements.data.target)&&void 0!==F?F:1)}else if(k.completionRequirements.type===Wr.T.RECEIVE_ITEM&&(null===(G=k.completionRequirements)||void 0===G?void 0:G.conditions)){const B=k.completionRequirements.conditions.find((k=>k.type===Yd.i.ITEM_RESTRICTIONS));if(null==B?void 0:B.data){const U=B.data,F=null===($=U.types)||void 0===$?void 0:$[0],G=Number(null===(H=U.ids)||void 0===H?void 0:H[0]),q=null!==(V=tt.q.instance.prodigy.world.getCurrentZoneObject().getQuestState())&&void 0!==V?V:{},K=j.Aq$.isDefined(q.req)?q.req.N:null!==(W=k.completionRequirements.data.target)&&void 0!==W?W:1;return void this.updateWithItemProgressRemaining(F,G,K)}j.VyI.log("[QuestManagerComponent] ReceiveItem task type expects a condition of type ItemRestrictions, but none was found",j.$bb.Warning),this.onQuestObjectiveChange.dispatch(void 0)}else this.onQuestObjectiveChange.dispatch(void 0)}updateWithItemProgressRemaining(k,B,U){const F=Yt.t.getItem(k,B);let G;G=It.O.isEnglishLocale()?`Collect ${U} ${(0,zd.t)(null==F?void 0:F.name,U)}`:this._localizer.getText("COLLECT_N_ITEMS",U,null==F?void 0:F.name),this.onQuestObjectiveChange.dispatch(G)}updateWithItemAmountRemaining(k,B,U){const F=Yt.t.getItem(k,B),G=U-tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem(k,B);let j;j=It.O.isEnglishLocale()?`Collect ${G} ${(0,zd.t)(F.name,G)}`:this._localizer.getText("COLLECT_N_ITEMS",G,null==F?void 0:F.name),this.onQuestObjectiveChange.dispatch(j)}addGuideHands(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=mc.P.findSceneTeleportTriggers();if(!k.length)return;const B=yield this.localZoneQuestManager.getTasksInProgress(),U=ct.uniq(ct.flatMap(B,(k=>{var B,U;return null!==(U=null===(B=k.taskDefinition.metadata)||void 0===B?void 0:B.locations)&&void 0!==U?U:[]}))),F=mc.P.getTargetMapsFromLocations(U),G=mc.P.findShortestPathsToAllOf(this._zoneMapTag,F);if(G.length>0){G.sort(((k,B)=>k.length-B.length));const B=G[0],U=B.length>1?B[1]:"";mc.P.manageTeleportTriggerGuideHands(U,k)}}))}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Qd.prototype,"onQuestTaskStart",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Qd.prototype,"onQuestTaskComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Qd.prototype,"onQuestObjectiveChange",void 0),(0,G.Cg)([(0,j.Cdj)("a78-11c7"),(0,G.Sn)("design:type",co.B)],Qd.prototype,"localZoneQuestManager",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Qd.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_MAP_TAG"),(0,G.Sn)("design:type",String)],Qd.prototype,"_zoneMapTag",void 0),Qd=(0,G.Cg)([(0,j.EVk)("QuestManager",W.Y.quest)],Qd);var Xd=U(85604);const Zd={[Xd.y.Flora]:39,[Xd.y.Bok]:0,[Xd.y.Slurpy]:0,[Xd.y.Eve]:45,[Xd.y.Broccolina]:2,[Xd.y.Benni]:1,[Xd.y.Gale]:14};let Jd=class extends j.uAl{constructor(){super(...arguments),this._questNPCName=Xd.y.Flora}interact(){var k;null===(k=this._dialogueController)||void 0===k||k.close();const B=this._playerDataProvider.player,U=this._zoneOverride?tt.q.instance.prodigy.world.getZone(this._zoneOverride):tt.q.instance.prodigy.world.getCurrentZoneObject();if(!B.isZoneQuestEnabled)return;const F=()=>{this.getInjectedValue("a25-68f4").sendQuestEventViaHub(Wr.T.SPEAK_WITH_NPC,{id:this._questNPCName}).catch(j.RQr.createHandler("An error occurred while sending the SPEAK_WITH_NPC event via Quest Hub"))};this._dialogueController=new mi.rD(tt.q.instance.game);const G=U.getQuestState();if(!G)return U.startQuest(1).onQuestEventDialogue("onStart"),this.queueEventText(U,"onStart",1),void this._dialogueController.start(void 0,F);const $=G.ID;if(!j.Aq$.isDefined($))return;const H=U.getQuest($);if(H)this.queueEventText(U,"onStart",$),H.onQuestEventDialogue("onStart"),this._dialogueController.start(void 0,F);else{const k=tt.q.instance.prodigy.event.create();k.text(Zd[this._questNPCName],this._questNPCName),k.function(F),k.start()}}queueEventText(k,B,U){const F=k.getQuest(U);if(j.Aq$.isDefined(F[B]))for(const G of F[B])this._dialogueController.addEvents([{dialogueData:this._dialogueController.dataProvider.get(G),blockInput:!0}])}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Jd.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.gfw)(Xd.y),(0,G.Sn)("design:type",String)],Jd.prototype,"_questNPCName",void 0),(0,G.Cg)([(0,j.gfw)(Ft.A_),(0,G.Sn)("design:type",String)],Jd.prototype,"_zoneOverride",void 0),Jd=(0,G.Cg)([(0,j.EVk)("QuestNpc",W.Y.quest)],Jd);let tl=class extends j.uAl{initFromActivePlayer(){this._questID=this._playerDataProvider.player.ultimateQuestId}setTradeEventData(k,B){this._itemID=B,this._itemType=k}sendEvent(){j.Aq$.isDefined(this._itemID)?this._questManager.sendQuestEvent(Wr.T.TRADE_WITH_ULLA,{type:this._itemType,id:this._itemID},this._questID?[this._questID]:void 0).catch(j.RQr.createHandler("An error occurred while sending the NPC trade event")):j.VyI.log("QuestNPCTradeEventComponent attempted to send event with empty item id",j.$bb.Warning)}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],tl.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)(ar.QuestManager),(0,G.Sn)("design:type",qd.k)],tl.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tl.prototype,"_itemID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],tl.prototype,"_itemType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],tl.prototype,"_questID",void 0),tl=(0,G.Cg)([(0,j.EVk)("QuestNPCTradeEvent",W.Y.ultimates)],tl);var el=U(95383),il=U(98938);let sl=class extends j.uAl{constructor(){super(...arguments),this._dispatchStartOnCreate=!0,this._dispatchCompleteOnCreate=!0,this.onTaskStart=new j.HN0,this.onTaskComplete=new j.HN0,this._awaitOpenDialogues=!0}create(){if(super.create(),this._questTag&&this._questManagerHub.questManagerMap.get(this._questTag))this._questManager=this._questManagerHub.questManagerMap.get(this._questTag);else{if(!this._localZoneQuestManager)return void j.VyI.log(`QuestManager with tag [${this._questTag}] is not connected to the QuestManagerHub, and no localZoneQuestManager is available. This quest listener will not function`,j.$bb.Warning);this._questManager=this._localZoneQuestManager}this._questManager.onQuestTaskStart.add(this.handleQuestTaskStart,this),this._questManager.onQuestTaskComplete.add(this.handleQuestTaskComplete,this),this._dispatchStartOnCreate&&this.attemptDispatchTaskStart(),this._dispatchCompleteOnCreate&&this.attemptDispatchTaskComplete()}attemptDispatchTaskStart(){this._popupManager.delayPopupsUntil(this._questManager.isTaskInProgress(this.questId,this.taskId).then((k=>{var B;k&&(null===(B=this.onTaskStart)||void 0===B||B.dispatch())})).catch(j.RQr.createHandler(`Error getting "${this.questId}" "${this.taskId}" task progress`)))}attemptDispatchTaskComplete(){this._popupManager.delayPopupsUntil(this._questManager.isTaskCompleted(this.questId,this.taskId).then((k=>{var B;k&&(null===(B=this.onTaskComplete)||void 0===B||B.dispatch())})).catch(j.RQr.createHandler(`Error getting "${this.questId}" "${this.taskId}" task status`)))}destroy(){var k,B,U,F;null===(B=null===(k=this._questManager)||void 0===k?void 0:k.onQuestTaskStart)||void 0===B||B.remove(this.handleQuestTaskStart,this),null===(F=null===(U=this._questManager)||void 0===U?void 0:U.onQuestTaskComplete)||void 0===F||F.remove(this.handleQuestTaskComplete,this),this.onTaskStart.dispose(),this.onTaskComplete.dispose(),this.onTaskStart=null,this.onTaskComplete=null,super.destroy()}handleQuestTaskStart(k){k.id===this.taskId&&(this._awaitOpenDialogues&&this._dialogueEventController.isDialogueInProgress()?this._dialogueEventController.onComplete.addOnce((()=>{var k;return null===(k=this.onTaskStart)||void 0===k?void 0:k.dispatch()})):this.onTaskStart.dispatch())}handleQuestTaskComplete(k){k.id===this.taskId&&(this._awaitOpenDialogues&&this._dialogueEventController.isDialogueInProgress()?this._dialogueEventController.onComplete.addOnce((()=>{var k;return null===(k=this.onTaskComplete)||void 0===k?void 0:k.dispatch()})):this.onTaskComplete.dispatch())}};(0,G.Cg)([(0,j.Cdj)("a25-68f4"),(0,G.Sn)("design:type",Kr.n)],sl.prototype,"_questManagerHub",void 0),(0,G.Cg)([(0,j.Cdj)("a78-11c7"),(0,G.Sn)("design:type",co.B)],sl.prototype,"_localZoneQuestManager",void 0),(0,G.Cg)([(0,j.gfw)(il.t),(0,G.Sn)("design:type",String)],sl.prototype,"_questTag",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],sl.prototype,"questId",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],sl.prototype,"taskId",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],sl.prototype,"_dispatchStartOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],sl.prototype,"_dispatchCompleteOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],sl.prototype,"onTaskStart",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],sl.prototype,"onTaskComplete",void 0),(0,G.Cg)([(0,j.Cdj)("PopupHandler"),(0,G.Sn)("design:type",el.Y)],sl.prototype,"_popupManager",void 0),(0,G.Cg)([(0,j.Cdj)("b5b-6fa4"),(0,G.Sn)("design:type",mi.rD)],sl.prototype,"_dialogueEventController",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],sl.prototype,"_awaitOpenDialogues",void 0),sl=(0,G.Cg)([(0,j.EVk)("QuestProgressListener",W.Y.quest)],sl);var nl=U(10592);let al=class extends j.uAl{initCurrentQuestID(){this._questID=this._playerDataProvider.player.ultimateQuestId}initCurrentTaskID(){this._taskID=this._playerDataProvider.player.ultimateTaskId}setCollectingItems(){this._playerDataProvider.player.setUltimateSessionStatus(nl.n.CollectingItems,this._questID,this._taskID)}setTrackingNPC(){this._playerDataProvider.player.setUltimateSessionStatus(nl.n.TrackingNPC,this._questID,this._taskID)}setTamingUltimate(){this._playerDataProvider.player.setUltimateSessionStatus(nl.n.TamingUltimate,this._questID,this._taskID)}setNone(){this._playerDataProvider.player.setUltimateSessionStatus(nl.n.None,this._questID,this._taskID)}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],al.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],al.prototype,"_questID",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Object)],al.prototype,"_taskID",void 0),al=(0,G.Cg)([(0,j.EVk)("QuestSessionStatus",W.Y.ultimates)],al);let rl=class extends j.uAl{constructor(){super(...arguments),this._eventType=Wr.T.NONE,this._sendViaQuestHub=!1,this._eventProcessed=new j.HN0}sendEvent(){if(this._eventId)if(this._sendViaQuestHub){const k=this.getInjectedValue("a25-68f4");if(!k)return void j.VyI.log("SendQuestEventIdComponent attempted to send event via Quest Manager Hub, but no Quest Manager Hub was found",j.$bb.Warning);k.sendQuestEventViaHub(this._eventType,{id:this._eventId}).then((()=>this._eventProcessed.dispatch())).catch(j.RQr.createHandler("An error occurred while sending the event via Quest Hub"))}else{const k=this.getInjectedValue(ar.QuestManager);if(!k)return void j.VyI.log("SendQuestEventIdComponent attempted to send event via Quest Manager, but no Quest Manager was found",j.$bb.Warning);k.sendQuestEvent(this._eventType,{id:this._eventId}).then((()=>this._eventProcessed.dispatch())).catch(j.RQr.createHandler("An error occurred while sending the event"))}else j.VyI.log("SendQuestEventIdComponent attempted to send event with an empty id",j.$bb.Warning)}destroy(){this._eventProcessed.dispose(),super.destroy()}};(0,G.Cg)([(0,j.gfw)(Wr.T),(0,G.Sn)("design:type",String)],rl.prototype,"_eventType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],rl.prototype,"_eventId",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],rl.prototype,"_sendViaQuestHub",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rl.prototype,"_eventProcessed",void 0),rl=(0,G.Cg)([(0,j.EVk)("SendQuestEventId",W.Y.quest)],rl);let ol=class extends j.uAl{constructor(){super(...arguments),this._questId=null}updateQuestProgress(){this._questManager.updateQuestProgress(this._questId).catch(j.RQr.createHandler("An error occurred while checking for quest progress"))}};var hl;(0,G.Cg)([(0,j.Cdj)(ar.QuestManager),(0,G.Sn)("design:type",qd.k)],ol.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ol.prototype,"_questId",void 0),ol=(0,G.Cg)([(0,j.EVk)("UpdateQuestProgress",W.Y.quest)],ol),function(k){k.SPEAK_WITH_NPC="SpeakWithNPC",k.OPEN_SHOP="OpenShop",k.LOAD_PREFAB="LoadPrefab"}(hl||(hl={}));var cl=U(94310),dl=U(92240);let ll=class extends j.uAl{constructor(){super(...arguments),this._questTag=il.t.Festival,this._objectStateID=cl.L.FestivalPrizeWheel,this._activeStateObjects=[],this._inactiveStateObjects=[],this._becomeActiveStateObjects=[],this._becomeInactiveStateObjects=[]}postCreate(){this.fetchStateData().then((k=>(0,G.sH)(this,void 0,void 0,(function*(){k&&(this.initializeState(),this.setupCallbacks())})))).catch(j.RQr.createHandler(`Error fetching state data for ${this._objectStateID}`))}fetchStateData(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U;if(this._currentQuestID=this._questID?this._questID:null===(k=this._questManagerHub.questManagerMap.get(this._questTag))||void 0===k?void 0:k.getCurrentQuestID(),!this._currentQuestID)return j.VyI.log(`Quest ID was undefined when attempting to fetch state data for ${this._questTag}`,j.$bb.Verbose),!1;const F=yield null===(B=this._questManagerHub.questManagerMap.get(this._questTag))||void 0===B?void 0:B.getQuestObjectStates(this._currentQuestID);if(!F)return j.VyI.log(`Could not read object state data schema for ${this._currentQuestID}`,j.$bb.Verbose),!1;const G=yield null===(U=this._questManagerHub.questManagerMap.get(this._questTag))||void 0===U?void 0:U.getQuestProgress(this._currentQuestID);return(null==G?void 0:G.tasks)?(this._objectState=yield dl.h.calculateStateWithPreconditions(this._objectStateID,F,G.tasks,new vr.f),!!this._objectState||(j.VyI.log(`No state was found for ${this._objectStateID}`,j.$bb.Verbose),!1)):(j.VyI.log(`Could not read task progress data for ${this._currentQuestID}`,j.$bb.Verbose),!1)}))}initializeState(){var k,B,U,F;this.setupActiveState(),(null===(B=null===(k=this._objectState)||void 0===k?void 0:k.sendQuestEvent)||void 0===B?void 0:B.sendOnInitialize)&&this.handleSendQuestEvent(),(null===(F=null===(U=this._objectState)||void 0===U?void 0:U.loadPrefab)||void 0===F?void 0:F.loadOnInitialize)&&this.handlePrefabLoad()}setupDialogue(){var k,B,U;const F=new mi.rD(tt.q.instance.game),G=[];null===(k=this._objectState.dialogue.dialogueClose)||void 0===k||k.forEach((k=>{switch(k){case hl.OPEN_SHOP:G.push((()=>{var k,B,U,F;const G=null===(B=null===(k=this._objectState)||void 0===k?void 0:k.dialogue)||void 0===B?void 0:B.shopToOpen;"string"==typeof G?tt.q.instance.prodigy.open.dynamicStore({storeKey:G,scrollToSection:null===(F=null===(U=this._objectState)||void 0===U?void 0:U.dialogue)||void 0===F?void 0:F.scrollToSection,origin:{originType:ui.$N.ButtonClick,originId:this._objectStateID}}):"number"==typeof G&&tt.q.instance.prodigy.open.store(G,void 0,void 0,{originType:ui.$N.ButtonClick,originID:this._objectStateID})}));break;case hl.SPEAK_WITH_NPC:G.push((()=>{this._questManagerHub.sendQuestEventViaHub(Wr.T.SPEAK_WITH_NPC,{id:this._npcName}).catch(j.RQr.createHandler("An error occurred while sending the SPEAK_WITH_NPC event via Quest Hub"))}));break;case hl.LOAD_PREFAB:G.push((()=>{this.handlePrefabLoad()}))}})),F.addEvents((null!==(U=null===(B=this._objectState.dialogue)||void 0===B?void 0:B.dialogueArray)&&void 0!==U?U:[]).map((k=>({dialogueData:F.dataProvider.get(k),blockInput:!0}))));F.start(!0,(()=>{G.forEach((k=>k()))}))}setupActiveState(){var k;if(null===(k=this._objectState)||void 0===k?void 0:k.active){if(this._activeStateObjects.forEach((k=>{k.active=this._objectState.active.isActive})),this._inactiveStateObjects.forEach((k=>{k.active=!this._objectState.active.isActive})),void 0!==this._lastEvaluatedActiveState&&this._objectState.active.isActive!==this._lastEvaluatedActiveState){(this._objectState.active.isActive?this._becomeActiveStateObjects:this._becomeInactiveStateObjects).forEach((k=>{k.active=!0,this._objectState.active.stateChangeObjectDuration&&this._objectState.active.stateChangeObjectDuration>0&&(()=>(0,G.sH)(this,void 0,void 0,(function*(){const B=this._objectState.active.stateChangeObjectDuration;yield j.Egh.timeout(B*Kt.s.SECONDS_IN_MS),k&&(k.active=!1)})))().catch(j.RQr.createHandler("Error disabling a state change object"))}))}this._lastEvaluatedActiveState=this._objectState.active.isActive}}handlePrefabLoad(){this._objectState.loadPrefab&&Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(tt.q.instance.prodigy.gameContainer.get("d0e-64fd"),this._objectState.loadPrefab.guid,this._objectState.loadPrefab.injectedValues,this._objectState.loadPrefab.loadAsChild?this.gameObject:void 0).catch(j.RQr.createHandler(`[QuestObjectStateComponent] Could not load prefab: ${Rt.l[this._objectState.loadPrefab.guid]}`))}handleSendQuestEvent(){this._objectState.sendQuestEvent&&(this._questManagerHub.sendQuestEventViaHub(Wr.T.QUEST_OBJECT_STATE_EVALUATED,{id:this._objectStateID}).catch(j.RQr.createHandler("An error occurred while sending the QUEST_OBJECT_STATE_EVALUATED event via Quest Hub")),this._objectState.sendQuestEvent.sendCustomEvent&&this._questManagerHub.sendQuestEventViaHub(this._objectState.sendQuestEvent.customEventType,this._objectState.sendQuestEvent.customEventData).catch(j.RQr.createHandler("An error occurred while sending the a custom object state quest event via Quest Hub")),this._objectState.sendQuestEvent.ignoreCallback&&(this._skipNextEvaluation=!0))}setupCallbacks(){var k;null===(k=this._questManagerHub.questManagerMap.get(this._questTag))||void 0===k||k.onQuestTaskComplete.add((()=>(0,G.sH)(this,void 0,void 0,(function*(){if(this._skipNextEvaluation)return void(this._skipNextEvaluation=!1);(yield this.fetchStateData())&&this.initializeState()}))),this)}interact(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,j,$;(null===(k=this._objectState)||void 0===k?void 0:k.dialogue)?this.setupDialogue():(null===(B=this._objectState)||void 0===B?void 0:B.loadPrefab)&&!(null===(F=null===(U=this._objectState)||void 0===U?void 0:U.loadPrefab)||void 0===F?void 0:F.loadOnInitialize)?this.handlePrefabLoad():(null===(G=this._objectState)||void 0===G?void 0:G.sendQuestEvent)&&!(null===($=null===(j=this._objectState)||void 0===j?void 0:j.sendQuestEvent)||void 0===$?void 0:$.sendOnInitialize)&&this.handleSendQuestEvent()}))}};(0,G.Cg)([(0,j.gfw)(il.t),(0,G.Sn)("design:type",String)],ll.prototype,"_questTag",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ll.prototype,"_questID",void 0),(0,G.Cg)([(0,j.gfw)(cl.L),(0,G.Sn)("design:type",String)],ll.prototype,"_objectStateID",void 0),(0,G.Cg)([(0,j.gfw)(Xd.y),(0,G.Sn)("design:type",String)],ll.prototype,"_npcName",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],ll.prototype,"_activeStateObjects",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],ll.prototype,"_inactiveStateObjects",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],ll.prototype,"_becomeActiveStateObjects",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],ll.prototype,"_becomeInactiveStateObjects",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],ll.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("a25-68f4"),(0,G.Sn)("design:type",Kr.n)],ll.prototype,"_questManagerHub",void 0),ll=(0,G.Cg)([(0,j.EVk)("QuestObjectState",W.Y.quest)],ll);let ul=class extends j.uAl{create(){super.create(),this._setupOnCreate&&this.setupQuestTasks().catch(j.RQr.createHandler("[QuestTaskSetupComponent] Error setting up quest tasks"))}setupQuestTasks(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this._questTasksSetup){this._questTasksSetup=!0;try{yield this._questManagerHub.setupValidTasks()}catch(e){j.RQr.logError(e,"[QuestTaskSetupComponent] Unable to setup tasks via QuestManagerHub")}}}))}};(0,G.Cg)([(0,j.Cdj)("a25-68f4"),(0,G.Sn)("design:type",Kr.n)],ul.prototype,"_questManagerHub",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Zn.PopupHandler),(0,G.Sn)("design:type",el.Y)],ul.prototype,"_popupManager",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ul.prototype,"_setupOnCreate",void 0),ul=(0,G.Cg)([(0,j.EVk)("QuestTaskSetup",W.Y.quest)],ul);var fl,bl=U(37016),pl=U(1717),vl=U(90817);!function(k){k.RulesProgressData="RULES_PROGRESS_DATA",k.RulesModuleEnabled="RULES_MODULE_ENABLED",k.RulesDescriptionKey="RULES_DESCRIPTION_KEY",k.RulesDescriptionArgs="RULES_DESCRIPTION_ARGS",k.RulesShowHelperDialogCallback="RULES_SHOW_HELPER_DIALOG_CALLBACK",k.RulesShowCompleteNowButton="RULES_SHOW_COMPLETE_NOW_BUTTON",k.RulesTooltipArgs="RULES_TOOLTIP_ARGS",k.RulesTooltipCTA="RULES_TOOLTIP_CTA",k.RulesTooltipsEnabled="RULES_TOOLTIPS_ENABLED",k.RulesIconAssetData="RULES_ICON_ASSET_DATA",k.RulesRankIconText="RULES_RANK_ICON_TEXT",k.RulesLevelIconText="RULES_LEVEL_ICON_TEXT",k.RulesProgressPercent="RULES_PROGRESS_PERCENT",k.RulesProgressBarStartValue="RULES_PROGRESS_BAR_START_VALUE",k.RulesProgressBarTargetValue="RULES_PROGRESS_BAR_TARGET_VALUE",k.RulesProgressIsComplete="RULES_PROGRESS_IS_COMPLETE",k.RulesCompletedCountDisplay="RULES_COMPLETED_COUNT_DISPLAY",k.RulesComplete="RULES_ALL_COMPLETE",k.RulesPriorityHelperCallback="RULES_PRIORITY_HELPER_CALLBACK",k.RulesWhiteGloveScreenShowing="RULES_WHITE_GLOVE_SCREEN_SHOWING"}(fl||(fl={}));var gl,ml=U(43579),yl=U(29891);!function(k){k.RestrictionMetNootDialogue1="RestrictionMetNootDialogue1",k.RestrictionMetStartUnlockAnimation="RestrictionMetStartUnlockAnimation",k.RestrictionMetUnlockAnimationPlaying="RestrictionMetUnlockAnimationPlaying",k.RestrictionMetNootDialogue2="RestrictionMetNootDialogue2",k.RestrictionMetFTUEComplete="RestrictionMetFTUEComplete",k.RestrictionNotMetFillProgressBar="RestrictionNotMetFillProgressBar",k.RestrictionNotMetNootDialogue1="RestrictionNotMetNootDialogue1",k.RestrictionNotMetNootDialogue2="RestrictionNotMetNootDialogue2",k.RestrictionNotMetWaitForNext="RestrictionNotMetWaitForNext",k.RestrictionNotMetPlayerInWhiteGloveScreen="RestrictionNotMetPlayerInWhiteGloveScreen",k.RestrictionNotMetStartUnlockAnimation="RestrictionNotMetStartUnlockAnimation",k.RestrictionNotMetUnlockAnimationPlaying="RestrictionNotMetUnlockAnimationPlaying",k.RestrictionNotMetNootDialogue3="RestrictionNotMetNootDialogue3",k.RestrictionNotMetFTUEComplete="RestrictionNotMetFTUEComplete",k.WGRescueNootDialog1="WG-Rescue-NootDialog1",k.WGRescueNootDialog2="WG-Rescue-NootDialog2",k.WGRescueFTUEComplete="WG-Rescue-FTUEComplete"}(gl||(gl={}));const _l=[gl.RestrictionMetNootDialogue1,gl.RestrictionMetStartUnlockAnimation,gl.RestrictionMetUnlockAnimationPlaying,gl.RestrictionMetNootDialogue2,gl.RestrictionMetFTUEComplete],El=[gl.RestrictionNotMetFillProgressBar,gl.RestrictionNotMetNootDialogue1,gl.RestrictionNotMetNootDialogue2,gl.RestrictionNotMetWaitForNext,gl.RestrictionNotMetPlayerInWhiteGloveScreen],wl=[gl.RestrictionNotMetStartUnlockAnimation,gl.RestrictionNotMetUnlockAnimationPlaying,gl.RestrictionNotMetNootDialogue3,gl.RestrictionNotMetFTUEComplete],Tl={[pl.$.Rescue]:[gl.WGRescueNootDialog1,gl.WGRescueNootDialog2,gl.WGRescueFTUEComplete]};class Sl{static get instance(){var k;return null!==(k=this._instance)&&void 0!==k?k:this._instance=new Sl}constructor(){this._segment=tt.q.instance.prodigy.gameContainer.get("c47-20b6")}isBreadcrumbComplete(k){return tt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_RESTRICTIONS,k)}isWhiteGloveFTUEComplete(k){if(!Tl[k])return!0;switch(k){case pl.$.Rescue:return this.isBreadcrumbComplete(ls.B.BREADCRUMB_WHITE_GLOVE_RESCUE_FTUE);case pl.$.MergeRank:return this.isBreadcrumbComplete(ls.B.BREADCRUMB_WHITE_GLOVE_MERGE_FTUE);case pl.$.Element:return this.isBreadcrumbComplete(ls.B.BREADCRUMB_WHITE_GLOVE_ELEMENT_FTUE);case pl.$.Rarity:return this.isBreadcrumbComplete(ls.B.BREADCRUMB_WHITE_GLOVE_RARITY_FTUE);case pl.$.Level:return this.isBreadcrumbComplete(ls.B.BREADCRUMB_WHITE_GLOVE_LEVEL_FTUE);default:return!0}}completeFTUE(k){tt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ls.B.FEATURE_RESTRICTIONS,k)}hasFTUEToShow(k,B){const U=this.isBreadcrumbComplete(ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_MET_FTUE),F=this.isBreadcrumbComplete(ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_PRE_FTUE),G=this.isBreadcrumbComplete(ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_POST_FTUE);return k?!U||F&&!G:!F||!G||!B.every(this.isWhiteGloveFTUEComplete,this)}initializeRestrictionFTUE(k,B,U){if(this.currentRestrictionScreenFTUE)return!1;const F=this.isBreadcrumbComplete(ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_PRE_FTUE),G=this.isBreadcrumbComplete(ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_POST_FTUE);let j,$;return k?F&&!G?(j=wl,$=ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_POST_FTUE):(j=_l,$=ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_MET_FTUE):(j=El,$=ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_PRE_FTUE),!this.isBreadcrumbComplete($)&&void 0!==j&&(this.currentRestrictionScreenFTUE={steps:j,currentStepIndex:0,breadcrumb:$},U.removeAll(this),U.add((()=>{this.currentRestrictionScreenFTUE&&(this.currentRestrictionScreenFTUE.currentStepIndex++,this.playRestrictionScreenStep(B))}),this),this.playRestrictionScreenStep(B),!0)}playRestrictionScreenStep(k){var B;const U=null===(B=this.currentRestrictionScreenFTUE)||void 0===B?void 0:B.steps[this.currentRestrictionScreenFTUE.currentStepIndex];if(this.currentRestrictionScreenFTUE&&U)return k.setValue(U),U===gl.RestrictionNotMetPlayerInWhiteGloveScreen?(this.completeFTUE(ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_PRE_FTUE),void delete this.currentRestrictionScreenFTUE):U===gl.RestrictionNotMetFTUEComplete?(this.completeFTUE(ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_POST_FTUE),delete this.currentRestrictionScreenFTUE,void this.completeFTUE(ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_MET_FTUE)):U===gl.RestrictionMetFTUEComplete?(this.completeFTUE(ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_MET_FTUE),void delete this.currentRestrictionScreenFTUE):void 0}initializeWhiteGloveScreenFTUE(k,B,U){const F=Tl[k];let G;switch(k){case pl.$.Rescue:G=ls.B.BREADCRUMB_WHITE_GLOVE_RESCUE_FTUE;break;case pl.$.MergeRank:G=ls.B.BREADCRUMB_WHITE_GLOVE_MERGE_FTUE;break;case pl.$.Element:G=ls.B.BREADCRUMB_WHITE_GLOVE_ELEMENT_FTUE;break;case pl.$.Rarity:G=ls.B.BREADCRUMB_WHITE_GLOVE_RARITY_FTUE;break;case pl.$.Level:G=ls.B.BREADCRUMB_WHITE_GLOVE_LEVEL_FTUE;break;default:return}!this.isBreadcrumbComplete(G)&&F&&(this.currentWhiteGloveScreenFTUE={steps:F,currentStepIndex:0,breadcrumb:G},U.add((()=>{this.currentWhiteGloveScreenFTUE&&(this.currentWhiteGloveScreenFTUE.currentStepIndex++,this.playWhiteGloveScreenStep(B))})),this.playWhiteGloveScreenStep(B))}playWhiteGloveScreenStep(k){var B;const U=null===(B=this.currentWhiteGloveScreenFTUE)||void 0===B?void 0:B.steps[this.currentWhiteGloveScreenFTUE.currentStepIndex];if(this.currentWhiteGloveScreenFTUE&&U)if(k.setValue(U),U!==gl.WGRescueNootDialog1){if(U!==gl.WGRescueNootDialog2)return U===gl.WGRescueFTUEComplete?(this.completeFTUE(this.currentWhiteGloveScreenFTUE.breadcrumb),void delete this.currentWhiteGloveScreenFTUE):void 0;this._segment.whiteGlove.sendRestrictionFTUEEvent("Noot explains paid section")}else this._segment.whiteGlove.sendRestrictionFTUEEvent("Noot explains free section")}}var Al;!function(k){k.WHITE_GLOVE_PET_COUNT_PAID_HEADER="WHITE_GLOVE_PET_COUNT_PAID_HEADER",k.WHITE_GLOVE_PET_COUNT_PAID_INFO_SINGLE="WHITE_GLOVE_PET_COUNT_PAID_INFO_SINGLE",k.WHITE_GLOVE_PET_COUNT_PAID_INFO_MULTI="WHITE_GLOVE_PET_COUNT_PAID_INFO_MULTI",k.WHITE_GLOVE_PET_COUNT_FREE_HEADER="WHITE_GLOVE_PET_COUNT_FREE_HEADER",k.WHITE_GLOVE_PET_COUNT_FREE_INFO_SINGLE="WHITE_GLOVE_PET_COUNT_FREE_INFO_SINGLE",k.WHITE_GLOVE_PET_COUNT_FREE_INFO_MULTI="WHITE_GLOVE_PET_COUNT_FREE_INFO_MULTI",k.WHITE_GLOVE_HELPER_HEADER="WHITE_GLOVE_HELPER_HEADER",k.WHITE_GLOVE_HELPER_INFO_SINGLE="WHITE_GLOVE_HELPER_INFO_SINGLE",k.WHITE_GLOVE_HELPER_INFO_MULTI="WHITE_GLOVE_HELPER_INFO_MULTI",k.WHITE_GLOVE_PET_MERGE_FREE_INFO_MULTI="WHITE_GLOVE_PET_MERGE_FREE_INFO_MULTI",k.WHITE_GLOVE_PET_MERGE_FREE_INFO_SINGLE="WHITE_GLOVE_PET_MERGE_FREE_INFO_SINGLE",k.WHITE_GLOVE_PET_MERGE_FREE_HEADER="WHITE_GLOVE_PET_MERGE_FREE_HEADER",k.WHITE_GLOVE_RESTRICTION_TITLE="WHITE_GLOVE_RESTRICTION_TITLE"}(Al||(Al={}));class Cl{constructor(){this.onRestrictionNeedsRechecking=new j.HN0,this.showInsufficientCurrencyTooltip=new j.HN0,this._isInPurchaseOrMemberFlow=!1,this._isWhiteGloveScreenOpen=!1,this.onWhiteGloveScreenOpened=new j.HN0,this.onWhiteGloveScreenClosed=new j.HN0}get isWhiteGloveScreenOpen(){return this._isWhiteGloveScreenOpen}cleanup(){this.onRestrictionNeedsRechecking.dispose(),this.showInsufficientCurrencyTooltip.dispose(),this.onWhiteGloveScreenOpened.dispose(),this.onWhiteGloveScreenClosed.dispose()}getHelperCallback(k,B,U){if(!yo(B,(0,Bt.G)(mo)))return;let F;switch(B){case pl.$.MergeRank:F=this.getMergeRankCallbackHelper(U);break;case pl.$.Rescue:F=this.getRescueCallbackHelper(k,U);break;case pl.$.EvolutionTier:case pl.$.Element:case pl.$.Level:case pl.$.Rarity:default:return}return()=>(0,G.sH)(this,void 0,void 0,(function*(){this._isWhiteGloveScreenOpen||(this._isWhiteGloveScreenOpen=!0,this.onWhiteGloveScreenOpened.dispatch(),this._segment.whiteGlove.sendRestrictionFTUEEvent("White Glove Service screen opened"),yield F())}))}getMergeRankCallbackHelper(k){return()=>(0,G.sH)(this,void 0,void 0,(function*(){const[B,U]=k(),F=U-B,G=this._localizer.getText(1===F?Al.WHITE_GLOVE_PET_MERGE_FREE_INFO_SINGLE:Al.WHITE_GLOVE_PET_MERGE_FREE_INFO_MULTI,F.toString());this.createHelperScreen(Rt.l.PetMergeRestrictionHelperContent,{FREE_HEADER_TEXT:this._localizer.getText(Al.WHITE_GLOVE_PET_MERGE_FREE_HEADER),FREE_INFO_TEXT:G}).catch(j.RQr.createHandler("Error loading access rule helper screen for merge rank")),this._segment.whiteGlove.sendHelperScreenOpenEvent(pl.$.MergeRank,{})}))}getRescueCallbackHelper(k,B){return()=>(0,G.sH)(this,void 0,void 0,(function*(){var U;const F=k?yield this._dynamicStoreNetworkHandler.getRestrictionOffer(k):void 0,G=yield this.buildPetPurchaseInfo(F,B,k),{purchaseContext:$,injectedValues:H}=G,{petsToPurchase:V}=G;$.screen=yield this.createHelperScreen(Rt.l.PetCountRestrictionHelperContent,H,V.length>0),$.buildPurchaseInfo=this.buildPetPurchaseInfo.bind(this);const W=j.Uoy.getInjectedValue($.screen,"TUTORIAL_STRING_STATE"),q=j.Uoy.getInjectedValue($.screen,"TUTORIAL_ADVANCE_SIGNAL");W&&q&&Sl.instance.initializeWhiteGloveScreenFTUE(pl.$.Rescue,W,q.onDispatch);const K=yield Eo.a.isEligibleForFreePetPack();this._segment.whiteGlove.sendHelperScreenOpenEvent(pl.$.Rescue,{offer_data:{pets:V.map((k=>{var B,U,F;return{type:"pet",id:k,name:null!==(F=null===(U=null===(B=Yt.t.getItem("pet",k))||void 0===B?void 0:B.data)||void 0===U?void 0:U.name)&&void 0!==F?F:""}})),cost:null!==(U=null==F?void 0:F.metadata.cost)&&void 0!==U?U:0}},K),tt.q.instance.game.broadcaster.addAppListener(jn.ib.ItemReceived,(U=>{if("pet"===U.type){if(this._isInPurchaseOrMemberFlow)return;this.recheckRequirementsAndUpdateScreens(k,B,$,V.length)}}),this),$.screen.onDestroy.addOnce((()=>{tt.q.instance.game.broadcaster.removeAppListener(jn.ib.ItemReceived,this)}))}))}buildPetPurchaseInfo(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){var F,j;const $=yield Eo.a.isEligibleForFreePetPack(),[H,V]=B(),W=[],q=tt.q.instance.prodigy.gameContainer.get("5c7-e02d");null===(F=null==k?void 0:k.onComplete)||void 0===F||F.forEach((k=>{k.type===yl.s.GOT_PET&&W.push(...k.data.id)}));const K=W.length,z=this._localizer.getText(1===K?Al.WHITE_GLOVE_PET_COUNT_FREE_INFO_SINGLE:Al.WHITE_GLOVE_PET_COUNT_FREE_INFO_MULTI,K),Y=this._localizer.getText(1===K?Al.WHITE_GLOVE_PET_COUNT_PAID_INFO_SINGLE:Al.WHITE_GLOVE_PET_COUNT_PAID_INFO_MULTI,K),Q={featureRequirementName:null!=U?U:"unknown feature",offer:k},X=null!==(j=null==k?void 0:k.metadata.cost)&&void 0!==j?j:0,Z={MAGICOIN_COST:` ${X}`,PET_DATA_ARRAY:W.map((k=>{var B,U,F;return{PET_RARITY:null!==(F=null===(U=null===(B=Yt.t.getItem("pet",k))||void 0===B?void 0:B.data)||void 0===U?void 0:U.rarity)&&void 0!==F?F:io.E.Common,SHOW_ELEMENT_ICON:!0,PET_ID:k}})),FREE_HEADER_TEXT:this._localizer.getText(Al.WHITE_GLOVE_PET_COUNT_FREE_HEADER),FREE_INFO_TEXT:z,PAID_HEADER_TEXT:this._localizer.getText(Al.WHITE_GLOVE_PET_COUNT_PAID_HEADER),PAID_INFO_TEXT:Y,SHOW_MC_BUTTON:!q.isHardCurrencyMemberLocked(X)&&!$,SHOW_MEMBER_BUTTON:q.isHardCurrencyMemberLocked(X)&&!$,ELIGIBLE_FOR_FREE_PET_PACK:$,PURCHASE_PETS_CALLBACK:$?()=>(0,G.sH)(this,void 0,void 0,(function*(){return this.claimFreePetPack(Q,W)})):this.getPurchaseOrConvertCallback(Q,this.purchasePetPack.bind(this,Q,W),B)};return{purchaseContext:Q,injectedValues:Z,petsToPurchase:W}}))}purchasePetPack(k,B){const U=k.offer;if(!U||!k.screen)return;this._isInPurchaseOrMemberFlow=!0,Nt.d.updateInjectedValues(k.screen,{SHOW_LOADING_SPINNER:!0});const F=this._segment.whiteGlove.beginTransaction();this._dynamicStoreNetworkHandler.purchaseItem(U.id).then((()=>(0,G.sH)(this,void 0,void 0,(function*(){var G,$;if(this._dynamicStoreQuestManager.updateQuestProgress().catch(j.RQr.createHandler("RestrictionHelper: Error updating quest progress after purchasing pets")),!k.screen||k.screen.isDestroyed)return;k.screen.destroyDeferred(),k.screen=void 0,this._segment.whiteGlove.sendRestrictionFTUEEvent("Player uses White Glove Service");const{offerId:H,transactionId:V}=this._segment.whiteGlove.sendBundlePurchaseEvent(k.featureRequirementName,null!==($=null===(G=k.offer)||void 0===G?void 0:G.metadata.displayName)&&void 0!==$?$:"unknown offer",B,U.metadata.currency,U.metadata.cost);k.offerId=H,k.transactionId=V,F.flush({source_type:li.C.WhiteGloveService,source_id:k.offerId,transaction_id:k.transactionId,instance_type:fi.N.WhiteGloveOffer,instance_id:k.offerId,sink_type:li.C.WhiteGloveService,sink_id:k.offerId}),Eo.a.tryResetPlayerLastUnmetBattleRequirements(),yield new Rs.I(null,null).doTask({itemDrops:B.map((k=>({type:"pet",ID:k,N:1}))),isFake:!0}).catch(j.RQr.createHandler("RestrictionHelper: Failed to show got item for purchased pets")),this._isInPurchaseOrMemberFlow=!1,this.onRestrictionNeedsRechecking.dispatch()})))).catch(j.RQr.createHandler("RestrictionHelper: Error purchasing pets"))}getPurchaseOrConvertCallback(k,B,U){return()=>(0,G.sH)(this,void 0,void 0,(function*(){var F,G;const{offer:j,screen:$}=k,[H,V]=U(),W=tt.q.instance.prodigy.gameContainer.get("5c7-e02d"),q=this.getPostPurchaseBalance(null!==(F=null==j?void 0:j.metadata.cost)&&void 0!==F?F:0,null!==(G=null==j?void 0:j.metadata.currency)&&void 0!==G?G:27);if(q>=0&&!W.isHardCurrencyMemberLocked(q))return void B();const K=null==$?void 0:$.findComponentInChildren(Or.n);if(!W.isHardCurrencyMemberLocked(q)&&!(yield this.shouldAttemptConversion()))return void this.showNotEnoughCurrencyTooltip();const z=V-H;null==K||K.enableAutomaticUpdates(!1),this._isInPurchaseOrMemberFlow=!0,yield this.openUnifiedConversionFlow(-q,k),null==K||K.enableAutomaticUpdates(!0,!0),this._isInPurchaseOrMemberFlow=!1,this.recheckRequirementsAndUpdateScreens(k.featureRequirementName,U,k,z)}))}shouldAttemptConversion(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=k.hasMembership(),U=(yield k.getMembershipUpsellData()).upgradeOptions.length>0,F=!B||U;return!k.isPlayingAtSchool()&&(F||(0,Bt.G)(dn.l).enabled)&&Us.P.shouldUseUnifiedConversionFlow(en.o.FunnelNotEnoughCurrency)}))}getPostPurchaseBalance(k,B){return tt.q.instance.prodigy.gameContainer.get("5c7-e02d").getBalance(B)-k}openUnifiedConversionFlow(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){return new Promise((U=>{const F={type:"Restricted-Battle",category:"Restrictions",contentId:B.featureRequirementName,adType:Fs.R.Contextual,adVersion:Us.P.getAdVersionFromTriggerCategory("Restrictions")},G=this._segment.purchase.sendFunnelTriggerImpression(F);G&&this._segment.purchase.sendFunnelStart(F,G);tt.q.instance.prodigy.open.unifiedConversionFlow((()=>{U()}),{conversionFunnelName:en.o.FunnelNotEnoughCurrency},Is.k.RestrictionsPurchase,{[hs.FK.OtpMissingMagicoin]:k})}))}))}showNotEnoughCurrencyTooltip(){this.showInsufficientCurrencyTooltip.dispatch()}createHelperScreen(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B={},U=!1){const F=tt.q.instance.prodigy.open.prefabMenu(Rt.l.RestrictionHelperBaseScreen,void 0,!0,!0,!1,{CONTENT_GUID:k,CONTENT_INJECTION_VALUES:B,CURRENCY_DISPLAY_ID:U?27:void 0,HELPER_SCREEN_HEADER:this._localizer.getText(Al.WHITE_GLOVE_HELPER_HEADER),HELPER_SCREEN_INFO:this._localizer.getText(U?Al.WHITE_GLOVE_HELPER_INFO_MULTI:Al.WHITE_GLOVE_HELPER_INFO_SINGLE),SHOW_LOADING_SPINNER:!1,SHOW_INSUFFICIENT_CURRENCY_TOOLTIP_SIGNAL:this.showInsufficientCurrencyTooltip}),G=(yield F.onPrefabLoaded.asPromise())[0];return G.onDestroy.addOnce((()=>{this._isWhiteGloveScreenOpen=!1,this.onWhiteGloveScreenClosed.dispatch()})),G}))}recheckRequirementsAndUpdateScreens(k,B,U,F){const[$,H]=B(),V=H-$;V!==F&&this._dynamicStoreNetworkHandler.getRestrictionOffer(k).then((F=>(0,G.sH)(this,void 0,void 0,(function*(){var G,j,$;if(!F||V<=0)return Eo.a.tryResetPlayerLastUnmetBattleRequirements(),null===(G=U.screen)||void 0===G||G.destroyDeferred(),U.screen=void 0,void this.onRestrictionNeedsRechecking.dispatch();const{purchaseContext:H,injectedValues:W}=yield U.buildPurchaseInfo(F,B,k);H.screen=U.screen;const q=null===($=null===(j=U.screen)||void 0===j?void 0:j.findComponentsInChildren(Lo.B).find((k=>"CONTENT_INJECTION_VALUES"===k.id)))||void 0===$?void 0:$.GameObject;q&&(Nt.d.updateInjectedValues(q,W),this.onRestrictionNeedsRechecking.dispatch())})))).catch(j.RQr.createHandler("Error regenerating restriction offer"))}claimFreePetPack(k,B){this.purchasePetPack(k,B)}}(0,G.Cg)([(0,Gi.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Cl.prototype,"_localizer",void 0),(0,G.Cg)([(0,Gi.b)("9ea-3f44"),(0,G.Sn)("design:type",Pr.v)],Cl.prototype,"_dynamicStoreNetworkHandler",void 0),(0,G.Cg)([(0,Gi.b)("7a1-ff33"),(0,G.Sn)("design:type",bd.s)],Cl.prototype,"_dynamicStoreQuestManager",void 0),(0,G.Cg)([(0,Gi.b)("db5-fb6e"),(0,G.Sn)("design:type",Object)],Cl.prototype,"_featureRequirements",void 0),(0,G.Cg)([(0,Gi.b)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],Cl.prototype,"_segment",void 0);pl.$.Rescue,pl.$.EvolutionTier,pl.$.Element,pl.$.Level,pl.$.MergeRank,pl.$.Rarity,pl.$.Rescue,pl.$.EvolutionTier,pl.$.Element,pl.$.Level,pl.$.MergeRank,pl.$.Rarity,pl.$.Rescue,pl.$.EvolutionTier,pl.$.Element,pl.$.Level,pl.$.MergeRank,pl.$.Rarity;let Ol=class extends Fi.z{constructor(){super(...arguments),this._animatedFillDelayMS=500,this._DEFAULT_NUM_RULES_TO_DISPLAY=1,this._restrictionHelper=new Cl,this._previousProgressValues=[]}create(){super.create();const k=this.getInjectedValue(_o.NumRulesToDisplay);this._previousProgressValues.length=0;for(let B=0;B{this.bindContext().catch(j.RQr.createHandler("[AccessRulesDataProvider] Unable to rebind context after helper dialog"))})),this._restrictionHelper.onWhiteGloveScreenOpened.add((()=>{Nt.d.updateInjectedValues(this.gameObject,{[fl.RulesWhiteGloveScreenShowing]:!0})})),this._restrictionHelper.onWhiteGloveScreenClosed.add((()=>{Nt.d.updateInjectedValues(this.gameObject,{[fl.RulesWhiteGloveScreenShowing]:!1})}))}destroy(){this._restrictionHelper.cleanup(),super.destroy()}bindContext(){return(0,G.sH)(this,arguments,void 0,(function*(k=!1){const B=this.getInjectedValue(_o.NumRulesToDisplay);Nt.d.updateInjectedValues(this.gameObject,this.getAccessRulesData(this.getFeatureRequirement(),null!=B?B:this._DEFAULT_NUM_RULES_TO_DISPLAY,!k))}))}getFeatureRequirement(){return this._selectedMode=this.getInjectedValue(_o.SelectedMode),ml.wS[this._selectedMode]}getAccessRulesData(k,B,U=!1){var F,G,$,H,V;if(!j.Aq$.isDefined(k)||!this.GameObject.activeInHierarchy)return{};let W,q,K=0,z=[];if("number"==typeof k){const B=tt.q.instance.prodigy.gameContainer.get("db5-fb6e").getFeatureRequirementAsset(k).data;z=B.requirements,W=B.name}else z=null!==(F=null==k?void 0:k.requirements)&&void 0!==F?F:[],W=k.name;const Y=Math.min(B,z.length),Q=new Array(Y).fill({RULES_MODULE_ENABLED:!1});let X=0;for(let tt=0;tt=B);tt++){const k=z[tt].kennel;if(!j.Aq$.isDefined(null==k?void 0:k.petCount))continue;const B=Eo.a.getRuleType(k),U=()=>{const U=this.getCurrentProgressCountForRuleType(B,k);return[Math.min(U,k.petCount),k.petCount]},[F,Y]=U(),Z=F===Y;Z&&K++;const J=this.getIconAssetData(B,k),et=B===pl.$.Rescue?[]:[Eo.a.getRuleDescriptionArgs(B,k)],it=this._restrictionHelper.getHelperCallback(W,B,U);Z||q&&B!==pl.$.Rescue||(q=it);let st=!1;W&&(Z?this._loggedInPlayer.player.completedRestrictionProgressBarsSeen.includes(W)||(st=!0,this._loggedInPlayer.player.completedRestrictionProgressBarsSeen.push(W)):this._loggedInPlayer.player.inProgressRestrictionsSeen.includes(W)||(st=!0,this._loggedInPlayer.player.inProgressRestrictionsSeen.push(W)));const nt=[this._previousProgressValues[X],Y,!1],at=[F,Y,st,this._animatedFillDelayMS];Q[X]={[fl.RulesModuleEnabled]:!0,[fl.RulesProgressIsComplete]:Z,[fl.RulesProgressPercent]:F/Y,[fl.RulesProgressBarStartValue]:nt,[fl.RulesProgressBarTargetValue]:at,[fl.RulesIconAssetData]:[null!==(G=null==J?void 0:J.atlas)&&void 0!==G?G:"",null!==($=null==J?void 0:J.frame)&&void 0!==$?$:""],[fl.RulesDescriptionKey]:Eo.a.getRuleDescriptionKey(k),[fl.RulesDescriptionArgs]:[k.petCount.toString(),...et],[fl.RulesTooltipArgs]:et,[fl.RulesRankIconText]:B===pl.$.MergeRank?null===(H=k.mergeRank)||void 0===H?void 0:H.toString():void 0,[fl.RulesLevelIconText]:B===pl.$.Level?null===(V=k.level)||void 0===V?void 0:V.toString():void 0,[fl.RulesTooltipCTA]:this.getRuleGoButtonCTA(B),[fl.RulesShowHelperDialogCallback]:it,[fl.RulesShowCompleteNowButton]:!Z&&j.Aq$.isDefined(it)},this._previousProgressValues[X]=F,X++}const Z=K>=X,J=vl.gz.initialized;return Object.assign(Object.assign(Object.assign(Object.assign({[fl.RulesCompletedCountDisplay]:`${K}/${X}`,[fl.RulesProgressData]:Q,[fl.RulesPriorityHelperCallback]:q},U&&{EncounterBattleRequirementsMet:Z}),Z&&{[fl.RulesComplete]:this._selectedMode}),J&&{[fl.RulesTooltipsEnabled]:!1}),{[fl.RulesWhiteGloveScreenShowing]:this._restrictionHelper.isWhiteGloveScreenOpen})}getCurrentProgressCountForRuleType(k,B){let U=this._loggedInPlayer.player.kennel.getPets();switch(k){case pl.$.EvolutionTier:U=U.filter((k=>{var U,F,G,j,$;return(null!==(j=null===(G=null===(F=null===(U=Yt.t.getItem("pet",k.ID))||void 0===U?void 0:U.data)||void 0===F?void 0:F.evolution)||void 0===G?void 0:G.tier)&&void 0!==j?j:0)>=(null!==($=null==B?void 0:B.evolutionTier)&&void 0!==$?$:0)}));break;case pl.$.Element:U=U.filter((k=>{var U,F;return(null===(F=null===(U=Yt.t.getItem("pet",k.ID))||void 0===U?void 0:U.data)||void 0===F?void 0:F.affinity)===(null==B?void 0:B.affinity)}));break;case pl.$.Level:U=U.filter((k=>{var U,F;return(null!==(U=k.level)&&void 0!==U?U:0)>=(null!==(F=null==B?void 0:B.level)&&void 0!==F?F:0)}));break;case pl.$.MergeRank:U=U.filter((k=>{var U,F,G,j;return(null!==(G=eo.P8.getPetDisplayMergeRank(null!==(U=k.ID)&&void 0!==U?U:0,null!==(F=k.uniqueID)&&void 0!==F?F:""))&&void 0!==G?G:bl.qd.MIN)>=(null!==(j=null==B?void 0:B.mergeRank)&&void 0!==j?j:0)}));break;case pl.$.Rarity:U=U.filter((k=>{var U,F;return(null===(F=null===(U=Yt.t.getItem("pet",k.ID))||void 0===U?void 0:U.data)||void 0===F?void 0:F.rarity)===(null==B?void 0:B.rarity)}));break;case pl.$.Rescue:}return(null==B?void 0:B.unique)&&(U=U.filter(((k,B,U)=>U.findIndex((B=>B.ID===k.ID))===B))),U.length}getIconAssetData(k,B){var U;switch(k){case pl.$.EvolutionTier:return So.evolution;case pl.$.Element:if(null==B?void 0:B.affinity)return So[B.affinity];case pl.$.Level:return So.level;case pl.$.Rescue:return So.rescue;case pl.$.MergeRank:return So.mergeRank;case pl.$.Rarity:const k=io.E[null!==(U=null==B?void 0:B.rarity)&&void 0!==U?U:0].toLowerCase();if(null==B?void 0:B.rarity)return So[k];default:return null}}getRuleGoButtonCTA(k){switch(k){case pl.$.MergeRank:case pl.$.Level:case pl.$.EvolutionTier:return()=>{tt.q.instance.prodigy.prefabFactory.closeAllTooltips(),Nt.d.updateInjectedValues(this.gameObject,{[fl.RulesTooltipsEnabled]:!1}),tt.q.instance.prodigy.open.pets((()=>{Nt.d.updateInjectedValues(this.gameObject,{[fl.RulesTooltipsEnabled]:!0}),this.bindContext().catch(j.RQr.createHandler("[AccessRulesDataProvider] Unable to rebind context after pet book close"))}))};case pl.$.Rescue:case pl.$.Element:case pl.$.Rarity:default:return()=>{tt.q.instance.prodigy.prefabFactory.closeAllTooltips(),tt.q.instance.prodigy.open.menuCloseAll()}}}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Ol.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Ol.prototype,"_bindOnCreate",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ol.prototype,"_animatedFillDelayMS",void 0),Ol=(0,G.Cg)([(0,j.EVk)("AccessRulesDataProvider",j.YH6.injection)],Ol);let Il=class extends Ol{getFeatureRequirement(){return this.getInjectedValue("EncounterBattleRequirements")}setBattleRulesTooltipsEnabled(k){Nt.d.updateInjectedValues(this.gameObject,{[fl.RulesTooltipsEnabled]:k})}};var Dl;Il=(0,G.Cg)([(0,j.EVk)("BattleRulesDataProvider",j.YH6.injection)],Il),function(k){k.BossNameText="BOSS_NAME_TEXT",k.WeaknessIcon="WEAKNESS_ICON",k.RestrictionsBossImage="RESTRICTIONS_BOSS_IMAGE",k.RestrictionsBackgroundImage="RESTRICTIONS_BACKGROUND_IMAGE",k.RestrictionsBannerImage="RESTRICTIONS_BANNER_IMAGE",k.RestrictionsBossName="RESTRICTIONS_BOSS_NAME"}(Dl||(Dl={}));const Rl={14:ps.q.Restriction_banner_gerald,16:ps.q.Restriction_banner_icewyrm,13:ps.q.Restriction_banner_cebollini,15:ps.q.Restriction_banner_oldone,12:ps.q.Restriction_banner_nastycloud,67:ps.q.Restriction_banner_cloakedfire,68:ps.q.Restriction_banner_cloakedice,69:ps.q.Restriction_banner_cloakedplant,70:ps.q.Restriction_banner_cloakedstorm,71:ps.q.Restriction_banner_cloakedwater,72:ps.q.Restriction_banner_cloakedshadow,73:ps.q.Restriction_banner_cloaked,37:ps.q.Restriction_banner_pippet_endgame,54:ps.q.Restriction_banner_puppetmaster_illusion_endgame,55:ps.q.Restriction_banner_puppetmaster_illusion_endgame,56:ps.q.Restriction_banner_puppetmaster_illusion_endgame,57:ps.q.Restriction_banner_puppetmaster_illusion_endgame,58:ps.q.Restriction_banner_puppetmaster_illusion_endgame,59:ps.q.Restriction_banner_puppetmaster},Pl={59:ps.q.Restriction_banner_puppetmaster_endgame},Ml={59:ps.q.Restriction_banner_BG_puppetmaster},Nl={[Ft.A_.BONFIRE]:ps.q.Restriction_banner_BG_bonfire,[Ft.A_.FOREST]:ps.q.Restriction_banner_BG_firefly,[Ft.A_.SHIPWRECK]:ps.q.Restriction_banner_BG_shipwreck,[Ft.A_.SHIVERCHILL]:ps.q.Restriction_banner_BG_shiverchill,[Ft.A_.SKYWATCH]:ps.q.Restriction_banner_BG_skywatch,[Ft.A_.ACADEMY]:ps.q.Restriction_banner_BG_academy,[Ft.A_.BONFIREHARD]:ps.q.Restriction_banner_BG_bonfire,[Ft.A_.FORESTHARD]:ps.q.Restriction_banner_BG_firefly,[Ft.A_.SHIPWRECKHARD]:ps.q.Restriction_banner_BG_shipwreck,[Ft.A_.SHIVERCHILLHARD]:ps.q.Restriction_banner_BG_shiverchill,[Ft.A_.SKYWATCHHARD]:ps.q.Restriction_banner_BG_skywatch},xl={[Ft.A_.BONFIRE]:ps.q.Restriction_banner_wave_bonfire,[Ft.A_.FOREST]:ps.q.Restriction_banner_wave_firefly,[Ft.A_.SHIPWRECK]:ps.q.Restriction_banner_wave_shipwreck,[Ft.A_.SHIVERCHILL]:ps.q.Restriction_banner_wave_shiverchill,[Ft.A_.SKYWATCH]:ps.q.Restriction_banner_wave_skywatch,[Ft.A_.ACADEMY]:ps.q.Restriction_banner_wave_puppetmaster,[Ft.A_.BONFIREHARD]:ps.q.Restriction_banner_wave_hardmode,[Ft.A_.FORESTHARD]:ps.q.Restriction_banner_wave_hardmode,[Ft.A_.SHIPWRECKHARD]:ps.q.Restriction_banner_wave_hardmode,[Ft.A_.SHIVERCHILLHARD]:ps.q.Restriction_banner_wave_hardmode,[Ft.A_.SKYWATCHHARD]:ps.q.Restriction_banner_wave_hardmode},Ll={14:ps.q.Restriction_banner_title_gerald,16:ps.q.Restriction_banner_title_icewyrm,13:ps.q.Restriction_banner_title_cebollini,15:ps.q.Restriction_banner_title_oldone,12:ps.q.Restriction_banner_title_nastycloud,67:ps.q.Restriction_banner_title_cloakedwizard,68:ps.q.Restriction_banner_title_cloakedwizard,69:ps.q.Restriction_banner_title_cloakedwizard,70:ps.q.Restriction_banner_title_cloakedwizard,71:ps.q.Restriction_banner_title_cloakedwizard,72:ps.q.Restriction_banner_title_cloakedwizard,73:ps.q.Restriction_banner_title_cloakedwizard,37:ps.q.Restriction_banner_title_pippet,54:ps.q.Restriction_banner_title_puppetmaster,55:ps.q.Restriction_banner_title_puppetmaster,56:ps.q.Restriction_banner_title_puppetmaster,57:ps.q.Restriction_banner_title_puppetmaster,58:ps.q.Restriction_banner_title_puppetmaster,59:ps.q.Restriction_banner_title_puppetmaster};let kl=class extends Fi.z{create(){super.create(),this._bindOnCreate&&this.bindContext().catch(j.RQr.createHandler("[BossAssetDataProvider] Unable to bind context"))}bindContext(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U;const F=this.getInjectedValue(_o.SelectedBossID),G=tt.q.instance.prodigy.world.getCurrentZone(),$=Yt.t.getItem("boss",parseInt(F)),H=null===(k=null==$?void 0:$.data)||void 0===k?void 0:k.affinity,V=tt.q.instance.prodigy.gameContainer.get("935-4e8b").constants.elementalMultiplier.find((k=>k.name===H)),W=null==V?void 0:V.weakness,q=[Ft.A_.ACADEMY,Ft.A_.ACADEMYHARD,Ft.A_.ACADEMYEXPERT].includes(G)&&j.Aq$.isDefined(Pl[F])?Pl[F]:Rl[F],K=[Ft.A_.ACADEMY,Ft.A_.ACADEMYHARD,Ft.A_.ACADEMYEXPERT].includes(G)&&j.Aq$.isDefined(Ml[F])?Ml[F]:Nl[G];Nt.d.updateInjectedValues(this.gameObject,{[Dl.BossNameText]:null!==(U=null===(B=null==$?void 0:$.data)||void 0===B?void 0:B.name)&&void 0!==U?U:"",[Dl.WeaknessIcon]:[Ve._.Ui_battle_revamp_json,`icon-mini-element-${W}`],[Dl.RestrictionsBossImage]:q,[Dl.RestrictionsBackgroundImage]:K,[Dl.RestrictionsBannerImage]:xl[G],[Dl.RestrictionsBossName]:Ll[F]})}))}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],kl.prototype,"_bindOnCreate",void 0),kl=(0,G.Cg)([(0,j.EVk)("BossAssetDataProvider",j.YH6.injection)],kl);let Bl=class extends j.uAl{constructor(){super(...arguments),this.enable=!0,this._modifiedInput=!1}run(){const k=tt.q.instance.game;k.input.enabled=this.enable,this._modifiedInput=!0,this.enable||k.input.reset(),this.enable=!this.enable}enableInput(){(0,Td.QQ)(tt.q.instance.game,!0),this._modifiedInput=!0}disableInput(){(0,Td.QQ)(tt.q.instance.game,!1),this._modifiedInput=!0}destroy(){this._modifiedInput&&this.enableInput(),super.destroy()}};var Ul;(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Bl.prototype,"enable",void 0),Bl=(0,G.Cg)([(0,j.EVk)("EnableInput",W.Y.input)],Bl),function(k){k.Add="Add",k.Change="Change"}(Ul||(Ul={}));let Fl=class extends j.uAl{constructor(){super(...arguments),this.onOpenDetailedSelection=new j.HN0}create(){super.create(),this._changePetButton.onClick.add((()=>{this.openDetailedSelection()})),this.updatePanelContents().catch(j.RQr.createHandler("YourTeamPetSelectorComponent: Failed to render the your team panel"))}updatePanelContents(){return(0,G.sH)(this,void 0,void 0,(function*(){this.setupEquippedPets()}))}savePlayerTeam(){this._currentPlayer.player.kennel.updated=!0,this._currentPlayer.player.forceSaveCharacter()}setupEquippedPets(){const k=this._currentPlayer.player.kennel.petTeam.filter((k=>!(k instanceof Ih.a)));this.setupEquippedPet(k[0],this._equippedPetLeft),this.setupEquippedPet(k[1],this._equippedPetRight)}setupEquippedPet(k,B){k?(this.setupPetCard(k,B).catch(j.RQr.createHandler("YourTeamPetSelectorComponent: Failed to render a pet card for a currently equipped pet")),B.active=!0):B.active=!1}setupPetCard(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U,F,G,j,$,H,V,W,q,K;const z=Yt.t.getItem("pet",k.data.ID);if(B.children.length>0){const $={PET_ID:k.data.ID,PET_DATA:k.data,NAME:null!==(U=k.data.nickname)&&void 0!==U?U:Qt.J.getLocalizationNameKey(null==z?void 0:z.data),LEVEL:k.data.level,MERGE_RANK:eo.P8.getPetDisplayMergeRank(null!==(F=k.data.ID)&&void 0!==F?F:0,null!==(G=k.data.uniqueID)&&void 0!==G?G:""),ICON:fs.E.getIconForType("pet",null!==(j=k.data.ID)&&void 0!==j?j:0),SHOW_ELEMENT_ICON:!0,SHOW_STAT_ICON:!1};return void Nt.d.updateInjectedValues(B,$)}const Y={PET_ID:null!==($=k.data.ID)&&void 0!==$?$:0,PET_DATA:k.data,NAME:null!==(H=k.data.nickname)&&void 0!==H?H:Qt.J.getLocalizationNameKey(null==z?void 0:z.data),LEVEL:null!==(V=k.data.level)&&void 0!==V?V:0,MERGE_RANK:eo.P8.getPetDisplayMergeRank(null!==(W=k.data.ID)&&void 0!==W?W:0,null!==(q=k.data.uniqueID)&&void 0!==q?q:""),ICON:fs.E.getIconForType("pet",null!==(K=k.data.ID)&&void 0!==K?K:0),SHOW_UPGRADE:!1,SHOW_EVOLVE:!1,SHOW_ON_TEAM:!1,SHOW_GUIDE_HAND:!1,INPUT_ENABLED:!1,SHOW_ELEMENT_ICON:!0,SHOW_STAT_ICON:!1},Q=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.OwnedPetCardInjectionConfiguredMergeRank,Y);if(B.isDestroyed)return void Q.destroy();const X=Q.transform;X.setPivot(.5,.5),X.setAnchorMin(0,0),X.setAnchorMax(0,0),Q.name=`pet-${k.data.ID}`,Q.parent=B}))}openDetailedSelection(){this.openDetailedSelectionScreen("pet").catch(j.RQr.createHandler("YourTeamPetSelectorComponent: Failed to open the detailed selection screen")),this.onOpenDetailedSelection.dispatch()}openDetailedSelectionScreen(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;tt.q.instance.prodigy.prefabFactory.closeAllTooltips(),this._screenContainerParent&&(this._screenContainerParent.active=!0),this._detailedSelectionScreen?this._detailedSelectionScreen.active=!0:(this._detailedSelectionLoadingScreen&&(this._detailedSelectionLoadingScreen.active=!0),this._detailedSelectionScreen=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.LootDashDetailedSelectionScreen,{},this._screenContainer),this._detailedSelectionLoadingScreen&&(null===(B=this._detailedSelectionLoadingScreen.findComponentInChildren(Bl))||void 0===B||B.enableInput(),this._detailedSelectionLoadingScreen.active=!1));const U=this._detailedSelectionScreen.findComponentInChildren(Uh);yield U.setup(k)}))}destroy(){this.onOpenDetailedSelection.dispose(),super.destroy()}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Fl.prototype,"_equippedPetLeft",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Fl.prototype,"_equippedPetRight",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Fl.prototype,"_changePetButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Fl.prototype,"_screenContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Fl.prototype,"_screenContainerParent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Fl.prototype,"_detailedSelectionLoadingScreen",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Fl.prototype,"onOpenDetailedSelection",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Fl.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Fl.prototype,"_currentPlayer",void 0),Fl=(0,G.Cg)([(0,j.EVk)("YourTeamPetSelector",W.Y.uiPet)],Fl);var Gl=U(28559);let jl=class extends j.uAl{constructor(){super(...arguments),this._tooltipGameObject=null,this._isTooltipCreated=!1,this.messageLocalizationArgs=[],this._useIconText=!1,this._resizeToContainer=!1,this._offset=new j.I9Y(0,0),this._useGoButton=!1,this._useCloseButton=!0,this.onTooltipClosed=new j.HN0,this.onGoClicked=new j.HN0}setGoButtonCTA(k){this.onGoClicked.add(k)}showTooltip(k){if(this._tooltipContainer.active=k,k&&!this._isTooltipCreated){tt.q.instance.prodigy.prefabFactory.tooltipsActive()&&tt.q.instance.prodigy.prefabFactory.closeAllTooltips();const k=Object.assign(Object.assign({},Gl.f),{resizeToContainer:this._resizeToContainer,iconGUID:this._iconGUID,useIconText:this._useIconText,layer:this._tooltipLayer,textArgs:this.messageLocalizationArgs,useGoButton:this._useGoButton,useCloseButton:this._useCloseButton,goButtonCTA:()=>this.onGoClicked.dispatch(),offset:this._offset});j.Aq$.isDefined(this._arrowDirection)&&(k.arrowDirection=this._arrowDirection);const B=this._tooltipContainer.transform;this._tooltipGameObject=tt.q.instance.prodigy.prefabFactory.createTooltip(B,this.messageLocalizationKey,k),this._tooltipGameObject.onDestroy.add((()=>{this.onTooltipClosed.dispatch(),this._isTooltipCreated=!1,this._tooltipGameObject=null})),this._isTooltipCreated=!0}else!k&&this._isTooltipCreated&&this.onTooltipClosed.dispatch()}destroy(){this.onTooltipClosed.dispose(),this.onGoClicked.dispose(),super.destroy()}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],jl.prototype,"_tooltipContainer",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],jl.prototype,"messageLocalizationKey",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],jl.prototype,"messageLocalizationArgs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],jl.prototype,"_arrowDirection",void 0),(0,G.Cg)([(0,j.i0J)(j.Z$z.SingleImage),(0,G.Sn)("design:type",String)],jl.prototype,"_iconGUID",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jl.prototype,"_useIconText",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],jl.prototype,"_tooltipLayer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jl.prototype,"_resizeToContainer",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],jl.prototype,"_offset",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jl.prototype,"_useGoButton",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jl.prototype,"_useCloseButton",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],jl.prototype,"onTooltipClosed",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],jl.prototype,"onGoClicked",void 0),jl=(0,G.Cg)([(0,j.EVk)("CreateTooltip",j.YH6.ui)],jl);var $l=U(77997);let Hl=class extends j.uAl{constructor(){super(...arguments),this.onViewing=new j.HN0,this.onEditing=new j.HN0}postCreate(){var k,B;super.postCreate();{const U=tt.q.instance.prodigy.gameContainer.get("80c-6fa4"),F=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=tt.q.instance.prodigy.world.getZone(tt.q.instance.prodigy.world.getCurrentZone()).screen,j=null==G?void 0:G.saveTag.split("-").pop(),$=null!==(B=null===(k=U.getValue($l.v))||void 0===k?void 0:k.houseReportButton)&&void 0!==B&&B;j===F.userID.toString()?this.onEditing.dispatch():$&&this.onViewing.dispatch()}}destroy(){this.onViewing.dispose(),this.onEditing.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hl.prototype,"onViewing",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hl.prototype,"onEditing",void 0),Hl=(0,G.Cg)([(0,j.EVk)("HouseHUDGuard",W.Y.reporting)],Hl);var Vl=U(53040);let Wl=class extends j.uAl{onClick(){return(0,G.sH)(this,void 0,void 0,(function*(){yield Vl.y.openReportHouseConfirmationDialog()}))}};Wl=(0,G.Cg)([(0,j.EVk)("ReportHouse",W.Y.reporting)],Wl);U(87557);var ql=U(76642);class Kl extends j.$KW{constructor(){super(...arguments),this.newSignalValue=""}generate(k,B){var U,F;const G=j.Gme.textGroup({id:"stringValue",labelValue:"String Value",inputValue:k.stringValue}),$=j.Gme.checkboxGroup({id:"checkOnCreate",labelValue:"Check On Create",inputValue:k.checkOnCreate}),H=j.Gme.checkboxGroup({id:"forceChangeOnCreate",labelValue:"Change On Create",inputValue:k.forceChangeOnCreate}),V=j.Gme.checkboxGroup({id:"fireSignalsOnSameValue",labelValue:"Fire Signals On Same Value",inputValue:k.fireSignalsOnSameValue}),W=j.NyS.create({id:"onValueChanged",label:"On Value Changed",signalValue:k.onValueChanged,componentGUID:this._componentGuid}),q=j.NyS.create({id:"onValueChecked",label:"On Value Checked",signalValue:k.onValueChecked,componentGUID:this._componentGuid}),K=null!==(U=k.stateSignals)&&void 0!==U?U:{},z=j.XRp.createVertical([j.bl1.create({id:"addNewSignalInfo",message:"Add custom signals that dispatch when the string value matches the signal name"}),j._Lw.halfBlankLine(),j.XRp.createHorizontal([j.Gme.textGroup({id:"addSignal",labelValue:"Signal Name",inputValue:null!==(F=this.newSignalValue)&&void 0!==F?F:"",onChange:(k,B)=>{this.newSignalValue=B,this._editorAPI.redrawCustomInspector()}}),j.X9M.create({id:"addSignalButton",nodeSize:"1of12",buttonText:"",buttonIcon:j.a2l.Add,buttonDisabled:""===this.newSignalValue,onClick:()=>{var k;this.newSignalValue&&(K[this.newSignalValue]=null!==(k=K[this.newSignalValue])&&void 0!==k?k:[],this._editorAPI.modifyComponent(this._componentGuid,{stateSignals:K}))}})]),j._Lw.halfBlankLine()]),Y=[];return Object.keys(K).forEach((k=>{var B;Y.push(j.XRp.createVerticalContainer([j.X9M.create({id:`deleteSignal-${k}`,buttonText:"Delete Signal",onClick:()=>{delete K[k],this._editorAPI.modifyComponent(this._componentGuid,{stateSignals:K})}}),j.NyS.create({id:`stateSignals-${k}`,label:`String is "${k}"`,signalValue:null!==(B=null==K?void 0:K[k])&&void 0!==B?B:[],componentGUID:this._componentGuid,propertyPath:["stateSignals",k]})],{title:`"${k}" Signal`,isCollapsible:!0,startCollapsed:!0})),Y.push(j._Lw.halfBlankLine())})),j.XRp.createVertical([G,$,H,V,j._Lw.halfBlankLine(),W,q,z,...Y])}}let zl=class extends j.uAl{constructor(){super(...arguments),this.checkOnCreate=!1,this.forceChangeOnCreate=!1,this.fireSignalsOnSameValue=!1,this.onValueChanged=new j.HN0,this.onValueChecked=new j.HN0,this._stateSignals={}}create(){super.create(),this.forceChangeOnCreate&&this.onValueChanged.dispatch(this.stringValue,this.previousValue),this.checkOnCreate&&this.onValueChecked.dispatch(this.stringValue),(this.forceChangeOnCreate||this.checkOnCreate)&&this._stateSignals[this.stringValue]&&this._stateSignals[this.stringValue].dispatch()}setValue(k){(this.fireSignalsOnSameValue||k!==this.stringValue)&&(this.previousValue=this.stringValue,this.stringValue=k,this.onValueChanged.dispatch(this.stringValue,this.previousValue),this._stateSignals[k]&&this._stateSignals[k].dispatch())}goToPreviousValue(){this.setValue(this.previousValue)}checkValue(){this.onValueChecked.dispatch(this.stringValue),this._stateSignals[this.stringValue]&&this._stateSignals[this.stringValue].dispatch()}destroy(){this.onValueChanged.dispose(),this.onValueChecked.dispose(),Object.values(this._stateSignals).forEach((k=>k.dispose())),super.destroy()}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],zl.prototype,"stringValue",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],zl.prototype,"checkOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],zl.prototype,"forceChangeOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],zl.prototype,"fireSignalsOnSameValue",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],zl.prototype,"onValueChanged",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],zl.prototype,"onValueChecked",void 0),(0,G.Cg)([(0,j.OmD)(),(0,j.bbQ)(),(0,j.nKb)("stateSignals"),(0,G.Sn)("design:type",Object)],zl.prototype,"_stateSignals",void 0),zl=(0,G.Cg)([(0,j.WR4)(Kl),(0,j.EVk)("StringState",W.Y.utility)],zl);let Yl=class extends j.uAl{constructor(){super(...arguments),this._tweensToPlayOnUnlock=[],this._unlockSequenceDelayMS=1500,this._advanceTutorialSignal=new ql.S}create(){super.create();const k=this.getInjectedValue("EncounterBattleRequirementsMet"),B=this.getInjectedValue("EncounterBattleRequirements").requirements.map((k=>Eo.a.getRuleType(k.kennel)));Sl.instance.hasFTUEToShow(k,B)&&(this._segment.whiteGlove.initFTUEFunnelId(),this._segment.whiteGlove.sendRestrictionFTUEEvent("Restrictions screen opened"))}handleRequirementsMetChanged(){var k;const B=this.getInjectedValue("EncounterBattleRequirementsMet"),U=this.getInjectedValue("EncounterBattleRequirements");if(!(null==U?void 0:U.name))return;B&&this._segment.whiteGlove.sendRestrictionFTUEEvent("Restricted battle unlocked");!Sl.instance.initializeRestrictionFTUE(B,this._tutorialStringState,this._advanceTutorialSignal.onDispatch)&&this.playIntroAnimations(),this._startFeature.active=B;let F=!1;if(null===(k=null==U?void 0:U.requirements)||void 0===k?void 0:k.length)for(const G of U.requirements){const k=Eo.a.getRuleType(G.kennel);if(yo(k,(0,Bt.G)(mo))){F=!0;break}}this._goToHelperButton.active=!B&&F}playIntroAnimations(){const k=this.getInjectedValue("EncounterBattleRequirementsMet"),B=this.getInjectedValue("EncounterBattleRequirements");if(!(null==B?void 0:B.name))return;if(this.gameObject.findComponentsInChildren(Lo.B,!0).forEach((k=>{k.id===fl.RulesProgressBarTargetValue&&k.consume()})),!k)return;this._advanceTutorialSignal.onDispatch.dispatch();const U=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(U.completedRestrictionUnlockAnimationsSeen.includes(B.name)){this._padlockSpine.GameObject.active=!1;for(const k of this._tweensToPlayOnUnlock)(null==k?void 0:k.GameObject)&&(k.GameObject.active=!1);this._advanceTutorialSignal.onDispatch.dispatch()}else U.completedRestrictionUnlockAnimationsSeen.push(B.name),this._animationDelayTimeoutId=setTimeout((()=>{var k;this._padlockSpine.playAnimation("idle",!1,!0),null===(k=this._unlockSoundEffect)||void 0===k||k.play(),this.playUnlockTweens().then((()=>{this._advanceTutorialSignal.onDispatch.dispatch()})).catch(j.RQr.createHandler("Error playing unlock animation in RestrictionsPopupComponent"))}),this._unlockSequenceDelayMS)}playUnlockTweens(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=[];for(const B of this._tweensToPlayOnUnlock)B&&(k.push(B.onTweenComplete.asPromise()),B.playAnimation());yield Promise.all(k)}))}destroy(){this._segment.whiteGlove.clearFTUEFunnelId(),this._animationDelayTimeoutId&&clearTimeout(this._animationDelayTimeoutId),super.destroy()}};(0,G.Cg)([(0,j.MnK)(j.bTj),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],Yl.prototype,"_tweensToPlayOnUnlock",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],Yl.prototype,"_padlockSpine",void 0),(0,G.Cg)([(0,j.MnK)(hn.J),(0,G.Sn)("design:type",hn.J)],Yl.prototype,"_unlockSoundEffect",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yl.prototype,"_goToHelperButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yl.prototype,"_startFeature",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Yl.prototype,"_unlockSequenceDelayMS",void 0),(0,G.Cg)([(0,j.MnK)(zl),(0,G.Sn)("design:type",zl)],Yl.prototype,"_tutorialStringState",void 0),(0,G.Cg)([(0,j.MnK)(ql.S),(0,G.Sn)("design:type",ql.S)],Yl.prototype,"_advanceTutorialSignal",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],Yl.prototype,"_segment",void 0),Yl=(0,G.Cg)([(0,j.EVk)("RestrictionsPopup",j.YH6.ui,"Consumes the injected value and assigns the value to the referenced property")],Yl);var Ql,Xl=U(24652),Zl=U(74958),Jl=U(58707),tu=U(38560),eu=U(14117),iu=U(37050),su=U(39785);!function(k){k.REROLL="animation"}(Ql||(Ql={}));let nu=class extends j.uAl{destroy(){this._notEnoughCurrencyResponse.tryDismissTooltip(),super.destroy()}updateCachedRiftRunProgress(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._riftsSyncedDataStore.cache.currentRiftRunProgress;return k&&k.type===Xl.cn.Normal?(this._currentRiftRunProgress=k,!0):(j.VyI.log("RiftRunModifierPopupComponent: Cannot reroll modifier if current rift run is undefined",j.$bb.Error),!1)}))}onRerollClicked(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;this._notEnoughCurrencyResponse.tryDismissTooltip();if(!(yield this.updateCachedRiftRunProgress()))return;const B=null!==(k=this._currentRiftRunProgress.numBuffRerolls)&&void 0!==k?k:0,U={currency:27,value:iu.Q.getBuffRerollCost(B)};this._paymentManager.canAfford(U)?(this._mainBodyContent.active=!1,this.performRerollTransaction(U.value).then((()=>{this.showRerollAnimation()})).catch(j.RQr.createHandler("Error rerolling rift modifier"))):this.handleNotEnoughCurrency(U)}))}performRerollTransaction(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=this._segment.item.beginSecureItemTransaction(),U=Object.assign({},this._currentRiftRunProgress.buffModifier);yield this._riftsNetworkHandler.rerollRiftBuffModifier(this._currentRiftRunProgress.currentRiftTier);const F=this._currentRiftRunProgress.buffModifier,G=Object.assign(Object.assign({},this._segment.rifts.getRiftTransactionData()),{sink_type:Zl.Aj.RIFT_BONUS_REROLL_TYPE,sink_id:xt.$.generateUID()});this._segment.rifts.sendRiftRunBonusRerolled(F,U,k,G.transaction_id,G.sink_id),B.flush(G)}))}showRerollAnimation(){Nt.d.updateInjectedValues(this.gameObject,{MODIFIER_CARD_HEADER:"RIFTS_MODIFIER_REROLL"}),this._rerollAnimationSpine.GameObject.active=!0,this._rerollAnimationSpine.setAnimationByName(0,Ql.REROLL,!1),this._rerollAnimationSpine.onEvent.addOnce(((k,B)=>{this._mainBodyContent.active=!0,this.refreshModifier().catch(j.RQr.createHandler("RiftRunModifierPopupComponent: Error refreshing modifier after reroll animation")),Nt.d.updateInjectedValues(this.gameObject,{MODIFIER_CARD_HEADER:"TAKE_THIS_TO_HELP"})}),this),this._rerollAnimationSpine.getSpine().onComplete.addOnce((()=>{this._rerollAnimationSpine.GameObject.active=!1}),this)}refreshModifier(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;yield this.updateCachedRiftRunProgress();const B=null!==(k=this._currentRiftRunProgress.numBuffRerolls)&&void 0!==k?k:0,U=iu.Q.canRerollBuff(B),F=iu.Q.getBuffRerollCost(B),G=this._currentRiftRunProgress.buffModifier,j=tt.q.instance.prodigy.gameContainer.get("5c7-e02d");Nt.d.updateInjectedValues(this.GameObject,{IS_BUFF:!0,MODIFIER_ICON:(null==G?void 0:G.icon)?su.n.getGuidForModifierIcon(G.icon):"",MODIFIER_NAME:null==G?void 0:G.caption,MODIFIER_DESCRIPTION:null==G?void 0:G.description,MODIFIER_GOLD_BONUS:0,MODIFIER_REROLL_COST:F,SHOW_MC_COST:!j.isHardCurrencyMemberLocked(F),SHOW_MEMBER_ICON:j.isHardCurrencyMemberLocked(F),CAN_REROLL_MODIFIER:U,MAGICOIN_BALANCE:j.getBalance(27),RIFT_TIER:this._currentRiftRunProgress.currentRiftTier})}))}updateRerollButtons(k){this._rerollButtons.active=k,this._okayButton.active=!k}handleNotEnoughCurrency(k){const B=JSON.stringify(this._currentRiftRunProgress.buffModifier);this._notEnoughCurrencyResponse.handleNotEnoughCurrency(k,Zl.Aj.RIFT_BONUS_REROLL_TYPE,B)}};(0,G.Cg)([(0,Gi.b)("8f8-d5bc"),(0,G.Sn)("design:type",tu.B)],nu.prototype,"_riftsNetworkHandler",void 0),(0,G.Cg)([(0,Gi.b)("9ac-9677"),(0,G.Sn)("design:type",eu.M)],nu.prototype,"_riftsSyncedDataStore",void 0),(0,G.Cg)([(0,Gi.b)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],nu.prototype,"_segment",void 0),(0,G.Cg)([(0,j.Cdj)("743-fd51"),(0,G.Sn)("design:type",qn.E)],nu.prototype,"_paymentManager",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],nu.prototype,"_rerollButtons",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],nu.prototype,"_okayButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],nu.prototype,"_mainBodyContent",void 0),(0,G.Cg)([(0,j.MnK)(Jl.b),(0,G.Sn)("design:type",Jl.b)],nu.prototype,"_notEnoughCurrencyResponse",void 0),(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],nu.prototype,"_rerollAnimationSpine",void 0),nu=(0,G.Cg)([(0,j.EVk)("RiftRunModifierPopupComponent",W.Y.rifts)],nu);U(82436);var au,ru=U(45224);!function(k){k.Bunny="Bunny",k.Fox="Fox"}(au||(au={}));let ou=class extends j.uAl{constructor(){super(...arguments),this.onAllyDialogue=new j.HN0,this.onEnemyDialogue=new j.HN0,this.onNeutralDialogue=new j.HN0,this._faction=au.Bunny}run(){const k=this._loggedInPlayer.player.equipment.getHat(),B=this._faction===au.Bunny?ru.f.BUNNY_HATS:ru.f.FOX_HATS,U=this._faction===au.Bunny?ru.f.FOX_HATS:ru.f.BUNNY_HATS;B.includes(k)?this.onAllyDialogue.dispatch():U.includes(k)?this.onEnemyDialogue.dispatch():this.onNeutralDialogue.dispatch()}destroy(){this.onAllyDialogue.dispose(),this.onEnemyDialogue.dispose(),this.onNeutralDialogue.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ou.prototype,"onAllyDialogue",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ou.prototype,"onEnemyDialogue",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ou.prototype,"onNeutralDialogue",void 0),(0,G.Cg)([(0,j.gfw)(au),(0,G.Sn)("design:type",String)],ou.prototype,"_faction",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],ou.prototype,"_loggedInPlayer",void 0),ou=(0,G.Cg)([(0,j.EVk)("SpringfestNPC",W.Y.festival)],ou);U(66840);var hu=U(21001),cu=U(77823),du=(U(86323),U(64019),U(15160),U(35856),U(83441),U(571)),lu=U(10670),uu=U(52850);let fu=class extends j.uAl{constructor(){super(...arguments),this._maxPlayerNameLength=22,this._singleInvite=null}postCreate(){super.postCreate(),this.onDuelInviteUpdate()}onDuelInviteUpdate(){if(!this.isCreated)return;const k=uu.e.getActiveInvites(),B=k.length>0;if(this._contentContainer.active=B,B){const B=k.length>1;if(this._opponentNameText.GameObject.active=!B,this._singleOpponentLineText.GameObject.active=!B,this._multipleOpponentLineText.GameObject.active=B,this._duelButton.GameObject.active=!B,this._passButton.GameObject.active=!B,this._viewButton.GameObject.active=B,B)this.destroyOpponentPreview();else{this._singleInvite=k[0];const B=uu.e.getPlayerFromInvite(this._singleInvite);this.gameObject.active=!1,this.setOpponentData(B).catch(j.RQr.createHandler("Failed to set opponent data for duel invite notification")).finally((()=>this.gameObject.active=!0))}}}acceptSingleInvite(){uu.e.acceptInvite(lu.VB.Standard,this._singleInvite)}rejectSingleInvite(){uu.e.rejectInvite(this._singleInvite),this._contentContainer.active=!1}setOpponentData(k){return(0,G.sH)(this,void 0,void 0,(function*(){this.destroyOpponentPreview();const B=this._opponentContainer.findComponent(Za.B).getRootContainer(),U=yield du.z.createHeadFromAppearanceData({hair:k.appearance.getHair(),eyeColor:k.appearance.getEyeColor(),face:k.appearance.getFace(),hat:k.equipment.getHat(),skin:k.appearance.getSkinColor(),outfit:k.equipment.getOutfit(),weapon:k.equipment.getWeapon(),boot:k.equipment.getBoots(),costume:k.equipment.getCostume()});B.addChild(U);let F=k.getName();F.length>this._maxPlayerNameLength&&(F=`${F.substr(0,this._maxPlayerNameLength)}...`),this._opponentNameText.text=F}))}destroyOpponentPreview(){this._opponentContainer.findComponent(Za.B).getRootContainer().removeChildren()}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fu.prototype,"_opponentContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fu.prototype,"_contentContainer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],fu.prototype,"_opponentNameText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],fu.prototype,"_singleOpponentLineText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],fu.prototype,"_multipleOpponentLineText",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],fu.prototype,"_duelButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],fu.prototype,"_passButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],fu.prototype,"_viewButton",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],fu.prototype,"_maxPlayerNameLength",void 0),fu=(0,G.Cg)([(0,j.EVk)("DuelInviteNotification",W.Y.multiplayer)],fu);U(89584),U(29143),U(46352),U(72748),U(18278),U(88331),U(75935);let bu=class extends j.uAl{constructor(){super(...arguments),this._onTextMessageFinished=new j.HN0,this._messageCancellation={},this._messageQueue=[],this._pinnedMessagePromises=[]}create(){super.create(),this._onScreenY=this.gameObject.transform.localPosition.y,this.gameObject.transform.setPositionY(this._onScreenY-this._slideDistance)}showMessage(k,...B){this.showMessageForMs(this._holdMs,k,...B)}showMessageForMs(k,B,...U){const F=this._localizer.getText.apply(this._localizer,[B,...U]);this._messageQueue.push({message:F,holdTimeMs:k}),this.runQueue().catch(j.RQr.createHandler("Error showing message"))}waitForMessage(k,...B){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.waitForMessageForMs(this._holdMs,k,...B)}))}waitForMessageForMs(k,B,...U){return(0,G.sH)(this,void 0,void 0,(function*(){this.showMessageForMs(k,B,...U),this._slideTween&&(yield this._onTextMessageFinished.asPromise())}))}showPinnedMessage(k,...B){this.unpinMessage();const U=this._localizer.getText.apply(this._localizer,[k,...B]),F=new j.bnh;this._messageQueue.push({message:U,pinPromise:F}),this._pinnedMessagePromises.push(F),this.runQueue().catch(j.RQr.createHandler("Error showing message"))}waitForPinnedMessage(k,...B){return(0,G.sH)(this,void 0,void 0,(function*(){this.showPinnedMessage(k,...B),this._slideTween&&(yield this._onTextMessageFinished.asPromise())}))}unpinMessage(){const k=this._pinnedMessagePromises.shift();j.Aq$.isDefined(k)&&(k.resolve(),ct.remove(this._messageQueue,(B=>B.pinPromise===k)))}clearMessageQueue(){var k;this._slideTween&&(this._messageCancellation.cancelled=!0,this._messageCancellation={},null===(k=this._slideTween.onTweenComplete)||void 0===k||k.dispatch(),this._slideTween.stop(),tt.q.instance.game.tweens.remove(this._slideTween),this._slideTween=null),this._pinnedMessagePromises=[],this.gameObject.transform.setPositionY(this._onScreenY-this._slideDistance),this._messageQueue=[]}destroy(){this.clearMessageQueue(),this._onTextMessageFinished.dispose(),super.destroy()}runQueue(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;if(this._slideTween||!this.gameObject)return;const B=this._messageCancellation={};for(;this._messageQueue.length>=1;){const U=this._messageQueue.shift();if(this._textComponent.text=U.message,yield this.tweenBanner(1,this._slideInMs),B.cancelled)return;if(j.Aq$.isDefined(U.pinPromise)?yield U.pinPromise:yield j.Egh.timeout(null!==(k=U.holdTimeMs)&&void 0!==k?k:this._holdMs),B.cancelled)return;yield this.tweenBanner(0,this._slideOutMs)}this._slideTween=null,this._messageCancellation={},this._onTextMessageFinished.dispatch()}))}tweenBanner(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U={value:1-k},F=this._slideTween=tt.q.instance.game.add.tween(U,this,!0).to({value:k},B,j.GS3.Linear.None,!0);F.onUpdate.add((()=>{const k=U.value+.5*Math.sin(U.value*Math.PI);this.gameObject.transform.setPositionY(j.cj9.linear(this._onScreenY-this._slideDistance,this._onScreenY,k))})),yield F.onTweenComplete.asPromise()}))}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],bu.prototype,"_textComponent",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],bu.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],bu.prototype,"_slideInMs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],bu.prototype,"_holdMs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],bu.prototype,"_slideOutMs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],bu.prototype,"_slideDistance",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],bu.prototype,"_onTextMessageFinished",void 0),bu=(0,G.Cg)([(0,j.EVk)("TextLog",W.Y.battleRevamp)],bu);U(96711),U(99057),U(19176),U(47215),U(37987),U(45855);var pu=U(43516),vu=U(91620),gu=U(96797);let mu=class extends Fi.z{create(){super.create(),this._bindOnCreate&&this.bindContext()}bindContext(){const k=tt.q.instance.prodigy.gameContainer.get("c47-20b6"),B=this._segmentedOffersDataProvider.currentOfferStatus,U=this._segmentedOffersDataProvider.activeOffer;if(!j.Aq$.isDefined(U)||!this._segmentedOffersDataProvider.userCanReceiveSegmentedOffers())return void this.unbindContext();this._context.Container.rebind(hs.ht.SegmentedOffersTimeRemainingMS).toConstantValue(gu.P.getOfferTimeRemaining(U)),this._context.Container.rebind(hs.ht.SegmentedOfferCurrentOfferStatus).toConstantValue(B);const F=Object.assign({[hs.ht.SegmentedOffersTimeRemainingMS]:gu.P.getOfferTimeRemaining(U),[hs.ht.SegmentedOffersEnding]:gu.P.isOfferInGracePeriod(this._segmentedOffersDataProvider.activeOffer),[hs.ht.SegmentedOffersRejected]:this._segmentedOffersDataProvider.rejectActiveOffer.bind(this._segmentedOffersDataProvider),[hs.ht.SegmentedOffersFunnelAdvancedCTA]:gu.P.sendCtaFunnelAdvancedEvent.bind(this,k,this._segmentedOffersDataProvider.activeOffer),[hs.ht.SegmentedOffersFunnelAdvancedGotMembership]:gu.P.sendMembershipFunnelAdvancedEvent.bind(this,k,this._segmentedOffersDataProvider.activeOffer)},gu.P.getItemInjectableProperties(this._segmentedOffersDataProvider.rewardsForCurrentUserSegment));this._context.Container.rebind(hs.ht.SegmentedOffersModalInjectableProperties).toConstantValue(F),this.gameObject.findComponentsInChildren(Lo.B,!1).forEach((k=>k.consume()))}unbindContext(){this._context.Container.rebind(hs.ht.SegmentedOffersTimeRemainingMS).toConstantValue(0),this._context.Container.rebind(hs.ht.SegmentedOfferCurrentOfferStatus).toConstantValue(pu.v.NO_ACTIVE_OFFER),this._context.Container.rebind(hs.ht.SegmentedOffersModalInjectableProperties).toConstantValue({}),this.gameObject.findComponentsInChildren(Lo.B,!1).forEach((k=>k.consume()))}sendInterfaceOpenEvents(){if(!this._segmentedOffersDataProvider.activeOffer)return;const k=tt.q.instance.prodigy.gameContainer.get("c47-20b6");gu.P.sendInterfaceOpenEvents(k,this._segmentedOffersDataProvider.activeOffer,this._loggedInPlayer.player,!1)}};(0,G.Cg)([(0,j.Cdj)("a02-c2b2"),(0,G.Sn)("design:type",vu.D)],mu.prototype,"_segmentedOffersDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],mu.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],mu.prototype,"_bindOnCreate",void 0),mu=(0,G.Cg)([(0,j.EVk)("Segmented Offers - Access Point Data Provider",W.Y.ui,"Data provider for the Segmented Offers access point hud icon and popup")],mu);let yu=class extends j.PQK{installBindings(){const k=tt.q.instance.prodigy.gameContainer.get("c47-20b6"),B=tt.q.instance.prodigy.gameContainer.get("a02-c2b2");if(this.Container.bind(hs.ht.SegmentedOfferCurrentOfferStatus).toConstantValue(B.currentOfferStatus),!B.activeOffer)return void j.VyI.log("[SegmentedOffersInstaller] No active offer",j.$bb.Warning);this.Container.bind(hs.ht.SegmentedOffersTimeRemainingMS).toConstantValue(gu.P.getOfferTimeRemaining(B.activeOffer)),this.Container.bind(hs.ht.SegmentedOffersEnding).toConstantValue(gu.P.isOfferInGracePeriod(B.activeOffer)),this.Container.bind(hs.ht.SegmentedOffersRejected).toConstantValue(B.rejectActiveOffer.bind(B)),this.Container.bind(hs.ht.SegmentedOffersFunnelAdvancedCTA).toConstantValue(gu.P.sendCtaFunnelAdvancedEvent.bind(this,k,B.activeOffer)),this.Container.bind(hs.ht.SegmentedOffersFunnelAdvancedGotMembership).toConstantValue(gu.P.sendMembershipFunnelAdvancedEvent.bind(this,k,B.activeOffer));const U=gu.P.getItemInjectableProperties(B.rewardsForCurrentUserSegment);for(const F in U)this.Container.bind(F).toConstantValue(U[F])}};yu=(0,G.Cg)([(0,j.Og1)("SegmentedOffersInstaller","Installer")],yu);var _u=U(2980),Eu=U(77510);let wu=class extends j.uAl{constructor(){super(),this.onPauseButtonClicked=new j.HN0,this._stateChallengesService.onPauseButtonClicked.add((k=>this.onPauseButtonClicked.dispatch(k)))}destroy(){super.destroy(),this.onPauseButtonClicked.dispose(),this._stateChallengesService.onPauseButtonClicked.remove((k=>this.onPauseButtonClicked.dispatch(k)))}toggleMenuPause(){this._stateChallengesService.toggleMenuPause()}};(0,G.Cg)([(0,j.Cdj)("a94-4ba3"),(0,G.Sn)("design:type",Eu.z)],wu.prototype,"_stateChallengesService",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],wu.prototype,"onPauseButtonClicked",void 0),wu=(0,G.Cg)([(0,j.EVk)("StateChallengesService",W.Y.stateChallenges),(0,G.Sn)("design:paramtypes",[])],wu);var Tu,Su,Au=U(54140),Cu=U(54865),Ou=U(76846),Iu=U(59114),Du=U(63546),Ru=U(77713),Pu=U(37623),Mu=U(4766),Nu=U(8820);!function(k){k.CLASSROOM="CLASSROOM",k.SCHOOL="SCHOOL",k.NO_CLASS="NO_CLASS"}(Tu||(Tu={})),function(k){k.Default="Default",k.Qualified="Qualified",k.Champion="Champion",k.NationalCup="NationalCup"}(Su||(Su={}));class xu extends Du.${constructor(){super(...arguments),this._currentLeaderboardView=_u.W.SCHOOL,this._classroomRacerIds=[],this._schoolRacerIds=[],this._classroomPortraitIds=[],this._schoolPortraitIds=[]}enter(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;this._stateChallengesService=tt.q.instance.prodigy.gameContainer.get("a94-4ba3");const U=tt.q.instance.prodigy.gameContainer.get("43a-6f08");yield U.sendClassCodeQuestEvent().catch(j.RQr.createHandler("CurrentStateChallengeViewState: Error completing class code quest")),(yield U.isPreviousChallengeStarted())||(yield U.sendCurrentChallengeStartedEvent().catch(j.RQr.createHandler("CurrentStateChallengeViewState: Error starting current challenge"))),this._stateChallengesDataProvider=k.stateChallengesDataProvider,this._prefabGUID=Rt.l.CurrentStateChallengeView;const F=yield this._stateChallengesDataProvider.getCurrentSchoolRanking();this._currentLeaderboardView=void 0!==F&&F>=xu.LOW_PERFORMANCE_CUTOFF_RANK?_u.W.CLASSROOM:_u.W.SCHOOL,this._menuRootObject=k.rootMenuObject,this._classroomRacerIds=k.classroomRacerIds,this._schoolRacerIds=k.schoolRacerIds,this._classroomPortraitIds=k.classroomPortraitIds,this._schoolPortraitIds=k.schoolPortraitIds;const G=j.wa5.getActiveScene().container.sourceContainer,$=G.get("STATE_CHALLENGES_GOALS_DATA_PROVIDER"),H=$.GameObject.findComponentInChildren(j.bE_,!0);H||$.onDataReady.addOnce((k=>{Nt.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_MILESTONE_WIDGET_VISIBLE:!0})}));const V=this._stateChallengesDataProvider.getStateChallengesLeaderboard(_u.W.SCHOOL),W=this._stateChallengesDataProvider.getStateChallengesLeaderboard(_u.W.CLASSROOM),q=yield this._stateChallengesDataProvider.getSchoolQualificationStatus(),K=this.getDisplayMode(q),z=It.O.localeCode,Y=this._stateChallengesDataProvider.finalsPhaseStartDate;this._prefabInjectionValues=Object.assign(Object.assign(Object.assign({},this.getInjectionsForMode(K,Y,z)),{STATE_CHALLENGES_MILESTONE_WIDGET_VISIBLE:j.Aq$.isDefined(H),STATE_CHALLENGES_LEADERBOARD_TYPE:this._currentLeaderboardView,STATE_CHALLENGES_CURRENT_CLASS_DESC:W.competitorEntries.values.length>0?Pu.O.STATE_CHALLENGES_CLASS_DESCRIPTION:Pu.O.STATE_CHALLENGES_ONLY_CLASS_DESCRIPTION,STATE_CHALLENGES_CLASS_VIEW_NAME:null!==(B=W.myEntry.displayName)&&void 0!==B?B:"",STATE_CHALLENGES_CLASS_RANK_DELTA:W.myEntry.rankDeltaValue,STATE_CHALLENGES_CLASS_RANK_DELTA_ABS:Math.abs(W.myEntry.rankDeltaValue),STATE_CHALLENGES_SCHOOL_TAB_DATA:{label:this._localizer.getText(Pu.O.YOUR_SCHOOL),metadata:{leaderboard:_u.W.SCHOOL}},STATE_CHALLENGES_CLASS_TAB_DATA:{label:this._localizer.getText(Pu.O.YOUR_CLASS),metadata:{leaderboard:_u.W.CLASSROOM}},STATE_CHALLENGES_TOGGLE_GROUP_CALLBACK:this.onTabSelected.bind(this)}),this.setupChallengeBanner(F>=xu.LOW_PERFORMANCE_CUTOFF_RANK?W:V)),this.spawnRacers();const Q=j.wa5.getActiveScene().container.sourceContainer.get(Iu.Tz.STATE_CHALLENGES_BG_IDLE_TWEEN);G.get(Iu.Tz.STATE_CHALLENGES_BG_INTRO_TWEEN).resetToStart(),Q.resetToStart(),this._stateChallengesService&&this._stateChallengesService.isMenuPaused?Q.pauseAnimation():Q.playAnimation(),this._prefabGUID&&(this._prefabRoot=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGUID,this._prefabInjectionValues,k.rootMenuObject),Nt.d.updateInjectedValues(k.rootMenuObject,{[Iu.E2.STATE_CHALLENGES_SHOW_HEADER]:!0}))}))}getDisplayMode(k){return this._stateChallengesDataProvider.viewableCompetitionPhase===Nu.a.NationalCup?Su.NationalCup:k.wonStateChallenge?Su.Champion:k.qualifiedForNationalCup?Su.Qualified:Su.Default}getInjectionsForMode(k,B,U){const F=this.getDefaultStateChallengeInjections();switch(k){case Su.Champion:return Object.assign(Object.assign({},F),this.getChampionInjectionOverrides(B,U));case Su.Qualified:return Object.assign(Object.assign({},F),this.getQualifiedInjectionOverrides());case Su.NationalCup:return Object.assign(Object.assign({},F),this.getNationalCupInjectionOverrides());default:return F}}getDefaultStateChallengeInjections(){const k=Mu.H.getDaysUntilEndOfCurrentChallenge(this._stateChallengesDataProvider.activeCompetitionPhase,new Date(Date.now()),this._stateChallengesDataProvider.endDate).toString();return{STATE_CHALLENGES_SCHOOL_NATIONAL_QUALIFIED:!1,STATE_CHALLENGES_SCHOOL_INNER_QUALIFIER_BANNER_VISIBLE:!1,STATE_CHALLENGES_HAS_WON:!1,STATE_CHALLENGES_CURRENT_VIEW_SUBTITLE_KEY:Pu.O.STATE_CHALLENGES_ON_NOW,STATE_CHALLENGES_CURRENT_VIEW_TITLE:Au.X.getCurrentChallengeDisplayName(this._stateChallengesDataProvider.viewableCompetitionPhase),STATE_CHALLENGES_CURRENT_VIEW_DESCRIPTION:Pu.O.STATE_CHALLENGE_DESCRIPTION,STATE_CHALLENGES_TIME_REMAINING:Pu.O.STATE_CHALLENGES_ENDS_IN,STATE_CHALLENGES_TIME_REMAINING_ARGS:k}}getChampionInjectionOverrides(k,B){const U=Mu.H.getDaysUntilEndOfCurrentChallenge(this._stateChallengesDataProvider.activeCompetitionPhase,new Date(Date.now()),this._stateChallengesDataProvider.endDate).toString();return Object.assign({STATE_CHALLENGES_SCHOOL_NATIONAL_QUALIFIED:!0,STATE_CHALLENGES_HAS_WON:!0,STATE_CHALLENGES_CURRENT_VIEW_SUBTITLE_KEY:Pu.O.CHEST_REWARD_CONGRATULATIONS,STATE_CHALLENGES_CURRENT_VIEW_TITLE:this._localizer.getText(Pu.O.STATE_CHALLENGES_CHAMPION_TITLE),STATE_CHALLENGES_CURRENT_VIEW_DESCRIPTION:Pu.O.STATE_CHALLENGES_CHAMPION_DESCRIPTION},k?{STATE_CHALLENGES_TIME_REMAINING:Pu.O.STATE_CHALENGES_STARTS,STATE_CHALLENGES_TIME_REMAINING_ARGS:k.toLocaleString(B,{month:"long",day:"numeric"})}:{STATE_CHALLENGES_TIME_REMAINING_ARGS:U})}getQualifiedInjectionOverrides(){return{STATE_CHALLENGES_SCHOOL_NATIONAL_QUALIFIED:!0,STATE_CHALLENGES_SCHOOL_INNER_QUALIFIER_BANNER_VISIBLE:!0,STATE_CHALLENGES_CURRENT_VIEW_DESCRIPTION:Pu.O.STATE_CHALLENGES_QUALIFIED_DESCRIPTION}}getNationalCupInjectionOverrides(){return{STATE_CHALLENGES_CURRENT_VIEW_DESCRIPTION:Pu.O.NATIONAL_CUP_DESCRIPTION,STATE_CHALLENGES_SCHOOL_NATIONAL_QUALIFIED:!0,STATE_CHALLENGES_HAS_WON:!0}}onTabSelected(k){var B,U;if(this._currentLeaderboardView===k.metadata.leaderboard)return;this._currentLeaderboardView=k.metadata.leaderboard;const F=this._stateChallengesDataProvider.getStateChallengesLeaderboard(this._currentLeaderboardView),G=tt.q.instance.prodigy.gameContainer.get("43a-6f08");tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:us.B.ProdigyChallenge,interfaceType:ui.Wm.Screen,instanceType:fi.N.UI,originType:ui.$N.TabClick,originID:Is.k.StateChallengesTab},{sub_ui_name:this._currentLeaderboardView===_u.W.CLASSROOM?"class":"school",item_list:{challenge_id:G.getCurrentChallengeUniqueId()+this._stateChallengesDataProvider.getCurrentChallengeSuffixForSegmentEvents(),rank:null===(B=null==F?void 0:F.myEntry)||void 0===B?void 0:B.rank}});const j=Object.assign({STATE_CHALLENGES_CLASS_VIEW_NAME:this._currentLeaderboardView===_u.W.CLASSROOM?null===(U=null==F?void 0:F.myEntry)||void 0===U?void 0:U.displayName:void 0,STATE_CHALLENGES_LEADERBOARD_TYPE:this._currentLeaderboardView},this.setupChallengeBanner(F));Nt.d.updateInjectedValues(this._prefabRoot,j),this.spawnRacers()}setupChallengeBanner(k){var B;const U=k.myEntry.rank,F=this._currentLeaderboardView===_u.W.CLASSROOM?Iu.yT.classViewHeroPetId:Iu.yT.schoolViewHeroPetId,G=j.Aq$.isDefined(U);return{STATE_CHALLENGES_BANNER_PORTRAIT_ID:F,STATE_CHALLENGES_BANNER_RANK:null!==(B=null==U?void 0:U.toString())&&void 0!==B?B:this._stateChallengesDataProvider.totalPhaseCorrectAnswers.toString(),STATE_CHALLENGE_BANNER_TROPHY_ASSET:[Ve._.State_challenges_json,U<=3?Iu.yT.bannerTrophyAssets[U-1]:""],STATE_CHALLENGES_BANNER_TROPHY_VISIBLE:G&&U<=3&&this._currentLeaderboardView!==_u.W.CLASSROOM,STATE_CHALLENGES_BANNER_ANSWERS:k.myEntry.correctAnswers,STATE_CHALLENGES_BANNER_POINTS_TITLE:`${this._localizer.getText(Pu.O.POINTS)}:`,STATE_CHALLENGES_BANNER_ICON_VISIBILITY:this._currentLeaderboardView===_u.W.SCHOOL,STATE_CHALLENGES_BANNER_RIGHT_LOC:G?"LEADERBOARDS_SUBHEADING_CORRECT_ANSWERS":Pu.O.STATE_CHALLENGES_THIS_MONTH,STATE_CHALLENGES_BANNER_LEFT_LOC:G?Pu.O.STATE_CHALLENGES_RANK:Pu.O.STATE_CHALLENGES_TOTAL_CORRECT}}spawnRacers(){this._menuRootObject.findComponentsInChildren(Ru.h).forEach((k=>{k.destroySpawnedPrefabs()}));const k=this._currentLeaderboardView===_u.W.CLASSROOM?Iu.yT.classViewHeroPetId:Iu.yT.schoolViewHeroPetId,B=this._currentLeaderboardView===_u.W.CLASSROOM?this._classroomRacerIds:this._schoolRacerIds,U=`${this._currentLeaderboardView===_u.W.CLASSROOM?this._localizer.getText(Pu.O.YOUR_CLASS):this._localizer.getText(Pu.O.YOUR_SCHOOL)}!`;Nt.d.updateInjectedValues(this._menuRootObject,{STATE_CHALLENGES_FOOTRACE_PETS_DATA:Au.X.getStateChallengeRacersInjectionData(this._currentLeaderboardView,U,k,B,this._stateChallengesDataProvider),STATE_CHALLENGES_DISTANT_RACER_DATA:this.setupRacerPortraits()})}getStateChallengesDistanceRacerInjectionDataForIndex(k,B,U){var F;const G=this._stateChallengesDataProvider.getStateChallengesLeaderboard(this._currentLeaderboardView),j=this._currentLeaderboardView===_u.W.CLASSROOM?this._classroomPortraitIds:this._schoolPortraitIds,$=G.competitorEntries.get(U);if($)return{STATE_CHALLENGES_DISTANT_RACER_ID:j[k],STATE_CHALLENGES_PORTRAIT_TROPHY_ASSET:[Ve._.State_challenges_json,Iu.yT.bannerTrophyAssets[B]],STATE_CHALLENGES_RACER_NAME:xt.$.truncate(null!==(F=null==$?void 0:$.displayName)&&void 0!==F?F:"",35,!0),STATE_CHALLENGES_RACER_RANK:null==$?void 0:$.rank,STATE_CHALLENGES_RACER_ANSWERS:null==$?void 0:$.correctAnswers}}setupRacerPortraits(){const k=this._stateChallengesDataProvider.getStateChallengesLeaderboard(this._currentLeaderboardView).myEntry.rank,B=[];return k>3&&(4===k?(B.push(this.getStateChallengesDistanceRacerInjectionDataForIndex(0,0,1)),B.push(this.getStateChallengesDistanceRacerInjectionDataForIndex(1,1,2))):(B.push(this.getStateChallengesDistanceRacerInjectionDataForIndex(0,1,2)),B.push(this.getStateChallengesDistanceRacerInjectionDataForIndex(1,0,1)),B.push(this.getStateChallengesDistanceRacerInjectionDataForIndex(2,2,3)))),B.filter((k=>void 0!==k))}}xu.LOW_PERFORMANCE_CUTOFF_RANK=30;class Lu extends Du.${enter(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=tt.q.instance.prodigy.gameContainer.get("43a-6f08"),U=yield B.isClassCodeQuestCompleted();this._prefabGUID=Rt.l.StateChallengesNoClassState,this._prefabRoot=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGUID,{STATE_CHALLENGES_SHOW_MAGICOIN_REWARD:!U},k.rootMenuObject.children[k.rootMenuObject.children.length-1]),tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:us.B.ProdigyChallengeClassCode,interfaceType:ui.Wm.Screen,instanceType:fi.N.UI,originType:ui.$N.ButtonClick});const F=tt.q.instance.prodigy.gameContainer.get("0f9-dd7b").activeCompetitionPhase;Nt.d.updateInjectedValues(k.rootMenuObject,{STATE_CHALLENGES_FOOTRACE_PETS_DATA:this.getPetsData(),STATE_CHALLENGES_CURRENT_VIEW_TITLE:Au.X.getCurrentChallengeDisplayName(F),STATE_CHALLENGES_NO_CLASS_GOT_ITEM_COMPLETE:()=>{k.onClassCodeSet().then((()=>{k.rootMenuObject.findComponentsInChildren(Ru.h).forEach((k=>{k.destroySpawnedPrefabs()})),this._prefabRoot&&this._prefabRoot.destroy()})).catch(j.RQr.createHandler("StateChallengesNoClassState: Failed to handle class code set."))}});const G=j.wa5.getActiveScene().container.sourceContainer.get(Iu.Tz.STATE_CHALLENGES_BG_IDLE_TWEEN);G.resetToStart(),G.playAnimation()}))}exit(){return(0,G.sH)(this,void 0,void 0,(function*(){this._prefabRoot&&this._prefabRoot.destroy()}))}getPetsData(){return[{STATE_CHALLENGES_FOOTRACE_PET_ID:Iu.yT.schoolViewPetIds[0],STATE_CHALLENGES_FOOTRACE_PET_POSITION:[Iu.yT.defaultRacerOffsets[0],Iu.yT.yOffsets[0]],STATE_CHALLENGES_FOOTRACE_PETS_INITIAL_ANIMATION:Xa.Q2.Walk},{STATE_CHALLENGES_FOOTRACE_PET_ID:Iu.yT.schoolViewHeroPetId,STATE_CHALLENGES_FOOTRACE_PET_POSITION:[Iu.yT.defaultRacerOffsets[1],Iu.yT.yOffsets[1]],STATE_CHALLENGES_FOOTRACE_PETS_INITIAL_ANIMATION:Xa.Q2.Walk},{STATE_CHALLENGES_FOOTRACE_PET_ID:Iu.yT.schoolViewPetIds[1],STATE_CHALLENGES_FOOTRACE_PET_POSITION:[Iu.yT.defaultRacerOffsets[2],Iu.yT.yOffsets[2]],STATE_CHALLENGES_FOOTRACE_PETS_INITIAL_ANIMATION:Xa.Q2.Walk}]}}var ku=U(21953),Bu=U(25431);class Uu extends Du.${constructor(){super(...arguments),this._RLTweenOffsetX=1e3,this._skippedIntro=!1}enter(k){return(0,G.sH)(this,void 0,void 0,(function*(){this._cachedStateParams=k,this._menuRootObject=k.rootMenuObject,this._prefabGUID=Rt.l.StateChallengesIntroAnimationState;const B=k.stateChallengesDataProvider,U=B.isInitialized;U||B.initialize().then((()=>{Nt.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_SKIP_BUTTON_VISIBLE:!0})})).catch(j.RQr.createHandler("StateChallengesIntroAnimationState: Error initializing StateChallengesDataProvider")),B.setAnimationPlayed(),this._prefabRoot=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGUID,{STATE_CHALLENGES_SKIP_BUTTON_VISIBLE:U,STATE_CHALLENGES_SKIP_BUTTON_CALLBACK:()=>{tt.q.instance.prodigy.gameContainer.get("43a-6f08").markDataAsDirty(),this._skippedIntro=!0,this._stateMachine.goToState(xu,Object.assign(Object.assign({},this._cachedStateParams),{spawnRacers:!0})).catch(j.RQr.createHandler("StateChallengesIntroAnimationState: Error transitioning to CurrentStateChallengeViewState"))}},this._menuRootObject);const F=this.generateIntroRacersData();Nt.d.updateInjectedValues(this._menuRootObject,{STATE_CHALLENGES_FOOTRACE_PETS_DATA:F,STATE_CHALLENGES_RACERS_SPAWNED_CALLBACK:this.onRacersSpawned.bind(this)})}))}exit(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;null===(k=this._prefabRoot)||void 0===k||k.destroy()}))}onRacersSpawned(){if(this._skippedIntro)return;const k=j.wa5.getActiveScene().container.sourceContainer,B=k.getAll(Iu.Tz.STATE_CHALLENGES_LR_TWEEN);Promise.all(B.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k.playAnimation(),new Promise((B=>k.onTweenComplete.addOnce(B)))}))))).then((()=>this.onLeftRightTweenComplete())).catch(j.RQr.createHandler("StateChallengesIntroAnimationState: Error playing racer intro tweens"));const U=k.get(Iu.Tz.STATE_CHALLENGES_BG_INTRO_TWEEN);U.onTweenComplete.addOnce((()=>{U.resetToStart()})),U.playAnimation()}onLeftRightTweenComplete(){this._menuRootObject.findComponentsInChildren(Ru.h).forEach((k=>k.destroySpawnedPrefabs()));const k=Au.X.getStateChallengeRacersInjectionData(_u.W.SCHOOL,this._localizer.getText(Pu.O.YOUR_SCHOOL),Iu.yT.schoolViewHeroPetId,this._cachedStateParams.schoolRacerIds,this._cachedStateParams.stateChallengesDataProvider);k.forEach((k=>{k.STATE_CHALLENGES_FOOTRACE_PET_POSITION[0]+=this._RLTweenOffsetX,k.STATE_CHALLENGES_ANSWERS_VISIBLE=!1,k.STATE_CHALLENGES_SELF_BUBBLE_VISIBLE=!1})),Nt.d.updateInjectedValues(this._menuRootObject,{STATE_CHALLENGES_FOOTRACE_PETS_DATA:k,STATE_CHALLENGES_RACERS_SPAWNED_CALLBACK:this.onCurrentViewRacersSpawned.bind(this)})}onCurrentViewRacersSpawned(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=j.wa5.getActiveScene().container.sourceContainer.getAll(Iu.Tz.STATE_CHALLENGES_RL_TWEEN);yield Promise.all(k.map(((k,B)=>(0,G.sH)(this,void 0,void 0,(function*(){return k.playAnimation(),new Promise((U=>{k.onTweenComplete.addOnce((()=>{Nt.d.updateInjectedValues(k.GameObject.parent,{STATE_CHALLENGES_ANSWERS_VISIBLE:1!==B,STATE_CHALLENGES_SELF_BUBBLE_VISIBLE:1===B}),U()}))}))}))))),tt.q.instance.prodigy.gameContainer.get("43a-6f08").markDataAsDirty(),this._stateMachine.goToState(xu,Object.assign({},this._cachedStateParams)).catch(j.RQr.createHandler("StateChallengesIntroAnimationState: Error transitioning to CurrentStateChallengeViewState"))}))}generateIntroRacersData(){const k=[...Iu.yT.schoolViewPetIds],B=[];for(let U=0;U0;U++){const F=k.splice(Math.floor(Math.random()*k.length),1)[0],G=Iu.yT.introAnimationStartPositions[U];B.push({STATE_CHALLENGES_FOOTRACE_PET_ID:F,STATE_CHALLENGES_FOOTRACE_PET_POSITION:[G.x,G.y],STATE_CHALLENGES_FOOTRACE_PETS_INITIAL_ANIMATION:Xa.Q2.Walk})}return B.push({STATE_CHALLENGES_FOOTRACE_PET_ID:Iu.yT.schoolViewHeroPetId,STATE_CHALLENGES_FOOTRACE_PET_POSITION:[Iu.yT.introAnimationHeroPosition.x,Iu.yT.introAnimationHeroPosition.y],STATE_CHALLENGES_FOOTRACE_PETS_INITIAL_ANIMATION:Xa.Q2.Walk}),B}}class Fu extends Du.${constructor(){super(...arguments),this._highestMilestoneAchieved=0,this._rewardSequenceIndex=0,this._maxRewardSequenceIndex=3,this._materialRewards=[],this._celebrationBoxItem={name:"Celebration Box",icon:ps.q.Icon_celebration_pack,amount:0}}enter(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U;this._cachedEnterParams=k,Nt.d.updateInjectedValues(k.rootMenuObject,{[Iu.E2.STATE_CHALLENGES_SHOW_HEADER]:!1});const F=k.stateChallengesDataProvider.getSchoolEntryForPreviousChallenge();if(!F)return this._rewardSequenceIndex=this._maxRewardSequenceIndex,void this.showNextRewardInSequence();this._previousRank=F.rank,this._correctAnswers=F.correctAnswers;const G=this.rankIsValid(this._previousRank),$=G&&this._previousRank<=5,H=G&&this._previousRank<=3,V=tt.q.instance.prodigy.gameContainer.get("c47-20b6");$&&V.item.beginSecureItemTransaction();const W=tt.q.instance.prodigy.gameContainer.get("a96-1470"),q=yield W.getEndOfChallengeRewards(this._previousRank,this._correctAnswers);this._highestMilestoneAchieved=q.highestMilestoneValue,this._finalsPhaseStartDate=k.stateChallengesDataProvider.finalsPhaseStartDate;const K=tt.q.instance.prodigy.gameContainer.get("43a-6f08");if($){this._celebrationBoxItem.name=this._localizer.getText(Pu.O.STATE_CHALLENGE_CELEBRATION_BOX);const k=null===(B=q.endOfChallengeRewards)||void 0===B?void 0:B[this._previousRank],F=Yt.t.getItem("pet",null!==(U=null==k?void 0:k.ID)&&void 0!==U?U:0);if(F){Qt.J.bagItem(F,tt.q.instance.game,void 0,void 0,{source_type:li.C.StateChallengePodium,source_id:`${K.getPreviousChallengeUniqueId()}-${this._previousRank}`,instance_type:fi.N.StateChallenge,instance_id:V.featureCommon.getCurrentInterfaceID(us.B.ProdigyChallenge),transaction_id:xt.$.generateUID()});tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.forceSaveCharacter();const k=[{name:F.name,icon:fs.E.getIconForType(F.type,F.ID),amount:1}];1===this._previousRank?this._materialRewards=[this._celebrationBoxItem,...k]:this._materialRewards=[...k],yield tt.q.instance.prodigy.load.assetsAsPromise(this._materialRewards.map((k=>k.icon)))}else j.VyI.log(`No reward item found for rank ${this._previousRank}`,j.$bb.Warning)}this._prefabInjectionValues={STATE_CHALLENGES_BANNER_RANK:G?xt.$.addOrdinalSuffix(this._previousRank):this._localizer.getText(Pu.O.NATIONAL_CUP_RESULTS_PENDING),STATE_CHALLENGE_BANNER_TROPHY_ASSET:[Ve._.State_challenges_json,H?Iu.yT.bannerTrophyAssets[this._previousRank-1]:""],STATE_CHALLENGES_BANNER_TROPHY_VISIBLE:H,STATE_CHALLENGES_REWARD_RANK_TROPHY:[Ve._.State_challenges_json,$?Iu.yT.postChallengeTrophyAssets[Math.min(this._previousRank-1,Iu.yT.postChallengeTrophyAssets.length-1)]:""],STATE_CHALLENGES_BANNER_ANSWERS:this._correctAnswers,STATE_CHALLENGES_REWARDS_RANK_VISIBLE:$,STATE_CHALLENGES_POST_CHALLENGE_REWARDS_VISIBLE:this._highestMilestoneAchieved>0||this._materialRewards.length>0||$,STATE_CHALLENGES_BANNER_LEFT_LOC:Pu.O.STATE_CHALLENGES_RANK},this._prefabRoot=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.StateChallengesPostChallengeView,this._prefabInjectionValues,k.rootMenuObject),tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:us.B.ProdigyChallengeResult,interfaceType:ui.Wm.Screen,instanceType:fi.N.UI,originType:ui.$N.ButtonClick},{item_list:{challenge_id:K.getPreviousChallengeUniqueId()+k.stateChallengesDataProvider.getPreviousChallengeSuffixForSegmentEvents()}}),this._currentSchoolRank=yield k.stateChallengesDataProvider.getCurrentSchoolRanking(),this.showNextRewardInSequence()}))}rankIsValid(k){return j.Aq$.isDefined(k)&&k>0}showNextRewardInSequence(){var k,B;const U=null!==(B=null===(k=this._cachedEnterParams)||void 0===k?void 0:k.stateChallengesDataProvider.isInNationalCupRewardCollectionPeriod())&&void 0!==B&&B?[this.showNationalCupEnded.bind(this),this.showMaterialRewards.bind(this),this.showMilestoneAchievements.bind(this)]:[this.showMaterialRewards.bind(this),this.showMilestoneAchievements.bind(this),this.showQualification.bind(this)];this._rewardSequenceIndex{k&&Nt.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_REWARDS_NEXT_BUTTON_TEXT:this._localizer.getText(Pu.O.STATE_CHALLENGES_CLAIM_REWARDS)})})).catch(j.RQr.createHandler("StateChallengesPostChallengeState: prefetchAndUpdateClaimButton"))}collectPastMilestoneRewards(){const k=tt.q.instance.prodigy.gameContainer.get("c47-20b6").item.beginSecureItemTransaction(),B=tt.q.instance.prodigy.gameContainer.get("a96-1470"),U=this._cachedEnterParams.stateChallengesDataProvider.getGoalsParametersDataForPreviousChallenge();if(!U)return j.VyI.log("StateChallengesPostChallengeState: Error claiming previous state challenge milestone rewards",j.$bb.Error),void this.goToNextState();B.claimPreviousStateChallengeGoalsRewards(U).then((B=>(0,G.sH)(this,void 0,void 0,(function*(){const U=tt.q.instance.prodigy.gameContainer.get("43a-6f08");yield this.setSegmentDataForMilestoneRewards(k,U),k.flush({}),yield U.processPreviousChallengeRewardsResponse(B),yield Bu.b.getData(),yield U.sendCurrentChallengeStartedEvent(),tt.q.instance.game.broadcaster.broadcast(jn.Y1.HUDRevampButtonVisibilityRefreshRequested),this.onRewardCompleteGoToNextState()})))).catch(j.RQr.createHandler("StateChallengesPostChallengeState: Error claiming previous state challenge milestone rewards"))}setSegmentDataForMilestoneRewards(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=yield Bu.b.getPreviousChallengeMilestoneRewards(),F=tt.q.instance.prodigy.gameContainer.get("c47-20b6"),G=B.getPreviousChallengeUniqueId(),j=this._cachedEnterParams.stateChallengesDataProvider.getPreviousChallengeSuffixForSegmentEvents();for(const B of U)k.setIndividualData(B.type,B.id,{source_id:`${G}-${B.milestoneIndex}${j}`,instance_id:F.featureCommon.getCurrentInterfaceID(us.B.ProdigyChallengeResult),instance_type:fi.N.StateChallenge,source_type:li.C.StateChallengeMilestone})}))}onRewardCompleteGoToNextState(){var k,B,U;null===(k=this._prefabRoot)||void 0===k||k.destroyDeferred();const F=this._currentSchoolRank>=xu.LOW_PERFORMANCE_CUTOFF_RANK;let G;if(F){G=null===(U=null===(B=tt.q.instance.prodigy.gameContainer.get("0f9-dd7b").getStateChallengesLeaderboard(_u.W.CLASSROOM))||void 0===B?void 0:B.myEntry)||void 0===U?void 0:U.rank}const j=tt.q.instance.prodigy.gameContainer.get("43a-6f08");tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:us.B.ProdigyChallenge,interfaceType:ui.Wm.Screen,instanceType:fi.N.UI,originType:ui.$N.ButtonClick},{sub_ui_name:F?"class":"school",item_list:{challenge_id:j.getCurrentChallengeUniqueId()+this._cachedEnterParams.stateChallengesDataProvider.getCurrentChallengeSuffixForSegmentEvents(),rank:F?G:this._currentSchoolRank}}),this.goToNextState()}goToNextState(){tt.q.instance.prodigy.gameContainer.get("43a-6f08").markDataAsDirty(),this._cachedEnterParams.stateChallengesDataProvider.isInActiveCompetition()?this._stateMachine.goToState(Uu,this._cachedEnterParams).catch(j.RQr.createHandler("StateChallengesPostChallengeState: goToState")):this._cachedEnterParams.rootMenuObject.destroyDeferred()}showMaterialRewards(){if(!j.Aq$.isDefined(this._previousRank)||this._previousRank>5||0===this._materialRewards.length)this._rewardSequenceIndex++,this.showNextRewardInSequence();else{const k=this._materialRewards.shift();k&&Nt.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_REWARDS_NATIONAL_CUP_ENDED:!1,STATE_CHALLENGES_MATERIAL_REWARDS_VISIBLE:!0,STATE_CHALLENGES_MATERIAL_REWARD_NAME:k.name,STATE_CHALLENGES_REWARD_ICON:k.icon,STATE_CHALLENGES_REWARD_AMOUNT:`x ${k.amount}`,STATE_CHALLENGES_SHOW_REWARD_AMOUNT:k.amount>0,STATE_CHALLENGES_REWARDS_NEXT_BUTTON_CALLBACK:()=>this.showMaterialRewards(),STATE_CHALLENGES_REWARD_INFO_TEXT:Pu.O.YOUR_PRIZES})}}showMilestoneAchievements(){if(0===this._highestMilestoneAchieved)return this._rewardSequenceIndex++,void this.showNextRewardInSequence();const k=Object.keys(Iu.yT.postChallengeMilestoneAssetMap).map(Number).reduce(((k,B)=>B<=this._highestMilestoneAchieved?B:k),0);Nt.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_REWARDS_NATIONAL_CUP_ENDED:!1,STATE_CHALLENGES_MATERIAL_REWARDS_VISIBLE:!1,STATE_CHALLENGES_REWARDS_MILESTONE_PROGRESS_VISIBLE:!0,STATE_CHALLENGES_MILESTONE_VALUE:this._highestMilestoneAchieved,STATE_CHALLENGES_MILESTONE_CREST:[Ve._.State_challenges_json,Iu.yT.postChallengeMilestoneAssetMap[k]],STATE_CHALLENGES_REWARDS_NEXT_BUTTON_CALLBACK:()=>{this._rewardSequenceIndex++,this.showNextRewardInSequence()},STATE_CHALLENGES_REWARD_INFO_TEXT:Pu.O.HIGHEST_MILESTONE})}showNationalCupEnded(){var k,B;const U=null!==(B=null===(k=this._cachedEnterParams)||void 0===k?void 0:k.stateChallengesDataProvider.nationalCupResultsValidated)&&void 0!==B&&B;Nt.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_MATERIAL_REWARDS_VISIBLE:!1,STATE_CHALLENGES_REWARDS_MILESTONE_PROGRESS_VISIBLE:!1,STATE_CHALLENGES_REWARDS_QUALIFICATION_VISIBLE:!1,STATE_CHALLENGES_REWARDS_NATIONAL_CUP_ENDED:!0,STATE_CHALLENGES_REWARDS_NEXT_BUTTON_CALLBACK:()=>{this._rewardSequenceIndex++,this.showNextRewardInSequence()},NATIONAL_CUP_RESULTS_OFFICIAL_TEXT:U?Pu.O.NATIONAL_CUP_RESULTS_OFFICIAL:Pu.O.NATIONAL_CUP_RESULTS_PENDING_LONG,STATE_CHALLENGES_REWARD_INFO_TEXT:Pu.O.NATIONAL_CUP_ENDED_LONG})}showQualification(){var k;if(this._previousRank>5)return void(this._highestMilestoneAchieved>0?(this._rewardSequenceIndex++,this.showNextRewardInSequence()):Nt.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_REWARDS_NEXT_BUTTON_CALLBACK:()=>{this._rewardSequenceIndex++,this.showNextRewardInSequence()}}));const B=It.O.localeCode,U=null===(k=this._finalsPhaseStartDate)||void 0===k?void 0:k.toLocaleDateString(B,{month:"long",day:"numeric"}),F=tt.q.instance.prodigy.gameContainer.get(j.Oap);Nt.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_MATERIAL_REWARDS_VISIBLE:!1,STATE_CHALLENGES_REWARDS_MILESTONE_PROGRESS_VISIBLE:!1,STATE_CHALLENGES_REWARDS_QUALIFICATION_VISIBLE:!0,STATE_CHALLENGES_NEXT_CHALLENGE_DATE:U?`${U}!`:F.getText("RIFTS_MAX_RIFT_CARD_COMING_SOON"),STATE_CHALLENGES_REWARDS_NEXT_BUTTON_CALLBACK:()=>{this._rewardSequenceIndex++,this.showNextRewardInSequence()},STATE_CHALLENGES_REWARD_INFO_TEXT:Pu.O.YOU_QUALIFIED,STATE_CHALLENGES_REWARDS_NEXT_BUTTON_TEXT:this.rankIsValid(this._previousRank)&&this._previousRank>1?this._localizer.getText(Pu.O.NEXT_CHALLENGE):this._localizer.getText(Pu.O.BUTTON_NEXT_CAPITAL)})}}class Gu extends Du.${enter(k){return(0,G.sH)(this,void 0,void 0,(function*(){this._prefabGUID=Rt.l.StateChallengesNoDataState,this._prefabRoot=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGUID,{STATE_CHALLENGES_NO_DATA_BUTTON_CALLBACK:()=>{k.rootMenuObject.destroyDeferred()}},k.rootMenuObject),Nt.d.updateInjectedValues(k.rootMenuObject,{[Iu.E2.STATE_CHALLENGES_SHOW_HEADER]:!1})}))}}class ju extends Du.${enter(k){return(0,G.sH)(this,void 0,void 0,(function*(){this._prefabGUID=Rt.l.StateChallengesDownTimeState,this._prefabRoot=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGUID,{STATE_CHALLENGES_NO_DATA_BUTTON_CALLBACK:()=>{k.rootMenuObject.destroyDeferred()}},k.rootMenuObject),Nt.d.updateInjectedValues(k.rootMenuObject,{[Iu.E2.STATE_CHALLENGES_SHOW_HEADER]:!1});const B=k.stateChallengesDataProvider.downtimeTitleLocalizationKeyOverride,U=k.stateChallengesDataProvider.downtimeSubtitleLocalizationKeyOverride;(j.Aq$.isDefined(B)||j.Aq$.isDefined(U))&&Nt.d.updateInjectedValues(k.rootMenuObject,Object.assign(Object.assign({},j.Aq$.isDefined(B)&&{[Iu.E2.STATE_CHALLENGES_DOWNTIME_TITLE_OVERRIDE]:B}),j.Aq$.isDefined(U)&&{[Iu.E2.STATE_CHALLENGES_DOWNTIME_SUBTITLE_OVERRIDE]:U}))}))}}let $u=class extends j.uAl{constructor(){super(...arguments),this.onDataInitialized=new j.HN0,this._hasUnseenChallengeResults=void 0,this.onUnseenChallengeResultsSet=new j.HN0}getRacers(){return this._racersContainer.children}create(){this.st=tt.q.instance.prodigy.gameContainer.get("c97-bd0d");const k={[Iu.E2.STATE_CHALLENGES_SHOW_HEADER]:!0,[hs.bL.ShowHeaderText]:!1,[hs.bL.ShowMagicoinText]:!0,[hs.bL.HeaderTitle]:tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("STATE_CHALLENGES_TITLE"),[hs.bL.OnClose]:()=>{this.onCloseMenu().catch((k=>{j.VyI.log("Error attempting to close menu",j.$bb.Error,k)}))}};Nt.d.updateInjectedValues(this.gameObject,k),this._setupPromise=new j.bnh,this.setupInitialState().then((()=>{j.VyI.log("StateChallengesMenu initialized",j.$bb.Info)})).catch(j.RQr.createHandler("StateChallengesMenu: setupInitialState")).finally((()=>{this._setupPromise.resolve()}))}setUnseenChallengeResults(k){this._hasUnseenChallengeResults=Boolean(!k.getInjectedValue(ku.V.IsCurrentChallengeStarted)&&k.getInjectedValue(ku.V.WasPreviousChallengeStarted)),this.onUnseenChallengeResultsSet.dispatch()}setupInitialState(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F,$,H;const V=yield this.st.getCurrentClassCode();if(j.Aq$.isDefined(null===(F=null===(U=null===(B=null===(k=V)||void 0===k?void 0:k.data)||void 0===B?void 0:B.player)||void 0===U?void 0:U.currentClassroom)||void 0===F?void 0:F.code)){const k=[];k.push(this._stateChallengesDataProvider.initialize()),j.Aq$.isDefined(this._hasUnseenChallengeResults)||k.push(new Promise((k=>{this.onUnseenChallengeResultsSet.addOnce((()=>{k()}))}))),yield Promise.all(k),yield this._stateChallengesDataProvider.checkAndCacheDownTimeState();const B=this.getEnterStateParams();if(this._stateChallengesDataProvider.isCurrentlyInDownTime)return void(yield new Cu.w(ju).goToState(ju,B));const U=this._stateChallengesDataProvider.getStateChallengesLeaderboard(_u.W.CLASSROOM);if(!j.Aq$.isDefined(U))return void(yield new Cu.w(Gu).goToState(Gu,B));const F=!this._stateChallengesDataProvider.isInActiveCompetition();if(this._hasUnseenChallengeResults||F)return void(yield new Cu.w(Fu).goToState(Fu,B));const G=yield this._stateChallengesDataProvider.getCurrentSchoolRanking(),V=G>=xu.LOW_PERFORMANCE_CUTOFF_RANK;V&&this._stateChallengesDataProvider.setAnimationPlayed();const W=null===(H=null===($=this._stateChallengesDataProvider.getStateChallengesLeaderboard(_u.W.CLASSROOM))||void 0===$?void 0:$.myEntry)||void 0===H?void 0:H.rank;tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:us.B.ProdigyChallenge,interfaceType:ui.Wm.Screen,instanceType:fi.N.UI,originType:ui.$N.ButtonClick},{sub_ui_name:V?"class":"school",item_list:{challenge_id:this._questManager.getCurrentChallengeUniqueId()+this._stateChallengesDataProvider.getCurrentChallengeSuffixForSegmentEvents(),rank:V?W:G}}),this._stateChallengesDataProvider.hasAnimationPlayed?yield new Cu.w(xu).goToState(xu,B):yield new Cu.w(Uu).goToState(Uu,B)}else yield new Cu.w(Lu).goToState(Lu,{rootMenuObject:this.gameObject,onClassCodeSet:()=>(0,G.sH)(this,void 0,void 0,(function*(){return this.setupInitialState()}))});this.onDataInitialized.dispatch()}))}getEnterStateParams(){return{rootMenuObject:this.gameObject,stateChallengesDataProvider:this._stateChallengesDataProvider,schoolRacerIds:this._stateChallengesDataProvider.schoolRacerIds,schoolPortraitIds:this._stateChallengesDataProvider.schoolPortraitIds,classroomRacerIds:this._stateChallengesDataProvider.classroomRacerIds,classroomPortraitIds:this._stateChallengesDataProvider.classroomPortraitIds}}onCloseMenu(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this._setupPromise,this.gameObject.destroyDeferred()}))}destroy(){this.onDataInitialized.dispose(),this.onUnseenChallengeResultsSet.dispose(),super.destroy()}};(0,G.Cg)([(0,Gi.b)("0f9-dd7b"),(0,G.Sn)("design:type",_u.v)],$u.prototype,"_stateChallengesDataProvider",void 0),(0,G.Cg)([(0,Gi.b)("43a-6f08"),(0,G.Sn)("design:type",Ou.C)],$u.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$u.prototype,"onDataInitialized",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$u.prototype,"_racersContainer",void 0),$u=(0,G.Cg)([(0,j.EVk)("StateChallengesMenu",W.Y.stateChallenges)],$u);let Hu=class extends j.uAl{create(){super.create();const k=tt.q.instance.prodigy.gameContainer.get("0f9-dd7b");k.hasValidClassroom().then((B=>{this.gameObject.active=B,k.getCurrentSchoolRanking().then((B=>{this._rankingText.text=B.toString();const U=Mu.H.getDaysUntilEndOfCurrentChallenge(k.activeCompetitionPhase,new Date(Date.now()),k.endDate);this._timeLeftText.setTextArguments(U.toString())})).catch(j.RQr.createHandler("StateChallengesLegacyHUDButton: Error retrieving school rank"))})).catch(j.RQr.createHandler("StateChallengesLegacyHUDButton: Error checking for classroom validity"))}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Hu.prototype,"_rankingText",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],Hu.prototype,"_timeLeftText",void 0),Hu=(0,G.Cg)([(0,j.EVk)("StateChallengesLegacyHUDButton",W.Y.stateChallenges)],Hu);var Vu=U(24030);let Wu=class extends Fi.z{constructor(){super(...arguments),this.onDataReady=new j.HN0}create(){super.create();const k=(0,Vu.$)(this._stateChallengesDataProvider.viewableCompetitionPhase);k&&this._stateChallengeGoalsQuestManager.getQuestTasks(k).then((()=>{this._bindOnCreate&&this.bindContext().catch(j.RQr.createHandler("[StateChallengeGoalsDataProvider] Unable to bind context after getting quest tasks"))})).catch(j.RQr.createHandler(`[StateChallengeGoalsDataProvider] Unable to get quest tasks for ${k}`))}bindContext(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield Bu.b.getData();this.gameObject&&k&&Nt.d.updateInjectedValues(this.gameObject,k),this.onDataReady.dispatch(this._context)}))}destroy(){this.onDataReady.dispose(),super.destroy()}};(0,G.Cg)([(0,Gi.b)("0f9-dd7b"),(0,G.Sn)("design:type",_u.v)],Wu.prototype,"_stateChallengesDataProvider",void 0),(0,G.Cg)([(0,Gi.b)("43a-6f08"),(0,G.Sn)("design:type",Ou.C)],Wu.prototype,"_stateChallengeGoalsQuestManager",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Wu.prototype,"_bindOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wu.prototype,"onDataReady",void 0),Wu=(0,G.Cg)([(0,j.EVk)("StateChallengeGoalsDataProvider",j.YH6.injection)],Wu);var qu,Ku=U(76974),zu=U(38920);!function(k){k.RewardReady="reward-ready",k.RewardCollect="reward-collect"}(qu||(qu={}));let Yu=class extends j.uAl{constructor(){super(...arguments),this._scrollViewPadding=483,this._numRewardsCollected=0,this._goalPrefabs=[],this._slideTweenDurationMs=850,this._slideTweenDelayMs=100,this._fadeInTweenDurationMs=300,this._fadeInTweenDelayMultiplierMs=100,this._goalMaxScale=1.2,this._goalMinScale=.95}create(){super.create(),this.sendInterfaceSegmentEvent().catch((k=>{j.VyI.log("StateChallengeGoalsControllerComponent: Error sending Interface event.",j.$bb.Error,k)}))}destroy(){var k,B,U;null===(U=null===(B=null===(k=this._scrollView)||void 0===k?void 0:k.slider)||void 0===B?void 0:B.onValueChanged)||void 0===U||U.remove(this.scaleGoals,this),To.s.stopRecording(),super.destroy()}loadPrefabs(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this._gridLayout||!this._scrollView)return;To.s.startRecording("StateChallengeGoalsController","state_challenge_goals");const B=[];for(const G in k)k.hasOwnProperty(G)&&B.push(k[G]);const U=[],F=this.getCenteredGoalIndex(B);B.forEach((k=>{k.index=k.index-1;const B={[ku.Z.DisplayCardRewardIndex]:k.index+1,[ku.Z.DisplayCardRewardAssetIcon]:this.getAssetImageData(k.task),[ku.Z.DisplayCardRewardQuantity]:this.getAssetQuantityData(k.task),[ku.Z.DisplayCardQuestionsAnswered]:Au.X.getQuestionsAnsweredFromTaskInThousandFormat(k.task),[ku.Z.DisplayCardIsCollected]:k.isComplete&&!k.isCollectible,[ku.Z.DisplayCardReadyToCollect]:k.isCollectible,[ku.Z.DisplayCardIsActive]:!0,[ku.Z.DisplayCardBackground]:Au.X.getMilestoneBackingFrame(Au.X.getQuestionsAnsweredFromTask(k.task)),[ku.Z.DisplayCardIsFocused]:k.index===F};U.push(Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.StateChallengeGoalsCard,B))})),this._goalPrefabs=yield Promise.all(U),this._contentGameObject.addChild(this.createEmptyCell(this._scrollViewPadding)),this._goalPrefabs.forEach(((k,U)=>{const F=B[U];this._contentGameObject.addChild(k),Nt.d.updateInjectedValues(k,{[ku.Z.DisplayCardCollectCallback]:()=>(0,G.sH)(this,void 0,void 0,(function*(){return this.onCollectButtonClicked(k,B,F)}))})})),this._contentGameObject.addChild(this.createEmptyCell(this._scrollViewPadding)),this._gridLayout.updateAll();const $=this._gridLayout.columnSpacing,H=this._goalPrefabs[0].transform.sizeDelta.width+$;this._scrollView.slider.stepValue=H,this._scrollView.slider.onValueChanged.add(this.scaleGoals,this),this._scrollView.setScrollPosition(this.getScrollPositionForGoal(F<2?0:F-2)),this.scaleGoals(),this.fadeInGoals(F<2?0:F-2),tt.q.instance.game.add.tween(this._scrollView.slider,this).to({value:this.getScrollPositionForGoal(F)},this._slideTweenDurationMs,j.GS3.Exponential.InOut).delay(this._slideTweenDelayMs).start()}))}getScrollPositionForGoal(k){const B=this._gridLayout.columnSpacing,U=this._goalPrefabs[0].transform.sizeDelta.width+B,F=this._scrollView.GameObject.transform.sizeDelta.getHalfWidth();return-(this._scrollViewPadding+(k+1)*U+B/2-U/2-F)}fadeInGoals(k){this._goalPrefabs.filter(((B,U)=>U>=k-2&&U<=k+2)).map(((k,B)=>{const U=k.findComponent(j.jsv);if(!U)return;U.alpha=0,U.updateFilter();tt.q.instance.game.add.tween(U,this).to({alpha:1},this._fadeInTweenDurationMs,j.GS3.Quadratic.Out).delay(B*this._fadeInTweenDelayMultiplierMs).start().onUpdate.add((()=>{U.updateFilter()}))}))}scaleGoals(){var k;if(!(null===(k=this._scrollView)||void 0===k?void 0:k.rectTransform))return;const B=this._scrollView.rectTransform.sizeDelta.getHalfWidth();this._goalPrefabs.forEach((k=>{const U=k.transform.worldPosition.x,F=Math.abs(U-B),G=F>=B/2?this._goalMinScale:(this._goalMinScale-this._goalMaxScale)/(B/2)*F+this._goalMaxScale;k.transform.setScale(G,G)}))}getAssetImageData(k){var B,U,F;const G=null===(F=null===(U=null===(B=null==k?void 0:k.onComplete)||void 0===B?void 0:B[0].data)||void 0===U?void 0:U.itemDrops)||void 0===F?void 0:F[0];return G?[G.ID.toString(),G.type]:["",""]}getAssetQuantityData(k){var B,U,F;const G=null===(F=null===(U=null===(B=null==k?void 0:k.onComplete)||void 0===B?void 0:B[0].data)||void 0===U?void 0:U.itemDrops)||void 0===F?void 0:F[0];return(null==G?void 0:G.N)>1?`+${(0,zu.Hk)(G.N,void 0,",")}`:""}setButtonEnabledStates(k){k?this._closeButton.unlockState():this._closeButton.lockState(Ku.K.Disabled),this._goalPrefabs.forEach((B=>{Nt.d.updateInjectedValues(B,{[ku.Z.DisplayCardCollectButtonEnabledState]:k})}))}collectMilestoneReward(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=B+1,F=this._questManager.getCurrentChallengeUniqueId();if(!F)return j.RQr.createHandler("[StateChallengeGoalsControllerComponent] claim ID is invalid"),void this.setButtonEnabledStates(!0);const G=`${F}_claim_${U}`;try{const k=tt.q.instance.prodigy.gameContainer.get("c47-20b6").item.beginSecureItemTransaction();yield this._questManager.claimStateChallengeGoalsReward(G),k.flush({})}catch(H){j.RQr.createHandler("[StateChallengeGoalsControllerComponent] claiming reward failed")}finally{this.setButtonEnabledStates(!0)}this._numRewardsCollected+=1,k[B].isCollectible=!1;const $=this.getCenteredGoalIndex(k);this.showNewCenteredGoal(B,$),this._scrollView.setScrollPosition(this.getScrollPositionForGoal($))}))}onCollectButtonClicked(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){var F,G,j,$,H,V,W,q;const K=null===(G=null===(F=U.task)||void 0===F?void 0:F.onComplete)||void 0===G?void 0:G[0],z=null===($=null===(j=null==K?void 0:K.data)||void 0===j?void 0:j.itemDrops)||void 0===$?void 0:$[0];if((null==K?void 0:K.type)===yl.s.GOT_PET&&z){const k=tt.q.instance.prodigy.gameContainer.get("c47-20b6"),B=tt.q.instance.prodigy.gameContainer.get("43a-6f08");k.item.sendItemReceivedEvent(z.ID,null!==(W=null===(V=null===(H=Yt.t.getItem(z.type,z.ID))||void 0===H?void 0:H.data)||void 0===V?void 0:V.name)&&void 0!==W?W:"unknown",z.type,null!==(q=z.N)&&void 0!==q?q:1,{source_type:li.C.StateChallengeMilestone,source_id:`${B.getCurrentChallengeUniqueId()}-${U.index+1}${this._stateChallengesDataProvider.getCurrentChallengeSuffixForSegmentEvents()}`,instance_type:fi.N.StateChallenge,instance_id:k.featureCommon.getCurrentInterfaceID(us.B.ProdigyChallenge),transaction_id:xt.$.generateUID()})}const Y=k.findComponentInChildren(Os.j);this.setButtonEnabledStates(!1),Y?(Y.playAnimation(qu.RewardCollect,!1),yield Y.OnAnimationComplete.asPromise(),Y.GameObject.parent.active=!1,yield this.collectMilestoneReward(B,U.index)):yield this.collectMilestoneReward(B,U.index)}))}createEmptyCell(k){const B=new j._mx;return B.addComponent(j.XVE,!0).setSizeDelta(k,0),this._contentGameObject.addChild(B),B}getCenteredGoalIndex(k){const B=k.findIndex((k=>k.isCollectible));if(B>=0)return B;const U=k.findIndex((k=>!k.isComplete));return-1===U?k.length-1:U}showNewCenteredGoal(k,B){if(k===B)return;const U=this._goalPrefabs[k],F=this._goalPrefabs[B];U&&Nt.d.updateInjectedValues(U,{[ku.Z.DisplayCardIsFocused]:!1}),F&&Nt.d.updateInjectedValues(F,{[ku.Z.DisplayCardIsFocused]:!0})}sendInterfaceSegmentEvent(){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:us.B.ProdigyChallengeMilestoneRewards,interfaceType:ui.Wm.Modal,instanceType:fi.N.UI,originType:ui.$N.ButtonClick,originID:Is.k.StateChallengesViewMilestonesButton},{item_list:{challenge_id:this._questManager.getCurrentChallengeUniqueId()+this._stateChallengesDataProvider.getCurrentChallengeSuffixForSegmentEvents(),rank:yield this._stateChallengesDataProvider.getCurrentSchoolRanking()}})}))}};(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Yu.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("43a-6f08"),(0,G.Sn)("design:type",Ou.C)],Yu.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.Cdj)("0f9-dd7b"),(0,G.Sn)("design:type",_u.v)],Yu.prototype,"_stateChallengesDataProvider",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yu.prototype,"_contentGameObject",void 0),(0,G.Cg)([(0,j.MnK)(j.Sz7),(0,G.Sn)("design:type",j.Sz7)],Yu.prototype,"_gridLayout",void 0),(0,G.Cg)([(0,j.MnK)(Mt.C),(0,G.Sn)("design:type",Mt.C)],Yu.prototype,"_scrollView",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Yu.prototype,"_closeButton",void 0),Yu=(0,G.Cg)([(0,j.EVk)("StateChallengeGoalsController",W.Y.stateChallenges)],Yu);U(74712);var Qu,Xu=U(82351),Zu=U(6413);let Ju=Qu=class extends Fi.z{create(){super.create(),this.bindContext()}bindContext(){const k="FTUE_STARTER_PET_IS_ACTIVE_";Lt.l.pad(Zu.h.STARTER_PETS,5,null).forEach(((B,U)=>{var F,G;const $=Yt.t.getItem("pet",B);j.Aq$.isDefined($)?(this._context.Container.bind(k+U).toConstantValue(!0),this._context.Container.bind("FTUE_STARTER_PET_NAME_"+U).toConstantValue($.data.name),this._context.Container.bind("FTUE_STARTER_PET_DEFAULT_SPINE_ID_"+U).toConstantValue(rs.Q[$.metadata.assets.default.assetKey]),this._context.Container.bind("FTUE_STARTER_PET_UPSCALED_SPINE_ID_"+U).toConstantValue(rs.Q[$.metadata.assets.upscaled.assetKey]),this._context.Container.bind("FTUE_STARTER_PET_ICON_ID_"+U).toConstantValue(fs.E.getIconForType("pet",B)),this._context.Container.bind("FTUE_STARTER_PET_SFX_ID_"+U).toConstantValue(Xu.B[$.metadata.assets.interactSfx]),this._context.Container.bind("FTUE_STARTER_PET_X_POSITION_OFFSET_"+U).toConstantValue(null!==(F=Qu.PET_X_POSITION_OFFSETS_MAP[$.ID])&&void 0!==F?F:0),this._context.Container.bind("FTUE_STARTER_UPSCALED_PET_X_POSITION_OFFSET_"+U).toConstantValue(null!==(G=Qu.UPSCALED_PET_X_POSITION_OFFSETS_MAP[$.ID])&&void 0!==G?G:0)):this._context.Container.bind(k+U).toConstantValue(!1)})),this.gameObject.findComponentsInChildren(Lo.B).forEach((k=>k.consume()))}getPetIdfromIndex(k){return Zu.h.STARTER_PETS[k]}};var tf;Ju.PET_X_POSITION_OFFSETS_MAP={139:-13,148:-10},Ju.UPSCALED_PET_X_POSITION_OFFSETS_MAP={139:-20,148:-20},Ju=Qu=(0,G.Cg)([(0,j.EVk)("StarterPetDataProvider",W.Y.ftue)],Ju);let ef=tf=class extends Fi.z{setPetIdBySelectionIndex(k){this._petId=Zu.h.STARTER_PETS[k],this.bindContext()}bindContext(){var k;const B=Yt.t.getItem("pet",this._petId);if(j.Aq$.isDefined(B)){this._context.Container.bind("FTUE_SELECTED_STARTER_PET_DEFAULT_SPINE_ID").toConstantValue(rs.Q[B.metadata.assets.default.assetKey]),this._context.Container.bind("FTUE_SELECTED_STARTER_PET_UPSCALED_SPINE_ID").toConstantValue(rs.Q[B.metadata.assets.upscaled.assetKey]),this._context.Container.bind("FTUE_SELECTED_STARTER_PET_CARD_DATA").toConstantValue({PET_RESCUE_CREATURE_DATA:{ID:B.ID,name:B.data.name,level:tf.STARTER_PET_INITIAL_LEVEL},PET_RESCUE_BUTTON_TEXT_KEY:"EPIC_VIEWER_ADD_TO_TEAM",PET_RESCUE_STAMP_ENABLED:!1});const U=[{type:"pet",ID:B.ID,N:1}];this._context.Container.bind("FTUE_SELECTED_STARTER_PET_AWARD_DATA").toConstantValue(U),this._context.Container.bind("FTUE_SELECTED_STARTER_PET_INTERACT_SCENE_X_OFFSET").toConstantValue(null!==(k=tf.PET_X_POSITION_OFFSETS_MAP[this._petId])&&void 0!==k?k:0)}}};ef.PET_X_POSITION_OFFSETS_MAP={148:-60,139:150,142:50},ef.STARTER_PET_INITIAL_LEVEL=1,ef=tf=(0,G.Cg)([(0,j.EVk)("SelectedStarterPetDataProvider",W.Y.ftue)],ef);var sf=U(435);let nf=class extends j.uAl{constructor(){super(...arguments),this.onError=new j.HN0}startBattle(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=tt.q.instance.prodigy;try{const B=this._currentPlayerProvider.player;yield this.setQuestData();const U=yield tt.q.instance.prodigy.gameContainer.get("a25-68f4").getBattleStartQuestData(Ci.gu.Ultimates),F=k.world.getCurrentZone(),G=k.world.getCurrentMapTag(),j=k.world.getZone(F).getMap(G).battleBG,$={battleType:Ci.gu.Ultimates,difficulty:10,isMock:this.isMockBattle,questId:B.ultimateQuestId,taskId:B.ultimateTaskId,activeQuestIDs:U.questIDs,questEventsToSend:U.questEvents},H={backgroundID:j,backgroundMusicID:2,onEscape:()=>{this.onBattleComplete(!1)},onDefeat:()=>{this.onBattleComplete(!1)},onVictory:()=>{this.onBattleComplete(!0)},onFatalError:()=>{this.onBattleComplete(!1)}};tt.q.instance.prodigy.game.state.states.get(Tt.G.SecureBattleRevamp).startBattleRequest($,H)}catch(e){j.VyI.log(`There was a problem loading battle data for Ultimates battle in StartUltimatesBattleComponent.startBattle: ${e.message}`,j.$bb.Error),this.onError.dispatch()}}))}setQuestData(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._currentPlayerProvider.player,B=(yield this._questDataProvider.getCurrentQuestData()).find((B=>B.questID===k.ultimateQuestId));this.tamingPhase=B.getTamingLevel(),this.ultimateQuestId=B.questID,this.petId=B.petID,this.isMockBattle=!1}))}onBattleComplete(k){const B=this._currentPlayerProvider.player;tt.q.instance.game.broadcaster.addAppListener(jn.ig.PlayerLoaded,(()=>{const U=tt.q.instance.prodigy.open.showFullScreenSpinner();this._questManager.updateQuestProgress(this.ultimateQuestId).then((()=>{(!k||this.tamingPhase<2)&&tt.q.instance.prodigy.open.pets()})).catch((k=>{j.VyI.log(`[StartUltimateBattleComponent] Unable to load quest progress ${j.RQr.stringify(k)}`,j.$bb.Error),tt.q.instance.prodigy.open.prefabMenu(Rt.l.ErrorDialogContentRefresh).createContainer=!1})).finally((()=>{U.destroy()})),tt.q.instance.game.broadcaster.removeAppListener(jn.ig.PlayerLoaded,this,void 0),B.unlockSessionStatus()}),this,void 0,!0),B.setUltimateSessionStatus(nl.n.Transition,"",0,!0)}destroy(){tt.q.instance.game.broadcaster.removeAppListener(jn.ig.PlayerLoaded,this,void 0),this.onError.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],nf.prototype,"_currentPlayerProvider",void 0),(0,G.Cg)([(0,j.Cdj)("200-7dc0"),(0,G.Sn)("design:type",Object)],nf.prototype,"_questDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("2fb-aa75"),(0,G.Sn)("design:type",cu.u)],nf.prototype,"_battleHPProvider",void 0),(0,G.Cg)([(0,j.Cdj)("e50-b09b"),(0,G.Sn)("design:type",qd.k)],nf.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nf.prototype,"onError",void 0),nf=(0,G.Cg)([(0,j.EVk)("StartUltimatesBattle",W.Y.ultimates)],nf);let af=class extends nf{setQuestData(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this._questData)return void j.VyI.log("Could not start mock ultimates battle. No UltimatesQuestData could be found in context.",j.$bb.Error);this.tamingPhase=0,this.petId=this._questData.petID,this.ultimateQuestId=this._questData.questID,this.isMockBattle=!0,this.battleDifficulty="easy";const k=this._currentPlayerProvider.player;this._currentMap=tt.q.instance.prodigy.world.getCurrentMap(),k.setUltimateSessionStatus(nl.n.TamingUltimate,this._questData.questID,-1)}))}onBattleComplete(k){const B=this._currentPlayerProvider.player;B.setUltimateSessionStatus(nl.n.Transition,"",0,!0),tt.q.instance.prodigy.world.it(this._currentMap),tt.q.instance.game.broadcaster.addAppListener(jn.ig.PlayerLoaded,(()=>{tt.q.instance.prodigy.open.pets(),tt.q.instance.game.broadcaster.removeAppListener(jn.ig.PlayerLoaded,this,void 0),B.unlockSessionStatus()}),this,void 0,!0)}sendSegmentEvent(){tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:Is.k.TryABattle,interfaceType:ui.Wm.DialogBox,interfaceName:us.B.PetsWindow,elementType:"mythic_task",elementID:this.ultimateQuestId})}};(0,G.Cg)([(0,j.Cdj)("UltimatesQuestData"),(0,G.Sn)("design:type",sf.p)],af.prototype,"_questData",void 0),af=(0,G.Cg)([(0,j.EVk)("StartMockUltimatesBattle",W.Y.ultimates)],af);var rf,of=U(24285),hf=U(93171);!function(k){k.InProgress="inprogress",k.Transition="idle",k.Full="FULL"}(rf||(rf={}));let cf=class extends j.uAl{constructor(){super(...arguments),this.onValueChangeComplete=new j.HN0}setState(k,B,U){const F=B?rf.Full:rf.InProgress;this.heartAnimator.playAnimation(this.getAnimationName(F),!0),this._tintOverlay.active=B,this._highlightBack.active=B||k,this._highlightStroke.active=k,this._progressCompleteIcon.active=B,this._progressBarTrack.active=k,this._membershipLockIcon.active=U,setTimeout((()=>j.qFr.setSmoothed(this._membershipLockIcon.findComponentInChildren(j.vYh).image.texture,!0)),Kt.A.SECONDS_TO_MILLISECONDS_MULTIPLIER),this.setValue(B?1:0,!1)}setValue(k,B){if(!B)return this.setInitialState(k),this._progressBar.setValue(k),void this.onValueChangeComplete.dispatch();this._progressBar.tweenValue(k),1===k&&(this.heartAnimator.OnAnimationComplete.addOnce((()=>{this.heartAnimator.OnAnimationComplete.addOnce((()=>{this.onValueChangeComplete.dispatch()})),this.heartAnimator.stopAnimation(),this.heartAnimator.playAnimation(this.getAnimationName(rf.Full),!0)})),this.heartAnimator.stopAnimation(),this.heartAnimator.playAnimation(this.getAnimationName(rf.Transition),!1)),this._progressBar.onComplete.addOnce((()=>{1===k?this._progressCompleteIcon.active=!0:this.onValueChangeComplete.dispatch()}))}setInitialState(k){this._progressCompleteIcon.active=1===k,1===k?this.heartAnimator.playAnimation(this.getAnimationName(rf.Full),!0):this.heartAnimator.playAnimation(this.getAnimationName(rf.InProgress),!0)}getAnimationName(k){return`Heart-${this._slot}-${k}`}destroy(){this.heartAnimator.OnAnimationComplete.removeAll(),this.onValueChangeComplete.dispose(),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],cf.prototype,"_slot",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],cf.prototype,"heartAnimator",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cf.prototype,"_tintOverlay",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cf.prototype,"_highlightBack",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cf.prototype,"_highlightStroke",void 0),(0,G.Cg)([(0,j.MnK)(hf.a),(0,G.Sn)("design:type",hf.a)],cf.prototype,"_progressBar",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cf.prototype,"_progressBarTrack",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cf.prototype,"_progressCompleteIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cf.prototype,"_membershipLockIcon",void 0),cf=(0,G.Cg)([(0,j.EVk)("UltimatesHealthBarSegment",W.Y.ultimates)],cf);let df=class extends j.uAl{constructor(){super(...arguments),this._segments=[],this._tamingPhase=1}get onHealthChangeComplete(){return this._activeSegment.onValueChangeComplete}setLayerDepths(k,B,U){const F=j.wa5.getActiveScene();F.setLayerDepth(this._background.layer,k),this._segments.forEach((k=>{F.setLayerDepth(k.GameObject.layer,k===this._activeSegment?U:B)})),F.setLayerDepth(this._membershipIconContainer.layer,U)}init(k,B){this._tamingPhase=j.cj9.clamp(k,1,this._segments.length),this._segments.forEach(((k,U)=>{k.setState(U===this._tamingPhase-1,U0&&(F=(this._maxHealth-j.cj9.clamp(k,0,this._maxHealth))/this._maxHealth),this._activeSegment.setValue(F,U)}cacheAsBitmap(k,B){B?of.s.setLayerCacheAsBitmap(this._activeSegment.GameObject.layer,k):(of.s.setLayerCacheAsBitmap(this._background.layer,k),this._segments.forEach((B=>{of.s.setLayerCacheAsBitmap(B.GameObject.layer,k)})))}};(0,G.Cg)([(0,j.MnK)(cf),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],df.prototype,"_segments",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],df.prototype,"_background",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],df.prototype,"_membershipIconContainer",void 0),df=(0,G.Cg)([(0,j.EVk)("UltimatesBattleHealthBarComponent",W.Y.ultimatesUi)],df);var lf=U(37155);let uf=class extends j.uAl{constructor(){super(...arguments),this.onClose=new j.HN0}init(k,B){const U=B?"ULTIMATES_TRIAL_BATTLE_TITLE_VICTORY":"ULTIMATES_TRIAL_BATTLE_TITLE_DEFEAT",F=B?"ULTIMATES_TRIAL_BATTLE_DESC_VICTORY":"ULTIMATES_TRIAL_BATTLE_DESC_DEFEAT",G=this._currentPlayerProvider.player.getName();this._headerText.setLocalizationKey(U),this._descriptionText.setLocalizationKey(F),this._descriptionText.setTextArguments(G),this._ultimatePet.init(k)}destroy(){this.onClose.dispatch(),this.onClose.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],uf.prototype,"_currentPlayerProvider",void 0),(0,G.Cg)([(0,j.MnK)(lf.i),(0,G.Sn)("design:type",lf.i)],uf.prototype,"_ultimatePet",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],uf.prototype,"_headerText",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],uf.prototype,"_descriptionText",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uf.prototype,"onClose",void 0),uf=(0,G.Cg)([(0,j.EVk)("UltimatesTrialPostBattle",W.Y.ultimatesUi)],uf);var ff=U(34398);let bf=class extends ff.l{constructor(){super(...arguments),this._funnelName=en.o.FunnelTransitMap,this._campaign=Fs.R.None,this._sendPromotedAd=!1,this._showVideo=!0,this._injectionIdentifiers=[]}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._loggedInPlayer.player,B=k.hasMembership();return!(!k.hasCompletedTutorial()||k.memberPrompt)&&(!(!B&&Qt.J.isSchoolHours()||B&&k.backpack.hasItem("mount",1)>0)&&(!k.isPlayingAtSchool()||B&&0===k.backpack.hasItem("mount",1)))}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,arguments,void 0,(function*(B=!1,U=!1){yield k.open.call(this),tt.q.instance.game.broadcaster.broadcast(jn.iZ.ToolTipClosed);const F={};let G;this._injectionIdentifiers.forEach((k=>F[k]=this.getInjectedValue(k)));const $=new Promise((k=>{G=this._loggedInPlayer.player.rewardMembershipPrizes(k)})),H=yield G;$.then((()=>{if(H)this.onClose.dispatch();else{const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;tt.q.instance.prodigy.open.membershipInfo((()=>{k.memberPrompt=!0,this.onClose.dispatch()}),{conversionFunnelName:this._funnelName,conversionStaticOrVideo:this._campaign},this._analyticSource,B,F)}})).catch(j.RQr.createHandler("Error opening membership ad"))}))}overrideConversionEvent(k,B){this._funnelName=k,this._campaign=B}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],bf.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.gfw)(en.o),(0,G.Sn)("design:type",String)],bf.prototype,"_funnelName",void 0),(0,G.Cg)([(0,j.gfw)(Fs.R),(0,G.Sn)("design:type",String)],bf.prototype,"_campaign",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],bf.prototype,"_sendPromotedAd",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],bf.prototype,"_analyticSource",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],bf.prototype,"_showVideo",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],bf.prototype,"_injectionIdentifiers",void 0),bf=(0,G.Cg)([(0,j.EVk)("OpenMembershipAdPopup",W.Y.membership)],bf);let pf=class extends ad.b{initialize(){var k;super.initialize();const B=new nd.N,{r:U,g:F,b:G}=j.Q1f.hexToColor(null!==(k=this._color)&&void 0!==k?k:"#000000"),$=j.Aq$.isDefined(this._alpha)?this._alpha:1;B.matrix=[0,0,0,0,U/255,0,0,0,0,F/255,0,0,0,0,G/255,0,0,0,$,0],this._filterList.push(B)}};(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],pf.prototype,"_color",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],pf.prototype,"_alpha",void 0),pf=(0,G.Cg)([(0,j.EVk)("ShadowFilter",W.Y.effect)],pf);let vf=class extends j.uAl{constructor(){super(...arguments),this._ultimateIcon=null,this._nameText=null,this._levelText=null,this._heartsText=null,this._progressText=null,this._unknownText=null,this._tamedIconObject=null,this._levelStarObject=null,this._heartsObject=null,this.popOptions=null,this.addButton=null,this.infoButton=null,this._greyscaleFilter=null,this._shadowFilter=null,this._progressThreshold=25,this.onCardLoaded=new j.HN0}create(){super.create(),this._ultimateIcon.onIconLoaded.add((()=>{this.onCardLoaded.dispatch()}))}destroy(){super.destroy(),this.onCardLoaded.dispose()}setTamed(k,B,U){this.setPetData(k),this._tamedIconObject.active=!0,this._levelStarObject.active=!0,this._heartsObject.active=!0,this._progressText.GameObject.active=!1,this._unknownText.GameObject.active=!1,this._nameText.GameObject.active=!0,this._levelText.text=B.toString(),this._heartsText.text=U.toString(),this._greyscaleFilter.removeFilter(),this._shadowFilter.removeFilter()}setUntamed(k,B){this.setPetData(k);const U=j.cj9.clamp(B,0,100),F=U{k.destroy()})),this._untamedList.children.slice().forEach((k=>{k.destroy()}))}showEmptyList(){this._emptyList.active=!0,this._tamedList.parent.active=!1,this._untamedList.parent.active=!1,this.dispatchLoaded()}initList(k,B){if(!k||k.length<=0)return void(B.parent.active=!1);B.parent.active=!0;B.parent.transform.posY=this._yDepth,k.forEach((k=>{this.createCard(k,B)}),this),this._yDepth+=Math.ceil(k.length/this._petRowSize)*this._petGap+this._listGap}createCard(k,B){this._prefabLoader.loadWithDependenciesFromGUID(Rt.l.UltimatesInventoryCard,B).then((U=>{this.initCard(U,k,B)})).catch((k=>{this.onError.dispatch(),j.VyI.log(`[PetInventoryViewComponent]: Error loading prefab ${Rt.l.UltimatesInventoryCard}. Reason: ${k.message}`,j.$bb.Error)}))}initCard(k,B,U){const F=k.findComponent(vf);F.onCardLoaded.addOnce(this.finishedLoading.bind(this));const G=k.findComponent(Fe.n),$=B;if(j.Aq$.isDefined($.id)){const k=Yt.t.getItem("pet",$.id);F.setUntamed(k,Math.floor(100*$.accomplishedTasks/$.totalTasks)),F.infoButton.onEnabledClick.add((()=>this.onInfoClicked.dispatch($.id))),G.onClicked.add((()=>{this.togglePopOptions(F,$.id,!1),this.onUntamedCardClicked.dispatch($.id)}))}else{const k=B,U=Yt.t.getItem("pet",k.ID);F.setTamed(U,k.level,eo.P8.getPetCurrentHealth(k)),F.addButton.onEnabledClick.add(this.disablePopOptions,this),F.addButton.onEnabledClick.add((()=>this.onAddClicked.dispatch(k))),F.infoButton.onEnabledClick.add((()=>this.onInfoClicked.dispatch(k.ID))),G.onClicked.add((()=>{this.togglePopOptions(F,k.ID,!0),this._segmentButtonProperties.buttonName=k.name,this.onTamedCardClicked.dispatch(k.ID)}))}U.addChild(k)}finishedLoading(){0==--this._unloadedElements&&(this.resizeContainer(),this.dispatchLoaded(),this.fixRenderOrder(this._tamedList),this.fixRenderOrder(this._untamedList))}resizeContainer(){const k=this._emptyList.parent.transform,B=k.widthDelta;k.setSizeDelta(B,Math.max(this._yDepth,this._minimumContainerHeight))}fixRenderOrder(k){k.children.forEach(((B,U)=>B.setRenderOrder(k.children.length-U)))}dispatchLoaded(){this._unloadedElements=-1,this.onLoaded.dispatch()}togglePopOptions(k,B,U){this._tamedList.children.concat(this._untamedList.children).map((k=>k.findComponent(vf))).filter((B=>B!==k)).forEach((k=>k.popOptions.active=!1)),k.popOptions.active=!k.popOptions.active,k.GameObject.bringToFront(),U&&this._player.player.kennel.petTeam.every((k=>(null==k?void 0:k.getID())!==B))?k.addButton.unlockState():k.addButton.lockState(Ku.K.Disabled)}disablePopOptions(){this._tamedList.children.concat(this._untamedList.children).map((k=>k.findComponent(vf))).filter((k=>k.popOptions)).forEach((k=>k.popOptions.active=!1))}destroy(){this.gameObject.onActiveInHierarchyChanged.remove(this.disablePopOptions,this),this.onTamedCardClicked.dispose(),this.onUntamedCardClicked.dispose(),this.onInfoClicked.dispose(),this.onAddClicked.dispose(),this.onLoaded.dispose(),this.onError.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],gf.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],gf.prototype,"_player",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],gf.prototype,"_listGap",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],gf.prototype,"_petGap",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],gf.prototype,"_minimumContainerHeight",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],gf.prototype,"_petRowSize",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gf.prototype,"_emptyList",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gf.prototype,"_tamedList",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gf.prototype,"_untamedList",void 0),(0,G.Cg)([(0,j.MnK)(Xs),(0,G.Sn)("design:type",Xs)],gf.prototype,"_segmentButtonProperties",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],gf.prototype,"onLoaded",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],gf.prototype,"onError",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],gf.prototype,"onAddClicked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],gf.prototype,"onInfoClicked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],gf.prototype,"onTamedCardClicked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],gf.prototype,"onUntamedCardClicked",void 0),gf=(0,G.Cg)([(0,j.EVk)("PetInventoryView",W.Y.ultimatesUi)],gf);var mf=U(62430);let yf=class extends j.uAl{constructor(){super(...arguments),this.onPostFrames=new j.HN0,this._counter=Number.MAX_SAFE_INTEGER}get counter(){return this._counter}start(){this._counter=0}update(){super.update(),this._counter=this._segments.length?j.VyI.log(`[StaticUltimatesTamingMeter] Error setting the taming level: index ${k} out of range`,j.$bb.Error):this._segments.forEach(((B,U)=>{B.active=U===k}))}};var Of;(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Cf.prototype,"_segments",void 0),Cf=(0,G.Cg)([(0,j.EVk)("StaticUltimatesTamingMeter",W.Y.ultimatesUi)],Cf);let If=Of=class extends j.uAl{constructor(){super(...arguments),this.onLoaded=new j.HN0,this.onError=new j.HN0,this.onAddToTeamClicked=new j.HN0}init(k,B,U=!1){var F,G,j;this._componentData=k,this.nt=B,this._panelOverlay.GameObject.active=!0,this._tamedAddToTeamButton.GameObject.active=!1;this._addToTeam.GameObject.parent.active=!1,this._tamingMeter.GameObject.active=!1,this._tamedLabel.active=!1,this._leavingSoon.active=!1,this._notStartedLabel.active=!1,this._startQuest.unlockState(),B?this.initNonMember():U&&(this._ftueBreadcrumb.isIncomplete.addOnce(this.initializeFTUE,this),this._ftueBreadcrumb.checkCompletion()),this._componentData.petItem=Yt.t.getItem("pet",k.petId);const $=null===(G=null===(F=this._componentData.petItem)||void 0===F?void 0:F.metadata)||void 0===G?void 0:G.assets;if("spine"!==(null===(j=null==$?void 0:$.card)||void 0===j?void 0:j.type))throw this.onError.dispatch(),new Error(`Pet ${k.petId} doesn't have a card component with a spine associated to it`);tt.q.instance.prodigy.load.assets([`spine-${$.card.ID}`],this.initPetAndQuestData.bind(this))}disable(){this._startQuest.lockState(Ku.K.Disabled),this._panelOverlay.GameObject.active=!1}initializeFTUE(){this._startQuest.onEnabledClick.addOnce(this.finalizeFTUE,this)}finalizeFTUE(){tt.q.instance.prodigy.gameContainer.get("c47-20b6").ultimatesFTUE.sendFunnelEvent({funnelName:"mythics_ftue",funnelType:"tutorial",stepName:"open_mythic_detail_view",step:_f.V.OpenMythicDetailView})}addToTeamClicked(k=!1){const B=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.onAddToTeamClicked.dispatch(B.kennel.getPetByID(this._componentData.petId)),k&&this.toggleAddPop()}initPetAndQuestData(){switch(this._componentData.questState){case Af.e.Start:this.initStart();break;case Af.e.QuestAccepted:this.initAccepted();break;case Af.e.Found:this.initFound();break;case Af.e.QuestCompleted:this.initCompleted()}}initStart(){this._petName.GameObject.active=!1,this._nameTease.active=!0,this._taskProgress.active=!1,this._questionMark.active=!0,this._startQuest.GameObject.active=!0,this._petSpine.onSpineItemLoaded.addOnce(this._shadowFilter.applyFilter.bind(this._shadowFilter)),this._petSpine.onSpineItemLoaded.addOnce(this._freezeFrameWait.start.bind(this._freezeFrameWait)),this._panelOverlay.GameObject.active=!1,this._addToTeam.lockState(Ku.K.Disabled),this._tamedLabel.active=!1,this._unseenBackground.active=!0,this._seenBackground.active=!1,this._petElement.GameObject.active=!1,this.onLoaded.addOnce((()=>{this._leavingSoon.active=this.isLeavingSoon(),this._notStartedLabel.active=!this.nt,this._tamingMeter.GameObject.active=!1})),this.loadPetAnimation()}initAccepted(){this._petName.GameObject.active=this._componentData.nameUnlocked,this._petName.text=this._componentData.petItem.data.name,this._nameTease.active=!this._componentData.nameUnlocked,this._startQuest.GameObject.active=!1,this._questionMark.active=!0,this._addToTeam.lockState(Ku.K.Disabled),this.initProgressBar(),this.initTimer(),this._tamed.active=!1,this._petSpine.onSpineItemLoaded.addOnce(this._shadowFilter.applyFilter.bind(this._shadowFilter)),this._petSpine.onSpineItemLoaded.addOnce(this._freezeFrameWait.start.bind(this._freezeFrameWait)),this._notStartedLabel.active=!1,this._tamedLabel.active=!1,this._unseenBackground.active=!0,this._seenBackground.active=!1,this._petElement.GameObject.active=!1,this.onLoaded.addOnce((()=>{this._leavingSoon.active=this.isLeavingSoon(),this._tamingMeter.GameObject.active=!0,this._tamingMeter.setTamingLevel(this._componentData.tamingLevel)})),this.loadPetAnimation()}initFound(){this._petName.GameObject.active=!0,this._petName.text=this._componentData.petItem.data.name,this._nameTease.active=!1,this._startQuest.GameObject.active=!1,this._questionMark.active=!1,this._addToTeam.lockState(Ku.K.Disabled),this.initProgressBar(),this.initTimer(),this._tamed.active=!1,this._petSpine.onSpineItemLoaded.addOnce(this._greyscaleFilter.applyFilter.bind(this._greyscaleFilter)),this._petSpine.onSpineItemLoaded.addOnce(this._freezeFrameWait.start.bind(this._freezeFrameWait)),this._notStartedLabel.active=!1,this._tamedLabel.active=!1,this._petElement.GameObject.active=!0,this._petElement.setPetID(this._componentData.petId),this._unseenBackground.active=!1,this._seenBackground.active=!0,this.onLoaded.addOnce((()=>{this._leavingSoon.active=this.isLeavingSoon(),this._tamingMeter.GameObject.active=!0,this._tamingMeter.setTamingLevel(this._componentData.tamingLevel)})),this.loadPetAnimation()}initCompleted(){this._petName.GameObject.active=!0,this._petName.text=this._componentData.petItem.data.name,this._nameTease.active=!1,this.initProgressBar(),this._timer.GameObject.parent.active=!1,this._startQuest.GameObject.active=!1,this._questionMark.active=!1,this._taskProgress.active=!1,this._tamingMeter.setTamingLevel(this._componentData.tamingLevel),this._tamedAddToTeamButton.GameObject.active=!0,this._notStartedLabel.active=!1,this._petElement.GameObject.active=!0,this._petElement.setPetID(this._componentData.petId),this._unseenBackground.active=!1,this._seenBackground.active=!0,this.onLoaded.addOnce((()=>{this._tamingMeter.GameObject.active=!0,this._tamedLabel.active=!this.nt,this._tamingMeter.setTamingLevel(this._componentData.tamingLevel)})),this.loadPetAnimation(),this.gameObject.onActiveInHierarchyChanged.add(this.setTamedLockState,this),this.setTamedLockState()}initProgressBar(){this._taskProgress.active=!0;const k=this._taskProgress.findComponentInChildren(ys.z),B=this._componentData.accomplishedCollectionTasks>=this._componentData.totalCollectionTasks,U=this._componentData.accomplishedCollectionTasks/this._componentData.totalCollectionTasks,F=B?tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("PROGRESS_BAR_COMPLETE"):`${this._componentData.accomplishedCollectionTasks} / ${this._componentData.totalCollectionTasks}`;k.setValue(U),k.setBarText(F)}toggleAddPop(){const k=this._addToTeam.GameObject.parent;k.active=!k.active,this._player.player.kennel.hasPet(this._componentData.petId)&&this._player.player.kennel.petTeam.every((k=>(null==k?void 0:k.getID())!==this._componentData.petId))?this._addToTeam.unlockState():this._addToTeam.lockState(Ku.K.Disabled)}setTamedLockState(){var k;this._addToTeam.GameObject.parent.active&&this.toggleAddPop(),(null===(k=this._player)||void 0===k?void 0:k.player.kennel.petTeam.every((k=>(null==k?void 0:k.getID())!==this._componentData.petId)))?this._tamedAddToTeamButton.unlockState():this._tamedAddToTeamButton.lockState(Ku.K.Disabled)}loadPetAnimation(){const k=this._petSpine.GameObject.parent.transform,B=this._componentData.petItem.metadata.assets.card;k.setScale(B.cardScale,B.cardScale),k.posX=B.x,k.posY=B.y,this._petSpine.onSpineItemLoaded.addOnce((()=>{this.onLoaded.dispatch(),this.restartAnimation()})),this._petSpine.setAssetID(this._componentData.petId)}restartAnimation(){this._petSpineAnimator.stopAnimation(),this._petSpineAnimator.playAnimation(Of.DEFAULT_ANIMATION,!0)}initNonMember(){this.onLoaded.addOnce((()=>{this._membershipLock.active=!0,this._startQuest.lockState(Ku.K.Disabled)}))}initTimer(){this._timer.GameObject.parent.active=!0;const k=this._componentData.deadline.valueOf()-this._timeManager.getServerTimeMs();this._timer.setCountdownTimeMS(k)}isLeavingSoon(){const k=this._componentData.questState!==Af.e.QuestCompleted,B=!tt.q.instance.prodigy.classModeController.isClassMode(),U=eo.P8.isUltimateLeavingSoon(this._componentData.deadline,Tf.T.Week);return k&&B&&U&&!this.nt}destroy(){this.onError.dispose(),this.onLoaded.dispose(),this.onAddToTeamClicked.dispose(),this.gameObject.onActiveInHierarchyChanged.remove(this.setTamedLockState,this),super.destroy()}};If.DEFAULT_ANIMATION="idle",(0,G.Cg)([(0,j.Cdj)("12f-4e29"),(0,G.Sn)("design:type",sh.F)],If.prototype,"_breadcrumbManager",void 0),(0,G.Cg)([(0,j.Cdj)("a03-308f"),(0,G.Sn)("design:type",Ks.V)],If.prototype,"_timeManager",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],If.prototype,"_player",void 0),(0,G.Cg)([(0,j.MnK)(rd),(0,G.Sn)("design:type",rd)],If.prototype,"_greyscaleFilter",void 0),(0,G.Cg)([(0,j.MnK)(pf),(0,G.Sn)("design:type",pf)],If.prototype,"_shadowFilter",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_nameTease",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],If.prototype,"_petName",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],If.prototype,"_startQuest",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_taskProgress",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],If.prototype,"_timer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_tamed",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_membershipLock",void 0),(0,G.Cg)([(0,j.MnK)(mf.N),(0,G.Sn)("design:type",mf.N)],If.prototype,"_petSpine",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],If.prototype,"_petSpineAnimator",void 0),(0,G.Cg)([(0,j.MnK)(yf),(0,G.Sn)("design:type",yf)],If.prototype,"_freezeFrameWait",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],If.prototype,"_addToTeam",void 0),(0,G.Cg)([(0,j.MnK)(Fe.n),(0,G.Sn)("design:type",Fe.n)],If.prototype,"_panelOverlay",void 0),(0,G.Cg)([(0,j.MnK)(Cf),(0,G.Sn)("design:type",Cf)],If.prototype,"_tamingMeter",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_seenBackground",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_unseenBackground",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_notStartedLabel",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_tamedLabel",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_leavingSoon",void 0),(0,G.Cg)([(0,j.MnK)(Sf.D),(0,G.Sn)("design:type",Sf.D)],If.prototype,"_petElement",void 0),(0,G.Cg)([(0,j.MnK)(wf),(0,G.Sn)("design:type",wf)],If.prototype,"_ftueBreadcrumb",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],If.prototype,"_tamedAddToTeamButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_questionMark",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],If.prototype,"onLoaded",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],If.prototype,"onError",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],If.prototype,"onAddToTeamClicked",void 0),If=Of=(0,G.Cg)([(0,j.EVk)("PetProgressCard",W.Y.ultimatesUi)],If);let Df=class extends j.uAl{constructor(){super(...arguments),this._progressCards=[]}create(){super.create(),this._progressCards.forEach((k=>{k.GameObject.active=!1}))}init(k,B){this._nonMemberScroll.active=!1;const U=this._nonMemberScroll.findComponentInChildren(F.$);U.onEnabledClick.removeAll(),U.onEnabledClick.add(this.onMembershipBenefitsButtonClicked,this);const G=!tt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_ULTIMATES,ls.B.BREADCRUMB_ULTIMATES_FTUE);this._progressCards.forEach(((U,F)=>{F>=k.cardConfigs.length?U.GameObject.active=!1:(U.GameObject.active=!0,G?(U.init(k.cardConfigs[F],B,0===F),F>0&&U.disable()):U.init(k.cardConfigs[F],B,!0))})),B&&k.tamedPets.length<1?(this.inventory.GameObject.active=!1,this._nonMemberScroll.active=!0):this.inventory.init(k.tamedPets,k.untamedPets)}onMembershipBenefitsButtonClicked(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=Qt.J.showYouTubeMembershipAd(tt.q.instance.game,!0)?Fs.R.Video:Fs.R.Static,B=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasLegacyMembership(),U=this._nonMemberScroll.findComponent(bf),F=B?"visited_mythics_pet_book_upgrade":"visited_mythics_pet_book";tt.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:F,category:"mythics",contentId:null,adType:k}),this.gameObject.active=!1,U.overrideConversionEvent(en.o.FunnelMythics21Q4,Fs.R.Mythics21Q4),yield U.open(!0,B),this.gameObject.active=!0}))}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(If),(0,G.Sn)("design:type",Array)],Df.prototype,"_progressCards",void 0),(0,G.Cg)([(0,j.MnK)(gf),(0,G.Sn)("design:type",gf)],Df.prototype,"inventory",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Df.prototype,"_nonMemberScroll",void 0),Df=(0,G.Cg)([(0,j.EVk)("PetHomeScreen",W.Y.ultimatesUi)],Df);let Rf=class extends j.uAl{updateDisplayInfo(k){this._petId=k,this._petItem=Yt.t.getItem("pet",this._petId),this._petItem?(this._petName.text=eo.P8.getPetDisplayName(this._petItem.data,this._petItem),this._petInfo.text=this._localizer.getText(Qt.J.getLocalizationFlavorKey({id:k,type:"pet"}))):j.VyI.log(`PetAboutInfoComponent: Unable to load pet item data with id ${this._petId}`,j.$bb.Error)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Rf.prototype,"_petId",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Rf.prototype,"_petName",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Rf.prototype,"_petInfo",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Rf.prototype,"_localizer",void 0),Rf=(0,G.Cg)([(0,j.EVk)("PetAboutInfoCard",W.Y.uiPet)],Rf);var Pf=U(95946);let Mf=class extends j.uAl{updateDisplayInfo(k){this._petId=k,this._petItem=Yt.t.getItem("pet",this._petId),this._petItem?(this.updateHearts(),this.updateElement()):j.VyI.log(`PetStatInfoComponent: Unable to load pet item data with id ${this._petId}`,j.$bb.Error)}updateHearts(){var k;const B=null!==(k=this._playerProvider.player.kennel.getPetByID(this._petId))&&void 0!==k?k:this._petItem,U=eo.P8.getPetMaxHealth(B),F=eo.P8.getPetCurrentHealth(B),G=(0,zu.Hk)(U),j=(0,zu.Hk)(F);this._heartsProgressBar.setValue(F/U),this._petHeartsText.text=`${j}/${G}`}updateElement(){const k=eo.P8.getElementType(this._petItem);this._petElementText.text=xt.$.capitalizeFirstLetter(k),this._petElementIcon.updateAsset(Ve._.Ui_raster_icons_json,`icon-medium-${k===Pf.a.Plant?"earth":k}`)}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Mf.prototype,"_playerProvider",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Mf.prototype,"_petId",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Mf.prototype,"_petHeartsText",void 0),(0,G.Cg)([(0,j.MnK)(hf.a),(0,G.Sn)("design:type",hf.a)],Mf.prototype,"_heartsProgressBar",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Mf.prototype,"_petElementText",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],Mf.prototype,"_petElementIcon",void 0),Mf=(0,G.Cg)([(0,j.EVk)("PetStatsInfoCard",W.Y.uiPet)],Mf);var Nf=U(39984);let xf=class extends j.uAl{constructor(){super(...arguments),this.onLoaded=new j.HN0,this.onAddToTeamClicked=new j.HN0}init(k,B,U,F=!1){this._componentData=k,this._componentData.petItem=Yt.t.getItem("pet",k.petId),F&&this.onLoaded.addOnce((()=>{this._unlockSpineAnimator.playAnimation("epic-tamed",!1)})),this._petSpineLoader.onSpineItemLoaded.addOnce(this.onLoaded.dispatch,this.onLoaded),this._petSpineLoader.setAssetID(k.petId),this._tamingMeter.setTamingLevel(k.tamingLevel),this._membershipBenefitsButton.GameObject.active=!1,this._addToTeamButton.GameObject.active=!1,this._petNameHolder.active=!1,this._shadowFilter.removeFilter(),this._greyscaleFilter.removeFilter(),this._addToTeamButton.onEnabledClick.removeAll(),this._addToTeamButton.onEnabledClick.add(this.addToTeamClicked.bind(this)),B&&(this._memberLockObject.active=!0),this._canAccess=!B;const G=this._componentData.petItem.metadata.assets.tamingView;if(G){const k=G.viewerScale;this._petSpineLoader.GameObject.transform.setScale(k);const B=this._petSpineLoader.GameObject.transform.localPosition;this._petSpineLoader.GameObject.transform.setPosition(B.x+G.x,B.y+G.y)}switch(this._petSpineAnimator.GameObject.setLayer(this.GameObject.layer),this._unknownPetName.GameObject.setLayer(this.GameObject.layer),this._untamedPetName.GameObject.setLayer(this.GameObject.layer),this._unknownPetName.GameObject.active=!1,this._untamedPetName.GameObject.active=!1,this._tamedPetDataParent.active=!1,this._lockIconObject.active=!1,k.questState){case Af.e.Start:case Af.e.QuestAccepted:this.initUnknown();break;case Af.e.Found:this.initUntamed();break;case Af.e.QuestCompleted:this.initTamed();break;default:j.VyI.log(`[Pet Taming View]: Invalid petProgressStatus ${k.questState} given`,j.$bb.Warning)}this.showTimerState(U,eo.P8.isUltimateLeavingSoon(k.deadline,Tf.T.Week),k.questState===Af.e.QuestCompleted)}addToTeamClicked(){this.onAddToTeamClicked.dispatch({ID:this._componentData.petId})}showTimerState(k,B,U){this._timer.GameObject.parent.active=k,this._epicOfTheMonthText.active=k&&(!B||U),this._leavingSoonText.active=k&&B&&!U,this._leavingSoonAnimation.active=k&&B&&!U}initNotStarted(){this._unknownPetName.GameObject.active=!0,this._shadowFilter.applyFilter(),this._lockIconObject.active=this._canAccess,this._newEpicTasksButton.GameObject.active=!1,this._petNameHolder.active=!0,this._timer.GameObject.parent.active=!1,this._tamed.active=!1,this._tamingMeter.GameObject.parent.active=!0}initUnknown(){this._unknownPetName.GameObject.active=!this._componentData.nameUnlocked,this._untamedPetName.GameObject.active=this._componentData.nameUnlocked,this._untamedPetName.text=this._componentData.petItem.data.name,this._shadowFilter.applyFilter(),this._lockIconObject.active=this._canAccess,this._petNameHolder.active=!0,this._tamingMeter.GameObject.parent.active=!0,this._timer.GameObject.active=!0;const k=this._componentData.deadline.valueOf()-this._timeManager.getServerTimeMs();this._timer.setCountdownTimeMS(k),this._tamed.active=!1}initUntamed(){this._lockIconObject.active=this._canAccess,this._untamedPetName.GameObject.active=!0,this._untamedPetName.text=this._componentData.petItem.data.name,this._greyscaleFilter.applyFilter(),this._petNameHolder.active=!0,this._tamingMeter.GameObject.parent.active=!0,this._timer.GameObject.active=!0;const k=this._componentData.deadline.valueOf()-this._timeManager.getServerTimeMs();this._timer.setCountdownTimeMS(k),this._tamed.active=!1}initTamed(){this._lockIconObject.active=!1,this._tamedPetDataParent.active=!0,this._petSpineAnimator.playAnimation("idle",!0);const k=this._loggedInPlayer.player.kennel.getPetByID(this._componentData.petId);this._levelNumberText.text=`${k.level}`,this._tamedPetName.text=this._componentData.petItem.data.name,this._addToTeamButton.GameObject.active=!0,this._memberLockObject.active=!1;const B=Nf.e.starsToLevel(k.level,Vn.V.Pet),U=(null!==k.stars?k.stars:B)-B,F=Nf.e.starsToLevel(k.level+1,Vn.V.Pet)-B;this._starsProgressBar.setValue(U/F),this._tamingMeter.GameObject.parent.active=!1,this._timer.GameObject.active=!1,this._tamed.active=!0,this.gameObject.onActiveInHierarchyChanged.add(this.setTamedLockState,this),this.setTamedLockState()}setTamedLockState(){this._loggedInPlayer.player.kennel.petTeam.every((k=>(null==k?void 0:k.getID())!==this._componentData.petId))?this._addToTeamButton.unlockState():this._addToTeamButton.lockState(Ku.K.Disabled)}destroy(){this.gameObject.onActiveInHierarchyChanged.remove(this.setTamedLockState,this),this.onLoaded.dispose(),this.onAddToTeamClicked.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],xf.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("a03-308f"),(0,G.Sn)("design:type",Ks.V)],xf.prototype,"_timeManager",void 0),(0,G.Cg)([(0,j.MnK)(mf.N),(0,G.Sn)("design:type",mf.N)],xf.prototype,"_petSpineLoader",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],xf.prototype,"_unknownPetName",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],xf.prototype,"_lockIconObject",void 0),(0,G.Cg)([(0,j.MnK)(pf),(0,G.Sn)("design:type",pf)],xf.prototype,"_shadowFilter",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],xf.prototype,"_untamedPetName",void 0),(0,G.Cg)([(0,j.MnK)(rd),(0,G.Sn)("design:type",rd)],xf.prototype,"_greyscaleFilter",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],xf.prototype,"_tamedPetDataParent",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],xf.prototype,"_petSpineAnimator",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],xf.prototype,"_levelNumberText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],xf.prototype,"_tamedPetName",void 0),(0,G.Cg)([(0,j.MnK)(hf.a),(0,G.Sn)("design:type",hf.a)],xf.prototype,"_starsProgressBar",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],xf.prototype,"_addToTeamButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],xf.prototype,"_memberLockObject",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],xf.prototype,"_membershipBenefitsButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],xf.prototype,"_newEpicTasksButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],xf.prototype,"_petNameHolder",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],xf.prototype,"_epicOfTheMonthText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],xf.prototype,"_leavingSoonText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],xf.prototype,"_leavingSoonAnimation",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],xf.prototype,"_timer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],xf.prototype,"_tamed",void 0),(0,G.Cg)([(0,j.MnK)(Cf),(0,G.Sn)("design:type",Cf)],xf.prototype,"_tamingMeter",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],xf.prototype,"_unlockSpineAnimator",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],xf.prototype,"onLoaded",void 0),xf=(0,G.Cg)([(0,j.EVk)("PetTamingView",W.Y.ultimates)],xf);var Lf=U(9421);let kf=class extends ih.k{sendButtonEvent(){this._segment.featureCommon.sendButtonEvent(this.getPropertiesObject())}};kf=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsButton",W.Y.analytics)],kf);var Bf=U(13367);let Uf=class extends j.uAl{get currentStatus(){return this._currentStatus}init(k,B=!1){switch(this.reset(),this._currentStatus=k,k){case Lf.b.TrackLocked:break;case Lf.b.TrackUnlocked:this._acceptButton.GameObject.active=!0;break;case Lf.b.TrackInProgress:this._abandonButton.GameObject.active=!0;break;case Lf.b.Finished:this._finishedIcon.active=!0;break;default:j.VyI.log(`[PetTaskStatus] unknown pet progress state ${k}`,j.$bb.Warning)}B&&(this._acceptButton.lockState(Ku.K.Disabled),this._abandonButton.lockState(Ku.K.Disabled))}reset(){this._acceptButton.unlockState(),this._abandonButton.unlockState(),this._acceptButton.GameObject.active=!1,this._abandonButton.GameObject.active=!1,this._finishedIcon.active=!1,this._notFinishedIcon.active=!0}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uf.prototype,"_notFinishedIcon",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Uf.prototype,"_acceptButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Uf.prototype,"_abandonButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uf.prototype,"_finishedIcon",void 0),Uf=(0,G.Cg)([(0,j.EVk)("PetTaskStatus",W.Y.ultimates)],Uf);let Ff=class extends j.uAl{constructor(){super(...arguments),this._interactableIcons=[],this._loadingSpinners=[]}setTooltipIcons(k){this._interactableIcons.length===this._loadingSpinners.length?this._interactableIcons.forEach(((B,U)=>{B.OnLoaded.addOnce((()=>{this._loadingSpinners[U].active=!1})),B.setAsset(Ve._.Ui_raster_epicsv2_json,`icon-large-${k}-interactable-0${U+1}`).catch((k=>j.VyI.log(`[UltimatesTaskTooltip] There was an error setting the icon for the tooltip, ${k.message}`,j.$bb.Error)))})):j.VyI.log("[UltimatesTaskTooltip] Mismatch number of icons to loading spinners",j.$bb.Error)}destroy(){this._interactableIcons.forEach((k=>{k.OnLoaded.dispose()})),super.destroy()}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Array)],Ff.prototype,"_interactableIcons",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Ff.prototype,"_loadingSpinners",void 0),Ff=(0,G.Cg)([(0,j.EVk)("UltimatesTaskTooltip",W.Y.ultimatesUi)],Ff);let Gf=class extends j.uAl{constructor(){super(...arguments),this.onLoaded=new j.HN0,this.onChangeUltimatesSession=new j.HN0,this._onQuestActive=new j.HN0,this._onQuestInactive=new j.HN0}init(k,B,U=!0){this._memberLockedTooltip.active=!1,this._ultimatesTaskTooltip.active=!1,this._memberLocked=B,this._taskItemIcon.onIconLoaded.addOnce(this.onLoaded.dispatch,this.onLoaded),this._taskItemIcon.setItem(k.iconItemType,k.iconItemID,!0),this._taskDescription.text=`${k.descriptionVerb} ${k.targetAmount} ${k.descriptionSubject}`,this._taskProgressBar.setValue(k.currentAmount/k.targetAmount);const F=k.currentAmount>=k.targetAmount?tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("PROGRESS_BAR_COMPLETE"):`${k.currentAmount} / ${k.targetAmount}`;this._taskProgressBar.setBarText(F),this._trackNPCTaskId=k.trackingTaskId,this._tameUltimateTaskId=k.tamingTaskId,this._npcTaskStatus.init(k.npcStatus,B||!U),this._epicTaskStatus.init(k.epicStatus,B||!U),this._collectButton.GameObject.active=k.npcStatus===Lf.b.TrackLocked,B||!U?this._collectButton.lockState(Ku.K.Disabled):this._collectButton.unlockState(),this._collectionZoneID=k.collectingZoneID,this._goCollectSegmentConfig.destinationName=k.collectingZone,this._goCollectSegmentConfig.elementId=k.collectingTaskId.toString(),this._tameSegmentConfig.destinationName=k.tamingZone,this._tameSegmentConfig.elementId=k.tamingTaskId.toString();const G=Bf.m.getSeededLocation().split("-")[0];this._trackSegmentConfig.destinationName=tt.q.instance.prodigy.world.getZone(G).name,this._trackSegmentConfig.elementId=k.trackingTaskId.toString(),this._tooltipSegmentConfig.buttonName=k.descriptionSubject,this._tooltipSegmentConfig.elementId=k.collectingTaskId.toString(),this._isActive=U&&k.npcStatus!==Lf.b.Finished,(this._isActive?this._onQuestActive:this._onQuestInactive).dispatch()}setNPCStatus(k){this._collectButton.GameObject.active||this._npcTaskStatus.init(k)}get npcStatus(){return this._npcTaskStatus.currentStatus}setEpicStatus(k){this._collectButton.GameObject.active||this._epicTaskStatus.init(k)}get epicStatus(){return this._epicTaskStatus.currentStatus}startTracking(){this.onChangeUltimatesSession.dispatch(nl.n.TrackingNPC,this._trackNPCTaskId)}startTaming(){this.onChangeUltimatesSession.dispatch(nl.n.TamingUltimate,this._tameUltimateTaskId)}abandonSession(k){this.onChangeUltimatesSession.dispatch(nl.n.None,0),k?this._epicTaskStatus.init(Lf.b.TrackUnlocked):this._npcTaskStatus.init(Lf.b.TrackUnlocked)}showTooltip(){this._memberLocked&&!this._memberLockedTooltip.active&&this._isActive?this._memberLockedTooltip.active=!0:this.npcStatus{this._taskCards[B].onLoaded.addOnce(this.syncLoad,this),this._taskCards[B].init(k,F,G)}))}setTradeStarted(k){this._taskCards.forEach(((B,U)=>{U===k?B.setNPCStatus(Lf.b.TrackInProgress):B.npcStatus===Lf.b.TrackInProgress&&B.setNPCStatus(Lf.b.TrackUnlocked)})),this.setTamingAbandoned()}setTradeAbandoned(){this._taskCards.forEach((k=>{k.npcStatus===Lf.b.TrackInProgress&&k.setNPCStatus(Lf.b.TrackUnlocked)}))}setTamingStarted(k){this._taskCards.forEach(((B,U)=>{U===k?B.setEpicStatus(Lf.b.TrackInProgress):B.epicStatus===Lf.b.TrackInProgress&&B.setEpicStatus(Lf.b.TrackUnlocked)})),this.setTradeAbandoned()}setTamingAbandoned(){this._taskCards.forEach((k=>{k.epicStatus===Lf.b.TrackInProgress&&k.setEpicStatus(Lf.b.TrackUnlocked)}))}initPetIcon(k,B){const U=Yt.t.getItem("pet",k);switch(this._petIcon.onIconLoaded.addOnce(this.syncLoad,this),this._petIcon.setItem("pet",k,!0),this._petShadowFilter.removeFilter(),this._petGreyscaleFilter.removeFilter(),B){case Af.e.Start:case Af.e.QuestAccepted:this._petName.setLocalizationKey(jf.WHO_AM_I_KEY),this._petShadowFilter.applyFilter();break;case Af.e.Found:this._petName.setLocalizationKey(""),this._petName.GameObject.findComponent(j.EYj).text=U.data.name,this._petGreyscaleFilter.applyFilter();break;case Af.e.QuestCompleted:this._petName.setLocalizationKey(""),this._petName.GameObject.findComponent(j.EYj).text=U.data.name;break;default:j.VyI.log("[PetTasksTab] Unknown pet progress state provided",j.$bb.Warning)}}syncLoad(){--this._partsToBeLoaded<=0&&this.onLoaded.dispatch()}destroy(){this.onLoaded.dispose(),super.destroy()}};var Hf;$f.WHO_AM_I_KEY="ULTIMATES_WHO_AM_I",(0,G.Cg)([(0,j.MnK)(od.i),(0,G.Sn)("design:type",od.i)],$f.prototype,"_petIcon",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],$f.prototype,"_petName",void 0),(0,G.Cg)([(0,j.MnK)(rd),(0,G.Sn)("design:type",rd)],$f.prototype,"_petGreyscaleFilter",void 0),(0,G.Cg)([(0,j.MnK)(pf),(0,G.Sn)("design:type",pf)],$f.prototype,"_petShadowFilter",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Gf),(0,G.Sn)("design:type",Array)],$f.prototype,"_taskCards",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$f.prototype,"_loadingOverlay",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$f.prototype,"onLoaded",void 0),$f=jf=(0,G.Cg)([(0,j.EVk)("PetTasksTab",W.Y.ultimates)],$f);let Vf=Hf=class extends j.uAl{constructor(){super(...arguments),this.onLoaded=new j.HN0,this.onAddToTeamClicked=new j.HN0,this._partsToBeLoaded=-1,this._questId=""}create(){super.create(),this._statsTabToggle.GameObject.active=!1}init(k,B,U,F,G=!1){this._questId=k.questId,this._partsToBeLoaded=Hf.PARTS_TO_LOAD,this._tasksTabToggle.GameObject.parent.findComponent(qs.O).setSelectedIndex(0),this._tasksTabToggle.setSelected(!0),this._tasksTabToggle.onSelected.dispatch(),this._petTamingView.onLoaded.addOnce(this.syncLoad,this),this._petTamingView.init(k,U,F,G),this._petTamingView.onAddToTeamClicked.removeAll(),this._petTamingView.onAddToTeamClicked.add(this.addToTeamClicked.bind(this,k.petId)),this._petTasksTab.onLoaded.addOnce(this.syncLoad,this),this._petTasksTab.init(k.petId,k.questState,B,U,F);B.filter((k=>k.npcStatus===Lf.b.Finished)).length>1?(this._petAboutInfoCard.updateDisplayInfo(k.petId),this._aboutTabToggle.unlockState(),this._aboutTabToggle.inputEnabled=!0):(this._aboutTabToggle.lockState(Ku.K.Disabled),this._aboutTabToggle.inputEnabled=!1);B.every((k=>k.npcStatus===Lf.b.Finished))?(this._petStatsInfoCard.updateDisplayInfo(k.petId),this._statsTabToggle.unlockState(),this._statsTabToggle.inputEnabled=!0):(this._statsTabToggle.lockState(Ku.K.Disabled),this._statsTabToggle.inputEnabled=!1)}setTradeStarted(k){this._petTasksTab.setTradeStarted(k)}setTradeAbandoned(){this._petTasksTab.setTradeAbandoned()}setTamingStarted(k){this._petTasksTab.setTamingStarted(k)}setTamingAbandoned(){this._petTasksTab.setTamingAbandoned()}addToTeamClicked(k){const B=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.onAddToTeamClicked.dispatch(B.kennel.getPetByID(k))}syncLoad(){--this._partsToBeLoaded<=0&&this.onLoaded.dispatch()}changePlayerState(k,B){this._loggedInPlayer.player.setUltimateSessionStatus(k,this._questId,B),k!==nl.n.None&&(tt.q.instance.prodigy.open.map(),this.GameObject.destroy())}destroy(){this.onLoaded.dispose(),this.onAddToTeamClicked.dispose(),super.destroy()}};var Wf;Vf.PARTS_TO_LOAD=2,(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Vf.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],Vf.prototype,"_aboutTabToggle",void 0),(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],Vf.prototype,"_statsTabToggle",void 0),(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],Vf.prototype,"_tasksTabToggle",void 0),(0,G.Cg)([(0,j.MnK)(xf),(0,G.Sn)("design:type",xf)],Vf.prototype,"_petTamingView",void 0),(0,G.Cg)([(0,j.MnK)($f),(0,G.Sn)("design:type",$f)],Vf.prototype,"_petTasksTab",void 0),(0,G.Cg)([(0,j.MnK)(Rf),(0,G.Sn)("design:type",Rf)],Vf.prototype,"_petAboutInfoCard",void 0),(0,G.Cg)([(0,j.MnK)(Mf),(0,G.Sn)("design:type",Mf)],Vf.prototype,"_petStatsInfoCard",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Vf.prototype,"onLoaded",void 0),Vf=Hf=(0,G.Cg)([(0,j.EVk)("PetProgressInfo",W.Y.ultimatesUi)],Vf),function(k){k[k.COLLECT=0]="COLLECT",k[k.TRADE=1]="TRADE",k[k.TAME=2]="TAME",k[k.COMPLETE=3]="COMPLETE"}(Wf||(Wf={}));let qf=class extends j.uAl{constructor(){super(...arguments),this.onLoaded=new j.HN0,this.loadingPromise=new j.bnh}get taskStep(){return this._taskStep}get taskIcon(){return this._taskIcon}init(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){this._taskIcon.isLoaded||(this.onLoaded.addOnce(this.loadingPromise.resolve),yield this.loadingPromise)}))}setButtonState(k){this._startButton&&this._stopButton&&(this._startButton.active=kLf.b.TrackUnlocked)}destroy(){var k;this.onLoaded.dispose(),null===(k=this._taskIcon)||void 0===k||k.destroy(),super.destroy()}};(0,G.Cg)([(0,j.gfw)(Wf),(0,G.Sn)("design:type",Number)],qf.prototype,"_taskStep",void 0),(0,G.Cg)([(0,j.MnK)(od.i),(0,G.Sn)("design:type",od.i)],qf.prototype,"_taskIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],qf.prototype,"_taskDescription",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qf.prototype,"_startButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qf.prototype,"_stopButton",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],qf.prototype,"onLoaded",void 0),qf=(0,G.Cg)([(0,j.EVk)("TaskStepBase (abstract)",W.Y.ultimatesUi)],qf);let Kf=class extends j.uAl{constructor(){super(...arguments),this._checkObjects=[]}configure(k){if(this._checkObjects.length>Object.keys(Wf).length)j.VyI.log("[TaskProgressMeterComponent] There are too many objects listed compared to the amount of steps in ETaskStep.",j.$bb.Error);else for(let B=0;B{k.taskStep===U?(k.GameObject.active=!0,k.taskIcon.GameObject.active=U!==Wf.TRADE,F=k):k.GameObject.active=!1})),F?(yield F.init(k,B),F.GameObject.active=F.taskStep===U,this.setTradeProgressState(B.npcStatus),this.setTameProgressState(B.epicStatus)):j.VyI.log("[PetTamingTaskCardComponentV2] Error initializing the TaskStepComponent: current task step is not within the list of task containers",j.$bb.Error),this._taskProgressMeter.configure(U)}))}getCurrentTaskStep(k){let B;B=k.currentAmountk.taskStep===Wf.TRADE));null==B||B.setButtonState(k)}setTameProgressState(k){this._tamingState=k;const B=this._taskContainers.find((k=>k.taskStep===Wf.TAME));null==B||B.setButtonState(k)}};var Yf;(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(qf),(0,G.Sn)("design:type",Array)],zf.prototype,"_taskContainers",void 0),(0,G.Cg)([(0,j.MnK)(Kf),(0,G.Sn)("design:type",Kf)],zf.prototype,"_taskProgressMeter",void 0),zf=(0,G.Cg)([(0,j.EVk)("PetTamingTaskCardV2",W.Y.ultimates)],zf);let Qf=Yf=class extends j.uAl{constructor(){super(...arguments),this._taskCards=[],this.onLoaded=new j.HN0}init(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){this._loadingContainer.active=!0;const U=Yt.t.getItem("pet",k),F=[];if(B.forEach(((k,B)=>{F.push(this._taskCards[B].getCurrentTaskStep(k))})),F.every((k=>k===Wf.COMPLETE))){if(this.setTaskContainerVisibility(!1),this._allTasksCompleteText.setLocalizationKey(Yf.QUEST_COMPLETE_TEXT),this._allTasksCompleteText.setTextArguments(U.data.name),this._petIcon.onIconLoaded.addOnce(this.onLoaded.dispatch,this.onLoaded),this._petIcon.setItem("pet",k,!0),!this._petIcon.isLoaded){const k=new j.bnh;this.onLoaded.addOnce(k.resolve),yield k}}else this.setTaskContainerVisibility(!0),yield Promise.all(B.map(((B,U)=>(0,G.sH)(this,void 0,void 0,(function*(){yield this._taskCards[U].init(k,B)})))));this._questStatusText.setLocalizationKey(Yf.QUEST_STATUS_TEXT),this._questStatusText.setTextArguments(U.data.name),this.onLoaded.dispatch()}))}setTaskContainerVisibility(k){this._taskCardsContainer.active=k,this._allTasksCompleteContainer.active=!k}setTradeStarted(k){this._taskCards.forEach(((B,U)=>{U===k?B.setTradeProgressState(Lf.b.TrackInProgress):B.tradingState===Lf.b.TrackInProgress&&B.setTradeProgressState(Lf.b.TrackUnlocked)})),this.setTameAbandoned()}setTradeAbandoned(){this._taskCards.forEach((k=>{k.tradingState===Lf.b.TrackInProgress&&k.setTradeProgressState(Lf.b.TrackUnlocked)}))}setTameStarted(k){this._taskCards.forEach(((B,U)=>{U===k?B.setTameProgressState(Lf.b.TrackInProgress):B.tamingState===Lf.b.TrackInProgress&&B.setTameProgressState(Lf.b.TrackUnlocked)})),this.setTradeAbandoned()}setTameAbandoned(){this._taskCards.forEach((k=>{k.tamingState===Lf.b.TrackInProgress&&k.setTameProgressState(Lf.b.TrackUnlocked)}))}destroy(){this.onLoaded.dispose(),super.destroy()}};Qf.QUEST_STATUS_TEXT="ULTIMATES_QUEST_STATUS",Qf.QUEST_COMPLETE_TEXT="ULTIMATES_QUEST_COMPLETE",(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],Qf.prototype,"_questStatusText",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],Qf.prototype,"_allTasksCompleteText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Qf.prototype,"_taskCardsContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Qf.prototype,"_allTasksCompleteContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Qf.prototype,"_loadingContainer",void 0),(0,G.Cg)([(0,j.MnK)(od.i),(0,G.Sn)("design:type",od.i)],Qf.prototype,"_petIcon",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(zf),(0,G.Sn)("design:type",Array)],Qf.prototype,"_taskCards",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Qf.prototype,"onLoaded",void 0),Qf=Yf=(0,G.Cg)([(0,j.EVk)("PetTasksTabV2",W.Y.ultimates)],Qf);let Xf=class extends j.uAl{constructor(){super(...arguments),this.onSelectionChange=new j.HN0,this.onLoaded=new j.HN0}get petTasksTab(){return this._petTasksTab}create(){super.create(),this._statsTabToggle.GameObject.active=!1}init(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){this._toggleGroup.setSelectedIndex(0),this._tasksTabToggle.unlockState(),this._tasksTabToggle.setSelected(!0),this._tasksTabToggle.onSelected.dispatch(),this.onSelectionChange.dispatch(),yield this._petTasksTab.init(k,B);B.every((k=>k.npcStatus===Lf.b.Finished))?(this._petStatsInfoCard.updateDisplayInfo(k),this._statsTabToggle.unlockState(),this._statsTabToggle.inputEnabled=!0):(this._statsTabToggle.lockState(Ku.K.Disabled),this._statsTabToggle.inputEnabled=!1),this.onLoaded.dispatch()}))}setChurnedMemberState(k){this._churnedMemberContainer.active=k,this._petTasksTab.GameObject.active=!k,this.setAllTabsDisabled()}showPetTasksUnavailableState(k){const B=Yt.t.getItem("pet",k);if(B){this._petTaskUnavailableContainer.findComponentInChildren(vs.R).setTextArguments(B.data.name)}this._petTaskUnavailableContainer.active=!0,this._petTasksTab.GameObject.active=!1,this._toggleGroup.setItemSelected(this._tasksTabToggle,!1),this.setAllTabsDisabled(),this.onSelectionChange.dispatch()}hideTasksUnavailableState(){this._petTaskUnavailableContainer.active=!1,this._petTasksTab.GameObject.active=!0}setAllTabsDisabled(){this._toggleGroup.setItemSelected(this._statsTabToggle,!1),this._toggleGroup.setItemSelected(this._aboutTabToggle,!1),this._toggleGroup.setItemSelected(this._tasksTabToggle,!1),this._statsTabToggle.lockState(Ku.K.Disabled),this._aboutTabToggle.lockState(Ku.K.Disabled),this._tasksTabToggle.lockState(Ku.K.Disabled)}destroy(){this.onSelectionChange.dispose(),this.onLoaded.dispose(),super.destroy()}};var Zf;(0,G.Cg)([(0,j.MnK)(qs.O),(0,G.Sn)("design:type",qs.O)],Xf.prototype,"_toggleGroup",void 0),(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],Xf.prototype,"_statsTabToggle",void 0),(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],Xf.prototype,"_aboutTabToggle",void 0),(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],Xf.prototype,"_tasksTabToggle",void 0),(0,G.Cg)([(0,j.MnK)(Mf),(0,G.Sn)("design:type",Mf)],Xf.prototype,"_petStatsInfoCard",void 0),(0,G.Cg)([(0,j.MnK)(Rf),(0,G.Sn)("design:type",Rf)],Xf.prototype,"_petAboutInfoCard",void 0),(0,G.Cg)([(0,j.MnK)(Qf),(0,G.Sn)("design:type",Qf)],Xf.prototype,"_petTasksTab",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Xf.prototype,"_churnedMemberContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Xf.prototype,"_petTaskUnavailableContainer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Xf.prototype,"onSelectionChange",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Xf.prototype,"onLoaded",void 0),Xf=(0,G.Cg)([(0,j.EVk)("PetProgressTabController",W.Y.ultimatesUi)],Xf);let Jf=Zf=class extends qf{init(k,B){const U=Object.create(null,{init:{get:()=>super.init}});return(0,G.sH)(this,void 0,void 0,(function*(){this._taskDescription.text=`${B.descriptionVerb} ${B.targetAmount} ${B.descriptionSubject}`,this._taskIcon.onIconLoaded.addOnce(this.onLoaded.dispatch,this.onLoaded),this._taskIcon.setItem(B.iconItemType,B.iconItemID,!0),this._taskProgressBar.setValue(B.currentAmount/B.targetAmount);const F=B.currentAmount>=B.targetAmount?tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(Zf.PROGRESS_BAR_COMPLETE_TEXT):`${B.currentAmount} / ${B.targetAmount}`;this._taskProgressBar.setBarText(F),this._collectionZoneID=B.collectingZoneID,this._goCollectSegmentConfig.destinationName=B.collectingZone,this._goCollectSegmentConfig.elementId=B.collectingTaskId.toString(),this._tooltipSegmentConfig.buttonName=B.descriptionSubject,this._tooltipSegmentConfig.elementId=B.collectingTaskId.toString(),yield U.init.call(this,k,B)}))}showTooltip(){this._ultimatesTaskTooltip.active=!this._ultimatesTaskTooltip.active,this._ultimatesTaskTooltip.findComponent(Ff).setTooltipIcons(this._collectionZoneID),this._tooltipSegmentConfig.GameObject.findComponent(kf).sendButtonEvent()}};var tb;Jf.PROGRESS_BAR_COMPLETE_TEXT="PROGRESS_BAR_COMPLETE",(0,G.Cg)([(0,j.MnK)(ys.z),(0,G.Sn)("design:type",ys.z)],Jf.prototype,"_taskProgressBar",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Jf.prototype,"_ultimatesTaskTooltip",void 0),(0,G.Cg)([(0,j.MnK)(Xs),(0,G.Sn)("design:type",Xs)],Jf.prototype,"_goCollectSegmentConfig",void 0),(0,G.Cg)([(0,j.MnK)(Xs),(0,G.Sn)("design:type",Xs)],Jf.prototype,"_tooltipSegmentConfig",void 0),Jf=Zf=(0,G.Cg)([(0,j.EVk)("TaskStepCollect",W.Y.ultimatesUi)],Jf);let eb=tb=class extends qf{init(k,B){const U=Object.create(null,{init:{get:()=>super.init}});return(0,G.sH)(this,void 0,void 0,(function*(){this._taskDescription.text=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(tb.TASK_COMPLETE_TEXT),this._taskIcon.onIconLoaded.addOnce(this.onLoaded.dispatch,this.onLoaded),this._taskIcon.setItem("pet",k,!0),yield U.init.call(this,k,B)}))}};var ib;eb.TASK_COMPLETE_TEXT="TASK_STEP_COMPLETE",eb=tb=(0,G.Cg)([(0,j.EVk)("TaskStepComplete",W.Y.ultimatesUi)],eb);let sb=ib=class extends qf{init(k,B){const U=Object.create(null,{init:{get:()=>super.init}});return(0,G.sH)(this,void 0,void 0,(function*(){this._taskDescription.text=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(ib.TAME_TEXT),this._taskIcon.onIconLoaded.addOnce(this.onLoaded.dispatch,this.onLoaded),this._taskIcon.setItem("pet",k,!0),this._tameSegmentConfig.destinationName=B.tamingZone,this._tameSegmentConfig.elementId=B.tamingTaskId.toString(),yield U.init.call(this,k,B)}))}};var nb;sb.TAME_TEXT="TASK_STEP_TAME",(0,G.Cg)([(0,j.MnK)(Xs),(0,G.Sn)("design:type",Xs)],sb.prototype,"_tameSegmentConfig",void 0),sb=ib=(0,G.Cg)([(0,j.EVk)("TaskStepTame",W.Y.ultimatesUi)],sb);let ab=nb=class extends qf{init(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){this._taskDescription.text=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(nb.TRADE_TEXT);const k=Bf.m.getSeededLocation().split("-")[0];this._trackSegmentConfig.destinationName=tt.q.instance.prodigy.world.getZone(k).name,this._trackSegmentConfig.elementId=B.trackingTaskId.toString()}))}};ab.TRADE_TEXT="TASK_STEP_TRADE",(0,G.Cg)([(0,j.MnK)(Xs),(0,G.Sn)("design:type",Xs)],ab.prototype,"_trackSegmentConfig",void 0),ab=nb=(0,G.Cg)([(0,j.EVk)("TaskStepTrade",W.Y.ultimatesUi)],ab);let rb=class extends j.uAl{constructor(){super(...arguments),this.onLoaded=new j.HN0}init(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G;const j=Yt.t.getItem("pet",k);this._headerLocalizationKey&&(null===(B=this._headerTextComponent)||void 0===B||B.setLocalizationKey(this._headerLocalizationKey)),null===(U=this._headerTextComponent)||void 0===U||U.setTextArguments(j.data.name),this._descriptionLocalizationKey&&(null===(F=this._descriptionTextComponent)||void 0===F||F.setLocalizationKey(this._descriptionLocalizationKey)),null===(G=this._descriptionTextComponent)||void 0===G||G.setTextArguments(j.data.name),this._petIcon.setItem("pet",k,!0),this._petIcon.isLoaded||(yield this._petIcon.onIconLoaded.asPromise()),this._loadingContainer.active=!1,this.onLoaded.dispatch()}))}destroy(){this.onLoaded.dispose(),super.destroy()}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],rb.prototype,"_headerLocalizationKey",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],rb.prototype,"_headerTextComponent",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],rb.prototype,"_descriptionLocalizationKey",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],rb.prototype,"_descriptionTextComponent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],rb.prototype,"_loadingContainer",void 0),(0,G.Cg)([(0,j.MnK)(od.i),(0,G.Sn)("design:type",od.i)],rb.prototype,"_petIcon",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rb.prototype,"onLoaded",void 0),rb=(0,G.Cg)([(0,j.EVk)("UltimatesInfoDisplay",W.Y.ultimates)],rb);let ob=class extends j.uAl{init(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){this._ownedPetInfoDisplay.GameObject.active=!1,this._unavailablePetInfoDisplay.GameObject.active=!1,this._availablePetInfoDisplay.GameObject.active=!1,k?(yield this._ownedPetInfoDisplay.init(U),this._ownedPetInfoDisplay.GameObject.active=!0):B?(yield this._availablePetInfoDisplay.init(U),this._availablePetInfoDisplay.GameObject.active=!0):(yield this._unavailablePetInfoDisplay.init(U),this._unavailablePetInfoDisplay.GameObject.active=!0)}))}};var hb;(0,G.Cg)([(0,j.MnK)(rb),(0,G.Sn)("design:type",rb)],ob.prototype,"_ownedPetInfoDisplay",void 0),(0,G.Cg)([(0,j.MnK)(rb),(0,G.Sn)("design:type",rb)],ob.prototype,"_availablePetInfoDisplay",void 0),(0,G.Cg)([(0,j.MnK)(rb),(0,G.Sn)("design:type",rb)],ob.prototype,"_unavailablePetInfoDisplay",void 0),ob=(0,G.Cg)([(0,j.EVk)("UltimatesBannerSpotlight",W.Y.ultimates)],ob);let cb=hb=class extends j.uAl{constructor(){super(...arguments),this._onSelected=new j.HN0,this._onLoaded=new j.HN0,this._selectedMoveAmount=48,this._selectedMoveDirection=new j.I9Y(0,1),this._selectedMoveDuration=1,this._selected=!1,this._activeButton=null}get onSelected(){return this._onSelected}get onLoaded(){return this._onLoaded}get removeFromTeamButton(){return this._removeFromTeamButton}get addToTeamButton(){return this._addToTeamButton}get canCheckInfo(){return this._questData.isActive()||this._questData.getProgressData().questState===Af.e.QuestCompleted}get questData(){return this._questData}init(k,B=!1,U){var F;this._initialY=this._contentView.transform.localPosition.y,this._initialX=this._contentView.transform.localPosition.x,this._questData=k,this._canEarnInTreasureTrack=B,this._battlePassEndDate=U,null===(F=this.gameObject.findComponent(j.bE_))||void 0===F||F.Container.bind("UltimatesQuestData").toConstantValue(k),this.setDefaultUIState();const G=tt.q.instance.prodigy.gameContainer.get("db5-fb6e");this._canAccess=G.meetsRequirementsDeprecated(15),this._ultimateImage.setFrameName(k.petID.toString()),this.refreshCardState()}refreshCardState(){this.setDefaultUIState();const k=this._questData.getProgressData(),B=this._canEarnInTreasureTrack&&j.Aq$.isDefined(this._battlePassEndDate)||!this._canEarnInTreasureTrack&&eo.P8.isUltimateLeavingSoon(k.deadline,Tf.T.Week),U=this._playerData.player.kennel.hasPet(this._questData.petID);this._canEarnInTreasureTrack||this._questData.isActive()?U?this.determinePetAddState():B&&this.leavingSoonState(j.Aq$.isDefined(this._battlePassEndDate)?new Date(this._battlePassEndDate):k.deadline):this.unavailableState(),this._selected&&this.playSelectedAnimation()}playSelectedAnimation(){this._unavailableOverlay.active||this._innerTint.enableTint(),this._selectedBackground.active=!0,this._bloomAnimator.GameObject.active=!0,this._bloomAnimator.OnAnimationComplete.addOnce((()=>{this._bloomAnimator.playAnimation("bloom",!0)}),this),this._bloomAnimator.playAnimation("click",!1,!0)}selectionMove(){if(this._selected)return;this._selected=!0,this._cardInputOverlay.GameObject.active=!1,this._onSelected.dispatch(this._questData),this._activeButton&&(this._activeButton.GameObject.active=!0),this.playSelectedAnimation(),tt.q.instance.game.tweens.remove(this._moveTween);const k=this.getLocalPosObject();this._moveTween=tt.q.instance.game.add.tween(k,this),this._moveTween.to({x:this._initialX+this._selectedMoveAmount*this._selectedMoveDirection.x,y:this._initialY+this._selectedMoveAmount*this._selectedMoveDirection.y},this._selectedMoveDuration),this._moveTween.start()}deselectionMove(){var k;if(!this._selected)return;this._cardInputOverlay.GameObject.active=!0,this._selected=!1,this._innerTint.disableTint(this._graphicsContainer.active),this._selectedBackground.active=!1,this._bloomAnimator.GameObject.active=!1,this._moveTween&&(null===(k=this._moveTween.onTweenComplete)||void 0===k||k.removeAll(),tt.q.instance.game.tweens.remove(this._moveTween));const B=this.getLocalPosObject();this._moveTween=tt.q.instance.game.add.tween(B,this),this._moveTween.to({x:this._initialX,y:this._initialY},this._selectedMoveDuration).onTweenComplete.addOnce((()=>{this._activeButton&&(this._activeButton.GameObject.active=!1)})),this._moveTween.start()}setVisible(k){this._graphicsContainer.active=k}getLocalPosObject(){const k=new $e.ObservablePoint((()=>{this._contentView.transform.setPosition(k.x,k.y)}),this,this._contentView.transform.localPosition.x,this._contentView.transform.localPosition.y);return k}setDefaultUIState(){this._removeFromTeamButton.GameObject.active=!1,this._addToTeamButton.GameObject.active=!1,this._activeButton&&(this._activeButton.GameObject.active=!1),this._activeButton=null,this._innerTint.disableTint(),this._selectedBackground.active=!1,this._plusIcon.active=!1,this._checkmarkIcon.active=!1,this._lockedIcon.active=!1,this._leavingSoonBanner.active=!1,this._unavailableOverlay.active=!1,this._bloomAnimator.GameObject.active=!1}leavingSoonState(k){this._leavingSoonBanner.active=!0;const B=Math.abs(Date.now()-k.getTime()),U=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(hb.DAYS_LEFT_LOCALIZATION_KEY);this._leavingSoonText.setTemplateString(U),this._leavingSoonText.setCountdownTimeMS(B)}enableAddToTeam(){this._plusIcon.active=!0,this._activeButton=this._addToTeamButton}enableRemoveFromTeam(){this._checkmarkIcon.active=!0,this._activeButton=this._removeFromTeamButton}unavailableState(){const k=this._playerData.player.kennel.hasPet(this._questData.petID);this._lockedIcon.active=!k,this._unavailableOverlay.active=!k,k&&this.determinePetAddState()}determinePetAddState(){eo.P8.isPetOnTeam(this._playerData.player.kennel.getPetByID(this._questData.petID))?this.enableRemoveFromTeam():this.enableAddToTeam()}destroy(){var k;this._onSelected.dispose(),this._onLoaded.dispose(),null===(k=this._moveTween)||void 0===k||k.stop(),tt.q.instance.game.tweens.remove(this._moveTween),super.destroy()}};cb.DAYS_LEFT_LOCALIZATION_KEY="ULTIMATES_V2_DAYS_LEFT",(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],cb.prototype,"_playerData",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cb.prototype,"_onSelected",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cb.prototype,"_onLoaded",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],cb.prototype,"_selectedMoveAmount",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],cb.prototype,"_selectedMoveDirection",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],cb.prototype,"_selectedMoveDuration",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cb.prototype,"_contentView",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],cb.prototype,"_removeFromTeamButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],cb.prototype,"_addToTeamButton",void 0),(0,G.Cg)([(0,j.MnK)(Eh.w),(0,G.Sn)("design:type",Eh.w)],cb.prototype,"_innerTint",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cb.prototype,"_selectedBackground",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cb.prototype,"_plusIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cb.prototype,"_checkmarkIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cb.prototype,"_lockedIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cb.prototype,"_leavingSoonBanner",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],cb.prototype,"_leavingSoonText",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],cb.prototype,"_ultimateImage",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cb.prototype,"_unavailableOverlay",void 0),(0,G.Cg)([(0,j.MnK)(Fe.n),(0,G.Sn)("design:type",Fe.n)],cb.prototype,"_cardInputOverlay",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],cb.prototype,"_bloomAnimator",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cb.prototype,"_graphicsContainer",void 0),cb=hb=(0,G.Cg)([(0,j.EVk)("UltimatesCarouselCard",W.Y.ultimatesUi)],cb);let db=class extends j.uAl{constructor(){super(...arguments),this._tamingLevel=0,this.maxTamingLevel=3,this.OnTransitionComplete=new j.HN0}get tamingLevel(){return this._tamingLevel}create(){super.create(),this.setTamingLevel(this._tamingLevel)}setTamingLevel(k,B){this._tamingLevel=Math.min(Math.max(k,0),this.maxTamingLevel);const U=`idle-${this._tamingLevel}`,F=`transition-${this._tamingLevel}`;B&&this._heartSpine.OnAnimationComplete.addOnce((()=>{this._heartSpine.playAnimation(U,!1),this.OnTransitionComplete.dispatch()})),this._heartSpine.playAnimation(B?F:U,!1)}destroy(){this.OnTransitionComplete.dispose(),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],db.prototype,"_tamingLevel",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],db.prototype,"_heartSpine",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],db.prototype,"maxTamingLevel",void 0),db=(0,G.Cg)([(0,j.EVk)("UltimatesTamingMeter",W.Y.ultimatesUi)],db);U(33359),U(34454),U(52322);var lb=U(12676);let ub=class extends j.uAl{constructor(){super(...arguments),this._onPlinthPresent=new j.HN0,this._onPlinthNotPresent=new j.HN0}create(){super.create(),$e.Ticker.shared.addOnce(this.checkForPlinthPresence,this)}checkForPlinthPresence(){this.GameObject.active?this._onPlinthPresent.dispatch():this._onPlinthNotPresent.dispatch()}sendDiscoveryEvent(){tt.q.instance.prodigy.gameContainer.get("c47-20b6").gameWorld.sendNpcDiscoveredEvent({npc_name:lb.N.UltimatesPlinth,npc_id:"ultimates_plinth",npc_type:Ia.ac.QuestGiver,npc_animation_id:"idle",x_coord:this.GameObject.transform.worldPosition.x,y_coord:this.GameObject.transform.worldPosition.y})}sendClickedEvent(){tt.q.instance.prodigy.gameContainer.get("c47-20b6").gameWorld.sendNpcClickedEvent({npc_name:lb.N.UltimatesPlinth,npc_type:Ia.ac.QuestGiver,npc_id:"ultimates_plinth"})}destroy(){this._onPlinthPresent.dispose(),this._onPlinthNotPresent.dispose(),$e.Ticker.shared.remove(this.checkForPlinthPresence,this),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ub.prototype,"_onPlinthPresent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ub.prototype,"_onPlinthNotPresent",void 0),ub=(0,G.Cg)([(0,j.EVk)("UltimatesPlinth",W.Y.ultimates)],ub);let fb=class extends j.PQK{installBindings(){{const k=tt.q.instance.prodigy.gameContainer;this.Container.bind("200-7dc0").toConstantValue(k.get("200-7dc0")),this.Container.bind("e50-b09b").toConstantValue(k.get("e50-b09b")),this.Container.bind(ar.QuestManager).toConstantValue(k.get("e50-b09b")),this.Container.bind("AnimationData").toConstantValue(new xi.F(U(34500)))}}};fb=(0,G.Cg)([(0,j.Og1)("UltimatesInstaller","Installer")],fb);U(11288),U(94995),U(83195),U(29438),U(16905),U(78703);var bb,pb=U(24521),vb=U(23029);!function(k){k[k.AVAILABLE=0]="AVAILABLE",k[k.UNAVAILABLE=1]="UNAVAILABLE",k[k.COMPLETED=2]="COMPLETED"}(bb||(bb={}));let gb=class extends j.uAl{get taskData(){return this._taskData}init(k){this._taskData=this.isTaskData(k)?k:this.getTaskData(k),this._iconTarget.setAsset(this._taskData.icon).catch((k=>j.VyI.log(`There was an error setting the icon for a Quest Task, ${k.message}`,j.$bb.Error)))}setTaskText(){const k={type:this._taskData.type,ID:this._taskData.id};this._name.text=(0,ms.k)(Qt.J.getLocalizationNameKey(k)),this._flavor.text=(0,ms.k)(Qt.J.getLocalizationFlavorKey(k))}setStatus(k){k===bb.AVAILABLE?(this._greyscale.removeFilter(),this.toggle.unlockState(),this.toggle.inputEnabled=!0):(this._greyscale.applyFilter(),this.toggle.lockState(Ku.K.Disabled),this.toggle.inputEnabled=!1,this._iconComplete.active=k===bb.COMPLETED)}isTaskData(k){return void 0!==k.id}getTaskData(k){const B=Yt.t.getItem(k.taskDefinition.completionRequirements.data.type,k.taskDefinition.completionRequirements.data.id);return{type:B.type,id:B.ID,name:Qt.J.getLocalizationNameKey(B),flavorText:Qt.J.getLocalizationFlavorKey(B),icon:fs.E.getIconForType(B.type,B.ID),status:k.taskProgress.status===pr.t.COMPLETE?bb.COMPLETED:bb.UNAVAILABLE}}};(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],gb.prototype,"toggle",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],gb.prototype,"_name",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],gb.prototype,"_flavor",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],gb.prototype,"_iconTarget",void 0),(0,G.Cg)([(0,j.MnK)(rd),(0,G.Sn)("design:type",rd)],gb.prototype,"_greyscale",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gb.prototype,"_iconComplete",void 0),gb=(0,G.Cg)([(0,j.EVk)("TaskDisplay",W.Y.ultimatesUi)],gb);let mb=class extends j.uAl{constructor(){super(...arguments),this._taskCards=[],this.taskSelected=new j.HN0}create(){super.create(),this._taskCards.forEach((k=>{const B=k.findComponent(gb);B.toggle.onSelected.add((()=>{this.taskSelected.dispatch(B.taskData.type,B.taskData.id),B.setTaskText()}))}))}setTasks(k,B=[]){this._taskCards.length===k.length?this._taskCards.forEach(((U,F)=>{const G=U.findComponent(gb);G.init(k[F]),B.some((k=>k.taskDefinition.completionRequirements.data.id===G.taskData.id))&&(G.taskData.status=bb.AVAILABLE),G.setStatus(G.taskData.status)})):j.VyI.log(`Attempted to set ${k.length} items for ${this._taskCards.length} cards`,j.$bb.Error)}destroy(){this.taskSelected.dispose(),super.destroy()}};(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],mb.prototype,"_taskCards",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],mb.prototype,"taskSelected",void 0),mb=(0,G.Cg)([(0,j.EVk)("TaskSelector",W.Y.ultimatesUi)],mb);var yb=U(2775);let _b=class extends j.uAl{constructor(){super(...arguments),this._animationStates=["idle-1","idle-2","idle-3"],this._idleDialogues=[1258,1259,1260],this.onCutsceneComplete=new j.HN0,this._poseIndex=0}create(){super.create(),tt.q.instance.prodigy.load.assets(Xu.B.Voice_42_1),this._poseIndex=Math.floor(Math.random()*this._animationStates.length),this._spine.playAnimation(this._animationStates[this._poseIndex],!0)}run(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;const U=this._playerDataProvider.player.ultimateQuestId,F=null===(k=yield this._questManager.getQuestMetaData(U))||void 0===k?void 0:k.petID,$=this._playerDataProvider.player.ultimateSessionStatus===nl.n.TrackingNPC,H=(null!==(B=yield this._questManager.getTasksInProgress())&&void 0!==B?B:[]).filter(this.isTradingTask).filter((k=>$&&k.questID===U)),V=H.length>0?(yield this._questManager.getQuestTasks(U)).filter(this.isTradingTask):[],W=yield this.getRandomLoreDialogue();(class{static play(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){k?B?yield(0,Td.v$)([U,1264]):yield(0,Td.v$)([U,F,1265]):yield(0,Td.v$)([1254,1255,1256,1257])}))}}).play(this._featureRequirements.meetsRequirementsDeprecated(15),H.length>0,this._idleDialogues[this._poseIndex],W).then((()=>{this.onCutsceneComplete.dispatch(),H.length>0&&this.openTradingTaskPopup(V,H,F)})).catch(j.RQr.createHandler("An error occurred while trying to play UltimatesWanderingNPCDialogue"))}))}getRandomLoreDialogue(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=(yield this._ultimatesQuestDataProvider.getCurrentQuestData()).filter((k=>k.isActive())).map((k=>k.petID)),B=vb.R.loadData(pb.r.UltimatesPetLocationConfig_json).ultimatesData.filter((B=>k.includes(B.id))).map((k=>k.loreDialogueIDs));return j.lv2.getRandomItem((0,ct.flatten)(B))}))}destroy(){this.onCutsceneComplete.dispose(),super.destroy()}isTradingTask(k){return k.type===Wr.T.TRADE_WITH_ULLA}openTradingTaskPopup(k,B,U){tt.q.instance.prodigy.open.prefabMenu(Rt.l.UltimatesItemTradePopup,void 0,void 0,void 0,void 0,{[ar.QuestManager]:tt.q.instance.prodigy.gameContainer.get("e50-b09b")}).onPrefabLoaded.addOnce((U=>{U.transform.setPosition(tt.q.instance.game.width/2,tt.q.instance.game.height/2),U.findComponent(mb).setTasks(k,B),U.onDestroy.addOnce((()=>{mi.rD.runDialogueSequence([1265],(()=>{this._playerDataProvider.player.ultimateSessionStatus!==nl.n.None&&(tt.q.instance.game.broadcaster.addAppListener(jn.ig.PlayerLoaded,(()=>{tt.q.instance.prodigy.open.pets(),tt.q.instance.game.broadcaster.removeAppListener(jn.ig.PlayerLoaded,this,void 0),this._playerDataProvider.player.unlockSessionStatus()}),this,void 0,!0),this._playerDataProvider.player.setUltimateSessionStatus(nl.n.Transition,"",0,!0))}))}))}))}};(0,G.Cg)([(0,j.Cdj)("db5-fb6e"),(0,G.Sn)("design:type",Object)],_b.prototype,"_featureRequirements",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],_b.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("e50-b09b"),(0,G.Sn)("design:type",qd.k)],_b.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.Cdj)("200-7dc0"),(0,G.Sn)("design:type",yb.m)],_b.prototype,"_ultimatesQuestDataProvider",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],_b.prototype,"_spine",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],_b.prototype,"onCutsceneComplete",void 0),_b=(0,G.Cg)([(0,j.EVk)("WanderingNPCBranchingDialogue",W.Y.ultimates)],_b);var Eb,wb,Tb,Sb=U(12270),Ab=U(39938);!function(k){k.Core="GoldAnchor",k.Plus="PlusAnchor",k.Ultra="UltraAnchor"}(Eb||(Eb={})),function(k){k.Spread="SpreadAnchors",k.Tight="TightAnchors"}(wb||(wb={})),(0,Ab.n)(wb,"ChestGroupLayout"),function(k){k.Sparkle="SparkleContainer",k.Arrow="ArrowContainer"}(Tb||(Tb={}));let Cb=class extends j.uAl{constructor(){super(...arguments),this._allowanceLayoutMap=new Map,this._chestAnchorMap=new Map,this._layout=wb.Tight,this._allowance=qt.D.Core,this._hasBeenInitialized=!1}get _layoutState(){return this._layout}set _layoutState(k){this.onLayoutStateChanged(k)}setLayoutState(k){this.onLayoutStateChanged(k)}set _allowanceState(k){this.onAllowanceStateChanged(k)}setAllowance(k){this.onAllowanceStateChanged(k)}postCreate(){this._allowanceLayoutMap.set(qt.D.NonMember,this.coreLayoutContainer),this._allowanceLayoutMap.set(qt.D.Core,this.coreLayoutContainer),this._allowanceLayoutMap.set(qt.D.Plus,this.plusLayoutContainer),this._allowanceLayoutMap.set(qt.D.Ultra,this.ultraLayoutContainer),this._chestAnchorMap.set(Eb.Core,this.goldChestObject),this._chestAnchorMap.set(Eb.Plus,this.plusChestObject),this._chestAnchorMap.set(Eb.Ultra,this.ultraChestObject),this._hasBeenInitialized=!0,this.updateChestLayout(),this.updateHighlightElements(),super.postCreate()}onLayoutStateChanged(k){this._layout=k,this.updateChestLayout(),this.updateHighlightElements()}onAllowanceStateChanged(k){this._allowance=k,this.updateChestLayout(),this.updateHighlightElements()}updateChestLayout(){this._allowanceLayoutMap.forEach(((k,B)=>{B===this._allowance&&(null==k||k.children.forEach((k=>{var B;k.name===this._layout&&(this._allowance===qt.D.NonMember&&(null===(B=k.findChildByName(Eb.Core))||void 0===B||B.addChild(this.goldChestObject)),Object.values(Eb).forEach((B=>{var U;null===(U=k.findChildByName(B))||void 0===U||U.addChild(this._chestAnchorMap.get(B))})))})))}))}updateHighlightElements(){var k,B;if(!this._hasBeenInitialized)return;const U=null!==(B=null===(k=this._rootHighlightContainer.findChildByName(this._allowance))||void 0===k?void 0:k.findChildByName(this._layout))&&void 0!==B?B:null;if(!U)return;const F=U.findChildByName(Tb.Sparkle);F&&F.addChild(this._highlightSparkle);const G=U.findChildByName(Tb.Arrow);G&&G.addChild(this._highlightArrow)}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cb.prototype,"coreLayoutContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cb.prototype,"plusLayoutContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cb.prototype,"ultraLayoutContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cb.prototype,"goldChestObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cb.prototype,"plusChestObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cb.prototype,"ultraChestObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cb.prototype,"_highlightSparkle",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cb.prototype,"_highlightArrow",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cb.prototype,"_rootHighlightContainer",void 0),(0,G.Cg)([(0,j.gfw)(wb),(0,G.Sn)("design:type",String),(0,G.Sn)("design:paramtypes",[String])],Cb.prototype,"_layoutState",null),(0,G.Cg)([(0,j.gfw)(qt.D),(0,G.Sn)("design:type",String),(0,G.Sn)("design:paramtypes",[String])],Cb.prototype,"_allowanceState",null),Cb=(0,G.Cg)([(0,j.EVk)("WizardBankChestGroupLayoutController")],Cb);var Ob=U(8838);let Ib=class extends j.uAl{constructor(){super(...arguments),this._primaryColor="#F6E38C",this._secondaryColor="#AD3E0F",this._value=0}get primaryColor(){return this._primaryColor}get secondaryColor(){return this._secondaryColor}get value(){return this._value}set value(k){this._value=k,this.setValue(k)}postCreate(){this.setValue(this._value),this.setColors(this.primaryColor,this.secondaryColor),super.postCreate()}setValue(k){this._valueTextComponent.text=`${k}`,this._borderTextComponent.text=`${k}`}setColors(k,B){if(!xt.$.isValidHex(k))return;const U=xt.$.isValidHex(B)?B:k;this._valueTextComponent.fill=`${k}`,this._valueTextComponent.stroke=`${U}`}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ib.prototype,"_valueTextComponent",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ib.prototype,"_borderTextComponent",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",Object)],Ib.prototype,"_primaryColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",Object)],Ib.prototype,"_secondaryColor",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ib.prototype,"_value",void 0),Ib=(0,G.Cg)([(0,j.EVk)("MagicoinValueText")],Ib);var Db=U(40743);const Rb={[qt.D.NonMember]:["#F6E38C","#AD3E0F"],[qt.D.Core]:["#F6E38C","#AD3E0F"],[qt.D.Plus]:["#AEEAF2","#5C6AAA"],[qt.D.Ultra]:["#FFB1D7","#9D3E67"]},Pb=800;let Mb=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.onPanelButtonPressed=this.createTidySignal(),this._canCollect=!1}get canCollect(){return this._canCollect}create(){super.create(),this.gameObject.parent.active=!1,this.setAlpha(0)}update(){super.update(),this._tweenFromPosition&&this._tweenFromPosition.x!==this.gameObject.parent.transform.localPosition.x&&(this.tweenXPosition(this._tweenFromPosition.x-this.gameObject.parent.transform.localPosition.x,0,Pb,0),this._tweenFromPosition=void 0)}onAllowanceTierStateChange(k){oh.A.isDefined(this._tierTextComponent)&&(this._tierTextComponent.text=xt.$.capitalizeFirstLetter(k),this._tierTextComponent.fill=`${Rb[k][0]}`)}destroy(){tt.q.instance.prodigy.game.tweens.removeAllFromOwner(this),super.destroy()}setup(k){var B,U,F,G,j;const{allowanceTier:$,currencyValue:H,forceChestState:V,layout:W}=k;null===(B=this.allowanceStateController)||void 0===B||B.setState($);const q=null!=W?W:wb.Tight;null===(U=this.layoutController)||void 0===U||U.setLayoutState(q);const{value:K}=null!=H?H:{value:0};null===(F=this.valueTextComponent)||void 0===F||F.setValue(K),null===(G=this.valueTextComponent)||void 0===G||G.setColors(...Rb[$]);const z=K>0;this._canCollect=z,oh.A.isDefined(this.collectButtonObject)&&(this.collectButtonObject.active=z),oh.A.isDefined(this.collectedSpineObject)&&(this.collectedSpineObject.active=!z);const Y=null!=V?V:z?Ob.T.Open:Ob.T.Disabled,Q=this.checkIfPlayerNeedsMembership($);oh.A.isDefined(this._askParentTextObject)&&(this._askParentTextObject.active=!!z&&Q),oh.A.isDefined(this._promptTextComponent)&&Q&&(this._promptTextComponent.text=(0,ms.k)("WIZARD_BANK_BECOME")),null===(j=this.chestStateController)||void 0===j||j.setState(Y)}changeToClaimedState(){this.allowanceStateController&&this.setup({allowanceTier:this.allowanceStateController.currentState,forceChestState:Ob.T.Disabled}),this._tweenFromPosition=dt().clone(this.gameObject.parent.transform.localPosition)}checkIfPlayerNeedsMembership(k){var B;switch(null!==(B=Sb.E.get(this._activePlayer.getMemberTier()))&&void 0!==B?B:qt.D.NonMember){case qt.D.Ultra:return!1;case qt.D.Plus:return k===qt.D.Ultra;case qt.D.Core:return k===qt.D.Ultra||k===qt.D.Plus;case qt.D.NonMember:default:return!0}}handleButtonPress(){this.onPanelButtonPressed.dispatch()}tweenIn(k){this.gameObject.parent.active=!0,this.tweenAlpha(0,1,k),this.tweenXPosition(50,0,Pb,k)}tweenAlpha(k,B,U){const F={value:k};this.setAlpha(k);const G=tt.q.instance.prodigy.game.add.tween(F,this);G.to({value:B},Pb,j.GS3.Linear.None,!0,U),G.onUpdate.add((()=>this.setAlpha(F.value))),G.start()}tweenXPosition(k,B,U,F){const G={value:k};this.gameObject.transform.setPositionX(G.value);const $=tt.q.instance.prodigy.game.add.tween(G,this);$.to({value:B},U,j.GS3.Cubic.Out,!0,F),$.onUpdate.add((()=>{this.gameObject.transform.setPositionX(G.value)})),$.start()}setAlpha(k){this.panelRenderComponent&&(this.panelRenderComponent.alpha=k,this.panelRenderComponent.updateFilter())}};(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],Mb.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Mb.prototype,"onPanelButtonPressed",void 0),(0,G.Cg)([(0,j.MnK)(Cb),(0,G.Sn)("design:type",Cb)],Mb.prototype,"layoutController",void 0),(0,G.Cg)([(0,j.MnK)(Db.r),(0,G.Sn)("design:type",Db.r)],Mb.prototype,"chestStateController",void 0),(0,G.Cg)([(0,j.MnK)(Db.r),(0,G.Sn)("design:type",Db.r)],Mb.prototype,"allowanceStateController",void 0),(0,G.Cg)([(0,j.MnK)(Ib),(0,G.Sn)("design:type",Ib)],Mb.prototype,"valueTextComponent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Mb.prototype,"collectButtonObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Mb.prototype,"collectedSpineObject",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Mb.prototype,"_promptTextComponent",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Mb.prototype,"_tierTextComponent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Mb.prototype,"_askParentTextObject",void 0),(0,G.Cg)([(0,j.MnK)(j.jsv),(0,G.Sn)("design:type",j.jsv)],Mb.prototype,"panelRenderComponent",void 0),Mb=(0,G.Cg)([(0,j.EVk)("WizardBankCollectPanelController")],Mb);let Nb=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.onCoinsReachedWallet=this.createTidySignal(),this._canCollect=!1}get canCollect(){return this._canCollect}setup(k){1===k.reward.currency?(this._canCollect=k.availableToCollect,k.availableToCollect?this._rewardAmountText.text=(0,zu.Hk)(k.reward.value):(this._rewardAmountText.text="0",this._claimedStateSignal.run())):j.VyI.log("Attempted to setup gold widget with a non-gold claim",j.$bb.Warning)}playCollectSequence(){this._canCollect=!1,this._collectSequenceSignal.run()}notifyCoinHasReachedWallet(){this.onCoinsReachedWallet.dispatch()}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Nb.prototype,"_rewardAmountText",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Nb.prototype,"collectButton",void 0),(0,G.Cg)([(0,j.MnK)(ql.S),(0,G.Sn)("design:type",ql.S)],Nb.prototype,"_claimedStateSignal",void 0),(0,G.Cg)([(0,j.MnK)(ql.S),(0,G.Sn)("design:type",ql.S)],Nb.prototype,"_collectSequenceSignal",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Nb.prototype,"onCoinsReachedWallet",void 0),Nb=(0,G.Cg)([(0,j.EVk)("WizardBankGoldWidgetController")],Nb);var xb,Lb,kb=U(4903),Bb=U(63352),Ub=U(91462),Fb=U(84938),Gb=U(76253);!function(k){k.Load="on_load",k.Play="on_play"}(Lb||(Lb={}));let jb=xb=class extends j.y4o{constructor(){super(...arguments),this.videoFolderPath="https://cdn.prodigygame.com/videos/",this.videoName="",this.videoSizeRatio="",this.autoPlay=!0,this.videoTimeoutMs=1e4,this.showCountdownTimer=!0,this.sendPurchaseFunnelEvents=!0,this.onVideoEnded=new j.HN0,this.onVideoStarted=new j.HN0,this.onVideoPlayCancelled=new j.HN0,this.onVideoStalled=new j.HN0,this.onVideoResumed=new j.HN0,this.videoEventType=Gb.B.None,this.instanceType=fi.N.MembershipVideo,this._resolutionIds={[kb.W.SD]:"",[kb.W.HD]:"",[kb.W.FullHD]:""},this._containerSize=new j.or0,this._isLoading=!1,this._isPlaying=!1,this._hasError=!1,this._hasNetworkConnection=!0}set funnelStartTriggerParams(k){this._funnelStartTriggerParams=k}postCreate(){var k;super.postCreate();{this._handleNetworkOfflineReference=this.onNetworkOffline.bind(this),window.addEventListener("offline",this._handleNetworkOfflineReference),this._handleNetworkOnlineReference=this.onNetworkOnline.bind(this),window.addEventListener("online",this._handleNetworkOnlineReference);const B=null!==(k=this.getInjectedValue(hs.Wr.OriginId))&&void 0!==k?k:"";this._segment.videos.sendInterfaceOpenEvent(this.videoEventType,this.instanceType,B),this.autoPlay&&this.tryLoadAndPlayVideo()}}destroy(){var k;this._isPlaying&&this.handleVideoEnd(),null===(k=this._container)||void 0===k||k.destroy(),window.removeEventListener("offline",this._handleNetworkOfflineReference),window.removeEventListener("online",this._handleNetworkOnlineReference),this.onVideoEnded.dispose(),this.onVideoStarted.dispose(),this.onVideoPlayCancelled.dispose(),this.onVideoStalled.dispose(),this.onVideoResumed.dispose(),super.destroy()}tryLoadAndPlayVideo(){return(0,G.sH)(this,void 0,void 0,(function*(){this.loadVideoResource().catch((()=>{this.handleVideoError(),j.VyI.log("Failed to set up video player",j.$bb.Error)}))}))}initNetworkSpeed(){return(0,G.sH)(this,void 0,void 0,(function*(){return new Promise(((k,B)=>{const U=Date.now(),F=new Image,j=`https://cdn.prodigygame.com/videos/video-image-purple.png?t=${U}`;F.onerror=this.onVideoError.bind(this),F.onload=()=>(0,G.sH)(this,void 0,void 0,(function*(){try{const B=Date.now(),F=Number((2940192/((B-U)/1e3)).toFixed(2));this._networkSpeedKbps=Number((F/1e3).toFixed(2)),k()}catch(F){B(new Error("Failed to get network speed."))}})),F.src=j}))}))}onNetworkOffline(){this._hasNetworkConnection=!1,this._isLoading&&this.handleVideoError()}onNetworkOnline(){this._hasNetworkConnection=!0}getDimensions(){return this._containerSize.setTo(this._container.width,this._container.height),this._containerSize}getVideoIdForResolution(k=kb.W.SD){return this._resolutionIds[k]?this._resolutionIds[k]:(j.VyI.log(`HTMLVideoPlayerComponent: No GUID found for resolution ${k}; using base video name instead`,j.$bb.Warning),this.videoName)}getVideoPathFromId(k){return`${this.videoFolderPath}${k}.mp4`}getVideoIdsForAllResolutions(){return 0===Object.keys(this._resolutionIds).length?(j.VyI.log("HTMLVideoPlayerComponent: No supported resolutions found for video; using base video ID only",j.$bb.Warning),[this.getVideoIdForResolution()]):Object.keys(this._resolutionIds).map((k=>this.getVideoIdForResolution(k)))}getCachedVideoId(){let k;for(const B of this.getVideoIdsForAllResolutions())if(xb.CACHED_VIDEO_IDS.includes(B)){k=B;break}return k}getResolution(){const k=Object.keys(this._resolutionIds);let B=kb.W.SD;for(let U=1;Uxb.MIN_NETWORK_SPEED_BENCHMARKS[F]&&(B=F)}return B}generateFullVideoPath(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this.getCachedVideoId();if(k)this._selectedVideoId=k;else{if(Object.keys(this._resolutionIds).length>0){yield this.initNetworkSpeed();const k=this.getResolution();this._selectedVideoId=this.getVideoIdForResolution(k)}else this._selectedVideoId=this.getVideoIdForResolution();this._selectedVideoId&&xb.CACHED_VIDEO_IDS.push(this._selectedVideoId)}return this.getVideoPathFromId(this._selectedVideoId)}))}loadVideoResource(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._isLoading=!0,this._segment.videos.setNetworkTestStartedTimestamp(),!this._hasNetworkConnection)return void this.handleVideoError();let k;try{k=yield this.generateFullVideoPath()}catch(jv){return void this.handleVideoError()}this._segment.videos.sendVideoLoadingStartedEvent(this._selectedVideoId,this.videoEventType,this.instanceType),this.setupTimeout();const B=new $e.VideoResource(k,{updateFPS:30,autoPlay:!1,autoLoad:!1});this._videoController=B.source;const U=()=>{this.handleVideoError()};this._videoController.addEventListener("error",U,{once:!0,capture:!0}),this._videoController.volume=Fb.B.voiceVolume.value,this._videoController.onplay=()=>{B.source.pause()},yield B.load(),this._videoController.removeEventListener("error",U),this._hasError?j.VyI.log("HTMLVideoPlayerComponent: Video encountered an error on loading video resource; closing video player",j.$bb.Error):yield this.setupVideoWithResource(B,k)}))}setupVideoWithResource(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U,F;const G=$e.Texture.from(this._videoController);if(k.bind(G.baseTexture),this._videoSprite=new $e.Sprite(G),this._videoController.onerror=this.onVideoError.bind(this),this._videoController.onstalled=this.videoStalled.bind(this),this._videoController.onwaiting=this.videoStalled.bind(this),!(null===(U=this._videoController)||void 0===U?void 0:U.duration))return j.VyI.log("HTMLVideoPlayerComponent: Failed to load video; closing video player",j.$bb.Error),this._segment.videos.sendVideoErrorEvent(this._selectedVideoId,Lb.Load,null===(F=this._videoController)||void 0===F?void 0:F.currentTime),void this.handleVideoEnd(!1);this._videoController.onended=this.onVideoEnd.bind(this),this._isLoading=!1;try{const k=yield this.getVideoSize(B);this._segment.videos.sendVideoLoadingCompletedEvent(k)}catch($){j.VyI.log("HTMLVideoPlayerComponent: Failed to get video size after loading; cannot send video loading completed event to Segment",j.$bb.Warning)}this._hasError?j.VyI.log("HTMLVideoPlayerComponent: Video encountered an error on getting video size; closing video player",j.$bb.Error):yield this.finalizeVideoSetup()}))}finalizeVideoSetup(){return(0,G.sH)(this,void 0,void 0,(function*(){this.setupVideoContainer(),this._videoController.onplay=null,yield this.tryPlayVideo()}))}getVideoSize(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=yield fetch(k,{method:"HEAD"});return Number(B.headers.get("Content-Length"))||0}))}setupVideoContainer(){this._container||(this._container=j.W$e.instance.game.add.container(),this._container.name="Video Player Container"),this._container.addChild(this._videoSprite),this._container.interactive=!0,this._container.interactiveChildren=!0,this._container.alpha=0,this.setRootContainer(this._container)}setupTimeout(){this.clearTimeout(),this._timeoutId=window.setTimeout(this.onTimeout.bind(this),this.videoTimeoutMs)}onTimeout(){j.VyI.log("HTMLVideoPlayerComponent: Video timed out; closing video player",j.$bb.Error),this.handleVideoError()}clearTimeout(){this._timeoutId&&(window.clearTimeout(this._timeoutId),this._timeoutId=void 0)}videoStalled(){this.setupTimeout(),this.showCountdownTimer&&this.countdownTimer.stopTimer(),this._videoController.onstalled=null,this._videoController.onplaying=this.videoResumed.bind(this),this.onVideoStalled.dispatch()}videoResumed(){this.clearTimeout(),this._videoController.onplaying=null,this._videoController.onstalled=this.videoStalled.bind(this);const k=1e3*(this._videoController.duration-this._videoController.currentTime);this.showCountdownTimer&&this.countdownTimer.setCountdownTimeMS(k),this.onVideoResumed.dispatch(k)}onVideoError(){this.handleVideoError()}handleVideoError(){var k;this._hasError=!0,this.clearVideo();const B=this._isPlaying?Lb.Play:Lb.Load;this._segment.videos.sendVideoErrorEvent(this._selectedVideoId,B,null===(k=this._videoController)||void 0===k?void 0:k.currentTime),this.handleVideoEnd(!1)}tryPlayVideo(){return(0,G.sH)(this,arguments,void 0,(function*(k=!0){try{this.setupTimeout(),this._videoController.currentTime=0,yield this._videoController.play(),this._container.alpha=1}catch(e){return j.VyI.log("HTMLVideoPlayerComponent: Failed to play video",j.$bb.Error),this.clearTimeout(),void this.handleVideoError()}this.onVideoStart()}))}onVideoStart(){this.clearTimeout(),this._isPlaying=!0,tt.q.instance.prodigy.audio.pauseBGM(),this._segment.videos.sendVideoPlayedEvent(this._videoController.duration);const k=1e3*this._videoController.duration;this.showCountdownTimer&&(this.countdownTimerContainer.active=!0,this.countdownTimer.setCountdownTimeMS(k)),this.onVideoStarted.dispatch(k)}onVideoEnd(){this.handleVideoEnd()}handleVideoEnd(k=!0){this._isPlaying=!1,this.sendPurchaseFunnelEvents&&this._segment.videos.sendFunnelTriggerImpressionEvent(this.videoEventType),k&&this._segment.videos.sendVideoStoppedEvent(this._videoController.currentTime),this.clearVideo(),this.clearTimeout(),this.countdownTimerContainer.active=!1,this.onVideoEnded.dispatch(k),tt.q.instance.prodigy.audio.resumeBGM()}onVideoCancel(){this.onVideoPlayCancelled.dispatch(),this.handleVideoEnd(!1)}clearVideo(k=!0){var B,U,F;null===(B=this._videoController)||void 0===B||B.pause(),null===(U=this._videoController)||void 0===U||U.removeAttribute("src"),null===(F=this._videoController)||void 0===F||F.load(),this._container&&(this._container.removeChild(this._videoSprite),this._container.alpha=0)}sendFunnelStart(){this._segment.videos.sendFunnelStartEvent(this._funnelStartTriggerParams)}};jb.CACHED_VIDEO_IDS=[],jb.MIN_NETWORK_SPEED_BENCHMARKS={[kb.W.SD]:0,[kb.W.HD]:4e3,[kb.W.FullHD]:8e3},(0,G.Cg)([(0,Gi.b)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],jb.prototype,"_segment",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],jb.prototype,"videoFolderPath",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],jb.prototype,"videoName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],jb.prototype,"videoSizeRatio",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jb.prototype,"autoPlay",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],jb.prototype,"videoTimeoutMs",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],jb.prototype,"countdownTimerContainer",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],jb.prototype,"countdownTimer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jb.prototype,"showCountdownTimer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jb.prototype,"sendPurchaseFunnelEvents",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],jb.prototype,"onVideoEnded",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],jb.prototype,"onVideoStarted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],jb.prototype,"onVideoPlayCancelled",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],jb.prototype,"onVideoStalled",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],jb.prototype,"onVideoResumed",void 0),(0,G.Cg)([(0,j.gfw)(Gb.B),(0,G.Sn)("design:type",String)],jb.prototype,"videoEventType",void 0),(0,G.Cg)([(0,j.gfw)(fi.N),(0,G.Sn)("design:type",String)],jb.prototype,"instanceType",void 0),jb=xb=(0,G.Cg)([(0,j.EVk)("HTMLVideoPlayer",W.Y.uiVideo)],jb);var $b=U(48982),Hb=U(47968),Vb=U(3374),Wb=U(60228);const qb={[qt.D.NonMember]:"collect_gold_wb_button",[qt.D.Core]:"collect_core_wb_button",[qt.D.Plus]:"collect_plus_wb_button",[qt.D.Ultra]:"collect_ultra_wb_button"},Kb={[qt.D.Core]:"trail-gold",[qt.D.Plus]:"trail-plus",[qt.D.Ultra]:"trail-ultra"},zb={[qt.D.Core]:"gold",[qt.D.Plus]:"plus",[qt.D.Ultra]:"ultra"};var Yb;!function(k){k[k.NonMember=0]="NonMember",k[k.Member=1]="Member"}(Yb||(Yb={}));let Qb=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.panelControllers=[],this._debugMode=Yb.NonMember,this._membershipPurchased=!1,this._shouldShowVideo=!1,this._claimAnimationSemaphore=0,this.UPDATE_WIZARD_BANK_HUD_BUTTON_NOTIFICATIONS_ERROR_MESSAGE="WizardBankModalControllerComponent: Error updating Wizard Bank HUD button notifications"}postCreate(){this.init().then((()=>{this.sendMembershipFunnelStart()})).catch(j.RQr.createHandler("WizardBankModalControllerComponent: Error initializing the controller")),this._goldWidget.collectButton.onClick.add(this.startGoldCollection,this),tt.q.instance.prodigy.game.broadcaster.addAppListener(jn.H3.MembershipResponseReceived,this.handleMembershipChange,this),super.postCreate()}destroy(){this.processMembershipFunnelQuit(),super.destroy()}init(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U;if(this.gameObject.isDestroyed||this.gameObject.isMarkedForDestruction)return;const F=null!==(k=Sb.E.get(this._featureAccessData.memberTier))&&void 0!==k?k:qt.D.NonMember,G=F===qt.D.NonMember;this._shouldShowVideo=G&&It.O.isEnglishLocale(),[,this._lastClaimDataResponse]=yield Promise.all([this._shouldShowVideo?this.refreshVideoData():Promise.resolve(),this._hardCurrencyNetworkHandler.getAllowanceClaimData()]);const{totalClaimable:j}=this._lastClaimDataResponse;Nt.d.updateInjectedValues(this.gameObject,Object.assign({CLAIM_TRAIL_ANIMATION:null!==(B=Kb[F])&&void 0!==B?B:void 0,CLAIM_WALLET_MC_ANIMATION:null!==(U=zb[F])&&void 0!==U?U:void 0},this._shouldShowVideo?$b.h.advanceToNextVideoAndGetInjectionData({videoTypeData:this._currentVideoTypeData}):{}));const $=j.find((({currency:k})=>1===k)),H=oh.A.isDefined($)&&$.value>0;this._goldWidget.setup({reward:{currency:1,value:H?$.value:0},hasValidFeature:!0,availableToCollect:H}),G?yield this.setupNonMemberContent():yield this.setupMemberContent(F,this._lastClaimDataResponse)}))}refreshVideoData(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=Vb.C.getVideosDataProvider();this._currentVideoTypeData=yield k.getVideosDataByType(kb.s.WizardBank)}))}setupNonMemberContent(){return(0,G.sH)(this,void 0,void 0,(function*(){oh.A.isDefined(this.nonMembersContentContainer)&&(this.nonMembersContentContainer.active=!0),oh.A.isDefined(this.nonMembersContent)&&(this.nonMembersContent.active=!this._shouldShowVideo),this._videoPlayerContainer.active=this._shouldShowVideo,oh.A.isDefined(this.membersContentContainer)&&(this.membersContentContainer.active=!1),this._shouldShowVideo&&(yield this._videoPlayerComponent.tryLoadAndPlayVideo())}))}sendMembershipFunnelStart(){if(!oh.A.isDefined(this._lastClaimDataResponse))return;const k=function(k){const B=new Set;return"totalClaimable"in k?(k.totalClaimable.forEach((({currency:k,value:U})=>{U>0&&B.add(k)})),B):(Object.values(k).forEach((({availableToCollect:k,reward:U})=>{k&&U.value>0&&B.add(U.currency)})),B)}(this._lastClaimDataResponse),B=`${"gold_"+(k.has(1)?"available":"unavailable")}_${"magicoin_"+(k.has(27)?"available":"unavailable")}`,U=this.getInjectedValue("WIZARD_BANK_ORIGIN_TYPE")===ui.$N.AutoSurfaced?"AutoPop":"Membership";this._segment.purchase.sendFunnelStart({type:U,category:"wizard_bank",contentId:B,adType:Fs.R.UnifiedConversionFlow})}processMembershipFunnelQuit(){this._membershipPurchased||this._segment.purchase.sendFunnelQuit("Click-Membership","Close-Clicked")}setupMemberContent(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U,F,G;oh.A.isDefined(this.nonMembersContentContainer)&&(this.nonMembersContentContainer.active=!1),this._videoPlayerContainer.active=!1,oh.A.isDefined(this.membersContentContainer)&&(this.membersContentContainer.active=!0);const[j,$,H]=this.panelControllers,{totalClaimable:V}=B,W=V.find((({currency:k})=>27===k)),q=(null!==(U=null==W?void 0:W.value)&&void 0!==U?U:0)>0,K=j.IsActiveInHierarchy?650:100;let z=0;(null==j?void 0:j.GameObject)&&(j.setup({allowanceTier:k,currencyValue:W,layout:q?wb.Spread:wb.Tight}),j.IsActiveInHierarchy||(j.tweenIn(z),z+=300)),(null==$?void 0:$.GameObject)&&($.setup({allowanceTier:qt.D.Plus,currencyValue:null===(F=B[qt.D.Plus])||void 0===F?void 0:F.reward,forceChestState:Ob.T.Closed}),$.IsActiveInHierarchy||q||k!==qt.D.Core||($.tweenIn(K+z),z+=300)),(null==H?void 0:H.GameObject)&&(H.setup({allowanceTier:qt.D.Ultra,currencyValue:null===(G=B[qt.D.Ultra])||void 0===G?void 0:G.reward,forceChestState:Ob.T.Closed}),H.IsActiveInHierarchy||q||k!==qt.D.Core&&k!==qt.D.Plus||(H.tweenIn(K+z),z+=300))}))}attemptMemberClaim(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;if(!oh.A.isDefined(this._lastClaimDataResponse))return Promise.resolve();const U=qb[null!==(k=Sb.E.get(this._featureAccessData.memberTier))&&void 0!==k?k:qt.D.Core];this._segment.featureCommon.sendButtonEvent({buttonName:U,interfaceName:us.B.WizardBank,interfaceType:ui.Wm.Modal});const F=[],$=null!==(B=this._lastClaimDataResponse)&&void 0!==B?B:{},{totalClaimable:H}=$,V=(0,G.Tt)($,["totalClaimable"]);for(const[G,{availableToCollect:j}]of Object.entries(V))j&&G!==qt.D.NonMember&&F.push(G);yield this._hardCurrencyDataProvider.claimAllowances(F),(0,Wb.Ug)().catch(j.RQr.createHandler(this.UPDATE_WIZARD_BANK_HUD_BUTTON_NOTIFICATIONS_ERROR_MESSAGE))}))}showMembershipMLP(){var k,B,U;this._featureAccessData.memberTier!==xs._$.NonMember?this.addListenerToPromise(null!==(U=null===(B=this._webPurchaseComponent)||void 0===B?void 0:B.initiateMembershipPurchaseUpgradeWithIFrame())&&void 0!==U?U:Promise.reject(new Error("Web purchase component not available")),(()=>null),(k=>{j.RQr.createHandler(JSON.stringify(k))})):null===(k=this._webPurchaseComponent)||void 0===k||k.initiateMembershipPurchase()}attemptNonMemberClaim(){return(0,G.sH)(this,void 0,void 0,(function*(){oh.A.isDefined(this._lastClaimDataResponse)&&(this._segment.featureCommon.sendButtonEvent({buttonName:qb[qt.D.NonMember],interfaceName:us.B.WizardBank,interfaceType:ui.Wm.Modal}),yield this._hardCurrencyDataProvider.claimAllowances([qt.D.NonMember]),(0,Wb.Ug)().catch(j.RQr.createHandler(this.UPDATE_WIZARD_BANK_HUD_BUTTON_NOTIFICATIONS_ERROR_MESSAGE)))}))}startGoldCollection(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.attemptNonMemberClaim(),this._goldWidget.playCollectSequence()}))}handleMembershipChange(k){this._membershipPurchased="success"===k,tt.q.instance.prodigy.game.broadcaster.removeAppListener(jn.H3.MembershipResponseReceived,this),(0,Wb.Ug)().catch(j.RQr.createHandler(this.UPDATE_WIZARD_BANK_HUD_BUTTON_NOTIFICATIONS_ERROR_MESSAGE)),tt.q.instance.game.broadcaster.broadcast(jn.Y1.HUDRevampButtonVisibilityRefreshRequested)}onCloseButtonClicked(){const[k]=this.panelControllers;k.canCollect&&(k.onPanelButtonPressed.dispatch(),this._claimAnimationSemaphore++),0===this._claimAnimationSemaphore&&this.gameObject.destroyDeferred()}claimAnimationComplete(){0!==this._claimAnimationSemaphore&&(this._claimAnimationSemaphore--,0===this._claimAnimationSemaphore&&this.gameObject.destroyDeferred())}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Mb),(0,G.Sn)("design:type",Array)],Qb.prototype,"panelControllers",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Qb.prototype,"nonMembersContentContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Qb.prototype,"membersContentContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Qb.prototype,"nonMembersContent",void 0),(0,G.Cg)([(0,j.Cdj)("231-9111"),(0,G.Sn)("design:type",Hb.b)],Qb.prototype,"_hardCurrencyNetworkHandler",void 0),(0,G.Cg)([(0,j.Cdj)("5c7-e02d"),(0,G.Sn)("design:type",zn.W)],Qb.prototype,"_hardCurrencyDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("3a0-8003"),(0,G.Sn)("design:type",Bb.F)],Qb.prototype,"_featureAccessData",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],Qb.prototype,"_segment",void 0),(0,G.Cg)([(0,j.MnK)(Nb),(0,G.Sn)("design:type",Nb)],Qb.prototype,"_goldWidget",void 0),(0,G.Cg)([(0,j.MnK)(Ub.M),(0,G.Sn)("design:type",Ub.M)],Qb.prototype,"_webPurchaseComponent",void 0),(0,G.Cg)([(0,j.MnK)(jb),(0,G.Sn)("design:type",jb)],Qb.prototype,"_videoPlayerComponent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Qb.prototype,"_videoPlayerContainer",void 0),(0,G.Cg)([(0,j.gfw)(Yb),(0,G.Sn)("design:type",Number)],Qb.prototype,"_debugMode",void 0),Qb=(0,G.Cg)([(0,j.EVk)("WizardBankModalController")],Qb);var Xb=U(84234),Zb=(U(33587),U(32367),U(2265),U(21097)),Jb=U(79600),tp=U(79687);let ep=class{static openInteractable(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=yield this.makeQuestRequest("interactables.openInteractable",{zoneTag:k});return tt.q.instance.prodigy.gameContainer.get("b50-4670").setCooldown(k,B.cooldown),B}))}static makeQuestRequest(k,B){return(0,G.sH)(this,arguments,void 0,(function*(k,B,U=null){try{const U=tt.q.instance.prodigy.gameContainer.get("00d-b27e"),F=yield U.cloudScript.timeoutMS(1e4).setRetryOption({retryCount:5}).useIdempotency(!0).execute(k,B);if(!F.isOK())throw new Jb.CatalystSdkError(Jb.EErrorCode.Unknown,"Unknown CatalystSDK Error",`${F.status}: ${JSON.stringify(F.data)}`);return F.data.response}catch(e){return j.VyI.log(`There was a problem getting data for ${k}. ${e.message}`,j.$bb.Error),U}}))}};ep=(0,G.Cg)([(0,tp.injectable)()],ep);class ip{static getConfig(){return this._configs||(this._configs=vb.R.loadData(pb.r.WorldInteractablesConfig_json)),this._configs}static isIdentifierValid(k){return j.Aq$.isDefined(this.getConfig().interactables[k])}static getCooldownTime(k){return this.getInteractableAssetFromID(k).cooldownTimeMS}static interactableHasQuestItems(k){var B;return(null===(B=this.getInteractableAssetFromID(k).questDropTables)||void 0===B?void 0:B.length)>0}static getInteractableName(k){var B;return this.isIdentifierValid(k)?null===(B=this.getInteractableAssetFromID(k))||void 0===B?void 0:B.name:""}static getInteractableAssetFromID(k){const B=this.getConfig().interactables[k].assetID,U=Yt.t.getItem("interactable",B).data;if(!j.Aq$.isDefined(U))throw new Error(`Error getting cooldown config for world interactable ${k}. Interactable asset ${B} doesn't exist.`);return U}}let sp=class extends j.uAl{constructor(){super(...arguments),this._checkCooldownDelay=2}update(){if(super.update(),this._checkCooldownDelay>0&&0==--this._checkCooldownDelay)try{let k=!1;const B=this.getIdentifier();if(!k&&!ip.isIdentifierValid(B))throw new Error(`World interactable ${B} doesn't exist in the world interactables config.`);this._cooldownComponent.initialize(B,this.getCooldownTime()),this._cooldownComponent.checkCooldown(),ip.interactableHasQuestItems(B)&&this.hasAccessToUltimates()&&tt.q.instance.prodigy.gameContainer.get("e50-b09b").preloadQuestProgress().catch(j.RQr.createHandler("Error preloading quest progress")),tt.q.instance.prodigy.gameContainer.get("c47-20b6").container.sendContainerDiscoveredEvent(ui.ZF.Interactable,B,this.getPosition().x,this.getPosition().y,ip.getInteractableName(this.getIdentifier()))}catch(k){j.VyI.log(k.message,j.$bb.Error),this.gameObject.active=!1}}hasAccessToUltimates(){return this._featureRequirements.meetsRequirementsDeprecated(15)}getIdentifier(){const k=tt.q.instance.prodigy.world.getCurrentMap(),B=this.getPosition();return`${k}-${B.x}-${B.y}`}getPosition(){return{x:Math.round(this.gameObject.transform.worldPosition.x),y:Math.round(this.gameObject.transform.worldPosition.y)}}getCooldownTime(){return ip.getCooldownTime(this.getIdentifier())}};(0,G.Cg)([(0,j.MnK)(ia),(0,G.Sn)("design:type",ia)],sp.prototype,"_cooldownComponent",void 0),(0,G.Cg)([(0,j.Cdj)("db5-fb6e"),(0,G.Sn)("design:type",Object)],sp.prototype,"_featureRequirements",void 0),sp=(0,G.Cg)([(0,j.EVk)("WorldInteractable",W.Y.ultimates)],sp);let np=class extends Be.u{constructor(){super(...arguments),this.onInteractionStart=new j.HN0,this.onInteractionError=new j.HN0}run(){this.onInteractionStart.dispatch(),this.doRun().then((()=>{this._segment.container.sendContainerOpenedEvent(ui.ZF.Interactable,this._interactable.getIdentifier())})).catch((k=>{this._segment.container.sendContainerOpenedFailedEvent(ui.ZF.Interactable,this._interactable.getIdentifier(),Zb.WE.NetworkFailure),j.RQr.logError(k,`Failed to open interactable ${this._interactable.getIdentifier()}`),this.onInteractionError.dispatch()}))}doRun(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;const U=yield ep.openInteractable(this._interactable.getIdentifier()),F=null!==(k=U.regularItems)&&void 0!==k?k:[],G=null!==(B=U.questItems)&&void 0!==B?B:[],j=G.concat(F);this._openSFX.playSFX(),this.execute(166,{game:tt.q.instance.game,spine:this._interactableSpine.getSpine(),regularItems:F.length>0?F:null,allItems:j.length>0?j:null,revealAnimationName:this._revealAnimationName,hasQuestItems:G.length>0,sourceID:this._interactable.getIdentifier(),transactionID:this._segment.container.getCurrentContainerTransactionID})}))}destroy(){this.onInteractionStart.dispose(),this.onInteractionError.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Pqz)(sp),(0,G.Sn)("design:type",sp)],np.prototype,"_interactable",void 0),(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],np.prototype,"_interactableSpine",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],np.prototype,"_revealAnimationName",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],np.prototype,"onInteractionStart",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],np.prototype,"onInteractionError",void 0),(0,G.Cg)([(0,j.MnK)(oa),(0,G.Sn)("design:type",oa)],np.prototype,"_openSFX",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],np.prototype,"_segment",void 0),np=(0,G.Cg)([(0,j.EVk)("InteractablesFSM",W.Y.ultimates)],np);let ap=class extends sp{getIdentifier(){return this._minibossRewardId}};(0,G.Cg)([(0,j.Cdj)("MinibossInteractableRewardId"),(0,G.Sn)("design:type",String)],ap.prototype,"_minibossRewardId",void 0),ap=(0,G.Cg)([(0,j.EVk)("MinibossRewardInteractable",W.Y.zones)],ap);U(88552);let rp=class extends j.uAl{run(){this.gameObject.active=!1}};rp=(0,G.Cg)([(0,j.EVk)("DeactivateSelf")],rp);let op=class extends j.uAl{constructor(){super(...arguments),this.cutsceneTag=""}playCutscene(){this.cutsceneTag?tt.q.instance.prodigy.world.playScene(this.cutsceneTag):j.VyI.log("StartLegacyCutsceneComponent: No cutscene tag specified",j.$bb.Warning)}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],op.prototype,"cutsceneTag",void 0),op=(0,G.Cg)([(0,j.EVk)("StartLegacyCutscene",W.Y.utility)],op);let hp=class extends j.uAl{create(){super.create(),this._targetState.setValue(Qt.J.shouldSuppressAd(this._loggedInPlayer.player))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],hp.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.MnK)(Ar.f),(0,G.Sn)("design:type",Ar.f)],hp.prototype,"_targetState",void 0),hp=(0,G.Cg)([(0,j.EVk)("ActivePlayerMembershipSuppressionState",W.Y.membership)],hp);let cp=class extends j.uAl{constructor(){super(...arguments),this._runOnLoad=!1,this._onNonMember=new j.HN0,this._onMember=new j.HN0,this._onLegacyMember=new j.HN0,this._onHasFeatureAccess=new j.HN0,this._onNoFeatureAccess=new j.HN0}create(){super.create(),this._runOnLoad&&this.checkMembership()}checkMembership(){this._loggedInPlayer.isMember()?(this._onMember.dispatch(),this._loggedInPlayer.player.hasLegacyMembership()&&this._onLegacyMember.dispatch()):this._onNonMember.dispatch(),this._membershipFeatureName&&(this._loggedInPlayer.player.hasMembershipFeatureAccess(this._membershipFeatureName)?this._onHasFeatureAccess.dispatch():this._onNoFeatureAccess.dispatch())}destroy(){this._onMember.dispose(),this._onNonMember.dispose(),this._onLegacyMember.dispose(),this._onHasFeatureAccess.dispose(),this._onNoFeatureAccess.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],cp.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],cp.prototype,"_runOnLoad",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],cp.prototype,"_membershipFeatureName",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.Lr6)(0),(0,j.YLv)("Fires if the player has no membership"),(0,G.Sn)("design:type",j.HN0)],cp.prototype,"_onNonMember",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.Lr6)(0),(0,j.YLv)("Fires if the player has any membership"),(0,G.Sn)("design:type",j.HN0)],cp.prototype,"_onMember",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.Lr6)(0),(0,j.YLv)("Fires if the player has legacy membership, after onMember"),(0,G.Sn)("design:type",j.HN0)],cp.prototype,"_onLegacyMember",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.Lr6)(0),(0,j.YLv)('Fires if the player has access to the membership feature in "Membership Feature Name"'),(0,G.Sn)("design:type",j.HN0)],cp.prototype,"_onHasFeatureAccess",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.Lr6)(0),(0,j.nKb)(null),(0,j.YLv)('Fires if the player does not have access to the membership feature in "Membership Feature Name"'),(0,G.Sn)("design:type",j.HN0)],cp.prototype,"_onNoFeatureAccess",void 0),cp=(0,G.Cg)([(0,j.EVk)("MembershipGuard",W.Y.membership)],cp);let dp=class extends j.y4o{constructor(){super(...arguments),this._tooltipArrowLocation=.5,this._tooltipArrowDirection=0}create(){super.create(),this._tooltipRoot=tt.q.instance.game.add.group(null,`${this.gameObject.name} - MembershipSuppressionTooltipComponent`),this.setRootContainer(this._tooltipRoot)}destroy(){var k;null===(k=this._tooltipRoot)||void 0===k||k.destroy(),this._tooltipRoot=null,super.destroy()}getDimensions(){return new j.or0(this._tooltipRoot.width,this._tooltipRoot.height)}showTooltip(){var k,B,U;const F=new j.I9Y;F.copyFrom(this.GameObject.transform.worldPosition),j.i7d.main&&null!==(U=null===(B=null===(k=j.wa5.getActiveScene())||void 0===k?void 0:k.getLayer(this.gameObject.layer))||void 0===B?void 0:B.attachToCamera)&&void 0!==U&&!U&&F.subtract(j.i7d.main.GameObject.transform.worldPosition),this.gameObject.findComponentInParent(Ye)&&(F.y-=75);tt.q.instance.prodigy.open.memberAdSuppressionToolTip({xPosition:F.x,yPosition:F.y,bodyText:null,arrowXRelPos:this._tooltipArrowLocation,arrowDirection:this._tooltipArrowDirection})}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],dp.prototype,"_tooltipArrowLocation",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],dp.prototype,"_tooltipArrowDirection",void 0),dp=(0,G.Cg)([(0,j.EVk)("MembershipSuppressionTooltip",W.Y.membership)],dp);let lp=class extends j.uAl{constructor(){super(...arguments),this.onNameChanged=new j.HN0,this.onNameChangedInArray=new j.HN0}get tier(){return this._tier}set tier(k){this._tier=k,this.refresh()}create(){super.create(),this.refresh()}refresh(){const k=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText((0,un.g1)(this._tier));this.onNameChanged.dispatch(k),this.onNameChangedInArray.dispatch([k])}destroy(){this.onNameChanged.dispose(),this.onNameChangedInArray.dispose(),super.destroy()}};(0,G.Cg)([(0,j.gfw)(xs._$),(0,G.Sn)("design:type",Number)],lp.prototype,"_tier",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],lp.prototype,"onNameChanged",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],lp.prototype,"onNameChangedInArray",void 0),lp=(0,G.Cg)([(0,j.EVk)("MembershipTierDataProvider",W.Y.membership)],lp);let up=class extends j.uAl{constructor(){super(...arguments),this._runOnLoad=!1,this._includeNonMembers=!0,this._onUserCanUpgrade=new j.HN0,this._onUserCannotUpgrade=new j.HN0}create(){super.create(),this._runOnLoad&&this.check().catch(j.RQr.createHandler("MembershipUpsellGuardComponent, error checking upgrade options"))}check(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._includeNonMembers&&!this._loggedInPlayer.isMember())return void this._onUserCanUpgrade.dispatch();((yield this._loggedInPlayer.player.getActiveMathMembership()).upgradeOptions.length>0?this._onUserCanUpgrade:this._onUserCannotUpgrade).dispatch()}))}destroy(){this._onUserCanUpgrade.dispose(),this._onUserCannotUpgrade.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],up.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],up.prototype,"_runOnLoad",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],up.prototype,"_includeNonMembers",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.Lr6)(0),(0,j.YLv)("Fires if the player has available upgrade options"),(0,G.Sn)("design:type",j.HN0)],up.prototype,"_onUserCanUpgrade",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.Lr6)(0),(0,j.YLv)("Fires if the player has no upgrade options"),(0,G.Sn)("design:type",j.HN0)],up.prototype,"_onUserCannotUpgrade",void 0),up=(0,G.Cg)([(0,j.EVk)("MembershipUpsellGuard",W.Y.membership)],up);let fp=class extends ih.k{createTrigger(k,B,U,F){const G=this.getCustomPropertiesObject();let j;if(U)j=U;else switch(this._defaultTriggerData){case ih.S.Zone:j=tt.q.instance.prodigy.world.getCurrentZone();break;case ih.S.Map:j=tt.q.instance.prodigy.world.getCurrentMap();break;case ih.S.Battle:j=this._segment.postBattleFlow.getBattleId()}let $=null!=F?F:Qt.J.showYouTubeMembershipAd(tt.q.instance.game,!0)?Fs.R.Video:Fs.R.Static;Us.P.shouldUseUnifiedConversionFlowForTriggerCategory(B)&&($=Fs.R.UnifiedConversionFlow);const H=Us.P.getAdVersionFromTriggerCategory(B);return Object.assign({type:k,category:B,contentId:j,adType:$,adVersion:H},G)}sendPurchaseFunnelImpression(k,B,U,F){this.trigger=this.createTrigger(k,B,U,F),this.purchaseFunnelCandidate=this._segment.purchase.sendFunnelTriggerImpression(this.trigger)}sendPurchaseFunnelStart(k,B,U,F){var G;const j=null!==(G=this.trigger)&&void 0!==G?G:this.createTrigger(k,B,U,F);this._segment.purchase.sendFunnelStart(j,this.purchaseFunnelCandidate)}sendPurchaseFunnelStep(k){this._segment.purchase.sendFunnelStep(k)}sendPurchaseFunnelError(k,B,U){this._segment.purchase.sendFunnelError(k,B,U)}sendPurchaseFunnelQuit(k,B){this._segment.purchase.sendFunnelQuit(k,B)}sendPurchaseFunnelHandoff(k){this._segment.purchase.sendFunnelHandoff(k)}sendPurchaseFunnelComplete(){this._segment.purchase.sendFunnelComplete()}sendFunnelAdvanced(k,B,U,F){const G={step_index:F};this._segment.playerProgression.sendFunnelAdvancedEvent({funnelName:k,funnelType:B,stepName:U},G)}};fp=(0,G.Cg)([(0,j.EVk)("SegmentAnalytics",W.Y.analytics)],fp);let bp=class extends ih.k{constructor(){super(...arguments),this.audience=Ic.w.Adults}sendQrCodeViewedEvent(){this.name&&this.audience?this._segment.qrCode.sendQrCodeViewedEvent(this.name,this.audience,{},this.getPropertiesObject()):j.VyI.log("Attempted to send analytics for QR code with unset fields, ignoring",j.$bb.Info)}};(0,G.Cg)([(0,j.gfw)(Oc),(0,G.Sn)("design:type",String)],bp.prototype,"name",void 0),(0,G.Cg)([(0,j.gfw)(Ic.w),(0,G.Sn)("design:type",String)],bp.prototype,"audience",void 0),bp=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsQrCode",W.Y.analytics)],bp);var pp,vp=U(10312),gp=U(92661);!function(k){k.CloseThisPrompt="closeThisPrompt",k.InitiateMembershipPurchase="initiateMembershipPurchase",k.OpenMembershipParent="openMembershipParent",k.OpenWebsite="openWebsite",k.PrefabMenu="openPrefabMenu",k.None="none"}(pp||(pp={}));const mp=gp.Ikc({colour:gp.YjP(),size:gp.aig().min(1),text:gp.YjP(),font:gp.YjP().optional(),wordWrapWidth:gp.aig().min(1).optional(),localizationKey:gp.YjP().optional()}),yp=gp.Ikc({prefabMenuGuid:gp.k5n(Rt.l).optional(),url:gp.YjP().optional()}),_p=gp.Ikc({actionName:gp.k5n(pp),params:yp.optional()}),Ep=gp.Ikc({text:gp.YjP().optional(),buttonAction:_p.optional()}),wp=gp.Ikc({buttonName:gp.YjP().optional(),interfaceName:gp.YjP().optional(),qrCodeName:gp.k5n(Oc).optional(),instanceType:gp.YjP().optional()}),Tp=gp.Ikc({title:mp.optional(),subtitle:mp.optional(),bodyTextElements:gp.YOg(mp).optional(),button:Ep.optional(),contentImageGuid:gp.k5n(ps.q).optional(),carouselItemNum:gp.Whr().min(0).optional(),segmentProperties:wp.optional()});gp.Ikc({name:gp.YjP(),contentTemplateGuid:gp.k5n(Rt.l),configurableElements:Tp.optional(),injectableProperties:gp.g1P(gp.YjP(),gp.L5J()).optional()});let Sp=class extends j.uAl{constructor(){super(...arguments),this._bodyTextElements=[]}postCreate(){var k,B;super.postCreate();{const U=this.getInjectedValue(hs.Dw.DynamicPromptContentAssetGuid),F=vb.R.loadData(U);if(!F)return void j.VyI.log(`Failed to configure dynamic prompt because content configuration asset with ID: ${U} does not exist.`,j.$bb.Error);const G=F.configurableElements;G&&(null!==(k=this._titleText)&&void 0!==k||(this._titleText=this.gameObject.addComponent(j.EYj)),null!==(B=this._subtitleText)&&void 0!==B||(this._subtitleText=this.gameObject.addComponent(j.EYj)),this.configureTextComponent(this._titleText,G.title),this._subtitleTextLocalizationKey?this.configureLocalizedTextComponent(this._subtitleTextLocalizationKey,G.subtitle):this.configureTextComponent(this._subtitleText,G.subtitle),this._contentArtAsset.setAsset(G.contentImageGuid).catch(j.RQr.createHandler("Failed to set the content art asset on the dynamic prompt.")),G.bodyTextElements&&this.configureBodyTextElements(G.bodyTextElements),G.segmentProperties&&this.configureSegment(G.segmentProperties),G.button&&this.configureButtons(G.button))}}configureBodyTextElements(k){const B=k.length,U=this._bodyTextElements.length;B>U&&j.VyI.log(`There are ${B} bodyTextElements configs, but only ${U} Text components to configure.\n The first ${U} Text components will be configured.`,j.$bb.Warning);for(let F=0;FB-1){j.VyI.log(`There is no config defined for Text component at index ${F} of _bodyTextElements. Completing setup.`,j.$bb.Warning);break}this.configureTextComponent(this._bodyTextElements[F],k[F])}}configureTextComponent(k,B){B&&(k.text=this._localizer.getText(B.text),k.fill=B.colour,k.fontSize=B.size,B.font&&(k.font=B.font),B.wordWrapWidth&&(k.wordWrap=!0,k.wordWrapWidth=B.wordWrapWidth))}configureLocalizedTextComponent(k,B){if(!B)return;k.localizationKey=B.localizationKey;const U=k.localizedText;U.fill=B.colour,U.fontSize=B.size,B.font&&(U.font=B.font),B.wordWrapWidth&&(U.wordWrap=!0,U.wordWrapWidth=B.wordWrapWidth)}configureSegment(k){this._buttonProperties&&(this._buttonProperties.interfaceName=k.interfaceName,this._buttonProperties.buttonName=k.buttonName,this._buttonProperties.saveClickInfo=k.buttonName),this._qrCode&&(this._qrCode.name=k.qrCodeName)}configureButtons(k){var B,U;let F;switch(this.setCtaButtonText(k.text),null===(B=k.buttonAction)||void 0===B?void 0:B.actionName){case pp.PrefabMenu:F=()=>{var B,U;tt.q.instance.prodigy.open.prefabMenu(null===(U=null===(B=k.buttonAction)||void 0===B?void 0:B.params)||void 0===U?void 0:U.prefabMenuGuid).createContainer=!1};break;case pp.OpenMembershipParent:if(tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.isPlayingAtSchool())F=this.lockBecomeAMemberButtonAtSchool();else{const k=this.ctaButton.GameObject.addComponent(fp);F=()=>{tt.q.instance.prodigy.open.membershipParent({flavourText:this.getInjectedValue(hs.Eh.MembershipPurchaseMemberPanelAdFlavourText),frameName:this.getInjectedValue(hs.Eh.MembershipPurchaseMemberPanelAdFrameName),trackingEvent:this.getInjectedValue(hs.Eh.MembershipPurchaseMemberPanelAdTrackingEvent)},{conversionFunnelMetadata:this.getInjectedValue(hs.Eh.MembershipPurchaseConversionFunnelMetadata),conversionFunnelName:this.getInjectedValue(hs.Eh.MembershipPurchaseConversionFunnelName),conversionStage:this.getInjectedValue(hs.Eh.MembershipPurchaseConversionFunnelStage),conversionStaticOrVideo:this.getInjectedValue(hs.Eh.MembershipPurchaseConversionFunnelStaticOrVideo)},this.getInjectedValue(hs.Eh.MembershipPurchaseUpgrade),this._buttonProperties.saveClickInfo),k.sendPurchaseFunnelStep("Click-Membership")},this._buttonOverlay&&(this._buttonOverlay.onClick.add(F),this._buttonOverlay.useHandCursor=!0)}break;case pp.OpenWebsite:F=()=>{var B,U;return vp.I.openWebsite(null===(U=null===(B=k.buttonAction)||void 0===B?void 0:B.params)||void 0===U?void 0:U.url)};break;case pp.CloseThisPrompt:F=()=>{var k;return(null!==(k=this._rootGameObject)&&void 0!==k?k:this.gameObject).destroyDeferred()};break;case pp.InitiateMembershipPurchase:F=()=>(0,G.sH)(this,void 0,void 0,(function*(){const k=this.gameObject.findComponentInChildren(Ub.M,!0);k?k.initiateMembershipPurchase():j.VyI.log("No ProcessWebPurchaseComponent found on this prefab. Cannot initiate purchase.",j.$bb.Error)}));break;case pp.None:return;default:return void j.VyI.log(`Dynamic prompt button action: ${null===(U=k.buttonAction)||void 0===U?void 0:U.actionName} is not in the enum of possible dynamic button actions`,j.$bb.Error)}this.ctaButton.onClick.add(F)}lockBecomeAMemberButtonAtSchool(){return this.setCtaButtonText(this._localizer.getText("DYNAMIC_PROMPT_SCHOOL_BUTTON_LOCKED")),()=>{var k;return(null!==(k=this._rootGameObject)&&void 0!==k?k:this.gameObject).destroyDeferred()}}setCtaButtonText(k){const B=this._localizer.getText(k);if(this.ctaButton instanceof Ut.S)this.ctaButton.text=B;else{const k=this.ctaButton.GameObject.findComponentInChildren(j.EYj);k&&(k.text=B)}}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Sp.prototype,"_rootGameObject",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Sp.prototype,"_titleText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Sp.prototype,"_subtitleText",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],Sp.prototype,"_subtitleTextLocalizationKey",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],Sp.prototype,"_bodyTextElements",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],Sp.prototype,"_contentArtAsset",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Sp.prototype,"ctaButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Sp.prototype,"_buttonOverlay",void 0),(0,G.Cg)([(0,j.MnK)(Xs),(0,G.Sn)("design:type",Xs)],Sp.prototype,"_buttonProperties",void 0),(0,G.Cg)([(0,j.MnK)(bp),(0,G.Sn)("design:type",bp)],Sp.prototype,"_qrCode",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Sp.prototype,"_localizer",void 0),Sp=(0,G.Cg)([(0,j.EVk)("DynamicPromptContentConfiguration",W.Y.uiDynamicPrompts)],Sp);let Ap=class extends j.uAl{constructor(){super(...arguments),this._respectSchoolMode=!1,this._onCtaButtonClicked=new j.HN0,this._onDynamicPromptLoaded=new j.HN0,this._onDynamicPromptClosed=new j.HN0}showPrompt(){this._respectSchoolMode&&this._currentPlayer.player.isPlayingAtSchool()?tt.q.instance.prodigy.open.membershipSchoolAd((()=>{this._onDynamicPromptClosed.dispatch()})):(this._dynamicPrompt=tt.q.instance.prodigy.open.dynamicPrompt(this.configAsset,this.injectedValues,{originType:this._interfaceOriginType}),this._dynamicPrompt.prefab?this.configureCtaButton():this._dynamicPrompt.onPrefabLoaded.addOnce(this.configureCtaButton.bind(this)))}configureCtaButton(){const k=this._dynamicPrompt.prefab.findComponentInChildren(Sp,!0);null==k||k.ctaButton.onClick.add((()=>{this._onCtaButtonClicked.dispatch()}),this),this._onDynamicPromptLoaded.dispatch(),this._dynamicPrompt.prefab.onDestroy.addOnce((()=>{this._onDynamicPromptClosed.dispatch()}),this)}close(){var k;null===(k=this._dynamicPrompt)||void 0===k||k.close(),this._dynamicPrompt=null}destroy(){this.close(),this._onCtaButtonClicked.dispose(),this._onDynamicPromptLoaded.dispose(),this._onDynamicPromptClosed.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Ap.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Ap.prototype,"_respectSchoolMode",void 0),(0,G.Cg)([(0,j.tW2)(),(0,G.Sn)("design:type",String)],Ap.prototype,"configAsset",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],Ap.prototype,"injectedValues",void 0),(0,G.Cg)([(0,j.gfw)(ui.$N),(0,G.Sn)("design:type",String)],Ap.prototype,"_interfaceOriginType",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ap.prototype,"_onCtaButtonClicked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ap.prototype,"_onDynamicPromptLoaded",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ap.prototype,"_onDynamicPromptClosed",void 0),Ap=(0,G.Cg)([(0,j.EVk)("OpenDynamicPrompt",W.Y.membership)],Ap);const Cp=(0,be.gb)({key:"remove-parent-screen-from-conversion-flow",activateAssociatedExperiments:1,default:{enabled:!1}});let Op=class extends j.uAl{constructor(){super(...arguments),this._conversionFunnelMetadata="",this._conversionFunnelName="",this._conversionFunnelStage="",this._conversionStaticOrVideo=Fs.R.Static,this._memberPanelAdFlavourText="",this._memberPanelAdFrameName="",this._memberPanelAdTrackingEvent="",this._originId="",this._upgrade=!1,this.onClose=new j.HN0}open(){if((0,Bt.G)(Cp).enabled){const k=this.gameObject.findComponentInChildren(Ub.M,!0);if(k)return void k.initiateMembershipPurchase();j.VyI.log("No ProcessWebPurchaseComponent found on this prefab. Cannot initiate purchase.",j.$bb.Error)}tt.q.instance.prodigy.open.membershipParent({flavourText:this._memberPanelAdFlavourText,frameName:this._memberPanelAdFrameName,trackingEvent:this._memberPanelAdTrackingEvent},{conversionFunnelMetadata:this._conversionFunnelMetadata,conversionFunnelName:this._conversionFunnelName,conversionStage:this._conversionFunnelStage,conversionStaticOrVideo:this._conversionStaticOrVideo},this._upgrade,this._originId).onClose=()=>{this.onClose.dispatch()}}destroy(){this.onClose.dispose(),super.destroy()}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Op.prototype,"_conversionFunnelMetadata",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Op.prototype,"_conversionFunnelName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Op.prototype,"_conversionFunnelStage",void 0),(0,G.Cg)([(0,j.gfw)(Fs.R),(0,G.Sn)("design:type",String)],Op.prototype,"_conversionStaticOrVideo",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Op.prototype,"_memberPanelAdFlavourText",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Op.prototype,"_memberPanelAdFrameName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Op.prototype,"_memberPanelAdTrackingEvent",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Op.prototype,"_originId",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Op.prototype,"_upgrade",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Op.prototype,"onClose",void 0),Op=(0,G.Cg)([(0,j.EVk)("OpenMembershipParent",W.Y.membership)],Op);var Ip=U(11117);let Dp=class extends j.JTX{constructor(){super(...arguments),this.onClose=new j.HN0,this.onIsMember=new j.HN0,this.onIsNotMember=new j.HN0}run(){var k;if(this._playerProvider.player.hasMembership())this.onIsMember.dispatch();else{this.onIsNotMember.dispatch();const B={conversionFunnelName:this.analyticConversionFunnelName,conversionFunnelMetadata:tt.q.instance.prodigy.world.getCurrentMap()},U=tt.q.instance.prodigy.open.membershipInfo((()=>{this.onClose.dispatch()}),B,this.panelAdName?Ip.R[this.panelAdName]:void 0);U&&j.wa5.getActiveScene().getLayer(null!==(k=this._adMenuLayer)&&void 0!==k?k:this.GameObject.layer).addDisplayObject(U)}}destroy(){this.onClose.dispose(),this.onIsMember.dispose(),this.onIsNotMember.dispose(),super.destroy()}};(0,G.Cg)([(0,j.fFd)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Dp.prototype,"_playerProvider",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Dp.prototype,"onClose",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Dp.prototype,"onIsMember",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Dp.prototype,"onIsNotMember",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",Object)],Dp.prototype,"panelAdName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Dp.prototype,"analyticConversionFunnelName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Dp.prototype,"analyticConversionFunnelStage",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Dp.prototype,"_adMenuLayer",void 0),Dp=(0,G.Cg)([(0,j.EVk)("ShowAd",W.Y.membership)],Dp);U(56520);let Rp=class extends j.uAl{constructor(){super(...arguments),this._attachmentPivot=new j.I9Y(.5,.5)}create(){super.create(),this.attachToSlot().catch(j.RQr.createHandler("Error attaching render component to spine slot"))}attachToSlot(){return(0,G.sH)(this,void 0,void 0,(function*(){let k=this._attachedRenderComponent.getRootContainer();k||(yield this._attachedRenderComponent.onRootContainerSet.asPromise(),k=this._attachedRenderComponent.getRootContainer());const B=this._spineComponent.getSlot(this._slotName);(null==B?void 0:B.attachment)||j.VyI.log(`SpineAttachComponent: Slot ${this._slotName} has no attachment and will be hidden by the Spine runtime.`,j.$bb.Warning);const U=this._spineComponent.getSpine().getSlotContainer(B);if(!U)throw new Error(`SpineAttachComponent: Slot ${this._slotName} not found on spine.`);U.removeChildren();const F=U.addChild(new $e.Container);F.scale.y=-1,F.addChild(k),F.position.set(this._attachmentPivot.x*-k.width,this._attachmentPivot.y*k.height),this._attachedRenderComponent.GameObject.onHierarchyChanged.removeAll(this._attachedRenderComponent)}))}};(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],Rp.prototype,"_spineComponent",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Rp.prototype,"_slotName",void 0),(0,G.Cg)([(0,j.MnK)(j.y4o),(0,G.Sn)("design:type",j.y4o)],Rp.prototype,"_attachedRenderComponent",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],Rp.prototype,"_attachmentPivot",void 0),Rp=(0,G.Cg)([(0,j.EVk)("SpineAttach",W.Y.animation)],Rp);let Pp=class extends j.uAl{constructor(){super(...arguments),this._disableAfterStepComplete=!1,this.onComplete=new j.HN0,this._onNext=new j.HN0}destroy(){this.onComplete.dispose(),this._onNext.dispose(),super.destroy()}begin(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=this._root.Container;B.bind(this._nextCallbackInjectionId).toConstantValue((()=>this._onNext.dispatch()));try{const U=null!=k?k:this._root.GameObject.children;for(const k of U){const B=this._descendantTriggerName?k.findChildByName(this._descendantTriggerName):k;if(!j.Aq$.isDefined(B))continue;const U=this._onNext.asPromise();B.active=!0;try{yield U}catch(jv){return}this._disableAfterStepComplete&&(B.active=!1)}}finally{this._onNext.dispose(),B.unbind(this._nextCallbackInjectionId)}this.onComplete.dispatch()}))}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pp.prototype,"_descendantTriggerName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pp.prototype,"_nextCallbackInjectionId",void 0),(0,G.Cg)([(0,j.MnK)(j.bE_),(0,G.Sn)("design:type",j.bE_)],Pp.prototype,"_root",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Pp.prototype,"_disableAfterStepComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Pp.prototype,"onComplete",void 0),Pp=(0,G.Cg)([(0,j.EVk)("StaggerSequence",W.Y.animation)],Pp);let Mp=class extends j.y4o{create(){super.create(),this._timerRoot=tt.q.instance.game.add.group(tt.q.instance.game.stage),this.setRootContainer(this._timerRoot),this.playerMorphed=this.playerMorphed.bind(this),this.cancelledMorph=this.cancelledMorph.bind(this);const k=tt.q.instance.game.broadcaster;k.addAppListener(jn.J8.MorphMarbleUsed,this.playerMorphed,this),k.addAppListener(jn.J8.MorphMarbleTimerUpdated,this.update.bind(this),this),this.initTimer()}destroy(){var k;const B=tt.q.instance.game.broadcaster;B.removeAppListener(jn.J8.MorphMarbleUsed,this),B.removeAppListener(jn.J8.MorphMarbleTimerUpdated,this),this._morphTimer&&(this._morphTimer.destroy(),this._morphTimer=null),null===(k=this._timerRoot)||void 0===k||k.destroy(),super.destroy()}update(){super.update();const k=this._loggedInPlayer.player;if(this._morphTimer&&k)if(k.isPlayerTransformed()){const B=k.getPlayerData().playerTransformation;this._morphTimer.updateTimerValue(B.maxTime-B.timeRemaining)}else this._morphTimer.endTimer()}cancelledMorph(){this._loggedInPlayer.player.transformPlayer(Vn.V.Player),tt.q.instance.game.broadcaster.broadcast(jn.J8.MorphMarbleCancelled)}initTimer(){const k=this._loggedInPlayer.player;if(k.isPlayerTransformed()){const B=k.getPlayerData().playerTransformation;this.createTimer(B.maxTime,B.maxTime-B.timeRemaining)}}playerMorphed(k){this._morphTimer&&this._morphTimer.destroy(),this.GameObject.active=!0,this.createTimer(k.effect.time,0)}createTimer(k,B){this._morphTimer&&this._morphTimer.destroy();const U=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this._morphTimer=tt.q.instance.prodigy.create.timerControl(this._timerRoot,55,50,{maxTime:k,timeDelta:15e3,clickMessage:U.getText("MORPH_END_MESSAGE"),storedTime:B},this.cancelledMorph),this._morphTimer.onDestroy.addOnce((()=>{this._morphTimer=null}))}getDimensions(){return this.GameObject.transform instanceof j.XVE?this.GameObject.transform.rectTransformDimensions:new j.or0(this.getRootContainer().width,this.getRootContainer().height)}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Mp.prototype,"_loggedInPlayer",void 0),Mp=(0,G.Cg)([(0,j.EVk)("MorphTimerButton",W.Y.ui)],Mp);let Np=class extends j.uAl{constructor(){super(...arguments),this.targetTransforms=[],this.moveSpeed=220,this.loop=!1,this._currentTargetIndex=0,this._isMoving=!1,this.onMovementComplete=new j.HN0}destroy(){this.onMovementComplete.dispose(),super.destroy()}update(){if(!this._isMoving||!this.creatureTransform||this.targetTransforms.length<=0)return;const k=this.targetTransforms[this._currentTargetIndex];if(!k)return void this.finishMovement();const B=this.moveSpeed*tt.q.instance.game.time.deltaMS/1e3,U=k.worldPosition.x-this.creatureTransform.worldPosition.x,F=k.worldPosition.y-this.creatureTransform.worldPosition.y,G=Math.sqrt(U*U+F*F);if(G<=B){if(this.creatureTransform.worldPosition=k.worldPosition,++this._currentTargetIndex,this._currentTargetIndex>=this.targetTransforms.length)return this.loop?void(this._currentTargetIndex=0):void this.finishMovement()}else{const k=U/G,j=F/G;this.creatureTransform.worldPosition={x:this.creatureTransform.worldPosition.x+k*B,y:this.creatureTransform.worldPosition.y+j*B},this.updateFacingDirection(k)}}run(){!this.creatureTransform||this.targetTransforms.length<=0?this.onMovementComplete.dispatch():(this._isMoving=!0,this._currentTargetIndex=0,this.creatureAnimator&&this.playWalkAnimation())}updateFacingDirection(k){var B;const U=null!==(B=this.faceDirectionTransform)&&void 0!==B?B:this.creatureTransform;0!==k&&U&&(U.worldScale={x:Math.abs(U.worldScale.x)*(k<0?-1:1),y:U.worldScale.y})}playWalkAnimation(){var k;null===(k=this.creatureAnimator)||void 0===k||k.playAnimation("walk",!0)}playIdleAnimation(){var k;null===(k=this.creatureAnimator)||void 0===k||k.playAnimation("idle",!0)}finishMovement(){this._isMoving=!1,this.playIdleAnimation(),this.onMovementComplete.dispatch()}stop(){this._isMoving&&(this._isMoving=!1,this.playIdleAnimation())}};(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Np.prototype,"creatureTransform",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Np.prototype,"faceDirectionTransform",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],Np.prototype,"creatureAnimator",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",Array)],Np.prototype,"targetTransforms",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Np.prototype,"moveSpeed",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Np.prototype,"loop",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Np.prototype,"onMovementComplete",void 0),Np=(0,G.Cg)([(0,j.EVk)("CreatureMovement",W.Y.motion),(0,j.S1F)()],Np);class xp extends Mn{constructor(k,B,U,F){super(),this._floatHeight=0,this._floatRange=0,this._floatDurationMS=0,this._targetTransform=null,this._floatTween=null,this._initialTransformY=0,this._targetTransform=k,this._floatHeight=B,this._floatRange=U,this._floatDurationMS=F}destroy(){this.exit(),this._targetTransform=null,super.destroy()}enter(){const k=this._floatHeight+this._floatRange,B={y:this._floatHeight-this._floatRange},U=.5*this._floatDurationMS;this._floatTween=tt.q.instance.game.add.tween(B,this).to({y:k},U,j.GS3.Quadratic.InOut,!0,0,-1,!0).onUpdateCallback((()=>{this._targetTransform.setPosition(this._targetTransform.localPosition.x,this._initialTransformY-B.y)}))}exit(){var k;tt.q.instance.game.tweens.remove(this._floatTween),this._floatTween=null,null===(k=this._targetTransform)||void 0===k||k.setPosition(this._targetTransform.localPosition.x,this._initialTransformY)}}let Lp=class extends j.uAl{constructor(){super(...arguments),this._floatHeight=0,this._floatRange=0,this._floatPeriodMS=0}set targetTransform(k){this._targetTransform=k}create(){super.create(),this.setAnimationStates()}setAnimationStates(){const k=new xp(this._targetTransform,this._floatHeight,this._floatRange,this._floatPeriodMS);this._animationController.setAnimationState(0,k),this._animationController.setAnimationState(1,k),this._animationController.setAnimationState(2,k),this._animationController.setAnimationState(4,k)}destroy(){this._animationController=null,this._targetTransform=null,super.destroy()}};(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Lp.prototype,"_animationController",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Lp.prototype,"_targetTransform",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Lp.prototype,"_floatHeight",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Lp.prototype,"_floatRange",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Lp.prototype,"_floatPeriodMS",void 0),Lp=(0,G.Cg)([(0,j.EVk)("FloatAnimationStates",W.Y.animation)],Lp);class kp extends Mn{constructor(k,B,U){super(),this._hopHeight=0,this._hopDurationMS=0,this._targetTransform=null,this._hopTween=null,this._initialTransformY=0,this._targetTransform=k,this._hopHeight=B,this._hopDurationMS=U}destroy(){this._targetTransform=null,tt.q.instance.game.tweens.remove(this._hopTween),this._hopTween=null,super.destroy()}enter(){const k={y:0},B=.5*this._hopDurationMS;this._initialTransformY=this._targetTransform.localPosition.y,this._hopTween=tt.q.instance.game.add.tween(k,this).to({y:this._hopHeight},B,j.GS3.Quadratic.Out).to({y:0},B,j.GS3.Quadratic.In).onUpdateCallback((()=>{this._targetTransform.setPosition(this._targetTransform.localPosition.x,this._initialTransformY-k.y)})).loop(!0).start()}exit(){tt.q.instance.game.tweens.remove(this._hopTween),this._hopTween=null,this._targetTransform.setPosition(this._targetTransform.localPosition.x,this._initialTransformY)}}let Bp=class extends j.uAl{constructor(){super(...arguments),this._hopHeight=0,this._hopDurationMS=0}create(){super.create(),this._animationController.setAnimationState(1,new kp(this._targetTransform,this._hopHeight,this._hopDurationMS))}destroy(){this._animationController=null,this._targetTransform=null,super.destroy()}};(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Bp.prototype,"_animationController",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Bp.prototype,"_targetTransform",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Bp.prototype,"_hopHeight",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Bp.prototype,"_hopDurationMS",void 0),Bp=(0,G.Cg)([(0,j.EVk)("HopWalkAnimationStates",W.Y.animation)],Bp);U(85697);let Up=class extends j.uAl{constructor(){super(...arguments),this.onGotViewedProgressMenu=new j.HN0}postCreate(){super.postCreate(),this.updateFestivalHudNotification()}updateFestivalHudNotification(){if(this.onHUDMenuBar){const k=!tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.viewedProgressMenu;this.onGotViewedProgressMenu.dispatch(k)}}destroy(){this.onGotViewedProgressMenu.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Up.prototype,"onGotViewedProgressMenu",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Up.prototype,"onHUDMenuBar",void 0),Up=(0,G.Cg)([(0,j.EVk)("FestivalProgress",W.Y.festival)],Up);var Fp=U(57797),Gp=U(53037),jp=U(71586);let $p=class extends j.uAl{setup(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){this._progressTask=k,this._claimTask=B,this._destroyMenuCallback=U,this.setupTierComponent(F)}))}setDefaults(){this._progressBar.GameObject.active=!0,this._progressBarIcon.active=!0,this._tierQuestDescription.GameObject.active=!0,this._tierLockedState.active=!1,this._tierClaimedState.active=!1,this._tierClaimableState.active=!1}setupTierComponent(k){var B,U,F,G,$;if(this.setDefaults(),k)return this._progressBar.GameObject.active=!1,this._tierQuestDescription.GameObject.active=!1,void(this._tierLockedState.active=!0);let H=null!==(U=null===(B=this._progressTask.taskProgress.data)||void 0===B?void 0:B.progress)&&void 0!==U?U:0;const V=null!==(F=this._progressTask.taskDefinition.completionRequirements.data.target)&&void 0!==F?F:0;let W="Complete!";this._progressTask.taskProgress.status===pr.t.COMPLETE&&(H=V,this._progressBarIcon.active=!1),this._progressBar.setFromValues(H,V,!1);if(this._claimTask&&this._progressTask.taskProgress.status===pr.t.COMPLETE&&(this._claimTask.taskProgress.status===pr.t.COMPLETE||(null!==($=null===(G=this._claimTask.taskProgress.data)||void 0===G?void 0:G.timesCompleted)&&void 0!==$?$:0)>0))this._tierClaimedState.active=!0,W="Collected!",this._replayButton.useHandCursor=!0,this._replayButton.onClick.add((()=>{this._festivalQuestManager.sendRewardClaimedEvent(this._claimTask.taskID).catch(j.RQr.createHandler("Failed to send reward claimed event.")),this._replayButton.useHandCursor=!1,this._replayButton.onClick.removeAll(),this._destroyMenuCallback()}));else if(this._claimTask&&this._progressTask.taskProgress.status===pr.t.COMPLETE){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this._tierClaimableState.active=!0,this._progressBar.GameObject.active=!1,k.daily.viewedProgressMenu=!1,this._claimButton.useHandCursor=!0,this._claimButton.onClick.add((()=>{this._festivalQuestManager.sendRewardClaimedEvent(this._claimTask.taskID).catch(j.RQr.createHandler("Failed to send reward claimed event.")),k.daily.viewedProgressMenu=!0,this._claimButton.useHandCursor=!1,this._claimButton.onClick.removeAll(),W="Collected!",this._tierClaimedState.active=!1,this._progressBar.GameObject.active=!0,this._destroyMenuCallback()}))}this._progressBar.onFilled.add((()=>{this._progressBar.setBarText(W)}))}};(0,G.Cg)([(0,j.Cdj)("99d-5e9e"),(0,G.Sn)("design:type",Gp.q)],$p.prototype,"_festivalQuestManager",void 0),(0,G.Cg)([(0,j.MnK)(ys.z),(0,G.Sn)("design:type",ys.z)],$p.prototype,"_progressBar",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],$p.prototype,"_tierQuestDescription",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],$p.prototype,"_claimButton",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],$p.prototype,"_replayButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$p.prototype,"_tierClaimedState",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$p.prototype,"_tierClaimableState",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$p.prototype,"_tierLockedState",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$p.prototype,"_progressBarIcon",void 0),$p=(0,G.Cg)([(0,j.EVk)("FestivalCoopTier",W.Y.festival)],$p);let Hp=class extends ad.b{constructor(){super(...arguments),this._color="#FFFFFF",this._previousColor=1}get color(){return this._color}set color(k){this._color="number"==typeof k?j.Q1f.numberToHexString(k).slice(0,7):k,this.reset()}initialize(){if(super.initialize(),"tint"in this._rootContainer)return;const k=new nd.N,B=j.Q1f.hexToRGB(this._color),U=B>>16&255,F=B>>8&255,G=255&B;k.matrix[0]=U/255,k.matrix[6]=F/255,k.matrix[12]=G/255,this._filterList.push(k)}applyFilter(){"tint"in this._rootContainer?(this._previousColor=this._rootContainer.tint,this._rootContainer.tint=j.TZp.hexToDecimal(this._color,"#"),of.s.resetCacheAsBitmap(this._rootContainer)):super.applyFilter()}removeFilter(){"tint"in this._rootContainer?(this._rootContainer.tint=this._previousColor,of.s.resetCacheAsBitmap(this._rootContainer)):super.removeFilter()}};(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],Hp.prototype,"_color",void 0),Hp=(0,G.Cg)([(0,j.EVk)("ColorTintFilter",W.Y.effect)],Hp);class Vp extends j.$KW{generate(k,B){const U=this.buildButtonNodeGroup(k),F=this.buildFestivalTiersNodeGroup(k),G=this.buildFestivalTabGroup(k),$=this.buildSignalGroup(k);return j.XRp.createVertical([U,F,G,$])}buildSignalGroup(k){const B=j.NyS.create({id:"onChangeTab",label:"On Change Tab",signalValue:k.onChangeTab,componentGUID:this._componentGuid}),U=j.NyS.create({id:"onChangeTabComplete",label:"On Change Tab Complete",signalValue:k.onChangeTabComplete,componentGUID:this._componentGuid});return j.XRp.createVertical([B,U],{isContainer:!0,title:"Signals",isCollapsible:!0,startCollapsed:!1})}buildFestivalTabGroup(k){const B=j.Gme.gameObjectPickerGroup({id:"storyTabNotification",labelValue:"Story Notification",gameObjectGuid:k.storyTabNotification}),U=j.Gme.gameObjectPickerGroup({id:"seasonTabNotification",labelValue:"Season Notification",gameObjectGuid:k.seasonTabNotification}),F=j.Gme.gameObjectPickerGroup({id:"riftsTabNotification",labelValue:"Rifts Notification",gameObjectGuid:k.riftsTabNotification}),G=j.Gme.gameObjectPickerGroup({id:"memberTabNotification",labelValue:"Member Notification",gameObjectGuid:k.memberTabNotification}),$=j.Gme.gameObjectPickerGroup({id:"coopTabNotification",labelValue:"Coop Notification",gameObjectGuid:k.coopTabNotification}),H=j.Gme.componentPickerGroup({id:"toggleGroup",labelValue:"Toggle Group",componentType:qs.O,componentGuid:k.toggleGroup});return j.XRp.createVertical([B,U,F,G,$,H],{isContainer:!0,title:"Festival Tabs",isCollapsible:!0,startCollapsed:!0})}buildFestivalTiersNodeGroup(k){const B=j.Gme.gameObjectPickerGroup({id:"tierCardContainer",labelValue:"Tier Card Container",gameObjectGuid:k.tierCardContainer}),U=j.Gme.componentPickerGroup({id:"scrollViewRef",labelValue:"Scroll View Ref",componentType:Mt.C,componentGuid:k.scrollViewRef}),F=j.Gme.componentPickerGroup({id:"gridLayoutRef",labelValue:"Grid Layout Ref",componentType:j.Sz7,componentGuid:k.gridLayoutRef}),G=j.Gme.componentPickerGroup({id:"taskCompleteCounter",labelValue:"Task Complete Counter",componentType:j.EYj,componentGuid:k.taskCompleteCounter}),$=j.Gme.gameObjectPickerGroup({id:"loadingObject",labelValue:"Loading Object",gameObjectGuid:k.loadingObject});return j.XRp.createVertical([B,U,F,G,$],{isContainer:!0,title:"Festival Progress Tiers",isCollapsible:!0,startCollapsed:!0})}buildButtonNodeGroup(k){const B=j.Gme.componentPickerGroup({id:"shopButton",labelValue:"Shop Button",componentType:F.$,componentGuid:k.shopButton}),U=j.Gme.componentPickerGroup({id:"ctaButton",labelValue:"CTA Button",componentType:F.$,componentGuid:k.ctaButton});return j.XRp.createVertical([B,U],{isContainer:!0,title:"Buttons",isCollapsible:!0,startCollapsed:!0})}buildTierNodeGroup(k,B){const U=j.Gme.componentPickerGroup({id:`tier${B}Lock`,labelValue:"Lock SpineAnimator",componentType:Os.j,componentGuid:k[`tier${B}Lock`]}),F=j.Gme.componentPickerGroup({id:`tier${B}RewardImage`,labelValue:"Reward Image",componentType:j.vYh,componentGuid:k[`tier${B}RewardImage`]}),G=j.Gme.componentPickerGroup({id:`tier${B}RewardText`,labelValue:"Reward Text",componentType:j.EYj,componentGuid:k[`tier${B}RewardText`]}),$=j.Gme.componentPickerGroup({id:`tier${B}RewardQuantityText`,labelValue:"Reward Quantity Text",componentType:j.EYj,componentGuid:k[`tier${B}RewardQuantityText`]}),H=j.Gme.gameObjectPickerGroup({id:`tier${B}RewardQuantityContainer`,labelValue:"Reward Quantity Container",gameObjectGuid:k[`tier${B}RewardQuantityContainer`]}),V=j.XRp.createVertical([F,G,$,H],{isContainer:!0}),W=j.Gme.componentPickerGroup({id:`tier${B}FestivalCurrencyText`,labelValue:"Festival Currency Text",componentType:j.EYj,componentGuid:k[`tier${B}FestivalCurrencyText`]}),q=j.Gme.componentPickerGroup({id:`tier${B}AtSchoolFestivalCurrencyText`,labelValue:"At School Festival Currency Text",componentType:j.EYj,componentGuid:k[`tier${B}AtSchoolFestivalCurrencyText`]}),K=j.Gme.componentPickerGroup({id:`tier${B}FestivalCurrencyIcon`,labelValue:"Festival Currency Graphic",componentType:j.vYh,componentGuid:k[`tier${B}FestivalCurrencyIcon`]}),z=j.Gme.componentPickerGroup({id:`tier${B}FestivalCurrencyQuantityText`,labelValue:"Festival Currency Quantity Text",componentType:j.EYj,componentGuid:k[`tier${B}FestivalCurrencyQuantityText`]}),Y=j.XRp.createVertical([W,q,K,z],{isContainer:!0}),Q=j.Gme.componentPickerGroup({id:`bar${B}Bg`,labelValue:"Bg ColorTintFilter",componentType:Hp,componentGuid:k[`bar${B}Bg`]}),X=j.Gme.componentPickerGroup({id:`bar${B}Fill`,labelValue:"Fill ColorTintFilter",componentType:Hp,componentGuid:k[`bar${B}Fill`]}),Z=j.Gme.componentPickerGroup({id:`bar${B}ProgressBarOuter`,labelValue:"ProgressBarOuter ColorTintFilter",componentType:Hp,componentGuid:k[`bar${B}ProgressBarOuter`]}),J=j.Gme.componentPickerGroup({id:`bar${B}ProgressText`,labelValue:"ProgressText Text",componentType:j.EYj,componentGuid:k[`bar${B}ProgressText`]}),tt=j.XRp.createVertical([Q,X,Z,J],{isContainer:!0});return j.XRp.createVertical([U,V,Y,tt],{isContainer:!0,title:`Tier ${B}`,isCollapsible:!0,startCollapsed:!0})}}let Wp=class extends ad.b{constructor(){super(...arguments),this._strength=.5}initialize(){super.initialize();const k=new nd.N;k.brightness(this._strength,!1),this._filterList.push(k)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Wp.prototype,"_strength",void 0),Wp=(0,G.Cg)([(0,j.EVk)("BrightnessFilter",W.Y.effect)],Wp);let qp=class extends j.uAl{setup(k,B,U,F,j,$){return(0,G.sH)(this,void 0,void 0,(function*(){this._progressTask=k,this._claimTask=B,this._destroyMenuCallback=U,this._loadingObject=j,this.setupTierComponent(F,$)}))}setDefaults(){this._progressBar.GameObject.active=!0,this._timeBanner.active=!0,this._tierRewardDescription.GameObject.active=!0,this._lockedByQuest.active=!1,this._lockedByTime.active=!1,this._lockedOverlay.active=!1,this._lockBanner.active=!1,this._rewardClaimable.active=!1,this._rewardClaimableHand.active=!1,this._memberRewardGameObject.active=!1,this._memberTaskGameObject.active=!1,this._morphMarbleIcon.active=!1,this._tierRewardQuantityContainer.active=!1,this._tierCollectedLabel.active=!1,this._brightnessFilter.removeFilter(),this._brightnessFilter.GameObject.active=!1,this._rewardItemButton.onClick.removeAll(),this._itemCardButton.onClick.removeAll(),this.storyArrow.active=!1}setupTierComponent(k,B){var U,F,G,$,H,V,W,q;this.setDefaults(),(null===(U=this._progressTask.taskDefinition.metadata)||void 0===U?void 0:U.questGoalType)===Fp.xK.Story&&(this.storyArrow.active=!0);const K=null===($=null===(G=null===(F=this._claimTask)||void 0===F?void 0:F.taskDefinition.onComplete)||void 0===G?void 0:G.find((k=>"GotItem"===k.type)))||void 0===$?void 0:$.data.itemDrops[0],z=K?Yt.t.getItem(K.type,K.ID):null;if(z){this._brightnessFilter.GameObject.active=!0;const k=os.X.createImageLoadData(z);this._tierRewardImage.setAsset(k.source,k.frame).catch(j.RQr.createHandler("Unable to set image from asset data."));const B=z.data;this._tierBackgroundImage.setAsset(Ve._.Ui_battle_pass_json,Object.values(Es)[null!==(H=B.rarity)&&void 0!==H?H:0]).catch(j.RQr.createHandler("Unable to set rarity background from asset data.")),this._tierRewardQuantityContainer.active=!1,j.Aq$.isDefined(K.N)&&K.N>1&&(this._tierRewardQuantityText.text=`x${K.N}`,this._tierRewardQuantityContainer.active=!0),"item"===K.type&&K.ID&&_r.x.isMorphMarbleAsset(K.ID)&&(this._morphMarbleIcon.active=!0),B.member&&(this._memberRewardGameObject.active=!0),this._itemCardButton.onClick.add((()=>{tt.q.instance.prodigy.open.itemInfo(z)}))}this._progressTask.taskDefinition.metadata.isMemberLocked&&(this._memberTaskGameObject.active=!0);let Y=null!==(W=null===(V=this._progressTask.taskProgress.data)||void 0===V?void 0:V.progress)&&void 0!==W?W:0;const Q=this._progressTask.taskDefinition.completionRequirements.data.target;let X="Complete!";if(this._progressTask.taskProgress.status===pr.t.COMPLETE&&(Y=Q),this._progressBar.setFromValues(Y,Q,!1),this._storybookIcon.active=(null===(q=this._progressTask.taskDefinition.metadata)||void 0===q?void 0:q.questGoalType)===Fp.xK.Story,this._claimTask&&this._progressTask.taskProgress.status===pr.t.COMPLETE&&this._claimTask.taskProgress.status===pr.t.COMPLETE)X="Collected!",this._tierCollectedLabel.active=!0,this._timeBanner.active=!1,this._brightnessFilter.applyFilter();else if(this._claimTask&&this._progressTask.taskProgress.status===pr.t.COMPLETE){X="Complete!";const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(this._rewardClaimable.active=!0,this._progressBar.GameObject.active=!1,k.hasMembership()||!this._progressTask.taskDefinition.metadata.isMemberLocked)k.daily.viewedProgressMenu=!1,this.toggleRewardClaimableHand(B),this._rewardItemButton.useHandCursor=!0,this._rewardItemButton.onClick.add((()=>{X="Collected!",this.claimClick(k)}));else{const k={conversionFunnelName:en.o.FunnelFestivalMemberQuest};this._rewardItemButton.onClick.add((()=>{tt.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:`${this._progressTask.questID}-${this._progressTask.taskID}-ClaimButton`,category:"festival",contentId:this._progressTask.questID,adType:Fs.R.BattlePassUpsell}),tt.q.instance.prodigy.open.membershipInfo(void 0,k,"member-button")}))}}else if(this._progressTask.getTimeUntilUnlock()>Kt.A.DAY_IN_MS)this._memberRewardGameObject.active=!1,this._tierRewardDescription.GameObject.active=!1,this._lockedByQuest.active=!1,this._lockedByTime.active=!0,this._progressBar.GameObject.active=!1,this._timeBanner.active=!1,this._lockBanner.active=!1,this._lockedOverlay.active=!0,this._brightnessFilter.applyFilter();else{const B=this._progressTask.getTimeUntilUnlock();this._lockedByTime.active=B>0,this._lockedByQuest.active=k&&!this._lockedByTime.active,this._tierRewardDescription.GameObject.active=!this._lockedByTime.active&&!this._lockedByQuest.active,this._lockedOverlay.active=this._lockedByTime.active||this._lockedByQuest.active,this._lockBanner.active=this._lockedByTime.active||this._lockedByQuest.active,this._progressBar.GameObject.active=!this._lockedOverlay.active,this._timeBanner.active=!this._lockedOverlay.active,this._lockedOverlay.active&&(this._memberRewardGameObject.active=!1,this._brightnessFilter.applyFilter())}this._progressBar.onFilled.add((()=>{this._progressBar.setBarText(X)}))}claimClick(k){var B,U,F,G,$,H;this._festivalQuestManager.sendRewardClaimedEvent(this._claimTask.taskID).catch(j.RQr.createHandler("Failed to send reward claimed event.")),k.daily.viewedProgressMenu=!0,this._rewardItemButton.useHandCursor=!1,this._rewardItemButton.onClick.removeAll(),this._tierCollectedLabel.active=!0,this._rewardClaimable.active=!1,this.toggleRewardClaimableHand(!1,!0),this._progressBar.GameObject.active=!0;!1===(null===(F=null===(U=null===(B=this._claimTask)||void 0===B?void 0:B.taskDefinition.onComplete)||void 0===U?void 0:U.find((k=>k.type===yl.s.GOT_ITEM)))||void 0===F?void 0:F.data.showGotItem)?(null===(G=this._claimedAnimationAnimator)||void 0===G||G.playAnimation("generic",!1),this._claimedMovementBoneFollow.setup(),null===($=this._claimedMovementAnimator)||void 0===$||$.playAnimation("claim",!1)):this._destroyMenuCallback(),null===(H=this._claimAudioComponent)||void 0===H||H.play()}toggleRewardClaimableHand(k,B=!1){B&&this._rewardClaimableHand.active&&this._rewardClaimableHandNext&&this._rewardClaimableHandNext.toggleRewardClaimableHand(!0),this._rewardClaimableHand.active=k}setNextHand(k){this._rewardClaimableHandNext=k}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"storyArrow",void 0),(0,G.Cg)([(0,j.Cdj)("99d-5e9e"),(0,G.Sn)("design:type",Gp.q)],qp.prototype,"_festivalQuestManager",void 0),(0,G.Cg)([(0,j.MnK)(ys.z),(0,G.Sn)("design:type",ys.z)],qp.prototype,"_progressBar",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_tierCollectedLabel",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],qp.prototype,"_tierRewardDescription",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],qp.prototype,"_tierRewardImage",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],qp.prototype,"_tierBackgroundImage",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],qp.prototype,"_tierRewardQuantityText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_tierRewardQuantityContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_memberRewardGameObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_memberTaskGameObject",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],qp.prototype,"_rewardItemButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],qp.prototype,"_itemCardButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_rewardClaimable",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_rewardClaimableHand",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",qp)],qp.prototype,"_rewardClaimableHandNext",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_lockedByQuest",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_lockedByTime",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_lockedOverlay",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_timeBanner",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_lockBanner",void 0),(0,G.Cg)([(0,j.MnK)(Wp),(0,G.Sn)("design:type",Wp)],qp.prototype,"_brightnessFilter",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_morphMarbleIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_storybookIcon",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],qp.prototype,"_claimedAnimationAnimator",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],qp.prototype,"_claimedMovementAnimator",void 0),(0,G.Cg)([(0,j.MnK)(rn.l),(0,G.Sn)("design:type",rn.l)],qp.prototype,"_claimedMovementBoneFollow",void 0),(0,G.Cg)([(0,j.MnK)(hn.J),(0,G.Sn)("design:type",hn.J)],qp.prototype,"_claimAudioComponent",void 0),qp=(0,G.Cg)([(0,j.EVk)("FestivalProgressTier",W.Y.festival)],qp);let Kp=class extends j.uAl{setup(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){this._progressTask=k,this._claimTask=B,this._destroyMenuCallback=U,this.setupTierComponent(F)}))}setDefaults(){this._lockedByQuest.active=!1,this._lockedByTime.active=!1,this._lockedBanner.active=!1}setupTierComponent(k){this.setDefaults();const B=this._progressTask.getTimeUntilUnlock();this._lockedByTime.active=B>0,this._lockedByQuest.active=k&&!this._lockedByTime.active,this._storyDescription.active=!this._lockedByTime.active&&!this._lockedByQuest.active,this._lockedBanner.active=this._lockedByTime.active||this._lockedByQuest.active}};var zp;(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Kp.prototype,"storyArrow",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Kp.prototype,"_lockedByQuest",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Kp.prototype,"_lockedByTime",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Kp.prototype,"_lockedBanner",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Kp.prototype,"_storyDescription",void 0),Kp=(0,G.Cg)([(0,j.EVk)("FestivalProgressTierStory",W.Y.festival)],Kp),function(k){k[k.Claimable=3]="Claimable",k[k.Available=2]="Available",k[k.Locked=1]="Locked",k[k.Claimed=0]="Claimed"}(zp||(zp={}));let Yp=class extends j.uAl{constructor(){super(...arguments),this.onChangeTab=new j.HN0,this.onChangeTabComplete=new j.HN0,this._progressTierPool=[],this._storyTierPool=[],this._coopTierPool=[],this._buildTiersVersion=0,this._storyTasks=[]}postCreate(){var k,B,U;super.postCreate();{this._localizer=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),this._festivalSchema=tt.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival();const F=tt.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig();if(!F)return j.VyI.log("Unable to retrieve Festival Config asset for menu setup. Closing menu.",j.$bb.Error),void this.GameObject.destroyDeferred();this._festivalConfig=F;const G=null===(k=this._toggleGroup)||void 0===k?void 0:k.getToggles(),$=null==G?void 0:G.find((k=>k.GameObject.active));$&&(null===(B=this._toggleGroup)||void 0===B||B.setDefaultSelectionIndex(G.indexOf($)),null===(U=this._toggleGroup)||void 0===U||U.setItemSelected($,!0),$.onSelected.dispatch())}}isTaskLocked(k,B){var U,F;if(k.getTimeUntilUnlock()>0)return!0;return[...k.getPrerequisites(),...null!==(F=null===(U=k.taskDefinition.metadata)||void 0===U?void 0:U.visualPrerequisites)&&void 0!==F?F:[]].some((k=>B.some((B=>B.taskDefinition.id===k&&B.taskProgress.status!==pr.t.COMPLETE))))}buildTiers(){return(0,G.sH)(this,arguments,void 0,(function*(k=!0,B=this._buildTiersVersion){var U;const F=this._festivalQuestManager.getProgressTasks();this._storyTasks=F.reduce(((k,B)=>{var U,F,G;return(null===(G=null===(F=null===(U=B.taskDefinition)||void 0===U?void 0:U.metadata)||void 0===F?void 0:F.storyMetadata)||void 0===G?void 0:G.storyImageGuid)&&k.push(B),k}),[]),this._progressTierPool.forEach((k=>{k.active=!1})),this._storyTierPool.forEach((k=>{k.active=!1})),this._coopTierPool.forEach((k=>{k.active=!1}));let G=0;const j=F.map(((k,B)=>{var U,j,$,H;let V=-1;if(null===(j=null===(U=k.taskDefinition)||void 0===U?void 0:U.metadata)||void 0===j?void 0:j.isHiddenQuest)return{progressTask:void 0,claimTask:void 0,priority:V};if((null===(H=null===($=k.taskDefinition)||void 0===$?void 0:$.metadata)||void 0===H?void 0:H.questGoalType)!==this._currentTab)return{progressTask:void 0,claimTask:void 0,priority:V};const W=this._festivalQuestManager.getClaimTask(k.taskID);return V=k.taskDefinition.metadata.sortPriority?k.taskDefinition.metadata.sortPriority:k.taskProgress.status===pr.t.COMPLETE&&W&&W.taskProgress.status===pr.t.COMPLETE?zp.Claimed:k.taskProgress.status===pr.t.COMPLETE?zp.Claimable:this.isTaskLocked(k,F)?zp.Locked:zp.Available,V>G&&(G=V),{progressTask:k,claimTask:W,priority:V}}));let $,H=!0;for(let V=G;V>=0;V-=1){const k=j.filter((k=>void 0!==k.progressTask&&k.priority===V));for(let G=0;GB.taskDefinition.id===rt[k]&&B.taskProgress.status!==pr.t.COMPLETE));if(void 0!==B){const k=null!==(q=null===(W=null===(V=B.taskDefinition.metadata)||void 0===V?void 0:V.questName)||void 0===W?void 0:W.toString())&&void 0!==q?q:B.taskID;ot=k.length>=_r.x.LONG_QUEST_NAME_CHAR_LENGTH?this._localizer.getText(_r.x.LONG_PREREQUISITE_TEXT_KEY,k):this._localizer.getText(_r.x.SHORT_PREREQUISITE_TEXT_KEY,k),ht++}}ht>1&&(ot=this._localizer.getText(_r.x.MULTIPLE_PREREQUISITES_TEXT_KEY));const ct=(null===(K=k.taskDefinition.metadata)||void 0===K?void 0:K.questGoalTaskType)===Fp.wD.STORY,dt=(null===(z=k.taskDefinition.metadata)||void 0===z?void 0:z.questGoalTaskType)===Fp.wD.COOP,lt=void 0!==(null===(Y=k.taskDefinition.metadata)||void 0===Y?void 0:Y.storyMetadata);let ut=Rt.l.FestivalProgressTier,ft=this._progressTierPool;ct?(ut=Rt.l.FestivalProgressStoryTier,ft=this._storyTierPool):dt&&(ut=Rt.l.FestivalCoopTier,ft=this._coopTierPool);let bt="";bt=lt?k.taskProgress.status===pr.t.COMPLETE?this._localizer.getText(_r.x.STORY_COMPLETE_TEXT_KEY):null===(X=null===(Q=k.taskDefinition.metadata)||void 0===Q?void 0:Q.storyMetadata)||void 0===X?void 0:X.storyDescription:yn.n.getQuestDescription(k.taskDefinition.completionRequirements.type,k.taskDefinition.completionRequirements.data.target,k.taskDefinition.localizationKey);const pt=this._storyTasks.filter((k=>k.taskProgress.status!==pr.t.COMPLETE));pt.length>0&&k===pt[0]&&(ot=null!==(Z=this.overrideQuestUnlockString(rt,F))&&void 0!==Z?Z:ot);let vt="";vt=nt>=0?this._localizer.getText(_r.x.DAYS_LEFT_TEXT_KEY,Math.ceil(nt/Kt.s.DAY_IN_MS)):at?this._localizer.getText("READY"):this._localizer.getText("");const gt={QUEST_DESCRIPTION:bt,TIMER_TEXT:nt>0?void 0:vt,TIMER_TEXT_VALUE:nt>0?nt:void 0,QUEST_UNLOCKS_IN:this.getQuestUnlockText(st),STORY_GRAPHIC:lt?null===(tt=null===(J=k.taskDefinition.metadata)||void 0===J?void 0:J.storyMetadata)||void 0===tt?void 0:tt.storyImageGuid:""};let mt=ft.find((k=>!k.active));if(mt)Nt.d.updateInjectedValues(mt,gt);else{if(mt=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,ut,gt).catch(j.RQr.createHandler("Error creating a festival tier prefab")),this._buildTiersVersion!==H)return mt.active=!1,ft.push(mt),null;ft.push(mt)}const yt=mt.findComponent(qp);return ct?null===(et=mt.findComponent(Kp))||void 0===et||et.setup(k,B,(()=>this.GameObject.destroy()),(null==ot?void 0:ot.length)>0).catch(j.RQr.createHandler("Failed to setup story tier component.")):dt?null===(it=mt.findComponent($p))||void 0===it||it.setup(k,B,(()=>this.GameObject.destroy()),(null==ot?void 0:ot.length)>0).catch(j.RQr.createHandler("Failed to setup coop tier component.")):yt&&yt.setup(k,B,(()=>this.GameObject.destroy()),(null==ot?void 0:ot.length)>0,this._loadingObject,$).catch(j.RQr.createHandler("Failed to setup tier component.")),mt.active=!0,mt.name=`Festival Progress Tier ${k.taskID}`,[mt,yt]}))}setTaskProgressForTab(k){var B,U,F,G;if(k===Fp.xK.Story){const F=null===(B=this._festivalQuestManager)||void 0===B?void 0:B.getCompletedTaskCount(k,Fp.wD.STORY),G=null===(U=this._festivalQuestManager)||void 0===U?void 0:U.getStoryTaskCount();this._taskCompleteCounter.text=this._localizer.getText(_r.x.PROGRESS_STORY_KEY,F,G)}else{const B=null===(F=this._festivalQuestManager)||void 0===F?void 0:F.getCompletedTaskCount(k),U=null===(G=this._festivalQuestManager)||void 0===G?void 0:G.getProgressTaskCount(k);this._taskCompleteCounter.text=this._localizer.getText(_r.x.PROGRESS_COMPLETE_KEY,B,U)}}destroy(){++this._buildTiersVersion,[this._progressTierPool,this._storyTierPool,this._coopTierPool].forEach((k=>{k.forEach((k=>{k.parent||k.destroy()}))})),this.onChangeTab.dispose(),this.onChangeTabComplete.dispose(),super.destroy()}changeTab(k){this._currentTab=k,this.onChangeTab.dispatch(),this.setTaskProgressForTab(k),this.setTabNotifications(k),this._festivalQuestManager.markCompletedTasksSeen(k);const B=++this._buildTiersVersion;this.buildTiers(!0,B).then((()=>{this.gameObject&&!this.gameObject.isDestroyed&&(this._scrollViewRef.scrollToPercent(this.getTabScrollPercent(k)),this.onChangeTabComplete.dispatch())})).catch(j.RQr.createHandler("Failed to rebuild tiers for Festival Progress Menu when switching tabs."))}setTabNotifications(k){var B,U,F,G,j,$;const H=null===(B=this._festivalQuestManager)||void 0===B?void 0:B.getCachedFestivalQuestData(),V=this._activePlayer.hasMembership(),W={unclaimedQuestCount:0,unclaimedMemberCount:0,unclaimedNonMemberCount:0,unseenQuestCount:0,unseenMemberCount:0,unseenNonMemberCount:0},q=null!==(U=null==H?void 0:H.getUnclaimedQuestCount(Fp.xK.Story))&&void 0!==U?U:W,K=null!==(F=null==H?void 0:H.getUnclaimedQuestCount(Fp.xK.Season))&&void 0!==F?F:W,z=null!==(G=null==H?void 0:H.getUnclaimedQuestCount(Fp.xK.Rifts))&&void 0!==G?G:W,Y=null!==(j=null==H?void 0:H.getUnclaimedQuestCount(Fp.xK.Member))&&void 0!==j?j:W,Q=null!==($=null==H?void 0:H.getUnclaimedQuestCount(Fp.xK.Coop))&&void 0!==$?$:W;this._storyTabNotification.active=k!==Fp.xK.Story&&(V?q.unclaimedQuestCount:q.unclaimedNonMemberCount+q.unseenMemberCount)>0,this._seasonTabNotification.active=k!==Fp.xK.Season&&(V?K.unclaimedQuestCount:K.unclaimedNonMemberCount+K.unseenMemberCount)>0,this._riftsTabNotification.active=k!==Fp.xK.Rifts&&(V?z.unclaimedQuestCount:z.unclaimedNonMemberCount+z.unseenMemberCount)>0,this._memberTabNotification.active=k!==Fp.xK.Member&&(V?Y.unclaimedQuestCount:Y.unclaimedNonMemberCount+Y.unseenMemberCount)>0,this._coopTabNotification.active=k!==Fp.xK.Coop&&(V?Q.unclaimedQuestCount:Q.unclaimedNonMemberCount+Q.unseenMemberCount)>0}getTabScrollPercent(k){var B,U,F,G,$,H;let V=0,W=0,q=0,K=0,z=0,Y=0,Q=0,X=0,Z=0;const J=this._gridLayoutRef.columnSpacing,tt=this._scrollViewRef.GameObject.findComponent(j.XVE).widthDelta,et=this._tierCardContainer.findComponent(j.XVE).widthDelta-tt;let it=0,st=0;switch(k){case Fp.xK.Story:K=null===(B=this._festivalQuestManager)||void 0===B?void 0:B.getCompletedTaskCount(Fp.xK.Story,Fp.wD.STORY),Y=null===(U=this._festivalQuestManager)||void 0===U?void 0:U.getCompletedTaskCount(Fp.xK.Story,Fp.wD.GOAL,!0);const k=null!==(G=null===(F=this._tierCardContainer.children[0])||void 0===F?void 0:F.findComponent(Kp))&&void 0!==G?G:null===($=this._tierCardContainer.children[0])||void 0===$?void 0:$.findComponent(qp);k&&(k.storyArrow.active=!1);for(let B=0;B{const U=B.find((B=>B.taskID===k));return(null==U?void 0:U.taskProgress.status)===pr.t.COMPLETE})))return this._localizer.getText(_r.x.QUEST_LAMPLIGHT_PROMPT_KEY)}getQuestUnlockText(k){let B=this._localizer.getText(_r.x.FESTIVAL_QUEST_COMING_SOON_KEY);const U=jp.R.getNow(),F=new Date(U.getTime()+k),G=F.getDate()===U.getDate(),j=F.getDate()===U.getDate()+1;return Qt.J.isDateWithinSchoolHours(U)&&G?B=this._localizer.getText(_r.x.FESTIVAL_TIER_RETURN_TODAY_KEY):j&&(B=this._localizer.getText(_r.x.FESTIVAL_TIER_RETURN_TOMORROW_KEY)),B}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",F.$)],Yp.prototype,"_shopButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",F.$)],Yp.prototype,"_ctaButton",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Yp.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("99d-5e9e"),(0,G.Sn)("design:type",Gp.q)],Yp.prototype,"_festivalQuestManager",void 0),(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],Yp.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yp.prototype,"_tierCardContainer",void 0),(0,G.Cg)([(0,j.MnK)(j.Sz7),(0,G.Sn)("design:type",j.Sz7)],Yp.prototype,"_gridLayoutRef",void 0),(0,G.Cg)([(0,j.MnK)(Mt.C),(0,G.Sn)("design:type",Mt.C)],Yp.prototype,"_scrollViewRef",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yp.prototype,"_storyTabNotification",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yp.prototype,"_seasonTabNotification",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yp.prototype,"_riftsTabNotification",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yp.prototype,"_memberTabNotification",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yp.prototype,"_coopTabNotification",void 0),(0,G.Cg)([(0,j.MnK)(qs.O),(0,G.Sn)("design:type",qs.O)],Yp.prototype,"_toggleGroup",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Yp.prototype,"_taskCompleteCounter",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yp.prototype,"_loadingObject",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Yp.prototype,"onChangeTab",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Yp.prototype,"onChangeTabComplete",void 0),Yp=(0,G.Cg)([(0,j.EVk)("FestivalProgressMenuSetup",W.Y.festival),(0,j.WR4)(Vp)],Yp);var Qp,Xp=U(94393),Zp=U(30065),Jp=U(65725);!function(k){k.PortalNonMemberSchool="PortalNonMemberSchool",k.PortalNonMemberHome="PortalNonMemberHome",k.PortalMember="PortalMember"}(Qp||(Qp={}));var tv=U(84415);let ev=class extends j.uAl{constructor(){super(...arguments),this._originType=ui.$N.ButtonClick,this.onOpen=new j.HN0}get prefabMenu(){return this._prefabMenu}openFestivalProgressMenu(){var k;this._prefabMenu=_r.x.openFestivalProgressMenu(this._originType,this._originID),null===(k=this._prefabMenu)||void 0===k||k.onPrefabLoaded.addOnce((k=>{this.onOpen.dispatch(k)}))}openFestivalAboutMenu(){var k;this._prefabMenu=_r.x.openFestivalAboutMenu(this._originType,this._originID),null===(k=this._prefabMenu)||void 0===k||k.onPrefabLoaded.addOnce((k=>{this.onOpen.dispatch(k)}))}updateViewedProgressMenu(){this._activePlayer.daily.viewedProgressMenu||(this._activePlayer.daily.viewedProgressMenu=!0,this._activePlayer.getDataAndClear(),this._activePlayer.forceSaveCharacter())}openFestivalStore(){var k;let B;switch(null===(k=this._weekendEvents.getActiveFestival())||void 0===k?void 0:k.type){case Zp.Q.Springfest:B=72;break;case Zp.Q.Summerfest:B=37;break;case Zp.Q.Pumpkinfest:B=14;break;case Zp.Q.Winterfest:B=15;break;case Zp.Q.StarlightFestival:B=13;break;case Zp.Q.MoonlightFestival:B=71;break;case Zp.Q.GenericFestival:B=70;break;default:j.RQr.createHandler("Could not find an About Menu prefab for the current active festival"),B=3}tt.q.instance.prodigy.open.store(B,void 0,void 0,{originType:ui.$N.ButtonClick})}openFestivalRoulette(k=0){var B,U;const F=null===(U=null===(B=this._weekendEvents.getFestivalConfig())||void 0===B?void 0:B.festivalDailyData)||void 0===U?void 0:U.festivalChestRouletteData;let G=[],j=[{type:"currency",ID:1,N:50}];F&&(G=this.processRewards(F[k].items),j=this.processRewards(F[k].fallbackItems)),tt.q.instance.prodigy.open.bossRewards(G,fi.N.FestivalChestRouletteSpin,Rt.l.FestivalChestRewardUI,void 0,j,void 0,void 0,void 0,void 0,{instanceId:this._activePlayer.daily.getFestivalInstanceName(),sourceType:li.C.FestivalBossLootWheel})}processRewards(k){return k.map((k=>Object.assign(Object.assign({},k),{isSecure:(0,Sr.p)(k.type,k.ID)}))).filter((k=>Jp.V.includes(k.type)||this._activePlayer.getItemCount(k.type,k.ID)<=0))}openFestivalPortalVideoPopup(k,B,U,F,G,$,H){var V,W,q,K;const z=tv.a.getMostRecentFeatureTimestamp(this._activePlayer,Object.keys(Qp));if(this._activePlayer.hasMembership()&&z>(null!==(W=null===(V=this._questManager.getCachedFestivalQuestData())||void 0===V?void 0:V.getStartDate())&&void 0!==W?W:0)){if(oh.A.isDefined(H))return void tt.q.instance.prodigy.open.prefabMenu({prefabID:H,isModal:!0});tt.q.instance.prodigy.world.it(k,B,U)}const Y=this._activePlayer.isPlayingAtSchool()||Qt.J.isDateWithinSchoolDayAndHours(new Date(Date.now()));let Q=Qp.PortalNonMemberHome;this._activePlayer.hasMembership()?Q=Qp.PortalMember:Y&&(Q=Qp.PortalNonMemberSchool);const X=null===(q=this._questManager.getCachedFestivalQuestData())||void 0===q?void 0:q.getVideoAsset(Q);if(!oh.A.isDefined(X))return void j.VyI.log(`No video asset defined for ${Q} when trying to open the portal video popup`,j.$bb.Error);const Z=ct.sample(Object.keys(X.data.videos));if(!oh.A.isDefined(Z))return void j.VyI.log("No video id defined when trying to open the portal video popup",j.$bb.Error);const J={type:us.B.FestivalPortalVideo,category:"festival",contentId:null,adType:Fs.R.Video};tt.q.instance.prodigy.open.prefabMenu({prefabID:Rt.l.FestivalPortalVideoPopup,runUpdate:!0,injectablePropertiesDictionary:{[hs.Ut.VideoId]:Z,[hs.Ut.VideoAtSchool]:Y,[hs.Ut.SupportedResolutionIds]:X.data.videos[Z].supportedResolutionIds,[hs.Ut.SizeRatio]:null===(K=X.metadata)||void 0===K?void 0:K.sizeRatio,[hs.Ut.VideoMember]:this._activePlayer.hasMembership(),[hs.Ut.FunnelStartTrigger]:J,[hs.V8.LoginDetailsUsername]:this._loggedInPlayer.loginCredentials.username,[hs.V8.LoginDetailsPassword]:this._loggedInPlayer.loginCredentials.password,[hs.Wr.HomeImageGuid]:$,[hs.Wr.MemberFollowupPrefabGuid]:H,[hs.Wr.MemberImageGuid]:F,[hs.Wr.OriginId]:this._originID,[hs.Wr.SchoolImageGuid]:G,[hs.Wr.TargetMapTag]:k,[hs.Wr.TargetPosition]:{x:B,y:U}}}),tv.a.saveTimestampData(Q)}destroy(){this.onOpen.dispose(),this._prefabMenu=void 0,super.destroy()}};var iv;(0,G.Cg)([(0,j.gfw)(ui.$N),(0,G.Sn)("design:type",String)],ev.prototype,"_originType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ev.prototype,"_originID",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ev.prototype,"onOpen",void 0),(0,G.Cg)([(0,Gi.b)("306-5359"),(0,G.Sn)("design:type",An.W)],ev.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,Gi.b)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],ev.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,Gi.b)("12b-405a"),(0,G.Sn)("design:type",Xp.n)],ev.prototype,"_weekendEvents",void 0),(0,G.Cg)([(0,Gi.b)("99d-5e9e"),(0,G.Sn)("design:type",Gp.q)],ev.prototype,"_questManager",void 0),ev=(0,G.Cg)([(0,j.EVk)("OpenFestivalMenu",W.Y.festival)],ev),function(k){k.Summerfest="summerfest",k.Springfest="springfest",k.Winterfest="winterfest",k.StarlightFestival="starlight-festival",k.Pumpkinfest="pumpkinfest-0"}(iv||(iv={}));let sv=class extends j.uAl{constructor(){super(...arguments),this.FESTIVAL_HUD_ICONS_MAP=new Map([[Zp.Q.Winterfest,iv.Winterfest],[Zp.Q.Springfest,iv.Springfest],[Zp.Q.Summerfest,iv.Summerfest],[Zp.Q.StarlightFestival,iv.StarlightFestival],[Zp.Q.Pumpkinfest,iv.Pumpkinfest],[Zp.Q.MoonlightFestival,iv.StarlightFestival],[Zp.Q.GenericFestival,iv.StarlightFestival]])}postCreate(){var k;let B;super.postCreate();{const U=null===(k=tt.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival())||void 0===k?void 0:k.type;if(!j.Aq$.isDefined(U))return;const F=this.FESTIVAL_HUD_ICONS_MAP.get(U);if(!j.Aq$.isDefined(F))return;B=F}this._upStateGraphic.updateAsset(Ve._.General_icons_hud_json,B),this._overStateGraphic.updateAsset(Ve._.General_icons_hud_json,B)}};(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],sv.prototype,"_upStateGraphic",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],sv.prototype,"_overStateGraphic",void 0),sv=(0,G.Cg)([(0,j.EVk)("SetFestivalHudIcon",W.Y.festival)],sv);let nv=class extends j.uAl{constructor(){super(...arguments),this.onFestivalActive=new j.HN0,this.onFestivalInactive=new j.HN0}create(){super.create(),this._runOnCreate&&this.processFestivalState()}processFestivalState(){const k=this._weekendEvents.getActiveFestival();oh.A.isDefined(k)?this._listenForSpecificFestival&&this._festivals.includes(k.type)?this.onFestivalActive.dispatch():this._listenForSpecificFestival?this.onFestivalInactive.dispatch():this.onFestivalActive.dispatch():this.onFestivalInactive.dispatch()}destroy(){this.onFestivalActive.dispose(),this.onFestivalInactive.dispose()}};(0,G.Cg)([(0,j.Cdj)("12b-405a"),(0,G.Sn)("design:type",Xp.n)],nv.prototype,"_weekendEvents",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nv.prototype,"onFestivalActive",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nv.prototype,"onFestivalInactive",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],nv.prototype,"_runOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],nv.prototype,"_listenForSpecificFestival",void 0),(0,G.Cg)([(0,j.gfw)(Zp.Q),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],nv.prototype,"_festivals",void 0),nv=(0,G.Cg)([(0,j.EVk)("FestivalListener",W.Y.festival)],nv);let av=class extends j.uAl{create(){super.create();{const k=[this._spineAnimator];this._animationController.setAnimationState(0,new Nn(k,"idle")),this._animationController.setAnimationState(1,new Nn(k,"walk"))}}destroy(){this._animationController=null,this._spineAnimator=null,super.destroy()}};(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],av.prototype,"_animationController",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],av.prototype,"_spineAnimator",void 0),av=(0,G.Cg)([(0,j.EVk)("SpineFollowAnimationStates",W.Y.follow)],av);let rv=class extends j.uAl{constructor(){super(...arguments),this._followSpine=null,this._followID=null}get followID(){return this._followID}create(){super.create(),null!==this._followID&&this._followSpine&&this.updateFollowSpine()}destroy(){this._followSpine=null,super.destroy()}setFollowID(k){this._followID=k,this.updateFollowSpine()}updateFollowSpine(){(0,ut.v)(null!==this._followID&&this._followID>0,"Invalid follow ID was loaded");const k=Yt.t.getItem("follow",this._followID).metadata.assets.default;(0,ut.v)("spine"===k.type,`Invalid spine follow data for ID: ${this._followID}`),this._followSpine.setAsset(`spine-${k.ID}`)}};(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],rv.prototype,"_followSpine",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],rv.prototype,"_followID",void 0),rv=(0,G.Cg)([(0,j.EVk)("SpineFollowAppearance",W.Y.follow)],rv);var ov=U(55800),hv=U(80573);let cv=class extends j.uAl{create(){super.create(),this._legacyFollowAppearance.onFollowLoaded.add(this.mapMorphedAppearanceData,this)}destroy(){this._legacyFollowAppearance.onFollowLoaded.remove(this.mapMorphedAppearanceData,this),super.destroy()}mapMorphedAppearanceData(){const k=this._legacyFollowAppearance.followParent;this._morphedAppearance.appearanceRenderComponent=k.findComponentInChildren(Za.B),this._morphedAppearance.animationController=k.findComponentInChildren(Rn.K)}};(0,G.Cg)([(0,j.MnK)(hv.n),(0,G.Sn)("design:type",hv.n)],cv.prototype,"_morphedAppearance",void 0),(0,G.Cg)([(0,j.MnK)(ov.a),(0,G.Sn)("design:type",ov.a)],cv.prototype,"_legacyFollowAppearance",void 0),cv=(0,G.Cg)([(0,j.EVk)("MorphedLegacyFollow",W.Y.follow)],cv);let dv=class extends j.uAl{create(){super.create(),this._legacyAppearanceLoader.onFollowLoaded.add(this.legacyAppearanceWasLoaded,this)}destroy(){this._legacyAppearanceLoader.onFollowLoaded.remove(this.legacyAppearanceWasLoaded,this),this._boundAnimationController&&(this._pathLocomotion.onPathStart.remove(this._boundAnimationController.changeState,this._boundAnimationController),this._pathLocomotion.onPathEnd.remove(this._boundAnimationController.changeState,this._boundAnimationController),this._boundAnimationController=null),this._legacyAppearanceLoader=null,this._pathLocomotion=null,super.destroy()}legacyAppearanceWasLoaded(){this._boundAnimationController=this._legacyAppearanceLoader.followParent.findComponentInChildren(Rn.K),(0,ut.v)(null!==this._boundAnimationController,"No animation controller found in follow prefab"),this._boundAnimationController.changeState(0),this._pathLocomotion.onPathStart.add(this._boundAnimationController.changeState,this._boundAnimationController,0,1),this._pathLocomotion.onPathEnd.add(this._boundAnimationController.changeState,this._boundAnimationController,0,0)}};(0,G.Cg)([(0,j.MnK)(ov.a),(0,G.Sn)("design:type",ov.a)],dv.prototype,"_legacyAppearanceLoader",void 0),(0,G.Cg)([(0,j.MnK)(j.KhP),(0,G.Sn)("design:type",j.KhP)],dv.prototype,"_pathLocomotion",void 0),dv=(0,G.Cg)([(0,j.EVk)("LegacyFollowAnimationBinding",W.Y.follow)],dv);class lv extends Mn{constructor(k,B){super(),this._animationData=null,this._animationTargets=null,this._bindPosition={},this._frameElapsedCache={},this._animationData=B,this._animationTargets=Object.assign({},k);const U=Object.keys(this._animationTargets),F=U.length;for(let G=0;GH.interval){const k=Math.floor(V.elapsed/H.interval);V.frame+=k,V.elapsed-=H.interval*k;const U=H.frames.length,F=U-1;if(this._animationData.loop){if(V.frame>F){const k=Math.floor(V.frame/U);V.frame-=k*U}}else V.frame>F&&(V.frame=F);this.updateGameObjectTargetProperty(B,j,H.frames[V.frame])}}}updateGameObjectTargetProperty(k,B,U){const F=this._animationTargets[k];switch((0,ut.v)(null!==F,"No animation target found for key frame animation"),B){case"x":{const B=F.transform;B.setPosition(this._bindPosition[k].position.x+U,B.localPosition.y);break}case"y":{const B=F.transform;B.setPosition(B.localPosition.x,this._bindPosition[k].position.y+U);break}case"xScale":{const k=F.transform;k.setScale(U,k.localScale.y);break}case"yScale":{const k=F.transform;k.setScale(k.localScale.x,U);break}case"angle":F.transform.setRotation(U);break;case"visible":F.active=U;break;case"frameName":F.findComponentInChildren(Ke._).setFrameName(U)}}isAnimationComplete(){const k=Object.keys(this._frameElapsedCache),B=k.length;for(let U=0;Uk.replace(B,U))))}}return F}}let fv=class extends uv{create(){super.create();const k=this.processAnimationData(U(88505),"{rodentTag}",this._rodentTag),B={body:this._rodentBody,legs:this._rodentLegs};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fv.prototype,"_rodentBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fv.prototype,"_rodentLegs",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],fv.prototype,"_rodentTag",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],fv.prototype,"_animationController",void 0),fv=(0,G.Cg)([(0,j.EVk)("RodentAnimationStates",W.Y.followAnimationState)],fv);let bv=class extends uv{create(){super.create();const k=this.processAnimationData(U(48687),"{catTag}",this._catTag),B={body:this._catBody,legs:this._catLegs,tail:this._catTail};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],bv.prototype,"_catBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],bv.prototype,"_catLegs",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],bv.prototype,"_catTail",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],bv.prototype,"_catTag",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],bv.prototype,"_animationController",void 0),bv=(0,G.Cg)([(0,j.EVk)("CatAnimationStates",W.Y.followAnimationState)],bv);let pv=class extends uv{create(){super.create();const k=this.processAnimationData(U(24625),"{dogTag}",this._dogTag),B={body:this._dogBody,legs:this._dogLegs,tail:this._dogTail};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],pv.prototype,"_dogBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],pv.prototype,"_dogLegs",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],pv.prototype,"_dogTail",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],pv.prototype,"_dogTag",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],pv.prototype,"_animationController",void 0),pv=(0,G.Cg)([(0,j.EVk)("DogAnimationStates",W.Y.followAnimationState)],pv);let vv=class extends uv{create(){super.create();const k=this.processAnimationData(U(77628),"{birdTag}",this._birdTag),B={body:this._birdBody};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],vv.prototype,"_birdBody",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],vv.prototype,"_birdTag",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],vv.prototype,"_animationController",void 0),vv=(0,G.Cg)([(0,j.EVk)("BirdAnimationStates",W.Y.followAnimationState)],vv);let gv=class extends uv{create(){super.create();const k=this.processAnimationData(U(22967),"{lizardTag}",this._lizardTag),B={body:this._lizardBody,head:this._lizardHead,tail:this._lizardTail};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gv.prototype,"_lizardBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gv.prototype,"_lizardHead",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gv.prototype,"_lizardTail",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],gv.prototype,"_lizardTag",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],gv.prototype,"_animationController",void 0),gv=(0,G.Cg)([(0,j.EVk)("LizardAnimationStates",W.Y.followAnimationState)],gv);let mv=class extends uv{create(){super.create();const k=this.processAnimationData(U(43081),"{turtleTag}",this._turtleTag),B={body:this._turtleBody,legs:this._turtleLegs};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],mv.prototype,"_turtleBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],mv.prototype,"_turtleLegs",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],mv.prototype,"_turtleTag",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],mv.prototype,"_animationController",void 0),mv=(0,G.Cg)([(0,j.EVk)("TurtleAnimationStates",W.Y.followAnimationState)],mv);let yv=class extends j.uAl{create(){super.create();const k=U(45221),B={body:this._reindeerBody,legs:this._reindeerLegs,tail:this._reindeerTail};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],yv.prototype,"_reindeerBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],yv.prototype,"_reindeerLegs",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],yv.prototype,"_reindeerTail",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],yv.prototype,"_animationController",void 0),yv=(0,G.Cg)([(0,j.EVk)("ReindeerAnimationStates",W.Y.followAnimationState)],yv);let _v=class extends j.uAl{create(){super.create();const k=U(11475),B={body:this._penguinBody,head:this._penguinHead};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_v.prototype,"_penguinBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_v.prototype,"_penguinHead",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],_v.prototype,"_animationController",void 0),_v=(0,G.Cg)([(0,j.EVk)("PenguinAnimationStates",W.Y.followAnimationState)],_v);let Ev=class extends j.uAl{create(){super.create();const k=U(35002),B={body:this._snowmanBody,head:this._snowmanHead};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ev.prototype,"_snowmanBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ev.prototype,"_snowmanHead",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Ev.prototype,"_animationController",void 0),Ev=(0,G.Cg)([(0,j.EVk)("SnowmanAnimationStates",W.Y.followAnimationState)],Ev);let wv=class extends j.uAl{create(){super.create();const k=U(67987),B={body:this._pandaBody};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],wv.prototype,"_pandaBody",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],wv.prototype,"_animationController",void 0),wv=(0,G.Cg)([(0,j.EVk)("PandaAnimationStates",W.Y.followAnimationState)],wv);let Tv=class extends j.uAl{create(){super.create();const k=U(43168),B={body:this._sheepBody,legs:this._sheepLegs};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Tv.prototype,"_sheepBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Tv.prototype,"_sheepLegs",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Tv.prototype,"_animationController",void 0),Tv=(0,G.Cg)([(0,j.EVk)("SheepAnimationStates",W.Y.followAnimationState)],Tv);let Sv=class extends j.uAl{create(){super.create();const k=U(60296),B={body:this._cactusBody,head:this._cactusFlower};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Sv.prototype,"_cactusBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Sv.prototype,"_cactusFlower",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Sv.prototype,"_animationController",void 0),Sv=(0,G.Cg)([(0,j.EVk)("CactusAnimationStates",W.Y.followAnimationState)],Sv);let Av=class extends j.uAl{create(){super.create();const k=U(85218),B={body:this._foxBody,legs:this._foxLegs,tail:this._foxTail};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Av.prototype,"_foxBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Av.prototype,"_foxLegs",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Av.prototype,"_foxTail",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Av.prototype,"_animationController",void 0),Av=(0,G.Cg)([(0,j.EVk)("FoxAnimationStates",W.Y.followAnimationState)],Av);let Cv=class extends j.uAl{create(){super.create();const k=U(98179),B={body:this._rodentBody};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cv.prototype,"_rodentBody",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Cv.prototype,"_animationController",void 0),Cv=(0,G.Cg)([(0,j.EVk)("SparkleRodentAnimationStates",W.Y.followAnimationState)],Cv);let Ov=class extends j.uAl{create(){super.create();const k=U(74109),B={body:this._catBody,legs:this._catLegs,tail:this._catTail};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ov.prototype,"_catBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ov.prototype,"_catLegs",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ov.prototype,"_catTail",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Ov.prototype,"_animationController",void 0),Ov=(0,G.Cg)([(0,j.EVk)("SparkleCatAnimationStates",W.Y.followAnimationState)],Ov);let Iv=class extends j.uAl{create(){super.create();const k=U(67131),B={body:this._dogBody,legs:this._dogLegs,tail:this._dogTail};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Iv.prototype,"_dogBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Iv.prototype,"_dogLegs",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Iv.prototype,"_dogTail",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Iv.prototype,"_animationController",void 0),Iv=(0,G.Cg)([(0,j.EVk)("SparkleDogAnimationStates",W.Y.followAnimationState)],Iv);let Dv=class extends uv{create(){super.create();const k=U(57131),B={body:this._lizardBody,head:this._lizardHead,tail:this._lizardTail};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Dv.prototype,"_lizardBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Dv.prototype,"_lizardHead",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Dv.prototype,"_lizardTail",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Dv.prototype,"_animationController",void 0),Dv=(0,G.Cg)([(0,j.EVk)("FireLizardAnimationStates",W.Y.followAnimationState)],Dv);let Rv=class extends j.uAl{constructor(){super(...arguments),this._lastKnownFollowID=null,this._lastKnownPetTeam=null}create(){super.create(),this.checkFollowUpdates=this.checkFollowUpdates.bind(this),this._lastKnownFollowID=this._currentPlayer.player.equipment.getFollow(),this._lastKnownPetTeam=this._currentPlayer.player.kennel.getPetTeamIDs();const k=tt.q.instance.game.broadcaster;k.addAppListener(jn.J8.PlayerEditingMenuClosed,this.checkFollowUpdates,this),k.addAppListener(jn.J8.PlayerAppearanceUpdated,this.checkFollowUpdates,this)}destroy(){const k=tt.q.instance.game.broadcaster;k.removeAppListener(jn.J8.PlayerEditingMenuClosed,this),k.removeAppListener(jn.J8.PlayerAppearanceUpdated,this),this._playerFollowLoader=null,super.destroy()}checkFollowUpdates(){let k=!1;const B=this._currentPlayer.player.equipment.getFollow();B!==this._lastKnownFollowID&&(k=!0);const U=this._currentPlayer.player.kennel.getPetTeamIDs();if(!k){const B=U.length;if(B!==this._lastKnownPetTeam.length)k=!0;else for(let F=0;F0,G="prodigy"===B.userDataPlatform,j=U.getValue("showClassCodeOnLogin",!1)&&!this.isClassCodeUpdateOnCooldown(),$=U.getValue("showClassCodeOnLoginIfNotInAClass",!1)&&!F,H=null===(k=U.getClassCodePromptCurriculumBlacklist())||void 0===k?void 0:k.includes(B.educationData.curriculumTreeID),V=(j||$)&&G&&!H;this.showClassCodeScreen(V,F)}isClassCodeUpdateOnCooldown(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!j.Aq$.isDefined(k.data.classCodeUpdateTimestamp))return!1;const B=new Date(k.data.classCodeUpdateTimestamp).getFullYear(),U=new Date(k.data.classCodeUpdateTimestamp).getMonth(),F=new Date(k.data.classCodeUpdateTimestamp).getDate();let G;G=U>xv.b.CLASSCODE_COOLDOWN_MONTH||U===xv.b.CLASSCODE_COOLDOWN_MONTH&&F>=xv.b.CLASSCODE_COOLDOWN_DATE?new Date(B+1,xv.b.CLASSCODE_COOLDOWN_MONTH,xv.b.CLASSCODE_COOLDOWN_DATE):new Date(B,xv.b.CLASSCODE_COOLDOWN_MONTH,xv.b.CLASSCODE_COOLDOWN_DATE);const $=G.getTime();return Date.now()<$}showClassCodeScreen(k,B){const U=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(k&&(!j.Aq$.isDefined(U.data.classCodeUpdateTimestamp)&&B&&(U.data.classCodeUpdateTimestamp=Date.now()-31536e6,U.updated=!0),this.updateButton.onClick.add(this.showClassCodeDialog.bind(this)),this.setClassCodeMenuActive(!0)),j.Aq$.isDefined(U.owners))for(let F=0;F=Mv.CLASS_CODE_CHECK_DATE)return void this.setNextButtonHandGuideActive(!0)}}showClassCodeDialog(){tt.q.instance.prodigy.open.prefabMenu(Rt.l.ClassCodePopup,void 0,void 0,void 0,void 0,{[hs.iu.ClassCodeSubmitSuccess]:this.setClassCodeMenuActive.bind(this,!1)})}setClassCodeMenuActive(k){this._classCodeContainer.active=k}setNextButtonHandGuideActive(k){this._nextButtonHandGuideContainer.active=k}};Lv.CLASS_CODE_CHECK_DATE=143801786e4,(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Lv.prototype,"_classCodeContainer",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Lv.prototype,"updateButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Lv.prototype,"_nextButtonHandGuideContainer",void 0),(0,G.Cg)([(0,j.Cdj)("2a1-fed9"),(0,G.Sn)("design:type",Nv.U)],Lv.prototype,"_metricsManager",void 0),Lv=Mv=(0,G.Cg)([(0,j.EVk)("CharacterSelectScreenManager",W.Y.uiDialog)],Lv);U(4035),U(32259);let kv=class extends j.uAl{constructor(){super(...arguments),this._dialogueIds=[],this._finalButtonLocalizationKey=null,this.onDialogueAdvanced=new j.HN0,this.onDialogueClosed=new j.HN0,this._blockInputDuringDialogue=!0,this.reenableInputOnClose=!0,this.clearExistingDialogue=!0}start(){this._dialogueIds.forEach(((k,B)=>{this._dialogueEventController.addEvents([{dialogueData:this._dialogueEventController.dataProvider.get(k),blockInput:this._blockInputDuringDialogue,nextButtonText:this._finalButtonLocalizationKey&&B===this._dialogueIds.length-1?tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(this._finalButtonLocalizationKey):null}])})),this._dialogueEventController.onAdvance.add(this.onDialogueAdvanced.dispatch,this.onDialogueAdvanced),this._dialogueEventController.start(!0,(()=>{this.onDialogueClosed.dispatch(),this._dialogueEventController.onAdvance.remove(this.onDialogueAdvanced.dispatch,this.onDialogueAdvanced)}),this.reenableInputOnClose,this.clearExistingDialogue)}setDialogueIds(k){this._dialogueIds=Array.isArray(k)?k:[k]}destroy(){this.onDialogueClosed.dispose(),this.onDialogueAdvanced.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("b5b-6fa4"),(0,G.Sn)("design:type",mi.rD)],kv.prototype,"_dialogueEventController",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.g11)(),(0,G.Sn)("design:type",Array)],kv.prototype,"_dialogueIds",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],kv.prototype,"_finalButtonLocalizationKey",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],kv.prototype,"onDialogueAdvanced",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],kv.prototype,"onDialogueClosed",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],kv.prototype,"_blockInputDuringDialogue",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],kv.prototype,"reenableInputOnClose",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],kv.prototype,"clearExistingDialogue",void 0),kv=(0,G.Cg)([(0,j.EVk)("DialogueEventController",W.Y.uiDialog)],kv);let Bv=class extends j.uAl{constructor(){super(...arguments),this._tooltipSchema={bodyText:""},this.onComplete=new j.HN0}displayTooltip(){const k=tt.q.instance.prodigy.open.overlayToolTip(on.A.TOOLTIP_SPEECH,{bodyText:this._displayText.localizedText.text,xPosition:this._tooltipSchema.xPosition,yPosition:this._tooltipSchema.yPosition,arrowXRelPos:this._tooltipSchema.arrowXRelPos,arrowYRelPos:this._tooltipSchema.arrowYRelPos,arrowDirection:parseInt(this._tooltipSchema.arrowDirection)});this._onCompleteHandler=()=>{this.onComplete.dispatch()},k.onDismissalClick.add(this._onCompleteHandler,this)}destroy(){this.onComplete.dispose(),this._onCompleteHandler=null,super.destroy()}};(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],Bv.prototype,"_displayText",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],Bv.prototype,"_tooltipSchema",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Bv.prototype,"onComplete",void 0),Bv=(0,G.Cg)([(0,j.EVk)("DisplayTooltipOverlay",W.Y.uiDialog)],Bv);var Uv=U(89067);class Fv extends j.uAl{constructor(){super(...arguments),this.onAnimationEnded=new j.HN0,this.onAnimationStarted=new j.HN0}create(){super.create(),this._broadcaster=tt.q.instance.game.broadcaster}animate(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this.hudButtonType();this.onAnimationStarted.dispatch(!0),this._broadcaster.broadcast(jn.Y1.HUDAttentionManagerUpdated,void 0,[k,!0,void 0])}))}createWidget(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=!1){const U=this.hudButtonType();this._broadcaster.broadcast(jn.Y1.HUDAttentionManagerUpdated,void 0,[U,B,k])}))}destroy(){this.onAnimationEnded.dispose(),this.onAnimationStarted.dispose(),super.destroy()}}(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Fv.prototype,"onAnimationEnded",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Fv.prototype,"onAnimationStarted",void 0);let Gv=class extends Fv{constructor(){super(...arguments),this._hudButtonType=Uv.ts.AfterSchoolWidget}needsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){return tt.q.instance.prodigy.gameContainer.get("e94-c727").isFtueAvailable()}))}highlightButton(){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.game.broadcaster.broadcast(jn.Y1.HUDRevampButtonAttentionGranted,void 0,[this._hudButtonType]),yield this.animate()}))}hudButtonType(){return this._hudButtonType}triggerAction(k){return(0,G.sH)(this,void 0,void 0,(function*(){yield k()}))}};Gv=(0,G.Cg)([(0,j.EVk)("HudAfterSchoolWidget",W.Y.uiHudManager)],Gv);var jv,$v=U(96703),Hv=U(85985),Vv=U(41012),Wv=U(29546);function qv(){const k=tt.q.instance.prodigy,B=k.world.getZone(k.world.getCurrentZone()).screen,U=k.gameContainer.get("306-5359"),F=null==B?void 0:B.saveTag.split("-").pop();return U.userID.toString()===F}function Kv(k){const B=tt.q.instance.prodigy;B.gameContainer.get("306-5359").setAllowsHouseVisitors(k),B.open.messageBoxPrefab({text:k?"HOUSE_VISITING_UNLOCKED":"HOUSE_VISITING_LOCKED"}),tt.q.instance.game.broadcaster.broadcast(jn.Y1.HUDRevampButtonVisibilityRefreshRequested)}class zv{static openAndWait(k){return(0,G.sH)(this,void 0,void 0,(function*(){return new Promise((B=>k(B)))}))}static openWizardBank(){(0,Bt.G)(qt.d).enabled?tt.q.instance.prodigy.open.openWizardBank({originType:ui.$N.ButtonClick,originId:Is.k.MemberHudButton}):this.openMLP()}static openMLP(){const k=this._activePlayer.getMemberTier();if(k===xs._$.MemberUltra)return;if(!Gs.pF.eligibleForMembershipPurchaseForMultipleTiers()&&(k===xs._$.MemberPlus||k===xs._$.MemberUltimateMath))return;this._segment.purchase.sendFunnelStart({type:"Click-HUD-Button",category:"HUD",contentId:tt.q.instance.prodigy.world.getCurrentMap(),adType:Fs.R.UnifiedConversionFlow,adVersion:Us.P.getAdVersionFromTriggerCategory("HUD")});tt.q.instance.prodigy.open.unifiedConversionFlow(void 0,{conversionFunnelName:"Click-HUD-Button"})||tt.q.instance.prodigy.open.battlePassUltimateMemberUpsellModal().catch(j.RQr.createHandler("HUDMembershipButtonComponent: Could not open MLP."))}static openDailyLoginCalendar(k){tt.q.instance.prodigy.open.dailyLoginCalendar().catch(j.RQr.createHandler("HudButtonUtils: Could not open Daily Login Calendar")).finally(k)}static openChat(){const k=tt.q.instance.game,B=tt.q.instance.prodigy;k.broadcaster.broadcast(jn.Y1.HideHUD,jn.HG.HUD),B.open.chat(k.broadcaster.broadcast.bind(k.broadcaster,jn.Y1.ShowHUD,jn.HG.HUD))}static areVisibilityConditionsTrue(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U;const F=null!==(U=null===(B=jv.BUTTON_DATA[k])||void 0===B?void 0:B.visibilityConditions)&&void 0!==U?U:[Uv.qe.Always],j=yield Promise.all(F.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return this.isHudButtonConditionMet(k)})))));return F.every(((k,B)=>!0===j[B]))}))}static getButtonEnabledConditionsResult(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U;const F=null!==(U=null===(B=jv.BUTTON_DATA[k])||void 0===B?void 0:B.enabledConditions)&&void 0!==U?U:[Uv.qe.Always],j=yield Promise.all(F.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return this.isHudButtonConditionMet(k)}))))),$=F.filter(((k,B)=>!j[B]));return[0===$.length,$]}))}static isHudButtonConditionMet(k){return(0,G.sH)(this,void 0,void 0,(function*(){switch(k){case Uv.qe.AtHome:{const k=tt.q.instance.game.state.get(Tt.G.TileScreen);return oh.A.isDefined(null==k?void 0:k.zoneName)&&mc.P.isHouse(k.zoneName)&&qv()}case Uv.qe.AtAnotherHome:{const k=tt.q.instance.game.state.get(Tt.G.TileScreen);return oh.A.isDefined(null==k?void 0:k.zoneName)&&mc.P.isHouse(k.zoneName)&&!qv()}case Uv.qe.NotHome:{const k=tt.q.instance.game.state.get(Tt.G.TileScreen);return oh.A.isDefined(null==k?void 0:k.zoneName)&&!mc.P.isHouse(k.zoneName)}case Uv.qe.HomeVisitsAllowed:return this._activePlayer.getAllowsHouseVisitors();case Uv.qe.HomeVisitsNotAllowed:return!this._activePlayer.getAllowsHouseVisitors();case Uv.qe.NonMember:return this._activePlayer.getMemberTier()===xs._$.NonMember;case Uv.qe.CoreMember:{const k=this._activePlayer.getMemberTier();return k===xs._$.MemberCore||k===xs._$.MemberLevelUp}case Uv.qe.PlusMember:{const k=this._activePlayer.getMemberTier();return k===xs._$.MemberPlus||k===xs._$.MemberUltimateMath}case Uv.qe.UltraMember:{const k=this._activePlayer.getMemberTier();return k===xs._$.MemberUltra||k===xs._$.MemberUltimateBundle}case Uv.qe.FestivalActive:return oh.A.isDefined(tt.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig());case Uv.qe.FestivalUnlocked:return tt.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirements(69);case Uv.qe.ValidStateChallenge:return tt.q.instance.prodigy.gameContainer.get("a94-4ba3").isFeatureAvailable();case Uv.qe.StateChallengeActiveOrCanCollectRewards:return tt.q.instance.prodigy.gameContainer.get("a94-4ba3").hasActiveChallengeOrRewards();case Uv.qe.AfterSchoolWidgetEnabled:return!0===(0,Bt.G)($v.K).enabled;case Uv.qe.DailyLoginCalendarEnabled:return Hv.J.showDailyLoginCalendar();case Uv.qe.DailyLoginCalendarUnlocked:return cr.M.hasDailyLoginCalendarAccess();case Uv.qe.WizardWatchUnlocked:return Vv.e.hasWizardWatchAccess();case Uv.qe.PlayerGoalsEnabled:return!(0,Bt.G)(Zr.d3).enabled;case Uv.qe.TreasureTrackUnlocked:return yn.n.hasBattlePassAccess();case Uv.qe.EnglishOnly:return It.O.isEnglishLocale();case Uv.qe.Always:default:return!0}}))}static getDisabledTooltipText(k,B){const U=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);switch(B[0]){case Uv.qe.TreasureTrackUnlocked:{const F=this.getValueForFeatureRequirement(k,B);return oh.A.isDefined(F)?U.getText("REACH_LEVEL_X_TO_UNLOCK",F):U.getText("HUD_BUTTON_UNAVAILABLE")}case Uv.qe.FestivalUnlocked:{const F=this.getValueForFeatureRequirement(k,B),G=tt.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig();if(oh.A.isDefined(F)&&oh.A.isDefined(G)){const k=U.getText(G.tintableBanner.titleText);return U.getText("FESTIVAL_UNLOCKS_AT_LEVEL",k,F)}return U.getText("HUD_BUTTON_UNAVAILABLE")}default:return U.getText("HUD_BUTTON_UNAVAILABLE")}}static getDisabledButtonLabelText(k,B){const U=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);switch(B[0]){case Uv.qe.TreasureTrackUnlocked:case Uv.qe.FestivalUnlocked:{const F=this.getValueForFeatureRequirement(k,B);return oh.A.isDefined(F)?U.getText("LEVEL_X",F):U.getText("ITEMCARD_LOCKED")}default:return U.getText("ITEMCARD_LOCKED")}}static getValueForFeatureRequirement(k,B){switch(B[0]){case Uv.qe.TreasureTrackUnlocked:return Wv.X.getLevelRequirement(70);case Uv.qe.FestivalUnlocked:return Wv.X.getLevelRequirement(69);default:return}}static getButtonTooltipDirection(k){switch(k){case Uv.yR.Liveops:return ze.i.RIGHT;default:return ze.i.DOWN}}}jv=zv,zv.BUTTON_DATA={[Uv.ts.AfterSchoolWidget]:{iconProvider:k=>"a4b76834-dd0e-49df-984a-d33fe014f383",onClick:()=>{tt.q.instance.prodigy.gameContainer.get("e94-c727").openAfterSchoolWidgetRewardsScreenFromHud()},buttonSize:Uv.Cy.Normal,visibilityConditions:[Uv.qe.AfterSchoolWidgetEnabled],analyticsProperties:{interfaceName:us.B.HUD,buttonName:"after-school-widget-button",destinationName:"after_school_widget_rewards_screen"}},[Uv.ts.Backpack]:{iconProvider:k=>"932d246b-c406-4781-81dc-f4761ceb97b9",onClick:()=>{tt.q.instance.prodigy.open.backpack()},visibilityConditions:[Uv.qe.NotHome],analyticsProperties:{buttonName:"backpack-button"}},[Uv.ts.Chat]:{iconProvider:k=>"097bf81a-9354-4837-a7fd-5d07463e8809",onClick:()=>jv.openChat(),analyticsProperties:{buttonName:"chat-button"}},[Uv.ts.Challenges]:{iconProvider:k=>"123a9839-b689-4fa8-bf6c-4cb850c18ec6",onClick:()=>tt.q.instance.prodigy.open.social(),visibilityConditions:[Uv.qe.NotHome,Uv.qe.EnglishOnly],analyticsProperties:{buttonName:"social-button",destinationName:"social_screen"}},[Uv.ts.CoreMember]:{iconProvider:k=>"5c233329-4c2d-4589-a7b5-be79087e7e16",onClick:()=>jv.openWizardBank(),visibilityConditions:[Uv.qe.CoreMember],buttonSize:Uv.Cy.Large,analyticsProperties:{buttonName:"member-button",destinationName:()=>(0,Bt.G)(qt.d).enabled?us.B.WizardBank:"",saveClickInfo:Is.k.MemberHudButton}},[Uv.ts.Duels]:{iconProvider:k=>"c67d47dd-322d-45eb-b3dd-175bf71e53ef",analyticsProperties:{buttonName:"duels-button"}},[Uv.ts.Festival]:{iconProvider:k=>tt.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalIcon(),onClick:()=>(0,G.sH)(void 0,void 0,void 0,(function*(){return jv.openAndWait(_r.x.openFestivalProgressMenu.bind(_r.x,ui.$N.ButtonClick,Is.k.Festival))})),visibilityConditions:[Uv.qe.FestivalActive],enabledConditions:[Uv.qe.FestivalUnlocked],analyticsProperties:{buttonName:Is.k.Festival,destinationName:us.B.FestivalProgressionWindow,saveClickInfo:Is.k.Festival}},[Uv.ts.FriendsList]:{iconProvider:k=>"ab57214a-ee29-4af9-bff7-a9b5c133e730",onClick:()=>{tt.q.instance.prodigy.open.friendsList()},analyticsProperties:{buttonName:"friend-button"}},[Uv.ts.Hamburger]:{iconProvider:k=>"b074e226-1fa6-4f14-bbf2-8668776b21ac",analyticsProperties:{buttonName:"hamburger-button"}},[Uv.ts.HouseEdit]:{iconProvider:k=>"a088c398-06c5-4899-87d0-a72bbd2f454d",onClick:()=>tt.q.instance.game.broadcaster.broadcast(jn.F0.OpenEditor),visibilityConditions:[Uv.qe.AtHome],analyticsProperties:{buttonName:"house-edit-button"}},[Uv.ts.HouseLocked]:{iconProvider:k=>"ea98ef3c-7d8d-4a99-8edc-47bcabd72052",onClick:()=>Kv(!0),visibilityConditions:[Uv.qe.AtHome,Uv.qe.HomeVisitsNotAllowed],analyticsProperties:{buttonName:"house-unlock-button"}},[Uv.ts.HouseReport]:{iconProvider:k=>"decfb13a-a7ee-4d42-82aa-b3a41cd29741",onClick:()=>{Vl.y.openReportHouseConfirmationDialog()},visibilityConditions:[Uv.qe.AtAnotherHome],analyticsProperties:{buttonName:"house-report-button"}},[Uv.ts.HouseUnlocked]:{iconProvider:k=>"23550ac0-65c3-423c-b94f-5b24175b436e",onClick:()=>Kv(!1),visibilityConditions:[Uv.qe.AtHome,Uv.qe.HomeVisitsAllowed],analyticsProperties:{buttonName:"house-lock-button"}},[Uv.ts.HouseUpgrade]:{iconProvider:k=>"2949c8c6-3d9c-4bef-b434-d9d75dfab75b",onClick:()=>tt.q.instance.prodigy.world.getZone(Ft.A_.HOUSE).openHouseStore(),visibilityConditions:[Uv.qe.AtHome],analyticsProperties:{buttonName:"house-upgrade-button"}},[Uv.ts.LoginRewards]:{iconProvider:k=>k===Uv.yR.Liveops?"b5db5845-13c6-4ec1-92cb-e81cd3b1e8ad":"a62096ab-ae16-4cc4-bf92-2dfeaad9e1f6",onClick:()=>(0,G.sH)(void 0,void 0,void 0,(function*(){return jv.openAndWait(jv.openDailyLoginCalendar)})),analyticsProperties:{buttonName:"daily-login-calendar-launch-button",destinationName:"daily_login_calendar_main"},visibilityConditions:[Uv.qe.DailyLoginCalendarEnabled],enabledConditions:[Uv.qe.DailyLoginCalendarUnlocked]},[Uv.ts.Map]:{iconProvider:k=>"6b825a7e-fe52-4bb5-82f0-cd1b448b4eb0",onClick:()=>{const{demandsExclusiveAttention:k}=tt.q.instance.prodigy.gameContainer.get("cc9-a3f0").getCachedButtonData(Uv.ts.Map);tt.q.instance.prodigy.open.map({disableClose:k,disableZoneGoals:k,disableDifficultyModeSelect:k})},analyticsProperties:{buttonName:"map-button",destinationName:"map_screen"}},[Uv.ts.NonMember]:{iconProvider:k=>"66eec2c1-e4df-409c-8a68-7c581ce2bb05",onClick:()=>jv.openWizardBank(),visibilityConditions:[Uv.qe.NonMember],buttonSize:Uv.Cy.Large,analyticsProperties:{buttonName:"member-button",destinationName:()=>(0,Bt.G)(qt.d).enabled?us.B.WizardBank:"",saveClickInfo:Is.k.MemberHudButton}},[Uv.ts.Pets]:{iconProvider:k=>"2bd3e716-979f-4018-8407-d959230736fb",onClick:()=>{tt.q.instance.prodigy.open.pets()},visibilityConditions:[Uv.qe.NotHome],analyticsProperties:{buttonName:"pets-button",destinationName:"pet_book_window",interfaceName:"pet_book_window"}},[Uv.ts.PlusMember]:{iconProvider:k=>"5a68a494-0005-4063-b9ac-826a6b005dad",onClick:()=>jv.openWizardBank(),visibilityConditions:[Uv.qe.PlusMember],buttonSize:Uv.Cy.Large,analyticsProperties:{buttonName:"member-button",destinationName:()=>(0,Bt.G)(qt.d).enabled?us.B.WizardBank:"",saveClickInfo:Is.k.MemberHudButton}},[Uv.ts.Rifts]:{iconProvider:k=>"7c85a67b-dd5f-441d-a988-63a9fc186f58",analyticsProperties:{buttonName:"rifts-button"}},[Uv.ts.Settings]:{iconProvider:k=>"234ca838-35f1-49fe-82f2-bf382624537d",onClick:()=>tt.q.instance.prodigy.open.optionsMenu(),analyticsProperties:{buttonName:"options-button"}},[Uv.ts.Shop]:{iconProvider:k=>"d4dc7070-8a0c-47ba-a2ad-36de33ab6531",onClick:()=>tt.q.instance.prodigy.open.dynamicStore({origin:{originType:ui.$N.ButtonClick,originId:"unifiedStore-button"}}),visibilityConditions:[Uv.qe.NotHome],buttonSize:Uv.Cy.ExtraLarge,analyticsProperties:{buttonName:"unifiedStore-button",destinationName:"unified_store_main"}},[Uv.ts.StateChallenges]:{iconProvider:k=>"60c5cf92-41a2-41d9-bbff-93803d411c63",visibilityConditions:[Uv.qe.ValidStateChallenge,Uv.qe.StateChallengeActiveOrCanCollectRewards],onClick:()=>{tt.q.instance.prodigy.open.prefabMenu(Rt.l.StateChallengesMenu)},analyticsProperties:{buttonName:"state-challenges-button",destinationName:"prodigy_challenge"}},[Uv.ts.TreasureTrack]:{iconProvider:k=>k===Uv.yR.Liveops?"5164fbfe-17ee-4def-9157-678de69a623a":"aa6673a2-b225-4046-be6e-df593a578be9",onClick:()=>(0,G.sH)(void 0,void 0,void 0,(function*(){const k=tt.q.instance.prodigy.open.battlePassMenu();yield k.onPrefabLoaded.asPromise()})),visibilityConditions:[Uv.qe.NotHome],enabledConditions:[Uv.qe.TreasureTrackUnlocked],analyticsProperties:{buttonName:"treasureTrackHud-button",destinationName:"treasure_track_main"}},[Uv.ts.UltraMember]:{iconProvider:k=>"5991c63f-4d9b-459a-9cb6-317bff008268",visibilityConditions:[Uv.qe.UltraMember],onClick:()=>jv.openWizardBank(),buttonSize:Uv.Cy.Large,analyticsProperties:{buttonName:"member-button",destinationName:()=>(0,Bt.G)(qt.d).enabled?us.B.WizardBank:"",saveClickInfo:Is.k.MemberHudButton}},[Uv.ts.WizardDash]:{iconProvider:k=>"db3fe015-bc76-4737-8550-68bce8ec631c",onClick:()=>tt.q.instance.prodigy.open.lootDashMenu(),visibilityConditions:[Uv.qe.NotHome,Uv.qe.EnglishOnly],analyticsProperties:{buttonName:"wizardDashHud-button",destinationName:"wizard_dash_lobby"}},[Uv.ts.WizardWatch]:{iconProvider:k=>"dea91059-3077-4589-9dcc-47b227862a7a",onClick:()=>{tt.q.instance.prodigy.open.socialFeed(void 0,"from-menu")},analyticsProperties:{buttonName:"feed-button"},visibilityConditions:[Uv.qe.EnglishOnly],enabledConditions:[Uv.qe.WizardWatchUnlocked]},[Uv.ts.YourGoals]:{iconProvider:k=>k===Uv.yR.Liveops?"922ac122-1c06-45c0-89e8-452b7474ca3a":"eb9a2046-45c3-4f78-a6ae-71df128c85ce",onClick:()=>(0,G.sH)(void 0,void 0,void 0,(function*(){return jv.openAndWait(tt.q.instance.prodigy.open.prefabMenu.bind(tt.q.instance.prodigy.open,Rt.l.FtuePlayerGoals))})),analyticsProperties:{buttonName:"player_goals"},visibilityConditions:[Uv.qe.PlayerGoalsEnabled]},[Uv.ts.YourMail]:{iconProvider:k=>"371de630-5798-45cf-a7c4-50a713c7f1a3",onClick:()=>{tt.q.instance.prodigy.open.mailer()},analyticsProperties:{buttonName:"mail-button"}},[Uv.ts.WizardCostumes]:{iconProvider:k=>"",analyticsProperties:{buttonName:Is.k.CostumesHudButton,destinationName:us.B.WizardCostumesMenu,saveClickInfo:Is.k.CostumesHudButton}}},(0,G.Cg)([(0,Gi.b)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],zv,"_segment",void 0),(0,G.Cg)([(0,Gi.b)("306-5359"),(0,G.Sn)("design:type",An.W)],zv,"_activePlayer",void 0);let Yv=class extends j.uAl{constructor(){super(...arguments),this._hudButtons=[],this._currentHudButton=null}get hudButtons(){return this._hudButtons}get currentHudButton(){return this._currentHudButton}create(){super.create(),this._broadcaster=tt.q.instance.game.broadcaster,this._broadcaster.addAppListener(jn.Y1.CheckForHUDAttention,this.checkIfNextHudButtonNeedsAttention,this)}destroy(){super.destroy(),this._broadcaster.removeAppListener(jn.Y1.CheckForHUDAttention,this)}onEnable(){var k,B;super.onEnable(),this._currentHudButton=null,null!==(B=null===(k=this.gameObject)||void 0===k?void 0:k.isDestroyed)&&void 0!==B&&!B&&this.checkOnEnable()&&this.checkIfNextHudButtonNeedsAttention().catch(j.RQr.createHandler("Error showing HUD attention"))}checkOnEnable(){var k,B;if(null!==(B=null===(k=j.wa5.getActiveScene())||void 0===k?void 0:k.container.get("IS_PREFAB_MAP"))&&void 0!==B&&B)return this._popupManager.popupsProcessed;{const k=tt.q.instance.game.state.get(Tt.G.TileScreen);return null==k?void 0:k.popupsProcessed}}checkIfNextHudButtonNeedsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this.Active&&Kt.A.get("GameConstants.Debug.POPUPS_ENABLED")&&!tt.q.instance.prodigy.notifications.isPaused())try{let k;tt.q.instance.game.input.enabled=!1;for(const B of this._hudButtons){const[[U],F]=yield Promise.all([zv.getButtonEnabledConditionsResult(B.hudButtonType()),B.needsAttention()]);if(U&&F){if(this._currentHudButton&&this._currentHudButton===B)continue;k=B;break}}k&&(this._currentHudButton=k,yield k.highlightButton())}finally{tt.q.instance.game.input.enabled=!0}}))}};(0,G.Cg)([(0,j.Cdj)("PopupHandler"),(0,G.Sn)("design:type",el.Y)],Yv.prototype,"_popupManager",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Fv),(0,G.Sn)("design:type",Array)],Yv.prototype,"_hudButtons",void 0),Yv=(0,G.Cg)([(0,j.EVk)("HudAttentionManagerHandler",W.Y.uiPopup)],Yv);var Qv=U(17740);let Xv=class extends Fv{constructor(){super(...arguments),this._hudButtonType=Uv.ts.Festival}needsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=tt.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig();if(this._currentFestival=tt.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival(),!k||!this._currentFestival)return!1;const B=this.checkIfFestivalAboutToEnd(this._currentFestival);return!this.hasCurrentFestivalBeenSeen(B)}))}highlightButton(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.animate()}))}hudButtonType(){return this._hudButtonType}triggerAction(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;null!==(B=this._festivalTravelModalEnabled)&&void 0!==B||(this._festivalTravelModalEnabled=(0,Bt.G)(Qv.t)),this._festivalTravelModalEnabled&&tt.q.instance.prodigy.world.getCurrentZone()!==Ft.A_.LAMPLIGHT&&!this.hasCurrentFestivalBeenSeen()?(this.updateFestivalSeenFlag(),_r.x.openTravelModal(ui.$N.HudClick)):(this.updateFestivalSeenFlag(),yield k())}))}checkIfFestivalAboutToEnd(k){if(!k)return!1;const B=Date.now();return new Date(k.endDate).getTime()-B<=1728e5}updateFestivalSeenFlag(){var k,B;if(!this._currentFestival)return;const U=tt.q.instance.prodigy.gameContainer.get("306-5359");null!==(k=(B=U.data).hudAttentionSeenFlags)&&void 0!==k||(B.hudAttentionSeenFlags={});const F=this.checkIfFestivalAboutToEnd(this._currentFestival);U.data.hudAttentionSeenFlags[Uv.ts.Festival]={identifier:F?`${this._currentFestival.type}-expiring`:String(this._currentFestival.type)}}hasCurrentFestivalBeenSeen(k){var B;if(!this._currentFestival)return!1;const U=(null!==(B=tt.q.instance.prodigy.gameContainer.get("306-5359").data.hudAttentionSeenFlags)&&void 0!==B?B:{})[Uv.ts.Festival];return!!j.Aq$.isDefined(null==U?void 0:U.identifier)&&(k?U.identifier===`${this._currentFestival.type}-expiring`:U.identifier===String(this._currentFestival.type))}destroy(){tt.q.instance.game.broadcaster.removeAppListener(jn.bI.FtueCompleted,this),super.destroy()}};Xv=(0,G.Cg)([(0,j.EVk)("HudFestival",W.Y.uiHudManager)],Xv);let Zv=class extends Fv{constructor(){super(...arguments),this._hudButtonType=Uv.ts.Pets}needsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){return td.I.shouldShowPetGearTutorial()}))}highlightButton(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.animate()}))}hudButtonType(){return this._hudButtonType}triggerAction(){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.game.broadcaster.addAppListener(jn.bI.FtueCompleted,(()=>{}),this),tt.q.instance.game.broadcaster.broadcast(jn.bI.ReceivedPetGear)}))}destroy(){tt.q.instance.game.broadcaster.removeAppListener(jn.bI.FtueCompleted,this),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("OnHudLoadedSignal"),(0,G.Sn)("design:type",ql.S)],Zv.prototype,"_onHudLoaded",void 0),Zv=(0,G.Cg)([(0,j.EVk)("HudPetGearPopup",W.Y.uiHudManager)],Zv);var Jv,tg=U(50788),eg=U(11848),ig=U(215),sg=U(19690);!function(k){k.Image1="IMAGE_1",k.Image2="IMAGE_2",k.Image3="IMAGE_3",k.Image4="IMAGE_4",k.Image5="IMAGE_5"}(Jv||(Jv={}));const ng={[Jv.Image1]:ps.q.Pet_Merge_FTUE_New_Menu_slide1,[Jv.Image2]:ps.q.Pet_Merge_FTUE_New_Menu_slide2,[Jv.Image3]:ps.q.Pet_Merge_FTUE_New_Menu_slide3,[Jv.Image4]:ps.q.Pet_Merge_FTUE_New_Menu_slide4,[Jv.Image5]:ps.q.Pet_Merge_FTUE_New_Menu_slide5},ag={[Jv.Image1]:ps.q.Pet_Merge_FTUE_New_Menu_slide1,[Jv.Image2]:ps.q.Pet_Merge_FTUE_New_Menu_slide2merge2,[Jv.Image3]:ps.q.Pet_Merge_FTUE_New_Menu_slide3,[Jv.Image4]:ps.q.Pet_Merge_FTUE_New_Menu_slide4,[Jv.Image5]:ps.q.Pet_Merge_FTUE_New_Menu_slide5merge2};let rg=class extends Fv{constructor(){super(...arguments),this._hudButtonType=Uv.ts.Pets}destroy(){this.removeAllListeners(),super.destroy()}needsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){return!this._breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_PET_MERGE,ls.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED)&&(!!eo.P8.canPlayerAccessPetMergeFeature()&&eg.N.cacheCanShowPetMergeTutorial())}))}triggerAction(){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.game.broadcaster.addAppListener(jn.ki.FtueCompleted,(()=>{this.removeAllListeners()}),this),this._breadcrumbManager.completeBreadcrumb(ls.B.FEATURE_PET_MERGE,ls.B.BREADCRUMB_PET_MERGE_FTUE_STARTED),this._segmentAnalytics.petMerge.sendPetMergeTutorialFunnelAdvancedEvent(ig.S4.TutorialUnlocked),yield eg.N.awardPetMergeFtueIngredients();const k=yield(0,sg.Ks)().loadWithDependenciesFromGUID(Rt.l.PetMergeFTUE);if((0,Bt.G)(Oh.m)){const B=(0,Bt.G)(tg.J),U=B?ag:ng,F=Object.values(U),G=Object.assign({PET_MERGE_2_ENABLED:B},U);yield tt.q.instance.prodigy.load.assetsAsPromise(F).then((()=>{Nt.d.updateInjectedValues(k,G)})).catch((k=>{j.VyI.log("Failed to load images on for the variant FTUE",j.$bb.Error)}))}k.transform.setPosition(tt.q.instance.game.width>>1,tt.q.instance.game.height>>1),k.setLayer(jh.E.OverlayLayer,!0),j.wa5.getActiveScene().addGameObject(k)}))}highlightButton(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.animate()}))}hudButtonType(){return this._hudButtonType}removeAllListeners(){tt.q.instance.game.broadcaster.removeAppListener(jn.ki.FtueCompleted,this)}};(0,G.Cg)([(0,j.Cdj)("12f-4e29"),(0,G.Sn)("design:type",sh.F)],rg.prototype,"_breadcrumbManager",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],rg.prototype,"_segmentAnalytics",void 0),rg=(0,G.Cg)([(0,j.EVk)("HudPetMergePopup",W.Y.uiHudManager)],rg);var og=U(24695);let hg=class extends Fv{constructor(){super(...arguments),this.WIDGET_ITEM_ATTENTION_COOLDOWN=Kt.s.DAY_IN_MS,this._hudButtonType=Uv.ts.Shop,this._currentItem=void 0}needsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!(yield zv.areVisibilityConditionsTrue(Uv.ts.Shop)))return!1;const k=yield this._dataProvider.getHudWidgetItems();for(const B of k)if(!this.hasShopItemBeenSeen(B))return this._currentItem=B,!0;return!1}))}highlightButton(){return(0,G.sH)(this,void 0,void 0,(function*(){oh.A.isDefined(this._currentItem)&&(this.updateItemSeenFlag(this._currentItem),yield this.createWidget(this.getWidgetData(this._currentItem)))}))}getWidgetData(k){var B,U,F,G,j,$,H,V;const W=null!==(U=null===(B=k.metadata.hudWidgetData)||void 0===B?void 0:B.prefab)&&void 0!==U?U:Rt.l.BaseHUDWidget;let q={ORIGIN_ID:`shop-widget-${k.id}`,STORE_TO_OPEN:null===(F=k.metadata.hudWidgetData)||void 0===F?void 0:F.storeKey,SECTION_TO_OPEN:k.metadata.category,TITLE_TEXT_KEY:null!==(j=null===(G=k.metadata.hudWidgetData)||void 0===G?void 0:G.title)&&void 0!==j?j:k.metadata.displayName};if(W===Rt.l.FeaturedPetWidget){const B=null===($=k.onComplete)||void 0===$?void 0:$.find((k=>k.type===yl.s.GOT_PET));let U=0,F=mn.EElementType.Physical;if(Array.isArray(null==B?void 0:B.data.itemDrops)&&B.data.itemDrops.length>0){U=B.data.itemDrops[0].ID;const k=Yt.t.getItem("pet",U);oh.A.isDefined(k)&&(F=eo.P8.getElementType(k))}q=Object.assign(Object.assign({},q),{TITLE_TEXT_KEY:null!==(V=null===(H=k.metadata.hudWidgetData)||void 0===H?void 0:H.title)&&void 0!==V?V:"PET_OF_THE_WEEK",BACKGROUND_IMAGE_GUID:og.N.ELEMENT_TO_WIDGET_BG_MAP[F],PET_SPINE_GUID:U})}return{prefab:W,injectionData:q}}hudButtonType(){return this._hudButtonType}triggerAction(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;oh.A.isDefined(this._currentItem)?yield tt.q.instance.prodigy.open.dynamicStoreAsync({storeKey:null===(B=this._currentItem.metadata.hudWidgetData)||void 0===B?void 0:B.storeKey,scrollToSection:this._currentItem.metadata.category,origin:{originType:ui.$N.ButtonClick,originId:Is.k.UnifiedStore}}):yield k()}))}hasShopItemBeenSeen(k){var B,U;const F=(null!==(B=this._activePlayer.data.hudAttentionSeenFlags)&&void 0!==B?B:{})[Uv.ts.Shop];if(!oh.A.isDefined(F))return!1;const G=null===(U=F.flags)||void 0===U?void 0:U.find((B=>B.identifier===k.id));return!!oh.A.isDefined(G)&&!(oh.A.isDefined(G.cooldownTimestamp)&&G.cooldownTimestamp<=Date.now())}updateItemSeenFlag(k){var B,U,F,G,j;null!==(B=(j=this._activePlayer.data).hudAttentionSeenFlags)&&void 0!==B||(j.hudAttentionSeenFlags={});const $=this._activePlayer.data.hudAttentionSeenFlags[Uv.ts.Shop],H=null!==(U=null==$?void 0:$.flags)&&void 0!==U?U:[],V=H.findIndex((B=>B.identifier===k.id)),W={identifier:k.id,cooldownTimestamp:Date.now()+(null!==(G=null===(F=k.metadata.hudWidgetData)||void 0===F?void 0:F.cooldown)&&void 0!==G?G:this.WIDGET_ITEM_ATTENTION_COOLDOWN)};V>=0?H[V]=W:H.push(W),this._activePlayer.data.hudAttentionSeenFlags[Uv.ts.Shop]={identifier:Uv.ts.Shop,flags:H}}};var cg;(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],hg.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,j.Cdj)("84d-05d4"),(0,G.Sn)("design:type",fd.I)],hg.prototype,"_dataProvider",void 0),hg=(0,G.Cg)([(0,j.EVk)("HudShop",W.Y.uiHudManager)],hg);let dg=cg=class extends Fv{constructor(){super(...arguments),this._hudButtonType=Uv.ts.StateChallenges}needsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=tt.q.instance.prodigy.gameContainer.get("0f9-dd7b"),U=tt.q.instance.prodigy.gameContainer.get("a94-4ba3");yield B.initialize();if(!(yield U.isFeatureAvailable()))return!1;const F=this.checkIfStateChallengeAboutToEnd();if(!this.hasCurrentStateChallengeBeenSeen(F))return!0;const G=(null!==(k=tt.q.instance.prodigy.gameContainer.get("306-5359").data.hudAttentionSeenFlags)&&void 0!==k?k:{})[Uv.ts.StateChallenges],j=Date.now();return!!((null==G?void 0:G.cooldownTimestamp)&&j>=G.cooldownTimestamp&&(yield this.hasPendingReward()))}))}hasCurrentStateChallengeBeenSeen(k){var B;const U=(null!==(B=tt.q.instance.prodigy.gameContainer.get("306-5359").data.hudAttentionSeenFlags)&&void 0!==B?B:{})[Uv.ts.StateChallenges];if(!j.Aq$.isDefined(null==U?void 0:U.identifier))return!1;const F=Date.now(),G=new Date(F).getMonth()+1;return k?U.identifier===`${G}-expiring`:U.identifier===G}hasPendingReward(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=tt.q.instance.prodigy.gameContainer.get("0f9-dd7b"),B=(0,Vu.$)(k.viewableCompetitionPhase);if(!B)return!1;const U=tt.q.instance.prodigy.gameContainer.get("43a-6f08");yield U.getQuestTasks(B);const F=yield Bu.b.getData();return!!F&&F[ku.V.HasMilestoneRewardReady]}))}highlightButton(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.animate()}))}hudButtonType(){return this._hudButtonType}triggerAction(k){return(0,G.sH)(this,void 0,void 0,(function*(){this.updateStateChallengeSeenFlag(),yield k()}))}checkIfStateChallengeAboutToEnd(){const k=Date.now(),B=new Date(k);return new Date(B.getFullYear(),B.getMonth()+1,0,23,59,59,999).getTime()-k<=1728e5}updateStateChallengeSeenFlag(){var k,B;const U=tt.q.instance.prodigy.gameContainer.get("306-5359");null!==(k=(B=U.data).hudAttentionSeenFlags)&&void 0!==k||(B.hudAttentionSeenFlags={});const F=this.checkIfStateChallengeAboutToEnd(),G=Date.now(),j=new Date(G).getMonth()+1;U.data.hudAttentionSeenFlags[Uv.ts.StateChallenges]={identifier:F?`${j}-expiring`:j,cooldownTimestamp:Date.now()+cg.STATE_CHALLENGE_REWARD_NOTIFICATION_COOLDOWN}}destroy(){tt.q.instance.game.broadcaster.removeAppListener(jn.bI.FtueCompleted,this),super.destroy()}};dg.STATE_CHALLENGE_REWARD_NOTIFICATION_COOLDOWN=864e5,dg=cg=(0,G.Cg)([(0,j.EVk)("HudStateChallenge",W.Y.uiHudManager)],dg);let lg=class extends Fv{constructor(){super(...arguments),this._hudButtonType=Uv.ts.TreasureTrack}destroy(){this._battlePassDataPromise&&(this._battlePassDataPromise.cancel(),this._battlePassDataPromise=void 0),super.destroy()}needsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=this._loggedInPlayer.player;if(!B.hasCompletedTutorial()||B.tutorialCompletedThisSession)return!1;this._battlePassDataPromise=new j.kBN(((k,B)=>{this._battlePassQuestManager.getCurrentBattlePassData().then(k).catch(B)}));const U=yield this._battlePassDataPromise;return!1===(null===(k=null==U?void 0:U.getFtueTask())||void 0===k?void 0:k.isCompleted)}))}highlightButton(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.animate()}))}hudButtonType(){return this._hudButtonType}triggerAction(){return(0,G.sH)(this,void 0,void 0,(function*(){yield tt.q.instance.prodigy.open.battlePassFtue()}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],lg.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],lg.prototype,"_battlePassQuestManager",void 0),lg=(0,G.Cg)([(0,j.EVk)("HudTreasureTrack",W.Y.uiHudManager)],lg);var ug=U(19609),fg=U(45385),bg=U(72799);let pg=class extends Fv{create(){super.create(),this._root.active=!1,this._renderPlayerAsTexture.onRenderComplete.addOnce((()=>{this._root.active=!0})),this._activePlayer.onEquipmentChange.add(this.updateAvatarAppearance,this),tt.q.instance.game.broadcaster.addAppListener(jn.ig.AnyLevelUp,this.updateWizardLevelText,this),this._wizardCostumesDataProvider.onCostumeDataChanged.add(this.updateNotificationBadge,this),this.updateNotificationBadge(),this.updateWizardLevelText()}updateNotificationBadge(){const k=this._wizardCostumesDataProvider.getUnseenCostumeIds().length;this._notificationBadge.updateNumberedNotificationBadge(k>0,k)}updateWizardLevelText(){this._levelText.text=this._activePlayer.getLevel().toString()}updateAvatarAppearance(){this._renderPlayerAsTexture.renderPlayerAsTexture()}needsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){return!(this._activePlayer.getLevel()0||ug.hD.shouldShowFtue())}))}highlightButton(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.animate()}))}hudButtonType(){return Uv.ts.WizardCostumes}triggerAction(k){return(0,G.sH)(this,void 0,void 0,(function*(){this._segment.featureCommon.sendButtonEvent({buttonName:Is.k.CostumesHudButton,interfaceName:us.B.HUD,interfaceType:ui.Wm.HUD,destinationName:us.B.WizardCostumesMenu,saveClickInfo:Is.k.CostumesHudButton}),tt.q.instance.prodigy.open.openWizardCostumesMenu(ui.$N.ButtonClick,Is.k.CostumesHudButton),tt.q.instance.game.broadcaster.broadcast(jn.Y1.CheckForHUDAttention)}))}destroy(){this._wizardCostumesDataProvider.onCostumeDataChanged.removeAll(this),this._activePlayer.onEquipmentChange.removeAll(this),tt.q.instance.game.broadcaster.removeAppListener(jn.ig.AnyLevelUp,this),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],pg.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],pg.prototype,"_segment",void 0),(0,G.Cg)([(0,j.Cdj)("6e9-d1dd"),(0,G.Sn)("design:type",Xb.W)],pg.prototype,"_wizardCostumesDataProvider",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],pg.prototype,"_root",void 0),(0,G.Cg)([(0,j.MnK)(fg.e),(0,G.Sn)("design:type",fg.e)],pg.prototype,"_notificationBadge",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],pg.prototype,"_levelText",void 0),(0,G.Cg)([(0,j.MnK)(bg.M),(0,G.Sn)("design:type",bg.M)],pg.prototype,"_renderPlayerAsTexture",void 0),pg=(0,G.Cg)([(0,j.EVk)("HudWizardCostumes",W.Y.uiHudManager)],pg);var vg=U(21738);let gg=class extends j.uAl{constructor(){super(...arguments),this.prefabIsOnStack=new j.HN0,this.prefabIsNotOnStack=new j.HN0}destroy(){this.prefabIsOnStack.dispose(),this.prefabIsNotOnStack.dispose(),super.destroy()}menuStackCloseAll(){tt.q.instance.prodigy.open.menuCloseAll()}isPrefabMenuOnStack(k){const B=tt.q.instance.prodigy.open.menus;for(const U of B)if(U instanceof vg.y&&U.prefabID===k)return void this.prefabIsOnStack.dispatch();this.prefabIsNotOnStack.dispatch()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],gg.prototype,"prefabIsOnStack",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],gg.prototype,"prefabIsNotOnStack",void 0),gg=(0,G.Cg)([(0,j.EVk)("MenuStackManager",j.YH6.ui)],gg);let mg=class extends j.uAl{constructor(){super(...arguments),this._modalFilters=null,this._modalRenderTexture=null,this._isBlurred=!1}create(){this._background=j.wa5.getActiveScene().getLayer(jh.E.BackgroundLayer),this._content=j.wa5.getActiveScene().getLayer(jh.E.ContentLayer),this._foreground=j.wa5.getActiveScene().getLayer(jh.E.ForegroundLayer),this._gameRenderCache=new j._mx,this._gameRenderCache.name=jh.E.GameRenderCacheLayer,this._gameRenderCacheBaseRenderer=this._gameRenderCache.addComponent(j.jsv)}blur(){this.bitmapCacheContainer(!0)}unBlur(){this.bitmapCacheContainer(!1)}fadeOutCachedContainer(k){if(!this._gameRenderCacheBaseRenderer.getRootContainer().visible)return;tt.q.instance.game.add.tween(this._gameRenderCache,this).to({alpha:0},100,j.GS3.Quadratic.Out).start().onTweenComplete.add(this.clearAndResetCachedContainer.bind(this,k))}clearAndResetCachedContainer(k){k.filters=null,k.visible=!1,k.removeChildren()}setUpModalTransition(k){this.clearAndResetCachedContainer(k);const B=tt.q.instance.game.renderer;if(null===this._modalFilters){const k=new $e.filters.BlurFilter;this._modalFilters=[k]}const U=$e.RenderTexture.create({width:tt.q.instance.game.width,height:tt.q.instance.game.height});null===this._modalRenderTexture&&(this._modalRenderTexture=$e.RenderTexture.create({width:tt.q.instance.game.width,height:tt.q.instance.game.height}));const F={renderTexture:U,clear:!0,transform:void 0,skipUpdateTransform:!1},G=Object.assign(Object.assign({},F),{clear:!1}),j=Object.assign(Object.assign({},F),{renderTexture:this._modalRenderTexture});B.render(this._background,F),B.render(this._content,G),B.render(this._foreground,G);const $=new $e.Container;$.addChild(new $e.Sprite(U)),$.filters=this._modalFilters,B.render($,j),$.destroy(),k.addChild(new $e.Sprite(this._modalRenderTexture)),k.alpha=1,k.visible=!0}bitmapCacheContainer(k){const B=this._gameRenderCacheBaseRenderer.getRootContainer();k?this.setUpModalTransition(B):this.fadeOutCachedContainer(B),this.setLayerVisibility(!k)}setLayerVisibility(k){this._background.visible=k,this._content.visible=k,this._foreground.visible=k,this._hudGameObject.active=k,this._isBlurred=!k}destroy(){var k;super.destroy(),this._isBlurred&&(this.clearAndResetCachedContainer(this._gameRenderCacheBaseRenderer.getRootContainer()),this.setLayerVisibility(!0)),tt.q.instance.game.tweens.removeAllFromOwner(this),this._gameRenderCache.destroy(),this._modalFilters&&(this._modalFilters.length=0),null===(k=this._modalRenderTexture)||void 0===k||k.destroy()}};(0,G.Cg)([(0,j.Cdj)(Uv.uR.HudGameObject),(0,G.Sn)("design:type",j._mx)],mg.prototype,"_hudGameObject",void 0),mg=(0,G.Cg)([(0,j.EVk)("ModalPopupBlurController",W.Y.uiPopup)],mg);var yg=U(60155);let _g=class extends j.uAl{constructor(){super(...arguments),this._currentPopup=null}create(){super.create(),this.shouldShowPopupButton()?(tt.q.instance.prodigy.load.assets([Rt.l.MoreMagicAtHomePopup]),this._button.active=!0):this._button.active=!1}openPopup(){if(this._currentPopup)return;this._button.active=!1,this._currentPopup=tt.q.instance.prodigy.open.prefabMenu(Rt.l.MoreMagicAtHomePopup,(()=>{this._button.active=!0,this._currentPopup=null}),!1,!0,!1)}closePopup(){this._currentPopup&&(this._currentPopup.close(),this._currentPopup=null)}shouldShowPopupButton(){return this._battleController.hasMpOverrides&&Qt.J.isDateWithinSchoolDayAndHours()}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_g.prototype,"_button",void 0),(0,G.Cg)([(0,j.Cdj)("BattleController"),(0,G.Sn)("design:type",yg.V)],_g.prototype,"_battleController",void 0),_g=(0,G.Cg)([(0,j.EVk)("MoreMagicAtHomePopupController",W.Y.uiPopup)],_g);let Eg=class extends ff.l{constructor(){super(...arguments),this._notificationAtlas=Ve._.Ui_social_feed_json,this._notificationSfx=pi.c.Sfx_toaster_open}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return this._achievementData=tt.q.instance.prodigy.achievements.updateAchievementsCompletion(),this._achievementData.length>0}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),this._achievementData||(this._achievementData=tt.q.instance.prodigy.achievements.updateAchievementsCompletion()),this.onClose.dispatch();for(const k of this._achievementData)this._loggedInPlayer.player.achievements.complete(k.ID)}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Eg.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],Eg.prototype,"_notificationAtlas",void 0),(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],Eg.prototype,"_notificationSfx",void 0),Eg=(0,G.Cg)([(0,j.EVk)("OpenAchievementToasters",W.Y.uiPopup)],Eg);let wg=class extends ff.l{destroy(){this._battlePassDataPromise&&(this._battlePassDataPromise.cancel(),this._battlePassDataPromise=void 0),super.destroy()}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=this._loggedInPlayer.player;if(!(yield yn.n.hasBattlePassAccess()))return!1;if(!B.hasCompletedTutorial()||B.tutorialCompletedThisSession)return!1;this._battlePassDataPromise=new j.kBN(((k,B)=>{this._battlePassQuestManager.getCurrentBattlePassData().then(k).catch(B)}));const U=yield this._battlePassDataPromise;return!1===(null===(k=null==U?void 0:U.getFtueTask())||void 0===k?void 0:k.isCompleted)}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),yield tt.q.instance.prodigy.open.battlePassFtue((()=>{this.onClose.dispatch()}))}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],wg.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],wg.prototype,"_battlePassQuestManager",void 0),wg=(0,G.Cg)([(0,j.EVk)("OpenBattlePassFtuePopup",W.Y.uiDialog)],wg);U(46361);let Tg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;const U=null!==(B=null===(k=this._loggedInPlayer.player.data)||void 0===k?void 0:k.zone)&&void 0!==B?B:"";return On.J.canShowNarrativeIntro(U)}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),tt.q.instance.prodigy.world.it("lamplight-B3")}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Tg.prototype,"_loggedInPlayer",void 0),Tg=(0,G.Cg)([(0,j.EVk)("OpenCampaignNarrativePopup",W.Y.uiPopup)],Tg);let Sg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return this._chargedLevelsProgressManager.shouldShowConversionModal}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),this._chargedLevelsProgressManager.showChargedLevelsConversionModal((()=>{this.onClose.dispatch()}))}))}};(0,G.Cg)([(0,j.Cdj)("62e-110e"),(0,G.Sn)("design:type",Bn.g)],Sg.prototype,"_chargedLevelsProgressManager",void 0),Sg=(0,G.Cg)([(0,j.EVk)("OpenChargedLevelConversionModalPopup",W.Y.uiPopup)],Sg);let Ag=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return this._chargedLevelsProgressManager.shouldShowDecayImmunityModal}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),this._chargedLevelsProgressManager.showChargedLevelsDecayImmunityModal((()=>{this.onClose.dispatch()}))}))}};(0,G.Cg)([(0,j.Cdj)("62e-110e"),(0,G.Sn)("design:type",Bn.g)],Ag.prototype,"_chargedLevelsProgressManager",void 0),Ag=(0,G.Cg)([(0,j.EVk)("OpenChargedLevelsDecayImmunityModalPopup",W.Y.uiPopup)],Ag);let Cg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=Yn.s.baseLevelRequiredForChargedLevels;return this._loggedInPlayer.getLevel()>=k&&this._chargedLevelsProgressManager.shouldShowRetention}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),this._chargedLevelsProgressManager.showChargedLevelsRetentionModal((()=>{this.onClose.dispatch()}))}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Cg.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("62e-110e"),(0,G.Sn)("design:type",Bn.g)],Cg.prototype,"_chargedLevelsProgressManager",void 0),Cg=(0,G.Cg)([(0,j.EVk)("OpenChargedLevelsRetentionPopup",W.Y.uiPopup)],Cg);let Og=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return cr.M.canAutoSurfaceDailyLoginCalendar()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),tt.q.instance.prodigy.open.dailyLoginCalendar().then((()=>{this.onClose.dispatch()})).catch(j.RQr.createHandler("Failed to open Daily Login Calendar popup"))}))}};Og=(0,G.Cg)([(0,j.EVk)("OpenDailyLoginCalendarPopup",W.Y.uiPopup)],Og);var Ig=U(75781);let Dg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return Vo.U.progressData.step===Ho.B.NotStarted&&this._loggedInPlayer.player.hasFoundAllKeystones()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),Ig.E.runAllKeystonesSequenceOnMapSetup((()=>(0,G.sH)(this,void 0,void 0,(function*(){this.onClose.dispatch()}))))}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Dg.prototype,"_loggedInPlayer",void 0),Dg=(0,G.Cg)([(0,j.EVk)("OpenEndGameKeystonesSequence",W.Y.uiPopup)],Dg);let Rg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return On.J.shouldShowExpertModeUnlockedPopup()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),On.J.showDifficultyUnlockedPopup(fe.i.Expert,(()=>{this.onClose.dispatch()}))}))}};Rg=(0,G.Cg)([(0,j.EVk)("OpenExpertModeUnlockPopup",W.Y.uiPopup)],Rg);let Pg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=tt.q.instance.prodigy.gameContainer.get("a02-c2b2"),B=k.shouldAutoSurfaceSegmentedOffers()&&k.userHasLastChance();return k.userHasEligibleOfferAvailable()&&B}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){var B;yield k.open.call(this);const U=tt.q.instance.prodigy.gameContainer,F=U.get("a02-c2b2");U.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:null===(B=F.activeOffer)||void 0===B?void 0:B.id,funnelType:"segmented_offers",stepName:eh.l.SegmentedOffersGotExpired},{step_index:5}),gu.P.openConfiguredModal((()=>{this.onClose.dispatch()}))}))}};Pg=(0,G.Cg)([(0,j.EVk)("OpenExpiringSegmentOffers",W.Y.uiPopup)],Pg);let Mg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return og.N.shouldShowFeaturedPetPopup()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),og.N.openFeaturedPetPopup((()=>{this.onClose.dispatch()}))}))}};Mg=(0,G.Cg)([(0,j.EVk)("OpenFeaturedPetPopupComponent",W.Y.uiPopup)],Mg);let Ng=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return!!this._loggedInPlayer.player.hasCompletedTutorial()&&_r.x.shouldShowCurrencyDrainPopup(cl.L.CurrencyDrainPopup)}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),_r.x.openCurrencyDrainModal(ui.$N.AutoSurfaced,(()=>{this.onClose.dispatch()}))}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Ng.prototype,"_loggedInPlayer",void 0),Ng=(0,G.Cg)([(0,j.EVk)("OpenFestivalCurrencyDrainPopup",W.Y.uiPopup)],Ng);let xg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return On.J.shouldShowHardModeUnlockedPopup()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),On.J.showDifficultyUnlockedPopup(fe.i.Hard,(()=>{this.onClose.dispatch()}))}))}};xg=(0,G.Cg)([(0,j.EVk)("OpenHardModeUnlockPopup",W.Y.uiPopup)],xg);var Lg=U(40392);let kg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=On.J.shouldShowWorldMapHardModeFtue(),B=On.J.hasStartedHardModeFirstEntryDialogueButNeverCompleted();return k||B}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this);const B=tt.q.instance.prodigy.open.map({disableClose:!0,onClose:()=>this.onClose.dispatch()});On.J.hasStartedHardModeFirstEntryDialogueButNeverCompleted()&&B.onCreate.addOnce((()=>{Lg.i.setDifficultyMode(fe.i.Hard)}))}))}};kg=(0,G.Cg)([(0,j.EVk)("OpenHardModeWorldmapFTUE",W.Y.uiPopup)],kg);var Bg=U(34612);let Ug=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return Bg.F.shouldShowLinearCampaignZoneLockTransition()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),Bg.F.activateLinearCampaignTransitionCutscene(),tt.q.instance.game.broadcaster.addAppListener(jn.n8.WorldMapZoneSelected,(()=>this.onClose.dispatch()),this)}))}};Ug=(0,G.Cg)([(0,j.EVk)("OpenLinearCampaignTransitionPopup",W.Y.uiPopup)],Ug);var Fg=U(51477);let Gg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=this._game.state.getCurrentState(),U=tt.q.instance.prodigy.gameContainer.get("a02-c2b2"),F=(null===(k=null==B?void 0:B.screenData)||void 0===k?void 0:k.battleResult)===Ci.XK.Defeat&&!U.userHasSeenFirstOffer();return U.userHasEligibleOfferAvailable()&&F}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this);const B=tt.q.instance.prodigy.gameContainer.get("a02-c2b2");gu.P.openConfiguredModal((()=>{B.setBreadcrumbHasSeenFirstBattleLost(),this.onClose.dispatch()}))}))}};(0,G.Cg)([(0,j.Cdj)("51c-03a0"),(0,G.Sn)("design:type",Fg.n)],Gg.prototype,"_game",void 0),Gg=(0,G.Cg)([(0,j.EVk)("OpenLostBattleSegmentOffers",W.Y.uiPopup)],Gg);var jg=U(64868);let $g=class extends ff.l{constructor(){super(...arguments),this._filteredOffers=[],this._resetTime=void 0}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,j,$;if(jg._.isFeatureEnabled()){const H=this._game.state.getCurrentState(),V=tt.q.instance.prodigy.gameContainer,W=null!==(B=null===(k=null==H?void 0:H.screenData)||void 0===k?void 0:k.battleResult)&&void 0!==B&&B,q=null!==(F=null===(U=null==H?void 0:H.screenData)||void 0===U?void 0:U.didRiftBattle)&&void 0!==F&&F;if(W||q){const k=V.get("0f1-c356"),{sessionBattles:B}=yield k.getBattleStats(),U=this._loggedInPlayer.player.isPlayingAtSchool(),F=null!==($=null===(j=null===(G=jg._.getVariables())||void 0===G?void 0:G.defeatedPetStore)||void 0===j?void 0:j.battlesToPrompt)&&void 0!==$?$:3,H=B.length%F==0,W=0!==B.length&&B[B.length-1].battleType===Ci.gu.NormalRiftRun;if(U||H||W){const k=V.get("7a1-ff33"),{resetTime:B,defeatedPetOffers:U}=yield k.updateDefeatedPetOffers();if(this._resetTime=B,this._filteredOffers=[...U].filter((k=>k.progress.status===pr.t.IN_PROGRESS)),this._filteredOffers.length>0)return!0}}}return!1}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),tt.q.instance.prodigy.open.prefabMenu(Rt.l.LostPetModal,(()=>{this.onClose.dispatch()}),!0,!0,!1,{LOST_PETS_OFFER_DATA:this._filteredOffers,LOST_PETS_RESET_TIME:this._resetTime})}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],$g.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("51c-03a0"),(0,G.Sn)("design:type",Fg.n)],$g.prototype,"_game",void 0),$g=(0,G.Cg)([(0,j.EVk)("OpenLostPetsModalPopup",W.Y.uiPopup)],$g);let Hg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._loggedInPlayer.player,B=k.hasMembership();return!(!k.hasCompletedTutorial()&&k.memberPrompt)&&(!(!B&&Qt.J.isSchoolHours()||B&&k.backpack.hasItem("mount",1)>0)&&(!(k.isPlayingAtSchool()||!k.hasUnclaimedMembershipRewards())&&(k.seenMapTransitionPromptThisSession=!0,Us.P.shouldUseUnifiedConversionFlow(en.o.FunnelTransitMap))))}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),tt.q.instance.prodigy.open.unifiedConversionFlow((()=>{this.onClose.dispatch()}),{conversionFunnelName:en.o.FunnelTransitMap,conversionStage:en.o.StageTransitMap},ui.$N.AutoSurfaced)}))}};(0,G.Cg)([(0,j.Cdj)("51c-03a0"),(0,G.Sn)("design:type",Fg.n)],Hg.prototype,"_game",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Hg.prototype,"_loggedInPlayer",void 0),Hg=(0,G.Cg)([(0,j.EVk)("OpenMapTransitionAdPopup",W.Y.uiPopup)],Hg);var Vg=U(26691);let Wg=class extends j.uAl{constructor(){super(...arguments),this._onYes=new j.HN0,this._onNo=new j.HN0,this._yesOnly=!1}run(){tt.q.instance.prodigy.open.messageBoxPrefab({text:this.messageKey,buttonState:this._yesOnly?Vg.D.OkayButton:Vg.D.YesNoButtons,confirmCallback:()=>{this._onYes.dispatch()},noCallback:this._yesOnly?void 0:()=>{this._onNo.dispatch()}})}destroy(){this._onYes.dispose(),this._onNo.dispose(),super.destroy()}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Wg.prototype,"messageKey",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wg.prototype,"_onYes",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wg.prototype,"_onNo",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Wg.prototype,"_yesOnly",void 0),Wg=(0,G.Cg)([(0,j.EVk)("OpenMessageBox",W.Y.uiDialog)],Wg);let qg=class extends ff.l{create(){super.create(),this._otpService=tt.q.instance.prodigy.gameContainer.get("e03-b0a9"),this._openOnCreate&&this.canOpen().then((k=>(0,G.sH)(this,void 0,void 0,(function*(){k&&(yield this.open())})))).catch(j.RQr.createHandler("Error opening OPT Unclaimed popup"))}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return this._otpService.hasUncollectedTransactions}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),this._otpService.acknowledgeUncollectedTransactions().catch(j.RQr.createHandler("Error opening OPT Unclaimed popup"))}))}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],qg.prototype,"_openOnCreate",void 0),qg=(0,G.Cg)([(0,j.EVk)("OpenOTPUnclaimedPopup",W.Y.uiDialog)],qg);var Kg=U(32073);let zg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;return j.Aq$.isDefined(this._quickQuizManager.currentQuickQuizId)||(null===(k=this._quickQuizManager)||void 0===k?void 0:k.waitingToTransport)&&Kg.v.canBeTransportedToQuickQuiz({skipPendingLoadCheck:!0}).canBeTransported}))}close(){this.onClose.dispatch()}open(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;null===(k=this._quickQuizManager)||void 0===k||k.onQuickQuizExitFlowComplete.addOnce((()=>{this.close()}))}))}};(0,G.Cg)([(0,j.Cdj)("fc2-cb0a"),(0,G.Sn)("design:type",Hh.w)],zg.prototype,"_quickQuizManager",void 0),zg=(0,G.Cg)([(0,j.EVk)("OpenPendingQuickQuiz",W.Y.uiDialog)],zg);let Yg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return td.I.shouldShowPetGearTutorial()}))}open(){return(0,G.sH)(this,void 0,void 0,(function*(){if(j.Aq$.isDefined(this._onHudLoaded)){if(0===this._onHudLoaded.dispatchCount)try{yield this.waitForHud()}catch(k){return void j.VyI.log("OpenPetGearPopupComponent: Error waiting for HUD to load, skipping FTUE popup.",j.$bb.Error)}tt.q.instance.game.broadcaster.addAppListener(jn.bI.FtueCompleted,(()=>{this.onClose.dispatch()}),this),tt.q.instance.game.broadcaster.broadcast(jn.bI.ReceivedPetGear)}else j.VyI.log("OpenPetGearPopupComponent: No HUD loaded signal defined, skipping FTUE popup.",j.$bb.Error)}))}waitForHud(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!j.Aq$.isDefined(this._onHudLoaded))throw new Error("OpenPetGearPopupComponent: No HUD loaded signal defined, skipping FTUE popup.");const k=this._onHudLoaded.onDispatch.asPromise(),B=j.Egh.timeout(5e3).then((()=>{throw j.VyI.log("OpenPetGearPopupComponent: Hud load timed out, skipping FTUE popup.",j.$bb.Error),new Error("HUD load timeout")}));yield Promise.race([k,B])}))}destroy(){tt.q.instance.game.broadcaster.removeAppListener(jn.bI.FtueCompleted,this),super.destroy()}};var Qg;(0,G.Cg)([(0,j.Cdj)("OnHudLoadedSignal"),(0,G.Sn)("design:type",ql.S)],Yg.prototype,"_onHudLoaded",void 0),Yg=(0,G.Cg)([(0,j.EVk)("OpenPetGearPopup",W.Y.uiDialog)],Yg),function(k){k.Image1="IMAGE_1",k.Image2="IMAGE_2",k.Image3="IMAGE_3",k.Image4="IMAGE_4",k.Image5="IMAGE_5"}(Qg||(Qg={}));const Xg={[Qg.Image1]:ps.q.Pet_Merge_FTUE_New_Menu_slide1,[Qg.Image2]:ps.q.Pet_Merge_FTUE_New_Menu_slide2,[Qg.Image3]:ps.q.Pet_Merge_FTUE_New_Menu_slide3,[Qg.Image4]:ps.q.Pet_Merge_FTUE_New_Menu_slide4,[Qg.Image5]:ps.q.Pet_Merge_FTUE_New_Menu_slide5},Zg={[Qg.Image1]:ps.q.Pet_Merge_FTUE_New_Menu_slide1,[Qg.Image2]:ps.q.Pet_Merge_FTUE_New_Menu_slide2merge2,[Qg.Image3]:ps.q.Pet_Merge_FTUE_New_Menu_slide3,[Qg.Image4]:ps.q.Pet_Merge_FTUE_New_Menu_slide4,[Qg.Image5]:ps.q.Pet_Merge_FTUE_New_Menu_slide5merge2};let Jg=class extends ff.l{constructor(){super(...arguments),this._checkIfLoadedOnPrefabMap=!1}create(){if(super.create(),this._openOnCreate){if(this._checkIfLoadedOnPrefabMap&&j.Aq$.isDefined(this._popupManager))return;this.canOpen().then((k=>(0,G.sH)(this,void 0,void 0,(function*(){k&&(yield this.open())})))).catch(j.RQr.createHandler("Error opening pet merge FTUE popup"))}}destroy(){this.removeAllListeners(),super.destroy()}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return!this._breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_PET_MERGE,ls.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED)&&(!!eo.P8.canPlayerAccessPetMergeFeature()&&eg.N.cacheCanShowPetMergeTutorial())}))}open(){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.game.broadcaster.addAppListener(jn.ki.FtueCompleted,(()=>{this.removeAllListeners(),this.onClose.dispatch()}),this),this._breadcrumbManager.completeBreadcrumb(ls.B.FEATURE_PET_MERGE,ls.B.BREADCRUMB_PET_MERGE_FTUE_STARTED),this._segmentAnalytics.petMerge.sendPetMergeTutorialFunnelAdvancedEvent(ig.S4.TutorialUnlocked),yield eg.N.awardPetMergeFtueIngredients();const k=yield(0,sg.Ks)().loadWithDependenciesFromGUID(Rt.l.PetMergeFTUE);if((0,Bt.G)(Oh.m)){const B=(0,Bt.G)(tg.J),U=B?Zg:Xg,F=Object.values(U),G=Object.assign({PET_MERGE_2_ENABLED:B},U);yield tt.q.instance.prodigy.load.assetsAsPromise(F).then((()=>{Nt.d.updateInjectedValues(k,G)})).catch((k=>{j.VyI.log("Failed to load images on for the variant FTUE",j.$bb.Error)}))}k.transform.setPosition(tt.q.instance.game.width>>1,tt.q.instance.game.height>>1),k.setLayer(jh.E.OverlayLayer,!0),j.wa5.getActiveScene().addGameObject(k)}))}removeAllListeners(){tt.q.instance.game.broadcaster.removeAppListener(jn.ki.FtueCompleted,this)}};(0,G.Cg)([(0,j.Cdj)("PopupHandler"),(0,G.Sn)("design:type",el.Y)],Jg.prototype,"_popupManager",void 0),(0,G.Cg)([(0,j.Cdj)("12f-4e29"),(0,G.Sn)("design:type",sh.F)],Jg.prototype,"_breadcrumbManager",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],Jg.prototype,"_segmentAnalytics",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Jg.prototype,"_openOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Jg.prototype,"_checkIfLoadedOnPrefabMap",void 0),Jg=(0,G.Cg)([(0,j.EVk)("OpenPetMergePopup",W.Y.uiDialog)],Jg);let tm=class extends j.uAl{open(){tt.q.instance.prodigy.open.pets()}};tm=(0,G.Cg)([(0,j.EVk)("OpenPetbook",W.Y.ui)],tm);var em=U(6476),im=U(36811);let sm=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return!(0,Bt.G)(Zr.d3).enabled&&this._player.hasCompletedTutorial()&&this._questManager.awardsAvailableCount>0}))}close(){this.onClose.dispatch()}open(){return(0,G.sH)(this,void 0,void 0,(function*(){try{yield im.V.openPlayerGoalsIfPrizeReady(ui.$N.AutoSurfaced)}catch(k){j.VyI.log(`Error opening player goals: ${k}`,j.$bb.Error)}this.close()}))}};(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],sm.prototype,"_player",void 0),(0,G.Cg)([(0,j.Cdj)("d65-d7bb"),(0,G.Sn)("design:type",Sd.n)],sm.prototype,"_questManager",void 0),sm=(0,G.Cg)([(0,j.EVk)("OpenPlayerGoalsPopup",W.Y.uiDialog)],sm);U(22866),U(85056);let nm=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=this._game.state.getCurrentState(),U=tt.q.instance.prodigy.gameContainer.get("a02-c2b2"),F=j.Aq$.isDefined(null===(k=B.screenData)||void 0===k?void 0:k.battleResult)&&!U.userHasSeenFirstOffer();return U.userHasEligibleOfferAvailable()&&F}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){var B;yield k.open.call(this);const U=tt.q.instance.prodigy.gameContainer,F=U.get("a02-c2b2");U.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:null===(B=F.activeOffer)||void 0===B?void 0:B.id,funnelType:"segmented_offers",stepName:eh.l.SegmentedOffersViewed},{step_index:2}),gu.P.openConfiguredModal((()=>{F.setBreadcrumbHasSeenFirstOffer(),this.onClose.dispatch()}))}))}};(0,G.Cg)([(0,j.Cdj)("51c-03a0"),(0,G.Sn)("design:type",Fg.n)],nm.prototype,"_game",void 0),nm=(0,G.Cg)([(0,j.EVk)("OpenSegmentOffersAfterBattlePopup",W.Y.uiPopup)],nm);let am=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=tt.q.instance.prodigy.gameContainer.get("a02-c2b2"),B=this._loggedInPlayer.player.justLeveled&&k.userHasChangedSegment();return k.userHasEligibleOfferAvailable()&&B}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this);const B=tt.q.instance.prodigy.gameContainer.get("a02-c2b2");B.resetSurfacingBreadcrumbs(),gu.P.openConfiguredModal((()=>{B.setBreadcrumbHasSeenFirstOffer(),this.onClose.dispatch()}))}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],am.prototype,"_loggedInPlayer",void 0),am=(0,G.Cg)([(0,j.EVk)("OpenSegmentOffersOnSegmentChangePopup",W.Y.uiPopup)],am);let rm=class extends ff.l{constructor(){super(...arguments),this._shouldCheckNotifications=!1}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return this._loggedInPlayer.player.hasCompletedTutorial()&&tt.q.instance.prodigy.notifications.canPlayNotification()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),this.onClose.dispatch(),tt.q.instance.prodigy.notifications.playNextNotification()}))}onFirstPopup(){this._shouldCheckNotifications=!0}update(){if(super.update(),this._shouldCheckNotifications){const{open:k,notifications:B}=tt.q.instance.prodigy;0===k.menus.length&&0===k.renderMenus.length&&null===k.chatMenu&&null===B.notificationTimer&&B.startTimer()}}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],rm.prototype,"_loggedInPlayer",void 0),rm=(0,G.Cg)([(0,j.EVk)("OpenSocialToasters",W.Y.uiPopup)],rm);var om=U(19145);let hm=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=om.Z.canShowSpellStatusEffectsTutorial(),B=k.canBeTransported?"":`Reason: ${k.info}`;return j.VyI.log(`${(new Date).toISOString()} Spell Status Effects tutorial ready state\ncan be transported: ${k.canBeTransported}\n${B}`,j.$bb.Info),k.canBeTransported}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),om.Z.instance.runSpellStatusEffectsTutorial((()=>{this.onClose.dispatch()}))}))}};hm=(0,G.Cg)([(0,j.EVk)("OpenSpellStatusEffectsTutorial",W.Y.uiPopup)],hm);let cm=class extends ff.l{constructor(){super(...arguments),this._menuVisuals=null}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=tt.q.instance.prodigy.gameContainer.get(ic.G.MathTower),B=this._loggedInPlayer.player;return k.isEnabledForPlayer(B)&&B.hasCompletedTutorial()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this);const B=tt.q.instance.prodigy.gameContainer.get(ic.G.MathTower).redirectTowerTownPopup();this._menuVisuals=B}))}getRootDisplayObject(){return this._menuVisuals}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],cm.prototype,"_loggedInPlayer",void 0),cm=(0,G.Cg)([(0,j.EVk)("OpenTowerTownPopup",W.Y.uiDialog)],cm);let dm=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return!1}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),this.onClose.dispatch()}))}};dm=(0,G.Cg)([(0,j.EVk)("OpenTrialMembershipEndedPopup",W.Y.uiDialog)],dm);let lm=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return this._dynamicStoreQuestManager.canTriggerOffer()}))}close(){this.onClose.dispatch()}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),yield this._dynamicStoreQuestManager.triggerCurrentOffer()}))}};(0,G.Cg)([(0,Gi.b)("7a1-ff33"),(0,G.Sn)("design:type",bd.s)],lm.prototype,"_dynamicStoreQuestManager",void 0),lm=(0,G.Cg)([(0,j.EVk)("OpenTriggeredOfferPopup",W.Y.uiPopup)],lm);U(99617);var um=U(19506);let fm=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return um.J.canShowUniquePetsIntro()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),um.J.runUniquePetsIntroSequence((()=>this.onClose.dispatch()))}))}};fm=(0,G.Cg)([(0,j.EVk)("OpenUniquePetsIntroSequence",W.Y.uiPopup)],fm);let bm=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){const{enabled:k}=(0,Bt.G)(qt.d);if(!k)return!1;this._lastClaimData=yield this._networkHandler.getAllowanceClaimData();const{totalClaimable:B}=this._lastClaimData;return B.some(Wb.cR)}))}open(){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.prodigy.open.openWizardBank({originType:ui.$N.AutoSurfaced},(()=>{this.onClose.dispatch()}))}))}};(0,G.Cg)([(0,j.Cdj)("231-9111"),(0,G.Sn)("design:type",Hb.b)],bm.prototype,"_networkHandler",void 0),bm=(0,G.Cg)([(0,j.EVk)("OpenWizardBankModalPopupComponent",W.Y.membership)],bm);var pm=U(32389);let vm=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return!!(0,Bt.G)(pm.q).enabled&&(!(this._activePlayer.getLevel()super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),tt.q.instance.prodigy.open.openWizardCostumesMenu(ui.$N.AutoSurfaced),this.onClose.dispatch()}))}};(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],vm.prototype,"_activePlayer",void 0),vm=(0,G.Cg)([(0,j.EVk)("OpenWizardCostumesFtuePopup",W.Y.uiDialog)],vm);U(24981);var gm=U(4631);let mm=class extends j.uAl{constructor(){super(...arguments),this.onZoneHandlesLeaving=new j.HN0,this.onZoneDoesNotHandleLeaving=new j.HN0}destroy(){this.onZoneHandlesLeaving.dispose(),this.onZoneDoesNotHandleLeaving.dispose(),super.destroy()}handleLeaving(){const k=tt.q.instance.prodigy.world.getZone(tt.q.instance.prodigy.world.getCurrentZone());k?k.handleLeaving(this._leavingType,(()=>{this.onZoneHandlesLeaving.dispatch()})):this.onZoneDoesNotHandleLeaving.dispatch()}};(0,G.Cg)([(0,j.gfw)(gm.j),(0,G.Sn)("design:type",Number)],mm.prototype,"_leavingType",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],mm.prototype,"onZoneHandlesLeaving",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],mm.prototype,"onZoneDoesNotHandleLeaving",void 0),mm=(0,G.Cg)([(0,j.EVk)("HandleLeavingGuard",W.Y.MapTeleport)],mm);let ym=class extends j.uAl{constructor(){super(...arguments),this._isCloseMapDisabled=!1,this._disableZoneGoals=!1,this._closeOtherMenus=!1,this._hideDifficultySelector=!1,this._lockClassDisabledZones=!1,this._lockedZones=[],this._awardGemForZoneID="",this._injectedValues={},this._onWorldMapClosed=new j.HN0,this.difficultyOverride=void 0}overrideZoneHandlesLeavingEvent(){this._awardGemForZoneID?Lg.i.setNextVisitParameters(Object.assign(Object.assign({},this.getWorldMapOptions(this._awardGemForZoneID.length>0)),{onInitialized:k=>{k.showGemAwardedSequence(this._awardGemForZoneID).catch((()=>j.VyI.log("Failed to show gem awarded sequence",j.$bb.Error)))}})):(this.difficultyOverride&&!Lg.i.isInDifficultyMode(this.difficultyOverride)&&Lg.i.setDifficultyMode(this.difficultyOverride),Lg.i.setNextVisitParameters(Object.assign({},this.getWorldMapOptions())))}getWorldMapOptions(k=!1){return k||this.setLockClassDisabledZones(),{disableClose:this._isCloseMapDisabled,forceLock:this._lockedZones,onClose:()=>this._onWorldMapClosed.dispatch(),disableZoneGoals:this._disableZoneGoals,injectedValues:this._injectedValues,disableDifficultyModeSelect:this._hideDifficultySelector,difficultyMode:this.difficultyOverride,autoOpenDialogueForZoneID:this._autoOpenDialogueForZoneID}}setLockClassDisabledZones(){if(this._lockClassDisabledZones){const k=tt.q.instance.prodigy.classModeController.getInClassDisabledZones().filter((k=>!1===this._lockedZones.includes(k)));this._lockedZones.push(...k)}}openWorldMap(){this._closeOtherMenus&&tt.q.instance.prodigy.open.menuCloseAll(),this.difficultyOverride&&!Lg.i.isInDifficultyMode(this.difficultyOverride)&&Lg.i.setDifficultyMode(this.difficultyOverride),tt.q.instance.prodigy.open.map(this.getWorldMapOptions())}destroy(){this._onWorldMapClosed.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("HandleLeavingGuard"),(0,G.Sn)("design:type",mm)],ym.prototype,"_handleLeavingGuard",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ym.prototype,"_isCloseMapDisabled",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ym.prototype,"_disableZoneGoals",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ym.prototype,"_closeOtherMenus",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ym.prototype,"_hideDifficultySelector",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ym.prototype,"_lockClassDisabledZones",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],ym.prototype,"_lockedZones",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ym.prototype,"_awardGemForZoneID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ym.prototype,"_autoOpenDialogueForZoneID",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],ym.prototype,"_injectedValues",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ym.prototype,"_onWorldMapClosed",void 0),(0,G.Cg)([(0,j.gfw)(fe.i),(0,G.Sn)("design:type",String)],ym.prototype,"difficultyOverride",void 0),ym=(0,G.Cg)([(0,j.EVk)("OpenWorldMap",W.Y.ui)],ym);let _m=class extends j.uAl{constructor(){super(...arguments),this._yesButtonText="BUTTON_OKAY_CAPITAL",this._hideCancelButton=!1,this.onYes=new j.HN0,this.onNo=new j.HN0}start(){const k=tt.q.instance.prodigy.gameContainer.get("b5b-6fa4"),B=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),U=B.hasText(this._yesButtonLocalizationKey)?B.getText(this._yesButtonLocalizationKey):B.getText(this._yesButtonText);k.addEvents([{dialogueData:k.dataProvider.get(this._dialogueID),blockInput:!0,yes:()=>this.onYes.dispatch(),no:()=>this.onNo.dispatch(),nextButtonText:this._nextButtonText,yesButtonText:U,isCancelButtonVisible:!this._hideCancelButton}]),k.start(!0)}destroy(){this.onYes.dispose(),this.onNo.dispose(),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],_m.prototype,"_dialogueID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],_m.prototype,"_nextButtonText",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],_m.prototype,"_yesButtonLocalizationKey",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],_m.prototype,"_yesButtonText",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],_m.prototype,"_hideCancelButton",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],_m.prototype,"onYes",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],_m.prototype,"onNo",void 0),_m=(0,G.Cg)([(0,j.EVk)("OpenYesNoDialogue",W.Y.uiDialog)],_m);var Em=U(38454),wm=U(15804);let Tm=class extends ff.l{constructor(){super(...arguments),this.onSkipped=new j.HN0,this._contentInputBlocker=null}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;return this._zoneName=null!==(k=this._loggedInPlayer.player.data.zone)&&void 0!==k?k:"",!!wm.h.shouldShowEntryIllustration(this._zoneName)||(this.onSkipped.dispatch(),!1)}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),this.setupContentInputBlocker(),this.openZoneEntryIllustration((()=>{this.onClose.dispatch()}))}))}openZoneEntryIllustration(k){wm.h.openZoneEntryIllustrationPrefabForZone(this._zoneName.split("-")[0]).then((B=>{this._game.broadcaster.broadcast(jn.Y1.HideHUD,jn.HG.HUD),this.destroyContentInputBlocker(),B.findComponentInChildren(Em.V).onComplete.addOnce((()=>{this._game.broadcaster.broadcast(jn.Y1.ShowHUD,jn.HG.HUD),null==k||k(),B.destroy()}))})).catch(j.RQr.createHandler("Could not load the zone entry illustration prefab"))}setupContentInputBlocker(){if(j.Aq$.isDefined(this._contentInputBlocker))return;this._contentInputBlocker=new j._mx,this._contentInputBlocker.addComponent(j.dLy);this._contentInputBlocker.addComponent(Fe.n).setSize(this._game.width,this._game.height),this._contentInputBlocker.setLayer(jh.E.ForegroundLayer)}destroyContentInputBlocker(){var k;null===(k=this._contentInputBlocker)||void 0===k||k.destroy(),this._contentInputBlocker=null}destroy(){this.onSkipped.dispose(),this.destroyContentInputBlocker(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Tm.prototype,"onSkipped",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Tm.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("51c-03a0"),(0,G.Sn)("design:type",Fg.n)],Tm.prototype,"_game",void 0),Tm=(0,G.Cg)([(0,j.EVk)("OpenZoneEntryIllustration",W.Y.uiPopup)],Tm);var Sm=U(5075);let Am=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return Sm.H.canShowEntryPopup()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),tt.q.instance.prodigy.open.prefabMenu(Rt.l.ZoneUnlockedPopup,(()=>{Sm.H.completeEntryBreadcrumb(),this.onClose.dispatch()}),void 0,void 0,void 0,{ZONE_STATUS_MODAL_TYPE:Sm.A.UNLOCKED,ZONE_STATUS_POPUP_TARGET_ID:Lg.i.getHighestAvailableZoneData().zone})}))}};Am=(0,G.Cg)([(0,j.EVk)("OpenZoneUnlockedPopup",W.Y.uiPopup)],Am);let Cm=class extends j.uAl{_setVisibility(k){tt.q.instance.game.broadcaster.broadcast(k?jn.Y1.ShowHUD:jn.Y1.HideHUD,jn.HG.HUD,[])}show(){this._setVisibility(!0)}hide(){this._setVisibility(!1)}};(0,G.Cg)([(0,j.DTs)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[Boolean]),(0,G.Sn)("design:returntype",void 0)],Cm.prototype,"_setVisibility",null),Cm=(0,G.Cg)([(0,j.EVk)("ToggleHUD",W.Y.ui)],Cm);let Om=class extends j.uAl{getCustomData(){const k={},B=this._loggedInPlayer.player.kennel.petTeam,U=B.length;for(let F=0;F{this.image.sprite.setTexture(k.texture),this.image.sprite.key=this.cacheKey;const B=tt.q.instance.game.cache.getFrameData(this.sourceImageKey);B&&(this.cacheColoredAnimationFrames(k,B),this.image.sprite.animations.loadFrameData(B)),this.onImageRecolored.dispatch()})),k}))}cacheColoredAnimationFrames(k,B){const U=k.texture,F=new $e.Rectangle(0,0,U.width,U.height),G=B.total;for(let j=0;j{this.GameObject&&(this.clearRenderer(),this.createAttributeRenderer(),this.onAssetChanged.dispatch())})).catch((k=>{throw j.VyI.log(`CustomizablePlayerAttribute#updateAttribute: ${k}`,j.$bb.Error),new Error(k)}))}))}destroy(){this.clearRenderer(),this.onIDChanged.dispose(),this.onAssetChanged.dispose(),super.destroy()}clearRenderer(){const k=this.GameObject.findComponent(Ke._);null!==k&&k.destroy()}}(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$m.prototype,"onAssetChanged",void 0);(0,G.Cg)([(0,j.Cdj)(j.t5G.AssetLoader),(0,G.Sn)("design:type",Object)],class extends $m{constructor(){super(...arguments),this.colorizeComponent=null,this.onColorIDChanged=new j.HN0,this.colorID=null}get ColorID(){return this.colorID}set ColorID(k){this.colorID=k,this.onColorIDChanged.dispatch()}create(){super.create(),this.colorizeComponent=this.GameObject.addComponent(jm)}updateAttribute(){const k=Object.create(null,{updateAttribute:{get:()=>super.updateAttribute}});return(0,G.sH)(this,void 0,void 0,(function*(){var B;yield k.updateAttribute.call(this);const U=null===(B=this.GameObject)||void 0===B?void 0:B.findComponent(Ke._);U&&(this.colorizeComponent.Image=U,yield this.updateColor())}))}updateColor(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this.isValidColor()){const k=this.colorizeComponent.sourceImageKey=this.getSourceImageKey();this.assetLoader.isLoaded(k,j.iO0.Image)||(yield this.assetLoader.loadAssets([k])),this.colorizeComponent.colorReplaceData=this.getColorReplaceData(),this.colorizeComponent.cacheKey=this.getCacheKey(),this.colorizeComponent.replaceColor().catch((k=>{j.VyI.log(`Could not replace color on colorized player attribute, ${k.message}`,j.$bb.Warning)}))}else j.VyI.log(`ColoredCustomizablePlayerAttribute: Set invalid color ${this.ColorID}`,j.$bb.Warning)}))}destroy(){this.onColorIDChanged.dispose(),super.destroy()}}.prototype,"assetLoader",void 0);let Hm=class extends j.uAl{constructor(){super(...arguments),this._quantity=1,this.onItemConsumed=new j.HN0}destroy(){this.onItemConsumed.dispose(),super.destroy()}consumeItem(){this._itemType&&this._itemID&&(this._player.backpack.consume(this._itemType,this._itemID,this._quantity),this.onItemConsumed.dispatch(this._itemType,this._itemID,this._quantity),this._player.forceSaveCharacter())}setItem(k,B,U=1){this._itemType=k,this._itemID=B,this._quantity=U}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Hm.prototype,"_itemType",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Hm.prototype,"_itemID",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Hm.prototype,"_quantity",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hm.prototype,"onItemConsumed",void 0),(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],Hm.prototype,"_player",void 0),Hm=(0,G.Cg)([(0,j.EVk)("ConsumeItem",W.Y.saving)],Hm);let Vm=class extends j.uAl{constructor(){super(...arguments),this._enable=!0}enablePlayerSaving(){this._loggedInPlayer.player.saveEnabled=this._enable}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Vm.prototype,"_enable",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Vm.prototype,"_loggedInPlayer",void 0),Vm=(0,G.Cg)([(0,j.EVk)("EnablePlayerSaving",W.Y.saving)],Vm);let Wm=class extends j.uAl{constructor(){super(...arguments),this.onXPReceived=new j.HN0,this._afterBattle=!1}destroy(){this.onXPReceived.dispose(),super.destroy()}setXPEarned(k){this._xpEarned=k}showSummary(){const k=ko.A.calculateXP(this._xpEarned),B=this._loggedInPlayer.player,U=B.kennel.petTeam.filter((k=>k));tt.q.instance.prodigy.open.resultsMenu(U,k,[],[],void 0,void 0,this._afterBattle).onClose=()=>{this.onXPReceived.dispatch(),B.updated=!0,B.kennel.updated=!0};const F=tt.q.instance.prodigy.gameContainer.get("c47-20b6");F.playerProgression.sendPlayerProgressionPointsEarnedEvent({pointType:"stars",pointCount:k.totalNonMemberXp+(B.hasMembership()?k.memberXp:0)},{instanceID:F.playerMovementAndDiscovery.getCurrentRunInstanceID(fi.N.CrystalCaverns),instanceType:fi.N.CrystalCaverns})}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wm.prototype,"onXPReceived",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Wm.prototype,"_xpEarned",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Wm.prototype,"_afterBattle",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Wm.prototype,"_loggedInPlayer",void 0),Wm=(0,G.Cg)([(0,j.EVk)("GivePlayerXP",W.Y.player)],Wm);U(43485);let qm=class extends j.uAl{heal(){this._loggedInPlayer.player.heal()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],qm.prototype,"_loggedInPlayer",void 0),qm=(0,G.Cg)([(0,j.EVk)("HealPlayerTeam",W.Y.player)],qm);var Km=U(20136);class zm extends j.$KW{generate(k,B){return j.XRp.createVertical([j.Gme.checkboxGroup({id:"applyOnCreate",labelValue:"Apply On Create",inputValue:k.applyOnCreate}),j.Gme.numberGroup({id:"alpha",labelValue:"Alpha",inputValue:k.alpha,onChange:(k,B)=>{const U=j.cj9.clamp(B,zm.MIN_ALPHA,zm.MAX_ALPHA);U!==B&&this._editorAPI.modifyComponent(this._componentGuid,{alpha:U})}})])}}zm.MIN_ALPHA=0,zm.MAX_ALPHA=1;let Ym=class extends ad.b{initialize(){super.initialize();const k=new Km.Z;k.alpha=this.alpha,this._filterList.push(k)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ym.prototype,"alpha",void 0),Ym=(0,G.Cg)([(0,j.EVk)("AlphaPIXIFilter",W.Y.effect),(0,j.WR4)(zm)],Ym);var Qm=U(47389);let Xm=class extends j.uAl{create(){super.create(),this._appearanceSelector&&(this._playerData?(this._appearanceSelector.onAppearanceLoaded.add(this.updatePlayerOpacity,this),this.updatePlayerOpacity()):j.VyI.log("InvisibilityCloakOpacityComponent: Failed to initialize the component due to missing player data provider",j.$bb.Error))}destroy(){var k;null===(k=this._appearanceSelector.onAppearanceLoaded)||void 0===k||k.remove(this.updatePlayerOpacity,this),super.destroy()}updatePlayerOpacity(){116===this._playerData.player.equipment.getOutfit()?(this._alphaFilterComponent.alpha=this._equippedOpacity,this._alphaFilterComponent.reset()):this.clearEffect()}clearEffect(){this._alphaFilterComponent&&(this._alphaFilterComponent.alpha=1,this._alphaFilterComponent.removeFilter())}};(0,G.Cg)([(0,j.Cdj)("377-3e7b"),(0,G.Sn)("design:type",Object)],Xm.prototype,"_playerData",void 0),(0,G.Cg)([(0,j.MnK)(Qm.b),(0,G.Sn)("design:type",Qm.b)],Xm.prototype,"_appearanceSelector",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Xm.prototype,"_equippedOpacity",void 0),(0,G.Cg)([(0,j.MnK)(Ym),(0,G.Sn)("design:type",Ym)],Xm.prototype,"_alphaFilterComponent",void 0),Xm=(0,G.Cg)([(0,j.EVk)("InvisibilityCloakOpacity",W.Y.playerAnimation)],Xm);var Zm=U(63398);let Jm=class extends j.uAl{constructor(){super(...arguments),this._showWeapon=!1,this._onAppearanceReloaded=new j.HN0}get onAppearanceReloaded(){return this._onAppearanceReloaded}create(){super.create(),this.reloadPlayerAppearance=this.reloadPlayerAppearance.bind(this);const k=tt.q.instance.game.broadcaster;k.addAppListener(jn.J8.PlayerEditingMenuClosed,this.reloadPlayerAppearance,this),k.addAppListener(jn.J8.PlayerAppearanceUpdated,this.reloadPlayerAppearance,this)}postCreate(){super.postCreate(),this.loadPlayerAppearance()}destroy(){const k=tt.q.instance.game.broadcaster;k.removeAppListener(jn.J8.PlayerEditingMenuClosed,this),k.removeAppListener(jn.J8.PlayerAppearanceUpdated,this),this._onAppearanceReloaded.dispose(),this._onAppearanceReloaded=null,super.destroy()}addWeapon(k){this._weapon=k,this._showWeapon=!0,this.reloadPlayerAppearance()}removeWeapon(){this._showWeapon=!1,this._weapon=null,this.reloadPlayerAppearance()}loadPlayerAppearance(){const k=this._playerData.getAppearance();k.weapon=this._showWeapon?this._weapon:k.weapon,this._playerAppearanceSelector.setAppearance(k).catch(j.RQr.createHandler("Could not set player appearance"))}reloadPlayerAppearance(){this.loadPlayerAppearance(),this._onAppearanceReloaded.dispatch()}};(0,G.Cg)([(0,j.Pqz)(Qm.b),(0,G.Sn)("design:type",Qm.b)],Jm.prototype,"_playerAppearanceSelector",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Jm.prototype,"_playerData",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Jm.prototype,"_onAppearanceReloaded",void 0),Jm=(0,G.Cg)([(0,j.EVk)("MainPlayerAppearanceListener",W.Y.playerAnimation)],Jm);j.uAl;var ty,ey=U(89717),iy=U(63115),sy=U(39325),ny=U(44356);class ay extends j.y4o{static make(k,B){const U=k.addComponent(ay,!1);return U.sprite=B,U.create(),U}create(){super.create(),this.setRootContainer(this.sprite)}getDimensions(){return new j.or0(this.sprite.width,this.sprite.height)}}let ry=ty=class extends j.uAl{constructor(){super(...arguments),this._emoteSprite=null,this._timer=null,this._tween=null}showEmote(k){const B=Yt.t.getItem("emote",k);if(!B)return j.VyI.log(`Emote ID ${k} is not valid.`,j.$bb.Warning),void tt.q.instance.prodigy.gameContainer.get("c47-20b6").playerIdentityAvatar.sendEmoteFailedEvent({emote_name:B.data.name,emote_type:ny.H.Emote,fail_reason:`Emote ID ${k} is not valid.`});this.showBubbleEmote(k)}showAnimatedEmote(k){this.stopBubbleEmote()}showBubbleEmote(k){this.stopAnimatedEmote(),this.stopBubbleEmote(),this._bubble.active=!0,this._emoteSprite=ay.make(this._emoteIcon,tt.q.instance.prodigy.create.sprite(0,0,fs.E.getIconForType("emote",k),null,null,null,ty.EMOTE_ICON_SIZE,ty.EMOTE_ICON_SIZE)),this._emoteSprite.sprite.name=`Chat Bubble Icon ${k}`,this._bubble.transform.localScale.x=0,this._bubble.transform.localScale.y=0,this._tween=tt.q.instance.game.add.tween(this._bubble.transform.localScale,this).to({x:1.2,y:1.2},200,j.GS3.Quadratic.Out).to({x:.8,y:1},200,j.GS3.Quadratic.In).to({x:1,y:.8},200,j.GS3.Quadratic.Out).to({x:1,y:1},200,j.GS3.Quadratic.In).start(),this._timer=window.setTimeout((()=>{this.stopBubbleEmote()}),ty.BUBBLE_EMOTE_DURATION)}stopAnimatedEmote(){this.cleanUpTimer()}stopBubbleEmote(){this._bubble&&(this._bubble.active=!1),this._emoteSprite&&(this._emoteSprite.destroy(),this._emoteSprite=null),this._tween&&(this._tween.remove(),this._tween=null),this.cleanUpTimer()}cleanUpTimer(){null!==this._timer&&(window.clearTimeout(this._timer),this._timer=null)}destroy(){this.stopAnimatedEmote(),this.stopBubbleEmote(),super.destroy()}};var oy;ry.EMOTE_ICON_SIZE=40,ry.BUBBLE_EMOTE_DURATION=3e3,(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ry.prototype,"_bubble",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ry.prototype,"_emoteIcon",void 0),ry=ty=(0,G.Cg)([(0,j.EVk)("PlayerChatEmote",W.Y.player)],ry);let hy=oy=class extends j.uAl{constructor(){super(...arguments),this._chatStarted=new j.HN0,this._chatEnded=new j.HN0,this._timer=null}setChat(k){j.Aq$.isDefined(k)?(this._chatText.GameObject.active=!0,this._chatText.text=`"${k}"`,null===this._timer?this._chatStarted.dispatch():window.clearTimeout(this._timer),this._timer=window.setTimeout((()=>{this.clearChat()}),oy.CHAT_TIMER)):j.VyI.log("Invalid chat message received",j.$bb.Error)}clearChat(){var k;j.Aq$.isDefined(this._timer)&&(window.clearTimeout(this._timer),this._timer=null),(null===(k=this._chatText)||void 0===k?void 0:k.GameObject)&&(this._chatText.GameObject.active=!1),this._chatEnded.dispatch()}destroy(){this._chatStarted.dispose(),this._chatEnded.dispose(),this.clearChat(),super.destroy()}};hy.CHAT_TIMER=5e3,(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],hy.prototype,"_chatText",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hy.prototype,"_chatStarted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hy.prototype,"_chatEnded",void 0),hy=oy=(0,G.Cg)([(0,j.EVk)("PlayerChatMessage",W.Y.player)],hy);let cy=class extends j.JTX{startDance(k){this._pathLocomotion.stop(),this._animationStateController.playAnimation(k)}};(0,G.Cg)([(0,j.MnK)(sy.F),(0,G.Sn)("design:type",sy.F)],cy.prototype,"_animationStateController",void 0),(0,G.Cg)([(0,j.MnK)(j.KhP),(0,G.Sn)("design:type",j.KhP)],cy.prototype,"_pathLocomotion",void 0),cy=(0,G.Cg)([(0,j.EVk)("PlayerDance",W.Y.player)],cy);let dy=class extends Zm.k{create(){super.create(),this.setCurrentToBindPose()}updateFrameName(k){const B=this.GameObject.findComponent(Ke._);null!==B&&B.setFrameName(`${this.AnimationTargetKey}_${k}`)}};dy=(0,G.Cg)([(0,j.EVk)("PlayerKeyFrameAnimator",W.Y.playerAnimation)],dy);let ly=class extends j.uAl{constructor(){super(...arguments),this.onPlayerMoved=new j.HN0,this.onPlayerStopped=new j.HN0,this._isStopped=!0}create(){var k,B;super.create();const U=tt.q.instance.game.state.get(Tt.G.TileScreen);(null==U?void 0:U.user)?(this._mainPlayerContainer=U.user,null===(k=this._mainPlayerContainer)||void 0===k||k.onPathFound.add(this.playerSetPath,this),null===(B=this._mainPlayerContainer)||void 0===B||B.onStand.add(this.playerStopped,this)):this._playerLocomotion?(this._playerLocomotion.onPathStart.add(this.playerSetPath,this),this._playerLocomotion.onPathEnd.add(this.playerStopped,this)):j.VyI.log(`PlayerMovementSignalComponent attached to ${this.gameObject.name}. No TileScreen or PathLocomotionComponent found.`,j.$bb.Warning)}playerSetPath(k){this.onPlayerMoved.dispatch(),this._isStopped=!1}playerStopped(){this._isStopped||this.onPlayerStopped.dispatch(),this._isStopped=!0}destroy(){var k,B,U,F;this.onPlayerStopped.dispose(),this.onPlayerMoved.dispose(),null===(k=this._mainPlayerContainer)||void 0===k||k.onPathFound.remove(this.playerSetPath,this),null===(B=this._mainPlayerContainer)||void 0===B||B.onStand.remove(this.playerSetPath,this),null===(U=this._playerLocomotion)||void 0===U||U.onPathStart.remove(this.playerSetPath,this),null===(F=this._playerLocomotion)||void 0===F||F.onPathEnd.remove(this.playerStopped,this),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("PlayerLocomotion"),(0,G.Sn)("design:type",j.KhP)],ly.prototype,"_playerLocomotion",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ly.prototype,"onPlayerMoved",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ly.prototype,"onPlayerStopped",void 0),ly=(0,G.Cg)([(0,j.EVk)("PlayerMovementSignal",W.Y.motion)],ly);var uy=U(37193);let fy=class extends j.uAl{create(){super.create(),this.updateNameplate(),tt.q.instance.game.broadcaster.addAppListener(jn.J8.PlayerAppearanceUpdated,this.updateNameplate,this)}updateNameplate(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._playerData){{const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0");this._playerData.isActivePlayer()&&k.player.shouldShowUsernameAbovePlayer()?k.player.shouldShowWizardNameAbovePlayer()?(this._nameLabel.text=this._playerData.player.getName(),this._secondaryNameLabel.text=k.loginCredentials.username):(this._nameLabel.text=k.loginCredentials.username,this._nameLabel.stroke=$h.E.USERNAME_DISPLAY_STROKE_COLOR,this._nameLabel.strokeThickness=$h.E.USERNAME_DISPLAY_STROKE_THICKNESS,this._nameLabel.fontSize=$h.E.USERNAME_DISPLAY_FONT_SIZE,this._nameLabel.update()):this._nameLabel.text=this._playerData.player.getName()}{const k=this._playerData.isMember();if(this._membershipIcon.GameObject.active=k,k){if(js.D.isFeatureEnabled()&&this._playerData.isActivePlayer()){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getMemberTier(),B=uy.i.PLAYER_MEMBERSHIP_ICON_IMAGES[k];B&&(yield this._membershipIcon.setAsset(B.atlas,B.frame))}this._membershipIcon.isLoaded||(yield new Promise((k=>{this._membershipIcon.OnLoaded.addOnce(k)})));const k=this._nameLabel.TextObject;this._membershipIcon.GameObject.transform.setPosition(Math.floor(-.5*(k.width+this._membershipIcon.getWidth()+1)),Math.floor(k.y+1)),this._nameLabel.GameObject.transform.setPosition(Math.floor(.5*this._membershipIcon.getWidth()),0)}}}}))}destroy(){tt.q.instance.game.broadcaster.removeAppListener(jn.J8.PlayerAppearanceUpdated,this)}};(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],fy.prototype,"_membershipIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],fy.prototype,"_nameLabel",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],fy.prototype,"_secondaryNameLabel",void 0),(0,G.Cg)([(0,j.Cdj)("377-3e7b"),(0,G.Sn)("design:type",Object)],fy.prototype,"_playerData",void 0),fy=(0,G.Cg)([(0,j.EVk)("PlayerNameplate",W.Y.player)],fy);U(6190);var by=U(82209);let py=class extends j.uAl{constructor(){super(...arguments),this._enableInput=!0,this._facingDirection=Me.y.Right,this._onPlayerSpawned=new j.HN0}spawn(k){this._spawnParent.children.forEach((k=>k.destroy()));const B=new by.z,U={"377-3e7b":B,FacingDirection:this._facingDirection};B.initialize(k),Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.RemotePlayer,U,this._spawnParent).then((k=>(0,G.sH)(this,void 0,void 0,(function*(){this.GameObject&&!this.GameObject.isDestroyed&&(this._playerGameObject=k,this._playerGameObject.active=!1,this.setInputEnabled(),this.setAlertHeight(),this.setAnimations(),yield this.setPlayerAppearance(B),!this.GameObject||this.GameObject.isDestroyed||this._playerGameObject.isDestroyed||(this._playerGameObject.active=!0,this._onPlayerSpawned.dispatch(this._playerGameObject)))})))).catch(j.RQr.createHandler("[SpawnPlayerAppearanceComponent] Error loading Player Prefab"))}setPlayerAppearance(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=this._playerGameObject.findComponentInChildren(Qm.b).setAppearance(k.getAppearance()).catch(j.RQr.createHandler("[SpawnPlayerAppearanceComponent] setAppearance failed")),U=this._playerGameObject.findComponentInChildren(iy.T),F=U?U.updateMountAppearance().catch(j.RQr.createHandler("[SpawnPlayerAppearanceComponent] updateMountAppearance failed")):Promise.resolve();yield Promise.all([B,F])}))}setInputEnabled(){this._playerGameObject.findComponentInChildren(em.T).GameObject.active=this._enableInput}setAlertHeight(){const k=this._playerGameObject.findComponentInChildren(fy),B=this._speechBubble.transform;B.setPosition(B.localPosition.x,k.GameObject.transform.localPosition.y)}setAnimations(){const k=this._playerGameObject.findComponentInChildren(Rn.K);this._alertFSM.animationController=k,k.changeState(0);const B=this._playerGameObject.findComponentInChildren(j.KhP);this._alertFSM.monsterWalk.onMoveStart.addOnce((()=>B.setPath([this.gameObject.transform.worldPosition,this._alertFSM.monsterWalk.MoveTarget])))}destroy(){this._onPlayerSpawned.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],py.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],py.prototype,"_spawnParent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],py.prototype,"_speechBubble",void 0),(0,G.Cg)([(0,j.MnK)(Ti.K),(0,G.Sn)("design:type",Ti.K)],py.prototype,"_alertFSM",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],py.prototype,"_enableInput",void 0),(0,G.Cg)([(0,j.gfw)(Me.y),(0,G.Sn)("design:type",Number)],py.prototype,"_facingDirection",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],py.prototype,"_onPlayerSpawned",void 0),py=(0,G.Cg)([(0,j.EVk)("SpawnPlayerAppearance",W.Y.player)],py);U(97530),U(54584),U(86675),U(48215),U(17737);let vy=class extends j.uAl{constructor(){super(...arguments),this._bodyLocalizationKey="MULTIPLIER_AD_BODY_TITANSHARD"}create(){super.create(),this._bodyMessage.text=this._localizer.getText(this._bodyLocalizationKey,this._weekendEvents.getTitanShardMultiplier())}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],vy.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],vy.prototype,"_bodyLocalizationKey",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],vy.prototype,"_bodyMessage",void 0),(0,G.Cg)([(0,j.Cdj)("12b-405a"),(0,G.Sn)("design:type",Xp.n)],vy.prototype,"_weekendEvents",void 0),vy=(0,G.Cg)([(0,j.EVk)("SetTitanShardEventAdText",W.Y.uiAd)],vy);var gy=U(46902),my=U(59347);let yy=class extends j.uAl{setTeleportMapTag(k){this._canTeleport&&(this._canTeleport.mapTag=k),this._teleport&&(this._teleport.mapTag=k),k&&(this._teleportMessage.key=this._localizer.getText("TRAVEL_CONFIRM_MESSAGE",tt.q.instance.prodigy.world.getZone(k.split("-")[0]).name))}setupTeleport(k){this.setTeleportMapTag(Lg.i.getTeleportMapTag(this._weekendEvents.isMultiZone(k)?this._weekendEvents.getRandomZoneID(k):k))}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],yy.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.MnK)(is.$),(0,G.Sn)("design:type",is.$)],yy.prototype,"_canTeleport",void 0),(0,G.Cg)([(0,j.MnK)(ss.q),(0,G.Sn)("design:type",ss.q)],yy.prototype,"_teleport",void 0),(0,G.Cg)([(0,j.MnK)(my.S),(0,G.Sn)("design:type",my.S)],yy.prototype,"_teleportMessage",void 0),(0,G.Cg)([(0,j.Cdj)("12b-405a"),(0,G.Sn)("design:type",Xp.n)],yy.prototype,"_weekendEvents",void 0),yy=(0,G.Cg)([(0,j.EVk)("SetupEventAdTeleport",W.Y.uiAd)],yy);let _y=class extends j.uAl{constructor(){super(...arguments),this._bodyLocalizationKey="MULTIPLIER_AD_BODY_CURRENCY",this.ZoneCurrencyAssets={[Ft.A_.SHIVERCHILL]:ps.q._2xShivers_CurrencyWeekend,[Ft.A_.SHIPWRECK]:ps.q._2xYars_CurrencyWeekend,[Ft.A_.SKYWATCH]:ps.q._2xAeros_CurrencyWeekend,[Ft.A_.FOREST]:ps.q._2xFlorians_CurrencyWeekend,[Ft.A_.BONFIRE]:ps.q._2xHotHots_CurrencyWeekend,[gy.Q.AllZones]:ps.q._2xAll_CurrencyWeekend}}create(){super.create();const k=this._weekendEvents.getEvents(Xp.R.Currency);let B="",U="",F="";k.forEach(((G,j)=>{this.setAdImage(this.getAdImage(G.zone)),B+=this._weekendEvents.getZoneDisplayName(G.zone),U+=G.bonusMultiplier,F+=this.getCurrencyType(G.zone),j===k.length-2?(B+=" & ",U+=" & ",F+=" & "):j!==k.length-1&&(B+=", ",U+=", ",F+=", "),this._setupEventAdTeleport.setupTeleport(G.zone)})),this._bodyMessage.text=this._localizer.getText(this._bodyLocalizationKey,U,F,B)}getCurrencyType(k){if(k===gy.Q.Global||k===gy.Q.AllZones)return this._localizer.getText("MONEY");if(k===gy.Q.AllInstances)return this._localizer.getText("GOLD");const B=tt.q.instance.prodigy.world.getZone(k).currency;return B?Yt.t.getItem("currency",B).data.name:this._localizer.getText("GOLD")}getAdImage(k){var B;return null!==(B=this.ZoneCurrencyAssets[k])&&void 0!==B?B:ps.q.CurrencyWeekend_gold_coin}setAdImage(k){var B;null===(B=this._adImage)||void 0===B||B.setAsset(k)}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],_y.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],_y.prototype,"_bodyLocalizationKey",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],_y.prototype,"_bodyMessage",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],_y.prototype,"_adImage",void 0),(0,G.Cg)([(0,j.Cdj)("12b-405a"),(0,G.Sn)("design:type",Xp.n)],_y.prototype,"_weekendEvents",void 0),(0,G.Cg)([(0,j.MnK)(yy),(0,G.Sn)("design:type",yy)],_y.prototype,"_setupEventAdTeleport",void 0),_y=(0,G.Cg)([(0,j.EVk)("SetupCurrencyEventAd",W.Y.uiAd)],_y);let Ey=class extends j.uAl{constructor(){super(...arguments),this._bodyLocalizationKey="MULTIPLIER_AD_BODY_XP"}create(){super.create();const k=this._weekendEvents.getEvents(Xp.R.Xp);let B="",U="";k.forEach(((F,G)=>{B+=this._weekendEvents.getZoneDisplayName(F.zone),U+=F.bonusMultiplier,G===k.length-2?(B+=" & ",U+=" & "):G!==k.length-1&&(B+=", ",U+=", "),this._setupEventAdTeleport.setupTeleport(F.zone)})),this._bodyMessage.text=this._localizer.getText(this._bodyLocalizationKey,U,B)}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Ey.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ey.prototype,"_bodyLocalizationKey",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ey.prototype,"_bodyMessage",void 0),(0,G.Cg)([(0,j.Cdj)("12b-405a"),(0,G.Sn)("design:type",Xp.n)],Ey.prototype,"_weekendEvents",void 0),(0,G.Cg)([(0,j.MnK)(yy),(0,G.Sn)("design:type",yy)],Ey.prototype,"_setupEventAdTeleport",void 0),Ey=(0,G.Cg)([(0,j.EVk)("SetupXpEventAd",W.Y.uiAd)],Ey);let wy=class extends j.uAl{postCreate(){super.postCreate(),this.applyBlendMode()}applyBlendMode(){if(this.target){const k=this.target.getRootContainer();"blendMode"in k?k.blendMode=this._blendMode:j.VyI.log("This RenderComponent type is not yet supported.",j.$bb.Error)}}};var Ty;(0,G.Cg)([(0,j.MnK)(j.y4o),(0,G.Sn)("design:type",j.y4o)],wy.prototype,"target",void 0),(0,G.Cg)([(0,j.gfw)($e.BLEND_MODES),(0,G.Sn)("design:type",Number)],wy.prototype,"_blendMode",void 0),wy=(0,G.Cg)([(0,j.EVk)("BlendModeRender",W.Y.effect)],wy),function(k){k[k.Clamp=0]="Clamp",k[k.Shrink=1]="Shrink",k[k.Grow=2]="Grow",k[k.None=3]="None"}(Ty||(Ty={}));let Sy=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.widthMode=Ty.Clamp,this.heightMode=Ty.Clamp,this.widthBounds=new j.I9Y(Number.MIN_VALUE,Number.MAX_VALUE),this.heightBounds=new j.I9Y(Number.MIN_VALUE,Number.MAX_VALUE)}postCreate(){this.addListenerToSignal(this._rectTransform.onRecalculatedBounds,this.limitRectToBounds.bind(this)),this.limitRectToBounds()}limitRectToBounds(){const{widthDelta:k,heightDelta:B}=this._rectTransform;this._rectTransform.setSizeDelta(this.getValueWithBounds(k,this.widthBounds,this.widthMode),this.getValueWithBounds(B,this.heightBounds,this.heightMode))}getValueWithBounds(k,B,U){return(()=>{switch(U){case Ty.Shrink:return Math.min(k,B.x);case Ty.Grow:return Math.max(k,B.y);case Ty.None:return k;case Ty.Clamp:default:return j.cj9.clamp(k,B.x,B.y)}})()}};(0,G.Cg)([(0,j.Pqz)(j.XVE),(0,G.Sn)("design:type",j.XVE)],Sy.prototype,"_rectTransform",void 0),(0,G.Cg)([(0,j.gfw)(Ty),(0,G.Sn)("design:type",Number)],Sy.prototype,"widthMode",void 0),(0,G.Cg)([(0,j.gfw)(Ty),(0,G.Sn)("design:type",Number)],Sy.prototype,"heightMode",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],Sy.prototype,"widthBounds",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],Sy.prototype,"heightBounds",void 0),Sy=(0,G.Cg)([(0,j.EVk)("BoundRectSize",W.Y.uiLayout,"Bind the size of a rect transform to these magic vectors!")],Sy);U(44725);let Ay=class extends j.y4o{constructor(){super(...arguments),this._atlas=null,this._dotImageDefault=null,this._dotImageInProgress=null,this._dotImageComplete=null,this._lineImageDefault=null,this._lineImageComplete=null,this._customEndImageDefault=null,this._customEndImageInProgress=null,this._customEndImageComplete=null,this._lineOffsetX=0,this._endOffsetX=0,this._fixedLength=-1,this._actualTotalLength=0,this._dotsDefault=[],this._dotsInProgress=[],this._dotsComplete=[],this._linesDefault=[],this._linesComplete=[],this.onDiscreteImageProgressMeterCreated=new j.HN0}create(){super.create(),this.addNewDot(),this.addNewLine(),this.onDiscreteImageProgressMeterCreated.dispatch()}addNewDot(k=!1){this.createImage(k&&this._customEndImageDefault?this._customEndImageDefault:this._dotImageDefault,this._dotsDefault,!0),this.createImage(k&&this._customEndImageInProgress?this._customEndImageInProgress:this._dotImageInProgress,this._dotsInProgress,!0),this.createImage(k&&this._customEndImageComplete?this._customEndImageComplete:this._dotImageComplete,this._dotsComplete,!0)}addNewLine(){this.createImage(this._lineImageDefault,this._linesDefault),this.createImage(this._lineImageComplete,this._linesComplete)}createImage(k,B,U=!1){const F=new j._mx(this.gameObject);F.addComponent(j.dLy);const G=F.addComponent(j.vYh);G.updateAsset(this._atlas,k),G.GameObject.active=!0,U&&G.GameObject.sendToBack(),B.push(F)}setFixedLength(k){this._actualTotalLength=0?this._fixedLength:null!=B?B:0,this._totalLength!==this._actualTotalLength){for(this._actualTotalLength=this._totalLength;this._dotsDefault.length=0&&this._dotsDefault.length===this._totalLength-1);for(;this._linesDefault.length=0?this._endOffsetX:0,j=Fk,this._dotsInProgress[U].active=U===k,this._dotsComplete[U].active=U=k,this._linesComplete[U].active=U{var B;k.keyCode===Dy.D.ENTER&&(null===(B=this.submitButton)||void 0===B?void 0:B.getButtonState())!==Ku.K.Disabled&&this.submitButton.IsActiveInHierarchy&&this.submitForm()}))}destroy(){this.onSubmit.dispose(),super.destroy()}submitForm(){const k=this.gameObject.findComponentsInChildren(kt.S).map((k=>k._input.value));this.onSubmit.dispatch(...k)}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ry.prototype,"onSubmit",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Ry.prototype,"submitButton",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Ry.prototype,"submitOnEnter",void 0),Ry=(0,G.Cg)([(0,j.EVk)("Form",W.Y.uiInput)],Ry);let Py=class extends j.uAl{constructor(){super(...arguments),this._loadingAtlas=Ve._.General_core_json,this.onStartLoading=new j.HN0,this.onAssetLoaded=new j.HN0,this.forceNativeImageSize=!1}init(){j.Aq$.isDefined(this._loadingSpinner)||(this._loadingSpinner=this.gameObject.addComponent(Ke._)),this._loadingSpinner.setAsset(this._loadingAtlas,"loading").then((()=>{this.gameObject.isDestroyed||this._loadingSpinner.GameObject.isDestroyed||(this._loadingTween?this._loadingTween.stop():this._loadingTween=tt.q.instance.game.add.tween(this._loadingSpinner.GameObject.transform,this._loadingSpinner.GameObject).to({localRotation:360},2e3,j.GS3.Linear.None,!1,0,-1),this._loadingSpinner.Active&&this._loadingTween.start())})).catch(j.RQr.createHandler("Failed to load loading spinner")),this._loadingSpinner.Active=!1}updateAsset(k,B){var U;this._loadingSpinner||this.init(),this.onStartLoading.dispatch(k,B),tt.q.instance.prodigy.load.isFileLoaded(k)?this.setAsset(k,B):(null===(U=this._loadingTween)||void 0===U||U.start(),this._graphic.Active=!1,this._loadingSpinner.Active=!0,tt.q.instance.prodigy.load.assets(k,(()=>this.setAsset(k,B))))}setAsset(k,B){var U;if(null===(U=this._loadingTween)||void 0===U||U.stop(),this._graphic.Active=!0,this._loadingSpinner.Active=!1,this.gameObject.transform.localRotation=0,this.onAssetLoaded.dispatch(k,B),this._graphic.updateAsset(k,B),this.forceNativeImageSize){const k=this.gameObject.findComponent(j.XVE);j.Aq$.isDefined(k)&&(k.widthDelta=this._graphic.getDimensions().width,k.heightDelta=this._graphic.getDimensions().height)}}destroy(){this.onStartLoading.dispose(),this.onAssetLoaded.dispose(),tt.q.instance.game.tweens.remove(this._loadingTween),this._loadingTween=null,super.destroy()}};(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],Py.prototype,"_loadingAtlas",void 0),(0,G.Cg)([(0,j.Pqz)(j.vYh),(0,G.Sn)("design:type",j.vYh)],Py.prototype,"_graphic",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Py.prototype,"onStartLoading",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Py.prototype,"onAssetLoaded",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Py.prototype,"forceNativeImageSize",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],Py.prototype,"_loadingSpinner",void 0),Py=(0,G.Cg)([(0,j.EVk)("GraphicAssetLoader",W.Y.utility)],Py);U(12861);let My=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.setWidth=!0,this.setHeight=!0}postCreate(){var k;this._parentRect=null===(k=this.gameObject.parent)||void 0===k?void 0:k.findComponent(j.XVE),null!=this._parentRect&&this.addListenerToSignal(this._parentRect.onDimensionsChanged,this.updateDimensions.bind(this)),this.addListenerToSignal(this._rectTransform.onDimensionsChanged,this.updateDimensions.bind(this)),this.updateDimensions()}updateDimensions(){null!=this._parentRect&&this._rectTransform.setSizeDelta(this.setWidth?this._parentRect.fullWidth:this._rectTransform.fullWidth,this.setHeight?this._parentRect.fullHeight:this._rectTransform.fullHeight)}};(0,G.Cg)([(0,j.Pqz)(j.XVE),(0,G.Sn)("design:type",j.XVE)],My.prototype,"_rectTransform",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],My.prototype,"setWidth",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],My.prototype,"setHeight",void 0),My=(0,G.Cg)([(0,j.EVk)("GrowToContainer",W.Y.uiLayout,"Size your object to fill its container (uses width and height instead of anchors)")],My);U(21397),U(79979);var Ny=U(23034),xy=U(7259);let Ly=class extends j.uAl{constructor(){super(...arguments),this._id="",this._placeholder="",this._tabindex=0,this._clearable=!0,this._showMaxCharacter=!0,this.minCharacter=4,this.maxCharacter=250,this._textColor="#363636",this._backgroundColor="#fff5eb",this._backgroundColorDisabled="#f0f0f0",this._padding=15,this._borderRadius=10,this._borderWidth=1,this._borderStyle="solid",this._borderColor="#363636",this._bottomTextColor="#9f9f9f",this._overMaxCharacterTextColor="#f10000",this._showScrollbarAlways=!0,this._fontFamily=null,this._fontSize=18,this._rows=7,this._outer=document.createElement("div"),this._input=document.createElement("textarea"),this._scrollbarStyle=null,this._bottom=null,this._maxCharactersIndicator=null,this._clearContainer=null,this._clearIcon=document.createElement("i"),this._clearText=document.createElement("div"),this._canvas=null,this._onTextChanged=new j.HN0,this._onFocusChanged=new j.HN0,this.onClear=new j.HN0,this.onTextValid=new j.HN0,this._showExternalPrompt=!1}get id(){return this._id?this._id:null}set text(k){this._input&&(this._input.value=k)}get text(){return this._input?this._input.value:null}get htmlText(){if(this._input)return this.escapeHTML(this._input.value)}get htmlOuterElement(){return this._outer}get htmlTextareaElement(){return this._input}get onTextChanged(){return this._onTextChanged}get onFocusChanged(){return this._onFocusChanged}create(){super.create(),this._localizer=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),this.createOuter(),this.createTextarea(this._outer),this.isShowMaxLength()&&this.createMaxLengthIndicator(this.getBottom(this._outer)),this._clearable&&this.createClearButton(this.getBottom(this._outer)),this.isExternalPromptRequired()&&(this._showExternalPrompt=!0),this.applyTransform(),this.addListeners()}isExternalPromptRequired(){return j.o5U.isAndroid()}setDisabled(k){this._input.disabled=k,this._input.style.backgroundColor=k?this._backgroundColorDisabled:this._backgroundColor}setClearContainerVisibility(k){this._clearContainer&&(this._clearContainer.style.display=k?"flex":"none")}addListeners(){this._onTextChangedHandler=k=>{this.setClearContainerVisibility(""!==this.text),this.updateMaxLengthIndicator(),this._onTextChanged.dispatch()},this._onFocusHandler=k=>{if(this._showExternalPrompt)return k.preventDefault(),k.stopImmediatePropagation(),void this._input.blur();this.handleFocusChanged(!0),this._onFocusChanged.dispatch()},this._onBlurHandler=k=>{if(this._showExternalPrompt)return k.preventDefault(),void k.stopImmediatePropagation();this.handleFocusChanged(!1)},this._onClickHandler=k=>(0,G.sH)(this,void 0,void 0,(function*(){this._input.blur();const k=yield xy.y.showTextareaPrompt(this._placeholder,this.text,this.maxCharacter);j.Aq$.isDefined(k)&&(this.text=k,this.setClearContainerVisibility(""!==this.text),this.updateMaxLengthIndicator(),this._onTextChanged.dispatch())})),this._showExternalPrompt&&this._input.addEventListener("click",this._onClickHandler),this._input.addEventListener("focus",this._onFocusHandler),this._input.addEventListener("blur",this._onBlurHandler),this._onResizeHandler=k=>{window.setTimeout((()=>{this.applyTransform()}),1)},window.addEventListener("resize",this._onResizeHandler),this.enablePerKeyEvents(!0)}getPositionRelativeToParent(k,B={x:0,y:0}){const U={x:B.x+(k.legacyTransform?k.legacyTransform.x:k.transform.localPosition.x),y:B.y+(k.legacyTransform?k.legacyTransform.y:k.transform.localPosition.y)};return k.parent?this.getPositionRelativeToParent(k.parent,U):U}applyTransform(){this._canvas||(this._canvas=document.getElementById("game-container").getElementsByTagName("canvas")[0]),this.setStyle("paddingLeft","0"),this.setStyle("paddingRight","0"),this.setStyle("paddingTop","0"),this.setStyle("paddingBottom","0"),this.setStyle("borderLeftWidth","0"),this.setStyle("borderRightWidth","0"),this.setStyle("borderTopWidth","0"),this.setStyle("borderBottomWidth","0");const{x:k,y:B}=this.getPositionRelativeToParent(this.GameObject);let U,F;this.GameObject.transform instanceof j.XVE?(U=this.GameObject.transform.sizeDelta.width,F=this.GameObject.transform.sizeDelta.height):this.GameObject.legacyTransform?(U=this.GameObject.legacyTransform.width,F=this.GameObject.legacyTransform.height):j.VyI.log("The GameObject needs to have a RectTransform or LegacyTransform attached to it in order to size the input field appropriately.",j.$bb.Error);const G=this._canvas.clientHeight/tt.q.instance.game.world.height,$=this._canvas.clientWidth/tt.q.instance.game.world.width,H=G*B+(this._outer.style.marginTop?parseInt(this._outer.style.marginTop):0),V=$*k+(this._outer.style.marginLeft?parseInt(this._outer.style.marginLeft):0),W=G*this._fontSize;Qt.J.setOuterHeight(this._outer,G*F),Qt.J.setOuterWidth(this._outer,$*U);const q=this._outer.style;q.top=`${H}px`,q.left=`${V}px`,q.fontSize=`${W}px`,q.paddingTop=G*this._padding+"px",q.paddingBottom=G*this._padding+"px",q.paddingLeft=$*this._padding+"px",q.paddingRight=$*this._padding+"px";const K=this.GameObject.findComponentInParent(z.B),Y=null==K?void 0:K.getCollisionBox();Y&&(BY.worldTransform.ty+Y.height||kY.worldTransform.tx+Y.width?this.setStyle("display","none"):this.setStyle("display","unset"))}setVisible(k){this._outer.style.visibility=k?"visible":"hidden"}setOpacity(k){this._outer.style.opacity=k}setStyle(k,B){this._outer.style.setProperty(k,B)}enablePerKeyEvents(k){k?this._input.addEventListener("keyup",this._onTextChangedHandler):this._input.removeEventListener("keyup",this._onTextChangedHandler)}handleFocusChanged(k){k?tt.q.instance.game.input.keyboard.clearCaptures():tt.q.instance.game.input.keyboard.addKeyCapture([Dy.D.BACKSPACE])}removeExisting(){var k,B;this._scrollbarStyle&&document.head.removeChild(this._scrollbarStyle),null===(k=document.getElementById(this._id))||void 0===k||k.remove(),null===(B=this._bottom)||void 0===B||B.remove()}update(){super.update(),this.applyTransform()}destroy(){super.destroy(),this.onTextValid.dispose(),this._onTextChanged.dispose(),this._onFocusChanged.dispose(),this.onClear.dispose(),this._input.removeEventListener("keyup",this._onTextChangedHandler),this._input.removeEventListener("click",this._onClickHandler),this._input.removeEventListener("focus",this._onFocusHandler),this._input.removeEventListener("blur",this._onBlurHandler),window.removeEventListener("resize",this._onResizeHandler),this._onTextChangedHandler=null,this._onClickHandler=null,this._onFocusHandler=null,this._onBlurHandler=null,this._onResizeHandler=null,this._clearContainer&&(this._onClearClicked=null,this._clearContainer.removeEventListener("click",this._onClearClicked)),this.removeExisting()}createOuter(){this._outer.id=this._id;const k=this._outer.style;k.position="absolute",k.backgroundColor=this._backgroundColor,k.paddingLeft=`${this._padding}px`,k.paddingTop=`${this._padding}px`,k.paddingRight=`${this._padding}px`,k.paddingBottom=`${this._padding}px`,k.borderRadius=`${this._borderRadius}px`,k.borderWidth=`${this._borderWidth}px`,k.borderStyle=this._borderStyle,k.borderColor=this._borderColor,j.Aq$.isDefined(this._fontFamily)&&(k.fontFamily=this._fontFamily);document.getElementById("external-ui").appendChild(this._outer)}createTextarea(k){this._input.value="",this._input.id=`${this._id}textarea`,this._input.autocapitalize="off",this._input.autocomplete="off",this._input.tabIndex=this._tabindex,this._input.placeholder=j.Aq$.isDefined(this._placeholder)?this._placeholder:"",this._input.rows=this._rows;const B=this._input.style;B.padding="0px",B.margin="0px",B.resize="none",B.border="0px",B.backgroundColor="transparent",B.borderStyle="none",B.outline="none",B.color=this._textColor,B.textAlign="left",B.boxShadow="none",B.cursor="auto",this._showScrollbarAlways&&(B.overflowY="scroll"),k.appendChild(this._input),this.applyCustomScrollbarStyle()}applyCustomScrollbarStyle(){this._scrollbarStyle=document.createElement("style"),document.head.appendChild(this._scrollbarStyle),this._scrollbarStyle.innerHTML=`\n #${this._input.id}::-webkit-scrollbar {\n width: 32px;\n }\n #${this._input.id}::-webkit-scrollbar-track {\n border-image: url('${this.getSingleImageURL(338)}') 32 32;\n border-style: solid;\n border-width: 32px 0px 32px 32px;\n }\n #${this._input.id}::-webkit-scrollbar-thumb {\n border-image: url('${this.getSingleImageURL(339)}') 33 33;\n border-style: solid;\n border-width: 33px 0px 33px 33px;\n min-height: 66px;\n }\n `}getSingleImageURL(k){const B=tt.q.instance.prodigy.assets.getAsset(`singleImage-${k}`),U=B.filename;return`${Kt.s.get("GameConstants.Build.ASSETS_LOCATION")}${Ny.s.ASSET_FOLDER}/single-images/${U}/${B.v}/${U}.png`}getBottom(k){return this._bottom||(this._bottom=document.createElement("div"),this._bottom.style.color=this._bottomTextColor,k.appendChild(this._bottom)),this._bottom}isShowMaxLength(){return this._showMaxCharacter&&this.maxCharacter>0}createMaxLengthIndicator(k){this._maxCharactersIndicator=document.createElement("div");const B=this._maxCharactersIndicator.style;B.float="left",B.color=this._bottomTextColor,k.appendChild(this._maxCharactersIndicator),this.updateMaxLengthIndicator()}updateMaxLengthIndicator(){this._input.style.opacity=this._input.textLength>0?"1.0":"0.5",this._maxCharactersIndicator.innerText=this._localizer.getText("TEXTAREA_CHARACTERS",this._input.textLength,this.maxCharacter);const k=this._input.textLength>this.maxCharacter;this._maxCharactersIndicator.style.color=k?this._overMaxCharacterTextColor:this._bottomTextColor,this.onTextValid.dispatch(!k&&this._input.textLength>=this.minCharacter)}createClearButton(k){this._clearContainer=document.createElement("div"),this._clearContainer.style.float="right";const B=document.createElement("div");B.style.float="left",B.style.verticalAlign="middle",B.appendChild(this._clearIcon),this._clearContainer.appendChild(B),this._clearContainer.appendChild(this._clearText),this._clearIcon.className="fa fa-times",this._clearText.innerText=this._localizer.getText("INPUT_CLEAR"),j.Aq$.isDefined(this._fontFamily)&&(this._clearText.style.fontFamily=this._fontFamily),this._clearContainer.id=`${this._id}clear`,this._clearContainer.style.display="none",this._clearContainer.style.cursor="pointer",this.setClearContainerVisibility(!1),k.appendChild(this._clearContainer),this._onClearClicked=()=>{this.text="",this.setClearContainerVisibility(!1),this.updateMaxLengthIndicator(),this._input.focus(),this.onClear.dispatch()},this._clearContainer.addEventListener("click",this._onClearClicked)}escapeHTML(k){const B=document.createElement("textarea");return B.innerText=k,B.innerHTML.replace(/"/g,""").replace(/'/g,"'")}};(0,G.Cg)([(0,j.W_S)(),(0,j.Lr6)(0),(0,j.nKb)("name"),(0,G.Sn)("design:type",String)],Ly.prototype,"_id",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ly.prototype,"_placeholder",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ly.prototype,"_tabindex",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Ly.prototype,"_clearable",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Ly.prototype,"_showMaxCharacter",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ly.prototype,"minCharacter",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ly.prototype,"maxCharacter",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],Ly.prototype,"_textColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],Ly.prototype,"_backgroundColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],Ly.prototype,"_backgroundColorDisabled",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ly.prototype,"_padding",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ly.prototype,"_borderRadius",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ly.prototype,"_borderWidth",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ly.prototype,"_borderStyle",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],Ly.prototype,"_borderColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],Ly.prototype,"_bottomTextColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],Ly.prototype,"_overMaxCharacterTextColor",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Ly.prototype,"_showScrollbarAlways",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ly.prototype,"_fontFamily",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ly.prototype,"_fontSize",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ly.prototype,"_rows",void 0),Ly=(0,G.Cg)([(0,j.EVk)("InputTextarea",W.Y.uiInput)],Ly);let ky=class extends j.uAl{constructor(){super(...arguments),this.canBeEmpty=!1,this.onTextInvalid=new j.HN0,this.onTextValid=new j.HN0,this.onTextInvalidOnBlur=new j.HN0,this.invalid=!1}create(){super.create(),this._validationRegex&&(this.regex=new RegExp(this._validationRegex)),this._input.onTextChanged.add(this.performValidation,this),this._input.onBlur.add(this.updateErrorState,this)}destroy(){this.onTextInvalid.dispose(),this.onTextValid.dispose(),this.onTextInvalidOnBlur.dispose(),super.destroy()}performValidation(){this.invalid=!1,""===this._input.text?this.canBeEmpty||(this.invalid=!0,this._errorText.text=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("ERROR_INPUT_EMPTY")):this.regex&&(this.regex.test(this._input.text)?this.invalid=!1:(this.invalid=!0,this._errorText.text=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(this._errorMessageKey))),this.invalid?this.onTextInvalid.dispatch():(this.onTextValid.dispatch(),this._input.setInError(!1),this._errorText.GameObject.active=!1,this._errorText.text="")}updateErrorState(){this.invalid&&(this.onTextInvalidOnBlur.dispatch(),this._errorText.GameObject.active=!0,this._input.setInError(!0))}};(0,G.Cg)([(0,j.MnK)(kt.S),(0,G.Sn)("design:type",kt.S)],ky.prototype,"_input",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ky.prototype,"_validationRegex",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ky.prototype,"_errorMessageKey",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ky.prototype,"canBeEmpty",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],ky.prototype,"_errorText",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ky.prototype,"onTextInvalid",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ky.prototype,"onTextValid",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ky.prototype,"onTextInvalidOnBlur",void 0),ky=(0,G.Cg)([(0,j.EVk)("InputTextValidation",W.Y.uiInput)],ky);var By=U(65231);let Uy=class extends By.s{constructor(){super(...arguments),this._imageContainer=null,this._backgroundContainer=null,this._rarityContainer=null,this._rarityConfig=null,this._rarityAtlas=Ve._.Ui_card_json}get rarity(){var k,B;return null!==(B=null===(k=this._item.data)||void 0===k?void 0:k.rarity)&&void 0!==B?B:io.E.Common}updateCard(){super.updateCard(),this.updateBackground()}get backgroundPrefabID(){return this.getRarityPrefabID()}updateBackground(){(0,sg.Ks)().load(this.backgroundPrefabID,this._backgroundContainer)}resetCard(){super.resetCard(),La.l.removeAll(this._backgroundContainer.legacyTransform.group,!0)}getRarityPrefabID(){switch(this.rarity){case io.E.Legendary:return this._rarityConfig.rarityPrefabLegendary;case io.E.Heroic:return this._rarityConfig.rarityPrefabEpic;case io.E.Rare:return this._rarityConfig.rarityPrefabRare;case io.E.Uncommon:return this._rarityConfig.rarityPrefabUncommon;case io.E.Common:default:return this._rarityConfig.rarityPrefabCommon}}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uy.prototype,"_imageContainer",void 0),(0,G.Cg)([(0,j.x4W)("rarityContainer"),(0,G.Sn)("design:type",j._mx)],Uy.prototype,"_backgroundContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uy.prototype,"_rarityContainer",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],Uy.prototype,"_rarityConfig",void 0),(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],Uy.prototype,"_rarityAtlas",void 0),Uy=(0,G.Cg)([(0,j.EVk)("LegacyItemCard",W.Y.ui)],Uy);var Fy,Gy=U(63746);U(14801);!function(k){k[k.Name=0]="Name",k[k.FlavorText=1]="FlavorText"}(Fy||(Fy={}));let jy=class extends j.uAl{constructor(){super(...arguments),this._textTypeToRetrieve=Fy.Name,this._itemID=-1,this._itemType=""}create(){super.create(),this._itemType&&this._itemID&&this.updateText().catch(j.RQr.createHandler("Error updating text from item: "))}updateText(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield Yt.t.secureGetItem(this._itemType,this._itemID);switch((0,ut.v)(null!==k,`Item was not found for ${this._itemType}-${this._itemID}`),this._textTypeToRetrieve){case Fy.Name:this._targetText.text=this._localizer.getText(Qt.J.getLocalizationNameKey(k));break;case Fy.FlavorText:this._targetText.text=this._localizer.getText(Qt.J.getLocalizationFlavorKey(k));break;default:j.VyI.log("Error updating text from item: Invalid text type",j.$bb.Error)}}))}setAsset(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=null){(k!==this._itemID||j.Aq$.isDefined(B)&&B!==this._itemType)&&(this._itemID=k,j.Aq$.isDefined(B)&&(this._itemType=B),yield this.updateText())}))}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],jy.prototype,"_targetText",void 0),(0,G.Cg)([(0,j.gfw)(Fy),(0,G.Sn)("design:type",Number)],jy.prototype,"_textTypeToRetrieve",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],jy.prototype,"_itemID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],jy.prototype,"_itemType",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],jy.prototype,"_localizer",void 0),jy=(0,G.Cg)([(0,j.EVk)("ItemNameTextLoader",W.Y.item)],jy);let $y=class extends j.uAl{constructor(){super(...arguments),this._petSpineItemDataLoaders=[]}postCreate(){super.postCreate(),this.updatePetSpines()}updatePetSpines(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.petTeam.filter((k=>j.Aq$.isDefined(k)&&k.creatureType!==Vn.V.Player));k.length>this._petSpineItemDataLoaders.length?j.VyI.log("There are not enough renderers to load all team pet spines.",j.$bb.Error):k.forEach(((k,B)=>{var U,F;const G=k.getID(),$=this._petSpineItemDataLoaders[B];$.setAssetID(G),null===(F=null===(U=$.GameObject)||void 0===U?void 0:U.findComponentInChildren(sd.o))||void 0===F||F.updateGear(k.data.gear).catch(j.RQr.createHandler)}))}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(mf.N),(0,G.Sn)("design:type",Array)],$y.prototype,"_petSpineItemDataLoaders",void 0),$y=(0,G.Cg)([(0,j.EVk)("LoadActiveTeamPetSpines",W.Y.animation)],$y);U(70704);let Hy=class extends j.uAl{create(){if(super.create(),!this.primitive){const k=this.gameObject.addComponent(j.Lom),B=this.gameObject.legacyTransform;k.setSize(new j.or0(B.width,B.height)),this.primitive=k}this.target||(this.target=this.gameObject.legacyTransform),this.target.group.mask=this.primitive.getGraphics()}};(0,G.Cg)([(0,j.MnK)(j.K16),(0,G.Sn)("design:type",j.K16)],Hy.prototype,"target",void 0),(0,G.Cg)([(0,j.MnK)(j.sG1),(0,G.Sn)("design:type",j.sG1)],Hy.prototype,"primitive",void 0),Hy=(0,G.Cg)([(0,j.EVk)("Mask",W.Y.effect)],Hy);let Vy=class extends j.uAl{postCreate(){if(super.postCreate(),!this.primitive){const k=this.gameObject.addComponent(j.Lom),B=this.gameObject.findComponent(j.XVE);k.setSize(new j.or0(B.widthDelta,B.heightDelta)),this.primitive=k}this.target.getRootContainer()?this.applyMask():this.target.onRootContainerSet.addOnce(this.applyMask,this)}applyMask(){this.target.getRootContainer().mask=this.primitive.getGraphics()}};var Wy,qy;(0,G.Cg)([(0,j.MnK)(j.y4o),(0,G.Sn)("design:type",j.y4o)],Vy.prototype,"target",void 0),(0,G.Cg)([(0,j.MnK)(j.sG1),(0,G.Sn)("design:type",j.sG1)],Vy.prototype,"primitive",void 0),Vy=(0,G.Cg)([(0,j.EVk)("MaskRenderComponent",W.Y.effect)],Vy),function(k){k[k.Rectangle=0]="Rectangle",k[k.Circle=1]="Circle",k[k.Polygon=2]="Polygon"}(qy||(qy={}));let Ky=Wy=class extends j.uAl{constructor(){super(...arguments),this.maskType=qy.Rectangle}create(){super.create(),this.gameObject.onActiveChanged.add(this.applyMask),this.OnActiveChanged.add(this.applyMask)}applyMask(){if(this.getTarget(),!this.Active)return this.primitive=null,void this.applyMaskToTarget();this.getMask(new j.or0(this._target.width,this._target.height)),this.applyMaskToTarget()}getTarget(){let k=this.targetGameObject.findComponent(j.y4o);k||(k=this.targetGameObject.findComponent(j.K16)),k instanceof j.y4o?(this._target=k.getRootContainer(),k.onRootContainerSet.remove(this.applyMask),this._target||k.onRootContainerSet.addOnce(this.applyMask)):k instanceof j.K16&&(this._target=k)}getMask(k){const B=Wy.MASK_TYPES[this.maskType];if(this.primitive=this.gameObject.findComponent(B),!this.primitive){const U=this.gameObject.addComponent(B);switch(U.constructor){case j.Lom:U.setSize(k);break;case j.ESH:U.setRadius(k.width);break;case j.Uuu:U.setPoints([new $e.Point(0,0),new $e.Point(k.width,0),new $e.Point(k.width,k.height),new $e.Point(0,k.height)])}this.primitive=U}this.primitive.create()}applyMaskToTarget(){var k,B;this._target instanceof $e.Container?this._target.mask=null===(k=this.primitive)||void 0===k?void 0:k.getGraphics():this._target instanceof j.K16&&(this._target.group.mask=null===(B=this.primitive)||void 0===B?void 0:B.getGraphics())}destroy(){this.targetGameObject=null,this._target=null,this.primitive=null,super.destroy()}};Ky.MASK_TYPES={[qy.Rectangle]:j.Lom,[qy.Circle]:j.ESH,[qy.Polygon]:j.Uuu},(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ky.prototype,"targetGameObject",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ky.prototype,"maskType",void 0),Ky=Wy=(0,G.Cg)([(0,j.EVk)("MaskRenderer",W.Y.effect)],Ky);let zy=class extends j.uAl{constructor(){super(...arguments),this.movementScale=1}create(){super.create(),this._initialLocalPosition=new j.I9Y,this._initialLocalPosition.copyFrom(this._transform.localPosition),this._initialWorldPosition=new j.I9Y,this._initialWorldPosition.copyFrom(this._transform.worldPosition),this._cameraTransform=j.i7d.main.GameObject.transform,this._cameraTransform.onWorldMatrixChanged.add(this.onCameraMoved,this),this.onCameraMoved()}destroy(){this._cameraTransform.onWorldMatrixChanged.remove(this.onCameraMoved,this),super.destroy()}onCameraMoved(){const k=new j.I9Y;k.copyFrom(this._cameraTransform.worldPosition),k.subtract(this._initialWorldPosition);const B=new j.I9Y;B.copyFrom(this._initialLocalPosition),B.x+=k.x*this.movementScale,B.y+=k.y*this.movementScale,this._transform.setPosition(Math.round(B.x),Math.round(B.y))}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],zy.prototype,"movementScale",void 0),(0,G.Cg)([(0,j.Pqz)(j.dLy),(0,G.Sn)("design:type",j.dLy)],zy.prototype,"_transform",void 0),zy=(0,G.Cg)([(0,j.EVk)("Parallax",W.Y.motion)],zy);U(57349),U(42838);let Yy=class extends j.uAl{updateStats(k,B,U){const F=Yt.t.getItem("pet",k),G=eo.P8.getBattleStats(F,B,U);this._healthAmountText.text=G.hp.toString(),this._speedAmountText.text=G.speed.toString(),this._powerAmountText.text=G.power.toString(),this._defenceAmountText.text=G.defence.toString()}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Yy.prototype,"_healthAmountText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Yy.prototype,"_speedAmountText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Yy.prototype,"_powerAmountText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Yy.prototype,"_defenceAmountText",void 0),Yy=(0,G.Cg)([(0,j.EVk)("PetInfoScreenCard",W.Y.uiPet)],Yy);U(41851);let Qy=class extends j.uAl{constructor(){super(...arguments),this.maxWidth=0,this.maxHeight=0}create(){var k;super.create(),this.sizeToTarget(),null===(k=this._target.GameObject.transform)||void 0===k||k.onWorldMatrixChanged.add(this.sizeToTarget,this)}destroy(){var k;null===(k=this._target.GameObject.transform)||void 0===k||k.onWorldMatrixChanged.removeAll(this),super.destroy()}sizeToTarget(){var k;const B=null===(k=this._target.GameObject)||void 0===k?void 0:k.transform,U=this._target.getRootContainer();if(!B||!U)return;B.onWorldMatrixChanged.removeAll(this),B.pixiTransform;const F=Math.round(U.width/U.scale.x),G=Math.round(U.height/U.scale.y),$=Math.min(this.maxWidth<=0?1:this.maxWidth/F,this.maxHeight<=0?1:this.maxHeight/G,1);j.cj9.isNearlyEqual(B.localScale.x,$)||B.setScale($,$),B.onWorldMatrixChanged.add(this.sizeToTarget,this)}};(0,G.Cg)([(0,j.Pqz)(j.y4o),(0,G.Sn)("design:type",j.y4o)],Qy.prototype,"_target",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.xkT)("sizeToTarget"),(0,G.Sn)("design:type",Number)],Qy.prototype,"maxWidth",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.xkT)("sizeToTarget"),(0,G.Sn)("design:type",Number)],Qy.prototype,"maxHeight",void 0),Qy=(0,G.Cg)([(0,j.EVk)("RenderComponentSizeLimiter",W.Y.uiLayout)],Qy);let Xy=class extends j.uAl{constructor(){super(...arguments),this._ignoreTypecase=!1,this.onResult=new j.HN0}create(){super.create(),this._input.enablePerKeyEvents(!0),this._input.onTextChanged.add(this.validate,this),this._input.onBlur.add(this.validate,this)}validate(){if(""===this._input.text)return;const k=this.isInputValid();k?this._input.setValid(!0):this._input.setInError(!0),this.onResult.dispatch(k)}isInputValid(){return""!==this._validationString&&(this._ignoreTypecase&&"password"!==this._input.getType()?this._input.text.toLowerCase()===this._validationString.toLowerCase():this._input.text===this._validationString)}destroy(){this.onResult.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Pqz)(kt.S),(0,G.Sn)("design:type",kt.S)],Xy.prototype,"_input",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xy.prototype,"_validationString",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Xy.prototype,"_ignoreTypecase",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Xy.prototype,"onResult",void 0),Xy=(0,G.Cg)([(0,j.EVk)("SimpleInputTextValidation",W.Y.uiInput)],Xy);var Zy;U(25132);!function(k){k.intersect=function(k,B){return{left:Math.max(k.left,B.left),right:Math.min(k.right,B.right),top:Math.max(k.top,B.top),bottom:Math.min(k.bottom,B.bottom)}}}(Zy||(Zy={}));class Jy{constructor(){this._indices=[],this._vertices=[],this._uvs=[]}clipGeometry(k,B,U,F){return this.clip={left:k,right:B,top:U,bottom:F},this}addAxisAlignedQuad(k,B,U,F,G,j,$,H){if(this.clip){const V=Math.max(k,this.clip.left),W=Math.min(B,this.clip.right),q=Math.max(U,this.clip.top),K=Math.min(F,this.clip.bottom);if(V>=W||q>=K)return this;V!==k&&(G=this.mapValueInRange(V,k,B,G,j),k=V),W!==B&&(j=this.mapValueInRange(W,k,B,G,j),B=W),q!==U&&($=this.mapValueInRange(q,U,F,$,H),U=q),K!==F&&(H=this.mapValueInRange(K,K,F,H,H),F=K)}let V=this._vertices.length>>1;return this._indices.push(V,V,++V,++V,++V,V),this._vertices.push(k,U,k,F,B,U,B,F),this._uvs.push(G,$,G,H,j,$,j,H),this}addAxisAlignedQuadFromSubTexture(k,B,U,F,G){if(G.trim){const{x:j,y:$,width:H,height:V}=G.trim;k+=j,B+=j+H-G.width,U+=$,F+=$+V-G.height}const j=G.frame,$=G.baseTexture.width,H=G.baseTexture.height;return this.addAxisAlignedQuad(k,B,U,F,j.left/$,j.right/$,j.top/H,j.bottom/H)}createMesh(k){const B=new Float32Array(this._vertices),U=new Float32Array(this._uvs),F=new Uint16Array(this._indices);return new $e.SimpleMesh(k,B,U,F,$e.DRAW_MODES.TRIANGLE_STRIP)}updateMesh(k){const B=k.visible;return B&&(k.visible=!1),k.geometry.getIndex().update(new Uint16Array(this._indices)),k.verticesBuffer.update(new Float32Array(this._vertices)),k.uvBuffer.update(new Float32Array(this._uvs)),B&&(k.visible=!0),this}mapValueInRange(k,B,U,F,G){return F+(k-B)/(U-B)*(G-F)}}let t_=class extends j.y4o{constructor(){super(...arguments),this._topLeft=null,this._topRight=null,this._bottomLeft=null,this._bottomRight=null,this._topCenter=null,this._bottomCenter=null,this._leftCenter=null,this._rightCenter=null,this._center=null,this._tiling=!1,this._mesh=null,this._elementGroupSize=new j.or0}get _allElements(){return[this._topLeft,this._topCenter,this._topRight,this._leftCenter,this._center,this._rightCenter,this._bottomLeft,this._bottomCenter,this._bottomRight]}get clip(){return this._clip}set clip(k){this._clip=k,this.updateMesh()}get tint(){var k;return null===(k=this._mesh)||void 0===k?void 0:k.tintValue}set tint(k){const B="number"==typeof k?k:j.Q1f.hexToRGB(k);this._mesh?this._mesh.tint=B:this._initialTint=B}get alpha(){var k;return null===(k=this._mesh)||void 0===k?void 0:k.alpha}set alpha(k){this._mesh?this._mesh.alpha=k:this._initialAlpha=k}create(){super.create();const k=j.W$e.instance.game.cache.getTexture(this._center.atlas,this._center.frame);this._mesh=new $e.SimpleMesh(new $e.Texture(k.baseTexture),void 0,void 0,void 0,$e.DRAW_MODES.TRIANGLE_STRIP),this._mesh.visible=!1,this.updateMesh(),j.Aq$.isDefined(this._initialTint)&&(this._mesh.tint=this._initialTint),j.Aq$.isDefined(this._initialAlpha)&&(this._mesh.alpha=this._initialAlpha),this.setRootContainer(this._mesh),this.gameObject.onDestroy.add((()=>{this.gameObject.transform instanceof j.XVE&&this.gameObject.transform.onRecalculatedBounds.remove(this.resizeToMatchRectTransform,this)}))}postCreate(){super.postCreate(),this.gameObject.transform instanceof j.XVE&&this.gameObject.transform.onRecalculatedBounds.add(this.resizeToMatchRectTransform,this)}isNineSlice(){return!!(this._topLeft&&this._topRight&&this._bottomLeft&&this._bottomRight)}isHorizontal3Slice(){return this._leftCenter&&this._rightCenter&&!this._topCenter&&!this._bottomCenter}isVertical3Slice(){return this._topCenter&&this._bottomCenter&&!this._leftCenter&&!this._rightCenter}updateMesh(){if(!this._mesh)return;const k=new Jy;this._clip&&(k.clip=this._clip);const B=this._allElements.map((k=>k?this.getElementTexture(k):null)),U=B.map((k=>k?{x:k.width,y:k.height}:{x:0,y:0})),F=Math.max(U[0].x,U[3].x,U[6].x),G=Math.max(U[2].x,U[5].x,U[8].x),j=Math.max(U[0].y,U[1].y,U[2].y),$=Math.max(U[6].y,U[7].y,U[8].y),H=this.getTargetDimensions(),V=H.x-F-G,W=H.y-j-$,q=F+V,K=j+W;this._topLeft&&k.addAxisAlignedQuadFromSubTexture(F-U[0].x,F,j-U[0].y,j,B[0]),this._topCenter&&k.addAxisAlignedQuadFromSubTexture(F,q,j-U[1].y,j,B[1]),this._topRight&&k.addAxisAlignedQuadFromSubTexture(q,q+U[2].x,j-U[2].y,j,B[2]),this._leftCenter&&k.addAxisAlignedQuadFromSubTexture(F-U[3].x,F,j,K,B[3]),!this._tiling||this.isNineSlice()?k.addAxisAlignedQuadFromSubTexture(F,q,j,K,B[4]):this.isHorizontal3Slice()?this.performTilingInOneDirection(!0,V,W,k,B[4],F,j):this.isVertical3Slice()&&this.performTilingInOneDirection(!1,W,V,k,B[4],F,j),this._rightCenter&&k.addAxisAlignedQuadFromSubTexture(q,q+U[5].x,j,K,B[5]),this._bottomLeft&&k.addAxisAlignedQuadFromSubTexture(F-U[6].x,F,K,K+U[6].y,B[6]),this._bottomCenter&&k.addAxisAlignedQuadFromSubTexture(F,q,K,K+U[7].y,B[7]),this._bottomRight&&k.addAxisAlignedQuadFromSubTexture(q,q+U[8].x,K,K+U[8].y,B[8]),k.updateMesh(this._mesh)}getElementTexture(k){return j.W$e.instance.game.cache.getTexture(k.atlas,k.frame)}performTilingInOneDirection(k,B,U,F,G,j,$){const H=B/(k?G.width:G.height);if(H<=0)return;const V=F.clip;let W,q=j,K=$,z=G.width,Y=G.height,Q=0,X=0;k?(W={left:j,right:j+B,top:$,bottom:U},Q=z,Y=U):(W={left:j,right:j+U,top:$,bottom:$+B},X=Y,z=U),V&&(W=Zy.intersect(V,W)),F.clip=W;for(let Z=0;Z")],t_);let e_=class extends j.uAl{constructor(){super(...arguments),this.onEvent=new j.HN0}create(){super.create(),this._spine.onEvent.add(((k,B)=>{var U,F;((null!==(F=null===(U=this._eventName)||void 0===U?void 0:U.length)&&void 0!==F?F:0)<1||B.data.name===this._eventName)&&this.onEvent.dispatch(k,B)}))}destroy(){this.onEvent.dispose(),super.destroy()}};(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],e_.prototype,"_spine",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],e_.prototype,"_eventName",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],e_.prototype,"onEvent",void 0),e_=(0,G.Cg)([(0,j.EVk)("SpineEventListener",W.Y.animation)],e_);let i_=class extends Fi.z{constructor(){super(...arguments),this._canEvolve=!1,this._justReadyToEvolve=!1}bindContext(){this.bindWithData(this._canEvolve,this._justReadyToEvolve)}bindWithData(k,B){this._canEvolve=k,this._justReadyToEvolve=B,this._context.Container.rebind(hs.hi.SpinePetEvolveBurst).toConstantValue(k&&B),this._context.Container.rebind(hs.hi.SpinePetEvolveIdle).toConstantValue(k),this.gameObject.findComponentsInChildren(Lo.B).forEach((k=>k.consume()))}setContainerData(k,B){this._canEvolve=k,this._justReadyToEvolve=B}};i_=(0,G.Cg)([(0,j.EVk)("SpinePetDataProvider",W.Y.data)],i_);var s_=U(27625);let n_=class extends j.uAl{constructor(){super(...arguments),this._spineAssetID=null,this._animation=null,this._loop=!1}create(){super.create();const k=tt.q.instance.game;this._spineUI=new s_.I(k,this.GameObject.legacyTransform.group),this._spineUI.populate({spineKey:this._spineAssetID,animation:this._animation,loop:this._loop})}playAnimation(k,B){const U=j.Aq$.isDefined(k)?k:this._animation,F=j.Aq$.isDefined(B)?B:this._loop;this._spineUI.playAnimation(U,F)}};(0,G.Cg)([(0,j.W_S)(),(0,j.nKb)("id"),(0,G.Sn)("design:type",String)],n_.prototype,"_spineAssetID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,j.nKb)("animation"),(0,G.Sn)("design:type",String)],n_.prototype,"_animation",void 0),(0,G.Cg)([(0,j.vkK)(),(0,j.nKb)("loop"),(0,G.Sn)("design:type",Boolean)],n_.prototype,"_loop",void 0),n_=(0,G.Cg)([(0,j.EVk)("SpineRendererUI",W.Y.ui)],n_);let a_=class extends j.uAl{constructor(){super(...arguments),this._hiddenSlots=[]}postCreate(){super.postCreate(),this._targetSpineComponent?this._targetSpineComponent.isLoaded?(this._spine=this._targetSpineComponent.getSpine()._pixiSpine,this.updateHiddenSlots()):this._targetSpineComponent.OnLoaded.addOnce((()=>{this._spine=this._targetSpineComponent.getSpine()._pixiSpine,this.updateHiddenSlots()})):j.VyI.log("[SpineSlotVisibilityController] No target spine component set",j.$bb.Info)}updateHiddenSlots(){this._hiddenSlots.forEach((k=>{this.hideSlot(k)}))}hideSlot(k){var B,U,F,G,j,$,H,V,W;const q=null===(U=null===(B=this._spine)||void 0===B?void 0:B.skeleton)||void 0===U?void 0:U.findSlotIndex(k);-1!==q&&null!==(null===(j=null===(G=null===(F=this._spine)||void 0===F?void 0:F.skeleton)||void 0===G?void 0:G.slots[q])||void 0===j?void 0:j.attachment)&&(null===($=this._spine)||void 0===$||$.hackTextureBySlotIndex(q,$e.Texture.EMPTY),null===(W=null===(V=null===(H=tt.q.instance)||void 0===H?void 0:H.game)||void 0===V?void 0:V.broadcaster)||void 0===W||W.broadcast(jn.B.SlotVisibilityChanged,"SlotVisibility",[this.gameObject,k,!1]))}addHiddenSlot(k){this._hiddenSlots.includes(k)||(this._hiddenSlots.push(k),this.updateHiddenSlots())}unsetHiddenSlot(k){var B,U,F,G;this._hiddenSlots.includes(k)&&(null===(B=this._spine)||void 0===B||B.hackTextureBySlotName(k,null),this._hiddenSlots.splice(this._hiddenSlots.indexOf(k),1),null===(G=null===(F=null===(U=tt.q.instance)||void 0===U?void 0:U.game)||void 0===F?void 0:F.broadcaster)||void 0===G||G.broadcast(jn.B.SlotVisibilityChanged,"SlotVisibility",[this.gameObject,k,!0]))}};(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],a_.prototype,"_targetSpineComponent",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],a_.prototype,"_hiddenSlots",void 0),a_=(0,G.Cg)([(0,j.EVk)("SpineSlotVisibilityController",W.Y.ui)],a_);var r_,o_=U(95359);!function(k){k.HighestStat="highestStat"}(r_||(r_={}));const h_={[o_.IE.Hp]:"small-stat-health",[o_.IE.Defence]:"small-stat-defense",[o_.IE.Power]:"small-stat-power",[o_.IE.Speed]:"small-stat-dodge"};let c_=class extends j.uAl{constructor(){super(...arguments),this._itemId=void 0,this._itemType=void 0,this.runOnCreate=!0}create(){super.create(),this.runOnCreate&&this.setIcon()}setIcon(){var k,B;const U=this.getInjectedValue((0,hs.F)("STAT_ICON_DISPLAY_ITEM_ID")),F=this.getInjectedValue((0,hs.F)("STAT_ICON_DISPLAY_ITEM_TYPE")),G=null===(k=Yt.t.getItem(F,U))||void 0===k?void 0:k.data;if(null==G?void 0:G.stats){let k;switch(this._statIconDisplayCriteria){case r_.HighestStat:k=Object.keys(G.stats).reduce(((k,B)=>G.stats[k]>=G.stats[B]?k:B))}const U=h_[k],F=Ve._.Ui_battle_revamp_json;null===(B=this._icon)||void 0===B||B.setAsset(F,U).catch(j.RQr.createHandler(`StatIconDisplayComponent: Failed to set the asset for the icon with frame ${U} in atlas ${F}`))}}};(0,G.Cg)([(0,j.gfw)(r_),(0,G.Sn)("design:type",String)],c_.prototype,"_statIconDisplayCriteria",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],c_.prototype,"_icon",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],c_.prototype,"runOnCreate",void 0),c_=(0,G.Cg)([(0,j.EVk)("StatIconDisplay",W.Y.ui)],c_);let d_=class extends j.uAl{constructor(){super(...arguments),this._rarityAtlas=Ve._.Ui_card_json,this._rarityConfig=null}changeRarity(k,B=!1){var U;if(!this._backgroundObject||k!==this._currentRarity||B!==this._currentLockedStatus){null===(U=this._loadBackgroundPromise)||void 0===U||U.cancel();const F=B?this._rarityConfig.lockedItemPrefab:this.getBackgroundPrefabID(k);this._loadBackgroundPromise=j.Uoy.getInjectedValue(this.gameObject,"d0e-64fd").loadWithDependencies(F),this._loadBackgroundPromise.then((U=>{var F;null===(F=this._backgroundObject)||void 0===F||F.destroy(),this._backgroundObject=U,this._cardBanner.active=!B,this._cardBannerDimmed.active=B,this.gameObject.addChild(this._backgroundObject),this._currentRarity=k,this._currentLockedStatus=B})).catch(j.RQr.createHandler("Error loading card rarity background"))}}clearBackground(){var k,B;null===(k=this._backgroundObject)||void 0===k||k.destroy(),null===(B=this._loadBackgroundPromise)||void 0===B||B.cancel(),this._currentRarity=null,this._currentLockedStatus=null}getBackgroundPrefabID(k){switch(k){case io.E.Legendary:return this._rarityConfig.rarityPrefabLegendary;case io.E.Heroic:return this._rarityConfig.rarityPrefabEpic;case io.E.Rare:return this._rarityConfig.rarityPrefabRare;case io.E.Uncommon:return this._rarityConfig.rarityPrefabUncommon;case io.E.Common:default:return this._rarityConfig.rarityPrefabCommon}}destroy(){var k;null===(k=this._loadBackgroundPromise)||void 0===k||k.cancel(),super.destroy()}};(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],d_.prototype,"_rarityAtlas",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],d_.prototype,"_rarityConfig",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],d_.prototype,"_cardBanner",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],d_.prototype,"_cardBannerDimmed",void 0),d_=(0,G.Cg)([(0,j.EVk)("ItemRarityBackground",j.YH6.ui)],d_);let l_=class extends j.uAl{constructor(){super(...arguments),this._quantityText=null,this._quantityCircle=null,this._displayThresholdMin=1,this._displayThresholdMax=99}setQuantity(k){k>=this._displayThresholdMin?(this.setIconVisible(!0),k{var F,G;k.active=U===(null!==(G=null===(F=B.data)||void 0===F?void 0:F.rarity)&&void 0!==G?G:0)})),this._stackElements&&(this._stackElements.active=U>1),this._itemAmountText.text=U.toString()}destroy(){this.onImageLoaded.dispose(),super.destroy()}};(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],u_.prototype,"_rarityBackgrounds",void 0),(0,G.Cg)([(0,j.MnK)(os.X),(0,G.Sn)("design:type",os.X)],u_.prototype,"_itemIconContainer",void 0),(0,G.Cg)([(0,j.MnK)(bg.M),(0,G.Sn)("design:type",bg.M)],u_.prototype,"_renderPlayerAsTexture",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],u_.prototype,"_stackElements",void 0),(0,G.Cg)([(0,j.MnK)(jy),(0,G.Sn)("design:type",jy)],u_.prototype,"_itemNameText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],u_.prototype,"_itemAmountText",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],u_.prototype,"onImageLoaded",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Function)],u_.prototype,"_currentPlayer",void 0),u_=(0,G.Cg)([(0,j.EVk)("StoreItemDisplayCard",W.Y.ui)],u_);U(46548);let f_=class extends j.y4o{constructor(){super(...arguments),this._repeatXCount=0,this._repeatYCount=0,this._renderTexture=null,this._sprite=null}create(){super.create();const k=tt.q.instance.game;this._renderTexture=k.add.renderTexture(this._tileColumns*(this._repeatXCount+1)*this._tileSize,this._tileRows*(this._repeatYCount+1)*this._tileSize),this._sprite=tt.q.instance.prodigy.create.image(0,0,void 0,void 0,this._renderTexture),this._sprite.roundPixels=!0,this._sprite.smoothed=!1,this.setRootContainer(this._sprite);const B=tt.q.instance.prodigy.gameContainer.get(j.t5G.AssetLoader);B.isLoaded(this._tilesetKey,j.iO0.Image)?this.renderTiles():B.loadAssets([this._tilesetKey]).then((()=>{this.renderTiles()}))}destroy(){this._sprite.destroy(),this._renderTexture.destroy(!0),super.destroy()}renderTiles(){const k=tt.q.instance.game.cache.getImage(this._tilesetKey);if(!k)return;const B=k.width/this._tileSize,U=tt.q.instance.prodigy.create.image(0,0,this._tilesetKey),F=this._tileColumns*(this._repeatXCount+1),G=this._tileRows*(this._repeatYCount+1);for(let j=0;j{this._loadedPrefab=k,k.active=this._videoEnded})).catch(j.RQr.createHandler("VideoFollowUpComponent: Error loading follow-up prefab")))}onVideoEnded(){j.Aq$.isDefined(this._followUpGuid)&&(this._videoEnded=!0,j.Aq$.isDefined(this._loadedPrefab)&&(this._loadedPrefab.active=!0),this.hideObjects())}onMembershipAcquired(){this._followUpGuid=this.getInjectedValue(hs.Wr.MemberFollowupPrefabGuid),j.Aq$.isDefined(this._followUpGuid)?(this.hideObjects(),tt.q.instance.prodigy.game.broadcaster.addAppListener(jn.H3.MembershipRewardsFlowComplete,this.handleMembershipRewardsFlowComplete,this)):this._fallbackSignal.dispatch()}handleMembershipRewardsFlowComplete(){tt.q.instance.prodigy.game.broadcaster.removeAppListener(jn.H3.MembershipRewardsFlowComplete,this),tt.q.instance.prodigy.open.prefabMenu({prefabID:this._followUpGuid,isModal:!0})}hideObjects(){for(const k of this._objectsToHide)k.active=!1}destroy(){var k;null===(k=this._loadingPromise)||void 0===k||k.cancel(),this._loadingPromise=void 0,this._closeSignal.dispose(),this._fallbackSignal.dispose(),tt.q.instance.prodigy.game.broadcaster.removeAppListener(jn.H3.MembershipRewardsFlowComplete,this),super.destroy()}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],b_.prototype,"_followUpGuid",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],b_.prototype,"_prefabParent",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],b_.prototype,"_objectsToHide",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],b_.prototype,"_closeSignal",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],b_.prototype,"_fallbackSignal",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],b_.prototype,"_prefabLoader",void 0),b_=(0,G.Cg)([(0,j.EVk)("VideoFollowUpComponent",W.Y.uiVideo)],b_);U(71072);let p_=class extends j.uAl{constructor(){super(...arguments),this._onAllowed=new j.HN0,this._onDisallowedMessageClosed=new j.HN0}check(){const k=this._featureFlags.getValue("enableYouTubeAd",!1),B=this._featureFlags.getValue("enableYouTubeTimeCheck",!0),U=this._featureFlags.getValue("useServerTimeForVideoLockout",!0)?new Date(tt.q.instance.prodigy.timeManager.getServerTimeMs()):new Date;let F=null;k?B&&Qt.J.isSchoolDay(U)&&Qt.J.isDateWithinSchoolHours(U)?F="OPENING_A_VIDEO_DURING_SCHOOL":Gs.pF.isNativeApp()&&(F="OPEN_URL_IN_APP"):F="YOUTUBE_DISABLED_MESSAGE",F?tt.q.instance.prodigy.open.message(this._localizer.getText(F),(()=>{this._onDisallowedMessageClosed.dispatch()})):this._onAllowed.dispatch()}destroy(){this._onAllowed.dispose(),this._onDisallowedMessageClosed.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.Oap)],p_.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.Cdj)("80c-6fa4"),(0,G.Sn)("design:type",Object)],p_.prototype,"_featureFlags",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],p_.prototype,"_onAllowed",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],p_.prototype,"_onDisallowedMessageClosed",void 0),p_=(0,G.Cg)([(0,j.EVk)("OpenVideoGuard",W.Y.uiVideo)],p_);var v_=U(95429);let g_=class extends j.uAl{sendCTA(){this.send("click-CTA")}sendClose(){this.send("close-popup")}send(k){this._gameCompleteEvent.name=k,this._gameCompleteEvent.value=this._videoMenu.videoPlayer.errorReason?"-1":this._videoMenu.getMinimumThresholdReached().toString()}};(0,G.Cg)([(0,j.MnK)(v_.k),(0,G.Sn)("design:type",v_.k)],g_.prototype,"_videoMenu",void 0),(0,G.Cg)([(0,j.MnK)(xm.b),(0,G.Sn)("design:type",xm.b)],g_.prototype,"_gameCompleteEvent",void 0),g_=(0,G.Cg)([(0,j.EVk)("SendVideoCloseMetric",W.Y.uiVideo)],g_);let m_=class extends j.uAl{getCustomData(){return{video_loaded:this._videoMenu.videoPlayer.isReady,error_msg:this._videoMenu.videoPlayer.errorReason}}};(0,G.Cg)([(0,j.MnK)(v_.k),(0,G.Sn)("design:type",v_.k)],m_.prototype,"_videoMenu",void 0),m_=(0,G.Cg)([(0,j.EVk)("AppendVideoData",W.Y.uiVideo)],m_);U(62053);var y_=U(83142),__=U(11682);let E_=class extends y_.D{constructor(){super(...arguments),this._menu=null,this._icon=null,this._tooltip=null,this._headerText=null,this._messageText=null,this._highlightText=null,this._highlightBox=null}loadVideoConfig(k){const B=k;this._tooltip.active=!1;const U=j.Aq$.isDefined(B.header),F=j.Aq$.isDefined(B.message),G=j.Aq$.isDefined(B.icon);U&&F&&G&&this.setUpTooltip(B)}setUpTooltip(k){var B;this._headerText&&(this._headerText.TextObject.text=k.header),this._messageText&&(this._messageText.TextObject.text=k.message),j.Aq$.isDefined(k.highlight)?this._highlightText&&(this._highlightText.TextObject.text=k.highlight):this._highlightBox.active=!1,null===(B=this._icon)||void 0===B||B.setAsset(k.icon),this.addVideoStartListener(k.videoID)}addVideoStartListener(k){this._menu.videoPlayer.onPlayerStateChange.add((()=>{this._tooltip.active||this._menu.videoPlayer.getPlayerState()!==__.w.Playing||(this._tooltip.active=!0)}))}};(0,G.Cg)([(0,j.MnK)(v_.k),(0,j.Lr6)(0),(0,j.nKb)("menu"),(0,G.Sn)("design:type",v_.k)],E_.prototype,"_menu",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,j.Lr6)(0),(0,j.nKb)("icon"),(0,G.Sn)("design:type",Ke._)],E_.prototype,"_icon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,j.Lr6)(0),(0,j.nKb)("tooltip"),(0,G.Sn)("design:type",j._mx)],E_.prototype,"_tooltip",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,j.Lr6)(0),(0,j.nKb)("header"),(0,G.Sn)("design:type",j.EYj)],E_.prototype,"_headerText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,j.Lr6)(0),(0,j.nKb)("message"),(0,G.Sn)("design:type",j.EYj)],E_.prototype,"_messageText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,j.Lr6)(0),(0,j.nKb)("highlight"),(0,G.Sn)("design:type",j.EYj)],E_.prototype,"_highlightText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,j.Lr6)(0),(0,j.nKb)("highlightBox"),(0,G.Sn)("design:type",j._mx)],E_.prototype,"_highlightBox",void 0),E_=(0,G.Cg)([(0,j.EVk)("VideoTooltipComponent",W.Y.uiVideo)],E_);let w_=class extends j.uAl{constructor(){super(...arguments),this.anyFestivalIsActive=new j.HN0,this.specificFestivalIsActive=new j.HN0,this.specificFestivalIsNotActive=new j.HN0,this._runOnLoad=!0}create(){super.create(),this._runOnLoad&&this.check()}destroy(){this.anyFestivalIsActive.dispose(),this.specificFestivalIsActive.dispose(),this.specificFestivalIsNotActive.dispose(),super.destroy()}check(){var k;const B=null===(k=tt.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival())||void 0===k?void 0:k.type;j.Aq$.isDefined(B)?(this.anyFestivalIsActive.dispatch(),this.festivalID===B?this.specificFestivalIsActive.dispatch():this.specificFestivalIsNotActive.dispatch()):this.specificFestivalIsNotActive.dispatch()}};(0,G.Cg)([(0,j.gfw)(Zp.Q),(0,G.Sn)("design:type",Number)],w_.prototype,"festivalID",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],w_.prototype,"anyFestivalIsActive",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],w_.prototype,"specificFestivalIsActive",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],w_.prototype,"specificFestivalIsNotActive",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],w_.prototype,"_runOnLoad",void 0),w_=(0,G.Cg)([(0,j.EVk)("ActiveFestivalGuard",W.Y.utility)],w_);var T_=U(72012);let S_=class extends T_.y{constructor(){super(...arguments),this._booleanStates=[]}create(){super.create(),this.checkStatesValue();const k=this._booleanStates.length;for(let B=0;B.5?1:-1;this.gameObject.transform.setScale(k*U,B)}}};(0,G.Cg)([(0,j.gfw)(H_),(0,G.Sn)("design:type",String)],V_.prototype,"_startingDirection",void 0),(0,G.Cg)([(0,j.gfw)(H_),(0,G.Sn)("design:type",String)],V_.prototype,"_targetDirection",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],V_.prototype,"_runOnCreate",void 0),V_=(0,G.Cg)([(0,j.EVk)("FaceDirection",W.Y.utility)],V_);let W_=class extends j.uAl{constructor(){super(...arguments),this._shouldFlipOnXAxis=!0,this._shouldFlipOnYAxis=!1,this._isLeftFacing=!1,this._isTopFacing=!1,this._shouldRunOnUpdate=!1}create(){super.create(),this.faceCenter()}update(){super.update(),this._shouldRunOnUpdate&&this.faceCenter()}faceCenter(){const k=tt.q.instance.game.width/2,B=tt.q.instance.game.height/2,U=this.GameObject.transform?this.GameObject.transform.worldPosition:this.GameObject.legacyTransform.group.getGlobalPosition(),F=this.GameObject.transform?this.GameObject.transform.localScale:this.GameObject.legacyTransform.group.scale;let G=F.x,j=F.y;this._shouldFlipOnXAxis&&(G=this._isLeftFacing?U.xk?-Math.abs(F.x):Math.abs(F.x)),this._shouldFlipOnYAxis&&(j=this._isTopFacing?U.yB?-Math.abs(F.y):Math.abs(F.y)),this.GameObject.transform?this.GameObject.transform.setScale(G,j):(this.GameObject.legacyTransform.group.scale.x=G,this.GameObject.legacyTransform.group.scale.y=j)}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W_.prototype,"_shouldFlipOnXAxis",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W_.prototype,"_shouldFlipOnYAxis",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W_.prototype,"_isLeftFacing",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W_.prototype,"_isTopFacing",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W_.prototype,"_shouldRunOnUpdate",void 0),W_=(0,G.Cg)([(0,j.EVk)("FaceTowardCenterComponent",W.Y.utility)],W_);var q_=U(64593);let K_=class extends j.uAl{toggleFullScreen(){tt.q.instance.prodigy.game.scale.isFullScreen?this.exitFullScreen():this.enterFullScreen()}enterFullScreen(){tt.q.instance.prodigy.game.scale.fullScreenScaleMode=q_.y.EXACT_FIT,tt.q.instance.prodigy.game.scale.fullScreenTarget=document.body,tt.q.instance.prodigy.game.scale.startFullScreen()}exitFullScreen(){tt.q.instance.prodigy.game.scale.stopFullScreen()}};K_=(0,G.Cg)([(0,j.EVk)("FullScreen",W.Y.utility)],K_);let z_=class extends j.uAl{constructor(){super(...arguments),this.onInFullscreenMode=new j.HN0,this.onNotInFullscreenMode=new j.HN0,this.runOnLoad=!1}create(){super.create(),this.runOnLoad&&this.check()}destroy(){this.onInFullscreenMode.dispose(),this.onNotInFullscreenMode.dispose(),super.destroy()}check(){tt.q.instance.prodigy.game.scale.isFullScreen?this.onInFullscreenMode.dispatch():this.onNotInFullscreenMode.dispatch()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],z_.prototype,"onInFullscreenMode",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],z_.prototype,"onNotInFullscreenMode",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],z_.prototype,"runOnLoad",void 0),z_=(0,G.Cg)([(0,j.EVk)("FullScreenGuard",W.Y.utility)],z_);let Y_=class extends pt._{constructor(){super(...arguments),this._onComparisonTrue=new j.HN0,this._onComparisonFalse=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.check()}destroy(){this._onComparisonTrue.dispose(),this._onComparisonFalse.dispose(),super.destroy()}check(){var k;(null===(k=Kt.A.get(this._gameConstantKey))||void 0===k?void 0:k.toString())===this._comparisonString?this._onComparisonTrue.dispatch():this._onComparisonFalse.dispatch()}getData(){return Kt.A.get(this._gameConstantKey)}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Y_.prototype,"_onComparisonTrue",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Y_.prototype,"_onComparisonFalse",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Y_.prototype,"_runOnLoad",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Y_.prototype,"_gameConstantKey",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Y_.prototype,"_comparisonString",void 0),Y_=(0,G.Cg)([(0,j.EVk)("GameConstantComparatorGuard",W.Y.utility)],Y_);let Q_=class extends j.uAl{constructor(){super(...arguments),this._index=0,this._onValueExtracted=new j.HN0}extractValue(k){!k||this._index>=k.length?j.VyI.log("[GetValueFromArrayComponent] Warning: Attempting to extract value from an array with an index out of bounds",j.$bb.Warning):this._onValueExtracted.dispatch(k[this._index])}destroy(){this._onValueExtracted.dispose(),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q_.prototype,"_index",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Q_.prototype,"_onValueExtracted",void 0),Q_=(0,G.Cg)([(0,j.EVk)("GetValueFromArray",W.Y.utility)],Q_);let X_=class extends j.uAl{constructor(){super(...arguments),this._booleanStates=[],this.onResult=new j.HN0,this._value=!1}get value(){return this._value}checkEvery(){this._value=this._booleanStates.every((k=>!0===k.getValue())),this.onResult.dispatch(this.value)}destroy(){this.onResult.dispose(),super.destroy()}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(T_.y),(0,G.Sn)("design:type",Array)],X_.prototype,"_booleanStates",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],X_.prototype,"onResult",void 0),X_=(0,G.Cg)([(0,j.EVk)("GroupBooleanStateCheckValue",W.Y.utility)],X_);let Z_=class extends j.uAl{constructor(){super(...arguments),this.hideWhenNotMobile=!1}create(){this.gameObject.active=j.o5U.isMobile()===this.hideWhenNotMobile}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Z_.prototype,"hideWhenNotMobile",void 0),Z_=(0,G.Cg)([(0,j.EVk)("HideOnMobile",W.Y.utility)],Z_);U(70005);let J_=class extends j.uAl{constructor(){super(...arguments),this._onHome=new j.HN0,this._onSchool=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.checkLocation()}checkLocation(){this._playerData.player.isPlayingAtSchool()?this._onSchool.dispatch():this._onHome.dispatch()}destroy(){this._onSchool.dispose(),this._onHome.dispose(),super.destroy()}checkLocationForZone(k){tt.q.instance.prodigy.classModeController.isLockedZone(k)?this._onSchool.dispatch():this._onHome.dispatch()}showZoneLockMessage(k){tt.q.instance.prodigy.classModeController.onClassMode(k)}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],J_.prototype,"_playerData",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],J_.prototype,"_onHome",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],J_.prototype,"_onSchool",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],J_.prototype,"_runOnLoad",void 0),J_=(0,G.Cg)([(0,j.EVk)("IsAtHomeOrSchool",W.Y.utility)],J_);let tE=class extends j.uAl{constructor(){super(...arguments),this._zones=[],this.isInZone=new j.HN0,this.isNotInZone=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.checkIfPlayerIsInZone()}destroy(){this.isInZone.dispose(),this.isNotInZone.dispose(),super.destroy()}checkIfPlayerIsInZone(){let k=!1;this._zones.forEach((B=>{tt.q.instance.prodigy.world.getCurrentZone()===B&&(k=!0)})),k?this.isInZone.dispatch():this.isNotInZone.dispatch()}};(0,G.Cg)([(0,j.SZi)(),(0,j.gfw)(Ft.A_),(0,G.Sn)("design:type",Array)],tE.prototype,"_zones",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],tE.prototype,"isInZone",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],tE.prototype,"isNotInZone",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],tE.prototype,"_runOnLoad",void 0),tE=(0,G.Cg)([(0,j.EVk)("IsInZoneGuard",W.Y.utility)],tE);let eE=class extends j.uAl{constructor(){super(...arguments),this._parentTransform=null,this._scaleX=1,this._scaleY=1}update(){super.update(),this._parentTransform.localScale.x!==this._scaleX&&(this.gameObject.transform.localScale.x*=-1,this._scaleX=this._parentTransform.localScale.x),this._parentTransform.localScale.y!==this._scaleY&&(this.gameObject.transform.localScale.y*=-1,this._scaleY=this._parentTransform.localScale.y)}};(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],eE.prototype,"_parentTransform",void 0),eE=(0,G.Cg)([(0,j.EVk)("KeepScaleOrientation",W.Y.utility)],eE);let iE=class extends j.uAl{constructor(){super(...arguments),this._holdOnCreate=!0,this._isCritical=!1,this._timeoutMs=0,this.onComplete=new j.HN0,this.onTimeout=new j.HN0,this.onError=new j.HN0}create(){super.create(),this._holdOnCreate&&this.registerWithLoadingScreen()}registerWithLoadingScreen(){if(j.Aq$.isDefined(this._promise))return void j.VyI.log("LoadingWaitComponent is already registered with the loading screen. Call complete() or fail() before registering again.",j.$bb.Error);this._promise=new j.bnh,this._timeoutMs>0&&(this._timeoutId=window.setTimeout((()=>{this.timeout()}),this._timeoutMs));const k=tt.q.instance.game.state.get(Tt.G.Loading);k?k.waitFor(this._promise,this._isCritical):j.VyI.log("Loading screen not available, cannot register LoadingWaitComponent",j.$bb.Warning)}complete(){var k;this.clearTimeout(),null===(k=this._promise)||void 0===k||k.resolve(),this._promise=void 0,this.onComplete.dispatch()}fail(k="Operation failed"){var B;this.clearTimeout(),null===(B=this._promise)||void 0===B||B.reject(k),this._promise=void 0,this.onError.dispatch(k)}timeout(){var k,B;this._timeoutId=void 0,this._isCritical?null===(k=this._promise)||void 0===k||k.reject(new Error("Loading operation timed out")):null===(B=this._promise)||void 0===B||B.resolve(),this.onTimeout.dispatch()}clearTimeout(){j.Aq$.isDefined(this._timeoutId)&&(window.clearTimeout(this._timeoutId),this._timeoutId=void 0)}destroy(){this._promise=void 0,this.clearTimeout(),this.onComplete.dispose(),this.onTimeout.dispose(),this.onError.dispose(),super.destroy()}};(0,G.Cg)([(0,j.vkK)(),(0,j.YLv)("If true, the loading screen will be held immediately upon creation."),(0,G.Sn)("design:type",Boolean)],iE.prototype,"_holdOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,j.YLv)("If true, loading will show an error popup if the operation fails."),(0,G.Sn)("design:type",Boolean)],iE.prototype,"_isCritical",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.YLv)("Optional timeout in milliseconds. Set to 0 for no timeout."),(0,G.Sn)("design:type",Number)],iE.prototype,"_timeoutMs",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],iE.prototype,"onComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],iE.prototype,"onTimeout",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],iE.prototype,"onError",void 0),iE=(0,G.Cg)([(0,j.EVk)("LoadingScreenHold",W.Y.utility)],iE);let sE=class extends j.uAl{create(){super.create(),this.logOnCreate&&this.LogMessage()}LogMessage(k){let B="";k&&k.length>0?B=k:this.defaultMessage&&this.defaultMessage.length>0&&(B=this.defaultMessage),j.VyI.log(`[PREFAB LOG]: ${B}`,j.$bb.Verbose)}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],sE.prototype,"defaultMessage",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],sE.prototype,"logOnCreate",void 0),sE=(0,G.Cg)([(0,j.EVk)("Log",W.Y.utility)],sE);let nE=class extends j.uAl{constructor(){super(...arguments),this.membershipSuppressOn=new j.HN0,this.membershipSuppressOff=new j.HN0,this._shouldSuppressAd=!1}set suppressAdEnabled(k){this._shouldSuppressAd=k}get suppressAdEnabled(){return this._shouldSuppressAd}create(){super.create(),this.suppressAdEnabled=Qt.J.shouldSuppressAd(tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player)}run(){this._shouldSuppressAd?this.membershipSuppressOn.dispatch():this.membershipSuppressOff.dispatch()}destroy(){this.membershipSuppressOn.dispose(),this.membershipSuppressOff.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nE.prototype,"membershipSuppressOn",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nE.prototype,"membershipSuppressOff",void 0),nE=(0,G.Cg)([(0,j.EVk)("MembershipSuppression",W.Y.membership)],nE);let aE=class extends j.uAl{constructor(){super(...arguments),this.onIsVisible=new j.HN0,this.onNotVisible=new j.HN0}create(){super.create(),this._broadcaster=tt.q.instance.game.broadcaster,this._broadcaster.addAppListener(jn.J8.MorphMarbleUsed,this.dispatchIsVisible.bind(this),this),this._broadcaster.addAppListener(jn.J8.MorphMarbleCancelled,this.checkMorphMarbleState.bind(this),this),this._runOnLoad&&this.checkMorphMarbleState()}destroy(){var k,B;this.onIsVisible.dispose(),this.onNotVisible.dispose(),null===(k=this._broadcaster)||void 0===k||k.removeAppListener(jn.J8.MorphMarbleUsed,this),null===(B=this._broadcaster)||void 0===B||B.removeAppListener(jn.J8.MorphMarbleCancelled,this),super.destroy()}checkMorphMarbleState(){this._playerProvider.player.isPlayerTransformed()?this.onIsVisible.dispatch():this.onNotVisible.dispatch()}dispatchIsVisible(){this.onIsVisible.dispatch()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],aE.prototype,"_playerProvider",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],aE.prototype,"_runOnLoad",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],aE.prototype,"onIsVisible",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],aE.prototype,"onNotVisible",void 0),aE=(0,G.Cg)([(0,j.EVk)("MorphMarbleState",W.Y.utility)],aE);let rE=class extends j.uAl{constructor(){super(...arguments),this._checkOnCreate=!1,this._onValueChanged=new j.HN0,this._onValueChecked=new j.HN0}create(){super.create(),this._checkOnCreate&&this.checkValue()}setValue(k){k!==this._numberValue&&(this._numberValue=k,this._onValueChanged.dispatch(this._numberValue))}checkValue(){this._onValueChecked.dispatch(this._numberValue)}destroy(){this._onValueChanged.dispose(),this._onValueChecked.dispose(),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],rE.prototype,"_numberValue",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],rE.prototype,"_checkOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rE.prototype,"_onValueChanged",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rE.prototype,"_onValueChecked",void 0),rE=(0,G.Cg)([(0,j.EVk)("NumberState",W.Y.utility)],rE);let oE=class extends j.uAl{constructor(){super(...arguments),this.reportInitialState=!1,this.treatInactiveAsOffScreen=!1,this.onStateChange=new j.HN0,this.onEnteredScreen=new j.HN0,this.onLeftScreen=new j.HN0}create(){super.create(),this._gameWidth=j.W$e.instance.game.width,this._gameHeight=j.W$e.instance.game.height,this.reportInitialState?this.checkOnScreenIfActive():this._isOnScreen=this.isOnScreen(),this.gameObject.transform.onWorldMatrixChanged.add(this.checkOnScreenIfActive,this)}destroy(){this.gameObject.transform.onWorldMatrixChanged.remove(this.checkOnScreenIfActive,this),this.onStateChange.dispose(),this.onEnteredScreen.dispose(),this.onLeftScreen.dispose(),super.destroy()}checkOnScreenIfActive(){this.Active&&this.checkOnScreen()}checkOnScreen(){const k=this.isOnScreen();k!==this._isOnScreen&&(this._isOnScreen=k,this.onStateChange.dispatch(k),k?this.onEnteredScreen.dispatch():this.onLeftScreen.dispatch())}isOnScreen(){if(this.treatInactiveAsOffScreen&&!this.gameObject.active)return!1;const k=this.gameObject.transform;if(k instanceof j.XVE){const B=k.worldPosition.x,U=k.worldPosition.y,F=B+k.widthDelta,G=U+k.heightDelta;return B=0&&U=0}return k.worldPosition.x=0&&k.worldPosition.y=0}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],oE.prototype,"reportInitialState",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],oE.prototype,"treatInactiveAsOffScreen",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],oE.prototype,"onStateChange",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],oE.prototype,"onEnteredScreen",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],oE.prototype,"onLeftScreen",void 0),oE=(0,G.Cg)([(0,j.EVk)("OnScreenState",W.Y.object)],oE);U(57502);let hE=class extends j.uAl{constructor(){super(...arguments),this._onHasCompletedTutorial=new j.HN0,this._onHasNotCompletedTutorial=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.check()}destroy(){this._onHasCompletedTutorial.dispose(),this._onHasNotCompletedTutorial.dispose(),super.destroy()}check(){tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasCompletedTutorial()?this._onHasCompletedTutorial.dispatch():this._onHasNotCompletedTutorial.dispatch()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hE.prototype,"_onHasCompletedTutorial",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hE.prototype,"_onHasNotCompletedTutorial",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],hE.prototype,"_runOnLoad",void 0),hE=(0,G.Cg)([(0,j.EVk)("PlayerHasCompletedTutorialGuard",W.Y.utility)],hE);let cE=class extends j.uAl{getCustomData(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return{[this._customDataPropertyName]:k.backpack.hasItem(this._key,this._id)>0}}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],cE.prototype,"_customDataPropertyName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],cE.prototype,"_key",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],cE.prototype,"_id",void 0),cE=(0,G.Cg)([(0,j.EVk)("PlayerHasItemCustomData",W.Y.utility)],cE);let dE=class extends j.uAl{constructor(){super(...arguments),this.doesHaveItem=new j.HN0,this.doesNotHaveItem=new j.HN0}destroy(){this.doesHaveItem.dispose(),this.doesNotHaveItem.dispose(),super.destroy()}hasItem(){tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem(this._key,this._id)>0?this.doesHaveItem.dispatch():this.doesNotHaveItem.dispatch()}};var lE;(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],dE.prototype,"_key",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],dE.prototype,"_id",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],dE.prototype,"doesHaveItem",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],dE.prototype,"doesNotHaveItem",void 0),dE=(0,G.Cg)([(0,j.EVk)("PlayerHasItemGuard",W.Y.utility)],dE),function(k){k.HasAnyItem="AnHasAnyItemy",k.HasAllItems="HasAllItems"}(lE||(lE={}));let uE=class extends j.uAl{constructor(){super(...arguments),this._dispatchOnCreate=!1,this._whenToDispatchHasItems=lE.HasAnyItem,this.doesHaveItems=new j.HN0,this.doesNotHaveItems=new j.HN0}create(){super.create(),this._dispatchOnCreate&&this.hasItem()}destroy(){this.doesHaveItems.dispose(),this.doesNotHaveItems.dispose(),super.destroy()}hasItem(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(this._whenToDispatchHasItems===lE.HasAnyItem){(this._keys.some(((B,U)=>{const F=this._ids[U];return k.backpack.hasItem(B,F)>0}))?this.doesHaveItems:this.doesNotHaveItems).dispatch()}else if(this._whenToDispatchHasItems===lE.HasAllItems){let B=!0;this._keys.forEach(((U,F)=>{const G=this._ids[F];0===k.backpack.hasItem(U,G)&&(B=!1)})),B?this.doesHaveItems.dispatch():this.doesNotHaveItems.dispatch()}}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],uE.prototype,"_dispatchOnCreate",void 0),(0,G.Cg)([(0,j.gfw)(lE),(0,G.Sn)("design:type",String)],uE.prototype,"_whenToDispatchHasItems",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],uE.prototype,"_keys",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.g11)(),(0,G.Sn)("design:type",Array)],uE.prototype,"_ids",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uE.prototype,"doesHaveItems",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uE.prototype,"doesNotHaveItems",void 0),uE=(0,G.Cg)([(0,j.EVk)("PlayerHasMultipleItemGuard",W.Y.utility)],uE);let fE=class extends j.uAl{constructor(){super(...arguments),this._callPromiseFunctions=new j.HN0,this.onPromisesResolved=new j.HN0,this.onPromiseRejected=new j.HN0}destroy(){this._callPromiseFunctions.dispose(),this.onPromiseRejected.dispose(),this.onPromisesResolved.dispose(),super.destroy()}callPromises(){const k=this._callPromiseFunctions._bindings,B=k.map((k=>k.listener.apply(k.context))).filter((k=>k instanceof Promise));(0,ut.v)(B.length===k.length,"Invalid function was added to the promises signal"),Promise.all(B).then((()=>{this.onPromisesResolved.dispatch()})).catch((()=>{this.onPromiseRejected.dispatch()}))}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],fE.prototype,"_callPromiseFunctions",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],fE.prototype,"onPromisesResolved",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],fE.prototype,"onPromiseRejected",void 0),fE=(0,G.Cg)([(0,j.EVk)("PromiseAwaiter",W.Y.utility)],fE);var bE=U(20404);let pE=class extends j.uAl{constructor(){super(...arguments),this.onCheckTrue=new j.HN0,this.onCheckFalse=new j.HN0}checkQueryParamExists(){(bE.b.isQueryParameterSetForSession(this._assetID)?this.onCheckTrue:this.onCheckFalse).dispatch()}destroy(){this.onCheckTrue.dispose(),this.onCheckFalse.dispose(),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],pE.prototype,"_assetID",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],pE.prototype,"onCheckTrue",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],pE.prototype,"onCheckFalse",void 0),pE=(0,G.Cg)([(0,j.EVk)("QueryParamExistsGuard",W.Y.web)],pE);let vE=class extends j.uAl{constructor(){super(...arguments),this._runOnCreate=!1,this._decisionThreshold=.5,this._onBelowThreshold=new j.HN0,this._onAboveThreshold=new j.HN0}create(){super.create(),this._runOnCreate&&this.run()}run(){Math.random()=this._maxValue&&j.VyI.log("RandomComponent: Invalid range - minValue must be less than maxValue",j.$bb.Error)}getData(){return this._wholeNumbersOnly?Qe.o.integerInRange(this._minValue,this._maxValue):Qe.o.realInRange(this._minValue,this._maxValue)}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],mE.prototype,"_wholeNumbersOnly",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],mE.prototype,"_minValue",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.YLv)("Max is exclusive. i.e. 4 will return up to 3.9999 (or 3 if whole numbers)"),(0,G.Sn)("design:type",Number)],mE.prototype,"_maxValue",void 0),mE=(0,G.Cg)([(0,j.EVk)("RandomNumberDataProvider",W.Y.utility)],mE);let yE=class extends j.uAl{get anchorMinX(){return this._rectTransform.anchorMin.x}set anchorMinX(k){this._rectTransform.setAnchorMin(k,this.anchorMinY)}get anchorMinY(){return this._rectTransform.anchorMin.y}set anchorMinY(k){this._rectTransform.setAnchorMin(this.anchorMinX,k)}get anchorMaxX(){return this._rectTransform.anchorMax.x}set anchorMaxX(k){this._rectTransform.setAnchorMax(k,this.anchorMaxY)}get anchorMaxY(){return this._rectTransform.anchorMax.y}set anchorMaxY(k){this._rectTransform.setAnchorMax(this.anchorMaxX,k)}get width(){return this._rectTransform.sizeDelta.width}set width(k){this._rectTransform.sizeDelta=new j.or0(k,this.height)}get height(){return this._rectTransform.sizeDelta.height}set height(k){this._rectTransform.sizeDelta=new j.or0(this.width,k)}get pivotX(){return this._rectTransform.pivot.x}set pivotX(k){this._rectTransform.pivot=new j.I9Y(k,this.pivotY)}get pivotY(){return this._rectTransform.pivot.y}set pivotY(k){this._rectTransform.pivot=new j.I9Y(this.pivotX,k)}get rotation(){return this._rectTransform.localRotation}set rotation(k){this._rectTransform.setRotation(k)}get scaleX(){return this._rectTransform.localScale.x}set scaleX(k){this._rectTransform.setScale(k,this.scaleY)}get scaleY(){return this._rectTransform.localScale.y}set scaleY(k){this._rectTransform.setScale(this.scaleX,k)}get posX(){return this._rectTransform.posX}set posX(k){this._rectTransform.posX=k}get yPos(){return this._rectTransform.posY}set yPos(k){this._rectTransform.posY=k}};(0,G.Cg)([(0,j.Pqz)(j.XVE),(0,G.Sn)("design:type",j.XVE)],yE.prototype,"_rectTransform",void 0),yE=(0,G.Cg)([(0,j.EVk)("RectTransformWrapper",W.Y.animation)],yE);let _E=class extends j.uAl{reparent(){this._gameObject.parent=this._targetGameObject}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_E.prototype,"_gameObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_E.prototype,"_targetGameObject",void 0),_E=(0,G.Cg)([(0,j.EVk)("ReparentGameObject",W.Y.utility)],_E);let EE=class extends j.uAl{constructor(){super(...arguments),this._onReplacementComplete=new j.HN0}run(){const k=[];this._targetTiledLayer.findComponentsInChildren(j.w4d).filter((k=>k.tag===this._tagName)).sort(((k,B)=>B.GameObject.legacyTransform.group.position.y-k.GameObject.legacyTransform.group.position.y)).forEach((B=>(0,G.sH)(this,void 0,void 0,(function*(){const U=B.GameObject.legacyTransform.group.position.x,F=B.GameObject.legacyTransform.group.position.y,G=B.GameObject.parent;B.GameObject.destroy();const $=this._prefabLoader.loadWithDependencies(this._prefabID).promise;k.push($),$.then((k=>{G.addChild(k),k.transform?k.transform.setPosition(U,F):(k.legacyTransform.x=U,k.legacyTransform.y=F)})).catch((k=>{j.VyI.log(`Could not load a prefab as tile replacement: ${k.message}`,j.$bb.Error)}))})))),Promise.all(k).then((()=>{this._onReplacementComplete.dispatch()})).catch((k=>{j.VyI.log(`Error loading one or more tile replacements: ${k.message}`,j.$bb.Error),this._onReplacementComplete.dispatch()}))}destroy(){this._onReplacementComplete.dispose(),super.destroy()}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],EE.prototype,"_targetTiledLayer",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],EE.prototype,"_prefabID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],EE.prototype,"_tagName",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],EE.prototype,"_onReplacementComplete",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],EE.prototype,"_prefabLoader",void 0),EE=(0,G.Cg)([(0,j.EVk)("ReplaceTileWithPrefab",W.Y.utility)],EE);let wE=class extends j.uAl{constructor(){super(...arguments),this._bounds=new j.I9Y(100,100),this._limitMaxScale=!1,this._maxScale=new j.I9Y,this._runOnCreate=!1}create(){super.create(),this._runOnCreate&&this.applyScaling()}setBounds(k){this._bounds=k,this.applyScaling()}setBoundsXY(k,B){this._bounds.x=k,this._bounds.y=B,this.applyScaling()}applyScaling(){var k,B,U,F;if(!this._spine.isLoaded)return void this._spine.OnLoaded.addOnce(this.applyScaling,this);const G=this._spine.getDimensions().width,j=this._spine.getDimensions().height;let $;$=this._limitMaxScale?Math.min(Math.min(null!==(B=null===(k=this._maxScale)||void 0===k?void 0:k.x)&&void 0!==B?B:1/0,this._bounds.x/G),Math.min(null!==(F=null===(U=this._maxScale)||void 0===U?void 0:U.y)&&void 0!==F?F:1/0,this._bounds.y/j)):Math.min(this._bounds.x/G,this._bounds.y/j),this.gameObject.transform.setScale($)}};(0,G.Cg)([(0,j.Pqz)(j.v2j),(0,G.Sn)("design:type",j.v2j)],wE.prototype,"_spine",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],wE.prototype,"_bounds",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],wE.prototype,"_limitMaxScale",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],wE.prototype,"_maxScale",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],wE.prototype,"_runOnCreate",void 0),wE=(0,G.Cg)([(0,j.EVk)("ScaleSpineToBounds",W.Y.utility)],wE);let TE=class extends j.uAl{constructor(){super(...arguments),this._scale=new j.I9Y(1,1),this._bounds=new j.I9Y(100,100),this._scaleToBoundsWidth=!1,this._runOnCreate=!1}create(){super.create(),this._runOnCreate&&this.applyScaling()}setScale(k){this._scale=k}setBounds(k){this._bounds=k}applyScaling(){if(!this._spine.isLoaded)return void this._spine.OnLoaded.addOnce(this.applyScaling,this);if(this._scaleToBoundsWidth){const k=Math.max(this._bounds.x/this._spine.getDimensions().width,1);this.setScale(new j.I9Y(k,k))}const k=this._spine.getDimensions().width*this._scale.x,B=this._spine.getDimensions().height*this._scale.y;k>this._bounds.x||B>this._bounds.y?j.VyI.log("[ScaleSpineWithinBoundsComponent] Spine dimensions are larger than specified boundaries -- scaling not applied.",j.$bb.Verbose):this.gameObject.transform.setScale(this._scale.x,this._scale.y)}};(0,G.Cg)([(0,j.Pqz)(j.v2j),(0,G.Sn)("design:type",j.v2j)],TE.prototype,"_spine",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],TE.prototype,"_scale",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],TE.prototype,"_bounds",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],TE.prototype,"_scaleToBoundsWidth",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],TE.prototype,"_runOnCreate",void 0),TE=(0,G.Cg)([(0,j.EVk)("ScaleSpineWithinBounds",W.Y.utility)],TE);let SE=class extends j.uAl{constructor(){super(...arguments),this._runOnCreate=!1}create(){super.create(),this._runOnCreate&&this.adopt()}adopt(){this._adoptiveParent.addChild(this.GameObject)}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],SE.prototype,"_adoptiveParent",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],SE.prototype,"_runOnCreate",void 0),SE=(0,G.Cg)([(0,j.EVk)("SetParent",W.Y.utility)],SE);let AE=class extends j.uAl{logout(){tt.q.instance.prodigy.gameContainer.get("c97-bd0d").logout()}};AE=(0,G.Cg)([(0,j.EVk)("Settings",W.Y.utility)],AE);let CE=class extends j.uAl{constructor(){super(...arguments),this.signal=new j.HN0}fire(k){this.signal.dispatch(k)}destroy(){this.signal.dispose(),super.destroy()}};var OE;(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],CE.prototype,"signal",void 0),CE=(0,G.Cg)([(0,j.EVk)("SignalDummy",W.Y.utility)],CE);let IE=OE=class extends j.uAl{constructor(){super(...arguments),this._templateString=OE.TEMPLATE_TOKEN,this._groupSeparator=" ",this._weeksTemplate="",this._daysTemplate="",this._hoursTemplate="",this._minutesTemplate="",this._secondsTemplate=""}set weeksTemplate(k){this._weeksTemplate=k,this.updateTimeTemplate()}set daysTemplate(k){this._daysTemplate=k,this.updateTimeTemplate()}set hoursTemplate(k){this._hoursTemplate=k,this.updateTimeTemplate()}set minutesTemplate(k){this._minutesTemplate=k,this.updateTimeTemplate()}set secondsTemplate(k){this._secondsTemplate=k,this.updateTimeTemplate()}create(){super.create(),this._timeRemainingText.onTimerUpdated.add(this.updateTimeTemplate,this),this._timeRemainingText.onTimerCompleted.add(this.updateTimeTemplate,this),this.updateTimeTemplate()}destroy(){this._timeRemainingText.onTimerUpdated.remove(this.updateTimeTemplate,this),this._timeRemainingText.onTimerCompleted.remove(this.updateTimeTemplate,this),super.destroy()}updateTimeTemplate(){var k;const B=[["w",this._timeRemainingText.weekRemaining],["d",this._timeRemainingText.daysRemaining],["h",this._timeRemainingText.hoursRemaining],["m",this._timeRemainingText.minutesRemaining],["s",this._timeRemainingText.secondsRemaining]],U=[this.getSegmentTemplate(this.localizeIfPossible(this._weeksTemplate),B[0][1]),this.getSegmentTemplate(this.localizeIfPossible(this._daysTemplate),B[1][1]),this.getSegmentTemplate(this.localizeIfPossible(this._hoursTemplate),B[2][1]),this.getSegmentTemplate(this.localizeIfPossible(this._minutesTemplate),B[3][1]),this.getSegmentTemplate(this.localizeIfPossible(this._secondsTemplate),B[4][1])];if(this._hideCompletedTimeComponents){const k=this._timeRemainingText.smallestTimeGroup;for(;B.length>0&&B[0][1]<=0&&B[0][0]!==k;)B.shift(),U.shift()}this._maxGroups>0&&U.length>this._maxGroups&&(U.length=this._maxGroups);const F=U.filter((k=>k.length>0)).join(this._groupSeparator),G=(null===(k=this._templateString)||void 0===k?void 0:k.length)>0?this.localizeIfPossible(this._templateString).replace(OE.TEMPLATE_TOKEN,F):OE.TEMPLATE_TOKEN;this._timeRemainingText.setTemplateString(G)}getSegmentTemplate(k,B){const U=k.includes("{p}")?"{p}":"{s}",F=1!==B?"s":"";return k.split(U).join(F)}localizeIfPossible(k){return this._localizer.hasText(k)?this._localizer.getText(k):k}};IE.TEMPLATE_TOKEN="{t}",(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],IE.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],IE.prototype,"_timeRemainingText",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],IE.prototype,"_templateString",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],IE.prototype,"_groupSeparator",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],IE.prototype,"_hideCompletedTimeComponents",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],IE.prototype,"_maxGroups",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],IE.prototype,"_weeksTemplate",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],IE.prototype,"_daysTemplate",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],IE.prototype,"_hoursTemplate",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],IE.prototype,"_minutesTemplate",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],IE.prototype,"_secondsTemplate",void 0),IE=OE=(0,G.Cg)([(0,j.EVk)("TimeRemainingTemplateUpdate",W.Y.ui)],IE);var DE=U(95798);let RE=class extends j.uAl{disableAreaEvents(){const k=tt.q.instance.game.state.get(Tt.G.TileScreen);null==k||k.events.forEach((k=>{k instanceof DE.o&&k.disable()}))}};RE=(0,G.Cg)([(0,j.EVk)("ToggleLegacyMapAreaEvents",W.Y.map)],RE);var PE=U(56903);let ME=class extends j.uAl{constructor(){super(...arguments),this.unseenAds=new j.HN0,this._runOnLoad=!1}create(){super.create(),tt.q.instance.game.broadcaster.addAppListener(jn.Y1.RefreshWizardWatchAdCount,this.checkUnseenAdCount,this,jn.HG.HUD),PE.A.getWizardWatchData().then((k=>(0,G.sH)(this,void 0,void 0,(function*(){PE.A.getActiveEntityAds(),this._runOnLoad&&this.checkUnseenAdCount()})))).catch(j.RQr.createHandler("Error loading data for Wizard Watch ads"))}destroy(){this.unseenAds.dispose(),tt.q.instance.game.broadcaster.removeAppListener(jn.Y1.RefreshWizardWatchAdCount,this,jn.HG.HUD),super.destroy()}checkUnseenAdCount(){const k=PE.A.getUnseenActiveAdCount();this.unseenAds.dispatch(k>0,k>0?k:0)}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ME.prototype,"unseenAds",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ME.prototype,"_runOnLoad",void 0),ME=(0,G.Cg)([(0,j.EVk)("UnseenAdCount",W.Y.utility)],ME);var NE=U(36045);let xE=class extends NE.X{isPointOverShape(k){const B=this.worldPointToParent(k,this._rectTransform),U=this._rectTransform.getBounds(),F=new j.or0(U.right-U.left,U.bottom-U.top),G=U.left+F.getHalfWidth(),$=U.top+F.getHalfHeight(),H=2*(G-B.x)/F.width,V=2*($-B.y)/F.height;return H*H+V*V<1}};(0,G.Cg)([(0,j.Pqz)(j.XVE),(0,G.Sn)("design:type",j.XVE)],xE.prototype,"_rectTransform",void 0),xE=(0,G.Cg)([(0,j.EVk)("EllipseShape",W.Y.inputShapes)],xE);U(77442);let LE=class extends NE.X{isPointOverShape(k){const B=this.worldPointToParent(k,this._rectTransform),U=this._rectTransform.getBounds();return B.x>=U.left&&B.x=U.top&&B.yB.Active&&B.isPointOverShape(k)))}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(NE.X),(0,G.Sn)("design:type",Array)],kE.prototype,"_shapes",void 0),kE=(0,G.Cg)([(0,j.EVk)("ShapeGroup",W.Y.inputShapes)],kE);var BE=U(43924),UE=U.n(BE);class FE{static createSeeded(k){return new FE(UE()(k.toString()))}static get DEFAULT(){return this._defaultInstance}constructor(k=Math.random){this._rngFunction=k}setRandomNumberGenerator(k){this._rngFunction=k}getReal(k=1){return this._rngFunction()*k}getRealInRange(k,B){return this.getReal(B-k)+k}getInteger(k=Number.MAX_SAFE_INTEGER){return Math.floor(this._rngFunction()*k)}getIntegerInRange(k,B){return this.getInteger(B-k)+k}getSeed(){return this.getInteger()^this.getInteger()}shuffle(k){for(let B=k.length-1;B>0;B--){const U=this.getInteger(B),F=k[U];k[U]=k[B],k[B]=F}return k}}FE._defaultInstance=new FE(Math.random);class GE{constructor(k){this._tableData=k}getItem(k,B=FE.DEFAULT){const U=this.getItemWithWeight(k,B);return U&&delete U.weight,U}getItemWithWeight(k,B=FE.DEFAULT){const U=this.buildWeightedItemList(k),F=this.selectRandomTableElement(U.items,U.totalItemWeights,B);return F?{type:F.type,ID:F.ID,quantity:this.getItemQuantity(F,B),weight:F.weight}:null}getUniqueItemsWithWeight(k,B,U=FE.DEFAULT){const F=[],G=this.buildWeightedItemList(B),j=G.items;for(let $=0;$0){const k=this.selectRandomTableElement(G.items,G.totalItemWeights,U),B=j.indexOf(k);B>-1&&(j.splice(B,1),G.totalItemWeights-=k.weight,F.push({type:k.type,ID:k.ID,quantity:this.getItemQuantity(k,U),weight:k.weight}))}else{const k=this._tableData[0].fallback;F.push({type:k.type,ID:k.ID,quantity:this.getItemQuantity(k,U),weight:1})}return F}getUniqueItems(k,B,U=FE.DEFAULT){return this.getUniqueItemsWithWeight(k,B,U).map((k=>({type:k.type,ID:k.ID,quantity:k.quantity})))}getItems(k,B,U=FE.DEFAULT){const F=[];for(let G=0;G-1;--G){const j=k[G],$=B.getMaxCount(j.type);if($>0){const G=B.getOwnedCount(j.type,j.ID)+k.filter((k=>k.type===j.type&&k.ID===j.ID)).map((k=>k.quantity)).reduce(((k,B)=>k+B),0);if(G>$){const k=G-$;j.quantity>1&&kk.items)),U=B.length;let F=0;for(let G=0;G-1&&k.getOwnedCount(U.type,U.ID)>=j&&(B[G]=Object.assign(Object.assign({},this._tableData[0].fallback),{weight:U.weight}))}return{totalItemWeights:F,items:B}}}var jE=U(88701);let $E=class extends pt._{create(){super.create();const k=Yt.t.getItem("itemTable",this._itemTableAssetId);(null==k?void 0:k.data)?this._itemTable=new GE([k.data]):j.VyI.log(`[ItemTableComponent]: No item table data found for asset ID ${this._itemTableAssetId}`,j.$bb.Error)}getData(){if(!this._itemTable)return j.VyI.log("[ItemTableComponent]: Item table is not initialized.",j.$bb.Error),null;const k=this._itemTable.getItem(this._activePlayerItemStorage);return k?[k.type,k.ID,k.quantity]:(j.VyI.log(`[ItemTableComponent]: Failed to retrieve item from ItemTable ${this._itemTableAssetId}.`,j.$bb.Warning),null)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],$E.prototype,"_itemTableAssetId",void 0),(0,G.Cg)([(0,j.Cdj)("f51-26f1"),(0,G.Sn)("design:type",jE.C)],$E.prototype,"_activePlayerItemStorage",void 0),$E=(0,G.Cg)([(0,j.EVk)("ItemTableDataProvider",W.Y.item)],$E);let HE=class extends j.uAl{destroy(){this._popupManager?this.enableNotifications():tt.q.instance.prodigy.notifications.resume(this),super.destroy()}disableNotifications(){(0,Td.dU)(this._popupManager,this)}enableNotifications(){(0,Td.EK)(this._popupManager,this)}};(0,G.Cg)([(0,j.Cdj)("PopupHandler"),(0,G.Sn)("design:type",el.Y)],HE.prototype,"_popupManager",void 0),HE=(0,G.Cg)([(0,j.EVk)("EnableNotifications",W.Y.ui)],HE);U(38268);let VE=class extends j.uAl{constructor(){super(...arguments),this._useLocalAssets=!1,this.hasMetRequirements=new j.HN0,this.hasNotMetRequirements=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.checkRequirements()}destroy(){this.hasMetRequirements.dispose(),this.hasNotMetRequirements.dispose(),super.destroy()}checkRequirements(){let k;if(this._useLocalAssets){if(k=tt.q.instance.game.cache.getJSON(this._requirementsDataSource)[this.requirementsKey].data,!k)return void j.VyI.log(`[MeetsFeatureRequirementsComponent]: Cannot find local asset for requirement ${this.requirementsKey}`,j.$bb.Error)}else k=this._requirementsID;Eo.a.getRequirementsResult(k).then((k=>{k?this.hasMetRequirements.dispatch():this.hasNotMetRequirements.dispatch()})).catch(j.RQr.createHandler("[MeetsFeatureRequirementsComponent]: Error checking requirements"))}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],VE.prototype,"_useLocalAssets",void 0),(0,G.Cg)([(0,j.okD)((k=>!k._useLocalAssets)),(0,j.g11)(),(0,G.Sn)("design:type",Number)],VE.prototype,"_requirementsID",void 0),(0,G.Cg)([(0,j.okD)((k=>k._useLocalAssets)),(0,j.Bak)(),(0,j.tW2)("requirements"),(0,G.Sn)("design:type",String)],VE.prototype,"_requirementsDataSource",void 0),(0,G.Cg)([(0,j.okD)((k=>k._useLocalAssets)),(0,j.W_S)(),(0,G.Sn)("design:type",String)],VE.prototype,"requirementsKey",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],VE.prototype,"hasMetRequirements",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],VE.prototype,"hasNotMetRequirements",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],VE.prototype,"_runOnLoad",void 0),VE=(0,G.Cg)([(0,j.EVk)("MeetsFeatureRequirements",W.Y.saving)],VE);let WE=class extends j.uAl{destroy(){this.resume(),super.destroy()}pause(){tt.q.instance.prodigy.notifications.pause(this)}resume(){tt.q.instance.prodigy.notifications.resume(this)}resumeAll(){tt.q.instance.prodigy.notifications.resumeAll()}clearNotifications(k=!1){tt.q.instance.prodigy.notifications.clearNotifications(k)}pauseAndClearNotifications(k=!1){this.pause(),this.clearNotifications(k)}};WE=(0,G.Cg)([(0,j.EVk)("NotificationController",W.Y.ui)],WE);let qE=class extends pt._{getData(){return tt.q.instance.prodigy.notifications.isPaused()}};qE=(0,G.Cg)([(0,j.EVk)("NotificationsPausedDataProvider",W.Y.dataProvider)],qE);var KE=U(642),zE=U(75329);let YE=class extends j.uAl{constructor(){super(...arguments),this.onDialogueOpened=new j.HN0,this.onDialogueClosed=new j.HN0}destroy(){this.onDialogueOpened.dispose(),this.onDialogueClosed.dispose(),super.destroy()}openWebsite(){if(Gs.pF.isNativeApp()||j.o5U.isMobile()){const k=new zE.Z(this._localizer.getText("BUTTON_OKAY_CAPITAL"),(()=>{this.onDialogueClosed.dispatch()}),void 0,void 0,this._localizer.getText("UH_OH_TITLE"),this._localizer.getText("OPEN_URL_IN_APP"));tt.q.instance.prodigy.open.informationDialog(k),this.onDialogueOpened.dispatch()}else if(j.Aq$.isDefined(this.websiteLink)){const k=new KE.k(this._localizer.getText("BUTTON_YES_CAPITAL"),(()=>{vp.I.openWebsite(this.websiteLink),this.onDialogueClosed.dispatch()}),this._localizer.getText("BUTTON_NO_CAPITAL"),(()=>{this.onDialogueClosed.dispatch()}),{atlas:Ve._.Ui_store_json,name:"icon-large-exclamation"},void 0,void 0,this._localizer.getText("LOGIN_LEAVE_GAME"),this._localizer.getText("NOW_LEAVING_PRODIGY"));tt.q.instance.prodigy.open.confirmationDialog(k),this.onDialogueOpened.dispatch()}else j.VyI.log("ERROR: Not a valid link!",j.$bb.Verbose)}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],YE.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],YE.prototype,"websiteLink",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],YE.prototype,"onDialogueOpened",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],YE.prototype,"onDialogueClosed",void 0),YE=(0,G.Cg)([(0,j.EVk)("OpenWebsite",j.YH6.ui)],YE);var QE=U(81623);let XE=class extends j.uAl{constructor(){super(...arguments),this.isInstalled=new j.HN0,this.isNotInstalled=new j.HN0}checkInstallState(){(QE.u.PWA_INSTALLED_DURING_CURRENT_SESSION?this.isInstalled:this.isNotInstalled).dispatch()}destroy(){this.isInstalled.dispose(),this.isNotInstalled.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],XE.prototype,"isInstalled",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],XE.prototype,"isNotInstalled",void 0),XE=(0,G.Cg)([(0,j.EVk)("PWAInstalledGuardCurrentSession",W.Y.web)],XE);let ZE=class extends j.uAl{constructor(){super(...arguments),this.isInstalled=new j.HN0,this.isNotInstalled=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.check()}destroy(){this.isInstalled.dispose(),this.isNotInstalled.dispose(),super.destroy()}check(){(this._pwaService.isPWAInstalled()?this.isInstalled:this.isNotInstalled).dispatch()}};(0,G.Cg)([(0,j.Cdj)("313-bcd5"),(0,G.Sn)("design:type",QE.u)],ZE.prototype,"_pwaService",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ZE.prototype,"isInstalled",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ZE.prototype,"isNotInstalled",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ZE.prototype,"_runOnLoad",void 0),ZE=(0,G.Cg)([(0,j.EVk)("PWAInstalledGuard",W.Y.web)],ZE);var JE=U(95066),tw=U(36525);let ew=class extends j.uAl{constructor(){super(...arguments),this.onPWAAccept=new j.HN0,this.onPWADismiss=new j.HN0,this.onError=new j.HN0,this.onRegisterSuccess=new j.HN0}registerServiceWorker(){this._pwaInstallerService.registerServiceWorker().then((k=>{k?this.onRegisterSuccess.dispatch():this.onError.dispatch()})).catch((()=>{this.onError.dispatch()}))}promptInstall(){var k,B;if(QE.u.PWA_INSTALLED_DURING_CURRENT_SESSION){QE.u.PWA_BEFORE_INSTALL_DEFERRED_EVENT=null,this.onPWAAccept.dispatch();const k=new tw.i;k.setKey("prodigy_game.PWAInstallFromURLIcon"),k.setValue(1);tt.q.instance.prodigy.gameContainer.get("e59-eea6").logStat(k,JE.d.Increment)}else(null===(k=this._pendingInstallState)||void 0===k?void 0:k.getValue())?j.VyI.log("previous promptInstall promise never resolved.",j.$bb.Warning):(null===(B=this._pendingInstallState)||void 0===B||B.setValue(!0),this._pwaInstallerService.promptInstall().then((k=>{var B;null===(B=this._pendingInstallState)||void 0===B||B.setValue(!1),"accepted"===k?this.onPWAAccept.dispatch():"dismissed"===k?this.onPWADismiss.dispatch():this.onError.dispatch()})).catch((()=>{var k;null===(k=this._pendingInstallState)||void 0===k||k.setValue(!1),this.onError.dispatch()})))}destroy(){this.onPWAAccept.dispose(),this.onPWADismiss.dispose(),this.onError.dispose(),this.onRegisterSuccess.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("313-bcd5"),(0,G.Sn)("design:type",QE.u)],ew.prototype,"_pwaInstallerService",void 0),(0,G.Cg)([(0,j.MnK)(Ar.f),(0,G.Sn)("design:type",Ar.f)],ew.prototype,"_pendingInstallState",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ew.prototype,"onPWAAccept",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ew.prototype,"onPWADismiss",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ew.prototype,"onError",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ew.prototype,"onRegisterSuccess",void 0),ew=(0,G.Cg)([(0,j.EVk)("PWAInstaller",W.Y.web)],ew);let iw=class extends j.uAl{constructor(){super(...arguments),this.isSupported=new j.HN0,this.isNotSupported=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.check()}destroy(){this.isSupported.dispose(),this.isNotSupported.dispose(),super.destroy()}check(){(this._pwaService.isPlatformSupported()?this.isSupported:this.isNotSupported).dispatch()}};(0,G.Cg)([(0,j.Cdj)("313-bcd5"),(0,G.Sn)("design:type",QE.u)],iw.prototype,"_pwaService",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],iw.prototype,"isSupported",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],iw.prototype,"isNotSupported",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],iw.prototype,"_runOnLoad",void 0),iw=(0,G.Cg)([(0,j.EVk)("PWAPlatformSupportedGuard",W.Y.web)],iw);U(25809);var sw=U(29044);let nw=class extends j.uAl{constructor(){super(...arguments),this.onNotificationAccept=new j.HN0,this.onNotificationBlock=new j.HN0,this.onNotificationDismiss=new j.HN0,this.onComplete=new j.HN0,this.onError=new j.HN0}requestPermission(){this._notificationInstallerService.notificationPermissionRequest().then((k=>{k.hasChanged?"granted"===k.status?this.onNotificationAccept.dispatch():"denied"===k.status&&this.onNotificationBlock.dispatch():"default"===k.status&&this.onNotificationDismiss.dispatch(),"granted"===k.status?this.registerServiceWorkerForFirebase():this.onComplete.dispatch()})).catch((()=>{this.onError.dispatch()}))}registerServiceWorkerForFirebase(){this._notificationInstallerService.registerServiceWorkerForFirebase().then((k=>{k?this.onComplete.dispatch():this.onError.dispatch()})).catch((()=>{this.onError.dispatch()}))}destroy(){this.onNotificationAccept.dispose(),this.onNotificationBlock.dispose(),this.onNotificationDismiss.dispose(),this.onComplete.dispose(),this.onError.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("23d-f8f6"),(0,G.Sn)("design:type",sw.F)],nw.prototype,"_notificationInstallerService",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nw.prototype,"onNotificationAccept",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nw.prototype,"onNotificationBlock",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nw.prototype,"onNotificationDismiss",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nw.prototype,"onComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nw.prototype,"onError",void 0),nw=(0,G.Cg)([(0,j.EVk)("PushNotificationInstaller",W.Y.web)],nw);let aw=class extends j.uAl{updateTextAndPosition(k,B,U){this.updateTextKey(k),this.updatePosition(B,U)}updateTextKey(k){this._localizedText.setLocalizationKey(k)}updatePosition(k,B){this.gameObject.transform.setPosition(k,B)}};(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],aw.prototype,"_localizedText",void 0),aw=(0,G.Cg)([(0,j.EVk)("TutorialNootDialogue")],aw);U(67820),U(8083),U(1559),U(81617);let rw=class extends j.uAl{constructor(){super(...arguments),this._signInButton=null,this._registerButton=null,this._policyButton=null,this._websiteButton=null,this._forgotPassword=null,this._errorIcon=null,this._errorMessage=null,this._usernameTooltip=null,this._passwordTooltip=null,this._usernameTooltipObj=null,this._passwordTooltipObj=null,this._hideForTutorialObjects=[]}get signInButton(){return this._signInButton}get registerButton(){return this._registerButton}get policyButton(){return this._policyButton}get websiteButton(){return this._websiteButton}get forgotPassword(){return this._forgotPassword}get errorIcon(){return this._errorIcon}get errorMessage(){return this._errorMessage}get usernameTooltip(){return this._usernameTooltip}get passwordTooltip(){return this._passwordTooltip}get usernameTooltipObj(){return this._usernameTooltipObj}get passwordTooltipObj(){return this._passwordTooltipObj}get hideForTutorialObjects(){return this._hideForTutorialObjects}};(0,G.Cg)([(0,j.x4W)("signInButton"),(0,G.Sn)("design:type",F.$)],rw.prototype,"_signInButton",void 0),(0,G.Cg)([(0,j.x4W)("registerButton"),(0,G.Sn)("design:type",F.$)],rw.prototype,"_registerButton",void 0),(0,G.Cg)([(0,j.x4W)("policyButton"),(0,G.Sn)("design:type",F.$)],rw.prototype,"_policyButton",void 0),(0,G.Cg)([(0,j.x4W)("websiteButton"),(0,G.Sn)("design:type",F.$)],rw.prototype,"_websiteButton",void 0),(0,G.Cg)([(0,j.x4W)("forgotPassword"),(0,G.Sn)("design:type",F.$)],rw.prototype,"_forgotPassword",void 0),(0,G.Cg)([(0,j.x4W)("errorIcon"),(0,G.Sn)("design:type",j._mx)],rw.prototype,"_errorIcon",void 0),(0,G.Cg)([(0,j.x4W)("errorMessage"),(0,G.Sn)("design:type",j.EYj)],rw.prototype,"_errorMessage",void 0),(0,G.Cg)([(0,j.x4W)("usernameTooltip"),(0,G.Sn)("design:type",j.EYj)],rw.prototype,"_usernameTooltip",void 0),(0,G.Cg)([(0,j.x4W)("passwordTooltip"),(0,G.Sn)("design:type",j.EYj)],rw.prototype,"_passwordTooltip",void 0),(0,G.Cg)([(0,j.x4W)("usernameTooltipObj"),(0,G.Sn)("design:type",j._mx)],rw.prototype,"_usernameTooltipObj",void 0),(0,G.Cg)([(0,j.x4W)("passwordTooltipObj"),(0,G.Sn)("design:type",j._mx)],rw.prototype,"_passwordTooltipObj",void 0),(0,G.Cg)([(0,j.x4W)("hideForTutorialObjects"),(0,G.Sn)("design:type",Array)],rw.prototype,"_hideForTutorialObjects",void 0),rw=(0,G.Cg)([(0,j.EVk)("LoginPrefab")],rw);U(49334);var ow=U(20705);U(21134),U(77302),U(26022);ow.f;var hw=U(48757);U(14335);let cw=class extends Qs.I{constructor(){super(...arguments),this._funnelIDKey="funnelId"}getPropertiesObject(){return{[this._funnelIDKey]:this._segment.purchase.getFunnelID()}}};(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",Function)],cw.prototype,"_segment",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],cw.prototype,"_funnelIDKey",void 0),cw=(0,G.Cg)([(0,j.EVk)("PurchaseFunnelIDPropertiesProvider",W.Y.analytics)],cw);var dw=U(35569);let lw=class extends ih.k{constructor(){super(...arguments),this.funnelName="academy_towers",this.funnelType="story",this.step=dw.D.FirstKeystonePlaced}sendFunnelEvent(){this._segment.academyTowers.sendFunnelEvent({funnelName:this.funnelName,funnelType:this.funnelType,step:this.step},...this.stepArgs)}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],lw.prototype,"funnelName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],lw.prototype,"funnelType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],lw.prototype,"step",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],lw.prototype,"stepArgs",void 0),lw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsAcademyTowers",W.Y.analytics)],lw);var uw=U(16887);let fw=class extends ih.k{constructor(){super(...arguments),this.stepIndex=uw.g.StepOne,this.stepName=uw.f.PermissionNeeded}sendFunnelAdvancedEvent(){this._segment.consent.sendFunnelAdvancedSegmentEvent(this.stepIndex,this.stepName)}};(0,G.Cg)([(0,j.gfw)(uw.g),(0,G.Sn)("design:type",Number)],fw.prototype,"stepIndex",void 0),(0,G.Cg)([(0,j.gfw)(uw.f),(0,G.Sn)("design:type",String)],fw.prototype,"stepName",void 0),fw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsConsent",W.Y.analytics)],fw);let bw=class extends ih.k{constructor(){super(...arguments),this._containerType=ui.ZF.Interactable,this._instanceType=fi.N.OpenWorld,this._failReason=Zb.WE.MemberLocked}sendContainerDiscoveredEvent(){this._segment.container.sendContainerDiscoveredEvent(this._containerType,this._containerID,Math.round(this.gameObject.transform.worldPosition.x),Math.round(this.gameObject.transform.worldPosition.y))}sendContainerOpenedEvent(){this._segment.container.sendContainerOpenedEvent(this._containerType,this._containerID,this._instanceType)}sendContainerOpenedFailedEvent(){this._segment.container.sendContainerOpenedFailedEvent(this._containerType,this._containerID,this._failReason,this._instanceType)}};(0,G.Cg)([(0,j.gfw)(ui.ZF),(0,G.Sn)("design:type",String)],bw.prototype,"_containerType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],bw.prototype,"_containerID",void 0),(0,G.Cg)([(0,j.gfw)(fi.N),(0,G.Sn)("design:type",String)],bw.prototype,"_instanceType",void 0),(0,G.Cg)([(0,j.gfw)(Zb.WE),(0,G.Sn)("design:type",String)],bw.prototype,"_failReason",void 0),bw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsContainer",W.Y.analytics)],bw);let pw=class extends ih.k{constructor(){super(...arguments),this.instanceOrigin=Mi.W5.New,this.milestoneType=Mi.lT.Healstone,this.exitOutcome=Mi.Yj.Exit}sendCrystalCavernsEnteredEvent(){this._segment.playerMovementAndDiscovery.sendCrystalCavernsEnteredEvent(this.instanceOrigin);const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.kennel.petTeam.forEach((B=>{B&&this._segment.playerMovementAndDiscovery.sendCrystalCavernsParticipantsEvent({name:B.getName()===k.getName()?"Player":B.getName(),type:B.getElement(),health:B.getCurrentHearts()})}))}sendCrystalCavernsMilestoneReachedEvent(){this._segment.playerMovementAndDiscovery.sendCrystalCavernsMilestoneReachedEvent(this.milestoneType)}sendCrystalCavernsCompletedEvent(){this._segment.playerMovementAndDiscovery.sendCrystalCavernsCompletedEvent(this.exitOutcome)}};(0,G.Cg)([(0,j.gfw)(Mi.W5),(0,G.Sn)("design:type",String)],pw.prototype,"instanceOrigin",void 0),(0,G.Cg)([(0,j.gfw)(Mi.lT),(0,G.Sn)("design:type",String)],pw.prototype,"milestoneType",void 0),(0,G.Cg)([(0,j.gfw)(Mi.Yj),(0,G.Sn)("design:type",String)],pw.prototype,"exitOutcome",void 0),pw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsCrystalCaverns",W.Y.analytics)],pw);let vw=class extends ih.k{sendCustomEvent(){this._segment.sendCustomEvent(this._customEvent,this.getPropertiesObject())}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],vw.prototype,"_customEvent",void 0),vw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsCustom",W.Y.analytics)],vw);var gw=U(24047);let mw=class extends ih.k{constructor(){super(...arguments),this.funnelName=gw.F.EndGame,this.funnelType=gw.M.Chapter,this.stepName=lu.jT.IllusionBoss1FirstTimeBattleStart}sendEndGameFunnelAdvancedEvent(){this._segment.battleRevamp.sendBattleFunnelAdvancedEvent({funnel_name:this.funnelName,funnel_type:this.funnelType,step_index:this.stepIndex,step_name:this.stepName})}};(0,G.Cg)([(0,j.gfw)(gw.F),(0,j.W_S)(),(0,G.Sn)("design:type",String)],mw.prototype,"funnelName",void 0),(0,G.Cg)([(0,j.gfw)(gw.M),(0,j.W_S)(),(0,G.Sn)("design:type",String)],mw.prototype,"funnelType",void 0),(0,G.Cg)([(0,j.gfw)(lu.jT),(0,j.W_S)(),(0,G.Sn)("design:type",String)],mw.prototype,"stepName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",Number)],mw.prototype,"stepIndex",void 0),mw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsEndgame",W.Y.analytics)],mw);let yw=class extends ih.k{sendFeatureUnlockedEvent(){const k=this.getPropertiesObject(),B=k.FEATURE_NAME,U=k.FEATURE_TYPE,F=k.LOCK_TYPE;On.J.sendFeatureUnlockedEvent(B,U,F)}sendDifficultyUnlockedEvent(k){On.J.sendDifficultyUnlockedEvent(k)}};yw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsFeatureUnlock",W.Y.analytics)],yw);let _w=class extends ih.k{constructor(){super(...arguments),this.npcName="",this.npcType=Ia.ac.Merchant}sendNpcDiscoveredEvent(){var k,B;this._segment.gameWorld.sendNpcDiscoveredEvent({npc_name:this.npcName,npc_type:this.npcType,x_coord:null===(k=this.GameObject.transform)||void 0===k?void 0:k.worldPosition.x,y_coord:null===(B=this.GameObject.transform)||void 0===B?void 0:B.worldPosition.y,npc_animation_id:"idle"})}sendNpcClickedEvent(){this._segment.gameWorld.sendNpcClickedEvent({npc_name:this.npcName,npc_type:this.npcType})}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],_w.prototype,"npcName",void 0),(0,G.Cg)([(0,j.gfw)(Ia.ac),(0,G.Sn)("design:type",String)],_w.prototype,"npcType",void 0),_w=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsNpc",W.Y.analytics)],_w);let Ew=class extends ih.k{constructor(){super(...arguments),this.stepName=eh.l.TutorialStart}sendFunnelAdvancedEvent(){this._segment.playerProgression.sendFunnelAdvancedEvent({funnelName:"Onboarding",funnelType:"tutorial",stepName:this.stepName})}};(0,G.Cg)([(0,j.gfw)(eh.l),(0,G.Sn)("design:type",String)],Ew.prototype,"stepName",void 0),Ew=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsOnboarding",W.Y.analytics)],Ew);let ww=class extends ih.k{sendFunnelAdvancedEvent(k){this._segment.petMerge.sendPetMergeTutorialFunnelAdvancedEvent(k)}};ww=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsPetMerge",W.Y.analytics)],ww);let Tw=class extends bw{create(){var k;super.create();{const B=tt.q.instance.prodigy.world.getCurrentZone();(null===(k=this._interactableGameObject)||void 0===k?void 0:k.transform)&&(this._containerID=`${B}-${this._interactableGameObject.transform.worldPosition.x}-${this._interactableGameObject.transform.worldPosition.y}`)}}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Tw.prototype,"_interactableGameObject",void 0),Tw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsPositionedContainer",W.Y.analytics)],Tw);let Sw=class extends ih.k{sendTabEvent(){const k=this.getPropertiesObject(),B=this.getCustomPropertiesObject();j.Aq$.isDefined(k.tabName)&&j.Aq$.isDefined(k.interfaceType)&&this._segment.featureCommon.sendTabEvent(k,B)}};Sw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsTab",W.Y.analytics)],Sw);U(7910);let Aw=class extends ih.k{constructor(){super(...arguments),this.objectId="",this.objectType=Ia.u_.Teleporter,this.failedReason=Ia.kN.MemberLocked}sendWorldObjectDiscoveredEvent(){this._segment.gameWorld.sendWorldObjectDiscoveredEvent({object_type:this.objectType,object_id:this.objectId,x_coord:this.gameObject.transform.worldPosition.x,y_coord:this.gameObject.transform.worldPosition.y})}sendWorldObjectUsedEvent(){this._segment.gameWorld.sendWorldObjectUsedEvent({object_type:this.objectType,object_id:this.objectId})}sendWorldObjectUsedFailedEvent(){this._segment.gameWorld.sendWorldObjectUsedFailedEvent({object_type:this.objectType,object_id:this.objectId,fail_reason:this.failedReason})}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Aw.prototype,"objectId",void 0),(0,G.Cg)([(0,j.gfw)(Ia.u_),(0,G.Sn)("design:type",String)],Aw.prototype,"objectType",void 0),(0,G.Cg)([(0,j.gfw)(Ia.kN),(0,G.Sn)("design:type",String)],Aw.prototype,"failedReason",void 0),Aw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsWorldObject",W.Y.analytics)],Aw);let Cw=class extends Qs.I{get destinationName(){return this._destinationName}set destinationName(k){this._destinationName=k}getPropertiesObject(){return{buttonName:this.buttonName,destinationName:this.destinationName,elementType:this._elementType,elementID:this.elementId,interfaceName:this.interfaceName,interfaceType:this._interfaceType,saveClickInfo:this.saveClickInfo,instanceId:this._instanceId}}};(0,G.Cg)([(0,j.gfw)({gold:"keep-charged-level-gold-button",magicoin:"keep-charged-level-magicoin-button"}),(0,G.Sn)("design:type",String)],Cw.prototype,"buttonName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Cw.prototype,"_destinationName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Cw.prototype,"elementId",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Cw.prototype,"_elementType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Cw.prototype,"interfaceName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Cw.prototype,"_interfaceType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Cw.prototype,"saveClickInfo",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Cw.prototype,"_instanceId",void 0),Cw=(0,G.Cg)([(0,j.EVk)("SegmentButtonChargedLevelsPropertiesProvider",W.Y.analytics)],Cw);let Ow=class extends Qs.I{getPropertiesObject(){let k={};return this._customProperties&&(k=Object.assign({},this._customProperties)),k}addPropertiesObject(k){this._customProperties=Object.assign(Object.assign({},this._customProperties),k)}addProperty(k,B){this._customProperties=Object.assign(Object.assign({},this._customProperties),{[k]:B})}};(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],Ow.prototype,"_customProperties",void 0),Ow=(0,G.Cg)([(0,j.EVk)("SegmentCustomPropertiesProvider",W.Y.analytics)],Ow);let Iw=class extends Qs.I{getPropertiesObject(){var k;return{tabName:this._tabName,interfaceName:null!==(k=this._interfaceName)&&void 0!==k?k:"",interfaceType:this._interfaceType,instanceType:this._instanceType,saveClickInfo:this.saveClickInfo}}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Iw.prototype,"_tabName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Iw.prototype,"_interfaceName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Iw.prototype,"_interfaceType",void 0),(0,G.Cg)([(0,j.gfw)(fi.N),(0,G.Sn)("design:type",String)],Iw.prototype,"_instanceType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Iw.prototype,"saveClickInfo",void 0),Iw=(0,G.Cg)([(0,j.EVk)("SegmentTabPropertiesProvider",W.Y.analytics)],Iw);let Dw=class extends j.uAl{sendEntryIllustrationEvent(k){this._segment.featureCommon.sendInterfaceEvent({interfaceName:`zone_entry_illustration_${this._zoneId}_${k+1}`,interfaceType:ui.Wm.Popup,originType:k>0?ui.$N.ButtonClick:ui.$N.AutoSurfaced,eventName:"interface_opened"})}};(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",Function)],Dw.prototype,"_segment",void 0),(0,G.Cg)([(0,j.gfw)(Ft.A_),(0,G.Sn)("design:type",String)],Dw.prototype,"_zoneId",void 0),Dw=(0,G.Cg)([(0,j.EVk)("ZoneEntryIllustrationSegment",W.Y.analytics)],Dw);let Rw=class extends ih.k{sendFunnelAdvanced(k=this.getPropertiesObject().funnelStepName){this._segment.festival.sendFestivalFunnelAdvancedEvent(k)}};Rw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsFestival",W.Y.analytics,"Used for various festival analytics events for prefabs")],Rw);var Pw=U(99134);let Mw=class extends Qs.I{getPropertiesObject(){return{funnelStepName:this._funnelStepName}}};(0,G.Cg)([(0,j.gfw)(Pw.v),(0,G.Sn)("design:type",String)],Mw.prototype,"_funnelStepName",void 0),Mw=(0,G.Cg)([(0,j.EVk)("SegmentFestivalPropertyProvider",W.Y.analytics,"Provides various properties for festival segment events")],Mw);var Nw=U(74846);U(50118);let xw=class extends j.uAl{constructor(){super(...arguments),this._onComplete=new j.HN0}get OnComplete(){return this._onComplete}destroy(){this._onComplete.dispose(),super.destroy()}play(){this._isLooping?((0,Pn.sR)(this._animators,this._animationName,this._isLooping),this._hasFinished=!0,this._onComplete.dispatch()):(this._hasFinished=!1,(0,Pn.ye)(this._animators,this._animationName).then((()=>{this._onComplete.dispatch(),this._hasFinished=!0})))}hasFinishedPlaying(){return this._hasFinished}setAnimationData(k,B){this._animationName=k,this._isLooping=B}};(0,G.Cg)([(0,j.Cdj)("Animators"),(0,G.Sn)("design:type",Object)],xw.prototype,"_animators",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],xw.prototype,"_animationName",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],xw.prototype,"_isLooping",void 0),xw=(0,G.Cg)([(0,j.EVk)("PlayInjectedAnimators",W.Y.animation)],xw);U(22637),U(99898),U(44977),U(37854),U(16184);var Lw=U(54001);U(71554);let kw=class extends j.uAl{performTween(){this._parabolicTween&&this._startPositionTransform?this._parabolicTween.startTween(this._startPositionTransform.localPosition.x,this._startPositionTransform.localPosition.y,0,0):j.VyI.log("Cannot perform parabolic tween, missing required parameters.",j.$bb.Error)}};(0,G.Cg)([(0,j.Pqz)(Lw.y),(0,G.Sn)("design:type",Lw.y)],kw.prototype,"_parabolicTween",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],kw.prototype,"_startPositionTransform",void 0),kw=(0,G.Cg)([(0,j.EVk)("ParabolicTweenTo")],kw);U(1823),U(70703);var Bw=U(66998);let Uw=class extends j.uAl{constructor(){super(...arguments),this._elapsed=0,this._animationTimer=null}create(){super.create(),this._animationTimer=Qe.o.integerInRange(this._minimumTimeToPlay,this._maximumTimeToPlay)}update(){super.update(),this._elapsed+=tt.q.instance.game.time.deltaMS,this._elapsed>this._animationTimer&&(this._ambientAnimationClip.play(),this._elapsed=0,this._animationTimer=Qe.o.integerInRange(this._minimumTimeToPlay,this._maximumTimeToPlay))}};(0,G.Cg)([(0,j.MnK)(Nw.Q),(0,G.Sn)("design:type",Nw.Q)],Uw.prototype,"_ambientAnimationClip",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Uw.prototype,"_minimumTimeToPlay",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Uw.prototype,"_maximumTimeToPlay",void 0),Uw=(0,G.Cg)([(0,j.EVk)("PlayAmbientAnimation",W.Y.animation)],Uw);let Fw=class extends j.uAl{constructor(){super(...arguments),this._animators=[],this._loopInitialAnimation=!1}create(){super.create(),this._initialAnimation&&(0,Pn.sR)(this._animators,this._initialAnimation,this._loopInitialAnimation)}playAnimation(k,B){(0,Pn.sR)(this._animators,k,B)}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(dy),(0,G.Sn)("design:type",Array)],Fw.prototype,"_animators",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Fw.prototype,"_initialAnimation",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Fw.prototype,"_loopInitialAnimation",void 0),Fw=(0,G.Cg)([(0,j.EVk)("PlayPlayerKeyframeAnimators",W.Y.animation)],Fw);let Gw=class extends Ta.g{constructor(){super(...arguments),this.rampUpDuration=500,this._cycleIndex=-1,this._toTargetPosition=new j.I9Y,this._fromTargetPosition=new j.I9Y}update(){if(super.update(),this.isRunning())if(this._shakeTime+=tt.q.instance.game.time.deltaMS,this._shakeTimethis._cycleIndex&&(U>=this.cycles-1?this._toTargetPosition.setTo(0,0):U>this._cycleIndex+1?this.randomizePosition(this._fromTargetPosition):this._fromTargetPosition.copyFrom(this._toTargetPosition),this.randomizePosition(this._toTargetPosition),this._cycleIndex=U);const G=this.rampUpDuration>0?Math.min(1,k*(this.durationMS/this.rampUpDuration)):1,$=this.falloffDuration>0?Math.min(1,(1-k)*(this.durationMS/this.falloffDuration)):1,H=this.amplitude*G*$*Fb.B.screenShake.value;this._cameraTransform.setPosition(this._cameraInitialX+Math.floor(j.cj9.linear(this._fromTargetPosition.x,this._toTargetPosition.x,F)*H),this._cameraInitialY+Math.floor(j.cj9.linear(this._fromTargetPosition.y,this._toTargetPosition.y,F)*H))}else this._cameraTransform.setPosition(this._cameraInitialX,this._cameraInitialY),this._loadAreaCameraFollowController.Active=!0,this._shakeTime=null,this.onComplete.dispatch()}randomizePosition(k){k.x=2*Math.random()-1,k.y=2*Math.random()-1}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Gw.prototype,"rampUpDuration",void 0),Gw=(0,G.Cg)([(0,j.EVk)("ShuffleScreenShake",W.Y.motion)],Gw);U(2224);let jw=class extends j.uAl{constructor(){super(...arguments),this._volume=1}destroy(){this._audio&&(this.stopSFX(),this._audio.destroy()),super.destroy()}playSFX(){const k=j.Aq$.isDefined(this._volume)?this._volume:1,B=Fb.B.effectVolume.value*k;this._audio=tt.q.instance.prodigy.audio.playSound(this._sfxID,!0,B),Fb.B.effectVolume.onChanged.add((B=>{this._audio.volume=B*k}),this)}stopSFX(){this._audio&&(this._audio.stop(),Fb.B.effectVolume.onChanged.removeAll(this))}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],jw.prototype,"_sfxID",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],jw.prototype,"_volume",void 0),jw=(0,G.Cg)([(0,j.EVk)("PlayLoopedSoundEffect",W.Y.audio)],jw);U(86730);let $w=class extends j.uAl{constructor(){super(...arguments),this._timeMS=0}startTimer(){this._timer=window.setTimeout((()=>{this._sfx.playSFX()}),this._timeMS)}destroy(){j.Aq$.isDefined(this._timer)&&(window.clearTimeout(this._timer),this._timer=null),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],$w.prototype,"_timeMS",void 0),(0,G.Cg)([(0,j.MnK)(oa),(0,G.Sn)("design:type",oa)],$w.prototype,"_sfx",void 0),$w=(0,G.Cg)([(0,j.EVk)("PlaySoundEffectTimer",W.Y.audio)],$w);let Hw=class extends j.uAl{constructor(){super(...arguments),this._timers=[]}startSequence(){var k;null===(k=this._timers)||void 0===k||k.forEach((k=>{k.startTimer()}))}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)($w),(0,G.Sn)("design:type",Array)],Hw.prototype,"_timers",void 0),Hw=(0,G.Cg)([(0,j.EVk)("PlaySoundEffectSequence",W.Y.audio)],Hw);let Vw=class extends j.uAl{complete(){tt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(this._breadcrumbFeatureName,this._breadcrumbName)}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Vw.prototype,"_breadcrumbFeatureName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Vw.prototype,"_breadcrumbName",void 0),Vw=(0,G.Cg)([(0,j.EVk)("CompleteBreadcrumb",W.Y.saving)],Vw);let Ww=class extends j.uAl{constructor(){super(...arguments),this.breadcrumbCompleted=new j.HN0}create(){super.create(),tt.q.instance.prodigy.breadcrumbManager.onBreadcrumbCompleted.add(this.breadcrumbCompleted.dispatch,this.breadcrumbCompleted)}destroy(){this.breadcrumbCompleted.dispose(),tt.q.instance.prodigy.breadcrumbManager.onBreadcrumbCompleted.remove(this.breadcrumbCompleted.dispatch,this.breadcrumbCompleted),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ww.prototype,"breadcrumbCompleted",void 0),Ww=(0,G.Cg)([(0,j.EVk)("OnBreadcrumbCompleted",W.Y.saving)],Ww);let qw=class extends j.uAl{constructor(){super(...arguments),this.onCanAfford=new j.HN0,this.onCannotAfford=new j.HN0}create(){super.create(),this._checkOnCreate&&this.check()}destroy(){this.onCanAfford.dispose(),this.onCannotAfford.dispose(),super.destroy()}check(){if(!j.Aq$.isDefined(this.currencyId)||!j.Aq$.isDefined(this.amount))return void j.VyI.log("[CanAffordPaymentGuardComponent] Cannot check; Currency ID or Amount are undefined",j.$bb.Warning);const k={currency:this.currencyId,value:this.amount};this._paymentManager.canAfford(k)?this.onCanAfford.dispatch():(this.canSendEvent()&&tt.q.instance.prodigy.gameContainer.get("c47-20b6").item.sendInsufficientCurrencyEvent(k,{sink_type:this.sinkType,sink_id:this.sinkId}),this.onCannotAfford.dispatch())}canSendEvent(){return!(!j.Aq$.isDefined(this.sinkType)||!j.Aq$.isDefined(this.sinkId)||this.sinkType.length<1)&&("string"!=typeof this.sinkId||this.sinkId.length>0)}};(0,G.Cg)([(0,j.Cdj)("743-fd51"),(0,G.Sn)("design:type",qn.E)],qw.prototype,"_paymentManager",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],qw.prototype,"_checkOnCreate",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qw.prototype,"currencyId",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qw.prototype,"amount",void 0),(0,G.Cg)([(0,j.gfw)(li.C),(0,G.Sn)("design:type",String)],qw.prototype,"sinkType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",Object)],qw.prototype,"sinkId",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],qw.prototype,"onCanAfford",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],qw.prototype,"onCannotAfford",void 0),qw=(0,G.Cg)([(0,j.EVk)("CanAffordPaymentGuard",W.Y.economy)],qw);var Kw=U(2519);let zw=class extends j.uAl{constructor(){super(...arguments),this._validClassCode=!1,this.OnDuplicateClassCodeEntered=new j.HN0,this.OnValidClassCodeEntered=new j.HN0,this.OnInputFieldUpdated=new j.HN0,this.OnValidClassCodeSet=new j.HN0,this.OnFailedSetClassCode=new j.HN0,this.OnAttemptedSetClassCode=new j.HN0,this._processingCode=!1}create(){super.create(),this._gameNetworkManager=tt.q.instance.prodigy.gameContainer.get("c97-bd0d"),this._gameNetworkManager.getCurrentClassCode().then((k=>{var B,U,F,G;this._existingClassCode=null===(G=null===(F=null===(U=null===(B=k)||void 0===B?void 0:B.data)||void 0===U?void 0:U.player)||void 0===F?void 0:F.currentClassroom)||void 0===G?void 0:G.code})).catch((()=>{j.RQr.createHandler("ClassCodeSection: Failed to get current class code")}))}destroy(){this.OnDuplicateClassCodeEntered.dispose(),this.OnValidClassCodeEntered.dispose(),this.OnInputFieldUpdated.dispose(),this.OnValidClassCodeSet.dispose(),this.OnFailedSetClassCode.dispose(),this.OnAttemptedSetClassCode.dispose(),super.destroy()}validateClassCode(k){const B=xv.b.reformatClassCode(k);B!==this._existingClassCode?(this._classCodeInput=B,this._validClassCode=xv.b.isValidClassCode(this._classCodeInput),this._validClassCode?this.OnValidClassCodeEntered.dispatch():this.OnInputFieldUpdated.dispatch()):this.OnDuplicateClassCodeEntered.dispatch()}onSaveClassCodeClicked(){this._validClassCode&&!this._processingCode&&(this._processingCode=!0,tt.q.instance.prodigy.audio.playSFX(18,"pop"),this._gameNetworkManager.attachClassCode(this._classCodeInput,(()=>this.onAttachClassCodeAttempted(!0)),(()=>this.onAttachClassCodeAttempted(!1))).catch(j.RQr.createHandler("Error attaching class code")).finally((()=>{this._processingCode=!1})))}onAttachClassCodeAttempted(k){if(!k)return void this.OnFailedSetClassCode.dispatch();const B=tt.q.instance.prodigy.gameContainer.get("306-5359");B&&(B.isClassCodeAttached=!0,B.data.classCodeUpdateTimestamp=Date.now(),B.updated=!0),this.OnValidClassCodeSet.dispatch()}checkAndCompleteClassCodeQuest(){tt.q.instance.prodigy.gameContainer.get("43a-6f08").sendClassCodeQuestEvent().catch(j.RQr.createHandler("[ClassCodeRegistrationHandlerComponent] Error completing class code quest"))}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],zw.prototype,"OnDuplicateClassCodeEntered",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],zw.prototype,"OnValidClassCodeEntered",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],zw.prototype,"OnInputFieldUpdated",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],zw.prototype,"OnValidClassCodeSet",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],zw.prototype,"OnFailedSetClassCode",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],zw.prototype,"OnAttemptedSetClassCode",void 0),zw=(0,G.Cg)([(0,j.EVk)("ClassCodeRegistrationHandler",W.Y.education)],zw);U(20706);let Yw=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["externalFactory"],{inBattle:!1})}execute(){super.execute();if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){const _w=Math.random()<(window._.constants.get('GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT')||1);this.finish({answerCorrect:_w,responseTime:0});return}const k=this.findParameter("externalFactory"),B=this.findParameter("inBattle");k.question(((k,B,U,F,G,j)=>{this.finish({answerCorrect:k,responseTime:B,skillData:j})}),{isUserInBattle:B,allowTutorials:!0})}};Yw=(0,G.Cg)([(0,j.ba9)("AnswerQuestion")],Yw);let Qw=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["items"],{silent:!1,wait:!0,eventType:null,noRepeat:!1,sourceType:li.C.Interactable,sourceID:null,transactionID:null,fakeAward:!1})}execute(){super.execute();let k=this.findParameter("items");const B=this.findParameter("silent"),U=this.findParameter("wait"),F=this.findParameter("eventType"),G=this.findParameter("noRepeat"),j=this.findParameter("sourceType"),$=this.findParameter("sourceID"),H=this.findParameter("transactionID"),V=this.findParameter("fakeAward"),W=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(G&&(k=k.filter((k=>W.backpack.hasItem(k.type,k.ID)<=0))),B){for(const B of k)Qt.J.bagItem(B,tt.q.instance.game,"interactable",void 0,{item_id:B.ID,transaction_id:H,source_type:j,source_id:$});this.finish()}else U?(0,Td.MQ)(k,F,j,$,H,V).then((()=>{this.finish()})):((0,Td.GP)(k,F),this.finish());null==W||W.forceSaveCharacter()}};Qw=(0,G.Cg)([(0,j.ba9)("AwardItems")],Qw);let Xw=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["type","properties"])}execute(){super.execute(),this.finish()}};Xw=(0,G.Cg)([(0,j.ba9)("BroadcastGameEvent")],Xw);let Zw=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["events"])}execute(){super.execute();this.findParameter("events").forEach((k=>{const B=k.eventType,U=k.eventData;switch(B){case"Funnel Advanced":tt.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent(U)}})),this.finish()}};Zw=(0,G.Cg)([(0,j.ba9)("BroadcastSegmentGameEvent")],Zw);let Jw=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["cameraTransform","targetTransform"],{cameraFollowController:null,enableFollowController:!1,panTimeMs:1e3})}execute(){const k=this.findParameter("cameraTransform"),B=this.findParameter("targetTransform"),U=this.findParameter("cameraFollowController"),F=this.findParameter("enableFollowController"),G=this.findParameter("panTimeMs");(0,Td.lz)(k,B,G,F,U).then((()=>{this.finish()}))}};Jw=(0,G.Cg)([(0,j.ba9)("CameraPan")],Jw);let tT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["featureName","breadcrumbName"])}execute(){super.execute();const k=this.findParameter("featureName"),B=this.findParameter("breadcrumbName");tt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ls.B[k],ls.B[B]),this.finish()}};tT=(0,G.Cg)([(0,j.ba9)("CompleteBreadcrumb")],tT);let eT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["zone","quest"])}execute(){super.execute();const k=tt.q.instance.prodigy.world.getZone(this.findParameter("zone"));k&&k.completeQuest(this.findParameter("quest")),this.finish()}};eT=(0,G.Cg)([(0,j.ba9)("CompleteQuest")],eT);let iT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["zone","quest","sequence"])}execute(){super.execute();const k=this.findParameter("zone"),B=this.findParameter("quest"),U=this.findParameter("sequence"),F=tt.q.instance.prodigy.world.getZone(k);F&&F.completeSequence(this.findParameter("quest"),this.findParameter("sequence"));const G=tt.q.instance.prodigy.gameContainer.get("a25-68f4");G&&G.sendQuestEventViaHub(Wr.T.FSM_COMPLETE_SEQUENCE,{}).catch(j.RQr.createHandler(`Failed to send FSM_COMPLETE_SEQUENCE quest event (zone: ${k}, quest: ${B}, sequence: ${U})`)),this.finish()}};iT=(0,G.Cg)([(0,j.ba9)("CompleteSequence")],iT);let sT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["type","ID"],{amount:1})}execute(){super.execute();tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.consume(this.findParameter("type"),this.findParameter("ID"),this.findParameter("amount")),this.finish()}};sT=(0,G.Cg)([(0,j.ba9)("ConsumeItem")],sT);let nT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["creature","ID"],{height:100,dontHide:!1,durationMS:3e3})}execute(){super.execute();const k=this.findParameter("creature");if(k){const B=this.findParameter("ID"),U=this.findParameter("height"),F=this.findParameter("dontHide"),G=this.findParameter("durationMS");k.chat(B,U,F,G)}this.finish()}};nT=(0,G.Cg)([(0,j.ba9)("CreateChatBubble")],nT);let aT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["parent","x","y"])}execute(){super.execute();const k=this.findParameter("parent");let B=null;k&&(B=tt.q.instance.prodigy.create.element(k,this.findParameter("x"),this.findParameter("y"))),this.finish({element:B})}};aT=(0,G.Cg)([(0,j.ba9)("CreateElement")],aT);var rT=U(5898),oT=U(28930);let hT=class extends j.rcl{constructor(){super(...arguments),this.collected=!1}validate(){return super.validate()&&this.validateParameters(["map","config","x","y"],{})}execute(){super.execute(),this.map=this.findParameter("map"),this.config=this.findParameter("config"),this.x=this.findParameter("x"),this.y=this.findParameter("y"),this.y+=25,j.Aq$.isDefined(this.config)&&(this.goldenPage=tt.q.instance.prodigy.create.sprite(this.x,this.y,ps.q.Golden_page),this.goldenPage.anchor.x=.5,this.goldenPage.anchor.y=1,this.goldenPage.inputEnabled=!0,this.goldenPage.events.onInputUp.add((()=>{this.checkPathToPedestal(0)})),this.map.screen.content.addChild(this.goldenPage),this.map.game.add.tween(this.goldenPage,this).to({y:this.y-20},1400,j.GS3.Quadratic.InOut).yoyo(!0).loop(!0).start(),this.config.sendSegmentEvents("Container Discovered","golden-page",{x:this.x,y:this.y})),this.finish()}checkPathToPedestal(k){let B=0,U=0;switch(k){case oT.O.North:U=-15;break;case oT.O.East:B=80,U=80;break;case oT.O.South:U=120;break;case oT.O.West:B=-80,U=80;break;default:return j.VyI.log("No path can be found to the pedestal! Fix the position or map collisions.",j.$bb.Error),void this.collect()}this.map.screen.path.reset(),this.map.screen.path.findPath(this.map.screen.user.x,this.map.screen.user.y,this.x+B,this.y+U,!0).then((B=>{B?this.map.screen.user.setPath(B,(()=>{this.collect()})):this.checkPathToPedestal(k+1)})).catch(j.RQr.createHandler("Unable to find path to pedestal"))}collect(){if(!this.collected){this.config.sendSegmentEvents("Container Opened","golden-page"),tt.q.instance.prodigy.open.gotItem([{type:"currency",ID:this.config.id,N:this.config.quantity}],null,null,null,null,null,{source_type:li.C.Interactable}),this.map.addCollected("goldenPage");tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.achievements.increment(rT.f.GoldenPagesEarned,this.config.quantity),this.map.game.broadcaster.broadcast(jn.$i.TargetCollected),this.goldenPage.destroy(),this.collected=!0}}};hT=(0,G.Cg)([(0,j.ba9)("CreateGoldenPageDungeonComponent")],hT);let cT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["parent","type","ID","x","y"],{anchor:null})}execute(){super.execute();const k=this.findParameter("parent");let B=null;k&&(B=tt.q.instance.prodigy.icon.createIcon(this.findParameter("x"),this.findParameter("y"),fs.E.getIconForType(this.findParameter("type"),this.findParameter("ID")),this.findParameter("anchor")),k.addChild(B)),this.finish({icon:B})}};cT=(0,G.Cg)([(0,j.ba9)("CreateIcon")],cT);let dT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["map","config","x","y"],{})}execute(){super.execute();const k=this.findParameter("map"),B=this.findParameter("config"),U=this.findParameter("x"),F=this.findParameter("y");if(j.Aq$.isDefined(B)){const G=[];ct.forEach(B.drops,((k,B)=>{const U={type:"",ID:0,N:0};U.type=k.getType(),U.ID=k.getID(),U.N=k.getQuantity(),G.push(U)}));const j={difficulty:B.difficulty,randDir:!0,encounter:[{ID:B.id}],drops:G,dropsDisabled:!0,minTeamSize:B.minTeamSize,maxTeamSize:B.maxTeamSize,bench:B.bench};k.addMonster(k.game,k.screen,1,U,F,!0,j)}this.finish()}};dT=(0,G.Cg)([(0,j.ba9)("CreateMonsterDungeonComponent")],dT);let lT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["map","config","positions"])}execute(){super.execute(),this.map=this.findParameter("map"),this.config=this.findParameter("config");const k=this.findParameter("positions");if(j.Aq$.isDefined(this.config)){for(let B=0;B{this.map.screen.path.findPath(this.map.screen.user.x,this.map.screen.user.y,k[B].x,k[B].y,!0).then((k=>{k?this.map.screen.user.setPath(k,(()=>{this.collect(U,B)})):j.VyI.log("Path to this page cannot be found. Fix the position.",j.$bb.Error)})).catch(j.RQr.createHandler("Unable to find path to page"))})),this.map.screen.content.addChild(U)}k&&k.length>0&&this.config.sendSegmentEvents("Container Discovered","academy-page-0",{x:k[0].x,y:k[0].y})}this.finish()}collect(k,B){this.config.sendSegmentEvents("Container Opened",`academy-page-${B}`),tt.q.instance.prodigy.open.gotItem([{type:"currency",ID:this.config.id,N:1}],null,null,null,null,null,{source_type:li.C.Interactable}),k.destroy(),this.map.addCollected(`page-${B}`),this.map.game.broadcaster.broadcast(jn.f7.PagesCollected)}};lT=(0,G.Cg)([(0,j.ba9)("CreatePageDungeonComponent")],lT);let uT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["prefabLoader","parent","offset","count","wait"])}execute(){super.execute();let k=this.findParameter("count");const B=()=>{--k,k<=0&&this.finish()},U=this.findParameter("prefabLoader"),F=this.findParameter("parent"),G=this.findParameter("offset"),j=this.findParameter("wait");for(let $=0;${k.transform.setPosition(G.x*$,G.y*$);k.findComponent(Os.j).OnAnimationComplete.addOnce((()=>{tt.q.instance.game.time.events.addTimer(1,(()=>{k.destroy()}),[]),j&&B()}),this)}));j||this.finish()}};uT=(0,G.Cg)([(0,j.ba9)("CreateSmokeCloudRow")],uT);let fT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["map","ID","animation","x","y"],{layer:jh.E.ContentLayer,loop:!0,flip:!1,randomDelay:!1,fadeIn:0,animationChain:[],name:null})}execute(){super.execute(),this.map=this.findParameter("map");const k=this.findParameter("x"),B=this.findParameter("y"),U=this.findParameter("ID"),F=this.findParameter("animation"),G=this.findParameter("layer"),j=this.findParameter("loop"),$=this.findParameter("flip"),H=this.findParameter("randomDelay"),V=this.findParameter("fadeIn"),W=this.findParameter("animationChain");tt.q.instance.prodigy.load.assets([`spine-${U}`],(()=>{this.create(this.map,U,F,k,B,j,G,$,H?100*Qe.o.integerInRange(0,20):0,V,W)})),this.finish()}create(k,B,U,F,G,$,H,V,W,q,K){let z=null,Y=null;const Q=k.game.add.spine(F,G,`spine-${B}`);Q.onDestroy.add((B=>{null!==z&&(clearTimeout(z),z=null),Y&&(k.game.tweens.remove(Y),Y=null)}).bind(this,Q)),Q.setToSetupPose(),Q.scale.x*=V?-1:1,k.screen[H].addChild(Q);const X=this.findParameter("name");if(j.Aq$.isDefined(X)&&(Q.name=X),0===K.length)W>0?(Q.visible=!1,z=window.setTimeout((()=>{Q.visible=!0,Y=this.fadeIn(Q,q),Q.setAnimationByName(0,U,$)}),W)):(Q.setAnimationByName(0,U,$),Y=this.fadeIn(Q,q));else{Q.setAnimationByName(0,K[0],!1);for(let k=1;k0){k.alpha=0;const U=this.map.game.add.tween(k,this);return U.to({alpha:1},B,j.GS3.Linear.None,!0),U}}};fT=(0,G.Cg)([(0,j.ba9)("CreateSpine")],fT);let bT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["parent","x","y","source"],{frame:null,width:null,height:null,anchor:null,alpha:1,inputEnabled:!1})}execute(){super.execute();const k=this.findParameter("parent");let B=null;k&&(B=tt.q.instance.prodigy.create.sprite(this.findParameter("x"),this.findParameter("y"),this.findParameter("source"),this.findParameter("frame"),this.findParameter("anchor"),null,this.findParameter("width"),this.findParameter("height")),B.alpha=this.findParameter("alpha"),B.inputEnabled=this.findParameter("inputEnabled"),k.addChild(B)),this.finish({sprite:B})}};bT=(0,G.Cg)([(0,j.ba9)("CreateSprite")],bT);let pT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["object"])}execute(){this.findParameter("object").destroy(),this.finish()}};pT=(0,G.Cg)([(0,j.ba9)("Destroy")],pT);let vT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["enable","game"])}execute(){super.execute();const k=this.findParameter("game"),B=this.findParameter("enable");(0,Td.QQ)(k,B),this.finish()}};vT=(0,G.Cg)([(0,j.ba9)("EnableInput")],vT);let gT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["enable"])}execute(){super.execute(),(0,Td.dD)(this.findParameter("enable")),this.finish()}};gT=(0,G.Cg)([(0,j.ba9)("EnableSave")],gT);let mT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["x","y","w","h","time"],{wait:!0,randomize:!1})}execute(){super.execute();const k=this.findParameter("x"),B=this.findParameter("y"),U=this.findParameter("w"),F=this.findParameter("h"),G=this.findParameter("time"),j=this.findParameter("randomize");this.findParameter("wait")?tt.q.instance.prodigy.effects.explode(k,B,U,F,G,this.finish.bind(this),j):(tt.q.instance.prodigy.effects.explode(k,B,U,F,G,null,j),this.finish())}};mT=(0,G.Cg)([(0,j.ba9)("Explode")],mT);let yT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["graphic","duration"])}execute(){const k=this.findParameter("graphic"),B=this.findParameter("duration");tt.q.instance.game.add.tween(k.image,this).to({alpha:0},B,j.GS3.Quadratic.Out,!0).onTweenComplete.add(this.finish,this)}};yT=(0,G.Cg)([(0,j.ba9)("FadeOutGraphic")],yT);let _T=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["transform","duration"])}execute(){const k=this.findParameter("transform"),B=this.findParameter("duration");tt.q.instance.game.add.tween(k.group,this).to({alpha:0},B,j.GS3.Quadratic.Out,!0).onTweenComplete.add(this.finish,this)}};_T=(0,G.Cg)([(0,j.ba9)("FadeOutLegacyTransform")],_T);let ET=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["spine","duration"])}execute(){const k=this.findParameter("spine"),B=this.findParameter("duration");tt.q.instance.game.add.tween(k.spine,this).to({alpha:0},B,j.GS3.Quadratic.Out,!0).onTweenComplete.add(this.finish,this)}};ET=(0,G.Cg)([(0,j.ba9)("FadeOutSpine")],ET);let wT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["durationMS","renderComponent","targetAlpha"],{initialAlpha:null,wait:!1})}execute(){const k=this.findParameter("renderComponent"),B=this.findParameter("durationMS"),U=this.findParameter("targetAlpha"),F=k.getRootContainer(),G=this.findParameter("wait"),$=this.findParameter("initialAlpha");null===$||Number.isNaN($)||(F.alpha=$);tt.q.instance.game.add.tween(F,this).to({alpha:U},B,j.GS3.Quadratic.Out,!0).onTweenComplete.addOnce((()=>{F.alpha=U,G&&this.finish()})),G||this.finish()}};wT=(0,G.Cg)([(0,j.ba9)("FadeRenderComponent")],wT);let TT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["target","componentType"])}execute(){const k=this.findParameter("target"),B=j.XFX[this.findParameter("componentType")];B?this.finish({component:k.findComponent(B)}):this.finish()}};TT=(0,G.Cg)([(0,j.ba9)("FindComponent")],TT);let ST=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["creature"])}execute(){const k=this.findParameter("creature");k&&k.flip(),this.finish()}};ST=(0,G.Cg)([(0,j.ba9)("FlipCreature")],ST);let AT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["zone"])}execute(){super.execute();const k=tt.q.instance.prodigy.world.getZone(this.findParameter("zone"));let B=0;k&&(B=k.getState("daily").rewards),this.finish({result:B})}};AT=(0,G.Cg)([(0,j.ba9)("GetDailyRewardCount")],AT);let CT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["zone","state"])}execute(){super.execute();const k=tt.q.instance.prodigy.world.getZone(this.findParameter("zone"));let B=null;if(k){const U=k.getState(this.findParameter("state"));j.Aq$.isDefined(U)&&(B=U)}this.finish({result:B})}};CT=(0,G.Cg)([(0,j.ba9)("GetZoneState")],CT);let OT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["type","ID"])}execute(){super.execute();const k=this.findParameter("type"),B=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let U=0;switch(k){case"pet":U=B.kennel.hasPet(this.findParameter("ID"))?1:0;break;default:U=B.backpack.hasItem(k,this.findParameter("ID"))}this.finish({amount:U})}};OT=(0,G.Cg)([(0,j.ba9)("HasItem")],OT);let IT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["screen","hide"])}execute(){super.execute();const k=this.findParameter("screen");k&&(k.hideHex=this.findParameter("hide")),this.finish()}};IT=(0,G.Cg)([(0,j.ba9)("HideFollow")],IT);let DT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["element","show"],{xOffset:0,yOffset:0})}execute(){super.execute();const k=this.findParameter("element");k&&k.highlight(this.findParameter("show"),this.findParameter("xOffset"),this.findParameter("yOffset")),this.finish()}};DT=(0,G.Cg)([(0,j.ba9)("HighlightElement")],DT);let RT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["creature","time"],{wait:!0,xOffset:0,height:0})}execute(){const k=this.findParameter("creature");if(k){const B=this.findParameter("time"),U=this.findParameter("xOffset"),F=this.findParameter("height");this.findParameter("wait")?k.hop(1e3*B,this.finish.bind(this),U,F):(k.hop(1e3*B,null,U,F),this.finish())}else this.finish()}};RT=(0,G.Cg)([(0,j.ba9)("Hop")],RT);let PT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["transform","time"],{wait:!0,xOffset:0,height:0})}execute(){const k=this.findParameter("transform"),B=k.localPosition,U=this.findParameter("time"),F=this.findParameter("xOffset"),G=tt.q.instance.game.add.tween(k.localPosition,this).to({y:B.y-this.findParameter("height")},U,j.GS3.Quadratic.Out).to({y:B.y},U,j.GS3.Quadratic.In).start();0!==F&&tt.q.instance.game.add.tween(k.localPosition,this).to({x:B.x+Math.floor(.5*F)},U,j.GS3.Linear.None).to({x:B.x+F},U,j.GS3.Linear.None).start(),this.findParameter("wait")?G.onTweenComplete.addOnce((()=>{this.finish()})):this.finish()}};PT=(0,G.Cg)([(0,j.ba9)("HopTransform")],PT);let MT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["difficulty"])}execute(){super.execute();const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=this.findParameter("difficulty");let U=!1;B&&(U=k.difficultyUnlocks[B]),this.finish({result:U})}};MT=(0,G.Cg)([(0,j.ba9)("IsDifficultyUnlocked")],MT);let NT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["zone","quest"])}execute(){super.execute();const k=tt.q.instance.prodigy.world.getZone(this.findParameter("zone"));let B=!1;k&&(B=k.isOnQuest(this.findParameter("quest"))),this.finish({result:B})}};NT=(0,G.Cg)([(0,j.ba9)("IsOnQuest")],NT);let xT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["zone","quest","sequence"])}execute(){super.execute();const k=tt.q.instance.prodigy.world.getZone(this.findParameter("zone"));let B=!1;k&&(B=k.isOnSequence(this.findParameter("quest"),this.findParameter("sequence"))),this.finish({result:B})}};xT=(0,G.Cg)([(0,j.ba9)("IsOnSequence")],xT);let LT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["zone","quest"])}execute(){super.execute();const k=tt.q.instance.prodigy.world.getZone(this.findParameter("zone"));let B=!1;k&&(B=k.isQuestComplete(this.findParameter("quest"))),this.finish({result:B})}};LT=(0,G.Cg)([(0,j.ba9)("IsQuestComplete")],LT);let kT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["target","position"])}execute(){const k=this.findParameter("target");k.onMoveEnd.addOnce(this.finish,this),k.MoveTarget=this.findParameter("position")}};kT=(0,G.Cg)([(0,j.ba9)("MoveToTarget")],kT);let BT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters([])}execute(){tt.q.instance.prodigy.audio.pauseBGM(),this.finish()}};BT=(0,G.Cg)([(0,j.ba9)("PauseMusic")],BT);let UT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["animator","animationName"],{loop:!1,wait:!0})}execute(){const k=this.findParameter("animator"),B=this.findParameter("animationName");k&&B?(k.playAnimation(B,this.findParameter("loop"),!0),this.findParameter("wait")?k.OnAnimationComplete.addOnce((()=>{this.finish()})):this.finish()):(j.VyI.log("Missing animation name or ref to animator",j.$bb.Error),this.finish())}};UT=(0,G.Cg)([(0,j.ba9)("PlayAnimation")],UT);let FT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["animationClip"],{wait:!1})}execute(){const k=this.findParameter("animationClip"),B=this.findParameter("wait");k?B?(k.OnComplete.addOnce((()=>{this.finish()})),k.play()):(k.play(),this.finish()):(j.VyI.log("Missing ref to animationClip",j.$bb.Error),this.finish())}};FT=(0,G.Cg)([(0,j.ba9)("PlayAnimationClip")],FT);let GT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["animators","animationName"],{loop:!1,wait:!0})}execute(){const k=this.findParameter("animators"),B=this.findParameter("animationName");this.findParameter("wait")?(0,Pn.ye)(k,B).then((()=>{this.finish()})):((0,Pn.sR)(k,B,this.findParameter("loop")),this.finish())}};GT=(0,G.Cg)([(0,j.ba9)("PlayAnimators")],GT);let jT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["x","y","parent"],{wait:!1,delay:0})}execute(){const k=this.findParameter("wait");tt.q.instance.prodigy.effects.firework(this.findParameter("x"),this.findParameter("y"),k?()=>{this.finish()}:null,this.findParameter("parent"),this.findParameter("delay")),k||this.finish()}};jT=(0,G.Cg)([(0,j.ba9)("PlayFirework")],jT);let $T=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["ID"],{loop:!0})}execute(){const k=tt.q.instance.prodigy.gameContainer.get(j.t5G.AssetLoader),B=this.findParameter("ID");"string"==typeof B?k.loadAssets([B]).then((()=>this.playBgm(B))).catch(j.RQr.createHandler(`Error playing music asset ${B}`)):this.playBgm(B),this.finish()}playBgm(k){tt.q.instance.prodigy.audio.playBGM(k,this.findParameter("loop")),tt.q.instance.prodigy.audio.resumeBGM()}};$T=(0,G.Cg)([(0,j.ba9)("PlayMusic")],$T);let HT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["scene"],{})}execute(){super.execute();const k=this.findParameter("scene");tt.q.instance.prodigy.world.playScene(k)}};HT=(0,G.Cg)([(0,j.ba9)("PlayScene")],HT);var VT=U(79825);let WT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["ID","clip"],{wait:!1,delay:0,playDuration:null,fadeTime:200})}execute(){var k;const B=this.findParameter("ID"),U=this.findParameter("clip"),F=this.findParameter("delay"),G=null!==(k=this.findParameter("sfxVolumeType"))&&void 0!==k?k:VT.h.Sfx,j=tt.q.instance.prodigy.audio.getVolumeForType(G);F>0?tt.q.instance.game.time.events.addTimer(F,(()=>{this.playSFX(B,U,j)}),this):this.playSFX(B,U,j)}playSFX(k,B,U){const F=this.findParameter("playDuration"),G=this.findParameter("wait");if(F>0){const $=Fb.B.effectVolume.value,H=tt.q.instance.prodigy.audio.playSFX(k,B,void 0,1,!1,U),V=this.findParameter("fadeTime");H&&!H.isDestroyed&&(H.loop=!0,H.volume=0,tt.q.instance.game.add.tween(H,this).to({volume:$},V,j.GS3.Linear.None,!0),tt.q.instance.game.add.tween(H,this).to({volume:0},V,j.GS3.Linear.None,!0,F-2*V).onTweenComplete.addOnce((()=>{G&&this.finish()})))}else G?tt.q.instance.prodigy.audio.playSFX(k,B,this.finish.bind(this),1,!1,U):tt.q.instance.prodigy.audio.playSFX(k,B,void 0,1,!1,U);G||this.finish()}};WT=(0,G.Cg)([(0,j.ba9)("PlaySound")],WT);let qT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["spine","animationName"],{loop:!1,wait:!0})}execute(){const k=this.findParameter("spine"),B=this.findParameter("animationName"),U=this.findParameter("loop");j.Aq$.isDefined(k)&&j.Aq$.isDefined(B)?this.findParameter("wait")?(0,Td.qb)(k,B,U).then((()=>{this.finish()})):k instanceof oi.v?k.isLoaded?((0,Td.ce)(k,B,U),this.finish()):k.OnLoaded.addOnce((()=>{(0,Td.ce)(k,B,U),this.finish()})):((0,Td.ce)(k,B,U),this.finish()):(j.VyI.log("Missing animation name or ref to spine",j.$bb.Error),this.finish())}};qT=(0,G.Cg)([(0,j.ba9)("PlaySpine")],qT);let KT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["target"])}execute(){super.execute();this.findParameter("target").run(),this.finish()}};KT=(0,G.Cg)([(0,j.ba9)("RunComponent")],KT);let zT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["transform","targetScale","duration"],{initialScale:null,wait:!1})}execute(){const k=this.findParameter("transform"),B=this.findParameter("targetScale"),U=this.findParameter("initialScale"),F=this.findParameter("duration"),G=this.findParameter("wait"),$=k.localScale;let H={x:$.x,y:$.y};U&&(k.setScale(U.x,U.y),H=Object.assign({},U)),tt.q.instance.game.add.tween(H,this).to({x:B.x,y:B.y},F,j.GS3.Quadratic.InOut,!0).onUpdateCallback((()=>{k.setScale(H.x,H.y)})).onTweenComplete.addOnce((()=>{k.setScale(B.x,B.y),G&&this.finish()})),G||this.finish()}};zT=(0,G.Cg)([(0,j.ba9)("ScaleTransform")],zT);let YT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["eventName","eventData"])}execute(){super.execute(),this.finish()}};YT=(0,G.Cg)([(0,j.ba9)("SendAdvancedEvent")],YT);let QT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["eventType","eventData"])}execute(){super.execute();const k=this.findParameter("eventType"),B=this.findParameter("eventData");tt.q.instance.prodigy.gameContainer.get("f91-8211").sendQuestEvent(k,B).catch(j.RQr.createHandler(`Error sending quest event, ${k}`)),this.finish()}};QT=(0,G.Cg)([(0,j.ba9)("SendZoneQuestEvent")],QT);let XT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["target","active"])}execute(){super.execute();const k=this.findParameter("target"),B=this.findParameter("active");k&&(k instanceof j.uAl?(0,Td.pf)(k,B):(0,Td.Ry)(k,B)),this.finish()}};XT=(0,G.Cg)([(0,j.ba9)("SetActive")],XT);let ZT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["animationController","state"],{loop:!1,wait:!0})}execute(){const k=this.findParameter("animationController"),B=this.findParameter("state"),U=this.findParameter("wait");k.changeState(B),U&&k.currentState?k.currentState.onFinished.addOnce(this.finish,this):this.finish()}};ZT=(0,G.Cg)([(0,j.ba9)("SetAnimationControllerState")],ZT);let JT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["zone","count"])}execute(){super.execute();const k=tt.q.instance.prodigy.world.getZone(this.findParameter("zone"));k&&k.setState("daily",{date:k.getState("daily").date,flags:k.getState("daily").flags,rewards:this.findParameter("count")}),this.finish()}};JT=(0,G.Cg)([(0,j.ba9)("SetDailyRewardCount")],JT);let tS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["player","flag"])}execute(){const k=this.findParameter("player");k&&(k.evtProc=this.findParameter("flag")),this.finish()}};tS=(0,G.Cg)([(0,j.ba9)("SetEventProcessing")],tS);var eS=U(34234);let iS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["pathfinder","target"],{faceTransform:null})}execute(){var k;const B=null!==(k=this.findParameter("locomotion"))&&void 0!==k?k:j.wa5.getActiveScene().container.get("PlayerLocomotion"),U=Lt.l.guaranteeArray(this.findParameter("target")),F=this.findParameter("faceTransform");this.runWaypoints(B,U,F)}runWaypoints(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F=B.length;for(let G=0;G{k.setPosition(F.x,F.y)})),B?G.onTweenComplete.addOnce(this.finish,this):this.finish(),G.start()}};gS=(0,G.Cg)([(0,j.ba9)("ShakeChestTransform")],gS);let mS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["character","ID"],{overlayMode:!1,showYesNo:!1,reenableInputOnClose:!0})}execute(){super.execute();const k=tt.q.instance.prodigy.dialogue.create(),B=this.findParameter("showYesNo"),U=this.findParameter("ID"),F=this.findParameter("character"),G=this.findParameter("overlayMode"),j=this.findParameter("reenableInputOnClose");if(U.constructor===Array){const F=U;for(let U=0;U{this.finish()}),k);B&&U.setParent(B)}};yS=(0,G.Cg)([(0,j.ba9)("ShowDialogueV2")],yS);let _S=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["ID"],{overlayMode:!1,showYesNo:!1})}execute(){super.execute();const k=new mi.rD(tt.q.instance.game),B=this.findParameter("showYesNo"),U=this.findParameter("ID"),F=this.findParameter("overlayMode");let G;if(G=U.constructor===Array?ct.map(U,(B=>this.createDialogue(k,B,F))):[this.createDialogue(k,U,F)],B){const k=G[G.length-1];k.yes=()=>{this.finishWithAnswer(!0)},k.no=()=>{this.finishWithAnswer(!1)}}k.addEvents(G),k.start(!0,B?void 0:()=>{this.finish({results:!1})})}createDialogue(k,B,U){return{dialogueData:k.dataProvider.get(B),blockInput:!U}}finishWithAnswer(k,B){j.Aq$.isDefined(B)&&B.close(),this.finish({result:k})}logAction(){super.logAction();const k=this.findParameter("ID"),B=this.findParameter("character");if(Array.isArray(k)){const U=k;for(let k=0;k{this.finish({dialogueSelection:"yes"})},no:()=>{this.finish({dialogueSelection:"no"})}}]),U.start(!0)}};ES=(0,G.Cg)([(0,j.ba9)("ShowYesNoDialogue")],ES);let wS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["gameObjectFactory","rocks","positions","startDelay","endDelay","startTimeElapsed","endTimeElapsed","shuffleCount"])}execute(){super.execute();const k={0:0,1:1,2:2},B=this.findParameter("rocks"),U=this.findParameter("positions"),F=U.length,G=this.findParameter("startDelay"),$=this.findParameter("endDelay"),H=this.findParameter("startTimeElapsed"),V=this.findParameter("endTimeElapsed"),W=this.findParameter("shuffleCount"),q=this.findParameter("gameObjectFactory");let K=null,z=null;const Y={};for(let Q=0;Qj.cj9.fuzzyEqual(k.position.x,U[Q].x)&&j.cj9.fuzzyEqual(k.position.y,U[Q].y)));for(let j=0;j1?H+j/(W-1)*(V-H):V;let X=0;j>0&&(X=G+(j-1)/(W-2)*($-G));let Z=null;do{Z=Qe.o.getUniqueRandomNumbers(0,F,2).sort(((k,B)=>k-B))}while(z&&z[0]===Z[0]&&z[1]===Z[1]);const J=Y[Z[0]];B.push(this.createRockTween(J,q,U[Z[1]],Q,X,0===j));const tt=Y[Z[1]];if(B.push(this.createRockTween(tt,q,U[Z[0]],Q,X,0===j)),B[0].onUpdate.add((function(){const k=this;if(k.invert===k.obj1.y>k.obj2.y&&!k.swapped){const B=k.obj1.parent;k.obj2.parent.addChild(k.obj1),B.addChild(k.obj2),k.swapped=!0}}),{obj1:J,obj2:tt,swapped:!1,invert:U[Z[0]].y{const U=B;k.onTweenComplete.addOnce((()=>{U.start()}))}))}Y[Z[1]]=J,Y[Z[0]]=tt;const et=k[Z[1]];k[Z[1]]=k[Z[0]],k[Z[0]]=et,K=B,z=Z}K?K[K.length-1].onTweenComplete.addOnce((()=>{this.finish({newRockPositions:k})})):this.finish({rockPositions:k})}createRockTween(k,B,U,F,G,$){return B.tween(k,this).to({x:U.x,y:U.y},F,j.GS3.Quadratic.InOut,$,G)}};wS=(0,G.Cg)([(0,j.ba9)("ShuffleRocks")],wS);let TS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["transform","scaleTimeMS"],{initialScale:2,targetScale:1,correctionAmounts:[-.03,.03,-.01,0],correctionTimes:[250,200,150,100],wait:!1})}execute(){const k=this.findParameter("transform"),B=this.findParameter("initialScale"),U=this.findParameter("targetScale"),F=this.findParameter("scaleTimeMS"),G=this.findParameter("correctionAmounts"),$=this.findParameter("correctionTimes"),H=this.findParameter("wait"),V={value:B},W=tt.q.instance.game.add.tween(V,this).to({value:U+G[0]},F,j.GS3.Quadratic.InOut),q=$.length;for(let K=1;K{k.setScale(V.value,V.value),H&&this.finish()})),W.onUpdateCallback((()=>{k.setScale(V.value)})),W.start(),H||this.finish()}};TS=(0,G.Cg)([(0,j.ba9)("SlamTransform")],TS);let SS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["ID"],{parent:null,createParent:!0,x:0,y:0,xScale:1,yScale:1})}execute(){super.execute();const k=this.findParameter("ID"),B=this.findParameter("parent"),U=this.findParameter("x"),F=this.findParameter("y"),G=this.findParameter("createParent");this.loadPrefab(k,B,U,F,G)}loadPrefab(k,B,U,F,G){let $;G&&($=new j._mx(ct.defaultTo(B,void 0)),$.addComponent(j.K16),$.legacyTransform.x=U,$.legacyTransform.y=F,$.legacyTransform.scaleX=this.findParameter("xScale"),$.legacyTransform.scaleY=this.findParameter("yScale"));tt.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependencies(k,$).then((k=>{!G&&k.transform&&(k.transform.setPosition(U,F),k.transform.setScale(this.findParameter("xScale"),this.findParameter("yScale"))),this.finish({instance:k})}))}};SS=(0,G.Cg)([(0,j.ba9)("SpawnPrefab")],SS);let AS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["data"],{defeatZone:null})}execute(){super.execute();const k=this.findParameter("data"),B=()=>{this.finish({isVictory:!0})};tt.q.instance.prodigy.battle.start(k,B,B,(()=>{this.finish({isVictory:!1})}),this.findParameter("defeatZone"))}};AS=(0,G.Cg)([(0,j.ba9)("StartBattle")],AS);let CS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["zone","map","data"],{introText:null,wait:!1})}execute(){super.execute();const k=this.findParameter("zone");if(k){const B=this.findParameter("map"),U=this.findParameter("introText"),F=this.findParameter("data");this.findParameter("wait")?k.getBattle(B,U,F,this.finish.bind(this))():(k.getBattle(B,U,F,null)(),this.finish())}else this.finish()}};CS=(0,G.Cg)([(0,j.ba9)("StartZoneBattle")],CS);let OS=class extends j.rcl{execute(){super.execute(),tt.q.instance.prodigy.audio.pauseBGM(),this.finish()}};OS=(0,G.Cg)([(0,j.ba9)("StopBackgroundMusic")],OS);var IS=U(79340);let DS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["map"],{x:null,y:null,data:null,loadingData:{},wait:1e3,asScene:!1,assets:[]})}execute(){super.execute();const k=this.findParameter("map"),B=this.findParameter("x"),U=this.findParameter("y"),F=this.findParameter("loadingData");if(F.callback=()=>{tt.q.instance.game.time.events.addTimer(this.findParameter("wait"),(()=>{this.finish()}),[])},this.findParameter("asScene")){const G=k.split("-"),j=tt.q.instance.prodigy.world.getZone(G[0]),$=new IS.Z(j,G[1],this.findParameter("assets"),null,B,U);j.initScene($,F)}else tt.q.instance.prodigy.world.it(k,B,U,this.findParameter("data"),F)}};DS=(0,G.Cg)([(0,j.ba9)("Teleport")],DS);let RS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["game","rectTransform","target","duration"],{from:null,wait:!0})}execute(){const k=this.findParameter("game"),B=this.findParameter("rectTransform"),U=this.findParameter("target"),F=this.findParameter("from"),G=this.findParameter("duration"),j=this.findParameter("wait"),$=(0,Td.XL)(k,B,U,G,F);j?$.then((()=>{this.finish()})):this.finish()}};RS=(0,G.Cg)([(0,j.ba9)("TweenRectTransformOffset")],RS);let PS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["transform","target","duration"],{from:null,wait:!0,ease:j.GS3.Quadratic.InOut})}execute(){const k=this.findParameter("transform"),B=this.findParameter("target"),U=this.findParameter("from"),F=this.findParameter("duration"),G=this.findParameter("ease"),j=this.findParameter("wait"),$=(0,Td.qe)(k,B,F,U,G);j?$.then((()=>{this.finish()})):this.finish()}};PS=(0,G.Cg)([(0,j.ba9)("TweenTransform")],PS);let MS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters([],{questID:null})}execute(){super.execute();const k=this.findParameter("questID");tt.q.instance.prodigy.gameContainer.get("e50-b09b").updateQuestProgress(k).catch(j.RQr.createHandler("There was a problem updating quest progress")).finally((()=>this.finish()))}};MS=(0,G.Cg)([(0,j.ba9)("UpdateQuestData")],MS);let NS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["signal"])}execute(){this.findParameter("signal").onDispatch.addOnce(this.finish,this)}};NS=(0,G.Cg)([(0,j.ba9)("WaitForSignal")],NS);let xS=class extends Lo.B{consume(){if(j.Aq$.isDefined(this.id)){const k=this.getInjectedValue(this.id);k instanceof Function?k(this._targetComponent):j.Aq$.isDefined(k)&&j.VyI.log("InjectableConsumeInteractionComponent: Value is not a function!",j.$bb.Error)}else j.VyI.log("InjectableConsumeInteractionComponent: Value has not been set!",j.$bb.Error)}};xS=(0,G.Cg)([(0,j.EVk)("InjectableComponentInteractionComponent",j.YH6.injection)],xS);let LS=class extends Lo.B{constructor(){super(...arguments),this.onDispatch=new j.HN0}create(){super.create(),this.consume()}consume(){var k;super.consume();const B=this.getInjectedValue(this.id);B instanceof j.HN0&&(null===(k=this._boundSignal)||void 0===k||k.remove(this.onDispatch.dispatch,this),B.add(this.onDispatch.dispatch,this.onDispatch),this._boundSignal=B)}destroy(){var k;null===(k=this._boundSignal)||void 0===k||k.remove(this.onDispatch.dispatch,this.onDispatch),this._boundSignal=null,this.onDispatch.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],LS.prototype,"onDispatch",void 0),LS=(0,G.Cg)([(0,j.EVk)("InjectedSignal",W.Y.injection,"Allows an injected signal to be hooked up in a prefab")],LS);let kS=class extends j.uAl{fire(){const k=this.getInjectedValue(this._id);k instanceof j.HN0?k.dispatch():"function"==typeof k?k():j.Aq$.isDefined(k)&&j.VyI.log("InjectCallback attempted to fire a non-callable value:",j.$bb.Warning,k)}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],kS.prototype,"_id",void 0),kS=(0,G.Cg)([(0,j.EVk)("InjectionCallback",W.Y.injection)],kS);let BS=class extends j.uAl{constructor(){super(...arguments),this._bindMultiple=!1,this._unbindOnDestroy=!0,this._boundValue=null}postDeserialize(){super.postDeserialize(),this._boundValue=this._targetComponent?j.Aq$.isDefined(this._targetProperty)&&this._targetProperty in this._targetComponent?this._targetComponent[this._targetProperty]:this._targetComponent:this.GameObject;const k=j.wa5.getActiveScene().container;this._bindMultiple?k.bind(this._id).toConstantValue(this._boundValue):k.rebind(this._id).toConstantValue(this._boundValue)}destroy(){if(this._unbindOnDestroy){const k=j.wa5.getActiveScene().container;if(k.hasBinding(this._id))if(this._bindMultiple){const B=k.sourceContainer,U=B.getAll(this._id).filter((k=>k!==this._boundValue));B.unbind(this._id);for(const k of U)B.bind(this._id).toConstantValue(k)}else k.get(this._id)===this._boundValue&&k.unbind(this._id)}super.destroy()}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],BS.prototype,"_id",void 0),(0,G.Cg)([(0,j.MnK)(j.uAl),(0,G.Sn)("design:type",j.uAl)],BS.prototype,"_targetComponent",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],BS.prototype,"_targetProperty",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],BS.prototype,"_bindMultiple",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],BS.prototype,"_unbindOnDestroy",void 0),BS=(0,G.Cg)([(0,j.EVk)("InjectionExpose",W.Y.injection)],BS);let US=class extends j.uAl{constructor(){super(...arguments),this.rebindOnCreate=!0}create(){super.create(),this.rebindOnCreate&&this.rebind()}rebind(){this.sourceIdentifiers.forEach(((k,B)=>{const U=this.targetIdentifiers[B]||k;k===U&&this.context.Container.hasBinding(k)&&this.context.Container.unbind(k);const F=this.getInjectedValue(k);this.context.Container.rebind(U).toConstantValue(F)}))}};(0,G.Cg)([(0,j.Pqz)(j.bE_),(0,G.Sn)("design:type",j.bE_)],US.prototype,"context",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],US.prototype,"rebindOnCreate",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],US.prototype,"sourceIdentifiers",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],US.prototype,"targetIdentifiers",void 0),US=(0,G.Cg)([(0,j.EVk)("InjectionRelay",j.YH6.injection,"Rebinds all values to a new local context, possibly with different identifiers")],US);let FS=class extends j.uAl{constructor(){super(...arguments),this.data={}}inject(){var k;Nt.d.updateInjectedValues(null!==(k=this.targetObject)&&void 0!==k?k:this.gameObject,this.data)}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],FS.prototype,"targetObject",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],FS.prototype,"data",void 0),FS=(0,G.Cg)([(0,j.EVk)("Injector")],FS);let GS=class extends j.PQK{installBindings(){this.Container.rebind("c5f-aceb").toConstantValue(new Li.D(this.Container,tt.q.instance.prodigy.gameContainer.get("c97-bd0d")))}cleanup(){var k;null===(k=this.Container)||void 0===k||k.unbind("c5f-aceb")}};GS=(0,G.Cg)([(0,j.Og1)("SocketServiceInstaller","Installer")],GS);var jS=U(30441);let $S=class extends j.uAl{get visible(){return this._renderComponent.Active}set visible(k){this._renderComponent.Active=k}setPath(k,B,U){j.Aq$.isDefined(U)&&(this._pathLocomotion.speed=U);const F=k.map((k=>new j.I9Y(k.x,k.y)));F.unshift(new j.I9Y(this.GameObject.transform.worldPosition.x,this.GameObject.transform.worldPosition.y)),this._pathLocomotion.setPath(F),B&&this._pathLocomotion.onPathEnd.addOnce(B)}hop(k=100,B=null,U=0,F=20){const G={x:this.GameObject.transform.localPosition.x,y:this.gameObject.transform.localPosition.y},$={x:this.GameObject.transform.localPosition.x,y:this.gameObject.transform.localPosition.y},H={x:$.x+U,y:$.y-F},V=tt.q.instance.game.add.tween($,this).to({y:H.y},k,j.GS3.Quadratic.Out).to({y:G.y},k,j.GS3.Quadratic.In),W=tt.q.instance.game.add.tween($,this).to({x:H.x},2*k,j.GS3.Linear.None);V.onUpdate.add((()=>this.gameObject.transform.setPosition($.x,$.y))),V.onTweenComplete.addOnce((()=>{tt.q.instance.prodigy.game.tweens.remove(V),tt.q.instance.prodigy.game.tweens.remove(W),null==B||B()})),V.start(),W.start()}flip(){const k=this.GameObject.transform.localScale.y,B=this.GameObject.transform.localScale.x;this.GameObject.transform.setScale(-1*B,k)}chat(k,B,U,F=3e3){var G;const j=k+12,$=this._renderComponent.getRootContainer(),H=this.gameObject.transform.worldPosition;null!==(G=this._chatBubble)&&void 0!==G||(this._chatBubble=new jS.R(tt.q.instance.prodigy.game,$,H.x,H.y-B,U,F)),this._chatBubble.setID(j)}faceToward(k){const B=this.GameObject.transform.localScale.y,U=Math.abs(this.GameObject.transform.localScale.x),F=k>this.GameObject.transform.worldPosition.x?U:-U;this.GameObject.transform.setScale(F,B)}};(0,G.Cg)([(0,j.Pqz)(j.KhP),(0,G.Sn)("design:type",j.KhP)],$S.prototype,"_pathLocomotion",void 0),(0,G.Cg)([(0,j.Pqz)(j.y4o),(0,G.Sn)("design:type",j.y4o)],$S.prototype,"_renderComponent",void 0),$S=(0,G.Cg)([(0,j.EVk)("CreatureContainerRelay",W.Y.root)],$S);U(53885);let HS=class extends j.uAl{postCreate(){super.postCreate();{const k=this.GameObject,B=this.getLayerContainer();if(B){const U=this._renderComponent.getRootContainer();if(B.addChild(U),this._layerType===jh.E.ContentLayer){U.transform=new $e.Transform;const B=()=>{U.x=k.transform.worldPosition.x,U.y=k.transform.worldPosition.y};B(),k.transform.onWorldMatrixChanged.add(B),k.onDestroy.addOnce((()=>k.transform.onWorldMatrixChanged.remove(B)))}else U.x=k.transform.worldPosition.x,U.y=k.transform.worldPosition.y}const U=tt.q.instance.prodigy.game.time.events.loop(Kt.s.TARGET_FPS_40_MS,k.update,k);k.onDestroy.addOnce((()=>tt.q.instance.prodigy.game.time.events.remove(U)))}}getLayerContainer(){const k=tt.q.instance.game.state.get(Tt.G.TileScreen);switch(this._layerType){case jh.E.BackgroundLayer:return k.background;case jh.E.ContentLayer:return k.content;case jh.E.ForegroundLayer:return k.foreground;case jh.E.DifficultyModeOverlay:return k.difficultyOverlay;case jh.E.UiLayer:return k.uiLayer;case jh.E.GameRenderCacheLayer:return k.gameRenderCache;case jh.E.MenusLayer:return k.menus;case jh.E.DialogueLayer:return k.dialogue;case jh.E.OverlayLayer:return k.overlay;case jh.E.ConsentLayer:default:return j.VyI.log("[LegacyLayerRelayComponent] Could not assign to a layer container.",j.$bb.Error),null}}};(0,G.Cg)([(0,j.gfw)(jh.E),(0,G.Sn)("design:type",String)],HS.prototype,"_layerType",void 0),(0,G.Cg)([(0,j.Pqz)(j.y4o),(0,G.Sn)("design:type",j.y4o)],HS.prototype,"_renderComponent",void 0),HS=(0,G.Cg)([(0,j.EVk)("LegacyLayerRelay",W.Y.root)],HS);U(68370);let VS=class extends j.uAl{get playerContainer(){return this._playerDataProvider.player.playerContainer}showName(k=null){this.playerContainer.showName(k)}setPosition(k,B){this.playerContainer.transform.position.set(k,B)}setPath(k,B,U){this.playerContainer.setPath(k,B,U)}hop(k=100,B=null,U=0,F=20){this.playerContainer.hop(k,B,U,F)}flip(){this.playerContainer.flip()}chat(k,B,U,F){this.playerContainer.chat(k,B,U,F)}get position(){return this.playerContainer.transform.position}get scale(){return this.playerContainer.transform.scale}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],VS.prototype,"_playerDataProvider",void 0),VS=(0,G.Cg)([(0,j.EVk)("MainPlayerContainerRelay",W.Y.root)],VS);let WS=class extends j.uAl{constructor(){super(...arguments),this.onPathFound=new j.HN0,this.onStand=new j.HN0}get x(){return this._mainPlayerGameObject.transform.localPosition.x}get y(){return this._mainPlayerGameObject.transform.localPosition.y}destroy(){this.onPathFound.dispose(),this.onStand.dispose(),super.destroy()}disableMovement(){tt.q.instance.game.input.enabled=!1;this.getInjectedValue("PlayerPathfinder").stopMovement()}setPath(k,B=(()=>null)){if(0===k.length)return void B();const U=this.getInjectedValue("PlayerLocomotion");U.onPathComplete.addOnce(B),U.setPath(k)}};(0,G.Cg)([(0,eS.d)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],WS.prototype,"_mainPlayerGameObject",void 0),WS=(0,G.Cg)([(0,j.EVk)("MainPlayerGameObjectRelay",W.Y.map)],WS);U(73402),U(65165);let qS=class extends j.uAl{constructor(){super(...arguments),this._durationMs=600,this._rotationSpeed=.4,this._rotationVariance=100,this._maxStarScale=1.8,this._rotationVarianceDamping=3}create(){super.create();const k=this._starObject=this._prefabLoader.loadFromGUID(this._starsPrefabGUID);k.active=!1,this._starTransform=k.transform,this._sprite=k.findComponentInChildren(j.vYh).image,this._sprite.smoothed=!0}destroy(){var k;(null===(k=this._starObject)||void 0===k?void 0:k.isDestroyed)||this._starObject.destroy(),super.destroy()}startStar(){this._starTransform.setPosition(1/0,1/0),this._starTransform.setScale(0),this._starObject.active=!0,this._animationTime=this._sizeAnimationTime=0,this._touching=!0}moveStar(k){k&&this._starTransform.setPosition(k.x,k.y)}stopStar(){this._touching=!1}update(){super.update();const k=tt.q.instance.game.time.deltaMS;if(this._animationTime+=k,this._sizeAnimationTime+=k,this._touching){const k=.5*this._durationMs;this._sizeAnimationTime>k&&(this._sizeAnimationTime=k)}const B=this._sizeAnimationTime/this._durationMs;if(B<1){this._starTransform.setScale(B*this._maxStarScale,B*this._maxStarScale);const k=this._animationTime*this._rotationSpeed/this._rotationVariance;this._starTransform.localRotation=(k+Math.sin(k)/this._rotationVarianceDamping)*this._rotationVariance,this._sprite.alpha=Math.min(1,2-2*B)}else this._starObject.active=!1}};(0,G.Cg)([(0,j.Bak)(),(0,j.W_S)(),(0,G.Sn)("design:type",String)],qS.prototype,"_starsPrefabGUID",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qS.prototype,"_durationMs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qS.prototype,"_rotationSpeed",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qS.prototype,"_rotationVariance",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qS.prototype,"_maxStarScale",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qS.prototype,"_rotationVarianceDamping",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],qS.prototype,"_prefabLoader",void 0),qS=(0,G.Cg)([(0,j.S1F)(),(0,j.EVk)("PlayMovementStarsAnimation",W.Y.animation)],qS);let KS=class extends j.uAl{constructor(){super(...arguments),this._pathData=[],this._speed=null,this._fromCurrent=!1,this._onComplete=new j.HN0}run(){(0,ct.isNumber)(this._speed)&&(this._targetLocomotionComponent.speed=this._speed);const k=this._pathData.map((k=>new j.I9Y(k.x,k.y)));this._fromCurrent&&k.unshift(new j.I9Y(this._targetLocomotionComponent.GameObject.transform.worldPosition.x,this._targetLocomotionComponent.GameObject.transform.worldPosition.y)),this._targetLocomotionComponent.setPath(k),this._targetLocomotionComponent.onPathEnd.addOnce(this._onComplete.dispatch,this._onComplete)}destroy(){this._targetLocomotionComponent.onPathEnd.remove(this._onComplete.dispatch,this._onComplete),this._onComplete.dispose(),super.destroy()}};(0,G.Cg)([(0,j.MnK)(j.KhP),(0,G.Sn)("design:type",j.KhP)],KS.prototype,"_targetLocomotionComponent",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Array)],KS.prototype,"_pathData",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],KS.prototype,"_speed",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],KS.prototype,"_fromCurrent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],KS.prototype,"_onComplete",void 0),KS=(0,G.Cg)([(0,j.EVk)("SetPath",W.Y.motion)],KS);let zS=class extends j.uAl{stop(){var k,B;this._playerLocomotion&&this._playerLocomotion.stop();const U=tt.q.instance.game.state.get(Tt.G.TileScreen);null===(B=null===(k=null==U?void 0:U.user)||void 0===k?void 0:k.setPath)||void 0===B||B.call(k,[])}};(0,G.Cg)([(0,j.Cdj)("PlayerLocomotion"),(0,G.Sn)("design:type",j.KhP)],zS.prototype,"_playerLocomotion",void 0),zS=(0,G.Cg)([(0,j.EVk)("StopPlayer",W.Y.motion)],zS);let YS=class extends j.uAl{constructor(){super(...arguments),this.onComplete=new j.HN0}run(){var k;const B=j.wa5.getActiveScene().container;if(B.get("IS_PREFAB_MAP")){B.get("ACTIVE_PLAYER_POSITION")&&j.wa5.getActiveScene().container.rebind("ACTIVE_PLAYER_POSITION").toConstantValue({x:this.gameObject.transform.worldPosition.x,y:this.gameObject.transform.worldPosition.y})}const U=null===(k=B.get("MainPlayerGameObject"))||void 0===k?void 0:k.transform;if(U){U.worldPosition=this.gameObject.transform.worldPosition;const k=U.GameObject.findComponentInChildren(Wn.m);k&&j.Aq$.isDefined(this._facingDirection)&&k.setFacingDirection(this._facingDirection)}else{const k=tt.q.instance.game.state.get(Tt.G.TileScreen);(null==k?void 0:k.user)?(k.user.position=this.gameObject.transform.worldPosition,k.user.faceToward(this.gameObject.transform.worldPosition.x+100*-this._facingDirection)):j.VyI.log("[TeleportPlayerToThisComponent] No player transform found. Unable to teleport the player to the specified position.",j.$bb.Error)}}destroy(){this.onComplete.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],YS.prototype,"onComplete",void 0),(0,G.Cg)([(0,j.gfw)(Me.y),(0,G.Sn)("design:type",Number)],YS.prototype,"_facingDirection",void 0),YS=(0,G.Cg)([(0,j.EVk)("TeleportPlayerToThis",W.Y.motion)],YS);var QS=U(48129),XS=U(39473),ZS=U(35564);class JS{constructor(k,B,U){this._spawnedPlayers=0,this._players=new Map,this.onPlayerSpawned=new j.HN0,this._prefabLoader=k,this._spawnContainer=B,this._remotePlayerSpawnLimiter=U}destroy(){this.onPlayerSpawned.dispose(),this._destroyed=!0}addPlayer(k,B,U){const F=tt.q.instance.prodigy.gameContainer.get("db5-fb6e"),G=ct.map(tt.q.instance.prodigy.friendsListNetworkHandler.friendsList.concat(tt.q.instance.prodigy.friendsListNetworkHandler.classList),"userID");if(!F.meetsRequirementsDeprecated(9)&&-1===ct.indexOf(G,k.userID))return void j.VyI.log(`Only classmates and friends are added below level 5. Player will not be added. ${k.userID}`,j.$bb.Verbose);let $;if(j.VyI.log(`Adding player ${k.userID} to the map`,j.$bb.Verbose),U)$={x:U.x,y:U.y};else{const B=this._players.get(k.userID);B&&!this.isRemotePlayer(B)&&($={x:B.x,y:B.y})}const H={player:k,appearance:B,appearanceUpdated:!0,shouldBeSpawned:!1,pendingOperations:new j.aSj,position:$};this._players.set(k.userID,H),this.prioritizePlayers()}hasPlayer(k){return this.isRemotePlayer(this._players.get(k))}getSpawnedPlayerGameObject(k){const B=this._players.get(k);if(!this.isRemotePlayer(B))return null;const U=B.gameObject;return(null==U?void 0:U.active)&&B.shouldBeSpawned?U:null}removePlayer(k){const B=this._players.get(k);this._players.delete(k),this.isRemotePlayer(B)&&(this.despawnPlayer(B,!0),this.prioritizePlayers())}updatePlayer(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U;const F=this._players.get(k.userID);if(!this.isRemotePlayer(F))return void j.VyI.log(`Attempted to update player ${k.userID} appearance, but that player isn't spawned`,j.$bb.Warning);const G=yield F.pendingOperations.push();if(!this._destroyed){const G=F.appearance.follow!==B.follow;F.player.init(k),F.appearance=B,F.appearanceUpdated=!0,F.gameObject&&(G&&(null===(U=F.gameObject.findComponentInChildren(za))||void 0===U||U.reloadFollows()),yield Promise.all([F.gameObject.findComponentInChildren(Qm.b).setAppearance(B),F.gameObject.findComponentInChildren(fy).updateNameplate()]),F.gameObject.findComponentInChildren(iy.T).updateMountAppearance())}G()}))}movePlayer(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F=this._players.get(k);if(!this.isRemotePlayer(F))return void this._players.set(k,{x:B,y:U});const G=yield F.pendingOperations.push();this._destroyed||(F.position?(F.position.x=B,F.position.y=U,F.gameObject&&this._pathfinder.findPathAsync(F.gameObject.transform.worldPosition,F.position).then((k=>{var B,U;k&&(null===(U=null===(B=F.gameObject)||void 0===B?void 0:B.findComponentInChildren(j.KhP))||void 0===U||U.setPath(k))}))):(F.position={x:B,y:U},this.prioritizePlayers())),G()}))}prioritizePlayers(){var k,B,U,F,G;const $=tt.q.instance.prodigy.friendsListNetworkHandler,H=ct.map($.friendsList.concat($.classList),"userID"),V=[],W=null===(k=j.i7d.main)||void 0===k?void 0:k.GameObject.transform.worldPosition;let q=0;for(const[j,Y]of Array.from(this._players.entries()))if(this.isRemotePlayer(Y)){if(H.includes(j))this.spawnPlayer(Y);else if(Y.position){const k=W?Math.abs(Y.position.x-W.x)+Math.abs(Y.position.y-W.y):0,j=null!==(U=null===(B=Y.gameObject)||void 0===B?void 0:B.active)&&void 0!==U?U:Y.shouldBeSpawned,$=null===(G=null===(F=Y.cullingComponent)||void 0===F?void 0:F.isShowing)||void 0===G||G,H=j?$?0:700:800;V.push([Y,k+H])}this.willPlayerBeVisible(Y)&&++q}let K=this._players.size-V.length;const z=this._remotePlayerSpawnLimiter.evaluateLimit(this._spawnedPlayers,q);V.sort(((k,B)=>k[1]-B[1]));for(const[Y,Q]of V)if(K{this._onPlayerSpawned.dispatch(k)}),this),this.socketService.onConnect.add(this.forceBroadcastPlayerPosition,this);const k=tt.q.instance.game.broadcaster;k.addAppListener(jn.J8.PlayerEditingMenuClosed,this.broadcastAppearanceChanged.bind(this),this),k.addAppListener(jn.J8.PlayerAppearanceUpdated,this.broadcastAppearanceChanged.bind(this),this),k.addAppListener(jn.J8.MorphMarbleUsed,this.broadcastMorphStart.bind(this),this),k.addAppListener(jn.J8.MorphMarbleCancelled,this.broadcastMorphEnd.bind(this),this),k.addAppListener(jn.pm.StopPlayer,this.broadcastStopPlayer,this),tt.q.instance.prodigy.open.chatOpened.add(this.onChatOpened,this);const B=tt.q.instance.prodigy.gameContainer.get("3b1-0a3d");B.onFire.add(this.fxFired,this),B.onComplete.add(this.fxEnded,this),this._gameNetworkManager.startInactiveTimer()}startSpawnLimiter(){this._remotePlayerSpawnLimiter.enteredZone(),this._reprioritizeIntervalId=window.setInterval((()=>{this._remotePlayerManager.prioritizePlayers()}),tA.REPRIORITIZE_INTERVAL_MS)}destroy(){window.clearInterval(this._reprioritizeIntervalId),this._gameNetworkManager.stopInactiveTimer(),this.socketService.onConnect.remove(this.forceBroadcastPlayerPosition,this),this._onPlayerSpawned.dispose();const k=tt.q.instance.game.broadcaster;k.removeAppListener(jn.J8.PlayerEditingMenuClosed,this),k.removeAppListener(jn.J8.PlayerAppearanceUpdated,this),k.removeAppListener(jn.J8.MorphMarbleUsed,this),k.removeAppListener(jn.J8.MorphMarbleCancelled,this),k.removeAppListener(jn.pm.StopPlayer,this),tt.q.instance.prodigy.open.chatOpened.remove(this.onChatOpened,this),tt.q.instance.prodigy.open.chatMenu&&(tt.q.instance.prodigy.open.chatMenu.chatIDSelected.remove(this.handleChatSelected,this),tt.q.instance.prodigy.open.chatMenu.emoteIDSelected.remove(this.handleEmoteSelected,this),tt.q.instance.prodigy.open.chatMenu.danceIDSelected.remove(this.handleDanceSelected,this));const B=tt.q.instance.prodigy.gameContainer.get("3b1-0a3d");B.onFire.remove(this.fxFired,this),B.onComplete.remove(this.fxEnded,this),this._remotePlayerManager.destroy(),super.destroy()}update(){if(super.update(),this._nextPosition&&Date.now()-this._lastPositionBroadcast>tA.POSITION_BROADCAST_INTERVAL){const k={action:ZS.x.Move,data:{target:{x:this._nextPosition.x,y:this._nextPosition.y}}};this.socketService.broadcastMessage(k),this._lastPosition=this._nextPosition,this._nextPosition=void 0,this._lastPositionBroadcast=Date.now()}}receivedMessage(k){var B;null===(B=tA.MESSAGE_HANDLER_FUNCTIONS[k.action])||void 0===B||B.call(this,"data"in k?k.data:void 0)}playerJoined(k){this.forceBroadcastPlayerPosition()}playerLeft(k){this._remotePlayerManager.removePlayer(k)}handlePlayerInfo(k){var B;if(!k.appearance)return;null!==(B=k.equipment)&&void 0!==B||(k.equipment={});const U={skin:k.appearance.skinColor,face:k.appearance.face,eyeColor:k.appearance.eyeColor,hair:k.appearance.hair,outfit:k.equipment.outfit,hat:k.equipment.hat,weapon:k.equipment.weapon,boot:k.equipment.boots,follow:k.equipment.follow,costume:(0,Bt.G)(pm.q).enabled?k.equipment.costume:void 0};if(this._remotePlayerManager.hasPlayer(k.userID))this._remotePlayerManager.updatePlayer(k,U);else{const B=new Ih.a(tt.q.instance.game);B.init(k),this._remotePlayerManager.addPlayer(B,U)}}handlePlayerMoved(k){k.userID!==this._mainPlayer.getUserID()&&this._remotePlayerManager.movePlayer(k.userID,k.target.x,k.target.y)}handleChatReceived(k){const B=this._remotePlayerManager.getSpawnedPlayerGameObject(k.userID);B&&(j.Aq$.isDefined(k.emoteID)?B.findComponentInChildren(ry).showEmote(k.emoteID):j.Aq$.isDefined(k.chatID)?B.findComponentInChildren(hy).setChat(this._theChatManager.getPhrase(k.chatID)):j.Aq$.isDefined(k.danceID)&&B.findComponentInChildren(cy).startDance(k.danceID))}forceBroadcastPlayerPosition(){this._lastPositionBroadcast=0,this._lastPosition=void 0,this.broadcastPlayerPosition()}broadcastPlayerPosition(k){var B,U;void 0===k&&(k=null===(U=null===(B=this._mainPlayerGameObject)||void 0===B?void 0:B.transform)||void 0===U?void 0:U.worldPosition),k&&(this.socketService.isDisconnected||(this._nextPosition||!this._lastPosition||Math.abs(k.x-this._lastPosition.x)+Math.abs(k.y-this._lastPosition.y)>tA.POSITION_BROADCAST_OFFSET_THRESHOLD)&&(this._nextPosition=k))}broadcastAppearanceChanged(){this.socketService.isDisconnected||this.socketService.broadcastMessage({action:ZS.x.Change})}broadcastMorphStart(k){var B,U;if(this.socketService.isDisconnected)return;const F={action:ZS.x.Transform,data:{showEffect:!0,transformID:null===(B=k.effect)||void 0===B?void 0:B.ID,transformType:null===(U=k.effect)||void 0===U?void 0:U.transform}};this.socketService.broadcastMessage(F)}broadcastMorphEnd(){if(this.socketService.isDisconnected)return;const k={action:ZS.x.Transform,data:{showEffect:!0}};this.socketService.broadcastMessage(k)}broadcastStopPlayer(){this.socketService.isDisconnected||this.forceBroadcastPlayerPosition()}handlePlayerChanged(k){var B;if(!this._remotePlayerManager.hasPlayer(k.userID))return;null!==(B=k.equipment)&&void 0!==B||(k.equipment={});const U={skin:k.appearance.skinColor,face:k.appearance.face,eyeColor:k.appearance.eyeColor,hair:k.appearance.hair,outfit:k.equipment.outfit,hat:k.equipment.hat,weapon:k.equipment.weapon,follow:k.equipment.follow,boot:k.equipment.boots,costume:(0,Bt.G)(pm.q).enabled?k.equipment.costume:void 0};this._remotePlayerManager.updatePlayer(k,U)}handlePlayerTransform(k){const B=this._remotePlayerManager.getSpawnedPlayerGameObject(k.userID),U=null==B?void 0:B.findComponentInChildren(ey.R);U&&(k.transformType&&k.transformID?U.transformPlayerWithEffect(k.transformType,k.transformID):U.isMorphed()&&U.clearMorphedAppearance())}onChatOpened(){tt.q.instance.prodigy.open.chatMenu.chatIDSelected.add(this.handleChatSelected,this),tt.q.instance.prodigy.open.chatMenu.emoteIDSelected.add(this.handleEmoteSelected,this),tt.q.instance.prodigy.open.chatMenu.danceIDSelected.add(this.handleDanceSelected,this)}handleChatSelected(k){this._mainPlayerGameObject.findComponentInChildren(hy).setChat(this._theChatManager.getPhrase(k)),this._mainPlayer.player.chatID=null}handleEmoteSelected(k){var B,U,F;this._mainPlayerGameObject.findComponentInChildren(ry).showEmote(k),this._mainPlayer.player.emoteID=null;const G=null!==(F=null===(U=null===(B=Yt.t.getItem("emote",k))||void 0===B?void 0:B.data)||void 0===U?void 0:U.name)&&void 0!==F?F:k.toString();tt.q.instance.prodigy.gameContainer.get("c47-20b6").playerIdentityAvatar.sendEmoteUsedEvent({emote_name:G,emote_type:ny.H.Emote})}handleDanceSelected(k){this._mainPlayerGameObject.findComponentInChildren(cy).startDance(k),this._mainPlayer.player.danceID=null,tt.q.instance.prodigy.gameContainer.get("c47-20b6").playerIdentityAvatar.sendEmoteUsedEvent({emote_name:k,emote_type:ny.H.Dance})}handleFxReceived(k){const B=this._remotePlayerManager.getSpawnedPlayerGameObject(k.userID);B&&tt.q.instance.prodigy.effects.playFX(k.type,B.transform.worldPosition.x,B.transform.worldPosition.y,k.x,k.y,void 0,this._fxContainer)}fxFired(){var k;tt.q.instance.prodigy.game.input.enabled=!1,null===(k=this._mainPlayerGameObject.findComponentInChildren(j.KhP))||void 0===k||k.stop(),this.broadcastStopPlayer()}fxEnded(){tt.q.instance.prodigy.game.input.enabled=!0}};iA.POSITION_BROADCAST_INTERVAL=1e3,iA.POSITION_BROADCAST_OFFSET_THRESHOLD=75,iA.REPRIORITIZE_INTERVAL_MS=1e3,iA.MESSAGE_HANDLER_FUNCTIONS={[ZS.x.Info]:tA.prototype.handlePlayerInfo,[ZS.x.Move]:tA.prototype.handlePlayerMoved,[ZS.x.Chat]:tA.prototype.handleChatReceived,[ZS.x.FX]:tA.prototype.handleFxReceived,[ZS.x.Change]:tA.prototype.handlePlayerChanged,[ZS.x.Transform]:tA.prototype.handlePlayerTransform},(0,G.Cg)([(0,Gi.b)("c97-bd0d"),(0,G.Sn)("design:type",vp.I)],iA.prototype,"_gameNetworkManager",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],iA.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("d77-66fb"),(0,G.Sn)("design:type",eA.Z)],iA.prototype,"_remotePlayerSpawnLimiter",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],iA.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],iA.prototype,"_mainPlayerGameObject",void 0),(0,G.Cg)([(0,j.Cdj)("8c1-3c93"),(0,G.Sn)("design:type",XS.S)],iA.prototype,"_theChatManager",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iA.prototype,"_spawnContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iA.prototype,"_fxContainer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],iA.prototype,"_onPlayerSpawned",void 0),iA=tA=(0,G.Cg)([(0,j.EVk)("MapMultiplayerController",W.Y.multiplayer)],iA);let sA=class extends xe{getSpawnData(){var k;const B=this._streamedMap.mapData.entry,U=null!==(k=null==B?void 0:B[this._entryPointID])&&void 0!==k?k:null==B?void 0:B.default;return U?{location:{x:U.x,y:U.y},facingDirection:U.facingLeft?Me.y.Left:Me.y.Right}:null}};(0,G.Cg)([(0,j.Cdj)("StreamedMap"),(0,G.Sn)("design:type",j.Ee5)],sA.prototype,"_streamedMap",void 0),(0,G.Cg)([(0,j.Cdj)("InitData-spawnLocationName"),(0,G.Sn)("design:type",String)],sA.prototype,"_entryPointID",void 0),sA=(0,G.Cg)([(0,j.EVk)("EntryPointSpawnDataProvider",W.Y.mapSpawning)],sA);let nA=class extends xe{getSpawnData(){var k;return this._injectedSpawnPosition?{location:{x:this._injectedSpawnPosition.x,y:this._injectedSpawnPosition.y},facingDirection:null!==(k=this._injectedSpawnDirection)&&void 0!==k?k:Me.y.Right}:null}};(0,G.Cg)([(0,j.Cdj)("InitData-spawnPosition"),(0,G.Sn)("design:type",j.I9Y)],nA.prototype,"_injectedSpawnPosition",void 0),(0,G.Cg)([(0,j.Cdj)("InitData-spawnFacingDirection"),(0,G.Sn)("design:type",Number)],nA.prototype,"_injectedSpawnDirection",void 0),nA=(0,G.Cg)([(0,j.EVk)("InjectedPositionSpawnDataProvider",W.Y.mapSpawning)],nA);let aA=class extends xe{getSpawnData(){var k;return null===(k=this._saveDataComponent)||void 0===k?void 0:k.getData()}};(0,G.Cg)([(0,j.g8Q)(j.Tyz),(0,G.Sn)("design:type",j.Tyz)],aA.prototype,"_saveDataComponent",void 0),aA=(0,G.Cg)([(0,j.EVk)("MapSaveSpawnDataProvider",W.Y.mapSpawning)],aA);let rA=class extends xe{getSpawnData(){const k=this.GameObject.transform,B=k.worldPosition;return{location:{x:B.x,y:B.y},facingDirection:k.localScale.x<0?Me.y.Left:Me.y.Right}}};rA=(0,G.Cg)([(0,j.EVk)("TransformSpawnDataProvider",W.Y.mapSpawning)],rA);let oA=class extends j.uAl{constructor(){super(...arguments),this._spawnProviders=[],this._onPlayerSpawned=new j.HN0}spawnPlayer(){let k;if(this._spawnProviders.find((B=>k=B.getSpawnData())),k){const B=k.location.x,U=k.location.y;j.i7d.main.GameObject.transform.setPosition(B,U),this._player.transform.setPosition(B,U),this.GameObject.parent.findComponentInChildren(Wn.m).setFacingDirection(k.facingDirection);this._player.findComponentInChildren(j.mZY)._loadedBounds={left:B,right:B,top:U,bottom:U}}this._onPlayerSpawned.dispatch()}destroy(){this._onPlayerSpawned.dispose(),super.destroy()}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],oA.prototype,"_player",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(xe),(0,G.Sn)("design:type",Array)],oA.prototype,"_spawnProviders",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],oA.prototype,"_onPlayerSpawned",void 0),oA=(0,G.Cg)([(0,j.EVk)("PlayerSpawner",W.Y.mapSpawning)],oA);let hA=class extends j.uAl{constructor(){super(...arguments),this._loadingData={}}set position(k){this._position=k}set battleResult(k){this._loadingData.battleResult=k}set target(k){this.targetMapTag=k}set entrance(k){this.entranceName=k}run(){var k,B;tt.q.instance.prodigy.world.it(this.targetMapTag,null===(k=this._position)||void 0===k?void 0:k.x,null===(B=this._position)||void 0===B?void 0:B.y,Object.assign({spawnLocationName:this.entranceName},this._loadingData),{mapEnteredTransitionType:this._transitionTypeOverride})}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],hA.prototype,"targetMapTag",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],hA.prototype,"entranceName",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],hA.prototype,"_position",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],hA.prototype,"_transitionTypeOverride",void 0),hA=(0,G.Cg)([(0,j.EVk)("TeleportToMap",W.Y.MapTeleport)],hA);let cA=class extends hi.s{postCreate(){super.postCreate();const k=tt.q.instance.game.state.get(Tt.G.TileScreen);k&&(this._playerContainer=k.user)}containsTarget(){var k,B;if(!(null===(B=null===(k=this._playerContainer)||void 0===k?void 0:k.transform)||void 0===B?void 0:B.worldTransform))return super.containsTarget();const U=this.GameObject.transform.worldPosition,F=this._playerContainer.transform.worldTransform,G=new j.I9Y(F.tx,F.ty),$=j.C1c.getDistanceSq(U,G);return 0!==$&&$<=this.radius*this.radius}update(){if(super.update(),this._playerContainer){const k=this.containsTarget();this._isTargetInBounds?k||this.onExit.dispatch():k&&this.onEnter.dispatch(),this._isTargetInBounds=k}}};cA=(0,G.Cg)([(0,j.EVk)("CircleTriggerLegacyMap",W.Y.trigger)],cA);let dA=class extends Ga.E{create(){super.create(),this.gameObject.transform instanceof j.XVE&&(this._width=this.gameObject.transform.fullWidth,this._height=this.gameObject.transform.fullHeight)}containsTarget(){const k=this.target.transform.worldPosition,B=this.gameObject.transform.worldPosition;return this.gameObject.transform instanceof j.XVE&&(B.x-=this.gameObject.transform.pivot.x*this._width,B.y-=this.gameObject.transform.pivot.y*this._height),j.M_G.containsRaw(B.x,B.y,this._width,this._height,k.x,k.y)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],dA.prototype,"_width",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],dA.prototype,"_height",void 0),dA=(0,G.Cg)([(0,j.EVk)("RectTrigger",W.Y.trigger)],dA);let lA=class extends j.uAl{constructor(){super(...arguments),this._onMapsCombined=new j.HN0,this._mapCombiner=null,this._combinedPromise=new j.bnh}create(){super.create(),j.wa5.getActiveScene().container.bind("AwaitMapCombiner").toConstantValue(this),this._streamedMap.onMapLoaded.addOnce(this.mapWasLoaded,this)}destroy(){this._streamedMap.onMapLoaded.remove(this.mapWasLoaded,this),this._mapCombiner&&(this._mapCombiner.onMapsCombined.remove(this.mapsCombined,this),this._mapCombiner=null),this._onMapsCombined.dispose(),super.destroy()}mapWasLoaded(){this._streamedMap.map.onLoadedBlocksChanged.addOnce(this.blocksLoaded,this)}blocksLoaded(){var k,B;this._mapCombiner=this._streamedMap.GameObject.findComponentInChildren(j.Phd),null===(B=null===(k=this._mapCombiner)||void 0===k?void 0:k.hasCombinedMaps())||void 0===B||B?this.mapsCombined():this._mapCombiner.onMapsCombined.addOnce(this.mapsCombined,this)}mapsCombined(){this._onMapsCombined.dispatch(),this._combinedPromise.resolve()}awaitCombinedMaps(){return(0,G.sH)(this,void 0,void 0,(function*(){return this._combinedPromise}))}};(0,G.Cg)([(0,j.MnK)(j.Ee5),(0,G.Sn)("design:type",j.Ee5)],lA.prototype,"_streamedMap",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],lA.prototype,"_onMapsCombined",void 0),lA=(0,G.Cg)([(0,j.EVk)("AwaitMapCombiner",W.Y.tiled)],lA);let uA=class extends j.eXg{constructor(){super(...arguments),this._onCombined=new j.HN0}create(){super.create(),(()=>{(0,G.sH)(this,void 0,void 0,(function*(){var k;this._streamedMap&&(yield null===(k=this._streamedMap)||void 0===k?void 0:k.awaitLoaded()),this._mapCombiner&&(yield this._mapCombiner.awaitCombinedMaps()),this._onCombined.dispatch()}))})()}destroy(){this._onCombined.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("StreamedMap"),(0,G.Sn)("design:type",j.Ee5)],uA.prototype,"_streamedMap",void 0),(0,G.Cg)([(0,j.Cdj)("AwaitMapCombiner"),(0,G.Sn)("design:type",lA)],uA.prototype,"_mapCombiner",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uA.prototype,"_onCombined",void 0),uA=(0,G.Cg)([(0,j.EVk)("AwaitMapLoad",W.Y.map)],uA);let fA=class extends j.AY_{constructor(){super(...arguments),this._initialActiveConditions=[]}create(){super.create();for(const k of this._initialActiveConditions)this._dungeonState.setConditionActive(k,!0)}getActiveConditions(){return this._dungeonState.getActiveConditions()}setConditionActive(k,B){this._dungeonState.setConditionActive(k,B)}};(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],fA.prototype,"_dungeonState",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],fA.prototype,"_initialActiveConditions",void 0),fA=(0,G.Cg)([(0,j.EVk)("DungeonConditionEvaluator",W.Y.adventure)],fA);let bA=class extends j.uAl{constructor(){super(...arguments),this._id="default",this._facingLeft=!1}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],bA.prototype,"_id",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],bA.prototype,"_facingLeft",void 0),bA=(0,G.Cg)([(0,j.EVk)("MapEntryPoint",W.Y.map)],bA);let pA=class extends j.eXg{constructor(){super(...arguments),this._checkOnLoad=!0,this._onEnteredViaPoint=new j.HN0,this._notEnteredViaPoint=new j.HN0}create(){if(super.create(),this._checkOnLoad){const k=j.wa5.getActiveScene().container,B=`${this._id}_triggered`;k.hasBinding(B)||(k.bind(B).toConstantValue(!0),(()=>{(0,G.sH)(this,void 0,void 0,(function*(){this._streamedMap&&(yield this._streamedMap.awaitLoaded()),this._mapCombiner&&(yield this._mapCombiner.awaitCombinedMaps()),this.checkEntryPoint()}))})())}}destroy(){this._onEnteredViaPoint.dispose(),this._notEnteredViaPoint.dispose(),super.destroy()}checkEntryPoint(){this.getEntryPointName(this._playerEntryPoint)===this.getEntryPointName(this._matchEntryPointName)?this._onEnteredViaPoint.dispatch():this._notEnteredViaPoint.dispatch()}getEntryPointName(k){return k||"default"}};(0,G.Cg)([(0,j.Cdj)("InitData-spawnLocationName"),(0,G.Sn)("design:type",String)],pA.prototype,"_playerEntryPoint",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],pA.prototype,"_checkOnLoad",void 0),(0,G.Cg)([(0,j.Cdj)("StreamedMap"),(0,G.Sn)("design:type",j.Ee5)],pA.prototype,"_streamedMap",void 0),(0,G.Cg)([(0,j.Cdj)("AwaitMapCombiner"),(0,G.Sn)("design:type",lA)],pA.prototype,"_mapCombiner",void 0),(0,G.Cg)([(0,j.MnK)(bA),(0,j.nKb)("entryPoint"),(0,j.Wf4)(),(0,G.Sn)("design:type",bA)],pA.prototype,"_matchEntryPoint",void 0),(0,G.Cg)([(0,j.DTs)(),(0,j.W_S)(),(0,G.Sn)("design:type",String)],pA.prototype,"_matchEntryPointName",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],pA.prototype,"_onEnteredViaPoint",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],pA.prototype,"_notEnteredViaPoint",void 0),pA=(0,G.Cg)([(0,j.EVk)("EntryPointTrigger",W.Y.map)],pA);let vA=class extends j.uAl{constructor(){super(),this._layerList=[],this._activeScene=null,this._activeScene=j.wa5.getActiveScene()}create(){super.create();const k=this._layerList.length;for(let B=0;B{this.onGracePeriodDaysLeftSet.dispatch(k),this.handleGracePeriodRequiredChange()}),this),this._parentalConsentService.onGracePeriodMsLeftSet.add((k=>{this.onGracePeriodMsLeftSet.dispatch(k),this.handleGracePeriodRequiredChange()}),this),this._checkStatusOnCreate&&(this.handleConsentStatusChange(this._parentalConsentService.consentStatus,!1),this.onGracePeriodDaysLeftSet.dispatch(this._parentalConsentService.gracePeriodDaysLeft),this.onGracePeriodMsLeftSet.dispatch(this._parentalConsentService.gracePeriodMsLeft))}destroy(){this._parentalConsentService.onConsentStatusChange.removeAll(this),this._parentalConsentService.onGracePeriodDaysLeftSet.removeAll(this),this._parentalConsentService.onGracePeriodMsLeftSet.removeAll(this),this.clearApprovalAutoDismissTimeout(),this.onConsentStatusChange.dispose(),this.onHumanReadableConsentStatusChange.dispose(),this.onGracePeriodDaysLeftSet.dispose(),this.onGracePeriodMsLeftSet.dispose(),this.onGracePeriodRequiredSet.dispose(),this.onConsentRequired.dispose(),this.onNoConsentRequired.dispose(),this.onConsentStatusMessageAvailable.dispose(),this.onBannerDismissed.dispose(),this.onConsentRequested.dispose(),this.onConsentNotRequested.dispose(),this.onConsentGranted.dispose(),this.onConsentRequestSuccess.dispose(),this.onConsentRequestError.dispose(),this.onConsentRequestFirstSuccess.dispose(),super.destroy()}dismissApprovalMessage(){this.clearApprovalAutoDismissTimeout(),this.onBannerDismissed.dispatch()}clearApprovalAutoDismissTimeout(){j.Aq$.isDefined(EA._approvalAutoDismissTimeout)&&(window.clearTimeout(EA._approvalAutoDismissTimeout),EA._approvalAutoDismissTimeout=null)}handleConsentStatusChange(k,B=!0){const U=wA.b.statusRequiresConsent(k);switch(k!==wA.P.Approved||j.Aq$.isDefined(EA._approvalAutoDismissTimeout)||(EA._approvalAutoDismissTimeout=window.setTimeout((()=>this.dismissApprovalMessage()),EA.APPROVAL_AUTO_DISMISS_TIME_MS)),this.onConsentStatusChange.dispatch(k),this.onHumanReadableConsentStatusChange.dispatch(wA.b.getConsentStatusMessage(k)),k){case wA.P.NotRequested:this.onConsentNotRequested.dispatch();break;case wA.P.Requested:this.onConsentRequested.dispatch();break;case wA.P.Approved:this.onConsentGranted.dispatch()}U?this.onConsentRequired.dispatch():this.onNoConsentRequired.dispatch();const F=U||B&&k===wA.P.Approved&&j.Aq$.isDefined(EA._approvalAutoDismissTimeout);this.onConsentStatusMessageAvailable.dispatch(F),this.handleGracePeriodRequiredChange()}handleGracePeriodRequiredChange(){this.onGracePeriodRequiredSet.dispatch(wA.b.statusRequiresConsent(this._parentalConsentService.consentStatus)&&this._parentalConsentService.gracePeriodMsLeft>0)}sendConsentRequest(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=this._parentalConsentService.consentStatus===wA.P.NotRequested;yield this._parentalConsentService.sendConsentRequest(k).then((()=>{B&&this.onConsentRequestFirstSuccess.dispatch(),this.onConsentRequestSuccess.dispatch()})).catch((k=>{this.onConsentRequestError.dispatch(j.RQr.getMessage(k))}))}))}};TA.APPROVAL_AUTO_DISMISS_TIME_MS=6e4,(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onConsentStatusChange",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onHumanReadableConsentStatusChange",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onGracePeriodDaysLeftSet",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onGracePeriodMsLeftSet",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onGracePeriodRequiredSet",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onConsentRequired",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onNoConsentRequired",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onConsentStatusMessageAvailable",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onBannerDismissed",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onConsentRequested",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onConsentNotRequested",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onConsentGranted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onConsentRequestError",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onConsentRequestSuccess",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onConsentRequestFirstSuccess",void 0),(0,G.Cg)([(0,j.Cdj)("580-3bea"),(0,G.Sn)("design:type",wA.b)],TA.prototype,"_parentalConsentService",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],TA.prototype,"_checkStatusOnCreate",void 0),TA=EA=(0,G.Cg)([(0,j.EVk)("ParentalConsentService",W.Y.web)],TA);U(20597);var SA,AA=U(57975),CA=U.n(AA),OA=U(62889),IA=U(8900);let DA=SA=class extends j.wvl{constructor(){super(...arguments),this.fileExtension="gear"}initialize(k,B){super.initialize(k,B),this._path=this._editorAPI.getFilePath(this._fileGuid),this._gear=j.KDe.fromGearFile(JSON.parse(this._editorAPI.readFileSync(this._path).toString()))}generate(k,B){if(!this._path)return j.bl1.create({id:`failed-${this.fileExtension}-path-${this._fileGuid}`,iconType:j.ATc.Error,message:`Failed to get filepath for ${this._fileGuid} (likely a race condition with the editors internal file structure). Please re-select the file.`});const U=[OA.M.generateGearHelperNode(this._editorAPI,this.fileExtension),this.generateGearInfoNode(),this.generateHiddenSlotsNode(),this.generateSlotsToNotRecolorNode(),this.generateAttachmentArrayNode()];return j.XRp.createVertical(U)}generateGearInfoNode(){const k=this._path.substring(0,this._path.lastIndexOf(`/${this.fileExtension}/`)),B=CA().basename(this._path,`.${this.fileExtension}`),U=CA().join(k,"images",B),F=[];return F.push(j.ly.create({id:`${this.fileExtension}-type-${this._fileGuid}`,labelValue:`${this.fileExtension} is a ${CA().basename(k)} type`}),j.XRp.createHorizontal([j.ly.create({id:`${this.fileExtension}-image-path-${this._fileGuid}`,labelValue:`Image path: ${U.substring(U.indexOf("/assets/"))}`}),j.X9M.create({id:`open-${this.fileExtension}-image-folder-${this._fileGuid}`,buttonText:"",buttonIcon:j.a2l.Folder,nodeSize:"1of12",onClick:()=>{this._editorAPI.externalOpenFolder(U)}})])),j.XRp.createVertical(F,{isCollapsible:!0,startCollapsed:!1,title:`Info: ${B}`})}generateHiddenSlotsNode(){const k=[j.Gme.dropdownGroup({id:`hidden-slot-quick-dropdown-${this._fileGuid}`,labelValue:"Hidden Slot Presets",selectValue:"selectAnOption",selectOptions:Object.keys(SA.hiddenAttachmentPresets),onChange:k=>{const B="string"==typeof k?k:Object.keys(SA.hiddenAttachmentPresets)[k];if("clear"===B)this._gear.hiddenSlots.length=0;else{const k=new Set(this._gear.hiddenSlots||[]);SA.hiddenAttachmentPresets[B].forEach((B=>k.add(B))),this._gear.hiddenSlots=Array.from(k)}const U=j.KDe.toGearFile(this._gear);tt.q.instance.game.cache.addJSON(this._fileGuid,U),this._editorAPI.writeToPath(this._path,U),this._editorAPI.redrawCustomInspector()}})];return k.push(j._Lw.line(),j.IqD.create({label:"Hidden Slots",id:`hidden-slots-${this._fileGuid}`,arrayType:j.bJb.Enum,enumeration:Xa.VE,value:this._gear.hiddenSlots,onChange:k=>{this._gear.hiddenSlots=k;const B=j.KDe.toGearFile(this._gear);tt.q.instance.game.cache.addJSON(this._fileGuid,B),this._editorAPI.writeToPath(this._path,B),this._editorAPI.redrawCustomInspector()}})),j.XRp.createVertical(k,{isCollapsible:!0,startCollapsed:!1,title:"Hidden Slots"})}generateSlotsToNotRecolorNode(){const k=[j.Gme.dropdownGroup({id:`do-not-recolor-slot-quick-dropdown-${this._fileGuid}`,labelValue:"Do Not Recolor Presets",selectValue:"selectAnOption",selectOptions:Object.keys(SA.doNotRecolorAttachmentPresets),onChange:k=>{const B="string"==typeof k?k:Object.keys(SA.doNotRecolorAttachmentPresets)[k];if("clear"===B)this._gear.slotsToNotRecolor.length=0;else{const k=new Set(this._gear.slotsToNotRecolor||[]);SA.doNotRecolorAttachmentPresets[B].forEach((B=>k.add(B))),this._gear.slotsToNotRecolor=Array.from(k)}const U=j.KDe.toGearFile(this._gear);tt.q.instance.game.cache.addJSON(this._fileGuid,U),this._editorAPI.writeToPath(this._path,U),this._editorAPI.redrawCustomInspector()}})];return k.push(j.IqD.create({label:"Do Not Recolor Slots",id:`do-not-recolor-slots-${this._fileGuid}`,arrayType:j.bJb.Enum,enumeration:Xa.VE,value:this._gear.slotsToNotRecolor||[],onChange:k=>{this._gear.slotsToNotRecolor=k;const B=j.KDe.toGearFile(this._gear);tt.q.instance.game.cache.addJSON(this._fileGuid,B),this._editorAPI.writeToPath(this._path,B),this._editorAPI.redrawCustomInspector()}})),j.XRp.createVertical(k,{isCollapsible:!0,startCollapsed:!1,title:"Do Not Recolor Slots"})}generateAttachmentArrayNode(){const k=j.IqD.create({label:"Attachments",id:`gear-array-${this._fileGuid}`,value:this._gear.attachments,arrayType:j.bJb.GenericObject,insertElementCallbacks:new Map([["default",()=>({name:"",imageGuid:""})]]),onChange:k=>{this._gear.attachments=k;const B=j.KDe.toGearFile(this._gear);tt.q.instance.game.cache.addJSON(this._fileGuid,B),this._editorAPI.writeToPath(this._path,B),this._editorAPI.redrawCustomInspector()},getElementInspector:this.generateElementNode.bind(this)});return j.XRp.createVertical([k],{isCollapsible:!0,startCollapsed:!1,title:"Attachment Editor"})}generateElementNode(k,B){const U=[j.ly.create({id:`attachment-label-${B}`,labelValue:`Attachment '${k.name}'`}),j.ly.create({id:`guid-label-${B}`,labelValue:`Guid '${k.imageGuid}'`})];return k.transform?U.push(this.generateTransformInspector(k,B)):U.push(j.ly.create({id:`missing-transform-${B}-${this._fileGuid}`,labelValue:`Default transform in use at ${B}`}),j.X9M.create({id:`add-missing-transform-${B}-${this._fileGuid}`,buttonText:"Add Transform",onClick:()=>{k.transform={x:0,y:0,scaleX:1,scaleY:1}}})),j.XRp.createVertical(U,{isCollapsible:!0,startCollapsed:!0,title:`${k.name} - ${k.transform?"custom":"default"} Transform`})}generateTransformInspector(k,B){const U=j.fqe.create({id:`transform-x-${B}-${this._fileGuid}`,inputValue:k.transform.x,inputType:"number",labelValue:"x",inputUpdateMode:j.JGO.Confirm,propertyPath:[`${B}`,"transform","x"]}),F=j.fqe.create({id:`transform-y-${B}-${this._fileGuid}`,inputValue:k.transform.y,inputType:"number",labelValue:"y",inputUpdateMode:j.JGO.Confirm,propertyPath:[`${B}`,"transform","y"]}),G=j.fqe.create({id:`transform-scalex-${B}-${this._fileGuid}`,inputValue:k.transform.scaleX,inputType:"number",labelValue:"scaleX",inputUpdateMode:j.JGO.Confirm,propertyPath:[`${B}`,"transform","scaleX"]}),$=j.fqe.create({id:`transform-scaley-${B}-${this._fileGuid}`,inputValue:k.transform.scaleY,inputType:"number",labelValue:"scaleY",inputUpdateMode:j.JGO.Confirm,propertyPath:[`${B}`,"transform","scaleY"]});return j.XRp.createVertical([j.XRp.createHorizontal([U,F]),j.XRp.createHorizontal([G,$])])}};DA.hiddenAttachmentPresets={selectAnOption:[],clear:[],hideFace:IA.M.instance.faceAttachments,hideBody:IA.M.instance.skinAttachments,hideAllHair:IA.M.instance.hairAttachments,hideBackAndShort:[Xa.VE.HairBun,Xa.VE.HairRPigtails,Xa.VE.HairLPigtails,Xa.VE.HairBack,Xa.VE.HairBehind,Xa.VE.HairBackLong,Xa.VE.HairShort],hideBackFull:[Xa.VE.HairBun,Xa.VE.HairRPigtails,Xa.VE.HairLPigtails,Xa.VE.HairBack,Xa.VE.HairBehind,Xa.VE.HairBackLong],hideBackExceptLong:[Xa.VE.HairBun,Xa.VE.HairRPigtails,Xa.VE.HairLPigtails,Xa.VE.HairBack,Xa.VE.HairBehind]},DA.doNotRecolorAttachmentPresets={selectAnOption:[],clear:[],face:IA.M.instance.faceAttachments,hair:IA.M.instance.hairAttachments,skin:IA.M.instance.skinAttachments,eyes:IA.M.instance.eyeAttachments},DA=SA=(0,G.Cg)([(0,j.aw3)("gear")],DA);let RA=class extends DA{constructor(){super(...arguments),this.fileExtension="petgear"}};RA.hiddenAttachmentPresets={selectAnOption:[],clear:[]},RA=(0,G.Cg)([(0,j.aw3)("petgear")],RA);let PA=class extends Fi.z{create(){super.create(),this._bindOnCreate&&this.bindContext()}bindContext(){var k;this._context.Container.rebind("PLAYER_GOLD_COINS").toConstantValue(this._dataProvider.player.getGold()),this._context.Container.rebind("CHARGED_LEVEL_CAP").toConstantValue(this._dataProvider.player.getChargedLevelCap()),this._context.Container.rebind("PLAYER_FIRST_NAME").toConstantValue(this._dataProvider.player.getFirstName()),this._context.Container.rebind("PLAYER_WIZARD_NAME").toConstantValue(null!==(k=this._dataProvider.player.getNameWithoutNickname().split(" ")[1])&&void 0!==k?k:""),this._context.Container.rebind("PLAYER_CHARGED_LEVEL_CUMULATIVE").toConstantValue(this._dataProvider.player.getChargedLevelCumulative())}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],PA.prototype,"_dataProvider",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],PA.prototype,"_bindOnCreate",void 0),PA=(0,G.Cg)([(0,j.EVk)("ActivePlayerDataProvider",W.Y.player)],PA);U(32500);var MA=U(55950),NA=U(36164);let xA=class extends j.uAl{constructor(){super(...arguments),this.texts=[],this.types=[],this._indexes={},this._gearIndex=-1}nextAssetType(k){const B=NA.R[`${k}Map`];if(!B||0===B.length)return void j.VyI.log(`No map of type ${k} in GearMaps.ts`,j.$bb.Error);this._indexes[k]||(this._indexes[k]=0);let U=this._indexes[k];for(U++;!B[U];)U>=B.length?U=0:U++;this.setTypeIndex(k,U,B)}prevAssetType(k){const B=NA.R[`${k}Map`];if(!B)return void j.VyI.log(`No map of type ${k} in GearMaps.ts`,j.$bb.Error);this._indexes[k]||(this._indexes[k]=0);let U=this._indexes[k];for(U--;!B[U];)U<0?U=B.length-1:U--;this.setTypeIndex(k,U,B)}setTypeIndex(k,B,U){this._indexes[k]=B,-1===this._gearIndex&&(this._gearIndex=this._gear.gear.length),this._gear.gear[this._gearIndex]=U[B],this._gear.postCreate(),this._color.refresh(),this.updateTextUI(k,B)}updateTextUI(k,B){const U=this.types.indexOf(k);this.texts.forEach(((k,F)=>{const G=this.types[F].substring(0,1).toUpperCase()+this.types[F].substring(1);k.text=F===U?`${G}-${B}`:G}))}};(0,G.Cg)([(0,j.Pqz)(_i.c),(0,G.Sn)("design:type",_i.c)],xA.prototype,"_gear",void 0),(0,G.Cg)([(0,j.Pqz)(MA.y),(0,G.Sn)("design:type",MA.y)],xA.prototype,"_color",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",Array)],xA.prototype,"texts",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],xA.prototype,"types",void 0),xA=(0,G.Cg)([(0,j.EVk)("GearEditorHelper","Editor")],xA);U(131);let LA=class extends j.uAl{constructor(){super(...arguments),this.time=1e3,this._index=0,this._timer=1e3}postCreate(){super.postCreate(),this.manager=this.gameObject.findComponent(_i.c)}update(){super.update(),this._timer<0&&(this._timer=this.time,this._index"character"===k.name))?F.slots.find((k=>"character"===k.name))?null:"Spine file missing character slot":"Spine file missing character bone":"Spine file missing bones and slots"}validateParticle(){if(!this._mount)return"Failed to load mount file";const k=this._mount.particlesGuid;if(null==k)return null;const B=this._editorAPI.getFilePath(k);if(!B)return"Particle system file not found";let U=null;try{U=this._editorAPI.readFileSync(B).toString()}catch(e){j.RQr.logError(e,"Failed to read particle system file")}return U?U.includes("ParticleSystem")?null:"Particle system file missing ParticleSystem component":"Failed to load particle system file"}generateVectorInspector(k,B,U){const F=null!=B?B:new j.I9Y(0,0),G=j.ly.create({id:`offset-${k}-label-${this._fileGuid}`,labelValue:"Offset"}),$=j.fqe.create({id:`offset-${k}-x-${this._fileGuid}`,inputValue:F.x,inputType:"number",labelValue:"x",inputUpdateMode:j.JGO.Confirm,onChange:(k,B)=>U("x",B)}),H=j.fqe.create({id:`offset-${k}-y-${this._fileGuid}`,inputValue:F.y,inputType:"number",labelValue:"y",inputUpdateMode:j.JGO.Confirm,onChange:(k,B)=>U("y",B)});return j.XRp.createVertical([G,j.XRp.createHorizontal([$,H])])}generateParticlesPickerInspector(){var k;const B=j.ly.create({id:`particle-label-${this._fileGuid}`,labelValue:"Particles"}),U=j.Hnb.create({id:`particles-${this._fileGuid}`,path:null!==(k=this._particleFilePath)&&void 0!==k?k:void 0,allowedExtensions:[".prefab"],onChange:k=>this.onParticleChange(k)});return j.XRp.createVertical([j._Lw.line(`particle-divider-${this._fileGuid}`),B,U])}onParticleOffsetChange(k,B){if(!this._mount)return void j.VyI.log("No mount to update",j.$bb.Error);let U;if("string"==typeof B)U=parseFloat(B);else{if("number"!=typeof B)return void j.VyI.log("Invalid value type for offset",j.$bb.Error);U=B}this._mount.particleOffset||(this._mount.particleOffset=new j.I9Y(0,0)),this._mount.particleOffset[k]=U,this.writeMountFile(),this._editorAPI.redrawCustomInspector()}onMountOffsetChange(k,B){if(!this._mount)return void j.VyI.log("No mount to update",j.$bb.Error);let U;if("string"==typeof B)U=parseFloat(B);else{if("number"!=typeof B)return void j.VyI.log("Invalid value type for offset",j.$bb.Error);U=B}this._mount.offset[k]=U,this.writeMountFile(),this._editorAPI.redrawCustomInspector()}onParticleChange(k){if(this._mount){try{if(k){const B=this._editorAPI.readFileSync(`${k}.meta`).toString(),U=JSON.parse(B).guid;this._mount.particlesGuid=U}else this._mount.particlesGuid=void 0;this.writeMountFile()}catch(e){j.RQr.logError(e,"Failed to parse particle meta file")}this._editorAPI.redrawCustomInspector()}else j.VyI.log("No mount to update",j.$bb.Error)}generateSpinePickerInspector(){return j.ICs.create({id:`spine-picker-${this._fileGuid}`,guid:this._mount.spineGuid,onChange:this.onSpineChange.bind(this)})}onSpineChange(k){this._mount?(this._mount.spineGuid=k,this.writeMountFile(),this._editorAPI.redrawCustomInspector()):j.VyI.log("No mount to update",j.$bb.Error)}writeMountFile(){this._mountFilePath?this._editorAPI.writeToPath(this._mountFilePath,BA.u.toMountFile(this._mount)):j.VyI.log("No path to write mount file to",j.$bb.Error)}generate(k,B){var U,F;if(!this._mountFilePath)return j.bl1.create({id:`failed-mount-path-${this._fileGuid}`,iconType:j.ATc.Error,message:`Failed to get filepath for ${this._fileGuid} (likely a race condition with the editors internal file structure). Please re-select the file.`});this._errorMessage=null!==(F=null!==(U=this.validateSpine())&&void 0!==U?U:this.validateParticle())&&void 0!==F?F:null;const G=[];return this._errorMessage&&G.push(j.bl1.create({id:`mount-error-${this._fileGuid}`,iconType:j.ATc.Error,message:this._errorMessage})),G.push(this.generateVectorInspector("mount",this._mount.offset,this.onMountOffsetChange.bind(this))),G.push(this.generateSpinePickerInspector()),G.push(this.generateParticlesPickerInspector()),G.push(this.generateVectorInspector("particle",this._mount.particleOffset,this.onParticleOffsetChange.bind(this))),j.XRp.createVertical(G)}};UA=(0,G.Cg)([(0,j.aw3)("mount")],UA);let FA=class extends j.uAl{constructor(){super(...arguments),this._boundPreviewUpdate=null,this._updateTween=null,this._tweenState={t:0},this._isIdle=!0,this._mountParticles=null}create(){super.create(),j.VyI.log("The mount preview component is only intended for use inside of the editor.",j.$bb.Error),this._mountComponent.isMountReady?this.onMountReady():this._mountComponent.mountReady.addOnce(this.onMountReady,this)}editorUpdate(k){this._mountComponent.update(),k.update()}onMountReady(){this._mountParticles=null,this._mountComponent.removeParticleEffect(),this._mountComponent.hasInternalParticleEffect()&&this._mountComponent.addInternalParticleEffect().then((k=>{this._mountParticles=k})).catch(j.RQr.createHandler("Could not add internal particle effect in editor."));const k=this._mountComponent.playerObject.findComponent(rn.l);k?(this._boundPreviewUpdate||(this._boundPreviewUpdate=this.editorUpdate.bind(this,k)),this._updateTween||(this._updateTween=j.W$e.instance.game.add.tween(this._tweenState,this),this._updateTween.to({t:1},1e3,j.GS3.Linear.None,!0,0,-1,!0)),this._updateTween.onUpdate.removeAll(),this._updateTween.onUpdate.add(this._boundPreviewUpdate)):j.VyI.log("No player spine bone follower found for player",j.$bb.Error)}toggleWalkAnimation(){this._isIdle?this._mountComponent.playAnimation("walk"):this._mountComponent.playAnimation("idle"),this._isIdle=!this._isIdle}destroy(){var k,B;this._mountParticles=null,null===(k=this._mountComponent)||void 0===k||k.removeParticleEffect(),null===(B=this._updateTween)||void 0===B||B.destroy()}};(0,G.Cg)([(0,j.Pqz)(kA.N),(0,G.Sn)("design:type",kA.N)],FA.prototype,"_mountComponent",void 0),FA=(0,G.Cg)([(0,j.EVk)("MountPreview",j.YH6.animation)],FA);let GA=class extends j.uAl{constructor(){super(...arguments),this._allowNotOwned=!1,this._equipOnCreate=!1}create(){super.create(),this._equipOnCreate&&this.equipItem()}run(){this.equipItem()}equipItem(){if(!j.Aq$.isDefined(this._type))return void j.VyI.log("PlayerEquipItemComponent: item type required",j.$bb.Error);const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;(this._allowNotOwned||k.backpack.hasItem(this._type,this._id))&&k.equip(this._id,this._type).then((()=>{var k,B,U;return null===(U=null===(B=null===(k=this._playerDataProvider)||void 0===k?void 0:k.player)||void 0===B?void 0:B.playerContainer)||void 0===U?void 0:U.reload()})).catch(j.RQr.createHandler(`PlayerEquipItemComponent:equipItem Failed to equip item ${this._type}-${this._id}`))}unequipItem(){if(!j.Aq$.isDefined(this._type))return void j.VyI.log("PlayerEquipItemComponent: item type required",j.$bb.Error);const k=this._playerDataProvider.player;k.equipment[this._type]===this._id&&k.unEquip(this._id,this._type).then((()=>{var k,B,U;return null===(U=null===(B=null===(k=this._playerDataProvider)||void 0===k?void 0:k.player)||void 0===B?void 0:B.playerContainer)||void 0===U?void 0:U.reload()})).catch(j.RQr.createHandler(`PlayerEquipItemComponent:unequipItem Failed to unequip item ${this._type}-${this._id}`))}unequipCurrentOfType(){if(!j.Aq$.isDefined(this._type))return void j.VyI.log("PlayerEquipItemComponent: item type required",j.$bb.Error);const k=this._playerDataProvider.player;k.equipment[this._type]&&k.unEquip(k.equipment[this._type],this._type).then((()=>{var k,B,U;return null===(U=null===(B=null===(k=this._playerDataProvider)||void 0===k?void 0:k.player)||void 0===B?void 0:B.playerContainer)||void 0===U?void 0:U.reload()})).catch(j.RQr.createHandler(`PlayerEquipItemComponent:unequipCurrentOfType Failed to unequip current item of type ${this._type}`))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],GA.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],GA.prototype,"_id",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],GA.prototype,"_type",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],GA.prototype,"_allowNotOwned",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],GA.prototype,"_equipOnCreate",void 0),GA=(0,G.Cg)([(0,j.EVk)("PlayerEquipItem",W.Y.player)],GA);let jA=class extends j.uAl{constructor(){super(...arguments),this._equipOnCreate=!1}create(){super.create(),this._equipOnCreate&&this.equipPet()}run(){this.equipPet()}equipPet(){if(!j.Aq$.isDefined(this._petId))return void j.VyI.log("PlayerEquipPetComponent: pet ID required",j.$bb.Error);const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=k.kennel.getPetTeamIDs();if(B.includes(this._petId))eo.P8.showUniquePetsFeature()&&k.kennel.replaceDuplicateOnTeam(this._petId);else{const U=eo.P8.isPetEvolvedStarter(B[1])?1:2,F=k.kennel.getAllPetsByID(this._petId),G=eo.P8.showUniquePetsFeature()?eo.P8.getPrimaryPet(this._petId,F):this.getHighestLevelPet(F);if(!G)return void j.VyI.log(`PlayerEquipPetComponent: pet with ID ${this._petId} not found in kennel; cannot equip`,j.$bb.Error);k.kennel.removeAtTeamPosition(U),k.kennel.setTeamPosition(G,U)}}getHighestLevelPet(k){if(k&&0!==k.length)return k.sort(((k,B)=>B.level-k.level)),k[0]}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],jA.prototype,"_petId",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jA.prototype,"_equipOnCreate",void 0),jA=(0,G.Cg)([(0,j.EVk)("PlayerEquipPet",W.Y.player)],jA);U(47734);var $A=U(97252);let HA=class extends j.PQK{installBindings(){this.Container.bind("PLAYER_APPEARANCE_SCALING").toConstantValue($A.M.UPSCALED_4x)}};HA=(0,G.Cg)([(0,j.Og1)("PlayerUpscalingInstaller","Installer")],HA);U(77409);var VA=U(42430),WA=U(91016),qA=U(39571),KA=U(90351);class zA extends j.$KW{generate(k,B){this._dropdownOptions||(this._dropdownOptions=Array.from(VA.o.spellConstructors.keys()),this._dropdownOptions.unshift(zA.ADD_STEP));const U=this.displayWarnings();if(U)return U;const F=[];F.push(j.X9M.create({id:"begin-button",buttonText:"Begin",onClick:()=>{this._editorAPI.switchFocusToPlayMode(),this.getComponent().begin()}})),F.push(j.X9M.create({id:"save-button",buttonText:"Save",onClick:()=>{const k=this.getSpell(),B=this._editorAPI.getFilePath(k.spellGUID);this._editorAPI.writeToPath(B,this.getJSONString(k))}})),F.push(j.Gme.numberGroup({id:"multiHit",labelValue:"Multi-Hit",inputValue:k.multiHit})),F.push(j.Gme.gameObjectPickerGroup({id:"caster",labelValue:"Spell Caster",gameObjectGuid:k.caster}));const G=[];for(let $=0;$<3;$++)G.push(j.WVg.create({id:`target.${$}`,gameObjectGuid:k.targets[$],propertyPath:["targets",`${$}`]}));return F.push(j.XRp.createVertical(G,{isCollapsible:!0,title:"Spell Targets"})),F.push(j._Lw.line()),F.push(this.createSpellEditor(this.getSpell().steps)),F.push(j._Lw.line()),F.push(j._6c.create({id:"add-end",selectValue:0,selectOptions:this._dropdownOptions,onChange:k=>{if(k===zA.ADD_STEP)return;this.getSpell().steps.push(VA.o.spellConstructors.get(k)()),this.updateCache()}})),j.XRp.createVertical(F)}displayWarnings(){var k;const B=this.getComponent();return B?(null===(k=B.spell)||void 0===k?void 0:k.steps)?null:j.XRp.createVertical([j.bl1.create({id:"missing-spell-steps",message:"Either no SpellComponent found, SpellComponent.spellGUID is undefined, or the .spell file is not yet loaded",iconType:j.ATc.Warning}),j.X9M.create({id:"refresh-button",buttonText:"Refresh"})]):j.XRp.createVertical([j.bl1.create({id:"missing-component",message:"SpellTestComponent is missing, please interact with another ui element to force a redraw",iconType:j.ATc.Warning}),j.X9M.create({id:"refresh-button",buttonText:"Refresh"})])}getComponent(){return this._editorAPI.getComponent(this._componentGuid)}getSpell(){var k;return null===(k=this.getComponent())||void 0===k?void 0:k.spell}getJSONString(k){return JSON.stringify({steps:k.steps},((k,B)=>k.startsWith("__")?B:k.startsWith("_")?void 0:B),"\t")}updateCache(){const k=this.getSpell();tt.q.instance.game.cache.addJSON(k.spellGUID,JSON.parse(this.getJSONString(k))),this._editorAPI.modifyComponent(this._componentGuid,{})}createSpellEditor(k){const B=[];for(let U=0;U{const B=this.getSpell(),U=B.steps[k-1];B.steps[k-1]=B.steps[k],B.steps[k]=U,this.updateCache()}})),B.push(j.X9M.create({id:`move-down-${k}`,buttonText:"⬇️",buttonDisabled:k===this.getSpell().steps.length-1,onClick:()=>{const B=this.getSpell(),U=B.steps[k+1];B.steps[k+1]=B.steps[k],B.steps[k]=U,this.updateCache()}})),B.push(j._6c.create({id:`add-${k}`,selectValue:0,selectOptions:this._dropdownOptions,onChange:B=>{if(B===zA.ADD_STEP)return;this.getSpell().steps.splice(k,0,VA.o.spellConstructors.get(B)()),this.updateCache()}})),B.push(j.ly.create({id:`break-${k}`,labelValue:" "})),B.push(j.X9M.create({id:`delete-${k}`,buttonText:"❌",onClick:()=>{this.getSpell().steps.splice(k,1),this.updateCache()}})),j.XRp.createHorizontal(B)}getSpellStepInspector(k,B){const U=[this.getSpellStepHeader(B)];return k?(k._spellComponent=this.getSpell(),Object.keys(k).filter((k=>!k.startsWith("_"))).forEach((F=>{const G=(k,U)=>{this.getSpell().steps[B][F]=U,this.updateCache()},$={id:F+Math.random(),labelValue:F,inputUpdateMode:j.JGO.Confirm},H=k.getOverrideInspectorNode(F,$.id,G);if(!0===H)if("target"===F)U.push(j.Gme.enumGroup(Object.assign(Object.assign({},$),{selectValue:k[F],onChange:k=>{G(0,k)}}),WA.Wo));else if("blend"===F)U.push(j.Gme.enumGroup(Object.assign(Object.assign({},$),{selectValue:k[F],onChange:k=>{G(0,k)}}),j.PzZ));else if("PlayAnimationStep"!==k.__type||"animation"!==F&&"returnToLoop"!==F)if(-1!==F.indexOf("ffset"))U.push(j.XRp.createHorizontal([j.ly.create($),j.Gme.numberGroup(Object.assign(Object.assign({},$),{id:`x-${$.id}`,labelValue:"x",inputValue:k[F].x,onChange:(U,G)=>{k[F].x=G;this.getSpell().steps[B]=k,this.updateCache()}})),j.Gme.numberGroup(Object.assign(Object.assign({},$),{id:`y-${$.id}`,labelValue:"y",inputValue:k[F].y,onChange:(U,G)=>{k[F].y=G;this.getSpell().steps[B]=k,this.updateCache()}}))]));else if(-1!==F.indexOf("Ease"))U.push(j.Gme.enumGroup(Object.assign(Object.assign({},$),{selectValue:k[F],onChange:k=>{G(0,k)}}),KA.i));else if("layerOverride"===F)U.push(j.Gme.enumGroup(Object.assign(Object.assign({},$),{selectValue:k[F],onChange:k=>{G(0,k)}}),WA.Cr));else if("prefabID"===F)U.push(j.T7t.create(Object.assign(Object.assign({},$),{guid:k[F],onChange:k=>{G(0,k)}})));else if("spineID"===F)U.push(j.ICs.create(Object.assign(Object.assign({},$),{guid:k[F],onChange:k=>{G(0,k)}})));else switch($.inputValue=k[F],$.onChange=G,typeof k[F]){case"string":U.push(j.Gme.textGroup($));break;case"boolean":U.push(j.Gme.checkboxGroup($));break;case"number":U.push(j.Gme.numberGroup($));break;case"function":break;default:U.push(j.ly.create({id:Math.random().toString(),labelValue:`Unknown parameter ${F} - ${typeof k[F]}. Please update SpellTestInspector`}))}else U.push(j.Gme.dropdownGroup(Object.assign(Object.assign({},$),{selectValue:k[F],selectOptions:zA.ANIMATION_NAMES,onChange:k=>{G(0,k)}})));else!1!==H&&U.push(H)})),j.XRp.createVertical(U,{isCollapsible:!0,title:k.__type})):j.XRp.createVertical(U)}}zA.ADD_STEP="add step",zA.ANIMATION_NAMES=["attack","idle","walk"];let YA=class extends j.uAl{constructor(){super(...arguments),this.multiHit=0,this.targets=[],this._playing=!1}begin(){this._playing||(this._playing=!0,this.GameObject.children.forEach((k=>{k===this.caster?this.updateLayerByName(k,qA.a.ActiveSideCast):k.name.charAt(0)===this.caster.name.charAt(0)?this.getLayerLevel(k.layer)({unitId:`target-${B}`,gameObject:k,statusEffectContainer:k}))),manager:this.spell,multiHit:this.multiHit}).then((()=>{this._playing=!1})).catch((k=>{this._playing=!1,console.error(k)})))}updateLayerByName(k,B){const U=`${B}${this.getLayerLevel(k.layer)}`;k.setLayer(U,!0)}getLayerLevel(k){const B=parseInt(k.charAt(k.length-1));return rr.o.isNumber(B)||console.log("ERROR: layer name requires a numerical suffix value"),B}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],YA.prototype,"multiHit",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],YA.prototype,"caster",void 0),(0,G.Cg)([(0,j.ERr)(),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],YA.prototype,"targets",void 0),(0,G.Cg)([(0,j.Pqz)(VA.o),(0,G.Sn)("design:type",VA.o)],YA.prototype,"spell",void 0),(0,G.Cg)([(0,j.GO0)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],YA.prototype,"begin",null),YA=(0,G.Cg)([(0,j.WR4)(zA),(0,j.EVk)("SpellTest",j.YH6.animation)],YA);U(90076);let QA=class extends j.JTX{constructor(){super(...arguments),this._rewardItems=[],this._replacementItems=[]}create(){const k=this.getInjectedValue(hs.Co.WeightedRewards),B=this.getInjectedValue(hs.Co.FallbackRewards);k&&(this._rewardItems=k),B&&(this._replacementItems=Lt.l.guaranteeArray(B))}getItem(){return this._rewardItems.length>0?this.getWeightedItem(this._rewardItems):this.getWeightedItem(this._replacementItems)}getWeightedItem(k){return Ze.selectByWeight(k,(k=>{var B;return null!==(B=k.R)&&void 0!==B?B:1}))}};(0,G.Cg)([(0,j.SZi)(),(0,j.vCS)(),(0,G.Sn)("design:type",Array)],QA.prototype,"_rewardItems",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Array)],QA.prototype,"_replacementItems",void 0),QA=(0,G.Cg)([(0,j.EVk)("BossItems",W.Y.adventure)],QA);U(55237);var XA=U(96268);let ZA=class extends j.JTX{constructor(){super(...arguments),this.itemCardScale=1}create(){super.create(),this._pool=new j.iyL(this.loadCard.bind(this),this.setCardData.bind(this))}getObject(){return this._pool.getObject()}reloadCards(){this._pool.aliveList.forEach((k=>{this.setCardData(k)}))}loadCard(){const k=this._prefabLoader.loadFromGUID(Rt.l.ItemCard);return this.setCardData(k),k.addComponent(XA.a),k}setCardData(k){k.transform.setScale(this.itemCardScale,this.itemCardScale);const B=k.findComponentInChildren(Gy.Z),U=this.itemProvider.getItem();B&&(B.initializeOnPostCreate=!1,B.initializeItemCard({id:U.ID,type:U.type,L:U.L,N:U.N,cost:U.cost,data:U.data,receivedThroughGotItemFlow:!1}))}destroy(){this._pool.destroy(),super.destroy()}};(0,G.Cg)([(0,j.MnK)(j.uAl),(0,G.Sn)("design:type",Object)],ZA.prototype,"itemProvider",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],ZA.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],ZA.prototype,"itemCardScale",void 0),ZA=(0,G.Cg)([(0,j.EVk)("ItemCardPool",W.Y.adventureUi)],ZA);var JA=U(23283),tC=U(71041),eC=U(34374);let iC=class extends j.JTX{constructor(){super(...arguments),this._respinTextKey="RESPIN_ROULETTE"}destroy(){var k,B;null===(B=null===(k=this._currencyDisplay)||void 0===k?void 0:k.onCurrencyUpdateComplete)||void 0===B||B.remove(this.handleCurrencyUpdateComplete,this),super.destroy()}run(){this._roulette.headerText.text=this._localizer.getText(this._respinTextKey),this.card.active=!1,this._roulette.reset(),this._roulette.isRespin=!0,this._roulette.GameObject.active=!0,this.respinButtonsContainer.active=!0,this.setupCurrencyRespin()}setupCurrencyRespin(){if(this._currencyId=this.getInjectedValue(hs.Co.CurrencyId),this._respinCost=this.getInjectedValue(hs.Co.RespinCost),!j.Aq$.isDefined(this._currencyId)||!j.Aq$.isDefined(this._respinCost))return void j.VyI.log("ResetBossRewardsComponent: Missing currency ID and/or respin cost for currency respin setup",j.$bb.Error);if(!(this._currencyRespinButton&&this._makePaymentComponent&&this._currencyDisplay&&this._currencyDisplayContainer&&this._notEnoughCurrencyTooltip&&this._notEnoughCurrencyText))return void j.VyI.log("ResetBossRewardsComponent: Missing required components for currency respin setup",j.$bb.Error);Nt.d.updateInjectedValues(this._currencyDisplayContainer,{CURRENCY_DISPLAY_ID:this._currencyId}),this._currencyRespinButton.currency=this._currencyId,this._currencyRespinButton.amount=this._respinCost,this._currencyRespinButton.regenerateButton(),this._makePaymentComponent.currencyId=this._currencyId,this._makePaymentComponent.amount=this._respinCost;const k={sink_type:li.C.PrizeWheel};this._roulette.instanceTypeForSegmentEvent!==fi.N.RiftRun&&this._roulette.instanceTypeForSegmentEvent!==fi.N.BossRift||(this._makePaymentComponent.customData=Object.assign({sink_id:this._segment.rifts.getRiftsRewardSpinUuid(),transaction_id:this._segment.rifts.getRiftsRewardSpinTransactionUuid(),instance_id:this._segment.rifts.riftInstanceUuid,instance_type:this._roulette.instanceTypeForSegmentEvent},k)),this._makePaymentComponent.onFailure.add((()=>{this.handleNotEnoughCurrency(),this.sendPrizeWheelSpinFailedEvent(Zb.WE.NotEnoughCurrency)})),this._currencyDisplay.onCurrencyUpdateComplete.add(this.handleCurrencyUpdateComplete,this),this._currencyDisplayContainer.active=!0}handleNotEnoughCurrency(){const k=this._currentPlayer.player.getMemberTier(),B=this._respinCost-this._currentPlayer.player.getCurrencyAmount(this._currencyId);if(!Tr.h.includes(this._currencyId)||this._currentPlayer.player.isPlayingAtSchool()||xs.kG.includes(k))return this._notEnoughCurrencyText.text=27===this._currencyId?this._localizer.getText("YOU_NEED_MORE_MAGICOIN",B):this._localizer.getText("YOU_NEED_MORE_CURRENCY",B),void(this._notEnoughCurrencyTooltip.active=!0);const U={conversionFunnelName:en.o.FunnelNotEnoughCurrencyRifts,conversionStage:en.o.StageClickRouletteSpinAgain,conversionStaticOrVideo:Fs.R.Static};this._segment.purchase.sendFunnelStart({type:"Click-Roulette-Spin-Again",category:"Rifts",contentId:`${this._currencyId}-${B}`,adType:Fs.R.Static}),tt.q.instance.prodigy.open.membershipInfo(void 0,U)}handleCurrencyUpdateComplete(k){k&&(this._currencyDisplayContainer.active=!1),this._currencyRespinButton.regenerateButton()}sendPrizeWheelSpinFailedEvent(k){this._roulette.instanceTypeForSegmentEvent===fi.N.RiftRun||this._roulette.instanceTypeForSegmentEvent===fi.N.BossRift?this._segment.rifts.sendRiftsPrizeWheelSpinFailedEvent(this._roulette.instanceTypeForSegmentEvent,k):this._segment.economy.sendPrizeWheelSpinFailedEvent(JA.U.LuckyLoot,k)}};(0,G.Cg)([(0,j.MnK)(eC.i),(0,G.Sn)("design:type",eC.i)],iC.prototype,"_roulette",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iC.prototype,"card",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iC.prototype,"respinButtonsContainer",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],iC.prototype,"_respinTextKey",void 0),(0,G.Cg)([(0,j.MnK)(tC.Eo),(0,G.Sn)("design:type",tC.Eo)],iC.prototype,"_currencyRespinButton",void 0),(0,G.Cg)([(0,j.MnK)(Kw.E),(0,G.Sn)("design:type",Kw.E)],iC.prototype,"_makePaymentComponent",void 0),(0,G.Cg)([(0,j.MnK)(Or.n),(0,G.Sn)("design:type",Or.n)],iC.prototype,"_currencyDisplay",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iC.prototype,"_currencyDisplayContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iC.prototype,"_notEnoughCurrencyTooltip",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],iC.prototype,"_notEnoughCurrencyText",void 0),(0,G.Cg)([(0,j.fFd)(j.$Zn.Localization),(0,G.Sn)("design:type",j.dTp)],iC.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],iC.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],iC.prototype,"_segment",void 0),iC=(0,G.Cg)([(0,j.EVk)("ResetBossRewards",W.Y.adventureUi)],iC);let sC=class extends j.uAl{constructor(){super(...arguments),this.maxScale=1.5,this.window=.5,this._rouletteScaling=!1,this._positionOffset=300}create(){super.create(),this.roulette.onStart.add(this.setScalingEnabled,this,0,!0),this.roulette.onComplete.add(this.setScalingEnabled,this,0,!1)}destroy(){this.roulette.onStart.remove(this.setScalingEnabled,this),this.roulette.onComplete.remove(this.setScalingEnabled,this),super.destroy()}update(){if(super.update(),this._rouletteScaling)for(const k of this.roulette.GameObject.children){const B=k.transform;let U=(B.anchoredPivotOffset.x+this._positionOffset)/this.roulette.width-.5;U/=this.window,U+=.5,U=j.cj9.clamp(U,0,1);const F=this.GameObject.findComponent(ZA).itemCardScale,G=this.quadraticYoyoEase(U)*(this.maxScale-F)+F;B.setScale(G,G)}}setScalingEnabled(k){this._rouletteScaling=k}quadraticYoyoEase(k){return k<.5?k*k*4:4*(k*(k-2)+1)}};(0,G.Cg)([(0,j.MnK)(eC.i),(0,G.Sn)("design:type",eC.i)],sC.prototype,"roulette",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],sC.prototype,"maxScale",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],sC.prototype,"window",void 0),sC=(0,G.Cg)([(0,j.EVk)("RouletteScaleAnimator")],sC);let nC=class extends j.uAl{create(){super.create(),this._audio=tt.q.instance.prodigy.audio,this.roulette.onStart.add(this.setTickSFXSignal,this,0,!0),this.roulette.onComplete.add(this.setTickSFXSignal,this,0,!1)}destroy(){this.roulette.onStart.remove(this.setTickSFXSignal,this),this.roulette.onComplete.remove(this.setTickSFXSignal,this),super.destroy()}setTickSFXSignal(k){k?this.roulette.onTick.add(this.playSFX,this):this.roulette.onTick.remove(this.playSFX,this)}playSFX(){this._audio.playSFX(19,"tick")}};(0,G.Cg)([(0,j.MnK)(eC.i),(0,G.Sn)("design:type",eC.i)],nC.prototype,"roulette",void 0),nC=(0,G.Cg)([(0,j.EVk)("RouletteTicker")],nC);var aC=U(24190);let rC=class extends j.y4o{constructor(){super(...arguments),this.onStateAvailable=new j.HN0,this._spinnerPadding=35,this._root=null,this._size=new j.or0}create(){super.create();const k=tt.q.instance.game;this._root=k.add.group(k.stage),this.setRootContainer(this._root),this._size.copyFrom(j.i7d.main.viewportSize);const B=new aC.C(k,0,0,this._size.width,this._size.height,Ve._.Tiled_sprites_json,"load");B.inputEnabled=!0,this._root.addChild(B),this._spinner=this._root.addChild(tt.q.instance.prodigy.create.sprite(0,0,Ve._.General_core_json,"loading")),this._spinner.position.set(this._size.width-.5*this._spinner.width-this._spinnerPadding,this._size.height-.5*this._spinner.height-this._spinnerPadding),this._spinner.anchor.set(.5,.5),k.add.tween(this._spinner,this).to({angle:360},2e3,j.GS3.Linear.None,!0,0,-1)}destroy(){this.onStateAvailable.dispose(),this._root.destroy(),super.destroy()}getDimensions(){return this._size}hide(){this._spinner.visible=!1,tt.q.instance.game.add.tween(this._root,this).to({alpha:0},this._hideFadeTime,j.GS3.Linear.None,!0).onTweenComplete.addOnce((()=>{this.onStateAvailable.dispatch(),this.GameObject.destroy()}))}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rC.prototype,"onStateAvailable",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],rC.prototype,"_spinnerPadding",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],rC.prototype,"_hideFadeTime",void 0),rC=(0,G.Cg)([(0,j.EVk)("LoadingScreen",W.Y.ui)],rC);U(25983);var oC,hC=U(46318);let cC=oC=class extends Za.B{constructor(){super(...arguments),this.onWheelClose=new j.HN0}destroy(){this.onWheelClose.dispose(),super.destroy()}openWheel(k=oC.WONDER_WHEEL_ID){if(k!==oC.TWILIGHT_WHEEL_ID||Qt.J.isNightTime())new hC.Q(tt.q.instance.prodigy.game,this.getRootContainer(),this._loggedInPlayer.player,null,k,-55,(()=>{this.onWheelClose.dispatch()}),!0);else{tt.q.instance.prodigy.open.twilightWheelPopup((()=>{this.onWheelClose.dispatch()})).setParent(this.getRootContainer())}}};cC.WONDER_WHEEL_ID=1,cC.TWILIGHT_WHEEL_ID=2,(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],cC.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cC.prototype,"onWheelClose",void 0),cC=oC=(0,G.Cg)([(0,j.EVk)("PrizeWheel",j.YH6.ui)],cC);var dC,lC=U(31818),uC=U(40579);!function(k){k.HudButtonLabelValue="HudButtonLabelValue",k.HudButtonLabelPillColour="HudButtonLabelPillColour"}(dC||(dC={}));let fC=class extends j.uAl{constructor(){super(...arguments),this.NORMAL_FONT=12,this.LARGE_FONT=16,this.ICON_VERTICAL_OFFSET=22,this.ICON_SECONDARY_VERTICAL_OFFSET=17,this.DEFAULT_LABEL_PILL_COLOUR="#db1e75",this._type=Uv.ts.Backpack,this._style=Uv.yR.Standard,this.onExclusiveAttentionChanged=new j.HN0,this.onNotificationBadgeUpdated=new j.HN0,this._currentWidget=null,this._enabled=!0}create(){var k;super.create(),null!==(k=this.rootGameObject)&&void 0!==k||(this.rootGameObject=this.gameObject),this._broadcaster=tt.q.instance.game.broadcaster,this._labelText=this.label.findComponentInChildren(j.EYj),this._labelTimerText=this.label.findComponentInChildren(mr.U),this._broadcaster.addAppListener(jn.Y1.HUDRevampStartOperation,this.onHudOperationStarted.bind(this),this,void 0,!0),this._broadcaster.addAppListener(jn.Y1.HUDRevampEndOperation,this.onHudOperationEnded.bind(this),this,void 0,!0),this._broadcaster.addAppListener(jn.Y1.HUDRevampButtonDataUpdated,this.onNotificationDataUpdated,this),this._broadcaster.addAppListener(jn.Y1.HUDRevampButtonVisibilityRefreshRequested,this.onVisibilityRefreshRequested,this),this._broadcaster.addAppListener(jn.n8.MenuOpened,this.destroyWidget,this),this._broadcaster.addAppListener(jn.n8.FactoryMenuOpened,this.destroyWidget,this),this._broadcaster.addAppListener(jn.Y1.HUDAttentionManagerUpdated,this.processButtonAttention,this),this._hudAttentionManagerHandler=j.wa5.getActiveScene().container.get("HudAttentionHandler")}postCreate(){this.updateButton().catch(j.RQr.createHandler("HudButtonComponent: Failed to update button on postCreate"))}destroy(){j.Aq$.isDefined(this._broadcaster)&&(this._broadcaster.removeAppListener(jn.Y1.HUDRevampStartOperation,this),this._broadcaster.removeAppListener(jn.Y1.HUDRevampEndOperation,this),this._broadcaster.removeAppListener(jn.Y1.HUDRevampButtonDataUpdated,this),this._broadcaster.removeAppListener(jn.Y1.HUDRevampButtonVisibilityRefreshRequested,this),this._broadcaster.removeAppListener(jn.Y1.HUDAttentionManagerUpdated,this),this._broadcaster.removeAppListener(jn.n8.MenuOpened,this),this._broadcaster.removeAppListener(jn.n8.FactoryMenuOpened,this)),this.onNotificationBadgeUpdated.dispose(),this.onExclusiveAttentionChanged.dispose(),this.destroyWidget(),super.destroy()}onHudOperationStarted(){this.button.inputEnabled=!1}onHudOperationEnded(){this.button.inputEnabled=!0}onVisibilityRefreshRequested(){this.updateVisibility().catch(j.RQr.createHandler("HudButtonComponent: Failed to update appearance on visibility refresh"))}onNotificationDataUpdated(k){if(k!==this._type)return;const B=this._hudService.getCachedButtonData(this._type);this.updateNotificationBadge(B.notificationData),this.updateLabel(B.labelData),this.updateAlternateLabel(B.alternateLabel),this.onExclusiveAttentionChanged.dispatch(B.demandsExclusiveAttention)}setTypeSilently(k){this._type!==k&&(this._type=k)}getType(){return this._type}setStyleSilently(k){this._style!==k&&(this._style=k)}getStyle(){return this._style}updateButton(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;if(!this._type)return;const U=zv.BUTTON_DATA[this._type];if(this.rootGameObject.active=!1,this.button.onClick.removeAll(this),!j.Aq$.isDefined(U))return;const F=U.iconProvider(this._style),[$,[H,V]]=yield Promise.all([tt.q.instance.prodigy.load.assetsAsPromise(F),zv.getButtonEnabledConditionsResult(this._type)]);if(this._enabled=H,zv.BUTTON_DATA[this._type]!==U)return;this.icon.updateAsset(F),this.icon.sizeToSourceImage();const{buttonName:W,interfaceName:q,destinationName:K,saveClickInfo:z}=U.analyticsProperties;if(this.segmentProperties.buttonName=W,this.segmentProperties.interfaceName="function"==typeof q?q():null!==(k=null!=q?q:U.analyticsProperties.buttonName)&&void 0!==k?k:"",this.segmentProperties.destinationName="function"==typeof K?K():null!=K?K:"",this.segmentProperties.saveClickInfo="function"==typeof z?z():null!=z?z:"",this.button.onClick.add((()=>this.segment.sendButtonEvent()),this),(j.Aq$.isDefined(U.onClick)||j.Aq$.isDefined(this._injectedClickEvent))&&this.button.onEnabledClick.add((()=>(0,G.sH)(this,void 0,void 0,(function*(){yield this.handleButtonClick()}))),this),j.Aq$.isDefined(this._injectedClickEvent)&&this.button.onEnabledClick.add(this._injectedClickEvent,this),this.button.onClick.add(this.disableAttentionAnimation,this),this._enabled)this.lockedLabel.active=!1,this.button.onDisabledClick.removeAll(this),this.button.inputEnabled=0!==this.button.onClick.getBindingsCount();else{this.button.lockState(Ku.K.Disabled);const k=zv.getDisabledTooltipText(this._type,V),U=zv.getDisabledButtonLabelText(this._type,V);this.button.onDisabledClick.add((()=>{on.A.displayTooltipTargeted(this._reusableStandardTooltip,this._hudGameObject,{bodyText:k,arrowDirection:zv.getButtonTooltipDirection(this._style)},this.icon.GameObject)}),this),null===(B=this.gameObject.findComponentInChildren(rd))||void 0===B||B.applyFilter(),this.lockedLabel.findComponentInChildren(j.EYj).text=U,this.button.inputEnabled=!0,this.lockedLabel.active=!0}switch(this.resizeButtonToData(U),this.onNotificationDataUpdated(this._type),Nt.d.updateInjectedValues(this.gameObject,{[Uv.Kr.HudButtonEnabled]:this._enabled}),this.nameLabel.findComponent(j.EYj).text=this._localizer.getText(this._type.replace(" ","_").toUpperCase()),this.nameLabel.active=this._style===Uv.yR.PlayerHub,this._style){case Uv.yR.Liveops:break;case Uv.yR.Secondary:this.icon.tint=12747129,this.icon.GameObject.transform.setPositionY(this.ICON_SECONDARY_VERTICAL_OFFSET);break;default:this.icon.GameObject.transform.setPositionY(this.ICON_VERTICAL_OFFSET)}yield this.updateVisibility()}))}resizeButtonToData(k){var B;if(this._style===Uv.yR.Liveops)return;const U=null!==(B=k.buttonSize)&&void 0!==B?B:Uv.Cy.Normal;this.gameObject.findComponent(j.XVE).setSizeDelta(U,U)}setInjectedClickEvent(k){this._injectedClickEvent=k}updateVisibility(){return(0,G.sH)(this,void 0,void 0,(function*(){this.rootGameObject.active=yield zv.areVisibilityConditionsTrue(this._type)}))}handleButtonClick(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=zv.BUTTON_DATA[this._type];tt.q.instance.game.broadcaster.broadcast(jn.Y1.HUDRevampStartOperation);const{hudButton:U,needsAttention:F}=yield this.checkIfCurrentHudButtonNeedsAttention();try{if((F||j.Aq$.isDefined(this._currentWidget))&&j.Aq$.isDefined(U)){if(yield U.triggerAction((()=>(0,G.sH)(this,void 0,void 0,(function*(){var k;yield null===(k=B.onClick)||void 0===k?void 0:k.call(B)})))),F){const k=this._hudAttentionManagerHandler.currentHudButton;k&&this._type===(null==k?void 0:k.hudButtonType())&&tt.q.instance.game.broadcaster.broadcast(jn.Y1.CheckForHUDAttention)}}else yield null===(k=B.onClick)||void 0===k?void 0:k.call(B)}catch($){j.RQr.createHandler("HudButtonComponent: Error during HUD button callback")($)}finally{tt.q.instance.game.broadcaster.broadcast(jn.Y1.HUDRevampEndOperation)}}))}checkIfCurrentHudButtonNeedsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;if(!j.Aq$.isDefined(this._hudAttentionManagerHandler))return{hudButton:null,needsAttention:!1};const B=this._hudAttentionManagerHandler.currentHudButton;if(j.Aq$.isDefined(B)&&this._type===B.hudButtonType())return{hudButton:B,needsAttention:yield B.needsAttention()};const U=null!==(k=this._hudAttentionManagerHandler.hudButtons)&&void 0!==k?k:[];for(const F of U)if(this._type===F.hudButtonType())return{hudButton:F,needsAttention:yield F.needsAttention()};return{hudButton:null,needsAttention:!1}}))}defaultHandleButtonClick(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;yield Promise.all([null===(B=k.onClick)||void 0===B?void 0:B.call(k)]).catch(j.RQr.createHandler("Error during HUD button callback"))}))}disableAttentionAnimation(){Nt.d.updateInjectedValues(this.gameObject,{[Uv.Kr.HudAttentionRequested]:!1})}processButtonAttention(k,B,U){var F;if(k===this._type){if(this.rootGameObject.active=!0,j.Aq$.isDefined(U)){j.Aq$.isDefined(this._currentWidget)&&this.destroyWidget();const k=tt.q.instance.prodigy.gameContainer.get("d0e-64fd");Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(k,U.prefab,null!==(F=U.injectionData)&&void 0!==F?F:{},this.widgetParent).then((k=>{this._currentWidget=k})).catch(j.RQr.createHandler("Error creating a HUD widget"))}Nt.d.updateInjectedValues(this.gameObject,{[Uv.Kr.HudAttentionRequested]:B})}}updateLabel(k){var B,U;if(!this._enabled)return void(this.label.active=!1);const F=(null!==(B=zv.BUTTON_DATA[this._type].buttonSize)&&void 0!==B?B:Uv.Cy.Normal)===Uv.Cy.ExtraLarge?this.LARGE_FONT:this.NORMAL_FONT;this._labelText.fontSize=F;const G=null==k?void 0:k.labelValue;if(j.Aq$.isDefined(G)&&("string"==typeof G||G>0)){const k=this.animatedLabelToggle(G);this.label.active=!k,this.animatedCollectButton.active=k,"string"==typeof G?(this._labelText.text=G,this._labelTimerText.stopTimer()):this._labelTimerText.setCountdownTimeMS(G)}else this.label.active=!1;Nt.d.updateInjectedValues(this.gameObject,{[dC.HudButtonLabelValue]:null==k?void 0:k.labelValue,[dC.HudButtonLabelPillColour]:null!==(U=null==k?void 0:k.pillColour)&&void 0!==U?U:this.DEFAULT_LABEL_PILL_COLOUR})}animatedLabelToggle(k){return this._style===Uv.yR.Liveops&&"string"==typeof k}updateAlternateLabel(k){const B=j.Aq$.isDefined(k)&&("string"==typeof k||k>0);if(this.alternateLabel.active=B,B){this.alternateLabel.findComponentInChildren(j.EYj).text=String(k)}}updateNotificationBadge(k){var B;this.notificationBadge.GameObject.active=!1,this._enabled&&(j.Aq$.isDefined(k)&&("string"==typeof k?""===k?this.notificationBadge.updateEmptyNotificationBadge(!0):this.notificationBadge.updateNonNumberedNotificationBadge(!0):k>0&&this.notificationBadge.updateNumberedNotificationBadge(!0,k)),null===(B=this.onNotificationBadgeUpdated)||void 0===B||B.dispatch())}hasActiveNotificationBadge(){return this.notificationBadge.GameObject.active}destroyWidget(){j.Aq$.isDefined(this._currentWidget)&&!this._currentWidget.isDestroyed&&this._currentWidget.destroy(),this._currentWidget=null}};(0,G.Cg)([(0,j.gfw)(Uv.ts),(0,G.Sn)("design:type",String)],fC.prototype,"_type",void 0),(0,G.Cg)([(0,j.gfw)(Uv.yR),(0,G.Sn)("design:type",Number)],fC.prototype,"_style",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],fC.prototype,"icon",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],fC.prototype,"button",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fC.prototype,"label",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fC.prototype,"animatedCollectButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fC.prototype,"alternateLabel",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fC.prototype,"nameLabel",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fC.prototype,"lockedLabel",void 0),(0,G.Cg)([(0,j.MnK)(fg.e),(0,G.Sn)("design:type",fg.e)],fC.prototype,"notificationBadge",void 0),(0,G.Cg)([(0,j.MnK)(kf),(0,G.Sn)("design:type",kf)],fC.prototype,"segment",void 0),(0,G.Cg)([(0,j.MnK)(Xs),(0,G.Sn)("design:type",Xs)],fC.prototype,"segmentProperties",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fC.prototype,"widgetParent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fC.prototype,"tooltipTarget",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],fC.prototype,"onExclusiveAttentionChanged",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fC.prototype,"rootGameObject",void 0),(0,G.Cg)([(0,j.Cdj)(Uv.uR.HudGameObject),(0,G.Sn)("design:type",j._mx)],fC.prototype,"_hudGameObject",void 0),(0,G.Cg)([(0,j.Cdj)(Uv.uR.HudRevampReusableStandardTooltip),(0,G.Sn)("design:type",lC.tX)],fC.prototype,"_reusableStandardTooltip",void 0),(0,G.Cg)([(0,Gi.b)("cc9-a3f0"),(0,G.Sn)("design:type",uC.W)],fC.prototype,"_hudService",void 0),(0,G.Cg)([(0,Gi.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],fC.prototype,"_localizer",void 0),fC=(0,G.Cg)([(0,j.EVk)("HudButton")],fC);var bC=U(15819),pC=U(28344);const vC=["PLAYER_INFO_WIDGET","PET_ZONE_WIDGET","ARCHIVES_WIDGET","MORPH_MARBLE_WIDGET"];let gC=class extends j.uAl{constructor(){super(...arguments),this._activeWidgets=new Set}create(){super.create(),this._widgetMap={PET_ZONE_WIDGET:this._petZoneWidget,MORPH_MARBLE_WIDGET:this._morphMarbleWidget,PLAYER_INFO_WIDGET:this._playerInfoWidget,ARCHIVES_WIDGET:this._archivesWidget};const k=tt.q.instance.prodigy.world,B=k.getCurrentZone(),U=k.getCurrentMapTag(),F=k.getCurrentMapObject(),G=(0,Bt.G)(pC.y).enabled;if(this.setPetZoneWidget(!G&&Qt.J.isCoreZone(B)&&"Titan"!==U),B===Ft.A_.ARCHIVES&&F instanceof bC.M){const k=F.hudCounterContainer;j.lx6.make(this._widgetMap.ARCHIVES_WIDGET,k),this.setArchivesWidget(!0)}this.setPlayerInfoWidget(!0)}setPetZoneWidget(k){k&&tt.q.instance.prodigy.world.getCurrentZoneObject().setUpPetsInZoneButton(this._petZoneWidget),this.updateWidget("PET_ZONE_WIDGET",k)}setMorphMarbleWidget(k){this.updateWidget("MORPH_MARBLE_WIDGET",k)}setPlayerInfoWidget(k){(0,Bt.G)(pm.q).enabled?this.updateWidget("PLAYER_INFO_WIDGET",k):this.updateWidget("PLAYER_INFO_WIDGET",!1)}setArchivesWidget(k){this.updateWidget("ARCHIVES_WIDGET",k)}updateWidget(k,B){B?this._activeWidgets.add(k):this._activeWidgets.delete(k);let U=0;for(const F of vC){if(!j.Aq$.isDefined(this._widgetMap[F]))continue;let k=this._activeWidgets.has(F);U>=2&&(k=!1),this._widgetMap[F].active=k,k&&U++}}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gC.prototype,"_petZoneWidget",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gC.prototype,"_morphMarbleWidget",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gC.prototype,"_playerInfoWidget",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gC.prototype,"_archivesWidget",void 0),gC=(0,G.Cg)([(0,j.EVk)("HudContextManager",W.Y.uiHudManager)],gC);var mC=U(78407);let yC=class extends j.uAl{constructor(){super(...arguments),this.maxButtons=5,this._onLiveOpsHudButtonsLoaded=new j.HN0}create(){this.instantiateButtons().catch(j.RQr.createHandler("HUD: Error creating liveops buttons"))}instantiateButtons(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._hudDataProvider.getHudData(),B=(yield Promise.all(k.liveopsButtonData.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return(yield zv.areVisibilityConditionsTrue(k.type))?k:void 0})))))).filter(Boolean),U=[],F=Math.min(B.length,this.maxButtons);for(let G=0;G(0,G.sH)(this,void 0,void 0,(function*(){return(yield zv.areVisibilityConditionsTrue(k))?k:void 0})))))).filter(Boolean),F=[];for(const G of U)F.push({HUD_REVAMP_BUTTON_TYPE:G,HUD_REVAMP_BUTTON_STYLE:Uv.yR.PlayerHub,HUD_REVAMP_BUTTON_CLICK_EVENT:()=>this.hideMenu()});yield this._prefabSpawner.spawnDefaultPrefabsFromDataArray(F),this._spawnedHudButtons=this._prefabSpawner.spawnedPrefabs.map((k=>k.findComponent(fC)));for(const G of this._spawnedHudButtons)G.onNotificationBadgeUpdated.add((()=>this.onChildNotificationBadgeUpdate()));this.onChildNotificationBadgeUpdate()}))}openMenu(){this._segment.featureCommon.sendInterfaceEvent({interfaceName:"hamburger_menu",interfaceType:ui.Wm.Window,originType:ui.$N.ButtonClick}),this._hudMenu.active=!0}hideMenu(){this._hudMenu.active=!1}onChildNotificationBadgeUpdate(){let k=!1;for(const B of this._spawnedHudButtons)if(B.hasActiveNotificationBadge()){k=!0;break}this._hamburgerButton.updateNotificationBadge(k?"":void 0)}};(0,G.Cg)([(0,Gi.b)("446-72a7"),(0,G.Sn)("design:type",mC._)],_C.prototype,"_hudDataProvider",void 0),(0,G.Cg)([(0,Gi.b)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],_C.prototype,"_segment",void 0),(0,G.Cg)([(0,j.MnK)(Ru.h),(0,G.Sn)("design:type",Ru.h)],_C.prototype,"_prefabSpawner",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_C.prototype,"_hudMenu",void 0),(0,G.Cg)([(0,j.MnK)(fC),(0,G.Sn)("design:type",fC)],_C.prototype,"_hamburgerButton",void 0),_C=(0,G.Cg)([(0,j.EVk)("HudSecondaryMenu")],_C);let EC=class extends j.uAl{create(){super.create(),this.updateText()}setItem(k,B){this._itemType=k,this._itemID=B,this.updateText()}updateText(){var k;if(!this._text||!this._itemID||!this._itemType)return;(null===(k=Yt.t.getItem(this._itemType,this._itemID))||void 0===k?void 0:k.data)||j.VyI.log(`Invalid or missing item data found for itemID ${this._itemID} of type ${this._itemType}`,j.$bb.Warning),this._text.text=(0,ms.k)(`${this._itemType}_${this._itemID}_FLAVORTEXT`.toUpperCase())}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],EC.prototype,"_text",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],EC.prototype,"_itemType",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],EC.prototype,"_itemID",void 0),EC=(0,G.Cg)([(0,j.EVk)("ItemFlavorText",W.Y.ui)],EC);U(57324),U(98762);var wC,TC=U(6719);let SC=wC=class extends j.uAl{constructor(){super(...arguments),this._gridAssetsData=[],this._fillGridWithEmptyCells=!0,this._onGridAssetsAdded=new j.HN0,this._waitForAllLoadedToActivate=!1}addGridAssets(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){var F,G;this._gridAssetsData=k,this._maxAssetsToShow=null!==(F=null!=U?U:this._maxAssetsToShow)&&void 0!==F?F:k.length;const j=this._gridAssetsData.slice(0,this._maxAssetsToShow),$=[];for(let k=0;k0,"Items per page must be greater than 0"),this._itemsPerPage=k,this.updateChangePageComponent()}setData(k){(0,ut.v)(!!k,"Data must be a valid array"),this._data=k,this.updateChangePageComponent()}getCurrentPageItems(){return this._currentPage}updateChangePageComponent(){this._changePageButtons.setMaximumPage(Math.max(1,Math.ceil(this._data.length/this._itemsPerPage))),this.updateCurrentPageItems()}updateCurrentPageItems(){const k=this._itemsPerPage*(this._changePageButtons.currentPage-1);this._currentPage=this._data.slice(k,k+this._itemsPerPage),this._onPageItemsChanged.dispatch()}}let OC=class extends j.uAl{constructor(){super(...arguments),this._gridElements=[]}create(){var k;super.create(),0!==this._gridElements.length||(null===(k=this._gridLayout)||void 0===k?void 0:k.isEmpty())||this._gridLayout.GameObject.children.forEach((k=>this._gridElements.push(k))),this._changePageButtons&&this._gridElements.length>0&&(this._dataPaginator=new CC(this._changePageButtons,this._gridViewData,this._gridElements.length),this._dataPaginator.onPageItemsChanged.add(this.updateGridElements,this))}destroy(){var k;null===(k=this._dataPaginator)||void 0===k||k.destroy(),super.destroy()}updateGridElements(){if(this._dataPaginator){const k=this._gridElements.length,B=this._dataPaginator.getCurrentPageItems(),U=B.length;for(let F=0;Fthis.validateComponent(k.component,k.name)))}validateComponent(k,B){k||j.VyI.log(`ClassCodeSection: ${B} is required but not defined`,j.$bb.Error)}destroy(){var k,B,U,F,G;this._onClassCodeSuccess.dispose(),this._onClassCodeTextChanged.dispose(),null===(k=this.saveScrollViewButton)||void 0===k||k.onClick.removeAll(this),null===(B=this.changeScrollViewButton)||void 0===B||B.onClick.removeAll(this),null===(U=this.editSaveScrollViewButton)||void 0===U||U.onClick.removeAll(this),null===(F=this.editCancelScrollViewButton)||void 0===F||F.onClick.removeAll(this),null===(G=this.learnMoreScrollViewButton)||void 0===G||G.onClick.removeAll(this),super.destroy()}setInputVisibility(k){document.getElementById("external-ui").style.setProperty("display",k?"unset":"none")}setUpClassCodeInput(){this._classCodeInput.enablePerKeyEvents(!0),this._classCodeInput.onTextChanged.add(this.classCodeTextChanged,this),this._classCodeInput.onClear.add(this.classCodeTextChanged,this)}setUpButtons(){switch(this._operationMode){case RC.ScrollView:this.changeScrollViewButton.onClick.add(this.onChangeClicked,this),this.editCancelScrollViewButton.onClick.add(this.onEditCancelClicked,this),this.learnMoreScrollViewButton.onClick.add(this.onLearnMoreClicked,this);break;case RC.Simple:this.simpleModeLearnMoreButton.onEnabledClick.add(this.onLearnMoreClicked.bind(this))}this.disableSaveButtons()}classCodeTextChanged(){const k=this.classCodeInput.text,B=xv.b.reformatClassCode(k);B!==k&&(this.classCodeInput.text=B),this._onClassCodeTextChanged.dispatch(B)}setClassCode(k){k?tt.q.instance.prodigy.education.loadAndInitEducationData().then((()=>{this.validStatusContainer.active=!1,this._operationMode!==RC.Simple&&this.changeClassCodeButtonView(),on.A.displayToolTipAuto(null,null,{bodyText:tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("CLASS_CODE_SAVED"),xPosition:635,yPosition:100})})).then((()=>(0,G.sH)(this,void 0,void 0,(function*(){return Ad.d.sendAttachClassCodeQuestEvent()})))).then((()=>{this._onClassCodeSuccess.dispatch()})).catch((()=>{this.failedValidationView(),this.enableSaveButtons()})):this.failedValidationView()}onChangeClicked(){tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.editClassCodeButtonView()}onEditCancelClicked(){tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.changeClassCodeButtonView()}onLearnMoreClicked(){tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!1),tt.q.instance.prodigy.open.learnMore("HEY_TEACHERS","CLASS_CODE_LEARN_MORE_HEADER","CLASS_CODE_LEARN_MORE_BODY",(()=>{this.setInputVisibility(!0)}),void 0,this.GameObject.layer!==jh.E.Default?this.GameObject.layer:void 0)}enableSaveButtons(){switch(this._operationMode){case RC.ScrollView:this.saveScrollViewButton.inputEnabled=!0,this.editSaveScrollViewButton.inputEnabled=!0,this.saveScrollViewButton.currentState=Ku.K.Up,this.editSaveScrollViewButton.currentState=Ku.K.Up;break;case RC.Simple:this.simpleModeSaveButton.unlockState()}}disableSaveButtons(){switch(this._operationMode){case RC.ScrollView:this.saveScrollViewButton.inputEnabled=!1,this.editSaveScrollViewButton.inputEnabled=!1,this.saveScrollViewButton.currentState=Ku.K.Disabled,this.editSaveScrollViewButton.currentState=Ku.K.Disabled;break;case RC.Simple:this.simpleModeSaveButton.lockState(Ku.K.Disabled)}}successfulValidationView(){this.enableSaveButtons(),this.classCodeInput.setInError(!1),this.validStatusContainer.active=!0,this.invalidStatusContainer.active=!1,this.duplicateClassStatusContainer&&(this.duplicateClassStatusContainer.active=!1),this.classCodeInput.setInError(!1)}failedValidationView(){this.disableSaveButtons(),this.classCodeInput.setInError(!0),this.validStatusContainer.active=!1,this.invalidStatusContainer.active=!0,this.duplicateClassStatusContainer&&(this.duplicateClassStatusContainer.active=!1)}neutralValidationView(){this.disableSaveButtons(),this.classCodeInput.setInError(!1),this.validStatusContainer.active=!1,this.invalidStatusContainer.active=!1,this.duplicateClassStatusContainer&&(this.duplicateClassStatusContainer.active=!1)}duplicateClassValidationView(){this.disableSaveButtons(),this.classCodeInput.setInError(!0),this.validStatusContainer.active=!1,this.invalidStatusContainer.active=!1,this.duplicateClassStatusContainer&&(this.duplicateClassStatusContainer.active=!0)}standardButtonView(){switch(this._operationMode){case RC.ScrollView:this.saveScrollViewButton.GameObject.active=!0,this.changeScrollViewButton.GameObject.active=!1,this.editClassCodeContainer.active=!1,this.inClassStatusContainer.active=!1;break;case RC.Simple:this.simpleModeSaveButton.GameObject.active=!0}this.classCodeInput.setVisible(this.GameObject.activeInHierarchy),this.classCodeInput._input.blur(),this.classCodeInput.text="",this.classCodeInput.setInError(!1),this.classCodeText.GameObject.active=!0,this.initialText.GameObject.active=!0}changeClassCodeButtonView(){this.saveScrollViewButton.GameObject.active=!1,this.changeScrollViewButton.GameObject.active=!0,this.editClassCodeContainer.active=!1,this.classCodeInput.setVisible(!1),this.classCodeInput._input.blur(),this.invalidStatusContainer.active=!1,this.duplicateClassStatusContainer&&(this.duplicateClassStatusContainer.active=!1),this.validStatusContainer.active=!1,this.inClassStatusContainer.active=!0,this.classCodeText.GameObject.active=!1,this.initialText.GameObject.active=!1}editClassCodeButtonView(){this.classCodeInput.setDisabled(!1),this.saveScrollViewButton.GameObject.active=!1,this.changeScrollViewButton.GameObject.active=!1,this.editClassCodeContainer.active=!0,this.classCodeInput.setVisible(!0),this.classCodeInput._input.focus(),this.classCodeInput.text="",this.classCodeInput.setInError(!1),this.inClassStatusContainer.active=!1,this.classCodeText.GameObject.active=!0,this.initialText.GameObject.active=!0}};MC.DEBOUNCE_MS=500,(0,G.Cg)([(0,j.gfw)(RC),(0,G.Sn)("design:type",Number)],MC.prototype,"_operationMode",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],MC.prototype,"_changeScrollViewButton",void 0),(0,G.Cg)([(0,j.MnK)(kt.S),(0,G.Sn)("design:type",kt.S)],MC.prototype,"_classCodeInput",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],MC.prototype,"_classCodeText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],MC.prototype,"_editClassCodeContainer",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],MC.prototype,"_editCancelScrollViewButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],MC.prototype,"_editSaveScrollViewButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],MC.prototype,"_inClassStatusContainer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],MC.prototype,"_initialText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],MC.prototype,"_invalidStatusContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],MC.prototype,"_duplicateClassStatusContainer",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],MC.prototype,"_learnMoreScrollViewButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],MC.prototype,"simpleModeLearnMoreButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],MC.prototype,"_saveScrollViewButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],MC.prototype,"simpleModeSaveButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],MC.prototype,"_validStatusContainer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],MC.prototype,"_onClassCodeSuccess",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],MC.prototype,"_onClassCodeTextChanged",void 0),(0,G.Cg)([(0,PC.sg)(MC.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],MC.prototype,"onChangeClicked",null),(0,G.Cg)([(0,PC.sg)(MC.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],MC.prototype,"onEditCancelClicked",null),(0,G.Cg)([(0,PC.sg)(MC.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],MC.prototype,"onLearnMoreClicked",null),MC=(0,G.Cg)([(0,j.EVk)("ClassCodeOptionsSection")],MC);let NC=class extends j.uAl{constructor(){super(...arguments),this.localization=null,this._autoClick={}}create(){super.create(),this.localization=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),this.setUpButtons()}setUpButtons(){this._linkButton.onClick.add(this.onLinkParentAccountClicked.bind(this))}setInputVisibility(k){document.getElementById("external-ui").style.setProperty("display",k?"unset":"none")}onLinkParentAccountClicked(){tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!1);tt.q.instance.prodigy.open.parentAttachMenu((()=>{this.setInputVisibility(!0)})).onPrefabLoaded.addOnce((k=>k.setLayer(jh.E.Result,!0)))}};var xC;NC.DEBOUNCE_MS=500,(0,G.Cg)([(0,j.MnK)(j.Sjx),(0,G.Sn)("design:type",j.Sjx)],NC.prototype,"_linkButton",void 0),(0,G.Cg)([(0,PC.sg)(NC.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],NC.prototype,"onLinkParentAccountClicked",null),NC=(0,G.Cg)([(0,j.EVk)("CompletedParentSection")],NC);let LC=xC=class extends j.uAl{constructor(){super(...arguments),this._serverIcons=[]}setServerData(k){this.setupServerFill(k.full),k.meta&&this.setupServerImage(k.meta)}setupServerFill(k){let B=xC.NORMAL_TINT;k>=xC.WARNING_MAX?B=xC.DANGER_TINT:k>xC.NORMAL_MAX&&(B=xC.WARNING_TINT);const U=100/this._serverIcons.length;for(let F=0;F0&&k>=F*U;G.active=$,$&&(G.findComponent(j.vYh).getRootContainer().tint=B)}}setupServerImage(k){var B;let U;if(null===(B=this._sprite)||void 0===B||B.destroy(),j.Aq$.isDefined(k.ID)&&"pet"===k.type){const B=Yt.t.getItem("pet",k.ID);("spine"===ct.get(B,"metadata.assets.default.type",null)||ct.get(B,"metadata.assets.spine",!1))&&(U={x:-.06,y:.05})}this._sprite=tt.q.instance.prodigy.icon.createFromData(k,0,0,U,(k=>{this._serverImage.setTexture(k.texture)})),this._serverImage.setTexture(this._sprite.texture)}destroy(){var k;null===(k=this._sprite)||void 0===k||k.destroy(),super.destroy()}};LC.NORMAL_MAX=80,LC.WARNING_MAX=95,LC.NORMAL_TINT=8111468,LC.WARNING_TINT=15194464,LC.DANGER_TINT=14307665,(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],LC.prototype,"_serverIcons",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],LC.prototype,"_serverImage",void 0),LC=xC=(0,G.Cg)([(0,j.EVk)("WorldInfoCard")],LC);let kC=class extends j.uAl{create(){super.create();const k=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this._worldInfoText.text=k.getText("WORLD_INFO_PLAY_TOGETHER"),this._serverNameLabel.text=k.getText("WORLD_INFO_YOU_ARE_IN"),this._worldInfoTitle.text=k.getText("WORLD_INFO_TITLE"),this._offlineText1.text=k.getText("WORLD_OFFLINE_TEXT_1"),this._offlineText2.text=k.getText("WORLD_OFFLINE_TEXT_2"),this._offlineView.active=!1,this._onlineView.active=!1}setServerData(k){k.full=Math.max(1,k.full);const B=j.Aq$.isDefined(k);B&&(this._serverNameText.text=k.name,this._infoCard.setServerData(k)),this._onlineView.active=B,this._offlineView.active=!B}destroy(){super.destroy()}};(0,G.Cg)([(0,j.MnK)(LC),(0,G.Sn)("design:type",LC)],kC.prototype,"_infoCard",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],kC.prototype,"_worldInfoTitle",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],kC.prototype,"_serverNameText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],kC.prototype,"_worldInfoText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],kC.prototype,"_serverNameLabel",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],kC.prototype,"_offlineText1",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],kC.prototype,"_offlineText2",void 0),(0,G.Cg)([(0,j.ERr)(),(0,j.Lr6)(0),(0,G.Sn)("design:type",j._mx)],kC.prototype,"_offlineView",void 0),(0,G.Cg)([(0,j.ERr)(),(0,j.Lr6)(0),(0,G.Sn)("design:type",j._mx)],kC.prototype,"_onlineView",void 0),kC=(0,G.Cg)([(0,j.EVk)("WorldInfo")],kC);let BC=class extends j.uAl{postCreate(){var k,B,U;super.postCreate();const F=null===(B=null===(k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0"))||void 0===k?void 0:k.player)||void 0===B?void 0:B.world;F&&(null===(U=this.worldInfoSelection)||void 0===U||U.setServerData(F))}};(0,G.Cg)([(0,j.MnK)(kC),(0,G.Sn)("design:type",kC)],BC.prototype,"worldInfoSelection",void 0),BC=(0,G.Cg)([(0,mn.injectable)(),(0,j.EVk)("CurrentWorld")],BC);var UC=U(99429),FC=U(2272);let GC=class extends j.uAl{constructor(){super(...arguments),this._linkParentScrollViewButton=null,this._noRewardsScrollViewButton=null,this.localization=null}get linkParentScrollViewButton(){return this._linkParentScrollViewButton}get noRewardsScrollViewButton(){return this._noRewardsScrollViewButton}create(){super.create(),this.localization=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),this.setUpButtons()}destroy(){super.destroy(),this.linkParentScrollViewButton.onClick.removeAll(this),this.noRewardsScrollViewButton.onClick.removeAll(this)}setUpButtons(){this.linkParentScrollViewButton.onClick.add(this.onLinkParentAccountClicked,this),this.noRewardsScrollViewButton.onClick.add(this.onNoRewardClicked,this)}setInputVisibility(k){document.getElementById("external-ui").style.setProperty("display",k?"unset":"none")}linkParent(k){const B=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=Qt.J.getEnvironmentURL(),F=()=>{tt.q.instance.prodigy.gameContainer.get("c97-bd0d").logout()},G=()=>{this.setInputVisibility(!0)};B.isPlayingAtSchool()?tt.q.instance.prodigy.open.parentalLoginPopup():tt.q.instance.prodigy.open.confirmationDialog(new KE.k(this.localization.getText("PARENTAL_POPUP_LOGIN"),F,this.localization.getText("BUTTON_STAY_TEAM"),G,{atlas:Ve._.Ui_store_json,name:"icon-large-exclamation"},FC.E.Small,UC.K.CONFIRM_WIDTH,this.localization.getText("LINK_PARENT_NO_REWARDS"),this.localization.getText("PARENT_LINK_POST_CLICK"))),vp.I.openWebsite(`${U}/#start-now?usertype=parent&utm_source=student-referral&utm_medium=register-prompt`)}onLinkParentAccountClicked(){tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!1);tt.q.instance.prodigy.open.parentAttachMenu((()=>{this.setInputVisibility(!0)}),Is.k.LinkParent).onPrefabLoaded.addOnce((k=>k.setLayer(jh.E.Result,!0)))}onNoRewardClicked(){tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!1);tt.q.instance.prodigy.open.confirmationDialog(new KE.k(this.localization.getText("PARENTAL_POPUP_LOGIN"),(()=>{tt.q.instance.prodigy.gameContainer.get("c97-bd0d").logout()}),this.localization.getText("BUTTON_STAY_TEAM"),(()=>{this.setInputVisibility(!0)}),{atlas:Ve._.Ui_store_json,name:"icon-large-exclamation"},FC.E.Small,UC.K.CONFIRM_WIDTH,this.localization.getText("LINK_PARENT_NO_REWARDS"),this.localization.getText("PARENT_LINK_POST_CLICK")))}};GC.DEBOUNCE_MS=500,(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],GC.prototype,"_linkParentScrollViewButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],GC.prototype,"_noRewardsScrollViewButton",void 0),(0,G.Cg)([(0,PC.sg)(GC.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],GC.prototype,"onLinkParentAccountClicked",null),(0,G.Cg)([(0,PC.sg)(GC.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],GC.prototype,"onNoRewardClicked",null),GC=(0,G.Cg)([(0,j.EVk)("ParentSection")],GC);let jC=class extends j.uAl{constructor(){super(...arguments),this.fullscreenTitle=null,this.fullscreenToggle=null}create(){super.create(),this._canGoFullscreen=!j.o5U.isMobile()&&Gs.pF.isFullscreenSupported(),this.setUpButtons();const k=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this.fullscreenTitle.text=k.getText("SCREEN_SIZE_TITLE"),this.fullscreenToggle.setText(k.getText("FULLSCREEN_LABEL"))}setUpButtons(){this._canGoFullscreen&&this.fullscreenToggle.onClick.add(this.onFullscreenToggleClicked,this)}onFullscreenToggleClicked(){this.fullscreenToggle.isDisabled()||(tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.toggleFullscreen())}toggleFullscreen(){tt.q.instance.prodigy.game.scale.isFullScreen?this.exitFullscreen():this.enterFullscreen()}enterFullscreen(){tt.q.instance.prodigy.game.scale.fullScreenScaleMode=q_.y.EXACT_FIT,tt.q.instance.prodigy.game.scale.fullScreenTarget=document.body,tt.q.instance.prodigy.game.scale.startFullScreen().catch(j.RQr.createHandler("Failed to start fullscreen."))}exitFullscreen(){tt.q.instance.prodigy.game.scale.stopFullScreen()}isFullscreen(){return tt.q.instance.prodigy.game.scale.isFullScreen}};jC.DEBOUNCE_MS=500,(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],jC.prototype,"fullscreenTitle",void 0),(0,G.Cg)([(0,j.MnK)(Q),(0,G.Sn)("design:type",Q)],jC.prototype,"fullscreenToggle",void 0),(0,G.Cg)([(0,PC.sg)(jC.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],jC.prototype,"onFullscreenToggleClicked",null),jC=(0,G.Cg)([(0,j.EVk)("ScreenSizeSection")],jC);var $C=U(93690);let HC=class extends j.uAl{constructor(){super(...arguments),this.tabs=[],this.tabContents=[],this.defaultSelectedTabIndex=0,this._selectedTabIndex=0}set selectedTabIndex(k){this._selectedTabIndex=k,this.updateTabs()}get selectedTabIndex(){return this._selectedTabIndex}postCreate(){this.tabs.forEach(((k,B)=>{k.onClick.add((()=>{this.selectedTabIndex=B}),this);const U=k.renderComponent.getRootContainer();U&&$C.p.patchPhaserInteraction(U,!0)})),this.selectedTabIndex=this.defaultSelectedTabIndex}destroy(){super.destroy(),this.tabs.forEach((k=>{k.onClick.removeAll(this)}))}updateTabs(){for(let k=0;k=k.length)return void this.onMissingSpell.dispatch();this.onFilledSpell.dispatch();const B=Yt.t.getItem("spellV2",k[this.spellIndex]),U=B.data,F=B.metadata,G=this.isOneUseSpell(U.cooldown)?U.warmup:U.cooldown,$=this.isOneUseSpell(U.cooldown)?U.cooldown:G-U.cooldown,H=yield this.loadIcon(F),V={SPELLCARD_COLOR_STATE:U.element,SPELLCARD_COOLDOWN_BARS_TOTAL:G,SPELLCARD_COOLDOWN_BARS_CURRENT:$,SPELLCARD_COOLDOWN_1:this.getCooldownBarColor($,1,U.element),SPELLCARD_COOLDOWN_2:this.getCooldownBarColor($,2,U.element),SPELLCARD_COOLDOWN_3:this.getCooldownBarColor($,3,U.element),SPELLCARD_CENTRE_ICON:H,SPELLCARD_MINI_ICON:[Ve._.Ui_battle_revamp_json,`icon-mini-element-${U.element}`]};this.GameObject&&!this.GameObject.isDestroyed&&Nt.d.updateInjectedValues(this.GameObject,V,!1)}))}loadIcon(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=this.getCentreIcon(k);return new Promise((k=>{tt.q.instance.prodigy.load.assets([B],(()=>{k(B)}))}))}))}getCentreIcon(k){var B,U;return(null===(U=null===(B=k.assets)||void 0===B?void 0:B.icon)||void 0===U?void 0:U.assetKey)?ps.q[xt.$.capitalizeFirstLetter(k.assets.icon.assetKey)]:ps.q.Spell_fire_fireball_single}isOneUseSpell(k){return-1===k}getCooldownBarColor(k,B,U){let F="cooldown";return this.isOneUseSpell(k)?F="disabled":k>=B&&(F=U===mn.EElementType.Astral?`${mn.EElementType.Astral}${B}`:U),hu.k[xt.$.capitalizeFirstLetter(F)]}destroy(){this.onMissingSpell.dispose(),this.onFilledSpell.dispose(),tt.q.instance.prodigy.game.broadcaster.removeAppListener(jn.ig.Evolved,this),super.destroy()}};(0,G.Cg)([(0,j.Cdj)(hs.hi.PetCreatureData),(0,G.Sn)("design:type",Object)],WC.prototype,"_petData",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.YLv)("Index of the spell this component represents"),(0,G.Sn)("design:type",Number)],WC.prototype,"spellIndex",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Dispatched if spell slot is empty"),(0,G.Sn)("design:type",j.HN0)],WC.prototype,"onMissingSpell",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Dispatched if spell slot is empty"),(0,G.Sn)("design:type",j.HN0)],WC.prototype,"onFilledSpell",void 0),WC=(0,G.Cg)([(0,j.EVk)("SpellCardData",W.Y.uiPet)],WC);var qC=U(55734),KC=U(17710);let zC=class extends Fi.z{constructor(){super(...arguments),this.spellIndex=-1}create(){super.create(),tt.q.instance.prodigy.game.broadcaster.addAppListener(jn.ig.Evolved,this.onEvolvePet.bind(this),this),tt.q.instance.prodigy.game.broadcaster.addAppListener(jn.ig.GearUpdate,this.onGearEquip.bind(this),this),tt.q.instance.prodigy.game.broadcaster.addAppListener(jn.ig.AnyLevelUp,this.onLevelPet.bind(this),this),this.bindContext()}bindContext(){super.bindContext(),this.fillTooltip()}onEvolvePet(){this.bindContext()}onGearEquip(){this.bindContext()}onLevelPet(){this.bindContext()}fillTooltip(k=!1){if(!this.GameObject)return;if(this.spellIndex<0)return void j.VyI.log("SpellIndex unset or invalid.",j.$bb.Error);const B=new qC.R(tt.q.instance.game,this._petData);let U;if(k)U=B.getAvailableSpells(B.currentMaxLevel);else if(U=B.getAvailableSpells(),this.spellIndex>=U.length)return;const F=Yt.t.getItem("spellV2",U[this.spellIndex]).data,G=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getGrowthBattleStats(this._petData),$=KC.D.getStatusEffectInjectedValues(F);td.I.getStatsOfEquippedGearForPet(this._petData.gear).then((k=>{for(const B in k)"number"==typeof G[B]&&"number"==typeof k[B]&&(G[B]+=k[B])})).catch(j.RQr.createHandler("Error when adding pet gear.")).finally((()=>{const k=Object.assign({TOOLTIP_IS_IN_COOLDOWN:!1,TOOLTIP_ELEMENT:F.element,TOOLTIP_NAME:F.name,TOOLTIP_POWER:this.getPower(G.power,this._petData.level,F),TOOLTIP_ACCURACY:this.getCasterAccuracy(G.speed,this._petData.level,F),TOOLTIP_COOLDOWN:this.getCooldown(F),TOOLTIP_SELECTED:!0},$);Nt.d.updateInjectedValues(this.GameObject,k,!1)}))}getPower(k,B,U){var F;const G=null===(F=U.flags)||void 0===F?void 0:F.find((k=>k.flag===mn.ESpellFlag.ChangeHp)),j=G?G.flagValue:this._spellLevelBonusConstants.getSpellPower({casterValue:k,spellBaseValue:U.damage,upgradeType:U.upgradeType,level:B});return this._spellLevelBonusConstants.getDisplaySpellPower(j,!!G).toString()}getCasterAccuracy(k,B,U){const F=this._spellLevelBonusConstants.getSpellSpeed({casterValue:k,spellBaseValue:U.accuracySpeedBonus,upgradeType:U.upgradeType,level:B});return this._spellLevelBonusConstants.getDisplaySpellAccuracy(F)}determineAccuracyTier(k){return k<.7?"SPELL_ACCURACY_TIER_4":k<.85?"SPELL_ACCURACY_TIER_3":k<1?"SPELL_ACCURACY_TIER_2":"SPELL_ACCURACY_TIER_1"}getCooldown(k){const B=this.getInjectedValue(j.$Bt.LocalizationService);let U;return U=k.cooldown<0?B.getText("SPELL_COOLDOWN_NEVER"):0===k.cooldown?B.getText("SPELL_COOLDOWN_NONE"):`${k.cooldown}`,U}destroy(){super.destroy(),tt.q.instance.prodigy.game.broadcaster.removeAppListener(jn.ig.Evolved,this)}};(0,G.Cg)([(0,j.Cdj)(hs.hi.PetCreatureData),(0,G.Sn)("design:type",Object)],zC.prototype,"_petData",void 0),(0,G.Cg)([(0,Gi.b)("98d-7b90"),(0,G.Sn)("design:type",mn.SpellLevelBonusConstants)],zC.prototype,"_spellLevelBonusConstants",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.YLv)("Index of the spell this component represents"),(0,G.Sn)("design:type",Number)],zC.prototype,"spellIndex",void 0),zC=(0,G.Cg)([(0,j.EVk)("SpellTooltipData",W.Y.uiPet)],zC);U(56345);let YC=class extends X.B{constructor(){super(...arguments),this._titleWhite=null,this._titleGrey=null,this._selectedGraphic=null}updateContentView(k){this._titleWhite.text=k.title,this._titleGrey.text=k.title,this._titleWhite.GameObject.active=!1,this._titleGrey.GameObject.active=!0,this._selectedGraphic.active=!1,this.onClick.add(((B=!0)=>{this._selectedGraphic.active=!0,this._titleWhite.GameObject.active=!0,this._titleGrey.GameObject.active=!1,k.onClick(this._selectedGraphic,B,(()=>{this._titleWhite.GameObject.active=!1,this._titleGrey.GameObject.active=!0}))})),k.selected&&this.onClick.dispatch(!1)}};(0,G.Cg)([(0,j.x4W)("titleWhite"),(0,G.Sn)("design:type",j.EYj)],YC.prototype,"_titleWhite",void 0),(0,G.Cg)([(0,j.x4W)("titleGrey"),(0,G.Sn)("design:type",j.EYj)],YC.prototype,"_titleGrey",void 0),(0,G.Cg)([(0,j.x4W)("selectedGraphic"),(0,G.Sn)("design:type",j._mx)],YC.prototype,"_selectedGraphic",void 0),YC=(0,G.Cg)([(0,j.EVk)("RegistrationCellPrefab")],YC);let QC=class extends Z.C{constructor(){super(...arguments),this._title=null,this._singleRow=null,this._doubleRow=null,this._tripleRow=null,this._numberOfColumns=3}updateContentView(k){this._title.text=k.title;const B=k.cells.length/this._numberOfColumns;this._singleRow.active=B<=1,this._doubleRow.active=B<=2&&B>1,this._tripleRow.active=B<=3&&B>2}};(0,G.Cg)([(0,j.x4W)("title"),(0,G.Sn)("design:type",j.EYj)],QC.prototype,"_title",void 0),(0,G.Cg)([(0,j.x4W)("singleRow"),(0,G.Sn)("design:type",j._mx)],QC.prototype,"_singleRow",void 0),(0,G.Cg)([(0,j.x4W)("doubleRow"),(0,G.Sn)("design:type",j._mx)],QC.prototype,"_doubleRow",void 0),(0,G.Cg)([(0,j.x4W)("tripleRow"),(0,G.Sn)("design:type",j._mx)],QC.prototype,"_tripleRow",void 0),QC=(0,G.Cg)([(0,j.EVk)("RegistrationSectionPrefab")],QC);let XC=class extends j.uAl{constructor(){super(...arguments),this._animate=!1,this._bounce=null}create(){super.create(),this.gameObject.onActiveInHierarchyChanged.add((()=>{this.animateArrow(this.gameObject.active)}))}animateArrow(k){var B;this._animate=k,this._animate?(this._bounce||(this._bounce=tt.q.instance.game.add.tween(this.gameObject.transform.localPosition,this).to({y:this.gameObject.transform.localPosition.y-5},1e3,j.GS3.Quadratic.InOut,!0,0,Kt.s.MAX_SAFE_INTEGER,!0)),this._bounce.isRunning||this._bounce.start()):(this.gameObject.transform.setPositionY(0),null===(B=this._bounce)||void 0===B||B.stop())}destroy(){this._bounce&&(this._bounce.stop(),tt.q.instance.game.tweens.remove(this._bounce),this._bounce=null),super.destroy()}};XC=(0,G.Cg)([(0,j.EVk)("ItemCardArrow",j.YH6.ui)],XC);var ZC=U(55301),JC=U(59701);let tO=class extends j.uAl{constructor(){super(...arguments),this._onRequirementsMet=new j.HN0}create(){super.create(),this._isZoneStore=JC.W.isPrimaryMajorZoneStore(this._storeID),this._isZoneStore&&(tt.q.instance.prodigy.gameContainer.get("a50-726e").getStore(this._storeID).then((([k,B])=>{k?j.VyI.log(`[OpenStoreComponent] Error retrieving the store with ID: ${this._storeID}`,j.$bb.Error):this._storeData=B})).catch(j.RQr.createHandler(`[OpenStoreComponent] Error retrieving the store with ID: ${this._storeID}`)),this._requirementsID>=0&&this._featureRequirements.meetsRequirementsDeprecated(this._requirementsID)&&this._onRequirementsMet.dispatch())}destroy(){this._onRequirementsMet.dispose(),super.destroy()}openStore(){var k,B,U,F;const G=new mi.rD(tt.q.instance.game),$=`${null===(k=G.dataProvider.get(this._openStoreDialogueID))||void 0===k?void 0:k.textKey}_${us.B.Dialogue}`,H=tt.q.instance.prodigy.world.getCurrentZone(),V=tt.q.instance.prodigy.world.getCurrentMapTag();if(this._featureRequirements.meetsRequirementsDeprecated(this._requirementsID)){this._segment.featureCommon.sendInterfaceEvent({interfaceName:$,interfaceType:ui.Wm.Shop,instanceType:fi.N.ShopVisit,originType:ui.$N.Npc,originID:`${H}-${V}-${this._storeID}`});const k=G.dataProvider.get(this._openStoreDialogueID);this._isZoneStore&&(k.args=[null===(B=this._storeData)||void 0===B?void 0:B.getName()]);const[F,W]=null!==(U=ZC.X[this._storeID])&&void 0!==U?U:[],q=`${F}${j.Aq$.isDefined(W)?`_${W}`:""}`.replace("-","_");if(!k)return void this.openStoreMenu($,q);G.addEvents([{dialogueData:k,type:mi.fA.STORE,yes:()=>this.openStoreMenu($,q),no:()=>this.dismissStoreMenu($,q),blockInput:!0}])}else{const k=G.dataProvider.get(this._unmetRequirementsDialogueID);this._isZoneStore&&(k.args=[Yt.t.getItem("currency",null===(F=this._storeData)||void 0===F?void 0:F.getStoreCurrencyID()).data.name]),G.addEvents([{dialogueData:k,blockInput:!0}])}G.start(!0)}openStoreMenu(k,B){this.sendDialogueSegmentEvents(Is.k.Shop,k,B),tt.q.instance.prodigy.open.store(this._storeID)}dismissStoreMenu(k,B){this.sendDialogueSegmentEvents(Is.k.NotNow,k,B)}sendDialogueSegmentEvents(k,B,U){this._segment.featureCommon.sendButtonEvent({buttonName:k,interfaceName:B,interfaceType:ui.Wm.DialogBox,saveClickInfo:k,destinationName:U}),this._segment.featureCommon.sendInterfaceEvent({interfaceName:B,interfaceType:ui.Wm.DialogBox,instanceType:fi.N.Interface,closeMethod:ui.Lv.ButtonClick})}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tO.prototype,"_storeID",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tO.prototype,"_requirementsID",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tO.prototype,"_openStoreDialogueID",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tO.prototype,"_unmetRequirementsDialogueID",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],tO.prototype,"_onRequirementsMet",void 0),(0,G.Cg)([(0,j.Cdj)("db5-fb6e"),(0,G.Sn)("design:type",Object)],tO.prototype,"_featureRequirements",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],tO.prototype,"_segment",void 0),tO=(0,G.Cg)([(0,j.EVk)("OpenStore",W.Y.uiDialog)],tO);U(63811),U(25317),U(74208),U(32456),U(13751);let eO=class extends j.uAl{constructor(){var k;super(...arguments),this._onMenuClosed=new j.HN0,this._closeCallback=null,this.menuFactory=null===(k=tt.q.instance)||void 0===k?void 0:k.prodigy.open}map(k,B,U,F,G){return this.menuFactory.map({disableClose:k,forceLock:B,onClose:U,forceUnlock:F,disableZoneGoals:G})}firstNameSelector(k,B=!1){this.menuFactory.firstNameSelector(k,B)}wizardNameSelector(k,B,U){this.menuFactory.wizardNameSelector(k,B,U)}openChatFromHUD(){this.menuFactory.chat(tt.q.instance.game.broadcaster.broadcast.bind(tt.q.instance.game.broadcaster,jn.Y1.ShowHUD,jn.HG.HUD))}openWorldMapFromHUD(){this.menuFactory.map()}openWorldMapForDifficultyMode(k){Lg.i.setDifficultyMode(k)}openWorldMapWithZoneLockCutscene(){this.menuFactory.map({disableClose:!0,disableZoneGoals:!0}).activateZoneLockCutscene()}openMessageWithLocalizationKey(k){this.menuFactory.message(this._localizer.getText(k))}openMessageWithLocalizationKeyAndArgs(k,...B){this.menuFactory.message(this._localizer.getText(k,...B))}openBattlePassMenu(){var k;const B=this.getInjectedValue(hs.XU.ToasterNotificationId);this.menuFactory.battlePassMenu(this._originId,this._originType,null!==(k=this._closeCallback)&&void 0!==k?k:void 0,B)}openBattlePassUltimateMemberUpsellModal(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.menuFactory.battlePassUltimateMemberUpsellModal().then((()=>this._onMenuClosed.dispatch())).catch(j.RQr.createHandler("Error opening battle pass ultimate member upsell modal from the legacy menu factory component."))}))}openLootDashMenu(){this.menuFactory.lootDashMenu({originId:this._originId,originType:this._originType})}openDynamicStore(k,B){const U=null!=k?k:this._storeKey,F=null!=B?B:this._storeScrollToSection;this.menuFactory.dynamicStore({closeCallback:this._onMenuClosed.dispatch.bind(this._onMenuClosed),origin:{originType:this._originType,originId:this._originId},storeKey:U,scrollToSection:F})}openNicknamer(){const k=tt.q.instance.prodigy.gameContainer.get("dcf-fcf7"),B=tt.q.instance.prodigy.world.getCurrentZone().replace("_hard",""),U=k.isAvailable(B)?k.getNicknameData(B):[];this.menuFactory.nicknamer(U,this._player.playerContainer,B)}showMessageWithLocalizationKey(k){this.menuFactory.message(this._localizer.getText(k))}openDifficultySelector(){this.menuFactory.difficultySelector((()=>this._onMenuClosed.dispatch())).catch(j.RQr.createHandler("Error opening difficulty selector from the legacy menu factory component."))}openDifficultySelectorConfirmationModal(k){const B=null!=k?k:this.getInjectedValue(ml._l);B?this.menuFactory.difficultySelectorConfirmationModal(B):j.VyI.log("LegacyMenuFactoryComponent: Failed to find get the difficulty mode via injected value",j.$bb.Error)}openArchiveEntranceMenu(){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.prodigy.open.archiveEntranceMenu(Ft.A_.ARCHIVES,(()=>{this._onMenuClosed.dispatch()}))}))}openYourMailMenu(){this.menuFactory.mailer()}openNetworkErrorPopup(){this.menuFactory.networkError((()=>{this._onMenuClosed.dispatch()}))}destroy(){this._closeCallback=null,this._onMenuClosed.dispose(),super.destroy()}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],eO.prototype,"_originId",void 0),(0,G.Cg)([(0,j.gfw)(ui.$N),(0,G.Sn)("design:type",String)],eO.prototype,"_originType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],eO.prototype,"_storeKey",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],eO.prototype,"_storeScrollToSection",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],eO.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],eO.prototype,"_player",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],eO.prototype,"_onMenuClosed",void 0),eO=(0,G.Cg)([(0,j.EVk)("LegacyMenuFactory",j.YH6.ui)],eO);U(29281);let iO=class extends j.uAl{assignScrollToSection(k){this._scrollToSection=k}assignButtonCallback(k){k&&this._goNowButton.onInputUp.add((()=>{tt.q.instance.prodigy.open.dynamicStore({storeKey:k,scrollToSection:this._scrollToSection,origin:{originType:ui.$N.WizardWatch,originId:Is.k.WizardWatchButton}})}))}};(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],iO.prototype,"_goNowButton",void 0),iO=(0,G.Cg)([(0,j.EVk)("WizardWatchAdItem")],iO);var sO;U(31091);let nO=sO=class extends j.uAl{constructor(){super(...arguments),this.onPlayerAppearanceUpdated=new j.HN0}create(){super.create(),this._metricsManager.sendOnboardingFunnelEvent(eh.l.LoadGame),this._metricsManager.sendOnboardingFunnelEvent(eh.l.CreateCharacter),this._loggedInPlayer.player.saveEnabled=!1,this._loggedInPlayer.player.appearance.setName(null),this.randomizeAppearance()}randomizeAppearance(){const k=FE.createSeeded(Date.now()),B=sO.HAIR_STYLES[k.getIntegerInRange(0,sO.HAIR_STYLES.length-1)],U=sO.HAIR_COLORS[k.getIntegerInRange(0,sO.HAIR_COLORS.length-1)],F=k.getRealInRange(0,1)>.5,G=Math.floor(3*k.getRealInRange(0,1))+1,j=Math.floor(2*k.getRealInRange(0,1))+4;this._loggedInPlayer.player.setDefault(F?j:G,B,U),this._loggedInPlayer.player.forceSaveCharacter(),this.onPlayerAppearanceUpdated.dispatch(this._loggedInPlayer.getAppearance())}onCharacterCreateComplete(){var k;const B=this._loggedInPlayer.player.getPlayerData();delete B.reset,B.school="none",null!==(k=B.startDate)&&void 0!==k||(B.startDate=(new Date).getTime());[eh.l.CustomizeCharacter,eh.l.SelectLocation,eh.l.CompleteSignup].forEach((k=>{this._metricsManager.sendOnboardingFunnelEvent(k)})),this._loggedInPlayer.player.forceSaveCharacter()}destroy(){this.onPlayerAppearanceUpdated.dispose(),super.destroy()}};nO.SKIN_COLORS=[1,2,3,4,5,14],nO.EYE_COLORS=[1,2,3,4,6,8],nO.HAIR_COLORS=[1,2,3,4,5,6],nO.HAIR_STYLES=[5,10,20,41,37,53],(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],nO.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nO.prototype,"onPlayerAppearanceUpdated",void 0),(0,G.Cg)([(0,j.Cdj)("2a1-fed9"),(0,G.Sn)("design:type",Object)],nO.prototype,"_metricsManager",void 0),nO=sO=(0,G.Cg)([(0,j.EVk)("CharacterCreate",W.Y.uiCharCreate)],nO);let aO=class extends j.uAl{init(k,B=null,U=null){this._button.onEnabledClick.add(B),this.gameObject.findComponentsInChildren(Ke._).forEach((B=>{B.sprite.tint=k})),U&&this.gameObject.findComponentsInChildren(j.EYj).forEach((k=>{k.GameObject.active=!0,k.text=U.toString()}))}};var rO,oO;(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],aO.prototype,"_button",void 0),aO=(0,G.Cg)([(0,j.EVk)("CharacterPaletteButton",W.Y.uiCharCreate)],aO),function(k){k.EyeColor="eyeColor",k.SkinColor="skinColor",k.HairColor="hairColor",k.HairStyle="hairStyle"}(oO||(oO={}));let hO=rO=class extends j.uAl{constructor(){super(...arguments),this.paletteType=oO.EyeColor,this.onPlayerAppearanceUpdated=new j.HN0,this._paletteKeys=[]}setTitle(k){this._textKey.setLocalizationKey(k)}init(){switch(this.paletteType){case oO.EyeColor:this._paletteKeys=nO.EYE_COLORS;break;case oO.SkinColor:this._paletteKeys=nO.SKIN_COLORS;break;case oO.HairColor:this._paletteKeys=nO.HAIR_COLORS;break;case oO.HairStyle:this._paletteKeys=nO.HAIR_STYLES}const k=tt.q.instance.prodigy.gameContainer.get("d0e-64fd");this._paletteKeys.forEach(((B,U)=>{k.loadWithDependenciesFromGUID(Rt.l.CharacterPaletteButton,null).then((k=>{k.parent=this._grid.GameObject,this._grid.updateAll(!0);const F=this.getPaletteTint(B);k.findComponentInChildren(aO).init(F,this.changeVisuals.bind(this,B),this.paletteType===oO.HairStyle?U+1:null)})).catch(j.RQr.createHandler("[Character Palette Selector] Error loading the character palette button"))}))}getPaletteTint(k){if(this.paletteType===oO.HairStyle)return rO.HAIRSTYLE_TINT;const B=Object.values(oO).indexOf(this.paletteType);return $c.TZ.rgbArrayToHex(Yt.t.getItemData(this.paletteType,k).colors[B])}changeVisuals(k){const B=this._playerDataProvider.player;switch(this.paletteType){case oO.EyeColor:B.appearance.setEyeColor(k);break;case oO.SkinColor:B.appearance.setSkinColor(k);break;case oO.HairColor:B.appearance.setHair(null,k);break;case oO.HairStyle:B.appearance.setHair(k)}this.onPlayerAppearanceUpdated.dispatch(this._playerDataProvider.getAppearance())}destroy(){this.onPlayerAppearanceUpdated.dispose(),super.destroy()}};hO.HAIRSTYLE_TINT=548722,(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],hO.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.gfw)(oO),(0,G.Sn)("design:type",String)],hO.prototype,"paletteType",void 0),(0,G.Cg)([(0,j.MnK)(j.JTA),(0,G.Sn)("design:type",j.JTA)],hO.prototype,"_grid",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],hO.prototype,"_textKey",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hO.prototype,"onPlayerAppearanceUpdated",void 0),hO=rO=(0,G.Cg)([(0,j.EVk)("CharacterPaletteSelector",W.Y.uiCharCreate)],hO);var cO=U(73722),dO=U(80974);let lO=class extends j.uAl{constructor(){super(),this.onServerSelected=new j.HN0,this.openWorld=ct.throttle(this.openWorld,1e3,{trailing:!1})}openWorld(){this.setHomeOrSchool()||this.chooseServer(!1,!1)}setHomeOrSchool(k,B){if(this._servers){const U=new dO.H(this._servers,this.chooseServer.bind(this),k,B);return cO.V.instance.isInitComplete()||(cO.V.instance.selectedLocation="school"),U.applyServerSelectMode(),!0}return!1}chooseServer(k,B){B||(this.onServerSelected.dispatch(),tt.q.instance.prodigy.world.enter().catch(j.RQr.createHandler("Error entering world")))}destroy(){this.onServerSelected.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("InitData-servers"),(0,G.Sn)("design:type",Array)],lO.prototype,"_servers",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],lO.prototype,"onServerSelected",void 0),lO=(0,G.Cg)([(0,j.EVk)("OpenServerSelect",W.Y.uiCharCreate),(0,G.Sn)("design:paramtypes",[])],lO);U(47878);var uO=U(79998);let fO=class extends j.uAl{constructor(){super(...arguments),this._rarityBackground=uO.u.Pet_card_bg_bw,this._rarity=io.E.Common,this._rarityTintMap=Object.assign({[-1]:12500670},$c.Hh),this._rarityStrokeMap={[-1]:"#766685",[io.E.Common]:"#766685",[io.E.Uncommon]:"#477251",[io.E.Rare]:"#505796",[io.E.Heroic]:"#812A93",[io.E.Legendary]:"#AE0000"},this._rarityImageMap={[-1]:uO.u.Pet_card_bg_bw,[io.E.Common]:uO.u.Pet_card_bg_common,[io.E.Uncommon]:uO.u.Pet_card_bg_uncommon,[io.E.Rare]:uO.u.Pet_card_bg_rare,[io.E.Heroic]:uO.u.Pet_card_bg_heroic,[io.E.Legendary]:uO.u.Pet_card_bg_legendary}}changeStrokeMap(k){this._rarityStrokeMap=k,this.updateGraphic()}changeTintMap(k){this._rarityTintMap=k,this.updateGraphic()}changeImageMap(k){this._rarityImageMap=k,tt.q.instance.prodigy.load.isFileLoaded(this._rarityImageMap[this._rarity])?this.updateGraphic():this.loadAssets()}changeRarity(k){this._rarity=k,tt.q.instance.prodigy.load.isFileLoaded(this._rarityImageMap[this._rarity])?this.updateGraphic():this.loadAssets()}loadAssets(){const k=Object.values(this._rarityImageMap);tt.q.instance.prodigy.load.assetsAsPromise(k).then((()=>{this.updateGraphic()})).catch((k=>{j.VyI.log("Failed to load images on rarity graphic state component",j.$bb.Error)}))}updateGraphic(){const k={[hs.Wg.RarityGraphic]:this._rarityImageMap[this._rarity],[hs.Wg.RarityTint]:this._rarityTintMap[this._rarity],[hs.Wg.RarityStroke]:this._rarityStrokeMap[this._rarity]};Nt.d.updateInjectedValues(this.gameObject,k)}};(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],fO.prototype,"_rarityBackground",void 0),(0,G.Cg)([(0,j.gfw)(io.E),(0,G.Sn)("design:type",Number)],fO.prototype,"_rarity",void 0),(0,G.Cg)([(0,j.npj)(),(0,G.Sn)("design:type",Object)],fO.prototype,"_rarityTintMap",void 0),(0,G.Cg)([(0,j.npj)(),(0,G.Sn)("design:type",Object)],fO.prototype,"_rarityStrokeMap",void 0),(0,G.Cg)([(0,j.npj)(),(0,G.Sn)("design:type",Object)],fO.prototype,"_rarityImageMap",void 0),fO=(0,G.Cg)([(0,j.EVk)("RarityGraphicState")],fO);var bO=U(93375);let pO=class extends j.uAl{};(0,G.Cg)([(0,j.gfw)(bO.f),(0,G.Sn)("design:type",String)],pO.prototype,"hudStyle",void 0),pO=(0,G.Cg)([(0,j.EVk)("HUDStyle",W.Y.ui)],pO);let vO=class extends j.uAl{constructor(){super(...arguments),this.onStandardHUDStyle=new j.HN0,this.onHouseHUDStyle=new j.HN0,this._runOnCreate=!1}create(){super.create(),this._runOnCreate&&this.checkHUDStyle()}checkHUDStyle(){const k=tt.q.instance.prodigy.game.state.getCurrentState(),B=k instanceof hw.c?k:null,U=j.wa5.getActiveScene().gameObjects.find((k=>k.findComponentInChildren(pO))),F=null==U?void 0:U.findComponentInChildren(pO);switch(B?B.hudMenuStyle:null==F?void 0:F.hudStyle){case void 0:j.VyI.log("HUDStyleGuardComponent could not determine HUD Style; current screen does not appear to have a HUD",j.$bb.Warning);break;case bO.f.House:this.onHouseHUDStyle.dispatch();break;case bO.f.Standard:default:this.onStandardHUDStyle.dispatch()}}destroy(){this.onStandardHUDStyle.dispose(),this.onHouseHUDStyle.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],vO.prototype,"onStandardHUDStyle",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],vO.prototype,"onHouseHUDStyle",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],vO.prototype,"_runOnCreate",void 0),vO=(0,G.Cg)([(0,j.EVk)("HUDStyleGuard",W.Y.ui)],vO);let gO=class extends j.uAl{constructor(){super(...arguments),this._kennelSizeThreshold=3}create(){super.create(),!this.checkPlayerHasUpgradedPet()&&this.checkPlayerHasHitPetThreshold()?(this._petMenuNotificationDown.active=!0,this._petMenuNotificationUp.active=!0):(this._petMenuNotificationDown.active=!1,this._petMenuNotificationUp.active=!1)}checkPlayerHasHitPetThreshold(){var k,B;return(null===(B=null===(k=this._currentPlayer)||void 0===k?void 0:k.player.kennel)||void 0===B?void 0:B.getPets().length)>=this._kennelSizeThreshold}checkPlayerHasUpgradedPet(){return this._breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_PET_UPGRADE_FTUE,ls.B.BREADCRUMB_LEVELLED_UP_PET_FIRST_TIME)}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gO.prototype,"_petMenuNotificationDown",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gO.prototype,"_petMenuNotificationUp",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],gO.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("12f-4e29"),(0,G.Sn)("design:type",sh.F)],gO.prototype,"_breadcrumbManager",void 0),gO=(0,G.Cg)([(0,j.EVk)("HUDPetMenuNotifier",W.Y.ui)],gO);let mO=class extends j.uAl{postCreate(){const k=Object.create(null,{postCreate:{get:()=>super.postCreate}});return(0,G.sH)(this,void 0,void 0,(function*(){k.postCreate.call(this),tt.q.instance.prodigy.game.broadcaster.addAppListener(jn.H3.MembershipResponseReceived,this.handleMembershipChange,this),this.updateHudMembershipFromCacheData()}))}updateHudMembershipFromCacheData(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0");this.updateHudButtons(k.getMembershipUpsell())}handleMembershipChange(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0"),B=yield k.fetchMembershipUpsell();this.updateHudButtons(B)}))}updateHudButtons(k){var B,U;if(j.Aq$.isDefined(this.memberButton)&&j.Aq$.isDefined(this.ultimateMemberButton)&&j.Aq$.isDefined(this.coreMemberButton)&&j.Aq$.isDefined(this.plusMemberButton)&&j.Aq$.isDefined(this.ultraMemberButton)){if(js.D.isFeatureEnabled()){if(!Dd.x.isFeatureEnabled()){const F=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getMemberTier();this.memberButton.active=!1,this.ultimateMemberButton.active=!1,this.coreMemberButton.active=!Gs.pF.isNativeApp()&&F===xs._$.NonMember,this.plusMemberButton.active=Gs.pF.isNativeApp()&&(F===xs._$.NonMember||F===xs._$.MemberCore)||!Gs.pF.isNativeApp()&&F===xs._$.MemberCore&&(null===(B=null==k?void 0:k.upgradeOptions)||void 0===B?void 0:B.length)>0,this.ultraMemberButton.active=!Gs.pF.isNativeApp()&&F===xs._$.MemberPlus&&(null===(U=null==k?void 0:k.upgradeOptions)||void 0===U?void 0:U.length)>0}}else{const B=(k.tier===xs._$.MemberLevelUp||k.tier===xs._$.MemberUltimateMath||k.tier===xs._$.MemberCore||k.tier===xs._$.MemberPlus)&&k.upgradeOptions.length>0;this.memberButton.active=!B&&k.tier===xs._$.NonMember,this.ultimateMemberButton.active=B,this.coreMemberButton.active=!1,this.plusMemberButton.active=!1,this.ultraMemberButton.active=!1}this._grid.updateAll()}}destroy(){tt.q.instance.prodigy.game.broadcaster.removeAppListener(jn.H3.MembershipResponseReceived,this),super.destroy()}};(0,G.Cg)([(0,j.MnK)(j.JTA),(0,G.Sn)("design:type",j.JTA)],mO.prototype,"_grid",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],mO.prototype,"memberButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],mO.prototype,"ultimateMemberButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],mO.prototype,"coreMemberButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],mO.prototype,"plusMemberButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],mO.prototype,"ultraMemberButton",void 0),mO=(0,G.Cg)([(0,j.EVk)("HUDMembershipButtonComponent",W.Y.ui)],mO);U(28832),U(29853),U(5679),U(52211);var yO=U(53671),_O=U(21574),EO=U(96989);let wO=class extends j.uAl{constructor(){super(...arguments),this.onPetMergeSuccess=new j.HN0,this._willPetLevelOnMerge=!1}setup(k,B){this.mergeModalCloseCallback=B,this._petData=k,this.updateMergeProperties()}updateMergeProperties(){var k,B,U;const F=eo.P8.canPlayerAccessPetMergeFeature(this._activePlayer),G=(null!==(k=eo.P8.getPetDisplayMergeRank(this._petData.ID,this._petData.uniqueID))&&void 0!==k?k:bl.qd.MIN)>=bl.qd.MAX;this.mergeBar.setup(this._petData,F);let $={requiredIngredientsCount:0,validPetIngredientCount:0,mergeRecipe:void 0};G||($=cd.r.getMergeIngredientInfo(this._petData),this._willPetLevelOnMerge=null!==(B=$.willLevelOnMerge)&&void 0!==B&&B,EO.Y.isMerge2Recipe($.mergeRecipe)&&(this._merge2LevelRequirement=$.mergeRecipe.requiredLevel)),j.Aq$.isDefined(this._merge2LevelRequirement)&&this._petData.level=$.requiredIngredientsCount),this.mergeButton.regenerateButton(),this.mergeButton.GameObject.active=F&&!G,this.mergeNotAvailableText.GameObject.active=!F;const H=F&&G;if(this.duplicateText.GameObject.active=H,H){const k=Math.max(0,this._activePlayer.kennel.amountOfPet(this._petData.ID)-1);this.duplicateText.text=this._localizer.getText("PET_DETAILS_PET_DUPLICATES",k)}if(!F){const k=null!==(U=_O.g.config.minimumPlayerLevel)&&void 0!==U?U:0;this.mergeNotAvailableText.text=this._localizer.getText("PET_SCREEN_GET_LEVEL_TO_MERGE",k)}}onPetMergeClicked(){if(this.mergeButton.isButtonEnabled){tt.q.instance.prodigy.open.petMergeMenu(this._petData,ui.k.PetBook,(()=>{this.onPetMergeSubMenuClosed()})).onPetMergeSuccess.add((k=>{this.onPetMergeSuccess.dispatch(k,this._willPetLevelOnMerge)}))}else this.mergeButton.inputEnabled&&j.Aq$.isDefined(this._merge2LevelRequirement)&&(this._tooltip.GameObject.active=!0,this._tooltip.body=this._localizer.getText("MERGE_LEVEL_REQUIREMENT_TOOLTIP_DESCRIPTION",this._merge2LevelRequirement))}onPetMergeSubMenuClosed(){this.updateMergeProperties(),this.mergeModalCloseCallback&&this.mergeModalCloseCallback()}destroy(){this.onPetMergeSuccess.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],wO.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],wO.prototype,"mergeNotAvailableText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],wO.prototype,"duplicateText",void 0),(0,G.Cg)([(0,j.MnK)(yO.J),(0,G.Sn)("design:type",yO.J)],wO.prototype,"mergeBar",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],wO.prototype,"mergeButton",void 0),(0,G.Cg)([(0,Gi.b)("306-5359"),(0,G.Sn)("design:type",An.W)],wO.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],wO.prototype,"_buttonSparkles",void 0),(0,G.Cg)([(0,j.MnK)(lC.tX),(0,G.Sn)("design:type",lC.tX)],wO.prototype,"_tooltip",void 0),wO=(0,G.Cg)([(0,j.EVk)("MergeWidgetController")],wO);let TO=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.onTabSelected=this.createTidySignal()}get toggle(){return this._toggle}get data(){return this._data}init(k){this.toggle.setSelected(!0),this.toggle.inputEnabled=!0,this._data=k,this.addListenerToSignal(this.toggle.onSelected,(()=>this.onTabSelected.dispatch(this._data))),j.Aq$.isDefined(this.labelComponent)&&(this.labelComponent.text=k.label),j.Aq$.isDefined(this.graphicComponent)&&this.graphicComponent.updateAsset(k.iconId,k.iconFrame)}};(0,G.Cg)([(0,j.Pqz)(st.l),(0,G.Sn)("design:type",st.l)],TO.prototype,"_toggle",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],TO.prototype,"labelComponent",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],TO.prototype,"graphicComponent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TO.prototype,"onTabSelected",void 0),TO=(0,G.Cg)([(0,j.EVk)("NavigationTab")],TO);let SO=class extends j.uAl{setup(k){var B;this._statName.text=k.name,this._statValue.text=k.value,this._statIcon.updateAsset(k.iconAtlasId,k.iconAsset),this._chargedTier1Background.active=k.chargedEffectTier===Fn.Bv.CHARGED,this._chargedTier2Background.active=k.chargedEffectTier===Fn.Bv.MAX_CHARGE,this._background.active=null!==(B=k.showBackground)&&void 0!==B&&B,this._chargedTier1Background.active=k.chargedEffectTier===Fn.Bv.CHARGED,this._chargedTier2Background.active=k.chargedEffectTier===Fn.Bv.MAX_CHARGE,this._statGearBoost.GameObject.active=k.hasAnyGearBoost,k.hasAnyGearBoost&&(this._statGearBoost.text=k.gearBoost)}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],SO.prototype,"_statName",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],SO.prototype,"_statValue",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],SO.prototype,"_statGearBoost",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],SO.prototype,"_statIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],SO.prototype,"_chargedTier1Background",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],SO.prototype,"_chargedTier2Background",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],SO.prototype,"_background",void 0),SO=(0,G.Cg)([(0,j.EVk)("PetInfoStat",W.Y.uiPetMenu)],SO);let AO=class extends j.uAl{setup(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=Math.abs(this._statsGrid.sizeDelta.height)/k.length;yield this._prefabLoader.preloadFromGUIDWithDependencies(this._statPrefab);for(let U=0;Uk.destroyDeferred())),Promise.all(this._tabs.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return[yield this._prefabLoader.loadWithDependenciesFromGUID(this._tabPrefab,this._tabsContainerObject),k]}))))).then((k=>{k.forEach((([B,U],F)=>{var G;const $=B.findComponent(TO);if(j.Aq$.isDefined($)){null===(G=this._toggleGroup)||void 0===G||G.addSelectable($.toggle),U.onTabSelected&&this.addListenerToSignal($.onTabSelected,U.onTabSelected.bind(this)),$.init(U);const B=""!==this._currentTabKey&&this._currentTabKey===U.key||""===this._currentTabKey&&this._defaultSelectedTabIndex===F;$.toggle.setSelected(B),1===k.length&&($.toggle.inputEnabled=!1)}}))})).catch(j.RQr.createHandler("There was an error creating the tabs")))}setPetStatsData(){this._statsPrefab&&this._tabsContainerObject&&(this._contentObject.children.forEach((k=>k.destroyDeferred())),this._prefabLoader.loadWithDependenciesFromGUID(this._statsPrefab,this._contentObject).then((k=>{const B=k.findComponent(AO);B?this.updateStats(B):j.VyI.log("Failed to find PetInfoStatTab component in statsPrefab",j.$bb.Error)})).catch(j.RQr.createHandler("Failed to load statsPrefab")))}updatePetInfo(){const k=this._tabs.find((k=>k.key===this._currentTabKey));(null==k?void 0:k.onTabSelected)&&k.onTabSelected()}updateStats(k){return(0,G.sH)(this,void 0,void 0,(function*(){this._currentTabKey=this._statsTabData.key;const B=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=Yt.t.getItem("pet",this._petData.ID),F=eo.P8.isPetOnTeam(this._petData)&&B.getChargedLevel()>0,G=F?Un.e.getActivePlayerChargedLevelTier():Fn.Bv.NO_CHARGE,j=F?this._petData.level+B.getChargedLevel():this._petData.level,$=eo.P8.getBattleStats(U,j,this._petData.uniqueID),H=yield this.getPetGearBoosts(),V=Object.values(H).some((k=>k>0)),W=this._statDisplayConfigs.map((k=>{var B,U;return{name:this._localizer.getText(k.labelLocalizedKey),value:null!==(U=null===(B=$[k.stat])||void 0===B?void 0:B.toString())&&void 0!==U?U:"",gearBoost:H[k.stat]&&H[k.stat]>0?`+${H[k.stat]}`:"",iconAsset:k.iconAsset,chargedEffectTier:G,iconAtlasId:k.iconAtlasId,hasAnyGearBoost:V}}));yield k.setup(W)}))}getPetGearBoosts(){return(0,G.sH)(this,void 0,void 0,(function*(){return td.I.getStatsOfEquippedGearForPet(this._petData.gear)}))}setPetLoreData(){this._currentTabKey=this._loreTabData.key,this._statsPrefab&&this._tabsContainerObject&&(this._contentObject.children.forEach((k=>k.destroyDeferred())),this._prefabLoader.loadWithDependenciesFromGUID(this._lorePrefab,this._contentObject).then((()=>this.updateLoreData())).catch((k=>{var B;j.VyI.log("Failed to load descriptionPrefab",j.$bb.Error),j.VyI.log(null===(B=null==k?void 0:k.toString)||void 0===B?void 0:B.call(k),j.$bb.Error)})))}updateLoreData(){const k=Yt.t.getItem("pet",this._petData.ID),B={[hs.hi.YourPetInfoLoreText]:this._localizer.getText(`${k.type}_${k.ID}_FLAVORTEXT`.toUpperCase())};Nt.d.updateInjectedValues(this.gameObject,B)}};(0,G.Cg)([(0,j.Cdj)("d69-defe"),(0,G.Sn)("design:type",Qc.q)],CO.prototype,"_gearManager",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],CO.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.i0J)(j.Z$z.Prefab),(0,G.Sn)("design:type",String)],CO.prototype,"_tabPrefab",void 0),(0,G.Cg)([(0,j.i0J)(j.Z$z.Prefab),(0,G.Sn)("design:type",String)],CO.prototype,"_statsPrefab",void 0),(0,G.Cg)([(0,j.i0J)(j.Z$z.Prefab),(0,G.Sn)("design:type",String)],CO.prototype,"_lorePrefab",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],CO.prototype,"_defaultSelectedTabIndex",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],CO.prototype,"_tabsContainerObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],CO.prototype,"_contentObject",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],CO.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,Gi.b)("306-5359"),(0,G.Sn)("design:type",An.W)],CO.prototype,"_activePlayer",void 0),CO=(0,G.Cg)([(0,j.EVk)("PetInfoWidgetController")],CO);let OO=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this._spellIndex=-1,this.onCardSelectedSignal=this.createTidySignal(),this.onCardDeselectedSignal=this.createTidySignal(),this._isUnlocked=!1}setup(k,B){this._petData=k,this.updateSpellCard().catch(j.RQr.createHandler)}updateSpellCard(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;if(!this.GameObject)return;if(this._spellIndex<0)return void j.VyI.log("SpellIndex unset or invalid.",j.$bb.Error);const U=Yt.t.getItem("pet",this._petData.ID).data.spells.find((k=>k.slot===this._spellIndex+1)),F=null!==(k=null==U?void 0:U.level)&&void 0!==k?k:0;if(F>eo.P8.getMaxOwnableLevel(this._petData.ID,this._petData.mergeRank))return void(this.gameObject.active=!1);this.gameObject.active=!0,this._isUnlocked=null!==(B=U&&this._petData.level>=U.level)&&void 0!==B&&B;const G=Yt.t.getItem("spellV2",U.id),$=G.data,H=G.metadata,V=this.isOneUseSpell($)?$.warmup:$.cooldown,W=this.isOneUseSpell($)?$.cooldown:V-$.cooldown;this._spellLevel.text=(0,ms.k)("LEADERBOARD_CLASS_LEVEL_SHORT",F),this._spellElementIcon.updateAsset(Ve._.Ui_battle_revamp_json,`icon-mini-element-${$.element}`),this._lockedState.active=!this._isUnlocked;const q=yield this.loadIcon(H,this._isUnlocked),K={SPELLCARD_COLOR_STATE:this._isUnlocked?$.element:"cooldown",SPELLCARD_COOLDOWN_BARS_TOTAL:V,SPELLCARD_COOLDOWN_BARS_CURRENT:W,SPELLCARD_COOLDOWN_1:this.getCooldownBarColor(W,1,$),SPELLCARD_COOLDOWN_2:this.getCooldownBarColor(W,2,$),SPELLCARD_COOLDOWN_3:this.getCooldownBarColor(W,3,$),SPELLCARD_CENTRE_ICON:q,SPELLCARD_MINI_ICON:[Ve._.Ui_battle_revamp_json,`icon-mini-element-${this._isUnlocked?$.element:`${$.element}-cooldown`}`]};this.GameObject&&!this.GameObject.isDestroyed&&Nt.d.updateInjectedValues(this.GameObject,K,!1)}))}isOneUseSpell(k){return-1===k.cooldown}loadIcon(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=this.getSpellIcon(k,B);return new Promise((k=>{tt.q.instance.prodigy.load.assets([U],(()=>{k(U)}))}))}))}getSpellIcon(k,B){var U,F;const G=B?"":"_cooldown";return(null===(F=null===(U=k.assets)||void 0===U?void 0:U.icon)||void 0===F?void 0:F.assetKey)?ps.q[`${xt.$.capitalizeFirstLetter(k.assets.icon.assetKey)}${G}`]:ps.q.Spell_fire_fireball_single}getCooldownBarColor(k,B,U){let F="cooldown";return this.isOneUseSpell(U)?F="disabled":k>=B&&(F=U.element===mn.EElementType.Astral?`${mn.EElementType.Astral}${B}`:U.element),hu.k[xt.$.capitalizeFirstLetter(F)]}onCardSelected(){this.onCardSelectedSignal.dispatch(this),this._tooltipInOutAnimation.runInTween(),this._highLight.active=!0}onCardDeselected(){this.onCardDeselectedSignal.dispatch(this),this._tooltipInOutAnimation.runOutTween(),this._highLight.active=!1}};(0,G.Cg)([(0,j.g11)(),(0,j.YLv)("Index of the spell this component represents"),(0,G.Sn)("design:type",Number)],OO.prototype,"_spellIndex",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],OO.prototype,"_highLight",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],OO.prototype,"_spellElementIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],OO.prototype,"_spellLevel",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],OO.prototype,"_lockedState",void 0),(0,G.Cg)([(0,j.MnK)(j.XVE),(0,G.Sn)("design:type",j.XVE)],OO.prototype,"_toolTip",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],OO.prototype,"onCardSelectedSignal",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],OO.prototype,"onCardDeselectedSignal",void 0),(0,G.Cg)([(0,j.MnK)(Bw.s),(0,G.Sn)("design:type",Bw.s)],OO.prototype,"_tooltipInOutAnimation",void 0),OO=(0,G.Cg)([(0,j.EVk)("SpellsWidgetCard")],OO);let IO=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this._cards=[],this._currentCardSelected=null}setup(k){this._petData=k,this._cards=this.gameObject.findComponentsInChildren(OO);for(const B of this._cards)B.setup(this._petData),B.onCardSelectedSignal.add(this.onCardSelected.bind(this)),B.onCardDeselectedSignal.add(this.onCardDeselected.bind(this))}updateCards(k){this._petData=k;for(const B of this._cards)B.setup(this._petData)}onCardSelected(k){null!==this._currentCardSelected&&this._currentCardSelected.onCardDeselected(),this._currentCardSelected=k}onCardDeselected(k){this._currentCardSelected===k&&(this._currentCardSelected=null)}};IO=(0,G.Cg)([(0,j.EVk)("SpellsWidgetController")],IO);var DO;U(63086);!function(k){k.bossID="PREBATTLE_POPUP_BOSS_ID",k.mapID="PREBATTLE_POPUP_MAP_ID",k.zoneID="PREBATTLE_POPUP_ZONE_ID",k.isDoorBlocking="PREBATTLE_POPUP_IS_DOOR_BLOCKING",k.name="PREBATTLE_POPUP_NAME",k.banner="PREBATTLE_POPUP_BANNER",k.mapIcon="PREBATTLE_POPUP_MAP_ICON",k.descriptionLocalizationKey="PREBATTLE_POPUP_DESCRIPTION_LOCALIZATION_KEY",k.descriptionArg="PREBATTLE_POPUP_DESCRIPTION_ARG"}(DO||(DO={}));let RO=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=tt.q.instance.prodigy.gameContainer,U=B.get("db5-fb6e"),F=B.get("306-5359"),G=null===(k=null==F?void 0:F.data)||void 0===k?void 0:k.lastUnmetBattleRequirements;return oh.A.isDefined(null==G?void 0:G.featureRequirements)&&U.meetsRequirementsDeprecated(G.featureRequirements)}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this);const B=tt.q.instance.prodigy.gameContainer.get("306-5359").data.lastUnmetBattleRequirements;tt.q.instance.prodigy.open.prefabMenu(Rt.l.PrebattlePopup,(()=>this.onClose.dispatch()),void 0,void 0,void 0,{[DO.bossID]:B.bossID,[DO.zoneID]:B.zoneID,[DO.mapID]:B.mapID,[DO.isDoorBlocking]:B.isDoorBlocking},{interfaceName:us.B.RestrictedBattleCallbackScreen,interfaceType:ui.Wm.Modal,originType:ui.$N.BattleRestrictionsMet,instanceType:fi.N.UI,custom:{instance_id:xt.$.generateUID(),restrictions:B.featureRequirements}},!0),Eo.a.resetPlayerLastUnmetBattleRequirements()}))}};RO=(0,G.Cg)([(0,j.EVk)("OpenPrebattlePopup",W.Y.uiDialog)],RO);const PO={14:{banner:"replay-unlock-gerald",nootTextKey:"GERALD_QUEST_POPUP_DESCRIPTION"},16:{banner:"replay-unlock-icewyrm",nootTextKey:"ICE_WYRM_QUEST_POPUP_DESCRIPTION"},13:{banner:"replay-unlock-cebollini",nootTextKey:"CEBOLLINI_QUEST_POPUP_DESCRIPTION"},15:{banner:"replay-unlock-oldone",nootTextKey:"OLD_ONE_QUEST_POPUP_DESCRIPTION"},12:{banner:"replay-unlock-nastycloud",nootTextKey:"NASTY_CLOUD_QUEST_POPUP_DESCRIPTION"},54:{banner:"replay-unlock-puppetmaster-final",nootTextKey:"GERALD_ILLUSION_QUEST_POPUP_DESCRIPTION",name:"The Puppet Master"},55:{banner:"replay-unlock-puppetmaster-final",nootTextKey:"ICE_WYRM_ILLUSION_QUEST_POPUP_DESCRIPTION",name:"The Puppet Master"},56:{banner:"replay-unlock-puppetmaster-final",nootTextKey:"CEBOLLINI_ILLUSION_QUEST_POPUP_DESCRIPTION",name:"The Puppet Master"},57:{banner:"replay-unlock-puppetmaster-final",nootTextKey:"OLD_ONE_ILLUSION_QUEST_POPUP_DESCRIPTION",name:"The Puppet Master"},58:{banner:"replay-unlock-puppetmaster-final",nootTextKey:"NASTY_CLOUD_ILLUSION_QUEST_POPUP_DESCRIPTION",name:"The Puppet Master"},37:{banner:"replay-unlock-pippet",nootTextKey:"PIPPET_QUEST_POPUP_DESCRIPTION"},59:{banner:"replay-unlock-puppetmaster-final",nootTextKey:"PUPPET_MASTER_FINAL_QUEST_POPUP_DESCRIPTION"}};let MO=class extends Fi.z{create(){super.create(),this.bindContext()}bindContext(){var k,B,U,F;const G=Yt.t.getItem("boss",this.bossID);if(!G)return;let $;$=(null===(k=G.data)||void 0===k?void 0:k.category)===Ci.GJ.Wizard&&G.ID!==Ci.JT?((k,B)=>{const U=B?"CLOAKED_WIZARD_BLOCKING_POPUP_DESCRIPTION":"CLOAKED_WIZARD_POPUP_DESCRIPTION",F=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("CLOAKED_WIZARD");return{nootTextKey:U,banner:k===Pf.a.Physical||k===Pf.a.Astral?"replay-unlock-cloaked-wizard":`replay-unlock-cloaked-wizard-${k}`,name:F}})(null===(B=G.data)||void 0===B?void 0:B.affinity,this.isDoorBlocking):PO[this.bossID],this.updateValue(DO.name,null!==(U=null==$?void 0:$.name)&&void 0!==U?U:null===(F=G.data)||void 0===F?void 0:F.name),this.updateValue(DO.banner,null==$?void 0:$.banner),this.updateValue(DO.descriptionLocalizationKey,null==$?void 0:$.nootTextKey),this.updateValue(DO.descriptionArg,Lg.i.getZoneName(this.zoneID)),this.updateValue(DO.mapIcon,`icon-zone-${Lg.i.getZoneTagForZoneId(this.zoneID)||this.zoneID.replace(/_hard|_expert/,"")}`)}};(0,G.Cg)([(0,j.Cdj)(DO.bossID),(0,G.Sn)("design:type",Number)],MO.prototype,"bossID",void 0),(0,G.Cg)([(0,j.Cdj)(DO.mapID),(0,G.Sn)("design:type",String)],MO.prototype,"mapID",void 0),(0,G.Cg)([(0,j.Cdj)(DO.zoneID),(0,G.Sn)("design:type",String)],MO.prototype,"zoneID",void 0),(0,G.Cg)([(0,j.Cdj)(DO.isDoorBlocking),(0,G.Sn)("design:type",Boolean)],MO.prototype,"isDoorBlocking",void 0),MO=(0,G.Cg)([(0,j.EVk)("PrebattlePopupComponent",W.Y.uiDialog)],MO);U(88217);var NO=U(48842);let xO=class extends Fi.z{constructor(){super(...arguments),this.NEWLY_RESCUED_STAMP_INTERVAL_MS=300}create(){super.create(),this._context.Container.bind("PET_ZONE_CARD_IS_RESCUED").toConstantValue(null),this._context.Container.bind("PET_ZONE_CARD_ICON_ID").toConstantValue(null),this._context.Container.bind("PET_ZONE_CARD_RESCUED_STAMP_DELAY").toConstantValue(null)}destroy(){this.unbindContext(),super.destroy()}bindContext(){this._petId=this._context.Container.get("ELEMENT_VIEW_DATA");const k=this.getRescuedStampDelay(),B=j.Aq$.isDefined(k),U=this._context.Container.get("PET_ZONE_MENU_STATE")===NO.SB.InZone;this._context.Container.rebind("PET_ZONE_CARD_IS_RESCUED").toConstantValue(this.isPetOwned()&&!U||this.isPetOwned()&&U&&!B),this._context.Container.rebind("PET_ZONE_CARD_ICON_ID").toConstantValue(this.getPetIconName()),U&&this._context.Container.rebind("PET_ZONE_CARD_RESCUED_STAMP_DELAY").toConstantValue(k),this.gameObject.findComponentsInChildren(Lo.B).forEach((k=>k.consume())),this.gameObject.active=!0}unbindContext(){this._context.Container.unbind("PET_ZONE_CARD_IS_RESCUED"),this._context.Container.unbind("PET_ZONE_CARD_ICON_ID"),this._context.Container.unbind("PET_ZONE_CARD_RESCUED_STAMP_DELAY");const k=this.gameObject.findComponentInChildren(Ke._);k&&(k.sprite.key=null),this.gameObject.active=!1}isPetOwned(){return j.Aq$.isDefined(tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.encounters.getPetFirstRescuedDate(this._petId))}getRescuedStampDelay(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.newPetRescueData.newRescuedPets[tt.q.instance.prodigy.world.getCurrentZone()];if(k){const B=k.findIndex((k=>k===this._petId));return-1===B?null:B*this.NEWLY_RESCUED_STAMP_INTERVAL_MS}return null}getPetIconName(){return fs.E.getIconForType("pet",this._petId)}};xO=(0,G.Cg)([(0,j.EVk)("PetGridDataProvider",W.Y.uiPetsInZones)],xO);U(41968);let LO=class extends j.uAl{constructor(){super(...arguments),this.obfuscateOnCreate=!0,this.obfuscationCharacter="*",this._isObfuscated=!1}create(){this._originalText=this._targetText.text,this.obfuscateOnCreate&&this.toggleObfuscation()}toggleObfuscation(){this._targetText.text=this._isObfuscated?this._originalText:this.obfuscationCharacter.repeat(this._originalText.length),this._isObfuscated=!this._isObfuscated}setOriginalText(k){this._originalText=k,this._isObfuscated?this._targetText.text=this.obfuscationCharacter.repeat(this._originalText.length):this._targetText.text=this._originalText}};(0,G.Cg)([(0,j.Pqz)(j.EYj),(0,G.Sn)("design:type",j.EYj)],LO.prototype,"_targetText",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],LO.prototype,"obfuscateOnCreate",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],LO.prototype,"obfuscationCharacter",void 0),LO=(0,G.Cg)([(0,j.EVk)("TextObfuscationComponent",j.YH6.ui)],LO);var kO=U(21644);let BO=class extends j.uAl{setupButtonCallback(){{const k=kO.p1[this._unifiedStoreButton];let B;if(k){const U=(0,kO.Bi)(k);U?B=()=>{tt.q.instance.prodigy.open.store(U,void 0,void 0,{originType:ui.$N.ButtonClick})}:"customCallback"in k?B=k.customCallback:(k.name,j.VyI.log(`The unified store button: ${k.name} has no associated action.`,j.$bb.Error))}B&&this._button.onClick.add(B)}}};(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],BO.prototype,"_button",void 0),(0,G.Cg)([(0,j.gfw)(kO.Uh),(0,G.Sn)("design:type",String)],BO.prototype,"_unifiedStoreButton",void 0),BO=(0,G.Cg)([(0,j.EVk)("UnifiedStoreButton",W.Y.uiUnifiedStore)],BO);let UO=class extends j.uAl{postCreate(){super.postCreate();const k=(0,ct.cloneDeep)(kO.ju);jg._.hasDefeatedPetStore()&&k.unshift(kO.Uh.OpenDynamicStore),this._gridLayout&&k.forEach((k=>{var B,U,F,G;const $=kO.p1[k],H=new j._mx,V=H.addComponent(j.XVE);V.setAnchorMin(0,0),V.setAnchorMax(0,0),V.setPivot(0,0);const W=H.addComponent(j.bE_);W.Container.bind(hs.zw.UnifiedStoreButton).toConstantValue(k),W.Container.bind(hs.zw.UnifiedStoreButtonName).toConstantValue($.name),W.Container.bind(hs.zw.UnifiedStoreButtonImageFrame).toConstantValue($.imageFrame),W.Container.bind(hs.zw.UnifiedStoreButtonIconFrame).toConstantValue($.iconFrame),W.Container.bind(hs.zw.UnifiedStoreSegmentButtonName).toConstantValue(null!==(U=null===(B=$.segmentData)||void 0===B?void 0:B[hs.zw.UnifiedStoreSegmentButtonName])&&void 0!==U?U:$.name),W.Container.bind(hs.zw.UnifiedStoreSegmentDestinationName).toConstantValue(null!==(G=null===(F=$.segmentData)||void 0===F?void 0:F[hs.zw.UnifiedStoreSegmentDestinationName])&&void 0!==G?G:void 0),this._prefabLoader.loadWithDependenciesFromGUID(Rt.l.UnifiedStoreButton,H).catch(j.RQr.createHandler(`Failed to load unified store button prefab for the button named ${$.name}.`)),this._gridLayout.GameObject.addChild(H)}))}};(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],UO.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.MnK)(j.JTA),(0,G.Sn)("design:type",j.JTA)],UO.prototype,"_gridLayout",void 0),UO=(0,G.Cg)([(0,j.EVk)("UnifiedStoreButtonGrid",W.Y.uiUnifiedStore)],UO);var FO=U(49569);let GO=class extends j.uAl{open(){const{enabled:k}=(0,Bt.G)(FO.Y);if(k)return void tt.q.instance.prodigy.open.dynamicStore({origin:{originType:ui.$N.HudClick,originId:Is.k.UnifiedStore}});const B=this._currentPlayer.player.data.zone,U=Object.values(kO.p1).find((k=>k.zone&&(null==B?void 0:B.includes(k.zone))));let F;U&&(F=(0,kO.Bi)(U)),F?tt.q.instance.prodigy.open.store(F,void 0,void 0,{interfaceType:ui.Wm.Shop,instanceType:fi.N.ShopVisit,originType:ui.$N.HudClick}):tt.q.instance.prodigy.open.prefabMenu(Rt.l.UnifiedStoreBase,void 0,!0,!1,!0,void 0,{interfaceName:us.B.UnifiedStoreBase,interfaceType:ui.Wm.Menu,originType:ui.$N.HudClick,originID:Is.k.UnifiedStore,instanceType:fi.N.Interface},!0,!1,void 0,!0)}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],GO.prototype,"_currentPlayer",void 0),GO=(0,G.Cg)([(0,j.EVk)("UnifiedStoreHudButton",W.Y.uiUnifiedStore)],GO);let jO=class extends j.uAl{constructor(){super(...arguments),this.canBake=!0,this.bakeOnCreate=!0,this._defaultRenderComponent=null,this._originalTexture=null}create(){super.create(),this.setUpTextureFunctions(),this.bakeOnCreate&&this.bakeTexture()}setUpTextureFunctions(){this._defaultRenderComponent instanceof Ke._?(this._setTextureFunction=this.setImageTexture,this._getTextureFunction=this.getImageTexture):this._defaultRenderComponent instanceof j.vYh&&(this._setTextureFunction=this.setGraphicTexture,this._getTextureFunction=this.getGraphicTexture)}findObjectFilters(){return this.gameObject.findComponentsInChildren(ad.b).reduce(((k,B)=>(k.push(...B.filterList),k)),[])}bakeTexture(){var k,B,U;if(!this.canBake)return;const F=this.findObjectFilters(),G=[new j.dbg];G[0].filters=F,this._originalTexture=null!==(B=null===(k=this._getTextureFunction)||void 0===k?void 0:k.call(this))&&void 0!==B?B:null,this._originalTexture?(this._bakeTexture=new j.X2n(this._originalTexture,G),null===(U=this._setTextureFunction)||void 0===U||U.call(this,this._bakeTexture)):j.VyI.log("No starting texture found for BakeTextureComponent",j.$bb.Warning)}unbakeTexture(){var k;this._originalTexture&&(null===(k=this._setTextureFunction)||void 0===k||k.call(this,this._originalTexture)),this.destroyTexture()}destroyTexture(){var k;null===(k=this._bakeTexture)||void 0===k||k.destroy()}getImageTexture(){const k=this._defaultRenderComponent;return tt.q.instance.game.cache.getTexture(k.getImageKey(),k.getFrame())}setImageTexture(k){this._defaultRenderComponent.sprite.setTexture(k)}setGraphicTexture(k){this._defaultRenderComponent.setTexture(k)}getGraphicTexture(){const k=this._defaultRenderComponent;return tt.q.instance.game.cache.getTexture(k.atlasKey,k.frame)}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jO.prototype,"canBake",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jO.prototype,"bakeOnCreate",void 0),(0,G.Cg)([(0,j.Pqz)(j.y4o),(0,G.Sn)("design:type",j.y4o)],jO.prototype,"_defaultRenderComponent",void 0),jO=(0,G.Cg)([(0,j.EVk)("BakeTexture",W.Y.ui)],jO);let $O=class extends j.uAl{create(){super.create(),this._button&&this._button.onInputDown.add(this.playSFX,this)}destroy(){this._button.onInputDown.removeAll(this),super.destroy()}playSFX(){this._button.getButtonState()===Ku.K.Disabled?this._disabledSoundEffect.playSFX():this._buttonSoundEffect.playSFX()}};(0,G.Cg)([(0,j.MnK)(oa),(0,G.Sn)("design:type",oa)],$O.prototype,"_buttonSoundEffect",void 0),(0,G.Cg)([(0,j.MnK)(oa),(0,G.Sn)("design:type",oa)],$O.prototype,"_disabledSoundEffect",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],$O.prototype,"_button",void 0),$O=(0,G.Cg)([(0,j.EVk)("ButtonStateSoundEffect",W.Y.ui)],$O);U(47287);let HO=class extends j.uAl{updateText(k){this._buttonObject.children.forEach((B=>{const U=B.findComponentInChildren(vs.R);null==U||U.setLocalizationKey(k)}))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],HO.prototype,"_buttonObject",void 0),HO=(0,G.Cg)([(0,j.EVk)("ChangeButtonText",j.YH6.ui)],HO);let VO=class extends j.uAl{constructor(){super(...arguments),this.offset=new j.I9Y(0,0),this._track=!1,this._isTracking=!1}get source(){return this._source}set source(k){this.setUpTracking(!1),this._source=k,this.setUpTracking(this._track)}get track(){return this._track}set track(k){this._track=k,this.setUpTracking(k)}create(){super.create(),this.setUpTracking(this._track)}destroy(){this.track=!1,super.destroy()}copy(){var k;if(!this._source)return null;const B=null!==(k=this.target)&&void 0!==k?k:this.GameObject,U={x:this._source.transform.worldPosition.x+this.offset.x,y:this._source.transform.worldPosition.y+this.offset.y};return B.transform.worldPosition=U,B.transform.localPosition}setUpTracking(k){this._source&&k!==this._isTracking&&(k?this._source.transform.onWorldMatrixChanged.add(this.copy,this):this._source.transform.onWorldMatrixChanged.remove(this.copy,this),this._isTracking=k)}};(0,G.Cg)([(0,j.ERr)(),(0,j.YLv)("GameObject to copy position from"),(0,G.Sn)("design:type",j._mx),(0,G.Sn)("design:paramtypes",[j._mx])],VO.prototype,"source",null),(0,G.Cg)([(0,j.ERr)(),(0,j.YLv)("GameObject to copy position to (optional)"),(0,G.Sn)("design:type",j._mx)],VO.prototype,"target",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],VO.prototype,"offset",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean),(0,G.Sn)("design:paramtypes",[Boolean])],VO.prototype,"track",null),VO=(0,G.Cg)([(0,j.EVk)("CopyPosition",W.Y.ui,"Copy the position of another `GameObject` when invoking `copy()`")],VO);let WO=class extends j.uAl{create(){super.create(),this._changePageButtons.onPageChanged.add(this.updateText,this),this._changePageButtons.onMaxPageChanged.add(this.updateText,this),this.updateText()}destroy(){this._changePageButtons.onPageChanged.remove(this.updateText,this),this._changePageButtons.onMaxPageChanged.remove(this.updateText,this),super.destroy()}updateText(){this._pageDisplayText.text=this._localizationSystem.getText(this._currentPageLocalizationKey,this._changePageButtons.currentPage,this._changePageButtons.maximumPage)}};(0,G.Cg)([(0,j.MnK)(AC.a),(0,G.Sn)("design:type",AC.a)],WO.prototype,"_changePageButtons",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],WO.prototype,"_currentPageLocalizationKey",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],WO.prototype,"_pageDisplayText",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],WO.prototype,"_localizationSystem",void 0),WO=(0,G.Cg)([(0,j.EVk)("CurrentPageDisplay",W.Y.uiPagination)],WO);let qO=class extends j.uAl{constructor(){super(...arguments),this._texts=[],this._nonFadeTimeMs=2500,this._fadeInTimeMs=2500,this._fadeOutTimeMs=2500,this._currentTextIndex=0}startCycle(){0!==this._texts.length?(this._currentTextIndex=0,this._texts.forEach((k=>{k.alpha=0})),this._texts[0].alpha=1,this.waitOnCurrentText()):j.VyI.log("MemberJarCyclingText: Texts array is empty",j.$bb.Warning)}waitOnCurrentText(){this._nonFadeTimer=tt.q.instance.game.time.create(!1),this._nonFadeTimer.addTimer(this._nonFadeTimeMs,this.fadeOutCurrentText,this),this._nonFadeTimer.start()}fadeOutCurrentText(){const k=this._texts[this._currentTextIndex];this._activeTween=tt.q.instance.game.add.tween(k,this).to({alpha:0},this._fadeOutTimeMs,j.GS3.Linear.None,!0),this._activeTween.onTweenComplete.addOnce((()=>{this._activeTween=null,this.fadeInNextText()}))}fadeInNextText(){this._currentTextIndex=(this._currentTextIndex+1)%this._texts.length;const k=this._texts[this._currentTextIndex];this._activeTween=tt.q.instance.game.add.tween(k,this).to({alpha:1},this._fadeInTimeMs,j.GS3.Cubic.InOut,!0),this._activeTween.onTweenComplete.addOnce((()=>{this._activeTween=null,this.waitOnCurrentText()}))}destroy(){this._activeTween&&(tt.q.instance.game.tweens.remove(this._activeTween),this._activeTween=null),tt.q.instance.game.time.destroy(this._nonFadeTimer),this._nonFadeTimer=null,super.destroy()}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",Array)],qO.prototype,"_texts",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qO.prototype,"_nonFadeTimeMs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qO.prototype,"_fadeInTimeMs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qO.prototype,"_fadeOutTimeMs",void 0),qO=(0,G.Cg)([(0,j.EVk)("CyclingText",W.Y.ui)],qO);var KO=U(82366);let zO=class extends j.y4o{constructor(){super(...arguments),this._pageCount=1,this._currentPage=0,this._dotRadius=5,this._dotSpacing=10,this._selectedPageColor="#8c8c8c",this._selectedPageAlpha=1,this._unselectedPageColor="#cccccc",this._unselectedPageAlpha=1,this._pageTransitionTimeMs=500,this._pageDots=[]}create(){super.create(),this.setRootContainer(new $e.Container),this.createPageDot(),this.setPageCount(this._pageCount),this.setCurrentPage(this._currentPage,0)}destroy(){this._pageDotTexture.destroy(),super.destroy()}getDimensions(){return new j.or0(this._totalWidth,2*this._dotRadius)}setPageCount(k){for(;this._pageDots.length>k;)this._pageDots.pop().destroy();const B=this.getRootContainer();for(;this._pageDots.length{G.tint=$c.TZ.lerpRgb(G.tintValue,B,k.percent)})).start()}}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],zO.prototype,"_pageCount",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],zO.prototype,"_currentPage",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],zO.prototype,"_dotRadius",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],zO.prototype,"_dotSpacing",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],zO.prototype,"_selectedPageColor",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],zO.prototype,"_selectedPageAlpha",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],zO.prototype,"_unselectedPageColor",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],zO.prototype,"_unselectedPageAlpha",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],zO.prototype,"_pageTransitionTimeMs",void 0),zO=(0,G.Cg)([(0,j.EVk)("DotPagination",W.Y.uiPagination)],zO);U(28829),U(96304);var YO=U(23365);let QO=class extends YO.s{constructor(){super(...arguments),this._durationMS=1e3,this._repeatCount=0,this.onHexCodeStringUpdate=new j.HN0,this.onHexCodeNumberUpdate=new j.HN0}startTween(){super.startTween(),this.doTween(this._from,this._to)}startTweenReverse(){super.startTween(),this.doTween(this._to,this._from)}doTween(k,B){const U="number"==typeof k?j.Q1f.numberToHexString(k).slice(0,-2):k,F="number"==typeof B?j.Q1f.numberToHexString(B).slice(0,-2):B;if(this.dispatchColorUpdate(U),!this._tween){const k={value:U};this._tween=j.W$e.instance.game.add.tween(k,this).to({value:F},this._durationMS,KA.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._repeatCount,this._yoyo),this._tween.onUpdate.add((()=>{if(k.value.startsWith("rgba")){const B=k.value.match(/\d+/g),U=$c.TZ.rgbToHex(parseInt(B[0]),parseInt(B[1]),parseInt(B[2]));this.dispatchColorUpdate(j.Q1f.numberToHexString(U).slice(0,-2))}})),this._tween.onTweenComplete.addOnce((()=>{this.destroyTween(),this.dispatchColorUpdate(F),this.onComplete.dispatch()}))}}dispatchColorUpdate(k){this.onHexCodeStringUpdate.dispatch(k),this.onHexCodeNumberUpdate.getBindingsCount()>0&&this.onHexCodeNumberUpdate.dispatch(j.Q1f.hexToRGB(k))}destroy(){this.onHexCodeStringUpdate.dispose(),this.onHexCodeNumberUpdate.dispose(),super.destroy()}};(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],QO.prototype,"_from",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],QO.prototype,"_to",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],QO.prototype,"_durationMS",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],QO.prototype,"_repeatCount",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],QO.prototype,"onHexCodeStringUpdate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],QO.prototype,"onHexCodeNumberUpdate",void 0),QO=(0,G.Cg)([(0,j.EVk)("HexColorCodeTween")],QO);var XO;U(68239);let ZO=XO=class extends j.uAl{set rarity(k){this.setupBannerWithRarity(k)}create(){super.create(),this.setupBannerWithRarity(this._rarity)}setupBannerWithRarity(k){this._rarity=k,this._bannerText.text=XO.RARITY_LOCALIZATION_KEYS[k],this._bannerText.fill=XO.FONT_COLOURS[k],this._bannerBackerCommon.active=k===io.E.Common,this._bannerBackerUncommon.active=k===io.E.Uncommon,this._bannerBackerRare.active=k===io.E.Rare,this._bannerBackerHeroic.active=k===io.E.Heroic,this._bannerBackerLegendary.active=k===io.E.Legendary}};ZO.FONT_COLOURS={[io.E.Common]:"#363636",[io.E.Uncommon]:"#363636",[io.E.Rare]:"#FFFFFF",[io.E.Heroic]:"#FFFFFF",[io.E.Legendary]:"#363636"},ZO.RARITY_LOCALIZATION_KEYS={[io.E.Common]:"RARITY_COMMON",[io.E.Uncommon]:"RARITY_UNCOMMON",[io.E.Rare]:"RARITY_RARE",[io.E.Heroic]:"RARITY_HEROIC",[io.E.Legendary]:"RARITY_LEGENDARY"},(0,G.Cg)([(0,j.gfw)(io.E),(0,G.Sn)("design:type",Number)],ZO.prototype,"_rarity",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],ZO.prototype,"_bannerText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ZO.prototype,"_bannerBackerCommon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ZO.prototype,"_bannerBackerUncommon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ZO.prototype,"_bannerBackerRare",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ZO.prototype,"_bannerBackerHeroic",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ZO.prototype,"_bannerBackerLegendary",void 0),ZO=XO=(0,G.Cg)([(0,j.EVk)("ItemRarityBanner",j.YH6.ui)],ZO);var JO;U(79424),U(89192);let tI=JO=class extends j.y4o{constructor(){super(...arguments),this._spinnerSpeed=3,this.onStateAvailable=new j.HN0}get spinningTween(){return this._spinningTween}create(){super.create();{const k=this._spinnerSpeed>=0?360:-360,B=JO.BASE_SPINNING_TIME_MS/Math.abs(this._spinnerSpeed);this._spinningTween=tt.q.instance.game.add.tween(this._spinnerImage.GameObject.transform,this).to({localRotation:k},B,j.GS3.Linear.None,!0,0,-1),this._hideFadeTime>0&&this.hide(this._hideFadeTime)}}destroy(){this._spinningTween&&(this._spinningTween.stop(),tt.q.instance.game.tweens.remove(this._spinningTween)),this._spinningTween=null,this.onStateAvailable.dispose(),super.destroy()}hide(k){tt.q.instance.game.add.tween(this._spinnerImage,this._spinnerImage).to({alpha:0},k,j.GS3.Linear.None,!0).onTweenComplete.addOnce((()=>{this.onStateAvailable.dispatch()}))}show(k){tt.q.instance.game.add.tween(this._spinnerImage,this._spinnerImage).to({alpha:1},k,j.GS3.Linear.None,!0)}};tI.BASE_SPINNING_TIME_MS=1e3,(0,G.Cg)([(0,j.MnK)(j.y4o),(0,G.Sn)("design:type",j.y4o)],tI.prototype,"_spinnerImage",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tI.prototype,"_spinnerSpeed",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tI.prototype,"_hideFadeTime",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],tI.prototype,"onStateAvailable",void 0),tI=JO=(0,G.Cg)([(0,j.EVk)("LoadingSpinner",W.Y.ui)],tI);U(56617);let eI=class extends pt._{constructor(){super(...arguments),this.localizedText=new j.HN0}destroy(){this.localizedText.dispose(),super.destroy()}localize(k=this.key){const B=this.localizer.getText(k);return this.localizedText.dispatch(B),B}getData(){return this.localizer.getText(this.key)}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],eI.prototype,"localizer",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],eI.prototype,"key",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],eI.prototype,"localizedText",void 0),eI=(0,G.Cg)([(0,j.EVk)("Localizer",W.Y.utility)],eI);let iI=class extends j.uAl{create(){super.create(),this._imageAndQuantityQuantity=this._imageAndQuantityRoot.findComponentInChildren(j.EYj)}setData(k){if(this._drop=k,k){La.l.removeAll(this._imageOnlyImage.legacyTransform.group,!0),La.l.removeAll(this._imageAndQuantityImage.legacyTransform.group,!0);const B=k.N>1;this._imageOnlyRoot.active=!B,this._imageAndQuantityRoot.active=B;const U=B?this._imageAndQuantityImage:this._imageOnlyImage;if(k.image){const[B,F]=TC.y.toInjectionParams(k.image);tt.q.instance.prodigy.create.sprite(0,0,B,F,void 0,(k=>{k.smoothed=!0,U.legacyTransform.group.addChild(k)}))}else tt.q.instance.prodigy.icon.createFromDataAdvanced(k,U.legacyTransform.group,0,0).then((([k,B])=>j.qFr.setSmoothed(B.texture,!0))).catch(j.RQr.createHandler(`LootCardWithQuantityComponent: Failed to create item icon ${k.type}-${k.ID}`));B&&(this._imageAndQuantityQuantity.text=k.N.toString())}}getData(){return this._drop}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iI.prototype,"_imageOnlyRoot",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iI.prototype,"_imageOnlyImage",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iI.prototype,"_imageAndQuantityRoot",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iI.prototype,"_imageAndQuantityImage",void 0),iI=(0,G.Cg)([(0,j.EVk)("LootCardWithQuantityComponent",W.Y.adventureUi)],iI);U(90614),U(43714);let sI=class extends YO.s{constructor(){super(...arguments),this._from=0,this._to=1,this._durationMS=1e3,this._repeatCount=0,this.onUpdate=new j.HN0,this.roundValues=!1}startTween(){if(super.startTween(),!this._tween){const k={value:this._from};this._tween=j.W$e.instance.game.add.tween(k,this).to({value:this._to},this._durationMS,KA.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._repeatCount,this._yoyo),this._tween.onUpdate.add((()=>{const B=this.roundValues?Math.round(k.value):k.value;this.onUpdate.dispatch(B)})),this._tween.onTweenComplete.addOnce((()=>{this.destroyTween();const k=this.roundValues?Math.round(this._to):this._to;this.onUpdate.dispatch(k),this.onComplete.dispatch()}))}}destroy(){this.onUpdate.dispose(),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],sI.prototype,"_from",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],sI.prototype,"_to",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],sI.prototype,"_durationMS",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],sI.prototype,"_repeatCount",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],sI.prototype,"onUpdate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],sI.prototype,"roundValues",void 0),sI=(0,G.Cg)([(0,j.EVk)("NumericTween")],sI);U(33744);let nI=class extends j.uAl{constructor(){super(...arguments),this.offset=0,this.clampPosition=!1,this.minPosition=0,this.maxPosition=0}create(){var k;super.create(),this.setContainerPosition(null===(k=this.anchorTarget.fillTransform)||void 0===k?void 0:k.rectTransformDimensions.width),this.anchorTarget.onProgress.add((()=>{var k;this.setContainerPosition(null===(k=this.anchorTarget.fillTransform)||void 0===k?void 0:k.rectTransformDimensions.width)})),this.anchorTarget.onToggleAnchors.add((k=>{this.gameObject.active=k}))}destroy(){var k,B;super.destroy(),null===(k=this.anchorTarget.onProgress)||void 0===k||k.dispose(),null===(B=this.anchorTarget.onToggleAnchors)||void 0===B||B.dispose()}setContainerPosition(k=0){const B=k-(this.isInnerContainer?this.container.rectTransformDimensions.width:0)+this.offset;this.container.posX=this.clampPosition?j.cj9.clamp(B,this.minPosition,this.maxPosition):B}};(0,G.Cg)([(0,j.MnK)(hf.a),(0,G.Sn)("design:type",hf.a)],nI.prototype,"anchorTarget",void 0),(0,G.Cg)([(0,j.MnK)(j.XVE),(0,G.Sn)("design:type",j.XVE)],nI.prototype,"container",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],nI.prototype,"offset",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],nI.prototype,"clampPosition",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],nI.prototype,"minPosition",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],nI.prototype,"maxPosition",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],nI.prototype,"isInnerContainer",void 0),nI=(0,G.Cg)([(0,j.EVk)("ProgressBarAnchor",W.Y.ui)],nI);let aI=class extends j.uAl{constructor(){super(...arguments),this.onFillValueIncrease=new j.HN0,this.onFillValueDecrease=new j.HN0,this.onFillValueUnchanged=new j.HN0,this.onBarFillValueMaxed=new j.HN0}listen(k,B,U){U-B>0?this.onFillValueIncrease.dispatch():U-B<0?this.onFillValueDecrease.dispatch():this.onFillValueUnchanged.dispatch(),U>=1&&this.onBarFillValueMaxed.dispatch()}destroy(){this.onFillValueDecrease.dispose(),this.onFillValueIncrease.dispose(),this.onFillValueUnchanged.dispose(),this.onBarFillValueMaxed.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],aI.prototype,"onFillValueIncrease",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],aI.prototype,"onFillValueDecrease",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],aI.prototype,"onFillValueUnchanged",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],aI.prototype,"onBarFillValueMaxed",void 0),aI=(0,G.Cg)([(0,j.EVk)("ProgressBarChangeListener",W.Y.ui)],aI);let rI=class extends j.uAl{countAsPercent(k,B,U){this._text.text=`${Math.floor(100*U)}%`}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],rI.prototype,"_text",void 0),rI=(0,G.Cg)([(0,j.EVk)("ProgressBarCounter")],rI);var oI;U(34958),U(12408),U(46459),U(41365);!function(k){k[k.None=0]="None",k[k.Value=1]="Value",k[k.Percentage=2]="Percentage",k[k.PercentagePreNormalized=3]="PercentagePreNormalized",k[k.Rounded=4]="Rounded",k[k.OneDecimal=5]="OneDecimal"}(oI||(oI={}));let hI=class extends j.uAl{constructor(){super(...arguments),this.valueDisplay=oI.Value,this.updateOnSettingChange=!1}postCreate(){var k,B;super.postCreate(),this._setting=Fb.B[this.settingType],void 0!==this._setting?(this._setting.onChanged.add(this.onSettingChange,this),this.label.text=this.getInjectedValue(j.$Bt.LocalizationService).getText(this._setting.data.name),this.slider.minValue=null!==(k=this._setting.data.minValue)&&void 0!==k?k:0,this.slider.maxValue=null!==(B=this._setting.data.maxValue)&&void 0!==B?B:this._setting.data.defaultValue,this.slider.value=this._setting.value,this.slider.onValueChanged.add(this.onSliderChange,this),this.updateValueText(),this.slider.value=this._setting.value):j.VyI.log(`SettingSlider: postCreate: setting is undefined, no setting named ${this.settingType} found`,j.$bb.Error)}destroy(){var k;null===(k=this._setting)||void 0===k||k.onChanged.remove(this.onSettingChange,this),this.slider.onValueChanged.remove(this.onSliderChange,this),this._setting=void 0,super.destroy()}updateValueText(){var k,B;if(!this.valueText)return;if(this.valueDisplay===oI.None)return void(this.valueText.GameObject.active=!1);this.valueText.GameObject.active=!0;const U=null!==(B=null===(k=this._setting)||void 0===k?void 0:k.value)&&void 0!==B?B:0;switch(this.valueDisplay){case oI.Value:this.valueText.text=U.toString();break;case oI.Percentage:this.valueText.text=`${Math.round(100*this.slider.normalizedValue)}%`;break;case oI.PercentagePreNormalized:this.valueText.text=`${Math.round(100*this.slider.value)}%`;break;case oI.Rounded:this.valueText.text=Math.round(U).toString();break;case oI.OneDecimal:this.valueText.text=U.toFixed(1)}}onSliderChange(k){void 0!==this._setting?(this._setting.setStoredValue(k),this.updateValueText()):j.VyI.log(`SettingSlider: onSliderChange: setting is undefined, no setting named ${this.settingType} found`,j.$bb.Error)}onSettingChange(k){this.updateOnSettingChange&&this.slider.value!==k&&(this.slider.value=k)}};(0,G.Cg)([(0,j.gfw)(Fb._),(0,G.Sn)("design:type",String)],hI.prototype,"settingType",void 0),(0,G.Cg)([(0,j.MnK)(Rh.H),(0,G.Sn)("design:type",Rh.H)],hI.prototype,"slider",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],hI.prototype,"label",void 0),(0,G.Cg)([(0,j.gfw)(oI),(0,G.Sn)("design:type",Number)],hI.prototype,"valueDisplay",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],hI.prototype,"valueText",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],hI.prototype,"updateOnSettingChange",void 0),hI=(0,G.Cg)([(0,j.EVk)("SettingSlider")],hI);var cI=U(95865);let dI=class extends cI.A{constructor(){super(...arguments),this._shakeDurationMs=1e3,this._amplitudeX=0,this._amplitudeY=0,this._repeatCount=0,this._disabled=!1}set disabled(k){this._disabled=k}startTween(){if(super.startTween(),!this._tween&&!this._disabled){const k=this._targetGameObject.transform;(0,ut.v)(!!k,"Cannot be attached to a GameObject without a transform");const B={amplitudeX:0,amplitudeY:0},U={x:k.localPosition.x,y:k.localPosition.y};this._tween=tt.q.instance.game.add.tween(B,this).to({amplitudeX:this._amplitudeX,amplitudeY:this._amplitudeY},this._shakeDurationMs,KA.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._repeatCount,this._yoyo),this._tween.onUpdate.add((()=>{const F=this._easing===KA.i.LinearNone?this._amplitudeX:B.amplitudeX,G=this._easing===KA.i.LinearNone?this._amplitudeY:B.amplitudeY;k.setPosition(U.x+Math.random()*F*2-F,U.y+Math.random()*G*2-G)})),this._tween.onTweenComplete.addOnce((()=>{this.destroyTween(),k.setPosition(U.x,U.y),this.onComplete.dispatch()}))}}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],dI.prototype,"_shakeDurationMs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],dI.prototype,"_amplitudeX",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],dI.prototype,"_amplitudeY",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],dI.prototype,"_repeatCount",void 0),dI=(0,G.Cg)([(0,j.EVk)("ShakeTransform",W.Y.motion)],dI);U(57103);let lI=class extends j.y4o{constructor(){super(...arguments),this._alpha=1,this._tint="#FFFFFF"}set alpha(k){this._alpha=k,this._sprite&&(this._sprite.alpha=k)}get alpha(){return this._alpha}set tint(k){this._tint=k,this._sprite&&(this._sprite.tint=$e.Color.shared.setValue(k.toLowerCase()).toNumber())}get tint(){return this._tint}create(){super.create(),this._atlas&&this.createTilingSprite().catch(j.RQr.createHandler("Failed to create tiling sprite"))}createTilingSprite(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this.gameObject.transform;if(!(k instanceof j.XVE))return;tt.q.instance.prodigy.load.isFileLoaded(this._atlas)||(yield tt.q.instance.prodigy.load.assetsAsPromise(this._atlas));const B=new $e.TilingSprite(tt.q.instance.game.cache.getTexture(this._atlas,this._frame),k.fullWidth,k.fullHeight);B.alpha=this._alpha,B.tint=$e.Color.shared.setValue(this._tint).toNumber(),this._sprite=B,this.setRootContainer(B)}))}getDimensions(){const k=this.getRootContainer();return k?new j.or0(k.width,k.height):j.or0.ZERO}};(0,G.Cg)([(0,j.W_S)(),(0,j.Bak)(),(0,G.Sn)("design:type",String)],lI.prototype,"_atlas",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],lI.prototype,"_frame",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],lI.prototype,"_alpha",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],lI.prototype,"_tint",void 0),lI=(0,G.Cg)([(0,j.EVk)("TiledUISprite",W.Y.ui)],lI);let uI=class extends((0,Wi.o)(j.y4o)){constructor(){super(...arguments),this._sizeOffset=j.I9Y.ZERO,this._tint="#FFFFFF",this._alpha=1,this._tilePositionSpeed=j.I9Y.ZERO,this._onSpriteLoaded=new j.HN0,this._containerSize=new j.or0,this._listenerCreated=!1}postCreate(){super.postCreate(),this.createBackground()}update(){if(super.update(),null!=this._tileSprite){const k=tt.q.instance.game.time.deltaMS/1e3;this._tileSprite.tilePosition.x+=this._tilePositionSpeed.x*k,this._tileSprite.tilePosition.y+=this._tilePositionSpeed.y*k}}destroy(){this._onSpriteLoaded.dispose(),this._container.destroy(),super.destroy()}getDimensions(){return this._containerSize.setTo(this._container.width,this._container.height),this._containerSize}createBackground(){this.createTiledBackground().catch((k=>{j.VyI.log(`There was an error creating a tiled background:\n${k}`,j.$bb.Error)}))}createTiledBackground(){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.prodigy.load.isFileLoaded(this._tilingGraphic)||(yield this._assetLoader.loadAssets([this._tilingGraphic])),null!=this._tileSprite&&(this._container.removeChild(this._tileSprite),this._tileSprite.destroy(),this._tileSprite=null);const k=tt.q.instance.game.cache.getTexture(this._tilingGraphic),B=this.GameObject.transform.rectTransformDimensions;null!=k&&(this._tileSprite=new $e.TilingSprite(k,B.width+this._sizeOffset.x,B.height+this._sizeOffset.y),this._tileSprite.tint=$e.utils.string2hex(this._tint),this._tileSprite.alpha=this._alpha,null==this._container&&(this._container=tt.q.instance.game.add.container(),this.setRootContainer(this._container)),this._container.addChild(this._tileSprite)),this._listenerCreated||(this.addListenerToSignal(this._rectTransform.onDimensionsChanged,this.createBackground.bind(this)),this._listenerCreated=!0),this._onSpriteLoaded.dispatch()}))}};(0,G.Cg)([(0,j.Cdj)(j.t5G.AssetLoader),(0,G.Sn)("design:type",Hi.A)],uI.prototype,"_assetLoader",void 0),(0,G.Cg)([(0,j.Pqz)(j.XVE),(0,G.Sn)("design:type",j.XVE)],uI.prototype,"_rectTransform",void 0),(0,G.Cg)([(0,j.i0J)(j.Z$z.SingleImage),(0,G.Sn)("design:type",String)],uI.prototype,"_tilingGraphic",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],uI.prototype,"_sizeOffset",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],uI.prototype,"_tint",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],uI.prototype,"_alpha",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],uI.prototype,"_tilePositionSpeed",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uI.prototype,"_onSpriteLoaded",void 0),uI=(0,G.Cg)([(0,j.EVk)("TilingSprite",j.YH6.ui,"Tiles a graphic contained inside the object RectTransform")],uI);let fI=class extends j.uAl{postCreate(){super.postCreate(),this.text.text="Interact for test log messages",this.slider.onValueChanged.add((()=>{this.text.text=`Slider: ${this.slider.value.toString()}`}))}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],fI.prototype,"text",void 0),(0,G.Cg)([(0,j.MnK)(Rh.H),(0,G.Sn)("design:type",Rh.H)],fI.prototype,"slider",void 0),fI=(0,G.Cg)([(0,j.EVk)("UI Test",j.YH6.ui)],fI);var bI,pI=U(89360),vI=U(25286),gI=U(3119),mI=U(8096);let yI=bI=class extends j.uAl{constructor(){super(...arguments),this.onProgressReceived=new j.HN0,this.onTimeRemaining=new j.HN0,this.onItemDataReceived=new j.HN0,this.paramSwapItemData=new j.HN0,this.onMemberItemDataReceived=new j.HN0,this.paramSwapMemberItemData=new j.HN0,this.onSplashImageReceived=new j.HN0,this.onPreviousDataExists=new j.HN0,this.onAllDataReceived=new j.HN0,this.onAutoSurface=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.getWeeklyChallengeData()}getWeeklyChallengeData(){this._waitingForLoad&&(this._waitingForLoad.active=!1),pI.h.instance.getData().then((k=>{var B,U,F,G;if(!(null==k?void 0:k.weeklyChallengeData))throw new Error("Data object is undefined.");if(!k.weeklyChallengeData.currentChallenge)throw new Error("No current challenge exists.");this._waitingForLoad&&(this._waitingForLoad.active=!0);const $=k.weeklyChallengeData.currentChallenge.progressCount,H=k.weeklyChallengeData.currentChallenge.goalCount;this.onProgressReceived.dispatch($,H);const V=k.weeklyChallengeData.timeRemaining;this.onTimeRemaining.dispatch(V);const W=null===(B=k.weeklyChallengeData.previousChallenge)||void 0===B?void 0:B.reward.default.ID,q=null===(U=k.weeklyChallengeData.previousChallenge)||void 0===U?void 0:U.reward.default.type,K=null===(F=k.weeklyChallengeData.previousChallenge)||void 0===F?void 0:F.reward.member.ID,z=null===(G=k.weeklyChallengeData.previousChallenge)||void 0===G?void 0:G.reward.member.type,Y=k.weeklyChallengeData.currentChallenge.reward.default.ID,Q=k.weeklyChallengeData.currentChallenge.reward.default.type,X=k.weeklyChallengeData.currentChallenge.reward.member.ID,Z=k.weeklyChallengeData.currentChallenge.reward.member.type,J=k.weeklyChallengeData.previousChallenge&&k.weeklyChallengeData.previousChallenge.progressCount>=k.weeklyChallengeData.previousChallenge.goalCount&&!this.checkRewardOwned(q,W,z,K)&&tt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_WEEKLY_CHALLENGE,ls.B.BREADCRUMB_FIRST_CHALLENGE_COMPLETE);J?(this.onItemDataReceived.dispatch(q,W),this.onMemberItemDataReceived.dispatch(z,K),this.paramSwapItemData.dispatch(W,q),this.paramSwapMemberItemData.dispatch(K,z)):(this.onItemDataReceived.dispatch(Q,Y),this.onMemberItemDataReceived.dispatch(Z,X),this.paramSwapItemData.dispatch(Y,Q),this.paramSwapMemberItemData.dispatch(X,Z));let et=!1;if($>=H&&this.checkRewardOwned(Q,Y,Z,X)&&(et=!0),et&&-1===k.weeklyChallengeData.timeRemaining)throw new Error("No future challenge exists.");this.onAllDataReceived.dispatch($,H,V,k.isTransition,et,J);const it=k.weeklyChallengeData.currentChallenge.splashImage;if(j.Aq$.isDefined(it)&&it.length>0&&this.onSplashImageReceived.dispatch(k.weeklyChallengeData.currentChallenge.splashImage),J){const k=tt.q.instance.prodigy.open.findMenuByType(gI.o);null==k||k.forceClose(),this.onPreviousDataExists.dispatch()}et||J||this.checkAutoSurface()})).catch((k=>{j.VyI.log(`Weekly Challenge feature is disabled. WeeklyChallengeDataComponent found no data: ${j.RQr.stringify(k)}`,j.$bb.Verbose),this._disableOnError&&(this._disableOnError.active=!1)}))}checkRewardOwned(k,B,U,F){const G="dorm"===k?this._player.player.house.getOwned(B)>0:this._player.player.backpack.hasItem(k,B)>0,j="dorm"===U?this._player.player.house.getOwned(F)>0:this._player.player.backpack.hasItem(U,F)>0;return G||j}checkAutoSurface(){if(bI._isSessionCountUpdated)return;if(tt.q.instance.prodigy.open.isMenuOpen(vI.g)||tt.q.instance.prodigy.open.isMenuOpen(gI.o)||tt.q.instance.prodigy.open.isMenuOpen(mI.a))return;bI._isSessionCountUpdated=!0;const k=this._player.player.data;if(j.Aq$.isDefined(k.weeklySessionTimestamp)||(k.weeklySessionTimestamp=0),j.Aq$.isDefined(k.weeklySessionCount)){jp.R.getISOWeekNumber(k.weeklySessionTimestamp)===jp.R.getISOWeekNumber(Date.now())?k.weeklySessionCount+=1:k.weeklySessionCount=0}else k.weeklySessionCount=0;pI.h.instance.autoSurfaceSessionInterval>0&&k.weeklySessionCount%pI.h.instance.autoSurfaceSessionInterval==0?this.onAutoSurface.dispatch():0===pI.h.instance.autoSurfaceSessionInterval&&(Qt.J.isDateWithinSameDay(new Date,new Date(k.weeklySessionTimestamp))||this.onAutoSurface.dispatch()),k.weeklySessionTimestamp=Date.now(),this._player.player.updated=!0}destroy(){this.onProgressReceived.dispose(),this.onTimeRemaining.dispose(),this.onItemDataReceived.dispose(),this.paramSwapItemData.dispose(),this.onMemberItemDataReceived.dispose(),this.paramSwapMemberItemData.dispose(),this.onSplashImageReceived.dispose(),this.onPreviousDataExists.dispose(),this.onAllDataReceived.dispose(),this.onAutoSurface.dispose(),super.destroy()}};var _I;yI._isSessionCountUpdated=!1,(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],yI.prototype,"_player",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"onProgressReceived",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"onTimeRemaining",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"onItemDataReceived",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"paramSwapItemData",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"onMemberItemDataReceived",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"paramSwapMemberItemData",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"onSplashImageReceived",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"onPreviousDataExists",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"onAllDataReceived",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],yI.prototype,"_waitingForLoad",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],yI.prototype,"_disableOnError",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"onAutoSurface",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],yI.prototype,"_runOnLoad",void 0),yI=bI=(0,G.Cg)([(0,j.EVk)("WeeklyChallengeData",W.Y.data)],yI),function(k){k.Standard="standard",k.Hidden="hidden",k.RewardAvailable="reward_available"}(_I||(_I={}));let EI=class extends j.uAl{constructor(){super(...arguments),this.onRewardUi=new j.HN0,this.onNotRewardUi=new j.HN0,this.uiMode=_I.Standard}updateProgressDisplay(k,B,U=0,F=!1,G=!1,$=!1){this.clearDisplay();const H=Boolean(k>=B);H&&!G?this.onRewardUi.dispatch():this.onNotRewardUi.dispatch();const V=Boolean((H&&F||!H)&&!G);this._progressBarObject.active=V,this._timeRemainingObject.active=V,V&&(this._timeRemainingTimer&&(U>=0?this._timeRemainingTimer.setCountdownTimeMS(U):this._timeRemainingObject.active=!1),this._progressBar&&(this._progressShineObject.active=F,F&&this._shineAnimation.playAnimation(this._shineAnimationName,!1,!0),H?(this._progressBar.setValue(1),this._progressBar.setBarText(tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(this._progressBarCompleteLocalizedTextKey)),this._progressBar.setFillColor(this._progressBarCompleteFillColor),this._progressBar.setOuterColor(this._progressBarCompleteOutlineColor),this._progressBar.setTextOutlineColor(this._progressBarCompleteOutlineColor),F&&this._claimRewardTimeout.startTimer()):(this._progressBar.setValue(k/B),this._progressBar.setBarText(`${k} / ${B}`)))),!H||G||F||this._claimRewardTimeout.onTimeout.dispatch(),this._nextChallengeObject.active=G,G&&this._nextChallengeTimer&&(U>=0?this._nextChallengeTimer.setCountdownTimeMS(U):this._nextChallengeObject.active=!1),this.toggleOverlayOnClick(!H&&!$)}clearDisplay(){this._notificationBadgeObject.active=!1,this._claimRewardObject.active=!1,this._nextChallengeObject.active=!1,this._timeRemainingObject.active=!1,this._progressShineObject.active=!1,this._progressBarObject.active=!1,this._overlayButton.onClick.active=!1,this.uiMode=_I.Standard}shiftHudUi(k){this.uiMode===_I.Hidden&&this._hudUi.transform.setPositionX(k)}toggleOverlayOnClick(k){this._overlayButton.onClick.active=k,this._overlayButton.useHandCursor=k}destroy(){this.onRewardUi.dispose(),this.onNotRewardUi.dispose(),super.destroy()}};(0,G.Cg)([(0,j.MnK)(fg.e),(0,G.Sn)("design:type",fg.e)],EI.prototype,"_notificationBadge",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],EI.prototype,"_timeRemainingTimer",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],EI.prototype,"_nextChallengeTimer",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],EI.prototype,"_shineAnimation",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],EI.prototype,"_shineAnimationName",void 0),(0,G.Cg)([(0,j.MnK)(ys.z),(0,G.Sn)("design:type",ys.z)],EI.prototype,"_progressBar",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],EI.prototype,"_progressBarCompleteFillColor",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],EI.prototype,"_progressBarCompleteOutlineColor",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],EI.prototype,"_progressBarCompleteLocalizedTextKey",void 0),(0,G.Cg)([(0,j.MnK)(fh.E),(0,G.Sn)("design:type",fh.E)],EI.prototype,"_claimRewardTimeout",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],EI.prototype,"_overlayButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],EI.prototype,"_notificationBadgeObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],EI.prototype,"_claimRewardObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],EI.prototype,"_nextChallengeObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],EI.prototype,"_timeRemainingObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],EI.prototype,"_progressShineObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],EI.prototype,"_progressBarObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],EI.prototype,"_hudUi",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],EI.prototype,"onRewardUi",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],EI.prototype,"onNotRewardUi",void 0),EI=(0,G.Cg)([(0,j.EVk)("WeeklyChallengePanelController",j.YH6.ui)],EI);let wI=class extends j.uAl{constructor(){super(...arguments),this._showNotification=new j.HN0,this._hideNotification=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.updateNotification()}destroy(){this._showNotification.dispose(),this._hideNotification.dispose(),super.destroy()}updateNotification(){!this.hasSeenCrystalCaverns()&&this.isCrystalCavernsEnabled()||this.isTitanUnlocked()&&this.isNewTitan()||this.shouldShowAcademyIndicator()||this.shouldShowKeystoneIndicator()?this._showNotification.dispatch():this._hideNotification.dispatch()}hasSeenCrystalCaverns(){return this._breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_DUNGEONS,ls.B.BREADCRUMB_STARTED_CRYSTAL_CAVERNS)}isCrystalCavernsEnabled(){return tt.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableCrystalCaverns",!0)}isNewTitan(){const k=tt.q.instance.prodigy.titansNetworkHandler;return k.isTitanAlive()&&k.isNewTitan()}isTitanUnlocked(){return this._featureRequirements.meetsRequirementsDeprecated(8)}shouldShowAcademyIndicator(){return this._breadcrumbManager.isBreadcrumbComplete(ls.B.BREADCRUMB_UNLOCK_ACADEMY,ls.B.BREADCRUMB_UNLOCK_ACADEMY_NOOT_DIALOGUE)&&!this._breadcrumbManager.isBreadcrumbComplete(ls.B.BREADCRUMB_UNLOCK_ACADEMY,ls.B.BREADCRUMB_CLICKED_WORLD_MAP_BUTTON)}shouldShowKeystoneIndicator(){return Zo.N.anyKeystonesToPlace()&&this._breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_ACADEMY_TOWERS,ls.B.BREADCRUMB_ACADEMY_NO_KEYSTONES)}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],wI.prototype,"_showNotification",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],wI.prototype,"_hideNotification",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],wI.prototype,"_runOnLoad",void 0),(0,G.Cg)([(0,j.Cdj)("db5-fb6e"),(0,G.Sn)("design:type",Object)],wI.prototype,"_featureRequirements",void 0),(0,G.Cg)([(0,j.Cdj)("12f-4e29"),(0,G.Sn)("design:type",sh.F)],wI.prototype,"_breadcrumbManager",void 0),wI=(0,G.Cg)([(0,j.EVk)("WorldMapButtonNotificationLogic")],wI);var TI;U(45902),U(72849);!function(k){k.Add="add",k.Subtract="subtract",k.Multiply="multiply",k.Divide="divide",k.Remainder="remainder"}(TI||(TI={}));let SI=class extends j.uAl{constructor(){super(...arguments),this.operation=TI.Add,this.operand=1,this.onResult=new j.HN0}run(k){switch(this.operation){default:case TI.Add:return this.onResult.dispatch(k+this.operand);case TI.Subtract:return this.onResult.dispatch(k-this.operand);case TI.Multiply:return this.onResult.dispatch(k*this.operand);case TI.Divide:return this.onResult.dispatch(k/this.operand);case TI.Remainder:return this.onResult.dispatch(k%this.operand)}}destroy(){this.onResult.dispose(),super.destroy()}};(0,G.Cg)([(0,j.gfw)(TI),(0,G.Sn)("design:type",String)],SI.prototype,"operation",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],SI.prototype,"operand",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],SI.prototype,"onResult",void 0),SI=(0,G.Cg)([(0,j.EVk)("Arithmetic",W.Y.utility)],SI);U(80882);var AI=U(88253);let CI=class extends j.uAl{constructor(){super(...arguments),this.runOnCreate=!1,this._watchMode=!1,this._watchInterval=1e3,this.testIsPlaying=!1,this.onCutsceneChange=new j.HN0,this.onIsPlaying=new j.HN0,this.onIsNotPlaying=new j.HN0,this.onStartedPlaying=new j.HN0,this.onStoppedPlaying=new j.HN0,this.onDebugPrintVariables=new j.HN0,this.wasPlaying=!1,this._firstUpdateCalled=!1}get watchMode(){return this._watchMode}set watchMode(k){this._watchMode=k,!this.GameObject.isDestroyed&&this._firstUpdateCalled&&(k?this.startWatchMode():this.stopWatchMode())}create(){super.create(),this.runOnCreate&&(this.check(),this.watchMode&&this.startWatchMode())}firstUpdate(){this._firstUpdateCalled=!0}startWatchMode(){this.stopWatchMode(),this._watchIntervalRefId=setInterval((()=>this.check()),this._watchInterval)}stopWatchMode(){clearInterval(this._watchIntervalRefId)}check(k=!1){const B=AI.M.isCutscenePlaying();this.dispatchSignals(B,k),this.dispatchDebugSignals(),this.wasPlaying=B}dispatchSignals(k,B=!1){(this.wasPlaying!==k||B)&&(this.onCutsceneChange.dispatch(k),k&&this.onIsPlaying.dispatch(),!k&&this.onIsNotPlaying.dispatch(),this.wasPlaying&&this.onStoppedPlaying.dispatch(),!this.wasPlaying&&this.onStartedPlaying.dispatch())}destroy(){this.stopWatchMode(),this.onCutsceneChange.dispose(),this.onIsPlaying.dispose(),this.onIsNotPlaying.dispose(),this.onStartedPlaying.dispose(),this.onStoppedPlaying.dispose(),this.onDebugPrintVariables.dispose(),super.destroy()}dispatchDebugSignals(){const k=AI.M.getCutsceneDeterminers();this.onDebugPrintVariables.dispatch(JSON.stringify(k,void 0,2))}};(0,G.Cg)([(0,j.vkK)(),(0,j.YLv)("Run on create"),(0,G.Sn)("design:type",Boolean)],CI.prototype,"runOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,j.YLv)("enabled will invoke `check()` method on a given interval"),(0,G.Sn)("design:type",Boolean)],CI.prototype,"_watchMode",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.YLv)("Interval in milliseconds where`check()` will be invoked"),(0,G.Sn)("design:type",Number)],CI.prototype,"_watchInterval",void 0),(0,G.Cg)([(0,j.vkK)(),(0,j.YLv)("TEST_ONLY_PROPERTY - Used only for testing in editor"),(0,G.Sn)("design:type",Boolean)],CI.prototype,"testIsPlaying",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Fires the current prediction for a cutscene playing(true/false) "),(0,G.Sn)("design:type",j.HN0)],CI.prototype,"onCutsceneChange",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Fires only when the cutscene is playing"),(0,G.Sn)("design:type",j.HN0)],CI.prototype,"onIsPlaying",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Fires only when the cutscene is not playing"),(0,G.Sn)("design:type",j.HN0)],CI.prototype,"onIsNotPlaying",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Fires when a cutscene starts playing"),(0,G.Sn)("design:type",j.HN0)],CI.prototype,"onStartedPlaying",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Fires when a cutscene stops playing"),(0,G.Sn)("design:type",j.HN0)],CI.prototype,"onStoppedPlaying",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Fires with checked variables"),(0,G.Sn)("design:type",j.HN0)],CI.prototype,"onDebugPrintVariables",void 0),CI=(0,G.Cg)([(0,j.EVk)("CutsceneChecker",W.Y.utility,"Utility component that tries to guess if a cutscene is playing and respond with signals")],CI);let OI=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.debug=!1,this.zeroOutPlaceholderTransforms=!1,this.resizePlaceholderToObject=!1,this.prefabGuid=null,this.preloadDependencies=!0,this.spawnedObjectWidth=100,this.spawnedObjectHeight=100,this.staggerPlaceholderCreation=!1,this.onPlaceholdersCreated=new j.HN0,this.onObjectScreenEntered=new j.HN0,this.onObjectScreenExited=new j.HN0,this.placeholders=[],this._pendingPlaceholderOperations=new Map}create(){var k;super.create(),this.staggerPlaceholderCreation=null!==(k=window.asdf)&&void 0!==k?k:this.staggerPlaceholderCreation,this._objectPool=new j.iyL((()=>this.spawnPrefab())),this._objectPool.autoRecycleOnDisable=!1,this._deadPoolContainer||(this._deadPoolContainer=new j._mx(this.gameObject),this._deadPoolContainer.name=`${this.gameObject.name} dead pool`,this._deadPoolContainer.active=!1,this._deadPoolContainer.addComponent(j.dLy))}postCreate(){var k;const B=null===(k=this.container)||void 0===k?void 0:k.findComponent(j.XVE);j.Aq$.isDefined(B)&&this.addListenerToSignal(B.onDimensionsChanged,(()=>{this.checkAllPlaceholdersOnScreen()}))}update(){super.update(),this._pendingPlaceholderOperations.forEach(((k,B)=>{var U;if(null!==k){if(0===B.children.length){const U=this._objectPool.getObject();if(Nt.d.updateInjectedValues(U,this._injectionData[k]),U.parent=B,this.resizePlaceholderToObject){const k=U.findComponent(j.XVE),F=B.findComponent(j.XVE);F.setSizeDelta(k.widthDelta,k.heightDelta),k.onDimensionsChanged.add((()=>{F.setSizeDelta(k.widthDelta,k.heightDelta)}),this)}this.onObjectScreenEntered.dispatch(U)}}else for(const F of B.children)this.onObjectScreenExited.dispatch(F),this._objectPool.recycleObject(F),null===(U=F.findComponent(j.XVE))||void 0===U||U.onDimensionsChanged.removeAll(this),F.parent=this._deadPoolContainer})),this._pendingPlaceholderOperations.clear()}destroy(){this._injectionData=null,this.onObjectScreenEntered.dispose(),this.onObjectScreenExited.dispose(),this.onPlaceholdersCreated.dispose(),super.destroy()}spawnPrefabsFromDataArray(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=[...k];if(this._injectionData=B,this.preloadDependencies&&(yield this.preloadPrefab(),B!==this._injectionData))return;const U=this.staggerPlaceholderCreation?this.getInjectedValue(j.t5G.FrameWorkManager):void 0;yield j.Ff4.completeGeneratorAsync(this.createPlaceholders(B),U),this.checkAllPlaceholdersOnScreen(),this.onPlaceholdersCreated.dispatch()}))}destroySpawnedPrefabs(){var k;this._injectionData=null;for(let B;B=null===(k=this._objectPool.aliveList.head)||void 0===k?void 0:k.object;)this._objectPool.recycleObject(B);this._objectPool.flush(!0);for(const B of this.placeholders)B.destroy();this.placeholders.length=0,this._pendingPlaceholderOperations.clear()}updateInjectionData(k,B){var U;ct.merge(this._injectionData[k],B),(null===(U=this.placeholders[k].children[0])||void 0===U?void 0:U.active)&&Nt.d.updateInjectedValues(this.placeholders[k].children[0],B)}*createPlaceholders(k){for(let B=0;B{this.checkPlaceholderOnScreen(U,k)})),this.debug&&U.addComponent(j.Lom).setColor("00ff00"),U.parent=null!==(B=this.container)&&void 0!==B?B:this.gameObject,U}preloadPrefab(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this._prefabLoader.preloadFromGUIDWithDependencies(this.prefabGuid)}))}spawnPrefab(){return this._prefabLoader.loadFromGUID(this.prefabGuid)}checkAllPlaceholdersOnScreen(){for(const[k,B]of this.placeholders.entries())this.checkPlaceholderOnScreen(B,k)}checkPlaceholderOnScreen(k,B){const U=Qt.J.isObjectOnScreen(k)?B:null;this._pendingPlaceholderOperations.set(k,U)}removePrefabAt(k){var B;const U=this.placeholders[k];if(U){for(const k of U.children)this.onObjectScreenExited.dispatch(k),this._objectPool.recycleObject(k),null===(B=k.findComponent(j.XVE))||void 0===B||B.onDimensionsChanged.removeAll(this),k.parent=this._deadPoolContainer;U.destroy(),this.placeholders.splice(k,1),this._injectionData.splice(k,1);for(let B=k;B{this.checkPlaceholderOnScreen(k,B)})))}}}updateAllInjectionData(k){for(;this.placeholders.length>k.length;)this.removePrefabAt(this.placeholders.length-1);for(;this.placeholders.length{this.checkPlaceholderOnScreen(k,B)})))}this.checkAllPlaceholdersOnScreen()}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],OI.prototype,"debug",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],OI.prototype,"zeroOutPlaceholderTransforms",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],OI.prototype,"resizePlaceholderToObject",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],OI.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],OI.prototype,"prefabGuid",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],OI.prototype,"preloadDependencies",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],OI.prototype,"container",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],OI.prototype,"_deadPoolContainer",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],OI.prototype,"spawnedObjectWidth",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],OI.prototype,"spawnedObjectHeight",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],OI.prototype,"staggerPlaceholderCreation",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],OI.prototype,"onPlaceholdersCreated",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],OI.prototype,"onObjectScreenEntered",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],OI.prototype,"onObjectScreenExited",void 0),OI=(0,G.Cg)([(0,j.EVk)("DataArrayPooledPrefabSpawner",W.Y.utility,"Spawns a pooled prefab for each item in a data array, injecting the data into the prefab")],OI);let II=class extends j.uAl{constructor(){super(...arguments),this.argumentIndex=0,this.dataPath="",this.onDataExtracted=new j.HN0}extract(...k){if(k.length<=this.argumentIndex)return null;const B=k[this.argumentIndex],U=j.Aq$.isDefined(this.dataPath)&&""!==this.dataPath?ct.get(B,this.dataPath):B;return this.onDataExtracted.dispatch(U),U}destroy(){this.onDataExtracted.dispose(),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],II.prototype,"argumentIndex",void 0),(0,G.Cg)([(0,j.W_S)(),(0,j.YLv)("Data path compatible with lodash get"),(0,G.Sn)("design:type",String)],II.prototype,"dataPath",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],II.prototype,"onDataExtracted",void 0),II=(0,G.Cg)([(0,j.EVk)("DataExtraction",W.Y.utility,"Extracts data from given arguments")],II);let DI=class extends j.uAl{constructor(){super(...arguments),this.debugSize=!1,this.debugColour=!1,this.rectColour="#ff0000",this.width=1920,this.height=1080}postCreate(){}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],DI.prototype,"debugSize",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],DI.prototype,"debugColour",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",Object)],DI.prototype,"rectColour",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],DI.prototype,"width",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],DI.prototype,"height",void 0),(0,G.Cg)([(0,j.Pqz)(j.XVE),(0,G.Sn)("design:type",j.XVE)],DI.prototype,"_rectTransform",void 0),DI=(0,G.Cg)([(0,j.EVk)("DebugRectTransform")],DI);let RI=class extends j.uAl{constructor(){super(...arguments),this._checkOnCreate=!1,this._onNativeApp=new j.HN0,this._onNonNativeApp=new j.HN0,this._onThreeTierElegibilityCheck=new j.HN0}create(){super.create(),this._checkOnCreate&&this.checkDevice()}checkDevice(){Gs.pF.isNativeApp()?this._onNativeApp.dispatch():this._onNonNativeApp.dispatch(),this._onThreeTierElegibilityCheck.dispatch(Gs.pF.eligibleForMembershipPurchaseForMultipleTiers())}destroy(){this._onNativeApp.dispose(),this._onNonNativeApp.dispose(),this._onThreeTierElegibilityCheck.dispose(),super.destroy()}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],RI.prototype,"_checkOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],RI.prototype,"_onNativeApp",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],RI.prototype,"_onNonNativeApp",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],RI.prototype,"_onThreeTierElegibilityCheck",void 0),RI=(0,G.Cg)([(0,j.EVk)("Device",W.Y.utility)],RI);U(10704);let PI=class extends j.uAl{constructor(){super(...arguments),this.onTrigger=new j.HN0,this._fireOnCreate=!1}create(){super.create(),this._fireOnCreate&&this.trigger()}destroy(){this.onTrigger.dispose(),super.destroy()}trigger(){this.onTrigger.dispatch(this.component)}};var MI,NI;(0,G.Cg)([(0,j.MnK)(j.uAl),(0,G.Sn)("design:type",j.uAl)],PI.prototype,"component",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],PI.prototype,"onTrigger",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],PI.prototype,"_fireOnCreate",void 0),PI=(0,G.Cg)([(0,j.EVk)("GetComponentReference")],PI),function(k){k.EqualToConstant="===",k.EquivalentToConstant="==",k.GreaterThanConstant=">",k.GreaterThanOrEqualToConstant=">=",k.LessThanConstant="<",k.LessThanOrEqualToConstant="<="}(NI||(NI={}));let xI=MI=class extends j.uAl{constructor(){super(...arguments),this.comparisonFunction=NI.EqualToConstant,this.onTrue=new j.HN0,this.onFalse=new j.HN0,this.onResult=new j.HN0,this.onNegatedResult=new j.HN0}destroy(){this.onTrue.dispose(),this.onFalse.dispose(),this.onResult.dispose(),this.onNegatedResult.dispose(),super.destroy()}baseCompare(k,B){const U=MI.COMPARISON_FUNCTIONS[this.comparisonFunction](k,B);(U?this.onTrue:this.onFalse).dispatch(),this.onResult.dispatch(U),this.onNegatedResult.dispatch(!U)}};xI.COMPARISON_FUNCTIONS={[NI.EqualToConstant]:(k,B)=>k===B,[NI.EquivalentToConstant]:(k,B)=>k==B,[NI.GreaterThanConstant]:(k,B)=>k>B,[NI.GreaterThanOrEqualToConstant]:(k,B)=>k>=B,[NI.LessThanConstant]:(k,B)=>kk<=B},(0,G.Cg)([(0,j.gfw)(NI),(0,G.Sn)("design:type",String)],xI.prototype,"comparisonFunction",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],xI.prototype,"onTrue",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],xI.prototype,"onFalse",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],xI.prototype,"onResult",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],xI.prototype,"onNegatedResult",void 0),xI=MI=(0,G.Cg)([(0,j.EVk)("Comparison (abstract)")],xI);let LI=class extends xI{constructor(){super(...arguments),this.constant=0}compare(k){this.baseCompare(k,this.constant)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],LI.prototype,"constant",void 0),LI=(0,G.Cg)([(0,j.EVk)("NumberComparison",W.Y.utility)],LI);U(41170);let kI=class extends j.uAl{constructor(){super(...arguments),this.onMemberTier=new j.HN0,this.onHighestMemberTierTrue=new j.HN0,this.onHighestMemberTierFalse=new j.HN0}create(){super.create()}checkMemberTier(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.onMemberTier.dispatch(k.getMemberTier())}checkHighestMembershipTier(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;(xs.kG.includes(k.getMemberTier())?this.onHighestMemberTierTrue:this.onHighestMemberTierFalse).dispatch()}destroy(){this.onMemberTier.dispose(),this.onHighestMemberTierTrue.dispose(),this.onHighestMemberTierFalse.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],kI.prototype,"onMemberTier",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],kI.prototype,"onHighestMemberTierTrue",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],kI.prototype,"onHighestMemberTierFalse",void 0),kI=(0,G.Cg)([(0,j.EVk)("PlayerMemberTier",W.Y.player,"")],kI);U(11191),U(61917);let BI=class extends j.uAl{constructor(){super(...arguments),this._parameters=[],this.onTrigger=new j.HN0}destroy(){this.onTrigger.dispose(),super.destroy()}trigger(...k){const B=this._parameters.map((B=>{if("string"==typeof B){const U=B.match(/^\[(\d+)\]$/);if(U){const B=parseInt(U[1]);return k[B]}if(B.match(/^\d+(\.\d*)?$/))return parseFloat(B)}return B}));this.onTrigger.dispatch(...B)}};(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Object)],BI.prototype,"_parameters",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],BI.prototype,"onTrigger",void 0),BI=(0,G.Cg)([(0,j.EVk)("SignalParameterRemix",W.Y.utility)],BI);let UI=class extends xI{constructor(){super(...arguments),this.comparisonFunction=NI.EqualToConstant,this.constant=""}compare(k){this.baseCompare(k,this.constant)}};(0,G.Cg)([(0,j.DTs)(),(0,j.gfw)(NI),(0,G.Sn)("design:type",String)],UI.prototype,"comparisonFunction",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],UI.prototype,"constant",void 0),UI=(0,G.Cg)([(0,j.EVk)("StringComparison",W.Y.utility)],UI);var FI=U(47008),GI=U(325);let jI=class extends xI{constructor(){super(...arguments),this.comparisonFunction=NI.EqualToConstant}compare(){this.baseCompare(this._subjectProvider.getSubject(),this.subject)}};(0,G.Cg)([(0,j.DTs)(),(0,j.gfw)(NI),(0,G.Sn)("design:type",String)],jI.prototype,"comparisonFunction",void 0),(0,G.Cg)([(0,j.gfw)(GI.Q),(0,G.Sn)("design:type",String)],jI.prototype,"subject",void 0),(0,G.Cg)([(0,j.Cdj)("f1d-f7b1"),(0,G.Sn)("design:type",FI.W)],jI.prototype,"_subjectProvider",void 0),jI=(0,G.Cg)([(0,j.EVk)("SubjectComparison",W.Y.utility)],jI);let $I=class extends j.uAl{constructor(){super(...arguments),this._startDelayMs=0,this._intervalMs=1e3,this._autoStart=!0,this._fireOnStart=!1,this.onInterval=new j.HN0}create(){super.create(),this._autoStart&&this.start()}destroy(){tt.q.instance.game.time.destroy(this._timer),this._timer=null,this.onInterval.dispose(),super.destroy()}start(){this._timer=tt.q.instance.game.time.create(!1),this._startDelayMs>0?(this._timer.addTimer(this._startDelayMs,this.startLoop,this),this._timer.start()):this.startLoop()}startLoop(){this._fireOnStart&&this.onInterval.dispatch(),this._timer.loop(this._intervalMs,this.onInterval.dispatch,this.onInterval),this._timer.start()}};var HI;(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],$I.prototype,"_startDelayMs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],$I.prototype,"_intervalMs",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],$I.prototype,"_autoStart",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],$I.prototype,"_fireOnStart",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$I.prototype,"onInterval",void 0),$I=(0,G.Cg)([(0,j.EVk)("TimeInterval",W.Y.utility)],$I);let VI=HI=class extends j.uAl{constructor(){super(...arguments),this._networkCheckMinTimeMS=6e4,this.friendsListEventSignal=new j.HN0,this._broadcaster=tt.q.instance.game.broadcaster}create(){super.create(),this._broadcaster.addAppListener(jn.sd.GetTotalFriendRequests,this.process,this,jn.HG.HUD,!1),this._broadcaster.addAppListener(jn.sd.RequestReceived,this.process,this,jn.HG.HUD,!1),this._broadcaster.addAppListener(jn.sd.RequestRejected,this.process,this,jn.HG.HUD,!1),this._broadcaster.addAppListener(jn.sd.RequestAccepted,this.process,this,jn.HG.HUD,!1),this._broadcaster.addAppListener(jn.sd.RequestCancelled,this.process,this,jn.HG.HUD,!1),this.fetchFriendRequestsAndFriends(),this.process()}fetchFriendRequestsAndFriends(){const k=tt.q.instance.prodigy.timeManager.getServerTimeMs();k-this._networkCheckMinTimeMS>=HI._lastNetworkCheckTime&&(tt.q.instance.game.broadcaster.broadcast(jn.sd.GetTotalFriendRequests,jn.HG.FriendsList),HI._lastNetworkCheckTime=k)}destroy(){this._broadcaster.removeAppListener(jn.sd.GetTotalFriendRequests,this,jn.HG.HUD),this._broadcaster.removeAppListener(jn.sd.RequestReceived,this,jn.HG.HUD),this._broadcaster.removeAppListener(jn.sd.RequestRejected,this,jn.HG.HUD),this._broadcaster.removeAppListener(jn.sd.RequestAccepted,this,jn.HG.HUD),this._broadcaster.removeAppListener(jn.sd.RequestCancelled,this,jn.HG.HUD),this.friendsListEventSignal.dispose(),super.destroy()}process(){const k=tt.q.instance.prodigy.friendsListNetworkHandler;this.friendsListEventSignal.dispatch(k.hasPendingRequests())}};VI._lastNetworkCheckTime=0,(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],VI.prototype,"_networkCheckMinTimeMS",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],VI.prototype,"friendsListEventSignal",void 0),VI=HI=(0,G.Cg)([(0,j.EVk)("FriendsListChangeListener",W.Y.multiplayer)],VI);let WI=class extends j.uAl{constructor(){super(...arguments),this.mailEventSignal=new j.HN0}create(){super.create();{tt.q.instance.game.broadcaster.addAppListener(jn.zr.UpdateMailCounters,this.process,this,jn.HG.MailerButton);const k=tt.q.instance.prodigy.mailNetworkHandler.mailTotals;k&&this.process(k),tt.q.instance.prodigy.mailNetworkHandler.getAllMail(!1)}}destroy(){tt.q.instance.game.broadcaster.removeAppListener(jn.zr.UpdateMailCounters,this,jn.HG.MailerButton),this.mailEventSignal.dispose(),super.destroy()}process({totalUnread:k}){if(k>0){const B=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.mailEventSignal.dispatch(!Qt.J.shouldSuppressAd(B)&&!B.tutorialCompletedThisSession,k)}else this.mailEventSignal.dispatch(!1,0)}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],WI.prototype,"mailEventSignal",void 0),WI=(0,G.Cg)([(0,j.EVk)("MailChangeListener",W.Y.multiplayer)],WI);let qI=class extends j.uAl{constructor(){super(...arguments),this.onIconsLoaded=new j.HN0,this._iconCount=0}create(){super.create(),j.Aq$.isDefined(this._petID)&&this.setPetID(this._petID)}setPetID(k){this._petID!==k&&(this._petID=k,this._iconCount++,this._petIcon.onIconLoaded.addOnce(this.iconLoaded,this),this._petIcon.setItemID(k),this._iconCount++,this._elementIcon.onIconLoaded.addOnce(this.iconLoaded,this),this._elementIcon.setPetID(k))}iconLoaded(){this._iconCount--,0===this._iconCount&&this.onIconsLoaded.dispatch()}destroy(){this.onIconsLoaded.dispose(),super.destroy()}};(0,G.Cg)([(0,j.MnK)(od.i),(0,G.Sn)("design:type",od.i)],qI.prototype,"_petIcon",void 0),(0,G.Cg)([(0,j.MnK)(Sf.D),(0,G.Sn)("design:type",Sf.D)],qI.prototype,"_elementIcon",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qI.prototype,"_petID",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],qI.prototype,"onIconsLoaded",void 0),qI=(0,G.Cg)([(0,j.EVk)("ElementalPetDisplay",W.Y.uiPet)],qI);let KI=class extends j.uAl{create(){super.create(),this.refreshPlayerAppearance()}refreshPlayerAppearance(){this._playerAppearance.setAppearance(this._loggedInPlayer.getAppearance())}};(0,G.Cg)([(0,j.MnK)(Qm.b),(0,G.Sn)("design:type",Qm.b)],KI.prototype,"_playerAppearance",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],KI.prototype,"_loggedInPlayer",void 0),KI=(0,G.Cg)([(0,j.EVk)("LoggedInPlayerAppearanceLoader",W.Y.playerAnimation)],KI);let zI=class extends j.PQK{installBindings(){this.Container.bind("AnimationData").toConstantValue(new xi.F(U(34500)))}};zI=(0,G.Cg)([(0,j.Og1)("PlayerAnimationDataInstaller","Installer")],zI);let YI=class extends j.PQK{installBindings(){const k=tt.q.instance.prodigy.gameContainer;this.Container.bind("377-3e7b").toConstantValue(k.get("e20-0fb0"))}};var QI;YI=(0,G.Cg)([(0,j.Og1)("PlayerDataInstaller","Installer")],YI);let XI=QI=class extends j.uAl{constructor(){super(...arguments),this._teleportOutClips=[],this._teleportInClips=[],this.onTeleportOut=new j.HN0,this.onTeleportIn=new j.HN0,this._disableInput=!0}create(){super.create(),this._flashClip.GameObject.active=!1,this.gameObject.active=!1,this._belowObject=this.gameObject.children.find((k=>"Below"===k.name))}alignToTarget(){this.teleportObject&&(this.GameObject.transform.worldPosition=this.teleportObject.transform.worldPosition)}playOut(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U;this.setupTeleportCommon(),null===(k=this._teleportOutSoundEffect)||void 0===k||k.playSFX(),null===(B=this._teleportOutSoundTimer)||void 0===B||B.startTimer(),null===(U=this._screenShake)||void 0===U||U.run(),this._flashClip.OnComplete.addOnce((()=>{this._flashClip.GameObject.active=!1})),yield this.playTeleportCommon([...this._teleportOutClips,this._flashClip])}))}playIn(){return(0,G.sH)(this,arguments,void 0,(function*(k=0){var B,U;return this.setupTeleportCommon(),this.teleportObject.active=!1,k>0&&(yield j.Egh.timeout(k)),null===(B=this._teleportInSoundEffect)||void 0===B||B.playSFX(),null===(U=this._teleportInSoundTimer)||void 0===U||U.startTimer(),this.playTeleportCommon(this._teleportInClips)}))}setupTeleportCommon(){this.setInputEnabled(!1),this.gameObject.active=!0,this.sortBelowObject()}playTeleportCommon(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;const U=new j.v14;for(const F of k)F.animator.spine.onEvent.add(this.processEvent,this),F.OnComplete.addOnce((()=>{F.animator.spine.onEvent.remove(this.processEvent,this)})),F.OnComplete.addOnce(U.push()),F.play();yield U.all(),null===(B=this._screenShake)||void 0===B||B.forceCompletion(),this.restoreBelowObjectSorting(),this.gameObject.active=!1,this.setInputEnabled(!0)}))}processEvent(k,B){var U;switch(B.data.name){case QI.OUT_EVENT:this.onTeleportOut.dispatch(),this.teleportObject.active=!1;break;case QI.IN_EVENT:this.onTeleportIn.dispatch(),this.teleportObject.active=!0,null===(U=this.teleportObject.findComponent(j.y4o))||void 0===U||U.getRootContainer().updateTransform();break;case QI.FLASH_EVENT:this._flashClip.GameObject.active=!0,this._flashClip.play(!0)}}setInputEnabled(k){this._disableInput&&(0,Td.QQ)(tt.q.instance.game,k)}sortBelowObject(){const k=this.teleportObject.parent.children.indexOf(this.teleportObject);this.teleportObject.parent.addChildAt(this._belowObject,k)}restoreBelowObjectSorting(){this.gameObject.addChild(this._belowObject)}destroy(){this.onTeleportOut.dispose(),this.onTeleportIn.dispose(),super.destroy()}};XI.OUT_EVENT="ch-out",XI.IN_EVENT="ch-in",XI.FLASH_EVENT="flash",(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],XI.prototype,"teleportObject",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Nw.Q),(0,G.Sn)("design:type",Array)],XI.prototype,"_teleportOutClips",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Nw.Q),(0,G.Sn)("design:type",Array)],XI.prototype,"_teleportInClips",void 0),(0,G.Cg)([(0,j.MnK)(Nw.Q),(0,G.Sn)("design:type",Nw.Q)],XI.prototype,"_flashClip",void 0),(0,G.Cg)([(0,j.MnK)(Ta.g),(0,G.Sn)("design:type",Ta.g)],XI.prototype,"_screenShake",void 0),(0,G.Cg)([(0,j.MnK)(oa),(0,G.Sn)("design:type",oa)],XI.prototype,"_teleportInSoundEffect",void 0),(0,G.Cg)([(0,j.MnK)(oa),(0,G.Sn)("design:type",oa)],XI.prototype,"_teleportOutSoundEffect",void 0),(0,G.Cg)([(0,j.MnK)($w),(0,G.Sn)("design:type",$w)],XI.prototype,"_teleportInSoundTimer",void 0),(0,G.Cg)([(0,j.MnK)($w),(0,G.Sn)("design:type",$w)],XI.prototype,"_teleportOutSoundTimer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],XI.prototype,"onTeleportOut",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],XI.prototype,"onTeleportIn",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],XI.prototype,"_disableInput",void 0),XI=QI=(0,G.Cg)([(0,j.EVk)("TeleportEffect",W.Y.effect)],XI);let ZI=class extends j.uAl{playOut(){return(0,G.sH)(this,void 0,void 0,(function*(){this._teleportEffect.teleportObject=this._mainPlayer,this._teleportEffect.alignToTarget(),this._teleportEffect.onTeleportOut.add((()=>{this.unloadFollows()})),yield this._teleportEffect.playOut(),this._teleportEffect.onTeleportOut.removeAll()}))}playIn(){return(0,G.sH)(this,void 0,void 0,(function*(){this._teleportEffect.teleportObject=this._mainPlayer,this._teleportEffect.alignToTarget(),this._teleportEffect.onTeleportIn.add((()=>{this.reloadFollows()})),yield this._teleportEffect.playIn(),this._teleportEffect.onTeleportIn.removeAll()}))}unloadFollows(){const k=this._mainPlayer.findComponentInChildren(za);null==k||k.unloadFollows()}reloadFollows(){const k=this._mainPlayer.findComponentInChildren(za);null==k||k.reloadFollows()}};(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],ZI.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.MnK)(XI),(0,G.Sn)("design:type",XI)],ZI.prototype,"_teleportEffect",void 0),ZI=(0,G.Cg)([(0,j.EVk)("PlayerTeleportEffect",W.Y.effect)],ZI);U(28080);let JI=class extends j.uAl{constructor(){super(...arguments),this._onKeystonesToPlace=new j.HN0,this._onNoKeystonesToPlace=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.check()}check(){Zo.N.anyKeystonesToPlace()?this._onKeystonesToPlace.dispatch():this._onNoKeystonesToPlace.dispatch()}destroy(){this._onKeystonesToPlace.dispose(),this._onNoKeystonesToPlace.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],JI.prototype,"_onKeystonesToPlace",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],JI.prototype,"_onNoKeystonesToPlace",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],JI.prototype,"_runOnLoad",void 0),JI=(0,G.Cg)([(0,j.EVk)("AnyKeystonesToPlaceGuard",W.Y.utility)],JI);let tD=class extends Be.u{run(){var k;const B=this._playerContainer?[new j.I9Y(this._playerContainer.x,this._playerContainer.y)].concat(this.path):this.path;this.execute(194,{game:tt.q.instance.game,playerContainer:null!==(k=this._playerContainer)&&void 0!==k?k:this._playerData.player.playerContainer,playerLocomotion:this._playerLocomotion,monsterAnimationController:this.monsterAnimationController,circleTrigger:this._circleTrigger,path:B})}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],tD.prototype,"_playerData",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObjectRelay"),(0,G.Sn)("design:type",WS)],tD.prototype,"_playerContainer",void 0),(0,G.Cg)([(0,j.Cdj)("PlayerLocomotion"),(0,G.Sn)("design:type",j.KhP)],tD.prototype,"_playerLocomotion",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],tD.prototype,"monsterAnimationController",void 0),(0,G.Cg)([(0,j.MnK)(hi.s),(0,G.Sn)("design:type",hi.s)],tD.prototype,"_circleTrigger",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j._Hz)(),(0,G.Sn)("design:type",Array)],tD.prototype,"path",void 0),tD=(0,G.Cg)([(0,j.EVk)("Q3MinibossGateFSM",W.Y.zoneForest)],tD);let eD=class extends Be.u{run(){this.execute(188,{game:tt.q.instance.game,target:this._playerData.player.playerContainer,path:[new j.I9Y(910,480)]})}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],eD.prototype,"_playerData",void 0),eD=(0,G.Cg)([(0,j.EVk)("TroptropTrioDialogueFSM",W.Y.zoneForest)],eD);let iD=class extends Be.u{run(){this.execute(187,{game:tt.q.instance.game,chatBubble:this._chatBubble,monsterTransform:this._monsterTransform})}};(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],iD.prototype,"_monsterTransform",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iD.prototype,"_chatBubble",void 0),iD=(0,G.Cg)([(0,j.EVk)("TroptropTrioFSM",W.Y.zoneForest)],iD);let sD=class extends j.PQK{installBindings(){var k,B;const U="forest-Q2-Q3-miniboss-level",F=tt.q.instance.prodigy.gameContainer.get("e20-0fb0"),G=tt.q.instance.prodigy.world.getCurrentZoneObject().getQuestState(),j=tt.q.instance.prodigy.world.getCurrentZoneObject().difficultyMode===fe.i.Hard?Math.max(Yn.s.maxLevelConfig.regular,F.getLevel()+2):F.getLevel()+2,$=null!==(B=null===(k=null==G?void 0:G.state)||void 0===k?void 0:k[U])&&void 0!==B?B:Math.min(j,Yn.s.activePlayerLevelCap);(null==G?void 0:G.state)&&(G.state[U]=$);const H={encounter:[{ID:96}],level:$,onEnd:"forest-C7",screen:"battle-forest-outside",onFaint:"forest-C8",backgroundMusic:Xu.B.Bg_bossbattle_firefly,revampBattleType:3===(null==G?void 0:G.ID)?Ci.gu.FireflyQ3Miniboss:Ci.gu.FireflyQ2Miniboss};this.Container.bind("EncounterBattleMods").toConstantValue(H),this.Container.bind("EncounterDifficultyIndicatorLevel").toConstantValue($)}};sD=(0,G.Cg)([(0,j.Og1)("ForestQ2MinibossEncounterInstaller","Installer")],sD);let nD=class extends j.uAl{constructor(){super(...arguments),this._onVisitingAllowed=new j.HN0,this._onVisitingNotAllowed=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._player=this.getInjectedValue("e20-0fb0").player,this._runOnLoad&&this.isVisitingAllowed()}destroy(){this._onVisitingAllowed.dispose(),this._onVisitingNotAllowed.dispose(),super.destroy()}isVisitingAllowed(){var k;(null===(k=this._player)||void 0===k?void 0:k.getAllowsHouseVisitors())?this._onVisitingAllowed.dispatch():this._onVisitingNotAllowed.dispatch()}allowVisiting(){var k;null===(k=this._player)||void 0===k||k.setAllowsHouseVisitors(!0)}denyVisiting(){var k;null===(k=this._player)||void 0===k||k.setAllowsHouseVisitors(!1)}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nD.prototype,"_onVisitingAllowed",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nD.prototype,"_onVisitingNotAllowed",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],nD.prototype,"_runOnLoad",void 0),nD=(0,G.Cg)([(0,j.EVk)("HouseVisitorsGuard",W.Y.utility)],nD);let aD=class extends j.uAl{openHouseStore(){tt.q.instance.prodigy.world.getZone(Ft.A_.HOUSE).openHouseStore()}};aD=(0,G.Cg)([(0,j.EVk)("OpenHouseStore",W.Y.ui)],aD);let rD=class extends j.uAl{constructor(){super(...arguments),this.isUnderwater=!1,this.bubblePrefab=Rt.l.Bubble,this.playerAnimationController=null,this._playerSpineAnimator=null}create(){super.create(),this.isUnderwater&&(this.playerAnimationController?(this._playerSpineAnimator=this.playerAnimationController.getSpineAnimator(),this._playerSpineAnimator?this._playerSpineAnimator.isLoaded?this.addBubbleEffectToPlayer():this._playerSpineAnimator.spine.OnLoaded.addOnce(this.addBubbleEffectToPlayer,this):j.VyI.log("No player spine animator set on wizard animation controller, skipping underwater setup.",j.$bb.Error)):j.VyI.log("No player animation controller set for underwater component, skipping spine animator setup.",j.$bb.Error))}addBubbleEffectToRemotePlayer(k){if(!this.isUnderwater)return;if(!k)return void j.VyI.log("No player object provided to add bubble effect.",j.$bb.Error);const B=k.findComponentInChildren(Oa.$);if(!B)return void j.VyI.log("No WizardAnimationControllerComponent found on player object, cannot add bubble effect.",j.$bb.Error);const U=B.getSpineAnimator();U?this.addBubbleEffectToPlayer(U):j.VyI.log("No SpineAnimator found on player animation controller, cannot add bubble effect.",j.$bb.Error)}addBubbleEffectToPlayer(k=this._playerSpineAnimator){k?j.W$e.instance.prefabLoaderInstance.loadWithDependenciesFromGUID(this.bubblePrefab,k.GameObject).then((B=>{B.transform.setScale(8,8),B.transform.setPositionY(-448);const U=B.findComponent(rn.l);U?U.setup({spineComponent:k.spine,boneName:"hip",slotName:"hip",followAxis:3,followRotation:!1,followScale:4,boneFollowerTransform:B.transform}):j.VyI.log("No SpineBoneFollowerComponent found on bubble prefab, cannot set up bubble effect.",j.$bb.Error)})).catch(j.RQr.createHandler(`Unable to load the bubble prefab: ${this.bubblePrefab}`)):j.VyI.log("No player spine animator available to add bubble effect.",j.$bb.Error)}};(0,G.Cg)([(0,j.vkK)({toolTip:"Is this map underwater? Should a breathing bubble be shown?"}),(0,G.Sn)("design:type",Boolean)],rD.prototype,"isUnderwater",void 0),(0,G.Cg)([(0,j.gfw)(Rt.l),(0,G.Sn)("design:type",String)],rD.prototype,"bubblePrefab",void 0),(0,G.Cg)([(0,j.MnK)(Oa.$,{toolTip:"The animation controller for the main player in the underwater zone."}),(0,G.Sn)("design:type",Oa.$)],rD.prototype,"playerAnimationController",void 0),rD=(0,G.Cg)([(0,j.EVk)("BreathingBubble",W.Y.zoneShipwreckShore)],rD);let oD=class extends j.uAl{chatWithNpc(){var k;const B=new mi.rD,U=this.getInjectedValue("306-5359"),F=tt.q.instance.prodigy.world.getCurrentZoneObject(),G=tt.q.instance.prodigy.world.getZone(Jo.O.Shiverchill),$=jd.getDailyQuestState(G);F.isOnQuest(4)||F.isOnQuest(5)?F.isOnSequence(4,1)?B.addEvents([{dialogueData:B.dataProvider.get(379),blockInput:!0},{dialogueData:B.dataProvider.get(380),blockInput:!0},{callback:()=>{const k=this.getInjectedValue("a25-68f4");k?k.sendQuestEventViaHub(Wr.T.SPEAK_WITH_NPC,{id:"shiverchill-miner"}).catch(j.RQr.createHandler("An error occurred while sending the event via Quest Hub")):j.VyI.log("Attempted to send event via Quest Manager Hub, but no Quest Manager Hub was found",j.$bb.Warning)}}]):B.addEvents([{dialogueData:B.dataProvider.get(380),blockInput:!0}]):F.isOnQuest(6)?B.addEvents([{dialogueData:B.dataProvider.get(384),blockInput:!0}]):(null===(k=F.getQuestState())||void 0===k?void 0:k.ID)>=6&&(0===U.backpack.hasItem("item",80)?B.addEvents([{dialogueData:B.dataProvider.get(399),blockInput:!0},{dialogueData:B.dataProvider.get(402),blockInput:!0},{dialogueData:B.dataProvider.get(403),blockInput:!0},{dialogueData:B.dataProvider.get(404),blockInput:!0}]):U.backpack.hasItem("item",80)<5?(B.addEvents([{dialogueData:B.dataProvider.get(399),blockInput:!0},{dialogueData:B.dataProvider.get(391),blockInput:!0}]),4===U.backpack.hasItem("item",80)&&B.addEvents([{dialogueData:B.dataProvider.get(397),blockInput:!0}])):U.backpack.hasItem("item",80)>4&&$.rewards<5?B.addEvents([{dialogueData:B.dataProvider.get(398),blockInput:!0},{callback:()=>{U.saveEnabled=!1,G.setState("daily",{date:$.date,flags:$.flags,rewards:5}),tt.q.instance.prodigy.open.gotItem([{type:"item",ID:76,N:5}],void 0,void 0,void 0,void 0,void 0,{source_type:li.C.Npc})}},{dialogueData:B.dataProvider.get(392),blockInput:!0},{callback:()=>{U.saveEnabled=!0}}]):U.backpack.hasItem("item",80)>4&&U.backpack.hasItem("item",80)<10&&$.rewards>4?(B.addEvents([{dialogueData:B.dataProvider.get(399),blockInput:!0},{dialogueData:B.dataProvider.get(392),blockInput:!0}]),9===U.backpack.hasItem("item",80)&&B.addEvents([{dialogueData:B.dataProvider.get(397),blockInput:!0}])):U.backpack.hasItem("item",80)>9&&$.rewards<10?B.addEvents([{dialogueData:B.dataProvider.get(398),blockInput:!0},{callback:()=>{U.saveEnabled=!1,G.setState("daily",{date:$.date,flags:$.flags,rewards:10}),tt.q.instance.prodigy.open.gotItem([{type:"item",ID:77,N:10}],void 0,void 0,void 0,void 0,void 0,{source_type:li.C.Npc})}},{dialogueData:B.dataProvider.get(393),blockInput:!0},{callback:()=>{U.saveEnabled=!0}}]):U.backpack.hasItem("item",80)>9&&U.backpack.hasItem("item",80)<25&&$.rewards>9?(B.addEvents([{dialogueData:B.dataProvider.get(399),blockInput:!0},{dialogueData:B.dataProvider.get(393),blockInput:!0}]),24===U.backpack.hasItem("item",80)&&B.addEvents([{dialogueData:B.dataProvider.get(397),blockInput:!0}])):U.backpack.hasItem("item",80)>24&&$.rewards<25?B.addEvents([{dialogueData:B.dataProvider.get(398),blockInput:!0},{callback:()=>{U.saveEnabled=!1,G.setState("daily",{date:$.date,flags:$.flags,rewards:25}),tt.q.instance.prodigy.open.gotItem([{type:"hat",ID:10}],void 0,void 0,void 0,void 0,void 0,{source_type:li.C.Npc})}},{dialogueData:B.dataProvider.get(394),blockInput:!0},{callback:()=>{U.saveEnabled=!0}}]):U.backpack.hasItem("item",80)>24&&U.backpack.hasItem("item",80)<50&&$.rewards>24?(B.addEvents([{dialogueData:B.dataProvider.get(399),blockInput:!0},{dialogueData:B.dataProvider.get(394),blockInput:!0}]),49===U.backpack.hasItem("item",80)&&B.addEvents([{dialogueData:B.dataProvider.get(397),blockInput:!0}])):U.backpack.hasItem("item",80)>49&&$.rewards<50?B.addEvents([{dialogueData:B.dataProvider.get(398),blockInput:!0},{callback:()=>{U.saveEnabled=!1,G.setState("daily",{date:$.date,flags:$.flags,rewards:50}),tt.q.instance.prodigy.open.gotItem([{type:"outfit",ID:6}],void 0,void 0,void 0,void 0,void 0,{source_type:li.C.Npc})}},{dialogueData:B.dataProvider.get(395),blockInput:!0},{callback:()=>{U.saveEnabled=!0}}]):U.backpack.hasItem("item",80)>49&&U.backpack.hasItem("item",80)<75&&$.rewards>49?(B.addEvents([{dialogueData:B.dataProvider.get(399),blockInput:!0},{dialogueData:B.dataProvider.get(395),blockInput:!0}]),74===U.backpack.hasItem("item",80)&&B.addEvents([{dialogueData:B.dataProvider.get(397),blockInput:!0}])):U.backpack.hasItem("item",80)>74&&$.rewards<75?B.addEvents([{dialogueData:B.dataProvider.get(398),blockInput:!0},{callback:()=>{U.saveEnabled=!1,G.setState("daily",{date:$.date,flags:$.flags,rewards:75}),tt.q.instance.prodigy.open.gotItem([{type:"weapon",ID:13}],void 0,void 0,void 0,void 0,void 0,{source_type:li.C.Npc})}},{dialogueData:B.dataProvider.get(396),blockInput:!0},{callback:()=>{U.saveEnabled=!0}}]):U.backpack.hasItem("item",80)>74&&U.backpack.hasItem("item",80)<99&&$.rewards>74?(B.addEvents([{dialogueData:B.dataProvider.get(399),blockInput:!0},{dialogueData:B.dataProvider.get(396),blockInput:!0}]),98===U.backpack.hasItem("item",80)&&B.addEvents([{dialogueData:B.dataProvider.get(397),blockInput:!0}])):U.backpack.hasItem("item",80)>98&&$.rewards<99?B.addEvents([{dialogueData:B.dataProvider.get(398),blockInput:!0},{callback:()=>{U.saveEnabled=!1,G.setState("daily",{date:$.date,flags:$.flags,rewards:99}),tt.q.instance.prodigy.open.gotItem([{type:"hat",ID:56}],void 0,void 0,void 0,void 0,void 0,{source_type:li.C.Npc}),U.saveEnabled=!0}}]):B.addEvents([{dialogueData:B.dataProvider.get(408),blockInput:!0}])),B.start()}};var hD;oD=(0,G.Cg)([(0,j.EVk)("ShiverchillMinerNpc")],oD),function(k){k.NormalChest="A",k.QuestChest="B",k.MemberChest="C"}(hD||(hD={}));let cD=class extends j.uAl{constructor(){super(...arguments),this.chestType=hD.NormalChest,this.rewards=[{ID:0,type:"gold",N:100}],this.onAttemptOpen=new j.HN0,this.onOpening=new j.HN0,this.onCollected=new j.HN0,this.onGotItemClosed=new j.HN0}create(){var k;super.create(),null===(k=this._gameObjectContext)||void 0===k||k.bindInjectedValues({ZONE_CHEST_ID:this.chestId,ZONE_CHEST_TYPE:this.chestType,ZONE_CHEST_REWARD:this.rewards})}destroy(){this.onAttemptOpen.dispose(),this.onOpening.dispose(),this.onCollected.dispose(),this.onGotItemClosed.dispose(),super.destroy()}collect(){if(this.onAttemptOpen.dispatch(),this.chestType===hD.MemberChest&&!this._activePlayer.hasMembership())return this.broadcastMemberChestOpenedFailedEvents(),void(Qt.J.shouldSuppressAd(this._activePlayer)?this.showMemberAdSuppressionToolTip():this.showAd());this.chestKey&&0===this._activePlayer.backpack.hasItem(this.chestKey.type,this.chestKey.id)?this.handleChestLocked():this.initChestOpening()}initChestOpening(){this._activePlayer.saveEnabled=!1,tt.q.instance.game.input.enabled=!1;tt.q.instance.prodigy.game.add.tween(this.gameObject.transform.localPosition,this).to({x:"-=5"},50,j.GS3.Linear.None).to({x:"+=10"},150,j.GS3.Linear.None).to({x:"-=10"},150,j.GS3.Linear.None).to({x:"+=5"},50,j.GS3.Linear.None).to({y:"-=50"},200,j.GS3.Quadratic.Out).to({y:"+=50"},200,j.GS3.Quadratic.In).to({y:"-=20"},100,j.GS3.Quadratic.Out).to({y:"+=20"},100,j.GS3.Quadratic.In).start().onTweenComplete.add(this.openChest,this,1),this.onOpening.dispatch()}handleChestLocked(){var k;let B=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SOMETHING");if(this.chestKey){const U=null===(k=Yt.t.getItem(this.chestKey.type,this.chestKey.id))||void 0===k?void 0:k.data;B=(null==U?void 0:U.name)?U.name:B}tt.q.instance.prodigy.open.messageBoxPrefab({text:"CHEST_LOCKED_MESSAGE",textArgs:[B]})}broadcastMemberChestOpenedFailedEvents(){const k=Us.P.shouldUseUnifiedConversionFlow(en.o.FunnelOpenMemberChestWorld)?Fs.R.UnifiedConversionFlow:Qt.J.showYouTubeMembershipAd(tt.q.instance.game,!0)?Fs.R.Video:Fs.R.Static;this._segment.purchase.sendFunnelStart({type:"Open-Member-Chest-World",category:"World",contentId:tt.q.instance.prodigy.world.getCurrentMap(),adType:k,adVersion:Us.P.getAdVersion(en.o.FunnelOpenMemberChestWorld)}),this._segment.container.sendContainerOpenedFailedEvent(ui.ZF.WorldMemberChest,this.chestId,Zb.WE.MemberLocked,fi.N.OpenWorld)}showMemberAdSuppressionToolTip(){const k=this._bounds,B=new j.or0(j.Htv.getWidth(k.GameObject),j.Htv.getHeight(k.GameObject)),U=k.GameObject.transform.worldPosition,F=U.x;let G,$,H;$=U.x>tt.q.instance.game.width/2?.75:.25,U.y>tt.q.instance.game.height/2?(G=U.y+B.getHalfHeight(),H=ze.i.UP):(G=U.y-B.getHalfHeight(),H=ze.i.DOWN),tt.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:F,yPosition:G,arrowXRelPos:$,arrowDirection:H})}showAd(){const k={conversionFunnelName:en.o.FunnelOpenMemberChestWorld,conversionFunnelMetadata:tt.q.instance.prodigy.world.getCurrentMap()};tt.q.instance.prodigy.open.membershipInfo(void 0,k)}openChest(){var k;const B=this._activePlayer;tt.q.instance.prodigy.world.getZone(tt.q.instance.prodigy.world.getCurrentZone()).setState(this.chestId,1),j.Aq$.isDefined(null===(k=this.chestKey)||void 0===k?void 0:k.id)&&B.backpack.consume(this.chestKey.type,this.chestKey.id,1),B.saveEnabled=!0,tt.q.instance.game.input.enabled=!0,tt.q.instance.prodigy.open.gotItem(this.rewards,(()=>{this.onGotItemClosed.dispatch()}),void 0,"open-chest",void 0,void 0,{source_type:this.chestType!==hD.QuestChest?this.chestType===hD.NormalChest?li.C.WorldChest:li.C.WorldMemberChest:void 0}),this.chestType!==hD.NormalChest&&this.chestType!==hD.MemberChest||this._segment.container.sendContainerOpenedEvent(this.chestType===hD.NormalChest?ui.ZF.WorldChest:ui.ZF.WorldMemberChest,this.chestId,fi.N.OpenWorld),this.checkQuestProgress(),this.onCollected.dispatch()}checkQuestProgress(){this.getInjectedValue("a25-68f4").sendQuestEventViaHub(Wr.T.OPEN_CHEST,{id:`${tt.q.instance.prodigy.world.getCurrentZone()}-${this.chestId}`}).catch(j.RQr.createHandler(`Error sending the OPEN_CHEST event via Quest Hub (${this.chestId})`))}};(0,G.Cg)([(0,j.Pqz)(j.bE_),(0,G.Sn)("design:type",j.bE_)],cD.prototype,"_gameObjectContext",void 0),(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],cD.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],cD.prototype,"_segment",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],cD.prototype,"chestId",void 0),(0,G.Cg)([(0,j.gfw)(hD),(0,G.Sn)("design:type",String)],cD.prototype,"chestType",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],cD.prototype,"chestKey",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.vCS)(),(0,G.Sn)("design:type",Array)],cD.prototype,"rewards",void 0),(0,G.Cg)([(0,j.MnK)(j.XVE),(0,G.Sn)("design:type",j.XVE)],cD.prototype,"_bounds",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cD.prototype,"onAttemptOpen",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cD.prototype,"onOpening",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cD.prototype,"onCollected",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cD.prototype,"onGotItemClosed",void 0),cD=(0,G.Cg)([(0,j.EVk)("Chest")],cD);var dD=U(51540);class lD{static getChestState(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=jp.R.getNowWithServerTimezoneOffset(),U=B.getHours()>=(Qt.J.isWeekend(B)?8:16),F=U?jp.R.getDateTimeTomorrowLocal():jp.R.getDateTimeLocal(),G=yield this.festivalNetworkHandler.getChestData(k);return(null==G?void 0:G.lastChestDateOpenMs)!==F?(yield this.festivalNetworkHandler.setChestDate(k,F),yield this.festivalNetworkHandler.setChestSpins(k,0),0):0===G.festivalChestSpins?0:U?1:2}))}static attemptChestSpin(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=yield this.getChestState(k);return 0===B&&(yield this.festivalNetworkHandler.setChestSpins(k,1)),B}))}}(0,G.Cg)([(0,Gi.b)("4fd-fef7"),(0,G.Sn)("design:type",dD.v)],lD,"festivalNetworkHandler",void 0);let uD=class extends j.uAl{constructor(){super(...arguments),this.onClickClaimable=new j.HN0,this.onClickNotClaimable=new j.HN0}create(){super.create(),this.setChestGraphic().catch(j.RQr.createHandler("[FestivalChestComponent] Could not set chest graphic for festival chest."))}setChestGraphic(){return(0,G.sH)(this,void 0,void 0,(function*(){this._chestVisualState=yield lD.getChestState(this._chestID),this.activeGameObject.active=0===this._chestVisualState,this.inactiveGameObject.active=0!==this._chestVisualState}))}chestClicked(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._clicksDisabled)return;let k;this._clicksDisabled=!0;try{k=yield lD.attemptChestSpin(this._chestID)}catch(U){return void j.VyI.log("Error getting a response from FestivalChestUtil.attemptChestSpin",j.$bb.Error)}finally{this._clicksDisabled=!1}0===k&&0!==this._chestVisualState&&(k=2);const B=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);switch(k){case 0:this._chestVisualState=1,this.onClickClaimable.dispatch(this);break;case 1:tt.q.instance.prodigy.open.messageBoxOkay(B.getText("FESTIVAL_CHEST_COME_BACK_TOMORROW"),B.getText("BUTTON_OKAY"),null),this.onClickNotClaimable.dispatch(this);break;case 2:tt.q.instance.prodigy.open.messageBoxOkay(B.getText("FESTIVAL_CHEST_COME_BACK_LATER"),B.getText("BUTTON_OKAY"),null),this.onClickNotClaimable.dispatch(this)}}))}destroy(){this.onClickClaimable.dispose(),this.onClickNotClaimable.dispose()}setClicksEnabled(){this._clicksDisabled=!1}setClicksDisabled(){this._clicksDisabled=!0}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],uD.prototype,"activeGameObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],uD.prototype,"inactiveGameObject",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],uD.prototype,"_chestID",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uD.prototype,"onClickClaimable",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uD.prototype,"onClickNotClaimable",void 0),uD=(0,G.Cg)([(0,j.EVk)("FestivalChest",W.Y.festival)],uD);let fD=class extends pt._{constructor(){super(...arguments),this._chestState=2,this.onChestStateReady=new j.HN0}create(){super.create(),lD.getChestState(this._chestID).then((k=>{this._chestState=k,this.onChestStateReady.dispatch()})).catch(j.RQr.createHandler("[FestivalChestDataComponent] Could not get chest state."))}getData(){return this._chestState}destroy(){this.onChestStateReady.dispose(),super.destroy()}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],fD.prototype,"_chestID",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],fD.prototype,"onChestStateReady",void 0),fD=(0,G.Cg)([(0,j.EVk)("FestivalChestData",W.Y.festival)],fD);let bD=class extends j.uAl{constructor(){super(...arguments),this._onAttemptOpen=new j.HN0,this._onOpening=new j.HN0,this._onCollected=new j.HN0}collect(){this._zone=tt.q.instance.prodigy.world.getZone(tt.q.instance.prodigy.world.getCurrentZone());const k=this._playerDataProvider.player;if(this._onAttemptOpen.dispatch(),"C"===this._chestType&&!k.hasMembership())return this.broadcastMemberChestOpenedFailedEvents(),void(Qt.J.shouldSuppressAd(this._playerDataProvider.player)?this.showMemberAdSuppressionToolTip():this.showAd());j.Aq$.isDefined(this._chestKey)&&0===k.backpack.hasItem(this._chestKey.type,this._chestKey.ID)?this.handleChestLocked():this.initChestOpening()}initChestOpening(){const k=this._playerDataProvider.player,B=k.playerContainer;k.saveEnabled=!1,tt.q.instance.game.input.enabled=!1,B.evtProc=!0;tt.q.instance.prodigy.game.add.tween(this.gameObject.transform.localPosition,this).to({x:"-=5"},50,j.GS3.Linear.None).to({x:"+=10"},150,j.GS3.Linear.None).to({x:"-=10"},150,j.GS3.Linear.None).to({x:"+=5"},50,j.GS3.Linear.None).to({y:"-=50"},200,j.GS3.Quadratic.Out).to({y:"+=50"},200,j.GS3.Quadratic.In).to({y:"-=20"},100,j.GS3.Quadratic.Out).to({y:"+=20"},100,j.GS3.Quadratic.In).start().onTweenComplete.add(this.openChest,this,1),this._onOpening.dispatch()}handleChestLocked(){var k;let B=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SOMETHING");if(this._chestKey){const U=null===(k=Yt.t.getItem(this._chestKey.type,this._chestKey.ID))||void 0===k?void 0:k.data;B=(null==U?void 0:U.name)?U.name:B}tt.q.instance.prodigy.open.messageBoxPrefab({text:"CHEST_LOCKED_MESSAGE",textArgs:[B]})}broadcastMemberChestOpenedFailedEvents(){const k=Us.P.shouldUseUnifiedConversionFlow(en.o.FunnelOpenMemberChestWorld)?Fs.R.UnifiedConversionFlow:Qt.J.showYouTubeMembershipAd(tt.q.instance.game,!0)?Fs.R.Video:Fs.R.Static;this._segment.purchase.sendFunnelStart({type:"Open-Member-Chest-World",category:"World",contentId:tt.q.instance.prodigy.world.getCurrentMap(),adType:k,adVersion:Us.P.getAdVersion(en.o.FunnelOpenMemberChestWorld)}),this._segment.container.sendContainerOpenedFailedEvent(ui.ZF.WorldMemberChest,this._chestId,Zb.WE.MemberLocked,fi.N.OpenWorld)}showMemberAdSuppressionToolTip(){const k=this._chestBounds,B=new j.or0(j.Htv.getWidth(k.GameObject),j.Htv.getHeight(k.GameObject)),U=k.GameObject.transform.worldPosition,F=U.x;let G,$,H;$=U.x>tt.q.instance.game.width/2?.75:.25,U.y>tt.q.instance.game.height/2?(G=U.y+B.getHalfHeight(),H=ze.i.UP):(G=U.y-B.getHalfHeight(),H=ze.i.DOWN),tt.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:F,yPosition:G,arrowXRelPos:$,arrowDirection:H})}showAd(){const k={conversionFunnelName:en.o.FunnelOpenMemberChestWorld,conversionFunnelMetadata:tt.q.instance.prodigy.world.getCurrentMap()};tt.q.instance.prodigy.open.membershipInfo(null,k)}openChest(){const k=this._playerDataProvider.player;this._zone.setState(this._chestId,1),j.Aq$.isDefined(this._chestKey)&&k.backpack.consume(this._chestKey.type,this._chestKey.ID,1),k.playerContainer.evtProc=!1,k.saveEnabled=!0,tt.q.instance.game.input.enabled=!0,tt.q.instance.prodigy.open.gotItem(this._rewards,this.checkQuestProgress,null,"open-chest",void 0,void 0,{source_type:"B"!==this._chestType?"A"===this._chestType?li.C.WorldChest:li.C.WorldMemberChest:null}),"A"!==this._chestType&&"C"!==this._chestType||this._segment.container.sendContainerOpenedEvent("A"===this._chestType?ui.ZF.WorldChest:ui.ZF.WorldMemberChest,this._chestId,fi.N.OpenWorld),this._onCollected.dispatch()}checkQuestProgress(){var k;null===(k=tt.q.instance.game.state.get(Tt.G.TileScreen))||void 0===k||k.process()}destroy(){super.destroy(),this._onAttemptOpen.dispose(),this._onOpening.dispose(),this._onCollected.dispose()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],bD.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],bD.prototype,"_segment",void 0),(0,G.Cg)([(0,j.MnK)(j.XVE),(0,G.Sn)("design:type",j.XVE)],bD.prototype,"_chestBounds",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],bD.prototype,"_onAttemptOpen",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],bD.prototype,"_onOpening",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],bD.prototype,"_onCollected",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_CHEST_ID"),(0,G.Sn)("design:type",String)],bD.prototype,"_chestId",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_CHEST_KEY"),(0,G.Sn)("design:type",Object)],bD.prototype,"_chestKey",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_CHEST_TYPE"),(0,G.Sn)("design:type",String)],bD.prototype,"_chestType",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_CHEST_REWARD"),(0,G.Sn)("design:type",Array)],bD.prototype,"_rewards",void 0),bD=(0,G.Cg)([(0,j.EVk)("LegacyZoneChestCollectEvent",W.Y.map)],bD);let pD=class extends Fi.z{constructor(){super(...arguments),this._bindOnCreate=!1,this._onContextBound=new j.HN0}create(){super.create(),this._zone=this.getCurrentZone(),this._bindOnCreate&&this.bindContext()}bindContext(){var k;let B=null;if(!j.Aq$.isDefined(this._chestType)){B="A";for(let U=0;U=500&&(B="C")}}j.Aq$.isDefined(B)&&this._context.Container.rebind("ZONE_CHEST_TYPE").toConstantValue(B),this._context.Container.rebind("ZONE_CHEST_IS_ENABLED").toConstantValue(!this.areZoneChestsDisabledByQuest()),this._context.Container.rebind("ZONE_CHEST_STATE").toConstantValue(this.getZoneChestState()),this._context.Container.rebind("ZONE_CHEST_IS_CLOSED").toConstantValue(this.isChestClosed()),this._context.Container.rebind("ZONE_CHEST_IS_HIGHLIGHTED").toConstantValue(this.isChestHighlighted()),this.gameObject.findComponentsInChildren(Lo.B).forEach((k=>k.consume())),this._onContextBound.dispatch()}areZoneChestsDisabledByQuest(){var k;const B=null===(k=this._zone.getMap(tt.q.instance.prodigy.world.getCurrentMapTag()))||void 0===k?void 0:k.questParams;return!1===(null==B?void 0:B.enableChests)}unbindContext(){}getCurrentZone(){return tt.q.instance.prodigy.world.getZone(tt.q.instance.prodigy.world.getCurrentZone())}getZoneChestState(){let k;const B=this.isChestClosed();switch(this._chestType){default:case"A":k=B?"NORMAL_CHEST_CLOSED":"NORMAL_CHEST_OPENED";break;case"B":k=B?"QUEST_CHEST_CLOSED":"QUEST_CHEST_OPENED";break;case"C":k=B?"MEMBER_CHEST_CLOSED":"MEMBER_CHEST_OPENED"}return k}isChestClosed(){const k=this._zone.getState(this._chestId);return!j.Aq$.isDefined(k)||0===k}isChestHighlighted(){var k;const B=this._zone.getQuestState();if(!j.Aq$.isDefined(B)||!j.Aq$.isDefined(B.req)||tt.q.instance.game.state.current===Tt.G.PrefabScene)return!1;const U=this._playerDataProvider.player;for(let F=0;FU.backpack.hasItem(B.req.type,B.req.ID))return!0}return!1}destroy(){super.destroy(),this._onContextBound.dispose()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],pD.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_CHEST_ID"),(0,G.Sn)("design:type",String)],pD.prototype,"_chestId",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_CHEST_TYPE"),(0,G.Sn)("design:type",String)],pD.prototype,"_chestType",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_CHEST_REWARD"),(0,G.Sn)("design:type",Array)],pD.prototype,"_rewards",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],pD.prototype,"_bindOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],pD.prototype,"_onContextBound",void 0),pD=(0,G.Cg)([(0,j.EVk)("ZoneChestDataProvider",W.Y.map)],pD);var vD=U(64544);let gD=class extends j.uAl{constructor(){super(...arguments),this._floor=1,this._runOnLoad=!1,this.isEqual=new j.HN0,this.isGreaterThan=new j.HN0,this.isLesserThan=new j.HN0}create(){super.create(),this._runOnLoad&&this.checkTowerCurrentFloor()}destroy(){this.isEqual.dispose(),this.isGreaterThan.dispose(),this.isLesserThan.dispose(),super.destroy()}checkTowerCurrentFloor(){const k=this._academyTowerDataProvider.getCurrentFloor();k===this._floor?this.isEqual.dispatch():k{switch(k){case mD.NextFloorOrdinal:B.push(xt.$.addOrdinalSuffix(this._academyTowerDataProvider.getNextFloor()));break;case mD.Element:B.push(xt.$.capitalizeFirstLetter(this._academyTowerDataProvider.getElement()));break;case mD.BattlesWon:B.push(this._academyTowerDataProvider.getBattlesWon().toString());break;case mD.TotalBattles:B.push(this._academyTowerDataProvider.getTotalBattles().toString());break;case mD.CurrentFloorOrdinal:B.push(xt.$.addOrdinalSuffix(this._academyTowerDataProvider.getCurrentFloor()));break;case mD.NextFloor:B.push(this._academyTowerDataProvider.getNextFloor().toString());break;case mD.CurrentFloor:B.push(this._academyTowerDataProvider.getCurrentFloor().toString())}})),this._localizedText.text=this._localizer.getText(this._localizationKey,...B)}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],yD.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],yD.prototype,"_localizedText",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],yD.prototype,"_localizationKey",void 0),(0,G.Cg)([(0,j.MnK)(vD.w),(0,G.Sn)("design:type",vD.w)],yD.prototype,"_academyTowerDataProvider",void 0),(0,G.Cg)([(0,j.gfw)(mD),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],yD.prototype,"_formatTypes",void 0),yD=(0,G.Cg)([(0,j.EVk)("AcademyTowerLocalizedKeyText",W.Y.academy)],yD);let _D=class extends j.uAl{constructor(){super(...arguments),this._battlesWon=1,this._runOnLoad=!1,this.isEqual=new j.HN0,this.isGreaterThan=new j.HN0,this.isLesserThan=new j.HN0}create(){super.create(),this._runOnLoad&&this.checkBattlesWon()}destroy(){this.isEqual.dispose(),this.isGreaterThan.dispose(),this.isLesserThan.dispose(),super.destroy()}checkBattlesWon(){const k=this._academyTowerDataProvider.getBattlesWon();k===this._battlesWon?this.isEqual.dispatch():k{tt.q.instance.prodigy.open.menuCloseAll();const k=Number(this._storeIdToOpen);isNaN(k)?tt.q.instance.prodigy.open.dynamicStore({storeKey:this._storeIdToOpen,origin:{originType:ui.$N.ButtonClick}}):tt.q.instance.prodigy.open.store(k,void 0,void 0,{originType:ui.$N.ButtonClick})}));const k=this.getInjectedValue("a25-68f4");k&&k.sendQuestEventViaHub(Wr.T.BUTTON_CLICK,{id:this._questEventId}).catch(j.RQr.createHandler("An error occurred while sending a quest event from the CurrencyDrainModal"))}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",Object)],SD.prototype,"_storeIdToOpen",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],SD.prototype,"_actionButton",void 0),SD=(0,G.Cg)([(0,j.EVk)("CurrencyDrainModalComponent",W.Y.festival)],SD);let AD=class extends j.uAl{constructor(){super(...arguments),this.onSkinProcessed=new j.HN0}create(){super.create(),this.processActiveSkin()}processActiveSkin(){for(const k of tt.q.instance.prodigy.skin.active){const B=k.getOverrideName(this._mapTag);if(void 0!==B)return void this.onSkinProcessed.dispatch(B)}this.onSkinProcessed.dispatch()}destroy(){this.onSkinProcessed.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("ZONE_MAP_TAG"),(0,G.Sn)("design:type",String)],AD.prototype,"_mapTag",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],AD.prototype,"onSkinProcessed",void 0),AD=(0,G.Cg)([(0,j.EVk)("SkinManager",W.Y.festival)],AD)},88552:(k,B,U)=>{"use strict";U.d(B,{Z:()=>j});var F=U(8674),G=U(62459);let j=class extends G.uAl{constructor(){super(...arguments),this.onClose=new G.HN0}destroy(){this.onClose.dispose(),super.destroy()}run(){var k;this.onClose.dispatch(),null===(k=this.menu)||void 0===k||k.close()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"onClose",void 0),j=(0,F.Cg)([(0,G.EVk)("CloseMenu")],j)},95798:(k,B,U)=>{"use strict";U.d(B,{K:()=>F,o:()=>K});var F,G=U(62459),j=U(95891),$=U(35120),H=U(34829),V=U(98623),W=U(30226),q=U(88022);!function(k){k[k.UP=0]="UP",k[k.UP_RIGHT=45]="UP_RIGHT",k[k.RIGHT=90]="RIGHT",k[k.DOWN_RIGHT=135]="DOWN_RIGHT",k[k.DOWN=180]="DOWN",k[k.DOWN_LEFT=225]="DOWN_LEFT",k[k.LEFT=270]="LEFT",k[k.UP_LEFT=315]="UP_LEFT"}(F||(F={}));class K extends V.H{constructor(k,B,U,V,W,K,z=F.UP,Y,Q){var X,Z;super(k,B,U.x,U.y),this.isBlocked=!1,this.data={},this.canReTrigger=!1,this.callback=null,this.frameCount=0,this.fired=!1,this.forceVisible=!1,this.data=U,this.user=V,this.path=W,this.canReTrigger=j.get(U,"canReTrigger",!1),this.callback=Q?null:K;const J=j.get(U,"guideHandPathToX",U.x),tt=j.get(U,"guideHandPathToY",U.y);let et=z;G.Aq$.isDefined(et)||(et=U.x<50?U.y<50?F.UP_LEFT:U.y>670?F.DOWN_LEFT:F.LEFT:U.x>1230?U.y<50?F.UP_RIGHT:U.y>670?F.DOWN_RIGHT:F.RIGHT:U.y<50?F.UP:U.y>60?F.DOWN:F.LEFT);const it=this.add($.q.instance.prodigy.create.sprite(0,0,q._.General_core_json,"area-pointer"));it.anchor.set(.5,0),it.angle=et,it.inputEnabled=!0,it.events.onInputDown.add(this.moveTo.bind(this,J,tt)),this.handSprite=it,Q&&U.disabledGraphic&&(this.forceVisible=!0,it.visible=!1,this.add($.q.instance.prodigy.create.sprite(null!==(X=U.arrowOffsetX)&&void 0!==X?X:0,null!==(Z=U.arrowOffsetY)&&void 0!==Z?Z:0,U.disabledGraphic,void 0,{x:.5,y:.5})));let st=0;et>F.UP&&etF.DOWN&&et<360&&(st=30);let nt=0;et>F.LEFT||etF.RIGHT&&etnull)){var B,U;this.callback=k,this.data.disabledGraphic&&(this.forceVisible=!0,this.handSprite.visible=!1,this.add($.q.instance.prodigy.create.sprite(null!==(B=this.data.arrowOffsetX)&&void 0!==B?B:0,null!==(U=this.data.arrowOffsetY)&&void 0!==U?U:0,this.data.disabledGraphic,void 0,{x:.5,y:.5})))}update(){if(super.update(),this.user.evtProc||this.fired&&!this.canReTrigger)return;if(!(this.frameCount<=0))return void this.frameCount--;this.frameCount=5;let k=!1;G.Aq$.isDefined(this.data.r)&&G.cj9.distance(this.user.x,this.user.y,this.x,this.y)<=this.data.r||!G.Aq$.isDefined(this.data.r)&&G.Aq$.isDefined(this.data.w)&&this.user.x>=this.x-Math.floor(this.data.w/2)&&this.user.x<=this.x+Math.floor(this.data.w/2)&&this.user.y>=this.y-Math.floor(this.data.h/2)&&this.user.y<=this.y+Math.floor(this.data.h/2)?k=!this.fired:this.canReTrigger&&(this.fired=!1),k&&(this.fired=!0,G.Aq$.isDefined(this.callback)&&this.callback())}process(k,B,U=""){return this.visible=this.forceVisible,this.checkDistance(k,B,U)}setClosest(){this.visible=!0}getTarget(){return this.data.target}checkDistance(k,B,U){if(!G.Aq$.isDefined(this.data.target)||!G.Aq$.isDefined(U)||U===k.questHub&&k.getCurrentQuestID()!==k.finalQuestId)return null;if(`${k.ID}-${B.getTag()}`===U)return 1;const F=(k,B,j)=>{if(!G.Aq$.isDefined(j)||W.J.inArray(B,j))return null;if(U===j)return B.length+1;const $=j.split("-"),H=k.getZone($[0]);if(!G.Aq$.isDefined(H))return null;const V=H.getMap($[1]).locations;let q=null;for(let U=0;U1180?Math.floor(.5*this.data.w):0),B=this.y+(this.data.y<100?-Math.floor(.5*this.data.h):this.data.y>620?Math.floor(.5*this.data.h):0),U=this.data.w*(this.data.x<100||this.data.x>1180?1:.5),F=this.data.h*(this.data.y<100||this.data.y>620?1:.5));const j=this.game.add.graphics(0,0);return j.beginFill(0,.75),this.data.rect?j.drawRect(k-.5*U,B-.5*F,U,F):j.drawEllipse(k,B,U,F),j}}},73797:(k,B,U)=>{"use strict";var F,G,j,$,H,V,W,q,K,z,Y,Q,X,Z,J,tt,et,it,st,nt,at,rt,ot,ht,ct,dt,lt,ut,ft,bt,pt,vt,gt,mt,yt,_t,Et,wt,Tt,St,At,Ct,Ot,It,Dt,Rt,Pt,Mt;U.d(B,{$i:()=>pt,AU:()=>it,B:()=>Ot,Bk:()=>ot,F0:()=>at,GR:()=>Mt,H3:()=>mt,HG:()=>tt,Ii:()=>K,J3:()=>q,J8:()=>ft,Lk:()=>yt,RZ:()=>ut,Y1:()=>Z,_D:()=>wt,bI:()=>St,bS:()=>bt,bv:()=>nt,cN:()=>Y,f7:()=>vt,fP:()=>st,gJ:()=>rt,hw:()=>H,iZ:()=>gt,ib:()=>It,ig:()=>z,ki:()=>At,lT:()=>X,lc:()=>j,n8:()=>lt,nN:()=>Tt,oI:()=>W,oL:()=>Rt,ph:()=>Q,pm:()=>ct,rF:()=>Ct,sd:()=>ht,sn:()=>Dt,u0:()=>$,vy:()=>Pt,zg:()=>_t,zr:()=>J}),function(k){k.ShowDrops="Prodigy.Events.VictoryManager.SHOW_DROPS",k.Complete="Prodigy.Events.VictoryManager.COMPLETE"}(F||(F={})),function(k){k.Audio="Prodigy.Events.SystemMenu.REFRESH_AUDIO_MENU"}(G||(G={})),function(k){k.AddChild="Prodigy.Events.Screen.ADD_CHILD",k.GetLayer="Prodigy.Events.Screen.GET_LAYER",k.EnableBackground="Prodigy.Events.Screen.ENABLE_BACKGROUND",k.EnableContent="Prodigy.Events.Screen.ENABLE_CONTENT"}(j||(j={})),function(k){k.PlayerAdded="Prodigy.Events.WalkableScreen.PLAYER_ADDED",k.PlayerUpdate="Prodigy.Events.WalkableScreen.PLAYER_UPDATED"}($||($={})),function(k){k.Done="Prodigy.Events.FlyingStars.DONE",k.PippetStarsDone="Prodigy.Events.FlyingPippetStars.DONE",k.MemberStarsDone="Prodigy.Events.FlyingMemberStars.DONE"}(H||(H={})),function(k){k.Done="Prodigy.Events.OpenJar.DONE"}(V||(V={})),function(k){k.ItemsLost="Prodigy.Event.MemberJar.ITEMS_LOST",k.ItemsSaved="Prodigy.Event.MemberJar.ITEMS_SAVED"}(W||(W={})),function(k){k.GetIsRunning="Prodigy.Events.Battle.GET_IS_RUNNING",k.PopupClosed="Prodigy.Events.Battle.POPUP_CLOSED",k.EndBattle="Prodigy.Events.Battle.END_BATTLE",k.PvpComboIncrease="Prodigy.Events.Battle.PVP_COMBO_INCREASE",k.PvpComboBreak="Prodigy.Events.Battle.PVP_COMBO_BREAK",k.PvpUpdate="Prodigy.Events.Battle.PVP_UPDATE",k.PvpComboMeterMoveIn="Prodigy.Events.Battle.PVP_COMBO_METRE_MOVE_IN",k.PvpComboMeterMoveOut="Prodigy.Events.Battle.PVP_COMBO_METRE_MOVE_OUT"}(q||(q={})),function(k){k.DismissalOverlay="Prodigy.Events.RevampBattle.DISMISSAL_OVERLAY",k.Victory="Prodigy.Events.RevampBattle.VICTORY"}(K||(K={})),function(k){k.AnimationDone="Prodigy.Events.Creature.ANIMATION_DONE",k.LevelUp="Prodigy.Events.Creature.LEVEL_UP",k.AnyLevelUp="Prodigy.Events.Creature.ANY_LEVEL_UP",k.StarsAdded="Prodigy.Events.Creature.STARS_ADDED",k.PlayerLoaded="Prodigy.Events.Creature.PLAYER_LOADED",k.LevelUpAnimation="Prodigy.Events.Creature.LEVEL_UP_ANIMATION",k.ProcessedAllEvents="Prodigy.Events.Creature.PROCESSED_ALL_EVENTS",k.EvolveStart="Prodigy.Events.Creature.EVOLVE_START",k.EvolveEnd="Prodigy.Events.Creature.EVOLVE_END",k.Evolved="Prodigy.Events.Creature.EVOLVED",k.GearUpdate="Prodigy.Events.Creature.GEAR_UPDATE",k.Merged="Prodigy.Events.Creature.MERGED"}(z||(z={})),function(k){k.ShowPippetBattleBonus="Prodigy.Events.Chest.SHOW_PIPPET_BATTLE_BONUS",k.ShowMemberStars="Prodigy.Events.Chest.SHOW_MEMBER_STARS"}(Y||(Y={})),function(k){k.EnableDynamicLayer="Prodigy.Events.Map.ENABLE_DYNAMIC_LAYER"}(Q||(Q={})),function(k){k.Setup="Prodigy.Events.NetworkHandlers.SETUP",k.LoginError="Prodigy.Events.NetworkHandlers.LOGIN_ERROR",k.ArcadiaHandoffSuccess="Prodigy.Events.NetworkHandlers.ARCADIA_HANDOFF_SUCCESS",k.ArcadiaHandoffFailure="Prodigy.Events.NetworkHandlers.ARCADIA_HANDOFF_FAILURE"}(X||(X={})),function(k){k.HideHUD="Prodigy.Events.HUD.HIDE_HUD",k.ShowHUD="Prodigy.Events.HUD.SHOW_HUD",k.RefreshHUD="Prodigy.Events.HUD.REFRESH_HUD_ICONS",k.SetClickedWorldMap="Prodigy.Events.HUD.SET_CLICKED_WORLD_MAP",k.WorldMapOpened="Prodigy.Events.HUD.WORLD_MAP_OPENED",k.HideChatNotif="Prodigy.Events.HUD.HIDE_CHAT_NOTIF",k.ClosePetsMenu="Prodigy.Events.HUD.CLOSE_PETS_MENU",k.ShowRightSideHUD="Prodigy.Events.HUD.SHOW_RIGHT_HUD",k.HideRightSideHUD="Prodigy.Events.HUD.HIDE_RIGHT_HUD",k.RefreshWizardWatchAdCount="Prodigy.Events.HUD.REFRESH_WIZARD_WATCH_AD_COUNT",k.HighlightMapButton="Prodigy.Events.HUD.HIGHLIGHT_MAP_BUTTON",k.HidePetUpgradeNotification="Prodigy.Events.HUD.HIDE_PET_UPGRADE_NOTIFICATION",k.UpdateSocialNotification="Prodigy.Events.HUD.UPDATE_SOCIAL_NOTIFICATION",k.HUDRevampDemandAttention="Prodigy.Events.HUD.HUD_REVAMP_DEMAND_ATTENTION",k.HUDRevampStartOperation="Prodigy.Events.HUD.HUD_REVAMP_START_OPERATION",k.HUDRevampEndOperation="Prodigy.Events.HUD.HUD_REVAMP_END_OPERATION",k.HUDRevampButtonDataUpdated="Prodigy.Events.HUD.HUD_REVAMP_BUTTON_DATA_UPDATED",k.HUDRevampButtonVisibilityRefreshRequested="Prodigy.Events.HUD.HUD_REVAMP_BUTTON_VISIBILITY_REFRESH_REQUESTED",k.HUDRevampButtonAttentionGranted="Prodigy.Events.HUD.HUD_REVAMP_ATTENTION_GRANTED",k.HUDRevampExclusiveAttentionChanged="Prodigy.Events.HUD.HUD_REVAMP_EXCLUSIVE_ATTENTION_CHANGED",k.HUDAttentionManagerUpdated="Prodigy.Events.HUD.HUD_ATTENTION_MANAGER_UPDATED",k.CheckForHUDAttention="Prodigy.Events.HUD.CHECK_FOR_HUD_ATTENTION"}(Z||(Z={})),function(k){k.GetAllMailSuccess="Prodigy.Events.Mailer.GET_ALL_MAIL_SUCCESS",k.GetAllMailFailure="Prodigy.Events.Mailer.GET_ALL_MAIL_FAILURE",k.MarkAsRead="Prodigy.Events.Mailer.MARK_AS_READ",k.MarkAsReadFailure="Prodigy.Events.Mailer.MARK_AS_READ_FAILED",k.DeleteMailSuccess="Prodigy.Events.Mailer.DELETE_MAIL_SUCCESSFUL",k.DeleteMailFailure="Prodigy.Events.Mailer.DELETE_MAIL_FAILURE",k.UpdateMailCounters="Prodigy.Events.Mailer.UPDATE_MAIL_COUNTERS",k.ShowIndicator="Prodigy.Events.Mailer.SHOW_INDICATOR",k.GiftBoxOpened="Prodigy.Events.Mailer.GIFT_BOX_OPENED",k.CloseList="Prodigy.Events.Mailer.CLOSE_LIST"}(J||(J={})),function(k){k.Card="Card",k.ChatButton="chatButton",k.FriendsList="FriendsList",k.FriendsListOfActualFriends="FriendsListOfActualFriends",k.HUD="HUD",k.MailerButton="ProdigyMailerButton",k.Mailer="ProdigyMailer",k.MailView="ProdigyMailView",k.NetworkHandlers="NetworkHandlers",k.Titan="Titan",k.WeekendEventsLevelUp="WeekendEvents.AnyLevelUp"}(tt||(tt={})),function(k){k.OnGetDataComplete="Prodigy.Events.Boss.ON_GET_DATA_COMPLETE"}(et||(et={})),function(k){k.Update="Prodigy.Events.GameObj.UPDATE",k.PlayerInitialized="Prodigy.Events.GameObj.PLAYER_INITIALIZED"}(it||(it={})),function(k){k.Loaded="Prodigy.Events.Boot.LOADED"}(st||(st={})),function(k){k.WorkerLoadComplete="Prodigy.Events.Loading.WORKER_LOAD_COMPLETE",k.FestivalInitialized="Prodigy.Events.Loading.FESTIVAL_INITIALIZED",k.AnalyticsInitialized="Prodigy.Events.Loading.ANALYTICS_INITIALIZED"}(nt||(nt={})),function(k){k.ClickedHouseIcon="Prodigy.Events.House.CLICKED_HOUSE_ICON",k.OpenEditor="Prodigy.Events.House.OPEN_EDITOR",k.CloseEditor="Prodigy.Events.House.CLOSE_EDITOR"}(at||(at={})),function(k){k.InkBlasted="Prodigy.Events.ShipwreckShore.INK_BLASTED",k.InkGroupDestroyed="Prodigy.Events.ShipwreckShore.INK_GROUP_DESTROYED"}(rt||(rt={})),function(k){k.OnMouseWheel="Prodigy.Events.Input.ON_MOUSE_WHEEL"}(ot||(ot={})),function(k){k.GotFriendsList="Prodigy.Events.FriendsList.GOT_FRIENDS_LIST",k.GotFriendsListAppearance="Prodigy.Events.FriendsList.GOT_FRIENDS_LIST_APPEARANCE",k.GetTotalFriendRequests="Prodigy.Events.FriendsList.GET_TOTAL_FRIEND_REQUESTS",k.GetTotalFriendRequestsFailure="Prodigy.Events.FriendsList.GET_TOTAL_FRIEND_REQUESTS_FAILURE",k.ClearFriendRequestsCache="Prodigy.Events.FriendsList.CLEAR_FRIEND_REQUESTS_CACHE",k.GetFriendRequestList="Prodigy.Events.FriendsList.GET_FRIEND_REQUEST_LIST",k.GotFriendRequestList="Prodigy.Events.FriendsList.GOT_FRIEND_REQUEST_LIST",k.GetFriendList="Prodigy.Events.FriendsList.GET_FRIENDS_LIST",k.SetRequests="Prodigy.Events.FriendsList.SET_REQUESTS",k.SendRequest="Prodigy.Events.FriendsList.SEND_REQUEST",k.CancelRequest="Prodigy.Events.FriendsList.CANCEL_REQUEST",k.AcceptRequest="Prodigy.Events.FriendsList.ACCEPT_REQUEST",k.RejectRequest="Prodigy.Events.FriendsList.REJECT_REQUEST",k.RequestSent="Prodigy.Events.FriendsList.REQUEST_SENT",k.RequestCancelled="Prodigy.Events.FriendsList.REQUEST_CANCELLED",k.RequestReceived="Prodigy.Events.FriendsList.REQUEST_RECEIVED",k.RequestAccepted="Prodigy.Events.FriendsList.REQUEST_ACCEPTED",k.RequestRejected="Prodigy.Events.FriendsList.REQUEST_REJECTED",k.RemoveFriend="Prodigy.Events.FriendsList.REMOVE_FRIEND",k.FriendRemoved="Prodigy.Events.FriendsList.FRIEND_REMOVED",k.GetFriendshipStatus="Prodigy.Events.FriendsList.GET_FRIENDSHIP_STATUS",k.GotFriendshipStatus="Prodigy.Events.FriendsList.GOT_FRIENDSHIP_STATUS",k.FriendsAppearanceUpdated="Prodigy.Events.FriendsList.FRIENDS_APPEARANCE_UPDATED",k.IllogicalRequestAction="Prodigy.Events.FriendsList.ILLOGICAL_REQUEST_ACTION"}(ht||(ht={})),function(k){k.MovePlayer="Prodigy.Events.PlayerLocomotion.MOVE_PLAYER",k.StopPlayer="Prodigy.Events.PlayerLocomotion.STOP_PLAYER",k.GetTarget="Prodigy.Events.PlayerLocomotion.GET_TARGET"}(ct||(ct={})),function(k){k.SetBackgroundPanelTileDimensions="Prodigy.Events.LocationPage.SET_BACKGROUND_PANEL_TILE_DIMENSIONS",k.GetBackgroundPanelTileDimensions="Prodigy.Events.LocationPage.GET_BACKGROUND_PANEL_TILE_DIMENSIONS"}(dt||(dt={})),function(k){k.TabButtonClicked="Prodigy.Events.UI.TAB_BUTTON_CLICKED",k.TabSelected="Prodigy.Events.UI.TAB_SELECTED",k.ChildAdded="Prodigy.Events.UI.CHILD_ADDED",k.ChildRemoved="Prodigy.Events.UI.CHILD_REMOVED",k.MenuOpened="Prodigy.Events.UI.MENU_OPENED",k.FactoryMenuOpened="Prodigy.Events.UI.FACTORY_MENU_OPENED",k.FactoryMenuClosed="Prodigy.Events.UI.FACTORY_MENU_CLOSED",k.MountTogglePressed="Prodigy.Events.UI.MOUNT_TOGGLE_PRESSED",k.WorldMapZoneSelected="Prodigy.Events.UI.WORLD_MAP_ZONE_SELECTED",k.WorldMapDifficultyModeChanged="Prodigy.Events.UI.WORLD_MAP_DIFFICULTY_MODE_CHANGED",k.DialogClosed="prodigy.Events.UI.DIALOG_CLOSED",k.GotItemClosed="prodigy.Events.UI.GOT_ITEM_CLOSED",k.SegmentedOfferDialogClosed="prodigy.Events.UI.SEGMENTED_OFFER_DIALOG_CLOSED",k.RestrictionsClosed="Prodigy.Events.UI.RESTRICTIONS_CLOSED",k.FestivalProgressClosed="Prodigy.Events.UI.FESTIVAL_PROGRESS_CLOSED",k.FestivalVideoClosed="Prodigy.Events.UI.FESTIVAL_VIDEO_CLOSED"}(lt||(lt={})),function(k){k.GotTitans="Prodigy.Events.Titan.GOT_TITANS",k.GotTitan="Prodigy.Events.Titan.GOT_TITAN",k.Catapult="Prodigy.Events.Titan.CATAPULT"}(ut||(ut={})),function(k){k.PlayerAppearanceUpdated="Prodigy.Events.PlayerContainer.PLAYER_APPEARANCE_UPDATED",k.PlayerEditingMenuClosed="Prodigy.Events.PlayerContainer.PLAYEREDITINGMENUCLOSED",k.NewAnimationStateSet="Prodigy.Events.PlayerContainer.NEW_ANIMATION_STATE_SET",k.MorphMarbleUsed="Prodigy.Events.PlayerContainer.MORPH_MARBLE_USED",k.MorphMarbleCancelled="Prodigy.Events.PlayerContainer.MORPH_MARBLE_CANCELLED",k.MorphMarbleTimerUpdated="Prodigy.Events.PlayerContainer.MORPH_MARBLE_TIMER_UPDATED"}(ft||(ft={})),function(k){k.POST_MESSAGE_RECEIVED="Prodigy.Events.Web.POST_MESSAGE_RECEIVED"}(bt||(bt={})),function(k){k.TargetCollected="Prodigy.Events.Dungeon.TARGET_COLLECTED"}(pt||(pt={})),function(k){k.PagesCollected="Prodigy.Events.Achievements.PAGES_COLLECTED",k.ClaimedRewardsUpdated="Prodigy.Events.Achievements.CLAIMED_REWARDS_UPDATED"}(vt||(vt={})),function(k){k.ToolTipClosed="Prodigy.Events.ToolTip.CLOSE"}(gt||(gt={})),function(k){k.MembershipLapsedBetweenSessions="Prodigy.Events.Membership.LAPSED_BETWEEN_SESSIONS",k.MembershipResponseReceived="Prodigy.Events.Membership.RESPONSE_RECEIVED",k.MembershipRewardsFlowComplete="Prodigy.Events.Membership.REWARDS_FLOW_COMPLETE"}(mt||(mt={})),function(k){k.HardCurrencyPurchased="Prodigy.Events.HardCurrency.HARD_CURRENCY_PURCHASED"}(yt||(yt={})),function(k){k.PurchaseStarted="Prodigy.Events.DynamicStore.PURCHASE_STARTED",k.PurchaseSuccessful="Prodigy.Events.DynamicStore.PURCHASE_SUCCESSFUL",k.PurchaseFailed="Prodigy.Events.DynamicStore.PURCHASE_FAILED"}(_t||(_t={})),function(k){k.StarJarRedeemed="Prodigy.Events.PostBattleFlow.STAR_JAR_REDEEMED"}(Et||(Et={})),function(k){k.PuppetmasterWorldMapSpell="Prodigy.Events.EZoneUnlockScalingEvents.PUPPETMASTER_LOCKS_ZONES",k.PuppetmasterCutsceneComplete="Prodigy.Events.EZoneUnlockScalingEvents.PUPPETMASTER_CUTSCENE_COMPLETE"}(wt||(wt={})),function(k){k.PlayerGoalsOpenPanel="Prodigy.Events.EPlayerGoalsQuestEvent.PLAYER_GOALS_OPEN_PANEL",k.PlayerGoalsPanelClosed="Prodigy.Events.EPlayerGoalsQuestEvent.PLAYER_GOALS_PANEL_CLOSED",k.PlayerGoalsClosed="Prodigy.Events.EPlayerGoalsQuestEvent.PLAYER_GOALS_CLOSED"}(Tt||(Tt={})),function(k){k.ReceivedPetGear="Prodigy.Events.PET_GEAR.RECEIVED_PET_GEAR",k.FtueStarted="Prodigy.Events.PET_GEAR.FTUE_STARTED",k.FtueCompleted="Prodigy.Events.PET_GEAR.FTUE_COMPLETED",k.PetGearAdClicked="Prodigy.Events.PetGear.AD_CLICKED"}(St||(St={})),function(k){k.AbleToMerge="Prodigy.Event.PET_MERGE.ABLE_TO_MERGE",k.FtueStarted="Prodigy.Events.PET_MERGE.FTUE_STARTED",k.FtuePetMenuOpened="Prodigy.Events.FTUE_PET_MERGE.PET_MENU_OPEN",k.FtueMergeModalLoaded="Prodigy.Events.FTUE_PET_MERGE.MERGE_MODAL_LOADED",k.FtueCompleted="Prodigy.Events.PET_MERGE.FTUE_COMPLETED"}(At||(At={})),function(k){k.CountdownStarted="Prodigy.Events.DailyLoginCalendar.COUNTDOWN_STARTED",k.CountdownTask="Prodigy.Events.DailyLoginCalendar.COUNTDOWN_TASK",k.ReadyToCollect="Prodigy.Events.DailyLoginCalendar.READY_TO_COLLECT",k.CalendarEnding="Prodigy.Events.DailyLoginCalendar.CALENDAR_ENDING",k.CalendarEnded="Prodigy.Events.DailyLoginCalendar.CALENDAR_ENDED",k.CalendarTimeRemaining="Prodigy.Events.DailyLoginCalendar.CALENDAR_TIME_REMAINING"}(Ct||(Ct={})),function(k){k.SlotVisibilityChanged="Prodigy.Events.SLOT_VISIBILITY_CHANGED"}(Ot||(Ot={})),function(k){k.ItemConsumed="Prodigy.Events.Item.ITEM_CONSUMED",k.ItemReceived="Prodigy.Events.Item.ITEM_RECEIVED"}(It||(It={})),function(k){k.HardModeFtueStepAdvanced="Prodigy.Events.CampaignReplayFtue.HARD_MODE_FTUE_STEP_ADVANCED",k.HardModeFtueCanceled="Prodigy.Events.CampaignReplayFtue.HARD_MODE_FTUE_CANCELLED",k.HardModeFtueCompleted="Prodigy.Events.CampaignReplayFtue.HARD_MODE_FTUE_COMPLETED"}(Dt||(Dt={})),function(k){k.HardModeJustUnlocked="Prodigy.Events.CampaignReplay.HARD_MODE_JUST_UNLOCKED",k.ExpertModeJustUnlocked="Prodigy.Events.CampaignReplay.EXPERT_MODE_JUST_UNLOCKED",k.DifficultyUnlockRequestFailed="Prodigy.Events.CampaignReplay.DIFFICULTY_UNLOCK_REQUEST_FAILED",k.DifficultyModeChangeFailed="Prodigy.Events.CampaignReplay.DIFFICULTY_MODE_CHANGE_FAILED"}(Rt||(Rt={})),function(k){k.FtueStepAdvanced="Prodigy.Events.AfterSchoolWidget.FTUE_STEP_ADVANCED",k.FtueFunnelProgressionStepComplete="Prodigy.Events.AfterSchoolWidget.FTUE_FUNNEL_PROGRESSION_STEP_COMPLETE"}(Pt||(Pt={})),function(k){k.ObjectiveUpdated="Prodigy.Events.Objectives.OBJECTIVE_UPDATED"}(Mt||(Mt={}))},79421:(k,B,U)=>{"use strict";U.d(B,{N:()=>V});var F=U(62459),G=U(88022),j=U(35120),$=U(34829),H=U(59968);class V extends H.R{constructor(k,B,U,$,H,V,W,q,K,z){super(k,B,W,null,H,V),this.sprite=null,this.animWalk=null,this.animStand=null,this.head=null,this.indicator=null,this.nameOffsetX=-5,5===K&&this.nameText.GameObject.legacyTransform.group.position.set(0,-135),this.sprite=this.sprites.addChild(j.q.instance.prodigy.create.sprite(0,0,G._.Npc_sprite_gnome_json,"npc_0",void 0,this.onTextureLoaded.bind(this))),this.sprite.x-=Math.floor(this.sprite.width/2),this.sprite.y=-this.sprite.height,this.head=j.q.instance.prodigy.create.element(this.sprites,this.sprite.x,0);const Y=13-(2===K||3===K||4===K?5:5===K?20:6===K?22:0),Q=this.head.add(j.q.instance.prodigy.create.sprite(Y,0,G._.Npc_sprite_gnome_json,`hat_${F.Aq$.isDefined(K)?K:1}`));Q.y=10-Q.height;const X=this.head.add(j.q.instance.prodigy.create.sprite(0,0,G._.Npc_sprite_gnome_json,`head_${F.Aq$.isDefined(q)?q:1}`));F.Aq$.isDefined(z)&&(X.inputEnabled=!0,X.events.onInputDown.add((()=>{this.clicked(U,$,z)})),Q.inputEnabled=!0,Q.events.onInputDown.add((()=>{this.clicked(U,$,z)})),this.sprite.inputEnabled=!0,this.sprite.events.onInputDown.add((()=>{this.clicked(U,$,z)}))),this.stand(),this.showName(),this.repositionName()}onTextureLoaded(k){k&&(this.animWalk=k.animations.addIfFound("walk",["npc_0","npc_1","npc_2","npc_3","npc_4","npc_5","npc_6","npc_7"],10,!0),this.animWalk.frame=0,this.animStand=k.animations.addIfFound("stand",["npc_8","npc_9","npc_10","npc_11","npc_12","npc_13","npc_14","npc_15"],10,!0),this.animStand.frame=0)}flip(){super.flip(),this.repositionName()}update(){if(super.update(),F.Aq$.isDefined(this.animWalk)&&F.Aq$.isDefined(this.animStand)){let k="npc_0";1===this.mode?k=this.animStand.currentFrame.name:0===this.mode&&(k=this.animWalk.currentFrame.name),F.Aq$.isDefined(this.head)&&(this.head.y=this.sprite.y-15+V.frameOffsets[k])}}setIndicator(k){F.Aq$.isDefined(this.indicator)||(this.indicator=j.q.instance.prodigy.create.sprite(0,-70,G._.General_icons_json,k),this.indicator.anchor.set(.5,1),this.indicatorE.add(this.indicator),this.game.add.tween(this.indicator,this).to({y:this.indicator.y-50},1e3,F.GS3.Quadratic.InOut,!0,0,$.s.MAX_SAFE_INTEGER,!0)),this.indicator.frameName=k}clicked(k,B,U){B.findPath(k.x,k.y,this.x-20,this.y+20,!0).then((B=>{B&&k.setPath(B,(()=>{null==U||U()}))})).catch(F.RQr.createHandler("Unable to find path to gnome")),this.sendNpcClickedEvent()}repositionName(){this.nameText.GameObject.legacyTransform.x=Math.round((this.sprites.scale.x<0?-1:1)*this.nameOffsetX)}}V.frameOffsets={npc_0:0,npc_1:0,npc_2:2,npc_3:1,npc_4:0,npc_5:0,npc_6:2,npc_7:1,npc_8:0,npc_9:0,npc_10:1,npc_11:2,npc_12:4,npc_13:5,npc_14:4,npc_15:3}},18916:(k,B,U)=>{"use strict";U.d(B,{U:()=>H});var F=U(62459),G=U(35120),j=U(59968),$=U(88022);class H extends j.R{constructor(k,B,U,F,j,H,V){super(k,B,V,null,U,F),this.body=this.add(G.q.instance.prodigy.create.sprite(-35,0,$._.Npc_sprite_cebollini_json,"mini",void 0,this.onTextureLoaded.bind(this))),this.body.anchor.set(0,1),this.sprites.addChild(this.body),this.nameText.GameObject.legacyTransform.y+=40,this.showName()}onTextureLoaded(k){k&&(k.animations.add("stand",["mini","mini1","mini2","mini3","mini2","mini1"],10,!0,!1),k.animations.play("stand",void 0,!1))}bossStart(k){this.rightArm=this.add(G.q.instance.prodigy.create.sprite(50,-30,$._.Npc_sprite_cebollini_json,"hand_1")),this.body=this.add(G.q.instance.prodigy.create.sprite(-40,-90,$._.Npc_sprite_cebollini_json,"body")),this.head=this.add(G.q.instance.prodigy.create.sprite(-20,-45,$._.Npc_sprite_cebollini_json,"face_1")),this.hat=this.add(G.q.instance.prodigy.create.sprite(-55,-135,$._.Npc_sprite_cebollini_json,"hat_0")),this.leftArm=this.add(G.q.instance.prodigy.create.sprite(-50,-30,$._.Npc_sprite_cebollini_json,"hand_2")),this.sprites.addChild(this.rightArm),this.sprites.addChild(this.body),this.sprites.addChild(this.head),this.sprites.addChild(this.hat),this.sprites.addChild(this.leftArm),k.add.tween(this.head,this).to({y:"-=1"},200,F.GS3.Linear.None).to({y:"+=2"},500,F.GS3.Linear.None).to({y:this.head.y},400,F.GS3.Linear.None).loop(!0).start(),k.add.tween(this.hat,this).to({y:"-=1"},200,F.GS3.Linear.None).to({y:"+=2"},500,F.GS3.Linear.None).to({y:this.hat.y},400,F.GS3.Linear.None).loop(!0).start(),k.add.tween(this.leftArm,this).to({y:"+=2"},800,F.GS3.Linear.None).delay(600).to({y:this.leftArm.y},800,F.GS3.Linear.None).loop(!0).start(),this.rightArm.frameName="spatula_0",this.rightArm.y=this.rightArm.y-60,this.rightArm.x=this.rightArm.x-15}entreeStart(){this.rightArm.frameName="spatula_1",this.rightArm.x=this.rightArm.x+15,this.hat.frameName="hat_1"}dessertStart(){this.hat.frameName="hat_2",this.hat.x=this.hat.x-20,this.hat.y=this.hat.y-5,this.head.frameName="face_2"}}},86949:(k,B,U)=>{"use strict";U.d(B,{u:()=>F});class F{constructor(){this.gameObject=null}create(){}update(){}destroy(){}hasUniqueInstance(){return!1}}},19273:(k,B,U)=>{"use strict";U.d(B,{_:()=>$});var F=U(62459),G=U(35120),j=U(57308);class $ extends j.Y{constructor(k,B,U,F=0,j=0){let $;for(super(k,B),this.initialized=!1,this.components=[],this.metricsManager=G.q.instance.prodigy.gameContainer.get("2a1-fed9"),this.metricsManager.objectCreated("GameObject"),$=0;${"use strict";U.d(B,{j:()=>q});var F=U(59838),G=U(62459),j=U(35120),$=U(31427);class H extends $.A{constructor(k,B){super(k,B)}create(){super.create(),this.sprite=j.q.instance.prodigy.create.image(0,0,"",""),this.gameObject.add(this.sprite),this.sprite.position.set(0,0),this.updateSource()}postLoad(k,B){B&&(this.updateSpriteSource(),this.onLoaded.dispatch())}setAnchor(k,B){this.sprite.anchor.set(k,B)}setScale(k,B){this.sprite.scale.set(k,B)}getScale(){return this.sprite.scale}getWorld(){return this.sprite.world}getWidth(){return this.sprite.width}getHeight(){return this.sprite.height}setAlpha(k){this.sprite.alpha=k}setPosition(k,B){this.sprite.position.set(k,B)}draggingStopped(){this.resetAfterDrag&&(this.gameObject.x+=this.sprite.x,this.gameObject.y+=this.sprite.y,this.sprite.x=0,this.sprite.y=0)}getEvents(){return this.sprite.events}setInputEnabled(k=!0){G.Aq$.isDefined(this.sprite)?(this.sprite.inputEnabled=!0,k?this.sprite.events.onDragStop.add(this.draggingStopped,this,-99):this.sprite.events.onDragStop.remove(this.draggingStopped,this)):this.onLoaded.addOnce(this.setInputEnabled,this,0,k)}enableDragging(k,B,U,F){this.sprite.inputEnabled&&(this.sprite.input.enableDrag(k,B),void 0!==U&&void 0!==F&&this.sprite.input.enableSnap(U,F))}disableDragging(){this.sprite.inputEnabled&&this.sprite.input.disableDrag()}getBounds(){const k=this.sprite.getBounds(),B=this.getWorld();return new G.M_G(B.x,B.y,k.width,k.height)}resetToOrigin(){this.sprite&&(this.sprite.x=0,this.sprite.y=0)}setAsset(k,B){"singleImage"===B.type&&(this.source=k,this.metadata=B,this.updateSource())}updateSource(){j.q.instance.game.cache.checkImageKey(this.source)?(this.updateSpriteSource(),this.onLoaded.dispatch()):j.q.instance.prodigy.load.assets([this.source],this.postLoad.bind(this))}updateSpriteSource(){var k;null===(k=this.sprite)||void 0===k||k.loadTexture(this.source),G.Aq$.isDefined(this.metadata.frame)&&(this.sprite.frame=this.metadata.frame)}getInputHandler(){return G.Aq$.isDefined(this.sprite)?this.sprite.input:null}setAngle(k){this.sprite.angle=k}hasAnimations(){return G.Aq$.isDefined(this.sprite.animations.frameData)}getAnimationLength(k){return this.sprite.animations.frameData?this.sprite.animations.frameData.total:0}playAnimation(k,B,U){this.sprite.animations.frame=U,this.sprite.animations.play(k,void 0,B)}destroy(){this.sprite&&(this.sprite.destroy(),this.sprite=null),super.destroy()}}var V=U(34829);class W extends H{constructor(k,B){super(k,B)}setAsset(k,B){if("spritesheet"===B.type){this.source=k,this.metadata=B,this.sprite.animations.stop();for(let k=0;k{"use strict";U.d(B,{A:()=>$});var F=U(62459),G=U(68910),j=U(86949);class $ extends j.u{constructor(k,B){super(),this.resetAfterDrag=!1,this.source=k,this.metadata=B,this.onLoaded=new F.HN0}create(){super.create()}setAnchor(k,B){}setScale(k,B){}getScale(){return new G.Point(1,1)}setAlpha(k){}setPosition(k,B){}getWorld(){return new G.Point}getWidth(){return 0}getHeight(){return 0}getEvents(){return null}setInputEnabled(k=!0){}enableDragging(k,B,U,F){}disableDragging(){}draggingStopped(){}getBounds(){return new F.M_G(0,0,0,0)}resetToOrigin(){}hasAnimations(){return!1}getAnimationLength(k){return 0}playAnimation(k,B,U){}setAsset(k,B){}getInputHandler(){return null}setAngle(k){}hasUniqueInstance(){return!0}destroy(){super.destroy()}}},59838:(k,B,U)=>{"use strict";U.d(B,{F:()=>q});var F=U(62459),G=U(95891),j=U(68910),$=U(35120),H=U(34829),V=U(88022),W=U(31427);class q extends W.A{constructor(k,B){super(k,B),this.spine=null,this.spineInputSlot=null,this.inputSprite=null,this.inputGroup=null,this._defaultScale=new j.Point(1,1),this._destroyed=!1;const U=this.metadata;this.anchor=new j.Point(0,0),this._game=$.q.instance.game,F.Aq$.isDefined(U.anchor)?this.spineAnchor=new j.Point(F.Aq$.isDefined(U.anchor.x)?U.anchor.x:.5,F.Aq$.isDefined(U.anchor.y)?U.anchor.y:0):this.spineAnchor=new j.Point(.5,0),this.spineInputSlot=null,this.inputSprite=null,this.dragOffset=new j.Point(0,0)}create(){super.create(),this.updateSource()}postLoad(k,B){B&&(this.updateSpineSource(),this.onLoaded.dispatch())}updateSource(){if(F.Aq$.isDefined(this.source)){const k=this._game.cache.checkJSONKey(this.source),B=this._game.cache.checkImageKey(`${this.source}.png`),U=this._game.cache.checkTextKey(`${this.source}Atlas`),F=this._game.cache.checkSpineKey(this.source);k&&B&&U||F?(this.updateSpineSource(),this.onLoaded.dispatch()):$.q.instance.prodigy.load.assets([this.source],this.postLoad.bind(this))}}updateSpineSource(){if(!this.spine&&this.gameObject&&this._game){this.spine=this._game.add.spine(0,0,this.source,this.gameObject),this.spine.setToSetupPose();const k=this.spine.skeleton.findSlot("input_hitbox");if(k){const B=this.spine.getSlotContainer(k);if(B){this.spineInputSlot=k,B.getChildAt(0).alpha=0;const U=k.getAttachment();this.dragOffset.set(.5*B.width-U.x-(k.bone?k.bone.x+k.bone.skeleton.getRootBone().x:0),.5*B.height+U.y+(k.bone?k.bone.y+k.bone.skeleton.getRootBone().y:0)),this.inputGroup=$.q.instance.prodigy.create.group(this.gameObject),this.inputGroup.position.set(this.spine.x-this.dragOffset.x,this.spine.y-this.dragOffset.y),this.inputSprite=this.inputGroup.addChild($.q.instance.prodigy.create.image(0,0,V._.General_core_json,"overlay-small")),this.inputSprite.alpha=0,this.inputSprite.width=B.width,this.inputSprite.height=B.height}}this.resetToOrigin()}}setAsset(k,B){var U;"spine"===B.type&&(this.source=k,this.metadata=B,null===(U=this.spine)||void 0===U||U.destroy(),this.spine=null,this.updateSource())}setAnchor(k,B){if(this.spine){const U=this.getAnchorOffset(),F=this.getSpineAnchorOffset();this.anchor.x=k,this.anchor.y=B,this.setPosition(this.spine.x+U.x-F.x,this.spine.y+U.y-F.y)}else this._destroyed||this.onLoaded.addOnce((()=>this.setAnchor(k,B)))}setScale(k,B){if(this.spine){const U=this.getAnchorOffset(),F=this.getSpineAnchorOffset();this.spine.scale.x=k,this.spine.scale.y=B,this.setPosition(this.spine.x+U.x-F.x,this.spine.y+U.y-F.y)}else this._destroyed||this.onLoaded.addOnce(this.setScale,this,0,k,B)}getScale(){return this.spine?this.spine.scale:this._defaultScale}setAlpha(k){if(this.spine){const B=this.spine.skeleton;for(let U=0;U{"use strict";var F;U.d(B,{T:()=>F}),function(k){k[k.Top=1]="Top",k[k.Middle=2]="Middle",k[k.Bottom=4]="Bottom",k[k.Left=8]="Left",k[k.Center=16]="Center",k[k.Right=32]="Right",k[k.TopLeft=9]="TopLeft",k[k.TopCenter=17]="TopCenter",k[k.TopRight=33]="TopRight",k[k.MiddleLeft=10]="MiddleLeft",k[k.MiddleCenter=18]="MiddleCenter",k[k.MiddleRight=34]="MiddleRight",k[k.BottomLeft=12]="BottomLeft",k[k.BottomCenter=20]="BottomCenter",k[k.BottomRight=36]="BottomRight"}(F||(F={}))},9976:(k,B,U)=>{"use strict";U.d(B,{E:()=>$});var F,G=U(62459),j=U(47332);!function(k){k[k.Normal=0]="Normal",k[k.Bold=1]="Bold",k[k.Italic=2]="Italic",k[k.BoldAndItalic=3]="BoldAndItalic"}(F||(F={}));class $ extends G.uAl{constructor(){super(...arguments),this.textSource=null,this.alignment=j.T.TopLeft,this.textObject=null}get TextObject(){return this.textObject}set Source(k){null!==this.textSource&&this.textSource.OnTextChanged.removeAll(this),this.textSource=k,this.textSource.OnTextChanged.add(this.updateText,this),this.updateText()}get Source(){return this.textSource}set Font(k){G.dBt[k]?this.textObject.font=G.dBt[k]:this.textObject.font=G.dBt.LuckiestGuy,this.updateAlignment()}get Font(){return this.textObject.font}set FontStyle(k){this.textObject.fontStyle=(k&F.Italic)===F.Italic?G.EQV.Italic:G.EQV.Normal,this.textObject.fontWeight=(k&F.Bold)===F.Bold?G.vLr.Bold:G.vLr.Normal,this.updateAlignment()}get FontStyle(){let k=F.Normal;return"italic"===this.textObject.fontStyle&&(k|=F.Italic),"bold"===this.textObject.fontWeight&&(k|=F.Bold),k}set FontSize(k){this.textObject.fontSize=k,this.updateAlignment()}get FontSize(){return this.textObject.fontSize}set LineSpacing(k){this.textObject.lineSpacing=k,this.updateAlignment()}get LineSpacing(){return this.textObject.lineSpacing}set Alignment(k){this.alignment=k,this.updateAlignment()}get Alignment(){return this.alignment}set FillColor(k){this.isValidColor(k)?this.textObject.fill=k:G.VyI.log(`Fill color was provided was not a valid color ${k}.`,G.$bb.Warning)}get FillColor(){return this.textObject.fill}set BlendMode(k){this.textObject.TextObject.blendMode=k}get BlendMode(){return this.textObject.TextObject.blendMode}set StrokeColor(k){this.isValidColor(k)?this.textObject.stroke=k:G.VyI.log(`Stroke color was provided was not a valid color ${k}.`,G.$bb.Warning)}get StrokeColor(){return this.textObject.stroke}set StrokeThickness(k){this.textObject.strokeThickness=k,this.updateAlignment()}get StrokeThickness(){return this.textObject.strokeThickness}set ShadowAlpha(k){this.textObject.dropShadowAlpha=k,this.updateAlignment()}get ShadowAlpha(){return this.textObject.dropShadowAlpha}set ShadowAngle(k){this.textObject.dropShadowAngle=k,this.updateAlignment()}get ShadowAngle(){return this.textObject.dropShadowAngle}set ShadowColor(k){this.isValidColor(k)?this.textObject.dropShadowColor=k:G.VyI.log(`Shadow color was provided was not a valid color ${k}.`,G.$bb.Warning)}get ShadowColor(){return this.textObject.dropShadowColor}set ShadowBlur(k){this.textObject.dropShadowBlur=k}get ShadowBlur(){return this.textObject.dropShadowBlur}set ShadowDistance(k){this.textObject.dropShadowDistance=k,this.updateAlignment()}get ShadowDistance(){return this.textObject.dropShadowDistance}set TextConfig(k){G.Aq$.isDefined(k.font)&&(this.Font=k.font),G.Aq$.isDefined(k.fontSize)&&(this.FontSize=k.fontSize),G.Aq$.isDefined(k.fontWeight)&&("bold"===k.fontWeight?this.FontStyle=F.Bold:this.FontStyle=F.Normal),G.Aq$.isDefined(k.fill)&&(this.FillColor=k.fill),G.Aq$.isDefined(k.blendMode)&&(this.BlendMode=k.blendMode),G.Aq$.isDefined(k.stroke)&&(this.StrokeColor=k.stroke),G.Aq$.isDefined(k.strokeThickness)&&(this.StrokeThickness=k.strokeThickness),G.Aq$.isDefined(k.shadowAlpha)&&(this.ShadowAlpha=k.shadowAlpha),G.Aq$.isDefined(k.shadowAngle)&&(this.ShadowAngle=k.shadowAngle),G.Aq$.isDefined(k.shadowDistance)&&(this.ShadowDistance=k.shadowDistance),G.Aq$.isDefined(k.shadowColor)&&(this.ShadowColor=k.shadowColor),G.Aq$.isDefined(k.shadowBlur)&&(this.ShadowBlur=k.shadowBlur)}get TextWidth(){return this.textObject.TextObject.width}get TextHeight(){return this.textObject.TextObject.height}create(){super.create(),this.textObject=new G.EYj,this.textObject.GameObject=this.GameObject,this.textObject.create();const k=this.textObject.TextObject;k.visible=this.Active,this.GameObject.legacyTransform.group.addChild(k),this.OnActiveChanged.add((()=>k.visible=this.Active))}destroy(){this.textSource&&this.textSource.OnTextChanged.removeAll(this),this.textSource=null,this.textObject.destroy(),this.textObject=null,this.OnActiveChanged.dispose(),super.destroy()}setText(k){this.Source instanceof G.uFU&&this.Source.getText()===k||(this.Source=new G.uFU(k))}updateText(){null===this.textObject?G.VyI.log("Trying to update the text on a Text component before the text object was created.",G.$bb.Warning):(this.textObject.text=this.Source.getText(),this.updateAlignment())}updateAlignment(){const k=this.Alignment,B=this.textObject.TextObject;(k&j.T.Center)===j.T.Center?(B.x=-Math.round(.5*B.width),this.textObject.align=G.If$.Center):(k&j.T.Right)===j.T.Right?(B.x=-B.width,this.textObject.align=G.If$.Right):(B.position.x=0,this.textObject.align=G.If$.Left),(k&j.T.Middle)===j.T.Middle?B.position.y=-Math.round(.5*B.height):(k&j.T.Bottom)===j.T.Bottom?B.position.y=-B.height:B.position.y=0}isValidColor(k){return!!/^#[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8}$/.test(k)}}},75017:(k,B,U)=>{"use strict";U.d(B,{p:()=>F});class F{}F.BUY_ITEM_FLAVOUR_TEXT="PLAY_AT_HOME_BUY_ITEM",F.DEFAULT={frameName:"icons/iconbox-TEST",trackingEvent:"Feature-MemberChests"},F.MEMBER_HUD={frameName:"icons/iconbox-TEST",trackingEvent:"Feature-MemberChests",flavourText:"PLAY_AT_HOME_MEMBER_HUD"},F.NOT_MEMBER_HUD={frameName:"icons/iconbox-TEST",trackingEvent:"Feature-MemberChests",flavourText:"PLAY_AT_HOME_NOT_MEMBER_HUD"},F.TWILIGHT_WHEEL={frameName:"icons/iconbox-TEST",trackingEvent:"Feature-MemberChests",flavourText:"PLAY_AT_HOME_TWILIGHT_WHEEL"},F.MEMBER_BOUNTY={frameName:"icons/iconbox-TEST",trackingEvent:"Feature-MemberChests",flavourText:"PLAY_AT_HOME_MEMBER_BOUNTY"},F.MEMBER_CHESTS={frameName:"icons/member-chests",trackingEvent:"Feature-MemberChests",flavourText:"PLAY_AT_HOME_MEMBER_CHESTS"},F.BUDDIES={frameName:"icons/cute-and-cool-buddies",trackingEvent:"Feature-Buddies",flavourText:F.BUY_ITEM_FLAVOUR_TEXT},F.HOUSE_ITEMS={frameName:"icons/special-house-furniture",trackingEvent:"Feature-HouseItems",flavourText:F.BUY_ITEM_FLAVOUR_TEXT},F.NEW_HOUSE={frameName:"icons/new-house",trackingEvent:"Feature-NewHouse",flavourText:F.BUY_ITEM_FLAVOUR_TEXT},F.MORE_GOLD={frameName:"icons/more-gold",trackingEvent:"Feature-MoreGold",flavourText:"PLAY_AT_HOME_MORE_GOLD"},F.MORE_EXP={frameName:"icons/level-faster",trackingEvent:"Feature-LevelFaster",flavourText:"PLAY_AT_HOME_MORE_EXP"},F.MORE_EXP_CLASS_LEADERS={frameName:"icons/level-faster",trackingEvent:"Feature-LevelFaster",flavourText:"PLAY_AT_HOME_MORE_EXP_CLASS_LEADERS"},F.WHEEL_SPIN={frameName:"icons/more-spins",trackingEvent:"Feature-MoreSpins",flavourText:"PLAY_AT_HOME_WHEEL_SPIN"},F.MEMBER_PETS={frameName:"icons/catch-more-pets",trackingEvent:"Feature-MorePets",flavourText:"PLAY_AT_HOME_MEMBER_PETS"},F.CATCH={frameName:"icons/second-catch",trackingEvent:"Feature-SecondCatchChance"},F.BOOSTS={frameName:"icons/minigame-boosts",trackingEvent:"Feature-MinigameBoosts"},F.STYLE={frameName:"icons/cool-new-styles",trackingEvent:"Feature-NewStyles",flavourText:F.BUY_ITEM_FLAVOUR_TEXT},F.TOWER={frameName:"icons/climb-the-dark-tower",trackingEvent:"Feature-DarkTower",flavourText:"PLAY_AT_HOME_TOWER"},F.POTIONS={frameName:"icons/potions",trackingEvent:"Feature-PowerfulPotions",flavourText:F.BUY_ITEM_FLAVOUR_TEXT},F.DANCE={frameName:"icons/dab-dance",trackingEvent:"Feature-Dab",flavourText:"PLAY_AT_HOME_DANCE"},F.CLOUD_MOUNT={frameName:"icons/cloud-mount",trackingEvent:"Feature-CloudMount"},F.MORPH_MARBLE={frameName:"icons/morph-marble",trackingEvent:"Feature-MorphMarble",flavourText:F.BUY_ITEM_FLAVOUR_TEXT},F.BUY_ITEM={frameName:"icons/iconbox-TEST",trackingEvent:"PremiumItems",flavourText:F.BUY_ITEM_FLAVOUR_TEXT},F.PREMIUM_ITEM={frameName:"icons/iconbox-TEST",trackingEvent:"PremiumItems",flavourText:"PLAY_AT_HOME_PREMIUM_ITEM"},F.VISIT_HOUSE={frameName:"icons/friends-visit-house",trackingEvent:"Feature-VisitHouse"},F.BIGGER_ROSTER={frameName:"icons/iconbox-TEST",trackingEvent:"BiggerRoster"},F.NICKNAME={frameName:"icons/iconbox-TEST",trackingEvent:"Nickname",flavourText:"PLAY_AT_HOME_NICKNAME"},F.EVOLVE_PETS={frameName:"icons/evolve-pets",trackingEvent:"Nickname",flavourText:"PLAY_AT_HOME_EVOLVE_PETS"}},37193:(k,B,U)=>{"use strict";U.d(B,{i:()=>j});var F=U(88022),G=U(66582);class j{}j.PLAYER_MEMBERSHIP_ICON_IMAGES={[G._$.NonMember]:void 0,[G._$.MemberLevelUp]:void 0,[G._$.MemberUltimateMath]:void 0,[G._$.MemberUltimateBundle]:void 0,[G._$.MemberCore]:{atlas:F._.Ui_member_tiers_json,frame:"core-membership-icon-name-small"},[G._$.MemberPlus]:{atlas:F._.Ui_member_tiers_json,frame:"plus-membership-icon-name-small"},[G._$.MemberUltra]:{atlas:F._.Ui_member_tiers_json,frame:"ultra-membership-icon-name-small"}}},77981:(k,B,U)=>{"use strict";var F;U.d(B,{r:()=>F}),function(k){k.Math="MATH",k.English="ENGLISH",k.UltimateBundle="MATH_ENGLISH_BUNDLE"}(F||(F={}))},89305:(k,B,U)=>{"use strict";U.d(B,{Sz:()=>W,g1:()=>V,jK:()=>z,nO:()=>K,nQ:()=>q,ty:()=>Y});var F=U(8674),G=U(62459),j=U(66582),$=U(35120),H=U(66207);function V(k){return H.D.isFeatureEnabled()&&k>0?`MEMBERSHIP_TIER_${k}_SHORT_NAME_STRATIFICATION`:`MEMBERSHIP_TIER_${k}_SHORT_NAME`}function W(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){if(k.player.hasMembershipUpgradeOptions()){B.purchase.sendFunnelHandoff("Membership-Upgrade-IFrame",{purchaseOrder:q(U)});const F=$.q.instance.prodigy.gameContainer.get("be9-3278"),G=yield k.getActiveMembershipId(),j=H.D.isFeatureEnabled()?`?group=science_variant_${H.D.getVariantForUpgrading()}`:"",V=$.q.instance.prodigy.gameContainer.get("b94-d1b1");yield V.createIFrame(F.getMembershipUpgradeUrl(G).concat(j),"upgrade-iframe-closed")}else Y()}))}function q(k){if(H.D.isFeatureEnabled())switch(k){case"tier_1":return j.rH[j._$.MemberCore];case"tier_2":return j.rH[j._$.MemberPlus];case"tier_3":return j.rH[j._$.MemberUltra];default:return""}else switch(k){case"tier_1":return j.rH[j._$.MemberLevelUp];case"tier_2":case"tier_3":return j.rH[j._$.MemberUltimateMath];default:return""}}function K(k){return $.q.instance.prodigy.gameContainer.get("e20-0fb0").activeMemberships.map((k=>{var B;return null!==(B=k.categories)&&void 0!==B?B:[]})).some((B=>B.includes(k)))}function z(k){switch(k){case j._$.MemberCore:case j._$.MemberLevelUp:return"tier_1";case j._$.MemberPlus:case j._$.MemberUltimateMath:return"tier_2";case j._$.MemberUltra:case j._$.MemberUltimateBundle:default:return"tier_3"}}function Y(){const k=$.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("MEMBERSHIP_UPGRADES_UNAVAILABLE");$.q.instance.prodigy.open.messageBoxOkay(k)}},91462:(k,B,U)=>{"use strict";U.d(B,{M:()=>Rt});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(62886),V=U(35120),W=(U(34829),U(1195)),q=U(48235),K=U(44367);class z extends K.z{static applyCheckoutStyling(k){document.getElementsByTagName("body")[0].className=k?z.CHECKOUT_STYLE_CLASS_NAME:null}}z._featureName="game-overlay-checkout",z.CHECKOUT_STYLE_CLASS_NAME="game-overlay-checkout-experiment";var Y=U(73797),Q=U(28152),X=U(15485),Z=U(46784),J=U(65050),tt=U(41674),et=U(67665),it=U(95525);const st=(0,U(77601).gb)({key:"combined-otp",activateAssociatedExperiments:1,default:{enabled:!1},evaluate:({enabled:k},B)=>({enabled:k&&!B.isMember})});var nt,at,rt,ot=U(223);!function(k){k.Selection="selection",k.Combined="combined"}(nt||(nt={})),function(k){k[k.DailySpendCap=0]="DailySpendCap",k[k.MonthlySpendCap=1]="MonthlySpendCap",k[k.Forbidden=2]="Forbidden",k[k.Cooldown=3]="Cooldown"}(at||(at={})),function(k){k.OtpMobilePurchaseSuccessful="otpPurchaseSuccessful",k.OtpMobilePurchaseFailed="otpPurchaseFailed",k.OtpMobileNoPurchaseOptions="otpNoPurchaseOptions",k.OtpMobilePurchasePending="otpPurchasePending"}(rt||(rt={}));const ht=["membership-flow-closed","upgrade-iframe-closed","membership-iframe-closed"];var ct=U(66582),dt=U(13956),lt=U(49126),ut=U(76277),ft=U(5018),bt=U(67510),pt=U(2272),vt=U(75329),gt=U(99183),mt=U(94236),yt=U(53661),_t=U(98252),Et=U(30226),wt=U(88061),Tt=U(10312),St=U(21314),At=U(20352),Ct=U(60654),Ot=U(77981),It=U(89305);class Dt{static open(k,B,U,F,G,j,$,H,V,W,q,K,z,Y){return prodigyWeb.membershipFlow.open(k,B,U,F,G,j,$,H,V,W,q,K,z,Y)}static openUrl(k,B,U,F,G=!1,j=null,$=null){return prodigyWeb.membershipFlow.openUrl(k,B,U,F,G,j,$)}static getMembershipFlowUrl(k,B,U,G,j,$,H,V,W,q){return(0,F.sH)(this,void 0,void 0,(function*(){return prodigyWeb.membershipFlow.getMembershipFlowUrl(k,B,U,G,j,$,H,V,W,q)}))}static getMembershipDirectPurchaseFlowUrl(k,B,U,G,j,$,H,V,W,q,K,z){return(0,F.sH)(this,void 0,void 0,(function*(){return prodigyWeb.membershipFlow.getMembershipDirectPurchaseFlowUrl(k,B,U,G,j,$,H,V,W,q,K,z)}))}static getAuthenticatedUrl(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return prodigyWeb.membershipFlow.getAuthenticatedUrl(k,B)}))}static getCombinedOtpPurchaseFlowUrl(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=encodeURIComponent(JSON.stringify({priceOptions:B}));return prodigyWeb.membershipFlow.getCombinedOtpPurchaseFlowUrl(k,U)}))}}let Rt=class extends G.uAl{constructor(){super(...arguments),this.OTP_SPEND_CAP_CUSTOM_EVENT_NAME="Spend Cap",this.OTP_SPEND_CAP_EVENT_NAME="spend_cap",this.MEMBERSHIP_UPDATE_RETRY_COUNT=4,this.OTP_UNAVAILABLE_PARAMETERS={[at.Forbidden]:{messageTitleKey:"ERROR",messageBodyKey:"NETWORK_FORBIDDEN",interfaceName:"otp_spend_cap_blacklist"},[at.MonthlySpendCap]:{messageTitleKey:"OTP_MONTHLY_CAP_HIT_TITLE",messageBodyKey:"OTP_MONTHLY_CAP_HIT_BODY",interfaceName:"otp_spend_cap_monthly"},[at.DailySpendCap]:{messageTitleKey:"OTP_DAILY_CAP_HIT_TITLE",messageBodyKey:"OTP_DAILY_CAP_HIT_BODY",interfaceName:"otp_spend_cap_daily"},[at.Cooldown]:{messageTitleKey:"MESSAGE_TITLE_OOPS",messageBodyKey:"OTP_COOLDOWN_BODY",interfaceName:"otp_spend_cap_cooldown"}},this.onQrUrlRetrieved=new G.HN0,this.onComplete=new G.HN0,this.onMembershipFlowSuccess=new G.HN0,this.onMembershipStatusUpdateStarted=new G.HN0,this._respectSchoolMode=!0,this._listenOnPurchaseFlowOnly=!1,this._otpFunnelPurchaseOrder="OTP-GenericMC",this._retryTimeoutMs=5e3,this._analyticEvents={},this._upgrade=!1,this._handoffPurchaseOrder="",this._failureProcessing=!1,this._purchaseProcessing=!1}postCreate(){var k,B,U;super.postCreate(),this._memberAd={frameName:this.getInjectedValue(yt.Eh.MembershipPurchaseMemberPanelAdFrameName),trackingEvent:this.getInjectedValue(yt.Eh.MembershipPurchaseMemberPanelAdTrackingEvent),flavourText:this.getInjectedValue(yt.Eh.MembershipPurchaseMemberPanelAdFlavourText)},this._analyticEvents={conversionFunnelName:this.getInjectedValue(yt.Eh.MembershipPurchaseConversionFunnelName),conversionFunnelMetadata:this.getInjectedValue(yt.Eh.MembershipPurchaseConversionFunnelMetadata),conversionStage:this.getInjectedValue(yt.Eh.MembershipPurchaseConversionFunnelStage),conversionStaticOrVideo:this.getInjectedValue(yt.Eh.MembershipPurchaseConversionFunnelStaticOrVideo)},this._upgrade=this.getInjectedValue(yt.Eh.MembershipPurchaseUpgrade),this._listenOnPurchaseFlowOnly||this.setupPurchaseListener(),this.requestMembershipFlowUrl("qrCode").then((k=>this.onQrUrlRetrieved.dispatch(k)),(k=>{this.onQrUrlRetrieved.getBindingsCount()>0&&G.RQr.logError(k,"Failed to retrieve Membership Landing Page URL for QR Code")})),this._generateOtpUrlPromise=this.generateOtpUrl(),this.shouldUseMobileOTP()&&(null===(U=null===(B=null===(k=window.SW)||void 0===k?void 0:k.OTP)||void 0===B?void 0:B.initOneTimePurchases)||void 0===U||U.call(B,this.handleMobileOtpCallback.bind(this)).catch(G.RQr.createHandler("Failed to initialize native app OTP purchases")))}shouldUseMobileOTP(){return(_t.pF.isNativeAndroidApp()||_t.pF.isNativeIOSApp())&&_t.pF.eligibleVersionForMobileOtpPurchase()}setupPurchaseListener(){V.q.instance.game.broadcaster.addAppListener(Y.bS.POST_MESSAGE_RECEIVED,((k,B)=>{try{const k="string"==typeof B?JSON.parse(B):B;if(this._failureProcessing&&("fail"===k.success||!1===k.success))return;ht.includes(k.name)&&!this._purchaseProcessing&&(this._purchaseProcessing=!0,G.Aq$.isDefined(k.transactionId)?this.processOtpMessage(k):this.processMembershipMessage(k))}catch(U){G.RQr.logError(U,"Error receiving purchase post message"),this.completeFlow()}}),this,V.q.instance.game)}completeFlow(){this._purchaseProcessing=!1,this._failureProcessing=!1,this._listenOnPurchaseFlowOnly&&this.clearPostMembershipListener(),this.onComplete.dispatch()}clearPostMembershipListener(){V.q.instance.game.broadcaster.removeAppListener(Y.bS.POST_MESSAGE_RECEIVED,this,V.q.instance.game)}processMembershipMessage(k){"upgrade-iframe-closed"===k.name&&(this._upgrade=!0),this.finishUpgrade(k.success).catch(G.RQr.createHandler("ProcessWebPurchaseComponent: Error finishing upgrade"))}initiateMembershipPurchase(k,B,U){var F,j,$,H,W,q,K;const Y=V.q.instance.prodigy.gameContainer,Q=this._currentPlayer.player,X=null!=B?B:"tier_1";if(this._respectSchoolMode&&Q.isPlayingAtSchool())return V.q.instance.prodigy.open.membershipSchoolAd(),void this.completeFlow();if(_t.pF.isNativeAmazonApp()||(_t.pF.isNativeAndroidApp()||_t.pF.isNativeIOSApp())&&!_t.pF.eligibleVersionForMobileMembershipPurchase())return V.q.instance.prodigy.open.message(this._localizer.getText("MEMBER_AD_VISIT_SITE_BODY")),this.sendFunnelHandoffEvent("Visit-Site-Dialog",X),void this.completeFlow();this._listenOnPurchaseFlowOnly&&this.setupPurchaseListener();try{this._gameNetworkManager.stopInactiveTimer();const B=Y.get("00d-b27e").authHandler.getIdentityToken(),V=null!==(F=Q.username)&&void 0!==F?F:Q.getName(),q=!Q.isPlayingAtSchool();if(z.isFeatureEnabled()&&(z.applyCheckoutStyling(!0),Et.J.applyBlurToScreen(!0)),G.Aq$.isDefined(this._analyticEvents)){let F=0;G.Aq$.isDefined(null===(j=this._memberAd)||void 0===j?void 0:j.adID)&&(F=this._memberAd.adID);const K=(0,ut.G)(it.w).variant;if((null==k?void 0:k.useDirectPurchaseFlow)||z.isFeatureEnabled())Dt.getMembershipDirectPurchaseFlowUrl(null!==($=null==k?void 0:k.billingInterval)&&void 0!==$?$:12,null!==(H=null==k?void 0:k.category)&&void 0!==H?H:Ot.r.Math,null!==(W=null==k?void 0:k.tier)&&void 0!==W?W:2,F,this._analyticEvents.conversionFunnelName,this._segment.purchase.getFunnelID(),q,this._analyticEvents.conversionFunnelMetadata,"ctaButton",this._analyticEvents.conversionStaticOrVideo,B,K.toString()).then((k=>{const B=Dt.openUrl(V,Q.userID,void 0,k,!1,(0,It.nQ)(X),U);this.sendFunnelHandoffEvent(B,X)})).catch(G.RQr.createHandler("Could not get membership URL"));else{const k=Dt.open(V,Q.userID,void 0,F,this._analyticEvents.conversionFunnelName,q,this._analyticEvents.conversionFunnelMetadata,Y.get("f7c-2e57").getSessionToken(),this._analyticEvents.conversionStaticOrVideo,this._upgrade,B,K.toString(),(0,It.nQ)(X),U);this.sendFunnelHandoffEvent(k,X)}}}catch(e){G.VyI.log(e,G.$bb.Error),V.q.instance.prodigy.open.message(this._localizer.getText("MEMBER_AD_ERROR_BODY")),this._segment.purchase.sendFunnelError("Purchase-Handoff","Handoff-Exception",e?null!==(q=e.message)&&void 0!==q?q:null===(K=e.toString)||void 0===K?void 0:K.call(e):e)}}initiateMembershipPurchaseUpgradeWithIFrame(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._webFrameManager.canOpenIframe())return;const B=this._currentPlayer.player;if(this._respectSchoolMode&&B.isPlayingAtSchool())return V.q.instance.prodigy.open.membershipSchoolAd(),void this.completeFlow();const U=this.getMembershipUpgradeInterval(this._currentPlayer),F=V.q.instance.prodigy.gameContainer.get("80c-6fa4").getOverrideForMinVersionForMobileMembershipTierPurchases();if(B.hasMembership())if(_t.pF.eligibleVersionForMobileMembershipPurchaseForMultipleTiers(F))0===this._currentPlayer.getMembershipUpsell().upgradeOptions.length?(0,It.ty)():(this._listenOnPurchaseFlowOnly&&this.setupPurchaseListener(),this.initiateMembershipPurchase(void 0,k,U));else{if(_t.pF.isNativeAmazonApp()||_t.pF.isNativeAndroidApp()||_t.pF.isNativeIOSApp())return V.q.instance.prodigy.open.message(this._localizer.getText("MEMBER_AD_VISIT_SITE_BODY")),this.sendFunnelHandoffEvent("Visit-Site-Dialog",k),void this.completeFlow();this._listenOnPurchaseFlowOnly&&this.setupPurchaseListener(),yield(0,It.Sz)(this._currentPlayer,this._segment,k)}else this._listenOnPurchaseFlowOnly&&this.setupPurchaseListener(),this.initiateMembershipPurchase(void 0,k,U)}))}getMembershipUpgradeInterval(k){var B;return null!==(B=k.getMembershipUpsell().interval)&&void 0!==B?B:null}finishUpgrade(){return(0,F.sH)(this,arguments,void 0,(function*(k=!1){let B;if(this._gameNetworkManager.startInactiveTimer(),z.isFeatureEnabled()&&(z.applyCheckoutStyling(!1),Et.J.applyBlurToScreen(!1)),B="boolean"==typeof k?k?"success":"fail":k,"success"!==B)yield this.processMembershipResult(B);else try{yield this.updateMembershipStatus(this.MEMBERSHIP_UPDATE_RETRY_COUNT),this._currentPlayer.player.hasMembership()?yield this.processMembershipResult(B):yield this.processMembershipResult("pending")}catch(e){G.VyI.log(`Membership purchase pending due to the following: ${e}`,G.$bb.Warning),yield this.processMembershipResult("pending")}}))}processMembershipResult(k){return(0,F.sH)(this,void 0,void 0,(function*(){switch(V.q.instance.prodigy.game.broadcaster.broadcast(Y.H3.MembershipResponseReceived,void 0,[k]),k){case"success":{let k=$().noop;this._currentPlayer.player.unlockMemberItems(),yield this._currentPlayer.fetchMembershipUpsell(),V.q.instance.prodigy.gameContainer.get("8dc-04eb").sendQuestEvent(H.T.NONE,{}).catch(G.RQr.createHandler("Error sending NONE quest event after membership purchase."));const B=V.q.instance.prodigy.open.getTopmostConversionPrefabIndex();k=B>-1?()=>{V.q.instance.prodigy.open.menuCloseAllUntil(B)}:V.q.instance.prodigy.open.menus[1]instanceof mt.K?()=>{V.q.instance.prodigy.open.menuCloseAllUntil(1)}:V.q.instance.prodigy.open.menus[0]instanceof gt.k||V.q.instance.prodigy.open.menus[0]instanceof bt.v||V.q.instance.prodigy.open.menus[0]instanceof Ct.i?()=>{V.q.instance.prodigy.open.menuCloseAllUntil(0)}:()=>{V.q.instance.prodigy.open.menuCloseAll()};{const B=k;k=()=>{B(),this.completeFlow()}}const U=this._currentPlayer.player.hasUnclaimedMembershipRewards();if(U){const B=k;k=()=>{this._currentPlayer.player.rewardMembershipPrizes(B).catch(G.RQr.createHandler("Error rewarding membership prizes."))}}V.q.instance.prodigy.open.membershipSuccess("paid",(()=>{k(),this.onMembershipFlowSuccess.dispatch(),U||V.q.instance.prodigy.game.broadcaster.broadcast(Y.H3.MembershipRewardsFlowComplete)}),{origin_type:tt.$N.MembershipUpgrade,origin_id:this._segment.segmentDataCache[et.r.MembershipBundleModalInstanceId],instance_type:J.N.KidsMlpUpgradeComplete});const F=this._currentPlayer.player.getMemberTier();this._segment.purchase.sendFunnelComplete({purchaseOrder:ct.rH[F],triggerTier:(0,It.jK)(F)})}break;case"pending":V.q.instance.prodigy.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_PENDING_BODY"),this.completeFlow.bind(this)),this._segment.purchase.sendFunnelStep("Purchase-Pending");break;case"deferred":V.q.instance.prodigy.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_DEFERRED_BODY"),this.completeFlow.bind(this)),this._segment.purchase.sendFunnelStep("Purchase-Pending-Parent-Approval");break;case"fail":default:this._failureProcessing=!0,(_t.pF.isNativeAndroidApp()||_t.pF.isNativeIOSApp())&&_t.pF.eligibleVersionForMobileMembershipPurchase()?(this._segment.featureCommon.sendButtonEvent({buttonName:X.k.MembershipUpgradeOkay,interfaceType:tt.Wm.Popup,interfaceName:Z.B.KidsMlpUpgradeFail}),this.completeFlow()):V.q.instance.prodigy.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_FAILED_BODY"),(()=>{this._segment.featureCommon.sendButtonEvent({buttonName:X.k.MembershipUpgradeOkay,interfaceType:tt.Wm.Popup,interfaceName:Z.B.KidsMlpUpgradeFail}),this.completeFlow()})),this._segment.featureCommon.sendInterfaceEvent({interfaceName:Z.B.KidsMlpUpgradeFail,interfaceType:tt.Wm.Popup,originID:this._segment.segmentDataCache[et.r.MembershipBundleModalInstanceId],originType:this._upgrade?tt.$N.MembershipUpgrade:tt.$N.MembershipPurchase,instanceType:J.N.KidsMlpUpgradeFail}),this._segment.purchase.sendFunnelError("Purchase-Handoff","Payment-Failed","Payment-Failed")}}))}updateMembershipStatus(){return(0,F.sH)(this,arguments,void 0,(function*(k=3){this.onMembershipStatusUpdateStarted.dispatch();const B=V.q.instance.prodigy.gameContainer.get("3a0-8003"),U=V.q.instance.prodigy.gameContainer.get("639-22b8");V.q.instance.prodigy.loading(!0,!0);let F=!1;try{const G=yield B.refreshMembership();if(G){if(!G.active&&k>0)return yield this.retryUpdateMembershipStatus(k-1);F=G.active,yield ft.G.loadFeatures(),yield U.updateDecayImmunity(),yield this._currentPlayer.player.updateChargedLevelsData(),yield q.W.checkMemberUpgradeReward()}}catch(j){G.RQr.logError(j,"MembershipParent.updateMembershipStatus - failed on refreshMembership")}return V.q.instance.prodigy.loading(!1),F}))}retryUpdateMembershipStatus(k){return(0,F.sH)(this,void 0,void 0,(function*(){return yield G.Egh.timeout(this._retryTimeoutMs),this.updateMembershipStatus(k)}))}requestMembershipFlowUrl(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B;const U=V.q.instance.prodigy.gameContainer;return Dt.getMembershipFlowUrl(G.Aq$.isDefined(null===(B=this._memberAd)||void 0===B?void 0:B.adID)?this._memberAd.adID:0,this._analyticEvents.conversionFunnelName,!U.get("e20-0fb0").player.isPlayingAtSchool(),this._analyticEvents.conversionFunnelMetadata,this._analyticEvents.conversionStaticOrVideo,this._upgrade,U.get("00d-b27e").authHandler.getIdentityToken(),k,this._segment.purchase.getFunnelID(),(0,ut.G)(it.w).variant.toString())}))}sendFunnelHandoffEvent(k,B){this._handoffPurchaseOrder=(0,It.nQ)(B),this._segment.purchase.sendFunnelHandoff(k,{triggerTier:B,purchaseOrder:this._handoffPurchaseOrder})}generateOtpUrl(){return(0,F.sH)(this,void 0,void 0,(function*(){const{storeName:k}=(0,ut.G)(ot.l);if(G.Aq$.isDefined(k)){if(this._cachedFetchOptionResult=yield this._otpNetworkHandler.fetchOptions(k),(0,ut.G)(st).enabled){const k=V.q.instance.prodigy.gameContainer.get("00d-b27e").authHandler.getIdentityToken();return Dt.getCombinedOtpPurchaseFlowUrl(k,this._cachedFetchOptionResult.options)}return this._urlProvider.getOtpUrl(this._cachedFetchOptionResult.options)}}))}initiateOtp(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!(0,ut.G)(ot.l).enabled||!this._webFrameManager.canOpenIframe())return;const k=V.q.instance.prodigy,B=this._currentPlayer.player;if(B.isPlayingAtSchool())k.open.membershipSchoolAd(),this.completeFlow();else if(_t.pF.isNativeAndroidApp()||_t.pF.isNativeIOSApp())_t.pF.eligibleVersionForMobileOtpPurchase()?0===this._cachedFetchOptionResult.options.length?(this.showOtpUnavailablePopup(this._cachedFetchOptionResult.spendCapHit),this.completeFlow()):yield this.initOtpForNativeApp(this._cachedFetchOptionResult.options):(k.open.message(this._localizer.getText("MEMBER_AD_VISIT_SITE_BODY")),this.completeFlow());else if(_t.pF.isNativeAmazonApp())k.open.message(this._localizer.getText("MEMBER_AD_VISIT_SITE_BODY")),this.completeFlow();else{const U=yield this._generateOtpUrlPromise.then((k=>G.Aq$.isDefined(k)?k:(G.VyI.log("Error generating otp url: Invalid store name",G.$bb.Error),""))),F=(0,ut.G)(st).enabled;F||0!==this._cachedFetchOptionResult.options.length?U&&U.length>0?(this._gameNetworkManager.stopInactiveTimer(),this._listenOnPurchaseFlowOnly&&this.setupPurchaseListener(),F?Dt.openUrl(B.getName(),B.userID,void 0,U,!0):yield this._webFrameManager.createIFrame(U,"membership-iframe-closed"),this._segment.purchase.sendFunnelHandoff(void 0,{purchaseOrder:this._otpFunnelPurchaseOrder})):(k.open.message(this._localizer.getText("FEATURE_DISABLED")),this._segment.purchase.sendFunnelError("Purchase-Handoff","Handoff-Exception","No OTP store available"),this.completeFlow()):(this.showOtpUnavailablePopup(this._cachedFetchOptionResult.spendCapHit),this.completeFlow())}}))}showOtpUnavailablePopup(k){var B,U;const F=V.q.instance.prodigy,G=F.gameContainer.get("c47-20b6"),j=this.OTP_UNAVAILABLE_PARAMETERS[k],$=(0,ut.G)(ot.l);let H=null;k===at.MonthlySpendCap?H=null!==(B=$.spendCap.monthlyLimit)&&void 0!==B?B:null:k===at.DailySpendCap&&(H=null!==(U=$.spendCap.dailyLimit)&&void 0!==U?U:null),G.featureCommon.sendInterfaceEvent({interfaceName:j.interfaceName,interfaceType:tt.Wm.Window}),G.sendCustomEvent(this.OTP_SPEND_CAP_CUSTOM_EVENT_NAME,{event:this.OTP_SPEND_CAP_EVENT_NAME,funnel_id:G.purchase.getFunnelID(),cap_type:j.interfaceName,cap_amount:H,currency_id:27}),F.open.informationDialog(new vt.Z(this._localizer.getText("BUTTON_OKAY_CAPITAL"),void 0,pt.E.Small,void 0,this._localizer.getText(j.messageTitleKey),this._localizer.getText(j.messageBodyKey)))}finishOtp(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(!(0,ut.G)(ot.l).enabled)return;this._gameNetworkManager.startInactiveTimer();const B=V.q.instance.prodigy;switch(k.success){case"success":this._otpService.updatePurchaseHistory(k),this._otpService.queueUncollectedTransactions({transactionID:k.transactionId,quantity:k.quantity,analyticsTransactionID:this._segment.purchase.getFunnelID()});try{yield this._otpService.acknowledgeUncollectedTransactions(),this.completeFlow(),V.q.instance.game.broadcaster.broadcast(Y.Lk.HardCurrencyPurchased)}catch(U){throw this._segment.purchase.sendFunnelError("Purchase-Handoff","Handoff-Exception",U),U}break;case"pending":B.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_PENDING_BODY"),this.completeFlow.bind(this)),this._segment.purchase.sendFunnelStep("Purchase-Pending");break;case"deferred":B.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_DEFERRED_BODY"),this.completeFlow.bind(this)),this._segment.purchase.sendFunnelStep("Purchase-Pending-Parent-Approval");break;case"noPurchaseOptions":case"fail":this._failureProcessing=!0,(_t.pF.isNativeAndroidApp()||_t.pF.isNativeIOSApp())&&_t.pF.eligibleVersionForMobileOtpPurchase()?this.completeFlow():B.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_FAILED_BODY"),this.completeFlow.bind(this)),this._segment.purchase.sendFunnelQuit("Purchase-Handoff","Close-Clicked");break;default:this._failureProcessing=!0,B.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_FAILED_BODY"),this.completeFlow.bind(this)),this._segment.purchase.sendFunnelQuit("Purchase-Handoff","Close-Clicked")}}))}processOtpMessage(k){this.finishOtp(k).catch(G.RQr.createHandler("Failed to finish OTP"))}handleMobileOtpCallback(k){var B,U,F;const{message:j,data:$}=k;try{let k={name:"",success:"fail",transactionId:"",quantity:0};switch(j){case rt.OtpMobilePurchaseSuccessful:k={name:j,success:"success",transactionId:String(null===(B=null==$?void 0:$.transaction)||void 0===B?void 0:B.transactionIdentifier)||"",quantity:null!==(F=null===(U=null==$?void 0:$.productData)||void 0===U?void 0:U.quantity)&&void 0!==F?F:0};break;case rt.OtpMobilePurchaseFailed:k={name:j,success:"fail",transactionId:"",quantity:0};break;case rt.OtpMobileNoPurchaseOptions:k={name:j,success:"noPurchaseOptions",transactionId:"",quantity:0};break;case rt.OtpMobilePurchasePending:k={name:j,success:"pending",transactionId:"",quantity:0}}this.finishOtp(k)}catch(H){G.RQr.logError(H,"Failed to finish OTP")}}initOtpForNativeApp(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;if(_t.pF.isNativeApp())if(this._listenOnPurchaseFlowOnly&&this.setupPurchaseListener(),null===(U=null===(B=null===window||void 0===window?void 0:window.SW)||void 0===B?void 0:B.OTP)||void 0===U?void 0:U.startOneTimePurchase){const B=Date.now();!this._lastOtpStartTime||B-this._lastOtpStartTime>5e3?(this._lastOtpStartTime=B,window.SW.OTP.startOneTimePurchase(k).catch(G.RQr.createHandler("startOneTimePurchase Error"))):G.VyI.log("startOneTimePurchase called too quickly, ignoring.",G.$bb.Warning)}else G.VyI.log("startOneTimePurchase is not available - Mobile OTP not initialized",G.$bb.Error)}))}destroy(){V.q.instance.game.broadcaster.removeAppListener(Y.bS.POST_MESSAGE_RECEIVED,this,V.q.instance.game),this.onQrUrlRetrieved.dispose(),this.onComplete.dispose(),this.onMembershipFlowSuccess.dispose(),this.onMembershipStatusUpdateStarted.dispose(),super.destroy()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Rt.prototype,"onQrUrlRetrieved",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Rt.prototype,"onComplete",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Rt.prototype,"onMembershipFlowSuccess",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Rt.prototype,"onMembershipStatusUpdateStarted",void 0),(0,F.Cg)([(0,G.Cdj)("c47-20b6"),(0,F.Sn)("design:type",Function)],Rt.prototype,"_segment",void 0),(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",W.E)],Rt.prototype,"_currentPlayer",void 0),(0,F.Cg)([(0,dt.b)("b94-d1b1"),(0,F.Sn)("design:type",At.j)],Rt.prototype,"_webFrameManager",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Rt.prototype,"_respectSchoolMode",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Rt.prototype,"_listenOnPurchaseFlowOnly",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],Rt.prototype,"_otpFunnelPurchaseOrder",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Rt.prototype,"_retryTimeoutMs",void 0),(0,F.Cg)([(0,dt.b)("e03-b0a9"),(0,F.Sn)("design:type",lt.x)],Rt.prototype,"_otpService",void 0),(0,F.Cg)([(0,dt.b)("295-41dc"),(0,F.Sn)("design:type",wt.o)],Rt.prototype,"_otpNetworkHandler",void 0),(0,F.Cg)([(0,dt.b)("c97-bd0d"),(0,F.Sn)("design:type",Tt.I)],Rt.prototype,"_gameNetworkManager",void 0),(0,F.Cg)([(0,dt.b)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],Rt.prototype,"_localizer",void 0),(0,F.Cg)([(0,dt.b)("be9-3278"),(0,F.Sn)("design:type",St.p)],Rt.prototype,"_urlProvider",void 0),Rt=(0,F.Cg)([(0,G.EVk)("ProcessWebPurchase",Q.Y.membership)],Rt)},91160:(k,B,U)=>{"use strict";var F;U.d(B,{u:()=>F}),function(k){k.Boot="boot",k.BootFeatureFlags="boot.feature_flags",k.BootGameData="boot.game_data",k.BootFeatureRevision="boot.feature_revisions",k.BootAssets="boot.assets",k.BootLocalization="boot.localization",k.BootRebuildGUID="boot.rebuild_guids",k.BootStartNextState="boot.start_next_state",k.Splash="splash",k.SplashCreate="splash.create",k.SplashLoadQI="splash.load_QI",k.SplashLoadQIEducationStatus="splash.load_QI.education_status",k.SplashLoadQILoadQuestion="splash.load_QI.load_question",k.SplashLoadQILoadQuestionInterface="splash.load_QI.load_question_interface",k.SplashLoadGame="splash.load_game",k.SplashTitans="splash.titans",k.SplashLogin="splash.login",k.SplashIapInit="splash.iap_init",k.SplashUpdateFeatureAccess="splash.update_feature_access",k.SplashCharacter="splash.character",k.SplashFetchEndGameQuestData="splash.fetch_end_game_quest_data",k.SplashInitFeatureProvider="splash.init_feature_provider",k.SplashEducation="splash.education",k.SplashParentalConsentService="splash.parental_consent_service",k.SplashSegment="splash.segment",k.SplashSetupFeatureProvider="splash.setup_feature_provider",k.SplashWorldList="splash.world_list",k.SplashRegistrationMenu="splash.registration_menu",k.SplashPlayerEducationInit="splash.player_education_init",k.SplashPrefabRequest="splash.prefab_request",k.ServerMenuSelection="server_menu",k.ServerMenuSuggestedServers="server_menu.suggested_servers",k.ServerMenuShowAllServers="server_menu.all_servers",k.ServerMenuConnect="server_menu.connect",k.PrefabLoaderScene="prefab_loader_scene",k.PrefabLoaderSceneAssetPreload="prefab_loader_scene.asset_preload",k.PrefabLoaderScenePrefabLoading="prefab_loader_scene.prefab_loading",k.PrefabLoaderSceneConsentBanner="prefab_loader_scene.consent_banner",k.SingleAssetLoading="load_single_asset",k.World="world",k.WorldRemotePlayerSpawnLimiterInit="world.remotePlayerSpawnLimiter",k.WorldSynapseMultiplayerServiceConnection="world.synapse_multiplayer_service_connection",k.WorldNetworkHandlerEnterWorld="world.network_handler_enter_world",k.WorldInitProgressDataManager="world.init_progress_datamanager",k.WorldSynchedRiftDataInit="world.synched_rift_data_init",k.WorldFeaturedSpawnDataInit="world.featured_spawn_data_init",k.WorldDynamicStoreQuestManagerSetup="world.dynamic_store_quest_manager_setup",k.WorldInventoryInit="world.inventory_init",k.WorldHudDataInit="world.hud_data_init",k.WorldSegmentAnalyticsSetup="world.segment_analytics_setup",k.WorldElementalBoostCache="world.elemental_boost_cache",k.WorldPippetEncounterInit="world.pippet_encounter_init",k.WorldGetTowerData="world.get_tower_data",k.WorldInitTowerData="world.init_tower_data",k.WorldJoinActiveQuiz="world.join_active_quiz",k.WorldPlayerGoalsInit="world.player_goals_init",k.WorldEnterMap="world.enter_map",k.WorldSegmentedOffersDataInit="world.segmented_offers_data_init",k.WorldWizardCostumeDataInit="world.wizard_costume_data_init",k.LoadingState="loadingstate",k.LoadingStateAssetsLoad="loadingstate.assets_load",k.LoadingStateAdditionalLoadPromise="loadingstate.additional_load_promise",k.QuestManagerHubSetup="quest_manager_hub_setup"}(F||(F={}))},28152:(k,B,U)=>{"use strict";var F;U.d(B,{Y:()=>F}),function(k){k.root="",k.analytics="Analytics",k.animation="Animation",k.audio="Audio",k.battle="Battle",k.battleRevamp="Battle Revamp",k.creature="Creature",k.creatureAnimation="Creature/Animation",k.data="Data",k.dataProvider="Data/Provider",k.debug="Debug",k.economy="Economy",k.effect="Effect",k.player="Creature/Player",k.playerAnimation="Creature/Player/Animation",k.follow="Creature/Follow",k.followAnimationState="Creature/Follow/Animation State",k.education="Education",k.injection="Injection",k.input="Input",k.inputShapes="Input/Shapes",k.item="Item",k.map="Map",k.tiled="Map/Tiled",k.mapSpawning="Map/Spawning",k.MapTeleport="Map/Teleport",k.membership="Membership",k.motion="Motion",k.multiplayer="Multiplayer",k.object="Object",k.saving="Saving",k.stateChallenges="StateChallenges",k.store="Store",k.transition="Transition",k.cooldown="Cooldown",k.trigger="Trigger",k.ui="UI",k.uiAchievement="UI/Achievement",k.uiCharCreate="UI/CharCreate",k.uiDialog="UI/Dialog",k.uiInput="UI/Input",k.uiLayout="UI/Layout",k.uiPagination="UI/Pagination",k.uiPet="UI/Pet",k.uiPetGear="UI/PetGear",k.uiPetMerge="UI/PetMerge",k.uiAd="UI/Ad",k.uiVideo="UI/Video",k.uiDynamicPrompts="UI/Dynamic Prompts",k.uiUnifiedStore="UI/Unified Store",k.uiPetsInZones="UI/Pets In Zones",k.uiPopup="UI/Popup",k.utility="Utility",k.uiPetMenu="UI/Pet Menu",k.universalTeamSelection="UI/Universal Team Selection",k.uiHudManager="UI/Hud Manager",k.web="Web",k.reporting="Reporting",k.ultimates="Ultimates",k.ultimatesUi="Ultimates/UI",k.quest="Quest",k.zones="Zones",k.zoneForest="Zones/Forest",k.zoneShipwreckShore="Zones/Shipwreck Shore",k.adventure="Feature/Adventure",k.adventureFsm="Feature/Adventure/FSM",k.adventureUi="Feature/Adventure/UI",k.academy="Feature/Academy",k.festival="Feature/Festival",k.leaderboard="Feature/Leaderboard",k.postBattleFlow="Feature/Post Battle Flow",k.towerTown="Feature/Tower Town",k.titan="Feature/Titan",k.ftue="Feature/FTUE",k.petRescue="Feature/Pet Rescue",k.battlePass="Feature/Battle Pass",k.worldMapDuelsStadium="Feature/World Map/Duels Stadium",k.chargedLevels="Feature/Charged Levels",k.lootDash="Feature/Loot Dash",k.playerGoals="Feature/Player Goals",k.rifts="Feature/Rifts",k.afterSchoolWidget="Feature/After School Widget",k.wizardCostumes="Feature/Wizard Costumes"}(F||(F={}))},17331:(k,B,U)=>{"use strict";U.d(B,{H:()=>V,_:()=>F});var F,G=U(62459),j=U(35120),$=U(77078),H=U(28402);!function(k){k[k.Up=0]="Up",k[k.Down=1]="Down"}(F||(F={}));class V extends G.uAl{init(k,B,U){this.screen=k,this.enterCallback=U,B===F.Up?(this.openAnimation="open going up",this.closeAnimation="close going up"):(this.openAnimation="open going down",this.closeAnimation="close going down")}create(){super.create();const k=this.gameObject.findComponentInChildren(H.v);this.spine=k.getSpine(),this.input=this.gameObject.findComponentInChildren($.p),this.input.InputEnabled=!0,this.input.onClicked.add((()=>{this.walkTo()}))}walkTo(){this.screen.user.setValidPath(this.screen.path,this.gameObject.transform.localPosition.x+12,this.gameObject.transform.localPosition.y+160,(k=>({}))),this.spine.setAnimationByName(0,this.openAnimation),this.spine.onComplete.addOnce((()=>{this.enter()})),j.q.instance.prodigy.audio.playSFX(17,"elevator")}enter(){this.screen.user.setValidPath(this.screen.path,this.gameObject.transform.localPosition.x+12,this.gameObject.transform.localPosition.y+90,(k=>(G.Aq$.isDefined(k)&&(this.screen.content.removeChild(this.screen.user),this.screen.below.add(this.screen.user),this.spine.setAnimationByName(0,this.closeAnimation),j.q.instance.prodigy.audio.playSFX(17,"elevator-doors"),this.spine.onComplete.addOnce((()=>{this.enterCallback()}))),{})))}exit(){this.spine.setAnimationByName(0,this.openAnimation),j.q.instance.prodigy.audio.playSFX(17,"elevator-doors"),this.spine.onComplete.addOnce((()=>{this.screen.below.remove(this.screen.user),this.screen.content.addChild(this.screen.user),this.screen.user.setValidPath(this.screen.path,this.gameObject.transform.localPosition.x+12,this.gameObject.transform.localPosition.y+160,(k=>({}))),this.spine.setAnimationByName(0,this.closeAnimation),j.q.instance.prodigy.audio.playSFX(17,"elevator-doors")}))}}},96282:(k,B,U)=>{"use strict";U.d(B,{G:()=>K});var F=U(62459),G=U(35120),j=U(91207),$=U(77938),H=U(86949),V=U(31427),W=U(70123),q=U(59838);class K extends H.u{constructor(k,B,U,G){super(),this.onItemDrag=new F.HN0,this.onItemDropped=new F.HN0,this.onItemMoved=new F.HN0,this.onItemInputDown=new F.HN0,this.canRevert=null,this.orientation=0,this.assetData=null,this.assetMetadata=null,this.editable=!1,this.itemID=U,this.orientation=G,this.parentHouse=B}create(){super.create(),this.updateItemData()}setItemID(k){this.itemID!==k&&(this.itemID=k,this.updateItemData())}updateItemData(){this.assetData=$.t.getItem("dorm",this.itemID).data,this.assetMetadata=$.t.getItem("dorm",this.itemID).metadata,this.updateSprite()}getAssetName(){return F.Aq$.isDefined(this.assetData)?`${this.getOrientation()}-dorm-${this.itemID}`:""}isAnimated(){if(F.Aq$.isDefined(this.assetMetadata)){const k=this.getOrientation();return F.Aq$.isDefined(this.assetMetadata.assets[k])&&F.Aq$.isDefined(this.assetMetadata.assets[k].animations)&&F.Aq$.isDefined(this.assetMetadata.assets[k].animations.idle)}return!1}canRotate(){return F.Aq$.isDefined(this.assetData)&&this.assetData.r>0}getScaleX(){return F.Aq$.isDefined(this.assetData)&&this.assetData.r>0&&this.orientation>1?-1:1}updateSprite(k=!1){let B=this.gameObject.findComponent(V.A);F.Aq$.isDefined(B)?B.setAsset(j.E.getDormItem(this.getStrictOrientation(),this.itemID),this.assetMetadata.assets[this.getOrientation()]):(B=this.initRenderInterface(),k&&(this.setEditable(!1),this.setEditable(!0))),B.setScale(this.getScaleX(),1),B.hasAnimations()&&B.playAnimation("idle",!0,Math.random()*B.getAnimationLength("idle"))}initRenderInterface(){const k=W.j.createRenderer(j.E.getDormItem(this.getStrictOrientation(),this.itemID),this.assetMetadata.assets[this.getOrientation()]);return this.gameObject.addComponent(k),k.setAnchor(.5,0),k.resetAfterDrag=!0,k}rotateItem(){if(this.editable&&this.canRotate()){const k=this.assetMetadata.assets[this.getOrientation()].type;this.orientation+=2===this.assetData.r?2:1,this.orientation>3&&(this.orientation=0);const B=this.assetMetadata.assets[this.getOrientation()].type,U=this.getRenderer();F.Aq$.isDefined(k)&&F.Aq$.isDefined(B)&&k!==B?(this.setEditable(!1),this.gameObject.removeComponent(U),U.destroy()):U.onLoaded.addOnce((()=>{this.setEditable(!1),this.setEditable(!0)})),this.updateSprite(!0)}}setEditable(k=!0){this.editable!==k&&(this.editable=k,this.editable?this.registerInputHandlers():this.unregisterInputHandlers())}registerInputHandlers(){const k=this.getRenderer();k.setInputEnabled(),k.enableDragging(!0,!0,20,20);const B=k.getEvents();F.Aq$.isDefined(B)&&(B.onDragStart.add(this.dragStarted,this),B.onDragUpdate.add(this.dragUpdated,this),B.onDragStop.add(this.dragStopped,this),B.onInputDown.add(this.itemFocused,this))}unregisterInputHandlers(){const k=this.getRenderer();k.setInputEnabled(!1),k.disableDragging();const B=k.getEvents();F.Aq$.isDefined(B)&&(B.onDragStart.remove(this.dragStarted,this),B.onDragUpdate.remove(this.dragUpdated,this),B.onDragStop.remove(this.dragStopped,this),B.onInputDown.remove(this.itemFocused,this))}getRenderer(){return this.gameObject.findComponent(V.A)}dragStarted(){G.q.instance.game.stage.addChild(this.gameObject),this.onItemDrag.dispatch()}dragUpdated(){if(F.Aq$.isDefined(this.parentHouse)){const k=this.getRenderer();k instanceof q.F||k.setAlpha(this.parentHouse.canPlaceItem(this)?1:.5)}}dragStopped(){if(F.Aq$.isDefined(this.parentHouse)?this.parentHouse.content.addChild(this.gameObject):G.q.instance.game.add.existing(this.gameObject),!F.Aq$.isDefined(this.parentHouse)||this.parentHouse.canPlaceItem(this)){const k=this.getRenderer(),B=k.getWorld();if(this.onItemDropped.dispatch(this,B.x,B.y),k instanceof q.F){const U=k.getSpineObjectOffset();B.x+=U.x,B.y+=U.y}const U=F.cj9.snapToCeil(B.x,K.HOUSE_ITEM_GRID_SNAP_INTERVAL),G=F.cj9.snapToFloor(B.y,K.HOUSE_ITEM_GRID_SNAP_INTERVAL);this.onItemMoved.dispatch(this,this.gameObject.x,this.gameObject.y,U,G),this.canRevert=!0,this.gameObject.x=U,this.gameObject.y=G,k.resetToOrigin()}else{if(!this.canRevert)return void this.gameObject.destroy();{const k=this.getRenderer(),B=k.getWorld();this.onItemDropped.dispatch(this,B.x,B.y),k.resetToOrigin()}}}itemFocused(){this.onItemInputDown.dispatch()}resetItem(){this.getRenderer().setAlpha(1)}getOrientation(){return"horizontal"===this.getStrictOrientation()?"horizontal":"vertical"}getStrictOrientation(){return this.assetData.r>0&&1==(1&this.orientation)?"horizontal":"vertical"}destroy(){this.onItemDrag.dispose(),this.onItemDropped.dispose(),this.onItemMoved.dispose(),this.onItemInputDown.dispose(),super.destroy()}}K.HOUSE_ITEM_GRID_SNAP_INTERVAL=20},16495:(k,B,U)=>{"use strict";U.d(B,{QW:()=>j,ib:()=>H,sR:()=>G,ye:()=>$});var F=U(8674);const G=(k,B,U)=>{if(Array.isArray(k))for(let F=0;F{if(Array.isArray(k))for(let B=0;B(0,F.sH)(void 0,void 0,void 0,(function*(){if(Array.isArray(k)){const U=[];for(let G=0;G(0,F.sH)(void 0,void 0,void 0,(function*(){return new Promise((F=>{k[U].OnAnimationComplete.addOnce(F),k[U].playAnimation(B,!1)}))})))(G));return Promise.all(U).then((()=>Promise.resolve()))}return new Promise((U=>{k.OnAnimationComplete.addOnce(U),k.playAnimation(B,!1)}))})),H=(k,B,U)=>(0,F.sH)(void 0,void 0,void 0,(function*(){for(let U=0;U{"use strict";U.d(B,{R:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.uAl{create(){super.create();j.q.instance.prodigy.gameContainer.get("c97-bd0d").startInactiveTimer()}destroy(){j.q.instance.prodigy.gameContainer.get("c97-bd0d").stopInactiveTimer(),super.destroy()}};H=(0,F.Cg)([(0,G.EVk)("InactivityDialog",$.Y.uiDialog)],H)},27812:(k,B,U)=>{"use strict";U.d(B,{I:()=>q});var F=U(8674),G=U(62459),j=U(35120),$=U(53885),H=U(73402),V=U(30226),W=U(28152);let q=class extends G.uAl{constructor(){super(...arguments),this.moveSpeed=220,this.moveTarget=null,this.roundTarget=!1,this.isMoving=!1,this._deltaPos=new G.I9Y,this.initToCurrentPosition=!1,this.onMoveStart=new G.HN0,this.onMoveEnd=new G.HN0,this.lastFrameTime=null,this.localTargetPos=null,this._normalizedMoveVector=new G.I9Y}get MoveSpeed(){return this.moveSpeed}set MoveSpeed(k){this.moveSpeed=k}get MoveTarget(){return this.moveTarget}set MoveTarget(k){this.roundTarget?this.moveTarget=new G.I9Y(Math.round(this.moveTarget.x),Math.round(this.moveTarget.y)):this.moveTarget=new G.I9Y(k.x,k.y)}get RoundTarget(){return this.roundTarget}set RoundTarget(k){this.roundTarget=k}get IsMoving(){return this.isMoving}get deltaPos(){return this._deltaPos}create(){if(super.create(),this.initToCurrentPosition){const{x:k,y:B}=this.GameObject.transform.worldPosition;this.moveTarget=new G.I9Y(k,B)}this.lastFrameTime=j.q.instance.game.time.timeMS}update(){if(super.update(),this.updateLocalTargetPos(),this.isMoving||this.hasReachedTarget()||(this.isMoving=!0,this.onMoveStart.dispatch()),this.isMoving){let k=null;if(this.GameObject.transform)if(this.GameObject.transform instanceof H.N){k=this.GameObject.findComponent($.u).getRootContainer().transform.position}else k=this.GameObject.transform.localPosition;else{const B=this.GameObject.legacyTransform.group.position;k=new G.I9Y(B.x,B.y)}const B=this.localTargetPos.x{"use strict";U.d(B,{$:()=>j});var F=U(8674),G=U(62459);class j extends G.JTX{create(){super.create(),this.socketService.onMessage.add(this.receivedMessage,this),this.socketService.onPlayerJoined.add(this.playerJoined,this),this.socketService.onPlayerDisconnect.add(this.playerLeft,this)}destroy(){this.socketService.onMessage.remove(this.receivedMessage,this),this.socketService.onPlayerJoined.remove(this.playerJoined,this),this.socketService.onPlayerDisconnect.remove(this.playerLeft,this),super.destroy()}playerJoined(k){}playerLeft(k){}}(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],j.prototype,"socketService",void 0)},25809:(k,B,U)=>{"use strict";U.d(B,{g:()=>Q});var F=U(8674),G=U(62459),j=U(30226),$=U(72162),H=U(99625),V=U(53661);class W extends $.O6{constructor(k,B,U,F){var G,j,$;super(H.l.SpellLearnedPopupMessage,B,U,F);const W=k.spellIcon[0];let q;k.spellIcon[1]&&(q=k.spellIcon[1]),this._injectablePropertiesDictionary={[V.FO.PopupMessageAtlasGuid]:W,[V.FO.PopupMessageText]:k.spellName,[V.FO.PopupMessageTextFill]:null!==(G=k.fill)&&void 0!==G?G:"#ffffff",[V.FO.PopupMessageTextStroke]:null!==(j=k.stroke)&&void 0!==j?j:"#000000",[V.FO.PopupMessageTextStrokeThickness]:null!==($=k.strokeThickness)&&void 0!==$?$:0},q&&(this._injectablePropertiesDictionary=Object.assign({[V.FO.PopupMessageAtlasFrameName]:q},this._injectablePropertiesDictionary))}}class q extends $.O6{constructor(k,B,U,F){var G,j,$;super(H.l.StatPopupMessage,B,U,F),this._injectablePropertiesDictionary={[V.FO.PopupMessageAtlasFrameName]:k.atlasFrameName,[V.FO.PopupMessageAtlasGuid]:k.atlasGuid,[V.FO.PopupMessageText]:`+${k.statIncreaseAmount}`,[V.FO.PopupMessageTextFill]:null!==(G=k.fill)&&void 0!==G?G:"#ffffff",[V.FO.PopupMessageTextStroke]:null!==(j=k.stroke)&&void 0!==j?j:"#000000",[V.FO.PopupMessageTextStrokeThickness]:null!==($=k.strokeThickness)&&void 0!==$?$:5}}}class K extends $.O6{constructor(k,B,U,F){var G,j;super(H.l.TextPopupMessage,B,U,F),this._injectablePropertiesDictionary={[V.FO.PopupMessageText]:k.text,[V.FO.PopupMessageTextFill]:k.fill,[V.FO.PopupMessageTextStroke]:null!==(G=k.stroke)&&void 0!==G?G:"#000000",[V.FO.PopupMessageTextStrokeThickness]:null!==(j=k.strokeThickness)&&void 0!==j?j:0}}}class z{static popupMessage(k,B){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U=0,F=0){let j;switch(k.type){case $.m0.Text:j=new K(k,B,U,F);break;case $.m0.Stat:j=new q(k,B,U,F);break;case $.m0.SpellLearned:j=new W(k,B,U,F);break;default:return G.VyI.log("The popup message being created does not have a valid type.",G.$bb.Error),null}return yield j.init(),j}))}}var Y=U(28152);let Q=class extends G.uAl{constructor(){super(...arguments),this.delayBetweenPopups=0,this.onPopupMessageAnimationSequenceStarted=new G.HN0,this.onPopupMessageAnimationSequenceComplete=new G.HN0,this.onPopupMessageEntranceComplete=new G.HN0,this._popups=[],this._signalBindingsToCleanUp=new Set}playPopupMessageAnimations(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(0!==k.length){0===this._popups.length&&this.onPopupMessageAnimationSequenceStarted.dispatch();for(const B of k){const k=yield z.popupMessage(B,this.GameObject);if(!k)continue;const U=k.onPopupStarted.addOnce((()=>{var k;this._signalBindingsToCleanUp.delete(U),null===(k=B.showSignal)||void 0===k||k.dispatch()}));this._signalBindingsToCleanUp.add(U);const F=k.onEntranceComplete.addOnce((()=>{this._signalBindingsToCleanUp.delete(F),this.onPopupMessageEntranceComplete.dispatch(k,B.type),this._enteringNowPopup=null,this.showNextPopup()}));this._signalBindingsToCleanUp.add(F);const G=k.onPopupComplete.addOnce((()=>{var U;this._signalBindingsToCleanUp.delete(G),k.cleanup(),j.J.removeFromArray(k,this._popups),null===(U=B.hideSignal)||void 0===U||U.dispatch(),0===this._popups.length&&this.onPopupMessageAnimationSequenceComplete.dispatch()}));this._signalBindingsToCleanUp.add(G),this._popups.push(k)}this.showNextPopup()}}))}showNextPopup(){if(this._enteringNowPopup)return;const k=this._popups.find((k=>k.currentState===$.jk.Created));if(!k)return;this._enteringNowPopup=k;const B=this._popups[0]===k?0:this.delayBetweenPopups;if(this.shouldPushPopupsUp)for(const U of this._popups){if(U===k)break;U.tweenYPos(U.getYPos()-k.popupHeight,null,B)}k.setYPos(0),k.tweenYPos(k.getYPos()-k.popupHeight,null,B),k.playAnimation(B)}destroy(){this._signalBindingsToCleanUp.forEach((k=>k.destroy())),this.onPopupMessageAnimationSequenceComplete.dispose(),this.onPopupMessageAnimationSequenceStarted.dispose(),this.onPopupMessageEntranceComplete.dispose(),this._popups.forEach((k=>k.cleanup())),super.destroy()}};(0,F.Cg)([(0,G.vkK)(),(0,G.Lr6)(0),(0,G.YLv)("If true, popups will push previous popups up. If false, popups will overlap."),(0,F.Sn)("design:type",Boolean)],Q.prototype,"shouldPushPopupsUp",void 0),(0,F.Cg)([(0,G.g11)(),(0,G.Lr6)(0),(0,G.YLv)("Number of ms to wait before starting the next popup in the queue"),(0,F.Sn)("design:type",Number)],Q.prototype,"delayBetweenPopups",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Q.prototype,"onPopupMessageAnimationSequenceStarted",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Q.prototype,"onPopupMessageAnimationSequenceComplete",void 0),Q=(0,F.Cg)([(0,G.EVk)("PopupMessageManager",Y.Y.ui)],Q)},76642:(k,B,U)=>{"use strict";U.d(B,{S:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this.runOnCreate=!1,this.runOnEnable=!1,this.onDispatch=new G.HN0}get dispatchCount(){return this.onDispatch.dispatchCount}create(){super.create(),this.runOnCreate&&this.run()}onEnable(){super.onEnable(),this.runOnEnable&&this.run()}destroy(){this.onDispatch.dispose(),super.destroy()}run(k){this.onDispatch.dispatch(k)}addListener(k){this.onDispatch.add(k)}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"runOnCreate",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"runOnEnable",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onDispatch",void 0),$=(0,F.Cg)([(0,G.EVk)("Signal",j.Y.utility)],$)},56520:(k,B,U)=>{"use strict";U.d(B,{L:()=>K});var F,G=U(8674),j=U(62459),$=U(95891),H=U.n($),V=U(68910),W=U(35120),q=U(28152);let K=F=class extends j.uAl{constructor(){super(...arguments),this._frames=[],this._graphicTintColor="#ffffff",this._shuffleFrames=!0,this._frameSeparation=100,this.onSpinComplete=new j.HN0,this.onTargetChosen=new j.HN0,this._itemObjects=[]}get isSpinning(){return this._shouldSpin}create(){var k,B;super.create(),this._itemMaxY=.5*((null!==(B=null===(k=this._rectTransform)||void 0===k?void 0:k.fullHeight)&&void 0!==B?B:this._frameSeparation)+this._frameSeparation),this._shuffleFrames&&(this._frames=H().shuffle(this._frames)),H().times(this._frames.length,(()=>this.addItemGraphic()))}destroy(){var k;this.onSpinComplete.dispose(),this.onTargetChosen.dispose(),null===(k=this._spinPromise)||void 0===k||k.cancel(),this._spinTween&&W.q.instance.game.tweens.remove(this._spinTween),super.destroy()}addItemGraphic(){const k=new j._mx(this.gameObject),B=k.addComponent(j.XVE);B.setAnchorMin(.5,.5),B.setAnchorMax(.5,.5),B.setPivot(.5,.5),B.setPositionY(((this._frames.length>>1)-this._itemObjects.length)*this._frameSeparation);const U=k.addComponent(j.vYh);this._graphicTintColor&&(U.tint=j.TZp.hexToDecimal(this._graphicTintColor)),U.updateAsset(this._atlas,this._frames[this._itemObjects.length]);const F=U.getDimensions();B.setSizeDelta(F.width,F.height),this._itemObjects.push([U,B])}startSpin(){this._shouldSpin=!0,this._spinPromise=new j.kBN(((k,B)=>{(()=>(0,G.sH)(this,void 0,void 0,(function*(){if(yield this.tweenItems(this._frameSeparation,F.SPIN_LEAD_IN_TIME_MS,j.GS3.Back.In),this._spinPromise.cancelled)return;let B;if(yield new Promise((k=>{B=()=>{this._spinPromise.cancelled||!this._shouldSpin?k():this.offsetItems(V.Ticker.shared.deltaMS/F.SPIN_CYCLE_TIME_MS*this._frameSeparation)},V.Ticker.shared.add(B)})),V.Ticker.shared.remove(B),this._spinPromise.cancelled)return;const U=H()(this._itemObjects).filter((k=>k[1].localPosition.y<-this._itemMaxY)).maxBy((k=>k[1].localPosition.y));this.onTargetChosen.dispatch(U),yield this.tweenItems(-U[1].localPosition.y,2*F.SPIN_CYCLE_TIME_MS,j.GS3.Back.Out),this.onSpinComplete.dispatch(),k()})))().catch((k=>{j.RQr.logError(k,"Error in slot spin animation"),B(k)})).finally((()=>{this._spinPromise=null,this._spinTween=null}))}))}stopSpin(){this._shouldSpin=!1}offsetItems(k){for(const B of this._itemObjects){let U=B[1].localPosition.y+k;U>this._itemMaxY&&(U-=this._itemObjects.length*this._frameSeparation),B[1].setPositionY(U)}}tweenItems(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F={lastOffset:0,offset:0};this._spinTween=W.q.instance.game.add.tween(F,this).to({offset:k},B,U,!0),this._spinTween.onUpdate.add((()=>{const k=F.offset-F.lastOffset;F.lastOffset=F.offset,this.offsetItems(k)})),yield this._spinTween.onTweenComplete.asPromise()}))}};K.SPIN_LEAD_IN_TIME_MS=1e3,K.SPIN_CYCLE_TIME_MS=100,(0,G.Cg)([(0,j.Pqz)(j.XVE),(0,G.Sn)("design:type",j.XVE)],K.prototype,"_rectTransform",void 0),(0,G.Cg)([(0,j.Bak)(),(0,j.W_S)(),(0,G.Sn)("design:type",String)],K.prototype,"_atlas",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],K.prototype,"_frames",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],K.prototype,"_graphicTintColor",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],K.prototype,"_shuffleFrames",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],K.prototype,"_frameSeparation",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],K.prototype,"onSpinComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],K.prototype,"onTargetChosen",void 0),K=F=(0,G.Cg)([(0,j.EVk)("SlotMachineAnimation",q.Y.animation)],K)},85697:(k,B,U)=>{"use strict";U.d(B,{o:()=>q});var F=U(8674),G=U(62459),j=U(91207),$=U(77938),H=U(68152),V=U(28152),W=U(34603);let q=class extends G.uAl{constructor(){super(...arguments),this._dormImage=null,this._dormItemID=null,this._orientation=null}get dormItemID(){return this._dormItemID}create(){super.create(),this._dormImage.OnLoaded.add(this.updateOffset,this),null!==this._dormItemID&&this._dormImage&&null!==this._orientation&&this.updateDormImage()}destroy(){this._dormImage.OnLoaded.remove(this.updateOffset,this),this._dormImage=null,super.destroy()}setDormItemID(k,B){this._dormItemID=k,this._orientation=B,this.updateDormImage()}updateDormImage(){(0,H.v)(null!==this._dormItemID&&this._dormItemID>0,"Invalid dorm item ID was loaded");const k=$.t.getItem("dorm",this._dormItemID).metadata.assets[this._orientation];(0,H.v)("singleImage"===k.type,`Invalid singleImage dorm item data for ID: ${this._dormItemID}`),this._dormImage.setAsset(j.E.getDormImage(this._orientation,this._dormItemID)).catch(G.RQr.createHandler("Error setting _dormImage"))}updateOffset(){const k=this._dormImage.getDimensions();this._dormImage.GameObject.transform.setPosition(-k.getHalfWidth(),-k.height)}};(0,F.Cg)([(0,G.MnK)(W._),(0,F.Sn)("design:type",W._)],q.prototype,"_dormImage",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_dormItemID",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],q.prototype,"_orientation",void 0),q=(0,F.Cg)([(0,G.EVk)("SingleImageDormItem",V.Y.object)],q)},53880:(k,B,U)=>{"use strict";var F,G;U.d(B,{J:()=>G,d:()=>F}),function(k){k.StoryTabActive="STORY_TAB_ACTIVE",k.CoopTabActive="COOP_TAB_ACTIVE",k.SeasonTabActive="SEASON_TAB_ACTIVE",k.RiftsTabActive="RIFTS_TAB_ACTIVE",k.MemberTabActive="MEMBER_TAB_ACTIVE",k.BackgroundImageGuid="BACKGROUND_IMAGE_GUID",k.TitleText="TITLE_TEXT",k.BannerFillColor="BANNER_FILL_COLOR"}(F||(F={})),function(k){k.BackgroundImageGuid="BACKGROUND_IMAGE_GUID",k.TitleText="TITLE_TEXT",k.FestivalAtlasGuid="FESTIVAL_ATLAS_GUID",k.LeftColumnText="LEFT_COLUMN_TEXT",k.LeftColumnFrame="LEFT_COLUMN_FRAME",k.RightColumnText="RIGHT_COLUMN_TEXT",k.RightColumnFrame="RIGHT_COLUMN_FRAME",k.MiddleColumnText="MIDDLE_COLUMN_TEXT",k.MiddleColumnFrame="MIDDLE_COLUMN_FRAME"}(G||(G={}))},55741:(k,B,U)=>{"use strict";U.d(B,{l:()=>q});var F=U(8674),G=U(20136),j=U(58268),$=U(62459),H=U(68910),V=U(28152),W=U(28402);let q=class extends $.uAl{constructor(){super(...arguments),this._targetTransform=null,this._boneFollower=null,this._followAxis=3,this._followRotation=!1,this._followScale=3,this._followAlpha=!0,this._followTint=!1,this._localOffset=new $.I9Y(0,0),this._previousLocalOffset=new $.I9Y(0,0),this._bone=null,this._slot=null,this._boneFollowerLocalTransform=new H.Matrix,this._localMatrix=new H.Matrix,this._bonesPreviousPosition=new $.I9Y(0,0),this._transformsNewPosition=new $.I9Y(0,0),this._setupFunctions=new Map([["spineComponent",k=>this.setupSpine(k.spineComponent)],["boneName",k=>this.setupBone(k.boneName)],["slotName",k=>this.setupSlot(k.slotName)],["followAxis",k=>{this._followAxis=k.followAxis}],["followRotation",k=>{this._followRotation=k.followRotation}],["followScale",k=>{this._followScale=k.followScale}],["boneFollower",k=>this.setupFollower(k.boneFollower)],["boneFollowerTransform",k=>{this.targetTransform=k.boneFollowerTransform}]])}set targetTransform(k){const B=k.GameObject.findComponentInChildren($.y4o,!0);B&&(this.setupFollower(B.getRootContainer())||B.onRootContainerSet.addOnce(this.onFollowerRootContainerSet.bind(this,B)),this._targetTransform=k)}set followAxis(k){this._followAxis=k}set followRotation(k){this._followRotation=k}set followScale(k){this._followScale=k}set localOffset(k){this._localOffset.set(k.x,k.y)}create(){super.create()}setup(k=null){var B;if(!$.Aq$.isDefined(null===(B=this._spineComponent)||void 0===B?void 0:B.OnLoaded)||this._spineComponent.isLoaded)if(k)Object.keys(k).forEach((B=>{this._setupFunctions.get(B)(k)}));else{if(!this._spineComponent)return;if(!this._boneFollower&&this._targetTransform){const k=this._targetTransform.GameObject.findComponentInChildren($.y4o,!0);if(!k)return;this.setupFollower(k.getRootContainer())||k.onRootContainerSet.addOnce(this.onFollowerRootContainerSet.bind(this,k))}!this._bone&&$.Aq$.isDefined(this._boneName)&&0!==this._boneName.length&&this.setupBone(this._boneName),!this._slot&&$.Aq$.isDefined(this._slotName)&&0!==this._slotName.length&&this.setupSlot(this._slotName)}else this._spineComponent.OnLoaded.addOnce((()=>{this.setup(k)}))}setupBone(k){return this._bone=this._spineComponent.getBone(k),!!this._bone&&(this._boneName=k,this._bonesPreviousPosition.set(this._bone.worldX,this._bone.worldY),!0)}setupFollower(k){return!!k&&(this._boneFollower=k,this._boneFollowerLocalTransform.copyFrom(this._boneFollower.transform.localTransform),this._localMatrix.copyFrom(this._boneFollowerLocalTransform),!0)}setupSlot(k){return this._slot=this._spineComponent.getSlot(k),!!this._slot&&(this._slotName=k,!0)}destroyOnAnimationComplete(k){this._spineComponent.getSpine().onStart.addOnce((()=>{this._spineComponent.getSpine().onComplete.addOnce((()=>{this._spineComponent.getSpine().setToSetupPose(),this.Active=!1,this.destroy(),null==k||k()}))}))}update(){super.update(),this._bone&&this._boneFollower&&(this._boneFollower.filters=[],this._followAlpha&&this.filterAlpha(this._boneFollower),this._followTint&&this.filterTint(this._boneFollower),this._targetTransform?(4!==this._followAxis&&(this._transformsNewPosition.x=this._targetTransform.localPosition.x+(this._bone.worldX-this._bonesPreviousPosition.x)+(this._localOffset.x-this._previousLocalOffset.x),this._transformsNewPosition.y=this._targetTransform.localPosition.y+(this._bone.worldY-this._bonesPreviousPosition.y)+(this._localOffset.y-this._previousLocalOffset.y),this._targetTransform.setPosition(2!==this._followAxis?this._transformsNewPosition.x:this._targetTransform.localPosition.x,1!==this._followAxis?this._transformsNewPosition.y:this._targetTransform.localPosition.y),this._bonesPreviousPosition.x=this._bone.worldX,this._bonesPreviousPosition.y=this._bone.worldY,this._previousLocalOffset.x=this._localOffset.x,this._previousLocalOffset.y=this._localOffset.y),4!==this._followScale&&this._targetTransform.setScale(2!==this._followScale?this._bone.scaleX:this._targetTransform.localScale.x,1!==this._followScale?this._bone.scaleY:this._targetTransform.localScale.y),this._followRotation&&this._targetTransform.setRotation(this._bone.rotation)):(this._localMatrix.copyFrom(this._boneFollowerLocalTransform),4!==this._followAxis&&(this._localMatrix.translate(2!==this._followAxis?this._bone.worldX+this._localOffset.x:0,1!==this._followAxis?this._bone.worldY+this._localOffset.y:0),this._boneFollower.transform.setFromMatrix(this._localMatrix)),4!==this._followScale&&(this._boneFollower.scale=new H.Point(2!==this._followScale?this._bone.scaleX:this._boneFollower.scale.x,1!==this._followScale?this._bone.scaleY:this._boneFollower.scale.y)),this._followRotation&&(this._boneFollower.rotation=this._bone.rotation),this._boneFollower.updateTransform()))}setupSpine(k){return k?(this._spineComponent=k,!0):($.VyI.log("SpineComponent cannot be null or undefined",$.$bb.Error),!1)}onFollowerRootContainerSet(k){k.onRootContainerSet.remove(this.onFollowerRootContainerSet,this),this.setupFollower(k.getRootContainer())||$.VyI.log("Bone Follower cannot be null or undefined",$.$bb.Error)}filterTint(k){var B;if(!(null===(B=this._slot)||void 0===B?void 0:B.color))return;const U=new j.N;U.matrix[0]=this._slot.color.r,U.matrix[6]=this._slot.color.g,U.matrix[12]=this._slot.color.b,k.filters.push(U)}filterAlpha(k){var B;if(!(null===(B=this._slot)||void 0===B?void 0:B.color))return;const U=new G.Z;U.alpha=this._slot.color.a,k.filters.push(U)}destroy(){this._spineComponent=null,this._bone=null,this._slot=null,this._boneFollower=null,this._boneName=null,this._slotName=null,this._targetTransform=null,super.destroy()}};(0,F.Cg)([(0,$.MnK)($.dLy),(0,F.Sn)("design:type",$.dLy)],q.prototype,"_targetTransform",void 0),(0,F.Cg)([(0,$.MnK)(W.v),(0,F.Sn)("design:type",W.v)],q.prototype,"_spineComponent",void 0),(0,F.Cg)([(0,$.W_S)(),(0,F.Sn)("design:type",String)],q.prototype,"_boneName",void 0),(0,F.Cg)([(0,$.W_S)(),(0,F.Sn)("design:type",String)],q.prototype,"_slotName",void 0),(0,F.Cg)([(0,$.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_followAxis",void 0),(0,F.Cg)([(0,$.vkK)(),(0,F.Sn)("design:type",Boolean)],q.prototype,"_followRotation",void 0),(0,F.Cg)([(0,$.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_followScale",void 0),(0,F.Cg)([(0,$.vkK)(),(0,F.Sn)("design:type",Boolean)],q.prototype,"_followAlpha",void 0),(0,F.Cg)([(0,$.vkK)(),(0,F.Sn)("design:type",Boolean)],q.prototype,"_followTint",void 0),(0,F.Cg)([(0,$.DTs)(),(0,F.Sn)("design:type",$.I9Y),(0,F.Sn)("design:paramtypes",[$.I9Y])],q.prototype,"localOffset",null),(0,F.Cg)([(0,$.DTs)(),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[H.Container]),(0,F.Sn)("design:returntype",Boolean)],q.prototype,"setupFollower",null),(0,F.Cg)([(0,$.DTs)(),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Function]),(0,F.Sn)("design:returntype",void 0)],q.prototype,"destroyOnAnimationComplete",null),(0,F.Cg)([(0,$.DTs)(),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[W.v]),(0,F.Sn)("design:returntype",Boolean)],q.prototype,"setupSpine",null),(0,F.Cg)([(0,$.DTs)(),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[$.y4o]),(0,F.Sn)("design:returntype",void 0)],q.prototype,"onFollowerRootContainerSet",null),q=(0,F.Cg)([(0,$.EVk)("SpineBoneFollower",V.Y.animation)],q)},55800:(k,B,U)=>{"use strict";U.d(B,{a:()=>V});var F=U(8674),G=U(62459),j=U(77938),$=U(68152),H=U(28152);let V=class extends G.uAl{constructor(){super(...arguments),this._followParent=null,this._followID=null,this._onFollowLoaded=new G.HN0,this._followAppearance=null}get followID(){return this._followID}get followParent(){return this._followParent}get onFollowLoaded(){return this._onFollowLoaded}create(){super.create(),null!==this._followID&&this._followParent&&this.updateFollowAppearance()}destroy(){this._onFollowLoaded.dispose(),this._followParent=null,super.destroy()}setFollowID(k){this._followID=k,this.updateFollowAppearance()}updateFollowAppearance(){this._followAppearance&&this._followAppearance.destroy(),(0,$.v)(null!==this._followID&&this._followID>0,"Invalid follow ID was loaded");const k=j.t.getItem("follow",this._followID).metadata.assets.prefab;(0,$.v)("prefab"===(null==k?void 0:k.type),`Invalid follow prefab data for ID: ${this._followID}`),this._followAppearance=this._prefabLoader.load(k.ID,this._followParent),this._onFollowLoaded.dispatch()}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],V.prototype,"_followParent",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_followID",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"_onFollowLoaded",void 0),(0,F.Cg)([(0,G.Cdj)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],V.prototype,"_prefabLoader",void 0),V=(0,F.Cg)([(0,G.EVk)("LegacyFollowAppearance",H.Y.follow)],V)},77078:(k,B,U)=>{"use strict";U.d(B,{p:()=>H});var F=U(8674),G=U(62459),j=U(68910),$=U(36303);let H=class extends $.O{constructor(){super(...arguments),this._width=100,this._height=100}get Width(){return this._width}set Width(k){this._width=k,this.redrawInputRect()}get Height(){return this._height}set Height(k){this._height=k,this.redrawInputRect()}getInputRect(){return new j.Rectangle(-.5*this._width,-.5*this._height,this._width,this._height)}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_width",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_height",void 0),H=(0,F.Cg)([(0,G.EVk)("Input")],H)},36303:(k,B,U)=>{"use strict";U.d(B,{O:()=>z});var F=U(8674),G=U(62459),j=U(68910),$=U(35120),H=U(74560),V=U(77442),W=U(59231);class q extends W.l{constructor(k,B){var U;if(super(k),this._shape=B,B instanceof V.k){const B=k,F=null===(U=B.containsPoint)||void 0===U?void 0:U.bind(k);F&&(B.containsPoint=k=>!this._shape.isPointOverShape(k)&&(!!F&&F(k)))}}getHandlerType(){return this._shape instanceof V.k?W.q.Passthrough:W.q.Shape}checkPointerOver(k){return super.checkPointerOver(k)&&this.isPointOverShape(k.position)}checkPointerDown(k){return super.checkPointerDown(k)&&this.isPointOverShape(k.position)}isPointOverShape(k){return this._shape.isPointOverShape(k)}}var K=U(36045);class z extends G.y4o{constructor(){super(...arguments),this._inputGraphic=null,this.onClicked=new G.HN0,this.onHoverEnter=new G.HN0,this.onHoverExit=new G.HN0,this.onHoverEnterInputUp=new G.HN0,this.onHoverExitInputUp=new G.HN0,this.onInputDown=new G.HN0,this.onInputUp=new G.HN0,this.onInputUpOutside=new G.HN0,this._onInputEnabledChanged=new G.HN0,this._priorityID=0,this._useHandCursor=!1,this._forceAttachToCamera=!1,this._spriteDimensions=new G.or0,this.sendClickLocationWithOnClick=!0,this._cooldownTimeMs=0}set useHandCursor(k){this._useHandCursor=k,this._useHandCursor&&this._inputGraphic.input.pointerOver()&&($.q.instance.game.canvas.style.cursor="pointer")}get useHandCursor(){return this._useHandCursor}get InputEnabled(){return this._inputGraphic.inputEnabled}set InputEnabled(k){this._inputGraphic.inputEnabled=k,this._onInputEnabledChanged.dispatch();const B=$.q.instance.game.input.activePointer;null!==B&&B.targetObject===this._inputGraphic.input&&B.swapTarget(null)}onEnable(){this.InputEnabled=!0,super.onEnable()}onDisable(){this.InputEnabled=!1,super.onDisable()}set blockType(k){this._inputGraphic.input.blockType=k}create(){super.create(),this._inputParent=$.q.instance.game.add.group(),this._inputParent.name=`${this.GameObject.name} - InputBase parent`,this._inputGraphic=$.q.instance.prodigy.create.image(0,0,void 0,0,j.Texture.WHITE),this._inputParent.addChild(this._inputGraphic),this._inputGraphic.name=`${this.GameObject.name} - Input sprite`,this.customShape&&H.m.setInputHandler(this._inputGraphic,new q(this._inputGraphic,this.customShape)),this._inputGraphic.inputEnabled=!0,this._priorityID&&(this._inputGraphic.input.priorityID=this._priorityID);G.wa5.getActiveScene()&&(this.updateAttachToCamera(),this.gameObject.onHierarchyChanged.add(this.updateAttachToCamera,this),this.gameObject.onLayerChanged.add(this.updateAttachToCamera,this)),this.setRootContainer(this._inputParent),this._inputGraphic.events.onInputDown.add(((k,B)=>{const U=k.input.attachToCamera?B.position:B.worldPosition,F=new G.I9Y(U.x,U.y);this.gameObject.activeInHierarchy&&!this.isOnCooldown()&&(this.onClicked.dispatch(...this.sendClickLocationWithOnClick?[F]:[]),this._lastClickTime=Date.now(),this.onInputDown.dispatch())}),this),this._inputGraphic.events.onInputUp.add(((k,B)=>{k.input.checkPointerOver(B)?this.onInputUp.dispatch():this.onInputUpOutside.dispatch()}),this),this._inputGraphic.events.onInputOver.add(((k,B)=>{this._useHandCursor&&($.q.instance.game.canvas.style.cursor="pointer"),this.onHoverEnter.dispatch(),B.isDown||this.onHoverEnterInputUp.dispatch()}),this),this._inputGraphic.events.onInputOut.add(((k,B)=>{this._useHandCursor&&($.q.instance.game.canvas.style.cursor=""),this.onHoverExit.dispatch(),B.isDown||B.justReleased()||this.onHoverExitInputUp.dispatch()}),this),this.redrawInputRect()}destroy(){var k;this.gameObject.onHierarchyChanged.remove(this.updateAttachToCamera,this),this.gameObject.onLayerChanged.remove(this.updateAttachToCamera,this),$.q.instance.game.canvas.style.cursor="",null===(k=this._inputParent)||void 0===k||k.destroy(),this.onClicked.dispose(),this.onHoverEnter.dispose(),this.onHoverExit.dispose(),this.onInputDown.dispose(),this.onInputUp.dispose(),this.onInputUpOutside.dispose(),this.onHoverEnterInputUp.dispose(),this.onHoverExitInputUp.dispose(),this._onInputEnabledChanged.dispose(),super.destroy(),this._inputGraphic=null}getDimensions(){return this._spriteDimensions}redrawInputRect(){var k;if(this._inputGraphic){const B=this.getInputRect();this._inputGraphic.alpha=0;const U=null===(k=this.gameObject)||void 0===k?void 0:k.transform;U?U instanceof G.XVE||(this._inputGraphic.width=B.width,this._inputGraphic.height=B.height,this._inputGraphic.position.set(B.x,B.y)):(this._inputGraphic.width=B.width,this._inputGraphic.height=B.height,this._inputGraphic.x=B.x,this._inputGraphic.y=B.y),this._spriteDimensions.setTo(this._inputGraphic.width,this._inputGraphic.height)}}updateAttachToCamera(){const k=G.wa5.getActiveScene();k&&(this._inputGraphic.input.attachToCamera=this._forceAttachToCamera||k.getLayer(this.gameObject.layer).attachToCamera)}isOnCooldown(){return this._cooldownTimeMs>0&&Date.now(){"use strict";U.d(B,{n:()=>V});var F=U(8674),G=U(62459),j=U(68910),$=U(28152),H=U(36303);let V=class extends H.O{constructor(){super(...arguments),this._width=100,this._height=100,this._offset=new G.I9Y(0,0),this._inputSize=new G.or0(100,100)}get width(){return this._width}get height(){return this._height}onEnable(){}onDisable(){}setSize(k,B,U=!0){this._width=k,this._height=B,this._inputSize.setTo(this._width,this._height),U&&this.redrawInputRect()}setOffset(k,B,U=!0){this._offset.setTo(k,B),U&&this.redrawInputRect()}getInputRect(){return new j.Rectangle(this._offset.x,this._offset.y,this._width,this._height)}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_width",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_height",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],V.prototype,"_offset",void 0),V=(0,F.Cg)([(0,G.EVk)("InputOverlay",$.Y.input)],V)},27952:(k,B,U)=>{"use strict";U.d(B,{t:()=>V});var F=U(8674),G=U(62459),j=U(68910),$=U(28152),H=U(36303);let V=class extends H.O{getInputRect(){let k=0,B=0,U=100,F=100;const{legacyTransform:$,transform:H}=this.gameObject;return $?({width:U,height:F}=$):H instanceof G.XVE?({left:k,top:B,rectTransformDimensions:{width:U,height:F}}=H):G.VyI.log("RectInput missing valid Transform",G.$bb.Error),new j.Rectangle(k,B,U,F)}};V=(0,F.Cg)([(0,G.EVk)("RectInput",$.Y.input)],V)},28047:(k,B,U)=>{"use strict";U.d(B,{v:()=>Q});var F=U(8674),G=U(62459),j=U(94566),$=U(96535),H=U(24595),V=U(43754),W=U(67665),q=U(13956),K=U(21097),z=U(11647),Y=U(10704);class Q extends((0,z.o)(G.uAl)){constructor(){super(...arguments),this.onItemSelected=this.createTidySignal()}}(0,F.Cg)([(0,q.b)("c47-20b6"),(0,F.Sn)("design:type",W.Y)],Q.prototype,"_segment",void 0),(0,F.Cg)([(0,q.b)("306-5359"),(0,F.Sn)("design:type",$.W)],Q.prototype,"_player",void 0),(0,F.Cg)([(0,q.b)("5a6-53a5"),(0,F.Sn)("design:type",Object)],Q.prototype,"_gameNativeAppNotificationProvider",void 0),(0,F.Cg)([(0,q.b)("5c7-e02d"),(0,F.Sn)("design:type",V.W)],Q.prototype,"_hardCurrencyDataProvider",void 0),(0,F.Cg)([(0,G.MnK)(H.V),(0,F.Sn)("design:type",H.V)],Q.prototype,"headerNavigation",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Q.prototype,"onItemSelected",void 0),(0,F.Cg)([(0,G.MnK)(Y.f),(0,F.Sn)("design:type",Y.f)],Q.prototype,"_shelfSpawner",void 0),(0,F.Cg)([(0,G.MnK)(K.NL),(0,F.Sn)("design:type",K.NL)],Q.prototype,"_itemPreview",void 0),(0,F.Cg)([(0,G.MnK)(j.O),(0,F.Sn)("design:type",j.O)],Q.prototype,"_itemCardToggleGroup",void 0)},88060:(k,B,U)=>{"use strict";U.d(B,{m:()=>H});var F=U(8674),G=U(62459),j=U(10044),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._isMoving=!1,this._initialScaleX=1}create(){super.create(),this._initialFaceTarget&&this.setFacingDirection(this._initialFaceTarget.worldPosition.x{"use strict";U.d(B,{U:()=>H});var F=U(8674),G=U(62459),j=U(68152),$=U(28152);let H=class extends G.uAl{closeFail(){this.close(!1)}closeSucceed(){this.close(!0)}close(k){(0,j.v)(!!this.openDialog,"Missing OpenBooleanDialog"),this.prefabRoot.destroy(),(k?this.openDialog.onSuccess:this.openDialog.onFail).dispatch(),this.openDialog=null}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],H.prototype,"prefabRoot",void 0),H=(0,F.Cg)([(0,G.EVk)("CloseBooleanDialogPrefab",$.Y.uiDialog)],H)},32259:(k,B,U)=>{"use strict";U.d(B,{e:()=>V});var F=U(8674),G=U(62459),j=U(68152),$=U(28152),H=U(4035);let V=class extends G.uAl{constructor(){super(...arguments),this.onFail=new G.HN0,this.onSuccess=new G.HN0}destroy(){this.onFail.dispose(),this.onSuccess.dispose(),super.destroy()}configure(k){const B=k.findComponentInChildren(H.U);(0,j.v)(!!B,"Missing CloseBooleanDialog component"),B.openDialog=this}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onFail",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onSuccess",void 0),V=(0,F.Cg)([(0,G.EVk)("ConfigureBooleanDialogPrefab",$.Y.uiDialog)],V)},46361:(k,B,U)=>{"use strict";U.d(B,{S:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(68152),H=U(28152),V=U(4035);let W=class extends G.uAl{constructor(){super(...arguments),this.onFail=new G.HN0,this.onSuccess=new G.HN0}destroy(){this.onFail.dispose(),this.onSuccess.dispose(),super.destroy()}open(){const k=j.q.instance.prodigy.open.prefabMenu(this._prefabID);return k.onPrefabLoaded.addOnce((k=>{const B=k.findComponentInChildren(V.U);(0,$.v)(!!B,"Missing CloseBooleanDialog component"),B.openDialog=this})),k}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_prefabID",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],W.prototype,"onFail",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],W.prototype,"onSuccess",void 0),W=(0,F.Cg)([(0,G.EVk)("OpenBooleanDialogPrefab",H.Y.uiDialog)],W)},6476:(k,B,U)=>{"use strict";U.d(B,{T:()=>V});var F=U(8674),G=U(62459),j=U(92579),$=U(35120),H=U(28152);let V=class extends G.uAl{open(){this.IsActiveInHierarchy&&$.q.instance.prodigy.open.card(this._playerData.player,!0,j.a.available)}};(0,F.Cg)([(0,G.Cdj)("377-3e7b"),(0,F.Sn)("design:type",Object)],V.prototype,"_playerData",void 0),V=(0,F.Cg)([(0,G.EVk)("OpenPlayerCard",H.Y.uiDialog)],V)},34398:(k,B,U)=>{"use strict";U.d(B,{l:()=>$});var F=U(8674),G=U(62459),j=U(35120);class $ extends G.uAl{constructor(){super(...arguments),this.onClose=new G.HN0,this.onOpen=new G.HN0}open(){return(0,F.sH)(this,void 0,void 0,(function*(){this.onOpen.dispatch()}))}onFirstPopup(){}create(){super.create(),this.onOpen.add(this.onOpenCallback,this),this.onClose.add(this.onCloseCallback,this)}onOpenCallback(){const k=j.q.instance.prodigy.world.getCurrentZoneObject();null==k||k.togglePetsInZoneButtonVisibility(!1)}onCloseCallback(){const k=j.q.instance.prodigy.world.getCurrentZoneObject();null==k||k.togglePetsInZoneButtonVisibility(!0)}destroy(){this.onClose.dispose(),this.onOpen.dispose(),super.destroy()}}(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onClose",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onOpen",void 0)},22866:(k,B,U)=>{"use strict";U.d(B,{l:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._onClosed=new G.HN0,this.onOpen=new G.HN0,this._isModal=!0,this._skipTransparency=!1,this._skipStopPlayer=!1,this._createContainer=!0,this._obeyMenuStackVisibility=!1}get prefabMenu(){return this._prefabMenu}destroy(){this.onOpen.dispose(),this._onClosed.dispose(),this._prefabMenu=null,super.destroy()}open(){var k;this._prefabMenu=j.q.instance.prodigy.open.prefabMenu(null!==(k=this._prefabGuid)&&void 0!==k?k:this._prefabID,(()=>{this._onClosed.dispatch()}),!0,this._isModal,this._skipTransparency,this._injectablePropertiesDictionary,void 0,void 0,void 0,void 0,this._obeyMenuStackVisibility),this._prefabMenu.createContainer=this._createContainer,this._prefabMenu.skipStopPlayer=this._skipStopPlayer,this._prefabMenu.onPrefabLoaded.addOnce((k=>{this.onOpen.dispatch(k)}))}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_prefabID",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"_prefabGuid",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"_onClosed",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onOpen",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_isModal",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_skipTransparency",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_skipStopPlayer",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_createContainer",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],H.prototype,"_injectablePropertiesDictionary",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_obeyMenuStackVisibility",void 0),H=(0,F.Cg)([(0,G.EVk)("OpenPrefabMenu",$.Y.uiDialog)],H)},85056:(k,B,U)=>{"use strict";U.d(B,{k:()=>W});var F=U(8674),G=U(62459),j=U(98252),$=U(35120),H=U(28152),V=U(34398);const W="lastReviewPopupVersion";let q=class extends V.l{canOpen(){return(0,F.sH)(this,void 0,void 0,(function*(){if(j.pF.appType()!==j.uC.NATIVE_APP)return!1;const k=j.pF.getNativeAppVersion(),B=window.localStorage.getItem(W);if(!k||k===B)return!1;const U=this._loggedInPlayer.player;return!(!U.justLeveled||!this._featureRequirements.meetsRequirementsDeprecated(14))&&(U.justLeveled=!1,window.localStorage.setItem(W,k),!0)}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,F.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),$.q.instance.prodigy.open.rating((()=>{this.onClose.dispatch()}))}))}};(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",Object)],q.prototype,"_loggedInPlayer",void 0),(0,F.Cg)([(0,G.Cdj)("db5-fb6e"),(0,F.Sn)("design:type",Object)],q.prototype,"_featureRequirements",void 0),q=(0,F.Cg)([(0,G.EVk)("OpenRatingPopup",H.Y.uiPopup)],q)},99617:(k,B,U)=>{"use strict";U.d(B,{I:()=>z});var F=U(8674),G=U(62459),j=U(35120),$=U(41674),H=U(64353),V=U(95057),W=U(47255),q=U(28152),K=U(34398);let z=class extends K.l{constructor(){super(...arguments),this._forwardedInjectionIdentifiers=[],this._funnelName=W.o.FunnelClickHUDButton,this._funnelStage=W.o.StageClickCTA,this._sendFunnelStart=!1,this.onRulesetSuccess=new G.HN0,this.onRulesetFail=new G.HN0}canOpen(){return(0,F.sH)(this,void 0,void 0,(function*(){return G.Aq$.isDefined(H.P.evaluateUnifiedConversionFlowRules(this._funnelName))}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,F.sH)(this,arguments,void 0,(function*(B={}){yield k.open.call(this),(yield this.canOpen())?(this._sendFunnelStart&&j.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({adType:V.R.UnifiedConversionFlow,adVersion:H.P.getAdVersion(this._funnelName),category:"currency",contentId:this._funnelStartTriggerContent,type:"magicoin_currency_button"}),j.q.instance.prodigy.open.unifiedConversionFlow(this.onPromptClosed.bind(this),{conversionFunnelName:this._funnelName,conversionStage:this._funnelStage},{id:this._analyticSource,type:this._analyticSourceType},this.getInjectableValues(B)),this.onRulesetSuccess.dispatch()):this.onRulesetFail.dispatch()}))}onPromptClosed(){var k;null===(k=this.onClose)||void 0===k||k.dispatch()}destroy(){this.onRulesetFail.dispose(),this.onRulesetSuccess.dispose(),super.destroy()}getInjectableValues(k={}){const B=Object.assign({},k);return this._forwardedInjectionIdentifiers.forEach((k=>{B[k]=this.getInjectedValue(k)})),B}};(0,F.Cg)([(0,G.SZi)(),(0,G.W_S)(),(0,F.Sn)("design:type",Array)],z.prototype,"_forwardedInjectionIdentifiers",void 0),(0,F.Cg)([(0,G.gfw)(W.o),(0,F.Sn)("design:type",String)],z.prototype,"_funnelName",void 0),(0,F.Cg)([(0,G.gfw)(W.o),(0,F.Sn)("design:type",String)],z.prototype,"_funnelStage",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],z.prototype,"_analyticSource",void 0),(0,F.Cg)([(0,G.gfw)($.$N),(0,F.Sn)("design:type",String)],z.prototype,"_analyticSourceType",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],z.prototype,"_sendFunnelStart",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],z.prototype,"_funnelStartTriggerContent",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],z.prototype,"onRulesetSuccess",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],z.prototype,"onRulesetFail",void 0),z=(0,F.Cg)([(0,G.EVk)("OpenUnifiedConversionFlow",q.Y.uiPopup)],z)},24981:(k,B,U)=>{"use strict";U.d(B,{S:()=>K});var F,G=U(8674),j=U(62459),$=U(99625),H=U(35120),V=U(41012),W=U(28152),q=U(34398);let K=F=class extends q.l{static get openedThisSession(){return F._openedThisSession}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return V.e.canAutoSurfaceWizardWatch()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),F._openedThisSession=!0,this._loggedInPlayer.player.data.wwCooldownTime=Date.now();H.q.instance.prodigy.open.socialFeed((()=>{H.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID($.l.PushNotificationPermission).catch((k=>{j.VyI.log("Error loading push notification permission prefab",j.$bb.Error)})),this.onClose.dispatch()}),"from-login")}))}};K._openedThisSession=!1,(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],K.prototype,"_loggedInPlayer",void 0),K=F=(0,G.Cg)([(0,j.EVk)("OpenWizardWatchPopup",W.Y.uiPopup)],K)},95383:(k,B,U)=>{"use strict";U.d(B,{Y:()=>q});var F=U(8674),G=U(62459),j=U(35120),$=U(34829),H=U(28152),V=U(73797),W=U(34398);let q=class extends G.uAl{constructor(){super(...arguments),this.onPopupClosed=new G.HN0,this.onNoPopupAvailable=new G.HN0,this._openPopupsOnCreate=!1,this._popups=[],this._currentPopup=null,this._isFirstPopup=!0,this._popupDelayPromises=[],this._popupsProcessed=!1}get popupsProcessed(){return this._popupsProcessed}postCreate(){super.postCreate(),this._openPopupsOnCreate&&Promise.all(this._popupDelayPromises).catch((()=>{G.VyI.log("Popups have been suppressed",G.$bb.Verbose)})).then((()=>(0,F.sH)(this,void 0,void 0,(function*(){var k,B;null===(B=null===(k=this.gameObject)||void 0===k?void 0:k.isDestroyed)||void 0===B||B||(yield this.openNextPopup())})))).catch(G.RQr.createHandler("Error showing popups"))}destroy(){this._popupDelayPromises.length=0;const k=j.q.instance.prodigy.world.getCurrentZoneObject();null==k||k.destroyPetsInZoneButton(),j.q.instance.prodigy.notifications.clearNotifications(),this.onPopupClosed.dispose(),this.onNoPopupAvailable.dispose(),super.destroy()}openNextPopup(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this._isFirstPopup){this._isFirstPopup=!1;for(const B of this._popups)try{B.onFirstPopup()}catch(k){G.RQr.logError(k,"Error in onFirstPopup")}}if(this.Active&&$.A.get("GameConstants.Debug.POPUPS_ENABLED")&&!j.q.instance.prodigy.notifications.isPaused())try{let k;j.q.instance.game.input.enabled=!1;for(const B of this._popups){if(yield B.canOpen()){k=B;break}}k?(this._currentPopup=k,this._currentPopup.onClose.addOnce((()=>{this._currentPopup=null,this.onPopupClosed.dispatch(),j.q.instance.game.broadcaster.broadcast(V.Y1.CheckForHUDAttention),this._popupsProcessed=!0})),yield k.open()):(this.onNoPopupAvailable.dispatch(),j.q.instance.game.broadcaster.broadcast(V.Y1.CheckForHUDAttention),this._popupsProcessed=!0)}finally{j.q.instance.game.input.enabled=!0}}))}isShowingPopup(){return null!==this._currentPopup}delayPopupsUntil(k){this._popupDelayPromises.push(k)}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],q.prototype,"onPopupClosed",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],q.prototype,"onNoPopupAvailable",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],q.prototype,"_openPopupsOnCreate",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(W.l),(0,F.Sn)("design:type",Array)],q.prototype,"_popups",void 0),q=(0,F.Cg)([(0,G.EVk)("PopupPriorityHandler",H.Y.uiPopup)],q)},71134:(k,B,U)=>{"use strict";U.d(B,{l:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(76642);let H=class extends G.uAl{constructor(){super(...arguments),this._onCloseAnimationFinished=new G.HN0,this._onClose=new G.HN0}get onClose(){return this._onClose}close(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;this._closeAnimationSignal.run(),null===(k=this._disableInputSignal)||void 0===k||k.run(),yield this._onCloseAnimationFinished.asPromise(),this._onClose.dispatch()}))}markCloseAnimationAsFinished(){this._onCloseAnimationFinished.dispatch()}destroy(){this._onClose.dispose(),this._onCloseAnimationFinished.dispose(),super.destroy()}};(0,F.Cg)([(0,G.MnK)($.S),(0,F.Sn)("design:type",$.S)],H.prototype,"_closeAnimationSignal",void 0),(0,F.Cg)([(0,G.MnK)($.S),(0,F.Sn)("design:type",$.S)],H.prototype,"_disableInputSignal",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"_onCloseAnimationFinished",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"_onClose",void 0),H=(0,F.Cg)([(0,G.EVk)("PrefabModalComponent",j.Y.uiDialog)],H)},93963:(k,B,U)=>{"use strict";U.d(B,{b:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this._customDataComponents=[]}sendEvent(){}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],$.prototype,"type",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],$.prototype,"name",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",Number)],$.prototype,"id",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],$.prototype,"value",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],$.prototype,"_custom",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(G.uAl),(0,F.Sn)("design:type",Array)],$.prototype,"_customDataComponents",void 0),$=(0,F.Cg)([(0,G.EVk)("SendGameCompleteEvent",j.Y.analytics)],$)},5822:(k,B,U)=>{"use strict";U.d(B,{u:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this._customDataComponents=[]}sendEvent(){}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],$.prototype,"eventType",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],$.prototype,"type",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],$.prototype,"subtype",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],$.prototype,"value",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],$.prototype,"custom",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(G.uAl),(0,F.Sn)("design:type",Array)],$.prototype,"_customDataComponents",void 0),$=(0,F.Cg)([(0,G.EVk)("SendGameDiscoveryEvent",j.Y.analytics)],$)},61840:(k,B,U)=>{"use strict";U.d(B,{C:()=>H});var F=U(8674),G=U(62459),j=U(95946),$=U(28152);let H=class extends G.uAl{get type(){return this._type}};(0,F.Cg)([(0,G.gfw)(j.a),(0,F.Sn)("design:type",String)],H.prototype,"_type",void 0),H=(0,F.Cg)([(0,G.EVk)("ElementType",$.Y.uiPet)],H)},52894:(k,B,U)=>{"use strict";U.d(B,{u:()=>K});var F=U(8674),G=U(62459),j=U(49237),$=U(35120),H=U(63834),V=U(94236),W=U(53661),q=U(28152);let K=class extends G.uAl{constructor(){super(...arguments),this.onMenuClose=new G.HN0}destroy(){this.onMenuClose.dispose(),super.destroy()}openEvolutionMenu(){V.K.openEvolutionPromptIfEligible(new H.r($.q.instance.prodigy.game,this.creatureDataSchema)).then((k=>{k&&(this.evolveButton.inputEnabled=!0,this.onMenuClose.dispatch())})).catch(G.RQr.createHandler("Failed to open evolution prompt"))}};(0,F.Cg)([(0,G.Cdj)(W.hi.YourPetPanelPetData),(0,F.Sn)("design:type",Object)],K.prototype,"creatureDataSchema",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],K.prototype,"evolveButton",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],K.prototype,"onMenuClose",void 0),K=(0,F.Cg)([(0,G.EVk)("OpenEvolutionMenu",q.Y.uiPet,"A component that allows for the evolution menu to be opened for a given pet")],K)},51790:(k,B,U)=>{"use strict";U.d(B,{s:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(61840);let H=class extends G.uAl{constructor(){super(...arguments),this._elementalGraphic=[]}setElementalBanner(k){this._elementalGraphic.forEach((B=>{B.GameObject.active=B.type===k}))}};(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)($.C),(0,F.Sn)("design:type",Array)],H.prototype,"_elementalGraphic",void 0),H=(0,F.Cg)([(0,G.EVk)("PetElementalGraphic",j.Y.uiPet)],H)},79512:(k,B,U)=>{"use strict";U.d(B,{o:()=>Q});var F,G=U(8674),j=U(62459),$=U(56942),H=U(35120),V=U(63834),W=U(97518),q=U(22023),K=U(28152),z=U(29834),Y=U(51790);let Q=F=class extends j.uAl{init(k){var B,U;this.loadPet(k),this.setElementIcon(null===(B=null==k?void 0:k.data)||void 0===B?void 0:B.element),this._petName.text=null===(U=null==k?void 0:k.data)||void 0===U?void 0:U.name;const G=q.P8.GetEvolutionaryLine(k);this._petEvolutionIndex.setLocalizationKey(F.EVOLUTION_INDEX_TEXT),this._petEvolutionIndex.setTextArguments(this.getEvolutionIndex(k.ID,G))}loadPet(k){var B,U;const F=null===(U=null===(B=null==k?void 0:k.metadata)||void 0===B?void 0:B.assets)||void 0===U?void 0:U.default;if(F)if("spritesheet"===F.type){H.q.instance.prodigy.create.monster(this._petSpine.getRootContainer(),new V.r(H.q.instance.game,{ID:k.ID,level:1}),2,0,0).startLoad()}else{const k=(null==F?void 0:F.assetKey)?$.Q[F.assetKey]:`spine-${null==F?void 0:F.ID}`;H.q.instance.prodigy.load.assets([k],this.setAnimation.bind(this,k))}else j.VyI.log(`[PetEvolutionDisplayComponent] Pet ${null==k?void 0:k.ID} does not have a default value or an assetKey configured to it`,j.$bb.Error)}setAnimation(k){this._petSpine.setAsset(k,(()=>{this._petSpineAnimator.playAnimation(F.DEFAULT_ANIMATION,!0)}))}setElementIcon(k){this._petElementIcon.setElementalBanner(k)}getEvolutionIndex(k,B){return B.findIndex((B=>B===k))+1}};Q.DEFAULT_ANIMATION="idle",Q.EVOLUTION_INDEX_TEXT="EVOLUTION_INDEX_TEXT",(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],Q.prototype,"_petSpine",void 0),(0,G.Cg)([(0,j.MnK)(z.j),(0,G.Sn)("design:type",z.j)],Q.prototype,"_petSpineAnimator",void 0),(0,G.Cg)([(0,j.MnK)(Y.s),(0,G.Sn)("design:type",Y.s)],Q.prototype,"_petElementIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Q.prototype,"_petName",void 0),(0,G.Cg)([(0,j.MnK)(W.R),(0,G.Sn)("design:type",W.R)],Q.prototype,"_petEvolutionIndex",void 0),Q=F=(0,G.Cg)([(0,j.EVk)("PetEvolutionDisplay",K.Y.uiPet)],Q)},80711:(k,B,U)=>{"use strict";U.d(B,{l:()=>pt});var F,G,j=U(8674),$=U(62459),H=U(62248),V=U(93893),W=U(90633),q=U(65240),K=U(66582),z=U(76277),Y=U(77938),Q=U(35120),X=U(49237),Z=U(1195),J=U(43754),tt=U(65050),et=U(96810),it=U(41674),st=U(13956),nt=U(95057),at=U(97518),rt=U(53661),ot=U(22023),ht=U(44094),ct=U(30226),dt=U(28152),lt=U(99617),ut=U(51790),ft=U(79512),bt=U(9853);!function(k){k[k.PET_EVOLUTION=0]="PET_EVOLUTION",k[k.GIFT_EVOLUTION=1]="GIFT_EVOLUTION"}(G||(G={}));let pt=F=class extends $.uAl{constructor(){super(...arguments),this._interfaceName="new_evolution_window",this._menuType=G.PET_EVOLUTION,this._isEvolving=!1,this._openingInsufficientResourcesModal=!1}init(k,B){var U,j,V;if(this._currentPetCreatureData=k,this._currentPetItem=Y.t.getItem("pet",k.getID()),this._evolutionPetItem=ot.P8.findNextEvolution(this._currentPetItem),this._evolutionSource=B,!this._currentPetItem||!this._evolutionPetItem)return void $.VyI.log(`[PetEvolutionMenuComponent] Creature id ${k.getID()} is not valid`,$.$bb.Error);null===(U=this._currentPetDisplay)||void 0===U||U.init(this._currentPetItem),null===(j=this._evolutionPetDisplay)||void 0===j||j.init(this._evolutionPetItem),null===(V=this._elementBanner)||void 0===V||V.setElementalBanner(this._currentPetItem.data.element);const q=Q.q.instance.prodigy.gameContainer.get("e20-0fb0").player,z=Q.q.instance.prodigy.gameContainer.get("e20-0fb0").isMember();if(this._menuType!==G.GIFT_EVOLUTION||z)this._evolveText&&(this._evolveText.GameObject.active=!1);else{const k=!Q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(W.B.FEATURE_PET_EVOLUTION,W.B.BREADCRUMB_NONMEMBER_FIRST_PET_EVOLUTION);this._evolveText.setLocalizationKey(k?F.FREE_EVOLUTION_TEXT_KEY:F.FREE_EVOLUTION_UNAVAILABLE_TEXT_KEY),this._evolveText.setTextArguments(this._currentPetItem.data.name)}this._segment.featureCommon.sendInterfaceEvent({interfaceName:this._interfaceName,interfaceType:it.Wm.Window,originType:it.$N.ButtonClick,instanceType:tt.N.UI,eventName:"interface_opened"},{evolution_source:this._evolutionSource}),this._timeOpened=Date.now();const X=this._hardCurrency.petAcquisitionCost(this._currentPetCreatureData.data.ID,H.l6.Evolution),Z=this._hardCurrency.canAfford(X),J=q.getMemberTier();(Z||J===K._$.MemberUltra)&&this.sendHardCurrencyFunnelEvent(et.l.PetHardCurrencyImpression)}startEvolutionFromMembershipPurchase(){return(0,j.sH)(this,void 0,void 0,(function*(){if(this._isEvolving)return;this._isEvolving=!0;const k=ht.$.generateUID(),B=this._currentPetCreatureData.data.uniqueID;(0,z.G)(V.v)&&(this._secureTransaction=this._segment.item.beginSecureItemTransaction(),yield this._evolutionSequence.evolvePet(this._currentPetCreatureData,!0)),yield this.triggerEvolutionFlow(k,B)}))}startEvolution(){return(0,j.sH)(this,void 0,void 0,(function*(){if(this._isEvolving)return;this._isEvolving=!0;const k=ht.$.generateUID(),B=this._currentPetCreatureData.data.uniqueID;try{if((0,z.G)(V.v))this._secureTransaction=this._segment.item.beginSecureItemTransaction(),yield this._evolutionSequence.evolvePet(this._currentPetCreatureData,!1);else{const U=this._hardCurrency.petAcquisitionCost(this._currentPetCreatureData.data.ID,H.l6.Evolution);yield this._hardCurrency.spend(U,{sink_type:q.C.PetEvolution,sink_id:B,transaction_id:k})}}catch(U){return $.RQr.logError(U,"Attempted to evolve pet with no funds"),void this._evolutionSequence.completeSequence(B)}yield this.triggerEvolutionFlow(k,B)}))}triggerEvolutionFlow(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){const U=this._currentPetCreatureData.getLevel(),F=this._currentPetCreatureData.team,G=this._currentPetCreatureData.getName();(0,z.G)(V.v)?(this._secureTransaction.flush({sink_type:q.C.PetEvolution,sink_id:B,transaction_id:k}),this.updatePlayerDataAfterEvolution(U,G,F)):(this._segment.item.sendItemRemovedEvent(this._currentPetItem.ID,this._currentPetItem.name,this._currentPetItem.type,1,{sink_type:q.C.PetEvolution,sink_id:B,transaction_id:k}),this._segment.item.sendItemReceivedEvent(this._evolutionPetItem.ID,this._evolutionPetItem.name,this._evolutionPetItem.type,1,{source_type:q.C.PetEvolution,source_id:B,transaction_id:k}),yield this._evolutionSequence.evolvePet(this._currentPetCreatureData),this.updatePlayerDataAfterEvolution(U,G,F)),this._segment.playerProgression.sendPetEvolvedEvent({petName:this._evolutionPetItem.data.name,petLevel:U,petRank:ot.P8.getPetDisplayMergeRank(this._currentPetCreatureData.data.ID,B),petOldName:G,petType:ot.P8.getPetEvolutionType(this._evolutionPetItem.ID),evolutionSource:this._evolutionSource},{transaction_id:k})}))}updatePlayerDataAfterEvolution(k,B,U){this._loggedInPlayer.player.forceSaveCharacter(),this.sendHardCurrencyFunnelEvent(et.l.PetHardCurrencyTransactionComplete),this._isEvolving=!1,$.Aq$.isDefined(U)&&this._segment.featureCommon.sendTeamUpdatedEvent(this._evolutionPetItem.data.name,B,{pet_added_level:k,pet_added_rank:ot.P8.getPetDisplayMergeRank(this._evolutionPetItem.data.ID,this._currentPetCreatureData.data.uniqueID)})}sendEvolutionIntention(){this.sendHardCurrencyFunnelEvent(et.l.PetHardCurrencyIntention);const k=this._hardCurrency.petAcquisitionCost(this._currentPetCreatureData.data.ID,H.l6.Evolution);this._hardCurrency.canAfford(k)||this._segment.item.sendInsufficientCurrencyEvent(k,{sink_type:q.C.PetEvolution,sink_id:this._currentPetCreatureData.data.ID})}sendPopupClosedEvent(k){this._segment.featureCommon.sendInterfaceEvent({interfaceName:this._interfaceName,interfaceType:it.Wm.Window,originType:it.$N.ButtonClick,instanceType:tt.N.UI,eventName:"interface_closed",closeMethod:k},{durationSeconds:(Date.now()-this._timeOpened)/1e3,evolution_source:this._evolutionSource})}sendPetEvolutionCancelledEvent(){this._segment.playerProgression.sendPetEvolutionCancelledEvent({petName:this._currentPetCreatureData.getName(),petLevel:this._currentPetCreatureData.getLevel(),petElement:this._currentPetCreatureData.getElement(),petRank:ot.P8.getPetDisplayMergeRank(this._currentPetCreatureData.data.ID,this._currentPetCreatureData.data.uniqueID),evolutionSource:this._evolutionSource})}sendPurchaseFunnelStartEvent(){const k=ct.J.showYouTubeMembershipAd(Q.q.instance.prodigy.game,!0)?nt.R.Video:nt.R.Static;this._segment.purchase.sendFunnelStart({type:"Pet-Evolution-Member-Lock",category:"Pet",contentId:`pet-${this._currentPetCreatureData.getID()}`,adType:k})}sendHardCurrencyFunnelEvent(k){this._segment.playerProgression.sendPetHardCurrencyFunnelAdvancedEventIfApplicable(H.l6.Evolution,k,this._currentPetItem.ID)}handleInsufficientCurrency(){if(this._openingInsufficientResourcesModal)return;const k=this._hardCurrency.petAcquisitionCost(this._currentPetCreatureData.data.ID,H.l6.Evolution);if(this._loggedInPlayer.player.isPlayingAtSchool())this.showMessageBox();else if($.Aq$.isDefined(this.openUnifiedConversionFlowComponent)){this.openUnifiedConversionFlowComponent.onRulesetFail.addOnce((()=>{this.showDefaultInsufficientPopup(),this.openUnifiedConversionFlowComponent.onRulesetSuccess.removeAll(this)}),this),this.openUnifiedConversionFlowComponent.onRulesetSuccess.addOnce((()=>{this.openUnifiedConversionFlowComponent.onRulesetFail.removeAll(this)}));const B=this._hardCurrency.getBalance(k.currency);this._openingInsufficientResourcesModal=!0,this.openUnifiedConversionFlowComponent.open({[rt.FK.OtpMissingMagicoin]:k.value-B}).catch($.RQr.createHandler("PetEvolutionMenuComponent: Error opening unified conversion flow")).finally((()=>{this._openingInsufficientResourcesModal=!1}))}else this.showDefaultInsufficientPopup()}showDefaultInsufficientPopup(){this._openingInsufficientResourcesModal=!0,Q.q.instance.prodigy.open.message(this._baseLocalizer.getText("YOU_DONT_HAVE_ENOUGH_MAGICOIN"),(()=>{this._openingInsufficientResourcesModal=!1}))}showMessageBox(){$.Aq$.isDefined(this.messageBox)?this.messageBox.active=!0:this.showDefaultInsufficientPopup()}hideMessageBox(){$.Aq$.isDefined(this.messageBox)&&(this.messageBox.active=!1)}showLegacyInsufficientResourcesModal(){$.Aq$.isDefined(this.insufficientResourcesModal)&&(this.insufficientResourcesModal.active=!0)}};pt.FREE_EVOLUTION_TEXT_KEY="USE_FREE_EVOLUTION_TEXT",pt.FREE_EVOLUTION_UNAVAILABLE_TEXT_KEY="ALREADY_USED_FREE_EVOLUTION_TEXT",(0,j.Cg)([(0,st.b)("c47-20b6"),(0,j.Sn)("design:type",Function)],pt.prototype,"_segment",void 0),(0,j.Cg)([(0,st.b)("e20-0fb0"),(0,j.Sn)("design:type",Z.E)],pt.prototype,"_loggedInPlayer",void 0),(0,j.Cg)([(0,$.gfw)(G),(0,j.Sn)("design:type",Number)],pt.prototype,"_menuType",void 0),(0,j.Cg)([(0,$.MnK)(ft.o),(0,j.Sn)("design:type",ft.o)],pt.prototype,"_currentPetDisplay",void 0),(0,j.Cg)([(0,$.MnK)(ft.o),(0,j.Sn)("design:type",ft.o)],pt.prototype,"_evolutionPetDisplay",void 0),(0,j.Cg)([(0,$.MnK)(ut.s),(0,j.Sn)("design:type",ut.s)],pt.prototype,"_elementBanner",void 0),(0,j.Cg)([(0,$.MnK)(at.R),(0,j.Sn)("design:type",at.R)],pt.prototype,"_evolveText",void 0),(0,j.Cg)([(0,$.MnK)(bt.d),(0,j.Sn)("design:type",bt.d)],pt.prototype,"_evolutionSequence",void 0),(0,j.Cg)([(0,$.MnK)(lt.I),(0,j.Sn)("design:type",lt.I)],pt.prototype,"openUnifiedConversionFlowComponent",void 0),(0,j.Cg)([(0,$.ERr)(),(0,j.Sn)("design:type",$._mx)],pt.prototype,"messageBox",void 0),(0,j.Cg)([(0,$.ERr)(),(0,j.Sn)("design:type",$._mx)],pt.prototype,"insufficientResourcesModal",void 0),(0,j.Cg)([(0,st.b)("5c7-e02d"),(0,j.Sn)("design:type",J.W)],pt.prototype,"_hardCurrency",void 0),(0,j.Cg)([(0,$.Cdj)($.$Bt.LocalizationService),(0,j.Sn)("design:type",$.dTp)],pt.prototype,"_baseLocalizer",void 0),(0,j.Cg)([(0,$.MnK)(X.$),(0,j.Sn)("design:type",X.$)],pt.prototype,"skipButton",void 0),pt=F=(0,j.Cg)([(0,$.EVk)("PetEvolutionMenu",dt.Y.uiPet)],pt)},9853:(k,B,U)=>{"use strict";U.d(B,{d:()=>at});var F,G=U(8674),j=U(62459),$=U(56942),H=U(62886),V=U(60157),W=U(65240),q=U(35120),K=U(77938),z=U(63834),Y=U(73797),Q=U(97518),X=U(22023),Z=U(28152),J=U(55741),tt=U(29834),et=U(76277),it=U(58182),st=U(99625),nt=U(39674);let at=F=class extends j.uAl{constructor(){super(...arguments),this.onSequenceStarted=new j.HN0,this.onSequenceComplete=new j.HN0}evolvePet(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=!1){const U=k.getAllEvolutions()[0],F=(null==U?void 0:U.evolveID)?U.evolveID:U.e,G=K.t.getItem("pet",k.getID()),$=X.P8.findNextEvolution(G);G&&$?(this.loadPet(G,this._petCurrentSpine,this._petCurrentAnimator),this.loadPet($,this._petEvoSpine,this._petEvoAnimator),this._evolutionCompletedText.setTextArguments(G.data.name,$.data.name),this._currentPetNameText.text=G.data.name,this._evoPetNameText.text=$.data.name,yield k.evolve(F,B),this.sendQuestEvolveEvent(G),this.playSequence(k.data.uniqueID,$)):j.VyI.log(`[PetEvolutionSequenceComponent] Creature id ${k.getID()} is not valid`,j.$bb.Error)}))}playSequence(k,B){this.onSequenceStarted.dispatch(),this._spineBone.setup(),this._newSpineBone.setup(),this._evolutionSequenceAnimator.playAnimation("evolution",!1,!0),this._evolutionSequenceAnimator.spine.onEvent.add(((k,B)=>{B.data.name===F.CHANGE_EVENT&&(this._petCurrentSpine.GameObject.active=!1,this._petEvoSpine.GameObject.active=!0,this._newSpineBone.targetTransform=this._petEvoSpine.GameObject.transform,this._evolvingText.GameObject.active=!1,this._currentPetNameText.GameObject.active=!1,this._evoPetNameText.GameObject.active=!1,this._congratulatoryText.GameObject.active=!0,this._evolutionCompletedText.GameObject.active=!0),B.data.name===F.ATTACK_EVENT&&(this._petEvoAnimator.playAnimation(F.ATTACK_ANIMATION,!1),this._petEvoAnimator.OnAnimationComplete.addOnce((()=>{this._petEvoAnimator.playAnimation(F.IDLE_ANIMATION,!0)})))}));const U=(0,et.G)(it.N)?()=>this.openPetItemCard(k,B):()=>this.completeSequence(k);this._evolutionSequenceAnimator.OnAnimationComplete.addOnce(U)}openPetItemCard(k,B){const U=new nt.j;U.id=B.ID,U.level=1,U.name=B.data.name,this._petEvoAnimator.stopAnimation(),q.q.instance.prodigy.game.broadcaster.broadcast(Y.ig.EvolveEnd),q.q.instance.prodigy.open.prefabMenu(st.l.PetRescueCardSequence,(()=>{this.completeSequence(k)}),void 0,!1,!0,{PET_RESCUE_CREATURE_DATA:Object.assign(Object.assign({},U),{ID:B.ID})})}completeSequence(k){this._petEvoAnimator.stopAnimation(),q.q.instance.prodigy.game.broadcaster.broadcast(Y.ig.EvolveEnd,null,[k]),this.onSequenceComplete.dispatch()}loadPet(k,B,U){var G,H;const V=null===(H=null===(G=null==k?void 0:k.metadata)||void 0===G?void 0:G.assets)||void 0===H?void 0:H.default;if(V)if("spritesheet"===V.type){q.q.instance.prodigy.create.monster(B.getRootContainer(),new z.r(q.q.instance.game,{ID:k.ID,level:1}),2,0,0).startLoad()}else{const k=(null==V?void 0:V.assetKey)?$.Q[V.assetKey]:`spine-${null==V?void 0:V.ID}`;q.q.instance.prodigy.load.assets([k],(()=>{B.setAsset(k,(()=>{U.playAnimation(F.IDLE_ANIMATION,!0)}))}))}else j.VyI.log(`[PetEvolutionSequenceComponent] Pet ${null==k?void 0:k.ID} does not have a default value or an assetKey configured to it`,j.$bb.Error)}sendQuestEvolveEvent(k){const B={params:{taskEventType:V.Z7.Pet,rarity:k.data.rarity,itemType:"pet",source:W.C.PetEvolution,id:k.data.ID,element:k.data.affinity,level:k.data.level}};q.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(H.T.EVOLVE_PET,B).catch(j.RQr.createHandler("Error sending a quest event for evolving a pet"))}destroy(){this.onSequenceStarted.dispose(),this.onSequenceComplete.dispose(),super.destroy()}};at.ATTACK_ANIMATION="attack",at.IDLE_ANIMATION="idle",at.CHANGE_EVENT="pet-change",at.ATTACK_EVENT="attack-ani",(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],at.prototype,"_petCurrentSpine",void 0),(0,G.Cg)([(0,j.MnK)(tt.j),(0,G.Sn)("design:type",tt.j)],at.prototype,"_petCurrentAnimator",void 0),(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],at.prototype,"_petEvoSpine",void 0),(0,G.Cg)([(0,j.MnK)(tt.j),(0,G.Sn)("design:type",tt.j)],at.prototype,"_petEvoAnimator",void 0),(0,G.Cg)([(0,j.MnK)(tt.j),(0,G.Sn)("design:type",tt.j)],at.prototype,"_evolutionSequenceAnimator",void 0),(0,G.Cg)([(0,j.MnK)(J.l),(0,G.Sn)("design:type",J.l)],at.prototype,"_spineBone",void 0),(0,G.Cg)([(0,j.MnK)(J.l),(0,G.Sn)("design:type",J.l)],at.prototype,"_newSpineBone",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],at.prototype,"_currentPetNameText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],at.prototype,"_evoPetNameText",void 0),(0,G.Cg)([(0,j.MnK)(Q.R),(0,G.Sn)("design:type",Q.R)],at.prototype,"_evolvingText",void 0),(0,G.Cg)([(0,j.MnK)(Q.R),(0,G.Sn)("design:type",Q.R)],at.prototype,"_congratulatoryText",void 0),(0,G.Cg)([(0,j.MnK)(Q.R),(0,G.Sn)("design:type",Q.R)],at.prototype,"_evolutionCompletedText",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],at.prototype,"onSequenceStarted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],at.prototype,"onSequenceComplete",void 0),at=F=(0,G.Cg)([(0,j.EVk)("PetEvolutionSequence",Z.Y.uiPet)],at)},78675:(k,B,U)=>{"use strict";U.d(B,{d:()=>q});var F=U(8674),G=U(62459),j=U(5491),$=U(9531),H=U(54950),V=U(28152),W=U(80573);let q=class extends G.uAl{constructor(){super(...arguments),this._onMonsterClicked=new G.HN0,this._enableInput=!0}destroy(){var k,B,U;null===(U=null===(B=null===(k=this.monsterAppearance)||void 0===k?void 0:k.input)||void 0===B?void 0:B.onClicked)||void 0===U||U.remove(this._onMonsterClicked.dispatch,this._onMonsterClicked),this._onMonsterClicked.dispose(),super.destroy()}spawn(k){this._spawnParent.children.forEach((k=>k.destroy())),this.monsterAppearance=this._prefabAppearanceLoader.loadHitboxAppearancePrefab(j.V.Pet,k,this._spawnParent).findComponentInChildren(W.n),this.monsterAppearance.input.InputEnabled=this._enableInput,this._alertFSM?(this.setAlertHeight(),this.monsterAppearance.onHitboxUpdate.add(this.setAlertHeight,this),this._alertFSM.animationController=this.monsterAppearance.animationController):G.VyI.log(`[SpawnMonsterAppearanceComponent]: No alert FSM component found for monster with ID ${k}`,G.$bb.Warning),this.monsterAppearance.animationController.changeState(0),this._enableInput&&this.monsterAppearance.input.onClicked.add(this._onMonsterClicked.dispatch,this._onMonsterClicked)}setAlertHeight(){const k=this._speechBubble.transform;k.setPosition(k.localPosition.x,this.monsterAppearance.input.GameObject.transform.localPosition.y)}};(0,F.Cg)([(0,G.Cdj)("b2a-9519"),(0,F.Sn)("design:type",H.S)],q.prototype,"_prefabAppearanceLoader",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],q.prototype,"_spawnParent",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],q.prototype,"_speechBubble",void 0),(0,F.Cg)([(0,G.MnK)($.K),(0,F.Sn)("design:type",$.K)],q.prototype,"_alertFSM",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],q.prototype,"_onMonsterClicked",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],q.prototype,"_enableInput",void 0),q=(0,F.Cg)([(0,G.EVk)("SpawnMonsterAppearance",V.Y.creature)],q)},93718:(k,B,U)=>{"use strict";U.d(B,{i:()=>V});var F=U(8674),G=U(62459),j=U(28152),$=U(34603),H=U(63398);let V=class extends H.k{constructor(){super(...arguments),this._atlasKey=null}set AtlasKey(k){this._atlasKey=k}updateFrameName(k){const B=this.GameObject.findComponent($._);null!==B&&B.setFrameName(`${this._atlasKey}/${this.animationName}/${this.AnimationTargetKey}-${k}`)}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],V.prototype,"_atlasKey",void 0),V=(0,F.Cg)([(0,G.EVk)("BuddyKeyFrameAnimator",j.Y.creatureAnimation)],V)},80573:(k,B,U)=>{"use strict";U.d(B,{n:()=>W});var F=U(8674),G=U(62459),j=U(77938),$=U(92591),H=U(28152),V=U(35084);let W=class extends G.uAl{constructor(){super(...arguments),this.onHitboxUpdate=new G.HN0,this._type=null,this._id=null}get input(){return this._inputOverlay}setData(k,B){this._type=k,this._id=B,this.updateInputSize()}updateInputSize(){var k,B,U,F;if(this._type&&G.Aq$.isDefined(this._id)){const $=j.t.getItem(this._type,this._id),H=$.metadata.assets?$.metadata.assets[this._assetKey]:null,V=null==H?void 0:H.hitbox,W=this.appearanceRenderComponent.getDimensions();this._inputOverlay.setSize(null!==(k=null==V?void 0:V.width)&&void 0!==k?k:W.width,null!==(B=null==V?void 0:V.height)&&void 0!==B?B:W.height),G.Aq$.isDefined(null==V?void 0:V.x)&&G.Aq$.isDefined(null==V?void 0:V.y)?this._inputOverlay.GameObject.transform.setPosition(V.x,V.y):this._inputOverlay.GameObject.transform.setPosition(.5*-this._inputOverlay.width+(null!==(U=null==V?void 0:V.xOffset)&&void 0!==U?U:0),-this._inputOverlay.height+(null!==(F=null==V?void 0:V.yOffset)&&void 0!==F?F:0)),this.onHitboxUpdate.dispatch()}}destroy(){this.onHitboxUpdate.dispose(),super.destroy()}};(0,F.Cg)([(0,G.MnK)(G.y4o),(0,F.Sn)("design:type",G.y4o)],W.prototype,"appearanceRenderComponent",void 0),(0,F.Cg)([(0,G.MnK)($.K),(0,F.Sn)("design:type",$.K)],W.prototype,"animationController",void 0),(0,F.Cg)([(0,G.MnK)(V.n),(0,F.Sn)("design:type",V.n)],W.prototype,"_inputOverlay",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],W.prototype,"_assetKey",void 0),W=(0,F.Cg)([(0,G.EVk)("DynamicAppearance",H.Y.creature)],W)},23891:(k,B,U)=>{"use strict";U.d(B,{f:()=>Y});var F=U(8674),G=U(62459),j=U(99625),$=U(62886),H=U(65240),V=U(35120),W=U(77938),q=U(47728),K=U(30226),z=U(28152);let Y=class extends G.uAl{constructor(){super(...arguments),this._isFake=!1,this._noDialogue=!1,this.awardSilently=!1,this._showPetsInPetCardFormat=!1,this._shouldSendQuestEvent=!0,this._customSegmentMetadata={},this._useFestivalContext=!1,this.additionalDialogueIds={},this._items=[],this.onItemAwarded=new G.HN0,this.onComplete=new G.HN0,this._shouldRefreshMultiplayer=!1}set showPetsInPetCardFormat(k){this._showPetsInPetCardFormat=k}set sourceType(k){this._sourceType=k}get customSegmentMetadata(){return this._customSegmentMetadata}set customSegmentMetadata(k){this._customSegmentMetadata=k}get singleItemData(){return this._itemType&&this._itemID?W.t.getItem(this._itemType,this._itemID):null}create(){super.create(),G.Aq$.isDefined(this._itemType)&&G.Aq$.isDefined(this._itemID)&&(this._items=[{type:this._itemType,ID:this._itemID,N:this._itemQuantity}])}destroy(){this.onItemAwarded.dispose(),this.onComplete.dispose(),super.destroy()}setItemRewardAsFake(){this._isFake=!0}awardItem(){var k;if(this._sourceType&&(this._customSegmentMetadata.source_type=this._sourceType),this._useFestivalContext){const k=q.x.getFestivalSegmentContext();this._customSegmentMetadata.instance_type=k.instance_type,this._customSegmentMetadata.instance_id=k.instance_id}const B=null!==(k=this.getItemData())&&void 0!==k?k:[],U=this.getInjectedValue("a25-68f4");if(this._isFake)this._shouldSendQuestEvent&&U.sendQuestEventViaHub($.T.COLLECT_ITEM,{type:this._itemType,id:this._itemID,progress:this._loggedInPlayer.player.backpack.hasItem(this._itemType,this._itemID)}).catch(G.RQr.createHandler("[GotItemComponent] Error sending quest event."));else for(const F of B)this._loggedInPlayer.setSavingEnabled(!1),K.J.bagItemByType(F,V.q.instance.game,void 0,void 0,this._customSegmentMetadata),this._shouldSendQuestEvent?U.sendQuestEventViaHub($.T.COLLECT_ITEM,{type:this._itemType,id:this._itemID,progress:this._loggedInPlayer.player.backpack.hasItem(this._itemType,this._itemID)}).then((()=>{var k;null===(k=this._loggedInPlayer.player)||void 0===k||k.forceSaveCharacter(null,!0)})).catch(G.RQr.createHandler("[GotItemComponent] Error sending quest event.")).finally((()=>{this._loggedInPlayer.setSavingEnabled(!0)})):this._loggedInPlayer.player.forceSaveCharacter();this.awardSilently?this.complete():this.doAwardItemSequence(B).catch(G.RQr.createHandler("[GotItemComponent] Error awarding item.")),this.onItemAwarded.dispatch(this._itemType,this._itemID,this._itemQuantity)}doAwardItemSequence(){return(0,F.sH)(this,arguments,void 0,(function*(k=[]){const B=this._showPetsInPetCardFormat?k.filter((k=>"pet"!==k.type)):k;if(B.length>0&&(yield new Promise((k=>{this._gotItem=V.q.instance.prodigy.open.gotItem(B,k,!this._noDialogue,void 0,void 0,!0,this._customSegmentMetadata,this.additionalDialogueIds)}))),this._showPetsInPetCardFormat&&k.length>0){const B=k.filter((k=>"pet"===k.type)),U=B.length;let F=0;for(;F{var U,G,$;V.q.instance.prodigy.open.prefabMenu(j.l.PetRescueCardSequence,B,void 0,!1,!0,{PET_RESCUE_CREATURE_DATA:{ID:k.ID,level:null!==(G=null===(U=k.data)||void 0===U?void 0:U.level)&&void 0!==G?G:1,name:null!==($=null==F?void 0:F.name)&&void 0!==$?$:""}})})),$++}))}getItemData(){return this._items}setItem(k,B,U=1,F=!1){this._itemType=k,this._itemID=B,this._itemQuantity=U,this._isFake=F,this._items=[{type:this._itemType,ID:this._itemID,N:this._itemQuantity}]}addItem(k,B,U=1,F=!1){this._isFake=F,this._items.push({type:k,ID:B,N:U})}addItems(k,B=!1){this._isFake=B,this._items.push(...k)}clearItems(){this._items=[]}close(){var k;null===(k=this._gotItem)||void 0===k||k.close()}complete(){!this._isFake&&this._shouldRefreshMultiplayer&&(G.VyI.log("Forcing a reconnect to the multiplayer server",G.$bb.Verbose),V.q.instance.prodigy.gameContainer.get("c97-bd0d").refreshMultiplayer(),this._shouldRefreshMultiplayer=!1),this.onComplete.dispatch()}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],Y.prototype,"_itemType",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Y.prototype,"_itemID",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Y.prototype,"_itemQuantity",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_isFake",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_noDialogue",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"awardSilently",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_showPetsInPetCardFormat",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_shouldSendQuestEvent",void 0),(0,F.Cg)([(0,G.gfw)(H.C),(0,F.Sn)("design:type",String)],Y.prototype,"_sourceType",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],Y.prototype,"_customSegmentMetadata",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_useFestivalContext",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],Y.prototype,"additionalDialogueIds",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onItemAwarded",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onComplete",void 0),(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",Object)],Y.prototype,"_loggedInPlayer",void 0),Y=(0,F.Cg)([(0,G.EVk)("GotItem",z.Y.item)],Y)},43485:(k,B,U)=>{"use strict";U.d(B,{j:()=>Z});var F=U(8674),G=U(62459),j=U(5491),$=U(77938),H=U(50503),V=U(55122),W=U(22023),q=U(28152),K=U(30226),z=U(35120),Y=U(13956),Q=U(25834),X=U(23891);let Z=class extends X.f{constructor(){super(...arguments),this._itemType="pet",this._usePlayerLevel=!1,this._playerLevelDeltaMin=0,this._playerLevelDeltaMax=0,this._minLevel=1,this._maxLevel=null}init(k,B=1,U=!1){this.setItem(this._itemType,k,B,U)}setPlayerLevelDelta(k,B,U=!0){this._usePlayerLevel=U,this._playerLevelDeltaMin=k,this._playerLevelDeltaMax=B}setLevelMinMax(k,B){this._minLevel=k,this._maxLevel=B}awardItem(){var k;let B=[];if(this._isFake){B=this.getItemData();const U=B.findIndex((k=>"pet"===k.type)),{data:F,ID:j}=B.splice(U,1)[0];let $;const H=this._loggedInPlayer.player.kennel;for(let B=H.data.length-1;B>=0;--B){const U=H.data[B];if(U.ID===j&&!(null===(k=this._bridge.getSecureData(U.uniqueID))||void 0===k?void 0:k.caught.legacySource)){$=U;break}}F&&G.Aq$.isDefined($)&&($.level=F.level,$.stars=F.stars,H.updated=!0)}super.awardItem();for(const U of B)K.J.bagItemByType(U,z.q.instance.game,void 0,void 0,this._customSegmentMetadata)}getItemData(){var k;const B=null===(k=$.t.getItem(this._itemType,this._itemID))||void 0===k?void 0:k.data;if(!B)return G.VyI.log(`[GotPetComponent] Failed to find item data for ${this._itemType} ${this._itemID}`,G.$bb.Error),null;const U=[this.getPetItemData()];return B.unlockFollow&&U.push({type:"follow",ID:B.unlockFollow}),"pet"===this._itemType&&W.P8.isPetEpic(this._itemID)&&(this._shouldRefreshMultiplayer=!0),U}getPetItemData(){var k,B;const U=null===(k=$.t.getItem(this._itemType,this._itemID))||void 0===k?void 0:k.data;let F=this._minLevel;if(this._usePlayerLevel){const k=Math.min(this._playerLevelDeltaMin,this._playerLevelDeltaMax),B=Math.max(this._playerLevelDeltaMin,this._playerLevelDeltaMax);F=this._loggedInPlayer.getLevel()+Math.floor(G.cj9.random(k,B+1))}return F=G.cj9.clamp(F,this._minLevel,null!==(B=this._maxLevel)&&void 0!==B?B:V.s.activePlayerLevelCap),{type:this._itemType,ID:this._itemID,N:this._itemQuantity,data:{seed:0,level:F,stars:V.s.xpRequiredForLevel(F,j.V.Pet),hp:H.A.getHPFromParams(F,U.statHealth||5)}}}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],Z.prototype,"_itemType",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Z.prototype,"_usePlayerLevel",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Z.prototype,"_playerLevelDeltaMin",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Z.prototype,"_playerLevelDeltaMax",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Z.prototype,"_minLevel",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Z.prototype,"_maxLevel",void 0),(0,F.Cg)([(0,Y.b)(Q.T),(0,F.Sn)("design:type",Q.T)],Z.prototype,"_bridge",void 0),Z=(0,F.Cg)([(0,G.EVk)("GotPet",q.Y.saving)],Z)},63398:(k,B,U)=>{"use strict";U.d(B,{k:()=>V});var F=U(8674),G=U(62459),j=U(95891),$=U(35120),H=U(79009);class V extends G.JTX{constructor(){super(...arguments),this.onAnimationComplete=new G.HN0,this.isAnimating=!1,this.animationName=null,this.loopOverride=!0,this.bindData={position:{x:0,y:0},scale:{x:1,y:1},angle:0},this.animationData=null,this.currentFrameData={},this.targetKey=null}get OnAnimationComplete(){return this.onAnimationComplete}get AnimationTargetKey(){return this.targetKey}set AnimationTargetKey(k){this.targetKey=k}setCurrentToBindPose(){this.bindData.position={x:this.GameObject.legacyTransform.x,y:this.GameObject.legacyTransform.y},this.bindData.angle=this.GameObject.legacyTransform.group.angle,this.bindData.scale={x:this.GameObject.legacyTransform.group.scale.x,y:this.GameObject.legacyTransform.group.scale.y}}playAnimation(k,B,U){if(this.isAnimating){if(this.animationName===k){const k=Object.keys(this.currentFrameData),B=k.length;for(let U=0;Uk[U].frames.length-1===B.frame))&&(this.onAnimationComplete.dispatch(),this.stopAnimation())}}}updateX(k){this.GameObject.legacyTransform.group.position.x=this.bindData.position.x+k}updateY(k){this.GameObject.legacyTransform.group.position.y=this.bindData.position.y+k}updateAngle(k){this.GameObject.legacyTransform.group.angle=k}updateXScale(k){this.GameObject.legacyTransform.group.scale.x=k}updateYScale(k){this.GameObject.legacyTransform.group.scale.y=k}updateVisible(k){this.GameObject.active=k}stopAnimation(){this.isAnimating=!1,this.GameObject.legacyTransform.group.position.set(this.bindData.position.x,this.bindData.position.y),this.GameObject.legacyTransform.group.angle=this.bindData.angle,this.GameObject.legacyTransform.group.scale.set(this.bindData.scale.x,this.bindData.scale.y),this.GameObject.active=!0}updateFrame(k,B){const U=this.animationData.animatedProperties[B],F=this.getCurrentFrameForProperty(B),G=Math.floor((k+F.elapsed)/U.interval);let j=F.frame+G;const $=U.frames.length-1;j>=$&&(this.animationData.loop?j%=U.frames.length:j=$);const H=this.currentFrameData[B];return H.frame=j,H.elapsed=H.elapsed+k-U.interval*G,H}updateFrameProperty(k,B,U,F){const G=this.updateFrame(k,B);null!==G&&F(U[B].frames[G.frame])}getCurrentFrameForProperty(k){return G.Aq$.isDefined(this.currentFrameData[k])||(this.currentFrameData[k]={elapsed:0,frame:0}),this.currentFrameData[k]}destroy(){this.onAnimationComplete.dispose(),super.destroy()}}(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],V.prototype,"targetKey",void 0),(0,F.Cg)([G.IJn,(0,F.Qj)(2,(0,G.vQZ)("AnimationData")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[String,Boolean,H.F]),(0,F.Sn)("design:returntype",void 0)],V.prototype,"playAnimation",null)},89717:(k,B,U)=>{"use strict";U.d(B,{R:()=>K});var F=U(8674),G=U(62459),j=U(35120),$=U(54950),H=U(73797),V=U(28152),W=U(29834),q=U(80573);let K=class extends G.uAl{constructor(){super(...arguments),this._onSmokeCloudShown=new G.HN0,this._onPlayerMorphStarted=new G.HN0,this._onPlayerMorphEnded=new G.HN0,this._onMorphedAppearanceClicked=new G.HN0,this._morphedObject=null,this._morphedAppearance=null}get morphedAppearance(){return this._morphedAppearance}get onPlayerMorphStarted(){return this._onPlayerMorphStarted}get onPlayerMorphEnded(){return this._onPlayerMorphEnded}create(){if(super.create(),this._playerData){if(this._playerData.player.isPlayerTransformed()&&this.createMorphAppearance(),this.transformPlayer=this.transformPlayer.bind(this),this.clearMorphedAppearance=this.clearMorphedAppearance.bind(this),this._playerData.isActivePlayer()){const k=j.q.instance.game.broadcaster;k.addAppListener(H.J8.MorphMarbleUsed,this.transformPlayer,this),k.addAppListener(H.J8.MorphMarbleCancelled,this.clearMorphedAppearance,this)}}else G.VyI.log("MorphTransformationComponent: Failed to initialize the component due to missing player data provider",G.$bb.Error)}destroy(){var k;if(j.q.instance.game.time.events.remove(this._smokeTimer),this._onSmokeCloudShown.dispose(),this._onSmokeCloudShown=null,this._onPlayerMorphStarted.dispose(),this._onPlayerMorphStarted=null,this._onPlayerMorphEnded.dispose(),this._onPlayerMorphEnded=null,this._morphedObject&&(this._morphedAppearance.input.onClicked.remove(this._onMorphedAppearanceClicked.dispatch,this._onMorphedAppearanceClicked),this._morphedAppearance=null,this._morphedObject=null),this._onMorphedAppearanceClicked.dispose(),this._onMorphedAppearanceClicked=null,null===(k=this._playerData)||void 0===k?void 0:k.isActivePlayer()){const k=j.q.instance.game.broadcaster;k.removeAppListener(H.J8.MorphMarbleUsed,this),k.removeAppListener(H.J8.MorphMarbleCancelled,this)}super.destroy()}isMorphed(){var k,B;return(null===(B=null===(k=this._playerData)||void 0===k?void 0:k.player)||void 0===B?void 0:B.isPlayerTransformed())&&G.Aq$.isDefined(this._morphedAppearance)}createMorphAppearance(){var k;this._morphedObject&&this.destroyMorphAppearance();const B=this._playerData.player.getPlayerData().playerTransformation;B&&(this._morphedObject=this._appearanceLoader.loadHitboxAppearancePrefab(B.transformType,B.transformID,this.gameObject),this._morphedAppearance=this._morphedObject.findComponentInChildren(q.n),this._morphedAppearance.input.onClicked.add(this._onMorphedAppearanceClicked.dispatch,this._onMorphedAppearanceClicked),this._morphedAppearance.appearanceRenderComponent.GameObject.setLayer(void 0,!0),null===(k=this._onPlayerMorphStarted)||void 0===k||k.dispatch())}clearMorphedAppearance(){null!==this._morphedObject&&this.showSmokeCloud((()=>{var k;this.destroyMorphAppearance(),null===(k=this._onPlayerMorphEnded)||void 0===k||k.dispatch()}))}clearMorphedAppearanceWithoutEffect(){var k;this.destroyMorphAppearance(),null===(k=this._onPlayerMorphEnded)||void 0===k||k.dispatch()}destroyMorphAppearance(){var k;null===(k=this._morphedObject)||void 0===k||k.destroy(),this._morphedObject=null,this._morphedAppearance=null}transformPlayer(k){this.transformPlayerWithEffect(k.effect.transform,k.effect.ID,k.effect.time)}transformPlayerWithEffect(k,B,U=6e3,F){this._playerData.player.transformPlayer(k,B,U,F),this.showSmokeCloud(this.createMorphAppearance)}transformPlayerWithoutEffect(k,B,U=6e3,F){this._playerData.player.transformPlayer(k,B,U,F),this.createMorphAppearance()}showSmokeCloud(k){var B;this._playerData.isActivePlayer()&&(j.q.instance.game.input.enabled=!1,j.q.instance.game.input.reset()),this._smokeTimer=j.q.instance.game.time.events.addTimer(400,k,this),this._playerData.isActivePlayer()&&(this._smokeAnimator?this._smokeAnimator.OnAnimationComplete.addOnce((()=>j.q.instance.game.input.enabled=!0)):j.q.instance.game.input.enabled=!0),null===(B=this._smokeAnimator)||void 0===B||B.playAnimation("spine-smoke-2",!1,!0),this._onSmokeCloudShown.dispatch()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],K.prototype,"_onSmokeCloudShown",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],K.prototype,"_onPlayerMorphStarted",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],K.prototype,"_onPlayerMorphEnded",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],K.prototype,"_onMorphedAppearanceClicked",void 0),(0,F.Cg)([(0,G.MnK)(W.j),(0,F.Sn)("design:type",W.j)],K.prototype,"_smokeAnimator",void 0),(0,F.Cg)([(0,G.Cdj)("377-3e7b"),(0,F.Sn)("design:type",Object)],K.prototype,"_playerData",void 0),(0,F.Cg)([(0,G.Cdj)("b2a-9519"),(0,F.Sn)("design:type",$.S)],K.prototype,"_appearanceLoader",void 0),K=(0,F.Cg)([(0,G.EVk)("MorphTransformation",V.Y.playerAnimation)],K)},63115:(k,B,U)=>{"use strict";U.d(B,{T:()=>K});var F,G=U(8674),j=U(62459);!function(k){k.Clamshell_mount="01b0fac7-6659-4a4b-8c9e-e0ba6bdd814d",k.Cloud_mount="1292a7de-833f-4f57-b59e-e00c942f62e1",k.Coin_mount="b5e58a6c-a45c-465b-9549-d44632d25974",k.Flowers_mount="0434f3ed-7a2f-4e70-9f59-9f208cf80831",k.Mount_12_mount="eacb8d01-7722-4a58-a3ed-0557bb595490",k.Mount_13_mount="a1cfd064-10e9-4f4e-8620-f3f9a40c9c4d",k.Mount_14_mount="3065f309-5410-4974-84ab-67a0f72fd07f",k.Mount_15_mount="44c46fb8-0a97-458f-8167-29305b00a139",k.Mount_16_mount="ec8a9fd8-4fd1-4316-bb4d-d106b556c74b",k.Mount_17_mount="30d63d06-820b-46d9-8374-e85dff1b5244",k.Mount_18_mount="e1d22939-2dd0-4713-893a-f88020942d46",k.Mount_19_mount="5f31ac1d-1847-46a2-b540-ed7d65c5d9db",k.Mount_20_mount="a589dc3d-42e1-4ee9-b4a1-9c1a8ad41432",k.Mount_21_mount="61b0b8a3-506a-4645-af01-0bd446612ece",k.Mount_22_mount="82e7063c-ae67-40b6-b147-5944a5f168f9",k.Mount_23_mount="3a164ae8-0bd1-40ba-8542-d407f9316c47",k.Mount_24_mount="689d94a6-061c-4f10-84f9-7b79a3c233cb",k.Mount_25_mount="0db7bf9a-7e3b-46bc-a3fc-913207039867",k.Mount_26_mount="7959719b-58df-47de-8f66-c8a004eb0f58",k.Mount_27_mount="f6f5a970-bd24-46b2-b5f9-b453b8defe91",k.Mount_28_mount="bce878c1-a0d0-4103-9032-959e047e5a6f",k.Mount_29_mount="2842e909-4a6f-4bf6-a3a6-88c52c7088a7",k.Mount_30_mount="400cdf0b-ffda-4e6b-8fe0-85a09937efa1",k.Mount_31_mount="c2df8c8f-db83-488b-a4c0-e93f33799b95",k.Mount_32_mount="9fb4c701-9376-4abc-b0c4-a0d51031f058",k.Mount_33_mount="54b0b61a-e283-41f9-b7d0-6f5c05581a95",k.Mount_34_mount="5ac56738-6022-4f42-b2e2-69488f15741b",k.Mount_35_mount="7ac360b8-1676-4d92-b269-a65ceb5a0433",k.Mount_36_mount="bf9c6ec9-22ec-462a-9234-5b902040209a",k.Mount_37_mount="1bb50f3c-7e3d-4ca4-a1f0-7e05077ca897",k.Mount_38_mount="9817e829-895c-4602-a3fc-16391e7f3122",k.Mount_39_mount="f38096ba-715a-4aa1-9a80-b47730b8c4f3",k.Mount_40_mount="38e4de2e-94b8-4c33-b8a4-b47fdf2dd189",k.Mount_41_mount="905efbb2-1357-405b-871d-48a1f3e2f2b3",k.Mount_42_mount="23ec77e0-7da7-413b-9e6e-0609a6b2b77d",k.Mount_43_mount="04387aa5-95db-41ad-83f0-ea233b65e5a8",k.Mount_44_mount="87f9f92a-a0f5-4230-9a07-44d8c1f6c488",k.Mount_45_mount="9d1677d9-dc6f-439e-bb5a-fac54852bdbf",k.Mount_46_mount="01267385-f2de-4c73-8faa-b924021decff",k.Mount_47_mount="6cf715f3-6a1d-4908-9ee7-83a17da3817f",k.Mount_48_mount="85b49bda-42a4-4ca6-998b-72c3892472ac",k.Mount_49_mount="3ac41c6d-8b2b-4b86-80ce-0eddd406c2f5",k.Rainbow_cloud_mount="f65753d9-9ffb-4b5b-96b2-440062f35e5f",k.Storm_cloud_mount="ce2010d2-f3ce-4811-94a7-17ef018625d7",k.Surfboard_mount="9138b7ad-f8f7-43e7-af73-64c64b75214b",k.Test_mount="bc30712a-feb9-46a1-bc27-c4c02b2a4db6",k.Treasure_chest_mount="a9cb6b76-7977-4865-9711-ee3cf1956846",k.Tube_mount="36f07d74-1ec1-4406-80fc-133bea288f85"}(F||(F={}));var $=U(35120),H=U(77938),V=U(73797),W=U(1492),q=U(28152);let K=class extends j.uAl{constructor(){super(...arguments),this._onMount=new j.HN0,this._onDismount=new j.HN0,this._transformationNotSupported=!1,this._transformationChecker=null,this._pendingCheckerResolvers=[],this._mountID=null,this._listenerEnabled=!0,this._updateMountAppearanceQueue=Promise.resolve()}get onMount(){return this._onMount}get onDismount(){return this._onDismount}get transformationChecker(){return this._transformationChecker}set transformationChecker(k){if(this._transformationChecker=k,k&&this._pendingCheckerResolvers.length>0){const k=this._pendingCheckerResolvers;this._pendingCheckerResolvers=[],k.forEach((k=>k()))}}create(){if(super.create(),!this._playerData)return void j.VyI.log("MountListenerComponent: Failed to initialize the component due to missing player data provider",j.$bb.Error);const k=$.q.instance.game.broadcaster;this._playerData.isActivePlayer()&&(k.addAppListener(V.J8.PlayerEditingMenuClosed,this.updateMountAppearance,this),k.addAppListener(V.J8.PlayerAppearanceUpdated,this.updateMountAppearance,this)),k.addAppListener(V.J8.MorphMarbleUsed,this.updateMountAppearance,this),k.addAppListener(V.J8.MorphMarbleCancelled,this.updateMountAppearance,this),k.addAppListener(V.J8.MorphMarbleTimerUpdated,this.updateMountAppearance,this)}destroy(){var k,B,U;null===(k=this._onMount)||void 0===k||k.dispose(),this._onMount=null,null===(B=this._onDismount)||void 0===B||B.dispose(),this._onDismount=null,this.mountComponent=null;{const k=$.q.instance.game.broadcaster;(null===(U=this._playerData)||void 0===U?void 0:U.isActivePlayer())&&(k.removeAppListener(V.J8.PlayerEditingMenuClosed,this),k.removeAppListener(V.J8.PlayerAppearanceUpdated,this)),k.removeAppListener(V.J8.MorphMarbleUsed,this),k.removeAppListener(V.J8.MorphMarbleCancelled,this),k.removeAppListener(V.J8.MorphMarbleTimerUpdated,this)}if(this._transformationChecker=null,this._pendingCheckerResolvers.length>0){const k=this._pendingCheckerResolvers;this._pendingCheckerResolvers=[],k.forEach((k=>k()))}super.destroy()}updateMountAppearance(){return(0,G.sH)(this,void 0,void 0,(function*(){this._updateMountAppearanceQueue=this._updateMountAppearanceQueue.then((()=>(0,G.sH)(this,void 0,void 0,(function*(){var k;this._transformationChecker||this._transformationNotSupported||(j.VyI.log("No transformation checker set for mount listener. Deferring update until a transformation checker is set.",j.$bb.Verbose),yield new Promise((k=>{this._pendingCheckerResolvers.push(k)}))),this.mountComponent&&((null===(k=this._transformationChecker)||void 0===k?void 0:k.isTransformed())?yield this.setMountAppearanceFromId(0):yield this.setMountAppearanceFromId())})))),yield this._updateMountAppearanceQueue}))}addParticleSystem(k){var B,U,F;if(this.mountComponent)if(this.mountComponent.hasInternalParticleEffect())this.mountComponent.addInternalParticleEffect().catch(j.RQr.createHandler("Could not add internal particle effect."));else if(null===(F=null===(U=null===(B=k.metadata)||void 0===B?void 0:B.assets)||void 0===U?void 0:U.particles)||void 0===F?void 0:F.ID){const B=k.metadata.assets.particles;this.mountComponent.addParticleEffectByID(B.ID,B.x,B.y),this.mountComponent.pauseParticles()}else this.mountComponent.removeParticleEffect()}setMountAppearanceFromId(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,G;if(!this._listenerEnabled||!this._playerData)return;const $=null!=k?k:this._playerData.player.equipment.getMount();if($!==this._mountID)if(this._mountID=$,this._mountID>0){const k=H.t.getItem("mount",this._mountID);(null===(B=k.data)||void 0===B?void 0:B.mountGuid)||(j.VyI.log(`ERROR: Mount item ${this._mountID} does not have a GUID, defaulting to Cloud`,j.$bb.Error),k.data.mountGuid=F.Cloud_mount);const G=k.data.mountGuid;try{if(yield this.mountComponent.setMount(G),!this.mountComponent)return;this.addParticleSystem(k),null===(U=this._onMount)||void 0===U||U.dispatch()}catch(V){j.RQr.logError(V,"ERROR: Unable to update mount appearance.")}}else try{if(yield this.mountComponent.clearMount(),!this.mountComponent)return;null===(G=this._onDismount)||void 0===G||G.dispatch()}catch(V){j.RQr.logError(V,"ERROR: Unable to clear mount appearance.")}}))}setListenersEnabled(k=!0){this._listenerEnabled=k}};(0,G.Cg)([(0,j.Pqz)(W.N),(0,G.Sn)("design:type",W.N)],K.prototype,"mountComponent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],K.prototype,"_onMount",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],K.prototype,"_onDismount",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],K.prototype,"_transformationNotSupported",void 0),(0,G.Cg)([(0,j.Cdj)("377-3e7b"),(0,G.Sn)("design:type",Object)],K.prototype,"_playerData",void 0),K=(0,G.Cg)([(0,j.EVk)("MountListener",q.Y.playerAnimation)],K)},39325:(k,B,U)=>{"use strict";U.d(B,{F:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(29834);let H=class extends G.uAl{playAnimation(k){var B;(null===(B=this._spineAnimator)||void 0===B?void 0:B.hasAnimation(k))?this._spineAnimator.playAnimation(k,!0):G.Aq$.isDefined(this._spineAnimator)&&G.VyI.log(`ERROR: Animation ${k} not found in player SpineAnimator`,G.$bb.Error)}};(0,F.Cg)([(0,G.MnK)($.j),(0,F.Sn)("design:type",$.j)],H.prototype,"_spineAnimator",void 0),H=(0,F.Cg)([(0,G.EVk)("PlayerAnimationStates",j.Y.playerAnimation)],H)},47389:(k,B,U)=>{"use strict";U.d(B,{b:()=>H});var F=U(8674),G=U(62459),j=U(63068),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this.onAppearanceLoaded=new G.HN0,this.onAppearanceDone=new G.HN0}create(){super.create(),this._appearanceData&&this.setAppearance(this._appearanceData)}setAppearance(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F;k.outfit||(k.outfit=1);const $=null===(F=null===(U=null===(B=this.gameObject)||void 0===B?void 0:B.parent)||void 0===U?void 0:U.parent)||void 0===F?void 0:F.findComponentInChildren(j.n);return $?(yield $.fromPlayerAppearanceData(k).catch(G.RQr.createHandler("fromPlayerAppearanceData failed in PlayerAppearanceSelector")),this.onAppearanceLoaded.dispatch()):this.onAppearanceLoaded.dispatch(),Promise.resolve()}))}destroy(){this.onAppearanceLoaded.dispose(),this.onAppearanceDone.dispose(),super.destroy()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onAppearanceLoaded",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onAppearanceDone",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],H.prototype,"_appearanceData",void 0),H=(0,F.Cg)([(0,G.EVk)("PlayerAppearanceSelector",$.Y.playerAnimation)],H)},6190:(k,B,U)=>{"use strict";U.d(B,{q:()=>q});var F=U(8674),G=U(62459),j=U(65240),$=U(35120),H=U(65050),V=U(30226),W=U(28152);let q=class extends G.JTX{constructor(){super(...arguments),this.eventType="got-item",this.awardSourceType=j.C.PrizeWheel,this.instanceType=H.N.OpenWorld,this.awardItems=!0,this.onComplete=new G.HN0}destroy(){this.onComplete.dispose(),super.destroy()}run(){if(this.awardItems){for(const k of this.items)k.isSecure||V.J.bagItem(k,$.q.instance.game,this.eventType,void 0,{source_type:this.awardSourceType,instance_type:this.instanceType,instance_id:this.instanceId});this.onComplete.dispatch()}else this.onComplete.dispatch()}addItem(k,B,U=1){this.items.push({type:k,ID:B,N:U})}setItem(k,B,U=1){this.items=[{type:k,ID:B,N:U}]}};(0,F.Cg)([(0,G.SZi)(),(0,G.vCS)(),(0,F.Sn)("design:type",Array)],q.prototype,"items",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],q.prototype,"eventType",void 0),(0,F.Cg)([(0,G.gfw)(j.C),(0,F.Sn)("design:type",String)],q.prototype,"awardSourceType",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],q.prototype,"onComplete",void 0),q=(0,F.Cg)([(0,G.EVk)("SilentAwardItems",W.Y.player)],q)},64889:(k,B,U)=>{"use strict";U.d(B,{$:()=>K});var F=U(8674),G=U(62459),j=U(92591),$=U(71857),H=U(28152),V=U(29834),W=U(89717),q=U(63115);let K=class extends G.uAl{constructor(){super(...arguments),this._isMounted=!1,this._currentStateID=0}get currentState(){return this._activeController.currentState}create(){super.create(),this._isMounted=!1,this._activeController=this._playerController,this._morphTransformation.onPlayerMorphStarted.add(this.setMorphController,this),this._morphTransformation.onPlayerMorphEnded.add(this.clearMorphController,this),this._mountListener.onMount.add(this.setMounted,this),this._mountListener.onDismount.add(this.clearMounted,this),this._mountListener.transformationChecker=this}getSpineAnimator(){return this._spineAnimator}setMorphController(){this._activeController=this._morphTransformation.morphedAppearance.animationController,this.changeState(this._currentStateID),this._mountListener.updateMountAppearance()}clearMorphController(){this._activeController=this._playerController,this.changeState(this._currentStateID)}setMounted(){this._isMounted=!0,this.changeState(this._currentStateID)}clearMounted(){this._isMounted&&(this._isMounted=!1,this.changeState(this._currentStateID))}isTransformed(){return this._morphTransformation.isMorphed()}changeState(k){this._currentStateID=k,this._isMounted&&[0,4,1].includes(k)?this._morphTransformation.isMorphed()&&this._activeController.changeState(0):this._morphTransformation.isMorphed()&&this._activeController.changeState(k),this._spineAnimator.GameObject.active=this._activeController===this._playerController;const B=this._spineAnimator;B&&(B.OnAnimationComplete.removeAll(),2===k?(B.playAnimation($.$.ATTACK,!1),B.OnAnimationComplete.addOnce((()=>{B.playAnimation($.$.STOP_HEAVY,!0)}))):3===k?(B.playAnimation($.$.ATTACK2,!1),B.OnAnimationComplete.addOnce((()=>{B.playAnimation($.$.STOP_HEAVY,!0)}))):5===k?(B.playAnimation($.$.ATTACK,!1),B.OnAnimationComplete.addOnce((k=>{k===$.$.ATTACK&&(B.playAnimation($.$.DANCE_RUNNINGMAN,!1),B.OnAnimationComplete.addOnce((()=>{B.playAnimation($.$.STOP_HEAVY,!0)})))}))):1===k?B.playAnimation(this._isMounted?$.$.WALK_FLOAT:$.$.WALK,!0):4===k?B.playAnimation($.$.STOP_HEAVY,!0):B.playAnimation($.$.STAND,!0))}destroy(){var k,B,U,F;this._morphTransformation&&(null===(k=this._morphTransformation.onPlayerMorphStarted)||void 0===k||k.removeAll(this),null===(B=this._morphTransformation.onPlayerMorphEnded)||void 0===B||B.removeAll(this)),this._mountListener&&(null===(U=this._mountListener.onMount)||void 0===U||U.removeAll(this),null===(F=this._mountListener.onDismount)||void 0===F||F.removeAll(this)),this._playerController=null,this._morphTransformation=null,this._mountListener=null,super.destroy()}};(0,F.Cg)([(0,G.MnK)(j.K),(0,G.Lr6)(0),(0,G.nKb)("defaultAnimationController"),(0,F.Sn)("design:type",j.K)],K.prototype,"_playerController",void 0),(0,F.Cg)([(0,G.MnK)(V.j),(0,F.Sn)("design:type",V.j)],K.prototype,"_spineAnimator",void 0),(0,F.Cg)([(0,G.MnK)(W.R),(0,F.Sn)("design:type",W.R)],K.prototype,"_morphTransformation",void 0),(0,F.Cg)([(0,G.MnK)(q.T),(0,F.Sn)("design:type",q.T)],K.prototype,"_mountListener",void 0),K=(0,F.Cg)([(0,G.EVk)("WizardAnimationController",H.Y.playerAnimation)],K)},13693:(k,B,U)=>{"use strict";U.d(B,{Y:()=>q});var F,G=U(8674),j=U(62459),$=U(95891),H=U(35120),V=U(129),W=U(71857);let q=F=class extends j.uAl{constructor(){super(...arguments),this._characterContainer=null,this._character=null,this._timeout=null,this._loadOnCreate=!1,this._adjustForMount=!1,this._hideMount=!1,this._animationState=W.$.SETUP,this.onLoaded=new j.HN0,this._inputEnabled=!0}create(){super.create(),this._loadOnCreate&&this.addDefaultPlayerCharacter()}addDefaultPlayerCharacter(){var k;const B=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=B.equipment.getMount()>0;this.addCharacter(B,null===(k=this._baseRenderComponent)||void 0===k?void 0:k.getRootContainer(),0,this._adjustForMount&&U?F._MOUNT_OFFSET:0)}addCharacter(k,B,U,F){var G;void 0===B&&(B=null===(G=this.GameObject.legacyTransform)||void 0===G?void 0:G.group),void 0===U&&(U=0),void 0===F&&(F=0),this._character=new V.a(H.q.instance.game),this._character.appearance=$.clone(k.appearance),this._character.equipment=$.clone(k.equipment),this._character.data.chargedLevelData=$.clone(k.data).chargedLevelData,this._character.data.level=$.clone(k.data).level,this._characterContainer=H.q.instance.prodigy.create.player(B,this._character,1,U,F,!1,{isPreview:!0,hideMount:this._hideMount}),this._characterContainer.forceWeaponVisual=!0,this._characterContainer.reload(),this._characterContainer.onFullyLoaded.addOnce((()=>{var k,B;this._animationState!==W.$.SETUP&&(null===(k=this._characterContainer)||void 0===k||k.setNewAnimationState(this._animationState)),null===(B=this._characterContainer)||void 0===B||B.setSpriteInput(this._inputEnabled),this.onLoaded.dispatch()}))}removeCharacter(){var k;null===(k=this._characterContainer)||void 0===k||k.destroy(),this._characterContainer=null}setEquipment(k,B){var U;this._character?("outfit"===k?this._character.equipment.setOutfit(B,!0):"hat"===k?this._character.equipment.setHat(B,!0):"weapon"===k?this._character.equipment.setWeapon(B,!0):"boots"===k?this._character.equipment.setBoots(B,!0):"mount"===k?this._character.equipment.setMount(B,!0):"costume"===k?this._character.equipment.setCostume(B,!0):j.VyI.log("Item type is unknown.",j.$bb.Warning),null===(U=this._characterContainer)||void 0===U||U.reload()):j.VyI.log("Character is undefined.",j.$bb.Warning)}setInputEnabled(k){var B;null===(B=this._characterContainer)||void 0===B||B.setSpriteInput(k),this._inputEnabled=k}setAppearance(k,B){var U;if(this._character){if("hair"===k)this._character.appearance.setHair(B);else if("hairColor"===k){const k=this._character.appearance.getHair().style;this._character.appearance.setHair(k,B)}else"face"===k?this._character.appearance.setFace(B):"eyeColor"===k?this._character.appearance.setEyeColor(B):"skinColor"===k?this._character.appearance.setSkinColor(B):j.VyI.log("Item type is unknown.",j.$bb.Warning);null===(U=this._characterContainer)||void 0===U||U.reload()}else j.VyI.log("Character is undefined.",j.$bb.Warning)}transformEffect(k,B=1e3){null!==this._timeout&&window.clearTimeout(this._timeout),this._timeout=window.setTimeout((()=>{var B;null===(B=this._characterContainer)||void 0===B||B.transformToItem(k.transform,k.ID,!0,0)}),B)}destroy(){this.removeCharacter(),window.clearTimeout(this._timeout),this.onLoaded.dispose(),super.destroy()}};q._MOUNT_OFFSET=36,(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"_loadOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"_adjustForMount",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"_hideMount",void 0),(0,G.Cg)([(0,j.gfw)(W.$),(0,G.Sn)("design:type",String)],q.prototype,"_animationState",void 0),(0,G.Cg)([(0,j.MnK)(j.jsv),(0,G.Sn)("design:type",j.jsv)],q.prototype,"_baseRenderComponent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],q.prototype,"onLoaded",void 0),q=F=(0,G.Cg)([(0,j.EVk)("CharacterPreview")],q)},44725:(k,B,U)=>{"use strict";U.d(B,{u:()=>z});var F=U(8674),G=U(62459),j=U(95891),$=U(35120),H=U(55734),V=U(129),W=U(22023),q=U(19690),K=U(28152);let z=class extends G.uAl{get renderContainer(){return this._renderContainer}addCreature(k,B=!1){this._renderContainer&&this._renderContainer.destroy(),k instanceof V.a?this.renderPlayer(k):this.renderMonster(k,B)}renderPlayer(k){const B=new V.a($.q.instance.game);return B.appearance=j.clone(k.appearance),B.equipment=j.clone(k.equipment),B.data.level=j.clone(k.data.level),B.data.chargedLevelData=j.clone(k.data.chargedLevelData),this._renderContainer=(0,q.vt)().player(this.GameObject.legacyTransform.group,B,1,0,0,!1,{isPreview:!0}),this._renderContainer.forceWeaponVisual=!0,this._renderContainer.standStill(),this._renderContainer.OnLoad.add((()=>{this._renderContainer.setSpriteInput(!1)})),this._renderContainer.startLoad(),this._renderContainer}renderMonster(k,B){var U;const F=new H.R($.q.instance.game,k.data);return this._renderContainer=(0,q.vt)().monster(this.GameObject.legacyTransform.group,F,1,0,0),G.Aq$.isDefined(null===(U=F.source)||void 0===U?void 0:U.defaultScale)&&(this._renderContainer.sprites.scale.x=F.source.defaultScale,this._renderContainer.sprites.scale.y=F.source.defaultScale),this._renderContainer.OnLoad.add((()=>{B?this._renderContainer.stand():this._renderContainer.stopAllAnimations();const U=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getChargedLevel()>0&&W.P8.isPetOnTeam(k.data);this._renderContainer.setChargedEffectVisibility(U)})),this._renderContainer.startLoad(),this._renderContainer}destroy(){var k;null===(k=this._renderContainer)||void 0===k||k.destroy(),this._renderContainer=null,super.destroy()}};z=(0,F.Cg)([(0,G.EVk)("CreaturePreview",K.Y.creatureAnimation)],z)},24382:(k,B,U)=>{"use strict";U.d(B,{j:()=>j});var F=U(62459),G=U(35120);class j extends F.uAl{constructor(){super(...arguments),this.onUpdateDisplay=new F.HN0}get game(){return G.q.instance.game}get name(){return null}get isCardValid(){return!1}updateDisplay(){this.isCardValid&&(this.resetCard(),this.updateCard(),this.onUpdateDisplay.dispatch())}updateCard(){}resetCard(){}clearCard(){this.resetCard()}destroy(){this.onUpdateDisplay.dispose(),super.destroy()}}},37468:(k,B,U)=>{"use strict";U.d(B,{z:()=>W});var F,G=U(8674),j=U(62459),$=U(43846),H=U(93171),V=U(38920);!function(k){k.Fraction="fraction",k.Percentage="percentage"}(F||(F={}));let W=class extends j.uAl{constructor(){super(...arguments),this._initialValue=0,this._filledText="",this._textDisplayType=F.Fraction,this._denominator=10,this._numerator=void 0,this._formatDisplayText=!1,this._initialFillColor="#FFFFFF",this._initialBgColor="#FFFFFF",this._initialOuterColor="#FFFFFF",this._initialTextOutlineColor="#902736",this._changeColorMidpoint=!1,this._midpointThreshold=.5,this._middleFillColor="#FFFFFF",this._middleBgColor="#FFFFFF",this._middleOuterColor="#FFFFFF",this._middleTextOutlineColor="#FFFFFF",this._changeColorOnComplete=!1,this.waitForAnimationCompleteToChangeColours=!1,this._completeThreshold=1,this._completeFillColor="#FFFFFF",this._completeBgColor="#FFFFFF",this._completeOuterColor="#FFFFFF",this._completeTextOutlineColor="#FFFFFF",this.onTweenValueStart=new j.HN0,this.onTweenValueComplete=new j.HN0,this.onFilled=new j.HN0}get progressBar(){return this._progressBar}get onProgress(){return this._progressBar.onProgress}create(){super.create(),this._initialColors={outerColor:this._initialOuterColor,bgColor:this._initialBgColor,fillColor:this._initialFillColor,textOutlineColor:this._initialTextOutlineColor},this._middleColors={outerColor:this._middleOuterColor,bgColor:this._middleBgColor,fillColor:this._middleFillColor,textOutlineColor:this._middleTextOutlineColor},this._completeColors={outerColor:this._completeOuterColor,bgColor:this._completeBgColor,fillColor:this._completeFillColor,textOutlineColor:this._completeTextOutlineColor},this.updateColors(this._initialColors),this.setValue(this._initialValue)}destroy(){super.destroy(),this.onTweenValueStart.dispose(),this.onTweenValueComplete.dispose(),this.onFilled.dispose()}setOuterColor(k){this._outlineGraphic.tint="number"==typeof k?k:j.Q1f.hexToColor(k).color}setBackgroundColor(k){this._innerGraphic.tint="number"==typeof k?k:j.Q1f.hexToColor(k).color}setFillColor(k){this._fillGraphic.tint="number"==typeof k?k:j.Q1f.hexToColor(k).color}setTextOutlineColor(k){this._barText.stroke="number"==typeof k?j.Q1f.numberToHexString(k):k}setBarText(k){this._barText.TextObject.destroyed||(this._barText.text=k)}hideBarText(){this._barText.Active=!1}showBarText(){this._barText.Active=!0}setBarTextStrokeColor(k){this._barText.TextObject.destroyed||(this._barText.stroke=k)}setValue(k,B=!1,U=0){this._initialValue=k,this.updateText(),B?(this._progressBar.tweenValue(k,U),this.onTweenValueStart.dispatch(),this._progressBar.onProgress.add((()=>{this.updateText()}),this),this._progressBar.onComplete.addOnce((()=>{this._progressBar.onProgress.removeAll(),this.updateText(),this.onTweenValueComplete.dispatch(),this.setColorsBasedOnValue(k),this.isFilledCheck()}))):(this._progressBar.setValue(k),this.updateText(),this.isFilledCheck()),B&&this.waitForAnimationCompleteToChangeColours||this.setColorsBasedOnValue(k)}setColorsBasedOnValue(k){this._changeColorOnComplete&&k>=this._completeThreshold?this.updateColors(this._completeColors):this._changeColorMidpoint&&this._changeColorMidpoint&&k>=this._midpointThreshold?this.updateColors(this._middleColors):this.updateColors(this._initialColors)}updateColors(k){this._activeColors!==k&&(this._activeColors=k,this.setOuterColor(k.outerColor),this.setBackgroundColor(k.bgColor),this.setFillColor(k.fillColor),this.setTextOutlineColor(k.textOutlineColor))}setFromValues(k,B,U=!1,F=0,G){this._numerator=k,this._denominator=B,U&&j.Aq$.isDefined(G)&&this.setValue(G/B,!1),this.setValue(k/B,U,F)}updateText(){const k=this._progressBar.fillValue;if(1!==k||""===this._filledText)if(this._textDisplayType===F.Fraction){let B=k*this._denominator;B=this._numerator&&this._numerator>B?Math.ceil(B):Math.floor(B),this._formatDisplayText?this.setBarText(`${(0,V.Hk)(B,0,",")} / ${(0,V.Hk)(this._denominator,0,",")}`):this.setBarText(`${B} / ${this._denominator}`)}else this._textDisplayType===F.Percentage&&this.setBarText(`${Math.round(100*k)}%`);else this.setBarText((0,$.k)(this._filledText))}tweenValue(k){this._progressBar.tweenValue(k),this._progressBar.onComplete.addOnce((()=>this.onTweenValueComplete.dispatch()))}getFillValue(){return this._progressBar.fillValue}isFilledCheck(){this._progressBar.fillValue>=1&&this.onFilled.dispatch()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],W.prototype,"_initialValue",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],W.prototype,"_filledText",void 0),(0,G.Cg)([(0,j.gfw)(F),(0,G.Sn)("design:type",String)],W.prototype,"_textDisplayType",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.okD)((k=>k._textDisplayType===F.Fraction)),(0,G.Sn)("design:type",Number)],W.prototype,"_denominator",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W.prototype,"_formatDisplayText",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",Object)],W.prototype,"_initialFillColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",Object)],W.prototype,"_initialBgColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",Object)],W.prototype,"_initialOuterColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",Object)],W.prototype,"_initialTextOutlineColor",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W.prototype,"_changeColorMidpoint",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.okD)((k=>k._changeColorMidpoint)),(0,G.Sn)("design:type",Number)],W.prototype,"_midpointThreshold",void 0),(0,G.Cg)([(0,j.iEU)(),(0,j.okD)((k=>k._changeColorMidpoint)),(0,G.Sn)("design:type",String)],W.prototype,"_middleFillColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,j.okD)((k=>k._changeColorMidpoint)),(0,G.Sn)("design:type",String)],W.prototype,"_middleBgColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,j.okD)((k=>k._changeColorMidpoint)),(0,G.Sn)("design:type",String)],W.prototype,"_middleOuterColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,j.okD)((k=>k._changeColorMidpoint)),(0,G.Sn)("design:type",String)],W.prototype,"_middleTextOutlineColor",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W.prototype,"_changeColorOnComplete",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W.prototype,"waitForAnimationCompleteToChangeColours",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.okD)((k=>k._changeColorOnComplete)),(0,G.Sn)("design:type",Number)],W.prototype,"_completeThreshold",void 0),(0,G.Cg)([(0,j.iEU)(),(0,j.okD)((k=>k._changeColorOnComplete)),(0,G.Sn)("design:type",String)],W.prototype,"_completeFillColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,j.okD)((k=>k._changeColorOnComplete)),(0,G.Sn)("design:type",String)],W.prototype,"_completeBgColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,j.okD)((k=>k._changeColorOnComplete)),(0,G.Sn)("design:type",String)],W.prototype,"_completeOuterColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,j.okD)((k=>k._changeColorOnComplete)),(0,G.Sn)("design:type",String)],W.prototype,"_completeTextOutlineColor",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],W.prototype,"onTweenValueStart",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],W.prototype,"onTweenValueComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],W.prototype,"onFilled",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],W.prototype,"_outlineGraphic",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],W.prototype,"_innerGraphic",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],W.prototype,"_fillGraphic",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],W.prototype,"_barText",void 0),(0,G.Cg)([(0,j.MnK)(H.a),(0,G.Sn)("design:type",H.a)],W.prototype,"_progressBar",void 0),W=(0,G.Cg)([(0,j.EVk)("DynamicProgressBar",j.YH6.ui)],W)},11624:(k,B,U)=>{"use strict";var F;U.d(B,{P:()=>F}),function(k){k[k.None=-1]="None",k[k.Firefly=0]="Firefly",k[k.Shiverchill=1]="Shiverchill",k[k.Skywatch=2]="Skywatch",k[k.Bonfire=3]="Bonfire",k[k.Shipwreck=4]="Shipwreck",k[k.Academy=5]="Academy",k[k.Darktower=6]="Darktower",k[k.Lamplight=7]="Lamplight",k[k.Dyno=8]="Dyno",k[k.House=9]="House",k[k.TowerTown=10]="TowerTown",k[k.DuelsStadium=11]="DuelsStadium",k[k.DragonIsle=12]="DragonIsle",k[k.FireflyHard=13]="FireflyHard",k[k.ShiverchillHard=14]="ShiverchillHard",k[k.BonfireHard=15]="BonfireHard",k[k.ShipwreckHard=16]="ShipwreckHard",k[k.SkywatchHard=17]="SkywatchHard",k[k.AcademyHard=18]="AcademyHard",k[k.Arcadia=19]="Arcadia"}(F||(F={}))},50873:(k,B,U)=>{"use strict";U.d(B,{k:()=>j});var F=U(62459),G=U(18280);class j extends F.uAl{constructor(){super(...arguments),this.maskWidth=0,this.maskHeight=0,this.isHorizontal=!0,this.targetMask=null}get Width(){return this.maskWidth}set Width(k){this.maskWidth=k,this.updateSize()}get Height(){return this.maskHeight}set Height(k){this.maskHeight=k,this.updateSize()}get IsHorizontal(){return this.isHorizontal}set IsHorizontal(k){this.isHorizontal=k,this.updateMaskAnchor(),this.updateSize()}create(){super.create(),this.targetMask=this.GameObject.findComponent(G.n),this.updateMaskAnchor()}setFillPercent(k){const B=F.cj9.clamp(k,0,1);this.isHorizontal?this.targetMask.updateAnchor(this.maskWidth*(1-B),0):this.targetMask.updateAnchor(0,this.maskHeight*(1-B))}updateMaskAnchor(){this.isHorizontal?this.targetMask.setAnchor(0,.5*this.maskHeight,this.maskWidth,this.maskHeight):this.targetMask.setAnchor(.5*this.maskWidth,0,this.maskWidth,this.maskHeight)}updateSize(){this.isHorizontal?(this.targetMask.GameObject.legacyTransform.x=.5*-this.maskWidth,this.targetMask.setAnchor(0,.5*this.maskHeight,this.maskWidth,this.maskHeight)):(this.targetMask.GameObject.legacyTransform.y=.5*-this.maskHeight,this.targetMask.setAnchor(.5*this.maskWidth,0,this.maskWidth,this.maskHeight))}}},12861:(k,B,U)=>{"use strict";U.d(B,{A:()=>V});var F=U(8674),G=U(62459),j=U(8770),$=U(28152),H=U(84246);let V=class extends H.j{applyEffect(k){if(k&&k.data)for(let B=0;B{"use strict";U.d(B,{w:()=>K});var F=U(8674),G=U(62459),j=U(28152),$=U(53661),H=U(35120),V=U(73797),W=U(13956),q=U(21314);let K=class extends G.uAl{constructor(){super(...arguments),this._openIFrameOnLoad=!0,this._iFrameWidth=480,this._iFrameHeight=700,this._iFrameBorderRadius=12,this.onIFrameClosed=new G.HN0}create(){super.create(),this._iFrame=document.createElement("iframe"),this._iFrameSource=this.getInjectedValue($.n7.IFrameSource),this._closePostMessage=this.getInjectedValue($.n7.IFrameClosePostMessage),this.st=H.q.instance.prodigy.gameContainer.get("c97-bd0d"),this.st.stopInactiveTimer()}postCreate(){super.postCreate(),this._openIFrameOnLoad&&this.setup(),this._closePostMessage&&H.q.instance.game.broadcaster.addAppListener(V.bS.POST_MESSAGE_RECEIVED,((k,B)=>{let U=null;if(U="string"==typeof B?JSON.parse(B):B,U.name===this._closePostMessage){document.getElementById("external-ui").removeChild(this._iFrame),this.st.startInactiveTimer(),this.gameObject.destroyDeferred(),this.onIFrameClosed.dispatch()}}),this,H.q.instance.game)}destroy(){this._iFrame&&this._iFrame.remove(),this._closePostMessage&&H.q.instance.game.broadcaster.removeAppListener(V.bS.POST_MESSAGE_RECEIVED,this,H.q.instance.game),this.onIFrameClosed.dispose(),super.destroy()}setup(){if(!this._iFrameSource)return void G.VyI.log("IFrameComponent: No source provided for the iframe.",G.$bb.Error);const k=document.getElementById("game-container").getElementsByTagName("canvas")[0],B=this._iFrame.style;this._iFrame.setAttribute("src",this._iFrameSource),this._iFrame.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),this._iFrame.setAttribute("allow",`payment ${this._urlProvider.getRootUrl()};`),B.position="absolute",B.display="block";const U=k.clientWidth>1}px)`,B.top=`calc(50% - ${F>>1}px)`,B.borderRadius=`${this._iFrameBorderRadius}px`;document.getElementById("external-ui").appendChild(this._iFrame)}};(0,F.Cg)([(0,W.b)("be9-3278"),(0,F.Sn)("design:type",q.p)],K.prototype,"_urlProvider",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],K.prototype,"_openIFrameOnLoad",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],K.prototype,"_iFrameWidth",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],K.prototype,"_iFrameHeight",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],K.prototype,"_iFrameBorderRadius",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],K.prototype,"onIFrameClosed",void 0),K=(0,F.Cg)([(0,G.EVk)("IFrame",j.Y.ui)],K)},65231:(k,B,U)=>{"use strict";U.d(B,{s:()=>K});var F=U(8674),G=U(62459),j=U(35120),$=U(98013),H=U(6719),V=U(19690),W=U(28152),q=U(24382);let K=class extends q.j{constructor(){super(...arguments),this._imageContainer=null}setItemData(k){this._item=k}get isCardValid(){return!!this._item}updateCard(){super.updateCard(),this.updateIcon()}resetCard(){$.l.removeAll(this._imageContainer.legacyTransform.group,!0)}updateIcon(k){if(this.itemIsImageItemDrop(this._item)){const[B,U]=H.y.toInjectionParams(this._item.image);j.q.instance.prodigy.create.sprite(0,0,B,U,void 0,(B=>{null==B||B.setParent(this._imageContainer.legacyTransform.group),null==k||k(B)}))}else(0,V.mD)().createFromDataAdvanced(this._item,this._imageContainer.legacyTransform.group,0,0).then((([B,U])=>null==k?void 0:k(U))).catch(G.RQr.createHandler(`IconCard: Failed to create icon from item data for ${this._item.type}-${this._item.ID}`))}itemIsImageItemDrop(k){return void 0!==k.image}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],K.prototype,"_imageContainer",void 0),K=(0,F.Cg)([(0,G.EVk)("IconCard",W.Y.ui)],K)},34603:(k,B,U)=>{"use strict";U.d(B,{_:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(95925),H=U(57750),V=U(28152);let W=class extends G.y4o{constructor(){super(...arguments),this._initialAtlas="",this._initialFrame=null,this._initialAlpha=1,this._initialTint="#FFFFFF",this.resizeOnLoad=!1,this.resizeLimitedToParentSize=!1,this._currentAtlas="",this._currentFrame=void 0,this._sprite=null,this._isLoaded=!1,this.onLoaded=new G.HN0,this.onAssetSet=new G.HN0,this._alwaysDispatchOnLoaded=!1}get isLoaded(){return this._isLoaded}get sprite(){return this._sprite}get OnLoaded(){return this.onLoaded}create(){super.create(),this._currentAtlas=this._initialAtlas,this._currentFrame=this._initialFrame,this._sprite=j.q.instance.prodigy.create.sprite(0,0),this._sprite.roundPixels=!0,this.setRootContainer(this._sprite),this._initialAtlas&&this.setAsset(this._initialAtlas,this._initialFrame),this.setAlpha(this._initialAlpha),"string"==typeof this._initialTint?this.tint(parseInt(this._initialTint.substring(1),16)):"number"==typeof this._initialTint?this.tint(this._initialTint):G.VyI.log("%c Image create failed to apply tint "+typeof this._initialTint,G.$bb.Error,"color: #FF0000; background: #000;")}setAnchor(k,B){this._sprite.anchor.set(k,B)}tint(k){this.sprite?this._sprite.tint=k:this._initialTint=`#${k.toString(16)}`}setScale(k,B){this._sprite.scale.set(k,B)}getScale(){return this._sprite.scale}setAlpha(k){this.sprite?this._sprite.alpha=k:this._initialAlpha=k}getWorld(){return this._sprite.world}getWidth(){return this._sprite.width}getHeight(){return this._sprite.height}getEvents(){return this._sprite.events}setInputEnabled(k=!0){this._sprite.inputEnabled=k}enableDragging(k,B,U,F){this._sprite.inputEnabled&&(this._sprite.input.enableDrag(k,B),G.Aq$.isDefined(U)&&G.Aq$.isDefined(F)&&this._sprite.input.enableSnap(U,F))}disableDragging(){this._sprite.input.disableDrag()}getBounds(){const k=this._sprite.getBounds();return new G.M_G(k.x,k.y,k.width,k.height)}resetToOrigin(){this._sprite.position.set(0,0)}setAsset(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){if(this._isLoaded=!1,this._currentAtlas=k,this._currentFrame=B,this.onAssetSet.dispatch(),this._sprite){this._targetSource=k,this._targetFrame=B;const U=this.getAssetLoader();if(!U.isLoaded(k,$.i.Image))return yield U.loadAssets([k]),void(k===this._targetSource&&!this._sprite._destroyed&&U.isLoaded(k,$.i.Image)&&(yield this.setAsset(k,this._targetFrame)));this._sprite.key!==k?(this._sprite.loadTexture(k,B),this._isLoaded=!0,this.resizeOnLoad&&this.sizeToSourceImage(),this.onLoaded.dispatch()):B?this.setFrameName(B):this._alwaysDispatchOnLoaded&&this.onLoaded.dispatch(),this.sprite.name||(this.sprite.name=`${k}/${B}`)}else this._initialAtlas=k,this._initialFrame=B;this.updateSmooth()}))}getInputHandler(){return this._sprite.input}hasUniqueInstance(){return!0}setAngle(k){this._sprite.angle=k}setFrame(k){this._sprite.frame=k}sizeToSourceImage(){const k=this.gameObject.transform;if(!(k instanceof G.XVE))return;k.fullWidth=this._sprite.width,k.fullHeight=this._sprite.height;const B=this.gameObject.parent.transform;if(this.resizeLimitedToParentSize&&B instanceof G.XVE){const U=B.fullWidth>B.fullHeight?B.worldScale.x*k.fullWidth/B.fullWidth:B.worldScale.y*k.fullHeight/B.fullHeight;U>1&&(k.fullWidth/=U,k.fullHeight/=U)}}setFrameName(k){this._sprite&&G.Aq$.isDefined(this._sprite.key)?this._sprite.frameName=k:(this._initialFrame=k,this._targetFrame=k),this._currentFrame=k}getImageKey(){return this._currentAtlas}getFrame(){return this._currentFrame}destroy(){null!==this._sprite&&this._sprite.destroy(),this.onLoaded.dispose(),this.onAssetSet.dispose(),super.destroy()}getDimensions(){return!this._sprite||this._sprite[H.k.DESTROYED]?(G.VyI.log("Cannot get dimensions, sprite has been destroyed.",G.$bb.Error),new G.or0(0,0)):new G.or0(this._sprite.width,this._sprite.height)}getAssetLoader(){var k;return this.GameObject&&null!==(k=this.assetLoader)&&void 0!==k?k:j.q.instance.prodigy.gameContainer.get(G.t5G.AssetLoader)}};(0,F.Cg)([(0,G.Cdj)(G.t5G.AssetLoader),(0,F.Sn)("design:type",Object)],W.prototype,"assetLoader",void 0),(0,F.Cg)([(0,G.Bak)(),(0,G.W_S)(),(0,G.Lr6)(0),(0,G.nKb)("atlas"),(0,F.Sn)("design:type",String)],W.prototype,"_initialAtlas",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.Lr6)(0),(0,G.nKb)("frame"),(0,F.Sn)("design:type",String)],W.prototype,"_initialFrame",void 0),(0,F.Cg)([(0,G.g11)(),(0,G.Lr6)(0),(0,G.nKb)("alpha"),(0,F.Sn)("design:type",Number)],W.prototype,"_initialAlpha",void 0),(0,F.Cg)([(0,G.iEU)(),(0,G.Lr6)(0),(0,G.nKb)("tint"),(0,F.Sn)("design:type",Object)],W.prototype,"_initialTint",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],W.prototype,"resizeOnLoad",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],W.prototype,"resizeLimitedToParentSize",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],W.prototype,"onLoaded",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],W.prototype,"onAssetSet",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],W.prototype,"_alwaysDispatchOnLoaded",void 0),W=(0,F.Cg)([(0,G.EVk)("Image",V.Y.root)],W)},38042:(k,B,U)=>{"use strict";U.d(B,{p:()=>j});var F=U(62459),G=U(34603);class j extends F.uAl{constructor(){super(...arguments),this.onComplete=new F.HN0,this.onLoop=new F.HN0,this.currentAnimation=null}get OnAnimationComplete(){return this.onComplete}playAnimation(k,B,U){const F=this.GameObject.findComponent(G._);if(null!==F){const G=F.sprite;if(!G.key)return void F.OnLoaded.addOnce(this.playAnimation,this,-Number.MAX_SAFE_INTEGER,k,B);const j=G.animations.getAnimation(this.currentAnimation);null!==j&&(j.onComplete.removeAll(this),j.onLoop.removeAll(this));const $=G.animations.getAnimation(k);$?($.onComplete.removeAll(this),$.onComplete.addOnce((()=>{this.onComplete.dispatch()}),this),$.onLoop.removeAll(this),$.onLoop.add((()=>{this.onLoop.dispatch($.loopCount)}),this),G.animations.play(k,U,B),this.currentAnimation=k):this.onComplete.dispatch()}}stopAnimation(){const k=this.GameObject.findComponent(G._);null!==k&&k.sprite.animations.stop()}createAnimationSequence(k,B,U,F){const j=this.GameObject.findComponent(G._);null!==j&&j.sprite.animations.add(k,B,U,F,!0)}destroy(){const k=this.GameObject.findComponent(G._);if(null==k?void 0:k.sprite){const B=k.sprite.animations.getAnimation(this.currentAnimation);B&&(B.onComplete.removeAll(this),B.onLoop.removeAll(this))}this.onComplete.dispose(),this.onLoop.dispose(),super.destroy()}}},84246:(k,B,U)=>{"use strict";U.d(B,{j:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(92150);class H extends G.uAl{constructor(){super(...arguments),this._baseGameObject=null,this._anchorCorrectionOffsetX=0,this._anchorCorrectionOffsetY=0}initialize(k){if(this._baseGameObject.legacyTransform.group.children.length<=1)return;const B=this._baseGameObject.legacyTransform.group.getChildAt(1).exists;B||(this._baseGameObject.legacyTransform.group.getChildAt(1).exists=!0);const U=this._baseGameObject.legacyTransform.x,F=this._baseGameObject.legacyTransform.y;this._baseGameObject.legacyTransform.x-=this._baseGameObject.legacyTransform.group.getGlobalPosition().x-this._anchorCorrectionOffsetX,this._baseGameObject.legacyTransform.y-=this._baseGameObject.legacyTransform.group.getGlobalPosition().y-this._anchorCorrectionOffsetY,this._baseGameObject.legacyTransform.group.updateTransform(),this._bmd=j.q.instance.game.add.bitmapData(this._baseGameObject.legacyTransform.width,this._baseGameObject.legacyTransform.height),this._bmd.drawGroup(this._baseGameObject.legacyTransform.group),this._bmd.update(),this._bmdWidth=Math.floor(this._bmd.width),this._bmdHeight=Math.floor(this._bmd.height);const G=this._bmd.renderTarget.context.getImageData(0,0,this._bmdWidth,this._bmdHeight);this.applyEffect(G),this._bmd.renderTarget.context.putImageData(G,0,0),this._bmd.generateTexture(k,(B=>{var U,F;if(!(null===(F=null===(U=this.GameObject)||void 0===U?void 0:U.legacyTransform)||void 0===F?void 0:F.group))return;const G=new $._(j.q.instance.game,0,0,void 0,void 0,B);G.name=k,this.GameObject.legacyTransform.group.addChild(G)}),this),this._baseGameObject.legacyTransform.x=U,this._baseGameObject.legacyTransform.y=F,this._baseGameObject.legacyTransform.group.updateTransform(),B||(this._baseGameObject.legacyTransform.group.getChildAt(1).exists=!1)}destroy(){this._bmd&&(this._bmd.clear(),this._bmd.destroy()),this._bmd=null,super.destroy()}}(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],H.prototype,"_baseGameObject",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_anchorCorrectionOffsetX",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_anchorCorrectionOffsetY",void 0)},52156:(k,B,U)=>{"use strict";U.d(B,{X:()=>Z});var F,G=U(8674),j=U(62459),$=U(54300),H=U(88022),V=U(99625),W=U(36648),q=U(91207),K=U(77938),z=U(68152),Y=U(19690),Q=U(28152),X=U(34603);let Z=F=class extends j.uAl{constructor(){super(...arguments),this._targetImage=null,this._itemID=null,this._itemType=null,this._assetKey=null,this._updateTransformOnLoad=!0,this._onItemDataLoaded=new j.HN0}get onItemDataLoaded(){return this._onItemDataLoaded}get isLoaded(){var k,B;return null!==(B=null===(k=this._targetImage)||void 0===k?void 0:k.isLoaded)&&void 0!==B&&B}get assetID(){return this._itemID}create(){super.create(),this._updateTransformOnLoad&&this._targetImage.OnLoaded.add(this.updateOffset,this),"gold"===this._itemType&&(this._itemType="currency",this._itemID=1),this._targetImage&&this._itemType&&this._itemID&&this.updateTargetImage().catch(j.RQr.createHandler("Unable to load image"))}destroy(){var k;null===(k=this._loadSpineEffectIconPromise)||void 0===k||k.cancel(),this._updateTransformOnLoad&&this._targetImage.OnLoaded.remove(this.updateOffset,this),this._targetImage=null,this._onItemDataLoaded.dispose(),super.destroy()}setItem(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(!(null==k?void 0:k.ID))throw new Error("Item ID is not defined");yield this.setAsset(k.ID,k.type)}))}setAsset(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=null,U=null){(k!==this._itemID||j.Aq$.isDefined(B)&&B!==this._itemType||j.Aq$.isDefined(U)&&U!==this._assetKey)&&(this._itemID=k,j.Aq$.isDefined(B)&&(this._itemType=B),j.Aq$.isDefined(U)&&(this._assetKey=U),yield this.updateTargetImage())}))}updateTargetImage(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=yield K.t.secureGetItem(this._itemType,this._itemID);(0,z.v)(null!==B,`Item was not found for ${this._itemType}-${this._itemID}`);const U=F.createImageLoadData(B,this._assetKey);this.addItemEffects(B);try{yield null===(k=this._targetImage)||void 0===k?void 0:k.setAsset(U.source,U.frame)}catch(G){j.RQr.logError(G,"Error loading image from item")}this._onItemDataLoaded.dispatch()}))}addItemEffects(k){var B,U,F;this._targetImage&&(null===(B=this._effectIcon)||void 0===B||B.destroy(),j.Aq$.isDefined(null===(F=null===(U=k.data)||void 0===U?void 0:U.effect)||void 0===F?void 0:F.transform)&&(j.Aq$.isDefined(this._loadSpineEffectIconPromise)&&this._loadSpineEffectIconPromise.cancel(),this._loadSpineEffectIconPromise=(0,Y.Ks)().loadWithDependenciesFromGUID(V.l.MorphMarbleIconSpine),this._loadSpineEffectIconPromise.then((k=>{var B,U;const F=null===(B=K.t.getItem(this._itemType,this._itemID))||void 0===B?void 0:B.data;this._effectIcon=k,this.gameObject&&(null===(U=null==F?void 0:F.effect)||void 0===U?void 0:U.transform)?this.gameObject.addChild(this._effectIcon):k.destroy()})).catch(j.RQr.createHandler("Error loading item effect icon spine"))))}removeItemEffects(){var k,B;null===(k=this._effectIcon)||void 0===k||k.destroy(),(null===(B=this.gameObject)||void 0===B?void 0:B.children)&&(this.gameObject.children.length=0)}updateOffset(){const k=this._targetImage.getDimensions();this._targetImage.GameObject.transform instanceof j.XVE?(this._targetImage.GameObject.transform.setSizeDelta(k.width,k.height),this._targetImage.GameObject.transform.anchoredPivotOffset=new j.I9Y(-k.getHalfWidth(),-k.height)):this._targetImage.GameObject.transform.setPosition(-k.getHalfWidth(),-k.height)}static createImageAssetSourceName(k,B,U="default"){var F,G;const j=`Icon_${k}_${B}`,H=q.P[j];return H||(null!==(G=null!==(F=W.q[j])&&void 0!==F?F:$.p[`${k}-${B}`])&&void 0!==G?G:`${U}-${k}-${B}`)}static createImageLoadData(k,B){var U,G,$,V,W,K,z;const Y=null===(G=null===(U=k.metadata)||void 0===U?void 0:U.assets)||void 0===G?void 0:G[B];if(null==Y?void 0:Y.atlas)return{source:Y.atlas,frame:Y.frame};switch(k.type){case"gold":return{source:q.E.getIconForType("currency",1)};case"eyeColor":case"skinColor":return{source:H._.General_icons_json,frame:"empty"};case"mathTownInterior":return{source:H._.Towertown_interiors_store_json,frame:k.data.tag};case"mathTownFrame":return{source:H._.Towertown_frames_store_json,frame:k.data.tag};case"mathTownDecor":return{source:q.E.getTowerTownIcon(k.data.tag)};case"item":if(j.Aq$.isDefined(null===($=k.data.effect)||void 0===$?void 0:$.transform))return{source:q.E.getIconForType(k.data.effect.transform,k.data.effect.ID)};break;case"boots":case"hat":case"weapon":case"follow":case"outfit":case"dorm":case"hairColor":case"costume":if(!j.Aq$.isDefined(B))return{source:q.E.getIconForType(k.type,k.ID)};break;case"pet":if("spritesheet"===(null===(V=k.data)||void 0===V?void 0:V.assetType)||"spritesheet"===(null===(z=null===(K=null===(W=k.metadata)||void 0===W?void 0:W.assets)||void 0===K?void 0:K.reduced)||void 0===z?void 0:z.type))return{source:`${B}-${k.type}-${k.ID}`};break;case"currency":if(27===k.ID&&"upscaled"===B)return{source:H._.Ui_battle_pass_ultimate_json,frame:"magicoin-pile"}}return{source:F.createImageAssetSourceName(k.type,k.ID,B)}}};(0,G.Cg)([(0,j.MnK)(X._),(0,G.Sn)("design:type",X._)],Z.prototype,"_targetImage",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Z.prototype,"_itemID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Z.prototype,"_itemType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Z.prototype,"_assetKey",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Z.prototype,"_updateTransformOnLoad",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Z.prototype,"_onItemDataLoaded",void 0),Z=F=(0,G.Cg)([(0,j.EVk)("ImageItemDataLoader",Q.Y.data)],Z)},79979:(k,B,U)=>{"use strict";U.d(B,{Y:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(92150);let H=class extends G.y4o{constructor(){super(...arguments),this._image=null,this._atlas="",this._frame="",this._uniformScale=1}create(){super.create(),this._group=j.q.instance.prodigy.create.group(void 0,"ImagePlaceholder",!1),this.setRootContainer(this._group),this._atlas&&(this._image=new $._(j.q.instance.game,0,0,this._atlas,this._frame),this._image.scale.set(this._uniformScale,this._uniformScale),this._group.addChild(this._image))}changeImage(k,B,U){var F;null===(F=this._image)||void 0===F||F.destroy(),this._image=new $._(j.q.instance.game,0,0,void 0,void 0,k);const H=!!G.Aq$.isDefined(U)&&U,V=G.Aq$.isDefined(B)?B:1;this._image.scale.set(H?-V:V,V),this._group.addChild(this._image)}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"_atlas",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"_frame",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_uniformScale",void 0),H=(0,F.Cg)([(0,G.EVk)("ImagePlaceholder")],H)},38181:(k,B,U)=>{"use strict";U.d(B,{S:()=>z});var F=U(8674),G=U(62459),j=U(68910),$=U(35120),H=U(60881),V=U(11472),W=U(43846),q=U(7259),K=U(28152);let z=class extends G.y4o{constructor(){super(...arguments),this._id="",this._placeholder="",this._tabindex=0,this._showPasswordByDefault=!1,this._newPassword=!1,this._clearable=!1,this._backgroundColor=null,this._borderRadius=null,this._fontFamily=null,this._showInputPromptOnAndroid=!0,this._enablePerKeyEvents=!1,this._input=document.createElement("input"),this._eye=document.createElement("i"),this._check=document.createElement("check"),this._eyeEnabled=!1,this._checkEnabled=!1,this._clearContainer=null,this._clearIcon=document.createElement("i"),this._clearText=document.createElement("div"),this._canvas=null,this._style={},this.onTextChanged=new G.HN0,this.onFocusChanged=new G.HN0,this.onBlur=new G.HN0,this._onTogglePasswordShowHide=new G.HN0,this.onClear=new G.HN0,this._clearContainerVisible=!1,this._showPrompt=!1,this._previousTextValue=""}get id(){return this._id?this._id:null}get text(){return this._input?this._input.value:null}set text(k){this._input&&(this._previousTextValue=this._input.value,this._input.value=k,this._previousTextValue!==k&&this._onTextChangedHandler(null))}get htmlInputElement(){return this._input}get onTogglePasswordShowHide(){return this._onTogglePasswordShowHide}create(){super.create();const k=new j.Container;k.on("destroyed",this.destroy,this),this.setRootContainer(k),this._input.value="",this._input.id=this._id,this._input.className="game-input",this._input.autocapitalize="off",this._input.autocomplete="off",this._input.tabIndex=this._tabindex,this._input.placeholder=G.Aq$.isDefined(this._placeholder)?$.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(this._placeholder):"",this._type&&(this._input.type=this._type),G.Aq$.isDefined(this._backgroundColor)&&(this._input.style.backgroundColor=`#${this._backgroundColor}`),G.Aq$.isDefined(this._borderRadius)&&(this._input.style.borderRadius=`${this._borderRadius}px`),G.Aq$.isDefined(this._fontFamily)&&(this._input.style.fontFamily=this._fontFamily);document.getElementById("external-ui").appendChild(this._input);"password"===this._type&&this._clearable&&G.VyI.log("This input field is set as both a password field and as clearable. Due to padding issues, the clear button will not be displayed.",G.$bb.Warning),"password"===this._type?(this.createEye(),this._showPasswordByDefault&&this._onEyeClicked()):this._clearable&&this.createClear(),G.o5U.isAndroid()&&(this._showPrompt=this._showInputPromptOnAndroid),this.applyTransform(),this.addListeners(),this.enablePerKeyEvents(this._enablePerKeyEvents)}createEye(){if(!this._eyeEnabled){this._eyeEnabled=!0,this._showPasswordByDefault?this._eye.className="fa fa-eye":this._eye.className="fa fa-eye-slash",this._eye.id=`${this._id}eye`,this._eye.style.position="absolute",this._eye.style.left="0px",this._eye.style.top="0px",this._eye.style.fontSize="25px",this._eye.style.color="#363636";document.getElementById("external-ui").appendChild(this._eye);this._onEyeClicked=()=>{this.togglePasswordShowHide(),this._onTogglePasswordShowHide.dispatch()},this._eye.addEventListener("click",this._onEyeClicked)}}createCheck(){if(!this._checkEnabled){this._checkEnabled=!0,this._check.className="fa fa-check-circle",this._check.id=`${this._id}check`,this._check.style.position="absolute",this._check.style.left="0px",this._check.style.top="0px",this._check.style.fontSize="25px",this._check.style.color="#A5C754";document.getElementById("external-ui").appendChild(this._check)}}setDisabled(k){this._input.disabled=k,this._input.style.backgroundColor=k?"#F0F0F0":"#FFFFFF"}setInError(k){if(this._input.style.backgroundColor=k?"#FEC4C4":"#FFFFFF",this._input.style.border=k?"1px solid #E03E3E":"1px solid #363636",this._input.style.outline=k?"none":"",this._checkEnabled){const k=document.getElementById(`${this._id}check`);G.Aq$.isDefined(k)&&k.remove(),this._checkEnabled=!1}}setValid(k){this._input.style.backgroundColor=k?"#F2F7E8":"#FFFFFF",this._input.style.border=k?"1px solid #6B9F27":"1px solid #363636",this._input.style.outline=k?"none":"",this.createCheck()}setClearContainerVisibility(k){this._clearContainer&&(this._clearContainerVisible=k,this._clearContainer.style.display=this._clearContainerVisible?"flex":"none")}createClear(){this._clearContainer=document.createElement("div"),this._clearContainer.appendChild(this._clearIcon),this._clearContainer.appendChild(this._clearText),this._clearIcon.className="fa fa-times",this._clearText.innerText=(0,W.k)("INPUT_CLEAR"),G.Aq$.isDefined(this._fontFamily)&&(this._clearText.style.fontFamily=this._fontFamily),this._clearContainer.id=`${this._id}clear`,this._clearContainer.style.display="none",this._clearContainer.style.position="absolute",this._clearContainer.style.left="0px",this._clearContainer.style.top="0px",this._clearContainer.style.fontSize="25px",this._clearContainer.style.color="#363636",this._clearContainer.style.cursor="pointer",this.setClearContainerVisibility(!1);document.getElementById("external-ui").appendChild(this._clearContainer);this._onClearClicked=()=>{this.text="",this.setClearContainerVisibility(!1),this.onClear.dispatch()},this._clearContainer.addEventListener("click",this._onClearClicked)}togglePasswordShowHide(){this._eyeEnabled&&("password"===this._type?(this.setType("text"),this._eye.className="fa fa-eye"):(this.setType("password"),this._eye.className="fa fa-eye-slash"))}addListeners(){this._onTextChangedHandler=k=>{this.setClearContainerVisibility(""!==this.text),this.onTextChanged.dispatch(this.text)},this._onFocusHandler=k=>{if(this._showPrompt)return k.preventDefault(),k.stopImmediatePropagation(),void this._input.blur();this.handleFocusChanged(!0),this.onFocusChanged.dispatch()},this._onBlurHandler=k=>{if(this._showPrompt)return k.preventDefault(),void k.stopImmediatePropagation();this.handleFocusChanged(!1),this.onBlur.dispatch()},this._onClickHandler=k=>(0,F.sH)(this,void 0,void 0,(function*(){this._input.blur();const k=yield q.y.showPrompt(this._placeholder,this.text);G.Aq$.isDefined(k)&&(this.text=k,this.setClearContainerVisibility(""!==this.text),this.onTextChanged.dispatch(this.text))})),this._showPrompt&&this._input.addEventListener("click",this._onClickHandler),this._input.addEventListener("focus",this._onFocusHandler),this._input.addEventListener("blur",this._onBlurHandler),this.gameObject.onActiveInHierarchyChanged.add((()=>{this.setVisible(this.gameObject.activeInHierarchy)}),this)}getPositionRelativeToParent(k){const B=k,U={x:0,y:0};return B.transform instanceof G.XVE?(U.x=B.transform.worldMatrix.tx-B.transform.sizeDelta.width*B.transform.pivot.x,U.y=B.transform.worldMatrix.ty-B.transform.sizeDelta.height*B.transform.pivot.y):B.legacyTransform?(U.x+=B.legacyTransform.group.worldTransform.tx,U.y+=B.legacyTransform.group.worldTransform.ty):G.VyI.log("The GameObject needs to have a RectTransform or LegacyTransform attached to it in order to size the input field appropriately.",G.$bb.Error),U}applyTransform(){let k,B;this.GameObject.transform instanceof G.XVE?(k=this.GameObject.transform.sizeDelta.width,B=this.GameObject.transform.sizeDelta.height):this.GameObject.legacyTransform?(k=this.GameObject.legacyTransform.width,B=this.GameObject.legacyTransform.height):G.VyI.log("The GameObject needs to have a RectTransform or LegacyTransform attached to it in order to size the input field appropriately.",G.$bb.Error);const{x:U,y:F}=this.getPositionRelativeToParent(this.GameObject);this._canvas||(this._canvas=document.getElementById("game-container").getElementsByTagName("canvas")[0]);const j=this._canvas.clientHeight/$.q.instance.game.world.height;this._input.style.height=j*B+"px";const H=this._canvas.clientWidth/$.q.instance.game.world.width;this._input.style.width=H*k+"px";const W=j*F+(this._input.style.marginTop?parseInt(this._input.style.marginTop):0),q=H*U+(this._input.style.marginLeft?parseInt(this._input.style.marginLeft):0),K=j*B*.5;this.setStyle("top",`${W}px`),this.setStyle("left",`${q}px`),this.setStyle("font-size",`${K}px`);const z=this.GameObject.findComponentInParent(V.B),Y=null==z?void 0:z.getCollisionBox();let Q=!1;if(Y&&(FY.worldTransform.ty+Y.height||UY.worldTransform.tx+Y.width?(this.setStyle("display","none"),Q=!0):this.setStyle("display","unset")),this._eyeEnabled&&(this._eye.style.top=`${W+.2*parseInt(this._input.style.height)}px`,this._eye.style.left=(this._checkEnabled?q-35:q)+.95*parseInt(this._input.style.width)-K+"px",this._eye.style.fontSize=`${K}px`,this.setStyle("padding-right",`${K+5+.05*parseInt(this._input.style.width)}px`)),this._checkEnabled&&(this._check.style.top=`${W+.2*parseInt(this._input.style.height)}px`,this._check.style.left=q+.95*parseInt(this._input.style.width)-K+"px",this._check.style.fontSize=`${K}px`,this.setStyle("padding-right",`${K+5+.05*parseInt(this._input.style.width)}px`)),this._clearContainer){this._clearContainer.style.display=this._clearContainerVisible&&!Q?"flex":"none",this._clearContainer.style.top=`${W+.25*parseInt(this._input.style.height)}px`,this._clearContainer.style.fontSize=.7*K+"px";const k=this._clearContainer.clientWidth+4;this._clearContainer.style.left=q+parseInt(this._input.style.width)-k+"px",this._clearIcon.style.paddingTop=.09*parseInt(this._input.style.height)+"px",this._clearIcon.style.paddingRight=.015*parseInt(this._input.style.width)+"px",this.setStyle("padding-right",`${k}px`)}if(G.Aq$.isDefined(this._style))for(const G in this._style)this._style.hasOwnProperty(G)&&this.setStyle(G,this._style[G])}setVisible(k){k?(this._input.type=this._type,""!==this.text&&this.setClearContainerVisibility(k)):(this._input.type="hidden",this.setClearContainerVisibility(k))}setOpacity(k){this.setStyle("opacity",k),this._eyeEnabled&&(this._eye.style.opacity=k),this._checkEnabled&&(this._check.style.opacity=k),this._clearContainer&&(this._clearContainer.style.opacity=k)}setStyle(k,B){this._input.style.setProperty(k,B)}setType(k){G.Aq$.isDefined(k)&&(this._type=k,this._input.type=this._type)}getType(){return this._type}setTypeToPassword(){"password"!==this._type&&"text"!==this._type&&(this._type="password",this._input.type=this._type,this.createEye(),this._showPasswordByDefault&&this._onEyeClicked())}enablePerKeyEvents(k){k?this._input.addEventListener("keyup",this._onTextChangedHandler):this._input.removeEventListener("keyup",this._onTextChangedHandler)}handleFocusChanged(k){k?$.q.instance.game.input.keyboard.clearCaptures():$.q.instance.game.input.keyboard.addKeyCapture([H.D.BACKSPACE])}removeExisting(){var k;const B=document.getElementById(this._id);if(G.Aq$.isDefined(B)&&!this._newPassword&&B.remove(),this._eyeEnabled){const k=document.getElementById(`${this._id}eye`);G.Aq$.isDefined(k)&&k.remove()}if(this._checkEnabled){const k=document.getElementById(`${this._id}check`);G.Aq$.isDefined(k)&&k.remove()}null===(k=this._clearContainer)||void 0===k||k.remove()}getDimensions(){return this.GameObject.transform instanceof G.XVE?new G.or0(this.GameObject.transform.sizeDelta.width,this.GameObject.transform.sizeDelta.height):this.GameObject.legacyTransform?new G.or0(this.GameObject.legacyTransform.width,this.GameObject.legacyTransform.height):new G.or0(100,100)}update(){super.update(),this.applyTransform()}destroy(){var k;super.destroy(),this.onTextChanged.dispose(),this.onFocusChanged.dispose(),this.onBlur.dispose(),this._onTogglePasswordShowHide.dispose(),this.onClear.dispose(),this._input.removeEventListener("keyup",this._onTextChangedHandler),this._input.removeEventListener("click",this._onClickHandler),this._input.removeEventListener("focus",this._onFocusHandler),this._input.removeEventListener("blur",this._onBlurHandler),null===(k=this.gameObject)||void 0===k||k.onActiveInHierarchyChanged.removeAll(this),this._onTextChangedHandler=null,this._onClickHandler=null,this._onFocusHandler=null,this._onBlurHandler=null,this._eyeEnabled&&(this._onEyeClicked=null,this._eye.removeEventListener("click",this._onEyeClicked)),this._clearContainer&&(this._onClearClicked=null,this._clearContainer.removeEventListener("click",this._onClearClicked)),this.removeExisting()}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],z.prototype,"_type",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.Lr6)(0),(0,G.nKb)("name"),(0,F.Sn)("design:type",String)],z.prototype,"_id",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],z.prototype,"_placeholder",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_tabindex",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],z.prototype,"_showPasswordByDefault",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],z.prototype,"_newPassword",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],z.prototype,"_clearable",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],z.prototype,"_backgroundColor",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_borderRadius",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],z.prototype,"_fontFamily",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],z.prototype,"_showInputPromptOnAndroid",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],z.prototype,"_enablePerKeyEvents",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],z.prototype,"onTextChanged",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],z.prototype,"onFocusChanged",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],z.prototype,"onClear",void 0),z=(0,F.Cg)([(0,G.EVk)("InputText",K.Y.uiInput)],z)},63746:(k,B,U)=>{"use strict";U.d(B,{Z:()=>J});var F=U(8674),G=U(62459),j=U(68910),$=U(17446),H=U(35120),V=U(77938),W=U(24110),q=U(53661),K=U(30226),z=U(28152),Y=U(35084),Q=U(52156),X=U(72799);const Z=["eyeColor","hairColor","skinColor"];let J=class extends G.uAl{constructor(){super(...arguments),this._rarityBackgrounds=[],this._rarityCounters=[],this.initializeOnPostCreate=!0,this._onClickReference=void 0}get itemCardData(){return this._itemCardData}get itemData(){return this._itemData}postCreate(){super.postCreate(),this.initializeOnPostCreate&&this.initializeItemCard(this.getInjectedValue(q.Tl.Data),this.getInjectedValue(q.Tl.OnClick))}destroy(){this._onClickReference&&(this._inputOverlay.onClicked.remove(this._onClickReference,this),this._onClickReference=void 0),super.destroy()}initializeItemCard(k,B){this.resetItemCard(),this._itemCardData=k,k?V.t.secureGetItem(k.type,k.id).then((U=>{var F,V,W;if(!this.GameObject.isDestroyed&&(null===(F=this._itemCardData)||void 0===F?void 0:F.id)===(null==k?void 0:k.id)&&(null===(V=this._itemCardData)||void 0===V?void 0:V.type)===(null==k?void 0:k.type)&&U.data){if(this._itemData=U.data,this._rarityBackgrounds[null!==(W=this._itemData.rarity)&&void 0!==W?W:0].active=!0,this._itemNameText.text=K.J.getItemName(U),this._itemData.rarity===$.E.Rare||this._itemData.rarity===$.E.Heroic?this._itemNameText.fill=j.Color.shared.setValue(16777215).toHex():this._itemNameText.fill=j.Color.shared.setValue(3552822).toHex(),this._equippedIcon.active=this._currentPlayer.player.equipment.hasItemEquipped(k.type,k.id),this._memberIcon.active=!!this._itemData.member,this.handleRarityCounters(),"costume"===k.type)this._playerContainer.active=!0,this._imageItemDataLoader.GameObject.active=!1,this._renderPlayerAsTextureComponent.renderPlayerAsTexture(Object.assign(Object.assign({},this._currentPlayer.getAppearance()),{costume:k.id}));else if(Z.includes(k.type)){this._playerContainer.active=!1,this._imageItemDataLoader.GameObject.active=!1;H.q.instance.prodigy.icon.createFromData(U).setParent(this._itemImageSortingAnchor.getRootContainer())}else this._imageItemDataLoader.removeItemEffects(),this._imageItemDataLoader.setAsset(k.id,k.type).catch(G.RQr.createHandler("ItemCardComponent: Failed to load the icon for the item card")),this._playerContainer.active=!1,this._imageItemDataLoader.GameObject.active=!0;this._onClickReference=null!=B?B:void 0,this._onClickReference&&this._inputOverlay.onClicked.add(this._onClickReference,this),this._inputOverlay.useHandCursor=!!B}})).catch((()=>{this.setCardState(!0)})):this.setCardState(!0)}resetItemCard(){this.setCardState(!1),this._rarityBackgrounds.forEach((k=>{k.active=!1})),this._equippedIcon.active=!1,this._memberIcon.active=!1,this._onClickReference&&(this._inputOverlay.onClicked.remove(this._onClickReference,this),this._onClickReference=void 0)}handleRarityCounters(){var k,B,U;if(!G.Aq$.isDefined(this._itemCardData.N)||1===this._itemCardData.N)return void(this._rarityCounters[null!==(k=this._itemData.rarity)&&void 0!==k?k:0].active=!1);this._rarityCounters[null!==(B=this._itemData.rarity)&&void 0!==B?B:0].active=!0;const F=this._rarityCounters[null!==(U=this._itemData.rarity)&&void 0!==U?U:0].findComponentInChildren(G.EYj);this._itemCardData.receivedThroughGotItemFlow&&(F.fontSize=24,F.font=G.dBt.PaytoneOne),F.text=`${this._itemCardData.receivedThroughGotItemFlow?"x":""}${this._itemCardData.N}${this._itemCardData.max?`/${this._itemCardData.max}`:""}`}setCardState(k){this._nonEmptyState.active=!k,this._emptyState.active=k}setNewNotificationBadgeVisibility(k){this._newNotificationBadge.active=k}setEquippedIconVisibility(k){this._equippedIcon.active=k}};(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",Function)],J.prototype,"_currentPlayer",void 0),(0,F.Cg)([(0,G.MnK)(Q.X),(0,F.Sn)("design:type",Q.X)],J.prototype,"_imageItemDataLoader",void 0),(0,F.Cg)([(0,G.MnK)(W.B),(0,F.Sn)("design:type",W.B)],J.prototype,"_itemImageSortingAnchor",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],J.prototype,"_itemNameText",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],J.prototype,"_rarityBackgrounds",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],J.prototype,"_rarityCounters",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_memberIcon",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_equippedIcon",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"revealOverlay",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_nonEmptyState",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_emptyState",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_playerContainer",void 0),(0,F.Cg)([(0,G.MnK)(X.M),(0,F.Sn)("design:type",X.M)],J.prototype,"_renderPlayerAsTextureComponent",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_newNotificationBadge",void 0),(0,F.Cg)([(0,G.MnK)(Y.n),(0,F.Sn)("design:type",Y.n)],J.prototype,"_inputOverlay",void 0),J=(0,F.Cg)([(0,G.EVk)("Item Card",z.Y.ui)],J)},85540:(k,B,U)=>{"use strict";U.d(B,{r:()=>W,w:()=>V});var F=U(58776),G=U(15821),j=U(35120),$=U(64868),H=U(10711);function V(k){var B,U;const F=k.item;if(G.A.isDefined(k.dynamicStoreData)&&$._.isFeatureEnabled()){return W(k)===(null!==(U=null===(B=k.dynamicStoreData)||void 0===B?void 0:B.itemQuantity)&&void 0!==U?U:1)}const H=j.q.instance.game.rootContainer.get("e20-0fb0");return!(!H||!F)&&H.player.isItemOwned({type:F.type,ID:F.ID})}function W(k){var B,U,G,j;const $=null!==(U=null===(B=k.dynamicStoreData)||void 0===B?void 0:B.offers)&&void 0!==U?U:[];let V=0;if($.length>1)$.forEach((k=>{k.progress.status===F.t.COMPLETE&&V++}));else{const k=$[0].progress,B=(0,H.Nx)($[0]);V=k.status===F.t.COMPLETE?B:null!==(j=null===(G=k.data)||void 0===G?void 0:G.timesCompleted)&&void 0!==j?j:0}return V}},14801:(k,B,U)=>{"use strict";U.d(B,{m:()=>Ot});var F,G=U(8674),j=U(62459),$=U(36648),H=U(56942),V=U(12049),W=U(17446),q=U(66582),K=U(35120),z=U(1195),Y=U(77938),Q=U(66207),X=U(73797),Z=U(65050),J=U(41674),tt=U(67665),et=U(15485),it=U(46784),st=U(24110),nt=U(19633),at=U(64353),rt=U(95057),ot=U(25317),ht=U(21097),ct=U(21418),dt=U(98252),lt=U(44094),ut=U(30226),ft=U(47255),bt=U(99737),pt=U(41538),vt=U(75777),gt=U(28152),mt=U(13693),yt=U(52156),_t=U(29834),Et=U(51972);!function(k){k[k.BuyButtonIndex=0]="BuyButtonIndex",k[k.MemberBuyButtonIndex=1]="MemberBuyButtonIndex",k[k.WearButtonIndex=2]="WearButtonIndex",k[k.LockedWearButtonIndex=3]="LockedWearButtonIndex",k[k.MemberWearButtonIndex=4]="MemberWearButtonIndex",k[k.RemoveButtonIndex=5]="RemoveButtonIndex",k[k.HideButtonIndex=6]="HideButtonIndex",k[k.ShowButtonIndex=7]="ShowButtonIndex",k[k.UseButtonIndex=8]="UseButtonIndex",k[k.RideButtonIndex=9]="RideButtonIndex",k[k.EquipButtonIndex=10]="EquipButtonIndex",k[k.UpsellButtonIndex=11]="UpsellButtonIndex",k[k.TreasurePointsButtonIndex=12]="TreasurePointsButtonIndex",k[k.LockedEquipButtonIndex=13]="LockedEquipButtonIndex",k[k.MemberEquipButtonIndex=14]="MemberEquipButtonIndex"}(F||(F={}));const wt=["hat","outfit","boots","weapon","mount","spellRelic","costume"],Tt=["hair","hairColor","face","skinColor","eyeColor"],St=1.55,At={pet:1,dorm:1.25,mathTownFrame:.75,mathTownInterior:.75,mathTownDecor:.75,hair:St,hairColor:St,face:St,skinColor:St,eyeColor:St,follow:St,item:St,currency:St,spellRelic:St,weapon:St,hat:St,outfit:St,boots:St,mount:1,costume:St};var Ct;!function(k){k.WEAR="ITEM_BUTTON_WEAR",k.REMOVE="ITEM_BUTTON_REMOVE",k.RIDE="ITEM_BUTTON_RIDE",k.BUY="ITEM_BUTTON_BUY"}(Ct||(Ct={}));let Ot=class extends j.uAl{constructor(){super(),this._rarityBanners=[],this._oneLineItemNameRarityBanners=[],this._twoLineItemNameRarityBanners=[],this._stratifiedMemberTierLabelTexts=[],this._buttons=[],this._owned=!1}setup(k,B=ct.s.View,U,F){let G,$;this.hideElements(),this._mode=B,this._gearBattleStats=this._currentPlayer.player.getGearBattleStats(),this._closeCallback=U,k instanceof V.J?(G=k.getType(),$=k.getID(),this._cost=k.getCost()[0]):this.isBattlePassReward(k)?(G=k.itemDrop.type,$=k.itemDrop.ID,this._locked=k.claimable):(G=k.type,$=k.ID,j.Aq$.isDefined(k.L)&&(this._locked=1===k.L)),this._segment.featureCommon.sendInterfaceEvent({interfaceName:it.B.ItemInfo,interfaceType:J.Wm.InfoPanel,instanceType:Z.N.Interface,originType:J.$N.ButtonClick,originID:F}),Y.t.secureGetItem(G,$).then((U=>{var F,V;if(U){if(this._itemData=U,this._itemType=G,this._itemId=$,this._owned=this._currentPlayer.player.backpack.hasItem(G,$)>0,!this._itemData.data)return j.VyI.log(`ItemDetailsModalComponent: Item data is missing for item type ${G} and item id ${$}, closing the modal`,j.$bb.Error),void this.GameObject.destroyDeferred();if(!this._owned){const k=K.q.instance.prodigy.gameContainer.get("61f-37d6");this._owned=k.getCount({type:G,id:$})>0}if(j.Aq$.isDefined(this._locked)||(this._locked=1===this._itemData.data.member),this._itemDescription.text=this._localizer.getText(ut.J.getLocalizationFlavorKey(this._itemData)),this._previewContainer.transform.setScale(null!==(F=At[this._itemType])&&void 0!==F?F:1),this._memberIcon.active=1===this._itemData.data.member,this._rarity=this._itemData.data.rarity,this.isBattlePassReward(k)&&k.membershipTier===q._$.MemberUltra&&(this._rarity=5),this.setupRarity(),this.setupOptionalProperties(B),"follow"===this._itemType?this.setupFollowItem():wt.includes(this._itemType)?this.setupWearableEquipmentItem(B):Tt.includes(this._itemType)?this.setupAppearanceItem():"pet"===this._itemType?(this._spine.OnLoaded.addOnce((()=>{this._spineAnimator.playAnimation("idle",!0)}),this),this._spine.setAsset(H.Q[`Spine_pet_${this._itemId}_json`])):(null===(V=this._itemData.data.effect)||void 0===V?void 0:V.transform)?this.setupMorphMarbleItem():this.setupIcon(),B===ct.s.Buy){for(const k of this._buttons)k.GameObject.active=!1;this.setupPurchaseableItem()}else if(B===ct.s.View)for(const k of this._buttons)k.GameObject.active=!1;this.isBattlePassReward(k)&&this.setupBattlePassReward(k)}})).catch(j.RQr.createHandler(`ItemDetailsModalComponent: Failed to load item data for ${G} ${$}`))}close(k=!1){this._closeCallback&&this._closeCallback.apply(this,[k]),this.GameObject.destroyDeferred()}hideElements(){this._rarityBanners.forEach((k=>{k.active=!1})),this._oneLineItemNameRarityBanners.forEach((k=>{k.active=!1})),this._twoLineItemNameRarityBanners.forEach((k=>{k.active=!1})),this._itemName.text="",this._itemDescription.text="",this._memberIcon.active=!1,this._gearStat1.GameObject.active=!1,this._gearStat2.GameObject.active=!1,this._spellStat.GameObject.active=!1,this._costContainer.active=!1,this._levelLockContainer.active=!1,this._levelLockText.text="",this._bonusBackground.active=!1,this._buttons.forEach((k=>{k.GameObject.active=!1}))}setupRarity(){var k,B,U;if(this._itemData.data){if(this._itemName.text=ut.J.getItemName(this._itemData),this._rarityBanners.forEach((k=>k.active=!1)),this._oneLineItemNameRarityBanners.forEach((k=>k.active=!1)),this._twoLineItemNameRarityBanners.forEach((k=>k.active=!1)),this._itemName.wordWrap=!1,(null===(k=this._itemName.GameObject)||void 0===k?void 0:k.transform).sizeDelta.width<=300?this._oneLineItemNameRarityBanners[null!==(B=this._rarity)&&void 0!==B?B:W.E.Common].active=!0:(this._twoLineItemNameRarityBanners[null!==(U=this._rarity)&&void 0!==U?U:W.E.Common].active=!0,this._itemName.wordWrap=!0,this._itemName.updateText()),j.Aq$.isDefined(this._rarity)){this._rarityBanners[this._rarity].active=!0}this._rarity===W.E.Rare||this._rarity===W.E.Heroic?this._itemName.fill="#ffffff":this._itemName.fill="#363636"}}addCharacter(k=!1,B=!1,U=!1){this._characterPreview.addCharacter(this._currentPlayer.player,this._characterPreviewSortingAnchor.getRootContainer()),this._characterPreview.setInputEnabled(!1),k&&this._characterPreview.setEquipment("mount",null),B&&this._characterPreview.setEquipment("hat",null),U&&this._characterPreview.setEquipment("costume",null)}setupOptionalProperties(k){var B,U,F;if(!this._itemData)return;if(k===ct.s.Buy){this._costContainer.active=!0;let k="[mail-gold] ";const B=ut.J.getPurchasePrice(this._itemData.data,this._cost);"currency"===this._cost.getType()&&1===this._cost.getID()||(k=`[${Y.t.getItem(this._cost.getType(),this._cost.getID()).data.icon}] `),K.q.instance.prodigy.create.font(this._currencyIconSortingAnchor.getRootContainer(),0,0,k);const U=this._costContainer.findComponentInChildren(j.EYj);U&&(U.text=`${B}`)}const G=this._itemData.data.spellID;if(j.Aq$.isDefined(G)){const k=Y.t.getItem("spellV2",G);if(k){const G=null===(F=null===(U=null===(B=null==k?void 0:k.metadata)||void 0===B?void 0:B.assets)||void 0===U?void 0:U.icon)||void 0===F?void 0:F.assetKey,j=$.q[lt.$.capitalizeFirstLetter(G)];this._spellStat.setSpellStatData({name:k.data.name,iconGuid:j,element:k.data.element}),this._spellStat.GameObject.active=!0}}if(j.Aq$.isDefined(this._itemData.data.stats)&&"pet"!==this._itemType&&"spellRelic"!==this._itemType){const k={};for(const F in this._itemData.data.stats)this._itemData.data.stats[F]>0&&(k[F]=this._itemData.data.stats[F]);const B=Object.keys(k)[0],U=Object.keys(k)[1];B&&this.setupGearStatDisplay(B,this._gearStat1),U&&this.setupGearStatDisplay(U,this._gearStat2)}}setupGearStatDisplay(k,B){var U;let F=0;this._gearBattleStats[this._itemType]&&(F=null!==(U=this._gearBattleStats[this._itemType][k])&&void 0!==U?U:0),B.setGearStatData(k,this._itemData.data.stats[k],this._itemData.data.stats[k]-F),B.GameObject.active=!0}activateButton(k,B){this._buttons[k].GameObject.active=!0,this._buttons[k].onClick.add(B,this)}setupWearableEquipmentItem(k){var B,U,G,$,H,V;"spellRelic"===this._itemType?this.setupIcon():(this.addCharacter("mount"!==this._itemType,!1,!ht.Dq.includes(this._itemType)),this._characterPreview.setEquipment(this._itemType,this._itemId)),"costume"===this._itemType&&this._segment.item.sendCostumePreviewedEvent(this._itemId,ut.J.getItemName(this._itemData),null!==(U=1===(null===(B=this._itemData.data)||void 0===B?void 0:B.member))&&void 0!==U&&U,null!==(G=this._rarity)&&void 0!==G?G:W.E.Common);const q=this._currentPlayer.player,z=q.equipment.hasItemEquipped(this._itemType,this._itemId),Y=this._locked&&1===(null===($=this._itemData.data)||void 0===$?void 0:$.member),Q=q.hasMembership(),X=!j.Aq$.isDefined(null===(H=this._itemData.data)||void 0===H?void 0:H.lockLevel)||this._currentPlayer.getLevel()>=this._itemData.data.lockLevel,Z=(!Y||Q)&&X,J=(k=Ct.WEAR)=>{const B=`${this._localizer.getText(k)}-button`;this.sendButtonEvent(B),q.equip(this._itemId,this._itemType,!0,B).then((k=>{k&&(q.appearanceChanged=!0,K.q.instance.prodigy.audio.playSFX(18,"whoosh"))})).catch(j.RQr.createHandler(`ItemDetailsModalComponent:setupWearableEquipmentItem Failed to equip item ${this._itemType}-${this._itemId}`)).finally((()=>{this.close(!0)}))};z?this.activateButton(F.RemoveButtonIndex,(()=>{const k=`${this._localizer.getText(Ct.REMOVE)}-button`;this.sendButtonEvent(k),q.unEquip(this._itemId,this._itemType,k).then((k=>{k&&(q.appearanceChanged=!0,K.q.instance.prodigy.audio.playSFX(18,"blop"))})).catch(j.RQr.createHandler(`ItemDetailsModalComponent:setupWearableEquipmentItem Failed to unequip item ${this._itemType}-${this._itemId}`)).finally((()=>{this.close()}))})):k===ct.s.WizardCostumesMenu&&"costume"===this._itemType?Y&&!Q?this.activateButton(F.MemberWearButtonIndex,(()=>{this.sendButtonEvent(`${this._localizer.getText(Ct.WEAR)}-button`,it.B.MembershipParentAd),this.memberLockedEquipFlow()})):this.activateButton(F.WearButtonIndex,(()=>J(Ct.WEAR))):this._owned&&"mount"===this._itemType?this.activateButton(F.RideButtonIndex,(()=>J(Ct.RIDE))):this._owned&&Z?this.activateButton("weapon"===this._itemType?F.EquipButtonIndex:F.WearButtonIndex,(()=>J())):this._owned&&!X?(this._levelLockText.text=`Level ${null===(V=this._itemData.data)||void 0===V?void 0:V.lockLevel}`,this._levelLockContainer.active=!0,this.activateButton("weapon"===this._itemType?F.LockedEquipButtonIndex:F.LockedWearButtonIndex,(()=>{this.sendButtonEvent(`${this._localizer.getText(Ct.WEAR)}-button`),this.levelLockedEquipFlow()}))):this._owned&&Y&&!Q&&this.activateButton("weapon"===this._itemType?F.MemberEquipButtonIndex:F.MemberWearButtonIndex,(()=>{this.sendButtonEvent(`${this._localizer.getText(Ct.WEAR)}-button`,it.B.MembershipParentAd),this.memberLockedEquipFlow()}))}setupAppearanceItem(){this.addCharacter(!0,"hair"===this._itemType||"hairColor"===this._itemType,!ht.Dq.includes(this._itemType)),this._characterPreview.setAppearance(this._itemType,this._itemId)}setupIcon(){this._imageItemDataLoader.setAsset(this._itemId,this._itemType,"upscaled").catch(j.RQr.createHandler("ItemDetailsModalComponent: Failed to load item icon"))}setupFollowItem(){var k;const B=K.q.instance.prodigy.create.follow(this._spine.getRootContainer(),this._itemId,1,null),U=this._currentPlayer.player,G=this._locked&&1===(null===(k=this._itemData.data)||void 0===k?void 0:k.member),$=U.hasMembership();(B instanceof vt.i||B instanceof bt.z||B instanceof pt.g)&&B.startLoad();U.equipment.hasItemEquipped(this._itemType,this._itemId)?this.activateButton(F.RemoveButtonIndex,(()=>{this.sendButtonEvent(`${this._localizer.getText(Ct.REMOVE)}-button`),U.unEquip(this._itemId,this._itemType).then((k=>{k&&(U.appearanceChanged=!0,K.q.instance.prodigy.audio.playSFX(18,"blop"))})).catch(j.RQr.createHandler(`ItemDetailsModalComponent:setupFollowItem Failed to unequip item ${this._itemType}-${this._itemId}`)).finally((()=>{this.close()}))})):this._owned&&G&&!$?this.activateButton(F.MemberEquipButtonIndex,(()=>{this.sendButtonEvent(`${this._localizer.getText(Ct.WEAR)}-button`,it.B.MembershipParentAd),this.memberLockedEquipFlow()})):this._owned&&this.activateButton(F.EquipButtonIndex,(()=>{this.sendButtonEvent(`${this._localizer.getText(Ct.WEAR)}-button`),U.equip(this._itemId,this._itemType,!0).then((k=>{k&&(U.appearanceChanged=!0,K.q.instance.prodigy.audio.playSFX(18,"whoosh"))})).catch(j.RQr.createHandler(`ItemDetailsModalComponent:setupFollowItem Failed to equip item ${this._itemType}-${this._itemId}`)).finally((()=>{this.close()}))}))}setupMorphMarbleItem(){this.addCharacter(!0),this._characterPreview.transformEffect({transform:this._itemData.data.effect.transform,ID:this._itemData.data.effect.ID}),this.activateButton(F.UseButtonIndex,(()=>{this.sendButtonEvent(et.k.Use),this.checkTransformation()}))}setupPurchaseableItem(){const k=()=>{this.sendButtonEvent(`${this._localizer.getText(Ct.BUY)}-button`),this.close(!0)};this._itemData.data.member?this.activateButton(F.MemberBuyButtonIndex,k):this.activateButton(F.BuyButtonIndex,k)}setupBattlePassReward(k){if(k.membershipTier===q._$.MemberUltra&&(this._bonusBackground.active=!0),k.claimed||k.claimable)return;if(this._buttons.some((k=>k.GameObject.active)))return;if(this._currentPlayer.player.membershipUpsell.tier>=k.membershipTier)return;if(!Q.D.isFeatureEnabled())return;this._stratifiedMemberAvailabilityLabel.GameObject.active=!0;let B=0;switch(k.membershipTier){case q._$.MemberUltra:case q._$.MemberUltimateBundle:B=2;break;case q._$.MemberPlus:case q._$.MemberUltimateMath:B=1;break;case q._$.MemberCore:case q._$.MemberLevelUp:}const U=this._stratifiedMemberTierLabelTexts.slice(B,dt.pF.eligibleForMembershipPurchaseForMultipleTiers()?this._stratifiedMemberTierLabelTexts.length:-1).map((k=>this._localizer.getText(k))),G=U.length;1===G?this._stratifiedMemberAvailabilityLabel.text=`${U[0]} ${this._localizer.getText("ITEM_DETAILS_MEMBERSHIP_ONLY")}`:2===G?this._stratifiedMemberAvailabilityLabel.text=`${U[0]} & ${U[1]}`:G>2?this._stratifiedMemberAvailabilityLabel.text=`${U.slice(0,-1).join(", ")} & ${U[G-1]}`:j.VyI.log("No tiers to show for this item membership requirement",j.$bb.Error),this.activateButton(F.UpsellButtonIndex,(()=>{K.q.instance.prodigy.open.unifiedConversionFlow(void 0,{conversionFunnelName:"Click-Item-Treasure-Track"})||K.q.instance.prodigy.open.battlePassUltimateMemberUpsellModal().catch(j.RQr.createHandler("ItemDetailsModalComponent: Failed to open battle pass ultimate member upsell modal"))}))}memberLockedEquipFlow(){const k=at.P.shouldUseUnifiedConversionFlow(ft.o.FunnelUseMemberLockedItem)?rt.R.UnifiedConversionFlow:ut.J.showYouTubeMembershipAd(K.q.instance.game,!0)?rt.R.Video:rt.R.Static,B={conversionFunnelName:this._mode===ct.s.WizardCostumesMenu?ft.o.FunnelEquipMemberLockedCostume:ft.o.FunnelEquipBackpackLockedItem,conversionFunnelMetadata:`${this._itemType}-${this._itemId}`};this._segment.purchase.sendFunnelStart({type:this._mode===ct.s.WizardCostumesMenu?"Equip-Member-Locked-Costume":"Equip-Member-Locked-Item-Backpack",category:"Item-Equip",contentId:`${this._itemType}-${this._itemId}`,adType:k,adVersion:at.P.getAdVersion(ft.o.FunnelUseMemberLockedItem)}),this._segment.item.sendItemEquipFailedEvent({item_name:ut.J.getItemName(this._itemData),item_type:this._itemType,item_id:this._itemId,fail_reason:"Member Locked"}),ut.J.shouldSuppressAd(this._currentPlayer.player)?K.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:820,yPosition:462,arrowXRelPos:.5,arrowDirection:Et.i.DOWN}):K.q.instance.prodigy.open.membershipInfo(null,B)}levelLockedEquipFlow(){var k,B;const U=at.P.shouldUseUnifiedConversionFlow(ft.o.FunnelEquipLevelLockedItem)?rt.R.UnifiedConversionFlow:ut.J.showYouTubeMembershipAd(K.q.instance.game,!0)?rt.R.Video:rt.R.Static,F=this._localizer.getText("LEVEL_LOCK_EQUIP",null===(k=this._itemData.data)||void 0===k?void 0:k.name,null===(B=this._itemData.data)||void 0===B?void 0:B.lockLevel),G=K.q.instance.prodigy.open.message(F),j=`${this._itemType}-${this._itemId}`;G.onClose=()=>{var k;this._currentPlayer.player.hasMembership()||ut.J.shouldSuppressAd(this._currentPlayer.player)||(this._segment.purchase.sendFunnelStart({type:"Equip-Level-Locked-Item-Backpack",category:"Item-Equip",contentId:j,adType:U,adVersion:at.P.getAdVersion(ft.o.FunnelEquipLevelLockedItem)}),this._segment.item.sendItemEquipFailedEvent({item_name:null===(k=this._itemData.data)||void 0===k?void 0:k.name,item_type:this._itemType,item_id:this._itemId,fail_reason:"Level Locked"}),K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:ft.o.FunnelEquipLevelLockedItem,conversionFunnelMetadata:j}))}}checkTransformation(){var k,B;j.Aq$.isDefined(null===(k=this._itemData.data)||void 0===k?void 0:k.effect)&&j.Aq$.isDefined(null===(B=this._itemData.data.effect)||void 0===B?void 0:B.transform)&&(this._currentPlayer.player.isPlayerTransformed()?K.q.instance.prodigy.open.messageBox(this._localizer.getText("MORPH_START_NEW"),(()=>{this.useTransformation()})):this.useTransformation())}useTransformation(){var k,B,U,F;const G=this._currentPlayer.player;null===(k=G.playerContainer)||void 0===k||k.transformToItem(this._itemData.data.effect.transform,this._itemData.data.effect.ID,!0,null===(U=null===(B=this._itemData.data)||void 0===B?void 0:B.effect)||void 0===U?void 0:U.time),G.backpack.consume(this._itemType,this._itemId),K.q.instance.game.broadcaster.broadcast(X.J8.MorphMarbleUsed,void 0,[this._itemData.data]),this.close(!0),this._segment.item.sendItemUsedEvent({item_id:`${this._itemId}`,item_name:null===(F=this._itemData.data)||void 0===F?void 0:F.name,item_type:"morph",item_count:1})}sendButtonEvent(k,B){this._segment.featureCommon.sendButtonEvent(Object.assign({buttonName:k,interfaceName:it.B.ItemInfo,interfaceType:J.Wm.InfoPanel,instanceType:Z.N.Interface,saveClickInfo:k},B?{destinationName:B}:{}))}isBattlePassReward(k){return"rewardId"in k&&"string"==typeof k.rewardId&&"itemDrop"in k}};(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Ot.prototype,"_rarityBanners",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Ot.prototype,"_oneLineItemNameRarityBanners",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Ot.prototype,"_twoLineItemNameRarityBanners",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],Ot.prototype,"_stratifiedMemberTierLabelTexts",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ot.prototype,"_stratifiedMemberAvailabilityLabel",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ot.prototype,"_previewContainer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ot.prototype,"_itemName",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ot.prototype,"_itemDescription",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ot.prototype,"_memberIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ot.prototype,"_bonusBackground",void 0),(0,G.Cg)([(0,j.MnK)(mt.Y),(0,G.Sn)("design:type",mt.Y)],Ot.prototype,"_characterPreview",void 0),(0,G.Cg)([(0,j.MnK)(st.B),(0,G.Sn)("design:type",st.B)],Ot.prototype,"_characterPreviewSortingAnchor",void 0),(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],Ot.prototype,"_spine",void 0),(0,G.Cg)([(0,j.MnK)(_t.j),(0,G.Sn)("design:type",_t.j)],Ot.prototype,"_spineAnimator",void 0),(0,G.Cg)([(0,j.MnK)(yt.X),(0,G.Sn)("design:type",yt.X)],Ot.prototype,"_imageItemDataLoader",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ot.prototype,"_costContainer",void 0),(0,G.Cg)([(0,j.MnK)(st.B),(0,G.Sn)("design:type",st.B)],Ot.prototype,"_currencyIconSortingAnchor",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ot.prototype,"_levelLockContainer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ot.prototype,"_levelLockText",void 0),(0,G.Cg)([(0,j.MnK)(ot.D),(0,G.Sn)("design:type",ot.D)],Ot.prototype,"_gearStat1",void 0),(0,G.Cg)([(0,j.MnK)(ot.D),(0,G.Sn)("design:type",ot.D)],Ot.prototype,"_gearStat2",void 0),(0,G.Cg)([(0,j.MnK)(ot.D),(0,G.Sn)("design:type",ot.D)],Ot.prototype,"_spellStat",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(nt.S),(0,G.Sn)("design:type",Array)],Ot.prototype,"_buttons",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",z.E)],Ot.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",tt.Y)],Ot.prototype,"_segment",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Ot.prototype,"_localizer",void 0),Ot=(0,G.Cg)([(0,j.EVk)("ItemDetailsModal",gt.Y.ui),(0,G.Sn)("design:paramtypes",[])],Ot)},70704:(k,B,U)=>{"use strict";U.d(B,{J:()=>V});var F=U(8674),G=U(62459),j=U(41935),$=U(28152),H=U(62430);let V=class extends G.uAl{constructor(){super(...arguments),this._petSpineItemDataLoaders=[]}updatePetSpines(k){k.length>this._petSpineItemDataLoaders.length?G.VyI.log("There are not enough renderers to load all team pet spines.",G.$bb.Error):k.forEach(((k,B)=>{var U,F;const $=k.getID(),H=this._petSpineItemDataLoaders[B];H.setAssetID($),null===(F=null===(U=H.GameObject)||void 0===U?void 0:U.findComponentInChildren(j.o))||void 0===F||F.updateGear(k.data.gear).catch(G.RQr.createHandler)}))}};(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(H.N),(0,F.Sn)("design:type",Array)],V.prototype,"_petSpineItemDataLoaders",void 0),V=(0,F.Cg)([(0,G.EVk)("LoadPetSpines",$.Y.animation)],V)},18280:(k,B,U)=>{"use strict";U.d(B,{n:()=>j});var F=U(62459),G=U(35120);class j extends F.uAl{constructor(){super(...arguments),this.maskGraphic=null,this.origX=0,this.origY=0}create(){super.create(),this.maskGraphic=G.q.instance.game.add.graphics(0,0,this.GameObject.legacyTransform.group)}destroy(){this.maskGraphic.destroy(),super.destroy()}updateAnchor(k,B){this.maskGraphic.x=this.origX-k,this.maskGraphic.y=this.origY-B}setAnchor(k,B,U,F){this.maskGraphic.clear(),this.maskGraphic.beginFill(16777215,1),this.maskGraphic.drawRect(-k,-B,U,F),this.maskGraphic.endFill(),this.origX=this.maskGraphic.x,this.origY=this.maskGraphic.y}getGraphicSource(){return this.maskGraphic}}},72799:(k,B,U)=>{"use strict";U.d(B,{M:()=>V});var F=U(8674),G=U(62459),j=U(83267),$=U(17002),H=U(571);let V=class extends G.uAl{constructor(){super(...arguments),this._runOnCreate=!0,this.onRenderComplete=new G.HN0,this._displayMount=!0,this._displayWand=!0,this._displayCostume=!0}create(){super.create(),this._mockPlayerDataProvider=j.E.createMockPlayerDataProvider(this._displayMount),this._runOnCreate&&this.renderPlayerAsTexture()}destroy(){this.onRenderComplete.dispose(),super.destroy()}renderPlayerAsTexture(k){if(!this._currentPlayer)return void G.VyI.log("RenderPlayerAsTextureComponent: Failed to render the player due to the logged in player data provider returning no data",G.$bb.Error);if(!this._playerGraphic)return void G.VyI.log("RenderPlayerAsTextureComponent: Failed to render the player due to no player graphic being available",G.$bb.Warning);const B=null!=k?k:this._currentPlayer.getAppearance(),U=Object.assign(Object.assign({},B),{costume:this._displayCostume?B.costume:void 0,weapon:this._displayWand?B.weapon:void 0});H.z.createFullBodyFromAppearanceData(U,this._mockPlayerDataProvider).then((k=>{const B=this._playerGraphic.GameObject.findComponent(G.XVE);if(!B)return void G.VyI.log("RenderPlayerAsTextureComponent: Failed to render the player due to the player graphic missing a RectTransform component",G.$bb.Error);const U=$.f.getScaledTextureFromSpriteWithAspectRatio(k,B.sizeDelta.width,B.sizeDelta.height);this._playerGraphic.setTexture(U),this.onRenderComplete.dispatch()})).catch(G.RQr.createHandler("RenderPlayerAsTextureComponent: Failed to render the player sprite"))}};(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",Function)],V.prototype,"_currentPlayer",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],V.prototype,"_playerGraphic",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_runOnCreate",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onRenderComplete",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_displayMount",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_displayWand",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_displayCostume",void 0),V=(0,F.Cg)([(0,G.EVk)("RenderPlayerAsTexture",G.YH6.render)],V)},35189:(k,B,U)=>{"use strict";U.d(B,{e:()=>V});var F=U(8674),G=U(62459),j=U(76974),$=U(24519),H=U(28152);let V=class extends $.v{constructor(){super(...arguments),this._secondState=!1}set SecondState(k){this._secondState=k,this.refreshState()}get SecondState(){return this._secondState}postCreate(){this._upSecondStateObject&&(this._upSecondStateObject.active=!1),this._downSecondStateObject&&(this._downSecondStateObject.active=!1),this._overSecondStateObject&&(this._overSecondStateObject.active=!1),this._disableSecondStateObject&&(this._disableSecondStateObject.active=!1),super.postCreate()}refreshState(){this.setState(this.currentState)}getStateObject(k){const B=this.SecondState?this.getSecondStateObject(k):super.getStateObject(k);return B&&(this.currentState=k),B}getSecondStateObject(k){switch(k){case j.K.Up:return this._upSecondStateObject;case j.K.Down:return this._downSecondStateObject;case j.K.Over:return this._overSecondStateObject;case j.K.Disabled:return this._disableSecondStateObject;default:return null}}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],V.prototype,"_upSecondStateObject",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],V.prototype,"_downSecondStateObject",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],V.prototype,"_overSecondStateObject",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],V.prototype,"_disableSecondStateObject",void 0),V=(0,F.Cg)([(0,G.EVk)("SecondStateGameObjectTransition",H.Y.ui)],V)},25132:(k,B,U)=>{"use strict";U.d(B,{$:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(68152),H=U(28152);let V=class extends G.uAl{constructor(){super(...arguments),this._singleImage=null,this._imageID=0}create(){super.create(),(0,$.v)(!!this.GameObject.legacyTransform,"Gameobject is missing Legacy Transform");const k="number"==typeof this._imageID?`singleImage-${this._imageID.toString()}`:this._imageID;this._singleImage=j.q.instance.prodigy.create.sprite(0,0,k),this.GameObject.legacyTransform.group.addChild(this._singleImage)}};(0,F.Cg)([(0,G.g11)(),(0,G.nKb)("singleImageID"),(0,F.Sn)("design:type",Number)],V.prototype,"_imageID",void 0),V=(0,F.Cg)([(0,G.EVk)("SingleImage",H.Y.root)],V)},29834:(k,B,U)=>{"use strict";U.d(B,{j:()=>q});var F=U(8674),G=U(62459),j=U(68910),$=U(28152),H=U(16495);class V extends G.$KW{generate(k,B){const U=this.getAnimationGroup(k),F=G.Gme.checkboxGroup({id:"loopAnimation",labelValue:"Loop Animation",inputValue:k.loopAnimation}),j=G.Gme.numberGroup({id:"startTimeSeconds",labelValue:"Start Time in Seconds",inputValue:k.startTimeSeconds}),$=G.NyS.create({id:"onAnimationComplete",label:"On Animation Complete",signalValue:k.onAnimationComplete,componentGUID:this._componentGuid});return G.XRp.createVertical([U,F,j,$])}getAnimationGroup(k){var B;const U=this._editorAPI.getComponent(this._componentGuid),F=null===(B=null==U?void 0:U.spine)||void 0===B?void 0:B.getAnimationNames();let j;return j=(null==F?void 0:F.length)?G.Gme.dropdownGroup({id:"animation",labelValue:"Animation",selectOptions:k.animation?["None",...F]:F,selectValue:k.animation,onChange:k=>{"None"===k&&this._editorAPI.modifyComponent(this._componentGuid,{animation:void 0})}}):G.Gme.textGroup({id:"animation",labelValue:"Animation",inputValue:k.animation}),j}}var W=U(28402);let q=class extends G.uAl{constructor(){super(...arguments),this.onAnimationComplete=new G.HN0,this._initialAnimation=null,this._loopAnimation=!0,this._startTimeSeconds=0,this._paused=!1,this._isLoaded=!1}get spine(){return this._spineComponent}get OnAnimationComplete(){return this.onAnimationComplete}get paused(){return this._paused}set paused(k){this._paused=k,this.spine&&(this.spine.paused=k)}get isLoaded(){return this._isLoaded}create(){if(super.create(),this._spineComponent=this._spineComponent||this.gameObject.findComponent(W.v),this._isLoaded=!1,!this.spine)return G.VyI.log(`SpineAnimator missing SpineComponent on ${this.toString()}`,G.$bb.Error),void this.destroy();this.spine.isLoaded?this.onLoaded():this.spine.OnLoaded.addOnce(this.onLoaded,this,0)}onLoaded(){this._isLoaded=!0,this.spine.paused=this._paused,this._initialAnimation&&this.playAnimation(this._initialAnimation,this._loopAnimation)}playAnimation(k,B,U=!1,F=!1,j=0){if(!this._isLoaded)return this._initialAnimation=k,void(this._loopAnimation=B);const $=this.spine.getSpine();if(!(null==$?void 0:$.destroyed))if(null==$?void 0:$.state){if(!this.hasAnimation(k))return void G.VyI.log(`No animation named ${k} on spine ${$.name}`,G.$bb.Warning);const H=$.state.tracks[0];if(!U&&H&&H.animation.name===k)return;if($.onComplete.removeAll(this),F||(B?$.onComplete.add((()=>{this.onAnimationComplete.dispatch(k)}),this):$.onComplete.addOnce((()=>{this.onAnimationComplete.dispatch(k)}),this)),$.lastTime=Date.now(),j>0){$.state.setAnimation(0,k,B).mixDuration=j}else $.setToSetupPose(),this.spine.setAnimationByName(0,k,B);this.seekTo(this._startTimeSeconds),$.state.apply($.skeleton)}else this.spine.OnLoaded.addOnce(this.playAnimation,this,0,k,B,U,F,j)}playAnimationNumTimes(k,B,U=!1){this.playAnimation(k,!1,U),B>1&&this.onAnimationComplete.addOnce((()=>{this.playAnimationNumTimes(k,B-1,!0)}))}playAnimationSequence(k,...B){return(0,F.sH)(this,void 0,void 0,(function*(){yield(0,H.ib)(this,B,k)}))}stopAnimation(){var k;if(!this.spine)return void G.VyI.log(`[SpineAnimator.stopAnimation]: Invalid _spineComponent ${this.toString()}`,G.$bb.Error);const B=this.spine.getSpine();B&&(null===(k=B.onComplete)||void 0===k||k.removeAll(this),B.setToSetupPose(),B.state.clearTracks())}seekTo(k){var B;if(!this.spine)return void G.VyI.log(`[SpineAnimator.seekTo]: Invalid _spineComponent ${this.toString()}`,G.$bb.Error);const U=null===(B=this.spine.getSpine())||void 0===B?void 0:B.state;U?U.tracks[0].trackTime=k:G.VyI.log(`[SpineAnimator.seekTo]: State is invalid for ${this.toString()}`,G.$bb.Error)}hasAnimation(k){var B,U,F,G;return null===(F=null===(U=null===(B=this.spine)||void 0===B?void 0:B.getSpine())||void 0===U?void 0:U.state)||void 0===F?void 0:F.hasAnimation(null===(G=this.spine)||void 0===G?void 0:G.getRemappedAnimation(k))}applySkin(k){if(!this.spine)return void G.VyI.log(`[SpineAnimator.applySkin] Invalid _spineComponent ${this.toString()}`,G.$bb.Error);const B=this.spine.getSpine(),U=B.skeleton.data.findSkin(k);B.setSkin(U);const F=B.skeleton.slots;for(let j=0;j{"use strict";U.d(B,{v:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.v2j{setAsset(k,B){{const U=j.q.instance.prodigy.assets.getAsset(k);(null==U?void 0:U.guidMapping)?super.setAsset(U.guidMapping,B,this.loadAsset.bind(this)):super.setAsset(k,B,this.loadAsset.bind(this))}}loadAsset(k,B){j.q.instance.prodigy&&j.q.instance.prodigy.load.assets([k],(()=>{super.setAsset(k,B)}))}getEventNames(){var k,B,U,F,G;return null!==(G=null===(F=null===(U=null===(B=null===(k=this.getSpine())||void 0===k?void 0:k.skeleton)||void 0===B?void 0:B.data)||void 0===U?void 0:U.events)||void 0===F?void 0:F.map((k=>k.name)))&&void 0!==G?G:[]}getAnimationNames(){var k,B,U,F,G;return null!==(G=null===(F=null===(U=null===(B=null===(k=this.getSpine())||void 0===k?void 0:k.skeleton)||void 0===B?void 0:B.data)||void 0===U?void 0:U.animations)||void 0===F?void 0:F.map((k=>k.name)))&&void 0!==G?G:[]}waitForEvent(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this.getEventNames();if(-1===B.indexOf(k))return void G.VyI.log(`No event named ${k} found in spine, available events: ${B.join(", ")}`,G.$bb.Warning);let U=null;yield new Promise((B=>{U=this.getSpine().onEvent.add(((U,F)=>{F.data.name===k&&B()}),this).listener})).then((()=>{this.getSpine().onEvent.remove(U,this)}))}))}};H=(0,F.Cg)([(0,G.EVk)("Spine",$.Y.animation)],H)},62430:(k,B,U)=>{"use strict";U.d(B,{N:()=>K});var F,G=U(8674),j=U(62459),$=U(56942),H=U(77938),V=U(68152),W=U(28152),q=U(28402);let K=F=class extends j.uAl{constructor(){super(...arguments),this._targetSpine=null,this._itemID=null,this._itemType=null,this._assetKey=null,this._onSpineItemLoaded=new j.HN0}get onSpineItemLoaded(){return this._onSpineItemLoaded}get isLoaded(){var k,B;return null!==(B=null===(k=this._targetSpine)||void 0===k?void 0:k.isLoaded)&&void 0!==B&&B}get assetID(){return this._itemID}create(){super.create(),this._targetSpine&&null!==this._itemType&&null!==this._itemID&&null!==this._assetKey&&this.updateTargetSpine()}destroy(){this._targetSpine=null,this._onSpineItemLoaded.dispose(),super.destroy()}setAssetID(k){this._itemID=k,this.updateTargetSpine()}updateTargetSpine(){var k;const B=H.t.getItem(this._itemType,this._itemID);(0,V.v)(null!==B,`Item was not found for ${this._itemType}-${this._itemID}`);const U=null===(k=B.metadata.assets)||void 0===k?void 0:k[this._assetKey],G=this._targetSpine.GameObject.transform;if((null==U?void 0:U.defaultScale)&&(G.localScale.x=U.defaultScale,G.localScale.y=U.defaultScale),null==U?void 0:U.flip){const k=G.localScale;G.setScale(-1*k.x,k.y)}const j=F.createSpineAssetSourceName(B,this._itemType,this._itemID,this._assetKey);this._targetSpine.OnLoaded.addOnce((()=>{this._onSpineItemLoaded.dispatch()})),this._targetSpine.setAsset(j)}static createSpineAssetSourceName(k,B,U,F="default"){var G;const H=null===(G=k.metadata.assets)||void 0===G?void 0:G[F];return"follow"===B&&j.Aq$.isDefined(U)&&$.Q[`Default_follow_${U}_json`]?$.Q[`Default_follow_${U}_json`]:j.Aq$.isDefined(null==H?void 0:H.assetKey)?$.Q[H.assetKey]:j.Aq$.isDefined(null==H?void 0:H.ID)?`spine-${H.ID}`:`${F}-${B}-${U}`}};(0,G.Cg)([(0,j.MnK)(q.v),(0,G.Sn)("design:type",q.v)],K.prototype,"_targetSpine",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],K.prototype,"_itemID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],K.prototype,"_itemType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],K.prototype,"_assetKey",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],K.prototype,"_onSpineItemLoaded",void 0),K=F=(0,G.Cg)([(0,j.EVk)("SpineItemDataLoader",W.Y.data)],K)},51315:(k,B,U)=>{"use strict";U.d(B,{K:()=>H});var F=U(8674),G=U(62459),j=U(34603),$=U(38042);let H=class extends $.p{constructor(){super(...arguments),this._loopAnimation=!1,this._onInitialize=new G.HN0,this._image=null}create(){super.create(),this._image=this.GameObject.findComponent(j._);const k=this._image.sprite;k&&null!==k.key?this.initImage():this._image.OnLoaded.addOnce(this.initImage,this)}destroy(){this._onInitialize.dispose(),super.destroy()}initImage(){const k=this._image.sprite;k.animations.add("walk",[0,1,2,3,4,5,6,7],10,!0);const B=k.animations.add("idle",[8,9,10,11,12,13,14,15],10,!0);k.animations.add("attack",[16,17,18,19,20,21,22,23],10).onComplete.add(B.play,B),k.animations.addIfFound("stand",["npc_0","npc_1","npc_2","npc_3","npc_4","npc_5","npc_6","npc_7"],10,!0),this._initialAnimation&&this.playAnimation(this._initialAnimation,this._loopAnimation),this._onInitialize.dispatch()}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"_initialAnimation",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_loopAnimation",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"_onInitialize",void 0),H=(0,F.Cg)([(0,G.EVk)("SpritesheetAnimator")],H)},43858:(k,B,U)=>{"use strict";U.d(B,{j:()=>et});var F,G=U(8674),j=U(62459),$=U(64868),H=U(35120),V=U(34829),W=U(1195),q=U(64794),K=U(16847),z=U(30405),Y=U(38920),Q=U(28152),X=U(93833);!function(k){k[k.Owned=0]="Owned",k[k.Locked=1]="Locked",k[k.Default=2]="Default"}(F||(F={}));var Z=U(34603),J=U(52156),tt=U(85540);let et=class extends j.uAl{constructor(){super(...arguments),this._localizer=null,this._rarityBackgrounds=[],this._itemIconContainer=null,this._stateIcon=null,this._currencyBannerLocked=null,this._levelLockContainer=null,this._costContainer=null,this._quantityCanBuyText=null,this._stackElements=null,this._arrow=null,this._newBadge=null,this._stateIconConfig=null,this._currentCardState=null,this.bounce=null,this._showMembershipLockIcon=!0}get _item(){var k;return null===(k=this._itemCardData)||void 0===k?void 0:k.item}get _amount(){var k;return null===(k=this._itemCardData)||void 0===k?void 0:k.currencyAmount}get _currencyID(){var k;return null===(k=this._itemCardData)||void 0===k?void 0:k.currencyID}setShowMembershipLockIcon(k){this._showMembershipLockIcon=k}create(){super.create(),this._localizer=H.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService)}setItemData(k){this._itemCardData=k,this._rootContainerComponent.name=`${k.item.type}-${k.item.ID}-card`,this.updateCard()}getItemData(){return Object.assign({},this._itemCardData)}updateItemData(k){var B,U;this.setItemData(k),this.setNewBadge(null!==(U=null===(B=k.dynamicStoreData)||void 0===B?void 0:B.isNew)&&void 0!==U&&U)}setNewBadge(k){this._newBadge.active=k}getItem(){return this._itemCardData.item}setPlayerGearStats(k,B=!1){this._playerGearStats=k}get isCardValid(){return!(!this._itemCardData.item||!this._activePlayer)}updateDisplay(){if(!this.isCardValid)return;const k=this._itemCardData.item;Promise.all([this._itemIconContainer.setAsset(k.ID,k.type),this.updateCardState(this._currentCardState)]).catch(j.RQr.createHandler("Error updating store item card")),this._rarityBackgrounds.forEach(((B,U)=>{var F,G;B.active=U===(null!==(G=null===(F=k.data)||void 0===F?void 0:F.rarity)&&void 0!==G?G:0)})),this.updateQuantityCanBuy(),this.animateArrow(!0)}updateTask(k){if(this._itemCardData.dynamicStoreData){const B=this._itemCardData.dynamicStoreData.offers.findIndex((B=>B.task.id===k.task.id));B>-1&&(this._itemCardData.dynamicStoreData.offers[B]=k)}this.updateCard()}updateCard(){this.setCardState(),this.updateDisplay()}updateQuantityCanBuy(){var k,B;const U=null!==(B=null===(k=this._itemCardData.dynamicStoreData)||void 0===k?void 0:k.itemQuantity)&&void 0!==B?B:1;if($._.isFeatureEnabled()&&U>1){this._stackElements.active=!0;const k=(0,tt.r)(this._itemCardData),B=k>0?`${k.toString()}/${U.toString()}`:U.toString();this._quantityCanBuyText.text=B}else this._stackElements.active=!1}updateCardState(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,G,$;this._stateIcon.Active=!1;const H=this._costContainer.findComponentInChildren(j.EYj);H.GameObject.transform.setPositionX(0);const V=[];switch(k){case F.Owned:H.text=this._localizer.getText("ITEMCARD_OWNED"),this._currencyDisplay.setIconVisible(!1),V.push(this.setStateIcon(this._stateIconConfig.atlas,this._stateIconConfig.frameOwned)),this.showLockedElements(!1);break;case F.Locked:this._levelLockContainer.findComponentInChildren(j.EYj).text=this._localizer.getText("ITEMCARD_LEVEL",null!==($=null===(G=null===(U=null===(B=this._itemCardData)||void 0===B?void 0:B.item)||void 0===U?void 0:U.data)||void 0===G?void 0:G.lockLevel)&&void 0!==$?$:""),this.showLockedElements(!0);break;case F.Default:default:this._itemCardData.currencyAmount>0&&!this.memberLockHardCurrency()?(this._currencyDisplay.setIconVisible(!0),H.text=(0,Y.Hk)(this._itemCardData.currencyAmount),H.GameObject.transform.setPositionX(2*H.text.length+2),this._currencyDisplay.updateCurrencyID(this._itemCardData.currencyID),this._currencyDisplay.updateAmount(this._itemCardData.currencyAmount)):(this._currencyDisplay.setIconVisible(!1),H.text=this.memberLockHardCurrency()?"":this._localizer.getText("ITEMCARD_FREE")),this.showLockedElements(!1)}this._showMembershipLockIcon&&k!==F.Owned&&this.isMembershipLocked()&&V.push(this.setStateIcon(this._stateIconConfig.atlas,this._stateIconConfig.frameMembership)),yield Promise.all(V)}))}showLockedElements(k){this._costContainer.active=!k,this._currencyBannerLocked.active=k,this._levelLockContainer.active=k}setCardState(){this.isOwned()?this._currentCardState=F.Owned:this.isLevelLocked()?this._currentCardState=F.Locked:this._currentCardState=F.Default}setStateIcon(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){yield this._stateIcon.setAsset(k,B),this._stateIcon.Active=!0}))}getCardState(){return this._currentCardState}isOwned(){return(0,tt.w)(this._itemCardData)}isLevelLocked(){var k,B;const U=this._itemCardData.item;return!(!this._activePlayer||!U)&&z.o.isLevelLocked(this._activePlayer.player,null!==(B=null===(k=U.data)||void 0===k?void 0:k.lockLevel)&&void 0!==B?B:0)}isMathTowerConsumableItem(k){return k===q.D.ASSET_TYPE_FRAME||k===q.D.ASSET_TYPE_DECORATION||k===q.D.ASSET_TYPE_STREET_FURNITURE}isMembershipLocked(){const k=this._itemCardData.item;return!!k&&(1===k.data.member&&"pet"!==k.type||this.memberLockHardCurrency())}memberLockHardCurrency(){const k=H.q.instance.prodigy.gameContainer.get("5c7-e02d");return 27===this._itemCardData.currencyID&&k.isHardCurrencyMemberLocked(this._itemCardData.currencyAmount)}animateArrow(k){k?(this.bounce||(this._arrow.onDestroy.add((()=>{this.bounce&&(this.bounce.stop(),H.q.instance.game.tweens.remove(this.bounce),this.bounce=null)})),this.bounce=H.q.instance.game.add.tween(this._arrow.transform.localPosition,this).to({y:this._arrow.transform.localPosition.y-5},1e3,j.GS3.Quadratic.InOut,!0,0,V.A.MAX_SAFE_INTEGER,!0)),this.bounce.start()):(this._arrow.transform.setPositionY(0),this.bounce.remove(),this.bounce=null)}destroy(){H.q.instance.game.tweens.remove(this.bounce),this.bounce=null,super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",W.E)],et.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],et.prototype,"_rarityBackgrounds",void 0),(0,G.Cg)([(0,j.MnK)(J.X),(0,j.Lr6)(0),(0,G.Sn)("design:type",J.X)],et.prototype,"_itemIconContainer",void 0),(0,G.Cg)([(0,j.MnK)(Z._),(0,G.Sn)("design:type",Z._)],et.prototype,"_stateIcon",void 0),(0,G.Cg)([(0,j.MnK)(K.n),(0,G.Sn)("design:type",K.n)],et.prototype,"_currencyDisplay",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_currencyBannerLocked",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_levelLockContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_costContainer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],et.prototype,"_quantityCanBuyText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_stackElements",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_arrow",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_newBadge",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],et.prototype,"_stateIconConfig",void 0),(0,G.Cg)([(0,j.MnK)(X.$),(0,G.Sn)("design:type",X.$)],et.prototype,"_rootContainerComponent",void 0),et=(0,G.Cg)([(0,j.EVk)("StoreItemCard",Q.Y.ui)],et)},46548:(k,B,U)=>{"use strict";U.d(B,{t:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(84246);let H=class extends $.j{constructor(){super(...arguments),this._strokeColor=null}applyEffect(k){const B=[];for(let F=0;F{"use strict";U.d(B,{E:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this._durationInMilliseconds=0,this.onStart=new G.HN0,this.onTimeout=new G.HN0,this.passArgsOnTimeout=!1,this._timerOn=!1}create(){this._autoStartTimer&&this.startTimer(),super.create()}startTimer(...k){this.Active&&!this._timerOn&&G.Aq$.isDefined(this._durationInMilliseconds)&&(this._timerOn=!0,this._timer=window.setTimeout((()=>{this.onTimeoutCallback(...k)}),this._durationInMilliseconds),this.onStart.dispatch())}onTimeoutCallback(...k){this.Active&&(this.resetTimer(),this.passArgsOnTimeout?this.onTimeout.dispatch(...k):this.onTimeout.dispatch())}stop(k=!1){k?this.onTimeoutCallback():this.resetTimer()}resetTimer(){this._timerOn=!1,window.clearTimeout(this._timer),this._timer=null}onDisable(){this.resetTimer(),super.onDisable()}destroy(){this.onStart.dispose(),this.onTimeout.dispose(),this.resetTimer(),super.destroy()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],$.prototype,"_durationInMilliseconds",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_autoStartTimer",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onStart",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onTimeout",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"passArgsOnTimeout",void 0),$=(0,F.Cg)([(0,G.EVk)("Timeout",j.Y.root)],$)},17509:(k,B,U)=>{"use strict";U.d(B,{e:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(84246);let H=class extends $.j{constructor(){super(...arguments),this._tintColor=null}applyEffect(k){G.Aq$.isDefined(this._tintColor)||(this._tintColor=16777215..toString());const B=G.Q1f.hexToRGBArray(Number(this._tintColor)),U=B[0],F=B[1],j=B[2];if(k&&k.data)for(let G=0;G{"use strict";U.d(B,{w:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.y4o{constructor(){super(...arguments),this._hexTintColor="0xFFFFFF",this._alpha=1,this._isTinted=!1,this._created=!1,this._renderTextureDimensions=new G.or0}set hexTintColor(k){this._hexTintColor=k}create(){super.create(),this._root=j.q.instance.game.add.group(),this._root.name=`${this.GameObject.name} - TintRenderComponent`,this.setRootContainer(this._root)}postCreate(){super.postCreate(),this._created=!0,this.Active&&this._tintOnCreate&&(this.enableTint(),this._isTinted=!0)}destroy(){var k;this._targetRenderComponent.onRootContainerSet.remove(this.enableTint,this),this.disableTint(),null===(k=this._root)||void 0===k||k.destroy(),this._root=null,super.destroy()}onEnable(){super.onEnable(),this._isTinted&&this.enableTint()}onDisable(){super.onDisable(),this.isCreated&&this._isTinted&&(this.disableTint(),this._isTinted=!0)}getDimensions(){return this._renderTextureDimensions}enableTint(){var k,B;if(!this._created)return void(this._tintOnCreate=!0);const U=this._targetRenderComponent.getRootContainer(),F=this._targetRenderComponent.GameObject.transform;if(F instanceof G.XVE)if(this._targetRenderComponent.IsActiveInHierarchy)if(U){const $=F.rectTransformDimensions;if(this._renderTextureDimensions.setTo($.width,$.height),!this._renderTextureDimensions.isNearlyEqual(G.or0.ZERO)){this._renderComponentToTexture=j.q.instance.game.add.renderTexture(this._renderTextureDimensions.width,this._renderTextureDimensions.height);const H=new G.I9Y($.width*F.pivot.x,$.height*F.pivot.y),V=G.i7d.main;if(!(null===(B=null===(k=G.wa5.getActiveScene())||void 0===k?void 0:k.getLayer(this._targetRenderComponent.GameObject.layer))||void 0===B?void 0:B.attachToCamera)&&V){const k=V.GameObject.transform.worldPosition,B=V.viewportSize;H.add(new G.I9Y(k.x-B.getHalfWidth(),k.y-B.getHalfHeight()))}const W={x:F.worldPosition.x,y:F.worldPosition.y};F.worldPosition=new G.I9Y(H.x,H.y),U.displayObjectUpdateTransform(),this._renderComponentToTexture.render(U),F.worldPosition=W,this._imageNode||(this._imageNode=j.q.instance.prodigy.create.image(this._renderTextureDimensions.getHalfWidth(),this._renderTextureDimensions.getHalfHeight(),void 0,null,this._renderComponentToTexture),this._root.add(this._imageNode)),this._imageNode.tint=parseInt(this._hexTintColor,16),this._imageNode.alpha=Math.min(Math.max(this._alpha,0),1),this._imageNode.anchor.set(.5,.5),U.visible=!1,U.renderable=!1,this._isTinted=!0}}else this._targetRenderComponent.onRootContainerSet.addOnce(this.enableTint,this);else this._targetRenderComponent.GameObject.onActiveInHierarchyChanged.addOnce(this.enableTint,this);else G.VyI.log("Target render component must have a RectTransform",G.$bb.Error)}disableTint(k=!0){this._imageNode&&(this._imageNode.destroy(),this._imageNode=null),this._renderComponentToTexture&&(this._renderComponentToTexture.clear(),this._renderComponentToTexture.destroy(!0),this._renderComponentToTexture=null);{const B=this._targetRenderComponent.getRootContainer();B&&(B.visible=k,B.renderable=!0,this._isTinted=!1)}}};(0,F.Cg)([(0,G.MnK)(G.y4o),(0,F.Sn)("design:type",G.y4o)],H.prototype,"_targetRenderComponent",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"_hexTintColor",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_alpha",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_tintOnCreate",void 0),H=(0,F.Cg)([(0,G.EVk)("TintRenderComponent",$.Y.effect)],H)},8182:(k,B,U)=>{"use strict";U.d(B,{p:()=>V});var F=U(8674),G=U(62459),j=U(28152),$=U(61985),H=U(51972);let V=class extends H.f{constructor(){super(...arguments),this._timeout=null}startTimer(){this._timeout.startTimer()}close(){this._timeout.stop(!0)}};(0,F.Cg)([(0,G.x4W)("timeout"),(0,F.Sn)("design:type",$.E)],V.prototype,"_timeout",void 0),V=(0,F.Cg)([(0,G.EVk)("ToolTipAuto",j.Y.ui)],V)},51972:(k,B,U)=>{"use strict";U.d(B,{f:()=>$,i:()=>F});var F,G=U(8674),j=U(62459);!function(k){k[k.UP=0]="UP",k[k.DOWN=1]="DOWN",k[k.LEFT=2]="LEFT",k[k.RIGHT=3]="RIGHT"}(F||(F={}));class $ extends j.uAl{constructor(){super(...arguments),this._headerMessageText=null,this._bodyMessageText=null,this._indicatorArrowVertical=null,this._indicatorArrowHorizontal=null,this._leftSideBorderOffset=0,this._rightSideBorderOffset=0}postCreate(){super.postCreate(),this.GameObject.active=!1,this._cachedTextPositionYHeader=this._headerMessageText.GameObject.legacyTransform.group.position.y,this._cachedTextPositionYBody=this._bodyMessageText.GameObject.legacyTransform.group.position.y,this._cachedTextPositionYAverage=.5*(this._cachedTextPositionYHeader+this._cachedTextPositionYBody),this._leftSideBorderOffset=this._bodyMessageText.GameObject.legacyTransform.group.position.x,this._rightSideBorderOffset=this._background.GameObject.legacyTransform.width-this._bodyMessageText.GameObject.legacyTransform.group.position.x}initializeText(k,B,U){this._bodyMessageText.text=k,j.Aq$.isDefined(B)&&0!==B.length?(this._headerMessageText.text=B,this._bodyMessageText.GameObject.legacyTransform.group.position.y=this._cachedTextPositionYBody):(this._headerMessageText.text="",this._bodyMessageText.GameObject.legacyTransform.group.position.y=this._cachedTextPositionYAverage),this.resizeSlicedGraphic(this._background,this.getBackgroundWidth(),this._background.GameObject.legacyTransform.height);const F=this.GameObject.active;this.GameObject.active=!0,this.GameObject.legacyTransform.anchorX=this.GameObject.legacyTransform.anchorX,this.GameObject.legacyTransform.anchorY=this.GameObject.legacyTransform.anchorY,this.GameObject.active=F}resizeSlicedGraphic(k,B,U){k.GameObject.legacyTransform.group.removeChild(k.elementsGroup),k.GameObject.legacyTransform.group.cacheAsBitmap=!1,k.elementsGroup.destroy(),k._rootContainer=null,k.elementsGroup=null,k.GameObject.legacyTransform.group.getChildAt(0).width=B,k.GameObject.legacyTransform.group.getChildAt(0).height=U,k.create()}getBackgroundWidth(){const k=Math.max(this._headerMessageText.TextObject.width,this._bodyMessageText.TextObject.width);return this._leftSideBorderOffset+k+this._rightSideBorderOffset}setIndicatorArrow(k,B=.5,U=.5){const G=this.GameObject.legacyTransform;switch(k){case F.UP:this._indicatorArrowHorizontal.destroy(),this.setArrow(k,this._indicatorArrowVertical,1,this.getBackgroundWidth()*B,0),this.setAnchor(G,B,0);break;case F.DOWN:this.setArrow(k,this._indicatorArrowVertical,-1,this.getBackgroundWidth()*B,this._cachedGameObjectHeight),this.setAnchor(G,B,1),this._indicatorArrowHorizontal.destroy();break;case F.LEFT:this._indicatorArrowVertical.destroy(),this.setArrow(k,this._indicatorArrowHorizontal,-1,2,this._cachedGameObjectHeight*U),this.setAnchor(G,0,U);break;case F.RIGHT:this._indicatorArrowVertical.destroy(),this.setArrow(k,this._indicatorArrowHorizontal,1,this.getBackgroundWidth()-2,this._cachedGameObjectHeight*U),this.setAnchor(G,1,U);break;default:this._indicatorArrowVertical.destroy(),this._indicatorArrowHorizontal.destroy()}}setArrow(k,B,U,G,j){k===F.UP||k===F.DOWN?B.legacyTransform.group.scale.y=U:B.legacyTransform.group.scale.x=U,B.legacyTransform.group.position.set(G,j)}setAnchor(k,B,U){k.anchorX=B,k.anchorY=U}}(0,G.Cg)([(0,j.x4W)("headerMessageText"),(0,G.Sn)("design:type",j.EYj)],$.prototype,"_headerMessageText",void 0),(0,G.Cg)([(0,j.x4W)("bodyMessageText"),(0,G.Sn)("design:type",j.EYj)],$.prototype,"_bodyMessageText",void 0),(0,G.Cg)([(0,j.x4W)("background"),(0,G.Sn)("design:type",j.V09)],$.prototype,"_background",void 0),(0,G.Cg)([(0,j.x4W)("indicatorArrow"),(0,G.Sn)("design:type",j._mx)],$.prototype,"_indicatorArrowVertical",void 0),(0,G.Cg)([(0,j.x4W)("indicatorArrowHorizontal"),(0,G.Sn)("design:type",j._mx)],$.prototype,"_indicatorArrowHorizontal",void 0)},82125:(k,B,U)=>{"use strict";U.d(B,{i:()=>W});var F=U(8674),G=U(62459),j=U(49237),$=U(76974),H=U(28152),V=U(51972);let W=class extends V.f{constructor(){super(...arguments),this._callbacks=[],this._numLayoutObjects=0}postCreate(){super.postCreate(),this._cachedGameObjectHeight=this.GameObject.legacyTransform.height}setCallbacks(k){if(G.Aq$.isDefined(k)){this._callbacks=k,this._numLayoutObjects=this._callbacks.length;const B=this.GameObject.findComponentInChildren(G.JTA);for(let k=0;k{"use strict";U.d(B,{f:()=>j,y:()=>G});var F=U(51972);class G{}G.CENTER=.5,G.LEFT=0,G.RIGHT=1,G.TOP=0,G.BOTTOM=1;const j={arrowAnchor:G.CENTER,tooltipAnchor:G.CENTER,arrowDirection:F.i.DOWN,useCloseButton:!0}},48199:(k,B,U)=>{"use strict";U.d(B,{A:()=>Q});var F=U(62459),G=U(99625),j=U(35120),$=U(31818),H=U(8182),V=U(82125),W=U(64191),q=U(8674),K=U(28152),z=U(51972);let Y=class extends z.f{postCreate(){super.postCreate(),this._cachedGameObjectHeight=this.GameObject.legacyTransform.height}initializeText(k,B){super.initializeText(k,B),this.GameObject.active=!0}close(){this.GameObject.active=!1}};Y=(0,q.Cg)([(0,F.EVk)("ToolTipSpeech",K.Y.ui)],Y);class Q{static displayToolTipAuto(k,B,U){const F=Q.setToolTip(H.p,k,B,Q.TOOLTIP_AUTO);return Q.updateBaseDisplay(F,U),F.close(),F.startTimer(),F}static displayTooltipTargeted(k,B,U,F){let H=k;if(!H){H=j.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromGUID(G.l.StandardTooltip,B).findComponentInChildren($.tX)}return H.setFromSchema(U),H.setTarget(F,B),H}static displayToolTipManual(k,B,U){const G=Q.setToolTip(W.q,k,B,Q.TOOLTIP_MANUAL),j=F.Aq$.isDefined(U.proceedButtonCallback);return j?(G.setProceedButtonVisibility(!0),G.setCallback(U.proceedButtonCallback)):G.setProceedButtonVisibility(!1),Q.updateBaseDisplay(G,U,j),F.Aq$.isDefined(U.arrowXRelPos)||F.Aq$.isDefined(U.arrowYRelPos)?G.setIndicatorArrow(U.arrowDirection,U.arrowXRelPos,U.arrowYRelPos):G.setIndicatorArrow(U.arrowDirection,.5,null),G}static displayToolTipSpeech(k,B,U){const F=Q.setToolTip(Y,k,B,Q.TOOLTIP_SPEECH);return Q.updateBaseDisplay(F,U),F.setIndicatorArrow(U.arrowDirection,U.arrowXRelPos,U.arrowYRelPos),F}static displayToolTipCustomManual(k,B,U,F){const G=Q.setToolTip(W.q,k,B,U);return G.setProceedButtonVisibility(!1),Q.updateBaseDisplay(G,F),G.setIndicatorArrow(F.arrowDirection,F.arrowXRelPos,F.arrowYRelPos),G}static displayToolTipButtonGrid(k,B,U,G,j=!0,$){const H=Q.setToolTip(V.i,k,B,G);return H.GameObject.active=j,Q.updateBaseDisplay(H,U),F.Aq$.isDefined(U.arrowDirection)&&H.setIndicatorArrow(U.arrowDirection,U.arrowXRelPos,U.arrowYRelPos),F.Aq$.isDefined($)&&$.length>0&&H.setCallbacks($),H}static updateBaseDisplay(k,B,U){k.initializeText(B.bodyText,B.headerText,U),F.Aq$.isDefined(B.xPosition)&&(k.GameObject.legacyTransform.group.position.x=B.xPosition),F.Aq$.isDefined(B.yPosition)&&(k.GameObject.legacyTransform.group.position.y=B.yPosition),k.GameObject.legacyTransform.group.updateTransform()}static setToolTip(k,B,U,F){if(!B){const B=j.q.instance.prodigy.gameContainer.get("d0e-64fd");return("number"==typeof F?B.load(F,U):B.loadFromGUID(F,U)).findComponentInChildren(k)}return B}}Q.TOOLTIP_AUTO=10,Q.TOOLTIP_MANUAL=11,Q.TOOLTIP_SPEECH=108},64191:(k,B,U)=>{"use strict";U.d(B,{q:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(49237),H=U(28152),V=U(51972);let W=class extends V.f{constructor(){super(...arguments),this._closeButton=null,this._proceedButton=null,this._proceedButtonText=null}postCreate(){super.postCreate(),this._rightSideBorderOffset+=this._closeButton.GameObject.legacyTransform.width+this._proceedButton.GameObject.legacyTransform.width,this._closeButton.onClick.add((()=>{j.q.instance.prodigy.audio.playSFX(18,"pop"),this.close()})),this._cachedGameObjectHeight=this.GameObject.legacyTransform.height}initializeText(k,B,U){super.initializeText(k,B),this._closeButton.GameObject.legacyTransform.group.position.x=this.getBackgroundWidth()-this._rightSideBorderOffset*(G.Aq$.isDefined(U)&&U?.25:.5),U&&(this._proceedButton.GameObject.legacyTransform.group.position.x=this.getBackgroundWidth()-.7*this._rightSideBorderOffset),this.GameObject.active=!0}setCallback(k){this._proceedButton.onClick.add((()=>{k(),j.q.instance.prodigy.audio.playSFX(18,"pop"),this.close()})),this._proceedButtonText.text="Go"}setProceedButtonVisibility(k){k?this._proceedButton.GameObject.active||(this._rightSideBorderOffset+=this._proceedButton.GameObject.legacyTransform.width,this._proceedButton.GameObject.active=!0):this._proceedButton.GameObject.active&&(this._rightSideBorderOffset-=this._proceedButton.GameObject.legacyTransform.width,this._proceedButton.GameObject.active=!1)}close(){this.GameObject.active=!1}destroy(){this._closeButton.onClick.remove(this.close,this),super.destroy()}};(0,F.Cg)([(0,G.x4W)("closeButton"),(0,F.Sn)("design:type",$.$)],W.prototype,"_closeButton",void 0),(0,F.Cg)([(0,G.x4W)("proceedButton"),(0,F.Sn)("design:type",$.$)],W.prototype,"_proceedButton",void 0),(0,F.Cg)([(0,G.x4W)("proceedButtonText"),(0,F.Sn)("design:type",G.EYj)],W.prototype,"_proceedButtonText",void 0),W=(0,F.Cg)([(0,G.EVk)("ToolTipManual",H.Y.ui)],W)},97530:(k,B,U)=>{"use strict";U.d(B,{d:()=>it});var F=U(8674),G=U(62459),j=U(65240),$=U(35120),H=U(1195),V=U(73797),W=U(65116),q=U(49037),K=U(93171),z=U(68152),Y=U(44094),Q=U(20952),X=U(28152),Z=U(22866),J=U(34603),tt=U(19633),et=U(86675);let it=class extends G.uAl{init(k){this._achievementData=k;const B=$.q.instance.prodigy.achievements;this._title.text=B.getName(k),this._description.text=B.getDesc(k),this._achievementStars.init(k),this._progressBar.setValue(B.getProgress(k)),this._fractionText.text=B.getCompletionText(k);const U=k.data.reward;if(U){this._rewardIcon.setAsset($.q.instance.prodigy.icon.iconKey(U)).catch(G.RQr.createHandler("Error setting achievement reward image")),this._goButton.GameObject.active=!1,this._claimButton.GameObject.active=!1,this._claimedText.active=!1,this._rewardCheckmark.active=!1;const F=k.data.mapKey;B.isRewardClaimed(k)?(this._claimedText.active=!0,this._rewardCheckmark.active=!0):B.isComplete(k)?this._claimButton.GameObject.active=!0:F?(this._canTeleport.mapTag=F,this._teleport.mapTag=F,this._openTravelConfirm.onOpen.add((k=>k.findComponent(G.bE_).getInjectedValue("bodyTextComponent").text=this._localizer.getText("TRAVEL_CONFIRM_MESSAGE",$.q.instance.prodigy.world.getZone(F.split("-")[0]).name))),this._goButton.GameObject.active=!0):(this._claimButton.inputEnabled=!1,this._claimButton.GameObject.active=!0)}}claimReward(){const k=$.q.instance.prodigy.achievements;(0,z.v)(!k.isRewardClaimed(this._achievementData),"Achievement reward was claimed even though it has already been marked claimed."),this._claimButton.inputEnabled=!1;const B=Y.$.generateUID(),U=this._achievementData.ID;$.q.instance.prodigy.open.gotItem([this._achievementData.data.reward],void 0,void 0,void 0,void 0,void 0,{transaction_id:B,source_type:j.C.Achievement,source_id:U.toString()}),$.q.instance.prodigy.gameContainer.get("c47-20b6").create.achievementComplete({level:this._playerProvider.getLevel(),session_uuid:this._uuidProvider.getUUID(),achievement_name:k.getName(this._achievementData),achievement_id:U,transaction_id:B}).send(),this._playerProvider.player.achievements.complete(U),$.q.instance.game.broadcaster.broadcast(V.f7.ClaimedRewardsUpdated,void 0,[k.getUnclaimedRewards()])}};(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",H.E)],it.prototype,"_playerProvider",void 0),(0,F.Cg)([(0,G.Cdj)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],it.prototype,"_localizer",void 0),(0,F.Cg)([(0,G.Cdj)("2e6-0f71"),(0,F.Sn)("design:type",Q.H)],it.prototype,"_uuidProvider",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],it.prototype,"_title",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],it.prototype,"_description",void 0),(0,F.Cg)([(0,G.MnK)(et.u),(0,F.Sn)("design:type",et.u)],it.prototype,"_achievementStars",void 0),(0,F.Cg)([(0,G.MnK)(K.a),(0,F.Sn)("design:type",K.a)],it.prototype,"_progressBar",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],it.prototype,"_fractionText",void 0),(0,F.Cg)([(0,G.MnK)(J._),(0,F.Sn)("design:type",J._)],it.prototype,"_rewardIcon",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],it.prototype,"_rewardCheckmark",void 0),(0,F.Cg)([(0,G.MnK)(tt.S),(0,F.Sn)("design:type",tt.S)],it.prototype,"_claimButton",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],it.prototype,"_claimedText",void 0),(0,F.Cg)([(0,G.MnK)(tt.S),(0,F.Sn)("design:type",tt.S)],it.prototype,"_goButton",void 0),(0,F.Cg)([(0,G.MnK)(W.$),(0,F.Sn)("design:type",W.$)],it.prototype,"_canTeleport",void 0),(0,F.Cg)([(0,G.MnK)(q.q),(0,F.Sn)("design:type",q.q)],it.prototype,"_teleport",void 0),(0,F.Cg)([(0,G.MnK)(Z.l),(0,F.Sn)("design:type",Z.l)],it.prototype,"_openTravelConfirm",void 0),it=(0,F.Cg)([(0,G.EVk)("InitAchievementCard",X.Y.uiAchievement)],it)},54584:(k,B,U)=>{"use strict";U.d(B,{x:()=>Y});var F=U(8674),G=U(62459),j=U(95891),$=U(99625),H=U(35120),V=U(5269),W=U(2385),q=U(28152),K=U(97530),z=U(48215);let Y=class extends G.uAl{constructor(){super(...arguments),this._onInitComplete=new G.HN0}create(){super.create(),this._scrollView=this.GameObject.findComponentInChildren(W.I)}init(k){const B=this._contentObject.children;for(let F=B.length;--F>=0;)B[F].destroy();this._zoneRequirementText.run(k.data.zone);const U=H.q.instance.prodigy.achievements;j.sortBy(k.achievements,(k=>U.isComplete(k)?k.data.reward?U.isRewardClaimed(k)?2:0:2:1)).forEach((k=>this._prefabLoader.loadFromGUID(k.data.reward?$.l.AchievementCardWithReward:$.l.AchievementCard,this._contentObject).findComponent(K.d).init(k))),this._scrollView.scrollToPercent(100,V.H.Vertical),this._scrollView.resetVelocityWheel(),this._onInitComplete.dispatch()}destroy(){this._onInitComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.Cdj)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],Y.prototype,"_prefabLoader",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"_onInitComplete",void 0),(0,F.Cg)([(0,G.MnK)(z.Y),(0,F.Sn)("design:type",z.Y)],Y.prototype,"_zoneRequirementText",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Y.prototype,"_contentObject",void 0),Y=(0,F.Cg)([(0,G.EVk)("InitAchievementScrollview",q.Y.uiAchievement)],Y)},86675:(k,B,U)=>{"use strict";U.d(B,{u:()=>W});var F=U(8674),G=U(62459),j=U(1195),$=U(68152),H=U(28152),V=U(88022);let W=class extends G.uAl{constructor(){super(...arguments),this._evenStars=[],this._oddStars=[]}init(k){const B=k.data.ranks.length;(0,$.v)(B<=5,`There are over 5 ranks in achievement ${k.ID}: ${k.data.title}`),(0,$.v)(B>0,`There are no ranks in achievement ${k.ID}: ${k.data.title}`);const U=Math.min(this._playerProvider.player.achievements.getProgress(k.ID),B),F=B%2==0;this._evenStarsParent.active=F,this._oddStarsParent.active=!F;const G=F?this._evenStars:this._oddStars,j=(G.length-B)/2,H=[[j,"empty"],[j+U,"star-full"],[j+B,"star-empty"],[G.length,"empty"]];let W=0;for(const[$,q]of H)for(;W<$;)G[W++].updateAsset(V._.General_core_json,q);this._bigStar.active=U>=B}};(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",j.E)],W.prototype,"_playerProvider",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],W.prototype,"_bigStar",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],W.prototype,"_evenStarsParent",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],W.prototype,"_oddStarsParent",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",Array)],W.prototype,"_evenStars",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",Array)],W.prototype,"_oddStars",void 0),W=(0,F.Cg)([(0,G.EVk)("InitAchievementStars",H.Y.uiAchievement)],W)},48215:(k,B,U)=>{"use strict";U.d(B,{Y:()=>H});var F=U(8674),G=U(62459),j=U(40392),$=U(28152);let H=class extends G.uAl{run(k){let B;const U=k&&(B=j.i.BUTTONS_CONFIG.find((B=>B.zone===k)))&&!B.meetsRequirements();this._textObject.active=U,U&&(this._text.text=B.getGenericLockMessage())}};(0,F.Cg)([(0,G.Cdj)("db5-fb6e"),(0,F.Sn)("design:type",Object)],H.prototype,"_featureRequirement",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],H.prototype,"_textObject",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_text",void 0),H=(0,F.Cg)([(0,G.EVk)("SetZoneRequirementText",$.Y.uiAchievement)],H)},17737:(k,B,U)=>{"use strict";U.d(B,{n:()=>H});var F=U(8674),G=U(62459),j=U(44357);var $=U(28152);let H=class extends G.uAl{create(){super.create(),this._defaultBG.active=!0,this._unseenBG.active=!1}run(){(class{static play(k,B,U,G,$,H){return(0,F.sH)(this,void 0,void 0,(function*(){(0,j.Ry)(k,!1),(0,j.Ry)(B,!0),(0,j.Wf)($,H),yield(0,j.yH)(U,{x:.97,y:.97},300),yield(0,j.yH)(U,{x:1.03,y:1.03},200),yield(0,j.yH)(U,{x:.99,y:.99},250),yield(0,j.yH)(U,{x:1,y:1},100),yield(0,j.yH)(G,{x:.96,y:.96},200),yield(0,j.yH)(G,{x:1.04,y:1.04},200),yield(0,j.yH)(G,{x:.98,y:.98},150),yield(0,j.yH)(G,{x:1,y:1},100)}))}}).play(this._defaultBG,this._unseenBG,this._adTransform,this._newIcon,this._title,this._titleTargetPosition.localPosition)}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],H.prototype,"_defaultBG",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],H.prototype,"_unseenBG",void 0),(0,F.Cg)([(0,G.MnK)(G.dLy),(0,F.Sn)("design:type",G.dLy)],H.prototype,"_adTransform",void 0),(0,F.Cg)([(0,G.MnK)(G.dLy),(0,F.Sn)("design:type",G.dLy)],H.prototype,"_newIcon",void 0),(0,F.Cg)([(0,G.MnK)(G.dLy),(0,F.Sn)("design:type",G.dLy)],H.prototype,"_title",void 0),(0,F.Cg)([(0,G.MnK)(G.dLy),(0,F.Sn)("design:type",G.dLy)],H.prototype,"_titleTargetPosition",void 0),H=(0,F.Cg)([(0,G.EVk)("InitializeAd",$.Y.uiAd)],H)},94596:(k,B,U)=>{"use strict";U.d(B,{b:()=>$});var F=U(8674),G=U(62459),j=U(24285);class $ extends G.uAl{constructor(){super(...arguments),this._applyOnCreate=!1,this._filterList=[]}get filterList(){return this._filterList}create(){super.create(),this._renderComponent||(this._renderComponent=this.gameObject.findComponent(G.y4o)),this._renderComponent.getRootContainer()?this.onRootContainerInitialized():this._renderComponent.onRootContainerSet.add((()=>{this.onRootContainerInitialized()}))}destroy(){this._rootContainer&&!this._rootContainer.destroyed&&this.removeFilter(),super.destroy()}onRootContainerInitialized(){this.initialize(),this._applyOnCreate&&this.applyFilter()}initialize(){this._rootContainer=this._renderComponent.getRootContainer(),this._rootContainer&&(this._rootContainer.filters||(this._rootContainer.filters=[]))}reset(){this._rootContainer&&(this.removeFilter(),this._filterList=[],this.initialize(),this.applyFilter())}applyFilter(){var k;(null===(k=this._rootContainer)||void 0===k?void 0:k.filters)&&(this._filterList.forEach((k=>{-1===this._rootContainer.filters.indexOf(k)&&this._rootContainer.filters.push(k)})),j.s.resetCacheAsBitmap(this._rootContainer))}removeFilter(){var k;(null===(k=this._rootContainer)||void 0===k?void 0:k.filters)&&(this._rootContainer.filters=this._rootContainer.filters.filter((k=>!this._filterList.includes(k))),j.s.resetCacheAsBitmap(this._rootContainer))}}(0,F.Cg)([(0,G.Pqz)(G.y4o),(0,F.Sn)("design:type",G.y4o)],$.prototype,"_renderComponent",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_applyOnCreate",void 0)},57349:(k,B,U)=>{"use strict";U.d(B,{$:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(54524);let H=class extends $.K{constructor(){super(...arguments),this._addButtonSignal=new G.HN0}get emptyText(){return this._emptyText}get choosePetText(){return this._choosePetText}get clickToAddText(){return this._clickToAddText}get addSignal(){return this._addButtonSignal}setSelected(k){super.setSelected(k),this._addIcon.active=!k,this._emptyText.active=!k,this._choosePetText.active=k}onCardClick(){super.onCardClick(),this.addButtonClicked()}addButtonClicked(){this.addSignal.dispatch(null,this.teamPosition)}destroy(){this._addButtonSignal.dispose(),super.destroy()}};(0,F.Cg)([(0,G.x4W)("addIcon"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_addIcon",void 0),(0,F.Cg)([(0,G.x4W)("emptyText"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_emptyText",void 0),(0,F.Cg)([(0,G.x4W)("choosePetText"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_choosePetText",void 0),(0,F.Cg)([(0,G.x4W)("clickToAddText"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_clickToAddText",void 0),H=(0,F.Cg)([(0,G.EVk)("EmptyTeamCard",j.Y.uiPet)],H)},42838:(k,B,U)=>{"use strict";U.d(B,{s:()=>V});var F=U(8674),G=U(62459),j=U(28152),$=U(50873),H=U(18280);let V=class extends G.uAl{constructor(){super(...arguments),this._currentMask=null,this._fillMask=null}postCreate(){super.postCreate(),this.createMask(),this.applyMask(this._currentMask)}applyMask(k){this._currentMask=k,this._fillImage.legacyTransform.group.mask=this._currentMask.getGraphicSource()}removeMask(){this._currentMask=null,this._fillImage.legacyTransform.group.mask=null}set fillPercent(k){this._fillMask.setFillPercent(k)}createMask(){const k=new G._mx(this.gameObject);k.addComponent(G.K16),k.name="Mask",this._currentMask=k.addComponent(H.n),this._fillMask=k.addComponent($.k);const B=this._fillImage.legacyTransform.width,U=this._fillImage.legacyTransform.height;this._fillMask.Width=B,this._fillMask.Height=U,k.legacyTransform.x+=.5*B,k.legacyTransform.y+=.5*U}};(0,F.Cg)([(0,G.x4W)("fillImage"),(0,F.Sn)("design:type",G._mx)],V.prototype,"_fillImage",void 0),V=(0,F.Cg)([(0,G.EVk)("FillBarComponent",j.Y.ui)],V)},46168:(k,B,U)=>{"use strict";U.d(B,{Q:()=>J});var F=U(8674),G=U(62459),j=U(68910),$=U(35120),H=U(98013),V=U(37773),W=U(65732),q=U(97317),K=U(22023),z=U(80060),Y=U(49282),Q=U(28152),X=U(44725),Z=U(54524);let J=class extends Z.K{constructor(){super(...arguments),this._editSignal=new G.HN0,this._addMode=!1}get editSignal(){return this._editSignal}get creatureData(){return[this._creatureData]}postCreate(){super.postCreate(),this._bottomPanel.legacyTransform.group.getChildAt(1).exists=!0,this._staticBackgroundContainer.legacyTransform.group.exists=!1}setDisplayCreature(k,B=!1){this.containsPlayer=B,this._creatureData=k.data,this._itemData=k.source,this._displayCreature=k,this.containsPlayer&&this._cardShadow&&(this._cardShadow.active=!1);const U=this.containsPlayer?V.e.getActivePlayerChargedLevelTier():q.Bv.NO_CHARGE,F=V.e.activePlayerHasChargedLevels?q.X$.IDLE:q.X$.HIDDEN;z.d.updateInjectedValues(this.gameObject,{[W.E.ChargedCreatureEffectTier]:U,[W.E.ChargedCreatureEffectDisplayType]:F,MERGE_RANK:0})}get isCardValid(){return!(!this._displayCreature||!this._creatureData)}get name(){return this.containsPlayer?"You!":K.P8.getPetDisplayName(this._itemData,this._creatureData,15)}get tooltipPosition(){return this._tooltipPosition.legacyTransform.group.getGlobalPosition()}get worldPosition(){const k=this.GameObject.legacyTransform.group.worldTransform;return new j.Point(k.tx,k.ty)}onCardClick(){this._addMode?this.sendData(this._creatureData,this.teamPosition):(super.onCardClick(),this.editSignal.dispatch(this,this._creatureData,this.teamPosition))}updateCard(){this.setNameText(this.name);let k=K.P8.getPetLevel(this._creatureData);if(this.containsPlayer){k+=$.q.instance.prodigy.gameContainer.get("306-5359").getChargedLevel()}this.setLevelText(k),this.containsPlayer&&V.e.getActivePlayerChargedLevelTier()!==q.Bv.NO_CHARGE&&(this._levelText.fill=q.Vh);const B=K.P8.getPetDisplayMergeRank(this._displayCreature.data.ID,this._displayCreature.data.uniqueID),U=!(this.containsPlayer||void 0===B);if(this._mergeRankBadge.active=U,U){const k={MERGE_RANK:B,SHOW_MERGE_RANK_BADGE:K.P8.canPetAccessMergeRanks(this._creatureData.ID)};z.d.updateInjectedValues(this.gameObject,k,!0)}this.setCreaturePreview(this._displayCreature),this.setElement(this._creatureData.ID)}setNameText(k){this._nameText.text=null!=k?k:this._nameText.text}setElement(k){this._wizardElementDisplay.active=this.containsPlayer,this._elementDisplay.GameObject.active=!this.containsPlayer,this.containsPlayer||this._elementDisplay.setPetID(k)}setLevelText(k){var B;this._levelText.text=null!==(B=k.toString())&&void 0!==B?B:this._levelText.text}setCreaturePreview(k){this._creaturePreview.addCreature(k,!0)}setDefaultState(){super.setDefaultState(),this._addMode=!1,this._clickPanel.active=!1}setAddMode(){super.setHighlighted(!0),this._addMode=!0,this._clickPanel.active=!0,$.q.instance.prodigy.audio.playSFX(18,"pop")}setEditMode(k){super.setHighlighted(k)}resetCard(){H.l.removeAll(this._creaturePreview.GameObject.legacyTransform.group,!0)}destroy(){var k;(null===(k=this._staticBackgroundContainer)||void 0===k?void 0:k.legacyTransform)&&(this._staticBackgroundContainer.legacyTransform.group.cacheAsBitmap=!1,this._staticBackgroundContainer.legacyTransform.group.destroy()),this._editSignal.dispose(),super.destroy()}};(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],J.prototype,"_nameText",void 0),(0,F.Cg)([(0,G.MnK)(X.u),(0,F.Sn)("design:type",X.u)],J.prototype,"_creaturePreview",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],J.prototype,"_levelText",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_mergeRankBadge",void 0),(0,F.Cg)([(0,G.ERr)(),(0,G.nKb)("clickTextPanel"),(0,F.Sn)("design:type",G._mx)],J.prototype,"_clickPanel",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_tooltipPosition",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_bottomPanel",void 0),(0,F.Cg)([(0,G.ERr)(),(0,G.nKb)("backgroundContainer"),(0,F.Sn)("design:type",G._mx)],J.prototype,"_staticBackgroundContainer",void 0),(0,F.Cg)([(0,G.MnK)(Y.D),(0,F.Sn)("design:type",Y.D)],J.prototype,"_elementDisplay",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_wizardElementDisplay",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_cardShadow",void 0),J=(0,F.Cg)([(0,G.EVk)("FilledTeamCard",Q.Y.uiPet)],J)},16815:(k,B,U)=>{"use strict";U.d(B,{Z:()=>it});var F,G=U(8674),j=U(62459),$=U(50788),H=U(37016),V=U(96989),W=U(49237),q=U(77938),K=U(12472),z=U(76277),Y=U(22023),Q=U(80060),X=U(49282),Z=U(28152),J=U(65231),tt=U(35189),et=U(29834);let it=F=class extends J.s{constructor(){super(...arguments),this._stackBackgrounds=[],this._stackShadows=[],this._isCardInputDisabled=!1,this._onUpdateCanBeEvolved=new j.HN0}get creatureData(){return this._creatureData}get displayedCreature(){var k;return this._creatureData?null!==(k=this._creatureData.find((k=>Y.P8.isPetOnTeam(k))))&&void 0!==k?k:this._creatureData[0]:null}get onInputOver(){return this._cardInteraction.onInputOver}get onInputOut(){return this._cardInteraction.onInputOut}postCreate(){super.postCreate(),this._bottomPanel.legacyTransform.group.getChildAt(1).exists=!0,this._staticBackgroundContainer.legacyTransform.group.exists=!1}setPetData(k,B){var U;super.setItemData(B),this._elementDisplay.setPetID(null!==(U=null==k?void 0:k[0].ID)&&void 0!==U?U:1),this._creatureData=k;for(let F=0;FF.getMergeUpgradeSuggestion(k)));Q.d.updateInjectedValues(this.gameObject,{SHOW_MERGE_RANK_BADGE:B,MERGE_RANK:k,READY_TO_MERGE:U},!0)}}setOnTeamContainer(){this._onTeamContainer.active=this._creatureData.some((k=>Y.P8.isPetOnTeam(k)))}setUpgradeState(){let k=Y.P8.getUpgradeSuggestion(this.displayedCreature);for(let B=0;!k&&Bq.t.getItem("pet",k)),F).length{"use strict";U.d(B,{K:()=>V});var F=U(8674),G=U(62459),j=U(49237),$=U(24382),H=U(35189);class V extends $.j{constructor(){super(...arguments),this._sendDataSignal=new G.HN0,this._sendClickSignal=new G.HN0,this._isCardInputEnabled=!1,this._isSelected=!1,this._containsPlayer=!1}set teamPosition(k){this._teamPosition=k,this._teamPositionText.text=(k+1).toString()}get teamPosition(){return this._teamPosition}get sendDataSignal(){return this._sendDataSignal}get sendClickSignal(){return this._sendClickSignal}get isSelected(){return this._isSelected}set containsPlayer(k){this._containsPlayer=k}get containsPlayer(){return this._containsPlayer}setDefaultState(){this.setSelected(!1),this.enableCardInput(!0),this.enableTransparency(!1)}setPlayerState(){this.setSelected(!1),this.enableCardInput(!1),this.enableTransparency(!1)}setHighlighted(k){this._cardState.SecondState=k}setSelected(k){this._isSelected=k,this.setHighlighted(k),this.enableCardInput(!k)}enableCardInput(k){this._isCardInputEnabled=k,this._cardInteraction.inputEnabled=k}enableTransparency(k){this.GameObject.legacyTransform.group.alpha=k?.7:1}create(){super.create(),this.setDefaultState(),this._cardInteraction.onClick.add((()=>{this.onCardClick()}))}onCardClick(){this.reportClick(),this.setSelected(!0)}reportClick(){this.sendClickSignal.dispatch()}sendData(k,B){this.sendDataSignal.dispatch(k,B)}addClickListener(k){this.sendClickSignal.add(k.onCardClicked,k)}addDataReceiver(k){this.sendDataSignal.add(k.receivePetData,k)}destroy(){this._sendDataSignal.dispose(),this._sendClickSignal.dispose(),super.destroy()}}(0,F.Cg)([(0,G.x4W)("cardInteraction"),(0,F.Sn)("design:type",j.$)],V.prototype,"_cardInteraction",void 0),(0,F.Cg)([(0,G.x4W)("cardState"),(0,F.Sn)("design:type",H.e)],V.prototype,"_cardState",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],V.prototype,"_teamPositionText",void 0)},41851:(k,B,U)=>{"use strict";U.d(B,{v:()=>q});var F,G=U(8674),j=U(62459),$=U(35120),H=U(49237),V=U(76974),W=U(28152);!function(k){k[k.DEFAULT=1]="DEFAULT",k[k.INVERTED=-1]="INVERTED"}(F||(F={}));let q=class extends j.uAl{constructor(){super(...arguments),this.swapSignal=new j.HN0,this.failedSwapSignal=new j.HN0,this.finishEditingSignal=new j.HN0}postCreate(){super.postCreate(),this._rightSwapButton.GameObject.active=!1,this.rightIcons=this._rightSwapButton.GameObject.findComponentsInChildren(j.vYh),this.leftIcons=this._leftSwapButton.GameObject.findComponentsInChildren(j.vYh),this._kennel=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel,this._confirmButton.onClick.add((()=>{$.q.instance.prodigy.audio.playSFX(18,"pop"),this.doneEditing()})),this._leftSwapButton.onClick.add((()=>{this.tryToSwap(this._canSwapLeft,this._leftSwapPosition)})),this._rightSwapButton.onClick.add((()=>{this.tryToSwap(this._canSwapRight,this._rightSwapPosition)}))}tryToSwap(k,B){k?this.swap(B,this._currentTeamPosition):($.q.instance.prodigy.audio.playSFX(67,"button-disabled"),this.failedSwapSignal.dispatch())}setSwapPositions(k){switch(this._currentTeamPosition=k,k){case 0:this._leftSwapPosition=1,this._rightSwapPosition=2,this.flipRightIcons(F.DEFAULT),this.flipLeftIcons(F.DEFAULT);break;case 1:this._leftSwapPosition=2,this._rightSwapPosition=0,this.flipRightIcons(F.DEFAULT),this.flipLeftIcons(F.INVERTED);break;case 2:this._leftSwapPosition=1,this._rightSwapPosition=0,this.flipRightIcons(F.INVERTED),this.flipLeftIcons(F.DEFAULT)}}setSwapButtonsEnabled(){this._canSwapLeft=this._kennel.canSwapPositions(this._currentTeamPosition,this._leftSwapPosition,1),this._canSwapRight=this._kennel.canSwapPositions(this._currentTeamPosition,this._rightSwapPosition,1),this._canSwapLeft?this._leftSwapButton.unlockState():this._leftSwapButton.lockState(V.K.Disabled),this._canSwapRight?this._rightSwapButton.unlockState():this._rightSwapButton.lockState(V.K.Disabled)}movePanel(k){this.gameObject.legacyTransform.group.position.set(k.x,k.y)}flipRightIcons(k){this.rightIcons.forEach((B=>{B.GameObject.legacyTransform.group.scale.y=k}))}flipLeftIcons(k){this.leftIcons.forEach((B=>{B.GameObject.legacyTransform.group.scale.y=k}))}swap(k,B){this.swapSignal.dispatch(k,B)}doneEditing(){this.finishEditingSignal.dispatch()}setActive(k){this.gameObject.active=k}destroy(){this.swapSignal.dispose(),this.finishEditingSignal.dispose(),this.failedSwapSignal.dispose(),super.destroy()}};(0,G.Cg)([(0,j.x4W)("confirmButton"),(0,G.Sn)("design:type",H.$)],q.prototype,"_confirmButton",void 0),(0,G.Cg)([(0,j.x4W)("leftSwapButton"),(0,G.Sn)("design:type",H.$)],q.prototype,"_leftSwapButton",void 0),(0,G.Cg)([(0,j.x4W)("rightSwapButton"),(0,G.Sn)("design:type",H.$)],q.prototype,"_rightSwapButton",void 0),q=(0,G.Cg)([(0,j.EVk)("TeamSwapPanel",W.Y.uiPet)],q)},62053:(k,B,U)=>{"use strict";U.d(B,{I:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{getCustomData(){return{adId:this.adID,value:this._videoMenu.videoPlayer.errorReason?-1:this._videoMenu.getMinimumThresholdReached()}}};(0,F.Cg)([(0,G.MnK)("VideoMenuComponent"),(0,F.Sn)("design:type",Function)],$.prototype,"_videoMenu",void 0),$=(0,F.Cg)([(0,G.EVk)("AppendVideoProgress",j.Y.uiVideo)],$)},83142:(k,B,U)=>{"use strict";U.d(B,{D:()=>G});var F=U(62459);class G extends F.uAl{}},71072:(k,B,U)=>{"use strict";U.d(B,{V:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(46361),V=U(83142);let W=class extends V.D{loadVideoConfig({adID:k,videoID:B,header:U,message:F}){G.Aq$.isDefined(k)&&(this._adID=k),B&&(this.videoID=B),U&&(this.tooltipHeaderKey=U),F&&(this.tooltipMessageKey=F)}open(){this._menuOpener.open().onPrefabLoaded.addOnce((k=>{const B={videoID:this.videoID,adID:this._adID,header:this.tooltipHeaderKey?this._localizer.getText(this.tooltipHeaderKey):void 0,message:this.tooltipMessageKey?this._localizer.getText(this.tooltipMessageKey):void 0,icon:this.tooltipIconAsset};for(const U of k.findComponentsInChildren(V.D))U.loadVideoConfig(B);j.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendPostOpenedEvent(this._adID.toString())}))}destroy(){super.destroy()}};(0,F.Cg)([(0,G.Cdj)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],W.prototype,"_localizer",void 0),(0,F.Cg)([(0,G.MnK)(H.S),(0,F.Sn)("design:type",H.S)],W.prototype,"_menuOpener",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],W.prototype,"videoID",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],W.prototype,"tooltipHeaderKey",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],W.prototype,"tooltipMessageKey",void 0),(0,F.Cg)([(0,G.Bak)(),(0,G.W_S)(),(0,F.Sn)("design:type",String)],W.prototype,"tooltipIconAsset",void 0),W=(0,F.Cg)([(0,G.EVk)("OpenVideo",$.Y.uiVideo)],W)},95429:(k,B,U)=>{"use strict";U.d(B,{k:()=>z});var F=U(8674),G=U(62459),j=U(35120),$=U(49237),H=U(28152),V=U(93963),W=U(62053),q=U(83142),K=U(11682);let z=class extends q.D{constructor(){super(...arguments),this._videoPlayer=null,this._closeButton=null,this._ctaButton=null,this._minThresholdReached=0}get videoPlayer(){return this._videoPlayer}get closeButton(){return this._closeButton}get callToActionButton(){return this._ctaButton}update(){super.update(),this.calculateMinimumThreshold()}loadVideoConfig(k){this.videoPlayer.youtubeID=k.videoID,this.videoPlayer.init(),this._closeMetric.id=k.adID,this._closeMetric2&&(this._closeMetric2.adID=k.adID)}calculateMinimumThreshold(){if(this._videoPlayer&&this._minThresholdReached<100)if(this._videoPlayer.getPlayerState()===K.w.Playing){const k=this._videoPlayer.getPercentPlayed();k>this._minThresholdReached&&(this._minThresholdReached=k)}else this._videoPlayer.getPlayerState()===K.w.Ended&&(this._minThresholdReached=100)}getMinimumThresholdReached(){return this._minThresholdReached}destroy(){j.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendPostClosedEvent(this._closeMetric.id.toString(),this._videoPlayer.isReady),this.closeButton.onClick.dispose(),this.callToActionButton.onClick.dispose(),super.destroy()}};(0,F.Cg)([(0,G.MnK)(K.H),(0,G.Lr6)(0),(0,G.nKb)("videoPlayer"),(0,F.Sn)("design:type",K.H)],z.prototype,"_videoPlayer",void 0),(0,F.Cg)([(0,G.MnK)($.$),(0,G.Lr6)(0),(0,G.nKb)("close"),(0,F.Sn)("design:type",$.$)],z.prototype,"_closeButton",void 0),(0,F.Cg)([(0,G.MnK)($.$),(0,G.Lr6)(0),(0,G.nKb)("callToAction"),(0,F.Sn)("design:type",$.$)],z.prototype,"_ctaButton",void 0),(0,F.Cg)([(0,G.MnK)(V.b),(0,F.Sn)("design:type",V.b)],z.prototype,"_closeMetric",void 0),(0,F.Cg)([(0,G.MnK)(W.I),(0,F.Sn)("design:type",W.I)],z.prototype,"_closeMetric2",void 0),z=(0,F.Cg)([(0,G.EVk)("VideoMenuComponent",H.Y.uiVideo)],z)},11682:(k,B,U)=>{"use strict";U.d(B,{H:()=>W,w:()=>G});var F,G,j=U(8674),$=U(62459),H=U(35120),V=U(28152);!function(k){k[k.Unstarted=-1]="Unstarted",k[k.Ended=0]="Ended",k[k.Playing=1]="Playing",k[k.Paused=2]="Paused",k[k.Buffering=3]="Buffering",k[k.VideoCued=5]="VideoCued"}(G||(G={}));let W=F=class extends $.uAl{constructor(){super(...arguments),this._urlID="",this._autoCreateComponent=!0,this._showControls=!0,this._autoPlay=!0,this._iframe=document.createElement("iframe"),this._canvas=null,this._ytPlayerObject=null,this._onPlayerReady=new $.HN0,this._onPlayerError=new $.HN0,this._onPlayerStateChange=new $.HN0,this._cachedHeightRatio=-1,this._cachedWidthRatio=-1,this._isReady=!1,this._initWaiting=!1,this._isInit=!1,this._errorReason=null}get errorReason(){return this._errorReason}set youtubeID(k){this._urlID=k}get youtubeID(){return this._urlID}set showControls(k){this._showControls=k}get showControls(){return this._showControls}get onPlayerReady(){return this._onPlayerReady}get onPlayerError(){return this._onPlayerError}get onPlayerStateChange(){return this._onPlayerStateChange}get isReady(){return this._isReady}create(){if(super.create(),this._canvas=document.getElementById("game-container").getElementsByTagName("canvas")[0],!F.GOOGLE_YTPLAYER_API_LOADED){const k=document.createElement("script");k.src=`${F.YOUTUBE_BASE_URL}player_api`,k.onerror=()=>{this._errorReason="YTPlayer API failed to load"};const B=document.getElementsByTagName("script")[0];B.parentNode.insertBefore(k,B)}}postCreate(){super.postCreate(),this._autoCreateComponent&&this.init()}init(){this._isInit?this.logError("Attempting to initialize more than once."):(this._isInit=!0,F.GOOGLE_YTPLAYER_API_LOADED?this.createYTPlayerObject():this._initWaiting=!0)}createYTPlayerObject(){if(this._isReady)this.logError("Attempting to create YTPlayer object more than once.");else{if(this._iframe){this._isReady=!0,this._resumeAudioOnRemove=!!H.q.instance.prodigy.audio.currentBgm&&H.q.instance.prodigy.audio.currentBgm.isPlaying,H.q.instance.prodigy.audio.pauseBGM(),this._iframe.setAttribute("class","youtube"),this._iframe.setAttribute("id","ytplayer"),this.updateSrc(),this._iframe.style.position="absolute",this._iframe.style.display="block",this._autoPlay&&(this._iframe.allow="autoplay");document.getElementById("external-ui").appendChild(this._iframe),this.applyTransform()}else this.logError("YouTube iframe is undefined.");this._errorReason="timeout on loading",this._ytPlayerObject=new window.YT.Player("ytplayer",{events:{onReady:()=>{this.onPlayerReadyHandler()},onError:k=>{this.onPlayerErrorHandler(k)},onStateChange:()=>{this.onPlayerStateChangeHandler()}},origin:window.location.origin})}}onPlayerReadyHandler(){this._errorReason=null,this._onPlayerReady.dispatch()}onPlayerErrorHandler(k){switch(k.data){case 2:this._errorReason="Invalid parameter";break;case 5:this._errorReason="HTML 5 player error";break;case 100:this._errorReason="Video not found";break;case 101:this._errorReason="Video not playable"}this._onPlayerError.dispatch()}onPlayerStateChangeHandler(){this._onPlayerStateChange.dispatch()}applyVideoURL(k){this._urlID=k,this._isReady?this.updateSrc():this.logError("Attempting to set url before player is ready. Waiting for initialization.")}updateSrc(){if($.Aq$.isDefined(this._urlID)&&0!==this._urlID.length){let k,B;k=this._showControls?1:0,B=this._autoPlay?1:0,this._iframe.setAttribute("src",`${F.YOUTUBE_BASE_URL}embed/${this._urlID}?autoplay=${B.toString()}&modestbranding=1&controls=${k.toString()}&rel=0&enablejsapi=1`)}else this.logError("YouTube id is required.")}applyTransform(){const k=this._canvas.clientHeight/H.q.instance.game.height,B=this._canvas.clientWidth/H.q.instance.game.width;if(k!==this._cachedHeightRatio||B!==this._cachedWidthRatio){const U=this.GameObject.legacyTransform.width,F=this.GameObject.legacyTransform.height,G=this.GameObject.legacyTransform.x,j=this.GameObject.legacyTransform.y;this._iframe.style.height=k*F+"px",this._iframe.style.width=B*U+"px";const $=k*j,H=B*G;this._iframe.style.top=`${$}px`,this._iframe.style.left=`${H}px`,this._cachedHeightRatio=k,this._cachedWidthRatio=B}}setVisible(k){this._iframe&&(k?(this._iframe.style.visibility="visible",this._iframe.style.display="block"):(this._iframe.style.visibility="hidden",this._iframe.style.display="none"))}playVideo(){var k;(null===(k=this._ytPlayerObject)||void 0===k?void 0:k.playVideo)&&this._ytPlayerObject.playVideo()}stopVideo(k=!1){var B;(null===(B=this._ytPlayerObject)||void 0===B?void 0:B.pauseVideo)&&(this._ytPlayerObject.pauseVideo(),k&&this._ytPlayerObject.seekTo(0))}getPlayerState(){var k;return(null===(k=this._ytPlayerObject)||void 0===k?void 0:k.getPlayerState)?this._ytPlayerObject.getPlayerState():-1}getPercentPlayed(){var k;return(null===(k=this._ytPlayerObject)||void 0===k?void 0:k.getDuration)&&0!==this._ytPlayerObject.getDuration()?Math.floor(this._ytPlayerObject.getCurrentTime()/this._ytPlayerObject.getDuration()*100):0}update(){super.update(),F.GOOGLE_YTPLAYER_API_LOADED&&(this._initWaiting?(this._initWaiting=!1,this.createYTPlayerObject()):this._isReady&&this.applyTransform())}logError(k){$.VyI.log(`YouTubeVideo Component: ${k}`,$.$bb.Verbose)}destroy(){var k;this._resumeAudioOnRemove&&H.q.instance.prodigy.audio.resumeBGM(),this._iframe&&(this._iframe.remove(),this._iframe=null),(null===(k=this._ytPlayerObject)||void 0===k?void 0:k.destroy)&&(this._ytPlayerObject.destroy(),this._ytPlayerObject=null),this._onPlayerReady.dispose(),this._onPlayerError.dispose(),this._onPlayerStateChange.dispose(),super.destroy()}};W.GOOGLE_YTPLAYER_API_LOADED=!1,W.YOUTUBE_BASE_URL="https://www.youtube.com/",(0,j.Cg)([(0,$.W_S)(),(0,$.nKb)("id"),(0,j.Sn)("design:type",String)],W.prototype,"_urlID",void 0),(0,j.Cg)([(0,$.vkK)(),(0,$.nKb)("autoCreate"),(0,j.Sn)("design:type",Boolean)],W.prototype,"_autoCreateComponent",void 0),(0,j.Cg)([(0,$.vkK)(),(0,$.nKb)("showControls"),(0,j.Sn)("design:type",Boolean)],W.prototype,"_showControls",void 0),(0,j.Cg)([(0,$.vkK)(),(0,$.nKb)("autoPlay"),(0,j.Sn)("design:type",Boolean)],W.prototype,"_autoPlay",void 0),W=F=(0,j.Cg)([(0,$.EVk)("YouTubeVideo",V.Y.uiVideo)],W),window.onYouTubeIframeAPIReady=()=>{W.GOOGLE_YTPLAYER_API_LOADED=!0}},31029:(k,B,U)=>{"use strict";U.d(B,{u:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(95383);class V extends G.$KW{generate(k,B){const U=G.Gme.checkboxGroup({id:"closeMenus",labelValue:"Close Menus",inputValue:k.closeMenus}),F=G.Gme.numberGroup({id:"assetId",labelValue:"Asset ID",inputValue:k.assetId}),j=G.NyS.create({id:"onComplete",label:"On FSM Complete",signalValue:k.onComplete,componentGUID:this._componentGuid});return G.XRp.createVertical([U,F,j,this.createVariablesRecordGroup(k,B)])}createVariablesRecordGroup(k,B){var U;const F=Object.keys(null!==(U=k.fsmVariables)&&void 0!==U?U:{}),j=G.XRp.createHorizontal([G.fqe.create({id:"addComponentKey",inputType:"text",inputValue:B.addComponentKey,onChange:(k,B)=>{this._editorAPI.saveComponentMetadata(this._componentGuid,{[k]:B})}}),G.X9M.create({id:"addComponentButton",buttonText:"+ Component",onClick:()=>{B.addComponentKey.length<1||F.includes(B.addComponentKey)||(this._editorAPI.modifyComponent(this._componentGuid,{fsmVariables:Object.assign(Object.assign({},k.fsmVariables),{[B.addComponentKey]:null})}),this._editorAPI.saveComponentMetadata(this._componentGuid,{addComponentKey:void 0}))}})]),$=F.map((B=>G.XRp.createHorizontal([G.Gme.componentPickerGroup({id:B,labelValue:B,componentType:"any",componentGuid:k.fsmVariables[B],propertyPath:["fsmVariables",B],onChange:U=>{this._editorAPI.modifyComponent(this._componentGuid,{fsmVariables:Object.assign(Object.assign({},k.fsmVariables),{[B]:U})})}}),G.X9M.create({id:"removeComponentButton",buttonText:"X",nodeSize:"1of12",onClick:()=>{delete k.fsmVariables[B],this._editorAPI.modifyComponent(this._componentGuid,{fsmVariables:k.fsmVariables})}})])));return $.push(j),G.XRp.createVertical($,{title:"FSM Variables",isContainer:!0,isCollapsible:!0,startCollapsed:!0})}}let W=class extends G.uAl{constructor(){super(...arguments),this.fsmVariables={},this.onStart=new G.HN0,this.onComplete=new G.HN0,this._closeMenus=!0}run(){this.execute(this.assetId,Object.assign({game:j.q.instance.prodigy.game},this.fsmVariables))}execute(k,B,U=null){this._closeMenus&&j.q.instance.prodigy.open.menuCloseAll();const F=j.q.instance.prodigy.notifications;F.pause(this),F.clearNotifications(),this._popupManager&&(this._popupManager.Active=!1),this.onStart.dispatch(B),this.fsmController.execute(this.fsmService.getStateMachine(k),B,(()=>{this._popupManager&&(this._popupManager.Active=!0),F.resume(this),null==U||U(),this.onComplete.dispatch(B)}))}destroy(){this.onStart.dispose(),this.onComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"assetId",void 0),(0,F.Cg)([(0,G.OmD)(),(0,G.MnK)(G.uAl),(0,F.Sn)("design:type",Object)],W.prototype,"fsmVariables",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],W.prototype,"onStart",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],W.prototype,"onComplete",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],W.prototype,"_closeMenus",void 0),(0,F.Cg)([(0,G.Cdj)(G.$Bt.IFSMController),(0,F.Sn)("design:type",Object)],W.prototype,"fsmController",void 0),(0,F.Cg)([(0,G.Cdj)(G.$Bt.FSMService),(0,F.Sn)("design:type",G.CQn)],W.prototype,"fsmService",void 0),(0,F.Cg)([(0,G.Cdj)("PopupHandler"),(0,F.Sn)("design:type",H.Y)],W.prototype,"_popupManager",void 0),W=(0,F.Cg)([(0,G.WR4)(V),(0,G.EVk)("FSM",$.Y.utility)],W)},72012:(k,B,U)=>{"use strict";U.d(B,{y:()=>j});var F=U(8674),G=U(62459);let j=class extends G.uAl{constructor(){super(...arguments),this._currentValue=!1,this._onValueChanged=new G.HN0,this._onValueChangedToTrue=new G.HN0,this._onValueChangedToFalse=new G.HN0}get onValueChanged(){return this._onValueChanged}destroy(){this._onValueChanged.dispose(),this._onValueChangedToTrue.dispose(),this._onValueChangedToFalse.dispose(),super.destroy()}setValue(k){k!==this._currentValue&&(this._currentValue=k,this._onValueChanged.dispatch(),!0===k?this._onValueChangedToTrue.dispatch():!1===k&&this._onValueChangedToFalse.dispatch())}getValue(){return this._currentValue}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"_onValueChanged",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"_onValueChangedToTrue",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"_onValueChangedToFalse",void 0),j=(0,F.Cg)([(0,G.EVk)("BooleanStateBase (abstract)")],j)},59599:(k,B,U)=>{"use strict";U.d(B,{f:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(72012);let H=class extends $.y{create(){var k;super.create(),this.setValue((null===(k=this._saveData)||void 0===k?void 0:k.getData())||this._booleanValue)}setValue(k){super.setValue(k),this._booleanValue=k,this._saveData&&this._saveData.setData(k)}toggleValue(){this.setValue(!this._booleanValue)}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_booleanValue",void 0),(0,F.Cg)([(0,G.MnK)(G.Tyz),(0,F.Sn)("design:type",G.Tyz)],H.prototype,"_saveData",void 0),H=(0,F.Cg)([(0,G.EVk)("BooleanState",j.Y.utility)],H)},37251:(k,B,U)=>{"use strict";U.d(B,{X:()=>q});var F,G=U(8674),j=U(79600),$=U(62459),H=U(3332),V=U(79687),W=U(35120);let q=F=class{constructor(){const k=W.q.instance.prodigy.gameContainer.get("be9-3278"),B=k.getCortexRootURL(),U=k.getMultiplayerRootURL();this.init(`${F.CLIENT_ID}`,{serviceRootURL:B}),this.multiplayer=new H.Multiplayer(`${F.CLIENT_ID}`,U)}setToken(k,B,U,F){j.catalystSDK.setToken(k,B,{header:U,body:F}),"jwt"===k&&B&&this.multiplayer.authenticate(B).catch((k=>{$.VyI.log("[CatalystSDKWrapper] Failed to authenticate multiplayer client",$.$bb.Error)}))}init(k,B){j.catalystSDK.init(k,B),j.catalystSDK.authHandler.setCallback("onRenewJWTError",this.onRenewJWTError.bind(this))}onRenewJWTError(k){W.q.instance.prodigy.gameContainer.get("c97-bd0d").showTokenExpiredPopup()}get cloudScript(){return j.catalystSDK.cloudScript}get mailer(){return j.catalystSDK.mailer}get gameAssetsExperiments(){return j.catalystSDK.gameAssetsExperiments}get featureAccess(){return j.catalystSDK.featureAccess}get genericRequest(){return j.catalystSDK.genericRequest}get authHandler(){return j.catalystSDK.authHandler}get isLoggedIn(){return j.catalystSDK.authHandler.isLoggedIn()}};q.CLIENT_ID=1,q=F=(0,G.Cg)([(0,V.injectable)(),(0,G.Sn)("design:paramtypes",[])],q)},77065:(k,B,U)=>{"use strict";U.d(B,{B:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(38920),H=U(28152);let V=class extends G.uAl{constructor(){super(...arguments),this._speedMS=500,this.onStart=new G.HN0,this.onComplete=new G.HN0,this._autoStart=!1,this._useFormatting=!1,this._tweenObject=null}set initialNumber(k){this._initialNumber=k}set targetNumber(k){this._targetNumber=k}set speedMS(k){this._speedMS=k}create(){super.create(),this._autoStart&&this.startCounter()}startCounter(){if(this._textObject){if(!this._initialNumber){const k=parseInt(this._textObject.text);isNaN(k)||(this._initialNumber=k)}this._tweenObject={target:this._initialNumber},this._activeTween=j.q.instance.game.add.tween(this._tweenObject,this._tweenObject),this._activeTween.to({target:this._targetNumber},this._speedMS,G.GS3.Quadratic.Out,!1),this._activeTween.onUpdate.add((()=>{this.setValue(this._tweenObject.target)})),this._activeTween.onTweenComplete.addOnce((()=>{this.setValue(this._targetNumber),this.onComplete.dispatch(),this._activeTween.destroy()})),this._activeTween.onStart.addOnce((()=>{this.onStart.dispatch()})),this._activeTween.start()}else G.VyI.log("The text component with the number to tween for the CounterTextComponent has not been set.",G.$bb.Error)}setValue(k){!this._textObject.GameObject||this._textObject.GameObject.isDestroyed||this._textObject.GameObject.isMarkedForDestruction||(this._textObject.text=this._useFormatting?(0,$.Hk)(k):Math.floor(k).toString())}destroy(){this.onStart.dispose(),this.onComplete.dispose(),j.q.instance.game.tweens.remove(this._activeTween),super.destroy()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_initialNumber",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_targetNumber",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_speedMS",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],V.prototype,"_textObject",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onStart",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onComplete",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_autoStart",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_useFormatting",void 0),V=(0,F.Cg)([(0,G.EVk)("CounterText",H.Y.ui)],V)},79399:(k,B,U)=>{"use strict";U.d(B,{R:()=>H});var F=U(8674),G=U(62459),j=U(6997),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this.onSemaphoreFired=new G.HN0,this.onSemaphoreCountUpdate=new G.HN0,this._initialCount=1}get semaphore(){return this._semaphore}create(){super.create(),this._initialCount>1&&this.initialize(this._initialCount)}destroy(){this.clear(),this.onSemaphoreFired.dispose(),this.onSemaphoreCountUpdate.dispose(),super.destroy()}decrement(){var k;null===(k=this._semaphore)||void 0===k||k.decrement(),this.onSemaphoreCountUpdate.dispatch()}increment(){var k;null===(k=this._semaphore)||void 0===k||k.increment(),this.onSemaphoreCountUpdate.dispatch()}clear(){var k;null===(k=this._semaphore)||void 0===k||k.destroy(),this._semaphore=null}initialize(k){var B;null===(B=this._semaphore)||void 0===B||B.destroy(),this._semaphore=new j.o,this._semaphore.init((()=>{this.onSemaphoreFired.dispatch()}),k)}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onSemaphoreFired",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onSemaphoreCountUpdate",void 0),(0,F.Cg)([(0,G.g11)(),(0,G.tfT)(G.LkC.greaterThan(0)),(0,F.Sn)("design:type",Number)],H.prototype,"_initialCount",void 0),H=(0,F.Cg)([(0,G.EVk)("CountingSemaphore",$.Y.utility)],H)},93833:(k,B,U)=>{"use strict";U.d(B,{$:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this._runInEditor=!1,this._visible=!0,this._cacheAsBitmap=!1,this._alpha=1,this._name=""}get rootContainer(){return this._rootContainer}get visible(){return this._rootContainer.visible}set visible(k){this._visible=k,this._rootContainer&&(this._rootContainer.visible=k)}get cacheAsBitmap(){return this._rootContainer?this._rootContainer.cacheAsBitmap:this._cacheAsBitmap}set cacheAsBitmap(k){this._cacheAsBitmap=k,this._rootContainer&&(this._rootContainer.cacheAsBitmap=k)}get alpha(){return this._rootContainer?this._rootContainer.alpha:this._alpha}set alpha(k){this._alpha=k,this._rootContainer&&(this._rootContainer.alpha=k)}get mask(){return this._rootContainer?this._rootContainer.mask:null}set mask(k){this._rootContainer&&(k instanceof G.y4o?this._rootContainer.mask=k.getRootContainer():this._rootContainer.mask=k)}get name(){return this._rootContainer?this._rootContainer.name:this._name}set name(k){this._rootContainer?this._rootContainer.name=k:this._name=k}create(){super.create(),this._renderComponent?this._renderComponent.getRootContainer()?this.initializeProperties():this._renderComponent.onRootContainerSet.addOnce(this.initializeProperties,this):G.VyI.log("Could not get root container, this object has no render component",G.$bb.Warning)}initializeProperties(){this._rootContainer=this._renderComponent.getRootContainer(),this._rootContainer.alpha=this._alpha,this._rootContainer.visible=this._visible,this._rootContainer.cacheAsBitmap=this._cacheAsBitmap,this._name&&(this._rootContainer.name=this._name)}};(0,F.Cg)([(0,G.Pqz)(G.y4o),(0,F.Sn)("design:type",G.y4o)],$.prototype,"_renderComponent",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_runInEditor",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_visible",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_cacheAsBitmap",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],$.prototype,"_alpha",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.YLv)("The name to give to the Pixi object this component is attached to"),(0,F.Sn)("design:type",String)],$.prototype,"_name",void 0),$=(0,F.Cg)([(0,G.EVk)("GetRootContainer",j.Y.utility)],$)},70005:(k,B,U)=>{"use strict";U.d(B,{h:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(34829),H=U(28152);let V=class extends G.uAl{create(){super.create(),this.attachUpdateFunction()}attachUpdateFunction(){const k=j.q.instance.prodigy.game.time.events.loop($.A.TARGET_FPS_40_MS,this.GameObject.update,this.GameObject);this.GameObject.onDestroy.addOnce((()=>j.q.instance.prodigy.game.time.events.remove(k)))}};V=(0,F.Cg)([(0,G.EVk)("HookGameObjectUpdate",H.Y.utility)],V)},57502:(k,B,U)=>{"use strict";U.d(B,{W:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(68152),H=U(28152);let V=class extends G.uAl{constructor(){super(...arguments),this.onDialogueAudioComplete=new G.HN0}playAudioSprite(k,B,U){this.playAudioData({tag:k,dataTag:B,soundId:U})}playAudioData(k){(0,$.v)(G.Aq$.isDefined(k),"PlayDialogueAudio needs defined audio data");const B=[k.tag];k.dataTag&&B.push(k.dataTag),j.q.instance.prodigy.load.assets(B,(()=>{j.q.instance.prodigy.audio.playDialogue(k,(()=>{this.onDialogueAudioComplete.dispatch()}))}))}destroy(){this.onDialogueAudioComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onDialogueAudioComplete",void 0),V=(0,F.Cg)([(0,G.EVk)("PlayDialogueAudio",H.Y.utility)],V)},77442:(k,B,U)=>{"use strict";U.d(B,{k:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(36045);let H=class extends $.X{constructor(){super(...arguments),this._inputShapes=[],this._passthroughShapes=[]}isPointOverShape(k){var B;return!!this._inputShapes.some((B=>B.isPointOverShape(k)))&&(null===(B=this._passthroughShapes)||void 0===B?void 0:B.every((B=>B.isPointOverShape(k))))}};(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)($.X),(0,F.Sn)("design:type",Array)],H.prototype,"_inputShapes",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)($.X),(0,F.Sn)("design:type",Array)],H.prototype,"_passthroughShapes",void 0),H=(0,F.Cg)([(0,G.EVk)("PassThroughInputShape",j.Y.inputShapes)],H)},36045:(k,B,U)=>{"use strict";U.d(B,{X:()=>j});var F=U(8674),G=U(62459);let j=class extends G.uAl{isPointOverShape(k){return!0}worldPointToParent(k,B){const U=B.worldMatrix.applyInverse(k);return B.localMatrix.apply(U)}};j=(0,F.Cg)([(0,G.EVk)("Shape (abstract)")],j)},93709:(k,B,U)=>{"use strict";U.d(B,{H:()=>W});var F=U(62459),G=U(35120),j=U(98013),$=U(77938),H=U(17425),V=U(59968);class W extends V.R{constructor(k,B,U,F,G){super(k,B,U,2,F,G),this.game=k,this.source=U,this.assets=this.getListOfAssets(),this.walkIntoBattle=!1}startLoad(){super.startLoad(),this.loading=!0,this.assets=this.getListOfAssets(),G.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this))}setup(k,B){if(!F.Aq$.isDefined(this.game)||!B||!F.Aq$.isDefined(this.assets))return;this.cacheBoss(),j.l.removeAll(this.sprites,!0);const U=this.assets[0];let H;H=G.q.instance.prodigy.assets.getImageBounds(U),this.body=G.q.instance.prodigy.create.sprite(0,0,U),this.sprites.addChild(this.body),this.body.x=-H[0],this.body.y=-H[3];let V=null;try{this.sprites.children.forEach((k=>{k.animations.add("walk",[0,1,2,3,4,5,6,7],10,!0,!0),k.animations.add("stand",[0,1,2,3,4,5,6,7],10,!0,!0)})),V=this.body.animations.add("attack",[8,9,10,11,12,13,14,15],10)}catch(e){this.sprites.children.forEach((k=>{k.animations.add("walk",[0],10,!0,!0),k.animations.add("stand",[0],10,!0,!0)})),V=this.body.animations.add("attack",[0],10)}V.onComplete.add(this.stand,this),this.sprites.children.forEach((k=>{k.animations.play("stand")})),this.setHitbox($.t.getItem("boss",this.source.getID()).metadata.assets.default.hitbox),this.complete=!0,this.loading=!1,this._onLoad.dispatch()}attack(){try{super.attack(),this.sprites.children.forEach((k=>{k.animations.play("attack")}))}catch(e){F.VyI.log("Error trying to play BossContainer Attack animation",F.$bb.Error)}}getListOfAssets(){return W.getAssets(this.source)}static getAssets(k){return k.getAssets()}cacheBoss(){H.K.cacheAssets(this.game,this.getListOfAssets(),H.K.zoneAssetsCached)}setRootOffset(k){this._rootOffset=k?{x:k.x,y:k.y}:{x:0,y:0}}}},30441:(k,B,U)=>{"use strict";U.d(B,{R:()=>V});var F=U(62459),G=U(35120),j=U(91207),$=U(98623),H=U(88022);class V extends $.H{constructor(k,B,U,j,$,V=3e3){super(k,B,U,j,"Chat Bubble"),this.chatID=0,this.dontHide=F.Aq$.isDefined($)&&$,this.durationMS=V,this.add(G.q.instance.prodigy.create.sprite(-38,-72,H._.General_icons_json,"chat/bubble"))}setID(k){F.Aq$.isDefined(this.game)&&(this.visible=!0,this.chatID++,this.scale.x=0,this.scale.y=0,this.game.add.tween(this.scale,this).to({x:1.2,y:1.2},200,F.GS3.Quadratic.Out).to({x:.8,y:1},200,F.GS3.Quadratic.In).to({x:1,y:.8},200,F.GS3.Quadratic.Out).to({x:1,y:1},200,F.GS3.Quadratic.In).start(),F.Aq$.isDefined(this.emote)&&this.emote.destroy(),this.emote=G.q.instance.prodigy.create.sprite(-18,-62,j.E.getIconForType("emote",k),null,null,null,40,40),this.emote.name=`Chat Bubble Icon ${k}`,this.add(this.emote),this.dontHide||this.game.time.events.addTimer(this.durationMS,this.onTimerEvent.bind(this,this.chatID),this))}onTimerEvent(k){k===this.chatID&&(this.visible=!1)}}},59968:(k,B,U)=>{"use strict";U.d(B,{R:()=>ot,W:()=>st});var F=U(8674),G=U(62459),j=U(68910),$=U(88022),H=U(35120),V=U(92150),W=U(77938),q=U(48975),K=U(73797),z=U(23082),Y=U(12676),Q=U(44356),X=U(98623),Z=U(57750),J=(U(34829),U(35564)),tt=U(88253);class et{constructor(k){this.target={x:-1,y:-1},this.lastTargetBroadcasted={x:-1,y:-1},this.lastUpdateCount=0,this.isMainPlayer=!1,this.game=k}setup(k,B,U){this.screen=k,this.creatureContainer=B,this.isMainPlayer=U,this.isMainPlayer&&(this.game.broadcaster.addAppListener(K.pm.MovePlayer,this.onMovePlayer.bind(this),this),this.game.broadcaster.addAppListener(K.pm.StopPlayer,this.onStopPlayer.bind(this),this),this.game.broadcaster.addAppListener(K.pm.GetTarget,this.onGetTarget.bind(this),this),this.onVisibilityChangedBound=this.onVisibilityChanged.bind(this),document.addEventListener("visibilitychange",this.onVisibilityChangedBound,!1))}destroy(){this.isMainPlayer&&(this.game.broadcaster.removeAppListener(K.pm.MovePlayer,this),this.game.broadcaster.removeAppListener(K.pm.StopPlayer,this),this.game.broadcaster.removeAppListener(K.pm.GetTarget,this),document.removeEventListener("visibilitychange",this.onVisibilityChangedBound,!1)),this.creatureContainer=null,this.game=null,this.screen=null,this.onVisibilityChangedBound=null}update(){H.q.instance.prodigy.updateCount%et.UPDATE_INTERVAL==0&&(-1===this.target.x&&-1===this.target.y&&(this.creatureContainer.x>0||this.creatureContainer.y>0)&&(this.target.x=this.creatureContainer.x,this.target.y=this.creatureContainer.y),this.broadcastPosition())}broadcastPosition(){if(this.isMainPlayer&&!this.creatureContainer.evtProc&&(this.lastTargetBroadcasted.x!==this.target.x||this.lastTargetBroadcasted.y!==this.target.y)&&H.q.instance.prodigy.updateCount-this.lastUpdateCount>et.EMIT_MESSAGE&&(G.cj9.distanceSq(this.target.x,this.target.y,this.lastTargetBroadcasted.x,this.lastTargetBroadcasted.y)>et.DISTANCE_THRESHOLD||H.q.instance.prodigy.updateCount-this.lastUpdateCount>2*et.EMIT_MESSAGE)){this.lastUpdateCount=H.q.instance.prodigy.updateCount,this.lastTargetBroadcasted.x=this.target.x,this.lastTargetBroadcasted.y=this.target.y;H.q.instance.prodigy.gameContainer.get("c97-bd0d").emitMessage({action:J.x.Move,data:{target:this.target}})}}onGetTarget(k=!1){if(k)return Object.assign({},this.target);const{x:B,y:U}=this.screen.path.xyToTile(this.target.x,this.target.y);return{x:B,y:U}}onFindPath(k){var B;if(this.game&&k){const U=this.screen.path.xyToTile(k[0].x,k[0].y);this.creatureContainer.setPath(k,null!==(B=this.screen.path.getCallback(U.x,U.y,this.isMainPlayer))&&void 0!==B?B:void 0),this.broadcastPosition()}}setNewTarget(k,B){const U=this.screen.path.xyToTile(k,B);this.screen.path.isNodeOpen(U.x,U.y)&&(this.creatureContainer.x<=0&&this.creatureContainer.y<=0?(this.creatureContainer.x=k,this.creatureContainer.y=B,G.Aq$.isDefined(this.creatureContainer.follow)&&(this.creatureContainer.follow.x=k,this.creatureContainer.follow.y=B-1)):this.target.x===k&&this.target.y===B||this.screen.path.findPath(this.creatureContainer.x,this.creatureContainer.y,k,B,this.isMainPlayer).then((k=>this.onFindPath(k))).catch(G.RQr.createHandler("Unable to find path to target")),this.target.x=k,this.target.y=B)}onMovePlayer(k,B){const U=this.screen.path.xyToTile(k,B);return!!this.screen.path.isNodeOpen(U.x,U.y)&&(this.target.x=k,this.target.y=B,this.screen.path.findPath(this.creatureContainer.x,this.creatureContainer.y,k,B,this.isMainPlayer).then((k=>this.onFindPath(k))).catch(G.RQr.createHandler("Unable to find path to target")),!0)}onVisibilityChanged(){tt.M.isCutscenePlaying||this.onStopPlayer()}onStopPlayer(){this.screen.isMapScreen&&(this.target.x=this.creatureContainer.x,this.target.y=this.creatureContainer.y,this.creatureContainer.stand(),this.creatureContainer.stopMoveTween())}}et.DISTANCE_THRESHOLD=4,et.EMIT_MESSAGE=120,et.UPDATE_INTERVAL=200;class it extends X.H{constructor(k,B,U){super(k,B),this.emoteElement=null,this.setEmoteData(U)}setEmoteData(k){}}it.EMOTE_DURATION=3;var st,nt=U(44661),at=U(85515);class rt{constructor(k,B,U){this.starList=[],this.game=k,this.x=B-10,this.y=U-10,this.animate()}animate(){for(let k=0;k<10;k++)this.addStar(80*k+50*Math.random(),9===k)}finish(){this.game.broadcaster.broadcast(K.hw.Done,this.game,null)}addStar(k,B){const U=H.q.instance.prodigy.create.sprite(this.x+20*Math.random(),this.y+20*Math.random(),$._.General_core_2_json,"user-star");this.starList.push(U),U.anchor.set(.5,.5),U.scale.set(0,0),U.angle+=Math.round(90*Math.random()),this.game.broadcaster.broadcast(K.lc.AddChild,this.game,[U,at.E.OverlayLayer]);const F=.3*Math.random(),j=this.game.add.tween(U.scale,this).to({x:1,y:1},200,G.GS3.Quadratic.Out).delay(k),V=this.game.add.tween(U.scale,this).to({x:1.3,y:1.3},250,G.GS3.Quadratic.InOut),W=this.game.add.tween(U.scale,this).to({x:F+1,y:F+1},250,G.GS3.Quadratic.InOut),q=this.game.add.tween(U.scale,this).to({x:0,y:0},200,G.GS3.Quadratic.In);q.onTweenComplete.add(this.onStarComplete.bind(this,U),U),B&&q.onTweenComplete.add(this.finish.bind(this),this),j.chain(V),V.chain(W),W.chain(q),this.game.add.tween(U,this).to({y:10*Math.random()+90},900,G.GS3.Quadratic.In).delay(k).start(),this.game.add.tween(U,this).to({x:40*Math.random()+279},900,G.GS3.Quadratic.Out).delay(k).start(),j.start()}onStarComplete(k){k.visible=!1}destroy(){this.game.tweens.removeAllFromOwner(this);for(const k of this.starList)k.destroy();this.starList.length=0}}!function(k){k[k.Walk=0]="Walk",k[k.Stand=1]="Stand",k[k.Moonwalk=2]="Moonwalk",k[k.Attack=3]="Attack",k[k.Stopped=4]="Stopped"}(st||(st={}));class ot extends X.H{get OnLoad(){return this._onLoad}constructor(k,B,U,F,j,V){var W;if(super(k,B),this.walkSpeed=1.5,this.ran=!1,this._onLoad=new G.HN0,this.nameText=null,this.chatText=null,this.complete=!1,this.captured=null,this.potionIcon=null,this.potencyIcon=null,this.statusEffects=null,this.onPathFound=new G.HN0,this.onStopped=new G.HN0,this.onStand=new G.HN0,this.locomotion=null,this.speed=10,this.fxQueue=0,this.pairs=null,this.evtProc=!1,this.castDelay=0,this.walkIntoBattle=!0,this.battleShy=!1,this.rt=null,this.nameY=0,this.source=U,this.setScale=G.Aq$.isDefined(F)?F:1,this.x=Math.floor(j),this.y=Math.floor(V),this.ran=this.source.data.hp<=0,this.sprites=H.q.instance.prodigy.create.element(this,0,0),this.indicatorE=H.q.instance.prodigy.create.element(this),this.rt=H.q.instance.prodigy.gameContainer.get("8c1-3c93"),null===(W=this.source.modifiers)||void 0===W?void 0:W.barrier){const k=this.source.modifiers.barrier;this.barrierSprite=H.q.instance.prodigy.create.sprite(0,0,$._.Boss_titan_barrier_json,"1",{x:.5,y:.5},this.addBarrierSpritesheet.bind(this,"deflect",[1,2,3,4,5,6,7,8,9,10])),this.barrierSpriteBreak=H.q.instance.prodigy.create.sprite(0,0,$._.Boss_titan_barrier_break_json,"1",{x:.5,y:.5},this.addBarrierSpritesheet.bind(this,"break",[1,2,3,4,5,6,7,8,9,10])),this.barrierSpriteSpark=H.q.instance.prodigy.create.sprite(-165*k.scale.x,19*k.scale.y,$._.Boss_titan_spark_json,"1",{x:.5,y:.5},this.addBarrierSpritesheet.bind(this,"spark",[1,2,3])),this.add(this.barrierSprite),this.add(this.barrierSpriteBreak),this.add(this.barrierSpriteSpark)}this.nameY=1===F?-130:-230,U instanceof q.s&&(this.nameY=-150),this.nameText=H.q.instance.prodigy.create.nameFont(this,0,this.nameY,""),this.nameText.GameObject.legacyTransform.group.name="name-text",U instanceof q.s&&this.showName(),this.chatText=H.q.instance.prodigy.create.nameFont(this,0,this.nameY,""),this.chatText.FillColor="#FFB600",this.chatText.GameObject.legacyTransform.group.name="chat-text",this.showChat(!1),this.onDestroy.add(this.stopListeners,this),this.initListeners()}showName(k=null){let B=null;B=G.Aq$.isDefined(k)?k:this.source.getName(),G.Aq$.isDefined(B)&&(this.nameText.setText(B),this.nameText.Active=!0)}hideName(){this.nameText.Active=!1,this.nameText.TextObject.TextObject.visible=!1}showChat(k){this.chatText.Active=k,this.chatText.TextObject.TextObject.visible=k}float(k){G.Aq$.isDefined(this.floatTween)?k||(this.sprites.y=this.sprites.oldY,this.floatTween.stop(),delete this.floatTween):k&&(this.sprites.children.length>0?(this.sprites.oldY=this.sprites.y,this.sprites.y=this.sprites.y-10,this.floatTween=this.game.add.tween(this.sprites,this.sprites).to({y:"-=20"},1400,G.GS3.Quadratic.InOut).to({y:"+=20"},1400,G.GS3.Quadratic.InOut).loop(!0),this.floatTween.start()):G.VyI.log("Cannot tween float because sprites has no children",G.$bb.Warning))}chat(k,B,U,F){if(this.game){const G=k+12;this.chatBubble?this.chatBubble.setID(G):this.chatBubble=H.q.instance.prodigy.effects.chatBubble(this,G,B,U,F)}}startChat(k){if(G.Aq$.isDefined(this.game)){const B=this.rt.getPhrase(k);G.Aq$.isDefined(B)&&(G.Aq$.isDefined(this.timer)&&window.clearInterval(this.timer),this.hideName(),this.showChat(!0),this.game.add.tween(this.chatText.GameObject.legacyTransform.group,this).to({y:this.nameText.GameObject.legacyTransform.y-10},500,G.GS3.Quadratic.Out).to({y:this.nameText.GameObject.legacyTransform.y},500,G.GS3.Quadratic.In).start(),this.chatText.setText(`"${B}"`),this.timer=window.setInterval((()=>{this.endChat()}),5e3))}}endChat(){G.Aq$.isDefined(this.timer)&&window.clearInterval(this.timer),this.timer=null,this.chatText.Active=!1,this.showName()}hop(k=100,B=null,U=0,F=20){const j=this.game.add.tween(this,this).to({y:this.y-F},k,G.GS3.Quadratic.Out).to({y:this.y},k,G.GS3.Quadratic.In).start();this.game.add.tween(this,this).to({x:this.x+Math.floor(U/2)},k,G.GS3.Linear.None).to({x:this.x+U},k,G.GS3.Linear.None).start(),G.Aq$.isDefined(B)&&j.onTweenComplete.addOnce(B)}setPath(k,B,U){if(!k||!this.game)return;this.stopMoveTween();const F=G.Aq$.isDefined(U)?U:this.walkSpeed;let j=null,$=null,H=this.x,V=this.y;for(let W=k.length-1;W>=0;W--){const B=k[W];G.Aq$.isDefined(B.x)||(B.x=H),G.Aq$.isDefined(B.y)||(B.y=V);const U=G.cj9.distance(B.x,B.y,H,V);if(0===U)continue;G.Aq$.isDefined(j)||(j=this.game.add.tween(this,this),$=this.game.add.tween(this.sprites.scale,this));const q=Math.abs(this.sprites.scale.x);j.to({x:B.x,y:B.y},6*U/F,G.GS3.Linear.None),$.to({x:B.x>H?q:-q},1,G.GS3.Linear.None),$.to({},6*U/F-100,G.GS3.Linear.None),H=B.x,V=B.y}if(G.Aq$.isDefined(j)){let U=1;const F=()=>{0==--U&&G.Aq$.isDefined(B)&&B(k)};j.onTweenComplete.addOnce(this.stand,this),j.onTweenComplete.addOnce(F),G.Aq$.isDefined(this.onPathFound)&&this.onPathFound.dispatch(k),this.walk(),j.start(),this.moveTween=j,G.Aq$.isDefined($)&&(++U,$.onTweenComplete.addOnce(F),$.start())}else G.Aq$.isDefined(B)&&B(k),this.stand()}setValidPath(k,B,U,F,j=!0){k.findPath(this.x,this.y,B,U,j).then((k=>{this.setPath(k,F)})).catch(G.RQr.createHandler("Unable to find path"))}walk(){this.mode!==st.Walk&&(this.mode=st.Walk,this.playAll("walk"))}flip(){this.sprites.scale.x=-this.sprites.scale.x}faceToward(k){const B=Math.abs(this.sprites.scale.x);this.sprites.scale.x=k>this.x?B:-B}stand(){this.mode!==st.Stand&&(this.mode=st.Stand,this.playAll("stand"),this.x=Math.round(this.x),this.y=Math.round(this.y),this.onStand.dispatch())}playAll(k){const B=this.sprites.children.length;for(let U=0;U{k(),this.source instanceof q.s&&this.sendNpcClickedEvent()}))}sendNpcClickedEvent(){var k,B,U,F,G;const j=""===(null===(B=null===(k=this.source)||void 0===k?void 0:k.name)||void 0===B?void 0:B.getName())?Y.N.Merchant:null===(F=null===(U=this.source)||void 0===U?void 0:U.name)||void 0===F?void 0:F.getName(),$=`NPC_ID_${j}`;H.q.instance.prodigy.gameContainer.get("c47-20b6").gameWorld.sendNpcClickedEvent({npc_name:j,npc_type:null===(G=this.source)||void 0===G?void 0:G.getNpcType(),npc_id:$})}onFxAnimationDone(){this.fxQueue>0&&(this.fxQueue--,0===this.fxQueue&&this.game.broadcaster.broadcast(K.ig.AnimationDone,this.source,[]))}onStarsAdded(){!0===this.game.broadcaster.broadcast(K.J3.GetIsRunning,this.game)&&(this.fxQueue++,this.flyingStars=new rt(this.game,this.x,this.y-(this.height-35)))}onCreatureLevelUp(k,B){this.game.state.current!==z.G.TileScreen&&this.fxQueue++}doBarrierAnimation(){this.barrierSprite.alpha=1,this.barrierSpriteSpark.alpha=1,this.barrierSprite.animations.play("deflect",10),this.barrierSpriteSpark.animations.play("spark",10)}doBarrierBreakAnimation(){this.barrierSpriteBreak.alpha=1,this.barrierSpriteSpark.alpha=1,this.barrierSpriteBreak.animations.play("break",10),this.barrierSpriteSpark.animations.play("spark",10)}addBarrierSpritesheet(k,B,U){U.alpha=0,U.name=k;const F=this.source.modifiers.barrier;U.x+=F.offset.x,U.y+=F.offset.y,U.scale.set(F.scale.x,F.scale.y),U.smoothed=!1;U.animations.add(k,B,10,!1).onComplete.add((()=>{U.alpha=0}),U)}displayDamage(k,B,U,F=H.q.instance.prodigy.effects.characterText.bind(H.q.instance.prodigy.effects)){this.getSource().modifiers.barrier&&(this.getSource().getCurrentHearts()>0?this.doBarrierAnimation():(this.doBarrierBreakAnimation(),k.damage=9999,k.critical=!0,this.retreat())),this.healthOverlay?this.healthOverlay.showDamage(k,B,U,F):G.VyI.log("Health overlay missing from CreatureContainer.",G.$bb.Error)}displayHeal(k,B){this.healthOverlay.showHealingHealthBar(k,B)}createHealthBar(k){return this.nameText&&this.hideName(),this.healthOverlay=null!=k?k:new nt.V(this.game,this),this.healthOverlay}doPuppetBreakAnimation(k){this.healthOverlay.doPuppetBreakAnimation(k)}getHitboxWidth(){return this._hitbox?this._hitbox.width:Math.abs(this.sprites.width)}getHitboxHeight(){return this._hitbox?this._hitbox.height:Math.abs(this.sprites.height)}getHitboxLeft(){return this._hitbox?this._hitbox.xOffset-.5*this._hitbox.width:G.J6z.getLeft(this.sprites)}getHitboxTop(){return this._hitbox?this._hitbox.yOffset-this._hitbox.height:G.J6z.getTop(this.sprites)}getTargetingOffset(){return 0}destroy(k={children:!0}){G.Aq$.isDefined(this.timer)&&window.clearInterval(this.timer),this.timer=null,this.rt=null,this.stopTweens(),this.follow&&this.follow.destroy(),this.follow=null,this.locomotion&&(this.locomotion.destroy(),this.locomotion=null),this.healthOverlay&&(this.healthOverlay.destroy(),this.healthOverlay=null),this.nameText&&this.nameText.GameObject.destroy(),this.nameText=null,this.chatText&&this.chatText.GameObject.destroy(),this.chatText=null,this.chatBubble&&this.chatBubble.destroy(),this.chatBubble=null,this.onPathFound.dispose(),this.onStopped.dispose(),this.onStand.dispose(),this._onLoad.dispose(),this.sprites&&(G.W$e.instance.game.tweens.removeAllFromOwner(this.sprites),this.sprites.destroy()),this.floatTween=null,this.moveTween=null,this.indicatorE&&this.indicatorE.destroy(),this.indicatorE=null,this.flyingStars&&this.flyingStars.destroy(),this.flyingStars=null,this.loadedCallback=null,this.statusEffects&&(this.statusEffects.length=0),this.statusEffects=null,this.pairs&&(this.pairs.length=0),super.destroy(k)}getSource(){return this.source}retreat(k){}shouldPlayRetreatOnDefeat(){return!1}patrol(k,B){this.setPath(k,this.patrol.bind(this,k,B))}}},44661:(k,B,U)=>{"use strict";U.d(B,{V:()=>V});var F=U(62459),G=U(35120),j=U(34829),$=U(14088),H=U(88022);class V{constructor(k,B){this.offset={x:0,y:0},this.game=k,this.target=B,this.healthOverlay=new $.h(k,31,B,[H._.Ui_shared_json]),this.healthOverlay.addOnLoadCallback((()=>{this._healthbar=this.healthOverlay.getUiElement("healthBar"),this._healhBarYOffset=this._healthbar.y,this._healthbar.alpha=0,this._healthbar.setPercentComplete(1),this.puppetControllerBreak=this.healthOverlay.getUiElement("puppetControllerBreak")}))}showDamage(k,B=!1,U,F=G.q.instance.prodigy.effects.characterText.bind(G.q.instance.prodigy.effects)){this.onDisplaysCompleteCallback=U,this.damageObject=k,this._showHealthBar=B,k.miss?this.showMiss():this.showDamageNumbers(F)}showHealingHealthBar(k,B){this._showHealthBar=!0,this._healthbar.setPercentComplete(Math.max(0,this.target.source.getCurrentHearts()-k)/this.target.source.getMaxHearts()),this.showHealthOverlay(B)}getTargetPercent(){return this.target.source.getCurrentHearts()/this.target.source.getMaxHearts()}showHealthOverlay(k){if(this._showHealthBar&&this.healthOverlay&&!j.s.get("GameConstants.Battle.HIDE_TEMP_HEALTHBAR")){this._healthbar.y=this._healhBarYOffset-this.target.getHitboxHeight()+this.offset.y;const B=this.getTargetPercent(),U=this._healthbar.getPercentageComplete();if(F.cj9.isNearlyEqual(B,U))null==k||k();else{const G={percent:U},j=300;this.game.add.tween(this._healthbar,this).to({alpha:1},j,F.GS3.Linear.None,!0);const $=this.game.add.tween(this._healthbar,this);$.to({alpha:0},j,F.GS3.Linear.None,!0,V.DURATION+j),k&&$.onTweenComplete.add(k,this),$.start();const H=this.game.add.tween(G,this).to({percent:B},V.DURATION,F.GS3.Cubic.Out,!1,j);H.onUpdate.add((()=>{this._healthbar.setPercentComplete(G.percent)}),this),H.start()}}else null==k||k()}showMiss(){G.q.instance.prodigy.effects.fadeFlyingImage(this.target.x+this.offset.x,this.target.y+this.offset.y-(this.target.height>>1),H._.General_battle_json,"text-miss"),this.game.time.events.addTimer(V.DURATION,(()=>{F.Aq$.isDefined(this.onDisplaysCompleteCallback)&&this.doCallback()}),this)}showDamageNumbers(k=G.q.instance.prodigy.effects.characterText.bind(G.q.instance.prodigy.effects)){k||(k=G.q.instance.prodigy.effects.characterText),k(`-${this.damageObject.damage}`,this.target.x+this.offset.x,this.target.y+this.offset.y,0,{size:1,fontID:12,mono:44},this.showHealthOverlay.bind(this,this.showCritical.bind(this,k))),this.damageObject.damage>0&&this.showNFactor(k)}showCritical(k=G.q.instance.prodigy.effects.characterText.bind(G.q.instance.prodigy.effects)){this.damageObject.critical&&this.damageObject.damage>0?G.q.instance.prodigy.effects.characterImage(G.q.instance.prodigy.create.sprite(this.target.x+this.offset.x,this.target.y+this.offset.y+50,H._.General_battle_json,"text-critical-hit"),100,this.doCallback.bind(this)):this.showTypeAdvantage(k)}showNFactor(k=G.q.instance.prodigy.effects.characterText.bind(G.q.instance.prodigy.effects)){this.damageObject.nFactor>2&&k(G.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("COMBAT_CAST_BONUS_HIT"),this.target.x+this.offset.x,this.target.y+this.offset.y+50,100,null,null)}showTypeAdvantage(k=G.q.instance.prodigy.effects.characterText.bind(G.q.instance.prodigy.effects)){this.damageObject.elementAdvantage>0&&this.damageObject.damage>0?k(G.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("EFFECT_ATTACK_POWERFUL"),this.target.x+this.offset.x,this.target.y+this.offset.y+50,100,null,(()=>{this.doCallback()})):this.damageObject.elementAdvantage<0&&this.damageObject.damage>0?k(G.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("EFFECT_ATTACK_WEAK"),this.target.x+this.offset.x,this.target.y+this.offset.y+50,100,null,(()=>{this.doCallback()})):this.doCallback()}doPuppetBreakAnimation(k){this.puppetControllerBreak.visible=!0,this.puppetControllerBreak.y-=this.target.getHitboxHeight()-this.offset.y,this.puppetControllerBreak.x+=this.offset.x-120,this.puppetControllerBreak.playAnimation("animation",!1,k)}getOverlay(){return this.healthOverlay}doCallback(){F.Aq$.isDefined(this.onDisplaysCompleteCallback)&&this.onDisplaysCompleteCallback()}destroy(){this._showHealthBar=!1,this.damageObject=null,this.target=null,this.onDisplaysCompleteCallback=null,this._healthbar=null,this.puppetControllerBreak=null,this.game=null,this.healthOverlay&&(this.healthOverlay.destroy(),this.healthOverlay=null)}}V.DURATION=2e3},71857:(k,B,U)=>{"use strict";var F;U.d(B,{$:()=>F}),function(k){k.STAND="idle",k.WALK="walk",k.DIG="dig",k.STOP_TO_IDLE="stop-to-idle",k.IDLE_YAWN="idle-yawn",k.STOP_HEAVY="idle-heavy",k.ATTACK="attack",k.ATTACK_BIG="attack",k.ATTACK2="attack2",k.STAND_FLOAT="idle",k.WALK_FLOAT="idle",k.FLOAT_DIG="dig",k.ATTACK_FLOAT="attack",k.ATTACK2_FLOAT="attack2",k.SETUP="idle",k.DANCE_SHIMMY="dance-shimmy",k.DANCE_HAMMER="dance-hammer",k.DANCE_MOONWALK="dance-moonwalk",k.DANCE_RUNNINGMAN="dance-runningman",k.DANCE_DAB="dance-dab",k.STATIC="static"}(F||(F={}))},99737:(k,B,U)=>{"use strict";U.d(B,{z:()=>V});var F=U(62459),G=U(23082),j=U(95373),$=U(59968),H=U(32740);class V extends H.M{constructor(k,B,U,G,$,H,V){super(k,B,U,G,F.Aq$.isDefined(H)?H:$.x,F.Aq$.isDefined(V)?V:$.y-1,!1),this.onTargetStopped=new F.HN0,F.Aq$.isDefined($)&&(this.followController=new j.u(k,this,$))}update(){super.update(),F.Aq$.isDefined(this.followController)&&this.followController.update()}getPosition(){return this.position}pathTo(k){let B;B=this.game.state.get(G.G.TileScreen).path,B||(B=this.game.state.get(G.G.Museum).path),B?this.setValidPath(B,k.x,k.y,this.targetStopped.bind(this),!0):F.VyI.log("No pathfinder found!",F.$bb.Error)}isMoving(){return this.mode===$.W.Walk}stopMoving(){this.stopMoveTween(),this.stand()}targetStopped(){this.onTargetStopped.dispatch()}destroy(){this.onTargetStopped.dispose(),super.destroy()}}},41538:(k,B,U)=>{"use strict";U.d(B,{g:()=>V});var F=U(62459),G=U(23082),j=U(95373),$=U(59968),H=U(73877);class V extends H.P{constructor(k,B,U,G,$,H,V){var W;super(k,B,U,G,F.Aq$.isDefined(H)?H:null!==(W=null==$?void 0:$.x)&&void 0!==W?W:0,F.Aq$.isDefined(V)?V:(null==$?void 0:$.y)?$.y-1:0,!0),this.onTargetStopped=new F.HN0,F.Aq$.isDefined($)&&(this.followController=new j.u(k,this,$))}update(){super.update(),F.Aq$.isDefined(this.followController)&&this.followController.update()}getPosition(){return this.position}pathTo(k){let B;B=this.game.state.get(G.G.TileScreen).path,B||(B=this.game.state.get(G.G.Museum).path),B?this.setValidPath(B,k.x,k.y,this.targetStopped.bind(this),!0):F.VyI.log("No pathfinder found!",F.$bb.Error)}isMoving(){return this.mode===$.W.Walk}stopMoving(){this.stopMoveTween(),this.stand()}setup(k,B){super.setup(k,B),this.sprites.scale.x=this.setScale,this.sprites.scale.y=this.setScale}targetStopped(){this.onTargetStopped.dispatch()}destroy(){this.onTargetStopped.dispose(),super.destroy()}}},32740:(k,B,U)=>{"use strict";U.d(B,{M:()=>J});var F=U(8674),G=U(62459),j=U(99625),$=U(56942),H=U(51742),V=U(35120),W=U(98013),q=U(77938),K=U(37773),z=U(65732),Y=U(97317),Q=U(17425),X=U(80060),Z=U(59968);class J extends Z.R{constructor(k,B,U,F,j,$,H,V){super(k,B,U,F,j,$),this.newIndicatorTweens=[],2!==F||G.Aq$.isDefined(q.t.getItem("pet",U.data.ID).metadata.assets.default)||(this.sprites.scale.x=this.sprites.scale.y=2),this.forceSimple=H,this.assets=J.getAssets(this.source,this.setScale,this.forceSimple),this.onClick=V}static getAssets(k,B,U,F){const j=q.t.getItem("pet",k.data.ID).metadata.assets;let V=null;V=1!==B&&G.Aq$.isDefined(j.default)?"default":"reduced";let W=[];if("default"===V&&U&&!F&&(V="small"),G.Aq$.isDefined(j.default)&&"spine"===j.default.type)W.push(j.default.assetKey?$.Q[j.default.assetKey]:`spine-${j.default.ID}`);else{const B=k.getID();switch(W.push(`${V}-pet-${B}`),B){case 125:W=W.concat([H.c.Sfx_attack_storm_wrath]);break;case 126:W=W.concat([H.c.Sfx_attack_forest_fury]);break;case 127:W=W.concat([H.c.Sfx_attack_frigid_blast]);break;case 128:W=W.concat([H.c.Sfx_attack_tidal_twister]);break;case 129:W=W.concat([H.c.Sfx_attack_hot_snow])}}return W}startLoad(k){super.startLoad(),this.loading=!0,this.assets=J.getAssets(this.source,this.setScale,this.forceSimple),G.Aq$.isDefined(k)&&(this.assets=this.assets.concat(k)),this.loadPrefabs().then((()=>V.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this)))).catch((k=>{G.VyI.log(`Error loading prefabs for MonsterContainer; ${k.message}`,G.$bb.Error),V.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this))}))}loadPrefabs(){const k=Object.create(null,{loadPrefabs:{get:()=>super.loadPrefabs}});return(0,F.sH)(this,void 0,void 0,(function*(){yield k.loadPrefabs.call(this);const B=V.q.instance.prodigy.gameContainer.get("d0e-64fd"),U=B.loadWithDependenciesFromGUID(j.l.LegacyBattleNewIndicator,null);return U.then((k=>{var B;this.newIndicator=k,(null===(B=this.newIndicator)||void 0===B?void 0:B.legacyTransform)&&this.addChild(this.newIndicator.legacyTransform.group),this.newIndicator.active=!1,this._onLoad.addOnce((()=>{this.initializeNewIndicatorPosition()}))})).catch(G.RQr.createHandler("Error loading NewIndicator for Pet")),X.d.loadWithInjectedValuesAndDependenciesFromGUID(B,j.l.Charged_level_effect_top,{[z.E.ChargedCreatureEffectTier]:K.e.getActivePlayerChargedLevelTier(),[z.E.ChargedCreatureEffectDisplayType]:K.e.activePlayerHasChargedLevels?Y.X$.IDLE:Y.X$.HIDDEN}).then((k=>{this.chargedFxTop=k,this.addChildAt(this.chargedFxTop.findComponent(G.y4o).getRootContainer(),this.children.length-1),this.chargedFxTop.active=!1})).catch(G.RQr.createHandler("Error loading Charged Level Effect (top) for Pet")),X.d.loadWithInjectedValuesAndDependenciesFromGUID(B,j.l.Charged_level_effect_bottom,{[z.E.ChargedCreatureEffectTier]:K.e.getActivePlayerChargedLevelTier(),[z.E.ChargedCreatureEffectDisplayType]:K.e.activePlayerHasChargedLevels?Y.X$.IDLE:Y.X$.HIDDEN}).then((k=>{this.chargedFxBottom=k,this.addChildAt(this.chargedFxBottom.findComponent(G.y4o).getRootContainer(),0),this.chargedFxBottom.active=!1})).catch(G.RQr.createHandler("Error loading Charged Level Effect (bottom) for Pet")),Promise.all([U.promise])}))}setup(k,B){if(!G.Aq$.isDefined(this.game)||G.Aq$.isDefined(B)&&!B||!G.Aq$.isDefined(this.assets))return;W.l.removeAll(this.sprites,!0);const U=this.assets[0];let F=null;const j=q.t.getItem("pet",this.source.data.ID).metadata.assets.default;G.Aq$.isDefined(j)&&(F=j.battleScale);const $=V.q.instance.prodigy.assets.getAsset(U);if(G.Aq$.isDefined($)&&this.setHitbox($.hitbox),G.Aq$.isDefined($)&&G.Aq$.isDefined($.battleScale)?this.battleScale=$.battleScale:G.Aq$.isDefined(F)?this.battleScale=F:this.battleScale=1,this.forceSimple){const k=V.q.instance.prodigy.assets.getImageBounds(U);this.body=V.q.instance.prodigy.create.sprite(0,0,U),this.sprites.addChild(this.body),this.body.x=-k[0],this.body.y=-this.body.height,this.onClick&&(this.body.inputEnabled=!0,this.body.events.onInputDown.add(this.onClick))}else{const k=V.q.instance.prodigy.assets.getImageBounds(U),B=-k[0],F=-k[3];this.body=V.q.instance.prodigy.create.sprite(B,F,U),this.sprites.addChild(this.body),this.onClick&&(this.body.inputEnabled=!0,this.body.events.onInputDown.add(this.onClick)),this.sprites.children.forEach((k=>{k.animations.add("walk",[0,1,2,3,4,5,6,7],10,!0,!0),k.animations.add("stand",[8,9,10,11,12,13,14,15],10,!0,!0)}));try{this.body.animations.add("attack",[16,17,18,19,20,21,22,23],10).onComplete.add(this.stand,this)}catch(e){G.VyI.log(`MonsterContainer setting attack animation failed ${this.name}`,G.$bb.Warning)}this.stand()}Math.abs(this.sprites.scale.x)<=1&&G.Aq$.toggleDisplayObjSmooth(this.sprites,!0),this.complete=!0,this.loading=!1,G.Aq$.isDefined(this.loadedCallback)&&this.loadedCallback(this),this._onLoad.dispatch()}attack(){super.attack(),this.playAll("attack")}damaged(){}getSource(){return this.source}cacheAssets(){Q.K.cacheAssets(this.game,this.assets,Q.K.commonAssetsCached)}setNewIndicatorVisibility(k){this.newIndicator&&(this.newIndicator.active=k,k?this.startNewIndicatorEntryAnimation():this.stopNewIndicatorEntryAnimation())}startNewIndicatorEntryAnimation(){var k;if(this.initializeNewIndicatorPosition(),!(null===(k=this.newIndicator)||void 0===k?void 0:k.legacyTransform))return;const B=this.newIndicator.legacyTransform.group.y;this.newIndicator.legacyTransform.group.y+=30,this.newIndicator.legacyTransform.group.alpha=0;const U=V.q.instance.game.add.tween(this.newIndicator.legacyTransform.group,this).to({y:B-10,alpha:1},500,G.GS3.Quadratic.InOut).start();U.onTweenComplete.addOnce((()=>{this.newIndicatorTweens.push(V.q.instance.game.add.tween(this.newIndicator.legacyTransform.group,this).to({y:B},500,G.GS3.Quadratic.InOut).yoyo(!0).loop(!0).start())})),this.newIndicatorTweens.push(U)}stopNewIndicatorEntryAnimation(){this.newIndicatorTweens.forEach((k=>{k.stop(),k.destroy()})),this.newIndicatorTweens.length=0,this.initializeNewIndicatorPosition()}initializeNewIndicatorPosition(){var k;(null===(k=this.newIndicator)||void 0===k?void 0:k.legacyTransform)&&(this.newIndicator.legacyTransform.group.y=-this.getHitboxHeight(),this.newIndicator.legacyTransform.group.x=-this.getHitboxWidth()/2)}setChargedEffectVisibility(k){this.chargedFxTop.active=k,this.chargedFxBottom.active=k}destroy(k={children:!0}){var B,U,F;null===(B=this.newIndicator)||void 0===B||B.destroy(),this.newIndicator=null,this.stopNewIndicatorEntryAnimation(),null===(U=this.chargedFxTop)||void 0===U||U.destroy(),this.chargedFxTop=null,null===(F=this.chargedFxBottom)||void 0===F||F.destroy(),this.chargedFxBottom=null,this.onClick=null,this.assets.length=0,super.destroy(k)}}},73877:(k,B,U)=>{"use strict";U.d(B,{P:()=>J});var F=U(62459),G=U(68910),j=U(99625),$=U(56942),H=U(35120),V=U(98013),W=U(77938),q=U(83441),K=U(53885),z=U(53661),Y=U(80060),Q=U(62430),X=U(59968),Z=U(32740);class J extends Z.M{constructor(k,B,U,F,G,j,$=!1){super(k,B,U,F,G,j,!0,null),this._walkOnSetup=!1,this._standOnSetup=$;const H=W.t.getItem("pet",this.source.data.ID).metadata.assets;this.monsterAsset=H.spine?H.spine:H.default}startLoad(){this._setupSemaphore=2,super.startLoad(),this.loading=!0,this.assets=this.monsterAsset.assetKey?[$.Q[this.monsterAsset.assetKey]]:[`spine-${this.monsterAsset.ID}`],H.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this))}walk(){(this._walkOnSetup||this.mode!==X.W.Walk)&&(this.mode=X.W.Walk,this._spineAnimator?(this._spineAnimator.playAnimation("walk",!0),this._walkOnSetup=!1):this._walkOnSetup=!0)}stand(){this.mode!==X.W.Stand&&this._spineComponent&&(this.mode=X.W.Stand,this._spineAnimator.playAnimation("idle",!0))}attack(){X.R.prototype.attack.call(this),setTimeout((()=>{this._spineAnimator&&(this._spineAnimator.playAnimation("attack",!1),this._spineAnimator.OnAnimationComplete.addOnce((()=>{this.stand()})))}),10)}getAnimationEventTime(k,B){return F.E3R.getAnimationEventTime(this._spineComponent.getSpine(),k,B)}playAll(k){this._spineAnimator.playAnimation(k,!0)}setup(k,B){if(--this._setupSemaphore>0||!F.Aq$.isDefined(this.game)||F.Aq$.isDefined(B)&&!B||!F.Aq$.isDefined(this.assets))return;if(V.l.removeAll(this.sprites,!0),this._petPrefab)return;const U=H.q.instance.prodigy.gameContainer.get("d0e-64fd");Y.d.loadWithInjectedValuesAndDependenciesFromGUID(U,j.l.SpinePetLegacyTransform,{[z.hi.PetCreatureData]:this.source.data}).then((k=>this.postSetup(k))).catch(F.RQr.createHandler("Error loading Legacy Spine Pet Prefab"))}postSetup(k){if(this.destroyed||k.isDestroyed)return;this._petPrefab=k,this._petPrefab.setLayer(void 0,!0),this._petPrefab.findComponentInChildren(Q.N).setAssetID(this.source.data.ID),this._spineComponent=k.findComponentInChildren(q.O).spineAnimator.spine,this._spineAnimator=k.findComponentInChildren(q.O).spineAnimator;const B=this._spineComponent.GameObject.transform;B.GameObject.parent.transform.setScale(this.setScale,this.setScale),B.GameObject.parent.transform.setScale(F.Aq$.isDefined(this.monsterAsset.flip)&&this.monsterAsset.flip?-this.setScale:this.setScale,this.setScale),this.battleScale=F.Aq$.isDefined(this.monsterAsset.battleScale)?this.monsterAsset.battleScale:1,this.sprites.addChild(k.findComponent(K.u).getRootContainer()),this.sprites.visible=!1,F.Aq$.toggleDisplayObjSmooth(this.sprites,!0),this.complete=!0,this.loading=!1,this._spineComponent.isLoaded?this.onSpineLoadComplete():this._spineComponent.OnLoaded.addOnce((()=>{this.onSpineLoadComplete()}))}onSpineLoadComplete(){this.sprites.visible=!0,this._walkOnSetup?this.walk():this._standOnSetup&&this.stand(),F.Aq$.isDefined(this.loadedCallback)&&this.loadedCallback(this),this._onLoad.dispatch()}initializeNewIndicatorPosition(){var k;(null===(k=this.newIndicator)||void 0===k?void 0:k.legacyTransform)&&(this.newIndicator.legacyTransform.group.x=-this._spineComponent.getSpine().getBounds().width/2,this.newIndicator.legacyTransform.group.y=-this._spineComponent.getSpine().getBounds().height)}setChargedEffectVisibility(k){var B;null===(B=this._spineComponent.getSpine().pixiSpine)||void 0===B||B.hackTextureBySlotName("shadow",k?G.Texture.EMPTY:null),super.setChargedEffectVisibility(k)}destroy(k={children:!0}){this._petPrefab&&this._petPrefab.destroy(),this._petPrefab=null,this._spineComponent=null,super.destroy(k)}}J.DEFAULT_FRAME_RATE=10},37946:(k,B,U)=>{"use strict";U.d(B,{v:()=>vt});var F=U(8674),G=U(62459),j=U(88022),$=U(5491),H=U(35120),V=U(82209),W=U(77938),q=U(66207),K=U(73797),z=U(37193),Y=U(23082),Q=U(35564),X=U(63115),Z=U(83267),J=U(99625),tt=U(98013),et=U(65732),it=U(83441),st=U(44356),nt=U(53885),at=U(32500),rt=U(51941),ot=U(47734),ht=U(80060),ct=U(6476),dt=U(89717),lt=U(39325),ut=U(47389),ft=U(59968),bt=U(71857);class pt extends ft.R{get isMainPlayer(){return this._isMainPlayer}get appearanceConfig(){return this._appearanceConfig}constructor(k,B,U,F,j,$,H=!1,V=null){super(k,B,U,F,j,$),this.clickEnabled=!0,this.animState=bt.$.STATIC,this.lastSmoothing=null,this._isMainPlayer=!1,this.data={},this.flagsToComplete=0,this.collisionHead=null,this.collisionBody=null,this.clickCallback=null,this.forceWeaponVisual=!1,this._isMainPlayer=!!G.Aq$.isDefined(H)&&H,this._appearanceConfig={isPreview:null==V?void 0:V.isPreview,headOnly:null==V?void 0:V.headOnly,hideHat:null==V?void 0:V.hideHat,hideMount:null==V?void 0:V.hideMount,hideWeapon:null==V?void 0:V.hideWeapon,chargeRevealEnabled:null==V?void 0:V.chargeRevealEnabled},G.Aq$.isDefined(pt.smoothOverride)&&(this.lastSmoothing=pt.smoothOverride)}static overrideSmoothing(k){pt.smoothOverride=k}getSlotContainer(k){const B=this._spineComponent.getSpine(),U=B.skeleton;return B.getSlotContainerByIndex(U.findSlotIndex(k))}forceOutfit(k){var B;null===(B=this._playerAppearanceSelector)||void 0===B||B.setAppearance(Object.assign(Object.assign({},this._playerDataProvider.getAppearance()),k)).catch(G.RQr.createHandler("Could not override player appearance"))}startLoad(){super.startLoad(),this.loading=!0,this.postStartLoad()}postStartLoad(){this.setup()}setup(){if(this._playerPrefab)return;const k=H.q.instance.prodigy.gameContainer.get("d0e-64fd"),B={"377-3e7b":this._playerDataProvider,[et.E.ChargeRevealEffectEnabled]:!this._appearanceConfig.headOnly&&this._appearanceConfig.chargeRevealEnabled};if(this._appearanceConfig.headOnly)ht.d.loadWithInjectedValuesAndDependenciesFromGUID(k,J.l.MainPlayerIcon,B).then((k=>this.postSetupPlayerIcon(k))).catch(G.RQr.createHandler("Error loading Main Player Icon Prefab"));else{const U=this.isMainPlayer?J.l.MainPlayer:J.l.RemotePlayer;ht.d.loadWithInjectedValuesAndDependenciesFromGUID(k,U,B).then((k=>this.postSetup(k))).catch(G.RQr.createHandler("Error loading Main Player Prefab"))}}postSetup(k){var B;if(pt.HAS_FINISHED_FIRST_LOAD=!0,this.destroyed||k.isDestroyed)return;this._spineAnimator=k.findComponentInChildren(it.O).spineAnimator,this._spineComponent=this._spineAnimator.spine,this._emoteManagerComponent=k.findComponentInChildren(at.h),this._animationController=k.findComponentInChildren(lt.F),this._morphTransformation=k.findComponentInChildren(dt.R),k.setLayer(void 0,!0),this._playerAppearanceSelector=k.findComponentInChildren(ut.b),this._playerDataProvider||(this._playerDataProvider=k.findComponentInChildren(G.bE_).Container.get("377-3e7b"));const U=this._spineAnimator.GameObject.transform,F=U.localScale.x,j=U.localScale.y;U.setScale(F,j),U.GameObject.parent.transform.setScale(this.setScale,this.setScale);const $=k.findComponent(nt.u).getRootContainer();this.sprites.addChild($),this.sprites.visible=!1,this.setupCollisionBlock(),this.x=Math.round(this.x),this.y=Math.round(this.y),this._playerPrefab=k,null===(B=k.findComponentInChildren(rt.c))||void 0===B||B.onLoadComplete.addOnce((()=>this.onLoadComplete())),this._spineComponent.isLoaded?this.loadAppearance().catch(G.RQr.createHandler("Could not load player appearance")):this._spineComponent.OnLoaded.addOnce((()=>{this.loadAppearance().catch(G.RQr.createHandler("Could not load player appearance"))}))}loadAppearance(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._playerDataProvider.getAppearance();if(!k)throw new Error("Could not load PlayerAppearanceData");return this._appearanceConfig.hideWeapon&&(k.weapon=null),this._playerPrefab.findComponentInChildren(ut.b).setAppearance(k)}))}postSetupPlayerIcon(k){var B,U;if(this.destroyed||k.isDestroyed)return;k.setLayer(void 0,!0),this._spineComponent=k.findComponentInChildren(G.v2j);const F=k.findComponent(nt.u).getRootContainer();this.sprites.addChild(F),this.sprites.visible=!1,this._playerDataProvider||(this._playerDataProvider=k.findComponentInChildren(G.bE_).Container.get("377-3e7b")),null===(B=k.findComponentInChildren(rt.c))||void 0===B||B.onLoadComplete.addOnce((()=>this.onLoadComplete())),k.findComponentInChildren(ot.z).updatePlayerAppearance(null===(U=this._playerDataProvider)||void 0===U?void 0:U.getAppearance()),this.x=Math.round(this.x),this.y=Math.round(this.y),this._playerPrefab=k}cleanup(){tt.l.removeAll(this.sprites,!0),this.sprites.alpha=1}onLoadComplete(){this.handlePostSprites(),G.Aq$.isDefined(this.loadedCallback)&&this.loadedCallback(),this._onLoad.dispatch(),this.complete=!0,this.loading=!1,this.sprites.visible=!0,G.Aq$.isDefined(this.game)&&this.game.broadcaster.broadcast(K.ig.PlayerLoaded,this.game,[this])}handlePostSprites(){this._appearanceConfig.headOnly||this.stand()}setupCollisionBlock(){G.Aq$.isDefined(this.game)&&(this.collisionHead=this.sprites.addChild(H.q.instance.prodigy.create.emptySprite(-40,-100,70*this.sprites.scale.y,60*this.sprites.scale.y)),this.collisionHead.alpha=0,this.collisionHead.events.onInputDown.add(this.playerClicked.bind(this)),this.collisionBody=this.sprites.addChild(H.q.instance.prodigy.create.emptySprite(-30,-41,50*this.sprites.scale.y,40*this.sprites.scale.y)),this.collisionBody.alpha=0,this.collisionBody.events.onInputDown.add(this.playerClicked.bind(this)),this.setSpriteInput(!0))}reload(k){var B;super.reload(k),(null===(B=this._spineComponent)||void 0===B?void 0:B.isLoaded)&&this.loadAppearance().then((()=>this.OnLoad.dispatch())).catch(G.RQr.createHandler("Could not load player appearance"))}setSpriteInput(k){this.collisionHead&&(this.collisionHead.inputEnabled=k),this.collisionBody&&(this.collisionBody.inputEnabled=k),this._playerPrefab&&(this._playerPrefab.findComponentInChildren(ct.T).GameObject.active=k)}randomSetup(){this.source.equipment.setOutfit(Math.floor(56*Math.random()+1)),this.source.equipment.setHat(Math.random()>.4?Math.floor(56*Math.random()+1):null),this.source.equipment.setWeapon(Math.floor(56*Math.random()+1)),this.source.appearance.setHair(Math.floor(15*Math.random())+1,Math.floor(21*Math.random())+1),this.source.appearance.setEyeColor(Math.floor(15*Math.random())+1),this.source.appearance.setFace(Math.floor(15*Math.random())+1),this.source.appearance.setSkinColor(Math.floor(5*Math.random())+1)}setData(){this.data={hair:this.source.appearance.getHair(),eyeColor:this.source.appearance.getEyeColor(),face:this.source.appearance.getFace(),skinColor:this.source.appearance.getSkinColor(),weapon:this.source.equipment.getWeapon(),hat:this.source.equipment.getHat(),boots:this.source.equipment.getBoots(),outfit:G.Aq$.isDefined(this.source.equipment.getOutfit())?this.source.equipment.getOutfit():1},this.data.faceColor=W.t.getItemMetadata("skinColor",this.data.skinColor).faceColor}playerClicked(){G.Aq$.isDefined(this.clickCallback)&&this.clickEnabled&&this.clickCallback()}damaged(){}setNewAnimationState(k,B){this.animState===k&&k===bt.$.WALK||this._appearanceConfig.headOnly||(this._animationController?(G.Aq$.isDefined(this.game)&&this.game.broadcaster.broadcast(K.J8.NewAnimationStateSet,this,[k]),B&&this._spineAnimator.OnAnimationComplete.addOnce(B,this),this.animState=k,this._morphTransformation.isMorphed()?this.playMorphedAnimationState(k):this._animationController.playAnimation(k)):this.loading?this.animState=k:G.VyI.log("ERROR: No AnimationController found on CharacterContainer",G.$bb.Error))}playMorphedAnimationState(k){let B;switch(k){case bt.$.ATTACK:case bt.$.ATTACK_BIG:case bt.$.ATTACK_FLOAT:B=2;break;case bt.$.WALK:B=1;break;case bt.$.WALK_FLOAT:default:B=0}this._morphTransformation.morphedAppearance.animationController.changeState(B)}walk(){this.setNewAnimationState(bt.$.WALK)}stand(){this.x=Math.round(this.x),this.y=Math.round(this.y),this.playStandAnimation()}playStandAnimation(){this.setNewAnimationState(bt.$.STAND)}standStill(){this.setNewAnimationState(bt.$.STATIC)}moonwalk(){this.setNewAnimationState(bt.$.WALK)}dig(k,B){this.setNewAnimationState(bt.$.DIG,(()=>this.animState===bt.$.WALK?this.walk():this.stand())),setTimeout(B,1e3)}attack(){super.attack(),this.setNewAnimationState(bt.$.ATTACK,this.stopHeavy.bind(this))}stopHeavy(){this.setNewAnimationState(bt.$.STOP_HEAVY)}setWeaponHidden(k=!0){this._appearanceConfig.hideWeapon=k,this._playerPrefab&&this.loadAppearance().catch(G.RQr.createHandler("Could not load character appearance"))}dance(k){var B;if(this.stopTweens(),this.isMainPlayer&&H.q.instance.prodigy.gameContainer.get("c47-20b6").playerIdentityAvatar.sendEmoteUsedEvent({emote_name:k,emote_type:st.H.Dance}),k===bt.$.STAND)return void this.stand();const U=null===(B=this._emoteManagerComponent)||void 0===B?void 0:B.emoteAssets.find((B=>B.name===k));U?this.setNewAnimationState(U.name):G.VyI.log(`ERROR: No EmoteAsset found for dance ID ${k}`,G.$bb.Error)}playAnimatedEmote(k){}stopAnimatedEmote(){}update(){super.update(),this.locomotion&&this.locomotion.update(),this.lastSmoothing!==pt.smoothOverride&&(this.lastSmoothing=pt.smoothOverride,this.reload())}destroy(k={children:!0}){this._playerPrefab&&this._playerPrefab.destroy(),this._playerPrefab=null,this._animationController=null,this._spineAnimator=null,this._spineComponent=null,this._emoteManagerComponent=null,this._morphTransformation=null,this._playerAppearanceSelector=null,this.collisionHead=null,this.collisionBody=null,this.clickCallback=null,this._playerDataProvider=null,super.destroy(k)}}pt.IDLE_WAIT_TIME_MIN=1e4,pt.IDLE_WAIT_TIME_MAX=15e3,pt.HAS_FINISHED_FIRST_LOAD=!1,pt.smoothOverride=null;class vt extends pt{get OnTransformTimerCreate(){return this.onTransformTimerCreate}get playerPrefab(){return this._playerPrefab}constructor(k,B,U,F,j,$,W,q=null,z=!1,Y=!0){super(k,B,U,F,j,$,W,q),this.onTransformTimerCreate=new G.HN0,this.onFullyLoaded=new G.HN0,this._disableTransform=!1,this._handleLocomotionEvents=!0,this._transformID=null,this._transformationCompleted=!1,this._mountListener=null,this._isMounted=!1,this._timerForPlayerDataUpdate=0,this._updateTime=null,this._membershipSprite=null,this._playerDataSchema=null,this.secondaryNameText=null,this._secondaryNameYOffset=30,this._playerDataSchema=this.source.data,this._disableTransform=z,this._handleLocomotionEvents=Y,this._playerNameplatePositionY=this.nameText.GameObject.legacyTransform.y,this.isMainPlayer?(this._playerDataProvider=H.q.instance.prodigy.gameContainer.get("e20-0fb0"),this.game.broadcaster.addAppListener(K.n8.MountTogglePressed,this.toggleMount.bind(this),this,"mount"),this._handleLocomotionEvents&&this.game.broadcaster.addAppListener(K.pm.StopPlayer,this.broadcastStopPlayer,this),this.game.broadcaster.addAppListener(K.J8.MorphMarbleCancelled,this.broadcastPlayerTransformCancelled,this)):(this._playerDataProvider=new V.z,this._playerDataProvider.initialize(U)),this.cullable=!0}showName(k=null){if(super.showName(k),this._isMainPlayer&&this._playerDataProvider.player.shouldShowUsernameAbovePlayer()&&(this._playerDataProvider.player.shouldShowWizardNameAbovePlayer()?(this.secondaryNameText||(this.secondaryNameText=H.q.instance.prodigy.create.nameFont(this,0,this.nameY-this._secondaryNameYOffset,"")),this.secondaryNameText.setText(this._playerDataProvider.loginCredentials.username),this.secondaryNameText.StrokeColor=Z.E.USERNAME_DISPLAY_STROKE_COLOR,this.secondaryNameText.StrokeThickness=Z.E.USERNAME_DISPLAY_STROKE_THICKNESS,this.secondaryNameText.FontSize=Z.E.USERNAME_DISPLAY_FONT_SIZE,this.secondaryNameText.Active=!0):(this.nameText.setText(this._playerDataProvider.loginCredentials.username),this.nameText.StrokeColor=Z.E.USERNAME_DISPLAY_STROKE_COLOR,this.nameText.StrokeThickness=Z.E.USERNAME_DISPLAY_STROKE_THICKNESS,this.nameText.FontSize=Z.E.USERNAME_DISPLAY_FONT_SIZE)),this.source.hasMembership()){if(!this._membershipSprite){let k=j._.Ui_common_neutral_json,B="misc/membership-icon-small";if(q.D.isFeatureEnabled()&&this._isMainPlayer){const U=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getMemberTier(),F=z.i.PLAYER_MEMBERSHIP_ICON_IMAGES[U];F&&(k=F.atlas,B=F.frame)}this._membershipSprite=H.q.instance.prodigy.create.sprite(0,0,k,B,new G.I9Y(.5,.5)),this.add(this._membershipSprite)}this.nameText.GameObject.legacyTransform.x=0;const k=-2,B=-2;this._membershipSprite.x=this.nameText.GameObject.legacyTransform.x-.5*this.nameText.TextWidth+k,this._membershipSprite.y=this.nameText.GameObject.legacyTransform.y+.5*this.nameText.TextHeight+B,this.nameText.GameObject.legacyTransform.x+=Math.floor(.5*this._membershipSprite.width),this._membershipSprite.visible=!0}else this._membershipSprite&&(this._membershipSprite.visible=!1),this.nameText.GameObject.legacyTransform.x=0}hideName(){super.hideName(),this.secondaryNameText&&(this.secondaryNameText.Active=!1,this.secondaryNameText.TextObject.TextObject.visible=!1),this._membershipSprite&&(this._membershipSprite.visible=!1)}startLoad(){this._transformID=this.source.transformID,super.startLoad()}setup(){if(super.setup(),this.isTransformed()){this._playerDataSchema.playerTransformation.transformID>-1&&!this._disableTransform&&(this.flagsToComplete++,this.setTransformationContainer(this._playerDataSchema.playerTransformation.transformType,this._playerDataSchema.playerTransformation.transformID),this._transformationCompleted=!0)}}postSetup(k){if(super.postSetup(k),!this.destroyed&&!k.isDestroyed&&(this._spineComponent.getRootContainer().visible=!this.isTransformed(),this._morphTransformation)){const k=()=>(0,F.sH)(this,void 0,void 0,(function*(){return this.updateMountAppearance().catch(G.RQr.createHandler("Failed to update player mount appearance"))}));this._morphTransformation.onPlayerMorphStarted.add(k,this),this._morphTransformation.onPlayerMorphEnded.add(k,this)}}cleanup(){var k,B,U,F;this._morphTransformation&&(null===(k=this._morphTransformation.onPlayerMorphStarted)||void 0===k||k.removeAll(this),null===(B=this._morphTransformation.onPlayerMorphEnded)||void 0===B||B.removeAll(this)),this._mountListener&&(null===(U=this._mountListener.onMount)||void 0===U||U.removeAll(this),null===(F=this._mountListener.onDismount)||void 0===F||F.removeAll(this)),super.cleanup()}handlePostSprites(){var k,B;this._appearanceConfig.headOnly||(this.isTransformed()&&this._playerDataSchema.playerTransformation.transformID>-1&&!this._disableTransform?null===(k=this._morphTransformation)||void 0===k||k.transformPlayerWithoutEffect(this._playerDataSchema.playerTransformation.transformType,this._playerDataSchema.playerTransformation.transformID,this._playerDataSchema.playerTransformation.maxTime,this._playerDataSchema.playerTransformation.timeRemaining):null===(B=this._morphTransformation)||void 0===B||B.clearMorphedAppearanceWithoutEffect(),this._mountListener=this._playerPrefab.findComponentInChildren(X.T),this._mountListener.onMount.add((()=>{this._isMounted=!0,this.adjustNameplatePosition()})),this._mountListener.onDismount.add((()=>{this._isMounted=!1,this.adjustNameplatePosition()})),this._appearanceConfig.hideMount&&this._mountListener.setListenersEnabled(!1),this._mountListener.transformationChecker=this,this.updateMountAppearance().catch(G.RQr.createHandler("Failed to update player mount appearance")),this.animState===bt.$.WALK?(this.animState=bt.$.SETUP,this.walk()):this.stand())}adjustNameplatePosition(){var k;const B=this.isMounted()?-40:0;if(this.nameText.GameObject.legacyTransform.y=this._playerNameplatePositionY+B,null===(k=this._membershipSprite)||void 0===k?void 0:k.visible){const k=-2;this._membershipSprite.y=this.nameText.GameObject.legacyTransform.y+.5*this.nameText.TextHeight+k}this.secondaryNameText&&(this.secondaryNameText.GameObject.legacyTransform.y=this._playerNameplatePositionY-this._secondaryNameYOffset+B)}updateMountAppearance(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B;yield null!==(B=null===(k=this._mountListener)||void 0===k?void 0:k.updateMountAppearance())&&void 0!==B?B:Promise.resolve()}))}onLoadComplete(){var k;this.handlePostSprites(),G.Aq$.isDefined(this.loadedCallback)&&this.loadedCallback(),this._onLoad.dispatch(),this.complete=!0,this.loading=!1;const B=()=>{this.destroyed||(this.sprites.visible=!0,G.Aq$.isDefined(this.game)&&this.game.broadcaster.broadcast(K.ig.PlayerLoaded,this.game,[this]),this.onFullyLoaded.dispatch())},U=null===(k=this._mountListener)||void 0===k?void 0:k.updateMountAppearance();G.Aq$.isDefined(U)?U.then(B).catch(G.RQr.createHandler("Failed to update player mount appearance")):B()}setData(){var k;this.data={hair:this.source.appearance.getHair(),eyeColor:this.source.appearance.getEyeColor(),face:this.source.appearance.getFace(),skinColor:this.source.appearance.getSkinColor(),weapon:this.source.equipment.getWeapon(),hat:this.source.equipment.getHat(),outfit:null!==(k=this.source.equipment.getOutfit())&&void 0!==k?k:1,boots:this.source.equipment.getBoots(),mount:this.source.equipment.getMount()},this.data.faceColor=W.t.getItemMetadata("skinColor",this.data.skinColor).faceColor}broadcastPlayerFullInfo(k){if(this.locomotion){const B={action:Q.x.Info,data:{target:this.locomotion.target,appearance:this.source.appearance.getData(),isMember:this.source.hasMembership()?1:0,equipment:this.source.equipment.getData(),data:this.source.data,team:this.source.data.team}};null!==this.source.coOpTeam&&(B.data.coOpTeam=this.source.coOpTeam),G.Aq$.isDefined(k)&&(B.target=k);H.q.instance.prodigy.gameContainer.get("c97-bd0d").emitMessage(B)}}broadcastStopPlayer(){H.q.instance.prodigy.gameContainer.get("c97-bd0d").emitMessage({action:Q.x.Move,data:{target:{x:this.x,y:this.y}}})}disableMovement(){this.evtProc=!0,this.game.input.enabled=!1,this.setPath([]),this.setNewAnimationState(bt.$.STAND),this.broadcastStopPlayer()}walk(){var k,B;this.isMounted()?(null===(k=this._mountListener)||void 0===k||k.mountComponent.resumeParticles(),null===(B=this._mountListener)||void 0===B||B.mountComponent.playAnimation(bt.$.WALK,.25),this.setNewAnimationState(bt.$.STAND)):this.setNewAnimationState(bt.$.WALK)}stand(){var k,B;this.x=Math.round(this.x),this.y=Math.round(this.y),this.isMounted()?(null===(k=this._mountListener)||void 0===k||k.mountComponent.pauseParticles(),null===(B=this._mountListener)||void 0===B||B.mountComponent.playAnimation(bt.$.STAND,.25)):this.playStandAnimation(),this.onStand.dispatch()}isMounted(){return this._isMounted}toggleMount(){if(this.isMounted())return void this.unmount();let k=this.source.equipment.lastEquippedMount;if(!G.Aq$.isDefined(k)||0===k){const B=this.source.backpack.getBackpackItemsByType("mount");B.length>0&&(k=B[0].ID)}this.mount(k);H.q.instance.prodigy.gameContainer.get("e20-0fb0").player.appearanceChanged=!0}mount(k){G.Aq$.isDefined(k)&&this.source.equipment.setMount(k)}unmount(){var k;this.source.equipment.setMount(null),null===(k=this._mountListener)||void 0===k||k.updateMountAppearance()}setTransformationContainer(k,B){const U=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k===$.V.Pet&&U.encounters.onPetEncountered(B)}setVisible(k){this._spineComponent.getRootContainer().visible=k}transformToItem(k,B,U,F){var G,j;if(k===$.V.Player)return this._playerDataSchema.playerTransformation=null,void this._morphTransformation.clearMorphedAppearance();if(this.isMainPlayer){this.source.transformPlayer(k,B,F);H.q.instance.prodigy.gameContainer.get("c97-bd0d").emitMessage({action:Q.x.Transform,data:{transformType:k,transformID:B,showEffect:U}})}else this.source.transformPlayer(k,B,0);U?null===(G=this._morphTransformation)||void 0===G||G.transformPlayerWithEffect(k,B,F):null===(j=this._morphTransformation)||void 0===j||j.transformPlayerWithoutEffect(k,B,F),this.updateMountAppearance()}resetItemTransformation(k){var B,U,F;this.source.transformPlayer($.V.Player),k?null===(B=this._morphTransformation)||void 0===B||B.clearMorphedAppearance():null===(U=this._morphTransformation)||void 0===U||U.clearMorphedAppearanceWithoutEffect(),null===(F=this.game)||void 0===F||F.broadcaster.broadcast(K.J8.MorphMarbleTimerUpdated)}broadcastPlayerTransformCancelled(){var k;this.source.transformPlayer($.V.Player);H.q.instance.prodigy.gameContainer.get("c97-bd0d").emitMessage({action:Q.x.Transform,data:{showEffect:!0}}),null===(k=this.game)||void 0===k||k.broadcaster.broadcast(K.J8.MorphMarbleTimerUpdated)}update(){var k;if(super.update(),null!==this.source.emoteID&&(this.emote(this.source.emoteID),this.source.emoteID=null),null!==this.source.chatID&&(this.startChat(this.source.chatID),this.source.chatID=null),null!==this.source.danceID){H.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.dance(this.source.danceID),this.source.danceID=null}null===this._updateTime&&(this._updateTime=Date.now());const B=this.game.state.get(Y.G.TileScreen),U=(null==B?void 0:B.isMapScreen)&&B.complete,F=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(this.isMainPlayer&&this._transformationCompleted&&U&&G.Aq$.isDefined(null===(k=this._playerDataSchema.playerTransformation)||void 0===k?void 0:k.timeRemaining)&&F)if(this._playerDataSchema.playerTransformation.timeRemaining>0){const k=Date.now()-this._updateTime;F.data.playerTransformation.timeRemaining-=k,this._timerForPlayerDataUpdate+=k,this._timerForPlayerDataUpdate>=3e4&&(F.updated=!0,this._timerForPlayerDataUpdate=0),this.appearanceConfig.isPreview||this.game.broadcaster.broadcast(K.J8.MorphMarbleTimerUpdated)}else F.data.playerTransformation.transformID>-1&&(this._timerForPlayerDataUpdate=0);this._updateTime=Date.now()}destroy(k={children:!0}){this.isMainPlayer&&(this.game.broadcaster.removeAppListener(K.n8.MountTogglePressed,this,"mount"),this._handleLocomotionEvents&&this.game.broadcaster.removeAppListener(K.pm.StopPlayer,this),this.game.broadcaster.removeAppListener(K.J8.MorphMarbleCancelled,this),this.secondaryNameText&&(this.secondaryNameText.GameObject.destroy(),this.secondaryNameText=null)),this.cleanup(),this._membershipSprite&&this._membershipSprite.destroy(),this._membershipSprite=null,this.onTransformTimerCreate.dispose(),this.onFullyLoaded.dispose(),super.destroy(k)}isTransformed(){return this._playerDataSchema.playerTransformation&&!this._appearanceConfig.headOnly}}},60250:(k,B,U)=>{"use strict";U.d(B,{G:()=>F,I:()=>K});var F,G=U(8674),j=U(62459),$=U(95891),H=U(35120),V=U(93709),W=U(59968),q=U(88022);!function(k){k[k.left=0]="left",k[k.right=1]="right"}(F||(F={}));class K extends V.H{hasBracer(k){return this._hasBracer[k]}get bracerCount(){return $.sumBy(this._hasBracer,(k=>k?1:0))}constructor(k,B,U,F,G){super(k,B,U,F,G),this._hasBracer=[!0,!0],this._shouldBreakBracer=[!1,!1],this._bracerPiles=[null,null],this._parentElement=B,U.onBracerBreak.add(this.setShouldBreakBracer,this)}setup(){this.cacheBoss();const k=H.q.instance.prodigy.create.element(this.sprites,0,0);this._spine=this.game.add.spine(0,0,"default-boss-19"),this.idle(),k.add(this._spine),this.complete=!0;for(const B in F)this._bracerPiles[B]=H.q.instance.prodigy.create.image(0,0,q._.Boss_aspen_extras_json,K.BRACER_PILE_ATLAS_FRAMES[B]),this._bracerPiles[B].visible=!1,this._bracerPiles[B].scale.x=-1,this._bracerPiles[B].anchor.set(.5,1),this._parentElement.addChild(this._bracerPiles[B]);this.castDelay=this.getAnimationEventTime("attack-Bracers_both","cast"),this._onLoad.dispatch()}idle(){const k=this.getBracerStateString();this._spine.setAnimationByName(0,`idle-Bracers_${k}`,!0),this._spine.setToSetupPose()}attack(){W.R.prototype.attack.call(this);const k=this.getBracerStateString();this._spine.setAnimationByName(0,`attack-Bracers_${k}`,!1),this._spine.addAnimationByName(0,`idle-Bracers_${k}`,!0),this._spine.setToSetupPose()}setShouldBreakBracer(k){this._shouldBreakBracer[k]=!0}breakBracers(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=Object.assign({},this._shouldBreakBracer),U=this.getBracerStateString();for(const k in F)this._hasBracer[k]=this._hasBracer[k]&&!this._shouldBreakBracer[k],this._shouldBreakBracer[k]=!1;const G=this.getBracerStateString();yield j.Egh.timeout(k),yield new Promise((k=>{this._spine.setAnimationByName(0,`break-Bracers_${U}-${G}`,!1).onComplete=k,this._spine.setToSetupPose()})),this._spine.setAnimationByName(0,`idle-Bracers_${G}`,!0);for(const k in F)B[k]&&(this._bracerPiles[k].x=this.x+K.BRACER_PILE_OFFSET.x,this._bracerPiles[k].y=this.y+K.BRACER_PILE_OFFSET.y,this._bracerPiles[k].visible=!0)}))}getBracerStateString(){const k=this._hasBracer[F.left],B=this._hasBracer[F.right];return k?B?"both":"left":B?"right":"none"}hideBracerPiles(){for(const k of this._bracerPiles)k.visible=!1}getAnimationEventTime(k,B){return j.E3R.getAnimationEventTime(this._spine,k,B)}update(){this._shouldBreakBracer.some((k=>k))&&this.breakBracers(3e3),super.update()}destroy(){this.source.onBracerBreak.remove(this.setShouldBreakBracer,this),super.destroy()}}K.BRACER_PILE_OFFSET={x:-16,y:29},K.BRACER_PILE_ATLAS_FRAMES=["bracer-pile-l","bracer-pile-r"]},18633:(k,B,U)=>{"use strict";U.d(B,{Z:()=>V});var F=U(62459),G=U(35120),j=U(51742),$=U(56942),H=U(59968);class V extends H.R{constructor(k,B,U,F,G){super(k,B,U,.5,F,G),this._idleState=0,this.game=k,this.source=U,this.assets=[$.Q.Spine_crystal_clumps_json,j.c.Sfx_crystalbreak,j.c.Sfx_crystalclumpdestroy],this.pairs=[],this.walkIntoBattle=!1,U.onHPChange.add(this.damaged,this)}startLoad(){super.startLoad(),this.loading=!0,G.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this))}setup(k,B){var U;if(!this.game||!B||!this.assets)return;const F=$.Q.Spine_crystal_clumps_json;this._spine=this.game.add.spine(0,0,F),this._spine.setAnimationByName(0,"idle-1",!0),this.add(this._spine);const j=G.q.instance.prodigy.assets.getAsset(F),H=null===(U=null==j?void 0:j.data)||void 0===U?void 0:U.hitbox;this.setHitbox(H),this.complete=!0,this.loading=!1,this.createHealthBar().getOverlay().scale.x=-1}attack(){}damaged(){const k=this.source.boss.getConfig().tree.breakThresholds;let B=0;const U=this.source.getCurrentHearts()/this.source.getMaxHearts();for(const F of k)Uthis._idleState&&(G.q.instance.prodigy.audio.playSFX(56,"break",void 0,.25),B===k.length+1&&F.Egh.timeout(V.CRYSTAL_DESTROY_DELAY_MS).then((()=>{G.q.instance.prodigy.audio.playSFX(57,"destroy",void 0,.9)})),this._idleState=B,this._spine.setAnimationByName(0,`crack-${B}`),this._spine.addAnimationByName(0,`idle-${B+1}`,!0))}shouldPlayRetreatOnDefeat(){return!0}retreat(k){k()}destroy(){this.source.onHPChange.remove(this.damaged,this),super.destroy()}}V.CRYSTAL_DESTROY_DELAY_MS=2700},99687:(k,B,U)=>{"use strict";U.d(B,{X:()=>q});var F=U(62459),G=U(95891),j=U(35120),$=U(98013),H=U(26657),V=U(59968),W=U(88022);class q extends V.R{constructor(k,B,U,F,j){super(k,B,U,2,F,j),this.tweens=[],this.idleTween=[],this.attackTween=[],this.atlas="",this.atlas=G.get(U,"source.useShadowAssets",!1)?W._.Boss_gerald_shadow_json:W._.Boss_gerald_json}startLoad(){super.startLoad(),this.loading=!0,j.q.instance.prodigy.load.assets([this.atlas],this.setup.bind(this))}setup(k,B){super.startLoad(),F.Aq$.isDefined(this.sprite)&&$.l.removeAll(this.sprite,!0),this.hideName(),this.sprite=j.q.instance.prodigy.create.element(this.sprites,130,-300),this.sprite.scale.x=-1;const U=17,G=95,V=this.sprite.addChild(j.q.instance.prodigy.create.sprite(U,G,this.atlas,"arm-left-1")),W=22,q=43,K=this.sprite.addChild(j.q.instance.prodigy.create.sprite(W,q,this.atlas,"shoulder")),z=94,Y=216,Q=this.sprite.addChild(j.q.instance.prodigy.create.sprite(z,Y,this.atlas,"leg")),X=62,Z=226,J=this.sprite.addChild(j.q.instance.prodigy.create.sprite(X,Z,this.atlas,"foot-left")),tt=118,et=190,it=this.sprite.addChild(j.q.instance.prodigy.create.sprite(tt,et,this.atlas,"waist")),st=52,nt=46,at=this.sprite.addChild(j.q.instance.prodigy.create.sprite(st,nt,this.atlas,"body")),rt=156,ot=215,ht=this.sprite.addChild(j.q.instance.prodigy.create.sprite(rt,ot,this.atlas,"leg")),ct=163,dt=224,lt=this.sprite.addChild(j.q.instance.prodigy.create.sprite(ct,dt,this.atlas,"foot-right")),ut=193,ft=94,bt=this.sprite.addChild(j.q.instance.prodigy.create.sprite(ut,ft,this.atlas,"arm-right-1")),pt=69,vt=15,gt=this.sprite.addChild(j.q.instance.prodigy.create.sprite(pt,vt,this.atlas,"head")),mt=67,yt=58,_t=this.sprite.addChild(j.q.instance.prodigy.create.sprite(mt,yt,this.atlas,"jaw")),Et=131,wt=43,Tt=this.sprite.addChild(j.q.instance.prodigy.create.sprite(Et,wt,this.atlas,"shoulder"));this.idleTween.push(new H.s(gt)),this.idleTween[0].set("x",[pt,pt-4,pt-9,pt-11,pt-11,pt-6,pt-3,pt,pt+3,pt+4,pt+4,pt+2],100,9999),this.idleTween.push(new H.s(gt)),this.idleTween[1].set("y",[vt,vt,vt+3,vt+6,vt+8,vt+10,vt+11,vt+9,vt+7,vt+5,vt+3,vt+2],100,9999),this.idleTween.push(new H.s(_t)),this.idleTween[2].set("x",[mt,mt-3,mt-9,mt-9,mt-9,mt-5,mt-2,mt,mt+3,mt+4,mt+4,mt+2],100,9999),this.idleTween.push(new H.s(_t)),this.idleTween[3].set("y",[yt,yt+2,yt+7,yt+14,yt+16,yt+17,yt+16,yt+12,yt+9,yt+5,yt+3,yt+2],100,9999),this.idleTween.push(new H.s(Tt)),this.idleTween[4].set("x",[Et,Et-2,Et-3,Et-3,Et-3,Et-2,Et-1,Et+1,Et+2,Et+3,Et+3,Et+1],100,9999),this.idleTween.push(new H.s(Tt)),this.idleTween[5].set("y",[wt,wt+2,wt+4,wt+5,wt+6,wt+6,wt+6,wt+4,wt+4,wt+3,wt+3,wt+1],100,9999),this.idleTween.push(new H.s(V)),this.idleTween[6].set("frameName",["arm-left-1","arm-left-1","arm-left-2","arm-left-3","arm-left-3","arm-left-3","arm-left-3","arm-left-2","arm-left-1","arm-left-1","arm-left-1","arm-left-1"],100,9999);const St=10,At=100,Ct=7,Ot=103,It=196,Dt=101,Rt=196,Pt=106;this.idleTween.push(new H.s(bt)),this.idleTween[7].set("x",[ut,ut+1,It,Rt,Rt-4,Rt-6,Rt-7,It-4,ut-1,ut-2,ut-2,ut-1],100,9999),this.idleTween.push(new H.s(bt)),this.idleTween[8].set("y",[ft,ft+2,Dt,Pt,Pt+6,Pt+5,Pt+4,Dt+4,ft+7,ft+4,ft+2,ft+1],100,9999),this.idleTween.push(new H.s(K)),this.idleTween[9].set("x",[W,W+2,W+3,W+3,W+3,W+2,W+1,W-1,W-2,W-3,W-3,W-1],100,9999),this.idleTween.push(new H.s(K)),this.idleTween[10].set("y",[q,q+2,q+4,q+5,q+6,q+6,q+6,q+4,q+4,q+2,q,q-1],100,9999),this.idleTween.push(new H.s(bt)),this.idleTween[11].set("frameName",["arm-right-1","arm-right-1","arm-right-2","arm-right-3","arm-right-3","arm-right-3","arm-right-3","arm-right-2","arm-right-1","arm-right-1","arm-right-1","arm-right-1"],100,9999),this.idleTween.push(new H.s(V)),this.idleTween[12].set("x",[U,U+3,St+6,Ct,Ct+1,Ct+2,Ct+4,St+4,U+1,U+2,U+3,U+2],100,9999),this.idleTween.push(new H.s(V)),this.idleTween[13].set("y",[G,G+2,At+7,Ot,Ot+1,Ot,Ot-1,At,G+2,G+1,G,G-2],100,9999),this.idleTween.push(new H.s(Q)),this.idleTween[14].set("x",[z,z-1,z-1,z-1,z-1,z-1,z,z,z,z,z,z],100,9999),this.idleTween.push(new H.s(Q)),this.idleTween[15].set("y",[Y,Y,Y+1,Y+1,Y+1,Y+1,Y+1,Y,Y,Y,Y,Y],100,9999),this.idleTween.push(new H.s(J)),this.idleTween[16].set("x",[X],100,9999),this.idleTween.push(new H.s(J)),this.idleTween[17].set("y",[Z],100,9999),this.idleTween.push(new H.s(ht)),this.idleTween[18].set("x",[rt,rt+1,rt+1,rt+1,rt+1,rt+1,rt,rt,rt,rt,rt,rt],100,9999),this.idleTween.push(new H.s(ht)),this.idleTween[19].set("y",[ot,ot,ot+1,ot+1,ot+1,ot+1,ot+1,ot,ot,ot,ot,ot],100,9999),this.idleTween.push(new H.s(lt)),this.idleTween[20].set("x",[ct],100,9999),this.idleTween.push(new H.s(lt)),this.idleTween[21].set("y",[dt],100,9999),this.idleTween.push(new H.s(at)),this.idleTween[22].set("x",[st,st-1,st-1,st-1,st-1,st,st+1,st+2,st+3,st+3,st+3,st+3],100,9999),this.idleTween.push(new H.s(at)),this.idleTween[23].set("y",[nt,nt+1,nt+2,nt+3,nt+4,nt+5,nt+4,nt+3,nt+2,nt+1,nt,nt-1],100,9999),this.idleTween.push(new H.s(it)),this.idleTween[24].set("x",[tt,tt-1,tt-1,tt-1,tt-1,tt,tt+1,tt+2,tt+3,tt+3,tt+3,tt+2],100,9999),this.idleTween.push(new H.s(it)),this.idleTween[25].set("y",[et,et+2,et+4,et+6,et+8,et+9,et+8,et+6,et+4,et+2,et,et-1],100,9999),this.idleTween.push(new H.s(V)),this.idleTween[26].set("angle",[0],100,9999),this.idleTween.push(new H.s(V)),this.idleTween[27].set("visible",[!0],100,9999),this.attackTween.push(new H.s(gt)),this.attackTween[0].set("x",[pt,pt-6,pt-15,pt-27,pt-32,pt-34,pt-33,pt-30,pt-19,pt-7],100,9999),this.attackTween.push(new H.s(gt)),this.attackTween[1].set("y",[vt,vt+6,vt+13,vt+20,vt+22,vt+22,vt+20,vt+16,vt+12,vt+5],100,9999),this.attackTween.push(new H.s(_t)),this.attackTween[2].set("x",[mt,mt-6,mt-14,mt-26,mt-31,mt-33,mt-32,mt-29,mt-18,mt-7],100,9999),this.attackTween.push(new H.s(_t)),this.attackTween[3].set("y",[yt,yt+8,yt+20,yt+29,yt+31,yt+31,yt+29,yt+23,yt+13,yt+7],100,9999),this.attackTween.push(new H.s(Tt)),this.attackTween[4].set("x",[W,W-4,W+5,W+12,W+16,W+19,W+21,W+25,W+22,W+15],100,9999),this.attackTween.push(new H.s(K)),this.attackTween[5].set("y",[q,q,q-5,q-10,q-11,q-10,q-9,q-5,q,q+2],100,9999),this.attackTween.push(new H.s(V)),this.attackTween[6].set("frameName",["arm-left-1","arm-left-1","arm-left-1","arm-left-4","arm-left-2","arm-left-5","arm-left-3","arm-left-4","arm-left-4","arm-left-4"],100,9999),this.attackTween.push(new H.s(V)),this.attackTween[7].set("x",[U,U-5,U-8,U-42-15,U-47+90,U+15+50,U+82+20,U+81+80,U,U+-38],100,9999),this.attackTween.push(new H.s(V)),this.attackTween[8].set("y",[G,G-4,G-13,G+73-100,G+34-65-20,G+45-185,G-48+40,G+17,G,G+112],100,9999),this.attackTween.push(new H.s(Tt)),this.attackTween[9].set("x",[Et,Et-8,Et-36,Et-44,Et-48,Et-51,Et-48,Et-42,Et-30,Et-6],100,9999),this.attackTween.push(new H.s(Tt)),this.attackTween[10].set("y",[wt,wt+25,wt+48,wt+52,wt+55,wt+54,wt+54,wt+47,wt+38,wt+13],100,9999),this.attackTween.push(new H.s(bt)),this.attackTween[11].set("frameName",["arm-right-1","arm-right-4","arm-right-5","arm-right-5","arm-right-5","arm-right-5","arm-right-5","arm-right-5","arm-right-4","arm-right-1"],100,9999),this.attackTween.push(new H.s(bt)),this.attackTween[12].set("x",[193,132,58,39,34,35,45,58,127,187],100,9999),this.attackTween.push(new H.s(bt)),this.attackTween[13].set("y",[94,125,162,162,162,162,162,162,135,108],100,9999),this.attackTween.push(new H.s(Q)),this.attackTween[14].set("x",[z,z-2,z-5,z-18,z-21,z-22,z-21,z-19,z-12,z-5],100,9999),this.attackTween.push(new H.s(Q)),this.attackTween[15].set("y",[Y,Y-2,Y-3,Y,Y,Y+1,Y+1,Y+1,Y+1,Y+1],100,9999),this.attackTween.push(new H.s(J)),this.attackTween[16].set("x",[X,X-1,X-7,X-23,X-24,X-23,X-22,X-21,X-15,X-11],100,9999),this.attackTween.push(new H.s(J)),this.attackTween[17].set("y",[Z,Z-9,Z-16,Z,Z,Z,Z,Z,Z,Z],100,9999),this.attackTween.push(new H.s(ht)),this.attackTween[18].set("x",[rt,rt,rt,rt-4,rt-7,rt-8,rt-8,rt-6,rt-3,rt-1],100,9999),this.attackTween.push(new H.s(ht)),this.attackTween[19].set("y",[ot,ot,ot,ot,ot,ot,ot,ot,ot,ot],100,9999),this.attackTween.push(new H.s(lt)),this.attackTween[20].set("x",[ct,ct,ct-2,ct-5,ct-6,ct-6,ct-5,ct-3,ct-2,ct],100,9999),this.attackTween.push(new H.s(lt)),this.attackTween[21].set("y",[dt,dt,dt,dt,dt,dt,dt,dt,dt,dt],100,9999),this.attackTween.push(new H.s(at)),this.attackTween[22].set("x",[st,st-3,st-8,st-11,st-12,st-13,st-12,st-11,st-8,st-3],100,9999),this.attackTween.push(new H.s(at)),this.attackTween[23].set("y",[nt,nt+4,nt+6,nt+7,nt+7,nt+7,nt+7,nt+7,nt+6,nt+3],100,9999),this.attackTween.push(new H.s(it)),this.attackTween[24].set("x",[tt,tt-3,tt-8,tt-11,tt-12,tt-13,tt-12,tt-11,tt-8,tt-3],100,9999),this.attackTween.push(new H.s(it)),this.attackTween[25].set("y",[et,et+4,et+6,et+7,et+7,et+7,et+7,et+7,et+6,et+3],100,9999),this.attackTween.push(new H.s(V)),this.attackTween[26].set("angle",[0,0,0,0,90,90,180,180,270,270],100,9999),this.attackTween.push(new H.s(V)),this.attackTween[27].set("visible",[!0,!0,!0,!0,!0,!0,!0,!0,!1,!1],100,9999),this.attackTween[0].end(this.playIdle.bind(this)),this.playIdle(),this.complete=!0,this.loading=!1,this._onLoad.dispatch()}playIdle(){if(1!==this.mode){this.mode=1,this.tweens=this.idleTween;for(let k=0;k{"use strict";U.d(B,{K:()=>W});var F=U(62459),G=U(35120),j=U(98013),$=U(17425),H=U(59968),V=U(56942);class W extends H.R{constructor(k,B,U,F,G){super(k,B,U,1,F,G),this._spine=null,this.game=k,this.source=U,this.assets=[V.Q.Default_boss_17_json],this.pairs=[]}startLoad(){super.startLoad(),this.loading=!0,G.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this))}setup(k,B){F.Aq$.isDefined(this.game)&&B&&F.Aq$.isDefined(this.assets)&&(j.l.removeAll(this.sprites,!0),this._spine=this.game.add.spine(0,0,V.Q.Default_boss_17_json),this._spine.setToSetupPose(),this._spine.setAnimationByName(0,"mound-blue",!1),this.sprites.addChild(this._spine),this.complete=!0,this.loading=!1,this.createHealthBar())}attack(){}cacheBoss(){$.K.cacheAssets(this.game,this.assets,$.K.zoneAssetsCached)}displayDamage(k,B,U){this._spine.setAnimationByName(0,"mound-blue",!1),U()}shouldPlayRetreatOnDefeat(){return!0}retreat(k){this._spine.setAnimationByName(0,"mound-blue",!1),this.game.time.events.addTimer(1e3,k,this)}setTargetable(k){this._spine.setToSetupPose(),this._spine.setAnimationByName(0,k?"mound-purple":"mound-blue",!1),this.source.setRockActive(k)}getHitboxHeight(){return super.getHitboxHeight()+W.HITBOX_HEIGHT_OFFSET}getHitboxTop(){return super.getHitboxTop()+W.HITBOX_TOP_OFFSET}}W.HITBOX_TOP_OFFSET=45,W.HITBOX_HEIGHT_OFFSET=-50},85604:(k,B,U)=>{"use strict";var F;U.d(B,{y:()=>F}),function(k){k.Benni="benni",k.Bok="bok",k.Broccolina="broccolina",k.Eve="eve",k.Flora="flora",k.Slurpy="slurpy",k.Wheeler="wheeler",k.Spinner="spinner",k.Snips="snips",k.ImaniStar="imani-star",k.Gale="gale",k.Selena="selena",k.MoonPortal="moon-portal",k.Bargo="bargo",k.Verna="verna",k.DonZorro="don-zorro",k.Harriet="harriet",k.HowardCornelius="howard-cornelius",k.Athena="athena",k.GrottoPortal="grotto-portal",k.KandiKorn="kandi-korn"}(F||(F={}))},75214:(k,B,U)=>{"use strict";U.d(B,{p:()=>V});var F=U(62459),G=U(35120),j=U(48975),$=U(29834),H=U(59968);class V extends H.R{constructor(k,B,U,$,H,W,q,K,z,Y,Q,X){super(k,H,new j.s(k),null,W,q),this.onClick=new F.HN0;const Z=G.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService);this.spineNPC=G.q.instance.prodigy.create.spineNPC(this,U,K,0,0,{text:Z.getText(B),parent:z},{npcType:$,npcXCoord:W,npcYCoord:q},(()=>{this.onClick.dispatch()}),void 0,X),this._rootContainer=this.spineNPC.parent.legacyTransform.group,Y&&this.flip(),Q&&(this._rootContainer.alpha=0,this.fade(V.FADE_IN_OPACITY,V.FADE_IN_MS))}flip(){this.spineNPC.legacyTransform.group.scale.x=-1}faceToward(k){this.spineNPC.legacyTransform.group.scale.x=k>=this.x?1:-1}fade(k=0,B=1e3){var U;null===(U=this.game.add.tween(this._rootContainer,this))||void 0===U||U.to({alpha:k},B,F.GS3.Quadratic.In,!0)}playAll(k,B=!0){const U=this.spineNPC.findComponent($.j);U.hasAnimation(k)&&U.playAnimation(k,B)}}V.FADE_IN_OPACITY=1,V.FADE_IN_MS=800},18155:(k,B,U)=>{"use strict";U.d(B,{N:()=>K});var F=U(62459),G=U(35120),j=U(56942),$=U(34829),H=U(45024),V=U(87337),W=U(29834),q=U(75214);class K extends q.p{constructor(k,B,U,F,H,W,q){super(k,B,j.Q.Spine_npc_pippet_json,V.ac.Boss,U,F,H,W),this.user=q;const K=G.q.instance.prodigy.gameContainer.get("80c-6fa4"),z=K.getValue("pippetMaxHP",$.s.get("GameConstants.Pippet.MAX_HP")),Y=null===z?void 0:parseInt(z,10);this.mods={boss:{ID:37,maxHP:Y,element:"shadow",attacks:[73],name:"Pippet",tag:"pippet",pippetBattle:!0},drops:[{type:"currency",ID:3,N:1}],difficulty:parseInt(K.getValue("pippetDifficulty",$.s.get("GameConstants.Pippet.DIFFICULTY")),10)}}process(k,B){this.zone=k,this.map=B}alert(){const k=G.q.instance.prodigy.event.create();G.q.instance.prodigy.world.pippetEncounterDaily.isComplete()?this.completeDailyCutscene(k):(this.user.disableMovement(),this.startDailyCutscene(k,this.user)),k.start()}startDailyCutscene(k,B){k.function(this.chat.bind(this,1,150,!0)),k.function(this.faceToward.bind(this,B.x)),k.delay(1e3),k.function((()=>{this.chatBubble.destroy(),this.endChat()})),k.delay(300),k.text(G.q.instance.prodigy.world.pippetEncounterSpawn.dialogue,"pippet"),k.sound(19,"monster"),k.function(this.startBattle.bind(this))}completeDailyCutscene(k){k.text(H.e.data.completeDialogue,"pippet"),k.function((()=>{this.nameText.Active=!1})),k.set(this.pivot,"y",.5*-this.height),k.set(this,"y",this.y-.5*this.height),k.tween(this.scale,{x:0,y:0},1e3,F.GS3.Linear.None,!0),k.tween(this,{x:640,y:-200,rotation:360},1e3,F.GS3.Linear.None),k.set(G.q.instance.prodigy.world,"pippetEncounterSpawn",null),k.set(this,"visible",!1)}startBattle(){const k=this.map.getLocation(),B={x:this.user.x,y:this.user.y};this.mods.screen=this.map.battleBG,G.q.instance.prodigy.battle.battleStats.type="PippetBattle",this.zone.getBattle(this.map,G.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("COMBAT_PIPPET_BATTLE"),this.mods,(()=>{G.q.instance.prodigy.world.pippetEncounterDaily.complete(),G.q.instance.prodigy.world.it(k,B.x,B.y)}))()}walk(){const k=this.spineNPC.findComponent(W.j);k.hasAnimation("walk")&&k.playAnimation("walk",!0)}stand(){const k=this.spineNPC.findComponent(W.j);k.hasAnimation("idle")&&k.playAnimation("idle",!0)}}},75777:(k,B,U)=>{"use strict";U.d(B,{i:()=>Q});var F=U(62459),G=U(87337),j=U(35120),$=U(77938),H=U(48975),V=U(23082),W=U(17425),q=U(95373),K=U(26657),z=U(59968),Y=U(88022);class Q extends z.R{constructor(k,B,U,j,V,W,K){const z=new H.s(k);z.init({npc_name:"",npc_type:G.ac.Pet,x_coord:W,y_coord:K,npc_animation_id:"idle"}),super(k,B,z,null,F.Aq$.isDefined(W)?W:F.Aq$.isDefined(j)?j.x:0,F.Aq$.isDefined(K)?K:F.Aq$.isDefined(j)?j.y:-1),this.mode=-1,this.tweens=[],this.itemData=$.t.getItem("follow",U).data,this.assets=["pets"],this.onTargetStopped=new F.HN0,F.Aq$.isDefined(j)&&(this.followController=new q.u(k,this,j))}destroy(){this.stopTweens(),this.onTargetStopped.dispose(),super.destroy()}startLoad(){super.startLoad(),this.loading=!0,this.assets=[Y._.General_pets_json,Y._.General_core_2_json],j.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this))}setup(k,B){if(!F.Aq$.isDefined(this.game)||!B||!F.Aq$.isDefined(this.assets))return;const U=this.itemData.tag;this.sprite=j.q.instance.prodigy.create.element(this.sprites,0,0),U.indexOf("cat")>-1?U.indexOf("sparkle")>-1?this.createSparkleCat(U,this.itemData.spriteOffsets):this.createCat(U,this.itemData.spriteOffsets):U.indexOf("dog")>-1?U.indexOf("sparkle")>-1?this.createSparkleDog(U):this.createDog(U):U.indexOf("rodent")>-1?U.indexOf("sparkle")>-1?this.createSparkleRodent(U):this.createRodent(U):U.indexOf("bird")>-1?this.createBird(U):U.indexOf("lizard")>-1?this.createLizard(U):U.indexOf("turtle")>-1?this.createTurtle(U,this.itemData.spriteOffsets):U.indexOf("reindeer")>-1?this.createReindeer(U):U.indexOf("penguin")>-1?this.createPenguin(U):U.indexOf("snowman")>-1?this.createSnowman(U):U.indexOf("panda")>-1?this.createPanda(U):U.indexOf("sheep")>-1?this.createSheep(U):U.indexOf("cactus")>-1?this.createCactus(U):U.indexOf("fox")>-1&&this.createFox(U),F.Aq$.isDefined(this.itemData.extraAnims)&&this.itemData.extraAnims.forEach((k=>{const B=this.sprite.addChild(j.q.instance.prodigy.create.sprite(k.offsets.x,k.offsets.y,Y._.General_pets_json,`${U}/${k.animFrames[0]}`));let F=null;F="walk"===k.targetCycle?this.walkTween:this.standTween,F.push(new K.s(B)),F[F.length-1].set("frameName",k.animFrames.map((k=>`${U}/${k}`),this),80,9999)}),this),this.complete=!0,this.loading=!1,this.stopMoving(),F.Aq$.isDefined(this.loadedCallback)&&this.loadedCallback(),this._onLoad.dispatch()}setupWalk(k){const B=`${k}/walk/`;this.walkTween=[],this.walkTween.push(new K.s(this.body)),this.walkTween[0].set("y",[this.body.y,this.body.y+1],150,9999),this.walkTween.push(new K.s(this.legs)),this.walkTween[1].set("frameName",[`${B}legs-0`,`${B}legs-1`,`${B}legs-2`,`${B}legs-3`],150,9999),F.Aq$.isDefined(this.tail)&&(this.walkTween.push(new K.s(this.tail)),this.walkTween[2].set("frameName",[`${B}tail-0`,`${B}tail-1`],150,9999),this.walkTween.push(new K.s(this.tail)),this.walkTween[3].set("y",[this.tail.y,this.tail.y+1],150,9999))}setupStand(k){const B=`${k}/idle/`;this.standTween=[],F.Aq$.isDefined(this.tail)&&(this.standTween.push(new K.s(this.tail)),this.standTween[0].set("y",[this.tail.y+6],1e4,9999),this.standTween.push(new K.s(this.tail)),this.standTween[1].set("frameName",[`${B}tail-0`,`${B}tail-1`,`${B}tail-2`],150,9999))}setSpriteDefaults(k){const B=(k,B)=>{F.Aq$.isDefined(B)&&(F.Aq$.isDefined(B._defaultAnims)&&(B.frameName=B._defaultAnims[k]),F.Aq$.isDefined(B._defaultVisibility)&&(B.visible=B._defaultVisibility[k]),F.Aq$.isDefined(B._defaults)&&(B.x=B._defaults[k][0],B.y=B._defaults[k][1]))};B(k,this.head),B(k,this.body),B(k,this.legs),B(k,this.tail)}createCat(k,B){const U=F.Aq$.isDefined(B)?B:{};F.Aq$.isDefined(U.tail)||(U.tail={x:-12,y:1}),F.Aq$.isDefined(U.body)||(U.body={x:0,y:0}),F.Aq$.isDefined(U.legs)||(U.legs={x:-1,y:29}),this.tail=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0+U.tail.x,0+U.tail.y,Y._.General_pets_json,`${k}/walk/tail-0`)),this.body=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0+U.body.x,0+U.body.y,Y._.General_pets_json,`${k}/walk/body-0`)),this.legs=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0+U.legs.x,0+U.legs.y,Y._.General_pets_json,`${k}/walk/legs-0`)),this.sprite.y=-this.body.height-this.legs.height,this.sprite.x=-Math.floor(this.body.width/2),this.setupWalk(k),this.setupStand(k)}createSparkleCat(k,B){const U=F.Aq$.isDefined(B)?B:{};F.Aq$.isDefined(U.tail)||(U.tail={x:-12,y:1}),F.Aq$.isDefined(U.body)||(U.body={x:0,y:0}),F.Aq$.isDefined(U.legs)||(U.legs={x:-1,y:29}),this.tail=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0+U.tail.x,0+U.tail.y,Y._.General_pets_json,`${k}/walk/tail-0`)),this.tail._defaultVisibility={walk:!0,stand:!1},this.body=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0+U.body.x,0+U.body.y,Y._.General_pets_json,`${k}/walk/body-0`)),this.body._defaults={walk:[0,0],stand:[-12,0]},this.legs=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0+U.legs.x,0+U.legs.y,Y._.General_pets_json,`${k}/walk/legs-0`)),this.legs._defaultVisibility={walk:!0,stand:!1},this.sprite.y=-this.body.height-this.legs.height,this.sprite.x=-Math.floor(.5*this.body.width),this.setupWalk(k);const G=`${k}/idle/`;this.standTween=[],this.standTween.push(new K.s(this.body)),this.standTween[0].set("frameName",[`${G}body-0`,`${G}body-1`,`${G}body-2`,`${G}body-3`],150,9999)}createDog(k){this.tail=this.sprite.addChild(j.q.instance.prodigy.create.sprite(-12,9,Y._.General_pets_json,`${k}/walk/tail-0`)),this.body=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0,0,Y._.General_pets_json,`${k}/walk/body-0`)),this.legs=this.sprite.addChild(j.q.instance.prodigy.create.sprite(-1,33,Y._.General_pets_json,`${k}/walk/legs-0`)),this.sprite.y=-this.body.height-this.legs.height,this.sprite.x=-Math.floor(this.body.width/2),this.setupWalk(k),this.setupStand(k)}createSparkleDog(k){this.tail=this.sprite.addChild(j.q.instance.prodigy.create.sprite(-12,9,Y._.General_pets_json,`${k}/walk/tail-0`)),this.tail._defaultVisibility={walk:!0,stand:!1},this.body=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0,0,Y._.General_pets_json,`${k}/walk/body-0`)),this.body._defaults={walk:[0,0],stand:[-12,0]},this.legs=this.sprite.addChild(j.q.instance.prodigy.create.sprite(-1,33,Y._.General_pets_json,`${k}/walk/legs-0`)),this.legs._defaultVisibility={walk:!0,stand:!1},this.sprite.y=-this.body.height-this.legs.height,this.sprite.x=-Math.floor(.5*this.body.width),this.setupWalk(k);const B=`${k}/idle/`;this.standTween=[],this.standTween.push(new K.s(this.body)),this.standTween[0].set("frameName",[`${B}body-0`,`${B}body-1`,`${B}body-2`,`${B}body-3`],150,9999)}createRodent(k){this.body=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0,0,Y._.General_pets_json,`${k}/walk/body-0`)),this.legs=this.sprite.addChild(j.q.instance.prodigy.create.sprite(2,18,Y._.General_pets_json,`${k}/walk/legs-0`)),this.sprite.y=-this.body.height-this.legs.height,this.sprite.x=-Math.floor(this.body.width/2),this.setupWalk(k),this.setupStand(k)}createSparkleRodent(k){this.body=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0,0,Y._.General_pets_json,`${k}/walk/body-0`)),this.sprite.y=-this.body.height,this.sprite.x=-Math.floor(.5*this.body.width);const B=`${k}/walk/`;this.walkTween=[],this.walkTween.push(new K.s(this.body)),this.walkTween[0].set("frameName",[`${B}body-0`,`${B}body-1`,`${B}body-2`,`${B}body-3`],150,9999);const U=`${k}/idle/`;this.standTween=[],this.standTween.push(new K.s(this.body)),this.standTween[0].set("frameName",[`${U}body-0`,`${U}body-1`,`${U}body-2`,`${U}body-3`],150,9999)}createBird(k){const B=F.Aq$.isDefined(this.itemData.numWalkAnimFrames)?this.itemData.numWalkAnimFrames:4;this.body=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0,0,Y._.General_pets_json,`${k}/walk/body-0`)),this.sprite.y=-this.body.height-30,this.sprite.x=-Math.floor(this.body.width/2);const U=`${k}/walk/`;this.walkTween=[],this.walkTween.push(new K.s(this.body));const G=[];for(let F=0;F0){this.standTween.push(new K.s(this.body)),this.standTween.push(new K.s(this.tail));for(let k=0;k{"use strict";U.d(B,{Z:()=>W});var F=U(62459),G=U(35120),j=U(99625),$=U(42113),H=U(24110),V=U(98623);class W extends V.H{constructor(k,B,U=0,V=0){super(k,B,U,V);G.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(j.l.LeaderboardView).then((k=>{const B=new F._mx;B.addComponent(F.dLy),B.addComponent(H.B).getRootContainer().setParent(this),B.addChild(k),this._leaderboardPrefab=k,this._leaderboardDataProvider=k.findComponent($.O),this._lastLeaderboardRefresh=Date.now()})).catch(F.RQr.createHandler("Could not load leaderboards"))}destroy(){var k;null===(k=this._leaderboardPrefab)||void 0===k||k.destroy(),super.destroy()}update(){var k;super.update(),this._lastLeaderboardRefresh+W.REFRESH_TIMEOUT_MS{"use strict";U.d(B,{R:()=>q});var F=U(62459),G=U(35120),j=U(29738),$=U(84938),H=U(79825),V=U(57750),W=U(17425);class q{static isAudioSprite(k){return F.Aq$.isDefined(k.s)&&F.Aq$.isDefined(k.d)||F.Aq$.isDefined(k.dataTag)&&F.Aq$.isDefined(k.soundId)}static isLegacyAudioSprite(k){return F.Aq$.isDefined(k.s)&&F.Aq$.isDefined(k.d)}constructor(k){this.game=null,this.currentBgm=null,this.autoplay=!0,this.currentVoice=null,this._doNotResume=!1,this.game=k;let B=null,U=null;void 0!==document.hidden?(B="hidden",U="visibilitychange"):void 0!==document.msHidden?(B="msHidden",U="msvisibilitychange"):void 0!==document.webkitHidden?(B="webkitHidden",U="webkitvisibilitychange"):void 0!==document.mozHidden&&(B="mozHidden",U="mozvisibilitychange"),null!==B&&document.addEventListener(U,this.onVisibilityChanged.bind(this,B)),$.B.musicVolume.onChanged.add(this.setBGMVolume,this)}clearOldSounds(){let k=this.game.sound.sounds.length-1;for(;k>=0;){const B=this.game.sound.sounds[k];B&&!B.isDestroyed&&!B[V.k.DESTROYED]&&B.isPlaying||this.game.sound.sounds.splice(k,1),k--}}playSFX(k,B,U=null,j=1,H=!1,V){var q;this.clearOldSounds();const K=W.K.getAssetID("sfx",k),z=null===(q=G.q.instance.prodigy.assets.getAsset(K))||void 0===q?void 0:q.data;if(!z)return F.VyI.log(`Could not find ${K} in assets, so cannot play the sfx.`,F.$bb.Warning),null==U||U(),null;const Y=z.clips[B],Q=(null!=V?V:$.B.effectVolume.value)*j,X=this.game.cache.getSound(K);return X?(X.addMarker("play",Y.s,Y.d),X.playMarker("play",0,Q,H,void 0,U),X):(F.VyI.log(`Could not play sfx-${k} as it was not in the cache.`,F.$bb.Warning),null==U||U(),null)}playSFXFromGUID(k,B=null,U=0,F=-1,G=!1){this.clearOldSounds();const j=$.B.effectVolume.value,H=this.game.sound.add(k,j);let V;return H&&!H.isDestroyed&&H.sound&&null!==H.sound.instances?(V=!1,this.setupMarker(H,B,U,F,j,G)):(V=!0,this.logSoundError(H,"sound effect")),V&&B&&this.game.time.events.addTimer(1,B,this),H}playSound(k,B=!1,U){const G=F.o5U.getIOSVersion();this.clearOldSounds();const j=null!=U?U:$.B.effectVolume.value,H=W.K.getAssetID("sfx",k),V=this.game.cache.getSound(H);return V?(V.addMarker("play",0,V.duration),V.playMarker("play",0,j,B&&(null===G||G>9))):F.VyI.log(`Could not play sfx-${k} as it was not in the cache.`,F.$bb.Warning),V}playBGM(k,B){var U;const G=F.o5U.getIOSVersion();if(null!==G&&G<=9)return;const j=W.K.getAssetID("bgm",k);if(this.currentBgm&&W.K.matchingAssets(this.currentBgm.key,j))return;null===(U=this.currentBgm)||void 0===U||U.stop(),this.clearOldSounds();const H=this.game.cache.getSound(j);H?(H.singleInstance=!0,this.currentBgm=H,this.currentBgm.playWithOptions({start:0,volume:$.B.musicVolume.value,loop:B})):F.VyI.log(`Background music not found in cache: ${j}`,F.$bb.Error)}pauseBGM(){var k;null===(k=this.currentBgm)||void 0===k||k.pause()}resumeBGM(){var k;null===(k=this.currentBgm)||void 0===k||k.resume()}setBGMVolume(k){var B,U;(null===(U=null===(B=this.currentBgm)||void 0===B?void 0:B.instances)||void 0===U?void 0:U[0])&&(this.currentBgm.instances[0].volume=k)}playDialogue(k,B=(()=>null)){var U;if(this.clearOldSounds(),!j.O.isEnglishLocale())return F.VyI.log(`Skipping dialogue ${k.tag} because it is not localized`,F.$bb.Info),F.Egh.timeout(q.FAKE_DIALOGUE_DURATION_MS).finally((()=>null==B?void 0:B())).catch((()=>F.RQr.createHandler("[AudioController] Error with dialogue timeout"))),null;null===(U=this.currentVoice)||void 0===U||U.stop(),this._bgmLens&&(this._bgmLens.remove(),this._bgmLens=void 0);const G=$.B.voiceVolume.value,H=this.game.sound.add(k.tag,G);if(H&&!H.isDestroyed&&H.sound&&null!==H.sound.instances){this.currentBgm&&G>0&&(this._bgmLens=$.B.musicVolume.addSmoothedLensMultiplier(.25)),q.isAudioSprite(k)?q.isLegacyAudioSprite(k)?this.setupMarker(H,B,k.s,k.d,G):this.playAudioSprite(H,k,G,B):this.setupMarker(H,B,0,H.duration,G),this.currentVoice=H;const U=()=>{this._bgmLens&&(this._bgmLens.remove(),this._bgmLens=void 0),this.currentVoice=null};this.currentVoice.onStop.add(U,this),this.currentVoice.onComplete.add(U,this)}else this.logSoundError(H,"voice"),this.game.time.events.addTimer(1,B,this);return H}playVoice(k,B,U=0,F=-1){return this.playDialogue({tag:k,s:U,d:F},B)}stopVoice(){this.currentVoice&&(this.currentVoice.destroy(),this.currentVoice=null),this._bgmLens&&(this._bgmLens.remove(),this._bgmLens=void 0)}onVisibilityChanged(k){(F.o5U.isIOS()||F.o5U.isAndroid())&&(document[k]?(this._doNotResume=this.currentBgm&&!this.currentBgm.isPlaying,this.pauseBGM(),this.currentVoice&&this.currentVoice.pause()):(this._doNotResume?this._doNotResume=!1:this.resumeBGM(),this.currentVoice&&this.currentVoice.resume()))}isVoicePlaying(k){return this.currentVoice&&!this.currentVoice.isDestroyed&&this.currentVoice.isPlaying&&W.K.matchingAssets(this.currentVoice.key,k)}playAudioSprite(k,B,U,G=(()=>null)){var j;if(!k.sprites.hasOwnProperty(B.soundId)){const U=this.game.cache.getJSON(B.dataTag);if(!(null===(j=null==U?void 0:U.spritemap)||void 0===j?void 0:j.hasOwnProperty(B.soundId)))return F.VyI.log(`Could not play audio sprite ${B.soundId}, failed to load sprite data JSON`,F.$bb.Error),void G();k.addSprites(U.spritemap)}k.volume=U,k.play(B.soundId,G)}setupMarker(k,B,U,F,G,j){k.volume=G;const $=-1!==F?F:k.duration;k.addMarker("play",U,$),k.playMarker("play",0,G,j,void 0,B)}logSoundError(k,B){k?k.isDestroyed?F.VyI.log(`Cannot play ${B} because sound has been destroyed`,F.$bb.Error):k.sound?k.sound.instances||F.VyI.log(`Cannot play ${B} because pixi sound has been destroyed`,F.$bb.Error):F.VyI.log(`Cannot play ${B} because pixi sound has not been set`,F.$bb.Error):F.VyI.log(`Cannot play ${B} because sound does not exist`,F.$bb.Error)}isBGMPlaying(k){return this.currentBgm&&!this.currentBgm.isDestroyed&&this.currentBgm.isPlaying&&W.K.matchingAssets(this.currentBgm.key,k)}getVolumeForType(k){switch(k){case H.h.Sfx:return $.B.effectVolume.value;case H.h.Bgm:case H.h.BgmSfx:return $.B.musicVolume.value;case H.h.VoiceClip:return $.B.voiceVolume.value;default:return F.VyI.log(`Invalid AudioType. Cannot get volume for type ${k}.`,F.$bb.Error),0}}}q.FAKE_DIALOGUE_DURATION_MS=2e3},36279:(k,B,U)=>{"use strict";U.d(B,{g:()=>F});class F{constructor(){this.startTime=F.INVALID_TIME,this.endTime=F.INVALID_TIME,this.type="",this.energy=0,this.energyCost=0,this.turnsRemaining=1,this.battleCustomMeta={},this.startHealth=0,this.endHealth=0,this.pets=[],this.spellsCast=0,this.spellsFailed=0,this.enemySpellsCast=0,this.enemySpellsCastFail=0,this.epicAttack=null,this.consumablesUsed=[],this.petsRescued=[],this.rescuesSuccessful=[],this.spellEnergyCost=null}}F.INVALID_TIME=-1},42749:(k,B,U)=>{"use strict";U.d(B,{m:()=>Y});var F=U(37692),G=U(62459),j=U(95891),$=U(68910),H=U(35120),V=U(9591),W=U(18741),q=U(77938),K=U(8770),z=U(17425);class Y{constructor(k){this.game=null,this.baseDictionary={},this.isBaseReady={},this.isColorReady={},this.baseColor=[],this.newColor=[],this.game=k}static useFilter(k){return k.renderer.type===$.RENDERER_TYPE.WEBGL&&k.renderer.context.webGLVersion>1}getColorReplacedSprite(k,B,U,F=2){Y.useFilter(this.game)?this.getColorReplacedSpriteGL(k,B,U):this.checkColorAsset(k,B,F,(F=>{H.q.instance.prodigy.create.sprite(0,0,this.generateAssetName(k,B),0,null,(k=>{U(k)}))}))}getColorReplacedSpriteGL(k,B,U){let j=[];for(let F=0;F{const B=new F.N(j);B.resolution=$.settings.RESOLUTION,k.filters=[B],k.smoothed=!1;const G=$.RenderTexture.create({width:k.width,height:k.height});this.game.renderer.render(k,{renderTexture:G});const V=H.q.instance.prodigy.create.sprite(0,0);V.texture=G,U(V)}))}checkColorAsset(k,B,U,F){const j=this.generateAssetName(k,B);let $=G.Aq$.isDefined(this.isColorReady[j]);if($&&(this.isColorReady[j].ready?this.game.cache.checkImageKey(j)?this.safeCallback(F,j):$=!1:this.isColorReady[j].callbacks.push(F)),!$){let $=G.Aq$.isDefined(this.isBaseReady[k]);$&&(this.isBaseReady[k].ready?this.game.cache.checkImageKey(k)?(this.isColorReady[j]={ready:!1,callbacks:[F]},this.generateNewColor(k,B,j,U)):$=!1:this.isBaseReady[k].callbacks.push({colorReplaceData:B,callback:F})),$||(this.isBaseReady[k]={ready:!1,callbacks:[{colorReplaceData:B,callback:F}]},H.q.instance.prodigy.create.sprite(0,0,k,0,null,this.onBaseColorReady.bind(this,k,U)))}}clearCache(k=!1){k?(this.isColorReady={},this.isBaseReady={}):(this.clearEntries(this.isColorReady),this.clearEntries(this.isBaseReady))}clearEntries(k){for(const B of Object.keys(k))k[B].ready&&!this.game.cache.checkImageKey(B)&&delete k[B]}generateAssetName(k,B){let U=k;for(let F=0;F0;){const k=this.isBaseReady[U.key].callbacks.pop(),F=this.generateAssetName(U.key,k.colorReplaceData);G.Aq$.isDefined(this.isColorReady[F])?this.isColorReady[F].ready?this.safeCallback(k.callback,F):this.isColorReady[F].callbacks.push(k.callback):(this.isColorReady[F]={ready:!1,callbacks:[k.callback]},this.generateNewColor(U.key,k.colorReplaceData,F,B))}else for(this.isBaseReady[k].ready=!0,this.baseDictionary[k]=U;this.isBaseReady[k].callbacks.length>0;){const B=this.isBaseReady[k].callbacks.pop(),U=this.generateAssetName(k,B.colorReplaceData);this.safeCallback(B.callback,U)}}pixelColorReplace(k){const B=j.findIndex(this.baseColor,(B=>k.r===B[0]&&k.g===B[1]&&k.b===B[2]));return B>-1?Object.assign(Object.assign({},k),{r:this.newColor[B][0],g:this.newColor[B][1],b:this.newColor[B][2]}):k}generateNewColor(k,B,U,F){const j=new V.w(this.game,null,this.baseDictionary[k].width,this.baseDictionary[k].height);j.draw(this.baseDictionary[k]),j.update();let $=[],H=[];for(let V=0;V=0;G--)$[G][0]===H[G][0]&&$[G][1]===H[G][1]&&$[G][2]===H[G][2]&&($.splice(G,1),H.splice(G,1));this.baseColor=$,this.newColor=H,j.processPixelRGB(this.pixelColorReplace,this),j.generateTexture(U,this.textureGenerated.bind(this,k,U,j,F))}textureGenerated(k,B,U,F,j){const $=this.game.cache.getFrameData(k);if($&&this.game.cache.addTextureAtlas(B,j,$),2===F?z.K.cacheAsset(this.game,B,z.K.zoneAssetsCached):1===F&&z.K.cacheAsset(this.game,B,z.K.commonAssetsCached),H.q.instance.prodigy.assets.assignAssets({[B]:{type:"singleImage",v:1}}),U.clear(),W.f.removeByCanvas(U.canvas),U.destroy(),this.isColorReady[B].callbacks){const k=this.isColorReady[B].callbacks;for(let U=0;U{"use strict";U.d(B,{Z:()=>H});var F=U(62459),G=U(95891),j=U(35757),$=U(43531);class H extends $.rD{constructor(){super(...arguments),this.menuLayer=void 0}startDeprecated(k,B,U,$,H,V=!0,W=!0){var q,K;const z={type:H,windowPosition:$,blockInput:!B};for(let Y=0;Yvoid 0!==k));this.start(!B,U,V,W)}setText(k,B=null,U=null){if(isNaN(k)){const B=k,U={legacyData:{index:B.index,face:B.face,audio:B.audio},text:B.text,yes:B.yes,no:B.no,callback:B.callback,hideNext:B.hideNext,type:B.type,preserveNextEvent:B.preserveNextEvent};this.addEvents([U])}else{const F={legacyData:{index:k},yes:B,no:U};this.addEvents([F])}}}},43531:(k,B,U)=>{"use strict";U.d(B,{DG:()=>F,fA:()=>G,rD:()=>Q});var F,G,j=U(8674),$=U(62459),H=U(79687),V=U(35120),W=U(51477),q=U(29738),K=U(35757),z=U(73797),Y=U(8872);!function(k){k[k.Top=0]="Top",k[k.Middle=1]="Middle",k[k.Bottom=2]="Bottom"}(F||(F={})),function(k){k[k.DEFAULT=0]="DEFAULT",k[k.STORE=1]="STORE",k[k.WHEEL=2]="WHEEL",k[k.EQUIP=3]="EQUIP",k[k.START=4]="START",k[k.FOLLOW=5]="FOLLOW",k[k.LEAVE=6]="LEAVE",k[k.CHANGE=7]="CHANGE",k[k.CURRENCY=8]="CURRENCY"}(G||(G={}));let Q=class{set skipCounter(k){this._skipCounter=k}get skipCounter(){return this._skipCounter}constructor(k=V.q.instance.game){this.game=null,this._onClose=[],this.onAdvance=new $.HN0,this.onComplete=new $.HN0,this.eventQueue=[],this.dataProvider=null,this.current=null,this.currentDialogue=null,this._skipCounter=0,this._previousDialogueAudioTag=null,this._reenableInputOnClose=!0,this.game=k,this.dataProvider=new K.u}addEvents(k){this.eventQueue.push(...k)}setParent(k){this._dialogueParent=k,this.currentDialogue&&k.addChild(this.currentDialogue)}start(k=!1,B,U=!0,F=!0){this.currentDialogue?this._previousDialogueAudioTag=this.currentDialogue.dialogueConfig.dialogueData?this.currentDialogue.dialogueConfig.dialogueData.audio.tag:null:(this._previousDialogueAudioTag=null,this.game.input.enabled=!k),F&&this.closeDialogue(!1),B&&this._onClose.push(B),this._reenableInputOnClose=U,V.q.instance.prodigy.notifications.pause(this),this.currentDialogue||this.next()}next(){var k;if(this.eventQueue.length>0){if(this.current=this.eventQueue.splice(0,this.skipCounter+1)[this.skipCounter],this.skipCounter=0,Object.keys(this.current).length>0)if($.Aq$.isDefined(this.current.callback))0===this.eventQueue.length?(this.close(!1,!0),this.onComplete.dispatch(),this.current.callback()):(this.current.callback(),this.next());else{const B=[];if($.Aq$.isDefined(this.current.dialogueData)&&(q.O.isEnglishLocale()&&B.push(this.current.dialogueData.audio.tag),B.push(this.current.dialogueData.avatar.atlas),Y.R.isAudioSprite(this.current.dialogueData.audio)&&!Y.R.isLegacyAudioSprite(this.current.dialogueData.audio)&&q.O.isEnglishLocale()&&B.push(this.current.dialogueData.audio.dataTag)),$.Aq$.isDefined(this.currentDialogue)&&this.currentDialogue.game)this.currentDialogue.updateSchema(this.current,B),this.onAdvance.dispatch();else if(this.currentDialogue=V.q.instance.prodigy.open.characterDialogue(this.current,this.next.bind(this),B),null===(k=this._dialogueParent)||void 0===k||k.addChild(this.currentDialogue),$.Aq$.isDefined(this._previousDialogueAudioTag)&&(!this.currentDialogue.dialogueConfig.dialogueData||this.currentDialogue.dialogueConfig.dialogueData.audio.tag!==this._previousDialogueAudioTag)){const k=this.game.cache.getSound(this._previousDialogueAudioTag);(null==k?void 0:k.sound)&&!k.isDecoding&&this.game.cache.removeSound(this._previousDialogueAudioTag),this._previousDialogueAudioTag=null}}}else this.close(!1,!0),this.onComplete.dispatch()}closeDialogue(k=!1){if(this.game.input.enabled||(this.game.input.enabled=this._reenableInputOnClose),$.Aq$.isDefined(this.currentDialogue)){if(k&&this.currentDialogue.dialogueConfig.dialogueData&&""!==this.currentDialogue.dialogueConfig.dialogueData.audio.tag){const k=this.game.cache.getSound(this.currentDialogue.dialogueConfig.dialogueData.audio.tag);(null==k?void 0:k.sound)&&!k.isDecoding&&this.game.cache.removeSound(this.currentDialogue.dialogueConfig.dialogueData.audio.tag)}this.currentDialogue.close(),this.currentDialogue=null}}close(k=!1,B=!1){this.closeDialogue(B),this.eventQueue=[],this._dialogueParent=void 0;const U=[...this._onClose];this._onClose=[],k||U.forEach((k=>k())),V.q.instance.game.broadcaster.broadcast(z.n8.DialogClosed),V.q.instance.prodigy.notifications.resume(this)}static shouldLoadDialogueAudio(){return q.O.isEnglishLocale()}static runDialogueSequence(k,B,U=!0,F=!0){const G=V.q.instance.prodigy.gameContainer.get("b5b-6fa4");return G.addEvents(k.map((k=>"number"==typeof k?{dialogueData:G.dataProvider.get(k),blockInput:!0}:k.id?Object.assign({dialogueData:G.dataProvider.get(k.id),blockInput:!0},k):k))),G.start(!0,B,U,F),G}isDialogueInProgress(){return this.eventQueue.length>0}};Q=(0,j.Cg)([(0,H.injectable)(),(0,j.Sn)("design:paramtypes",[W.n])],Q)},19586:(k,B,U)=>{"use strict";var F;U.d(B,{_:()=>F}),function(k){k[k.DEFAULT=0]="DEFAULT",k[k.ACHIEVEMENTS=1]="ACHIEVEMENTS",k[k.ITEMRARE=2]="ITEMRARE",k[k.MEMBERSHIP=3]="MEMBERSHIP",k[k.STOREPURCHASE=4]="STOREPURCHASE",k[k.MEMBERBOX=5]="MEMBERBOX",k[k.PARENTREWARD=6]="PARENTREWARD",k[k.ITEMGENERIC=7]="ITEMGENERIC",k[k.LAMPLIGHTPURCHASE=8]="LAMPLIGHTPURCHASE",k[k.ITEMWHEEL=9]="ITEMWHEEL",k[k.QUESTIONSANSWERED=10]="QUESTIONSANSWERED",k[k.NAMECHANGE=13]="NAMECHANGE",k[k.BATTLEPASSQUESTGOALCOMPLETED=15]="BATTLEPASSQUESTGOALCOMPLETED",k[k.CHARGEDLEVELFREEZECOUNTDOWN=17]="CHARGEDLEVELFREEZECOUNTDOWN",k[k.FESTIVALQUESTGOALCOMPLETED=18]="FESTIVALQUESTGOALCOMPLETED"}(F||(F={}))},95373:(k,B,U)=>{"use strict";U.d(B,{u:()=>$});var F=U(62459),G=U(68910),j=U(23082);class ${constructor(k,B,U){this.waitingToFollowDelay=0,this.lastTargetPosition=new G.Point,this.game=k,this.source=B,B.onTargetStopped.add(this.targetStopped,this),B.onDestroy.addOnce(this.handleDestroy,this),this.target=U,U.onPathFound.add(this.targetMoving,this),U.onStopped.add(this.targetStopped,this)}handleDestroy(){this.source.onTargetStopped.remove(this.targetStopped,this),this.target.onPathFound.remove(this.targetMoving,this),this.target.onStopped.remove(this.targetStopped,this)}update(){const k=this.source.getPosition(),B=F.cj9.distance(k.x,k.y,this.target.position.x,this.target.position.y);if(this.waitingToFollowDelay>1)--this.waitingToFollowDelay;else if(this.waitingToFollowDelay>0)if(F.Aq$.isDefined(this.queuedPath)&&this.queuedPath.length>=3){const U=new F.I9Y(this.target.position.x-k.x,this.target.position.y-k.y),G=new F.I9Y(this.target.position.x-this.lastTargetPosition.x,this.target.position.y-this.lastTargetPosition.y);if(G.getMagnitudeSq()<=0){const k=new F.I9Y(this.queuedPath[this.queuedPath.length-2].x,this.queuedPath[this.queuedPath.length-2].y),B=new F.I9Y(this.queuedPath[this.queuedPath.length-3].x,this.queuedPath[this.queuedPath.length-3].y);G.set(B.x-k.x,B.y-k.y)}const H=B>this.lastTargetDistance||G.dot(U)>0;if((B>$.MAX_FOLLOW_DISTANCE||this.source.isMoving())&&H){const B=new F.I9Y(this.queuedPath[0].x,this.queuedPath[0].y);if(F.cj9.distance(B.x,B.y,k.x,k.y)>$.MAX_FOLLOW_DISTANCE){const k=this.game.state.get(j.G.TileScreen),B=this.getPointNearPathEnd(this.queuedPath,$.MIN_FOLLOW_DISTANCE);F.Aq$.isDefined(k)&&F.Aq$.isDefined(B)&&this.source.pathTo(new F.I9Y(B.x,B.y))}this.queuedPath=null,this.waitingToFollowDelay=0}else this.stop()}else this.stop(),this.waitingToFollowDelay=0;this.lastTargetPosition=this.target.position,this.lastTargetDistance=B}targetMoving(k){const B=this.source.getPosition();this.queuedPath=k.concat({x:this.target.x,y:this.target.y},{x:B.x,y:B.y}),this.waitingToFollowDelay=2}targetStopped(){this.queuedPath=null,this.waitingToFollowDelay=2}stop(){this.source.stopMoving()}getPointNearPathEnd(k,B,U){if(!F.Aq$.isDefined(k))return null;const G=F.Aq$.isDefined(U)?U:0;if(G>k.length-2)return null;const j=new F.I9Y(k[G].x,k[G].y),$=new F.I9Y(k[G+1].x,k[G+1].y),H=F.cj9.distance(j.x,j.y,$.x,$.y);if(H{"use strict";U.d(B,{b:()=>V});var F=U(62459),G=U(5491),j=U(35120),$=U(39984),H=U(55122);class V{constructor(){const k=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player;F.Aq$.isDefined(k.data.storedMemberStars)||(k.data.storedMemberStars=0),F.Aq$.isDefined(k.data.memberStarsExpirationDate)||(k.data.memberStarsExpirationDate=this.getNextExpirationDate().getTime())}getNextExpirationDate(){const k=new Date(Date.now()),B=new Date(Date.now());return 0!==k.getDay()&&B.setDate(k.getDate()+(7-k.getDay())),B.setSeconds(59),B.setMinutes(59),B.setHours(23),B.setMilliseconds(0),B}hasExpired(){return!1}storeMemberStars(k){const B=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player;B.data.storedMemberStars+=k,B.data.memberStarsExpirationDate=this.getNextExpirationDate().getTime(),this.sendStarJarUpdate(B,"Items Added")}claimStarJar(){var k;const B=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.sendStarJarUpdate(B,"Items Claimed");const U=null!==(k=B.data.storedMemberStars)&&void 0!==k?k:0;return B.data.storedMemberStars=0,U}doLoseStars(){if(!this.hasExpired())return!1;const k=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return this.sendStarJarUpdate(k,"Jar Refreshed"),k.data.storedMemberStars=0,k.data.memberStarsExpirationDate=this.getNextExpirationDate().getTime(),!0}getNumberOfLevels(k){const B=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=B.getStars(),F=B.getLevel(),V=B.data.storedMemberStars/k;return $.e.levelFromStars(U+V,G.V.Player,H.s.activePlayerLevelCap)-F}getNumberOfStoredStars(){let k=0;const B=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return F.Aq$.isDefined(B.data.storedMemberStars)&&(k=B.data.storedMemberStars),k}getStarJarTier(){return this.calculateStarJarTier(this.getNumberOfStoredStars())}calculateStarJarTier(k){return k>90?4:k>60?3:k>30?2:k>1?1:0}updateExpirationDate(){j.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.memberStarsExpirationDate=this.getNextExpirationDate().getTime()}sendStarJarUpdate(k,B){}}},26657:(k,B,U)=>{"use strict";U.d(B,{s:()=>G});var F=U(62459);class G{constructor(k){this.current=null,this.noSkipFrames=!1,this.tweens=[],this.tweenVars={},this.onEndCallbacks=[],this.index=0,this.src=k}start(k,B,U){this.current=null,this.index=0,this.startTime=F.Aq$.isDefined(k)?k:Date.now();for(let F=0;F=this.tweenVars.next){this.tweenVars.next+=this.current.delay;for(let k=0;k=this.current.end&&(this.current=null,F.Aq$.isDefined(this.onComplete)&&this.onComplete())}else{if(this.current){const B=Math.floor((k-this.current.start)/this.current.delay)*this.current.delay+this.current.start,U=k-this.current.delay,G=U-this.current.lastUpdate>this.current.delay;if(!this.noSkipFrames&&U<=this.current.lastUpdate||G)return"set"!==this.current.type||F.Aq$.isDefined(this.tweenVars.next)||(this.tweenVars.next=this.current.start+this.current.delay,this.tweenVars.frame=0,this.src[this.current.tag]=this.current.frames[0]),G&&(this.current.lastUpdate=B),null;if(this.current.lastUpdate=B,"set"===this.current.type)if(F.Aq$.isDefined(this.tweenVars.next)||(this.tweenVars.next=this.current.start+this.current.delay,this.tweenVars.frame=0,this.src[this.current.tag]=this.current.frames[0]),k>=this.current.end)this.src[this.current.tag]=this.current.frames[this.current.frames.length-1];else if(k>=this.tweenVars.next){if(this.tweenVars.next+=this.current.delay,this.tweenVars.frame++,this.tweenVars.frame>=this.current.frames.length){this.tweenVars.frame=0;for(let k=0;k=this.current.end&&(this.current=null,F.Aq$.isDefined(this.onComplete)&&this.onComplete())}this.current||(this.tweenVars={},this.index>=this.tweens.length?this.startTime=null:(this.current=this.tweens[this.index],this.index++))}}}},16051:(k,B,U)=>{"use strict";U.d(B,{c:()=>$});var F=U(24521),G=U(35120),j=U(23029);class ${static get instance(){return this._instance||(this._instance=new $),this._instance}constructor(){this._petXPBoostData=null,this._isPetXPBoostDataEmpty=!0,this.areRequirementsMet()&&(this._petXPBoostData=j.R.loadData(F.r.PetXPBoostData_json)),this._isPetXPBoostDataEmpty=!this._petXPBoostData||!(Object.keys(this._petXPBoostData).length>0)}getBoostMultiplier(k=G.q.instance.prodigy.world.getCurrentZone()){if(this._isPetXPBoostDataEmpty)return 1;const B=this._petXPBoostData.zone.indexOf(k);return B<0?1:this._petXPBoostData.xpMultiplier[B]}getEligiblePetIDs(k=G.q.instance.prodigy.world.getCurrentZone()){if(this._isPetXPBoostDataEmpty)return null;const B=this._petXPBoostData.zone.indexOf(k);return B<0?null:this._petXPBoostData.petIDs[B]}isPlayerZoneEligible(k=G.q.instance.prodigy.world.getCurrentZone()){if(this._isPetXPBoostDataEmpty)return!1;return!(this._petXPBoostData.zone.indexOf(k)<0)}getFtueData(k=G.q.instance.prodigy.world.getCurrentZone()){if(this._isPetXPBoostDataEmpty)return null;const B=this._petXPBoostData.zone.indexOf(k);return B<0?null:this._petXPBoostData.ftue[B]}getSecondPlusScreenData(k=G.q.instance.prodigy.world.getCurrentZone()){if(this._isPetXPBoostDataEmpty)return null;const B=this._petXPBoostData.zone.indexOf(k);return B<0?null:this._petXPBoostData.secondPlusScreen[B]}getResultsMenuText(k=G.q.instance.prodigy.world.getCurrentZone()){if(this._isPetXPBoostDataEmpty)return null;const B=this._petXPBoostData.zone.indexOf(k);return B<0?null:this._petXPBoostData.resultMenu[B]}getWizardWatchData(){return this._isPetXPBoostDataEmpty?null:this._petXPBoostData.wizardWatch}areRequirementsMet(){return G.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirementsDeprecated(52)}isPlayerQualified(k=G.q.instance.prodigy.world.getCurrentZone()){return this.isPlayerZoneEligible(k)&&this.areRequirementsMet()}}},9831:(k,B,U)=>{"use strict";var F;U.d(B,{V:()=>F}),function(k){k.singleImage="singleImage",k.spriteSheet="spritesheet",k.spine="spine",k.atlas="atlas"}(F||(F={}))},96216:(k,B,U)=>{"use strict";U.d(B,{M:()=>ht});var F,G=U(8674),j=U(62459),$=U(79687),H=U(95891),V=U(88022),W=U(99625),q=U(56942),K=U(35120),z=U(24190),Y=U(51477),Q=U(77938),X=U(84938),Z=U(73797),J=U(22637),tt=U(37854),et=U(99898),it=U(44977),st=U(16184),nt=U(1823),at=U(85515),rt=U(76945),ot=U(30441);let ht=F=class{constructor(k,B){this.game=k,this._prefabLoader=B}setSource(k){this.screen=k}cleanup(k){for(let B=0;B{H.destroy(),j.Aq$.isDefined($)&&$()})),j.Aq$.isDefined(F)&&(q.delay(F),W.delay(F)),q.start(),W.start(),q}characterImage(k,B,U){k.y-=150,k.anchor.set(.5,.5),k.scale.set(0,0),this.game.broadcaster.broadcast(Z.lc.AddChild,this.game,[k,at.E.OverlayLayer]);const F=this.game.add.tween(k.scale,this).to({y:1,x:1},800,j.GS3.Elastic.InOut),G=this.game.add.tween(k,this).to({y:"-=100"},1600,j.GS3.Quadratic.Out).to({alpha:0},200,j.GS3.Quadratic.Out);G.onTweenComplete.add((()=>{k.destroy(),j.Aq$.isDefined(U)&&U()})),j.Aq$.isDefined(B)&&(G.delay(B),F.delay(B)),G.start(),F.start()}chatBubble(k,B=13,U=100,F=!1,G=3e3){const j=new ot.R(this.game,k,0,-U,F,G);return j.setID(B),j}explode(k,B,U,F,G,$,H){const W=Math.ceil(U/80),q=Math.ceil(F/80),z=[];let Y,Q;for(let j=0;j{j.setLayer(null==F?void 0:F.layer,!0),j.findComponentInChildren(tt.v).playEffect(k,B,U,G)}))}confetti(k,B,U,F=this.screen.foregroundGameObject,G=0){this._prefabLoader.loadWithDependenciesFromGUID(W.l.Confetti,F).then((G=>{G.setLayer(null==F?void 0:F.layer,!0),G.findComponentInChildren(J.k).playEffect(k,B,U)}))}waterBalloon(k,B,U,F,G,j=this.screen.foregroundGameObject){this._prefabLoader.loadWithDependenciesFromGUID(W.l.WaterBalloon,j).then(($=>{$.setLayer(null==j?void 0:j.layer,!0),$.findComponentInChildren(nt.k,!0).playEffect(k,B,U,F,G)}))}paintBalloon(k,B,U,F,G,j=this.screen.foregroundGameObject){this._prefabLoader.loadWithDependenciesFromGUID(W.l.PaintBalloon,j).then(($=>{$.setLayer(null==j?void 0:j.layer,!0),$.findComponentInChildren(st.J,!0).playEffect(k,B,U,F,G)}))}projectile(k,B,U,F,$,H){return(0,G.sH)(this,arguments,void 0,(function*(k,B,U,F,G,$,H=this.screen.foregroundGameObject){var V,W;const K=q.Q[null===(W=null===(V=Q.t.getItem("fx",G).metadata.assets)||void 0===V?void 0:V.default)||void 0===W?void 0:W.assetKey],z=Q.t.getItem("fx",G).data.spineID,Y=yield"string"==typeof $?this._prefabLoader.loadWithDependenciesFromGUID($,H):this._prefabLoader.loadWithDependencies($,H);return new Promise((G=>Y.findComponent(j.v2j).setAsset(null!=K?K:`spine-${z}`,(()=>Y.findComponent(et.F).playEffect(k,B,U,F,null==H?void 0:H.layer,G)))))}))}fireworkFX(k,B,U,F,G=this.screen.foregroundGameObject,j=0){"string"==typeof U?this._prefabLoader.loadWithDependenciesFromGUID(U,G).then((U=>{U.findComponent(it.e).playEffect(k,B,null==G?void 0:G.layer,F)})):this._prefabLoader.loadWithDependencies(U,G).then((U=>{U.findComponent(it.e).playEffect(k,B,null==G?void 0:G.layer,F)}))}goldWork(k,B,U){const F=75*Math.random()+25,G=Math.random(),$=100*G-50,H=Math.floor(3*Math.random()+1),W=[];for(let j=1;j{q.destroy()})),Y.onTweenComplete.add(U)}fadeFlyingImage(k,B,U,F){const G=K.q.instance.prodigy.create.sprite(k,B,U,F);G.anchor.set(.5,.5),this.game.broadcaster.broadcast(Z.lc.AddChild,this.game,[G,at.E.OverlayLayer]);const $=this.game.add.tween(G,this).to({y:G.y-100},1300,j.GS3.Quadratic.Out).to({alpha:0},200,j.GS3.Quadratic.Out);$.onTweenComplete.add((()=>{G.visible=!1}),G),$.start()}spellLearned(k,B,U){let F=!1;const G=(k,G)=>{B.addChild(G),G.anchor.set(3,3),G.angle=60*k;const $=this.game.add.tween(G,this).to({angle:"+=1000"},3500,j.GS3.Linear.None).to({alpha:0},500,j.GS3.Linear.None);$.onTweenComplete.add((()=>{G.destroy(),j.Aq$.isDefined(U)&&!F&&(F=!0,U())})),$.start(),this.game.add.tween(G.anchor,this).to({x:.5,y:.5},1500,j.GS3.Linear.None).delay(2e3).to({x:5,y:5},500,j.GS3.Linear.None).start()};for(let j=0;j<6;j++)K.q.instance.prodigy.icon.createFromData(k,B.width/2,B.height/2,null,G.bind(this,j))}resizeContainer(k,B=0,U=800){this.game.add.tween(k.scale,this).to({x:B,y:B},U,j.GS3.Linear.None,!0)}static radialCloud(k,B,U,F,G,$,V,W){const q=new j.jlt(U,F,G);let z=8;const Y=()=>{--z,z<=0&&W()};for(let Q=0;Q{k&&k.destroy()})),W&&Z.onTweenComplete.add(Y)}}};ht.PVP=230,ht.MIDDLE=300,ht.BOTTOM=500,ht.BASE=600,ht.TOP=100,ht.SMALL=2,ht.MEDIUM=1,ht=F=(0,G.Cg)([(0,$.injectable)(),(0,G.Qj)(0,(0,$.inject)("51c-03a0")),(0,G.Qj)(1,(0,$.inject)("d0e-64fd")),(0,G.Sn)("design:paramtypes",[Y.n,j.wNP])],ht)},571:(k,B,U)=>{"use strict";U.d(B,{z:()=>Q});var F=U(8674),G=U(62459),j=U(68910),$=U(99625),H=U(35120),V=U(24110),W=U(53885),q=U(63068),K=U(80060),z=U(17002),Y=U(30226);class Q{static createPixiSpriteFromAppearanceData(k,B,U){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U,F={}){var $;const V=H.q.instance.prodigy.gameContainer.get("d0e-64fd"),W=yield K.d.loadWithInjectedValuesAndDependenciesFromGUID(V,B,null!==($=F.injectedValues)&&void 0!==$?$:{}).catch(G.RQr.createHandler("PlayerSpriteFactory: Error loading player prefab to generate sprite"));yield W.findComponentInChildren(q.n).fromPlayerAppearanceData(k),yield Y.J.waitForFrames(1);const Q=H.q.instance.game.renderer.generateTexture(W.findComponentInChildren(U).getRootContainer());W.destroy(),G.qFr.setSmoothed(Q,!0);const X=new j.Sprite(Q);return!1===F.trimTransparentPixels?X:z.f.trimTransparentPixels(X,H.q.instance.game.renderer)}))}static createHeadFromAppearanceData(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return Q.createPixiSpriteFromAppearanceData(Object.assign(Object.assign({},k),{outfit:null,weapon:null,boot:null}),$.l.MainPlayerIcon,W.u,B)}))}static createFullBodyFromAppearanceData(k,B){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U={}){const F=Object.assign(Object.assign({},U.injectedValues),{"377-3e7b":B});return Q.createPixiSpriteFromAppearanceData(k,$.l.RemotePlayer,V.B,Object.assign(Object.assign({},U),{injectedValues:F}))}))}}},95913:(k,B,U)=>{"use strict";U.d(B,{BV:()=>W,v4:()=>K});var F=U(87490),G=U(62459),j=U(95359),$=U(88022),H=U(35120),V=U(72162);const W={[j.IE.Defence]:"defense",[j.IE.Hp]:"health",[j.IE.Power]:"spell",[j.IE.Speed]:"dodge"},q={[F.EElementType.Astral]:"#F8E48F",[F.ELegacyElementType.Earth]:"#C7F28F",[F.EElementType.Fire]:"#FE9C8E",[F.EElementType.Ice]:"#EBFDFF",[F.ELegacyElementType.Mech]:"#CCE8EA",[F.EElementType.Neutral]:"#FFFFFF",[F.EElementType.Physical]:"#CCE8EA",[F.EElementType.Plant]:"#C7F28F",[F.EElementType.Shadow]:"#A581B0",[F.EElementType.Storm]:"#FFE71C",[F.EElementType.Water]:"#A4D4FF",[F.ELegacyElementType.Wizard]:"#F8E48F"};class K{static levelUp(k,B){return{type:V.m0.Text,text:H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("LEVEL_UP"),fill:"#FFF540",stroke:"#9C341A",strokeThickness:5,showSignal:k,hideSignal:B}}static chargeUp(k,B){return{type:V.m0.Text,text:H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("CHARGE_UP"),fill:"#FFF540",stroke:"#9C341A",strokeThickness:5,showSignal:k,hideSignal:B}}static battleStats(k,B,U){const F=[];return Object.keys(k).forEach((G=>{const j=this.battleStat(G,k[G],B,U);j&&F.push(j)})),F}static battleStat(k,B,U,F){return!k||B<=0?null:{type:V.m0.Stat,atlasGuid:$._.Ui_postbattle_json,atlasFrameName:W[k],statIncreaseAmount:B,showSignal:U,hideSignal:F}}static spell(k,B,U){return{fill:q[k.elementType],type:V.m0.SpellLearned,spellIcon:k.spellIcon,spellName:k.newSpellName,evolved:!1,showSignal:B,stroke:"#363636",strokeThickness:5}}}},72162:(k,B,U)=>{"use strict";U.d(B,{O6:()=>q,jk:()=>V,m0:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(80060),H=U(24110);var V,W;!function(k){k[k.Created=0]="Created",k[k.Entering=1]="Entering",k[k.Playing=2]="Playing",k[k.Exiting=3]="Exiting",k[k.Complete=4]="Complete"}(V||(V={})),function(k){k[k.Text=0]="Text",k[k.Stat=1]="Stat",k[k.SpellLearned=2]="SpellLearned"}(W||(W={}));class q{get currentState(){return this._currentState}get popupHeight(){return this._gameObject.findComponent(H.B).getRootContainer().height}constructor(k,B,U,F){this.onPopupStarted=new G.HN0,this.onEntranceComplete=new G.HN0,this.onPopupComplete=new G.HN0,this._prefabGuid=k,this._parent=B,this._x=U,this._y=F,this._prefabLoader=j.q.instance.prodigy.gameContainer.get("d0e-64fd")}init(){return(0,F.sH)(this,void 0,void 0,(function*(){this._gameObject=yield $.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGuid,this._injectablePropertiesDictionary),this._gameObject.parent=this._parent;this._gameObject.transform.setAnchoredPivotOffset(this._x,this._y);const k=this._gameObject.findComponentsInChildren(G.y4o).map((k=>k.getRootContainer()));for(const B of k)B.alpha=0;this._currentState=V.Created}))}playAnimation(k=0){const B={value:0},U=this._gameObject.findComponentsInChildren(G.y4o).map((k=>k.getRootContainer()));for(const F of U)F.alpha=0;this.onPopupStarted.dispatch(),this._tween=j.q.instance.game.add.tween(B,this).to({value:1},2e3,G.GS3.Quadratic.In,!0,k).onUpdateCallback((()=>{if(B.value<.2){this._currentState=V.Entering;for(const k of U)k.alpha=B.value/.2}else if(B.value>.8){this._currentState=V.Exiting;for(const k of U)k.alpha=(1-B.value)/.2}else{this._currentState!==V.Playing&&(this._currentState=V.Playing,this.onEntranceComplete.dispatch());for(const k of U)k.alpha=1}})),this._tween.onTweenComplete.addOnce((()=>{U.forEach((k=>{k.alpha=0})),this._currentState=V.Complete,this.onPopupComplete.dispatch()}))}setYPos(k){this._gameObject.transform.setPositionY(k)}getYPos(){return this._gameObject.transform.posY}tweenYPos(k,B,U=0){const F=null!=B?B:400,$=this.getYPos(),H={value:0};this._yPositionTween=j.q.instance.game.add.tween(H,this,!0).to({value:1},F,G.GS3.Quadratic.In,!0,U).onUpdateCallback((()=>{this._gameObject.transform.setPositionY(G.cj9.clampedLerp($,k,H.value))}))}cleanup(){j.q.instance.game.tweens.remove(this._tween),j.q.instance.game.tweens.remove(this._yPositionTween),this.onPopupStarted.dispose(),this.onEntranceComplete.dispose(),this.onPopupComplete.dispose(),this._gameObject.destroy()}}},67820:(k,B,U)=>{"use strict";U.r(B),U.d(B,{Boot:()=>hx});var F,G=U(8674),j=U(62459),$=U(95891),H=U.n($),V=U(68910),W=U(86663),q=U(88022),K=U(35120),z=U(29569),Y=U(64593),Q=U(87490),X=U(85855),Z=U(51742),J=U(56942),tt=U(79687);!function(k){k.StoreDataProvider="StoreDataProvider",k.CacheExpirationStrategy="CacheExpirationStrategy",k.CacheStorageStrategy="CacheStorageStrategy",k.DungeonDataProvider="DungeonDataProvider",k.SurveyDataProvider="SurveyDataProvider"}(F||(F={}));var et=U(2872),it=U(85933),st=U(96051);class nt extends st.B{constructor(){super(...arguments),this.seed=null,this.gridWidth=0,this.gridHeight=0,this.minCritPathLength=0,this.maxCritPathLength=0,this.monsterIDs=[],this.minEncounters=0,this.maxEncounters=0,this.monsterDrops=[],this.goldenPages=0,this.minPages=0,this.maxPages=0,this.battleDifficulty=3,this.extraPaths=null,this.normalRooms=[],this.monsterRooms=[],this.endRoom=null}setSeed(k){this.seed=k}getSeed(){return this.seed}setGridWidth(k){this.gridWidth=k}getGridWidth(){return this.gridWidth}setGridHeight(k){this.gridHeight=k}getGridHeight(){return this.gridHeight}setMinCritPathLength(k){this.minCritPathLength=k}getMinCritPathLength(){return this.minCritPathLength}setMaxCritPathLength(k){this.maxCritPathLength=k}getMaxCritPathLength(){return this.maxCritPathLength}setMonsterIDs(k){this.monsterIDs=k}getMonsterIDs(){return this.monsterIDs}setMinEncounters(k){this.minEncounters=k}getMinEncounters(){return this.minEncounters}setMaxEncounters(k){this.maxEncounters=k}getMaxEncounters(){return this.maxEncounters}setMonsterDrops(k){this.monsterDrops=k}getMonsterDrops(){return this.monsterDrops}setGoldenPages(k){this.goldenPages=k}getGoldenPages(){return this.goldenPages}setMinPages(k){this.minPages=k}getMinPages(){return this.minPages}setMaxPages(k){this.maxPages=k}getMaxPages(){return this.maxPages}setBattleDifficulty(k){this.battleDifficulty=k}getBattleDifficulty(){return this.battleDifficulty}setExtraPaths(k){this.extraPaths=k}getExtraPaths(){return this.extraPaths}setNormalRooms(k){this.normalRooms=k}getNormalRooms(){return this.normalRooms}setMonsterRooms(k){this.monsterRooms=k}getMonsterRooms(){return this.monsterRooms}setEndRoom(k){this.endRoom=k}getEndRoom(){return this.endRoom}isValid(){return this.gridWidth>0&&this.gridHeight>0&&this.minCritPathLength>0&&this.maxCritPathLength>0&&this.monsterIDs.length>0&&this.minEncounters>0&&this.maxEncounters>0&&this.monsterDrops.length>0&&(0,$.every)(this.monsterDrops,(k=>k.isValid()))&&this.goldenPages>0&&this.minPages>0&&this.maxPages>0&&this.normalRooms.length>0&&(0,$.every)(this.normalRooms,(k=>k.isValid()))&&this.monsterRooms.length>0&&(0,$.every)(this.monsterRooms,(k=>k.isValid()))&&null!==this.endRoom&&this.endRoom.isValid()}}class at extends st.B{constructor(){super(...arguments),this.type="",this.ID=0,this.quantity=0}setType(k){this.type=k}getType(){return this.type}setID(k){this.ID=k}getID(){return this.ID}setQuantity(k){this.quantity=k}getQuantity(){return this.quantity}isValid(){return this.ID>0&&this.quantity>0&&this.type.length>0}}class rt extends st.B{constructor(){super(...arguments),this.minLength=0,this.maxLength=0,this.minPaths=0,this.maxPaths=0}setMinLength(k){this.minLength=k}getMinLength(){return this.minLength}setMaxLength(k){this.maxLength=k}getMaxLength(){return this.maxLength}setMinPaths(k){this.minPaths=k}getMinPaths(){return this.minPaths}setMaxPaths(k){this.maxPaths=k}getMaxPaths(){return this.maxPaths}isValid(){return this.minLength>0&&this.maxLength>0&&this.minPaths>0&&this.maxPaths>0}}class ot extends st.B{constructor(){super(...arguments),this.tileMap="",this.fsmId=0}setTileMap(k){this.tileMap=k}getTileMap(){return this.tileMap}setFSM(k){this.fsmId=k}getFSM(){return this.fsmId}isValid(){return this.fsmId>0&&this.tileMap.length>0}}class ht extends it.z{deserialize(k){let B=new nt;return null!==k&&1===k.version&&(B.setSeed(k.seed),B.setGridWidth(k.gridWidth),B.setGridHeight(k.gridHeight),B.setMinCritPathLength(k.minCritPathLength),B.setMaxCritPathLength(k.maxCritPathLength),B.setMonsterIDs(k.monsterIDs),B.setMinEncounters(k.minEncounters),B.setMaxEncounters(k.maxEncounters),B.setMonsterDrops(it.z.deserializeCollection(k.monsterDrops,ht.deserializeMonstersDrop)),B.setGoldenPages(k.goldenPages),B.setMinPages(k.minPages),B.setMaxPages(k.maxPages),B.setBattleDifficulty(k.battleDifficulty),B.setExtraPaths(ht.deserializePath(k.extraPaths)),B.setNormalRooms(it.z.deserializeCollection(k.normalRooms,ht.deserializeRoom)),B.setMonsterRooms(it.z.deserializeCollection(k.monsterRooms,ht.deserializeRoom)),B.setEndRoom(ht.deserializeRoom(k.endRoom))),B.isValid()||(B=null),B}serialize(k){let B=null;return k.isValid()&&(B={version:1,seed:k.getSeed(),gridWidth:k.getGridWidth(),gridHeight:k.getGridHeight(),minCritPathLength:k.getMinCritPathLength(),maxCritPathLength:k.getMaxCritPathLength(),monsterIDs:k.getMonsterIDs(),minEncounters:k.getMinEncounters(),maxEncounters:k.getMaxEncounters(),monsterDrops:it.z.serializeCollection(k.getMonsterDrops(),ht.serializeMonstersDrop),goldenPages:k.getGoldenPages(),minPages:k.getMinPages(),maxPages:k.getMaxPages(),battleDifficulty:k.getBattleDifficulty(),extraPaths:ht.serializePath(k.getExtraPaths()),normalRooms:it.z.serializeCollection(k.getNormalRooms(),ht.serializeRoom),monsterRooms:it.z.serializeCollection(k.getMonsterRooms(),ht.serializeRoom),endRoom:ht.serializeRoom(k.getEndRoom())}),B}static deserializeMonstersDrop(k){const B=new at;return B.setID(k.ID),B.setType(k.type),B.setQuantity(k.N),B}static serializeMonstersDrop(k){return{type:k.getType(),ID:k.getID(),N:k.getQuantity()}}static deserializeRoom(k){const B=new ot;return B.setFSM(k.fsmId),B.setTileMap(k.tileMap),B}static serializeRoom(k){return{tileMap:k.getTileMap(),fsmId:k.getFSM()}}static deserializePath(k){const B=new rt;return B.setMinLength(k.minLength),B.setMaxLength(k.maxLength),B.setMinPaths(k.minPaths),B.setMaxPaths(k.maxPaths),B}static serializePath(k){return{minLength:k.getMinLength(),maxLength:k.getMaxLength(),minPaths:k.getMinPaths(),maxPaths:k.getMaxPaths()}}}let ct=class extends et.k{constructor(k){super(),this.dataProvider=null,this.container=null,this.dataProvider=k,this.container=new tt.Container,this.container.bind("v1").to(ht)}getDungeon(k){const B=this.dataProvider.getDungeon(k);return this.container.get(`v${B.version}`).deserialize(B)}};ct=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)(F.DungeonDataProvider)),(0,G.Sn)("design:paramtypes",[Object])],ct);var dt=U(84959),lt=U(76572);let ut=class{constructor(k){this.storageExpiration=null,this.storageExpiration=k}getValue(k){var B;return this.hasValue(k)&&!(null===(B=this.storageExpiration)||void 0===B?void 0:B.hasExpired(k))?this.retrieveValueFromStorage(k):null}invalidate(){var k;null===(k=this.storageExpiration)||void 0===k||k.invalidate()}storeValue(k,B){var U;null===(U=this.storageExpiration)||void 0===U||U.cacheItem(k),this.storeValueInStorage(k,B)}};ut=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)(F.CacheExpirationStrategy)),(0,G.Sn)("design:paramtypes",[Object])],ut);let ft=class{};ft=(0,G.Cg)([(0,tt.injectable)()],ft);class bt extends st.B{constructor(){super(...arguments),this.type=null,this.ID=-1,this.amount=1}getType(){return this.type}setType(k){this.type=k}getAmount(){return this.amount}setAmount(k){this.amount=k}getID(){return this.ID}setID(k){this.ID=k}isValid(){return this.ID>0&&this.amount>0&&null!==this.type&&this.type.length>0}}class pt extends st.B{constructor(){super(...arguments),this.name=null,this.pages=null,this.merchantAvatar=null,this.currencyType=null,this.currencyID=-1}getName(){return this.name}setName(k){this.name=k}getPages(){return this.pages}setPages(k){this.pages=k}getMerchantAvatar(){return this.merchantAvatar}setMerchantAvatar(k){this.merchantAvatar=k}getStoreCurrencyType(){return this.currencyType}setStoreCurrencyType(k){this.currencyType=k}getStoreCurrencyID(){return this.currencyID}setStoreCurrencyID(k){this.currencyID=k}isValid(){return null!==this.merchantAvatar&&this.merchantAvatar.isValid()&&null!==this.name&&this.name.length>0&&null!==this.currencyType&&this.currencyType.length>0&&this.currencyID>0&&null!==this.pages&&this.pages.length>0&&(0,$.every)(this.pages,(k=>k.isValid()))}}var vt,gt=U(12049);class mt extends st.B{constructor(){super(...arguments),this.tag=null,this.frame="",this.scale={x:1,y:1},this.position={x:0,y:0}}getAssetTag(){return this.tag}setAssetTag(k){this.tag=k}getAssetFrame(){return this.frame}setAssetFrame(k){this.frame=k}getScale(){return this.scale}setScale(k,B){this.scale.x=k,this.scale.y=B}getPosition(){return this.position}setPosition(k,B){this.position.x=k,this.position.y=B}isValid(){return null!==this.tag&&this.tag.length>0}}class yt extends st.B{constructor(){super(...arguments),this.itemType=null,this.itemID=-1,this.topText=null,this.bottomText=null}getItemType(){return this.itemType}setItemType(k){this.itemType=k}getItemID(){return this.itemID}setItemID(k){this.itemID=k}getTopText(){return this.topText}setTopText(k){this.topText=k}getBottomText(){return this.bottomText}setBottomText(k){this.bottomText=k}isValid(){return null!==this.itemType&&this.itemType.length>0&&this.itemID>0}}class _t extends st.B{constructor(){super(...arguments),this.button=null,this.items=null}getButton(){return this.button}setButton(k){this.button=k}isDefault(){return this.isDefaultTab}setIsDefault(k){this.isDefaultTab=k}getStoreItems(){return this.items}setStoreItems(k){this.items=k}isValid(){return null!==this.button&&this.button.isValid()&&null!==this.items&&this.items.length>0&&(0,$.every)(this.items,(k=>k.isValid()))}}let Et=vt=class extends it.z{deserialize(k){let B=new pt;return null!==k&&1===k.version&&(B.setName(k.name),B.setStoreCurrencyID(k.currencyID),B.setStoreCurrencyType(k.currencyType),B.setMerchantAvatar(vt.deserializeMerchantAvatar(k.merchantAvatar)),B.setPages(vt.deserializeCollection(k.pages,vt.deserializeTab))),B.isValid()||(B=null),B}serialize(k){let B=null;return k.isValid()&&(B={version:1,name:k.getName(),currencyID:k.getStoreCurrencyID(),currencyType:k.getStoreCurrencyType(),merchantAvatar:vt.serializeMerchantAvatar(k.getMerchantAvatar()),pages:vt.serializeCollection(k.getPages(),vt.serializeTab)}),B}static deserializeMerchantAvatar(k){const B=new mt;return B.setAssetFrame(k.frame),B.setAssetTag(k.tag),B.setPosition(k.position.x,k.position.y),B.setScale(k.scale.x,k.scale.y),B}static serializeMerchantAvatar(k){return{tag:k.getAssetTag(),frame:k.getAssetFrame(),position:Object.assign({},k.getPosition()),scale:Object.assign({},k.getScale())}}static deserializeTab(k){const B=new _t;return B.setButton(vt.deserializeTabButton(k.btn)),B.setIsDefault(k.isDefault),B.setStoreItems(vt.deserializeCollection(k.items,vt.deserializeStoreItem)),B}static serializeTab(k){return{btn:vt.serializeTabButton(k.getButton()),isDefault:k.isDefault(),items:vt.serializeCollection(k.getStoreItems(),vt.serializeStoreItem)}}static deserializeTabButton(k){const B=new yt;return B.setItemType(k.icon.type),B.setItemID(k.icon.ID),B.setTopText(k.top),B.setBottomText(k.bot),B}static serializeTabButton(k){return{icon:{type:k.getItemType(),ID:k.getItemID()},bot:k.getBottomText(),top:k.getTopText()}}static deserializeStoreItem(k){const B=new gt.J;return B.setType(k.type),B.setID(k.ID),B.setCost(vt.deserializeCollection(k.cost,vt.deserializeStoreCost)),B}static serializeStoreItem(k){return{ID:k.getID(),type:k.getType(),cost:vt.serializeCollection(k.getCost(),vt.serializeStoreCost)}}static deserializeStoreCost(k){const B=new bt;return B.setAmount(k.N),B.setType(k.type),B.setID(k.ID),B}static serializeStoreCost(k){return{N:k.getAmount(),ID:k.getID(),type:k.getType()}}};Et=vt=(0,G.Cg)([(0,tt.injectable)()],Et);let wt=class extends et.k{constructor(k,B){super(),this.dataProvider=null,this.cache=null,this.factoriesContainer=null,this.dataProvider=k,this.cache=B,this.factoriesContainer=new tt.Container,this.factoriesContainer.bind("v1").to(Et)}getStore(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=`store-${k}`;let U=this.cache.getValue(B);if(null===U){const[F,G]=yield this.dataProvider.getStore(k);if(!G)return null!==F?[F,null]:[new lt._("Store was not found"),null];U=this.factoriesContainer.get(`v${G.version}`).deserialize(G),this.cache.storeValue(B,U)}return[null,U]}))}invalidateCache(){this.cache.invalidate()}};wt=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)(F.StoreDataProvider)),(0,G.Qj)(1,(0,tt.inject)(F.CacheStorageStrategy)),(0,G.Sn)("design:paramtypes",[ft,ut])],wt);let Tt=class extends ut{constructor(k){super(k),this.cache={}}hasValue(k){return void 0!==this.cache[k]}invalidate(){super.invalidate(),this.cache={}}retrieveValueFromStorage(k){return this.cache[k]}storeValueInStorage(k,B){this.cache[k]=B}};Tt=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)(F.CacheExpirationStrategy)),(0,G.Sn)("design:paramtypes",[Object])],Tt);let St=class{constructor(){this.cacheTime={},this.expiryMilliseconds=3e5}setExpiryTimeInMinutes(k){this.expiryMilliseconds=6e4*k}setExpiryTimeInSeconds(k){this.expiryMilliseconds=1e3*k}cacheItem(k){this.cacheTime[k]=Date.now()}hasExpired(k){return void 0===this.cacheTime[k]||Date.now()>this.cacheTime[k]+this.expiryMilliseconds}invalidate(){this.cacheTime={}}};St=(0,G.Cg)([(0,tt.injectable)()],St);var At=U(7408),Ct=U(51540),Ot=U(55080),It=U(40579),Dt=U(76277);const Rt=(0,U(77601).gb)({key:"game-native-app-notification-config",activateAssociatedExperiments:0,evaluate:k=>Object.assign(Object.assign({},k),{notifications:k.enabled&&Array.isArray(k.notifications)?[...k.notifications]:[]}),default:{enabled:!0,notifications:[]}});var Pt=U(98252);let Mt=class{isNativeAppNotificationFeatureEnabled(){return Pt.pF.isNativeApp()&&(0,Dt.G)(Rt).enabled}getNativeAppNotifications(){const k=(0,Dt.G)(Rt).notifications;return this.isNativeAppNotificationFeatureEnabled()&&(null==k?void 0:k.length)>0?k:[]}getNativeAppNotificationFromTriggerType(k){return this.getNativeAppNotifications().filter((B=>B.notificationTrigger===k))}getNativeAppNotificationFromId(k){return this.getNativeAppNotifications().filter((B=>(null==B?void 0:B.id)===k))}presentOrScheduleNativeAppNotification({triggerType:k,id:B}){var U,F,G;let j;return k&&(j=this.getNativeAppNotificationFromTriggerType(k)),!j&&B&&(j=this.getNativeAppNotificationFromId(B)),!!j&&(null===(G=null===(F=null===(U=window.SW)||void 0===U?void 0:U.NATIVE_APP_NOTIFICATIONS)||void 0===F?void 0:F.presentOrScheduleNotification)||void 0===G||G.call(F,j),!0)}triggerNotification({triggerType:k,id:B}){try{if(!this.isNativeAppNotificationFeatureEnabled())return;this.presentOrScheduleNativeAppNotification({triggerType:k,id:B})}catch(U){j.RQr.createHandler("Error presenting native app notification")(U)}}};Mt=(0,G.Cg)([(0,tt.injectable)()],Mt);let Nt=class{triggerNotification(){}};Nt=(0,G.Cg)([(0,tt.injectable)()],Nt);var xt=U(83634),Lt=U(88061),kt=U(20352),Bt=U(88701),Ut=U(91207),Ft=U(24521),Gt=U(23029);let jt=class{get constants(){var k,B;return this.assetData||(this.assetData=null===(B=null===(k=Gt.R.loadData(Ft.r.BattleRevampConstants_json))||void 0===k?void 0:k.battleConstants)||void 0===B?void 0:B.spawns),this.assetData}};jt=(0,G.Cg)([(0,tt.injectable)()],jt);let $t=class{constructor(){this.constants=U(94554)}};$t=(0,G.Cg)([(0,tt.injectable)()],$t);var Ht=U(84643),Vt=U(34829),Wt=U(1195),qt=U(48417);class Kt{static getStoreId(k){return this._overrideMap||this.populateOverrideMap(),this._overrideMap.has(k)?this._overrideMap.get(k):k}static populateOverrideMap(){var k;const B=K.q.instance.prodigy.gameContainer.get("073-6f3b");this._overrideMap=new Map;for(const U of this._experimentsToCheck){const F=null!==(k=B.getFeatureValue(U))&&void 0!==k?k:[];for(const k of F)this._overrideMap.has(k.storeId)||this._overrideMap.set(k.storeId,k.override)}}}Kt._experimentsToCheck=[];var zt=U(76546);let Yt=class extends zt.D{getStore(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;const U=null!==(B=Kt.getStoreId(k))&&void 0!==B?B:k;try{return[null,yield this.makeCloudscriptRequest(qt.D.GameStore.GetStore,{storeId:U},!1)]}catch(F){return[new lt._(F.message),null]}}))}};Yt=(0,G.Cg)([(0,tt.injectable)()],Yt);var Qt=U(47008),Xt=U(79600),Zt=U(95066),Jt=U(36525),te=U(37629);class ee extends te.c{getContentType(){return"application/json"}getData(){return JSON.stringify(this.getJson())}}var ie,se=U(78686),ne=U(69698);se.defaults.storage=window.sessionStorage;let ae=ie=class{constructor(k){this.timeManager=null,this.timeManager=k}handleErrorCallback(){K.q.instance.prodigy.gameContainer.get("c97-bd0d").logout(!0)}isLoggedIn(){const k=se.remember(ie.JWT_STORAGE_KEY,window.sessionStorage);return this.validate(k)}getToken(){const k=se.get(ie.JWT_STORAGE_KEY,window.sessionStorage);return k.startsWith("Bearer")?k.substring(7):k}authenticateRequest(k){k.setHeader("Authorization",se.get(ie.JWT_STORAGE_KEY,window.sessionStorage),!0)}validate(k){if(j.Aq$.isDefined(k)&&j.Aq$.isDefined(k.claim)){const B=this.timeManager.getServerTimeMs()/1e3;if((!j.Aq$.isDefined(k.claim.exp)||k.claim.exp>B)&&(!j.Aq$.isDefined(k.claim.nbf)||k.claim.nbf{if(k.isOK())return k.data;throw new Error(`Unexpected result: ${JSON.stringify(k)}`)})).catch((k=>{const B=k;throw B.code===Xt.EErrorCode.ScriptError&&500===B.errorInfo.status&&j.VyI.log(`[WeeklyChallengeService] ${B.errorInfo.result.message}`,j.$bb.Verbose),j.VyI.log(`WeeklyChallengeService.getPlayerWeeklyChallengeData caught an error : ${j.RQr.stringify(k)}`,j.$bb.Warning),k}));G.resolve(H)}catch(e){G.reject(e)}finally{this._getWeeklyChallengeGoalPromise=null}return G}))}};ce.REQUEST_TIMEOUT_DURATION_MS=1e4,ce.REQUEST_RETRY_COUNT=5,ce=he=(0,G.Cg)([(0,tt.injectable)()],ce);var de=U(23034),le=U(77938);class ue{calculateDamage(k,B,U,F=0,G=1){let $=0;j.Aq$.isDefined(k)&&j.Aq$.isDefined(k.data.damage)&&($=k.data.damage);const H=k.data.element,V=U.getElement();return"Glacial Shield"!==k.data.name&&0===U.modifiers.ignoreElement&&(this.isStrong(H,V)?$+=4:this.isWeak(H,V)&&($-=3,$<=0&&($=2))),$=Math.floor(10*$*G),Math.max(Math.floor($+(j.Aq$.isDefined(F)?F:0)),0)}isStrong(k,B){return j.Aq$.isDefined(k)&&j.Aq$.isDefined(B)&&("fire"===k&&("ice"===B||"earth"===B||"ice & fire"===B)||"water"===k&&("fire"===B||"ice & fire"===B)||"earth"===k&&"water"===B||"storm"===k&&"water"===B||"mech"===k&&"mech"===B||"ice"===k&&("storm"===B||"mech"===B)||"shadow"===k&&"wizard"!==B||"wizard"===k&&"shadow"===B)}isWeak(k,B){return j.Aq$.isDefined(k)&&j.Aq$.isDefined(B)&&("fire"===k&&"water"===B||"water"===k&&("earth"===B||"storm"===B||"mech"===B)||"earth"===k&&("fire"===B||"ice & fire"===B)||"storm"===k&&"ice"===B||"ice & fire"===B||"mech"===k&&"ice"===B||"ice & fire"===B||"ice"===k&&"fire"===B||"ice & fire"===B||"shadow"===k&&"wizard"===B||"wizard"!==k&&"shadow"===B)}getBestAttack(k,B,U=0){if(k.length<=0)return null;const F=[];let G;for(let H=0;HB.dmg-k.dmg));let j=F[F.length-1].ID,$=U;for(let H=0;H$){j=F[H].ID;break}$*=.75}return this.getAttack(j)}getAttack(k){return le.t.getItem("spell",k)}getHealingAttack(k){let B;for(let U=0;UK.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(U.textKey),configurable:!0})}}}get(k,B){return this.data[k][B]}}var be=U(34992),pe=U(36545),ve=U(15821);let ge=class{get constants(){return ve.A.isDefined(this._spellLevelBonuses)||(this._spellLevelBonuses=Gt.R.loadData(Ft.r.SpellLevelBonusConfigs_json).spellLevelBonusConstants),this._spellLevelBonuses}};ge=(0,G.Cg)([(0,tt.injectable)()],ge);var me,ye=U(96535),_e=U(63352),Ee=U(54950),we=U(63860),Te=U(52743),Se=U(35537);let Ae=class{constructor(){this.onChange=new j.HN0,this[me]="questProgress"}get value(){return this._value}[(me=Se.sE,Se.JN)](k){return(0,G.sH)(this,void 0,void 0,(function*(){this._value=k,this.onChange.dispatch(k)}))}destroy(){this.onChange.dispose()}};Ae=(0,G.Cg)([(0,tt.injectable)()],Ae);var Ce,Oe=U(129),Ie=U(23082),De=U(10670),Re=U(13956),Pe=U(51151),Me=U(30628),Ne=U(52850),xe=U(75408);let Le=Ce=class{constructor(){this.onMatched=new j.HN0,this.onWaitTimeExhausted=new j.HN0,this.onMatchmakingFailure=new j.HN0,this.onQuit=new j.HN0,this.onHostInviteReceived=new j.HN0}startMatchmaking(k){return(0,G.sH)(this,void 0,void 0,(function*(){(yield this._theNetworkManager.startMatchmaking(k))?(this._boundMatchedCallback=this.processMatchedMessage.bind(this),this._boundWaitTimeExhaustedCallback=this.processWaitTimeExhaustedMessage.bind(this),this._boundDisconnectCallback=this.processDisconnection.bind(this),this._matchmakingSocket.addListener(j.KZk.Matched,this._boundMatchedCallback),this._matchmakingSocket.addListener(j.KZk.WaitTimeExhausted,this._boundWaitTimeExhaustedCallback),this._matchmakingSocket.addListener(j.KZk.Disconnect,this._boundDisconnectCallback),yield Promise.race([this.onQuit.asPromise(),this.onMatched.asPromise(),this.onWaitTimeExhausted.asPromise()]).finally((()=>{this.quitMatchmaking()}))):this.onMatchmakingFailure.dispatch(new Error("Matchmaking: Error connecting to the matcher api"))}))}quitMatchmaking(){this.onQuit.dispatch(),this._matchmakingSocket.removeListener(j.KZk.Matched,this._boundMatchedCallback),this._matchmakingSocket.removeListener(j.KZk.WaitTimeExhausted,this._boundWaitTimeExhaustedCallback),this._matchmakingSocket.removeListener(j.KZk.Disconnect,this._boundDisconnectCallback),this._boundMatchedCallback=null,this._boundWaitTimeExhaustedCallback=null,this._boundDisconnectCallback=null,this._theNetworkManager.quitMatchmaking()}processMatchedMessage(k){const B=Me.B.fromArray(Pe.DuelInviteProto,k.opponentData.data),U=new Oe.a(K.q.instance.game);U.initFromProtobuf({userID:B.userID,appearance:B.appearance,equipment:B.equipment,name:B.name,team:B.team,member:B.member,level:B.level});const F={opponent:U,isOpponentHost:k.opponentData.host};this.onMatched.dispatch(F)}processWaitTimeExhaustedMessage(){this.onWaitTimeExhausted.dispatch()}processDisconnection(){this.onMatchmakingFailure.dispatch(new Error("Matchmaking: Disconnected while matchmaking was running"))}startDuel(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(k.isOpponentHost){const B=this._inviteService.getInvites().find((B=>B.userID===k.opponent.userID));if(B)return void this.handleInviteReceived(k.opponent.userID,B);this._inviteService.onInviteReceived.add(this.handleInviteReceived.bind(this,k.opponent.userID),this);const U=j.Egh.timeout(Ce.HOST_INVITE_WAIT_TIME_MS).then((()=>{throw new Error("Timed out waiting for host invite")}));yield Promise.race([this.onHostInviteReceived.asPromise(),U]).finally((()=>{this._inviteService.onInviteReceived.removeAll(this)}))}else yield Ne.e.invite(De.VB.DuelsStadium,k.opponent,this.onDuelEnd.bind(this))}))}onDuelEnd(){K.q.instance.game.state.get(Ie.G.DuelMatchmaking).roomConfig=null,xe.d.openDuelsStadiumMenu().catch(j.RQr.createHandler("Error going back to Duels Stadium menu"))}handleInviteReceived(k,B){B.userID===k&&(this._inviteService.onInviteReceived.removeAll(this),this.onHostInviteReceived.dispatch(),Ne.e.acceptInvite(De.VB.DuelsStadium,B,this.onDuelEnd.bind(this)))}destroy(){this.onMatched.dispose(),this.onWaitTimeExhausted.dispose(),this.onMatchmakingFailure.dispose(),this.onQuit.dispose(),this.onHostInviteReceived.dispose()}};Le.HOST_INVITE_WAIT_TIME_MS=7e3,(0,G.Cg)([(0,Re.b)("03c-6e1e"),(0,G.Sn)("design:type",Object)],Le.prototype,"_matchmakingSocket",void 0),(0,G.Cg)([(0,Re.b)("c97-bd0d"),(0,G.Sn)("design:type",Function)],Le.prototype,"_theNetworkManager",void 0),(0,G.Cg)([(0,Re.b)("636-444c"),(0,G.Sn)("design:type",Object)],Le.prototype,"_inviteService",void 0),Le=Ce=(0,G.Cg)([(0,tt.injectable)()],Le);var ke,Be=U(17516),Ue=U(70330);!function(k){k[k.ServiceUnreachable=0]="ServiceUnreachable",k[k.BattleRoomUnavailable=1]="BattleRoomUnavailable",k[k.Unknown=2]="Unknown"}(ke||(ke={}));var Fe,Ge=U(67665);!function(k){k.Accept="Accept",k.Decline="Decline"}(Fe||(Fe={}));var je,$e=U(52498);let He=je=class{constructor(k){this.jsonData={},this.environment=null,this.loggedFeatureFlagErrors=[],this.environment=k,this.baseAssetsUrl=`${Vt.s.get("GameConstants.Build.ASSETS_LOCATION")}${Vt.s.get("GameConstants.Build.ASSETS_FOLDER")}/`}initializeWithJson(k){this.jsonData=k}getValue(k,B=null){var U;if(j.Aq$.isDefined(this.jsonData[k]))return this.jsonData[k];if((null===(U=this.jsonData.enableVerboseFeatureFlagLogging)||void 0===U||U)&&!this.loggedFeatureFlagErrors.includes(k)){this.loggedFeatureFlagErrors.push(k);let U=`Could not find feature flag value for key: ${k}. `;U+=`Returning the default: ${String("object"==typeof B?JSON.stringify(B):B)}`,j.VyI.log(U,j.$bb.Verbose)}return B}getItemsDataURI(){let k=this.getValue("gameDataVersion");return k=j.Aq$.isDefined(k)&&"0"!==k?`${k}/`:"",`${this.getValue("gameDataPath")}${k}game-metadata.json`}getAssetsDataURI(){var k;const B=K.q.instance.prodigy.gameContainer.get("6a1-4b92").getCurrentEnvironment(),U=this.getAssetURLSuffix(B);let F;if(null===(k=window.gameEnvironmentVariables)||void 0===k?void 0:k.loadAssetsFromPrevEnv){const k=window.gameEnvironmentVariables.prevEnvId;F=`${this.baseAssetsUrl}assets-metadata-${k}.json${U}`}else{const k=this.getLocalAssetVersion();F=`${this.getBaseAssetsURL()}/${k}assets-metadata.json${U}`}return F}getDependencyMapURI(){var k;const B=K.q.instance.prodigy.gameContainer.get("6a1-4b92").getCurrentEnvironment(),U=this.getAssetURLSuffix(B);let F;if(null===(k=window.gameEnvironmentVariables)||void 0===k?void 0:k.loadAssetsFromPrevEnv){const k=window.gameEnvironmentVariables.prevEnvId;F=`${this.baseAssetsUrl}dependencyMap-${k}.json${U}`}else{const k=this.getLocalAssetVersion();F=`${this.getBaseAssetsURL()}/${k}dependencyMap.json${U}`}return F}getAssetPathConfigURI(){var k;const B=K.q.instance.prodigy.gameContainer.get("6a1-4b92").getCurrentEnvironment(),U=this.getAssetURLSuffix(B);let F;if(null===(k=window.gameEnvironmentVariables)||void 0===k?void 0:k.loadAssetsFromPrevEnv){const k=window.gameEnvironmentVariables.prevEnvId;F=`${this.baseAssetsUrl}assetPathConfig-${k}.json${U}`}else{const k=this.getLocalAssetVersion();F=`${this.getBaseAssetsURL()}/${k}assetPathConfig.json${U}`}return F}getLocalAssetVersion(){let k=this.getValue("gameAssetsVersion");return k=k&&"0"!==k?`${k}/`:"",k}getPrefabsURIs(){var k;const B=this.getLocalAssetVersion(),U=K.q.instance.prodigy.gameContainer.get("6a1-4b92").getCurrentEnvironment();let F,G;if(null===(k=window.gameEnvironmentVariables)||void 0===k?void 0:k.loadAssetsFromPrevEnv){G=`-${window.gameEnvironmentVariables.prevEnvId}`,F=this.baseAssetsUrl}else G="",F=`${this.getBaseAssetsURL()}/${B}`;const j=[];for(let $=0;${})}destroy(){this.onInviteReceived.dispose(),this.onInviteCancelled.dispose(),this.onInviteRejected.dispose(),this.onInviteFailed.dispose(),this.onInviteSent.dispose(),this.onInviteRemoved.dispose()}getInvites(){return this._invites}sendInvite(k){this.verboseLog("Retrieving room ID for battle room service");const B=k.userID;this._battleService.getRoomId(`${B}`).then((U=>{var F,G,j,$,H;this.verboseLog(`Retrieved room ID ${U}. Sending invite to user ${B}.`);const V=this._loggedInPlayer.player,W=V.getPlayerData().playerTransformation,q=V.appearance.getData(),z=V.equipment.getData(),Y=V.appearance.getName(),Q=Pe.DuelInviteProto.create({roomID:U,userID:V.userID,team:V.data.team,member:V.hasMembership()?1:0,level:V.getLevel(),appearance:{faceID:q.face,hair:{styleID:q.hair.style,colorID:q.hair.color},skinColorID:q.skinColor,eyeColorID:q.eyeColor,morph:W?{type:W.transformType,ID:W.transformID}:null},equipment:{hatID:z.hat,bootsID:z.boots,weaponID:z.weapon,outfitID:z.outfit,costumeID:z.costume},name:{first:Y.getFirstName(),middle:Y.getMiddleName(),last:Y.getLastName(),nick:Y.getNickname()}});this._multiplayerSocket.emitEvent("message",{action:Ke.Invite,target:B,data:Me.B.toArray(Pe.DuelInviteProto,Q)}),this._segment.social.sendDuelRequestSentEvent({opponent_id:B,is_classmate:K.q.instance.prodigy.friendsListNetworkHandler.isClassmate(B),is_friend:K.q.instance.prodigy.friendsListNetworkHandler.isFriend(B),opponent_hat_id:null===(F=k.equipment)||void 0===F?void 0:F.getHat(),opponent_boots_id:null===(G=k.equipment)||void 0===G?void 0:G.getBoots(),opponent_outfit_id:null===(j=k.equipment)||void 0===j?void 0:j.getOutfit(),opponent_relic_id:null===($=k.equipment)||void 0===$?void 0:$.getSpellRelic(),opponent_wand_id:null===(H=k.equipment)||void 0===H?void 0:H.getWeapon()}),this.onInviteSent.dispatch(Q)})).catch((k=>{j.RQr.logError(k,"MultiplayerSocketDuelingInviteService - Failed to retrieve roomID: ");switch((k instanceof Ve?k:new Ve(We.Unknown)).type){case We.ApiMaintenance:this.onInviteFailed.dispatch(ke.BattleRoomUnavailable);break;case We.ServiceUnreachable:this.onInviteFailed.dispatch(ke.ServiceUnreachable);break;default:this.onInviteFailed.dispatch(ke.Unknown)}}))}rejectInvite(k){const B=this._invites.indexOf(k);B>-1?(this.verboseLog(`Sending invite rejection to user ${k.userID}`),this.sendRejectInvite(k),this.sendDuelRequestAnsweredEvent(B,k,Fe.Decline),this.onInviteRemoved.dispatch(this._invites.splice(B,1)[0])):j.VyI.log(`MultiplayerSocketDuelingInviteService - Could not find invite ${JSON.stringify(k instanceof Pe.DuelInviteProto?k.toJSON():k)} to reject`,j.$bb.Warning)}sendRejectInvite(k){const B=Pe.DuelRejectionProto.create({userID:this._loggedInPlayer.player.userID});this._multiplayerSocket.emitEvent("message",{action:Ke.InviteRejected,target:k.userID,data:Me.B.toArray(Pe.DuelRejectionProto,B)})}acceptInvite(k){const B=this._invites.indexOf(k);B>-1?(this.verboseLog(`Accepting invite ${JSON.stringify(k instanceof Pe.DuelInviteProto?k.toJSON():k)}`),this.sendDuelRequestAnsweredEvent(B,k,Fe.Accept),this.onInviteRemoved.dispatch(this._invites.splice(B,1)[0])):j.VyI.log(`MultiplayerSocketDuelingInviteService - Invite was accepted but not found in list. Nothing will send. ${JSON.stringify(k instanceof Pe.DuelInviteProto?k.toJSON():k)}`,j.$bb.Warning)}cancelInvite(k){this.verboseLog(`Sending cancellation to user ${k}.`);const B=Pe.DuelCancellationProto.create({userID:this._loggedInPlayer.player.userID});this._multiplayerSocket.emitEvent("message",{action:Ke.InviteCancelled,target:k,data:Me.B.toArray(Pe.DuelCancellationProto,B)})}processMessage(k){const B=this._featureFlags.getValue("enableVerboseDuelService",!1);switch(k.action){case Ke.Invite:{const U=Me.B.fromArray(Pe.DuelInviteProto,k.data);this._invites.push(U),this._segment.social.sendDuelRequestReceivedEvent({opponent_id:U.userID,is_classmate:K.q.instance.prodigy.friendsListNetworkHandler.isClassmate(U.userID),is_friend:K.q.instance.prodigy.friendsListNetworkHandler.isFriend(U.userID)}),this.onInviteReceived.dispatch(U),B&&this.verboseLog(`Received invite from other user ${JSON.stringify(U.toJSON())}`);break}case Ke.InviteRejected:{const U=Me.B.fromArray(Pe.DuelRejectionProto,k.data);B&&this.verboseLog(`Received rejection from other user ${JSON.stringify(U.toJSON())}`),this.onInviteRejected.dispatch(U.userID);break}case Ke.InviteCancelled:{const U=Me.B.fromArray(Pe.DuelCancellationProto,k.data),F=this._invites.findIndex((k=>k.userID===U.userID));F>-1?(B&&this.verboseLog(`Received cancellation from other user ${JSON.stringify(U.toJSON())}`),this.onInviteCancelled.dispatch(this._invites.splice(F,1)[0])):j.VyI.log(`MultiplayerSocketDuelingInviteService - Invite was cancelled by user ${U.userID}, but not found`,j.$bb.Warning);break}}}sendDuelRequestAnsweredEvent(k,B,U){const F=K.q.instance.prodigy.friendsListNetworkHandler;this._segment.social.sendDuelRequestAnsweredEvent({opponent_id:B.userID,is_classmate:F.isClassmate(B.userID),is_friend:F.isFriend(B.userID),friends:F.friendsList.length,classmates:F.classList.length,index:k,challenges_pending:this._invites.length,challenge_response:U})}verboseLog(k){j.VyI.log(`${this.serviceName} - ${k}`,j.$bb.Verbose)}};(0,G.Cg)([(0,Re.b)("e2e-64d8"),(0,G.Sn)("design:type",Object)],ze.prototype,"_multiplayerSocket",void 0),(0,G.Cg)([(0,Re.b)("e20-0fb0"),(0,G.Sn)("design:type",Wt.E)],ze.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,Re.b)("80c-6fa4"),(0,G.Sn)("design:type",He)],ze.prototype,"_featureFlags",void 0),(0,G.Cg)([(0,Re.b)("efb-f022"),(0,G.Sn)("design:type",qe)],ze.prototype,"_battleService",void 0),(0,G.Cg)([(0,Re.b)("c47-20b6"),(0,G.Sn)("design:type",Ge.Y)],ze.prototype,"_segment",void 0),ze=(0,G.Cg)([(0,tt.injectable)(),(0,G.Sn)("design:paramtypes",[])],ze);let Ye=class extends ze{get serviceName(){return"SynapseDuelingInviteService"}constructor(){super(),this._synapse.onNotificationReceived.add(this.processNotification,this)}destroy(){this._synapse.onNotificationReceived.remove(this.processNotification,this),super.destroy()}sendInvite(k){const B=Object.create(null,{sendInvite:{get:()=>super.sendInvite}});return(0,G.sH)(this,void 0,void 0,(function*(){var U,F,G,$,H;const V=k.userID,W=this._loggedInPlayer.player,q=W.getPlayerData().playerTransformation,z=W.appearance.getData(),Y=W.equipment.getData(),Q=W.appearance.getName(),X={userID:W.userID,member:W.hasMembership()?1:0,level:W.getLevel()+W.getChargedLevel(),appearance:{face:z.face,hair:{style:z.hair.style,color:z.hair.color},skinColor:z.skinColor,eyeColor:z.eyeColor,morph:q?{type:q.transformType,ID:q.transformID}:null},equipment:{hatID:Y.hat,bootsID:Y.boots,weaponID:Y.weapon,outfitID:Y.outfit,costumeID:Y.costume},name:{first:Q.getFirstName(),middle:Q.getMiddleName(),last:Q.getLastName(),nick:Q.getNickname()}};try{this.verboseLog(`Attempting invite via notification service to user ${V}`);const j=yield this._battleService.sendInvite(`${V}`,X);this._legacyInviteSent=!j.wasInvited,j.wasInvited?(this.verboseLog(`User was invited to channel name ${j.channelName}.`),this._segment.social.sendDuelRequestSentEvent({opponent_id:V,is_classmate:K.q.instance.prodigy.friendsListNetworkHandler.isClassmate(V),is_friend:K.q.instance.prodigy.friendsListNetworkHandler.isFriend(V),opponent_hat_id:null===(U=k.equipment)||void 0===U?void 0:U.getHat(),opponent_boots_id:null===(F=k.equipment)||void 0===F?void 0:F.getBoots(),opponent_outfit_id:null===(G=k.equipment)||void 0===G?void 0:G.getOutfit(),opponent_relic_id:null===($=k.equipment)||void 0===$?void 0:$.getSpellRelic(),opponent_wand_id:null===(H=k.equipment)||void 0===H?void 0:H.getWeapon()}),this.onInviteSent.dispatch(j)):(this.verboseLog(`User is not on the notification service. Sending legacy invite with channel name ${j.channelName}.`),B.sendInvite.call(this,k))}catch(e){j.RQr.logError(e,"SynapseDuelingInviteService - Failed to retrieve roomID"),this.onInviteFailed.dispatch(ke.Unknown)}}))}sendRejectInvite(k){k instanceof Pe.DuelInviteProto?super.sendRejectInvite(k):(this.verboseLog(`Sending rejection to user ${k.userID}.`),this._battleService.rejectInvite(`${k.userID}`).catch(j.RQr.createHandler(`Error sending invite rejection to ${k.userID}`)))}cancelInvite(k){this._legacyInviteSent?super.cancelInvite(k):(this.verboseLog(`Sending cancellation to user ${k}.`),this._battleService.cancelInvite(`${k}`).catch(j.RQr.createHandler(`Error sending invite cancellation to ${k}`)))}processNotification(k){switch(k.type){case Be.m.DuelInvite:{const B=k.data;this._invites.push(B),this._segment.social.sendDuelRequestReceivedEvent({opponent_id:B.userID,is_classmate:K.q.instance.prodigy.friendsListNetworkHandler.isClassmate(B.userID),is_friend:K.q.instance.prodigy.friendsListNetworkHandler.isFriend(B.userID)}),this.onInviteReceived.dispatch(B),this.verboseLog(`Received invite from other user ${JSON.stringify(B)}`);break}case Be.m.DuelInviteRejection:{const{userId:B}=k.data;this.verboseLog(`Received rejection from user ${B}`),this.onInviteRejected.dispatch(parseInt(B));break}case Be.m.DuelInviteCancellation:{const{userId:B}=k.data,U=this._invites.findIndex((k=>`${k.userID}`===B));U>-1?(this.verboseLog(`Received cancellation from user ${B}`),this.onInviteCancelled.dispatch(this._invites.splice(U,1)[0])):j.VyI.log(`SynapseDuelingInviteService - Invite was cancelled by user ${B}, but not found`,j.$bb.Warning);break}}}};(0,G.Cg)([(0,Re.b)("779-a746"),(0,G.Sn)("design:type",Ue.d)],Ye.prototype,"_synapse",void 0),Ye=(0,G.Cg)([(0,tt.injectable)(),(0,G.Sn)("design:paramtypes",[])],Ye);var Qe=U(94393),Xe=U(76007),Ze=U(40295),Je=U(78889),ti=U(93867),ei=U(84399),ii=U(65068);let si=class{constructor(){this.objectiveTypes=[ii.q.RestrictedEncounterBlocking],this.onObjectiveUpdated=new j.HN0}getObjectives(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;if(!ei.R.isFeatureEnabled()||!ti.U.isStepComplete(Ze.B.PuppetMasterDefeated))return[];const{requirements:B}=null!==(k=this._featureRequirements.getProgressForRequirements(59))&&void 0!==k?k:{requirements:[]};return B.every((k=>Object.values(k).every((({progress:k})=>{const[B,U]=k;return B>=U}))))?[]:(0,Je.yd)({requirements:B,objectiveIdPrefix:"hard-mode-req",type:ii.q.HardModeRequirement})}))}};(0,G.Cg)([(0,tt.inject)("db5-fb6e"),(0,G.Sn)("design:type",Object)],si.prototype,"_featureRequirements",void 0),si=(0,G.Cg)([(0,tt.injectable)()],si);var ni=U(47708);var ai,ri=U(97495),oi=U(73797),hi=U(55122);let ci=class{constructor(){this[ai]="campaignReplayChangedData"}[(ai=Se.sE,Se.JN)](k){return(0,G.sH)(this,void 0,void 0,(function*(){j.Aq$.isDefined(k.newProgressStep)&&this.handleNewProgressStep(k.newProgressStep),j.Aq$.isDefined(k.newDifficultyUnlocks)&&this.handleNewDifficultyUnlocks(k.newDifficultyUnlocks),j.Aq$.isDefined(k.newDifficultySelected)&&this.handleNewDifficultySelected(k.newDifficultySelected)}))}handleNewProgressStep(k){switch(k){case ni.q6.HardModeIntroduced:hi.s.validatePlayerAndPetXp(),this.fetchChargedLevelsData();break;case ni.q6.ExpertModeStarted:this.fetchChargedLevelsData()}j.VyI.log(`[CampaignReplaySideEffectEventHandler] New progress step: ${k}`,j.$bb.Verbose)}fetchChargedLevelsData(){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.updateChargedLevelsData().catch(j.RQr.createHandler("CampaignReplaySideEffectEventHandler: Could not update charged levels data"))}handleNewDifficultyUnlocks(k){var B,U;if("object"!=typeof(U=k)||null===U||!Object.entries(U).every((([k,B])=>k in ni.Al&&"boolean"==typeof B)))return void j.VyI.log(`[CampaignReplaySideEffectEventHandler] Invalid difficulty unlocks: ${JSON.stringify(k)}`,j.$bb.Error);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0"),G=null!==(B=F.player.data.difficultyUnlocks)&&void 0!==B?B:ni.Al,$=Object.keys(k).filter((B=>k[B]&&!G[B]));$.includes(ri.i.Hard)&&(j.VyI.log("[CampaignReplaySideEffectEventHandler] Hard mode just unlocked",j.$bb.Verbose),K.q.instance.game.broadcaster.broadcast(oi.oL.HardModeJustUnlocked)),$.includes(ri.i.Expert)&&(j.VyI.log("[CampaignReplaySideEffectEventHandler] Expert mode just unlocked",j.$bb.Verbose),K.q.instance.game.broadcaster.broadcast(oi.oL.ExpertModeJustUnlocked));const V=H().cloneDeep(k);F.player.data.difficultyUnlocks=V,hi.s.validatePlayerAndPetXp(),j.VyI.log(`[CampaignReplaySideEffectEventHandler] New difficulty unlocks applied: ${JSON.stringify(F.player.data.difficultyUnlocks)}`,j.$bb.Verbose)}handleNewDifficultySelected(k){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.currentDifficulty=k,j.VyI.log(`[CampaignReplaySideEffectEventHandler] New difficulty selected: ${k}`,j.$bb.Verbose)}};ci=(0,G.Cg)([(0,tt.injectable)()],ci);var di,li=U(72379),ui=U(47969);let fi=di=class{constructor(k){this._activeCooldowns={},this._timeManager=k}setCooldown(k,B){this._activeCooldowns[k]=B}hasCooldown(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.fetchCooldowns();const U=this._timeManager.getServerTimeMs(),F=this._activeCooldowns[k];return j.Aq$.isDefined(F)&&Uk.indexOf("page")>=0)))}sendSegmentEvents(k,B,U){switch(k){case"Container Discovered":this._segment.container.sendContainerDiscoveredEvent(bi.ZF.Interactable,B,null==U?void 0:U.x,null==U?void 0:U.y,`${bi.ZF.Interactable}--${B}`);break;case"Container Opened":this._segment.container.sendContainerOpenedEvent(bi.ZF.Interactable,B)}}}var vi=U(10730);class gi{constructor(k,B,U=1,F=1,G=3,j=null){this.id=k,this.drops=B,this.minTeamSize=U,this.maxTeamSize=F,this.difficulty=G,this.bench=j}setup(k){k.dungeonZone.collectedItems[k.key].indexOf("monster")<0&&(k.monsterConfig=this)}}var mi=U(28930);let yi=class{constructor(){this.config=null,this.randomDataGenerator=null}initDungeon(k){this.config=k,this.randomDataGenerator=new j.bsf([this.config.getSeed()])}createLayout(){j.VyI.log(`Creating dungeon from seed: ${this.config.getSeed()}`,j.$bb.Verbose),this.layout={seed:this.config.getSeed(),mapConfigs:[],start:null,end:null};for(let G=0;G=U)return null;if(k>=this.config.getGridWidth()||B>=this.config.getGridHeight()||k<0||B<0)return null;if(j.Aq$.isDefined(this.layout.mapConfigs[k][B]))return null;const $={x:k,y:B,tilemap:null,initFsm:null,connections:[],components:[]};this.layout.mapConfigs[k][B]=$;const H=F+1;if(H>=U)return G&&($.components.push(new vi.v(1)),this.layout.end=$),$;let V=this.randomDataGenerator.integerInRange(0,3);0===V&&G&&1===H&&(V=this.randomDataGenerator.integerInRange(1,3));let W=null;const q=V;do{const F={x:k,y:B};switch(V){case mi.O.North:F.y--;break;case mi.O.East:F.x++;break;case mi.O.South:F.y++;break;case mi.O.West:F.x--}if(W=this.addRoomsToPath(F.x,F.y,U,H,G),j.Aq$.isDefined(W))return this.connectRooms(W,$),$;V=(V+1)%4}while(V!==q);return this.layout.mapConfigs[k][B]=null,null}addMonsters(k){const B=this.getAllRooms(!1);for(let U=0;UU===B[k]))}}addExtraPaths(k){const B=this.getAllRooms(!1);this.randomDataGenerator.shuffle(B);let U=0;for(;B.length>0&&U$.findIndex(F,k)>=0))}U!==k&&j.VyI.log(`Could create all extra paths. Target: ${k}, Created: ${U}`,j.$bb.Warning)}addGoldenPages(k){const B=this.getAllRooms(!1);this.randomDataGenerator.shuffle(B);const U=$.remove(B,(k=>$.findIndex(k.components,(k=>k instanceof gi))>=0));let F=0;for(;F.5&&(F=2,U++),B[U].components.push(new pi(19,F))}}assignRoomTilemaps(){const k=this.getAllRooms();let B=[...this.config.getNormalRooms()],U=[...this.config.getMonsterRooms()];this.randomDataGenerator.shuffle(B),this.randomDataGenerator.shuffle(U);for(let F=0;Fk instanceof vi.v&&1===k.id))>=0)G.tilemap=this.config.getEndRoom().getTileMap(),G.initFsm=this.config.getEndRoom().getFSM();else{let k=null,F=B;$.findIndex(G.components,(k=>k instanceof pi&&18===k.id))>=0&&(F=U),k=F.shift(),G.tilemap=k.getTileMap(),j.Aq$.isDefined(k.getFSM())&&(G.initFsm=k.getFSM()),0===B.length&&(B=[...this.config.getNormalRooms()],this.randomDataGenerator.shuffle(B)),0===U.length&&(U=[...this.config.getMonsterRooms()],this.randomDataGenerator.shuffle(U))}}}getAllRooms(k=!0){let B=[];for(let U=0;Uj.Aq$.isDefined(k))));return k||(B=$.filter(B,(k=>$.findIndex(k.components,(k=>k instanceof vi.v))<0))),B}findRandomEmptyAdjacentRoom(k){let B=this.randomDataGenerator.integerInRange(0,3);const U=B;do{const U={x:k.x,y:k.y};switch(B){case 0:U.y--;break;case 1:U.x++;break;case 2:U.y++;break;case 3:U.x--}if(U.x=0&&U.y>=0&&!j.Aq$.isDefined(this.layout.mapConfigs[U.x][U.y]))return U;B=(B+1)%4}while(B!==U);return null}connectRooms(k,B){let U=0,F=0;k.xB.x?(U=3,F=1):k.y>B.y?(U=0,F=2):k.y{this.openExitMenu(k)}));if(k.dungeonZone.collectedItems[k.key].indexOf("floorIntro")<0&&!this._towerZone.isTowerComplete()){k.dungeonZone.addCollected(k.key,"floorIntro");const B=new Ti.rD(K.q.instance.game),U=this._towerZone.getFloorConfig(this._towerZone.CurrentFloor).dialogueIDs,F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.previousZone===Oi.EARTH_TOWER_CR?()=>{Si.c.instance.isPlayerQualified()&&K.q.instance.game.time.events.addTimer(Vt.s.SECONDS_TO_MILLISECONDS_MULTIPLIER*Si.c.instance.getFtueData().delayInSeconds,(()=>{K.q.instance.prodigy.open.prefabMenu(Ei.l.PetXPBoostFTUEPopup).createContainer=!1}),null,null)}:null;B.addEvents(U.map((k=>({dialogueData:B.dataProvider.get(k),blockInput:!0})))),B.start(!1,F)}}}openExitMenu(k){if(this._towerZone.isTowerComplete()&&this._towerZone.isWardenSaved)if(this._towerZone.goalCollected{const k=K.q.instance.prodigy.world.getCurrentZone();K.q.instance.prodigy.world.getZone(k).exitDungeon()};K.q.instance.prodigy.open.bossRewards(U,Ai.N.TowerRun,void 0,void 0,B,F)}else this._towerZone.isTowerComplete()?this.goToCommonRoom(k):this._towerZone.CurrentFloor===this._towerZone.TotalFloors?this.showTowerBattleWarningPopup():this.showGotoNextFloorPopup()}showGotoNextFloorPopup(){const k=K.q.instance.prodigy.open.prefabMenu(Ei.l.AcademyTowerGotoNextFloorPopup);k.createContainer=!1,k.onPrefabLoaded.addOnce((k=>{k.transform&&k.findComponentInChildren(Ci.l).setCallbacks(this.showTowerBattleWarningPopup.bind(this),this.goToNextFloor.bind(this),this._elevator.exit.bind(this._elevator))}))}showTowerBattleWarningPopup(){const k=K.q.instance.prodigy.open.prefabMenu(Ei.l.AcademyTowerExitPopup);k.createContainer=!1;const B=this._elevator.exit.bind(this._elevator),U=this.goToCommonRoom.bind(this);k.onPrefabLoaded.addOnce((k=>{k.transform&&k.findComponentInChildren(Ci.l).setCallbacks(U,void 0,B)}))}goToNextFloor(k){this.onFloorExit(k),k.dungeonZone.enterDungeon()}goToCommonRoom(k){this.onFloorExit(k),this._towerZone.sendSegmentEvent("Tower Run Completed"),K.q.instance.prodigy.world.it(this._towerZone.commonRoom)}onFloorExit(k){this._towerZone.monstersDefeated===this._towerZone.goalTotal&&(this._towerZone.setFloor(this._towerZone.CurrentFloor,!0),this._towerZone.sendSegmentEvent("Tower Floor Completed"))}}Oi.EARTH_TOWER_CR="earthtower-CR";let Ii=class extends yi{createLayout(){j.VyI.log(`Creating dungeon from seed: ${this.config.getSeed()}`,j.$bb.Verbose),this.layout={seed:this.config.getSeed(),mapConfigs:[],start:null,end:null};for(let G=0;Gk instanceof vi.v&&0===k.id))>=0)F.tilemap=this.config.getEndRoom().getTileMap(),F.initFsm=this.config.getEndRoom().getFSM();else{let k=null;k=B.shift(),F.tilemap=k.getTileMap(),j.Aq$.isDefined(k.getFSM())&&(F.initFsm=k.getFSM()),0===B.length&&(B=[...this.config.getNormalRooms()],this.randomDataGenerator.shuffle(B))}}}addCriticalPath(k){const B=Math.floor(this.config.getGridWidth()/2),U=Math.floor(this.config.getGridHeight()/2);this.layout.start=this.addRoomsToPath(B,U,k,0,!0),j.Aq$.isDefined(this.layout.start)?this.layout.start.components.push(new Oi(0)):j.VyI.log("Could not add Critical Path",j.$bb.Verbose)}addMonsters(k){let B=this.getAllRooms(!1);$.remove(B,(k=>k===this.layout.end)),B=[this.layout.end].concat(B);const U=$.map(this.config.getMonsterIDs(),(k=>({petID:k,weight:1})));for(let F=0;F1?[parseInt(B[0]),parseInt(B[1])]:[parseInt(k),0]}}var ms,ys=U(56567);let _s=ms=class{getQuestData(){return(0,G.sH)(this,arguments,void 0,(function*(k={}){if(!1===k.active)return{activeQuests:[],inactiveQuests:[]};return{activeQuests:ms.ZONE_QUESTS.filter((B=>!k.questIDs||k.questIDs.includes(B.id))).filter((B=>!k.tags||k.tags.every((k=>{var U;return null===(U=B.tags)||void 0===U?void 0:U.includes(k)})))),inactiveQuests:[]}}))}getQuestProgress(){return(0,G.sH)(this,arguments,void 0,(function*(k={}){const B=yield this.getQuestData(k);return{activeQuests:B.activeQuests.map((k=>this.generateQuestProgressFromLegacyQuestState(k))),inactiveQuests:B.inactiveQuests.map((k=>this.generateQuestProgressFromLegacyQuestState(k)))}}))}generateQuestProgressFromLegacyQuestState(k){var B;const U=[],F=K.q.instance.prodigy.world.getZone(k.metadata.zoneId).getQuestState();if(null===(B=k.tasks)||void 0===B||B.forEach((k=>{(0,rs.v)("string"==typeof k.id,`Task ID is expected to be a string (found "${k.id}")`);const[B,G]=k.id.split("-").map((k=>parseInt(k))),j=F&&(F.ID>B||F.ID===B&&F.seq>G);U.push({id:k.id,status:j?ns.t.COMPLETE:ns.t.IN_PROGRESS,data:j?void 0:{progress:0}})})),F){const k=U.find((k=>k.id===`${F.ID}-${F.seq}`)),B=U.find((k=>k.status===ns.t.IN_PROGRESS));if(!k&&B){const[k,U]=B.id.toString().split("-").map((k=>parseInt(k)));F.ID=k,F.seq=U}}return{id:k.id,status:U.some((k=>k.status===ns.t.IN_PROGRESS))?ns.t.IN_PROGRESS:ns.t.COMPLETE,tasks:U}}setQuestProgressTimestamp(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.getQuestProgress({questIDs:[k.questId]})}))}sendQuestEvent(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;const U=new ys.f,F=yield this.getQuestData(k),G=yield this.getQuestProgress(k);for(const $ of F.activeQuests){const F=G.activeQuests.find((k=>k.id===$.id));if(!F)continue;const H=(yield ss.f.getTasksInProgress($,F,U)).find((B=>B.shouldSendEvent(k.eventType,k.eventData)));if(H){const U=K.q.instance.prodigy.world.getZone($.metadata.zoneId),F=null!==(B=U.getQuestState())&&void 0!==B?B:{};if(!j.Aq$.isDefined(null==F?void 0:F.ID)){[F.ID,F.seq]=gs.splitTaskId(H.taskID),F.state={},F.req=this.generateQuestRequirementsForTask(H.taskDefinition,$),U.setState("quest",F);K.q.instance.prodigy.gameContainer.get("306-5359").state.updated=!0}yield this.advanceTaskProgress(F,$,H,k.eventData)}}return this.getQuestProgress({questIDs:k.questIDs,tags:k.tags})}))}advanceTaskProgress(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){var G,$,H,V,W;const q=null!==($=null!==(G=F.progress)&&void 0!==G?G:F.progressToAdd)&&void 0!==$?$:1,z=null!==(H=U.taskDefinition.completionRequirements.data.target)&&void 0!==H?H:1,Y=K.q.instance.prodigy.gameContainer.get("306-5359");if(q>=z)yield this.advanceQuestState(k,B,U);else switch(U.type){case as.T.DEFEAT_ENCOUNTER:case as.T.DEFEAT_QUEST_ENCOUNTER:case as.T.RECEIVE_ITEM:if(j.Aq$.isDefined(null===(V=k.req)||void 0===V?void 0:V.N)||(k.req=this.generateQuestRequirementsForTask(U.taskDefinition,B),(0,rs.v)(j.Aq$.isDefined(null===(W=k.req)||void 0===W?void 0:W.N),`Quest requirements incorrectly defined for defeat enemy task ${U.taskID}`)),k.req.N-=q,k.req.N<=0)return void(yield this.advanceQuestState(k,B,U));Y.state.updated=!0;break;case as.T.COLLECT_ITEM:if((0,rs.v)(j.Aq$.isDefined(F.progress),"eventData.progress cannot be empty for the COLLECT_ITEM task; please send the total number of collected items as progress when this event is dispatched"),F.progress>=z)return void(yield this.advanceQuestState(k,B,U));break;default:j.VyI.log(`Task progress could not be made for quest ${U.questID} task ${U.taskID}`,j.$bb.Error)}}))}advanceQuestState(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){var F,G,j,$;const[H,V]=gs.splitTaskId(U.taskID),W=null!==(F=k.ID)&&void 0!==F?F:H,q=null!==(G=k.seq)&&void 0!==G?G:V,z=null===(j=B.tasks)||void 0===j?void 0:j.find((k=>{var B;return null===(B=k.prerequisites)||void 0===B?void 0:B.includes(`${W}-${q}`)})),[Y,Q]=gs.splitTaskId(null!==($=null==z?void 0:z.id)&&void 0!==$?$:`${W+1}-0`),X=K.q.instance.prodigy.gameContainer.get("306-5359");k.ID=Y,k.seq=Q,W!==Y&&(k.state={}),z&&(k.req=this.generateQuestRequirementsForTask(z,B)),X.state.updated=!0,null==X||X.forceSaveCharacter(),z&&(yield this.handleAutoCompletedQuests(z))}))}handleAutoCompletedQuests(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;if((null===(B=null==k?void 0:k.completionRequirements)||void 0===B?void 0:B.type)===as.T.NONE){const k={eventType:as.T.NONE,eventData:{}};yield this.sendQuestEvent(k)}}))}generateQuestRequirementsForTask(k,B){var U,F,G;if(k.metadata.questRequirements)return k.metadata.questRequirements;switch(k.completionRequirements.type){case as.T.DEFEAT_ENCOUNTER:case as.T.DEFEAT_QUEST_ENCOUNTER:return j.Aq$.isDefined(k.completionRequirements.data.id)?{type:"pet",N:k.completionRequirements.data.target,ID:+k.completionRequirements.data.id}:{type:"clear",N:k.completionRequirements.data.target};case as.T.COLLECT_ITEM:case as.T.RECEIVE_ITEM:return{type:"item",N:k.completionRequirements.data.target,ID:+(null!==(U=k.completionRequirements.data.id)&&void 0!==U?U:1)};default:const[$,H]=gs.splitTaskId(k.id),V=(null!==(G=null===(F=B.tasks)||void 0===F?void 0:F.filter((k=>gs.splitTaskId(k.id)[0]===$)))&&void 0!==G?G:[]).map((k=>gs.splitTaskId(k.id)[1]));return{type:"seq",N:Math.max(...V)+1}}}};_s.ZONE_QUESTS=[ds.E,cs.C,bs.a,fs.S,hs.K,os.G,us.J,ls.r,vs.x,ps.x],_s=ms=(0,G.Cg)([(0,tt.injectable)()],_s);var Es=U(18587),ws=U(60031),Ts=U(53037),Ss=U(3606),As=U(3001),Cs=U(76846),Os=U(98938),Is=U(79368);class Ds extends Is.k{constructor(){super(...arguments),this._tags=[Os.t.Ultimates]}}var Rs,Ps=U(45918),Ms=U(80434),Ns=U(63536),xs=U(4764);let Ls=Rs=class extends oe{constructor(){super(...arguments),this.previouslyReportedUserIDs=new Set}reportAbuse(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(this.previouslyReportedUserIDs.has(null==k?void 0:k.reportedUserID))return Promise.reject(new Error("User has already been reported"));this.previouslyReportedUserIDs.add(k.reportedUserID);const B=this.createRequest(j.iXQ.Post,Rs.CORTEX_REPORT_ABUSE_ENDPOINT,k,Rs.REQUEST_TIMEOUT_DURATION_MS);return this._httpClient.sendRequest(B)}))}};Ls.REQUEST_TIMEOUT_DURATION_MS=1e4,Ls.CORTEX_REPORT_ABUSE_ENDPOINT="v1/reporting.reportAbuse",Ls=Rs=(0,G.Cg)([(0,tt.injectable)()],Ls);var ks=U(5708),Bs=U(14117),Us=U(37050),Fs=U(77823),Gs=U(71790),js=U(67238);class $s extends js.D{add(k){return(0,G.sH)(this,void 0,void 0,(function*(){const{uniqueId:B}=yield this.call(qt.D.Kennel.UnsecureAdd,{data:k},!0);return B}))}update(k){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.call(qt.D.Kennel.Update,{update:k},!0)}))}evolve(k){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.call(qt.D.Kennel.Evolve,{uniqueId:k},!0)}))}memberUpgradeEvolve(k){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.call(qt.D.Kennel.MemberUpgradeEvolve,{uniqueId:k},!0)}))}remove(k){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.call(qt.D.Kennel.Remove,{uniqueId:k},!0)}))}claim(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.call(qt.D.Kennel.Claim,{token:k,petId:B},!0)}))}}var Hs=U(25834),Vs=U(80105),Ws=U(91620),qs=U(3519),Ks=U(2980),zs=U(77510),Ys=U(2775),Qs=U(11288),Xs=U(94995),Zs=U(3374),Js=U(84234),tn=U(33587),en=U(46808);let sn=class{constructor(){this._prefabGuidMap=new Map}getPrefab(k){var B;const U=en.T[k];if(this._prefabGuidMap.has(U))return this._prefabGuidMap.get(U).prefab;const F=le.t.getItem("prefab",k);if(!(null===(B=null==F?void 0:F.data)||void 0===B?void 0:B.prefab))throw new Error(`Missing item data for prefab ${k}`);return F.data.prefab}getPrefabItem(k){return this._prefabGuidMap.get(k)}getPrefabFromGUID(k){return this._prefabGuidMap.has(k)?this._prefabGuidMap.get(k).prefab:(j.VyI.log(`Prefab with guid ${k} not found in the PrefabDataProvider`,j.$bb.Warning),null)}rebuildPrefabGuidMap(){var k;(null===(k=le.t.data)||void 0===k?void 0:k.prefab)&&le.t.data.prefab.forEach((k=>{var B;k.guid&&(null===(B=k.data)||void 0===B?void 0:B.prefab)&&this._prefabGuidMap.set(k.guid,k.data)}))}};sn=(0,G.Cg)([(0,tt.injectable)()],sn);var nn=U(37251),an=U(51477),rn=U(44094),on=U(20952),hn=U(73678),cn=U(90661),dn=U(19464),ln=U(90633),un=U(30405),fn=U(5898),bn=U(3862),pn=U(17425),vn=U(87820),gn=U(65240),mn=U(23283),yn=U(64353),_n=U(95057),En=U(21097),wn=U(76945),Tn=U(30226),Sn=U(47255),An=U(46318);class Cn extends An.Q{constructor(k,B,U,F,G){super(k,B,U,F,G,0),this.prizeItems=[],this.poofSpine=null,this.prizeItems=An.Q.getWheelItems(k,G),this.assetID=G,K.q.instance.prodigy.notifications.clearNotifications(!0),this.game.input.enabled=!1,pn.K.cacheAsset(this.game,J.Q.Spine_ui_roulette_json,pn.K.zoneAssetsCached),K.q.instance.prodigy.load.assets([J.Q.Spine_ui_roulette_json],(()=>{this.startSpin()}))}start(){}endSpin(){this.numSpins++,this.itemDrop=le.t.getItem(this.prizeItems[this.selectedIndex].item.type,this.prizeItems[this.selectedIndex].item.ID),this.popPrize(this.itemDrop,this.selectedIndex)}showDialogue(k){this.game.input.enabled=!0,this.dialogueController=K.q.instance.prodigy.dialogue.create();for(let B=0;B{K.q.instance.prodigy.open.membershipInfo((()=>{this.close()}),{conversionFunnelName:Sn.o.FunnelSecondWheelSpin})}});const B=yn.P.shouldUseUnifiedConversionFlow(Sn.o.FunnelSecondWheelSpin)?_n.R.UnifiedConversionFlow:Tn.J.showYouTubeMembershipAd(this.game,!0)?_n.R.Video:_n.R.Static,F=k.get("c47-20b6");F.purchase.sendFunnelStart(Object.assign(Object.assign({},this.getSegmentPurchaseFunnelTriggerTypeAndCategory()),{contentId:`prizeWheel-${this.assetID}`,adType:B,adVersion:yn.P.getAdVersion(Sn.o.FunnelSecondWheelSpin)})),F.economy.sendPrizeWheelSpinFailedEvent(mn.U.PrizeWheel,En.WE.MemberLocked)}this.showDialogue(U)}else this.close()}startSpin(){super.startSpin(),this.game.input.enabled=!1,Tn.J.isDefined(this.dialogueController)&&this.dialogueController.close(),K.q.instance.prodigy.gameContainer.get("c47-20b6").economy.sendPrizeWheelSpunEvent(mn.U.PrizeWheel)}tryAgain(){const k={yes:this.trySpin.bind(this),no:this.close.bind(this),text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(this.data.spinAgainDialogue),anim:4};this.showDialogue([k])}close(){K.q.instance.prodigy.notifications.startTimer(),this.game.input.enabled=!0;const k=K.q.instance.prodigy.world.getCurrentZone();K.q.instance.prodigy.world.getZone(k).exitDungeon(this.itemDrop),super.close()}getSegmentPurchaseFunnelTriggerTypeAndCategory(){return{type:"Second-Reward-Wheel-Spin",category:"Reward"}}popPrize(k,B){let U=k;if(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.isItemOwned({type:k.type,ID:k.ID})){const k={type:"currency",ID:19,N:this.prizeItems[B].item.duplicateValue};U=k}K.q.instance.prodigy.create.sprite(this.wheel.x+10,this.wheel.y+20,K.q.instance.prodigy.icon.iconKey(k),null,{x:.5,y:.5},(k=>{this.add(k),k.scale.x=2,k.scale.y=2,this.poofSpine=this.game.add.spine(this.wheel.x,this.wheel.y,J.Q.Spine_ui_roulette_json),this.poofSpine.setToSetupPose(),this.poofSpine.setAnimationByName(0,"animation",!1).time=4.4,this.add(this.poofSpine);const B=K.q.instance.prodigy.event.create();B.function((()=>{this.game.add.tween(k,this).to({y:j.cj9.between(-100,-50)},1e3,j.GS3.Quadratic.Out).to({y:900},1e3,j.GS3.Quadratic.In).delay(400).start(),this.game.add.tween(k,this).to({x:j.cj9.between(500,780),angle:Math.floor(wn.o.integerInRange(90,360))},2e3,j.GS3.Linear.None).delay(400).start()})),B.delay(2200),B.function((()=>{if("currency"===U.type){k.alpha=0;for(let B=0;B{this.game.input.enabled=!0,K.q.instance.prodigy.open.gotItem([U],(()=>{this.numSpins<2?this.tryAgain():this.close()}),null,null,null,null,{source_type:gn.C.PrizeWheel})})),B.start()}))}}class On extends vn.b{enterDungeon(k){j.Aq$.isDefined(k)?this.generatorConfig.setSeed(k):null===this.generatorConfig.getSeed()&&this.generatorConfig.setSeed(Date.now()),this.resetCooldown(),this.dungeon=K.q.instance.prodigy.gameContainer.get(this.dungeonGenerator),this.dungeon.initDungeon(this.generatorConfig),this.dungeonLayout=this.dungeon.createLayout(),this.collectedItems=null;const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=B.backpack.hasItem("currency",18);B.backpack.consume("currency",18,U),this.teleportInDungeon(this.dungeonLayout.start,640,280)}teleportInDungeon(k,B=640,U=280){j.Aq$.isDefined(this.collectedItems)||(this.collectedItems={}),this.mapConfig=k,this.teleport(this.mapConfig.tilemap,B,U,null,{fadeIn:!0,fadeOut:!0,time:200})}handleLeaving(k,B){this.resetCooldown(),this.consumeTargetCollectible(),super.handleLeaving(k,B)}exitDungeon(k=null){K.q.instance.prodigy.world.it(this.exitMap,855,480)}resetCooldown(){bn.B.setLastDungeonRun(this.game,this.ID,Date.now());K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.updated=!0}getBattleMods(){return{difficulty:this.generatorConfig.getBattleDifficulty(),drops:[{ID:19,type:"currency",N:5}]}}addCollected(k,B){j.Aq$.isDefined(this.collectedItems[k])||(this.collectedItems[k]=[]),this.collectedItems[k].push(B)}defeatMonster(k,B,U){super.defeatMonster(k,B,U),this.map.addCollected("monster"),this.ID===hn.A_.ARCHIVES&&K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.achievements.increment(fn.f.ArchiveEnemiesDefeated,1)}goToEnd(){const k=this.dungeon.getAllRooms();for(let B=0;B{new Cn(this.game,k.uiLayer,G,k,B)}));const j=Date.now();bn.B.setDungeonRunCompleteTime(this.game,this.ID,j)}}var In=U(4631),Dn=U(85126),Rn=U(84317),Pn=U(85182);class Mn extends Pn.T{constructor(k,B,U){super(k,B,1,"",{type:"seq",N:1},[`${U}-CR`],[],[],[],[],!1),this._towerName=U}setup(k,B,U){return super.setup(k,B,U),U.getTag()!==Vt.s.TOWER_COMMON_ROOM_SHORTFORM||this.zone.isQuestComplete(1)||K.q.instance.prodigy.world.playScene(`${this._towerName}-intro`),{quit:!0}}}var Nn=U(71802);class xn extends Nn.D{constructor(k,B,U,F,G){super(k,`floor${F}`,"",640,300,[...B,Z.c.Sfx_academy_portal_open,J.Q.Spine_archive_door_glow_json],U,G),this.counterUI=48,this.doorways=[{area:{x:640,y:220},exit:{x:640,y:560},walkTarget:{x:640,y:260}},{area:{x:1215,y:400},exit:{x:140,y:430},walkTarget:{x:1155,y:430}},{area:{x:640,y:640},exit:{x:640,y:300},walkTarget:{x:640,y:595}},{area:{x:60,y:400},exit:{x:1135,y:430},walkTarget:{x:120,y:430}}],this.floor=F}setup(k,B,U){super.setup(k,B,U);const F=this.zone;j.Aq$.isDefined(F.postBattleNootDialogue)&&F.postBattleNootDialogue.start(!0,(()=>{F.postBattleNootDialogue=null}),!0),this.dungeonZone.goalCollected===this.dungeonZone.goalTotal&&this.guideToExit(0)}start(k,B){super.start(k,B);const U=this.zone.Element;K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_ACADEMY,`BREADCRUMB_${U.toUpperCase()}_TOWER`),K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_ACADEMY,ln.B.BREADCRUMB_ACADEMY_SECOND_FLOOR)}addDoorGlow(k,B){}getName(){const k=this.zone.Element.toUpperCase();return this.zone.isTowerComplete()?K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(`MAP_${k}_TOWER`):K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(`MAP_${k}_TOWER_FLOOR`,this.floor)}}var Ln=U(25531),kn=U(77078),Bn=U(35569),Un=U(83726);class Fn extends Un.T{constructor(k,B,U){super(k,Vt.s.TOWER_COMMON_ROOM_SHORTFORM,`MAP_${U}_COMMON_ROOM`,1100,525,[Fn.ACADEMY_CR_1,k.wardenRoom],B),this.elevator=null,this.elevatorGuideHand=null,this._towerZone=null,this._towerZone=k}setup(k,B,U){super.setup(k,B,U),this.elevator=this.screen.contentGameObject.findChildByName("elevator"),this.elevator.addComponent(wi.H).init(B,wi._.Up,(()=>{this.enterTowerFloor()}));const F=q._.General_core_json,G="area-pointer",$=this._towerZone.Element;K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(Ei.l.AcademyTowerExitSign,B.aboveGameObject).catch((k=>{j.VyI.log(`Could not load tower exit sign: ${k.message}`,j.$bb.Warning)}));const H=K.q.instance.prodigy.gameContainer.get("PrefabService").getPrefabFromGuid(Ei.l.AcademyCommonRoomSignage);if(K.q.instance.prodigy.load.assets([Ei.l.AcademyCommonRoomSignage],(()=>{K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromJSONWithDependencies(H,B.aboveGameObject,void 0,void 0,Ei.l.AcademyCommonRoomSignage).catch((k=>{j.VyI.log(`Could not load Academy Room Signage: ${k.message}`,j.$bb.Warning)}))})),(!K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_ACADEMY,`BREADCRUMB_${$.toUpperCase()}_TOWER`)||this._towerZone.isBossDefeated&&this._towerZone.isWardenSaved&&!K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_ACADEMY_TOWERS,this._towerZone.elevatorBreadcrumb))&&(this.elevatorGuideHand=this.screen.foreground.addChild(K.q.instance.prodigy.create.sprite(this.elevator.transform.localPosition.x+20,this.elevator.transform.localPosition.y+80,F,G)),this.elevatorGuideHand.anchor.set(.5,.5),this.game.add.tween(this.elevatorGuideHand,this).to({y:this.elevatorGuideHand.y+25},400,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0)),K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_ACADEMY,ln.B.BREADCRUMB_ACADEMY_SECOND_FLOOR)||this.segment.academyTowers.sendFunnelEvent({funnelName:Ln.w.format("{0}_tower",this._towerZone.Element),funnelType:"feature",step:Bn.D.TowerCommonRoom}),this._towerZone.isTowerComplete()&&!this._towerZone.isWardenSaved){const k=this.elevator.findComponentInChildren(kn.p);k.onClicked.removeAll(),k.onClicked.add((()=>{const k=new Ti.rD(K.q.instance.game);k.addEvents([{dialogueData:k.dataProvider.get(this._towerZone.NootSaveWardenID),blockInput:!0}]),k.start(!1)}));const B=this.screen.foreground.addChild(K.q.instance.prodigy.create.sprite(400,240,F,G));B.anchor.set(.5,.5),this.game.add.tween(B,this).to({y:B.y+25},400,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0)}const V=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(V.backpack.hasItem("item",this._towerZone.WardenRoomKeyID)>0)!Si.c.instance.isPlayerQualified()||this._towerZone.isBossDefeated||this._towerZone.isWardenSaved||V.data.previousZone!==V.data.zone&&V.data.previousZone!==Fn.ACADEMY_CR_1||K.q.instance.game.time.events.addTimer(Vt.s.SECONDS_TO_MILLISECONDS_MULTIPLIER*Si.c.instance.getFtueData().delayInSeconds,(()=>{K.q.instance.prodigy.open.prefabMenu(Ei.l.PetXPBoostFTUEPopup).createContainer=!1}),null,null),this.addAreaEvent(k,B,{x:400,y:200,w:100,h:150,rect:!0},this._towerZone.wardenRoom,640,590,(()=>{K.q.instance.prodigy.world.it(this._towerZone.wardenRoom)}));else{const k=K.q.instance.prodigy.create.sprite(400,200,F,"empty",{x:.5,y:.5},null,120,160);k.inputEnabled=!0,k.alpha=0,k.events.onInputUp.add((()=>{this.screen.user.setValidPath(this.screen.path,400,260,(()=>(K.q.instance.prodigy.open.message(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TOWER_WARDEN_LOCKED")),{})))})),this.screen.content.addChild(k)}this.addAreaEvent(k,B,{x:1230,y:525,w:180,h:100,rect:!0},Fn.ACADEMY_CR_1,0,0)}enterTowerFloor(){if(this._towerZone.isBossDefeated&&this._towerZone.isWardenSaved){const k=K.q.instance.prodigy.event.create();k.enableInput(!0),k.function((()=>{K.q.instance.prodigy.open.towerEntranceMenu(this._towerZone.ID,this._towerZone.ItemTableID,(()=>{this.elevator.findComponent(wi.H).exit()}))})),k.start()}else{this._towerZone.sendSegmentEvent("Tower Run Started");K.q.instance.prodigy.world.zones[this._towerZone.ID].enterDungeon()}}cleanup(){this.elevator&&(this.elevator.destroy(),this.elevator=null),this.elevatorGuideHand&&(this.elevatorGuideHand.destroy(),this.elevatorGuideHand=null),super.cleanup()}}Fn.ACADEMY_CR_1="academy-CR1";class Gn extends Un.T{constructor(k,B,U){super(k,Vt.s.TOWER_WARDEN_ROOM_SHORTFORM,`MAP_${U}_WARDEN_ROOM`,640,590,[k.commonRoom],B),this._towerZone=k}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:640,y:640,w:180,h:80,rect:!0},this._towerZone.commonRoom,400,350);const F=B.contentGameObject.findChildByName(this._towerZone.Boss.tmxName),G=B.contentGameObject.findChildByName(this._towerZone.Warden.name),j=B.aboveGameObject.findChildByName("bubble");this._towerZone.isBossDefeated?(F.active=!1,j.active=!1,G.active=!1,this._towerZone.isWardenSaved||this._towerZone.playScene("freeWarden")):this._towerZone.playScene("battleShadowBoss")}}var jn=U(75781),$n=U(79340);class Hn extends $n.Z{constructor(k,B){super(k,Vt.s.TOWER_WARDEN_ROOM_SHORTFORM,B),this._towerZone=k}setup(k,B,U){super.setup(k,B,U),B.user.x=640,B.user.y=590}start(k,B){super.start(k,B,23);const U=()=>(0,G.sH)(this,void 0,void 0,(function*(){const U=B.addNPC(720,590,q._.Npc_sprite_noot_json);U.float(!0);const F=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),G=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);F.execute(G.getStateMachine(this._towerZone.FsmIDs.bossBattle),{game:k,screen:B,scene:this,player:B.user,noot:U,map:this},null)})),F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;ti.U.progressData.step===Ze.B.NotStarted&&F.hasFoundAllKeystones()?jn.E.runAllKeystonesSequenceOnMapSetup(U):U().catch(j.RQr.createHandler("AcademyTowerBossBattle start error invoking finishStarting()"))}startBattle(){K.q.instance.prodigy.battle.start({drops:[{type:"gold",N:100}],boss:{ID:this._towerZone.Boss.ID,element:this._towerZone.Element,name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(this._towerZone.Boss.localizedTextRef),attacks:this._towerZone.Boss.attacks,shadowBoss:!0,spineKey:this._towerZone.Boss.spineKey},screen:this._towerZone.Boss.battleBG,difficulty:this._towerZone.Boss.difficulty},null,(()=>{K.q.instance.prodigy.world.getZone(this._towerZone.ID).setBossDefeated(!0),K.q.instance.prodigy.gameContainer.get("c47-20b6").academyTowers.sendFunnelEvent({funnelName:Ln.w.format("{0}_tower",this._towerZone.Element),funnelType:"feature",step:Bn.D.TowerComplete}),K.q.instance.prodigy.world.it(this._towerZone.wardenRoom)}),null,this._towerZone.commonRoom)}}class Vn extends $n.Z{constructor(k,B,U){super(k,Vt.s.TOWER_COMMON_ROOM_SHORTFORM,B),this._fsmID=U}setup(k,B,U){super.setup(k,B,U)}start(k,B){super.start(k,B,11);const U=B.addNPC(950,525,q._.Npc_sprite_noot_json);U.float(!0),U.walkSpeed=2,U.visible=!0,U.flip(),B.user.x=1100,B.user.y=525,B.user.flip();const F=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),G=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);F.execute(G.getStateMachine(this._fsmID),{scene:this,game:k,screen:B,zone:this.zone,player:B.user,noot:U,path:B.path,pathfinder:B.path},null)}}var Wn=U(28402),qn=U(48975),Kn=U(87337),zn=U(59968);class Yn extends zn.R{constructor(k,B,U,F,G){const j=K.q.instance.game,$=new qn.s(j);$.init({npc_name:null==G?void 0:G.localizedTextRef,npc_type:Kn.ac.QuestGiver,x_coord:U,y_coord:F,npc_animation_id:"idle"}),super(j,B,$,null,U,F),this._warden=G,this.setup()}setup(){const k=K.q.instance.prodigy.create.element(this.sprites,0,0);this._wardenSpine=this.game.add.spine(0,0,this._warden.spine),this._wardenSpine.setAnimationByName(0,"idle",!0),k.add(this._wardenSpine),this.setupCollisionBlock(k),this.showName(),this.nameText.GameObject.legacyTransform.y=this._warden.nameTextPos.y,this.nameText.GameObject.legacyTransform.x=this._warden.nameTextPos.x,this._warden.flipSpine&&(this._wardenSpine.scale.x=-1,this.flip())}setupCollisionBlock(k){this._collisionBlock=k.add(K.q.instance.prodigy.create.emptySprite(-.5*k.width+0,-k.height,k.width,k.height)),this._collisionBlock.alpha=0,this._collisionBlock.inputEnabled=!0,this._collisionBlock.events.onInputDown.add(this.onClicked.bind(this))}onClicked(){const k=new Ti.rD(this.game);k.addEvents(this._warden.freedDialogueIDs.map((B=>({dialogueData:k.dataProvider.get(B),blockInput:!0})))),k.start(),this.sendNpcClickedEvent()}}class Qn extends $n.Z{constructor(k,B){super(k,Vt.s.TOWER_WARDEN_ROOM_SHORTFORM,B),this._towerZone=k}setup(k,B,U){super.setup(k,B,U),B.contentGameObject.findChildByName(this._towerZone.Boss.tmxName).active=!1}enterScene(k,B,U){super.enterScene(k,B,U)}start(k,B){var U;super.start(k,B,this._towerZone.bgmID),B.user.x=640,B.user.y=450,B.user.flip();const F=B.addNPC(720,450,q._.Npc_sprite_noot_json);F.float(!0),F.flip();const G=B.contentGameObject.findChildByName(this._towerZone.Warden.name);G.active=!1;const $=new Yn(B,B.content,G.transform.localPosition.x+this._towerZone.Warden.offset.x,G.transform.localPosition.y+this._towerZone.Warden.offset.y,this._towerZone.Warden);$.flip();const H=null!==(U=this._towerZone.Warden.bubbleAnimName)&&void 0!==U?U:"idle-tandem1",V=B.aboveGameObject.findChildByName("bubble");this._bubble=V.findComponentInChildren(Wn.v),this._bubble.getSpine().setAnimationByName(0,H,!0);const W=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),z=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);W.execute(z.getStateMachine(this._towerZone.FsmIDs.freeWarden),{game:k,screen:B,scene:this,player:B.user,warden:$,noot:F,map:this,bubble:this._bubble,path:B.path,pathfinder:B.path},null)}popBubble(){var k;const B=null!==(k=this._towerZone.Warden.bubblePopName)&&void 0!==k?k:"pop";this._bubble.getSpine().setAnimationByName(0,B)}cleanup(){this._bubble&&(this._bubble.destroy(),this._bubble=null),super.cleanup()}}class Xn extends On{get WardenRoomKeyID(){return this._towerData.wardenRoomKeyID}get TowerEventName(){return this._towerData.towerEventName}get Warden(){return this._towerData.warden}get Element(){return this._towerData.element}get KeystoneZone(){return this._towerData.keystone.zone}get Boss(){return this._towerData.boss}get FsmIDs(){return this._towerData.fsmIDs}get TotalFloors(){return this._towerData.floorConfigs.length}get ItemTableID(){return this._towerData.itemTableID}get NootSaveWardenID(){return this._towerData.saveWardenDialogueID}constructor(k,B){super(k),this.elevatorBreadcrumb=ln.B.BREADCRUMB_COMPLETED_ELEVATOR,this._towerData=null,this._academyTowerID=B,this.assets=[Rn.t.Tileset_classroom_png,Rn.t.Tileset_collisions_png,Z.c.Sfx_world,Z.c.Sfx_skywatch,J.Q.Spine_tower_elevator_json],this.dungeonGenerator="d16-1cb5"}init(k,B,U){super.init(k,B,U),U.zoneName!==this.wardenRoom&&U.zoneName!==this.commonRoom?this.bgmID=this._towerData.BGM.dungeon:this.isWardenSaved?this.bgmID=this._towerData.BGM.completed:this.bgmID=this._towerData.BGM.incomplete,j.Aq$.isDefined(this.getCurrentQuest())||this.startQuest(1),this.game.broadcaster.addAppListener(oi.f7.PagesCollected,(()=>{this.updatePagesCounter()}),this)}initData(){if(!j.Aq$.isDefined(this._towerData)){this._towerData=le.t.getItem("academyTower",this._academyTowerID).data,this.name=this._towerData.name,this.ID=this._towerData.towerID,this.wardenRoom=`${this.ID}-${Vt.A.TOWER_WARDEN_ROOM_SHORTFORM}`,this.commonRoom=`${this.ID}-${Vt.A.TOWER_COMMON_ROOM_SHORTFORM}`,this.questHub=this.ID,this.assets=[...this.assets,...this._towerData.assets],this.goalTotal=this._towerData.battlesPerFloor,this.exitMap=this.commonRoom,this.defaultOnFaint=this.commonRoom,this.prizeWheelId=this._towerData.itemTableID,this.battleBG=this._towerData.battleBG,this.bgmID=this._towerData.BGM.incomplete;const k=this.Warden.spine;this.maps={CR:new Fn(this,this.assets,this.TowerEventName.toUpperCase()),WR:new Gn(this,[...this.assets,k,J.Q.Spine_warden_bubble_container_json],this.TowerEventName.toUpperCase())},this.quests={1:new Mn(this,this.assets,this.ID)},this.scenes={intro:new Vn(this,[...this.assets,k,this.Warden.atlas,X.V.Bgm_fun],this.FsmIDs.intro),battleShadowBoss:new Hn(this,this.assets),freeWarden:new Qn(this,[...this.assets,k,Z.c.Sfx_bubble_pop])}}}updatePagesCounter(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let B=k.state.get(`towers-${this.ID}-achievementPagesCount`);B=j.Aq$.isDefined(B)?B:0,B++,k.state.set(`towers-${this.ID}-achievementPagesCount`,B)}handleLeaving(k,B){if(k!==In.j.mapTeleport){const U=K.q.instance.prodigy.world.getCurrentMap().split("-")[1];if(U!==Vt.A.TOWER_COMMON_ROOM_SHORTFORM&&U!==Vt.A.TOWER_WARDEN_ROOM_SHORTFORM){const k=this.goalCollected;K.q.instance.prodigy.open.dungeonExitMenu(this.ID,this._towerData.battlesPerFloor,k,!1,B)}else super.handleLeaving(k,B)}else this.sendSegmentEvent("Tower Run Completed"),super.handleLeaving(k,B)}get CurrentFloor(){if(0===this.FloorStates)return 1;for(let k=1;k<=this.TotalFloors;k++)if(!cn.O.areBitsSet(this.FloorStates,1<0}setBossDefeated(k){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.set(`towers-${this.ID}-boss`,k)}get isBossDefeated(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return $.get(k.state.data,`towers.${this.ID}.boss`,!1)}get isWardenSaved(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return $.get(k.state.data,`towers.${this.ID}.wardenSaved`,!1)}get goalCollected(){return this.monstersDefeated}getBattleMods(){const k=super.getBattleMods(),B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return this.CurrentFloor===this.TotalFloors&&0===B.backpack.hasItem("item",this._towerData.wardenRoomKeyID)&&this.monstersDefeated===this._towerData.battlesPerFloor-1&&k.drops.push({ID:this._towerData.wardenRoomKeyID,type:"item",N:1}),k}getFloorConfig(k){return this._towerData.floorConfigs[k-1]}defeatMonster(k,B,U,F=[]){if(super.defeatMonster(k,B,U),this.monstersDefeated===this._towerData.battlesPerFloor){this.postBattleNootDialogue=K.q.instance.prodigy.dialogue.create();const k=!this.isWardenSaved&&this.isTowerComplete()?this._towerData.afterKeyFoundDialogueIDs:[267];this.postBattleNootDialogue.addEvents(k.map((k=>({dialogueData:this.postBattleNootDialogue.dataProvider.get(k),blockInput:!0}))))}const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let j=Xn.getAchievementMonstersCount(this.game,this.ID);F.length>0?F.forEach((k=>{this._towerData.achievementMonsterIDs.includes(k.getID())&&j++})):this._towerData.achievementMonsterIDs.includes(k)&&j++,G.state.set(`towers-${this.ID}-achievementMonstersCount`,j),this.skipProgressBarAnimation=!1}exitDungeon(k=null){this.isBossDefeated&&this.sendSegmentEvent("Tower Floor Completed"),this.sendSegmentEvent("Tower Run Completed"),super.exitDungeon(k)}static getAchievementMonstersCount(k,B){const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=U.state.get(`towers-${B}-achievementMonstersCount`);return un.o.isNumber(F)?F:(U.state.set(`towers-${B}-achievementMonstersCount`,0),0)}static getAchievementPagesCount(k,B){const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=U.state.get(`towers-${B}-achievementPagesCount`);return un.o.isNumber(F)?F:(U.state.set(`towers-${B}-achievementPagesCount`,0),0)}enterDungeon(k){const B=this.getFloorConfig(this.CurrentFloor).generator;this.generatorConfig=K.q.instance.prodigy.gameContainer.get("aaa-9186").getDungeon(B),super.enterDungeon(k),this.sendSegmentEvent("Tower Floor Started"),this.isWardenSaved&&!K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_ACADEMY_TOWERS,this.elevatorBreadcrumb)&&K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_ACADEMY_TOWERS,this.elevatorBreadcrumb)}teleport(k,B,U,F,G){if(K.q.instance.prodigy.world.getZone(hn.A_.ACADEMY).getKeystoneState(this.KeystoneZone)===Dn.s.Placed){let $=G;k!==Vt.A.TOWER_COMMON_ROOM_SHORTFORM&&k!==Vt.A.TOWER_WARDEN_ROOM_SHORTFORM&&"end"!==k||($={}),j.Aq$.isDefined(G.timeWhenPreviousZoneLoaded)&&($.timeWhenPreviousZoneLoaded=G.timeWhenPreviousZoneLoaded),j.Aq$.isDefined(G.callback)&&($.callback=G.callback),j.Aq$.isDefined(this.mapConfig)&&k!==Vt.A.TOWER_COMMON_ROOM_SHORTFORM&&k!==Vt.A.TOWER_WARDEN_ROOM_SHORTFORM&&(this.map=new xn(this,this.assets,this.mapConfig,this.CurrentFloor,`map-${this.Element}-tower`),this.maps={CR:this.maps[Vt.A.TOWER_COMMON_ROOM_SHORTFORM],WR:this.maps[Vt.A.TOWER_WARDEN_ROOM_SHORTFORM],[k]:this.map}),super.teleport(k,B,U,F,$)}else K.q.instance.prodigy.world.it(hn.A_.HOUSE)}cleanup(){this.game.broadcaster.removeAppListener(oi.f7.PagesCollected,this),super.cleanup()}start(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(j.Aq$.isDefined(this._towerData.betaPopup)&&Object.values(this.quests).length=this._towerData.betaPopup.cooldownTimeInSeconds&&(F.data.betaPopupCooldownTime=k.getTime(),K.q.instance.prodigy.open.prefabMenu(this._towerData.betaPopup.prefabID))}super.start(k,B,U)}sendSegmentEvent(k){const B=K.q.instance.prodigy.gameContainer.get("c47-20b6").playerMovementAndDiscovery,U=this.TowerEventName,F=this.isWardenSaved?dn.ss.Random:dn.ss.Normal;switch(k){case"Tower Run Completed":B.sendTowerRunCompletedEvent(U,this.isTowerComplete());break;case"Tower Floor Completed":B.sendTowerRunFloorCompletedEvent({tower_type:U,floor_id:this.isWardenSaved?this.TotalFloors:this.CurrentFloor-1,floor_type:F});break;case"Tower Floor Started":B.sendTowerRunFloorStartedEvent({tower_type:U,floor_id:this.CurrentFloor,floor_type:F});break;case"Tower Run Started":B.sendTowerRunStartedEvent(U,this.isTowerComplete())}}}let Zn=class{constructor(k,B,U,F){this.game=null,this.game=k,this.localizer=B,this.playerProvider=U,this.uuidProvider=F}updateAchievementsCompletion(){const k=K.q.instance.prodigy.gameContainer.get("db5-fb6e");return Vt.A.get("GameConstants.Debug.DISABLE_ACHIEVEMENTS")?[]:le.t.getCategoryItems("achievement").filter((B=>{if(!B.data.group)return!1;if(B.data.requirements){if(!k.meetsRequirementsDeprecated(B.data.requirements))return!1}const U=this.playerProvider.player.achievements.getProgress(B.ID);if(U>=B.data.ranks.length)return!1;const F=this.getAchievementValue(B.data.valueFunction);return F>=B.data.ranks[U]&&(F>=B.data.ranks.length&&!B.data.reward&&K.q.instance.prodigy.gameContainer.get("c47-20b6").create.achievementComplete({level:this.playerProvider.getLevel(),session_uuid:this.uuidProvider.getUUID(),achievement_name:this.getName(B),achievement_id:B.ID,transaction_id:rn.$.generateUID()}).send(),!0)}))}isComplete(k){return this.playerProvider.player.achievements.getProgress(k.ID)>=k.data.ranks.length}isRewardClaimed(k){return this.playerProvider.player.achievements.getProgress(k.ID)>k.data.ranks.length}canClaimReward(k){return k.data.reward&&this.playerProvider.player.achievements.getProgress(k.ID)===k.data.ranks.length}getCompletionText(k){const B=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);return this.isComplete(k)?B.getText("ACHIEVEMENT_FINISHED"):this.getProgress(k)>=1?B.getText("ACHIEVEMENT_COMPLETED"):`${this.getCurrent(k)} / ${this.getTarget(k)}`}getCurrent(k){let B=this.getAchievementValue(k.data.valueFunction);return(!j.Aq$.isDefined(B)||B<0)&&(B=0),B}getTarget(k){const B=this.playerProvider.player.achievements.getProgress(k.ID);return B>=k.data.ranks.length?0:k.data.ranks[B]}getProgress(k){if(this.isComplete(k))return 1;const B=this.getCurrent(k),U=this.getTarget(k);return Math.min(1,B/U)}getName(k){return this.localizer.getText(k.data.title)}getCategory(k){return this.localizer.getText(k.data.title)}getDesc(k){let B=this.playerProvider.player.achievements.getProgress(k.ID);B>=k.data.ranks.length&&(B=k.data.ranks.length-1);const U=k.data.ranks[B];return j.Aq$.isDefined(U)?this.localizer.getText(k.data.desc).replace("[X]",U.toString()):"Nothing"}getUnclaimedRewards(k=le.t.getCategoryItems("achievement")){return k.filter((k=>this.canClaimReward(k)))}processValue(k){return this.playerProvider.player.achievements.getTag(k)}getAchievementValue(k){var B;let U=0;const F=this.playerProvider.player,G=F.backpack,$=F.kennel,H=F.house,V=F.state,W=k.params,q=k.type;switch(q){case"hasPlayerCompletedTutorial":U=F.hasCompletedTutorial()?1:0;break;case"processValue":U=this.processValue(W.achievementTag);break;case"numberOfItemsInBackpack":U=G.getItemCount(W.backpackItemsTypes);break;case"numberOfItemsInHouse":U=H.getItemCount();break;case"numberOfActiveItemsInHouse":U=H.getActiveCount();break;case"numberOfPets":U=$.getNumPets();break;case"playerLevel":U=F.getLevel();break;case"playerRelicCount":U=F.getNumRelics();break;case"numberOfCompletedQuests":U=V.getCompletedQuests(W.zone);break;case"areItemsPresentInBackpack":U=G.hasItems(W.backpackItems)+H.hasItems(W.backpackItems);break;case"givenTagInZone":U=V.getZoneVars(this.game,W.zone,W.zoneTag);break;case"getSingleStateValue":U=null!==(B=V.get(W.state))&&void 0!==B?B:0;break;case"numberOfStatesCompletedInShipwreckShore":U=K.q.instance.prodigy.world.getZone(hn.A_.SHIPWRECK).getCompletedStatesCount(W.shipwreckShoreStates);break;case"playerAnswerStreakCount":U=F.getAnswerStreak();break;case"masteredSkillsCount":U=K.q.instance.prodigy.education.getMasteredSkills();break;case"towerProgress":U=F.getTowerProgress();break;case"playerColiseumRank":U=F.getColiseum();break;case"isElementalTowerBossDefeated":U=K.q.instance.prodigy.world.getZone(W.elementalTower).isBossDefeated?1:0;break;case"towerPageCount":U=Xn.getAchievementPagesCount(this.game,W.elementalTower);break;case"towerMonsterCount":U=Xn.getAchievementMonstersCount(this.game,W.elementalTower);break;case"elementalTowerCurrentFloor":U=K.q.instance.prodigy.world.getZone(W.elementalTower).CurrentFloor;break;case"isSingleItemPresentInBackpack":{const k=W.backpackItems[0];U=G.hasItem(k.type,k.ID);break}default:(0,rs.v)(!1,`No achievement value function "${q}"`)}return(0,rs.v)(j.Aq$.isDefined(U),`The return value from getAchievementValue for value function "${q}" is not valid.`),U}};Zn=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)("51c-03a0")),(0,G.Qj)(1,(0,tt.inject)(j.$Bt.LocalizationService)),(0,G.Qj)(2,(0,tt.inject)("e20-0fb0")),(0,G.Qj)(3,(0,tt.inject)("2e6-0f71")),(0,G.Sn)("design:paramtypes",[an.n,j.dTp,Wt.E,on.H])],Zn);var Jn=U(8872),ta=U(30334),ea=U(47315);class ia{static getEncounterRate(k){const B=le.t.getItem("pet",k).data;return j.Aq$.isDefined(B)?j.Aq$.isDefined(B.R)?B.R:1:0}process(){const k=14549017,B=le.t.getCategoryItems("pet"),U=[4,4,4,4,4,4,4,12,30,30];let F='';for(let G=0;G`;F+='';for(let G=0;G"+U.ID+'"}F+="
    IDIconMemberElementLifePowerNameDescriptionInformation


    '+(U.data.member?"yes":"no")+''+U.data.element+''+U.data.life+''+U.data.power+'"+U.data.name+'"+U.data.flavorText+'
    '+H+"
    "+V+"
    ",j.VyI.log(F,j.$bb.Verbose)}}var sa=U(38487),na=U(86896),aa=U(7914),ra=U(25048),oa=U(66726),ha=U(8811),ca=U(30424),da=U(82329),la=U(10655),ua=U(37639),fa=U(55734),ba=U(89360),pa=U(47223),va=U(71543),ga=U(50503),ma=U(71796),ya=U(93709),_a=U(32740),Ea=U(36279);class wa{get battleMods(){return this._battleMods}constructor(k,B){this.game=null,this.battleStats=null,this.game=k,this.metricsManager=B,this.battleStats=new Ea.g}start(k,B,U,F,G,$=!1){K.q.instance.prodigy.gameContainer.get("a25-68f4").getBattleStartQuestData(k.revampBattleType).catch((k=>{j.RQr.createHandler("Error getting battle quest data, starting battle with no quest data")(k)})).then((j=>{this.continueBattleStart(k,B,U,F,G,j)})).catch(j.RQr.createHandler("Error continuing the battle start function in BattleController"))}continueBattleStart(k,B,U,F,G,H){var V,W,q,z,Y,Q,X,Z,J,tt,et,it,st;const nt=$.extend({},wa.MOD_DEFAULTS,k);this._battleMods=nt;const at=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,rt=!0===(null===(V=at.battleResumeData)||void 0===V?void 0:V.nextBattleIsResume),ot=K.q.instance.prodigy.world.getZone(K.q.instance.prodigy.world.getCurrentZone()),ht=null==ot?void 0:ot.getMap(K.q.instance.prodigy.world.getCurrentMapTag()),ct=j.Aq$.isDefined(k.difficulty)?k.difficulty:ta.z,dt=Math.max(hi.s.minLevel,ga.A.getEnemyLevel(at.getLevel(),ct)),lt=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),ut=this.initBattle(nt,dt),ft=(null===(W=nt.boss)||void 0===W?void 0:W.ID)?le.t.getItem("boss",nt.boss.ID):null,bt=ut.reduce(((k,B,U)=>{var F;return k[`enemy-${U}`]=Object.assign(Object.assign({},B.data),{asset:{id:B.getID(),type:this.getCreatureUnitType(B)},appearance:B instanceof pa.s?this.translateWizardAppearance(B.appearance):void 0,equipment:B instanceof pa.s?this.translateWizardEquipment(B.equipment):void 0,ignoreEquipmentSpells:B instanceof pa.s?null===(F=null==ft?void 0:ft.metadata)||void 0===F?void 0:F.ignoreEquipmentSpells:void 0,drops:B.getDrops().filter((k=>k)),nickname:B.data.nickname&<.hasText(B.data.nickname)?lt.getText(B.data.nickname):B.data.nickname,level:B.data.level,mergeRank:B.data.mergeRank,skipDefeatedPetStep:B.data.skipDefeatedPetStep}),k}),{}),pt={battleType:null!==(q=nt.revampBattleType)&&void 0!==q?q:Ni.gu.Basic,minTeamSize:nt.minTeamSize,maxTeamSize:nt.maxTeamSize,level:null!==(z=this.getLevelRangeConfig(nt.minLevel,nt.maxLevel))&&void 0!==z?z:nt.level,difficulty:nt.difficulty,opponents:{units:bt},cooldown:nt.cooldown,activeQuestIDs:null==H?void 0:H.questIDs,questEventsToSend:null==H?void 0:H.questEvents};j.Aq$.isDefined(k.towerFloor)&&(pt.currentFloor=k.towerFloor,pt.rouletteResult=k.revampRouletteNumber,pt.opponents.units={});const vt=null!==(Y=(st=at.data).battleResumeDataClient)&&void 0!==Y?Y:st.battleResumeDataClient={};pt.clientState=null!==(X=null===(Q=at.battleResumeData)||void 0===Q?void 0:Q.data)&&void 0!==X?X:{},rt||(vt.currentBackground=null!==(Z=k.screen)&&void 0!==Z?Z:null==ht?void 0:ht.battleBG,va.p.shouldStoreTriggerDataWithBattle(nt)&&(pt.clientState.battleTriggerData={encounterMap:K.q.instance.prodigy.world.getCurrentMap(),encounterPosition:this.game.broadcaster.broadcast(oi.pm.GetTarget,this.game,[!0])}),at.updated=!0);const gt=K.q.instance.prodigy,mt=null===(J=gt.world.getZone(null==G?void 0:G.split("-")[0]))||void 0===J?void 0:J.getOnFaintData(),yt={backgroundID:null!==(tt=vt.currentBackground)&&void 0!==tt?tt:"battle-coliseum-outside",backgroundMusicID:k.backgroundMusic,victoryMusicID:k.victoryMusic,onEscape:B?()=>B():()=>K.q.instance.prodigy.world.teleportToCurrentMap(),onDefeat:F?()=>F():()=>K.q.instance.prodigy.world.teleportToCurrentMap(),onVictory:()=>{U(k,ut)},addZoneCurrency:k.addZoneCurrency,enableTeamDrops:!k.dropsDisabled,scaleGuaranteedDrops:k.scaleGuaranteedDrops,guaranteedDrops:k.drops,defeatData:{teleportData:mt},showQiBadgeAnimations:null!==(et=k.showQiBadgeAnimations)&&void 0!==et?et:nt.showQiBadgeAnimations,requirements:nt.requirements},_t=gt.game.state.states.get(Ie.G.SecureBattleRevamp);rt?_t.resumeBattleRequest(pt,yt):K.q.instance.prodigy.gameContainer.get("54c-b7de").initiateTeamSelection(null!==(it=k.revampBattleType)&&void 0!==it?it:Ni.gu.Basic,k,pt,(()=>_t.startBattleRequest(pt,yt))).catch(j.RQr.createHandler("BattleController: Error initiating universal team selection before starting battle"))}getLevelRangeConfig(k,B){if(j.Aq$.isDefined(k)&&j.Aq$.isDefined(B))return{min:k,max:B}}getCreatureUnitType(k){return k instanceof pa.s?Ni.uj.Wizard:k instanceof la.A?Ni.uj.Titan:k instanceof sa.s?Ni.uj.Boss:Ni.uj.Pet}replaceOpponentTeam(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=!0){const U=this.game.state.get(Ie.G.Battle),F=$.extend({},wa.MOD_DEFAULTS,k);return yield U.replaceOpponentTeam(this.initBattle(F,this.battleStats.level),F,B),U.teams[1]}))}onEndBattle(){const k=K.q.instance.prodigy.battle.battleStats.type;K.q.instance.prodigy.gameContainer.get("0f1-c356").onWeeklyChallengeBattleEnd(k).then((()=>{ba.h.instance.updateData()})).catch((k=>{j.VyI.log(`BattleStats update failed: ${j.RQr.stringify(k)}`,j.$bb.Warning)})),K.q.instance.prodigy.load.removeAssets(),this._assets=null}chooseAction(k,B,U,F,G,$,H,V,W){const q=U.source.getCurrentBamSpells();if(q.length<=0)return j.VyI.log(`Enemy ${U.name} has no spells. Skipping turn.`,j.$bb.Warning),void W();if(B&&Math.random()-1?Y=Q:Math.random()<=k/ga.A.MAX_DIFFICULTY&&G.getCurrentEnergy()>=3&&z.length>0&&(G.changeEnergy(-3),Y=z[j.cj9.between(0,z.length-1)]),!j.Aq$.isDefined(Y))return j.VyI.log("Invalid attack, skipping turn",j.$bb.Warning),void W();H(U,$,W,Y,ga.A.rollMissChance(k,U.getSource().modifiers.miss))}getBattleLevel(k=null){let B=0;if(j.Aq$.isDefined(k))for(let U=0;Uk))}battleScore(k,B,U,F){const G=ga.A.getBestAttack(k.getSource().getAttacks(),k.getSource(),B.getSource(),1-F),j=ga.A.getBestAttack(B.getSource().getAttacks(),B.getSource(),k.getSource(),1-F),$=ga.A.calculateDamage(k.getSource(),k.getSource()instanceof ua.K,B.getSource(),G,{}).damage;if(0===$)return Number.NEGATIVE_INFINITY;const H=ga.A.calculateDamage(B.getSource(),B.getSource()instanceof ua.K,k.getSource(),j,{}).damage;if(0===H)return Number.POSITIVE_INFINITY;let V=k.source.getMaxHearts();U||(V=Math.max(V-H,0));return V/H-k.source.getMaxHearts()/$+(k.battleShy?wa.BATTLE_SHY_MODIFIER:0)}chooseRandomMonster(k){j.Aq$.isDefined(wa.DEBUG_OVERRIDE_MONSTER_ID)&&(k=[{ID:wa.DEBUG_OVERRIDE_MONSTER_ID,R:1}]);let B=0;for(let F=0;F=W.difficultyStreakBench.max;return U=$&&H?1:H||q?F:$||z?G:F>=G?F:wn.o.integerInRange(F,G+1),U}initBattle(k,B){var U,F,G,H,V,W,q;const K=[],z=this.determineOpponentTeamSize(k.minTeamSize,k.maxTeamSize);if(j.Aq$.isDefined(k.boss)){j.Aq$.isDefined(k.boss.level)||(k.boss.level=B),k.boss.level+=j.Aq$.isDefined(k.boss.levelOffset)?k.boss.levelOffset:0;const V=null!==(U=k.minLevel)&&void 0!==U?U:hi.s.minLevel,W=null!==(F=k.maxLevel)&&void 0!==F?F:hi.s.activePlayerLevelCap;k.boss.level=$.clamp(k.boss.level,V,W);const q=le.t.getItem("boss",k.boss.ID);(null===(G=null==q?void 0:q.data)||void 0===G?void 0:G.category)===Ni.GJ.Wizard&&q.ID!==Ni.JT?(k.opponent=[{data:{ID:k.boss.ID,level:k.boss.level,nickname:k.boss.nickname}}],k.difficulty=null!==(H=q.data.difficulty)&&void 0!==H?H:k.difficulty,K.push(...this.initNonBossEnemyTeam(k,B,z))):K.push(...this.initBossEnemyTeam(k,B,z))}else K.push(...this.initNonBossEnemyTeam(k,B,z));if(j.Aq$.isDefined(k.pets))for(let Y=0;Y3&&(K.length=3),j.Aq$.isDefined(k.opponent))for(let $=0;$=3&&(K.length=3)}if(j.Aq$.isDefined(k.teamModifiers))for(let j=0;j0){const B=k.encounter[0];F={ID:B.ID,level:B.level,drops:j.Aq$.isDefined(B.drops)?B.drops:[],nickname:B.nickname}}else{if(!(k.pets&&k.pets.length>0))return;F=Object.assign(Object.assign({},k.pets[0]),{ID:k.pets[0].ID,level:k.pets[0].level+(null!==(U=k.pets[0].levelOffset)&&void 0!==U?U:0),nickname:k.pets[0].nickname}),k.pets.shift()}return j.Aq$.isDefined(F.level)&&!k.scale&&(G=F.level),this.initEnemy(F,k,G)}}initBackupEnemy(k,B,U){if(!j.Aq$.isDefined(k))return;const F=Math.random()*$.sumBy(k,(k=>k.weight));let G=0;for(let $=0;$B===k)))return!1;const B=k.split("-")[0];return(B!==hn.A_.LAMPLIGHT||void 0===K.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival())&&(!!this.lockedZones.includes(B)||!!this.lockedMaps.includes(k))}onClassMode(k,B){const U=k.split("-"),F=Ta.i.getZoneData(U[0]);K.q.instance.prodigy.open.classModeMessage(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(F.classCodeKey),B,null,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(F.nameKey),F.classModeFrame,{isModal:!0},F.nameKey)}}var Aa=U(42749),Ca=U(67255),Oa=U(68370),Ia=U(28962);let Da=class{get OnDownBlocked(){return this.onDownBlocked}set InputMask(k){this.inputMask=k}constructor(k){this.onDownBlocked=new j.HN0,this.inputMask=0,this.input=k.input}setBlockType(k,B){k.blockType=B}getBlockType(k){var B;return null!==(B=null==k?void 0:k.blockType)&&void 0!==B?B:0}inputFilter(k,B,U){return this.lastTarget=U,this.isBlocked(U)?null:U}handleClick(){j.Aq$.isDefined(this.lastTarget)&&this.isBlocked(this.lastTarget)&&this.onDownBlocked.dispatch()}isBlocked(k){return 0==(this.inputMask&this.getBlockType(k))}start(){this.input.onDown.add(this.handleClick,this),this.input.setInteractiveCandidateHandler(this.inputFilter,this)}pause(){this.input.onDown.remove(this.handleClick,this),this.input.setInteractiveCandidateHandler(null,this)}destroy(){this.pause(),this.onDownBlocked.dispose(),this.inputMask=0,this.lastTarget=null}};Da=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)("51c-03a0")),(0,G.Sn)("design:paramtypes",[an.n])],Da);var Ra=U(23748),Pa=U(35564);class Ma{constructor(k,B){this.ot=k,this._player=B}sendEffectMessage(k,B,U){const F={action:Pa.x.FX,data:{type:k,x:B,y:U}};this.ot.emitMessage(F)}}let Na=class{get onBegin(){return this._onBegin}get onComplete(){return this._onComplete}get onFire(){return this._onFire}constructor(k,B,U,F){this._onBegin=new j.HN0,this._onComplete=new j.HN0,this._onFire=new j.HN0,this._fxSocketHandler=null,this._game=k,this._effects=K.q.instance.prodigy.effects,this._fxSocketHandler=new Ma(K.q.instance.prodigy.gameContainer.get("c97-bd0d"),F.player),this._prefabLoader=B,this._localizer=U}doEffect(k){var B,U;const F=k.data.effect.fx,G=le.t.getItem("fx",F).data,$=G.type;if("projectile"===$)this.doProjectile(F,G.name,G.projectileCount,G.delay);else if("firework"===$){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer,G=j.wa5.getActiveScene().container.get("MainPlayerGameObject"),$=null!==(U=null===(B=null==k?void 0:k.transform)||void 0===B?void 0:B.position)&&void 0!==U?U:G.transform.worldPosition;this._fxSocketHandler.sendEffectMessage(F),this._effects.playFX(F,$.x,$.y,void 0,void 0,(()=>{this._onComplete.dispatch()})),this._onFire.dispatch()}}reset(){this.destroyUI(),this._onBegin.removeAll(),this._onFire.removeAll(),this._onComplete.removeAll()}doProjectile(k,B,U,F){this._onBegin.dispatch(),this._inputBlocker=new Da(this._game),this._inputBlocker.InputMask=Ia.z.AIMING_OVERLAY|Ia.z.SYSTEM_INFO|Ia.z.REAR_OVERLAY,this._inputBlocker.start(),this._clickOverlay=new j._mx,this._clickOverlay.layer="ui",this._clickOverlay.addComponent(j.K16),this._clickOverlay.legacyTransform.x=.5*this._game.width,this._clickOverlay.legacyTransform.y=.5*this._game.height;const G=this._clickOverlay.addComponent(kn.p);G.Width=this._game.width,G.Height=this._game.height,G.blockType=Ia.z.AIMING_OVERLAY;const $=this._prefabLoader.loadFromGUID(Ei.l.WaterBalloonInstructionPanel);$.findComponentInChildren(j.EYj).text=this._localizer.getText("PROJECTILE_INSTRUCTIONS",B),this._instructionContainer=new j._mx,this._instructionContainer.layer="ui",this._instructionContainer.addComponent(j.dLy),Oa.b.make(this._instructionContainer,$.legacyTransform),G.onClicked.addOnce((()=>{const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer,G=j.wa5.getActiveScene().container.get("MainPlayerGameObject"),$=j.Aq$.isDefined(B),H=$?B.position:G.transform.worldPosition,V=$?this._game.input:Ra.z.convertScreenToWorldPosition(this._game.input);this._fxSocketHandler.sendEffectMessage(k,V.x,V.y);let W=U;do{const B=1===W;window.setTimeout((()=>{this._effects.playFX(k,H.x,H.y,V.x,V.y,(()=>{B&&this._onComplete.dispatch()}))}),F*W),W--}while(W>0);this.endEffect(!0)}),this)}endEffect(k){this.destroyUI(),k?this._onFire.dispatch():this._onComplete.dispatch()}destroyUI(){var k,B,U;null===(k=this._clickOverlay)||void 0===k||k.destroy(),null===(B=this._instructionContainer)||void 0===B||B.destroy(),null===(U=this._inputBlocker)||void 0===U||U.destroy()}};Na=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)("51c-03a0")),(0,G.Qj)(1,(0,tt.inject)("d0e-64fd")),(0,G.Qj)(2,(0,tt.inject)(j.$Bt.LocalizationService)),(0,G.Qj)(3,(0,tt.inject)("e20-0fb0")),(0,G.Sn)("design:paramtypes",[an.n,j.wNP,j.dTp,Wt.E])],Na);var xa=U(55110),La=U(21492);let ka=class{constructor(k,B,U){this.providers=new Map,this.localizationService=B,U.forEach((k=>{this.providers.set(k.getZoneID(),k)}))}isAvailable(k){if(!this.providers.has(k))return!1;const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return this.providers.get(k).isActive(B)}isLocked(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(j.Aq$.isDefined(k.member)&&k.member&&!B.hasMembership())return!0;if(!j.Aq$.isDefined(k.req))return!1;for(let U=0;U{K.q.instance.game.tweens.remove(this.currentTween),this.currentTween=this.game.add.tween(this,this).delay(k),this.currentTween.onTweenComplete.add(this.closeNotification,this)}))}closeNotification(){this.game&&(K.q.instance.game.tweens.remove(this.currentTween),this.currentTween=this.game.add.tween(this.notificationContainer,this).to({alpha:0},250,j.GS3.Linear.None,!0,0),this.currentTween.onTweenComplete.add(this.close,this))}runNotificationCallback(){this.notificationCallback(),this.closeNotification()}onPause(){var k;this.visible=!1,null===(k=this.currentTween)||void 0===k||k.pause()}onResume(){var k;this.visible=!0,null===(k=this.currentTween)||void 0===k||k.resume()}close(){var k;this.currentTween&&K.q.instance.game.tweens.remove(this.currentTween),this.game&&K.q.instance.prodigy.notifications.notificationPlayed(),null===(k=this.closeCallback)||void 0===k||k.call(this),super.close()}}za.configModifiers={};class Ya extends za{constructor(k,B,U,F=null,G=null){super(k,B,47,U,F,G,[q._.Ui_daily_question_json,J.Q.Spine_questionsanswered_confetti_json]),this.stopAnimation=!1,this.closeButton=null,this.contractButton=null,this.rewardsButton=null,this.rewardsButtonComplete=null,this.game=k}preprocess(){this.queuePostCreateCallback((()=>{this.renderCell()}),(()=>{this.setAnimation(1e4)}))}onCloseClickCallback(k=null){this.close(),k()}renderCell(){if(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getDailyQuestions().isCurrentDayComplete()){const k=this.add(K.q.instance.prodigy.create.sprite(-10,-10,q._.General_core_json,"overlay-small"),0);k.width=1300,k.height=740,k.alpha=0,k.inputEnabled=!0}this.contractButton.onUpCallback=this.onCloseClickCallback.bind(this,this.closeNotification.bind(this)),this.closeButton.onUpCallback=this.onCloseClickCallback.bind(this,this.closeNotification.bind(this)),this.rewardsButton.onDownCallback=this.onCloseClickCallback.bind(this,K.q.instance.prodigy.open.dailyQuestionsMenu.bind(K.q.instance.prodigy.open)),this.rewardsButtonComplete.onDownCallback=this.onCloseClickCallback.bind(this,K.q.instance.prodigy.open.dailyQuestionsMenu.bind(K.q.instance.prodigy.open,null,!0)),this.sliderAnimation(),this.progressBarTween.start()}sliderAnimation(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getDailyQuestions(),B=k.getNumRequiredToday();k.hasPreviousData()?this.progressSlider.setPercentComplete(k.getPreviousNumAnsweredToday()/B):this.progressSlider.setPercentComplete(k.getNumAnsweredToday()/B),k.clearPreviousData(),this.counterText.setText(`${Math.floor(this.progressSlider.getPercentageComplete()*B)}/${B}`);const U={percent:this.progressSlider.getPercentageComplete()};let F=0;const G=k.getNumAnsweredToday()/B;F=Ra.z.clampedLerp(.01,1,G),this.progressBarTween=this.game.add.tween(U,this),this.progressBarTween.to({percent:F},1e3,j.GS3.Cubic.Out,!1,500),this.progressBarTween.onUpdateCallback((()=>{this.stopAnimation||(this.progressSlider.setPercentComplete(U.percent),this.counterText.setText(`${Math.floor(this.progressSlider.getPercentageComplete()*B)}/${B}`))})),this.progressBarTween.onTweenComplete.add((()=>{if(!this.stopAnimation&&(this.progressSlider.setPercentComplete(F),this.counterText.setText(`${k.getNumAnsweredToday()}/${B}`),1===F)){this.closeButton.visible=!1,this.contractButton.onUpCallback=this.onCloseClickCallback.bind(this,K.q.instance.prodigy.open.dailyQuestionsMenu.bind(K.q.instance.prodigy.open,null,!0));const k=this.game.add.spine(300,10,J.Q.Spine_questionsanswered_confetti_json);k.setAnimationByName(0,"animation",!0),this.notificationContainer.add(k,5),this.rewardsButton.onDownCallback=null;this.game.add.tween(this.rewardsButton.scale,this).to({x:0,y:0},200,j.GS3.Linear.None).start(),this.rewardsButtonComplete.scale=new V.Point(0,0),this.rewardsButtonComplete.visible=!0,this.rewardsButtonComplete.onDownCallback=null;const B=this.game.add.tween(this.rewardsButtonComplete.scale,this).to({x:1,y:1},200,j.GS3.Back.InOut,!1,200);B.start(),B.onTweenComplete.add((()=>{this.rewardsButtonComplete.onDownCallback=this.onCloseClickCallback.bind(this,K.q.instance.prodigy.open.dailyQuestionsMenu.bind(K.q.instance.prodigy.open,null,!0))})),this.progressSliderComplete.visible=!0,this.progressSliderComplete.setPercentComplete(1)}}))}onPause(){super.onPause(),j.Aq$.isDefined(this.progressBarTween)&&this.progressBarTween.pause()}onResume(){super.onResume(),j.Aq$.isDefined(this.progressBarTween)&&this.progressBarTween.resume()}closeNotification(){this.stopAnimation=!0,this.progressBarTween.onTweenComplete.removeAll(),this.progressBarTween.stop(),K.q.instance.game.tweens.remove(this.currentTween),this.currentTween=this.game.add.tween(this.notificationContainer,this).to({alpha:0},250,j.GS3.Linear.None,!0,0),this.progressSlider.getPercentageComplete()>=1&&this.currentTween.onTweenComplete.add(K.q.instance.prodigy.open.dailyQuestionsMenu.bind(K.q.instance.prodigy.open,null,!0,"wait"),K.q.instance.prodigy.open),this.currentTween.onTweenComplete.add(this.close,this)}close(){this.stopAnimation=!0,this.progressBarTween.onTweenComplete.removeAll(),K.q.instance.game.tweens.remove(this.progressBarTween),K.q.instance.game.tweens.remove(this.currentTween),super.close()}}var Qa=U(38156),Xa=U(53151),Za=U(19586),Ja=U(80060),tr=U(53661);class er extends za{constructor(k,B,U,F=null,G=null,$,H){super(k,B,null,U,F,G),this._notificationPrefabAsset=Ei.l.ToasterNotification,this._notificationType=Za._.DEFAULT,this._notificationDelay=8e3,this._showHideDuration=250,this._mapChanged=!1,this.game=k,this._localizer=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),$&&(this._notificationPrefabAsset=$),H&&(this._notificationType=H),K.q.instance.prodigy.world.mapChanged.addOnce((()=>{this._mapChanged=!0})),K.q.instance.prodigy.gameContainer.get("c47-20b6").social.sendToastNotificationGeneratedEvent({toast_id:`${this._notificationType}`,category:U.notificationConfig.data.category,friends:K.q.instance.prodigy.friendsListNetworkHandler.friendsList.length,classmates:K.q.instance.prodigy.friendsListNetworkHandler.classList.length})}preprocess(){this.renderCell()}renderCell(){var k,B,U,F;const G=null!==(B=null===(k=j.wa5.getActiveScene())||void 0===k?void 0:k.container.get("IS_PREFAB_MAP"))&&void 0!==B&&B,$=K.q.instance.prodigy.gameContainer.get("d0e-64fd");Ja.d.loadWithInjectedValuesAndDependenciesFromGUID($,this._notificationPrefabAsset,{NOTIFICATION_ICON_GUID:this.data.notificationConfig.data.icon,NOTIFICATION_TITLE_TEXT:this.data.notificationConfig.data.modal.title,NOTIFICATION_BODY_TEXT:this.data.notificationConfig.data.modal.body,NOTIFICATION_ID:this.data.notificationConfig.ID},G||null===(F=null===(U=j.i7d.main)||void 0===U?void 0:U.GameObject)||void 0===F?void 0:F.parent).then((k=>{this._prefabGameObject=k,this.runShowToasterTween()})).catch(j.RQr.createHandler("Failed to load the battle pass toaster"))}runShowToasterTween(){const k={value:this._prefabGameObject.transform.anchoredPivotOffset.y};this.currentTween=K.q.instance.game.add.tween(k,this._prefabGameObject).to({value:Math.abs(k.value)},this._showHideDuration,j.GS3.Linear.None,!0).onUpdateCallback((()=>{var B;null===(B=this._prefabGameObject.transform)||void 0===B||B.setPositionY(k.value)})),this.currentTween.onTweenComplete.add((()=>{var k;null===(k=this.currentTween)||void 0===k||k.stop(),window.setTimeout((()=>{this.runHideToasterTween()}),this._notificationDelay)}),this)}runHideToasterTween(){var k;if(this.game&&!this._prefabGameObject.isDestroyed){null===(k=this.currentTween)||void 0===k||k.stop();const B={value:this._prefabGameObject.transform.anchoredPivotOffset.y};this.currentTween=K.q.instance.game.add.tween(B,this._prefabGameObject).to({value:-B.value},this._showHideDuration,j.GS3.Linear.None,!0).onUpdateCallback((()=>{var k;null===(k=this._prefabGameObject.transform)||void 0===k||k.setPositionY(B.value)})),this.currentTween.onTweenComplete.addOnce((()=>this.close()),this)}}close(){var k;null===(k=this._prefabGameObject)||void 0===k||k.destroy(),super.close()}}class ir extends er{constructor(k,B,U,F=null,G=null,j=!1,$=[]){super(k,B,U,F,G),this._notificationPrefabAsset=Ei.l.BattlePassToaster,this._notificationType=Za._.BATTLEPASSQUESTGOALCOMPLETED,this._particleDelay=500,this._showTreasureTrackDelay=1500,this._multiple=!1,this._autoCollectedQuestData=[],this._multiple=j,this._autoCollectedQuestData=$,this._notificationPrefabAsset=Xa.h.isFeatureEnabled()?Ei.l.BattlePassToasterWithParticles:Ei.l.BattlePassToaster}renderCell(){this.renderCellAsync().catch(j.RQr.createHandler("Failed to render battle pass notification cell"))}renderCellAsync(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F;if(!(yield Qa.n.hasBattlePassAccess()))return void this.close();if(!(yield K.q.instance.prodigy.gameContainer.get("8dc-04eb").getCurrentBattlePassData())||Xa.h.isFeatureEnabled()&&0===this._autoCollectedQuestData.length)return void this.close();this.setToasterText();const G=K.q.instance.prodigy.gameContainer.get("d0e-64fd"),$=Xa.h.isFeatureEnabled()?Ei.l.BattlePassToasterWithParticles:Ei.l.BattlePassToaster,H=null!==(B=null===(k=j.wa5.getActiveScene())||void 0===k?void 0:k.container.get("IS_PREFAB_MAP"))&&void 0!==B&&B;yield K.q.instance.prodigy.load.assetsAsPromise($);const V=yield Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(G,$,{[tr.XU.GoalCompleteToasterTitle]:this._toasterTitleText,[tr.XU.GoalCompleteToasterDescription]:this._toasterBodyText,[tr.XU.ToasterNotificationId]:this.data.notificationConfig.ID},H||null===(F=null===(U=j.i7d.main)||void 0===U?void 0:U.GameObject)||void 0===F?void 0:F.parent);this._prefabGameObject=V,this.runShowToasterTween()}))}setToasterText(){const k=this._autoCollectedQuestData.length;if(Xa.h.isFeatureEnabled())if(k>1){const B=this._autoCollectedQuestData.reduce(((k,B)=>k+B.reward.battlePassXp),0);this._toasterTitleText=this._localizer.getText("BATTLE_PASS_NUM_QUESTS_COMPLETE_TOASTER_HEADER",k),this._toasterBodyText=this._localizer.getText("BATTLE_PASS_EXPERIENCE_GAINED_TOASTER_BODY",B.toLocaleString())}else this._toasterTitleText=this._localizer.getText("BATTLE_PASS_SPECIFIC_QUEST_COMPLETE_TOASTER_HEADER"),this._toasterBodyText=this._autoCollectedQuestData[0].questDescription;else this._multiple||k>1?(this._toasterTitleText=this._localizer.getText("BATTLE_PASS_MULTIPLE_QUESTS_COMPLETE_TOASTER_HEADER"),this._toasterBodyText=this._localizer.getText("BATTLE_PASS_MULTIPLE_QUESTS_COMPLETE_TOASTER_BODY")):(this._toasterTitleText=this._localizer.getText("BATTLE_PASS_QUEST_COMPLETE_TOASTER_HEADER"),this._toasterBodyText=this._localizer.getText("BATTLE_PASS_QUEST_COMPLETE_TOASTER_BODY"))}runShowToasterTween(){super.runShowToasterTween(),this.currentTween.onTweenComplete.add((()=>{window.setTimeout((()=>{this.playParticleAnimation()}),this._particleDelay),Xa.h.autoPopTreasureTrack&&window.setTimeout((()=>{this.openTreasureTrackMenu()}),this._particleDelay+this._showTreasureTrackDelay)}),this)}playParticleAnimation(){var k,B;const U=null===(k=this._prefabGameObject.findComponentInChildren(j.okU,!0))||void 0===k?void 0:k.GameObject,F=null==U?void 0:U.findChildByName("anchor"),G=null===(B=K.q.instance.prodigy.gameContainer.get("8dc-04eb"))||void 0===B?void 0:B.hudButton;F&&G?(F.transform.worldPosition=G.transform.worldPosition,U.parent.active=!0):j.VyI.log("Cannot find required elements to play BattlePassNotificationCell particle animation.",j.$bb.Warning)}openTreasureTrackMenu(){const k=K.q.instance.prodigy;k.gameContainer.get("8dc-04eb").getCurrentBattlePassData().then((B=>(0,G.sH)(this,void 0,void 0,(function*(){B&&B.getNumUnclaimedRewards()>0&&!this._mapChanged&&0===k.open.menus.length&&k.open.battlePassMenu(),this.close()})))).catch(j.RQr.createHandler("Failed to get battle pass quest data."))}}class sr{static loadWithInjectedValuesAndDependencies(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){return Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(k,B,U)}))}static loadWithInjectedValues(k,B,U){return Ja.d.loadWithInjectedValuesFromGUID(k,B,U)}}var nr=U(36648);class ar extends er{constructor(k,B,U,F,G){super(k,B,U,F,G,Ei.l.FestivalToaster,Za._.FESTIVALQUESTGOALCOMPLETED),this._notificationPrefabAsset=Ei.l.FestivalToaster,this._notificationType=Za._.FESTIVALQUESTGOALCOMPLETED}renderCell(){var k,B;const U=K.q.instance.prodigy.gameContainer.get("12b-405a");if(null===(k=U.getActiveFestival())||void 0===k?void 0:k.type){this.setToasterText();const k=K.q.instance.prodigy.gameContainer.get("d0e-64fd");sr.loadWithInjectedValuesAndDependencies(k,Ei.l.FestivalToaster,{FESTIVAL_TOASTER_TITLE:this._toasterTitleText,FESTIVAL_TOASTER_BODY:this._toasterBodyText,FESTIVAL_TOASTER_GRAPHIC:null!==(B=U.getFestivalIcon())&&void 0!==B?B:nr.q.Hud_parent_gifts_circle}).then((k=>{this._prefabGameObject=k,this.runShowToasterTween()})).catch(j.RQr.createHandler("Failed to load the festival quest toaster"))}}setToasterText(){this._toasterTitleText=this._localizer.getText("FESTIVAL_QUEST_COMPLETE_TOASTER_HEADER"),this._toasterBodyText=this._localizer.getText("FESTIVAL_QUEST_COMPLETE_TOASTER_BODY")}}class rr{constructor(k){this.game=null,this.isPlaying=!1,this.currentNotification=null,this.notificationQueue=[],this.notificationTimer=null,this.timerDispatch=null,this.timerOverride=!1,this.queuedShowPlayerGoals=!1,this.notificationBlockers=new Set,this._autoCollectedQuestData=[],this.game=k,this.isPlaying=!1;K.q.instance.prodigy.gameContainer.get("8dc-04eb").onQuestRewardAutoCollected.add((k=>this._autoCollectedQuestData.push(k)))}initGenericNotification(k,B={}){const U=this.getConfig(k);j.Aq$.isDefined(U)&&(U.data=Object.assign(Object.assign({},U.data),B),this.pushNotification({notificationConfig:U,callback:null}))}initNotificationWithTimer(k,B,U=!1){const F=this.getConfig(k);return j.Aq$.isDefined(F)&&(this.timerDispatch=U?window.setTimeout(this.initNotificationWithTimer.bind(this,k,B,U),B):window.setTimeout(this.pushNotification.bind(this,{notificationConfig:F,callback:null}),B),this.pushNotification({notificationConfig:F,callback:null})),this.timerDispatch}isPaused(){return this.notificationBlockers.size>0}pause(k){this.notificationBlockers.add(k),this.onPause()}resume(k){this.notificationBlockers.delete(k),this.isPaused()||this.onResume()}resumeAll(){this.notificationBlockers.clear(),this.onResume()}clearNotificationDispatch(k=null){j.Aq$.isDefined(this.timerDispatch)&&(j.Aq$.isDefined(k)?clearTimeout(k):clearTimeout(this.timerDispatch))}onPause(){j.Aq$.isDefined(this.currentNotification)&&this.currentNotification.onPause()}onResume(){j.Aq$.isDefined(this.currentNotification)&&this.currentNotification.onResume()}pushNotification(k){this.notificationQueue.length<3&&!k.notificationConfig.data.autoShare&&this.notificationQueue.unshift(k)}startTimer(k=!1){this.timerOverride&&!k||(this.timerOverride=!1,this.stopTimer(),this.notificationTimer=this.game.time.events.addTimer(rr.toasterTimeout,this.playNextNotification,this))}stopTimer(){this.game.time.events.remove(this.notificationTimer),this.notificationTimer=null}canPlayNotification(){var k;const B=K.q.instance.prodigy.open,U=K.q.instance.game.state.get(Ie.G.TileScreen);return!this.isPlaying&&!this.isPaused()&&0===B.menus.length&&0===B.renderMenus.length&&null===B.chatMenu&&this.notificationQueue.length>0&&(null===(k=null==U?void 0:U.zone)||void 0===k?void 0:k.ID)!==hn.A_.TOWERTOWN}playNextNotification(){this.canPlayNotification()&&this.notificationQueue.length>0&&this.playNotification(this.notificationQueue.shift()),this.startTimer()}clearNotifications(k=!1){j.Aq$.isDefined(this.currentNotification)&&(this.currentNotification.close(),this.notificationPlayed()),j.Aq$.isDefined(this.notificationTimer)&&(this.timerOverride=k,this.stopTimer())}removeQueuedNotificationOfType(k){const B=this.notificationQueue.length;return this.notificationQueue=this.notificationQueue.filter((B=>!k.includes(B.notificationConfig.ID))),B-this.notificationQueue.length}playNotification(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!this.isPlaying&&B.hasCompletedTutorial()){if(this.isPlaying=!0,k.notificationConfig.ID===Za._.CHARGEDLEVELFREEZECOUNTDOWN)this.currentNotification=new er(this.game,this.menuLayer,k,k.callback,null);else if(k.notificationConfig.ID===Za._.BATTLEPASSQUESTGOALCOMPLETED){const B=this.removeQueuedNotificationOfType([Za._.BATTLEPASSQUESTGOALCOMPLETED]);this.currentNotification=new ir(this.game,this.menuLayer,k,k.callback,null,B>0,this._autoCollectedQuestData),this._autoCollectedQuestData=[]}else k.notificationConfig.ID===Za._.FESTIVALQUESTGOALCOMPLETED?this.currentNotification=new ar(this.game,this.menuLayer,k,k.callback,null):"QuestionsAnswered"===k.notificationConfig.data.category&&(this.currentNotification=new Ya(this.game,this.menuLayer,k,k.callback,null));if(!j.Aq$.isDefined(this.currentNotification))return void this.notificationPlayed();this.currentNotification.preprocess(),this.isPaused()&&this.currentNotification.onPause()}else this.pushNotification(k)}notificationPlayed(){this.isPlaying=!1,this.currentNotification=null}getConfig(k){return Tn.J.copyObject(le.t.getItem("gameFeed",k))}}rr.toasterTimeout=3e3;var or=U(38443);class hr extends _a.M{constructor(k,B,U,F,G,H,V,W,q,K,z,Y,Q){super(k,B,new fa.R(k,{ID:W.monsterData.ID,nickname:W.monsterData.nickname}),1,U,F,null,Y),this.monsterData=W.monsterData,this.unique=q||!1,this.onEnc=K,this.encountered=!1,this.ID=V,this.user=G,this.path=H,this.screen=Q;j.Aq$.isDefined(W.range)||(W.range=hr.DEFAULT_MOD_LENGTH*hr.DEFAULT_MOD_LENGTH*1),W.ignorePathfindingForAlert=$.get(W,"ignorePathfindingForAlert",!1),W.unique=q,this.mods=W,W.randDir&&Math.random()<.5&&this.flip(),this.mods.encounter=[this.monsterData],z&&(this.alpha=.5,this.respawnTimer=(new Date).getTime()+1e4),this.reload(),this.visible=!1}process(k){this.zone=k;let B=!1;this.highlight(!1),this.visible=!0;const U=k.getQuestState();if(!j.Aq$.isDefined(U)||!j.Aq$.isDefined(U.req))return;this.unique&&1===U.state[this.ID]&&(this.visible=!1);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if("pet"===U.req.type&&U.req.N>0&&this.source.getID()===U.req.ID&&this.mods.isQuestEncounter)B=!0;else if("item"===U.req.type&&F.backpack.hasItem("item",U.req.ID)0&&(j.Aq$.isDefined(this.mods.drops)||(this.mods.drops=[]),this.mods.drops.push(...k))}{const k=Dn.N.getAllTowerData().map((k=>k.towerID));this.zone.ID===hn.A_.ARCHIVES?K.q.instance.prodigy.battle.battleStats.type="ArchivesMonsterEncounter":k.includes(this.zone.ID)?(K.q.instance.prodigy.battle.battleStats.type=this.zone.ID,K.q.instance.prodigy.battle.battleStats.battleCustomMeta={floor_number:this.zone.CurrentFloor,encounter_number:this.zone.monstersDefeated+1}):K.q.instance.prodigy.battle.battleStats.type="RandomMonsterEncounter";const B=this.zone.getBattleMods();this.mods=Object.assign(Object.assign({},this.mods),B),K.q.instance.prodigy.battle.start(this.mods,this.onEndBattle.bind(this,this.game,this.zone,this.mods.onEnd,this.source.getID(),this.ID,!1,this.unique,this.onEnc,void 0,this.x,this.y),this.onBattleWin.bind(this,this.game,this.zone,this.mods.onEnd,this.source.getID(),this.ID,this.unique,this.onEnc,this.x,this.y),this.onDefeat,this.mods.onFaint)}}setVisible(k){this.visible=k}patrol(k){this.encountered||this.setPath(k,this.patrol.bind(this,k))}}hr.DEFAULT_MOD_LENGTH=200;var cr=U(98013);class dr extends hr{constructor(k,B,U,F,G,j,$,H,V,W,q,K,z){super(k,B,U,F,G,j,$,H,V,W,q,K,z);const Y=le.t.getItem("pet",this.source.data.ID).metadata.assets;this.monsterAsset=Y.spine?Y.spine:Y.default}startLoad(){super.startLoad([J.Q.Spine_memberpet_icon_json])}setup(k,B){if(B){if(cr.l.removeAll(this.sprites,!0),this.spine=this.game.add.spine(0,0,this.assets[0]),this.spine.setToSetupPose(),this.spine.setAnimationByName(0,"idle",!0),this.spine.scale.x=j.Aq$.isDefined(this.monsterAsset.flip)&&this.monsterAsset.flip?-1:1,this.sprites.addChild(this.spine),j.Aq$.toggleDisplayObjSmooth(this.sprites,!0),this.onClick){const k=K.q.instance.prodigy.create.image(0,0,null);k.alpha=0,k.width=this.getHitboxWidth(),k.height=this.getHitboxHeight(),k.inputEnabled=!0,k.events.onInputDown.add(this.onClick),k.anchor.set(.5,1),this.add(k)}this.complete=!0,this.loading=!1,j.Aq$.isDefined(this.loadedCallback)&&this.loadedCallback(this),this._onLoad.dispatch()}}walk(){this.spine?(this.spine.setToSetupPose(),this.spine.setAnimationByName(0,"walk",!0)):this._onLoad.addOnce(this.walk,this)}stand(){this.spine?(this.spine.setToSetupPose(),this.spine.setAnimationByName(0,"idle",!0)):this._onLoad.addOnce(this.stand,this)}}var lr=U(95373),ur=U(57750),fr=U(86949),br=U(31427);class pr extends fr.u{constructor(k,B){super(),this._isIdling=!1,this._renderer=null,this.onTargetStopped=new j.HN0,this.onDestroy=new j.HN0,j.Aq$.isDefined(B)&&(this._followController=new lr.u(k,this,B),this.walkSpeed=B.walkSpeed)}create(){super.create(),this._renderer=this.gameObject.findComponent(br.A),this._renderer.setAnchor(.5,0),this.stopMoving()}destroy(){this.stopTweens(),this.onDestroy.dispatch(),this.onDestroy.dispose(),this.onTargetStopped.dispose(),super.destroy()}update(){super.update(),j.Aq$.isDefined(this._followController)&&this._followController.update()}walk(){this._isIdling&&(this._renderer.playAnimation("walk",!0),this._isIdling=!1)}stand(){this._isIdling||(this._renderer.playAnimation("idle",!0),this._isIdling=!0,this.gameObject.x=Math.round(this.gameObject.x),this.gameObject.y=Math.round(this.gameObject.y))}setValidPath(k,B,U,F,G=!0){k.findPath(this.gameObject.x,this.gameObject.y,B,U,G).then((k=>{this.setPath(k,F)})).catch(j.RQr.createHandler("Unable to find path for follow"))}setPath(k,B,U){if(!k||!K.q.instance.game)return;this.stopTweens();const F=null!=U?U:this.walkSpeed;let G=null,$=null,H=this.gameObject.x,V=this.gameObject.y;for(let W=k.length-1;W>=0;W--){const B=k[W];j.Aq$.isDefined(B.x)||(B.x=H),j.Aq$.isDefined(B.y)||(B.y=V);const U=j.cj9.distance(B.x,B.y,H,V);if(0===U)continue;j.Aq$.isDefined(G)||(G=K.q.instance.game.add.tween(this.gameObject,this),$=K.q.instance.game.add.tween(this.gameObject.scale,this));const q=Math.abs(this.gameObject.scale.x);G.to({x:B.x,y:B.y},6*U/F,j.GS3.Linear.None),$.to({x:B.x>H?q:-q},1,j.GS3.Linear.None),$.to({},6*U/F-100,j.GS3.Linear.None),H=B.x,V=B.y}j.Aq$.isDefined(G)?(G.onTweenComplete.addOnce(this.stand,this),j.Aq$.isDefined(B)&&G.onTweenComplete.addOnce(B),this.walk(),j.Aq$.isDefined(G)&&G.start(),j.Aq$.isDefined($)&&$.start()):(j.Aq$.isDefined(B)&&B(),this.stand())}stopTweens(){j.Aq$.isDefined(K.q.instance.game)&&(K.q.instance.game.tweens.removeFrom(this.gameObject,!1),this.gameObject&&!this.gameObject[ur.k.DESTROYED]&&K.q.instance.game.tweens.removeFrom(this.gameObject.scale))}getPosition(){return this.gameObject.position}pathTo(k){let B;B=K.q.instance.game.state.get(Ie.G.TileScreen).path,B||(B=K.q.instance.game.state.get(Ie.G.Museum).path),B?this.setValidPath(B,k.x,k.y,this.targetStopped.bind(this),!0):j.VyI.log("No pathfinder found!",j.$bb.Error)}isMoving(){return!this._isIdling}stopMoving(){this._isIdling||(this._renderer.playAnimation("idle",!0),this._isIdling=!0)}targetStopped(){this.onTargetStopped.dispatch()}}class vr extends fr.u{constructor(k){super(),this.text=null,this.xCoord=0,this.yCoord=0,this.text=k.text,this.xCoord=k.x,this.yCoord=k.y}create(){super.create(),K.q.instance.prodigy.create.nameFont(this.gameObject,this.gameObject.position.x+this.xCoord,this.gameObject.position.y+this.yCoord,this.text)}}var gr=U(59838);class mr extends fr.u{constructor(k){super(),this.animations=null,this.timesPlayed=0,this.targetLoops=0,this.nextIdleAnim=0,this.renderer=null,this.animations=k}create(){super.create(),this.renderer=this.gameObject.findComponent(gr.F),this.renderer.setAnchor(.5,0),this.idle()}idle(){j.Aq$.isDefined(this.renderer.spine)?(this.chooseRandomAnimation(),this.renderer.spine.onComplete.has(this.chooseRandomAnimation,this)&&this.renderer.spine.onComplete.remove(this.chooseRandomAnimation,this),this.renderer.spine.onComplete.add(this.chooseRandomAnimation,this)):(this.renderer.onLoaded.has(this.idle,this)&&this.renderer.onLoaded.remove(this.idle,this),this.renderer.onLoaded.addOnce(this.idle,this))}chooseRandomAnimation(){this.timesPlayed===this.targetLoops?(this.targetLoops=this.animations[this.nextIdleAnim].min+Math.floor(Math.random()*(this.animations[this.nextIdleAnim].max+1-this.animations[this.nextIdleAnim].min)),this.renderer.getAnimationLength(this.animations[this.nextIdleAnim].name)>0&&this.renderer.playAnimation(this.animations[this.nextIdleAnim].name,!0),this.timesPlayed=1,this.nextIdleAnim++,this.nextIdleAnim=this.nextIdleAnim%this.animations.length):this.timesPlayed++}}var yr=U(19273),_r=U(24110);class Er extends fr.u{get system(){return this._system}constructor(k){super(),this._particleEffectData=null,this._particleEffectData=k}create(){super.create(),this._systemObject=new j._mx,this._systemObject.addComponent(j.dLy),this._systemObject.addComponent(j.K16),this._systemObject.addComponent(_r.B);const k=K.q.instance.game.state.get(K.q.instance.game.state.current);k?k.backgroundGameObject?k.backgroundGameObject.addChild(this._systemObject):j.VyI.log("ParticleEmitter no background game object to parent to",j.$bb.Error):j.VyI.log("ParticleEmitter no screen to parent to",j.$bb.Error),this._system=or.d.createParticleEmitter(this._systemObject,this._particleEffectData.ID)}update(){super.update(),this._systemObject.transform.setPosition(this.gameObject.x+this._particleEffectData.x,this.gameObject.y+this._particleEffectData.y)}fade(k,B){this._maxAlpha||(this._maxAlpha=new j.wPU,this._system.behaviours.push(this._maxAlpha)),K.q.instance.game.add.tween(this._maxAlpha,this).to({maximumAlpha:k},B,j.GS3.Cubic.Out).start()}setAlpha(k){this._maxAlpha.maximumAlpha=k}destroy(){this._system&&(this._system.destroy(),this._system=null),this._systemObject&&(this._systemObject.destroy(),this._systemObject=null),super.destroy()}}var wr=U(70123),Tr=U(48951),Sr=U(26691),Ar=U(98623);class Cr extends Ar.H{constructor(k,B,U,F,G,$){super(k,B,U,F),this.callback=null,this.maxTime=6e4,this.timeDelta=1e4,this.radius=30,this.clickMessage="",this.hideElements=[],this.blocks=[],this.currentBlockIndex=-1,this.renderer=null,this.gameObject=null,this.time=0,this.endTransformMessage=null,this.numberOfSquares=[],this.activeTweens=[],this.name="timer",this.callback=$,j.Aq$.isDefined(G.maxTime)&&(this.maxTime=G.maxTime),j.Aq$.isDefined(G.timeDelta)&&(this.timeDelta=G.timeDelta),j.Aq$.isDefined(G.radius)&&(this.radius=G.radius),j.Aq$.isDefined(G.clickMessage)&&(this.clickMessage=G.clickMessage),j.Aq$.isDefined(G.hideElements)&&(this.hideElements=G.hideElements),j.Aq$.isDefined(G.storedTime)&&(this.storedTime=G.storedTime),this.setup()}destroy(k={children:!0}){for(const B of this.activeTweens)B.isDestroyed||B.remove();this.activeTweens.length=0,super.destroy(k)}setup(){for(let B=0;B{j.Aq$.isDefined(this.time)||(this.time=0),this.time+=1/60,this.updateTimerVisuals(this.time,.5,10)}:()=>{}}onClick(){this.endTransformMessage=K.q.instance.prodigy.open.messageBoxPrefab({buttonState:Sr.D.YesNoButtons,text:this.clickMessage,confirmCallback:this.callback,noCallback:()=>{this.endTransformMessage=null}})}setupTimerVisuals(k,B,U){const F=k/B,G=Math.floor(360/F/3),$=Math.floor(360/F)*Math.PI/180,H=3*Math.PI/180,V=j.Aq$.isDefined(this.storedTime)?Math.floor(this.storedTime/B-1):-1;this.numberOfSquares=[];const W=(k,B,U,F)=>{k&&!k[ur.k.DESTROYED]?(k.anchor.set(.5,.5),k.scale.x=3*F*.1,k.angle=180*U/Math.PI-90,B.add(k)):j.VyI.log("Timer cannot setup square because sprite was destroyed.",j.$bb.Warning)},z=(k,B,U,F,G,j)=>{if(this.numberOfSquares[k]--,0===this.numberOfSquares[k]){W(j,B,F,G);const k=K.q.instance.prodigy.create.element(this,0,0),$=this.game.add.renderTexture(74,74);$.renderXY(B,37,37,!0),k.add(K.q.instance.prodigy.create.image(-37,-37,void 0,void 0,$)),B.destroy(),this.blocks.push({block:k,direction:U})}};for(let j=0;jV){const U=K.q.instance.prodigy.create.sprite(Q,X,q._.Ui_timer_json,Z,null,z.bind(this,j,k,F,B,J));k&&!U[ur.k.DESTROYED]&&W(U,k,B,J)}else k.destroy()}}}updateTimerVisuals(k,B,U){let F=Math.floor(k/B-1);const G=j.Aq$.isDefined(this.storedTime)?Math.floor(this.storedTime/B-1)+1:-1;if(G>-1&&(F-=G),F>this.currentBlockIndex&&F{for(let k=0;k{this.containerLoaded=!0,this.onContainerLoaded.dispatch()})).catch(j.RQr.createHandler(`ItemContainer: failed to draw card for ${this.name}`))}drawCard(k){return(0,G.sH)(this,void 0,void 0,(function*(){let B,U;if(B="gold"===this.itemType?{type:this.itemType}:"spell"===this.itemType?K.q.instance.prodigy.attacks.getAttack(this.ID):yield le.t.secureGetItem(this.itemType,this.ID),(null==B?void 0:B.data)&&"pet"===this.itemType){const k=this.itemObject.data.nickname;B.data.nickname=j.Aq$.isDefined(k)?k:B.data.name}switch(k){case Lr.s.Icon:U=this.createSmall(B,!0);break;case Lr.s.IconNoBackground:U=this.createSmall(B,!1);break;case Lr.s.Inventory:this.createInventory(B);break;case Lr.s.Store:this.createStore(B);break;case Lr.s.Card:this.createCard(B);break;case Lr.s.Info:U=this.createLarge(B);break;case Lr.s.StylistCard:this.createStylistCard(B)}j.Aq$.isDefined(U)&&(yield U)}))}createPanel(k,B,U,F,G){if(j.Aq$.isDefined(this.panel)&&this.panel.destroy(),j.Aq$.isDefined(G))this.panel=K.q.instance.prodigy.create.panel(this,0,0,U,F,G);else if("gold"===this.itemType)this.panel=K.q.instance.prodigy.create.panel(this,0,0,U,F,"item-currency");else if("spell"===this.itemType)this.panel=K.q.instance.prodigy.create.panel(this,0,0,U,F,`item-${this.itemType}`);else if("item"===this.itemType&&!j.Aq$.isDefined(B)||"fossil"===this.itemType||"currency"===this.itemType||xr.f.includes(this.itemType))this.panel=K.q.instance.prodigy.create.panel(this,0,0,U,F,"item-common");else if(j.Aq$.isDefined(B)){let k=null;switch(B){case 0:k="common";break;case 1:k="uncommon";break;case 2:k="rare";break;case 3:k="epic";break;case 4:k="legend";break;default:k="common"}this.panel=K.q.instance.prodigy.create.panel(this,0,0,U,F,`item-${k}`)}else this.panel=K.q.instance.prodigy.create.panel(this,0,0,U,F,"empty");j.Aq$.isDefined(this.onClick)&&this.panel.setClickable(this.onDown.bind(this))}createSmall(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){this.panel=K.q.instance.prodigy.create.element(this,0,0);const U=j.Aq$.isDefined(k);let F=null,G=null;const $={x:0,y:0};if(j.Aq$.isDefined(B)&&!B||(G=K.q.instance.prodigy.create.sprite(0,0,q._.General_core_json,U?"white-icon":"empty-icon"),this.panel.add(G),$.x=10,$.y=10),U?[F]=yield K.q.instance.prodigy.icon.createFromDataAdvanced(k,this.panel,$.x,$.y):F=K.q.instance.prodigy.create.sprite($.x,$.y,q._.General_icons_json,`empty-${this.itemType}`),this.panel.add(F),j.Aq$.isDefined(this.onClick)){let k=null;if(j.Aq$.isDefined(G))k=G;else if(F instanceof ur.k)k=F;else for(let B=0;B1?2:8,B.lines>2&&(B.destroy(),B=K.q.instance.prodigy.create.font(this,-5,0,k.data.name,{width:180,size:16,align:"center",lineHeight:18}),B.y=2),"gold"===this.itemType?(this.panel.add(K.q.instance.prodigy.icon.gold(40,50)),B.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("CURRENCY_GOLD_COINS"))):"spell"===this.itemType?yield K.q.instance.prodigy.icon.createFromDataAdvanced(k,this.panel,40,70):"item"===this.itemType&&j.Aq$.isDefined(k.type)&&"potion"===k.type?yield K.q.instance.prodigy.icon.createFromDataAdvanced({type:this.itemType,ID:this.ID},this.panel,40,60):"hairColor"===this.itemType||"eyeColor"===this.itemType||"skinColor"===this.itemType||"face"===this.itemType?this.panel.add(K.q.instance.prodigy.icon.createFromData(k,40,50,null,this.onTextureLoaded.bind(this))):"hair"===this.itemType?this.panel.add(K.q.instance.prodigy.icon.createFromData(k,80,100,null,null)):(yield K.q.instance.prodigy.icon.createFromDataAdvanced(k,this.panel,40,50),"pet"===this.itemType&&j.Aq$.isDefined(k.data.nickname)&&B.setText(k.data.nickname)),"gold"===this.itemType||"currency"===this.itemType){const k=this.N>=1?`${this.N}`:"1";K.q.instance.prodigy.create.font(this.panel,0,165,k,{width:160,align:"center"})}else if(this.N>1){"currency"!==this.itemType&&this.panel.add(K.q.instance.prodigy.create.sprite(10,150,q._.General_icons_json,"mail-empty"));const k=j.Aq$.isDefined(this.N)?String(this.N):"99";"currency"===this.itemType?K.q.instance.prodigy.create.font(this.panel,0,165,k,{width:160,align:"center"}):K.q.instance.prodigy.create.font(this.panel,10,155,k,{width:40,align:"center"})}}))}onTextureLoaded(k){if(k){const B=j.Aq$.getCenteredXY(k.width,k.height,0,0,this.panel.width,this.panel.height);k.x=B.x,k.y=B.y}}createLarge(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G;if(!j.Aq$.isDefined(k))return;this.createPanel(null,k.data.rarity,19,10);const $=new Pr.C(this.game,3,40,230,360,q._.Tiled_sprites_json,"overlay-small");$.alpha=.1,this.panel.add($);const H=le.t.getItem(k.type,k.ID).data,V="item"===k.type&&j.Aq$.isDefined(H.effect)&&j.Aq$.isDefined(H.effect.transform),W=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(K.q.instance.prodigy.create.font(this,0,0,(0,Ba.k)(Tn.J.getLocalizationNameKey(k)),{fontID:9,size:36,width:680,align:"center"}),xr.f.includes(k.type)||"hat"===k.type||"weapon"===k.type||"outfit"===k.type||"boots"===k.type||V){const B=this.createCharacterPreview(k,40,65,!1);V&&this.transformEffect(H,B)}else if("follow"===k.type){const $=null!==(U=null===(B=k.metadata)||void 0===B?void 0:B.x)&&void 0!==U?U:120,H=null!==(G=null===(F=k.metadata)||void 0===F?void 0:F.y)&&void 0!==G?G:160;this.followContainer=K.q.instance.prodigy.create.follow(this.panel,k.ID,1,null,$,H),j.Aq$.isDefined(this.followContainer.reload)&&this.followContainer.reload()}else if("pet"===k.type){const B=kr.N.createSpineAssetSourceName(k,k.type,k.ID);K.q.instance.prodigy.load.assets([B],(()=>{K.q.instance.prodigy.create.spine(120,300,B,this.panel).setAnimationByName(0,"idle",!0)}))}else yield K.q.instance.prodigy.icon.createFromDataAdvanced(k,this.panel,80,80);K.q.instance.prodigy.create.font(this.panel,260,60,(0,Ba.k)(Tn.J.getLocalizationFlavorKey(k)),{size:20,fontID:8,width:480,lineHeight:30}),j.Aq$.isDefined(k.data.lockLevel)&&W.getLevel()0&&!B.hasMembership()){if(j.Aq$.isDefined(k.isGift)&&k.isGift)return;Tn.J.shouldSuppressAd(B)?(this.panel.add(K.q.instance.prodigy.create.sprite(110,150,q._.General_icons_json,"icon-medium-lock")),this.onClick=()=>{this.showTooltipAboveThisItem()}):this.panel.add(K.q.instance.prodigy.create.sprite(110,150,q._.General_icons_json,"mail-member"))}}createCharacterPreview(k,B,U,F){if(!j.Aq$.isDefined(k))return null;F&&K.q.instance.prodigy.create.panel(this,B,U,4,5,"shine");const G=new Oe.a(this.game),$=new Ur(this.game,this,B-88,U-75,G,1,!1);return this.resetPlayer(G,$,k),$.user}resetPlayer(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=F.appearance.getHair();let j=G.color,$=G.style,V=F.appearance.getEyeColor(),W=F.appearance.getSkinColor(),q=F.appearance.getFace(),z=F.equipment.getEquipment("outfit"),Y=F.equipment.getEquipment("hat"),Q=F.equipment.getEquipment("weapon"),X=F.equipment.getEquipment("boots");"hair"===U.type?$=U.ID:"eyeColor"===U.type?V=U.ID:"skinColor"===U.type?W=U.ID:"hairColor"===U.type?j=U.ID:"face"===U.type?q=U.ID:"outfit"===U.type?z=U.ID:"hat"===U.type?Y=U.ID:"weapon"===U.type?(Q=U.ID,B.user.forceWeaponVisual=!0):"boots"===U.type&&(X=U.ID),k.appearance.setHair($,j),k.appearance.setEyeColor(V),k.appearance.setSkinColor(W),k.appearance.setFace(q),k.equipment.setOutfit(z,!1),k.equipment.setHat(Y,!1),k.equipment.setWeapon(Q,!1),k.equipment.setBoots(X,!1),k.data.chargedLevelData=H().clone(F.data).chargedLevelData,k.data.level=H().clone(F.data).level,k.appearanceChanged=!0,B.user.reload()}createStore(k){if(!j.Aq$.isDefined(k))return;this.createMedium(k);const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=B.backpack.hasItem(this.itemType,this.ID);this.owned=U>0,"dorm"===this.itemType?this.owned=B.house.getOwned(this.ID)>=9:"pet"===this.itemType?this.owned=B.kennel.hasPet(this.ID):"dormbg"===this.itemType?this.owned=B.house.getCurrentHouseTag()===k.data.tag:"hair"===this.itemType?this.owned=B.appearance.getHair().style===this.ID:"eyeColor"===this.itemType?this.owned=B.appearance.getEyeColor()===this.ID:"skinColor"===this.itemType?this.owned=B.appearance.getSkinColor()===this.ID:"hairColor"===this.itemType?this.owned=B.appearance.getHair().color===this.ID:"face"===this.itemType&&(this.owned=B.appearance.getFace()===this.ID),this.cost=this.itemObject.cost;let F="[mail-gold]";if("currency"===this.cost.type&&1===this.cost.ID||(F=`[${le.t.getItem(this.cost.type,this.cost.ID).data.icon}]`),"item"===this.itemType&&U>=99||"item"!==this.itemType&&this.owned){let k;k="dorm"===this.itemType||U>=99?K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("ITEM_MAX"):"hair"===this.itemType||"eyeColor"===this.itemType||"skinColor"===this.itemType||"hairColor"===this.itemType||"face"===this.itemType?K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("ITEM_CURRENT"):K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("ITEM_OWNED"),K.q.instance.prodigy.create.font(this.panel,10,166,k,{size:20})}else this.cost.N>0&&K.q.instance.prodigy.create.font(this.panel,6,166,F+Tn.J.numberToString(this.cost.N),{size:20});k.data.member>0&&(Tn.J.shouldSuppressAd(B)?(this.panel.add(K.q.instance.prodigy.create.sprite(120,160,q._.General_icons_json,"icon-medium-lock")),this.onClick=()=>{this.showTooltipAboveThisItem()}):this.panel.add(K.q.instance.prodigy.create.sprite(120,160,q._.General_icons_json,"mail-member")))}createStylistCard(k){if(!j.Aq$.isDefined(k))return;this.createCharacterPreview(k,0,0,!0);const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.data.member>0&&!B.hasMembership()&&(j.Aq$.isDefined(k.isGift)&&k.isGift||(Tn.J.shouldSuppressAd(B)?(this.panel.add(K.q.instance.prodigy.create.sprite(110,150,q._.General_icons_json,"icon-medium-lock")),this.onClick=()=>{this.showTooltipAboveThisItem()}):this.panel.add(K.q.instance.prodigy.create.sprite(110,150,q._.General_icons_json,"mail-member"))))}onDown(){j.Aq$.isDefined(this.onClick)&&this.onClick({type:this.itemType,ID:this.ID},this.owned,this.price)}showTooltipAboveThisItem(){K.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:this.worldPosition.x+.5*this.width,yPosition:this.worldPosition.y+7,arrowXRelPos:.5,arrowDirection:Br.i.DOWN})}update(){if(super.update(),j.Aq$.isDefined(this.followContainer)){if(j.Aq$.isDefined(this.followContainer.player)&&(this.followContainer.player=null),j.Aq$.isDefined(this.followContainer.findComponent)&&!j.Aq$.isDefined(this.renderComponent)){const k=this.followContainer.findComponent(pr);j.Aq$.isDefined(k)&&this.followContainer.removeComponent(k),j.Aq$.isDefined(this.followContainer.findComponent(br.A))&&(this.renderComponent=this.followContainer.findComponent(br.A))}if(j.Aq$.isDefined(this.itemContainerWalking)||(this.itemContainerWalking=!0),!j.Aq$.isDefined(this.itemContainerAnimDuration)||this.itemContainerAnimDuration<=0){this.itemContainerAnimDuration=0;let k=!1;this.itemContainerWalking?j.Aq$.isDefined(this.followContainer.tweens)&&j.Aq$.isDefined(this.followContainer.standTween)?(this.followContainer.stand(),k=!0):j.Aq$.isDefined(this.renderComponent)&&(this.renderComponent.playAnimation("idle",!0),k=!0):j.Aq$.isDefined(this.followContainer.tweens)&&j.Aq$.isDefined(this.followContainer.standTween)?(this.followContainer.walk(),k=!0):j.Aq$.isDefined(this.renderComponent)&&(this.renderComponent.playAnimation("walk",!0),k=!0),k&&(this.itemContainerAnimDuration=3e3*Math.random()+1e3,this.itemContainerWalking=!this.itemContainerWalking)}j.Aq$.isDefined(this.followTimer)||(this.followTimer=new j.gXL(this.game)),this.itemContainerAnimDuration-=this.game.app.ticker.deltaMS}}destroy(){var k;null===(k=this._transformEventController)||void 0===k||k.end(),this.onContainerLoaded.dispose(),super.destroy()}}var Gr=U(73877),jr=U(37946);class $r extends Ar.H{constructor(k,B,U,F,G){if(super(k,B,U,F),this.eventFormat=!1,!G){K.q.instance.prodigy.create.panel(this,0,0,6,2,"white").alpha=.8}this.text=K.q.instance.prodigy.create.font(this,0,10,"00:00",{width:240,size:40,align:"center"}),this.msg=K.q.instance.prodigy.create.font(this,0,55,"",{width:240,size:16,align:"center"})}processTime(k){if(k<=0)return"00:00";const B=Math.floor(k/36e5),U=Math.floor((k-36e5*B)/6e4),F=Math.floor((k-36e5*B-6e4*U)/1e3);let G;0===B?G="00":B<10&&(G=`0${B}`);let $=`${U}`;0===U?$="00":U<10&&($=`0${U}`);let H=`${F}`;return 0===F?H="00":F<10&&(H=`0${F}`),"00"===G?`${$}:${H}`:B<24?`${G}:${$}:${H}`:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TIMER_FORMAT_DAYS",Math.floor(B/24))}processTimeFormatted(k){if(k<=0)return"0";const B=Math.floor(k/864e5);let U=k-864e5*B;const F=Math.floor(U/36e5);U-=36e5*F;const G=Math.floor(U/6e4);let $=F.toString();F<10&&($=`0${F}`);let H=G.toString();return G<10&&(H=`0${G}`),K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TIMER_FORMAT",B,$,H)}setTime(k){this.target=k,this.text.setText(this.eventFormat?this.processTimeFormatted(k):this.processTime(k))}setMsg(k){this.msg.setText(k)}start(k,B,U=!1){this.eventFormat=U,this.setTime(k),this.callback=B,this.targetTime=(new Date).getTime()+this.target,this.clear(),this.timer=window.setInterval(this.process.bind(this),100)}pause(){this.paused=this.targetTime-(new Date).getTime()}resume(){this.targetTime=(new Date).getTime()+this.paused,this.paused=null}blink(){this.game.add.tween(this.text,this).to({y:0},500,j.GS3.Quadratic.Out).to({y:10},500,j.GS3.Quadratic.In).start()}addTime(k){this.targetTime+=k,this.process(),this.blink()}clear(){j.Aq$.isDefined(this.timer)&&(window.clearInterval(this.timer),this.timer=null)}process(){if(j.Aq$.isDefined(this.paused))return;const k=this.targetTime-(new Date).getTime();this.text.setText(this.eventFormat?this.processTimeFormatted(k):this.processTime(k)),k<=0&&(this.clear(),j.Aq$.isDefined(this.callback)&&this.callback())}isInProgress(){return j.Aq$.isDefined(this.timer)}destroy(){this.clear(),super.destroy()}}var Hr=U(60250),Vr=U(18916);class Wr extends ya.H{constructor(k,B,U,F,G){super(k,B,U,F,G),this.foodMode="soup",this.previousHP=this.source.getCurrentHearts()}setup(k,B){if(!j.Aq$.isDefined(this.game)||!B||!j.Aq$.isDefined(this.assets))return;this.cacheBoss(),this.potParts={pot:K.q.instance.prodigy.create.sprite(-100,0,q._.Boss_bonfire_json,"pot"),lid:K.q.instance.prodigy.create.sprite(140,-140,q._.Boss_bonfire_json,"pot-lid")},this.potParts.lid.anchor.set(1,1),this.potParts.pot.anchor.set(0,1),this.add(this.potParts.pot),this.add(this.potParts.lid),this.burgerParts={dish:K.q.instance.prodigy.create.sprite(300,-50,q._.Boss_bonfire_json,"dish"),bottom:K.q.instance.prodigy.create.sprite(320,-10,q._.Boss_bonfire_json,"burger-bottom"),top:K.q.instance.prodigy.create.sprite(510,-70,q._.Boss_bonfire_json,"burger-lid")},this.burgerParts.top.anchor.set(1,1),this.burgerParts.bottom.anchor.set(0,1),this.add(this.burgerParts.dish),this.burgerParts.dish.visible=!1,this.add(this.burgerParts.bottom),this.burgerParts.bottom.visible=!1,this.add(this.burgerParts.top),this.burgerParts.top.visible=!1,this.cakeParts={dish:K.q.instance.prodigy.create.sprite(300,-50,q._.Boss_bonfire_json,"dish"),lava:K.q.instance.prodigy.create.sprite(310,0,q._.Boss_bonfire_json,"lava"),face:K.q.instance.prodigy.create.sprite(350,10,q._.Boss_bonfire_json,"expression-1"),strawberry:K.q.instance.prodigy.create.sprite(400,-200,q._.Boss_bonfire_json,"berry")},this.cakeParts.face.animations.add("attack",["expression-1","expression-2","expression-3","expression-3","expression-3","expression-2","expression-1"],10,!1,!1),this.cakeParts.lava.anchor.set(0,1),this.cakeParts.face.anchor.set(0,1),this.add(this.cakeParts.dish),this.cakeParts.dish.visible=!1,this.add(this.cakeParts.lava),this.cakeParts.lava.visible=!1,this.add(this.cakeParts.face),this.cakeParts.face.visible=!1,this.add(this.cakeParts.strawberry),this.cakeParts.strawberry.visible=!1;const U=new qn.s(this.game);U.init({npc_name:"",npc_type:Kn.ac.Boss,x_coord:-100,y_coord:0,npc_animation_id:"idle"}),this.npc=new Vr.U(this.game,this,-100,0,q._.Npc_sprite_cebollini_json,null,U),this.npc.flip(),this.npc.bossStart(this.game),this.complete=!0,this.loading=!1}setDoneCallback(k){this.doneAnimationCallback=k}attack(){let k,B;zn.R.prototype.attack.call(this);const U=K.q.instance.prodigy.animation;"soup"===this.foodMode?(k=K.q.instance.prodigy.event.create(),k.animation(U.rotate.bind(U,this.potParts.lid,35,1e3,0,null,!0)),k.animation(U.translate.bind(U,this.potParts.lid,"+=0","-=20",1e3,0,null,!0),!0),k.animation(U.rotate.bind(U,this.potParts.lid,0,1e3,0,null,!0)),k.animation(U.translate.bind(U,this.potParts.lid,"+=0","+=20",1e3,0,null,!0)),B=K.q.instance.prodigy.event.create(),B.animation(U.rotate.bind(U,this.potParts.pot,-10,1e3,0,null,!0),!0),B.animation(U.rotate.bind(U,this.potParts.pot,0,1e3,0,null,!0)),k.start(),B.start()):"burger"===this.foodMode?(k=K.q.instance.prodigy.event.create(),k.animation(U.rotate.bind(U,this.burgerParts.top,25,700,0,null,!0)),k.animation(U.translate.bind(U,this.burgerParts.top,"+=0","-=20",700,0,null,!0),!0),k.animation(U.rotate.bind(U,this.burgerParts.top,0,700,0,null,!0)),k.animation(U.translate.bind(U,this.burgerParts.top,"+=0","+=20",700,0,null,!0)),B=K.q.instance.prodigy.event.create(),B.animation(U.rotate.bind(U,this.burgerParts.bottom,-10,700,0,null,!0),!0),B.animation(U.rotate.bind(U,this.burgerParts.bottom,0,700,0,null,!0)),k.start(),B.start()):"cake"===this.foodMode&&this.cakeParts.face.animations.play("attack",void 0,!1)}startEntree(){this.foodMode="burger",this.npc.entreeStart();const k=new Ti.rD(this.game);k.addEvents([{callback:()=>{this.entreeEvent(k)}},{dialogueData:k.dataProvider.getLegacy("cebollini",11),blockInput:!0,hideNext:!0}]),k.start()}entreeEvent(k){const B=K.q.instance.prodigy.event.create();B.enableInput(!1);const U=Object.keys(this.potParts);for(let G=0;G{this.dessertEvent(k)}},{dialogueData:k.dataProvider.getLegacy("cebollini",12),blockInput:!0,hideNext:!0}]),k.start()}dessertEvent(k){const B=K.q.instance.prodigy.event.create();B.enableInput(!1);const U=Object.keys(this.burgerParts);for(let G=0;G0,U=j.Aq$.isDefined(this.data.bot)&&this.data.bot.length>0;if(B&&(k+=this.data.top,U&&(k+="-")),U&&(k+=this.data.bot),0===k.length&&j.Aq$.isDefined(this.data.icon)){const B=j.Aq$.isDefined(this.data.atlas)?this.data.atlas:le.t.getIconAtlas(this.data.icon),U=le.t.getIconFrame(this.data.icon);j.Aq$.isDefined(B)&&(k=j.Aq$.isDefined(U)?`${B}-${U}`:B)}return j.Aq$.isDefined(this.name)&&""!==this.name||(this.name=k),k}}class no extends ur.k{constructor(k,B,U,F,G,j=null,$,H){super(k,B,U,F,G[0],j),this.frames=[],this.frameIndex=0,this.frames=G,this.scaleValues=$,this.positionValues=H,this.updateFrameProperties()}get frameNumber(){return this.frameIndex}set frameNumber(k){j.Aq$.isDefined(this.frames)&&(this.frameIndex=Math.floor(k),this.frameName=this.frames[this.frameIndex],this.updateFrameProperties())}updateFrameProperties(){j.Aq$.isDefined(this.scaleValues)&&(this.scale.x=this.scaleValues[this.frameIndex],this.scale.y=this.scaleValues[this.frameIndex]),j.Aq$.isDefined(this.positionValues)&&(this.x=this.positionValues[this.frameIndex].x,this.y=this.positionValues[this.frameIndex].y)}}var ao=U(85313),ro=U(26657);class oo extends Ar.H{setDefaultYPos(k){this.defaultYPos=k}constructor(k,B,U,F,G,$,H,V,W,q=!1,z,Y){super(k,B,U,F,$),this.sprite=null,this._active=!0,this.callback=null,this.animatedSprite=null,this.animatedSpritePos=null,this.animTween=null,this.sfxID=null,this.sfxClip=null,this.spriteOverlay=null,this.spriteOverlayX=0,this.spriteOverlayY=0,this.defaultYPos=0,this.callback=H,this.sprite=K.q.instance.prodigy.create.sprite(0,0,G,$,null,this.onSpriteLoaded.bind(this),z,Y),this.add(this.sprite),j.Aq$.isDefined(V)&&j.Aq$.isDefined(W)&&(this.animatedSprite=K.q.instance.prodigy.create.sprite(W.x,W.y,G,V[0]),this.animatedSpritePos=W,this.add(this.animatedSprite),this.animTween=new ro.s(this.animatedSprite),this.animTween.set("frameName",V,200,9999),this.animTween.start()),this.sprite.inputEnabled=!0,this.sprite.events.onInputDown.add(this.onDown,this),q||(this.sprite.events.onInputUp.add(this.onUp,this),this.sprite.events.onInputOver.add(this.onOver,this)),this.sprite.events.onInputOut.add(this.onOut,this),this.sfxID=18,this.sfxClip="pop",this.onDestroy.add(this.handleDestroy.bind(this))}update(){super.update();const k=Date.now();j.Aq$.isDefined(this.animTween)&&this.animTween.update(k)}setActive(){this._active=!0,this.sprite.tint=16777215}setInactive(k=5789784){this._active=!1,this.sprite.tint=k,this.sprite.y=this.defaultYPos,j.Aq$.isDefined(this.animatedSprite)&&(this.animatedSprite.y=this.animatedSpritePos.y),j.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY)}select(){this.sprite.tint=7447253}deselect(){this._active=!0,this.sprite.tint=16777215,this.sprite.y=this.defaultYPos,j.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY),j.Aq$.isDefined(this.animatedSprite)&&(this.animatedSprite.y=this.animatedSpritePos.y)}isActive(){return this._active}addOverlay(k,B,U,F){return j.Aq$.isDefined(this.spriteOverlay)&&this.spriteOverlay.destroy(),this.spriteOverlayX=k,this.spriteOverlayY=B,this.spriteOverlay=K.q.instance.prodigy.create.sprite(k,B,U,F),this.add(this.spriteOverlay),this.spriteOverlay}onDown(){this.game?this._active?(K.q.instance.prodigy.audio.playSFX(this.sfxID,this.sfxClip),this.sprite.y=this.defaultYPos,j.Aq$.isDefined(this.animatedSprite)&&(this.animatedSprite.y=this.animatedSpritePos.y),j.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY),j.Aq$.isDefined(this.callback)&&this.callback()):K.q.instance.prodigy.audio.playSFX(49,this.sfxClip):j.VyI.log("onDown called on destroyed Button",j.$bb.Warning)}onUp(){this.game?this._active&&this.sprite.input.pointerOver()&&(this.sprite.y=this.defaultYPos-3,j.Aq$.isDefined(this.animatedSprite)&&(this.animatedSprite.y=this.animatedSpritePos.y-3),j.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY-3)):j.VyI.log("onUp called on destroyed Button",j.$bb.Warning)}onOver(){this.game?this._active&&(this.sprite.y=this.defaultYPos-3,j.Aq$.isDefined(this.animatedSprite)&&(this.animatedSprite.y=this.animatedSpritePos.y-3),j.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY-3)):j.VyI.log("onOver called on destroyed Button",j.$bb.Warning)}onOut(){this.game?this._active&&(this.sprite.y=this.defaultYPos,j.Aq$.isDefined(this.animatedSprite)&&(this.animatedSprite.y=this.animatedSpritePos.y),j.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY)):j.VyI.log("onOut called on destroyed Button",j.$bb.Warning)}handleDestroy(){this.visible=!1,this.sprite&&this.sprite.destroy(),this.animTween=null,this.callback=null}onSpriteLoaded(){j.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY,this.spriteOverlay.x=this.spriteOverlayX)}}class ho extends Ar.H{constructor(k,B,U,F,G,$,H,V,W,z,Y,Q,X){super(k,B,U,F),this.back=null,this.bar=null,this.icon=null,this.label=null,this.direction=0,this.fillFunction=null,this.onFill=null,this.current=0,this.target=0,this.delay=0,this.currentLevel=0,this.speed=1,this.callback=null,this.fillFunction=V,this.direction=H,this.onFill=X,this.back=this.add(K.q.instance.prodigy.create.sprite(0,0,q._.General_core_json,"overlay-small")),this.bar=this.add(K.q.instance.prodigy.create.sprite(1,$-1,q._.General_core_json,"overlay-light")),this.bar.anchor.set(0,1),this.back.width=G,this.back.height=$,this.bar.width=G-2,this.bar.height=$-2,this.bar.tint=j.Aq$.isDefined(W)?W:16777215,this.bar.alpha=Y,this.icon=K.q.instance.prodigy.create.element(this,-Math.floor((80-G)/2),-60),j.Aq$.isDefined(z)&&("string"==typeof z?this.icon.add(K.q.instance.prodigy.create.sprite(0,0,q._.General_icons_json,z)):this.icon.add(K.q.instance.prodigy.icon.createFromData(z,0,0))),this.label=K.q.instance.prodigy.create.font(this.icon,0,20,"",{size:30,width:80,align:"center"}),this.current=0,this.target=0,this.delay=0,this.currentLevel=0,Q&&(this.back.visible=!1),this.setBar()}update(){super.update(),this.current!==this.target?(this.delay--,this.delay<=0&&(this.delay=this.speed,this.currentthis.target&&this.current--,this.setBar())):j.Aq$.isDefined(this.callback)&&(this.callback(),this.callback=null)}setValue(k){this.current=this.target=k,this.setBar()}addValue(k,B,U){return this.target+=k,this.target<0&&(this.target=0),j.Aq$.isDefined(B)?this.speed=B:this.speed=1,this.callback=U,this.target}getValue(){return this.current}getLevel(){return this.currentLevel}setBar(){let k={target:0,text:null,color:null},B={target:0,text:null,color:null},U=1,F=0,G=!0;for(;G;){if(k=this.fillFunction(U),-1===k.target){this.current=this.target,F=1,G=!1;break}if(this.currentthis.currentLevel?(j.Aq$.isDefined(this.onFill)&&this.onFill(U),this.game.add.tween(this.icon,this).to({y:-70},250,j.GS3.Quadratic.Out).to({y:-60},250,j.GS3.Quadratic.In).start()):U=this.pages&&(this.page=this.pages-1),0===this.page?this.up.setInactive():this.up.setActive(),this.page===this.pages-1?this.down.setInactive():this.down.setActive(),this.scroll.y=this.diff*this.page+50,this.scroll.y<50&&(this.scroll.y=50),this.callback(this.page)}}class po extends Ar.H{constructor(k,B,U,F,G,$,H){super(k,B,U,F),this.page=0,this.len=0,this.isVertical=!1,this.bar=null,this.lower=null,this.higher=null,this.slide=null,this.pages=0,this.paging=0,this.inc=0,this.items=0,this.itemsPerPage=0,this.callback=null,this.len=G-100,this.isVertical=$,H&&this.game.broadcaster.addAppListener(oi.Bk.OnMouseWheel,this.onScroll.bind(this),this,"Input",!1),this.isVertical?this.bar=this.add(new Pr.C(this.game,50,0,G,50,q._.Tiled_sprites_json,"slider")):this.bar=this.add(new Pr.C(this.game,0,0,G,50,q._.Tiled_sprites_json,"slider")),this.bar.inputEnabled=!0,this.bar.events.onInputDown.add(this.barClick,this),this.isVertical?(this.lower=K.q.instance.prodigy.create.button(this,50,0,q._.General_core_json,"arrow-btn-back",this.btnClick.bind(this,-1)),this.higher=K.q.instance.prodigy.create.button(this,50,this.len+50,q._.General_core_json,"arrow-btn-next",this.btnClick.bind(this,1))):(this.lower=K.q.instance.prodigy.create.button(this,0,0,q._.General_core_json,"arrow-btn-back",this.btnClick.bind(this,-1)),this.higher=K.q.instance.prodigy.create.button(this,this.len+50,0,q._.General_core_json,"arrow-btn-next",this.btnClick.bind(this,1))),this.lower.setInactive(),this.higher.setInactive(),this.isVertical&&(this.bar.angle=90,this.lower.angle=90,this.higher.angle=90);const V=this.isVertical?new j.M_G(0,50,50,this.len):new j.M_G(50,0,this.len,50);this.slide=this.add(K.q.instance.prodigy.create.sprite(V.x,V.y,q._.General_core_json,"btn-white")),this.slide.anchor.set(this.isVertical?0:.5,this.isVertical?.5:0),this.slide.visible=!1,this.slide.inputEnabled=!0,this.slide.input.enableDrag(),this.slide.input.boundsRect=V,this.slide.events.onDragStop.add(this.onDragStop,this)}getCurrentIndex(){return this.page*this.paging}destroy(k={children:!0}){j.Aq$.isDefined(this.game)&&this.game.broadcaster.removeAppListener(oi.Bk.OnMouseWheel,this,"Input"),super.destroy(k)}reset(k,B,U,F){this.items=k,this.callback=F,j.Aq$.isDefined(B)?this.itemsPerPage=B:this.itemsPerPage=1,this.paging=U<0?this.itemsPerPage:1,U>=0?(this.page=Math.max(0,U-B),this.pages=Math.max(1,this.items-this.itemsPerPage+1)):(this.page=0,this.pages=Math.max(1,Math.ceil(this.items/this.itemsPerPage))),this.inc=this.pages>1?(this.len-50)/(this.pages-1):this.len-50,this.slide.visible=this.pages>1,this.btnClick(0),this.callback(this.page*this.paging)}process(){this.callback(this.page*this.paging)}onDragStop(){let k=0;k=this.isVertical?Math.round((this.slide.y-50-25)/this.inc):Math.round((this.slide.x-50-25)/this.inc),this.btnClick(k-this.page)}barClick(k,B){let U=0;U=this.isVertical?Math.round((B.y-this.bar.world.y-50-25)/this.inc):Math.round((B.x-this.bar.world.x-50-25)/this.inc),this.btnClick(U-this.page)}btnClick(k){const B=this.page;this.page+=k,this.page>this.pages-1&&(this.page=this.pages-1),this.page<0&&(this.page=0),0===this.page?this.lower.setInactive():this.lower.setActive(),this.page===this.pages-1?this.higher.setInactive():this.higher.setActive(),this.isVertical?this.slide.y=75+Math.round(this.inc*this.page):this.slide.x=75+Math.round(this.inc*this.page),B!==this.page&&this.callback(this.page*this.paging)}onScroll(k){j.Aq$.isDefined(this.game)&&this.visible&&this.btnClick(-Math.floor(this.game.input.mouse.wheelDelta))}}class vo extends Ar.H{constructor(k,B,U,F,G,$){super(k,B,U,F),this.callback=null,this.contents=null,this.topIcon=null,this.isActive=!0,this.oldY=null,this.tween=null,this.callback=$,this.contents=K.q.instance.prodigy.create.element(this,0,0);let H=!1;for(let V=0;VZ.setNewIndicatorVisibility(!0))),J.encounters.onPetEncountered(X.ID),Z}character(k,B,U,F,G,j=!1,$=null){const H=Oe.a.fromCharacter(this.game,B);return new jr.v(this.game,k,H,U,F,G,j,$)}player(k,B,U,F,G,j=!1,$=null,H=!1,V=!0){return new jr.v(this.game,k,B,U,F,G,j,$,H,V)}timer(k,B,U,F=!1){return new $r(this.game,k,B,U,F)}houseItem(k,B,U,F,G,j){return new yr._(this.game,k,[new Or.G(this.game,j,B,G)],U,F)}snow(k,B=!1){if(!B&&!Tn.J.isAvgFrameRateAboveThreshold(Vt.s.get("GameConstants.Build.SKIN_FOREGROUND_FPS_THRESHOLD_LIMIT")))return;const U={type:"LINE_ZONE",x1:-200,y1:0,x2:this.game.width,y2:0},F=[new j.d53];or.d.createParticleEmitter(k,1,new j.I9Y(0,0),U,F),or.d.createParticleEmitter(k,2,new j.I9Y(0,0),U,F)}animatedSpineNPC(k,B,U,F,G,$,H,V,W){const q=wr.j.createRenderer(B,F),z=K.q.instance.prodigy.gameContainer.get("c47-20b6"),Y=new yr._(this.game,k,[q,new mr(H),new vr(U)],G,$);if(j.Aq$.isDefined(W)){const k=()=>{q.setInputEnabled(!0),q.getEvents().onInputDown.add((()=>{W(),z.gameWorld.sendNpcClickedEvent({npc_name:null==U?void 0:U.text,npc_type:null==U?void 0:U.npcType})}),q)};j.Aq$.isDefined(q.spine)?k():q.onLoaded.addOnce(k)}return z.gameWorld.sendNpcDiscoveredEvent({npc_name:null==U?void 0:U.text,npc_type:null==U?void 0:U.npcType,x_coord:G,y_coord:$,npc_animation_id:"idle"}),Y}spineNPC(k,B,U,F,G,$,H,V,W=!1,q){const z=K.q.instance.prodigy.gameContainer.get("c47-20b6"),Y=new j._mx;Y.addComponent(j.K16).group.position.set(F,G),k.addChild(Y.legacyTransform.group);const Q=new j._mx(Y);Q.addComponent(j.K16),Q.legacyTransform.group.scale.x=W?-1:1,$&&(Q.name=$.text);const X=Q.addComponent(Wn.v),Z=Q.addComponent(Ir.j);return X.OnLoaded.addOnce((()=>{var k,F,G;Z.playAnimation(U,!0);const W=Q.legacyTransform.group.getLocalBounds();if($){let{x:B,y:U}=$.parent?Y.legacyTransform.group.getGlobalPosition():{x:0,y:0};B+=null!==(k=$.x)&&void 0!==k?k:0,U+=W.y+(null!==(F=$.y)&&void 0!==F?F:-25),this.nameFont(null!==(G=$.parent)&&void 0!==G?G:Y.legacyTransform.group,B,U,$.text)}const K=new j._mx(Q);K.addComponent(j.K16),K.legacyTransform.group.position.set(.5*W.width+W.x,.5*W.height+W.y);const X=K.addComponent(kn.p);X.Width=W.width,X.Height=W.height,X.onClicked.add((()=>{var k;H&&z.gameWorld.sendNpcClickedEvent({npc_name:null!==(k=null==$?void 0:$.text)&&void 0!==k?k:"unknown name",npc_type:H.npcType,npc_id:`${B}`},q),null==V||V()}))})),X.setAsset("number"==typeof B?`spine-${B}`:B),H&&z.gameWorld.sendNpcDiscoveredEvent({npc_name:null==$?void 0:$.text,npc_type:H.npcType,x_coord:H.npcXCoord,y_coord:H.npcYCoord,npc_id:`${B}`,npc_animation_id:U}),Q}timerControl(k,B,U,F,G){return new Cr(this.game,k,B,U,F,G)}nicknamerPedestal(k,B,U,F,G,$){if(!K.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirementsDeprecated(48))return;const H=K.q.instance.prodigy.create.element(F,G,$),V=K.q.instance.prodigy.gameContainer,W=V.get("c47-20b6"),z=V.get("dcf-fcf7"),Y=z.isAvailable(B)?z.getNicknameData(B):[],Q=H.add(K.q.instance.prodigy.create.sprite(0,-100,q._.General_core_2_json,"namer"));0===Y.length?H.alpha=.5:(Q.events.onInputDown.add(K.q.instance.prodigy.open.nicknamer.bind(K.q.instance.prodigy.open,Y,U,B)),Q.inputEnabled=!0);const X=H.add(K.q.instance.prodigy.create.sprite(20,-90,q._.General_core_2_json,"feather"));this.game.add.tween(X,this).to({x:40,y:-98},1500,j.GS3.Linear.None,!0,0,Vt.s.MAX_SAFE_INTEGER,!0),W.gameWorld.sendWorldObjectDiscoveredEvent({object_type:Kn.u_.Nicknamer,x_coord:G,y_coord:$})}notificationBadge(k,B){const U=new Tr.c(this.game).createUIElements(le.t.getItem("ui",97).data.elements,k);return U.find((k=>"badgeNumber"===k.name)).setText(B.toString()),U[0]}}var mo,yo=U(5491),_o=U(93718),Eo=U(34603),wo=U(79009);class To extends j.uAl{constructor(){super(...arguments),this._walkTween=null}get OnAnimationComplete(){return this._walkTween.onTweenComplete}create(){super.create(),this.createWalkTween()}createWalkTween(){this._walkTween=K.q.instance.game.add.tween(this.GameObject.legacyTransform.group,this,!1).to({y:-20},150,j.GS3.Quadratic.Out).to({y:0},150,j.GS3.Quadratic.In)}playAnimation(k,B){"walk"===k?(this._walkTween.killed&&this.createWalkTween(),this._walkTween.loop(B).start()):this.stopAnimation()}stopAnimation(){this._walkTween.killed||this._walkTween.loop(!1)}destroy(){this._walkTween&&(this._walkTween.remove(),this._walkTween=null),super.destroy()}}!function(k){k.default="default",k.reduced="reduced",k.vertical="vertical",k.horizontal="horizontal"}(mo||(mo={}));class So{constructor(){}static Instantiate(k,B,U){const F=new j._mx(B);F.addComponent(j.K16),F.legacyTransform.x=U.offset.x,F.legacyTransform.y=U.offset.y,F.name="sprite appearance";const G=new j._mx(F);G.addComponent(j.K16);const $=G.addComponent(Eo._);$.setAsset(U.assetKey),F.legacyTransform.x-=.5*$.getWidth(),F.legacyTransform.y-=$.getHeight();const H=F.addComponent(j.bE_);return j.Aq$.isDefined(U.hitbox.width)||(U.hitbox.width=$.getWidth()),j.Aq$.isDefined(U.hitbox.height)||(U.hitbox.height=$.getHeight()),H.Container.bind("Hitbox").toConstantValue(U.hitbox),F}}var Ao=U(51315);var Co=U(9831);let Oo=class{constructor(k,B){this._game=k,this._assetLoader=B}create(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){const G=this.getData(B,U,F);return yield this._assetLoader.loadAssets([G.assetKey]),this.selectAppearance(k,G)}))}selectAppearance(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){switch(B.animationType){case Co.V.atlas:return class{constructor(){}static Instantiate(k,B,F){const G=new j._mx(B);G.addComponent(j.K16),G.legacyTransform.x=F.offset.x,G.legacyTransform.y=F.offset.y;const $=new j._mx(G);$.addComponent(j.K16),$.addComponent(Eo._).setAsset(q._.General_pets_json,`${F.buddyTag}/walk/body-0`);const H=$.addComponent(_o.i);H.AtlasKey=F.buddyTag,H.AnimationTargetKey="body",H.setCurrentToBindPose();const V=new j._mx(G);V.addComponent(j.K16),V.legacyTransform.x=2,V.legacyTransform.y=18,V.addComponent(Eo._).setAsset(q._.General_pets_json,`${F.buddyTag}/walk/legs-0`);const W=V.addComponent(_o.i);W.AtlasKey=F.buddyTag,W.AnimationTargetKey="legs",W.setCurrentToBindPose(),G.legacyTransform.x-=.5*G.legacyTransform.width,G.legacyTransform.y-=G.legacyTransform.height;const K=G.addComponent(j.bE_);j.Aq$.isDefined(F.hitbox.width)||(F.hitbox.width=G.legacyTransform.width),j.Aq$.isDefined(F.hitbox.height)||(F.hitbox.height=G.legacyTransform.height),K.Container.bind("Hitbox").toConstantValue(F.hitbox),K.Container.bind("AnimationData").toConstantValue(new wo.F(U(73792)));const z=G.addComponent(j.Fid);return z.Identifier="Animators",z.Components=[H,W],G}}.Instantiate(this._game,k,B);case Co.V.spine:return class{constructor(){}static Instantiate(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const k=new j._mx(B);k.name="spine appearance",k.addComponent(j.K16),k.legacyTransform.x=U.offset.x,k.legacyTransform.y=U.offset.y;const F=k.addComponent(Wn.v),G=new Promise((k=>{F.OnLoaded.addOnce(k)}));F.setAsset(U.assetKey);const $=k.addComponent(j.bE_),H=k.addComponent(j.Fid);return H.Identifier="Animators",H.Components=[k.addComponent(Ir.j)],yield G,j.Aq$.isDefined(U.hitbox.width)||(U.hitbox.width=F.getSpine().width),j.Aq$.isDefined(U.hitbox.height)||(U.hitbox.height=F.getSpine().height),$.Container.bind("Hitbox").toConstantValue(U.hitbox),k}))}}.Instantiate(this._game,k,B);case Co.V.singleImage:return class{constructor(){}static Instantiate(k,B,U){const F=So.Instantiate(k,B,U);F.name="dorm appearance";const G=F.addComponent(j.Fid);G.Identifier="Animators";const $=F.findComponentInChildren(Eo._).GameObject.addComponent(To);return G.Components=[$],F}}.Instantiate(this._game,k,B);case Co.V.spriteSheet:return class{constructor(){}static Instantiate(k,B,U){const F=So.Instantiate(k,B,U);F.name="spritesheet appearance";const G=F.addComponent(j.Fid);G.Identifier="Animators";const $=F.findComponentInChildren(Eo._).GameObject.addComponent(Ao.K);return G.Components=[$],F}}.Instantiate(this._game,k,B);default:return void j.VyI.log(`Bad anim type ${B.animationType}`,j.$bb.Error)}}))}getData(k,B,U){var F,G,$,H;const V=le.t.getItem(k,B),W=V.metadata.assets;let q=U;if(!j.Aq$.isDefined(q))switch(k){case yo.V.Follow:case yo.V.Pet:q=mo.default;break;case yo.V.Dorm:q=mo.vertical;break;default:j.VyI.log(`Bad marble transform type: ${k}`,j.$bb.Error)}const K=null==W?void 0:W[q],z={x:0,y:0};(null==K?void 0:K.rootOffset)&&(z.x=j.Aq$.isDefined(K.rootOffset.x)?K.rootOffset.x:0,z.y=j.Aq$.isDefined(K.rootOffset.y)?K.rootOffset.y:0);const Y={xOffset:0,yOffset:0,width:null,height:null};(null==K?void 0:K.hitbox)&&(Y.xOffset=j.Aq$.isDefined(K.hitbox.xOffset)?K.hitbox.xOffset:0,Y.yOffset=j.Aq$.isDefined(K.hitbox.yOffset)?K.hitbox.yOffset:0,Y.width=K.hitbox.width,Y.height=K.hitbox.height);const Q={type:k,ID:B,size:q,offset:z,hitbox:Y,animationType:null!==(F=null==K?void 0:K.type)&&void 0!==F?F:Co.V.spine,assetKey:null,buddyTag:V.data.tag};return Q.assetKey=this.getAssetKeys(Q,null==K?void 0:K.ID,null!==(G=V.metadata.guid)&&void 0!==G?G:J.Q[null===(H=null===($=V.metadata.assets)||void 0===$?void 0:$.default)||void 0===H?void 0:H.assetKey]),Q}getAssetKeys(k,B,U){if(U)return U;switch(k.animationType){case Co.V.atlas:return q._.General_pets_json;case Co.V.spine:return`spine-${B}`;case Co.V.singleImage:case Co.V.spriteSheet:return`${k.size}-${k.type}-${k.ID}`;default:return void j.VyI.log(`Bad anim type ${k.animationType}`,j.$bb.Error)}}};Oo=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)("51c-03a0")),(0,G.Qj)(1,(0,tt.inject)(j.t5G.AssetLoader)),(0,G.Sn)("design:paramtypes",[an.n,Object])],Oo);class Io{constructor(k){this.game=null,this.game=k}create(){return this._dialogueController.close(),this._dialogueController}}(0,G.Cg)([(0,Re.b)("b5b-6fa4"),(0,G.Sn)("design:type",Ca.Z)],Io.prototype,"_dialogueController",void 0);var Do=U(96216);class Ro{constructor(k,B){this.game=null,this.ID=0,this.npc=null,this.dialogue=[],this.events=[],this.game=k,this.ID=B,this.end()}start(){this.text(),this.next()}end(k=null){null==k||k(),this.npc=null,this.dialogue=[],this.events=[]}next(){if(this.events.length>0){const k=this.events[0];this.events.splice(0,1),k()}else this.end()}add(k){this.text(),this.events.push(k)}text(k,B,U){if(!j.Aq$.isDefined(k)&&0===this.dialogue.length)return;const F=K.q.instance.prodigy.dialogue.create();if(this.dialogue.length>0&&(B!==this.npc||!j.Aq$.isDefined(k))){const k=(k,B,G)=>{for(let U=0;U{k(),B()}).bind(this,this.next.bind(this)))}animation(k,B=!1){this.add((()=>{B?k().onTweenComplete.add(this.next.bind(this)):(k(),this.next())}).bind(this))}enableInput(k){this._inputEnabled=k,this.add((()=>{if(this.game.input.enabled=k,!k)for(let k=0;k{K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.saveEnabled=k,this.next()}).bind(this))}set(k,B,U){this.add((()=>{k[B]=U,this.next()}))}path(k,B,U,F=!1){this.add((()=>{F?(k.setPath(B,null,U),this.next()):k.setPath(B,this.next.bind(this),U)}).bind(this))}validPath(k,B,U,F,G=!1){this.add((G=>{G?(k.setValidPath(B,U,F,null),this.next()):k.setValidPath(B,U,F,this.next.bind(this))}).bind(this,G))}hop(k,B,U,F,G=!1){this.add((()=>{G?(k.hop(B,null,U,F),this.next()):k.hop(B,this.next.bind(this),U,F)}).bind(this))}delay(k){this.add(this.game.time.events.addTimer.bind(this.game.time.events,k,this.next,this))}explode(k,B,U,F,G,j=!1,$=!1){this.add((()=>{j?(K.q.instance.prodigy.effects.explode(k,B,U,F,G,null,$),this.next()):K.q.instance.prodigy.effects.explode(k,B,U,F,G,this.next.bind(this),$)}).bind(this))}fire(k,B,U,F,G,j,$=!1){this.add((()=>{$?(K.q.instance.prodigy.effects.fire(k,B,U,F,G,j),this.next()):K.q.instance.prodigy.effects.fire(k,B,U,F,G,j,this.next.bind(this))}).bind(this))}shake(k,B,U,F,G=!1){this.add((()=>{G?(K.q.instance.prodigy.effects.shake(k,B,U,F),this.next()):K.q.instance.prodigy.effects.shake(k,B,U,F,this.next.bind(this))}).bind(this))}sound(k,B,U=!1){if(U)this.add(K.q.instance.prodigy.audio.playSFX.bind(K.q.instance.prodigy.audio,k,B,this.next.bind(this)));else{const U=()=>{K.q.instance.prodigy.audio.playSFX(k,B),this.next()};this.add(U)}}bgm(k){this.add((()=>{j.Aq$.isDefined(k)?(K.q.instance.prodigy.audio.playBGM(k,!0),K.q.instance.prodigy.audio.resumeBGM()):K.q.instance.prodigy.audio.pauseBGM(),this.next()}).bind(this))}tween(k,B,U,F,G){this.add((()=>{const j=this.game.add.tween(k,this).to(B,U,F);G?this.next():j.onTweenComplete.add(this.next.bind(this)),j.start()}).bind(this))}cameraFlash(){this.add((()=>{const k=K.q.instance.prodigy.create.group();k.addChild(new Pr.C(this.game,0,0,K.q.instance.game.width,K.q.instance.game.height,q._.Tiled_sprites_json,"overlay-light")),k.alpha=0,K.q.instance.prodigy.audio.playSFX(20,"camera");const B=this.game.add.tween(k,this).to({alpha:1},150,j.GS3.Linear.None).to({alpha:0},150,j.GS3.Linear.None);B.onTweenComplete.add((()=>{k.destroy(),this.set(k,"visible",!1),this.next()})),B.start()}).bind(this))}reward(k,B){j.Aq$.isDefined(k)&&k.length>0&&this.add(K.q.instance.prodigy.open.gotItem.bind(K.q.instance.prodigy.open,k,this.next.bind(this),null,B))}popup(k){this.add(K.q.instance.prodigy.open.message.bind(K.q.instance.prodigy.open,k,this.next.bind(this)))}functionCallback(k){this.add((()=>{k(this.next.bind(this))}).bind(this))}}class Po{constructor(k){this.game=null,this.eventID=0,this.game=k}create(){return this.eventID++,new Ro(this.game,this.eventID)}}var Mo=U(60881),No=U(84938),xo=U(96494),Lo=U(76599),ko=U(325);let Bo=class{constructor(){this.addAuthorizationHeader=null,this.addAccessTokenHeader=null,this.addAccessTokenBody=null,this._loginPromise=new j.bnh}get userID(){return this._userID}get accessToken(){return this._accessToken}get loginPromise(){return this._loginPromise}setAuthorizationData(k,B){this._userID=k,this.setAuthorizationToken(B)}setAuthorizationToken(k){if(this._accessToken=k,k){this.createAuthorizationHeaderClosure(k),this.createAccessTokenHeaderClosure(k),this.createAccessTokenBodyClosure(k);K.q.instance.prodigy.gameContainer.get("00d-b27e").setToken("identityToken",k,!1,!1),this._loginPromise.resolve()}}createAuthorizationHeaderClosure(k){(()=>{const B=k;this.addAuthorizationHeader=k=>{k.setHeader("Authorization",`Bearer ${B}`)}})()}createAccessTokenHeaderClosure(k){(()=>{const B=k;this.addAccessTokenHeader=k=>{k.setHeader("identityToken",B)}})()}createAccessTokenBodyClosure(k){(()=>{const B=k;this.addAccessTokenBody=k=>{switch(k.getMethod()){case j.iXQ.Get:k.setQueryParameter("identityToken",B);break;case j.iXQ.Head:break;default:let U=k.getBody();U||(U=new te.c,k.setBody(U)),U.setJson(Object.assign(Object.assign({},U.getJson()),{identityToken:B}))}}})()}isLoggedIn(){return null!==this.addAuthorizationHeader}authenticateRequest(k){if(!this.isLoggedIn())throw new Error("Attempting to authenticate with Identity when not logged in.");k.setHeader("userID",`${this._userID}`),this.addAuthorizationHeader(k)}logout(){this.addAuthorizationHeader=null,this.addAccessTokenHeader=null,this.addAccessTokenBody=null}addValuesToHeader(k){if(!this.isLoggedIn())throw new Error("Attempting to add access token with Identity when not logged in.");this.addAccessTokenHeader(k)}addValuesToBody(k){if(!this.isLoggedIn())throw new Error("Attempting to add access token with Identity when not logged in.");this.addAccessTokenBody(k)}};function Uo(k){return void 0!==k.showQuestion}Bo=(0,G.Cg)([(0,tt.injectable)()],Bo);class Fo{get isQuestionInterfaceOpen(){return this._isQuestionInterfaceOpen}constructor(k){this._staticQuestionList=[{skillId:392,questionId:18171},{skillId:392,questionId:18204},{skillId:436,questionId:20103},{skillId:436,questionId:20120},{skillId:1204,questionId:56219},{skillId:1204,questionId:56231},{skillId:1274,questionId:59834},{skillId:1274,questionId:59865},{skillId:224,questionId:10194},{skillId:224,questionId:10224}],this.isNew=!1,this.game=null,this.rankUpArray=null,this.game=k,this.st=K.q.instance.prodigy.gameContainer.get("c97-bd0d"),this.onQuestionAnswered=new j.HN0,this.onQuestionInterfaceOpened=new j.HN0,this.onQuestionInterfaceClosed=new j.HN0,this._isQuestionInterfaceOpen=!1,this._areSoundsLoaded=!1,this._answerCallback=null,this._answerData=null,this._synapse.onNotificationReceived.add(this.handleEducationSynapseNotification,this)}get shouldShowStaticQuestions(){return!1}openFull(){this.game.stage.visible=!1}closeFull(){this.game.stage.visible=!0}showMathQuestion(k,B,U){var F,G,$,H,V,W,q;K.q.instance.prodigy.gameContainer.get("11d-01b8").setView("question-interface");const z=null!=U?U:{};this._isQuestionInterfaceOpen=!0,this.onQuestionInterfaceOpened.dispatch(),this.st.stopInactiveTimer(),this.game.input.keyboard.clearCaptures(),this.reduceBGMVolumeBeforeQuestion();let Y=1;j.Aq$.isDefined(z.forceAnswerBonus)&&(Y=z.forceAnswerBonus?1:0);const Q=null!==(F=z.allowTutorials)&&void 0!==F&&F,X={selector:"#external-content",userID:this._playerDataProvider.player.userID,callback:this.answerQuestion.bind(this,B),classIDs:this._playerDataProvider.player.classIDs,volume:No.B.effectVolume.value,isTeacher:!1,hideCallback:this.openFull.bind(this),showAnswerBonus:Y,showAnswerBonusAnimation:0,showTutorial:Q,canInstantWin:null!==(G=z.canInstantWin)&&void 0!==G&&G,numQuestions:0,instantWinDialogueCallback:null,showProgressBarOnQuestionComplete:!1,progressBarFrom:0,progressBarTo:0,isUserInBattle:null===($=z.isUserInBattle)||void 0===$||$,isBattleRevampExperiment:null===(H=z.revampBattleOverride)||void 0===H||H,disableLock:null!==(V=z.disableLock)&&void 0!==V&&V,sessionUuid:this._uuidProvider.getUUID(),showTopicBadgeAnimations:null===(W=z.showTopicBadgeAnimations)||void 0===W||W};if(this.shouldShowStaticQuestions){const B=null!==(q=this._playerDataProvider.player.getPlayerData().qiStaticQuestionIndex)&&void 0!==q?q:0,U=this._staticQuestionList[B];return this._playerDataProvider.player.getPlayerData().qiStaticQuestionIndex=B>=this._staticQuestionList.length-1?0:B+1,this._playerDataProvider.player.updated=!0,void k.showGameChallenge(Object.assign(Object.assign(Object.assign({},X),U),{disableLock:!0,scenarioId:1}))}k.showQuestion(X)}showELAQuestion(k,B){this._isQuestionInterfaceOpen||(this._isQuestionInterfaceOpen=!0,this.onQuestionInterfaceOpened.dispatch(),this._areSoundsLoaded=!1,K.q.instance.prodigy.load.assets([Z.c.Sfx_qi_button_default,Z.c.Sfx_qi_button_disabled,Z.c.Sfx_qi_positive_action,Z.c.Sfx_qi_negative_action],((k,B)=>{this._areSoundsLoaded=B})),this.st.stopInactiveTimer(),this.game.input.keyboard.clearCaptures(),this.reduceBGMVolumeBeforeQuestion(),k.open({onClose:this.elaQuestionInterfaceClosedCallback.bind(this),onAnswer:this.answerElaQuestion.bind(this,B),answerLimit:1,preventAbruptClose:!0}))}playSound(k){this._areSoundsLoaded&&K.q.instance.prodigy.audio.playSFXFromGUID(k,void 0,void 0,void 0,!1)}elaQuestionInterfaceClosedCallback(){this._answerData||(this._answerData=this.createEmptyAnswerSchema(),this._answerData.wasCorrect=!1),this.answerQuestion(this._answerCallback,this._answerData),this._isQuestionInterfaceOpen=!1,this.onQuestionInterfaceClosed.dispatch(),this.st.startInactiveTimer(),this.restoreBGMVolumeAfterQuestion(),this.game.input.keyboard.addKeyCapture([Mo.D.BACKSPACE])}question(k,B){this._answerCallback=null!=k?k:null,this._answerData=null,Uo(QI)?this.showMathQuestion(QI,k,B):this.showELAQuestion(QI,k)}updateStrandBasedPlacementTest(k){j.VyI.log("updateStrandBasedPlacementTest",j.$bb.Verbose),j.VyI.log(JSON.stringify(k),j.$bb.Verbose),this.st.updateStrandBasedPlacementTest(k).catch(j.RQr.createHandler("Error updating strand-based placement test"))}createEmptyAnswerSchema(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return{wasCorrect:!1,respTime:0,nFactor:0,awardPrize:!1,awardInstantWin:!1,isMember:k.hasMembership(),playLocation:k.locationSelectionType,sessionID:this._uuidProvider.getUUID(),chances:[],numQuestions:0,skillID:0,currentTheta:0,hwID:0,type:Lo.w.DEFAULT,questionID:0,questionType:void 0}}answerElaQuestion(k,B){const U=this.createEmptyAnswerSchema();U.wasCorrect=B.wasCorrect,this._answerCallback=k,this._answerData=U}answerQuestion(k,B){j.Aq$.isDefined(B.dontSendToAnswersPipeline)&&B.dontSendToAnswersPipeline||this.shouldShowStaticQuestions||!Uo(QI)||this.st.answerQuestion(B).catch(j.RQr.createHandler("Error answering question"));const U={ID:B.skillID,theta:B.currentTheta};if(B.numQuestions>=1)B.numQuestions--,this.question(k,{forceAnswerBonus:!1,energyCost:0,allowTutorials:!1}),j.VyI.log(`calling next question, ${B.numQuestions} remain`,j.$bb.Verbose);else{this._isQuestionInterfaceOpen=!1,this.onQuestionInterfaceClosed.dispatch(),this.st.startInactiveTimer(),this.restoreBGMVolumeAfterQuestion(),this.game.input.keyboard.addKeyCapture([Mo.D.BACKSPACE]),this.closeFull();K.q.instance.prodigy.gameContainer.get("11d-01b8").setView("game"),this._playerDataProvider.player.onQuestionAnswered(B),j.Aq$.isDefined(k)&&k(B.wasCorrect,B.respTime,B.nFactor,B.awardPrize,B.awardInstantWin,U)}this.onQuestionAnswered.dispatch(B.wasCorrect,B)}reduceBGMVolumeBeforeQuestion(){this._questionVolumeToken||(this._questionVolumeToken=No.B.musicVolume.addSmoothedLensMultiplier(.05))}restoreBGMVolumeAfterQuestion(){this._questionVolumeToken&&(this._questionVolumeToken.remove(),this._questionVolumeToken=void 0)}initializeMathQI(k,B){this._playerDataProvider.player.grade=j.Aq$.isDefined(k.chosenGrade)?k.chosenGrade:void 0,j.Aq$.isDefined(k.curriculumTreeID)&&(this._playerDataProvider.player.curriculumTreeID=k.curriculumTreeID),this.shouldShowStaticQuestions||(B.on("assignment-complete",this.finishAssignment.bind(this)),B.on("update-user",this.updateUser.bind(this)),B.on("grade-complete",this.finishGrade.bind(this)),B.on("placement-complete",this.finishPlacement.bind(this)),B.on("placement-test-by-strand-update placement-test-by-strand-complete",this.updateStrandBasedPlacementTest.bind(this)),B.on("update-plan-student",this.updatePlanStudent.bind(this)),B.on("topics-ranked-up",this.updateBreadcrumbs.bind(this))),B.on("video-start",(()=>{K.q.instance.prodigy.audio.pauseBGM()})),B.on("video-stop",(()=>{K.q.instance.prodigy.audio.resumeBGM()})),B.on("get-video-lesson-urls",this.getVideoLessonSignedUrls.bind(this)),B.initWithConfig({studentData:k})}initializeELAQI(k,B){const U=this._subjectProvider.getSubject()===ko.Q.ELA?"ELA":"SCIENCE";B.config({subject:U,authProvider:()=>{const k=K.q.instance.prodigy.gameContainer.get("330-3c25");return{userId:this._identityAuthProvider.userID,identityToken:this._identityAuthProvider.accessToken,gameJwt:k.getToken()}},playerProvider:()=>{const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return{isMember:k.hasMembership(),playLocation:k.locationSelectionType}},gameProvider:()=>({gameTheme:"RPG",sessionUuid:this._uuidProvider.getUUID(),onPlayDefaultButtonSound:this.playSound.bind(this,Z.c.Sfx_qi_button_default),onPlayDisabledButtonSound:this.playSound.bind(this,Z.c.Sfx_qi_button_disabled),onPlayPositiveActionSound:this.playSound.bind(this,Z.c.Sfx_qi_positive_action),onPlayNegativeActionSound:this.playSound.bind(this,Z.c.Sfx_qi_negative_action)})})}initialize(k){Uo(QI)?this.initializeMathQI(k,QI):this.initializeELAQI(k,QI)}loadAndInitEducationData(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=K.q.instance.prodigy.gameContainer.get("c97-bd0d");this._isQuestionInterfaceOpen&&(yield this.onQuestionInterfaceClosed.asPromise());try{const F=yield U.loadEducation(B.userID),G=Object.assign(Object.assign({},F),{goalId:B.goalId,grade:null!==(k=F.grade)&&void 0!==k?k:F.chosenGrade});B.onEducationLoaded(G),B.setEducation(G.chosenGrade,G.curriculumTreeID),B.initEducation(),B.updated=!0}catch(F){throw j.RQr.logError(F,"Error loading and initializing education data"),F}}))}getStudentData(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G,j,$,H,V;if(Uo(QI))return QI.fetchStudentData({identityToken:this._identityAuthProvider.accessToken,userId:k});this._subjectProvider.getSubject();const W=yield this.st.fetchStudentData(ko.Q.Math);return{userID:k,chosenGrade:(null===(U=null===(B=W.player)||void 0===B?void 0:B.chosenGrade)||void 0===U?void 0:U.chosenGradeNumber)||void 0,grade:(null===(G=null===(F=W.player)||void 0===F?void 0:F.grade)||void 0===G?void 0:G.gradeNumber)||void 0,curriculumTreeID:(null===($=null===(j=W.player)||void 0===j?void 0:j.curriculum)||void 0===$?void 0:$.id)||void 0,goalId:(null===(V=null===(H=W.player)||void 0===H?void 0:H.grade)||void 0===V?void 0:V.gradeNumber)||void 0}}))}processAnswerResponses(){Uo(QI)&&j.Aq$.isDefined(QI.processAnswerResponses)&&QI.processAnswerResponses()}getMasteredSkills(){return Uo(QI)?QI.getMasteredSkills():0}getAllTopicBadges(){return Uo(QI)?QI.getAllTopicBadges():[]}getRankUpBadges(){return this.rankUpArray}updateUser(k){if(!k.usesGraphQLPlacementTestCompleteMutation){const B=k;j.Aq$.isDefined(B.grade)&&"number"==typeof B.grade?this.st.updatePlayerGrade(B).catch((k=>Tn.J.logUpdateUserFailed())):Tn.J.logUpdateUserFailed(2)}}getVideoLessonSignedUrls(k){if(!Uo(QI))return void j.VyI.log("Cannot fetch video lesson URLs for non-math QI.",j.$bb.Error);this.st.getVideoLessonSignedUrls(k.videoURL,k.captionsURL,(k=>{QI.trigger("video-lesson-urls-fetch-success",k)}),(()=>{QI.trigger("video-lesson-urls-fetch-failure"),j.VyI.log("Fetching signed video lesson URLs for user failed.",j.$bb.Error)}))}updatePlanStudent(k){this.st.updatePlanStudent(k)}updateBreadcrumbs(k){if(this.rankUpArray=k,Uo(QI)&&j.Aq$.isDefined(this.rankUpArray)&&this.rankUpArray.length>0)for(let B=0;Bk.id===this.rankUpArray[B].collectionId));for(let U=0;U=k.topics[U].ranks[k.topics[U].ranks.length-1]&&this._breadcrumbManager.resetBreadcrumbs(ln.B.FEATURE_BADGES)}}finishPlacement(k){this.st.finishPlacement(Object.assign(Object.assign({},k),{grade:parseInt(k.grade,10)})).catch(j.RQr.createHandler("Error finishing placement test"))}finishAssignment(k){this.st.completeAssignment(k.assignmentID)}finishGrade(k){}isVideoLessonActive(){return!!Uo(QI)&&j.Aq$.isDefined(QI.createVideoLessonForSkillWithOptions)}getAvailableLessonReport(){return Uo(QI)?QI.getAvailableLessonReport():[]}createVideoLesson(k,B){return Uo(QI)?QI.createVideoLessonForSkillWithOptions(k,B):null}enableLogging(){Uo(QI)&&QI.enableLogging()}disableLogging(){Uo(QI)&&j.Aq$.isDefined(QI.disableLogging)&&QI.disableLogging()}showGameChallenge(k,B=1,U=0,F=!1,G=66,j=33,$,H=!1){if(!Uo(QI))return;const V={selector:"#external-content",userID:this._playerDataProvider.player.userID,callback:this.answerQuestion.bind(this,$),classIDs:this._playerDataProvider.player.classIDs,volume:No.B.effectVolume.value,isTeacher:!1,hideCallback:this.openFull.bind(this),showAnswerBonus:0,showAnswerBonusAnimation:0,showTutorial:!1,skillId:k,scenarioId:B,numQuestions:U,canInstantWin:!1,showProgressBarOnQuestionComplete:F,progressBarFrom:G,progressBarTo:j,isUserInBattle:!1,disableLock:H,sessionUuid:this._uuidProvider.getUUID()};this.reduceBGMVolumeBeforeQuestion(),QI.showGameChallenge(V)}showProgressBar(k,B){Uo(QI)&&QI.showProgress(k,B)}showBannerComplete(){Uo(QI)&&QI.bannerComplete()}doesSkillIDHaveLesson(k){return!!Uo(QI)&&QI.doesSkillIDHaveLesson(k)}getEducationSystemAPI(){return Uo(QI)?QI.EducationSystemAPI:null}handleEducationSynapseNotification(k){switch(k.type){case Be.m.ReloadEducationData:K.q.instance.prodigy.education.loadAndInitEducationData().catch(j.RQr.createHandler("SplashScreen: Error reloading education data"))}}}(0,G.Cg)([(0,Re.b)("e20-0fb0"),(0,G.Sn)("design:type",Wt.E)],Fo.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,Re.b)("2e6-0f71"),(0,G.Sn)("design:type",on.H)],Fo.prototype,"_uuidProvider",void 0),(0,G.Cg)([(0,Re.b)("12f-4e29"),(0,G.Sn)("design:type",xo.F)],Fo.prototype,"_breadcrumbManager",void 0),(0,G.Cg)([(0,Re.b)("40f-f847"),(0,G.Sn)("design:type",Bo)],Fo.prototype,"_identityAuthProvider",void 0),(0,G.Cg)([(0,Re.b)("f1d-f7b1"),(0,G.Sn)("design:type",Qt.W)],Fo.prototype,"_subjectProvider",void 0),(0,G.Cg)([(0,Re.b)("779-a746"),(0,G.Sn)("design:type",Ue.d)],Fo.prototype,"_synapse",void 0);var Go=U(8770),jo=U(83267),$o=U(17002);class Ho extends Ar.H{constructor(k,B,U,F,G,j,$,H){super(k,B,U,F),this.sprite=K.q.instance.prodigy.create.sprite(0,0,G,0),this.sprite.inputEnabled=!0,this.sprite.events.onInputDown.add(this.onClicked,this),this.add(this.sprite),this.callback=H,this.font=K.q.instance.prodigy.create.font(this,0,60,"",{size:20,width:100,align:"left"}),this.icon=K.q.instance.prodigy.create.font(this,0,0,"@",{size:16}),this.icon.alpha=0,this.add(this.icon),this.visible=!1,this.setValue(G,j,$)}setValue(k,B,U){if(U<=0||!j.Aq$.isDefined(U))return this.visible=!1,this.icon.alpha=0,void this.font.setText("");this.visible=!0,j.Aq$.isDefined(k)&&j.Aq$.isDefined(this.sprite.key)&&this.sprite.loadNewTexture(k,B),j.Aq$.isDefined(B)&&(this.sprite.frameName=B),this.font.setText(j.Aq$.isDefined(U)&&U>1?`${U}`:"")}setCallback(k){this.callback=k}onClicked(){j.Aq$.isDefined(this.callback)&&this.callback()}centerAnchor(){this.sprite.anchor.set(.5,.5)}}var Vo=U(571);class Wo{constructor(k){this.game=k}createIcon(k,B,U,F=null,G,j,$,H=!0){return pn.K.cacheAsset(this.game,U,pn.K.zoneAssetsCached),new ur.k(this.game,k,B,U,null,F,G,j,$,H)}gold(k,B,U,F,G,j){return this.createIcon(k,B,Ut.E.getIconForType("currency",1),U,F,G,j)}createFromData(k,B,U,F=null,G,$,H,V){let W;if("gold"===k.type)return this.gold(B,U,F,G,$,H);if("hairColor"===k.type)return W=K.q.instance.prodigy.create.sprite(B,U,q._.General_icons_json,this.iconKey(k),F,G,$,H),W.tint=Go.TZ.rgbToHex(k.data.colors[2][0],k.data.colors[2][1],k.data.colors[2][2]),W;if("eyeColor"===k.type)return W=K.q.instance.prodigy.create.sprite(B,U,q._.General_icons_json,this.iconKey(k),F,G,$,H),W.tint=Go.TZ.rgbArrayToHex(k.data.colors[0]),W;if("skinColor"===k.type)return W=K.q.instance.prodigy.create.sprite(B,U,q._.General_icons_json,this.iconKey(k),F,G,$,H),W.tint=Go.TZ.rgbArrayToHex(k.data.colors[1]),W;if("hair"===k.type){const F=this.iconKey(k),j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.appearance.getHair().color;return W=K.q.instance.prodigy.create.sprite(B,U),K.q.instance.prodigy.colorReplaceController.checkColorAsset(F,[{color:j,itemColor:"hairColor"}],2,(k=>{const B=`${F}-${j}`,U=K.q.instance.prodigy.create.sprite(0,0,B);U.loadTexture(B),W.addChild(U),U.anchor.set(.5,.5),G&&G(W)})),W}return j.Aq$.isDefined(k.type)&&j.Aq$.isDefined(k.ID)?this.createIcon(B,U,this.iconKey(k),F,G,$,H,V):K.q.instance.prodigy.create.sprite(0,0,le.t.getIconAtlas(k),Tn.J.convertItemToIcon(k))}createFromDataAdvanced(k,B,U,F,$,H,V,W){return(0,G.sH)(this,void 0,void 0,(function*(){const G=K.q.instance.prodigy.create.element(B,U,F),z=null!=H?H:B.width-2*U,Y=null!=V?V:B.height-2*F;let Q;const X=new Promise((k=>{Q=k}));let Z=null;const tt=$?new j.I9Y(.5,1):null;if("gold"===k.type)Z=this.gold(0,0,$,Q,H,V);else if("hairColor"===k.type)Z=K.q.instance.prodigy.create.sprite(0,0,q._.General_icons_json,this.iconKey(k),tt,Q,H,V),Z.tint=Go.TZ.rgbToHex(k.data.colors[2][0],k.data.colors[2][1],k.data.colors[2][2]);else if("eyeColor"===k.type)Z=K.q.instance.prodigy.create.sprite(0,0,q._.General_icons_json,this.iconKey(k),tt,Q,H,V),Z.tint=Go.TZ.rgbArrayToHex(k.data.colors[0]);else if("skinColor"===k.type)Z=K.q.instance.prodigy.create.sprite(0,0,q._.General_icons_json,this.iconKey(k),tt,Q,H,V),Z.tint=Go.TZ.rgbArrayToHex(k.data.colors[1]);else if("mathTownInterior"===k.type)Z=K.q.instance.prodigy.create.sprite(-20,0,q._.Towertown_interiors_store_json,this.iconKey(k),tt,Q,H,V);else if("mathTownFrame"===k.type)Z=K.q.instance.prodigy.create.sprite(-20,15,q._.Towertown_frames_store_json,this.iconKey(k),tt,Q,H,V);else if("mathTownDecor"===k.type)Z=this.createIcon(0,0,this.iconKey(k),$,Q,H,V,W);else if("costume"===k.type){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0");Z=yield Vo.z.createFullBodyFromAppearanceData(Object.assign(Object.assign({},k.getAppearance()),{weapon:null,follow:null}),jo.E.createMockPlayerDataProvider(!1)),$o.f.resizeSpriteMaintainingAspectRatio(Z,z,Y),Z.anchor.set(.5,.5),Z.position.set(z/2,Y/2),null==Q||Q()}else Z=j.Aq$.isDefined(k.type)&&j.Aq$.isDefined(k.ID)?this.createIcon(0,0,this.iconKey(k),$,Q,H,V,W):K.q.instance.prodigy.create.sprite(0,0,le.t.getIconAtlas(k),Tn.J.convertItemToIcon(k));if(yield X,G.add(Z),"item"===k.type){const B=le.t.getItem(k.type,k.ID).data;if(j.Aq$.isDefined(B.effect)&&j.Aq$.isDefined(B.effect.transform)){const k=wr.j.createRenderer(J.Q.Spine_morph_marble_icon_json,{type:"spine",anchor:{x:.5,y:.5}});new yr._(this.game,Z,[k]),k.playAnimation("mini",!0)}}return[G,Z]}))}createWithQuantity(k,B,U,F,G,j){return new Ho(this.game,k,B,U,F,null,G,j)}iconKey(k){if("gold"===k.type)return Ut.E.getIconForType("item",26);if("hairColor"===k.type||"skinColor"===k.type||"eyeColor"===k.type)return"empty";if("mathTownInterior"===k.type||"mathTownFrame"===k.type||"mathTowerOrnament"===k.type)return k.data.tag;if("mathTownDecor"===k.type)return`${k.data.tag}-icon`;if("item"===k.type){const B=le.t.getItem(k.type,k.ID);if(!B)return j.VyI.log(`No item found for type - ${k.type}, ID - ${k.ID}`,j.$bb.Error),"empty";{const k=B.data;if(j.Aq$.isDefined(k.effect)&&j.Aq$.isDefined(k.effect.transform))return Ut.E.getIconForType(k.effect.transform,k.effect.ID)}}return Ut.E.getIconForType(k.type,k.ID)}}var qo,Ko=U(88225),zo=U(49569),Yo=U(64270),Qo=U(90156),Xo=U(80003),Zo=U(32389),Jo=U(66207),th=U(63343),eh=U(77992),ih=U(55301),sh=U(72772),nh=U(11848),ah=U(82351),rh=U(223),oh=U(50788),hh=U(37016),ch=U(96989),dh=U(60157);!function(k){k[k.None=0]="None",k[k.AtSchool=1]="AtSchool",k[k.Standard=2]="Standard",k[k.UltraFocussed=3]="UltraFocussed"}(qo||(qo={}));var lh,uh=U(48199),fh=U(77065),bh=U(215),ph=U(46784),vh=U(85515),gh=U(87821),mh=U(21738),yh=U(642),_h=U(16847),Eh=U(22023),wh=U(19690),Th=U(37773),Sh=U(97317),Ah=U(17148),Ch=U(99979),Oh=U(12472);!function(k){k[k.Disabled=0]="Disabled",k[k.Merge=1]="Merge",k[k.MagicoinMerge=2]="MagicoinMerge",k[k.MembershipUpsell=3]="MembershipUpsell",k[k.OtpUpsell=4]="OtpUpsell"}(lh||(lh={}));class Ih extends mh.y{constructor(k,B,U){const F=(0,Dt.G)(oh.J);super(K.q.instance.game,k,F?Ei.l.PetMerge2Modal:Ei.l.PetMergeModal,B,!0),this._showPetMergeDrawer=new j.HN0,this._hidePetMergeDrawer=new j.HN0,this._resetPetMergeDrawerScroll=new j.HN0,this._selectedIngredientSlotIndex=-1,this._onSelectedIngredientsChanged=new j.HN0,this._mergeButtonMode=lh.Merge,this._upsellModalType=qo.None,this.onPetMergeSuccess=new j.HN0,this._petMerge2Enabled=!1,this._isInFTUE=!1,K.q.instance.prodigy.load.assets([ah.B.Sfx_pet_merge_beam_effect,ah.B.Voice_noot_merge_ready_to_merge]),this.isModal=!1,this.skipRenderTransparencyLayer=!1,this._mergeTarget=U,this._petItem=le.t.getItem("pet",this._mergeTarget.ID),this._petMerge2Enabled=F,this._injectablePropertiesDictionary=this.getMergeModalData();const G=K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED);this._isInFTUE=!G&&K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_STARTED),this.onPrefabLoaded.addOnce((()=>{var k,B;const U=j.wa5.getActiveScene().container;if(this._petMerge2Enabled){const F=this._isInFTUE&&!G;this._ingredientWidget=U.get(tr.OA.IngredientWidget),null===(k=this._ingredientWidget)||void 0===k||k.setup(this._mergeTarget,F).catch((()=>{j.VyI.log("Unable to set up ingredientWidget in PetMergeMenu",j.$bb.Warning)})),this._mergeBar=U.get(tr.OA.MergeBar),null===(B=this._mergeBar)||void 0===B||B.setup(this._mergeTarget,!0,F)}else this._ingredientCardSpawner=U.get(tr.OA.IngredientCardSpawner),this._drawerCardSpawner=U.get(tr.oX.PetCardPetSpawner);this.setFTUEStatePetRank(),this.setupMergeButtonMode().catch(j.RQr.createHandler("Error setting up upsell modal")),this._targetPetSpineComponent=U.get(tr.OA.PetSpineComponent),this._mergeRankBadge=U.get(tr.OA.MergeRankBadge).GameObject,this._fanfareParentTransform=U.get(tr.OA.MergeFanfare),this._middlePanelBackingRectTransform=U.get(tr.OA.MiddlePanelBacking),this.bindMagicoinDisplayToPurchase()})),this._isInFTUE&&!this._petMerge2Enabled&&this.onPrefabLoaded.addOnce((()=>{K.q.instance.prodigy.audio.playDialogue({tag:ah.B.Voice_noot_merge_ready_to_merge,s:0,d:-1})})),this._segment.featureCommon.sendInterfaceEvent({interfaceName:ph.B.PetMergePowerUpModal,interfaceType:bi.Wm.Window,originType:bi.$N.ButtonClick,originID:"merge_modal_interface",instanceType:Ai.N.UI});const $=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this._confirmationDialogConfig=new yh.k($.getText("BUTTON_YES_CAPITAL"),(()=>{this._segment.featureCommon.sendButtonEvent({buttonName:"Yes",destinationName:"your_pet_menu",interfaceType:bi.Wm.Window,interfaceName:ph.B.PetMergePowerUpModal,saveClickInfo:ph.B.PetMergePowerUpModal}),this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(bh.Eu.PetMergeConfirm),this.performMerge().catch(j.RQr.createHandler("Error merging pets"))}),$.getText("BUTTON_NO_CAPITAL"),void 0,{atlas:q._.Ui_store_json,name:"icon-large-exclamation"},void 0,void 0,$.getText("MERGE_CONFIRMATION_TITLE"),$.getText("MERGE_CONFIRMATION_BODY"),!0),this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(bh.Eu.PetMergeSelectMerge)}create(){super.create(),(0,wh.Ks)().preloadFromGUIDWithDependencies(Ei.l.PetMergeConsumedIngredient),(0,wh.Ks)().preloadFromGUIDWithDependencies(Ei.l.PetMergePetFanfare),(0,wh.Ks)().preloadFromGUIDWithDependencies(Ei.l.MergeSuccessBadgeVFX),this.onPetMergeSuccess.add(this.playFanfareAnimations.bind(this))}close(){var k;this._showPetMergeDrawer.dispose(),this._hidePetMergeDrawer.dispose(),this._resetPetMergeDrawerScroll.dispose(),this._onSelectedIngredientsChanged.dispose(),this.onPetMergeSuccess.dispose(),null===(k=this._hardCurrencyDataProvider)||void 0===k||k.onBalanceChanged.removeAll(this),super.close()}getMergeModalData(){var k;const B=K.q.instance.prodigy.gameContainer.get("306-5359"),U=this._petItem.data,F=this._mergeTarget.mergeRank,G=Eh.P8.isPetOnTeam(this._mergeTarget),H=B.getChargedLevel(),V=G&&H>0,W=V?Th.e.getChargedLevelTierFromLevel(H):Sh.Bv.NO_CHARGE,q=W===Sh.Bv.MAX_CHARGE,z=Eh.P8.getBattleStats(this._petItem,this._mergeTarget.level,this._mergeTarget.uniqueID),Y=Eh.P8.getBattleStats(this._petItem,this._mergeTarget.level,this._mergeTarget.uniqueID,1),Q=this._petMerge2Enabled?ch.Y.getMerge2RecipeForPet(this._petItem.ID,U.rarity,F):ch.Y.getRecipeForPet(U.evolution.totalEvos,F);this._validPetIngredientList=Oh.r.getOwnedIngredientsForRecipe(this._mergeTarget,(k=>le.t.getItem("pet",k)),Q);const X=K.q.instance.prodigy.gameContainer.get("12f-4e29"),Z=this._petMerge2Enabled&&X.isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_STARTED)&&!X.isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED);this._requiredIngredientCount=Q.ingredientCount;const J=this._validPetIngredientList.length;this._selectedIngredientPetIndices=$.range(Math.min(this._requiredIngredientCount,J));const tt=Z?0:this._requiredIngredientCount-J,et=J>this._requiredIngredientCount,it=[this._mergeTarget,...this._selectedIngredientPetIndices.map((k=>this._validPetIngredientList[k]))],st=null!==(k=it.find((k=>k.nickname)))&&void 0!==k?k:this._mergeTarget,nt=Math.max(...it.map((k=>k.level))),at=Eh.P8.getRequiredPetMergeIngredient(this._petItem,Q),rt=this.getMagicoinCostForMerge(at.ID,tt,Q),ot=this._hardCurrencyDataProvider.getBalance(27),ht=rt.value>0&&ot>=rt.value&&!this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(rt.value);this._mergeButtonMode=tt<=0?lh.Merge:ht?lh.MagicoinMerge:lh.Disabled;const ct=this._mergeButtonMode!==lh.Disabled,dt=(this._petMerge2Enabled||rt.value>0)&&!this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(rt.value);return{TITLE_TEXT:this._localizer.getText("PET_MERGE_MODAL_TITLE",Eh.P8.getPetDisplayName(this._petItem,st)),CURRENCY_DISPLAY_ID:27,CURRENCY_DISPLAY_AMOUNT:ot,MAGICOIN_PRICE:rt.value,SHOW_MAGICOIN_PRICE:dt,SHOW_MEMBER_ICON:this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(rt.value)&&this._mergeButtonMode!==lh.Merge,UPDATE_MAGICOIN_BUDGET:ot,LEVEL_TEXT:`${nt}`,MERGE_RANK:F,STAT_TEXT_COLOR:V?gh.o.CHARGED_STAT_COLOR_MAP[U.rarity]:void 0,HEALTH:z.hp,ADDITIONAL_HEALTH:"+"+(Y.hp-z.hp),POWER:z.power,ADDITIONAL_POWER:"+"+(Y.power-z.power),SPEED:z.speed,ADDITIONAL_SPEED:"+"+(Y.speed-z.speed),DEFENCE:z.defence,ADDITIONAL_DEFENCE:"+"+(Y.defence-z.defence),IS_CHARGED:V,CHARGED_TIER_1:V&&!q,CHARGED_TIER_2:q,RARITY:U.rarity,ELEMENT:U.affinity,INGREDIENT_CARD_DATA:$.range(this._requiredIngredientCount).map((k=>{var B;const U=this._validPetIngredientList[k],F=null!=U?U:this._mergeTarget,G={SELECTED:!1,PET_ID:F.ID,PET_DATA:F,NAME:null,LEVEL:1,MERGE_RANK:0,SHOW_MERGE_RANK_BADGE:!1,SHOW_ON_TEAM:!1,SHOW_UPGRADE:!1,SHOW_EVOLVE:!1,SHOW_STATIC_EVOLVE:!1,SHOW_GUIDE_HAND:!1,SHOW_PET_GEAR:!0};if(U)return Object.assign(Object.assign({},G),{DISABLED:!1,INPUT_ENABLED:ct,ON_CLICK:()=>{if(et)this.showMergePetDrawer(k);else{const B=this._ingredientCardSpawner.spawnedPrefabs[k];K.q.instance.prodigy.audio.playSFX(49,"pop");const U={bodyText:this._localizer.getText("PET_MERGE_MODAL_EXACT_INGREDIENTS")},F=uh.A.displayTooltipTargeted(void 0,B,U,B);j.Aq$.isDefined(F)&&F.GameObject.setLayer(vh.E.OverlayLayer,!0)}},NAME:Eh.P8.getPetDisplayName({type:"pet",ID:U.ID},U),NAME_ALIGN_H:j.If$.Left,LEVEL:U.level,MERGE_RANK:Eh.P8.getPetDisplayMergeRank(U.ID,U.uniqueID),SHOW_MERGE_RANK_BADGE:Eh.P8.canPetAccessMergeRanks(U.ID)});{const k=null!==(B=Eh.P8.getRequiredPetMergeIngredient(this._petItem,Q))&&void 0!==B?B:this._petItem;return Object.assign(Object.assign({},G),{PET_ID:k.ID,PET_DATA:{ID:k.ID},DISABLED:!0,INPUT_ENABLED:!1,NAME:this._localizer.getText("PET_MERGE_MODAL_DISABLED_SLOT_TEXT"),NAME_ALIGN_H:j.If$.Center,LEVEL:1,MERGE_RANK:0,SHOW_MERGE_RANK_BADGE:!1,SHOW_ELEMENT_ICON:!1,SHOW_LEVEL_ICON:!1,SHOW_PET_GEAR:!1})}})),PET_ID:this._mergeTarget.ID,PET_GEAR:this._mergeTarget.gear,CHARGED_CREATURE_EFFECT_TIER:W,CHARGED_CREATURE_EFFECT_DISPLAY_TYPE:V?Sh.X$.IDLE:Sh.X$.HIDDEN,DRAWER_DATA:{PET_DATA:this._validPetIngredientList.map(((k,B)=>({PET_ID:k.ID,PET_DATA:k,NAME:Eh.P8.getPetDisplayName(le.t.getItem("pet",k.ID).data,k),LEVEL:k.level,MERGE_RANK:k.mergeRank,SHOW_MERGE_RANK_BADGE:Eh.P8.canPetAccessMergeRanks(k.ID),SHOW_UPGRADE:!1,SHOW_EVOLVE:!1,SHOW_STATIC_EVOLVE:!1,SHOW_ON_TEAM:B=this._requiredIngredientCount,ON_CLICK:()=>{this.selectIngredient(B)}}))),PET_GRID_FIXED_COLUMN_COUNT:2,DRAWER_WIDTH:444,DRAWER_HEIGHT:720,TITLE:this._localizer.getText("PET_MERGE_MODAL_DRAWER_TITLE"),START_OFFSCREEN_X:-800,TWEEN_IN_SIGNAL:this._showPetMergeDrawer,TWEEN_OUT_SIGNAL:this._hidePetMergeDrawer,RESET_SCROLL_SIGNAL:this._resetPetMergeDrawerScroll,ON_CLOSE:()=>{this.hideMergePetDrawer()}},MERGE_ENABLED:ct,MERGE_SUCCESS_SIGNAL:this.onPetMergeSuccess,ON_MERGE_CLICK:()=>this.onMergeButtonClicked(rt),PET_STANDEE:Ch.bf[U.affinity],MERGE_BUTTON_TEXT:this._localizer.getText(tt>0?"GET_PETS_AND_MERGE":"MERGE"),PET_MERGE_MODAL_CLOSE_BUTTON:()=>this.sendMergeCancelledEvent()}}onMergeButtonClicked(k){const B=K.q.instance.prodigy.gameContainer.get("12f-4e29"),U=this._petMerge2Enabled&&B.isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_STARTED)&&!B.isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED),F=()=>this._segment.item.sendInsufficientCurrencyEvent(k,{sink_type:gn.C.PetMerge,sink_id:this._mergeTarget.ID});if(K.q.instance.prodigy.audio.stopVoice(),this._petMerge2Enabled||this.hideMergePetDrawer(),(0,rs.v)(this._mergeButtonMode!==lh.Disabled),this._mergeButtonMode===lh.OtpUpsell)F(),this.showOtpUpsellModal(k);else if(this._mergeButtonMode===lh.MembershipUpsell)F(),(0,rs.v)(this._upsellModalType!==qo.None),this.showMembershipUpsellModal(this._upsellModalType);else{const k=Object.assign(this._mergeTarget,{mergeRank:this._mergeTarget.mergeRank}),B=this._selectedIngredientPetIndices.map((k=>{const B=this._validPetIngredientList[k];return Object.assign(B,{mergeRank:B.mergeRank})})),F=!U&&Ih.doesMergeRequireConfirmation(k,B),G=F?ph.B.PetMergePowerUpWarning:ph.B.PetMergePowerUpModal,$=this._petMerge2Enabled?this._ingredientWidget.missingIngredientCount:this._ingredientCardSpawner.spawnedPrefabs.length-B.length;this._segment.featureCommon.sendButtonEvent({buttonName:$>0?"merge magicoin":"merge",destinationName:F?"warning_pop_up":"your_pet_menu",interfaceType:bi.Wm.Window,interfaceName:G,saveClickInfo:G});const H=4;this._segment.petMerge.sendPetMergeFunnelAdvancedEvent($>0?bh.Eu.PetMergeMagicoin:bh.Eu.PetMergeFinalizeMerge,H),F?(this._segment.featureCommon.sendInterfaceEvent({interfaceType:bi.Wm.Window,interfaceName:G,originType:bi.$N.ButtonClick,originID:G,instanceType:Ai.N.UI}),K.q.instance.prodigy.open.confirmationDialog(this._confirmationDialogConfig)):U?this.performMerge([{type:hh.J1.FTUEMerge}]).catch(j.RQr.createHandler("Error attempting a ftue pet merge")):this.performMerge().catch(j.RQr.createHandler("Error merging pets"))}}showMergePetDrawer(k){this.selectIngredientSlot(k),this._showPetMergeDrawer.dispatch()}hideMergePetDrawer(){this.selectIngredientSlot(-1),this._hidePetMergeDrawer.dispatch()}selectIngredientSlot(k){if(this._ingredientCardSpawner&&this._selectedIngredientSlotIndex!==k){if(this._selectedIngredientSlotIndex>-1){const k={SELECTED:!1};Ja.d.updateInjectedValues(this._ingredientCardSpawner.spawnedPrefabs[this._selectedIngredientSlotIndex],k)}if(k>-1){const B={SELECTED:!0};Ja.d.updateInjectedValues(this._ingredientCardSpawner.spawnedPrefabs[k],B)}this._selectedIngredientSlotIndex=k}}selectIngredient(k){if(this._selectedIngredientSlotIndex<0)return;this._drawerCardSpawner.updateInjectionData(this._selectedIngredientPetIndices[this._selectedIngredientSlotIndex],{SHOW_ON_TEAM:!1,INPUT_ENABLED:!0});this._drawerCardSpawner.updateInjectionData(k,{SHOW_ON_TEAM:!0,INPUT_ENABLED:!1});const B=this._validPetIngredientList[k],U={PET_ID:B.ID,PET_DATA:B,NAME:Eh.P8.getPetDisplayName(le.t.getItem("pet",B.ID).data,B),LEVEL:B.level,MERGE_RANK:Eh.P8.getPetDisplayMergeRank(B.ID,B.uniqueID),SHOW_MERGE_RANK_BADGE:Eh.P8.canPetAccessMergeRanks(B.ID)};Ja.d.updateInjectedValues(this._ingredientCardSpawner.spawnedPrefabs[this._selectedIngredientSlotIndex],U),this._selectedIngredientPetIndices[this._selectedIngredientSlotIndex]=k,this._onSelectedIngredientsChanged.dispatch()}updatePetStatsUI(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._mergeTarget.mergeRank,B=Eh.P8.getBattleStats(this._petItem,this._mergeTarget.level,this._mergeTarget.uniqueID);if(Ja.d.updateInjectedValues(this.prefabContainer,{MERGE_RANK:k,MERGE_ENABLED:!1,INGREDIENT_CARD_DATA:[]},!0),!this._petMerge2Enabled)for(let F=0;Fk.dispose()))}yield j.Egh.timeout(500);{const k=new j.HN0;Ja.d.updateInjectedValues(this.prefabContainer,{POWER_STAT_SWIPE:k},!0),k.dispatch(),Ja.d.updateInjectedValuesWithDelay(this.prefabContainer,{MERGE_POWER:B.power},!0,U).then((()=>k.dispose()))}yield j.Egh.timeout(500);{const k=new j.HN0;Ja.d.updateInjectedValues(this.prefabContainer,{SPEED_STAT_SWIPE:k},!0),k.dispatch(),Ja.d.updateInjectedValuesWithDelay(this.prefabContainer,{MERGE_SPEED:B.speed},!0,U).then((()=>k.dispose()))}yield j.Egh.timeout(500);{const k=new j.HN0;Ja.d.updateInjectedValues(this.prefabContainer,{DEFENCE_STAT_SWIPE:k},!0),k.dispatch(),Ja.d.updateInjectedValuesWithDelay(this.prefabContainer,{MERGE_DEFENCE:B.defence},!0,U).then((()=>k.dispose()))}Ja.d.updateInjectedValues(this.prefabContainer,{ADDITIONAL_HEALTH:"",ADDITIONAL_POWER:"",ADDITIONAL_SPEED:"",ADDITIONAL_DEFENCE:""},!0)}))}playFanfareAnimations(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=yield(0,wh.Ks)().loadWithDependenciesFromGUID(Ei.l.PetMergeConsumedIngredient,this._middlePanelBackingRectTransform.GameObject);B.active=!1;const U=[];let F,G="Merge_1_3";this._petMerge2Enabled?F=this._ingredientWidget.ingredientCount:(F=this._ingredientCardSpawner.spawnedPrefabs.length,G=`Merge_1_${F}`);const $=B.findComponentInChildren(Ir.j);if(Ja.d.updateInjectedValues(this.prefabContainer,{ORB_ANIMATION_COMPLETE:$.OnAnimationComplete},!0),$.OnAnimationComplete.add(this.updatePetStatsUI.bind(this)),!this._petMerge2Enabled)for(let V=0;Vk.GameObject.activeInHierarchy)),Q=Y.GameObject.findComponent(Ir.j),X=Y.getSpine(),Z=Y.getSlot("Text");if(Z){const k=X.getSlotContainer(Z),B=k.addChild(new V.Container);B.scale.set(1,-1);const U=W.getRootContainer(),F=12;B.addChild(U),B.pivot.set(U.width/2,U.height/2),k.addChild(B),B.position.set(0,F)}yield Q.OnAnimationComplete.asPromise(),yield j.Egh.timeout(1500),this._segment.featureCommon.sendInterfaceEvent({interfaceName:ph.B.PetMergePowerUpModal,interfaceType:bi.Wm.Window,instanceType:Ai.N.UI,closeMethod:bi.Lv.Done}),this.close()}))}performMerge(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;K.q.instance.game.input.enabled=!1;let U,F=null!=k?k:this._selectedIngredientPetIndices.map((k=>({type:hh.J1.Pet,uniqueId:this._validPetIngredientList[k].uniqueID})));if(this._petMerge2Enabled&&!k){const k=null===(B=le.t.getItem("pet",this._mergeTarget.ID))||void 0===B?void 0:B.data,U=ch.Y.getMerge2RecipeForPet(this._mergeTarget.ID,k.rarity,this._mergeTarget.mergeRank),G=k=>{var B;return null!==(B=Eh.P8.getPetDisplayMergeRank(this._mergeTarget.ID,k))&&void 0!==B?B:hh.qd.MIN},j=K.q.instance.prodigy.gameContainer.get("306-5359").kennel.getAllPetsByID(this._mergeTarget.ID).filter((k=>k.uniqueID!==this._mergeTarget.uniqueID)).map((k=>({ID:this._mergeTarget.ID,uniqueID:k.uniqueID}))),$=ch.Y.getMergedIngredientCountPerPet(G,j,{ID:this._mergeTarget.ID,uniqueID:this._mergeTarget.uniqueID},k.rarity);F=ch.Y.selectOptimalIngredients($,U.ingredientCount).map((k=>({uniqueId:k,type:hh.J1.Pet})))}U=this._petMerge2Enabled?this._ingredientWidget.missingIngredientCount:this._ingredientCardSpawner.spawnedPrefabs.length-F.length,U>0&&!k&&(F.length=this._petMerge2Enabled?this._ingredientWidget.ingredientCount:this._ingredientCardSpawner.spawnedPrefabs.length,F.fill({type:hh.J1.MagicoinPet},-U));const G=K.q.instance.prodigy.open.showFullScreenSpinner(),$=this._mergeTarget.mergeRank;yield Ih.performMergeAction(this._mergeTarget.uniqueID,F).then((k=>{var B,F;if(k===hh.zb.Success){this._segment.playerProgression.sendPlayerProgressionAdvancedEvent({progressionType:"Pet Rank",progressionNewValue:`${this._mergeTarget.mergeRank}`,progressionPreviousValue:`${$}`,creatureName:Tn.J.getLocalizationNameKey(null===(B=this._petItem)||void 0===B?void 0:B.data),transactionId:this._segment.petMerge.petMergeTransactionId});const k=U>0?5:6;this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(bh.Eu.PetMergeCompleted,k),Ja.d.updateInjectedValues(this.prefabContainer,{MERGE_ENABLED:!1},!0),this.onPetMergeSuccess.dispatch(),this.game.broadcaster.broadcast(oi.ig.Merged,null,[this._mergeTarget])}else{let B,U="",G=[];switch(k){case hh.zb.AlreadyMaxRank:U="PET_MERGE_FAIL_MAX";break;case hh.zb.IncompatibleIngredients:U="PET_MERGE_FAIL_INCOMPATIBLE";break;case hh.zb.NotEnoughIngredients:U="PET_MERGE_FAIL_INGREDIENTS";break;case hh.zb.PetNotOwned:U="PET_MERGE_FAIL_NO_PET_FOUND",G=[null!==(F=this._mergeTarget.uniqueID)&&void 0!==F?F:""];break;case hh.zb.PetCannotBeMerged:default:U="PET_MERGE_FAIL_GENERAL"}K.q.instance.prodigy.open.messageBoxPrefab({text:U,textArgs:G,confirmCallback:B});const $=this._selectedIngredientPetIndices.map((k=>{const B=this._validPetIngredientList[k];return`{ ${Eh.P8.getPetDisplayName(le.t.getItem("pet",B.ID).data,B)}, Id: ${B.ID} }`})).join(",");U+=`. TargetPet: { ${Eh.P8.getPetDisplayName(le.t.getItem("pet",this._mergeTarget.ID).data,this._mergeTarget)}, Id: ${this._mergeTarget.ID} }, ingredients: ${$}, isInFTUE: ${this._isInFTUE}`;const H=new Error(U);Ko.captureException(H),j.RQr.logError(H,"Pet merge failed!")}})).catch((k=>{Ko.captureException(k),j.RQr.logError(k,`Pet merge failed! Pet Id: ${this._mergeTarget.ID}`)})).finally((()=>{G.destroy(),K.q.instance.game.input.enabled=!0}))}))}static performMergeAction(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=K.q.instance.prodigy.gameContainer,F=U.get("306-5359").kennel,G=F.getPetByUniqueID(k).mergeRank,$=U.get("2a4-9266"),H=U.get("c47-20b6"),V=B.map((k=>k.type===hh.J1.Pet?F.getPetByUniqueID(k.uniqueId):null)).filter((k=>null!==k)),W=H.item.beginSecureItemTransaction(),q=yield $.performMergeAction(k,B);if(q.result!==hh.zb.Success)return q.result;const z=!K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED)&&K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_STARTED),Y=F.getPetByUniqueID(k),Q=le.t.getItem("pet",Y.ID),X=null==Q?void 0:Q.data,Z=(0,Dt.G)(oh.J)?ch.Y.getMerge2RecipeForPet(Q.ID,X.rarity,G):ch.Y.getRecipeForPet(X.evolution.totalEvos,G);return z&&Ih.completePetMergeFTUE(Y,Z.ingredientCount),j.Aq$.isDefined(Y.team)&&Ah.k.cachedDisabledEvolutionFeature&&(F.updated=!0,F.refreshPetTeamData()),B.some((k=>k.type===hh.J1.MagicoinPet))?H.petMerge.sendPetMergedMagicoinEvents({ingredients:V,ingredientBypass:Z.ingredientCount-V.length,basePetData:Y,previousRank:G}):B.some((k=>k.type===hh.J1.MembershipReward))?H.petMerge.sendPetMergedUpsellEvents({ingredientBypass:Z.ingredientCount,basePetData:Y,previousRank:G}):H.petMerge.sendPetsMergedEvents({ingredients:V,basePetData:Y,previousRank:G}),Ih.sendMergePetQuestEvent(X),H.featureCommon.sendFetchPetRosterEvent([Y,...V],{trigger_type:"pet_merge",trigger_id:H.petMerge.petMergeId,fetch_scope:bi.oi.Partial}),W.flush({transaction_id:H.petMerge.petMergeTransactionId,sink_type:gn.C.PetMerge}),q.result}))}static doesMergeRequireConfirmation(k,B){if((0,Dt.G)(oh.J))return!1;if(0===B.length)return!1;const U=k.mergeRank;for(const $ of B){if($.mergeRank>U)return!0}let F=0;!!k.nickname&&F++;for(const $ of B){if(!!$.nickname&&(F++,F>1))return!0}const G=le.t.getItem("pet",k.ID).data.evolution.totalEvos,j=ch.Y.getRecipeForPet(G,U);if(ch.Y.isMerge1Recipe(j))for(const $ of B){if(le.t.getItem("pet",$.ID).data.evolution.tier>j.evolutionTier)return!0}return!1}setFTUEStatePetRank(){if(nh.N.shouldShowPetMergeTutorial){K.q.instance.game.broadcaster.broadcast(oi.ki.FtueMergeModalLoaded);const k=this._mergeButtonMode!==lh.Merge;Ja.d.updateInjectedValues(this.prefabContainer,Object.assign({[tr.$z.PetMergeModalFTUEEnabled]:!0,[tr.$z.PetMergeModalFTUECloseButtonEnabled]:k},k&&{[tr.$z.PetMergeModalCloseButton]:()=>{Ih.escapePetMergeFTUE(this._mergeTarget.uniqueID)}}))}}static escapePetMergeFTUE(k){var B;const U=K.q.instance.prodigy.gameContainer.get("306-5359").kennel.getPetByUniqueID(k),F=null===(B=le.t.getItem("pet",U.ID))||void 0===B?void 0:B.data,G=(0,Dt.G)(oh.J)?ch.Y.getMerge2RecipeForPet(U.ID,F.rarity,U.mergeRank):ch.Y.getRecipeForPet(F.evolution.totalEvos,U.mergeRank);Ih.completePetMergeFTUE(U,G.ingredientCount,!0)}static completePetMergeFTUE(k,B,U=!1){const F=K.q.instance.prodigy.gameContainer.get("c47-20b6");K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED),nh.N.shouldShowPetMergeTutorial=!1,K.q.instance.game.broadcaster.broadcast(oi.ki.FtueCompleted),F.petMerge.sendPetMergeTutorialFunnelAdvancedEvent(bh.S4.TutorialComplete),U&&F.petMerge.sendPetMergeCancelledEvent(k,B,!0)}setupMergeButtonMode(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._mergeButtonMode===lh.Disabled){if((0,Dt.G)(rh.l).enabled){const k=this._mergeTarget.mergeRank,B=this._petMerge2Enabled?ch.Y.getMerge2RecipeForPet(this._petItem.ID,this._petItem.data.rarity,k):ch.Y.getRecipeForPet(this._petItem.data.evolution.totalEvos,k),U=Eh.P8.getRequiredPetMergeIngredient(this._petItem,B);let F;F=this._petMerge2Enabled?this._ingredientWidget.missingIngredientCount:this._ingredientCardSpawner.spawnedPrefabs.length-this._selectedIngredientPetIndices.length;const G=this.getMagicoinCostForMerge(U.ID,F,B);this._mergeButtonMode=this._hardCurrencyDataProvider.canAfford(G)?lh.MagicoinMerge:lh.OtpUpsell}else{const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this._upsellModalType=yield class{static getEligibleUpsellModalTypeForPlayer(k){return(0,G.sH)(this,void 0,void 0,(function*(){let B=qo.None;const U=k.hasMembership(),F=k.isPlayingAtSchool();if(U){const U=yield k.getMembershipUpsellData();0!==U.upgradeOptions.length&&(B=F?qo.AtSchool:1===U.upgradeOptions.length?qo.UltraFocussed:qo.Standard)}else B=F?qo.AtSchool:qo.Standard;return B}))}}.getEligibleUpsellModalTypeForPlayer(k),this._upsellModalType!==qo.None&&(this._mergeButtonMode=lh.MembershipUpsell)}this._mergeButtonMode!==lh.Disabled&&Ja.d.updateInjectedValues(this.prefabContainer,{MERGE_ENABLED:!0},!0)}}))}bindMagicoinDisplayToPurchase(){var k;const B=this._hardCurrencyDataProvider.getBalance(27),U=this.prefabContainer.findComponentInChildren(_h.n),F=this.prefabContainer.findComponentInChildren(fh.B);null==U||U.updateAmount(B),F&&(F.initialNumber=B,null===(k=this._hardCurrencyDataProvider)||void 0===k||k.onBalanceChanged.add((()=>{const k=this._hardCurrencyDataProvider.getBalance(27);F.targetNumber=k,F.startCounter(),Ja.d.updateInjectedValues(this.prefabContainer,{MERGE_ENABLED:!1,UPDATE_MAGICOIN_BUDGET:k},!0),this._mergeButtonMode=lh.Disabled,this.setupMergeButtonMode().catch(j.RQr.createHandler("Error setting up Merge button mode"))}),this))}showOtpUpsellModal(k){this.sendFunnelStartEvent();const B=K.q.instance.prodigy.gameContainer.get("306-5359").getCurrencyAmount(k.currency),U=$.noop;K.q.instance.prodigy.open.unifiedConversionFlow(U,{conversionFunnelName:Sn.o.FunnelNotEnoughCurrency},null,{[tr.FK.OtpMissingMagicoin]:k.value-B})}sendFunnelStartEvent(){const k={type:"Pet-Merge-Not-Enough-Ingredients",category:"Pet-Merge",contentId:`${this._mergeTarget.ID}`,contentType:"Pet-Merge-Not-Enough-Ingredients",adType:_n.R.Contextual,adVersion:yn.P.getAdVersionFromTriggerCategory("Pet-Merge")},B=this._segment.purchase.sendFunnelTriggerImpression(k);this._segment.purchase.sendFunnelStart(k,B)}showMembershipUpsellModal(k){if(!Pt.pF.eligibleForMembershipPurchaseForMultipleTiers())return void K.q.instance.prodigy.open.messageBoxPrefab({text:"YOU_DONT_HAVE_ENOUGH_MAGICOIN"});if(this._upsellModalType===qo.AtSchool)return void K.q.instance.prodigy.open.membershipSchoolAd();if(this.sendFunnelStartEvent(),yn.P.shouldUseUnifiedConversionFlow(Sn.o.FunnelPetMergeNotEnoughCurrency)){const k=$.noop;return void K.q.instance.prodigy.open.unifiedConversionFlow(k,{conversionFunnelName:Sn.o.FunnelPetMergeNotEnoughCurrency})}let B="";switch(k){case qo.Standard:B=Ei.l.ContextualPromptPetMergeDualPackage;break;case qo.UltraFocussed:B=Ei.l.ContextualPromptPetMergeUltraFocused;break;default:throw new Error(`Invalid upsell modal type: ${k}`)}const U=this._mergeTarget.mergeRank,F=le.t.getItem("pet",this._mergeTarget.ID),G={CONTEXTUAL_CHASE_PET_SPINE_GUID:J.Q[`Spine_pet_${this._mergeTarget.ID}_json`],CONTEXTUAL_CHASE_PET_NAME:Tn.J.getLocalizationNameKey(F),CONTEXTUAL_CONTENT_OLD_RANK:U,CONTEXTUAL_CONTENT_NEW_RANK:U+1};K.q.instance.prodigy.open.petMergeUpsellModal(B,G).onDestroy.addOnce(this.getMembershipConversionAwareModalResultHandler())}getMagicoinCostForMerge(k,B,U){const F=this._hardCurrencyDataProvider.petMergeIngredientCost(k);return(0,rs.v)(!!F,`Couldn't find cost for pet id: ${k}`),F.value*=Math.max(B,0),ch.Y.isMerge2Recipe(U)&&U.cost.forEach((k=>{"currency"===k.type&&27===k.id&&(F.value+=k.amount)})),F}getMembershipConversionAwareModalResultHandler(){let k=$.noop;return K.q.instance.game.broadcaster.addAppListener(oi.H3.MembershipResponseReceived,(B=>{"success"===B&&(k=()=>{this.performMerge([{type:hh.J1.MembershipReward}]).catch(j.RQr.createHandler("Error performing merge action during upsell"))})}),this),()=>{k()}}static sendMergePetQuestEvent(k){const B={params:{taskEventType:dh.Z7.Pet,rarity:k.rarity,itemType:"pet",source:gn.C.PetMerge,id:k.ID,element:k.affinity,level:k.level}};K.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(as.T.MERGE_PET,B).catch(j.RQr.createHandler("Error sending a quest event for merging a pet"))}sendMergeCancelledEvent(){this._isInFTUE||this._segment.petMerge.sendPetMergeCancelledEvent(this._mergeTarget,this._requiredIngredientCount,!1)}destroy(){this._showPetMergeDrawer.dispose(),this._hidePetMergeDrawer.dispose(),this._resetPetMergeDrawerScroll.dispose(),this._onSelectedIngredientsChanged.dispose(),this.onPetMergeSuccess.dispose(),super.destroy()}}(0,G.Cg)([(0,Re.b)("5c7-e02d"),(0,G.Sn)("design:type",Hi.W)],Ih.prototype,"_hardCurrencyDataProvider",void 0),(0,G.Cg)([(0,Re.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Ih.prototype,"_localizer",void 0);var Dh=U(96217);class Rh extends mh.y{constructor(k,B,U,F){super(K.q.instance.game,k,Ei.l.PostLossFlowScreen,B,!0),this.onPrefabLoaded.addOnce((()=>{this.prefab.findComponentInChildren(Dh.Q).setUpScreen({continueCallback:this.close.bind(this),teamUids:F,nootTipBattleInfo:U})}))}}var Ph=U(43579),Mh=U(74712),Nh=U(12270),xh=U(32367),Lh=U(19609),kh=U(63119),Bh=U(17291),Uh=U(32492);class Fh extends Bh.b{constructor(k,B){super(k,B,null,{hideContent:!1,hideMenu:!1}),this.classCode=null,this.classCodeNextButton=null,this.classCodeBackButton=null,this.error=null,this.codeField=null,this._spinner=null,this._blockingOverlay=null,this._localizer=null,this.onClassCodeSubmitComplete=new j.HN0,this._localizer=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),K.q.instance.prodigy.load.assets(j.Aq$.isDefined(j.Aq$.getUrlVariable("unlock"))?[q._.General_core_2_json,q._.Font_black_json,q._.General_icons_json,q._.Ui_common_neutral_json,q._.Font_button_json,q._.Font_general_json,nr.q.Bg_generic_outdoor,nr.q.Bg_battle_forest]:[q._.General_core_2_json,q._.Font_black_json,"monster-small-125","monster-small-126","monster-small-127","monster-small-128","monster-small-129",q._.General_icons_json,q._.Ui_common_neutral_json,q._.Font_button_json,q._.Font_general_json,nr.q.Bg_generic_outdoor,nr.q.Bg_battle_forest],(()=>{this.menuSetup()}))}menuSetup(){K.q.instance.game.broadcaster.addAppListener(oi.bS.POST_MESSAGE_RECEIVED,((k,B)=>{"class-code-entry"===B.name&&this.setCode(B.classCode)}),this,K.q.instance.game),this._blockingOverlay=this.addChild(K.q.instance.prodigy.create.sprite(0,0,q._.General_core_json,"overlay-small")),this._blockingOverlay.width=this.game.width,this._blockingOverlay.height=this.game.height,this._blockingOverlay.alpha=.5,this._blockingOverlay.inputEnabled=!0,this.classCode=K.q.instance.prodigy.create.element(this,340,170),K.q.instance.prodigy.create.panel(this.classCode,0,0,12,8),this.classCodeNextButton=fo.createNextButton(K.q.instance.game,this.classCode,350,370,this.submit.bind(this)),this.classCodeBackButton=fo.createCloseButton(K.q.instance.game,this.classCode,50,370,this.close.bind(this)),K.q.instance.prodigy.create.font(this.classCode,10,25,this._localizer.getText("CHARACTER_SELECT_ENTER_CLASS"),{size:30,width:600,align:"center"}),this.error=K.q.instance.prodigy.create.font(this.classCode,0,300,"",{width:600,align:"center"}),this.codeField=kh.F.createInputField(K.q.instance.game,this.classCode,"classcodeg","",650-.5*kh.F.WIDTH_MEDIUM,285,kh.F.WIDTH_MEDIUM,kh.F.HEIGHT_MEDIUM,"textg");const k=this.classCode.add(K.q.instance.prodigy.create.sprite(40,200,q._.General_core_json,"overlay-light"));k.alpha=.2,k.width=520,k.height=70,k.inputEnabled=!0,k.events.onInputDown.add(this.getCode,this),K.q.instance.prodigy.create.font(this.classCode,50,210,this._localizer.getText("CHARACTER_SELECT_NO_CLASS_CODE"),{size:20,align:"center",width:500}),this._spinner=this.classCode.add(K.q.instance.prodigy.create.sprite(300,125,q._.General_core_json,"loading")),this._spinner.anchor.set(.5,.5),K.q.instance.game.add.tween(this._spinner,this).to({angle:360},2e3,j.GS3.Linear.None,!0,0,Vt.A.MAX_SAFE_INTEGER,!1),this._spinner.visible=!1,this.visible=!0}close(){K.q.instance.game.broadcaster.removeAppListener(oi.bS.POST_MESSAGE_RECEIVED,this,K.q.instance.game),this.classCode=null,this.classCodeNextButton=null,this.classCodeBackButton=null,this.error=null,this.codeField=null,this._spinner=null,this.onClassCodeSubmitComplete.dispose(),super.close()}getCode(){K.q.instance.prodigy.open.learnMore("HEY_TEACHERS","CLASS_CODE_LEARN_MORE_HEADER","CLASS_CODE_LEARN_MORE_BODY",(()=>{this.codeField.setVisible(!0)}),(()=>{this.codeField.clearEvents(!1),this.codeField.setVisible(!1),K.q.instance.game.input.keyboard.clearCaptures()}))}setCode(k){this.codeField.clearEvents(!0),K.q.instance.game.input.keyboard.addKeyCapture([Mo.D.BACKSPACE]),this.codeField.setValue(k)}validationComplete(k){if(this._spinner.visible=!1,k){this.codeField.setVisible(!1);const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;K.q.instance.prodigy.open.message(this._localizer.getText("CHARACTER_SELECT_NEW_CLASS_BODY"),this.classCodeComplete.bind(this),"star",this._localizer.getText("CHARACTER_SELECT_NEW_CLASS_TITLE")),k.isClassCodeAttached=!0,k.data.classCodeUpdateTimestamp=Date.now()}else this.classCodeBackButton.visible=!0,this.classCodeNextButton.visible=!0,this.codeField.show(0),this.error.setText(this._localizer.getText("CHARACTER_SELECT_ERROR_INVALID_CLASS_CODE"))}submit(){const k=Uh.b.reformatClassCode(this.codeField.getValue());if(Uh.b.isValidClassCode(k)){this.codeField.hide(0),this.error.setText(""),this.classCodeBackButton.visible=!1,this.classCodeNextButton.visible=!1,this._spinner.visible=!0;K.q.instance.prodigy.gameContainer.get("c97-bd0d").attachClassCode(k,this.validationComplete.bind(this,!0),this.validationComplete.bind(this,!1))}else this.error.setText(this._localizer.getText("CHARACTER_SELECT_ERROR_NO_CLASS_CODE"))}classCodeComplete(){this.onClassCodeSubmitComplete.dispatch(),this.close()}}var Gh=U(96810),jh=U(15485),$h=U(65088),Hh=U(35452);class Vh extends Ka.W{constructor(k,B,U,F,G,j,$,H){super(k,B,j,{},$),this.dungeon=null,this.closeButton=null,this.mainPanelButtons=null,this.actionContainer=null,this.zoneName=U,this.dungeon=K.q.instance.prodigy.world.zones[this.zoneName],this.lockoutDuration=F,this.lastAttemptTime=G,this.onClose=H}create(){super.create(),this.closeButton.onClickCallback=()=>{this.close()};const k=Vh.getMinutesSinceLastAttempt(this.lastAttemptTime,Date.now());this.setEntranceTemplate(this.lockoutDuration,k)}setEntranceTemplate(k,B){}onEnterButtonClick(){this.dungeon.enterDungeon()}onCatalogButtonClick(k=null){K.q.instance.prodigy.open.dungeonPrizesMenu(this.zoneName,null!=k?k:this.dungeon.prizeWheelId)}static getMinutesSinceLastAttempt(k,B){return Math.floor((B-k)/6e4)}}class Wh extends Vh{constructor(k,B,U,F){super(k,B,U,0,0,35,[Z.c.Sfx_results_screen,q._.Popup_ui_roulette_json,q._.Npc_face_gale_json,q._.Ui_shared_json],F)}setEntranceTemplate(k,B){const U=k/6e4;if(B>=U){const k=this.instantiateTemplate("unusedAttemptsTemplate",this.mainPanelButtons);k.enterButton.onUpCallback=()=>{this.onEnterButtonClick()},k.catalogButton.onUpCallback=()=>{this.onCatalogButtonClick()},this.instantiateTemplate("unusedAttemptsContent",this.actionContainer)}else{this.instantiateTemplate("maxAttemptsTemplate",this.mainPanelButtons).catalogSoloButton.onUpCallback=()=>{this.onCatalogButtonClick()};const k=this.instantiateTemplate("maxAttemptsContent",this.actionContainer),F=""+(U-B);k.timerText.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DUNGEON_ENTRANCE_TIMER",F)),k["max-titleText1"].setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DUNGEON_ENTRANCE_LOCKOUT",this.dungeon.name))}}}var qh=U(8096);class Kh extends Ka.W{constructor(k,B,U,F=[]){super(k,B,24,U,F.concat([q._.Ui_common_neutral_json,q._.Popup_travel_json])),this.okayButton=null,this.okayText=null}preprocess(k,B=null,U=null,F){const G=j.Aq$.isDefined(B)?`[${B}] ${U}`:U;this.updateConfigModifierProperty("lockImage","frameName",F),this.updateConfigModifierProperty("bannerText","text",G),this.updateConfigModifierProperty("contentText","text",k),this.setGameRenderState(!0)}setOkay(k=null,B){this.okayButton.visible=!0,this.okayText.setText(j.Aq$.isDefined(k)?k:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("BUTTON_OKAY_CAPITAL")),B&&this.setCloseCallback(B),this.okayButton.onClickCallback=this.close.bind(this)}}var zh=U(48208);class Yh extends Ka.W{constructor(k,B,U,F,G){super(k,B,49,null,[q._.Ui_daily_question_json,J.Q.Spine_questionsanswered_confetti_json]),this.animate=!1,super.setCloseCallback(U);const j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.dailyQuestions=j.getDailyQuestions(),this.animate=F}create(){super.create(),this.addCards(),this.addDialog()}addCards(){const k=[];for(let B=0;B<7;B++){const U={day:B,rewardData:this.dailyQuestions.getRewards(B,this.game)};this.dailyQuestions.getCurrentDay()===B?k.push(this.createPrizeCard(U)):zh.V.hasDayPassed(this.dailyQuestions.getCurrentDay(),B)?this.dailyQuestions.isDayComplete(B)?k.push(this.createGreenCard(U)):k.push(this.createGreyCard(U)):k.push(this.createYellowCard(U))}for(let B=1;B1?k[B-1].width+k[B-1].x+25:25;k[B].position=new V.Point(U,"prizeCard"===k[B].name?230:350-k[B].height/2)}k[0].position=new V.Point(k[k.length-1].width+k[k.length-1].x+25,350-k[0].height/2)}addDialog(){const k=K.q.instance.prodigy.dialogue.create(),B=this.dailyQuestions.isCurrentDayComplete()?259:258;k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(`DIALOGUE_NOOT_${B}`,this.dailyQuestions.getNumRequired(this.dailyQuestions.getCurrentDay())),face:0,hideNext:!1}),k.startDeprecated("noot",!1,this.close.bind(this))}createGreenCard(k){const B=this.instantiateTemplate("greenCard",this);return this.createIconGroup(k,B),B.greenCard}createGreyCard(k){const B=this.instantiateTemplate("greyCard",this);return this.createIconGroup(k,B),B.iconGroup.alpha=.6,B.valueText.alpha=.6,B.greyCard}createYellowCard(k){const B=this.instantiateTemplate("yellowCard",this);return this.createIconGroup(k,B),B.burst.visible=0===k.day||6===k.day,B.yellowCard}createPrizeCard(k){const B=this.instantiateTemplate("prizeCard",this);this.createIconGroup(k,B);const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(this.animate){const k=this.game.add.spine(300,10,J.Q.Spine_questionsanswered_confetti_json);k.setAnimationByName(0,"animation",!0),this.titleContainer.add(k,!1,5),B.whiteSquare.image.scale=new V.Point(1,1),B.whiteSquare.image.alpha=0,B.checkmark.image.anchor=new V.Point(.5,.5),B.checkmark.image.scale=new V.Point(0,0),B.checkmark.visible=!0;const U=this.game.add.tween(B.whiteSquare.image,this).to({alpha:1},500,j.GS3.Linear.None,!1,0);U.start(),U.onTweenComplete.add((()=>{B.blueCellMatte.visible=!1,B.greenCellMatte.visible=!0;const k=this.game.add.tween(B.whiteSquare.image,this).to({alpha:0},500,j.GS3.Linear.None,!1,250),U=this.game.add.tween(B.checkmark.image.scale,this).to({x:1,y:1},200,j.GS3.Back.InOut,!1,400);k.chain(U),k.start()}))}else U.getDailyQuestions().isDayComplete(k.day)?(B.blueCellMatte.visible=!1,B.greenCellMatte.visible=!0,B.whiteSquare.visible=!1):(B.whiteSquare.visible=!1,B.checkmark.visible=!1);return B.prizeCard}createIconGroup(k,B){let U=Tn.J.getDayName(this.game,k.day);const F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),G=this.dailyQuestions.getCurrentDay();let $=G+1;if($>6&&($=0),k.day===this.dailyQuestions.getCurrentDay()?U=F.getText("WEEKDAY_NAME_TODAY"):k.day!==$||zh.V.hasDayPassed(G,$,this.dailyQuestions.getResetDayIndex())||(U=F.getText("WEEKDAY_NAME_TOMORROW")),B.titleText.setText(U),k.rewardData.length>1){const U=this.game.add.graphics(0,0);U.beginFill(0),U.drawRect(-25,-10,130,100),U.endFill(),B.iconGroup.add(U),B.iconGroup.mask=U,B.iconGroup.add(K.q.instance.prodigy.icon.createIcon(8,16,Ut.E.getIconForType(k.rewardData[2].type,k.rewardData[2].ID),{x:0,y:0}),0),B.iconGroup.add(K.q.instance.prodigy.icon.createIcon(-28,-10,Ut.E.getIconForType(k.rewardData[0].type,k.rewardData[0].ID),{x:0,y:0}),0),B.iconGroup.add(K.q.instance.prodigy.icon.createIcon(28,-10,Ut.E.getIconForType(k.rewardData[1].type,k.rewardData[1].ID),{x:0,y:0}),0),B.valueText.setText("Coin Bundle!")}else B.iconGroup.add(K.q.instance.prodigy.icon.createIcon(0,0,Ut.E.getIconForType(k.rewardData[0].type,k.rewardData[0].ID),{x:0,y:0}),0),B.valueText.setText(`${k.rewardData[0].N} ${le.t.getItemData(k.rewardData[0].type,k.rewardData[0].ID).name}`)}}class Qh extends Ka.W{constructor(k,B,U,F,G,j=!1,$,H){super(k,B,U===hn.A_.ARCHIVES?36:62,{},[Z.c.Sfx_results_screen,q._.Popup_ui_roulette_json]),this.closeButton=null,this.leaveButton=null,this.stayButton=null,this.goldenPagesPanel=null,this.warningContainer=null,this.endRoom=!1,this.zoneName=U,this.maxGoldenPages=F,this.currentGoldenPages=G,this.leaveCallback=$,this.endRoom=j,this.setCloseCallback(H)}create(){super.create(),this.titleText.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("ARCHIVES_EXIT_TITLE",this.zoneName===hn.A_.ARCHIVES?"the Archives":K.q.instance.prodigy.world.zones[this.zoneName].name)),this.closeButton.onUpCallback=()=>{this.close()},this.stayButton.onUpCallback=()=>{this.close()},this.leaveButton.onUpCallback=()=>{this.onLeaveButtonClick()},this.populatePageIcons(),this.endRoom||this.populateWarning()}onLeaveButtonClick(){if(j.Aq$.isDefined(this.leaveCallback))this.leaveCallback();else{const k=K.q.instance.prodigy.world.zones[this.zoneName];k.resetCooldown(),k.exitDungeon()}this.close()}populatePageIcons(){for(let k=0;k=this.currentGoldenPages?this.instantiateTemplate("greyedPageGraphic",this.goldenPagesPanel):this.instantiateTemplate("goldenPageGraphic",this.goldenPagesPanel)}populateWarning(){this.maxGoldenPages===this.currentGoldenPages?this.instantiateTemplate("allPagesWarning",this.warningContainer):this.instantiateTemplate("missingPagesWarning",this.warningContainer)}}class Xh extends Ka.W{constructor(k,B,U,F,G){if(super(k,B,37,{},[Z.c.Sfx_results_screen,q._.Popup_ui_roulette_json]),this.prizeItems=[],this.closeButton=null,this.upperPrizesPanel=null,this.lowerPrizesPanel=null,this.dungeon=null,this.dungeon=K.q.instance.prodigy.world.zones[U],this.prizeDataID=F,this.closeCallback=G,this.dungeon.ID===hn.A_.ARCHIVES)this.prizeItems=An.Q.getWheelItems(k,this.prizeDataID);else{const k=le.t.getItem("itemTable",this.prizeDataID).data.items;for(let B=0;B{j.Aq$.isDefined(this.closeCallback)&&this.closeCallback(),this.close()};let k="",B="";this.dungeon.ID===hn.A_.ARCHIVES?(k="ARCHIVES_PRIZES_TITLE",B="ARCHIVES_PRIZES_MESSAGE"):(k="TOWER_PRIZES_TITLE",B="TOWER_PRIZES_MESSAGE"),this.ArchivesPrizesTitle.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(k,this.dungeon.name)),this.ArchivesMenuTitle.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(B,this.dungeon.name)),this.populatePrizes(this.prizeItems).catch(j.RQr.createHandler("DungeonPrizesMenu: Failed to populate prizes"))}populatePrizes(k){return(0,G.sH)(this,void 0,void 0,(function*(){yield Promise.all(k.map(((k,B)=>(0,G.sH)(this,void 0,void 0,(function*(){if(!k.item.type||void 0===k.item.ID)return void j.VyI.log(`DungeonPrizesMenu: Prize item missing type or ID: ${k.item.type}-${k.item.ID}`,j.$bb.Error);const U=yield le.t.secureGetItem(k.item.type,k.item.ID);U?yield this.addPrizeElement(U,B<4?this.upperPrizesPanel:this.lowerPrizesPanel,this.checkItemOwned(U)?"prizeItemPanel-owned":"prizeItemPanel"):j.VyI.log(`DungeonPrizesMenu: Failed to retrieve item data for prize ${k.item.type}-${k.item.ID}`,j.$bb.Error)})))))}))}addPrizeElement(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F=this.instantiateTemplate(U,B);F.itemName.setText(k.data.name),F[U].onClickCallback=this.viewPrizeInfo.bind(this,k);const G=F.prizeGraphic.width,j=F.prizeGraphic.height,[$,H]=yield K.q.instance.prodigy.icon.createFromDataAdvanced(k,F.prizeGraphic,0,0,{x:.5,y:.5},.5*G,.5*j);H&&(H.width=G,H.height=j),$.children.length>1&&($.x=-10,$.y=-20,$.getChildAt(1).x=10,$.getChildAt(1).y=-25)}))}viewPrizeInfo(k){K.q.instance.prodigy.open.itemInfo(k,null,Lr.s.View)}checkItemOwned(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return"dorm"===k.type?B.hasHouseItem({type:k.type,ID:k.ID}):B.backpack.hasItem(k.type,k.ID)>0}}var Zh=U(76974),Jh=U(5269),tc=U(87392),ec=U(31091),ic=U(49237),sc=U(12420),nc=U(11472),ac=U(38181),rc=U(28152);let oc=class extends j.uAl{constructor(){super(...arguments),this._button=null,this._downStateText=null,this._overStateText=null,this._upStateText=null}get button(){return this._button}get downStateText(){return this._downStateText}get overStateText(){return this._overStateText}get upStateText(){return this._upStateText}};(0,G.Cg)([(0,j.MnK)(ic.$),(0,G.Sn)("design:type",ic.$)],oc.prototype,"_button",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],oc.prototype,"_downStateText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],oc.prototype,"_overStateText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],oc.prototype,"_upStateText",void 0),oc=(0,G.Cg)([(0,j.EVk)("CustomKeyboardLetter")],oc);let hc=class extends j.uAl{constructor(){super(...arguments),this._alphabet=[],this._gridLayout=null,this._initializeOnCreate=!0,this.onButtonClicked=new j.HN0,this._customKeyboardLetters=[]}get alphabet(){return this._alphabet}get gridLayout(){return this._gridLayout}get initializeOnCreate(){return this._initializeOnCreate}create(){super.create(),this._initializeOnCreate&&this.initialize()}destroy(){super.destroy(),this.onButtonClicked&&this.onButtonClicked.dispose()}initialize(){const k=K.q.instance.prodigy.gameContainer.get("d0e-64fd");this.createLetterGameObjects(k,this._customKeyboardLetters,this._gridLayout)}setVisible(k){k&&this._customKeyboardLetters.forEach((k=>{k.button.transition.setState(Zh.K.Up)})),this.GameObject.active=k}createLetterGameObjects(k,B,U){for(let F=0;F{K.q.instance.prodigy.audio.playSFX(18,"pop"),this.onButtonClicked.dispatch(this._alphabet[F])})),B.push(G)}}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",Array)],hc.prototype,"_alphabet",void 0),(0,G.Cg)([(0,j.MnK)(j.JTA),(0,G.Sn)("design:type",j.JTA)],hc.prototype,"_gridLayout",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],hc.prototype,"_initializeOnCreate",void 0),hc=(0,G.Cg)([(0,j.EVk)("CustomKeyboard",rc.Y.uiInput)],hc);let cc=class extends j.uAl{constructor(){super(...arguments),this._backButton=null,this._chooseNameText=null,this._closeButton=null,this._customKeyboard=null,this._doneButton=null,this._nameGridLayout=null,this._nameText=null,this._noNameContainer=null,this._randomButton=null,this._scrollBar=null,this._scrollView=null,this._searchInput=null,this._titleText=null,this._youChoseText=null,this._headerText=null}get backButton(){return this._backButton}get chooseNameText(){return this._chooseNameText}get closeButton(){return this._closeButton}get customKeyboard(){return this._customKeyboard}get doneButton(){return this._doneButton}get nameGridLayout(){return this._nameGridLayout}get nameText(){return this._nameText}get noNameContainer(){return this._noNameContainer}get randomButton(){return this._randomButton}get scrollBar(){return this._scrollBar}get scrollView(){return this._scrollView}get searchInput(){return this._searchInput}get titleText(){return this._titleText}get youChoseText(){return this._youChoseText}get headerText(){return this._headerText}};(0,G.Cg)([(0,j.MnK)(ic.$),(0,G.Sn)("design:type",ic.$)],cc.prototype,"_backButton",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],cc.prototype,"_chooseNameText",void 0),(0,G.Cg)([(0,j.MnK)(ic.$),(0,G.Sn)("design:type",ic.$)],cc.prototype,"_closeButton",void 0),(0,G.Cg)([(0,j.MnK)(hc),(0,G.Sn)("design:type",hc)],cc.prototype,"_customKeyboard",void 0),(0,G.Cg)([(0,j.MnK)(ic.$),(0,G.Sn)("design:type",ic.$)],cc.prototype,"_doneButton",void 0),(0,G.Cg)([(0,j.MnK)(j.JTA),(0,G.Sn)("design:type",j.JTA)],cc.prototype,"_nameGridLayout",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],cc.prototype,"_nameText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cc.prototype,"_noNameContainer",void 0),(0,G.Cg)([(0,j.MnK)(ic.$),(0,G.Sn)("design:type",ic.$)],cc.prototype,"_randomButton",void 0),(0,G.Cg)([(0,j.MnK)(sc.$),(0,G.Sn)("design:type",sc.$)],cc.prototype,"_scrollBar",void 0),(0,G.Cg)([(0,j.MnK)(nc.B),(0,G.Sn)("design:type",nc.B)],cc.prototype,"_scrollView",void 0),(0,G.Cg)([(0,j.MnK)(ac.S),(0,G.Sn)("design:type",ac.S)],cc.prototype,"_searchInput",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],cc.prototype,"_titleText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],cc.prototype,"_youChoseText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],cc.prototype,"_headerText",void 0),cc=(0,G.Cg)([(0,j.EVk)("FirstNameSelectorPrefab")],cc);class dc extends Ka.W{constructor(k,B,U,F=!1){super(k,B,200,{},[q._.Ui_store_json,q._.Ui_bam_json,q._.Popup_ui_roulette_json,q._.Ui_registration_json,q._.Ui_raster_icons_json,q._.Ui_raster_pets_menu_json,Z.c.Sfx_book_open,Z.c.Sfx_adding_pet_to_team]),this.prefabRoot=null,this._prefabLoader=null,this._localizer=null,this._selectedFirstNameID=null,this._selectedCell=null,this._firstNameCells=[],this._nameSelected=!1,this._fromStylistShop=!1,this._autoClick={},this.onClose=U,this._fromStylistShop=F}create(){super.create(),this._prefabLoader=K.q.instance.prodigy.gameContainer.get("d0e-64fd"),this._localizer=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),this._activePlayer=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,this._menuGameObject=this._prefabLoader.loadFromGUID(Ei.l.FirstNameSelector),this.prefabRoot.addChild(this._menuGameObject.legacyTransform.group),this._menuPrefab=this._menuGameObject.findComponentInChildren(cc),this._menuPrefab.customKeyboard.onButtonClicked.add(this.showNamesThatStartWithX,this),this.setUpButtons(),this.setUpSearchBar(),this.updateScrollView(),this.standardView(),K.q.instance.prodigy.audio.playSFX(64,"book-open")}destroy(){var k,B;null===(B=null===(k=this._menuPrefab)||void 0===k?void 0:k.customKeyboard)||void 0===B||B.onButtonClicked.remove(this.showNamesThatStartWithX,this),super.destroy()}setUpButtons(){this._menuPrefab.backButton.onClick.add((()=>{K.q.instance.prodigy.audio.playSFX(18,"pop"),this.back()})),this._menuPrefab.randomButton.onClick.add((()=>{K.q.instance.prodigy.audio.playSFX(18,"pop"),this.random()})),this._menuPrefab.doneButton.onClick.add((()=>{this.done()})),this._menuPrefab.doneButton.lockState(Zh.K.Disabled),this._fromStylistShop&&this._menuPrefab.closeButton.onClick.add((()=>{K.q.instance.prodigy.audio.playSFX(18,"pop"),this.onClose=null,this.close()})),this._menuPrefab.closeButton.GameObject.active=this._fromStylistShop}setUpSearchBar(){this._menuPrefab.searchInput.enablePerKeyEvents(!0),this._menuPrefab.searchInput.onTextChanged.add(this.showNamesBasedOnSearch,this),this._menuPrefab.searchInput.onClear.add(this.showNamesBasedOnSearch,this)}onNameSelected(k,B,U){this._selectedCell!==U&&(this._selectedCell&&(this._selectedCell.lockToggle(!1),this._selectedCell.setSelected(!1)),this._selectedCell=U,this._selectedCell.lockToggle(!0),this._selectedFirstNameID=B,this._menuPrefab.chooseNameText.GameObject.active=!1,this._menuPrefab.youChoseText.GameObject.active=!0,this._menuPrefab.nameText.GameObject.active=!0,this._menuPrefab.nameText.text=k,this._nameSelected||(this._menuPrefab.doneButton.unlockState(),this._menuPrefab.doneButton.transition.setState(Zh.K.Up),this._nameSelected=!0))}populateScrollView(k){let B=tc.f.getFilteredFirstNames();if(B=B.filter((B=>B.data.name.substring(0,k.length).toUpperCase()===k.toUpperCase())),this._firstNameCells.length=0,B.length>0){const k=this._menuPrefab.nameGridLayout.GameObject;this._menuPrefab.noNameContainer.active=!1;for(let U=0;U=0;B--)k[B].destroy();this._menuPrefab.nameGridLayout.update()}standardView(){this._menuPrefab.backButton.GameObject.active=!1,this._menuPrefab.customKeyboard.setVisible(!0),this._menuPrefab.scrollView.GameObject.active=!1,this._menuPrefab.noNameContainer.active=!1,this._menuPrefab.searchInput.setVisible(this.shouldShowInput()),this._menuPrefab.titleText.GameObject.active=!this.shouldShowInput(),this._menuPrefab.titleText.text=this._localizer.getText("FIRST_NAME_SELECTOR_TITLE_DEFAULT"),this._menuPrefab.headerText.GameObject.active=!0}startingLetterView(k){this._menuPrefab.customKeyboard.setVisible(!1),this._menuPrefab.searchInput.setVisible(!1),this._menuPrefab.scrollView.GameObject.active=!0,this._menuPrefab.backButton.GameObject.active=!0,this._menuPrefab.backButton.transition.setState(Zh.K.Up),this._menuPrefab.titleText.GameObject.active=!0,this._menuPrefab.titleText.text=this._localizer.getText("FIRST_NAME_SELECTOR_TITLE_LETTER").replace("%LETTER%",k),this._menuPrefab.headerText.GameObject.active=!1}searchView(){this._menuPrefab.customKeyboard.setVisible(!1),this._menuPrefab.scrollView.GameObject.active=!0,this._menuPrefab.backButton.GameObject.active=!1,this._menuPrefab.searchInput.setVisible(!0),this._menuPrefab.titleText.GameObject.active=!1,this._menuPrefab.headerText.GameObject.active=!1}showNamesThatStartWithX(k){this.cleanUpExistingNameObjects(),this.startingLetterView(k),this.populateScrollView(k),this.updateScrollView()}showNamesBasedOnSearch(){""===this._menuPrefab.searchInput.text?this.standardView():(this.cleanUpExistingNameObjects(),this.searchView(),this.populateScrollView(this._menuPrefab.searchInput.text)),this.updateScrollView()}updateScrollView(){this._menuPrefab.scrollView.scrollToPercent(0,Jh.H.Vertical),this._menuPrefab.scrollBar.scrollToPercent(0),this._menuPrefab.scrollView.updateScrollEnabled(Jh.H.Vertical)}close(){this._firstNameCells.length=0,this._menuGameObject.destroy(),super.close()}done(){var k;this._nameSelected?(K.q.instance.prodigy.audio.playSFX(61,"add-pet"),uh.A.displayToolTipAuto(null,null,{bodyText:this._localizer.getText("NAME_CHANGE_SUCCESS"),xPosition:635,yPosition:100}),this._activePlayer.appearance.getName().setFirstName(this._selectedFirstNameID),this._activePlayer.appearance.updated=!0,this._activePlayer.name.init(this._activePlayer.appearance.getName()),null===(k=this._activePlayer.playerContainer)||void 0===k||k.showName(),this.close()):(K.q.instance.prodigy.audio.playSFX(18,"pop"),K.q.instance.prodigy.open.overlayToolTip(uh.A.TOOLTIP_MANUAL,{bodyText:this._localizer.getText("FIRST_NAME_SELECT_CHOOSE_NAME"),xPosition:950,yPosition:533,arrowDirection:Br.i.DOWN}))}back(){this.standardView(),this.updateScrollView()}random(){this._selectedCell&&(this._selectedCell.lockToggle(!1),this._selectedCell.setSelected(!1)),this._menuPrefab.chooseNameText.GameObject.active=!1,this._menuPrefab.youChoseText.GameObject.active=!0,this._menuPrefab.nameText.GameObject.active=!0;const k=La.C.getRandomFirstName();this._selectedFirstNameID=k;const B=le.t.getItem("name",k).data.value.toString();this._menuPrefab.nameText.text=B,this._firstNameCells.some((U=>{if(U.getName()===B)return U.setSelected(!0),this.onNameSelected(B,k,U),!0})),this._nameSelected||(this._menuPrefab.doneButton.unlockState(),this._menuPrefab.doneButton.transition.setState(Zh.K.Up),this._nameSelected=!0)}}var lc=U(92579);class uc{static createSocialStatusIcons(k){const B=K.q.instance.game.renderer;return Object.keys(uc.SOCIAL_STATUS_RENDER_PARAMS).reduce(((U,F)=>{const G=uc.SOCIAL_STATUS_RENDER_PARAMS[F],j=Math.floor(k*uc.SOCIAL_STATUS_ICON_RESOLUTION),$=uc.SOCIAL_STATUS_ICON_RESOLUTION,H=j+$<<1,W=(new V.Graphics).lineStyle($,G.strokeColor).beginFill(G.fillColor).drawCircle(j+$,j+$,j).endFill(),q=V.RenderTexture.create({scaleMode:V.SCALE_MODES.LINEAR,width:H,height:H});return B.render(W,{renderTexture:q}),U[F]=q,U}),{})}static getSocialStatusText(k){return this._localizer.getText(uc.SOCIAL_STATUS_RENDER_PARAMS[k].locKey)}}uc.SOCIAL_STATUS_ICON_RESOLUTION=2,uc.SOCIAL_STATUS_RENDER_PARAMS={[lc.a.available]:{fillColor:1429577,strokeColor:811284,locKey:"USER_SOCIAL_STATUS_AVAILABLE"},[lc.a.offline]:{fillColor:10461087,strokeColor:4934475,locKey:"USER_SOCIAL_STATUS_OFFLINE"},[lc.a.unavailable]:{fillColor:16762624,strokeColor:11962126,locKey:"USER_SOCIAL_STATUS_UNAVAILABLE"}},(0,G.Cg)([(0,Re.b)(j.$Bt.LocalizationService,!1),(0,G.Sn)("design:type",j.dTp)],uc,"_localizer",void 0);class fc extends Ka.W{constructor(k,B){super(k,B,14,fc.configModifiers,[q._.Ui_shared_json,q._.Ui_forest_progress_json,q._.Ui_shipwreck_progress_json,q._.Ui_shiverchill_progress_json]),this.friendCellList=[],this.friendsList=[],this.classList=[],this.friendRequestList=[],this._playerStatusMeta=[],k.broadcaster.addAppListener(oi.sd.RequestCancelled,this.onListUpdate.bind(this),this,"FriendsList"),k.broadcaster.addAppListener(oi.sd.FriendRemoved,this.onListUpdate.bind(this),this,"FriendsList"),k.broadcaster.addAppListener(oi.sd.RequestAccepted,this.onListUpdate.bind(this),this,"FriendsList"),k.broadcaster.addAppListener(oi.sd.RequestRejected,this.onListUpdate.bind(this),this,"FriendsList"),this.currentInterfaceName=ph.B.FriendsList,this._socialStatusIcons=uc.createSocialStatusIcons(9)}create(){this.fireInterfaceEvent({originType:bi.$N.ButtonClick,originID:jh.k.Friend}),super.create()}preprocess(){this.getLists(),this.queuePostCreateCallback(this.fillView.bind(this,this.friendsList),this.setButtons.bind(this))}update(){super.update(),this._socialStatusIcons&&this.refreshPlayerStatuses()}onListUpdate(){this.getLists(),this.setButtons(),this.fillView(this.friendsList,!1)}getLists(){K.q.instance.prodigy.friendsListNetworkHandler.getFriendRequestList(0,K.q.instance.prodigy.friendsListNetworkHandler.getFriendsCap()).then((()=>{this.updateFriendRequestList()})),K.q.instance.prodigy.friendsListNetworkHandler.getUserAppearance(K.q.instance.prodigy.friendsListNetworkHandler.classList,!0),this.friendsList=K.q.instance.prodigy.friendsListNetworkHandler.friendsList,this.classList=K.q.instance.prodigy.friendsListNetworkHandler.classList,this.updateFriendRequestList()}updateFriendRequestList(){this.friendRequestList=K.q.instance.prodigy.friendsListNetworkHandler.friendRequestList,this.requestsButton&&(this.requestsButton.visible=this.friendRequestList.length>0)}setButtons(){const k=this.titleBanner,B=k.text;k.setText(this._localizer.getText("FRIENDS_LIST_TITLE"));const U=B.width+70-k.width;U>0&&(k.width+=U,k.x=k.parent.width-k.width>>1,B.scale.x=1/k.scale.x,B.x=k.width-B.width/B.scale.x>>1,B.y=k.height-B.height>>1),this.friendText.setText(this._localizer.getText("FRIENDS_LIST_FRIENDS_BUTTON")),this.classmatesText.setText(this._localizer.getText("FRIENDS_LIST_CLASSMATES_BUTTON")),this.closeButton.onClickCallback=k=>{this.fireButtonEvent({buttonName:jh.k.X,destinationName:K.q.instance.prodigy.world.getCurrentZone()}),this.close(k)},this.friendButton.onUpCallback=this.fillView.bind(this,this.friendsList),this.classmatesButton.onUpCallback=this.fillView.bind(this,this.classList,!0),this.requestsButton.onUpCallback=K.q.instance.prodigy.open.friendRequests.bind(K.q.instance.prodigy.open,this.preprocess.bind(this)),this.updateFriendRequestList()}setupScrollBar(){this.friendScrollView.linkScrollBar(this.friendScrollBar),this.friendScrollView.setToScrollPercent(0)}fillView(k,B=!1){this.friendButton.setActive(B),this.classmatesButton.setActive(!B),this.clearScrollView(),$.remove(k,(k=>!j.Aq$.isDefined(k.appearance)||!j.Aq$.isDefined($.get(k,"data.level",null))));const U=$.sortBy($.map(k,(k=>{const B=new Oe.a(this.game);return B.init(k),{player:B,status:k.status}})),(k=>k.player.getNameWithoutNickname()));for(let F=0;F=3){const k=G[G.length-1];$="";for(let B=0;B{var k;K.q.instance.prodigy.open.card(K.q.instance.prodigy.friendsListNetworkHandler.getFriend(U[F].player.userID),!1,null===(k=this._playerStatusMeta.find((k=>k.userId===U[F].player.userID)))||void 0===k?void 0:k.status)},this.friendCellList.push(k)}this.friendContents.layoutElement.calculateChildren(),this.friendScrollView.setupVisibleIndices(),this.friendScrollView.calculateMaxScrollDist(),this.setupScrollBar(),U.length<=0&&(B?this.noFriendsText.setText(this._localizer.getText("UI_ZONE_NO_CLASSMATES")):this.noFriendsText.setText(this._localizer.getText("UI_ZONE_NO_FRIENDS"))),this.noFriendsElement.visible=U.length<=0,this.friendScrollBar.visible=U.length>2,this.fireTabEvent({tabName:k===this.classList?"classmatesButton":"friendButton"}),this._socialStatusIcons&&this.refreshPlayerStatuses(!0)}clearScrollView(){this.friendScrollView.clearScrollView(),this._playerStatusMeta=[],this.friendCellList=[],this.setupScrollBar()}refreshPlayerStatuses(k=!1){if(j.Aq$.isDefined(this._playerStatusRefreshPromise))return;if(!k&&Date.now()>this._lastPlayerStatusRefresh+1e3)return;const B=$.uniq([...this.friendsList.map((k=>`${k.userID}`)),...this.classList.map((k=>`${k.userID}`))]);0!==B.length&&(this._playerStatusRefreshPromise=this._synapse.getFriendsStatuses(B),this._playerStatusRefreshPromise.then((k=>{var B;for(const U of this._playerStatusMeta){const F=null!==(B=k[`${U.userId}`])&&void 0!==B?B:lc.a.offline;F!==U.status&&(U.sprite.texture=this._socialStatusIcons[F],U.text.text=uc.getSocialStatusText(F),U.text.position.set(-24-U.text.width,1),U.container.visible=!0,U.status=F)}})).finally((()=>{this._lastPlayerStatusRefresh=Date.now(),this._playerStatusRefreshPromise=null})))}close(k){this.game.broadcaster.removeAppListener(oi.sd.RequestCancelled,this,"FriendsList"),this.game.broadcaster.removeAppListener(oi.sd.FriendRemoved,this,"FriendsList"),this.game.broadcaster.removeAppListener(oi.sd.RequestAccepted,this,"FriendsList"),this.game.broadcaster.removeAppListener(oi.sd.RequestRejected,this,"FriendsList"),null==k||k(),this.fireInterfaceEvent({closeMethod:bi.Lv.X}),super.close()}}fc.FRIEND_PANEL_WIDTH=375,fc.FRIEND_PANEL_PADDING=7,fc.configModifiers={},(0,G.Cg)([(0,Re.b)("779-a746"),(0,G.Sn)("design:type",Ue.d)],fc.prototype,"_synapse",void 0),(0,G.Cg)([(0,Re.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],fc.prototype,"_localizer",void 0);var bc=U(44357),pc=U(4324);class vc extends Ka.W{constructor(k,B,U){super(k,B,42,{},[J.Q.Spine_academygh_addkeystone_json]),this.closeButton=null,this.keystonesContainer=null,this.allPlacedText=null,this.localizer=null,this.academyZone=null,this.localizer=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),this.setCloseCallback(U),this.academyZone=K.q.instance.prodigy.world.getZone(hn.A_.ACADEMY)}create(){super.create(),this.closeButton.onUpCallback=()=>{K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:ph.B.KeystonePopup,interfaceType:bi.Wm.Menu,closeMethod:bi.Lv.CloseButton}),this.close()};const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=Dn.N.getAllTowerData();for(let U=0;U0;if(j.Aq$.isDefined(W)&&W!==Dn.s.None){const k=wr.j.createRenderer(J.Q.Spine_academygh_addkeystone_json,{type:"spine"});k.playAnimation(`keystone-idle-${F.keystone.zone}`,!0),new yr._(this.game,$[G],[k],1,3),V.setText(this.localizer.getText("KEYSTONE_UNLOCKED"))}else this.allPlacedText.visible=!1,H.tint=5789784,H.inputEnabled=!0,q?($[G].highlight(!0,-60,-35),H.tint=15132390,V.setText(this.localizer.getText("KEYSTONE_READY")),H.events.onInputUp.add((()=>{this.placeOnPedestal(F.keystone,F.element).catch(j.RQr.createHandler(`Error placing ${F.element} keystone`))}))):(V.setText(""),H.events.onInputUp.add((()=>{this.popupMessage(this.localizer.getText("KEYSTONE_PEDESTAL_NOT_FOUND"))})))}K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:ph.B.KeystonePopup,interfaceType:bi.Wm.Menu})}placeOnPedestal(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this.academyZone.anyKeystonesPlaced()){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.set("keystones-first",Object.assign({element:B},k)),K.q.instance.prodigy.gameContainer.get("c47-20b6").academyTowers.sendFunnelEvent({funnelName:"academy_towers",funnelType:"story",step:Bn.D.FirstKeystonePlaced},B)}this.close(),K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:ph.B.KeystonePopup,interfaceType:bi.Wm.Menu,closeMethod:bi.Lv.KeystonePlaced});const U=K.q.instance.prodigy.world.getZone(hn.A_.ACADEMY).getMap("GH2");bc.QQ(this.game,!1),pc.k.setGuideHandActive(!1),yield pc.k.placeKeystone(this.game,U.screen,k,B),bc.QQ(this.game,!0)}))}popupMessage(k){const B=this.localizer.getText("BUTTON_OKAY_UPPERCASE");K.q.instance.prodigy.open.messageBoxOkay(k,B,null)}}class gc extends Ka.W{constructor(k,B,U,F=null,G){super(k,B,45,j.Aq$.isDefined(G)?G:{},[q._.Popup_ui_roulette_json]),this.skipButton=null,this.watchButton=null,this.openVideoCallback=null,this.onClose=F,this.openVideoCallback=U}create(){super.create(),this.skipButton.onUpCallback=()=>{this.close()},this.watchButton.onUpCallback=()=>{this.openVideo()}}openVideo(){j.Aq$.isDefined(this.openVideoCallback)&&(this.onClose=null,this.openVideoCallback()),this.close()}}var mc=U(25983);class yc extends Ka.W{constructor(k,B,U,F,G){super(k,B,200,void 0,[]),this.onPrefabLoaded=new j.HN0,this._confirmCallback=null,this._closeCallback=null,this._skipCloseCallback=!1,this._confirmCallback=F,this._closeCallback=G,this._zoneData=U}create(){super.create(),K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(Ei.l.MapLocationDialog).then((k=>{var B;this._ui=k,this._ui.onDestroy.add(this.destroy,this),null===(B=this._rearOverlay)||void 0===B||B.destroy(),this.configure(this._ui)}))}setSkipCallback(){this._skipCloseCallback=!0}close(){var k;this._skipCloseCallback||null===(k=this._closeCallback)||void 0===k||k.call(this),this._ui.destroy(),this.onPrefabLoaded.dispose(),this._skipCloseCallback=!1,super.close()}configure(k){var B;if(null===(B=this._zoneData)||void 0===B?void 0:B.useLocationDialogPrefab){const B=k.findComponent(mc.s),U=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),F=Ta.i.isZoneLocked(this._zoneData.zone);F?B.showOneButton(this._zoneData.splashImage,this._zoneData.getLockName(),this._zoneData.getLockMessage(),U.getText("BUTTON_OKAY_CAPITAL"),F):B.showTwoButton(this._zoneData.splashImage,this._zoneData.getName(),this._zoneData.getSummary(),U.getText("NOT_NOW"),this._zoneData.getGoButtonText(),F),B.onClose.addOnce((()=>{var k;null===(k=this._closeCallback)||void 0===k||k.call(this),this._ui.destroy(),this.destroy()})),B.onConfirm.addOnce((()=>{var k;null===(k=this._confirmCallback)||void 0===k||k.call(this)})),this.onPrefabLoaded.dispatch(this._ui)}}}var _c=U(11117);class Ec extends Ka.W{constructor(k,B,U){super(k,B,51,{},[q._.Popup_ui_roulette_json,q._.Npc_face_noot_json,q._.Popup_member_modular_json]),this.okayButton=null,this.setCloseCallback(U)}create(){super.create(),K.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelQuit("At-School-Dialog","At-School"),this.okayButton.onUpCallback=()=>{this.close()}}setUIConfig(k){}}var wc=U(31211),Tc=U(91315),Sc=U(53452);class Ac extends Ka.W{constructor(k,B,U){super(k,B,4,U),this.mailData=null,this.attachments=[],this.attachmentImageID=0,this.shouldRenderAttachments=!0,this._externalMethods=null,this.closeButton=null,this.titleText=null,this.bodyText=null,this.imageContainer=null,this.imageLoader=null,this.loadingSpinner=null,this.actionButtonText=null,this.actionButtonContainer=null,this.actionButton=null,this.attachmentContainer=null,this.content=null,this.woodBackground=null,this.deleteMailCallback=null,k.broadcaster.addAppListener(oi.zr.MarkAsRead,this.markAsReadFailed,this,oi.HG.Mailer),this._externalMethods=K.q.instance.prodigy.gameContainer.get("eb9-3fdf")}preprocess(k){this.mailData=k,"noImage"!==k.image&&(Tn.J.isGuid(k.image)?this.preloadLocalMailImage(k.image):this.addImageToAssets(k.image,k.vImage)),this.queuePostCreateCallback((()=>{this.tweenLoader(),this.renderMenu(),this.closeButton.onClickCallback=this.close.bind(this)})),k.isOpened||this.isSingleUse()||this.queuePostCreateCallback((()=>{this.game.broadcaster.broadcast(oi.zr.MarkAsRead,oi.HG.MailView,[()=>{this.markReadSuccess()},this.mailData])}))}close(){this.game.broadcaster.removeAppListener(oi.zr.MarkAsReadFailure,this,oi.HG.Mailer),this.game.broadcaster.removeAppListener(oi.zr.MarkAsRead,this,oi.HG.Mailer),super.close(),this.destroy()}setDeleteMailCallback(k){this.deleteMailCallback=k}markReadSuccess(){if(!this.matchGameMethod(this._externalMethods.openGiftBox.functionName))if(Sc.b.isDebugMailData(this.mailData)){const k=this.mailData.attachments;j.Aq$.isDefined(k)&&k.length>0&&K.q.instance.prodigy.open.gotItem(k,null,null,"mail-open",null,null,{source_type:gn.C.Container})}else{K.q.instance.prodigy.gameContainer.get("535-27b9").collectMailRewards(this.mailData).then((k=>{const B=Sc.b.mergeSecureUnsecure(k.rewards,k.unsecuredRewards);j.Aq$.isDefined(B)&&B.length>0&&K.q.instance.prodigy.open.gotItem(B,null,null,"mail-open",null,null,{source_type:gn.C.Container})})).catch((k=>{const B=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);K.q.instance.prodigy.open.message(B.getText("ERROR_DIALOG_BODY"))}))}}markAsReadFailed(){if(j.Aq$.isDefined(this.game)){const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);K.q.instance.prodigy.open.message(k.getText("MAIL_UNAVAILABLE"),this.closeOnFailed.bind(this),null,k.getText("MESSAGE_TITLE_OOPS"))}}renderMenu(){this.titleText.setText(this.mailData.subject.toUpperCase()),this.bodyText.setText(this.mailData.message),this.renderImages(),this.renderCheckItOutButton(),this.renderAttachments(),this.resize()}renderImages(){if("noImage"===this.mailData.image)return;const k=this.mailData.image.length>0?this.mailData.image:nr.q.Letter_mail_open_image;K.q.instance.prodigy.create.sprite(Math.floor(this.imageContainer.width/2),Math.floor(this.imageContainer.height/2),k,null,{x:.5,y:.5},this.fixImage.bind(this),null,null)}tweenLoader(){if("noImage"===this.mailData.image)return this.imageContainer.destroy(),void this.resize();this.imageLoader.image.pivot.x=.5,this.imageLoader.image.pivot.y=.5,this.imageLoader.image.anchor.x=.5,this.imageLoader.image.anchor.y=.5,this.imageLoader.image.x+=.5*this.imageLoader.width,this.imageLoader.image.y+=.5*this.imageLoader.height,this.loadingSpinner=this.game.add.tween(this.imageLoader.image,this).to({angle:360},2e3,j.GS3.Linear.None,!0,0,Vt.s.MAX_SAFE_INTEGER,!1)}fixImage(k){j.Aq$.isDefined(this.loadingSpinner)&&(K.q.instance.game.tweens.remove(this.loadingSpinner),this.loadingSpinner=null),this.imageLoader.visible=!1;const B=this.imageContainer.width-40;if(this.imageContainer.add(k),k.smoothed=!0,k.y=.5*this.imageContainer.height,k.width>B){const U=1-(k.width-B)/B;k.scale.x=U,k.scale.y=U}this.resize()}renderCheckItOutButton(){var k;if(j.Aq$.isDefined(this.mailData.gameMethod)&&this._externalMethods.doesFunctionExist(this.mailData.gameMethod.name)){const B=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this.matchGameMethod(this._externalMethods.openGiftBox.functionName)?j.Aq$.isDefined(this.actionButtonText)&&(this.actionButtonText.setText(B.getText("MAIL_CLICK_TO_OPEN")),(null===(k=this.mailData.attachments)||void 0===k?void 0:k.length)>0&&this.actionButtonText.setText(B.getText("MAIL_OPEN_MY_BOX"))):this.matchGameMethod(this._externalMethods.openMembershipSignUp.functionName)&&this.actionButtonText.setText(B.getText("MAIL_BECOME_A_MEMBER")),j.Aq$.isDefined(this.mailData.gameMethod.buttonText)&&""!==this.mailData.gameMethod.buttonText&&this.actionButtonText.setText(this.mailData.gameMethod.buttonText.toUpperCase()),this.isSingleUse()&&(this.shouldRenderAttachments=!1),this.actionButtonContainer.visible=this.shouldShowActionButtonContainer(),this.actionButton.onClickCallback=this.runMailAction.bind(this,this.mailData.gameMethod)}else this.actionButtonContainer.visible=!1}isSingleUse(){return Sc.b.isSingleUse(this.mailData)}shouldShowActionButtonContainer(){return!(this.mailData.isOpened&&this.isSingleUse()||this.mailData.isCollected)}matchGameMethod(k){return Sc.b.mailHasGameMethod(this.mailData,k)}renderAttachments(){var k;if(!this.shouldRenderAttachments)return void this.attachmentContainer.destroy();this.attachmentImageID=0;const B=this.attachmentContainer;for(let U=0;U<(null===(k=this.mailData.attachments)||void 0===k?void 0:k.length);U++){const k=this.instantiateTemplate("attachmentItem",B);this.attachments.push(k);const F=this.mailData.attachments[U],G=K.q.instance.prodigy.icon.iconKey(F);K.q.instance.prodigy.icon.createIcon(Math.floor(.5*k.attachmentItem.width),Math.floor(.5*k.attachmentItem.height)-3,G,{x:.5,y:.5},(k=>{this.attachments[this.attachmentImageID++].attachmentImage.add(k)})),j.Aq$.isDefined(F.N)&&F.N>1&&(k.amount.visible=!0,k.amount.setText(F.N.toString()))}this.attachments.length<=0&&this.attachmentContainer.destroy()}runMailAction(k){this.matchGameMethod(this._externalMethods.openGiftBox.functionName)?this.mailData.isOpened||(this.actionButtonContainer.visible=!1,K.q.instance.prodigy.gameContainer.get("c47-20b6").container.sendContainerOpenedEvent(bi.ZF.MonthlyMemberBox,null,Ai.N.OpenWorld)):this.actionButtonContainer.visible=this.shouldShowActionButtonContainer(),this._externalMethods.runFunction(k.name,k.params,this.mailData.attachments,this.mailData,[()=>{this.close()},this.deleteMailCallback])}resize(){this.content.layoutElement.calculateChildren();const k=this.content.layoutElement.getContentHeight()+30;this.woodBackground.resize(this.woodBackground.width-20,k),this.woodBackground.y=Math.floor((this.game.height-k)/2)}closeOnFailed(){this.game.broadcaster.broadcast(oi.zr.CloseList,oi.HG.Mailer),this.close()}preloadLocalMailImage(k){Object.values(nr.q).includes(k)?K.q.instance.prodigy.load.assets(k):j.VyI.log(`Could not find local image with GUID: ${k} in ESingleImageGameAssets.`,j.$bb.Error)}addImageToAssets(k,B=1){const U={};U[k]={type:"singleImage",v:j.Aq$.isDefined(B)&&B>0?B:1},K.q.instance.prodigy.assets.assignAssets(U)}}const Cc={XP_BONUS:{frameName:"small-star-boost",trackingEvent:"XPBonus-Icon-Click"},BUDDY_FOX:{frameName:"get-fox-buddy",trackingEvent:"Buddy-Icon-Click"},BUDDY_SPARKLE_PUP:{frameName:"get-sparkle-pup-buddy",trackingEvent:"Buddy-Icon-Click"},FIREWORKS:{frameName:"get-free-fireworks",trackingEvent:"Fireworks-Icon-Click"},TRACKING_EVENT_MOBILE:"Mobile-Message-Displayed",TRACKING_EVENT_SIGN_UP:"Signup-Button-Click",TRACKING_EVENT_PLAY_ONLY:"Signup-Button-Play",TRACKING_EVENT_LINK_PARENT:"Signup-Button-LinkParent",TRACKING_EVENT_POPUP_SHOWN:"Popup-Shown",TRACKING_EVENT_SCHOOL_HOURS:"School-Hours-Message-Displayed",TRACKING_EVENT_RECEIVED_REWARDS:"Parent-Benefits-Rewards-Received",MESSAGE_MOBILE:"PARENT_LINK_MOBILE_MESSAGE",MESSAGE_POST_CLICK:"PARENT_LINK_POST_CLICK",MESSAGE_SCHOOL_HOURS:"PARENT_LINK_SCHOOL_HOURS",ATLAS:q._.Popup_parent_link_json,DESCRIPTION_TEXT_BG_HEIGHT_PERCENT:.25,REWARD_ICONS_BG_HEIGHT_PERCENT:.5,LINK_ACCOUNT_BG_HEIGHT_PERCENT:.88,CLOSE_BTN_OFFSET:{x:-10,y:10},BODY_TEXT_OFFSET:{x:40,y:0},ICON_TWEEN_TIME_MS:125,ICON_TWEEN_DELAY_MS:125,ICON_TWEEN_AMOUNT_Y:20,SUCCESS_POPUP_CONFIG:{headerText:"PARENTAL_LINK_TITLE_SUCCESS",bodyText:"PARENT_LINK_SUCCESS_BODY",showCloseButton:!1},AT_SCHOOL_POPUP_CONFIG:{headerText:"PARENTAL_LINK_TITLE",bodyText:"PARENTAL_LINK_CONTENT_SCHOOL",showCloseButton:!0}};var Oc=U(71586);class Ic extends Ka.W{constructor(k,B,U,F,G){super(k,B,26,void 0,[q._.Ui_common_neutral_json,q._.Popup_ui_roulette_json,q._.Ui_store_json]),this.popupConfig=null,this.onRewardIconClickCallback=null,this.onContinueCallback=null,this.onCloseCallback=null;K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.parentalLink=!0,this.onContinueCallback=G,this.onCloseCallback=F,this.popupConfig=U,this.onRewardIconClickCallback=null,super.queuePostCreateCallback((()=>{this.setupMenu()}))}setupMenu(){const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);switch(this.popupConfig){case Cc.AT_SCHOOL_POPUP_CONFIG:this.instantiateTemplate("atSchoolContainer",this.findUIElement("buttonTemplateContainer")).playAtSchoolButton.onClickCallback=()=>{this.onContinueClick()};break;case Cc.SUCCESS_POPUP_CONFIG:this.instantiateTemplate("successContainer",this.findUIElement("buttonTemplateContainer")).okayButton.onClickCallback=()=>{this.onOkayClick()}}this.popupConfig.showCloseButton&&(this.findUIElement("closeButton").visible=!0,this.findUIElement("closeButton").onClickCallback=()=>{j.Aq$.isDefined(this.onCloseCallback)&&this.onCloseCallback(),this.close()}),this.findUIElement("bannerText").setText(k.getText(this.popupConfig.headerText)),this.findUIElement("contentText").setText(k.getText(this.popupConfig.bodyText)),this.renderFeatureIcons(0,this.findUIElement("woodBackground"))}renderFeatureIcons(k,B,U=3,F=40,G=80){const $=[Cc.XP_BONUS,Cc.BUDDY_SPARKLE_PUP,Cc.FIREWORKS];for(let H=k;H{this.onRewardIconClickCallback(U.trackingEvent)}:null,W=K.q.instance.prodigy.create.button(B,(F+170)*(H-k)+G,205,Cc.ATLAS,U.frameName,V);this.popupConfig===Cc.AT_SCHOOL_POPUP_CONFIG&&W.setInactive(16777215)}}onOkayClick(){const k=()=>{j.Aq$.isDefined(this.onCloseCallback)&&this.onCloseCallback(),this.close(),uh.A.displayToolTipAuto(null,null,{bodyText:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("PARENTAL_LINK_TITLE_SUCCESS"),xPosition:635,yPosition:100})};0===K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("follow",34)?K.q.instance.prodigy.open.gotItem([{type:"follow",ID:34,N:1},{type:"item",ID:76,N:10}],k,null,"parental-link"):k()}onContinueClick(k=null){j.Aq$.isDefined(this.onContinueCallback)&&this.onContinueCallback();const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.popupConfig===Cc.AT_SCHOOL_POPUP_CONFIG?B.data.atSchoolTimestamp=Oc.R.getDateTime():B.data.atHomeTimestamp=Oc.R.getDateTime(),this.close()}static isInfoRequired(k){return!k.parentalLink&&!Tn.J.isSchoolHours()&&!k.hasValidatedParentEmail()&&k.hasCompletedTutorial()}static isSuccessRequired(k){return k.hasValidatedParentEmail()&&k.hasCompletedTutorial()&&k.backpack.hasItem("follow",34)<=0}}class Dc extends Ka.W{constructor(k,B){super(k,B,40,{},[q._.Popup_ui_roulette_json,q._.Ui_shared_json])}create(){super.create();const k=K.q.instance.prodigy.gameContainer.get("c97-bd0d");this.findUIElement("backButton").onUpCallback=()=>{this.close()},this.findUIElement("loginButton").onUpCallback=()=>{k.logout()}}}var Rc=U(39984),Pc=U(99183);class Mc extends Pc.k{constructor(k,B,U,F,G,$,H,V,W=!0){super(k,B,U,F,G,$,H,103,[q._.Ui_raster_icons_json,q._.Ui_raster_icons_json,nr.q.Ui_pet_xp_sunburst_white],V,W),this._eligibleCreaturesForBoost=[],this._nonEligibleCreatures=[],this._onElementsInstantiated=new j.HN0,this._multiplier=Si.c.instance.getBoostMultiplier(),this.currentCreatures&&(this._eligibleCreaturesForBoost=this.currentCreatures.filter((k=>k instanceof fa.R&&Si.c.instance.getEligiblePetIDs().includes(k.data.ID))),this._nonEligibleCreatures=this.currentCreatures.filter((k=>!this._eligibleCreaturesForBoost.includes(k))),this.queuePostCreateCallback(this.instantiateElements.bind(this)),this._onElementsInstantiated.addOnce((()=>{this._onElementsInstantiated.dispose(),this.changeSunburstBackgroundTint(16772830,16706454),this.createCreatureDisplays(),this.addXPBarMultiplierPill(),this.setStarsEarnedMessage(this._nonEligibleCreatures,this.xpGained.totalNonMemberXp),this.loadBottomDisplayCreatureIcons(this._nonEligibleCreatures,this._nonEligibleCreaturesAvatars),this.loadBottomDisplayCreatureIcons(this._eligibleCreaturesForBoost,this._eligibleCreaturesAvatars,!0),this.setupUIElements(),this.buildEventsQueue(),this.buildCommonEventsQueue(),this.animateDropIn()})))}addXPBarMultiplierPill(){this._eligibleCreaturesForBoost.forEach((k=>{const B=this.currentCreatures.indexOf(k),U=this.creatureDisplays[B],F=this.instantiateTemplate(Mc.XP_BAR_MULTIPLIER_PILL,U.xpBar),G=`${this._multiplier}x`;F[Mc.BOOST_MULTIPLIER_TEXT].setText(G)}))}setStarsEarnedMessage(k,B){this._battleStarsEarned.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(Mc.MAX_STARS_EARNED));let U=!1;k.forEach((k=>{const F=hi.s.activePlayerLevelCap;if(!U&&Rc.e.levelFromStars(k.getStars()+B,k.creatureType,F){F.standStill()}))}}else if(j instanceof pa.s){const k=K.q.instance.prodigy.create.character(B,j,Mc.SCALE_VALUE,U,0,!1,{isPreview:!0,hideMount:!0});k.y=k.height,k.reload((()=>{k.standStill()}))}else{const k=K.q.instance.prodigy.create.sprite(0,0,Ut.E.getIconForType("pet",j.data.ID),null,{x:.5,y:.5}),F=K.q.instance.prodigy.create.element(B,U,0);F.scale=new V.Point(Mc.SCALE_VALUE,Mc.SCALE_VALUE),F.height=k.height,F.add(k)}}U&&B.children.forEach((k=>{const B=this.instantiateTemplate("bottomDisplayMultiplierPill",k),U=`${this._multiplier}x`;B[Mc.BOOST_MULTIPLIER_TEXT].setText(U)}))}changeSunburstBackgroundTint(k,B){this._sunBurstRect.tint=j.yQ0.WHITE,this._bottomDisplaySunBurst.image.tint=j.yQ0.WHITE,this._sunBurstRect.tint=k,this._bottomDisplaySunBurst.image.tint=B}instantiateElements(){this._battleStarsEarned=this.findUIElement("battleStarsEarned"),this._nonEligibleCreaturesAvatars=this.findUIElement("nonEligibleCreaturesAvatars"),this._eligibleCreaturesAvatars=this.findUIElement("eligibleCreaturesAvatars"),this._bottomDisplaySunBurstBg=this.findUIElement("bottomDisplaySunBurstBg"),this._sunBurstRect=new V.Graphics,this._sunBurstRect.beginFill(16777215),this._sunBurstRect.drawRoundedRect(0,0,this._bottomDisplaySunBurstBg.width,this._bottomDisplaySunBurstBg.height,Mc.ROUND_RECT_RADIUS),this._sunBurstRect.endFill(),this._bottomDisplaySunBurstBg.add(this._sunBurstRect),this._bottomDisplaySunBurst=this.findUIElement("bottomDisplaySunBurst"),this._onElementsInstantiated.dispatch()}showBottomDisplayCreatureIconsAndText(k){k.visible=!0,this._battleStarsEarned.visible=!0,this._battleStarsEarned.alpha=1,this.game.add.tween(this._battleStarsEarned.scale,this).from({x:0,y:0},1e3,j.GS3.Back.Out,!0).onTweenComplete.add(this.runNextEvent.bind(this))}buildEventsQueue(){this.eventQueue.push(this.runNextEvent.bind(this,300),this.showBottomDisplayCreatureIconsAndText.bind(this,this._nonEligibleCreaturesAvatars),this.applyXPGainToTeam.bind(this,this._nonEligibleCreatures,this.xpGained.totalNonMemberXp),this.runNextEvent.bind(this,1e3),(()=>{this.game.add.tween(this._battleStarsEarned,this).to({alpha:0},1e3,j.GS3.Back.Out,!0).onTweenComplete.add((()=>{this._nonEligibleCreaturesAvatars.visible=!1,this._battleStarsEarned.visible=!1,this.runNextEvent()}))}),this.setBottomDisplayForEligibleCreatures.bind(this),this.showBottomDisplayCreatureIconsAndText.bind(this,this._eligibleCreaturesAvatars),this.applyXPGainToTeam.bind(this,this._eligibleCreaturesForBoost,this.xpGained.totalNonMemberXp*this._multiplier),this.unlockAcademyDialogue.bind(this),this.unlockNootTowerDialogue.bind(this),...this.buildPopupEvents(),this.runNextEvent.bind(this,1500),this.bottomSectionFadeOutAnimation.bind(this,this.bottomDisplayContainer,this.runNextEvent.bind(this)),(()=>{this.changeSunburstBackgroundTint(16772830,16706454),this.runNextEvent()}))}setBottomDisplayForEligibleCreatures(){this.changeSunburstBackgroundTint(15924460,13236420),this._battleStarsEarned.textObject.style.fill=4027215,this._battleStarsEarned.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(Mc.MAX_STARS_EARNED));let k=!1;const B=this.xpGained.totalNonMemberXp*this._multiplier;this._eligibleCreaturesForBoost.forEach((U=>{const F=hi.s.activePlayerLevelCap;if(!k&&Rc.e.levelFromStars(U.getStars()+B,U.creatureType,F)0}getBannerLocKey(){return"SUMMARY_POPUP_NEW_HEARTS"}setup(){K.q.instance.prodigy.audio.playSFX(32,"popUpDisplay"),K.q.instance.prodigy.create.sprite(0,0,q._.General_battle_json,"icon-heart",new j.I9Y(.5,.5),(k=>{j.Aq$.isDefined(this.spriteHolder)&&(this.spriteHolder.add(k),this.game.add.tween(k.scale,this).from({x:0,y:0},1e3,j.GS3.Elastic.Out,!0))})),this.setActionText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SUMMARY_POPUP_HEARTS_EARNED",this.currentCreature.getFirstName(),this.numHeartsGained))}}var Fc=U(87239);class Gc extends Bc.l{constructor(k,B,U,F){super(k,B,U,F,21),this.newAttackList=[],this.newAttackList=F.diffAvailableSpellsV2(U.getLevel()),this.queuePostCreateCallback(this.showNextSpell.bind(this),this.setupButton.bind(this))}showNextSpell(){this.newAttackList.length<=0?this.close():(K.q.instance.prodigy.audio.playSFX(32,"popUpDisplay"),this.loadSpell(this.newAttackList.shift()))}loadSpell(k){var B;const U=Fc.x.getUnlockedSpellDisplayInformation(k);k.newlyUnlocked?this.setActionText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SUMMARY_POPUP_SPELL_UNLOCKED",this.currentCreature.getFirstName(),U.newSpellName)):this.setActionText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SUMMARY_POPUP_SPELL_EVOLVED",U.oldSpellName,U.newSpellName));const F=Tn.J.convertLegacyElements(U.elementType);this.ballDisplay.image.loadTexture(q._.Ui_battle_revamp_legacy_json,`pet-icon-backers-${F}`),this.okayButton.visible=!1,null===(B=this.spellIcon)||void 0===B||B.destroy(),this.spellIcon=K.q.instance.prodigy.create.sprite(0,0,U.spellIcon[0],U.spellIcon[1],new j.I9Y(.5,.5),(k=>{if(j.Aq$.isDefined(this.spriteHolder)){this.spriteHolder.add(k);this.game.add.tween(k.scale,this).from({x:0,y:0},1e3,j.GS3.Elastic.Out,!0),K.q.instance.prodigy.audio.playSFX(32,"popUpDisplay"),this.okayButton.visible=!0}}))}setupButton(){this.okayButton.onUpCallback=()=>{this.fireButtonEvent({buttonName:jh.k.Okay}),this.showNextSpell()}}isRequired(){return this.newAttackList.length>0}getBannerLocKey(){return"SUMMARY_POPUP_NEW_SPELL"}}var jc=U(47717);class $c extends Ka.W{constructor(k,B,U,F){super(k,B,9,{modifyProperty:[{element:"rewardsContainer",property:"visible",value:!U},{element:"infoContainer",property:"visible",value:U},{element:"shardsInfoText",property:"textKey",value:F}],addChildren:[],modifyTemplateProperty:[]}),this.infoToggle=!1,this.closeButton=null,this.playerProgress=0,this.percentageComplete=0,this.progressSlider=null,this.timer=null,this.infoToggle=U}preprocess(){this.queuePostCreateCallback((()=>{this.openTween(),this.game.broadcaster.addAppListener(oi.RZ.GotTitan,(()=>{this.renderBar()}),this,"TitanProgress",!1),this.closeButton.onClickCallback=this.close.bind(this),this.callTitanHits()}))}close(k){j.Aq$.isDefined(this.timer)&&window.clearInterval(this.timer),j.Aq$.isDefined(k)&&k(),this.game.broadcaster.removeAppListener(oi.RZ.GotTitan,this,"TitanProgress"),super.close()}callTitanHits(){this.infoToggle||K.q.instance.prodigy.titansNetworkHandler.getTitan(K.q.instance.prodigy.titansNetworkHandler.titan.id,"TitanProgress")}renderBar(){K.q.instance.prodigy.titansNetworkHandler.isTitanAlive()?(this.playerProgress=$.get(K.q.instance.prodigy.titansNetworkHandler,"titan.hits",0),this.percentageComplete=this.playerProgress/70,this.setProgress(),this.makeNotches()):this.titanDeadKick()}setProgress(){this.progressSlider.setPercentComplete(this.percentageComplete,!0)}makeNotches(){const k=K.q.instance.prodigy.titansNetworkHandler.titan.increments,B=K.q.instance.prodigy.titansNetworkHandler.titan.rewards;for(let U=0;Uk[U]&&Uk[U]&&U===k.length-1?this.instantiateTemplate("notch",this.progressSlider).notch:this.instantiateTemplate("notchFade",this.progressSlider).notchFade,F.x=this.progressSlider.getPositionAtPercent(Math.min(k[U]/70,.95))+F.width,F.y=F.defaultY=75,F.children[2].setText(B[U].toString())}}titanDeadKick(){const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),B=K.q.instance.prodigy.open.message(k.getText("TITAN_DEFEATED_MESSAGE"),(()=>{this.close((()=>{K.q.instance.prodigy.world.goToZoneHub(K.q.instance.prodigy.world.getCurrentZone())}))}),null,k.getText("TITAN_DEFEATED_TITLE"),null,{isModal:!1});B.queuePostCreateCallback((()=>{B.okayButton.setInputBlockPriority(Ia.z.SYSTEM_INFO)}))}}class Hc extends Ka.W{get ui(){return this._ui}constructor(k,B,U,F,G=!1){super(k,B,200,{},[q._.Ui_buttons_json,q._.Ui_dialogues_json,q._.Ui_store_json,q._.Ui_shared_json,q._.Ui_icons_json,Z.c.Sfx_store_equip,Z.c.Sfx_store_purchase,Z.c.Sfx_ui]),this.prefabRoot=null,this._ui=null,this._dismissalButton=null,this.onDismissalClick=new j.HN0,this._xPosition=0,this._yPosition=0,this._arrowXRelPos=.5,this._arrowYRelPos=.5,this._arrowDirection=Br.i.DOWN,this._tooltipSchema={bodyText:""},this.background.visible=!1,this.isModal=G,this._tooltipPrefabID=U,this._tooltipSchema=F,j.Aq$.isDefined(this._tooltipSchema.xPosition)||(this._tooltipSchema.xPosition=this._xPosition),j.Aq$.isDefined(this._tooltipSchema.yPosition)||(this._tooltipSchema.yPosition=this._yPosition),j.Aq$.isDefined(this._tooltipSchema.arrowXRelPos)||(this._tooltipSchema.arrowXRelPos=this._arrowXRelPos),j.Aq$.isDefined(this._tooltipSchema.arrowYRelPos)||(this._tooltipSchema.arrowYRelPos=this._arrowYRelPos),j.Aq$.isDefined(this._tooltipSchema.arrowDirection)||(this._tooltipSchema.arrowDirection=this._arrowDirection)}create(){super.create(),this.background.visible=!1;const k=K.q.instance.prodigy.gameContainer.get("d0e-64fd");if(this._ui=k.load(Hc.PREFAB_ID),this.prefabRoot.addChild(this._ui.legacyTransform.group),this._dismissalButton=this._ui.findComponentInChildren(ic.$),this._dismissalButton.onClick.add((()=>{this.dismissalClicked()})),this._tooltipPrefabID===uh.A.TOOLTIP_SPEECH)uh.A.displayToolTipSpeech(null,this._ui,this._tooltipSchema);else{let k=null;k=uh.A.displayToolTipCustomManual(k,this._ui,this._tooltipPrefabID,this._tooltipSchema),k.GameObject.findComponentsInChildren(ic.$)[0].onClick.add((()=>{this.dismissalClicked()}))}this.game.broadcaster.addAppListener(oi.Bk.OnMouseWheel,(()=>{this.dismissalClicked()}),this,"Input",!1)}dismissalClicked(){j.Aq$.isDefined(this.game)&&this.game.broadcaster.removeAppListener(oi.Bk.OnMouseWheel,this,"Input"),this.onDismissalClick.dispatch(),this.close()}destroy(k){this.onDismissalClick.dispose(),this._ui&&(this._ui.destroy(),this._ui=null),super.destroy(k)}}Hc.PREFAB_ID=123;class Vc extends Vh{constructor(k,B,U,F,G){const j=Si.c.instance.isPlayerQualified(),$=[Z.c.Sfx_results_screen,q._.Popup_ui_roulette_json,q._.Npc_face_gale_json];j&&$.push(nr.q.Ui_pet_xp_boost_graphic),super(k,B,U,0,0,j?102:61,$,G),this._itemTableID=F}setEntranceTemplate(k,B){if(Si.c.instance.isPlayerQualified())this.setExperimentEntranceMenu();else{const k=this.instantiateTemplate("unusedAttemptsTemplate",this.mainPanelButtons);k.enterButton.onUpCallback=()=>{this.onEnterButtonClick()},k.catalogButton.onUpCallback=()=>{this.onCatalogButtonClick(this._itemTableID)};this.instantiateTemplate("unusedAttemptsContent",this.actionContainer)["unused-titleText1"].setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TOWER_ENTRANCE_WELCOME",this.dungeon.name))}const U=this.dungeon.name.charAt(0).toUpperCase()+this.dungeon.name.slice(1);this.MenuTitle.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TOWER_ENTRANCE_LOCKOUT_TITLE",U))}setExperimentEntranceMenu(){const k=Si.c.instance.getSecondPlusScreenData(),B=this.findUIElement("petXPBoostInfoContainer");B.getChildByName("pet-xp-boost-multiplier").setText(`${Si.c.instance.getBoostMultiplier()}${Vc.BOOST_MULTIPLIER_SUFFIX}`);B.getChildByName("pet-xp-boost-description").setText(k.petXpBoostDescription);this.findUIElement("actionContainer").getChildByName("tower-action-description").setText(k.towerActionDescription);const U=this.findUIElement("CatalogButtonContainer").getChildByName("catalogButton"),F=U.getChildByName("catalogButtonText");U.onUpCallback=()=>{this.onCatalogButtonClick(this._itemTableID)},F.setText(k.leftButtonText);const G=this.findUIElement("EnterButtonContainer").getChildByName("enterButton"),j=G.getChildByName("enterButtonText");G.onUpCallback=()=>{this.onEnterButtonClick()},j.setText(k.rightButtonText)}onEnterButtonClick(){this.dungeon.dungeonNameEvent||K.q.instance.prodigy.gameContainer.get("c47-20b6").playerMovementAndDiscovery.sendTowerRunStartedEvent(this.dungeon.name,!0),super.onEnterButtonClick()}}Vc.BOOST_MULTIPLIER_SUFFIX="x";class Wc extends Ka.W{constructor(k,B,U,F,G,j){super(k,B,59,{},[Z.c.Sfx_results_screen,q._.Ui_shared_json]),this.closeButton=null,this.centerCRButton=null,this.commonRoomButton=null,this.floorButton=null,this.zone=U,this.leaveCallback=G,this.nextfloorCallback=F,this.setCloseCallback(j)}create(){super.create(),this.closeButton.onUpCallback=()=>{this.close()},this.menuTitle.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TOWER_EXIT_TITLE",this.zone.CurrentFloor));const k=this.zone;if(k.CurrentFloor===k.TotalFloors)this.titleText.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(`TOWER_EXIT_${k.Warden.name.toUpperCase}`)),this.centerCRButton.onUpCallback=()=>{this.leaveCallback(),this.close()},this.floorButton.visible=!1,this.commonRoomButton.visible=!1;else{this.centerCRButton.visible=!1,this.commonRoomButton.onUpCallback=()=>{this.leaveCallback(),this.close()},this.floorButtonText.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TOWER_EXIT_TO_FLOOR",this.zone.CurrentFloor+1));this.zone.monstersDefeated===this.zone.goalTotal?this.floorButton.onUpCallback=()=>{this.nextfloorCallback(),this.close()}:this.floorButton.setActive(!1,5789784)}}}class qc extends Ka.W{constructor(k,B,U){super(k,B,65,null,[q._.Popup_member_modular_json,q._.Popup_gohome_json,q._.Ui_social_feed_json]),this.okayButton=null,this.graphicContainer=null,this.setCloseCallback(U)}create(){super.create(),this.okayButton.onUpCallback=()=>{this.close()};const k=this.add(K.q.instance.prodigy.create.sprite(0,0,nr.q.Wheel_twilight_large));k.anchor.set(.5,.5),this.graphicContainer.addChild(k)}}var Kc=U(54422);let zc=class extends j.uAl{constructor(){super(...arguments),this._nameText=null}set text(k){this._nameText.text=k}set align(k){this._nameText.boundsAlignH=k,this._nameText.update()}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,j.Lr6)(0),(0,j.nKb)("nameText"),(0,G.Sn)("design:type",j.EYj)],zc.prototype,"_nameText",void 0),zc=(0,G.Cg)([(0,j.EVk)("WizardNameDisplayPrefab")],zc);var Yc=U(47287);let Qc=class extends j.uAl{constructor(){super(...arguments),this._enableButtonHolding=!0,this._holdScrollIntervalDelay=200,this._lastClickTime=0}set enableButtonHolding(k){this._enableButtonHolding=k}set holdScrollIntervalDelay(k){this._holdScrollIntervalDelay=k}get holdScrollIntervalDelay(){return this._holdScrollIntervalDelay}get positiveButton(){return this._positiveButton}get negativeButton(){return this._negativeButton}get canScrollPositive(){return this._carousel.canScrollPositive}get canScrollNegative(){return this._carousel.canScrollNegative}create(){super.create(),this.setUpButtons(),K.q.instance.prodigy.load.assets([Z.c.Sfx_button_disabled_state,Z.c.Sfx_ui]),this._carousel.allowMouseInput&&(this._carousel.onStartedScrolling.add(this.updateButtonStates,this),this._carousel.onFinishedScrolling.add(this.updateButtonStates,this)),this._heldTimer=K.q.instance.game.time.create(!1),this._heldTimer.loop(this._holdScrollIntervalDelay,(()=>{this.scrollCarousel(this._lastDirection)}),this)}destroy(){var k,B;K.q.instance.game.time.destroy(this._heldTimer),this._heldTimer=null,this._carousel&&(null===(k=this._carousel.onStartedScrolling)||void 0===k||k.removeAll(this),null===(B=this._carousel.onFinishedScrolling)||void 0===B||B.removeAll(this)),super.destroy()}setUpButtons(){this.negativeButton.onInputDown.add((()=>{this.scrollCarousel(-1),this.startHeldTimer()})),this.negativeButton.onInputUp.add((()=>{this.endHeldTimer()})),this.positiveButton.onInputDown.add((()=>{this.scrollCarousel(1),this.startHeldTimer()})),this.positiveButton.onInputUp.add((()=>{this.endHeldTimer()}))}updateButtonStates(){this.canScrollNegative?this.negativeButton.unlockState():this.negativeButton.lockState(Zh.K.Disabled),this.canScrollPositive?this.positiveButton.unlockState():this.positiveButton.lockState(Zh.K.Disabled)}scrollCarousel(k){const B=Date.now();this.debounceTimeMs>0&&B-this._lastClickTime{this.getRandomName()})),this._menuPrefab.GameObject.addComponent(Kc.E).initialize(Mo.D.ENTER,(()=>{this.done()})),this._menuPrefab.GameObject.addComponent(Kc.E).initialize(Mo.D.SPACEBAR,(()=>{this.done()})),this._menuPrefab.GameObject.addComponent(Kc.E).initialize(Mo.D.UP,(()=>{this.enableCarouselHighlighters(),this._activeCarouselInput.scrollCarousel(-1),this._activeCarouselInput.startHeldTimer()})),this._menuPrefab.GameObject.addComponent(Kc.E).initialize(Mo.D.DOWN,(()=>{this.enableCarouselHighlighters(),this._activeCarouselInput.scrollCarousel(1),this._activeCarouselInput.startHeldTimer()})),K.q.instance.game.input.keyboard.addKey(Mo.D.UP).onUp.add(this.endTimerHandler,this),K.q.instance.game.input.keyboard.addKey(Mo.D.DOWN).onUp.add(this.endTimerHandler,this),this._menuPrefab.GameObject.addComponent(Kc.E).initialize(Mo.D.RIGHT,(()=>{this.switchCarousels(1)})),this._menuPrefab.GameObject.addComponent(Kc.E).initialize(Mo.D.LEFT,(()=>{this.switchCarousels(-1)})),this._menuPrefab.GameObject.addComponent(Kc.E).initialize(Mo.D.TAB,(()=>{this.switchCarousels(0)}))}switchCarousels(k){K.q.instance.prodigy.audio.playSFX(18,"pop"),0===k?(this._activateMiddleNameCarousel=!this._activateMiddleNameCarousel,this._activeCarouselInput=this._activateMiddleNameCarousel?this._menuPrefab.middleNameCarouselInput:this._menuPrefab.lastNameCarouselInput):-1!==k||this._activateMiddleNameCarousel?1===k&&this._activateMiddleNameCarousel&&(this._activateMiddleNameCarousel=!1,this._activeCarouselInput=this._menuPrefab.lastNameCarouselInput):(this._activateMiddleNameCarousel=!0,this._activeCarouselInput=this._menuPrefab.middleNameCarouselInput),this._menuPrefab.middleNameHighlighter.active=this._activateMiddleNameCarousel,this._menuPrefab.lastNameHighlighter.active=!this._activateMiddleNameCarousel}disableCarouselHighlighters(){this._menuPrefab.middleNameHighlighter.active=!1,this._menuPrefab.lastNameHighlighter.active=!1}enableCarouselHighlighters(){this._menuPrefab.middleNameHighlighter.active=this._activateMiddleNameCarousel,this._menuPrefab.lastNameHighlighter.active=!this._activateMiddleNameCarousel}endTimerHandler(){this._activeCarouselInput.endHeldTimer()}setUpButtons(){this._menuPrefab.closeButton.onClick.add((()=>{this.close()})),this._menuPrefab.randomButton.onClick.add((()=>{this.disableCarouselHighlighters(),this.getRandomName()})),this._menuPrefab.doneButton.onClick.add((()=>{this.done()})),this._menuPrefab.middleNameCarouselInput.positiveButton.onInputDown.add((()=>{this.disableCarouselHighlighters()})),this._menuPrefab.middleNameCarouselInput.negativeButton.onInputDown.add((()=>{this.disableCarouselHighlighters()})),this._menuPrefab.lastNameCarouselInput.positiveButton.onInputDown.add((()=>{this.disableCarouselHighlighters()})),this._menuPrefab.lastNameCarouselInput.negativeButton.onInputDown.add((()=>{this.disableCarouselHighlighters()})),this._menuPrefab.middleNameCarousel.onStartedScrolling.add(this.updateMiddleName,this),this._menuPrefab.lastNameCarousel.onStartedScrolling.add(this.updateLastName,this)}close(){this._onCloseCallback&&this._onCloseCallback(),this.endTimerHandler(),K.q.instance.game.input.keyboard.addKey(Mo.D.UP).onUp.remove(this.endTimerHandler,this),K.q.instance.game.input.keyboard.addKey(Mo.D.DOWN).onUp.remove(this.endTimerHandler,this),this._menuGameObject.destroy(),super.close()}done(){var k;K.q.instance.prodigy.audio.playSFX(61,"add-pet"),uh.A.displayToolTipAuto(null,null,{bodyText:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NAME_CHANGE_SUCCESS"),xPosition:640,yPosition:100}),this._activePlayer.appearance.getName().setMiddleName(this._selectedMiddleName.ID),this._activePlayer.appearance.getName().setLastName(this._selectedLastName.ID),this._activePlayer.appearance.updated=!0,this._activePlayer.name.init(this._activePlayer.appearance.getName()),null===(k=this._activePlayer.playerContainer)||void 0===k||k.showName(),this._activePlayer.forceSaveCharacter(),this._onDoneCallback&&this._onDoneCallback(),this.close()}}var Jc=U(2272);class td extends Ka.W{constructor(k,B,U){super(k,B,5,U,[q._.Icons_menu_json,q._.Font_black_json,q._.Ui_shared_json]),this.mailPerPage=4,this.currentlyDisplayedMailItems=[],this.currentPage=0,this.closeButton=null,this.pageLeftButton=null,this.pageRightButton=null,this.mailIconEmpty=null,this.mailDisplay=null,this.mailIcon=null,this.mailCount=null,this.leftButtonUnreadIndicator=null,this.rightButtonUnreadIndicator=null,this.arrowLeftGraphic=null,this.arrowRightGraphic=null,this.noMailNotice=null,this.woodBackground=null;const F=K.q.instance.prodigy;this.mailExtensionController=F.gameContainer.get("140-ca43"),this.game.broadcaster.addAppListener(oi.zr.DeleteMailFailure,this.onMailActionFailure,this,oi.HG.Mailer),this.game.broadcaster.addAppListener(oi.zr.CloseList,this.close,this,oi.HG.Mailer),this.currentInterfaceName=ph.B.YourMail,this.networkHandler=F.mailNetworkHandler}create(){super.create(),this.fireInterfaceEvent({originType:bi.$N.ButtonClick,originID:jh.k.Mail})}preprocess(){this.queuePostCreateCallback((()=>{this.buttonSetup(),this.fetchMail()}))}close(k){j.Aq$.isDefined(this.game)&&(this.game.broadcaster.removeAppListener(oi.zr.GiftBoxOpened,this,oi.HG.Mailer),this.game.broadcaster.removeAppListener(oi.zr.DeleteMailFailure,this,oi.HG.Mailer),this.game.broadcaster.removeAppListener(oi.zr.GetAllMailSuccess,this,oi.HG.Mailer),this.game.broadcaster.removeAppListener(oi.zr.GetAllMailFailure,this,oi.HG.Mailer),this.game.broadcaster.removeAppListener(oi.zr.CloseList,this,oi.HG.Mailer),this.removeCachedMailNotificationImages(),j.Aq$.isDefined(k)&&k()),this.fireInterfaceEvent({closeMethod:bi.Lv.CloseButton}),super.close()}buttonSetup(){this.closeButton.onClickCallback=k=>{this.fireButtonEvent({buttonName:jh.k.X,destinationName:K.q.instance.prodigy.world.getCurrentZone()}),this.close(k)},this.pageLeftButton.onClickCallback=this.pageLeft.bind(this),this.pageRightButton.onClickCallback=this.pageRight.bind(this),this.pageLeftButton.scale.x=-1,this.pageLeftButton.visible=!1,this.pageRightButton.visible=!1}fetchMail(){this.mailIconEmpty.visible=!0,this.game.broadcaster.addAppListener(oi.zr.GetAllMailSuccess,this.onFetchMailSuccess,this,oi.HG.Mailer),this.game.broadcaster.addAppListener(oi.zr.GetAllMailFailure,this.onMailActionFailure,this,oi.HG.Mailer),K.q.instance.prodigy.mailNetworkHandler.getAllMail(!0)}onFetchMailSuccess(){this.renderMailItems(this.currentPage),this.updateMailCounter(),this.updatePageButtons(),this.updateNoMailNotice()}onMailActionFailure(){if(j.Aq$.isDefined(this.game)){const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);K.q.instance.prodigy.open.message(k.getText("MAIL_UNAVAILABLE"),(()=>{this.close()}),null,k.getText("MESSAGE_TITLE_OOPS"))}}renderMailItems(k){if(k<0||k+1>this.getNumPages())return;this.currentPage=k,this.clearMailDisplay();const B=this.networkHandler.mailList,U=this.currentPage*this.mailPerPage;let F=0;for(let G=U;G0,this.pageRightButton.visible=this.currentPage0){this.leftButtonUnreadIndicator.visible=!1,this.arrowLeftGraphic.visible=!0;for(let B=this.currentPage*this.mailPerPage-1;B>0;B--)if(!k[B].isOpened){this.leftButtonUnreadIndicator.visible=!0,this.arrowLeftGraphic.visible=!1;break}}if(this.currentPage{this.woodBackground.visible=!0,this.game.broadcaster.removeAppListener(oi.zr.GiftBoxOpened,this,oi.HG.Mailer)}),(()=>this.deleteMail(B,!0))),K.q.instance.prodigy.gameContainer.get("c47-20b6").yourMail.sendOpenMailEvent(B.id,!B.isOpened,B.attachments),Sc.b.isSingleUse(B)?this.game.broadcaster.addAppListener(oi.zr.GiftBoxOpened,this.updateOpenedStatus.bind(this,k,!0),this,oi.HG.Mailer,null):this.updateOpenedStatus(k,!0)}updateOpenedStatus(k,B){this.networkHandler.setRead(k,B),this.currentlyDisplayedMailItems[k%this.mailPerPage].openButtonGraphic.visible=B,this.currentlyDisplayedMailItems[k%this.mailPerPage].unOpenButtonGraphic.visible=!B,this.updateMailCounter(),this.updatePageButtons(),this.updateNoMailNotice(),this.updateMailEntry(k)}deleteMail(k,B=!1){if(k.isOpened||B)this.networkDeleteMailCall(k);else{const B=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);K.q.instance.prodigy.open.petsCustomDialog(new yh.k(B.getText("BUTTON_DELETE_TEAM"),(()=>this.networkDeleteMailCall(k)),B.getText("CANCEL"),void 0,{atlas:q._.Ui_store_json,name:"icon-large-exclamation"},Jc.E.Small,500,B.getText("BUTTON_DELETE_TEAM"),B.getText("MAILBOX_DELETE_MESSAGE")))}}networkDeleteMailCall(k){this.networkHandler.deleteMail(k),this.currentPage>=this.getNumPages()&&(this.currentPage=Math.max(this.currentPage-1,0)),this.clearMailDisplay(),this.updateMailCounter(),this.renderMailItems(this.currentPage),this.updatePageButtons(),this.updateNoMailNotice()}getNumPages(){return Math.ceil(this.networkHandler.mailList.length/this.mailPerPage)}removeCachedMailNotificationImages(){const k=this.networkHandler.mailList;for(let B=0;Bsuper.create}});return(0,G.sH)(this,void 0,void 0,(function*(){k.create.call(this),this._ui=yield this._prefabLoader.loadWithDependenciesFromGUID(Ei.l.AdventureMap_Template).promise,this.addChild(this._ui.legacyTransform.group);const B=this._ui.findComponentInChildren(ed.S);B.hideStartButton=this._isStartAdventure,B.run(),this._ui.findComponentInChildren(id.Z).menu=this}))}close(){var k;null===(k=this._closeCallback)||void 0===k||k.call(this),super.close()}destroy(){this._ui.destroy(),super.destroy()}}var nd=U(67510),ad=U(15521);class rd extends Ka.W{constructor(k,B,U){super(k,B,55,{isModal:!0}),this.onGreenButton=new j.HN0,this.onRedButton=new j.HN0,this.game=k,this.config=U,this.queuePostCreateCallback((()=>{this.configureText(),this.configureButtons()}))}configureText(){this.body.setText(this.config.body),j.Aq$.isDefined(this.config.title)&&(this.title=this.instantiateTemplate("title",this.matte).title,this.title.setText(this.config.title),ad.Z.bringToTop(this.body))}configureButtons(){this.greenButtonText.setText(this.config.greenButton.text),this.greenButton.onUpCallback=()=>{this.onGreenButton.dispatch()};const k=K.q.instance.prodigy.gameContainer.get("2e2-6ee6");if(k.setBlockType(this.greenButton.button.image.input,Ia.z.LOBBY),j.Aq$.isDefined(this.config.greenButton.callback)&&this.onGreenButton.add(this.config.greenButton.callback),this.onGreenButton.add(this.close.bind(this)),j.Aq$.isDefined(this.config.redButton)){const B=this.instantiateTemplate("redButton",this.buttonGroup),U=B.redButton;ad.Z.sendToBack(U),U.onUpCallback=()=>{this.onRedButton.dispatch()},k.setBlockType(U.button.image.input,Ia.z.LOBBY),j.Aq$.isDefined(this.config.redButton.callback)&&this.onRedButton.add(this.config.redButton.callback),this.onRedButton.add(this.close.bind(this));B.redButtonText.setText(this.config.redButton.text)}}destroy(){this.onGreenButton.dispose(),this.onRedButton.dispose(),super.destroy()}}class od extends Ka.W{get OnCreateClicked(){return this.onCreateClicked}get OnJoinClicked(){return this.onJoinClicked}constructor(k,B,U,F){super(k,B,52),this.onCreateClicked=new j.HN0,this.onJoinClicked=new j.HN0,this.hostCards=[],this.shareScrollPercent=0,this.playersInfo=U,this.coOpTeamsHandler=F,this.queuePostCreateCallback((()=>{this.setButtons(),this.renderPlayer(),this.fillView(),this.runTutorial()}))}getTeamList(){const k=this.coOpTeamsHandler.AvailableTeams,B=$.filter(k,(k=>j.Aq$.isDefined(this.playersInfo[k.hostID])));let U=$.filter(K.q.instance.prodigy.friendsListNetworkHandler.friendsList,(k=>0!==k.status));U=U.concat(K.q.instance.prodigy.friendsListNetworkHandler.classList);const F=$.map(B,(k=>this.extractCardInfo(this.playersInfo[k.hostID],k,U)));return F.sort(((k,B)=>k.friend!==B.friend?(B.friend?1:0)-(k.friend?1:0):B.teamSize-k.teamSize)),F}extractCardInfo(k,B,U){return{userID:k.userID,teamSize:B.teamMembers.length,friend:$.some(U,(B=>B.userID===k.userID)),appearance:k.appearance,equipment:k.equipment,isMember:1===k.isMember,icons:[],cell:null}}setButtons(){this.createButton.onUpCallback=()=>{this.onCreateClicked.dispatch(),this.close()},this.closeButton.onClickCallback=super.close.bind(this)}renderPlayer(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=new Oe.a(this.game);B.init({appearance:k.appearance.getData(),equipment:k.equipment.getData()});const U=K.q.instance.prodigy.create.player(this.playerWindowMask,B,1,80,95,!1,{isPreview:!0,hideMount:!0});U.mask=this.playerWindowMask.mask,U.forceWeaponVisual=!0,U.reload()}fillView(){this.hostCards=this.getTeamList();const k=this.hostCards.length<1;this.noTeamsAvailable.visible=k,k||(this.fillFeedGroup(),this.orderFeedCells()),this.feedContents.layoutElement.calculateChildren(),this.feedScrollView.setupVisibleIndices(),this.feedScrollView.calculateMaxScrollDist(),this.setupScrollBar(),this.feedScrollBar.visible=this.hostCards.length>1}setupScrollBar(){j.Aq$.isDefined(this.feedScrollView)&&(this.feedScrollView.linkScrollBar(this.feedScrollBar),this.feedScrollView.setToScrollPercent(this.shareScrollPercent))}fillFeedGroup(){for(let k=0;k=k.teamSize?k.icons[j].setImageFrameName("Images/icon-teammate-off"):k.icons[j].setImageFrameName("Images/icon-teammate-on");const $=new Oe.a(this.game);$.init(k);const H=K.q.instance.prodigy.create.player(F.friendCircle,$,1,80,130,!1,{isPreview:!0,hideMount:!0});H.forceWeaponVisual=!0,H.reload();const V=K.q.instance.prodigy.gameContainer.resolve(La.C);V.init($.appearance.getName());const W=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("CO_OP_PARTY_CELL_FRIEND");F.nameText.setText(`${V.getName()}${k.friend?W:""}`),F.memberIcon.visible=k.isMember,k.teamSize>2?(F.joinButton.visible=!1,F.fullText.visible=!0):F.joinButton.onUpCallback=()=>{this.onJoinClicked.dispatch(k.userID),this.close()},k.cell=F}orderFeedCells(){for(let k=0;k1}runTutorial(){const k=ln.B.FEATURE_COOP_BATTLE,B=ln.B.BREADCRUMB_COOP_PARTY_SELECT;if(!K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(k,B)){let U=new Ti.rD(this.game);U.addEvents([{dialogueData:U.dataProvider.get(291),blockInput:!0},{callback:()=>K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(k,B)}]),U.start(!0,(()=>U=null)),this.onJoinClicked.addOnce((()=>{null==U||U.close()}))}}destroy(){this.onCreateClicked.dispose(),this.onJoinClicked.dispose(),super.destroy()}}od.MAX_HEADCOUNT=3;var hd=U(50348);let cd=class extends j.uAl{constructor(){super(...arguments),this._confirmButton=null,this._dismissButton=null}get confirmButton(){return this._confirmButton}get dismissButton(){return this._dismissButton}};(0,G.Cg)([(0,j.x4W)("ConfirmButton"),(0,G.Sn)("design:type",ic.$)],cd.prototype,"_confirmButton",void 0),(0,G.Cg)([(0,j.x4W)("DismissButton"),(0,G.Sn)("design:type",ic.$)],cd.prototype,"_dismissButton",void 0),cd=(0,G.Cg)([(0,j.EVk)("ConfirmationDialogFooter")],cd);let dd=class extends j.uAl{constructor(){super(...arguments),this._headerText=null,this._headerIcon=null}get headerText(){return this._headerText}get headerIcon(){return this._headerIcon}};(0,G.Cg)([(0,j.x4W)("headerText"),(0,G.Sn)("design:type",j.EYj)],dd.prototype,"_headerText",void 0),(0,G.Cg)([(0,j.x4W)("headerIcon"),(0,G.Sn)("design:type",j._mx)],dd.prototype,"_headerIcon",void 0),dd=(0,G.Cg)([(0,j.EVk)("ConfirmationDialogHeader")],dd);var ld=U(38134);class ud extends ld.u{constructor(k,B,U=new yh.k){super(k,B,U),this._confirmationDialogConfig=null,this._headerPrefabID=Ei.l.ConfirmationDialogHeader,this._bodyPrefabID=Ei.l.ConfirmationDialogBody,this._footerPrefabID=Ei.l.ConfirmationDialogFooter,this._confirmationDialogConfig=U,this.configObj={elements:[]},this.isModal=!1}createHeader(){const k=this._prefabLoader.loadFromGUID(this._headerPrefabID,this._prefabComponent.header).findComponent(dd);j.Aq$.isDefined(this._confirmationDialogConfig.headerTitle)&&(k.headerText.text=this._confirmationDialogConfig.headerTitle),j.Aq$.isDefined(this._confirmationDialogConfig.headerIcon)&&k.headerIcon.legacyTransform.group.addChild(new to._(this.game,0,0,this._confirmationDialogConfig.headerIcon.atlas,this._confirmationDialogConfig.headerIcon.name))}createBody(){this._prefabLoader.loadFromGUID(this._bodyPrefabID,this._prefabComponent.body).findComponentInChildren(j.EYj).text=this._confirmationDialogConfig.bodyMessage}createFooter(){const k=this._prefabLoader.loadFromGUID(this._footerPrefabID,this._prefabComponent.footer),B=k.findComponent(cd);this._confirmationDialogConfig.confirmButtonCallback&&B.confirmButton.onClick.add(this._confirmationDialogConfig.confirmButtonCallback),this._confirmationDialogConfig.dismissButtonCallback&&B.dismissButton.onClick.add(this._confirmationDialogConfig.dismissButtonCallback),B.confirmButton.onClick.add(this.close.bind(this)),B.dismissButton.onClick.add(this.close.bind(this));const U=k.findComponentsInChildren(j.EYj);for(let F=0;F0?G:j,this._creaturePreviews[k].setTransparency(j)}onLoadPreviewHandler(k,B,U){k.GameObject.active=!0,this._gridLayout.updateAll(!1),K.q.instance.prodigy.load.isFileLoaded(_a.M.getAssets(k.renderContainer.source,1)[0])||j.VyI.log("Creature asset is not loaded",j.$bb.Error);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.encounters;F.hasPetBeenEncountered(k.creatureID)?0===F.getPetTimesRescued(k.creatureID)&&k.applyGreyscale(.3):k.applyGreyscale(0),k.setTransparency(U?.7:1),this.carousel.setToIndex(B),++this._finalOnLoadCount>=this._creaturePreviews.length&&this.allPreviewsLoaded()}allPreviewsLoaded(){this._finishedLoadingPreview=!0,this.updateButtonStates()}destroy(){this._creaturePreviews.forEach((k=>{k.OnLoad.removeAll(this)})),this._creaturePreviews.length=0,this._carouselContainer.destroy(),this._carouselContainer=null}}var Rd=U(56461),Pd=U(25930);class Md{get prefabComponent(){return this._petStatsPrefabComponent}constructor(k){this._panelGameObject=null,this._petStatsPrefabComponent=null;const B=K.q.instance.prodigy.gameContainer.get("d0e-64fd");this._panelGameObject=B.loadFromGUID(Ei.l.Pets_RightSideStatsPanel),k.addChild(this._panelGameObject.legacyTransform.group),this._petStatsPrefabComponent=this._panelGameObject.findComponentInChildren(Pd.J)}}class Nd extends Rd.A{constructor(k,B,U,F){super(k,B,200,{},[]),this.prefabRoot=null,this._headerComponent=null,this._gameObject=null,this._statsPanelContainerGO=null,this._statsPanel=null,this._currentPetItemID=0,this._petEvolutions=null,this._previousPetItemIndices=[],this.isModal=!1,this.background.visible=!1,F&&(this._headerComponent=F),this.setDataID(U),this._encounterInfo=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.encounters}create(){super.create();const k=K.q.instance.prodigy.gameContainer.get("d0e-64fd");this._gameObject=k.loadFromGUID(Ei.l.Pets_PetInfoMenu),this.prefabRoot.addChild(this._gameObject.legacyTransform.group),this._headerComponent&&(this._headerComponent.backToPetBookButton.onClick.add(this.close,this),this._headerComponent.backToPetBookButton.GameObject.addComponent(Kc.E).initialize(Mo.D.ESC,(()=>{this.close(),this._headerComponent.onSubMenuClose.dispatch()}))),this.loadStatsPanel(),this.loadEvolutionCarousel(),this.updateDisplay(),K.q.instance.prodigy.audio.playSFX(66,"open-pet-submenu");const B=le.t.getItem("pet",this._currentPetItemID);K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendPetDetailsViewedEvent(B,"pet-info")}loadEvolutionCarousel(){this._petGeneralPanelContainer=new j._mx,this._petGeneralPanelContainer.addComponent(j.K16),this._gameObject.addChild(this._petGeneralPanelContainer),this._petEvolutionsPanel=new Dd(this._petGeneralPanelContainer.legacyTransform.group),this._petEvolutionsPanel.addEvolutions(this._petEvolutions,this._currentPetItemIndex),this._petEvolutionsPanel.carousel.onFinishedScrolling.add(this.finishScrolling,this),this._petEvolutionsPanel.carousel.onScrollingToCompletion.add(this.changeTransparencyWhileScrolling,this);const k=()=>{this.tryToMoveCarousel(this._petEvolutionsPanel.canScrollPositive,1)};this._petEvolutionsPanel.panelPrefab.nextButton.onClick.add(k);const B=()=>{this.tryToMoveCarousel(this._petEvolutionsPanel.canScrollNegative,-1)};this._petEvolutionsPanel.panelPrefab.previousButton.onClick.add(B),this._petEvolutionsPanel.panelPrefab.previousButton.GameObject.addComponent(Kc.E).initialize(Mo.D.LEFT,B),this._petEvolutionsPanel.panelPrefab.nextButton.GameObject.addComponent(Kc.E).initialize(Mo.D.RIGHT,k)}loadStatsPanel(){this._statsPanelContainerGO=new j._mx,this._statsPanelContainerGO.addComponent(j.K16),this._gameObject.addChild(this._statsPanelContainerGO),this._statsPanel=new Md(this._statsPanelContainerGO.legacyTransform.group),this._statsPanel.prefabComponent.aboutToggle.GameObject.active=!0,this._statsPanel.prefabComponent.statsToggle.GameObject.active=!1;const k=this._statsPanel.prefabComponent.statsPanel.findComponentInChildren(j.JTA);k.GameObject.children[1].destroy(),k.GameObject.children[0].destroy(),k.updateAll(),this._statsPanel.prefabComponent.spellsToggle.GameObject.destroy();const B=this._statsPanel.prefabComponent.aboutToggle.GameObject.findComponentsInChildren(j.EYj);for(let $=0;${this.setAboutActive(),K.q.instance.prodigy.audio.playSFX(68,"paper-tab")};this._statsPanel.prefabComponent.aboutToggle.onSelected.add(F);const G=()=>{this.setStatsActive(),K.q.instance.prodigy.audio.playSFX(68,"paper-tab")};this._statsPanel.prefabComponent.statsToggle.onSelected.add(G),this._statsPanel.prefabComponent.aboutToggle.GameObject.addComponent(Kc.E).initialize(Mo.D.TAB,(()=>{const k=this._statsPanel.prefabComponent.aboutToggle.isSelected(),B=this._statsPanel.prefabComponent.GameObject.findComponentInChildren(wd.O);B.setItemSelected(this._statsPanel.prefabComponent.aboutToggle,!k),B.setItemSelected(this._statsPanel.prefabComponent.statsToggle,k),k?G():F()}))}tryToMoveCarousel(k,B){k?(K.q.instance.prodigy.audio.playSFX(18,"pop"),this.changeActiveID(B),this._petEvolutionsPanel.updateButtonStates(),this.updateDisplay()):K.q.instance.prodigy.audio.playSFX(67,"button-disabled")}setDataID(k){this._petEvolutions=Eh.P8.GetEvolutionaryLine(le.t.getItem("pet",k)),this._currentPetItemIndex=this._petEvolutions.findIndex((B=>B===k)),this._currentPetItemID=this._petEvolutions[this._currentPetItemIndex]}changeActiveID(k){this._previousPetItemIndices.push(this._currentPetItemIndex),this._currentPetItemIndex=j.cj9.clamp(this._currentPetItemIndex+k,0,this._petEvolutions.length-1),this._currentPetItemID=this._petEvolutions[this._currentPetItemIndex],this._petEvolutionsPanel.carousel.scrollToNextLocation(k)}finishScrolling(){this._petEvolutionsPanel.setCreaturePedestalTransparent(this._currentPetItemIndex,1),this._previousPetItemIndices.forEach((k=>{this._petEvolutionsPanel.setCreaturePedestalTransparent(k,.7)})),this._previousPetItemIndices=[]}changeTransparencyWhileScrolling(k){this._petEvolutionsPanel.setCreaturePedestalTransparent(this._currentPetItemIndex,1,1,k),this._previousPetItemIndices.forEach((B=>{this._petEvolutionsPanel.setCreaturePedestalTransparent(B,.7,-1,k)}))}setAboutActive(){this._statsPanel.prefabComponent.statsPanel.active=!1,this._encounterInfo.hasPetBeenEncountered(this._currentPetItemID)?(this._statsPanel.prefabComponent.aboutPanel.active=!0,this._statsPanel.prefabComponent.learnMorePanel.active=!1):(this._statsPanel.prefabComponent.learnMorePanel.active=!0,this._statsPanel.prefabComponent.aboutPanel.active=!1)}setStatsActive(){this._statsPanel.prefabComponent.aboutPanel.active=!1,this._encounterInfo.hasPetBeenEncountered(this._currentPetItemID)?(this._statsPanel.prefabComponent.statsPanel.active=!0,this._statsPanel.prefabComponent.learnMorePanel.active=!1):(this._statsPanel.prefabComponent.learnMorePanel.active=!0,this._statsPanel.prefabComponent.statsPanel.active=!1)}updateDisplay(){const k=le.t.getItem("pet",this._currentPetItemID);this._statsPanel.prefabComponent.textAbout.text=(0,Ba.k)(Tn.J.getLocalizationFlavorKey(k)),this._statsPanel.prefabComponent.fillBarAttackAndHearts.fillPercent=.1*k.data.statPower,this.updateElementDisplay(k),this.updateEvolveDisplay(k),this.updateEvolutionDisplay(k,this._currentPetItemIndex,this._petEvolutions.length),this.updateEncounterDisplay(k),this._statsPanel.prefabComponent.statsToggle.isSelected()?this.setStatsActive():this.setAboutActive()}updateElementDisplay(k){this._statsPanel.prefabComponent.textElement.text=rn.$.capitalizeFirstLetter(Eh.P8.getElementType(k));const B=this._statsPanel.prefabComponent.iconContainerElement.findComponent(j.vYh);B&&B.destroy(),cr.l.removeAll(this._statsPanel.prefabComponent.iconContainerElement.legacyTransform.group,!0);const U=this._statsPanel.prefabComponent.iconContainerElement.addComponent(j.vYh,!1);let F;switch(Eh.P8.getElementType(k)){case Td.a.Water:F=this._statsPanel.prefabComponent.elementIconFrameWater;break;case Td.a.Fire:F=this._statsPanel.prefabComponent.elementIconFrameFire;break;case Td.a.Storm:F=this._statsPanel.prefabComponent.elementIconFrameStorm;break;case Td.a.Ice:F=this._statsPanel.prefabComponent.elementIconFrameIce;break;case Td.a.Plant:default:F=this._statsPanel.prefabComponent.elementIconFrameEarth}U.create(),U.updateAsset(this._statsPanel.prefabComponent.elementIconAtlas,F)}updateEvolveDisplay(k){const B=Eh.P8.getEvolutionLVL(k);j.Aq$.isDefined(B)?(this._statsPanel.prefabComponent.rowObjectEvolveLevel.active=!0,this._statsPanel.prefabComponent.textEvolveLevel.text=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("LEVEL_AND_COLON",B)):this._statsPanel.prefabComponent.rowObjectEvolveLevel.active=!1}updateEvolutionDisplay(k,B,U){this._petEvolutionsPanel.panelPrefab.evolutionNumber.text=`Evolution ${B+1} of ${U}`,this._petEvolutionsPanel.panelPrefab.setBackground(Eh.P8.getElementType(k))}updateEncounterDisplay(k){const B=!!this._encounterInfo.hasPetBeenEncountered(k.ID);this._petEvolutionsPanel.panelPrefab.petName.text=B?(0,Ba.k)(Tn.J.getLocalizationNameKey(k)):"???";const U=Eh.P8.hasValidOrdinal(k)?k.data.ordinal:-1;this._petEvolutionsPanel.panelPrefab.petBookNumber.text=`# ${U.toString()}`,this._petEvolutionsPanel.panelPrefab.seenPanel.active=B,this._petEvolutionsPanel.panelPrefab.unseenPanel.active=!B,B&&(this._petEvolutionsPanel.panelPrefab.rescuedTimes.text=`Rescued: ${this._encounterInfo.getPetTimesRescued(k.ID)}`)}close(){var k,B,U,F,G;null===(k=this._petEvolutionsPanel)||void 0===k||k.destroy(),null===(B=this._statsPanel)||void 0===B||B.prefabComponent.aboutToggle.onSelected.dispose(),null===(U=this._statsPanel)||void 0===U||U.prefabComponent.statsToggle.onSelected.dispose(),null===(F=this._statsPanel)||void 0===F||F.prefabComponent.GameObject.destroy(),this._headerComponent&&(this._headerComponent.backToPetBookButton.onClick.remove(this.close,this),null===(G=this._headerComponent.backToPetBookButton.GameObject.findComponent(Kc.E))||void 0===G||G.destroy()),this._statsPanelContainerGO&&this._statsPanelContainerGO.destroy(),this._gameObject&&this._gameObject.destroy(),super.close()}}var xd=U(52382);class Ld extends Rd.A{constructor(k,B,U,F,G,$){super(k,B,200,{},[]),this.onGearMenuOpen=new j.HN0,this.onGearMenuClosed=new j.HN0,this.isModal=!1,this.background.visible=!1,$&&(this._headerComponent=$),this._contentLayer=null!=G?G:this,this._gearType=F,this._currentDataSchema=U}create(){const k=Object.create(null,{create:{get:()=>super.create}});return(0,G.sH)(this,void 0,void 0,(function*(){var B;k.create.call(this);const U=j.Aq$.isDefined(this._headerComponent);this._prefabLoader=K.q.instance.prodigy.gameContainer.get("d0e-64fd");const F=K.q.instance.prodigy.gameContainer.get("d69-defe"),G=j.Aq$.isDefined(null===(B=this._currentDataSchema)||void 0===B?void 0:B.gear)?this._currentDataSchema.gear[this._gearType]:null,$=j.Aq$.isDefined(G)?yield F.getPetGearByUniqueId(this._currentDataSchema.gear[this._gearType]):null;Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Ei.l.Pets_YourPetGearMenu,{[tr._R.PetGearType]:this._gearType,[tr._R.PetGearInitialGearDisplay]:$,[tr._R.PetGearHeaderEnable]:!U,[tr._R.PetGearHeaderClose]:this.close.bind(this),[tr.hi.PetCreatureData]:this._currentDataSchema}).then((k=>this.setUpMenuPrefab(k))).catch((k=>{j.VyI.log("Unable to load Pets - Your Pet Gear Menu prefab",j.$bb.Error)}))}))}setUpMenuPrefab(k){k&&!this.destroyed&&(this._gameObject=k,this._contentLayer&&this._contentLayer.addChild(this._gameObject.findComponentInChildren(j.y4o).getRootContainer()),this._gameObject.transform.setPosition(640,360),this._headerComponent&&(this._headerComponent.setTitleText("PETGEAR_MENU_TITLE"),this._headerComponent.backToYourPetButton.onClick.add(this.close,this),this._headerComponent.backToYourPetButton.GameObject.addComponent(Kc.E).initialize(Mo.D.ESC,(()=>{sh.I.shouldShowPetGearTutorialCached||(this.close(),this._headerComponent.onSubMenuEsc.dispatch(this))}))),K.q.instance.prodigy.audio.playSFX(66,"open-pet-submenu"),sh.I.shouldShowPetGearTutorialCached&&this.displayPetGearFtue(),this.onGearMenuOpen.dispatch())}displayPetGearFtue(){var k;K.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:"Pet_gear_tutorial",funnelType:"tutorial",stepName:Gh.l.PetGearGearMenu},{step_index:4});const B=this._gameObject.findComponentInChildren(j.bE_,!0),U=B.Container.get(tr.oD.PetGearFtueEnabledInputTransform),F=B.Container.get(tr.oD.PetGearFtueOverlayGameObject);null===(k=this._gameObject.findComponentsInChildren(xd.H))||void 0===k||k.forEach((k=>{const B=()=>{var B;if(!j.Aq$.isDefined(F)||F.isDestroyed)return;F.active=!0,k.resetSelection();const G=null===(B=k.getVisibleGearCardByIndex(0))||void 0===B?void 0:B.findComponent(j.XVE);j.Aq$.isDefined(G)&&(U.GameObject.active=!0,U.setPosition(G.worldPosition.x-G.widthDelta*G.pivot.x,G.worldPosition.y-G.heightDelta*G.pivot.y),U.fullWidth=G.fullWidth,U.fullHeight=G.fullHeight)};k.onGridDisplayed.add(B),k.onGridInitialized.add(B),k.onGearCardSelected.add((()=>{j.Aq$.isDefined(F)&&!F.isDestroyed&&(U.GameObject.active=!1)})),k.onEquippedGearChanged.addOnce((()=>{sh.I.updateCachedPetGearTutorialFlag().catch(j.RQr.createHandler("Failed to update cached pet gear tutorial flag")).finally((()=>{F.destroy()}))}))}))}close(){var k;this._headerComponent&&(this._headerComponent.setTitleText(""),this._headerComponent.backToYourPetButton.onClick.remove(this.close,this),null===(k=this._headerComponent.backToYourPetButton.GameObject.findComponent(Kc.E))||void 0===k||k.destroy()),this._gameObject&&this._gameObject.destroy(),this._gearType=null,this._currentDataSchema=null,this.onGearMenuClosed.dispatch(),this.onGearMenuClosed.dispose(),this.onGearMenuOpen.dispose(),super.close()}}var kd=U(38097),Bd=U(52142),Ud=U(3119);class Fd{get rootNode(){return this._root}constructor(k){this._root=k}}class Gd{get tree(){return this._tree}set tree(k){this._tree=k}get currentNode(){return this._currentNode}set currentNode(k){this._currentNode=k}constructor(k){this._currentNode=null,this.visitedNodes=[],this.skipInVisitedStack=[],this._tree=k,this.currentNode=this.tree.rootNode}start(){this.currentNode.onVisited()}getNextChildNode(){return this.currentNode.getAllChildNodes().length>0?this.currentNode.getAllChildNodes()[0]:null}setNodeAsVisited(k){-1===this.skipInVisitedStack.indexOf(k)&&this.visitedNodes.push(k)}nextNode(k){return this.currentNode?this.currentNode.getAllChildNodes().length>0?(j.Aq$.isDefined(k)&&0!==k.length?this.currentNode=this.currentNode.getChildNodeByName(k):this.currentNode=this.currentNode.getAllChildNodes()[0],this.currentNode?j.Aq$.isDefined(this.currentNode.onVisited)&&this.currentNode.onVisited():"exit"===k?this.currentNode=null:j.VyI.log(`Branch not found: ${k}.`,j.$bb.Error)):this.currentNode=null:j.VyI.log("currentNode not defined.",j.$bb.Error),this.currentNode}prevNode(){return this.visitedNodes.length>0?(this.currentNode=this.visitedNodes.pop(),j.Aq$.isDefined(this.currentNode.onVisited)&&this.currentNode.onVisited()):this.currentNode=null,this.currentNode}}var jd=U(1041);class $d extends fr.u{constructor(k,B,U){super(),this.game=k,this.screen=B,this.mapData=U,this.tiledParser=new jd.Z(K.q.instance.prodigy.gameContainer)}create(){super.create()}render(k){j.Aq$.isDefined(k)&&(this.mapData=k),this.below=K.q.instance.prodigy.create.element(this.screen.background,0,0),this.above=K.q.instance.prodigy.create.element(this.screen.foreground,0,0);const B=K.q.instance.prodigy.create.element(this.screen.background,0,0),U=K.q.instance.prodigy.create.element(this.screen.foreground,0,0);this.area=this.tiledParser.init(this.game,B,U,this.screen,this.mapData,(()=>{K.q.instance.prodigy.textureBelow.clear(),K.q.instance.prodigy.textureBelow.renderXY(B,0,0,!0),this.below.add(K.q.instance.prodigy.create.image(0,0,void 0,void 0,K.q.instance.prodigy.textureBelow)),K.q.instance.prodigy.textureAbove.clear(),K.q.instance.prodigy.textureAbove.renderXY(U,0,0,!0),this.above.add(K.q.instance.prodigy.create.image(0,0,void 0,void 0,K.q.instance.prodigy.textureAbove)),this.tiledParser.processAnimations(this.game,this),B.destroy(),U.destroy()}))}update(){super.update()}destroy(){this.screen=null,this.mapData=null,this.tiledParser=null,this.below=null,this.above=null,super.destroy()}}var Hd=U(93833),Vd=U(77302),Wd=U(29738),qd=U(10312);class Kd extends Ka.W{constructor(k,B,U,F){super(k,B,200,{},[q._.General_icons_json,q._.Ui_bam_json,q._.Ui_buttons_json,q._.Ui_store_json,q._.Ui_card_json,q._.Ui_registration_json,q._.Ui_icons_json,q._.Ui_panels_json,Z.c.Sfx_store_equip,Z.c.Sfx_store_purchase,Z.c.Sfx_registration]),this.prefabRoot=null,this._ui=null,this._headerPrefab=null,this._data=null,this._playingSFX=null,this._headerPrefab=F,this._data=U,this._headerPrefab.policyLink.onClicked.add((()=>{this.onPrivacyPolicyClick()})),this._headerPrefab.websiteLink.onClicked.add((()=>{this.onWebsiteLinkClick()})),this.isModal=!1,this.background.visible=!1,this._localizer=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService)}create(){super.create(),this._headerPrefab.nextButton.onClick.add(this.nextClicked,this),this._headerPrefab.backButton.onClick.add(this.backClicked,this)}loadFromPrefab(k,B){const U=K.q.instance.prodigy.gameContainer.get("d0e-64fd");return this._ui="string"==typeof B?U.loadFromGUID(B):U.load(B),0===this._ui.findComponents(Hd.$).length&&this._ui.addComponent(Hd.$),0===this._ui.findComponents(j.jsv).length&&this._ui.addComponent(j.jsv),this.prefabRoot.addChild(this._ui.findComponent(Hd.$).rootContainer),this._ui.findComponentInChildren(k)}changeTitle(k){this._headerPrefab.title.text=this._localizer.getText(k)}initializeAudio(k,B){Wd.O.isEnglishLocale()?(this.changeAudio(k,B),-1===this._data.soundHasBeenPlayed.indexOf(k)&&(this.playAudio(k),this._data.soundHasBeenPlayed.push(k))):this._headerPrefab.soundButton.Active=!1}changeAudio(k,B){this._headerPrefab.soundButton.onClick.removeAll(),this._headerPrefab.soundButton.onClick.add((()=>{this.playAudio(k),B&&("location"===B?this.sendAnalytics("audio",B,null):this.sendAnalytics("audio",B,this._data.isSchool?"school":"home"))}))}playAudio(k){this._playingSFX&&this._playingSFX.stop(),this._playingSFX=K.q.instance.prodigy.audio.playSFX(46,k)}setCharacter(k){this._headerPrefab.faceContainer.active=k}headerVisible(k=!0){this._headerPrefab&&(this._headerPrefab.title.GameObject.active=k,this._headerPrefab.soundButton.GameObject.active=k,this._headerPrefab.nextButton.GameObject.active=k,this._headerPrefab.backButton.GameObject.active=k)}nextClicked(){this._playingSFX&&this._playingSFX.stop(),this._headerPrefab.nextButton.currentState===j.ZIW.Disabled?this.disabledNextClicked():(K.q.instance.prodigy.audio.playSFX(18,"pop"),this.continueNext())}continueNext(){this.saveToData(!0),this.close(),this._headerPrefab.dispatchNext(this._customInputData),this.headerCleanup()}continueBack(){this.saveToData(!1),this.close(),this._headerPrefab.dispatchBack(this._customInputData),this.headerCleanup()}disabledNextClicked(){}backClicked(){this._playingSFX&&this._playingSFX.stop(),K.q.instance.prodigy.audio.playSFX(18,"pop"),this.continueBack()}disableNext(){this._headerPrefab.nextButton.setState(j.ZIW.Disabled)}enableNext(){this._headerPrefab.nextButton.setState(j.ZIW.Default)}static isScreenActive(k,B){return!0}headerCleanup(){this._headerPrefab.nextButton.onClick.remove(this.nextClicked,this),this._headerPrefab.backButton.onClick.remove(this.backClicked,this),this._headerPrefab=null}sendAnalytics(k,B,U,F){j.Aq$.isDefined(F)&&this.metricsManager.sendOnboardingFunnelEvent(F)}onPrivacyPolicyClick(){this.customOnPopupOpen(),this.sendAnalytics("popup","redirect","privacy"),K.q.instance.prodigy.open.confirmationDialog(new yh.k(this._localizer.getText("BUTTON_LEAVE_TEAM"),(()=>{this.customOnPopupClose(),qd.I.openWebsite("www.prodigygame.com/privacy-policy/")}),this._localizer.getText("BUTTON_STAY_TEAM"),(()=>{this.customOnPopupClose()}),{atlas:q._.Ui_store_json,name:"icon-large-exclamation"},Jc.E.Small,500,this._localizer.getText("LOGIN_LEAVE_GAME"),this._localizer.getText("LOGIN_LEAVE_BODY")))}onWebsiteLinkClick(){this.customOnPopupOpen(),this.sendAnalytics("popup","redirect","website"),K.q.instance.prodigy.open.confirmationDialog(new yh.k(this._localizer.getText("BUTTON_LEAVE_TEAM"),(()=>{this.customOnPopupClose(),qd.I.openWebsite("www.prodigygame.com")}),this._localizer.getText("BUTTON_STAY_TEAM"),(()=>{this.customOnPopupClose()}),{atlas:q._.Ui_store_json,name:"icon-large-exclamation"},Jc.E.Small,500,this._localizer.getText("LOGIN_LEAVE_GAME"),this._localizer.getText("LOGIN_LEAVE_BODY")))}customOnPopupOpen(){}customOnPopupClose(){}close(){this._headerPrefab&&(this._headerPrefab.policyLink.onClicked.removeAll(),this._headerPrefab.websiteLink.onClicked.removeAll()),this._playingSFX&&this._playingSFX.stop(),this._ui&&this._ui.destroy(),super.close()}}let zd=class extends j.uAl{constructor(){super(...arguments),this._classCodeElement=null,this._messageSuccess=null,this._messageErrorEmpty=null,this._messageErrorInvalid=null,this._learnMoreText=null,this._footerTextObject=null,this._countryContainerObject=null,this._moreInfoButton=null,this._noCodeButton=null,this._title=null}get classCodeElement(){return this._classCodeElement}get messageSuccess(){return this._messageSuccess}get messageErrorEmpty(){return this._messageErrorEmpty}get messageErrorInvalid(){return this._messageErrorInvalid}get footerText(){return this._footerTextObject}get learnMoreText(){return this._learnMoreText}get countryContainerObject(){return this._countryContainerObject}get moreInfoButton(){return this._moreInfoButton}get noCodeButton(){return this._noCodeButton}get title(){return this._title}};(0,G.Cg)([(0,j.x4W)("classCodeElement"),(0,G.Sn)("design:type",ac.S)],zd.prototype,"_classCodeElement",void 0),(0,G.Cg)([(0,j.x4W)("messageSuccess"),(0,G.Sn)("design:type",j._mx)],zd.prototype,"_messageSuccess",void 0),(0,G.Cg)([(0,j.x4W)("messageErrorEmpty"),(0,G.Sn)("design:type",j._mx)],zd.prototype,"_messageErrorEmpty",void 0),(0,G.Cg)([(0,j.x4W)("messageErrorInvalid"),(0,G.Sn)("design:type",j._mx)],zd.prototype,"_messageErrorInvalid",void 0),(0,G.Cg)([(0,j.x4W)("learnMoreText"),(0,G.Sn)("design:type",j.EYj)],zd.prototype,"_learnMoreText",void 0),(0,G.Cg)([(0,j.x4W)("footerTextObject"),(0,G.Sn)("design:type",j.EYj)],zd.prototype,"_footerTextObject",void 0),(0,G.Cg)([(0,j.x4W)("countryContainerObject"),(0,G.Sn)("design:type",j._mx)],zd.prototype,"_countryContainerObject",void 0),(0,G.Cg)([(0,j.x4W)("moreInfoButton"),(0,G.Sn)("design:type",ic.$)],zd.prototype,"_moreInfoButton",void 0),(0,G.Cg)([(0,j.x4W)("noCodeButton"),(0,G.Sn)("design:type",ic.$)],zd.prototype,"_noCodeButton",void 0),(0,G.Cg)([(0,j.W_S)(),(0,j.nKb)("title"),(0,G.Sn)("design:type",String)],zd.prototype,"_title",void 0),zd=(0,G.Cg)([(0,j.EVk)("RegistrationClassCodePrefab")],zd);class Yd extends Kd{constructor(k,B,U,F){super(k,B,U,F),this._prefabComponent=null,this._submissionError=!1,this._headerPrefab.backButton.GameObject.active=!1}static isScreenActive(k,B){return(!j.Aq$.isDefined(k.curriculumTreeID)||!j.Aq$.isDefined(k.educationData.curriculumTreeID))&&super.isScreenActive(k,B)}create(){super.create(),this._prefabComponent=this.loadFromPrefab(zd,Ei.l.RegistrationClassCode),this.changeTitle(this._prefabComponent.title),this.initializeAudio("classCodeAskTeacher","class_code"),j.Aq$.isDefined(this._data.classCode)||(this._data.classCode=""),this._spinner=this.add(K.q.instance.prodigy.create.sprite(640,350,q._.General_core_json,"loading")),this._spinner.anchor.set(.5,.5),K.q.instance.game.add.tween(this._spinner,this).to({angle:360},2e3,j.GS3.Linear.None,!0,0,Vt.s.MAX_SAFE_INTEGER,!1),this._spinner.visible=!1,this._prefabComponent.messageSuccess.active=!1,this._prefabComponent.messageErrorEmpty.active=!1,this._prefabComponent.messageErrorInvalid.active=!1,this._prefabComponent.footerText.text=this._localizer.getText("REGISTRATION_CLASS_CODE_FIND"),this._prefabComponent.learnMoreText.text=this._localizer.getText("REGISTRATION_LEARN_MORE"),this._prefabComponent.learnMoreText.drawUnderline(0,this._prefabComponent.learnMoreText.text.length),this._prefabComponent.classCodeElement.setStyle("text-align","center"),this._headerPrefab.backButton.GameObject.active=!1,this.disableNext(),this._customInputData="school",this.setCharacter(!0),this._prefabComponent.noCodeButton.onClick.add((()=>{K.q.instance.prodigy.audio.playSFX(18,"pop"),this._customInputData="home",this.continueNext()})),this._prefabComponent.moreInfoButton.onClick.add((()=>{this.sendAnalytics("get_class_code","click_button",null),K.q.instance.prodigy.open.learnMore("HEY_TEACHERS","CLASS_CODE_LEARN_MORE_HEADER","CLASS_CODE_LEARN_MORE_BODY",(()=>{this._prefabComponent.classCodeElement.setVisible(!0)}),(()=>{this._prefabComponent.classCodeElement.text="",this.updateDisplay(),K.q.instance.game.input.keyboard.clearCaptures(),this._prefabComponent.classCodeElement.setVisible(!1)}))})),K.q.instance.game.broadcaster.addAppListener(oi.bS.POST_MESSAGE_RECEIVED,((k,B)=>{"class-code-entry"===B.name&&(K.q.instance.game.input.keyboard.addKeyCapture([Mo.D.BACKSPACE]),this._prefabComponent.classCodeElement.text=B.classCode,"undefined"===this._prefabComponent.classCodeElement.text?this._prefabComponent.classCodeElement.text="":(this.updateDisplay(),this.sendAnalytics("get_class_code","autofill_class_code",null)))}),this,K.q.instance.game),this.addListeners(),this.sendAnalytics("default_signup","class_code","school",Gh.l.EnterClassCode);"clever"===K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.userDataPlatform&&(this._customInputData="home",this.continueNext())}addListeners(){this._prefabComponent.classCodeElement.onFocusChanged.add(this.updateDisplay,this),this._prefabComponent.classCodeElement.enablePerKeyEvents(!0),this._prefabComponent.classCodeElement.onTextChanged.add(this.updateDisplay,this)}updateDisplay(){this.setInputColour(this._prefabComponent.classCodeElement,!1),this._prefabComponent.messageErrorEmpty.active=!1,this._prefabComponent.messageErrorInvalid.active=!1,this._prefabComponent.messageSuccess.active=!1,this._headerPrefab.nextButton.currentState===j.ZIW.Disabled&&this.setCharacter(!0);let k=this._prefabComponent.classCodeElement.text;k=Uh.b.reformatClassCode(k),this._prefabComponent.classCodeElement.text=k,0===k.length?(this.setCharacter(!0),this.disableNext()):Uh.b.isValidClassCode(k)?(this._data.classCode=k,this.enableNext()):this._headerPrefab.nextButton.currentState!==j.ZIW.Disabled&&(this.setCharacter(!0),this.disableNext())}disabledNextClicked(){this.showInvalidClassCodeMessage()}showInvalidClassCodeMessage(){this._spinner.visible=!1,this.setCharacter(!0),this.setInputColour(this._prefabComponent.classCodeElement,!0),this._prefabComponent.messageSuccess.active=!1,this.isEmptyInput(this._prefabComponent.classCodeElement)?this._prefabComponent.messageErrorEmpty.active=!0:(this._prefabComponent.messageErrorInvalid.active=!0,this._submissionError||(this._submissionError=!0,K.q.instance.prodigy.audio.playSFX(46,"classCodeSubmitError")))}saveToData(k){k||(this._data.classCode="")}setInputColour(k,B=!1){B?(k.setStyle("border","2px solid red"),k.setStyle("background-color","#ffcccc")):(k.setStyle("border","1px solid rgb(54, 54, 54)"),k.setStyle("background-color","#ffffff"))}isEmptyInput(k){return!(j.Aq$.isDefined(k.text)&&0!==k.text.length)}customOnPopupOpen(){this._prefabComponent.classCodeElement.setVisible(!1)}customOnPopupClose(){this._prefabComponent.classCodeElement.setVisible(!0)}continueNext(){if("school"===this._customInputData&&this._data.classCode.length>0){this._spinner.visible=!0,this.disableNext();K.q.instance.prodigy.gameContainer.get("c97-bd0d").attachClassCode(this._data.classCode,(()=>this.classCodeAttach(!0)),(()=>this.classCodeAttach(!1))).catch(j.RQr.createHandler("Error attaching class code"))}else{this._customInputData="home",this._spinner.visible=!0;const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.educationData.curriculumTreeID=this._data.curriculumTreeID,k.curriculumTreeID=this._data.curriculumTreeID,this.mutateCurriculumAndContinue(this._data.curriculumTreeID).catch(j.RQr.createHandler("Error setting curriculum"))}}classCodeAttach(k){if(k){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.isClassCodeAttached=!0,k.data.classCodeUpdateTimestamp=Date.now();K.q.instance.prodigy.gameContainer.get("c97-bd0d").getCurriculumAndGrade(k).then((B=>{this._data.grade=B.chosenGrade,this._data.curriculumTreeID=B.curriculumTreeID,this._data.skipNextRequery=!0,k.onEducationLoaded(B),k.setEducation(B.chosenGrade,B.curriculumTreeID),super.continueNext()})).catch((()=>{this.showInvalidClassCodeMessage()}))}else this.showInvalidClassCodeMessage()}mutateCurriculumAndContinue(k){const B=Object.create(null,{continueNext:{get:()=>super.continueNext}});return(0,G.sH)(this,void 0,void 0,(function*(){const U=K.q.instance.prodigy.gameContainer.get("c97-bd0d"),F=(k,B)=>{Tn.J.logSetCurriculumFailed()};j.Aq$.isDefined(k)&&(yield U.setCurriculum({curriculumTreeID:k},void 0,F).catch(j.RQr.createHandler("Error setting curriculum"))),this._spinner.visible=!1,B.continueNext.call(this)}))}removeListeners(){this._prefabComponent.classCodeElement.onFocusChanged.dispose(),this._prefabComponent.classCodeElement.enablePerKeyEvents(!1),this._prefabComponent.classCodeElement.onTextChanged.dispose()}destroy(){this._headerPrefab.backButton.setState(j.ZIW.Default),this._headerPrefab.backButton.inputEnabled=!0,this._headerPrefab.backButton.GameObject.active=!0,K.q.instance.game.broadcaster.removeAppListener(oi.bS.POST_MESSAGE_RECEIVED,this,K.q.instance.game),this._prefabComponent.noCodeButton.onClick.removeAll(),this.removeListeners(),super.destroy()}}var Qd=U(19633),Xd=U(27952);let Zd=class extends j.uAl{constructor(){super(...arguments),this._title=null,this._soundButton=null,this._policyLink=null,this._websiteLink=null,this._nextButton=null,this._backButton=null,this._faceContainer=null,this._onNext=new j.HN0,this._onBack=new j.HN0,this._onDone=new j.HN0}get title(){return this._title}get soundButton(){return this._soundButton}get policyLink(){return this._policyLink}get websiteLink(){return this._websiteLink}get faceContainer(){return this._faceContainer}get nextButton(){return this._nextButton}get backButton(){return this._backButton}get onNext(){return this._onNext}get onBack(){return this._onBack}get onDone(){return this._onDone}dispatchNext(k){this._onNext.dispatch(k)}dispatchBack(k){this._onBack.dispatch(k)}dispatchDone(){this._onDone.dispatch()}destroy(){this._onNext.dispose(),this._onBack.dispose(),this._onDone.dispose(),super.destroy()}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Zd.prototype,"_title",void 0),(0,G.Cg)([(0,j.MnK)(ic.$),(0,G.Sn)("design:type",ic.$)],Zd.prototype,"_soundButton",void 0),(0,G.Cg)([(0,j.MnK)(Xd.t),(0,G.Sn)("design:type",Xd.t)],Zd.prototype,"_policyLink",void 0),(0,G.Cg)([(0,j.MnK)(Xd.t),(0,G.Sn)("design:type",Xd.t)],Zd.prototype,"_websiteLink",void 0),(0,G.Cg)([(0,j.MnK)(Qd.S),(0,G.Sn)("design:type",Qd.S)],Zd.prototype,"_nextButton",void 0),(0,G.Cg)([(0,j.MnK)(Qd.S),(0,G.Sn)("design:type",Qd.S)],Zd.prototype,"_backButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Zd.prototype,"_faceContainer",void 0),Zd=(0,G.Cg)([(0,j.EVk)("RegistrationHeaderPrefab")],Zd);var Jd=U(72937);class tl extends Kd{constructor(k,B,U,F){super(k,B,U,F)}create(){super.create(),this.headerVisible(!1),this._data.showLoaderAtEndOfFlow&&Jd.u.showLoaderIfHidden(),K.q.instance.prodigy.education.loadAndInitEducationData().then((()=>this.doneClicked())).catch((k=>{var B;null===(B=K.q.instance.prodigy.game.state.getCurrentState())||void 0===B||B.onError(Vd.S.makeLoadSkillsError(k))}))}saveToData(k){this._data.loginState=1}doneClicked(){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.forceSaveCharacter(),this.saveToData(!0),this.close(),this._headerPrefab.dispatchDone()}}class el extends class{get branchName(){return this._branchName}get onVisited(){return this._onVisited}set onVisited(k){this._onVisited=k}get isNodeActive(){return this._isNodeActive}constructor(k,B,U){this._children=[],this._onVisited=k,this._isNodeActive=U,this._branchName=B}addChild(k){this._children.push(k)}getAllChildNodes(){return this._children}getChildNodeByName(k){for(let B=0;B(0,G.sH)(this,[k],void 0,(function*([k,B]){if(B){if(this.game)return this._cachedGradeInfo=B,this._prefabComponent?this.populateGradesTiles(this._cachedGradeInfo.data.curriculum):this._data.curriculumGradeInfo=this._cachedGradeInfo.data.curriculum,Promise.resolve();j.VyI.log("Grade info returned but RegistrationChooseGrade has been destroyed.",j.$bb.Warning)}else if(k)throw new Error(k.getErrorMessage())})))).catch((k=>{j.VyI.log(`Failed to get grade data for curriculum with ID ${$} - ${k.message}`,j.$bb.Warning),K.q.instance.prodigy.audio.playSFX(46,"oops"),K.q.instance.prodigy.open.informationDialog(new bd.Z("PARENT_ATTACH_TRY_AGAIN",(()=>{this.continueBack()}),Jc.E.Small,500,"ERROR","ERROR_DIALOG_BODY",void 0,void 0,void 0,Ei.l.ErrorDialogHeader,Ei.l.ErrorDialogFooter))}))}fetchCurriculumGradeResponseData(k){return(0,G.sH)(this,void 0,void 0,(function*(){let B=null,U=null;const F=K.q.instance.prodigy.gameContainer.get("8bb-7057");return yield F.sendRequest(`query CurriculumGrades { curriculum(id:${k}){ id name grades{ nodes { name id number } } } }`).then((k=>{B=k})).catch((k=>{U=new lt._(k)})),[U,B]}))}create(){super.create(),this.disableNext(),this.changeTitle(""),this._prefabComponent=this.loadFromPrefab(il,al.CHOOSE_GRADE_PREFAB_ID),this._prefabComponent.footerTextObject.text=this._localizer.getText("REGISTRATION_WHY_NEED_INFO");const k=this._localizer.getText("REGISTRATION_LEARN_MORE");this._prefabComponent.clickHereTextObject.text=k,this._prefabComponent.clickHereTextObject.drawUnderline(0,k.length),this._prefabComponent.moreInfoButton.onClick.add((()=>{K.q.instance.prodigy.open.informationDialog(new bd.Z("BUTTON_OKAY_CAPITAL",null,Jc.E.Small,500,"REGISTRATION_WHY_NEED_GRADE","REGISTRATION_WHY_NEED_GRADE_REASON")),this.sendAnalytics("popup","information","grade")})),this.hasCorrectGradeInfosForCurriculum(this._data.curriculumTreeID,this._data.curriculumGradeInfo)&&this.populateGradesTiles(this._data.curriculumGradeInfo),this.setCharacter(!0),this.sendAnalytics("default_signup","grade","home",Gh.l.EnterGrade)}populateGradesTiles(k){const B=[],U=this._prefabComponent.GameObject.findComponent(wd.O),F=j.Aq$.isDefined(this._data.grade)?this._data.grade:-1;let G=al.GRADE_LOC_INFOS[al.DEFAULT_GRADE_LOC_INFOS_INDEX];k.grades.nodes.length>0&&(G=al.determineLocInfo(k.grades.nodes[0].name,al.GRADE_LOC_INFOS,G,this._localizer)),this.changeTitle(this._localizer.getText(G.titleKey)),this.initializeAudio(G.audioKey,"grade");const $=this._localizer.getText(G.gradeTextKey);for(let j=0;j{K.q.instance.prodigy.audio.playSFX(18,"pop"),this.onGradeSelected(G.number)})),B.push(V),U.addSelectable(V.toggleObject),G.number===F&&(U.setItemSelected(V.toggleObject,!0),this.onGradeSelected(G.number))}const H=this._prefabComponent.gradeContainerObject.findComponent(j.XVE);this.positionGradeTiles(B,H.widthDelta,H.heightDelta,al.BUTTON_SPACING)}saveToData(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k?(this._data.grade=B.grade=this._selectedGrade,B.updated=!0):(delete this._data.grade,B.grade=null),this._cachedGradeInfo&&(this._data.curriculumGradeInfo=this._cachedGradeInfo.data.curriculum)}positionGradeTiles(k,B,U,F){if(k.length<=0)return void j.VyI.log("positionGradeTiles - no grades to position",j.$bb.Warning);const G=k[0].GameObject.findComponent(j.XVE),$=G.widthDelta+F,H=G.heightDelta+F,V=Math.min(Math.floor(B/$),k.length),W=Math.floor(.5*(B-V*$))+.5*F,q=Math.floor(.5*(U-Math.ceil(k.length/V)*H))+.5*F;for(let j=0;j0}static determineLocInfo(k,B,U,F){let G=U;for(let j=0;jsuper.continueNext}});return(0,G.sH)(this,void 0,void 0,(function*(){const U=K.q.instance.prodigy.gameContainer.get("c97-bd0d"),F=(k,B)=>{Tn.J.logSetInitialGradesFailed()};j.Aq$.isDefined(k)&&(yield U.setInitialGrades({grade:k},void 0,F).catch(j.RQr.createHandler("Error setting init grades"))),B.continueNext.call(this)}))}static isScreenActive(k,B){return(!j.Aq$.isDefined(k.educationData.grade)||!j.Aq$.isDefined(k.educationData.chosenGrade))&&super.isScreenActive(k,B)}}al.CHOOSE_GRADE_PREFAB_ID=64,al.GRADE_BUTTON_PREFAB_ID=65,al.BUTTON_SPACING=20,al.GRADE_LOC_INFOS=[{gradeTextKey:"REGISTRATION_GRADE",titleKey:"REGISTRATION_GRADE_TITLE",audioKey:"whatGrade"},{gradeTextKey:"REGISTRATION_LEVEL",titleKey:"REGISTRATION_LEVEL_TITLE",audioKey:"whatLevel"},{gradeTextKey:"REGISTRATION_YEAR",titleKey:"REGISTRATION_YEAR_TITLE",audioKey:"whatYear"},{gradeTextKey:"REGISTRATION_CLASS",titleKey:"REGISTRATION_CLASS_TITLE",audioKey:"whatClass"}],al.DEFAULT_GRADE_LOC_INFOS_INDEX=0;class rl{static fetchAvailableCurriculumCountries(){return(0,G.sH)(this,void 0,void 0,(function*(){let k=null,B=null;const U=K.q.instance.prodigy.gameContainer.get("8bb-7057");return yield U.sendRequest(rl.FETCH_CURRICULUM_OFFERINGS).then((B=>{k=B})).catch((k=>{B=new lt._(k)})),[B,k]}))}static removeSubdivisionsWithNoDefaultCurriculum(k){k.data.curriculumOfferings.countries.forEach((k=>{k.subdivisions=k.subdivisions.filter((k=>null!==k.defaultCurriculum))}))}}rl.FETCH_CURRICULUM_OFFERINGS="query Find_Countries_With_Offerings {curriculumOfferings { defaultCurriculum(subject:MATH) { name id } countries { name id defaultCurriculum(subject:MATH){ name id } subdivisions{ id name defaultCurriculum(subject:MATH){ name id }}}}}";let ol=class extends j.uAl{constructor(){super(...arguments),this._learnMoreText=null,this._footerTextObject=null,this._countryContainerObject=null,this._moreInfoButton=null}get footerText(){return this._footerTextObject}get learnMoreText(){return this._learnMoreText}get countryContainerObject(){return this._countryContainerObject}get moreInfoButton(){return this._moreInfoButton}};(0,G.Cg)([(0,j.x4W)("learnMoreText"),(0,G.Sn)("design:type",j.EYj)],ol.prototype,"_learnMoreText",void 0),(0,G.Cg)([(0,j.x4W)("footerTextObject"),(0,G.Sn)("design:type",j.EYj)],ol.prototype,"_footerTextObject",void 0),(0,G.Cg)([(0,j.x4W)("countryContainerObject"),(0,G.Sn)("design:type",j._mx)],ol.prototype,"_countryContainerObject",void 0),(0,G.Cg)([(0,j.x4W)("moreInfoButton"),(0,G.Sn)("design:type",ic.$)],ol.prototype,"_moreInfoButton",void 0),ol=(0,G.Cg)([(0,j.EVk)("RegistrationChooseCountryPrefab")],ol);let hl=class extends j.uAl{constructor(){super(...arguments),this._countryTextObjects=[],this._toggleObject=null}get countryText(){return this._countryTextObjects[0].text}set countryText(k){for(let B=0;B(0,G.sH)(this,[k],void 0,(function*([k,B]){return B?(rl.removeSubdivisionsWithNoDefaultCurriculum(B),this._cachedCurriculumLocationInfos=B.data.curriculumOfferings.countries,this._cachedCurriculumLocationInfos.push({name:(0,Ba.k)("ACCOUNT_LOCATION_TITLE_OTHER"),id:"Other",defaultCurriculum:B.data.curriculumOfferings.defaultCurriculum,subdivisions:[]}),this._prefabComponent&&this.populateCountries(this._cachedCurriculumLocationInfos),Promise.resolve()):(j.VyI.log(`Failed to get curriculum country data - ${k.getErrorMessage()}`,j.$bb.Warning),Promise.reject(new Error("No curriculum country data")))})))).catch((()=>{this.game&&(K.q.instance.prodigy.audio.playSFX(46,"oops"),K.q.instance.prodigy.open.informationDialog(new bd.Z("PARENT_ATTACH_TRY_AGAIN",(()=>{this.continueBack()}),Jc.E.Small,500,"ERROR","ERROR_DIALOG_BODY",void 0,void 0,void 0,Ei.l.ErrorDialogHeader,Ei.l.ErrorDialogFooter)))}))}create(){super.create(),this.disableNext(),this._prefabComponent=this.loadFromPrefab(ol,cl.CHOOSE_COUNTRY_PREFAB_ID),this.changeTitle(this._localizer.getText("REGISTRATION_LOCATION_TITLE")),this.initializeAudio("whereYouLive","country"),this._prefabComponent.footerText.text=this._localizer.getText("REGISTRATION_WHY_NEED_INFO"),this._prefabComponent.learnMoreText.text=this._localizer.getText("REGISTRATION_LEARN_MORE"),this._prefabComponent.learnMoreText.drawUnderline(0,this._prefabComponent.learnMoreText.text.length),this._prefabComponent.moreInfoButton.onClick.add((()=>{K.q.instance.prodigy.open.informationDialog(new bd.Z("BUTTON_OKAY_CAPITAL",null,Jc.E.Small,500,"REGISTRATION_LOCATION_DIALOG_TITLE","REGISTRATION_LOCATION_DIALOG_BODY")),this.sendAnalytics("popup","information","location")})),this.hasCurriculumLocationInfos(this._cachedCurriculumLocationInfos)&&this.populateCountries(this._cachedCurriculumLocationInfos),this.setCharacter(!1),this.sendAnalytics("default_signup","country","home",Gh.l.EnterCountry)}populateCountries(k){const B=[],U=K.q.instance.prodigy.gameContainer.get("d0e-64fd"),F=this._prefabComponent.GameObject.findComponent(wd.O);for(let $=0;${K.q.instance.prodigy.audio.playSFX(18,"pop"),this.onCountrySelected(G.id)})),B.push(V),F.addSelectable(V.toggleObject),G.id===H&&(F.setItemSelected(V.toggleObject,!0),this.onCountrySelected(G.id))}const G=this._prefabComponent.countryContainerObject.findComponent(Hd.$).rootContainer;this.positionCountryTiles(B,G.width,G.height,cl.BUTTON_SPACING)}positionCountryTiles(k,B,U,F){if(k.length<=0)return void j.VyI.log("positionCountryTiles - no grades to position",j.$bb.Warning);const G=k[0].GameObject.findComponent(j.XVE),$=G.widthDelta+F,H=G.heightDelta+F,V=Math.min(Math.floor(B/$),k.length),W=Math.floor(.5*(B-V*$))+.5*F,q=Math.floor(.5*(U-Math.ceil(k.length/V)*H))+.5*F;for(let j=0;j0?(this._customInputData="showsub",delete this._data.curriculumTreeID):(this._customInputData="skipsub",this._data.curriculumTreeID=k.defaultCurriculum.id)}else delete this._data.selectedCountryId,delete this._data.curriculumTreeID}hasCurriculumLocationInfos(k){return k&&k.length>0}onCountrySelected(k){this._selectedCountryId=k,this.enableNext()}findCountryInfo(k,B){return B.find((B=>B.id===k))}static isScreenActive(k,B){if(j.Aq$.isDefined(B.selectedCountryId)&&j.Aq$.isDefined(B.curriculumTreeID))return!1;return!j.Aq$.isDefined(k.curriculumTreeID)}}cl.CHOOSE_COUNTRY_PREFAB_ID=67,cl.COUNTRY_BUTTON_PREFAB_ID=66,cl.BUTTON_SPACING=20;var dl=U(47716),ll=U(76501);let ul=class extends j.uAl{constructor(){super(...arguments),this._moreInfoButton=null}get moreInfoButton(){return this._moreInfoButton}};(0,G.Cg)([(0,j.x4W)("moreInfoButton"),(0,G.Sn)("design:type",ic.$)],ul.prototype,"_moreInfoButton",void 0),ul=(0,G.Cg)([(0,j.EVk)("RegistrationChooseSubPrefab")],ul);class fl extends Kd{constructor(){super(...arguments),this._prefabComponent=null,this._selectedCurriculumTreeId=-1,this._selectedSubName="",this._selectedSubLocation=null,this._selectedTextCallback=null}create(){super.create(),this.disableNext();const k=fl.findCountryInfo(this._data.selectedCountryId,this._data.curriculumLocationInfos);k.subdivisions.length>0?(this._prefabComponent=this.loadFromPrefab(ul,fl.CHOOSE_SUB_PREFAB_ID),this.changeTitle(k.name),"US"===k.id?this.initializeAudio("chooseState","sub-country"):this.initializeAudio("whereYouLive","sub-country"),this.sendAnalytics("default_signup","sub-country","home",Gh.l.EnterSubCountry),this._prefabComponent.moreInfoButton.onClick.add((()=>{this.onSubSelected(k.defaultCurriculum.id,"",null,!1),this.continueNext()})),this.populateRegions(k)):j.VyI.log("No sub data found.",j.$bb.Error),this.setCharacter(!1)}populateRegions(k){const B=K.q.instance.prodigy.gameContainer.get("d0e-64fd");this._scrollViewComponent=this.loadFromPrefab(dl.H,Ei.l.RegistrationScrollView),this._scrollViewComponent.GameObject.legacyTransform.group.addChild(this._scrollViewComponent.getCollisionBox()),this._scrollViewComponent.GameObject.legacyTransform.x=250,this._scrollViewComponent.GameObject.legacyTransform.y=210;let U=null;const F=[],G=k.subdivisions.sort(((k,B)=>{const U=k.name.toLowerCase(),F=B.name.toLowerCase();return UF?1:0}));let $="";for(let H=0;HB.loadFromGUID(Ei.l.RegistrationCell,null),this._scrollViewComponent._createSection=()=>B.loadFromGUID(Ei.l.RegistrationSection,null),U.data.length>1&&(this._scrollBarComponent=this.loadFromPrefab(sc.$,Ei.l.RegistrationScrollBar),this._scrollBarComponent._scrollView=this._scrollViewComponent,this._scrollBarComponent.GameObject.legacyTransform.group.addChild(this._scrollBarComponent.getCollisionBox()),this._scrollBarComponent.GameObject.legacyTransform.x=1015,this._scrollBarComponent.GameObject.legacyTransform.y=210,this._scrollViewComponent.verticalScrollBar=this._scrollBarComponent),this._scrollViewComponent.populateContentView()}saveToData(k){k?(this._data.curriculumTreeID=this._selectedCurriculumTreeId,this._data.selectedSubCountryName=this._selectedSubName):(delete this._data.curriculumTreeID,delete this._data.selectedSubCountryName)}onSubSelected(k,B,U,F=!0,G){F&&K.q.instance.prodigy.audio.playSFX(18,"pop"),this._selectedSubLocation&&this._selectedSubLocation!==U&&(this._selectedSubLocation.active=!1,this._selectedTextCallback()),this._selectedSubLocation=U,this._selectedTextCallback=G,this._selectedCurriculumTreeId=k,this._selectedSubName=B,this.enableNext()}static findCountryInfo(k,B){return null==B?void 0:B.find((B=>B.id===k))}static isScreenActive(k,B){if(j.Aq$.isDefined(B.selectedCountryId)&&j.Aq$.isDefined(B.curriculumTreeID))return!1;const U=j.Aq$.isDefined(k.curriculumTreeID),F=fl.findCountryInfo(B.selectedCountryId,B.curriculumLocationInfos);return(null==F?void 0:F.subdivisions.length)>0&&!U}close(){var k,B,U,F,G;super.close(),!1===(null===(k=null==this?void 0:this._prefabComponent.GameObject)||void 0===k?void 0:k.isDestroyed)&&this._prefabComponent.GameObject.destroy(),!1===(null===(U=null===(B=this._scrollViewComponent)||void 0===B?void 0:B.GameObject)||void 0===U?void 0:U.isDestroyed)&&this._scrollViewComponent.GameObject.destroy(),!1===(null===(G=null===(F=this._scrollBarComponent)||void 0===F?void 0:F.GameObject)||void 0===G?void 0:G.isDestroyed)&&this._scrollBarComponent.GameObject.destroy()}}fl.CHOOSE_SUB_PREFAB_ID=68;class bl extends Ka.W{constructor(k,B,U,F=!0,G=!1){super(k,B,200,{},[q._.General_icons_json,q._.Ui_bam_json,q._.Ui_buttons_json,q._.Ui_store_json,q._.Ui_card_json,q._.Ui_registration_json,q._.Ui_icons_json,q._.Ui_panels_json,Z.c.Sfx_store_equip,Z.c.Sfx_store_purchase,Rn.t.Tileset_collisions_png,Rn.t.Tileset_firefly_new_png,"map-forest-b8","map-pathing"]),this.prefabRoot=null,this._data={},this.headerPrefab=null,this._onEndCallback=U,this._createBackdrop=F;const $=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;j.Aq$.isDefined($.curriculumTreeID)&&j.Aq$.isDefined($.educationData.curriculumTreeID)?this._awaitingLocationPromise=Promise.resolve():this._awaitingLocationPromise=this.autoSelectCountryAndSubdivision(),this._data.soundHasBeenPlayed=[],this._data.showLoaderAtEndOfFlow=G,this._activePlayer=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player}create(){super.create(),this._awaitingLocationPromise.finally((()=>{this.initMenu()}))}initMenu(){if(this._createBackdrop){const k=new $d(K.q.instance.game,this.prefabRoot);this.prefabRoot[vh.E.ForegroundLayer]=K.q.instance.game.add.group(this.prefabRoot),this.prefabRoot[vh.E.BackgroundLayer]=K.q.instance.game.add.group(this.prefabRoot),k.render({mapName:"map-forest-b8"}),this.prefabRoot.addChild(k.above)}const k=K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromGUID(Ei.l.RegistrationHeader);this.headerPrefab=k.findComponentInChildren(Zd),this.prefabRoot.addChild(k.findComponent(Hd.$).rootContainer);const B=K.q.instance.prodigy.create.sprite(0,0,q._.Npc_face_noot_json,"face_0");B.scale.x=-1,this.headerPrefab.faceContainer.findComponent(Hd.$).rootContainer.addChild(B),this.headerPrefab.faceContainer.active=!1,this.createFlowTree(),this.flowTreeTraverser.currentNode.isNodeActive(this._activePlayer,this._data)?(this.flowTreeTraverser.currentNode.shouldHideLoader()&&window.hideGameLoader(),this.flowTreeTraverser.start()):this.getNextNode(),this.headerPrefab.onNext.add((()=>{this.flowTreeTraverser.setNodeAsVisited(this.flowTreeTraverser.currentNode),this.setupDataAndGetNextNode()}),this),this.headerPrefab.onBack.add(this.getPrevNode,this),this.headerPrefab.onDone.add(this.setupDataAndGetNextNode,this),this.metricsManager.sendOnboardingFunnelEvent(Gh.l.SignIn),Pt.pF.isDeprecatedIOS()&&K.q.instance.prodigy.open.informationDialog(Pt.pF.PERFORMANCE_WARNING_CONFIG)}createFlowTree(){const k=j.Aq$.isDefined(this._activePlayer.curriculumTreeID),B=this._activePlayer.hasGrade,U=this._activePlayer.classIDs.length>0;let F=null;const G=this.createTreeNode(tl,"success",tl.isScreenActive,!1);if(U&&B&&k)F=G;else{const U=[this.createTreeNode(Yd,"classCode",Yd.isScreenActive,!0),this.createTreeNode(cl,"country",cl.isScreenActive,!0),this.createTreeNode(fl,"subdivision",fl.isScreenActive,!0),this.createTreeNode(al,"grade",al.isScreenActive,!0),G];!B&&k&&(this._data.curriculumTreeID=this._activePlayer.curriculumTreeID),U.forEach(((k,B)=>{BK.q.instance.prodigy.open.registration(k,this._data,this.headerPrefab)),B,U,F)}getNextNode(){this.flowTreeTraverser.getNextChildNode()?this.flowTreeTraverser.getNextChildNode().isNodeActive(this._activePlayer,this._data)?(this.flowTreeTraverser.nextNode(),this.toggleBackVisibility(this.flowTreeTraverser.visitedNodes.length>=1),this.flowTreeTraverser.currentNode.shouldHideLoader()&&window.hideGameLoader()):(this.flowTreeTraverser.currentNode=this.flowTreeTraverser.getNextChildNode(),this.getNextNode()):this.endFlow()}getPrevNode(){this.toggleBackVisibility(this.flowTreeTraverser.visitedNodes.length>1),this.flowTreeTraverser.prevNode()||this.endFlow()}toggleBackVisibility(k){this.headerPrefab.backButton.GameObject.active=k}endFlow(){if(this.headerPrefab.onNext.removeAll(),this.headerPrefab.onBack.removeAll(),this.headerPrefab.onDone.removeAll(),this._onEndCallback){const k=j.Aq$.isDefined(this._data.loginState)?this._data.loginState:0,B={username:this._data.username,password:this._data.password};1===k&&this.metricsManager.sendOnboardingFunnelEvent(Gh.l.FirstLogin),this._onEndCallback(k,B)}this.close()}autoSelectCountryAndSubdivision(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F;try{const G=K.q.instance.prodigy.gameContainer.get("fab-547a"),[,$]=yield G.getData(),[,H]=yield rl.fetchAvailableCurriculumCountries();rl.removeSubdivisionsWithNoDefaultCurriculum(H);const V=null===(B=null===(k=null==H?void 0:H.data)||void 0===k?void 0:k.curriculumOfferings)||void 0===B?void 0:B.countries.find((k=>k.id===$.country.iso_code));let W=null,q=null;if((null==$?void 0:$.subdivisions)&&(null==V?void 0:V.subdivisions))for(const k of $.subdivisions){const B=V.subdivisions.find((B=>B.name===k.name));if(W=null==B?void 0:B.defaultCurriculum.id,q=null==B?void 0:B.name,W)break}this._data.selectedCountryId=(null==V?void 0:V.id)||"Other",this._data.curriculumTreeID=W||(null===(U=null==V?void 0:V.defaultCurriculum)||void 0===U?void 0:U.id)||(null===(F=null==H?void 0:H.data)||void 0===F?void 0:F.curriculumOfferings.defaultCurriculum.id),this._data.selectedSubCountryName=q||"";const z=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!Yd.isScreenActive(z,this._data)){const k=K.q.instance.prodigy.gameContainer.get("c97-bd0d");z.educationData.curriculumTreeID=this._data.curriculumTreeID,z.curriculumTreeID=this._data.curriculumTreeID;const B=(k,B)=>{Tn.J.logSetCurriculumFailed()};yield k.setCurriculum({curriculumTreeID:this._data.curriculumTreeID},void 0,B).catch(j.RQr.createHandler("Error setting curriculum"))}}catch(G){j.VyI.log("Error sending first login event",j.$bb.Error)}}))}setupDataAndGetNextNode(){if(this.flowTreeTraverser.getNextChildNode())return this._data.skipNextRequery||this.flowTreeTraverser.getNextChildNode().shouldSkipRequery()?(this._data.skipNextRequery=!1,void this.getNextNode()):void this.setupEducationData().catch((k=>{var B;null===(B=K.q.instance.prodigy.game.state.getCurrentState())||void 0===B||B.onError(k)}));this.endFlow()}setupEducationData(){return(0,G.sH)(this,void 0,void 0,(function*(){try{const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=K.q.instance.prodigy.gameContainer.get("c97-bd0d"),U=yield j.Egh.autoRetry((()=>(0,G.sH)(this,void 0,void 0,(function*(){return B.getCurriculumAndGrade(k)})))),F=Object.assign(Object.assign({},U),{goalId:k.goalId});k.onEducationLoaded(F),this.getNextNode()}catch(e){throw Vd.S.makeLoadSkillsError(e)}}))}close(){this._data.soundHasBeenPlayed=[],this.prefabRoot.destroy(),this.headerPrefab.destroy(),super.close()}}var pl=U(62248);var vl,gl=U(64868),ml=U(43858);!function(k){k.V1="shop_v1_",k.V2="shop_v2_",k.V3="shop_v3_"}(vl||(vl={}));var yl=U(59701),_l=U(45385),El=U(21644),wl=U(88131),Tl=U(90744),Sl=U(10471);class Al extends Ka.W{constructor(k,B,U,F,G){super(k,B,70,{},[q._.Ui_store_json,q._.Ui_card_json,q._.Ui_buttons_json,q._.Ui_raster_icons_json,Z.c.Sfx_store_equip,Z.c.Sfx_store_purchase,Z.c.Sfx_button_disabled_state,Z.c.Sfx_tab_click,q._.Ui_raster_icons_json].concat(null!=F?F:[])),this._closeCallback=null,this.onItemPurchased=new j.HN0,this.storeData=null,this.storeID=-1,this.petPurchaseLevel=1,this._isPurchaseInProgress=!1,this.game=k,this.storeID=U,this._closeCallback=G,this.isFullScreenUI=!0}getStore(){return this.storeData}buyItem(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._isPurchaseInProgress)return wl.Q.success(!1);const B=le.t.getItem(k.getType(),k.getID()),U=k.getCost()[0],F=this.storeData.getName(),G=K.q.instance.prodigy.gameContainer.get("c47-20b6");let $=B;G.shop.sendShopPurchaseCompletedEvent(vl.V2,this.storeData,k);const H=`${vl.V2}${this.storeData.getName()}`,V={sink_id:H,sink_type:gn.C.Shop,instance_type:Ai.N.Interface,instance_id:G.featureCommon.getCurrentInterfaceID(H)};try{if(this._isPurchaseInProgress=!0,yield this._paymentManager.spend({currency:U.getID(),value:U.getAmount(),type:U.getType()},"store",V),j.Aq$.isDefined(B.data)?$=B.data:"pet"===k.getType()&&($={ID:k.getID()}),j.Aq$.isDefined(B.data)&&"pet"===k.getType()){const B=new fa.R(this.game,{ID:k.getID()}).getMaxHearts(this.petPurchaseLevel);$=Object.assign(Object.assign({},$),{hp:B})}Tn.J.bagItem({ID:k.getID(),type:k.getType(),N:1,data:$},this.game,"store",F,{source_type:gn.C.Shop,instance_type:Ai.N.Interface,instance_id:G.featureCommon.getCurrentInterfaceID(H)}),this.sendBuyAnalytics(k,B,U),Sl.B.includes(U.getID())&&this.sendSecureCurrencySpendAnalytics(U,V).catch(j.RQr.createHandler("Error sending secure item spend analytics")),this.onItemPurchased.dispatch(k)}catch(e){return wl.Q.error(e)}finally{this._isPurchaseInProgress=!1}return wl.Q.success(!0)}))}sendBuyAnalytics(k,B,U){const F=j.Aq$.isDefined(B.member)&&1===B.member,G=K.q.instance.prodigy.gameContainer,$=G.get("e20-0fb0").player;if(F&&!$.hasMembership()){let B={};"pet"===k.getType()&&$.kennel.isFull()||(B={conversionFunnelName:Sn.o.FunnelBuyMemberItem,conversionFunnelMetadata:`${k.getType()}-${k.getID()}`});const U=yn.P.shouldUseUnifiedConversionFlow(Sn.o.FunnelBuyMemberItem)?_n.R.UnifiedConversionFlow:Tn.J.showYouTubeMembershipAd(this.game,!0)?_n.R.Video:_n.R.Static;G.get("c47-20b6").purchase.sendFunnelStart({type:"Store-Buy-Member-Item",category:"Store",contentId:`${k.getType()}-${k.getID()}`,adType:U,adVersion:yn.P.getAdVersion(Sn.o.FunnelBuyMemberItem)})}}sendSecureCurrencySpendAnalytics(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U,F;const G=yield le.t.secureGetItem(k.getType(),k.getID());this._segment.item.sendItemRemovedEvent(k.getID(),null!==(F=null===(U=null==G?void 0:G.data)||void 0===U?void 0:U.name)&&void 0!==F?F:"unknown",k.getType(),k.getAmount(),B)}))}close(){this._closeCallback&&this._closeCallback(),super.close()}destroy(){this.onItemPurchased.dispose(),super.destroy()}}(0,G.Cg)([(0,Re.b)("743-fd51"),(0,G.Sn)("design:type",Tl.E)],Al.prototype,"_paymentManager",void 0);var Cl=U(63811);let Ol=class extends j.uAl{initializeComponents(k){this.categoryTabs=[this.categoryTab0,this.categoryTab1,this.categoryTab2,this.categoryTab3,this.categoryTab4,this.categoryTab5,this.categoryTab6];for(let B=0;B{K.q.instance.prodigy.audio.playSFX(18,"pop"),B()})),this._prefabComponent.currencyIconContainer.addComponent(Eo._).setAsset(Ut.E.getIconForType("currency",this.currencyData.ID)).catch(j.RQr.createHandler("Unable to load currency icon for store")),this.updatePlayerCurrency()}updatePlayerCurrency(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;1===this.currencyData.ID?this._prefabComponent.currencyAmount.text=k.getGold().toLocaleString("en-US").replace(/,/g," "):this._prefabComponent.currencyAmount.text=k.backpack.hasItem(this.currencyData.type,this.currencyData.ID).toLocaleString("en-US").replace(/,/g," ")}}class Dl extends Al{constructor(k,B,U,F,G,j){super(k,B,U,[q._.Ui_panels_json],F),this._categories=[],this._currentCategory=0,this._currentPaginationIndex=0,this._categoryPageCount=0,this._merchantDataOverride={},this._sortedPageItems={},this._storePrefabID=null!=G?G:Ei.l.Store,this._overrideInterfaceOpened=null!=j?j:{},this._activePlayer=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player}create(){super.create(),this._hardCurrencyDataProvider=K.q.instance.prodigy.gameContainer.get("5c7-e02d"),this._localizer=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),this._activePlayer.onEquipmentChange.add(this.onEquipmentChanged,this);K.q.instance.prodigy.gameContainer.get("a50-726e").getStore(this.storeID).then((([k,B])=>{k?this.onGetStoreFailure(k):this.onGetStoreSuccess(B)})).catch(j.RQr.createHandler("Unable to load store data"))}onGetStoreSuccess(k){if(j.Aq$.isDefined(this.game)){this.storeData=k,this._categories=this.storeData.getPages();for(const k of this._categories)for(const B of k.getStoreItems()){const k=B.getCost()[0],U=this.getItemData(B);this.applyCostOverrides(U,k)}this.loadFromPrefab()}}onGetStoreFailure(k){j.VyI.log(`Store with ID: ${this.storeID} could not be loaded - ${k.getErrorMessage()}`,j.$bb.Warning),K.q.instance.prodigy.open.message(this._localizer.getText("STORE_OPEN_FAILED_MESSAGE"),this.close.bind(this),null,this._localizer.getText("STORE_OPEN_FAILED_TITLE"))}loadFromPrefab(){const k=new j._mx;k.addComponent(_r.B).getRootContainer().setParent(this);let B=this.storeData.getName();switch(this.storeID){case 62:B="Winterfest Shop";break;case 63:B="Fox Faction";break;case 64:B="Bunny Faction"}if(19===this.storeID&&K.q.instance.prodigy.skin.isFestivalActive("Summerfest")){const k=new mt;k.setAssetFrame("face_3"),k.setAssetTag(q._.Npc_face_merchant_json),k.setPosition(80,160),this.storeData.setMerchantAvatar(k)}k.addComponent(j.bE_).Container.bind(tr.n7.StoreName).toConstantValue(B);K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(this._storePrefabID,k).then((k=>{this._prefab=k,this._prefabComponent=this._prefab.findComponentInChildren(Ol),this._prefabComponent.initializeComponents(this);const B=this.storeData.getName();this.currentInterfaceName=vl.V2+B,this._prefabComponent.sideBar&&(this._prefabComponent.sideBar.shopInterfaceName=this.currentInterfaceName,this._prefabComponent.sideBar.shopId=this.storeID),El.ju.map((k=>(0,El.Bi)(El.p1[k]))).includes(this.storeID)&&(this._prefabComponent.storeName.active=!1,this._prefabComponent.unifiedStoreButtonContainer.active=!0),this._topBar=new Il(this.game,this._prefabComponent),this.initializeStore(),this.setupViewMoreStoresButton()})).catch(j.RQr.createHandler("Unable to load store prefab"))}setupViewMoreStoresButton(){var k;const B=this._activePlayer.getPlayerData().unifiedStore;B&&B.viewMoreStoresButtonClicks<3&&B.viewMoreStoresButtonViews<5?(this._prefabComponent.viewMoreStoresButton.onClick.addOnce((()=>{this._activePlayer.data.unifiedStore.viewMoreStoresButtonClicks++,this._activePlayer.forceSaveCharacter()})),null===(k=this._prefabComponent.spineAnimation.findComponentInChildren(Ir.j))||void 0===k||k.playAnimation("sparkle",!0),this._activePlayer.data.unifiedStore.viewMoreStoresButtonViews++,this._activePlayer.forceSaveCharacter()):this._prefabComponent.spineAnimation.active=!1,this._prefabComponent.viewMoreStoresButton.onClick.addOnce((()=>{this.fireButtonEvent({interfaceName:this.currentInterfaceName,interfaceType:bi.Wm.Menu,buttonName:jh.k.ViewMoreStores,saveClickInfo:jh.k.ViewMoreStores}),this.fireInterfaceEvent({interfaceName:ph.B.UnifiedStoreBase,interfaceType:bi.Wm.Menu,originType:bi.$N.ButtonClick,originID:jh.k.ViewMoreStores})}),this)}setMerchant(k){k&&(this._merchantDataOverride=k)}initializeStore(){var k;this._topBar.initialize({ID:this.storeData.getStoreCurrencyID(),type:this.storeData.getStoreCurrencyType()},this.close.bind(this)),this._currentClickedItemCards=[],this.initializeCategoryTabs(),this.setupPaginationCallbacks(),this.refreshItemDisplay(),this.setMerchant(),this.onItemPurchased.add((k=>{this._topBar.updatePlayerCurrency(),this._prefabComponent.sideBar.renderBottomPanel(),this._prefabComponent.sideBar.renderButtons();const B=this._selectedCard.GameObject.parent.findComponent(ml.j),U=this.generateItemCardData(k);B.setItemData(U),B.updateDisplay()})),this._segment.featureCommon.sendInterfaceEvent(Object.assign({interfaceName:`${vl.V2}${this.storeData.getName()}`,interfaceType:bi.Wm.Menu,originType:null!==(k=this._overrideInterfaceOpened.originType)&&void 0!==k?k:bi.$N.NpcClick},this._overrideInterfaceOpened))}generateItemCardData(k){const B=this.getItemData(k),U=k.getCost()[0];return{item:B,currencyAmount:U.getAmount(),currencyID:U.getID()}}applyCostOverrides(k,B){if(k.data.dynamicStoreBaseCost){const U=k.data.dynamicStoreBaseCost;return B.setType("currency"),B.setID(U.currencyId),void B.setAmount(U.amount)}if("pet"===k.type){const U=this._hardCurrencyDataProvider.petAcquisitionCost(k.ID,pl.l6.Rescue);if(U)return B.setType("currency"),B.setID(U.currency),void B.setAmount(U.value)}}refreshItemDisplay(){this.refreshPagination(),this.getItemsForPage(this._currentPaginationIndex)}initializeCategoryTabs(){let k=0;for(let B=0;B{this._currentCategory!==B&&(K.q.instance.prodigy.audio.playSFX(50,"pop"),this._currentCategory=B,this.refreshItemDisplay(),this._prefabComponent.sideBar.setToDefaultState(),this.game.broadcaster.broadcast(oi.iZ.ToolTipClosed))}));const G=F.findComponentsInChildren(j.EYj),$=F.findComponentInChildren(_l.e);for(let k=0;k0&&this._prefabComponent.categoryFill.transform.setPositionY((this._categories.length+1-k)*this._prefabComponent.categoryTabs[0].transform.rectTransformDimensions.height+5)}hasNewItems(k){var B;const U=(null===(B=this._activePlayer.data.lastStoreVisitLevels)||void 0===B?void 0:B[this.storeID])||1,F=this._activePlayer.getLevel();for(let G=0;GU&&j>U&&j<=F&&-1===this._currentClickedItemCards.indexOf($))return!0}return!1}setupPaginationCallbacks(){this._prefabComponent.nextButton.onClick.add((()=>{K.q.instance.prodigy.audio.playSFX(18,"pop"),this._prefabComponent.backButton.inputEnabled=!0,this._prefabComponent.backButton.currentState=2,this._prefabComponent.backButtonDisabled.active=!1,this._currentPaginationIndex+=1,this._currentPaginationIndex+1>=this._categoryPageCount&&(this._prefabComponent.nextButton.inputEnabled=!1,this._prefabComponent.nextButtonDisabled.active=!0),this._prefabComponent.pageNumber.text=this._localizer.getText("PAGE_NUMBER",this._currentPaginationIndex+1,this._categoryPageCount),this.getItemsForPage(this._currentPaginationIndex),this._prefabComponent.sideBar.setToDefaultState(),this.game.broadcaster.broadcast(oi.iZ.ToolTipClosed),this.updatePaginationBadges()})),this._prefabComponent.backButton.onClick.add((()=>{K.q.instance.prodigy.audio.playSFX(18,"pop"),this._prefabComponent.nextButton.inputEnabled=!0,this._prefabComponent.nextButton.currentState=2,this._prefabComponent.nextButtonDisabled.active=!1,this._currentPaginationIndex-=1,this._currentPaginationIndex-1<0&&(this._prefabComponent.backButton.inputEnabled=!1,this._prefabComponent.backButtonDisabled.active=!0),this._prefabComponent.pageNumber.text=this._localizer.getText("PAGE_NUMBER",this._currentPaginationIndex+1,this._categoryPageCount),this.getItemsForPage(this._currentPaginationIndex),this._prefabComponent.sideBar.setToDefaultState(),this.game.broadcaster.broadcast(oi.iZ.ToolTipClosed),this.updatePaginationBadges()}))}refreshPagination(){this._currentPaginationIndex=0,this._categoryPageCount=Math.ceil(this._categories[this._currentCategory].getStoreItems().length/Dl.NUM_ITEMS_PER_PAGE),this._prefabComponent.backButton.inputEnabled=!1,this._prefabComponent.backButtonDisabled.active=!0;const k=this._prefabComponent.nextButton.GameObject.findComponentInChildren(_l.e);this._prefabComponent.backButton.GameObject.findComponentInChildren(_l.e).setActive(!1),k.setActive(!1),1===this._categoryPageCount?(this._prefabComponent.nextButton.inputEnabled=!1,this._prefabComponent.nextButtonDisabled.active=!0):(this._prefabComponent.nextButton.inputEnabled=!0,this._prefabComponent.nextButton.currentState=2,this._prefabComponent.nextButtonDisabled.active=!1),this._prefabComponent.pageNumber.text=this._localizer.getText("PAGE_NUMBER",1,this._categoryPageCount),this.updatePaginationBadges()}updatePaginationBadges(){this.setupSortedPageItems();const k=Math.max(0,(this._currentPaginationIndex-1)*Dl.NUM_ITEMS_PER_PAGE),B=Math.min(this._sortedPageItems[this._currentCategory].length,this._currentPaginationIndex*Dl.NUM_ITEMS_PER_PAGE),U=Math.max(0,(this._currentPaginationIndex+1)*Dl.NUM_ITEMS_PER_PAGE),F=Math.min(this._sortedPageItems[this._currentCategory].length,(this._currentPaginationIndex+2)*Dl.NUM_ITEMS_PER_PAGE),G=this._sortedPageItems[this._currentCategory].slice(k,B),j=this._sortedPageItems[this._currentCategory].slice(U,F),$=this._prefabComponent.nextButton.GameObject.findComponentInChildren(_l.e);this._prefabComponent.backButton.GameObject.findComponentInChildren(_l.e).setActive(this.hasNewItems(G)),$.setActive(this.hasNewItems(j))}setupSortedPageItems(){if(!this._sortedPageItems[this._currentCategory]){const k=this._categories[this._currentCategory].getStoreItems();this._sortedPageItems[this._currentCategory]=$.orderBy(k,[k=>yl.W.isItemOwned(this._activePlayer,{ID:k.getID(),type:k.getType()})?1:0,k=>this.getItemData(k).data.lockLevel,k=>k.getCost()[0].getID(),k=>k.getCost()[0].getAmount(),k=>this.getItemData(k).data.ID],["asc","asc","asc","asc","asc"])}}getItemsForPage(k){for(const F of $.clone(this._prefabComponent.cardPanel.children))F.destroy();this._selectedCard=null;const B=this._activePlayer.getGearBattleStats();this.setupSortedPageItems();const U=K.q.instance.prodigy.gameContainer.get("d0e-64fd");for(let F=k*Dl.NUM_ITEMS_PER_PAGE;F{var k;this._selectedCard&&(this._selectedCard.setSelected(!1),this._selectedCard.inputEnabled=!0,this._selectedCard.GameObject.findComponentInParent(ml.j).animateArrow(!1)),$.animateArrow(!0),$.setNewBadge(!1);const B=$.getItem().ID;-1===this._currentClickedItemCards.indexOf(B)&&this._currentClickedItemCards.push(B),this._selectedCard=H,H.inputEnabled=!1;const U=this.getItemData(G),F=G.getCost()[0];this._prefabComponent.sideBar.renderSelectedItem({type:G.getType(),id:G.getID(),cost:{type:F.getType(),ID:F.getID(),N:F.getAmount()},member:null===(k=U.data)||void 0===k?void 0:k.member},this.buyItem.bind(this,G)),this._segment.shop.sendShopItemViewedEvent(vl.V2,this.storeData,G),this._prefabComponent.sideBar.onEquipItem.removeAll(this),this._prefabComponent.sideBar.onPurchaseFailure.removeAll(this),this._prefabComponent.sideBar.onEquipItem.add((k=>{this._segment.featureCommon.sendButtonEvent({buttonName:k.member?jh.k.EquipMemberItem:jh.k.EquipItem,destinationName:"equip-shop-item",interfaceType:bi.Wm.Shop,interfaceName:`${this.storeID}`,elementType:G.getType(),elementID:`${G.getID()}`})}),this),this._prefabComponent.sideBar.onPurchaseFailure.add(((k,B)=>{this._segment.shop.sendShopPurchaseFailedEvent(vl.V2,this.storeData,G,B)}),this),this._prefabComponent.sideBar.onPurchaseSuccess.add((k=>{this._segment.featureCommon.sendButtonEvent({buttonName:jh.k.BuyItem,destinationName:"buy-shop-item",interfaceType:bi.Wm.Shop,interfaceName:`${this.storeID}`,elementType:G.getType(),elementID:`${G.getID()}`})}),this),this.game.broadcaster.broadcast(oi.iZ.ToolTipClosed)}));const V=this.generateItemCardData(G);$.setItemData(V),$.setPlayerGearStats(B),$.updateDisplay()}}getItemData(k){return le.t.getItem(k.getType(),k.getID())}shouldCloseAllOpenMenus(k=!1){var B;return null!==(B=K.q.instance.prodigy.world.getCurrentZone()!==hn.A_.TOWERTOWN&&K.q.instance.prodigy.world.getCurrentZone()!==hn.A_.CRYSTALCAVERNS&&!k)&&void 0!==B&&B}onEquipmentChanged(){const k=this._activePlayer.getGearBattleStats();for(const B of this._prefabComponent.cardPanel.children)B.findComponent(ml.j).setPlayerGearStats(k,!0)}close(k=!1){var B,U;const F=this.storeData.getName();this.shouldCloseAllOpenMenus(k)&&K.q.instance.prodigy.open.menuCloseAll(),this._segment.featureCommon.sendInterfaceEvent({interfaceName:`${vl.V2}${F}`,interfaceType:bi.Wm.Menu,closeMethod:bi.Lv.CloseButton}),null!==(B=(U=this._activePlayer.data).lastStoreVisitLevels)&&void 0!==B||(U.lastStoreVisitLevels={}),this._activePlayer.data.lastStoreVisitLevels[this.storeID]=this._activePlayer.getLevel(),this._activePlayer.forceSaveCharacter(),super.close()}destroy(){this._prefab&&this._prefab.destroy(),this._prefab=null,this._prefabComponent=null,this._topBar=null,this._activePlayer.onEquipmentChange.removeAll(this),this.storeData=null,this._categories=[],this._selectedCard=null,this._localizer=null,this._hardCurrencyDataProvider=null,this._sortedPageItems={},this._currentClickedItemCards.length=0,super.destroy()}}Dl.NUM_ITEMS_PER_PAGE=6,Dl.NUM_ITEMS_PER_ROW=3,Dl.ITEM_CARDS_OFFSET=215,Dl.ITEM_ROW_OFFSET=255;var Rl=U(83142),Pl=U(95429);class Ml extends Ka.W{get onCloseClicked(){return this._onCloseClicked}constructor(k,B,U,F){super(k,B,200,null),this._ui=null,this._onCloseClicked=new j.HN0,this._menuComponent=null,this._components=[],this._callToAction=U,this._videoConfig=F}create(){var k;super.create();const B=K.q.instance.prodigy.gameContainer.get("d0e-64fd");this._ui=B.load(null!==(k=this._videoConfig.videoPrefabID)&&void 0!==k?k:121,K.q.instance.prodigy.open.menusGameObject),this._components=this._ui.findComponentsInChildren(Rl.D,!0),this._components.forEach((k=>{k.loadVideoConfig(this._videoConfig)})),this._menuComponent=this._ui.findComponent(Pl.k),this._menuComponent.closeButton.onClick.addOnce((()=>{K.q.instance.prodigy.audio.playSFX(18,"pop"),this._onCloseClicked.dispatch(),this.close()})),this._callToAction?this._menuComponent.callToActionButton.onClick.addOnce((()=>{K.q.instance.prodigy.audio.playSFX(18,"pop"),this._callToAction(),this.close()})):this._menuComponent.callToActionButton.GameObject.active=!1}setActive(k){super.setActive(k),this._menuComponent.videoPlayer.setVisible(k)}destroy(){this._menuComponent.destroy(),this._ui.destroy(),this._onCloseClicked.dispose(),super.destroy()}getPlayer(){return this._menuComponent}}class Nl extends Hh.a{constructor(k,B,U,F){super(k,B,0,0,K.q.instance.prodigy.textureMenu),this.content=null,this.nameText=null,this.bar=null,this.closeBtn=null,this.btns=null,this.selectedBtn=null,this.names=[],this.content=K.q.instance.prodigy.create.element(this),this.onClose=F,this.page=0,U?this.create():this.createAdvanced()}selectNamesList(){this.names=tc.f.getFilteredFirstNames()}create(){this.selectNamesList(),this.addTransparent();const k=K.q.instance.prodigy.create.element(this.background,320,150),B=K.q.instance.prodigy.create.element(k,0,0);K.q.instance.prodigy.create.panel(B,0,0,16,10,"shine"),B.add(new Pr.C(this.game,11,80,618,40,q._.Tiled_sprites_json,"blue-top")),B.add(new Pr.C(this.game,11,120,618,200,q._.Tiled_sprites_json,"blue-mid")),B.add(new Pr.C(this.game,11,320,618,40,q._.Tiled_sprites_json,"blue-top2"));const U=K.q.instance.prodigy.create.panel(B,40,-20,14,2,"banner");super.create(),this.nameText=K.q.instance.prodigy.create.font(this,k.x+U.x,k.y+U.y+15,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NAME_CHANGE_NAME_WIZARD"),{width:U.width,align:"center",size:36,fontID:9}),this.bar=K.q.instance.prodigy.create.slider(this,k.x+30,k.y+80+20,240,!0,!0),this.closeBtn=K.q.instance.prodigy.create.textButton(this,490,k.y+400-25,{text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NAME_CHANGE_BUTTON_DONE"),icon:"yes",size:fo.MED},(()=>{this.close()})),this.closeBtn.setInactive(),this.content=K.q.instance.prodigy.create.element(this,this.bar.x+70,this.bar.y),this.btns=[];for(let F=0;F<12;F++){const k=K.q.instance.prodigy.create.panel(this.content,F%2*260,40*Math.floor(F/2),6,1,"lb");k.text=K.q.instance.prodigy.create.font(k,0,5,"",{width:240,align:"center",size:20}),k.setClickable(this.setName.bind(this,F),null,this.onNameOver.bind(this,k),this.onNameOut.bind(this,k)),this.btns.push(k)}this.bar.reset(Math.ceil(this.names.length/12),1,0,(k=>{this.setPage(k)}))}setPage(k){this.setName(null),j.Aq$.isDefined(this.selectedBtn)&&this.selectedBtn.changePanel("lb"),this.selectedBtn=null,this.page=k;for(let B=0;B<12;B++){const U=this.btns[B];12*k+B>=this.names.length?U.visible=!1:(U.text.setText(this.names[12*k+B].data.value),U.visible=!0)}}setName(k){if(j.Aq$.isDefined(k)){this.onNameDown(k);const B=this.btns[k],U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;U.appearance.getName().setFirstName(this.names[12*this.page+k].ID),U.appearance.updated=!0,this.nameText.setText(B.text.text),this.closeBtn.setActive()}else this.nameText.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NAME_CHANGE_NAME_WIZARD")),this.closeBtn.setInactive()}createAdvanced(){this.addTransparent();const k=K.q.instance.prodigy.create.element(this.background,320,150),B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=K.q.instance.prodigy.create.element(k,0,0);K.q.instance.prodigy.create.panel(U,0,0,16,10,"shine"),U.add(new Pr.C(this.game,11,80,618,40,q._.Tiled_sprites_json,"blue-top")),U.add(new Pr.C(this.game,11,120,618,200,q._.Tiled_sprites_json,"blue-mid")),U.add(new Pr.C(this.game,11,320,618,40,q._.Tiled_sprites_json,"blue-top2"));const F=K.q.instance.prodigy.create.panel(U,40,-20,14,2,"banner");super.create();const G=B.getFirstName();this.nameText=K.q.instance.prodigy.create.font(this,k.x+F.x,k.y+F.y+18,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NAME_CHANGE_CHOOSE_TITLE"),{width:F.width,align:"center",size:30}),this.closeBtn=K.q.instance.prodigy.create.textButton(this,490,k.y+400-25,{text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NAME_CHANGE_BUTTON_DONE"),icon:"yes",size:fo.MED},(()=>{this.close()})),this.closeBtn.setInactive(),this.content=K.q.instance.prodigy.create.element(this,k.x+120,k.y+80+20),this.btns=[];for(let j=0;j<6;j++){const k=K.q.instance.prodigy.create.panel(this.content,0,40*j,12,1,"lb");k.text=K.q.instance.prodigy.create.font(k,0,5,"",{width:480,align:"center",size:20}),k.setClickable(this.setLongName.bind(this,j),null,this.onNameOver.bind(this,k),this.onNameOut.bind(this,k)),this.btns.push(k)}K.q.instance.prodigy.create.button(this,k.x+30,k.y+80+20,q._.General_icons_json,"dice",(()=>{this.randomNames(G)})),this.randomNames(G)}randomNames(k){this.setName(null),j.Aq$.isDefined(this.selectedBtn)&&this.selectedBtn.changePanel("lb"),this.selectedBtn=null;const B=[];let U=0;this.names=[];for(let F=0;F<6;F++)do{const G=$.sample(le.t.getItemsWithFilter("name",(k=>1===k.data.type))),j=$.sample(le.t.getItemsWithFilter("name",(k=>2===k.data.type))),H=$.capitalize(`${G.data.value}${j.data.value}`);this.btns[F].text.setText(`${k} ${H}`),B.indexOf(H)<0&&(B.push(H),this.names.push({middle:G.ID,last:j.ID}),++U)}while(U===F)}setLongName(k){this.onNameDown(k);const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;B.appearance.getName().setMiddleName(this.names[k].middle),B.appearance.getName().setLastName(this.names[k].last),B.appearance.updated=!0,this.nameText.setText(this.btns[k].text.text),this.closeBtn.setActive()}onNameDown(k){j.Aq$.isDefined(this.selectedBtn)&&this.selectedBtn.changePanel("lb"),this.selectedBtn=this.btns[k],this.btns[k].changePanel("lb-green")}onNameOver(k){k.changePanel("lb-green")}onNameOut(k){k!==this.selectedBtn&&k.changePanel("lb")}}class xl extends Nl{constructor(k,B,U,F){super(k,B,U,F),this.previousPlayerName=null;const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.previousPlayerName=G.appearance.getName(),this.setPage(0)}create(){super.create(),K.q.instance.prodigy.create.button(this,930,140,q._.General_icons_json,"close",(()=>{this.closeMenuWithoutSettingName()}))}selectNamesList(){this.names=tc.f.getFilteredFirstNames()}closeMenuWithoutSettingName(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.onClose=null,k.appearance.setName(this.previousPlayerName),this.close()}}var Ll,kl=U(51894),Bl=U(35084),Ul=U(63746);!function(k){k.BackpackCostumesTab="costumes",k.WizardCostumesMenuBackpackTab="backpack"}(Ll||(Ll={}));class Fl extends Hh.a{constructor(k,B,U){super(k,B,0,0,K.q.instance.prodigy.textureMenu),this.player=null,this.content=null,this.bar=null,this._playerContainer=null,this.equip=null,this.itemType=null,this.owned=[],this._pageSize=6,this._itemCards=Array(this._pageSize).fill(new j._mx),this._itemCardsCreatedCount=0,this._buttons=[],this._segment=K.q.instance.prodigy.gameContainer.get("c47-20b6"),this.player=U,this.currentInterfaceName=ph.B.Backpack,this.create(),this.cullable=!0}create(){this.addTransparent(),this.content=K.q.instance.prodigy.create.element(this,560,200);const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this._buttons=[{type:"hat",icon:{type:"hat",ID:5},bot:k.getText("BACKPACK_BUTTON_HATS")},{type:"outfit",icon:{type:"outfit",ID:1},bot:k.getText("BACKPACK_BUTTON_OUTFITS")},{type:"weapon",icon:{type:"weapon",ID:1},bot:k.getText("BACKPACK_BUTTON_WANDS")},{type:"spellRelic",icon:{type:"spellRelic",ID:13},bot:k.getText("BACKPACK_BUTTON_RELICS")},{type:"boots",icon:{type:"boots",ID:7},bot:k.getText("BACKPACK_BUTTON_BOOTS")},{type:"follow",icon:{type:"follow",ID:2},bot:k.getText("BACKPACK_BUTTON_BUDDIES")},{type:"item",icon:{type:"item",ID:5},bot:k.getText("BACKPACK_BUTTON_ITEMS")},{type:"currency",icon:{type:"item",ID:26},bot:k.getText("BACKPACK_BUTTON_CURRENCY")},{type:"mount",icon:{type:"mount",ID:1},bot:k.getText("BACKPACK_BUTTON_MOUNT")}];const B={buttons:{offset:{x:-150,y:0},iconOffset:{x:0,y:0}},banner:{frameName:"banner",atlasID:0,width:29},closeButton:void 0};let U=0;(0,Dt.G)(Zo.q).enabled&&(this._buttons.unshift({type:"costume",atlas:q._.Ui_wizard_costumes_json,icon:"icon-costume-0",bot:k.getText("BACKPACK_BUTTON_COSTUMES"),callback:()=>{this._segment.featureCommon.sendTabEvent({tabName:Ll.BackpackCostumesTab,interfaceName:ph.B.Backpack,interfaceType:bi.Wm.Menu,saveClickInfo:Ll.BackpackCostumesTab}),K.q.instance.prodigy.open.openWizardCostumesMenu(bi.$N.TabClick,Ll.BackpackCostumesTab)}}),B.buttons.spacing=107,U=1);const F=this.createBaseSetup(31,16,"shine",ph.B.Backpack,this._buttons,!0,void 0,B,void 0,!0),G=K.q.instance.prodigy.create.element(F,-20,-40);G.setRenderState(!0),G.add(new Pr.C(this.game,71,200,429,40,q._.Tiled_sprites_json,"blue-top")),G.add(new Pr.C(this.game,71,240,469,380,q._.Tiled_sprites_json,"blue-mid")),G.add(new Pr.C(this.game,71,620,429,40,q._.Tiled_sprites_json,"blue-top2")),G.add(new Pr.C(this.game,500,240,40,380,q._.Tiled_sprites_json,"blue-side2")),G.add(new Pr.C(this.game,60,240,40,380,q._.Tiled_sprites_json,"blue-side")),G.add(K.q.instance.prodigy.create.sprite(500,200,q._.General_core_json,"blue-corner2")),G.add(K.q.instance.prodigy.create.sprite(500,620,q._.General_core_json,"blue-corner3")),G.add(K.q.instance.prodigy.create.sprite(60,200,q._.General_core_json,"blue-corner")),G.add(K.q.instance.prodigy.create.sprite(60,620,q._.General_core_json,"blue-corner4")),K.q.instance.prodigy.create.panel(G,100,230,10,10,"white").alpha=.5,super.create(),this.bar=K.q.instance.prodigy.create.slider(this,1200,240,380,!0,!0),this._playerContainer=K.q.instance.prodigy.create.player(this,this.player,1,300,0,!0,{isPreview:!0,chargeRevealEnabled:!0}),this._playerContainer.scale.set(2,2),(0,Dt.G)(Zo.q).enabled&&(this._playerContainer.clickCallback=()=>K.q.instance.prodigy.open.openWizardCostumesMenu()),this.equip=K.q.instance.prodigy.create.element(this,80,220),this.setMode(U),this.reload()}setActive(k){super.setActive(k),this._itemCards.forEach((B=>B.active=k))}setMode(k){var B,U;super.setMode(k),this.clearContents(),this.itemType=null!==(U=null===(B=this._buttons[k])||void 0===B?void 0:B.type)&&void 0!==U?U:"hat",this._segment.featureCommon.sendTabEvent({tabName:this.itemType,interfaceName:ph.B.Backpack,interfaceType:bi.Wm.Menu}),this.listItemsOfType()}clearContents(){var k;null===(k=this.content)||void 0===k||k.removeAll(!0)}itemSelected(k){var B;K.q.instance.prodigy.open.itemInfo({ID:k.ID,L:k.L,type:null!==(B=k.type)&&void 0!==B?B:this.itemType},this.reload.bind(this),Lr.s.Equip)}reload(k){const B=[];for(let G=0;G{this._segment.featureCommon.sendButtonEvent({buttonName:jh.k.BackpackCostumesSlot,interfaceName:ph.B.Backpack,interfaceType:bi.Wm.Menu,destinationName:ph.B.WizardCostumesMenu,saveClickInfo:jh.k.BackpackCostumesSlot}),K.q.instance.prodigy.open.openWizardCostumesMenu(bi.$N.ButtonClick,jh.k.BackpackCostumesSlot)}),((0,Dt.G)(Zo.q).enabled||("mount"===xr.W[G]&&(F=170),"costume"!==xr.W[G]))&&B.push(K.q.instance.prodigy.create.item(null,F,$,{id:k.ID,type:k.type},Lr.s.Icon,U))}const U=[];B.forEach((k=>U.push(k.onContainerLoaded.asPromise()))),Promise.all(U).then((()=>{this.equip.removeAll(!0),B.forEach((k=>this.equip.addChild(k)))})).catch(j.RQr.createHandler("BackpackMenu: Error loading equipped items")),this.game.input.clearEnterCallback(),this._playerContainer.reload(),this._playerContainer.updateMountAppearance();const F=495+(this.player.equipment.getMount()>0?40:0);this._playerContainer.y=F,this.bar.process(),k&&this.close()}scrollItems(k){var B,U;if(this.page=j.Aq$.isDefined(k)?k:this.page,this.clearContents(),this.owned=this.getItemsOfCurrentType(),kl.H.sortBackpackGearByStats(this.owned),this.owned.length<=0&&"spellRelic"===this.itemType)this._itemCards.forEach((k=>{k&&(k.active=!1)})),K.q.instance.prodigy.create.font(this.content,30,50,"Earn Relics by completing quests in areas all over the island!",{width:480,align:"center"});else{this._itemCards.forEach((k=>{k&&(k.active=!0)}));for(let k=this.page;k=this.owned.length?void 0:{id:j.Aq$.isDefined(this.owned[k].ID)?this.owned[k].ID:this.owned[k].gameID,type:null!==(B=this.owned[k].type)&&void 0!==B?B:this.itemType,L:this.owned[k].L,N:this.owned[k].N,max:this.owned[k].max};if(this._itemCardsCreatedCount{this._itemCards[F]=k})).catch(j.RQr.createHandler("Error creating item card in backpack"));else{const B=this._itemCards[F%this._pageSize];null===(U=null==B?void 0:B.findComponentInChildren(Ul.Z))||void 0===U||U.initializeItemCard(G);const j=B.findComponentInChildren(Bl.n);null==j||j.onClicked.removeAll(),G&&(null==j||j.onClicked.add(this.itemSelected.bind(this,this.owned[k]),this))}}}}listItemsOfType(){this.owned=this.getItemsOfCurrentType(),this.bar.reset(this.owned.length-3,3,-1,this.scrollItems.bind(this))}getItemsOfCurrentType(){const k=this.player.backpack.getBackpackItemsByType(this.itemType),B=K.q.instance.prodigy.gameContainer.get("61f-37d6"),U=B.getAllOfType(this.itemType).map((k=>({ID:k.id,type:k.type,N:k.quantity})));"item"===this.itemType&&U.push(...B.getAllOfType("riftRunKey").map((k=>({ID:k.id,type:k.type,N:k.quantity}))));const F=Gt.R.loadData(Ft.r.BackpackConfiguration_json),G=U.concat(k);return F.hiddenItemIDs[this.itemType]?G.filter((k=>!F.hiddenItemIDs[this.itemType].includes(k.ID))):G}close(){var k;const B=K.q.instance.prodigy.gameContainer;jr.v.overrideSmoothing(null),null===(k=B.get("e20-0fb0").player.playerContainer)||void 0===k||k.reload(),this._segment.featureCommon.sendInterfaceEvent({interfaceName:ph.B.Backpack,interfaceType:bi.Wm.Menu,closeMethod:bi.Lv.CloseButton,instanceType:Ai.N.Interface}),this.clearContents(),this._itemCards.forEach((k=>null==k?void 0:k.destroy())),this._itemCards.length=0,this.game.broadcaster.broadcast(oi.J8.PlayerEditingMenuClosed,this.game,[]),this._playerContainer=null,super.close()}destroy(k={children:!0}){this.owned.length=0,this.bar.destroy(),this.bar=null,this.player=null,super.destroy(k)}}var Gl,jl=U(60654),$l=U(20748),Hl=U(50475),Vl=U(87557),Wl=U(77997),ql=U(29546);class Kl extends Hh.a{constructor(k,B,U,F,G){super(k,B,0,0,K.q.instance.prodigy.textureMenu),this._socialStatusElements={},this._xpBarGameObject=null,this.player=U,this.retrievePlayerFriendStatus();const j=this.loggedInPlayerProvider.player,$=this.player.userID===j.userID;this._allowDuelByDefault=F,this.showFriendSocialStatus=!$&&[1,Kl.IS_CLASSMATE].includes(this._friendStatus),this._socialStatusElements.status=G,k.broadcaster.addAppListener(oi.sd.RequestSent,this.setupFriendRequestButton.bind(this),this,oi.HG.Card,!1),k.broadcaster.addAppListener(oi.sd.RequestCancelled,this.setupFriendRequestButton.bind(this),this,oi.HG.Card,!1),k.broadcaster.addAppListener(oi.sd.RequestAccepted,this.setupFriendRequestButton.bind(this),this,oi.HG.Card,!1),k.broadcaster.addAppListener(oi.sd.RequestRejected,this.setupFriendRequestButton.bind(this),this,oi.HG.Card,!1),k.broadcaster.addAppListener(oi.sd.FriendRemoved,this.setupFriendRequestButton.bind(this),this,oi.HG.Card,!1),k.broadcaster.addAppListener(oi.J8.PlayerAppearanceUpdated,this.updateAppearance.bind(this),this,oi.HG.Card,!1),this.currentInterfaceName=ph.B.PlayerCard,this.create()}create(){if(this.destroyed)return;const k=this.loggedInPlayerProvider.player,B=this.player.userID===k.userID;this.addTransparent();this.base=K.q.instance.prodigy.create.element(this,240,120),K.q.instance.prodigy.create.panel(this.base,0,0,20,2,"card-top"),K.q.instance.prodigy.create.panel(this.base,0,80,20,10,"card-bot"),this.showFriendSocialStatus&&(this.createExtendedPanel(),this._socialStatusIcons=uc.createSocialStatusIcons(12),K.q.instance.prodigy.create.panel(this.base,0,440,20,2,"card-top-extended"));const U=k.equipment.getMount()>0;this.playerContainer=K.q.instance.prodigy.create.player(this.base,this.player,1.65,125,U?360:320,!1,{isPreview:!0,chargeRevealEnabled:!0}),this.playerContainer.reload(),this.playerName=K.q.instance.prodigy.create.font(this.base,10,3,`${this.player.hasMembership()?"[membership] ":""}${this.player.getName()}`,{size:36,fontID:9}),this.setupXpBar(B),K.q.instance.prodigy.create.button(this.base,768,-10,q._.General_icons_json,"close",(()=>{this.segment.featureCommon.sendButtonEvent({buttonName:jh.k.X,interfaceName:this.currentInterfaceName,interfaceType:bi.Wm.Menu}),this.close()})),this.buttons=[],B?this.setupPlayer(this.buttons):this.setupStranger(this.buttons),this.content=K.q.instance.prodigy.create.element(this.base),this.setMode(0,0),super.create(),this.segment.featureCommon.sendInterfaceEvent({interfaceName:this.currentInterfaceName,interfaceType:bi.Wm.Menu,originType:bi.$N.ButtonClick}),this.sendTabClickEvent(this.buttons[0].data.bot)}close(){this.game.broadcaster.broadcast(oi.J8.PlayerEditingMenuClosed,this.game,[]),this.game.broadcaster.removeAppListener(oi.sd.RequestSent,this,oi.HG.Card),this.game.broadcaster.removeAppListener(oi.sd.RequestCancelled,this,oi.HG.Card),this.game.broadcaster.removeAppListener(oi.sd.RequestAccepted,this,oi.HG.Card),this.game.broadcaster.removeAppListener(oi.sd.RequestRejected,this,oi.HG.Card),this.game.broadcaster.removeAppListener(oi.sd.FriendRemoved,this,oi.HG.Card),this.game.broadcaster.removeAppListener(oi.J8.PlayerAppearanceUpdated,this,oi.HG.Card),this.segment.featureCommon.sendInterfaceEvent({interfaceName:this.currentInterfaceName,interfaceType:bi.Wm.Menu,instanceType:Ai.N.Interface,closeMethod:bi.Lv.CloseButton}),super.close()}destroy(k={children:!0}){var B,U;null===(B=this.reportingModalLoader)||void 0===B||B.cancel(),null===(U=this.reportingModalPrefab)||void 0===U||U.destroy(),this._xpBarGameObject&&this._xpBarGameObject.destroy(),this._xpBarGameObject=null,this.exclamationSprite&&(this.game.tweens.removeAllFromOwner(this),this.exclamationSprite.destroy()),this.exclamationSprite=null,this.playerContainer&&this.playerContainer.destroy(),this.playerContainer=null,this.playerName&&this.playerName.destroy(),this.playerName=null,this.base&&this.base.destroy(),this.base=null,this._socialStatusIcons=null,this.content=null,super.destroy(k)}setupPlayer(k){const B=this.loggedInPlayerProvider.player,U=33,F=350,G=B.state.get("zone-lamplight");K.q.instance.prodigy.create.advButton(this.base,U,F,{icon:"move",top:this.localization.getText("PLAYER_CARD_GO_TO_HOUSE_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_GO_TO_HOUSE_BUTTON_BOT")},(()=>{this.toHouse()})).setActive(!j.Aq$.isDefined(G)||!j.Aq$.isDefined(G.quest)||G.quest.ID>1),B.hasCompletedTutorial()&&K.q.instance.prodigy.create.advButton(this.base,161,F,{atlas:q._.Store_stylist_json,icon:"stylist-icon",top:this.localization.getText("PLAYER_CARD_CHANGE_STYLE_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_CHANGE_STYLE_BUTTON_BOT")},(()=>{j.Aq$.isDefined(this.stylistBreadcrumbIndicator)&&(this.stylistBreadcrumbIndicator.destroy(),this.stylistBreadcrumbIndicator=null),K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_STYLIST,ln.B.BREADCRUMB_CLICKED_CARD_STYLIST_BUTTON),K.q.instance.prodigy.open.stylistStore(null,null,null),this.sendTabClickEvent(this.localization.getText("PLAYER_CARD_CHANGE_STYLE_BUTTON_BOT"))})),k.push(K.q.instance.prodigy.create.advButton(this.base,289,F,{icon:"bag",top:this.localization.getText("PLAYER_CARD_GEAR_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_GEAR_BUTTON_BOT")},this.setMode.bind(this,0,0))),k.push(K.q.instance.prodigy.create.advButton(this.base,417,F,{icon:{type:"item",ID:21},bot:this.localization.getText("PLAYER_CARD_GEMS_BUTTON_BOT")},this.setMode.bind(this,1,1))),k.push(K.q.instance.prodigy.create.advButton(this.base,545,F,{icon:{type:"item",ID:75},top:this.localization.getText("PLAYER_CARD_KEY_ITEMS_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_KEY_ITEMS_BUTTON_BOT")},this.setMode.bind(this,2,2))),k.push(K.q.instance.prodigy.create.advButton(this.base,673,F,{icon:"player",top:this.localization.getText("PLAYER_CARD_STATS_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_STATS_BUTTON_BOT")},this.setMode.bind(this,3,3)))}setupStranger(k){var B,U,F;const G=this.loggedInPlayerProvider.player,$=this.player,H=$.getAllowsHouseVisitors()&&this.featureRequirements.meetsRequirementsDeprecated(38),W=33,z=350,Y=null!==(U=null===(B=this.featureFlagProvider.getValue(Wl.v))||void 0===B?void 0:B.playerCardReportButton)&&void 0!==U&&U,Q=K.q.instance.prodigy.gameContainer.get("c97-bd0d"),X=K.q.instance.prodigy.create.advButton(this.base,W,z,{icon:"move",top:this.localization.getText("PLAYER_CARD_VISIT_HOUSE_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_VISIT_HOUSE_BUTTON_BOT")},(()=>{this.toHouse()}));X.setActive(!1),Q.getCharData($.userID.toString(),["system"],(k=>{const B=j.Aq$.isDefined(k)?k[$.userID]:null,U=j.Aq$.isDefined(B)&&j.Aq$.isDefined(B.system)&&B.system.is_house_locked;X.setActive(H&&!U)})),H&&G.hasCompletedTutorial()&&!K.q.instance.prodigy.classModeController.isClassMode()&&(K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_HOUSE_VISITING,ln.B.BREADCRUMB_CLICKED_CARD_VISIT_BUTTON)||(this.exclamationSprite=this.createBreadcrumbIndicator(this.game,this.base,q._.General_icons_json,"exclamation",X))),K.q.instance.prodigy.classModeController.isClassMode()&&X.setActive(!1),this._duelButton=K.q.instance.prodigy.create.advButton(this.base,161,z,{icon:"challenge",top:this.localization.getText("PLAYER_CARD_BATTLE_BUTTON_TOP")},(()=>{this.sendDuelInvite()}));const Z=$.getLevel()>=(null!==(F=ql.X.getLevelRequirement(9))&&void 0!==F?F:5);if(this._duelButton.setActive(this._allowDuelByDefault&&!this.showFriendSocialStatus&&Z),k.push(K.q.instance.prodigy.create.advButton(this.base,W+128*(3+Number(!Y)),z,{icon:"bag",top:this.localization.getText("PLAYER_CARD_GEAR_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_GEAR_BUTTON_BOT")},this.setMode.bind(this,0,0))),k.push(K.q.instance.prodigy.create.advButton(this.base,W+128*(4+Number(!Y)),z,{icon:"player",top:this.localization.getText("PLAYER_CARD_STATS_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_STATS_BUTTON_BOT")},this.setMode.bind(this,3,1))),Y){const k=K.q.instance.prodigy.create.button(this.base,673,400,q._.General_core_json,"btn-mini",(()=>{const k=K.q.instance.prodigy.gameContainer.get("PrefabService").getPrefabFromGuid(Ei.l.ReportPlayerPopup);this.reportingModalLoader=this.prefabLoader.loadFromJSONWithDependencies(k,void 0,void 0,void 0,Ei.l.ReportPlayerPopup),this.reportingModalLoader.then((k=>{this.reportingModalPrefab=k,k.findComponent(Vl.V).setReportedUserID($.userID)}))})),B=this.localization.getText("PLAYER_CARD_REPORT_BUTTON_TEXT");K.q.instance.prodigy.create.font(k.sprite,5,14,B,{size:16,align:"center",width:k.width-10})}const J=new V.Container;J.visible=!1,J.position.set(10,480),this.base.addChild(J);const tt=new V.Sprite;tt.scale.set(1/uc.SOCIAL_STATUS_ICON_RESOLUTION),J.addChild(tt);const et=new V.Text("",{fontFamily:j.dBt.ABeeZee,fontSize:24,fill:3552822});et.position.set(35,-1),J.addChild(et),this._socialStatusElements.container=J,this._socialStatusElements.sprite=tt,this._socialStatusElements.text=et,this.showFriendSocialStatus&&this._socialStatusElements.status&&this.setPlayerSocialStatus(this._socialStatusElements.status),this.setupFriendRequestButton(289,z)}setupXpBar(k=!0){this.prefabLoader.loadWithDependenciesFromGUID(Ei.l.XPBar).then((B=>{if(this.destroyed||B.isDestroyed)return B.destroy(),B;B.transform.setPosition(435,215),B.findComponent(j.y4o).getRootContainer().setParent(this);const U=B.findComponent(Hl.B);U.runOnSetup=!1,U.levelText.text=this.player.getChargedLevelCumulative().toString();const F=this.player.currentMaxLevel,G=this.player.getMaximumChargedLevel(),$=this.player.getChargedLevelCumulative()>=G,H=$||!k,V=this.player.getPlayerData().chargedLevelData;if(j.Aq$.isDefined(V)&&this.player.getChargedLevelCumulative()>=F){const k=H?1:V.chargedLevelXpForCurrentLevel/V.chargedLevelXpRequiredForNextLevel;U.progressBar.setValue(k),this.player.getChargedLevel()>0&&(U.levelText.fill=Sh.Vh,U.showBarWithChargedLevels())}else{const k=this.player.getStars(),B=Rc.e.starsToLevel(this.player.getLevel(),yo.V.Player),F=k-B,G=Rc.e.starsToLevel(this.player.getLevel()+1,yo.V.Player)-B,j=H?1:F/G;U.progressBar.setValue(j)}return $&&U.showBarAtMaxLevel(),this._xpBarGameObject=B,B})).catch(j.RQr.createHandler("[Card]: XPBar Prefab failed to load"))}setupFriendRequestButton(k,B){if(j.Aq$.isDefined(this.game)){if(!K.q.instance.prodigy.friendsListNetworkHandler.hasReceivedFriends)return}else j.VyI.log("Friend Button failed to render",j.$bb.Error);if(this._friendStatus===Kl.IS_CLASSMATE)return;let U,F,G=null,$="delete-friend";1===this._friendStatus?(U=this.localization.getText("PLAYER_CARD_REMOVE_FRIEND_TOP"),F=this.localization.getText("PLAYER_CARD_REMOVE_FRIEND_BOT"),G=oi.sd.RemoveFriend):0===this._friendStatus?(U=this.localization.getText("PLAYER_CARD_CANCEL_FRIEND_TOP"),F=this.localization.getText("PLAYER_CARD_CANCEL_FRIEND_BOT"),G=oi.sd.CancelRequest):(U=this.localization.getText("PLAYER_CARD_ADD_FRIEND_TOP"),F=this.localization.getText("PLAYER_CARD_ADD_FRIEND_BOT"),G=oi.sd.SendRequest,$="add-friend");let H=k,V=B;this.cmdFriendRequest&&(j.Aq$.isDefined(k)&&j.Aq$.isDefined(B)||(H=this.cmdFriendRequest.x,V=this.cmdFriendRequest.y),this.cmdFriendRequest.destroy()),this.cmdFriendRequest=K.q.instance.prodigy.create.advButton(this.base,H,V,{atlas:q._.Icons_menu_json,icon:$,top:U,bot:F},this.onRequestClicked.bind(this,G))}retrievePlayerFriendStatus(){var k,B;if(K.q.instance.prodigy.friendsListNetworkHandler.classList.some((k=>k.userID===this.player.userID)))this._friendStatus=Kl.IS_CLASSMATE;else{const U=K.q.instance.prodigy.friendsListNetworkHandler.friendsList;this._friendStatus=null!==(B=null===(k=U.find((k=>k.userID===this.player.userID)))||void 0===k?void 0:k.status)&&void 0!==B?B:null}}refreshPlayerSocialStatus(){j.Aq$.isDefined(this._playerStatusRefreshPromise)||Date.now()>this._lastPlayerStatusRefresh+3e4||(this._playerStatusRefreshPromise=this._synapse.getFriendsStatuses([`${this.player.userID}`]),this._playerStatusRefreshPromise.then((k=>{const B=this._socialStatusElements,U=k[`${this.player.userID}`];j.Aq$.isDefined(U)&&U!==B.status&&this.setPlayerSocialStatus(U),this._lastPlayerStatusRefresh=Date.now()})).finally((()=>{this._playerStatusRefreshPromise=null})))}setPlayerSocialStatus(k){const B=this._socialStatusElements;B.status=k,B.sprite.texture=this._socialStatusIcons[B.status],B.text.text=uc.getSocialStatusText(B.status),B.container.visible=!0,this._duelButton.setActive(k===lc.a.available)}onRequestClicked(k){k===oi.sd.RemoveFriend?K.q.instance.prodigy.open.messageBoxPrefab({title:this.localization.getText("PLAYER_CARD_CONFIRM_REMOVE_TITLE"),text:"PLAYER_CARD_CONFIRM_REMOVE_BODY",textArgs:[this.player.getName()],buttonState:Sr.D.YesNoButtons,confirmCallback:()=>{this.game.broadcaster.broadcast(k,oi.HG.Card,[this.player.userID])}}):this.game.broadcaster.broadcast(k,oi.HG.Card,[this.player.userID])}setMode(k,B){var U;const F=this.loggedInPlayerProvider.player;if(this.buttons[k]&&this.page!==k&&this.sendTabClickEvent(null===(U=this.buttons[k].data)||void 0===U?void 0:U.bot),this.page=k,super.setMode(B),this.content.removeAll(!0),0===k)for(let G=0;G=hi.s.activePlayerLevelCap&&(k=this.localization.getText("PLAYER_CARD_MAX")),F=K.q.instance.prodigy.create.panel(this.content,500,65,4,2,"stat"),K.q.instance.prodigy.create.font(F,5,5,this.localization.getText("PLAYER_CARD_STARS"),{size:20}),K.q.instance.prodigy.create.font(F,-20,46,k,{fontID:8,align:"center",width:200}),F=K.q.instance.prodigy.create.panel(this.content,330,155,4,2,"stat"),K.q.instance.prodigy.create.font(F,5,5,this.localization.getText("PLAYER_CARD_GOLD"),{size:20}),K.q.instance.prodigy.create.font(F,5,46,`${this.player.getGold()}`,{fontID:8,align:"right",width:145}),F=K.q.instance.prodigy.create.panel(this.content,500,155,4,2,"stat"),K.q.instance.prodigy.create.font(F,5,5,this.localization.getText("PLAYER_CARD_TOWER"),{size:20}),K.q.instance.prodigy.create.font(F,5,46,this.localization.getText("PLAYER_CARD_FLOOR",this.player.getTowerProgress()),{fontID:8,align:"center",width:145})}}toHouse(){const k=this.loggedInPlayerProvider.player;if(this.player.userID!==k.userID){const k=K.q.instance.prodigy.friendsListNetworkHandler.friendsList.length,B=K.q.instance.prodigy.friendsListNetworkHandler.classList.length;this.segment.social.sendHouseVisitedEvent({friends:k,classmates:B,friend_id:this.player.userID})}if(K.q.instance.prodigy.classModeController.isClassMode())K.q.instance.prodigy.open.classModeMessage(this.localization.getText("WORLD_YOUR_HOUSE_CLASS_MODE"),null,null,this.localization.getText("WORLD_YOUR_HOUSE"),"popup-travel-home",{isModal:!0});else{if(!this.featureRequirements.meetsRequirementsDeprecated(38))return void K.q.instance.prodigy.open.lamplightLevelLock("PLAYER_CARD_GO_TO_HOUSE_BUTTON_BOT");{const k=K.q.instance.prodigy.world.getZone(K.q.instance.prodigy.world.getCurrentZone());k?k.handleLeaving(In.j.teleport,(()=>{this.teleportToHouse()})):this.teleportToHouse()}}this.sendTabClickEvent("move")}sendDuelInvite(){K.q.instance.prodigy.loading(!0,!0),Ne.e.invite(De.VB.Standard,this.player).catch(this.duelInviteFailed.bind(this))}sendGift(){K.q.instance.prodigy.open.messageBoxPrefab({title:"SEND_GIFT_FEATURE_SOON_MESSAGE_TITLE",text:"SEND_GIFT_FEATURE_SOON_MESSAGE_BODY"})}update(){super.update(),this.showFriendSocialStatus&&this.refreshPlayerSocialStatus()}updatePlayerContainerOffset(){if(this.playerContainer){const k=this.loggedInPlayerProvider.player.equipment.getMount()>0;this.playerContainer.y=k?360:320}}updatePlayer(k){this.playerContainer.reload(),this.playerContainer.updateMountAppearance(),this.updatePlayerContainerOffset(),this.game.input.clearEnterCallback(),this.setMode(k,k)}updateAppearance(){this.playerContainer&&(this.playerContainer.reload(),this.updatePlayerContainerOffset(),this.playerName.setText(this.player.getName()))}itemSelected(k,B,U,F){j.Aq$.isDefined(k)&&K.q.instance.prodigy.open.itemInfo({ID:k,type:B},this.updatePlayer.bind(this,F),U)}openPouch(k){j.Aq$.isDefined(this.player.equipment.getEquipment(k))?this.itemSelected(this.player.equipment.getEquipment(k),k,Lr.s.Equip,0):K.q.instance.prodigy.open.pouch(k,this.updatePlayer.bind(this,0),null)}createBreadcrumbIndicator(k,B,U,F,G){const $=K.q.instance.prodigy.create.sprite(0,0,U,F);B.addChild($);const H=Tn.J.getOptionalParameter(G,B),V=j.Aq$.getCenteredXY($.width,0,H.x,H.y,H.width,0);return $.x=V.x,$.y=H.y-$.height,k.add.tween($,this).to({y:$.y-10},400,j.GS3.Quadratic.InOut,!0,0,-1,!0),$}teleportToHouse(){j.Aq$.isDefined(this.exclamationSprite)&&(this.exclamationSprite.destroy(),K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_HOUSE_VISITING,ln.B.BREADCRUMB_CLICKED_CARD_VISIT_BUTTON)),K.q.instance.prodigy.loading(!0);const k=k=>{const B=null==k?void 0:k[this.player.userID];(null==B?void 0:B.house)&&(K.q.instance.prodigy.loading(!1),this.player.house.setItems(B.house),K.q.instance.prodigy.world.it(hn.A_.HOUSE,null,null,{player:this.player}))};K.q.instance.prodigy.gameContainer.get("c97-bd0d").getCharData(this.player.userID.toString(),[hn.A_.HOUSE],k,k),this.segment.featureCommon.sendInterfaceEvent({interfaceName:this.currentInterfaceName,interfaceType:bi.Wm.Menu,instanceType:Ai.N.Interface,closeMethod:bi.Lv.TeleportButton})}duelInviteFailed(k){K.q.instance.prodigy.loading(!1),K.q.instance.prodigy.open.messageBoxPrefab({text:"BATTLE_API_MAINTENANCE_MESSAGE"})}sendTabClickEvent(k){this.segment.featureCommon.sendTabEvent({tabName:k,interfaceName:this.currentInterfaceName,interfaceType:bi.Wm.Menu})}createExtendedPanel(){const k=this.game.cache,B=k.getTextureAtlas(q._.General_core_json);if(B.frameData.getFrameByName("card-top-extended-top"))return;const U=B.frameData,F=k.getTexture(q._.General_core_json).baseTexture,G=[["corner","corner4"],["corner2","corner3"],["corner3","corner2"],["corner4","corner"],["top","top2"],["top2","top"]];for(const j of G){const B=U.getFrameByName(`card-top-${j[0]}`),G=B.clone();G.name=`card-top-extended-${j[1]}`,G.y=B.y+B.height,G.height=-B.height,U.addFrame(G);const $=k.getTexture(q._.General_core_json,B.name),H=new V.Texture(F,$.frame.clone());H.frame.y=G.y,H.frame.height=G.height,H.updateUvs(),H.frame.y=B.y,H.frame.height=B.height,k.addImage(q._.General_core_json,H,G.name)}}}Kl.IS_CLASSMATE=2,(0,G.Cg)([(0,j.fFd)("db5-fb6e"),(0,G.Sn)("design:type",Object)],Kl.prototype,"featureRequirements",void 0),(0,G.Cg)([(0,j.fFd)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Kl.prototype,"localization",void 0),(0,G.Cg)([(0,j.fFd)("e20-0fb0"),(0,G.Sn)("design:type",Wt.E)],Kl.prototype,"loggedInPlayerProvider",void 0),(0,G.Cg)([(0,j.fFd)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Kl.prototype,"prefabLoader",void 0),(0,G.Cg)([(0,j.fFd)("80c-6fa4"),(0,G.Sn)("design:type",Object)],Kl.prototype,"featureFlagProvider",void 0),(0,G.Cg)([(0,j.fFd)("c47-20b6"),(0,G.Sn)("design:type",Ge.Y)],Kl.prototype,"segment",void 0),(0,G.Cg)([(0,j.fFd)("779-a746"),(0,G.Sn)("design:type",Ue.d)],Kl.prototype,"_synapse",void 0),(0,G.Cg)([(0,$l.sg)(2e3),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],Kl.prototype,"sendDuelInvite",null);class zl extends Hh.a{constructor(k,B){super(k,B,0,0,K.q.instance.prodigy.textureMenu),this.panel=null,this.content=null,this.create()}create(){this.addTransparent(),this.panel=K.q.instance.prodigy.create.panel(this,240,80,20,14,"shine"),this.panel.setRenderState(!0),K.q.instance.prodigy.create.button(this,this.panel.x+760,this.panel.y-10,q._.General_icons_json,"close",this.close.bind(this)),this.panel.add(new Pr.C(this.game,11,120,778,40,q._.Tiled_sprites_json,"blue-top")),this.panel.add(new Pr.C(this.game,11,160,778,300,q._.Tiled_sprites_json,"blue-mid")),this.panel.add(new Pr.C(this.game,11,460,778,40,q._.Tiled_sprites_json,"blue-top2")),K.q.instance.prodigy.create.panel(this.panel,200,-10,10,2,"banner"),K.q.instance.prodigy.create.font(this,290,86,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SPELLBOOK_TITLE"),{fontID:9,size:36,width:720,align:"center"}),K.q.instance.prodigy.create.panel(this.panel,240,140,8,4,"white").alpha=.5,K.q.instance.prodigy.create.font(this.panel,250,150,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SPELLBOOK_DESCRIPTION"),{fontID:8,width:318}),this.content=K.q.instance.prodigy.create.element(this,500,170),super.create(),this.updateSpells()}updateSpells(){j.Aq$.isDefined(this.content)&&this.content.destroy(),this.content=K.q.instance.prodigy.create.element(this,290,180);const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getAttacks(),B=[[0,0],[0,1],[1,1],[2,1],[3,1],[3,0]];for(let U=0;U<6;U++)U>=k.length?K.q.instance.prodigy.create.panel(this.content,180*B[U][0],220*B[U][1],4,5,"empty"):K.q.instance.prodigy.prefabFactory.createItemCard(this.content,180*B[U][0],220*B[U][1],{id:k[U],type:"spell"},Lr.s.Inventory,this.spellSelected.bind(this,k[U])).catch(j.RQr.createHandler('Error creating item card for player spells in the "Character" spell menu'))}spellSelected(k){K.q.instance.prodigy.open.pouch("spell",this.updateSpells.bind(this),k)}}!function(k){k.Dance="dance",k.Expression="emote"}(Gl||(Gl={}));var Yl=U(44356),Ql=U(87776);class Xl extends Ar.H{constructor(k,B,U,F,G,$){super(k,B,U,F,$),this.onHide=new j.HN0,this.onIDSelected=new j.HN0,this.buttonData=null,this.currentPage=0,this.iconsPerPage=6,this.emoteButtons=[],this.emotesPanel=null,this.nextPage=null,this.prevPage=null,this.dabIndicatorImage=null,this._fxHandler=null,this.buttonData=G.filter((k=>!(null==k?void 0:k.isEventEmote))),this._fxHandler=K.q.instance.prodigy.gameContainer.get("3b1-0a3d"),this.createPanel()}createPanel(){this.emotesPanel=K.q.instance.prodigy.create.element(this,0,0);this.emotesPanel.add(K.q.instance.prodigy.create.sprite(0,0,q._.General_chat_hud_json,"tabmenu")).inputEnabled=!0,this.nextPage=K.q.instance.prodigy.create.button(this.emotesPanel,366,47,q._.General_chat_hud_json,"arrow",this.loadEmotes.bind(this,1)),this.nextPage.sprite.rotateMiddleBased(0),this.nextPage.name="Next Arrow",this.prevPage=K.q.instance.prodigy.create.button(this.emotesPanel,-7,47,q._.General_chat_hud_json,"arrow",this.loadEmotes.bind(this,-1)),this.prevPage.sprite.rotateMiddleBased(180),this.prevPage.name="Previous Arrow";K.q.instance.prodigy.create.button(this.emotesPanel,165,-5,q._.General_chat_hud_json,"closetabarrow1",this.hide.bind(this),null,null,!0).name="Close Arrow",this.loadEmotes(0)}loadEmotes(k){for(let F=0;F=B&&(this.currentPage=B,this.nextPage.setInactive());const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;for(let F=this.currentPage*this.iconsPerPage;F{const k={bodyText:null,xPosition:720,yPosition:585,arrowXRelPos:.2,arrowDirection:Br.i.DOWN};K.q.instance.prodigy.open.memberAdSuppressionToolTip(k,!0,!1)}),k=K.q.instance.prodigy.create.button(this.emotesPanel,F%this.iconsPerPage*54+45,47,Ut.E.getIconForType(B.type,B.id),null,G,null,null,!1,48,50);const j=this.setButtonIcon.bind(this,k);Tn.J.shouldSuppressAd(U)?(k.sprite.tint=6710886,K.q.instance.prodigy.create.sprite(32,-3,q._.Ui_icons_json,"icon-mini-lock",null,j)):K.q.instance.prodigy.create.sprite(32,-3,nr.q.Icon_mini_member_b,null,null,j)}Tn.J.shouldSuppressAd(U)||K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.BREADCRUMB_CLICKED_DAB,ln.B.BREADCRUMB_CLICKED_DAB_DAB_BUTTON)||(this.dabIndicatorImage=K.q.instance.prodigy.create.image(0,0,q._.General_icons_json,"exclamation"),k.addChild(this.dabIndicatorImage),this.dabIndicatorImage.x+=3,this.dabIndicatorImage.y-=42,k.y+=21,this.game.add.tween(this.dabIndicatorImage,this).to({y:this.dabIndicatorImage.y-10},400,j.GS3.Quadratic.InOut,!0,0,-1,!0))}else k=K.q.instance.prodigy.create.button(this.emotesPanel,F%this.iconsPerPage*54+45,47,Ut.E.getIconForType(B.type,B.id),null,this.sendEmote.bind(this,B.name,B.type),null,null,!1,48,50);k.x-=Math.floor(.5*k.width),k.y-=Math.floor(.5*k.height)}else if("item"===this.buttonData[F].type){const G=this.buttonData[F],j=U.backpack.hasItem(B.type,G.ID),$=q._.General_chat_hud_json,H=`${B.type}-${G.ID}${j<=0?"-grey":""}`;k=K.q.instance.prodigy.create.button(this.emotesPanel,F%this.iconsPerPage*54+45,47,$,H,null,null,null,0===j,48,50),k.x-=Math.floor(.5*k.width),k.y-=Math.floor(.5*k.height);const V=K.q.instance.prodigy.create.sprite(-5,-5,$,"quantitybg");k.sprite.addChild(V);const W=new Ql.b(this.game,V);W.populate({text:`${j}`,style:15,fontSize:15,boundsAlignH:"center",boundsAlignV:"middle"}),W.position.set(11,14),k.callback=()=>{this.useConsumable(B,k,W)}}else{K.q.instance.prodigy.skin.isFestivalActive("Summerfest")&&25===B.id&&(B.id=28),k=K.q.instance.prodigy.create.button(this.emotesPanel,F%this.iconsPerPage*54+45,47,q._.General_chat_hud_json,"backgroundbutton",this.sendEmote.bind(this,B.id,this.buttonData[F].type),null,null,!1,48,50),k.x-=Math.floor(.5*k.width),k.y-=Math.floor(.5*k.height);const U=k.addOverlay(5,5,Ut.E.getIconForType(B.type,B.id),null);B.isDisabled&&(U.tint=5789784)}this.buttonData[F].isDisabled&&(k.sprite.events.onInputDown.add((()=>{K.q.instance.prodigy.audio.playSFX(67,"button-disabled")})),k.setInactive()),k.name=`Chat ${this.buttonData[F].type} ${B.name}`,this.emoteButtons.push(k)}}setButtonIcon(k,B){k.sprite.addChild(B)}danceMemberPrompt(k){const B=K.q.instance.prodigy.gameContainer.get("c47-20b6"),U=yn.P.shouldUseUnifiedConversionFlow(Sn.o.FunnelClickMemberDance)?_n.R.UnifiedConversionFlow:Tn.J.showYouTubeMembershipAd(this.game,!0)?_n.R.Video:_n.R.Static;B.purchase.sendFunnelStart({type:"Click-Member-Dance-Emote",category:"Social",contentId:`${k.type}-${k.id}`,adType:U,adVersion:yn.P.getAdVersion(Sn.o.FunnelClickMemberDance)}),B.playerIdentityAvatar.sendEmoteFailedEvent({emote_name:k.name,emote_type:Yl.H.Dance,fail_reason:"Member Locked"}),K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.BREADCRUMB_CLICKED_DAB,ln.B.BREADCRUMB_CLICKED_DAB_DAB_BUTTON),this.game.broadcaster.broadcast(oi.Y1.HideChatNotif,oi.HG.ChatButton),K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:Sn.o.FunnelClickMemberDance})}sendEmote(k,B){const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(j.Aq$.isDefined(k)){const F=K.q.instance.prodigy.gameContainer.get("c97-bd0d");if("dance"===B){if(this._danceCooldown)return;"dab"===k&&(this.dabIndicatorImage&&this.dabIndicatorImage.destroy(),K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.BREADCRUMB_CLICKED_DAB,ln.B.BREADCRUMB_CLICKED_DAB_DAB_BUTTON),this.game.broadcaster.broadcast(oi.Y1.HideChatNotif,oi.HG.ChatButton)),U.danceID=k,F.emitMessage({action:Pa.x.Chat,data:{danceID:k}}),this._danceCooldown&&clearTimeout(this._danceCooldown),this._danceCooldown=setTimeout((()=>{clearTimeout(this._danceCooldown),this._danceCooldown=null}),Xl.DANCE_COOLDOWN_MS)}else U.emoteID=k,F.emitMessage({action:Pa.x.Chat,data:{emoteID:k}});this.onIDSelected.dispatch(k)}}useConsumable(k,B,U){var F;const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let $=G.backpack.hasItem(k.type,k.ID);$>0&&(this._fxHandler.onFire.addOnce((()=>{G.backpack.consume(k.type,k.ID),$--,U.setText(`${$}`),$<=0&&(B.sprite.frameName=`${k.type}-${k.ID}-grey`,B.setInactive(j.yQ0.WHITE))})),this._fxHandler.doEffect(k),K.q.instance.prodigy.gameContainer.get("c47-20b6").item.sendItemUsedEvent({item_id:k.ID.toString(),item_name:null==k?void 0:k.name,item_type:null===(F=le.t.getItem("fx",k.data.effect.fx))||void 0===F?void 0:F.data.type,item_count:1,instance_type:Ai.N.OpenWorld,instance_id:""}))}hide(){this.visible=!1,this.onHide.dispatch()}destroy(){this.onHide.dispose(),this.onIDSelected.dispose(),super.destroy()}}Xl.DANCE_COOLDOWN_MS=1e3;class Zl extends Ar.H{constructor(k,B,U){super(k,B,null,null,"Chat Menu"),this.textField=null,this.chatIDSelected=new j.HN0,this.HALF_PANEL_WIDTH=178,this.HALF_SUGGESTION_WIDTH=234,this.onClose=null,this.data=[],this.expressions=[],this.dances=[],this.consumables=[],this.currentText="",this.suggestions=[],this.emotesPanel=null,this.emoteButton=null,this.dancesPanel=null,this.danceButton=null,this.consumablesPanel=null,this.currentPanel=null,this.results=[],this.indicatorImage=null,this.rt=null,this._backgroundPanelHeight=80,this.onClose=U,this.rt=K.q.instance.prodigy.gameContainer.get("8c1-3c93"),this.data=this.rt.getPhrases();const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=F.emotes;this.expressions=G.filter((k=>k.type===Gl.Expression)),this.dances=G.filter((k=>k.type===Gl.Dance)),this.consumables=le.t.getItemsWithFilter("item",(k=>j.Aq$.isDefined(k.data.effect)&&j.Aq$.isDefined(k.data.effect.fx)&&F.backpack.hasItem(k.type,k.ID)>0)),this.createMenu()}close(){j.Aq$.isDefined(this.onClose)&&this.onClose(),this.onClose=null,this.suggestions=[],this.emotesPanel=null,this.emoteButton=null,this.dancesPanel=null,this.danceButton=null,this.textField=null,this.results=[],this.indicatorImage=null,K.q.instance.prodigy.open.chatMenu=null,this.rt=null,this.chatIDSelected.dispose(),K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:ph.B.Chat,interfaceType:bi.Wm.DialogBox,closeMethod:bi.Lv.CloseButton,instanceType:Ai.N.Interface}),this.destroy()}destroy(k={children:!0}){this.consumablesPanel.destroy(),this.consumablesPanel=null,super.destroy(k)}createMenu(){K.q.instance.prodigy.notifications.clearNotifications();const k=K.q.instance.prodigy.create.element(this,this.game.width/2,638);for(let G=1;G<=5;G++){const B=K.q.instance.prodigy.create.panel(k,-this.HALF_SUGGESTION_WIDTH,-40*G-8,12,1,"lb"),U={panel:B,text:K.q.instance.prodigy.create.font(B,10,5,""),textID:0};U.panel.setClickable(this.selectItem.bind(this,U)),U.panel.visible=!1,this.suggestions.push(U)}this.emotesPanel=new Xl(this.game,k,this.game.width/2-this.HALF_PANEL_WIDTH,567,this.expressions,"Emotes Panel"),this.emotesPanel.visible=!1,this.emotesPanel.onHide.add((()=>{this.setCurrentPanel(null),this.determineDanceBreadcrumbState()})),this.emoteIDSelected=this.emotesPanel.onIDSelected,this.add(this.emotesPanel),this.dancesPanel=new Xl(this.game,k,this.game.width/2-this.HALF_PANEL_WIDTH,567,this.dances,"Dance Panel"),this.dancesPanel.visible=!1,this.dancesPanel.onHide.add((()=>{this.setCurrentPanel(null),this.determineDanceBreadcrumbState()})),this.danceIDSelected=this.dancesPanel.onIDSelected,this.add(this.dancesPanel),this.consumablesPanel=new Xl(this.game,k,this.game.width/2-this.HALF_PANEL_WIDTH,567,this.consumables,"Consumables Panel"),this.consumablesPanel.visible=!1,this.consumablesPanel.onHide.add((()=>{this.setCurrentPanel(null)})),this.add(this.consumablesPanel);const B=K.q.instance.prodigy.create.element(k,0,0),U=B.add(K.q.instance.prodigy.create.emptySprite(0,0,0,this._backgroundPanelHeight));U.alpha=0;let F=0;B.add(K.q.instance.prodigy.create.sprite(F,0,q._.General_core_json,"HUD-end")),F+=30;for(let G=0;G<7;G++)B.add(K.q.instance.prodigy.create.sprite(F,0,q._.General_core_json,"HUD-mid")),F+=62;F+=30,B.add(K.q.instance.prodigy.create.sprite(F,0,q._.General_core_json,"HUD-end")).scale.x=-1,B.x-=F/2,U.width=F,U.inputEnabled=!0,F=10,this.emoteButton=K.q.instance.prodigy.create.button(B,F,17,q._.General_chat_hud_json,"emotebutton",(()=>{this.togglePanel(this.emotesPanel)})),F+=53,this.danceButton=K.q.instance.prodigy.create.button(B,F,17,q._.General_chat_hud_json,"dancebutton",(()=>{this.togglePanel(this.dancesPanel)})),F+=53,K.q.instance.prodigy.create.button(B,F,17,q._.General_chat_hud_json,"consumablebutton",(()=>{this.togglePanel(this.consumablesPanel)})),F+=53,B.add(K.q.instance.prodigy.create.sprite(F,17,q._.General_chat_hud_json,"chatendcap"));for(let G=0;G<5;G++)F+=40,B.add(K.q.instance.prodigy.create.sprite(F,17,q._.General_chat_hud_json,"chatmiddlebar"));B.add(K.q.instance.prodigy.create.sprite(F+80,17,q._.General_chat_hud_json,"chatendcap")).scale.x=-1,this.textField=new kh.F(this.game,this,"chat-input",null,568,663,230,35,{background:"transparent",border:"none"},"off"),this.textField.input.onkeyup=this.search.bind(this,!0),K.q.instance.prodigy.create.button(B,423,17,q._.General_chat_hud_json,"chatbutton",this.setChatFocus.bind(this),null,null,!0),K.q.instance.prodigy.create.button(B,463,-7,q._.General_chat_hud_json,"closebutton",(()=>{K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:jh.k.X,destinationName:K.q.instance.prodigy.world.getCurrentZone(),interfaceName:ph.B.Chat,interfaceType:bi.Wm.HUD}),this.close()}));K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.isPlayerTransformed()?this.setChatButtons(!1):this.determineDanceBreadcrumbState()}setChatButtons(k){k?(this.emoteButton.setActive(),this.danceButton.setActive()):(this.emoteButton.setInactive(),this.danceButton.setInactive())}togglePanel(k){this.setCurrentPanel(this.currentPanel===k?null:k)}setCurrentPanel(k){this.currentPanel&&(this.currentPanel.visible=!1),this.currentPanel=k,this.currentPanel&&(this.currentPanel.visible=!0,this.clearSearch()),this.textField.setFocus(null===k),this.determineDanceBreadcrumbState()}setChatFocus(){this.setCurrentPanel(null),setTimeout((()=>{this.textField.setFocus(!0)}),100)}selectItem(k){this.clearSearch(),this.sendChat(k.textID)}search(k){const B=this.textField.getValue();k&&this.setCurrentPanel(null),B.length<=0?this.results=[]:B.lengthk.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))).join(".*"),G=new RegExp(F,"i"),j=k=>{const B=k.toLowerCase().trim();return B===U?100:B.startsWith(U)?75:B.includes(U)?50:G.test(B)?25:0};return B.map((k=>({item:k,score:j(k)}))).filter((({score:k})=>k>0)).sort(((k,B)=>B.score-k.score)).map((({item:k})=>k))}}class Jl extends Hh.a{constructor(k,B,U,F){super(k,B,0,0,K.q.instance.prodigy.textureMenu),this.callback=null,this.panel=null,this.callback=F,this.createWithID(U)}createWithID(k){this.panel=K.q.instance.prodigy.create.panel(this,400,200,12,9,"shine"),this.panel.add(new Pr.C(this.game,11,80,458,40,q._.Tiled_sprites_json,"blue-top")),this.panel.add(new Pr.C(this.game,11,120,458,120,q._.Tiled_sprites_json,"blue-mid")),this.panel.add(new Pr.C(this.game,11,240,458,40,q._.Tiled_sprites_json,"blue-top2"));const B={type:"pet",ID:k};this.panel.add(K.q.instance.prodigy.icon.createFromData(B,40,30)),K.q.instance.prodigy.create.font(this.panel,140,35,(0,Ba.k)(Tn.J.getLocalizationNameKey(B)),{size:36,fontID:9}),K.q.instance.prodigy.create.font(this.panel,40,130,(0,Ba.k)(Tn.J.getLocalizationFlavorKey(B)),{width:400,fontID:8}),K.q.instance.prodigy.create.button(this,this.panel.x+440,this.panel.y-10,q._.General_icons_json,"close",(()=>{this.closeWithSuccess(!1)})),K.q.instance.prodigy.create.textButton(this,this.panel.x+65,this.panel.y+290,{icon:"yes",text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("CHOOSE_PET_BUTTON"),size:fo.LG},(()=>{this.closeWithSuccess(!0)})),this.create()}closeWithSuccess(k){k&&this.callback(),super.close()}}var tu=U(86051);class eu extends Bh.b{constructor(k,B,U){if(super(k,B,tu.K.COLISEUM),this.player=null,this.index=0,this.opponentName=null,this.opponentTitle=null,this.description=null,this.itemIcon=null,this.defeat=null,this.scrollRightButton=null,this.scrollLeftButton=null,this.challengeButton=null,this.data=null,this.opponent=null,this.petV=null,this.playerV=null,this.locked=!1,this.player=U,!j.Aq$.isDefined(eu.data[0].title))for(const F of eu.data)Object.defineProperty(F,"title",{get:()=>K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(F.titleKey)}),Object.defineProperty(F,"description",{get:()=>K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(F.descriptionKey)});this.setup()}menuSetup(){super.menuSetup();const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this.index=0;const B=this.game.width,U=K.q.instance.prodigy.create.sprite(120,140,q._.General_core_2_json,"char-container");this.add(U),K.q.instance.prodigy.create.panel(this,B-600-120,140,12,6),K.q.instance.prodigy.create.panel(this,B-300-120,480,6,2),this.opponentName=K.q.instance.prodigy.create.font(this,B-600-120+50,150,"",{size:40}),this.opponentTitle=K.q.instance.prodigy.create.font(this,B-600-120+50,180,"",{width:500,align:"right"}),this.description=K.q.instance.prodigy.create.font(this,B-600-120+30,230,"",{size:20,width:540}),K.q.instance.prodigy.create.font(this,880,490,k.getText("COLISEUM_REWARD"),{size:30}),this.itemIcon=K.q.instance.prodigy.icon.createWithQuantity(this,1020,470,Ut.E.getIconForType("item",26),1),this.defeat=K.q.instance.prodigy.create.sprite(270,460,q._.General_icons_json,"yes"),this.add(this.defeat),this.scrollRightButton=K.q.instance.prodigy.create.button(this,374,430,q._.General_icons_json,"next",this.shift.bind(this,1)),this.scrollLeftButton=K.q.instance.prodigy.create.button(this,164,430,q._.General_icons_json,"back",this.shift.bind(this,-1)),this.challengeButton=K.q.instance.prodigy.create.textButton(this,B-600-120+300-150,410,{text:k.getText("COLISEUM_BUTTON_CHALLENGE"),icon:{type:"weapon",ID:4},size:fo.MED},this.challenge.bind(this)),this.showFrame("leaderboard",k.getText("ARENA_TITLE"),[]);const F=K.q.instance.prodigy.create.textButton(this,0,0,{icon:"close",text:k.getText("BUTTON_CLOSE")},this.close.bind(this));this.showBtns([],[F]);const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.index=Math.min(G.getColiseum(),eu.data.length-1),this.shift(0),this.setupComplete=!0}shift(k){this.index+=k,this.scrollLeftButton.setActive(),this.scrollRightButton.setActive(),this.index<=0&&(this.index=0,this.scrollLeftButton.setInactive()),this.index>=eu.data.length-1&&(this.index=eu.data.length-1,this.scrollRightButton.setInactive()),this.changeOpponent()}changeOpponent(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(this.data=eu.data[this.index],this.opponent=new pa.s(this.game),this.opponent.init(this.data.opponent),j.Aq$.isDefined(this.petV)&&this.petV.destroy(),this.data.pets.length>0){const B=$.first(this.data.pets);this.petV=K.q.instance.prodigy.create.monster(this,new fa.R(this.game,B),1,250,350),k.encounters.onPetEncountered(B.ID),this.petV.reload(),this.petV.OnLoad.addOnce((()=>{this.petV.stand()}))}j.Aq$.isDefined(this.playerV)&&this.playerV.destroy(),this.playerV=K.q.instance.prodigy.create.character(this,this.opponent,1,360,380),this.data.pets.length<=0&&(this.playerV.x-=55),this.playerV.reload();const B=this.data.drops[0];"gold"===B.type?this.itemIcon.setValue(Ut.E.getIconForType("item",26),null,B.N):this.itemIcon.setValue(K.q.instance.prodigy.icon.iconKey(B),null,1);let U="";if(this.index>Math.floor(this.player.getLevel()/5)||this.index>k.getColiseum()){let B=!1,F=!1;this.index>Math.floor(this.player.getLevel()/5)&&(B=!0),this.index>k.getColiseum()&&(F=!0),U=B&&F?1===this.index?K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COLISEUM_PROMPT_REQUIRE_LEVEL_DEFEAT_SINGLE",5*this.index,this.opponent.getName()):K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COLISEUM_PROMPT_REQUIRE_LEVEL_DEFEAT_PLURAL",5*this.index,this.opponent.getName()):B?K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COLISEUM_PROMPT_REQUIRE_LEVEL",5*this.index,this.opponent.getName()):1===this.index?K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COLISEUM_PROMPT_REQUIRE_DEFEAT_SINGLE",this.opponent.getName()):K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COLISEUM_PROMPT_REQUIRE_DEFEAT_PLURAL",this.opponent.getName()),this.locked=!0,this.challengeButton.visible=!0,this.challengeButton.setInactive(),this.defeat.visible=!1}else this.index{j.Aq$.isDefined(B)&&B>U.getColiseum()&&U.setColiseum(B),K.q.instance.prodigy.world.it("lamplight-coliseum")};delete eu.data[k].opponent.data.hp;const G=eu.data[k].pets;if(j.Aq$.isDefined(G))for(let j=0;j{this._segment.featureCommon.sendInterfaceEvent({interfaceName:ph.B.ItemInfo,interfaceType:bi.Wm.InfoPanel,instanceType:Ai.N.Interface,closeMethod:bi.Lv.ButtonClick}),F.apply(this,k)},this.callback=F,K.q.instance.prodigy.load.assets([q._.Font_black_json],this.create.bind(this))}create(){var k;this.addTransparent();const B=new V.Container;this.addChild(B),this.panel=K.q.instance.prodigy.create.panel(B,230,100,21,12,"shine"),this.panel.setRenderState(!0),K.q.instance.prodigy.create.button(this,this.panel.x+800,this.panel.y-10,q._.General_icons_json,"close",(()=>{this.sendButtonEvent(jh.k.X),this.close()}));let U=null,F=null;const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.mode===Lr.s.Buy?(U=K.q.instance.prodigy.create.item(this,270,140,{id:this.item.getID(),type:this.item.getType()},Lr.s.Info),F=le.t.getItem(this.item.getType(),this.item.getID()).data):(U=K.q.instance.prodigy.create.item(this,270,140,{id:this.item.ID,type:this.item.type},Lr.s.Info),F=le.t.getItem(this.item.type,this.item.ID).data);const $=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);switch(this.mode){case Lr.s.Buy:U.containerLoaded?this.createBuyModeUI(U,F):U.onContainerLoaded.addOnce((()=>{this.createBuyModeUI(U,F)}));break;case Lr.s.Equip:{let B="";const U=this.item;1!==U.L||G.hasMembership()||(B=Tn.J.shouldSuppressAd(G)?"[icon-medium-lock] ":"[membership] ");["hat","weapon","outfit","boots","follow","back","spellRelic","mount","costume"].includes(U.type)?G.equipment.getEquipment(U.type)===U.ID?(B=$.getText("ITEM_BUTTON_REMOVE"),K.q.instance.prodigy.create.textButton(this,290,435,{text:B,size:fo.SMALL},(()=>{this.sendButtonEvent(`${B}-button`),this.unequipItem()}))):("follow"===U.type?B+=$.getText("ITEM_BUTTON_SHOW"):"mount"===U.type?B+=$.getText("ITEM_BUTTON_RIDE"):B+=$.getText("ITEM_BUTTON_WEAR"),K.q.instance.prodigy.create.textButton(this,290,435,{text:B,size:fo.SMALL},(()=>{this.sendButtonEvent(`${B}-button`),this.equipItem()}))):j.Aq$.isDefined(null===(k=F.effect)||void 0===k?void 0:k.transform)&&K.q.instance.prodigy.create.textButton(this,290,435,{text:$.getText("ITEM_BUTTON_USE"),icon:"up",size:fo.SMALL},(()=>{this.sendButtonEvent(jh.k.Use),this.checkTransformation(F)}));break}case Lr.s.Item:{let k="";1!==this.item.L||G.hasMembership()||(k="[membership] "),k+=$.getText("ITEM_BUTTON_USE"),K.q.instance.prodigy.create.textButton(this,290,435,{text:k,size:fo.SMALL},(()=>{this.sendButtonEvent(`${k}-button`),this.useItem(this.item)}));break}}super.create(),this._segment.featureCommon.sendInterfaceEvent({interfaceName:ph.B.ItemInfo,interfaceType:bi.Wm.InfoPanel,instanceType:Ai.N.Interface,originType:bi.$N.ButtonClick,originID:jh.k.Item})}createBuyModeUI(k,B){const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("ITEM_BUTTON_BUY"),G="[mail-gold] ";const $=this.item.getCost()[0];"currency"===$.getType()&&1===$.getID()||(G=`[${le.t.getItem($.getType(),$.getID()).data.icon}] `);const H=le.t.getItem(this.item.getType(),this.item.getID()),V=Tn.J.getPurchasePrice(H.data,$);V>0?K.q.instance.prodigy.create.font(this,290,385,`${G}${V}`,{align:"center",width:200,size:30,iconOffsetY:6}):F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("ITEM_TEXT_CHANGE"),1!==B.member||U.hasMembership()||(F=`[membership] ${F}`),K.q.instance.prodigy.create.textButton(this,290,435,{text:F,size:fo.SMALL},(()=>{this.sendButtonEvent(`${F}-button`),this.close(!0)}))}checkTransformation(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;j.Aq$.isDefined(k.effect)&&j.Aq$.isDefined(k.effect.transform)&&(B.isPlayerTransformed()?K.q.instance.prodigy.open.messageBoxPrefab({text:"MORPH_START_NEW",buttonState:Sr.D.YesNoButtons,confirmCallback:()=>{this.useTransformation(k)}}):this.useTransformation(k))}useTransformation(k){var B;const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;null===(B=U.playerContainer)||void 0===B||B.transformToItem(k.effect.transform,k.effect.ID,!0,k.effect.time),U.backpack.consume(this.item.type,this.item.ID),K.q.instance.game.broadcaster.broadcast(oi.J8.MorphMarbleUsed,void 0,[k]),this.close(!0),this._segment.item.sendItemUsedEvent({item_id:this.item.ID.toString(),item_name:null==k?void 0:k.name,item_type:"morph",item_count:1})}useItem(k){var B,U;const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;1!==k.L||F.hasMembership()||(K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:Sn.o.FunnelUseMemberLockedItem}),this._segment.item.sendItemEquipFailedEvent({item_name:null===(U=null===(B=le.t.getItem(this.item.type,this.item.ID))||void 0===B?void 0:B.data)||void 0===U?void 0:U.name,item_type:this.item.type,item_id:this.item.ID,fail_reason:"Member Locked"}))}equipItem(){var k,B;const U=K.q.instance.prodigy.gameContainer,F=U.get("e20-0fb0").player,G=le.t.getItem(this.item.type,this.item.ID).data,$=j.Aq$.isDefined(G.lockLevel)&&F.getLevel(){var k,B;F.hasMembership()||Tn.J.shouldSuppressAd(F)||(this._segment.purchase.sendFunnelStart({type:"Equip-Level-Locked-Item-Backpack",category:"Item-Equip",contentId:$,adType:H,adVersion:yn.P.getAdVersion(Sn.o.FunnelEquipLevelLockedItem)}),this._segment.item.sendItemEquipFailedEvent({item_name:null===(B=null===(k=le.t.getItem(this.item.type,this.item.ID))||void 0===k?void 0:k.data)||void 0===B?void 0:B.name,item_type:this.item.type,item_id:this.item.ID,fail_reason:"Member Locked"}),K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:Sn.o.FunnelEquipLevelLockedItem,conversionFunnelMetadata:$}))}}else F.equip(this.item.ID,this.item.type).then((k=>{k&&(F.appearanceChanged=!0,K.q.instance.prodigy.audio.playSFX(18,"whoosh"))})).catch(j.RQr.createHandler(`ItemInfo:equipItem Error equipping item ${this.item.type}-${this.item.ID}`)).finally((()=>{this.close()}));else{const U={conversionFunnelName:Sn.o.FunnelEquipBackpackLockedItem,conversionFunnelMetadata:`${V.type}-${V.ID}`};this._segment.purchase.sendFunnelStart({type:"Equip-Member-Locked-Item-Backpack",category:"Item-Equip",contentId:`${V.type}-${V.ID}`,adType:H}),this._segment.item.sendItemEquipFailedEvent({item_name:null===(B=null===(k=le.t.getItem(this.item.type,this.item.ID))||void 0===k?void 0:k.data)||void 0===B?void 0:B.name,item_type:this.item.type,item_id:this.item.ID,fail_reason:"Member Locked"}),Tn.J.shouldSuppressAd(F)?K.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:394,yPosition:430,arrowXRelPos:.5,arrowDirection:Br.i.DOWN}):K.q.instance.prodigy.open.membershipInfo(null,U)}}unequipItem(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=this.item;k.unEquip(B.ID,B.type).then((B=>{B&&(k.appearanceChanged=!0,K.q.instance.prodigy.audio.playSFX(18,"blop"))})).catch(j.RQr.createHandler(`ItemInfo:unequipItem Error unequipping item ${B.type}-${B.ID}`)).finally((()=>{this.close()}))}sendButtonEvent(k){this._segment.featureCommon.sendButtonEvent({buttonName:k,interfaceName:ph.B.ItemInfo,interfaceType:bi.Wm.InfoPanel})}}class nu extends su{createBuyModeUI(k,B){super.createBuyModeUI(k,B);const U=K.q.instance.prodigy.create.textButton(this,0,0,{text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("HOUSE_BUTTON_VISIT"),size:fo.SMALL},(()=>{K.q.instance.prodigy.world.getZone(hn.A_.HOUSE).gotoPreview(B.tag)}));U.y=435;const F=k.width/3;U.x=j.Aq$.getCenteredXY(U.width,0,k.x+F,0,2*F,0).x}}var au=U(95130);class ru extends Ka.W{constructor(k,B,U,F,G){super(k,B,34,{},[q._.Popup_ui_roulette_json,q._.Ui_icons_json,q._.Ui_shared_json]),this.buttonList=[],this.nicknames=U,this.user=F,this.zoneID=G,this.nicknameController=K.q.instance.prodigy.gameContainer.get("dcf-fcf7"),this.currentInterfaceName=ph.B.NicknamerMenu}create(){super.create(),this.closeButton.onClickCallback=()=>{this.fireButtonEvent({buttonName:jh.k.X}),this.close()},this.applyButton.onClickCallback=()=>{this.fireButtonEvent({buttonName:jh.k.SaveName}),this.apply()},this.applyButton.setActive(!1),this.populateNicknames(),this.findElement(Ql.b,"titleText").setText(this.nicknameController.getNicknamerTitle(this.zoneID)),this.fireInterfaceEvent({originType:bi.$N.WorldObject})}populateNicknames(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.appearance;this.addNicknameElement(null,k,!1,-1,!j.Aq$.isDefined(k.getName().getNickname()));for(let B=0;B{this.close()})),this.content=K.q.instance.prodigy.create.element(this,260,180),K.q.instance.prodigy.create.panel(this,(this.game.width-880)/2,180,22,10,"white"),K.q.instance.prodigy.create.font(this,290,120,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(`POUCH_CHOOSE_${this.itemType.toUpperCase()}`),{fontID:9,size:36,width:720,align:"center"}),super.create(),this.setMode(0)}setActive(k){super.setActive(k),this._itemCards.forEach((B=>B.active=k))}close(){j.Aq$.isDefined(this.bar)&&this.bar.destroy(),this.player=null,this._itemCards.forEach((k=>null==k?void 0:k.destroy())),this._itemCards.length=0,this.clearContents(),super.close()}setMode(k){super.setMode(k),this.listItemsOfType()}switchSpell(k){k!==this.selected&&this.player.swapSpells(this.selected,k),this.close()}clearContents(){j.Aq$.isDefined(this.content)&&this.content.destroy()}scrollItems(k){var B,U;this.clearContents(),this.content=K.q.instance.prodigy.create.element(this,35,140);let F=0;for(let G=k;G{this.switchSpell(this.owned[G].ID)})).then((k=>{this._itemCards[$]=k})).catch(j.RQr.createHandler("Error creating item card for spell in the pouch"));else{const U=this._itemCards[$%this._pageSize];null===(B=null==U?void 0:U.findComponentInChildren(Ul.Z))||void 0===B||B.initializeItemCard(k);const F=U.findComponentInChildren(Bl.n);null==F||F.onClicked.removeAll(),k&&(null==F||F.onClicked.add((()=>{this.switchSpell(this.owned[G].ID)}),this))}}else{const k=G>=this.owned.length?void 0:{id:this.owned[G].ID,type:this.itemType,N:this.owned[G].N,L:this.owned[G].L};if(this._itemCardsCreatedCount{k&&this.equipItem(this.owned[G])})).then((k=>{this._itemCards[$]=k})).catch(j.RQr.createHandler("Error creating item card for item in the pouch"));else{const B=this._itemCards[$%this._pageSize];null===(U=null==B?void 0:B.findComponentInChildren(Ul.Z))||void 0===U||U.initializeItemCard(k);const F=B.findComponentInChildren(Bl.n);null==F||F.onClicked.removeAll(),k&&(null==F||F.onClicked.add((()=>{this.equipItem(this.owned[G])}),this))}}F++}}listItemsOfType(){if(j.Aq$.isDefined(this.bar)&&this.bar.destroy(),"spell"===this.itemType){const k=this.player.getAllAttacks();this.owned=[];for(let B=0;B{this.scrollItems(k)}))}equipItem(k){const B=K.q.instance.prodigy.gameContainer,U=B.get("c47-20b6"),F=B.get("e20-0fb0").player,G=Tn.J.showYouTubeMembershipAd(this.game,!0)?_n.R.Video:_n.R.Static,$=(this.itemType,k.ID,le.t.getItem(this.itemType,k.ID).data);if(j.Aq$.isDefined($.lockLevel)&&F.getLevel()<$.lockLevel){const H=B.get(j.$Bt.LocalizationService).getText("LEVEL_LOCK_EQUIP",$.name,$.lockLevel);K.q.instance.prodigy.open.message(H).onClose=()=>{var B,j;if(!F.hasMembership()&&!Tn.J.shouldSuppressAd(F)){const F=`${this.itemType}-${k.ID}`;U.purchase.sendFunnelStart({type:"Equip-Level-Locked-Item-Pouch",category:"Item-Equip",contentId:F,adType:G}),U.item.sendItemEquipFailedEvent({item_name:null===(j=null===(B=le.t.getItem(this.itemType,k.ID))||void 0===B?void 0:B.data)||void 0===j?void 0:j.name,item_type:this.itemType,item_id:k.ID,fail_reason:"Member Locked"}),K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:Sn.o.FunnelEquipLevelLockedItem,conversionFunnelMetadata:F})}}}else this.player.equip(k.ID,this.itemType,!0).then((k=>{k&&(F.appearanceChanged=!0,K.q.instance.prodigy.audio.playSFX(18,"whoosh"))})).catch(j.RQr.createHandler(`Pouch:equipItem Error equipping item ${this.itemType}-${k.ID}`)).finally((()=>{this.close()}))}}class hu extends Bh.b{constructor(k,B,U){super(k,B,null,{hideMenu:!0,hideContent:!1}),this.callback=U;try{Pt.pF.appType()===Pt.uC.NATIVE_APP&&window.postMessage(JSON.stringify({type:"REVIEW_APP"}),window.location.origin)}catch(e){j.VyI.log(e,j.$bb.Error)}this.close()}close(k){j.Aq$.isDefined(this.callback)&&this.callback(),super.close()}}var cu=U(73722),du=(U(45373),U(24285));class lu extends Bh.b{constructor(k,B,U){super(k,B,tu.K.SERVER_SELECT,{hideMenu:!0,hideContent:!0}),this.dialogue=null,this.isClosed=!1,this._timeLoadStartedMS=null,this._timeLoadStartedMS=Date.now(),this._serverSelectMode=U,this._serverSelectMode.onServerSelected=this.onServerSelected.bind(this),K.q.instance.prodigy.load.assets([q._.Ui_home_school_server_json],this.setup.bind(this))}setup(){super.setup(),K.q.instance.prodigy.load.assets([q._.Ui_titan_json,q._.Ui_shipwreck_progress_json,q._.Ui_shiverchill_progress_json,nr.q.Bg_generic_outdoor]);const k=K.q.instance.prodigy.gameContainer.get("2a1-fed9");null!==k.timeToPlayMS&&k.timeToPlayMS>0&&(k.timeToPlayMS+=Date.now()-this._timeLoadStartedMS)}menuSetup(){super.menuSetup(),this.add(K.q.instance.prodigy.create.sprite(0,0,nr.q.Bg_generic_outdoor));this.createPanel(40,245,q._.Ui_home_school_server_json,"school-image","PREMISES_SELECT_SCHOOL",this.onSchoolClick.bind(this)),this.createPanel(this.game.width-(40*lu.PANEL_DIMENSIONS.tileNumWidth+40),245,q._.Ui_home_school_server_json,"house-image","PREMISES_SELECT_HOME",this.onHomeClick.bind(this));const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=K.q.instance.prodigy.create.player(this,k,2,640,500);B.reload(),B.showName(),this.createDialogue(),K.q.instance.prodigy.create.panel(this,240,this.game.height-80,20,3,"shine2"),K.q.instance.prodigy.create.textButton(this,260,this.game.height-60,{icon:"back",text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("BUTTON_BACK")},this.onBackClick.bind(this))}onMenuOpen(k){this.isClosed||(this.showDialogue(k),this.visible=!0)}createPanel(k,B,U,F,G,$){const H=K.q.instance.prodigy.create.panel(this,k,B,lu.PANEL_DIMENSIONS.tileNumWidth,lu.PANEL_DIMENSIONS.tileNumHeight,"shine2"),W=K.q.instance.prodigy.create.element(H,0,0),z=40,Y=lu.PANEL_DIMENSIONS.tileNumWidth*z-22,Q=lu.PANEL_DIMENSIONS.tileNumHeight*z-120,X=Q-80;H.add(W),W.add(new Pr.C(this.game,11,36,Y,z,q._.Tiled_sprites_json,"blue-top")),W.add(new Pr.C(this.game,11,76,Y,X,q._.Tiled_sprites_json,"blue-mid")),W.add(new Pr.C(this.game,11,76+X,Y,z,q._.Tiled_sprites_json,"blue-top2"));const Z=K.q.instance.prodigy.create.button(H,0,0,U,F,$);let J=j.Aq$.getCenteredXY(Z.width,Z.height,11,36,Y,Q);Z.x=J.x,Z.y=J.y;const tt=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),et=K.q.instance.prodigy.create.font(H,0,0,tt.getText(G),{fontID:9,size:36}),it=76+X+z;return J=j.Aq$.getCenteredXY(et.width,et.height,11,it,Y,H.height-it-11),et.x=J.x,et.y=J.y-2,H.highlight(!0,40,60),K.q.instance.game.renderer.type===V.RENDERER_TYPE.CANVAS&&du.s.cacheAsBitmap(W),H}onServerSelected(k,B){var U,F;B?this.visible=!0:(null===(F=(U=this._serverSelectMode).onServerSelectedCallback)||void 0===F||F.call(U,k,B),this.close())}onSchoolClick(){!K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasValidatedParentEmail()&&this.canViewParentalLink()?(this.destroyDialogue(),K.q.instance.prodigy.open.parentalLinkAtSchoolPrompt(this.createDialogue.bind(this),this.onSchoolSuccess.bind(this))):(this.destroyDialogue(),this.onSchoolSuccess())}onSchoolSuccess(){this.close(),cu.V.instance.selectedLocation="school",this._serverSelectMode.applyServerSelectMode()}onHomeClick(){this.close(),cu.V.instance.selectedLocation="home",this._serverSelectMode.applyServerSelectMode(),this.visible=!1}onBackClick(){var k,B;if("prodigy"===K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.userDataPlatform)null===(B=(k=this._serverSelectMode).onServerSelectedCallback)||void 0===B||B.call(k,!1,!0),this.close();else{K.q.instance.prodigy.gameContainer.get("c97-bd0d").logout()}}showDialogue(k){this.destroyDialogue(),k&&this.createDialogue()}destroyDialogue(){j.Aq$.isDefined(this.dialogue)&&(this.dialogue.close(),this.dialogue=null)}createDialogue(){this.dialogue=K.q.instance.prodigy.dialogue.create(),this.dialogue.setText(177),this.dialogue.startDeprecated("noot",!0,null,0)}close(){this.destroyDialogue(),this.isClosed=!0,super.close()}canViewParentalLink(k=!1){if(0===Vt.A.get("GameConstants.Features.ParentLink.TIMEOUT"))return!0;const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let U;return U=k?B.data.atHomeTimestamp:B.data.atSchoolTimestamp,!j.Aq$.isDefined(U)||Oc.R.getDateTime()-U>=Vt.A.get("GameConstants.Features.ParentLink.TIMEOUT")}}lu.PANEL_DIMENSIONS={tileNumWidth:11,tileNumHeight:9};var uu=U(39324),fu=U(91160);class bu extends Bh.b{constructor(k,B,U,F,G=!1){super(k,B,tu.K.SERVER),this.callback=null,this.servers=[],this.isAutoSelect=!1,this.backButton=null,this.playOfflineButton=null,this.content=null,this.serverPage=null,this.scroll=null,this._metrics=null,this.name="Server Select";K.q.instance.prodigy.gameContainer.get("afa-b7c5").startTracing(fu.u.ServerMenuSelection),this.callback=F,this.servers=U,this.isAutoSelect=G,this._metrics={offline:!1,openTime:Date.now(),clickTime:null,buttonIndex:null,worldName:null},this.setup()}static getSuggested(k,B,U){if(k.length{F.push(k)})),F}static determineSuggestedWorldsForLoadBalancing(k,B){let U=[],F=bu.groupServersByCluster(k,B);F=F.sort(((k,B)=>bu.determineTotalWorldListFullness(k)-bu.determineTotalWorldListFullness(B)));for(let G=0;GB.full-k.full)),B=bu.getSuggested(k,bu.SUGGESTED_NUM-U.length,G===F.length-1);if(U=U.concat(B),U.length>=bu.SUGGESTED_NUM)break}return U.sort(((k,B)=>B.full-k.full))}menuSetup(){super.menuSetup();const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this.showFrame("map",k.getText("SERVER_CHOOSE_WORLD_TITLE"),[],void 0,48),K.q.instance.prodigy.create.font(this,125,60,k.getText("SERVER_PICK_SAME_WORLD"),{size:20}),this.playOfflineButton=K.q.instance.prodigy.create.textButton(this,930,20,{size:fo.MED,icon:"next",text:k.getText("SERVERS_BUTTON_PLAY_OFFLINE")},(()=>this.playOffline())),this.backButton=K.q.instance.prodigy.create.textButton(this,50,650,{icon:"back",text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("BUTTON_BACK")},this.exitMenu.bind(this,!1,!0)),this.content=K.q.instance.prodigy.create.element(this,0,0),this.showSuggestedServers(),this.setupComplete=!0}showSuggestedServers(){const k=K.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(fu.u.ServerMenuSuggestedServers);const B={},U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),G=K.q.instance.prodigy.gameContainer.get("db5-fb6e");if(this.content.removeAll(!0),!j.Aq$.isDefined(this.servers)){K.q.instance.prodigy.create.font(this.content,0,320,F.getText("SERVER_LOADING_LIST"),{size:30,width:this.game.width,align:"center"});return void K.q.instance.prodigy.gameContainer.get("c97-bd0d").getWorldList(this.showSuggestedServers.bind(this),this.showError.bind(this,F.getText("SERVER_ERROR_FAILED_LOAD"),this.showSuggestedServers.bind(this)))}const $=bu.determineSuggestedWorldsForLoadBalancing(this.servers,K.q.instance.prodigy.gameContainer.get("80c-6fa4"));B.suggested_worlds_count=$.length;for(let V=0;V<$.length;V++){const k=$[V];j.Aq$.isDefined(k)&&this.createButton(k,this.content,V%3*350+140,140*Math.floor(V/3)+210,V+1,null==k?void 0:k.name,this.showSuggestedServers.bind(this))}this.content.add(K.q.instance.prodigy.create.sprite(520,530,q._.General_core_json,"server-icon")).tint=8111468,K.q.instance.prodigy.create.font(this.content,560,540,F.getText("SERVER_WIZARDS_ONLINE"),{size:20}),K.q.instance.prodigy.create.textButton(this.content,880,650,{size:fo.LG,text:F.getText("SERVERS_BUTTON_MORE_WORLDS"),icon:"map"},this.showAllServers.bind(this));let H=un.o.getLatestClassID(U.owners,U.playerTeachers,U.playerParents);if(H<=0&&!U.isClassCodeAttached&&(H=null),this.isAutoSelect)if(j.Aq$.isDefined(H)){const U=this.determineClassWorld(H,this.servers);j.Aq$.isDefined(U)?(B.auto_connect=!0,B.auto_connect_type="class_world",k.endTracing(fu.u.ServerMenuSuggestedServers,B),this.autoConnect(U)):(j.VyI.log("Server.showSuggestedServers - couldn't find a class world for this player. Going to manual select mode",j.$bb.Verbose),B.auto_connect_failed=!0,B.auto_connect_fail_reason="no_class_world",k.endTracing(fu.u.ServerMenuSuggestedServers,B),this.isAutoSelect=!1)}else j.VyI.log("Server.showSuggestedServers - couldn't find a teacher-owned class for this player. Going to manual select mode",j.$bb.Verbose),B.auto_connect_failed=!0,B.auto_connect_fail_reason="no_teacher_class",k.endTracing(fu.u.ServerMenuSuggestedServers,B),this.isAutoSelect=!1;this.isAutoSelect||U.hasCompletedTutorial()&&G.meetsRequirementsDeprecated(9)?(B.manual_selection=!0,k.endTracing(fu.u.ServerMenuSuggestedServers,B)):(this.isAutoSelect=!0,B.auto_connect=!0,B.auto_connect_type="new_player",k.endTracing(fu.u.ServerMenuSuggestedServers,B),this.autoConnect($[0],!0)),this.isAutoSelect||(this._metrics.openTime=j.Aq$.isDefined(this._metrics.openTime)?this._metrics.openTime:Date.now()),this.isAutoSelect=!1}autoConnect(k,B=!1){this.backButton.visible=!1,this.playOfflineButton.visible=!1,this._metrics.clickTime=Date.now(),this._metrics.worldName=k.name,this.sendServerSelectedEvent(0),this.connect(k,this.onAutoConnectFail.bind(this,B))}playOffline(){this._metrics.offline=!0,this._metrics.clickTime=Date.now(),this._metrics.worldName="Offline";const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;delete k.getPlayerData().connectedWorldServerName,k.updated=!0,this.sendServerSelectedEvent(0),this.exitMenu(!0)}onAutoConnectFail(k=!1){this.isAutoSelect=!1,k?this.playOffline():this.showAllServers()}determineClassWorld(k,B){let U=null,F=null;return B.length>0?(F=B.sort(((k,B)=>k.id.toString().localeCompare(B.id.toString()))),U=F[k%F.length]):j.VyI.log("Server.determineClassWorld - worldData array is empty. Could not determine class world",j.$bb.Verbose),U}showAllServers(){const k=K.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(fu.u.ServerMenuShowAllServers);const B={};this._metrics.openTime=j.Aq$.isDefined(this._metrics.openTime)?this._metrics.openTime:Date.now(),this.content.removeAll(!0),this.playOfflineButton.visible=!0,this.backButton.visible=!0;const U=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);if(!j.Aq$.isDefined(this.servers)){K.q.instance.prodigy.create.font(this.content,0,320,U.getText("SERVER_LOADING_LIST"),{size:30,width:this.game.width,align:"center"});return void K.q.instance.prodigy.gameContainer.get("c97-bd0d").getWorldList(this.showAllServers.bind(this),this.showError.bind(this,U.getText("SERVER_ERROR_FAILED_LOAD"),this.showAllServers.bind(this)))}const F=this.servers.sort(((k,B)=>k.name.localeCompare(B.name)));B.total_worlds_count=F.length,this.serverPage=K.q.instance.prodigy.create.element(this.content,200,180),this.scroll=K.q.instance.prodigy.create.scrollBar(this.content,60,180,345,this.setPage.bind(this,F)),this.scroll.setPages(Math.floor((F.length-1)/9+1)),K.q.instance.prodigy.create.textButton(this.content,880,650,{size:fo.LG,text:U.getText("SERVERS_BUTTON_MY_WORLDS"),icon:"star"},this.showSuggestedServers.bind(this)),B.all_servers_displayed=!0,k.endTracing(fu.u.ServerMenuShowAllServers,B)}setPage(k,B){this.serverPage.removeAll(!0);let U=0;for(let F=9*B;F<9*B+9&&F{this._metrics.clickTime=Date.now(),this._metrics.buttonIndex=G,this._metrics.worldName=H,this.sendServerSelectedEvent(G),this.connect(k,V)}),this),j.Aq$.isDefined(k.meta)){let B;if(j.Aq$.isDefined(k.meta.ID)&&"pet"===k.meta.type){const U=le.t.getItem("pet",k.meta.ID);("spine"===$.get(U,"metadata.assets.default.type",null)||$.get(U,"metadata.assets.spine",!1))&&(B={x:-.06,y:.05})}W.add(K.q.instance.prodigy.icon.createFromData(k.meta,0,0,B))}K.q.instance.prodigy.create.font(W,85,-2,k.name);const Y=k.full<=80?8111468:k.full<95?15194464:14307665;for(let j=0;j<5;j++){const B=W.add(K.q.instance.prodigy.create.sprite(39*j+96,36,q._.General_core_json,"server-icon"));B.visible=k.full>0&&k.full>=20*j,B.tint=Y}return W}sendSessionStartMetric(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=this._metrics,U={world:B.offline?"offline":k.world.name,world_availability:B.offline?null:k.world.full,world_position:B.buttonIndex,time:j.Aq$.isDefined(B.openTime)?Math.round((B.clickTime-B.openTime)/1e3):null};j.Aq$.isDefined(k.primaryParentID)&&(U.parentID=k.primaryParentID),this._segment.connection.sendServerConnectedEvent({name:this._metrics.worldName,duration:j.Aq$.isDefined(B.clickTime)?(Date.now()-B.clickTime)/Vt.A.SECONDS_TO_MILLISECONDS_MULTIPLIER:null})}))}sendServerSelectedEvent(k){var B;this._segment.connection.sendServerSelectedEvent({name:this._metrics.worldName,duration:j.Aq$.isDefined(this._metrics.openTime)?(Date.now()-this._metrics.openTime)/Vt.A.SECONDS_TO_MILLISECONDS_MULTIPLIER:null,availability:null===(B=this.servers[k])||void 0===B?void 0:B.full,position:k})}connect(k,B){const U=K.q.instance.prodigy.gameContainer.get("afa-b7c5");U.startTracing(fu.u.ServerMenuConnect);const F={server_name:(null==k?void 0:k.name)||"unknown",server_id:(null==k?void 0:k.id)||"unknown",server_fullness:(null==k?void 0:k.full)||0},G=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);if(!this.isAutoSelect&&k.full>=100)F.error="world_full_before_connect",this.showError(G.getText("SERVER_ERROR_WORLD_SELECTED_FULL"),B);else{this.content.removeAll(!0),K.q.instance.prodigy.create.font(this.content,0,320,G.getText("SERVER_CONNECTING_MESSAGE",j.Aq$.isDefined(k.name)?k.name:"server"),{size:30,width:this.game.width,align:"center"});K.q.instance.prodigy.gameContainer.get("c97-bd0d").joinMultiplayerServer(k,"zone-login",(()=>{const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;B.getPlayerData().connectedWorldServerName=k.name,B.updated=!0,this.connected(!0)}),this.connected.bind(this,!1,B),this.connected.bind(this,!1,B,G.getText("SERVER_ERROR_WORLD_FULL")))}U.endTracing(fu.u.ServerMenuConnect,F)}connected(k,B=$.noop,U){j.Aq$.isDefined(this)&&j.Aq$.isDefined(this.game)&&(this.content.removeAll(!0),k?this.exitMenu(!0):this.showError(j.Aq$.isDefined(U)?U:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SERVER_ERROR_FALLBACK"),B))}showError(k,B){this.content.removeAll(!0),K.q.instance.prodigy.create.panel(this.content,240,260,16,4),K.q.instance.prodigy.create.font(this.content,270,300,k,{size:30,width:740,align:"center"}),K.q.instance.prodigy.create.textButton(this.content,465,430,{size:fo.LG,text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SERVERS_BUTTON_BACK_TO_WORLDS"),icon:"back"},B),this._segment.connection.sendServerConnectionFailedEvent({name:this._metrics.worldName,duration:j.Aq$.isDefined(this._metrics.openTime)?(Date.now()-this._metrics.openTime)/Vt.A.SECONDS_TO_MILLISECONDS_MULTIPLIER:null,fail_reason:k})}exitMenu(k,B){var U,F;B||(Pt.pF.isNativeApp()&&(window.postMessage(JSON.stringify({type:"ENTER_GAME_WORLD"}),window.location.origin),this._gameNativeAppNotificationProvider.triggerNotification({triggerType:uu.$P.EnterGameWorld})),this.sendSessionStartMetric());const G=K.q.instance.prodigy.gameContainer.get("afa-b7c5"),$={success:k,cancelled:!!B,offline_mode:!!(null===(U=this._metrics)||void 0===U?void 0:U.offline)};if(this._metrics.worldName&&($.selected_world=this._metrics.worldName),G.endTracing(fu.u.ServerMenuSelection,$),null===(F=this.callback)||void 0===F||F.call(this,k,B),B)super.close();else{this.playOfflineButton.destroy(),this.backButton.destroy(),this.content.destroy();const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);K.q.instance.prodigy.create.font(this,0,320,k.getText("ENTERING_WORLD"),{size:30,width:this.game.width,align:"center"}),this.parent.on("removed",(()=>super.close()))}}destroy(){K.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(fu.u.ServerMenuSelection,{completed:!1}),super.destroy()}}bu.SUGGESTED_NUM=6,(0,G.Cg)([(0,j.fFd)("c47-20b6"),(0,G.Sn)("design:type",Ge.Y)],bu.prototype,"_segment",void 0),(0,G.Cg)([(0,j.fFd)("5a6-53a5"),(0,G.Sn)("design:type",Object)],bu.prototype,"_gameNativeAppNotificationProvider",void 0);var pu=U(54584);class vu extends Ar.H{constructor(k,B,U,F){super(k,B,U,F,"achievementsPanel"),this._categoryScroll=null,this._categoryIndex=0;const G=le.t.getCategoryItems("achievement"),H=K.q.instance.prodigy.gameContainer.get("db5-fb6e"),V=G.filter((k=>{if(k.data.requirements){const B=H.meetsRequirementsDeprecated(k.data.requirements);return B||j.VyI.log(`Achievement ${k.data.title} does not meet requirements.`,j.$bb.Verbose),B}return!0})),W=$.groupBy(V,(k=>k.data.group)),q=K.q.instance.prodigy.achievements;this._data=le.t.getCategoryItems("achievementGroup").map((k=>Object.assign(Object.assign({},k),{achievements:W[k.ID],unclaimedRewards:q.getUnclaimedRewards(W[k.ID]).length})));const z=Dn.N.getAllTowerData().filter((k=>j.Aq$.isDefined(k.achievementGroupTag))).map((k=>k.achievementGroupTag));z.length>0&&(this._data=this._data.filter((k=>!z.includes(k.data.title)))),K.q.instance.game.broadcaster.addAppListener(oi.f7.ClaimedRewardsUpdated,this.updateUnclaimedRewards,this),this.createAchievementsScrollview().then((()=>{this.createCategoriesScrollview(),this.selectCategory(0)}))}updateUnclaimedRewards(k){var B,U;this._achievementScrollview.init(this._data[this._categoryIndex]);const F=$.groupBy(k,(k=>k.data.group));for(const G of this._data)G.unclaimedRewards=null!==(U=null===(B=F[G.ID])||void 0===B?void 0:B.length)&&void 0!==U?U:0;this.updateBadges(this._categoryScroll.getCurrentIndex())}createCategoriesScrollview(){this._categoryPanels=$.times(9,(k=>this.createCategory(k))),this._categoryScroll=K.q.instance.prodigy.create.slider(this,310,0,360,!0,!1),this._categoryScroll.reset(this._data.length,9,0,(k=>this.updateCategoryPanels(k)))}createCategory(k){const B=K.q.instance.prodigy.create.panel(this,0,40*k,8,1,"lb");return B.category=K.q.instance.prodigy.create.font(B,8,6,"",{}),B.setClickable((()=>this.selectCategory(k))),B}selectCategory(k){const B=this._categoryScroll.getCurrentIndex();this._categoryIndex=B+k,this.updateCategoryPanels(B),this._achievementScrollview.init(this._data[this._categoryIndex])}updateCategoryPanels(k){this._categoryPanels.forEach(((B,U)=>{B.category.setText(K.q.instance.prodigy.achievements.getCategory(this._data[k+U])),B.changePanel(U===this._categoryIndex-k?"lb-green":"lb")})),this.updateBadges(k)}updateBadges(k){this._categoryPanels.forEach(((B,U)=>{var F;null===(F=B.badge)||void 0===F||F.destroy();const G=this._data[k+U].unclaimedRewards;G>0&&(B.badge=K.q.instance.prodigy.create.notificationBadge(B,G),B.badge.position.set(274,4))}))}createAchievementsScrollview(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.prodigy.gameContainer.get("d0e-64fd"),B=k.loadFromGUID(Ei.l.TransformRelayObject),U=B.findComponent(j.y4o).getRootContainer();U.position.set(452,36),this.addChild(U),yield Promise.all([K.q.instance.prodigy.gameContainer.get(j.t5G.AssetLoader).loadAssets([q._.Ui_eg_bountyrun_json]),(()=>(0,G.sH)(this,void 0,void 0,(function*(){this._achievementScrollview=(yield k.loadWithDependenciesFromGUID(Ei.l.AchievementScrollview,B)).findComponent(pu.x)})))()])}))}destroy(k){K.q.instance.game.broadcaster.removeAppListener(oi.f7.ClaimedRewardsUpdated,this),super.destroy(k)}}class gu extends Ar.H{constructor(k,B,U,F){super(k,B,U,F),this.requestsPerPage=3,this.scroll=null,this.content=null,this.lastIndex=0,this._duelInviteService=null,this._duelInviteService=K.q.instance.prodigy.gameContainer.get("636-444c"),this.create()}create(){this.content=K.q.instance.prodigy.create.element(this,320,40),this.scroll=K.q.instance.prodigy.create.slider(this,820,40,380,!0,!0),this.scroll.reset(this._duelInviteService.getInvites().length,1,-1,this.setMail.bind(this)),this._duelInviteService.onInviteRemoved.add(this.process,this),this._duelInviteService.onInviteReceived.add(this.process,this),this._duelInviteService.onInviteCancelled.add(this.process,this)}setMail(k=0){this.lastIndex=k,this.content.removeAll(!0);const B=this._duelInviteService.getInvites();for(let U=0;U{Ne.e.rejectInvite(U)})),K.q.instance.prodigy.create.button(F,340,50,q._.General_icons_json,"yes",(()=>{Ne.e.acceptInvite(De.VB.Standard,U)}))}destroy(k={children:!0}){this._duelInviteService.onInviteRemoved.remove(this.process,this),this._duelInviteService.onInviteReceived.remove(this.process,this),this._duelInviteService.onInviteCancelled.remove(this.process,this),super.destroy(k)}}var mu=U(68231),yu=U(50118);class _u extends Ka.W{constructor(k,B){super(k,B,18,{isModal:!1,backgroundAlpha:0},[q._.Ui_social_feed_json,q._.Ui_education_badges_json]),this.currentCollection=0,this.numberOfCollections=1,this.badgeData=[],this.badgesNames=["Stone","Amber","Garnet","Emerald","Ruby","Topaz","Amethyst","Diamond"],this.topicFillFrames=["gray-large-fill","yellow-large-fill","bronze-large-fill","green-large-fill","pink-large-fill","gold-large-fill","purple-large-fill","blue-large-fill"],this.collectionElements=[],this.game=k,this.name="badgesMenu";try{this.badgeData=K.q.instance.prodigy.education.getAllTopicBadges()}catch(e){this.badgeData=[]}this.numberOfCollections=null!==this.badgeData?this.badgeData.length:0;const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;super.queuePostCreateCallback((()=>{this.collectionElements=[this.badgeProgressSlider,this.badgeProgressText,this.collectionNameText,this.collectionIcon,this.leftButton,this.rightButton]}),(()=>{this.setupArrows()}),(()=>{this.switchCollection(U.grade-1)}),(()=>{this.setupScrollBar()}))}setupScrollBar(){this.topicScrollView.linkScrollBar(this.topicScrollBar)}setupArrows(){this.skillsMasteredText.setText(`Skills Mastered: ${_u.getAllSkillsMastered(this.badgeData)}`),this.badgesEarnedText.setText(`Badges Completed: ${_u.getAllBadgesCompleted(this.badgeData)}`),this.leftButton.onClickCallback=()=>{this.switchCollection(-1)},this.rightButton.onClickCallback=()=>{this.switchCollection(1)},K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_BADGES,ln.B.BREADCRUMB_CLICKED_BADGES_BUTTON)}switchCollection(k){const B=0===this.badgeData.length;for(let G=0;G=this.numberOfCollections?this.currentCollection=0:this.currentCollection<0&&(this.currentCollection=this.numberOfCollections-1),this.collectionIcon.setImageFrameName(`collections-${this.badgeData[this.currentCollection].gameIconAssetId}`),this.collectionNameText.setText(`${this.badgesNames[this.currentCollection]} Badges`),this.checkForBreadcrumbs(this.badgeData[this.currentCollection]);const U=this.badgeData[this.currentCollection].topics;this.fillTopics(U);const F=_u.getBadgesCompleted(this.badgeData[this.currentCollection].topics);this.badgeProgressSlider.setActive3SlicedImage(`scroll-tracks/${this.topicFillFrames[this.currentCollection]}`),this.badgeProgressSlider.setPercentComplete(F/U.length,!0),this.badgeProgressText.setText(`${F}/${U.length} Badges`)}checkForBreadcrumbs(k){let B=!1;const U=K.q.instance.prodigy.education.getRankUpBadges();let F=0;if(j.Aq$.isDefined(U)&&U.length>0)for(let G=0;G=k.topics[F].ranks[k.topics[F].ranks.length-1]);F=G}this.collectionIconBreadcrumb.visible=B,B&&U.splice(F,1)}fillTopics(k){this.topicScrollView.clearScrollView();for(let B=0;B=B.ranks[G]&&k[`progressStar${U[G]}`].setImageFrameName("tier-on");_u.setSkillsProgress(k,B)}static setSkillsProgress(k,B){let U=0;if(B.numSkillsMastered>=B.ranks[B.ranks.length-1])k.topicProgressText.setText("Complete"),U=1;else for(let F=0;F=k[U].ranks[k[U].ranks.length-1]&&B++;return B}static getAllSkillsMastered(k){let B=0;for(let U=0;U=k[U].topics[F].ranks[k[U].topics[F].ranks.length-1]&&B++;return B}addTransparent(k){super.addTransparent(0),this.background.eventMode="none"}}var Eu,wu=U(47878);!function(k){k[k.Leaderboard=0]="Leaderboard",k[k.BattleRequests=1]="BattleRequests",k[k.Bounty=2]="Bounty",k[k.Award=3]="Award",k[k.Badge=4]="Badge"}(Eu||(Eu={}));class Tu extends Hh.a{constructor(k,B){super(k,B,0,0,K.q.instance.prodigy.textureMenu),this.content=null,this.hasPendingBattleRequests=!1,this._duelInviteService=null,this._menuHeader=null,this._activeViewButton=null,this._headerPromise=null,this._duelInviteService=K.q.instance.prodigy.gameContainer.get("636-444c"),this._noRequestsFilter=new Sd.N,this._noRequestsFilter.desaturate(),this._noRequestsFilter.brightness(.45,!0),K.q.instance.prodigy.load.assets([q._.Ui_shipwreck_progress_json],(()=>{this.createMenu()})),this._duelInviteService.onInviteReceived.add(this.updateBattleRequestIndicator,this),this._duelInviteService.onInviteRemoved.add(this.updateBattleRequestIndicator,this),this._duelInviteService.onInviteCancelled.add(this.updateBattleRequestIndicator,this),this.currentInterfaceName=ph.B.Social}createMenu(){this.addTransparent(),this.hasPendingBattleRequests=this._duelInviteService.getInvites().length>0;const k=K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_BADGES,ln.B.BREADCRUMB_CLICKED_BADGES_BUTTON);this.createBaseSetup(30,16,"bases/backgroundwood","awardsBackground",[],!0,null,{closeButton:{key:q._.Ui_shared_json,frameName:"buttons/close",offset:{x:-20,y:-23}},banner:{atlasID:148,frameName:"banner/banner",width:28},buttons:{iconOffset:{x:60,y:0},offset:{x:344,y:0}}},!0);const B=K.q.instance.prodigy.gameContainer.get("d0e-64fd");this._headerPromise=B.loadWithDependenciesFromGUID(Ei.l.SocialMenuHeader).then((B=>{this._menuHeader=B.findComponent(wu.p),B.findComponent(Hd.$).rootContainer.setParent(this),this._menuHeader.leaderboardsButton.onEnabledClick.add(this.setMode.bind(this,Eu.Leaderboard)),this._menuHeader.battleRequestsButton.onEnabledClick.add(this.setMode.bind(this,Eu.BattleRequests)),this._menuHeader.awardsButton.onEnabledClick.add(this.setMode.bind(this,Eu.Award)),this._menuHeader.badgesButton.onEnabledClick.add(this.setMode.bind(this,Eu.Badge)),this.updateBadge(K.q.instance.prodigy.achievements.getUnclaimedRewards()),K.q.instance.game.broadcaster.addAppListener(oi.f7.ClaimedRewardsUpdated,this.updateBadge,this),this.hasPendingBattleRequests?this.setIndicatorActive(this._menuHeader.battleRequestsButton,!0):(this._menuHeader.battleRequestsButton.lockState(Zh.K.Disabled),this.enableButtonFilter(this._menuHeader.battleRequestsButton,!0));let U=Eu.Leaderboard;if(!K.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirementsDeprecated(58)){this._menuHeader.badgesButton.lockState(Zh.K.Disabled),this._menuHeader.leaderboardsButton.lockState(Zh.K.Disabled),this.enableButtonFilter(this._menuHeader.badgesButton,!0),this.enableButtonFilter(this._menuHeader.leaderboardsButton,!0),this._menuHeader.badgesButton.GameObject.active=!1,this._menuHeader.leaderboardsButton.GameObject.active=!1,U=Eu.Bounty;const k=[this._menuHeader.battleRequestsButton,this._menuHeader.awardsButton];let B=-260;k.forEach((k=>{B+=120,k.GameObject.transform.setPositionX(k.GameObject.transform.localPosition.x+B)}))}this.create(),U=this.hasPendingBattleRequests?Eu.BattleRequests:U,this.setMode(U),k||this.setIndicatorActive(this._menuHeader.badgesButton,!0),this._headerPromise=null})).catch((k=>{var B;j.RQr.logError(k,"Failed to load social menu header"),null===(B=this._headerPromise)||void 0===B||B.cancel(),this._headerPromise=null}))}setActive(k){this._menuHeader.GameObject.active=k,super.setActive(k)}setIndicatorActive(k,B){k.GameObject.findComponentInChildren(yu.a).GameObject.parent.active=B}updateBadge(k){const B=k.length;this._menuHeader.awardsButton.GameObject.findComponentInChildren(_l.e).updateNumberedNotificationBadge(B>0,B)}setMode(k){var B,U,F;super.setMode(k),this.content&&this.content instanceof _u?this.content.close():null===(B=this.content)||void 0===B||B.destroy();let G="";switch(null===(U=this._activeViewButton)||void 0===U||U.unlockState(),k){case Eu.BattleRequests:G="BattleRequests",this._activeViewButton=this._menuHeader.battleRequestsButton,this.content=new gu(this.game,this,80,200);break;case Eu.Award:G="Award",this._activeViewButton=this._menuHeader.awardsButton,this.content=new vu(this.game,this,80,200);break;case Eu.Badge:G="Badge",this._activeViewButton=this._menuHeader.badgesButton,this.content=new _u(this.game,this);break;case Eu.Leaderboard:G="Leaderboard_class_vs_class",this._activeViewButton=this._menuHeader.leaderboardsButton,this.content=new mu.Z(this.game,this,0,0)}null===(F=this._activeViewButton)||void 0===F||F.lockState(Zh.K.Disabled),this.page=k,K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendTabEvent({tabName:G,interfaceName:ph.B.Social,interfaceType:bi.Wm.Menu})}updateBattleRequestIndicator(){this.hasPendingBattleRequests=this._duelInviteService.getInvites().length>0,this.enableButtonFilter(this._menuHeader.battleRequestsButton,!this.hasPendingBattleRequests),this.hasPendingBattleRequests?this.page===Eu.BattleRequests?this._menuHeader.battleRequestsButton.lockState(Zh.K.Disabled):this._menuHeader.battleRequestsButton.unlockState():this._menuHeader.battleRequestsButton.lockState(Zh.K.Disabled),this.setIndicatorActive(this._menuHeader.battleRequestsButton,this.hasPendingBattleRequests)}enableButtonFilter(k,B){k.GameObject.findComponentsInChildren(j.y4o).forEach((k=>{k.getRootContainer().filters=B?[this._noRequestsFilter]:null}))}close(){var k,B,U;j.Aq$.isDefined(this.content)&&this.content instanceof _u&&this.content.close(),null===(B=null===(k=this._menuHeader)||void 0===k?void 0:k.GameObject)||void 0===B||B.destroy(),K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:ph.B.Social,interfaceType:bi.Wm.Menu,closeMethod:bi.Lv.X,instanceType:Ai.N.Interface}),null===(U=this._headerPromise)||void 0===U||U.cancel(),this._headerPromise=null,super.close()}destroy(k){var B;this._duelInviteService.onInviteReceived.removeAll(this),this._duelInviteService.onInviteRemoved.removeAll(this),this._duelInviteService.onInviteCancelled.removeAll(this),K.q.instance.game.broadcaster.removeAppListener(oi.f7.ClaimedRewardsUpdated,this),null===(B=this.content)||void 0===B||B.destroy(),this.content=null,this._menuHeader=null,this._activeViewButton=null,super.destroy(k)}}class Su{constructor(k,B,U){this.game=k,this.model=B,this.requestID=U}setUserID(k){this.model.userID=k}getUserID(){return this.model.userID}setUsername(k){this.model.username=k}getUsername(){return this.model.username}acceptRequest(){K.q.instance.prodigy.friendsListNetworkHandler.acceptFriendRequest(this.getUserID(),this.requestID)}rejectRequest(){K.q.instance.prodigy.friendsListNetworkHandler.rejectFriendRequest(this.getUserID(),this.requestID)}}class Au{constructor(){this.userID=-1,this.username=""}}class Cu extends Ar.H{constructor(k,B,U,F,G){super(k,U,0,0);const $=K.q.instance.prodigy.create.panel(this,F+10,G,14,2,"mail"),H=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);$.add(K.q.instance.prodigy.create.sprite(3,3,q._.General_icons_json,"mail-heart")),K.q.instance.prodigy.create.font($,39,8,H.getText("FRIEND_REQUEST_ADD_FRIEND"),{size:16}),this.mainText=K.q.instance.prodigy.create.font($,20,40,"",{fontID:8,size:20});const V=K.q.instance.prodigy.create.button($,490,0,q._.General_icons_json,"close",K.q.instance.prodigy.open.messageBoxPrefab.bind(K.q.instance.prodigy.open,{title:"FRIENDS_LIST_CONFIRM_CANCEL_TITLE",text:"FRIENDS_LIST_CONFIRM_CANCEL_BODY",buttonState:Sr.D.YesNoButtons,confirmCallback:B.rejectRequest.bind(B)}));Tn.J.centreObject(V,null,40,null,V.height);const W=K.q.instance.prodigy.create.button($,V.x-50-20,0,q._.General_icons_json,"yes",B.acceptRequest.bind(B));Tn.J.centreObject(W,null,40,null,W.height)}renderName(k){this.visible=j.Aq$.isDefined(k),this.visible&&this.mainText.setText(k)}}class Ou extends Hh.a{constructor(k,B,U){super(k,B,0,0,K.q.instance.prodigy.textureMenu),this.friendRequests=[],this.requestControllers=[],this.requestViews=[],this.requestsPerPage=4,this.offset=0,this.onClose=U,this.friendRequests=[],this.requestControllers=[],this.requestViews=[],this.create(),k.broadcaster.addAppListener(oi.sd.GotFriendRequestList,this.setupFriendRequests.bind(this),this,"FriendsList",!1),k.broadcaster.addAppListener(oi.sd.RequestAccepted,this.acceptRequestSuccessful.bind(this),this,"FriendsList",!1),k.broadcaster.addAppListener(oi.sd.RequestRejected,this.rejectRequestSuccessful.bind(this),this,"FriendsList",!1),k.broadcaster.broadcast(oi.sd.ClearFriendRequestsCache,"FriendsList",[]),this.loadPage(this.offset)}create(){this.addTransparent();const k=this.game.width/40-14,B=this.game.height/40-1,U=40*k-22,F=40*B-22,G=11,$=K.q.instance.prodigy.create.element(this,.5*(this.game.width-40*k),20),H=K.q.instance.prodigy.create.element($,0,0);let V,W,z;K.q.instance.prodigy.create.panel(H,0,0,k,B,"shine"),H.add(new Pr.C(this.game,G,149,U,40,q._.Tiled_sprites_json,"blue-top")),H.add(new Pr.C(this.game,G,189,U,320,q._.Tiled_sprites_json,"blue-mid")),H.add(new Pr.C(this.game,G,509,U,40,q._.Tiled_sprites_json,"blue-top2")),K.q.instance.prodigy.create.panel(H,40,40,k-2,2,"banner"),K.q.instance.prodigy.create.font(H,0,60,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("FRIEND_REQUESTS_TITLE"),{fontID:9,size:36,width:U,align:"center",lineHeight:38}),K.q.instance.prodigy.create.button($,U-18,-10,q._.General_icons_json,"close",this.close.bind(this));for(let j=0;jthis.requestsPerPage?K.q.instance.prodigy.friendsListNetworkHandler.getFriendRequestList(null,1):this.refreshUI()}renderPaginationButtons(){this.offset>0?this.prevPage.setActive():this.prevPage.setInactive(),j.Aq$.isDefined(this.friendRequests[this.offset+this.requestsPerPage])?this.nextPage.setActive():this.nextPage.setInactive()}loadPage(k){if(this.offset+=k,k<0)this.setupFriendRequests(this.friendRequests);else{const k=0===this.offset?2*this.requestsPerPage:this.requestsPerPage;this.offset+k+1>this.friendRequests.length?K.q.instance.prodigy.friendsListNetworkHandler.getFriendRequestList(this.offset>0?this.offset+this.requestsPerPage:this.offset,0===this.offset?2*this.requestsPerPage:this.requestsPerPage):this.setupFriendRequests(this.friendRequests)}}}class Iu extends Hh.a{constructor(k,B,U,F,G){super(k,B,0,0,K.q.instance.prodigy.textureMenu),this.rewards=null,this.mailData=null,this.segmentData=null,this.content=null,this.randomizedRewardArray=[{item:{type:"item",ID:76,N:5},weight:9.09},{item:{type:"item",ID:77,N:5},weight:9.09},{item:{type:"item",ID:166,N:5},weight:9.09},{item:{type:"item",ID:165,N:5},weight:9.09},{item:{type:"item",ID:160,N:5},weight:9.09},{item:{type:"item",ID:118,N:3},weight:9.09},{item:{type:"item",ID:119,N:3},weight:9.09},{item:{type:"item",ID:121,N:3},weight:9.09},{item:{type:"item",ID:122,N:3},weight:9.09},{item:{type:"item",ID:120,N:3},weight:9.09},{item:{type:"item",ID:117,N:3},weight:9.09}],this.mailData=U,this.rewards=F,this.segmentData=G,k.broadcaster.addAppListener(oi.zr.MarkAsRead,(()=>{this.close()}),this,oi.HG.Mailer),K.q.instance.prodigy.load.assets([J.Q.Spine_parent_reward_json,J.Q.Spine_member_reward_json],(()=>{this.create()}))}create(){super.create(),this.addTransparent(.75);const k=K.q.instance.prodigy.create.element(this,.5*(this.game.width-780),100),B=K.q.instance.prodigy.create.element(k,0,0);this.content=K.q.instance.prodigy.create.element(B,0,0),this.openParentReward()}close(){this.game.broadcaster.removeAppListener(oi.zr.MarkAsReadFailure,this,oi.HG.Mailer),this.game.broadcaster.removeAppListener(oi.zr.MarkAsRead,this,oi.HG.Mailer),super.close()}openParentReward(){const k=K.q.instance.prodigy.event.create(),B=K.q.instance.prodigy.create.element(this.content,310,330);B.visible=!0;const U=this.rewards.length<=0?this.game.add.spine(0,0,J.Q.Spine_parent_reward_json):this.game.add.spine(75,0,J.Q.Spine_member_reward_json);U.setAnimationByName(0,"animation",!1),B.add(U),k.delay(50),k.set(B,"visible",!1),k.delay(150),k.set(B,"visible",!0),k.delay(2e3),k.function(this.receiveReward.bind(this)),k.start()}receiveReward(){var k;this.rewards.length<=0?(K.q.instance.prodigy.open.gotItem(this.getRewards(),this.close.bind(this),null,"parent-reward",null,!1,this.segmentData),this.game.broadcaster.broadcast(oi.zr.MarkAsRead,oi.HG.MailView,[this.markReadSuccess.bind(this),this.mailData])):(K.q.instance.prodigy.open.gotItem(this.rewards,this.close.bind(this),null,"memberBox-reward",null,null,null!==(k=this.segmentData)&&void 0!==k?k:{source_type:gn.C.Container}),this.game.broadcaster.broadcast(oi.zr.MarkAsRead,oi.HG.MailView,[this.markReadSuccess.bind(this),this.mailData]))}markReadSuccess(){j.VyI.log("Mail Read Success",j.$bb.Verbose)}getRewards(){let k=[];const B=$.get(this.mailData,"membership",0);return 0===B?k=[{item:{type:"item",ID:77,N:1},weight:50},{item:{type:"item",ID:76,N:1},weight:50}]:1===B&&(k=this.randomizedRewardArray),[wn.o.weightedArrayElement(k).item]}}var Du,Ru=U(63693),Pu=U(52491),Mu=U(29853),Nu=U(5679),xu=U(52211),Lu=U(8763);!function(k){k[k.DefaultState=0]="DefaultState",k[k.AddingFromTeamCard=1]="AddingFromTeamCard",k[k.AddingFromPetDetails=2]="AddingFromPetDetails"}(Du||(Du={}));class ku extends mh.y{constructor(k,B){super(K.q.instance.game,k,Ei.l.PetBookMenu,B,!0),this._teamCards=[],this._currentPetBookState=Du.DefaultState,this._teamCardSelected=null,this._petAddOperationState={},this.onCardSelected=new j.HN0,this.onTeamSwapped=new j.HN0,this.onTeamChanged=new j.HN0,this._petListIndexToIdMap=new Map,this.isModal=!1,K.q.instance.prodigy.load.assets([Z.c.Sfx_moving_pet_position,Z.c.Sfx_adding_pet_to_team,Z.c.Sfx_open_petinfo_yourpet]),this._kennel=this._loggedInPlayer.player.kennel,this._injectablePropertiesDictionary={[tr.ML.PetBookBackgroundClicked]:this.onBackgroundClicked.bind(this),[tr.ML.UniquePetsTotal]:this.getUniquePetsText()},this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(bh.Eu.PetMergeYourTeam),this.onPrefabLoaded.addOnce((()=>{this._inventoryCardSpawner=j.wa5.getActiveScene().container.get(tr.xO.PetCardPetSpawner),this._inventoryScrollView=j.wa5.getActiveScene().container.get(tr.xO.PetBookScrollView),this._inventoryScrollView.onMouseScrollWheelUsed.add(this.destroyTooltip.bind(this)),this.setUpMenu()})),K.q.instance.prodigy.game.broadcaster.addAppListener(oi.ig.EvolveEnd,(()=>{this.updateAllCards()}),this)}getUniquePetsText(){const k=this._kennel.getNumUniquePets(),B=this._kennel.getTotalUniquePets();return this._localizer.getText("PET_BOOK_DIFFERENT_PETS_TOTAL",k,B)}setUpMenu(){this.setUpTeamCards(),this.setUpInventoryCards();K.q.instance.prodigy.gameContainer.get("12f-4e29").isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_STARTED)&&nh.N.cacheCanShowPetMergeTutorial()&&this.setUpFTUEState(),this._kennel.setPetToTopPosition()}setUpFTUEState(){this.enableCloseButton(!1);const k=nh.N.getChosenPetForMergeRankFTUE(),B=le.t.getItem("pet",k.ID);K.q.instance.game.broadcaster.addAppListener(oi.ki.FtueCompleted,(()=>{K.q.instance.game.broadcaster.removeAppListener(oi.ki.FtueCompleted,this),this.enableCloseButton(!0)}),this),this.openPetDetailsMenu(B,k)}enableCloseButton(k){Ja.d.updateInjectedValues(this.prefabContainer,{[tr.ML.ShowCloseButton]:k})}setUpInventoryCards(){const k=this.buildPetDataList(!1);Ja.d.updateInjectedValues(this.prefabContainer,{[tr.ML.PetDataList]:k})}setUpTeamCards(){const k=j.wa5.getActiveScene().container.get(tr.xO.TeamCardsParent).GameObject;this._teamCards=k.findComponentsInChildren(xu.V),this._teamCards.forEach(((k,B)=>{k.setup(B),k instanceof Mu.J&&k.addListenerToSignal(k.onPetInfoClicked,this.onInfoButtonClicked.bind(this)),k.addListenerToSignal(k.onPetCardClicked,this.onTeamCardClicked.bind(this)),k.addListenerToSignal(k.onPetRemoved,this.onPetRemovedFromTeam.bind(this))}))}buildPetDataList(k){let B=[];const U=Eh.P8.sortPetList(this._kennel.getPrimaryPets()),F=Eh.P8.canPlayerAccessPetMergeFeature(this._loggedInPlayer.player),G=this.isSelecting(),j=U.map((B=>Object.assign({},Lu.j.GetOwnedPetCardInjectionValues(B,((B,U)=>{this.onInventoryCardClicked(B,U,k)}),G,k,F))));if(B.push(...j),this._currentPetBookState===Du.DefaultState){const k=Eh.P8.getExcludedPetIDs(Eh.tA.NoOwnership),U=le.t.getCategoryItems("pet").filter((B=>!this._kennel.hasPet(B.ID)&&!k.includes(B.ID))),F=(0,Dt.G)(oh.J);let[j,$]=[[],[]],[H,V]=[[],[]];const W=k=>k.reduce(((k,B)=>(k[this._loggedInPlayer.player.encounters.hasPetBeenEncountered(B.ID)?0:1].push(B),k)),[[],[]]);F?([H,V]=U.reduce(((k,B)=>(k[Eh.P8.isPetEpic(B.ID)?0:1].push(B),k)),[[],[]]),[j,$]=W(V)):[j,$]=W(U);const q=Eh.P8.sortPetItems(j).map((k=>Lu.j.GetSeenPetCardInjectionValues(k.ID,((k,B)=>{this.onInventoryCardClicked(k,B,!1)}),G)));if(B.push(...q),F&&H.length>0){Eh.P8.sortPetItems(H);const k=new Map,U=B=>(k.has(B)||k.set(B,this._battlePassQuestManager.isPetBattlePassReward(B)),k.get(B));H.sort(((k,B)=>{const F=U(k.ID),G=U(B.ID);return F&&!G?-1:!F&&G?1:0}));const F=H.map((k=>Lu.j.GetSeenPetCardInjectionValues(k.ID,((k,B)=>{this.onInventoryCardClicked(k,B,!1)}),this.isSelecting(),U(k.ID))));B.push(...F)}const K=Eh.P8.sortPetItems($).map((k=>Lu.j.GetUnknownPetCardInjectionValues(k.ID,((k,B)=>{this.showTooltip(k,this._localizer.getText("PET_BOOK_KEEP_PLAYING"))}),G)));B.push(...K);const z=Gt.R.loadData(Ft.r.PetOwnershipRestrictions_json),Y=new Set(z.noOwnership);B=B.filter((k=>!Y.has(k.PET_ID)))}return this._petListIndexToIdMap.clear(),U.forEach(((k,B)=>{this._petListIndexToIdMap.set(k.uniqueID,B)})),B.map((k=>({prefabGuid:Ei.l.PetBook_PetCard,data:k})))}updateSinglePetInventoryCard(k,B){var U;const F=this._petListIndexToIdMap.get(k.uniqueID),G=Eh.P8.canPlayerAccessPetMergeFeature(this._loggedInPlayer.player);j.Aq$.isDefined(F)&&(null===(U=this._inventoryCardSpawner)||void 0===U||U.updateDataAtIndex(F,{prefabGuid:Ei.l.PetBook_PetCard,data:Lu.j.GetOwnedPetCardInjectionValues(k,((k,U)=>{this.onInventoryCardClicked(k,U,B)}),this.isSelecting(),B,G)}))}updateAllCards(){this.updateTeamCards(),this.updateInventoryCards(!1)}setPetBookToSelectionState(k,B){this.setPetBookState(k),this.updateTeamCardsState(),this.updateInventoryCards(B)}updateInventoryCards(k){var B;const U=this.buildPetDataList(k);null===(B=this._inventoryCardSpawner)||void 0===B||B.updateData(U)}updateTeamCardsState(){this._teamCards.forEach((k=>{var B,U;k instanceof Mu.J&&(this._currentPetBookState===Du.DefaultState?k.setCardToDefaultState():k.setCardToSelectionState(k===this._teamCardSelected,null!==(U=null===(B=this._teamCardSelected)||void 0===B?void 0:B.hasData())&&void 0!==U&&U,this._currentPetBookState===Du.AddingFromPetDetails))}))}selectTeamCard(k){this._teamCardSelected!==k&&(this._teamCardSelected=k,this.onCardSelected.dispatch(k))}updateTeamCards(){this._teamCards.forEach((k=>{k.updateCard()}))}addPetFromPetDetails(k){const B=this._kennel.findEmptyTeamIndex();B>=0?(this._kennel.setTeamPosition(k,B),this.onPetSelectionEnded(),this.onTeamChanged.dispatch(),this.updateSinglePetInventoryCard(k,!1),K.q.instance.prodigy.audio.playSFX(Z.c.Sfx_adding_pet_to_team,"add-pet"),K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendTeamUpdatedEvent(le.t.getItem("pet",k.ID).data.name,null,{pet_added_level:k.level,pet_added_rank:Eh.P8.getPetDisplayMergeRank(k.ID,k.uniqueID)})):(this.setInitialData(k,B),this.setPetBookToSelectionState(Du.AddingFromPetDetails,!1),this.onPetSelectionStarted(),this.updateSinglePetInventoryCard(k,!0))}completeAdd(k,B){const U=this._petAddOperationState.petData?this._petAddOperationState.petData:k,F=j.Aq$.isDefined(this._petAddOperationState.position)&&this._petAddOperationState.position>=0?this._petAddOperationState.position:B;if(!U||!j.Aq$.isDefined(F))return void this.onPetSelectionEnded();const G=this._kennel.getTeamPosition(F)?this._kennel.getTeamPosition(F).getName():null;K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendTeamUpdatedEvent(le.t.getItem("pet",U.ID).data.name,G,{pet_added_level:U.level,pet_added_rank:Eh.P8.getPetDisplayMergeRank(U.ID,U.uniqueID)}),j.Aq$.isDefined(U.team)&&this._kennel.removeAtTeamPosition(U.team),this._kennel.setTeamPosition(U,F),this._kennel.setPetToTopPosition(),this.onPetSelectionEnded(),K.q.instance.prodigy.audio.playSFX(61,"add-pet")}onPetRemovedFromTeam(k,B){K.q.instance.prodigy.audio.playSFX(62,"moving-pet"),K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendTeamUpdatedEvent(null,this._kennel.getTeamPosition(B).getName()),this._kennel.removeAtTeamPosition(B),this._kennel.setPetToTopPosition(),this.onPetSelectionEnded(),this.onTeamChanged.dispatch(),this.updateSinglePetInventoryCard(k,!1),this.updateTeamCards()}swapTeam(k,B){var U,F,G,j;const $=k.cardPosition,H=B.cardPosition;K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendTeamPositionChangedEvent({character:(null===(U=this._kennel.getTeamPosition(H))||void 0===U?void 0:U.getName())===this._loggedInPlayer.player.getName()?"player":null===(F=this._kennel.getTeamPosition(H))||void 0===F?void 0:F.getName(),position_new:Object.values(Ru.Io)[$],position_old:Object.values(Ru.Io)[H],character_2:(null===(G=this._kennel.getTeamPosition($))||void 0===G?void 0:G.getName())===this._loggedInPlayer.player.getName()?"player":null===(j=this._kennel.getTeamPosition($))||void 0===j?void 0:j.getName()}),this._kennel.swapTeamPositions($,H),this._currentPetBookState===Du.AddingFromTeamCard&&(this._petAddOperationState.position=$),this.onTeamSwapped.dispatch(k,B),this.onPetSelectionEnded(),K.q.instance.prodigy.audio.playSFX(62,"moving-pet")}onPetSelectionEnded(){this._inventoryScrollView.GameObject.active=!0,this._teamCardSelected=null,this._petAddOperationState={},this.resetTeamAndPetBookToDefaultState(),this.setPetBookToSelectionState(Du.DefaultState,!1),Ja.d.updateInjectedValues(this.prefabContainer,{[tr.ML.IsSelecting]:!1})}onPetSelectionStarted(){Ja.d.updateInjectedValues(this.prefabContainer,{[tr.ML.IsSelecting]:!0})}resetTeamAndPetBookToDefaultState(){this.setPetBookState(this._currentPetBookState),this.updateTeamCardsState(),this.updateTeamCards()}setInitialData(k,B){this._petAddOperationState.petData=k,this._petAddOperationState.position=B}setPetBookState(k){this._currentPetBookState!==k&&(this._currentPetBookState=k)}onTeamCardClicked(k){if(k instanceof Nu.t)this.onPetSelectionEnded();else{if(!this._petAddOperationState.petData)return null===this._teamCardSelected?(this.selectTeamCard(k),this.setPetBookToSelectionState(Du.AddingFromTeamCard,!0),void this.onPetSelectionStarted()):void(this._teamCardSelected!==k?this.swapTeam(this._teamCardSelected,k):this.onPetSelectionEnded());this.completeAdd(this._petAddOperationState.petData,k.cardPosition)}}onInfoButtonClicked(k,B){this.onPetSelectionEnded(),this.openPetDetailsMenu(k,B)}onInventoryCardClicked(k,B,U){if(!this._inventoryScrollView.wasDraggedSinceLastMouseDown)if(this.isSelecting())if(U&&this._teamCardSelected){if(j.Aq$.isDefined(B.team))return void this.showTooltip(B,this._localizer.getText("PET_ALREADY_ON_TEAM"));this.completeAdd(B,this._teamCardSelected.cardPosition)}else this.onPetSelectionEnded();else this.openPetDetailsMenu(k,B)}onBackgroundClicked(){this._inventoryScrollView.wasDraggedSinceLastMouseDown||this._currentPetBookState!==Du.DefaultState&&this.onPetSelectionEnded()}openPetDetailsMenu(k,B){var U;const F=null!=B?B:k,G=null===(U=K.q.instance)||void 0===U?void 0:U.prodigy.open.petDetailsMenu(F,this.onPetDetailsClosed.bind(this,F));G&&(this._segment.featureCommon.sendButtonEvent({buttonName:"pets",destinationName:"pet_details_window",interfaceType:bi.Wm.Window,interfaceName:ph.B.PetsWindow,saveClickInfo:"pet_details_window"}),K.q.instance.prodigy.audio.playSFX(66,"open-pet-submenu"),this._kennel.hasPet(k.ID)&&this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(bh.Eu.PetMergeSelectPet),G.onPrefabLoaded.add((()=>this.prefab.active=!1)),G.onAddPetToTeam.add(this.addPetFromPetDetails.bind(this)),G.onRemovePetFromTeam.add(this.onPetRemovedFromTeam.bind(this)),G.onEvolvePet.add(this.onPetEvolved.bind(this)),G.onPetMerged.add(this.updateAllCards.bind(this)),G.onPetLevelUp.add((k=>{this.updateInventoryCards(!1),this.updateTeamCards()})),G.onPetGearChanged.add((k=>{this.updateInventoryCards(!1),this.updateTeamCards()})))}onPetDetailsClosed(k){this.prefab.active=!0;const B=this.getPetIndex(k);j.Aq$.isDefined(B)&&this._inventoryScrollView.scrollToChild(B,ku.SELECTION_BORDER_OFFSET)}getPetIndex(k){let B;if(j.Aq$.isDefined(k.uniqueID))B=this._petListIndexToIdMap.get(k.uniqueID);else{B=this.buildPetDataList(!1).findIndex((({data:B})=>B.PET_ID&&B.PET_ID===k.ID))}return B}onPetEvolved(){this.updateAllCards(),Ja.d.updateInjectedValues(this.prefabContainer,{[tr.ML.UniquePetsTotal]:this.getUniquePetsText()})}isSelecting(){return this._currentPetBookState===Du.AddingFromTeamCard||this._currentPetBookState===Du.AddingFromPetDetails}showTooltip(k,B){var U,F;const G=this.getPetIndex(k);if(void 0===G)return;const $=null===(F=null===(U=this._inventoryCardSpawner)||void 0===U?void 0:U.getSlotAtIndex(G))||void 0===F?void 0:F.attachedObject;if(!j.Aq$.isDefined($))return;const H={bodyText:B},V=uh.A.displayTooltipTargeted(void 0,this._inventoryScrollView.GameObject,H,$);j.Aq$.isDefined(V)&&(this._tooltip=V.GameObject,this._tooltip.setLayer(Pu.A.LEGACY_MENU_LAYER_NAME,!0))}destroyTooltip(){j.Aq$.isDefined(this._tooltip)&&this._tooltip.destroyDeferred()}destroy(){this.onCardSelected.dispose(),this.onTeamSwapped.dispose(),this.onTeamChanged.dispose(),K.q.instance.game.broadcaster.removeAppListener(oi.ki.FtueCompleted,this),K.q.instance.prodigy.game.broadcaster.removeAppListener(oi.ig.EvolveEnd,this),this.destroyTooltip(),this._teamCards.length=0,this._teamCardSelected=null,this._inventoryCardSpawner=null,this._inventoryScrollView=null,super.destroy()}}ku.SELECTION_BORDER_OFFSET=5,(0,G.Cg)([(0,Re.b)("e20-0fb0"),(0,G.Sn)("design:type",Wt.E)],ku.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,Re.b)("8dc-04eb"),(0,G.Sn)("design:type",Es.R)],ku.prototype,"_battlePassQuestManager",void 0),(0,G.Cg)([(0,Re.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],ku.prototype,"_localizer",void 0);var Bu=U(58182),Uu=U(17446),Fu=U(65732),Gu=U(46855),ju=U(16909);class $u extends mh.y{constructor(k,B,U){super(K.q.instance.game,k,Ei.l.PetDetailsScreen,B,!0),this.onRemovePetFromTeam=new j.HN0,this.onAddPetToTeam=new j.HN0,this.onEvolvePet=new j.HN0,this.onPetMerged=new j.HN0,this.onPetLevelUp=new j.HN0,this.onPetGearChanged=new j.HN0,this.isModal=!1,this.skipRenderTransparencyLayer=!1,this._activePlayer=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,this._segment.featureCommon.sendInterfaceEvent({interfaceName:ph.B.PetsWindow,interfaceType:bi.Wm.Window,originType:bi.$N.ButtonClick,originID:"pet_info_pop_up",instanceType:Ai.N.UI}),this._petData=U,K.q.instance.prodigy.game.broadcaster.addAppListener(oi.ig.Evolved,this.onEvolvePet.dispatch,this.onEvolvePet),K.q.instance.prodigy.game.broadcaster.addAppListener(oi.ig.EvolveEnd,(()=>{Eh.P8.showUniquePetsFeature()&&!this._activePlayer.kennel.isPrimaryPet(this._petData)&&this.close()}),this),this._injectablePropertiesDictionary=this.getInjectedData(),this.onPrefabLoaded.addOnce((()=>{this.populateMenuComponents(),this._mergeWidget.onPetMergeSuccess.add(((k,B)=>{this.onPetMerged.dispatch(k),this.refreshDisplay(),B&&this.onLevelUp()})),this._gearWidget.onGearMenuLoading.add((()=>{this.setLoadingScreenEnabled(!0)})),this._gearWidget.onGearMenuOpen.add((()=>{this.setLoadingScreenEnabled(!1)})),this._gearWidget.onGearMenuClosed.add((()=>{this.refreshDisplay(),this.onPetGearChanged.dispatch(this._petData)})),this.onEvolvePet.add(this.onPetEvolve,this),this.setupMenuComponents();const k={PET_REMOVE_FROM_TEAM_FUNCTION:this.onRemovedFromTeam.bind(this),PET_ADD_TO_TEAM_FUNCTION:this.onPetAddToTeamClicked.bind(this),BACK_TO_ALL_PETS_FUNCTION:this.close.bind(this),ON_LEVEL_UP:this.onLevelUp.bind(this),PET_COUNT:`x${this._activePlayer.kennel.getAllPetsByID(this._petData.ID).length}`};Ja.d.updateInjectedValues(this.prefabContainer,k);K.q.instance.prodigy.gameContainer.get("12f-4e29").isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_STARTED)&&nh.N.cacheCanShowPetMergeTutorial()&&this.setUpFTUEState()}))}changeDisplayedPet(k){this._petData=k;const B=this.getInjectedData();Ja.d.updateInjectedValues(this.prefabContainer,B),this.setupMenuComponents(),this.onPetGearChanged.dispatch(this._petData)}refreshDisplay(){const k=this.getInjectedData();this._petInfoNavigationTabsController.setup(this._petData),this.injectPetDataIntoGearModule(),Ja.d.updateInjectedValues(this.prefabContainer,k),this.onPetGearChanged.dispatch(this._petData)}setupMenuComponents(){if(!!this._activePlayer.kennel.getPetByUniqueID(this._petData.uniqueID)){this._spellsWidgetController.setup(this._petData);Eh.P8.canPetAccessMergeRanks(this._petData.ID)?(this._mergeWidget.setup(this._petData,this.updatePetInfo.bind(this)),this._epicCounterWidget.active=!1):(this._mergeWidget.GameObject.active=!1,this._epicCounterWidget.active=!0)}else this._spellsWidgetController.GameObject.active=!1,this._mergeWidget.GameObject.active=!1,this._levelUpWidget.active=!1,this._gearWidget.GameObject.active=!1;this._petInfoNavigationTabsController.setup(this._petData),this.setLoadingScreenEnabled(!1),this.updateCurrencyDisplay(),this.injectPetDataIntoGearModule()}populateMenuComponents(){this._magicoinDisplay=j.wa5.getActiveScene().container.get(tr.OP.MagicoinDisplay).GameObject,this._goldDisplay=j.wa5.getActiveScene().container.get(tr.OP.GoldDisplay).GameObject,this._petInfoNavigationTabsController=j.wa5.getActiveScene().container.get(tr.OP.PetInfoWidgetController),this._mergeWidget=j.wa5.getActiveScene().container.get(tr.OP.MergeWidgetController),this._spellsWidgetController=j.wa5.getActiveScene().container.get(tr.OP.SpellsWidgetController),this._loadingDisplaySignal=j.wa5.getActiveScene().container.get(tr.OP.PetLoadingDisplay),this._epicCounterWidget=j.wa5.getActiveScene().container.get(tr.OP.EpicCounterWidget).GameObject,this._levelUpWidget=j.wa5.getActiveScene().container.get(tr.OP.LevelUpWidget).GameObject,this._gearWidget=j.wa5.getActiveScene().container.get(tr.OP.PetInfoPetGearWidget)}setUpFTUEState(){this._mergeWidget.onPetMergeClicked()}isPetCurrentlyCaptured(k){return j.Aq$.isDefined(k.catchDate)}isPetSeen(k){return this._activePlayer.encounters.hasPetBeenEncountered(k.ID)}onLevelUp(){const k=this.getInjectedData();!0===k[tr.hi.YourPetPanelEnableEvolveButton]&&(k[tr.hi.SpinePetEvolveBurst]=!0,k[tr.hi.SpinePetEvolveIdle]=!1),Ja.d.updateInjectedValues(this.prefabContainer,k),this._petInfoNavigationTabsController.updatePetInfo(),this._spellsWidgetController.updateCards(this._petData),this._mergeWidget.updateMergeProperties(),this.onPetLevelUp.dispatch(this._petData)}onPetEvolve(){if((0,Dt.G)(Bu.N)){const k=new fa.R(K.q.instance.prodigy.game,this._petData).getAvailableEvolutions(),B=this._activePlayer.kennel.getPrimaryPetById(k[0].evolveID);this.changeDisplayedPet(B)}else{const k=new j.HN0;Ja.d.updateInjectedValues(this.prefabContainer,{RESET_XP_BAR:k},!0),k.dispatch();const B=this.getInjectedData();this._petInfoNavigationTabsController.setup(this._petData),this._spellsWidgetController.updateCards(this._petData),Ja.d.updateInjectedValues(this.prefabContainer,B);Eh.P8.showUniquePetsFeature()&&this._petData.team&&!this._activePlayer.kennel.isPrimaryPet(this._petData)&&this._activePlayer.kennel.removeAtTeamPosition(this._petData.team)}}updatePetInfo(){this._petInfoNavigationTabsController.updatePetInfo()}getChargedPetInjectionValues(){const k={};if(j.Aq$.isDefined(this._petData.team)){const B=this._activePlayer.getChargedLevel();k[Fu.E.ChargedCreatureEffectTier]=Th.e.getChargedLevelTierFromLevel(B),k[Fu.E.ChargedCreatureEffectDisplayType]=B>0?Sh.X$.IDLE:Sh.X$.HIDDEN}return k}getInjectedData(){const k=le.t.getItem("pet",this._petData.ID),B=this.getPetDetailsData(k),U=this.getEvoLineInjectionValues(k),F=this.getChargedPetInjectionValues();return this._activePlayer.kennel.getPetByUniqueID(this._petData.uniqueID)&&K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendPetDetailsViewedEvent(k,"your-pet",{pet_level:this._petData.level,pet_rank:this._petData.mergeRank,gear_list:this._petData.gear,is_on_team:Eh.P8.isPetOnTeam(this._petData)}),Object.assign(Object.assign(Object.assign({},B),U),F)}getEvoLineInjectionValues(k){var B;const U=Eh.P8.GetEvolutionaryLine(k);for(;U.length>4&&U[0]!==k.ID;)U.shift();const F={[tr.hi.YourPetPanelEvoLineNumStages]:U.length};if(Ah.k.cachedDisabledEvolutionFeature)return F[tr.hi.YourPetHideEvolutionLine]=!0,F[tr.hi.YourPetShowEvolveInfo]=!1,F[tr.hi.YourPetPanelShowEvolveButton]=!1,F[tr.hi.YourPetShowEvolveSparkles]=!1,F;1===U.length&&(F[tr.hi.YourPetHideEvolutionLine]=!0);const G=[{id:tr.hi.YourPetPanelEvoLineStage1Id,seen:tr.hi.YourPetPanelEvoLineStage1Seen,rescued:tr.hi.YourPetPanelEvoLineStage1Rescued},{id:tr.hi.YourPetPanelEvoLineStage2Id,seen:tr.hi.YourPetPanelEvoLineStage2Seen,rescued:tr.hi.YourPetPanelEvoLineStage2Rescued},{id:tr.hi.YourPetPanelEvoLineStage3Id,seen:tr.hi.YourPetPanelEvoLineStage3Seen,rescued:tr.hi.YourPetPanelEvoLineStage3Rescued},{id:tr.hi.YourPetPanelEvoLineStage4Id,seen:tr.hi.YourPetPanelEvoLineStage4Seen,rescued:tr.hi.YourPetPanelEvoLineStage4Rescued}],$=this._activePlayer.encounters;for(let j=0;j0;F[k]=V,F[B]=W||q,F[H]=q}const H=U.findIndex((B=>k.ID===B))+1;F[tr.hi.YourPetPanelEvoLineOwnedStage]=H;const V=new fa.R(K.q.instance.prodigy.game,this._petData),W=(0,Dt.G)(Bu.N)&&(null!==(B=V.data.evolutionCount)&&void 0!==B?B:0)>0,q=Eh.P8.canPetEvolve(V,this._petData.level),z=V.getAvailableEvolutions(hi.s.activePlayerLevelCap),Y=z.length>0,Q=!!this._activePlayer.kennel.getPetByUniqueID(this._petData.uniqueID),X=Q&&Y&&!W,Z=(0,Dt.G)(Qo.y);F[tr.hi.YourPetPanelEnableEvolveButton]=q,F[tr.hi.YourPetPanelShowEvolveButton]=Z?q:X,F[tr.hi.YourPetShowEvolveSparkles]=q,F[tr.hi.YourPetShowEvolveInfo]=!W,F[tr.hi.YourPetShowEvolveSparkles]=q&&!W;const J=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),tt=$.hasPetBeenEncountered(this._petData.ID);let et;return et=Q?q?J.getText("PET_SCREEN_READY_TO_EVOLVE"):U.length>1?Y?J.getText("PET_SCREEN_GET_TO_LEVEL",z[0].lvl):J.getText("PET_SCREEN_MAX_EVOLUTION"):J.getText("PET_SCREEN_HAS_NO_EVOS"):tt?J.getText("PET_SCREEN_NOT_RESCUED"):J.getText("PET_SCREEN_NOT_SEEN"),F[tr.hi.YourPetEvolveInfoText]=et,F[tr.hi.YourPetPetEvolveButtonFunction]=this.openEvolutionMenu.bind(this),F[tr.hi.SpinePetEvolveBurst]=!1,F[tr.hi.SpinePetEvolveIdle]=Z?q:X,F}getPetDetailsData(k){var B,U,F,G,j,$,H;const V=this.isPetCurrentlyCaptured(this._petData),W=this.isPetSeen(this._petData),q=!V&&W,z=!V&&!W,Y=null!==(U=null===(B=k.data)||void 0===B?void 0:B.affinity)&&void 0!==U?U:"",Q=Fc.x.getElementDisplayName(Y),X=Eh.P8.isPetOnTeam(this._petData),Z=null!==(G=null===(F=k.data)||void 0===F?void 0:F.rarity)&&void 0!==G?G:Uu.E.Common,J=Eh.P8.getMaxOwnableLevel(this._petData.ID,this._petData.mergeRank),tt=new Gu.r(this._petData.stars,yo.V.Pet,{baseXp:0,memberXp:0,totalNonMemberXp:0},Math.max(J,this._petData.level));tt.levels=[null!==(j=this._petData.level)&&void 0!==j?j:0];const et=new fa.R(K.q.instance.prodigy.game,this._petData),it=hi.s.activePlayerLevelCap,st=et.getAvailableEvolutions(it).length>0,nt=this._loggedInPlayer.getLevel(),at=this._petData.level>=J,rt=this._petData.level=nt,dt=!st&&at&&!ht,lt=Ah.k.cachedDisabledEvolutionFeature;let ut="";if(ht)ut=lt?"INCREASE_MERGE_RANK_TO_LEVEL_UP":"PET_SCREEN_EVOLVE_NOTICE";else if(ct&&(ut="LEVEL_UP_YOUR_WIZARD_TO_LEVEL_UP_PET",lt&&nt>=it)){let k="";(null===($=this._activePlayer.difficultyUnlocks)||void 0===$?void 0:$.hard)?(null===(H=this._activePlayer.difficultyUnlocks)||void 0===H?void 0:H.expert)||(k=this._localizer.getText("EXPERT_MODE")):k=this._localizer.getText("HARD_MODE"),k.length>0&&(ut=this._localizer.getText("UNLOCK_NEW_MODE_TO_LEVEL_UP",k))}const ft=this._loggedInPlayer.player.getGold(),bt=this._hardCurrencyDataProvider.getBalance(27),pt=this._paymentManager.exchange({currency:27,value:bt},1).value;let[vt,gt]=at?[0,this._petData.level]:ju.M.getLevelPurchaseCost(this._petData.level,ot,ft);vt>ft&&!at&&([vt,gt]=ju.M.getLevelPurchaseCost(this._petData.level,ot,pt));const mt=this._paymentManager.exchange({currency:1,value:vt},27).value;let yt;return yt=W?Eh.P8.getPetDisplayName(this._petData,k):this._localizer.getText("UNKNOWN_QUESTION_MARKS"),{PET_NAME:null!=yt?yt:"",PET_ID:this._petData.ID,PET_DATA:this._petData,YOUR_PET_PANEL_PET_DATA:this._petData,IS_PET_OWNED:V,SHOW_GREYSCALE_FILTER:q,SHOW_SHADOW_FILTER:z,ELEMENTAL_ICON_FRAME:Ch.XP[k.data.affinity],ELEMENTAL_BASE_FRAME:Ch.bf[k.data.affinity],ELEMENTAL_TEXT:Q,SHOW_ON_YOUR_TEAM_BADGE:X,ENABLE_REMOVE_FROM_TEAM_BUTTON:X,ENABLE_ADD_TEAM_BUTTON:!X,PET_RARITY_TEXT:Tn.J.convertRarityToText(Z),PET_RARITY_RIBBON_FRAME:W?Z:-1,XP_BAR_INFO:tt,LEVEL_UP_BUTTON_LEVEL:gt,LEVEL_UP_BUTTON_COST_DIFFERENCE:vt-ft,LEVEL_UP_MAGICOIN_COST_DIFFERENCE:mt-bt,ENABLE_LEVEL_UP_BUTTON:rt,ENABLE_LEVEL_UP_NOTICE:ut.length>0,LEVEL_UP_BUTTON_NOTICE_TEXT:ut,LEVEL_UP_MAX_LEVEL_STATE:at,LEVEL_UP_BUTTON_COST:vt,LEVEL_UP_MAGICOIN_COST:mt,OTP_MISSING_MAGICOIN:mt-bt,MAX_LEVEL_REACHED:dt,SHOW_MAGICOIN_LEVEL_UP_OPTION:!this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(mt)}}setLoadingScreenEnabled(k){this._loadingDisplaySignal.run(k)}injectPetDataIntoGearModule(){const k={[tr.hi.YourPetPanelPetData]:this._petData};Ja.d.updateInjectedValues(this.prefabContainer,k)}updateCurrencyDisplay(){if(this._goldDisplay){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getGold(),B={[tr.$u.CurrencyID]:1,[tr.$u.CurrencyAmount]:k};Ja.d.updateInjectedValues(this._goldDisplay,B)}if(this._magicoinDisplay){const k=this._hardCurrencyDataProvider.getBalance(27),B={[tr.$u.CurrencyID]:27,[tr.$u.CurrencyAmount]:k};Ja.d.updateInjectedValues(this._magicoinDisplay,B)}}onPetAddToTeamClicked(){this.onAddPetToTeam.dispatch(this._petData),this.close()}onRemovedFromTeam(){this.onRemovePetFromTeam.dispatch(this._petData,this._petData.team);const k=Eh.P8.isPetOnTeam(this._petData),B={[tr.hi.YourPetShowOnYourTeamBadge]:k,[tr.hi.YourPetPanelEnableRemoveFromTeamButton]:k,[tr.hi.YourPetEnableAddTeamButton]:!k};Ja.d.updateInjectedValues(this.prefabContainer,B)}destroy(){this.onRemovePetFromTeam.dispose(),this.onAddPetToTeam.dispose(),this.onEvolvePet.dispose(),this.onPetMerged.dispose(),this.onPetLevelUp.dispose(),this.onPetGearChanged.dispose(),K.q.instance.prodigy.game.broadcaster.removeAppListener(oi.ig.Evolved,this.onEvolvePet),K.q.instance.prodigy.game.broadcaster.removeAppListener(oi.ig.EvolveEnd,this),super.destroy()}openEvolutionMenu(){kc.K.openEvolutionPromptIfEligible(new Ad.r(K.q.instance.prodigy.game,this._petData),void 0,!1,bi.k.PetBook).catch(j.RQr.createHandler("Failed to open evolution prompt"))}}(0,G.Cg)([(0,Re.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],$u.prototype,"_localizer",void 0),(0,G.Cg)([(0,Re.b)("e20-0fb0"),(0,G.Sn)("design:type",Wt.E)],$u.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,Re.b)("5c7-e02d"),(0,G.Sn)("design:type",Hi.W)],$u.prototype,"_hardCurrencyDataProvider",void 0),(0,G.Cg)([(0,Re.b)("743-fd51"),(0,G.Sn)("design:type",Tl.E)],$u.prototype,"_paymentManager",void 0);class Hu extends Hh.a{constructor(k,B,U=null,F=null){super(k,B,0,0,K.q.instance.prodigy.textureMenu),this.onItemRecieved=new j.HN0,this.onItemPurchased=new j.HN0,this.purchaseConfirmationConfig=null,this.defaultMemberAd=null,this.storeData=null,this.storeID=-1,this._segment=K.q.instance.prodigy.gameContainer.get("c47-20b6"),this.purchaseConfirmationConfig=U,this.defaultMemberAd=F}getStore(){return this.storeData}itemClicked(k){const B=K.q.instance.prodigy.gameContainer,U=B.get("e20-0fb0").player;if(this._segment.shop.sendShopItemViewedEvent(vl.V1,this.storeData,k),U.isItemOwned({ID:k.getID(),type:k.getType()}))this.showOwnedMessage(k);else if("pet"===k.getType()&&U.kennel.isFull())K.q.instance.prodigy.open.message(B.get(j.$Bt.LocalizationService).getText("PURCHASING_MESSAGE_TOO_MANY_PETS_BODY"),null,null,B.get(j.$Bt.LocalizationService).getText("MESSAGE_TITLE_UH_OH"));else{const B=le.t.getItem(k.getType(),k.getID()).data;"dormbg"===k.getType()?K.q.instance.prodigy.open.houseItemInfo(k,this.onBuyCardClosed.bind(this,k,B),Lr.s.Buy):K.q.instance.prodigy.open.itemInfo(k,this.onBuyCardClosed.bind(this,k,B),Lr.s.Buy)}}showOwnedMessage(k){const B=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);let U="",F=B.getText("MESSAGE_TITLE_UH_OH");switch(k.getType()){case"dorm":U=B.getText("PURCHASING_MESSAGE_TOO_MANY_ITEMS_BODY");break;case"dormbg":U=B.getText("PURCHASING_MESSAGE_ALREADY_LIVE_BODY"),F=null;break;case"hair":case"face":case"eyeColor":case"skinColor":case"hairColor":U=B.getText("PURCHASING_MESSAGE_ALREADY_LOOK_BODY");break;case"pet":U=B.getText("PURCHASING_MESSAGE_HAVE_PET_BODY");break;default:U=B.getText("PURCHASING_MESSAGE_HAVE_ITEM_BODY")}K.q.instance.prodigy.open.message(U,null,null,F)}onBuyCardClosed(k,B,U){if(U){const U=k.getCost()[0];if(this.sendBuyAnalytics(k,B),this.meetsMembershipRequirement(k,B)&&this.meetsCurrencyRequirement(U,B)&&this.meetsLevelRequirements(B)){let F=null;F=j.Aq$.isDefined(this.purchaseConfirmationConfig)?K.q.instance.prodigy.open.messageBoxPrefab.bind(K.q.instance.prodigy.open,{text:this.purchaseConfirmationConfig.message,buttonState:Sr.D.YesNoButtons,confirmCallback:this.buyItem.bind(this,k,B,U)}):this.buyItem.bind(this,k,B,U),F()}else this.meetsLevelRequirements(B,!1)?this.meetsMembershipRequirement(k,B,!1)?this._segment.shop.sendShopPurchaseFailedEvent(vl.V1,this.storeData,k,En.WE.NotEnoughCurrency):this._segment.shop.sendShopPurchaseFailedEvent(vl.V1,this.storeData,k,En.WE.MemberLocked):this._segment.shop.sendShopPurchaseFailedEvent(vl.V1,this.storeData,k,En.WE.LevelLocked)}}buyItem(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=Tn.J.getPurchasePrice(B,U);this._segment.shop.sendShopPurchaseCompletedEvent(vl.V1,this.storeData,k);const $=U.getType(),H=U.getID();"currency"===$&&1===H?F.changeGold(-G):F.backpack.consume($,H,G);const V=`${vl.V1}${this.storeData.getName()}`;this._segment.item.sendItemRemovedEvent(H,le.t.getItem($,H).name,$,U.getAmount(),{sink_id:V,sink_type:gn.C.Shop,instance_type:Ai.N.Interface,instance_id:this._segment.featureCommon.getCurrentInterfaceID(V)});let W=B;j.Aq$.isDefined(B.data)&&(W=B.data);const q=k.getType(),z=k.getID();"pet"===q&&(W={ID:z});const Y=this.getStore().getName(),Q={ID:z,type:q,N:1,data:W},X="store",Z={source_type:gn.C.Shop,instance_id:this._segment.featureCommon.getCurrentInterfaceID(`${vl.V1}${this.storeData.getName()}`),instance_type:Ai.N.Interface};Hu.GOTITEM_EXEMPT_STORES.includes(Y)?Tn.J.bagItem(Q,this.game,X,Y,Z):K.q.instance.prodigy.open.gotItem([Q],(()=>{this.onItemRecieved.dispatch()}),null,X,Y,void 0,Z),this.onItemPurchased.dispatch(k)}meetsMembershipRequirement(k,B,U=!0){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!F.hasMembership()){if("pet"===k.getType()&&F.kennel.isFull())return U&&K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:Sn.o.FunnelCatchMorePets}),!1;if(1===$.get(B,"member",0))return U&&(K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:jh.k.BuyMemberItem,interfaceName:`${vl.V1}${this.storeData.getName()}`,interfaceType:bi.Wm.Menu,saveClickInfo:jh.k.BuyMemberItem}),K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:Sn.o.FunnelBuyMemberItem,conversionFunnelMetadata:`${k.getType()}-${k.getID()}`},jh.k.BuyMemberItem)),!1}return!0}meetsLevelRequirements(k,B=!0){if(j.Aq$.isDefined(k.lockLevel)){const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(U.getLevel(){U.hasMembership()||K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:Sn.o.FunnelEquipLevelLockedItem})}}return!1}}return!0}sendBuyAnalytics(k,B){const U=K.q.instance.prodigy.gameContainer;if(j.Aq$.isDefined(B.member)&&1===B.member){const B=U.get("e20-0fb0").player;if(!B.hasMembership()){let F={};const G=`${k.getType()}-${k.getID()}`;"pet"===k.getType()&&B.kennel.isFull()||(F={conversionFunnelName:Sn.o.FunnelBuyMemberItem,conversionFunnelMetadata:G});const j=Tn.J.showYouTubeMembershipAd(this.game,!0)?_n.R.Video:_n.R.Static;U.get("c47-20b6").purchase.sendFunnelStart({type:"Store-Buy-Member-Item",category:"Store",contentId:G,adType:j})}}}meetsCurrencyRequirement(k,B){const U=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=Tn.J.getPurchasePrice(B,k);if("currency"===k.getType()&&1===k.getID()){if(F.getGold(){this._segment.featureCommon.sendInterfaceEvent({interfaceName:`${vl.V1}${this.storeData.getName()}`,interfaceType:bi.Wm.Menu,closeMethod:bi.Lv.CloseButton}),F()},this.onBuy=G,this.storeSortOrder=V,this._originType=K,this.onItemRecieved.add((()=>{this.scrollbar.process()})),this.onItemPurchased.add((k=>{this.updatePlayerCurrency(),j.Aq$.isDefined(this.onBuy)&&this.onBuy(k)})),this._onLoadStart=q,this._onLoadCompleteCallback=W,this.create()}create(){this.addTransparent();const k=this.createBaseSetup(30,16,"shine",null,null,!0,null),B=K.q.instance.prodigy.create.element(k,-40,-40);B.setRenderState(!0),B.add(new Pr.C(this.game,51,240,1178,40,q._.Tiled_sprites_json,"blue-top")),B.add(new Pr.C(this.game,51,280,1178,300,q._.Tiled_sprites_json,"blue-mid")),B.add(new Pr.C(this.game,51,580,1178,40,q._.Tiled_sprites_json,"blue-top2")),this.spinner=this.add(K.q.instance.prodigy.create.sprite(640,360,q._.General_core_json,"loading")),this.spinner.anchor.set(.5,.5),this.game.add.tween(this.spinner,this).to({angle:360},2e3,j.GS3.Linear.None,!0,0,Vt.s.MAX_SAFE_INTEGER,!1),super.create(),K.q.instance.prodigy.gameContainer.get("a50-726e").getStore(this.storeID).then((([k,B])=>{B?this.onGetStoreSuccess(B):this.onGetStoreFailure(k)}))}createItemCards(k,B){cr.l.removeAll(this.cards,!0);for(let U=B;U=k.length)K.q.instance.prodigy.create.panel(this.cards,G%4*180,220*Math.floor(.25*G),4,5,"empty");else{const k=F.getCost()[0],B=le.t.getItem(F.getType(),F.getID());K.q.instance.prodigy.create.item(this.cards,G%4*180,220*Math.floor(.25*G),{id:F.getID(),type:F.getType(),cost:{ID:k.getID(),type:k.getType(),N:Tn.J.getPurchasePrice(B.data,k)}},Lr.s.Store,(()=>{this.itemClicked(F)}))}}}getItemsForPage(k){const B=this.storeData.getPages()[k].getStoreItems();return j.Aq$.isDefined(this.storeSortOrder[k])?this.storeSortOrder[k](B):B}setMode(k){super.setMode(k);const B=this.getItemsForPage(k);this.scrollbar.reset(B.length-4,4,-1,this.createItemCards.bind(this,B)),this.scrollbar.process(),this.page=k}setupInfoPanel(){this.setupMemberAd()}onGetStoreSuccess(k){var B,U,F;j.Aq$.isDefined(this.game)&&(this.storeData=k,null===(B=this._onLoadStart)||void 0===B||B.call(this,k),this.spinner.destroy(),this.spinner=null,this.setupTabs(),this.setupStoreMerchant(),this.setupCurrencyDisplay(),this.setupInfoPanel(),this.cards=K.q.instance.prodigy.create.element(this,430,220),this.scrollbar=K.q.instance.prodigy.create.slider(this,this.cards.x+540+180,240,380,!0,!0),this.currentInterfaceName=`${vl.V1}${null===(U=this.storeData)||void 0===U?void 0:U.getName()}`,this._segment.featureCommon.sendInterfaceEvent({interfaceName:`${vl.V1}${this.storeData.getName()}`,interfaceType:bi.Wm.Menu,originType:this._originType,originID:null}),this.updatePlayerCurrency(),this.setMode(0),null===(F=this._onLoadCompleteCallback)||void 0===F||F.call(this))}onGetStoreFailure(k){j.VyI.log(`Store with ID: ${this.storeID} could not be loaded - ${k.getErrorMessage()}`,j.$bb.Warning);const B=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);K.q.instance.prodigy.open.message(B.getText("STORE_OPEN_FAILED_MESSAGE"),this.close.bind(this),null,B.getText("STORE_OPEN_FAILED_TITLE"))}setupStoreMerchant(){const k=this.storeData.getMerchantAvatar(),B=this.add(K.q.instance.prodigy.create.sprite(k.getPosition().x,k.getPosition().y,k.getAssetTag(),k.getAssetFrame()));B.scale.x=k.getScale().x,B.scale.y=k.getScale().y}setupTabs(){const k=this.storeData.getPages(),B=K.q.instance.prodigy.create.panel(this,80,80,3*k.length+6,2,"banner");for(let U=0;U{k.get("c47-20b6").purchase.sendFunnelStart({type:"Legacy-Store-Ad",category:"Store",contentId:`store-${this.storeID}`,adType:U}),K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:"Click-Membership-Ad",conversionStage:"Click-Ad"})},G=K.q.instance.prodigy.create.panel(this,80,380,8,5,"member");G.setClickable(F.bind(this,this.game)),K.q.instance.prodigy.create.font(G,10,10,B.getText("STORE_PROMPT_UNLOCK_ALL"),{align:"center",width:300}),K.q.instance.prodigy.create.font(G,10,140,B.getText("BUTTON_CLICK_HERE"),{align:"center",width:300,fontID:9,size:36});const $=G.add(K.q.instance.prodigy.create.sprite(7,75,q._.General_core_json,"overlay-small"));$.width=306,$.height=50,$.alpha=.2;const H=[];for(;H.length<3;){const k=wn.o.integerInRange(0,Vu.memberAdItems.length);-1===H.indexOf(k)&&(H[H.length]=k)}G.addChild(new ur.k(this.game,20,60,Vu.memberAdItems[H[0]],null)),G.addChild(new ur.k(this.game,120,60,Vu.memberAdItems[H[1]],null)),G.addChild(new ur.k(this.game,220,60,Vu.memberAdItems[H[2]],null))}}}Vu.memberAdItems=[Ut.E.getIconForType("follow",144),Ut.E.getIconForType("follow",146),Ut.E.getIconForType("follow",139),Ut.E.getIconForType("follow",140),Ut.E.getIconForType("follow",131),Ut.E.getIconForType("hat",74),Ut.E.getIconForType("hat",100),Ut.E.getIconForType("hat",119),Ut.E.getIconForType("hat",114),Ut.E.getIconForType("hat",116),Ut.E.getIconForType("hat",79),Ut.E.getIconForType("outfit",93),Ut.E.getIconForType("outfit",86),Ut.E.getIconForType("outfit",91),Ut.E.getIconForType("outfit",59),Ut.E.getIconForType("dorm",34),Ut.E.getIconForType("dorm",22),Ut.E.getIconForType("dorm",132),Ut.E.getIconForType("dorm",40),Ut.E.getIconForType("dorm",39),Ut.E.getIconForType("dorm",60),Ut.E.getIconForType("dorm",65),Ut.E.getIconForType("weapon",116),Ut.E.getIconForType("weapon",114),Ut.E.getIconForType("weapon",95),Ut.E.getIconForType("boots",40),Ut.E.getIconForType("boots",36),Ut.E.getIconForType("boots",37),Ut.E.getIconForType("boots",30)];var Wu=U(48982);class qu extends Ar.H{constructor(k,B,U,F,G,j){super(k,B,G,j),this.onIconPressed=null,this.itemIcon=null,this.quantityLabel=null,this.itemID=-1,this.quantityLabel=K.q.instance.prodigy.create.font(this,0,65,"0",{width:80,align:"right"}),this.setItemID(U),this.setQuantity(F)}setItemID(k){this.itemID=k,j.Aq$.isDefined(this.itemIcon)?this.itemIcon.loadNewTexture(Ut.E.getIconForType("dorm",k)):(this.itemIcon=this.add(K.q.instance.prodigy.create.sprite(0,0,Ut.E.getIconForType("dorm",k))),this.itemIcon.inputEnabled=!0,this.itemIcon.events.onInputDown.add(this.iconPressed,this))}setQuantity(k){this.quantityLabel.setText(`${k}`)}iconPressed(k,B){j.Aq$.isDefined(this.onIconPressed)&&this.onIconPressed.dispatch(this.itemID,Math.floor(B.x),Math.floor(B.y))}destroy(k={children:!0}){this.onIconPressed.dispose(),super.destroy(k)}}class Ku extends Ar.H{constructor(k,B,U,F){super(k,B,U,F),this.onIconPressed=new j.HN0,this.houseItems=[],this.pageNumber=0,this.itemIcons=[],this.pageBackground=null,this.prevPageButton=null,this.nextPageButton=null,this.pageBackground=this.add(K.q.instance.prodigy.create.sprite(25,30,q._.General_core_json,"overlay-light")),this.pageBackground.alpha=.2,this.pageBackground.width=670,this.pageBackground.height=50,this.pageBackground.visible=!1,this.prevPageButton=K.q.instance.prodigy.create.button(this,0,30,q._.General_icons_json,"back",this.decreasePageNumber.bind(this)),this.nextPageButton=K.q.instance.prodigy.create.button(this,670,30,q._.General_icons_json,"next",this.increasePageNumber.bind(this)),this.prevPageButton.visible=!1,this.nextPageButton.visible=!1}getItemCount(){return this.houseItems.length}showItems(k){this.houseItems=k.slice(),k.length>0?(this.showItemPages(!0),this.setPage(0),this.updatePrevPageButton(),this.updateNextPageButton()):this.showItemPages(!1)}setPage(k=0){this.pageNumber=j.cj9.clamp(k,0,this.getPageCount());const B=this.houseItems.slice(6*this.pageNumber,6*(this.pageNumber+1));for(let U=0;U-1){this.houseItems[B].N-=1,this.houseItems[B].N<=0&&this.houseItems.splice(B,1);const k=6*this.pageNumber;return B>=k&&B0?(this.pageNumber>this.getPageCount()-1?this.setPage(this.pageNumber-1):this.setPage(this.pageNumber),this.updateNextPageButton()):this.showItemPages(!1)),this.houseItems}return[]}increaseQuantity(k){let B=this.getItemIndex(k);-1===B&&(0===this.houseItems.length&&this.showItemPages(),B=this.houseItems.push({ID:k,N:0})-1),this.houseItems[B].N+=1,this.houseItems.sort(((k,B)=>k.ID-B.ID)),B=this.getItemIndex(k);const U=6*this.pageNumber;return B>=U&&BB.ID===k))}getPageCount(){return Math.ceil(this.houseItems.length/6)}increasePageNumber(){this.setPage(this.pageNumber+1),this.updateNextPageButton(),this.updatePrevPageButton()}decreasePageNumber(){this.setPage(this.pageNumber-1),this.updatePrevPageButton(),this.updateNextPageButton()}updatePrevPageButton(){this.pageNumber<=0?this.prevPageButton.setInactive():this.prevPageButton.isActive()||this.prevPageButton.setActive()}updateNextPageButton(){this.pageNumber>=this.getPageCount()-1?this.nextPageButton.setInactive():this.nextPageButton.isActive()||this.nextPageButton.setActive()}setItemIcon(k,B,U){if(k{this.showCategoryPage("Comfy")},category:"Comfy",title:"HOUSE_ITEM_CATEGORY_COMFY"},{icon:{ID:3,type:"dorm"},callback:()=>{this.showCategoryPage("Surface")},category:"Surface",title:"HOUSE_ITEM_CATEGORY_SURFACE"},{icon:{ID:6,type:"dorm"},callback:()=>{this.showCategoryPage("Plants")},category:"Plants",title:"HOUSE_ITEM_CATEGORY_PLANTS"},{icon:{ID:13,type:"dorm"},callback:()=>{this.showCategoryPage("Storage")},category:"Storage",title:"HOUSE_ITEM_CATEGORY_STORAGE"},{icon:{ID:18,type:"dorm"},callback:()=>{this.showCategoryPage("Wall")},category:"Wall",title:"HOUSE_ITEM_CATEGORY_WALL"},{icon:{ID:41,type:"dorm"},callback:()=>{this.showCategoryPage("Lamps")},category:"Lamps",title:"HOUSE_ITEM_CATEGORY_LAMPS"},{icon:{ID:22,type:"dorm"},callback:()=>{this.showCategoryPage("Items")},category:"Items",title:"HOUSE_ITEM_CATEGORY_ITEMS"}],this.trashIcon=K.q.instance.prodigy.create.button(this,1160,500,q._.General_icons_json,"dorm-trash",K.q.instance.prodigy.open.messageBoxPrefab.bind(K.q.instance.prodigy.open,{text:"HOUSE_EDITOR_CONFIRM_PACK_UP",buttonState:Sr.D.YesNoButtons,confirmCallback:()=>{this.removeAllItems()}})),this.updateTrashIcon(),this.rotateButton=K.q.instance.prodigy.create.button(this,0,0,q._.General_icons_json,"dorm-rotate",(()=>{this.rotateCurrentFocusedItem()})),this.rotateButton.visible=!1,this.rotateButton.sprite.anchor.set(.5,.5),this.game.broadcaster.broadcast(oi.Y1.HideHUD,oi.HG.HUD),this.setup(),this.setEditing(),this.game.input.onUp.add(this.inputReleased,this,-999)}menuSetup(){var k,B;super.menuSetup();const U=K.q.instance.prodigy.game.state.getCurrentState();null===(B=null===(k=U.getParentalConsentBanner)||void 0===k?void 0:k.call(U))||void 0===B||B.then((k=>{k&&(k.active=!1)})).catch(j.RQr.createHandler("Failed to get the parental consent banner when opening the house edit menu"));const F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this.showFrame("map",F.getText("HOUSE_EDITOR_TITLE"),this.categories);const G=K.q.instance.prodigy.create.textButton(this,0,0,{icon:"close",text:F.getText("BUTTON_CLOSE")},this.close.bind(this));this.showBtns([],[G]),this.updateCategoryTabState(),this.itemsScroll=new Ku(this.game,this,190,620),this.itemsScroll.onIconPressed.add(this.spawnHouseItem,this),this.btns[0].isActive()?this.btns[0].onDown():this.showCategoryPage(this.categories[0].category),this.editStartTime=Math.floor(Date.now()/1e3)}close(){var k,B;this.game.broadcaster.broadcast(oi.Y1.ShowHUD,oi.HG.HUD),this.game.broadcaster.broadcast(oi.F0.CloseEditor,this.game),this.setEditing(!1),this.game.input.onUp.remove(this.inputReleased,this);const U=K.q.instance.prodigy.game.state.getCurrentState();null===(B=null===(k=U.getParentalConsentBanner)||void 0===k?void 0:k.call(U))||void 0===B||B.then((k=>{k&&(k.active=!0)})).catch(j.RQr.createHandler("Failed to get the parental consent banner when closing the house edit menu")),super.close()}showCategoryPage(k){j.Aq$.isDefined(this.itemsScroll)&&(this.currentCategory=k,this.itemsScroll.showItems(this.getUnplacedItemsInCategory(k)))}updateCategoryTabState(){for(let k=0;k0?this.btns[k].setActive():this.btns[k].setInactive()}getUnplacedItemsInCategory(k){return K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.house.getUnplacedItems().filter((B=>{var U;const F=null===(U=le.t.getItem("dorm",B.ID))||void 0===U?void 0:U.data;return(null==F?void 0:F.category.toLowerCase())===k.toLowerCase()?F:null}))}getIndexOfCategory(k){return this.categories.findIndex((B=>B.category===k))}spawnHouseItem(k,B,U){this.clearFocusedItem();const F=j.cj9.snapToCeil(B,Or.G.HOUSE_ITEM_GRID_SNAP_INTERVAL),G=j.cj9.snapToFloor(U,Or.G.HOUSE_ITEM_GRID_SNAP_INTERVAL),$=K.q.instance.prodigy.create.houseItem(this.houseMap.content,k,Math.floor(F),Math.floor(G),0,this.houseMap).findComponent(Or.G);$.setEditable();this.game.time.events.addTimer(33,(k=>{const B=k.getRenderer().getInputHandler(),U=this.game.input.activePointer;if(U.isDown&&B){k.gameObject.position.set(0,0);const F=k.getRenderer();F.setPosition(U.position.x,U.position.y-.5*F.getHeight()),B._pointerData[U.id].isDown=!0,B.startDrag(U)}else k.gameObject.destroy()}),this,$),$.onItemDropped.addOnce(this.itemWasPlacedInHouse,this)}itemWasPlacedInHouse(k,B,U){if(this.itemsScroll.reduceQuantity(k.itemID),this.itemsScroll.getItemCount()<1){const k=this.getIndexOfCategory(this.currentCategory);this.resetButton(k),this.btns[k].setInactive(),this.currentBtn=-1}this.houseMap.addHouseItem(k.gameObject),this.registerHouseItemListeners(k);K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.house.setActive(k.itemID,B,U,0,0,0,0,0),k.gameObject.x=B,k.gameObject.y=U,this.updateTrashIcon()}setEditing(k=!0){if(j.Aq$.isDefined(this.houseMap))for(let B=0;B0;)this.removeHouseItem(this.houseMap.houseItems[0].findComponent(Or.G));this.updateTrashIcon()}updateTrashIcon(){this.houseMap.houseItems.length>0?this.trashIcon.setActive():this.trashIcon.setInactive()}removeHouseItem(k){this.clearFocusedItem(),this.houseMap.removeHouseItem(k.gameObject);const B=le.t.getItem("dorm",k.itemID).data.category,U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=U.house.data.active;for(let G=0;G0&&this.renderMenus[this.renderMenus.length-1].setActive(!0),this.closeChat()}setActiveMenu(k=null){j.Aq$.isDefined(k)&&(k.isModal?k instanceof mh.y&&k.obeyMenuStackVisibility?k.onPrefabLoaded.addOnce((()=>{this.pushActiveModal(k)})):this.pushActiveModal(k):this.renderMenus.push(k)),j.Aq$.isDefined(k)&&!k.isModal&&this.closeChat(),this.updateSentryTags()}setMenuInactive(k){let B=this.renderMenus.indexOf(k);-1===B&&(j.VyI.log("Attempted to remove a menu that is not in the renderMenus stack. Removing top menu instead.",j.$bb.Warning),B=this.renderMenus.length-1);const U=B===this.renderMenus.length-1;if(this.renderMenus.splice(B,1),U&&this.renderMenus.length>0)for(let F=this.renderMenus.length-1;F>=0&&(this.renderMenus[F].setActive(!0),j.Aq$.isDefined(this.renderMenus[F].isModal)&&!this.renderMenus[F].isModal);F--);j.Aq$.isDefined(k)&&!k.isModal&&this.closeChat(),this.updateSentryTags()}pushActiveModal(k){for(let B=0;B0&&this.renderMenus[this.renderMenus.length-1]instanceof Hh.a&&this.renderMenus[this.renderMenus.length-1].hideActiveElements(),this.updateSentryTags()}menuOpen(k){this.menuLayer.children.forEach((B=>{B.hide&&B.hide(k),B.onMenuOpen&&B.onMenuOpen(k)})),this.closeChat(),this.updateSentryTags()}close(k){for(let B=this.menus.length-1;B>=0;B--)this.menus[B]===k&&(this.menus.splice(B,1),K.q.instance.game.broadcaster.broadcast(oi.n8.FactoryMenuClosed));this.IsModalMenuOpen()||this.bitmapCacheGameRender(!1),this.updateSentryTags()}menuCloseAll(){if(!this._isClosingMenus){this._isClosingMenus=!0;for(let k=this.menus.length-1;k>=0;k--){const B=this.menus[k];this.isClosable(B)?null==B||B.close():null==B||B.destroy()}this.menus=[],this.bitmapCacheGameRender(!1),this.closeChat(),this._isClosingMenus=!1,this.updateSentryTags()}}menuCloseAllUntil(k=-1){if(!this._isClosingMenus){this._isClosingMenus=!0;for(let B=this.menus.length-1;B>k;B--){const k=this.menus[B];this.isClosable(k)?k.close():k.destroy()}this.IsModalMenuOpen()||this.bitmapCacheGameRender(!1),this._isClosingMenus=!1,this.updateSentryTags()}}menuCloseAllExcept(k){if(!this._isClosingMenus){this._isClosingMenus=!0;for(const B of this.menus)B!==k&&(this.isClosable(B)?B.close():B.destroy());this.IsModalMenuOpen()||this.bitmapCacheGameRender(!1),this._isClosingMenus=!1,this.updateSentryTags()}}menuCloseTopmost(k=1){if(this._isClosingMenus)return;this._isClosingMenus=!0;let B=0;for(let U=this.menus.length-1;U>=0&&B=0;B--){const U=this.menus[B];if(U.visible){if(U instanceof k)return!0;if(U instanceof mh.y&&U.prefab.findComponentInChildren(k))return!0}}return!1}findMenuByType(k,B=!0){return $.findLast(this.menus,(U=>U instanceof k&&(!B||U.visible)))}chat(k){if(K.q.instance.prodigy.world.getCurrentZone()===hn.A_.CRYSTALCAVERNS)return j.Aq$.isDefined(k)&&k(),void K.q.instance.prodigy.open.informationDialog(new bd.Z(this._localizer.getText("BUTTON_OKAY_CAPITAL"),void 0,Jc.E.Small,void 0,this._localizer.getText("MESSAGE_TITLE_OOPS"),this._localizer.getText("FEATURE_UNAVAILABLE_HERE")));this.chatMenu=new Zl(this.game,this.menuLayer,k),this.chatOpened.dispatch()}closeChat(){var k;null===(k=this.chatMenu)||void 0===k||k.close(),this.chatMenu=null}nameChange(k,B){this.openMenu(new Nl(this.game,this.menuLayer,k,B))}advancedNameChange(k,B){this.openMenu(new xl(this.game,this.menuLayer,k,B))}firstNameSelector(k,B){this.openMenu(new dc(this.game,this.menuLayer,k,B))}wizardNameSelector(k,B,U){this.openMenu(new Zc(this.game,this.menuLayer,k,B,U))}rating(k=null){Pt.pF.isNativeApp()?this.openMenu(new hu(this.game,this.menuLayer,k)):j.Aq$.isDefined(k)&&k()}choosePet(k,B){this.openMenu(new Jl(this.game,this.menuLayer,k,B))}server(k,B,U){this.openMenu(new bu(this.game,this.menuLayer,k,B,U))}serverSelectMode(k){this.openMenu(new lu(this.game,this.menuLayer,k))}houseEditorMenu(k,B){const U=new zu(this.game,this.menuLayer,k,B);return this.openMenu(U),U}pets(k){var B;const U=K.q.instance.prodigy.breadcrumbManager,F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(sh.I.shouldShowPetGearTutorialCached||nh.N.shouldShowPetMergeTutorial)sh.I.shouldShowPetGearTutorialCached?K.q.instance.game.broadcaster.broadcast(oi.bI.FtueStarted):nh.N.shouldShowPetMergeTutorial&&K.q.instance.game.broadcaster.broadcast(oi.ki.FtueStarted);else{const k=(null===(B=F.kennel)||void 0===B?void 0:B.getPets().length)>=3,G=U.isBreadcrumbComplete(ln.B.FEATURE_PET_UPGRADE_FTUE,ln.B.BREADCRUMB_SEEN_YOUR_TEAM_MENU);k&&!G&&U.completeBreadcrumb(ln.B.FEATURE_PET_UPGRADE_FTUE,ln.B.BREADCRUMB_SEEN_YOUR_TEAM_MENU)}if((0,Dt.G)(Qo.m)){const B=new ku(this.menuLayer,k);return this.openMenu(B),B}const G=this.isMenuOpen(Ud.o);if(!G){const B=new Ud.o(this.game,this.menuLayer,void 0,k);return this.openMenu(B),B}const j=this.findMenuByType(Ud.o);return G&&j&&k&&(j.closeCallback=k),j}yourTeam(k,B,U){const F=new Bd.Y(this.game,this.menuLayer,k,B,U);return this.openMenu(F),F}yourPet(k,B,U){if(!this.isMenuOpen(kd.O)){const F=new kd.O(this.game,this.menuLayer,k,B,U);return this.openMenu(F),F}return null}petDetailsMenu(k,B){if(this.isMenuOpen($u))return null;const U=new $u(this.menuLayer,B,k);return this.openMenu(U),U}postBattleLossMenu(k,B,U){if(this.isMenuOpen(Rh))return null;const F=new Rh(this.menuLayer,U,B,k);return this.openMenu(F),F}yourPetStandalone(k,B){const U=new Ud.o(K.q.instance.prodigy.game,K.q.instance.prodigy.open.menuLayer,(()=>{const F=K.q.instance.prodigy.open.yourPet(k,U.contentLayer,U.headerPrefab);B&&F.onLoaded.addOnce((()=>{F.petDataProvider.updateInjectedValues(B)})),U.headerPrefab.backToYourTeamButton.GameObject.active=!0,U.headerPrefab.backToYourTeamButton.onClick.addOnce((()=>{F.close(),U.close()}),this)}));return K.q.instance.prodigy.open.menus.push(U),U}yourPetGear(k,B,U,F){if(!this.isMenuOpen(Ld)){const G=new Ld(this.game,this.menuLayer,k,B,U,F);return this.openMenu(G),G}return null}petBook(k){const B=new Ed.M(this.game,this.menuLayer,k);return this.openMenu(B),B}petInfo(k,B){if(!this.isMenuOpen(Nd)){const U=new Nd(this.game,this.menuLayer,k,B);return this.openMenu(U),U}return null}parentalLinkSuccessPrompt(k){const B=new Ic(this.game,this.menuLayer,Cc.SUCCESS_POPUP_CONFIG,k);return this.openMenu(B),B}parentalLinkAtSchoolPrompt(k,B){this.openMenu(new Ic(this.game,this.menuLayer,Cc.AT_SCHOOL_POPUP_CONFIG,k,B))}parentalLoginPopup(){this.openMenu(new Dc(this.game,this.menuLayer))}mailer(k,B,U){const F=new td(this.game,this.menuLayer,U);return F.preprocess(),this.openMenu(F),F}networkError(k){const B=this._localizer.getText("NETWORK_ERROR");return this.messageBoxOkay(B,void 0,k)}openMail(k){const B=new Ac(this.game,this.menuLayer);return B.preprocess(k),this.openMenu(B),B}friendRequests(k){this.openMenu(new Ou(this.game,this.menuLayer,k))}itemInfo(k,B,U,F){const G=this.prefabMenu(Ei.l.ItemDetailsModal);return G.onPrefabLoaded.addOnce((G=>{const j=G.findComponentInChildren(Yu.m);j&&j.setup(k,U,B,F)})),G}houseItemInfo(k,B,U){this.openMenu(new nu(this.game,this.menuLayer,k,B,U))}social(){this.openMenu(new Tu(this.game,this.menuLayer))}boostSelect(k,B){this.openMenu(new jl.i(this.game,this.menuLayer,k,B))}card(k,B,U){{const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=K.q.instance.prodigy.gameContainer.get("c47-20b6"),j=(0,Dt.G)(Zo.q).enabled;G.featureCommon.sendButtonEvent({buttonName:jh.k.WorldPlayerPortrait,interfaceName:ph.B.Overworld,interfaceType:bi.Wm.Overworld,destinationName:j?ph.B.WizardCostumesMenu:ph.B.PlayerCard,saveClickInfo:jh.k.WorldPlayerPortrait}),(0,Dt.G)(Zo.q).enabled&&k===F?this.openWizardCostumesMenu(bi.$N.WorldObject,jh.k.WorldPlayerPortrait):this.openMenu(new Kl(this.game,this.menuLayer,k,B,U))}}arena(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.openMenu(new eu(this.game,this.menuLayer,k))}membershipSuccess(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("c47-20b6");F.featureCommon.sendInterfaceEvent({interfaceName:ph.B.KidsMlpUpgradeComplete,interfaceType:bi.Wm.Popup},U);const G=this.prefabMenu({prefabID:Ei.l.MembershipSuccess});return G.onDestroy.addOnce((()=>{F.featureCommon.sendButtonEvent({buttonName:jh.k.MembershipUpgradeOkay,interfaceType:bi.Wm.Popup,interfaceName:ph.B.KidsMlpUpgradeComplete}),null==B||B()})),G}nicknamer(k,B,U){this.openMenu(new ru(this.game,this.menuLayer,k,B,U))}gotItem(k,B,U,F,G,j=!1,$,H){const V=new iu.u(this.game,this.menuLayer,k,B,U,F,G,j,$,H);return this.openMenu(V),V}reward(k,B){this.openMenu(new Iu(this.game,this.menuLayer,k,B))}gotItemFanfare(k,B,U,F,G,$,H=!1,V){const W=this.gotItem(k,U,F,G,$,H,V);return K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(B).then((k=>{const B=k.findComponent(j.y4o).getRootContainer();B.position.set(W.centerX,W.centerY+50),W.addChildAt(B,W.children.indexOf(W.content)-1)})).catch(j.RQr.createHandler("Unable to load prefab")),W}messageBoxPrefab(k){var B,U,F,G;const $=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),H=k.title?$.getText(k.title,...null!==(B=k.titleArgs)&&void 0!==B?B:[]).toUpperCase():"";return null!==(U=k.buttonState)&&void 0!==U||(k.buttonState=Sr.D.OkayButton),K.q.instance.prodigy.open.prefabMenu({prefabID:Ei.l.MessageBox,runUpdate:!0,isModal:null===(F=k.isModal)||void 0===F||F,skipTransparency:!1,injectablePropertiesDictionary:{MESSAGE_BOX_SHOW_BANNER:!!k.title,MESSAGE_BOX_SHOW_CLOSE_BUTTON:null!==(G=k.showCloseButton)&&void 0!==G&&G,MESSAGE_BOX_SHOW_OKAY_BUTTON:k.buttonState===Sr.D.OkayButton,MESSAGE_BOX_SHOW_YES_NO_BUTTONS:k.buttonState===Sr.D.YesNoButtons,MESSAGE_BOX_BANNER_TEXT_KEY:H,MESSAGE_BOX_CONTENT_TEXT_KEY:k.text,MESSAGE_BOX_CONTENT_TEXT_ARGS:k.textArgs,MESSAGE_BOX_CONFIRM_CALLBACK:k.confirmCallback,MESSAGE_BOX_NO_CALLBACK:k.noCallback,MESSAGE_BOX_CONFIRM_BUTTON_TEXT_KEY:k.confirmButtonTextKey,MESSAGE_BOX_NO_BUTTON_TEXT_KEY:k.noButtonTextKey}})}message(k,B,U,F,G,j){const $=new Tc.p(this.game,this.menuLayer,G,j);return $.preprocess(k,U,F),this.openMenu($),$.queuePostCreateCallback($.setOkay.bind($,null,B)),$}classModeMessage(k,B,U,F,G,j,$){if("WORLD_LAMPLIGHT_TOWN"===$)if(K.q.instance.prodigy.skin.isFestivalActive("Summerfest")){const k=new Kh(this.game,this.menuLayer,j),$=this._localizer.getText("LAMPLIGHT_LOCKED_FESTIVAL");k.preprocess($,U,F,G),this.openMenu(k),k.queuePostCreateCallback(k.setOkay.bind(k,null,B))}else{this.prefabMenu(Ei.l.LamplightLockedPopup,B,!1).setGameRenderState(!0)}else{const $=new Kh(this.game,this.menuLayer,j);$.preprocess(k,U,F,G),this.openMenu($),$.queuePostCreateCallback($.setOkay.bind($,null,B))}}classCodeEntryDialogue(){const k=new Fh(this.game,this.menuLayer);return this.openMenu(k),k}lamplightLevelLock(k){K.q.instance.prodigy.open.message(this._localizer.getText("WORLD_MAP_ZONE_LEVEL_LOCKED",ql.X.getLevelRequirement(37)),null,null,this._localizer.getText(k),null,{isModal:!1})}springfestClassModeMessage(k,B,U,F){const G=new Lc(this.game,this.menuLayer,F);G.preprocess(k,null,U),G.queuePostCreateCallback(G.setOkay.bind(G,null,B)),this.openMenu(G)}twilightWheelPopup(k){const B=new qc(this.game,this.menuLayer,k);return this.openMenu(B),B}messageBox(k,B,U,F,G,j,$){const H=new Tc.p(this.game,this.menuLayer,j,$);return H.preprocess(k,F,G),this.openMenu(H),H.queuePostCreateCallback(H.setConfirm.bind(H,B,U)),H}messageBoxGeneric(k,B,U,F,G,j,$,H){const V=new Tc.p(this.game,this.menuLayer,$,H);return V.preprocess(k,G,j),this.openMenu(V),V.queuePostCreateCallback(V.setConfirmGeneric.bind(V,B,U,F)),V}messageBoxOkay(k,B,U,F,G,$,H,V){const W=new Tc.p(this.game,this.menuLayer,$,H);return W.preprocess(k,F,G),this.openMenu(W),W.queuePostCreateCallback(W.setOkay.bind(W,B,null),j.Aq$.isDefined(V)?()=>{W.okayButton.setInputBlockPriority(V)}:()=>{}),W.setCloseCallback(U),W}messageBoxError(k,B,U,F){(U||F)&&(U?j.RQr.logError(U,null!=F?F:""):j.RQr.logError(new Error(F),"")),this.messageBoxPrefab({text:k,textArgs:B})}titanProgress(k,B="UI_TITAN_SHARDS_INFO"){const U=new $c(this.game,this.menuLayer,k,B);return U.preprocess(),this.openMenu(U),U}adventureMap(k,B){const U=new sd(this.game,this.menuLayer,k,K.q.instance.prodigy.gameContainer.get("d0e-64fd"),B);return this.openMenu(U),U}adventureContinueRestart(k){return this.prefabMenu(Ei.l.RestartDungeon,k,!1)}adventureComplete(){return this.prefabMenu(Ei.l.DungeonCompleted,null,!1)}prefabMenu(k,B=Qu.closeCallback,U=Qu.runUpdate,F=Qu.isModal,G=Qu.skipTransparency,j,$,H=Qu.sendEvents,V=Qu.sendCloseEvent,W,q=Qu.obeyMenuStackVisibility,K=Qu.isFullScreenUI){return"string"==typeof k||"number"==typeof k?this.internalPrefabMenu({prefabID:k,closeCallback:B,runUpdate:U,isModal:F,skipTransparency:G,injectablePropertiesDictionary:j,interfaceEventProps:$,sendEvents:H,sendCloseEvent:V,closeOriginID:W,obeyMenuStackVisibility:q,isFullScreenUI:K}):this.internalPrefabMenu(k)}internalPrefabMenu(k){var B,U,F,G;const{prefabID:$,closeCallback:H,runUpdate:V,isModal:W,skipTransparency:q,injectablePropertiesDictionary:z,interfaceEventProps:Y,customEventProps:Q,sendEvents:X,sendCloseEvent:Z,closeOriginID:J,obeyMenuStackVisibility:tt,isFullScreenUI:et}=Object.assign(Object.assign({},Qu),k);this.closeChat();const it=un.o.isNumber($)?en.T[$]:$,st=new mh.y(this.game,this.menuLayer,it,null!=H?H:()=>null,V,z,tt);if(st.isModal=null!=W&&W,st.isFullScreenUI=null!=et&&et,st.skipRenderTransparencyLayer=null!=q&&q,X){const{gameContainer:k}=K.q.instance.prodigy,{featureCommon:$}=k.get("c47-20b6"),H=null!=Y?Y:{interfaceName:null!==(B=k.get(j.t5G.PrefabDataProvider).getPrefabItem(it).name)&&void 0!==B?B:"",interfaceType:bi.Wm.Menu,closeMethod:bi.Lv.CloseButton},V=Object.assign(Object.assign({prefab_guid:it},null===(U=null==Q?void 0:Q.all)||void 0===U?void 0:U.opened),null===(G=null==Q?void 0:Q[null!==(F=H.originType)&&void 0!==F?F:""])||void 0===G?void 0:G.opened);if($.sendInterfaceEvent(Object.assign(Object.assign({},H),{closeMethod:void 0}),V),Z){const k=null!=J?J:H.originID;st.onDestroy.addOnce((()=>{var B,U,F,G;return $.sendInterfaceEvent(Object.assign(Object.assign({},H),{originID:k}),Object.assign(Object.assign({prefab_guid:it},null===(B=null==Q?void 0:Q.all)||void 0===B?void 0:B.closed),null!==(G=null===(F=null==Q?void 0:Q[null!==(U=H.originType)&&void 0!==U?U:"any"])||void 0===F?void 0:F.closed)&&void 0!==G?G:{}))}))}}return this.openMenu(st),this.onPrefabMenuOpened.dispatch(it),st}friendsList(){const k=new fc(this.game,this.menuLayer);return k.preprocess(),this.openMenu(k),k}membershipParent(k,B,U,F,G=!1){var j,$;let H=Ei.l.MembershipParent,V=ph.B.MembershipParentAd;const W={MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_METADATA:null==B?void 0:B.conversionFunnelMetadata,MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_NAME:null==B?void 0:B.conversionFunnelName,MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_STAGE:null==B?void 0:B.conversionStage,MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_STATIC_OR_VIDEO:null==B?void 0:B.conversionStaticOrVideo,MEMBERSHIP_PURCHASE_MEMBER_PANEL_AD_FLAVOUR_TEXT:null==k?void 0:k.flavourText,MEMBERSHIP_PURCHASE_MEMBER_PANEL_AD_FRAME_NAME:null==k?void 0:k.frameName,MEMBERSHIP_PURCHASE_MEMBER_PANEL_AD_TRACKING_EVENT:null==k?void 0:k.trackingEvent,MEMBERSHIP_PURCHASE_UPGRADE:U},q=Gt.R.loadData(Ft.r.DynamicParentPromptRuleset_json),K=$h.H.evaluate(B.conversionFunnelName,q);if(K){const k=K.assets[0],B=Gt.R.loadData(k);H=B.contentTemplateGuid,V=null!==($=null===(j=B.configurableElements.segmentProperties)||void 0===j?void 0:j.interfaceName)&&void 0!==$?$:ph.B.MembershipParentAd,W[tr.Dw.DynamicPromptContentAssetGuid]=k}const z=this.prefabMenu(H,void 0,void 0,G,!0,W,{interfaceName:V,interfaceType:bi.Wm.Modal,originType:bi.$N.ButtonClick,originID:F,instanceType:Ai.N.Interface,closeMethod:bi.Lv.X},!0,!0,jh.k.X,!0);return z.createContainer=!1,z}membershipInfo(k,B={},U,F=!1,G={}){const $=this.unifiedConversionFlow(k,B,U,G);if(j.Aq$.isDefined($))return $;const H=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return!H.isPlayingAtSchool()||H.hasMembership()&&!F?(this.battlePassUltimateMemberUpsellModal().then((()=>null==k?void 0:k())).catch(j.RQr.createHandler("Error opening ultra upsell from membershipInfo")),null):this.membershipSchoolAd(k)}rewardCloudMountMenu(k,B=null,U=null,F=null,G=null,$=!1){const H=new _c.R(this.game,this.menuLayer,k,G,B,U,!0,F,$);return H.preprocess(),j.Aq$.isDefined(G)&&(H.sourceOverride=G),this.openMenu(H),H}dynamicPrompt(k,B,U,F){var G,j;K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.memberPrompt=!0;const $=Object.assign({[tr.Dw.DynamicPromptContentAssetGuid]:k},B),H=Gt.R.loadData(k),V=this.prefabMenu(null==H?void 0:H.contentTemplateGuid,F,!0,!1,!0,$,{interfaceName:null===(j=null===(G=null==H?void 0:H.configurableElements)||void 0===G?void 0:G.segmentProperties)||void 0===j?void 0:j.interfaceName,interfaceType:bi.Wm.Modal,originType:U.originType,originID:U.originId,instanceType:Ai.N.Interface,closeMethod:bi.Lv.X},!0,!0,jh.k.X,!0);return V.createContainer=!1,V}unifiedConversionFlow(k,B=null,U=null,F={}){var G,$,H,V,W,q,z;const Y=K.q.instance.prodigy.gameContainer.get("c47-20b6"),Q=yn.P.evaluateUnifiedConversionFlowRules(B.conversionFunnelName);if(!j.Aq$.isDefined(null==Q?void 0:Q.assets[0]))return null;K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.memberPrompt=!0;const X=Q.assets[0],Z=Gt.R.loadData(X),J=Y.purchase.getFunnelID(),tt=Object.assign(Object.assign({[tr.Dw.DynamicPromptContentAssetGuid]:X,IS_UNIFIED_CONVERSION_PROMPT:!0},null!==(G=Z.injectableProperties)&&void 0!==G?G:{}),F);let et,it;"object"==typeof U?(et=null==U?void 0:U.id,it=null==U?void 0:U.type):et=U;const st=this.prefabMenu(null==Z?void 0:Z.contentTemplateGuid,k,!0,!1,!0,tt,{interfaceName:null!==(V=null===(H=null===($=null==Z?void 0:Z.configurableElements)||void 0===$?void 0:$.segmentProperties)||void 0===H?void 0:H.interfaceName)&&void 0!==V?V:ph.B.MembershipParentAd,interfaceType:bi.Wm.Modal,originID:et,originType:it,instanceType:null!==(z=null===(q=null===(W=null==Z?void 0:Z.configurableElements)||void 0===W?void 0:W.segmentProperties)||void 0===q?void 0:q.instanceType)&&void 0!==z?z:Ai.N.Interface,closeMethod:bi.Lv.X,custom:{funnel_id:J}},!0,!0,jh.k.X,!0);return st.createContainer=!1,st}staticMemberAd(k,B,U,F,G,j){const $=this.prefabMenu(k?Ei.l.StaticAdCarousel:Ei.l.StaticAd,j,!0,!0,!0,void 0,{interfaceName:k?ph.B.MembershipStaticAdCarousel:ph.B.MembershipStaticAd,interfaceType:bi.Wm.Modal,originType:bi.$N.ButtonClick,originID:U,instanceType:Ai.N.Interface,closeMethod:bi.Lv.X},!0,!0,jh.k.X),H=()=>{$.prefab.findComponent(Mh.j).configure(k,B,U,F,G)};return $.prefab?H():$.onPrefabLoaded.addOnce(H),$}membershipSchoolAd(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0");if(B.areLoginCredentialsValid()){const U={LoginDetailsUsername:B.loginCredentials.username,LoginDetailsPassword:B.loginCredentials.password};return this.prefabMenu(Ei.l.MembershipSchoolAd,k,!0,!0,!1,U)}const U=new Ec(this.game,this.menuLayer,k);return this.openMenu(U),U}membershipYouTubeAd(k,B,U=null,F,G=!1){if(!this.isMenuOpen(wc.v)){const j=new wc.v(this.game,this.menuLayer,k,B,U,F,G);this.openMenu(j)}}memberAdSuppressionToolTip(k,B=!1,U=!0){U&&K.q.instance.prodigy.load.assets(Z.c.Sfx_pets_button_disabled_state,(()=>{K.q.instance.prodigy.audio.playSFX(67,"button-disabled")}));return k.bodyText=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MEMBERSHIP_SUPPRESSION_BODY"),k.headerText=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MEMBERSHIP_SUPPRESSION_HEADER"),this.overlayToolTip(122,k,B)}overlayToolTip(k,B,U=!1){if(!this.isMenuOpen(Hc)){const F=new Hc(this.game,this.menuLayer,k,B,U);return this.menus&&this.openMenu(F),F}return null}socialFeed(k=null,B){const U=new xc.g(this.game,this.menuLayer,k,B);return U.preprocess(),this.openMenu(U),U}coOpTeamSelect(k,B){const U=new od(this.game,this.menuLayer,k,B);return this.openMenu(U),U}PopUpModal(k){const B=new Nc(this.game,this.menuLayer,k);return B.preprocess(),this.openMenu(B),B}coOpModal(k){const B=new rd(this.game,this.menuLayer,k);return this.openMenu(B),B}character(){this.openMenu(new zl(this.game,this.menuLayer))}backpack(){if(this.isMenuOpen(Fl))return null;const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=new Fl(this.game,this.menuLayer,k);return this.openMenu(B),B}pouch(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.openMenu(new ou(this.game,this.menuLayer,F,k,B,U))}map(k={}){this.closeChat();const B=new Ta.i(this.game,this.menuLayer,k);return this.openMenu(B),K.q.instance.game.broadcaster.broadcast(oi.Y1.WorldMapOpened),B}startRegistration(k,B,U=!0,F=!1){const G=new bl(this.game,this.menuLayer,k,U,F);B&&G.queuePostCreateCallback(...B),this.openMenu(G)}registration(k,B,U){const F=new k(this.game,this.menuLayer,B,U);this.openMenu(F)}informationDialog(k,B){const U=new pd(this.game,null!=B?B:this.menuLayer,k);return this.openMenu(U),U}topHeavyInformationDialog(k){const B=new _d(this.game,this.menuLayer,k);return this.openMenu(B),B}supportPageDialog(k){this.openMenu(new md(this.game,this.menuLayer,k))}confirmationDialog(k){const B=new ud(this.game,this.menuLayer,k);return this.openMenu(B),B}confirmationDialogWideButtons(k){const B=new fd(this.game,this.menuLayer,k);return this.openMenu(B),B}confirmationDialogNoIconButtons(k){const B=new vd(this.game,this.menuLayer,k);return this.openMenu(B),B}petsCustomDialog(k){const B=new gd(this.game,this.menuLayer,k);return this.openMenu(B),B}petsLetGoConfirmationDialog(k,B){const U=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),F=le.t.getItem("pet",k.ID);return this.petsCustomDialog(new yh.k(U.getText("LET_GO"),B,U.getText("KEEP"),void 0,{atlas:q._.Ui_store_json,name:"icon-large-exclamation"},Jc.E.Small,500,U.getText("LET_PET_GO_QUESTION"),U.getText("LET_GO_FOREVER_WARNING",Eh.P8.getPetDisplayName(F.data,k))))}bannerDialog(k){this.openMenu(new hd.L(this.game,this.menuLayer,k))}learnMore(k,B,U,F=null,G=null,$=vh.E.OverlayLayer){const H=new bd.Z("BUTTON_OKAY_CAPITAL",F,Jc.E.Medium,600,void 0,U,void 0,void 0,void 0,Ei.l.SubtitleTitleHeader,void 0,Ei.l.LearnMoreBody),V=K.q.instance.prodigy.open.informationDialog(H,j.wa5.getActiveScene().getLayer($));V.onCreate.addOnce((()=>{null==G||G();const U=V.header.findComponentsInChildren(j.EYj);for(let F=0;F{k===Yo.Xx.DefeatedPets&&th.E.recordDefeatedPetsFunnelStep(Gh.l.DynamicStoreLostPetsTab)})),B.onItemSelected.add((k=>{k===Yo.Xx.DefeatedPets&&th.E.recordDefeatedPetsFunnelStep(Gh.l.DynamicStoreLostPetViewed)})),B.onPurchaseFinished.add((k=>{k===Yo.Xx.DefeatedPets&&th.E.recordDefeatedPetsFunnelStep(Gh.l.DynamicStoreLostPetPurchased)}))}))}dynamicStoreModal(k){const B=K.q.instance.prodigy.open.prefabMenu(Ei.l.DynamicStoreModal,void 0,!0,!0,!0,k);this.menus.push(B)}legacyStore(k){const B=new Vu(this.game,this.menuLayer,k);this.openMenu(B)}stylistStore(k,B,U,F){const G=new Vu(this.game,this.menuLayer,20,k,B,U,null,{0:k=>k},null,F,bi.$N.Door);this.openMenu(G)}houseStore(k,B,U){const F=new Vu(this.game,this.menuLayer,12,null,k,B,U,{},null);this.openMenu(F)}resultsMenu(k,B,U,F,G=!1,j,$=!0){const H=Si.c.instance.isPlayerQualified()&&k.filter((k=>k instanceof fa.R&&Si.c.instance.getEligiblePetIDs().includes(k.data.ID))).length>0?new Mc(this.game,this.menuLayer,k,B,U,F,G,j,$):new Pc.k(this.game,this.menuLayer,k,B,U,F,G,void 0,void 0,j,$);return this.openMenu(H),H}evolutionSummary(k,B,U){const F=new kc.K(this.game,this.menuLayer,k,B,U);return this.openMenu(F),F}spellSummary(k,B){const U=new Gc(this.game,this.menuLayer,k,B);return this.openMenu(U),U}heartSummary(k,B){const U=new Uc(this.game,this.menuLayer,k,B);return this.openMenu(U),U}statSummary(k,B){const U=new jc.H(this.game,this.menuLayer,k,B);return this.openMenu(U),U}bossRewards(k,B,U=Ei.l.BossRewardUI,F,G,j,$=!1,H=!0,V={},W){const q=new nd.v(this.game,this.menuLayer,K.q.instance.prodigy.gameContainer.get("d0e-64fd"),k,U,B,F,G,j,$,H,V,W);return this.openMenu(q),q}towerEntranceMenu(k,B,U){const F=new Vc(this.game,this.menuLayer,k,B,U);return this.openMenu(F),F}archiveEntranceMenu(k,B){const U=new Wh(this.game,this.menuLayer,k,B);return this.openMenu(U),U}dungeonPrizesMenu(k,B,U){const F=new Xh(this.game,this.menuLayer,k,B,U);return this.openMenu(F),F}dungeonExitMenu(k,B,U,F=!1,G,j){const $=new Qh(this.game,this.menuLayer,k,B,U,F,G,j);return this.openMenu($),$}towerExitMenu(k,B,U,F){const G=new Wc(this.game,this.menuLayer,k,B,U,F);return this.openMenu(G),G}keystonePedestals(k=null){const B=new vc(this.game,this.menuLayer,k);return this.openMenu(B),B}learningEfficacySkipPopup(k=null,B=null,U){const F=new gc(this.game,this.menuLayer,k,B,U);return this.openMenu(F),F}dailyQuestionsMenu(k=null,B=!1,U="click"){const F=new Yh(this.game,this.menuLayer,k,B,U);return this.openMenu(F),F}characterDialogue(k,B,U){let F=this.menuLayer;if(this.game.state.current===Ie.G.CoOp){const k=this.game.state.getCurrentState().battleLayers[vh.E.MenusLayer];F="legacyTransform"in k?k.legacyTransform.group:k}const G=new qh.a(this.game,F,k,B,U);return this.openMenu(G),G}fromFactory(k){this.openMenu(k())}showVideoPopup(k,B){const U=new Ml(this.game,this.menuLayer,k,B);return this.openMenu(U),U}optionsMenu(k){const B=this.prefabMenu(Ei.l.OptionsMenu,k,!1,!0,!0,void 0,void 0,!0,!0,jh.k.X);this.openMenu(B)}locationDialog(k,B,U){const F=new yc(this.game,this.menuLayer,k,B,U);return this.openMenu(F),F}academyTowerProgress(){return this.prefabMenu(Ei.l.AcademyTowerProgressHUD,null,!1,!1,!0)}parentAttachMenu(k,B,U,F){let G;switch(B){case jh.k.ParentGoalTrackerNotAttached:G=Ei.l.ParentGoalParentAttachModal;break;default:G=Ei.l.ParentAttachModal}return this.prefabMenu(G,k,null,!1,!0,F,{interfaceName:null!=U?U:ph.B.ParentAttach,interfaceType:bi.Wm.Modal,originID:B,originType:bi.$N.ButtonClick},!0,!1)}showFullScreenSpinner(){const k=K.q.instance.prodigy.gameContainer.get("PrefabService").getPrefabFromGuid(Ei.l.FullScreenSpinner);return K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromJSON(k)}battlePassFtue(){return(0,G.sH)(this,arguments,void 0,(function*(k=null,B=bi.$N.AutoSurfaced,U){const F=K.q.instance.prodigy.gameContainer.get("8dc-04eb"),G=yield F.getCurrentBattlePassData(),j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!G||j.isInBattle)return void(null==k||k());let $,H;if(U)H=U,$=U===ph.B.BattlePassSimpleFtueModal?Ei.l.BattlePassSimpleFtueModalWithoutClose:Ei.l.BattlePassComplexFtueModal;else{$=K.q.instance.prodigy.gameContainer.get("12f-4e29").isBreadcrumbComplete(ln.B.FEATURE_BATTLE_PASS,ln.B.BREADCRUMB_BATTLE_PASS_COMPLEX_FTUE_VIEWED)?Ei.l.BattlePassSimpleFtueModalWithoutClose:Ei.l.BattlePassComplexFtueModal}K.q.instance.prodigy.open.prefabMenu($,void 0,!0,!0,!0,{[tr.XU.CloseCallback]:k},{interfaceName:H,interfaceType:bi.Wm.Modal,originType:B},!0)}))}battlePassMembershipModal(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=K.q.instance.prodigy.gameContainer.get("8dc-04eb"),U=yield B.getCurrentBattlePassData(),F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;U&&!F.isInBattle&&K.q.instance.prodigy.open.prefabMenu(Ei.l.BattlePassMembershipModal,void 0,!0,!0,!0,{[tr.XU.ItemTierNumber]:k},{interfaceName:ph.B.BattlePassMembershipModal,interfaceType:bi.Wm.Modal,originType:bi.$N.ButtonClick,closeMethod:bi.Lv.X},!0)}))}dailyLoginCalendar(){return(0,G.sH)(this,void 0,void 0,(function*(){const k={interfaceName:"daily_login_calendar_main",interfaceType:bi.Wm.Window,originType:bi.$N.AutoSurfaced,instanceType:Ai.N.UI};return K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent(k),new Promise((k=>K.q.instance.prodigy.open.prefabMenu(Ei.l.ScreenDailyLoginCalendar,k)))}))}battlePassUltimateMemberUpsellModal(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=new j.bnh;if(k.isPlayingAtSchool())return this.membershipSchoolAd((()=>B.resolve())),B;const U=k.isInBattle,F=K.q.instance.prodigy.gameContainer.get("8dc-04eb"),G=yield F.getCurrentBattlePassData();if(k.isInBattle&&!U)return B.resolve(),B;const $=K.q.instance.prodigy.open.unifiedConversionFlow((()=>B.resolve()),{conversionFunnelName:Sn.o.FunnelBattlePassMemberUnlock,conversionStage:Sn.o.StageClickLockedItemBattlePass},bi.$N.AutoSurfaced);if(j.Aq$.isDefined($))return B;let H;H=G?Pt.pF.eligibleForMembershipPurchaseForMultipleTiers()?Ei.l.BattlePassUltraUpsell:Ei.l.BattlePassMobileUltraUpsell:Ei.l.BattlePassUltraUpsellOffSeason;const V=K.q.instance.prodigy.open.prefabMenu(H,(()=>B.resolve()),!0,!0,!0,{},{interfaceName:ph.B.BattlePassUltimateModal,interfaceType:bi.Wm.Modal,originType:bi.$N.ButtonClick,closeMethod:bi.Lv.CloseButton},!0);return V.isLoaded||(yield V.onPrefabLoaded.asPromise()),B}))}battlePassMenu(k,B,U,F,G,j){K.q.instance.prodigy.notifications.clearNotifications();let $=Ei.l.BattlePassMenuBar;Jo.D.isFeatureEnabled()&&($=Ei.l.RewardsFirstBattlePassMenuBar);const H=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return K.q.instance.prodigy.open.prefabMenu($,void 0,!0,!0,!0,{[tr.XU.CloseCallback]:()=>{K.q.instance.prodigy.notifications.removeQueuedNotificationOfType([F||Za._.BATTLEPASSQUESTGOALCOMPLETED]),null==U||U()},[tr.XU.ToasterNotificationId]:F,[tr.XU.FocusTierOverride]:G,[tr.XU.FocusTabOverride]:j,[tr.$u.CurrencyID]:27,[tr.$u.CurrencyAmount]:H.getCurrencyAmount(27)},{interfaceName:ph.B.BattlePassMenu,interfaceType:bi.Wm.Window,originType:B,originID:k,instanceType:Ai.N.UI,closeMethod:bi.Lv.X},!0)}lootDashMenu(k){K.q.instance.game.state.start(Ie.G.LootDashMenu,!0,k)}petMergeMenu(k,B,U){if(K.q.instance.prodigy.gameContainer.get("c47-20b6").petMerge.mergeSource=B,this.isMenuOpen(Ih))return this.menus.find((k=>k instanceof Ih));const F=new Ih(this.menuLayer,U,k);return this.openMenu(F),F}petMergeUpsellModal(k,B){return K.q.instance.prodigy.open.prefabMenu(k,void 0,!0,!0,!0,B,{interfaceName:ph.B.MembershipInfoAd,interfaceType:bi.Wm.Modal,originType:bi.$N.ButtonClick,closeMethod:bi.Lv.CloseButton},!0)}getTopmostConversionPrefabIndex(){let k=-1;for(let B=this.menus.length-1;B>=0;B--)if(this.menus[B]instanceof mh.y){const U=this.menus[B];if(this._conversionPrefabIds.includes(U.prefabID)){k=B;break}}return k}updateSentryTags(){this.updateSentryTag("menus")}updateSentryTag(k){const B=this[k];if(this[k].length>0){const U=B[B.length-1];let F=U.constructor.name;"PrefabMenu"===F&&(F=`${F}.${null==U?void 0:U.prefabID}`),Ko.setTag(k.substring(0,k.length-1),F)}else Ko.setTag(k.substring(0,k.length-1),void 0)}difficultySelector(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;const U=Ta.i.DIFFICULTY_MODE,F=K.q.instance.prodigy.gameContainer.get("db5-fb6e"),G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,j=(yield F.meetsRequirements(59))||!0===(null===(B=G.difficultyUnlocks)||void 0===B?void 0:B.hard),$={DIFFICULTY_SELECTOR_DATA:[{DIFFICULTY_MODE:ri.i.Regular,SELECTED_STATE:U===ri.i.Regular?Ph.Nx.Current:Ph.Nx.Select,MAX_LEVEL:hi.s.maxLevelConfig.regular,TITLE_COLOR:U===ri.i.Regular?Ph.TQ.RegularSelected:Ph.TQ.Unselected},{DIFFICULTY_MODE:ri.i.Hard,SELECTED_STATE:U===ri.i.Hard?Ph.Nx.Current:j?Ph.Nx.Select:Ph.Nx.Unlock,MAX_LEVEL:hi.s.maxLevelConfig.hard,TITLE_COLOR:U===ri.i.Hard?Ph.TQ.HardSelected:Ph.TQ.Unselected},{DIFFICULTY_MODE:ri.i.Expert,SELECTED_STATE:Ph.Nx.ComingSoon,MAX_LEVEL:hi.s.maxLevelConfig.expert,TITLE_COLOR:U===ri.i.Expert?Ph.TQ.ExpertSelected:Ph.TQ.Unselected}]};K.q.instance.prodigy.open.prefabMenu(Ei.l.DifficultySelectorScreen,k,!0,!1,!1,$)}))}difficultySelectorConfirmationModal(k,B){let U;const F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);switch(k){case ri.i.Regular:U={DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_HEADER_TEXT:F.getText(Ph.fs.RegularHeaderText),DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_BODY_TEXT:F.getText(Ph.fs.RegularBodyText)};break;case ri.i.Hard:U={DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_HEADER_TEXT:F.getText(Ph.fs.HardHeaderText),DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_BODY_TEXT:F.getText(Ph.fs.HardBodyText)};break;case ri.i.Expert:U={DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_HEADER_TEXT:F.getText(Ph.fs.ExpertHeaderText),DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_BODY_TEXT:F.getText(Ph.fs.ExpertBodyText)}}const G=K.q.instance.prodigy.gameContainer.get("ba4-af03");K.q.instance.prodigy.open.prefabMenu(Ei.l.DifficultySelectorConfirmationModal,void 0,!0,!1,!1,Object.assign(Object.assign({},U),{DIFFICULTY_MODE:k,OVERRIDE_CALLBACK:!!B,ON_CONFIRM_CALLBACK:B,UNLOCK_HARD_MODE_CALLBACK:G.unlockDifficultyMode.bind(G,ri.i.Hard),UNLOCK_EXPERT_MODE_CALLBACK:G.unlockDifficultyMode.bind(G,ri.i.Expert)}))}difficultyUnavailableConfirmationModal(k,B){const U=this._localizer.getText(Ph.fs.ZoneUnavailableForDifficultyText,k.getName()),F={DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_HEADER_TEXT:Ph.fs.RegularHeaderText,DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_BODY_TEXT:U};K.q.instance.prodigy.open.prefabMenu(Ei.l.DifficultySelectorConfirmationModal,void 0,!0,!1,!1,Object.assign(Object.assign({},F),{DIFFICULTY_UNAVAILABLE:!0,CONFIRM_GO_TO_CALLBACK:B}))}postBattleMembershipVideoMenu(k,B,U,F,G){const $=K.q.instance.prodigy.gameContainer.get("e20-0fb0");if(F&&(!$.loginCredentials.username||!$.loginCredentials.password)){const k=new Error(`[Post-Battle School Video] Failed to get player login details for username: ${$.loginCredentials.username}.`);Ko.captureException(k),j.RQr.logError(k,"Cannot display login details")}K.q.instance.prodigy.open.prefabMenu(Ei.l.PostBattleMembershipVideoMenu,G,!0,!1,!1,{[tr.Ut.VideoId]:k,[tr.Ut.VideoAtSchool]:F,[tr.Ut.SupportedResolutionIds]:null==B?void 0:B.supportedResolutionIds,[tr.Ut.SizeRatio]:null==U?void 0:U.sizeRatio,[tr.Ut.VideoInstanceType]:F?Ai.N.PlayAtHomeVideo:Ai.N.MembershipVideo,[tr.V8.LoginDetailsUsername]:$.loginCredentials.username,[tr.V8.LoginDetailsPassword]:$.loginCredentials.password})}genericVideoMenu(k){const B=Object.assign(Object.assign({},Wu.h.advanceToNextVideoAndGetInjectionData(k)),k.customInjectionMetadata);B?k.videoMenuGuid?K.q.instance.prodigy.open.prefabMenu({prefabID:k.videoMenuGuid,closeCallback:k.onClose,isModal:!1,injectablePropertiesDictionary:B}):j.VyI.log("[MenuFactory][genericVideoMenu] Cannot open generic video menu with no menu GUID provided.",j.$bb.Error):j.VyI.log(`[MenuFactory][genericVideoMenu] Failed to initialize video injection values for video menu with GUID ${k.videoMenuGuid}. Menu will not be opened.`,j.$bb.Error)}openWizardBank(k,B){var U;const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;K.q.instance.prodigy.open.prefabMenu({prefabID:Ei.l.WizardBankMenuModal,closeCallback:B,sendEvents:!0,sendCloseEvent:!1,interfaceEventProps:{interfaceName:ph.B.WizardBank,interfaceType:bi.Wm.Window,instanceType:Ai.N.UI,originType:k.originType,originID:k.originId},customEventProps:{all:{opened:{instance_id:rn.$.generateUID(),instance_version:null!==(U=Nh.E.get(F.getMemberTier()))&&void 0!==U?U:Xo.D.NonMember}}},injectablePropertiesDictionary:{WIZARD_BANK_ORIGIN_TYPE:k.originType}})}openMemberLockedGoldRiftModal(){const k=K.q.instance.prodigy.open.prefabMenu({prefabID:Ei.l.MemberLockedGoldRiftModal,sendEvents:!0,sendCloseEvent:!1,interfaceEventProps:{interfaceName:ph.B.EnterGoldRiftModal,interfaceType:bi.Wm.Modal,instanceType:Ai.N.RiftRun,originType:bi.$N.AutoSurfaced}});this.menus.push(k)}openWizardCostumesMenu(k=bi.$N.ButtonClick,B){if(this.isMenuOpen(xh.r))return;if(Lh.hD.ftuePopupLoading)return;if(!Lh.hD.isFtueFlowActive()&&Lh.hD.shouldShowFtue())return void this.openWizardCostumesFtuePopup(k,B);const U=K.q.instance.prodigy.open.prefabMenu({prefabID:Ei.l.WizardCostumesMenu,sendEvents:!0,sendCloseEvent:!1,interfaceEventProps:{interfaceName:ph.B.WizardCostumesMenu,interfaceType:bi.Wm.Menu,instanceType:Ai.N.Interface,originType:k,originID:B}});this.menus.push(U)}openWizardCostumesFtuePopup(k=bi.$N.ButtonClick,B){if(Lh.hD.ftuePopupLoading)return;const U=K.q.instance.prodigy.gameContainer.get("6e9-d1dd").getCostumesToDisplayForFtuePopup();U.length<=1?j.VyI.log("[MenuFactory][openWizardCostumesFtuePopup] Cannot set up wizard costumes FTUE popup with 1 or fewer costumes to display.",j.$bb.Error):(Lh.hD.ftuePopupLoading=!0,Lh.hD.initFtue(),Promise.all(U.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return le.t.secureGetItem("costume",k)}))))).then((U=>{var F;U.forEach((k=>{if(!k)throw new Error("A costume in wizard costumes FTUE popup cannot be null")}));const G=null!==(F=U.find((k=>{var B;return null===(B=null==k?void 0:k.data)||void 0===B?void 0:B.member})))&&void 0!==F?F:U[0];if(!G)throw new Error("Main featured costume in wizard costumes FTUE popup cannot be null");const j=U.filter((k=>!!(null==k?void 0:k.ID)&&(null==k?void 0:k.ID)!==(null==G?void 0:G.ID))).map((k=>({[tr.AP.ItemCardData]:{item:k,quantity:1},[tr.AP.ItemCardIsNew]:!0}))),$=K.q.instance.prodigy.open.prefabMenu({prefabID:Ei.l.WizardCostumesFTUEPopup,injectablePropertiesDictionary:{[tr.sv.FtueMainCostumeId]:null==G?void 0:G.ID,[tr.sv.FtueMainCostumeName]:Tn.J.getItemName(G),[tr.sv.FtueAdditionalCostumes]:j,[tr.sv.FtuePopupNextButtonCallback]:()=>this.openWizardCostumesMenu(k,B)}});this.menus.push($),Lh.hD.ftuePopupLoading=!1})).catch((k=>{Lh.hD.ftuePopupLoading=!1,j.RQr.logError(k,"MenuFactory.openWizardCostumesMenu: Failed to load costume items for FTUE popup")})))}isClosable(k){return j.Aq$.isDefined(k)&&"function"==typeof k.close}}var Zu,Ju=U(35997),tf=U(2212);!function(k){k.PIPPET_ENCOUNTER="state_pippet_encounter",k.PIPPET_REMATCH="state_pippet_rematch",k.PIPPET_DEFEATED="state_pippet_defeated"}(Zu||(Zu={}));class ef extends j.s3P{static get arePippetQuestEncountersEnabled(){return this._featureProvider.isOn("pippet-quest-encounters")}}(0,G.Cg)([(0,Re.b)("073-6f3b"),(0,G.Sn)("design:type",Object)],ef,"_featureProvider",void 0);class sf{constructor(k,B){this.canEvolve=!1,this.updateMainCreatureInformation(k,B)}updateMainCreatureInformation(k,B){var U,F,G,j,$,H,V;const W=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,q=B.totalNonMemberXp+(W.hasMembership()?B.memberXp:0),z=k.getLevel(),Y=hi.s.activePlayerLevelCap,Q=Rc.e.levelFromStars(k.getStars()+q,k.creatureType,Y);this.creature=k,this.originalCreature=k.createDataClone();const X=k.getBattleAssetSpecifier(),Z=le.t.getItem(X.type,X.id),tt=Object.assign(Object.assign({},k.data),{stats:null===(U=null==Z?void 0:Z.data)||void 0===U?void 0:U.stats,statGrowth:null===(F=null==Z?void 0:Z.data)||void 0===F?void 0:F.statGrowth});if(k.creatureType===yo.V.Player&&W.getChargedLevel()>0){const k=(null!==(G=W.data.chargedLevelData.newLevelData.levelsGained[0].level)&&void 0!==G?G:0)+z,B=W.getChargedLevel()+Q;this.statIncreases=Rc.e.getStatIncreasesFromLevelUps(tt,k,B)}else this.statIncreases=Rc.e.getStatIncreasesFromLevelUps(tt,z,Q);const et=k.diffAvailableSpellsV2(Q);this.unlockedSpellsDisplayInformation=et.map((k=>Fc.x.getUnlockedSpellDisplayInformation(k)));let it=k.currentMaxLevel;if(k instanceof fa.R){const B=null===($=null===(j=null==Z?void 0:Z.metadata)||void 0===j?void 0:j.assets)||void 0===$?void 0:$.default;this.spineGuid=(null==B?void 0:B.assetKey)?J.Q[B.assetKey]:`spine-${null==B?void 0:B.ID}`;const U=k.createDataClone();U.data.level=Q;const F=Q>=Eh.P8.getMaxOwnableLevel(k.getID(),k.data.mergeRank);if(Eh.P8.canPetEvolve(U,Q)&&F){const k=Eh.P8.findNextEvolution(Z),B=null===(V=null===(H=null==k?void 0:k.metadata)||void 0===H?void 0:H.assets)||void 0===V?void 0:V.default;this.canEvolve=!0,this.evolvedSpineGuid=(null==B?void 0:B.assetKey)?J.Q[B.assetKey]:`spine-${null==B?void 0:B.ID}`}it=Eh.P8.getMaxOwnableLevel(k.getID(),k.data.mergeRank)}this.creatureXpBarInformation=new Gu.r(k.getStars(),k.creatureType,B,Math.max(it,z))}}var nf=U(50508),af=U(98998);class rf{constructor(k){var B,U,F,G;const{creatures:j,barFillSpeed:$,battleRewards:H,nootTipBattleInfo:V,battleType:W}=k;this.rewards=null!==(B=H.rewards)&&void 0!==B?B:[],this.memberRewards=null!==(U=H.memberRewards)&&void 0!==U?U:[],this.xpGained=H.xpGained,this.creatures=j,this.barFillSpeed=$,this.battleType=W,this.rescuablePets=null!==(F=H.rescuablePets)&&void 0!==F?F:[],this.nootTipBattleInfo=V,this.magicoinRewardGranted=null!==(G=H.magicoinRewardGranted)&&void 0!==G&&G,this.magicoinRewardGranted&&(this.rewards=this.rewards.filter((k=>"currency"===k.type&&27===k.ID)),this.memberRewards=this.memberRewards.filter((k=>"currency"===k.type&&27===k.ID))),this.combineCoinRewards(),this._player=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,this._pbfSegment=K.q.instance.prodigy.gameContainer.get("c47-20b6").postBattleFlow,this._starController=new af.b,this.savePostBattleFlowInformation(this.magicoinRewardGranted)}getBattleId(){var k;return null===(k=this._pbfSegment)||void 0===k?void 0:k.getBattleId()}combineCoinRewards(){var k;const B={N:0,type:"gold"},U=[];for(const F of this.rewards)if("gold"===(null==F?void 0:F.type)){const U=F;(null==U?void 0:U.N)&&(B.N+=null!==(k=null==U?void 0:U.N)&&void 0!==k?k:0)}else U.push(F);B.N>0&&(U.push(B),this.rewards=U)}savePostBattleFlowInformation(k){this.awardXp(this.xpGained),k||(this.addNonMemberRewardsToInventory(),this._player.hasMembership()&&this.addMemberRewardsToInventory()),this.saveCharacterData(),this.updateSecureRewards().catch(j.RQr.createHandler("Failed to update client with secure rewards"))}updateSecureRewards(){return(0,G.sH)(this,void 0,void 0,(function*(){(this._player.hasMembership()?this.rewards.concat(this.memberRewards):this.rewards).filter((k=>k.isSecure)).some((k=>nf.p.includes(k.type)))&&(yield K.q.instance.prodigy.gameContainer.get("d69-defe").refreshPetGear()),this._pbfSegment.flushSecureRewards()}))}saveMemberStarsToJar(){this.applyMemberStarsToJar(this.xpGained,this.creatures.length),this.saveCharacterData()}saveCharacterData(){this._player.forceSaveCharacter()}awardXp(k){const B=k.totalNonMemberXp+(this._player.hasMembership()?k.memberXp:0);let U=0;for(const F of this.creatures){let k=hi.s.activePlayerLevelCap;F.creature instanceof fa.R&&(k=Eh.P8.getMaxOwnableLevel(F.creature.getID(),F.creature.data.mergeRank),F.creature.currentMaxLevel=k),F.originalCreature=F.creature.createDataClone(),F.creature.addStars(B);const G=K.q.instance.prodigy.gameContainer.get("c47-20b6");G.playerProgression.sendPlayerProgressionPointsEarnedEvent({pointType:"stars",pointCount:Math.min(B,F.creature.getStarsToMaxLevel()),progressionType:F.creature.creatureType===yo.V.Player?"Player Stars":"Pet Level",creatureName:F.creature.creatureType},{instanceID:G.postBattleFlow.getBattleId(),instanceType:Ai.N.EndOfBattle}),F.creature.getLevel()new sf(k,G.xpGained)));K.q.instance.prodigy.gameContainer.get("c47-20b6").postBattleFlow.init();const V=new rf({creatures:H,barFillSpeed:rf.DEFAULT_BAR_FILL_SPEED,battleRewards:G,nootTipBattleInfo:$,battleType:F}),W={},q=V.creatures[0].creatureXpBarInformation;return W[tr.uo.PostBattleFlowData]=V,W[tr.uo.PostBattleFlowVictory]=U,W[tr.uo.PostBattleFlowBattleType]=F,W[tr.uo.PostBattleFlowWizardWillLevelUp]=q.levels.length>1,W[tr.uo.PostBattleFlowWizardEndLevel]=q.levels[q.levels.length-1],W[tr.uo.PostBattleFlowRewardsScalingInfo]=G.rewardsScalingInfo,tf.J.shouldShowHardModePbfBannerWarning()?W[tr.uo.PostBattleFlowXpWarningLocalizedTextId]="CAMPAIGN_REPLAY_PBF_LEVEL_100_WARNING":hf.R.shouldShowRewardsScalingWarning(G.rewardsScalingInfo)&&(W[tr.uo.PostBattleFlowXpWarningLocalizedTextId]="POST_BATTLE_FLOW_REWARDS_SCALED"),Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this.prefabLoader,Ei.l.PostBattleFlowBase,W).then((k=>{j.wa5.getActiveScene().addGameObject(k.parent)})).catch(j.RQr.createHandler("Error loading Post Battle Flow Base prefab."))}addPrefabNPC(k,B,U,F,$){return(0,G.sH)(this,arguments,void 0,(function*(k,B,U,F,G,$={}){return Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this.prefabLoader,k,$).then((k=>{var $;if(k.transform.setPosition(B,U),F){const B=k.findComponentInChildren(j.v2j);B&&(B.GameObject.transform.localScale.x*=-1)}if(G){const B=k.findComponent(_r.B).getRootContainer();B.alpha=0,null===($=this.game.add.tween(B,this))||void 0===$||$.to({alpha:1},800,j.GS3.Quadratic.In,!0)}}))}))}addWizard(k,B,U,F,$,H){return(0,G.sH)(this,void 0,void 0,(function*(){const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer;return G.playerPrefab||(yield new Promise((k=>G.onFullyLoaded.add(k)))),Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.LegacyMapWizardEncounter,{EncounterMap:k,EncounterSpawnId:F,EncounterAssetId:$,EncounterScale:H?[-1,1]:[1,1],EncounterSpawnPosition:new j.I9Y(B,U)}).then((k=>{k.transform.setPosition(B,U),k.findComponent(j.y4o).getRootContainer().position.set(B,U),k.findComponentInChildren(cf.I).MoveTarget=new j.I9Y(B,U)}))}))}addMonster(k,B,U,F,$){return(0,G.sH)(this,void 0,void 0,(function*(){const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer;return G.playerPrefab||(yield new Promise((k=>G.OnLoad.add(k)))),Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.LegacyMapSpawnPoint,{EncounterMap:k,EncounterSpawnId:F,EncounterSpawnPosition:new j.I9Y(B,U),EncounterOverrideMods:$}).then((k=>{var F;null===(F=k.findComponentInChildren(df.d))||void 0===F||F.GameObject.setLayer(void 0,!0),k.transform.setPosition(B,U),k.findComponent(j.y4o).getRootContainer().position.set(B,U),k.findComponentInChildren(cf.I).MoveTarget=new j.I9Y(B,U)}))}))}loadPippetQuestEncounterData(k){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.assetLoader.loadAssets([k]);return K.q.instance.game.cache.getJSON(k).pippetQuestEncounter}))}createPippetQuestEncounter(k,B,U,F,$){return(0,G.sH)(this,void 0,void 0,(function*(){var G,H,V,W;const q=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,z=k.getMap(K.q.instance.prodigy.world.getCurrentMapTag()),Y=yield this.loadPippetQuestEncounterData(U),Q=j.wa5.getActiveScene().container.get("IS_PREFAB_MAP");return Q||(null===(G=q.playerContainer)||void 0===G?void 0:G.playerPrefab)||(yield null===(H=q.playerContainer)||void 0===H?void 0:H.OnLoad.asPromise()),Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.PippetQuestEncounterCutscene,{EncounterBattleMods:Object.assign({level:q.getLevel(),onEnd:z.zoneName,screen:z.battleBG,onFaint:z.zone.defaultOnFaint},Y),FsmId:B,BenchPet1:Eh.P8.getPetSpineId(null===(V=null==Y?void 0:Y.pets[0])||void 0===V?void 0:V.ID),BenchPet2:Eh.P8.getPetSpineId(null===(W=null==Y?void 0:Y.pets[1])||void 0===W?void 0:W.ID),ForceLegacyPathfinding:!Q}).then((B=>{var U,G,H,V,W;const z=B.findComponentInChildren(pf.u),Y=B.findComponentInChildren(Ju.k),X=k.bgmID;k.getState(Zu.PIPPET_ENCOUNTER)||(k.bgmID=12),z.onComplete.addOnce((()=>{k.getState(Zu.PIPPET_ENCOUNTER)?k.getState(Zu.PIPPET_REMATCH)&&(k.setState(Zu.PIPPET_DEFEATED,!0),null==$||$()):(k.setState(Zu.PIPPET_ENCOUNTER,!0),Y.startBattle())})),z.onStart.addOnce((()=>{k.getState(Zu.PIPPET_REMATCH)&&(null==F||F())}));const Z=null!==(G=null===(U=K.q.instance.prodigy.world.getCurrentMapObject())||void 0===U?void 0:U.getDefaultSpawnPosition())&&void 0!==G?G:{x:of.R.BG_HALF_WIDTH,y:of.R.BG_HALF_HEIGHT};let J;const tt=Q?null===(V=null===(H=j.wa5.getActiveScene().container.get("MainPlayerGameObject"))||void 0===H?void 0:H.transform)||void 0===V?void 0:V.worldPosition:null===(W=q.playerContainer)||void 0===W?void 0:W.position;Y.onBattleStart.addOnce((()=>{J=null!=tt?tt:Z})),Y.onVictory.addOnce((()=>{k.setState(Zu.PIPPET_REMATCH,!0),k.bgmID=X,K.q.instance.prodigy.world.it(K.q.instance.prodigy.world.getCurrentMap(),J.x,J.y)})),Y.onDefeat.addOnce((()=>{K.q.instance.prodigy.world.teleportToCurrentMap(),k.bgmID=X})),z.fsmVariables.zone=k.ID,z.run()})).catch(j.RQr.createHandler("Could not load Pippet Quest Encounter cutscene"))}))}createItemCard(k,B,U,F,j,$){return(0,G.sH)(this,void 0,void 0,(function*(){return Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.ItemCard,{[tr.Tl.Data]:Object.assign(Object.assign({},F),{receivedThroughGotItemFlow:j===Lr.s.GotItem})}).then((F=>{if(k.destroyed)return F.destroy(),F;F.findComponent(_r.B).getRootContainer().setParent(k);const G=F.transform;if(G){const F=G.sizeDelta.getHalfWidth(),j=G.sizeDelta.getHalfHeight();G.setAnchoredPivotOffset(k.getGlobalPosition().x+F+B,k.getGlobalPosition().y+j+U)}if($){F.findComponentInChildren(Bl.n).onClicked.add($,this)}return F}))}))}createIFrame(k,B){return(0,G.sH)(this,arguments,void 0,(function*(k,B,U=Ei.l.IFrameModal){return(yield Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),U,{[tr.n7.IFrameSource]:k,[tr.n7.IFrameClosePostMessage]:B})).findComponent(lf.w)}))}createTooltip(k,B,U){var F,G,$;k.IsActiveInHierarchy||j.VyI.log("PrefabFactory: Tooltip will not display because it was attached to an inactive transform.",j.$bb.Warning);const H=Object.assign(Object.assign({},uf.f),U),V=K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromGUID(Ei.l.SpawnableTooltip_RectTransform,k.GameObject);H.layer&&V.setLayer(H.layer,!0);const W=V.findComponentInChildren(bf);if(W.setArrowAnchor(H.arrowAnchor,H.tooltipAnchor,H.arrowDirection),W.setLocalizationText(B,H.titleKey,H.textArgs,H.titleArgs),W.setupButtons(null===(F=H.useCloseButton)||void 0===F||F,null!==(G=H.useGoButton)&&void 0!==G&&G,H.goButtonCTA),H.offset&&W.setOffset(H.offset),H.iconGUID&&W.setIcon(H.iconGUID,H.useIconText),H.resizeToContainer&&k instanceof j.XVE){const B=k.sizeDelta;W.setSize(B.width,B.height)}return this._tooltips.push(W),W.OnDestroy.add((()=>this._tooltips.splice(this._tooltips.indexOf(W),1)),this),null===($=k.GameObject)||void 0===$||$.addChild(V),V}tooltipsActive(){return this._tooltips.length>0}closeAllTooltips(){this._tooltips.forEach((k=>{k.GameObject.destroyDeferred()}))}}var gf=U(20705);class mf{get sentrySpan(){return this._sentrySpan}constructor(k,B){this._sentrySpan=null,this.onFinish=new j.HN0,this._parent=k,this._config=B,this._pageBackgroundTime={totalPageTimeMs:0,activeTrackedPageTimeMs:void 0},this._pageForegroundTime={totalPageTimeMs:0,activeTrackedPageTimeMs:void 0}}init(){return this._config?this._sentrySpan?(j.VyI.log("Unable to initialize SentryGameTrace because we have initialized already",j.$bb.Error),!1):(this._sentrySpan=Ko.startSpanManual(this.createSpanOptions(),(k=>k)),this._parent&&this._parent.onFinish.addOnce(this.finish,this),!0):(j.VyI.log("Unable to initialize SentryGameTrace because the config is null",j.$bb.Error),!1)}isActive(){return!!this._sentrySpan&&this._sentrySpan.isRecording()}finish(){var k;this._sentrySpan&&(this.assignTimeTrackerDataToSpan(this._pageBackgroundTime,"out_of_window_page_time"),this.assignTimeTrackerDataToSpan(this._pageForegroundTime,"in_window_page_time"),this._sentrySpan.end()),this._sentrySpan=null,null===(k=this._parent)||void 0===k||k.onFinish.removeAll(this),this._parent=null,this.onFinish.dispatch(),this.onFinish.dispose()}setExtraData(k){var B;null===(B=this._sentrySpan)||void 0===B||B.setAttributes(k)}onGameHidden(){this.startTimeTrack(this._pageBackgroundTime),this.endTimeTrack(this._pageForegroundTime)}onGameVisible(){this.startTimeTrack(this._pageForegroundTime),this.endTimeTrack(this._pageBackgroundTime)}startTimeTrack(k){k.activeTrackedPageTimeMs||(k.activeTrackedPageTimeMs=window.performance.now())}endTimeTrack(k){if(!k.activeTrackedPageTimeMs)return;const B=window.performance.now()-k.activeTrackedPageTimeMs;k.totalPageTimeMs+=B,k.activeTrackedPageTimeMs=void 0}assignTimeTrackerDataToSpan(k,B){this.endTimeTrack(k);let U=k.totalPageTimeMs,F="ms";k.totalPageTimeMs>36e5?(U=k.totalPageTimeMs/36e5,F="hrs"):k.totalPageTimeMs>6e4?(U=k.totalPageTimeMs/6e4,F="mins"):k.totalPageTimeMs>1e3&&(U=k.totalPageTimeMs/1e3,F="s"),this._sentrySpan.setAttribute(B,`${U.toFixed(3)} ${F}`),this._sentrySpan.setAttribute(`${B}_in_ms`,k.totalPageTimeMs)}}class yf extends mf{createSpanOptions(){var k;return{op:this._config.operationName,name:this._config.description,parentSpan:null===(k=this._parent)||void 0===k?void 0:k.sentrySpan}}}class _f extends mf{createSpanOptions(){return{op:this._config.operationName,name:this._config.description,forceTransaction:!0}}}class Ef extends yf{constructor(){super(...arguments),this._spanList=new Map}startAssetTrace(k){if(this._spanList.get(k))return;const B={op:`${this._config.operationName}.${fu.u.SingleAssetLoading}`,name:k,parentSpan:this._sentrySpan,attributes:{guid:k}},U=Ko.startSpanManual(B,(k=>k));this._spanList.set(k,U)}endAssetTrace(k,B){const U=this._spanList.get(k);U&&(B&&U.setAttributes(B),U.end(),this._spanList.delete(k))}finish(){for(const k of this._spanList.values())k.isRecording()&&k.setAttribute("failure",!0),k.end();this._spanList.clear(),super.finish()}isActive(){if(super.isActive())return!0;for(const k of this._spanList.values())if(k.isRecording())return!0;return!1}}class wf extends _f{init(){if(this._config.activeTags){const k=Ko.getGlobalScope(),B=k.getScopeData(),U=this._config.activeTags;this._previousTags={};for(const F in U)this._previousTags[F]=null==B?void 0:B.tags[F];k.setTags(U)}return super.init()}finish(){super.finish();const k=Ko.getGlobalScope();this._previousTags&&k.setTags(this._previousTags),this._config.endingTags&&k.setTags(this._config.endingTags)}}class Tf{constructor(k){this._database=new Map,this._manager=k,this.init()}createTrace(k){var B;const U=this._database.get(k);if(!U)return j.VyI.log(`Unable to create sentry tracing object because the key ${k} does not have a configuration`,j.$bb.Error),null;const F=this._manager.retrieveSpan(U.parent);return this.createInternal(null!==(B=U.objectType)&&void 0!==B?B:yf,F,U)}createInternal(k,B,U){return new k(B,U)}init(){const k=[{objectType:_f,operationName:fu.u.Boot,description:"Game Boot Process"},{operationName:fu.u.BootFeatureFlags,description:"Loading feature flags",parent:fu.u.Boot},{operationName:fu.u.BootGameData,description:"Loading game data",parent:fu.u.Boot},{operationName:fu.u.BootFeatureRevision,description:"Loading feature revisions",parent:fu.u.Boot},{operationName:fu.u.BootAssets,description:"Loading assets",parent:fu.u.Boot},{operationName:fu.u.BootLocalization,description:"Loading localization data",parent:fu.u.Boot},{operationName:fu.u.BootRebuildGUID,description:"Restructuring the GUID",parent:fu.u.Boot},{operationName:fu.u.BootStartNextState,description:"Getting data ready for the next state",parent:fu.u.Boot},{operationName:fu.u.Splash,objectType:_f,description:"Game Splash Screen Process"},{operationName:fu.u.SplashCreate,description:"On the splash state create",parent:fu.u.Splash},{operationName:fu.u.SplashLoadGame,description:"Loading user info and game data",parent:fu.u.Splash},{operationName:fu.u.SplashLoadQI,description:"Loading QI",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashLoadQIEducationStatus,description:"Fetching education status",parent:fu.u.SplashLoadQI},{operationName:fu.u.SplashLoadQILoadQuestion,description:"Loading the question renderer",parent:fu.u.SplashLoadQI},{operationName:fu.u.SplashLoadQILoadQuestionInterface,description:"Loading question interface",parent:fu.u.SplashLoadQI},{operationName:fu.u.SplashTitans,description:"Getting the Titans",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashLogin,description:"User Login",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashIapInit,description:"Initializing IAP",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashUpdateFeatureAccess,description:"Updating Feature Access",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashCharacter,description:"Loading Character Data",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashFetchEndGameQuestData,description:"Fetching End Game Quest Data",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashInitFeatureProvider,description:"Initialize Feature Provider",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashSetupFeatureProvider,description:"Setting Up Feature Provider",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashEducation,description:"Loading Education Data",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashParentalConsentService,description:"Initializing parental consent service",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashSegment,description:"Initializing Segment Analytics",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashWorldList,description:"Loading World List",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashRegistrationMenu,description:"Entering registration menu",parent:fu.u.Splash},{operationName:fu.u.SplashPlayerEducationInit,description:"Initialize player's education data",parent:fu.u.Splash},{operationName:fu.u.SplashPrefabRequest,description:"Requesting Prefabs",parent:fu.u.Splash},{operationName:fu.u.PrefabLoaderScene,objectType:_f,description:"Prefab scene initialization"},{operationName:fu.u.PrefabLoaderSceneAssetPreload,description:"Preloading Assets for Prefabs",parent:fu.u.PrefabLoaderScene},{operationName:fu.u.PrefabLoaderScenePrefabLoading,objectType:Ef,description:"Loading Prefab Objects",parent:fu.u.PrefabLoaderScene},{operationName:fu.u.PrefabLoaderSceneConsentBanner,description:"Initializing Consent Banner",parent:fu.u.PrefabLoaderScene},{operationName:fu.u.ServerMenuSelection,objectType:_f,description:"World Selection Process"},{operationName:fu.u.ServerMenuConnect,description:"Connecting to Server",parent:fu.u.ServerMenuSelection},{operationName:fu.u.ServerMenuShowAllServers,description:"Loading All Servers",parent:fu.u.ServerMenuSelection},{operationName:fu.u.ServerMenuSuggestedServers,description:"Loading Suggested Servers",parent:fu.u.ServerMenuSelection},{operationName:fu.u.World,objectType:wf,description:"Enter world",activeTags:{state:"loading"},endingTags:{state:"ingame"}},{operationName:fu.u.WorldRemotePlayerSpawnLimiterInit,description:"Init remote player spawn limiter",parent:fu.u.World},{operationName:fu.u.WorldSynapseMultiplayerServiceConnection,description:"Connecting to a multiplayer service",parent:fu.u.World},{operationName:fu.u.WorldNetworkHandlerEnterWorld,description:"Connecting to a world server",parent:fu.u.World},{operationName:fu.u.WorldInitProgressDataManager,description:"Progress data manager init",parent:fu.u.World},{operationName:fu.u.WorldSynchedRiftDataInit,description:"Synched rift data init",parent:fu.u.World},{operationName:fu.u.WorldDynamicStoreQuestManagerSetup,description:"Dynamic store quest manager setup",parent:fu.u.World},{operationName:fu.u.WorldHudDataInit,description:"Hud data init",parent:fu.u.World},{operationName:fu.u.WorldSegmentAnalyticsSetup,description:"Quest manager hub setup",parent:fu.u.World},{operationName:fu.u.WorldElementalBoostCache,description:"Elemental boost caching",parent:fu.u.World},{operationName:fu.u.WorldPippetEncounterInit,description:"Pippet encounter init",parent:fu.u.World},{operationName:fu.u.WorldGetTowerData,description:"Tower data retrieval",parent:fu.u.World},{operationName:fu.u.WorldInitTowerData,description:"Tower data init",parent:fu.u.World},{operationName:fu.u.WorldJoinActiveQuiz,description:"Join active quiz",parent:fu.u.World},{operationName:fu.u.WorldPlayerGoalsInit,description:"Player goals init",parent:fu.u.World},{operationName:fu.u.WorldEnterMap,description:"Map enter",parent:fu.u.World},{operationName:fu.u.WorldSegmentedOffersDataInit,description:"Segmented offers data init",parent:fu.u.World},{operationName:fu.u.WorldFeaturedSpawnDataInit,description:"Featured spawn data init",parent:fu.u.World},{operationName:fu.u.WorldWizardCostumeDataInit,description:"Wizard costume data init",parent:fu.u.World},{operationName:fu.u.LoadingState,objectType:_f,description:"Loading state"},{operationName:fu.u.LoadingStateAssetsLoad,description:"Loading state assets load",parent:fu.u.LoadingState},{operationName:fu.u.LoadingStateAdditionalLoadPromise,objectType:_f,description:"Await additional load task"},{operationName:fu.u.QuestManagerHubSetup,objectType:_f,description:"Quest manager hub setup"}];for(const B of k)this._database.set(B.operationName,B);k.length=0}}let Sf=class{constructor(){this._spanCache=new Map,this._factory=new Tf(this),this._onChange=()=>{this.visibilityChange()},document.addEventListener("visibilitychange",this._onChange,!1)}visibilityChange(){const k=this.isGameHidden();this._spanCache.forEach((B=>{k?null==B||B.onGameHidden():null==B||B.onGameVisible()}))}isGameHidden(){return"hidden"===document.visibilityState}startTracing(k){if(!k)return j.VyI.log("In order to create an entry tracker, the operation name is required",j.$bb.Error),null;const B=this._spanCache.get(k);if(B)return B;const U=this._factory.createTrace(k);return U&&U.init()?(this._spanCache.set(k,U),this.isGameHidden()?U.onGameHidden():U.onGameVisible(),U):null}endTracing(k,B){if(!k)return;const U=this.retrieveSpan(k);U?(B&&U.setExtraData(B),U.finish(),this.cleanDeadSpans()):this.cleanDeadSpans()}retrieveSpan(k){if(k)return this._spanCache.get(k)}cleanDeadSpans(){this._spanCache.forEach(((k,B)=>{(null==k?void 0:k.isActive())||this._spanCache.delete(B)}))}assignExtraDataToTrace(k,B){if(!B)return;const U=this.retrieveSpan(k);U&&U.setExtraData(B)}};Sf=(0,G.Cg)([(0,tt.injectable)(),(0,G.Sn)("design:paramtypes",[])],Sf);var Af=U(72042),Cf=U(48813),Of=U(1717);let If=class{constructor(){this.unhandledRequirement={meetsRequirement:()=>(0,G.sH)(this,void 0,void 0,(function*(){return!0}))}}meetsRequirements(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U;const F="object"==typeof k?k:null===(B=this.getFeatureRequirementAsset(k))||void 0===B?void 0:B.data;if(!(null==F?void 0:F.requirements))return this.logError("No data was found for Feature Requirement"+("number"==typeof k?` of asset ID ${k}`:"")),!1;if(0===F.requirements.length)return!0;const j=null!==(U=null==F?void 0:F.evaluationStrategy)&&void 0!==U?U:Of.u.RequireAny,$=yield Promise.all(F.requirements.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return(yield Promise.all(Object.entries(k).map((k=>(0,G.sH)(this,[k],void 0,(function*([k,B]){var U;const F=null!==(U=this.requirementChecks[k])&&void 0!==U?U:this.unhandledRequirement;return F===this.unhandledRequirement&&this.logWarning(`No requirement check implemented for key: ${k}`),F.meetsRequirement(B)})))))).every((k=>!0===k))})))));switch(j){case Of.u.RequireNone:return $.every((k=>!1===k));case Of.u.RequireAll:return $.every((k=>!0===k));case Of.u.RequireAny:default:return $.includes(!0)}}))}};If=(0,G.Cg)([(0,Q.injectable)()],If);var Df=U(57070);class Rf extends Df.w{getCurrentValue(){var k;const B=null!==(k=this.activePlayer.data.startDate)&&void 0!==k?k:0;return 2.7777777777777776e-7*(Date.now()-B)}meetsRequirement(k){return this.getCurrentValue()>=k}getCurrentProgress(k){return[this.getCurrentValue(),k]}}var Pf=U(28344);const Mf=[{isEnabled:()=>(0,Dt.G)(Pf.y).enabled,getOverrideMap:()=>{var k;const B=(0,Dt.G)(Pf.y);return B.enabled&&null!==(k=B.requirementOverrides)&&void 0!==k?k:{}}}];class Nf extends Df.w{getCurrentValue(){const k=this.activePlayer.data,B=Vt.s.get("GameConstants.Features.SplitTests.CHARACTER_CREATION_TIME");let U=0;return B>0?U=B:j.Aq$.isDefined(k.startDate)&&(U=k.startDate),U}getCurrentProgress(k){return[this.getCurrentValue(),{after:j.Aq$.isDefined(k.after)?k.after:0,before:j.Aq$.isDefined(k.before)?k.before:Vt.s.MAX_SAFE_INTEGER}]}meetsRequirement(k){const B=this.getCurrentValue();return j.Aq$.isDefined(k.after)||(k.after=0),j.Aq$.isDefined(k.before)||(k.before=Vt.s.MAX_SAFE_INTEGER),B>=k.after&&B=k}getCurrentProgress(k){return[this.getCurrentValue(),k]}}class kf extends Df.w{getCurrentValue(){return this.activePlayer.getPlayerData().zone}meetsRequirement(k){return this.getCurrentValue()===k}getCurrentProgress(k){return[this.getCurrentValue(),k]}}class Bf extends Df.w{getCurrentValue(k){const B={};return Object.keys(k).forEach((k=>{var U;B[k]=j.o5U[k]?j.o5U[k]():null===(U=Pt.pF[k])||void 0===U?void 0:U.call(Pt.pF)})),B}meetsRequirement(k){const B=Object.keys(k).find((k=>"function"!=typeof j.o5U[k]&&"function"!=typeof Pt.pF[k]));Q.Util.isDefined(B)&&j.VyI.log(`Incorrect DeviceRequirement configuration; Device.${B} is not a valid method.`,j.$bb.Warning);const U=this.getCurrentValue(k);return Object.keys(k).every((B=>U[B]===k[B]))}getCurrentProgress(k){return[this.getCurrentValue(k),k]}}class Uf extends Df.w{getCurrentValue(){return this.activePlayer.highestDifficultyUnlocked}meetsRequirement(k){var B;return!!(null===(B=this.activePlayer.difficultyUnlocks)||void 0===B?void 0:B[k])}getCurrentProgress(k){return[this.getCurrentValue(),k]}}class Ff extends Df.w{getCurrentValue(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U;const F=Ot.s.STORE_QUEST_ID,G=yield this._dynamicStoreQuestManager.getRawQuestProgress(F);if(!(null==G?void 0:G.tasks))return 0;const j=G.tasks.find((B=>B.id===k.id));return j?null!==(U=null===(B=j.data)||void 0===B?void 0:B.timesCompleted)&&void 0!==U?U:j.status===ns.t.COMPLETE?1:0:0}))}meetsRequirement(k){return(0,G.sH)(this,void 0,void 0,(function*(){return(yield this.getCurrentValue(k))>=k.purchaseCount}))}getCurrentProgress(k){return j.VyI.log("[DynamicStoreItemPurchaseCountRequirement] getCurrentProgress is not implemented for this requirement type.",j.$bb.Error),[0,k.purchaseCount]}}(0,G.Cg)([(0,Re.b)("7a1-ff33"),(0,G.Sn)("design:type",Ot.s)],Ff.prototype,"_dynamicStoreQuestManager",void 0);class Gf extends Df.w{getCurrentValue(k){try{return ti.U.isStepComplete(k)}catch(e){return!1}}meetsRequirement(k){return this.getCurrentValue(k)}getCurrentProgress(k){return[this.getCurrentValue(k),!0]}}var jf=U(86824);class $f extends Df.w{getCurrentValue(k){return j.Aq$.isDefined(k.override)?k.override:jf.e.areRequirementsMet(k)}meetsRequirement(k){return this.getCurrentValue(k)}getCurrentProgress(k){return[this.getCurrentValue(k),!0]}}class Hf extends Df.w{getCurrentValue(k){return K.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue(k,!1)}meetsRequirement(k){return this.getCurrentValue(k)}getCurrentProgress(k){return[this.getCurrentValue(k),!0]}}class Vf extends Df.w{getCurrentValue(){return K.q.instance.prodigy.friendsListNetworkHandler.friendsList.length}meetsRequirement(k){return this.getCurrentValue()>=k}getCurrentProgress(k){return[this.getCurrentValue(),k]}}class Wf extends Df.w{constructor(k){super(k),K.q.instance.prodigy.gameContainer.get("fab-547a").getData().then((([,k])=>this._data=k)).catch(j.RQr.createHandler("An error occurred while fetching geolocation data."))}getCurrentValue(){return this._data}meetsRequirement(k){var B,U,F;const G=this.getCurrentValue();return!!G&&(null!==(B=k.deny)&&void 0!==B?B:[]).every((k=>!this.isoDoesMatch(k)))&&(null!==(U=k.allow)&&void 0!==U?U:[null===(F=G.country)||void 0===F?void 0:F.iso_code]).some((k=>this.isoDoesMatch(k)))}getCurrentProgress(k){return[this.getCurrentValue(),k]}isoDoesMatch(k){var B,U,F,G;if(!k)return!1;const[j,$]=k.split("-");return j===(null!==(U=null===(B=this._data.country)||void 0===B?void 0:B.iso_code)&&void 0!==U&&U)&&(!$||null!==(G=null===(F=this._data.subdivisions)||void 0===F?void 0:F.some((k=>k.iso_code===$)))&&void 0!==G&&G)}}class qf extends Df.w{getCurrentValue(){return this.activePlayer.hasValidatedParentEmail()}meetsRequirement(k){return this.getCurrentValue()===k}getCurrentProgress(k){return[this.getCurrentValue(),k]}}class Kf extends Df.w{getCurrentValue(){return this.activePlayer.hasValidatedTeacherEmail()}meetsRequirement(k){return this.getCurrentValue()===k}getCurrentProgress(k){return[this.getCurrentValue(),k]}}class zf extends Df.w{getCurrentValue(k){const B={};for(let U=0;UH)return!1}return!0}getCurrentProgress(k){return[this.getCurrentValue(k),k]}}var Yf=U(56735);class Qf extends Df.w{getCurrentValue(k){return K.q.instance.prodigy.world.getZone(k.zone).getQuestState()}meetsRequirement(k){var B,U;const F=K.q.instance.prodigy.world.getZone(k.zone);if(!F)return j.VyI.log(`Invalid Zone ${F} in quest requirement. The requirement is assumed to not have been met.`,j.$bb.Warning),!1;if(!j.Aq$.isDefined(k.questId)||"number"!=typeof k.questId)return j.VyI.log(`Invalid questId ${k.questId} in quest requirement. The requirement is assumed to not have been met.`,j.$bb.Warning),!1;const G=this.getCurrentValue(k),$=null!==(B=null==G?void 0:G.ID)&&void 0!==B?B:0,H=null!==(U=null==G?void 0:G.seq)&&void 0!==U?U:0;return j.Aq$.isDefined(k.questSequence)?"started"===k.questStatus?$>=k.questId&&H>=k.questSequence:$>=k.questId&&H>k.questSequence:"started"===k.questStatus?$>=k.questId:$>k.questId}getCurrentProgress(k){return[this.getCurrentValue(k),k]}}class Xf extends Df.w{getCurrentValue(){return this.activePlayer.getLevel()}meetsRequirement(k){return this.getCurrentValue()>=k}getCurrentProgress(k){return[this.getCurrentValue(),k]}}class Zf extends Df.w{getCurrentValue(){return Wd.O.localeCode}meetsRequirement(k){var B,U;const F=this.getCurrentValue();return(null!==(B=k.deny)&&void 0!==B?B:[]).every((k=>k!==F))&&(null!==(U=k.allow)&&void 0!==U?U:[F]).some((k=>k===F))}getCurrentProgress(k){return[this.getCurrentValue(),k]}}class Jf extends Df.w{getCurrentValue(){return this.activePlayer.getLevel()}meetsRequirement(k){return this.getCurrentValue()<=k}getCurrentProgress(k){return[this.getCurrentValue(),k]}}var tb=U(5018),eb=U(6030);class ib extends Df.w{getCurrentValue(k){const B=eb[k].data;return!!B&&!!this.featureRequirements.meetsRequirementsDeprecated(B)}meetsRequirement(k){return this.getCurrentValue(k)}getCurrentProgress(k){return[this.getCurrentValue(k),!0]}}(0,G.Cg)([(0,Re.b)("db5-fb6e"),(0,G.Sn)("design:type",Object)],ib.prototype,"featureRequirements",void 0);class sb extends Df.w{getCurrentValue(){return K.q.instance.prodigy.gameContainer.get("f1d-f7b1").getSubject()}meetsRequirement(k){var B,U;const F=this.getCurrentValue();return(null!==(B=k.deny)&&void 0!==B?B:[]).every((k=>k!==F))&&(null!==(U=k.allow)&&void 0!==U?U:[F]).some((k=>k===F))}getCurrentProgress(k){return[this.getCurrentValue(),k]}}var nb,ab=U(93054);class rb extends Df.w{getCurrentValue(k){return ab.P.hasPlayerCompletedFinalQuestForZone(k)}meetsRequirement(k){return this.getCurrentValue(k)}getCurrentProgress(k){return[this.getCurrentValue(k),!0]}}let ob=nb=class extends If{constructor(k){super(),this.unhandledRequirement={meetsRequirement:()=>(0,G.sH)(this,void 0,void 0,(function*(){return!1}))},this.requirementChecks={},Object.entries(nb.REQUIREMENT_HANDLERS).forEach((([B,U])=>this.requirementChecks[B]=new U(k)))}logError(k){j.VyI.log(k,j.$bb.Error)}logWarning(k){j.VyI.log(k,j.$bb.Warning)}meetsRequirementsDeprecated(k){var B,U;const F="object"==typeof k?k:null===(B=this.getFeatureRequirementAsset(k))||void 0===B?void 0:B.data;if(F){const k=(null!==(U=null==F?void 0:F.evaluationStrategy)&&void 0!==U?U:Of.u.RequireAny)===Of.u.RequireAll,B=F.requirements;if(0===B.length)return!0;let G=!0;for(let U=0;U{const B={};for(const U of Object.keys(k))B[U]=this.requirementChecks[U].getCurrentValue(k[U]);return B}))}}getProgressForRequirements(k){var B,U;const F="object"==typeof k?k:null===(B=this.getFeatureRequirementAsset(k))||void 0===B?void 0:B.data;if(!ve.A.isDefined(F)){const B="string"==typeof k?k:null!==(U=null==k?void 0:k.name)&&void 0!==U?U:"unknown-name";return void j.VyI.log(`No data was found for Feature Requirement of asset ID ${B}`,j.$bb.Warning)}const{name:G,requirements:$}=F;return{name:G,requirements:$.map((k=>{var B;const U={};for(const F of Object.keys(k)){const G=this.requirementChecks[F];U[F]={text:null===(B=null==G?void 0:G.getDisplayText)||void 0===B?void 0:B.call(G,k[F]),progress:null==G?void 0:G.getCurrentProgress(k[F])}}return U}))}}getFeatureRequirementAsset(k){let B;for(const U of Mf)U.isEnabled()&&(B=U.getOverrideMap()[k]);return B?{data:B}:le.t.getItem("featureRequirements",k)}};ob.REQUIREMENT_HANDLERS={level:Xf,maxLevel:Jf,items:zf,device:Bf,friends:Vf,classmates:Lf,experiment:$f,breadcrumb:xf,geolocation:Wf,featureFlag:Hf,legacyQuest:Qf,packageFeature:tb.G,accountAgeHours:Rf,accountCreationDate:Nf,validatedParentEmail:qf,validatedTeacherEmail:Kf,currentMap:kf,subject:sb,endgameCompletion:Gf,kennel:Yf.p,zonePrerequisite:rb,difficultyUnlocked:Uf,dynamicStoreItemPurchaseCount:Ff,restrictionMet:ib,locale:Zf},ob.ASYNC_REQUIREMENTS_KEYS=new Set(["dynamicStoreItemPurchaseCount"]),ob=nb=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)("51c-03a0")),(0,G.Sn)("design:paramtypes",[an.n])],ob);let hb=class{getStateMachine(k){return le.t.getItem("fsm",k).data}};hb=(0,G.Cg)([(0,tt.injectable)()],hb);var cb=U(4101),db=U(65826),lb=U(78407),ub=U(97200),fb=U(39473);let bb=class{constructor(k,B,U,F){this.httpClient=null,this.authProvider=null,this.currentPlayer=null,this.featureFlags=null,this.httpClient=k,this.authProvider=B,this.currentPlayer=U,this.featureFlags=F}logStat(k,B){if(this.isLoggingEnabled())if(k.isValid()){const U=new j.u1k;U.setRequestURI(`game-cortex-server/v1/stats/${B}`).setMethod(j.iXQ.Post).addRequestInterceptor(this.authProvider.authenticateRequest,this.authProvider).setUseDefaultResponseHandlers(!1).setBody(new j._A9({data:JSON.stringify(k.serialize()),userID:`${this.currentPlayer.player.userID}`})),this.httpClient.sendRequest(U).then((k=>{k.wasSuccessful()||j.VyI.log(`Stats request has failed - ${k.getErrorMessage()}`,j.$bb.Warning)})).catch(j.RQr.createHandler("Stats request has failed"))}else j.VyI.log("Invalid stats data object provided. Request will not be sent",j.$bb.Warning);else j.VyI.log("GameApiRemoteLogger#logStat was called but remote logging is disabled",j.$bb.Verbose)}isLoggingEnabled(){return!this.featureFlags.getValue("remoteLoggingDisabled",!1)}};bb=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)("30b-3020")),(0,G.Qj)(1,(0,tt.inject)("330-3c25")),(0,G.Qj)(2,(0,tt.inject)("e20-0fb0")),(0,G.Qj)(3,(0,tt.inject)("80c-6fa4")),(0,G.Sn)("design:paramtypes",[Object,Object,Wt.E,Object])],bb);class pb{constructor(k){this.game=null,this.game=k}float(k,B,U,F,G=!1){const $=this.game.add.tween(k,this).to({y:`-=${B}`},U,j.GS3.Quadratic.InOut).to({y:`+=${B}`},U,j.GS3.Quadratic.InOut);return F&&$.loop(F),G&&$.start(),$}translate(k,B,U,F,G=0,$=j.GS3.Linear.None,H=!1){const V=this.game.add.tween(k,this).delay(G).to({x:B,y:U},F,$);return H&&V.start(),V}rotate(k,B,U,F=0,G=j.GS3.Linear.None,$=!1){const H=this.game.add.tween(k,this).delay(F).to({angle:B},U,G);return $&&H.start(),H}fade(k,B,U,F=0,G=j.GS3.Linear.None,$=!1){const H=this.game.add.tween(k,this).delay(F).to({alpha:B},U,G);return $&&H.start(),H}hop(k,B,U,F,G,$=!1,H=!1){const V=this.game.add.tween(k,this).to({x:B},G,j.GS3.Linear.None);$&&V.to({alpha:0},10,j.GS3.Linear.None);const W={tween:V,tween2:this.game.add.tween(k,this).to({y:U},G/2,j.GS3.Quadratic.Out).to({y:F},G/2,j.GS3.Quadratic.In),start:()=>(W.tween.start(),W.tween2.start(),W),onTweenComplete:{tween:V,add:k=>{V.onTweenComplete.add(k.bind(this))}}};return H&&W.start(),W}shake(k,B,U,F,G,$,H=0,V=j.GS3.Linear.None,W=!1){const q=.25*$,K=this.game.add.tween(k,this).delay(H).to({x:B,y:U},q,V).to({x:F,y:G},q,V).to({x:B,y:U},q,V).to({x:0,y:0},q,V);return W&&K.start(),K}}let vb=class{getScreenWidth(){return window.screen.availWidth}getScreenHeight(){return window.screen.availHeight}getPlatformName(){let k="Desktop";return j.o5U.isIpadOS()?k="iPadOS":j.o5U.isIOS()?k="iOS":j.o5U.isFireOS()?k="Amazon":j.o5U.isAndroid()&&(k="Android"),`${k}-${Pt.pF.isNativeApp()?"App":"Browser"}`}getConnectionDownlinkSpeed(){const k=this.getConnection();if(j.Aq$.isDefined(k)){const B=k.downlink;if(j.Aq$.isDefined(B))return B}return null}getConnectionRTT(){const k=this.getConnection();if(j.Aq$.isDefined(k)){const B=k.rtt;if(j.Aq$.isDefined(B))return B}return null}getConnectionType(){const k=this.getConnection();if(j.Aq$.isDefined(k)){const B=k.type;if(j.Aq$.isDefined(B))return B}return null}getConnectionEffectiveType(){const k=this.getConnection();if(j.Aq$.isDefined(k)){const B=k.effectiveType;if(j.Aq$.isDefined(B))return B}return null}getConnection(){return j.Aq$.isDefined(navigator.connection)?navigator.connection:null}getDeviceMemory(){return j.Aq$.isDefined(navigator.deviceMemory)?navigator.deviceMemory:null}getHardwareConcurrency(){return j.Aq$.isDefined(navigator.hardwareConcurrency)?navigator.hardwareConcurrency:null}getJSHeapSizeLimit(){return j.Aq$.isDefined(performance.memory)&&j.Aq$.isDefined(performance.memory.jsHeapSizeLimit)?performance.memory.jsHeapSizeLimit:null}getUsedJSHeapSize(){return j.Aq$.isDefined(performance.memory)&&j.Aq$.isDefined(performance.memory.usedJSHeapSize)?performance.memory.usedJSHeapSize:null}isVideoAvailable(){return"Desktop-Browser"===this.getPlatformName()&&(j.o5U.isChrome()||j.o5U.isFirefox())}isWebWorkerAvailable(){return Boolean(window.Worker)}isWebSocketAvailable(){return Boolean(window.WebSocket)}isWebGLAvailable(){let k=!1;const B=document.createElement("canvas");document.body.appendChild(B);const U=B.getContext("webgl")||B.getContext("experimental-webgl");return U&&U instanceof WebGLRenderingContext&&(k=!0),document.body.removeChild(B),k}};vb=(0,G.Cg)([(0,tt.injectable)()],vb);let gb=class{getCurrentEnvironment(){let k=this.getCurrentEnvironmentByHost();const B=W.qg(this.getWindowQueryString()).env;return j.Aq$.isDefined(B)&&("dev"===B?k=$e.h.Dev:"staging"===B?k=$e.h.Staging:"production"===B||"prod"===B?k=$e.h.Production:B.indexOf("-qa")>-1&&(k=$e.h.QABox)),k}getCurrentEnvironmentByHost(){const k=this.getWindowHost();return k.indexOf("-qa")>=0?$e.h.QABox:k.indexOf("dev.prodigygame.org")>=0||k.indexOf("prodigygame.net")>=0?$e.h.Dev:k.indexOf("prodigygame.org")>=0?$e.h.Staging:k.indexOf("prodigygame.com")>=0?$e.h.Production:$e.h.Local}getEnvironmentString(){switch(this.getCurrentEnvironment()){case $e.h.Production:return"production";case $e.h.Staging:return"staging";default:return"dev"}}getWindowHost(){return window.location.host}getWindowQueryString(){return window.location.search}};gb=(0,G.Cg)([(0,tt.injectable)()],gb);var mb={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},yb=function(k){for(var B=[],U=1;U>parseInt(k,10)/4).toString(16):"".concat(1e7,"-").concat(1e3,"-").concat(4e3,"-").concat(8e3,"-").concat(1e11).replace(/[018]/g,kb)}function Bb(k){return 0!==k&&100*Math.random()<=k}function Ub(k,B){return+k.toFixed(B)}function Fb(){}function Gb(k,B,U){if("object"!=typeof k||null===k)return JSON.stringify(k);var F=jb(Object.prototype),G=jb(Array.prototype),j=jb(Object.getPrototypeOf(k)),$=jb(k);try{return JSON.stringify(k,B,U)}catch(me){return""}finally{F(),G(),j(),$()}}function jb(k){var B=k,U=B.toJSON;return U?(delete B.toJSON,function(){B.toJSON=U}):Fb}function $b(k,B){return-1!==k.indexOf(B)}function Hb(k){if(Array.from)return Array.from(k);var B=[];if(k instanceof Set)k.forEach((function(k){return B.push(k)}));else for(var U=0;U=0&&k<=100}function qb(k){return"number"==typeof k}function Kb(k){return Object.keys(k).map((function(B){return k[B]}))}function zb(k){return Object.keys(k).map((function(B){return[B,k[B]]}))}function Yb(k){return 0===Object.keys(k).length}function Qb(k,B){return k.slice(0,B.length)===B}function Xb(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get:function(){return this},configurable:!0});var k=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!=typeof k&&(k="object"==typeof self?self:"object"==typeof window?window:{}),k}function Zb(k){if(k.origin)return k.origin;var B=k.host.replace(/(:80|:443)$/,"");return"".concat(k.protocol,"//").concat(B)}function Jb(k,B){var U=new RegExp("(?:^|;)\\s*".concat(B,"\\s*=\\s*([^;]+)")).exec(k);return U?U[1]:void 0}function tp(k,B,U){void 0===U&&(U="");var F=k.charCodeAt(B-1),G=F>=55296&&F<=56319?B+1:B;return k.length<=G?k:"".concat(k.slice(0,G)).concat(U)}function ep(k){return null===k?"null":Array.isArray(k)?"array":typeof k}function ip(k,B,U){if(void 0===U&&(U=function(){if("undefined"!=typeof WeakSet){var k=new WeakSet;return{hasAlreadyBeenSeen:function(B){var U=k.has(B);return U||k.add(B),U}}}var B=[];return{hasAlreadyBeenSeen:function(k){var U=B.indexOf(k)>=0;return U||B.push(k),U}}}()),void 0===B)return k;if("object"!=typeof B||null===B)return B;if(B instanceof Date)return new Date(B.getTime());if(B instanceof RegExp){var F=B.flags||[B.global?"g":"",B.ignoreCase?"i":"",B.multiline?"m":"",B.sticky?"y":"",B.unicode?"u":""].join("");return new RegExp(B.source,F)}if(!U.hasAlreadyBeenSeen(B)){if(Array.isArray(B)){for(var G=Array.isArray(k)?k:[],j=0;j500&&this.buffer.splice(0,1)},k.prototype.drain=function(){this.buffer.forEach((function(k){return k()})),this.buffer.length=0},k}();function fp(k){return{relative:k,timeStamp:bp(k)}}function bp(k){var B=vp()-performance.now();return B>Sp()?Math.round(wp(B,k)):function(k){return Math.round(wp(Sp(),k))}(k)}function pp(k){return qb(k)?Ub(1e6*k,0):k}function vp(){return(new Date).getTime()}function gp(){return vp()}function mp(){return performance.now()}function yp(){return{relative:mp(),timeStamp:gp()}}function _p(){return{relative:0,timeStamp:Sp()}}function Ep(k,B){return B-k}function wp(k,B){return k+B}function Tp(k){return k-Sp()}function Sp(){return void 0===lp&&(lp=performance.timing.navigationStart),lp}var Ap;function Cp(k,B,U,F){var G=new Date;G.setTime(G.getTime()+U);var j="expires=".concat(G.toUTCString()),$=F&&F.crossSite?"none":"strict",H=F&&F.domain?";domain=".concat(F.domain):"",V=F&&F.secure?";secure":"";document.cookie="".concat(k,"=").concat(B,";").concat(j,";path=/;samesite=").concat($).concat(H).concat(V)}function Op(k){return Jb(document.cookie,k)}function Ip(k,B){Cp(k,"",0,B)}var Dp;function Rp(){return Boolean(window._DATADOG_SYNTHETICS_INJECTS_RUM||Op("datadog-synthetics-injects-rum"))}function Pp(){var k=Xb().DatadogEventBridge;if(k)return{getAllowedWebViewHosts:function(){return JSON.parse(k.getAllowedWebViewHosts())},send:function(B,U){k.send(JSON.stringify({eventType:B,event:U}))}}}function Mp(k){var B;void 0===k&&(k=null===(B=Xb().location)||void 0===B?void 0:B.hostname);var U=Pp();return!!U&&U.getAllowedWebViewHosts().some((function(B){return k===B||(U=k,F=".".concat(B),U.slice(-F.length)===F);var U,F}))}function Np(k){return!!Dp&&Dp.has(k)}function xp(){return Dp||new Set}var Lp="?";function kp(k){var B=[],U=Wp(k,"stack"),F=String(k);return U&&Qb(U,F)&&(U=U.slice(F.length)),U&&U.split("\n").forEach((function(k){var U=function(k){var B=Fp.exec(k);if(!B)return;var U=B[2]&&0===B[2].indexOf("native"),F=B[2]&&0===B[2].indexOf("eval"),G=Gp.exec(B[2]);F&&G&&(B[2]=G[1],B[3]=G[2],B[4]=G[3]);return{args:U?[B[2]]:[],column:B[4]?+B[4]:void 0,func:B[1]||Lp,line:B[3]?+B[3]:void 0,url:U?void 0:B[2]}}(k)||function(k){var B=jp.exec(k);if(!B)return;return{args:[],column:B[3]?+B[3]:void 0,func:Lp,line:B[2]?+B[2]:void 0,url:B[1]}}(k)||function(k){var B=$p.exec(k);if(!B)return;return{args:[],column:B[4]?+B[4]:void 0,func:B[1]||Lp,line:+B[3],url:B[2]}}(k)||function(k){var B=Hp.exec(k);if(!B)return;var U=B[3]&&B[3].indexOf(" > eval")>-1,F=Vp.exec(B[3]);U&&F&&(B[3]=F[1],B[4]=F[2],B[5]=void 0);return{args:B[2]?B[2].split(","):[],column:B[5]?+B[5]:void 0,func:B[1]||Lp,line:B[4]?+B[4]:void 0,url:B[3]}}(k);U&&(!U.func&&U.line&&(U.func=Lp),B.push(U))})),{message:Wp(k,"message"),name:Wp(k,"name"),stack:B}}var Bp="((?:file|https?|blob|chrome-extension|native|eval|webpack||\\w+\\.|\\/).*?)",Up="(?::(\\d+))",Fp=new RegExp("^\\s*at (.*?) ?\\(".concat(Bp).concat(Up,"?").concat(Up,"?\\)?\\s*$"),"i"),Gp=new RegExp("\\((\\S*)".concat(Up).concat(Up,"\\)"));var jp=new RegExp("^\\s*at ?".concat(Bp).concat(Up,"?").concat(Up,"??\\s*$"),"i");var $p=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var Hp=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Vp=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Wp(k,B){if("object"==typeof k&&k&&B in k){var U=k[B];return"string"==typeof U?U:void 0}}var qp,Kp="agent",zp="console",Yp="custom",Qp="source",Xp="report";function Zp(k){var B=k.stackTrace,U=k.originalError,F=k.handlingStack,G=k.startClocks,j=k.nonErrorPrefix,$=k.source,H=k.handling;return B&&(void 0!==B.message||U instanceof Error)?{startClocks:G,source:$,handling:H,originalError:U,message:B.message||"Empty message",stack:Jp(B),handlingStack:F,type:B.name,causes:iv(U,$)}:{startClocks:G,source:$,handling:H,originalError:U,message:"".concat(j," ").concat(Gb(U)),stack:"No stack, consider using an instance of Error",handlingStack:F,type:B&&B.name}}function Jp(k){var B=tv(k);return k.stack.forEach((function(k){var U="?"===k.func?"":k.func,F=k.args&&k.args.length>0?"(".concat(k.args.join(", "),")"):"",G=k.line?":".concat(k.line):"",j=k.line&&k.column?":".concat(k.column):"";B+="\n at ".concat(U).concat(F," @ ").concat(k.url).concat(G).concat(j)})),B}function tv(k){return"".concat(k.name||"Error",": ").concat(k.message)}function ev(){var k,B=new Error;if(!B.stack)try{throw B}catch(e){}return Cb((function(){var U=kp(B);U.stack=U.stack.slice(2),k=Jp(U)})),k}function iv(k,B){for(var U=k,F=[];(null==U?void 0:U.cause)instanceof Error&&F.length<10;){var G=kp(U.cause);F.push({message:U.cause.message,source:B,type:null==G?void 0:G.name,stack:G&&Jp(G)}),U=U.cause}return F.length?F:void 0}function sv(k){var B=xb({},k);return["id","name","email"].forEach((function(k){k in B&&(B[k]=String(B[k]))})),B}function nv(k){return rv(k,Zb(window.location)).href}function av(k){return Zb(rv(k))}function rv(k,B){if(function(){if(void 0!==qp)return qp;try{var k=new URL("http://test/path");return qp="http://test/path"===k.href}catch(me){qp=!1}return qp}())return void 0!==B?new URL(k,B):new URL(k);if(void 0===B&&!/:/.test(k))throw new Error("Invalid URL: '".concat(k,"'"));var U=document,F=U.createElement("a");if(void 0!==B){var G=(U=document.implementation.createHTMLDocument("")).createElement("base");G.href=B,U.head.appendChild(G),U.body.appendChild(F)}return F.href=k,F}var ov="datadoghq.com",hv="ap1.datadoghq.com",cv={logs:"logs",rum:"rum",sessionReplay:"session-replay"},dv={logs:"logs",rum:"rum",sessionReplay:"replay"};function lv(k,B,U){var F=function(k,B){var U="/api/v2/".concat(dv[B]),F=k.proxy,G=k.proxyUrl;if(F){var j=nv(F);return function(k){return"".concat(j,"?ddforward=").concat(encodeURIComponent("".concat(U,"?").concat(k)))}}var $=function(k,B){var U=k.site,F=void 0===U?ov:U,G=k.internalAnalyticsSubdomain;if(G&&F===ov)return"".concat(G,".").concat(ov);var j=F.split("."),$=j.pop(),H=F!==hv?"".concat(cv[B],"."):"";return"".concat(H,"browser-intake-").concat(j.join("-"),".").concat($)}(k,B);if(void 0===F&&G){var H=nv(G);return function(k){return"".concat(H,"?ddforward=").concat(encodeURIComponent("https://".concat($).concat(U,"?").concat(k)))}}return function(k){return"https://".concat($).concat(U,"?").concat(k)}}(k,B);return{build:function(G,j,$){var H=function(k,B,U,F,G,j){var $=k.clientToken,H=k.internalAnalyticsSubdomain,V=["sdk_version:".concat("4.35.0"),"api:".concat(F)].concat(U);G&&Np("collect_flush_reason")&&V.push("flush_reason:".concat(G));j&&V.push("retry_count:".concat(j.count),"retry_after:".concat(j.lastFailureStatus));var W=["ddsource=browser","ddtags=".concat(encodeURIComponent(V.join(","))),"dd-api-key=".concat($),"dd-evp-origin-version=".concat(encodeURIComponent("4.35.0")),"dd-evp-origin=browser","dd-request-id=".concat(kb())];"rum"===B&&W.push("batch_time=".concat(gp()));H&&W.reverse();return W.join("&")}(k,B,U,G,j,$);return F(H)},urlPrefix:F(""),endpointType:B}}var uv=/[^a-z0-9_:./-]/;function fv(k,B){var U=200-k.length-1;(B.length>U||uv.test(B))&&yb.warn("".concat(k," value doesn't meet tag requirements and will be sanitized"));var F=B.replace(/,/g,"_");return"".concat(k,":").concat(F)}function bv(k){var B=function(k){var B=k.env,U=k.service,F=k.version,G=k.datacenter,j=[];return B&&j.push(fv("env",B)),U&&j.push(fv("service",U)),F&&j.push(fv("version",F)),G&&j.push(fv("datacenter",G)),j}(k),U=function(k,B){return{logsEndpointBuilder:lv(k,"logs",B),rumEndpointBuilder:lv(k,"rum",B),sessionReplayEndpointBuilder:lv(k,"sessionReplay",B)}}(k,B),F=Kb(U).map((function(k){return k.urlPrefix})),G=function(k,B,U){if(!k.replica)return;var F=xb({},k,{site:ov,clientToken:k.replica.clientToken}),G={logsEndpointBuilder:lv(F,"logs",U),rumEndpointBuilder:lv(F,"rum",U)};return B.push.apply(B,Kb(G).map((function(k){return k.urlPrefix}))),xb({applicationId:k.replica.applicationId},G)}(k,F,B);return xb({isIntakeUrl:function(k){return F.some((function(B){return 0===k.indexOf(B)}))},replica:G,site:k.site||ov},U)}var pv={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"};function vv(k){var B,U,F;if(k&&k.clientToken){var G=null!==(B=k.sessionSampleRate)&&void 0!==B?B:k.sampleRate;if(void 0===G||Wb(G))if(void 0===k.telemetrySampleRate||Wb(k.telemetrySampleRate)){var j;if(void 0===k.telemetryConfigurationSampleRate||Wb(k.telemetryConfigurationSampleRate))return j=k.enableExperimentalFeatures,Array.isArray(j)&&(Dp||(Dp=new Set(j)),j.filter((function(k){return"string"==typeof k})).forEach((function(k){$b(k,"-")&&yb.warn("please use snake case for '".concat(k,"'")),Dp.add(k)}))),xb({beforeSend:k.beforeSend&&_b(k.beforeSend,"beforeSend threw an error:"),cookieOptions:gv(k),sessionSampleRate:null!=G?G:100,telemetrySampleRate:null!==(U=k.telemetrySampleRate)&&void 0!==U?U:20,telemetryConfigurationSampleRate:null!==(F=k.telemetryConfigurationSampleRate)&&void 0!==F?F:5,service:k.service,silentMultipleInit:!!k.silentMultipleInit,batchBytesLimit:16384,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:3e4,batchMessagesLimit:50,messageBytesLimit:262144},bv(k));yb.error("Telemetry Configuration Sample Rate should be a number between 0 and 100")}else yb.error("Telemetry Sample Rate should be a number between 0 and 100");else yb.error("Session Sample Rate should be a number between 0 and 100")}else yb.error("Client Token is not configured, we will not send any data.")}function gv(k){var B={};return B.secure=function(k){return!!k.useSecureSessionCookie||!!k.useCrossSiteSessionCookie}(k),B.crossSite=!!k.useCrossSiteSessionCookie,k.trackSessionAcrossSubdomains&&(B.domain=function(){if(void 0===Ap){for(var k="dd_site_test_".concat(kb()),B=window.location.hostname.split("."),U=B.pop();B.length&&!Op(k);)U="".concat(B.pop(),".").concat(U),Cp(k,"test",Pb,{domain:U});Ip(k,{domain:U}),Ap=U}return Ap}()),B}function mv(k){0!==k.status||k.isAborted||(k.traceId=void 0,k.spanId=void 0,k.traceSampled=void 0)}function yv(k,B,U,F){if(void 0!==_v()&&U.findTrackedSession()){var G,j,$,H,V,W=Vb(k.allowedTracingUrls,(function(k){return rp([k.match],B.url,!0)}));if(W)B.traceId=new Ev,B.spanId=new Ev,B.traceSampled=!qb(k.traceSampleRate)||Bb(k.traceSampleRate),F((G=B.traceId,j=B.spanId,$=B.traceSampled,H=W.propagatorTypes,V={},H.forEach((function(k){switch(k){case"datadog":xb(V,{"x-datadog-origin":"rum","x-datadog-parent-id":j.toDecimalString(),"x-datadog-sampling-priority":$?"1":"0","x-datadog-trace-id":G.toDecimalString()});break;case"tracecontext":xb(V,{traceparent:"00-0000000000000000".concat(G.toPaddedHexadecimalString(),"-").concat(j.toPaddedHexadecimalString(),"-0").concat($?"1":"0")});break;case"b3":xb(V,{b3:"".concat(G.toPaddedHexadecimalString(),"-").concat(j.toPaddedHexadecimalString(),"-").concat($?"1":"0")});break;case"b3multi":xb(V,{"X-B3-TraceId":G.toPaddedHexadecimalString(),"X-B3-SpanId":j.toPaddedHexadecimalString(),"X-B3-Sampled":$?"1":"0"})}})),V))}}function _v(){return window.crypto||window.msCrypto}var Ev=function(){function k(){this.buffer=new Uint8Array(8),_v().getRandomValues(this.buffer),this.buffer[0]=127&this.buffer[0]}return k.prototype.toString=function(k){var B=this.readInt32(0),U=this.readInt32(4),F="";do{var G=B%k*4294967296+U;B=Math.floor(B/k),U=Math.floor(G/k),F=(G%k).toString(k)+F}while(B||U);return F},k.prototype.toDecimalString=function(){return this.toString(10)},k.prototype.toPaddedHexadecimalString=function(){var k=this.toString(16);return Array(17-k.length).join("0")+k},k.prototype.readInt32=function(k){return 16777216*this.buffer[k]+(this.buffer[k+1]<<16)+(this.buffer[k+2]<<8)+this.buffer[k+3]},k}();function wv(k){var B,U,F,G,j,$;if(k.applicationId)if(void 0===k.sessionReplaySampleRate||Wb(k.sessionReplaySampleRate)){var H=null!==(B=k.premiumSampleRate)&&void 0!==B?B:k.replaySampleRate;if(void 0!==H&&void 0!==k.sessionReplaySampleRate&&(yb.warn("Ignoring Premium Sample Rate because Session Replay Sample Rate is set"),H=void 0),void 0===H||Wb(H)){var V=null!==(U=k.traceSampleRate)&&void 0!==U?U:k.tracingSampleRate;if(void 0===V||Wb(V))if(void 0===k.excludedActivityUrls||Array.isArray(k.excludedActivityUrls)){var W=function(k){void 0!==k.allowedTracingUrls&&void 0!==k.allowedTracingOrigins&&yb.warn("Both allowedTracingUrls and allowedTracingOrigins (deprecated) have been defined. The parameter allowedTracingUrls will override allowedTracingOrigins.");if(void 0!==k.allowedTracingUrls){if(!Array.isArray(k.allowedTracingUrls))return void yb.error("Allowed Tracing URLs should be an array");if(0!==k.allowedTracingUrls.length&&void 0===k.service)return void yb.error("Service needs to be configured when tracing is enabled");var B=[];return k.allowedTracingUrls.forEach((function(k){var U;ap(k)?B.push({match:k,propagatorTypes:["datadog"]}):"object"===ep(U=k)&&ap(U.match)&&Array.isArray(U.propagatorTypes)?B.push(k):yb.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",k)})),B}if(void 0!==k.allowedTracingOrigins){if(!Array.isArray(k.allowedTracingOrigins))return void yb.error("Allowed Tracing Origins should be an array");if(0!==k.allowedTracingOrigins.length&&void 0===k.service)return void yb.error("Service needs to be configured when tracing is enabled");var U=[];return k.allowedTracingOrigins.forEach((function(k){var B=function(k){var B;"string"==typeof k?B=k:k instanceof RegExp?B=function(B){return k.test(av(B))}:"function"==typeof k&&(B=function(B){return k(av(B))});if(void 0===B)return void yb.warn("Allowed Tracing Origins parameters should be a string, RegExp or function. Ignoring parameter",k);return{match:B,propagatorTypes:["datadog"]}}(k);B&&U.push(B)})),U}return[]}(k);if(W){var q=vv(k);if(q){var K,z,Y=!!(null!==(F=k.trackUserInteractions)&&void 0!==F?F:k.trackInteractions),Q=!!k.trackFrustrations;return xb({applicationId:k.applicationId,version:k.version,actionNameAttribute:k.actionNameAttribute,sessionReplaySampleRate:null!==(j=null!==(G=k.sessionReplaySampleRate)&&void 0!==G?G:H)&&void 0!==j?j:100,oldPlansBehavior:void 0===k.sessionReplaySampleRate,traceSampleRate:V,allowedTracingUrls:W,excludedActivityUrls:null!==($=k.excludedActivityUrls)&&void 0!==$?$:[],trackUserInteractions:Y||Q,trackFrustrations:Q,trackViewsManually:!!k.trackViewsManually,trackResources:k.trackResources,trackLongTasks:k.trackLongTasks,defaultPrivacyLevel:(K=pv,z=k.defaultPrivacyLevel,Object.keys(K).some((function(k){return K[k]===z}))?k.defaultPrivacyLevel:pv.MASK_USER_INPUT),customerDataTelemetrySampleRate:1},q)}}}else yb.error("Excluded Activity Urls should be an array");else yb.error("Trace Sample Rate should be a number between 0 and 100")}else yb.error("Premium Sample Rate should be a number between 0 and 100")}else yb.error("Session Replay Sample Rate should be a number between 0 and 100");else yb.error("Application ID is not configured, no RUM data will be collected.")}function Tv(k){var B=new Set;return Array.isArray(k.allowedTracingUrls)&&k.allowedTracingUrls.length>0&&k.allowedTracingUrls.forEach((function(k){ap(k)?B.add("datadog"):k.propagatorTypes.forEach((function(k){return B.add(k)}))})),Array.isArray(k.allowedTracingOrigins)&&k.allowedTracingOrigins.length>0&&B.add("datadog"),Hb(B)}function Sv(k,B,U){return{context:k.getContext(),user:B.getContext(),hasReplay:!!U.isRecording()||void 0}}function Av(k,B){var U=window.__ddBrowserSdkExtensionCallback;U&&U({type:k,payload:B})}var Cv=function(){function k(k){this.onFirstSubscribe=k,this.observers=[]}return k.prototype.subscribe=function(k){var B=this;return!this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe()||void 0),this.observers.push(k),{unsubscribe:function(){B.observers=B.observers.filter((function(B){return k!==B})),!B.observers.length&&B.onLastUnsubscribe&&B.onLastUnsubscribe()}}},k.prototype.notify=function(k){this.observers.forEach((function(B){return B(k)}))},k}();function Ov(){for(var k=[],B=0;B"],Lv=["ddog-gov.com"],kv={maxEventsPerPage:0,sentEventCount:0,telemetryEnabled:!1,telemetryConfigurationEnabled:!1};function Bv(k,B){var U,F=new Cv;return kv.telemetryEnabled=!$b(Lv,B.site)&&Bb(B.telemetrySampleRate),kv.telemetryConfigurationEnabled=kv.telemetryEnabled&&Bb(B.telemetryConfigurationSampleRate),Pv=function(B){if(kv.telemetryEnabled){var G=function(k,B){return np({type:"telemetry",date:gp(),service:k,version:"4.35.0",source:"browser",_dd:{format_version:2},telemetry:B,experimental_features:Hb(xp())},void 0!==U?U():{})}(k,B);F.notify(G),Av("telemetry",G)}},Eb=Fv,xb(kv,{maxEventsPerPage:B.maxTelemetryEventsPerPage,sentEventCount:0}),{setContextProvider:function(k){U=k},observable:F,enabled:kv.telemetryEnabled}}function Uv(k,B){Ob(mb.debug,k,B),Gv(xb({type:Mv,message:k,status:"debug"},B))}function Fv(k){Gv(xb({type:Mv,status:"error"},function(k){if(k instanceof Error){var B=kp(k);return{error:{kind:B.name,stack:Jp(jv(B))},message:B.message}}return{error:{stack:"Not an instance of error"},message:"Uncaught ".concat(Gb(k))}}(k)))}function Gv(k){Pv&&kv.sentEventCountk[U])return!1;return!0}function zv(k){var B=Yv(k);if(B){var U=B.startTime,F=B.fetchStart,G=B.redirectStart,j=B.redirectEnd,$=B.domainLookupStart,H=B.domainLookupEnd,V=B.connectStart,W=B.secureConnectionStart,q=B.connectEnd,K=B.requestStart,z=B.responseStart,Y={download:Xv(U,z,B.responseEnd),first_byte:Xv(U,K,z)};return q!==F&&(Y.connect=Xv(U,V,q),Kv(V,W,q)&&(Y.ssl=Xv(U,W,q))),H!==F&&(Y.dns=Xv(U,$,H)),Qv(k)&&(Y.redirect=Xv(U,G,j)),Y}}function Yv(k){if(Kv(k.startTime,k.fetchStart,k.domainLookupStart,k.domainLookupEnd,k.connectStart,k.connectEnd,k.requestStart,k.responseStart,k.responseEnd)){if(!Qv(k))return k;var B=k.redirectStart,U=k.redirectEnd;if(B=0;B-=1){var U,F=k.body.childNodes[B];if(U=cg(F))return U;if(!tg(F))break}}(k);if(!B)return;return hg(Jb(B,"trace-id"),Jb(B,"trace-time"))}(k);if(B&&!(B.traceTime<=vp()-12e4))return B.traceId}function hg(k,B){var U=B&&Number(B);if(k&&U)return{traceId:k,traceTime:U}}function cg(k){if(k&&function(k){return k.nodeType===Node.COMMENT_NODE}(k)){var B=/^\s*DATADOG;(.*?)\s*$/.exec(k.data);if(B)return B[1]}}function dg(){return void 0!==window.performance&&"getEntries"in performance}function lg(k){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes(k)}function ug(k,B){var U;if(U=function(U){bg(k,B,[U])},Hv("interactive",(function(){var k,B={entryType:"resource",initiatorType:Vv,traceId:og(document)};if(lg("navigation")&&performance.getEntriesByType("navigation").length>0)k=xb(performance.getEntriesByType("navigation")[0].toJSON(),B);else{var F=fg();k=xb(F,{decodedBodySize:0,duration:F.responseEnd,name:window.location.href,startTime:0},B)}U(k)})),dg()){var F=performance.getEntries();Db((function(){return bg(k,B,F)}))}if(window.PerformanceObserver){var G=Ab((function(U){return bg(k,B,U.getEntries())})),j=["resource","navigation","longtask","paint"],$=["largest-contentful-paint","first-input","layout-shift"];try{$.forEach((function(k){new PerformanceObserver(G).observe({type:k,buffered:!0})}))}catch(e){j.push.apply(j,$)}new PerformanceObserver(G).observe({entryTypes:j}),dg()&&"addEventListener"in performance&&performance.addEventListener("resourcetimingbufferfull",(function(){performance.clearResourceTimings()}))}lg("navigation")||function(k){function B(){k(xb(fg(),{entryType:"navigation"}))}Hv("complete",(function(){Db(B)}))}((function(U){bg(k,B,[U])})),lg("first-input")||function(k){var B=vp(),U=!1,F=Dv(window,["click","mousedown","keydown","touchstart","pointerdown"],(function(k){if(k.cancelable){var B={entryType:"first-input",processingStart:mp(),startTime:k.timeStamp};"pointerdown"===k.type?G(B):j(B)}}),{passive:!0,capture:!0}).stop;function G(k){Dv(window,["pointerup","pointercancel"],(function(B){"pointerup"===B.type&&j(k)}),{once:!0})}function j(G){if(!U){U=!0,F();var j=G.processingStart-G.startTime;j>=0&&j2500)){var k=Cg[Cg.length-1],B=mp();void 0!==k&&void 0===k.end||Cg.push({start:B})}}function Dg(){if(0!==Cg.length){var k=Cg[Cg.length-1],B=mp();void 0===k.end&&(k.end=B)}}function Rg(k){for(var B=Cg.length-1;B>=0;B--){var U=Cg[B];if(void 0!==U.end&&k>U.end)break;if(k>U.start&&(void 0===U.end||k=G;j--){var $=Cg[j];if(void 0!==$.end&&k>$.end)break;if(!(U<$.start)){var H=k>$.start?k:$.start,V=Ep(k,H),W=Ep(H,void 0===$.end||U<$.end?U:$.end);F.unshift({start:pp(V),duration:pp(W)})}}return F}var Mg,Ng=function(){function k(){this.callbacks={}}return k.prototype.notify=function(k,B){var U=this.callbacks[k];U&&U.forEach((function(k){return k(B)}))},k.prototype.subscribe=function(k,B){var U=this;return this.callbacks[k]||(this.callbacks[k]=[]),this.callbacks[k].push(B),{unsubscribe:function(){U.callbacks[k]=U.callbacks[k].filter((function(k){return B!==k}))}}},k}(),xg=144e5,Lg=9e5,kg=1/0,Bg=function(){function k(k){var B=this;this.expireDelay=k,this.entries=[],this.clearOldContextsInterval=setInterval((function(){return B.clearOldContexts()}),6e4)}return k.prototype.add=function(k,B){var U=this,F={context:k,startTime:B,endTime:kg,remove:function(){var k=U.entries.indexOf(F);k>=0&&U.entries.splice(k,1)},close:function(k){F.endTime=k}};return this.entries.unshift(F),F},k.prototype.find=function(k){void 0===k&&(k=kg);for(var B=0,U=this.entries;B0&&this.entries[this.entries.length-1].endTimeU.bytesLimit}B(void 0,k,$)}!function k(){F.read().then(Ab((function(B){B.done?$():(U.collectStreamBody&&G.push(B.value),(j+=B.value.length)>U.bytesLimit?$():k())})),Ab((function(k){return B(k)})))}()}(U.body,(function(){B(Ep(k.startClocks.timeStamp,gp()))}),{bytesLimit:Number.POSITIVE_INFINITY,collectStreamBody:!1}):B(Ep(k.startClocks.timeStamp,gp()))}(G,(function(B){U.clearTracingIfNeeded(G),k.notify(6,{duration:B,method:G.method,requestIndex:G.requestIndex,responseType:G.responseType,spanId:G.spanId,startClocks:G.startClocks,status:G.status,traceId:G.traceId,traceSampled:G.traceSampled,type:"fetch",url:G.url,response:G.response,init:G.init,input:G.input})}))}}))}(k,B,F)}function Zg(){var k=Qg;return Qg+=1,k}function Jg(k){var B=k.lifeCycle,U=k.isChildEvent,F=k.onChange,G=void 0===F?Fb:F,j={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},$=B.subscribe(11,(function(k){if("view"!==k.type&&U(k))switch(k.type){case"error":j.errorCount+=1,G();break;case"action":j.actionCount+=1,k.action.frustration&&(j.frustrationCount+=k.action.frustration.type.length),G();break;case"long_task":j.longTaskCount+=1,G();break;case"resource":j.resourceCount+=1,G()}}));return{stop:function(){$.unsubscribe()},eventCounts:j}}var tm=100;function em(k,B,U,F,G){return function(k,B,U){var F,G=!1,j=Db(Ab((function(){return W({hadActivity:!1})})),100),$=U&&Db(Ab((function(){return W({hadActivity:!0,end:gp()})})),U),H=k.subscribe((function(k){var B=k.isBusy;Rb(j),Rb(F);var U=gp();B||(F=Db(Ab((function(){return W({hadActivity:!0,end:U})})),100))})),V=function(){G=!0,Rb(j),Rb(F),Rb($),H.unsubscribe()};function W(k){G||(V(),B(k))}return{stop:V}}(function(k,B,U){var F=new Cv((function(){var G,j=[],$=0;j.push(B.subscribe(W),k.subscribe(0,(function(k){k.some((function(k){return"resource"===k.entryType&&!im(U,k.name)}))&&W()})),k.subscribe(5,(function(k){im(U,k.url)||(void 0===G&&(G=k.requestIndex),$+=1,W())})),k.subscribe(6,(function(k){im(U,k.url)||void 0===G||k.requestIndex0})}}));return F}(k,B,U),F,G)}function im(k,B){return rp(k.excludedActivityUrls,B)}var sm=Pb;function nm(k,B){var U,F=[],G=0;function j(k){k.stopObservable.subscribe($),F.push(k),Rb(U),U=Db(H,1e3)}function $(){1===G&&F.every((function(k){return k.isStopped()}))&&(G=2,B(F))}function H(){Rb(U),0===G&&(G=1,$())}return j(k),{tryAppend:function(k){return 0===G&&(F.length>0&&(B=F[F.length-1].event,U=k.event,!(B.target===U.target&&($=B,V=U,Math.sqrt(Math.pow($.clientX-V.clientX,2)+Math.pow($.clientY-V.clientY,2))<=100)&&B.timeStamp-U.timeStamp<=sm))?(H(),!1):(j(k),!0));var B,U,$,V},stop:function(){H()}}}var am="data-dd-action-name";function rm(k,B){return om(k,am)||B&&om(k,B)||um(k,B,dm)||um(k,B,lm)||""}function om(k,B){var U;if(function(){void 0===cm&&(cm="closest"in HTMLElement.prototype);return cm}())U=k.closest("[".concat(B,"]"));else for(var F=k;F;){if(F.hasAttribute(B)){U=F;break}F=F.parentElement}if(U)return bm(fm(U.getAttribute(B).trim()))}var hm,cm,dm=[function(k,B){if(function(){void 0===hm&&(hm="labels"in HTMLInputElement.prototype);return hm}()){if("labels"in k&&k.labels&&k.labels.length>0)return pm(k.labels[0],B)}else if(k.id){var U=k.ownerDocument&&Vb(k.ownerDocument.querySelectorAll("label"),(function(B){return B.htmlFor===k.id}));return U&&pm(U,B)}},function(k){if("INPUT"===k.nodeName){var B=k,U=B.getAttribute("type");if("button"===U||"submit"===U||"reset"===U)return B.value}},function(k,B){if("BUTTON"===k.nodeName||"LABEL"===k.nodeName||"button"===k.getAttribute("role"))return pm(k,B)},function(k){return k.getAttribute("aria-label")},function(k,B){var U=k.getAttribute("aria-labelledby");if(U)return U.split(/\s+/).map((function(B){return function(k,B){return k.ownerDocument?k.ownerDocument.getElementById(B):null}(k,B)})).filter((function(k){return Boolean(k)})).map((function(k){return pm(k,B)})).join(" ")},function(k){return k.getAttribute("alt")},function(k){return k.getAttribute("name")},function(k){return k.getAttribute("title")},function(k){return k.getAttribute("placeholder")},function(k,B){if("options"in k&&k.options.length>0)return pm(k.options[0],B)}],lm=[function(k,B){return pm(k,B)}];function um(k,B,U){for(var F=k,G=0;G<=10&&F&&"BODY"!==F.nodeName&&"HTML"!==F.nodeName&&"HEAD"!==F.nodeName;){for(var j=0,$=U;j<$.length;j++){var H=(0,$[j])(F,B);if("string"==typeof H){var V=H.trim();if(V)return bm(fm(V))}}if("FORM"===F.nodeName)break;F=F.parentElement,G+=1}}function fm(k){return k.replace(/\s+/g," ")}function bm(k){return k.length>100?"".concat(tp(k,100)," [...]"):k}function pm(k,B){if(!k.isContentEditable){if("innerText"in k){var U=k.innerText,F=function(B){for(var F=k.querySelectorAll(B),G=0;G0&&(U=U.replace($,""))}}};return Boolean(document.documentMode)&&F("script, style"),F("[".concat(am,"]")),B&&F("[".concat(B,"]")),U}return k.textContent}}var vm,gm=[am,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],mm=[wm,function(k){if(k.id&&!Em(k.id))return"#".concat(op(k.id))}],ym=[wm,function(k){if("BODY"===k.tagName)return;if(k.classList.length>0)for(var B=0;B").concat(B):k}function Im(){var k=window.getSelection();return!k||k.isCollapsed}function Dm(k){return k.target instanceof Element&&!1!==k.isPrimary}function Rm(k,B){if(function(k){if(k.some((function(k){return k.getUserActivity().selection})))return!1;for(var B=0;B0},get hasPageActivity(){return void 0!==j},getUserActivity:U,addFrustration:function(k){K.push(k)},startClocks:H,isStopped:function(){return 1===q||2===q},clone:function(){return Nm(k,B,U,F,G)},validate:function(B){if(Y(),1===q){var U=W.eventCounts,V=U.resourceCount,z=U.errorCount,Q=U.longTaskCount,X=xb({type:"click",duration:j&&Ep(H.timeStamp,j),startClocks:H,id:$,frustrationTypes:K,counts:{resourceCount:V,errorCount:z,longTaskCount:Q},events:null!=B?B:[G],event:G},F);k.notify(1,X),q=2}},discard:function(){Y(),q=2}}}function xm(k,B){var U=Lm(k)?{action:{id:k.id,loading_time:pp(k.duration),frustration:{type:k.frustrationTypes},error:{count:k.counts.errorCount},long_task:{count:k.counts.longTaskCount},resource:{count:k.counts.resourceCount}},_dd:{action:{target:k.target,position:k.position}}}:void 0,F=Lm(k)?void 0:k.context,G=np({action:{id:kb(),target:{name:k.name},type:k.type},date:k.startClocks.timeStamp,type:"action"},U),j=B.isInForegroundAt(k.startClocks.relative);return void 0!==j&&(G.view={in_foreground:j}),{customerContext:F,rawRumEvent:G,startTime:k.startClocks.relative,domainContext:Lm(k)?{event:k.event,events:k.events}:{}}}function Lm(k){return"custom"!==k.type}var km=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function Bm(k){var B=function(k){return Fg(window,"onerror",{before:function(B,U,F,G,j){var $;if(j)$=kp(j),k($,j);else{var H,V={url:U,column:G,line:F},W=B;if("[object String]"==={}.toString.call(B)){var q=km.exec(W);q&&(H=q[1],W=q[2])}k($={name:H,message:"string"==typeof W?W:void 0,stack:[V]},B)}}})}(k).stop,U=function(k){return Fg(window,"onunhandledrejection",{before:function(B){var U=B.reason||"Empty reason",F=kp(U);k(F,U)}})}(k).stop;return{stop:function(){B(),U()}}}var Um={};function Fm(k){var B=k.map((function(k){return Um[k]||(Um[k]=function(k){var B=new Cv((function(){var U=console[k];return console[k]=function(){for(var F=[],G=0;G=F-j&&Ym(U)<=wp(G,j);var U,F,G,j}));return 1===U.length?U[0]:void 0}}}function Ym(k){return wp(k.startTime,k.duration)}function Qm(k,B,U,F){k.subscribe(6,(function(G){k.notify(10,function(k,B,U,F){var G,j="xhr"===k.type?"xhr":"fetch",$=zm(k),H=$?fp($.startTime):k.startClocks,V=$?Zm($):void 0,W=function(k,B){if(!(k.traceSampled&&k.traceId&&k.spanId))return;return{_dd:{span_id:k.spanId.toDecimalString(),trace_id:k.traceId.toDecimalString(),rule_psr:Jm(B)}}}(k,B),q=ty(U,H),K=pp(k.duration),z=function(k,B){if(!Np("resource_durations"))return;return{_dd:{computed_duration:k,performance_entry_duration:B,override_duration_diff:B?k-B:void 0}}}(K,null==V?void 0:V.resource.duration),Y=ey(F,H,null!==(G=null==$?void 0:$.duration)&&void 0!==G?G:k.duration),Q=np({date:H.timeStamp,resource:{id:kb(),type:j,duration:K,method:k.method,status_code:k.status,url:k.url},type:"resource"},W,V,q,z,Y);return{startTime:H.relative,rawRumEvent:Q,domainContext:{performanceEntry:$&&$,xhr:k.xhr,response:k.response,requestInput:k.input,requestInit:k.init,error:k.error}}}(G,B,U,F))})),k.subscribe(0,(function(G){for(var j=0,$=G;j<$.length;j++){var H=$[j];"resource"===H.entryType&&("xmlhttprequest"!==(V=H).initiatorType&&"fetch"!==V.initiatorType)&&k.notify(10,Xm(H,B,U,F))}var V}))}function Xm(k,B,U,F){var G=qv(k),j=Zm(k),$=fp(k.startTime),H=function(k,B){if(!k.traceId)return;return{_dd:{trace_id:k.traceId,rule_psr:Jm(B)}}}(k,B),V=ty(U,$),W=ey(F,$,k.duration),q=np({date:$.timeStamp,resource:{id:kb(),type:G,url:k.name},type:"resource"},H,j,V,W);return{startTime:$.relative,rawRumEvent:q,domainContext:{performanceEntry:k}}}function Zm(k){return{resource:xb({duration:(B=k,U=B.duration,F=B.startTime,G=B.responseEnd,pp(0===U&&F=0&&G.responseStart<=mp()?G.responseStart:void 0})}})).unsubscribe}}(k,F).stop,j=function(k,B){var U=iy();return{stop:k.subscribe(0,(function(k){var F=Vb(k,(function(k){return"paint"===k.entryType&&"first-contentful-paint"===k.name&&k.startTime=0;U-=1){var F=k[U];if(B(F,U,k))return F}}(k,(function(k){return"largest-contentful-paint"===k.entryType&&k.startTime=0?G:0,firstInputTime:F.startTime})}})).unsubscribe}}(k,(function(k){F({firstInputDelay:k.firstInputDelay,firstInputTime:k.firstInputTime})})).stop;return{stop:function(){G(),j(),$(),H()}}}function ay(k,B,U,F,G,j){var $,H={},V=function(k,B,U,F,G,j){var $="initial_load"===F,H=!0,V=[];function W(){!H&&!$&&V.length>0&&j(Math.max.apply(Math,V))}return{stop:em(k,B,U,(function(k){H&&(H=!1,k.hadActivity&&V.push(Ep(G.timeStamp,k.end)),W())})).stop,setLoadEvent:function(k){$&&($=!1,V.push(k),W())}}}(k,B,U,G,j,(function(k){H.loadingTime=k,F()})),W=V.stop,q=V.setLoadEvent;return lg("layout-shift")?(H.cumulativeLayoutShift=0,$=function(k,B){var U=0,F=function(){var k,B,U=0;return{update:function(F){void 0===k||F.startTime-B>=Pb||F.startTime-k>=5e3?(k=B=F.startTime,U=F.value):(U+=F.value,B=F.startTime)},value:function(){return U}}}();return{stop:k.subscribe(0,(function(k){for(var G=0,j=k;GU&&(U=F.value(),B(Ub(U,4))))}})).unsubscribe}}(k,(function(k){H.cumulativeLayoutShift=k,F()})).stop):$=Fb,{stop:function(){W(),$()},setLoadEvent:q,viewMetrics:H}}function ry(k,B,U,F,G,j,$){var H,V=function(G){var j=oy(B,U,F,k,"initial_load",_p(),G),$=ny(B,(function(k){j.updateTimings(k),j.scheduleUpdate()})).stop;return{initialView:j,stop:$}}($),W=V.stop,q=V.initialView,K=function(){B.subscribe(8,(function(){q.end(),q=z(void 0,{name:q.name,service:q.service,version:q.version})})),B.subscribe(9,(function(k){k.reason!==Rv.UNLOADING&&k.reason!==Rv.PAGEHIDE||(q.end(),q.triggerUpdate())}));var k=window.setInterval(Ab((function(){q.triggerUpdate()})),3e5);return{stop:function(){clearInterval(k)}}}().stop;function z(G,j){return oy(B,U,F,k,"route_change",G,j)}return j&&(H=function(k){return k.subscribe((function(k){var B,U,F,G,j=k.oldLocation,$=k.newLocation;if(U=$,(B=j).pathname!==U.pathname||(F=U.hash,G=F.substr(1),!document.getElementById(G)&&hy(U.hash)!==hy(B.hash)))return q.end(),q.triggerUpdate(),void(q=z())}))}(G)),{addTiming:function(k,B){void 0===B&&(B=gp()),q.addTiming(k,B),q.scheduleUpdate()},startView:function(k,B){q.end(B),q.triggerUpdate(),q=z(B,k)},stop:function(){null==H||H.unsubscribe(),W(),K(),q.end()}}}function oy(k,B,U,F,G,j,$){void 0===j&&(j=yp());var H,V,W,q,K=kb(),z={},Y={},Q=0,X=Lb(F);$&&(V=$.name,W=$.service,q=$.version),k.notify(2,{id:K,name:V,startClocks:j,service:W,version:q});var Z=Nb(ht,3e3,{leading:!1}),J=Z.throttled,tt=Z.cancel,et=ay(k,B,U,J,G,j),it=et.setLoadEvent,st=et.stop,nt=et.viewMetrics,at=function(k,B,U){var F=Jg({lifeCycle:k,isChildEvent:function(k){return k.view.id===B},onChange:U}),G=F.stop;return{scheduleStop:function(){Db(G,3e5)},eventCounts:F.eventCounts}}(k,K,J),rt=at.scheduleStop,ot=at.eventCounts;function ht(){Q+=1;var B=void 0===H?gp():H.timeStamp;k.notify(3,xb({customTimings:Y,documentVersion:Q,id:K,name:V,service:W,version:q,loadingType:G,location:X,startClocks:j,timings:z,duration:Ep(j.timeStamp,B),isActive:void 0===H,eventCounts:ot},nt))}return ht(),{name:V,service:W,version:q,scheduleUpdate:J,end:function(B){void 0===B&&(B=yp()),H=B,k.notify(4,{endClocks:H}),st(),rt()},triggerUpdate:function(){tt(),ht()},updateTimings:function(k){z=k,void 0!==k.loadEvent&&it(k.loadEvent)},addTiming:function(k,B){var U=function(k){return k<31536e6}(B)?B:Ep(j.timeStamp,B);Y[function(k){var B=k.replace(/[^a-zA-Z0-9-_.@$]/g,"_");B!==k&&yb.warn("Invalid timing name: ".concat(k,", sanitized to: ").concat(B));return B}(k)]=U}}}function hy(k){var B=k.indexOf("?");return B<0?k:k.slice(0,B)}function cy(k,B,U,F,G,j,$,H,V){return k.subscribe(3,(function(B){return k.notify(10,function(k,B,U,F){var G=F.getReplayStats(k.id),j=U.findFeatureFlagEvaluations(k.startClocks.relative),$={_dd:{document_version:k.documentVersion,replay_stats:G},date:k.startClocks.timeStamp,type:"view",view:{action:{count:k.eventCounts.actionCount},frustration:{count:k.eventCounts.frustrationCount},cumulative_layout_shift:k.cumulativeLayoutShift,first_byte:pp(k.timings.firstByte),dom_complete:pp(k.timings.domComplete),dom_content_loaded:pp(k.timings.domContentLoaded),dom_interactive:pp(k.timings.domInteractive),error:{count:k.eventCounts.errorCount},first_contentful_paint:pp(k.timings.firstContentfulPaint),first_input_delay:pp(k.timings.firstInputDelay),first_input_time:pp(k.timings.firstInputTime),is_active:k.isActive,name:k.name,largest_contentful_paint:pp(k.timings.largestContentfulPaint),load_event:pp(k.timings.loadEvent),loading_time:dy(pp(k.loadingTime)),loading_type:k.loadingType,long_task:{count:k.eventCounts.longTaskCount},resource:{count:k.eventCounts.resourceCount},time_spent:pp(k.duration),in_foreground_periods:B.selectInForegroundPeriodsFor(k.startClocks.relative,k.duration)},feature_flags:j&&!Yb(j)?j:void 0,session:{has_replay:!!G||void 0}};Yb(k.customTimings)||($.view.custom_timings=function(k,B){for(var U={},F=0,G=Object.keys(k);F=100)yy();else{var F,G=wy();if(gy()){if(G.lock)return void my(k,B);if(F=kb(),G.lock=F,Ey(G,k.options),(G=wy()).lock!==F)return void my(k,B)}var j=k.process(G);if(gy()&&(G=wy()).lock!==F)my(k,B);else{if(j&&_y(j,k.options),gy()&&(!j||!Ty(j))){if((G=wy()).lock!==F)return void my(k,B);delete G.lock,Ey(G,k.options),j=G}null===(U=k.after)||void 0===U||U.call(k,j||G),yy()}}else py.push(k)}function gy(){return!!window.chrome||/HeadlessChrome/.test(window.navigator.userAgent)}function my(k,B){Db((function(){vy(k,B+1)}),10)}function yy(){ly=void 0;var k=py.shift();k&&vy(k)}function _y(k,B){Ty(k)?function(k){Cp(by,"",0,k)}(B):(k.expire=String(vp()+Lg),Ey(k,B))}function Ey(k,B){Cp(by,function(k){return zb(k).map((function(k){var B=k[0],U=k[1];return"".concat(B,"=").concat(U)})).join(fy)}(k),Lg,B)}function wy(){var k=Op(by),B={};return function(k){return void 0!==k&&(-1!==k.indexOf(fy)||uy.test(k))}(k)&&k.split(fy).forEach((function(k){var U=uy.exec(k);if(null!==U){var F=U[1],G=U[2];B[F]=G}})),B}function Ty(k){return Yb(k)}function Sy(k,B,U){var F=new Cv,G=new Cv,j=setInterval(Ab((function(){vy({options:k,process:function(k){return W(k)?void 0:{}},after:H})})),1e3),$=function(){var k=wy();if(W(k))return k;return{}}();function H(k){return W(k)||(k={}),V()&&(!function(k){return $.id!==k.id||$[B]!==k[B]}(k)?$=k:($={},G.notify())),k}function V(){return void 0!==$[B]}function W(k){return(void 0===k.created||vp()-Number(k.created)=this.messageBytesLimit?yb.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit,"KB.")):(this.hasMessageFor(B)&&this.remove(B),this.willReachedBytesLimitWith(G)&&this.flush("batch_bytes_limit"),this.push(F,G,B),this.isFull()&&this.flush("batch_bytes_limit"))},k.prototype.process=function(k){var B=Gb(k);return{processedMessage:B,messageBytesCount:cp(B)}},k.prototype.push=function(k,B,U){this.bufferMessagesCount>0&&(this.bufferBytesCount+=1),void 0!==U?this.upsertBuffer[U]=k:this.pushOnlyBuffer.push(k),this.bufferBytesCount+=B,this.bufferMessagesCount+=1},k.prototype.remove=function(k){var B=this.upsertBuffer[k];delete this.upsertBuffer[k];var U=cp(B);this.bufferBytesCount-=U,this.bufferMessagesCount-=1,this.bufferMessagesCount>0&&(this.bufferBytesCount-=1)},k.prototype.hasMessageFor=function(k){return void 0!==k&&void 0!==this.upsertBuffer[k]},k.prototype.willReachedBytesLimitWith=function(k){return this.bufferBytesCount+k+1>=this.batchBytesLimit},k.prototype.isFull=function(){return this.bufferMessagesCount===this.batchMessagesLimit||this.bufferBytesCount>=this.batchBytesLimit},k.prototype.flushPeriodically=function(){var k=this;Db((function(){k.flush("batch_duration_limit"),k.flushPeriodically()}),this.flushTimeout)},k}(),Ry=3145728;function Py(k,B,U,F,G){0===B.transportStatus&&0===B.queuedPayloads.size()&&B.bandwidthMonitor.canHandle(k)?Ny(k,B,U,{onSuccess:function(){return xy(0,B,U,F,G)},onFailure:function(){B.queuedPayloads.enqueue(k),My(B,U,F,G)}}):B.queuedPayloads.enqueue(k)}function My(k,B,U,F){2===k.transportStatus&&Db((function(){Ny(k.queuedPayloads.first(),k,B,{onSuccess:function(){k.queuedPayloads.dequeue(),k.currentBackoffTime=1e3,xy(1,k,B,U,F)},onFailure:function(){k.currentBackoffTime=Math.min(6e4,2*k.currentBackoffTime),My(k,B,U,F)}})}),k.currentBackoffTime)}function Ny(k,B,U,F){var G=F.onSuccess,j=F.onFailure;B.bandwidthMonitor.add(k),U(k,(function(U){B.bandwidthMonitor.remove(k),!function(k){return"opaque"!==k.type&&(0===k.status&&!navigator.onLine||408===k.status||429===k.status||k.status>=500)}(U)?(B.transportStatus=0,G()):(B.transportStatus=B.bandwidthMonitor.ongoingRequestCount>0?1:2,k.retry={count:k.retry?k.retry.count+1:1,lastFailureStatus:U.status},j())}))}function xy(k,B,U,F,G){0===k&&B.queuedPayloads.isFull()&&!B.queueFullReported&&(G({message:"Reached max ".concat(F," events size queued for upload: ").concat(3,"MiB"),source:Kp,startClocks:yp()}),B.queueFullReported=!0);var j=B.queuedPayloads;for(B.queuedPayloads=Ly();j.size()>0;)Py(j.dequeue(),B,U,F,G)}function Ly(){var k=[];return{bytesCount:0,enqueue:function(B){this.isFull()||(k.push(B),this.bytesCount+=B.bytesCount)},first:function(){return k[0]},dequeue:function(){var B=k.shift();return B&&(this.bytesCount-=B.bytesCount),B},size:function(){return k.length},isFull:function(){return this.bytesCount>=Ry}}}function ky(k,B,U){var F={transportStatus:0,currentBackoffTime:1e3,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(k){return 0===this.ongoingRequestCount||this.ongoingByteCount+k.bytesCount<=81920&&this.ongoingRequestCount<32},add:function(k){this.ongoingRequestCount+=1,this.ongoingByteCount+=k.bytesCount},remove:function(k){this.ongoingRequestCount-=1,this.ongoingByteCount-=k.bytesCount}},queuedPayloads:Ly(),queueFullReported:!1},G=function(U,F){return function(k,B,U,F){var G=U.data,j=U.bytesCount,$=U.flushReason,H=U.retry;if(function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(U){return!1}}()&&j0?Array.from(k.media):void 0}}))}function Z_(k,B,U){return J_(k,{serializationContext:U,parentNodePrivacyLevel:B.defaultPrivacyLevel,configuration:B})}function J_(k,B){var U=function(k,B){switch(k.nodeType){case k.DOCUMENT_NODE:return function(k,B){return{type:r_,childNodes:tE(k,B),adoptedStyleSheets:X_(k.adoptedStyleSheets)}}(k,B);case k.DOCUMENT_FRAGMENT_NODE:return function(k,B){var U=[];k.childNodes.length&&(U=tE(k,B));var F=sg(k);F&&B.serializationContext.shadowRootsController.addShadowRoot(k);return{type:l_,childNodes:U,isShadowRoot:F,adoptedStyleSheets:F?X_(k.adoptedStyleSheets):void 0}}(k,B);case k.DOCUMENT_TYPE_NODE:return{type:o_,name:(U=k).name,publicId:U.publicId,systemId:U.systemId};case k.ELEMENT_NODE:return function(k,B){var U,F=nE(k.tagName),G=($=k,"svg"===$.tagName||$ instanceof SVGElement||void 0),j=U_(F_(k),B.parentNodePrivacyLevel);var $;if(j===M_.HIDDEN){var H=k.getBoundingClientRect(),V=H.width,W=H.height;return{type:h_,tagName:F,attributes:(U={rr_width:"".concat(V,"px"),rr_height:"".concat(W,"px")},U[N_]=x_,U),childNodes:[],isSVG:G}}if(j===M_.IGNORE)return;var q=function(k,B,U){var F;if(B===M_.HIDDEN)return{};for(var G={},j=nE(k.tagName),$=k.ownerDocument,H=0;H1e5&&"data:"===G.slice(0,5)?"data:truncated":G}var iE=1;var sE=/[^a-z1-6-_]/;function nE(k){var B=k.toLowerCase().trim();return sE.test(B)?"div":B}function aE(k){if(!k)return null;var B;try{B=k.rules||k.cssRules}catch(me){}return B?Q_(Array.from(B,rE).join(""),k.href):null}function rE(k){return function(k){return"styleSheet"in k}(k)?aE(k.styleSheet)||"":k.cssText}function oE(k){return Boolean(k.changedTouches)}function hE(k,B){return{data:xb({source:k},B),type:t_,timestamp:gp()}}function cE(k){for(var B=[],U=k;U.parentRule;){var F=Array.from(U.parentRule.cssRules).indexOf(U);B.unshift(F),U=U.parentRule}if(U.parentStyleSheet){var G=Array.from(U.parentStyleSheet.cssRules).indexOf(U);return B.unshift(G),B}}var dE=function(k,B){var U=window.visualViewport,F={layoutViewportX:k,layoutViewportY:B,visualViewportX:k,visualViewportY:B};return U?(!function(){var k=window.visualViewport;return Math.abs(k.pageTop-k.offsetTop-window.scrollY)>25||Math.abs(k.pageLeft-k.offsetLeft-window.scrollX)>25}()?(F.visualViewportX=Math.round(k-U.offsetLeft),F.visualViewportY=Math.round(B-U.offsetTop)):(F.layoutViewportX=Math.round(k+U.offsetLeft),F.layoutViewportY=Math.round(B+U.offsetTop)),F):F},lE=function(){var k=window.visualViewport;return{scale:k.scale,offsetLeft:k.offsetLeft,offsetTop:k.offsetTop,pageLeft:k.pageLeft,pageTop:k.pageTop,height:k.height,width:k.width}};function uE(){var k,B=window.visualViewport;return k=B?B.pageLeft-B.offsetLeft:void 0!==window.scrollX?window.scrollX:window.pageXOffset||0,Math.round(k)}function fE(){var k,B=window.visualViewport;return k=B?B.pageTop-B.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0,Math.round(k)}function bE(k){return!0===k.composed&&ig(k.target)?k.composedPath()[0]:k.target}var pE=new WeakMap,vE=1;function gE(k){return pE.has(k)||pE.set(k,vE++),pE.get(k)}function mE(k){var B=oE(k)?k.changedTouches[0]:k,U=B.clientX,F=B.clientY;if(window.visualViewport){var G=dE(U,F);U=G.visualViewportX,F=G.visualViewportY}if(Number.isFinite(U)&&Number.isFinite(F))return{x:U,y:F};k.isTrusted&&Uv("mouse/touch event without x/y")}var yE;var _E=((yE={}).pointerup=E_,yE.mousedown=w_,yE.click=T_,yE.contextmenu=S_,yE.dblclick=A_,yE.focus=C_,yE.blur=O_,yE.touchstart=I_,yE.touchend=D_,yE);function EE(k,B,U){var F=void 0===U?{}:U,G=F.domEvents,j=void 0===G?["input","change"]:G,$=F.target,H=void 0===$?document:$,V=new WeakMap;function W(k){var U=B_(k,B);if(U!==M_.HIDDEN){var F,G=k.type;if("radio"===G||"checkbox"===G){if(G_(k,U))return;F={isChecked:k.checked}}else{var j=q_(k,U);if(void 0===j)return;F={text:j}}q(k,F);var $,H,V=k.name;"radio"===G&&V&&k.checked&&($=document.querySelectorAll('input[type="radio"][name="'.concat(V,'"]')),H=function(B){B!==k&&q(B,{isChecked:!1})},Array.prototype.forEach.call($,H))}}function q(B,U){if(V_(B)){var F=V.get(B);F&&F.text===U.text&&F.isChecked===U.isChecked||(V.set(B,U),k(xb({id:W_(B)},U)))}}var K=Dv(H,j,(function(k){var B=bE(k);(B instanceof HTMLInputElement||B instanceof HTMLTextAreaElement||B instanceof HTMLSelectElement)&&W(B)}),{capture:!0,passive:!0}).stop,z=[Gg(HTMLInputElement.prototype,"value",W),Gg(HTMLInputElement.prototype,"checked",W),Gg(HTMLSelectElement.prototype,"value",W),Gg(HTMLTextAreaElement.prototype,"value",W),Gg(HTMLSelectElement.prototype,"selectedIndex",W)];return function(){z.forEach((function(k){return k.stop()})),K()}}function wE(k){var B=Fb,U=[];function F(){B(),k(U),U=[]}return{addMutations:function(k){0===U.length&&(B=function(k,B){if(window.requestIdleCallback&&window.cancelIdleCallback){var U=window.requestIdleCallback(Ab(k),B);return function(){return window.cancelIdleCallback(U)}}var F=window.requestAnimationFrame(Ab(k));return function(){return window.cancelAnimationFrame(F)}}(F,{timeout:100})),U.push.apply(U,k)},flush:F,stop:function(){B()}}}function TE(k,B,U,F){var G=$v();if(!G)return{stop:Fb,flush:Fb};var j=wE((function(G){!function(k,B,U,F,G){k.filter((function(k){return"childList"===k.type})).forEach((function(k){k.removedNodes.forEach((function(k){SE(k,F.removeShadowRoot)}))}));var j=k.filter((function(k){return G.contains(k.target)&&function(k){for(var B=k;B;){if(!V_(B)&&!sg(B))return!1;B=ng(B)}return!0}(k.target)&&B_(k.target,U.defaultPrivacyLevel)!==M_.HIDDEN})),$=function(k,B,U){for(var F=new Set,G=new Map,j=function(k){k.addedNodes.forEach((function(k){F.add(k)})),k.removedNodes.forEach((function(B){F.has(B)||G.set(B,k.target),F.delete(B)}))},$=0,H=k;$10&&function(){if(!DE)return;if(DE.keys)DE.delete(DE.keys().next().value);else{var k=!0;DE.forEach((function(B,U){k&&(DE.delete(U),k=!1)}))}}()),B}var xE,LE=0,kE=function(){function k(k,B,U,F,G,j){var $=this;this.worker=k,this.id=LE++;var H=B.view.id;this.metadata=xb({start:F.timestamp,end:F.timestamp,creation_reason:U,records_count:1,has_full_snapshot:F.type===Jy,index_in_view:RE(H),source:"browser"},B),function(k){NE(k).segments_count+=1}(H),PE(H);var V=Ab((function(B){var U=B.data;"errored"!==U.type&&"initialized"!==U.type&&(U.id===$.id?(!function(k,B){NE(k).segments_total_raw_size+=B}(H,U.additionalBytesCount),"flushed"===U.type?(j(U.result,U.rawBytesCount),k.removeEventListener("message",V)):G(U.compressedBytesCount)):U.id>$.id&&(k.removeEventListener("message",V),Uv("Segment did not receive a 'flush' response before being replaced.")))}));k.addEventListener("message",V),Av("record",{record:F,segment:this.metadata}),this.worker.postMessage({data:'{"records":['.concat(JSON.stringify(F)),id:this.id,action:"write"})}return k.prototype.addRecord=function(k){var B;this.metadata.start=Math.min(this.metadata.start,k.timestamp),this.metadata.end=Math.max(this.metadata.end,k.timestamp),this.metadata.records_count+=1,PE(this.metadata.view.id),(B=this.metadata).has_full_snapshot||(B.has_full_snapshot=k.type===Jy),Av("record",{record:k,segment:this.metadata}),this.worker.postMessage({data:",".concat(JSON.stringify(k)),id:this.id,action:"write"})},k.prototype.flush=function(k){this.worker.postMessage({data:"],".concat(JSON.stringify(this.metadata).slice(1),"\n"),id:this.id,action:"flush"}),this.flushReason=k},k}(),BE=6e4;function UE(k,B,U,F,G,j){return function(k,B,U,F){var G={status:0,nextSegmentCreationReason:"init"},j=k.subscribe(2,(function(){H("view_change")})).unsubscribe,$=k.subscribe(9,(function(k){H(k.reason)})).unsubscribe;function H(k){1===G.status&&(G.segment.flush(k),Rb(G.expirationTimeoutId)),G="stop"!==k?{status:0,nextSegmentCreationReason:k}:{status:2}}function V(k,j){var $=B();if($){var V=new kE(F,$,k,j,(function(k){!V.flushReason&&k>BE&&H("segment_bytes_limit")}),(function(k,B){var F,G=OE(k,V.metadata,B);F=V.flushReason,$b(Kb(Rv),F)?U.sendOnExit(G):U.send(G)}));G={status:1,segment:V,expirationTimeoutId:Db((function(){H("segment_duration_limit")}),3e4)}}}return{addRecord:function(k){switch(G.status){case 0:V(G.nextSegmentCreationReason,k);break;case 1:G.segment.addRecord(k)}},stop:function(){H("stop"),j(),$()}}}(k,(function(){return function(k,B,U){var F=B.findTrackedSession(),G=U.findView();if(!F||!G)return;return{application:{id:k},session:{id:F.id},view:{id:G.id}}}(B,U,F)}),G,j)}function FE(){return xE||(xE=URL.createObjectURL(new Blob(["(".concat(GE,")(self)")]))),new Worker(xE)}function GE(){function k(k){return function(){try{return k.apply(this,arguments)}catch(e){try{self.postMessage({type:"errored",error:e})}catch(B){self.postMessage({type:"errored",error:"".concat(e)})}}}}k((function(){var B=function(){var k=4,B=0,U=1,F=2;function G(k){for(var B=k.length;--B>=0;)k[B]=0}var j=0,$=1,H=2,V=3,W=258,q=29,K=256,z=K+1+q,Y=30,Q=19,X=2*z+1,Z=15,J=16,tt=7,et=256,it=16,st=17,nt=18,at=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),rt=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),ot=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),ht=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ct=512,dt=new Array(2*(z+2));G(dt);var lt=new Array(2*Y);G(lt);var ut=new Array(ct);G(ut);var ft=new Array(W-V+1);G(ft);var bt=new Array(q);G(bt);var pt,vt,gt,mt=new Array(Y);function yt(k,B,U,F,G){this.static_tree=k,this.extra_bits=B,this.extra_base=U,this.elems=F,this.max_length=G,this.has_stree=k&&k.length}function _t(k,B){this.dyn_tree=k,this.max_code=0,this.stat_desc=B}G(mt);var Et=function(k){return k<256?ut[k]:ut[256+(k>>>7)]},wt=function(k,B){k.pending_buf[k.pending++]=255&B,k.pending_buf[k.pending++]=B>>>8&255},Tt=function(k,B,U){k.bi_valid>J-U?(k.bi_buf|=B<>J-k.bi_valid,k.bi_valid+=U-J):(k.bi_buf|=B<>>=1,U<<=1}while(--B>0);return U>>>1},Ct=function(k){16===k.bi_valid?(wt(k,k.bi_buf),k.bi_buf=0,k.bi_valid=0):k.bi_valid>=8&&(k.pending_buf[k.pending++]=255&k.bi_buf,k.bi_buf>>=8,k.bi_valid-=8)},Ot=function(k,B){var U,F,G,j,$,H,V=B.dyn_tree,W=B.max_code,q=B.stat_desc.static_tree,K=B.stat_desc.has_stree,z=B.stat_desc.extra_bits,Y=B.stat_desc.extra_base,Q=B.stat_desc.max_length,J=0;for(j=0;j<=Z;j++)k.bl_count[j]=0;for(V[2*k.heap[k.heap_max]+1]=0,U=k.heap_max+1;UQ&&(j=Q,J++),V[2*F+1]=j,F>W||(k.bl_count[j]++,$=0,F>=Y&&($=z[F-Y]),H=V[2*F],k.opt_len+=H*(j+$),K&&(k.static_len+=H*(q[2*F+1]+$)));if(0!==J){do{for(j=Q-1;0===k.bl_count[j];)j--;k.bl_count[j]--,k.bl_count[j+1]+=2,k.bl_count[Q]--,J-=2}while(J>0);for(j=Q;0!==j;j--)for(F=k.bl_count[j];0!==F;)(G=k.heap[--U])>W||(V[2*G+1]!==j&&(k.opt_len+=(j-V[2*G+1])*V[2*G],V[2*G+1]=j),F--)}},It=function(k,B,U){var F,G,j=new Array(Z+1),$=0;for(F=1;F<=Z;F++)j[F]=$=$+U[F-1]<<1;for(G=0;G<=B;G++){var H=k[2*G+1];0!==H&&(k[2*G]=At(j[H]++,H))}},Dt=function(){var k,B,U,F,G,j=new Array(Z+1);for(U=0,F=0;F>=7;F8?wt(k,k.bi_buf):k.bi_valid>0&&(k.pending_buf[k.pending++]=k.bi_buf),k.bi_buf=0,k.bi_valid=0},Mt=function(k,B,U,F){Pt(k),F&&(wt(k,U),wt(k,~U)),k.pending_buf.set(k.window.subarray(B,B+U),k.pending),k.pending+=U},Nt=function(k,B,U,F){var G=2*B,j=2*U;return k[G]>1;U>=1;U--)xt(k,j,U);G=V;do{U=k.heap[1],k.heap[1]=k.heap[k.heap_len--],xt(k,j,1),F=k.heap[1],k.heap[--k.heap_max]=U,k.heap[--k.heap_max]=F,j[2*G]=j[2*U]+j[2*F],k.depth[G]=(k.depth[U]>=k.depth[F]?k.depth[U]:k.depth[F])+1,j[2*U+1]=j[2*F+1]=G,k.heap[1]=G++,xt(k,j,1)}while(k.heap_len>=2);k.heap[--k.heap_max]=k.heap[1],Ot(k,B),It(j,W,k.bl_count)},Bt=function(k,B,U){var F,G,j=-1,$=B[1],H=0,V=7,W=4;for(0===$&&(V=138,W=3),B[2*(U+1)+1]=65535,F=0;F<=U;F++)G=$,$=B[2*(F+1)+1],++H=3&&0===k.bl_tree[2*ht[B]+1];B--);return k.opt_len+=3*(B+1)+5+5+4,B},Gt=function(k,B,U,F){var G;for(Tt(k,B-257,5),Tt(k,U-1,5),Tt(k,F-4,4),G=0;G>>=1)if(1&G&&0!==k.dyn_ltree[2*F])return B;if(0!==k.dyn_ltree[18]||0!==k.dyn_ltree[20]||0!==k.dyn_ltree[26])return U;for(F=32;F0?(B.strm.data_type===F&&(B.strm.data_type=jt(B)),kt(B,B.l_desc),kt(B,B.d_desc),q=Ft(B),V=B.opt_len+3+7>>>3,(W=B.static_len+3+7>>>3)<=V&&(V=W)):V=W=G+5,G+4<=V&&-1!==U?Ht(B,U,G,j):B.strategy===k||W===V?(Tt(B,($<<1)+(j?1:0),3),Lt(B,dt,lt)):(Tt(B,(H<<1)+(j?1:0),3),Gt(B,B.l_desc.max_code+1,B.d_desc.max_code+1,q+1),Lt(B,B.dyn_ltree,B.dyn_dtree)),Rt(B),j&&Pt(B)},Wt={_tr_init:function(k){$t||(Dt(),$t=!0),k.l_desc=new _t(k.dyn_ltree,pt),k.d_desc=new _t(k.dyn_dtree,vt),k.bl_desc=new _t(k.bl_tree,gt),k.bi_buf=0,k.bi_valid=0,Rt(k)},_tr_stored_block:Ht,_tr_flush_block:Vt,_tr_tally:function(k,B,U){return k.pending_buf[k.d_buf+2*k.last_lit]=B>>>8&255,k.pending_buf[k.d_buf+2*k.last_lit+1]=255&B,k.pending_buf[k.l_buf+k.last_lit]=255&U,k.last_lit++,0===B?k.dyn_ltree[2*U]++:(k.matches++,B--,k.dyn_ltree[2*(ft[U]+K+1)]++,k.dyn_dtree[2*Et(B)]++),k.last_lit===k.lit_bufsize-1},_tr_align:function(k){Tt(k,$<<1,3),St(k,et,dt),Ct(k)}},qt=function(k,B,U,F){for(var G=65535&k|0,j=k>>>16&65535|0,$=0;0!==U;){U-=$=U>2e3?2e3:U;do{j=j+(G=G+B[F++]|0)|0}while(--$);G%=65521,j%=65521}return G|j<<16|0},Kt=new Uint32Array(function(){for(var k,B=[],U=0;U<256;U++){k=U;for(var F=0;F<8;F++)k=1&k?3988292384^k>>>1:k>>>1;B[U]=k}return B}()),zt=function(k,B,U,F){var G=Kt,j=F+U;k^=-1;for(var $=F;$>>8^G[255&(k^B[$])];return-1^k},Yt={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Qt={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},Xt=Wt._tr_init,Zt=Wt._tr_stored_block,Jt=Wt._tr_flush_block,te=Wt._tr_tally,ee=Wt._tr_align,ie=Qt.Z_NO_FLUSH,se=Qt.Z_PARTIAL_FLUSH,ne=Qt.Z_FULL_FLUSH,ae=Qt.Z_FINISH,re=Qt.Z_BLOCK,oe=Qt.Z_OK,he=Qt.Z_STREAM_END,ce=Qt.Z_STREAM_ERROR,de=Qt.Z_DATA_ERROR,le=Qt.Z_BUF_ERROR,ue=Qt.Z_DEFAULT_COMPRESSION,fe=Qt.Z_FILTERED,be=Qt.Z_HUFFMAN_ONLY,pe=Qt.Z_RLE,ve=Qt.Z_FIXED,ge=Qt.Z_DEFAULT_STRATEGY,me=Qt.Z_UNKNOWN,ye=Qt.Z_DEFLATED,_e=9,Ee=15,we=8,Te=286,Se=30,Ae=19,Ce=2*Te+1,Oe=15,Ie=3,De=258,Re=De+Ie+1,Pe=32,Me=42,Ne=69,xe=73,Le=91,ke=103,Be=113,Ue=666,Fe=1,Ge=2,je=3,$e=4,He=3,Ve=function(k,B){return k.msg=Yt[B],B},We=function(k){return(k<<1)-(k>4?9:0)},qe=function(k){for(var B=k.length;--B>=0;)k[B]=0},Ke=function(k,B,U){return(B<k.avail_out&&(U=k.avail_out),0!==U&&(k.output.set(B.pending_buf.subarray(B.pending_out,B.pending_out+U),k.next_out),k.next_out+=U,B.pending_out+=U,k.total_out+=U,k.avail_out-=U,B.pending-=U,0===B.pending&&(B.pending_out=0))},Ye=function(k,B){Jt(k,k.block_start>=0?k.block_start:-1,k.strstart-k.block_start,B),k.block_start=k.strstart,ze(k.strm)},Qe=function(k,B){k.pending_buf[k.pending++]=B},Xe=function(k,B){k.pending_buf[k.pending++]=B>>>8&255,k.pending_buf[k.pending++]=255&B},Ze=function(k,B,U,F){var G=k.avail_in;return G>F&&(G=F),0===G?0:(k.avail_in-=G,B.set(k.input.subarray(k.next_in,k.next_in+G),U),1===k.state.wrap?k.adler=qt(k.adler,B,G,U):2===k.state.wrap&&(k.adler=zt(k.adler,B,G,U)),k.next_in+=G,k.total_in+=G,G)},Je=function(k,B){var U,F,G=k.max_chain_length,j=k.strstart,$=k.prev_length,H=k.nice_match,V=k.strstart>k.w_size-Re?k.strstart-(k.w_size-Re):0,W=k.window,q=k.w_mask,K=k.prev,z=k.strstart+De,Y=W[j+$-1],Q=W[j+$];k.prev_length>=k.good_match&&(G>>=2),H>k.lookahead&&(H=k.lookahead);do{if(W[(U=B)+$]===Q&&W[U+$-1]===Y&&W[U]===W[j]&&W[++U]===W[j+1]){j+=2,U++;do{}while(W[++j]===W[++U]&&W[++j]===W[++U]&&W[++j]===W[++U]&&W[++j]===W[++U]&&W[++j]===W[++U]&&W[++j]===W[++U]&&W[++j]===W[++U]&&W[++j]===W[++U]&&j$){if(k.match_start=B,$=F,F>=H)break;Y=W[j+$-1],Q=W[j+$]}}}while((B=K[B&q])>V&&0!=--G);return $<=k.lookahead?$:k.lookahead},ti=function(k){var B,U,F,G,j,$=k.w_size;do{if(G=k.window_size-k.lookahead-k.strstart,k.strstart>=$+($-Re)){k.window.set(k.window.subarray($,$+$),0),k.match_start-=$,k.strstart-=$,k.block_start-=$,B=U=k.hash_size;do{F=k.head[--B],k.head[B]=F>=$?F-$:0}while(--U);B=U=$;do{F=k.prev[--B],k.prev[B]=F>=$?F-$:0}while(--U);G+=$}if(0===k.strm.avail_in)break;if(U=Ze(k.strm,k.window,k.strstart+k.lookahead,G),k.lookahead+=U,k.lookahead+k.insert>=Ie)for(j=k.strstart-k.insert,k.ins_h=k.window[j],k.ins_h=Ke(k,k.ins_h,k.window[j+1]);k.insert&&(k.ins_h=Ke(k,k.ins_h,k.window[j+Ie-1]),k.prev[j&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=j,j++,k.insert--,!(k.lookahead+k.insert=Ie&&(k.ins_h=Ke(k,k.ins_h,k.window[k.strstart+Ie-1]),U=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),0!==U&&k.strstart-U<=k.w_size-Re&&(k.match_length=Je(k,U)),k.match_length>=Ie)if(F=te(k,k.strstart-k.match_start,k.match_length-Ie),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=Ie){k.match_length--;do{k.strstart++,k.ins_h=Ke(k,k.ins_h,k.window[k.strstart+Ie-1]),U=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart}while(0!=--k.match_length);k.strstart++}else k.strstart+=k.match_length,k.match_length=0,k.ins_h=k.window[k.strstart],k.ins_h=Ke(k,k.ins_h,k.window[k.strstart+1]);else F=te(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++;if(F&&(Ye(k,!1),0===k.strm.avail_out))return Fe}return k.insert=k.strstart=Ie&&(k.ins_h=Ke(k,k.ins_h,k.window[k.strstart+Ie-1]),U=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),k.prev_length=k.match_length,k.prev_match=k.match_start,k.match_length=Ie-1,0!==U&&k.prev_length4096)&&(k.match_length=Ie-1)),k.prev_length>=Ie&&k.match_length<=k.prev_length){G=k.strstart+k.lookahead-Ie,F=te(k,k.strstart-1-k.prev_match,k.prev_length-Ie),k.lookahead-=k.prev_length-1,k.prev_length-=2;do{++k.strstart<=G&&(k.ins_h=Ke(k,k.ins_h,k.window[k.strstart+Ie-1]),U=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart)}while(0!=--k.prev_length);if(k.match_available=0,k.match_length=Ie-1,k.strstart++,F&&(Ye(k,!1),0===k.strm.avail_out))return Fe}else if(k.match_available){if((F=te(k,0,k.window[k.strstart-1]))&&Ye(k,!1),k.strstart++,k.lookahead--,0===k.strm.avail_out)return Fe}else k.match_available=1,k.strstart++,k.lookahead--}return k.match_available&&(F=te(k,0,k.window[k.strstart-1]),k.match_available=0),k.insert=k.strstart=Ie&&k.strstart>0&&(F=$[G=k.strstart-1])===$[++G]&&F===$[++G]&&F===$[++G]){j=k.strstart+De;do{}while(F===$[++G]&&F===$[++G]&&F===$[++G]&&F===$[++G]&&F===$[++G]&&F===$[++G]&&F===$[++G]&&F===$[++G]&&Gk.lookahead&&(k.match_length=k.lookahead)}if(k.match_length>=Ie?(U=te(k,1,k.match_length-Ie),k.lookahead-=k.match_length,k.strstart+=k.match_length,k.match_length=0):(U=te(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++),U&&(Ye(k,!1),0===k.strm.avail_out))return Fe}return k.insert=0,B===ae?(Ye(k,!0),0===k.strm.avail_out?je:$e):k.last_lit&&(Ye(k,!1),0===k.strm.avail_out)?Fe:Ge},ni=function(k,B){for(var U;;){if(0===k.lookahead&&(ti(k),0===k.lookahead)){if(B===ie)return Fe;break}if(k.match_length=0,U=te(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++,U&&(Ye(k,!1),0===k.strm.avail_out))return Fe}return k.insert=0,B===ae?(Ye(k,!0),0===k.strm.avail_out?je:$e):k.last_lit&&(Ye(k,!1),0===k.strm.avail_out)?Fe:Ge};function ai(k,B,U,F,G){this.good_length=k,this.max_lazy=B,this.nice_length=U,this.max_chain=F,this.func=G}var ri=[new ai(0,0,0,0,(function(k,B){var U=65535;for(U>k.pending_buf_size-5&&(U=k.pending_buf_size-5);;){if(k.lookahead<=1){if(ti(k),0===k.lookahead&&B===ie)return Fe;if(0===k.lookahead)break}k.strstart+=k.lookahead,k.lookahead=0;var F=k.block_start+U;if((0===k.strstart||k.strstart>=F)&&(k.lookahead=k.strstart-F,k.strstart=F,Ye(k,!1),0===k.strm.avail_out))return Fe;if(k.strstart-k.block_start>=k.w_size-Re&&(Ye(k,!1),0===k.strm.avail_out))return Fe}return k.insert=0,B===ae?(Ye(k,!0),0===k.strm.avail_out?je:$e):(k.strstart>k.block_start&&(Ye(k,!1),k.strm.avail_out),Fe)})),new ai(4,4,8,4,ei),new ai(4,5,16,8,ei),new ai(4,6,32,32,ei),new ai(4,4,16,16,ii),new ai(8,16,32,32,ii),new ai(8,16,128,128,ii),new ai(8,32,128,256,ii),new ai(32,128,258,1024,ii),new ai(32,258,258,4096,ii)],oi=function(k){k.window_size=2*k.w_size,qe(k.head),k.max_lazy_match=ri[k.level].max_lazy,k.good_match=ri[k.level].good_length,k.nice_match=ri[k.level].nice_length,k.max_chain_length=ri[k.level].max_chain,k.strstart=0,k.block_start=0,k.lookahead=0,k.insert=0,k.match_length=k.prev_length=Ie-1,k.match_available=0,k.ins_h=0};function hi(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ye,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(2*Ce),this.dyn_dtree=new Uint16Array(2*(2*Se+1)),this.bl_tree=new Uint16Array(2*(2*Ae+1)),qe(this.dyn_ltree),qe(this.dyn_dtree),qe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Oe+1),this.heap=new Uint16Array(2*Te+1),qe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Te+1),qe(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var ci=function(k){if(!k||!k.state)return Ve(k,ce);k.total_in=k.total_out=0,k.data_type=me;var B=k.state;return B.pending=0,B.pending_out=0,B.wrap<0&&(B.wrap=-B.wrap),B.status=B.wrap?Me:Be,k.adler=2===B.wrap?0:1,B.last_flush=ie,Xt(B),oe},di=function(k){var B=ci(k);return B===oe&&oi(k.state),B},li=function(k,B,U,F,G,j){if(!k)return ce;var $=1;if(B===ue&&(B=6),F<0?($=0,F=-F):F>15&&($=2,F-=16),G<1||G>_e||U!==ye||F<8||F>15||B<0||B>9||j<0||j>ve)return Ve(k,ce);8===F&&(F=9);var H=new hi;return k.state=H,H.strm=k,H.wrap=$,H.gzhead=null,H.w_bits=F,H.w_size=1<re||B<0)return k?Ve(k,ce):ce;var G=k.state;if(!k.output||!k.input&&0!==k.avail_in||G.status===Ue&&B!==ae)return Ve(k,0===k.avail_out?le:ce);G.strm=k;var j=G.last_flush;if(G.last_flush=B,G.status===Me)if(2===G.wrap)k.adler=0,Qe(G,31),Qe(G,139),Qe(G,8),G.gzhead?(Qe(G,(G.gzhead.text?1:0)+(G.gzhead.hcrc?2:0)+(G.gzhead.extra?4:0)+(G.gzhead.name?8:0)+(G.gzhead.comment?16:0)),Qe(G,255&G.gzhead.time),Qe(G,G.gzhead.time>>8&255),Qe(G,G.gzhead.time>>16&255),Qe(G,G.gzhead.time>>24&255),Qe(G,9===G.level?2:G.strategy>=be||G.level<2?4:0),Qe(G,255&G.gzhead.os),G.gzhead.extra&&G.gzhead.extra.length&&(Qe(G,255&G.gzhead.extra.length),Qe(G,G.gzhead.extra.length>>8&255)),G.gzhead.hcrc&&(k.adler=zt(k.adler,G.pending_buf,G.pending,0)),G.gzindex=0,G.status=Ne):(Qe(G,0),Qe(G,0),Qe(G,0),Qe(G,0),Qe(G,0),Qe(G,9===G.level?2:G.strategy>=be||G.level<2?4:0),Qe(G,He),G.status=Be);else{var $=ye+(G.w_bits-8<<4)<<8;$|=(G.strategy>=be||G.level<2?0:G.level<6?1:6===G.level?2:3)<<6,0!==G.strstart&&($|=Pe),$+=31-$%31,G.status=Be,Xe(G,$),0!==G.strstart&&(Xe(G,k.adler>>>16),Xe(G,65535&k.adler)),k.adler=1}if(G.status===Ne)if(G.gzhead.extra){for(U=G.pending;G.gzindex<(65535&G.gzhead.extra.length)&&(G.pending!==G.pending_buf_size||(G.gzhead.hcrc&&G.pending>U&&(k.adler=zt(k.adler,G.pending_buf,G.pending-U,U)),ze(k),U=G.pending,G.pending!==G.pending_buf_size));)Qe(G,255&G.gzhead.extra[G.gzindex]),G.gzindex++;G.gzhead.hcrc&&G.pending>U&&(k.adler=zt(k.adler,G.pending_buf,G.pending-U,U)),G.gzindex===G.gzhead.extra.length&&(G.gzindex=0,G.status=xe)}else G.status=xe;if(G.status===xe)if(G.gzhead.name){U=G.pending;do{if(G.pending===G.pending_buf_size&&(G.gzhead.hcrc&&G.pending>U&&(k.adler=zt(k.adler,G.pending_buf,G.pending-U,U)),ze(k),U=G.pending,G.pending===G.pending_buf_size)){F=1;break}F=G.gzindexU&&(k.adler=zt(k.adler,G.pending_buf,G.pending-U,U)),0===F&&(G.gzindex=0,G.status=Le)}else G.status=Le;if(G.status===Le)if(G.gzhead.comment){U=G.pending;do{if(G.pending===G.pending_buf_size&&(G.gzhead.hcrc&&G.pending>U&&(k.adler=zt(k.adler,G.pending_buf,G.pending-U,U)),ze(k),U=G.pending,G.pending===G.pending_buf_size)){F=1;break}F=G.gzindexU&&(k.adler=zt(k.adler,G.pending_buf,G.pending-U,U)),0===F&&(G.status=ke)}else G.status=ke;if(G.status===ke&&(G.gzhead.hcrc?(G.pending+2>G.pending_buf_size&&ze(k),G.pending+2<=G.pending_buf_size&&(Qe(G,255&k.adler),Qe(G,k.adler>>8&255),k.adler=0,G.status=Be)):G.status=Be),0!==G.pending){if(ze(k),0===k.avail_out)return G.last_flush=-1,oe}else if(0===k.avail_in&&We(B)<=We(j)&&B!==ae)return Ve(k,le);if(G.status===Ue&&0!==k.avail_in)return Ve(k,le);if(0!==k.avail_in||0!==G.lookahead||B!==ie&&G.status!==Ue){var H=G.strategy===be?ni(G,B):G.strategy===pe?si(G,B):ri[G.level].func(G,B);if(H!==je&&H!==$e||(G.status=Ue),H===Fe||H===je)return 0===k.avail_out&&(G.last_flush=-1),oe;if(H===Ge&&(B===se?ee(G):B!==re&&(Zt(G,0,0,!1),B===ne&&(qe(G.head),0===G.lookahead&&(G.strstart=0,G.block_start=0,G.insert=0))),ze(k),0===k.avail_out))return G.last_flush=-1,oe}return B!==ae?oe:G.wrap<=0?he:(2===G.wrap?(Qe(G,255&k.adler),Qe(G,k.adler>>8&255),Qe(G,k.adler>>16&255),Qe(G,k.adler>>24&255),Qe(G,255&k.total_in),Qe(G,k.total_in>>8&255),Qe(G,k.total_in>>16&255),Qe(G,k.total_in>>24&255)):(Xe(G,k.adler>>>16),Xe(G,65535&k.adler)),ze(k),G.wrap>0&&(G.wrap=-G.wrap),0!==G.pending?oe:he)},deflateEnd:function(k){if(!k||!k.state)return ce;var B=k.state.status;return B!==Me&&B!==Ne&&B!==xe&&B!==Le&&B!==ke&&B!==Be&&B!==Ue?Ve(k,ce):(k.state=null,B===Be?Ve(k,de):oe)},deflateSetDictionary:function(k,B){var U=B.length;if(!k||!k.state)return ce;var F=k.state,G=F.wrap;if(2===G||1===G&&F.status!==Me||F.lookahead)return ce;if(1===G&&(k.adler=qt(k.adler,B,U,0)),F.wrap=0,U>=F.w_size){0===G&&(qe(F.head),F.strstart=0,F.block_start=0,F.insert=0);var j=new Uint8Array(F.w_size);j.set(B.subarray(U-F.w_size,U),0),B=j,U=F.w_size}var $=k.avail_in,H=k.next_in,V=k.input;for(k.avail_in=U,k.next_in=0,k.input=B,ti(F);F.lookahead>=Ie;){var W=F.strstart,q=F.lookahead-(Ie-1);do{F.ins_h=Ke(F,F.ins_h,F.window[W+Ie-1]),F.prev[W&F.w_mask]=F.head[F.ins_h],F.head[F.ins_h]=W,W++}while(--q);F.strstart=W,F.lookahead=Ie-1,ti(F)}return F.strstart+=F.lookahead,F.block_start=F.strstart,F.insert=F.lookahead,F.lookahead=0,F.match_length=F.prev_length=Ie-1,F.match_available=0,k.next_in=H,k.input=V,k.avail_in=$,F.wrap=G,oe},deflateInfo:"pako deflate (from Nodeca project)"};function fi(k){for(var B=0,U=0,F=k.length;U=252?6:pi>=248?5:pi>=240?4:pi>=224?3:pi>=192?2:1;function vi(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}bi[254]=bi[254]=1;var gi=vi,mi=Object.prototype.toString,yi=Qt.Z_NO_FLUSH,_i=Qt.Z_SYNC_FLUSH,Ei=Qt.Z_FULL_FLUSH,wi=Qt.Z_FINISH,Ti=Qt.Z_OK,Si=Qt.Z_STREAM_END,Ai=Qt.Z_DEFAULT_COMPRESSION,Ci=Qt.Z_DEFAULT_STRATEGY,Oi=Qt.Z_DEFLATED;function Ii(){this.options={level:Ai,method:Oi,chunkSize:16384,windowBits:15,memLevel:8,strategy:Ci};var k=this.options;k.raw&&k.windowBits>0?k.windowBits=-k.windowBits:k.gzip&&k.windowBits>0&&k.windowBits<16&&(k.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new gi,this.strm.avail_out=0;var B=ui.deflateInit2(this.strm,k.level,k.method,k.windowBits,k.memLevel,k.strategy);if(B!==Ti)throw new Error(Yt[B]);if(k.header&&ui.deflateSetHeader(this.strm,k.header),k.dictionary){var U;if(U="[object ArrayBuffer]"===mi.call(k.dictionary)?new Uint8Array(k.dictionary):k.dictionary,(B=ui.deflateSetDictionary(this.strm,U))!==Ti)throw new Error(Yt[B]);this._dict_set=!0}}function Di(k){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(k);var B,U,F,G,j,$=k.length,H=0;for(G=0;G<$;G++)55296==(64512&(U=k.charCodeAt(G)))&&G+1<$&&56320==(64512&(F=k.charCodeAt(G+1)))&&(U=65536+(U-55296<<10)+(F-56320),G++),H+=U<128?1:U<2048?2:U<65536?3:4;for(B=new Uint8Array(H),j=0,G=0;j>>6,B[j++]=128|63&U):U<65536?(B[j++]=224|U>>>12,B[j++]=128|U>>>6&63,B[j++]=128|63&U):(B[j++]=240|U>>>18,B[j++]=128|U>>>12&63,B[j++]=128|U>>>6&63,B[j++]=128|63&U);return B}return Ii.prototype.push=function(k,B){var U,F,G=this.strm,j=this.options.chunkSize;if(this.ended)return!1;for(F=B===~~B?B:!0===B?wi:yi,"[object ArrayBuffer]"===mi.call(k)?G.input=new Uint8Array(k):G.input=k,G.next_in=0,G.avail_in=G.input.length;;)if(0===G.avail_out&&(G.output=new Uint8Array(j),G.next_out=0,G.avail_out=j),(F===_i||F===Ei)&&G.avail_out<=6)this.onData(G.output.subarray(0,G.next_out)),G.avail_out=0;else{if((U=ui.deflate(G,F))===Si)return G.next_out>0&&this.onData(G.output.subarray(0,G.next_out)),U=ui.deflateEnd(this.strm),this.onEnd(U),this.ended=!0,U===Ti;if(0!==G.avail_out){if(F>0&&G.next_out>0)this.onData(G.output.subarray(0,G.next_out)),G.avail_out=0;else if(0===G.avail_in)break}else this.onData(G.output)}return!0},Ii.prototype.onData=function(k){this.chunks.push(k)},Ii.prototype.onEnd=function(k){k===Ti&&(this.result=fi(this.chunks)),this.chunks=[],this.err=k,this.msg=this.strm.msg},{Deflate:Ii,constants:Qt,string2buf:Di}}(),U=B.Deflate,F=B.constants,G=B.string2buf,j=new U,$=0;function H(k){var B=G(k);return j.push(B,F.Z_SYNC_FLUSH),$+=B.length,B.length}self.addEventListener("message",k((function(k){var B=k.data;switch(B.action){case"init":self.postMessage({type:"initialized"});break;case"write":var G=H(B.data);self.postMessage({type:"wrote",id:B.id,compressedBytesCount:j.chunks.reduce((function(k,B){return k+B.length}),0),additionalBytesCount:G});break;case"flush":G=B.data?H(B.data):0;j.push("",F.Z_FINISH),self.postMessage({type:"flushed",id:B.id,result:j.result,additionalBytesCount:G,rawBytesCount:$}),j=new U,$=0}})))}))()}var jE={status:0};function $E(k,B){switch(void 0===B&&(B=FE),jE.status){case 0:jE={status:1,callbacks:[k]},function(k){void 0===k&&(k=FE);try{var B=k();B.addEventListener("error",Ab(HE)),B.addEventListener("message",Ab((function(k){var U,F=k.data;"errored"===F.type?HE(F.error):"initialized"===F.type&&(U=B,1===jE.status&&(jE.callbacks.forEach((function(k){return k(U)})),jE={status:3,worker:U}))}))),B.postMessage({action:"init"})}catch(U){HE(U)}}(B);break;case 1:jE.callbacks.push(k);break;case 2:k();break;case 3:k(jE.worker)}}function HE(k){var B;1===jE.status?(yb.error("Session Replay recording failed to start: an error occurred while creating the Worker:",k),k instanceof Event||k instanceof Error&&($b(B=k.message,"Content Security Policy")||$b(B,"requires 'TrustedScriptURL'"))?yb.error("Please make sure CSP is correctly configured https://docs.datadoghq.com/real_user_monitoring/faq/content_security_policy"):Fv(k),jE.callbacks.forEach((function(k){return k()})),jE={status:2}):Fv(k)}var VE=function(k,B,U){var F=(void 0===U?{}:U).ignoreInitIfSyntheticsWillInjectRum,G=void 0===F||F,j=!1,$=dp(),H=dp(),V=function(){},W=function(){},q=new up,K=function(k,B){void 0===B&&(B=gp()),q.add((function(){return K(k,B)}))},z=function(k,B){void 0===B&&(B=yp()),q.add((function(){return z(k,B)}))},Y=function(k,U){void 0===U&&(U=Sv($,H,B)),q.add((function(){return Y(k,U)}))},Q=function(k,U){void 0===U&&(U=Sv($,H,B)),q.add((function(){return Q(k,U)}))},X=function(k,B){q.add((function(){return X(k,B)}))};function Z(U,F,G){var j=k(U,F,B,$,H,G);z=j.startView,Y=j.addAction,Q=j.addError,K=j.addTiming,X=j.addFeatureFlagEvaluation,V=j.getInternalContext,q.drain(),B.onRumStart(j.lifeCycle,F,j.session,j.viewContexts)}var J,tt,et=Ab((function(k){z("object"==typeof k?k:{name:k})})),it=(J={init:Ab((function(k){if(W=function(){return sp(k)},!G||!Rp()){if(Mp())k=function(k){return xb({},k,{applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100})}(k);else if(!function(k){return function(k){if(void 0===document.cookie||null===document.cookie)return!1;try{var B="dd_cookie_test_".concat(kb()),U="test";Cp(B,U,Mb,k);var F=Op(B)===U;return Ip(B,k),F}catch(G){return yb.error(G),!1}}(gv(k))?"file:"!==window.location.protocol||(yb.error("Execution is not allowed in the current context."),!1):(yb.warn("Cookies are not authorized, we will not send any data."),!1)}(k))return;if(function(k){return!j||(k.silentMultipleInit||yb.error("DD_RUM is already initialized."),!1)}(k)){var B=wv(k);if(B){if(Np("feature_flags")&&(it.addFeatureFlagEvaluation=Ab((function(k,B){X(k,B)}))),B.trackViewsManually){var U=q;q=new up,z=function(U){Z(k,B,U)},U.drain()}else Z(k,B);j=!0}}}})),addRumGlobalContext:Ab($.add),setGlobalContextProperty:Ab($.setContextProperty),removeRumGlobalContext:Ab($.remove),removeGlobalContextProperty:Ab($.removeContextProperty),getRumGlobalContext:Ab($.get),getGlobalContext:Ab($.getContext),setRumGlobalContext:Ab($.set),setGlobalContext:Ab($.setContext),clearGlobalContext:Ab($.clearContext),getInternalContext:Ab((function(k){return V(k)})),getInitConfiguration:Ab((function(){return W()})),addAction:Ab((function(k,B){Y({name:k,context:sp(B),startClocks:yp(),type:"custom"})})),addError:function(k,B){var U=ev();Cb((function(){Q({error:k,handlingStack:U,context:sp(B),startClocks:yp()})}))},addTiming:Ab((function(k,B){K(k,B)})),setUser:Ab((function(k){(function(k){var B="object"===ep(k);return B||yb.error("Unsupported user:",k),B})(k)&&H.setContext(sv(k))})),getUser:Ab(H.getContext),setUserProperty:Ab((function(k,B){var U,F=sv((U={},U[k]=B,U))[k];H.setContextProperty(k,F)})),removeUserProperty:Ab(H.removeContextProperty),removeUser:Ab(H.clearContext),clearUser:Ab(H.clearContext),startView:et,startSessionReplayRecording:Ab(B.start),stopSessionReplayRecording:Ab(B.stop)},tt=xb({version:"4.35.0",onReady:function(k){k()}},J),Object.defineProperty(tt,"_setDebug",{get:function(){return Sb},enumerable:!1}),tt);return it}((function(k,B,U,F,G,j){var $=new Ng;$.subscribe(11,(function(k){return Av("rum",k)}));var H=function(k){var B=Bv("browser-rum-sdk",k);if(Mp()){var U=Pp();B.observable.subscribe((function(k){return U.send("internal_telemetry",k)}))}return B}(B);H.setContextProvider((function(){var k,U;return{application:{id:B.applicationId},session:{id:null===(k=Y.findTrackedSession())||void 0===k?void 0:k.id},view:{id:null===(U=J.findView())||void 0===U?void 0:U.id},action:{id:it.findActionId()}}}));var V,W=function(k){$.notify(12,{error:k})},q=function(k,B){if(void 0===B&&(B=cp),!Np("feature_flags"))return{findFeatureFlagEvaluations:function(){},getFeatureFlagBytesCount:function(){return 0},addFeatureFlagEvaluation:Fb};var U,F=new Bg(144e5);return k.subscribe(4,(function(k){var B=k.endClocks;F.closeActive(B.relative)})),k.subscribe(2,(function(k){var B=k.startClocks;F.add({},B.relative),U=void 0})),{findFeatureFlagEvaluations:function(k){return F.find(k)},getFeatureFlagBytesCount:function(){var k=F.find();return k?(void 0===U&&(U=B(Gb(k))),U):0},addFeatureFlagEvaluation:function(k,B){var G=F.find();G&&(G[k]=sp(B),U=void 0)}}}($);if(Mp())!function(k){var B=Pp();k.subscribe(11,(function(k){B.send("rum",k)}))}($);else{var K=V=new Cv((function(){var k=Np("pagehide"),B=Dv(window,["visibilitychange","freeze","pagehide"],(function(B){"pagehide"===B.type&&k?V.notify({reason:Rv.PAGEHIDE}):"visibilitychange"===B.type&&"hidden"===document.visibilityState?V.notify({reason:Rv.HIDDEN}):"freeze"===B.type&&V.notify({reason:Rv.FROZEN})}),{capture:!0}).stop,U=Fb;return k||(U=Iv(window,"beforeunload",(function(){V.notify({reason:Rv.UNLOADING})})).stop),function(){B(),U()}}));K.subscribe((function(k){$.notify(9,k)}));var z=Fy(B,$,H.observable,W,K);!function(k,B,U,F,G,j,$){B.enabled&&Bb(k.customerDataTelemetrySampleRate)&&(Ky(),zy(),U.subscribe(11,(function(k){Hy=!0,Wy($y.globalContextBytes,Yb(F.get())?0:F.getBytesCount()),Wy($y.userContextBytes,Yb(G.get())?0:G.getBytesCount());var B=j.findFeatureFlagEvaluations(),U=$b(["view","error"],k.type)&&B&&!Yb(B);Wy($y.featureFlagBytes,U?j.getFeatureFlagBytesCount():0)})),$.subscribe((function(k){var B=k.bufferBytesCount,U=k.bufferMessagesCount;Hy&&(jy.batchCount+=1,Wy(jy.batchBytesCount,B),Wy(jy.batchMessagesCount,U),qy(jy.globalContextBytes,$y.globalContextBytes),qy(jy.userContextBytes,$y.userContextBytes),qy(jy.featureFlagBytes,$y.featureFlagBytes),zy())})),setInterval(Ab(Vy),1e4))}(B,H,$,F,G,q,z.flushObservable)}var Y=Mp()?function(){var k={id:"00000000-aaaa-0000-aaaa-000000000000",plan:1,sessionReplayAllowed:!1,longTaskAllowed:!0,resourceAllowed:!0};return{findTrackedSession:function(){return k}}}():Oy(B,$),Q=function(){var k=$v(),B=new Cv((function(){if(k){var U=new k(Ab((function(){return B.notify()})));return U.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),function(){return U.disconnect()}}}));return B}(),X=Gy(location),Z=function(k,B,U,F,G,j,$,H){var V=function(k){var B=new Bg(144e5);return k.subscribe(2,(function(k){B.add(function(k){return{service:k.service,version:k.version,id:k.id,name:k.name}}(k),k.startClocks.relative)})),k.subscribe(4,(function(k){var U=k.endClocks;B.closeActive(U.relative)})),k.subscribe(8,(function(){B.reset()})),{findView:function(k){return B.find(k)},stop:function(){B.stop()}}}(k),W=function(k,B,U){var F,G=new Bg(144e5);k.subscribe(4,(function(k){var B=k.endClocks;G.closeActive(B.relative)})),k.subscribe(2,(function(k){var B=k.startClocks,j=U.href;G.add($({url:j,referrer:F||document.referrer}),B.relative),F=j}));var j=B.subscribe((function(k){var B=k.newLocation,U=G.find();if(U){var F=mp();G.closeActive(F),G.add($({url:B.href,referrer:U.referrer}),F)}}));function $(k){return{url:k.url,referrer:k.referrer}}return{findUrl:function(k){return G.find(k)},stop:function(){j.unsubscribe(),G.stop()}}}(k,G,U),q=Og(),K=function(k,B,U,F){k.subscribe(1,(function(B){return k.notify(10,xm(B,F))}));var G={findActionId:Fb};return U.trackUserInteractions&&(G=Mm(k,B,U).actionContexts),{addAction:function(B,U){k.notify(10,xb({savedCommonContext:U},xm(B,F)))},actionContexts:G}}(k,j,B,q),z=K.addAction,Y=K.actionContexts;return Ag(B,k,F,V,W,Y,$,H),{viewContexts:V,foregroundContexts:q,urlContexts:W,addAction:z,actionContexts:Y,stop:function(){V.stop(),q.stop()}}}($,B,location,Y,X,Q,(function(){return Sv(F,G,U)}),W),J=Z.viewContexts,tt=Z.foregroundContexts,et=Z.urlContexts,it=Z.actionContexts,st=Z.addAction;!function(k){kv.telemetryConfigurationEnabled&&Gv({type:Nv,configuration:k})}(function(k){var B,U,F=function(k){var B,U,F=null!==(B=k.proxy)&&void 0!==B?B:k.proxyUrl;return{session_sample_rate:null!==(U=k.sessionSampleRate)&&void 0!==U?U:k.sampleRate,telemetry_sample_rate:k.telemetrySampleRate,telemetry_configuration_sample_rate:k.telemetryConfigurationSampleRate,use_before_send:!!k.beforeSend,use_cross_site_session_cookie:k.useCrossSiteSessionCookie,use_secure_session_cookie:k.useSecureSessionCookie,use_proxy:void 0!==F?!!F:void 0,silent_multiple_init:k.silentMultipleInit,track_session_across_subdomains:k.trackSessionAcrossSubdomains,track_resources:k.trackResources,track_long_task:k.trackLongTasks}}(k);return xb({premium_sample_rate:k.premiumSampleRate,replay_sample_rate:k.replaySampleRate,session_replay_sample_rate:k.sessionReplaySampleRate,trace_sample_rate:null!==(B=k.traceSampleRate)&&void 0!==B?B:k.tracingSampleRate,action_name_attribute:k.actionNameAttribute,use_allowed_tracing_origins:Array.isArray(k.allowedTracingOrigins)&&k.allowedTracingOrigins.length>0,use_allowed_tracing_urls:Array.isArray(k.allowedTracingUrls)&&k.allowedTracingUrls.length>0,selected_tracing_propagators:Tv(k),default_privacy_level:k.defaultPrivacyLevel,use_excluded_activity_urls:Array.isArray(k.allowedTracingOrigins)&&k.allowedTracingOrigins.length>0,track_frustrations:k.trackFrustrations,track_views_manually:k.trackViewsManually,track_user_interactions:null!==(U=k.trackUserInteractions)&&void 0!==U?U:k.trackInteractions},F)}(k)),function(k,B){k.subscribe(0,(function(U){for(var F=0,G=U;F=0;G--){var j=Qy[G].startTime;if(!(j>=F)&&(U.unshift(Qy[G]),j{this._questManager.getUnclaimedRewardsMail()||U(),B()})).catch(j.RQr.createHandler("Failed to claim battle pass rewards"))}};JE=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)("8dc-04eb")),(0,G.Qj)(1,(0,tt.inject)("aa9-c54b")),(0,G.Sn)("design:paramtypes",[Function,Function])],JE);let tw=class{constructor(k){this.mailExtensions={},k.forEach((k=>{this.mailExtensions[k.Name]=k}))}open(k,B,U=null){var F,G,$,H,V,W;const q=null!==(G=null===(F=null==k?void 0:k.extension)||void 0===F?void 0:F.name)&&void 0!==G?G:null,z=null!==($=this.mailExtensions[q])&&void 0!==$?$:null;if(!z){const F=K.q.instance.prodigy.open.openMail(k);return F.setCloseCallback(B),F.setDeleteMailCallback(U),void j.VyI.log(`No extension found for ${k.subject} or extension '${q}' was empty`,j.$bb.Verbose)}j.VyI.log(`Opening ${k.subject} with extension '${q}'`,j.$bb.Verbose),z.openMailItem(null!==(V=null===(H=null==k?void 0:k.extension)||void 0===H?void 0:H.params)&&void 0!==V?V:[],(null===(W=null==k?void 0:k.extension)||void 0===W?void 0:W.deleteMailOnClose)&&U?()=>{U(),B()}:B,U)}isValid(k){var B;const U=null===(B=null==k?void 0:k.extension)||void 0===B?void 0:B.name,F=this.mailExtensions[U];return U&&!F?(j.VyI.log(`Extension was not valid for mail: ${JSON.stringify(k.extension)}`,j.$bb.Warning),!1):!F||F.isValid(k)}applyTemplate(k,B){const U=$.get(k,"extension.name",null),F=$.get(this.mailExtensions,U,null);F&&F.applyTemplate(k,B)}};tw=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.multiInject)("438-fe2f")),(0,G.Sn)("design:paramtypes",[Array])],tw);let ew=class extends QE{constructor(){super(...arguments),this.name=XE.R.Prefab}isValid(k){var B;const U=null===(B=k.extension.params)||void 0===B?void 0:B[0];return k.extension.name===XE.R.Prefab&&Object.values(Ei.l).includes(U)}applyTemplate(k,B){super.applyTemplate(k,B),this._mailData=k}openMailItem(k,B){const U=k[0];K.q.instance.prodigy.open.prefabMenu(U,B),K.q.instance.game.broadcaster.broadcast(oi.zr.MarkAsRead,oi.HG.MailView,[void 0,this._mailData])}};ew=(0,G.Cg)([(0,tt.injectable)()],ew);let iw=class extends QE{constructor(){super(...arguments),this.name="PopupMailExtension"}isValid(k){var B;const U=(null===(B=k.extension.params)||void 0===B?void 0:B.length)>0?k.extension.params[0]:"";return k.extension.name===XE.R.Popup&&this._externalMethods.doesFunctionExist(U)}openMailItem(k,B,U){const F=(null==k?void 0:k.length)>0?k[0]:"";""!==F&&this._externalMethods.doesFunctionExist(F)?this._externalMethods.runFunction(F,k,void 0,void 0,[B,U]):j.VyI.log("[PopupMailExtension] Missing function name or function does not exist",j.$bb.Error)}};(0,G.Cg)([(0,tt.inject)("eb9-3fdf"),(0,G.Sn)("design:type",be.g)],iw.prototype,"_externalMethods",void 0),iw=(0,G.Cg)([(0,tt.injectable)()],iw);let sw=class extends QE{constructor(){super(...arguments),this.name=XE.R.Titan}isValid(k){return!0}openMailItem(k,B){K.q.instance.prodigy.open.openMail(this._mailData).onClose=B}applyTemplate(k,B){B.openButtonGraphic.y+=8,B.unOpenButtonGraphic.y+=9,super.applyTemplate(k,B),this._mailData=k}};sw=(0,G.Cg)([(0,tt.injectable)()],sw);let nw=class extends zt.D{getBattleStats(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.BattleStats.GetBattleStats,{userId:null==k?void 0:k.toString()},!1)}))}onWeeklyChallengeBattleEnd(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.BattleStats.RecordEnd,{type:k},!1)}))}debugOverrideMatchmakingBattleStreak(k){return(0,G.sH)(this,void 0,void 0,(function*(){0}))}};nw=(0,G.Cg)([(0,tt.injectable)()],nw);class aw extends zt.D{getDailyDuelUses(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.DuelsStadium.GetAllDailyDuelsUsed,{},!0)}))}}let rw=class extends zt.D{getCampaignReplayData(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.CampaignReplay.GetCampaignReplayData,{},!1)}))}setProgress(k){this.makeCloudscriptRequest(qt.D.CampaignReplay.SetFeatureProgress,k,!1).catch(j.RQr.createHandler("CampaignReplayNetworkHandler.setProgress: Failed to set progress"))}unlockDifficultyMode(k){this.makeCloudscriptRequest(qt.D.CampaignReplay.UnlockDifficultyMode,{difficulty:k},!1).catch((()=>{K.q.instance.game.broadcaster.broadcast(oi.oL.DifficultyUnlockRequestFailed),j.RQr.createHandler("CampaignReplayNetworkHandler.unlockDifficultyMode: Failed to unlock difficulty mode")}))}setCurrentDifficulty(k){this.makeCloudscriptRequest(qt.D.CampaignReplay.SetCurrentDifficulty,{difficulty:k},!1).catch((()=>{K.q.instance.game.broadcaster.broadcast(oi.oL.DifficultyModeChangeFailed),j.RQr.createHandler("CampaignReplayNetworkHandler.setCurrentDifficulty: Failed to set current difficulty")}))}debugForceUnlockDifficulty(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.CampaignReplay.Debug.ForceUnlockDifficultyMode,{difficulty:k},!1)}))}debugResetData(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.CampaignReplay.Debug.ResetData,{},!1)}))}};rw=(0,G.Cg)([(0,Q.injectable)()],rw);var ow=U(35571);class hw extends js.D{debugSetCooldownTimestamp(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){return this.call(qt.D.Cooldowns.Debug.SetCooldownTimestamp,{cooldownId:k,timestamp:B},!0)}))}debugClearCooldown(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.call(qt.D.Cooldowns.Debug.ClearCooldown,{cooldownId:k},!0)}))}debugClearAllCooldowns(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.call(qt.D.Cooldowns.Debug.ClearAllCooldowns,{},!0)}))}setCooldownFromNow(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){return this.call(qt.D.Cooldowns.SetCooldownFromNow,{cooldownId:k,durationMs:B},!0)}))}setCooldownFromCategory(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){return this.call(qt.D.Cooldowns.SetCooldownFromCategory,{cooldownId:k,category:B},!0)}))}}var cw=U(55328);let dw=class extends zt.D{get elementalBoost(){return this._elementalBoost}getCurrentElementalBoost(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.ElementalBoosts.GetCurrentElementalBoost,{},!1)}))}cacheElementalBoost(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!j.Aq$.isDefined(this._lastUpdatedTime)||Date.now()>this._lastUpdatedTime+864e5){const k=yield this.getCurrentElementalBoost();this._elementalBoost=k.element,this._lastUpdatedTime=k.lastUpdatedUtcTime}return this._elementalBoost}))}doDebugCommand(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){0}))}};dw=(0,G.Cg)([(0,tt.injectable)()],dw);let lw=class extends js.D{enterWorld(){return(0,G.sH)(this,arguments,void 0,(function*(k=[]){const B=this._player.hasValidatedParentEmail(),U=Oc.R.getTimezoneOffset();return this.call(qt.D.Events.EnterWorld,{experiments:k,parentLinked:B,timezoneOffset:U},!1)}))}};(0,G.Cg)([(0,Re.b)("306-5359"),(0,G.Sn)("design:type",ye.W)],lw.prototype,"_player",void 0),lw=(0,G.Cg)([(0,tt.injectable)()],lw);var uw=U(7001),fw=U(89067);let bw=class{constructor(k){this.game=k}};bw=(0,G.Cg)([(0,tt.injectable)(),(0,G.Sn)("design:paramtypes",[an.n])],bw);class pw extends bw{constructor(k){super(k),this.pendingRequests=null,this.friendsCap=20,this.friendsList=[],this.classList=[],this.friendRequestList=[],this.hasReceivedFriends=!1,this.hasReceivedFriendsAppearance=!1,this.hasReceivedFriendsAppearanceOfActualFriends=!1,this.hasReceivedClass=!1,k.broadcaster.addAppListener(oi.lT.Setup,(()=>{this.setup()}),this,oi.HG.NetworkHandlers,!0),k.broadcaster.addAppListener(oi.AU.PlayerInitialized,(()=>{this.fetchClassmates()}),this,null,!0)}getFriendsCap(){return this.friendsCap}hasPendingRequests(){return this.pendingRequests>0}isFriendsListDownloaded(){return this.hasReceivedFriends}isClassmatesListDownloaded(){return this.hasReceivedClass}getFriend(k){let B=null;for(let U=0;UB.userID===k&&0!==B.status))}isClassmate(k){return this.classList.some((B=>B.userID===k))}getFriendQuestProgress(k){const B=[];for(let U=0;U{this.processClassmates(k)})).catch((k=>{K.q.instance.prodigy.loading(!1),this.showGenericNetworkError()}))}}shouldFetchClassmates(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return k.hasCompletedTutorial()&&k.classIDs.length>0}processClassmates(k){var B,U;K.q.instance.prodigy.loading(!1);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=null!==(U=null===(B=k.data.player.currentClassroom)||void 0===B?void 0:B.students)&&void 0!==U?U:[];for(let j=0;j0){K.q.instance.prodigy.gameContainer.get("c97-bd0d").getCharData(U,["appearance","state"],this.getUserData.bind(this),null).catch(j.RQr.createHandler("Error getting character data"))}}getUserData(k){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;for(const B in k)for(let U=0;U{this.game.broadcaster.broadcast(oi.sd.RequestSent,oi.HG.FriendsList,[k]),this.game.broadcaster.broadcast(oi.sd.RequestSent,oi.HG.Card,[])}}),K.q.instance.prodigy.gameContainer.get("c47-20b6").social.sendFriendRequestSentEvent({friends:this.friendsList.length,classmates:this.classList.length}))}cancelFriendRequest(k){K.q.instance.prodigy.loading(!0);K.q.instance.prodigy.gameContainer.get("c97-bd0d").cancelFriendRequest(k,this.cancelFriendRequestSuccess.bind(this,k),this.networkCallFailure.bind(this)).catch(j.RQr.createHandler("Error cancelling friend request"))}cancelFriendRequestSuccess(k,B){K.q.instance.prodigy.loading(!1),pw.removeUserFromArray(this.friendsList,k),K.q.instance.prodigy.open.messageBoxPrefab({text:"FRIENDS_LIST_CANCEL_MESSAGE_BODY",title:"FRIENDS_LIST_CANCEL_MESSAGE_TITLE",confirmCallback:this.onCancelFriendRequestClose.bind(this,k)})}onCancelFriendRequestClose(k){this.game.broadcaster.broadcast(oi.sd.RequestCancelled,oi.HG.FriendsList,[k]),this.game.broadcaster.broadcast(oi.sd.RequestCancelled,oi.HG.Card,[k])}acceptFriendRequestSuccess(k,B,U,F){K.q.instance.prodigy.loading(!1),this.friendsList.push({userID:k,status:1,isMember:0}),this.getUserAppearance(this.friendsList.slice(this.friendsList.length-1,this.friendsList.length)),pw.removeUserFromArray(this.friendRequestList,k),this.pendingRequests--,this.game.broadcaster.broadcast(oi.sd.RequestAccepted,oi.HG.FriendsList,[k,B]),this.game.broadcaster.broadcast(oi.sd.RequestAccepted,oi.HG.HUD),this.game.broadcaster.broadcast(oi.sd.RequestAccepted,oi.HG.Card,[]),K.q.instance.prodigy.gameContainer.get("c47-20b6").social.sendFriendRequestAcceptedEvent({friends:this.friendsList.length,classmates:this.classList.length,from_request:U,index:B})}getUserAppearance(k,B=!1){this.hasReceivedFriendsAppearance=!1,this.hasReceivedFriendsAppearanceOfActualFriends=!1;let U="",F="";for(let G=0;G0){K.q.instance.prodigy.gameContainer.get("c97-bd0d").getCharData(U,["appearance","isMember","equipment","data","state"],this.onGetUserAppearance.bind(this,B),this.networkCallFailure.bind(this))}}onGetUserAppearance(k,B){const U=k?this.classList:this.friendsList;for(const F in B)for(let k=0;k{var B,U,F,G;const j=null!==(B=k.message)&&void 0!==B?B:null===(U=k.data)||void 0===U?void 0:U.message,$=null!==(G=null===(F=k.data)||void 0===F?void 0:F.image)&&void 0!==G?G:"",H=k.rewards.map((k=>{const B=(null==k?void 0:k.itemID).split("-");return{ID:B[1],type:B[0],N:k.quantity}}));return Object.assign(Object.assign({id:k.ID,isOpened:!!k.openedOn,isCollected:!!k.collectedOn,userName:k.mailFrom,subject:k.subject,attachments:H},k.data),{message:j,image:$})}))}))}markAsRead(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.Mail.ReadMail,{mailId:k.id})}))}deleteMail(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.Mail.DeleteMail,{mailId:k.id})}))}collectMailRewards(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.Mail.CollectMailRewards,{mailId:k.id},!1)}))}};(0,G.Cg)([(0,Re.b)("e20-0fb0"),(0,G.Sn)("design:type",Wt.E)],gw.prototype,"_player",void 0),gw=(0,G.Cg)([(0,tt.injectable)()],gw);class mw{}mw.DATA=[{id:97,subject:"'Arc of Light' - Bronze season rewards!",isOpened:!1,image:"letter-season-end-rewards-bronze",message:"The Arena season 'Arc of Light' has ended! You can now claim the Bronze rewards you've unlocked. Look forward to the next season: 'Food Fight'!",attachments:[{type:"item",ID:20}],gameMethod:{name:"singleUseGotItem",buttonText:"CLAIM YOUR REWARDS"},debug:!0},{id:98,subject:"'Arc of Light' - Silver season rewards!",isOpened:!1,image:"letter-season-end-rewards-silver",message:"The Arena season 'Arc of Light' has ended! You can now claim the Silver rewards you've unlocked. Look forward to the next season: 'Food Fight'!",attachments:[{type:"item",ID:20}],gameMethod:{name:"singleUseGotItem",buttonText:"CLAIM YOUR REWARDS"},debug:!0},{id:99,subject:"'Arc of Light' - Gold season rewards!",isOpened:!1,image:"letter-season-end-rewards-gold",message:"The Arena season 'Arc of Light' has ended! You can now claim the Gold rewards you've unlocked. Look forward to the next season: 'Food Fight'!",attachments:[{type:"item",ID:20}],gameMethod:{name:"singleUseGotItem",buttonText:"CLAIM YOUR REWARDS"},debug:!0},{id:0,subject:"Hello World 0",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42. This text is particularly long so we can figure out what happens when it's very long! Arguably there has to be a logical limit to the size of the text but putting in an entire paragraph is probably a pretty good test of the max size.",attachments:[{type:"item",ID:1},{type:"item",ID:2},{type:"item",ID:3}],debug:!0},{id:1,subject:"SPLIT TEST MAIL",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[{type:"item",ID:1},{type:"item",ID:2},{type:"item",ID:3},{type:"item",ID:4}],gameMethod:{name:"openMembershipSignUp"},debug:!0},{id:2,subject:"Hello World 2",isOpened:!1,image:"noImage",message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[{type:"item",ID:1},{type:"item",ID:2}],debug:!0},{id:3,subject:"Hello World 3",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[{type:"currency",ID:11,N:50}],debug:!0},{id:4,subject:"Hello World 4",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:5,subject:"You have a Reward Goal!",isOpened:!1,membership:0,image:null,message:"Your parent has setup a goal for you! Answer 10 correct questions and your parent will sent you a Reward!",attachments:[],gameMethod:{name:"openGiftBox"},debug:!0},{id:5,subject:"You have a Member Box!",isOpened:!1,membership:2,image:null,message:"Your parent has setup a goal for you! Answer 10 correct questions and your parent will sent you a Reward!",attachments:[{type:"item",ID:1},{type:"item",ID:2},{type:"item",ID:3},{type:"item",ID:4},{type:"item",ID:5}],gameMethod:{name:"openGiftBox"},debug:!0},{id:5,subject:"Sign Up for Membership!",isOpened:!1,membership:1,image:null,message:"Your parent has setup a goal for you! Answer 10 correct questions and your parent will sent you a Reward!",attachments:[],gameMethod:{name:"openMembershipSignUp"},debug:!0},{id:10,subject:"Hello World 10",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:20,subject:"Hello World 20",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:30,subject:"Hello World 30",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:40,subject:"Hello World 40",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:50,subject:"Hello World 50",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:60,subject:"Hello World 60",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:70,subject:"Hello World 70",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:80,subject:"Hello World 80",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:90,subject:"Hello World 90",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:100,subject:"Hello World 100",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:1e3,subject:"Hello World 1000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:2e3,subject:"Hello World 2000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:3e3,subject:"Hello World 3000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:4e3,subject:"Hello World 4000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:5e3,subject:"Hello World 5000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:6e3,subject:"Hello World 6000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:7e3,subject:"Hello World 7000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:8e3,subject:"Hello World 8000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:9e3,subject:"Hello World 9000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:1e4,subject:"Hello World 10000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0}],mw.TOTAL_MAIL={totalUnread:0};class yw{static getAllMail(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=mw.DATA.slice(0,300);return new Promise(((B,U)=>{Vt.s.get("GameConstants.Mailer.TEST_MAIL")?(j.VyI.log("Test get all legacy mail",j.$bb.Verbose),B(k)):B([])}))}))}static markAsRead(k){return(0,G.sH)(this,void 0,void 0,(function*(){return new Promise(((k,B)=>{if(Vt.s.get("GameConstants.Mailer.TEST_MAIL")){mw.TOTAL_MAIL={totalUnread:0};for(let k=0;k{if(Vt.s.get("GameConstants.Mailer.TEST_MAIL")){for(let B=0;B{this.setup()}),this,oi.HG.NetworkHandlers,!0)}setup(){const k=this.game.broadcaster;k.addAppListener(oi.zr.MarkAsRead,this.markAsRead.bind(this),this,oi.HG.MailView,!0),this._cachedPlayer=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;const B=K.q.instance.prodigy.gameContainer.get("8dc-04eb").preloadPreviousUnclaimedRewards(),U=this.awaitAllMail();Promise.all([U,B]).then((k=>{var B;if(!k[0])return void this.getAllMailFailure();const U=k[0][0],F=k[0][1],G=(null!=F?F:[]).concat(null!==(B=null==U?void 0:U.emails)&&void 0!==B?B:[]).sort(this.bySendDate);this.getAllMailSuccess(G)})).catch((()=>{j.VyI.log("Failed to fetch mail promises.",j.$bb.Error)})),k.removeAppListener(oi.lT.Setup,this,oi.HG.NetworkHandlers)}setRead(k,B){const U=this._mailList[k];U.isOpened!==B&&(U.isOpened=B,this.mailTotals.totalRead+=B?1:-1,this.mailTotals.totalUnread+=B?-1:1,this.broadcastMailCount())}broadcastMailCount(){j.Aq$.isDefined(this.mailTotals)&&(this.game.broadcaster.broadcast(oi.zr.UpdateMailCounters,oi.HG.Mailer),this.game.broadcaster.broadcast(oi.zr.UpdateMailCounters,oi.HG.MailerButton,[this.mailTotals]),this._hudService.updateNotificationBadge(fw.ts.YourMail,this.mailTotals.totalUnread))}awaitAllMail(){return(0,G.sH)(this,void 0,void 0,(function*(){return Promise.all([yw.getAllMail(),this._cloudscriptMailNetworkHandler.getAllMail()]).catch((()=>{this.getAllMailFailure()}))}))}bySendDate(k,B){return new Date(B.sendDate).getTime()-new Date(k.sendDate).getTime()}getAllMail(k){const B=K.q.instance.prodigy.timeManager.getServerTimeMs();(B>=this._lastNetworkCheckTime+this.NETWORK_CHECK_MIN_TIME_MS||k)&&(Promise.all([yw.getAllMail(),this._cloudscriptMailNetworkHandler.getAllMail()]).then((([k,B])=>this.getAllMailSuccess(B.concat(k).sort(this.bySendDate)))).catch((()=>this.getAllMailFailure())),this._lastNetworkCheckTime=B)}getAllMailSuccess(k){if(Vt.s.get("GameConstants.Mailer.TEST_MAIL")){this._mailList=null!=k?k:[];const B=this._mailList.length;this.mailTotals={totalRead:0,totalUnread:mw.TOTAL_MAIL.totalUnread,total:B,splitTestKeys:null},this.game.broadcaster.broadcast(oi.zr.GetAllMailSuccess,oi.HG.Mailer)}else k?this.modifyMail(k):this.getAllMailFailure()}modifyMail(k){const B=K.q.instance.prodigy.gameContainer,U=B.get("8dc-04eb").getUnclaimedRewardsMail();j.Aq$.isDefined(U)&&k.unshift(U);const F=B.get("140-ca43"),{validMail:G=[],invalidMail:$=[]}=H().groupBy(k,(k=>F.isValid(k)?this.isMemberSuppressed(k)?"hiddenMail":"validMail":"invalidMail"));if(this._mailList=G,$.length>0){j.VyI.log(`Found ${$.length} mail item(s) that are invalid and will be deleted`,j.$bb.Verbose);for(const k of $)this.deleteMail(k),j.VyI.log(`Removing mail ID ${k.id} with subject '${k.subject}' from inbox`,j.$bb.Verbose)}const V=H().sumBy(G,(k=>k.isOpened?1:0)),W=G.length;this.mailTotals={totalRead:V,totalUnread:W-V,total:W,splitTestKeys:null},this.broadcastMailCount(),this.game.broadcaster.broadcast(oi.zr.GetAllMailSuccess,oi.HG.Mailer)}isMemberSuppressed({membership:k}){return(2===k||1===k)&&Tn.J.shouldSuppressAd(this._cachedPlayer)}getAllMailFailure(){this.game.input.enabled=!0,this.game.broadcaster.broadcast(oi.zr.GetAllMailFailure,oi.HG.Mailer),j.VyI.log("Could not get all mail.",j.$bb.Error)}markAsRead(k,B){Sc.b.isDebugMailData(B)?yw.markAsRead(B).then(k).catch((()=>this.markAsReadFailure(B))):this._cloudscriptMailNetworkHandler.markAsRead(B).then(k).catch((()=>this.markAsReadFailure(B)))}markAsReadFailure(k){this.game.input.enabled=!0,this.game.broadcaster.broadcast(oi.zr.MarkAsReadFailure,oi.HG.Mailer),j.VyI.log("Could not mark as read.",j.$bb.Error)}deleteMail(k){if(k){if(H().remove(this._mailList,(B=>B===k)),this.mailTotals&&(this.mailTotals.total--,k.isOpened?this.mailTotals.totalRead--:this.mailTotals.totalUnread--,this.broadcastMailCount()),Sc.b.isClientInsertedMail(k))return;Sc.b.isDebugMailData(k)?yw.deleteMail(k).catch((()=>this.deleteMailFailure())):this._cloudscriptMailNetworkHandler.deleteMail(k).catch((()=>this.deleteMailFailure()))}else j.VyI.log("Mail model data is not defined.",j.$bb.Error)}deleteMailFailure(){this.game.broadcaster.broadcast(oi.zr.DeleteMailFailure,oi.HG.Mailer),j.VyI.log("Could not delete mail.",j.$bb.Error)}}(0,G.Cg)([(0,Re.b)("535-27b9"),(0,G.Sn)("design:type",gw)],_w.prototype,"_cloudscriptMailNetworkHandler",void 0),(0,G.Cg)([(0,Re.b)("cc9-a3f0"),(0,G.Sn)("design:type",It.W)],_w.prototype,"_hudService",void 0);var Ew=U(2952);let ww=class extends zt.D{getWorldList(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.World.GetWorldList,{},!1)}))}updateCachedAppearance(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.Character.UpdateCachedAppearance,{zoneMapChannel:k,userID:B},!1)}))}sendFXMessage(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){const G={action:Ew.P.FX,zoneMapChannel:k,type:B,data:j.Aq$.isDefined(U)?{x:U,y:F}:void 0};yield this.sendMessage(G)}))}sendChatMessage(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){const G={action:Ew.P.Chat,zoneMapChannel:k,emoteID:B,danceID:U,chatID:F,data:null};this.sendMessage(G)}))}sendCoopHostTeamMessage(k,B,U,F,j){return(0,G.sH)(this,void 0,void 0,(function*(){const G={action:Ew.P.HostTeam,zoneMapChannel:k,data:{hostID:B,teamMembers:U,streak:F,readyMembers:j}};yield this.sendMessage(G)}))}sendTransformMessage(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){const G={action:Ew.P.Transform,zoneMapChannel:k,showEffect:B,transformID:U,transformType:F,data:null};yield this.sendMessage(G)}))}sendCoopTeamDisbandedMessage(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U={action:Ew.P.TeamDisbanded,zoneMapChannel:k,data:{hostID:B}};yield this.sendMessage(U)}))}sendCoopTeamRequestJoinMessage(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F={action:Be.m.RequestJoinTeam,zoneMapChannel:k,target:U,data:{userID:B}};yield this.sendMessage(F)}))}sendCoopJoinTeamMessage(k,B,U,F,j,$){return(0,G.sH)(this,void 0,void 0,(function*(){const G={action:Be.m.JoinTeam,zoneMapChannel:k,target:$,data:{hostID:B,teamMembers:U,streak:F,readyMembers:j}};yield this.sendMessage(G)}))}sendCoopTeamUpdatedMessage(k,B,U,F,j){return(0,G.sH)(this,void 0,void 0,(function*(){const G={action:Ew.P.TeamUpdated,zoneMapChannel:k,data:{hostID:B,teamMembers:U,streak:F,readyMembers:j}};yield this.sendMessage(G)}))}sendCoopPlayerLeftTeamMessage(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F={action:Be.m.PlayerLeftTeam,zoneMapChannel:k,target:U,data:{userID:B}};yield this.sendMessage(F)}))}sendCoopStartCoopTitanMatchMessage(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F={action:Be.m.StartCoOpTitanMatch,zoneMapChannel:k,target:U,data:B};yield this.sendMessage(F)}))}sendCoopHostHeartbeatMessage(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U={action:Ew.P.HostHeartbeat,zoneMapChannel:k,data:B};yield this.sendMessage(U)}))}sendCoopSyncHealthMessage(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F={action:Ew.P.SyncHealth,zoneMapChannel:k,data:{crystalHP:B,titanHP:U}};yield this.sendMessage(F)}))}sendCoopQuestionAnsweredMessage(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){const G={action:Be.m.QuestionAnswered,zoneMapChannel:k,target:B,data:{sourcePlayerID:U,correct:F}};yield this.sendMessage(G)}))}sendCoopPlayerAttackedMessage(k,B,U,F,j,$){return(0,G.sH)(this,void 0,void 0,(function*(){const G={action:Ew.P.PlayerAttacked,zoneMapChannel:k,data:{sourcePlayerID:B,missed:U,titanHealth:F,damage:j,spellID:$}};yield this.sendMessage(G)}))}sendCoopTitanAttackedMessage(k,B,U,F,j){return(0,G.sH)(this,void 0,void 0,(function*(){const G={action:Ew.P.TitanAttacked,zoneMapChannel:k,data:{crystalHealth:U,missed:B,damage:F,spellID:j}};yield this.sendMessage(G)}))}sendCoopTitanDefeatedMessage(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B={action:Ew.P.TitanDefeated,zoneMapChannel:k,data:{}};yield this.sendMessage(B)}))}sendCoopPlayersDefeatedMessage(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B={action:Ew.P.PlayersDefeated,zoneMapChannel:k,data:{}};yield this.sendMessage(B)}))}sendCoopJoinTeamFailedMessage(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F={action:Be.m.JoinTeamFailed,zoneMapChannel:k,target:B,data:{reason:U}};yield this.sendMessage(F)}))}sendCoopRejoinJoinTeamMessage(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F={action:Be.m.PlayerRejoinTeam,zoneMapChannel:k,target:B,data:{userID:U}};yield this.sendMessage(F)}))}sendCoopCatapultMessage(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U={zoneMapChannel:k,action:Ew.P.Catapult,userID:B,data:{}};yield this.sendMessage(U)}))}sendChangeAppearanceMessage(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B={action:Ew.P.Change,zoneMapChannel:k,data:{}};yield this.sendMessage(B)}))}sendCoopTeamMessage(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U={action:Ew.P.CoopTeam,zoneMapChannel:k,data:B};yield this.sendMessage(U)}))}sendMessage(k){return(0,G.sH)(this,void 0,void 0,(function*(){this.makeCloudscriptRequest(qt.D.MultiplayerMessage.SendMessage,k,!0)}))}};ww=(0,G.Cg)([(0,tt.injectable)()],ww);var Tw=U(60126),Sw=U(65933);class Aw extends js.D{bulkUpdatePetMergeRank(k){return(0,G.sH)(this,void 0,void 0,(function*(){0}))}performMergeAction(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){return this.call(qt.D.PetMerge.PerformMergeAction,{basePetUniqueId:k,mergeIngredients:B},!1)}))}}var Cw=U(38560),Ow=U(59219);let Iw=class extends zt.D{setPlayerDebugTime(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.Time.SetPlayerDebugTime,{debugOffset:k,preserveDebugTime:B},!1)}))}getPlayerTimezoneOffsetEntity(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.Time.GetPlayerTimezoneEntity,{},!1)}))}};Iw=(0,G.Cg)([(0,Q.injectable)()],Iw);class Dw extends bw{constructor(k){super(k),this.titan=null,this.isCatapultBattle=!1,k.broadcaster.addAppListener(oi.lT.Setup,(()=>{this.setup()}),this,oi.HG.NetworkHandlers,!0)}getTitans(){return(0,G.sH)(this,void 0,void 0,(function*(){if(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasCompletedTutorial()){const k=K.q.instance.prodigy.timeManager.getServerTimeMs();if(k>=Dw._lastNetworkCheckTime+Dw.TITAN_NETWORK_CHECK_MIN_TIME_MS){Dw._lastNetworkCheckTime=k;const B=null;B?this.getTitansSuccess(B):(K.q.instance.prodigy.loading(!0),yield K.q.instance.prodigy.gameContainer.get("c97-bd0d").getTitans(this.getTitansSuccess.bind(this),this.networkCallFailure.bind(this)))}else this.getTitansSuccess(this.titan)}}))}getTitan(k,B="Titan"){if(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasCompletedTutorial()){let U=null;if(U)this.getTitanSuccess(B,U);else{K.q.instance.prodigy.loading(!0);K.q.instance.prodigy.gameContainer.get("c97-bd0d").getTitan(k,this.getTitanSuccess.bind(this,B),this.getTitanFailure.bind(this,B)).catch(j.RQr.createHandler("Could not get status of Titan"))}}}getTitanUserData(){if(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasCompletedTutorial()){K.q.instance.prodigy.gameContainer.get("c97-bd0d").getTitanUserData(null,null).catch(j.RQr.createHandler("Could not get user titan data"))}}hitTitan(k){if(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasCompletedTutorial()){K.q.instance.prodigy.loading(!0);const B=K.q.instance.prodigy.gameContainer.get("c97-bd0d");B.hitTitan(k,this.hitTitanSuccess.bind(this),this.networkCallFailure.bind(this)).catch(j.RQr.createHandler("Could not do damage to Titan")),this.isCatapultBattle&&B.hitTitan(k,this.hitTitanSuccess.bind(this),this.networkCallFailure.bind(this)).catch(j.RQr.createHandler("Could not do damage to Titan"))}}isTitanAlive(){var k,B,U;return j.Aq$.isDefined(null===(k=this.titan)||void 0===k?void 0:k.id)&&(null===(B=this.titan)||void 0===B?void 0:B.health)>0&&!(null===(U=this.titan)||void 0===U?void 0:U.processed)}isNewTitan(){var k;const B=null===(k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.playerTitanData)||void 0===k?void 0:k.titanID;return j.Aq$.isDefined(this.titan)&&(!j.Aq$.isDefined(B)||B!==this.titan.id)}setup(){this.game.broadcaster.removeAppListener(oi.lT.Setup,this,oi.HG.NetworkHandlers),this.getTitanUserData()}getTitansSuccess(k){K.q.instance.prodigy.loading(!1),this.titan=k,this.game.broadcaster.broadcast(oi.RZ.GotTitans,"Titan",[k])}getTitanSuccess(k,B){K.q.instance.prodigy.loading(!1),this.titan=B,this.game.broadcaster.broadcast(oi.RZ.GotTitan,k,[B])}getTitanFailure(k){K.q.instance.prodigy.loading(!1),j.VyI.log("Error: Titan network call failure",j.$bb.Error),this.titan=null,this.game.broadcaster.broadcast(oi.RZ.GotTitan,k,[null])}hitTitanSuccess(k){K.q.instance.prodigy.loading(!1),this.titan.hits=k.hits}networkCallFailure(){K.q.instance.prodigy.loading(!1),this.titan=null,j.VyI.log("Error: Titan network call failure",j.$bb.Verbose),this.game.broadcaster.broadcast(oi.RZ.GotTitan,"Titan",[null])}}Dw.TITAN_NETWORK_CHECK_MIN_TIME_MS=3e5,Dw._lastNetworkCheckTime=0;var Rw=U(37962),Pw=U(34854),Mw=U(81623),Nw=U(29044);let xw=class{constructor(){this._userID=null}setSessionToken(k,B){this._userID=k,this._token=B;const U=K.q.instance.prodigy.gameContainer.get("00d-b27e");U.setToken("token",this._token,!0,!1),U.setToken("auth-key",this._token,!0,!1),U.setToken("userID",`${this._userID}`,!1,!0)}isLoggedIn(){return j.Aq$.isDefined(this._token)&&this._token.length>0}getSessionToken(){return this._token}authenticateRequest(k){if(k.getMethod()===j.iXQ.Get)k.setQueryParameter("token",this._token),k.setQueryParameter("userID",`${this._userID}`);else if(k.getBody()instanceof j._A9){const B=k.getBody().getJson();B.token=this._token,B["auth-key"]=this._token,B.userID=`${this._userID}`}else if(k.getBody()instanceof te.c){const B=k.getBody().getJson();B.token=this._token,B["auth-key"]=this._token,B.userID=`${this._userID}`}else j.VyI.log("Could not append legacy authentication to web request",j.$bb.Warning)}logout(){this._token=null}getUserID(){return this._userID}};xw=(0,G.Cg)([(0,tt.injectable)()],xw);var Lw=U(57797),kw=U(92240),Bw=U(94310),Uw=U(32259);class Fw{constructor(k,B,U){this._assets=[],this._locations=[],this._overrideNames={},this._game=k,this._assets=B,this._locations=U}getOverrideName(k){var B;return null===(B=this._overrideNames[k])||void 0===B?void 0:B.map}getOverrideBattleBg(k){var B;return null===(B=this._overrideNames[k])||void 0===B?void 0:B.battleBg}getOverrideBgm(){}active(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;for(let U=0;U0}return!1}getButtons(){return[]}getAssets(k){return j.Aq$.isDefined(this.getOverrideName(k))?this._assets.concat(this.getOverrideName(k)):this._assets}init(k,B){return{}}applySkin(k,B){}cleanup(){}}var Gw=U(92946),jw=U(31589),$w=U(30065),Hw=U(47728);class Vw extends Fw{constructor(){super(...arguments),this._festivalHub="lamplight-B3",this.dailyDrops=[{type:"currency",ID:this.getFestivalCurrency(),N:22}],this.canDoDaily=new Map,this.afterBattleSpawn=[640,320],this.dailyEventSize=new j.I9Y(40,40),this.dailyHighlighterOffset=new j.I9Y(-40,0),this.currentWheelName="unknown-wheel"}getBattleDrops(k,B=1,U=0){const F=this.getFestivalCurrency(),G=k*B+U;return hf.R.addDebugMessage(`Festival currency ID ${F}: ${G}`),[{type:"currency",ID:F,N:G,R:1}]}init(k){this.playerDaily=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily;const B=K.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig();return(null==B?void 0:B.festivalDailyData)&&(this.festivalDailyData=B.festivalDailyData,this.festivalDailyData.dailyPlacements&&(this.dailyPlacements=this.festivalDailyData.dailyPlacements),this.festivalDailyData.dailyDrops&&(this.dailyDrops=this.festivalDailyData.dailyDrops)),(null==B?void 0:B.bossBattleModalData)&&(this.bossBattleModalData=B.bossBattleModalData),this.checkToRefreshDaily().catch(j.RQr.createHandler("Error checking the daily refresh")),K.q.instance.game.broadcaster.addAppListener(oi.n8.FestivalVideoClosed,this.onFestivalVideoClosed,this),{}}checkToRefreshDaily(){return(0,G.sH)(this,void 0,void 0,(function*(){this.playerDaily.isExpired(this.festivalName)&&(yield this.refreshDaily()),this.canDoDaily.set(Lw.je.Normal,!this.playerDaily.isDailyBattleComplete(Lw.je.Normal)&&this.checkStateKeyActiveState(Bw.L.DailyBattles)),this.canDoDaily.set(Lw.je.Boss,!this.playerDaily.isDailyBattleComplete(Lw.je.Boss)&&this.checkStateKeyActiveState(Bw.L.DailyBossBattles))}))}checkStateKeyActiveState(k){var B,U;const F=this.getStateDataFromKey(k);return null===(U=null===(B=null==F?void 0:F.active)||void 0===B?void 0:B.isActive)||void 0===U||U}getStateDataFromKey(k){var B,U;const F=K.q.instance.prodigy.gameContainer.get("99d-5e9e"),G=null===(B=F.getCachedFestivalQuestData())||void 0===B?void 0:B.getStates(),j=null===(U=F.getCachedFestivalQuestData())||void 0===U?void 0:U.getTasks().map((k=>k.taskProgress));return kw.h.calculateState(k,null!=G?G:[],null!=j?j:[])}applySkin(k,B){this.applyWheel(k)}spawnBossStatue(k,B,U,F){B.loadWithDependenciesFromGUID(Ei.l.TransformRelayObject,k.contentGameObject).then((j=>(0,G.sH)(this,void 0,void 0,(function*(){const G=yield B.loadWithDependenciesFromGUID(U,j);G.transform.setPosition(F.x,F.y),k.data.addCollisionZone(k,1050,100,150,180),G.findComponentInChildren(Bl.n).onClicked.add((()=>{this.openBossModalPrefabMenu()}))})))).catch(j.RQr.createHandler("Error loading NPC Boss Statue"))}openBossModalPrefabMenu(){const k=K.q.instance.prodigy.open.prefabMenu(Ei.l.BossBattleModal,void 0,!0,!0,!0);k.createContainer=!1,k.onPrefabLoaded.addOnce((k=>{k.findComponentInChildren(Gw.E).startDailyBossBattleCallback=()=>{this.startDailyBossBattle().catch(j.RQr.createHandler("Error starting a daily boss battle from the modal"))}}))}startDailyBossBattle(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!k.daily.getDailyBattleEncounter(Lw.je.Boss)){const B=yield ki.s.sampleRandomEncounter(this.festivalDailyData.bossEncounterEntity);B&&k.daily.setDailyBattleEncounter(Lw.je.Boss,B)}this.startDailyBattle("lamplight-B3",Lw.je.Boss).catch(j.RQr.createHandler("Error starting daily boss battle"))}))}refreshDaily(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const{normalPlacement:U,bossPlacement:F,normalEncounter:G,bossEncounter:j}=yield Hw.x.sampleDailyBattleData(this.festivalDailyData,k,B);if(U&&G||F&&j)this.dailyPlacements=this.dailyPlacements.filter((k=>k!==U||k!==F)),this.playerDaily.start(this.festivalName,this.festivalDailyData.battleCount,new Map([[Lw.je.Normal,U],[Lw.je.Boss,F]]),new Map([[Lw.je.Normal,G],[Lw.je.Boss,j]]),this.festivalDailyData.refreshIntervalHours);else{const k=K.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig();(null==k?void 0:k.festivalDailyData)&&(this.dailyPlacements=k.festivalDailyData.dailyPlacements)}}))}setIntroState(k,B,U=""){j.VyI.log("SetIntroState is Unimplemented",j.$bb.Warning)}signOnInputDown(k,B,U,F,G){var j;const $=K.q.instance.prodigy.gameContainer.get("12b-405a");K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:"festival-signpost",destinationName:"festival-progression-window",interfaceName:"festival-progression-window",interfaceType:bi.Wm.Modal}),Object.values($w.Q).includes(null===(j=$.getActiveFestival())||void 0===j?void 0:j.type)?Hw.x.openFestivalProgressMenu(bi.$N.SignpostClick):K.q.instance.prodigy.open.message(k,B,U,F,null,G)}placeDaily(k,B,U){var F,G,j,$,H,V,W,q,z,Y,Q,X,Z,tt,et,it,st;const nt=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,at=nt.daily.getDailyBattlePlacement(U);let rt=null;if(null!==(F=this.canDoDaily.get(U))&&void 0!==F&&F&&(null==at?void 0:at.location.includes(B))){const F=at.position[0],ot=at.position[1];if(at.useSpine||U===Lw.je.Boss){let rt=J.Q.Spine_sparkle_2_json;if(U===Lw.je.Boss){const k=null===(j=null===(G=nt.daily.getDailyBattleEncounter(U))||void 0===G?void 0:G.boss)||void 0===j?void 0:j.ID,B=null===($=le.t.getItem("boss",k))||void 0===$?void 0:$.metadata;(null===(V=null===(H=null==B?void 0:B.assets)||void 0===H?void 0:H.battle)||void 0===V?void 0:V.assetKey)&&(rt=J.Q[null===(q=null===(W=null==B?void 0:B.assets)||void 0===W?void 0:W.battle)||void 0===q?void 0:q.assetKey])}else{const k=nt.daily.getDailyBattleEncounter(U),B=null===(z=le.t.getItem("pet",null==k?void 0:k.pets[0].ID))||void 0===z?void 0:z.metadata;(null===(Q=null===(Y=null==B?void 0:B.assets)||void 0===Y?void 0:Y.default)||void 0===Q?void 0:Q.assetKey)?rt=J.Q[null===(Z=null===(X=null==B?void 0:B.assets)||void 0===X?void 0:X.default)||void 0===Z?void 0:Z.assetKey]:(null===(et=null===(tt=null==B?void 0:B.assets)||void 0===tt?void 0:tt.default)||void 0===et?void 0:et.ID)&&(rt=null===(st=null===(it=null==B?void 0:B.assets)||void 0===it?void 0:it.default)||void 0===st?void 0:st.ID)}K.q.instance.prodigy.create.spineNPC(k.content,rt,"idle",F,ot,void 0,void 0,(()=>{this.revealDailyMonster(U,k,B)}),at.flip).name=`${U}Placement`}else rt=K.q.instance.prodigy.create.element(k.foreground,F,ot),rt.highlight(!0,this.dailyHighlighterOffset.x,this.dailyHighlighterOffset.y),rt.arrow.frameName="exclamation",k.addClickableEvent(F,ot,this.dailyEventSize.x,this.dailyEventSize.y,this.revealDailyMonster.bind(this,U,k,B,void 0),void 0,0)}return rt}revealDailyMonster(k,B,U,F){const G=null!=F?F:[0,0],$=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.getDailyBattlePlacement(k);if(!$)return void j.VyI.log(`No daily placement found for location: ${U}`,j.$bb.Warning);const H=$.position,V=K.q.instance.prodigy.event.create();this.afterBattleSpawn=[H[0]+G[0],H[1]+G[1]],V.validPath(B.user,B.path,this.afterBattleSpawn[0],this.afterBattleSpawn[1]),V.function(B.user.faceToward.bind(B.user,H[0])),V.enableInput(!1),V.bgm(null),V.sound(19,"monster"),V.function(B.user.chat.bind(B.user,1)),V.delay(2e3),V.enableInput(!0),V.function((()=>{this.startDailyBattle(U,k).catch(j.RQr.createHandler("Error starting the daily battle"))})),V.start()}startDailyBattle(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U,F,$,H;const V=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,W=V.daily.getDailyBattleEncounter(B);if(!W||!B)return void j.VyI.log(`No encounter or daily battle type found for daily battle at location: ${k}`,j.$bb.Error);const q=B===Lw.je.Boss?this.festivalDailyData.bossEncounterEntity:this.festivalDailyData.encounterEntity;V.daily.isFestivalDailyBattle=!0;const z=B===Lw.je.Boss?Ni.gu.FestivalDailyBoss:Ni.gu.FestivalDailyBattle,Y=W.drops?[...W.drops,...this.dailyDrops]:this.dailyDrops,X=Object.assign(Object.assign({},W),{screen:this.festivalDailyData.screen,pets:[...W.pets],bench:null==q?void 0:q.bench,drops:Y,revampBattleType:z});let Z=k;if(X.boss){const k=K.q.instance.prodigy.gameContainer.get("99d-5e9e"),B={params:{taskEventType:dh.Z7.Unit,unitType:Ni.uj.Boss,id:X.boss.ID,name:X.boss.name,nickname:X.boss.nickname,team:Q.ETeamId.Away}};if(this.festivalDailyData.mapOverrideTasks){const V=yield Promise.all(this.festivalDailyData.mapOverrideTasks.map((U=>(0,G.sH)(this,void 0,void 0,(function*(){return k.willFestivalTaskComplete(U,as.T.DEFEAT_UNIT,B)})))));(null==V?void 0:V.some(Boolean))&&j.Aq$.isDefined(this.festivalDailyData.mapOverrideLocation)&&(Z=null!==(F=null===(U=this.festivalDailyData.mapOverrideLocation)||void 0===U?void 0:U.mapKey)&&void 0!==F?F:Z,this.afterBattleSpawn=null!==(H=null===($=this.festivalDailyData.mapOverrideLocation)||void 0===$?void 0:$.coordinates)&&void 0!==H?H:this.afterBattleSpawn)}}K.q.instance.prodigy.battle.start(X,this.escape.bind(this,k),this.dailyBattleComplete.bind(this,Z,B),null,this._festivalHub),this._game.input.enabled=!0}))}escape(k){K.q.instance.prodigy.world.it(k,this.afterBattleSpawn[0],this.afterBattleSpawn[1])}dailyBattleComplete(k,B){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.playedBattle(B),this.refreshDaily(k,B).then((()=>{K.q.instance.prodigy.world.it(k,this.afterBattleSpawn[0],this.afterBattleSpawn[1])})).catch(j.RQr.createHandler("Error refreshing daily battles"))}openStore(k,B=!1){j.Aq$.isDefined(k)&&(B?K.q.instance.prodigy.open.legacyStore(k):K.q.instance.prodigy.open.store(k))}teleportToEvent(k){K.q.instance.prodigy.world.it(j.Aq$.isDefined(k)?k:this._festivalHub)}createHudButton(k,B){return K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("key",Vw.WORLD_MAP_ID)>0?{key:k,frameName:B,callback:()=>{this.onClickCallback()}}:null}onClickCallback(){Ta.i.isZoneLocked(hn.A_.LAMPLIGHT)?Ta.i.openLockMessage(hn.A_.LAMPLIGHT):K.q.instance.prodigy.open.prefabMenu(Ei.l.StayLeaveModalDialog).onPrefabLoaded.addOnce((k=>{k.findComponent(ff.R).setLocalizationKey("LAMPLIGHT_CONFIRM_TRAVEL");const B=new Uw.e;B.create(),B.configure(k),B.onSuccess.addOnce((()=>{K.q.instance.prodigy.open.menuCloseAll();const k=K.q.instance.prodigy.world.getCurrentZone();K.q.instance.prodigy.world.getZone(k).handleLeaving(In.j.teleport,(()=>{this.teleportToEvent()}))}))}))}getCurrentFestivalWheelId(k=6){const B=K.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig(),U=K.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival();if(!B||!U)return j.VyI.log("No active festival found",j.$bb.Warning),k;const F=Oc.R.getNow();for(const G of B.festivalPrizeWheels){const k=new Date(U.startDate);k.setDate(k.getDate()+G.startDateOffset);const B=new Date(U.startDate);if(B.setDate(B.getDate()+G.endDateOffset),k<=F&&B>=F)return this.playerDaily.currentWheelID=G.wheelId,this.playerDaily.currentWheelEndDate=B,G.wheelId}return k}applyWheel(k){var B,U,F,$,H,V;const W=K.q.instance.prodigy.gameContainer.get("12b-405a"),z=W.getFestivalConfig(),Y=null===(B=null==z?void 0:z.festivalPrizeWheels)||void 0===B?void 0:B.find((k=>k.wheelId===this.getCurrentFestivalWheelId()));if(!z||!Y)return void j.VyI.log("No festival config or wheel data found",j.$bb.Warning);const Q=null!==(U=Y.mapLocation)&&void 0!==U?U:"lamplight-B3",X=null!==(F=Y.position)&&void 0!==F?F:{x:78,y:70},Z=Y.wheelFrame?{atlas:Y.wheelAtlas,frame:Y.wheelFrame}:{atlas:q._.Event_summerfest_json,frame:"wheel-of-sun"};if(k.saveTag===Q){this.currentWheelName=null!==(V=null===(H=null===($=W.getFestivalConfig())||void 0===$?void 0:$.festivalPrizeWheels.find((k=>k.wheelId===this.getCurrentFestivalWheelId())))||void 0===H?void 0:H.name)&&void 0!==V?V:"wheel-of-sun-map-asset";const B=K.q.instance.prodigy.gameContainer.get("d0e-64fd");B.loadWithDependenciesFromGUID(Ei.l.TransformRelayObject,k.contentGameObject).then((U=>(0,G.sH)(this,void 0,void 0,(function*(){var F,G;Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(B,Ei.l.FestivalPrizeWheel,{customWheelId:this.getCurrentFestivalWheelId(),isWheelNewStateActive:null!==(F=this.playerDaily.isNewFestivalWheel)&&void 0!==F&&F,isWheelNpcActive:null===(G=Y.customWheelNpcUsed)||void 0===G||G}).then((B=>{B.parent=U,B.transform.setPosition(X.x,X.y),this.festivalPrizeWheelComponent=B.findComponentInChildren(jw.l),this.festivalPrizeWheelComponent.wheelGraphic.updateAsset(Z.atlas,Z.frame),this.festivalPrizeWheelComponent.wheelGraphic.sizeToSourceImage(),this.festivalPrizeWheelComponent.screen=k,this.updateWheelSparkles(this.festivalPrizeWheelComponent)})).catch(j.RQr.createHandler("Error loading Festival Prize Wheel prefab with injected values"))})))).catch(j.RQr.createHandler("Error loading Festival Prize Wheel prefab"))}}updateWheelSparkles(k){}getDailyElementSizeForSpinePlacements(k,B,U){var F;const G=null===(F=k.findComponent(Wn.v))||void 0===F?void 0:F.getCurrentDimensions();return G?(this.dailyEventSize.x=G.width,this.dailyEventSize.y=G.height,{dailyX:B-this.dailyEventSize.x/2,dailyY:U-this.dailyEventSize.y}):{dailyX:B,dailyY:U}}onFestivalVideoClosed(){this._questManagerHub.setupValidTasks().catch(j.RQr.createHandler("Error setting up quests after festival video closed"))}talkToShopkeeper(k,B,U,F,G){const j=new Ti.rD(this._game),$=K.q.instance.prodigy.breadcrumbManager,H=[],V=$.isBreadcrumbComplete(k,B),W=V?U:F;for(const q of W)H.push({dialogueData:j.dataProvider.get(q),blockInput:!0});V||H.push({callback:()=>{$.completeBreadcrumb(k,B)}}),j.addEvents(H),j.start(!0,(()=>this.openStore(G)))}cleanup(){super.cleanup(),K.q.instance.game.broadcaster.removeAppListener(oi.n8.FestivalVideoClosed,this.onFestivalVideoClosed,this)}}Vw.WORLD_MAP_ID=13,(0,G.Cg)([(0,Re.b)("a25-68f4"),(0,G.Sn)("design:type",As.n)],Vw.prototype,"_questManagerHub",void 0);var Ww=U(20706),qw=U(47101),Kw=U(80494);class zw extends Vw{constructor(k){super(k,[Rn.t.Tileset_town_october_night_png,Rn.t.Tileset_town_november_night_png,Rn.t.Tileset_town_new_night_png,Rn.t.Tileset_generic_new_night_png,Rn.t.Tileset_arena_gold_night_png,Rn.t.Tileset_forest_new_night_png,Rn.t.Tileset_firefly_new_night_png,q._.Event_pumpkinfest_json,q._.Npc_sprite_julia_ghoulia_json,J.Q.Spine_npc_julia_json,X.V.Bgm_pumpkinfest],["lamplight-A2","lamplight-A3","lamplight-A4","lamplight-B0","lamplight-B1","lamplight-B2","lamplight-B3","lamplight-B4","lamplight-B5","lamplight-C2","lamplight-C3","lamplight-C3-arena","lamplight-C4"]),this.festivalName="Pumpkinfest",this.adID=5,this._overrideNames={"lamplight-A2":{map:qw.N.Map_lamplight_a2_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-A3":{map:qw.N.Map_lamplight_a3_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-A4":{map:qw.N.Map_lamplight_a4_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-B0":{map:qw.N.Map_lamplight_b0_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-B1":{map:qw.N.Map_lamplight_b1_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-B2":{map:qw.N.Map_lamplight_b2_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-B3":{map:qw.N.Map_lamplight_b3_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-B4":{map:qw.N.Map_lamplight_b4_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-B5":{map:qw.N.Map_lamplight_b5_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-C2":{map:qw.N.Map_lamplight_c2_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-C3":{map:qw.N.Map_lamplight_c3_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-C4":{map:qw.N.Map_lamplight_c4_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight}},this.dailyPlacements=[{location:"lamplight-A2",position:[440,440],pathOffset:[-30,80],pumpkin:3,type:Lw.k$.Any},{location:"lamplight-A3",position:[980,292],indicatorOffsetX:-20,pathOffset:[90,140],pumpkin:5,type:Lw.k$.Any},{location:"lamplight-A4",position:[1160,320],pathOffset:[-40,40],pumpkin:4,type:Lw.k$.Any},{location:"lamplight-B2",position:[140,220],indicatorOffsetX:-20,pathOffset:[70,80],pumpkin:5,type:Lw.k$.Any},{location:"lamplight-B3",position:[400,600],indicatorOffsetX:5,pathOffset:[0,-50],pumpkin:2,type:Lw.k$.Any},{location:"lamplight-B4",position:[1080,320],pathOffset:[-40,120],pumpkin:1,type:Lw.k$.Any},{location:"lamplight-B5",position:[480,240],pathOffset:[-40,100],pumpkin:3,type:Lw.k$.Any},{location:"lamplight-C2",position:[760,360],indicatorOffsetX:5,pathOffset:[-30,100],pumpkin:2,type:Lw.k$.Any},{location:"lamplight-C3-arena",position:[280,360],pathOffset:[-30,100],pumpkin:1,type:Lw.k$.Any},{location:"lamplight-C4",position:[1e3,440],pathOffset:[-30,100],pumpkin:4,type:Lw.k$.Any}],this.canDoDaily.set(Lw.je.Normal,!1)}getButtons(){return[this.createHudButton(q._.General_icons_hud_json,"pumpkinfest-0")]}getBattleDrops(k){return super.getBattleDrops(k).concat([{type:"item",ID:126,N:1,R:.33},{type:"item",ID:125,N:1,R:.33}])}getFestivalCurrency(){return 2}init(k){return super.init(k),k.addPostFilter(new Ww.L(1114163,16772812)),{bgmID:26}}getOverrideBgm(){return X.V.Bgm_pumpkinfest}applySkin(k){super.applySkin(k);const B=q._.Event_pumpkinfest_json,U=k.saveTag,F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),$=K.q.instance.prodigy.gameContainer.get("d0e-64fd");if("lamplight-B3"===U){const U=k.background.addChild(K.q.instance.prodigy.create.sprite(640,250,B,"event-sign"));U.anchor.set(.5,1),U.inputEnabled=!0,U.events.onInputDown.add(this.signOnInputDown.bind(this,F.getText("PUMPKINFEST_SIGN_MESSAGE"),null,null,F.getText("PUMPKINFEST_SIGN_TITLE"))),k.data.addCollisionZone(k,600,160,100,80),$.loadWithDependenciesFromGUID(Ei.l.TransformRelayObject,k.foregroundGameObject).then((B=>(0,G.sH)(this,void 0,void 0,(function*(){(yield $.loadWithDependenciesFromGUID(Ei.l.Npc_kandi_korn,B)).transform.setPosition(890,530),k.data.addCollisionZone(k,840,420,120,120)})))).catch(j.RQr.createHandler("Error loading Kandi Korn")),$.loadWithDependenciesFromGUID(Ei.l.TransformRelayObject,k.foregroundGameObject).then((B=>(0,G.sH)(this,void 0,void 0,(function*(){(yield $.loadWithDependenciesFromGUID(Ei.l.Npc_kandi_kart,B)).transform.setPosition(930,390),k.data.addCollisionZone(k,940,420,240,240)})))).catch(j.RQr.createHandler("Error loading Kandi's Kart")),$.loadWithDependenciesFromGUID(Ei.l.TransformRelayObject,k.contentGameObject).then((B=>(0,G.sH)(this,void 0,void 0,(function*(){(yield $.loadWithDependenciesFromGUID(Ei.l.NPCGnomeStylist,B)).transform.setPosition(270,570),k.data.addCollisionZone(k,240,500,90,90)})))).catch(j.RQr.createHandler("Error loading NPC Gnome Stylist")),this.spawnBossStatue(k,$,Ei.l.PumpkinfestBossStatue,new j.I9Y(1105,125))}$.loadWithDependenciesFromGUID(Ei.l.Particle_fog_pumpkinfest,k.uiLayerGameObject).catch(j.RQr.createHandler("Error loading Fog prefab"));const H=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.get("zone-lamplight");j.Aq$.isDefined(H)&&j.Aq$.isDefined(H.quest)&&H.quest.ID>1&&(this.placeDaily(k,K.q.instance.prodigy.world.getCurrentMap(),Lw.je.Normal),this.placeDaily(k,K.q.instance.prodigy.world.getCurrentMap(),Lw.je.Boss))}updateWheelSparkles(k){k.moveSparkleEffect(5,-25)}talkToShopkeeper(){const k=new Ti.rD(this._game),B=K.q.instance.prodigy.breadcrumbManager,U=ln.B.FEATURE_PUMPKINFEST_CUTSCENES,F=ln.B.BREADCRUMB_PUMPKINFEST_INTRO;B.isBreadcrumbComplete(U,F)?k.addEvents([{dialogueData:k.dataProvider.get(910),blockInput:!0}]):k.addEvents([{dialogueData:k.dataProvider.get(905),blockInput:!0},{dialogueData:k.dataProvider.get(906),blockInput:!0},{dialogueData:k.dataProvider.get(907),blockInput:!0},{dialogueData:k.dataProvider.get(908),blockInput:!0},{dialogueData:k.dataProvider.get(909),blockInput:!0},{callback:()=>{B.completeBreadcrumb(U,F)}}]),k.start(!0,(()=>{K.q.instance.prodigy.open.store(14)}))}revealDailyMonster(k,B,U){var F;let G;const j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.getDailyBattlePlacement(k);j&&(G=null!==(F=j.pathOffset)&&void 0!==F?F:[0,0],super.revealDailyMonster(k,B,U,G))}}var Yw=U(45224);class Qw extends Vw{constructor(k){super(k,[Rn.t.Tileset_town_new_png,q._.Event_starlight_festival_json,Rn.t.Tileset_springfest_png,X.V.Bgm_spring_fest],["lamplight-A1","lamplight-A2","lamplight-A3","lamplight-A4","lamplight-B1","lamplight-B2","lamplight-B3","lamplight-B4","lamplight-B5","lamplight-C2","lamplight-C3-arena","lamplight-C3","lamplight-C4","lamplight-D3"]),this.festivalName="Springfest",this.b3FishLayerStates={1:!1,2:!1,3:!1,4:!0},this.adID=100,this._overrideNames={"lamplight-A1":{map:qw.N.Map_lamplight_a1_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest},"lamplight-A2":{map:qw.N.Map_lamplight_a2_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest},"lamplight-A3":{map:qw.N.Map_lamplight_a3_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest},"lamplight-B2":{map:qw.N.Map_lamplight_b2_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest},"lamplight-B3":{map:qw.N.Map_lamplight_b3_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest},"lamplight-B4":{map:qw.N.Map_lamplight_b4_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest},"lamplight-C2":{map:qw.N.Map_lamplight_c2_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest},"lamplight-C3":{map:qw.N.Map_lamplight_c3_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest},"lamplight-C4":{map:qw.N.Map_lamplight_c4_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest},"lamplight-D3":{map:qw.N.Map_lamplight_d3_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest}},this.dailyPlacements=[{location:"lamplight-A2",position:[1080,640],pathOffset:[0,-60],type:Lw.k$.Any},{location:"lamplight-A3",position:[40,440],pathOffset:[70,30],type:Lw.k$.Any},{location:"lamplight-A4",position:[120,600],pathOffset:[40,-40],type:Lw.k$.Any},{location:"lamplight-B2",position:[440,520],pathOffset:[20,-50],type:Lw.k$.Any},{location:"lamplight-B3",position:[80,680],pathOffset:[50,-50],type:Lw.k$.Any},{location:"lamplight-B4",position:[960,600],pathOffset:[0,-20],type:Lw.k$.Any},{location:"lamplight-B5",position:[40,360],pathOffset:[40,-5],type:Lw.k$.Any},{location:"lamplight-C2",position:[40,520],pathOffset:[90,40],type:Lw.k$.Any},{location:"lamplight-C3-arena",position:[280,600],pathOffset:[90,30],type:Lw.k$.Any},{location:"lamplight-C4",position:[360,120],pathOffset:[-90,68],type:Lw.k$.Any}],this.dailyHighlighterOffset.x=-55,this.dailyHighlighterOffset.y=-15}init(k){return super.init(k),{bgmID:X.V.Bgm_spring_fest}}getFestivalCurrency(){return 17}getOverrideBgm(){return X.V.Bgm_spring_fest}getButtons(){return[this.createHudButton(q._.General_icons_hud_json,"springfest")]}applySkin(k){super.applySkin(k);const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=q._.Event_starlight_festival_json,F=k.saveTag,$=B.state.get("zone-lamplight"),H=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);if(j.Aq$.isDefined($)&&j.Aq$.isDefined($.quest)&&$.quest.ID>1){const B=this.placeDaily(k,F,Lw.je.Normal);j.Aq$.isDefined(B)&&B.add(K.q.instance.prodigy.create.sprite(-14,0,q._.General_icons_json,"eggpile"))}switch(k.saveTag){case Yw.f.TOWN_CENTRE:const B=k.content.addChild(K.q.instance.prodigy.create.sprite(640,250,U,"event-sign-1"));B.anchor.set(.5,1),B.inputEnabled=!0,B.events.onInputDown.add(this.signOnInputDown.bind(this,H.getText("SPRINGFEST_SIGN_MESSAGE"),null,null,H.getText("SPRINGFEST_SIGN_TITLE"),{modifyProperty:[{element:"contentText",property:"horizontalAlignment",value:"center"}]})),B.animations.add("sway",["event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-2","event-sign-3","event-sign-1","event-sign-4","event-sign-5","event-sign-6"],12,!0,!1),B.animations.play("sway",void 0,!0);const F=this._weekendEvents.getActiveFestival(),$=j.Aq$.isDefined(F)?new Date(F.endDate).getTime()-Date.now():0;Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Ei.l.GrottoPortal,{TIME_REMAINING:$},k.contentGameObject).then((k=>(0,G.sH)(this,void 0,void 0,(function*(){k.transform.setPosition(1100,110)})))).catch(j.RQr.createHandler("Error loading Grotto Portal"));break;case Yw.f.BARGO_ZONE:this.addNpc(Ei.l.BargoNPC,320,280,this.talkToBargo);break;case Yw.f.VERNA_ZONE:this.addNpc(Ei.l.VernaNPC,1150,490,this.talkToVerna);break;case Yw.f.HARRIET_ZONE:this.addNpc(Ei.l.HarrietNPC,800,460,this.talkToHarriet),this._game.broadcaster.addAppListener(oi.J8.PlayerEditingMenuClosed,this.bunnyEquipmentUpdate.bind(this),this,this._game);break;case Yw.f.DON_ZORRO_ZONE:this.addNpc(Ei.l.DonZorroNPC,800,420,this.talkToDonZorro),this._game.broadcaster.addAppListener(oi.J8.PlayerEditingMenuClosed,this.foxEquipmentUpdate.bind(this),this,this._game)}}addNpc(k,B,U,F){K.q.instance.prodigy.prefabFactory.addPrefabNPC(k,B,U).then((k=>{k.findComponentInChildren(Bl.n).onClicked.add(F,this)})).catch(j.RQr.createHandler(`Springfest: Unable to load the NPC Prefab: ${k}`))}revealDailyMonster(k,B,U){var F;let G;const j=this.dailyPlacements.find((k=>k.location===U));j&&(G=null!==(F=j.pathOffset)&&void 0!==F?F:[0,0],super.revealDailyMonster(k,B,U,G))}talkToBargo(){const k=new Ti.rD(this._game),B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.equipment.getHat();$.indexOf(Yw.f.BUNNY_HATS,B)>-1?k.addEvents([{dialogueData:k.dataProvider.get(816),blockInput:!0},{callback:()=>{K.q.instance.prodigy.world.it(Yw.f.HARRIET_ZONE,1050,600)}}]):$.indexOf(Yw.f.FOX_HATS,B)>-1?k.addEvents([{dialogueData:k.dataProvider.get(815),blockInput:!0}]):k.addEvents([{dialogueData:k.dataProvider.get(812),blockInput:!0},{dialogueData:k.dataProvider.get(813),blockInput:!0},{dialogueData:k.dataProvider.get(814),blockInput:!0}]),k.start(!0)}talkToVerna(){const k=new Ti.rD(this._game),B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.equipment.getHat();$.indexOf(Yw.f.FOX_HATS,B)>-1?k.addEvents([{dialogueData:k.dataProvider.get(811),blockInput:!0},{callback:()=>{K.q.instance.prodigy.world.it(Yw.f.DON_ZORRO_ZONE,100,460)}}]):$.indexOf(Yw.f.BUNNY_HATS,B)>-1?k.addEvents([{dialogueData:k.dataProvider.get(810),blockInput:!0}]):k.addEvents([{dialogueData:k.dataProvider.get(808),blockInput:!0},{dialogueData:k.dataProvider.get(809),blockInput:!0}]),k.start(!0)}talkToHarriet(){const k=new Ti.rD(this._game),B=K.q.instance.prodigy.breadcrumbManager,U=ln.B.FEATURE_SPRINGFEST_CUTSCENES,F=ln.B.BREADCRUMB_FIRST_SPRINGFEST_HARRIET_HOOD_CLICK;B.isBreadcrumbComplete(U,F)?k.addEvents([{dialogueData:k.dataProvider.get(805),blockInput:!0},{dialogueData:k.dataProvider.get(806),blockInput:!0},{dialogueData:k.dataProvider.get(807),blockInput:!0}]):k.addEvents([{dialogueData:k.dataProvider.get(798),blockInput:!0},{dialogueData:k.dataProvider.get(799),blockInput:!0},{dialogueData:k.dataProvider.get(800),blockInput:!0},{dialogueData:k.dataProvider.get(801),blockInput:!0},{dialogueData:k.dataProvider.get(802),blockInput:!0},{dialogueData:k.dataProvider.get(803),blockInput:!0},{dialogueData:k.dataProvider.get(804),blockInput:!0},{callback:()=>{B.completeBreadcrumb(U,F)}}]);k.start(!0,(()=>{this.openStore(25)}))}talkToDonZorro(){const k=new Ti.rD(this._game),B=K.q.instance.prodigy.breadcrumbManager,U=ln.B.FEATURE_SPRINGFEST_CUTSCENES,F=ln.B.BREADCRUMB_FIRST_SPRINGFEST_DON_ZORRO_CLICK;B.isBreadcrumbComplete(U,F)?k.addEvents([{dialogueData:k.dataProvider.get(792),blockInput:!0},{dialogueData:k.dataProvider.get(793),blockInput:!0},{dialogueData:k.dataProvider.get(794),blockInput:!0}]):k.addEvents([{dialogueData:k.dataProvider.get(785),blockInput:!0},{dialogueData:k.dataProvider.get(786),blockInput:!0},{dialogueData:k.dataProvider.get(787),blockInput:!0},{dialogueData:k.dataProvider.get(788),blockInput:!0},{dialogueData:k.dataProvider.get(789),blockInput:!0},{dialogueData:k.dataProvider.get(790),blockInput:!0},{dialogueData:k.dataProvider.get(791),blockInput:!0},{callback:()=>{B.completeBreadcrumb(U,F)}}]);k.start(!0,(()=>{this.openStore(24)}))}bunnyEquipmentUpdate(){this.checkEquipmentUpdate(Yw.f.BUNNY_HATS,[812,814],Yw.f.BARGO_ZONE,300,300)}foxEquipmentUpdate(){this.checkEquipmentUpdate(Yw.f.FOX_HATS,[808,809],Yw.f.VERNA_ZONE,1050,510)}checkEquipmentUpdate(k,B,U,F,G){const j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.equipment.getHat();-1===$.indexOf(k,j)&&(this._game.broadcaster.removeAppListener(oi.J8.PlayerEditingMenuClosed,this,this._game),this.forceLeaveEvent(B,U,F,G))}forceLeaveEvent(k,B,U,F){const G=new Ti.rD(this._game);G.addEvents([{dialogueData:G.dataProvider.get(k[0]),blockInput:!0},{dialogueData:G.dataProvider.get(k[1]),blockInput:!0}]),G.start(!0,(()=>{K.q.instance.prodigy.world.it(B,U,F)}))}}(0,G.Cg)([(0,Re.b)("12b-405a"),(0,G.Sn)("design:type",Qe.n)],Qw.prototype,"_weekendEvents",void 0),(0,G.Cg)([(0,Re.b)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Qw.prototype,"_prefabLoader",void 0);class Xw extends Vw{constructor(k){super(k,[Rn.t.Tileset_town_november_png,q._.Event_starlight_festival_json,q._.Npc_sprite_mama_star_json,X.V.Bgm_starlight_festival],["lamplight-A2","lamplight-A3","lamplight-A4","lamplight-B0","lamplight-B1","lamplight-B2","lamplight-B3","lamplight-B4","lamplight-B5","lamplight-C2","lamplight-C3","lamplight-C3-arena","lamplight-C4"]),this.festivalName=Qe.R.StarlightFestival,this.adID=1,this.defaultNames={"lamplight-A2":"map-lamplight-a2","lamplight-A3":"map-lamplight-a3","lamplight-A4":"map-lamplight-a4","lamplight-B0":"map-lamplight-b0","lamplight-B1":"map-lamplight-b1","lamplight-B2":"map-lamplight-b2","lamplight-B3":"map-lamplight-b3","lamplight-B4":"map-lamplight-b4","lamplight-B5":"map-lamplight-b5","lamplight-C2":"map-lamplight-c2","lamplight-C3-arena":"map-lamplight-c3-arena","lamplight-C4":"map-lamplight-c4"},this._overrideNames={"lamplight-A2":{map:qw.N.Map_lamplight_a2_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-A3":{map:qw.N.Map_lamplight_a3_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-A4":{map:qw.N.Map_lamplight_a4_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-B0":{map:qw.N.Map_lamplight_b0_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-B1":{map:qw.N.Map_lamplight_b1_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-B2":{map:qw.N.Map_lamplight_b2_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-B3":{map:qw.N.Map_lamplight_b3_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-B4":{map:qw.N.Map_lamplight_b4_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-B5":{map:qw.N.Map_lamplight_b5_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-C2":{map:qw.N.Map_lamplight_c2_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-C3":{map:qw.N.Map_lamplight_c3_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-C4":{map:qw.N.Map_lamplight_c4_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight}},this.dailyPlacements=[{location:"lamplight-A2",position:[1080,640],pathOffset:[0,-60],type:Lw.k$.Any},{location:"lamplight-A3",position:[40,440],pathOffset:[70,30],type:Lw.k$.Any},{location:"lamplight-A4",position:[120,600],pathOffset:[40,-40],type:Lw.k$.Any},{location:"lamplight-B2",position:[440,520],pathOffset:[20,-50],type:Lw.k$.Any},{location:"lamplight-B3",position:[80,680],pathOffset:[50,-50],type:Lw.k$.Any},{location:"lamplight-B4",position:[960,600],pathOffset:[0,-20],type:Lw.k$.Any},{location:"lamplight-B5",position:[40,360],pathOffset:[40,-5],type:Lw.k$.Any},{location:"lamplight-C2",position:[40,520],pathOffset:[90,40],type:Lw.k$.Any},{location:"lamplight-C3-arena",position:[280,600],pathOffset:[90,30],type:Lw.k$.Any},{location:"lamplight-C4",position:[360,120],pathOffset:[-90,68],type:Lw.k$.Any}],this.dailyHighlighterOffset.x=-55}getFestivalCurrency(){return 4}getButtons(){return[this.createHudButton(q._.General_icons_hud_json,"starlight-festival")]}init(k){var B,U;super.init(k);const F=k.saveTag.split("-")[1],G="B3"!==F?[1,0]:[2,3],j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,$=(null===(B=this.canDoDaily.get(Lw.je.Normal))||void 0===B||B)&&k.saveTag===(null===(U=j.daily.getDailyBattlePlacement(Lw.je.Normal))||void 0===U?void 0:U.location);return k.zone.getMap(F).enableLayerID(G[0],$),k.zone.getMap(F).enableLayerID(G[1],!$),{bgmID:24}}getOverrideBgm(){return X.V.Bgm_starlight_festival}applySkin(k){super.applySkin(k),this.setCutsceneSpawn(k),this.placeDaily(k,K.q.instance.prodigy.world.getCurrentMap(),Lw.je.Normal),this.placeDaily(k,K.q.instance.prodigy.world.getCurrentMap(),Lw.je.Boss);const B=K.q.instance.prodigy.gameContainer.get("d0e-64fd");B.loadWithDependenciesFromGUID(Ei.l.StarfallController,k.uiLayerGameObject).catch(j.RQr.createHandler("Error loading Starfall prefab")),"lamplight-B3"===k.saveTag&&this.setupLamplightB3(k,B)}setupLamplightB3(k,B){const U=q._.Event_starlight_festival_json,F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),$=k.content.addChild(K.q.instance.prodigy.create.sprite(640,250,U,"event-sign-1"));$.anchor.set(.5,1),$.inputEnabled=!0,$.events.onInputDown.add(this.signOnInputDown.bind(this,F.getText("STARLIGHT_SIGN_MESSAGE"),null,null,F.getText("STARLIGHT_SIGN_TITLE"),{modifyProperty:[{element:"contentText",property:"horizontalAlignment",value:"center"}]})),$.animations.add("sway",["event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-2","event-sign-3","event-sign-1","event-sign-4","event-sign-5","event-sign-6"],12,!0,!1),$.animations.play("sway",void 0,!0),Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(B,Ei.l.Npc_imani_star,{},k.contentGameObject).then((B=>(0,G.sH)(this,void 0,void 0,(function*(){B.transform.setPosition(872,481),k.data.addCollisionZone(k,822,371,90,132)})))).catch(j.RQr.createHandler("Error loading NPC Imani Star")),Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(B,Ei.l.Npc_milkyway,{},k.contentGameObject).then((B=>(0,G.sH)(this,void 0,void 0,(function*(){B.transform.setPosition(1020,581),k.data.addCollisionZone(k,970,461,140,172)})))).catch(j.RQr.createHandler("Error loading NPC Milkyway")),B.loadWithDependenciesFromGUID(Ei.l.TransformRelayObject,k.contentGameObject).then((U=>(0,G.sH)(this,void 0,void 0,(function*(){(yield B.loadWithDependenciesFromGUID(Ei.l.NPCGnomeStylist,U)).transform.setPosition(270,570),k.data.addCollisionZone(k,240,500,90,90)})))).catch(j.RQr.createHandler("Error loading NPC Gnome Stylist")),this.spawnBossStatue(k,B,Ei.l.NPCBossStatue,new j.I9Y(1100,125))}talkToShopkeeper(){const k=new Ti.rD(this._game),B=K.q.instance.prodigy.breadcrumbManager,U=ln.B.FEATURE_STARLIGHT_CUTSCENES,F=ln.B.BREADCRUMB_STARLIGHT_INTRO;B.isBreadcrumbComplete(U,F)?k.addEvents([{dialogueData:k.dataProvider.get(591),blockInput:!0},{dialogueData:k.dataProvider.get(592),blockInput:!0}]):k.addEvents([{dialogueData:k.dataProvider.get(593),blockInput:!0},{dialogueData:k.dataProvider.get(594),blockInput:!0},{dialogueData:k.dataProvider.get(595),blockInput:!0},{dialogueData:k.dataProvider.get(596),blockInput:!0},{dialogueData:k.dataProvider.get(597),blockInput:!0},{callback:()=>{B.completeBreadcrumb(U,F)}}]),k.start(!0,(()=>{this.openStore(13)}))}revealDailyMonster(k,B,U){var F;let G;const j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.getDailyBattlePlacement(k);j&&(G=null!==(F=j.pathOffset)&&void 0!==F?F:[0,0],super.revealDailyMonster(k,B,U,G))}getOverrideName(k){var B,U,F;const G=K.q.instance.prodigy.gameContainer.get("99d-5e9e"),j=null===(B=G.getCachedFestivalQuestData())||void 0===B?void 0:B.getStates(),$=null===(U=G.getCachedFestivalQuestData())||void 0===U?void 0:U.getTasks().map((k=>k.taskProgress)),H=kw.h.calculateState(Bw.L.MapOverride,null!=j?j:[],null!=$?$:[]);return(null===(F=null==H?void 0:H.active)||void 0===F?void 0:F.isActive)?super.getOverrideName(k):this.defaultNames[k]}setCutsceneSpawn(k){const B=this.getStateDataFromKey(Bw.L.InitialCutsceneSpawn);if(this.applyMapCoordinates(B,k))return;const U=this.getStateDataFromKey(Bw.L.FinalCutsceneSpawn);this.applyMapCoordinates(U,k)}applyMapCoordinates(k,B){return!(!(null==k?void 0:k.mapCoordinates)||B.saveTag!==k.mapCoordinates.mapKey)&&(B.user.position.x=k.mapCoordinates.coordinates[0],B.user.position.y=k.mapCoordinates.coordinates[1],B.user.faceToward(k.mapCoordinates.faceTowards),!0)}}var Zw=U(75214);class Jw extends Vw{constructor(k){super(k,[Rn.t.Tileset_town_new_png,q._.Event_starlight_festival_json,q._.Event_summerfest_json,Rn.t.Tileset_town_summerfest_png,X.V.Bgm_summerfest],["lamplight-A1","lamplight-A2","lamplight-A3","lamplight-A4","lamplight-B1","lamplight-B2","lamplight-B3","lamplight-B4","lamplight-B5","lamplight-C2","lamplight-C3","lamplight-C3-arena","lamplight-C4"]),this.festivalName="Summerfest",this.adID=3,this._overrideNames={"lamplight-A2":{map:qw.N.Map_lamplight_a2_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-A3":{map:qw.N.Map_lamplight_a3_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-A4":{map:qw.N.Map_lamplight_a4_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-B0":{map:qw.N.Map_lamplight_b0_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-B1":{map:qw.N.Map_lamplight_b1_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-B2":{map:qw.N.Map_lamplight_b2_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-B3":{map:qw.N.Map_lamplight_b3_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-B4":{map:qw.N.Map_lamplight_b4_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-B5":{map:qw.N.Map_lamplight_b5_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-C2":{map:qw.N.Map_lamplight_c2_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-C3":{map:qw.N.Map_lamplight_c3_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-C4":{map:qw.N.Map_lamplight_c4_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest}},this.dailyPlacements=[{location:"lamplight-A2",position:[184,350],pathPosition:[180,367],type:Lw.k$.Any},{location:"lamplight-A3",position:[206,614],pathPosition:[275,607],type:Lw.k$.Any},{location:"lamplight-A4",position:[674,352],pathPosition:[747,382],type:Lw.k$.Any},{location:"lamplight-B2",position:[896,264],pathPosition:[822,286],flip:!0,type:Lw.k$.Any},{location:"lamplight-B4",position:[317,378],pathPosition:[296,411],type:Lw.k$.Any},{location:"lamplight-B5",position:[962,265],pathPosition:[911,285],type:Lw.k$.Any},{location:"lamplight-C2",position:[804,450],pathPosition:[730,472],flip:!0,type:Lw.k$.Any},{location:"lamplight-C3-arena",position:[1130,430],pathPosition:[1051,465],flip:!0,type:Lw.k$.Any},{location:"lamplight-C4",position:[1036,475],pathPosition:[958,497],flip:!0,type:Lw.k$.Any}];for(const B of[50,51])for(const k of le.t.getItem("itemTable",B).data.items)le.t.getItem(k.type,k.ID).data.member=0}init(k){return super.init(k),{bgmID:25}}getOverrideBgm(){return X.V.Bgm_summerfest}getFestivalCurrency(){return 20}getButtons(){const k=[];return k.push(this.createHudButton(q._.General_icons_hud_json,"summerfest")),k}applySkin(k,B){super.applySkin(k,B);const U=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);if(this.placeDaily(k),"lamplight-B3"===k.saveTag){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_SUMMERFEST_CUTSCENES,ln.B.BREADCRUMB_SUMMERFEST_INTRO)){if(ti.U.progressData.step===Ze.B.NotStarted&&F.hasFoundAllKeystones())return void jn.E.runAllKeystonesSequenceOnMapSetup((()=>(0,G.sH)(this,void 0,void 0,(function*(){return B.playScene("summerfestIntro")}))));if(tf.J.meetsNarrativeIntroRequirements)return;return void B.playScene("summerfestIntro")}this.addSign(k,U);const j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily,$=new Zw.p(this._game,"NPC_NAME_ATHENA",166,Kn.ac.Merchant,k.content,1096,300,"idle",void 0,void 0,void 0,{instance_id:j.getFestivalInstanceName(),instance_type:37});$.flip(),$.onClick.add(this.openShop,this);new Zw.p(this._game,"NPC_NAME_KOI",167,Kn.ac.WheelGiver,k.content,310,300,"idle",void 0,void 0,void 0,{instance_id:j.getFestivalInstanceName(),instance_type:this.currentWheelName}).onClick.add((()=>{this.openSunWheel()}));new Zw.p(this._game,"NPC_NAME_MIST",168,Kn.ac.Merchant,k.content,594,550,"idle",void 0,void 0,void 0,{instance_id:j.getFestivalInstanceName(),instance_type:38}).onClick.add(this.openStylist,this);const H=new Zw.p(this._game,"NPC_NAME_MIZU",169,Kn.ac.WheelGiver,k.content,686,550,"idle",void 0,void 0,void 0,{instance_id:j.getFestivalInstanceName(),instance_type:38});H.flip(),H.onClick.add(this.openNicknamer,this)}}addSign(k,B){K.q.instance.prodigy.create.spineNPC(k.content,165,"animation",639,258,void 0,void 0,(()=>{this.signOnInputDown(B.getText("SUMMERFEST_SIGN_MESSAGE"),null,null,B.getText("SUMMERFEST_SIGN_TITLE"),{modifyProperty:[{element:"contentText",property:"horizontalAlignment",value:"center"}]})}),!1)}openShop(){const k=new Ti.rD(this._game);k.addEvents([{dialogueData:k.dataProvider.get(902),blockInput:!0}]),k.start(!0,(()=>{this.openStore(37)}))}openSunWheel(){var k,B;const U=ln.B.FEATURE_SUMMERFEST_CUTSCENES,F=ln.B.BREADCRUMB_FIRST_SUMMERFEST_WHEEL_CLICK;if(K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(U,F))null===(B=this.festivalPrizeWheelComponent)||void 0===B||B.openWheel();else{const B=new Ti.rD(this._game);B.addEvents([{dialogueData:B.dataProvider.get(867),blockInput:!0},{dialogueData:B.dataProvider.get(868),blockInput:!0},{dialogueData:B.dataProvider.get(869),blockInput:!0}]),B.start(!0,null===(k=this.festivalPrizeWheelComponent)||void 0===k?void 0:k.openWheel.bind(this.festivalPrizeWheelComponent))}}openStylist(){const k=new Ti.rD(this._game),B=ln.B.FEATURE_SUMMERFEST_CUTSCENES,U=ln.B.BREADCRUMB_FIRST_SUMMERFEST_STYLIST_CLICK;K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(B,U)?k.addEvents([{dialogueData:k.dataProvider.get(882),blockInput:!0}]):k.addEvents([{dialogueData:k.dataProvider.get(878),blockInput:!0},{dialogueData:k.dataProvider.get(879),blockInput:!0},{dialogueData:k.dataProvider.get(880),blockInput:!0},{dialogueData:k.dataProvider.get(881),blockInput:!0},{callback:()=>{K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(B,U)}}]),k.start(!0,(()=>{K.q.instance.prodigy.open.legacyStore(38)}))}openNicknamer(){const k=new Ti.rD(this._game),B=ln.B.FEATURE_SUMMERFEST_CUTSCENES,U=ln.B.BREADCRUMB_FIRST_SUMMERFEST_NICKNAMER_CLICK;K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(B,U)?k.addEvents([{dialogueData:k.dataProvider.get(886),blockInput:!0}]):k.addEvents([{dialogueData:k.dataProvider.get(883),blockInput:!0},{dialogueData:k.dataProvider.get(884),blockInput:!0},{dialogueData:k.dataProvider.get(885),blockInput:!0},{dialogueData:k.dataProvider.get(886),blockInput:!0},{callback:()=>{K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(B,U)}}]),k.start(!0,(()=>{const k="summerfest",B=K.q.instance.prodigy.gameContainer.get("dcf-fcf7"),U=B.isAvailable(k)?B.getNicknameData(k):[],F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer;K.q.instance.prodigy.open.nicknamer(U,F,k)}))}placeDaily(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.getDailyBattlePlacement(Lw.je.Normal);if(B&&B.location===k.saveTag&&this.canDoDaily.get(Lw.je.Normal)){const U=B.position;this.addApplepot(U[0],U[1],k,B.flip)}}addApplepot(k,B,U,F=!1){let G;const $=K.q.instance.prodigy.create.spineNPC(U.content,156,"idle",k,B,void 0,void 0,(()=>{this.moveToApplepot(U,$,G)}));$.name="Applepot",$.legacyTransform.group.scale.x=F?-1:1;const H=$.findComponentInChildren(Wn.v),V=()=>{G=$.legacyTransform.group.addChild(K.q.instance.prodigy.create.sprite(0,-$.legacyTransform.group.height,q._.General_icons_json,"exclamation")),G.anchor.set(.5,1),this._game.add.tween(G,this).to({y:G.y+10},400,j.GS3.Quadratic.InOut,!0,0,-1,!0)};H.isLoaded?V():H.OnLoaded.addOnce(V)}moveToApplepot(k,B,U){var F;const G=this.dailyPlacements.find((B=>B.location===k.saveTag));if(!G)return void j.VyI.log("No daily placement found for this screen",j.$bb.Error);const $=G.position,H=null!==(F=G.pathPosition)&&void 0!==F?F:[0,0];this.afterBattleSpawn=H;const V=K.q.instance.prodigy.event.create();V.validPath(k.user,k.path,H[0],H[1]),V.function(k.user.faceToward.bind(k.user,$[0])),V.function((()=>{this.startApplepotBattle(k,B,U)})),V.start()}startApplepotBattle(k,B,U){K.q.instance.prodigy.audio.pauseBGM(),K.q.instance.prodigy.audio.playSFX(19,"monster"),K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer.evtProc=!0,this._game.input.enabled=!1,U.destroy(),K.q.instance.prodigy.effects.chatBubble(B.legacyTransform.group),this._game.add.tween(B.legacyTransform,this).to({y:B.legacyTransform.group.y-20},300,j.GS3.Quadratic.Out).to({y:B.legacyTransform.group.y},300,j.GS3.Quadratic.In).to({},100,j.GS3.Linear.None,!0).onTweenComplete.addOnce((()=>{this.startDailyBattle(k.saveTag,Lw.je.Normal)}))}}class tT extends Vw{constructor(k){super(k,[Rn.t.Tileset_town_december_png,q._.Event_winterfest_json,q._.Npc_sprite_howard_cornelius_json,X.V.Bgm_winterfest],["lamplight-A2","lamplight-A3","lamplight-A4","lamplight-B1","lamplight-B2","lamplight-B3","lamplight-B4","lamplight-B5","lamplight-C2","lamplight-C3-arena","lamplight-C3","lamplight-C4"]),this.festivalName="Winterfest",this.adID=6,this._overrideNames={"lamplight-A2":{map:qw.N.Map_lamplight_a2_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-A3":{map:qw.N.Map_lamplight_a3_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-A4":{map:qw.N.Map_lamplight_a4_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-B1":{map:qw.N.Map_lamplight_b1_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-B2":{map:qw.N.Map_lamplight_b2_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-B3":{map:qw.N.Map_lamplight_b3_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-B4":{map:qw.N.Map_lamplight_b4_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-B5":{map:qw.N.Map_lamplight_b5_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-C2":{map:qw.N.Map_lamplight_c2_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-C3":{map:qw.N.Map_lamplight_c3_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-C4":{map:qw.N.Map_lamplight_c4_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest}},this.dailyPlacements=[{location:"lamplight-A2",position:[920,160],pathOffset:[120,180],type:Lw.k$.Any},{location:"lamplight-A3",position:[200,520],pathOffset:[155,100],type:Lw.k$.Any},{location:"lamplight-A4",position:[880,80],pathOffset:[130,170],type:Lw.k$.Any},{location:"lamplight-B2",position:[160,120],pathOffset:[130,170],type:Lw.k$.Any},{location:"lamplight-B3",position:[480,120],pathOffset:[-10,170],type:Lw.k$.Any},{location:"lamplight-B4",position:[120,200],pathOffset:[-20,180],type:Lw.k$.Any},{location:"lamplight-B5",position:[1120,240],pathOffset:[-50,140],type:Lw.k$.Any},{location:"lamplight-C2",position:[1040,320],pathOffset:[-30,160],type:Lw.k$.Any},{location:"lamplight-C3-arena",position:[560,520],pathOffset:[-30,80],type:Lw.k$.Any},{location:"lamplight-C4",position:[1040,320],pathOffset:[-10,170],type:Lw.k$.Any}],this.dailyEventSize.x=120,this.dailyEventSize.y=160,this.dailyHighlighterOffset.x=-10}getFestivalCurrency(){return 5}getButtons(){return[this.createHudButton(q._.General_icons_hud_json,"winterfest")]}getOverrideBgm(){return X.V.Bgm_winterfest}init(k){var B,U;super.init(k);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=k.saveTag.split("-")[1],j=(null===(B=this.canDoDaily.get(Lw.je.Normal))||void 0===B||B)&&k.saveTag===(null===(U=F.daily.getDailyBattlePlacement(Lw.je.Normal))||void 0===U?void 0:U.location);return"B3"!==G?k.zone.getMap(G).enableLayerID(1,j):k.zone.getMap(G).enableLayerID(2,j),{bgmID:13}}applySkin(k){super.applySkin(k),K.q.instance.prodigy.create.snow(k.foregroundGameObject);const B=q._.Event_winterfest_json,U=k.saveTag,F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),$=K.q.instance.prodigy.gameContainer.get("d0e-64fd");if("lamplight-B3"===U){const U=k.content.addChild(K.q.instance.prodigy.create.sprite(640,250,B,"event-sign-1"));U.anchor.set(.5,1),U.inputEnabled=!0,U.events.onInputDown.add(this.signOnInputDown.bind(this,F.getText("WINTERFEST_SIGN_MESSAGE"),null,null,F.getText("WINTERFEST_SIGN_TITLE"))),U.animations.add("sway",["event-sign-1","event-sign-2","event-sign-3","event-sign-4","event-sign-5","event-sign-6","event-sign-7","event-sign-8","event-sign-9","event-sign-10","event-sign-11","event-sign-12","event-sign-13","event-sign-14","event-sign-15","event-sign-16"],10,!0,!1),U.animations.play("sway",void 0,!0),$.loadWithDependenciesFromGUID(Ei.l.TransformRelayObject,k.foregroundGameObject).then((B=>(0,G.sH)(this,void 0,void 0,(function*(){(yield Ja.d.loadWithInjectedValuesAndDependenciesFromGUID($,Ei.l.HowardCorneliusNPC,{})).transform.setPosition(1024,540),k.data.addCollisionZone(k,840,420,120,120)})))).catch(j.RQr.createHandler("Error loading Howard Cornelius NPC")),this.spawnBossStatue(k,$,Ei.l.WinterfestBossStatue,new j.I9Y(1105,125))}const H=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.get("zone-lamplight");j.Aq$.isDefined(H)&&j.Aq$.isDefined(H.quest)&&H.quest.ID>1&&(this.placeDaily(k,K.q.instance.prodigy.world.getCurrentMap(),Lw.je.Normal),this.placeDaily(k,K.q.instance.prodigy.world.getCurrentMap(),Lw.je.Boss))}revealDailyMonster(k,B,U){var F;let G;const j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.getDailyBattlePlacement(k);j&&(G=null!==(F=j.pathOffset)&&void 0!==F?F:[0,0],super.revealDailyMonster(k,B,U,G))}}class eT extends Vw{getFestivalCurrency(){return 31}constructor(k){super(k,[Rn.t.Tileset_town_moonfest_night_png,Rn.t.Tileset_generic_moonfest_night_png,Rn.t.Tileset_moonlight_extras_night_png,Rn.t.Tileset_firefly_new_png,Rn.t.Tileset_forest_new_night_png,Rn.t.Tileset_collisions_png,q._.Npc_sprite_gnome_json,q._.Event_moonlightfest_json,q._.Zone_lamplight_json,X.V.Bgm_moonlight_fest,Z.c.Sfx_lamplight],["lamplight-A2","lamplight-A3","lamplight-A4","lamplight-B0","lamplight-B1","lamplight-B2","lamplight-B3","lamplight-B4","lamplight-B5","lamplight-C2","lamplight-C3","lamplight-C3-arena","lamplight-C4"]),this.festivalName=Qe.R.MoonlightFestival,this._overrideNames={"lamplight-A2":{map:qw.N.Map_moonlight_a2_json,battleBg:Kw.t.BattleMoonlight},"lamplight-A3":{map:qw.N.Map_moonlight_a3_json,battleBg:Kw.t.BattleMoonlight},"lamplight-A4":{map:qw.N.Map_moonlight_a4_json,battleBg:Kw.t.BattleMoonlight},"lamplight-B0":{map:qw.N.Map_moonlight_b0_json,battleBg:Kw.t.BattleMoonlight},"lamplight-B1":{map:qw.N.Map_moonlight_b1_json,battleBg:Kw.t.BattleMoonlight},"lamplight-B2":{map:qw.N.Map_moonlight_b2_json,battleBg:Kw.t.BattleMoonlight},"lamplight-B3":{map:qw.N.Map_moonlight_b3_json,battleBg:Kw.t.BattleMoonlight},"lamplight-B4":{map:qw.N.Map_moonlight_b4_json,battleBg:Kw.t.BattleMoonlight},"lamplight-B5":{map:qw.N.Map_moonlight_b5_json,battleBg:Kw.t.BattleMoonlight},"lamplight-C2":{map:qw.N.Map_moonlight_c2_json,battleBg:Kw.t.BattleMoonlight},"lamplight-C3":{map:qw.N.Map_moonlight_c3_json,battleBg:Kw.t.BattleMoonlight},"lamplight-C4":{map:qw.N.Map_moonlight_c4_json,battleBg:Kw.t.BattleMoonlight}},this.dailyPlacements=[]}init(k){return super.init(k),{bgmID:X.V.Bgm_moonlight_fest}}getOverrideBgm(){return X.V.Bgm_moonlight_fest}applySkin(k){super.applySkin(k);const B=k.saveTag;if(this.placeDaily(k,K.q.instance.prodigy.world.getCurrentMap(),Lw.je.Normal),this.placeDaily(k,K.q.instance.prodigy.world.getCurrentMap(),Lw.je.Boss),"lamplight-B3"!==B)return;const U=this._weekendEvents.getActiveFestival(),F=ve.A.isDefined(U)?new Date(U.endDate).getTime()-Date.now():0;Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Ei.l.MoonPortal,{TIME_REMAINING:F},k.contentGameObject).then((k=>(0,G.sH)(this,void 0,void 0,(function*(){k.transform.setPosition(640,130)})))).catch(j.RQr.createHandler("Error loading Moon Portal")),this._prefabLoader.loadWithDependenciesFromGUID(Ei.l.TransformRelayObject,k.contentGameObject).then((B=>(0,G.sH)(this,void 0,void 0,(function*(){(yield this._prefabLoader.loadWithDependenciesFromGUID(Ei.l.NPCGnomeStylist,B)).transform.setPosition(230,570),k.data.addCollisionZone(k,200,500,90,90)})))).catch(j.RQr.createHandler("Error loading NPC Gnome Stylist")),K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.SelenaNPC,970,560).then((B=>{k.data.addCollisionZone(k,920,420,100,160)})).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.SelenaNPC}`)),this.spawnBossStatue(k,this._prefabLoader,Ei.l.MoonlightBossStatue,new j.I9Y(1105,125))}}(0,G.Cg)([(0,Re.b)("12b-405a"),(0,G.Sn)("design:type",Qe.n)],eT.prototype,"_weekendEvents",void 0),(0,G.Cg)([(0,Re.b)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],eT.prototype,"_prefabLoader",void 0);class iT extends Fw{constructor(k){super(k,[],["shipwreck_shore-A2","shipwreck_shore-A3","shipwreck_shore-A5","shipwreck_shore-A7","shipwreck_shore-B5","shipwreck_shore-B6","shipwreck_shore-B7","shipwreck_shore-B8","shipwreck_shore-B10","shipwreck_shore-B13","shipwreck_shore-C6","shipwreck_shore-C7","shipwreck_shore-C8","shipwreck_shore-C9"])}init(k){if(!Tn.J.isAvgFrameRateAboveThreshold(Vt.s.get("GameConstants.Build.SKIN_FOREGROUND_FPS_THRESHOLD_LIMIT")))return{};this.bubbles=[];const B=this._game.width,U=this._game.height;for(let F=0;F<5;F++){const F=k.foreground.addChild(K.q.instance.prodigy.create.sprite(wn.o.integerInRange(0,B),wn.o.integerInRange(0,U),q._.Skin_underwater_json,"tiny-bubble"));this.initBubble(F,!0,B),this.bubbles.push(F)}return{}}initBubble(k,B,U){if(!j.Aq$.isDefined(this._game))return;let F=wn.o.integerInRange(0,2e3)+5e3;k.x=wn.o.integerInRange(0,U),B?(k.y=wn.o.integerInRange(70,770),F-=Math.floor(F/770*k.y)):k.y=770,this._game.add.tween(k,this).to({x:"-=10"},1e3,j.GS3.Sinusoidal.InOut).to({x:"+=10"},1e3,j.GS3.Sinusoidal.InOut).loop(!0).start();const G=this._game.add.tween(k,this).to({y:-50},F,j.GS3.Linear.None);G.onTweenComplete.addOnce(this.initBubble.bind(this,k,!1,U)),G.start()}cleanup(){if(this.bubbles){for(let k=0;k180&&(this.randomizePosition(),this.count=0)}cleanup(){for(let k=0;kK.q.instance.game.broadcaster.broadcast(oi.bv.FestivalInitialized))).catch(j.RQr.createHandler("Error applying festival"))}))}createFestival(k){return new[Qw,Jw,zw,tT,Xw,eT][k](this.game)}getButtons(){let k=[];for(let B=0;B{super.handleLeaving(k,B)}))}else super.handleLeaving(k,B)}teleport(k,B,U,F,G){j.Aq$.isDefined(this.mapConfig)?(this.map=new gT.M(this,this.assets,this.mapConfig),this.maps={[k]:this.map},super.teleport(k,B,U,F,G),this.loadingData.fadeIn=!0,this.loadingData.fadeOut=!0,this.loadingData.time=200):this.enterDungeon()}enterDungeon(k){this.generatorConfig=K.q.instance.prodigy.gameContainer.get("aaa-9186").getDungeon(2),j.Aq$.isDefined(bn.B.getLastDungeonRun(this.game,this.ID))||(this.generatorConfig=K.q.instance.prodigy.gameContainer.get("aaa-9186").getDungeon(3)),this.sendArchivesRunSegmentEvents("Archives Run Started"),super.enterDungeon(k)}exitDungeon(k=null){this.consumeTargetCollectible(k),K.q.instance.prodigy.world.it("academy-GH3",815,480)}consumeTargetCollectible(k=null){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=B.backpack.hasItem("currency",18);B.backpack.consume("currency",18,U),j.Aq$.isDefined(this.generatorConfig)&&this.sendArchivesRunSegmentEvents("Achievement Completed",U)}get goalCollected(){return K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("currency",18)}sendArchivesRunSegmentEvents(k,B=0){const U=K.q.instance.prodigy.gameContainer.get("c47-20b6");switch(k){case"Archives Run Started":U.playerMovementAndDiscovery.sendArchivesRunStartedEvent();break;case"Achievement Completed":U.playerMovementAndDiscovery.sendArchivesRunCompletedEvent(B)}}}mT.RUN_COOLDOWN=36e5;var yT=U(28085);class _T extends $n.Z{constructor(k,B){super(k,"titan",B.concat([q._.Npc_sprite_noot_json,Z.c.Sfx_titan,q._.Boss_titan_json])),this.titanMap="",this._spineContainer=null,this._noot=null,this._titanSpine=null,this._isStarted=!1,this.loadingData.time=1,this.loadingData.fadeIn=!1,this.loadingData.fadeOut=!1}setup(k,B,U){super.setup(k,B,U),B.user.x=250,B.user.y=400,B.user.hideName(),ti.U.isStepComplete(Ze.B.PuppetMasterDefeated)||(this._puppetMaster=new Zw.p(k,"NPC_NAME_PUPPETMASTER",J.Q.Spine_npc_puppetmaster_json,Kn.ac.Boss,B.content,800,350,"idle",null,!0)),this._spineContainer=K.q.instance.prodigy.create.element(B.content,1100,400),this._spineContainer.scale.x*=-1,this._noot=B.addNPC(180,320,q._.Npc_sprite_noot_json),this._noot.float(!0),this._noot.walkSpeed=2,this._noot.visible=!0,pn.K.cacheAsset(this.game,q._.Npc_sprite_noot_json,pn.K.zoneAssetsCached),this.game.broadcaster.addAppListener(oi.RZ.GotTitans,this.gotTitanCallback.bind(this),this,"Titan"),j.Aq$.isDefined(K.q.instance.prodigy.titansNetworkHandler.titan)?this.gotTitanCallback(K.q.instance.prodigy.titansNetworkHandler.titan):K.q.instance.prodigy.titansNetworkHandler.getTitans().catch(j.RQr.createHandler("Error fetching data for titans"))}start(k,B){if(this._isStarted)return;this._isStarted=!0,super.start(k,B);const U=K.q.instance.prodigy.event.create(),F=!ti.U.isStepComplete(Ze.B.PuppetMasterDefeated);if(U.enableInput(!1),U.function(this.enterScene.bind(this,k,B)),U.delay(2e3),K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.BREADCRUMB_TITAN_INTRO,ln.B.BREADCRUMB_TITAN_WATCHED_INTRO)){U.enableInput(!0),F?U.text(13,"puppetmaster"):U.text(290,"noot"),U.enableInput(!1),U.sound(21,"cloud");const G=500,j=12;for(let F=0;F{this.enterTitan(k)})),U.delay(100),U.enableInput(!0),F?U.text(14,"puppetmaster"):U.text(291,"noot"),U.enableInput(!1),F&&U.functionCallback(this.exitMaster.bind(this,k,B,1480,-200)),U.enableInput(!0)}else{F&&(U.enableInput(!0),U.text(10,"puppetmaster"),U.enableInput(!1),U.validPath(this._noot,B.path,530,370),U.hop(this._noot,200,0,100),U.hop(this._noot,200,0,100),U.enableInput(!0),U.text(178,"noot"),U.enableInput(!1),U.enableInput(!0),U.text(11,"puppetmaster"),U.enableInput(!1)),U.sound(21,"cloud");const G=500,j=12;for(let F=0;F{this.enterTitan(k)})),U.delay(100),U.enableInput(!0),F?U.text(12,"puppetmaster"):U.text(291,"noot"),U.enableInput(!1),F&&U.functionCallback(this.exitMaster.bind(this,k,B,1480,-200)),U.validPath(this._noot,B.path,380,320),U.enableInput(!0),U.text(179,"noot"),U.text(180,"noot"),U.text(181,"noot"),U.text(182,"noot"),U.text(183,"noot")}U.function(this.end.bind(this,k)),U.start()}end(k){K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.BREADCRUMB_TITAN_INTRO,ln.B.BREADCRUMB_TITAN_WATCHED_INTRO),K.q.instance.prodigy.world.it(this.titanMap)}enterTitan(k){k.add.tween(this._spineContainer,this).to({alpha:1},200,j.GS3.Linear.None,!0,0,0,!1)}exitMaster(k,B,U,F,G){this._puppetMaster.flip();k.add.tween(this._puppetMaster,this).to({x:U,y:F},1e3,j.GS3.Linear.None).start().onTweenComplete.add(G)}gotTitanCallback(k){const B=le.t.getItem("titan",k.assetID).data;this.titanMap=`${B.zone}-Titan`,this.game.broadcaster.removeAppListener(oi.RZ.GotTitans,this,"Titan"),this._titanSpine=this.game.add.spine(0,0,Ut.E.getTitanSpine(k.assetID)),this._titanSpine.setAnimationByName(0,"idle",!0),this._spineContainer.add(this._titanSpine),this._spineContainer.alpha=0}cleanup(){(0,bc.QQ)(K.q.instance.game,!0),this._noot&&(this._noot.destroy(),this._noot=null),this._puppetMaster&&(this._puppetMaster.destroy(),this._puppetMaster=null),this._spineContainer&&(this._spineContainer.destroy(),this._spineContainer=null),this._titanSpine&&(this._titanSpine.destroy(),this._titanSpine=null),super.cleanup()}}var ET,wT=U(34574);class TT extends Ar.H{constructor(k,B,U,F,G,$,H=!1){super(k,B,U,F),this._nameText=null;const V=K.q.instance.prodigy.gameContainer,W=V.get(j.$Bt.LocalizationService);this.segment=V.get("c47-20b6"),this.clickCallback=$,this.npcSprite=K.q.instance.prodigy.create.sprite(0,0,G.atlasGuid,0,void 0,this.onTextureLoaded.bind(this)),this.npcSprite.inputEnabled=!0,this.npcSprite.anchor.set(.5,1),this.npcSprite.events.onInputDown.add(this.onNPCClick.bind(this,W.getText(G.name)),this),H&&(this.npcSprite.scale.x=-1),this.add(this.npcSprite),this.showIndicator(G),this.showName(G.name),this.segment.gameWorld.sendNpcDiscoveredEvent({npc_name:W.getText(null==G?void 0:G.name),npc_type:this instanceof ST?Kn.ac.Merchant:Kn.ac.QuestGiver,x_coord:U,y_coord:F,npc_animation_id:"idle"})}onNPCClick(k){j.Aq$.isDefined(this.clickCallback)&&(this.segment.gameWorld.sendNpcClickedEvent({npc_name:k,npc_type:this instanceof ST?Kn.ac.Merchant:Kn.ac.QuestGiver}),this.clickCallback())}onTextureLoaded(k){k&&(k.animations.addIfFound("stand",["npc_0","npc_1","npc_2","npc_3","npc_4","npc_5","npc_6","npc_7"],10,!0),k.animations.play("stand",void 0,!0))}showName(k){this._nameText?this._nameText.setText(k):this._nameText=K.q.instance.prodigy.create.nameFont(this,0,0-this.npcSprite.height-20,k)}showIndicator(k){this.indicator=TT.createIndicator(k),this.indicator&&(this.indicator.y=-(this.npcSprite.height+20),this.add(this.indicator),this.game.add.tween(this.indicator,this).to({y:this.indicator.y-20},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0))}static createIndicator(k){if(!k)return null;const B=j.Aq$.isDefined(k.indicator);if(!B&&!k.indicatorBacking)return null;let U=null;if(k.indicatorBacking)for(let F=TT.INDICATOR_BACKING_LAYERS.length;--F>=0;){const B=K.q.instance.prodigy.create.sprite(0,0,q._.General_icons_json,TT.INDICATOR_BACKING_LAYERS[F]);B.anchor.set(.5,1),F===TT.INDICATOR_BACKING_COLORABLE_LAYER&&j.Aq$.isDefined(k.indicatorBackingColor)&&(B.tint=k.indicatorBackingColor),U&&B.addChild(U),U=B}if(B){const B=K.q.instance.prodigy.create.sprite(0,0,q._.General_icons_json,k.indicator);B.anchor.set(.5,1),k.indicatorOffsetY&&(B.y+=k.indicatorOffsetY),U?U.addChild(B):U=B}return U}}TT.INDICATOR_BACKING_LAYERS=["npc-icon-base","npc-icon-square","npc-icon-square-tint"],TT.INDICATOR_BACKING_COLORABLE_LAYER=2;class ST extends TT{constructor(k,B,U,F,G,j,$,H,V=!1){const W=Object.assign({atlasGuid:q._.Npc_sprite_merchant_json,name:"NPC_NAME_MERCHANT"},ST.DEFAULT_INDICATOR_CONFIG);super(k,B,U,F,W,null,V),this.requirementsID=H,this.storeID=G,this.storeName=j,this.currencyID=$,this.clickCallback=()=>{this.showDialogue()},this.showName(this.localization.getText("NPC_NAME_MERCHANT")),this.showIndicator(W)}showDialogue(){const k=le.t.getItem("currency",this.currencyID);if(this.featureRequirements.meetsRequirementsDeprecated(this.requirementsID))this.showPrompt();else{const B=K.q.instance.prodigy.dialogue.create();B.setText({text:this.localization.getText("STORE_CURRENCY_LOCKED",k.data.name),face:0}),B.startDeprecated("merchant")}}showPrompt(){const k=K.q.instance.prodigy.dialogue.create(),B=`${this.storeName}_${ph.B.Dialogue}`;this.segment.featureCommon.sendInterfaceEvent({interfaceName:B,interfaceType:bi.Wm.DialogBox,instanceType:Ai.N.Interface,originType:bi.$N.NpcClick}),k.setText({text:this.localization.getText("STORE_PROMPT_WELCOME",this.localization.getText(this.storeName)),face:0,yes:()=>{this.sendDialogueSegmentEvents(jh.k.Shop,B),k.close(),K.q.instance.prodigy.open.store(this.storeID)},no:()=>{this.sendDialogueSegmentEvents(jh.k.NotNow,B),k.close()},type:Ti.fA.STORE}),k.startDeprecated("merchant")}sendDialogueSegmentEvents(k,B){this.segment.featureCommon.sendButtonEvent({buttonName:k,interfaceName:B,interfaceType:bi.Wm.DialogBox,saveClickInfo:k}),this.segment.featureCommon.sendInterfaceEvent({interfaceName:B,interfaceType:bi.Wm.DialogBox,instanceType:Ai.N.Interface,closeMethod:bi.Lv.ButtonClick})}showIndicator(k){this.requirementsID>=0&&this.featureRequirements.meetsRequirementsDeprecated(this.requirementsID)&&super.showIndicator(k)}}ST.DEFAULT_INDICATOR_CONFIG={indicatorBacking:!0,indicatorBackingColor:16764305,indicator:"merchant-icon",indicatorOffsetY:-25},(0,G.Cg)([(0,j.fFd)("db5-fb6e"),(0,G.Sn)("design:type",Object)],ST.prototype,"featureRequirements",void 0),(0,G.Cg)([(0,j.fFd)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],ST.prototype,"localization",void 0),function(k){k.TitanMapEntered="Titan-Map-Entered",k.TitanCatapultClicked="Titan-Catapult-Clicked",k.TitanClicked="Titan-Clicked",k.TitanSeen="titan_seen",k.CrystalClicked="crystal_clicked",k.TeamInitiated="team_initiated",k.TeamFormed="team_formed",k.TeamJoined="team_joined",k.CoOpBattleStarted="coop_battle_started",k.CoOpBattleHostLeft="coop_battle_host_left"}(ET||(ET={}));var AT=U(65443),CT=U(12676),OT=U(14088);class IT extends OT.h{constructor(k,B,U,F){super(k,54,B),this.onCloseClick=new j.HN0,this.currentTeamHandler=null,this.currentTeamHandler=F,this.hostInfo=U,this.onLoadComplete.add(this.setupButtons,this),this.onLoadComplete.add(this.renderHost,this),this.currentTeamHandler.OnTeamLeft.add(this.destroy,this),this.currentTeamHandler.OnHostDisbanded.add(this.destroy,this)}createUIElements(){super.createUIElements(),this.closeButton=this.getUiElement("closeButton"),this.friendCircle=this.getUiElement("friendCircle"),this.bodyText=this.getUiElement("bodyText")}setupButtons(){this.closeButton.onUpCallback=()=>{this.onCloseClick.dispatch()},this.closeButton.setInputBlockPriority(Ia.z.LOBBY)}renderHost(){const k=this.game.add.graphics(0,0);k.beginFill(0),k.drawCircle(75,75,75),k.endFill(),this.friendCircle.add(k),this.friendCircle.mask=k;const B=new Oe.a(this.game);B.init(this.hostInfo);const U=K.q.instance.prodigy.create.player(this.friendCircle,B,1,80,130,!1,{isPreview:!0,hideMount:!0});U.forceWeaponVisual=!0,U.reload();const F=K.q.instance.prodigy.gameContainer.resolve(La.C);F.init(B.appearance.getName()),this.bodyText.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COOP_GUEST_BANNER_BODY",F.getName()))}destroy(){this.onCloseClick.dispose(),this.currentTeamHandler.OnTeamLeft.remove(this.destroy,this),this.currentTeamHandler.OnHostDisbanded.remove(this.destroy,this),super.destroy()}}class DT extends OT.h{constructor(k,B,U,F){super(k,58,B),this.guestID=null,this.currentTeamHandler=null,this.guestID=U,this.currentTeamHandler=F,this.currentTeamHandler.OnTeamLeft.add(this.destroy,this),this.currentTeamHandler.CurrentTeam.OnTeamMemberLeft.add(this.onPlayerLeave,this)}onPlayerLeave(k){k===this.guestID&&this.destroy()}destroy(){this.currentTeamHandler.OnTeamLeft.remove(this.destroy,this),this.currentTeamHandler.IsOnTeam&&this.currentTeamHandler.CurrentTeam.OnTeamMemberLeft.remove(this.onPlayerLeave,this),super.destroy()}}class RT extends OT.h{get OnClose(){return this.onClose}constructor(k,B,U){super(k,53,B),this.onStartClick=new j.HN0,this.onCloseClick=new j.HN0,this.teammateIcons=[],this.onClose=new j.HN0,this.currentTeamHandler=null,this.currentTeam=null,this.currentTeamHandler=U,this.currentTeam=U.CurrentTeam,this.onLoadComplete.add(this.setupButtons,this),this.currentTeamHandler.OnTeamLeft.add(this.teamWasDisbanded,this),this.currentTeam.OnTeamMemberJoined.add(this.updateReadyIcons,this),this.currentTeam.OnTeamMemberLeft.add(this.updateReadyIcons,this),this.currentTeam.OnTeamMemberReady.add(this.updateReadyIcons,this)}createUIElements(){super.createUIElements(),this.startButton=this.getUiElement("startButton"),this.closeButton=this.getUiElement("closeButton"),this.teammateIcons=[this.getUiElement("teammate1"),this.getUiElement("teammate2"),this.getUiElement("teammate3")],this.updateReadyIcons()}setupButtons(){this.startButton.onUpCallback=()=>{this.onStartClick.dispatch()},K.q.instance.prodigy.gameContainer.get("2e2-6ee6").setBlockType(this.startButton.button.image.input,Ia.z.LOBBY),this.closeButton.onUpCallback=()=>{this.onCloseClick.dispatch()},this.closeButton.setInputBlockPriority(Ia.z.LOBBY)}destroy(){this.onStartClick.dispose(),this.onCloseClick.dispose(),this.onClose.dispose(),this.currentTeamHandler.OnTeamLeft.remove(this.teamWasDisbanded,this),this.currentTeam.OnTeamMemberJoined.remove(this.updateReadyIcons,this),this.currentTeam.OnTeamMemberLeft.remove(this.updateReadyIcons,this),this.currentTeam.OnTeamMemberReady.remove(this.updateReadyIcons,this),super.destroy()}teamWasDisbanded(){this.onClose.dispatch(),this.destroy()}updateReadyIcons(){for(let k=0;k=this.currentTeam.ReadyMembers.length?this.teammateIcons[k].setImageFrameName("Images/icon-teammate-off"):this.teammateIcons[k].setImageFrameName("Images/icon-teammate-on");this.startButton.setVisible(this.currentTeam.ReadyMembers.length>1)}}var PT=U(51931);class MT{get OnTeamHosted(){return this.onTeamHosted}get OnTeamJoined(){return this.onTeamJoined}get OnHostDisbanded(){return this.onHostDisbanded}get OnTeamLeft(){return this.onTeamLeft}get OnTeamJoinFailed(){return this.onTeamJoinFailed}get CurrentTeam(){return this.currentTeam}get IsHosting(){return this.isHosting}get IsOnTeam(){return null!==this.currentTeam}get IsJoining(){return this.isJoining}constructor(k,B,U,F){this.ct=null,this.remoteLogger=null,this.onTeamHosted=new j.HN0,this.onTeamJoined=new j.HN0,this.onHostDisbanded=new j.HN0,this.onTeamLeft=new j.HN0,this.onTeamJoinFailed=new j.HN0,this.currentTeam=null,this.player=null,this.isHosting=!1,this.isJoining=!1,this.time=null,this.time=k,this.ct=U,this.player=B,this.remoteLogger=F,this.ct.OnSocketMessage.add(this.handleMessage,this),this.ct.OnPlayerLeftSignal.add(this.handlePlayerLeave,this),this.ct.OnPlayerListSignal.add(this.playerListReceived,this)}hostTeam(){if(null===this.currentTeam){this.currentTeam=new wT.d,this.currentTeam.MaxTeamSize=MT.MAX_CO_OP_TEAM_SIZE,this.currentTeam.HostID=this.player.userID,this.currentTeam.addPlayer(this.player.userID),this.isHosting=!0,this.player.coOpTeam=this.currentTeam,this.onTeamHosted.dispatch(),this.currentTeam.OnTeamMemberJoined.add(this.broadcastTeamUpdate,this),this.currentTeam.OnTeamMemberLeft.add(this.broadcastTeamUpdate,this),this.currentTeam.OnTeamMemberReady.add(this.broadcastTeamUpdate,this);const k={action:Pa.x.HostTeam,data:{hostID:this.currentTeam.HostID,teamMembers:this.currentTeam.TeamMembers,readyMembers:this.currentTeam.ReadyMembers,streak:this.currentTeam.Streak}};this.ct.emitMessage(k)}else j.VyI.log("Active player is in a team. Cannot host another one.",j.$bb.Warning)}joinTeam(k){const B={action:Pa.x.RequestJoinTeam,target:k};this.ct.emitMessage(B),this.isJoining=!0,this.time.events.addTimer(5e3,(()=>{this.isJoining=!1,this.IsOnTeam||this.onTeamJoinFailed.dispatch(wT.T.Timeout)}),this)}rejoinTeam(k,B,U,F){this.IsOnTeam?j.VyI.log("Cannot rejoin a team while being on a team",j.$bb.Warning):(this.currentTeam=new wT.d,this.currentTeam.HostID=k,this.currentTeam.MaxTeamSize=MT.MAX_CO_OP_TEAM_SIZE,this.currentTeam.TeamMembers=B.slice(),this.currentTeam.ReadyMembers=U.slice(),this.currentTeam.Streak=F,this.isHosting=k===this.player.userID,this.player.coOpTeam=this.currentTeam,this.player.userID===k?(this.currentTeam.OnTeamMemberJoined.add(this.broadcastTeamUpdate,this),this.currentTeam.OnTeamMemberLeft.add(this.broadcastTeamUpdate,this),this.currentTeam.OnTeamMemberReady.add(this.broadcastTeamUpdate,this),this.onTeamHosted.dispatch()):this.onTeamJoined.dispatch())}leaveTeam(){if(this.IsOnTeam){if(this.isHosting){const k={action:Pa.x.TeamDisbanded,data:{hostID:this.player.userID}};this.ct.emitMessage(k)}else{const k={action:Pa.x.PlayerLeftTeam,target:this.currentTeam.HostID};this.ct.emitMessage(k)}this.currentTeam.destroy(),this.currentTeam=null,this.isHosting=!1,this.player.coOpTeam=null,this.onTeamLeft.dispatch()}else j.VyI.log("Cannot leave because active player is not in a team",j.$bb.Warning)}startMatch(k,B,U){if(this.IsHosting){const F=this.player.appearance,G=this.player.equipment,j={userID:this.player.userID,level:this.player.data.level,chargedLevelData:this.player.data.chargedLevelData,appearance:{hair:{style:F.getHair().style,color:F.getHair().color},hat:G.getHat(),outfit:G.getOutfit(),weapon:G.getWeapon(),boot:G.getBoots(),costume:G.getCostume(),face:F.getFace(),skin:F.getSkinColor(),eyeColor:F.getEyeColor()},firstName:F.getName().getFirstName(),middleName:F.getName().getMiddleName(),lastName:F.getName().getLastName(),nickname:F.getName().getNickname(),playerTransformation:this.player.getPlayerData().playerTransformation};for(let H=0;H-1?this.CurrentTeam.removePlayer(B):this.currentTeam.HostID===B&&this.teamDisbanded()}}teamDisbanded(){this.currentTeam.destroy(),this.currentTeam=null,this.onHostDisbanded.dispatch(),this.player.coOpTeam=null,this.isHosting=!1}handleMessage(k){switch(k.action){case Pa.x.RequestJoinTeam:{const B=k.data.userID;let U=!1;const F={reason:null};if(this.IsHosting?U=this.currentTeam.addPlayer(B,F):F.reason=wT.T.NotHostingTeam,U){const k={action:Pa.x.JoinTeam,target:B,data:{hostID:this.currentTeam.HostID,teamMembers:this.currentTeam.TeamMembers,readyMembers:this.currentTeam.ReadyMembers,streak:this.currentTeam.Streak}};this.ct.emitMessage(k)}else this.sendTeamJoinFailure(B,F.reason);break}case Pa.x.JoinTeamFailed:this.onTeamJoinFailed.dispatch(k.data.reason),this.isJoining=!1;break;case Pa.x.JoinTeam:this.currentTeam=new wT.d,this.currentTeam.MaxTeamSize=MT.MAX_CO_OP_TEAM_SIZE,this.currentTeam.HostID=k.data.hostID,this.currentTeam.TeamMembers=k.data.teamMembers,this.currentTeam.ReadyMembers=k.data.readyMembers,this.isHosting=!1,this.isJoining=!1,this.onTeamJoined.dispatch();break;case Pa.x.PlayerLeftTeam:if(this.IsHosting){const B=k.data.userID;this.currentTeam.removePlayer(B)}break;case Pa.x.TeamDisbanded:this.IsOnTeam&&this.currentTeam.HostID===k.data.hostID&&this.teamDisbanded();break;case Pa.x.Info:if(this.IsOnTeam){const B=k.data;this.IsHosting?this.currentTeam.TeamMembers.indexOf(B.userID)>-1&&(j.Aq$.isDefined(B.coOpTeam)&&B.coOpTeam.hostID===this.player.userID?-1===this.currentTeam.ReadyMembers.indexOf(B.userID)&&this.currentTeam.readyUpPlayer(B.userID):this.currentTeam.removePlayer(B.userID)):B.userID!==this.currentTeam.HostID||j.Aq$.isDefined(B.coOpTeam)&&-1!==B.coOpTeam.teamMembers.indexOf(this.player.userID)||this.teamDisbanded()}break;case Pa.x.TeamUpdated:this.IsOnTeam&&!this.IsHosting&&k.data.hostID===this.currentTeam.HostID&&(this.currentTeam.ReadyMembers=k.data.readyMembers,this.currentTeam.TeamMembers=k.data.teamMembers,this.currentTeam.Streak=k.data.streak)}}playerListReceived(k){if(this.IsOnTeam){const B=$.map(k,(k=>parseInt(k,10)));if(this.IsHosting)for(let k=0;k-1&&-1===B.indexOf(k)&&this.teamDisbanded()}}}broadcastTeamUpdate(){const k={action:Pa.x.TeamUpdated,data:{hostID:this.currentTeam.HostID,teamMembers:this.currentTeam.TeamMembers,readyMembers:this.currentTeam.ReadyMembers,streak:this.currentTeam.Streak}};this.ct.emitMessage(k)}}MT.MAX_CO_OP_TEAM_SIZE=3,(0,G.Cg)([(0,$l.sg)(500),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],MT.prototype,"broadcastTeamUpdate",null);class NT{get OnTeamCreated(){return this.onTeamCreated}get OnTeamUpdated(){return this.onTeamUpdated}get OnTeamDisbanded(){return this.onTeamDisbanded}get AvailableTeams(){return this.availableTeams}constructor(k){this.ct=null,this.onTeamCreated=new j.HN0,this.onTeamUpdated=new j.HN0,this.onTeamDisbanded=new j.HN0,this.availableTeams=[],this.ct=k,this.ct.OnSocketMessage.add(this.handleMessage,this),this.ct.OnPlayerLeftSignal.add(this.handlePlayerLeave,this)}destroy(){this.ct.OnSocketMessage.remove(this.handleMessage,this),this.ct.OnPlayerLeftSignal.remove(this.handlePlayerLeave,this),this.onTeamCreated.dispose(),this.onTeamDisbanded.dispose(),this.onTeamUpdated.dispose()}handlePlayerLeave(k){const B=parseInt(k,10);this.handleTeamDisband(B)}handleTeamDisband(k){const B=$.findIndex(this.availableTeams,(B=>B.hostID===k));B>-1&&this.onTeamDisbanded.dispatch(this.availableTeams.splice(B,1)[0])}handleMessage(k){switch(k.action){case Pa.x.HostTeam:this.addOrUpdateTeam({hostID:k.data.hostID,teamMembers:[k.data.hostID],readyMembers:[k.data.hostID],streak:0});break;case Pa.x.TeamUpdated:this.addOrUpdateTeam(Object.assign({},k.data));break;case Pa.x.TeamDisbanded:this.handleTeamDisband(k.data.hostID);break;case Pa.x.Info:{const B=k.data;j.Aq$.isDefined(B.coOpTeam)&&B.userID===B.coOpTeam.hostID&&this.addOrUpdateTeam(Object.assign({},B.coOpTeam))}}}addOrUpdateTeam(k){const B=$.find(this.availableTeams,(B=>B.hostID===k.hostID));j.Aq$.isDefined(B)?(B.teamMembers=k.teamMembers,B.readyMembers=k.readyMembers,this.onTeamUpdated.dispatch(B)):(this.availableTeams.push(k),this.onTeamCreated.dispatch(k))}}class xT extends Un.T{constructor(k,B,U){super(k,"Titan","MAP_TITAN_GROUNDS",U.entry.x,U.entry.y,[U.map],B.concat(J.Q.Spine_coop_crystal_json,q._.Npc_face_harvey_json,q._.Boss_titan_json,q._.Ui_titan_json,q._.Ui_coop_json,J.Q.Npc_harvey_json,J.Q.Spine_catapult_json,J.Q.Spine_catapult_impact_json,nr.q.Cannon_ball,Z.c.Sfx_titan_catapult_launch,Z.c.Sfx_titan_catapult_hit,Rn.t.Tileset_generic_snow_png,q._.Ui_shared_json,Ei.l.Overlay_difficulty_hard,Ei.l.Overlay_difficulty_expert)),this.catapultBattle=!1,this.catapultQueue=0,this.isCatapultAnimating=!1,this.titanHealthBar=null,this.titanAsset=null,this.titanMapData=null,this.impactContainer=null,this.impactSpine=null,this.catapultContainer=null,this.crystalContainer=null,this.crystalGuideHand=null,this.catapultSpine=null,this.cannonBallStartPos=null,this.cannonBall=null,this.catapultTweenX=null,this.catapultTweenY=null,this.titanSpine=null,this.spineContainer=null,this.coOpAvailableTeamsHandler=null,this.currentCoOpTeamHandler=null,this.partySelectOpen=!1,this.coOpEnabled=!0,this.popupsEnabled=!1,this.sendTeamJoined=null,this.sessionTalk=!1,this.titanMapData=U,this.sendTeamJoined=()=>{this.sendCoopSegmentEvent(ET.TeamJoined)}}setup(k,B,U){if(super.setup(k,B,U),this.titanHealthBar=null,this.catapultQueue=0,this.isCatapultAnimating=!1,this._titansNetworkHandler=K.q.instance.prodigy.titansNetworkHandler,this._titansNetworkHandler.isCatapultBattle=!1,this.game.broadcaster.addAppListener(oi.RZ.GotTitan,this.startTitanBattle.bind(this),this,"Titan"),this.game.broadcaster.addAppListener(oi.RZ.GotTitans,this.gotTitanCallback.bind(this),this,"Titan"),this.coOpEnabled=!K.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("coOpTitanDisabled",!1),this.popupsEnabled=Vt.s.get("GameConstants.Debug.POPUPS_ENABLED"),this.coOpEnabled){const k=K.q.instance.prodigy.gameContainer.get("c97-bd0d");if(null===this.coOpAvailableTeamsHandler){const k=K.q.instance.prodigy.gameContainer.get("c97-bd0d");this.coOpAvailableTeamsHandler=new NT(k)}if(null===this.currentCoOpTeamHandler){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.currentCoOpTeamHandler=new MT(this.game.time,B,k,K.q.instance.prodigy.gameContainer.get("e59-eea6")),B.coOpTeamHandler=this.currentCoOpTeamHandler,this.currentCoOpTeamHandler.OnTeamHosted.add(this.activePlayerCreatedTeam,this),this.currentCoOpTeamHandler.OnTeamJoined.add(this.activePlayerJoinedTeam,this),this.currentCoOpTeamHandler.OnHostDisbanded.add(this.showCurrentTeamDisbandMessage,this),this.currentCoOpTeamHandler.OnTeamJoinFailed.add(this.showJoinTeamFailedMessage,this),this.currentCoOpTeamHandler.OnHostDisbanded.add(this.setInputBlocking.bind(this,!1)),this.currentCoOpTeamHandler.OnTeamLeft.add(this.setInputBlocking.bind(this,!1)),k.OnSocketMessage.add(this.messageReceived,this)}this.inputBlocker=new Da(this.game),this.inputBlocker.InputMask=Ia.z.LOCOMOTION|Ia.z.LOBBY|Ia.z.SYSTEM_INFO|Ia.z.REAR_OVERLAY,this.inputBlocker.OnDownBlocked.add(this.blockInputModal,this),this.game.broadcaster.addAppListener(oi.u0.PlayerAdded,this.playerAddedToScreen,this)}K.q.instance.prodigy.titansNetworkHandler.getTitans()}start(k,B,U){super.start(k,B,U),this.coOpEnabled}cleanup(){var k,B,U,F,G,j,$,H,V,W,q,z,Y,Q,X;if(this.game.broadcaster.removeAppListener(oi.RZ.GotTitan,this,"Titan"),this.game.broadcaster.removeAppListener(oi.RZ.GotTitans,this,"Titan"),this.game.broadcaster.removeAppListener(oi.RZ.Catapult,this,"Catapult"),this.game.broadcaster.removeAppListener(oi.u0.PlayerAdded,this),this.coOpEnabled){null===(k=this.coOpAvailableTeamsHandler)||void 0===k||k.destroy(),this.coOpAvailableTeamsHandler=null,null===(B=this.currentCoOpTeamHandler)||void 0===B||B.destroy(),this.currentCoOpTeamHandler=null;K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.coOpTeamHandler=null,null===(U=this.inputBlocker)||void 0===U||U.destroy();K.q.instance.prodigy.gameContainer.get("c97-bd0d").OnSocketMessage.remove(this.messageReceived,this),Vt.s.setGameConstant("GameConstants.Debug.POPUPS_ENABLED",this.popupsEnabled)}null===(F=this.titanHealthBar)||void 0===F||F.destroy(),this.titanHealthBar=null,null===(G=this.impactContainer)||void 0===G||G.destroy(),this.impactContainer=null,null===(j=this.impactSpine)||void 0===j||j.destroy(),this.impactSpine=null,null===($=this.catapultContainer)||void 0===$||$.destroy(),this.catapultContainer=null,null===(H=this.crystalContainer)||void 0===H||H.destroy(),this.crystalContainer=null,null===(V=this.crystalGuideHand)||void 0===V||V.destroy(),this.crystalGuideHand=null,null===(W=this.catapultSpine)||void 0===W||W.destroy(),this.catapultSpine=null,null===(q=this.cannonBall)||void 0===q||q.destroy(),this.cannonBall=null,null===(z=this.titanSpine)||void 0===z||z.destroy(),this.titanSpine=null,null===(Y=this.spineContainer)||void 0===Y||Y.destroy(),this.spineContainer=null,this.titanAsset=null,null===(Q=this.catapultTweenX)||void 0===Q||Q.remove(),this.catapultTweenX=null,null===(X=this.catapultTweenY)||void 0===X||X.remove(),this.catapultTweenY=null,super.cleanup()}process(k,B,U){super.process(k,B,U),j.Aq$.isDefined(this.screen.questProgress)&&(this.screen.questProgress.visible=!1),null!==this.currentCoOpTeamHandler&&this.currentCoOpTeamHandler.IsOnTeam&&this.game.broadcaster.broadcast(oi.Y1.HideRightSideHUD,oi.HG.HUD)}gotTitanCallback(){if(this.game.broadcaster.removeAppListener(oi.RZ.GotTitans,this,"Titan"),K.q.instance.prodigy.titansNetworkHandler.isTitanAlive()){const k=K.q.instance.prodigy.titansNetworkHandler.titan.assetID;this.titanAsset=le.t.getItem("titan",k).data,K.q.instance.prodigy.world.getCurrentZone()===this.titanAsset.zone&&(K.q.instance.prodigy.load.assets([Ut.E.getTitanSpine(k)],this.titanLoadComplete.bind(this)),pn.K.cacheAsset(this.game,Ut.E.getTitanSpine(k),pn.K.zoneAssetsCached),this.renderMapElements())}}titanLoadComplete(k,B){B||j.VyI.log("Titan load did not complete successfully.",j.$bb.Error);const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(ti.U.progressData.step===Ze.B.NotStarted&&U.hasFoundAllKeystones())jn.E.runAllKeystonesSequenceOnMapSetup((()=>(0,G.sH)(this,void 0,void 0,(function*(){return this.titanLoadComplete(k,B)}))));else if(this.renderTitan(),K.q.instance.prodigy.titansNetworkHandler.isNewTitan()){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.playerTitanData={titanID:K.q.instance.prodigy.titansNetworkHandler.titan.id,titanBattleProgress:0,seenTitanBattleProgress:0},this.playCutscene()}else this.renderHealthBar(),this.coOpEnabled&&this.featureRequirements.meetsRequirementsDeprecated(8)&&this.playCrystalTutorial()}playCutscene(){K.q.instance.prodigy.world.playScene(this.titanMapData.cutscene),this._firstTimeOnMap=!0}renderMapElements(){const k=new Zw.p(this.game,"NPC_NAME_HARVEY",2,Kn.ac.Merchant,this.screen.content,this.titanMapData.harvey.x-5,this.titanMapData.harvey.y,"idle"),B=K.q.instance.prodigy.create.sprite(20,-110,q._.Boss_titan_json,"harvey-cart");k.add(B),k.onClick.add(this.onHarveyClicked,this);const U=k.add(K.q.instance.prodigy.create.emptySprite(-.5*k.width+80,-k.height,k.width,k.height));if(U.inputEnabled=!0,U.events.onInputDown.add(this.onHarveyClicked.bind(this)),this.featureRequirements.meetsRequirementsDeprecated(8)){const B=TT.createIndicator(ST.DEFAULT_INDICATOR_CONFIG);B.position.set(-5,-105),B.inputEnabled=!0,this.game.add.tween(B,this).to({y:B.y-20},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0),k.add(B)}const F=K.q.instance.prodigy.create.sprite(this.titanMapData.sign.x,this.titanMapData.sign.y,q._.Boss_titan_json,"harveySign");this.screen.content.addChild(F),F.anchor.x=.5,F.anchor.y=1,F.inputEnabled=!0,F.events.onInputDown.add(this.onSignClicked.bind(this)),this.setupCatapult(),this.coOpEnabled&&this.setupCrystal()}setupCatapult(){const k=this.titanMapData.titan.x+this.titanMapData.titan.impactOffset.x,B=this.titanMapData.titan.y+this.titanMapData.titan.impactOffset.y;this.impactContainer=K.q.instance.prodigy.create.element(this.screen.content,k,B),this.impactSpine=this.game.add.spine(0,0,J.Q.Spine_catapult_impact_json),this.impactContainer.add(this.impactSpine),this.impactContainer.visible=!1,this.catapultContainer=K.q.instance.prodigy.create.element(this.screen.content,this.titanMapData.catapult.x,this.titanMapData.catapult.y),this.catapultSpine=this.game.add.spine(0,0,J.Q.Spine_catapult_json),this.catapultContainer.add(this.catapultSpine);const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(Tn.J.shouldSuppressAd(U)){this.catapultSpine.setTint(3355443);const k=K.q.instance.prodigy.create.sprite(0,-65,q._.Ui_icons_json,"icon-medium-lockglow");k.anchor=new V.Point(.5,.5),this.catapultContainer.add(k)}if(this.setupSpineHitbox(this.catapultSpine,this.onCatapultClick.bind(this),-85,-140,130,140),this.cannonBallStartPos={x:this.titanMapData.catapult.x-35,y:this.titanMapData.catapult.y-175},this.cannonBall=K.q.instance.prodigy.create.sprite(this.cannonBallStartPos.x,this.cannonBallStartPos.y,nr.q.Cannon_ball),this.cannonBall.visible=!1,this.screen.above.add(this.cannonBall),this.catapultTweenX=this.game.add.tween(this.cannonBall.position,this,!1),this.catapultTweenX.to({x:this.impactContainer.x},600,j.GS3.Linear.None,!1,867),this.catapultTweenX.onStart.add((()=>{this.cannonBall.visible=!0})),this.catapultTweenX.onTweenComplete.add((()=>{this.cannonBall.visible=!1,this.playImpact()})),this.catapultTweenY=this.game.add.tween(this.cannonBall.position,this,!1),this.catapultTweenY.to({y:this.impactContainer.y-this.titanMapData.catapult.arcHeight},300,j.GS3.Quadratic.Out,!1,867),this.catapultTweenY.to({y:this.impactContainer.y},300,j.GS3.Quadratic.In,!1,867),this.game.broadcaster.addAppListener(oi.RZ.Catapult,this.onShootCatapult.bind(this),this,"Catapult"),this.catapultBattle){this.catapultBattle=!1,this.game.broadcaster.broadcast(oi.RZ.Catapult,"Catapult");K.q.instance.prodigy.gameContainer.get("c97-bd0d").emitMessage({action:Pa.x.Catapult})}this.sendWorldObjectSegmentEvent("World Object Discovered")}renderTitan(){const k=K.q.instance.prodigy.titansNetworkHandler.titan.assetID;this.spineContainer=K.q.instance.prodigy.create.element(this.screen.content,this.titanMapData.titan.x,this.titanMapData.titan.y-60),this.titanSpine=this.game.add.spine(0,0,Ut.E.getTitanSpine(k)),this.titanSpine.scale.x*=-1,this.titanSpine.setAnimationByName(0,"idle",!0),this.spineContainer.add(this.titanSpine),this.spineContainer.scale.x=1.2,this.spineContainer.scale.y=1.2,this.setupSpineHitbox(this.spineContainer,this.onTitanClicked.bind(this),-190,-190)}renderHealthBar(){if(!j.Aq$.isDefined(this.titanHealthBar)){const k=new Tr.c(this.game).createUIElements([{type:"UIElement",name:"healthBarContainer",y:25,x:930,anchorX:.5,anchorY:.5,width:336,height:80,children:[{type:"WebFontText",name:"body",text:this.localization.getText("TITAN_HEARTS"),relativeWidth:1,relativeHeight:1,relativeX:.5,relativeY:.1,style:16,boundsAlignH:"center",boundsAlignV:"middle"},{type:"Slider",name:"healthSlider",relativeX:.5,relativeY:.5,relativeWidth:1,relativeHeight:1,atlasName:q._.Ui_shared_json,activeTrackBaseFrameName:"scroll-tracks/red-large-fill",inactiveTrackBaseFrameName:"scroll-tracks/red-large-track",showHead:!1,isVertical:!1,isInteractive:!1}]}],this.screen.above);for(let B=0;B{this.crystalGuideHand=un.o.highlightObjectOnLayer(this.game,168,-145,this.crystalContainer,this.screen.above)}}),U.setText(280),U.setText({callback:()=>{K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(k,B)}}),U.startDeprecated("noot",!1)}}setupCrystal(){const k=wr.j.createRenderer(J.Q.Spine_coop_crystal_json,{type:"spine"});k.setSkinByName("crystal"),k.playAnimation("enter",!0),this.crystalContainer=new yr._(this.game,this.screen.content,[k],620,455);const B=this.setupSpineHitbox(this.crystalContainer,this.onCrystalClick.bind(this),48,-148,160,165);this.inputBlocker.setBlockType(B.input,Ia.z.LOBBY),this.addCollisionZone(this.screen,700,340,85,135)}setupSpineHitbox(k,B,U,F,G,$){const H=j.Aq$.isDefined(G)?G:k.width,V=j.Aq$.isDefined($)?$:k.height,W=j.Aq$.isDefined(U)?U:-.5*H,q=j.Aq$.isDefined(F)?F:-V,z=K.q.instance.prodigy.create.emptySprite(W,q,H,V);return k.addChild(z),z.alpha=0,z.inputEnabled=!0,z.events.onInputDown.add(B),z}onCrystalClick(){if(this.featureRequirements.meetsRequirementsDeprecated(8)){if(!this.partySelectOpen)if(this.currentCoOpTeamHandler.IsOnTeam)this.currentCoOpTeamHandler.IsHosting?this.showDeleteTeamMessage():this.showLeaveTeamMessage();else if(this.currentCoOpTeamHandler.IsJoining)this.blockInputModal();else{j.Aq$.isDefined(this.crystalGuideHand)&&this.crystalGuideHand.destroy(),this.partySelectOpen=!0;const k=K.q.instance.prodigy.open.coOpTeamSelect(this.screen.playersInfo,this.coOpAvailableTeamsHandler);k.OnCreateClicked.add((()=>{this.setInputBlocking(!0),this.currentCoOpTeamHandler.hostTeam()})),k.OnJoinClicked.add((k=>{this.setInputBlocking(!0);const B=(k,U)=>{U&&this.setInputBlocking(!1),this.currentCoOpTeamHandler.OnTeamJoined.remove(B),this.currentCoOpTeamHandler.OnTeamJoinFailed.remove(B)};this.currentCoOpTeamHandler.OnTeamJoined.add(B,this,0,!1),this.currentCoOpTeamHandler.OnTeamJoinFailed.add(B,this,0,!0),this.currentCoOpTeamHandler.OnTeamJoined.remove(this.sendTeamJoined,this),this.currentCoOpTeamHandler.OnTeamJoined.addOnce(this.sendTeamJoined,this),this.currentCoOpTeamHandler.joinTeam(k)})),k.onDestroy.add((()=>{this.partySelectOpen=!1}))}}else this.titanDeny()}addGuestTag(k){const B=this.screen.playerList[k];j.Aq$.isDefined(B)&&new DT(this.game,B,k,this.currentCoOpTeamHandler)}startCoOpBattle(){const k=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),B=Gt.R.loadData(Ft.r.BattleRevampConstants_json).battleConstants;let U=parseInt(k.getValue("titanCoOpTitanHP",Vt.s.get("GameConstants.CO_OP_TITAN.TITAN_HP")),10),F=parseInt(k.getValue("titanCoOpCrystalHP",Vt.s.get("GameConstants.CO_OP_TITAN.CRYSTAL_HP")),10),G=B.xp.titan;const j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.userID,H=`co_op_battle-${j}-${Date.now()}`,V=this.currentCoOpTeamHandler.CurrentTeam,W=$.filter(V.ReadyMembers,(k=>k!==j)),q=$.map(W,(k=>this.extractCoOpPlayerData(k))),z=K.q.instance.prodigy.titansNetworkHandler.titan.assetID,Y=K.q.instance.prodigy.titansNetworkHandler.titan.id,Q=V.ReadyMembers.length===V.TeamMembers.length?V.Streak:0;this.sendCoopSegmentEvent(ET.CoOpBattleStarted);const X={titanNetworkID:Y,titanHP:U,crystalHP:F,titanXPBounty:G,titanAssetID:z};this.currentCoOpTeamHandler.startMatch(H,q,X),K.q.instance.prodigy.startCoOp({teammates:q,hostID:j,titanAssetID:z,battleMap:this.titanMapData.battleBG,titanNetworkID:Y,isHost:!0,returnToMap:this.zoneName,crystalHP:F,titanHP:U,titanXPBounty:G,multiplayerRoom:H,teamStreak:Q})}extractCoOpPlayerData(k){var B,U,F,G;const $=this.screen.playersInfo[k];let H,V,W,q;return j.Aq$.isDefined($.equipment)&&(H=$.equipment.hat,V=$.equipment.outfit,W=$.equipment.weapon,q=$.equipment.costume),{userID:k,level:$.data.level,chargedLevelData:$.data.chargedLevelData,appearance:{face:$.appearance.face,hair:{style:$.appearance.hair.style,color:$.appearance.hair.color},skin:$.appearance.skinColor,eyeColor:$.appearance.eyeColor,hat:H,outfit:V,weapon:W,costume:q},firstName:null===(B=$.appearance.name)||void 0===B?void 0:B.first,middleName:null===(U=$.appearance.name)||void 0===U?void 0:U.middle,lastName:null===(F=$.appearance.name)||void 0===F?void 0:F.last,nickname:null===(G=$.appearance.name)||void 0===G?void 0:G.nick,playerTransformation:$.data.playerTransformation}}onHarveyClicked(){const k=new Ti.rD(this.game);K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.BREADCRUMB_TITAN_INTRO,ln.B.BREADCRUMB_TITAN_HARVEY_TALKED)?this.sessionTalk||(this.sessionTalk=!0,k.addEvents([{dialogueData:k.dataProvider.get(714),blockInput:!0},{dialogueData:k.dataProvider.get(715),blockInput:!0},{dialogueData:k.dataProvider.get(716),blockInput:!0}])):(K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.BREADCRUMB_TITAN_INTRO,ln.B.BREADCRUMB_TITAN_HARVEY_TALKED),k.addEvents([{dialogueData:k.dataProvider.get(712),blockInput:!0},{dialogueData:k.dataProvider.get(713),blockInput:!0}])),k.addEvents([{callback:()=>{k.close(),K.q.instance.prodigy.open.store(21)}}]),k.start(),this.segment.gameWorld.sendNpcClickedEvent({npc_name:CT.N.Harvey,npc_type:Kn.ac.Merchant})}onSignClicked(){K.q.instance.prodigy.open.titanProgress(!1)}onCatapultClick(){const k=!this.featureRequirements.meetsRequirementsDeprecated(8),B=K.q.instance.prodigy.gameContainer;if(B.get("e20-0fb0").player.hasMembership())k?(this.titanDeny(),this.sendWorldObjectSegmentEvent("World Object Failed",Kn.kN.LevelLocked)):this.moveToCatapult();else{const k=yn.P.shouldUseUnifiedConversionFlow(Sn.o.FunnelFireTitanCatapult)?_n.R.UnifiedConversionFlow:Tn.J.showYouTubeMembershipAd(this.game,!0)?_n.R.Video:_n.R.Static;this.segment.purchase.sendFunnelStart({type:"Fire-Titan-Catapult",category:"World",contentId:K.q.instance.prodigy.world.getCurrentZone(),adType:k,adVersion:yn.P.getAdVersion(Sn.o.FunnelFireTitanCatapult)}),this.sendWorldObjectSegmentEvent("World Object Failed",Kn.kN.MemberLocked);const U=B.get("e20-0fb0").player;Tn.J.shouldSuppressAd(U)?K.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:this.catapultContainer.x,yPosition:this.catapultContainer.y-140,arrowXRelPos:.3,arrowDirection:Br.i.DOWN}):K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:Sn.o.FunnelFireTitanCatapult},"titanCatapult")}}onShootCatapult(){this.catapultQueue++,this.isCatapultAnimating||this.shootCatapult()}shootCatapult(){if(this.catapultQueue>0){this.catapultQueue--,this.isCatapultAnimating=!0,this.sendWorldObjectSegmentEvent("World Object Used"),this.catapultSpine.setToSetupPose(),this.catapultSpine.setAnimationByName(0,"shoot",!1),this.cannonBall.x=this.cannonBallStartPos.x,this.cannonBall.y=this.cannonBallStartPos.y,this.catapultTweenX.start(),this.catapultTweenY.start();const k=this.game.add.tween(this,this);k.delay(300),k.onTweenComplete.add((()=>{K.q.instance.prodigy.audio.playSFX(27,"launch")})),k.start()}}playImpact(){this.impactContainer.visible=!0,this.impactSpine.setToSetupPose(),this.impactSpine.setAnimationByName(0,"animation",!1),this.impactSpine.onComplete.addOnce((()=>{this.isCatapultAnimating=!1,this.shootCatapult()})),K.q.instance.prodigy.audio.playSFX(28,"hit"),K.q.instance.prodigy.effects.shake(0,300,10,"v"),this.titanSpine.setAnimationByName(0,"attack",!1),this.titanSpine.onComplete.addOnce((()=>{this.titanSpine.setAnimationByName(0,"idle",!0)}))}onTitanClicked(){!this.featureRequirements.meetsRequirementsDeprecated(8)?this.titanDeny():this.moveToTitan()}moveToTitan(){this.screen.path.findPath(this.screen.user.x,this.screen.user.y,this.titanMapData.titan.x-300,this.titanMapData.titan.y+125,!0).then((k=>{k&&this.screen.user.setPath(k,this.callNetworkToStartBattle.bind(this))})).catch(j.RQr.createHandler("Error finding path to Titan"))}moveToCatapult(){this.screen.path.findPath(this.screen.user.x,this.screen.user.y,this.titanMapData.catapult.x+110,this.titanMapData.catapult.y,!0).then((k=>{k&&this.screen.user.setPath(k,this.startCatapultBattle.bind(this))})).catch(j.RQr.createHandler("Error finding path to Catapult"))}titanDeadKick(){const k=K.q.instance.prodigy.open.message(this.localization.getText("TITAN_DEFEATED_MESSAGE"),this.titanDeadTeleport.bind(this),null,this.localization.getText("TITAN_DEFEATED_TITLE"));k.queuePostCreateCallback((()=>{k.okayButton.setInputBlockPriority(Ia.z.SYSTEM_INFO)}))}titanDeadTeleport(){K.q.instance.prodigy.world.goToZoneHub(K.q.instance.prodigy.world.getCurrentZone())}callNetworkToStartBattle(){K.q.instance.prodigy.titansNetworkHandler.getTitan(K.q.instance.prodigy.titansNetworkHandler.titan.id)}startCatapultBattle(){this.catapultBattle=!0,this._titansNetworkHandler.isCatapultBattle=!0,this.callNetworkToStartBattle()}startTitanBattle(){K.q.instance.prodigy.titansNetworkHandler.isTitanAlive()?(this.inputBlocker.pause(),this.coOpEnabled&&this.currentCoOpTeamHandler.IsHosting&&this.currentCoOpTeamHandler.CurrentTeam.ReadyMembers.length>1?this.startCoOpBattle():this.startSoloBattle()):this.titanDeadKick()}startSoloBattle(){K.q.instance.prodigy.battle.battleStats.type="TitanBattle";const k={revampBattleType:Ni.gu.Titan,intro:this.localization.getText("COMBAT_TITAN_BATTLE"),screen:this.titanMapData.battleBG,boss:{name:this.localization.getText("NPC_NAME_TITAN_BARRIER"),starBonus:0,tag:"titan",catapult:this.catapultBattle,ID:K.q.instance.prodigy.titansNetworkHandler.titan.assetID},difficulty:this.titanAsset.difficulty};K.q.instance.prodigy.battle.start(k,void 0,this.onBattleWon.bind(this),this.onBattleLost.bind(this))}onBattleWon(){this.teleportToTitanMap()}onBattleLost(){this.teleportToTitanMap()}teleportToTitanMap(){var k;(null===(k=this.currentCoOpTeamHandler)||void 0===k?void 0:k.IsOnTeam)&&this.currentCoOpTeamHandler.leaveTeam(),this.catapultBattle?(this.catapultBattle=!1,K.q.instance.prodigy.world.it(this.titanMapData.map,this.titanMapData.catapult.x+110,this.titanMapData.catapult.y)):K.q.instance.prodigy.world.it(this.titanMapData.map,this.titanMapData.entry.x,this.titanMapData.entry.y)}sendCoopSegmentEvent(k){const B=this.currentCoOpTeamHandler.CurrentTeam.HostID;switch(k){case ET.TeamFormed:this.segment.battle.sendCoopTeamCreatedEvent(AT.$.Titan,B);break;case ET.TeamJoined:this.segment.battle.sendCoopTeamJoinedEvent(AT.$.Titan,B);break;case ET.CoOpBattleStarted:this.segment.battle.sendCoopBattleStartedEvent(AT.$.Titan,B)}}sendWorldObjectSegmentEvent(k,B){var U,F,G,j;const $=Kn.u_.TitanCatapult;switch(k){case"World Object Discovered":this.segment.gameWorld.sendWorldObjectDiscoveredEvent({object_type:$,x_coord:null===(F=null===(U=this.titanMapData)||void 0===U?void 0:U.catapult)||void 0===F?void 0:F.x,y_coord:null===(j=null===(G=this.titanMapData)||void 0===G?void 0:G.catapult)||void 0===j?void 0:j.y});break;case"World Object Used":this.segment.gameWorld.sendWorldObjectUsedEvent({object_type:$});break;case"World Object Failed":this.segment.gameWorld.sendWorldObjectUsedFailedEvent({object_type:$,fail_reason:B})}}showJoinTeamFailedMessage(k){k!==wT.T.Timeout&&K.q.instance.prodigy.open.coOpModal({body:this.localization.getText(k===wT.T.TeamFull?"PARTY_FULL_ERROR":"PARTY_JOIN_FAILED_ERROR"),greenButton:{text:this.localization.getText("BUTTON_OKAY_CAPITAL")}}),j.VyI.log(`Failed joining team reason: ${k}`,j.$bb.Warning)}activePlayerJoinedTeam(){if(this.currentCoOpTeamHandler.IsOnTeam){const k=new IT(this.game,this.screen.menus,this.screen.playersInfo[this.currentCoOpTeamHandler.CurrentTeam.HostID],this.currentCoOpTeamHandler);ad.Z.sendToBack(k),k.onCloseClick.add(this.showLeaveTeamMessage,this)}}showCurrentTeamDisbandMessage(){K.q.instance.prodigy.open.coOpModal({body:this.localization.getText("PARTY_WAS_CANCELLED"),greenButton:{text:this.localization.getText("BUTTON_OKAY_CAPITAL")}})}showDeleteTeamMessage(){K.q.instance.prodigy.open.coOpModal({title:this.localization.getText("DELETE_TEAM_TITLE"),body:this.localization.getText("DELETE_TEAM_BODY"),greenButton:{text:this.localization.getText("BUTTON_KEEP_TEAM")},redButton:{text:this.localization.getText("BUTTON_DELETE_TEAM"),callback:()=>{this.currentCoOpTeamHandler.leaveTeam()}}})}showLeaveTeamMessage(){const k=K.q.instance.prodigy.open.coOpModal({title:this.localization.getText("LEAVE_TEAM_TITLE"),body:this.localization.getText("LEAVE_TEAM_BODY"),greenButton:{text:this.localization.getText("BUTTON_STAY_TEAM")},redButton:{text:this.localization.getText("BUTTON_LEAVE_TEAM"),callback:()=>{this.currentCoOpTeamHandler.leaveTeam()}}});this.currentCoOpTeamHandler.OnHostDisbanded.addOnce(k.destroy.bind(k))}activePlayerCreatedTeam(){if(this.currentCoOpTeamHandler.IsHosting){const k=new RT(this.game,this.screen.menus,this.currentCoOpTeamHandler);k.onStartClick.add(this.callNetworkToStartBattle,this),k.onCloseClick.add(this.showDeleteTeamMessage,this),this.currentCoOpTeamHandler.CurrentTeam.OnTeamMemberJoined.add(this.addGuestTag,this),this.currentCoOpTeamHandler.CurrentTeam.OnTeamMemberJoined.addOnce((()=>{this.sendCoopSegmentEvent(ET.TeamFormed)}))}}messageReceived(k){if(k.action===Pa.x.StartCoOpTitanMatch&&this.currentCoOpTeamHandler.IsOnTeam&&this.currentCoOpTeamHandler.CurrentTeam.HostID===k.data.hostID){const B=this.currentCoOpTeamHandler.CurrentTeam,U=B.ReadyMembers.length===B.TeamMembers.length?B.Streak:0;this.sendCoopSegmentEvent(ET.CoOpBattleStarted),K.q.instance.prodigy.startCoOp(Object.assign({teammates:k.data.teammates,hostID:k.data.hostID,battleMap:this.titanMapData.battleBG,isHost:!1,returnToMap:this.zoneName,multiplayerRoom:k.data.multiplayerRoom,teamStreak:U},k.data.matchData))}}playerAddedToScreen(k){if(this.currentCoOpTeamHandler.IsHosting){const B=k.source.userID;this.currentCoOpTeamHandler.CurrentTeam.TeamMembers.indexOf(B)>-1&&this.addGuestTag(B)}}setInputBlocking(k){k?this.inputBlocker.start():this.inputBlocker.pause(),k?this.game.broadcaster.broadcast(oi.Y1.HideRightSideHUD,oi.HG.HUD):this.game.broadcaster.broadcast(oi.Y1.ShowRightSideHUD,oi.HG.HUD)}blockInputModal(){const k=K.q.instance.prodigy.open.coOpModal({body:this.localization.getText("CO_OP_INPUT_BLOCKED_MODAL"),greenButton:{text:this.localization.getText("BUTTON_OKAY_CAPITAL")}});this.currentCoOpTeamHandler.IsOnTeam&&this.currentCoOpTeamHandler.OnHostDisbanded.addOnce(k.destroy.bind(k))}titanDeny(){const k=K.q.instance.prodigy.event.create();k.enableInput(!1),k.validPath(this.screen.user,this.screen.path,this.titanMapData.titan.x-300,this.titanMapData.titan.y+125),k.function((()=>{this.titanSpine.setAnimationByName(0,"attack",!1),this.titanSpine.onComplete.addOnce((()=>{this.titanSpine.setAnimationByName(0,"idle",!0)}));const k=this.screen.user;this.game.add.tween(k.position,this).to({x:this.titanMapData.entry.x},300,j.GS3.Quadratic.Out,!0,800),K.q.instance.prodigy.effects.shake(600,600,20,"v")})),k.delay(1500),k.enableInput(!0),k.start()}}(0,G.Cg)([(0,j.fFd)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],xT.prototype,"localization",void 0);var LT=U(95798);class kT extends Un.T{}class BT extends kT{constructor(k,B){super(k,"A1","MAP_BONFIRE_SPIRE_VOLCANO_ENTRANCE",865,482,["bonfire_spire-B1"],B),this.leverNumber=1,this.battleBG="battle-bonfire-outside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:995,y:420,w:120,h:150,rect:!0},"bonfire_spire-B1",160,307.5,null,LT.K.DOWN_RIGHT,!1),B.addClickableMoveEvent(920,322,235,235,1052,506,null,null,0,null),this.addChest(k,B,"chest1",175,275),this.addPippet(k,B,2,650,482)}}class UT extends kT{constructor(k,B){super(k,"A4","MAP_BONFIRE_SPIRE_PITFALL_TERRACE",1020,400,["bonfire_spire-B4"],B.concat(q._.Npc_sprite_slime_worker_json)),this.wasInsideTriggerLastFrame=!1,this.user=null,this.leverNumber=3,this.battleBG="battle-bonfire-outside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.user=B.user,this.addAreaEvent(k,B,{x:1180,y:420,w:200,h:210,rect:!0},"bonfire_spire-B4",140,200,null,LT.K.RIGHT,!1),B.addClickableMoveEvent(1080,315,200,210,1186,492,null,null,0,null),this.addChest(k,B,"chestGuardian",742,236,{type:"item",ID:92}),this.toggleDynamicLayer(k,6,!1,0)}update(k){if(j.Aq$.isDefined(this.user)){const B=j.cj9.distance(this.user.x,this.user.y,100,380)<=80;B!==this.wasInsideTriggerLastFrame&&this.toggleDynamicLayer(k,6,B,500),this.wasInsideTriggerLastFrame=B}super.update(k)}}class FT extends kT{constructor(k,B){super(k,"B1","MAP_BONFIRE_SPIRE_VOLCANO_VILLAGE",160,307,["bonfire_spire-C1","bonfire_spire-B2","bonfire_spire-A1"],B.concat([q._.Npc_sprite_slurpy_json,q._.Npc_sprite_slime_queen_json,q._.Npc_sprite_slime_guard_json,q._.Npc_sprite_merchant_json,J.Q.Spine_npc_slurpy_json])),this.questNPC=null,this.leverNumber=1,this.battleBG="battle-bonfire-inside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1248,y:370,w:64,h:260,rect:!0},"bonfire_spire-C1",170,417.5,null,LT.K.RIGHT,!1),B.addClickableMoveEvent(1216,240,64,260,1265,385,null,null,0,null),1===this.zone.getState("lever1")&&(this.addAreaEvent(k,B,{x:198.5,y:650,w:145,h:60,rect:!0},"bonfire_spire-B2",180,117.5,null,LT.K.DOWN,!1),B.addClickableMoveEvent(126,660,145,60,200,700,null,null,0,null)),this.addAreaEvent(k,B,{x:48,y:277,w:96,h:230,rect:!0},"bonfire_spire-A1",865,482,null,LT.K.UP_LEFT,!1),B.addClickableMoveEvent(0,162,96,230,28,255,null,null,0,null),this.questNPC=B.addConstructedQuestNPC(750,530,"slurpy",!1,FT.onComplete.bind(this,k)),K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.BonfireMerchantNPC,360,310).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.BonfireMerchantNPC}`)),K.q.instance.prodigy.create.nicknamerPedestal(this.game,this.zone.ID,B.user,B.content,1e3,525)}static onComplete(k){const B=K.q.instance.prodigy.event.create();B.text(0,"slurpy"),B.start()}}class GT extends kT{constructor(k,B){super(k,"B2","MAP_BONFIRE_SPIRE_VOLCANIC_CAVERN",180,117.5,["bonfire_spire-B1","bonfire_spire-C3","bonfire_spire-B4"],B),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:198.5,y:39,w:145,h:78,rect:!0},"bonfire_spire-B1",180,500,null,LT.K.UP,!1),B.addClickableMoveEvent(126,0,145,78,200,28,null,null,0,null),this.addAreaEvent(k,B,{x:1190,y:280,w:64,h:180,rect:!0},"bonfire_spire-C3",160,417.5,null,LT.K.RIGHT,!1),B.addClickableMoveEvent(1216,190,64,180,1262,282,null,null,0,null),1===this.zone.getState("lever2")&&(this.addAreaEvent(k,B,{x:1120.5,y:640,w:145,h:160,rect:!0},"bonfire_spire-B4",1040,117.5,null,LT.K.DOWN,!1),B.addClickableMoveEvent(1048,560,145,160,1120,700,null,null,0,null))}}class jT extends kT{constructor(k,B){super(k,"B4","MAP_BONFIRE_SPIRE_VOLCANO_JUNCTION",1080,117.5,["bonfire_spire-A4","bonfire_spire-B2","bonfire_spire-C4","bonfire_spire-B5"],B),this.leverNumber=3,this.battleBG="battle-bonfire-inside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1080,y:40,w:160,h:80,rect:!0},"bonfire_spire-B2",1100,509.5,null,LT.K.UP,!1),this.addAreaEvent(k,B,{x:1250,y:450,w:80,h:160,arrowOffsetY:-20,rect:!0},"bonfire_spire-C4",130,360,null,LT.K.RIGHT,!1),1===this.zone.getState("lever3")&&this.addAreaEvent(k,B,{x:200,y:675,w:160,h:90,rect:!0},"bonfire_spire-B5",160,237.5,null,LT.K.DOWN,!1),this.addAreaEvent(k,B,{x:25,y:180,w:50,h:160,rect:!0},"bonfire_spire-A4",1020,400,null,LT.K.LEFT,!1)}}class $T extends kT{constructor(k,B){super(k,"B5","MAP_BONFIRE_SPIRE_RED_HOT_RIVER",150,210,["bonfire_spire-B4","bonfire_spire-C6"],B),this.battleBG="battle-bonfire-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:160,y:60,w:160,h:120,rect:!0},"bonfire_spire-B4",160,527.5,null,LT.K.UP,!1),B.addClickableMoveEvent(80,0,160,120,160,100,null,null,0,null),this.addAreaEvent(k,B,{x:1230,y:480,w:100,h:180,rect:!0},"bonfire_spire-C6",250,400,null,LT.K.RIGHT,!1),B.addClickableMoveEvent(1180,390,100,180,1200,480,null,null,0,null),this.addChest(k,B,"chest4",740,520)}}class HT extends kT{constructor(k,B){super(k,"C1","MAP_BONFIRE_SPIRE_FIREWATCH_ROAD",180,417.5,["bonfire_spire-D1","bonfire_spire-D2","bonfire_spire-B1"],B),this.leverNumber=1,this.battleBG="battle-bonfire-inside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1272,y:430,w:96,h:150,rect:!1},"bonfire_spire-D1",300,360,null,LT.K.RIGHT,!1),B.addClickableMoveEvent(1170,380,96,150,1235,430,null,null,0,null),this.addAreaEvent(k,B,{x:1254,y:617.5,w:52,h:205,rect:!0},"bonfire_spire-D2",260,382.5,null,LT.K.RIGHT,!1),B.addClickableMoveEvent(1228,515,52,205,1256,602,null,null,0,null),this.addAreaEvent(k,B,{x:31,y:415,w:62,h:200,rect:!1},"bonfire_spire-B1",1120,417.5,null,LT.K.LEFT,!1),B.addClickableMoveEvent(0,315,62,200,22,416,null,null,0,null)}}class VT extends kT{constructor(k,B){super(k,"C2","MAP_BONFIRE_SPIRE_PALM_PATH",1100,597.5,["bonfire_spire-C3"],B),this.leverNumber=2,this.battleBG="battle-bonfire-outside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1080.5,y:680,w:145,h:80,rect:!0},"bonfire_spire-C3",1100,200,null,LT.K.DOWN,!1),B.addClickableMoveEvent(1008,640,145,80,1080,704,null,null,0,null),this.toggleDynamicLayer(k,3,1===this.zone.getState("lever2"),0),this.toggleDynamicLayer(k,4,1!==this.zone.getState("lever2"),0),B.addClickableEvent(200,120,120,100,this.zone.toggleLever.bind(this.zone,B,1,this,{x:260,y:250})),this.zone.sendSegmentEvents("World Object Discovered",{object_type:Kn.u_.LeverSwitch,object_id:"1",x_coord:200,y_coord:120})}}class WT extends kT{constructor(k,B){super(k,"C3","MAP_BONFIRE_SPIRE_SLIME_SHANTY",160,417.5,["bonfire_spire-C2","bonfire_spire-D3","bonfire_spire-B2"],B),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}init(k,B,U,F){return this.zone.processLavaLayers(this),this.enableLayerID(3,!1),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1084,y:60,w:145,h:120,rect:!0},"bonfire_spire-C2",1100,597.5,null,LT.K.UP,!1),B.addClickableMoveEvent(1015,0,145,120,1120,20,null,null,0,null),this.addAreaEvent(k,B,{x:1268,y:519,w:24,h:158,rect:!0},"bonfire_spire-D3",180,377.5,null,LT.K.RIGHT,!1),B.addClickableMoveEvent(1256,440,24,158,1270,520,null,null,0,null),this.addAreaEvent(k,B,{x:32,y:417,w:64,h:210,rect:!0},"bonfire_spire-B2",1060,342.5,null,LT.K.LEFT,!1),B.addClickableMoveEvent(0,312,64,210,22,414,null,null,0,null)}}class qT extends kT{constructor(k,B){super(k,"C4","MAP_BONFIRE_SPIRE_LAVA_PITS",110,397.5,["bonfire_spire-D4","bonfire_spire-B4"],B),this.leverNumber=3,this.battleBG="battle-bonfire-inside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1230,y:480,w:100,h:180,rect:!0},"bonfire_spire-D4",220,467.5,null,LT.K.RIGHT,!1),this.addAreaEvent(k,B,{x:40,y:360,w:80,h:150,arrowOffsetY:-20,rect:!0},"bonfire_spire-B4",1150,450,null,LT.K.LEFT,!1)}canRegularMonsterSpawn(){return!this.zone.isOnQuest(11)}}class KT extends kT{constructor(k,B){super(k,"C6","MAP_BONFIRE_SPIRE_THRONE_ROOM_ENTRANCE",250,400,["bonfire_spire-D5","bonfire_spire-D6","bonfire_spire-B5"],B.concat([q._.Npc_sprite_cebollini_json,q._.Npc_sprite_slime_guard_json])),this.battleBG="battle-bonfire-lava"}init(k,B,U,F){const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("key",12)>0;return this.enableLayerID(1,!G),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1250,y:510,w:60,h:300,rect:!0},"bonfire_spire-D6",350,557.5,null,LT.K.RIGHT,!1),this.addAreaEvent(k,B,{x:100,y:401,w:200,h:250,rect:!0},"bonfire_spire-B5",1120,527.5,null,LT.K.LEFT,!1),B.addClickableMoveEvent(0,276,200,250,160,380,null,null,0,null),this.addAreaEvent(k,B,{x:880,y:211,w:190,h:190,rect:!0},"bonfire_spire-D5",220,480,null,LT.K.UP,!1),B.addClickableMoveEvent(785,116,190,190,880,305,null,null,0,null),this.addChest(k,B,"chest5",400,290)}}class zT extends kT{constructor(k,B){super(k,"D1","MAP_BONFIRE_SPIRE_PALM_TERRACE",260,382.5,["bonfire_spire-C1"],B),this.leverNumber=1,this.battleBG="battle-bonfire-outside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:100,y:359.5,w:200,h:235,rect:!0},"bonfire_spire-C1",1200,430,null,LT.K.LEFT,!1),B.addClickableMoveEvent(0,242,200,235,98,420,null,null,0,null),this.toggleDynamicLayer(k,3,1===this.zone.getState("lever1"),0),this.toggleDynamicLayer(k,4,1!==this.zone.getState("lever1"),0),B.addClickableEvent(840,240,120,100,this.zone.toggleLever.bind(this.zone,B,0,this,{x:800,y:300})),this.zone.sendSegmentEvents("World Object Discovered",{object_type:Kn.u_.LeverSwitch,object_id:"0",x_coord:840,y_coord:240})}}class YT extends kT{constructor(k,B){super(k,"D2","MAP_BONFIRE_SPIRE_VOLCANIC_SANCTUM",180,292.5,["bonfire_spire-C1"],B),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:60,y:242.5,w:120,h:235,rect:!0},"bonfire_spire-C1",1145,657.5,null,LT.K.LEFT,!1),B.addClickableMoveEvent(0,125,120,235,52,280,null,null,0,null),this.addWizard(k,B,725,500,"wizard1",38,!0),this.addChest(k,B,"chest2",800,500)}}class QT extends kT{constructor(k,B){super(k,"D3","MAP_BONFIRE_SPIRE_MOLTEN_ENCLAVE",180,377.5,["bonfire_spire-C3"],B),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:60,y:322.5,w:120,h:235,rect:!0},"bonfire_spire-C3",1100,515,null,LT.K.LEFT,!1),B.addClickableMoveEvent(0,205,120,235,52,360,null,null,0,null),this.addWizard(k,B,740,400,"wizard2",39,!0),this.addChest(k,B,"chest3",840,415)}}class XT extends kT{constructor(k,B){super(k,"D4","MAP_BONFIRE_SPIRE_OUTER_SLIMEBURBIA",220,467.5,["bonfire_spire-C4"],B.concat([q._.Zone_lamplight_json])),this.leverNumber=3,this.battleBG="battle-bonfire-outside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:100,y:421,w:200,h:210,rect:!0},"bonfire_spire-C4",1120,460,null,LT.K.LEFT,!1),B.addClickableMoveEvent(0,316,200,210,102,500,null,null,0,null),this.toggleDynamicLayer(k,3,1===this.zone.getState("lever3"),0),this.toggleDynamicLayer(k,4,1!==this.zone.getState("lever3"),0),B.addClickableEvent(960,260,120,80,this.zone.toggleLever.bind(this.zone,B,2,this,{x:920,y:320})),this.zone.sendSegmentEvents("World Object Discovered",{object_type:Kn.u_.LeverSwitch,object_id:"2",x_coord:200,y_coord:120})}}class ZT extends kT{constructor(k,B){super(k,"D5","MAP_BONFIRE_SPIRE_THRONE_ROOM",220,480,["bonfire_spire-E6","bonfire_spire-C6"],B.concat([q._.Npc_sprite_slurpy_json,q._.Npc_sprite_cebollini_json,q._.Npc_sprite_slime_worker_json,J.Q.Spine_npc_slimeguard_json,J.Q.Spine_npc_slimequeen_json])),this.queen=null,this.gaurd=null,this.battleBG="battle-bonfire-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1180,y:501,w:200,h:210,rect:!0},"bonfire_spire-E6",180,547.5,null,LT.K.RIGHT,!1),B.addClickableMoveEvent(1080,396,200,210,1210,580,null,null,0,null),this.addAreaEvent(k,B,{x:200,y:635,w:200,h:180,rect:!0},"bonfire_spire-C6",900,355,null,LT.K.DOWN,!1),this.gaurd=new Zw.p(k,"NPC_NAME_GUARD_SLIME",494,Kn.ac.Guard,B.content,570,430,"idle"),this.gaurd.onClick.add(this.talkToGuard,this),this.queen=new Zw.p(k,"NPC_NAME_QUEEN_GOO_LIA",492,Kn.ac.Boss,B.content,645,282,"idle"),this.queen.onClick.add(this.talkToQueen,this)}talkToGuard(){const k=K.q.instance.prodigy.event.create();k.text(5,"slime_guard"),k.start()}talkToQueen(){const k=K.q.instance.prodigy.event.create();k.text(10,"slime_queen"),k.text(),k.text(5,"slime_guard"),k.start()}}class JT extends kT{constructor(k,B){super(k,"D6","MAP_BONFIRE_SPIRE_GARDEN_GETAWAY",330,510,["bonfire_spire-C6"],B.concat([q._.Zone_lamplight_json,q._.Npc_sprite_cebollini_json])),this.battleBG="battle-bonfire-lava"}init(k,B,U,F){const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("key",12)>0;return this.enableLayerID(1,!G),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:70,y:500,w:140,h:250,rect:!0},"bonfire_spire-C6",1080,480,null,LT.K.LEFT,!1)}}class tS extends kT{constructor(k,B){super(k,"E5","MAP_BONFIRE_SPIRE_FIERY_ALCOVE",115,510,["bonfire_spire-E6"],B.concat([q._.Zone_lamplight_json])),this.battleBG="battle-bonfire-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:160,y:655,w:160,h:130,rect:!0},"bonfire_spire-E6",1160,162.5,null,LT.K.DOWN,!1),this.addChest(k,B,"chest6",800,368)}}class eS extends kT{constructor(k,B){super(k,"E6","MAP_BONFIRE_SPIRE_ROYAL_KITCHEN",180,547.5,["bonfire_spire-E5","bonfire_spire-D5"],B.concat([q._.Npc_sprite_cebollini_json])),this.battleBG="battle-bonfire-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1100,y:65,w:160,h:130,rect:!0},"bonfire_spire-E5",120,512.5,null,LT.K.UP,!1),B.addClickableMoveEvent(1e3,0,160,130,1120,120,null,null,0,null),this.addAreaEvent(k,B,{x:50,y:500,w:100,h:170,guideHandPathToX:100,guideHandPathToY:480,rect:!0},"bonfire_spire-D5",1020,500,null,LT.K.LEFT,!1),B.addClickableMoveEvent(0,415,100,170,100,480,null,null,0,null)}}class iS extends Pn.T{constructor(k,B,U){super(k,B,1,"QUESTS_BONFIRE_SPIRE_PULL_LEVER",{type:"seq",N:1},["bonfire_spire-D1"],[511,512,513,514],[],[509],U)}process(k,B,U){super.process(k,B,U),this.zone.isQuestComplete(1)||(this.zone.processLeverRequirements(B,U,[1,null,null]),this.zone.processLeverQuest(B,1))}}class sS extends Pn.T{constructor(k,B,U){super(k,B,10,"QUESTS_BONFIRE_SPIRE_OFFER_DISH",{type:"seq",N:1},["bonfire_spire-C6"],[536,537],[],[509],U)}start(k,B,U){if(super.start(k,B,U),"C6"===U.getTag()&&this.zone.isOnSequence(10,0)){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=U.addConstructedNPC(k,B,885,340,q._.Npc_sprite_cebollini_json,null,"NPC_NAME_CEBOLLINI");G.visible=!1;const j=K.q.instance.prodigy.event.create();j.enableInput(!1),j.set(B.user,"evtProc",!0),j.validPath(B.user,B.path,650,420),j.enableInput(!0),j.text(5,"cebollini"),j.set(G,"visible",!0),j.text(6,"cebollini"),j.text(7,"cebollini"),j.enableInput(!1),j.validPath(G,B.path,650,420),j.function(F.backpack.consume.bind(F.backpack,"item",91,1)),j.path(G,[{x:K.q.instance.game.width,y:510}]),j.set(G,"visible",!1),j.enableInput(!0),j.text(104,"noot"),j.text(105,"noot"),j.text(106,"noot"),j.function(this.zone.completeSequence.bind(U.zone,10,0)),j.function(B.process.bind(B)),j.set(B.user,"evtProc",!1),j.start()}return null}}class nS extends Pn.T{constructor(k,B,U){super(k,B.concat(q._.Npc_sprite_noot_json),11,"QUESTS_BONFIRE_SPIRE_FIND_KEY",{type:"item",ID:92,N:1,K:1},["bonfire_spire-C4"],[538,539,540,541,542,543],[],[509,510],U)}setup(k,B,U){super.setup(k,B,U);const F={randDir:!0,encounter:[{ID:75}],drops:this.hasDefeatedPuck()?[{type:"item",ID:92}]:void 0,difficulty:5,maxTeamSize:1,unique:!0,isQuestEncounter:!0,showGuideHand:!0},G=U.getTag();if("C4"===G&&!this.zone.isQuestComplete(11))return K.q.instance.prodigy.prefabFactory.addMonster(U,480,480,1,F).catch(j.RQr.createHandler("Could not add monster 0 for Bonfire Q11")),K.q.instance.prodigy.prefabFactory.addMonster(U,840,240,2,F).catch(j.RQr.createHandler("Could not add monster 1 for Bonfire Q11")),{enableMonsters:!1};if("A4"===G){const F=U.addChest(k,B,"chestGuardian",742,236,{type:"item",ID:92});return F.chestSprite.events.onInputDown.removeAll(),F.chestSprite.events.onInputDown.add((()=>{const k=K.q.instance.prodigy.event.create();k.text(111,"noot"),k.start()})),{enableChests:!1}}}hasDefeatedPuck(){const k=this.zone.getQuestState().state;return Object.keys(k).some((B=>k[B]>0))}}class aS extends Pn.T{constructor(k,B,U){super(k,B,12,"QUESTS_BONFIRE_SPIRE_UNLOCK_CHEST",{type:"key",ID:12,N:1},["bonfire_spire-A4"],[544,545,546],[],[509],U),this.chest=null,this.chestElement=null}setup(k,B,U){super.setup(k,B,U);return"A4"===U.getTag()&&this.zone.isOnQuest(12)?(this.zone.isOnSequence(12,0)?(this.chest=B.content.addChild(K.q.instance.prodigy.create.sprite(800,225,q._.Tileset_core_json,"chest-B-1")),this.chest.inputEnabled=!0,this.chest.events.onInputDown.add((()=>{this.openTheChest(k,B,U)}),this),this.chest.anchor.set(.5,1),this.chestElement=K.q.instance.prodigy.create.element(B.foreground,745,135),j.Aq$.isDefined(this.chestElement)&&(this.chestElement.highlight(!0),this.chestElement.visible=!0)):this.zone.isOnSequence(12,1)&&U.addChest(k,B,"chestGuardian",800,225,{type:"item",ID:92}),{enableChests:!1}):null}openTheChest(k,B,U){const F=U.addMonster(k,B,0,725,250,!1,{randDir:!1,encounter:[{ID:65}],difficulty:5,maxTeamSize:1},!0);F.visible=!1,F.alpha=0;const G=K.q.instance.prodigy.event.create();G.validPath(B.user,B.path,800,250),G.enableInput(!1),G.set(B.user,"evtProc",!0),G.set(F,"alpha",0),G.function((()=>{F.visible=!0,k.add.tween(F,this).to({alpha:1},1e3,j.GS3.Linear.None).start()})),G.delay(2e3),G.enableInput(!0),G.function((()=>{K.q.instance.prodigy.battle.start({intro:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_DEFEAT_GUARDIAN"),screen:"battle-bonfire-outside",pets:[{ID:65,nickname:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_GUARDIAN")}]},null,(()=>{this.zone.completeSequence(12,0),K.q.instance.prodigy.world.it("bonfire_spire-A4",800,270)}),null,this.zone.defaultOnFaint)})),G.start()}}class rS extends Pn.T{constructor(k,B,U){super(k,B,13,"QUESTS_BONFIRE_SPIRE_DEFEAT_CHEF",{type:"seq",N:2},["bonfire_spire-D6"],[547,548,549],[],[509],U)}setup(k,B,U){if(super.setup(k,B,U),"D6"===U.getTag()){return U.addConstructedNPC(k,B,850,400,q._.Npc_sprite_cebollini_json,(()=>{const k=K.q.instance.prodigy.event.create();k.text(14,"cebollini"),k.text(15,"cebollini"),k.start()}),"NPC_NAME_CEBOLLINI").flip(),{enableMonsters:!1}}return null}start(k,B,U){return super.start(k,B,U),"D6"===U.getTag()&&this.zone.isOnSequence(13,0)?this.bossBattle(k,B,U):"D6"===U.getTag()&&this.zone.isOnSequence(13,1)&&this.postBattle(k,B),null}bossBattle(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),G=F.getValue("cebolliniMaxHP",Vt.s.get("GameConstants.Cebollini.MAX_HP")),$=null===G?void 0:parseInt(G,10),H=K.q.instance.prodigy.event.create();K.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle";const V=this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_BOSS_BATTLE"),{boss:{ID:13,maxHP:$,element:"fire",attacks:[55,58],name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_CEBOLLINI"),tag:"bonfire"},difficulty:parseInt(F.getValue("CebolliniDifficulty",Vt.s.get("GameConstants.Cebollini.DIFFICULTY")),10),drops:[{type:"weapon",ID:16}],starMod:5,screen:"battle-bonfire-lava",events:[{action:"turn",value:1,callback:(k,B)=>{const U=K.q.instance.prodigy.dialogue.create();U.setText(10),U.startDeprecated("cebollini",!1,B)}}]},(()=>{const k=K.q.instance.prodigy.event.create();k.function(this.zone.completeSequence.bind(this.zone,13,0)),k.function(K.q.instance.prodigy.world.it.bind(K.q.instance.prodigy.world,"bonfire_spire-D6")),k.start()}),(()=>{H.function(K.q.instance.prodigy.world.it.bind(K.q.instance.prodigy.world,"bonfire_spire-C6",1060,500)),H.start()}));H.enableInput(!1),H.validPath(B.user,B.path,399,400),H.validPath(B.user,B.path,400,400),H.enableInput(!0),H.text(8,"cebollini"),H.text(9,"cebollini"),H.function(V),H.start()}postBattle(k,B){const U=K.q.instance.prodigy.event.create();U.text(13,"cebollini"),U.text(14,"cebollini"),U.text(),U.text(107,"noot"),U.text(),U.text(15,"cebollini"),U.function(this.zone.completeSequence.bind(this.zone,13,1)),U.function(B.process.bind(B)),U.start()}}class oS extends Pn.T{constructor(k,B,U){super(k,B.concat(J.Q.Spine_npc_slurpy_json,Z.c.Sfx_bonfire_spire_q6_and_q14),14,"QUESTS_BONFIRE_SPIRE_TALK_TO_QUEEN",{type:"seq",N:1},["bonfire_spire-D5"],[550,551],[],[554,555,510,556],U)}start(k,B,U){if(super.start(k,B,U),"D5"===U.getTag()&&this.zone.isOnSequence(14,0)){const F=B.foreground.addChild(K.q.instance.prodigy.create.sprite(690,250,q._.Zone_bonfire_json,"food"));F.visible=!1;const G=U.addConstructedNPC(k,B,720,490,"npc-sprite-worker-slime-red",null,"NPC_NAME_WORKER_SLIME"),j=new Zw.p(k,"NPC_NAME_SLURPY",493,Kn.ac.Boss,B.content,530,310,"animation"),$=U.addConstructedNPC(k,B,835,390,q._.Npc_sprite_cebollini_json,null,"NPC_NAME_CEBOLLINI");$.flip();const H=K.q.instance.prodigy.event.create();H.text(108,"noot"),H.text(),H.text(5,"slime_queen"),H.text(),H.text(16,"cebollini"),H.text(),H.function((()=>{U.queen.flip()})),H.text(6,"slime_queen"),H.enableInput(!1),H.path(G,[{x:730,y:350}],1,!0),H.delay(1e3),H.set(F,"visible",!0),H.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,F,"-70","-200","+100",2e3,!0,!0)),H.delay(2e3),H.sound(10,"eating"),H.delay(2e3),H.enableInput(!0),H.text(7,"slime_queen"),H.function($.chat.bind($,1,100)),H.function((()=>{U.queen.flip()})),H.text(8,"slime_queen"),H.text(),H.text(43,"slurpy"),H.text(44,"slurpy"),H.enableInput(!1),H.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"+100","-100","+250",1e3,!1,!0),!0),H.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"-100","-100","+200",1e3,!1,!0),!0),H.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"-150","-100","+100",1e3,!1,!0),!0),H.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"-120","-150","+150",1e3,!1,!0),!0),H.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"-180","-150","+300",1e3,!0,!0),!0),H.enableInput(!0),H.text(),H.function((()=>{U.queen.flip()})),H.text(17,"cebollini"),H.text(18,"cebollini"),H.text(),H.text(9,"slime_queen"),H.text(),H.text(19,"cebollini"),H.function(this.zone.completeSequence.bind(U.zone,14,0)),H.function(B.process.bind(B)),H.start()}return null}}class hS extends Pn.T{constructor(k,B,U){super(k,B,2,"QUESTS_BONFIRE_SPIRE_PULL_LEVER",{type:"seq",N:1},["bonfire_spire-C2"],[515,516],[],[509],U)}process(k,B,U){super.process(k,B,U),this.zone.isQuestComplete(2)||(this.zone.processLeverRequirements(B,U,[1,1,null]),this.zone.processLeverQuest(B,2))}}class cS extends Pn.T{constructor(k,B,U){super(k,B,3,"QUESTS_BONFIRE_SPIRE_PULL_LEVER",{type:"seq",N:1},["bonfire_spire-D4"],[517,518],[],[509],U)}process(k,B,U){super.process(k,B,U),this.zone.isQuestComplete(3)||(this.zone.processLeverRequirements(B,U,[1,1,1]),this.zone.processLeverQuest(B,3))}}class dS extends Pn.T{constructor(k,B,U){super(k,B,4,"",{type:"item",ID:88,N:1,K:!0},["bonfire_spire-C3"],[519,520,521],[],[509],U,null,"QUESTS_BONFIRE_RETRIEVE_INGREDIENT"),this.collectionMaps={C3:[0]}}setup(k,B,U){return super.setup(k,B,U),"C3"===U.getTag()&&B.addCollect(0,950,250,{type:"item",ID:88,showLoading:!1}),null}}class lS extends Pn.T{constructor(k,B,U){super(k,B.concat([Z.c.Sfx_bonfire_spire_q5]),5,"QUESTS_BONFIRE_SPIRE_ADD_INGREDIENT",{type:"seq",N:1},["bonfire_spire-E6"],[522,523],[],[509,510],U),this.food=null,this.cebollini=null,this.cebollini2=null,this.cookingPot=null,this.caught=!1,this.foodPlaced=!1,this.hover=!1,this.cookingPotHighlight=null,this.visionCone=null,this.button=null,this.buttonIcon=null,this.pot=null}setup(k,B,U){return super.setup(k,B,U),"E6"!==U.getTag()||this.zone.isQuestComplete(5)?null:(this.food=B.foreground.addChild(K.q.instance.prodigy.create.sprite(650,180,Ut.E.getIconForType("item",88))),this.food.visible=!1,this.cebollini=U.addConstructedNPC(k,B,580,370,q._.Npc_sprite_cebollini_json,null,"NPC_NAME_CEBOLLINI"),this.cebollini2=U.addConstructedNPC(k,B,this.cebollini.x,this.cebollini.y,q._.Npc_sprite_cebollini_json,null,"NPC_NAME_CEBOLLINI"),this.cebollini2.visible=!1,this.caught=!1,this.foodPlaced=!1,this.hover=!1,this.cookingPot=B.content.addChild(K.q.instance.prodigy.create.sprite(740,234,q._.Zone_bonfire_json,"pot")),this.cookingPot.anchor.set(.5,1),this.cookingPot.inputEnabled=!0,this.cookingPot.events.onInputDown.add((()=>{this.potClick(k,B)})),this.cookingPotHighlight=un.o.highlightObjectOnLayer(k,810,130,null,B.content),U.toggleDynamicLayer(k,5,!0,0),this.visionCone=B.background.addChild(K.q.instance.prodigy.create.sprite(this.cebollini.x,this.cebollini.y-25,q._.Zone_bonfire_json,"visioncone")),this.visionCone.scale.set(2,2),this.visionCone.anchor.set(.5,.5),this.visionCone.smoothed=!0,this.button=B.content.addChild(K.q.instance.prodigy.create.sprite(B.user.x-40,B.user.y-200,q._.General_icons_json,"icon-base-active")),this.button.inputEnabled=!0,this.button.events.onInputDown.add((()=>{this.hideButtonClick(k,B)}),this),this.buttonIcon=B.content.addChild(K.q.instance.prodigy.create.sprite(B.user.x-40,B.user.y-200,q._.Zone_bonfire_json,"cauldron-icon")),this.button.events.onInputOver.add((()=>{this.hover=!0})),this.button.events.onInputOut.add((()=>{this.hover=!1})),this.pot=B.content.addChild(K.q.instance.prodigy.create.sprite(B.user.x,B.user.y,q._.Zone_bonfire_json,"cauldron")),this.pot.anchor.set(.5,1),this.pot.visible=!1,{enableMonsters:!1})}start(k,B,U){return super.start(k,B,U),"E6"!==U.getTag()||this.zone.isQuestComplete(5)||(this.tutorial(k),this.cebollini.patrol([{x:920,y:260},{x:680,y:400},{x:930,y:450},{x:790,y:300},{x:720,y:490},{x:640,y:300}],.5)),null}update(k,B,U){if("E6"===U.getTag())if(this.zone.isQuestComplete(5))j.Aq$.isDefined(this.visionCone)&&(this.visionCone.visible=!1,delete this.visionCone,j.Aq$.isDefined(this.button)&&this.button.destroy(),j.Aq$.isDefined(this.buttonIcon)&&this.buttonIcon.destroy());else{this.button.x=B.user.x-40,this.button.y=B.user.y-200,this.hover?this.buttonIcon.y=B.user.y-190:this.buttonIcon.y=B.user.y-187,this.buttonIcon.x=B.user.x-27,this.caught?this.visionCone.visible=!1:(this.visionCone.visible=!0,this.visionCone.x=this.cebollini.x,this.visionCone.y=this.cebollini.y-25),this.pot.x===B.user.x&&this.pot.y===B.user.y||(this.pot.visible=!1,this.button.visible=!0,this.buttonIcon.visible=!0,B.user.visible=!0,this.pot.x=B.user.x,this.pot.y=B.user.y);const U=(B.user.x-(this.cebollini.x-5))*(B.user.x-(this.cebollini.x-5))+(B.user.y-(this.cebollini.y-25))*(B.user.y-(this.cebollini.y-25));if(this.caught&&(this.foodPlaced||(this.cebollini.visible=!1,this.cebollini2.visible||(this.cebollini2.scale.x=this.cebollini.scale.x,this.cebollini2.x=this.cebollini.x,this.cebollini2.y=this.cebollini.y,this.cebollini2.visible=!0)),this.visionCone.visible=!1),U<22500&&!this.pot.visible&&!this.caught&&(this.caught=!0,!this.foodPlaced)){const U=new Ti.rD(k);k.input.enabled=!1,B.user.setValidPath(B.path,B.user.x,B.user.y,null),k.input.enabled=!0,U.addEvents([{dialogueData:U.dataProvider.getLegacy("cebollini",0),blockInput:!0},{callback:()=>{K.q.instance.prodigy.world.it("bonfire_spire-E6")}}]),U.start()}}}tutorial(k){if(!j.Aq$.isDefined(this.zone.getState("minigametut"))){this.zone.setState("minigametut",1);const k=K.q.instance.prodigy.event.create();k.text(112,"noot"),k.text(113,"noot"),k.text(114,"noot"),k.text(115,"noot"),k.text(116,"noot"),k.start()}}hideButtonClick(k,B){if(!this.caught){const k=K.q.instance.prodigy.event.create();k.validPath(B.user,B.path,B.user.x,B.user.y),k.delay(50),k.function(K.q.instance.prodigy.audio.playSFX.bind(K.q.instance.prodigy.audio,18,"pop")),k.set(this.pot,"visible",!0),k.set(B.user,"visible",!1),k.set(this.button,"visible",!1),k.set(this.buttonIcon,"visible",!1),k.enableInput(!0),k.start()}}potClick(k,B){if(!this.foodPlaced){const k=K.q.instance.prodigy.event.create(),U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.validPath(B.user,B.path,700,240),k.enableInput(!1),k.set(this.food,"visible",!0),k.set(this,"foodPlaced",!0),k.set(this.button,"visible",!1),k.set(this.buttonIcon,"visible",!1),k.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,this.food,"+50","-200","+100",2e3,!0,!0)),k.function(this.cookingPotHighlight.destroy.bind(this.cookingPotHighlight)),k.delay(2350),k.sound(9,"plop"),k.sound(9,"cooking"),k.enableInput(!0),k.function(U.backpack.consume.bind(U.backpack,"item",88,1)),k.function(this.zone.completeSequence.bind(this.zone,5,0)),k.function(B.process.bind(B)),k.start()}}}class uS extends Pn.T{constructor(k,B,U){super(k,B.concat(Z.c.Sfx_bonfire_spire_q6_and_q14),6,"QUESTS_BONFIRE_SPIRE_ATTEND_DINNER",{type:"seq",N:1},["bonfire_spire-D5"],[524,525],[],[509],U)}start(k,B,U){if(super.start(k,B,U),"D5"===U.getTag()&&this.zone.isOnSequence(6,0)){const F=B.foreground.addChild(K.q.instance.prodigy.create.sprite(690,250,q._.Zone_bonfire_json,"food"));F.visible=!1;const G=U.addConstructedNPC(k,B,720,490,"npc-sprite-worker-slime-red",null,"NPC_NAME_WORKER_SLIME"),j=U.addConstructedNPC(k,B,500,330,q._.Npc_sprite_cebollini_json,null,"NPC_NAME_CEBOLLINI",B.foreground),$=K.q.instance.prodigy.event.create();$.text(0,"slime_guard"),$.function((()=>{U.queen.flip()})),$.enableInput(!1),$.path(G,[{x:730,y:350}],1,!0),$.delay(1e3),$.enableInput(!0),$.text(0,"slime_queen"),$.enableInput(!1),$.enableInput(!0),$.text(1,"cebollini"),$.enableInput(!1),$.set(F,"visible",!0),$.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,F,"-80","-200","+100",2e3,!0,!0)),$.delay(2e3),$.sound(10,"eating"),$.delay(2e3),$.enableInput(!0),$.text(1,"slime_queen"),$.function((()=>{U.queen.flip()})),$.text(2,"slime_queen"),$.enableInput(!1),$.set(F,"alpha",1),$.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,F,"-90","-50","+150",600,!0,!0)),$.delay(1e3),$.enableInput(!0),$.text(2,"cebollini"),$.text(),$.text(3,"slime_queen"),$.text(4,"slime_queen"),$.text(),$.text(3,"cebollini"),$.enableInput(!1),$.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"+200","-100","+220",1e3,!1,!0),!0),$.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"+100","-100","+150",1e3,!1,!0),!0),$.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"+150","-100","+100",1e3,!1,!0),!0),$.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"+200","-200","+230",1e3,!1,!0),!0),$.enableInput(!0),$.text(4,"cebollini"),$.enableInput(!1),$.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"+60","-100","+200",1e3,!0,!0),!0),$.enableInput(!0),$.text(103,"noot"),$.function(this.zone.completeSequence.bind(U.zone,6,0)),$.function(B.process.bind(B)),$.start()}return null}}class fS extends Pn.T{constructor(k,B,U){super(k,B,7,"",{type:"item",ID:89,N:3},["bonfire_spire-D1","bonfire_spire-C2","bonfire_spire-D4"],[526,527,528,529,530],[],[509],U,null,"QUESTS_BONFIRE_COLLECT_COOKING_SUPPLIES"),this.collectionMaps={D1:[0],C2:[1],D4:[2]}}setup(k,B,U){super.setup(k,B,U);const F=U.getTag();return"D1"===F?B.addCollect(0,640,480,{type:"item",ID:89,showLoading:!1}):"C2"===F?B.addCollect(1,670,265,{type:"item",ID:89,showLoading:!1}):"D4"===F&&B.addCollect(2,640,360,{type:"item",ID:89,showLoading:!1}),null}}var bS=U(25308);class pS extends Pn.T{constructor(k,B,U){super(k,B.concat(X.V.Bgm_puppetmaster),7,"",{type:"item",ID:89,N:3},["bonfire_spire-D1","bonfire_spire-C2","bonfire_spire-D4"],[526,527,528,529,530],[],[509],U,null,"QUESTS_BONFIRE_COLLECT_COOKING_SUPPLIES"),this.collectionMaps={D1:[0],C2:[1],D4:[2]}}setup(k,B,U){super.setup(k,B,U);const F=U.getTag();if("D1"===F)B.addCollect(0,640,480,{type:"item",ID:89,showLoading:!1});else if("C2"===F)B.addCollect(1,670,265,{type:"item",ID:89,showLoading:!1});else if("D4"===F)return U.zone.getState(Zu.PIPPET_DEFEATED)||(k.input.enabled=!1,this.addPippetEncounter(U.zone)),(U.zone.getState(Zu.PIPPET_REMATCH)||U.zone.getState(Zu.PIPPET_DEFEATED))&&B.addCollect(2,640,360,{type:"item",ID:89,showLoading:!1}),{enableMonsters:!1,enableWizards:!1};return null}addPippetEncounter(k){K.q.instance.prodigy.prefabFactory.createPippetQuestEncounter(k,204,bS.e.Bonfire_spire_quests_encounter).catch(j.RQr.createHandler("Error loading Pippet Miniboss Encounter for Bonfire Q7"))}}class vS extends Pn.T{constructor(k,B,U){super(k,B,8,"QUESTS_BONFIRE_SPIRE_TALK_TO_GUARDS",{type:"seq",N:1},["bonfire_spire-C6"],[531,532,533],[],[509],U)}start(k,B,U){if(super.setup(k,B,U),"C6"===U.getTag()&&this.zone.isOnSequence(8,0)){const U=new Ti.rD(k),F=B.addNPC(430,380,q._.Npc_sprite_slime_guard_json,Kn.ac.Guard,null,"NPC_NAME_HANK"),G=B.addNPC(650,520,q._.Npc_sprite_slime_guard_json,Kn.ac.Guard,null,"NPC_NAME_MIKE");F.animate(),G.animate(),U.addEvents([{callback:()=>{F.hop(100,(()=>{F.hop(100,null,0,20)}),0,20)}},{dialogueData:U.dataProvider.get(502),blockInput:!0},{callback:()=>{G.hop(100,(()=>{G.hop(100,null,0,20)}),0,20)}},{dialogueData:U.dataProvider.get(503),blockInput:!0},{callback:()=>{F.hop(100,(()=>{F.hop(100,null,0,20)}),0,20)}},{dialogueData:U.dataProvider.get(504),blockInput:!0},{callback:()=>{G.hop(100,(()=>{G.hop(100,null,0,20)}),0,20)}},{dialogueData:U.dataProvider.get(505),blockInput:!0},{callback:()=>{this.zone.completeSequence(8,0),B.process()}}]),U.start()}return null}}class gS extends Pn.T{constructor(k,B,U){super(k,B.concat(J.Q.Spine_npc_slimeworker_json),9,"QUESTS_BONFIRE_SPIRE_SAVE_GATHERERS",{type:"item",ID:90,N:2},["bonfire_spire-A4"],[534,535],[],[509],U),this.slimeNPCs=[],this.slimeNPCHighlights=[]}setup(k,B,U){super.setup(k,B,U),this.slimeNPCs=[],this.slimeNPCHighlights=[];const F={encounter:[{ID:48}],ignorePathfindingForAlert:!0,difficulty:4,maxTeamSize:1};if("A4"===U.getTag()){const G=70,$=-120;if(this.zone.getState("turnip1"))this.slimeNPCs[0]=new Zw.p(k,"NPC_NAME_WORKER_SLIME",496,Kn.ac.Guard,B.content,825,205,"idle-no-turnip");else{this.slimeNPCs.push(new Zw.p(k,"NPC_NAME_WORKER_SLIME",496,Kn.ac.Guard,B.content,825,205,"idle")),this.slimeNPCs[0].onClick.add((()=>{this.interactSlime(k,B,0)}),this),this.slimeNPCHighlights[0]=un.o.highlightObjectOnLayer(k,G,$,this.slimeNPCs[0],B.foreground);const H=U.addMonster(k,B,3,935,200,!0,F);j.Aq$.isDefined(H)&&H.flip()}if(this.zone.getState("turnip2"))this.slimeNPCs[1]=new Zw.p(k,"NPC_NAME_WORKER_SLIME",496,Kn.ac.Guard,B.content,370,440,"idle-no-turnip");else{this.slimeNPCs.push(new Zw.p(k,"NPC_NAME_WORKER_SLIME",496,Kn.ac.Guard,B.content,370,440,"idle")),this.slimeNPCs[1].onClick.add((()=>{this.interactSlime(k,B,1)}),this),this.slimeNPCHighlights[1]=un.o.highlightObjectOnLayer(k,G,$,this.slimeNPCs[1],B.content);const H=U.addMonster(k,B,4,480,450,!0,F);j.Aq$.isDefined(H)&&H.flip()}}return null}start(k,B,U){if("A4"===U.getTag()&&this.zone.isOnSequence(9,0)){this.zone.completeSequence(9,0);const k=K.q.instance.prodigy.event.create();k.text(0,"slime_worker"),k.start()}return null}interactSlime(k,B,U){if(!this.zone.getState(0===U?"turnip1":"turnip2")){const F=K.q.instance.prodigy.event.create(),G=this.slimeNPCs[U].x,j=this.slimeNPCs[U].y;F.validPath(B.user,B.path,G+81,j),F.validPath(B.user,B.path,G+80,j),F.text(1,"slime_worker"),F.function((()=>{this.slimeNPCHighlights[U].destroy()})),F.function((()=>{this.slimeNPCs[U].destroy(),this.slimeNPCs[U]=new Zw.p(k,"NPC_NAME_WORKER_SLIME",496,Kn.ac.Guard,B.content,G,j,"idle-no-turnip")})),F.function((()=>{K.q.instance.prodigy.open.gotItem([{type:"item",ID:90,N:1}],B.process.bind(B))})),F.function(this.zone.setState.bind(this.zone,0===U?"turnip1":"turnip2",1)),F.start()}}}class mS extends vn.b{constructor(k){super(k),this.questManagerIdentifier="474-b78a",this._assets=[],this.name="Bonfire Spire",this.ID=hn.A_.BONFIRE,this.guardian="BONFIRE_GUARDIAN",this.battleBG="battle-bonfire-outside",this.defaultOnFaint="bonfire_spire-B1",this.questHub="bonfire_spire-B1",this.bgmID=14,this.currency=12,this.zoneIndex=pT.P.Bonfire,this.states=["chest1","chest2","chest3","chest4","chest5","chest6","chestGuardian","wizard1","wizard2","lever1","lever2","lever3","turnip1","turnip2","minigametut",Zu.PIPPET_ENCOUNTER,Zu.PIPPET_REMATCH,Zu.PIPPET_DEFEATED];const B=[Rn.t.Tileset_bonfire_png,Rn.t.Tileset_cloud_png,Rn.t.Tileset_cloud_new_png,Rn.t.Tileset_volcano_new_png,Rn.t.Tileset_generic_png,q._.Npc_sprite_wizard_json,q._.Zone_bonfire_json,Rn.t.Tileset_collisions_png,X.V.Bgm_bonfire_spire],U={map:"bonfire_spire-Titan",cutscene:"bonfire_spire-titanIntro",harvey:{x:240,y:200},sign:{x:150,y:210},catapult:{x:140,y:400,arcHeight:300},titan:{x:1100,y:390,impactOffset:{x:-130,y:0}},entry:{x:400,y:450},battleBG:[nr.q.Battle_bonfire_inside_bg,nr.q.Battle_bonfire_inside_fg]};this.maps={A1:new BT(this,B),A4:new UT(this,B),B1:new FT(this,B),B2:new GT(this,B),B4:new jT(this,B),B5:new $T(this,B),C1:new HT(this,B),C2:new VT(this,B),C3:new WT(this,B),C4:new qT(this,B),C6:new KT(this,B),D1:new zT(this,B),D2:new YT(this,B),D3:new QT(this,B),D4:new XT(this,B),D5:new ZT(this,B),D6:new JT(this,B),E5:new tS(this,B),E6:new eS(this,B),Titan:new xT(this,B,U)},Promise.all([Cf.T.ready,Gt.R.dataBundleLoadPromise]).then((()=>{this.setZoneRewards()})).catch((k=>{K.q.instance.prodigy.open.messageBoxError("ERROR_LOADING_ZONE",["WORLD_BONFIRE_SPIRE"],k,"Error, unable to load Bonfire Spire Zone Rewards JSON")})),this.scenes={titanIntro:new _T(this,[Rn.t.Tileset_interior_general_png,Rn.t.Tileset_wall_collisions_png,X.V.Bgm_tutorial])}}setZoneRewards(){const k=[Rn.t.Tileset_bonfire_png,Rn.t.Tileset_cloud_png,Rn.t.Tileset_cloud_new_png,Rn.t.Tileset_volcano_new_png,Rn.t.Tileset_generic_png,q._.Npc_sprite_wizard_json,q._.Zone_bonfire_json,Rn.t.Tileset_collisions_png,X.V.Bgm_bonfire_spire],B=(0,yT.mg)(Gt.R.loadData(Ft.r.ZoneRewardsBonfireSpire_json));this.quests={1:new iS(this,k,B.quests.BonfireSpireQ1),2:new hS(this,k,B.quests.BonfireSpireQ2),3:new cS(this,k,B.quests.BonfireSpireQ3),4:new dS(this,k,B.quests.BonfireSpireQ4),5:new lS(this,[],B.quests.BonfireSpireQ5),6:new uS(this,[],B.quests.BonfireSpireQ6),7:ef.arePippetQuestEncountersEnabled?new pS(this,k,B.quests.BonfireSpireQ7):new fS(this,k,B.quests.BonfireSpireQ7),8:new vS(this,k,B.quests.BonfireSpireQ8),9:new gS(this,k,B.quests.BonfireSpireQ9),10:new sS(this,k,B.quests.BonfireSpireQ10),11:new nS(this,k,B.quests.BonfireSpireQ11),12:new aS(this,k,B.quests.BonfireSpireQ12),13:new rS(this,k,B.quests.BonfireSpireQ13),14:new oS(this,[],B.quests.BonfireSpireQ14)}}start(k,B,U){super.start(k,B,U),this.showTopLeftNavigationButton()}createTopLeftNavigationButton(){this.showTopLeftNavigationButton()}processLeverRequirements(k,B,U){this.enableLeverElement(!1);const F=this.getCurrentQuest();let G,$;for(let V=0;V<3;V++){const k=this.getState(`lever${V+1}`);if(j.Aq$.isDefined(U[V])&&U[V]!==k){G=V+1,j.VyI.log(`Required Lever: lever${G}`,j.$bb.Verbose);break}}let H="QUESTS_BONFIRE_SPIRE_PULL_LEVER";switch(G){case 1:$=["bonfire_spire-D1"],this.highlightLever(k,B,"D1",960,203);break;case 2:$=["bonfire_spire-C2"],this.highlightLever(k,B,"C2",320,80);break;case 3:$=["bonfire_spire-D4"],this.highlightLever(k,B,"D4",1080,190);break;default:H=F.descCacheKey,$=F.areaCache}F.area!==$&&(F.area=$,F.descKey=H,j.Aq$.isDefined(this.toggle)&&this.toggle&&(this.toggle=!1,j.VyI.log("Toggled",j.$bb.Verbose),k.process())),j.VyI.log(`Quest Target Area: ${String(F.area)}`,j.$bb.Verbose)}enableLeverElement(k){j.Aq$.isDefined(this.leverGuideHand)&&(this.leverGuideHand.visible=k)}highlightLever(k,B,U,F,G){B.getTag()===U&&(this.leverGuideHand=un.o.highlightObjectOnLayer(this.game,F,G,null,k.content),this.enableLeverElement(!0))}isLeverLocked(k){return!(this.getCurrentQuestID()>14)&&1===this.getState(`lever${k+1}`)}toggleLever(k,B,U,F){if(this.isLeverLocked(B))this.sendSegmentEvents("World Object Failed",{object_type:Kn.u_.LeverSwitch,fail_reason:Kn.kN.QuestNotComplete});else{const G=K.q.instance.prodigy.event.create();G.validPath(k.user,k.path,F.x,F.y,!1),G.function(this.faceLever.bind(this,k)),G.enableInput(!1),G.function(this.bonfireSetStates.bind(this,U,B)),G.shake(0,3e3,10,"v"),G.enableInput(!0),G.function(k.process.bind(k)),G.start(),this.sendSegmentEvents("World Object Used",{object_type:Kn.u_.LeverSwitch})}}faceLever(k){k.user.isFacingLeft()&&k.user.flip()}bonfireSetStates(k,B){const U=1!==this.getState(`lever${B+1}`),F=U?B+1:B;this.setState("lever1",null),this.setState("lever2",null),this.setState("lever3",null);for(let G=0;G0;k.enableLayerID(0,!F),k.enableLayerID(1,F&&!G),k.enableLayerID(2,F)}}cleanup(){this.leverGuideHand&&(this.leverGuideHand.destroy(),this.leverGuideHand=null),super.cleanup()}sendSegmentEvents(k,B){const U=K.q.instance.prodigy.gameContainer.get("c47-20b6");switch(k){case"World Object Discovered":U.gameWorld.sendWorldObjectDiscoveredEvent(B);break;case"World Object Used":U.gameWorld.sendWorldObjectUsedEvent(B);break;case"World Object Failed":U.gameWorld.sendWorldObjectUsedFailedEvent(B)}}}class yS extends kT{constructor(k,B){super(k,"A1","MAP_BONFIRE_SPIRE_VOLCANO_ENTRANCE",865,482,["bonfire_spire_hard-B1"],B),this.leverNumber=1,this.battleBG="battle-bonfire-outside"}}class _S extends kT{constructor(k,B){super(k,"A4","MAP_BONFIRE_SPIRE_PITFALL_TERRACE",1020,400,["bonfire_spire_hard-B4"],B.concat(q._.Npc_sprite_slime_worker_json)),this.wasInsideTriggerLastFrame=!1,this.leverNumber=3,this.battleBG="battle-bonfire-outside"}}class ES extends kT{constructor(k,B){super(k,"B1","MAP_BONFIRE_SPIRE_VOLCANO_VILLAGE",160,307,["bonfire_spire_hard-C1","bonfire_spire_hard-B2","bonfire_spire_hard-A1"],B.concat([q._.Npc_sprite_slurpy_json,q._.Npc_sprite_slime_queen_json,q._.Npc_sprite_slime_guard_json,q._.Npc_sprite_merchant_json,J.Q.Spine_npc_slurpy_json])),this.questNPC=null,this.leverNumber=1,this.battleBG="battle-bonfire-inside"}}class wS extends kT{constructor(k,B){super(k,"B2","MAP_BONFIRE_SPIRE_VOLCANIC_CAVERN",180,117.5,["bonfire_spire_hard-B1","bonfire_spire_hard-C3","bonfire_spire_hard-B4"],B),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}}class TS extends kT{constructor(k,B){super(k,"B4","MAP_BONFIRE_SPIRE_VOLCANO_JUNCTION",1080,117.5,["bonfire_spire_hard-A4","bonfire_spire_hard-B2","bonfire_spire_hard-C4","bonfire_spire_hard-B5"],B),this.leverNumber=3,this.battleBG="battle-bonfire-inside"}}class SS extends kT{constructor(k,B){super(k,"B5","MAP_BONFIRE_SPIRE_RED_HOT_RIVER",150,210,["bonfire_spire_hard-B4","bonfire_spire_hard-C6"],B),this.battleBG="battle-bonfire-inside"}}class AS extends kT{constructor(k,B){super(k,"C1","MAP_BONFIRE_SPIRE_FIREWATCH_ROAD",180,417.5,["bonfire_spire_hard-D1","bonfire_spire_hard-D2","bonfire_spire_hard-B1"],B),this.leverNumber=1,this.battleBG="battle-bonfire-inside"}}class CS extends kT{constructor(k,B){super(k,"C2","MAP_BONFIRE_SPIRE_PALM_PATH",1100,597.5,["bonfire_spire_hard-C3"],B),this.leverNumber=2,this.battleBG="battle-bonfire-outside"}}class OS extends kT{constructor(k,B){super(k,"C3","MAP_BONFIRE_SPIRE_SLIME_SHANTY",160,417.5,["bonfire_spire_hard-C2","bonfire_spire_hard-D3","bonfire_spire_hard-B2"],B),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}}class IS extends kT{constructor(k,B){super(k,"C4","MAP_BONFIRE_SPIRE_LAVA_PITS",110,397.5,["bonfire_spire_hard-D4","bonfire_spire_hard-B4"],B),this.leverNumber=3,this.battleBG="battle-bonfire-inside"}}class DS extends kT{constructor(k,B){super(k,"C6","MAP_BONFIRE_SPIRE_THRONE_ROOM_ENTRANCE",250,400,["bonfire_spire_hard-D5","bonfire_spire_hard-D6","bonfire_spire_hard-B5"],B.concat([q._.Npc_sprite_cebollini_json,q._.Npc_sprite_slime_guard_json])),this.battleBG="battle-bonfire-lava"}}class RS extends kT{constructor(k,B){super(k,"D1","MAP_BONFIRE_SPIRE_PALM_TERRACE",260,382.5,["bonfire_spire_hard-C1"],B),this.leverNumber=1,this.battleBG="battle-bonfire-outside"}}class PS extends kT{constructor(k,B){super(k,"D2","MAP_BONFIRE_SPIRE_VOLCANIC_SANCTUM",180,292.5,["bonfire_spire_hard-C1"],B),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}}class MS extends kT{constructor(k,B){super(k,"D3","MAP_BONFIRE_SPIRE_MOLTEN_ENCLAVE",180,377.5,["bonfire_spire_hard-C3"],B),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}}class NS extends kT{constructor(k,B){super(k,"D4","MAP_BONFIRE_SPIRE_OUTER_SLIMEBURBIA",220,467.5,["bonfire_spire_hard-C4"],B.concat([q._.Zone_lamplight_json])),this.leverNumber=3,this.battleBG="battle-bonfire-outside"}}class xS extends kT{constructor(k,B){super(k,"D5","MAP_BONFIRE_SPIRE_THRONE_ROOM",220,480,["bonfire_spire_hard-E6","bonfire_spire_hard-C6"],B.concat([q._.Npc_sprite_slurpy_json,q._.Npc_sprite_cebollini_json,q._.Npc_sprite_slime_worker_json,J.Q.Spine_npc_slimeguard_json,J.Q.Spine_npc_slimequeen_json])),this.queen=null,this.gaurd=null,this.battleBG="battle-bonfire-inside"}}class LS extends kT{constructor(k,B){super(k,"D6","MAP_BONFIRE_SPIRE_GARDEN_GETAWAY",330,510,["bonfire_spire_hard-C6"],B.concat([q._.Zone_lamplight_json,q._.Npc_sprite_cebollini_json])),this.battleBG="battle-bonfire-lava"}}class kS extends kT{constructor(k,B){super(k,"E5","MAP_BONFIRE_SPIRE_FIERY_ALCOVE",115,510,["bonfire_spire_hard-E6"],B.concat([q._.Zone_lamplight_json])),this.battleBG="battle-bonfire-inside"}}class BS extends kT{constructor(k,B){super(k,"E6","MAP_BONFIRE_SPIRE_ROYAL_KITCHEN",180,547.5,["bonfire_spire_hard-E5","bonfire_spire_hard-D5"],B.concat([q._.Npc_sprite_cebollini_json])),this.battleBG="battle-bonfire-inside"}}class US extends mS{constructor(k){super(k),this._assets=[Rn.t.Tileset_bonfire_png,Rn.t.Tileset_cloud_png,Rn.t.Tileset_cloud_new_png,Rn.t.Tileset_volcano_new_png,Rn.t.Tileset_generic_png,q._.Npc_sprite_wizard_json,q._.Zone_bonfire_json,Rn.t.Tileset_collisions_png,X.V.Bgm_bonfire_spire],this.questManagerIdentifier="c82-7848",this.ID=hn.A_.BONFIREHARD,this.defaultOnFaint="bonfire_spire_hard-B1",this.questHub="bonfire_spire_hard-B1",this.zoneIndex=pT.P.BonfireHard,this.difficultyMode=ri.i.Hard,this.states=["chest1","chest2","chest3","chest4","chest5","chest6","chestGuardian","wizard1","wizard2","lever1","lever2","lever3","turnip1","turnip2","minigametut",Zu.PIPPET_ENCOUNTER,Zu.PIPPET_REMATCH,Zu.PIPPET_DEFEATED],this.monsters=[],this.maps={A1:new yS(this,this._assets),A4:new _S(this,this._assets),B1:new ES(this,this._assets),B2:new wS(this,this._assets),B4:new TS(this,this._assets),B5:new SS(this,this._assets),C1:new AS(this,this._assets),C2:new CS(this,this._assets),C3:new OS(this,this._assets),C4:new IS(this,this._assets),C6:new DS(this,this._assets),D1:new RS(this,this._assets),D2:new PS(this,this._assets),D3:new MS(this,this._assets),D4:new NS(this,this._assets),D5:new xS(this,this._assets),D6:new LS(this,this._assets),E5:new kS(this,this._assets),E6:new BS(this,this._assets)},this.scenes={}}}var FS=U(83668);class GS extends Un.T{constructor(k,B){super(k,"DungeonHub","MAP_SHIVERCHILL_DUNGEON_HUB",810,480,[],B.concat([Rn.t.Tileset_icecave_new_png,Rn.t.Tileset_collisions_png,X.V.Bgm_icedungeon_inside,Rn.t.Tileset_generic_snow_png,q._.General_core_json])),this._menuIsOpen=!1}cleanup(){super.cleanup(),j.wa5.destroyActiveScene()}setup(k,B,U){super.setup(k,B,{});const F=j.wa5.getActiveScene().container,G=K.q.instance.prodigy,$=G.gameContainer.get("e20-0fb0").player.state.getDungeonState(FS.o,"crystal_caverns");F.bind("DungeonState").toConstantValue($),F.bind(j.t5G.AssetLoader).toConstantValue(G.gameContainer.get(j.t5G.AssetLoader)),F.bind("e20-0fb0").toConstantValue(G.gameContainer.get("e20-0fb0")),F.bind("Localization").toConstantValue(G.gameContainer.get(j.$Bt.LocalizationService)),this._menuIsOpen=!1,K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer.sprites.scale.x=-1,this.screen.addClickableArea(100,50,200,150,(()=>{this.caveClicked()}));const H=this.screen.background.addChild(K.q.instance.prodigy.create.sprite(0,0,q._.General_core_json,"area-pointer"));H.events.onInputDown.add(this.caveClicked,this),H.inputEnabled=!0,H.position.set(180,180),this.game.add.tween(H,this).to({y:H.y+25},400,j.GS3.Quadratic.InOut,!0,0,-1,!0)}caveClicked(){this._menuIsOpen||(this._menuIsOpen=!0,this.isRenderingToCanvas()?this.showDeviceWarning():this.showAdventureMap())}isRenderingToCanvas(){return j.W$e.instance.game.renderer.type===V.RENDERER_TYPE.CANVAS}showDeviceWarning(){const k=new bd.Z("BUTTON_OKAY_CAPITAL",this.showAdventureMap.bind(this),Jc.E.Medium,500,"WARNING","WARNING_DEVICE_PERFORMANCE_CRYSTAL_CAVERNS",void 0,void 0,void 0,Ei.l.ErrorDialogHeader);K.q.instance.prodigy.open.informationDialog(k)}showAdventureMap(){const k=K.q.instance.prodigy,B=k.gameContainer.get("e20-0fb0").player.state.getDungeonState(FS.o,"crystal_caverns");this._menuIsOpen=!0,k.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_DUNGEONS,ln.B.BREADCRUMB_STARTED_CRYSTAL_CAVERNS);const U=B.isRunStarted();U&&B.isValid()?k.open.adventureContinueRestart((()=>{this._menuIsOpen=!1})):(U&&B.resetRunData(),k.open.adventureMap(!1,(()=>{this._menuIsOpen=!1})))}}class jS extends vn.b{constructor(k){super(k),this.name="Crystal Caverns",this.ID=hn.A_.CRYSTALCAVERNS,this.battleBG="battle-shiverchill-inside",this.questHub="crystal_caverns-DungeonHub",this.bgmID=32,this.currency=15,this.zoneIndex=pT.P.None,this.maps={1:Ei.l.CrystalCaverns_Phase1,2:Ei.l.CrystalCaverns_Phase2,3:Ei.l.CrystalCaverns_Phase3,DungeonHub:new GS(this,[])}}teleport(k,B,U,F,G){K.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableCrystalCaverns",!0)?"DungeonHub"===k?super.teleport(k,B,U,F,G):this.teleportPrefabScene(k,B,U,F):K.q.instance.prodigy.world.it(WR.DEFAULT_ZONE)}sendCrystalCavernsSpawnEvent(){const k=K.q.instance.prodigy.gameContainer,B=k.get("c47-20b6"),U=k.get("e20-0fb0").player;B.playerMovementAndDiscovery.sendCrystalCavernsEnteredEvent(dn.W5.Spawn),U.kennel.petTeam.forEach((k=>{k&&B.playerMovementAndDiscovery.sendCrystalCavernsParticipantsEvent({name:k.getName()===U.getName()?"Player":k.getName(),type:k.getElement(),health:k.getCurrentHearts()})}))}getOnFaintData(){return{mapKey:K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.getDungeonState(FS.o,"crystal_caverns").getCurrentMap()}}}class $S{}$S.FLOOR_MAXIMUM=100;class HS extends Un.T{constructor(k,B){super(k,"A1","MAP_DARK_TOWER_ENTRANCE",200,400,["darktower-A2"],B)}setup(k,B,U={}){super.setup(k,B,U),new TT(k,B.content,900,360,{name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_MIRA_SHADE"),atlasGuid:q._.Npc_sprite_mira_json},(()=>{this.openTower()}));const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(Tn.J.shouldSuppressAd(F)&&F.isBlockedByDarkTowerMemberGate()){const k=K.q.instance.prodigy.create.sprite(900,184,q._.Ui_icons_json,"icon-medium-lockglow");k.anchor=new V.Point(.5,.5),this.screen.background.addChild(k),k.inputEnabled=!0,k.events.onInputDown.add((()=>{this.openTower()}))}this.zone.bgmID=3,F.heal()}openTower(){const k=K.q.instance.prodigy.gameContainer,B=k.get(j.$Bt.LocalizationService),U=k.get("e20-0fb0").player;let F=U.getTowerProgress();if(F=F-F%5+1,F>$S.FLOOR_MAXIMUM&&(F=$S.FLOOR_MAXIMUM),U.isBlockedByDarkTowerMemberGate()){const B={conversionFunnelName:Sn.o.FunnelEnterDarkTower,conversionFunnelMetadata:"towerBase"},U=Tn.J.showYouTubeMembershipAd(this.game,!0)?_n.R.Video:_n.R.Static,F=k.get("e20-0fb0").player;this.segment.purchase.sendFunnelStart({type:"Enter-Dark-Tower",category:"Zone-Lock",contentId:void 0,adType:U}),Tn.J.shouldSuppressAd(F)?K.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:900,yPosition:165,arrowXRelPos:.6,arrowDirection:Br.i.DOWN}):K.q.instance.prodigy.open.membershipInfo(null,B)}else{const k=K.q.instance.prodigy.dialogue.create();if(0===U.getTowerProgress()){for(let U=1;U<6;U++)k.setText(Object.assign(Object.assign({},HS.DIALOGUE[U]),{text:B.getText(HS.DIALOGUE[U].textKey)}));k.setText({text:B.getText("TOWER_PROMPT_START",F),face:0,yes:this.changeTeam.bind(this,F,void 0),audio:HS.AUDIO[0],type:Ti.fA.START})}else if(U.getTowerProgress()>99)for(let U=6;U<8;U++)k.setText(Object.assign(Object.assign({},HS.DIALOGUE[U]),{text:B.getText(HS.DIALOGUE[U].textKey)}));else k.setText({text:B.getText("TOWER_PROMPT_START_GOLD",F),face:0,yes:()=>{this.changeTeam(F,500)},audio:HS.AUDIO[0],type:Ti.fA.START});k.startDeprecated("mira")}}changeTeam(k,B){let U=!0;const F=K.q.instance.prodigy.gameContainer,G=F.get("e20-0fb0").player;if(j.Aq$.isDefined(B))if(G.getGold()>=B)G.changeGold(-500);else{const k=K.q.instance.prodigy.dialogue.create(),B={conversionFunnelName:Sn.o.FunnelEnterDarkTower,conversionFunnelMetadata:"insufficientCurrency"};if(!G.hasMembership()){const k=Tn.J.showYouTubeMembershipAd(this.game,!0)?_n.R.Video:_n.R.Static;this.segment.purchase.sendFunnelStart({type:"Enter-Dark-Tower-Insufficient-Currency",category:"Deprecate",contentId:void 0,adType:k})}const $=G.hasMembership()||Tn.J.shouldSuppressAd(G)?null:K.q.instance.prodigy.open.membershipInfo.bind(K.q.instance.prodigy.open,null,B);k.setText(Object.assign(Object.assign({},HS.DIALOGUE[8]),{text:F.get(j.$Bt.LocalizationService).getText(HS.DIALOGUE[8].textKey)})),k.startDeprecated("mira",null,$),U=!1}U&&this.toFloor(k,!0)}toFloor(k,B){if(!B)return;const U=k<100?"A2":"A3";this.zone.maps[U].floor=k,this.zone.maps[U].updateZoneNameFromCurrentFloor(),this.zone.maps[U].cleared=!1,K.q.instance.prodigy.world.it(`darktower-${U}`,260,550),this.zone.maps[U].sendSegmentEvent("Tower Run Started"),this.zone.maps[U].sendSegmentEvent("Tower Floor Started")}}HS.AUDIO=[{tag:Z.c.Voice_2,s:0,d:1}],HS.DIALOGUE=[{textKey:"DIALOGUE_MIRA_0",face:0,anim:4,audio:{tag:Z.c.Voice_2,s:0,d:1}},{textKey:"DIALOGUE_MIRA_1",face:0,anim:4,audio:{tag:Z.c.Voice_2,s:4,d:2}},{textKey:"DIALOGUE_MIRA_2",face:2,audio:{tag:Z.c.Voice_2,s:9,d:1}},{textKey:"DIALOGUE_MIRA_3",face:2},{textKey:"DIALOGUE_MIRA_4",face:1,anim:4,audio:{tag:Z.c.Voice_2,s:0,d:1}},{textKey:"DIALOGUE_MIRA_5",face:2,audio:{tag:Z.c.Voice_2,s:3,d:1}},{textKey:"DIALOGUE_MIRA_6",face:0,anim:4,audio:{tag:Z.c.Voice_2,s:4,d:2}},{textKey:"DIALOGUE_MIRA_7",face:0},{textKey:"DIALOGUE_MIRA_8",face:0,anim:1,audio:{tag:Z.c.Voice_2,s:0,d:1}}];class VS extends Ar.H{constructor(k,B,U,F,G){super(k,U),this.callback=null,this.mods=null,this.callback=G,this.mods=F,this.game.input.enabled=!1,B.user.setValidPath(B.path,B.user.x,B.user.y),K.q.instance.prodigy.effects.flashText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TOWER_CHANCE_WHEEL"),(()=>{this.createWheel()}))}close(){K.q.instance.prodigy.notifications.startTimer(!0),this.game.input.enabled=!0;this.game.add.tween(this,this).to({alpha:0},1e3,j.GS3.Linear.None).start().onTweenComplete.addOnce(this.callback,this)}createWheel(){K.q.instance.prodigy.notifications.clearNotifications(!0),this.game.broadcaster.broadcast(oi.Y1.HideHUD,oi.HG.HUD,[]);const k=K.q.instance.prodigy.create.sprite(0,0,q._.General_core_json,"overlay-small");k.width=this.game.world.width,k.height=this.game.world.height,k.alpha=.5,this.add(k),k.inputEnabled=!0;const B=this.game.width,U=this.game.height,F=K.q.instance.prodigy.create.sprite((B-490)/2,U/2-275,q._.Zone_tower_json,"wings");F.alpha=0,this.add(F),this.game.add.tween(F,this).to({alpha:1},300,j.GS3.Quadratic.Out).delay(600).start();const G=K.q.instance.prodigy.create.sprite(B/2,U/2,q._.Zone_tower_json,"wheel");G.anchor.set(.5,.5),G.scale.x=G.scale.y=0,this.add(G),this.game.add.tween(G.scale,this).to({x:1.2,y:1.2},400,j.GS3.Quadratic.Out).to({x:1,y:1},200,j.GS3.Quadratic.In).start();const $=K.q.instance.prodigy.create.sprite((B-196)/2,U/2-270,q._.Zone_tower_json,"pointer");$.alpha=0,this.add($);this.game.add.tween($,this).to({alpha:1},300,j.GS3.Quadratic.Out).delay(600).start().onTweenComplete.addOnce((()=>{this.startWheel(G)}),this)}startWheel(k){let B=Math.floor(10*Math.random());const U=36*B+18;this.game.add.tween(k,this).to({angle:2880-U},8e3,j.GS3.Cubic.Out).start().onTweenComplete.addOnce(this.showResult.bind(this,B),this),this.playSound(8e3,100),K.q.instance.prodigy.gameContainer.get("c47-20b6").economy.sendPrizeWheelSpunEvent(mn.U.PrizeWheel)}showResult(k){this.mods.revampRouletteNumber=k;let B="",U=0;const F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);0===k||6===k?(B=F.getText("TOWER_CHANCE_LOSE_HEARTS","10%"),U=-.1):1===k||5===k?(B=F.getText("TOWER_CHANCE_GAIN_HEARTS","10%"),U=.1):2===k?(B=F.getText("TOWER_CHANCE_LOSE_HEARTS","20%"),U=-.2):7===k?(B=F.getText("TOWER_CHANCE_GAIN_HEARTS","20%"),U=.2):3===k?(B=F.getText("TOWER_CHANCE_DAMAGE_INCREASED"),this.mods.dmgMod=.2):8===k?(B=F.getText("TOWER_CHANCE_DAMAGE_REDUCED"),this.mods.dmgMod=-.2):9===k?(B=F.getText("TOWER_CHANCE_DOUBLE_STARS"),this.mods.starMod=2):4===k&&(B=F.getText("TOWER_CHANCE_REDUCED_ORDER"));const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.petTeam;for(let $=0;$0&&(G[$].changeCurrentHeartsPercent(U),G[$].getCurrentHearts()<=0&&G[$].changeCurrentHeartsPercent(.1));K.q.instance.prodigy.effects.flashText(B,(()=>{this.close()}))}playSound(k,B){if(k<=0||!j.Aq$.isDefined(this.game))return;K.q.instance.prodigy.audio.playSFX(19,"tick");const U=B+9e-7*Math.pow(B,3);setTimeout(this.playSound.bind(this,k-U,U),B)}}class WS extends Un.T{constructor(k,B,U,F,G,j,$){super(k,B,U,F,G,j,$.concat([Ei.l.Overlay_difficulty_hard,Ei.l.Overlay_difficulty_expert])),this.floor=void 0,this.cleared=!1,this.exitAreaEvent=null,this.ball=null,this.lockSprite=null,this.mods=null,this._floorsComplete=0}init(k,B,U,F){const G=this.floor%5==0;return this.enableLayerID(0,G),this.enableLayerID(1,!G),this.enableLayerID(2,G&&!this.cleared),this.enableLayerID(3,!G&&!this.cleared),this.enableLayerID(4,G&&this.cleared),this.enableLayerID(5,!G&&this.cleared),super.init(k,B,U,F)}cleanup(){this.ball&&(this.ball.destroy(),this.ball=null),this.lockSprite&&(this.lockSprite.destroy(),this.lockSprite=null),this.mods=null,super.cleanup()}setup(k,B,U={}){super.setup(k,B,U),this.zone.bgmID=4;let F=this.isOnTopFloorAndNotComplete();const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let $=!1;if(this.cleared){let U=!1;for(let k=0;k{this.onFloorComplete()}),null,"dark-tower")}),k.startDeprecated("mira"),U=!0}}U||this.onFloorComplete(),Tn.J.shouldSuppressAd(G)&&this.floor===Vt.s.get("GameConstants.Tower.MAX_FREE_MEMBER_FLOOR")?$=!0:this.floor<$S.FLOOR_MAXIMUM&&this.addAreaEvent(k,B,{x:900,y:200,w:120,h:80},null,null,null,(()=>{this.toFloor(this.floor+1)}),LT.K.UP)}else if(this.floor<$S.FLOOR_MAXIMUM){this.ball=K.q.instance.prodigy.create.sprite(.5*this.game.width,.5*this.game.height,q._.Zone_tower_json,"orb"),this.ball.alpha=.5,this.ball.inputEnabled=!0,this.ball.anchor.set(.5,1),this.ball.events.onInputDown.add(this.battle.bind(this,B,this.ball),this),B.content.addChild(this.ball),this.game.add.tween(this.ball,this).to({y:this.ball.y+10},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0);const k=K.q.instance.prodigy.create.font(B.content,590,295,`${this.floor}`,{size:40,width:100,align:"center"});this.game.add.tween(k,this).to({y:k.y+10},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0);const U=K.q.instance.prodigy.create.sprite(847,65,q._.Zone_tower_json,"barrier"),F=K.q.instance.prodigy.create.sprite(953,65,q._.Zone_tower_json,"barrier");F.scale.x=-1,U.inputEnabled=!0,U.events.onInputDown.add((()=>{this.blockDoor()})),U.alpha=.8,this.game.add.tween(U,this).to({alpha:.3},1500,j.GS3.Linear.None,!0,0,1e4,!0),B.background.addChild(U),F.inputEnabled=!0,F.events.onInputDown.add((()=>{this.blockDoor()})),F.alpha=.8,this.game.add.tween(F,this).to({alpha:.3},1500,j.GS3.Linear.None,!0,0,1e4,!0),B.background.addChild(F)}if(this.floor%5==0){let k={x:810,y:600};if(this.floor<$S.FLOOR_MAXIMUM){const U=this.cleared?"-noglow":"",F=B.content.addChild(K.q.instance.prodigy.create.sprite(400,400,q._.Zone_tower_json,`statue${U}`)),G=B.content.addChild(K.q.instance.prodigy.create.sprite(880,400,q._.Zone_tower_json,`statue${U}`));F.anchor.set(.5,1),G.anchor.set(.5,1),F.scale.x=-1,k={x:750,y:310}}new TT(this.game,B.content,k.x,k.y,{name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_MIRA_SHADE"),atlasGuid:q._.Npc_sprite_mira_json},(()=>{this.onMiraClick(B)})).highlight(F,-80,-150)}if(Tn.J.shouldSuppressAd(G)&&this.floor===Vt.s.get("GameConstants.Tower.MAX_FREE_MEMBER_FLOOR")){this.lockSprite=K.q.instance.prodigy.create.sprite(900,164,q._.Ui_icons_json,"icon-medium-lockglow");const k=K.q.instance.prodigy.create.image(0,0,void 0,0,V.Texture.WHITE);k.x=850,k.y=65,k.width=100,k.height=175,k.alpha=0,k.inputEnabled=$,this.screen.background.addChild(k),this.lockSprite.anchor.set(.5,.5),this.screen.background.addChild(this.lockSprite),k.events.onInputDown.add((()=>this.nonMemberTeleportToEntrance()))}}handleLeaving(k){if(this.game){let B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getTowerProgress();B=B-B%5+1;const U=K.q.instance.prodigy.dialogue.create();U.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(B<$S.FLOOR_MAXIMUM?"TOWER_PROMPT_LEAVE":"TOWER_PROMPT_COMPLETE_LEAVE",B),face:3,anim:1,audio:zS.AUDIO[1],type:Ti.fA.LEAVE,yes:()=>{k()},preserveNextEvent:!0}),U.startDeprecated("mira")}else j.VyI.log("handleLeaving called after DarktowerMap has been destroyed",j.$bb.Warning)}toBase(){let k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getTowerProgress();if(k=k-k%5+1,k<$S.FLOOR_MAXIMUM){const B=K.q.instance.prodigy.dialogue.create();B.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TOWER_PROMPT_LEAVE",k),face:3,anim:1,audio:zS.AUDIO[1],type:Ti.fA.LEAVE,yes:()=>{this.onLeavingDarkTower(850,380)},no:()=>{this.moveAbove()}}),B.startDeprecated("mira")}else K.q.instance.prodigy.world.it("darktower-A1",850,380)}updateZoneNameFromCurrentFloor(){this.zoneName=`darktower-${this.floor<$S.FLOOR_MAXIMUM?"A2-":"A3-"}-${this.floor}`}moveAbove(){if(!this.exitAreaEvent)return;const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer;k.setValidPath(this.screen.path,k.x,this.exitAreaEvent.y-k.height/2)}onLeavingDarkTower(k,B){this._floorsComplete>0&&(this._floorsComplete=0),j.Aq$.isDefined(k)&&j.Aq$.isDefined(B)&&K.q.instance.prodigy.world.it("darktower-A1",k,B),this.sendSegmentEvent("Tower Run Completed")}isOnTopFloorAndNotComplete(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return this.floor===$S.FLOOR_MAXIMUM&&k.getTowerProgress()<$S.FLOOR_MAXIMUM}onMiraClick(k){this.isOnTopFloorAndNotComplete()?this.battle(k):this.npcDialogue()}onFloorComplete(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.completeTower(this.floor),this.sendSegmentEvent("Tower Floor Completed");const B={conversionFunnelName:Sn.o.FunnelEnterDarkTower,conversionFunnelMetadata:"previewEnd"};if(k.isBlockedByDarkTowerMemberGate()){const k=yn.P.shouldUseUnifiedConversionFlow(Sn.o.FunnelEnterDarkTower)?_n.R.UnifiedConversionFlow:Tn.J.showYouTubeMembershipAd(this.game,!0)?_n.R.Video:_n.R.Static;this.segment.purchase.sendFunnelStart({type:"Enter-Dark-Tower",category:"Zone-Lock",contentId:void 0,adType:k,adVersion:yn.P.getAdVersion(Sn.o.FunnelEnterDarkTower)}),this.sendSegmentEvent("Tower Run Completed")}k.isBlockedByDarkTowerMemberGate()&&!Tn.J.shouldSuppressAd(k)&&K.q.instance.prodigy.open.membershipInfo((()=>{k.isBlockedByDarkTowerMemberGate()&&K.q.instance.prodigy.world.it("darktower-A1",200,400)}),B),this._floorsComplete++,this.floor===$S.FLOOR_MAXIMUM&&this.sendSegmentEvent("Tower Run Completed")}blockDoor(){const k=K.q.instance.prodigy.dialogue.create();k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TOWER_PROMPT_MUST_DEFEAT"),face:3,anim:1,audio:zS.AUDIO[1]}),k.startDeprecated("mira")}nonMemberTeleportToEntrance(){const k=new Ti.rD(this.game);k.addEvents([{dialogueData:k.dataProvider.get(1028),blockInput:!0},{callback:()=>K.q.instance.prodigy.world.it("darktower-A1",200,400)}]),k.start()}setPlayerAsOpponent(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U={level:$.get(B.data,"level",100).toString()},F=Tn.J.copyObject(B.appearance.getData());F.name=B.getName();const G={data:U,appearance:F,equipment:B.equipment.getData()};k.wizards=[G],k.pets=[];const H=B.kennel.petTeam;for(let $=0;${const B=this.floor<$S.FLOOR_MAXIMUM?"A2":"A3";this.zone.maps[B].cleared=!0,K.q.instance.prodigy.world.it(`darktower-${B}`,k.x,k.y)};K.q.instance.prodigy.battle.battleStats.type="DarkTowerBattle",K.q.instance.prodigy.battle.start(this.mods,(()=>{this.onLeavingDarkTower(200,400)}),k.bind(this,this.screen.user.position),this.onLeavingDarkTower.bind(this),"darktower-A1")}toFloor(k){if(k>$S.FLOOR_MAXIMUM)return void this.toBase();const B=k<$S.FLOOR_MAXIMUM?"A2":"A3";this.zone.maps[B].floor=k,this.zone.maps[B].updateZoneNameFromCurrentFloor(),this.zone.maps[B].cleared=!1,K.q.instance.prodigy.world.it(`darktower-${B}`,260,550),this.sendSegmentEvent("Tower Floor Started")}sendSegmentEvent(k){const B=this.segment.playerMovementAndDiscovery,U=dn.s2.DarkTower,F=this.floor>=$S.FLOOR_MAXIMUM;switch(k){case"Tower Run Completed":B.sendTowerRunCompletedEvent(U,F);break;case"Tower Floor Completed":B.sendTowerRunFloorCompletedEvent({tower_type:U,floor_id:this.floor,floor_type:dn.ss.Normal});break;case"Tower Floor Started":B.sendTowerRunFloorStartedEvent({tower_type:U,floor_id:this.floor,floor_type:dn.ss.Normal});break;case"Tower Run Started":B.sendTowerRunStartedEvent(U,F)}}}class qS extends WS{constructor(k,B){super(k,"A2","MAP_DARK_TOWER_FLOOR",260,550,["darktower-A1","darktower-A3"],B)}setup(k,B,U={}){super.setup(k,B,U),this.exitAreaEvent=this.addAreaEvent(k,B,{x:240,y:640,w:160,h:80,canReTrigger:!0},null,null,null,(()=>{this.toBase()}),LT.K.DOWN)}getName(){return`${super.getName()}${this.floor}`}}class KS extends WS{constructor(k,B){super(k,"A3","MAP_DARK_TOWER_SHOWDOWN",260,550,["darktower-A2"],B)}setup(k,B,U={}){super.setup(k,B,U),this.exitAreaEvent=this.addAreaEvent(k,B,{x:640,y:280,w:160,h:160,rect:!1,canReTrigger:!0},null,null,null,(()=>{this.toBase()}),LT.K.DOWN),B.addClickableMoveEvent(560,200,160,160,640,340)}updateZoneNameFromCurrentFloor(){super.updateZoneNameFromCurrentFloor();const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.zoneName=`${this.zoneName}-${k.userID}`}}class zS extends vn.b{GetOpponent(k){if(49===k){const B=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),U=B.getValue("grandoffMaxHP",Vt.s.get("GameConstants.Grandoff.MAX_HP"));zS.OPPONENTS[k].boss.maxHP=null===U?void 0:parseInt(U,10),zS.OPPONENTS[k].difficulty=parseInt(B.getValue("grandoffDifficulty",Vt.s.get("GameConstants.Grandoff.DIFFICULTY")),10)}else if(99===k){const B=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),U=B.getValue("miraMaxHP",Vt.s.get("GameConstants.Mira.MAX_HP"));zS.OPPONENTS[k].boss.maxHP=null===U?void 0:parseInt(U,10),zS.OPPONENTS[k].difficulty=parseInt(B.getValue("miraDifficulty",Vt.s.get("GameConstants.Mira.DIFFICULTY")),10)}return zS.OPPONENTS[k]}constructor(k){super(k),this.difficultyModeAgnostic=!0,this._currentMap=null,this.name="Dark Tower",this.ID=hn.A_.DARKTOWER,this.battleBG="battle-tower-inside",this.defaultOnFaint="darktower-A1",this.questHub="darktower-A1",this.zoneIndex=pT.P.Darktower,this.states=[];const B=[Rn.t.Tileset_darktower_png,Rn.t.Tileset_forest_new_png,Rn.t.Tileset_generic_new_png,Rn.t.Tileset_collisions_png,Rn.t.Tileset_forest_new_png,q._.Npc_sprite_mira_json,X.V.Bgm_space];this.maps={A1:new HS(this,B),A2:new qS(this,B),A3:new KS(this,B)}}handleLeaving(k,B){var U;const F=K.q.instance.prodigy.world.getCurrentMap();k!==In.j.mapTeleport?"darktower-A1"===F?super.handleLeaving(k,B):this._currentMap.handleLeaving(B):("darktower-A1"!==F&&(null===(U=this._currentMap)||void 0===U||U.sendSegmentEvent("Tower Run Completed")),super.handleLeaving(k,B))}teleport(k,B,U,F,G={}){this._currentMap=this.maps[k],j.Aq$.isDefined(this.maps[k].floor)?super.teleport(k,260,550,F,G):"A1"!==k?super.teleport("A1",200,400,F,G):super.teleport("A1",B,U,F,G)}getOnFaintData(){return{mapKey:this.defaultOnFaint}}}zS.AUDIO=[{tag:Z.c.Voice_2,s:0,d:1},{tag:Z.c.Voice_2,s:1,d:1},{tag:Z.c.Voice_2,s:2,d:1},{tag:Z.c.Voice_2,s:3,d:1},{tag:Z.c.Voice_2,s:4,d:2},{tag:Z.c.Voice_2,s:6,d:1},{tag:Z.c.Voice_2,s:7,d:2},{tag:Z.c.Voice_2,s:9,d:1}],zS.REWARDS=[{floor:10,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:zS.AUDIO[6]}]},{floor:20,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:zS.AUDIO[6]}]},{floor:30,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:zS.AUDIO[6]}]},{floor:40,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:zS.AUDIO[6]}]},{floor:50,reward:[{type:"gold",N:1e3}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:zS.AUDIO[6]}]},{floor:60,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:zS.AUDIO[6]}]},{floor:70,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:zS.AUDIO[6]}]},{floor:80,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:zS.AUDIO[6]}]},{floor:90,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:zS.AUDIO[6]}]},{floor:100,reward:[{type:"outfit",ID:38},{type:"hat",ID:42},{type:"weapon",ID:68}],text:[{textKey:"DIALOGUE_MIRA_DEFEAT_0",face:3,audio:zS.AUDIO[3]},{textKey:"DIALOGUE_MIRA_DEFEAT_1",face:3},{textKey:"DIALOGUE_MIRA_DEFEAT_2",face:1,audio:zS.AUDIO[6]},{textKey:"DIALOGUE_MIRA_DEFEAT_3",face:2},{textKey:"DIALOGUE_MIRA_DEFEAT_4",face:1,audio:zS.AUDIO[0]}]}],zS.DIALOGUE=[[{textKey:"DIALOGUE_MIRA_9",face:0,audio:zS.AUDIO[2]}],[{textKey:"DIALOGUE_MIRA_10",face:2},{textKey:"DIALOGUE_MIRA_11",face:1,audio:zS.AUDIO[0]}],[{textKey:"DIALOGUE_MIRA_12",face:0},{textKey:"DIALOGUE_MIRA_13",face:0,audio:zS.AUDIO[0]}],[{textKey:"DIALOGUE_MIRA_14",face:2},{textKey:"DIALOGUE_MIRA_15",face:1}],[{textKey:"DIALOGUE_MIRA_16",face:0,audio:zS.AUDIO[6]}],[{textKey:"DIALOGUE_MIRA_17",face:2},{textKey:"DIALOGUE_MIRA_18",face:1,audio:zS.AUDIO[0]}],[{textKey:"DIALOGUE_MIRA_19",face:2},{textKey:"DIALOGUE_MIRA_20",face:2,audio:zS.AUDIO[0]}],[{textKey:"DIALOGUE_MIRA_21",face:1},{textKey:"DIALOGUE_MIRA_22",face:2,audio:zS.AUDIO[1]}],[{textKey:"DIALOGUE_MIRA_23",face:2},{textKey:"DIALOGUE_MIRA_24",face:0}],[{textKey:"DIALOGUE_MIRA_25",face:2,audio:zS.AUDIO[1]},{textKey:"DIALOGUE_MIRA_26",face:0,audio:zS.AUDIO[2]}],[{textKey:"DIALOGUE_MIRA_27",face:3,audio:zS.AUDIO[3]}],[{textKey:"DIALOGUE_MIRA_28",face:2},{textKey:"DIALOGUE_MIRA_29",face:1,audio:zS.AUDIO[0]}],[{textKey:"DIALOGUE_MIRA_30",face:2},{textKey:"DIALOGUE_MIRA_31",face:2}],[{textKey:"DIALOGUE_MIRA_32",face:2},{textKey:"DIALOGUE_MIRA_33",face:2}],[{textKey:"DIALOGUE_MIRA_34",face:2},{textKey:"DIALOGUE_MIRA_35",face:1}],[{textKey:"DIALOGUE_MIRA_36",face:1,audio:zS.AUDIO[2]}],[{textKey:"DIALOGUE_MIRA_37",face:0,audio:zS.AUDIO[1]}],[{textKey:"DIALOGUE_MIRA_38",face:3},{textKey:"DIALOGUE_MIRA_39",face:3,audio:zS.AUDIO[3]}],[{textKey:"DIALOGUE_MIRA_40",face:3},{textKey:"DIALOGUE_MIRA_41",face:3,audio:zS.AUDIO[2]}],[{textKey:"DIALOGUE_MIRA_42",face:3,audio:zS.AUDIO[1]},{textKey:"DIALOGUE_MIRA_43",face:3},{textKey:"DIALOGUE_MIRA_44",face:0,audio:zS.AUDIO[7]},{textKey:"DIALOGUE_MIRA_45",face:1,audio:zS.AUDIO[0]},{textKey:"DIALOGUE_MIRA_46",face:3,audio:zS.AUDIO[2]}]],zS.OPPONENTS=[{pets:[{ID:99,level:5}]},{pets:[{ID:102,level:5}]},{pets:[{ID:100,level:5}]},{pets:[{ID:103,level:5}]},{pets:[{ID:101,level:5},{ID:104,level:5}]},{pets:[{ID:31,level:10}]},{pets:[{ID:55,level:10}]},{pets:[{ID:60,level:10}]},{pets:[{ID:29,level:10}]},{pets:[{ID:92,level:10},{ID:93,level:10}]},{pets:[{ID:27,level:15}]},{pets:[{ID:45,level:15}]},{pets:[{ID:48,level:15}]},{pets:[{ID:96,level:15}]},{pets:[{ID:28,level:15},{ID:49,level:15}]},{pets:[{ID:4,level:20}]},{pets:[{ID:10,level:20}]},{pets:[{ID:5,level:20}]},{pets:[{ID:11,level:20}]},{pets:[{ID:6,level:20},{ID:12,level:20}]},{pets:[{ID:1,level:25}]},{pets:[{ID:52,level:25}]},{pets:[{ID:2,level:25}]},{pets:[{ID:53,level:25}]},{pets:[{ID:3,level:25},{ID:54,level:25}]},{pets:[{ID:78,level:30}]},{pets:[{ID:46,level:30}]},{pets:[{ID:40,level:30}]},{pets:[{ID:79,level:30}]},{pets:[{ID:80,level:30},{ID:47,level:30},{ID:50,level:30}]},{pets:[{ID:94,level:35}]},{pets:[{ID:85,level:35}]},{pets:[{ID:82,level:35}]},{pets:[{ID:76,level:35}]},{pets:[{ID:35,level:35},{ID:36,level:35},{ID:37,level:35}]},{pets:[{ID:87,level:40}]},{pets:[{ID:99,level:40}]},{pets:[{ID:94,level:40}]},{pets:[{ID:102,level:40}]},{pets:[{ID:95,level:40},{ID:80,level:40},{ID:23,level:40}]},{pets:[{ID:16,level:45}]},{pets:[{ID:47,level:45}]},{pets:[{ID:40,level:45}]},{pets:[{ID:80,level:45}]},{pets:[{ID:62,level:45},{ID:26,level:45},{ID:44,level:45}]},{pets:[{ID:63,level:50}]},{pets:[{ID:66,level:50}]},{pets:[{ID:69,level:50}]},{pets:[{ID:72,level:50}]},{boss:{ID:1,level:50,element:"fire",attacks:[56,57,59,60],maxHP:12e3,name:"Grandoff",spriteOffsetY:80,battleOffsetX:80,starBonus:40,difficulty:3}},{pets:[{ID:23,level:55}]},{pets:[{ID:46,level:56}]},{pets:[{ID:23,level:57}]},{pets:[{ID:46,level:58}]},{pets:[{ID:46,level:60},{ID:23,level:60},{ID:47,level:60}]},{pets:[{ID:75,level:65}]},{pets:[{ID:78,level:66}]},{pets:[{ID:81,level:67}]},{pets:[{ID:84,level:68}]},{pets:[{ID:80,level:70},{ID:83,level:70},{ID:86,level:70}]},{pets:[{ID:43,level:75}]},{pets:[{ID:12,level:76}]},{pets:[{ID:54,level:77}]},{pets:[{ID:6,level:78}]},{pets:[{ID:58,level:80},{ID:25,level:80},{ID:61,level:80}]},{pets:[{ID:75,level:85}]},{pets:[{ID:78,level:86}]},{pets:[{ID:81,level:87}]},{pets:[{ID:84,level:88}]},{pets:[{ID:31,level:90},{ID:33,level:90},{ID:31,level:90}]},{pets:[{ID:63,level:50},{ID:64,level:85}]},{pets:[{ID:66,level:55},{ID:67,level:85}]},{pets:[{ID:69,level:60},{ID:70,level:85}]},{pets:[{ID:72,level:65},{ID:73,level:85}]},{pets:[{ID:2,level:95},{ID:5,level:95},{ID:8,level:95},{ID:11,level:95}]},{pets:[{ID:1,level:95}]},{pets:[{ID:4,level:96}]},{pets:[{ID:7,level:97}]},{pets:[{ID:10,level:98}]},{wizards:[{data:{level:50},appearance:{name:"Frozine",hair:{style:11,color:9},skinColor:1,eyeColor:13},equipment:{hat:37,outfit:33,weapon:63}},{data:{level:50},appearance:{name:"Thundane",hair:{style:19,color:16},skinColor:2,eyeColor:9},equipment:{hat:8,outfit:24,weapon:23}},{data:{level:50},appearance:{name:"Sprout",hair:{style:7,color:8},skinColor:3,eyeColor:6},equipment:{hat:33,outfit:29,weapon:24}},{data:{level:50},appearance:{name:"Charcole",hair:{style:18,color:6},skinColor:2,eyeColor:3},equipment:{hat:11,outfit:8,weapon:64}},{data:{level:50},appearance:{name:"Pounce",hair:{style:23,color:5},skinColor:4,eyeColor:14},equipment:{hat:32,outfit:31,weapon:60}}]},{pets:[{ID:38,level:100}]},{pets:[{ID:87,level:100}]},{pets:[{ID:39,level:100}]},{pets:[{ID:72,level:100}]},{pets:[{ID:43,level:100},{ID:26,level:100,evolve:[{ID:25,lvl:53}]},{ID:44,level:100,evolve:[{ID:43,lvl:43}]},{ID:61,level:100}]},{pets:[{ID:57,level:100}]},{pets:[{ID:61,level:100}]},{pets:[{ID:15,level:100}]},{pets:[{ID:98,level:100}]},{},{pets:[{ID:49,level:100}]},{pets:[{ID:50,level:100}]},{pets:[{ID:54,level:100}]},{pets:[{ID:39,level:100,evolve:[{ID:38,lvl:50}]}]},{pets:[{ID:97,level:100},{ID:89,level:100,evolve:[{ID:87,lvl:50},{ID:88,lvl:55}]},{ID:12,level:100,evolve:[{ID:11,lvl:55}]},{ID:42,level:100,evolve:[{ID:40,lvl:58},{ID:41,lvl:60}]}]},{pets:[{ID:63,level:50},{ID:66,level:50},{ID:69,level:50},{ID:72,level:50}]},{pets:[{ID:64,level:75},{ID:67,level:75},{ID:70,level:75},{ID:73,level:75}]},{pets:[{ID:65,level:100},{ID:68,level:100},{ID:71,level:100},{ID:74,level:100}]},{pets:[{ID:63,level:50},{ID:66,level:50},{ID:69,level:50},{ID:72,level:50}]},{boss:{ID:2,level:100,element:"wizard",attacks:[49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86],maxHP:25e3,name:"Mira Shade",spriteOffsetY:100,spriteOffsetX:20,difficulty:3}}];var YS=U(97447),QS=U(42448);class XS extends $n.Z{constructor(k,B){super(k,"A1",B.concat([J.Q.Spine_npc_noot_json,Ei.l.RiftRunPortal])),this._noot=null}setup(k,B,U){super.setup(k,B,U),this._noot=new Zw.p(k,"NPC_NAME_NOOT",J.Q.Spine_npc_noot_json,Kn.ac.QuestGiver,B.content,0,0,"idle"),this._noot.position.x=B.user.position.x=QS.N3.location.x,this._noot.position.y=B.user.position.y=QS.N3.location.y,this._noot.alpha=0,B.user.alpha=0,YS.j.addPortalToScreen(this.screen,QS.N3.location.x,QS.N3.location.y).catch(j.RQr.createHandler("PostFirstRift: Failed to load the Rifts portal"))}start(k,B){const U=Object.create(null,{start:{get:()=>super.start}});return(0,G.sH)(this,void 0,void 0,(function*(){U.start.call(this,k,B);try{B.user.faceToward(0),this._noot.faceToward(0);const k=[];k.push((0,bc.eK)(B.user,{x:YS.j.PLAYER_SPAWN_LOCATION_X,y:YS.j.PLAYER_SPAWN_LOCATION_Y})),yield(0,bc.Qx)(this,B.user,{alpha:1,duration:500,ease:j.GS3.Quadratic.Out}),k.push((0,bc.eK)(this._noot,{x:YS.j.PLAYER_SPAWN_LOCATION_X+150,y:YS.j.PLAYER_SPAWN_LOCATION_Y-100})),yield(0,bc.Qx)(this,this._noot,{alpha:1,duration:500,ease:j.GS3.Quadratic.Out}),yield Promise.all(k),(0,bc.BY)(B.user,this._noot);const U=[1591,1592];yield(0,bc.v$)(U),K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_RIFTS,ln.B.BREADCRUMB_RIFTS_AFTER_FIRST_CUTSCENE_SEEN)}catch(e){j.RQr.logError(e,"Error playing post first rift run cutscene")}K.q.instance.prodigy.world.it(YS.j.MAP_KEY,B.user.position.x,B.user.position.y)}))}cleanup(){this._noot&&(this._noot.destroy(),this._noot=null),super.cleanup()}}(0,G.Cg)([(0,Re.b)("306-5359"),(0,G.Sn)("design:type",ye.W)],XS.prototype,"_player",void 0);const ZS=[297,298,299];class JS extends $n.Z{constructor(k,B){super(k,"A1",B.concat([J.Q.Spine_npc_noot_json,J.Q.Spine_npc_puppetmaster_json,J.Q.Spine_npc_pippet_json,J.Q.Spine_battle_transport_boss_purple_json,J.Q.Spine_pet_240_json,...ZS.map((k=>J.Q[`Default_follow_${k}_json`])),Ei.l.RiftRunPortal,Ei.l.SpinePetLegacyTransform])),this._buddies=[]}setup(k,B,U){function F(k,U,F,G=1){const j=K.q.instance.prodigy.create.follow(B.content,k,G,null,U,F);if(!(j instanceof yr._))throw new Error("Only GameObject-based buddies supported");const $=j.findComponent(pr);return $.walkSpeed=1,$}super.setup(k,B,U);{const k=new j._mx;k.addComponent(j.K16).group.position.set(725,590),k.name="Teleportation Effect",B.content.addChild(k.legacyTransform.group);const U=k.addComponent(Wn.v),F=k.addComponent(Ir.j);U.Active=!1,U.setAsset(J.Q.Spine_battle_transport_boss_purple_json),this._teleportEffect=F}this._noot=new Zw.p(k,"NPC_NAME_NOOT",J.Q.Spine_npc_noot_json,Kn.ac.QuestGiver,B.content,0,0,"idle"),this._puppetMaster=new Zw.p(k,"NPC_NAME_PUPPETMASTER",J.Q.Spine_npc_puppetmaster_json,Kn.ac.QuestGiver,B.content,0,0,"idle"),this._pippet=new Zw.p(k,"NPC_NAME_PIPPET",J.Q.Spine_npc_pippet_json,Kn.ac.QuestGiver,B.content,0,0,"idle"),this._drake=K.q.instance.prodigy.create.monster(B.content,new fa.R(k,{ID:240}),1,660,510),this._buddies.push(F(ZS[2],446,418,.6),F(ZS[1],506,480,.6),F(ZS[2],790,539,.6),F(ZS[0],896,516,.6)),this._drake.startLoad(),this._drake.OnLoad.addOnce((()=>this._drake.stand())),B.user.position.set(110,295),this._noot.position.set(60,300),this._puppetMaster.position.set(695,390),this._pippet.position.set(900,390),YS.j.addPortalToScreen(this.screen,QS.N3.location.x,QS.N3.location.y).catch(j.RQr.createHandler("VisitPrePuppetMasterDefeat: Failed to load the Rifts portal"))}start(k,B){const U=Object.create(null,{start:{get:()=>super.start}});return(0,G.sH)(this,void 0,void 0,(function*(){U.start.call(this,k,B);try{(0,bc.BY)(this._puppetMaster,this._pippet);for(const k of[B.user,this._noot,this._drake])k.faceToward(this._puppetMaster.x);yield(0,bc.v$)([1603,1604,1605,1606,1607]);{const B=H().pick(this._drake,["x","y"]);yield(0,bc.eK)(this._drake,{x:this._puppetMaster.x+50,y:this._puppetMaster.y+10}),this._drake.faceToward(this._puppetMaster.x),this._drake.attack(),yield(0,bc.uk)(k,1e3),this._puppetMaster.playAll("hit",!1),yield Promise.all([(0,bc.v$)([1608]),(0,bc.uk)(k,800).then((()=>(0,G.sH)(this,void 0,void 0,(function*(){return(0,bc.eK)(this._drake,B)}))))]),this._drake.faceToward(this._puppetMaster.x)}{const B=this._buddies[1],U=H().pick(B.gameObject.position,["x","y"]);yield(0,bc.eK)(B,{x:this._puppetMaster.x-10,y:this._puppetMaster.y+10}),yield(0,bc.Qx)(this,B.gameObject.transform.scale,{y:.6,duration:1e3,ease:j.GS3.Bounce.Out},{y:1,duration:1e3,ease:j.GS3.Quadratic.Out}),this._puppetMaster.faceToward(B.gameObject.position.x),yield(0,bc.eK)(B,U),this._puppetMaster.faceToward(this._pippet.x),yield(0,bc.uk)(k,800),this._puppetMaster.faceToward(B.gameObject.position.x),yield(0,bc.uk)(k,1e3),this._puppetMaster.faceToward(this._pippet.x),yield(0,bc.v$)([1609,1610])}{const B=(0,bc.eK)(this._puppetMaster,{x:this._puppetMaster.x+30,y:this._puppetMaster.y+40});yield(0,bc.v$)([1611,1612]),yield B;const U=H().sortBy([...this._buddies,this._pippet,this._drake],(k=>k instanceof pr?k.gameObject.position.x:k.x));U.push(this._puppetMaster),this._puppetMaster.playAll("summon"),yield(0,bc.uk)(k,1800),this._teleportEffect.spine.Active=!0,this._teleportEffect.playAnimation("exit",!1),yield Promise.all(U.map(((k,B)=>(0,G.sH)(this,void 0,void 0,(function*(){return(0,bc.Qx)(this,k instanceof zn.R?k:k.gameObject,{alpha:0,duration:400,ease:j.GS3.Quadratic.Out,delay:100*B})})))))}{yield j.Egh.timeout(1e3);const k=Promise.all([(0,bc.eK)(B.user,{x:YS.j.PLAYER_SPAWN_LOCATION_X,y:YS.j.PLAYER_SPAWN_LOCATION_Y}),(0,bc.eK)(this._noot,{x:YS.j.PLAYER_SPAWN_LOCATION_X+150,y:YS.j.PLAYER_SPAWN_LOCATION_Y-50})]);yield(0,bc.v$)([1613]),yield k,(0,bc.BY)(B.user,this._noot),yield(0,bc.v$)([1614,1615,1616])}K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_RIFTS,ln.B.BREADCRUMB_RIFTS_FIRST_VISIT_PRE_PM_DEFEAT_CUTSCENE_SEEN)}catch(e){j.RQr.logError(e,"Error playing pre-PM-defeat visit cutscene")}K.q.instance.prodigy.world.it(YS.j.MAP_KEY,B.user.position.x,B.user.position.y)}))}cleanup(){var k;for(const B of[this._noot,this._pippet,this._puppetMaster])B.destroy();for(const B of this._buddies)B.gameObject.destroy();this._noot=null,this._pippet=null,this._puppetMaster=null,this._buddies.length=0,null===(k=this._teleportEffect)||void 0===k||k.GameObject.destroyRootDeferred(),this._teleportEffect=null,super.cleanup()}}class tA extends vn.b{constructor(k){super(k),this.difficultyModeAgnostic=!0,this.name="Dragon Isle",this.ID=hn.A_.DRAGONISLE,this.zoneIndex=pT.P.DragonIsle,this.defaultOnFaint=YS.j.MAP_KEY,this.questHub=YS.j.MAP_KEY;const B=[Rn.t.Tileset_dragonisland_exterior_png,Rn.t.Tileset_dragonisland_waterfall_png,Rn.t.Tileset_collisions_png];this._portalHub=new YS.j(this,B),this.maps={A1:this._portalHub},this.scenes={postFirstRift:new XS(this,B),visitPrePuppetMasterDefeat:new JS(this,B)}}init(k,B,U){super.init(k,B,U),U.disabledLayers.push("b7","b8")}setup(k,B,U){return U!==this._portalHub||K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_RIFTS,ln.B.BREADCRUMB_RIFTS_FIRST_VISIT_PRE_PM_DEFEAT_CUTSCENE_SEEN)?super.setup(k,B,U):(this.playScene("visitPrePuppetMasterDefeat"),{quit:!0})}}class eA extends Ar.H{constructor(k,B,U,F,G,$=!1){super(k,B),this.npc=null,this.indicator=null;const H=K.q.instance.prodigy.gameContainer,V=H.get(j.$Bt.LocalizationService),W=H.get("c47-20b6");this.x=U,this.y=F,this.name=V.getText("NPC_NAME_PROFESSOR_SCOOG"),this.npc=K.q.instance.prodigy.create.sprite(0,0,q._.Npc_sprite_scoog_json,0,void 0,this.onTextureLoaded.bind(this)),this.npc.inputEnabled=!0,this.npc.anchor.set(.5,1),this.npc.events.onInputDown.add((()=>{W.gameWorld.sendNpcClickedEvent({npc_name:this.name,npc_type:Kn.ac.Merchant,npc_id:"NPC_NAME_SCOOG"}),G()}),this),$&&(this.npc.scale.x=-1),this.add(this.npc),K.q.instance.prodigy.create.nameFont(this,-15,-this.npc.height-20,this.name),W.gameWorld.sendNpcDiscoveredEvent({npc_name:this.name,npc_type:Kn.ac.Merchant,npc_id:"NPC_NAME_SCOOG",x_coord:U,y_coord:F,npc_animation_id:"idle"})}onTextureLoaded(k){k&&(k.animations.addIfFound("stand",["npc_0","npc_1","npc_2","npc_3","npc_4","npc_5","npc_6","npc_7"],10,!0),k.animations.play("stand",void 0,!0))}setIndicator(k){j.Aq$.isDefined(this.indicator)||(this.indicator=TT.createIndicator(k),this.indicator.y=-(this.npc.height+20),this.add(this.indicator),this.game.add.tween(this.indicator,this).to({y:this.indicator.y-20},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0))}}class iA extends Un.T{constructor(k,B){super(k,"A0","MAP_DYNO_DIG_OASIS",280,440,[],B.concat([q._.Npc_sprite_scoog_json,Rn.t.Tileset_collisions_png,Ei.l.Overlay_difficulty_hard,Ei.l.Overlay_difficulty_expert]))}setup(k,B){super.setup(k,B);new eA(k,B.content,800,450,this.onScoogClicked.bind(this),!1).setIndicator(ST.DEFAULT_INDICATOR_CONFIG),B.addClickableEvent(295,200,50,80,this.toMuseum.bind(this,B),null,0,null);const U=K.q.instance.prodigy.create.element(B.content,975,150),F=U.add(K.q.instance.prodigy.create.sprite(40,40,q._.General_icons_json,"star2"));F.anchor.set(.5,.5),F.inputEnabled=!0,F.angle=-20,F.events.onInputDown.add(this.toDynoDig,this),U.add(K.q.instance.prodigy.create.sprite(0,10,Ut.E.getIconForType("key",1))),K.q.instance.prodigy.create.font(U,-20,0,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_TITLE"),{width:120,size:20,align:"center"}),k.add.tween(F,this).to({angle:20},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0)}onScoogClicked(){const k=K.q.instance.prodigy.dialogue.create(),B=`${CT.N.Scoog}_${ph.B.Dialogue}`;this.segment.featureCommon.sendInterfaceEvent({interfaceName:B,interfaceType:bi.Wm.DialogBox,instanceType:Ai.N.Interface,originType:bi.$N.NpcClick}),k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_SHOP_WELCOME"),face:0,yes:()=>{this.sendDialogueSegmentEvents(jh.k.Shop,B),k.close(),K.q.instance.prodigy.open.store(23)},no:()=>{this.sendDialogueSegmentEvents(jh.k.NotNow,B)},type:Ti.fA.STORE}),k.startDeprecated("scoog")}sendDialogueSegmentEvents(k,B){this.segment.featureCommon.sendButtonEvent({buttonName:k,interfaceName:B,interfaceType:bi.Wm.DialogBox,saveClickInfo:k}),this.segment.featureCommon.sendInterfaceEvent({interfaceName:B,interfaceType:bi.Wm.DialogBox,instanceType:Ai.N.Interface,closeMethod:bi.Lv.ButtonClick})}toMuseum(k){const B=K.q.instance.prodigy.event.create();B.validPath(k.user,k.path,320,300);const U=this.game.state.get(Ie.G.Museum);B.set(U,"startX",634),B.set(U,"startY",560),B.function(K.q.instance.prodigy.start.bind(K.q.instance.prodigy,Ie.G.Museum)),B.start()}toDynoDig(){K.q.instance.prodigy.start(Ie.G.DinoDig,{},{playerPosition:this.screen.user.position})}}class sA extends vn.b{constructor(k){super(k),this.difficultyModeAgnostic=!0,this.store={},this.store={items:[{ID:41,type:"hat"},{ID:67,type:"weapon"},{ID:37,type:"outfit"},{ID:15,type:"pet"},{ID:35,type:"pet"}]},Object.defineProperty(this.store,"name",{get:()=>K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("STORE_NAME_DYNO")}),this.name="Dyno",this.ID=hn.A_.DYNO,this.bgmID=3,this.battleBG="battle-shipwreck-outside",this.defaultOnFaint="dyno-A0",this.questHub="dyno-A0",this.states=["daily"],this.zoneIndex=pT.P.Dyno;const B=["battle-shipwreck-outside",Rn.t.Tileset_generic_png,Rn.t.Tileset_outsidesnow_png,q._.Npc_sprite_wizard_json,Rn.t.Tileset_town_png,q._.Zone_skywatch_json,Rn.t.Tileset_volcano_png,Rn.t.Tileset_generic_new_png,Rn.t.Tileset_ship_exterior_png,Rn.t.Tileset_water_new_png];this.maps={A0:new iA(this,B)}}}sA.AUDIO=[{tag:Z.c.Voice_9,s:0,d:3},{tag:Z.c.Voice_9,s:3,d:2},{tag:Z.c.Voice_9,s:5,d:2},{tag:Z.c.Voice_9,s:7,d:2},{tag:Z.c.Voice_9,s:9,d:2},{tag:Z.c.Voice_9,s:11,d:3}],sA.DATA={ID:6,tag:"dyno-A0",zoneName:"zone-dino",atlas:q._.Zone_dino_json,icon:Ut.E.getIconForType("fossil",1),shopkeeperTag:q._.Npc_face_scoog_json,shopkeeperFrame:"face_0",scaleX:.89,scaleY:.89,battle:{screen:"bg-battle-dino",encounter:[{ID:105},{ID:106},{ID:107},{ID:108},{ID:109},{ID:110},{ID:111},{ID:112}]},quests:[]};var nA=U(92864);class aA extends Un.T{}class rA extends aA{constructor(k,B){super(k,"A3","MAP_FOREST_MOUNTAIN_GATE",1100,580,["forest-A4"],B)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1080,y:630,w:320,h:80},"forest-A4",1080,90,null,null)}}class oA extends aA{constructor(k,B){super(k,"A4","MAP_FOREST_MOUNTAIN_PASS",1080,520,["forest-A3","forest-A5","forest-B5"],B),this.coord=[new j.I9Y(150,430),new j.I9Y(755,400)]}setup(k,B,U){super.setup(k,B,U),K.q.instance.prodigy.prefabFactory.addWizard(this,1046,208,"wizard4",33,!0).catch(j.RQr.createHandler(`Could not load enemy wizard in map ${this.zoneName}`)),this.addAreaEvent(k,B,{x:1080,y:40,w:320,h:80},"forest-A3",1100,580,null,null),this.addAreaEvent(k,B,{x:this.game.width,y:this.game.height,r:200},"forest-B5",200,200,null,null),this.addAreaEvent(k,B,{x:220,y:630,w:280,h:80},"forest-A5",220,90,null,null)}}class hA extends aA{constructor(k,B){super(k,"A5","MAP_FOREST_FIREFLY_CROSSING",220,90,["forest-A4"],B),this.coord=[new j.I9Y(200,600),new j.I9Y(900,510),new j.I9Y(100,420)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:220,y:40,w:280,h:80},"forest-A4",280,580,null,null)}}class cA extends aA{constructor(k,B){super(k,"B5","MAP_FOREST_CROSSROADS",1100,630,["forest-A4","forest-C4","forest-B6"],B),this.coord=[new j.I9Y(1e3,180),new j.I9Y(200,200),new j.I9Y(690,125)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:0,y:0,r:200},"forest-A4",1080,584,null,null),this.addAreaEvent(k,B,{x:1060,y:0,w:300,h:170,rect:!0},"forest-C4",300,520,null,null),this.addAreaEvent(k,B,{x:1100,y:680,w:280,h:80},"forest-B6",1100,90,null,null),this.zone.isOnQuest(8)||K.q.instance.prodigy.prefabFactory.addWizard(this,350,200,"wizard2",34,!1).catch(j.RQr.createHandler(`Could not load enemy wizard in map ${this.zoneName}`))}}class dA extends aA{constructor(k,B){super(k,"B6","MAP_FOREST_GRASSY_CLEARING",200,630,["forest-B5","forest-B7"],B),this.coord=[new j.I9Y(210,390),new j.I9Y(300,130),new j.I9Y(540,260)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1100,y:40,w:280,h:80},"forest-B5",1100,630,null,null),this.addAreaEvent(k,B,{x:200,y:680,w:320,h:80},"forest-B7",200,90,null,null)}}class lA extends aA{constructor(k,B){super(k,"B7","MAP_FOREST_FISHERMANS_POND",1190,240,["forest-B6","forest-C7"],B),this.coord=[new j.I9Y(955,590),new j.I9Y(130,530),new j.I9Y(305,630)]}setup(k,B,U){var F;super.setup(k,B,U);(null===(F=this.zone.getQuestState())||void 0===F?void 0:F.ID)<4||this.addPippet(k,B,2,200,546),this.addAreaEvent(k,B,{x:200,y:40,w:320,h:80},"forest-B6",200,630,null,null),this.addAreaEvent(k,B,{x:1240,y:410,w:80,h:260},"forest-C7",90,240,null,null)}}class uA extends aA{constructor(k,B){super(k,"B8","MAP_FOREST_FIREFLY_CLEARING",1190,480,["forest-C8"],B.concat(q._.Npc_sprite_merchant_json)),this.questNPC=null,this.coord=[new j.I9Y(490,570),new j.I9Y(785,270),new j.I9Y(440,200)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1240,y:400,w:80,h:500},"forest-C8",90,480,null,null)}start(k,B,U){super.start(k,B,U)}}class fA extends aA{constructor(k,B){super(k,"C4","MAP_FOREST_THE_OLD_ROAD",300,520,["forest-B5","forest-D3"],B.concat([q._.Npc_sprite_merchant_json])),this.questNPC=null,this.coord=[new j.I9Y(400,580),new j.I9Y(820,500),new j.I9Y(800,330)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:200,y:640,w:280,h:200,rect:!0},"forest-B5",1080,200,null,null),this.addAreaEvent(k,B,{x:1080,y:0,w:270,h:160,rect:!0},"forest-D3",200,520,null,null),K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.FireflyQuestMerchantNPC,378,313).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.FireflyQuestMerchantNPC}`)),K.q.instance.prodigy.prefabFactory.addWizard(this,925,450,"wizard3",35,!0).catch(j.RQr.createHandler(`Could not load enemy wizard in map ${this.zoneName}`))}chatWithMerchant(k){const B=K.q.instance.prodigy.event.create();B.text(6,"merchant"),B.start()}}class bA extends aA{constructor(k,B){super(k,"C7","MAP_FOREST_STONEFISH_BEACH",200,630,["forest-B7","forest-C8"],B),this.coord=[new j.I9Y(640,500),new j.I9Y(330,170),new j.I9Y(220,260)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:40,y:220,w:80,h:200},"forest-B7",1180,450,null,null),this.addAreaEvent(k,B,{x:200,y:680,w:240,h:80},"forest-C8",200,90,null,null),B.addCollect(1,980,520,{type:"item",ID:51}),K.q.instance.prodigy.prefabFactory.addWizard(this,550,480,"wizard1",36,!1).catch(j.RQr.createHandler(`Could not load enemy wizard in map ${this.zoneName}`))}}class pA extends aA{constructor(k,B){super(k,"C8","MAP_FOREST_BIG_TREE",1190,520,["forest-C7","forest-B8"],B.concat(q._.Npc_sprite_flora_json,q._.Npc_sprite_merchant_json))}setup(k,B,U){super.setup(k,B,U),K.q.instance.prodigy.world.getZone(hn.A_.LAMPLIGHT).completeQuest(2),this.addAreaEvent(k,B,{x:200,y:40,w:240,h:80},"forest-C7",200,630,null,null),this.addAreaEvent(k,B,{x:40,y:480,w:80,h:200},"forest-B8",1190,480,null,null);let F=null;this.featureRequirements.meetsRequirementsDeprecated(37)||K.q.instance.prodigy.classModeController.isClassMode()||(F=()=>{K.q.instance.prodigy.open.lamplightLevelLock("WORLD_LAMPLIGHT_TOWN")}),this.addAreaEvent(k,B,{x:1240,y:520,w:80,h:240,canReTrigger:!0},"lamplight-B1",120,480,F);K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromGUID(Ei.l.FloraNPC).transform.setPosition(560,425),K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.FireflyMerchantNPC,950,390).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.FireflyMerchantNPC}`)),K.q.instance.prodigy.create.nicknamerPedestal(this.game,this.zone.ID,B.user,B.content,125,300)}}var vA,gA=U(76642),mA=U(72326);!function(k){k[k.PLAY_FLUTE=0]="PLAY_FLUTE",k[k.BOSS_FIGHT=1]="BOSS_FIGHT",k[k.OPEN_CHEST=2]="OPEN_CHEST",k[k.GET_KEYSTONE=3]="GET_KEYSTONE",k[k.GO_TO_SHIVERCHILL=4]="GO_TO_SHIVERCHILL"}(vA||(vA={}));class yA extends Pn.T{constructor(k,B,U){super(k,B,yA.QUEST_INDEX,mA.v.Q12,{type:"seq",N:5},[`${hn.A_.FOREST}-D3`],yA.QUEST_START_DIALOGUE_IDS,[],[],null,!1)}setup(k,B,U){return super.setup(k,B,U),U.getTag()===yA.DIALOGUE_MAP_TAG?(K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.FloraNPC,305,410,!1,!0).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.FloraNPC}`)),this.zone.getQuestState().seq>vA.BOSS_FIGHT&&(K.q.instance.prodigy.notifications.pause(this),K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.FlorianNPCLegacyMaps,430,330,!0,!0).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.FlorianNPCLegacyMaps}`))),{enableMonsters:!1}):null}start(k,B,U){if(super.start(k,B,U),!this.zone.isQuestComplete(12)&&U.getTag()===yA.DIALOGUE_MAP_TAG)switch(this.zone.getQuestState().seq){default:case vA.PLAY_FLUTE:case vA.BOSS_FIGHT:this.startIntroCutscene(k,B,U);break;case vA.OPEN_CHEST:case vA.GET_KEYSTONE:K.q.instance.prodigy.notifications.pause(this),this.startPostbattleCutscene(U);break;case vA.GO_TO_SHIVERCHILL:}return null}update(k,B,U){U.getTag()===yA.DIALOGUE_MAP_TAG&&U.update()}startIntroCutscene(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("d0e-64fd"),G=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),$=G.getValue("geraldMaxHP",Vt.s.get("GameConstants.Gerald.MAX_HP")),H=null===$?void 0:parseInt($,10),V=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_BOSS_BATTLE");K.q.instance.prodigy.game.broadcaster.broadcast(oi.Y1.HideHUD,oi.HG.HUD),Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(F,Ei.l.FireflyQ12IntroCutscene,{EncounterBattleMods:{boss:{ID:60,element:"earth",attacks:[68,69,71],name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_GERALD"),tag:hn.A_.FOREST,scale:!0,useShadowAssets:!1,maxHP:H},difficulty:parseInt(G.getValue("geraldDifficulty",Vt.s.get("GameConstants.Gerald.DIFFICULTY")),10),starMod:5,screen:U.zone.battleBG,drops:[{type:"gold",N:100},{type:"weapon",ID:212,N:1},{type:"follow",ID:221,N:1},{type:"dorm",ID:185,N:1},{type:"spellRelic",ID:15,N:1}],intro:V,catch:!1,run:!1}}).then((k=>{var B,F,G;null===(B=k.findComponentInChildren(Ju.k))||void 0===B||B.onVictory.addOnce((()=>{this.zone.setState("gerald",null),K.q.instance.prodigy.world.it("forest-D3",572,342)})),null===(F=k.findComponentInChildren(Ju.k))||void 0===F||F.onDefeat.addOnce((()=>{K.q.instance.prodigy.world.it("forest-C4",1080,200)})),null===(G=k.findComponentInChildren(gA.S))||void 0===G||G.onDispatch.addOnce((()=>U.wakeUp=!0))})).catch(j.RQr.createHandler("Could not load Forest Q12 Gerald Cutscene"))}startPostbattleCutscene(k){this.descKey="Talk to Gerald",k.wakeUp=!0,K.q.instance.prodigy.game.broadcaster.broadcast(oi.Y1.ShowHUD,oi.HG.HUD),K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(Ei.l.FireflyQ12CutscenePost_battle).then((k=>{var B;null===(B=k.findComponentInChildren(gA.S))||void 0===B||B.onDispatch.addOnce((()=>K.q.instance.prodigy.notifications.resume(this)))})).catch(j.RQr.createHandler("Could not load Forest Q12 Gerald Post-battle Cutscene"))}}yA.DIALOGUE_MAP_TAG="D3",yA.QUEST_INDEX=12,yA.QUEST_START_DIALOGUE_IDS=[325,326];class _A extends aA{constructor(k,B){super(k,"D3","MAP_FOREST_OLD_ROAD_REMAINS",200,520,["forest-C4"],B.concat(q._.Boss_gerald_json,J.Q.Spine_boss_marionette_json,J.Q.Spine_music_notes_json)),this.wakeUp=!1,this.tween=[],this.wakeUpTween=[],this.awakeTween=[],this.coord=[new j.I9Y(500,640),new j.I9Y(800,320),new j.I9Y(1100,450)]}setup(k,B,U){super.setup(k,B,U),this.game=k,this.wakeUp=!1,this.addAreaEvent(k,B,{x:180,y:640,w:300,h:200,rect:!0},"forest-C4",1080,200,null,null);const F=k.cache.getJSON(this.file),G=k.cache.getJSON("map-pathing").tilesets;let j=null;for(let $=0;$8&&!this.zone.allQuestsAreComplete}wakeUpGerald(){if(this.wakeUp){this.tween=this.wakeUpTween;for(let k=0;k{K.q.instance.game.broadcaster.broadcast(oi.Y1.HideHUD,oi.HG.HUD),(null==B?void 0:B.questProgress)&&(B.questProgress.visible=!1),k.findComponentInChildren(wA.V).onComplete.addOnce((()=>{K.q.instance.game.broadcaster.broadcast(oi.Y1.ShowHUD,oi.HG.HUD),(null==B?void 0:B.questProgress)&&(B.questProgress.visible=!0),k.destroy()}))}))}))}}SA.QUEST_INDEX=1;class AA extends Pn.T{constructor(k,B,U){super(k,B,10,mA.v.Q10,{type:"seq",N:1},["forest-A5"],[319,320,321],[],[322],U,!1)}setup(k,B,U){return super.setup(k,B,U),"A5"===U.getTag()?{enableMonsters:!1}:null}start(k,B,U){if(super.start(k,B,U),!this.zone.isQuestComplete(10)&&"A5"===U.getTag()){const F=K.q.instance.prodigy.create.element(B.content,490,340),G=F.add(K.q.instance.prodigy.create.sprite(0,0,q._.General_core_json,"overlay-light"));G.alpha=0,G.width=110,G.height=80,F.highlight(!0,0,-20),G.inputEnabled=!0,G.events.onInputDown.add((()=>{this.clickStump(U,k,B,F)}))}return null}clickStump(k,B,U,F){k.questParams={};const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,$=U.content.addChild(K.q.instance.prodigy.icon.createIcon(505,270,Ut.E.getIconForType("item",69)));B.add.tween($,this).to({y:280},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0),$.visible=!1;const H=U.content.addChild(K.q.instance.prodigy.icon.createIcon(505,270,Ut.E.getIconForType("item",70)));B.add.tween(H,this).to({y:280},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0),H.visible=!1;const V=k.addMonster(B,U,99,982,626,!1,{encounter:[{ID:69}],difficulty:5,maxTeamSize:1,showNewIndicator:!1},!0);V.visible=!1;const W=K.q.instance.prodigy.event.create();W.function(F.highlight.bind(F,!1)),W.enableInput(!1),W.path(U.user,[{x:430,y:420}]),W.set(U.user,"evtProc",!0),W.function(G.backpack.consume.bind(G.backpack,"item",69,1)),W.delay(100),W.set($,"visible",!0),W.delay(500),W.explode(505,325,80,80,3),W.set($,"visible",!1),W.set(H,"visible",!0),W.delay(500),W.set(V,"visible",!0),W.path(V,[{x:708,y:383}],1),W.hop(V,500,-140,100),W.set(H,"visible",!1),W.function(U.user.chat.bind(U.user,1,80)),W.sound(18,"dig"),W.hop(V,500,-160,100),W.path(V,[{x:218,y:0}],2),W.set(V,"visible",!1),W.function(V.destroy.bind(V)),W.enableInput(!0),W.text(60,"noot"),W.function(F.destroy.bind(F)),W.function(this.zone.completeSequence.bind(k.zone,10,0)),W.set(U.user,"evtProc",!1),W.function(U.process.bind(U)),W.start()}}class CA extends Pn.T{constructor(k,B,U){super(k,B,11,"",{type:"item",ID:70,N:1},["forest-A3","forest-D3"],[323,324],[],[331],U,!1,mA.v.Q11)}setup(k,B,U){return super.setup(k,B,U),"A3"===U.getTag()?(this.zone.getState("questMonsterDefeated")||this.placeThief(k,B,U),{enableMonsters:!1}):"D3"!==U.getTag()||this.zone.isQuestComplete(11)?null:(this.zone.getState("fakeMonsterDefeated")||this.placeDecoyThief(k,B,U),{enableMonsters:!1})}getRemainingQuestAreas(){const k=["forest-A3"];return j.Aq$.isDefined("fakeMonsterDefeated")&&this.zone.getState("fakeMonsterDefeated")||k.push("forest-D3"),k}placeThief(k,B,U){const F={drops:[{ID:70,type:"item"}],encounter:[{ID:69,nickname:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_FOREST_THIEF")}],difficulty:5,maxTeamSize:1,onEnc:()=>{this.zone.setState("questMonsterDefeated",!0)},unique:!0,isQuestEncounter:!0,showGuideHand:!0};K.q.instance.prodigy.prefabFactory.addMonster(U,384,463,98,F).catch(j.RQr.createHandler("Could not add real thief for quest Q11"))}placeDecoyThief(k,B,U){const F={encounter:[{ID:69}],difficulty:5,maxTeamSize:1,onEnc:()=>{this.zone.setState("fakeMonsterDefeated",!0)},unique:!0,showGuideHand:!0,isQuestEncounter:!0};K.q.instance.prodigy.prefabFactory.addMonster(U,484,463,99,F).catch(j.RQr.createHandler("Could not add decoy thief for quest Q11"))}}var OA,IA,DA=U(92591),RA=U(54336);class PA extends Pn.T{constructor(k,B,U){super(k,B,PA.QUEST_INDEX,"Defeat Monster",{type:"seq",ID:1,N:1},["forest-C7"],[1338,1339,1340],[],[1348,1347,1346],U,!1,mA.v.Q2)}setup(k,B,U){if(super.setup(k,B,U),U.tag===PA.MAP_TAG){if(!this.zone.isQuestComplete(PA.QUEST_INDEX))return this.zone.isOnSequence(PA.QUEST_INDEX,0)&&(B.onStartComplete.addOnce((()=>B.walkEnabled=!1)),K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.FloraNPC,380,640).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.FloraNPC}`))),{enableMonsters:!1,enableWizards:!1};this.startMinibossRunaway(U)}return{enableWizards:!1}}process(k,B,U){U.tag===PA.MAP_TAG&&this.zone.isOnSequence(PA.QUEST_INDEX,0)&&(B.walkEnabled=!1,K.q.instance.prodigy.load.assets(ah.B.Bg_bossbattle_firefly,(()=>{this.startMinibossCutscene(U).catch(j.RQr.createHandler("Could not instantiate Q2 Miniboss prefab"))})))}startMinibossRunaway(k){K.q.instance.prodigy.prefabFactory.addMonster(k,640,360,9,{encounter:[{ID:96}],difficulty:5,maxTeamSize:1,unique:!0,isQuestEncounter:!0}).then((k=>{const B=k.findComponentInChildren(RA.s),U=k.findComponentInChildren(cf.I);k.findComponentInChildren(DA.K).changeState(1),U.MoveTarget=new j.I9Y(400,200),U.onMoveEnd.addOnce((()=>{U.MoveTarget=new j.I9Y(-200,200)})),B&&(B.Active=!1)})).catch(j.RQr.createHandler("Could not load monster running away from Firefly Q2 encounter"))}startMinibossCutscene(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0"),U=B.player.playerContainer;U.playerPrefab||(yield new Promise((k=>U.OnLoad.add(k)))),(new EA.u).get(1341).args=[B.getLevel()+2];const F=Math.min(B.getLevel()+2,hi.s.activePlayerLevelCap),G=-100;return Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.FireflyQ2MinibossEncounter,{EncounterMap:k,EncounterScale:[1,1],EncounterZoneTag:k.zoneName,EncounterSpawnPosition:new j.I9Y(G,200),EncounterBattleMods:{encounter:[{ID:96}],level:F,run:!1,catch:!1,onEnd:k.zoneName,screen:k.battleBG,onFaint:k.zone.defaultOnFaint,backgroundMusic:ah.B.Bg_bossbattle_firefly,revampBattleType:Ni.gu.FireflyQ2Miniboss},EncounterDifficultyIndicatorTier:2,EncounterDifficultyIndicatorLevel:F}).then((k=>{K.q.instance.prodigy.battle.battleStats.type="QuestBattle",k.transform.setPosition(G,200),k.findComponent(j.y4o).getRootContainer().position.set(G,200)}))}))}}PA.MAP_TAG="C7",PA.QUEST_INDEX=2,function(k){k[k.ENEMY_1=100]="ENEMY_1",k[k.ENEMY_2=102]="ENEMY_2",k[k.MINIBOSS=104]="MINIBOSS"}(OA||(OA={})),function(k){k[k.MONSTER_INFO=0]="MONSTER_INFO",k[k.LEVEL_UP=1]="LEVEL_UP",k[k.READY_MINIBOSS=2]="READY_MINIBOSS",k[k.DEFEAT_MINIBOSS=3]="DEFEAT_MINIBOSS"}(IA||(IA={}));class MA extends Pn.T{constructor(k,B,U){super(k,B,MA.QUEST_INDEX,"",{type:"clear",ID:1,N:3},["forest-B7"],[1349],[],[1352,1353],U,!1,mA.v.Q3),this.updateQuestDescription()}setup(k,B,U){return super.setup(k,B,U),"B7"===U.getTag()&&(this.zone.isSequenceComplete(MA.QUEST_INDEX,IA.MONSTER_INFO)||this.showMonsterInfoDialogue(),this.areLesserEnemiesDefeated(U.zone.getQuestState())?(this.zone.completeSequence(MA.QUEST_INDEX,IA.LEVEL_UP),this.updateQuestDescription()):this.placeLesserEnemies(U),this.areAllMonsterDefeated(U.zone.getQuestState())?this.zone.completeSequence(MA.QUEST_INDEX,IA.DEFEAT_MINIBOSS):this.zone.isSequenceComplete(MA.QUEST_INDEX,IA.DEFEAT_MINIBOSS)||this.placeMiniBoss(U).catch(j.RQr.createHandler("Could not add monsters for quest Q3"))),{enableMonsters:!1,enableWizards:!1}}placeMiniBoss(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer;B.playerPrefab||(yield new Promise((k=>B.OnLoad.add(k))));const U=this.getBossLevel(k.zone.getQuestState());return Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.FireflyQ3MinibossEncounter,{EncounterSpawnId:OA.MINIBOSS,EncounterMap:k,EncounterScale:[1,1],EncounterZoneTag:k.zoneName,EncounterSpawnPosition:new j.I9Y(330,300),EncounterBattleMods:{level:U,encounter:[{ID:96}],run:!1,catch:!1,onEnd:k.zoneName,screen:k.battleBG,onFaint:k.zone.defaultOnFaint,unique:!0,revampBattleType:Ni.gu.FireflyQ3Miniboss,isQuestEncounter:!0},EncounterDifficultyIndicatorTier:2,EncounterDifficultyIndicatorLevel:U}).then((k=>{k.transform.setPosition(330,300),k.findComponent(j.y4o).getRootContainer().position.set(330,300)})).catch(j.RQr.createHandler("Could not add miniboss for quest Q#-B"))}))}placeLesserEnemies(k){const B={randDir:!0,encounter:[{ID:20}],difficulty:1,maxTeamSize:1,showGuideHand:!0,isQuestEncounter:!0,unique:!0,range:80};K.q.instance.prodigy.prefabFactory.addMonster(k,900,220,OA.ENEMY_1,B).catch(j.RQr.createHandler(`Could not add monster ${OA.ENEMY_1} for quest Q3`)),K.q.instance.prodigy.prefabFactory.addMonster(k,280,620,OA.ENEMY_2,B).catch(j.RQr.createHandler(`Could not add monster ${OA.ENEMY_2} for quest Q3`))}updateQuestDescription(){this.descKey=this.zone.isSequenceComplete(MA.QUEST_INDEX,IA.LEVEL_UP)?"Defeat Monster":"Level Up"}showMonsterInfoDialogue(){const k=new Ti.rD(K.q.instance.prodigy.game);k.addEvents([{dialogueData:k.dataProvider.get(1350),blockInput:!0},{dialogueData:k.dataProvider.get(1351),blockInput:!0}]),k.start(!0,(()=>{this.zone.completeSequence(MA.QUEST_INDEX,IA.MONSTER_INFO)}))}areLesserEnemiesDefeated(k){return!!j.Aq$.isDefined(k.state)&&(k.seq>IA.LEVEL_UP||1===k.state[OA.ENEMY_1+1]&&1===k.state[OA.ENEMY_2+1])}areAllMonsterDefeated(k){return!!j.Aq$.isDefined(k.state)&&(this.areLesserEnemiesDefeated(k)&&1===k.state[OA.MINIBOSS+1])}getBossLevel(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0");return j.Aq$.isDefined(k)?(j.Aq$.isDefined(k.state[MA.MINIBOSS_LEVEL_STATE_ID])||(k.state[MA.MINIBOSS_LEVEL_STATE_ID]=Math.min(B.getLevel()+2,hi.s.activePlayerLevelCap)),k.state[MA.MINIBOSS_LEVEL_STATE_ID]):Math.min(B.getLevel()+2,hi.s.activePlayerLevelCap)}}MA.QUEST_INDEX=3,MA.MINIBOSS_LEVEL_STATE_ID="forestq3b-miniboss-level";class NA extends Pn.T{constructor(k,B,U){super(k,B,NA.QUEST_INDEX,"Find Florian",{type:"seq",ID:1,N:1},["forest-B6"],[1370,1371],[],[1392,1393,1394],U,!1,mA.v.Q4)}setup(k,B,U){return super.setup(k,B,U),"B6"!==U.getTag()||this.zone.isQuestComplete(NA.QUEST_INDEX)?null:(this.placeFlorian(k,B,U).catch(j.RQr.createHandler("Could not load Florian NPC Prefab")),{enableMonsters:!1})}end(){super.end(),Tn.J.bagItem({type:"spellRelic",ID:13},K.q.instance.prodigy.game,"got-item",void 0)}placeFlorian(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer;k.playerPrefab||(yield new Promise((B=>k.OnLoad.add(B))));const B=new j.I9Y(700,320);return K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.FireflyQ4FlorianNPC,B.x,B.y)}))}}NA.QUEST_INDEX=4;var xA,LA=U(76711),kA=U(23891);!function(k){k[k.RETURN_TO_FIREFLY=0]="RETURN_TO_FIREFLY",k[k.FIGHT_PIPPET=1]="FIGHT_PIPPET",k[k.SAVE_FLORIAN=2]="SAVE_FLORIAN",k[k.CHAT_WITH_MERCHANT=3]="CHAT_WITH_MERCHANT",k[k.CHAT_WITH_NOOT=4]="CHAT_WITH_NOOT",k[k.COLLECT_MANDRAKE=5]="COLLECT_MANDRAKE"}(xA||(xA={}));class BA extends Pn.T{constructor(k,B,U){super(k,B,6,"Save Florian",{type:"pet",ID:32,N:2},["forest-B5"],[],[],[],U,!1,mA.v.Q6)}setup(k,B,U){if(super.setup(k,B,U),K.q.instance.prodigy.world.getCurrentZone()===hn.A_.SHIVERCHILL)return this.zone.isQuestComplete(BA.QUEST_INDEX)&&K.q.instance.prodigy.world.it("forest-D3"),{enableAreaEvents:!1};const F=this.zone.getQuestState().seq;return this.zone.isQuestComplete(BA.QUEST_INDEX)?"D3"===U.getTag()?{enableMonsters:!1,enableWizards:!1}:null:("B5"!==U.getTag()||F!==xA.FIGHT_PIPPET&&F!==xA.SAVE_FLORIAN?F===xA.CHAT_WITH_MERCHANT?this.setQuestGoalChatMerchant():F>=xA.CHAT_WITH_NOOT&&this.setQuestGoalDefeatSprikes():B.onStartComplete.addOnce((()=>B.walkEnabled=!1)),"B5"===this.map.getTag()||"D3"===this.map.getTag()?{enableMonsters:!1,enableWizards:!1}:null)}process(k,B,U){switch(super.process(k,B,U),this.zone.getQuestState().seq){case xA.RETURN_TO_FIREFLY:K.q.instance.prodigy.world.getCurrentZone()===hn.A_.SHIVERCHILL?this.returnToFireflySequence():K.q.instance.prodigy.world.getCurrentZone()===hn.A_.FOREST&&(this.zone.completeSequence(BA.QUEST_INDEX,xA.RETURN_TO_FIREFLY),"B5"===U.getTag()&&this.prebattleCutscene(B));break;case xA.FIGHT_PIPPET:"B5"===U.getTag()&&this.prebattleCutscene(B);break;case xA.SAVE_FLORIAN:"B5"===U.getTag()&&this.postbattleCutscene(k,B,U);break;case xA.CHAT_WITH_MERCHANT:this.setQuestGoalChatMerchant();break;case xA.CHAT_WITH_NOOT:this.setQuestGoalDefeatSprikes(),"D3"===U.getTag()&&this.chatWithNoot(U);case xA.COLLECT_MANDRAKE:"D3"===U.getTag()&&this.placeSprikes(U)}return null}returnToFireflySequence(){const k=new Ti.rD(K.q.instance.game),B=[1372,1373,1375].map((B=>({dialogueData:k.dataProvider.get(B),blockInput:!0})));B.push({dialogueData:k.dataProvider.get(1376),blockInput:!0,yes:()=>{this.zone.completeSequence(BA.QUEST_INDEX,xA.RETURN_TO_FIREFLY),K.q.instance.prodigy.gameContainer.get("985-7051").updateQuestProgress().catch(j.RQr.createHandler("Could not update quest progress for Firefly Forest")).finally((()=>{this.zone.handleLeaving(In.j.teleport,(()=>{K.q.instance.prodigy.world.it("forest-B5")}))}))},yesButtonText:(0,Ba.k)("BUTTON_LETS_GO"),isCancelButtonVisible:!1}),k.addEvents(B),k.start()}prebattleCutscene(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;B.playerContainer.setPath([{x:960,y:360}]),K.q.instance.game.state.get(Ie.G.TileScreen).walkEnabled=!1;const U=this.zone.getMap("B5"),F=K.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("pippetMaxHP",Vt.A.get("GameConstants.Pippet.MAX_HP")),G=null===F?void 0:parseInt(F,10);K.q.instance.prodigy.notifications.pause(this),k.menuBar.active=!1,Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.FireflyQ6Cutscene,{EncounterZoneTag:U.zoneName,EncounterBattleMods:{boss:{ID:37,maxHP:G,element:"shadow",attacks:[73],name:"Pippet",tag:"pippet",pippetBattle:!0},pets:[{ID:117},{ID:71}],level:B.getLevel,run:!1,catch:!1,onEnd:U.zoneName,screen:U.battleBG,onFaint:U.zone.defaultOnFaint,revampBattleType:Ni.gu.QuestPippet}}).then((k=>{null==k||k.findComponentInChildren(Ju.k).onBattleStart.addOnce((()=>{K.q.instance.prodigy.notifications.resume(this)}))})).catch(j.RQr.createHandler("Could not load Firefly Q6B pre battle cutscene"))}postbattleCutscene(k,B,U){B.menuBar&&(B.menuBar.active=!1);const F=K.q.instance.prodigy;F.notifications.pause(this),F.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(Ei.l.FireflyQ6CutscenePost_battle).then((G=>{var j;null===(j=G.findComponentInChildren(kA.f))||void 0===j||j.onComplete.addOnce((()=>{U.zone.completeSequence(BA.QUEST_INDEX,xA.SAVE_FLORIAN),this.setQuestGoalChatMerchant(),k.broadcaster.addAppListener(oi.n8.DialogClosed,(()=>{k.broadcaster.removeAppListener(oi.n8.DialogClosed,this),k.state.get(Ie.G.TileScreen).walkEnabled=!0,F.notifications.resumeAll(),B.menuBar.active=!0,B.process()}),this)}))})).catch(j.RQr.createHandler("Could not load Firefly Q6 post battle cutscene"))}setQuestGoalChatMerchant(){this.descKey=mA.v.Q5,this.area=["forest-C4"]}setQuestGoalDefeatSprikes(){const k=this.descKey===mA.v.Q5;this.descKey="",this.area=["forest-D3"],k&&this.screen.process()}placeSprikes(k){const B={randDir:!0,encounter:[{ID:32}],drops:this.hasDefeatedSprike()?[{type:"item",ID:24,N:1}]:void 0,difficulty:3,maxTeamSize:1,unique:!0,showGuideHand:!0,isQuestEncounter:!0};K.q.instance.prodigy.prefabFactory.addMonster(k,481,239,0,B).catch(j.RQr.createHandler("Could not add monster 0 for quest Q6")),K.q.instance.prodigy.prefabFactory.addMonster(k,940,533,3,B).catch(j.RQr.createHandler("Could not add monster 3 for quest Q6"))}chatWithNoot(k){const B=new Ti.rD(K.q.instance.prodigy.game);B.addEvents([{dialogueData:B.dataProvider.get(64),blockInput:!0},{dialogueData:B.dataProvider.get(65),blockInput:!0}]),B.start(!0,(()=>{this.zone.completeSequence(BA.QUEST_INDEX,xA.CHAT_WITH_NOOT)}))}hasDefeatedSprike(){const k=this.zone.getQuestState().state;return Object.keys(k).some((B=>k[B]>0))}}BA.QUEST_INDEX=6;class UA extends Pn.T{constructor(k,B,U){super(k,B,7,"",{type:"item",ID:24,N:5},["forest-A4","forest-A5"],[310,311,312],[],[331],U,!1,mA.v.Q7),this.collectionMaps={A4:[1,2],A5:[3,4,5]}}setup(k,B,U){if(super.setup(k,B,U),"A4"!==U.getTag()||this.zone.isQuestComplete(7)){if("A5"===U.getTag()&&!this.zone.isQuestComplete(7)){const k={type:"item",ID:24};B.addCollect(3,154,511,k),B.addCollect(4,915,400,k),B.addCollect(5,552,210,k)}}else{const k={type:"item",ID:24};B.addCollect(1,270,460,k),B.addCollect(2,720,350,k)}return null}}var FA=U(61985);class GA extends Pn.T{constructor(k,B,U){super(k,B,8,mA.v.Q8,{type:"seq",N:2},["forest-A3"],[313,314,315],[],[331],U,!1),this._shouldStartIntro=!1}setup(k,B,U){return super.setup(k,B,U),"A3"===U.getTag()?(this.zone.isOnSequence(8,0)&&(this.createTriptropTrio(U).catch(j.RQr.createHandler("Could not create Triptrop Trio Encounter")),k.input.enabled=!1),{enableMonsters:!1}):null}start(k,B,U){return"A3"===U.getTag()&&(this.zone.isOnSequence(8,0)&&this.startIntro(),this.zone.isOnSequence(8,1)&&this.chatWithNoot(k,B,U)),null}createTriptropTrio(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer;B.playerPrefab||(yield new Promise((k=>B.OnLoad.add(k)))),B.x=k.x,B.y=k.y;const U=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);return Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.TriptropTrioEncounter,{EncounterMap:k,EncounterScale:[-1,1],EncounterZoneTag:k.zoneName,EncounterSpawnPosition:new j.I9Y(640,360),EncounterBattleMods:{drops:[{ID:69,type:"item"}],pets:[{ID:59,nickname:U.getText("NPC_NAME_TRIPTROP_TED")},{ID:59,nickname:U.getText("NPC_NAME_TRIPTROP_TOM")},{ID:59,nickname:U.getText("NPC_NAME_TRIPTROP_TAK")}],run:!1,catch:!1,onEnd:k.zoneName,screen:k.battleBG,onFaint:k.zone.defaultOnFaint}}).then((k=>{K.q.instance.prodigy.battle.battleStats.type="QuestBattle",k.transform.setPosition(640,360),k.findComponent(j.y4o).getRootContainer().position.set(640,360),this._prefab=k,this._shouldStartIntro&&this.startIntro()}))}))}startIntro(){this._shouldStartIntro=!0,this._prefab&&this._prefab.findComponentsInChildren(FA.E).forEach((k=>k.startTimer()))}chatWithNoot(k,B,U){const F=new Ti.rD(K.q.instance.prodigy.game);F.addEvents([{dialogueData:F.dataProvider.get(67),blockInput:!0}]),F.start(!0,(()=>{this.zone.completeSequence(GA.QUEST_INDEX,1),B.process()}))}}GA.QUEST_INDEX=8;class jA extends Pn.T{constructor(k,B,U){super(k,B,9,mA.v.Q9,{type:"seq",N:1},["forest-D3"],jA.QUEST_START_DIALOGUE_IDS,[],[],U,!1)}start(k,B,U){if(super.start(k,B,U),"D3"===U.getTag()&&this.zone.isOnSequence(jA.QUEST_INDEX,0)){const k=new Ti.rD(K.q.instance.game);k.addEvents([1427,1428].map((B=>({dialogueData:k.dataProvider.get(B),blockInput:!0})))),k.addEvents([{callback:()=>{this.zone.completeSequence(jA.QUEST_INDEX,0),this.screen.process()}}]),k.start()}return null}}jA.QUEST_INDEX=9,jA.QUEST_START_DIALOGUE_IDS=[316,317];class $A extends vn.b{constructor(k){super(k),this.questManagerIdentifier="985-7051",this._assets=[Rn.t.Tileset_firefly_new_png,q._.Npc_sprite_wizard_json,q._.Zone_forest_json,Rn.t.Tileset_collisions_png,X.V.Bgm_firefly_forest],this.name="Firefly Forest",this.ID=hn.A_.FOREST,this.guardian="FOREST_GUARDIAN",this.battleBG="battle-forest-outside",this.defaultOnFaint="forest-C8",this.questHub="forest-C8",this.bgmID=15,this.currency=13,this.zoneIndex=pT.P.Firefly,this.states=["chest1","chest2","chest3","chest4","wizard1","wizard2","wizard3","wizard4","daily","hasdaily","fakeMonsterDefeated","questMonsterDefeated","chest5","chest6",Zu.PIPPET_ENCOUNTER,Zu.PIPPET_REMATCH,Zu.PIPPET_DEFEATED,"flutePlayed"],this.monsters=[25,29,32,52,55,59,69,81];const B={map:"forest-Titan",cutscene:"forest-titanIntro",harvey:{x:330,y:270},sign:{x:240,y:280},catapult:{x:200,y:430,arcHeight:300},titan:{x:1100,y:390,impactOffset:{x:-130,y:0}},entry:{x:550,y:450},battleBG:[nr.q.Battle_forest_outside_bg,nr.q.Battle_forest_outside_fg]};this.maps={A3:new rA(this,this._assets),A4:new oA(this,this._assets),A5:new hA(this,this._assets),B5:new cA(this,this._assets),B6:new dA(this,this._assets),B7:new lA(this,this._assets),B8:new uA(this,this._assets),C4:new fA(this,this._assets),C7:new bA(this,this._assets),C8:new pA(this,this._assets),D3:new _A(this,this._assets),Titan:new xT(this,this._assets,B)},Promise.all([Cf.T.ready,Gt.R.dataBundleLoadPromise]).then((()=>{this.setZoneRewards()})).catch((k=>{K.q.instance.prodigy.open.messageBoxError("ERROR_LOADING_ZONE",["WORLD_FIREFLY_FOREST"],k,"Error, unable to load Firefly Zone Rewards JSON")})),this.scenes={titanIntro:new _T(this,[Rn.t.Tileset_interior_general_png,Rn.t.Tileset_wall_collisions_png,X.V.Bgm_tutorial])}}setZoneRewards(){const k=(0,yT.mg)(Gt.R.loadData(Ft.r.ZoneRewardsFireflyForest_json));this.quests=Object.keys(this.quests).length>0?this.quests:{1:new SA(this,this._assets,k.quests.ForestQ1),2:new PA(this,this._assets,k.quests.ForestQ2),3:new MA(this,this._assets,k.quests.ForestQ3),4:new NA(this,this._assets,k.quests.ForestQ4),5:new LA.c(this,this._assets,k.quests.ForestQ5),6:new BA(this,this._assets,k.quests.ForestQ6),7:new UA(this,this._assets,k.quests.ForestQ7),8:new GA(this,this._assets,k.quests.ForestQ8),9:new jA(this,this._assets,k.quests.ForestQ9),10:new AA(this,this._assets,k.quests.ForestQ10),11:new CA(this,this._assets,k.quests.ForestQ11),12:new yA(this,this._assets,k.quests.ForestQ12)}}migrateQuestProgress(){const k=this.getCurrentQuestID();switch(k){default:case 1:case 2:this.startQuest(1,!0);break;case 3:case 4:case 5:this.startQuest(4,!0);break;case 6:case 7:this.startQuest(7,!0);break;case 8:this.startQuest(8,!0);break;case 9:this.startQuest(9,!0);break;case 10:this.startQuest(10,!0);break;case 11:this.startQuest(11,!0);break;case 12:this.startQuest(12,!0);break;case 13:}this.awardMissingQuestItems(k)}awardMissingQuestItems(k){const B=[],U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k>5&&!U.kennel.hasPet(LA.c.PET_AWARD_ID)&&B.push({type:"pet",ID:LA.c.PET_AWARD_ID,N:1,data:{level:U.getLevel(),stars:hi.s.xpRequiredForLevel(U.getLevel(),yo.V.Pet)}}),k>6&&B.push({type:"spell",ID:13},{type:"item",ID:67}),k>8&&B.push({type:"spell",ID:14},{type:"item",ID:69});const F=Tn.J.filterDuplicateItems(this.game,B);if(F.length>0)for(const G of F)Tn.J.bagItem(G,this.game,"pet"===G.type?"got-pet":"got-item",void 0,{source_type:gn.C.QuestReward});k>10&&U.backpack.consume("item",69,1)}start(k,B,U){super.start(k,B,U),this.showTopLeftNavigationButton()}createTopLeftNavigationButton(){this.showTopLeftNavigationButton()}placeDaily(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;(1===this.getState("hasdaily")||j.Aq$.isDefined(this.getQuestState())&&this.getQuestState().ID>1&&this.getQuestState().ID>1)&&F.backpack.hasItem("item",78)<99&&(this.firefly=U.addFireflyEvent(1260*Math.random(),700*Math.random(),150,150,this.fireflyOnClick.bind(this,U,k),null,0))}fireflyOnClick(k,B){const U=K.q.instance.prodigy.event.create();U.validPath(k.user,k.path,this.firefly.x+75,this.firefly.y+115),U.set(k.user,"evtProc",!0),U.function(this.interactFirefly.bind(this,k,B)),U.set(k.user,"evtProc",!1),U.start()}interactFirefly(k,B){if(!this.firefly.moving&&Math.abs(k.user.x-this.firefly.x)<150&&Math.abs(this.firefly.y+100-k.user.y)<150){this.firefly.destroy(),K.q.instance.prodigy.open.gotItem([{type:"item",ID:78}],null,null,"firefly");const k=[];for(const B in this.maps)k.push(B);const U=new nA.t(this.getState("daily").date);for(let F=0;F<5;F++)if(k[Math.floor(U.jumpFromStart(F)*(k.length-1))]===B.tag){const k=this.getState("daily").flags;k[F]=0,this.setState("daily",{date:this.getState("daily").date,flags:k,rewards:this.getState("daily").rewards})}}}teleport(k,B,U,F,G){tf.J.meetsNarrativeIntroRequirements?K.q.instance.prodigy.world.it("lamplight-B3"):super.teleport(k,B,U,F,G)}}class HA extends aA{constructor(k,B){super(k,"A3","MAP_FOREST_MOUNTAIN_GATE",1100,580,["forest_hard-A4"],B)}}class VA extends aA{constructor(k,B){super(k,"A4","MAP_FOREST_MOUNTAIN_PASS",1080,520,["forest_hard-A3","forest_hard-A5","forest_hard-B5"],B)}}class WA extends aA{constructor(k,B){super(k,"A5","MAP_FOREST_FIREFLY_CROSSING",220,90,["forest_hard-A4"],B)}}class qA extends aA{constructor(k,B){super(k,"B5","MAP_FOREST_CROSSROADS",1100,630,["forest_hard-A4","forest_hard-C4","forest_hard-B6"],B)}}class KA extends aA{constructor(k,B){super(k,"B6","MAP_FOREST_GRASSY_CLEARING",200,630,["forest_hard-B5","forest_hard-B7"],B)}}class zA extends aA{constructor(k,B){super(k,"B7","MAP_FOREST_FISHERMANS_POND",1190,240,["forest_hard-B6","forest_hard-C7"],B)}}class YA extends aA{constructor(k,B){super(k,"B8","MAP_FOREST_FIREFLY_CLEARING",1190,480,["forest_hard-C8"],B.concat(q._.Npc_sprite_merchant_json))}}class QA extends aA{constructor(k,B){super(k,"C4","MAP_FOREST_THE_OLD_ROAD",300,520,["forest_hard-B5","forest_hard-D3"],B.concat([q._.Npc_sprite_merchant_json]))}}class XA extends aA{constructor(k,B){super(k,"C7","MAP_FOREST_STONEFISH_BEACH",200,630,["forest_hard-B7","forest_hard-C8"],B)}}class ZA extends aA{constructor(k,B){super(k,"C8","MAP_FOREST_BIG_TREE",1190,520,["forest_hard-C7","forest_hard-B8"],B.concat(q._.Npc_sprite_flora_json,q._.Npc_sprite_merchant_json))}}class JA extends aA{constructor(k,B){super(k,"D3","MAP_FOREST_OLD_ROAD_REMAINS",200,520,["forest_hard-C4"],B.concat(q._.Boss_gerald_json,J.Q.Spine_boss_marionette_json,J.Q.Spine_music_notes_json))}}class tC extends $A{constructor(k){super(k),this.questManagerIdentifier="123-14b6",this._assets=[Rn.t.Tileset_firefly_new_png,q._.Npc_sprite_wizard_json,q._.Zone_forest_json,Rn.t.Tileset_collisions_png,X.V.Bgm_firefly_forest],this.name="Firefly Forest",this.ID=hn.A_.FORESTHARD,this.guardian="FOREST_GUARDIAN",this.battleBG="battle-forest-outside",this.defaultOnFaint="forest_hard-C8",this.questHub="forest_hard-C8",this.bgmID=15,this.currency=13,this.zoneIndex=pT.P.Firefly,this.difficultyMode=ri.i.Hard,this.states=["chest1","chest2","chest3","chest4","wizard1","wizard2","wizard3","wizard4","daily","hasdaily","fakeMonsterDefeated","questMonsterDefeated","chest5","chest6","chest7",Zu.PIPPET_ENCOUNTER,Zu.PIPPET_REMATCH,Zu.PIPPET_DEFEATED,"flutePlayed"],this.monsters=[],this.maps={A3:new HA(this,this._assets),A4:new VA(this,this._assets),A5:new WA(this,this._assets),B5:new qA(this,this._assets),B6:new KA(this,this._assets),B7:new zA(this,this._assets),B8:new YA(this,this._assets),C4:new QA(this,this._assets),C7:new XA(this,this._assets),C8:new ZA(this,this._assets),D3:new JA(this,this._assets)}}}var eC,iC=U(75017),sC=U(93375);class nC extends Un.T{constructor(k,B){super(k,"exterior","MAP_HOUSE_EXTERIOR",685,420,["house-exit","suburbs"],B.concat(Rn.t.Tileset_exterior_general_png,X.V.Bgm_fun))}setup(k,B,U){super.setup(k,B,U);K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasCompletedTutorial()&&(this.addAreaEvent(k,B,{x:1240,y:480,w:80,h:240,rect:!0},"house-exit",120,580,null,LT.K.RIGHT),this.addAreaEvent(k,B,{x:685,y:300,w:100,h:160,rect:!0},"suburbs",null,null,null,LT.K.UP))}}class aC extends Un.T{constructor(k,B,U,F,G){super(k,U,"",B.houses[U].entryPoint.x,B.houses[U].entryPoint.y,F,G.concat(B.assets)),this.content=null,this.houseItems=[],this.player=null,this.houseData=null,this.houseTag=null,this.houseData=B.houses[U],this.houseTag=this.houseData.tag}setup(k,B,U){return super.setup(k,B,U),this.content=B.content,this.game=k,{}}setOwner(k){this.player=k,this.zoneName=`house-${this.player.userID}`}cleanup(){this.houseItems=[],this.content=null,super.cleanup()}loadHouseItems(k){for(let B=0;B-1&&this.houseItems.splice(B,1)}canPlaceItem(k){const B=k.getRenderer();if(!this.isValidSpace(B.getWorld(),B.getWidth(),B.getHeight()))return!1;for(let U=0;U0?1:0)),q=Math.floor(F-.5*$-($>0?1:0));return!(q>64||V>32||W<0||H<0)&&((1===this.screen.area[H][W]&&1===this.screen.area[H][q]||6===this.screen.area[H][W]&&6===this.screen.area[H][q])&&(1===this.screen.area[V][W]&&1===this.screen.area[V][q]||6===this.screen.area[V][W]&&6===this.screen.area[V][q]))}checkOverlap(k,B){if(k.getWorld().y>B.getWorld().y)return!1;const U=k.getBounds(),F=B.getBounds();return U.x+=2,U.y+=2,U.width-=4,U.height-=4,F.x+=2,F.y+=2,F.width-=4,F.height-=4,j.M_G.intersects(U,F)}getName(){const k=le.t.getCategoryItems("dormbg");for(let B=0;B!k._game)).forEach((k=>{this.removeHouseItem(k)})),this.player.house.snapDormItems(),this.loadHouseItems(this.player.house.getSortedActive()),null}start(k,B,U){return super.start(k,B,U),this.game.broadcaster.addAppListener(oi.F0.OpenEditor,this.openedEditor.bind(this),this),this.game.broadcaster.addAppListener(oi.F0.CloseEditor,this.closedEditor.bind(this),this),null}cleanup(){this.game.broadcaster.removeAppListener(oi.F0.OpenEditor,this),this.game.broadcaster.removeAppListener(oi.F0.CloseEditor,this),super.cleanup()}openedEditor(){K.q.instance.prodigy.open.houseEditorMenu(this,this.screen),this.screen.walkEnabled=!1,this.screen.user.stopTweens(),this.screen.user.stand();for(const k in this.screen.playerList)this.fadeOutPlayerContainer(this.screen.playerList[k]);this.fadeOutPlayerContainer(this.screen.user),this.game.broadcaster.addAppListener(oi.u0.PlayerAdded,this.playerEnteredHouse.bind(this),this)}fadeOutPlayerContainer(k){if(this.setInputEnabled(k,!1),j.Aq$.isDefined(k.follow)&&(this.game.add.tween(k.follow,this).to({alpha:0},300,j.GS3.Cubic.Out).start(),k.follow instanceof yr._)){const B=k.follow.findComponent(Er);j.Aq$.isDefined(B)&&B.fade(0,300)}return this.game.add.tween(k,this).to({alpha:0},300,j.GS3.Cubic.Out).start()}closedEditor(){for(const k in this.screen.playerList)this.fadeInPlayerContainer(this.screen.playerList[k]);this.game.broadcaster.addAppListener(oi.pm.StopPlayer,(()=>{this.fadeInPlayerContainerImmediately(this.screen.user),this.screen.walkEnabled=!0,this.game.broadcaster.removeAppListener(oi.pm.StopPlayer,this)}),this),this.fadeInPlayerContainer(this.screen.user).onTweenComplete.addOnce((()=>{this.screen.walkEnabled=!0,this.game.broadcaster.removeAppListener(oi.pm.StopPlayer,this)}),this),this.game.broadcaster.removeAppListener(oi.u0.PlayerAdded,this)}fadeInPlayerContainer(k){if(this.setInputEnabled(k,!0),j.Aq$.isDefined(k.follow)&&(this.game.add.tween(k.follow,this).to({alpha:1},300,j.GS3.Cubic.In).start(),k.follow instanceof yr._)){const B=k.follow.findComponent(Er);j.Aq$.isDefined(B)&&B.fade(1,300)}return this.game.add.tween(k,this).to({alpha:1},300,j.GS3.Cubic.In).start()}fadeInPlayerContainerImmediately(k){if(this.setInputEnabled(k,!0),j.Aq$.isDefined(k.follow)&&(k.follow.alpha=1,k.follow instanceof yr._)){const B=k.follow.findComponent(Er);j.Aq$.isDefined(B)&&B.setAlpha(1)}k.alpha=1}playerEnteredHouse(k){k.alpha=0,this.setInputEnabled(k,!0)}setInputEnabled(k,B){const U=k.sprites.children;for(let F=0;F=this.sprites.children.length&&(this.visible=!0,this.stand())}update(){super.update();const k=Date.now();for(let B=0;B{if(B){let k=null;for(let U=0;U{U.inputEnabled=!0,U.events.onInputDown.add((()=>{B.sendNpcClickedEvent(),this.onMozzaEllaClick(k)}))}))}else j.VyI.log(`Could not find house with ID: ${this.houseID} in store`,j.$bb.Error)}else j.VyI.log(`Could not place Mozza Ella due to error with store - ${k.getErrorMessage()}`,j.$bb.Error)}))}onMozzaEllaClick(k){const B=K.q.instance.prodigy.event.create();B.text(11,"mozza-ella"),B.function(this.showPurchasePopup.bind(this,k)),B.start()}showPurchasePopup(k){const B=le.t.getCategoryItems("dormbg");let U=null;for(let j=0;j0?String(F):G.getText("ITEM_FREE"),H=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,V=U.data.member>0&&!H.hasMembership();K.q.instance.prodigy.open.messageBoxGeneric(G.getText("HOUSE_PREVIEW_PURCHASE_MESSAGE"),(()=>{this.onBuyButtonClick(U,k)}),(()=>{K.q.instance.prodigy.world.it(hn.A_.HOUSE)}),null,null,null,7,{modifyProperty:[{element:"yesText",property:"text",value:$},{element:"membershipGraphic",property:"visible",value:V},{element:"houseGraphic",property:"atlasName",value:le.t.getIconAtlas({ID:j.Aq$.isDefined(U)?U.ID:0,type:"dormbg",cost:k})},{element:"houseGraphic",property:"frameName",value:le.t.getIconFrame({ID:j.Aq$.isDefined(U)?U.ID:0,type:"dormbg",cost:k})}],addChildren:[]})}onBuyButtonClick(k,B){const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=Tn.J.getPurchasePrice(k.data,B);1!==k.data.member||U.hasMembership()?U.getGold()-1?k=[0]:this.houseTag.indexOf("medium")>-1?k=[1,2]:this.houseTag.indexOf("large")>-1?k=[3,4]:"forest"===this.houseTag?k=[5,6]:"coolCave"===this.houseTag?k=[7,8]:"firePit"===this.houseTag&&(k=[9,10]),k[Math.floor(Math.random()*k.length)]}}class cC extends Un.T{constructor(k,B){super(k,"warden","Academy Entrance",160,600,["house-exterior"],[Rn.t.Tileset_generic_new_png,Rn.t.Tileset_town_new_png,Rn.t.Tileset_forest_new_png,Rn.t.Tileset_collisions_png,q._.Npc_sprite_gnome_json,q._.Zone_lamplight_json,X.V.Bgm_tutorial,X.V.Bgm_puppetmaster,X.V.Bgm_lamplight,Z.c.Sfx_lamplight,q._.Npc_sprite_scoog_json],"map-lamplight-B0")}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:160,y:680,w:240,h:80,rect:!0},"house-exterior",160,120,null,LT.K.DOWN);const F=[];F.push(B.content.addChild(K.q.instance.prodigy.create.sprite(400,360,q._.Zone_lamplight_json,"pedestal"))),F.push(B.content.addChild(K.q.instance.prodigy.create.sprite(640,360,q._.Zone_lamplight_json,"pedestal"))),F.push(B.content.addChild(K.q.instance.prodigy.create.sprite(880,360,q._.Zone_lamplight_json,"pedestal"))),F.push(B.content.addChild(K.q.instance.prodigy.create.sprite(520,440,q._.Zone_lamplight_json,"pedestal"))),F.push(B.content.addChild(K.q.instance.prodigy.create.sprite(760,440,q._.Zone_lamplight_json,"pedestal")));for(let G=0;G{Ta.i.openLockMessage(hn.A_.HOUSE)});let G=null;return this.featureRequirements.meetsRequirementsDeprecated(37)||(G=()=>{Ta.i.openLockMessage(hn.A_.LAMPLIGHT)}),this.addAreaEvent(k,B,{x:40,y:580,w:80,h:240,rect:!0},"suburbs",null,null,F,LT.K.LEFT),this.addAreaEvent(k,B,{x:1240,y:380,w:80,h:240,rect:!0},"lamplight-A4",120,500,G,LT.K.RIGHT),null}}class lC extends $n.Z{constructor(k){super(k,"exterior",[q._.Npc_sprite_noot_json,"monster-reduced-38",Rn.t.Tileset_collisions_png,Rn.t.Tileset_generic_new_png,Rn.t.Tileset_forest_new_png,X.V.Bgm_fun]),this.loadingData.time=1}setup(k,B,U){super.setup(k,B,U),B.user.x=600,B.user.y=480,this.exit=this.addAreaEvent(k,B,{x:1240,y:480,w:80,h:240,rect:!0},null,120,500,this.end.bind(this,k),LT.K.RIGHT),this.noot=B.addNPC(770,480,q._.Npc_sprite_noot_json),this.noot.float(!0),this.noot.walkSpeed=2}start(k,B){super.start(k,B,11);const U=B.foreground.addChild(K.q.instance.prodigy.create.sprite(this.noot.x,this.noot.y-50,q._.General_core_json,"area-pointer"));U.anchor.set(.5,.5),U.visible=!1,U.angle=90,U.scale.x=U.scale.y=0;const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;j.Aq$.isDefined(F.backpack.data.hat)&&(F.backpack.data.hat=F.backpack.data.hat.filter((k=>12!==k.ID)));const G=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),$=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);G.execute($.getStateMachine(45),{scene:this,game:k,screen:B,pointer:U,exit:this.exit,noot:this.noot},null)}jumpHand(k,B,U){B.visible=!0,k.add.tween(B.scale,this).to({x:1,y:1},800,j.GS3.Quadratic.Out).start(),k.add.tween(B,this).to({y:B.y-100},1e3,j.GS3.Quadratic.Out).to({y:B.y+50},1e3,j.GS3.Quadratic.In).start();const F=k.add.tween(B,this).to({x:1180},2e3,j.GS3.Linear.None);j.Aq$.isDefined(U)&&F.onTweenComplete.add(U),F.start()}end(k){K.q.instance.prodigy.world.it("house-exit",480,320),this.zone.completeSequence(1,2)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),this.exit&&(this.exit.destroy(),this.exit=null),super.cleanup()}}class uC extends $n.Z{constructor(k){super(k,"exterior",[q._.Npc_sprite_noot_json,"monster-reduced-38",Rn.t.Tileset_collisions_png,Rn.t.Tileset_generic_new_png,Rn.t.Tileset_forest_new_png,X.V.Bgm_fun]),this.loadingData.time=1}setup(k,B,U){super.setup(k,B,U),this.noot=B.addNPC(770,480,q._.Npc_sprite_noot_json),this.noot.float(!0),this.noot.walkSpeed=2,B.user.x=600,B.user.y=480,B.user.hideName()}start(k,B){super.start(k,B,11);const U=this.addMonster(k,B,1,this.game.width+100,480,!1,{encounter:[{ID:59}]},!0),F=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),G=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);F.execute(G.getStateMachine(44),{scene:this,game:k,screen:B,player:B.user,open:K.q.instance.prodigy.open,noot:this.noot,monster:U,path:B.path,pathfinder:B.path},null)}battle(k){const B={revampBattleType:Ni.gu.Tutorial1,intro:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_WIZARD_BATTLE"),screen:"battle-forest-generic",encounter:[{ID:59}],difficulty:2,dropsDisabled:!0,drops:[{type:"gold",N:50}]};this.technicalMetricsManager.sendOnboardingFunnelEvent(Gh.l.FirstTutorialBattleStarted),K.q.instance.prodigy.battle.battleStats.type="FirstTutorialBattle",K.q.instance.prodigy.battle.start(B,this.end.bind(this,k),this.end.bind(this,k),this.end.bind(this,k),"house-exit")}end(k){this.technicalMetricsManager.sendOnboardingFunnelEvent(Gh.l.FirstTutorialBattleWon),K.q.instance.prodigy.world.it("house-exterior",450,400),this.zone.completeSequence(1,1)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),super.cleanup()}}class fC extends $n.Z{constructor(k,B){super(k,"exterior",[q._.Npc_sprite_noot_json,"monster-reduced-38",Rn.t.Tileset_collisions_png,Rn.t.Tileset_generic_new_png,Rn.t.Tileset_forest_new_png,X.V.Bgm_fun]),this.noot=null,this.loadingData.time=1}setup(k,B,U){super.setup(k,B,U),this.game=k,B.user.x=1500,B.user.y=480,this.noot=B.addNPC(1500,500,q._.Npc_sprite_noot_json),this.noot.float(!0)}start(k,B){super.start(k,B,9);const U=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),F=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);U.execute(F.getStateMachine(191),{game:k,screen:B,scene:this,player:B.user,noot:this.noot,open:K.q.instance.prodigy.open,path:B.path,pathfinder:B.path},null)}end(k){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasCompletedTutorial()||K.q.instance.prodigy.world.getZone(hn.A_.HOUSE).completeQuest(1),K.q.instance.prodigy.world.it("forest-C8")}cleanup(){this.technicalMetricsManager.sendOnboardingFunnelEvent(Gh.l.TutorialComplete);const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.data.isPostTutorialBattleTime=!0,k.forceSaveCharacter(),k.saveEnabled=!1,this.noot&&(this.noot.destroy(),this.noot=null),super.cleanup()}}class bC extends $n.Z{constructor(k,B){super(k,"suburbs",B.concat([q._.Npc_sprite_noot_json,Z.c.Sfx_house_intro,X.V.Bgm_fun])),this.loadingData.time=1}setup(k,B,U){super.setup(k,B,U),B.user.x=480,B.user.y=280,B.user.hideName(),B.user.setWeaponHidden(!0),K.q.instance.prodigy.create.houseItem(B.background,17,480,160),B.foreground.addChild(K.q.instance.prodigy.create.sprite(420,160,nr.q.Sheets_dorm_17)),K.q.instance.prodigy.create.houseItem(B.background,3,400,160),K.q.instance.prodigy.create.houseItem(B.background,18,440,100),K.q.instance.prodigy.create.houseItem(B.background,18,840,100),K.q.instance.prodigy.create.houseItem(B.background,14,880,240),K.q.instance.prodigy.create.houseItem(B.background,1,880,140),K.q.instance.prodigy.create.houseItem(B.background,13,640,80)}start(k,B){super.start(k,B,11),this.technicalMetricsManager.sendOnboardingFunnelEvent(Gh.l.TutorialStart),this.houseIntro(k,B)}houseIntro(k,B){const U=B.addNPC(820,540,q._.Npc_sprite_noot_json);U.float(!0),U.walkSpeed=2,U.visible=!1;const F=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),G=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);F.execute(G.getStateMachine(56),{scene:this,game:k,screen:B,zone:this.zone,player:B.user,noot:U,path:B.path,pathfinder:B.path},null)}}class pC extends $n.Z{constructor(k,B){super(k,"exit",[q._.Npc_sprite_noot_json,Z.c.Sfx_house_intro,X.V.Bgm_fun,Z.c.Sfx_lamplight,Z.c.Sfx_lamplight_pets]),this.noot=null,this.loadingData.time=1}setup(k,B,U){super.setup(k,B,U),B.user.x=-100,B.user.y=600,this.monsters=[],this.monsters.push(this.makeMonster(136,1,k,B)),this.monsters.push(this.makeMonster(139,2,k,B)),this.monsters.push(this.makeMonster(145,3,k,B)),this.monsters.push(this.makeMonster(142,4,k,B)),this.monsters.push(this.makeMonster(148,5,k,B))}start(k,B){super.start(k,B,11),this.noot=B.addNPC(340,500,q._.Npc_sprite_noot_json),this.noot.float(!0),this.noot.visible=!1;const U=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),F=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);U.execute(F.getStateMachine(46),{game:k,screen:B,scene:this,player:B.user,monsterOne:this.monsters[0],monsterTwo:this.monsters[1],monsterThree:this.monsters[2],monsterFour:this.monsters[3],monsterFive:this.monsters[4],noot:this.noot,path:B.path,pathfinder:B.path,controller:U,service:F},null)}end(){K.q.instance.prodigy.world.it("academy-GH3",640,700,null,{fadeIn:!0,time:200,fadeOut:!1})}endBattle(){const k=K.q.instance.prodigy.dialogue.create();k.setText({index:199}),k.setText({callback:()=>{this.end()}}),k.startDeprecated("noot",!1),this.zone.completeSequence(1,3)}choosePet(k,B,U){this.technicalMetricsManager.sendOnboardingFunnelEvent(Gh.l.InspectPet),K.q.instance.prodigy.open.choosePet(U,(()=>{this.petsLeave(k,B,U)}))}rescueBattle(k,B){const U={revampBattleType:Ni.gu.Tutorial2,intro:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_WIZARD_BATTLE"),starOverride:20,screen:"battle-forest-generic",dropsDisabled:!0,drops:[{type:"gold",N:50}],encounter:[{ID:B.monsterData.ID}],difficulty:3};K.q.instance.prodigy.battle.battleStats.type="RescueTutorialBattle",K.q.instance.prodigy.battle.start(U,(()=>{this.endBattle()}),(()=>{this.endBattle()}),(()=>{this.endBattle()}),"house-exit")}petsLeave(k,B,U){const F=$.remove(this.monsters,(k=>k.getSource().getID()===U))[0],G=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),H=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);G.execute(H.getStateMachine(47),{game:k,screen:B,scene:this,noot:this.noot,player:B.user,chosenMonster:F,monsterOne:this.monsters[0],monsterTwo:this.monsters[1],monsterThree:this.monsters[2],monsterFour:this.monsters[3],path:B.path,pathfinder:B.path,controller:G,service:H},null)}makeMonster(k,B,U,F){const G=this.addMonster(U,F,B,500,200,!1,{encounter:[{ID:k}]},!0,this.choosePet.bind(this,U,F,k));return G.alpha=0,G.walkSpeed=2,G}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null);for(let k=0;k-1||k.indexOf("exterior")>-1||k.indexOf("warden")>-1)return void super.teleport(k,B,U,F,G);K.q.instance.prodigy.loading(!0);const H=j.Aq$.isDefined($)?$:K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.player=H;const V=B=>{this.teleportResponseCallback(B,k,H,F,G)};K.q.instance.prodigy.gameContainer.get("c97-bd0d").getCharData(H.userID.toString(),["system"],V,V)}teleportResponseCallback(k,B,U,F,G={}){const $=j.Aq$.isDefined(k)?k[U.userID]:null;if(K.q.instance.prodigy.loading(!1),j.Aq$.isDefined($)&&j.Aq$.isDefined($.system)&&$.system.is_house_locked){const k=K.q.instance.prodigy.classModeController.getInClassDisabledZones();k.includes("WORLD_YOUR_HOUSE")||k.push("WORLD_YOUR_HOUSE"),K.q.instance.prodigy.open.messageBoxPrefab({text:"SYSTEM_LOCKED_HOUSE",confirmButtonTextKey:"BUTTON_OKAY_UPPERCASE"})}else{let k=B;if(G.assets=j.Aq$.isDefined(G.assets)?G.assets:[],G.autoStart=!0,-1===k.indexOf("preview")){let B=this.getHouseMapFromTag(U.house.getCurrentHouseTag());if(j.Aq$.isDefined(B)||(B=this.getHouseMapFromTag("suburbs")),!j.Aq$.isDefined(this.maps[B]))return void j.VyI.log(`House was not found: ${B}`,j.$bb.Verbose);k=B}this.maps[k].setOwner(U),super.teleport(k,null,null,F,G)}}openHouseStore(){K.q.instance.prodigy.open.houseStore((()=>{K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.house.setAllInactive(),this.teleport("")}),{message:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MOVE_HOUSE_CONFIRM")},iC.p.NEW_HOUSE)}getDailyMaps(){return[]}onWorldMapHouseIconClick(){this.game.broadcaster.removeAppListener(oi.F0.ClickedHouseIcon,this,"UI"),K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_HOUSE_MOVING,ln.B.BREADCRUMB_CLICKED_WORLD_MAP_HOUSE)||K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_HOUSE_MOVING,ln.B.BREADCRUMB_CLICKED_WORLD_MAP_HOUSE),K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_HOUSE_VISITING,ln.B.BREADCRUMB_CLICKED_WORLD_MAP_HOUSE)||K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_HOUSE_VISITING,ln.B.BREADCRUMB_CLICKED_WORLD_MAP_HOUSE)}intializeHouseMaps(){this.game.broadcaster.removeAppListener(oi.fP.Loaded,this);const k=[Rn.t.Tileset_collisions_png,Rn.t.Tileset_wall_collisions_png,Rn.t.Tileset_firefly_new_png,Rn.t.Tileset_generic_new_png,Rn.t.Tileset_minecarts_png,X.V.Bgm_tutorial,Rn.t.Tileset_exterior_general_png,X.V.Bgm_lamplight];this.maps={exit:new dC(this,k),exterior:new nC(this,k),warden:new cC(this,k)};const B=le.t.getCategoryItems("dormbg");for(const U in vC.HOUSES){const F=vC.HOUSES[U];for(const U in F.houses){let G=-1;for(let k=0;k{this.openHarveyStore()}),this);const V=this.screen.content.addChild(K.q.instance.prodigy.create.sprite(385,380,q._.Boss_titan_json,"harveySign"));V.anchor.x=.5,V.anchor.y=1,V.inputEnabled=!0,V.events.onInputDown.add((()=>{K.q.instance.prodigy.open.titanProgress(!0)})),B.addDoor({x:560,y:240,w:120,h:160,targetX:620,targetY:400},K.q.instance.prodigy.open.store.bind(K.q.instance.prodigy.open,3,void 0,void 0,{originType:bi.$N.Door})),B.addDoor({x:1e3,y:160,w:120,h:160,targetX:1060,targetY:320},K.q.instance.prodigy.open.stylistStore.bind(K.q.instance.prodigy.open,null,null,null,K.q.instance.prodigy.skin.isFestivalActive("Summerfest")?k=>{$.times(2,(B=>{const U=0===B?50:51,F=k.getPages()[B];F.setStoreItems($.differenceWith(F.getStoreItems(),le.t.getItem("itemTable",U).data.items,((k,B)=>k.getType()===B.type&&k.getID()===B.ID)))}))}:null))}openHarveyStore(){const k=new Ti.rD(this.game);k.addEvents([{callback:()=>{k.close(),K.q.instance.prodigy.open.store(21)}}]),k.start()}setIndicator(k){this.indicator=TT.createIndicator(k),this.indicator.position.set(-5,-105),this.indicator.inputEnabled=!0,this.game.add.tween(this.indicator,this).to({y:this.indicator.y-20},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0)}}const IC={x:40,y:500},DC={x:1120,y:60},RC={x:1240,y:420};class PC extends mC{constructor(k,B){super(k,"A4","MAP_LAMPLIGHT_PET_PARK",1120,180,["house-exit","lamplight-A3","lamplight-B4"],B,[{targetMapTag:"house-exit",position:IC,angle:eC.Left},{targetMapTag:"lamplight-A3",position:DC,angle:eC.Up},{targetMapTag:"lamplight-B4",position:RC,angle:eC.Right}])}setup(k,B,U={}){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1150,y:700,w:340,h:80,rect:!0},"lamplight-B2",320,340,null,LT.K.DOWN),K.q.instance.prodigy.world.getZone(hn.A_.HOUSE).completeQuest(1);const F=$.get(U,"distractCallback",null);this.addAreaEvent(k,B,Object.assign(Object.assign({},IC),{w:80,h:160,rect:!0}),"house-exit",1160,380,$.get(U,"blockDirectionCallbacks.left",null),LT.K.LEFT),this.addAreaEvent(k,B,Object.assign(Object.assign({},DC),{w:160,h:120,rect:!0}),"lamplight-A3",1120,540,$.get(U,"blockDirectionCallbacks.up",null),LT.K.UP),this.addAreaEvent(k,B,Object.assign(Object.assign({},RC),{w:80,h:200,rect:!0}),"lamplight-B4",120,457.5,$.get(U,"blockDirectionCallbacks.right",F),LT.K.RIGHT),B.addDoor({x:280,y:240,w:120,h:160,targetX:340,targetY:400},(()=>{K.q.instance.prodigy.open.store(1)}))}}class MC extends mC{constructor(k,B){super(k,"B0","MAP_LAMPLIGHT_ACADEMY_ENTRANCE",-500,600,["lamplight-B1"],B.concat([q._.Zone_lamplight_json,Rn.t.Tileset_firefly_new_png,X.V.Bgm_puppetmaster,Z.c.Sfx_academy_portal_open,Z.c.Sfx_academy_portal_close,X.V.Bgm_academy_greathall]),[])}setup(k,B,U={}){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;ti.U.progressData.step===Ze.B.NotStarted&&F.hasFoundAllKeystones()?jn.E.runAllKeystonesSequenceOnMapSetup((()=>(0,G.sH)(this,void 0,void 0,(function*(){this.setup(k,B,U)})))):K.q.instance.prodigy.world.zones.academy.playScene("introPt1")}}const NC={x:40,y:480},xC={x:1100,y:680};class LC extends mC{constructor(k,B){super(k,"B1","MAP_LAMPLIGHT_ACADEMY_CROSSROADS",160,600,["forest-C8","lamplight-B2"],B,[{targetMapTag:"forest-C8",position:NC,angle:eC.Left},{targetMapTag:"lamplight-B2",position:xC,angle:eC.Down}])}setup(k,B,U={}){super.setup(k,B);let F=null;F=this.featureRequirements.meetsRequirementsDeprecated(32)?$.get(U,"distractCallback",null):()=>{Ta.i.openLockMessage(hn.A_.FOREST)},this.addAreaEvent(k,B,Object.assign(Object.assign({},xC),{w:240,h:80,rect:!0,canReTrigger:!0}),"lamplight-B2",640,260,null,LT.K.DOWN);let G;switch(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.currentDifficulty){case ri.i.Expert:G="forest_expert-C8";break;case ri.i.Hard:G="forest_hard-C8";break;default:G="forest-C8"}this.addAreaEvent(k,B,Object.assign(Object.assign({},NC),{w:80,h:240,rect:!0}),G,1160,520,F,LT.K.LEFT)}}const kC={x:640,y:40},BC={x:1240,y:440},UC={x:40,y:320};class FC extends mC{constructor(k,B){super(k,"B2","MAP_LAMPLIGHT_OUTSKIRTS",640,220,["lamplight-A2","lamplight-B1","lamplight-C2"],B,[{targetMapTag:"lamplight-B1",position:kC,angle:eC.Up},{targetMapTag:"lamplight-C2",position:BC,angle:eC.Right},{targetMapTag:"lamplight-A2",position:UC,angle:eC.Left}])}setup(k,B,U={}){super.setup(k,B),this.addAreaEvent(k,B,Object.assign(Object.assign({},kC),{w:240,h:200,rect:!0}),"lamplight-B1",1100,600,null,LT.K.UP),this.addAreaEvent(k,B,Object.assign(Object.assign({},BC),{w:80,h:160,rect:!0}),"lamplight-C2",120,320,null,LT.K.RIGHT),this.addAreaEvent(k,B,Object.assign(Object.assign({},UC),{w:80,h:160,rect:!0}),"lamplight-A2",1160,360,null,LT.K.LEFT)}}const GC={x:1240,y:380},jC={x:40,y:380},$C={x:650,y:300};class HC extends mC{constructor(k,B){super(k,"B3","MAP_LAMPLIGHT_TOWN_SQUARE",120,417.5,["lamplight-A3","lamplight-C3"],B.concat(q._.Zone_lamplight_json,q._.Npc_sprite_merchant_json,J.Q.Spine_npc_slimerella_json),[{targetMapTag:"lamplight-C3",position:GC,angle:eC.Right},{targetMapTag:"lamplight-A3",position:jC,angle:eC.Left},{targetMapTag:"moon-A1",position:$C,angle:eC.Up}])}init(k,B,U,F){if(K.q.instance.prodigy.skin.isFestivalActive(Qe.R.Springfest)){const k=K.q.instance.prodigy.skin.active.find((k=>k instanceof Qw));if(j.Aq$.isDefined(k))for(const[B,U]of Object.entries(k.b3FishLayerStates))this.enableLayerID(Number(B),U)}else Tn.J.isNightTime()?(this.enableLayerID(1,!0),this.enableLayerID(0,!1)):(this.enableLayerID(1,!1),this.enableLayerID(0,!0));return super.init(k,B,U,F)}setup(k,B,U={}){super.setup(k,B),this.setupAsync(k,B,U).catch(j.RQr.createHandler("Error setting up LamplightB3"))}setupAsync(k,B){return(0,G.sH)(this,arguments,void 0,(function*(k,B,U={}){if(this.addAreaEvent(k,B,Object.assign(Object.assign({},GC),{w:80,h:240,rect:!0}),"lamplight-C3",120,437.5,null,LT.K.RIGHT),this.addAreaEvent(k,B,Object.assign(Object.assign({},jC),{w:80,h:240,rect:!0}),"lamplight-A3",1160,437.5,null,LT.K.LEFT),tf.J.meetsNarrativeIntroRequirements)return K.q.instance.game.input.enabled=!1,void this.zone.playScene("campaignReplayNarrativeIntro");if(tf.J.meetsNarrativeCatchupRequirements)return K.q.instance.game.input.enabled=!1,void this.zone.playScene("campaignReplayNarrativeCatchup");const F=K.q.instance.prodigy.gameContainer.get("d0e-64fd");if(K.q.instance.prodigy.skin.isFestivalActive(Qe.R.Summerfest))this.slimerella=new Zw.p(this.game,"NPC_NAME_SCIENTIST_SLIME",491,Kn.ac.Merchant,B.content,950,570,"idle",B.foreground);else if(K.q.instance.prodigy.skin.isFestivalActive(Qe.R.StarlightFestival)||K.q.instance.prodigy.skin.isFestivalActive(Qe.R.Pumpkinfest)||K.q.instance.prodigy.skin.isFestivalActive(Qe.R.Winterfest)||K.q.instance.prodigy.skin.isFestivalActive(Qe.R.MoonlightFestival));else if(K.q.instance.prodigy.skin.isFestivalActive())this.slimerella=new Zw.p(this.game,"NPC_NAME_SCIENTIST_SLIME",491,Kn.ac.Merchant,B.content,260,575,"idle",B.foreground);else{B.content.addChild(K.q.instance.prodigy.create.image(987,80,q._.Zone_lamplight_json,Tn.J.isNightTime()?"twilight-wheel":"twilight-wheel-off")),B.addDoor({x:1e3,y:80,w:200,h:200,targetX:1100,targetY:280,disableSound:!0},(()=>{this.openTwilightWheel(this.game,B)}));const k={gnomeWheelerNpcOnClick:(...k)=>{this.openTwilightWheel(this.game,B)}},U={gnomeSpinnerNpcOnClick:(...k)=>{this.openDayWheel(this.game,B)}};Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(F,Ei.l.NPCGnomeWheeler,k,B.contentGameObject).then((k=>(0,G.sH)(this,void 0,void 0,(function*(){k.transform.setPosition(960,300),B.data.addCollisionZone(B,940,230,90,90)})))).catch(j.RQr.createHandler("Error loading NPC Gnome Wheeler")),B.content.addChild(K.q.instance.prodigy.create.image(95,80,q._.Zone_lamplight_json,"wheel-of-wonder")),B.addDoor({x:100,y:80,w:160,h:200,targetX:180,targetY:280,disableSound:!0},(()=>{this.openDayWheel(this.game,B)})),Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(F,Ei.l.NPCGnomeSpinner,U,B.contentGameObject).then((k=>(0,G.sH)(this,void 0,void 0,(function*(){k.transform.setPosition(310,300),B.data.addCollisionZone(B,280,230,90,90)})))).catch(j.RQr.createHandler("Error loading NPC Gnome Spinner")).then(),this.slimerella=new Zw.p(this.game,"NPC_NAME_SCIENTIST_SLIME",491,Kn.ac.Merchant,B.content,260,575,"idle",B.foreground)}if(this.slimerella){const k=!0===this.zone.getState("firstPotion");this.slimerella.onClick.add((()=>{const B=new Ti.rD(this.game);k&&B.addEvents([{dialogueData:B.dataProvider.get(645),blockInput:!0},{dialogueData:B.dataProvider.get(646),blockInput:!0},{callback:()=>{this.zone.setState("firstPotion",!1)}}]),B.addEvents([{dialogueData:B.dataProvider.get(651),blockInput:!0},{dialogueData:B.dataProvider.get(652),blockInput:!0}]),B.addEvents([{callback:()=>{B.close(),K.q.instance.prodigy.open.store(4)}}]),B.start()}),this)}}))}openTwilightWheel(k,B){if(Tn.J.isNightTime()){const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;new An.Q(k,B.menus,U,B,2)}else this.segment.economy.sendPrizeWheelSpinFailedEvent(mn.U.TwilightWheel,En.WE.OutsideOfHours),K.q.instance.prodigy.open.messageBoxOkay(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TWILIGHT_WHEEL_COME_BACK_LATER"),K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("BUTTON_OKAY"),null)}openDayWheel(k,B){const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;new An.Q(k,B.menus,U,B,1)}}const VC={x:1240,y:420},WC={x:40,y:420},qC={x:160,y:680};class KC extends mC{constructor(k,B){super(k,"B4","MAP_LAMPLIGHT_LOWER_INTERSECTION",160,600,["lamplight-A4","lamplight-C4","lamplight-B5"],B,[{targetMapTag:"lamplight-C4",position:VC,angle:eC.Right},{targetMapTag:"lamplight-A4",position:WC,angle:eC.Left},{targetMapTag:"lamplight-B5",position:qC,angle:eC.Down}])}setup(k,B,U={}){super.setup(k,B,U),this.addAreaEvent(k,B,Object.assign(Object.assign({},VC),{w:80,h:200,rect:!0}),"lamplight-C4",180,457.5,null,LT.K.RIGHT),this.addAreaEvent(k,B,Object.assign(Object.assign({},WC),{w:80,h:200,rect:!0}),"lamplight-A4",1160,457.5,null,LT.K.LEFT),this.addAreaEvent(k,B,Object.assign(Object.assign({},qC),{w:160,h:80,rect:!0}),"lamplight-B5",200,120,null,LT.K.DOWN),B.addDoor({x:600,y:240,w:120,h:160,targetX:660,targetY:400},(()=>{K.q.instance.prodigy.start(Ie.G.DanceDance)}))}}const zC={x:200,y:40};class YC extends mC{constructor(k,B){super(k,"B5","MAP_LAMPLIGHT_SOUTHERN_DOCK",200,120,["lamplight-B4"],B,[{targetMapTag:"lamplight-B4",position:zC,angle:eC.Up}])}setup(k,B,U={}){super.setup(k,B,U),this.addAreaEvent(k,B,Object.assign(Object.assign({},zC),{w:160,h:80,rect:!0}),"lamplight-B4",160,600,null,LT.K.UP)}}const QC={x:40,y:320},XC={x:200,y:680};class ZC extends mC{constructor(k,B){super(k,"C2","MAP_LAMPLIGHT_HISTORY_DISTRICT",200,600,["lamplight-B2","lamplight-C3"],B.concat([q._.Npc_sprite_noot_json]),[{targetMapTag:"lamplight-B2",position:QC,angle:eC.Left},{targetMapTag:"lamplight-C3",position:XC,angle:eC.Down}])}setup(k,B,U={}){super.setup(k,B,U),this.addAreaEvent(k,B,Object.assign(Object.assign({},QC),{w:80,h:160,rect:!0}),"lamplight-B2",1160,440,null,LT.K.LEFT),this.addAreaEvent(k,B,Object.assign(Object.assign({},XC),{w:160,h:80,rect:!0}),"lamplight-C3",200,240,null,LT.K.DOWN)}}const JC={x:40,y:400},tO={x:200,y:80},eO={x:160,y:660};class iO extends mC{constructor(k,B){super(k,"C3-arena","MAP_LAMPLIGHT_COLISEUM",160,540,["lamplight-B3","lamplight-C2","lamplight-C4"],B.concat([Rn.t.Tileset_arena_gold_png,q._.Npc_sprite_noot_json]),[{targetMapTag:"lamplight-B3",position:JC,angle:eC.Left},{targetMapTag:"lamplight-C2",position:tO,angle:eC.Up},{targetMapTag:"lamplight-C4",position:eO,angle:eC.Down}])}setup(k,B,U={}){super.setup(k,B,U),this.addAreaEvent(k,B,Object.assign(Object.assign({},JC),{w:80,h:240,rect:!0}),"lamplight-B3",1160,417.5,null,LT.K.LEFT),this.addAreaEvent(k,B,Object.assign(Object.assign({},tO),{w:160,h:160,rect:!0}),"lamplight-C2",200,600,null,LT.K.UP),this.addAreaEvent(k,B,Object.assign(Object.assign({},eO),{w:160,h:120,rect:!0}),"lamplight-C4",200,180,null,LT.K.DOWN);const F=sr.loadWithInjectedValues(this.prefabLoader,Ei.l.PVPArenaOutsideTrophyCase,{TROPHY_CASE_GUID:K.q.instance.prodigy.skin.isFestivalActive(Qe.R.Pumpkinfest)?nr.q.Trophy_exterior_00_night:nr.q.Trophy_exterior_00});B.contentGameObject.addChild(F),F.transform.setPosition(510,36),B.addDoor({x:520,y:200,w:120,h:160,targetX:580,targetY:360},(()=>{this.onArenaEnterGameDiscoveryEvent(),K.q.instance.prodigy.world.it("lamplight-coliseum")}))}onArenaEnterGameDiscoveryEvent(){this.segment.featureCommon.sendInterfaceEvent({interfaceName:ph.B.HiArenaHub,interfaceType:bi.Wm.Screen,originType:bi.$N.Door})}}(0,G.Cg)([(0,j.fFd)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],iO.prototype,"prefabLoader",void 0);class sO extends zn.R{constructor(k,B,U,F){const G=new qn.s(k);G.init({npc_name:"NPC_NAME_TOY_MERCHANT",npc_type:Kn.ac.Merchant,x_coord:U,y_coord:F,npc_animation_id:"idle"}),super(k,B,G,null,U,F),this._tweens=[],this.setup()}setup(){this._standTween=[];const k=q._.Npc_sprite_toy_json,B="machav2-";pn.K.cacheAsset(this.game,k,pn.K.zoneAssetsCached),this._spriteContainer=K.q.instance.prodigy.create.element(this.sprites,0,0),this._shadow=this._spriteContainer.add(K.q.instance.prodigy.create.sprite(19,19,k,`${B}shadow`)),this._shadow.anchor.set(.5,.5),this._body=this._spriteContainer.add(K.q.instance.prodigy.create.sprite(-4,-43,k,`${B}body1`)),this._spriteContainer.add(K.q.instance.prodigy.create.sprite(-17,-107,k,`${B}head1`,null,this.createStandTween.bind(this,B))),this._spriteContainer.add(K.q.instance.prodigy.create.sprite(50,-150,k,"toy-merchant-cart"));for(let U=0;U{k.close(),K.q.instance.prodigy.open.store(46)}}]),k.start(),this.sendNpcClickedEvent()}}const nO={x:60,y:420},aO={x:200,y:60};class rO extends mC{constructor(k,B){super(k,"C4","MAP_LAMPLIGHT_MARKET",200,180,["lamplight-B4","lamplight-C3"],B.concat([q._.Npc_sprite_noot_json,q._.Npc_sprite_toy_json]),[{targetMapTag:"lamplight-B4",position:nO,angle:eC.Left},{targetMapTag:"lamplight-C3",position:aO,angle:eC.Up}])}setup(k,B,U={}){super.setup(k,B,U),this.addAreaEvent(k,B,Object.assign(Object.assign({},nO),{w:120,h:200,rect:!0}),"lamplight-B4",1160,457.5,$.get(U,"distractCallback",null),LT.K.LEFT),this.addAreaEvent(k,B,Object.assign(Object.assign({},aO),{w:160,h:120,rect:!0}),"lamplight-C3",160,540,null,LT.K.UP),B.addDoor({x:840,y:280,w:120,h:160,targetX:900,targetY:440},K.q.instance.prodigy.open.store.bind(K.q.instance.prodigy.open,2)),new sO(k,B.content,430,370)}}var oO;!function(k){k[k.ArenaMaster=0]="ArenaMaster",k[k.ArenaGate=1]="ArenaGate",k[k.TrophyCase=2]="TrophyCase",k[k.Signpost=3]="Signpost"}(oO||(oO={}));class hO extends Un.T{constructor(k,B){super(k,"arena-lobby","MAP_LAMPLIGHT_COLISEUM",640,520,[],B.concat([Rn.t.Tileset_darktower_png,Rn.t.Tileset_town_new_png,q._.Npc_sprite_clankboot_json,q._.Npc_sprite_gnome_json,Rn.t.Tileset_water_new_png,nr.q.Parallax_tier1_front_small,nr.q.Parallax_tier2_front_small,nr.q.Parallax_tier3_front_small,nr.q.Parallax_tier1_back_small,nr.q.Parallax_tier2_back_small,nr.q.Parallax_tier3_back_small,nr.q.Blur_tier1_tier2_front_small,nr.q.Blur_tier2_tier3_front_small,nr.q.Blur_tier1_tier2_back_small,nr.q.Blur_tier2_tier3_back_small,"references",Rn.t.Tileset_arena_gold_png,Rn.t.Tileset_ancient_ruins_png,Rn.t.Tileset_arena_bronze_png,X.V.Bgm_arena_lobby,q._.Tileset_core_json,q._.Ui_battle_arena_json,q._.Ui_coop_json,q._.Ui_store_json,q._.Ui_icons_json,q._.General_map_json,q._.Ui_guide_hands_json,J.Q.Spine_shadowportal_json,J.Q.Spine_arena_shield_bronze1_json,J.Q.Spine_arena_shield_bronze2_json,J.Q.Spine_arena_shield_bronze3_json,J.Q.Spine_arena_shield_silver1_json,J.Q.Spine_arena_shield_silver2_json,J.Q.Spine_arena_shield_silver3_json,J.Q.Spine_arena_shield_gold1_json,J.Q.Spine_arena_shield_gold2_json,J.Q.Spine_arena_shield_gold3_json,J.Q.Spine_arena_shield_bronze3_small_json,J.Q.Spine_arena_shield_bronze2_small_json,J.Q.Spine_arena_shield_bronze1_small_json,J.Q.Spine_arena_shield_silver3_small_json,J.Q.Spine_arena_shield_silver2_small_json,J.Q.Spine_arena_shield_silver1_small_json,J.Q.Spine_arena_shield_gold3_small_json,J.Q.Spine_arena_shield_gold2_small_json,J.Q.Spine_arena_shield_gold1_small_json,J.Q.Spine_arena_torch_bronze_json,J.Q.Spine_arena_torch_silver_json,J.Q.Spine_arena_torch_gold_json,J.Q.Spine_arena_fountain_parallax_json,Z.c.Sfx_arena_gate_open,Z.c.Sfx_arena_gate_close])),this._isGateOpen=!1,this._targetPrefabConfig=null,this._loadingPrefabs=[],this._coliseumPrefabs=[{prefab:Ei.l.PVPArenaNPCArenaMaster,position:new V.Point(700,280),actionParameters:{x:620,y:300,w:10,h:10,rect:!0,canReTrigger:!0},parentGameObject:null,gameObject:null,areaEvent:null,inputEnabled:!0},{prefab:Ei.l.PVPArenaGate,position:new V.Point(640,250),actionParameters:{x:620,y:300,w:10,h:10,rect:!0,canReTrigger:!0},parentGameObject:null,gameObject:null,areaEvent:null,inputEnabled:!0},{prefab:Ei.l.PVPArenaTrophyCase,position:new V.Point(303,263),actionParameters:{x:300,y:300,w:10,h:10,rect:!0,canReTrigger:!0},parentGameObject:null,gameObject:null,areaEvent:null,inputEnabled:!0},{prefab:Ei.l.PVPArenaSignpost,position:new V.Point(1e3,268),actionParameters:{x:1e3,y:295,w:10,h:10,rect:!0,canReTrigger:!0},parentGameObject:null,gameObject:null,areaEvent:null,inputEnabled:!0}]}setup(k,B,U={}){super.setup(k,B,U),this.addScenePrefabs()}cleanup(){this._loadingPrefabs.forEach((k=>{k.cancel()})),this._loadingPrefabs=[],super.cleanup()}addScenePrefabs(){this.addArenaGate(),this.addTrophyCase(),Promise.all(this._loadingPrefabs.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k.promise}))))).then((()=>{this.exitDoor()})).catch((k=>{j.VyI.log(`One or more of the scene prefabs did load correctly; ${k.message}`,j.$bb.Warning),this.exitDoor()}))}addPrefab(k){const B=this._prefabLoader.loadWithDependenciesFromGUID(k.prefab,k.parentGameObject);B.then((B=>{var U;k.gameObject=B,B.transform.setPosition(k.position.x,k.position.y);const F=B.findComponentInChildren(Bl.n);j.Aq$.isDefined(F)&&F.onClicked.add(this.conditionalWalk.bind(this,k)),j.Aq$.isDefined(null===(U=k.actionParameters)||void 0===U?void 0:U.callback)&&(k.areaEvent=this.addAreaEvent(this.game,this.screen,k.actionParameters,null,k.actionParameters.x,k.actionParameters.y,this.runLamplightPrefabCallback.bind(this,k),LT.K.LEFT,!1,!1))})).catch((B=>(j.VyI.log(`WARNING: Could not load prefab ${k.prefab} due to ${B.message}`,j.$bb.Warning),null))),this._loadingPrefabs.push(B)}conditionalWalk(k){j.Aq$.isDefined(k.actionParameters.callback)&&k.inputEnabled&&(this._targetPrefabConfig=k,this.validPathTo(this.game,this.screen,k.actionParameters.x,k.actionParameters.y))}addArenaMaster(){const k=this._coliseumPrefabs[oO.ArenaMaster];k.parentGameObject=this.screen.contentGameObject,this.addPrefab(k)}addArenaGate(){const k=this._coliseumPrefabs[oO.ArenaGate];k.parentGameObject=this.screen.contentGameObject,this.addPrefab(k)}addTrophyCase(){const k=this._coliseumPrefabs[oO.TrophyCase];k.parentGameObject=this.screen.contentGameObject,this.addPrefab(k)}addSignpost(){const k=this._coliseumPrefabs[oO.Signpost];k.parentGameObject=this.screen.contentGameObject,this.addPrefab(k)}runLamplightPrefabCallback(k){j.Aq$.isDefined(k.actionParameters.callback)&&k===this._targetPrefabConfig&&k.inputEnabled&&k.actionParameters.callback()}exitDoor(){const k=K.q.instance.prodigy.classModeController.isClassMode();this.screen.addDoor({x:560,y:540,w:240,h:150,targetX:640,targetY:600},(()=>{k?K.q.instance.prodigy.open.map():this.backToLampLight()}))}backToLampLight(){this.zone.bgmID=9,K.q.instance.prodigy.world.it("lamplight-C3",580,440)}forceInteraction(k){this._coliseumPrefabs.forEach((B=>{B.inputEnabled=k.includes(B.prefab)}))}openInteraction(){this._coliseumPrefabs.forEach((k=>{k.inputEnabled=!0}))}openGateAnimation(k){const B=this._coliseumPrefabs[oO.ArenaGate].gameObject.findComponentInChildren(Ir.j);B.stopAnimation(),B.playAnimation("lift",!1),K.q.instance.prodigy.audio.playSFX(115,"play"),B.spine.getSpine().onComplete.addOnce(k),this._isGateOpen=!0,this.forceInteraction([]),this.screen.walkEnabled=!1,this.game.broadcaster.broadcast(oi.Y1.HideRightSideHUD,oi.HG.HUD)}closeGateAnimation(){if(this._isGateOpen){const k=this._coliseumPrefabs[oO.ArenaGate].gameObject.findComponentInChildren(Ir.j);k.stopAnimation(),k.playAnimation("close",!1),K.q.instance.prodigy.audio.playSFX(116,"play"),this._isGateOpen=!1}this.screen.walkEnabled=!0,this.openInteraction(),K.q.instance.prodigy.audio.playBGM(38,!0),K.q.instance.prodigy.audio.resumeBGM(),K.q.instance.prodigy.notifications.resume(this),this.walkAway(),this.game.broadcaster.broadcast(oi.Y1.ShowRightSideHUD,oi.HG.HUD)}walkAway(k=!1){const B=k?-hO.AFTER_WALK.x:hO.AFTER_WALK.x,U=k?-hO.AFTER_WALK.y:hO.AFTER_WALK.y;this.validPathTo(this.game,this.screen,this.screen.user.position.x+B,this.screen.user.position.y+U)}setLobbyActive(k=!0){this.screen.backgroundGameObject.active=this.screen.contentGameObject.active=this.screen.foregroundGameObject.active=k}}hO.AFTER_WALK=new j.I9Y(-30,30),(0,G.Cg)([(0,j.fFd)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],hO.prototype,"_prefabLoader",void 0);const cO={x:0,y:460};class dO extends mC{constructor(k,B){super(k,"D3","MAP_LAMPLIGHT_FORT_FOX",100,460,["lamplight-C3"],B,[{targetMapTag:"lamplight-C3",position:cO,angle:eC.Left}])}setup(k,B,U={}){super.setup(k,B),this.addAreaEvent(k,B,Object.assign(Object.assign({},cO),{w:80,h:260,rect:!0}),"lamplight-C3",1050,510,null,LT.K.LEFT)}}class lO extends Pn.T{constructor(k,B){super(k,B,1,"",{type:"seq",N:7},["lamplight-A3"],[],[],[10],[],!1)}setup(k,B,U){return super.setup(k,B,U),this.zone.completeQuest(1),null}}var uO,fO,bO=U(90817),pO=U(97651);class vO extends $n.Z{constructor(k,B){super(k,"B3",B.concat(),"map-lamplight-B3")}setup(k,B,U){super.setup(k,B,U),K.q.instance.prodigy.notifications.pause(this),B.user.position.set(120,415),B.input.enabled=!1}start(k,B){super.start(k,B),this.playCutscene().catch((k=>{j.RQr.logError(k,"Error playing Campaign Replay Narrative Intro cutscene"),this.endCutscene()}))}playCutscene(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=new j._mx;j.wa5.getActiveScene().addGameObject(k),this.cutsceneLoadPromise=Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.CampaignReplayNarrativeCatchupCutscene,{HAS_CHARGED_LEVELS:Th.e.activePlayerHasChargedLevels,SHOW_CHARGED_LOST:this.chargedLostAnimation.bind(this),END_CUTSCENE:this.endCutscene.bind(this)},k),yield this.cutsceneLoadPromise,bO.gz.instance.sendAnalyticsStepEvent(Gh.l.CampaignReplayFtuePuppetMasterCutSceneStart,1),j.VyI.log("Narrative catchup cutscene prefab loaded",j.$bb.Info)}))}chargedLostAnimation(){var k,B,U,F;const G=null!==(F=null===(U=null===(B=null===(k=K.q.instance.prodigy.gameContainer.get("e20-0fb0"))||void 0===k?void 0:k.player)||void 0===B?void 0:B.playerContainer)||void 0===U?void 0:U.playerPrefab)&&void 0!==F?F:j.wa5.getActiveScene().container.get("MainPlayerGameObject"),$=null==G?void 0:G.findComponentInChildren(pO.e);$.showChargeLostEffect(),$.bindLevel(0)}endCutscene(){K.q.instance.prodigy.gameContainer.get("ba4-af03").setProgress({step:ni.q6.HardModeIntroduced}),K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_CAMPAIGN_REPLAY,ln.B.BREADCRUMB_CAMPAIGN_REPLAY_CATCHUP_SEEN),K.q.instance.prodigy.open.menuCloseAll(),bO.gz.instance.sendAnalyticsStepEvent(Gh.l.CampaignReplayFtueChargedLevelsRemoved,2),K.q.instance.prodigy.gameContainer.get("306-5359").updateChargedLevelsData().then((()=>K.q.instance.prodigy.world.teleportToCurrentMap())).catch(j.RQr.createHandler("CampaignReplayNarrativeCatchup.endCutscene: Failed to updated charged levels data"))}cleanup(){var k;K.q.instance.prodigy.notifications.resume(this),null===(k=this.cutsceneLoadPromise)||void 0===k||k.cancel(),super.cleanup()}}class gO extends $n.Z{constructor(k,B){super(k,"B3",B.concat(),"map-lamplight-B3")}setup(k,B,U){super.setup(k,B,U),K.q.instance.prodigy.notifications.pause(this),B.user.position.set(120,415),ti.U.shouldShowPuppetMasterDefeatCelebration()&&gC.E.addConfetti(this.screen.foregroundGameObject)}start(k,B){super.start(k,B),this.playCutscene().catch((k=>{j.RQr.logError(k,"Error playing Campaign Replay Narrative Intro cutscene"),this.endCutscene()}))}playCutscene(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=new j._mx;j.wa5.getActiveScene().addGameObject(k),this.cutsceneLoadPromise=Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.CampaignReplayNarrativeIntroCutscene,{HAS_CHARGED_LEVELS:Th.e.activePlayerHasChargedLevels,SHOW_CHARGED_LOST:this.chargedLostAnimation.bind(this),END_CUTSCENE:this.endCutscene.bind(this)},k),yield this.cutsceneLoadPromise,bO.gz.instance.sendAnalyticsStepEvent(Gh.l.CampaignReplayFtuePuppetMasterCutSceneStart,1),j.VyI.log("Narrative intro cutscene prefab loaded",j.$bb.Info)}))}chargedLostAnimation(){var k,B,U,F;const G=null!==(F=null===(U=null===(B=null===(k=K.q.instance.prodigy.gameContainer.get("e20-0fb0"))||void 0===k?void 0:k.player)||void 0===B?void 0:B.playerContainer)||void 0===U?void 0:U.playerPrefab)&&void 0!==F?F:j.wa5.getActiveScene().container.get("MainPlayerGameObject"),$=null==G?void 0:G.findComponentInChildren(pO.e);$.showChargeLostEffect(),$.bindLevel(0)}endCutscene(){K.q.instance.prodigy.gameContainer.get("ba4-af03").setProgress({step:ni.q6.HardModeIntroduced}),K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_CAMPAIGN_REPLAY,ln.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_INTRO_SEEN),K.q.instance.prodigy.open.menuCloseAll(),bO.gz.instance.sendAnalyticsStepEvent(Gh.l.CampaignReplayFtuePuppetMasterCutSceneEnd,2),K.q.instance.prodigy.open.map({disableClose:!0,onClose:this.onWorldMapClosed,forceUnlock:["WORLD_FIREFLY_FOREST"],disableZoneGoals:!0})}onWorldMapClosed(){tf.J.featureDataHealthCheck(),K.q.instance.prodigy.world.it("lamplight-B3",580,360)}cleanup(){var k;K.q.instance.prodigy.notifications.resume(this),null===(k=this.cutsceneLoadPromise)||void 0===k||k.cancel(),super.cleanup()}}class mO extends $n.Z{constructor(k,B){super(k,"B3",B.concat([J.Q.Spine_npc_harriet_json,J.Q.Spine_npc_don_zorro_json])),this.loadingData.time=1}start(k,B){K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.HarrietNPC,590,415).catch(j.RQr.createHandler(`SpringfestIntro: Unable to load the NPC Prefab: ${Ei.l.HarrietNPC}`)),K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.DonZorroNPC,700,390).catch(j.RQr.createHandler(`SpringfestIntro: Unable to load the NPC Prefab: ${Ei.l.DonZorroNPC}`)),this.enterScene(k,B,(()=>{this.introDialogue(k,B)}))}introDialogue(k,B){const U=new Ti.rD(k);U.addEvents([{dialogueData:U.dataProvider.get(780),blockInput:!0},{dialogueData:U.dataProvider.get(795),blockInput:!0},{dialogueData:U.dataProvider.get(781),blockInput:!0},{dialogueData:U.dataProvider.get(796),blockInput:!0},{dialogueData:U.dataProvider.get(782),blockInput:!0},{dialogueData:U.dataProvider.get(797),blockInput:!0},{callback:()=>{this.addSpringfestHat(126)}},{dialogueData:U.dataProvider.get(783),blockInput:!0},{dialogueData:U.dataProvider.get(784),blockInput:!0},{callback:()=>{this.addSpringfestHat(123,(()=>{this.end(k,B,!0)}))}}]),U.start(!0)}addSpringfestHat(k,B){const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily,F=126===k?Yw.f.HARRIET_NAME_SEGMENT:Yw.f.DON_ZORRO_NAME_SEGMENT;K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("hat",k)<=0?K.q.instance.prodigy.open.gotItem([{type:"hat",ID:k,N:1}],B,void 0,void 0,void 0,void 0,{source_type:gn.C.Npc,source_id:F,instance_type:U.festivalType,instance_id:U.getFestivalInstanceName()}):B&&B()}end(k,B,U){K.q.instance.prodigy.notifications.resumeAll(),U&&(K.q.instance.prodigy.world.it(Yw.f.TOWN_CENTRE,120,420,void 0,{fadeIn:!0,time:500,fadeOut:!0}),K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_SPRINGFEST_CUTSCENES,ln.B.BREADCRUMB_SPRINGFEST_INTRO))}}class yO extends $n.Z{constructor(k,B){super(k,"B3",B,"map-lamplight-b3-summerfest"),this.loadingData.time=1}start(k,B){B.user.x=590,B.user.y=322,B.content.addChild(K.q.instance.prodigy.create.image(78,75,q._.Event_summerfest_json,"wheel-of-sun-map-asset"));const U=new Zw.p(k,"NPC_NAME_ATHENA",166,Kn.ac.Merchant,B.content,728,314,"idle");U.flip();const F=new Zw.p(k,"NPC_NAME_MIST",168,Kn.ac.Merchant,B.content,568,506,"idle"),G=new Zw.p(k,"NPC_NAME_MIZU",169,Kn.ac.Nicknamer,B.content,712,506,"idle");G.flip();const $=this.addMonster(k,B,151,-100,360,!0,{encounter:[{ID:151}],range:0}),H=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),V=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);H.execute(V.getStateMachine(109),{scene:this,game:k,screen:B,player:B.user,athena:U,koi:new Zw.p(k,"NPC_NAME_KOI",167,Kn.ac.WheelGiver,B.content,310,300,"idle"),mist:F,mizu:G,applepot:$},null)}}class _O extends vn.b{constructor(k){super(k),this.difficultyModeAgnostic=!0,this.monsters={randDir:!0,encounter:[{ID:59},{ID:52},{ID:36}]},this.name="Lamplight",this.ID=hn.A_.LAMPLIGHT,this.game=k,this.bgmID=9,this.currency=1,this.minLevel=1,this.maxLevel=4,this.battleBG="battle-lamplight-outside",this.defaultOnFaint="lamplight-B3",this.questHub="lamplight-B3",this.zoneIndex=pT.P.Lamplight,this.states=["event","1stpresent","bounty","daily","firstPotion"];const B=[Rn.t.Tileset_generic_new_png,Rn.t.Tileset_town_new_png,Rn.t.Tileset_forest_new_png,Rn.t.Tileset_collisions_png,q._.Npc_sprite_gnome_json,q._.Zone_lamplight_json,X.V.Bgm_lamplight,Z.c.Sfx_lamplight,q._.Npc_sprite_scoog_json];this.maps={A1:new _C(this,B),A2:new TC(this,B),A3:new OC(this,B),A4:new PC(this,B),B0:new MC(this,B),B1:new LC(this,B),B2:new FC(this,B),B3:new HC(this,B),B4:new KC(this,B),B5:new YC(this,B),C2:new ZC(this,B),C3:new iO(this,B),C4:new rO(this,B),D3:new dO(this,B),coliseum:new hO(this,B)},this.quests={1:new lO(this,B)},this.scenes={springfestIntro:new mO(this,B),summerfestIntro:new yO(this,B),campaignReplayNarrativeIntro:new gO(this,B),campaignReplayNarrativeCatchup:new vO(this,B)}}init(k,B,U){super.init(k,B,U),j.Aq$.isDefined(this.getCurrentQuest())||this.startQuest(1)}teleport(k,B,U,F,G){var j;if(ti.U.shouldShowPuppetMasterDefeatCelebration()){const[k]=K.q.instance.prodigy.world.getCurrentMap().split("-");if(k!==this.ID){const k=K.q.instance.prodigy.gameContainer.get("306-5359");k.data.endgameCelebrationViews=(null!==(j=k.data.endgameCelebrationViews)&&void 0!==j?j:0)+1,k.updated=!0}}super.teleport(k,B,U,F,G)}}class EO extends Un.T{constructor(k,B){super(k,"A3","MAP_SPRINGFEST_GROTTO",270,430,["springfest-grotto-A3"],B),this.battleBG=Kw.t.BattleGrotto}}class wO extends Un.T{constructor(k,B){super(k,"A9","MAP_SPRINGFEST_GROTTO",170,430,["springfest-grotto-A9"],B),this.battleBG=Kw.t.BattleGrotto}}class TO extends Un.T{constructor(k,B){super(k,"B2","MAP_SPRINGFEST_GROTTO",170,430,["springfest-grotto-B2"],B),this.battleBG=Kw.t.BattleGrotto}}class SO extends Un.T{constructor(k,B){super(k,"B7","MAP_SPRINGFEST_GROTTO",170,430,["springfest-grotto-B7"],B),this.battleBG=Kw.t.BattleGrotto}}class AO extends vn.b{constructor(k){super(k),this.difficultyModeAgnostic=!0,this.mapEnteredFestivalContext=!0,this.bgmID=X.V.Bgm_spring_fest;const B=[Rn.t.Tileset_collisions_png,Rn.t.Tileset_grotto_springfest_png,X.V.Bgm_spring_fest];this.maps={A3:new EO(this,B),A9:new wO(this,B),B2:new TO(this,B),B7:new SO(this,B)}}}class CO extends AO{constructor(k){super(k),this.name="springfest_grotto_bunny",this.ID=hn.A_.SPRINGFESTGROTTO_BUNNY,this.defaultOnFaint="springfest_grotto_bunny-A3";const B=this.maps;Object.keys(B).forEach((k=>{B[k].zoneName=`${this.ID}-${k}`}))}}class OO extends AO{constructor(k){super(k),this.name="springfest_grotto_fox",this.ID=hn.A_.SPRINGFESTGROTTO_FOX,this.defaultOnFaint="springfest_grotto_fox-A3";const B=this.maps;Object.keys(B).forEach((k=>{B[k].zoneName=`${this.ID}-${k}`}))}}class IO extends Un.T{constructor(k,B){super(k,"A1","MAP_MOON_ENTRANCE",170,430,["moon-A1"],B),this.battleBG=Kw.t.BattleMoon}}class DO extends Un.T{constructor(k,B){super(k,"B1","MAP_MOON_ENTRANCE",170,330,["moon-B1"],B),this.battleBG=Kw.t.BattleMoon}}class RO extends Un.T{constructor(k,B){super(k,"C1","MAP_MOON_ENTRANCE",160,380,["moon-C1"],B),this.battleBG=Kw.t.BattleMoon}}class PO extends Un.T{constructor(k,B){super(k,"D1","MAP_MOON_ENTRANCE",1080,340,["moon-D1"],B),this.battleBG=Kw.t.BattleMoon}}class MO extends vn.b{constructor(k){super(k),this.difficultyModeAgnostic=!0,this.name="Moon",this.ID=hn.A_.MOON,this.zoneIndex=pT.P.None,this.bgmID=X.V.Bgm_moonlight_fest,this.defaultOnFaint="moon-A1",this.maps={A1:new IO(this,[]),B1:new DO(this,[]),C1:new RO(this,[]),D1:new PO(this,[])}}}class NO extends Ar.H{constructor(k,B){super(k,B,0,0),this.tween=null,this.add(K.q.instance.prodigy.create.sprite(0,0,q._.General_core_2_json,"bubble-1",void 0,((k,U)=>{k.anchor.set(.5,.5),B?k.y-=.44*B.height-.5*B.parent.nameText.TextHeight:(k.scale.set(8,8),k.y+=250),this.tween=new ro.s(k),this.tween.set("frameName",["bubble-1","bubble-2","bubble-3"],150,9999),this.tween.start()}))),this.game.broadcaster.addAppListener(oi.AU.Update,this.update,this)}update(){super.update(),this.tween&&this.tween.update(Date.now())}destroy(){this.game.broadcaster.removeAppListener(oi.AU.Update,this),super.destroy()}}class xO extends Ar.H{constructor(k,B,U,F,G){super(k,B,U,F),this.graphic=null,this.vanishTween=null,this.activeTween=null,this.updateEnabled=!0,this.graphic=this.add(K.q.instance.prodigy.create.sprite(0,0,q._.Zone_shipwreck_json,"ink-idle-1")),this.graphic.anchor.set(.5,1),this.graphic.x+=.5*this.graphic.width,this.graphic.y+=this.graphic.height;const j=new ro.s(this.graphic);j.set("frameName",["ink-idle-1","ink-idle-2","ink-idle-3","ink-idle-4"],150,9999),this.vanishTween=new ro.s(this.graphic),this.vanishTween.delay(G),this.vanishTween.set("frameName",["ink-vanish-1","ink-vanish-2","ink-vanish-3","ink-vanish-4","ink-vanish-5"],150,9999),this.vanishTween.end((()=>{this.onEnd()})),this.activeTween=j,this.activeTween.start()}onClicked(){this.activeTween=this.vanishTween,this.activeTween.start()}update(){super.update(),this.updateEnabled&&this.activeTween.update(Date.now())}onEnd(){this.visible=!1,this.updateEnabled=!1,this.game.broadcaster.broadcast(oi.gJ.InkBlasted,this.parent,[])}}class LO extends Ar.H{set callbacks(k){this.onClickCallbacks=k}constructor(k,B,U,F,G,H){super(k,B.above,0,0),this.inkGroup=[],this.pathTarget=null,this.onClickCallbacks=null,this.pathTarget=G,this.onClickCallbacks=H.concat(B.process.bind(B));let V=null,W=null,q=[0,250,500,750];q=$.shuffle(q);for(let $=0;$0&&B>4)for(U.sound(20,"clear-ink",null),F=0;F{this.activeTween=this.vanishTween,this.activeTween.start()})),B.start()}}onEnd(k){k.setState("squeak",4),this.visible=!1,this.updateEnabled=!1}}class BO extends Ar.H{constructor(k,B,U,F){super(k,B,U,F),this.tween=null;const G=this.add(K.q.instance.prodigy.create.sprite(0,0,q._.Zone_shipwreck_json,"tornado-1"));this.tween=new ro.s(G),this.tween.set("frameName",["tornado-1","tornado-2","tornado-3","tornado-4"],100,9999),this.tween.start()}update(){super.update(),this.tween.update(Date.now())}}class UO extends Ar.H{constructor(k,B,U,F){super(k,B,U,F),this.tween=null;const G=this.add(K.q.instance.prodigy.create.sprite(0,0,q._.Zone_shipwreck_json,"whirlpool-1"));this.tween=new ro.s(G),this.tween.set("frameName",["whirlpool-1","whirlpool-2","whirlpool-3","whirlpool-4"],100,9999),this.tween.start()}update(){super.update(),this.tween.update(Date.now())}}class FO extends Un.T{constructor(k,B){super(k,"A1","MAP_SHIPWRECK_SHORE_FAR_BEACH",1160,400,["shipwreck_shore-B2","shipwreck_shore-A2"],B.concat(q._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-outside"}setup(k,B,U){super.setup(k,B,U),this.zone.addWhirlpool(B,this,200,600,{target:"shipwreck_shore-A2",x:160,y:200,callback:null,handRotation:LT.K.DOWN}),this.addAreaEvent(k,B,{x:1240,y:400,w:80,h:240,rect:!0},"shipwreck_shore-B2",200,300,null,LT.K.DOWN_RIGHT,!1)}}class GO extends Un.T{constructor(k,B){super(k,"A2","MAP_SHIPWRECK_SHORE_SEAWEED_SKYSCRAPERS",160,200,["shipwreck_shore-A1","shipwreck_shore-A3"],B.concat(q._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.zone.addWhirlpool(B,this,160,120,{target:"shipwreck_shore-A1",x:60,y:560,callback:null,handRotation:LT.K.UP}),this.addAreaEvent(k,B,{x:1020,y:680,w:280,h:80,rect:!0},"shipwreck_shore-A3",1e3,120,null,LT.K.DOWN,!1)}}class jO extends Un.T{constructor(k,B){super(k,"A3","MAP_SHIPWRECK_SHORE_SECRET_SHORE_SPACE",1e3,120,["shipwreck_shore-A2"],B),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1e3,y:40,w:320,h:80,rect:!0},"shipwreck_shore-A2",1e3,600,null,LT.K.UP,!1),this.addChest(k,B,"chestA3",360,370,null,"A")}}class $O extends Un.T{constructor(k,B){super(k,"A4","MAP_SHIPWRECK_SHORE_SECLUDED_SHORE",1160,320,["shipwreck_shore-B4","shipwreck_shore-A5"],B.concat(q._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-outside"}setup(k,B,U){super.setup(k,B,U),this.zone.addWhirlpool(B,this,60,560,{target:"shipwreck_shore-A5",x:180,y:200,callback:null,handRotation:LT.K.DOWN}),this.addAreaEvent(k,B,{x:1280,y:440,w:80,h:240,rect:!0},"shipwreck_shore-B4",120,380,null,LT.K.RIGHT,!1)}}class HO extends Un.T{constructor(k,B){super(k,"A5","MAP_SHIPWRECK_SHORE_UNDERWATER_ALCOVE",180,200,["shipwreck_shore-A4"],B.concat(q._.Npc_sprite_wizard_json,q._.Zone_shipwreck_json,Z.c.Sfx_shipwreck_shore)),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U);const F=this.zone;F.addWhirlpool(B,this,180,120,{target:"shipwreck_shore-A4",x:200,y:600,callback:null,handRotation:LT.K.UP}),F.addUnderwaterWizard(B,this,575,305,"wizardA5",40);const G=F.addInkGroup(B,this,[{x:960,y:280},{x:1040,y:280},{x:940,y:320},{x:1020,y:320},{x:1100,y:320},{x:960,y:360},{x:1040,y:360},{x:1100,y:360},{x:960,y:400},{x:1040,y:400},{x:1100,y:400},{x:1e3,y:440},{x:1080,y:440}],{x:985,y:255},[]),j=this.addChest(this.game,B,"chestA5",1e3,500,null,"A");1!==this.zone.getState(`ink${this.getTag()}`)&&(j.visible=!1,this.game.broadcaster.addAppListener(oi.gJ.InkBlasted,this.revealChest.bind(this,B,G,j),this,G))}revealChest(k,B,U){this.game.broadcaster.removeAppListener(oi.gJ.InkBlasted,this,B),U.visible=!0}}class VO extends Un.T{constructor(k,B){super(k,"A7","MAP_SHIPWRECK_SHORE_LOWER_DECK_HALL",1160,520,["shipwreck_shore-B6","shipwreck_shore-B7"],B.concat([q._.Zone_shipwreck_json,Z.c.Sfx_shipwreck_shore])),this.inkGroups=[],this.battleBG="battle-shipwreck-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:440,y:40,w:320,h:80,rect:!0},"shipwreck_shore-B6",280,540,null,LT.K.UP,!1),this.addAreaEvent(k,B,{x:1240,y:440,w:80,h:240,rect:!0},"shipwreck_shore-B7",160,180,null,LT.K.UP_RIGHT,!1);const F=this.zone.addInkGroup(B,this,[{x:520,y:360},{x:640,y:400},{x:560,y:400},{x:520,y:440},{x:600,y:440},{x:640,y:440},{x:520,y:480},{x:600,y:480},{x:560,y:520},{x:480,y:520}],{x:740,y:500},[]);this.inkGroups.push(F)}}class WO extends Un.T{constructor(k,B){super(k,"B10","MAP_SHIPWRECK_SHORE_SEAWEED_SANCTUARY",1020,420,["shipwreck_shore-B11"],B.concat(q._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.zone.addWhirlpool(B,this,1020,560,{target:"shipwreck_shore-B11",x:260,y:180,callback:null,handRotation:LT.K.DOWN}),this.addChest(k,B,"chestB10",380,475,null,"A")}}class qO extends Un.T{constructor(k,B){super(k,"B11","MAP_SHIPWRECK_SHORE_SECRET_SHORE",1160,300,["shipwreck_shore-B10","shipwreck_shore-C11"],B.concat(q._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-outside"}setup(k,B,U){super.setup(k,B,U),this.zone.addWhirlpool(B,this,260,110,{target:"shipwreck_shore-B10",x:1020,y:420,callback:null,handRotation:LT.K.UP}),this.addAreaEvent(k,B,{x:1240,y:440,w:80,h:240,rect:!0},"shipwreck_shore-C11",120,360,null,LT.K.RIGHT,!1)}}class KO extends Un.T{constructor(k,B){super(k,"B12","MAP_SHIPWRECK_SHORE_SHORELINE",990,435,["shipwreck_shore-B13","shipwreck_shore-C12"],B.concat(q._.Npc_sprite_windsail_json,q._.Zone_shipwreck_json,q._.Npc_sprite_fishthing_json,q._.Npc_sprite_merchant_json)),this.questNPC=null}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1240,y:480,w:80,h:320,rect:!0},"shipwreck_shore-C12",100,420,null,LT.K.RIGHT,!1),this.zone.addWhirlpool(B,this,180,640,{target:"shipwreck_shore-B13",x:220,y:260,callback:null,handRotation:LT.K.DOWN}),this.questNPC=B.addConstructedQuestNPC(800,450,"eve",!1,this.zoneComplete.bind(this,k)),B.user.faceToward(this.questNPC.x);const F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);if(K.q.instance.prodigy.create.nicknamerPedestal(this.game,this.zone.ID,B.user,B.content,1050,350),B.user.faceToward(this.questNPC.x),K.q.instance.prodigy.skin.isFestivalActive("Summerfest"))K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.ShipwreckMerchantNPC,330,460).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.ShipwreckMerchantNPC}`));else{const k=()=>{const k=new Ti.rD(this.game),B=`${CT.N.Athena}_${ph.B.Dialogue}`,U=this.featureRequirements.meetsRequirementsDeprecated(36);U&&this.segment.featureCommon.sendInterfaceEvent({interfaceName:B,interfaceType:bi.Wm.DialogBox,instanceType:Ai.N.Interface,originType:bi.$N.NpcClick}),k.addEvents([U?{dialogueData:k.dataProvider.get(904),type:Ti.fA.STORE,yes:()=>{this.sendDialogueSegmentEvents(jh.k.Shop,B),K.q.instance.prodigy.open.store(19)},no:()=>{this.sendDialogueSegmentEvents(jh.k.NotNow,B)},blockInput:!0}:{dialogueData:k.dataProvider.get(903),blockInput:!0}]),k.start(!0)},U=K.q.instance.prodigy.create.spineNPC(B.content,166,"idle",330,460,{text:F.getText("NPC_NAME_ATHENA")},{npcType:Kn.ac.Merchant,npcXCoord:330,npcYCoord:460},k),G=U.findComponentInChildren(Wn.v),$=()=>{if(this.featureRequirements.meetsRequirementsDeprecated(36)){const k=TT.createIndicator(ST.DEFAULT_INDICATOR_CONFIG);k.position.set(10+(j.J6z.getCenterX(U.legacyTransform.group)>>1),-U.legacyTransform.group.height-20),U.legacyTransform.group.addChild(k),this.game.add.tween(k,this).to({y:k.y-20},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0)}};G.isLoaded?$():G.OnLoaded.addOnce($)}}sendDialogueSegmentEvents(k,B){this.segment.featureCommon.sendButtonEvent({buttonName:k,interfaceName:B,interfaceType:bi.Wm.DialogBox,saveClickInfo:k}),this.segment.featureCommon.sendInterfaceEvent({interfaceName:B,interfaceType:bi.Wm.DialogBox,instanceType:Ai.N.Interface,closeMethod:bi.Lv.ButtonClick})}zoneComplete(k){const B=K.q.instance.prodigy.event.create();B.text(45,"eve"),B.start()}cleanup(){this.questNPC&&(this.questNPC.destroy(),this.questNPC=null),super.cleanup()}}class zO extends Un.T{constructor(k,B){super(k,"B13","MAP_SHIPWRECK_SHORE_SUNKEN_SECRET",220,260,["shipwreck_shore-B12"],B.concat(q._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.zone.addWhirlpool(B,this,220,200,{target:"shipwreck_shore-B12",x:140,y:540,callback:null,handRotation:LT.K.UP}),this.addChest(k,B,"chestB13",1020,350)}}class YO extends Un.T{constructor(k,B){super(k,"B2","MAP_SHIPWRECK_SHORE_CROWS_NEST",1080,620,["shipwreck_shore-B4","shipwreck_shore-A1"],B),this.battleBG="battle-shipwreck-outside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:120,y:200,r:80},"shipwreck_shore-A1",1160,400,null,LT.K.UP_LEFT,!1),this.addAreaEvent(k,B,{x:1080,y:680,w:160,h:80,rect:!0},"shipwreck_shore-B4",1080,120,null,LT.K.DOWN,!1)}}class QO extends Un.T{constructor(k,B){super(k,"B4","MAP_SHIPWRECK_SHORE_UPPER_DECK",1120,520,["shipwreck_shore-B5","shipwreck_shore-A4","shipwreck_shore-B2"],B),this.battleBG="battle-shipwreck-outside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1080,y:40,w:160,h:80,rect:!0},"shipwreck_shore-B2",1080,620,null,LT.K.UP,!1),this.addAreaEvent(k,B,{x:40,y:380,w:80,h:280,rect:!0},"shipwreck_shore-A4",1160,320,null,LT.K.LEFT,!1),this.addAreaEvent(k,B,{x:1120,y:600,w:160,h:80,rect:!0},"shipwreck_shore-B5",240,100,null,LT.K.DOWN,!1)}}class XO extends Un.T{constructor(k,B){super(k,"B5","MAP_SHIPWRECK_SHORE_CARGO_HOLD",1e3,560,["shipwreck_shore-B6","shipwreck_shore-B4"],B.concat(q._.Zone_shipwreck_json,Z.c.Sfx_shipwreck_shore)),this.battleBG="battle-shipwreck-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:240,y:40,w:160,h:80,rect:!0},"shipwreck_shore-B4",1120,520,null,LT.K.UP,!1),this.addAreaEvent(k,B,{x:1e3,y:640,w:160,h:80,rect:!0},"shipwreck_shore-B6",1040,140,null,LT.K.DOWN,!1),this.zone.addInkGroup(B,this,[{x:400,y:320},{x:400,y:400},{x:360,y:280},{x:360,y:360},{x:360,y:440},{x:320,y:320},{x:320,y:400},{x:280,y:360},{x:280,y:440},{x:240,y:400}],{x:520,y:480},[]),this.addChest(k,B,"chestB5",500,325)}}class ZO extends Un.T{constructor(k,B){super(k,"B6","MAP_SHIPWRECK_SHORE_LOWER_DECK",280,540,["shipwreck_shore-A7","shipwreck_shore-C6","shipwreck_shore-B5"],B.concat(q._.Zone_shipwreck_json,Z.c.Sfx_shipwreck_shore)),this.battleBG="battle-shipwreck-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1040,y:80,w:160,h:80,rect:!0},"shipwreck_shore-B5",1e3,560,null,LT.K.UP,!1);const F=j.Aq$.isDefined(U)&&j.Aq$.isDefined(U.doorIsLockedCallback)?U.doorIsLockedCallback:this.doorIsLocked.bind(this,k),G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.addAreaEvent(k,B,{x:1180,y:360,w:80,h:160,rect:!0},"shipwreck_shore-C6",120,320,0===G.backpack.hasItem("item",114)?F:null,LT.K.RIGHT,!1),this.addAreaEvent(k,B,{x:280,y:600,w:160,h:80,rect:!0},"shipwreck_shore-A7",440,120,null,LT.K.DOWN,!1),this.zone.addInkGroup(B,this,[{x:960,y:40},{x:960,y:80},{x:1040,y:40},{x:1e3,y:120},{x:1e3,y:80},{x:1e3,y:200},{x:1040,y:200},{x:1e3,y:160},{x:960,y:240},{x:1040,y:240}],{x:1040,y:400},[])}doorIsLocked(k){const B=K.q.instance.prodigy.event.create();B.text(174,"noot"),B.start()}}class JO extends Un.T{constructor(k,B){super(k,"B7","MAP_SHIPWRECK_SHORE_SECOND_SHIP_RAMP",1160,420,["shipwreck_shore-A7","shipwreck_shore-C7"],B.concat(q._.Zone_shipwreck_json,Z.c.Sfx_shipwreck_shore)),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:160,y:240,w:160,h:80,rect:!0},"shipwreck_shore-A7",1160,520,null,LT.K.DOWN,!1),this.addAreaEvent(k,B,{x:1240,y:420,w:80,h:320,rect:!0},"shipwreck_shore-C7",120,280,null,LT.K.RIGHT,!1);const F=this.zone;F.addShortcut(B,1060,560),this.enableShortcut(k,B),F.addInkGroup(B,this,[{x:1e3,y:520},{x:1040,y:560},{x:1040,y:520},{x:1e3,y:560}],{x:1060,y:480},[k.broadcaster.addAppListener.bind(k.broadcaster,oi.gJ.InkGroupDestroyed,this.enableShortcut.bind(this,k,B),this)]),F.addSqueak(B,this,840,440,!0)}enableShortcut(k,B){k.broadcaster.removeAppListener(oi.gJ.InkGroupDestroyed,this);const U=this.zone.enableShortcut(B,this,1060,560,{target:"shipwreck_shore-C9",x:780,y:420,callback:null,handRotation:LT.K.DOWN});j.Aq$.isDefined(U)&&this.locations.push("shipwreck_shore-C9")}}class tI extends Un.T{constructor(k,B){super(k,"B8","MAP_SHIPWRECK_SHORE_BROKEN_SHIP_BED",1160,540,["shipwreck_shore-C8"],B),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1240,y:500,w:80,h:280,rect:!0},"shipwreck_shore-C8",140,460,null,LT.K.RIGHT,!1)}}class eI extends Un.T{constructor(k,B){super(k,"C10","MAP_SHIPWRECK_SHORE_DIVE_DOCK",180,600,["shipwreck_shore-C9","shipwreck_shore-C11"],B.concat(q._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-outside"}setup(k,B,U){super.setup(k,B,U),this.zone.addWhirlpool(B,this,1100,200,{target:"shipwreck_shore-C9",x:180,y:380,callback:null,handRotation:LT.K.UP}),this.addAreaEvent(k,B,{x:160,y:680,w:280,h:80,rect:!0},"shipwreck_shore-C11",780,220,null,LT.K.DOWN,!1)}}class iI extends Un.T{constructor(k,B){super(k,"C11","MAP_SHIPWRECK_SHORE_DESOLATE_DECK",1080,620,["shipwreck_shore-C12","shipwreck_shore-B11","shipwreck_shore-C10"],B),this.battleBG="battle-shipwreck-outside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:780,y:120,w:200,h:80,rect:!0},"shipwreck_shore-C10",180,600,null,LT.K.UP,!1),this.addAreaEvent(k,B,{x:40,y:320,w:80,h:320,rect:!0},"shipwreck_shore-B11",1160,300,null,LT.K.LEFT,!1),this.addAreaEvent(k,B,{x:1080,y:680,w:160,h:80,rect:!0},"shipwreck_shore-C12",1080,100,null,LT.K.DOWN,!1)}}class sI extends Un.T{constructor(k,B){super(k,"C12","MAP_SHIPWRECK_SHORE_BROKEN_BOWSPRIT",100,420,["shipwreck_shore-B12","shipwreck_shore-C11"],B),this.battleBG="battle-shipwreck-outside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1080,y:40,w:160,h:80,rect:!0},"shipwreck_shore-C11",1080,620,null,LT.K.UP,!1),this.addAreaEvent(k,B,{x:40,y:440,w:80,h:400,rect:!0},"shipwreck_shore-B12",1160,500,null,LT.K.LEFT,!1),this.addPippet(k,B,2,275,214)}}class nI extends Un.T{constructor(k,B){super(k,"C6","MAP_SHIPWRECK_SHORE_CAPNS_QUARTERS",120,320,["shipwreck_shore-B6"],B),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:40,y:320,w:80,h:240,rect:!0},"shipwreck_shore-B6",1120,360,null,LT.K.LEFT,!1)}}class aI extends Un.T{constructor(k,B){super(k,"C7","MAP_SHIPWRECK_SHORE_SAND_CITY",1040,580,["shipwreck_shore-C8","shipwreck_shore-B7"],B.concat(q._.Zone_shipwreck_json,Z.c.Sfx_shipwreck_shore)),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:40,y:300,w:80,h:280,rect:!0},"shipwreck_shore-B7",1160,420,null,LT.K.LEFT,!1),this.addAreaEvent(k,B,{x:1160,y:680,r:120},"shipwreck_shore-C8",1120,100,null,LT.K.DOWN,!1),this.zone.addSqueak(B,this,640,480,!1)}}class rI extends Un.T{constructor(k,B){super(k,"C8","MAP_SHIPWRECK_SHORE_DEEP_WATER",260,620,["shipwreck_shore-C9","shipwreck_shore-B8","shipwreck_shore-C7"],B.concat(q._.Npc_sprite_wizard_json,q._.Zone_shipwreck_json,Z.c.Sfx_shipwreck_shore)),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1120,y:40,w:320,h:80,rect:!0},"shipwreck_shore-C7",1040,580,null,LT.K.UP,!1),this.addAreaEvent(k,B,{x:40,y:440,w:80,h:360,rect:!0},"shipwreck_shore-B8",1160,540,null,LT.K.LEFT,!1),this.addAreaEvent(k,B,{x:260,y:680,w:280,h:80,rect:!0},"shipwreck_shore-C9",950,120,null,LT.K.DOWN,!1),this.zone.addUnderwaterWizard(B,this,400,300,"wizardC8",41),this.zone.addSqueak(B,this,560,480,!1)}}class oI extends Un.T{constructor(k,B){super(k,"C9","MAP_SHIPWRECK_SHORE_SAND_TOWN",180,380,["shipwreck_shore-C8","shipwreck_shore-C10"],B.concat(q._.Npc_sprite_jim_json,q._.Zone_shipwreck_json,Z.c.Sfx_shipwreck_shore)),this.questNPC=null,this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:950,y:40,w:220,h:80,rect:!0},"shipwreck_shore-C8",260,620,null,LT.K.UP,!1),this.zone.addWhirlpool(B,this,180,520,{target:"shipwreck_shore-C10",x:1120,y:320,callback:null,handRotation:LT.K.DOWN}),this.questNPC=this.addConstructedNPC(k,B,1e3,300,q._.Npc_sprite_jim_json,null,"NPC_NAME_JELLY_JIM"),this.questNPC.setup(this.zone,!1),this.questNPC.addOnClick(this.interactWithJellyJim.bind(this,k)),this.zone.addShortcut(B,780,480),this.enableShortcut(k,B),this.zone.addInkGroup(B,this,[{x:720,y:440},{x:760,y:480},{x:760,y:440},{x:720,y:480}],{x:780,y:400},[k.broadcaster.addAppListener.bind(k.broadcaster,oi.gJ.InkGroupDestroyed,this.enableShortcut.bind(this,k,B),this)]),this.zone.addSqueak(B,this,760,280,!1)}enableShortcut(k,B){k.broadcaster.removeAppListener(oi.gJ.InkGroupDestroyed,this);const U=this.zone.enableShortcut(B,this,780,480,{target:"shipwreck_shore-B7",x:1060,y:500,callback:null,handRotation:LT.K.DOWN});j.Aq$.isDefined(U)&&this.locations.push("shipwreck_shore-B7")}interactWithJellyJim(k){const B=K.q.instance.prodigy.event.create(),U=this.zone.getCurrentQuestID();U>1&&U<6?(B.text(2,"jim"),B.text(3,"jim")):B.text(7,"jim"),B.start()}cleanup(){this.questNPC&&(this.questNPC.destroy(),this.questNPC=null),super.cleanup()}}class hI extends Pn.T{constructor(k,B,U){super(k,B.concat([q._.Npc_sprite_windsail_json,X.V.Bgm_fun]),1,"",{type:"key",ID:14,N:1},["shipwreck_shore-C10"],[659,660,661,662,663,664,665,666,667],[],[658],U,!1,"QUESTS_SHIPWRECK_FIND_BREATHING_BUBBLE","eve","eve",[]),this.mimic1=null,this.mimic2=null}setup(k,B,U){if(super.setup(k,B,U),this.screen=B,this.map=U,"C10"===U.getTag()){U.addChest(k,B,"chestBreathingBubble",210,260);const F={randDir:!0,encounter:[{ID:98}],difficulty:2,maxTeamSize:1,screen:this.zone.battleBG};1===this.zone.getState("mimic1")||(this.mimic1=B.addMimic("mimic1",360,240,"A",F,U.zoneName));return 1===this.zone.getState("mimic2")||(this.mimic2=B.addMimic("mimic2",120,400,"A",F,U.zoneName)),{enableMonsters:!1}}return{}}process(k,B,U){if(super.process(k,B,U),"C10"===U.getTag()){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("key",14)>0?(j.Aq$.isDefined(this.mimic1)&&this.mimic1.highlight(!1),j.Aq$.isDefined(this.mimic2)&&this.mimic2.highlight(!1)):(j.Aq$.isDefined(this.mimic1)&&this.mimic1.highlight(1!==this.zone.getState("mimic1"),-80,-90),j.Aq$.isDefined(this.mimic2)&&this.mimic2.highlight(1!==this.zone.getState("mimic2"),-80,-90))}}end(){this.zone.addWhirlpool(this.screen,this.map,1100,200,{target:"shipwreck_shore-C9",x:180,y:380,callback:null,handRotation:LT.K.UP}),this.map.toggleDynamicLayer(K.q.instance.prodigy.game,0,!1)}}class cI extends Pn.T{constructor(k,B,U){super(k,B,10,"",{type:"item",ID:114,N:1,K:1},["shipwreck_shore-B7"],[700],[],[],U,!1,"QUESTS_SHIPWRECK_DEFEAT_MONSTERS","eve","eve",[]),this.bossKey=null}setup(k,B,U){super.setup(k,B,U),this.updateDialogue(k);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return"B7"===U.getTag()&&0===F.backpack.hasItem("item",114)&&(this.bossKey=B.addClickableEvent(800,100,80,80,this.collectBossKey.bind(this,k,B),null,0),this.bossKey.highlight(!0)),{}}collectBossKey(k,B){if(0===K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("item",114)){const k=K.q.instance.prodigy.event.create();k.validPath(B.user,B.path,this.bossKey.x+.5*this.bossKey.width,this.bossKey.y+this.bossKey.height+10),k.reward([{type:"item",ID:114}]),k.function(this.bossKey.highlight.bind(this.bossKey,!1)),k.function(this.zone.completeQuest.bind(this.zone,10)),k.function(this.zone.startQuest.bind(this.zone,11)),k.function(B.process.bind(B)),k.start()}}updateDialogue(k){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("item",114)>0&&(this.onStart=[43])}}class dI extends Pn.T{constructor(k,B,U){super(k,B.concat(Z.c.Sfx_shipwreck_shore,q._.Zone_shipwreck_json,J.Q.Default_boss_15_json),11,"QUESTS_SHIPWRECK_DEFEAT_BOSS",{type:"seq",N:1},["shipwreck_shore-C6"],[701],[],[658,675,702],U,!1,null,"eve","eve",[]),this.squeak=null}setup(k,B,U){return super.setup(k,B,U),this.screen=B,"C6"===U.getTag()&&this.zone.isOnSequence(11,0)&&this.createSqueak(),{}}start(k,B,U){return super.start(k,B,U),"C6"===U.getTag()&&this.zone.isOnSequence(11,0)&&this.startSequenceA(k,B,U),null}startSequenceA(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),G=F.getValue("oldOneMaxHP",Vt.s.get("GameConstants.OldOne.MAX_HP")),$=null===G?void 0:parseInt(G,10);K.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle";const H=this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_BOSS_BATTLE"),{boss:{ID:15,element:"water",attacks:[82,83,85,87],name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_OLD_ONE"),tag:"shipwreck",maxHP:$},starMod:5,difficulty:parseInt(F.getValue("oldOneDifficulty",Vt.s.get("GameConstants.OldOne.DIFFICULTY")),10),screen:"battle-shipwreck-inside"},this.endSequenceA.bind(this,k)),V=K.q.instance.prodigy.event.create();V.enableInput(!1),V.validPath(B.user,B.path,this.squeak.x-500,this.squeak.y),V.delay(250),V.shake(0,3e3,12,"h",!0);let W=4;V.tween(this.squeak,{y:this.squeak.y-40*W},2e3,j.GS3.Linear.None,!0),V.sound(20,"boss-monster",!1);for(let j=0;j<4;j++){const U=wn.o.integerInRange(4,8);V.function(this.sandCloud.bind(this,k,B,this.squeak.x-.5*U*40,this.squeak.y,U,W--)),V.delay(400)}V.delay(750),V.enableInput(!0),V.function(H),V.start()}endSequenceA(k){this.squeak[ur.k.DESTROYED]&&this.createSqueak();const B=K.q.instance.prodigy.event.create();B.function(this.zone.setState.bind(this.zone,"squeak",4)),B.function(this.zone.completeSequence.bind(this.zone,11,0)),B.function(K.q.instance.prodigy.world.it.bind(K.q.instance.prodigy.world,"shipwreck_shore-C6",this.squeak.x-500,this.squeak.y)),B.start()}sandCloud(k,B,U,F,G,$){let H=null;for(let V=0;V0?j.Aq$.isDefined(this.ink)&&this.ink.highlight(!1):(null!==(F=this.ink)&&void 0!==F||(this.ink=K.q.instance.prodigy.create.element(B.above,560,440)),this.ink.highlight(!0),U.inkGroups.forEach((F=>{F.callbacks=[this.collectInk.bind(this,k,B,U)]})))}}collectInk(k,B,U){var F;const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;0===G.backpack.hasItem("item",112)&&G.backpack.add("item",112,!1,1),null===(F=this.ink)||void 0===F||F.highlight(!1),U.zone.completeQuest(3),B.process()}}class fI extends Pn.T{constructor(k,B,U){super(k,B,4,"",{type:"key",ID:15,N:1},["shipwreck_shore-B7"],[676,677,678,679,680,681,682,683],[],[658],U,!1,"QUESTS_SHIPWRECK_ACQUIRE_INK_SAMPLE","eve","eve",[]),this.sonicBlaster=null}setup(k,B,U){return super.setup(k,B,U),"B7"===U.getTag()&&(this.sonicBlaster=B.addClickableEvent(320,80,80,80,this.collectSonicBlaster.bind(this,k,B),null,0)),{}}process(k,B,U){if(super.process(k,B,U),"B7"===U.getTag()){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.sonicBlaster.highlight(0===k.backpack.hasItem("key",15))}}collectSonicBlaster(k,B){if(0===K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("key",15)){const k=K.q.instance.prodigy.event.create();k.validPath(B.user,B.path,this.sonicBlaster.x+.5*this.sonicBlaster.width,this.sonicBlaster.y+this.sonicBlaster.height+10),k.reward([{type:"key",ID:15}]),k.function(B.process.bind(B)),k.start()}}}class bI extends Pn.T{constructor(k,B,U){super(k,B,5,"QUESTS_SHIPWRECK_CLEAR_INK",{type:"seq",N:1},["shipwreck_shore-A7"],[684,685],[],[658],U),this.inkHighlighter=null}setup(k,B,U){super.setup(k,B,U),this.updateQuestArea();let F=this.updateQuestArea.bind(this);return"A5"===U.getTag()&&(F=this.startSequenceA.bind(this,k,B,U)),k.broadcaster.addAppListener(oi.gJ.InkGroupDestroyed,F,this),{}}process(k,B,U){super.process(k,B,U),this.showInkHighlighter(k,B,U)}updateQuestArea(){this.zone.isOnSequence(5,0)&&(1!==this.zone.getState("inkA7")?this.area=["shipwreck_shore-A7"]:1!==this.zone.getState("inkB6")?this.area=["shipwreck_shore-B6"]:1!==this.zone.getState("inkB5")?this.area=["shipwreck_shore-B5"]:1!==this.zone.getState("inkA5")?this.area=["shipwreck_shore-A5"]:this.zone.completeSequence(5,0))}startSequenceA(k,B,U){const F=B.addNPC(985,255,q._.Npc_sprite_noot_json);F.visible=!1,F.float(!0);const G=K.q.instance.prodigy.event.create();G.function((()=>{k.broadcaster.removeAppListener(oi.gJ.InkGroupDestroyed,this)})),G.validPath(B.user,B.path,985,255),G.set(F,"visible",!0),G.hop(F,375,-75,70),G.function(B.user.faceToward.bind(B.user,F.x-75)),G.text(172,"noot"),G.text(173,"noot"),G.hop(F,375,75,70),G.set(F,"visible",!1),G.function(this.zone.completeSequence.bind(this.zone,5,0)),G.function(B.process.bind(B)),G.start()}showInkHighlighter(k,B,U){const F=U.getTag();let G=0,$=0;if(j.Aq$.isDefined(this.inkHighlighter)&&this.inkHighlighter.highlight(!1),1!==this.zone.getState(`ink${U.getTag()}`)){let k=!1;"A7"===F?(G=560,$=440,k=!0):"B6"===F?(G=1020,$=220,k=!0):"B5"===F?(G=320,$=400,k=!0):"A5"===F&&(G=1040,$=360,k=!0),k&&(this.inkHighlighter=K.q.instance.prodigy.create.element(B.above,G,$),this.inkHighlighter.highlight(!0))}}}class pI extends Pn.T{constructor(k,B,U){super(k,B.concat(X.V.Bgm_puppetmaster),5,"QUESTS_SHIPWRECK_CLEAR_INK",{type:"seq",N:1},["shipwreck_shore-A7"],[684,685],[],[658],U),this.inkHighlighter=null}setup(k,B,U){if(super.setup(k,B,U),this.updateQuestArea(),"A5"===U.getTag()){if(k.broadcaster.addAppListener(oi.gJ.InkGroupDestroyed,this.startSequenceA.bind(this,k,B,U),this),!U.zone.getState(Zu.PIPPET_DEFEATED))return k.input.enabled=!1,this.addPippetEncounter(k,B,U),{enableMonsters:!1,enableWizards:!1}}else k.broadcaster.addAppListener(oi.gJ.InkGroupDestroyed,this.updateQuestArea.bind(this),this);return{}}process(k,B,U){super.process(k,B,U),("A5"!==U.getTag()||U.zone.getState(Zu.PIPPET_DEFEATED))&&this.showInkHighlighter(k,B,U)}updateQuestArea(){this.zone.isOnSequence(5,0)&&(1!==this.zone.getState("inkA7")?this.area=["shipwreck_shore-A7"]:1!==this.zone.getState("inkB6")?this.area=["shipwreck_shore-B6"]:1!==this.zone.getState("inkB5")?this.area=["shipwreck_shore-B5"]:1!==this.zone.getState("inkA5")?this.area=["shipwreck_shore-A5"]:this.zone.completeSequence(5,0))}startSequenceA(k,B,U){const F=B.addNPC(985,255,q._.Npc_sprite_noot_json);F.visible=!1,F.float(!0);const G=K.q.instance.prodigy.event.create();G.function((()=>{k.broadcaster.removeAppListener(oi.gJ.InkGroupDestroyed,this)})),G.validPath(B.user,B.path,985,255),G.set(F,"visible",!0),G.hop(F,375,-75,70),G.function(B.user.faceToward.bind(B.user,F.x-75)),G.text(172,"noot"),G.text(173,"noot"),G.hop(F,375,75,70),G.set(F,"visible",!1),G.function(this.zone.completeSequence.bind(this.zone,5,0)),G.function(B.process.bind(B)),G.start()}showInkHighlighter(k,B,U){const F=U.getTag();let G=0,$=0;if(j.Aq$.isDefined(this.inkHighlighter)&&this.inkHighlighter.highlight(!1),1!==this.zone.getState(`ink${U.getTag()}`)){let k=!1;"A7"===F?(G=560,$=440,k=!0):"B6"===F?(G=1020,$=220,k=!0):"B5"===F?(G=320,$=400,k=!0):"A5"===F&&(G=1040,$=360,k=!0),k&&(this.inkHighlighter=K.q.instance.prodigy.create.element(B.above,G,$),this.inkHighlighter.highlight(!0))}}addPippetEncounter(k,B,U){K.q.instance.prodigy.prefabFactory.createPippetQuestEncounter(U.zone,205,bS.e.Shipwreck_quests_encounter).then((k=>{if(U.zone.getState(Zu.PIPPET_REMATCH)){k.findComponentInChildren(pf.u).onComplete.addOnce((()=>{this.showInkHighlighter(K.q.instance.game,B,U)}))}})).catch(j.RQr.createHandler("Error loading Pippet Miniboss Encounter for Bonfire Q7"))}}class vI extends Pn.T{constructor(k,B,U){super(k,B.concat(q._.Zone_shipwreck_json,Z.c.Sfx_shipwreck_shore),6,"QUESTS_SHIPWRECK_FIND_JIM",{type:"seq",N:2},["shipwreck_shore-C9"],[686,687,688,689],[],[658],U,!1,null,"eve","eve",[]),this.cameraButton=null}setup(k,B,U){return super.setup(k,B,U),this.updateQuestArea(),"C9"===U.getTag()&&this.zone.isOnSequence(6,0)?{enableMonsters:!1}:{}}start(k,B,U){return super.start(k,B,U),"C9"===U.getTag()&&this.zone.isOnSequence(6,0)?this.startSequenceA(k,B,U):"A5"===U.getTag()&&this.zone.isOnSequence(6,1)&&(this.cameraButton=K.q.instance.prodigy.create.button(B.menus,1040,240,q._.Zone_shipwreck_json,"camera-map",this.takePictureOfTunnel.bind(this,k,B)),this.cameraButton.highlight(!0)),null}updateQuestArea(){this.zone.isOnSequence(6,1)&&(this.area=["shipwreck_shore-A5"],this.descKey="QUESTS_SHIPWRECK_TAKE_PHOTO")}startSequenceA(k,B,U){const F=B.addNPC(U.questNPC.x-100,U.questNPC.y,q._.Npc_sprite_noot_json);F.visible=!1,F.float(!0);const G=K.q.instance.prodigy.event.create();G.enableInput(!1),G.validPath(B.user,B.path,U.questNPC.x-100,U.questNPC.y-10),G.set(F,"visible",!0),G.hop(F,500,-100,70),G.enableInput(!0),G.text(5,"jim"),G.text(6,"jim"),G.reward([{type:"key",ID:16}]),G.text(4,"jim"),G.text(),G.reward([{type:"gold",N:200}]),G.function(B.user.faceToward.bind(B.user,F.x-100)),G.text(175,"noot"),G.hop(F,500,100,70),G.set(F,"visible",!1),G.function(this.zone.completeSequence.bind(this.zone,6,0)),G.function(this.updateQuestArea.bind(this)),G.function(B.process.bind(B)),G.start()}takePictureOfTunnel(k,B){const U=K.q.instance.prodigy.event.create();U.validPath(B.user,B.path,1e3,280),U.enableInput(!1),U.cameraFlash(),U.function(this.cameraButton.destroy.bind(this.cameraButton)),U.function(this.zone.completeSequence.bind(this.zone,6,1)),U.function(B.process.bind(B)),U.enableInput(!0),U.start()}}class gI extends Pn.T{constructor(k,B,U){super(k,B.concat(Ut.E.getIconForType("item",113)),7,"",{type:"item",ID:113,N:3},["shipwreck_shore-A2"],[690,691,692],[],[658,675],U,!1,"QUESTS_SHIPWRECK_GET_CAMERA","eve","eve",[])}setup(k,B,U){return super.setup(k,B,U),"A2"===U.getTag()?(B.addCollect(1,880,480,{type:"item",ID:113}),B.addCollect(2,960,320,{type:"item",ID:113}),B.addCollect(3,400,520,{type:"item",ID:113}),{enableMonsters:!1}):{}}}class mI extends Pn.T{constructor(k,B,U){super(k,B,8,"",{type:"pet",ID:119,N:4},["shipwreck_shore-B8"],[693,694,695],[],[696,658],U,!1,"QUESTS_SHIPWRECK_TAKE_PICTURE","eve","eve",[]),this.questParams={}}setup(k,B,U){super.setup(k,B,U),this.updateQuestArea(!1);const F=U.getTag(),G={randDir:!0,encounter:[{ID:119}],difficulty:4,maxTeamSize:1,onEnc:this.updateQuestArea.bind(this,!0),isQuestEncounter:!0,showGuideHand:!0,unique:!0};if(-1!==this.area.indexOf(U.zoneName)){if("B8"===F)return K.q.instance.prodigy.prefabFactory.addMonster(U,775,325,0,G),K.q.instance.prodigy.prefabFactory.addMonster(U,420,485,1,G),{enableMonsters:!1};if("B7"===F)return K.q.instance.prodigy.prefabFactory.addMonster(U,926,305,2,G),K.q.instance.prodigy.prefabFactory.addMonster(U,650,475,3,G),{enableMonsters:!1}}if(j.Aq$.isDefined(this.questParams.enableMonsters))return this.questParams={},{enableMonsters:!1}}updateQuestArea(k){this.isMapB7Cleared()?(this.area=["shipwreck_shore-B12"],k&&(this.questParams.enableMonsters=!1)):this.isMapB8Cleared()&&-1===this.area.indexOf("shipwreck_shore-B7")&&(this.area=["shipwreck_shore-B7"])}isMapB8Cleared(){const k=this.zone.getQuestState();return!(!j.Aq$.isDefined(k)||!j.Aq$.isDefined(k.req))&&(1===k.state[1]&&1===k.state[2])}isMapB7Cleared(){const k=this.zone.getQuestState();return!(!j.Aq$.isDefined(k)||!j.Aq$.isDefined(k.req))&&(1===k.state[3]&&1===k.state[4])}}class yI extends Pn.T{constructor(k,B,U){super(k,B,9,"QUESTS_SHIPWRECK_OPEN_DOOR",{type:"seq",N:1},["shipwreck_shore-B6"],[697,698,699],[],[],U,!1,null,"eve","eve",[]),this.door=null}setup(k,B,U){return super.setup(k,B,U),"B6"===U.getTag()&&this.zone.isOnSequence(9,0)?(this.door=K.q.instance.prodigy.create.element(B.above,1160,340),this.door.highlight(!0,0,0),{doorIsLockedCallback:this.startSequenceA.bind(this,k,B)}):{}}startSequenceA(k,B){const U=K.q.instance.prodigy.event.create();U.function(this.door.highlight.bind(this.door,!1)),U.text(176,"noot"),U.function(this.zone.completeSequence.bind(this.zone,9,0)),U.function(B.process.bind(B)),U.start()}}class _I extends vn.b{constructor(k){super(k),this.questManagerIdentifier="3e8-8772",this.guardian="Eve",this.name="Shipwreck Shore",this.ID=hn.A_.SHIPWRECK,this.guardian="SHIPWRECK_GUARDIAN",this.battleBG="battle-shipwreck-outside",this.defaultOnFaint="shipwreck_shore-B12",this.questHub="shipwreck_shore-B12",this.bgmID=16,this.currency=14,this.zoneIndex=pT.P.Shipwreck,this.states=["wizardC8","wizardA5","chestA3","chestA5","chestB5","chestB13","chestB10","chestBreathingBubble","mimic1","mimic2","inkA7","inkB6","inkB5","inkA5","inkC9","inkB7","squeak",Zu.PIPPET_ENCOUNTER,Zu.PIPPET_REMATCH,Zu.PIPPET_DEFEATED];const B=[Rn.t.Tileset_water_new_png,Rn.t.Tileset_generic_new_png,Rn.t.Tileset_collisions_png,Rn.t.Tileset_ship_exterior_png,Rn.t.Tileset_ship_interior_png,X.V.Bgm_shipwreck_shore],U={map:"shipwreck_shore-Titan",cutscene:"shipwreck_shore-titanIntro",harvey:{x:175,y:200},sign:{x:100,y:200},catapult:{x:200,y:430,arcHeight:300},titan:{x:1100,y:400,impactOffset:{x:-130,y:0}},entry:{x:550,y:400},battleBG:[nr.q.Battle_shipwreck_outside_bg,nr.q.Battle_shipwreck_outside_fg]};this.maps={A1:new FO(this,B),A2:new GO(this,B),A3:new jO(this,B),A4:new $O(this,B),A5:new HO(this,B),A7:new VO(this,B),B2:new YO(this,B),B4:new QO(this,B),B5:new XO(this,B),B6:new ZO(this,B),B7:new JO(this,B),B8:new tI(this,B),B10:new WO(this,B),B11:new qO(this,B),B12:new KO(this,B),B13:new zO(this,B),C6:new nI(this,B),C7:new aI(this,B),C8:new rI(this,B),C9:new oI(this,B),C10:new eI(this,B),C11:new iI(this,B),C12:new sI(this,B),Titan:new xT(this,B,U)},Promise.all([Cf.T.ready,Gt.R.dataBundleLoadPromise]).then((()=>{this.setZoneRewards()})).catch((k=>{K.q.instance.prodigy.open.messageBoxError("ERROR_LOADING_ZONE",["WORLD_SHIPWRECK_SHORE"],k,"Error, unable to load Shipwreck Shore Zone Rewards JSON")})),this.scenes={titanIntro:new _T(this,[Rn.t.Tileset_interior_general_png,Rn.t.Tileset_wall_collisions_png,X.V.Bgm_tutorial])}}setZoneRewards(){const k=(0,yT.mg)(Gt.R.loadData(Ft.r.ZoneRewardsShipwreckShore_json));this.quests={1:new hI(this,[],k.quests.ShipwreckShoreQ1),2:new lI(this,[],k.quests.ShipwreckShoreQ2),3:new uI(this,[],k.quests.ShipwreckShoreQ3),4:new fI(this,[],k.quests.ShipwreckShoreQ4),5:ef.arePippetQuestEncountersEnabled?new pI(this,[],k.quests.ShipwreckShoreQ5):new bI(this,[],k.quests.ShipwreckShoreQ5),6:new vI(this,[],k.quests.ShipwreckShoreQ6),7:new gI(this,[],k.quests.ShipwreckShoreQ7),8:new mI(this,[],k.quests.ShipwreckShoreQ8),9:new yI(this,[],k.quests.ShipwreckShoreQ9),10:new cI(this,[],k.quests.ShipwreckShoreQ10),11:new dI(this,[],k.quests.ShipwreckShoreQ11)}}start(k,B,U){super.start(k,B,U),this.showTopLeftNavigationButton()}createTopLeftNavigationButton(){this.showTopLeftNavigationButton()}init(k,B,U){super.init(k,B,U);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=this.isUnderwaterMap(U.getTag()),j=F.backpack.hasItem("key",14)>0;if(G&&k.broadcaster.addAppListener(oi.ig.PlayerLoaded,this.addBreathingBubbleToPlayerContainer.bind(this),this,this.game),(this.getCurrentQuestID()>1||j&&"B12"===U.getTag())&&(G?(this.battleBG="battle-shipwreck-underwater",U.enableLayerID(0,!(j&&G))):(this.battleBG="battle-shipwreck-outside",U.enableLayerID(0,!(j&&this.hasWhirlpool(U.getTag()))))),"C9"===U.getTag()||"B7"===U.getTag()){const k=this.getState("inkC9"),B=this.getState("inkB7");U.enableLayerID(1,1!==k&&1!==B)}else U.enableLayerID(1,1!==this.getState(`ink${U.getTag()}`))}addBreathingBubbleToPlayerContainer(k){var B;j.Aq$.isDefined(k)&&!k.appearanceConfig.isPreview&&(null===(B=k.getSlotContainer("hip"))||void 0===B||B.addChild(new NO(this.game,null)))}startQuest(k){const B=super.startQuest(k);return j.Aq$.isDefined(B)&&k>2?(this.setState("squeak",wn.o.integerInRange(0,4)),B):null}cleanup(){this.game.broadcaster.removeAppListener(oi.u0.PlayerAdded,this,this.game),this.game.broadcaster.removeAppListener(oi.ig.PlayerLoaded,this,this.game),super.cleanup()}isUnderwaterMap(k){return"A2"===k||"A3"===k||"A5"===k||"A7"===k||"B5"===k||"B6"===k||"B7"===k||"B8"===k||"B10"===k||"B13"===k||"C6"===k||"C7"===k||"C8"===k||"C9"===k}hasWhirlpool(k){return"A1"===k||"A4"===k||"B11"===k||"B12"===k||"C10"===k}addUnderwaterWizard(k,B,U,F,G,$){const H=B.addWizard(this.game,k,U,F,G,$,!1);if(j.Aq$.isDefined(H)){new NO(this.game,H.sprites).y+=24}}addShortcut(k,B,U){const F=k.background.addChild(K.q.instance.prodigy.create.sprite(B,U,q._.Zone_shipwreck_json,"sand-shortcut"));F.y-=.5*F.height,F.x-=.5*F.width}enableShortcut(k,B,U,F,G){if(1===this.getState("inkC9")&&1===this.getState("inkB7")){const j=this.createAreaEvent(k,B,U,F,3,2,G,!1);return j.process(this,B),j}}addWhirlpool(k,B,U,F,G){let j,$,H,V=F;this.isUnderwaterMap(B.getTag())?(j=new BO(this.game,k.background,U,F),j.y-=.75*j.height,$=3,H=4,V-=40):(j=new UO(this.game,k.background,U,F),j.y-=.5*j.height,$=3,H=2),j.x-=.5*j.width,this.createAreaEvent(k,B,U,V,$,H,G,this.isUnderwaterMap(B.getTag()))}createAreaEvent(k,B,U,F,G,j,$,H){const V=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!V.isZoneQuestEnabled||V.backpack.hasItem("key",14)>0){const V=this.getArrowOffsetFromHandRotation($.handRotation,H);return B.addAreaEvent(this.game,k,{x:U,y:F,w:40*G,h:40*j,rect:!0,arrowOffsetX:V.x,arrowOffsetY:V.y},$.target,$.x,$.y,$.callback,$.handRotation,!1)}}getArrowOffsetFromHandRotation(k,B){const U={x:0,y:0};switch(k){case LT.K.UP:U.y=40+(B?40:0);break;case LT.K.RIGHT:U.x=-40;break;case LT.K.DOWN:U.y=(B?-40:0)-40;break;case LT.K.LEFT:U.x=40;break;default:U.x=0,U.y=0}return U}addInkGroup(k,B,U,F,G){const $=`ink${B.getTag()}`;let H=G;if(1!==this.getState($)){const G=this.getCurrentQuestID();return K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("key",15)>0&&G>0&&(H.push(this.sonicBlastInk.bind(this,k,B,$)),H.push(this.game.broadcaster.broadcast.bind(this.game.broadcaster,oi.gJ.InkGroupDestroyed,this.game,[]))),j.Aq$.isDefined(B.questParams)&&j.Aq$.isDefined(B.questParams.inkCallbacks)&&(H=H.concat(B.questParams.inkCallbacks)),new LO(this.game,k,G,U,F,H)}return null}sonicBlastInk(k,B,U){this.setState(U,1),"inkC9"===U?B.enableLayerID(1,1!==this.getState("inkB7")):"inkB7"===U?B.enableLayerID(1,1!==this.getState("inkC9")):(B.enableLayerID(1,!1),B.skipPrefabInitialization=!0,k.area=B.init(this.game,B.below,B.above,k),k.path.init(k.area,k.tileSize))}getCompletedStatesCount(k){let B=0;for(let U=0;U{const B=K.q.instance.prodigy.event.create();B.text(0,"bok"),B.start()}).bind(this,k),!1,H),K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.ShiverchillMerchantNPC,400,350).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.ShiverchillMerchantNPC}`)),K.q.instance.prodigy.create.nicknamerPedestal(this.game,this.zone.ID,B.user,B.content,150,300),this.setCrossoverQuestSequenceComplete(),this.isPrerequisiteComplete()||(this.addSnowStorm(),F.disable(),$.disable(),G.disable((()=>this.showSnowstormDialogue())))}isPrerequisiteComplete(){const k=hn.A_.FOREST,B=yA.QUEST_INDEX,U=K.q.instance.prodigy.world.getZone(k),F=U.getCurrentQuestID();return U.getCurrentQuestID()>B||F===B&&U.isOnSequence(B,vA.GO_TO_SHIVERCHILL)}setCrossoverQuestSequenceComplete(){const k=hn.A_.FOREST,B=LA.c.QUEST_INDEX,U=LA.p.TALK_TO_FLORIAN,F=K.q.instance.prodigy.world.getZone(k);F.isOnSequence(B,U)&&F.completeSequence(B,U)}showSnowstormDialogue(){const k=new Ti.rD(K.q.instance.prodigy.game);k.addEvents([{dialogueData:k.dataProvider.get(1400),blockInput:!0}]),k.start(!0)}addSnowStorm(){const k=new j._mx,B=k.addComponent(j.dLy),U=k.addComponent(j.okU),F=new j._mx,G=k.addComponent(j.dLy),$=k.addComponent(j.okU),H=new WI;H.atlas=q._.Shiverchill_snow_particle_json,H.frameNames=["snowflake-sml","snowflake-med","snowflake-inverted-sml","snowflake-inverted-med"];const V=new WI;V.atlas=q._.Shiverchill_snow_particle_json,V.frameNames=["cloud-sml","cloud-lrg"];const W=new j.ZxM;W.life.setMinMax(.6,1),W.life.type=j.UvC.Random;const K=new j.ZxM;K.life.setMinMax(4,6),K.life.type=j.UvC.Random;const z=new j.U8B;z.angle.setMinMax(.6*j.cj9.RAD_TO_DEG,.6*j.cj9.RAD_TO_DEG),z.angle.type=j.UvC.PhasePerSample,z.speed.setMinMax(180,220);const Y=new j.U8B;Y.angle.setMinMax(0,0),Y.angle.type=j.UvC.PhasePerSample,Y.speed.setMinMax(10,20);const Q=new j.mYY;Q.point1.setTo(0,0),Q.point2.setTo(260,0);const X=new j.Lzo;X.speed.setMinMax(-40,40);const Z=new j.m$y;Z.endAlpha=0,Z.startAtLifePercentage=.5,U.emitPerSecond.setMinMax(15,20),U.initializers=[H,W,z,Q,X],U.behaviours=[Z],$.emitPerSecond.setMinMax(5,10),$.initializers=[V,K,Y,Q],$.behaviours=[Z],G.setPosition(120,-40),B.setPosition(50,-40),this.screen.contentGameObject.addChild(k),this.screen.contentGameObject.addChild(F)}}class zI extends qI{constructor(k,B){super(k,"A11","MAP_SHIVERCHILL_BORDERLAND",1100,220,["shiverchill-A10"],B.concat([q._.Npc_sprite_wizard_json,Rn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside",this.coord=[new j.I9Y(640,560),new j.I9Y(785,230),new j.I9Y(350,400)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1100,y:130,w:160,h:100},"shiverchill-A10",125,650,null,LT.K.UP),this.addWizard(k,B,474,414,"wizard1",44,!1),this.addPippet(k,B,1,838,543)}}class YI extends qI{constructor(k,B){super(k,"A2","MAP_SHIVERCHILL_THE_CHASM",1150,360,["shiverchill-A3"],B.concat([Rn.t.Tileset_generic_snow_png,q._.Npc_sprite_wizard_json])),this.battleBG="battle-shiverchill-outside",this.dailyCoordinates=[{x:840,y:320},{x:565,y:450}]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1060,y:280,r:80},"shiverchill-A3",100,230,null,LT.K.UP),this.addChest(k,B,"chest3",530,370,null,"A"),this.addWizard(k,B,460,360,"wizard4",42,!1)}}class XI extends qI{constructor(k,B){super(k,"A3","MAP_SHIVERCHILL_FROZEN_PASS",280,550,["shiverchill-A2","shiverchill-A4","shiverchill-B3"],B.concat([q._.Zone_shiverchill_json,Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(700,380),new j.I9Y(1150,300)],this.dailyCoordinates=[{x:1100,y:210},{x:485,y:240},{x:390,y:540}]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1275,y:595,w:150,h:240},"shiverchill-B3",100,290,null,null),this.addAreaEvent(k,B,{x:222,y:650,w:240,h:75},"shiverchill-A4",220,80,null,null),this.checkFurnaces(k,B)}checkFurnaces(k,B){this.zone.getState("furnace")>=3?(this.zone.smoke(B,13,3),this.addAreaEvent(k,B,{x:120,y:100,w:150,h:150},"shiverchill-A2",1150,360,null,null)):(B.addBlock(135,240,{x:.5,y:1,atlas:q._.Zone_shiverchill_json,tag:"ice-cubes"}),this.addCollisionZone(B,60,60,120,100))}}class ZI extends qI{constructor(k,B){super(k,"A4","MAP_SHIVERCHILL_WORMS_REST",1160,610,["shiverchill-A3","shiverchill-A5"],B.concat([q._.Zone_shiverchill_json])),this.battleBG="battle-shiverchill-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:220,y:0,w:240,h:75},"shiverchill-A3",280,550,null,null),this.addAreaEvent(k,B,{x:1160,y:510,r:60},"shiverchill-A5",160,200,null,LT.K.UP)}}class JI extends qI{constructor(k,B){super(k,"A5","MAP_SHIVERCHILL_MOUNTAIN_VALLEY",1180,650,["shiverchill-A4","shiverchill-A6"],B.concat([Rn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside",this.coord=[new j.I9Y(100,540),new j.I9Y(700,350),new j.I9Y(1025,150)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1160,y:530,r:60},"shiverchill-A6",160,330,null,LT.K.UP),this.addAreaEvent(k,B,{x:130,y:100,w:100,h:90},"shiverchill-A4",1160,610,null,LT.K.UP),this.addChest(k,B,"chest4",560,320,null,"C")}}class tD extends qI{constructor(k,B){super(k,"A6","MAP_SHIVERCHILL_RAIL_RUINS",1170,400,["shiverchill-A5","shiverchill-B6"],B.concat([q._.Zone_shiverchill_json,Rn.t.Tileset_minecarts_png,Rn.t.Tileset_iceruins_png,q._.Npc_sprite_wizard_json])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(645,330),new j.I9Y(920,555)],this.dailyCoordinates=[{x:1010,y:480},{x:300,y:480},{x:520,y:220}]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:this.game.width,y:400,w:120,h:280},"shiverchill-B6",110,400,null,null);B.addCollect(1,674,245,{type:"item",ID:71}),this.addWizard(k,B,350,370,"wizard2",43,!1),this.checkFurnaces(k,B)}checkFurnaces(k,B){this.zone.getState("furnace")>=2?(this.zone.smoke(B,12,13),B.addClickableEvent(120,160,120,80,this.zone.doorClick.bind(this,B,160,260),null),this.addAreaEvent(k,B,{x:160,y:170,w:80,h:190,rect:!0},"shiverchill-A5",1180,650,null,LT.K.UP),B.addClickableEvent(960,200,80,80,this.zone.doorClick.bind(this,B,1e3,260),null),this.addAreaEvent(k,B,{x:980,y:240,w:70,h:72,rect:!0},"shiverchill-A9",145,170,null,LT.K.UP)):(B.addBlock(160,300,{x:.5,y:1,atlas:q._.Zone_shiverchill_json,tag:"ice-cubes"}),B.addBlock(983,327,{x:.5,y:1,atlas:q._.Zone_shiverchill_json,tag:"ice-cubes"}),this.addCollisionZone(B,80,80,160,200),this.addCollisionZone(B,920,200,100,100))}}class eD extends qI{constructor(k,B){super(k,"A7","MAP_SHIVERCHILL_RUINED_ENTRANCE",189,650,["shiverchill-B7","shiverchill-B8"],B.concat([q._.Npc_sprite_merchant_json,q._.Zone_shiverchill_json,Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(1e3,360),new j.I9Y(720,600)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:160,y:520,r:100},"shiverchill-B8",1100,200,null,LT.K.UP),this.addAreaEvent(k,B,{x:this.game.width,y:450,w:120,h:280},"shiverchill-B7",110,220,null,null),this.setupNPC(k,B);const F=this.zone.getQuestState();j.Aq$.isDefined(this.zone)&&(!j.Aq$.isDefined(F)||F.ID<7&&!this.zone.isQuestComplete(6))&&(this.block=B.addBlock(385,325,{x:.5,y:1,atlas:q._.Zone_shiverchill_json,tag:"ice-small",content:!0}),this.addCollisionZone(B,340,280,100,60))}setupNPC(k,B){this.npc=B.addNPC(378,313,q._.Npc_sprite_merchant_json,Kn.ac.Merchant,this.chatWithMerchant.bind(this,k,B),"NPC_NAME_MINER"),this.npc.flip(),this.npc.animate("stand"),this.npc.showName();const U=B.content.addChild(K.q.instance.prodigy.create.sprite(350,100,q._.General_icons_json,"map-quest"));K.q.instance.prodigy.animation.float(U,20,1400,!0,!0)}chatWithMerchant(k,B){const U=new Ti.rD(this.game),F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.zone.isOnQuest(4)||this.zone.isOnQuest(5)?(U.addEvents([{callback:()=>{this.game.input.enabled=!1;for(let k=0;k{this.npc.highlight(!1)}},{dialogueData:U.dataProvider.get(379),blockInput:!0},{dialogueData:U.dataProvider.get(380),blockInput:!0},{callback:()=>{this.zone.completeSequence(4,1),B.process()}}]):U.addEvents([{dialogueData:U.dataProvider.get(380),blockInput:!0}])):this.zone.isOnQuest(6)?U.addEvents([{dialogueData:U.dataProvider.get(384),blockInput:!0}]):this.zone.getQuestState().ID>=6&&(0===F.backpack.hasItem("item",80)?U.addEvents([{dialogueData:U.dataProvider.get(399),blockInput:!0},{dialogueData:U.dataProvider.get(402),blockInput:!0},{dialogueData:U.dataProvider.get(403),blockInput:!0},{dialogueData:U.dataProvider.get(404),blockInput:!0}]):F.backpack.hasItem("item",80)<5?(U.addEvents([{dialogueData:U.dataProvider.get(399),blockInput:!0},{dialogueData:U.dataProvider.get(391),blockInput:!0}]),4===F.backpack.hasItem("item",80)&&U.addEvents([{dialogueData:U.dataProvider.get(397),blockInput:!0}])):F.backpack.hasItem("item",80)>4&&this.zone.getState("daily").rewards<5?U.addEvents([{dialogueData:U.dataProvider.get(398),blockInput:!0},{callback:()=>{F.saveEnabled=!1,this.zone.setState("daily",{date:this.zone.getState("daily").date,flags:this.zone.getState("daily").flags,rewards:5}),K.q.instance.prodigy.open.gotItem([{type:"item",ID:76,N:5}],null,null,null,null,null,{source_type:gn.C.Npc})}},{dialogueData:U.dataProvider.get(392),blockInput:!0},{callback:()=>{F.saveEnabled=!0}}]):F.backpack.hasItem("item",80)>4&&F.backpack.hasItem("item",80)<10&&this.zone.getState("daily").rewards>4?(U.addEvents([{dialogueData:U.dataProvider.get(399),blockInput:!0},{dialogueData:U.dataProvider.get(392),blockInput:!0}]),9===F.backpack.hasItem("item",80)&&U.addEvents([{dialogueData:U.dataProvider.get(397),blockInput:!0}])):F.backpack.hasItem("item",80)>9&&this.zone.getState("daily").rewards<10?U.addEvents([{dialogueData:U.dataProvider.get(398),blockInput:!0},{callback:()=>{F.saveEnabled=!1,this.zone.setState("daily",{date:this.zone.getState("daily").date,flags:this.zone.getState("daily").flags,rewards:10}),K.q.instance.prodigy.open.gotItem([{type:"item",ID:77,N:10}],null,null,null,null,null,{source_type:gn.C.Npc})}},{dialogueData:U.dataProvider.get(393),blockInput:!0},{callback:()=>{F.saveEnabled=!0}}]):F.backpack.hasItem("item",80)>9&&F.backpack.hasItem("item",80)<25&&this.zone.getState("daily").rewards>9?(U.addEvents([{dialogueData:U.dataProvider.get(399),blockInput:!0},{dialogueData:U.dataProvider.get(393),blockInput:!0}]),24===F.backpack.hasItem("item",80)&&U.addEvents([{dialogueData:U.dataProvider.get(397),blockInput:!0}])):F.backpack.hasItem("item",80)>24&&this.zone.getState("daily").rewards<25?U.addEvents([{dialogueData:U.dataProvider.get(398),blockInput:!0},{callback:()=>{F.saveEnabled=!1,this.zone.setState("daily",{date:this.zone.getState("daily").date,flags:this.zone.getState("daily").flags,rewards:25}),K.q.instance.prodigy.open.gotItem([{type:"hat",ID:10}],null,null,null,null,null,{source_type:gn.C.Npc})}},{dialogueData:U.dataProvider.get(394),blockInput:!0},{callback:()=>{F.saveEnabled=!0}}]):F.backpack.hasItem("item",80)>24&&F.backpack.hasItem("item",80)<50&&this.zone.getState("daily").rewards>24?(U.addEvents([{dialogueData:U.dataProvider.get(399),blockInput:!0},{dialogueData:U.dataProvider.get(394),blockInput:!0}]),49===F.backpack.hasItem("item",80)&&U.addEvents([{dialogueData:U.dataProvider.get(397),blockInput:!0}])):F.backpack.hasItem("item",80)>49&&this.zone.getState("daily").rewards<50?U.addEvents([{dialogueData:U.dataProvider.get(398),blockInput:!0},{callback:()=>{F.saveEnabled=!1,this.zone.setState("daily",{date:this.zone.getState("daily").date,flags:this.zone.getState("daily").flags,rewards:50}),K.q.instance.prodigy.open.gotItem([{type:"outfit",ID:6}],null,null,null,null,null,{source_type:gn.C.Npc})}},{dialogueData:U.dataProvider.get(395),blockInput:!0},{callback:()=>{F.saveEnabled=!0}}]):F.backpack.hasItem("item",80)>49&&F.backpack.hasItem("item",80)<75&&this.zone.getState("daily").rewards>49?(U.addEvents([{dialogueData:U.dataProvider.get(399),blockInput:!0},{dialogueData:U.dataProvider.get(395),blockInput:!0}]),74===F.backpack.hasItem("item",80)&&U.addEvents([{dialogueData:U.dataProvider.get(397),blockInput:!0}])):F.backpack.hasItem("item",80)>74&&this.zone.getState("daily").rewards<75?U.addEvents([{dialogueData:U.dataProvider.get(398),blockInput:!0},{callback:()=>{F.saveEnabled=!1,this.zone.setState("daily",{date:this.zone.getState("daily").date,flags:this.zone.getState("daily").flags,rewards:75}),K.q.instance.prodigy.open.gotItem([{type:"weapon",ID:13}],null,null,null,null,null,{source_type:gn.C.Npc})}},{dialogueData:U.dataProvider.get(396),blockInput:!0},{callback:()=>{F.saveEnabled=!0}}]):F.backpack.hasItem("item",80)>74&&F.backpack.hasItem("item",80)<99&&this.zone.getState("daily").rewards>74?(U.addEvents([{dialogueData:U.dataProvider.get(399),blockInput:!0},{dialogueData:U.dataProvider.get(396),blockInput:!0}]),98===F.backpack.hasItem("item",80)&&U.addEvents([{dialogueData:U.dataProvider.get(397),blockInput:!0}])):F.backpack.hasItem("item",80)>98&&this.zone.getState("daily").rewards<99?U.addEvents([{dialogueData:U.dataProvider.get(398),blockInput:!0},{callback:()=>{F.saveEnabled=!1,this.zone.setState("daily",{date:this.zone.getState("daily").date,flags:this.zone.getState("daily").flags,rewards:99}),K.q.instance.prodigy.open.gotItem([{type:"hat",ID:56}],null,null,null,null,null,{source_type:gn.C.Npc}),F.saveEnabled=!0}}]):U.addEvents([{dialogueData:U.dataProvider.get(408),blockInput:!0}])),U.start()}}class iD extends qI{constructor(k,B){super(k,"A9","MAP_SHIVERCHILL_TREASURE_ROOM",200,490,["shiverchill-A10","shiverchill-B8"],B.concat([q._.Zone_shiverchill_json,Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.dailyCoordinates=[{x:125,y:510},{x:925,y:260},{x:620,y:340}]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:200,y:this.game.height-60,w:280,h:200},"shiverchill-A10",221,200,null,LT.K.DOWN),this.setupFrozenLoot(k,B),this.checkFurnace(k,B)}setupFrozenLoot(k,B){const U=B.content.addChild(K.q.instance.prodigy.create.image(1050,550,q._.Zone_shiverchill_json,"frozen-loot"));U.anchor.set(.5,1),U.visible=!1,this.zone.getState("furnace")>=4?(this.zone.smoke(B,22,12),this.zone.smoke(B,16,14),this.addChest(k,B,"chest6",1050,550,null,"A")):U.visible=!0}checkFurnace(k,B){this.zone.getState("furnace")>=1&&(this.zone.smoke(B,31,4),this.addAreaEvent(k,B,{x:1090,y:130,w:150,h:80},"shiverchill-B8",100,550,null,LT.K.UP)),B.addClickableEvent(160,40,80,80,this.zone.doorClick.bind(this,B,200,100),null),this.zone.getState("furnace")>=2&&(this.zone.smoke(B,12,7),this.addAreaEvent(k,B,{x:150,y:75,w:100,h:80,rect:!0},"shiverchill-A6",980,335,null,LT.K.UP)),this.zone.getState("furnace")<=1&&(B.addBlock(150,150,{x:.5,y:1,atlas:q._.Zone_shiverchill_json,tag:"ice-cubes"}),this.addCollisionZone(B,80,0,120,80)),this.zone.getState("furnace")<1&&(B.addBlock(1070,250,{x:.5,y:1,atlas:q._.Zone_shiverchill_json,tag:"ice-cubes"}),B.addBlock(1155,285,{x:.5,y:1,atlas:q._.Zone_shiverchill_json,tag:"ice-cubes"}),this.addCollisionZone(B,1e3,80,180,140))}}class sD extends qI{constructor(k,B){super(k,"B1","MAP_SHIVERCHILL_GATE",200,630,["shiverchill-B3"],B.concat([q._.Npc_sprite_wizard_json,Rn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:130,y:420,r:80},"shiverchill-B3",1160,230,null,LT.K.UP),this.addWizard(k,B,960,500,"wizard3",45,!0)}}class nD extends qI{constructor(k,B){super(k,"B10","MAP_SHIVERCHILL_FURNACE_ROOM",255,545,["shiverchill-A10","shiverchill-B9"],B.concat([Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:200,y:660,w:120,h:90,rect:!0},"shiverchill-A10",1080,230,null,null),this.addAreaEvent(k,B,{x:660,y:200,w:60,h:72,rect:!0},"shiverchill-B9",645,500,null,null);const F=[[200,120],[440,240],[720,200],[1e3,240]],G=[];for(let j=0;j0&&this.highlightFurnace(G),this.processFurnaces(B)}highlightFurnace(k){const B=this.zone.getState("furnace");j.Aq$.isDefined(B)?B{const F=B.content.addChild(K.q.instance.prodigy.icon.createIcon(B.user.x,B.user.y,U));F.anchor.set(.5,1),k.add.tween(F,this).to({x:"+=70"},2e3,j.GS3.Linear.None).to({alpha:0},10,j.GS3.Linear.None).start(),k.add.tween(F,this).to({y:"-=200"},1e3,j.GS3.Quadratic.Out).to({y:"+=100"},1e3,j.GS3.Quadratic.In).start()};if($>=U)if(V.backpack.hasItem("item",79)>0){const U=[{type:"item",ID:76},{type:"item",ID:2},{type:"item",ID:77}],F=.5*Math.random()+.5,G=[],j=Math.floor(1.5*Math.random()+1);for(let k=0;k$+1?H.popup(G.getText("SHIVERCHILL_FURNACE_IN_ORDER")):V.backpack.hasItem("item",71)>0?(H.enableInput(!1),H.enableSave(!1),H.function(V.backpack.consume.bind(V.backpack,"item",71,1)),H.function(this.zone.setState.bind(this.zone,"furnace",U)),H.function(F.highlight.bind(F,!1)),H.function(W.bind(this,k,B,Ut.E.getIconForType("item",71))),H.delay(2e3),H.function(this.processFurnaces.bind(this,B)),H.enableSave(!0),H.enableInput(!0),H.function(B.process.bind(B))):H.popup(G.getText("SHIVERCHILL_FURNACE_FUEL"));H.start()}processFurnaces(k){const B=this.zone.getState("furnace");if(j.Aq$.isDefined(B)){const U=[[5,4],[11,7],[18,6],[25,7]];for(let F=0;F=F+1&&(k.floor.add(this.getTile(809,40*G,40*$,k.path,k.area,null,!0,!0)),k.floor.add(this.getTile(810,40*(G+1),40*$,k.path,k.area,null,!0,!0)),k.floor.add(this.getTile(j.DXe.flippedHorizontally+809,40*(G+2),40*$,k.path,k.area,null,!0,!0)))}}}}class aD extends qI{constructor(k,B){super(k,"B2","MAP_BONFIRE_SPIRE_THRONE_ROOM",640,500,["shiverchill-B3"],B),this.battleBG="battle-shiverchill-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:675,y:625,w:250,h:200,rect:!0},"shiverchill-B3",560,415,null,LT.K.DOWN)}}class rD extends qI{constructor(k,B){super(k,"B3","MAP_SHIVERCHILL_ROYAL_PASSAGE",110,280,["shiverchill-B1","shiverchill-A3","shiverchill-B2"],B.concat([q._.Zone_shiverchill_json,q._.Npc_sprite_noot_json,Rn.t.Tileset_iceruins_png,Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.dailyCoordinates=[{x:980,y:250},{x:970,y:400},{x:255,y:490}]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:0,y:350,w:150,h:275},"shiverchill-A3",1160,530,null,null),this.checkFurnaces(k,B)}checkFurnaces(k,B){this.zone.getState("furnace")>=3?(this.zone.smoke(B,1,16),this.zone.smoke(B,27,16),this.zone.smoke(B,26,12),B.addClickableEvent(520,270,80,120,this.zone.doorClick.bind(this,B,560,370),null),this.addAreaEvent(k,B,{x:520,y:285,w:90,h:80,rect:!0},"shiverchill-B2",640,500,null,LT.K.UP),this.addAreaEvent(k,B,{x:1060,y:90,w:180,h:60},"shiverchill-B1",200,630,null,LT.K.UP)):(B.addBlock(520,368,{x:.5,y:1,atlas:q._.Zone_shiverchill_json,tag:"ice-cubes"}),B.addBlock(1080,175,{x:.5,y:1,atlas:q._.Zone_shiverchill_json,tag:"ice-cubes"}),this.addCollisionZone(B,460,60,160,220),this.addCollisionZone(B,1060,40,180,120))}}class oD extends qI{constructor(k,B){super(k,"B6","MAP_SHIVERCHILL_RUINED_STEPS",1100,530,["shiverchill-A6","shiverchill-B7"],B.concat([Rn.t.Tileset_minecarts_png,Rn.t.Tileset_iceruins_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(315,635),new j.I9Y(650,600),new j.I9Y(1100,230)],this.dailyCoordinates=[{x:1100,y:420},{x:1015,y:110},{x:185,y:400}]}init(k,B,U,F){return this.enableLayerID(0,!1),this.enableLayerID(1,!0),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1e3,y:this.game.height-70,w:280,h:120},"shiverchill-B7",1060,110,null,null),this.addAreaEvent(k,B,{x:0,y:400,w:170,h:280},"shiverchill-A6",1170,400,null,null),this.addChest(k,B,"chest1",545,280,{type:"item",ID:75},"B")}}class hD extends qI{constructor(k,B){super(k,"B7","MAP_SHIVERCHILL_RUINED_PASSAGE",110,220,["shiverchill-A7","shiverchill-B6"],B.concat([Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(320,260),new j.I9Y(380,620)],this.dailyCoordinates=[{x:370,y:540},{x:955,y:400},{x:1190,y:330}]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1050,y:0,w:480,h:120},"shiverchill-B6",1100,530,null,null),this.addAreaEvent(k,B,{x:0,y:250,w:120,h:280},"shiverchill-A7",1170,430,null,null)}}class cD extends qI{constructor(k,B){super(k,"B8","MAP_SHIVERCHILL_MOUNTAIN_PASS",100,550,["shiverchill-A9","shiverchill-A7"],B.concat([q._.Zone_shiverchill_json,Rn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside",this.coord=[new j.I9Y(1200,530),new j.I9Y(820,400),new j.I9Y(445,280)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:90,y:410,r:80},"shiverchill-A9",1125,225,null,LT.K.UP),this.addAreaEvent(k,B,{x:1090,y:100,w:100,h:70},"shiverchill-A7",189,650,null,LT.K.UP),this.addChest(k,B,"chest2",750,200,null,"C")}canRegularMonsterSpawn(){return!this.zone.isOnQuest(7)}}class dD extends qI{constructor(k,B){super(k,"B9","MAP_SHIVERCHILL_HIDDEN_ROOM",645,500,["shiverchill-B10"],B.concat([q._.Zone_shiverchill_json])),this.battleBG="battle-shiverchill-inside",this.dailyCoordinates=[{x:680,y:250},{x:280,y:320},{x:945,y:380}]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:645,y:650,r:140},"shiverchill-B10",670,250,null,LT.K.DOWN),this.addChest(k,B,"chest5",850,275)}}class lD extends Pn.T{constructor(k,B,U){super(k,B,1,"",{type:"pet",ID:122,N:3},["shiverchill-B10"],[1464,1465,1466],[],[332],U,!1,"QUESTS_SHIVERCHILL_CLEAR_FURNACE")}setup(k,B,U){if(super.setup(k,B,U),"B10"===U.getTag()){const F={randDir:!0,encounter:[{ID:122}],difficulty:1,maxTeamSize:1,isQuestEncounter:!0};U.addMonster(k,B,1,128,255,!0,F),U.addMonster(k,B,2,1150,480,!0,F),U.addMonster(k,B,3,417,408,!0,F)}return null}start(k,B,U){if("B10"===U.getTag()&&this.zone.isOnSequence(1,0)){const k=K.q.instance.prodigy.event.create();k.text(67,"noot"),k.function(this.zone.completeSequence.bind(U.zone,1,0)),k.start()}return null}}class uD extends Pn.T{constructor(k,B,U){super(k,B,10,"QUESTS_SHIVERCHILL_ACTIVATE_FURNACE",{type:"zgteState",ID:"furnace",N:2},["shiverchill-B10"],[342,343],[],[332,333],U,!1)}}class fD extends Pn.T{constructor(k,B,U){super(k,B.concat(J.Q.Default_boss_16_json),11,"QUESTS_SHIVERCHILL_CHECK_THRONE",{type:"seq",N:1},["shiverchill-B3"],[359,360],[],[361],U,!1)}setup(k,B,U){return super.setup(k,B,U),"B3"===U.getTag()?{enableMonsters:!1}:{}}start(k,B,U){return this.zone.isOnSequence(11,0)&&"B3"===U.getTag()&&this.cutscene(k,B,U),{}}cutscene(k,B,U){U.boss=k.add.spine(930,440,J.Q.Default_boss_16_json,B.content),U.boss.visible=!1,U.boss.scale.set(.65,.65),U.boss.setAnimationByName(0,"idle",!0);const F=B.content.addChild(K.q.instance.prodigy.icon.createIcon(770,400,Ut.E.getIconForType("item",71))),G=B.addNPC(250,400,q._.Npc_sprite_noot_json);G.visible=!1,G.float(!0);const j=K.q.instance.prodigy.event.create();j.enableInput(!1),j.path(B.user,[{x:250,y:400}]),j.set(G,"visible",!0),j.hop(G,300,50,50),j.text(74,"noot"),j.delay(500),j.function(G.chat.bind(G,1,100)),j.delay(500),j.path(G,[{x:550,y:450}]),j.text(75,"noot"),j.path(G,[{x:750,y:500}]),j.shake(0,3e3,10,"v",!0),j.function(G.chat.bind(G,1,100)),j.explode(810,350,200,150,1,!0),j.delay(500),j.hop(G,110,-140,100,!0),j.delay(700),j.explode(810,200,200,250,2,!0),j.delay(1e3),j.set(U.boss,"visible",!0),j.explode(810,350,150,150,1),j.delay(1e3),j.shake(0,3e3,10,"v",!0),j.explode(810,350,200,150,1,!0),j.delay(700),j.explode(810,200,200,250,2,!0),j.delay(700),j.set(U.boss,"visible",!1),j.set(F,"visible",!1),j.explode(810,350,150,150,1),j.text(76,"noot"),j.path(G,[{x:300,y:400}]),j.hop(G,300,-50,50),j.set(G,"visible",!1),j.enableInput(!0),j.function(this.zone.completeSequence.bind(U.zone,11,0)),j.function(B.process.bind(B)),j.start()}}class bD extends Pn.T{constructor(k,B,U){super(k,B,12,"",{type:"item",ID:74,N:5,K:!0},["shiverchill-A3","shiverchill-B3"],[362,334,363,364,365],[],[332],U,!1,"QUESTS_SHIVERCHILL_COLLECT_CRYSTALS"),this.collectionMaps={A3:[1,2,3],B3:[4,5]}}setup(k,B,U){if(super.setup(k,B,U),"B3"===U.getTag()){const k={type:"item",ID:74};B.addCollect(4,530,550,k),B.addCollect(5,860,525,k)}else if("A3"===U.getTag()){const k={type:"item",ID:74};B.addCollect(1,980,160,k),B.addCollect(2,180,450,k),B.addCollect(3,670,370,k)}return null}}class pD extends Pn.T{constructor(k,B,U){super(k,B.concat(J.Q.Default_boss_16_json),13,"QUESTS_SHIVERCHILL_DEFEAT_ICE_WORM",{type:"seq",N:1},["shiverchill-A4"],[366,334,367],[],[332],U,!1)}setup(k,B,U){return super.setup(k,B,U),"A4"===U.getTag()?{enableMonsters:!1}:null}start(k,B,U){return this.zone.isOnSequence(13,0)&&"A4"===U.getTag()&&(this.zone.hideFollow(B),this.bossBattle(k,B,U)),null}endBattle(k){this.zone.completeSequence(13,0),K.q.instance.prodigy.world.it("shiverchill-A4",300,460)}bossBattle(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),G=F.getValue("iceWyrm2MaxHP",Vt.s.get("GameConstants.IceWyrm2.MAX_HP")),$=null===G?void 0:parseInt(G,10),H=this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_BOSS_BATTLE"),{boss:{ID:16,element:"ice",attacks:[62,63,65],name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_ICE_WORM"),tag:hn.A_.SHIVERCHILL,maxHP:$},difficulty:parseInt(F.getValue("iceWyrm2Difficulty",Vt.s.get("GameConstants.IceWyrm2.DIFFICULTY")),10),starMod:5,screen:"battle-shiverchill-inside",drops:[{ID:71,type:"item"}]},this.endBattle.bind(this,k)),V=(k,B,U)=>{const F=B.background.addChild(K.q.instance.prodigy.create.sprite(B.user.x,B.user.y,q._.General_icons_json,"crystal"));F.anchor.set(.5,1),k.add.tween(F,this).to({x:U},500,j.GS3.Linear.None).start(),k.add.tween(F,this).to({y:"-=50"},250,j.GS3.Quadratic.Out).to({y:"+=50"},250,j.GS3.Quadratic.In).start()},W=K.q.instance.prodigy.event.create(),z=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;W.set(B.user,"evtProc",!0),W.enableInput(!1),W.path(B.user,[{x:640,y:530}]),W.function(z.backpack.consume.bind(z.backpack,"item",74,5)),W.function(V.bind(U,k,B,"-=50")),W.delay(500),W.path(B.user,[{x:310,y:600}]),W.function(V.bind(U,k,B,"-=50")),W.delay(500),W.path(B.user,[{x:200,y:430}]),W.function(V.bind(U,k,B,"-=50")),W.delay(500),W.path(B.user,[{x:250,y:340}]),W.function(V.bind(U,k,B,"+=50")),W.delay(500),W.path(B.user,[{x:470,y:380}]),W.function(V.bind(U,k,B,"+=50")),W.delay(500),W.path(B.user,[{x:300,y:460}]),W.path(B.user,[{x:301,y:460}]),W.delay(500),W.shake(0,3e3,10,"v",!0),W.function(B.user.chat.bind(B.user,1,100)),W.explode(360,410,150,150,1,!0),W.delay(700),W.explode(360,260,150,250,2,!0),W.delay(1e3),W.function((()=>{const U=k.add.spine(500,510,J.Q.Default_boss_16_json,B.content);U.scale.set(-.65,.65),U.setAnimationByName(0,"idle",!0)})),W.explode(360,410,150,150,1),W.delay(1500),W.enableInput(!0),W.function((()=>{K.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle"})),W.function(H),W.start()}}class vD extends Pn.T{constructor(k,B,U){super(k,B,14,"QUESTS_SHIVERCHILL_ACTIVATE_FURNACE",{type:"zgteState",ID:"furnace",N:3},["shiverchill-B10"],[342,343],[],[332,333],U,!1)}}!function(k){k[k.GetShiverchillGemSeq=0]="GetShiverchillGemSeq",k[k.PlaceShiverchillGemSeq=1]="PlaceShiverchillGemSeq",k[k.FinishQuestSeq=2]="FinishQuestSeq",k[k.QuestID=15]="QuestID"}(uO||(uO={}));class gD extends Pn.T{constructor(k,B,U){super(k,B,15,"",{type:"seq",N:uO.FinishQuestSeq},[`${hn.A_.SHIVERCHILL}-B2`],[368,369],[],[1252],U,!1,"QUESTS_SHIVERCHILL_GET_GEM"),this.collectionMaps={B2:[1]}}setup(k,B,U){super.setup(k,B,U);const F=U.getTag(),G=`zone-${this.zone.ID}-quest`,$=this.zone.getQuestState(),H=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,V=K.q.instance.prodigy.world.getZone(hn.A_.ACADEMY).getKeystoneState(hn.A_.SHIVERCHILL)===Dn.s.Placed,W=H.backpack.hasItem("key",4)>0;return j.Aq$.isDefined($.state)||V||W?V&&"seq"!==H.state.get(`${G}-req-type`)&&H.state.set(`${G}-req`,this.req):H.state.set(G,Object.assign(Object.assign({},$),{state:{},seq:uO.GetShiverchillGemSeq})),W&&(this.collectionMaps={}),F===fO.ThroneRoom&&this.zone.isOnSequence(this.ID,uO.GetShiverchillGemSeq)?(k.input.enabled=!1,H.playerContainer.visible=!0,B.user.x=700,B.user.y=850,K.q.instance.prodigy.world.playScene("shiverchill-receiveShiverchillGem")):F===fO.BoksCave&&(W&&(this.onStart=[1251]),V&&(this.zone.completeSequence(this.ID,uO.GetShiverchillGemSeq),this.zone.completeSequence(this.ID,uO.PlaceShiverchillGemSeq))),null}process(k,B,U){super.process(k,B,U);K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("key",4)>0&&j.Aq$.isDefined(B.questProgress)&&!ti.U.shouldShowEndgameQuestBanner(hn.A_.SHIVERCHILL)&&(B.questProgress.visible=!1)}}class mD extends Pn.T{constructor(k,B,U){super(k,B,2,"",{type:"item",N:1,ID:71,K:!0},["shiverchill-A9"],[339,334,340,341],[],[332],U,!1,"QUESTS_SHIVERCHILL_GET_FUEL")}setup(k,B,U){return super.setup(k,B,U),"A9"===U.getTag()?(K.q.instance.prodigy.prefabFactory.addMonster(U,490,510,mD.QUEST_SPAWN_IDS[0],this.getSpawnMods(mD.QUEST_SPAWN_IDS[0])).catch(j.RQr.createHandler("Could not add monster 1 for ShiverchillQ2")),K.q.instance.prodigy.prefabFactory.addMonster(U,720,200,mD.QUEST_SPAWN_IDS[1],this.getSpawnMods(mD.QUEST_SPAWN_IDS[1])).catch(j.RQr.createHandler("Could not add monster 2 for ShiverchillQ2")),K.q.instance.prodigy.prefabFactory.addMonster(U,1150,460,mD.QUEST_SPAWN_IDS[2],this.getSpawnMods(mD.QUEST_SPAWN_IDS[2])).catch(j.RQr.createHandler("Could not add monster 3 for ShiverchillQ2")),K.q.instance.prodigy.prefabFactory.addMonster(U,200,230,mD.QUEST_SPAWN_IDS[3],this.getSpawnMods(mD.QUEST_SPAWN_IDS[3])).catch(j.RQr.createHandler("Could not add monster 4 for ShiverchillQ2")),{enableMonsters:!1}):null}getSpawnMods(k){this.spawnPetIds||(this.spawnPetIds={},mD.QUEST_SPAWN_IDS.forEach((k=>{this.spawnPetIds[k]=Math.random()<.5?78:122})));let B=[];return 1===this.getQuestMonstersRemaining()&&(B=[{type:"item",ID:71,N:1}]),{randDir:!0,showGuideHand:!0,encounter:[{ID:this.spawnPetIds[k]}],drops:B,difficulty:2,maxTeamSize:1,isQuestEncounter:!0,unique:!0}}getQuestMonstersRemaining(){const k=this.zone.getQuestState().state;return mD.QUEST_SPAWN_IDS.filter((B=>!k[B+1])).length}}mD.QUEST_SPAWN_IDS=[1,2,3,4];class yD extends Pn.T{constructor(k,B,U){super(k,B,3,"QUESTS_SHIVERCHILL_ACTIVATE_FURNACE",{type:"zgteState",ID:"furnace",N:1},["shiverchill-B10"],[342,343],[],[332,333],U,!1)}}class _D extends Pn.T{constructor(k,B,U){super(k,B,4,"QUESTS_SHIVERCHILL_EXPLORE_CAVES",{type:"seq",N:2},["shiverchill-A7"],[344,345],[69],[346,347,334,348],U,!1)}start(k,B,U){if(this.zone.isOnSequence(4,0)&&"B8"===U.getTag()){const k=K.q.instance.prodigy.event.create();k.enableInput(!1),k.path(B.user,[{x:250,y:640}]),k.function(B.user.chat.bind(B.user,1,100)),k.shake(0,3e3,10,"v"),k.enableInput(!0),k.text(68,"noot"),k.function(this.zone.completeSequence.bind(U.zone,4,0)),k.start()}else"A7"===U.getTag()&&(this.zone.isQuestComplete(4)||U.npc.highlight(!0,-60,-100));return null}}class ED extends Pn.T{constructor(k,B,U){super(k,B,5,"QUESTS_SHIVERCHILL_FIND_SHOVEL",{type:"item",ID:73,N:1},["shiverchill-B6"],[349],[70],[350,334,351],U,!1)}}class wD extends Pn.T{constructor(k,B,U){super(k,B,6,"QUESTS_SHIVERCHILL_HELP_MINER",{type:"seq",N:2},["shiverchill-A7"],[352],[],[332],U,!1)}start(k,B,U){return this.zone.isOnSequence(6,0)&&"A7"===U.getTag()?this.ambush(k,B,U):this.zone.isOnSequence(6,1)&&"A7"===U.getTag()&&this.talkToMerchant(k,B,U),null}endBattle(k){this.zone.completeSequence(6,0),K.q.instance.prodigy.world.it("shiverchill-A7",328,343)}ambush(k,B,U){const F=U.addMonster(k,B,1,0,0,!1,{encounter:[{ID:87}],difficulty:1,maxTeamSize:1},!0),G=U.addMonster(k,B,1,0,0,!1,{encounter:[{ID:87}],difficulty:1,maxTeamSize:1},!0),$=U.addMonster(k,B,1,0,0,!1,{encounter:[{ID:87}],difficulty:1,maxTeamSize:1},!0),H=(k,B,U)=>{U.x=k,U.y=B},V=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),W=this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_SNOWBALL_FIGHT"),{pets:[{ID:87,nickname:V.getText("NPC_NAME_CHILLY")},{ID:87,nickname:V.getText("NPC_NAME_FROSTY")},{ID:87,nickname:V.getText("NPC_NAME_FREEZY")}]},this.endBattle.bind(this,k)),q=K.q.instance.prodigy.event.create();q.enableInput(!1),q.set(B.user,"evtProc",!0),q.path(B.user,[{x:450,y:550},{x:430,y:600}]),q.delay(500),q.function(H.bind(U,900,600,F)),q.function(H.bind(U,950,650,G)),q.function(H.bind(U,950,550,$)),q.function(B.user.chat.bind(B.user,1,80)),q.path(F,[{x:600,y:333}],1,!0),q.path(G,[{x:650,y:333}],1,!0),q.path($,[{x:600,y:283}],1,!1),q.hop(F,575,-140,100,!0),q.hop(G,575,-140,100,!0),q.hop($,575,-140,100,!1),q.enableInput(!0),q.function((()=>{K.q.instance.prodigy.battle.battleStats.type="QuestBattle"})),q.function(W),q.start()}talkToMerchant(k,B,U){j.Aq$.isDefined(U.block)&&(U.block.visible=!1);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=new Ti.rD(k);G.addEvents([{dialogueData:G.dataProvider.get(381),blockInput:!0},{dialogueData:G.dataProvider.get(81),blockInput:!0},{dialogueData:G.dataProvider.get(382),blockInput:!0},{dialogueData:G.dataProvider.get(383),blockInput:!0},{dialogueData:G.dataProvider.get(82),blockInput:!0},{dialogueData:G.dataProvider.get(384),blockInput:!0},{dialogueData:G.dataProvider.get(407),blockInput:!0},{dialogueData:G.dataProvider.get(402),blockInput:!0},{dialogueData:G.dataProvider.get(403),blockInput:!0},{dialogueData:G.dataProvider.get(404),blockInput:!0},{callback:()=>{F.saveEnabled=!1}},{callback:()=>{F.backpack.consume("item",72,1)}},{callback:()=>{this.zone.completeSequence(6,1)}},{callback:()=>{F.saveEnabled=!0}},{callback:()=>{B.process()}}]),G.start()}}class TD extends Pn.T{constructor(k,B,U){super(k,B.concat(J.Q.Default_boss_16_json),7,"QUESTS_SHIVERCHILL_UNKNOWN",{type:"seq",N:1},["shiverchill-B8"],[353,354],[69],[332],U,!1,"QUESTS_SHIVERCHILL_DEFEAT_MINI_BOSS")}setup(k,B,U){return super.setup(k,B,U),this.zone.isOnSequence(7,0)&&"B8"===U.getTag()&&(k.input.enabled=!1,this.screen.user.x=290,this.screen.user.y=640),{}}start(k,B,U){return this.zone.isOnSequence(7,0)&&"B8"===U.getTag()&&this.bossBattle(k,B,U),{}}endBattle(k){this.zone.completeSequence(7,0),K.q.instance.prodigy.world.it("shiverchill-B8",480,320)}bossBattle(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),G=F.getValue("iceWyrm1MaxHP",Vt.s.get("GameConstants.IceWyrm1.MAX_HP")),$=null===G?void 0:parseInt(G,10),H=this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_SCARY_WORM"),{boss:{ID:16,element:"ice",attacks:[62,64],name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_UNKNOWN"),difficulty:3,tag:hn.A_.SHIVERCHILL,maxHP:$},difficulty:parseInt(F.getValue("iceWyrm1Difficulty",Vt.s.get("GameConstants.IceWyrm1.DIFFICULTY")),10),starMod:2,screen:"battle-shiverchill-outside"},this.endBattle.bind(this,k)),V=K.q.instance.prodigy.event.create();V.enableInput(!1),V.path(B.user,[{x:425,y:326},{x:420,y:530},{x:290,y:640}]),V.shake(0,3e3,10,"v",!0),V.function(B.user.chat.bind(B.user,1,100)),V.explode(540,250,150,150,1,!0),V.delay(700),V.explode(540,100,150,250,2,!0),V.delay(1e3),V.function((()=>{const U=k.add.spine(605,315,J.Q.Default_boss_16_json,B.foreground);U.scale.set(-.65,.65),U.setAnimationByName(0,"idle",!0)})),V.explode(540,250,150,150,1),V.delay(1500),V.enableInput(!0),V.text(73,"noot"),V.function((()=>{K.q.instance.prodigy.battle.battleStats.type="QuestBattle"})),V.function(H),V.start()}}class SD extends Pn.T{constructor(k,B,U){super(k,B,8,"",{type:"pet",ID:90,N:3},["shiverchill-B7","shiverchill-B6"],[355,356,334,357],[],[332],U,!1,"QUESTS_SHIVERCHILL_DEFEAT_SPECTERS")}setup(k,B,U){super.setup(k,B,U);const F={randDir:!0,encounter:[{ID:90}],difficulty:3,maxTeamSize:1,isQuestEncounter:!0},G={randDir:!0,encounter:[{ID:90}],difficulty:2,maxTeamSize:1,isQuestEncounter:!0};return"B6"===U.tag?(U.addMonster(k,B,11,700,160,!1,G,!1),U.addMonster(k,B,10,325,325,!1,F,!1),{enableMonsters:!1}):"B7"===U.tag?(U.addMonster(k,B,11,800,500,!1,F,!1),U.addMonster(k,B,10,675,285,!1,G,!1),{enableMonsters:!1}):null}}class AD extends Pn.T{constructor(k,B,U){super(k,B.concat(X.V.Bgm_puppetmaster),8,"",{type:"pet",ID:90,N:3},["shiverchill-B7","shiverchill-B6"],[355,356,334,357],[],[332],U,!1,"QUESTS_SHIVERCHILL_DEFEAT_SPECTERS")}setup(k,B,U){super.setup(k,B,U);const F={randDir:!0,encounter:[{ID:90}],difficulty:3,maxTeamSize:1,isQuestEncounter:!0},G={randDir:!0,encounter:[{ID:90}],difficulty:2,maxTeamSize:1,isQuestEncounter:!0};return"B6"===U.tag?(U.addMonster(k,B,11,700,160,!1,G,!1),U.addMonster(k,B,10,325,325,!1,F,!1),{enableMonsters:!1}):"B7"===U.tag?(U.addMonster(k,B,11,800,500,!1,F,!1),U.addMonster(k,B,10,675,285,!1,G,!1),{enableMonsters:!1}):"A7"!==U.tag||U.zone.getState(Zu.PIPPET_DEFEATED)?null:(K.q.instance.prodigy.prefabFactory.createPippetQuestEncounter(U.zone,202,bS.e.Shiverchill_quests_encounter).catch(j.RQr.createHandler(`Could not load the Pippet Encounter from guid: ${bS.e.Shiverchill_quests_encounter}`)),k.input.enabled=!1,{enableMonsters:!1,enableWizards:!1})}}class CD extends Pn.T{constructor(k,B,U){super(k,B,9,"",{type:"item",ID:71,N:1,K:!0},["shiverchill-A6"],[358],[],[332],U,!1,"QUESTS_SHIVERCHILL_GET_FUEL")}}class OD extends $n.Z{constructor(k,B){super(k,"B2",[...B,...[q._.Npc_sprite_noot_json,J.Q.Spine_shadowportal_json,Z.c.Sfx_academy_portal_open,Z.c.Sfx_academy_portal_close,J.Q.Spine_academygh_addkeystone_json,"key-4",X.V.Bgm_fun,qw.N.Map_shiverchill_b2_json,Rn.t.Tileset_shiverchill_interior_png]])}start(k,B){var U;K.q.instance.game.input.enabled=!1,super.start(k,B,11),B.user.x=700,B.user.y=850;const F=B.addNPC(630,800,q._.Npc_sprite_noot_json);F.float(!0),F.walkSpeed=2,F.visible=!0;const G=k.add.spine(845,250,J.Q.Spine_shadowportal_json);G.setToSetupPose(),B.content.addChild(G);const $=k.add.spine(695,300,J.Q.Spine_academygh_addkeystone_json);$.setToSetupPose(),$.setAnimationByName(0,"keystone-idle-shiverchill"),B.content.addChild($);const H=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),V=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService),W=[1246];(null===(U=K.q.instance.prodigy.world.getCurrentZoneObject())||void 0===U?void 0:U.difficultyMode)===ri.i.Regular&&W.push(1247),H.execute(V.getStateMachine(186),{game:k,screen:B,scene:this,zone:this.zone,player:B.user,noot:F,path:B.path,pathfinder:B.path,portal:G,keystone:$,map:`${this.zone.ID}-B2`,nootDialogues:W},(()=>K.q.instance.game.input.enabled=!0))}}!function(k){k.BoksCave="A10",k.ThroneRoom="B2"}(fO||(fO={}));class ID extends vn.b{constructor(k){super(k),this.questManagerIdentifier="c16-888b",this._assets=[Rn.t.Tileset_icecave_new_png,Rn.t.Tileset_collisions_png,Rn.t.Tileset_ship_exterior_png,Rn.t.Tileset_water_new_png,X.V.Bgm_shiverchill_mountain],this.name="Shiverchill Mountains",this.ID=hn.A_.SHIVERCHILL,this.guardian="SHIVERCHILL_GUARDIAN",this.battleBG="battle-shiverchill-inside",this.defaultOnFaint="shiverchill-A10",this.questHub="shiverchill-A10",this.bgmID=17,this.currency=15,this.zoneIndex=pT.P.Shiverchill,this.states=["chest1","chest2","chest3","chest4","chest5","wizard1","wizard2","wizard3","wizard4","furnace","chest6","daily",Zu.PIPPET_ENCOUNTER,Zu.PIPPET_REMATCH,Zu.PIPPET_DEFEATED],this.monsters=[16,50,122,78,87];const B=[Rn.t.Tileset_icecave_new_png,Rn.t.Tileset_collisions_png,Rn.t.Tileset_ship_exterior_png,Rn.t.Tileset_water_new_png,X.V.Bgm_shiverchill_mountain,Rn.t.Tileset_shiverchill_exterior_png,Rn.t.Tileset_shiverchill_interior_png,Rn.t.Tileset_shiverchill_rails_png],U={map:"shiverchill-Titan",cutscene:"shiverchill-titanIntro",harvey:{x:240,y:200},sign:{x:150,y:210},catapult:{x:140,y:400,arcHeight:300},titan:{x:1100,y:390,impactOffset:{x:-130,y:0}},entry:{x:400,y:450},battleBG:[nr.q.Battle_shiverchill_outside_bg,nr.q.Battle_shiverchill_outside_fg]};this.maps={A11:new zI(this,B),A10:new KI(this,B),A9:new iD(this,B),A7:new eD(this,B),A6:new tD(this,B),A5:new JI(this,B),B3:new rD(this,B),B6:new oD(this,B),B7:new hD(this,B),B8:new cD(this,B),B9:new dD(this,B),B10:new nD(this,B),A4:new ZI(this,B),A2:new YI(this,B),A3:new XI(this,B),B2:new aD(this,B),B1:new sD(this,B),Titan:new xT(this,B,U)},Promise.all([Cf.T.ready,Gt.R.dataBundleLoadPromise]).then((()=>{this.setZoneRewards()})).catch((k=>{K.q.instance.prodigy.open.messageBoxError("ERROR_LOADING_ZONE",["WORLD_SHIVERCHILL_MOUNTAINS"],k,"Error, unable to load Shiverchill Zone Rewards JSON")})),this.scenes={receiveShiverchillGem:new OD(this,B),titanIntro:new _T(this,[Rn.t.Tileset_interior_general_png,Rn.t.Tileset_wall_collisions_png,X.V.Bgm_tutorial])}}setZoneRewards(){const k=(0,yT.mg)(Gt.R.loadData(Ft.r.ZoneRewardsShiverchill_json));this.quests={1:new lD(this,[],k.quests.ShiverchillQ1),2:new mD(this,[],k.quests.ShiverchillQ2),3:new yD(this,[],k.quests.ShiverchillQ3),4:new _D(this,[],k.quests.ShiverchillQ4),5:new ED(this,[],k.quests.ShiverchillQ5),6:new wD(this,[],k.quests.ShiverchillQ6),7:new TD(this,[],k.quests.ShiverchillQ7),8:ef.arePippetQuestEncountersEnabled?new AD(this,[],k.quests.ShiverchillQ8):new SD(this,[],k.quests.ShiverchillQ8),9:new CD(this,[],k.quests.ShiverchillQ9),10:new uD(this,[],k.quests.ShiverchillQ10),11:new fD(this,[],k.quests.ShiverchillQ11),12:new bD(this,[],k.quests.ShiverchillQ12),13:new pD(this,[],k.quests.ShiverchillQ13),14:new vD(this,[],k.quests.ShiverchillQ14),15:new gD(this,[],k.quests.ShiverchillQ15)}}start(k,B,U){super.start(k,B,U),this.showTopLeftNavigationButton()}meetsQuestPrerequisite(){const k=K.q.instance.prodigy.world.zones[ID.QUEST_PREREQUISITE.zoneId].getQuestState();return!((null==k?void 0:k.ID)<=ID.QUEST_PREREQUISITE.questId)}createTopLeftNavigationButton(){this.showTopLeftNavigationButton()}placeDaily(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(j.Aq$.isDefined(this.getQuestState())&&this.getQuestState().ID>6&&F.backpack.hasItem("item",80)<99){let B,F;const G=this.getDailyMaps(),$=new nA.t(this.getState("daily").date);for(let U=0;U<5;U++)if(G[Math.floor($.jumpFromStart(U)*(G.length-1))]===k.tag){const k=this.getState("daily").flags;j.Aq$.isDefined(k[U].x)&&(B=k[U].x,F=k[U].y)}if(!j.Aq$.isDefined(B)){const U=k.dailyCoordinates[Math.floor(Math.random()*k.dailyCoordinates.length)];B=U.x,F=U.y;for(let j=0;j<5;j++)if(G[Math.floor($.jumpFromStart(j)*(G.length-1))]===k.tag){const k=this.getState("daily").flags;k[j]={x:B,y:F},this.setState("daily",{date:this.getState("daily").date,flags:k,rewards:this.getState("daily").rewards})}}this.ice=U.addClickableEvent(B,F,60,60,this.frozenSomethingOnClick.bind(this,U,k),null),this.ice.add(K.q.instance.prodigy.create.sprite(-10,-10,q._.Zone_shiverchill_json,"frozen-something"))}}frozenSomethingOnClick(k,B){const U=K.q.instance.prodigy.event.create();U.validPath(k.user,k.path,this.ice.x+20,this.ice.y+40),U.set(k.user,"evtProc",!0),U.function(this.interactFrozenSomething.bind(this,B)),U.set(k.user,"evtProc",!1),U.start()}interactFrozenSomething(k){const B=this.getDailyMaps();this.ice.destroy(),K.q.instance.prodigy.open.gotItem([{type:"item",ID:79}]);const U=new nA.t(this.getState("daily").date);for(let F=0;F<5;F++)if(B[Math.floor(U.jumpFromStart(F)*(B.length-1))]===k.tag){const k=this.getState("daily").flags;k[F]=0,this.setState("daily",{date:this.getState("daily").date,flags:k,rewards:this.getState("daily").rewards})}}getDailyMaps(){const k=[];for(const B in this.maps)j.Aq$.isDefined(this.maps[B].dailyCoordinates)&&k.push(B);return k}smoke(k,B,U){for(let F=0;F<4;F++){const G=K.q.instance.prodigy.create.sprite(40*B+20,40*U+20,q._.General_core_2_json,"smoke");k.foreground.addChild(G),G.anchor.set(.5,.5),G.scale.x=G.scale.y=.1,G.alpha=1,this.game.add.tween(G,this).to({y:G.y-150,alpha:0},2e3,j.GS3.Linear.None,!1,0,1e3,!1).delay(500*F).start(),this.game.add.tween(G.scale,this).to({x:.75,y:.75},2e3,j.GS3.Linear.None,!1,0,1e3,!1).delay(500*F).start()}}doorClick(k,B,U){k.user.setValidPath(k.path,B,U,null)}cleanup(){this.ice&&(this.ice.destroy(),this.ice=null),super.cleanup()}}ID.QUEST_PREREQUISITE={zoneId:hn.A_.FOREST,questId:12};class DD extends qI{constructor(k,B){super(k,"A10","MAP_SHIVERCHILL_BOKS_CAVE",125,650,["shiverchill_hard-B10","shiverchill_hard-A11","shiverchill_hard-A9"],B.concat([q._.Npc_sprite_merchant_json,q._.Npc_sprite_bok_json,Rn.t.Tileset_shiverchill_png,q._.Shiverchill_snow_particle_json]))}}class RD extends qI{constructor(k,B){super(k,"A11","MAP_SHIVERCHILL_BORDERLAND",1100,220,["shiverchill_hard-A10"],B.concat([q._.Npc_sprite_wizard_json,Rn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside",this.coord=[new j.I9Y(640,560),new j.I9Y(785,230),new j.I9Y(350,400)]}}class PD extends qI{constructor(k,B){super(k,"A2","MAP_SHIVERCHILL_THE_CHASM",1150,360,["shiverchill_hard-A3"],B.concat([Rn.t.Tileset_generic_snow_png,q._.Npc_sprite_wizard_json])),this.battleBG="battle-shiverchill-outside",this.dailyCoordinates=[{x:840,y:320},{x:565,y:450}]}}class MD extends qI{constructor(k,B){super(k,"A3","MAP_SHIVERCHILL_FROZEN_PASS",280,550,["shiverchill_hard-A2","shiverchill_hard-A4","shiverchill_hard-B3"],B.concat([q._.Zone_shiverchill_json,Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(700,380),new j.I9Y(1150,300)],this.dailyCoordinates=[{x:1100,y:210},{x:485,y:240},{x:390,y:540}]}}class ND extends qI{constructor(k,B){super(k,"A4","MAP_SHIVERCHILL_WORMS_REST",1160,610,["shiverchill_hard-A3","shiverchill_hard-A5"],B.concat([q._.Zone_shiverchill_json])),this.battleBG="battle-shiverchill-inside"}}class xD extends qI{constructor(k,B){super(k,"A5","MAP_SHIVERCHILL_MOUNTAIN_VALLEY",1180,650,["shiverchill_hard-A4","shiverchill_hard-A6"],B.concat([Rn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside",this.coord=[new j.I9Y(100,540),new j.I9Y(700,350),new j.I9Y(1025,150)]}}class LD extends qI{constructor(k,B){super(k,"A6","MAP_SHIVERCHILL_RAIL_RUINS",1170,400,["shiverchill_hard-A5","shiverchill_hard-B6"],B.concat([q._.Zone_shiverchill_json,Rn.t.Tileset_minecarts_png,Rn.t.Tileset_iceruins_png,q._.Npc_sprite_wizard_json])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(645,330),new j.I9Y(920,555)],this.dailyCoordinates=[{x:1010,y:480},{x:300,y:480},{x:520,y:220}]}}class kD extends qI{constructor(k,B){super(k,"A7","MAP_SHIVERCHILL_RUINED_ENTRANCE",189,650,["shiverchill_hard-B7","shiverchill_hard-B8"],B.concat([q._.Npc_sprite_merchant_json,q._.Zone_shiverchill_json,Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(1e3,360),new j.I9Y(720,600)]}}class BD extends qI{constructor(k,B){super(k,"A9","MAP_SHIVERCHILL_TREASURE_ROOM",200,490,["shiverchill_hard-A10","shiverchill_hard-B8"],B.concat([q._.Zone_shiverchill_json,Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.dailyCoordinates=[{x:125,y:510},{x:925,y:260},{x:620,y:340}]}}class UD extends qI{constructor(k,B){super(k,"B10","MAP_SHIVERCHILL_FURNACE_ROOM",255,545,["shiverchill_hard-A10","shiverchill_hard-B9"],B.concat([Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside"}}class FD extends qI{constructor(k,B){super(k,"B1","MAP_SHIVERCHILL_GATE",200,630,["shiverchill_hard-B3"],B.concat([q._.Npc_sprite_wizard_json,Rn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside"}}class GD extends qI{constructor(k,B){super(k,"B2","MAP_BONFIRE_SPIRE_THRONE_ROOM",640,500,["shiverchill_hard-B3"],B),this.battleBG="battle-shiverchill-inside"}}class jD extends qI{constructor(k,B){super(k,"B3","MAP_SHIVERCHILL_ROYAL_PASSAGE",110,280,["shiverchill_hard-B1","shiverchill_hard-A3","shiverchill_hard-B2"],B.concat([q._.Zone_shiverchill_json,q._.Npc_sprite_noot_json,Rn.t.Tileset_iceruins_png,Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.dailyCoordinates=[{x:980,y:250},{x:970,y:400},{x:255,y:490}]}}class $D extends qI{constructor(k,B){super(k,"B6","MAP_SHIVERCHILL_RUINED_STEPS",1100,530,["shiverchill_hard-A6","shiverchill_hard-B7"],B.concat([Rn.t.Tileset_minecarts_png,Rn.t.Tileset_iceruins_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(315,635),new j.I9Y(650,600),new j.I9Y(1100,230)],this.dailyCoordinates=[{x:1100,y:420},{x:1015,y:110},{x:185,y:400}]}}class HD extends qI{constructor(k,B){super(k,"B7","MAP_SHIVERCHILL_RUINED_PASSAGE",110,220,["shiverchill_hard-A7","shiverchill_hard-B6"],B.concat([Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(320,260),new j.I9Y(380,620)],this.dailyCoordinates=[{x:370,y:540},{x:955,y:400},{x:1190,y:330}]}}class VD extends qI{constructor(k,B){super(k,"B8","MAP_SHIVERCHILL_MOUNTAIN_PASS",100,550,["shiverchill_hard-A9","shiverchill_hard-A7"],B.concat([q._.Zone_shiverchill_json,Rn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside",this.coord=[new j.I9Y(1200,530),new j.I9Y(820,400),new j.I9Y(445,280)]}}class WD extends qI{constructor(k,B){super(k,"B9","MAP_SHIVERCHILL_HIDDEN_ROOM",645,500,["shiverchill_hard-B10"],B.concat([q._.Zone_shiverchill_json])),this.battleBG="battle-shiverchill-inside",this.dailyCoordinates=[{x:680,y:250},{x:280,y:320},{x:945,y:380}]}}class qD extends ID{constructor(k){super(k),this._assets=[Rn.t.Tileset_icecave_new_png,Rn.t.Tileset_collisions_png,Rn.t.Tileset_ship_exterior_png,Rn.t.Tileset_water_new_png,X.V.Bgm_shiverchill_mountain],this.questManagerIdentifier="246-64db",this.ID=hn.A_.SHIVERCHILLHARD,this.defaultOnFaint="shiverchill_hard-C8",this.questHub="shiverchill_hard-C8",this.zoneIndex=pT.P.ShiverchillHard,this.difficultyMode=ri.i.Hard,this.monsters=[],this.maps={A2:new PD(this,this._assets),A3:new MD(this,this._assets),A4:new ND(this,this._assets),A5:new xD(this,this._assets),A6:new LD(this,this._assets),A7:new kD(this,this._assets),A9:new BD(this,this._assets),A10:new DD(this,this._assets),A11:new RD(this,this._assets),B1:new FD(this,this._assets),B2:new GD(this,this._assets),B3:new jD(this,this._assets),B6:new $D(this,this._assets),B7:new HD(this,this._assets),B8:new VD(this,this._assets),B9:new WD(this,this._assets),B10:new UD(this,this._assets)}}}class KD extends Un.T{}class zD extends KD{constructor(k,B){super(k,"A0","MAP_SKYWATCH_LOWER_BEANOVATOR",1100,450,["skywatch-A1","shiverchill-B1"],B),this.battleBG="battle-skywatch-outside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1020,y:410,w:1,h:1,rect:!0},"skywatch-A1",650,360,null,LT.K.UP,!1,!1),this.addChest(k,B,"chest1",720,360,null,"A"),B.addClickableEvent(953,320,134,140,this.zone.elevator.bind(this.zone,B,[{x:1020,y:460},{x:1020,y:440}],{x:960,y:320},{target:"skywatch-A1",x:null,y:null}),null,0),this.addWizard(k,B,240,340,"wizard1",46,!1),this.addPippet(k,B,1,578,413)}}class YD extends KD{constructor(k,B){super(k,"A1","MAP_SKYWATCH_UPPER_BEANOVATOR",620,350,["skywatch-A0","skywatch-B1","skywatch-C1","skywatch-D1"],B.concat([q._.Zone_lamplight_json,q._.Npc_sprite_broccolina_json,q._.Npc_sprite_merchant_json,J.Q.Spine_npc_benni_json]))}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:50,y:50,r:120},"skywatch-B1",1140,560,null,LT.K.UP_LEFT,!1),this.addAreaEvent(k,B,{x:110,y:510,w:220,h:100,rect:!0},"skywatch-C1",1120,430,null,LT.K.LEFT,!1);const F=B.addConstructedQuestNPC(760,500,"benni",!1,YD.zoneComplete.bind(this,k)),G=B.content.addChild(K.q.instance.prodigy.create.sprite(1110,336,q._.Zone_skywatch_json,"cart-horizontal"));this.addAreaEvent(k,B,{x:1100,y:440,w:1,h:1},"skywatch-D1",0,0,null,LT.K.RIGHT,!1,!0),this.addAreaEvent(k,B,{x:653,y:187,w:1,h:1,rect:!0},"skywatch-A0",650,360,null,LT.K.DOWN,!1,!0),K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.SkywatchMerchantNPC,430,360).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.SkywatchMerchantNPC}`)),B.addClickableEvent(1115,400,80,80,this.zone.interactTrolley.bind(this.zone,B,[{x:1140,y:480},{x:1165,y:460}],{trolley:G,x:"+=200",y:"+=0",duration:3e3,target:"skywatch-D1",targetX:null,targetY:null}),null,0),B.addClickableEvent(593,200,134,140,this.zone.elevator.bind(this.zone,B,[{x:660,y:340},{x:660,y:320}],{x:600,y:200},{target:"skywatch-A0",x:1100,y:450}),null,0);const $=this.addConstructedNPC(k,B,440,500,q._.Npc_sprite_broccolina_json,F.process.bind(F,this.zone,null,!0),"NPC_NAME_BROCCOLINA",null);j.Aq$.isDefined($)&&($.flip(),$.nameText.GameObject.legacyTransform.x-=55),j.Aq$.isDefined(this.zone.getState("eugene_A1"))&&this.addConstructedNPC(k,B,685,390,q._.Npc_sprite_eugene_json,F.process.bind(F,this.zone,null,!0),"NPC_NAME_EUGENE",null),K.q.instance.prodigy.create.nicknamerPedestal(this.game,this.zone.ID,B.user,B.content,270,300)}static zoneComplete(k){const B=new Ti.rD(k);B.addEvents([{dialogueData:B.dataProvider.get(415),blockInput:!0},{dialogueData:B.dataProvider.get(414),blockInput:!0},{dialogueData:B.dataProvider.get(459),blockInput:!0}]),B.start()}}class QD extends KD{constructor(k,B){super(k,"B1","MAP_SKYWATCH_GARDENERS_HUT_EXTERIOR",1140,549,["skywatch-A1","skywatch-B2","skywatch-B3"],B),this.battleBG="battle-skywatch-outside",this.coord=[new j.I9Y(460,530),new j.I9Y(200,560)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1150,y:710,r:120},"skywatch-A1",120,190,null,LT.K.DOWN),this.addAreaEvent(k,B,{x:740,y:340,w:80,h:80,rect:!0},"skywatch-B2",640,510,null,LT.K.UP),this.addAreaEvent(k,B,{x:150,y:0,r:120},"skywatch-B3",1030,530,null,LT.K.UP),B.addClickableEvent(700,240,80,120,this.validPathTo.bind(this,k,B,740,370),null),this.addChest(k,B,"chest2",620,420,null,"A")}}class XD extends KD{constructor(k,B){super(k,"B2","MAP_SKYWATCH_GARDENERS_HUT_INNER",640,510,["skywatch-B1"],B.concat([q._.Npc_sprite_noot_json])),this.battleBG="battle-skywatch-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:660,y:550,w:130,h:70,rect:!0},"skywatch-B1",760,390,null,LT.K.DOWN)}}class ZD extends KD{constructor(k,B){super(k,"B3","MAP_SKYWATCH_GREAT_GRATERS",1030,530,["skywatch-B1"],B.concat([q._.Boss_skywatch_json])),this.battleBG="battle-skywatch-outside"}init(k,B,U,F){return j.Aq$.isDefined(this.zone.getState("plug-B3"))?this.plugOut():(this.plugIn(),this.createIceBlocks(k,F)),this.enableLayerID(2,j.Aq$.isDefined(this.zone.getState("vines-B3"))),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1035,y:650,w:230,h:100,rect:!0},"skywatch-B1",170,150,null,LT.K.DOWN)}plugIn(){this.enableLayerID(0,!1),this.enableLayerID(1,!0)}plugOut(){this.enableLayerID(1,!1),this.enableLayerID(0,!0)}createIceBlocks(k,B){const U=K.q.instance.prodigy.event.create();U.delay(Math.floor(3e3*Math.random())),U.function(this.createIceBlock.bind(this,k,B,0)),U.delay(Math.floor(3e3*Math.random())),U.function(this.createIceBlock.bind(this,k,B,1)),U.delay(Math.floor(3e3*Math.random())),U.function(this.createIceBlock.bind(this,k,B,2)),U.delay(Math.floor(3e3*Math.random())),U.function(this.createIceBlock.bind(this,k,B,3)),U.start()}createIceBlock(k,B,U){const F=[{x:575,y:430},{x:90,y:430},{x:575,y:550},{x:90,y:550}],G=[],$=K.q.instance.prodigy.event.create();$.delay(Math.floor(5e3*Math.random())+2e3),$.function(this.createIceBlock.bind(this,k,B,U)),$.start();const H=[{start:{x:483,y:105},path:[{x:483,y:320},{x:560,y:320}],end:{x:715,y:380},angle:"+=20"},{start:{x:322,y:105},path:[{x:322,y:320},{x:240,y:320}],end:{x:80,y:380},angle:"-=20"},{start:{x:483,y:740},path:[{x:483,y:440},{x:560,y:440}],end:{x:715,y:500},angle:"+=20"},{start:{x:322,y:740},path:[{x:322,y:440},{x:240,y:440}],end:{x:80,y:500},angle:"-=20"}][U],V=B.foreground.addChild(K.q.instance.prodigy.create.sprite(H.start.x,H.start.y,q._.Zone_skywatch_json,"ice-cube"));V.anchor.set(.5,1),V.alpha=0,G.push(k.add.tween(V,this).to({x:H.path[0].x,y:H.path[0].y},3e3,j.GS3.Linear.None,!0).to({x:H.path[1].x,y:H.path[1].y},1500,j.GS3.Linear.None,!0).to({x:H.end.x,y:H.end.y},3e3,j.GS3.Linear.None,!0)),G.push(k.add.tween(V.scale,this).to({x:.1,y:.1},3e3,j.GS3.Linear.None,!0,4900)),G.push(k.add.tween(V,this).to({alpha:1},250,j.GS3.Linear.None,!0)),G.push(k.add.tween(V,this).to({angle:H.angle},500,j.GS3.Linear.None,!0,4700)),G[1].onTweenComplete.add(this.makeSnow.bind(this,k,B,F[U].x,F[U].y)),G[1].onTweenComplete.add((()=>{V.destroy()}))}makeSnow(k,B,U,F){const G=B.background;if(!j.Aq$.isDefined(this.snows)){this.snows=[];for(let k=0;k<20;k++)this.snows[k]=G.addChild(K.q.instance.prodigy.create.sprite(U,F,q._.Font_general_json,"42-30"))}for(let j=0;j<20;j++)this.snows[j].x=U,this.snows[j].y=F,ZD.newFlake(k,this.snows[j],!0,U,F)}static newFlake(k,B,U,F,G){if(!j.Aq$.isDefined(k))return;let $=Math.floor(2e3*Math.random())+2e3;B.frameName=Math.random()<.5?"42-16":"42-30",B.x=F+Math.floor(140*Math.random()),U?$-=Math.floor($/K.q.instance.game.height*B.y):B.y=G,K.q.instance.prodigy.animation.translate(B,B.x,K.q.instance.game.height,$,null,null,!0)}cleanup(){for(let k=0;k<(j.Aq$.isDefined(this.snows)?this.snows.length:0);k++)this.snows[k].destroy();this.snows=null,super.cleanup()}}class JD extends KD{constructor(k,B){super(k,"C1","MAP_SKYWATCH_SCREWBALL_SHACK",1120,430,["skywatch-A1","skywatch-C2","skywatch-C3"],B.concat([q._.Zone_lamplight_json])),this.battleBG="battle-skywatch-outside",this.coord=[new j.I9Y(370,580),new j.I9Y(590,350)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1205,y:430,w:150,h:100,rect:!0},"skywatch-A1",240,610,null,LT.K.RIGHT),this.addAreaEvent(k,B,{x:205,y:620,w:100,h:200,rect:!0},"skywatch-C3",1080,210,null,LT.K.DOWN),this.addAreaEvent(k,B,{x:220,y:268,w:90,h:140,rect:!0},"skywatch-C2",625,520,null,LT.K.UP),B.addClickableEvent(180,190,80,120,this.validPathTo.bind(this,k,B,195,320),null)}}class tR extends KD{constructor(k,B){super(k,"C2","MAP_SKYWATCH_INNER_SCREWBALL_SHACK",625,520,["skywatch-C1"],B.concat([q._.Npc_sprite_noot_json])),this.battleBG="battle-skywatch-inside"}setup(k,B,U){this.addAreaEvent(k,B,{x:620,y:560,w:160,h:70,rect:!0},"skywatch-C1",200,360,null,LT.K.DOWN)}}class eR extends KD{constructor(k,B){super(k,"C3","MAP_SKYWATCH_CLOUDY_PASS",1160,210,["skywatch-C1","skywatch-C4"],B),this.battleBG="battle-skywatch-outside"}init(k,B,U,F){return this.enableLayerID(0,!1),this.enableLayerID(1,!0),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1080,y:100,w:100,h:200,rect:!0},"skywatch-C1",205,510,null,LT.K.UP),this.addAreaEvent(k,B,{x:120,y:100,w:100,h:200,rect:!0},"skywatch-C4",1160,540,null,LT.K.UP),this.addChest(k,B,"chest3",325,250,null,"A")}}class iR extends KD{constructor(k,B){super(k,"C4","MAP_SKYWATCH_SKY_SHOWER",1160,550,["skywatch-C3"],B.concat([q._.Npc_sprite_noot_json,q._.Npc_sprite_flora_json,q._.Boss_skywatch_json])),this.battleBG="battle-skywatch-outside"}init(k,B,U,F){return this.plugIn(!j.Aq$.isDefined(this.zone.getState("plug-C4"))),this.enableLayerID(2,j.Aq$.isDefined(this.zone.getState("vines-C4"))),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1150,y:660,w:100,h:200,rect:!0},"skywatch-C3",120,210,null,LT.K.DOWN)}canRegularMonsterSpawn(){return!this.zone.isOnSequence(2,3)&&!this.zone.isOnQuest(9)}plugIn(k){this.enableLayerID(0,!k),this.enableLayerID(1,k)}}class sR extends KD{constructor(k,B){super(k,"D1","MAP_SKYWATCH_FACTORY_ENTRANCE",189,549,["skywatch-A1","skywatch-D2","skywatch-E1"],B.concat(q._.Npc_sprite_noot_json)),this.trolley2=null,this.battleBG="battle-skywatch-outside",this.coord=[new j.I9Y(400,540),new j.I9Y(780,570)]}init(k,B,U,F){return this.enableLayerID(2,!j.Aq$.isDefined(this.zone.getState("vines-D1"))),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U);if(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("item",81)>0)this.addAreaEvent(k,B,{x:620,y:280,w:120,h:80,rect:!0},"skywatch-E1",1120,520,null,LT.K.UP),B.addClickableEvent(580,140,80,140,this.validPathTo.bind(this,k,B,680,290),null);else{const U=k=>{const B=K.q.instance.prodigy.event.create();B.popup(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SKYWATCH_REQUIRE_FACTORY_KEY")),B.start()};B.addClickableEvent(580,140,80,140,U.bind(this,k),null,null)}this.addAreaEvent(k,B,{x:190,y:420,w:1,h:1},"skywatch-A1",0,0,null,LT.K.LEFT,!1,!0),this.addAreaEvent(k,B,{x:1075,y:440,w:1,h:1},"skywatch-D2",0,0,null,LT.K.RIGHT,!1,!0);const F=B.content.addChild(K.q.instance.prodigy.create.sprite(75,296,q._.Zone_skywatch_json,"cart-horizontal"));this.trolley2=B.content.addChild(K.q.instance.prodigy.create.sprite(1075,296,q._.Zone_skywatch_json,"cart-horizontal")),this.trolley2.alpha=0,j.Aq$.isDefined(this.zone.getState("vines-D1"))&&(this.trolley2.alpha=1,B.addClickableEvent(1080,360,80,80,this.zone.interactTrolley.bind(this.zone,B,[{x:1130,y:450},{x:1120,y:420}],{trolley:this.trolley2,x:"+=200",y:"+=0",duration:3e3,target:"skywatch-D2",targetX:140,targetY:290}),null,0)),B.addClickableEvent(80,360,80,80,this.zone.interactTrolley.bind(this.zone,B,[{x:130,y:450},{x:120,y:420}],{trolley:F,x:"-=200",y:"+=0",duration:3e3,target:"skywatch-A1",targetX:1100,targetY:500}),null,0)}}class nR extends KD{constructor(k,B){super(k,"D2","MAP_SKYWATCH_BREEZY_PASS",140,290,["skywatch-D1","skywatch-D3"],B.concat([q._.Zone_lamplight_json])),this.trolley2=null,this.battleBG="battle-skywatch-outside",this.coord=[new j.I9Y(280,450),new j.I9Y(780,330)]}init(k,B,U,F){return this.enableLayerID(2,!j.Aq$.isDefined(this.zone.getState("vines-D2"))),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:210,y:182,w:1,h:1},"skywatch-D1",0,0,null,LT.K.LEFT,!1,!1),this.addAreaEvent(k,B,{x:1e3,y:575,w:1,h:1},"skywatch-D3",0,0,null,LT.K.LEFT,!1,!1);const F=B.content.addChild(K.q.instance.prodigy.create.sprite(100,96,q._.Zone_skywatch_json,"cart-horizontal"));this.trolley2=B.content.addChild(K.q.instance.prodigy.create.sprite(1e3,515,q._.Zone_skywatch_json,"cart-vertical")),this.trolley2.scale.x=-this.trolley2.scale.x,B.addClickableEvent(105,160,80,80,this.zone.interactTrolley.bind(this.zone,B,[{x:145,y:250},{x:155,y:220}],{trolley:F,x:"-=300",y:"+=0",duration:3e3,target:"skywatch-D1",targetX:1100,targetY:540}),null),j.Aq$.isDefined(this.zone.getState("vines-D2"))&&B.addClickableEvent(925,555,90,90,this.zone.interactTrolley.bind(this.zone,B,[{x:1040,y:600},{x:965,y:600}],{trolley:this.trolley2,x:"+=0",y:"+=300",duration:3e3,target:"skywatch-D3",targetX:300,targetY:250}),null),this.addChest(k,B,"chest4",640,200,null,"A")}}class aR extends KD{constructor(k,B){super(k,"D3","MAP_SKYWATCH_WIND_TUNNEL",270,250,["skywatch-D2"],B.concat([q._.Zone_lamplight_json,q._.Boss_skywatch_json])),this.battleBG="battle-skywatch-outside"}init(k,B,U,F){return this.enableLayerID(2,j.Aq$.isDefined(this.zone.getState("vines-D3"))),j.Aq$.isDefined(this.zone.getState("plug-D3"))?this.unplug(k):this.plugIn(k),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:260,y:240,w:1,h:1},"skywatch-D2",0,0,null,LT.K.LEFT,!1,!0);const F=B.content.addChild(K.q.instance.prodigy.create.sprite(240,175,q._.Zone_skywatch_json,"cart-vertical"));F.scale.x=-F.scale.x,B.addClickableEvent(160,210,100,100,this.zone.interactTrolley.bind(this.zone,B,[{x:265,y:280},{x:200,y:270}],{trolley:F,x:"+=0",y:"-=300",duration:3e3,target:"skywatch-D2",targetX:1020,targetY:580}),null)}displayStationaryFanribbons(k,B){this.enableLayerID(2,!1),this.toggleDynamicLayer(k,2,!1,0)}plugIn(k){this.enableLayerID(0,!1),this.toggleDynamicLayer(k,0,!1,0),this.enableLayerID(1,!0),this.toggleDynamicLayer(k,1,!0,0)}unplug(k){this.enableLayerID(1,!1),this.toggleDynamicLayer(k,1,!1,0),this.enableLayerID(0,!0),this.toggleDynamicLayer(k,0,!0,0)}}class rR extends KD{constructor(k,B){super(k,"E1","MAP_SKYWATCH_FACTORY_MAIN_HALL",1120,520,["skywatch-D1","skywatch-E2","skywatch-E3"],B),this.battleBG="battle-skywatch-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1100,y:this.game.height-60,w:210,h:120,rect:!0},"skywatch-D1",550,290,null,LT.K.DOWN,!1),this.addAreaEvent(k,B,{x:160,y:0,r:120},"skywatch-E3",1060,530,null,LT.K.UP,!1),this.addAreaEvent(k,B,{x:1102,y:320,w:100,h:80,rect:!0},"skywatch-E2",230,530,null,LT.K.UP,!1),B.addClickableEvent(1060,200,80,120,this.validPathTo.bind(this,k,B,1120,350),null)}}class oR extends KD{constructor(k,B){super(k,"E2","MAP_SKYWATCH_OLD_MANS_ROOM",230,530,["skywatch-E1"],B.concat([q._.Npc_sprite_eugene_json])),this.battleBG="battle-skywatch-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:200,y:this.game.height-60,w:210,h:120,rect:!0},"skywatch-E1",1120,370,null,LT.K.DOWN,!1),this.addWizard(k,B,965,530,"wizard2",47,!0)}}class hR extends KD{constructor(k,B){super(k,"E3","MAP_SKYWATCH_BLAST_DOORS",1060,530,["skywatch-E1","skywatch-E4"],B),this.battleBG="battle-skywatch-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1120,y:this.game.height-60,w:240,h:120,rect:!0},"skywatch-E1",160,160,null,LT.K.DOWN,!1);if(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("item",83)>0)this.addAreaEvent(k,B,{x:620,y:360,w:120,h:80,rect:!0},"skywatch-E4",640,380,null,LT.K.UP,!1),B.addClickableEvent(560,240,120,160,this.validPathTo.bind(this,k,B,620,390),null);else{const U=k=>{const B=K.q.instance.prodigy.event.create();B.popup(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SKYWATCH_REQUIRE_MASTER_KEY")),B.start()};B.addClickableEvent(520,200,160,120,U.bind(this,k),null)}this.addChest(k,B,"chest5",950,325,null,"A")}}class cR extends KD{constructor(k,B){super(k,"E4","MAP_SKYWATCH_END_CHAMBER",640,380,["skywatch-E3","skywatch-E5"],B.concat([q._.Boss_skywatch_json])),this.battleBG="battle-skywatch-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:640,y:550,w:160,h:100,rect:!0},"skywatch-E3",600,480,null,LT.K.DOWN,!1),this.addAreaEvent(k,B,{x:340,y:340,w:80,h:40,rect:!0},"skywatch-E5",1024,515,null,LT.K.UP,!1),B.addClickableEvent(300,200,80,120,this.validPathTo.bind(this,k,B,360,340),null)}}class dR extends KD{constructor(k,B){super(k,"E5","MAP_SKYWATCH_OUTSKIRTS",1024,515,["skywatch-E4"],B),this.insideTrigger=!1,this.lastFrameInsideTrigger=!1,this.user=null,this.battleBG="battle-skywatch-outside"}init(k,B,U,F){return this.enableLayerID(3,!1),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1010,y:this.game.height-60,w:260,h:120,rect:!0},"skywatch-E4",360,380,null,LT.K.DOWN,!1),this.user=B.user}update(k){j.Aq$.isDefined(this.user)&&(this.insideTrigger=j.cj9.distance(this.user.x,this.user.y,430,490)<=100,this.insideTrigger!==this.lastFrameInsideTrigger&&this.toggleDynamicLayer(k,3,this.insideTrigger,500),this.lastFrameInsideTrigger=this.insideTrigger),super.update(k)}}class lR extends Pn.T{constructor(k,B,U){super(k,B,1,"",{type:"pet",ID:72,N:3},["skywatch-B2"],[416,417,418,419,420,421],[],[414,422],U,null,"QUESTS_SKYWATCH_TRIM_VINES")}setup(k,B,U){if(super.setup(k,B,U),"B2"===U.tag){const F={randDir:!0,encounter:[{ID:72}],difficulty:1,maxTeamSize:1,isQuestEncounter:!0};return U.addMonster(k,B,0,400,400,!0,F,!1),U.addMonster(k,B,1,810,360,!0,F,!1),U.addMonster(k,B,2,920,415,!0,F,!1),{enableMonsters:!1}}return null}}class uR extends Pn.T{constructor(k,B,U){super(k,B,10,"QUESTS_SKYWATCH_TRIM_VINES",{type:"seq",N:1},["skywatch-D3"],[444],[],[415,460],U)}setup(k,B,U){return super.setup(k,B,U),"skywatch-D3"===U.zoneName?{enableMonsters:!1}:null}start(k,B,U){if(super.start(k,B,U),this.zone.isOnSequence(10,0)&&"skywatch-D3"===U.zoneName){const k=K.q.instance.prodigy.create.element(B.foreground,740,140);k.highlight(!0);const F=()=>{const F=B.content.addChild(K.q.instance.prodigy.create.sprite(850,-100,q._.Boss_skywatch_json,"ice_cloud",new j.I9Y(.5,1))),G=B.foreground.addChild(K.q.instance.prodigy.create.sprite(840,-150,q._.Boss_skywatch_json,"med_face_0",new j.I9Y(.5,1))),$=()=>{const k=B.user.x,F=B.user.y,G=()=>{this.zone.completeSequence(10,0),this.zone.setState("plug-D3",null),this.zone.setState("vines-D3",null),K.q.instance.prodigy.world.it("skywatch-D3",k,F)};K.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle";const $=K.q.instance.prodigy.event.create();$.enableInput(!1),$.delay(2e3),$.enableInput(!0);const H=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),V=H.getValue("frostyStormMaxHP",Vt.s.get("GameConstants.FrostyStorm.MAX_HP")),W=null===V?void 0:parseInt(V,10);$.function(this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_CLOUD_FIGHT"),{boss:{ID:51,element:"ice",attacks:[62],name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_FROSTY_STORM"),tag:hn.A_.SKYWATCH,maxHP:W},difficulty:parseInt(H.getValue("frostyStormDifficulty",Vt.s.get("GameConstants.FrostyStorm.DIFFICULTY")),10),starMod:2,screen:"battle-skywatch-outside"},(()=>{G()}))),$.start()},H=K.q.instance.prodigy.event.create();H.validPath(B.user,B.path,580,270),H.enableInput(!1),H.fire(655,45,290,290,2,!1,!0),H.function(k.highlight.bind(k,!1)),H.function(this.zone.shrinkVines.bind(this.zone,U)),H.delay(3e3),H.sound(17,"wind"),H.function((()=>{const k=K.q.instance.prodigy.animation.translate(F,850,200,2e3,0,null,!0);K.q.instance.prodigy.animation.translate(G,840,150,2e3,0,null,!0),k.onTweenComplete.add((()=>{this.zone.changePosition(F,G),$()}))}).bind(this)),H.start()};B.addClickableEvent(630,30,250,250,F.bind(this),null,0)}return null}}class fR extends Pn.T{constructor(k,B,U){super(k,B,11,"QUESTS_SKYWATCH_FIND_EUGENE",{type:"seq",N:2},["skywatch-E2"],[445,446,447],[],[415],U)}setup(k,B,U){super.setup(k,B,U);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return"skywatch-E2"===U.zoneName?(U.addConstructedNPC(k,B,710,415,q._.Npc_sprite_eugene_json,null,"NPC_NAME_EUGENE"),this.zone.isOnSequence(11,0)?(F.playerContainer.visible=!0,this.monstersAmbushEugene(k,B,U)):this.zone.isOnSequence(11,1)&&this.rescuedEugene(k,B),{enableMonsters:!1}):null}monstersAmbushEugene(k,B,U){const F=K.q.instance.prodigy.event.create();U.addMonster(k,B,1,380,380,!1,{encounter:[{ID:115}],difficulty:1}),U.addMonster(k,B,3,520,515,!1,{encounter:[{ID:115}],difficulty:1});U.addMonster(k,B,2,900,380,!1,{encounter:[{ID:115}],difficulty:1}).flip(),F.enableInput(!1),F.delay(500),F.enableInput(!0),F.text(0,"eugene"),F.text(),F.text(100,"noot"),F.enableInput(!1),F.set(B.user,"evtProc",!0),F.function(B.user.chat.bind(B.user,1,80)),F.enableInput(!1),F.delay(1e3),F.enableInput(!1),F.path(B.user,[{x:635,y:560}]),F.path(B.user,[{x:640,y:420}]),F.delay(500),F.enableInput(!0),F.function((()=>{K.q.instance.prodigy.battle.battleStats.type="QuestBattle"})),F.function(this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_SAVE_EUGENE"),{pets:[{ID:115},{ID:115},{ID:115},{ID:115}]},(()=>{this.zone.completeSequence(11,0),K.q.instance.prodigy.world.it("skywatch-E2",640,420)}))),F.start()}rescuedEugene(k,B){const U=K.q.instance.prodigy.event.create();U.text(1,"eugene"),U.text(2,"eugene"),U.text(3,"eugene"),U.text(4,"eugene"),U.text(5,"eugene"),U.text(6,"eugene"),U.function(this.zone.completeSequence.bind(this.zone,11,1)),U.function(B.process.bind(B)),U.start()}}class bR extends Pn.T{constructor(k,B,U){super(k,B,12,"",{type:"item",ID:82,N:2},["skywatch-C3","skywatch-D3"],[448,449,450],[],[414],U,null,"QUESTS_SKYWATCH_FIND_KEY"),this.collectionMaps={C3:[1],D3:[2]}}setup(k,B,U){super.setup(k,B,U);const F=U.getTag();if("C3"===F)B.addCollect(1,260,450,{type:"item",ID:82});else if("D3"===F)return B.addCollect(2,640,350,{type:"item",ID:82}),{enableMonsters:!1};return null}}class pR extends Pn.T{constructor(k,B,U){super(k,B,13,"QUESTS_SKYWATCH_DEFEAT_BOSS",{type:"seq",N:1},["skywatch-E4"],[451,452],[],[453,454,455],U)}setup(k,B,U){if(super.setup(k,B,U),this.zone.isOnSequence(13,0)&&"skywatch-E4"===U.zoneName){const k=B.content.addChild(K.q.instance.prodigy.create.sprite(1045,-100,q._.Boss_skywatch_json,"main_cloud",new j.I9Y(.5,1))),F=B.foreground.addChild(K.q.instance.prodigy.create.sprite(1035,-150,q._.Boss_skywatch_json,"main_eyes_1",new j.I9Y(.5,1)));K.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle";const G=K.q.instance.prodigy.event.create();G.enableInput(!1),G.validPath(B.user,B.path,399,400),G.validPath(B.user,B.path,400,400),G.sound(17,"wind"),G.function((()=>{const B=K.q.instance.prodigy.animation.translate(k,800,400,2e3,0,null,!0);K.q.instance.prodigy.animation.translate(F,790,350,2e3,0,null,!0),B.onTweenComplete.add((()=>{this.zone.changePosition(k,F)}))})),G.delay(5e3),G.enableInput(!0);const $=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),H=$.getValue("stormyStormMaxHP",Vt.s.get("GameConstants.StormyStorm.MAX_HP")),V=null===H?void 0:parseInt(H,10);G.function(this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_CLOUD_FIGHT"),{boss:{ID:12,element:"storm",attacks:[76,77,79],name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_STORMY_STORM"),tag:hn.A_.SKYWATCH,maxHP:V},difficulty:parseInt($.getValue("stormyStormDifficulty",Vt.s.get("GameConstants.StormyStorm.DIFFICULTY")),10),starMod:5,drops:[{type:"weapon",ID:23}]},(()=>{this.zone.completeSequence(13,0),this.zone.setState("eugene_A1",1),K.q.instance.prodigy.world.it("skywatch-E4")}))),G.start()}return null}}class vR extends Pn.T{constructor(k,B,U){super(k,B,2,"QUESTS_SKYWATCH_GET_DEVICE",{type:"item",ID:93,N:1},["skywatch-C2"],[423,424,425,426],[],[415],U),this.thief=null}start(k,B,U){super.start(k,B,U);const F=U.getTag();if("C2"===F&&this.zone.isOnSequence(2,0))this.thiefStealsTheWeatherometre(k,B,U);else if("C1"===F&&this.zone.isOnSequence(2,1))this.thiefFlees(k,B,U,115,560,115,850,"skywatch-C3",1);else if("C3"===F&&this.zone.isOnSequence(2,2))this.thiefFlees(k,B,U,120,210,120,-20,"skywatch-C4",2);else if("C4"===F&&this.zone.isOnSequence(2,3))return this.thiefFailsEscape(k,B,U),{enableMonsters:!1};return null}setup(k,B,U){super.setup(k,B,U);return"A1"===U.getTag()&&this.zone.isOnSequence(2,4)?{hiddenNPCs:[q._.Npc_sprite_broccolina_json]}:{}}process(k,B,U){this.zone.isOnSequence(2,0)?this.area=["skywatch-C2"]:this.zone.isOnSequence(2,1)?this.area=["skywatch-C1"]:this.zone.isOnSequence(2,2)?this.area=["skywatch-C3"]:this.zone.isOnSequence(2,3)&&(this.area=["skywatch-C4"])}thiefStealsTheWeatherometre(k,B,U){this.thief=U.addMonster(k,B,0,688,335,!1,{randDir:!1,encounter:[{ID:84}],difficulty:2,maxTeamSize:1},!0),this.thief.visible=!0;const F=B.content.addChild(K.q.instance.prodigy.icon.createIcon(695,275,Ut.E.getIconForType("item",93))),G=B.addNPC(600,550,q._.Npc_sprite_noot_json);G.visible=!1,G.float(!0);const j=K.q.instance.prodigy.event.create();j.enableInput(!1),j.set(G,"visible",!0),j.hop(G,300,-55,50),j.enableInput(!0),j.function(this.thief.chat.bind(this.thief,1,100)),j.delay(1500),j.set(F,"visible",!1),j.enableInput(!1),j.delay(500),j.path(this.thief,[{x:800,y:230}],1),j.function((()=>{this.zone.states.windowBroken=!0})),j.set(this.thief,"visible",!1),j.enableInput(!0),j.function(G.chat.bind(G,1,100)),j.text(95,"noot"),j.enableInput(!1),j.hop(G,300,55,50),j.set(G,"visible",!1),j.enableInput(!0),j.set(this,"area",["skywatch-C1"]),j.function(this.zone.completeSequence.bind(this.zone,2,0)),j.function(B.process.bind(B)),j.set(this.thief,"visible",!1),j.start()}thiefFlees(k,B,U,F,G,j,$,H,V){this.thief=U.addMonster(k,B,0,F,G,!1,{randDir:!1,encounter:[{ID:84}],difficulty:2,maxTeamSize:1},!0),this.thief.visible=!0;const W=K.q.instance.prodigy.event.create();W.enableInput(!1),W.set(B.user,"evtProc",!0),W.path(this.thief,[{x:j,y:$}],1,!1),W.set(this.thief,"visible",!1),W.set(B.user,"evtProc",!1),W.enableInput(!0),W.set(this,"area",[H]),W.function(this.zone.completeSequence.bind(this.zone,2,V)),W.function(B.process.bind(B)),W.start()}thiefFailsEscape(k,B,U){this.thief=U.addMonster(k,B,0,850,500,!1,{randDir:!1,encounter:[{ID:84}],difficulty:2,maxTeamSize:1},!0),this.thief.visible=!1;const F=B.addNPC(959,500,q._.Npc_sprite_noot_json);F.flip(),F.visible=!1,F.float(!0);const G=K.q.instance.prodigy.event.create();G.validPath(B.user,B.path,1159,550),G.set(B.user,"evtProc",!0),G.enableInput(!1),G.set(this.thief,"visible",!0),G.path(this.thief,[{x:700,y:500}],1,!0),G.path(B.user,[{x:1e3,y:520}],1.2),G.set(F,"visible",!0),G.hop(F,300,-55,50),G.enableInput(!0),G.text(96,"noot"),G.enableInput(!1),G.delay(500),G.enableInput(!0),G.function(this.thiefBattle.bind(this,k)),G.start()}thiefBattle(k){K.q.instance.prodigy.battle.start({intro:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_WEATHER_METER"),screen:"battle-skywatch-outside",pets:[{ID:84,nickname:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_THIEF")}],drops:[{type:"item",ID:87}]},null,(()=>{this.thiefDefeated(k)}),null,this.zone.defaultOnFaint)}thiefDefeated(k){const B={type:"item",ID:87,N:1};this.zone.setState("quest",{ID:2,req:B,seq:4,state:{}}),this.req=B,this.zone.completeSequence(2,3),K.q.instance.prodigy.world.it("skywatch-C4",1160,540)}}class gR extends Pn.T{constructor(k,B,U){super(k,B,3,"QUESTS_SKYWATCH_FIND_BROCCOLINA",{type:"seq",N:2},["skywatch-B2"],[427,428,429],[],[415],U)}setup(k,B,U){super.setup(k,B,U);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=U.getTag();if("B2"===G&&this.zone.isOnSequence(3,0))this.nootFindsTheNote(k,B,U);else if("A0"===G&&this.zone.isOnSequence(3,1))F.playerContainer.visible=!0,this.foundBroccolina(k,B,U);else if("A1"===G&&!this.zone.isQuestComplete(3))return{hiddenNPCs:[q._.Npc_sprite_broccolina_json]};return{}}process(k,B,U){this.zone.isOnSequence(3,0)?this.area=["skywatch-B2"]:this.zone.isOnSequence(3,1)&&(this.area=["skywatch-A0"])}nootFindsTheNote(k,B,U){const F=B.addNPC(640,535,q._.Npc_sprite_noot_json);F.visible=!1,F.float(!0);const G=K.q.instance.prodigy.event.create();G.enableInput(!1),G.set(F,"visible",!0),G.hop(F,300,-55,50),G.enableInput(!1),G.path(F,[{x:540,y:365}]),G.enableInput(!0),G.text(97,"noot"),G.enableInput(!1),G.path(F,[{x:585,y:535}]),G.hop(F,300,55,50),G.set(F,"visible",!1),G.set(this.zone.quests[3],"area",["skywatch-A0"]),G.function(this.zone.completeSequence.bind(this.zone,3,0)),G.function(B.process.bind(B)),G.enableInput(!0),G.start()}foundBroccolina(k,B,U){U.addConstructedNPC(k,B,440,500,q._.Npc_sprite_broccolina_json,null,"NPC_NAME_BROCCOLINA").nameText.GameObject.legacyTransform.x+=60;const F=K.q.instance.prodigy.event.create();F.text(0,"broccolina"),F.function(this.zone.completeSequence.bind(this.zone,3,1)),F.function(B.process.bind(B)),F.start()}}class mR extends Pn.T{constructor(k,B,U){super(k,B,4,"QUESTS_SKYWATCH_TRIM_VINES",{type:"seq",N:3},["skywatch-D1"],[430,431,432],[],[415,460],U),this.eyes=null,this.boss=null,this.element=null}setup(k,B,U){return"skywatch-D3"===U.zoneName&&(k.input.enabled=!1),super.setup(k,B,U)}start(k,B,U){return super.start(k,B,U),this.zone.isOnSequence(4,2)&&"skywatch-D3"===U.zoneName?this.cutsceneD3(k,B,U):this.zone.isOnSequence(4,1)&&"skywatch-D2"===U.zoneName?this.highlightD2(k,B,U):this.zone.isOnSequence(4,0)&&"skywatch-D1"===U.zoneName&&this.highlightD1(k,B,U),{}}process(k,B,U){this.zone.isOnSequence(4,0)?this.area=["skywatch-D1"]:this.zone.isOnSequence(4,1)?this.area=["skywatch-D2"]:this.zone.isOnSequence(4,2)&&(this.area=["skywatch-D3"])}cutsceneD3(k,B,U){this.boss=B.content.addChild(K.q.instance.prodigy.create.sprite(850,-100,q._.Boss_skywatch_json,"ice_cloud",new j.I9Y(.5,1))),this.eyes=B.foreground.addChild(K.q.instance.prodigy.create.sprite(840,-150,q._.Boss_skywatch_json,"med_face_0",new j.I9Y(.5,1)));const F=K.q.instance.prodigy.event.create();F.set(this,"descKey","QUESTS_SKYWATCH_INSPECT_MACHINE"),F.enableInput(!1),F.sound(17,"wind"),F.delay(2e3),F.function(this.bossEnter.bind(this,k)),F.delay(600),F.text(98,"noot"),F.sound(17,"wind"),F.function(this.zone.setState.bind(this.zone,"vines-D3",1)),F.function(this.zone.setState.bind(this.zone,"vines-B3",1)),F.function(this.zone.setState.bind(this.zone,"vines-C4",1)),F.function(this.zone.setState.bind(this.zone,"plug-D3",1)),F.function(this.zone.setState.bind(this.zone,"plug-B3",1)),F.function(this.zone.setState.bind(this.zone,"plug-C4",1)),F.function(this.bossExit.bind(this,k,B,U)),F.explode(670,60,200,200,3,!0),F.delay(2e3),F.function(this.zone.createVines.bind(this.zone,U)),F.delay(600),F.enableInput(!0),F.text(99,"noot"),F.function(this.zone.completeSequence.bind(this.zone,4,2)),F.function(B.process.bind(B)),F.start()}bossEnter(k){k.add.tween(this.boss,this).to({x:850,y:200},2e3,j.GS3.Linear.None).to({y:"-=20"},1400,j.GS3.Quadratic.InOut).to({y:"+=20"},1400,j.GS3.Quadratic.InOut).start(),k.add.tween(this.eyes,this).to({x:840,y:150},2e3,j.GS3.Linear.None).to({y:"-=20"},1400,j.GS3.Quadratic.InOut).to({y:"+=20"},1400,j.GS3.Quadratic.InOut).start()}bossExit(k,B,U){U.unplug(k),U.displayStationaryFanribbons(k,B);const F=k.add.tween(this.boss,this).to({x:950,y:-200},1400,j.GS3.Linear.None).start();k.add.tween(this.eyes,this).to({x:940,y:-250},1400,j.GS3.Linear.None).start(),F.onTweenComplete.add(this.hideBoss.bind(this))}hideBoss(){this.boss.visible=!1,this.eyes.visible=!1}clearVinesD2(k,B,U){if(this.zone.isOnSequence(4,1)){const k=K.q.instance.prodigy.event.create();k.validPath(B.user,B.path,1150,550),k.fire(990,415,200,300,2,!0,!0),k.function(this.zone.shrinkVines.bind(this.zone,U)),k.function(this.element.highlight.bind(this.element,!1)),k.function(this.zone.completeSequence.bind(this.zone,4,1)),k.function(this.zone.setState.bind(this.zone,"vines-D2","off")),k.set(this.zone.quests[4],"area",["skywatch-D3"]),k.enableInput(!0),k.function(B.addClickableEvent.bind(B,925,555,90,90,this.zone.interactTrolley.bind(this.zone,B,[{x:1040,y:600},{x:965,y:600}],{trolley:U.trolley2,x:"+=0",y:"+=300",duration:3e3,target:"skywatch-D3",targetX:300,targetY:250}))),k.function(B.process.bind(B)),k.start()}}highlightD2(k,B,U){j.Aq$.isDefined(this.zone.getState("vines-D2"))||(this.element=K.q.instance.prodigy.create.element(B.foreground,1020,500),this.element.highlight(!0),B.addClickableEvent(1e3,410,100,260,this.clearVinesD2.bind(this,k,B,U),null))}clearVinesD1(k,B,U){if(this.zone.isOnSequence(4,0)){const F=K.q.instance.prodigy.event.create();F.validPath(B.user,B.path,915,440),F.enableInput(!1),F.fire(960,330,230,185,2,!0,!0),F.function(this.enableD1Trolley2.bind(this,k,U)),F.function(this.element.highlight.bind(this.element,!1)),F.function(this.zone.completeSequence.bind(this.zone,4,0)),F.function(this.zone.setState.bind(this.zone,"plug-B3","off")),F.function(this.zone.setState.bind(this.zone,"plug-C4","off")),F.function(this.zone.setState.bind(this.zone,"vines-D1","off")),F.set(this.zone.quests[4],"area",["skywatch-D2"]),F.function(B.addClickableEvent.bind(B,1080,360,80,80,this.zone.interactTrolley.bind(this.zone,B,[{x:1130,y:450},{x:1120,y:420}],{trolley:U.trolley2,x:"+=200",y:"+=0",duration:3e3,target:"skywatch-D2",targetX:140,targetY:290}),null,0)),F.function(B.process.bind(B)),F.enableInput(!0),F.start()}}enableD1Trolley2(k,B){this.zone.shrinkVines(B),k.add.tween(B.trolley2,this).to({alpha:1},3e3,j.GS3.Linear.None).start()}highlightD1(k,B,U){this.element=K.q.instance.prodigy.create.element(B.foreground,1020,390),this.element.highlight(!0),B.addClickableEvent(950,320,260,190,this.clearVinesD1.bind(this,k,B,U),null,0)}}class yR extends Pn.T{constructor(k,B,U){super(k,B,5,"",{type:"item",ID:56,N:3},["skywatch-B3","skywatch-C3","skywatch-D2"],[433,434,435,436],[],[415],U,null,"QUESTS_SKYWATCH_FIND_FACTORY_KEY"),this.collectionMaps={B3:[0],C3:[1],D2:[2]}}setup(k,B,U){super.setup(k,B,U);const F=U.getTag();return"B3"===F?B.addCollect(0,900,380,{type:"item",ID:56}):"C3"===F?B.addCollect(1,260,450,{type:"item",ID:56}):"D2"===F&&B.addCollect(2,1150,530,{type:"item",ID:56}),null}}class _R extends Pn.T{constructor(k,B,U){super(k,B,6,"QUESTS_SKYWATCH_GET_KEY",{type:"seq",N:1},["skywatch-D1"],[437,438],[],[415],U),this.ambusher1=null,this.ambusher2=null,this.ambusher3=null}setup(k,B,U){if(super.setup(k,B,U),"D1"===U.getTag()&&this.zone.isOnSequence(6,0)){const F={randDir:!1,encounter:[{ID:120}],difficulty:1,maxTeamSize:1};this.ambusher1=U.addMonster(k,B,0,560,-50,!1,F,!0),this.ambusher2=U.addMonster(k,B,4,500,-50,!1,F,!0),this.ambusher3=U.addMonster(k,B,2,830,-50,!1,F,!0),this.ambusher1.visible=!1,this.ambusher2.visible=!1,this.ambusher3.visible=!1;K.q.instance.prodigy.create.element(B.content,700,190).highlight(!0),B.addClickableEvent(700,190,80,80,this.ambush.bind(this,k,B,U),null,0)}return null}ambush(k,B,U){const F=this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_DEFEAT_AMBUSHERS"),{pets:[{ID:120},{ID:120},{ID:120}],screen:"battle-skywatch-outside"},(()=>{this.zone.completeSequence(6,0),K.q.instance.prodigy.world.it("skywatch-D1",640,360)})),G=K.q.instance.prodigy.event.create();G.validPath(B.user,B.path,740,350),G.reward([{type:"item",ID:81}]),G.enableInput(!1),G.set(B.user,"evtProc",!0),G.function(this.zone.hideFollow.bind(this.zone,B)),G.set(this.ambusher1,"visible",!0),G.set(this.ambusher2,"visible",!0),G.set(this.ambusher3,"visible",!0),G.path(this.ambusher1,[{x:640,y:350}],1,!0),G.path(this.ambusher2,[{x:690,y:390}],1,!0),G.path(this.ambusher3,[{x:800,y:390}],1),G.delay(1e3),G.enableInput(!0),G.function((()=>{K.q.instance.prodigy.battle.battleStats.type="QuestBattle"})),G.function(F),G.start()}}class ER extends Pn.T{constructor(k,B,U){super(k,B.concat(X.V.Bgm_puppetmaster),6,"QUESTS_SKYWATCH_GET_KEY",{type:"seq",N:1},["skywatch-D1"],[437,438],[],[415],U),this.ambusher1=null,this.ambusher2=null,this.ambusher3=null}setup(k,B,U){if(super.setup(k,B,U),"D1"===U.getTag()&&this.zone.isOnSequence(6,0)){if(!U.zone.getState(Zu.PIPPET_DEFEATED)&&(k.input.enabled=!1,K.q.instance.prodigy.prefabFactory.createPippetQuestEncounter(U.zone,206,bS.e.Skywatch_quests_encounter).catch(j.RQr.createHandler(`Could not load the Pippet Encounter from guid: ${bS.e.Skywatch_quests_encounter}`)),!U.zone.getState(Zu.PIPPET_REMATCH)))return{enableMonsters:!1};const F={randDir:!1,encounter:[{ID:120}],difficulty:1,maxTeamSize:1};this.ambusher1=U.addMonster(k,B,0,560,-50,!1,F,!0),this.ambusher2=U.addMonster(k,B,4,500,-50,!1,F,!0),this.ambusher3=U.addMonster(k,B,2,830,-50,!1,F,!0),this.ambusher1.visible=!1,this.ambusher2.visible=!1,this.ambusher3.visible=!1;K.q.instance.prodigy.create.element(B.content,700,190).highlight(!0),B.addClickableEvent(700,190,80,80,this.ambush.bind(this,k,B,U),null,0)}return null}ambush(k,B,U){const F=this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_DEFEAT_AMBUSHERS"),{pets:[{ID:120},{ID:120},{ID:120}],screen:"battle-skywatch-outside"},(()=>{this.zone.completeSequence(6,0),K.q.instance.prodigy.world.it("skywatch-D1",640,360)})),G=K.q.instance.prodigy.event.create();G.validPath(B.user,B.path,740,350),G.reward([{type:"item",ID:81}]),G.enableInput(!1),G.set(B.user,"evtProc",!0),G.function(this.zone.hideFollow.bind(this.zone,B)),G.set(this.ambusher1,"visible",!0),G.set(this.ambusher2,"visible",!0),G.set(this.ambusher3,"visible",!0),G.path(this.ambusher1,[{x:640,y:350}],1,!0),G.path(this.ambusher2,[{x:690,y:390}],1,!0),G.path(this.ambusher3,[{x:800,y:390}],1),G.delay(1e3),G.enableInput(!0),G.function((()=>{K.q.instance.prodigy.battle.battleStats.type="QuestBattle"})),G.function(F),G.start()}}class wR extends Pn.T{constructor(k,B,U){super(k,B,7,"",{type:"item",ID:49,N:5},["skywatch-E1","skywatch-E3"],[439],[],[415],U,null,"QUESTS_SKYWATCH_UPGRADE_VINECINERATOR")}setup(k,B,U){super.setup(k,B,U),this.updateQuestArea();const F={randDir:!0,encounter:[{ID:120}],drops:[{type:"item",ID:49,N:1}],difficulty:3,maxTeamSize:1,unique:!0,isQuestEncounter:!0,showGuideHand:!0},G=U.getTag();return"E1"===G?(this.zone.isQuestComplete(7)||(K.q.instance.prodigy.prefabFactory.addMonster(U,942,400,0,F).catch(j.RQr.createHandler("Could not add Aracute 0 for Skywatch Q7")),K.q.instance.prodigy.prefabFactory.addMonster(U,400,400,1,F).catch(j.RQr.createHandler("Could not add Aracute 1 for Skywatch Q7"))),{enableMonsters:!1}):"E3"===G?(this.zone.isQuestComplete(7)||(K.q.instance.prodigy.prefabFactory.addMonster(U,725,480,2,F).catch(j.RQr.createHandler("Could not add Aracute 2 for Skywatch Q7")),K.q.instance.prodigy.prefabFactory.addMonster(U,300,280,3,F).catch(j.RQr.createHandler("Could not add Aracute 3 for Skywatch Q7")),K.q.instance.prodigy.prefabFactory.addMonster(U,290,520,4,F).catch(j.RQr.createHandler("Could not add Aracute 4 for Skywatch Q7"))),{enableMonsters:!1}):{}}updateQuestArea(){const k=[],B=this.zone.getQuestState();j.Aq$.isDefined(B.state)&&(B.state[1]&&B.state[2]||k.push("skywatch-E1"),B.state[2]&&B.state[3]&&B.state[4]||k.push("skywatch-E3"),this.area=k)}}class TR extends Pn.T{constructor(k,B,U){super(k,B,8,"QUESTS_SKYWATCH_TRIM_VINES",{type:"seq",N:1},["skywatch-B3"],[440,441,442],[],[415],U)}setup(k,B,U){if(super.setup(k,B,U),this.zone.isOnSequence(8,0)&&"skywatch-B3"===U.zoneName){const k=K.q.instance.prodigy.create.element(B.foreground,1020,140);k.highlight(!0),B.addClickableEvent(920,20,290,260,(()=>{const F=B.content.addChild(K.q.instance.prodigy.create.sprite(1045,-100,q._.Boss_skywatch_json,"water_cloud",new j.I9Y(.5,1))),G=B.foreground.addChild(K.q.instance.prodigy.create.sprite(1035,-150,q._.Boss_skywatch_json,"med_face_1",new j.I9Y(.5,1))),$=K.q.instance.prodigy.event.create();$.validPath(B.user,B.path,860,270),$.validPath(B.user,B.path,861,270),$.enableInput(!1),$.fire(935,45,290,290,2,!1,!0),$.function(k.highlight.bind(k,!1)),$.function(this.zone.shrinkVines.bind(this.zone,U)),$.delay(3e3),$.sound(17,"wind"),$.function((()=>{const k=K.q.instance.prodigy.animation.translate(F,1045,200,2e3,null,null,!0);K.q.instance.prodigy.animation.translate(G,1035,150,2e3,null,null,!0),k.onTweenComplete.add(this.zone.changePosition.bind(this.zone,F,G)),k.onTweenComplete.add((()=>{K.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle";const k=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),F=k.getValue("rainyStormMaxHP",Vt.s.get("GameConstants.RainyStorm.MAX_HP")),G=null===F?void 0:parseInt(F,10),$=B.user.x,H=B.user.y,V=this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_CLOUD_FIGHT"),{boss:{ID:50,element:"water",attacks:[82],name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_RAINY_STORM"),tag:hn.A_.SKYWATCH,maxHP:G},difficulty:parseInt(k.getValue("rainyStormDifficulty",Vt.s.get("GameConstants.RainyStorm.DIFFICULTY")),10),starMod:2,screen:"battle-skywatch-outside"},(()=>{this.zone.completeSequence(8,0),this.zone.setState("plug-B3",null),this.zone.setState("vines-B3",null),K.q.instance.prodigy.world.it("skywatch-B3",$,H)})),W=K.q.instance.prodigy.event.create();W.enableInput(!1),W.delay(2e3),W.enableInput(!0),W.function(V),W.start()}))})),$.start()}),null,0)}return null}}class SR extends Pn.T{constructor(k,B,U){super(k,B,9,"QUESTS_SKYWATCH_TRIM_VINES",{type:"seq",N:1},["skywatch-C4"],[443],[],[414],U)}setup(k,B,U){if(super.setup(k,B,U),this.zone.isOnSequence(9,0)&&"skywatch-C4"===U.zoneName){const F=K.q.instance.prodigy.create.element(B.foreground,160,220);F.highlight(!0);const G=()=>{const G=B.content.addChild(K.q.instance.prodigy.create.sprite(150,-100,q._.Boss_skywatch_json,"earth_cloud",new j.I9Y(.5,1))),$=B.foreground.addChild(K.q.instance.prodigy.create.sprite(140,-150,q._.Boss_skywatch_json,"med_face_2",new j.I9Y(.5,1))),H=()=>{const k=B.user.x,F=B.user.y,G=()=>{this.zone.completeSequence(9,0),this.zone.setState("plug-C4",null),this.zone.setState("vines-C4",null),K.q.instance.prodigy.world.it("skywatch-C4",k,F)};K.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle";const $=K.q.instance.prodigy.event.create();$.enableInput(!1),$.delay(2e3),$.enableInput(!0);const H=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),V=H.getValue("sandyStormMaxHP",Vt.s.get("GameConstants.SandyStorm.MAX_HP")),W=null===V?void 0:parseInt(V,10);$.function(this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_CLOUD_FIGHT"),{boss:{ID:49,element:"earth",attacks:[68],name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_SANDY_STORM"),difficulty:3,tag:hn.A_.SKYWATCH,maxHP:W},difficulty:parseInt(H.getValue("sandyStormDifficulty",Vt.s.get("GameConstants.SandyStorm.DIFFICULTY")),10),starMod:2,screen:"battle-skywatch-outside"},(()=>{G()}))),$.start()},V=K.q.instance.prodigy.event.create();V.validPath(B.user,B.path,220,400),V.enableInput(!1),V.fire(115,165,290,290,2,!1,!0),V.function(F.highlight.bind(F,!1)),V.function(this.zone.shrinkVines.bind(this.zone,U)),V.delay(3e3),V.sound(17,"wind"),V.function((()=>{const B=k.add.tween(G,this).to({x:150,y:300},2e3,j.GS3.Linear.None).start();k.add.tween($,this).to({x:140,y:250},2e3,j.GS3.Linear.None).start(),B.onTweenComplete.add((()=>{this.zone.changePosition(G,$),H()}))}).bind(this,k,B)),V.start()};B.addClickableEvent(90,120,270,280,G.bind(this,k,B),null)}return null}}class AR extends vn.b{constructor(k){super(k),this.questManagerIdentifier="496-af48",this.name="Skywatch",this.ID=hn.A_.SKYWATCH,this.guardian="SKYWATCH_GUARDIAN",this.battleBG="battle-skywatch-inside",this.defaultOnFaint="skywatch-A1",this.questHub="skywatch-A1",this.bgmID=18,this.currency=16,this.zoneIndex=pT.P.Skywatch,this.states=["chest1","chest2","chest3","chest4","chest5","wizard1","wizard2","daily","windowBroken","plug-D3","plug-B3","plug-C4","eugene_A1","vines-D1","vines-D2","vines-D3","vines-B3","vines-C4",Zu.PIPPET_ENCOUNTER,Zu.PIPPET_REMATCH,Zu.PIPPET_DEFEATED],this.monsters=[13,15,18,20,35,40,43,56,72,84,113,115,120];const B=[q._.Npc_sprite_wizard_json,Rn.t.Tileset_town_new_png,q._.Zone_skywatch_json,q._.Npc_sprite_benni_json,q._.Npc_sprite_broccolina_json,q._.Npc_sprite_eugene_json,Z.c.Sfx_skywatch,Rn.t.Tileset_skywatch_png,Rn.t.Tileset_skywatch_buildings_png,Rn.t.Tileset_collisions_png,Rn.t.Tileset_skywatch_factory_png,Rn.t.Tileset_generic_snow_png,Rn.t.Tileset_icecave_new_png,Rn.t.Tileset_cloud_new_png,Rn.t.Tileset_cloud_png,Rn.t.Tileset_interior_png,X.V.Bgm_skywatch],U={map:"skywatch-Titan",cutscene:"skywatch-titanIntro",harvey:{x:240,y:200},sign:{x:150,y:210},catapult:{x:140,y:400,arcHeight:300},titan:{x:1100,y:390,impactOffset:{x:-130,y:0}},entry:{x:400,y:450},battleBG:[nr.q.Battle_skywatch_outside_bg,nr.q.Battle_skywatch_outside_fg]};this.maps={A0:new zD(this,B),A1:new YD(this,B),B1:new QD(this,B),B2:new XD(this,B),B3:new ZD(this,B),C1:new JD(this,B),C2:new tR(this,B),C3:new eR(this,B),C4:new iR(this,B),D1:new sR(this,B),D2:new nR(this,B),D3:new aR(this,B),E1:new rR(this,B),E2:new oR(this,B),E3:new hR(this,B),E4:new cR(this,B),E5:new dR(this,B),Titan:new xT(this,B,U)},Promise.all([Cf.T.ready,Gt.R.dataBundleLoadPromise]).then((()=>{this.setZoneRewards()})).catch((k=>{K.q.instance.prodigy.open.messageBoxError("ERROR_LOADING_ZONE",["WORLD_SKYWATCH"],k,"Error: unable to load Skywatch Zone Rewards JSON")})),this.scenes={titanIntro:new _T(this,[Rn.t.Tileset_interior_general_png,Rn.t.Tileset_wall_collisions_png,X.V.Bgm_tutorial])}}setZoneRewards(){const k=[q._.Npc_sprite_wizard_json,Rn.t.Tileset_town_new_png,q._.Zone_skywatch_json,q._.Npc_sprite_benni_json,q._.Npc_sprite_broccolina_json,q._.Npc_sprite_eugene_json,Z.c.Sfx_skywatch,Rn.t.Tileset_skywatch_png,Rn.t.Tileset_skywatch_buildings_png,Rn.t.Tileset_collisions_png,Rn.t.Tileset_skywatch_factory_png,Rn.t.Tileset_generic_snow_png,Rn.t.Tileset_icecave_new_png,Rn.t.Tileset_cloud_new_png,Rn.t.Tileset_cloud_png,Rn.t.Tileset_interior_png,X.V.Bgm_skywatch],B=(0,yT.mg)(Gt.R.loadData(Ft.r.ZoneRewardsSkywatch_json));this.quests={1:new lR(this,k,B.quests.SkywatchQ1),2:new vR(this,k,B.quests.SkywatchQ2),3:new gR(this,k,B.quests.SkywatchQ3),4:new mR(this,k,B.quests.SkywatchQ4),5:new yR(this,k,B.quests.SkywatchQ5),6:ef.arePippetQuestEncountersEnabled?new ER(this,[],B.quests.SkywatchQ6):new _R(this,[],B.quests.SkywatchQ6),7:new wR(this,k,B.quests.SkywatchQ7),8:new TR(this,k,B.quests.SkywatchQ8),9:new SR(this,k,B.quests.SkywatchQ9),10:new uR(this,k,B.quests.SkywatchQ10),11:new fR(this,k,B.quests.SkywatchQ11),12:new bR(this,k,B.quests.SkywatchQ12),13:new pR(this,k,B.quests.SkywatchQ13)}}start(k,B,U){super.start(k,B,U),this._elevatorEvent=K.q.instance.prodigy.event.create(),this._trolleyAnimationEvent=K.q.instance.prodigy.event.create(),this._trolleyInteractionEvent=K.q.instance.prodigy.event.create(),this.showTopLeftNavigationButton()}createTopLeftNavigationButton(){this.showTopLeftNavigationButton()}getDailyMaps(){return[]}interactTrolley(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=this._trolleyInteractionEvent;G.end(),G.validPath(k.user,k.path,B[0].x,B[0].y),G.function(k.removeFollow.bind(k,F.userID)),G.path(k.user,[{x:B[1].x,y:B[1].y}]),G.sound(17,"machines"),G.function(this.animateTrolley.bind(this,k,U.trolley,U.x,U.y,U.duration,U.target,U.targetX,U.targetY)),G.start()}animateTrolley(k,B,U,F,G,$,H,V){this.game.add.tween(B,this).to({x:U,y:F},G,j.GS3.Linear.None).start(),this.game.add.tween(k.user,this).to({x:U,y:F},G,j.GS3.Linear.None).start();const W=this._trolleyAnimationEvent;W.enableInput(!1),W.delay(3e3),W.enableInput(!0),W.function(K.q.instance.prodigy.world.it.bind(K.q.instance.prodigy.world,$,H,V)),W.start()}shrinkVines(k){k.toggleDynamicLayer(this.game,2,!1,3e3)}createVines(k){k.toggleDynamicLayer(this.game,2,!0,0)}changePosition(k,B){K.q.instance.prodigy.animation.float(k,20,1400,!0,!0),K.q.instance.prodigy.animation.float(B,20,1400,!0,!0)}elevator(k,B,U,F){const G=this._elevatorEvent;j.Aq$.isDefined(G)&&(G.end(),G.validPath(k.user,k.path,B[0].x,B[0].y),G.function(this.hideFollow.bind(this,k)),G.enableInput(!1),G.delay(200),G.sound(17,"elevator"),G.function(this.animateElevatorOpen.bind(this,k.content,U.x,U.y)),G.delay(1e3),G.path(k.user,[{x:B[1].x,y:B[1].y}]),G.delay(1e3),G.function(this.animateElevatorClose.bind(this,k.foreground,U.x,U.y)),G.function((()=>{k.user.visible=!1})),G.delay(1e3),G.enableInput(!0),G.function(K.q.instance.prodigy.world.it.bind(K.q.instance.prodigy.world,F.target,F.x,F.y)),G.start())}animateElevatorOpen(k,B,U){k.addChild(K.q.instance.prodigy.create.sprite(B,U,q._.Zone_skywatch_json,"elevator-0",new j.I9Y(.5,1),(k=>{k.animations.add("stand",["elevator-0","elevator-1","elevator-2","elevator-3","elevator-4"],10,!1,!1),k.animations.play("stand",void 0,!1)}))).anchor.set(0,0)}animateElevatorClose(k,B,U){const F=k.addChild(K.q.instance.prodigy.create.sprite(B,U,q._.Zone_skywatch_json,"elevator-2",new j.I9Y(.5,1)));F.anchor.set(0,0),F.animations.add("stand",["elevator-4","elevator-3","elevator-2","elevator-1","elevator-0"],10,!1,!1),F.animations.play("stand")}cleanup(){var k,B,U;super.cleanup(),null===(k=this._elevatorEvent)||void 0===k||k.end(),this._elevatorEvent=null,null===(B=this._trolleyAnimationEvent)||void 0===B||B.end(),this._trolleyAnimationEvent=null,null===(U=this._trolleyInteractionEvent)||void 0===U||U.end(),this._trolleyInteractionEvent=null}}class CR extends KD{constructor(k,B){super(k,"A0","MAP_SKYWATCH_LOWER_BEANOVATOR",1100,450,["skywatch-A1","shiverchill-B1"],B),this.battleBG="battle-skywatch-outside"}}class OR extends KD{constructor(k,B){super(k,"A1","MAP_SKYWATCH_UPPER_BEANOVATOR",620,350,["skywatch-A0","skywatch-B1","skywatch-C1","skywatch-D1"],B.concat([q._.Zone_lamplight_json,q._.Npc_sprite_broccolina_json,q._.Npc_sprite_merchant_json,J.Q.Spine_npc_benni_json]))}}class IR extends KD{constructor(k,B){super(k,"B1","MAP_SKYWATCH_GARDENERS_HUT_EXTERIOR",1140,549,["skywatch-A1","skywatch-B2","skywatch-B3"],B),this.battleBG="battle-skywatch-outside",this.coord=[new j.I9Y(460,530),new j.I9Y(200,560)]}}class DR extends KD{constructor(k,B){super(k,"B2","MAP_SKYWATCH_GARDENERS_HUT_INNER",640,510,["skywatch-B1"],B.concat([q._.Npc_sprite_noot_json])),this.battleBG="battle-skywatch-inside"}}class RR extends KD{constructor(k,B){super(k,"B3","MAP_SKYWATCH_GREAT_GRATERS",1030,530,["skywatch-B1"],B.concat([q._.Boss_skywatch_json])),this.battleBG="battle-skywatch-outside"}}class PR extends KD{constructor(k,B){super(k,"C1","MAP_SKYWATCH_SCREWBALL_SHACK",1120,430,["skywatch-A1","skywatch-C2","skywatch-C3"],B.concat([q._.Zone_lamplight_json])),this.battleBG="battle-skywatch-outside",this.coord=[new j.I9Y(370,580),new j.I9Y(590,350)]}}class MR extends KD{constructor(k,B){super(k,"C2","MAP_SKYWATCH_INNER_SCREWBALL_SHACK",625,520,["skywatch-C1"],B.concat([q._.Npc_sprite_noot_json])),this.battleBG="battle-skywatch-inside"}}class NR extends KD{constructor(k,B){super(k,"C3","MAP_SKYWATCH_CLOUDY_PASS",1160,210,["skywatch-C1","skywatch-C4"],B),this.battleBG="battle-skywatch-outside"}}class xR extends KD{constructor(k,B){super(k,"C4","MAP_SKYWATCH_SKY_SHOWER",1160,550,["skywatch-C3"],B.concat([q._.Npc_sprite_noot_json,q._.Npc_sprite_flora_json,q._.Boss_skywatch_json])),this.battleBG="battle-skywatch-outside"}}class LR extends KD{constructor(k,B){super(k,"D1","MAP_SKYWATCH_FACTORY_ENTRANCE",189,549,["skywatch-A1","skywatch-D2","skywatch-E1"],B.concat(q._.Npc_sprite_noot_json)),this.trolley2=null,this.battleBG="battle-skywatch-outside",this.coord=[new j.I9Y(400,540),new j.I9Y(780,570)]}}class kR extends KD{constructor(k,B){super(k,"D2","MAP_SKYWATCH_BREEZY_PASS",140,290,["skywatch-D1","skywatch-D3"],B.concat([q._.Zone_lamplight_json])),this.trolley2=null,this.battleBG="battle-skywatch-outside",this.coord=[new j.I9Y(280,450),new j.I9Y(780,330)]}}class BR extends KD{constructor(k,B){super(k,"D3","MAP_SKYWATCH_WIND_TUNNEL",270,250,["skywatch-D2"],B.concat([q._.Zone_lamplight_json,q._.Boss_skywatch_json])),this.battleBG="battle-skywatch-outside"}}class UR extends KD{constructor(k,B){super(k,"E1","MAP_SKYWATCH_FACTORY_MAIN_HALL",1120,520,["skywatch-D1","skywatch-E2","skywatch-E3"],B),this.battleBG="battle-skywatch-inside"}}class FR extends KD{constructor(k,B){super(k,"E2","MAP_SKYWATCH_OLD_MANS_ROOM",230,530,["skywatch-E1"],B.concat([q._.Npc_sprite_eugene_json])),this.battleBG="battle-skywatch-inside"}}class GR extends KD{constructor(k,B){super(k,"E3","MAP_SKYWATCH_BLAST_DOORS",1060,530,["skywatch-E1","skywatch-E4"],B),this.battleBG="battle-skywatch-inside"}}class jR extends KD{constructor(k,B){super(k,"E4","MAP_SKYWATCH_END_CHAMBER",640,380,["skywatch-E3","skywatch-E5"],B.concat([q._.Boss_skywatch_json])),this.battleBG="battle-skywatch-inside"}}class $R extends KD{constructor(k,B){super(k,"E5","MAP_SKYWATCH_OUTSKIRTS",1024,515,["skywatch-E4"],B),this.user=null,this.battleBG="battle-skywatch-outside"}}class HR extends AR{constructor(k){super(k),this._assets=[q._.Npc_sprite_wizard_json,Rn.t.Tileset_town_new_png,q._.Zone_skywatch_json,q._.Npc_sprite_benni_json,q._.Npc_sprite_broccolina_json,q._.Npc_sprite_eugene_json,Z.c.Sfx_skywatch,Rn.t.Tileset_skywatch_png,Rn.t.Tileset_skywatch_buildings_png,Rn.t.Tileset_collisions_png,Rn.t.Tileset_skywatch_factory_png,Rn.t.Tileset_generic_snow_png,Rn.t.Tileset_icecave_new_png,Rn.t.Tileset_cloud_new_png,Rn.t.Tileset_cloud_png,Rn.t.Tileset_interior_png,X.V.Bgm_skywatch],this.questManagerIdentifier="38d-437e",this.ID=hn.A_.SKYWATCHHARD,this.defaultOnFaint="skywatch_hard-C8",this.questHub="skywatch_hard-C8",this.zoneIndex=pT.P.SkywatchHard,this.difficultyMode=ri.i.Hard,this.states=["chest1","chest2","chest3","chest4","chest5","wizard1","wizard2","daily","windowBroken","plug-D3","plug-B3","plug-C4","eugene_A1","vines-D1","vines-D2","vines-D3","vines-B3","vines-C4",Zu.PIPPET_ENCOUNTER,Zu.PIPPET_REMATCH,Zu.PIPPET_DEFEATED],this.monsters=[],this.maps={A0:new CR(this,this._assets),A1:new OR(this,this._assets),B1:new IR(this,this._assets),B2:new DR(this,this._assets),B3:new RR(this,this._assets),C1:new PR(this,this._assets),C2:new MR(this,this._assets),C3:new NR(this,this._assets),C4:new xR(this,this._assets),D1:new LR(this,this._assets),D2:new kR(this,this._assets),D3:new BR(this,this._assets),E1:new UR(this,this._assets),E2:new FR(this,this._assets),E3:new GR(this,this._assets),E4:new jR(this,this._assets),E5:new $R(this,this._assets)},this.scenes={}}}var VR=U(51979);class WR{constructor(k,B){this._previousMap="",this._currentMap="",this.mapChanged=new j.HN0,this.game=k,this._metricsManager=B,this.zones={[hn.A_.FOREST]:new $A(k),[hn.A_.SHIVERCHILL]:new ID(k),[hn.A_.SKYWATCH]:new AR(k),[hn.A_.LAMPLIGHT]:new _O(k),[hn.A_.DYNO]:new sA(k),[hn.A_.BONFIRE]:new mS(k),[hn.A_.HOUSE]:new vC(k),[hn.A_.SHIPWRECK]:new _I(k),[hn.A_.DARKTOWER]:new zS(k),[hn.A_.ACADEMY]:new Dn.N(k),[hn.A_.ARCHIVES]:new mT(k),[hn.A_.TOWERTOWN]:new dT.m(k),[hn.A_.CRYSTALCAVERNS]:new jS(k),[hn.A_.DRAGONISLE]:new tA(k),[hn.A_.MOON]:new MO(k),[hn.A_.SPRINGFESTGROTTO_BUNNY]:new CO(k),[hn.A_.SPRINGFESTGROTTO_FOX]:new OO(k),[hn.A_.EARTHTOWER]:new Xn(k,1),[hn.A_.ICETOWER]:new Xn(k,3),[hn.A_.STORMTOWER]:new Xn(k,4),[hn.A_.FIRETOWER]:new Xn(k,5),[hn.A_.WATERTOWER]:new Xn(k,6),[hn.A_.ASTRALTOWER]:new Xn(k,7),[hn.A_.ACADEMYHARD]:new vT(k),[hn.A_.FORESTHARD]:new tC(k),[hn.A_.SHIVERCHILLHARD]:new qD(k),[hn.A_.BONFIREHARD]:new US(k),[hn.A_.SHIPWRECKHARD]:new VI(k),[hn.A_.SKYWATCHHARD]:new HR(k),[hn.A_.ACADEMYEXPERT]:new vC(k),[hn.A_.FORESTEXPERT]:new vC(k),[hn.A_.SHIVERCHILLEXPERT]:new vC(k),[hn.A_.BONFIREEXPERT]:new vC(k),[hn.A_.SHIPWRECKEXPERT]:new vC(k),[hn.A_.SKYWATCHEXPERT]:new vC(k)},this.pippetEncounterDaily=null,this.pippetEncounterSpawn=null}inRestrictedSocialZone(k){return!!k&&$.includes(WR.SINGLE_PLAYER_ZONES,k)}enter(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=K.q.instance.prodigy.gameContainer.get("afa-b7c5");B.startTracing(fu.u.World);const U=K.q.instance.prodigy.gameContainer;B.startTracing(fu.u.WorldRemotePlayerSpawnLimiterInit),U.get("d77-66fb").init(),B.endTracing(fu.u.WorldRemotePlayerSpawnLimiterInit),B.startTracing(fu.u.WorldSynapseMultiplayerServiceConnection);U.get("779-a746").connect().catch(j.RQr.createHandler("Unable to connect to Synapse"));const F=U.get("173-db8a");let G;B.endTracing(fu.u.WorldSynapseMultiplayerServiceConnection),B.startTracing(fu.u.WorldNetworkHandlerEnterWorld);do{try{G=yield F.enterWorld([])}catch(e){j.RQr.logError(e,"Error entering world"),yield new Promise((B=>{const U="500"===(e instanceof Error?e.name:"500")?"ENTER_WORLD_ERROR_RETRY":"ENTER_WORLD_ERROR";K.q.instance.prodigy.open.messageBoxPrefab({text:U,confirmCallback:B})})),yield j.Egh.timeout(5e3)}}while(!G);B.endTracing(fu.u.WorldNetworkHandlerEnterWorld),B.startTracing(fu.u.WorldInitProgressDataManager);const{chargedLevelProgress:$,timezoneOffset:H,riftsSyncedData:V,resumeBattleData:W,hudData:q,initialInventoryContents:z,afterSchoolWidgetStatus:Y}=G;U.get("54c-b7de").setup().catch(j.RQr.createHandler("World: Could not set up Universal Team Selection Service"));const Q=U.get("62e-110e");$&&Q.init($),B.endTracing(fu.u.WorldInitProgressDataManager),j.Aq$.isDefined(H)&&(Oc.R.SERVER_PLAYER_TIMEZONE_OFFSET=H),B.startTracing(fu.u.WorldSynchedRiftDataInit),yield uT.L.setUpIconGuidOverrides(),V&&(U.get("9ac-9677").init(V),(null==V?void 0:V.currentRiftRunProgress)&&K.q.instance.game.state.get(Ie.G.Rifts).setRiftRunProgress(V.currentRiftRunProgress)),B.endTracing(fu.u.WorldSynchedRiftDataInit),B.startTracing(fu.u.WorldFeaturedSpawnDataInit);const X=U.get("a2e-a635");yield X.cacheData(G.featuredSpawnData),B.endTracing(fu.u.WorldFeaturedSpawnDataInit),B.startTracing(fu.u.WorldWizardCostumeDataInit);const Z=U.get("6e9-d1dd");yield Z.initializeCostumeData(G.costumeData),B.endTracing(fu.u.WorldWizardCostumeDataInit),B.startTracing(fu.u.WorldHudDataInit),q&&U.get("446-72a7").initialize(q),B.startTracing(fu.u.WorldSegmentedOffersDataInit);const J=U.get("a02-c2b2");yield J.loadOffersFromData(),B.endTracing(fu.u.WorldSegmentedOffersDataInit);const tt=U.get("a94-4ba3");if(yield tt.isFeatureAvailable()){const k=U.get("0f9-dd7b"),B=U.get("43a-6f08");if(j.Aq$.isDefined(k.lastClassCodeFetched)){yield k.initialize(),yield B.sendClassCodeQuestEvent();const U=yield fT.b.getData();j.Aq$.isDefined(U)&&(U.IS_CURRENT_CHALLENGE_STARTED||(yield B.sendPreviousChallengeStartedEvent()))}yield B.setup(),yield tt.setupHudButton()}(0,Dt.G)(rT.K).enabled&&U.get("e94-c727").setData(Y),(0,Dt.G)(Xo.d).enabled&&(0,bT.Ug)().catch(j.RQr.createHandler("World: Error updating wizard bank hud button notifications")),B.endTracing(fu.u.WorldHudDataInit),B.startTracing(fu.u.WorldInventoryInit),z&&U.get("61f-37d6").initialize(z),K.q.instance.prodigy.gameContainer.get(Hs.T).initialize(),B.endTracing(fu.u.WorldInventoryInit),yield U.get("a25-68f4").managerSetupPromise,B.startTracing(fu.u.WorldSegmentAnalyticsSetup);const et=U.get("c47-20b6");et.item.beginSecureInventoryTracking(),et.session.sendServerSessionStartedEvents(),B.endTracing(fu.u.WorldSegmentAnalyticsSetup),B.startTracing(fu.u.WorldElementalBoostCache),U.get("ce9-b630").cacheElementalBoost().catch(j.RQr.createHandler("Could not cache the daily elemental boost!")),B.endTracing(fu.u.WorldElementalBoostCache),U.get("098-b402").setCooldowns(null!==(k=G.cooldownsData)&&void 0!==k?k:{});const it=K.q.instance.game.state.get(Ie.G.Loading);it?it.onAdditionalLoadPromisesFinishSignal.addOnce(this.onWorldLoadingFinished.bind(this)):this.game.state.onStateLoaded.add(this.onStateLoaded,this);const st=U.get("e20-0fb0").player,nt=K.q.instance.prodigy.classModeController;if(B.startTracing(fu.u.WorldPippetEncounterInit),this.pippetEncounterDaily=new hT.e(this.game,st),!this.pippetEncounterDaily.isInitialized()||this.pippetEncounterDaily.hasDateIdChanged()?(this.pippetEncounterDaily.init(),this.pippetEncounterSpawn=this.pippetEncounterDaily.getSpawn()):this.pippetEncounterDaily.isComplete()||(this.pippetEncounterSpawn=this.pippetEncounterDaily.getSpawn()),B.endTracing(fu.u.WorldPippetEncounterInit),this.isMathTowerEnabledForPlayer(this.game,st)&&nt.isClassMode()&&st.hasCompletedTutorial())return void this.it("tower_town-A1");B.startTracing(fu.u.WorldGetTowerData);const at=Dn.N.getAllTowerData();B.endTracing(fu.u.WorldGetTowerData);const rt=this.zones[hn.A_.ACADEMY],ot=this.zones[hn.A_.ACADEMY].maps.CR1;B.startTracing(fu.u.WorldInitTowerData);for(let K=0;KNumber(k.taskID)<=2)))?B.sendQuestEvent(as.T.START_QUEST,{id:"zone-quest-ftue"}).then((()=>{this.it(VR.W,WR.TUTORIAL_MAP_STARTING_POSITION.x,WR.TUTORIAL_MAP_STARTING_POSITION.y)})).catch(j.RQr.createHandler("[World] Failed to send the quest event: zone-quest-ftue")):this.enterMap()}))}enterMap(){var k;const B=this.zones[hn.A_.HOUSE].getQuestState(),U=Tn.J.isDefined(B)&&1===$.get(B,"ID",0)?$.get(B,"seq",0):void 0,F=this.zones[hn.A_.ACADEMY].getQuestState(),G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let H=$.get(G.data,"zone","");const V=K.q.instance.prodigy.gameContainer.get("fc2-cb0a");if(V.waitingToTransport||j.Aq$.isDefined(V.currentQuickQuizId))this.setCurrentMap(H);else if(va.p.resumeBattle())this.setCurrentMap(H);else if(tf.J.canShowNarrativeIntro(null===(k=null==G?void 0:G.data)||void 0===k?void 0:k.zone)&&this.setCurrentMap("lamplight-B3"),U>4)j.Aq$.isDefined(G.state.data.zone.academy)&&(G.state.data.zone.academy.quest=null),this.it("academy-GH3");else if(!G.hasCompletedTutorial()&&"academy-GH1"===H&&F&&F.ID>=2||U<=4&&H.startsWith(hn.A_.TOWERTOWN))this.it("house-exterior");else{if(H.includes(hn.A_.TOWERTOWN)&&!this.isMathTowerEnabledForPlayer(this.game,G)){const k=G.hasCompletedTutorial()?WR.DEFAULT_ZONE:hn.A_.HOUSE;G.data.zone=k,H=k}if(H=K.q.instance.prodigy.skin.checkForExclusiveMap(H),this.setCurrentMap(H),this.inDeprecatedZone())j.VyI.log("Teleporting to default zone because this zone is deprecated.",j.$bb.Info),this.it(WR.DEFAULT_ZONE);else if(G.hasCompletedTutorial()&&K.q.instance.prodigy.classModeController.isLockedZone(H))j.VyI.log("Teleporting to default zone because student is at school and this zone is locked.",j.$bb.Info),this.it(WR.DEFAULT_ZONE);else if(Tn.J.isDefined(H)&&H.indexOf("-")>0){const[k,B]=H.split("-"),U=this.zones[k];U instanceof On?"WR"===B||"CR"===B?this.it(H):U.exitDungeon():(Cf.T.sendFestivalTravelEvent(k).catch(j.RQr.createHandler("[World] Unable to send FestivalTravel event")),this.it(H)),U instanceof jS&&"DungeonHub"!==B&&U.sendCrystalCavernsSpawnEvent()}else j.VyI.log("Teleporting to house zone because playerZone was not defined or does not have a dash.",j.$bb.Info),this.it(hn.A_.HOUSE)}}isMathTowerEnabledForPlayer(k,B){try{return K.q.instance.prodigy.gameContainer.get(cT.G.MathTower).isEnabledForPlayer(B)}catch(e){return j.VyI.log(e,j.$bb.Error),!1}}isValidLocation(k){const B=k.split("-");return this.zones[B[0]]instanceof On||j.Aq$.isDefined(this.zones[B[0]])&&j.Aq$.isDefined(this.zones[B[0]].maps[B[1]])}it(k,B,U,F,G={}){var $,H,V,W,q,z,Y;let Q=String(k);Q=Q.replace("tower-0","darktower-A1"),G.assets=j.Aq$.isDefined(G.assets)?G.assets:[],G.assets=G.assets.concat(Z.c.Sfx_world);const X=this.game.state.get(Ie.G.TileScreen);G.timeWhenPreviousZoneLoaded=null!==(H=null===($=null==X?void 0:X.zone)||void 0===$?void 0:$.timeWhenZoneLoaded)&&void 0!==H?H:null,K.q.instance.prodigy.gameContainer.rebind("RespawnEnabled").toConstantValue(void 0===(null==F?void 0:F.battleResult));const J=tf.J.isZoneMapDifficultyModeAgnostic(Q),tt=Q.split("-"),et=J?Ta.i.DIFFICULTY_MODE:null!==(W=null===(V=this.zones[tt[0]])||void 0===V?void 0:V.difficultyMode)&&void 0!==W?W:ri.i.Regular,it=J||et===ri.i.Regular||ei.R.isFeatureEnabled()&&j.Aq$.isDefined(null===(z=null===(q=ei.R.getVariables())||void 0===q?void 0:q.maps)||void 0===z?void 0:z[Q]);if(Q!==hn.A_.HOUSE&&it)if(j.Aq$.isDefined(this.zones[tt[0]])&&this.isValidLocation(Q))this.getCurrentZone()!==tt[0]&&Cf.T.sendFestivalTravelEvent(tt[0]).catch(j.RQr.createHandler("[World] Unable to send FestivalTravel event")),this.zones[tt[0]].teleport(tt[1],B,U,F,G);else{let k;switch(j.Aq$.isDefined(B)&&j.Aq$.isDefined(U)&&(k={playerPosition:{x:B,y:U}}),Q){case"dyno-A1":K.q.instance.prodigy.start(Ie.G.Museum,G,k);break;default:this.zones.house.teleport(hn.A_.HOUSE,B,U,F,G)}}else this.zones.house.teleport(hn.A_.HOUSE,B,U,F,G);null===(Y=this.mapChanged)||void 0===Y||Y.dispatch()}teleportToCurrentMap(){this.it(this.getCurrentMap())}playScene(k){const B=k.split("-");j.Aq$.isDefined(this.zones[B[0]])&&this.zones[B[0]].playScene(B[1])}getPreviousMap(){return this._previousMap}getCurrentMap(){return this._currentMap}setCurrentMap(k){var B;this._previousMap=null!==(B=this._currentMap)&&void 0!==B?B:"",this._currentMap=k,this._metricsManager.setLastMapLoadStarted(k)}getCurrentMapObject(){var k;const B=this._currentMap.split("-");return null===(k=this.zones[B[0]])||void 0===k?void 0:k.maps[B[1]]}isZoneSinglePlayer(k){return $.indexOf(WR.SINGLE_PLAYER_ZONES,k)>-1}getCurrentZone(){return this._currentMap.split("-")[0]}getCurrentZoneObject(){return this.zones[this.getCurrentZone()]}getCurrentMapTag(){return this._currentMap.split("-")[1]}getCurrentCurrency(){var k;return null===(k=this.zones[this.getCurrentZone()])||void 0===k?void 0:k.currency}getZone(k){return this.zones[k]}goToZoneHub(k){this.it(this.getZoneHub(k))}getZoneHub(k){switch(k){case this.zones.forest.ID:return this.zones.forest.questHub;case this.zones.shiverchill.ID:return this.zones.shiverchill.questHub;case this.zones.skywatch.ID:return this.zones.skywatch.questHub;case this.zones.lamplight.ID:return this.zones.lamplight.questHub;case this.zones.bonfire_spire.ID:return this.zones.bonfire_spire.questHub;case this.zones.shipwreck_shore.ID:return this.zones.shipwreck_shore.questHub;default:return this.zones.house.questHub}}inZoneHub(){return this.getCurrentMap()===this.getZoneHub(this.getCurrentZone())}inDeprecatedZone(){return[...WR.DEPRECATED_ZONES,...(0,Dt.G)(oT.m).enabled?[hn.A_.DYNO]:[]].includes(this.getCurrentZone())}onStateLoaded(k){k instanceof of.R||(this.onWorldLoadingFinished(),this.game.state.onStateLoaded.removeAll(this))}onWorldLoadingFinished(){var k;K.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(fu.u.World,{finished_loading:!0,zone:null!==(k=this._currentMap)&&void 0!==k?k:"none"})}}WR.DEFAULT_ZONE="forest-C8",WR.TUTORIAL_MAP_STARTING_POSITION=new j.I9Y(685,385),WR.DEPRECATED_ZONES=["activity_zone","toyzone","elemental_guardian",hn.A_.EARTHTOWER,hn.A_.ICETOWER,hn.A_.CRYSTALCAVERNS],WR.SINGLE_PLAYER_ZONES=[hn.A_.TOWERTOWN];var qR=U(95925),KR=U(9591),zR=U(18741);let YR=class{get PendingTints(){return this.pendingTints}get OnImageTinted(){return this.onImageTinted}constructor(k){this.assetLoader=null,this.game=null,this.pendingTints=[],this.onImageTinted=new j.HN0,this.assetLoader=k,this.game=K.q.instance.game}tintImage(k,B,U,F){if(this.assetLoader.assignAssetData(B,{type:"sprite"}),this.assetLoader.isLoaded(B,qR.i.Image))this.OnImageTinted.dispatch(B);else if(U.length===F.length){if(-1===this.pendingTints.indexOf(B))if(this.pendingTints.push(B),this.assetLoader.isLoaded(k,qR.i.Image)){const G=this.assetLoader.getAsset(k,qR.i.Image),j=new KR.w(this.game,null,G.width,G.height),H=K.q.instance.prodigy.create.image(0,0,k);j.draw(H),j.update(),j.processPixelRGB((k=>{const B=$.findIndex(U,(B=>k.r===B[0]&&k.g===B[1]&&k.b===B[2]));return B>-1?Object.assign(Object.assign({},k),{r:F[B][0],g:F[B][1],b:F[B][2]}):k})),j.generateTexture(B,(k=>{H.destroy(),j.clear(),zR.f.removeByCanvas(j.canvas),j.destroy(),$.remove(this.pendingTints,(k=>k===B)),pn.K.cacheAsset(this.game,B,pn.K.commonAssetsCached),this.OnImageTinted.dispatch(B)}))}else j.VyI.log(`Image with source ${k} was not loaded for tinting`,j.$bb.Warning)}else j.VyI.log("Color array length must match",j.$bb.Warning)}};YR=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)(j.t5G.AssetLoader)),(0,G.Sn)("design:paramtypes",[Object])],YR);var QR=U(66572),XR=U(18344);class ZR{get gameContainer(){return this.game.rootContainer}constructor(k){this.version=null,this.game=null,this.breadcrumbManager=null,this.updateCount=0,this.assets=null,this.load=null,this.audio=null,this.battle=null,this.achievements=null,this.colorReplaceController=null,this.notifications=null,this.open=null,this.prefabFactory=null,this.effects=null,this.event=null,this.dialogue=null,this.education=null,this.skin=null,this.create=null,this.icon=null,this.animation=null,this.mailNetworkHandler=null,this.friendsListNetworkHandler=null,this.titansNetworkHandler=null,this.world=null,this.dialogues=null,this.hints=null,this.previousNow=0,this.textureBelow=null,this.textureAbove=null,this.textureMenu=null,this.spinner=null,this._inputBlocker=null,this.timeManager=null,this.urlProvider=null,this.game=k,K.q.instance.prodigy=this,this.version=`${Vt.s.get("GameConstants.Build.VERSION")}`,this.initializeInjectionContainer(),this.postCacheInit(),this.timeManager=this.gameContainer.get("a03-308f"),this.metricsManager=this.gameContainer.get("2a1-fed9"),this.urlProvider=this.gameContainer.get("be9-3278"),this.game.versioned=window.location.href.indexOf("feature")>-1||window.location.href.indexOf("release")>-1,this.game.clientVersion=this.game.versioned?"undefined":Tn.J.validateVersion(Vt.s.get("GameConstants.Build.VERSION"));const B=new ye.W(this.game);this.gameContainer.get("e20-0fb0").initialize(B),this.breadcrumbManager=this.gameContainer.get("12f-4e29"),this.breadcrumbManager.init(B.state,new At.C),this.assets=this.gameContainer.get("c9c-9511"),this.load=this.gameContainer.get("aa9-c54b"),this.audio=new Jn.R(k),this.battle=new wa(k,this.metricsManager),this.achievements=this.gameContainer.get("b07-2890"),this.colorReplaceController=new Aa.m(k),this.notifications=new rr(k),this.classModeController=new Sa,this.effects=this.gameContainer.get("6b2-06ce"),this.open=new Xu(k),this.prefabFactory=new vf(k),this.event=new Po(k),this.dialogue=new Io(k),this.education=new Fo(k),this.skin=new aT(k),this.create=new go(k),this.icon=new Wo(k),this.animation=new pb(k),this.attacks=new ue,this.mailNetworkHandler=new _w(k),this.friendsListNetworkHandler=new pw(k),this.titansNetworkHandler=new Dw(k),this.world=new WR(k,this.metricsManager),this.dialogues=new fe(k),this.hints=new pe.R,this.game.broadcaster.addAppListener(oi.AU.PlayerInitialized,(()=>{this.initializeBreadcrumbs(),this.game.broadcaster.removeAppListener(oi.AU.PlayerInitialized,this)}),this,null,!0);const U=k=>{try{this.game.broadcaster.broadcast(oi.bS.POST_MESSAGE_RECEIVED,this.game,[k.origin,JSON.parse(k.data)])}catch(e){}};if(Pt.pF.isNativeApp()){Pt.pF.isNativeIOSApp()||Pt.pF.isNativeAndroidApp()&&Pt.pF.eligibleVersionForMobileMembershipPurchase()?window.addEventListener("message",U):document.addEventListener("message",U);["log","error","info","debug","warn"].forEach((k=>{console[k]=B=>{const U={logType:k,message:B},F=JSON.stringify({type:"LOG_MESSAGE",payload:U});window.postMessage(F,window.location.origin)}}))}else window.addEventListener("message",U);const F=[`%c ♥ Prodigy Game v${this.version} ♥ `,"color: #FFFFFF; background: #1484a3"];console.log.apply(console,F)}init(){j.VyI.setLogLevel(Vt.s.get("GameConstants.Build.FRAMEWORK_LOG_LEVEL"));const k=this.game.width,B=this.game.height;this.textureBelow=this.game.add.renderTexture(k,B),this.textureAbove=this.game.add.renderTexture(k,B),this.textureMenu=this.game.add.renderTexture(k,B),this.previousNow=this.game.time.timeMS}update(){this.updateCount++,this.game.broadcaster.broadcast(oi.AU.Update,this.game,null)}cleanup(){this.open.cleanup(),this.game.broadcaster.clear()}bindToAlias(k,B){for(const U of B)this.gameContainer.bind(k).toDynamicValue((k=>k.get(U)))}start(k,B={},U=null){if(B.target=k,B.assets=$.get(B,"assets",[]),B.assets=B.assets.concat(this.game.state.get(k).assets),this.game.state.get(k).screenData=U,this.game.state.get(this.game.state.current)instanceof gf.f)if(this.game.state.get(this.game.state.current).fadeOut(B.fadeOut,this.game.state.get(Ie.G.Loading).startLoading.bind(this.game.state.get(Ie.G.Loading),B)),k===Ie.G.TileScreen){const k={mapName:B.title};this.metricsManager.createLoadingMetricEvent(Sn.o.FunnelTileScreen,Sn.o.StageLoadStart,!1,k)}else k===Ie.G.CharSelect&&this.metricsManager.createLoadingMetricEvent(Sn.o.FunnelCharSelect,Sn.o.StageLoadStart);else this.game.state.get(Ie.G.Loading).startLoading(B)}startCoOp(k){const B=[Ut.E.getTitanSpine(k.titanAssetID),q._.Boss_titan_barrier_json,q._.Boss_titan_barrier_break_json,q._.Boss_titan_spark_json,J.Q.Spine_academy_window_light_horizontal_json,Z.c.Sfx_bar_fill,Z.c.Sfx_results_screen,Z.c.Sfx_battle,X.V.Bgm_victory,X.V.Bgm_battle,...k.battleMap,J.Q.Spine_coop_multi1_json,J.Q.Spine_coop_single1_json,J.Q.Spine_coop_crystal_json,Ut.E.getIconForType("currency",11),"ui-shared",J.Q.Spine_xpbar_json,J.Q.Spine_character_shine_json,q._.General_battle_json,q._.General_core_json,q._.Font_battle_json,q._.Ui_bam_json,Z.c.Sfx_house_intro];pn.K.cacheAssets(this.game,B,pn.K.zoneAssetsCached),this.game.state.get(Ie.G.Loading).startLoading({assets:B,target:Ie.G.CoOp,autoStart:!1,callback:()=>{this.game.state.start(Ie.G.CoOp,!1,k)}})}startPrefabScene(k,B={}){this.game.state.start(Ie.G.PrefabScene,!0,Object.assign(Object.assign({},B),{prefabIDs:k}))}loading(k,B=!1){k?(j.Aq$.isDefined(this.spinner)&&!this.spinner[ur.k.DESTROYED]||(this.spinner=this.create.sprite(640,360,q._.General_core_json,"loading"),this.game.broadcaster.broadcast(oi.lc.AddChild,this.game,[this.spinner,vh.E.OverlayLayer])),B&&!j.Aq$.isDefined(this._inputBlocker)&&(this._inputBlocker=this.create.emptySprite(640,360,this.game.width,this.game.height),this.game.broadcaster.broadcast(oi.lc.AddChild,this.game,[this._inputBlocker,vh.E.OverlayLayer]),this._inputBlocker.anchor.set(.5,.5),this._inputBlocker.alpha=0,this._inputBlocker.inputEnabled=!0),this.spinner.alpha=1,this.spinner.anchor.set(.5,.5),this.game.add.tween(this.spinner,this.spinner).to({angle:360},1500,j.GS3.Linear.None,!0,0,Vt.s.MAX_SAFE_INTEGER,!1),this.game.add.tween(this.spinner,this.spinner).to({alpha:1},500,j.GS3.Linear.None,!0,300)):(j.Aq$.isDefined(this.spinner)&&(this.game.tweens.removeAllFromOwner(this.spinner),this.spinner.destroy(),this.spinner=null),j.Aq$.isDefined(this._inputBlocker)&&(this._inputBlocker.destroy(),this._inputBlocker=null))}initializeBreadcrumbs(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.breadcrumbManager.init(k.state,new At.C)}initializeInjectionContainer(){this.gameContainer.bind("51c-03a0").toConstantValue(this.game),this.gameContainer.bind(j.t5G.FrameWorkManager).toConstantValue(this.game.frameWorkManager),this.gameContainer.bind(j.$Bt.LocalizationService).to(j.Oap).asSingleton(),this.gameContainer.bind("80c-6fa4").to(He).asSingleton(),this.gameContainer.bind("11d-01b8").to(KE).asSingleton(),this.gameContainer.bind("6b2-06ce").to(Do.M).asSingleton(),this.gameContainer.bind("6a1-4b92").to(gb).asSingleton(),this.gameContainer.bind("be9-3278").to(re.p).asSingleton(),this.gameContainer.bind("c9c-9511").to(de.s).asSingleton(),this.gameContainer.bind("aa9-c54b").to(QR.a).asSingleton();const k=this.gameContainer.resolve(j.zL);k.init(this.gameContainer.sourceContainer),this.gameContainer.bind(j.$Bt.IFSMController).to(j.rPI).asSingleton(),this.gameContainer.bind(j.$Bt.FSMFactories).toConstantValue(k),this.gameContainer.bind(j.$Bt.FSMService).to(j.CQn).asSingleton(),this.gameContainer.bind(j.$Bt.FSMDataProvider).to(hb).asSingleton(),this.gameContainer.bind(F.CacheExpirationStrategy).to(St),this.gameContainer.bind(F.CacheStorageStrategy).to(Tt),this.gameContainer.bind(F.StoreDataProvider).to(Yt).asSingleton(),this.gameContainer.get(F.CacheExpirationStrategy).setExpiryTimeInMinutes(5),this.gameContainer.bind("8c1-3c93").to(fb.S).asSingleton(),this.gameContainer.bind("a50-726e").to(wt).asSingleton(),this.gameContainer.bind("a03-308f").to(ne.V).asSingleton(),this.gameContainer.bind("2a1-fed9").to(Af.U).asSingleton(),this.gameContainer.bind("afa-b7c5").to(Sf).asSingleton(),this.gameContainer.bind("330-3c25").to(ae).asSingleton(),this.gameContainer.bind("f7c-2e57").to(xw).asSingleton(),this.gameContainer.bind("aaa-9186").to(ct).asSingleton(),this.gameContainer.bind(F.DungeonDataProvider).to(_i).asSingleton(),this.gameContainer.bind("84d-05d4").to(Di.I).asSingleton(),this.gameContainer.bind("b5b-6fa4").to(Ca.Z).asSingleton(),this.gameContainer.bind("c97-bd0d").to(qd.I).asSingleton(),this.gameContainer.bind("40f-f847").to(Bo).asSingleton(),this.gameContainer.bind("8bb-7057").to(YE.K).asSingleton(),this.gameContainer.bind("313-bcd5").to(Mw.u).asSingleton(),this.gameContainer.get("313-bcd5").init(),this.gameContainer.bind("23d-f8f6").to(Nw.F).asSingleton(),this.gameContainer.bind("a6a-6157").to(Ns.$).asSingleton(),this.gameContainer.bind("e50-b09b").to(Ds).asSingleton(),this.gameContainer.bind("f91-8211").to(Ps.k).asSingleton(),this.gameContainer.bind("d65-d7bb").to(Ss.n).asSingleton(),this.gameContainer.bind("8dc-04eb").to(Es.R).asSingleton(),this.gameContainer.bind("4ba-bb34").to(si).asSingleton(),this.gameContainer.bind("615-fbad").to(Gi.p).asSingleton(),this.gameContainer.bind("b26-31af").to(Xe.k).asSingleton(),this.gameContainer.bind("4fd-fef7").to(Ct.v).asSingleton(),this.gameContainer.bind("23e-f53d").to(ji.C).asSingleton(),this.gameContainer.bind("0f1-c356").to(nw).asSingleton(),this.gameContainer.bind("173-db8a").to(lw).asSingleton(),this.gameContainer.bind("e5b-e931").to(Wi.e).asSingleton(),this.gameContainer.bind("62e-110e").to(li.g).asSingleton(),this.gameContainer.bind("097-a053").to(Yi.S).asSingleton(),this.gameContainer.bind("358-48b9").to(Ki.C).asSingleton(),this.gameContainer.bind("f32-d326").to(Sw.Y).asSingleton(),this.gameContainer.bind("8b9-bad1").to(es.n).asSingleton(),this.gameContainer.bind("a71-dfcf").to(ws.k).asSingleton(),this.gameContainer.bind("cfe-9c2c").to(qi.K).asSingleton(),this.gameContainer.bind("7a1-ff33").to(Ot.s).asSingleton(),this.gameContainer.bind("99d-5e9e").to(Ts.q).asSingleton(),this.gameContainer.bind("a25-68f4").to(As.n).asSingleton(),this.gameContainer.bind("43a-6f08").to(Cs.C).asSingleton(),this.gameContainer.bind("b73-c131").to(ks.X).asSingleton(),this.gameContainer.bind("54c-b7de").to(Qs.O).asSingleton(),this.gameContainer.bind("88d-8cb1").to(Xs.V).asSingleton();const B=new j.rrh;B.parent=this.gameContainer,B.bind("a6a-6157").to(_s).asSingleton(),B.bind("a78-11c7").toDynamicValue((()=>{const k=K.q.instance.prodigy.world.getCurrentZone(),B=Ms.n[k];if(B)return this.gameContainer.get(B.injectionKey)})),Object.entries(Ms.n).forEach((([k,{injectionKey:U,manager:F}])=>{B.bind(U).to(F).asSingleton(),this.gameContainer.bind(U).toDynamicValue((()=>B.get(U))).asSingleton()})),this.bindToAlias(Xi._,["4ba-bb34","615-fbad","99d-5e9e"]),this.gameContainer.bind("47d-8c3c").to($a).asSingleton(),this.gameContainer.bind("dcf-fcf7").to(ka).asSingleton(),this.gameContainer.bind("537-28ff").to(Ha).asSingleton(),this.gameContainer.bind("537-28ff").to(Ga).asSingleton(),this.gameContainer.bind("537-28ff").to(Fa).asSingleton(),this.gameContainer.bind("537-28ff").to(Va).asSingleton(),this.gameContainer.bind("537-28ff").to(Wa).asSingleton(),this.gameContainer.bind("537-28ff").to(qa).asSingleton(),this.gameContainer.bind("880-55b2").to(vb),this.gameContainer.bind("33a-f3ca").to(j.xTJ),this.gameContainer.bind("e2e-64d8").to(j.xTJ).asSingleton(),this.gameContainer.bind("03c-6e1e").to(j.xTJ).asSingleton(),this.gameContainer.bind("2e6-0f71").to(on.H).asSingleton(),this.gameContainer.bind("e20-0fb0").to(Wt.E).asSingleton(),this.gameContainer.bind("306-5359").toDynamicValue((()=>this.gameContainer.get("e20-0fb0").player)),this.gameContainer.bind("f1d-f7b1").to(Qt.W).asSingleton(),this.gameContainer.bind("f51-26f1").toConstantValue(new Bt.C),this.gameContainer.bind("3a0-8003").to(_e.F).asSingleton(),this.gameContainer.bind("c47-20b6").to(Ge.Y).asSingleton(),this.gameContainer.bind("b07-2890").to(Zn).asSingleton(),this.gameContainer.bind("b50-4670").to(fi).asSingleton(),this.gameContainer.bind("a05-0e85").to(yi),this.gameContainer.bind("d16-1cb5").to(Ii),this.gameContainer.bind("eb9-3fdf").to(be.g).asSingleton(),this.gameContainer.bind("535-27b9").to(gw).asSingleton(),this.gameContainer.bind("140-ca43").to(tw).asSingleton(),this.gameContainer.bind("438-fe2f").to(sw).asSingleton(),this.gameContainer.bind("438-fe2f").to(JE).asSingleton(),this.gameContainer.bind("438-fe2f").to(iw).asSingleton(),this.gameContainer.bind("438-fe2f").to(ew).asSingleton(),this.gameContainer.bind("1f0-d3d9").to(dt.x).asSingleton(),this.gameContainer.bind("d77-66fb").to(cb.Z).asSingleton(),this.gameContainer.bind("2e2-6ee6").to(Da).asSingleton(),this.gameContainer.bind("3b1-0a3d").to(Na).asSingleton(),this.gameContainer.bind("e59-eea6").to(bb),this.gameContainer.bind(j.t5G.PrefabService).to(j.iNH).asSingleton(),this.gameContainer.bind(j.t5G.PrefabDataProvider).to(sn).asSingleton(),this.gameContainer.bind("d0e-64fd").toConstantValue(new j.wNP(this.gameContainer)),this.gameContainer.bind("b2a-9519").to(Ee.S).asSingleton(),this.gameContainer.bind("db5-fb6e").to(ob).asSingleton(),this.gameContainer.bind("12f-4e29").to(xo.F).asSingleton(),this.gameContainer.bind("30a-d191").toConstantValue(le.t),this.gameContainer.bind("30b-3020").to(j.myN).asSingleton(),this.gameContainer.bind("779-a746").to(Ue.d).asSingleton(),this.gameContainer.bind("636-444c").to(Ye).asSingleton(),this.gameContainer.bind("8ca-a222").to(j.xTJ).asSingleton(),this.gameContainer.bind("ba8-cb5e").to(Le).asSingleton(),this.gameContainer.get("30b-3020").setBaseURI(this.gameContainer.get("be9-3278").getAPIRootUrl()),this.gameContainer.bind("fab-547a").to(zE.O).asSingleton(),this.gameContainer.bind("efb-f022").to(qe).asSingleton(),this.gameContainer.bind("200-7dc0").to(Ys.m).asSingleton(),this.gameContainer.bind("2fb-aa75").to(Fs.u).asSingleton(),this.gameContainer.bind("737-e070").to(Ae).asSingleton(),this.gameContainer.bind("935-4e8b").to(Gs.T).asSingleton(),this.gameContainer.bind("12b-405a").to(Qe.n).asSingleton(),this.gameContainer.bind("7d7-b2cc").to(ce).asSingleton(),this.gameContainer.bind("00d-b27e").to(nn.X).asSingleton(),this.gameContainer.bind("bbf-3165").to(Ls).asSingleton(),this.gameContainer.bind("580-3bea").to(db.b).asSingleton(),this.gameContainer.bind("fa6-b1fc").to(is.m).asSingleton(),this.gameContainer.bind("c35-2f95").to(ww).asSingleton(),this.gameContainer.bind(Ji.Y).to(Ji.F).asSingleton(),this.gameContainer.bind("d1f-4da3").to(Ht.h).asSingleton(),Cf.T.ready.then((()=>{const k=$i.A.useRevisedDifficulty?jt:$t;this.gameContainer.bind("cd4-b78f").to(k).asSingleton()})),this.gameContainer.bind("df9-0276").to(Ri.p).asSingleton(),this.gameContainer.bind("af7-15ba").to(Ui.p).asSingleton(),this.gameContainer.bind("074-dd58").to(Bi).asSingleton(),this.bindToAlias(Fi.A,["af7-15ba","074-dd58"]),this.gameContainer.bind("b1f-9a70").to(Vi.x).asSingleton(),this.gameContainer.bind("639-22b8").to(ow.e).asSingleton(),this.gameContainer.bind("ce9-b630").to(dw).asSingleton(),this.gameContainer.bind("56f-1ccb").to(aw).asSingleton(),this.gameContainer.bind("1e8-b306").to(Tw.L).asSingleton(),this.gameContainer.bind("d69-defe").to(ts.q).asSingleton(),this.gameContainer.bind("2a4-9266").to(Aw).asSingleton(),this.gameContainer.bind("eee-e872").to(qs.U).asSingleton(),this.gameContainer.bind("a02-c2b2").to(Ws.D).asSingleton(),this.gameContainer.bind("8f8-d5bc").to(Cw.B).asSingleton(),this.gameContainer.bind("9ac-9677").to(Bs.M).asSingleton(),this.gameContainer.bind("196-d3a5").to(Us.Q).asSingleton(),this.gameContainer.bind("743-fd51").to(Tl.E).asSingleton(),this.gameContainer.bind("231-9111").to(vw.b).asSingleton(),this.gameContainer.bind("5c7-e02d").to(Hi.W).asSingleton(),this.gameContainer.bind("61f-37d6").to(Vs.U).asSingleton(),this.gameContainer.bind("f45-d827").to($s).asSingleton(),this.gameContainer.bind(Hs.T).to(Hs.T).asSingleton(),this.gameContainer.bind("9ea-3f44").to(cw.v),this.gameContainer.bind("152-d9b2").to(Pw.J),this.gameContainer.bind("295-41dc").to(Lt.o).asSingleton(),this.gameContainer.bind("e03-b0a9").to(Zi.x).asSingleton(),this.gameContainer.bind("ba4-af03").to(rw).asSingleton(),this.gameContainer.bind("5dd-7e25").to(ci).asSingleton(),this.gameContainer.bind("def-6d14").to(Iw).asSingleton(),this.gameContainer.bind("b94-d1b1").to(kt.j).asSingleton(),this.gameContainer.bind("6e9-d1dd").to(Js.W).asSingleton(),this.gameContainer.bind("b58-8066").to(tn.z).asSingleton(),this.gameContainer.get("b58-8066").initListeners(),this.bindToAlias(Se.Gq,["61f-37d6","9ac-9677","8b9-bad1","737-e070","5dd-7e25","098-b402"]),this.gameContainer.bind("48b-b777").to(Se.zj).asSingleton(),this.gameContainer.bind("fc2-cb0a").toConstantValue(new xs.w),this.gameContainer.bind("446-72a7").to(lb._).asSingleton(),this.gameContainer.bind("091-489f").to(ub.J).asSingleton(),this.gameContainer.bind("cc9-a3f0").to(It.W).asSingleton(),this.gameContainer.bind("0f9-dd7b").to(Ks.v).asSingleton(),this.gameContainer.bind("a96-1470").to(Ow.E).asSingleton(),this.gameContainer.bind("a94-4ba3").to(zs.z).asSingleton(),this.gameContainer.bind(Q.SpellLevelDataProvider).to(ge).asSingleton(),this.gameContainer.bind("98d-7b90").to(Q.SpellLevelBonusConstants).asSingleton(),this.gameContainer.bind("e9c-fde5").to(Qi.Z).asSingleton(),this.gameContainer.bind("dce-fce4").to(Te.Z).asSingleton(),this.gameContainer.bind("2a3-4b97").to(xt.Z).asSingleton(),this.gameContainer.bind("e94-c727").to(we.e).asSingleton(),this.gameContainer.bind("4fc-916d").to(Zs.C).asSingleton(),this.gameContainer.bind("7c8-742f").to(Rw.j).asSingleton(),this.gameContainer.bind("e67-6525").to(hw).asSingleton(),this.gameContainer.bind("098-b402").to(ui.m).asSingleton(),this.gameContainer.bind("525-1c48").to(uw.W).asSingleton(),this.gameContainer.bind("a2e-a635").to(Mi.J).asSingleton(),Pt.pF.isNativeApp()?this.gameContainer.bind("5a6-53a5").to(Mt).asSingleton():this.gameContainer.bind("5a6-53a5").to(Nt).asSingleton();try{(new zi.k).installBindings()}catch(e){j.VyI.log(e,j.$bb.Error)}}postCacheInit(){this.gameContainer.bind("05c-8928").toConstantValue(this.game.cache),this.gameContainer.bind(j.t5G.AssetLoader).to(XR.A).asSingleton(),this.gameContainer.bind("784-6416").to(YR).asSingleton(),this.gameContainer.bind("142-6aaf").to(Oo).asSingleton()}}var JR=U(19850);class tP extends Ar.H{constructor(k,B,U,F){super(k,B,U,F),this.robot=null,this.robot=this.add(K.q.instance.prodigy.create.sprite(-100,-200,q._.Game_dancedance_json,"pose1-1",void 0,this.onTextureLoaded.bind(this))),this.setPose(-3)}onTextureLoaded(k){k&&(k.animations.add("-3",["pose2-1"],1,!0,!1),k.animations.add("-2",["poseSuccess"],1,!0,!1),k.animations.add("-1",["poseFail"],1,!0,!1),k.animations.add("0",["pose0-1","pose0-2"],1,!0,!1),k.animations.add("1",["pose1-1","pose1-2"],1,!0,!1),k.animations.add("2",["pose2-1","pose2-2"],1,!0,!1),k.animations.add("3",["pose3-1","pose3-2"],1,!0,!1),k.animations.add("4",["pose4-1","pose4-2"],1,!0,!1),k.animations.add("5",["pose5-1","pose5-2"],1,!0,!1),k.animations.add("6",["pose6-1","pose6-2"],1,!0,!1),k.animations.add("7",["pose7-1","pose7-2"],1,!0,!1),k.animations.add("8",["pose8-1","pose8-2"],1,!0,!1),k.animations.add("9",["pose9-1","pose9-2"],1,!0,!1))}setPose(k){this.robot.animations.play(`${k}`,2.15,!0),-1===k&&this.game.add.tween(this.robot,this).to({x:-105},100,j.GS3.Linear.None).to({x:-95},100,j.GS3.Linear.None).to({x:-105},100,j.GS3.Linear.None).to({x:-95},100,j.GS3.Linear.None).to({x:-105},100,j.GS3.Linear.None).to({x:-95},100,j.GS3.Linear.None).to({x:-100},100,j.GS3.Linear.None).start(),-2===k&&this.game.add.tween(this.robot,this).to({y:-230},250,j.GS3.Linear.None,!0,0,1,!0)}}class eP extends Ar.H{constructor(k,B,U,F,G){super(k,B),this.startCallback=null,this.instructionsCallback=null,this.cancelCallback=null,this.menu=null,this.yes=null,this.difficulty=null,this.startCallback=U,this.cancelCallback=G,this.instructionsCallback=F;const j=this.add(K.q.instance.prodigy.create.sprite(0,0,q._.General_core_json,"overlay-small"));j.alpha=.5,j.width=this.game.width,j.height=this.game.height;K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("key",2)>0?this.createMenu():this.giveItem()}giveItem(){const k=K.q.instance.prodigy.dialogue.create();k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_GET_ROBOT_0"),face:4,anim:4}),k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_GET_ROBOT_1"),face:2}),k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_GET_ROBOT_2"),face:1,audio:{tag:Z.c.Voice_0,s:8,d:2}}),k.setText({callback:()=>{K.q.instance.prodigy.open.gotItem([{type:"key",ID:2,lvl:1}],(()=>{const k=K.q.instance.prodigy.dialogue.create();k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_GET_ROBOT_3"),face:1}),k.setText({callback:()=>{this.createMenu()}}),k.startDeprecated("boombox")}))}}),k.startDeprecated("boombox")}createMenu(){j.Aq$.isDefined(this.menu)&&this.menu.destroy(),this.menu=K.q.instance.prodigy.create.element(this,465,220),K.q.instance.prodigy.create.panel(this.menu,0,0,7,5),K.q.instance.prodigy.create.textButton(this.menu,25,20,{size:fo.MED,icon:{type:"key",ID:2},text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MINI_GAME_BUTTON_START")},(()=>{this.createDifficulty()})),K.q.instance.prodigy.create.textButton(this.menu,25,100,{size:fo.MED,icon:"star",text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MINI_GAME_BUTTON_HOW_TO")},(()=>{this.instructionsCallback()})),K.q.instance.prodigy.create.textButton(this.menu,25,180,{size:fo.MED,icon:"back",text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MINI_GAME_BUTTON_CANCEL")},(()=>{this.cancelCallback()}))}createDifficulty(){const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;j.Aq$.isDefined(this.menu)&&this.menu.destroy(),this.menu=K.q.instance.prodigy.create.element(this,390,220);let U=B.backpack.getKeyItemData(2,"lvl");j.Aq$.isDefined(U)||(U=1),K.q.instance.prodigy.create.panel(this.menu,0,0,10,6),K.q.instance.prodigy.create.font(this.menu,110,20,k.getText("DANCE_DANCE_CHOOSE_DIFFICULTY"),{size:36,fontID:9}),K.q.instance.prodigy.create.font(this.menu,110,60,k.getText("DANCE_DANCE_HIGHER_LEVEL")),this.menu.add(K.q.instance.prodigy.create.sprite(10,10,Ut.E.getIconForType("key",2)));for(let F=0;F<5;F++){const B=90*F+30;U>=F+1?K.q.instance.prodigy.create.stackButton(this.menu,B,110,[{tag:"star2"},{text:`${F+1}`,y:20,size:30}],(()=>{this.chooseDifficulty(F+1)})):K.q.instance.prodigy.create.stackButton(this.menu,B,110,[{tag:"empty",x:15,y:15},{text:`${F+1}`,y:20,size:30}],(()=>{K.q.instance.prodigy.open.message(k.getText("DANCE_DANCE_MESSAGE_LEVEL_BODY"),null,null,k.getText("MESSAGE_TITLE_UH_OH"))}))}K.q.instance.prodigy.create.textButton(this.menu,40,230,{size:fo.SMALL,icon:"back",text:k.getText("DANCE_DANCE_BUTTON_BACK")},(()=>{this.createMenu()})),K.q.instance.prodigy.create.textButton(this.menu,260,230,{size:fo.SMALL,icon:"yes",text:k.getText("DANCE_DANCE_BUTTON_GO")},(()=>{this.tryStart()})),this.yes=this.menu.add(K.q.instance.prodigy.create.sprite(0,170,q._.General_icons_json,"yes")),this.yes.width=this.yes.height=25,this.chooseDifficulty(Math.min(U,5))}chooseDifficulty(k){this.difficulty=k,this.yes.x=90*k-10}tryStart(){j.Aq$.isDefined(this.menu)&&this.menu.destroy();const k=K.q.instance.prodigy.dialogue.create();k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_READY_TO_START"),face:4,yes:this.openBoosts.bind(this,200),no:this.createMenu.bind(this),type:Ti.fA.START}),k.startDeprecated("boombox")}openBoosts(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!j.Aq$.isDefined(k)||B.getGold()>=k){if(j.Aq$.isDefined(k)){B.changeGold(-k);const U=K.q.instance.prodigy.gameContainer.get("c47-20b6");U.economy.sendMinigameEvent("dance-dance",!0);const F={item_id:"0",item_name:"Gold",item_type:"currency",item_count:k,instance_type:Ai.N.Interface,instance_id:""};U.item.sendItemRemovedEvent(0,F.item_name,F.item_type,F.item_count,{sink_id:U.economy.getCurrentMinigameInstanceID(),sink_type:gn.C.MiniGame,instance_type:Ai.N.Interface,instance_id:""})}const U=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),F=[{icon:{type:"item",ID:47},d:U.getText("BOOST_DESCRIPTION_MORE_GEARS")},{icon:{type:"fossil",ID:1},d:U.getText("BOOST_DESCRIPTION_SLOW_TIME")},{icon:"star2",d:U.getText("BOOST_DESCRIPTION_MULTIPLIER")}];K.q.instance.prodigy.open.boostSelect(F,(k=>{this.startCallback(this.difficulty,k)}))}else{const k=K.q.instance.prodigy.dialogue.create();k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MINI_GAME_NOT_ENOUGH_GOLD"),face:3,anim:1,audio:{tag:Z.c.Voice_0,s:10,d:2}}),k.setText({callback:()=>{this.createMenu()}}),k.startDeprecated("boombox")}}}class iP extends Ar.H{constructor(k,B,U,F,G){super(k,B,U,F),this.currentPose=1,this._isDancePoseShown=!0,this.onSelect=null,this.frame=null,this.sprite=null,this.currentTint=14080234,this.onSelect=G,this.frame=this.add(K.q.instance.prodigy.create.sprite(0,0,q._.Game_dancedance_json,"pose-card")),this.frame.events.onInputDown.add(this.select.bind(this)),this.sprite=this.add(K.q.instance.prodigy.create.sprite(10,10,q._.Game_dancedance_json,"card0")),this.sprite.width=0,this.sprite.x=50,this.sprite.alpha=.9}randomPose(k,B){const U=k<3?4:3===k?6:4===k?8:10;this.currentTint=14080234;for(let F=0;F<100;F++){this.currentPose=Math.floor(Math.random()*U),this.currentTint=iP.TINTS[Math.floor(Math.random()*iP.TINTS.length)];let k=!1;for(let U=0;U{this.frame.inputEnabled=!0}),this),k.start()}equals(k){return j.Aq$.isDefined(k)&&(k.currentPose===this.currentPose||k.currentTint===this.currentTint&&14080234!==k.currentTint)}select(){j.Aq$.isDefined(this.onSelect)&&(K.q.instance.prodigy.audio.playSFX(18,"pop"),this.onSelect(),this.frame.y=-15,this.sprite.y=-5)}}iP.TINTS=[14254209,9946096,8444311,16755318,15788439,13080560];class sP extends Ar.H{constructor(k,B,U,F){super(k,B,U,F),this.pose=null,this.bar1=null,this.bar2=null,this.callback=null,this.startTime=null,this.targetTime=null,this.pose=new iP(this.game,this,0,0),this.pose.flip(),this.bar1=this.add(K.q.instance.prodigy.create.sprite(0,34,q._.General_core_json,"overlay-light")),this.bar1.anchor.set(1,0),this.bar2=this.add(K.q.instance.prodigy.create.sprite(100,34,q._.General_core_json,"overlay-light")),this.bar1.height=this.bar2.height=30,this.bar1.width=this.bar2.width=244,this.bar1.alpha=this.bar2.alpha=.7,this.bar1.tint=this.bar2.tint=8768643}start(k,B,U){this.pose.randomPose(k,[]),this.callback=U;let F=2.5-.35*(k-1);F+=B,F*=1e3,this.bar1.width=this.bar2.width=244;const G=this.game.add.tween(this.pose,this).to({y:-10},250,j.GS3.Quadratic.Out).to({y:0},250,j.GS3.Quadratic.In);return G.onTweenComplete.addOnce(this.beginTimer.bind(this,F),this),G.start(),this.pose}update(){if(super.update(),j.Aq$.isDefined(this.bar1)&&j.Aq$.isDefined(this.bar2)&&j.Aq$.isDefined(this.targetTime)){const k=(new Date).getTime();if(k>=this.targetTime)this.bar1.width=this.bar2.width=0,this.targetTime=null,this.callback();else{const B=(this.targetTime-k)/(this.targetTime-this.startTime),U=Math.floor(244*B);this.bar1.width=this.bar2.width=U}}}beginTimer(k){this.startTime=(new Date).getTime(),this.targetTime=(new Date).getTime()+k}}class nP extends gf.f{constructor(){super("The Stage",q._.Game_dancedance_json,[q._.Game_dancedance_json,X.V.Bgm_dance1,X.V.Bgm_dance2,Z.c.Sfx_dance_dance]),this.startedSpeed=!1,this.danceBots=[],this.menu=null,this.timer=null,this.gearBar=null,this.bonusBar=null,this.scoreText=null,this.highScoreText=null,this.multiplier=null,this.gearBonus=null,this.maxMultiplier=null,this.speedOffset=null,this.currentScore=0,this.startTime=null,this.finishTime=null,this.speedTime=null,this.timeDelay=null,this.poses=[],this.processLightEvent=null,this.difficulty=null,this.poseContainer=null,this.correctPose=null,this.correct=null,this.answerID=null,this.lights=null}create(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;K.q.instance.prodigy.audio.pauseBGM(),k.saveEnabled=!1,super.create([q._.Game_dancedance_json,X.V.Bgm_dance1,X.V.Bgm_dance2])}screenSetup(){super.screenSetup(),this.background.addChild(K.q.instance.prodigy.create.sprite(0,0,q._.Game_dancedance_json,"bg")),this.danceBots=[],this.danceBots.push(new tP(this.prodigyGame,this.content,260,285)),this.danceBots.push(new tP(this.prodigyGame,this.content,640,420)),this.danceBots.push(new tP(this.prodigyGame,this.content,1030,285)),this.danceBots[0].scale.x=this.danceBots[0].scale.y=.5,this.danceBots[2].scale.x=this.danceBots[2].scale.y=.5,this.danceBots[0].setPose(1),this.danceBots[2].setPose(1),this.menu=new eP(this.prodigyGame,this.content,((k,B)=>{this.startGame(k,B)}),(()=>{this.showInstructions()}),(()=>{this.returnToLamplight()}))}shutdown(){this.prodigyGame.time.events.remove(this.processLightEvent),this.danceBots=[],this.menu=null,this.timer=null,this.gearBar=null,this.bonusBar=null,this.scoreText=null,this.highScoreText=null,this.poses=[],this.processLightEvent=null,this.lights=null,super.shutdown()}showInstructions(){this.menu.visible=!1;const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),B=K.q.instance.prodigy.dialogue.create();B.setText({text:k.getText("DANCE_DANCE_INSTRUCTIONS_0"),face:0,anim:4}),B.setText({text:k.getText("DANCE_DANCE_INSTRUCTIONS_1"),face:1,anim:0}),B.setText({text:k.getText("DANCE_DANCE_INSTRUCTIONS_2"),face:2,anim:0}),B.setText({callback:()=>{this.menu.visible=!0}}),B.startDeprecated("boombox")}createUI(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.timer=new sP(this.prodigyGame,this.content,590,30),this.gearBar=K.q.instance.prodigy.create.fillBar(this.content,65,415,34,250,1,(k=>{let B=50;for(let U=2;U<=k;U++)B+=Math.max(0,Math.floor(U/9*5*100));return k>=10&&(B=-1),{target:B,text:`${k}`}}),15975263,"star2",.7,!0);const U=B.backpack.getKeyItemData(2,"gears");this.gearBar.setValue(j.Aq$.isDefined(U)?U:0);const F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this.bonusBar=K.q.instance.prodigy.create.fillBar(this.content,1181,415,34,250,1,(B=>{let U=15975263,G=Math.max(0,5*B);return B>=k&&(G=-1),B<=1&&(U=15157320),{target:G,color:U,text:B<=1?F.getText("DANCE_DANCE_UH_OH"):"x"+(B-1)}}),15314234,{type:"item",ID:47},.7,!0,(k=>{this.setMultiplier(k)})),this.bonusBar.setValue(5);const G=K.q.instance.prodigy.create.element(this.content,20,20);G.addChild(new ur.k(K.q.instance.game,0,0,Ut.E.getIconForType("item",47),null)),this.scoreText=K.q.instance.prodigy.create.font(G,80,0,"0",{size:36,fontID:9});const $=B.backpack.getKeyItemData(2,"score"),H=K.q.instance.prodigy.create.element(this.content,this.game.width-300-20,20);H.addChild(new ur.k(K.q.instance.game,220,0,Ut.E.getIconForType("item",47),null)),this.highScoreText=K.q.instance.prodigy.create.font(H,0,0,`${j.Aq$.isDefined($)?$:0}`,{size:36,fontID:9,align:"center",width:300}),K.q.instance.prodigy.create.font(H,0,40,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_BEST_SCORE"),{size:16,width:220,align:"right"})}setMultiplier(k){k>1?K.q.instance.prodigy.audio.playSFX(11,"yay"):j.Aq$.isDefined(this.multiplier)&&this.multiplier!==k&&K.q.instance.prodigy.audio.playSFX(11,"aw"),this.multiplier=k}startGame(k,B){this.menu.visible=!1,this.gearBonus=0===B?1:0,this.speedOffset=1===B?.25:0,this.maxMultiplier=2===B?5:4,this.createUI(this.maxMultiplier),this.processLightEvent=this.prodigyGame.time.events.loop(500,this.processLights,this,[]),this.startTime=(new Date).getTime(),this.finishTime=this.startTime+7e4,this.speedTime=this.startTime+4e4,this.timeDelay=1500,this.currentScore=0,this.setDifficulty(k),K.q.instance.prodigy.audio.playBGM(6,!0),K.q.instance.prodigy.audio.playSFX(11,"ready"),K.q.instance.prodigy.effects.flashText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_READY"),(()=>{K.q.instance.prodigy.audio.playSFX(11,"go"),K.q.instance.prodigy.effects.flashText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_START")),this.nextPose()}))}endGame(k){this.timer.visible=!1;for(let B=0;B{this.finalize(k)}))}finalize(k){const B=K.q.instance.prodigy.dialogue.create(),U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(k){const k=U.backpack.getKeyItemData(2,"score");(!j.Aq$.isDefined(k)||k1?B.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_LOWER_DIFFICULTY"),face:3,audio:{tag:Z.c.Voice_0,s:10,d:2}}):B.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_TRY_AGAIN"),face:3,audio:{tag:Z.c.Voice_0,s:10,d:2}}),B.setText({callback:()=>{this.returnToLamplight()}});B.startDeprecated("boombox")}finishFill(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=k.backpack.getKeyItemData(2,"lvl"),U=this.gearBar.getLevel(),F=K.q.instance.prodigy.dialogue.create();if(k.backpack.setKeyItemData(2,"gears",this.gearBar.getValue()),U>B){const G=[{type:"gold",N:500*(U-B)}];k.backpack.setKeyItemData(2,"lvl",U),U<5?F.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_LEVEL_UP_UNDER_5",U),face:4,anim:4,audio:{tag:Z.c.Voice_0,s:5,d:3}}):U<10?F.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_LEVEL_UP_UNDER_10"),face:4,anim:4,audio:{tag:Z.c.Voice_0,s:5,d:3}}):(F.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_LEVEL_UP_MAX"),face:4,anim:4,audio:{tag:Z.c.Voice_0,s:8,d:2}}),G.push({type:"hat",ID:47}),G.push({type:"outfit",ID:42})),F.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_REWARD"),face:1}),F.setText({callback:()=>{K.q.instance.prodigy.open.gotItem(G,(()=>{this.returnToLamplight()}),null,"dance-dance",null,null,{source_type:gn.C.MiniGame})}})}else B<10?F.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_TRY_NEW_DIFFICULTY"),face:4}):F.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_MAX_LEVEL"),face:4,anim:4,audio:{tag:Z.c.Voice_0,s:8,d:2}}),F.setText({callback:()=>{this.returnToLamplight()}});F.startDeprecated("boombox")}setDifficulty(k){this.difficulty=k,this.poseContainer=K.q.instance.prodigy.create.element(this.content,0,600);const B=k<3?3:k<5?4:5;this.poses=[];for(let U=0;U{this.pose()}));this.correctPose=k.currentPose,this.correct=Math.floor(Math.random()*this.poses.length);const B=[k];for(let U=0;U5)this.bonusBar.setValue(5);else{if(this.bonusBar.addValue(-1)<=0)return void this.endGame(!1)}const B=(new Date).getTime();B>this.finishTime?this.endGame(!0):(B>this.speedTime&&(this.startedSpeed||(this.startedSpeed=!0,this.speedOffset-=.25,K.q.instance.prodigy.effects.flashText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_SPEED_UP")),K.q.instance.prodigy.audio.playBGM(7,!0)),this.timeDelay=Math.max(500,this.timeDelay-150)),this.prodigyGame.time.events.addTimer(this.timeDelay,this.nextPose,this))}processLights(){if(!j.Aq$.isDefined(this.lights)){this.lights=[];for(let k=0;k<3;k++)this.lights.push(this.background.addChild(K.q.instance.prodigy.create.sprite(0,0,q._.General_icons_json,"empty"))),this.lights[k].alpha=.25;this.lights[0].tint=14492708,this.lights[1].tint=15396941,this.lights[2].tint=5107440}const k=[$.sample(nP.RED_LIGHTS),$.sample(nP.YELLOW_LIGHTS),$.sample(nP.BLUE_LIGHTS)];for(let B=0;B<3;B++)this.lights[B].x=k[B].x-25,this.lights[B].y=k[B].y-25}returnToLamplight(){K.q.instance.prodigy.world.it("lamplight-B4",660,400)}}nP.RED_LIGHTS=[{x:192,y:65},{x:403,y:40},{x:613,y:68},{x:791,y:83},{x:908,y:88},{x:408,y:539},{x:887,y:538}],nP.YELLOW_LIGHTS=[{x:118,y:47},{x:318,y:78},{x:376,y:164},{x:744,y:79},{x:1103,y:139},{x:1129,y:49},{x:1232,y:39},{x:305,y:474},{x:746,y:572}],nP.BLUE_LIGHTS=[{x:66,y:37},{x:338,y:119},{x:396,y:183},{x:652,y:72},{x:1039,y:97},{x:1071,y:38},{x:548,y:571},{x:984,y:476}];var aP=U(46);class rP extends Ar.H{constructor(k,B,U,F,G){super(k,B,440,150),this.startCallback=U,this.instructionsCallback=F,K.q.instance.prodigy.create.panel(this,25,25,7,6),K.q.instance.prodigy.create.textButton(this,50,50,{size:fo.MED,atlas:Ut.E.getIconForType("key",1),singleImage:!0,text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MINI_GAME_BUTTON_START")},this.tryStart.bind(this)),K.q.instance.prodigy.create.textButton(this,50,130,{size:fo.MED,icon:"star",text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MINI_GAME_BUTTON_HOW_TO")},this.instructions.bind(this)),K.q.instance.prodigy.create.textButton(this,50,250,{size:fo.MED,icon:"back",text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MINI_GAME_BUTTON_CANCEL")},G)}tryStart(){this.visible=!1;const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),B=K.q.instance.prodigy.dialogue.create(),U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;oP.getNewFossils(U.backpack).length<=0?(B.setText({text:k.getText("DYNO_DIG_START_NO_MORE_FOSSILS"),face:3,yes:this.start.bind(this,200),no:()=>{this.visible=!0},type:Ti.fA.START}),B.startDeprecated("scoog")):(B.setText({text:k.getText("DYNO_DIG_READY_TO_START"),face:3,yes:this.start.bind(this,300),no:()=>{this.visible=!0},type:Ti.fA.START}),B.startDeprecated("scoog"))}start(k){this.visible=!0;const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!j.Aq$.isDefined(k)||B.getGold()>=k){if(j.Aq$.isDefined(k)){B.changeGold(-k);const U=K.q.instance.prodigy.gameContainer.get("c47-20b6");U.economy.sendMinigameEvent("dino-dig",!0);const F={item_id:"0",item_name:"Gold",item_type:"currency",item_count:k,instance_type:Ai.N.Interface,instance_id:""};U.item.sendItemRemovedEvent(0,F.item_name,F.item_type,F.item_count,{sink_id:U.economy.getCurrentMinigameInstanceID(),sink_type:gn.C.MiniGame,instance_type:Ai.N.Interface,instance_id:""})}this.startCallback()}else{const k=K.q.instance.prodigy.dialogue.create();k.setText({callback:()=>{this.visible=!1}}),k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MINI_GAME_NOT_ENOUGH_GOLD"),face:3}),k.setText({callback:()=>{this.visible=!0}}),k.startDeprecated("scoog")}}instructions(){j.Aq$.isDefined(this.instructionsCallback)&&this.instructionsCallback()}}class oP extends gf.f{constructor(){super("game-dino",q._.Game_dinodig_json,[q._.Game_dinodig_json,X.V.Bgm_game,q._.Npc_sprite_scoog_json,"reduced-outfit-male-39","reduced-outfit-female-39",Z.c.Sfx_dino_dig]),this.area=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],this.digging=!1,this.walkSpeed=1,this.fossilOff=0,this.power=0,this.targetDigs=0,this.digs=0}create(){super.create();const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;K.q.instance.prodigy.audio.pauseBGM(),k.saveEnabled=!1}screenSetup(){super.screenSetup(),this.path=new aP.C(this.area),this.bg=K.q.instance.prodigy.create.sprite(0,0,q._.Game_dinodig_json,"bg"),this.bg.inputEnabled=!0,this.bg.events.onInputDown.add(this.listener,this),this.background.addChild(this.bg),this.npc=new TT(this.prodigyGame,this.content,130,640,{atlasGuid:q._.Npc_sprite_scoog_json,name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_SCOOG")});const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.playerContainer=K.q.instance.prodigy.create.player(this.content,k,1,600,350,!1,{hideMount:!0}),this.playerContainer.setup(),this.playerContainer.hideName(),this.playerContainer.OnLoad.addOnce((()=>this.playerContainer.forceOutfit({weapon:96})));for(let F=0;Fthis.onPathFound(k))).catch(j.RQr.createHandler("Unable to find path"))}}shutdown(){this.targetCoords=null,this.menu=null,this.item=null,this.text=null,this.playerContainer=null,this.npc=null,this.digBtn=null,this.timer=null,this.botPanel=null,this.rewards=[],this.bg=null,this.path=null,super.shutdown()}showUI(k){this.npc.visible=this.playerContainer.visible=this.timer.visible=this.botPanel.visible=k,this.menu.visible=!k}onPathFound(k){if(j.Aq$.isDefined(k)){const B=Math.floor(k[0].x/20),U=Math.floor(k[0].y/20);this.digBtn.visible=!1,1===this.area[U][B]&&this.playerContainer.setPath(k,this.askDig.bind(this,!0,B,U),this.walkSpeed)}}showInstructions(){this.showUI(!0);const k=K.q.instance.prodigy.dialogue.create();k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_INSTRUCTIONS_0"),face:0,anim:4}),k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_INSTRUCTIONS_1"),face:2}),k.setText({callback:this.dig.bind(this)}),k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_INSTRUCTIONS_2"),face:0}),k.setText({callback:this.showDigButton.bind(this)}),k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_INSTRUCTIONS_3"),face:0}),k.setText({callback:this.dig.bind(this)}),k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_INSTRUCTIONS_4"),face:1}),k.setText({callback:this.timer.blink.bind(this.timer)}),k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_INSTRUCTIONS_5"),face:1,anim:2}),k.setText({callback:this.showUI.bind(this,!1)}),k.startDeprecated("scoog")}showDigButton(){this.digBtn.visible=!0}showBoosts(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=oP.getNewFossils(k.backpack);this.showUI(!0);const U=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),F=[{icon:{type:"boots",ID:7},d:U.getText("BOOST_DESCRIPTION_WALK_FASTER")},B.length>0?{icon:{type:"fossil",ID:1},d:U.getText("BOOST_DESCRIPTION_MORE_FOSSILS")}:null,{icon:{type:"key",ID:1},d:U.getText("BOOST_DESCRIPTION_DIG_FASTER")}];K.q.instance.prodigy.open.boostSelect(F,this.startGame.bind(this))}static getNewFossils(k){const B=[],U=le.t.getCategoryItems("fossil"),F=k.getBackpackItemsByType("fossil");for(let G=0;G0)continue;let H=$.data.count;for(let k=0;k=this.targetDigs){K.q.instance.prodigy.audio.playSFX(18,"heart"),this.rewards.push(this.item),this.timer.setMsg(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_ITEMS_RECOVERED",this.rewards.length));const k=K.q.instance.prodigy.icon.createFromData(this.item,20*this.digX+10,20*this.digY+10,{x:0,y:0});this.uiLayer.addChild(k),k.scale.x=k.scale.y=0;const B=(this.rewards.length-1)%5*60+995,U=50*Math.floor((this.rewards.length-1)/5)+630;this.prodigyGame.add.tween(k.scale,k).to({x:1.2,y:1.2},1e3,j.GS3.Quadratic.Out).to({x:.8,y:.8},1e3,j.GS3.Quadratic.In).start(),this.prodigyGame.add.tween(k,k).to({x:B,y:U},2e3,j.GS3.Quadratic.Out).start(),this.rewards.length%3==0&&this.extendTime(),this.digging=!1,this.setNextDig()}else this.digBtn.x=this.playerContainer.x-40,this.digBtn.y=this.playerContainer.y<160?this.playerContainer.y:this.playerContainer.y-160,this.digBtn.visible=!0;else this.digging=!1}extendTime(){this.timer.addTime(15e3),this.timer.pause();const k=K.q.instance.prodigy.dialogue.create();k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_EXTEND_TIME"),face:1,anim:4,audio:sA.AUDIO[1]}),k.setText({callback:this.resumeTimer.bind(this)}),k.startDeprecated("scoog")}resumeTimer(){this.timer.resume()}endGame(){K.q.instance.prodigy.audio.playSFX(12,"bell"),K.q.instance.prodigy.audio.pauseBGM(),this.digBtn.visible=!1,this.playGame=!1,K.q.instance.prodigy.effects.flashText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_TIMES_UP"),this.end.bind(this)),K.q.instance.prodigy.gameContainer.get("c47-20b6").economy.sendMinigameEvent("dino-dig",!1)}end(){const k=K.q.instance.prodigy.dialogue.create();this.rewards.length>0?(k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_TIMES_UP_REWARD"),face:1,anim:2}),k.setText({callback:K.q.instance.prodigy.open.gotItem.bind(K.q.instance.prodigy.open,this.rewards,this.examineResults.bind(this),null,"dino-dig",null,null,{source_type:gn.C.MiniGame})})):(k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_TIMES_UP_TRY_AGAIN"),face:2}),k.setText({callback:this.toDino.bind(this)})),k.startDeprecated("scoog")}examineResults(){let k=!1;for(let U=0;U{var k;K.q.instance.prodigy.gameContainer.get("cfe-9c2c").setState(hP.zM.None),(null===(k=this._lootDashMenuData)||void 0===k?void 0:k.matchType)!==hP.B1.QuickQuiz&&K.q.instance.prodigy.world.teleportToCurrentMap()}}}var lP=U(52551),uP=U(43333);class fP extends gf.f{init(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){j.C1c.markTextureGarbageCollectionFrame();j.wa5.getActiveScene().container.parent=K.q.instance.prodigy.gameContainer,this._backgroundSprite=k,this._playerProgress=B}))}create(){super.create(),this._backgroundSprite?this.background.addChild(this._backgroundSprite):this.background.addChild((new V.Graphics).beginFill(16755387).drawRect(0,0,this.game.width,this.game.height).endFill());let k=lP.w.getConfig(hP.B1.QuickQuiz).quickQuizConfigs.transportModalDurationMs;const B=K.q.instance.prodigy.open.prefabMenu(Ei.l.LootDashTransportModal,void 0,!0,!0,void 0,{[tr.n7.TimeRemainingMs]:k},{interfaceName:ph.B.LootDashTransportModal,interfaceType:bi.Wm.Modal,originType:bi.$N.AutoSurfaced,instanceType:Ai.N.UI},!0),U=K.q.instance.prodigy.gameContainer.get("cfe-9c2c");B.onPrefabLoaded.addOnce((k=>{const B=k.findComponentInChildren(uP.U);U.transportModalTimer=B,B.onTimerCompleted.addOnce((()=>{U.transportModalTimer=void 0,k.destroyDeferred(),K.q.instance.prodigy.open.lootDashMenu({immediateStart:!0,matchType:hP.B1.QuickQuiz,playerProgress:this._playerProgress})}))}))}}var bP=U(64794),pP=U(81670),vP=U(39785);class gP{static shouldRollForMagicoinBattleRewards(k,B,U){return!!k&&(!U&&!!gP.ELIGIBLE_BATTLE_TYPES.includes(B))}}gP.ELIGIBLE_BATTLE_TYPES=[Ni.gu.Basic,Ni.gu.MatchmakingDuel,Ni.gu.MatchmakingBotDuel,Ni.gu.NormalRiftRun,Ni.gu.BossRiftRun,Ni.gu.DarkTower];var mP=U(88059),yP=U(75172),_P=U(61468),EP=U(24047),wP=U(38340),TP=U(96711),SP=U(60155);class AP extends SP.V{getBattlePrefab(){return Ei.l.RevampTutorialBattleScene}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k),this._tutorialControllerComponent=this._prefabRoot.findComponentInChildren(TP.K)}))}}var CP,OP=U(63046),IP=U(95807);class DP extends IP.Z{constructor(k){super(),this._dialogue=k}enter(){Ti.rD.runDialogueSequence(this._dialogue,(()=>this.stateMachine.goToState(OP.B)))}}class RP extends IP.Z{constructor(k){super(),this._promise=k}enter(){this._promise.then((()=>this.stateMachine.goToState(OP.B))).catch((k=>{j.RQr.logError(k,"Error waiting for promise"),this.stateMachine.showThrownErrorDialog(k)}))}}!function(k){k.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_1="DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_1",k.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_2="DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_2",k.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_3="DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_3",k.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_4="DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_4"}(CP||(CP={}));const PP={[CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_1]:ah.B.Voice_theo_ftue_status_effect_battle_1,[CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_2]:ah.B.Voice_theo_ftue_status_effect_battle_2,[CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_3]:ah.B.Voice_theo_ftue_status_effect_battle_3,[CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_4]:ah.B.Voice_theo_ftue_status_effect_battle_4};var MP,NP,xP;!function(k){k[k.Initialize=0]="Initialize",k[k.HighlightSpellCardWithStatusEffect=1]="HighlightSpellCardWithStatusEffect",k[k.HighlightTarget=2]="HighlightTarget",k[k.TargetClicked=3]="TargetClicked",k[k.InvestigateStatusEffect=4]="InvestigateStatusEffect",k[k.ViewTooltip=5]="ViewTooltip",k[k.EnemyTakesSpellEffectDamage=6]="EnemyTakesSpellEffectDamage",k[k.EnemyPetFiresBack=7]="EnemyPetFiresBack",k[k.FinalDialogue=8]="FinalDialogue",k[k.End=9]="End"}(MP||(MP={})),function(k){k[k.Step0PositionX=260]="Step0PositionX",k[k.Step0PositionY=520]="Step0PositionY",k[k.Step1PositionX=965]="Step1PositionX",k[k.Step1PositionY=345]="Step1PositionY"}(NP||(NP={})),function(k){k[k.PositionX=720]="PositionX",k[k.PositionY=325]="PositionY",k[k.Width=360]="Width",k[k.Height=200]="Height"}(xP||(xP={}));const LP=44,kP=-48;var BP=U(5885);class UP extends SP.V{initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k),this._bossID=this.rightTeam.units.find((k=>k.type===Ni.uj.Boss||k.type===Ni.uj.Wizard)).data.asset.id}))}onVictory(k,B,U){const F=Object.create(null,{onVictory:{get:()=>super.onVictory}});return(0,G.sH)(this,void 0,void 0,(function*(){yield this.showBossChest(),yield this.showRouletteMenu(),yield F.onVictory.call(this,k,B,U)}))}showBossChest(){return(0,G.sH)(this,void 0,void 0,(function*(){this.rightTeam.units.forEach((k=>{k.creature.creatureGameObject.active=!1,k.uiContent.active=!1}));const k=yield K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(Ei.l.BossChest,this._prefabRoot);k.legacyTransform.x=UP.BOSS_CHEST_POSITION_X,k.legacyTransform.y=UP.BOSS_CHEST_POSITION_Y,yield k.findComponentInChildren(BP.E).onOpenComplete.asPromise(),k.active=!1}))}showRouletteMenu(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._gameDataProvider.getItem("boss",this._bossID).data;if(!k)return j.VyI.log("Boss data not found for the roulette menu",j.$bb.Error),Promise.reject();const B=k.adventureRewards,U=new j.bnh;return K.q.instance.prodigy.open.bossRewards(B,Ai.N.EndOfBattle,void 0,void 0,void 0,(()=>{U.resolve()})),U}))}}UP.BOSS_CHEST_POSITION_X=900,UP.BOSS_CHEST_POSITION_Y=390;var FP,GP=U(24652),jP=U(8394);!function(k){k.Start="Start",k.Taunt="Taunt",k.Win="Win",k.Lose="Lose"}(FP||(FP={}));var $P=U(16495),HP=U(74958),VP=U(90614),WP=U(40671),qP=U(8693),KP=U(63761),zP=U(92611),YP=U(52855),QP=U(42430);function XP(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=new j._mx(k).addComponent(QP.o);return U.spellGUID=B,yield U.preloadAssets(),U}))}function ZP(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){var F,j,$;const H=B.data,V=null!==(j=null===(F=B.creature)||void 0===F?void 0:F.teleportType)&&void 0!==j?j:KP.H0.Astral,W=B.controllerUnit,q=B.scale;return B.creature instanceof zP.N&&(null===($=B.creature.followContainer)||void 0===$||$.destroy()),B.setData(Object.assign(Object.assign({teamId:k.id,element:Q.EElementType.Shadow,level:1,stats:{[Q.EStat.Hp]:1,[Q.EStat.Mp]:1,[Q.EStat.Power]:1,[Q.EStat.Defence]:1,[Q.EStat.Speed]:1,[Q.EStat.Accuracy]:1,[Q.EStat.Dodge]:1,[Q.EStat.CritChance]:1,[Q.EStat.Initiative]:5},spells:[],health:{current:1,max:1},mp:{current:1,max:1},catchChance:0,unitId:U},H),{type:Ni.uj.Object,asset:{type:"spine",id:U}}),KP.H0.Shadow,W,.5),yield B.loadPromise,()=>(0,G.sH)(this,void 0,void 0,(function*(){B.setData(H,V,W,q),yield B.loadPromise,B.creature instanceof zP.N&&B.creature.followContainer&&(B.creature.followContainer.alpha=0)}))}))}function JP(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){return j.Aq$.isDefined(B.creature.castSpellSfx)?K.q.instance.prodigy.audio.playSFXFromGUID(B.creature.castSpellSfx):K.q.instance.prodigy.audio.playSFX(8,qP.J.Cast),yield k.begin({caster:{unitId:B.battleId,gameObject:B.creature.creatureGameObject,statusEffectContainer:B.statusEffectContainer},targets:[{unitId:U.battleId,gameObject:U.creature.creatureGameObject,statusEffectContainer:U.statusEffectContainer}],manager:k,multiHit:1}),new Promise((k=>{YP.a.createHitInfoText(U,F,void 0,k)}))}))}var tM,eM=U(24227);!function(k){k.Neutral="Neutral",k.Shocked="Shocked",k.Sad="Sad"}(tM||(tM={}));const iM={[GP.ts.AstralDragon]:0,[GP.ts.FireDragon]:20,[GP.ts.IceDragon]:0,[GP.ts.IceWyrm]:0,[GP.ts.PhysicalDragon]:14,[GP.ts.ShadowDragon]:0};class sM{static make(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=new sM;B._bossType=k;const U=K.q.instance.prodigy.gameContainer.get(j.t5G.AssetLoader);B._barkData=yield U.loadSingleAsset(Ft.r.BossBarks_json,qR.i.JSON);const F=K.q.instance.prodigy.gameContainer.get("9ac-9677").getRiftsEntityPortalEntryData();for(let G=Object.keys(B._phaseUnlockConditions).length;G>0;G--)if(B._phaseUnlockConditions[G](null==F?void 0:F.metaProgress.bossDefeats[k])){B._phase=G;break}return B}))}constructor(){this._phase=0,this._phaseUnlockConditions={1:k=>!j.Aq$.isDefined(k),2:k=>0===k,3:k=>k>0&&k<15,4:k=>k>=15&&k<50,5:k=>k>=50}}advanceBark(k){var B,U,F,G,j,$;const H=null!==(B=($=this._activePlayer.data).rifts)&&void 0!==B?B:$.rifts={};null!==(U=H.bossBarkProgress)&&void 0!==U||(H.bossBarkProgress={});let V=H.bossBarkProgress[this._bossType];V||(this.initializeBarkProgress(this._bossType,this._phase),V=H.bossBarkProgress[this._bossType]);const W=null===(G=null===(F=this._barkData[this._bossType])||void 0===F?void 0:F[this._phase])||void 0===G?void 0:G[k];if(!(null==W?void 0:W.length))return;V.index[k]=(V.index[k]+1)%W.length,this._activePlayer.updated=!0;const K=W[V.index[k]];let z=K.filename?ah.B[rn.$.capitalizeFirstLetter(K.filename)]:"";z||(z=K.filename?ah.B[K.filename]:"");const Y=this._baseLocalizer.getText(K.dialogueLocalizationKey);return Y?{dialogueData:{nameKey:`NPC_NAME_DRAGON_${eM.j.getBossElementFromBossType(this._bossType).toUpperCase()}`,text:Y,avatar:{atlas:q._[`Npc_face_${this._bossType.toLowerCase()}_json`],frameName:sM.FACE_FRAME[K.portrait],offsetY:null!==(j=iM[this._bossType])&&void 0!==j?j:0},audio:{tag:null!=z?z:""}},blockInput:!0}:void 0}initializeBarkProgress(k,B){var U,F,G,j,$,H;const V=null===(U=this._barkData[k])||void 0===U?void 0:U[B];if(!V)return;const W=null!==(F=($=this._activePlayer.data).rifts)&&void 0!==F?F:$.rifts={};null!==(G=W.bossBarkProgress)&&void 0!==G||(W.bossBarkProgress={}),null!==(j=(H=W.bossBarkProgress)[k])&&void 0!==j||(H[k]={index:Object.entries(V).reduce(((k,[B,U])=>(k[B]=wn.o.integerInRange(0,U.length),k)),{})}),this._activePlayer.updated=!0}}sM.FACE_FRAME={[tM.Neutral]:"face_0",[tM.Shocked]:"face_1",[tM.Sad]:"face_2"},(0,G.Cg)([(0,Re.b)("306-5359"),(0,G.Sn)("design:type",ye.W)],sM.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,Re.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],sM.prototype,"_baseLocalizer",void 0);var nM,aM,rM,oM,hM,cM=U(1551),dM=U(68836),lM=U(13302),uM=U(64019);!function(k){k.MovingBackground="movingBackground",k.MovingMidground1="movingMidground1",k.MovingMidground2="movingMidground2",k.MovingRocksBackground="movingRocksBackground",k.MovingRocksMidground="movingRocksMidground",k.MovingMountainsBackground="movingMountainsBackground",k.MovingMountainsMidground="movingMountainsMidground",k.MovingTallMountainsMidground="movingTallMountainsMidground",k.MovingCloudsForeground="movingCloudsForeground"}(nM||(nM={})),function(k){k[k.NotStarted=0]="NotStarted",k[k.PlayedAttack=1]="PlayedAttack",k[k.AddedAffix=2]="AddedAffix",k[k.Finished=3]="Finished"}(aM||(aM={}));class fM extends SP.V{getAssetList(){return[...this._baseAssets,q._.Rift_run_shadow_dragon_battle_map_1_json,q._.Rift_run_shadow_dragon_battle_map_2_json,q._.Rift_run_shadow_dragon_battle_map_3_json,ah.B.Sfx_dragonisle_dragon_defeat]}constructor(k){var B;super(k),this._firstBossDefeatedCutsceneFinished=new j.bnh,this._fakeWeightDividend=5,this._firstBossRiftCutscene=null,this._bossType=GP.ts.PhysicalDragon,this._hasTauntPlayedThisRound=!0,this._roundShieldAttackAnimationStep=aM.NotStarted,this._useParallaxBackground=!0,this._riftsDataProvider=K.q.instance.prodigy.gameContainer.get("196-d3a5");const U=null===(B=this._riftsDataProvider.riftsTierTotalData)||void 0===B?void 0:B[dM.T.riftTier];(null==U?void 0:U.type)===GP.cn.Boss&&(this._bossType=U.bossType),this._localConfig.backgroundID.length>0?this._useParallaxBackground=!1:this._objectPool=new j.iyL(this.createMovingBackgroundObject.bind(this))}getUnitDataForTeam(k,B){const U=super.getUnitDataForTeam(k,B);if(this._useParallaxBackground&&B===Q.ETeamId.Home)for(const G of U)G.scale=.5;const F=U.find((k=>k.unitId===fM.BOSS_BATTLE_ID));return F&&(F.unitSlot=5),U}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){var U;const F=K.q.instance.prodigy,$=F.gameContainer.get(j.t5G.AssetLoader),V=yield $.loadSingleAsset(Ft.r.ShadowBattleBackgroundConfig_json,qR.i.JSON);this._useParallaxBackground&&(this._movingLandscapesData=V.movingLandscapes,this._randomMovingBackgroundData=V.movingObjects,this._playerPlatformAssets=V.playerPlatforms,this._objectPool.allocate(this._randomMovingBackgroundData.map((k=>k.maxObjects)).reduce(((k,B)=>k+B))));const W=B.initBattlePrefab.call(this,k);yield W,this._boss=this.rightTeam.units.find((k=>k.type===Ni.uj.Boss)),this.leftTeam.units.forEach((k=>{this._useParallaxBackground&&k.GameObject.transform.setPosition(k.GameObject.transform.localPosition.x-100,k.GameObject.transform.localPosition.y-35),k.setupUnitTooltip()})),this.configureBossUnit(this._boss),this._barkManager=yield sM.make(this._bossType),this.setUnitTooltipLock(!0),this._firstBossRiftCutscene=yield function(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){if(U!==GP.ts.PhysicalDragon||F!==QS.ni.Portal1||K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_RIFTS,ln.B.BREADCRUMB_RIFTS_FIRST_PHYSICAL_BATTLE_CUTSCENE_SEEN))return()=>(0,G.sH)(this,void 0,void 0,(function*(){return{shouldLeftTeamTeleportIn:!1}}));const $=new j._mx(k.mapRoot);let V,W,q,z,Y;$.layer="content",$.addComponent(j.dLy);const X=[()=>(0,G.sH)(this,void 0,void 0,(function*(){return $.destroyDeferred()}))];try{W=k.leftTeam.wizard,V=H().chain(k.leftTeam.rawUnits).filter((k=>k!==W)).maxBy((k=>k.GameObject.transform.worldPosition.y)).value(),yield Promise.all([k.addUnitPlatform(V,2),ZP(k.leftTeam,W,J.Q.Spine_npc_puppetmaster_json).then(X.push.bind(X)),ZP(k.leftTeam,V,J.Q.Spine_npc_pippet_json).then(X.push.bind(X))]),[Y,q,z]=yield Promise.all([XP($,WP.z.Spell_shadow_shadowshock_single_spell),XP($,WP.z.Spell_physical_slash_single_spell),XP($,WP.z.Spell_physical_pierce_giant_spell)])}catch(Z){j.RQr.logError(Z,"Failed to create First Dragon Rift cutscene"),yield Promise.all(X.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k()})))))}return()=>(0,G.sH)(this,void 0,void 0,(function*(){try{yield Promise.all([B.enterBattle(!1,!1),W.enterBattle(!0,!1),V.enterBattle(!0,!1)]),yield(0,bc.v$)([1647,1648,1649]),yield Promise.all([(0,$P.ib)(V.creature.animator,["attack","idle"],!0),JP(Y,V,B,{damage:.001,damageInformation:Q.EDamageInformation.Ineffective})]),yield(0,bc.v$)([1650]),yield JP(q,B,V,{damage:9999,damageInformation:Q.EDamageInformation.CriticalHit}),yield V.playDefeated(),yield(0,bc.v$)([1651]),B.creature.animator.playAnimation("taunt",!0),yield(0,bc.v$)([1652]);const k=W.playDefeated();yield(0,bc.uk)(K.q.instance.game,500),yield JP(z,B,W,{damage:0,damageInformation:Q.EDamageInformation.Missed}),yield k}catch(Z){j.RQr.logError(Z,"Failed playing the First Dragon Rift cutscene")}finally{yield Promise.all(X.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k()})))))}return K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_RIFTS,ln.B.BREADCRUMB_RIFTS_FIRST_PHYSICAL_BATTLE_CUTSCENE_SEEN),{shouldLeftTeamTeleportIn:!0}}))}))}(this,this._boss,this._bossType,null!==(U=this._riftsDataProvider.selectedPortalId)&&void 0!==U?U:QS.ni.Portal1),this._skipVictoryBark=this._bossType===GP.ts.PhysicalDragon&&this._riftsDataProvider.selectedPortalId===QS.ni.Portal1&&!F.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_RIFTS,ln.B.BREADCRUMB_RIFTS_DEFEATED_FIRST_BOSS),this._boss.creature.defeated=()=>(0,G.sH)(this,void 0,void 0,(function*(){}))}))}processBattleStateUpdates(k){for(const B of k)B.type===Q.EBattleStateUpdate.CustomEvent&&B.name===QS.wJ.RewardDetermined&&(dM.T.reward=B.data.reward);return k}configureBossUnit(k){k.GameObject.transform.setPositionY(-100),this._useParallaxBackground?(this._boss.size=lM.X.Huge,k.targetComponent.GameObject.parent.transform.setPositionY(200),k.uiContent.transform.setPosition(-25,50),k.turnIndicatorOffset={x:0,y:200}):(this._boss.size=lM.X.Medium,k.GameObject.transform.setPositionX(-100)),this._boss.targetComponent.configureTarget()}setupBattleBackgrounds(){const k=Object.create(null,{setupBattleBackgrounds:{get:()=>super.setupBattleBackgrounds}});return(0,G.sH)(this,void 0,void 0,(function*(){return this._useParallaxBackground?(this._movingLandscapesData.forEach((k=>{const B=k.pixelSpeed?{MOVE_DURATION:this.calculateDuration(0,fM.MOVING_BACKGROUND_IMAGE_WIDTH,k.pixelSpeed),MOVE_X:fM.MOVING_BACKGROUND_IMAGE_WIDTH,ADJACENT_BACKGROUND_IMAGE:[k.atlas,k.frames[0]],ADJACENT_BACKGROUND_POSITION:[-fM.MOVING_BACKGROUND_IMAGE_WIDTH,0]}:{},U=!!k.pixelSpeed;Ja.d.loadWithInjectedValuesFromGUID(this._prefabLoader,Ei.l.RepeatingUnidirectionalBackground,Object.assign(Object.assign({},B),{BACKGROUND_IMAGE:[k.atlas,k.frames[0]],BACKGROUND_POSITION:[of.R.BG_HALF_WIDTH+k.initialPosition[0].x,of.R.BG_HALF_HEIGHT+k.initialPosition[0].y],BACKGROUND_LAYER:[k.layer,k.depth,U]}),this._prefabRoot)})),Promise.all([...this.leftTeam.units.map(this.addUnitPlatform.bind(this)),...this._randomMovingBackgroundData.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){for(let B=0;BB.layer===k.layer)).length;k.randomizeAsset?yield q.setAsset(k.atlas,k.frames[wn.o.integerInRange(0,k.frames.length)]):W.hasMoved||k.maxObjects!==k.frames.length||(yield q.setAsset(k.atlas,k.frames[K])),W.onComplete.addOnce((()=>{V.active=!1,this.configureMovingBackgroundObject(k).catch(j.RQr.createHandler("Failed to configure moving background object"))}));const z=W.hasMoved?null:null===(B=k.initialPosition)||void 0===B?void 0:B[K],Y=1e3*wn.o.integerInRange(null!==(F=null===(U=k.delay)||void 0===U?void 0:U.min)&&void 0!==F?F:0,null!==($=null===(G=k.delay)||void 0===G?void 0:G.max)&&void 0!==$?$:0),Q={x:k.scale?-q.getWidth()*k.scale:-q.getWidth(),y:k.yRange?of.R.BG_HALF_HEIGHT+wn.o.integerInRange(k.yRange.min,k.yRange.max):V.transform.localPosition.y};z&&(Q.x=of.R.BG_HALF_WIDTH+z.x,Q.y=of.R.BG_HALF_HEIGHT+z.y),Ja.d.updateInjectedValues(V,{MOVING_IMAGE_SET_POSITION:[Q.x,Q.y],MOVING_IMAGE_SET_TARGET:[of.R.BG_WIDTH,Q.y],MOVING_IMAGE_SET_DURATION:this.calculateDuration(Q.x,of.R.BG_WIDTH,k.pixelSpeed),MOVING_IMAGE_SET_DELAY:W.hasMoved||!z?Y:0,MOVING_IMAGE_ADD_LAYER:[k.layer,k.depth,!0],MOVING_IMAGE_SET_LAYER:[k.layer,!0],MOVING_IMAGE_SET_SCALE:null!==(H=k.scale)&&void 0!==H?H:1}),W.startTween()}))}addUnitPlatform(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U="BossRiftDynamicallyCreatedBackground";if(k.GameObject.children.some((k=>k.name===U)))return;const F=new j._mx(k.GameObject);F.name=U,F.setLayer("background"),F.sendToBack();const G=F.addComponent(j.XVE),$=F.addComponent(Eo._);yield $.setAsset(this._playerPlatformAssets.atlas,this._playerPlatformAssets.assetNames[B]),$.sizeToSourceImage(),G.setPositionY(20)}))}calculateDuration(k,B,U){return Math.abs(k-B)/(U/1e3)}onStartBattle(){const k=Object.create(null,{onStartBattle:{get:()=>super.onStartBattle}});return(0,G.sH)(this,arguments,void 0,(function*(B=!0){var U;const F=yield null===(U=this._firstBossRiftCutscene)||void 0===U?void 0:U.call(this);F.shouldLeftTeamTeleportIn&&(this.leftTeam.teleportInBehaviour=uM.pV.NonWizardUnits),yield this.leftTeam.units.find((k=>(null==k?void 0:k.type)===Ni.uj.Wizard)).enterBattle(F.shouldLeftTeamTeleportIn,!1),yield this.rightTeam.units.find((k=>(null==k?void 0:k.type)===Ni.uj.Boss)).enterBattle(!1,!1);const G=this._barkManager.advanceBark(FP.Start);G&&(yield j.Egh.timeout(1e3),yield bc.v$([G])),this._modifierGridPrefab=yield cM.Q.addModifierGridPrefab(cM.Q.MODIFIER_GRID_X_IN_BATTLE,cM.Q.MODIFIER_GRID_Y_IN_BATTLE),this.setUnitTooltipLock(!1),yield k.onStartBattle.call(this,B)}))}onEndGame(k){const B=Object.create(null,{onEndGame:{get:()=>super.onEndGame}});return(0,G.sH)(this,void 0,void 0,(function*(){if(this._modifierGridPrefab.destroy(),this._modifierGridPrefab=null,k){if(!this._skipVictoryBark){const k=this._barkManager.advanceBark(FP.Win);k&&(yield bc.v$([k]))}yield Promise.all([this._boss.fadeUi(0),(()=>(0,G.sH)(this,void 0,void 0,(function*(){this._boss.creature.animator.playAnimation("defeat",!1),K.q.instance.prodigy.audio.playSFXFromGUID(ah.B.Sfx_dragonisle_dragon_defeat),yield this._boss.creature.animator.OnAnimationComplete.asPromise()})))()])}else{const k=this._barkManager.advanceBark(FP.Lose);k&&(yield bc.v$([k]))}yield B.onEndGame.call(this,k)}))}onDefeat(){const k=Object.create(null,{onDefeat:{get:()=>super.onDefeat}});return(0,G.sH)(this,void 0,void 0,(function*(){return k.onDefeat.call(this,!0)}))}showSpellCards(k,B=!0){if(super.showSpellCards(k,B),this._useParallaxBackground){const k=this.spellCardsController.targetController.battleTargets.find((k=>k.isMultiTarget&&k.teamId===Q.ETeamId.Home));k&&k.groundTarget.transform.setPosition(-50,-35)}}getStateOverride(k){var B;if(this._roundShieldAttackAnimationStep===aM.AddedAffix){if(!k||k.type!==Q.EBattleStateUpdate.AddAffix||k.affix.type!==Q.EAffixType.Shield||k.affix.unitId!==fM.BOSS_BATTLE_ID)return++this._roundShieldAttackAnimationStep,[RP,j.Egh.timeout(1e3)]}switch(null==k?void 0:k.type){case Q.EBattleStateUpdate.NewRound:1!==k.round&&(this._hasTauntPlayedThisRound=!1,this._roundShieldAttackAnimationStep=aM.NotStarted);break;case Q.EBattleStateUpdate.CastSpell:if(!this._hasTauntPlayedThisRound&&(null===(B=this._activeUnit)||void 0===B?void 0:B.creature.isOpponent)){this._hasTauntPlayedThisRound=!0;const k=this._barkManager.advanceBark(FP.Taunt);if(k)return(0,$P.ib)(this._boss.creature.animator,["taunt","idle"],!0).catch(j.RQr.createHandler("BossRiftBattleController: Failed to play boss taunt animation")),[DP,[k]]}break;case Q.EBattleStateUpdate.EndBattle:const U=K.q.instance.prodigy.gameContainer.get("196-d3a5");if(this._boss.isDefeated()&&this._bossType===GP.ts.PhysicalDragon&&U.selectedPortalId===QS.ni.Portal1&&!K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_RIFTS,ln.B.BREADCRUMB_RIFTS_DEFEATED_FIRST_BOSS))return this.playFirstPhysicalDragonDefeatedCutscene().catch(j.RQr.createHandler("BossRiftBattleController: Error showing first boss defeat sequence")),[RP,this._firstBossDefeatedCutsceneFinished];break;case Q.EBattleStateUpdate.AddAffix:switch(this._roundShieldAttackAnimationStep){case aM.NotStarted:const B=k.affix;if(B.type===Q.EAffixType.Shield&&B.unitId===fM.BOSS_BATTLE_ID)return++this._roundShieldAttackAnimationStep,this._boss.creature.attack(),[RP,j.Egh.timeout(1e3)];break;case aM.PlayedAttack:++this._roundShieldAttackAnimationStep}}return super.getStateOverride(k)}showBattleResult(k,B,U,F){const $=Object.create(null,{showBattleResult:{get:()=>super.showBattleResult}});return(0,G.sH)(this,arguments,void 0,(function*(k,B,U,F,G=!0){var V,W,q,z;if(!G)return;let Y=null!==(W=null===(V=K.q.instance.prodigy.gameContainer.get("196-d3a5").riftsTierTotalData)||void 0===V?void 0:V[dM.T.riftTier].rewards)&&void 0!==W?W:[];const Q=K.q.instance.prodigy.gameContainer.get("306-5359");Y.forEach((k=>{if(!QS._u.includes(k.type)&&Q.getItemCount(k.type,k.id)>0){const B=Y.filter((B=>!QS._u.includes(B.type)&&B!==k));for(const U of B)U.weight+=Math.ceil(k.weight/B.length);Y=Y.filter((B=>B!==k))}}));const X=Y.reduce(((k,B)=>k+B.weight),0),Z=uT.L.visuallyAdjustDragonRouletteRewards(Y),J=[],tt=dM.T.reward;if(tt){const k=null===(q=le.t.getItem(tt.type,tt.id))||void 0===q?void 0:q.data;if(J.push({type:tt.type,ID:tt.id,N:tt.quantity,data:{name:k?Tn.J.getLocalizationNameKey(tt):"",flavorText:k?Tn.J.getLocalizationFlavorKey(tt):"",rarity:null!==(z=null==k?void 0:k.rarity)&&void 0!==z?z:0}}),"petHat"!==tt.type&&"petRelic"!==tt.type||K.q.instance.prodigy.gameContainer.get("d69-defe").refreshPetGear().catch(j.RQr.createHandler("RiftRunBattleController: Failed to refresh pet gear after being awarded it after a rift run")),H().find(Z,(k=>k.id===tt.id&&k.type===tt.type&&k.quantity===tt.quantity))||Z.push({type:tt.type,ID:tt.id,N:tt.quantity,R:X/this._fakeWeightDividend}),(0,jP.p)(tt.type,tt.id)){K.q.instance.prodigy.gameContainer.get("c47-20b6").postBattleFlow.itemTransaction.setIndividualData(tt.type,tt.id,{instance_type:Ai.N.BossRift,source_type:gn.C.PrizeWheel})}}yield new Promise((k=>{K.q.instance.prodigy.open.bossRewards([],Ai.N.BossRift,Ei.l.BossRewardUIwithnorespin,J,Z,k,!0,!tt||!(0,jP.p)(tt.type,tt.id))})),yield $.showBattleResult.call(this,k,B,U,F,G)}))}playFirstPhysicalDragonDefeatedCutscene(){return(0,G.sH)(this,void 0,void 0,(function*(){yield(0,bc.v$)([1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1645]);const k=K.q.instance.prodigy;k.gameContainer.get("c47-20b6").rifts.sendRiftsFunnelAdvancedEvent(HP.fk.RiftsCompleteBossRift),k.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_RIFTS,ln.B.BREADCRUMB_RIFTS_DEFEATED_FIRST_BOSS),this._firstBossDefeatedCutsceneFinished.resolve()}))}}fM.BOSS_BATTLE_ID="boss",fM.MOVING_BACKGROUND_IMAGE_WIDTH=1440,function(k){k.Visible="up",k.Hidden="down",k.Stunned="stun",k.Taunt="taunt"}(rM||(rM={})),function(k){k.Start="start",k.Element1="element1",k.Element2="element2",k.Element3="element3",k.Stunned="stun"}(oM||(oM={})),function(k){k.Idle="idle",k.Death="death",k.CrystalMound="crystalMound",k.ChangeOut="changeOut",k.ChangeIn="changeIn",k.Reveal="reveal"}(hM||(hM={}));class bM extends UP{constructor(){super(...arguments),this._golemState=oM.Start,this._stateOverrideStep=0}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k),this._golem=this.rightTeam.units.find((k=>k.type===Ni.uj.Boss)),this._golem.creature.teleportType=KP.H0.None,this._golem.creature.shouldFadeOnDefeat=!1,this._golem.onDefeatAnimationFinished.add((()=>{this._golemState!==oM.Stunned&&this._golemAnimator.playAnimation(hM.Death,!1)}));const U=new j._mx(this._golem.GameObject);U.active=!1,U.addComponent(j.dLy).setPosition(bM.FLASH_OFFSET.x,bM.FLASH_OFFSET.y),this._flashSpine=U.addComponent(Wn.v),this._flashSpine.setAsset(J.Q.Spine_flash_json)}))}getStateOverride(k){var B;switch(null!==(B=this._golemAnimator)&&void 0!==B||(this._golemAnimator=this._golem.creature.animator),null==k?void 0:k.type){case Q.EBattleStateUpdate.CustomEvent:switch(this._golemState=k.name,k.name){case oM.Element1:if(0==this._stateOverrideStep++)return[RP,this.switchElement(k.data,!0)];break;case oM.Stunned:if(0==this._stateOverrideStep++)return this._golemAnimator.OnAnimationComplete.removeAll(),this._golemAnimator.spine.addAnimationRemap(hM.Idle,hM.CrystalMound),[RP,(0,$P.ib)(this._golemAnimator,[hM.Death,hM.CrystalMound],!0)];break;case oM.Start:if(0==this._stateOverrideStep++)return this._golemAnimator.spine.addAnimationRemap(hM.Idle,hM.Idle),[RP,this.switchElement(Q.EElementType.Shadow,!1)]}break;case Q.EBattleStateUpdate.EndBattle:if(0==this._stateOverrideStep++&&this._golemState!==oM.Stunned)return[RP,Promise.race([this._golemAnimator.OnAnimationComplete.asPromise(),j.Egh.timeout(3e3)])]}return this._stateOverrideStep=0,super.getStateOverride(k)}switchElement(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.changeOut(B),yield Promise.all([new Promise((B=>{this._golemAnimator.spine.setAsset(bM.BOSS_ELEMENT_ASSETS[k],B)})),j.Egh.timeout(500)]),this._golem.element=k,yield this.changeIn(B)}))}changeOut(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=[];k&&(this._golemAnimator.playAnimation(hM.ChangeOut,!1),B.push(this._golemAnimator.OnAnimationComplete.asPromise())),this._flashSpine.GameObject.layer=vh.E.ForegroundLayer,this._flashSpine.setAnimationByName(0,hM.ChangeOut,!1),this._flashSpine.GameObject.active=!0,B.push(this._flashSpine.getSpine().onComplete.asPromise()),yield Promise.all(B)}))}changeIn(k){return(0,G.sH)(this,void 0,void 0,(function*(){this._flashSpine.setAnimationByName(0,hM.ChangeIn,!1),this._flashSpine.getSpine().onComplete.addOnce((()=>{this._flashSpine.GameObject.active=!1})),yield(0,$P.ib)(this._golemAnimator,[k?hM.ChangeIn:hM.Reveal,hM.Idle],!0)}))}}bM.FLASH_OFFSET={x:0,y:-150},bM.BOSS_ELEMENT_ASSETS={[Q.EElementType.Shadow]:J.Q.Default_boss_18_json,[Q.EElementType.Fire]:J.Q.Fire_boss_18_json,[Q.EElementType.Water]:J.Q.Water_boss_18_json,[Q.EElementType.Plant]:J.Q.Plant_boss_18_json,[Q.EElementType.Ice]:J.Q.Ice_boss_18_json,[Q.EElementType.Storm]:J.Q.Storm_boss_18_json};var pM,vM,gM=U(34234);class mM extends SP.V{requestBattleStart(k){const B=Object.create(null,{requestBattleStart:{get:()=>super.requestBattleStart}});return(0,G.sH)(this,void 0,void 0,(function*(){var U;const F=yield B.requestBattleStart.call(this,k);if(k.currentFloor===mM.MIRROR_BATTLE_FLOOR){const k=Object.values(F.state.units).find((k=>k.teamId===Q.ETeamId.Away&&k.type===Ni.uj.Wizard));if(null===(U=null==k?void 0:k.appearance)||void 0===U?void 0:U.name){const B=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),U=k.appearance.name;k.appearance.name=B.getText(mM.MIRROR_WIZARD_KEY,tc.f.getFullNameByID(null,U.middle,U.last))}}return F}))}}mM.MIRROR_WIZARD_KEY="NPC_NAME_DARK_TOWER_MIRROR_WIZARD",mM.MIRROR_BATTLE_FLOOR=90,mM.ROULETTE_STAR_BONUS_INDEX=9,mM.ROULETTE_STAR_BONUS_MULTIPLIER_VALUE=2,(0,G.Cg)([(0,gM.d)("RemoteConfig"),(0,G.Sn)("design:type",Object)],mM.prototype,"_remoteConfig",void 0),function(k){k.InitialBattleState="initialState",k.StateUpdate="update",k.GuestValidated="guestValidated"}(pM||(pM={})),function(k){k.NextUnits="nextUnits",k.Thinking="thinking",k.ShowElementBoost="showElementBoost"}(vM||(vM={}));var yM=U(14335),_M=U(52516),EM=U(27488),wM=U(58203);let TM=class extends wM.m{joinDuel(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U={host:k,guestRoomId:B};yield this.makeCloudscriptRequest(qt.D.Battle.Duel.Join,U)}))}sendWaitPing(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.Battle.Duel.WaitPing,{battleId:k},!1)}))}onOpponentDisconnect(k){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(qt.D.Battle.Duel.OpponentDisconnect,{battleId:k},!0)}))}};TM=(0,G.Cg)([(0,tt.injectable)()],TM);class SM extends IP.Z{enter(){this._waitForUpdatePromise=this.waitForUpdate().catch((k=>{this._waitForUpdatePromise.cancel(),j.RQr.logError(k,"Error waiting for state updates"),this.stateMachine.showThrownErrorDialog(k)}))}exit(){var k;null===(k=this._waitForUpdatePromise)||void 0===k||k.cancel()}waitForUpdate(){const k=new j.kBN(((B,U)=>{(()=>(0,G.sH)(this,void 0,void 0,(function*(){const B=this.battleController.activeUnit;(null==B?void 0:B.data.mp.current)>0?B.showOpponentWaitingMessage("DUEL_WAIT_CHOOSING_SPELL"):this.hasUpdate(Q.EBattleStateUpdate.ModifyMp)||this.battleController.textLog.showPinnedMessage("DUEL_WAIT_OTHER_PLAYER");const F=this.performWaitPings();for(F.catch(U);!SM.UNBLOCKING_UPDATE_TYPES.some((k=>this.hasUpdate(k)));){if(yield this.battleController.onMessageReceived.asPromise(),k.cancelled)return;this.hasUpdate(Q.EBattleStateUpdate.ModifyMp)&&(null==B||B.showOpponentWaitingMessage("DUEL_WAIT_CHOOSING_SPELL"))}F.cancel(),null==B||B.hideWaitingMessage(),this.battleController.textLog.unpinMessage(),this.stateMachine.goToState(OP.B)})))().then(B).catch(U)}));return k}performWaitPings(){const k=new j.kBN(((B,U)=>{(()=>(0,G.sH)(this,void 0,void 0,(function*(){for(yield j.Egh.timeout(SM.WAIT_PING_START_DELAY_MS);!k.cancelled;){if((yield this._networkHandler.sendWaitPing(this.battleController.battleId)).wait)yield j.Egh.timeout(SM.WAIT_PING_INTERVAL_MS);else if(yield j.Egh.timeout(SM.WAIT_PING_DESYNC_CONFIRM_DELAY_MS),!k.cancelled)throw new EM.r(409,"Duel desync occurred")}})))().catch(U)}));return k}hasUpdate(k){return this.stateMachine.stateUpdateQueue.some((B=>B.type===k))}}SM.WAIT_PING_START_DELAY_MS=2e4,SM.WAIT_PING_INTERVAL_MS=15e3,SM.WAIT_PING_DESYNC_CONFIRM_DELAY_MS=5e3,SM.UNBLOCKING_UPDATE_TYPES=[Q.EBattleStateUpdate.CastSpell,Q.EBattleStateUpdate.ModifyMp,Q.EBattleStateUpdate.SkipTurn],(0,G.Cg)([(0,gM.d)("NetworkHandler"),(0,G.Sn)("design:type",TM)],SM.prototype,"_networkHandler",void 0);var AM=U(6719),CM=U(64007),OM=U(630),IM=U(60668),DM=U(74640);class RM extends IP.Z{enter(){this.run().catch((k=>{j.RQr.logError(k,"Error handling opponent exit"),this.stateMachine.showThrownErrorDialog(k)}))}run(){return(0,G.sH)(this,void 0,void 0,(function*(){this.battleController.wonByDefault=!0,this.battleController.textLog.clearMessageQueue(),this.battleController.textLog.showMessage("DUEL_OPPONENT_LEFT"),yield Promise.all([this.battleController.setActiveUnit(null),this.battleController.rightTeam.teleportOut(),(()=>(0,G.sH)(this,void 0,void 0,(function*(){this.battleController.type===Ni.gu.MatchmakingDuel&&(yield this._networkHandler.onOpponentDisconnect(this.battleController.battleId))})))()]),this.stateMachine.goToState(DM.G,{battleResult:Ni.XK.Victory})}))}}(0,G.Cg)([(0,gM.d)("NetworkHandler"),(0,G.Sn)("design:type",TM)],RM.prototype,"_networkHandler",void 0);var PM=U(21945);class MM extends SP.V{constructor(){super(...arguments),this.allowVideoLessons=!1,this.onMessageReceived=new j.HN0,this._opponentExited=!1,this.wonByDefault=!1,this._messagePromises=new Set,this._stateOverrideStep=0,this.hideMergeRank=!1,this._modifierGridPrefab=null}destroy(){for(const k of Array.from(this._messagePromises.values()))k.reject("Exited state");this._messagePromises.clear(),this.onMessageReceived.dispose(),super.destroy()}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k);for(const k of this.getUnits())k.creature.teleportType=KP.H0.Astral,Ja.d.updateInjectedValues(k.petMergeUi,{[OM.GH.PetMergeBadge]:AM.y.toInjectionParams({atlas:q._.Ui_battle_revamp_json,frame:`${OM.Xc.PET_MERGE_BADGE_PREFIX}-default`})}),k.petMergeUi.active=k.petMergeUi.active&&!this.hideMergeRank}))}bindNetworkHandler(){j.wa5.getActiveScene().container.bind("NetworkHandler").to(TM).asSingleton()}onStartBattle(){const k=Object.create(null,{onStartBattle:{get:()=>super.onStartBattle}});return(0,G.sH)(this,void 0,void 0,(function*(){this.rightTeam.teleportInBehaviour=uM.pV.NonWizardUnits,this.useTurnTimer();for(const k of this.rightTeam.units)k.mpBar.GameObject.active=!0;return k.onStartBattle.call(this)}))}handleBattleStartError(k){return(0,G.sH)(this,void 0,void 0,(function*(){return k instanceof Error&&k.message&&(yield new Promise((B=>{K.q.instance.prodigy.open.messageBoxOkay(k.message,void 0,B)}))),!0}))}onPlayerAction(k){const B=Object.create(null,{onPlayerAction:{get:()=>super.onPlayerAction}});return(0,G.sH)(this,void 0,void 0,(function*(){var U;if(k.type===Q.EBattleAction.PowerUp){const B=(null===(U=this.activeUnit)||void 0===U?void 0:U.data.teamId)===this.leftTeam.id;if(k.correctAnswer)for(const k of this.leftTeam.units.filter((k=>k.isAlive()&&!k.missedTurnX.active)))this._stateMachine.stateUpdateQueue.unshift({type:Q.EBattleStateUpdate.ModifyMp,unitId:k.battleId,mpResult:1});else{const k=B?this.activeUnit:this.leftTeam.units.find((k=>this._nextUnitsInRound.includes(k.battleId)));k?k.missedTurnX.active=!0:j.VyI.log("Could not find first unit to skip",j.$bb.Error)}if(!B)return this._queuedAction=k,[]}return B.onPlayerAction.call(this,k)}))}alertActiveUnitMpEmpty(){return(0,G.sH)(this,void 0,void 0,(function*(){yield Promise.all(this.leftTeam.units.filter((k=>k.isAlive()&&!k.missedTurnX.active)).map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k.alertMpEmpty()})))))}))}getStateOverride(k){switch(null==k?void 0:k.type){case Q.EBattleStateUpdate.CustomEvent:if(k.name===vM.NextUnits)this._nextUnitsInRound=k.data;else if(k.name===vM.ShowElementBoost){const B=k.data,U=CM._.ELEMENT_BOOST_TEXT_CONFIG[B];U&&(Ja.d.loadWithInjectedValuesFromGUID(this._prefabLoader,Ei.l.ElementalBoostPopupText,{TEXT:this._localizer.getText(U.localizationKey),TEXT_COLOR:U.textColor,TEXT_STROKE_COLOR:U.textStrokeColor}),this.createModifierGridPrefab(B).then((k=>{this._modifierGridPrefab=k})).catch((k=>{j.VyI.log(`Failed to create modifier grid prefab: ${k}`,j.$bb.Error)})))}break;case Q.EBattleStateUpdate.CastSpell:k.id===this.battleConstants.fumbleSpellId&&(this.activeUnit.missedTurnX.active=!0,this.activeUnit.updateMp(0));break;case Q.EBattleStateUpdate.NewRound:if(0==this._stateOverrideStep++){this._showIndicator=!1,this._inRoundStart=!0,this.getUnits().filter((k=>k.isAlive())).forEach((k=>k.missedTurnX.active=!1));const B=[this.setActiveUnit(null),this.textLog.waitForMessageForMs(1e3,"BATTLE_ROUND_X",k.round)];return[RP,Promise.all(B)]}this._stateOverrideStep=0;break;case Q.EBattleStateUpdate.SetActiveUnit:if(this._inRoundStart)switch(this._stateOverrideStep++){case 0:return[IM.o];case 1:if(this.getUnits().find((B=>B.battleId===k.unitId)).data.teamId!==this.leftTeam.id){if(this._opponentExited){return this._stateMachine.stateUpdateQueue.find((k=>k.type===Q.EBattleStateUpdate.EndBattle))?super.getStateOverride():[RM]}return[SM]}default:this._showIndicator=!0,this._inRoundStart=!1,this._stateOverrideStep=0}break;case void 0:if(this._opponentExited)return[RM];if(this.activeUnit.data.teamId!==this.leftTeam.id)return[SM];if(this._queuedAction){const k=this._queuedAction;return this._queuedAction=null,[PM.N,k]}}return super.getStateOverride(k)}onVictory(){return(0,G.sH)(this,arguments,void 0,(function*(k=[],B=[]){const U=K.q.instance.prodigy.gameContainer.get("3a0-8003").refreshMembership();yield this.textLog.waitForMessage("COMBAT_WON"),yield U;const F=K.q.instance.prodigy.gameContainer.get("306-5359");yield F.updateChargedLevelsData();const G=K.q.instance.game.state.get(Ie.G.DuelMatchmaking);if(G.roomConfig){const U=Array.isArray(G.roomConfig.prize)?G.roomConfig.prize:[G.roomConfig.prize];k.push(...U.map((k=>({ID:k.id,quantity:k.amount,type:k.type})))),B&&B.push(...U.map((k=>({ID:k.id,quantity:Math.ceil(k.amount/2),type:k.type}))))}const j=k.length>0&&B.length>0;yield this.showBattleResult(!j,k,B)}))}onDefeat(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.textLog.waitForMessage("COMBAT_LOST");const k=K.q.instance.prodigy.gameContainer.get("306-5359");yield k.updateChargedLevelsData(),yield this.showBattleResult(!0,void 0,void 0,void 0,this.showVictoryBanner)}))}get showVictoryBanner(){return this.getEarnedXP().baseXp>0}completeBattle(k,B,U){const F="win"===k&&this.wonByDefault?"win (default)":k;super.completeBattle(F,B,U)}canBattleEndInstantly(){let k=!0;for(const B of this._stateMachine.stateUpdateQueue)if(B.type!==Q.EBattleStateUpdate.SetActiveUnit){k=!1;break}return k&&!this.isAnsweringQuestion}getEarnedXP(){const k=this._playerDataProvider.player,B=this.battleStats.spellsCast*Vt.s.get("GameConstants.PVP.STARS_PER_QUESTION"),U=k.hasMembership()?B*Vt.s.get("GameConstants.Battle.MEMBER_STARS_PERCENTAGE"):0,F=k.hasValidatedParentEmail()?B*Vt.s.get("GameConstants.Battle.VALID_PARENT_EMAIL_STARS_PERCENTAGE"):0;return{baseXp:B,memberXp:Math.ceil(U),totalNonMemberXp:Math.ceil(B+F),gainInPvp:!0}}createModifierGridPrefab(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=yield Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Ei.l.ModifierBar,{MODIFIERS:[xe.d.getElementalBoostModifierIconInjectionData(k)]});return B.transform.setPosition(cM.Q.MODIFIER_GRID_X_IN_BATTLE,cM.Q.MODIFIER_GRID_Y_IN_BATTLE),B}))}onEndGame(k){const B=Object.create(null,{onEndGame:{get:()=>super.onEndGame}});return(0,G.sH)(this,void 0,void 0,(function*(){var U;null===(U=this._modifierGridPrefab)||void 0===U||U.destroy(),this._modifierGridPrefab=null,yield B.onEndGame.call(this,k)}))}getUnitsToAward(){return this.leftTeam.units.map((k=>k.battleId))}getScalableBattleDrops(){return[]}getNonScalableBattleDrops(){return[]}getScalableMemberBattleDrops(){return[]}getNonScalableMemberBattleDrops(){return[]}}(0,G.Cg)([(0,Re.b)("e20-0fb0"),(0,G.Sn)("design:type",Wt.E)],MM.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,Re.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],MM.prototype,"_localizer",void 0),(0,G.Cg)([(0,Re.b)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],MM.prototype,"_prefabLoader",void 0);class NM extends MM{get leftTeamId(){return this._isHost?Q.ETeamId.Home:Q.ETeamId.Away}get rightTeamId(){return this._isHost?Q.ETeamId.Away:Q.ETeamId.Home}constructor(k){super(k),this.onOpponentJoined=new j.HN0,this._closeButtonPromise=new Promise((()=>{})),this._inviteRejectionPromise=new j.bnh,this.hideMergeRank=!0,this._localUserId=`${this._playerDataProvider.player.getID()}`,this._isHost=this._remoteConfig.hostUserId===this._localUserId,this._duelInviteService.onInviteCancelled.addOnce(this.handleInviteFailed,this),this._duelInviteService.onInviteFailed.addOnce(this.handleInviteFailed,this),this._duelInviteService.onInviteRejected.addOnce(this.handleInviteFailed,this)}destroy(){this._multiplayer.leaveLocationChannel().catch(j.RQr.createHandler("Error leaving channel")),this._duelInviteService.onInviteCancelled.remove(this.handleInviteFailed,this),this._duelInviteService.onInviteFailed.remove(this.handleInviteFailed,this),this._duelInviteService.onInviteRejected.remove(this.handleInviteFailed,this),this.onOpponentJoined.dispose(),super.destroy()}getLoadingScreen(k){const B=new yM.P(this._playerDataProvider.player,this._localConfig.opponent);return B.data=Object.assign(Object.assign(Object.assign({},B.data),k),{showCancel:this._isHost}),this._closeButtonPromise=new Promise(((k,U)=>{B.onCloseClicked.addOnce((()=>U()))})),this.onOpponentJoined.addOnce((()=>{B.hideCancelButton()})),B}requestBattleStart(k){const B=Object.create(null,{requestBattleStart:{get:()=>super.requestBattleStart}});return(0,G.sH)(this,void 0,void 0,(function*(){const U=`${this._localConfig.opponent.getID()}`,F=this._featureFlagsProvider.getValue("pvpInviteTimeout",Vt.s.get("GameConstants.PVP.INVITE_TIMEOUT")),$=parseInt(F,10),H=j.Egh.timeout($).then((()=>{throw new Error("Timed out waiting for "+(this._isHost?"guest":"host"))}));if(this._isHost){const U=`${this._localConfig.opponent.getID()}`,F=this.waitForMessage((k=>"playerJoined"===k.type&&k.playerInfo.userID===U||"userList"===k.type&&!!k.userList.find((k=>k.userID===U))));yield this._multiplayer.joinLocationChannel(this._localConfig.channelName,this.processMessage.bind(this),this.processSocketError.bind(this));try{yield Promise.race([F,H,this._closeButtonPromise,this._inviteRejectionPromise]).catch((k=>(0,G.sH)(this,void 0,void 0,(function*(){return j.VyI.log(`Cancelling invite: ${j.RQr.stringify(k)}`,j.$bb.Verbose),this._duelInviteService.cancelInvite(this._localConfig.opponent.getID()),Promise.reject(new Error(k))})))),this.onOpponentJoined.dispatch();const U=B.requestBattleStart.call(this,k),$=this.waitForMessage((k=>"broadcastAction"===k.type&&k.actionInfo.type===pM.GuestValidated));return yield Promise.all([U,Promise.race([H,$])]),yield U}catch(e){throw this._multiplayer.leaveLocationChannel().catch(j.RQr.createHandler("Error leaving channel")),e}}else{const B=this.waitForMessage((k=>"broadcastAction"===k.type&&k.actionInfo.type===pM.InitialBattleState));yield this._multiplayer.joinLocationChannel(this._localConfig.channelName,this.processMessage.bind(this),this.processSocketError.bind(this));try{yield Promise.race([B,H]);const F=(yield B).actionInfo.data;return yield this._networkHandler.joinDuel(U,k.roomId),F}catch(e){throw this._multiplayer.leaveLocationChannel().catch(j.RQr.createHandler("Error leaving channel")),e}}}))}waitForMessageType(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.waitForMessage((B=>B.type===k))}))}waitForMessage(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=new j.bnh;this._messagePromises.add(B);const U=F=>{"broadcastAction"===F.type&&F.actionInfo.toUserId&&F.actionInfo.toUserId!==this._localUserId||k(F)&&(this._messagePromises.delete(B),this.onMessageReceived.remove(U),B.resolve(F))};return this.onMessageReceived.add(U),B}))}processMessage(k){var B,U;if("playerLeft"===k.type){for(const k of Array.from(this._messagePromises.values()))k.reject("Opponent left");this._messagePromises.clear(),this._opponentExited=!0,((null===(B=this._stateMachine)||void 0===B?void 0:B.currentState)instanceof _M.W||(null===(U=this._stateMachine)||void 0===U?void 0:U.currentState)instanceof SM)&&this._stateMachine.goToState(OP.B)}else"broadcastAction"!==k.type||k.actionInfo.toUserId&&k.actionInfo.toUserId!==this._localUserId||k.actionInfo.type!==pM.StateUpdate||this._stateMachinePromise.then((()=>{this._stateMachine.stateUpdateQueue.push(...this.processBattleStateUpdates(k.actionInfo.data))})).catch(j.RQr.createHandler("Error adding message to state update queue"));this.onMessageReceived.dispatch(k)}processSocketError(k){var B;j.RQr.logError(k,"Error from multiplayer socket"),null===(B=this._stateMachine)||void 0===B||B.showThrownErrorDialog(k)}handleInviteFailed(){this._inviteRejectionPromise.reject()}}(0,G.Cg)([(0,Re.b)("80c-6fa4"),(0,G.Sn)("design:type",He)],NM.prototype,"_featureFlagsProvider",void 0),(0,G.Cg)([(0,gM.d)("RemoteConfig"),(0,G.Sn)("design:type",Object)],NM.prototype,"_remoteConfig",void 0),(0,G.Cg)([(0,Re.b)("779-a746"),(0,G.Sn)("design:type",Ue.d)],NM.prototype,"_multiplayer",void 0),(0,G.Cg)([(0,Re.b)("636-444c"),(0,G.Sn)("design:type",Object)],NM.prototype,"_duelInviteService",void 0);var xM=U(65725);class LM extends IP.Z{constructor(k,B,U){super(),this._targetUnit=k,this._replacementUnit=B,this._cloudRadius=U}enter(){this.transform().then((()=>this.stateMachine.goToState(OP.B))).catch(j.RQr.createHandler("Error transforming unit"))}transform(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.game,B=this._targetUnit.getHitboxCenter(),U=()=>{Do.M.radialCloud(k,this._targetUnit.creature.rootContainer.parent,B.x,B.y,this._cloudRadius,q._.Boss_aspen_extras_json,"purple-cloud")};for(let F=6;F>0;--F)U(),yield j.Egh.timeout(200);U(),this._targetUnit.creature.creatureGameObject.destroy(),this._targetUnit.setData(this._replacementUnit,this._targetUnit.creature.teleportType,this._targetUnit.controllerUnit),yield this._targetUnit.loadPromise,this._targetUnit.creature.creatureGameObject.active=!0}))}}var kM,BM,UM=U(80313);class FM extends IP.Z{constructor(k){super(),this._waitTimeMs=k}enter(){window.setTimeout((()=>this.stateMachine.goToState(OP.B)),this._waitTimeMs)}}!function(k){k[k.NotStarted=0]="NotStarted",k[k.ClearActiveUnit=1]="ClearActiveUnit",k[k.Wait=2]="Wait",k[k.Smoke=3]="Smoke",k[k.Dialogue=4]="Dialogue"}(kM||(kM={}));class GM extends UP{constructor(){super(...arguments),this._endSequenceStep=kM.NotStarted,this._lastSoundTime=0}getAssetList(){return[...super.getAssetList(),Z.c.Sfx_crystalbreak,Z.c.Sfx_crystalclumpdestroy]}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k),this._yeti=this.rightTeam.units.find((k=>k.type===Ni.uj.Boss)),this._yeti.loadPromise.then((()=>{this._yeti.creature.addBarrier(KP.HW.LegacySprite,null,0,-50)})).catch(j.RQr.createHandler("Error adding yeti barrier"));const U=this.rightTeam.units.filter((k=>k.type===Ni.uj.Object));for(const k of U){const B=k.creature;B.teleportType=KP.H0.None,B.shouldFadeOnDefeat=!1,B.animator.spine.addAnimationRemap("idle","idle-1"),B.animator.playAnimation("idle-1",!0),k.onHpSet.add(((U,F)=>{if(U{B.animator.playAnimation(`idle-${$+1}`,!0)}));const k=Date.now(),U=k-this._lastSoundTime,F=U{K.q.instance.prodigy.audio.playSFXFromGUID(Z.c.Sfx_crystalbreak),$>=GM.CRYSTAL_BREAK_THRESHOLDS.length-1&&j.Egh.timeout(GM.CRYSTAL_DESTROY_DELAY_MS).then((()=>{K.q.instance.prodigy.audio.playSFXFromGUID(Z.c.Sfx_crystalclumpdestroy)}))}))}}}))}}))}getStateOverride(k){if(this._endSequenceStepk>B))}}GM.CRYSTAL_BREAK_THRESHOLDS=[.95,.5,0,-1],GM.CRYSTAL_DESTROY_DELAY_MS=2700,GM.MULTIPLE_CRYSTAL_SFX_DELAY_MS=100,function(k){k.WaveStart="WaveStart",k.WaveEnd="WaveEnd",k.StageStart="StageStart",k.StageEnd="StageEnd",k.HomeTeamRevived="HomeTeamRevived",k.MathStreakUpdated="MathStreakUpdated"}(BM||(BM={}));var jM=U(12022),$M=U(86283),HM=U(18332),VM=U(54174),WM=U(61895);class qM extends IP.Z{enter(){this.battleController.attemptEscape().catch((k=>{j.RQr.logError(k,"Error in EscapeBattleState"),this.stateMachine.showThrownErrorDialog(k)}))}}class KM extends IP.Z{enter(){WM.B.openQuickQuizCancelledPopup((()=>{this.stateMachine.goToState(qM)}),!1)}}var zM=U(78355),YM=U(69297),QM=U(28496),XM=U(73032);class ZM extends XM.o{constructor(){super(...arguments),this._matchFinishedMenuOpened=new j.bnh,this._noMoreRevivesModalShownOrSkipped=new j.bnh}destroy(){this._matchFinishedMenu=void 0}setStateMachine(k){this._stateMachine=k}mayShowPostBattleMenus(){if(!j.Aq$.isDefined(this._stateMachine))return!1;const k=[QM.u,zM.$,DM.G,YM.L].some((k=>this._stateMachine.currentState instanceof k)),B=this._stateMachine.stateUpdateQueue.some((k=>k.type===Q.EBattleStateUpdate.EndBattle));return k||B}enable(k){const B=Object.create(null,{enable:{get:()=>super.enable}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.enable.call(this,k),this.mayShowPostBattleMenus()&&(yield this._noMoreRevivesModalShownOrSkipped,this.forceCloseNoMoreRevivesModal(),yield this._matchFinishedMenuOpened,this.forceCloseMatchFinishedMenu())}))}onMatchFinishedMenuOpened(k,B){this._resolveMatchFinishedMenu=B,this._matchFinishedMenu=k,this._matchFinishedMenuOpened.resolve()}onNoMoreRevivesModalOpenedOrSkipped(){this._noMoreRevivesModalShownOrSkipped.resolve()}onNoMoreRevivesModalOpened(k){this._noMoreRevivesModal=k,this._noMoreRevivesModalShownOrSkipped.resolve()}forceCloseNoMoreRevivesModal(){j.Aq$.isDefined(this._noMoreRevivesModal)&&(this._noMoreRevivesModal.destroy(),this._noMoreRevivesModal=void 0)}forceCloseMatchFinishedMenu(){var k;j.Aq$.isDefined(this._matchFinishedMenu)&&(null===(k=this._matchFinishedMenu)||void 0===k||k.destroyDeferred(),this._resolveMatchFinishedMenu())}}class JM extends SP.V{get battleUI(){return this._battleUI}constructor(k){super(k),this.type=Ni.gu.LootDash,this._paintedBackgroundZoomConfigs=Object.assign(Object.assign({},SP.Y),{fgStartScale:1,fgEndScale:1.5}),this._hasSeenStageIntro=!1,this.postBattleExpressModeController=new ZM,this._lootDashManager=K.q.instance.prodigy.gameContainer.get("cfe-9c2c"),this._lootDashManager.setup(),this._matchController=this._lootDashManager.matchController,this._baseLocalizer=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),this._lootDashSegment=K.q.instance.prodigy.gameContainer.get("c47-20b6").lootDash}destroy(){var k;this._battleUIPrefabRoot.destroy(),this._lootDashManager.cleanupMatch(this._matchController),null===(k=this.postBattleExpressModeController)||void 0===k||k.destroy(),super.destroy()}getAssetList(){return[...super.getAssetList(),ah.B.Loot_dash_endgame_placing_screen,ah.B.Loot_dash_endgame_match_completed,ah.B.Loot_dash_stage_intro,ah.B.Loot_dash_revive,ah.B.Loot_dash_matchboard_done,ah.B.Loot_dash_matchboard_move,ah.B.Loot_dash_loot_bag_added,ah.B.Loot_dash_math_streak_complete,ah.B.Loot_dash_math_streak_increased,ah.B.Loot_dash_math_streak_reset]}playIntroSequence(){return(0,G.sH)(this,void 0,void 0,(function*(){}))}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){var U;const F=k.state,G=F.allStageConfigs;this._matchController.setStageData(G),this._lootDashSegment.sendRunStartedEvent(),this._matchController.onBattleDataChanged.active=!1,this._matchController.setCurrentStageData(G[F.currentStageIndex]),this._matchController.setCurrentWaveIndex(F.currentWaveIndex),(null===(U=F.mathStreak)||void 0===U?void 0:U.currentStreak)&&this._matchController.setCurrentMathStreak(F.mathStreak.currentStreak),F.lootBags&&this._matchController.setLootBagData(F.lootBags),this._matchController.revivesRemaining=F.revivesAvailable,this._matchController.onBattleDataChanged.active=!0,yield B.initBattlePrefab.call(this,k),this.postBattleExpressModeController.setStateMachine(this._stateMachine);for(const k of this.rightTeam.units)k.cleanUpOnDefeat=!0,k.onUnitDefeated.add((()=>{this.onRightTeamUnitDefeated(k)}));this._battleUIPrefabRoot=yield Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Ei.l.LootDashBattleUI,{[tr.eV.ExitButtonCallback]:()=>{this._exitDialogueMenu=K.q.instance.prodigy.open.confirmationDialog(new yh.k(this._baseLocalizer.getText("DIALOG_LEAVE"),(()=>{this._exitDialogueMenu=void 0,this.beginEndingBattleAndGotoState([qM])}),this._baseLocalizer.getText("DIALOG_STAY"),(()=>K.q.instance.prodigy.open.menuCloseAll()),void 0,Jc.E.Small,void 0,this._baseLocalizer.getText("LOOT_DASH_EXIT_PROMPT_TITLE"),this._baseLocalizer.getText("LOOT_DASH_EXIT_PROMPT_BODY")))}},this._prefabRoot),this._battleUI=this._battleUIPrefabRoot.findComponentInChildren(HM.I)}))}getStateOverride(k){if(this.isLootDashBattleStateUpdate(k))switch(k.name){case BM.WaveStart:this._matchController.setCurrentWaveIndex(k.data.waveIndex),this._lootDashSegment.sendWaveStartedEvent();break;case BM.WaveEnd:return this._stateMachine.stateUpdateQueue.shift(),this._matchController.setLootBagData(k.data.lootBagData),this._lootDashSegment.sendWaveCompletedEvent(),$M.D.clearNewlyRescuableUnitsSeen(),this.sendLootDashQuestEvent(),[RP,this._battleUI.showWaveCompletedLootBagAnimation(this._latestDefeatedRightUnitPosition)];case BM.StageStart:this._stateMachine.stateUpdateQueue.shift(),this._matchController.setCurrentStageData(k.data.stageData);const B=this._battleUI.showStageIntro(k.data.stageData.stageType);B.then((()=>{this._forceEndBattle||(this._matchController.stageIntroComplete(),this._hasSeenStageIntro||(this.highlightRescuableUnits().catch(j.RQr.createHandler("Error highlighting rescuable units")),this._hasSeenStageIntro=!0))})).catch(j.RQr.createHandler("Failed to play stage intro sequence")),this.setupCustomSequence(B),this._lootDashSegment.sendStageStartedEvent();break;case BM.StageEnd:this._lootDashSegment.sendStageCompletedEvent();break;case BM.HomeTeamRevived:return this._stateMachine.stateUpdateQueue.shift(),this.setupCustomSequence(this._battleUI.showReviveSequence(k.data.revivesRemaining)),this._lootDashManager.matchController.revivesRemaining=k.data.revivesRemaining,this._lootDashSegment.sendReviveUsedEvent(),[FM,1500];case BM.MathStreakUpdated:this._matchController.setCurrentMathStreak(k.data.currentStreak,k.data.lootBagData)}return 0===this._stateMachine.stateUpdateQueue.length&&j.Aq$.isDefined(this._customSequencePromise)?[RP,this._customSequencePromise]:super.getStateOverride(k)}handleStateChange(k){super.handleStateChange(k),this._battleUI.setExitButtonEnabled(this.isChoosingSpell)}sendLootDashQuestEvent(){const k=K.q.instance.prodigy.gameContainer.get("a25-68f4"),B={params:{taskEventType:dh.Z7.Battle,battleType:Ni.gu.LootDash,allies:this.leftTeam.units.map((k=>k.data)),enemies:this.rightTeam.units.map((k=>k.data))}};k.sendQuestEventViaHub(as.T.PLAY_ANY_BATTLE,B).catch(j.RQr.createHandler("Failed to send Loot Dash battle quest event for Loot Dash wave"))}onRightTeamUnitDefeated(k){this._latestDefeatedRightUnitPosition=k.GameObject.transform.worldPosition}setupCustomSequence(k){this._customSequencePromise=k,this._customSequencePromise.catch(j.RQr.createHandler("Failed to play custom sequence")).finally((()=>this._customSequencePromise=void 0))}isLootDashBattleStateUpdate(k){return(null==k?void 0:k.type)===Q.EBattleStateUpdate.CustomEvent&&(null==k?void 0:k.name)in BM}onEndGame(k){const B=Object.create(null,{onEndGame:{get:()=>super.onEndGame}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.onEndGame.call(this,k,!1),this._matchController.completeMatch(k),k&&(yield this._battleUI.movePlayerPinToEndOfMatchboard()),yield this._battleUI.hideAll(),this._matchController.lootDashMatchData.matchCompletionState===hP.Cr.Win?this.showConfetti():this._matchController.lootDashMatchData.matchCompletionState===hP.Cr.Loss&&(yield this.showNoMoreRevivesModal()),this.postBattleExpressModeController.onNoMoreRevivesModalOpenedOrSkipped(),yield this._battleUI.showMatchFinished(),this._battleUIPrefabRoot.destroy()}))}showConfetti(){this._confetti||(this._confetti=new j._mx,this._confetti.addComponent(j.dLy),this._confetti.layer=vh.E.Ui,gC.E.addConfetti(this._confetti),j.wa5.getActiveScene().addGameObject(this._confetti))}hideConfetti(){var k;null===(k=this._confetti)||void 0===k||k.destroy()}endLootDashQuickQuiz(){this.beginEndingBattleAndGotoState([KM])}showNoMoreRevivesModal(){return(0,G.sH)(this,void 0,void 0,(function*(){if(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.isPlayingAtSchool())return;const k=yield WM.B.getInjectedValuesForNoMoreRevivesModal(this._matchController.config);if(!k)return;const B=yield Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Ei.l.LootDashNoMoreRevivesModal,k);this.postBattleExpressModeController.onNoMoreRevivesModalOpened(B),yield B.onDestroy.asPromise()}))}onVictory(k,B,U){const F=Object.create(null,{onVictory:{get:()=>super.onVictory}});return(0,G.sH)(this,void 0,void 0,(function*(){yield this.loadMatchFinishedMenu(),yield F.onVictory.call(this,this._matchController.getLootBagRewards(),this._matchController.getMemberLootBagRewards(),U)}))}onDefeat(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.onUnfinishedRun()}))}onEscape(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.onUnfinishedRun()}))}onUnfinishedRun(){const k=Object.create(null,{onDefeat:{get:()=>super.onDefeat}});return(0,G.sH)(this,void 0,void 0,(function*(){jM.G.hasMetMinimumVictoryRequirement(this._matchController.lootDashMatchData.lootBagData)?yield this.onVictory():(yield this.loadMatchFinishedMenu(),yield k.onDefeat.call(this,!0))}))}onNewRound(){}loadMatchFinishedMenu(){return(0,G.sH)(this,void 0,void 0,(function*(){for(;!this._matchController.lootDashMatchData.placement;)yield this._matchController.onBattleDataChanged.asPromise();const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").isMember(),B=this.getEarnedXP();this._lootDashSegment.sendRunCompletedEvent(B.totalNonMemberXp+(k?B.memberXp:0),this._matchController.lootDashMatchData.placement);const U=this.getInjectedValuesForMatchFinishedMenu(),F=K.q.instance.prodigy.world.getZone(K.q.instance.prodigy.world.getCurrentZone()).bgmID;return U[tr.eV.MatchFinishedRewardsEarned]?K.q.instance.prodigy.audio.playSFXFromGUID(ah.B.Loot_dash_endgame_placing_screen,(()=>{K.q.instance.prodigy.audio.playBGM(F,!0)})):K.q.instance.prodigy.audio.playBGM(F,!0),new Promise((k=>{Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Ei.l.LootDashMatchFinishedMenu,Object.assign(Object.assign({},U),{[tr.eV.MatchFinishedButtonCallback]:()=>{this.hideConfetti(),k()}})).then((B=>{this.postBattleExpressModeController.onMatchFinishedMenuOpened(B,k)})).catch(j.RQr.createHandler("LootDashBattleController: Failed to load the loot dash match finished menu"))}))}))}getInjectedValuesForMatchFinishedMenu(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0"),B=jo.E.createMockPlayerDataProvider(),U=this._matchController.lootDashMatchData,F=U.matchCompletionState===hP.Cr.Win,G=U.placement>=1&&U.placement<=3,j=jM.G.getLootBagsCount(U.lootBagData),$=F?G?this._baseLocalizer.getText("LOOT_DASH_MATCH_FINISHED_TOP_THREE_INFO_TEXT"):this._baseLocalizer.getText("LOOT_DASH_MATCH_FINISHED_NOT_TOP_THREE_INFO_TEXT"):j>0?this._baseLocalizer.getText("LOOT_DASH_MATCH_UNFINISHED_REWARDS_INFO_TEXT"):this._baseLocalizer.getText("LOOT_DASH_MATCH_UNFINISHED_NO_REWARDS_INFO_TEXT"),H=F?G?VM._c.Fireworks:VM._c.FireworksLess:j>0?VM._c.FireworksSingle:VM._c.None,V=F?this._baseLocalizer.getText("LOOT_DASH_MATCH_FINISHED_NOT_TOP_THREE_PLACEMENT_TEXT"):this._baseLocalizer.getText("LOOT_DASH_MATCH_UNFINISHED_REWARDS_PLACEMENT_TEXT"),W={"377-3e7b":B,[tr.n7.WizardInjectionConfiguredAppearance]:k.getAppearance(),[tr.eV.MatchFinishedLootBagAmountText]:`x${j}`,[tr.eV.MatchFinishedShowNumberedPlacement]:G,[tr.eV.MatchFinishedInfoText]:$,[tr.eV.MatchFinishedPlacementReplacementText]:V,[tr.eV.MatchFinishedRewardsEarned]:j>0,[tr.eV.MatchFinishedMatchCompleted]:F,[tr.eV.MatchFinishedFireworkAnimationName]:H};if(F){const k=1===U.placement?"st":2===U.placement?"nd":"rd";W[tr.eV.MatchFinishedPlacement]=U.placement,W[tr.eV.MatchFinishedPlacementSuffix]=k}return W}setLootDashInfoWidgetsVisibility(k){this.battleUI.setInfoWidgetsVisibility(k).catch((k=>j.RQr.logError(k,"Failed to set Wizard Dash info widgets visibility for rescue flow.")))}getScalableBattleDrops(){return[]}getNonScalableBattleDrops(){return[]}getScalableMemberBattleDrops(){return[]}getNonScalableMemberBattleDrops(){return[]}beginEndingBattleAndGotoState(k,B={}){this.forceCloseExitConfirmationMenuIfOpen(),super.beginEndingBattleAndGotoState(k,B)}forceCloseExitConfirmationMenuIfOpen(){j.Aq$.isDefined(this._exitDialogueMenu)&&(this._exitDialogueMenu.close(),this._exitDialogueMenu=void 0)}canBattleEndInstantly(){return super.canBattleEndInstantly()&&!j.Aq$.isDefined(this._exitDialogueMenu)}showSpellCards(k,B){var U,F;super.showSpellCards(k,B),null===(U=this.spellCardsController)||void 0===U||U.targetController.onRescueCurrencyBalanceHidden.add((()=>this.setLootDashInfoWidgetsVisibility(!0))),null===(F=this.spellCardsController)||void 0===F||F.targetController.onRescueCurrencyBalanceShown.add((()=>this.setLootDashInfoWidgetsVisibility(!1)))}}var tN=U(26460);class eN extends IP.Z{enter(){this.play().catch((k=>{j.RQr.logError(k,"Error running shell game"),this.stateMachine.showThrownErrorDialog(k)}))}play(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.game.add.tween.bind(K.q.instance.game.add),B=this.stateMachine.awayTeam.units,U=B.length>2?350:250,F=wn.o.integerInRange(9,12);for(let G=0;G{q.setPosition(X.x+et.x,X.y+et.y),K.setPosition(Z.x-et.x,Z.y-et.y),!et.swapped&&et.value>.5&&([V.layerLevel,W.layerLevel]=[W.layerLevel,V.layerLevel],[V.GameObject.layer,W.GameObject.layer]=[W.GameObject.layer,V.GameObject.layer],[V.creature.creatureGameObject.layer,W.creature.creatureGameObject.layer]=[W.creature.creatureGameObject.layer,V.creature.creatureGameObject.layer],et.swapped=!0)})),yield it.onTweenComplete.asPromise()}this.stateMachine.goToState(OP.B)}))}}let iN=class extends wM.m{joinDuel(){return(0,G.sH)(this,void 0,void 0,(function*(){}))}sendWaitPing(){return(0,G.sH)(this,void 0,void 0,(function*(){return{wait:!0}}))}};iN=(0,G.Cg)([(0,tt.injectable)()],iN);class sN extends SM{enter(){const k=this.stateMachine.stateUpdateQueue[0];k.type===Q.EBattleStateUpdate.CustomEvent&&k.name===vM.Thinking?(this._thinkingEvent=k,this.stateMachine.stateUpdateQueue.shift(),this._withheldUpdates=this.stateMachine.stateUpdateQueue.splice(0,this.stateMachine.stateUpdateQueue.length),super.enter()):this.stateMachine.goToState(OP.B)}performWaitPings(){const{botConfig:k}=j.wa5.getActiveScene().container.get("LocalConfig");return new j.kBN(((B,U)=>{(()=>(0,G.sH)(this,void 0,void 0,(function*(){if(this._thinkingEvent.data.roundStartQuestion){const B=Date.now()-j.wa5.getActiveScene().container.get("84a-1738"),U=j.cj9.clamp(this._thinkingEvent.data.delay-B,0,1e3*k.timings.questionAnswer.maxTimeOverPlayer);yield j.Egh.timeout(U)}else yield j.Egh.timeout(this._thinkingEvent.data.delay);this.stateMachine.stateUpdateQueue.push(...this._withheldUpdates),this.battleController.onMessageReceived.dispatch()})))().catch(U)}))}}var nN;!function(k){k[k.None=0]="None",k[k.MpGain=1]="MpGain",k[k.MpUsage=2]="MpUsage",k[k.SpellCast=3]="SpellCast",k[k.NewRound=4]="NewRound",k[k.SpellCooldown=5]="SpellCooldown"}(nN||(nN={}));class aN extends MM{constructor(){super(...arguments),this.hideMergeRank=!1,this._isNewRound=!1}get leftTeamId(){return Q.ETeamId.Home}get rightTeamId(){return Q.ETeamId.Away}bindNetworkHandler(){j.wa5.getActiveScene().container.bind("NetworkHandler").to(iN).asSingleton()}getLoadingScreen(){return K.q.instance.game.state.get(Ie.G.DuelMatchmaking)}requestBattleStart(k){const B=Object.create(null,{requestBattleStart:{get:()=>super.requestBattleStart}});return(0,G.sH)(this,void 0,void 0,(function*(){const U=yield B.requestBattleStart.call(this,k);return this.getLoadingScreen().consumeStadiumRoomEntryCost(),yield new Promise((k=>this._activePlayer.forceSaveCharacter(k))),U}))}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){const U=H().find(k.state.units,(k=>k.teamId===this.rightTeamId&&k.type===Ni.uj.Wizard)),F=new Oe.a(K.q.instance.game);F.appearance.init(Object.assign(Object.assign({},U.appearance),{name:U.appearance.name})),F.equipment.init(Object.assign({},U.equipment)),F.data.level=U.level,j.Aq$.isDefined(U.chargedLevel)&&(F.data.chargedLevelData={chargedLevel:U.chargedLevel,chargedLevelCap:U.chargedLevel,chargedLevelsEnabled:U.chargedLevel>0}),U.appearance.morph&&F.setData({playerTransformation:{transformType:U.appearance.morph.type,transformID:U.appearance.morph.ID}}),yield this.getLoadingScreen().showOpponent(F,k.state.botConfig.streakModifiers.streakOffset),yield B.initBattlePrefab.call(this,k)}))}onStartBattle(){const k=Object.create(null,{onStartBattle:{get:()=>super.onStartBattle}});return(0,G.sH)(this,void 0,void 0,(function*(){const B=this.rightTeam.wizard;return B&&(B.unitNameForSegment=this._stateMachine.segment.duelsStadium.botPersonality),k.onStartBattle.call(this)}))}destroy(){super.destroy(),this.getLoadingScreen().shutdown()}processBattleStateUpdates(k){var B;const{botConfig:U}=j.wa5.getActiveScene().container.get("LocalConfig");let F=null===(B=this.activeUnit)||void 0===B?void 0:B.data.teamId,G=nN.None;for(let j=0;j0?($=nN.MpGain,F=G!==nN.MpGain):($=nN.MpUsage,F=G!==nN.MpUsage&&G!==nN.NewRound):B.type===Q.EBattleStateUpdate.ModifySpellCooldown&&($=nN.SpellCooldown),F){const F=B.type===Q.EBattleStateUpdate.CastSpell&&B.id===this.battleConstants.fumbleSpellId,G=$===nN.MpGain||F,H=G?U.timings.questionAnswer.timings:U.timings.spellChoiceTimings,V=this.getDelayTimeWithVarianceInMilliseconds(H.average,H.variance),W=G&&this._isNewRound,q={type:Q.EBattleStateUpdate.CustomEvent,name:vM.Thinking,data:{delay:V,roundStartQuestion:W}};k.splice(j,0,q),this._isNewRound=!1,++j}$!==nN.SpellCooldown&&(G=$)}}return k}getStateOverride(k){if((null==k?void 0:k.type)===Q.EBattleStateUpdate.CustomEvent&&k.name===vM.Thinking)return[sN];const B=super.getStateOverride(k);return(null==B?void 0:B[0])===SM?[sN]:B}getDelayTimeWithVarianceInMilliseconds(k,B){return k*(1+j.cj9.random(-B,B))*1e3}}(0,G.Cg)([(0,Re.b)("306-5359"),(0,G.Sn)("design:type",ye.W)],aN.prototype,"_activePlayer",void 0);class rN extends NM{constructor(){super(...arguments),this.hideMergeRank=!1}getLoadingScreen(){return K.q.instance.game.state.get(Ie.G.DuelMatchmaking)}requestBattleStart(k){const B=Object.create(null,{requestBattleStart:{get:()=>super.requestBattleStart}});return(0,G.sH)(this,void 0,void 0,(function*(){const U=yield B.requestBattleStart.call(this,k);return this.getLoadingScreen().consumeStadiumRoomEntryCost(),yield new Promise((k=>this._activePlayer.forceSaveCharacter(k))),U}))}destroy(){super.destroy(),this.getLoadingScreen().shutdown()}}(0,G.Cg)([(0,Re.b)("306-5359"),(0,G.Sn)("design:type",ye.W)],rN.prototype,"_activePlayer",void 0);class oN extends SP.V{getScalableBattleDrops(){var k;return this._localConfig.scaleGuaranteedDrops&&null!==(k=this._localConfig.guaranteedDrops)&&void 0!==k?k:[]}getNonScalableBattleDrops(){var k;return this._localConfig.scaleGuaranteedDrops?[]:null!==(k=this._localConfig.guaranteedDrops)&&void 0!==k?k:[]}}class hN extends SP.V{initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k),this._pumpkinfestBoss=this.rightTeam.units.find((k=>k.battleId===hN.PUMPKINFEST_BOSS_BATTLE_ID)),this._pumpkinfestBoss.size=lM.X.Medium}))}getUnitDataForTeam(k,B){const U=super.getUnitDataForTeam(k,B),F=U.find((k=>k.unitId===hN.PUMPKINFEST_BOSS_BATTLE_ID));return F&&(F.unitSlot=3),U}}hN.PUMPKINFEST_BOSS_BATTLE_ID="pumpkinfestBoss";var cN=U(90351),dN=U(68607),lN=U(90804),uN=U(94596),fN=U(61404);class bN extends V.Filter{constructor(k=0,B=0,U=20,F=.3){super(V.defaultFilterVertex,fN.Q.getWaveFadeFragment(),{time:k,fade:B,frequency:U,amplitude:F}),this.timeSeconds=k}apply(k,B,U,F){this.uniforms.time=this.timeSeconds,this.uniforms.fade=this.fadeAmount,this.uniforms.frequency=this.frequency,this.uniforms.amplitude=this.amplitude,k.applyFilter(this,B,U,F)}}let pN=class extends uN.b{constructor(){super(...arguments),this.DEFAULT_FADE_DURATION_MS=2e3,this.waveAmplitude=.1,this.waveFrequency=6,this.waveSpeed=2*Math.PI,this._fadeInDurationMs=this.DEFAULT_FADE_DURATION_MS,this._fadeOutDurationMs=this.DEFAULT_FADE_DURATION_MS,this.useAlpha=!0,this._fadeInEase=cN.i.LinearNone,this._fadeOutEase=cN.i.LinearNone}initialize(){super.initialize(),this._transitionFilter=new bN(K.q.instance.game.time.timeMS/1e3*this.waveSpeed,this.fadeValue,this.waveFrequency,this.waveAmplitude),this._filterList.push(this._transitionFilter)}fadeIn(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.fade(0,1,this._fadeInDurationMs,this._fadeInEase)}))}fadeOut(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.fade(1,0,this._fadeOutDurationMs,this._fadeOutEase)}))}fade(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._tween)return void j.VyI.log("Cannot start fade, a fade is already in progress.",j.$bb.Warning);this.fadeValue=k;const G={fade:k};this._tween=K.q.instance.game.add.tween(G,this).to({fade:B},U,cN.K.getEasingFunctionFromEnum(F),!0),this._tween.onUpdate.add((()=>{this.fadeValue=G.fade})),yield this._tween.onTweenComplete.asPromise(),this.fadeValue=B,this._tween=null}))}update(){super.update(),this._transitionFilter&&(this._transitionFilter.timeSeconds=K.q.instance.game.time.timeMS/1e3*this.waveSpeed,this._transitionFilter.fadeAmount=this.useAlpha?this.fadeValue:1,this._transitionFilter.amplitude=(1-this.fadeValue)*this.waveAmplitude,this._transitionFilter.frequency=this.waveFrequency*Math.PI*2)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],pN.prototype,"waveAmplitude",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],pN.prototype,"waveFrequency",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],pN.prototype,"waveSpeed",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],pN.prototype,"_fadeInDurationMs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],pN.prototype,"_fadeOutDurationMs",void 0),(0,G.Cg)([(0,j.gfw)(cN.i),(0,G.Sn)("design:type",String)],pN.prototype,"_fadeInEase",void 0),(0,G.Cg)([(0,j.gfw)(cN.i),(0,G.Sn)("design:type",String)],pN.prototype,"_fadeOutEase",void 0),pN=(0,G.Cg)([(0,j.EVk)("BattleBackgroundTransitionFilter",rc.Y.effect)],pN);var vN,gN=U(45855);!function(k){k[k.OldBackgroundsOut=0]="OldBackgroundsOut",k[k.NewBackgroundsLoaded=1]="NewBackgroundsLoaded"}(vN||(vN={}));class mN{static swapBackgrounds(k,B){return(0,G.sH)(this,arguments,void 0,(function*(k,B,U=[],F=[],$){const H=_P.l.guaranteeArray(B);(0,rs.v)(k.length===H.length);const V=[];k.forEach(((k,B)=>{const U=k.GameObject.addComponent(pN);U.fadeValue=1,U.applyFilter(),U.useAlpha=B>0,V.push(U)})),U.forEach((k=>{const B=k.addComponent(pN);B.fadeValue=1,B.applyFilter(),B.useAlpha=!1,V.push(B)}));const W=yield this.createFilteredImage(nr.q.Battle_interstitial_bg,"interstitial",gN.g),q=[];q.push(...V.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k.fadeOut()}))))),q.push(W.fadeIn()),yield Promise.all(q),yield null==$?void 0:$(vN.OldBackgroundsOut),V.forEach((k=>{k.destroy()})),V.length=0;const z=k.map((k=>{const B=k.GameObject,U=k.sprite.key;return k.destroy(),pn.K.safeUnloadImage(U),B}));for(const G of U)G.destroy();const Y=new Promise((k=>{K.q.instance.prodigy.load.assets(H,k)})),Q=j.Egh.timeout(mN.MINIMUM_TRANSITION_WAIT_TIME_MS);yield Promise.all([Y,Q]),yield Promise.all(z.map(((k,B)=>(0,G.sH)(this,void 0,void 0,(function*(){const U=k.addComponent(Eo._);yield U.setAsset(H[B]),U.sizeToSourceImage();const F=U.GameObject.addComponent(pN);F.fadeValue=0,F.applyFilter(),F.useAlpha=B>0,V.push(F)}))))),F.forEach((k=>{k.active=!0;const B=k.addComponent(pN);B.fadeValue=0,B.applyFilter(),B.useAlpha=!1,V.push(B)})),yield null==$?void 0:$(vN.NewBackgroundsLoaded);const X=[];X.push(...V.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k.fadeIn()}))))),X.push(W.fadeOut()),yield Promise.all(X),V.forEach((k=>{k.destroy()})),W.GameObject.destroy()}))}static createFilteredImage(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F=new j._mx;F.layer=B,j.wa5.getActiveScene().addGameObject(F);const G=F.addComponent(j.XVE);G.pivot.set(0,0),G.setAnchoredPivotOffset(0,0),G.fullWidth=K.q.instance.game.width,G.fullHeight=K.q.instance.game.height;const $=F.addComponent(Eo._);yield $.setAsset(k);const H=F.addComponent(U);return H.applyFilter(),H}))}}mN.MINIMUM_TRANSITION_WAIT_TIME_MS=2e3;class yN extends SP.V{constructor(){super(...arguments),this._stateOverrideStep=0,this._puppetMasterDefeatSequenceEnd=new j.bnh,this._activeUnitIndicatorStep=0,this._unitMpDrainSpines=new Map}getAssetList(){return[...this._baseAssets,ah.B.Sfx_large_explosion_with_glass,ah.B.Sfx_short_explosion_with_rubble_A,ah.B.Sfx_short_explosion_with_rubble_B,ah.B.Sfx_medium_explosion_with_rubble_A,ah.B.Sfx_medium_explosion_with_rubble_B,ah.B.Sfx_long_explosion_with_rubble_A,ah.B.Sfx_long_explosion_with_rubble_B,ah.B.Sfx_puppet_master_spell_cast,ah.B.Sfx_puppet_master_spell_map_transition,ah.B.Sfx_puppet_master_spell_downpour,ah.B.Sfx_puppet_master_spell_mp_drain,ah.B.Sfx_puppet_master_spell_beam_travel,ah.B.Sfx_puppet_master_spell_beam_impact,ah.B.Sfx_puppet_master_spell_pet_steal_travel,ah.B.Sfx_puppet_master_spell_volcano,ah.B.Sfx_puppet_master_battle_ground_rumble,ah.B.Sfx_puppet_master_battle_heavenly_harmonic,ah.B.Sfx_puppet_master_battle_keystone_flash,ah.B.Sfx_puppet_master_defeat_animation,ah.B.Bgm_puppet_master_ambient_loop,ah.B.Bgm_puppet_master_victory_loop,J.Q.Spine_battle_mp_drain_json]}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){this._finalBackgrounds=this._localConfig.backgroundID,this._localConfig.backgroundID=[nr.q.Battle_academy_gh_pedestal_bg,nr.q.Battle_academy_gh_pedestal_fg],yield B.initBattlePrefab.call(this,k);for(const k of this.getUnits())k.uiContent.active=!1;this.setUnitTooltipLock(!0);const U=yield this._prefabLoader.loadWithDependenciesFromGUID(Ei.l.GuardianBattleFog);this._battleFogAnimator=U.findComponentInChildren(Ir.j),this._battleFogAnimator.GameObject.active=!1;const F=yield this._prefabLoader.loadWithDependenciesFromGUID(Ei.l.PuppetMasterBattleEnvironmentFX);this._prefabRoot.addChild(F),this._battleBackgroundFX=F.findComponent(dN.n),this._fxAnimatorObjects=this._battleBackgroundFX.getAnimators().map((k=>k.GameObject));for(const k of this._fxAnimatorObjects)k.active=!1;this._keystoneAnimator=j.wa5.getActiveScene().container.get("KEYSTONE_ANIMATOR"),this._keystoneAnimator.GameObject.active=!1,this._puppetMaster=this.rightTeam.units.find((k=>k.battleId===yN.PUPPET_MASTER_BATTLE_ID)),this._puppetMaster.size=lM.X.Medium,this._puppetMaster.creature.teleportType=KP.H0.None,this._pmSpellCastSfx=this._puppetMaster.creature.castSpellSfx,this._puppetMaster.creature.defeated=()=>(0,G.sH)(this,void 0,void 0,(function*(){})),this._puppetMaster.onDefeatAnimationFinished.add((()=>{this.runPuppetMasterDefeatSequence().catch((k=>{Ko.captureException(k),j.RQr.logError(k,"Error showing puppet master defeat sequence")}))}));for(const k of this.getTeam(lM.h.Home).units){const B=k.mpBar.mpAnimators.map((k=>{const B=new j._mx(k.GameObject);B.active=!1;const U=B.addComponent(Wn.v);return U.setAsset(J.Q.Spine_battle_mp_drain_json),U}));this._unitMpDrainSpines.set(k.data.unitId,B)}}))}getStateOverride(k){switch(null==k?void 0:k.type){case Q.EBattleStateUpdate.NewRound:switch(this._stateOverrideStep++){case 0:const B=yN.ROUND_DIALOGUES[k.round];if(B)return B.shouldTaunt&&(0,$P.ib)(this._puppetMaster.creature.animator,["taunt","idle"],!0),B.isNPCSpellCast&&(this._activeUnitIndicatorStep=1,this._showIndicator=!1,this._puppetMaster.creature.castSpellSfx=null),[DP,B.dialogues];break;case 1:if(1===k.round)return[RP,this.playBackgroundTransitionSequence()]}break;case Q.EBattleStateUpdate.SetActiveUnit:1===this._activeUnitIndicatorStep?this._activeUnitIndicatorStep++:2===this._activeUnitIndicatorStep&&(this._activeUnitIndicatorStep=0,this._showIndicator=!0,this._puppetMaster.creature.castSpellSfx=this._pmSpellCastSfx);break;case Q.EBattleStateUpdate.CastSpell:for(const B of k.targets)B.hits.some((k=>k.mpDamage>0))&&this.playMpDrain(B.unitId,1300).catch(j.RQr.createHandler("Error playing MP drain animation"));break;case Q.EBattleStateUpdate.EndBattle:if(0==this._stateOverrideStep++&&this._puppetMaster.isDefeated())return[RP,this._puppetMasterDefeatSequenceEnd]}return this._stateOverrideStep=0,super.getStateOverride(k)}getScalableBattleDrops(){return[...super.getScalableBattleDrops(),...lN.p.PUPPET_MASTER_GEAR_DROPS]}getUnitDataForTeam(k,B){const U=super.getUnitDataForTeam(k,B),F=U.find((k=>k.unitId===yN.PUPPET_MASTER_BATTLE_ID));return F&&(F.unitSlot=3),U}playBackgroundTransitionSequence(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=[];K.q.instance.prodigy.audio.playSFXFromGUID(ah.B.Sfx_puppet_master_spell_map_transition),yield j.Egh.timeout(250),k.push((0,$P.ib)(this._puppetMaster.creature.animator,["summon","throw-down"],!0)),yield j.Egh.timeout(1700),this._battleFogAnimator.GameObject.active=!0;const B=(0,$P.ib)(this._battleFogAnimator,["fade-in","idle"],!0),U=this._prefabRoot.children.find((k=>"backgroundImage"===k.layer)),F=this._prefabRoot.children.find((k=>"foregroundImage"===k.layer)),$=U.findComponentInChildren(Eo._),H=F.findComponentInChildren(Eo._);k.push(mN.swapBackgrounds([$,H],this._finalBackgrounds,void 0,this._fxAnimatorObjects,(k=>(0,G.sH)(this,void 0,void 0,(function*(){k===vN.NewBackgroundsLoaded&&(this._keystoneAnimator.GameObject.active=!0,yield B,this._battleFogAnimator.playAnimation("fade-out",!1))}))))),yield Promise.all(k),this._battleFogAnimator.GameObject.destroy(),yield(0,$P.ib)(this._puppetMaster.creature.animator,["taunt","idle"],!0),yield Promise.all(this.getUnits().map((k=>(0,G.sH)(this,void 0,void 0,(function*(){k.uiContent.active=!0,yield k.fadeUi(1,0)}))))),this.setUnitTooltipLock(!1),yield this.setSpellBookVisible(!0)}))}playMpDrain(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=this._unitMpDrainSpines.get(k),F=this.getUnits().find((B=>B.battleId===k));if(F&&U){yield j.Egh.timeout(B);const k=[];for(let B=0;B0&&(yield j.Egh.timeout(300)),G.GameObject.active=!0,k.push(bc.qb(G.getSpine(),"mp-drain",!1).then((()=>G.GameObject.active=!1)))}yield Promise.all(k)}}))}runPuppetMasterDefeatSequence(){return(0,G.sH)(this,void 0,void 0,(function*(){K.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(16,De.jT.PuppetMasterBattleWon),this.setUnitTooltipLock(!0);const k=j.wa5.getActiveScene().container,B=K.q.instance.prodigy.audio;B.playBGM(ah.B.Bgm_puppet_master_ambient_loop,!0),this._puppetMaster.uiContent.active=!0,yield j.Egh.timeout(1e3),(()=>(0,G.sH)(this,void 0,void 0,(function*(){yield this.setActiveUnit(null),yield this.setSpellBookVisible(!1)})))().catch(j.RQr.createHandler("Error clearing active unit")),this._ignoreUnitEntranceUIWhenMoving=!0,yield Promise.all(this.getUnits().map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k.fadeUi(0)}))))),yield bc.v$([1479]),B.playSFXFromGUID(ah.B.Sfx_puppet_master_battle_ground_rumble);const U=k.get("LETTERBOX");U.start();const F=B.playSFXFromGUID(ah.B.Sfx_puppet_master_battle_heavenly_harmonic);yield K.q.instance.game.add.tween(j.i7d.main.GameObject.transform.localPosition,this).to({x:"+=34",y:"-=69"},2e3,cN.K.getEasingFunctionFromEnum(cN.i.SinusoidalInOut),!0).onTweenComplete.asPromise();const $=k.get("SCREEN_SHAKE");$.durationMS=6e3,$.buildupDuration=2e3,$.falloffDuration=3e3,$.cycles=80,$.amplitude=3,$.run(),yield j.Egh.timeout(3e3),B.playSFXFromGUID(ah.B.Sfx_puppet_master_battle_keystone_flash),yield new Promise(((k,B)=>{(0,$P.ib)(this._keystoneAnimator,["keystone-active-cast-battle","keystone-spent-idle-battle"],!0).then(k).catch(B),this._keystoneAnimator.spine.onEvent.addOnce(k)})),K.q.instance.game.add.tween(F.instances[0],this).to({volume:0},2500,j.GS3.Linear.None,!0);const H=k.get("KEYSTONE_GLOWS");H.getRootContainer().alpha=0,H.GameObject.active=!0,yield Promise.race([K.q.instance.game.add.tween(H.getRootContainer(),this).to({alpha:1},1e3,cN.K.getEasingFunctionFromEnum(cN.i.SinusoidalInOut),!1).to({alpha:1},2e3,void 0,!1).to({alpha:0},1e3,cN.K.getEasingFunctionFromEnum(cN.i.SinusoidalInOut),!1).start().onTweenComplete.asPromise().then((()=>H.GameObject.active=!1)),j.Egh.timeout(2e3)]),this._puppetMaster.creature.animator.playAnimation("defeat",!1),B.playSFXFromGUID(ah.B.Sfx_puppet_master_defeat_animation),yield this._puppetMaster.creature.animator.OnAnimationComplete.asPromise(),yield j.Egh.timeout(3250);const V=No.B.musicVolume.addSmoothedLensMultiplier(0);yield j.Egh.timeout(750);const W=yield this._prefabLoader.loadWithDependenciesFromGUID(Ei.l.EndgameIllustrationPuppetMasterDefeat);B.playBGM(this._localConfig.victoryMusicID,!0),V.remove();const q=W.findComponentInChildren(wA.V);this.battleResult.onOpened.addOnce((()=>{null==W||W.destroy()})),yield j.Egh.timeout(1e3),K.q.instance.game.add.tween(j.i7d.main.GameObject.transform.localPosition,this).to({x:"-=34",y:"+=69"},1e3,cN.K.getEasingFunctionFromEnum(cN.i.SinusoidalInOut),!0),U.end(),yield q.onComplete.asPromise(),K.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(17,De.jT.PostPuppetMasterVisualsShown),this._puppetMasterDefeatSequenceEnd.resolve()}))}onStartBattle(){const k=Object.create(null,{onStartBattle:{get:()=>super.onStartBattle}});return(0,G.sH)(this,arguments,void 0,(function*(B=!1){yield k.onStartBattle.call(this,B)}))}}yN.PUPPET_MASTER_BATTLE_ID="puppetmaster",yN.ROUND_DIALOGUES={1:{dialogues:[1441]},2:{dialogues:[1442],shouldTaunt:!0},3:{dialogues:[1443],shouldTaunt:!0},4:{dialogues:[1444],isNPCSpellCast:!0},5:{dialogues:[1446]},6:{dialogues:[1445],shouldTaunt:!0},7:{dialogues:[1447,1448,1449],shouldTaunt:!0},8:{dialogues:[1450],shouldTaunt:!0},9:{dialogues:[1451]}};class _N extends SP.V{constructor(){super(...arguments),this._fakeWeightDividend=5}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k),this._modifierGridPrefab=yield cM.Q.addModifierGridPrefab(cM.Q.MODIFIER_GRID_X_IN_BATTLE,cM.Q.MODIFIER_GRID_Y_IN_BATTLE)}))}processBattleStateUpdates(k){for(const B of k)B.type===Q.EBattleStateUpdate.CustomEvent&&B.name===QS.wJ.RewardDetermined&&(dM.T.reward=B.data.reward);return k}onEndGame(k){const B=Object.create(null,{onEndGame:{get:()=>super.onEndGame}});return(0,G.sH)(this,void 0,void 0,(function*(){this._modifierGridPrefab.destroy(),this._modifierGridPrefab=null,yield B.onEndGame.call(this,k)}))}showBattleResult(k,B,U,F){const $=Object.create(null,{showBattleResult:{get:()=>super.showBattleResult}});return(0,G.sH)(this,arguments,void 0,(function*(k,B,U,F,G=!0){var V,W,q,z;if(!G)return;if(!dM.T.isFinalBattle)return void(yield $.showBattleResult.call(this,k,B,U,F,G));const Y=K.q.instance.prodigy.gameContainer.get("196-d3a5"),Q=K.q.instance.prodigy.gameContainer.get("306-5359"),X=null===(V=Y.riftsTierTotalData)||void 0===V?void 0:V[dM.T.riftTier],Z=null!==(W=null==X?void 0:X.rewards)&&void 0!==W?W:[];let J=Z.map((k=>({type:k.type,ID:k.id,N:k.quantity,R:k.weight})));J=J.filter((k=>QS._u.includes(k.type)||Q.getItemCount(k.type,k.ID)<=0));const tt=Z.reduce(((k,B)=>k+B.weight),0);let et;if(!et){const k=dM.T.reward;if(k){const B=null===(q=le.t.getItem(k.type,k.id))||void 0===q?void 0:q.data;et={type:k.type,ID:k.id,N:k.quantity,data:{name:B?Tn.J.getLocalizationNameKey(k):"",flavorText:B?Tn.J.getLocalizationFlavorKey(k):"",rarity:null!==(z=null==B?void 0:B.rarity)&&void 0!==z?z:0}}}}if(et&&(H().find(J,(k=>k.id===et.ID&&k.type===et.type&&k.quantity===et.N))||J.push({type:et.type,ID:et.ID,N:et.N,R:Math.round(tt/this._fakeWeightDividend)}),"petHat"!==et.type&&"petRelic"!==et.type||K.q.instance.prodigy.gameContainer.get("d69-defe").refreshPetGear().catch(j.RQr.createHandler("RiftRunBattleController: Failed to refresh pet gear after being awarded it after a rift run")),(0,jP.p)(et.type,et.ID))){K.q.instance.prodigy.gameContainer.get("c47-20b6").postBattleFlow.itemTransaction.setIndividualData(et.type,et.ID,{instance_type:Ai.N.RiftRun,source_type:gn.C.PrizeWheel})}yield new Promise((k=>{K.q.instance.prodigy.open.bossRewards([],Ai.N.RiftRun,Ei.l.BossRewardUIwithnorespin,et?[et]:void 0,J,k,!0,!et||!(0,jP.p)(et.type,et.ID))})),yield $.showBattleResult.call(this,k,B,U,F,G)}))}}var EN,wN,TN,SN,AN,CN,ON,IN,DN,RN,PN=U(87539);!function(k){k[k.PreBattleDialogue=0]="PreBattleDialogue",k[k.TeleportSwap=1]="TeleportSwap",k[k.NPCDialogueStart=2]="NPCDialogueStart",k[k.NPCDialoguePlayed=3]="NPCDialoguePlayed"}(EN||(EN={}));class MN extends SP.V{constructor(){super(...arguments),this._activeUnitIndicatorStep=0,this._cachedLastRound=0}getAssetList(){return[...this._baseAssets,ah.B.Sfx_puppet_master_spell_map_transition]}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){this._localConfig.backgroundID=[nr.q.Battle_academy_gh_pedestal_bg,nr.q.Battle_academy_gh_pedestal_fg],yield B.initBattlePrefab.call(this,k);for(const k of this.getUnits())k.uiContent.active=!1;this._battleData=PN.m.getGuardianData(this.type);const U=yield this._prefabLoader.loadWithDependenciesFromGUID(Ei.l.GuardianBattleFog);this._battleFogAnimator=U.findComponentInChildren(Ir.j),this._battleFogAnimator.GameObject.active=!1,this.setUnitTooltipLock(!0);const F=this.getUnits().find((k=>"guardian"===k.battleId)),G=F.name,j=Object.assign(Object.assign({},F.data),{asset:{type:Ni.uj.Boss,id:59}});F.creature.creatureGameObject.destroy(),F.setData(j,KP.H0.ShadowBig,F.controllerUnit),F.name=G,yield F.loadPromise,F.creature.creatureGameObject.active=!0,F.uiContent.active=!1,this._swapUnit=F,this._overrideStep=EN.PreBattleDialogue}))}onStartBattle(){const k=Object.create(null,{onStartBattle:{get:()=>super.onStartBattle}});return(0,G.sH)(this,arguments,void 0,(function*(B=!1){yield k.onStartBattle.call(this,B)}))}getStateOverride(k){switch(null==k?void 0:k.type){case Q.EBattleStateUpdate.NewRound:switch(this._cachedLastRound=k.round,this._overrideStep){case EN.PreBattleDialogue:return this._overrideStep=EN.TeleportSwap,[DP,this._battleData.puppetMasterDialogueSequence];case EN.TeleportSwap:return this._overrideStep=EN.NPCDialogueStart,[RP,this.playTeleportSwapSequence()];case EN.NPCDialogueStart:const k=this._battleData.npcHelperData.find((k=>k.entranceRound===this._cachedLastRound));if(k)return this._activeUnitIndicatorStep=1,this._showIndicator=!1,this._overrideStep=EN.NPCDialoguePlayed,[DP,k.dialogueSequence];break;case EN.NPCDialoguePlayed:this._overrideStep=EN.NPCDialogueStart}break;case Q.EBattleStateUpdate.SetActiveUnit:if(1===this._activeUnitIndicatorStep)this._activeUnitIndicatorStep++;else if(2===this._activeUnitIndicatorStep){this._activeUnitIndicatorStep=0,this._showIndicator=!0;const k=this._battleData.npcHelperData.find((k=>k.entranceRound===this._cachedLastRound));if(null==k?void 0:k.dialogueSequenceReprise)return[DP,k.dialogueSequenceReprise]}break;case Q.EBattleStateUpdate.CustomEvent:this._swapUnit.creature.breakBarrier()}return null}playTeleportSwapSequence(){return(0,G.sH)(this,void 0,void 0,(function*(){K.q.instance.prodigy.audio.playSFXFromGUID(ah.B.Sfx_puppet_master_spell_map_transition),yield j.Egh.timeout(250),this._swapUnit.creature.animator.playAnimation("summon",!1),yield j.Egh.timeout(1500),yield this._swapUnit.playDefeated();const k=this._prefabRoot.children.find((k=>"backgroundImage"===k.layer)),B=this._prefabRoot.children.find((k=>"foregroundImage"===k.layer)),U=k.findComponentInChildren(Eo._),F=B.findComponentInChildren(Eo._),$=mN.swapBackgrounds([U,F],[nr.q[this._battleData.backgroundImageKey],nr.q[this._battleData.foregroundImageKey]]),H=Object.assign(Object.assign({},this._swapUnit.data),{asset:{type:Ni.uj.Boss,id:this._battleData.bossID}});this._swapUnit.creature.creatureGameObject.destroy(),this._swapUnit.setData(H,KP.H0.ShadowBig,this._swapUnit.controllerUnit),this._swapUnit.uiContent.active=!1,this._swapUnit.onDefeatAnimationStarted.add((()=>this._battleFogAnimator.playAnimation("fade-out",!1)),this),this._battleFogAnimator.GameObject.active=!0,this._battleFogAnimator.playAnimation("fade-in",!1),yield this._battleFogAnimator.OnAnimationComplete.asPromise(),this._battleFogAnimator.playAnimation("idle",!0),yield Promise.all([$,this._swapUnit.loadPromise]),yield this._swapUnit.enterBattle(!0),this._battleData.displayShield&&this._swapUnit.loadPromise.then((()=>{this._swapUnit.creature.addBarrier(KP.HW.Spine,J.Q.Spine_shadow_boss_shield_json,0,-50)})).catch(j.RQr.createHandler("Error adding guardian barrier")),yield Promise.all(this.getUnits().map((k=>(0,G.sH)(this,void 0,void 0,(function*(){k.uiContent.active=!0,yield k.fadeUi(1,0)}))))),yield j.Egh.timeout(MN.POST_BG_TRANSITION_DELAY_MS),this.setUnitTooltipLock(!1),yield this.setSpellBookVisible(!0)}))}}MN.POST_BG_TRANSITION_DELAY_MS=1e3;class NN extends SP.V{initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k);const U=this.rightTeam.units.find((k=>k.type===Ni.uj.Titan));U&&this.repositionTitanUnit(U)}))}repositionTitanUnit(k){k.GameObject.transform.setPositionY(-200),k.targetComponent.GameObject.parent.transform.setPosition(-50,172),k.uiContent.transform.setPosition(-50,172),k.turnIndicatorOffset={x:0,y:200}}onVictory(k,B,U){const F=Object.create(null,{onVictory:{get:()=>super.onVictory}});return(0,G.sH)(this,void 0,void 0,(function*(){const G=K.q.instance.prodigy.titansNetworkHandler;G.hitTitan(G.titan.id),yield this.textLog.waitForMessage("COMBAT_TITAN_HIT"),yield F.onVictory.call(this,k,B,U)}))}onDefeat(){return(0,G.sH)(this,void 0,void 0,(function*(){}))}getNonScalableBattleDrops(){const k=super.getNonScalableBattleDrops(),B=K.q.instance.prodigy.titansNetworkHandler,U=Math.floor(B.isCatapultBattle?2:1);return k.push(NN.getTitanShardDrop(U)),k}getNonScalableMemberBattleDrops(){const k=super.getNonScalableMemberBattleDrops();return k.push(NN.getTitanShardDrop(1)),k}static getTitanShardDrop(k){return{ID:11,type:"currency",N:k*K.q.instance.prodigy.gameContainer.get("12b-405a").getTitanShardMultiplier()}}}!function(k){k[k.Initialize=0]="Initialize",k[k.FirstClickOnSpellCard=1]="FirstClickOnSpellCard",k[k.FirstTargetConfirmed=2]="FirstTargetConfirmed",k[k.MagicPointsEmptyAlert=3]="MagicPointsEmptyAlert",k[k.MagicPointsFilled=4]="MagicPointsFilled",k[k.Complete=5]="Complete"}(wN||(wN={})),function(k){k[k.Step0PositionX=260]="Step0PositionX",k[k.Step0PositionY=520]="Step0PositionY",k[k.Step1PositionX=965]="Step1PositionX",k[k.Step1PositionY=275]="Step1PositionY",k[k.Step2PositionX=547]="Step2PositionX",k[k.Step2PositionY=610]="Step2PositionY"}(TN||(TN={})),function(k){k[k.PositionX=720]="PositionX",k[k.PositionY=150]="PositionY",k[k.Width=360]="Width",k[k.Height=360]="Height"}(SN||(SN={}));!function(k){k[k.Initialize=0]="Initialize",k[k.FirstClickOnSpellCard=1]="FirstClickOnSpellCard",k[k.FirstTargetConfirmed=2]="FirstTargetConfirmed",k[k.MagicPointsEmptyAlert=3]="MagicPointsEmptyAlert",k[k.MagicPointsFilled=4]="MagicPointsFilled",k[k.SecondClickOnSpellCard=5]="SecondClickOnSpellCard",k[k.SecondTargetConfirmed=6]="SecondTargetConfirmed",k[k.EndBattleDialogue=7]="EndBattleDialogue",k[k.Complete=8]="Complete"}(AN||(AN={})),function(k){k[k.Step0PositionX=260]="Step0PositionX",k[k.Step0PositionY=520]="Step0PositionY",k[k.Step1PositionX=965]="Step1PositionX",k[k.Step1PositionY=115]="Step1PositionY",k[k.Step2PositionX=547]="Step2PositionX",k[k.Step2PositionY=610]="Step2PositionY"}(CN||(CN={})),function(k){k[k.PositionX=720]="PositionX",k[k.PositionY=150]="PositionY",k[k.Width=360]="Width",k[k.Height=360]="Height"}(ON||(ON={}));!function(k){k[k.Initialize=0]="Initialize",k[k.RescueAvailable=1]="RescueAvailable",k[k.ClickOnRescueButton=2]="ClickOnRescueButton",k[k.RescueTargetConfirmed=3]="RescueTargetConfirmed"}(IN||(IN={})),function(k){k[k.Step0PositionX=1220]="Step0PositionX",k[k.Step0PositionY=525]="Step0PositionY",k[k.Step1PositionX=965]="Step1PositionX",k[k.Step1PositionY=275]="Step1PositionY"}(DN||(DN={})),function(k){k[k.PositionX=720]="PositionX",k[k.PositionY=150]="PositionY",k[k.Width=360]="Width",k[k.Height=360]="Height"}(RN||(RN={}));class xN extends AP{constructor(){super(...arguments),this._currentTutorialStep=IN.Initialize}getAssetList(){return[...this._baseAssets,ah.B.Voice_10_105_rescue_charfoal,ah.B.Voice_10_108_rescue_sproot,ah.B.Voice_10_109_rescue_wott,ah.B.Voice_10_106_rescue_mermina,ah.B.Voice_10_107_rescue_snowfluff]}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this.shouldNotifyWhenRescueAvailable=!1}))}showSpellCards(k,B=!0){super.showSpellCards(k,B),this.spellCardsController.onUiReady.add((()=>{this._currentTutorialStep===IN.Initialize&&this.isRescueAvailable()&&setTimeout((()=>{var k;const B=null===(k=this.spellCardsController)||void 0===k?void 0:k.petRescueCard.findComponentInChildren(j.XVE);B&&this._currentTutorialStep===IN.Initialize&&(this._currentTutorialStep++,this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!1),this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new V.Point(0,0),new j.or0(0,0)),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(DN.Step0PositionX,DN.Step0PositionY)),this._tutorialControllerComponent.setDialogueTextKey("BATTLE_REVAMP_TUTORIAL_5",this.rightTeam.units[0].name),this._tutorialControllerComponent.playNootWidgetIn(!0,this.getStarterPetSoundAsset()),this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByTransform(B),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(DN.Step0PositionX,DN.Step0PositionY)))}),0)}));const U=this.spellCardsController.targetController;U.onActionChange.add((k=>{this._currentTutorialStep===IN.RescueAvailable&&(this._currentTutorialStep++,this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new V.Point(RN.PositionX,RN.PositionY),new j.or0(RN.Width,RN.Height)),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(DN.Step1PositionX,DN.Step1PositionY)))})),U.onTargetConfirmed.add((()=>{this._currentTutorialStep===IN.ClickOnRescueButton&&(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.playNootWidgetOut(),this._tutorialControllerComponent.playFadeOutDialogue(),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!0))}))}setActiveUnit(k){const B=Object.create(null,{setActiveUnit:{get:()=>super.setActiveUnit}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.setActiveUnit.call(this,k),this._currentTutorialStep===IN.Initialize&&this.isRescueAvailable()&&(this.textLog.GameObject.active=!1)}))}getStarterPetSoundAsset(){var k;switch(null===(k=this.rightTeam.units[0])||void 0===k?void 0:k.data.asset.id){case xN.STARTER_PET_CHARFOAL:return ah.B.Voice_10_105_rescue_charfoal;case xN.STARTER_PET_SPROOT:return ah.B.Voice_10_108_rescue_sproot;case xN.STARTER_PET_WOTT:return ah.B.Voice_10_109_rescue_wott;case xN.STARTER_PET_MERMINA:return ah.B.Voice_10_106_rescue_mermina;case xN.STARTER_PET_SNOWFLUFF:return ah.B.Voice_10_107_rescue_snowfluff;default:return null}}}xN.STARTER_PET_SNOWFLUFF=148,xN.STARTER_PET_MERMINA=145,xN.STARTER_PET_WOTT=142,xN.STARTER_PET_SPROOT=139,xN.STARTER_PET_CHARFOAL=136;var LN,kN=U(21001);!function(k){k[k.Initialize=0]="Initialize",k[k.Dialogue=1]="Dialogue",k[k.RescueAvailable=2]="RescueAvailable",k[k.ClickOnRescueButton=3]="ClickOnRescueButton",k[k.RescueTargetConfirmed=4]="RescueTargetConfirmed"}(LN||(LN={}));const BN=new V.Point(965,275),UN=new V.Point(799,360);var FN,GN,jN,$N;!function(k){k[k.PositionX=720]="PositionX",k[k.PositionY=150]="PositionY",k[k.Width=360]="Width",k[k.Height=360]="Height"}(FN||(FN={}));!function(k){k[k.Initialize=0]="Initialize",k[k.ClickAOESpellCard=1]="ClickAOESpellCard",k[k.ClickTargetConfirmed=2]="ClickTargetConfirmed",k[k.PlayNootDialogue=3]="PlayNootDialogue",k[k.Complete=4]="Complete"}(GN||(GN={})),function(k){k[k.Step0PositionX=260]="Step0PositionX",k[k.Step0PositionY=520]="Step0PositionY",k[k.Step1PositionOffsetX=230]="Step1PositionOffsetX",k[k.Step1PositionOffsetY=27]="Step1PositionOffsetY",k[k.Step1Rotation=-90]="Step1Rotation"}(jN||(jN={})),function(k){k[k.PositionX=0]="PositionX",k[k.PositionY=0]="PositionY",k[k.Width=1280]="Width",k[k.Height=550]="Height"}($N||($N={}));class HN extends SP.V{initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k);const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=yield this._ultimatesDataProvider.getCurrentQuestData();this.currentQuestData=F.find((k=>k.questID===U.ultimateQuestId))}))}}(0,G.Cg)([(0,Re.b)("200-7dc0"),(0,G.Sn)("design:type",Ys.m)],HN.prototype,"_ultimatesDataProvider",void 0);class VN{static getBattleController(k){const B=this._battleControllerMap[k.battleType];return B?new B(k):(j.VyI.log(`No battle controller found for battle type: ${k.battleType}. Using basic battle controller as a fallback`,j.$bb.Warning),new SP.V(k))}}VN._battleControllerMap={[Ni.gu.Basic]:SP.V,[Ni.gu.Ultimates]:HN,[Ni.gu.Duel]:NM,[Ni.gu.MatchmakingDuel]:rN,[Ni.gu.MatchmakingBotDuel]:aN,[Ni.gu.DarkTower]:mM,[Ni.gu.NormalRiftRun]:_N,[Ni.gu.LootDash]:JM,[Ni.gu.FestivalDailyBattle]:SP.V,[Ni.gu.FeaturedSpawn]:SP.V,[Ni.gu.Tutorial1]:class extends AP{constructor(){super(...arguments),this._currentTutorialStep=wN.Initialize}getAssetList(){return[...this._baseAssets,ah.B.Voice_10_103_magic_refilled]}showSpellCards(k,B=!0){super.showSpellCards(k,B),this.spellCardsController.onUiReady.add(((k,B)=>{if(this._currentTutorialStep===wN.Initialize){this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!1);const k=this.spellCardsController.getSpellCardAtIndex(0).findComponentInChildren(j.XVE);this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByTransform(k),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(TN.Step0PositionX,TN.Step0PositionY))}else if(this._currentTutorialStep===wN.FirstTargetConfirmed&&k)this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!0,TP.W.StraightIdle,new V.Point(TN.Step2PositionX,TN.Step2PositionY));else if(this._currentTutorialStep===wN.MagicPointsEmptyAlert&&k)this._tutorialControllerComponent.enableGuideHand(!0,TP.W.StraightIdle,new V.Point(TN.Step2PositionX,TN.Step2PositionY));else if(this._currentTutorialStep===wN.MagicPointsEmptyAlert&&!k&&B)this._tutorialControllerComponent.enableGuideHand(!1);else if(this._currentTutorialStep===wN.MagicPointsEmptyAlert&&!k&&!B){this._currentTutorialStep++;setTimeout((()=>{this._currentTutorialStep===wN.MagicPointsFilled&&(this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.setDialogueTextKey("BATTLE_REVAMP_TUTORIAL_4"),this._tutorialControllerComponent.playNootWidgetIn(!0,ah.B.Voice_10_103_magic_refilled))}),2400)}}));const U=this.spellCardsController.targetController;U.onActionChange.add((k=>{this._currentTutorialStep===wN.Initialize?(this._currentTutorialStep++,this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new V.Point(SN.PositionX,SN.PositionY),new j.or0(SN.Width,SN.Height)),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(TN.Step1PositionX,TN.Step1PositionY))):this._currentTutorialStep===wN.MagicPointsFilled&&k&&(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.playNootWidgetOut(),this._tutorialControllerComponent.playFadeOutDialogue(),this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!0))})),U.onTargetConfirmed.add((()=>{this._currentTutorialStep===wN.FirstClickOnSpellCard&&(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen())}))}alertActiveUnitMpEmpty(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.activeUnit.alertMpEmpty(!0)}))}},[Ni.gu.Tutorial2]:xN,[Ni.gu.Tutorial3]:class extends AP{constructor(){super(...arguments),this._currentTutorialStep=GN.Initialize}getAssetList(){return[...this._baseAssets,ah.B.Voice_10_104_powerful_hit]}showSpellCards(k,B=!0){super.showSpellCards(k,B),this.spellCardsController.onUiReady.add(((k,B)=>{if(this._currentTutorialStep===GN.Initialize){this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!1);const k=this.spellCardsController.getSpellCardAtIndex(0).findComponentInChildren(j.XVE);this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByTransform(k),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(jN.Step0PositionX,jN.Step0PositionY))}else this._currentTutorialStep===GN.Complete&&this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!0)}));const U=this.spellCardsController.targetController;U.onActionChange.add((()=>{if(this._currentTutorialStep===GN.Initialize){this._currentTutorialStep++;const k=this.rightTeam.units.find((k=>this.battleConstants.getElementalWeakness(k.data.element)===this.activeUnit.data.element));this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new V.Point($N.PositionX,$N.PositionY),new j.or0($N.Width,$N.Height));const B=k.GameObject.transform.worldPosition.x+jN.Step1PositionOffsetX,U=k.GameObject.transform.worldPosition.y+jN.Step1PositionOffsetY;this._tutorialControllerComponent.enableGuideHand(!0,TP.W.StraightIdle,new V.Point(B,U),jN.Step1Rotation)}else this._currentTutorialStep===GN.PlayNootDialogue&&(this._currentTutorialStep++,this._tutorialControllerComponent.playNootWidgetOut(),this._tutorialControllerComponent.playFadeOutDialogue(),this.textLog.GameObject.active=!0)})),U.onTargetConfirmed.add((()=>{this._currentTutorialStep===GN.ClickAOESpellCard&&(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen())}))}castActionResultsDisplayTriggered(){this._currentTutorialStep===GN.ClickTargetConfirmed&&(this._currentTutorialStep++,this.textLog.GameObject.active=!1,this._tutorialControllerComponent.setDialogueTextKey("BATTLE_REVAMP_TUTORIAL_6"),this._tutorialControllerComponent.playNootWidgetIn(!0,ah.B.Voice_10_104_powerful_hit))}},[Ni.gu.Tutorial1Revised]:class extends AP{constructor(){super(...arguments),this._currentTutorialStep=AN.Initialize}getAssetList(){return[...this._baseAssets,ah.B.Voice_10_103_magic_refilled,ah.B.Voice_noot_ftue_choose_spell,ah.B.Voice_noot_ftue_choose_target,ah.B.Voice_noot_ftue_magic_1,ah.B.Voice_noot_ftue_magic_2]}showSpellCards(k,B=!0){super.showSpellCards(k,B),this.spellCardsController.onUiReady.add(((k,B)=>{if(this._currentTutorialStep===AN.Initialize){this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!1);const k=this.spellCardsController.getSpellCardAtIndex(0).findComponentInChildren(j.XVE);this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByTransform(k),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(CN.Step0PositionX,CN.Step0PositionY)),this._tutorialControllerComponent.setDialogueTextKey("BATTLE_REVAMP_TUTORIAL_1"),this._tutorialControllerComponent.playNootWidgetIn(!0,ah.B.Voice_noot_ftue_choose_spell)}else if(this._currentTutorialStep===AN.FirstTargetConfirmed&&k){this._currentTutorialStep++;const k=2400;this._tutorialControllerComponent.enableGuideHand(!0,TP.W.StraightIdle,new V.Point(CN.Step2PositionX,CN.Step2PositionY)),setTimeout((()=>{this._tutorialControllerComponent.setDialogueTextKey("BATTLE_REVAMP_TUTORIAL_3"),this._tutorialControllerComponent.playNootWidgetIn(!0,ah.B.Voice_noot_ftue_magic_1),this._tutorialControllerComponent.enableGuideHand(!1)}),k)}else if(this._currentTutorialStep===AN.SecondTargetConfirmed&&k){this._currentTutorialStep++;setTimeout((()=>{this._tutorialControllerComponent.enableGuideHand(!1)}),2400)}else if(this._currentTutorialStep===AN.MagicPointsEmptyAlert&&k){const k=2400;this._tutorialControllerComponent.enableGuideHand(!0,TP.W.StraightIdle,new V.Point(CN.Step2PositionX,CN.Step2PositionY)),setTimeout((()=>{this._tutorialControllerComponent.enableGuideHand(!1)}),k)}else if(this._currentTutorialStep===AN.MagicPointsEmptyAlert&&!k&&B)this._tutorialControllerComponent.enableGuideHand(!1);else if(this._currentTutorialStep===AN.MagicPointsEmptyAlert&&!k&&!B){this._currentTutorialStep++;const k=2400;this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new V.Point(0,0),new j.or0(0,0)),this.sendProgress(Gh.l.FirstQuestionAnswered),setTimeout((()=>{this._currentTutorialStep===AN.MagicPointsFilled&&(this._currentTutorialStep++,this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(CN.Step0PositionX,CN.Step0PositionY)),this._tutorialControllerComponent.updateDialogue("BATTLE_REVAMP_TUTORIAL_4",ah.B.Voice_noot_ftue_magic_2))}),k)}}));const U=this.spellCardsController.targetController;U.onActionChange.add((k=>{var B;if(this._currentTutorialStep===AN.Initialize){this._currentTutorialStep++;const k=null===(B=this.spellCardsController.getSpellCardAtIndex(0))||void 0===B?void 0:B.findComponentInChildren(sl.l);j.Aq$.isDefined(k)&&(k.inputEnabled=!1),this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new V.Point(ON.PositionX,ON.PositionY),new j.or0(ON.Width,ON.Height)),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(CN.Step1PositionX,CN.Step1PositionY)),this._tutorialControllerComponent.updateDialogue("BATTLE_REVAMP_TUTORIAL_2",ah.B.Voice_noot_ftue_choose_target)}else this._currentTutorialStep===AN.SecondClickOnSpellCard&&k&&(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(CN.Step1PositionX,CN.Step1PositionY)),this._tutorialControllerComponent.playNootWidgetOut(),this._tutorialControllerComponent.playFadeOutDialogue())})),U.onTargetConfirmed.add((()=>{var k;this._currentTutorialStep===AN.FirstClickOnSpellCard?(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this._tutorialControllerComponent.playFadeOutDialogue()):this._currentTutorialStep===AN.SecondTargetConfirmed&&(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen());const B=null===(k=this.spellCardsController.getSpellCardAtIndex(0))||void 0===k?void 0:k.findComponentInChildren(sl.l);j.Aq$.isDefined(B)&&(B.inputEnabled=!0)}))}alertActiveUnitMpEmpty(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.activeUnit.alertMpEmpty(!0)}))}getStateOverride(k){if(this._currentTutorialStep===AN.EndBattleDialogue&&(null==k?void 0:k.type)===Q.EBattleStateUpdate.EndBattle&&(null==k?void 0:k.victoriousTeamId)===Q.ETeamId.Home)return this._currentTutorialStep++,[DP,[1571]]}onPlayerAction(k){const B=Object.create(null,{onPlayerAction:{get:()=>super.onPlayerAction}});return(0,G.sH)(this,void 0,void 0,(function*(){const U=yield B.onPlayerAction.call(this,k);if(k.type===Q.EBattleAction.CastSpell&&2===U.filter((k=>k.id===this.battleConstants.fumbleSpellId)).length){const k=U.findIndex((k=>k.type===Q.EBattleStateUpdate.CastSpell)),B=U.find((k=>k.type===Q.EBattleStateUpdate.EndBattle));return[...U.slice(0,k+1),B]}return U}))}sendProgress(k){K.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:"Onboarding",funnelType:"tutorial",stepName:k})}},[Ni.gu.Tutorial2Revised]:class extends AP{constructor(){super(...arguments),this._currentTutorialStep=LN.Initialize}getAssetList(){return[...this._baseAssets,ah.B.Voice_noot_ftue_pet_rescue]}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this.shouldNotifyWhenRescueAvailable=!1}))}getStateOverride(k){const B=this.getUnits().filter((k=>k.data.teamId===Q.ETeamId.Home)).map((k=>k.data.unitId));return this._currentTutorialStep===LN.Initialize&&k.type===Q.EBattleStateUpdate.SetActiveUnit&&B.includes(k.unitId)?(this._currentTutorialStep++,[DP,[1572,1573]]):null}showSpellCards(k,B=!0){super.showSpellCards(k,B);const U=this.getTeamById(Q.ETeamId.Away).units[0];this.spellCardsController.onUiReady.add((()=>{this._currentTutorialStep===LN.Dialogue&&this.isRescueAvailable()&&setTimeout((()=>{var k;const B=null===(k=this.spellCardsController)||void 0===k?void 0:k.petRescueCard.findComponentInChildren(j.XVE),F=new V.Point(1100,600),G=new j.or0(180,180);B&&this._currentTutorialStep===LN.Dialogue&&(this._currentTutorialStep++,this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!1),this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new V.Point(0,0),new j.or0(0,0)),this._tutorialControllerComponent.setGuideHandLayer(vh.E.Ui),U.unitTooltipIsShowing?(this._currentTutorialStep=LN.ClickOnRescueButton,this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,UN)):this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,BN),this._tutorialControllerComponent.setDialogueTextKey("BATTLE_REVAMP_TUTORIAL_5",(0,Ba.k)("BATTLE_REVAMP_TUTORIAL_5_PET")),this._tutorialControllerComponent.playNootWidgetIn(!0,ah.B.Voice_noot_ftue_pet_rescue),this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(F,G),this._activeUnit.spells.forEach((k=>{k.spellId!==this.battleConstants.rescueSpellId&&(k.isLocked=!0)})),this.spellCardsController.getSpellCards().forEach((k=>{var B;null===(B=k.findComponentInChildren(kN.y))||void 0===B||B.initialize();const U=k.findComponentInChildren(sl.l);U&&(U.currentState=Zh.K.Up)})))}),0)})),U.onInfoTooltipShown.removeAll(this),U.onInfoTooltipShown.add((()=>{this._currentTutorialStep===LN.RescueAvailable&&(this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,UN),this.grantTutorialCurrency(),this._currentTutorialStep=LN.ClickOnRescueButton)}),this),U.onInfoTooltipHidden.removeAll(this),U.onInfoTooltipHidden.add((()=>{this._currentTutorialStep===LN.ClickOnRescueButton&&(this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,BN),this._currentTutorialStep=LN.RescueAvailable)}),this);this.spellCardsController.targetController.onActionChange.add((k=>{this._currentTutorialStep===LN.RescueAvailable&&(this.grantTutorialCurrency(),this._currentTutorialStep++,this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new V.Point(FN.PositionX,FN.PositionY),new j.or0(FN.Width,FN.Height)),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,BN))})),this._stateMachine.onStateChange.add((k=>{k instanceof PM.N&&(this._currentTutorialStep!==LN.RescueAvailable&&this._currentTutorialStep!==LN.ClickOnRescueButton||(this._currentTutorialStep=LN.RescueTargetConfirmed,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.playNootWidgetOut(),this._tutorialControllerComponent.playFadeOutDialogue(),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!0)))}))}grantTutorialCurrency(){K.q.instance.prodigy.gameContainer.get("5c7-e02d").grantCaptureTutorialMagicoin({source_id:"TutorialCaptureCoin"}).catch(j.RQr.createHandler("Error granting the capture tutorial magicoin"))}setActiveUnit(k){const B=Object.create(null,{setActiveUnit:{get:()=>super.setActiveUnit}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.setActiveUnit.call(this,k),this._currentTutorialStep===LN.Dialogue&&this.isRescueAvailable()&&(this.textLog.GameObject.active=!1)}))}},[Ni.gu.StatusEffectsTutorial]:class extends AP{constructor(){super(...arguments),this.currentTutorialStep=MP.Initialize}getBattlePrefab(){return Ei.l.StatusEffectsTutorialBattleScene}getAssetList(){return[...this._baseAssets,PP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_1,PP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_2,PP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_3,PP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_4]}gotoStep(k){switch(this.currentTutorialStep=k,k){case MP.HighlightSpellCardWithStatusEffect:this.highlightSpellCardWithStatusEffect();break;case MP.HighlightTarget:this.highlightTarget();break;case MP.TargetClicked:this.targetClicked();break;case MP.InvestigateStatusEffect:this.investigateAppliedBurn();break;case MP.ViewTooltip:this.viewTooltip();break;case MP.EnemyTakesSpellEffectDamage:this.enemyTakesSpellEffectDamage();break;case MP.EnemyPetFiresBack:case MP.FinalDialogue:case MP.End:break;default:j.VyI.log(`Unhandled tutorial step in Status Effects Tutorial: ${this.currentTutorialStep}`,j.$bb.Error)}}showSpellCards(k,B=!0){super.showSpellCards(k,B),this.onChoosingSpell.addOnce((()=>{this.currentTutorialStep===MP.Initialize&&this.gotoStep(MP.HighlightSpellCardWithStatusEffect)}));const U=this.spellCardsController.targetController;U.onActionChange.add((k=>{this.currentTutorialStep===MP.HighlightSpellCardWithStatusEffect&&k&&this.gotoStep(MP.HighlightTarget)})),U.onTargetConfirmed.add((()=>{this.currentTutorialStep===MP.HighlightTarget&&this.gotoStep(MP.TargetClicked)}))}getStateOverride(k){return this.currentTutorialStep===MP.TargetClicked&&(null==k?void 0:k.type)===Q.EBattleStateUpdate.TriggerStatusEffect?(this.gotoStep(MP.InvestigateStatusEffect),[RP,this.waitForTooltipClosedAndDelay()]):this.currentTutorialStep===MP.EnemyTakesSpellEffectDamage&&(null==k?void 0:k.type)===Q.EBattleStateUpdate.SetActiveUnit?(this.gotoStep(MP.EnemyPetFiresBack),[DP,[1825]]):this.currentTutorialStep!==MP.EnemyPetFiresBack||(null==k?void 0:k.type)!==Q.EBattleStateUpdate.SetActiveUnit?this.currentTutorialStep===MP.FinalDialogue&&(null==k?void 0:k.type)===Q.EBattleStateUpdate.EndBattle?(this.gotoStep(MP.End),[DP,[1826]]):void 0:void this.gotoStep(MP.FinalDialogue)}highlightSpellCardWithStatusEffect(){this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!1),this._tutorialControllerComponent.focusOverlay.setFocusLayer("overlay-top");const k=this.spellCardsController.getSpellCardAtIndex(0),B=this._tutorialControllerComponent.guideHandAnimator.GameObject;this._tutorialControllerComponent.setDialogueTextKey(CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_1),this._tutorialControllerComponent.playNootWidgetIn(!0,PP[CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_1]),this.runFocusAnimation(k,B).then((()=>{const B=k.findComponentInChildren(j.XVE);this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByTransform(B),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(NP.Step0PositionX,NP.Step0PositionY))})).catch((k=>{j.VyI.log(`Error showing focus overlay in Status Effects Tutorial: ${k}`,j.$bb.Error)}))}runFocusAnimation(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){this._tutorialControllerComponent.focusOverlay.addFocusableGameObject(k,void 0,!0,{applyGlow:!0,position:{x:k.transform.worldPosition.x+LP,y:k.transform.worldPosition.y+kP}}),this._tutorialControllerComponent.focusOverlay.addFocusableGameObject(B),yield this._tutorialControllerComponent.focusOverlay.showOverlay(),yield this._tutorialControllerComponent.focusOverlay.playGlowAnimations(),yield this._tutorialControllerComponent.focusOverlay.hideOverlay()}))}highlightTarget(){var k;const B=null===(k=this.spellCardsController.getSpellCardAtIndex(0))||void 0===k?void 0:k.findComponentInChildren(sl.l);j.Aq$.isDefined(B)&&(B.inputEnabled=!1),this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new V.Point(xP.PositionX,xP.PositionY),new j.or0(xP.Width,xP.Height)),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(NP.Step1PositionX,NP.Step1PositionY)),this._tutorialControllerComponent.updateDialogue(CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_2,PP[CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_2])}targetClicked(){this.cleanUpDialogueAndHideGuideHand()}investigateAppliedBurn(){this._tutorialControllerComponent.setDialogueTextKey(CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_3),this._tutorialControllerComponent.playNootWidgetIn(!0,PP[CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_3]),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(NP.Step1PositionX,NP.Step1PositionY)),this.getEnemyPetUnit().updateIdleStatusEffect(!0),this.getTooltipOpenenedPromise().then((()=>{this.gotoStep(MP.ViewTooltip)})).catch((k=>{j.VyI.log(`Error waiting for tooltip open in Status Effects Tutorial: ${k}`,j.$bb.Error)}))}viewTooltip(){this._tutorialControllerComponent.updateDialogue(CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_4,PP[CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_4]),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(NP.Step1PositionX,NP.Step1PositionY)),this._tutorialControllerComponent.setGuideHandLayer(vh.E.Ui)}enemyTakesSpellEffectDamage(){this.cleanUpDialogueAndHideGuideHand()}cleanUpDialogueAndHideGuideHand(){this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this._tutorialControllerComponent.playNootWidgetOut(),this._tutorialControllerComponent.playFadeOutDialogue()}getEnemyPetUnit(){return this.getTeamById(Q.ETeamId.Away).units.find((k=>k.type===Ni.uj.Pet))}getTooltipOpenenedPromise(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.getEnemyPetUnit().onInfoTooltipShown.asPromise()}))}waitForTooltipClosedAndDelay(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.getEnemyPetUnit().onInfoTooltipHidden.asPromise(),this.gotoStep(MP.EnemyTakesSpellEffectDamage),yield un.o.wait(1e3)}))}onClickUnitTooltip(k){this.currentTutorialStep!==MP.InvestigateStatusEffect&&this.currentTutorialStep!==MP.ViewTooltip?super.onClickUnitTooltip(k):this.showUnitTooltip(k)}},[Ni.gu.Titan]:NN,[Ni.gu.CrystalCavernsGrumpyYeti]:GM,[Ni.gu.CrystalCavernsCrystalThief]:UP,[Ni.gu.CrystalCavernsGlacias]:UP,[Ni.gu.CrystalCavernsMakalu]:class extends UP{constructor(){super(...arguments),this._phase=rM.Visible,this._stateOverrideStep=0}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){var U;yield B.initBattlePrefab.call(this,k),this.rightTeam.units.forEach((k=>{k.size=lM.X.Medium})),this._makalu=this.rightTeam.units.find((k=>k.type===Ni.uj.Boss)),this._makalu.creature.teleportType=KP.H0.None,this._makalu.creature.shouldFadeOnDefeat=!1,this._makalu.onApplyDamage.add((k=>{var B;return(B=this._makalu.uiContent).active||(B.active=k.damage>0)})),this._makalu.onDefeatAnimationStarted.add((()=>{this.setActiveUnit(null).catch(j.RQr.createHandler("Error setting active unit"))})),this._makalu.onDefeatAnimationFinished.add((()=>{(()=>(0,G.sH)(this,void 0,void 0,(function*(){this._makalu.uiContent.active=!0,this.isBossAboveGround()?(this._makalu.creature.animator.playAnimation("hide",!1),yield this._makalu.creature.animator.OnAnimationComplete.asPromise()):yield j.Egh.timeout(1e3),yield this._makalu.fadeOut(!1)})))().catch(j.RQr.createHandler("Error fading Makalu"))})),this._makaluFullHitbox=Object.assign({},this._makalu.hitbox),this._piles=this.rightTeam.units.filter((k=>k.type===Ni.uj.Object));for(const k of this._piles){k.uiContent.active=!1,k.isTargetable=!1;const B=k.creature;B.teleportType=KP.H0.None,this.playUnitIdle(B,"mound-blue"),B.shouldFadeOnDefeat=!1,k.onApplyDamage.add((()=>{this.playUnitIdle(B,"mound-blue"),k.data.health.current=0}))}const F=null===(U=this.getSpellComponentById("1071"))||void 0===U?void 0:U.steps.find((k=>k instanceof tN.D));F&&(F.play=()=>(0,G.sH)(this,void 0,void 0,(function*(){return Promise.resolve()})))}))}onStartBattle(){const k=Object.create(null,{onStartBattle:{get:()=>super.onStartBattle}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.onStartBattle.call(this);for(const k of this._piles)k.creature.recalculateHitbox(),k.targetComponent.configureTarget()}))}setupUnitTooltip(){}showUnitTooltip(k){}getStateOverride(k){var B;if(null!==(B=this._makaluAnimator)&&void 0!==B||(this._makaluAnimator=this._makalu.creature.animator),this._needsShellGame&&(this._needsShellGame=!1,k.type!==Q.EBattleStateUpdate.EndBattle))return this.setHiddenBossTargetMode(!0),[eN];switch(null==k?void 0:k.type){case Q.EBattleStateUpdate.CastSpell:this.activeUnit.data.teamId===Q.ETeamId.Away&&[rM.Hidden,rM.Taunt].includes(this._phase)&&(this._makaluAnimator.spine.addAnimationRemap("attack","hide"),this._makaluAnimator.spine.addAnimationRemap("idle","mound-purple"),this._needsShellGame=!0,this.setActiveUnit(null).catch(j.RQr.createHandler("Error setting active unit")));break;case Q.EBattleStateUpdate.CustomEvent:switch(k.name){case rM.Hidden:for(const k of this._piles)k.data.health.current=1,this.playUnitIdle(k.creature,"mound-purple");this._phase=rM.Hidden;break;case rM.Visible:if(0==this._stateOverrideStep++){this._makaluAnimator.spine.addAnimationRemap("attack","attack");let k=Promise.resolve();return this._phase===rM.Hidden?(this._makaluAnimator.playAnimation("emerge",!1),this._makaluAnimator.OnAnimationComplete.addOnce((()=>this.playUnitIdle(this._makalu.creature,"idle"))),k=this._makaluAnimator.OnAnimationComplete.asPromise()):this.playUnitIdle(this._makalu.creature,"idle"),this._phase=rM.Visible,this.setHiddenBossTargetMode(!1),[RP,k]}break;case rM.Stunned:if(0==this._stateOverrideStep++)return this._makaluAnimator.playAnimation("stun-hit",!1),this._makaluAnimator.OnAnimationComplete.addOnce((()=>this.playUnitIdle(this._makalu.creature,"idle-stun"))),this._phase=rM.Stunned,this.setHiddenBossTargetMode(!1),[RP,this._makaluAnimator.OnAnimationComplete.asPromise()];break;case rM.Taunt:if(0==this._stateOverrideStep++){const k=(()=>(0,G.sH)(this,void 0,void 0,(function*(){this._makaluAnimator.playAnimation("emerge",!1),yield this._makaluAnimator.OnAnimationComplete.asPromise(),this._makaluAnimator.playAnimation("taunt",!1),yield this._makaluAnimator.OnAnimationComplete.asPromise()})))();return[RP,k]}}break;case Q.EBattleStateUpdate.EndBattle:if(0==this._stateOverrideStep++)return this.setActiveUnit(null).catch(j.RQr.createHandler("Error setting active unit")),this.setHiddenBossTargetMode(!1),[FM,this.isBossAboveGround?2e3:200]}return this._stateOverrideStep=0,super.getStateOverride(k)}playUnitIdle(k,B){const U=k.animator;U instanceof Ir.j&&U.spine.addAnimationRemap("idle",B),U.playAnimation(B,!0)}setHiddenBossTargetMode(k){if(this._inHiddenTargetMode!==k){this._inHiddenTargetMode=k,this._makalu.uiContent.active=!k;for(const B of this._piles)B.isTargetable=k,this.playUnitIdle(B.creature,k?"mound-purple":"mound-blue");k?(this.playUnitIdle(this._makalu.creature,"mound-purple"),H().merge(this._makalu.hitbox,this._piles[0].hitbox)):H().merge(this._makalu.hitbox,this._makaluFullHitbox),this._makalu.targetComponent.configureTarget()}}isBossAboveGround(){return[rM.Stunned,rM.Visible].includes(this._phase)}},[Ni.gu.CrystalCavernsCrystalGolem]:bM,[Ni.gu.EndgamePippet]:SP.V,[Ni.gu.FireflyQ2Miniboss]:SP.V,[Ni.gu.ZoneMiniboss]:oN,[Ni.gu.PumpkinfestBoss]:hN,[Ni.gu.EndGamePuppetMaster]:yN,[Ni.gu.EndGameGuardianBonfire]:MN,[Ni.gu.EndGameGuardianFirefly]:MN,[Ni.gu.EndGameGuardianShipwreck]:MN,[Ni.gu.EndGameGuardianShiverchill]:MN,[Ni.gu.EndGameGuardianSkywatch]:MN,[Ni.gu.QuestPippet]:SP.V,[Ni.gu.QuestPippetDefeatable]:SP.V,[Ni.gu.FireflyQ3Miniboss]:SP.V,[Ni.gu.FireflyQ8TriptropTrio]:SP.V,[Ni.gu.FireflyQ12Gerald]:SP.V,[Ni.gu.SkywatchCloudMiniboss]:SP.V,[Ni.gu.SkywatchCloudBoss]:SP.V,[Ni.gu.SkywatchQ11Bitbots]:SP.V,[Ni.gu.SkywatchQ6Swarm]:SP.V,[Ni.gu.ShiverchillQ6Ghosts]:SP.V,[Ni.gu.ShiverchillQ7IceWyrm]:SP.V,[Ni.gu.ShiverchillQ13IceWyrm]:SP.V,[Ni.gu.BonfireQ12Guardian]:SP.V,[Ni.gu.BonfireQ13Cebollini]:SP.V,[Ni.gu.ShipwreckQ11OldOne]:SP.V,[Ni.gu.BossRiftRun]:fM,[Ni.gu.FestivalDailyBoss]:xM.R};var WN=U(81531);class qN extends gf.f{startBattleRequest(k,B){var U;this._config=B,this._synapse.setUserStatus(lc.a.unavailable).catch(j.RQr.createHandler("Unable to set social status")),K.q.instance.game.state.start(Ie.G.SecureBattleRevamp,null===(U=B.clearWorld)||void 0===U||U,k)}clearBattle(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this._battleController){const B=null!=k?k:{battleType:Ni.gu.Basic,opponents:{units:{}},difficulty:1};this._battleController=VN.getBattleController(B),this._battleController.bindNetworkHandler()}const B=j.wa5.getActiveScene().container.get("NetworkHandler");yield B.clearBattleState()}))}resumeBattleRequest(k,B){var U;this._config=B,this._synapse.setUserStatus(lc.a.unavailable).catch(j.RQr.createHandler("Unable to set social status")),K.q.instance.game.state.start(Ie.G.SecureBattleRevamp,null===(U=null==B?void 0:B.clearWorld)||void 0===U||U,{battleType:k.battleType,clientState:k.clientState},!0),this._loggedInPlayerDataProvider.player.battleResumeData=void 0}init(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=!1){var U,F,G,$,H;try{j.C1c.markTextureGarbageCollectionFrame();const V=j.wa5.getActiveScene(),W=V.container;W.parent=K.q.instance.prodigy.gameContainer,W.bind("BattleState").toConstantValue(this),W.bind("RemoteConfig").toConstantValue(k),W.bind("LocalConfig").toConstantValue(this._config),W.bind("DifficultyMode").toConstantValue(this._loggedInPlayerDataProvider.player.currentDifficulty),this._battleController=VN.getBattleController(k),W.bind("BattleController").toConstantValue(this._battleController),this._battleController.bindNetworkHandler();const q={target:Ie.G.SecureBattle,title:this._localizer.getText("LOADING_CAPITALIZE"),autoStart:!1,fadeIn:!1,save:!1,useIdleAnimation:!0,shutdownLoadState:!1},z=this._battleController.getLoadingScreen(q),Y="Loading";if(z){z.create();V.addLayer(Y,1e6).addChild(z.element)}const Q=this.preloadLocalAssets(),X=!!(null===(U=this._loggedInPlayerDataProvider.player.difficultyUnlocks)||void 0===U?void 0:U.hard),Z=hi.s.xpRequiredForLevel(X?hi.s.maxLevelConfig.expert:hi.s.maxLevelConfig.regular,yo.V.Player);null!==(F=k.userDetails)&&void 0!==F||(k.userDetails={starsToMaxLevel:Z-this._loggedInPlayerDataProvider.player.getStars()});const J=this._loggedInPlayerDataProvider.player;yield new Promise((k=>J.forceSaveCharacter(k))),ma.k.useRevisedDifficulty&&(k.experiments=[{experimentKey:"difficulty-scaling",variationKey:""}]),k.cannotDropMagicoin=!!(null===(G=this._config.guaranteedDrops)||void 0===G?void 0:G.filter(j.Aq$.isDefined).length),k.battleType===Ni.gu.NormalRiftRun&&(k.cannotDropMagicoin=!1);const tt=B?yield this._battleController.requestBattleResume():yield this._battleController.requestBattleStart(k);if(this._battleController.battleId=tt.battleId,this._battleController.showQiBadgeAnimations=this._config.showQiBadgeAnimations,this._battleController.hasMpOverrides=Object.keys(null!==($=tt.state.config.maxMPPerUnitTypeOverrides)&&void 0!==$?$:{}).length>0,W.bind("Modifiers").toConstantValue(null!==(H=tt.modifiers)&&void 0!==H?H:[]),W.bind("GameDataProvider").toConstantValue(this._gameDataProvider=new WN.q(tt.dataOverride)),this.checkPetGearFtueState(tt.state.units),yield Promise.all([Q,this.preloadRemoteAssets(tt)]),K.q.instance.prodigy.effects.setSource(this),yield this._battleController.initBattlePrefab(tt),z&&(z.nextStateLoaded(),V.destroyLayer(Y)),B){const k=tt.resumedSegmentData;this._battleController.resumeLastBattleState(k)}else{gP.shouldRollForMagicoinBattleRewards((0,Dt.G)(mP.s).enabled,k.battleType,k.cannotDropMagicoin)&&K.q.instance.prodigy.gameContainer.get("c47-20b6").funnel.sendStep(EP.F.MagicoinBattleRewardsIntro,"feature",yP.T.EligibleBattleStarted,yP.h.EligibleBattleStarted),this._battleController.startStateMachine()}}catch(e){j.RQr.logError(e,"An error occurred while creating a secure battle.");let B=!0;try{B=yield this._battleController.handleBattleStartError(e)}catch(V){j.RQr.logError(V,"An error occurred while handling an error in a secure battle.")}B&&this.handleFatalBattleError()}}))}handleFatalBattleError(){this._config.onFatalError?this._config.onFatalError():this._config.onEscape?this._config.onEscape():K.q.instance.prodigy.world.teleportToCurrentMap()}preloadLocalAssets(){return(0,G.sH)(this,void 0,void 0,(function*(){this._config.backgroundID=yield this.getBackgroundId(this._config.backgroundID);const k=K.q.instance.prodigy.game,B=$.merge(this._battleController.getAssetList(),_P.l.guaranteeArray(this._config.backgroundID));j.Aq$.isDefined(this._config.backgroundMusicID)&&B.push(`bgm-${this._config.backgroundMusicID}`),pn.K.cacheAssets(k,B,pn.K.zoneAssetsCached);const U=K.q.instance.prodigy.load.assetsAsPromise(B),F=[Ei.l.RevampSpellHitInfo,Ei.l.RevampSpellTooltip,Ei.l.RevampActionMenu].map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return this._prefabLoader.preloadFromGUIDWithDependencies(k).promise}))));F.push(U),yield Promise.all(F)}))}preloadRemoteAssets(k){return(0,G.sH)(this,void 0,void 0,(function*(){j.VyI.log("SecureBattleRevamp.onStartSuccess - SUCCESS",j.$bb.Verbose);let B=this.getUnitAssets(k.state.units);k.preload&&(B=$.chain(k.preload).keys().flatMap((B=>k.preload[B].map((k=>this.getAsset(B,k))))).compact().union(B).value());const U=K.q.instance.prodigy.game;pn.K.cacheAssets(U,B,pn.K.zoneAssetsCached),yield K.q.instance.prodigy.load.assetsAsPromise(B)}))}getBackgroundId(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;const F=U(79259);return F?"string"==typeof k&&null!==(B=F[k])&&void 0!==B?B:k:(j.VyI.log("Revamp background replacement data not loaded",j.$bb.Error),k)}))}getUnitAssets(k){const B=[];for(const U of Object.values(k))if(!U.appearance&&j.Aq$.isDefined(U.asset.id)){const k=this.getAsset(U.asset.type,U.asset.id);k&&B.push(k)}return B}getAsset(k,B){var U;const F=this._gameDataProvider.getItem(k,B),G=null===(U=null==F?void 0:F.metadata)||void 0===U?void 0:U.assets;switch(k){case Ni.uj.Pet:return this.getPetAsset(G,B);case Ni.uj.Boss:case Ni.uj.Titan:return wP.H.getBossSpineId(G,B);case Ni.uj.Object:case"guid":return`${B}`;case"spellV2":return;default:j.VyI.log(`Unable to get asset of ${k} ${B}`,j.$bb.Warning)}}getPetAsset(k,B){var U,F,G;return"spine"===(null===(U=k.default)||void 0===U?void 0:U.type)?k.default.ID?`spine-${k.default.ID}`:J.Q[k.default.assetKey]:"spritesheet"===(null===(F=k.default)||void 0===F?void 0:F.type)?`default-pet-${B}`:"spritesheet"===(null===(G=k.reduced)||void 0===G?void 0:G.type)?`reduced-pet-${B}`:void j.VyI.log("Unable to get pet asset guid",j.$bb.Warning)}checkPetGearFtueState(k){const B=K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_PET_GEAR,ln.B.BREADCRUMB_PET_GEAR_FTUE_STEP_START),U=Object.values(null!=k?k:{}).some((k=>{var B;return Object.values(null!==(B=k.petGear)&&void 0!==B?B:{}).some((k=>j.Aq$.isDefined(k)))}));if(B&&U){const k=K.q.instance.prodigy.gameContainer.get("c47-20b6");k.playerProgression.sendFunnelAdvancedEvent({funnelName:"Pet_gear_tutorial",funnelType:"tutorial",stepName:Gh.l.PetGearGearUsedInBattle},{step_index:6}),k.playerProgression.sendFunnelAdvancedEvent({funnelName:"Pet_gear_tutorial",funnelType:"tutorial",stepName:Gh.l.PetGearTutorialComplete},{step_index:7})}}start(){super.start(),j.C1c.garbageCollectTextures()}update(){j.wa5.getActiveScene().update()}shutdown(){this._synapse.setUserStatus(lc.a.available).catch(j.RQr.createHandler("Unable to set social status")),K.q.instance.prodigy.load.removeAssets(),this._battleController&&this._battleController.destroy(),this._battleController=null,this._config=null,this._gameDataProvider=null,super.shutdown()}}(0,G.Cg)([(0,Re.b)("e20-0fb0"),(0,G.Sn)("design:type",Wt.E)],qN.prototype,"_loggedInPlayerDataProvider",void 0),(0,G.Cg)([(0,Re.b)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],qN.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,Re.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],qN.prototype,"_localizer",void 0),(0,G.Cg)([(0,Re.b)("779-a746"),(0,G.Sn)("design:type",Ue.d)],qN.prototype,"_synapse",void 0);class KN{constructor(k){this.game=k,j.o5U.isDesktop()&&j.o5U.isFirefox()&&this.game.input.keyboard.addKeyCapture([Mo.D.BACKSPACE]),k.input.mouse.addMouseWheelCallback(this.dispatchMouseEvent.bind(this,oi.Bk.OnMouseWheel)),k.input.keyboard.onDownCallback=this.dispatchKeyboardEvent.bind(this,"Prodigy.Events.Input.ON_KEY_DOWN_"),k.input.keyboard.onUpCallback=this.dispatchKeyboardEvent.bind(this,"Prodigy.Events.Input.ON_KEY_UP_"),k.input.keyboard.onPressCallback=this.dispatchKeyPressEvent.bind(this,"Prodigy.Events.Input.ON_KEY_PRESS_")}dispatchMouseEvent(k,B){this.game.broadcaster.broadcast(k,"Input",[B])}dispatchKeyboardEvent(k,B){let U="";j.Aq$.isDefined(B.key)&&(U=B.key.toUpperCase()),this.game.broadcaster.broadcast(k+U,"Input",[B])}dispatchKeyPressEvent(k,B,U){this.game.broadcaster.broadcast(`${k}_${U.keyCode}`,"Input",[U])}}var zN=U(48757);class YN extends zN.c{constructor(){super({zoneName:"zone-museum",atlas:q._.Zone_museum_json},[q._.Zone_museum_json]),this.area=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0],[0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0],[0,0,0,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,0,0],[0,0,0,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,0,0],[0,0,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0],[0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0],[0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0],[0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0],[0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,0],[0,0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,0],[0,0,0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,0,0],[0,0,0,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],[1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],this.startX=640,this.startY=545}create(k="dyno-A1"){super.create("dyno-A1")}screenSetup(){super.screenSetup(),this.content.addChild(K.q.instance.prodigy.create.sprite(196,522,q._.Zone_museum_json,"rail",new j.I9Y(0,1)));this.content.addChild(K.q.instance.prodigy.create.sprite(this.game.width-196,522,q._.Zone_museum_json,"rail",new j.I9Y(0,1))).scale.x=-1,this.path.addCallback(3,this.toDino.bind(this),!0);const k=K.q.instance.prodigy.dialogue.create(),B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;oP.getNewFossils(B.backpack).length>0&&k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MUSEUM_INTRO"),face:0});const U=[{ID:13,x:916,y:506,nx:949,ny:490},{ID:14,x:362,y:511,nx:331,ny:490},{ID:15,x:1192,y:707,nx:1216,ny:690},{ID:16,x:85,y:688,nx:65,ny:690},{ID:17,x:290,y:145},{ID:18,x:390,y:145},{ID:19,x:490,y:145},{ID:20,x:590,y:145},{ID:21,x:690,y:145},{ID:22,x:790,y:145},{ID:23,x:890,y:145},{ID:24,x:990,y:145}];let F;for(let G=0;G0){const B=K.q.instance.prodigy.dialogue.create();B.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MUSEUM_COLLECTED_ALL_FOSSILS"),face:1,audio:sA.AUDIO[1]}),B.setText({callback:K.q.instance.prodigy.open.gotItem.bind(K.q.instance.prodigy.open,k,null,null,"museum")}),B.startDeprecated("scoog")}}}unlockFossil(k){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.craft("fossil",k.ID),this.processFossil(k,!0)}processFossil(k,B=!1){let U;const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(F.backpack.hasItem("fossil",k.ID)>0)return k.type="fossil",k.full.removeAll(!0),k.ID<17?(U=k.full.add(K.q.instance.prodigy.create.sprite(0,0,q._.Zone_museum_json,k.ID)),U.x=-U.width/2,U.y=-U.height):k.full.add(K.q.instance.prodigy.icon.createFromData(k,0,0,new j.I9Y(.5,1))),k.full.visible=!0,k.empty.visible=!1,B&&this.prodigyGame.add.tween(k.full.scale,this).to({x:1.2,y:1.2},500,j.GS3.Quadratic.Out).to({x:1,y:1},500,j.GS3.Quadratic.In).start(),!0;{k.empty.removeAll(!0),U=k.empty.add(K.q.instance.prodigy.create.sprite(0,0,q._.Zone_museum_json,"empty")),U.x=-U.width/2,U.y=-U.height;const B=le.t.getItem("fossil",k.ID).data.recipe[0],G=F.backpack.hasItem(B.type,B.ID);return K.q.instance.prodigy.create.font(k.empty,U.x-50,U.y+27,`${G}/${B.N}`,{width:180,align:"center"}),k.empty.visible=!0,k.full.visible=!1,!1}}toDino(){K.q.instance.prodigy.world.it("dyno-A0")}}var QN=U(8083),XN=U(59685);const ZN=5;var JN,tx=U(23506),ex=U(39070),ix=U(56520),sx=U(28080);!function(k){k.PlayerCurrentWinStreak="DUELS_WIN_STREAK_NUMBER",k.PlayerBestWinStreak="DUELS_BEST_STREAK_NUMBER",k.PlayerCurrentWinStreakFlourish="DUELS_WIN_STREAK_NUMBER_FLOURISH",k.PlayerBestWinStreakFlourish="DUELS_BEST_STREAK_NUMBER_FLOURISH",k.OpponentCurrentWinStreak="DUELS_WIN_STREAK_NUMBER_OPPONENT",k.OpponentBestWinStreak="DUELS_BEST_STREAK_NUMBER_OPPONENT",k.OpponentCurrentWinStreakFlourish="DUELS_WIN_STREAK_NUMBER_FLOURISH_OPPONENT",k.OpponentBestWinStreakFlourish="DUELS_BEST_STREAK_NUMBER_FLOURISH_OPPONENT"}(JN||(JN={}));class nx extends yM.P{get _prefabGuid(){return Ei.l.DuelsMatchmakingScreen}constructor(){super(null,null),this._preBattleDuelMatchmakingStats=null,this.roomConfig=null,this.matchmakingFailurePopup=null}init(k,B){const U=Object.create(null,{init:{get:()=>super.init}});return(0,G.sH)(this,void 0,void 0,(function*(){U.init.call(this),this._playerPosition=k,this._matchFound=!1,this._isShowingLoadingScreen=!1,B&&(this.roomConfig=(yield ex.i.getValidatedRoomsConfig()).rooms.find((k=>k.id===B)))}))}create(){var k,B;if(null!==(B=null===(k=this._prefabRoot)||void 0===k?void 0:k.isDestroyed)&&void 0!==B&&!B)return;K.q.instance.game.broadcaster.addAppListener(oi.pm.GetTarget,(()=>this._playerPosition),this,K.q.instance.game,!1),this._segment.duelsStadium.sendInterfaceOpenedEvent();const U=K.q.instance.prodigy.gameContainer.get("306-5359");this.data.playerA=U,super.create(),this._matchmakingService.onMatched.add(this.onMatchFound,this),this._matchmakingService.onWaitTimeExhausted.add(this.onWaitTimeExhausted,this),this._matchmakingService.onMatchmakingFailure.add(this.onMatchmakingFailure,this),K.q.instance.prodigy.audio.playBGM(K.q.instance.prodigy.world.getZone(K.q.instance.prodigy.world.getCurrentZone()).bgmID,!0),K.q.instance.prodigy.audio.resumeBGM(),this.onCloseClicked.add((()=>{var k;this._segment.duelsStadium.sendCloseButtonClickedEvent(),this._matchmakingService.quitMatchmaking(),K.q.instance.prodigy.open.menuLayer=this.element.addChild(new j.mcf),this.data.shutdownLoadState=!0,K.q.instance.prodigy.open.map({onCloseButtonClicked:()=>{var k,B;K.q.instance.prodigy.world.it(U.data.zone,null===(k=this._playerPosition)||void 0===k?void 0:k.x,null===(B=this._playerPosition)||void 0===B?void 0:B.y)}}),null===(k=this._prefabRoot)||void 0===k||k.destroy()}))}loadPrefab(){const k=Object.create(null,{loadPrefab:{get:()=>super.loadPrefab}});return(0,G.sH)(this,arguments,void 0,(function*(B={}){const U=new j._mx;U.active=!1;const F=yield this._prefabLoader.loadWithDependenciesFromGUID(Ei.l.DuelMatchmakingOpponent,U);this._opponentSlotMachineAnimation=j.Uoy.getInjectedValue(F,"SLOT_MACHINE_ANIMATION"),this.data.showCancel=!1;const $=yield k.loadPrefab.call(this,Object.assign(Object.assign({PLAYER_2_AVATAR:F,FIND_MATCH_ON_CLICK:()=>(0,G.sH)(this,void 0,void 0,(function*(){yield this.findMatch()}))},B),yield xe.d.getElementalBoostInjectionDictionary()));return this._findMatchButton=j.Uoy.getInjectedValue($,"FIND_MATCH_BUTTON"),U.destroy(),yield this.injectWinStreakBadgeData(),$}))}findMatch(){return(0,G.sH)(this,void 0,void 0,(function*(){this._segment.duelsStadium.sendMatchmakingQueuedEvent(),this._findMatchButton.lockState(Zh.K.Disabled),this._opponentSlotMachineAnimation.startSpin(),this._minimumSpinTimePromise=j.Egh.timeout(nx.MINIMUM_SPIN_TIME_MS+ix.L.SPIN_LEAD_IN_TIME_MS);const k=yield this.getPlayerBattleStats();this._preBattleDuelMatchmakingStats=k,k.battleStreak<=nx.LOSE_STREAK_BOT_BATTLE_LIMIT?yield this.startBotBattle():yield this._matchmakingService.startMatchmaking(this.getBucketId())}))}getBucketId(){return(this.roomConfig?this.roomConfig.matchmakingBucket:1)+ZN}showOpponent(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U;const F=j.Aq$.isDefined(B);this._closeButton.lockState(Zh.K.Disabled);const G=sx.D.createWizardObject(k,!1);yield this._minimumSpinTimePromise,this._opponentObject=yield G,this._opponentSlotMachineAnimation.isSpinning&&(this._opponentSlotMachineAnimation.stopSpin(),yield this._opponentSlotMachineAnimation.onSpinComplete.asPromise());const $=j.Uoy.getInjectedValue(this._opponentSlotMachineAnimation.GameObject,"OPPONENT_PLAYER_CONTAINER").GameObject;$.addChild(this._opponentObject),$.setLayer($.parent.layer,!0),this._opponentObject.transform.setScale(-2,2),this._opponentSlotMachineAnimation.GameObject.parent.active=!1,this._isShowingLoadingScreen=!0,[["DUEL_HEADER_TEXT",!1],["DUEL_FOOTER_TEXT",!1],["FIND_MATCH_BUTTON",!1],["CLOSE_BUTTON",!1],["PLAYER_1_BANNER",!0],["PLAYER_2_BANNER",!0]].forEach((([k,B])=>{j.Uoy.getInjectedValue(this._prefabRoot,k).GameObject.active=B}));const H=null===(U=j.Uoy.getInjectedValue(this._prefabRoot,"ELEMENTAL_BOOST_DISPLAY"))||void 0===U?void 0:U.GameObject;null==H||H.destroy();const V=K.q.instance.prodigy.gameContainer.resolve(La.C),W=[this.data.playerA,k],[q,z]=W.map((k=>(V.init(k.appearance.getName()),V.getName())));Ja.d.updateInjectedValues(this._prefabRoot,{PLAYER_1_NAME:q,PLAYER_2_NAME:z}),F?yield this.injectWinStreakBadgeData(void 0,B):yield this.injectWinStreakBadgeData(k.userID),F&&(yield j.Egh.timeout(nx.ON_MATCH_FOUND_DELAY_MS))}))}onMatchFound(k){this._matchFound=!0,this._segment.duelsStadium.sendMatchFoundEvent(k.opponent.userID);(k=>(0,G.sH)(this,void 0,void 0,(function*(){yield this.showOpponent(k.opponent),yield this._matchmakingService.startDuel(k)})))(k).catch((k=>{this.onMatchmakingFailure(k instanceof Error?k:new Error(String(k)))}))}getPlayerBattleStats(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!j.Aq$.isDefined(this._playerBattleStats)){this._playerBattleStats=this._battleStatsHandler.getBattleStats();try{yield this._playerBattleStats}catch(e){throw this._playerBattleStats=null,e}}return(yield this._playerBattleStats).duelMatchmakingStats}))}injectWinStreakBadgeData(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U,F;let G,$;if(k){const B=(yield this._battleStatsHandler.getBattleStats(k)).duelMatchmakingStats;G=B.highestStreak,$=B.battleStreak}else{const k=yield this.getPlayerBattleStats();G=k.highestStreak,$=k.battleStreak,B&&(G+=B,$+=B)}const H=!j.Aq$.isDefined(k)&&!j.Aq$.isDefined(B),V=Object.assign(Object.assign({},this.getWinStreakInjectionDictionary(!1,G,H,null===(U=this._preBattleDuelMatchmakingStats)||void 0===U?void 0:U.highestStreak)),this.getWinStreakInjectionDictionary(!0,$,H,null===(F=this._preBattleDuelMatchmakingStats)||void 0===F?void 0:F.battleStreak));H&&(this._preBattleDuelMatchmakingStats=null),Ja.d.updateInjectedValues(this._prefabRoot,V)}))}getWinStreakInjectionDictionary(k,B,U,F){const G={};return B>1&&(U&&F+1===B?(F>1&&(G[k?JN.PlayerCurrentWinStreak:JN.PlayerBestWinStreak]=F),G[k?JN.PlayerCurrentWinStreakFlourish:JN.PlayerBestWinStreakFlourish]=B):k?G[U?JN.PlayerCurrentWinStreak:JN.OpponentCurrentWinStreak]=B:G[U?JN.PlayerBestWinStreak:JN.OpponentBestWinStreak]=B),G}onWaitTimeExhausted(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.startBotBattle()}))}startBotBattle(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;this._matchFound=!0;const B=()=>{this.roomConfig=null,xe.d.openDuelsStadiumMenu().catch(j.RQr.createHandler("Error opening duels stadium menu"))},U=yield K.q.instance.prodigy.gameContainer.get("a25-68f4").getBattleStartQuestData(Ni.gu.MatchmakingBotDuel),F=(yield this.getPlayerBattleStats()).battleStreak,G=XN.D.Elementalist,$=tx.V.getBotPersonalityInstanceConfig(G,F),H={battleType:Ni.gu.MatchmakingBotDuel,botConfig:$,roomId:null===(k=this.roomConfig)||void 0===k?void 0:k.id,activeQuestIDs:U.questIDs,questEventsToSend:U.questEvents};this._segment.duelsStadium.sendMatchFoundEvent(null,G),this._segment.duelsStadium.setBotDifficultyEvent(F);const V={backgroundID:[nr.q.Battle_coliseum_outside_bg,nr.q.Battle_coliseum_outside_fg],onVictory:B,onEscape:B,onDefeat:B,clearWorld:!1,botConfig:$,defeatData:{preventDefaultTeleport:!0}};K.q.instance.game.state.states.get(Ie.G.SecureBattleRevamp).startBattleRequest(H,V)}))}onMatchmakingFailure(k){Ko.captureException(k),j.RQr.logError(k,"Matchmaking failure"),this._matchmakingService.quitMatchmaking();const B={TITLE:this._localizationService.getText("DUELS_MATCHMAKING_ERROR_TITLE"),MESSAGE:this._localizationService.getText("DUELS_MATCHMAKING_ERROR_BODY"),VISUAL_OVERLAY_ACTIVE:!0,CTA_BUTTON_ENABLED:!0,CTA_BUTTON_FUNCTION:this.tryAgainButtonClicked.bind(this)};Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Ei.l.PaperDialogInjectionConfigured,B).then((k=>(0,G.sH)(this,void 0,void 0,(function*(){var B;this._opponentSlotMachineAnimation.isSpinning&&(this._opponentSlotMachineAnimation.stopSpin(),yield this._opponentSlotMachineAnimation.onSpinComplete.asPromise()),this.matchmakingFailurePopup=k,this._opponentSlotMachineAnimation.GameObject.parent.active=!0,null===(B=this._opponentObject)||void 0===B||B.destroy(),this._findMatchButton.unlockState(),this._closeButton.unlockState()})))).catch((k=>{j.RQr.logError(k,"Error showing matchmaking failure message")}))}tryAgainButtonClicked(){var k;this._isShowingLoadingScreen&&(this.shutdown(),K.q.instance.game.state.start(Ie.G.DuelMatchmaking,!1,this._playerPosition,null===(k=this.roomConfig)||void 0===k?void 0:k.id))}consumeStadiumRoomEntryCost(){var k;if(null===(k=this.roomConfig)||void 0===k?void 0:k.entryCost){(Array.isArray(this.roomConfig.entryCost)?this.roomConfig.entryCost:[this.roomConfig.entryCost]).forEach((k=>{"gold"===k.type&&K.q.instance.prodigy.gameContainer.get("306-5359").changeGold(-1*k.amount)}))}}start(){this._playerBattleStats=this._battleStatsHandler.getBattleStats(),j.Egh.timeout(500).then((()=>(0,G.sH)(this,void 0,void 0,(function*(){yield this.findMatch()})))).catch(j.RQr.createHandler("Timeout error, Find Match did not run"))}shutdown(){var k;if(K.q.instance.prodigy.open.cleanup(),this._matchmakingService.quitMatchmaking(),this._matchmakingService.onMatched.removeAll(this),this._matchmakingService.onWaitTimeExhausted.removeAll(this),this._matchmakingService.onMatchmakingFailure.removeAll(this),null===(k=this.matchmakingFailurePopup)||void 0===k||k.destroy(),this._playerBattleStats=null,this._matchFound){this._matchFound=!1,this.data.shutdownLoadState=!1;const k=K.q.instance.game.tweens.getAll();this._managedTweens=$.clone(k),k.length=0}else K.q.instance.game.broadcaster.removeAppListener(oi.pm.GetTarget,this,K.q.instance.game),this._managedTweens&&(K.q.instance.game.tweens.getAll().push(...this._managedTweens),this._managedTweens=null),super.shutdown()}}nx.MINIMUM_SPIN_TIME_MS=2e3,nx.ON_MATCH_FOUND_DELAY_MS=3e3,nx.LOSE_STREAK_BOT_BATTLE_LIMIT=-2,(0,G.Cg)([(0,Re.b)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],nx.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,Re.b)("ba8-cb5e"),(0,G.Sn)("design:type",Object)],nx.prototype,"_matchmakingService",void 0),(0,G.Cg)([(0,Re.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],nx.prototype,"_localizationService",void 0),(0,G.Cg)([(0,Re.b)("c47-20b6"),(0,G.Sn)("design:type",Ge.Y)],nx.prototype,"_segment",void 0),(0,G.Cg)([(0,Re.b)("0f1-c356"),(0,G.Sn)("design:type",nw)],nx.prototype,"_battleStatsHandler",void 0);var ax=U(1559),rx=U(49334),ox=U(26022);class hx extends z.U{constructor(){super(...arguments),this._isAssetsLoaded=!1,this._isDataLoaded=!1,this._isBootLoaded=!1,this._localizedTextLoaded=!1,this._gameData=null,this._featureRevisionsData={},this._waitingOnFeatureRevisionsData=0}get game(){return K.q.instance.game}static init(){hx.createGame(),hx.logAntiTamperingWarning()}static createGame(){const k=V.ENV.WEBGL2;V.settings.PREFER_ENV=k,V.settings.MIPMAP_TEXTURES=0;const B={forceCanvas:!1,clearBeforeRender:!0,backgroundAlpha:1,resolution:1,preserveDrawingBuffer:!0,antialias:!1},U=new an.n({width:1280,height:720,parent:"game-container",roundPixels:!1,failIfMajorPerformanceCaveat:!1},B);U.init(),new j.W$e(U),new K.q(U),new ZR(U);const F=new XR.A(K.q.instance.prodigy.load,U.cache,K.q.instance.prodigy.assets);j.W$e.instance.loader=F,j.W$e.instance.prefabLoaderInstance=K.q.instance.prodigy.gameContainer.get("d0e-64fd"),j.W$e.instance.getWorkerURL=K.q.instance.prodigy.gameContainer.get("be9-3278").getWorkerPath.bind(K.q.instance.prodigy.gameContainer.get("be9-3278")),U.state.add(Ie.G.Boot,new hx),U.state.add(Ie.G.Loading,new of.R),U.state.add(Ie.G.TileScreen,new ox.b),U.state.add(Ie.G.SplashScreen,new Vd.S),U.state.add(Ie.G.Faint,new ax.v),U.state.add(Ie.G.Museum,new YN),U.state.add(Ie.G.DinoDig,new oP),U.state.add(Ie.G.DanceDance,new nP),U.state.add(Ie.G.CoOp,new QN.w),U.state.add(Ie.G.SecureBattleRevamp,new qN),U.state.add(Ie.G.PrefabScene,new rx.Q),U.state.add(Ie.G.DuelMatchmaking,new nx),U.state.add(Ie.G.Rifts,new vP.n),U.state.add(Ie.G.LootDashTransport,new fP),U.state.add(Ie.G.LootDashMenu,new dP),U.state.start(Ie.G.Boot),window.clearInput=()=>{for(let k=0;k{this.featureFlagsLoaded(this.addFeatureFlagDebugData(k))})):this.featureFlagsLoaded(this.addFeatureFlagDebugData(U))}addFeatureFlagDebugData(k){let B=k;W.qg(window.location.search);return B}featureFlagsLoaded(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;const U=K.q.instance.prodigy.gameContainer.get("afa-b7c5");U.endTracing(fu.u.BootFeatureFlags,{flags_count:Object.keys(k).length});const F=K.q.instance.prodigy.gameContainer,G={},$=F.get("80c-6fa4");$.initializeWithJson(k),K.q.instance.prodigy.load.flagProvider=$,U.startTracing(fu.u.BootGameData);const H={},V=[];V.push(hx.loadJSONFromXHR($.getItemsDataURI(),"game-metadata").then((k=>{this._gameData=k,H.game_metadata_loaded=!0})).catch((k=>{H.game_metadata_error=!0,this.createPromiseError("Failed to load game metadata.")(k)}))),V.push(hx.loadJSONFromXHR($.getDependencyMapURI(),"dependencyMap").then((k=>{F.get("d0e-64fd").initDependencyMapper(k),Ut.E.dependencyMapper=new j.nvu(k),H.dependency_map_loaded=!0})).catch((k=>{H.dependency_map_error=!0,this.createPromiseError("Failed to load dependency map.")(k)})));const W=K.q.instance.prodigy.gameContainer.get("2e6-0f71").getUUID();K.q.instance.prodigy.gameContainer.get("11d-01b8").setUser(W),U.startTracing(fu.u.BootFeatureRevision);const q={},z=$.getFeatureRevisionsURIs();if(this._waitingOnFeatureRevisionsData=null!==(B=null==z?void 0:z.length)&&void 0!==B?B:0,q.revision_count=this._waitingOnFeatureRevisionsData,this._waitingOnFeatureRevisionsData>0){const k=$.getValue("gameDataPath"),B=z.length;for(let U=0;U{--this._waitingOnFeatureRevisionsData;const B=["audio","atlas","bgm","prefab","sfx","singleImage","streamedMap","tiledMap","tileset"],U={};for(const F in k)B.includes(F)?j.VyI.log(`Attempting to load an item of type : ${F} as a feature revision. This is not supported`,j.$bb.Warning):U[F]=k[F];this.mergeWithGameData(this._featureRevisionsData,U)})).catch((()=>{--this._waitingOnFeatureRevisionsData}));V.push(F)}}yield Promise.all(V),U.endTracing(fu.u.BootGameData,H),this._waitingOnFeatureRevisionsData<=0&&(q.revisions_loaded=!0),U.endTracing(fu.u.BootFeatureRevision,q);for(let k=0;k{var k,B,U;const G=F.get(j.$Bt.LocalizationService),$=[];for(let F=1;;++F){const k=`LOADER_FLAVOUR_${F}`;if(!G.hasText(k))break;$.push(G.getText(k))}null===(U=null===(B=null===(k=window.SW)||void 0===k?void 0:k.Load)||void 0===B?void 0:B.addFlavourMessages)||void 0===U||U.call(B,$)}))];{const k=K.q.instance.prodigy.gameContainer.get("80c-6fa4").getPrefabsURIs(),B={};for(const[F,G]of Object.entries(en.T))B[G]=Number.parseInt(F);const U=k=>{if(!k)throw new Error("No data present in loaded prefabs.");k.forEach((k=>{B[k.guid]&&(k.ID=B[k.guid])})),G.prefab=G.prefab.concat(k)};for(const F of k){const k=hx.loadJSONFromXHR(F,"prefab").then(U);Y.push(k)}}yield Promise.all(Y),U.endTracing(fu.u.BootAssets,{assets_loaded:!0});const Q=$.getValue("gameConstants");for(const k in Q)Vt.s.setGameConstant(k,Q[k]);this.cacheGeolocationData(),yield this.loadedData(this._gameData,this._featureRevisionsData,G),this._gameData&&this._waitingOnFeatureRevisionsData<=0&&this.loadedLocalizedData()}))}cacheGeolocationData(){K.q.instance.prodigy.gameContainer.get("fab-547a").getData().then((([k,B])=>{j.VyI.log(`Geolocation result: ${JSON.stringify(B)} ${k?k.getErrorMessage():""}`,j.$bb.Verbose)}))}createPromiseError(k){return B=>{j.VyI.log(k,j.$bb.Error),console.error(B)}}loadAndTraceLocalizationData(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(fu.u.BootLocalization);const B={};yield this.fetchLocalizationData().catch((k=>{B.localization_error=!0,this.createPromiseError("Failed to load localization data.")(k)})),this._localizedTextLoaded=!0,B.localization_loaded=!0,k.endTracing(fu.u.BootLocalization,B)}))}fetchLocalizationData(){return(0,G.sH)(this,void 0,void 0,(function*(){yield Wd.O.determineLocale();const k=new JR.K(Wd.O.localeCode);K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).setDataSource(k),yield k.dataLoadPromise}))}loadedData(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){let F;const G=k.emote;for(F=0;Fk.ID?k.ID:k.legacyID?k.legacyID:k.guid?k.guid:void 0))}loadNonLocalAssets(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.prodigy.gameContainer.get("80c-6fa4").getAssetsDataURI();return hx.loadJSONFromXHR(k,"assets-metadata").then((k=>{var B,U,F,G,$,H,V,W,q,z,Y,Q,X,Z,J,tt,et,it,st,nt;const at={},rt=k;for(const K in rt){const k=rt[K];for(const rt in k){const ot=k[rt],ht=ot.hash;let ct,dt;if(j.Aq$.isDefined(null===(F=null===(U=null===(B=ot.metadata)||void 0===B?void 0:B.assets)||void 0===U?void 0:U.default)||void 0===F?void 0:F.v)?ct=ot.metadata.assets.default.v:j.Aq$.isDefined(ot.v)?ct=ot.v:j.Aq$.isDefined(null===(V=null===(H=null===($=null===(G=ot.data)||void 0===G?void 0:G.metadata)||void 0===$?void 0:$.assets)||void 0===H?void 0:H.default)||void 0===V?void 0:V.v)&&(ct=ot.data.metadata.assets.default.v),"json"===K){const k=ot.data.filename;dt={type:K,base:`${de.s.ASSET_FOLDER}/${null!==(W=ot.data.originalType)&&void 0!==W?W:K}/`,url:`${null!==(q=ot.data.originalFilename)&&void 0!==q?q:k}/${ot.hash}/${k}.${ot.assetType}`,data:ot.data}}else if("tileset"===K){const k=`${de.s.ASSET_FOLDER}/tilesets/`;let B;B=(null===(z=ot.data)||void 0===z?void 0:z.filename)?ot.data.filename:ot.nameID;dt={type:"spritesheet",base:k,url:`${B}/${ct||ht}/${B}.png`,w:null!==(Q=null===(Y=null==ot?void 0:ot.data)||void 0===Y?void 0:Y.w)&&void 0!==Q?Q:40,h:null!==(Z=null===(X=null==ot?void 0:ot.data)||void 0===X?void 0:X.h)&&void 0!==Z?Z:40}}else if("tiledMap"===K){let k;k=hx._tiledNameMappings[ot.nameID]?hx._tiledNameMappings[ot.nameID]:ot.nameID?ot.nameID:null===(J=ot.data)||void 0===J?void 0:J.filename;dt={type:"json",base:`${de.s.ASSET_FOLDER}/tiled-data/`,url:`${k}/${ct||ht}/${k}.json`}}else dt={type:K,fullURL:ot.fullURL,data:ot.data},"spine"===K&&this.setupFloatling(ot);"spine"===K&&(null===(it=null===(et=null===(tt=ot.metadata)||void 0===tt?void 0:tt.assets)||void 0===et?void 0:et.default)||void 0===it?void 0:it.hitbox)&&(dt.data.hitbox=ot.metadata.assets.default.hitbox),(null===(st=ot.atlasLink)||void 0===st?void 0:st.guid)&&j.W$e.instance.game.cache.addAtlasAlias(ot.guid,ot.atlasLink.guid,ot.atlasLink.frame),ot.sliceData&&j.W$e.instance.game.cache.addSliceData(ot.guid,ot.sliceData),ct?("sfx"===K&&18===ot.ID&&(ct=1),dt.v=ct):ht&&(dt.hash=ht),j.Aq$.isDefined(ct)||j.Aq$.isDefined(ht)||dt.fullURL||j.VyI.log(`No full url and no version, this asset will not load: ${K}-${null!==(nt=ot.ID)&&void 0!==nt?nt:ot.legacyID}`,j.$bb.Error),ot.guid&&(at[ot.guid]=dt),ot.ID&&(at[`${K}-${ot.ID}`]=dt),ot.nameID&&(at[ot.nameID]=dt)}}K.q.instance.prodigy.assets.assignAssets(at);const ot=this.getDuplicateLegacyMappings(at);K.q.instance.prodigy.assets.assignAssets(ot),this.loadAssets()}))}))}loadAssets(){K.q.instance.prodigy.load.assets([q._.General_core_json,q._.Tiled_sprites_json],this.loadedAssets.bind(this))}setupFloatling(k){var B,U;const F=null===(B=k.data)||void 0===B?void 0:B.filename;if(F&&0===F.indexOf(pP.s.FLOATLING_PREFIX))for(let G=0;G-1){const B=null!==(U=k.ID)&&void 0!==U?U:k.data.ID;pP.s.floatlingSpineIDs[G][F.charAt(F.length-1)]=B;break}}}static loadJSONFromXHR(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){return new Promise(((U,F)=>{let G=3;const $=()=>{const H=new XMLHttpRequest;H.onreadystatechange=()=>{H.readyState===XMLHttpRequest.DONE&&(200===H.status?U(H.response):G>0?(G--,$()):(j.VyI.log(`Failed to load ${B} data.`,j.$bb.Error),F()))},H.responseType="json",H.open("GET",k,!0),H.send("")};$()}))}))}loadLocalAssets(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.prodigy.gameContainer.get("6a1-4b92").getCurrentEnvironmentByHost()===$e.h.Local?"":"/game",B=`${window.location.origin}${k}`,U=`${B}/projectConfig/assetPathConfig.json`;return hx.loadJSONFromXHR(U,"assetPathConfig").then((k=>{var U;const F=k,G={},$=Object.keys(F.assetData);for(let V=0;V<$.length;V++){const k=$[V],H=F.assetData[k];"spine"===H.type&&this.setupFloatling(H),(null===(U=H.atlasLink)||void 0===U?void 0:U.guid)&&j.W$e.instance.game.cache.addAtlasAlias(H.guid,H.atlasLink.guid,H.atlasLink.frame),H.sliceData&&j.W$e.instance.game.cache.addSliceData(H.guid,H.sliceData),"prefab"!==H.type&&(G[k]={type:H.type,fullURL:`${B}/${F.assetData[$[V]].path}`,data:H.data})}K.q.instance.prodigy.assets.assignAssets(G);const H=this.getDuplicateLegacyMappings(G);K.q.instance.prodigy.assets.assignAssets(H),this.loadAssets()}))}))}getDuplicateLegacyMappings(k){const B={};if(!window.legacyDuplicateAssetMappings)return B;for(const U in window.legacyDuplicateAssetMappings){const F=window.legacyDuplicateAssetMappings[U];for(const G in F){const j=F[G],$=`${U}-${G}`,H="string"!=typeof j||0!==j.indexOf(U)?`${U}-${j}`:`${j}`,V=window.legacyAssetMappings[$],W=window.legacyAssetMappings[H],q=k[V],K=k[W];q&&!K?W&&(B[W]=q):!q&&K&&V&&(B[V]=K)}}return B}loadLocalPrefabData(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=K.q.instance.prodigy.gameContainer.get("6a1-4b92").getCurrentEnvironmentByHost()===$e.h.Local,U=B?"":"/game",F=`${window.location.origin}${U}`,G=new j.H12,$={};$.serverURL=B?"http://localhost:32220":F,yield G.loadProjectConfigData(`${F}/projectConfig/assetPathConfig.json`,`${F}/projectConfig/dependencyMap.json`,$),yield hx.loadJSONFromXHR(`${F}/projectConfig/dependencyMap.json`,"local dependencyMap").then((k=>{K.q.instance.prodigy.gameContainer.get("d0e-64fd").initDependencyMapper(k),Ut.E.dependencyMapper=new j.nvu(k)}));const H={},V=new Set,W=k=>{if(!k)throw new Error("No data present in loaded prefabs.");const B={};k.forEach((k=>{B[k.guid]={data:{prefab:k.data.prefab},name:k.data.filename,key:k.guid,local:!0}}));const U=Object.keys(B);for(let F=0;F{const B=Object.keys(en.T);for(let U=0;U{let U=!1;k.prefab.forEach((k=>{k.guid===B&&(k.data.prefab=H[B],U=!0)})),U||k.prefab.push({guid:B,ID:B,data:{prefab:H[B],name:B},type:"Prefab"})}))}))}))}loadedLocalizedData(){window.updateGameLoaderProgress(75,"loadedLocalizedData - begin");const k=["boots","follow","hat","mount","outfit","weapon","pet"],B=K.q.instance.prodigy.gameContainer.get("8c1-3c93");B.addPhrases(U(60675).H,!0);for(let U=0;Uk.data.name)));window.addEventListener("message",(k=>{if(k.origin===window.location.origin){const B=k.data;try{B.cmd&&(B.cmd.indexOf("T2C_")>=0||B.cmd.indexOf("C2T_")>=0)&&(B.prodigy||window.postMessage(JSON.stringify({cmd:"T2C_Result",param:[["Cheating is BAD!","Stop doing it!"]],prodigy:!0}),window.location.origin))}catch(e){}}}),!1),j.o5U.isAndroid()&&K.q.instance.game.device.rotationEvent.add((k=>{k?(this.game.scale.fullScreenScaleMode=Y.y.EXACT_FIT,this.game.scale.fullScreenTarget=document.body,this.game.scale.startFullScreen().catch(j.RQr.createHandler("Failed to start fullscreen."))):this.game.scale.stopFullScreen()})),this._metricsManager.checkForCrash()}loadedAssets(k,B){this._isAssetsLoaded=B}create(){super.create(),K.q.instance.prodigy.init(),this.game.scale.scaleMode=Vt.s.get("GameConstants.Build.SCALE_MODE"),this.game.scale.refresh(),this.input.maxPointers=1,this.game.stage.disableVisibilityChange=!0,j.o5U.isDesktop()?this.game.scale.pageAlignHorizontally=!0:this.game.scale.forceOrientation(!0),this.extendInput()}extendInput(){const k=K.q.instance.game;k.inputDispatcher=new KN(k),k.input.setEnterCallback=B=>{k.input.enterCallback=B},k.input.clearEnterCallback=()=>{delete this.game.input.enterCallback},document.addEventListener("keyup",(B=>{13===B.keyCode&&j.Aq$.isDefined(k.input.enterCallback)&&k.input.enterCallback()}))}update(){if(super.update(),!this._isBootLoaded&&this._isAssetsLoaded&&this._isDataLoaded&&this._localizedTextLoaded){this._isBootLoaded=!0;const k=K.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(fu.u.BootRebuildGUID),pn.K.addLocalGuidsToCommonAssetsCached(),K.q.instance.game.broadcaster.broadcast(oi.fP.Loaded,null,[]);K.q.instance.prodigy.gameContainer.get(j.t5G.PrefabDataProvider).rebuildPrefabGuidMap(),k.endTracing(fu.u.BootRebuildGUID),k.startTracing(fu.u.BootStartNextState),K.q.instance.game.state.start(Ie.G.SplashScreen),k.endTracing(fu.u.BootStartNextState),k.endTracing(fu.u.Boot,{asset_loaded:this._isAssetsLoaded,data_loaded:this._isDataLoaded,localized_text_loaded:this._localizedTextLoaded,boot_loaded:this._isBootLoaded})}}shutdown(){K.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(fu.u.Boot,{completed:!1,shutdown_before_completion:!0}),super.shutdown()}static logAntiTamperingWarning(){console.log("\n%c WARNING! %c\n\nThis is a browser feature for developers only. If someone told you to copy-paste something here, it is a scam and may provide others with access to your account and/or your computer. This may result in your account being deleted and/or you may be banned from Prodigy.\n","background: #F00; font-family: Arial; color: #FFF; font-size: 12pt; font-weight: 500; padding: 5px; margin-bottom: 5px","background: none; font-family: Arial; font-size: 10pt; line-height: 20px;")}}hx._tiledNameMappings={"map-crystal_caverns-dungeonhub":"crystal-caverns-hub","map-skywatch-a0":"map-cloudzone-a0","map-skywatch-a1":"map-cloudzone-a1","map-skywatch-b1":"map-cloudzone-b1","map-skywatch-b2":"map-cloudzone-b2","map-skywatch-b3":"map-cloudzone-b3","map-skywatch-c1":"map-cloudzone-c1","map-skywatch-c2":"map-cloudzone-c2","map-skywatch-c3":"map-cloudzone-c3","map-skywatch-c4":"map-cloudzone-c4","map-skywatch-c5":"map-cloudzone-c5","map-skywatch-d1":"map-cloudzone-d1","map-skywatch-d2":"map-cloudzone-d2","map-skywatch-d3":"map-cloudzone-d3","map-skywatch-e1":"map-cloudzone-e1","map-skywatch-e2":"map-cloudzone-e2","map-skywatch-e3":"map-cloudzone-e3","map-skywatch-e4":"map-cloudzone-e4","map-skywatch-e5":"map-cloudzone-e5","map-academy-cr1":"map-academy-gh-landing2","map-academy-cr2":"map-academy-gh-landing1","map-earthtower-cr":"map-earthtower-common","map-earthtower-wr":"map-earthtower-warden","map-earth-tower-end":"map-earthtower-entrance-exit","map-icetower-cr":"map-icetower-common","map-icetower-wr":"map-icetower-warden","map-ice-tower-end":"map-icetower-entrance-exit","map-lamplight-c3-arena-pumpkinfest":"map-lamplight-c3-pumpkinfest","map-lamplight-c3-arena-springfest":"map-lamplight-c3-springfest","map-lamplight-c3-arena-starlight_festival":"map-lamplight-c3-starlight_festival","map-lamplight-c3-arena-summerfest":"map-lamplight-c3-summerfest","map-lamplight-c3-arena-winterfest":"map-lamplight-c3-winterfest","towertown-default-1":"towertown-1up","towertown-default-2":"towertown-2up","towertown-tutorial":"towertown-1up-tut-sub","crystal-caverns-phase-1-farback":"crystal-caverns-phase-1-parallax"},window.Boot=hx},8083:(k,B,U)=>{"use strict";U.d(B,{w:()=>_s});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(92579),V=U(35120),W=U(29569),q=U(91207),K=U(77938),z=U(98400),Y=U(99625),Q=U(82209),X=U(129),Z=U(27812),J=U(63115),tt=U(47389),et=U(71857),it=U(53885),st=U(80060),nt=U(83441);class at extends G.uAl{constructor(){super(...arguments),this.currentValue=0,this.onHealthChanged=new G.HN0}get CurrentValue(){return this.currentValue}set CurrentValue(k){this.currentValue!==k&&(this.currentValue=k,this.onHealthChanged.dispatch(this.currentValue))}get OnHealthChanged(){return this.onHealthChanged}get InitialValue(){return this.initialValue}set InitialValue(k){this.initialValue=k}reset(){this.CurrentValue=this.initialValue}destroy(){this.onHealthChanged.dispose(),super.destroy()}}class rt extends G.JTX{constructor(){super(...arguments),this.battleTeam=null}get DamageReceiver(){return this.damageReceiver}get DamageSource(){return this.damageSource}get BattleTeam(){return this.battleTeam}set BattleTeam(k){null!==this.battleTeam&&this.battleTeam.removeMember(this),this.battleTeam=k,this.battleTeam.addMember(this)}get Health(){return this.health}get EnterBattleAnimationState(){return this.enterBattleAnimationState}get IdleAnimationState(){return this.idleAnimationState}get AttackAnimationState(){return this.attackAnimationState}get TakeDamageAnimationState(){return this.takeDamageAnimationState}get DefeatAnimationState(){return this.defeatAnimationState}get VictoryAnimationState(){return this.victoryAnimationState}get NameProvider(){return this.name}get Level(){return this.level}get Element(){return this.element}get CastPoint(){return this.castPoint}get ImpactSize(){return this.impactSize}get ImpactOffset(){return this.impactOffset}destroy(){null!==this.battleTeam&&this.battleTeam.removeMember(this),super.destroy()}setAsActiveTeamMember(){this.battleTeam.ActiveMember=this}}(0,F.Cg)([(0,G.fFd)("DamageReceiver"),(0,F.Sn)("design:type",Object)],rt.prototype,"damageReceiver",void 0),(0,F.Cg)([(0,G.fFd)("DamageSource"),(0,F.Sn)("design:type",Object)],rt.prototype,"damageSource",void 0),(0,F.Cg)([(0,G.fFd)("Health"),(0,F.Sn)("design:type",at)],rt.prototype,"health",void 0),(0,F.Cg)([(0,G.fFd)("EnterBattleAnimationState"),(0,F.Sn)("design:type",Object)],rt.prototype,"enterBattleAnimationState",void 0),(0,F.Cg)([(0,G.fFd)("IdleAnimationState"),(0,F.Sn)("design:type",Object)],rt.prototype,"idleAnimationState",void 0),(0,F.Cg)([(0,G.fFd)("AttackAnimationState"),(0,F.Sn)("design:type",Object)],rt.prototype,"attackAnimationState",void 0),(0,F.Cg)([(0,G.fFd)("TakeDamageAnimationState"),(0,F.Sn)("design:type",Object)],rt.prototype,"takeDamageAnimationState",void 0),(0,F.Cg)([(0,G.fFd)("DefeatAnimationState"),(0,F.Sn)("design:type",Object)],rt.prototype,"defeatAnimationState",void 0),(0,F.Cg)([(0,G.fFd)("VictoryAnimationState"),(0,F.Sn)("design:type",Object)],rt.prototype,"victoryAnimationState",void 0),(0,F.Cg)([(0,G.fFd)("Name"),(0,F.Sn)("design:type",Object)],rt.prototype,"name",void 0),(0,F.Cg)([(0,G.fFd)("Level"),(0,F.Sn)("design:type",Number)],rt.prototype,"level",void 0),(0,F.Cg)([(0,G.fFd)("Element"),(0,F.Sn)("design:type",String)],rt.prototype,"element",void 0),(0,F.Cg)([(0,G.fFd)("CastPoint",!1),(0,F.Sn)("design:type",Object)],rt.prototype,"castPoint",void 0),(0,F.Cg)([(0,G.fFd)("ImpactSize",!1),(0,F.Sn)("design:type",Object)],rt.prototype,"impactSize",void 0),(0,F.Cg)([(0,G.fFd)("ImpactOffset",!1),(0,F.Sn)("design:type",Object)],rt.prototype,"impactOffset",void 0);var ot=U(16495);class ht extends G.JTX{constructor(){super(...arguments),this.walkTarget=null,this.movement=null,this.animationPlayed=!1,this.onComplete=new G.HN0}get WalkTarget(){return this.walkTarget}set WalkTarget(k){this.walkTarget=k}get MovementComponent(){return this.movement}set MovementComponent(k){this.movement=k}get OnComplete(){return this.onComplete}play(){(0,ot.sR)(this.animators,et.$.WALK,!0),this.movement.onMoveEnd.addOnce((()=>{(0,ot.sR)(this.animators,this.idleAnimationName,!0),this.animationPlayed=!0,this.onComplete.dispatch()})),this.movement.MoveTarget=this.walkTarget}hasFinishedPlaying(){return this.animationPlayed}destroy(){this.onComplete.dispose(),super.destroy()}}(0,F.Cg)([(0,G.fFd)("Animators"),(0,F.Sn)("design:type",Object)],ht.prototype,"animators",void 0),(0,F.Cg)([(0,G.fFd)("IdleAnimationName"),(0,F.Sn)("design:type",String)],ht.prototype,"idleAnimationName",void 0);class ct extends G.s3P{constructor(){super(...arguments),this.onComplete=new G.HN0,this.animationName=null,this.loop=!1,this.animationPlayed=!1}get OnComplete(){return this.onComplete}get AnimationName(){return this.animationName}set AnimationName(k){this.animationName=k}get LoopAnimation(){return this.loop}set LoopAnimation(k){this.loop=k}play(){if(Array.isArray(this.animators)){const k=this.animators.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return new Promise((B=>{k.OnAnimationComplete.addOnce(B),k.playAnimation(this.animationName,this.loop)}))}))));Promise.all(k).then((()=>{this.animationPlayed=!0,this.onComplete.dispatch()})).catch((()=>{G.VyI.log("PlayInjectAnimatorsState - Warning: Could not play all animations",G.$bb.Warning)}))}else this.animators.OnAnimationComplete.addOnce((()=>{this.onComplete.dispatch()})),this.animators.playAnimation(this.animationName,this.loop)}hasFinishedPlaying(){return this.animationPlayed}}(0,F.Cg)([(0,G.fFd)("Animators"),(0,F.Sn)("design:type",Object)],ct.prototype,"animators",void 0);class dt extends G.PQK{set idleAnimationName(k){this._idleAnimationName=k}installBindings(){const k=new ct(this.Container);k.AnimationName=this._idleAnimationName,k.LoopAnimation=!0,this.Container.bind("IdleAnimationState").toConstantValue(k);const B=new ct(this.Container);B.AnimationName=et.$.ATTACK,B.LoopAnimation=!1,this.Container.bind("AttackAnimationState").toConstantValue(B),this.Container.bind("IdleAnimationName").toConstantValue(this._idleAnimationName),this.Container.bind("CastPoint").toConstantValue({x:60,y:-40}),this.Container.bind("ImpactSize").toConstantValue({x:0,y:0}),this.Container.bind("ImpactOffset").toConstantValue({x:0,y:0})}}class lt{constructor(k){this.game=null,this.game=k}createPlayer(k,B,U,j){return(0,F.sH)(this,void 0,void 0,(function*(){return new Promise(($=>(0,F.sH)(this,void 0,void 0,(function*(){const F=B.getAvailableSlot();if(null!==F){F.IsOccupied=!0;const B=new X.a(V.q.instance.game);let H;U&&(H={type:U.transformType,ID:U.transformID}),B.init({data:{chargedLevelData:j},appearance:{morph:H}});const W=new Q.z;W.initialize(B);const q={"377-3e7b":W},K=V.q.instance.prodigy.gameContainer.get("d0e-64fd"),z=yield st.d.loadWithInjectedValuesAndDependenciesFromGUID(K,Y.l.RemotePlayer,q);z.setLayer(void 0,!0);const at=z.findComponentInChildren(tt.b),ot=z.findComponent(it.u).getRootContainer();F.GameObject.parent.addChild(z),F.GameObject.parent.legacyTransform.group.addChild(ot),ot.visible=!1,ot.transform.position.set(F.OffScreenStartPosition.x,F.OffScreenStartPosition.y);const ct=z.addComponent(G.bE_),lt=new dt;lt.idleAnimationName=U?et.$.STAND:et.$.STOP_HEAVY,ct.Installers.push(lt),ct.runInstallers();const ut=z.addComponent(G.Fid);ut.Identifier="Animators",ut.Components=[z.findComponentInChildren(nt.O).spineAnimator];const ft=z.addComponent(Z.I);ft.MoveSpeed=220;const bt=z.addComponent(ht);bt.MovementComponent=ft,bt.WalkTarget=new G.I9Y(F.GameObject.legacyTransform.x,F.GameObject.legacyTransform.y);const pt=z.addComponent(G.Fid);pt.Identifier="EnterBattleAnimationState",pt.Components=[bt];const vt=z.addComponent(Z.I);vt.MoveSpeed=450;const gt=z.addComponent(ht);gt.MovementComponent=vt,gt.WalkTarget=new G.I9Y(F.OffScreenStartPosition.x,F.OffScreenStartPosition.y);const mt=z.addComponent(G.Fid);mt.Identifier="DefeatAnimationState",mt.Components=[gt];const yt=z.addComponent(rt),_t=z.addComponent(G.Fid);_t.Identifier="BattleTeamMember",_t.Components=[yt];const Et=()=>{const B=z.findComponentInChildren(J.T),U=new Promise((k=>{at.onAppearanceLoaded.addOnce(k)}));at.setAppearance(k).catch(G.RQr.createHandler("Failed to set player appearance for battle player"));const F=B?B.updateMountAppearance().catch(G.RQr.createHandler("Failed to load battle player mount")):Promise.resolve();Promise.all([U,F]).then((()=>{ot.visible=!0,$(z)})).catch(G.RQr.createHandler("Failed in onAppearanceReady for player creation"))},wt=z.findComponentInChildren(nt.O).spineAnimator.spine;wt.isLoaded?Et():wt.OnLoaded.addOnce(Et)}else G.VyI.log("No available slots on screen to create player",G.$bb.Warning),$(null)}))))}))}}var ut=U(34829);class ft extends G.s3P{constructor(){super(...arguments),this.stars=0}getStars(){return this.stars}addStars(k){let B=k;this.currentPlayer.hasParentLinkedEmail()&&(B+=Math.ceil(B*ut.s.get("GameConstants.Battle.VALID_PARENT_EMAIL_STARS_PERCENTAGE"))),this.currentPlayer.isMember()&&(B+=Math.ceil(B*ut.s.get("GameConstants.Battle.MEMBER_STARS_PERCENTAGE"))),this.stars+=B}}(0,F.Cg)([(0,G.fFd)("CurrentPlayer"),(0,F.Sn)("design:type",Object)],ft.prototype,"currentPlayer",void 0);class bt extends G.PQK{constructor(k){super(),this.game=null,this.game=k}installBindings(){this.Container.bind("PlayerFactory").toConstantValue(new lt(this.game)),this.Container.bind("CombatBounty").toConstantValue(new ft(this.Container)),this.Container.bind("QuestionInterface").toConstantValue(new z.w(V.q.instance.prodigy.education))}}class pt extends G.JTX{constructor(){super(...arguments),this.teamID=0,this.activeMember=null,this.onActiveMemberChanged=new G.HN0,this.onDefeated=new G.HN0,this.teamMembers=[],this.onScreenSlots=[]}get ID(){return this.teamID}set ID(k){this.teamID=k}get ActiveMember(){return this.activeMember}set ActiveMember(k){this.activeMember=k,this.onActiveMemberChanged.dispatch()}get OnActiveMemberChanged(){return this.onActiveMemberChanged}get OnDefeated(){return this.onDefeated}get Members(){return this.teamMembers}get OnScreenSlots(){return this.onScreenSlots}set OnScreenSlots(k){this.onScreenSlots=k}getAvailableSlot(){for(let k=0;kB===k));this.teamMembers=this.teamMembers.filter((B=>B!==k)),B.forEach((k=>{k.DamageReceiver.OnDefeated.remove(this.teamMemberDefeated,this)}))}teamMemberDefeated(){let k=!0;for(let B=0;BB.ID===k));null!==this.teamID&&(B.OnScreenSlots=B.OnScreenSlots.filter((k=>k!==this))),this.teamID=k,B.OnScreenSlots.push(this)}}(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],vt.prototype,"battleTeams",void 0);var gt=U(34603),mt=U(95925),yt=U(85313);class _t extends G.JTX{constructor(){super(...arguments),this.font=null,this.currentText=""}setFontAttributes(k){null!==this.font&&(this.font.destroy(),this.font=null);const B=`atlas-${k.fontID}`;this.assetLoader.isLoaded(B,mt.i.Image)?this.font=new yt.B(V.q.instance.game,this.GameObject.legacyTransform.group,0,0,this.currentText,k):this.assetLoader.loadAssets([B]).then((()=>{this.setFontAttributes(k)}))}setText(k){this.currentText=k,null!==this.font&&this.font.setText(k)}destroy(){null!==this.font&&this.font.destroy(),super.destroy()}}(0,F.Cg)([(0,G.fFd)(G.t5G.AssetLoader),(0,F.Sn)("design:type",Object)],_t.prototype,"assetLoader",void 0);class Et extends G.JTX{constructor(){super(...arguments),this.tileSprite=null,this.width=0,this.height=0,this.source=null,this.frame=null}get Width(){return this.width}set Width(k){this.width=k}get Height(){return this.height}set Height(k){this.height=k}destroy(){null!==this.tileSprite&&this.tileSprite.destroy(),super.destroy()}setAsset(k,B){this.source=k,this.frame=B,this.assetLoader.isLoaded(this.source,mt.i.Image)?this.regenerateTiledTexture():this.assetLoader.loadAssets([this.source]).then((()=>{this.regenerateTiledTexture()}))}regenerateTiledTexture(){null!==this.tileSprite&&this.tileSprite.destroy(),this.tileSprite=V.q.instance.game.add.tileSprite(.5*-this.width,.5*-this.height,this.width,this.height,this.source,this.frame,this.GameObject.legacyTransform.group)}}(0,F.Cg)([(0,G.fFd)(G.t5G.AssetLoader),(0,F.Sn)("design:type",Object)],Et.prototype,"assetLoader",void 0);class wt{get OnComplete(){return this.onComplete}constructor(k=[]){this.animationClips=[],this.onComplete=new G.HN0;for(let B=0;B{this.hasFadedIn=!0})),k.onTweenComplete.addOnce((()=>{this.hasFadedOut=!0,this.onComplete.dispatch()})),B.chain(k)}hasFinishedPlaying(){return this.hasFadedIn&&this.hasFadedOut}destroy(){super.destroy()}}class St extends G.uAl{constructor(){super(...arguments),this.onComplete=new G.HN0,this.moveComplete=!1,this.fadeComplete=!1,this.moveAmount=0,this.fadeDelay=0,this.moveTime=0,this.fadeTime=0}get OnComplete(){return this.onComplete}get MoveAmount(){return this.moveAmount}set MoveAmount(k){this.moveAmount=k}get FadeDelay(){return this.fadeDelay}set FadeDelay(k){this.fadeDelay=k}get MoveTime(){return this.moveTime}set MoveTime(k){this.moveTime=k}get FadeTime(){return this.fadeTime}set FadeTime(k){this.fadeTime=k}play(){const k=this.GameObject.legacyTransform.y+this.moveAmount;V.q.instance.game.add.tween(this.GameObject.legacyTransform.group,this).to({y:k},this.moveTime,G.GS3.Quadratic.Out,!0).onTweenComplete.addOnce((()=>{this.moveComplete=!0,this.hasFinishedPlaying()&&this.onComplete.dispatch()})),V.q.instance.game.add.tween(this.GameObject.legacyTransform.group,this).to({alpha:0},this.fadeTime,G.GS3.Quadratic.Out,!0,this.fadeDelay).onTweenComplete.addOnce((()=>{this.fadeComplete=!0,this.hasFinishedPlaying()&&this.onComplete.dispatch()}))}hasFinishedPlaying(){return this.moveComplete&&this.fadeComplete}destroy(){this.onComplete.dispose(),super.destroy()}}var At=U(50118),Ct=U(88022);class Ot extends G.JTX{showStatusText(k,B){if("missed"===k.toLowerCase()){const k=new G._mx(this.GameObject);return k.name="MissedText",k.addComponent(G.K16).group.position.set(B.x,B.y),k.addComponent(G.bE_),this.createFloatingTextImage(Ct._.General_battle_json,"text-miss",k),k}if("too late"===k.toLowerCase()){const k=new G._mx(this.GameObject);return k.name="TooLateText",k.addComponent(G.K16).group.position.set(B.x,B.y),k.addComponent(G.bE_),this.createFloatingTextImage(Ct._.General_battle_json,"text-toolate",k),k}if("critical hit"===k.toLowerCase()){const k=new G._mx(this.GameObject);return k.name="CriticalHitText",k.addComponent(G.K16).group.position.set(B.x,B.y),k.addComponent(G.bE_),this.createFloatingTextImage(Ct._.General_battle_json,"text-critical-hit",k),k}}showDamageText(k,B){const U=new G._mx(this.GameObject);return U.name="DamageText",U.addComponent(G.K16).group.position.set(B.x,B.y),U.addComponent(G.bE_),this.createFloatingText(`-${k}`,12,1,44,U),U}showAttackInfo(k,B){const U=new G._mx(this.GameObject);U.name="AttackInfo",U.addComponent(G.K16).group.position.set(640,360),U.addComponent(G.bE_);const F=new G._mx(U);F.name="Background",F.addComponent(G.K16),F.legacyTransform.group.alpha=0;const j=F.addComponent(Et);j.Width=V.q.instance.game.width,j.Height=100,j.setAsset(Ct._.Tiled_sprites_json,"dialogue");const $=F.addComponent(Tt);$.FadeInAlpha=.5,$.FadeInTime=125,$.FadeOutTime=125,$.FadeOutDelay=1e3;const H=new G._mx(U);H.name="AttackLabel",H.addComponent(G.K16).group.position.set(V.q.instance.game.width/-2,-20),H.legacyTransform.group.alpha=0;const W=H.addComponent(_t);W.setFontAttributes({fontID:10,align:"center",width:V.q.instance.game.width,size:40}),W.setText(this.localizer.getText("COMBAT_ATTACK_USED",k,B));const q=H.addComponent(Tt);q.FadeInTime=125,q.FadeOutTime=125,q.FadeOutDelay=1e3;const K=U.addComponent(G.Fid);K.Identifier="Animations",K.Components=[$,q];const z=new wt([$,q]);return z.OnComplete.addOnce((()=>{U.destroy()}),this,-99),z.playAll(),U}showFloatingBanner(k){const B=V.q.instance.game.width,U=new G._mx(this.GameObject);U.name="FloatingTextBanner",U.addComponent(G.K16).group.position.set(640,380),U.addComponent(G.bE_);const F=new G._mx(U);F.name="Background",F.addComponent(G.K16),F.legacyTransform.group.alpha=0;const j=F.addComponent(Et);j.Width=B,j.Height=200,j.setAsset(Ct._.Tiled_sprites_json,"dialogue");const $=F.addComponent(Tt);$.FadeInAlpha=.5,$.FadeInTime=250,$.FadeOutTime=250,$.FadeOutDelay=2700;const H=new G._mx(U);H.name="BannerLabel",H.addComponent(G.K16).group.position.set(0,-40);const W=H.addComponent(_t);W.setFontAttributes({fontID:10,align:"center",width:B,size:80}),W.setText(k);const q=V.q.instance.game.add.tween(H.legacyTransform.group,this);q.to({x:-615},250,G.GS3.Linear.None,!1),q.to({x:-660},2700,G.GS3.Linear.None,!1),q.to({x:-B},250,G.GS3.Linear.None,!1);const K=this.GameObject.addComponent(At.a);K.Tween=q;const z=U.addComponent(G.Fid);z.Identifier="Animations",z.Components=[$,K];const Y=new wt([$,K]);return Y.OnComplete.addOnce((()=>{U.destroy()}),this,-99),Y.playAll(),U}createFloatingTextImage(k,B,U){const F=U.addComponent(gt._);F.setAsset(k,B),F.setAnchor(.5,.5),this.addFloatAnimations(U)}createFloatingText(k,B,U,F,G){const j=G.addComponent(_t);j.setFontAttributes({size:U,fontID:B,mono:F}),j.setText(k),G.legacyTransform.x-=.5*j.font.width,this.addFloatAnimations(G)}addFloatAnimations(k){const B=k.addComponent(St);B.FadeDelay=1300,B.FadeTime=200,B.MoveAmount=-100,B.MoveTime=1500,B.OnComplete.addOnce((()=>{k.destroy()}),this,-99),B.play();const U=k.addComponent(G.Fid);U.Identifier="Animations",U.Components=[B]}}(0,F.Cg)([(0,G.fFd)("Localization"),(0,F.Sn)("design:type",G.dTp)],Ot.prototype,"localizer",void 0);const It={startOverride:null,endSizeOverride:null,endOffsetOverride:{x:0,y:0},travelStraight:!0};var Dt=U(52239),Rt=U(74452),Pt=U(47315),Mt=U(93709);class Nt{constructor(k){this.game=k}animateCharacters(k,B,U,F){for(let G=0;G0){this.game.time.events.addTimer(F,this.animateCharacters.bind(this,k,B,U,0),this);break}this[k].apply(this,[U[G],B])}}damage(k,B){const U=this.game.add.tween(k,this),F=this.game.add.tween(k,this);U.to({x:k.x+5},B,Nt._customWiggle,!0,0),F.to({y:k.y+5},B,Nt._customWiggle,!0,0);const G=k.x,j=k.y;U.onTweenComplete.addOnce((()=>{k.x=G})),F.onTweenComplete.addOnce((()=>{k.y=j}))}vibrate(k,B){const U=k.x,F=k.x-5,j=k.x+5,$=100,H=Math.round((B-200)/$*.5),V=this.game.add.tween(k,this),W=this.game;V.to({x:F},$,G.GS3.Linear.None,!0).onTweenComplete.add((()=>{const B=W.add.tween(k,this);B.to({x:j},$,G.GS3.Linear.None,!1,0,H,!0),B.onTweenComplete.add((()=>{W.add.tween(k,this).to({x:U},$,G.GS3.Linear.None,!0)}))}))}}Nt._customWiggle={value:k=>{const B=k*Math.PI*6;return Math.sin(B+Math.PI*Math.random())*(1-k)}};var xt=U(29949);class Lt{get OnCharacterImpactAnimationComplete(){return this.onCharacterImpactAnimationComplete}constructor(k,B){this.numSpineInstances=0,this.onImpact=new G.HN0,this.onSpellComplete=new G.HN0,this.onLoaded=new G.HN0,this.hasLoaded=!1,this.spellCharacterAnimation=null,this._create2AnimationName="create2",this.overrideStartPosition=null,this.overrideEndSize=null,this.overrideEndOffset=null,this.travelStraight=!1,this.targetTeamSource=null,this.onCharacterImpactAnimationComplete=new G.HN0,this.game=k,this.target=B.target,this.targetTeam=B.targetTeam,this.targetFrom=B.targetFrom,this.targetTeamSource=B.targetTeamSource;const U=K.t.getItem("spell",B.spellID);this.spellDataParser=new xt.I(B.spellID),this.animationData=U.metadata.animationData,this.targetType=U.data.targetType,this.spellAssetKey=U.metadata.assets[0],this.parent=B.parent,this.spellCharacterAnimation=new Nt(k),this.overrideStartPosition=B.startOverride,this.overrideEndSize=B.endSizeOverride,this.overrideEndOffset=B.endOffsetOverride,this.travelStraight=B.travelStraight,V.q.instance.prodigy.load.assets([this.spellAssetKey],(()=>{this.onLoaded.dispatch()})),this.onLoaded.addOnce(this.instantiate,this),this.onLoaded.addOnce((()=>{this.hasLoaded=!0}),this)}getName(){return this.spellDataParser.getName()}play(){this.hasLoaded?this.create():this.onLoaded.addOnce(this.create,this)}setAnimation(k,B,U){this.animationExists(k)?(this.spineMain.setAnimationByName(0,k,B),U&&this.spineMain.onComplete.addOnce(U)):U&&U()}tweenToTarget(k){const B=this.getEndPosition(),U=this.game.add.tween(this.spineMain,this);U.to(B,this.spellDataParser.getInt("travelDuration"),this.spellDataParser.getEasing("travelEasing")),U.start(),k&&U.onTweenComplete.add(k)}animationExists(k){var B;return G.Aq$.isDefined(null===(B=this.spineMain.skeleton)||void 0===B?void 0:B.data.findAnimation(k))}getAnimationLength(k){var B,U;if(!(null===(B=this.spineMain.skeleton)||void 0===B?void 0:B.data))return G.VyI.log(`Cannot find skeleton data for ${k}`,G.$bb.Warning),0;const F=this.spineMain.skeleton.data.findAnimation(k);return null!==(U=null==F?void 0:F.duration)&&void 0!==U?U:0}getFacingAngle(){const k=this.getEndPosition(),B=this.getStartPosition();return Math.atan2(k.y-B.y,k.x-B.x)*(180/Math.PI)}destroy(){this.dimScreen(!1),this.onSpellComplete.dispatch(),this.onSpellComplete.dispose(),this.onLoaded.dispose()}spellCreate2Animation(){if(this.animationExists(this._create2AnimationName)){const k=this.getStartPosition(),B=this.makeClone(this._create2AnimationName,k.x,k.y);!0===this.spellDataParser.getValue("createRotates")&&(B.angle=this.getFacingAngle(),this.isTravellingRight()||(B.angle-=180))}}spellImpact2Animation(){if(this.animationExists("impact2")){this.numSpineInstances++;const k=()=>{this.numSpineInstances--;const k=this.getEndPosition();this.makeClone("impact2",k.x,k.y)},B=this.spellDataParser.getInt("impact2Delay");B>0?setTimeout(k,B):k()}}spellCharacterCreateAnimation(){const k=this.spellDataParser.getValue("charFromAnimation");G.Aq$.isDefined(k)&&k!==Lt._noneAnimation&&this.spellCharacterAnimation.animateCharacters(k,this.getAnimationLength(Lt._CREATEANIMATIONNAME),[this.targetFrom],0)}spellCharacterImpactAnimation(){const k=this.spellDataParser.getValue("charToAnimation"),B=this.spellDataParser.getValue("charToAnimationDelay"),U=this.spellDataParser.getValue("charToAnimationLength");k!==Lt._noneAnimation&&G.Aq$.isDefined(k)&&G.Aq$.isDefined(B)&&G.Aq$.isDefined(U)?(this.game.time.events.addTimer(B+U,(()=>{this.onCharacterImpactAnimationComplete.dispatch()}),this),this.spellCharacterAnimation.animateCharacters(k,U,this.targetType===Pt.X.Single?[this.target]:this.targetTeam,B)):this.onCharacterImpactAnimationComplete.dispatch()}makeClone(k,B,U,F=!1){const G=this.game.add.spine(B,U,this.spellAssetKey);return G.setAnimationByName(0,k,F),G.scale.x=this.isTravellingRight()?1:-1,this.numSpineInstances++,G.onDestroy.add(this.onSpineInstanceDestroy.bind(this,G)),F||G.onComplete.add((()=>{G.pendingDestroy=!0})),G}onSpineInstanceDestroy(k){k.renderable=!1,k.parent&&k.parent.removeChild(k),this.numSpineInstances--,this.numSpineInstances<=0&&this.destroy()}getStartPosition(){const k=this.isTravellingRight()?1:-1,B={x:this.targetFrom.x,y:this.targetFrom.y};if(null!==this.overrideStartPosition)B.x+=this.overrideStartPosition.x,B.y+=this.overrideStartPosition.y;else{const U=this.targetFrom;B.x+=Math.round(.5*U.getHitboxWidth()*k),B.y-=Math.round(.5*U.getHitboxHeight()),U instanceof Mt.H&&(B.x=820,B.y=450)}const U=this.animationData.createLocation;return U&&(B.x+=j.defaultTo(U.createOffsetX,0)*k,B.y+=j.defaultTo(U.createOffsetY,0)),B}getEndPosition(){const k=this.animationData.impactLocation;if(null!==this.overrideEndSize){const B={x:this.target.x+this.overrideEndOffset.x,y:this.target.y+this.overrideEndOffset.y};let U=k.impactx*this.overrideEndSize.x,F=k.impacty*this.overrideEndSize.y;return F-=Math.round(.5*this.overrideEndSize.y),this.target.x<=640&&(U*=-1),B.x+=U,B.y+=F,this.travelStraight&&this.animationData.travelStraight&&(B.y=this.getStartPosition().y),B}{let B=.5,U=.5,F=0,G=0;k&&(B=j.defaultTo(k.impactx,B),U=j.defaultTo(k.impacty,U),F=j.defaultTo(k.offsetx,F),G=j.defaultTo(k.offsety,G));const $=this.target,H=this.calculateHitboxPoint($.x,$.getHitboxLeft(),$.getHitboxWidth(),B,F,!this.isTravellingRight());let V;return V=this.travelStraight&&this.animationData.travelStraight?this.getStartPosition().y:this.calculateHitboxPoint($.y,$.getHitboxTop(),$.getHitboxHeight(),U,G,!1),{x:H,y:V}}}calculateHitboxPoint(k,B,U,F,G=0,j=!1){let $=F,H=G;return j&&($=1-$,H=-H),k+B+U*$+H}dimScreen(k){if(k){this.dimOverlay=this.game.add.graphics(0,0),this.game.state.getCurrentState().groupDim.addChild(this.dimOverlay),this.dimOverlay.beginFill(0,1),this.dimOverlay.drawRect(0,0,this.game.width,this.game.height),this.dimOverlay.endFill(),this.dimOverlay.alpha=0;this.game.add.tween(this.dimOverlay,this).to({alpha:.4},300,G.GS3.Linear.None,!0)}else if(this.dimOverlay){this.game.add.tween(this.dimOverlay,this).to({alpha:0},300,G.GS3.Linear.None,!0)}}isTravellingRight(){return this.targetFrom.x<=640}instantiate(){this.spineMain=V.q.instance.prodigy.create.spine(0,0,this.spellAssetKey,this.parent),this.addToProperLayer(this.spineMain),this.spineMain.visible=!1,this.spineMain.onDestroy.add(this.onSpineInstanceDestroy.bind(this,this.spineMain)),this.numSpineInstances++}addToProperLayer(k){const B=this.game.state.getCurrentState();switch(this.targetTeamSource?this.targetTeamSource.getTeamPositionForContainer(this.target):this.targetTeam.indexOf(this.target)){case Rt.I.Front:B.groupFront.addChild(k);break;case Rt.I.Back:B.groupMiddle.addChildAt(k,0);break;case Rt.I.Middle:default:B.groupMiddle.addChild(k)}}create(){!0===this.spellDataParser.getValue("screenDim")&&this.dimScreen(!0);const k=this.getStartPosition();this.spineMain.position.set(k.x,k.y),this.spineMain.visible=!0,this.spellCharacterCreateAnimation()}impact(){this.spellCharacterImpactAnimation();const k=this.spellDataParser.getValue("charToAnimationDelay");G.Aq$.isDefined(k)&&k>0?this.game.time.events.addTimer(k,this.onImpact.dispatch,this.onImpact):this.onImpact.dispatch()}}Lt._CREATEANIMATIONNAME="create",Lt._noneAnimation="none";class kt extends Lt{getCreateDuration(){const k=G.E3R.getAnimationEventTime(this.spineMain,Lt._CREATEANIMATIONNAME,"cast");return k<0?this.getAnimationLength(Lt._CREATEANIMATIONNAME):k}create(){super.create(),this.spellCreate2Animation(),this.animationExists(Lt._CREATEANIMATIONNAME)?(this.isTravellingRight()||(this.spineMain.scale.x*=-1),this.spellDataParser.getValue("createRotates")&&(this.spineMain.angle=this.getFacingAngle(),this.isTravellingRight()||(this.spineMain.angle-=180)),this.setAnimation(Lt._CREATEANIMATIONNAME,!1,(()=>{setTimeout(this.travel.bind(this))}))):this.travel()}travel(){this.animationExists("travel")&&this.getAnimationLength("travel")>0?(this.spellDataParser.getValue("travelRotates")&&(this.spineMain.angle=this.getFacingAngle(),this.isTravellingRight()||(this.spineMain.angle-=180)),this.isTravellingRight()||(this.spineMain.scale.x=-1),this.setAnimation("travel",!0),this.tweenToTarget(this.impact.bind(this))):(this.spineMain.x=this.getEndPosition().x,this.spineMain.y=this.getEndPosition().y,this.impact())}impact(){super.impact(),this.animationExists("impact")?(this.spellDataParser.getValue("impactRotates")&&(this.spineMain.angle=this.getFacingAngle(),this.isTravellingRight()||(this.spineMain.angle-=180)),this.doLayeredAnimation("impact"),this.setAnimation("impact",!1,(()=>{this.spineMain.pendingDestroy=!0})),this.spellImpact2Animation()):(this.doLayeredAnimation("impact"),this.spellImpact2Animation(),this.spineMain.pendingDestroy=!0)}doLayeredAnimation(k){const B=this.game.state.getCurrentState();let U,F=this.targetTeam.indexOf(this.target);if(this.targetTeamSource){const k=this.targetTeamSource.team.find((k=>G.cj9.fuzzyEqual(k.x,this.target.x)&&G.cj9.fuzzyEqual(k.y,this.target.y)));k&&(F=this.targetTeamSource.getTeamPositionForContainer(k))}switch(F){case Rt.I.Middle:U=[B.groupFront,B.groupMiddle,B.groupBack];break;case Rt.I.Back:U=[B.groupMiddle,B.groupBack,B.groupFarBack];break;case Rt.I.Front:U=[B.groupFarFront,B.groupFront,B.groupMiddle]}const j=this.getEndPosition();for(let G=0;G{F.pendingDestroy=!0}))}else G.VyI.log(`Unsupported cast animation type: ${B.type}`,G.$bb.Warning)}}class Ft extends Lt{constructor(){super(...arguments),this.mask=null,this.beamGroup=null,this.startLocation=null,this.endLocation=null,this.distanceBetweenPoints=0,this.spineCap=null,this.spineSummon=null,this.animationWidth=1}getCreateDuration(){const k=G.E3R.getAnimationEventTime(this.spineMain,"Summon-create","cast");return k<0?this.getAnimationLength("Summon-create"):k}create(){super.create(),this.startLocation=this.getStartPosition(),this.endLocation=this.getEndPosition(),this.makeGroup(),this.setAnimation("beam-travel",!0),this.makeMask(),this.stretchBetweenPoints(),this.summonCreate(),this.capCreate(),this.doTween(),this.beamGroup.updateTransform(),this.beamGroup.angle=this.getFacingAngle()}stretchBetweenPoints(){this.distanceBetweenPoints=G.cj9.distance(this.startLocation.x,this.startLocation.y,this.endLocation.x,this.endLocation.y),this.beamGroup.scale.x=this.distanceBetweenPoints/this.animationWidth}makeGroup(){this.beamGroup=V.q.instance.prodigy.create.group(),this.beamGroup.pivot.y=.5,this.beamGroup.x=this.startLocation.x,this.beamGroup.y=this.startLocation.y,this.addToProperLayer(this.beamGroup)}makeMask(){this.beamGroup.addChild(this.spineMain),this.animationWidth=this.beamGroup.width;const k=this.animationWidth;this.mask=this.game.add.graphics(0,0),this.mask.beginFill(16777215),this.mask.drawRect(0,-100,k,200),this.mask.endFill(),this.mask.scale.x=.001,this.beamGroup.addChild(this.mask),this.spineMain.x=0,this.spineMain.y=0,this.spineMain.mask=this.mask}capCreate(){this.spineCap=this.makeClone("cap-impact",0,0,!0),this.spineCap.scale.x=this.spineCap.scale.y=.5,this.beamGroup.addChild(this.spineCap)}capImpact(){this.spineCap.scale.x=this.spineCap.scale.y=1,this.impact(),this.game.time.events.addTimer(this.spellDataParser.getInt("sustainDuration"),this.doEnd,this)}capEnd(){this.spineCap.setAnimationByName(0,"cap-end",!1),this.spineCap.setToSetupPose()}beamEnd(){this.setAnimation("beam-end",!0)}summonCreate(){this.spellCharacterCreateAnimation(),this.spineSummon=this.makeClone("summon-create",0,0),this.beamGroup.addChild(this.spineSummon),this.spineSummon.onComplete.add(this.summonTravel,this)}summonTravel(){this.spineSummon.pendingDestroy=!0,this.spineSummon=this.makeClone("summon-travel",0,0,!0),this.beamGroup.addChild(this.spineSummon)}summonEnd(){this.spineSummon.pendingDestroy=!0,this.spineSummon=this.makeClone("summon-end",0,0),this.beamGroup.addChild(this.spineSummon)}doTween(){const k=this.spellDataParser.getInt("travelDuration"),B=this.spellDataParser.getEasing("travelEasing"),U=this.spellDataParser.getInt("createBeamDelay");this.game.add.tween(this.mask.scale,this).to({x:1},k,B,!0,U,0),this.game.add.tween(this.spineCap,this).to({x:this.animationWidth},k,B,!0,U,0).onTweenComplete.add(this.capImpact.bind(this))}doEnd(){this.summonEnd(),this.capEnd(),this.beamEnd();const k=this.spellDataParser.getInt("endDuration"),B=this.spellDataParser.getEasing("endEasing");let U=this.spellDataParser.getValue("endingMask");G.Aq$.isDefined(U)||(U=!0),U?this.game.add.tween(this.spineMain,this).to({x:this.animationWidth+10},k,B,!0).onTweenComplete.add(this.doneEverything.bind(this)):this.game.time.events.addTimer(k,this.doneEverything,this)}doneEverything(){this.spineSummon.pendingDestroy=!0,this.spineCap.pendingDestroy=!0,this.spineMain.pendingDestroy=!0}travel(){}destroy(){super.destroy(),this.mask.destroy(),this.beamGroup.destroy(),this.spineSummon.destroy(),this.spineCap.destroy()}}class Gt{static makeSpell(k,B){const U=K.t.getItem("spell",B.spellID).metadata.animationData.animationType;return j.defaults(B,It),U===Dt.i.projectile?new kt(k,B):U===Dt.i.aoe?new Bt(k,B):U===Dt.i.beam?new Ft(k,B):U===Dt.i.aoa?new Ut(k,B):(G.VyI.log(`No spell of type ${U} supported!`,G.$bb.Verbose),null)}}class jt{get OnStart(){return this.onStart}get OnImpact(){return this.onImpact}get OnEnd(){return this.onEnd}get OnComplete(){return this.onComplete}get Name(){return this.name}constructor(k,B,U,F,j){this.onStart=new G.HN0,this.onImpact=new G.HN0,this.onEnd=new G.HN0,this.onComplete=new G.HN0,this.name="",this.game=null,this.parent=null,this.spellID=null,this.from=null,this.to=null,this.game=k,this.parent=B,this.spellID=U,this.from=F,this.to=j}cast(){if(K.t.getItem("spell",this.spellID).metadata.animationData.animationType===Dt.i.beam){const k={x:this.to.x,y:this.to.y},B=Gt.makeSpell(this.game,{parent:this.parent.legacyTransform.group,spellID:this.spellID,targetFrom:{x:this.from.x,y:this.from.y},target:k,targetTeam:[k],targetTeamSource:null,castingTeam:[],startOverride:{x:0,y:0},endSizeOverride:{x:0,y:0},endOffsetOverride:{x:0,y:0}});this.name=B.getName(),B.play(),B.onLoaded.addOnce((()=>{this.onStart.dispatch()})),B.onImpact.addOnce((()=>{this.onImpact.dispatch()})),B.onSpellComplete.addOnce((()=>{this.destroy()}))}else this.destroy()}destroy(){this.onComplete.dispatch(),this.onEnd.dispatch(),this.onStart.dispose(),this.onImpact.dispose(),this.onEnd.dispose(),this.onComplete.dispose()}}class $t{get OnStart(){return this.onStart}get OnImpact(){return this.onImpact}get OnEnd(){return this.onEnd}get OnComplete(){return this.onComplete}get Name(){return this.name}constructor(k,B,U,F,j){this.onStart=new G.HN0,this.onImpact=new G.HN0,this.onEnd=new G.HN0,this.onComplete=new G.HN0,this.name="",this.game=null,this.parent=null,this.spellID=null,this.originMember=null,this.targetMembers=null,this.spellCompleted=!1,this.impactAnimationCompleted=!1,this.game=k,this.parent=B,this.spellID=U,this.originMember=F,this.targetMembers=j,this.name=K.t.getItem("spell",this.spellID).data.name}cast(){const k=Gt.makeSpell(this.game,{parent:this.parent.legacyTransform.group,spellID:this.spellID,targetFrom:this.originMember.GameObject.legacyTransform.group,target:this.targetMembers[0].GameObject.legacyTransform.group,targetTeamSource:null,targetTeam:this.targetMembers.map((k=>k.GameObject.legacyTransform.group)),castingTeam:[],startOverride:this.originMember.CastPoint,endSizeOverride:this.targetMembers[0].ImpactSize,endOffsetOverride:this.targetMembers[0].ImpactOffset});k.play(),k.onLoaded.addOnce((()=>{this.onStart.dispatch()})),k.onImpact.addOnce((()=>{this.onImpact.dispatch()})),k.onSpellComplete.addOnce((()=>{this.spellCompleted=!0,this.onComplete.dispatch(),this.checkSpellEnd()})),k.OnCharacterImpactAnimationComplete.addOnce((()=>{this.impactAnimationCompleted=!0,this.checkSpellEnd()}))}checkSpellEnd(){this.spellCompleted&&this.impactAnimationCompleted&&this.onEnd.dispatch()}}class Ht extends G.uAl{constructor(){super(...arguments),this.game=null,this.battleContent=null}get Game(){return this.game}set Game(k){this.game=k}get BattleContent(){return this.battleContent}set BattleContent(k){this.battleContent=k}createSpell(k,B,U){return new $t(this.game,this.battleContent,k,B,U)}createBeam(k,B,U){return new jt(this.game,this.battleContent,k,B,U)}}class Vt extends G.JTX{constructor(){super(...arguments),this.activePlayerName=null,this.isAnimating=!1,this.battleHealth=null,this.battleTeam=null}get TeamID(){return null!==this.battleTeam?this.battleTeam.ID:null}set TeamID(k){this.battleTeam=j.find(this.battleTeams,(B=>B.ID===k)),this.battleTeam&&(this.battleTeam.OnActiveMemberChanged.add(this.activeMemberChanged,this),this.battleTeam.ActiveMember&&this.activeMemberChanged())}get NameLabel(){return this.activePlayerName}set NameLabel(k){this.activePlayerName=k,this.updateNameLabel()}get IsAnimating(){return this.isAnimating}set IsAnimating(k){this.isAnimating=k}get SlideInAnimation(){return this.slideInAnimation}get SlideOutAnimation(){return this.slideOutAnimation}create(){super.create(),this.nameProvider.OnChanged.add(this.updateNameLabel,this)}destroy(){this.battleTeam&&this.battleTeam.OnActiveMemberChanged.remove(this.activeMemberChanged,this),this.battleHealth&&this.battleHealth.OnHealthChanged.remove(this.healthChanged,this),this.nameProvider.OnChanged.remove(this.updateNameLabel,this),super.destroy()}updateNameLabel(){this.activePlayerName.setText(this.nameProvider.getName())}healthChanged(){this.isAnimating=!0,this.healthBar.OnHealthChangeComplete.addOnce((()=>{this.isAnimating=!1})),this.healthBar.setCurrentHealth(this.battleHealth.CurrentValue)}activeMemberChanged(){null!==this.slideInAnimation&&null!==this.slideOutAnimation?(this.slideOutAnimation.OnComplete.addOnce((()=>{this.updateActiveMember(),this.slideInAnimation.play()})),this.slideOutAnimation.play()):this.updateActiveMember()}updateActiveMember(){null!==this.battleHealth&&this.battleHealth.OnHealthChanged.remove(this.healthChanged,this),this.battleHealth=this.battleTeam.ActiveMember.Health,this.battleHealth.OnHealthChanged.add(this.healthChanged,this),this.healthBar.setMaxHealth(this.battleHealth.InitialValue),this.healthBar.setCurrentHealth(this.battleHealth.CurrentValue)}}(0,F.Cg)([(0,G.fFd)("SlideInHealthBar"),(0,F.Sn)("design:type",Object)],Vt.prototype,"slideInAnimation",void 0),(0,F.Cg)([(0,G.fFd)("SlideOutHealthBar"),(0,F.Sn)("design:type",Object)],Vt.prototype,"slideOutAnimation",void 0),(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],Vt.prototype,"battleTeams",void 0),(0,F.Cg)([(0,G.fFd)("HealthBar"),(0,F.Sn)("design:type",Object)],Vt.prototype,"healthBar",void 0),(0,F.Cg)([(0,G.fFd)("Name"),(0,F.Sn)("design:type",Object)],Vt.prototype,"nameProvider",void 0);var Wt=U(87490),qt=U(32389),Kt=U(76277);class zt extends G.uAl{constructor(){super(...arguments),this.onChanged=new G.HN0,this._firstNameID=0,this._middleNameID=0,this._lastNameID=0,this._nicknameID=0}get OnChanged(){return this.onChanged}get firstNameID(){return this._firstNameID}set firstNameID(k){this._firstNameID=k}get middleNameID(){return this._middleNameID}set middleNameID(k){this._middleNameID=k}get lastNameID(){return this._lastNameID}set lastNameID(k){this._lastNameID=k}get nicknameID(){return this._nicknameID}set nicknameID(k){this._nicknameID=k}getName(){return G.Aq$.isDefined(this._nicknameID)&&0!==this._nicknameID?K.t.getItem("nickname",this._nicknameID).data.value.replace("{first}",K.t.getItem("name",this._firstNameID).data.value).replace("{middle}",K.t.getItem("name",this._middleNameID).data.value).replace("{last}",K.t.getItem("name",this._lastNameID).data.value):this.getFullName()}getFullName(){var k;const B=null===(k=K.t.getItem("name",this._firstNameID))||void 0===k?void 0:k.data.value;if(G.Aq$.isDefined(B)){if(G.Aq$.isDefined(this._middleNameID)&&G.Aq$.isDefined(this._lastNameID)){const k=`${K.t.getItem("name",this._middleNameID).data.value}${K.t.getItem("name",this._lastNameID).data.value}`;return`${B} ${j.capitalize(k)}`}return B}return V.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("FALLBACK_NAME_WIZARD")}destroy(){this.onChanged.dispose(),super.destroy()}}var Yt=U(79687);let Qt=class{constructor(){this.onQueueComplete=new G.HN0,this.actions=[],this.isActionQueuePlaying=!1}get OnQueueComplete(){return this.onQueueComplete}get Actions(){return this.actions}get IsActionQueuePlaying(){return this.isActionQueuePlaying}playAllActions(){this.isActionQueuePlaying||(this.isActionQueuePlaying=!0,this.runNextAction())}addAction(k){this.actions.push(k)}hasQueuedActions(){return this.actions.length>0}runNextAction(){const k=this.actions[0];k.OnComplete.addOnce((()=>{this.actions.shift(),this.actions.length>0?this.runNextAction():(this.isActionQueuePlaying=!1,this.onQueueComplete.dispatch())})),k.run()}};Qt=(0,F.Cg)([(0,Yt.injectable)()],Qt);class Xt{constructor(){this.onComplete=new G.HN0}get OnComplete(){return this.onComplete}}var Zt=U(8693);class Jt extends Xt{constructor(k,B,U,F){super(),this.player=null,this.crystal=null,this.battleUIFactory=null,this.audioPlayer=null,this.player=k,this.crystal=B,this.battleUIFactory=U,this.audioPlayer=F}run(){this.audioPlayer.playSoundEffectClip(8,Zt.J.Cast);const k=this.player.AttackAnimationState;null!==k&&(k.OnComplete.addOnce((()=>{const k=this.player.IdleAnimationState;null!==k&&k.play(),this.audioPlayer.playSoundEffectClip(8,Zt.J.Miss);let B=this.battleUIFactory.showStatusText("too late",{x:this.crystal.GameObject.legacyTransform.x,y:this.crystal.GameObject.legacyTransform.y-80}).findComponent(G.bE_).getInjectedValue("Animations");Array.isArray(B)||(B=[B]);new wt(B).OnComplete.addOnce(this.onComplete.dispatch,this.onComplete)})),k.play())}}class te extends Xt{get DamageAmount(){return this.damage}constructor(k,B,U,F,G,j,$,H){super(),this.spellFactory=null,this.spellSource=null,this.spellTarget=null,this.spellID=null,this.crystal=null,this.battleUIFactory=null,this.audioPlayer=null,this.damage=null,this.spellFactory=U,this.spellSource=k,this.spellTarget=B,this.spellID=G,this.crystal=j,this.battleUIFactory=$,this.audioPlayer=H,this.damage=F}run(){const k=this.spellFactory.createSpell(this.spellID,this.crystal,[this.spellTarget]);null!==this.spellSource.AttackAnimationState&&(this.spellSource.AttackAnimationState.OnComplete.addOnce((()=>{this.spellSource.IdleAnimationState.play()})),this.audioPlayer.playSoundEffectClip(8,Zt.J.Cast),this.spellSource.AttackAnimationState.play()),null!==this.spellTarget.TakeDamageAnimationState&&k.OnImpact.addOnce((()=>{this.audioPlayer.playSoundEffectClip(8,Zt.J.Hit),this.spellTarget.TakeDamageAnimationState.play(),this.spellTarget.DamageReceiver.applyDamage(this.damage),this.damage=0})),k.OnStart.addOnce((()=>{this.battleUIFactory.showAttackInfo(this.spellSource.NameProvider.getName(),k.Name)})),k.OnComplete.addOnce((()=>{this.onComplete.dispatch()})),setTimeout((()=>{const B=this.spellFactory.createBeam(89,{x:this.spellSource.GameObject.transform.localPosition.x+this.spellSource.CastPoint.x,y:this.spellSource.GameObject.transform.localPosition.y+this.spellSource.CastPoint.y},{x:this.crystal.GameObject.legacyTransform.x-20,y:this.crystal.GameObject.legacyTransform.y-40});B.OnImpact.addOnce((()=>{k.cast(),null!==this.crystal.AttackAnimationState&&(this.crystal.AttackAnimationState.OnComplete.addOnce(this.crystal.IdleAnimationState.play,this.crystal.IdleAnimationState),this.crystal.AttackAnimationState.play())})),B.cast()}),te.BEAM_DELAY_MS)}}te.BEAM_DELAY_MS=800;var ee=U(63693);class ie extends Xt{get Target(){return this.targetTeamMember}get DamageAmount(){return this.damage}constructor(k,B,U,F,G,j,$){super(),this.sourceTeamMember=null,this.targetTeamMember=null,this.spellFactory=null,this.spellID=null,this.battleUIFactory=null,this.audioPlayer=null,this.damage=null,this.targetTeamMember=B,this.sourceTeamMember=k,this.spellFactory=U,this.spellID=G,this.battleUIFactory=j,this.audioPlayer=$,this.damage=F}run(){const k=this.spellFactory.createSpell(this.spellID,this.sourceTeamMember,[this.targetTeamMember]),B=this.sourceTeamMember.AttackAnimationState;null!==B&&k.OnStart.addOnce((()=>{B.play(),this.audioPlayer.playSoundEffectClip(8,Zt.J.Cast),B.OnComplete.addOnce(this.returnToIdle,this,0,this.sourceTeamMember)})),k.OnImpact.addOnce((()=>{this.applyDamage(),this.audioPlayer.playSoundEffectClip(8,Zt.J.Hit)})),k.OnEnd.addOnce((()=>{this.onComplete.dispatch()})),k.cast(),this.battleUIFactory.showAttackInfo(this.sourceTeamMember.NameProvider.getName(),k.Name),this.trackSpellEvent(k)}trackSpellEvent(k){const B=K.t.getItem("spell",this.spellID);V.q.instance.prodigy.gameContainer.get("c47-20b6").battle.sendBattleSpellCastEvent({team:ee.B1.Player,spell_name:k.Name,spell_type:B.data.type,spell_level:B.data.level,spell_damage:this.damage,caster_name:this.sourceTeamMember.NameProvider.getName(),caster_level:this.sourceTeamMember.Level,target_name:this.targetTeamMember.NameProvider.getName(),target_type:this.targetTeamMember.Element,target_level:this.targetTeamMember.Level,target_health:this.targetTeamMember.Health.CurrentValue,energy_cost:B.data.energyCost,duration:void 0,success:!0})}applyDamage(){this.targetTeamMember.DamageReceiver.applyDamage(this.damage),this.damage=0;const k=this.targetTeamMember.TakeDamageAnimationState;null!==k?(k.OnComplete.addOnce((()=>{this.returnToIdle(this.targetTeamMember)})),k.play()):this.onComplete.dispatch()}returnToIdle(k){const B=k.IdleAnimationState;null!==B&&B.play()}}var se=U(89360);class ne extends Xt{constructor(k,B,U,F,G){super(),this.battleTeams=null,this.spellFactory=null,this.timer=null,this.endDelay=0,this.audioPlayer=null,this.battleTeams=k,this.spellFactory=B,this.timer=U,this.endDelay=F,this.audioPlayer=G}run(){const k=j.find(this.battleTeams,(k=>0===k.ID)),B=j.find(this.battleTeams,(k=>1===k.ID)),U=this.spellFactory.createSpell(73,B.ActiveMember,[k.ActiveMember]);U.OnImpact.addOnce((()=>{k.ActiveMember.DamageReceiver.applyDamage(k.ActiveMember.Health.CurrentValue),k.ActiveMember.DefeatAnimationState.OnComplete.addOnce(this.timer.addTimer,this.timer,0,this.endDelay,this.onComplete.dispatch,this.onComplete),k.ActiveMember.DefeatAnimationState.play(),this.audioPlayer.playSoundEffectClip(8,Zt.J.Hit)}));const F=B.ActiveMember.AttackAnimationState,$=B.ActiveMember.IdleAnimationState;F.OnComplete.addOnce((()=>{$.play()})),F.play(),U.cast(),this.audioPlayer.playSoundEffectClip(8,Zt.J.Cast),V.q.instance.prodigy.gameContainer.get("0f1-c356").onWeeklyChallengeBattleEnd("TitanBattle").then((()=>{se.h.instance.updateData()})).catch((k=>{G.VyI.log(`BattleStats update failed at titan co-op battle end: ${G.RQr.stringify(k)}`,G.$bb.Warning)}))}}class ae{get OnComplete(){return this.onComplete}constructor(k){this.onComplete=new G.HN0,this.spell=null,this.hasCompleted=!1,this.spell=k,this.spell.OnComplete.addOnce((()=>{this.hasCompleted=!0,this.onComplete.dispatch()}))}play(){this.spell.cast()}hasFinishedPlaying(){return this.hasCompleted}}class re extends Xt{constructor(k,B,U,F,G){super(),this.battleTeams=null,this.spellFactory=null,this.timer=null,this.audioPlayer=null,this.battleUIFactory=null,this.battleTeams=k,this.spellFactory=B,this.timer=U,this.audioPlayer=F,this.battleUIFactory=G}run(){const k=j.find(this.battleTeams,(k=>0===k.ID)),B=k.ActiveMember,U=k.Members,F=new wt;for(let G=0;G{F.playAll()}),te.BEAM_DELAY_MS),V.q.instance.prodigy.gameContainer.get("0f1-c356").onWeeklyChallengeBattleEnd("TitanBattle").then((()=>{se.h.instance.updateData()})).catch((k=>{G.VyI.log(`BattleStats update failed at titan co-op battle end: ${G.RQr.stringify(k)}`,G.$bb.Warning)}))}onPartialBeamsComplete(){const k=j.find(this.battleTeams,(k=>0===k.ID)),B=j.find(this.battleTeams,(k=>1===k.ID)),U=k.ActiveMember,F=this.spellFactory.createSpell(90,U,[B.ActiveMember]);F.OnImpact.addOnce((()=>{B.ActiveMember.DamageReceiver.applyDamage(B.ActiveMember.Health.CurrentValue),this.audioPlayer.playSoundEffectClip(8,Zt.J.CriticalHit),this.showDamage()})),F.OnComplete.addOnce((()=>{const k=B.ActiveMember.DefeatAnimationState;null!==k&&k.play()}));const G=k.ActiveMember.getInjectedValue("Animators");G.OnAnimationComplete.addOnce((()=>{U.IdleAnimationState.play()})),G.playAnimation("teamattack",!1),this.timer.addTimer(1e3,F.cast,F)}returnToIdle(k){null!==k.IdleAnimationState&&k.IdleAnimationState.play()}showDamage(){const k=j.find(this.battleTeams,(k=>1===k.ID)).ActiveMember;let B=this.battleUIFactory.showDamageText(9999,{x:k.GameObject.legacyTransform.x+k.ImpactOffset.x,y:k.GameObject.legacyTransform.y-70}).findComponent(G.bE_).getInjectedValue("Animations");Array.isArray(B)||(B=[B]);new wt(B).OnComplete.addOnce(this.showCriticalHit,this)}showCriticalHit(){const k=j.find(this.battleTeams,(k=>1===k.ID)).ActiveMember;let B=this.battleUIFactory.showStatusText("critical hit",{x:k.GameObject.legacyTransform.x+k.ImpactOffset.x,y:k.GameObject.legacyTransform.y-70}).findComponent(G.bE_).getInjectedValue("Animations");Array.isArray(B)||(B=[B]);new wt(B).OnComplete.addOnce(this.onComplete.dispatch,this.onComplete)}}class oe extends G.JTX{getRemainingTitanHP(){if(j.findIndex(this.actionQueue.Actions,(k=>k instanceof re))>-1)return 0;{const k=j.find(this.teams,(k=>1===k.ID)),B=j.filter(this.actionQueue.Actions,(k=>k instanceof te));let U=0;for(let F=0;Fk instanceof ne))>-1)return 0;{const k=j.find(this.teams,(k=>0===k.ID)),B=j.filter(this.actionQueue.Actions,(k=>k instanceof ie));let U=0;for(let F=0;F0===k.ID)).ActiveMember,this.battleUI,this.audioPlayer))}}(0,F.Cg)([(0,G.fFd)("QuestionInterface"),(0,F.Sn)("design:type",Object)],he.prototype,"questionInterface",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamInfo"),(0,F.Sn)("design:type",oe)],he.prototype,"teamInfo",void 0),(0,F.Cg)([(0,G.fFd)("BattleActionQueue"),(0,F.Sn)("design:type",Qt)],he.prototype,"actionQueue",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamMember"),(0,F.Sn)("design:type",rt)],he.prototype,"teamMember",void 0),(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],he.prototype,"teams",void 0),(0,F.Cg)([(0,G.fFd)("BattleUIFactory"),(0,F.Sn)("design:type",Object)],he.prototype,"battleUI",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],he.prototype,"audioPlayer",void 0);var ce=U(48129),de=U(79422),le=U(35564);class ue extends Xt{constructor(k,B,U,F,G,j,$){super(),this.spellFactory=null,this.spellSource=null,this.spellTarget=null,this.spellID=null,this.crystal=null,this.battleUIFactory=null,this.audioPlayer=null,this.spellFactory=U,this.spellSource=k,this.spellTarget=B,this.spellID=F,this.crystal=G,this.battleUIFactory=j,this.audioPlayer=$}run(){const k=this.spellFactory.createSpell(this.spellID,this.crystal,[this.spellTarget]);null!==this.spellSource.AttackAnimationState&&(this.spellSource.AttackAnimationState.OnComplete.addOnce((()=>{this.spellSource.IdleAnimationState.play()})),this.spellSource.AttackAnimationState.play(),this.audioPlayer.playSoundEffectClip(8,Zt.J.Cast)),k.OnImpact.addOnce((()=>{let B=this.battleUIFactory.showStatusText("missed",{x:this.spellTarget.GameObject.legacyTransform.x+this.spellTarget.ImpactOffset.x,y:this.spellTarget.GameObject.legacyTransform.y-50}).findComponent(G.bE_).getInjectedValue("Animations");Array.isArray(B)||(B=[B]),B.push(new ae(k));new wt(B).OnComplete.addOnce((()=>{this.onComplete.dispatch()})),this.audioPlayer.playSoundEffectClip(8,Zt.J.Miss)})),k.OnStart.addOnce((()=>{this.battleUIFactory.showAttackInfo(this.spellSource.NameProvider.getName(),k.Name)})),setTimeout((()=>{const B=this.spellFactory.createBeam(89,{x:this.spellSource.GameObject.transform.localPosition.x+this.spellSource.CastPoint.x,y:this.spellSource.GameObject.transform.localPosition.y+this.spellSource.CastPoint.y},{x:this.crystal.GameObject.legacyTransform.x-20,y:this.crystal.GameObject.legacyTransform.y-40});B.OnImpact.addOnce((()=>{k.cast(),null!==this.crystal.AttackAnimationState&&(this.crystal.AttackAnimationState.OnComplete.addOnce(this.crystal.IdleAnimationState.play,this.crystal.IdleAnimationState),this.crystal.AttackAnimationState.play())})),B.cast()}),te.BEAM_DELAY_MS)}}class fe extends ce.${constructor(){super(...arguments),this.listeningUserID=null}get UserID(){return this.listeningUserID}set UserID(k){this.listeningUserID=k}receivedMessage(k){if(k.action!==le.x.PlayerAttacked||k.data.sourcePlayerID!==this.listeningUserID)return;const B=j.find(this.battleTeams,(k=>0===k.ID)),U=j.find(this.battleTeams,(k=>1===k.ID));this.coOpSocketLogger.logMessage(`Receiving attack message for player with ID ${this.listeningUserID} and name ${this.battleTeamMember.NameProvider.getName()}\n \nAttack missed? ${k.data.missed?"YES":"NO"}. Host sending titan HP as ${k.data.titanHealth}`),k.data.missed?this.battleActionQueue.addAction(new ue(this.battleTeamMember,U.ActiveMember,this.spellFactory,k.data.spellID,B.ActiveMember,this.battleUIFactory,this.audioPlayer)):this.battleActionQueue.addAction(new te(this.battleTeamMember,U.ActiveMember,this.spellFactory,k.data.damage,k.data.spellID,B.ActiveMember,this.battleUIFactory,this.audioPlayer))}}(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],fe.prototype,"battleTeams",void 0),(0,F.Cg)([(0,G.fFd)("BattleActionQueue"),(0,F.Sn)("design:type",Qt)],fe.prototype,"battleActionQueue",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamMember"),(0,F.Sn)("design:type",rt)],fe.prototype,"battleTeamMember",void 0),(0,F.Cg)([(0,G.fFd)("SpellFactory"),(0,F.Sn)("design:type",Object)],fe.prototype,"spellFactory",void 0),(0,F.Cg)([(0,G.fFd)("BattleUIFactory"),(0,F.Sn)("design:type",Object)],fe.prototype,"battleUIFactory",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],fe.prototype,"audioPlayer",void 0),(0,F.Cg)([(0,G.fFd)("CoOpSocketLogging"),(0,F.Sn)("design:type",de.h)],fe.prototype,"coOpSocketLogger",void 0);class be{constructor(k){this.container=null,this.container=k}createCoOpTeam(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U;const F=[];F.push(yield this.createPlayer({appearance:k.getAppearance(),chargedLevelData:k.getChargedLevelData(),userID:k.getUserID(),level:k.player.data.level,firstName:k.getFirstName(),middleName:k.getMiddleName(),lastName:k.getLastName(),nickname:k.getNickname(),playerTransformation:k.player.getPlayerData().playerTransformation})),F[0].addComponent(he);const G=(0,Kt.G)(qt.q).enabled;for(let k=0;k0===k.ID)),$=yield B.createPlayer(k.appearance,F,k.playerTransformation,k.chargedLevelData);$.name="Player";const H=$.findComponent(G.bE_),V=F.GameObject.findComponent(G.bE_);H.Container.bind("DamageReceiver").toConstantValue(V.getInjectedValue("DamageReceiver")),H.Container.bind("Health").toConstantValue(V.getInjectedValue("Health")),$.findComponent(rt).BattleTeam=F;$.addComponent(fe).UserID=k.userID;const W=$.addComponent(zt);return W.firstNameID=k.firstName,W.middleNameID=k.middleName,W.lastNameID=k.lastName,W.nicknameID=k.nickname,H.Container.bind("Name").toConstantValue(W),H.Container.bind("Level").toConstantValue(k.level),H.Container.bind("Element").toConstantValue(Wt.ELegacyElementType.Wizard),$}))}}(0,F.Cg)([G.IJn,(0,F.Qj)(1,(0,G.vQZ)("PlayerFactory")),(0,F.Qj)(2,(0,G.vQZ)("Teams")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Object,Object,Array]),(0,F.Sn)("design:returntype",Promise)],be.prototype,"createPlayer",null);class pe extends G.PQK{installBindings(){const k=this.Container.get("FeatureFlags");this.Container.bind("CoOpTeamInitializer").toConstantValue(new be(this.Container)),this.Container.bind("ClientHeartbeatDisconnectTime").toConstantValue(parseInt(k.getValue("coOpClientHeartbeatTimeout",ut.s.get("GameConstants.CO_OP_TITAN.CLIENT_HEARTBEAT_TIMEOUT")),10))}}class ve extends Xt{constructor(k,B,U,F,G,j){super(),this.sourceTeamMember=null,this.targetTeamMember=null,this.spellFactory=null,this.spellID=null,this.battleUIFactory=null,this.audioPlayer=null,this.targetTeamMember=B,this.sourceTeamMember=k,this.spellFactory=U,this.spellID=F,this.battleUIFactory=G,this.audioPlayer=j}run(){const k=this.spellFactory.createSpell(this.spellID,this.sourceTeamMember,[this.targetTeamMember]),B=this.sourceTeamMember.AttackAnimationState;null!==B&&k.OnStart.addOnce((()=>{B.play(),this.audioPlayer.playSoundEffectClip(8,Zt.J.Cast),B.OnComplete.addOnce(this.returnToIdle,this,0,this.sourceTeamMember)})),k.OnImpact.addOnce((()=>{this.showMiss(k),this.audioPlayer.playSoundEffectClip(8,Zt.J.Miss)})),k.cast(),this.battleUIFactory.showAttackInfo(this.sourceTeamMember.NameProvider.getName(),k.Name),this.trackSpellEvent(k)}trackSpellEvent(k){const B=K.t.getItem("spell",this.spellID);V.q.instance.prodigy.gameContainer.get("c47-20b6").battle.sendBattleSpellCastEvent({team:ee.B1.Player,spell_name:k.Name,spell_type:B.data.type,spell_level:B.data.level,spell_damage:0,caster_name:this.sourceTeamMember.NameProvider.getName(),caster_level:this.sourceTeamMember.Level,target_name:this.targetTeamMember.NameProvider.getName(),target_type:this.targetTeamMember.Element,target_level:this.targetTeamMember.Level,target_health:this.targetTeamMember.Health.CurrentValue,energy_cost:B.data.energyCost,duration:void 0,success:!1})}showMiss(k){let B=this.battleUIFactory.showStatusText("missed",{x:this.targetTeamMember.GameObject.legacyTransform.x,y:this.targetTeamMember.GameObject.legacyTransform.y-40}).findComponent(G.bE_).getInjectedValue("Animations");Array.isArray(B)||(B=[B]),B.push(new ae(k));new wt(B).OnComplete.addOnce((()=>{this.onComplete.dispatch()}))}returnToIdle(k){const B=k.IdleAnimationState;null!==B&&B.play()}}class ge extends ce.${receivedMessage(k){if(k.action===le.x.TitanAttacked){this.coOpSocketLogger.logMessage(`Received titan attacking message. Missed? ${k.data.missed?"YES":"NO"}. Host crystal HP: ${k.data.crystalHealth}`);const B=j.find(this.battleTeams,(k=>0===k.ID));k.data.missed?this.actionQueue.addAction(new ve(this.battleTeamMember,B.ActiveMember,this.spellFactory,k.data.spellID,this.battleUIFactory,this.audioPlayer)):this.actionQueue.addAction(new ie(this.battleTeamMember,B.ActiveMember,this.spellFactory,k.data.damage,k.data.spellID,this.battleUIFactory,this.audioPlayer))}}}(0,F.Cg)([(0,G.fFd)("BattleActionQueue"),(0,F.Sn)("design:type",Qt)],ge.prototype,"actionQueue",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamMember"),(0,F.Sn)("design:type",rt)],ge.prototype,"battleTeamMember",void 0),(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],ge.prototype,"battleTeams",void 0),(0,F.Cg)([(0,G.fFd)("SpellFactory"),(0,F.Sn)("design:type",Object)],ge.prototype,"spellFactory",void 0),(0,F.Cg)([(0,G.fFd)("BattleUIFactory"),(0,F.Sn)("design:type",Object)],ge.prototype,"battleUIFactory",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],ge.prototype,"audioPlayer",void 0),(0,F.Cg)([(0,G.fFd)("CoOpSocketLogging"),(0,F.Sn)("design:type",de.h)],ge.prototype,"coOpSocketLogger",void 0);var me=U(69698);class ye extends G.JTX{constructor(){super(...arguments),this.correctAnswers=0,this.incorrectAnswers=0,this.teamSize=null,this.isHost=null}get CorrectAnswers(){return this.correctAnswers}get IncorrectAnswers(){return this.incorrectAnswers}get Won(){return j.find(this.teams,(k=>1===k.ID)).IsDefeated()}get TeamSize(){return this.teamSize}get IsHost(){return this.isHost}getTimeSinceStart(){return this.timeManager.getLocalTimeMs()-this.startTime}create(){super.create(),this.teamSize=this.teamInfo.getTeam().TeamMembers.length,this.isHost=this.teamInfo.isHost(),this.startTime=this.timeManager.getLocalTimeMs(),this.questionInterface.OnQuestionAnswered.add(this.questionWasAnswered,this)}destroy(){this.questionInterface.OnQuestionAnswered.remove(this.questionWasAnswered,this),super.destroy()}questionWasAnswered(k){k?++this.correctAnswers:++this.incorrectAnswers}}(0,F.Cg)([(0,G.fFd)("QuestionInterface"),(0,F.Sn)("design:type",Object)],ye.prototype,"questionInterface",void 0),(0,F.Cg)([(0,G.fFd)("a03-308f"),(0,F.Sn)("design:type",me.V)],ye.prototype,"timeManager",void 0),(0,F.Cg)([(0,G.fFd)("CurrentCoOpTeam"),(0,F.Sn)("design:type",Object)],ye.prototype,"teamInfo",void 0),(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],ye.prototype,"teams",void 0);class _e extends G.JTX{constructor(){super(...arguments),this.onDefeated=new G.HN0}get OnDefeated(){return this.onDefeated}applyDamage(k){this.health.CurrentValue-=k,this.isDefeated()&&this.OnDefeated.dispatch()}isDefeated(){return this.health.CurrentValue<=0}destroy(){this.onDefeated.dispose(),super.destroy()}}(0,F.Cg)([(0,G.fFd)("Health"),(0,F.Sn)("design:type",at)],_e.prototype,"health",void 0);class Ee extends G.uAl{getDamageAmount(){return 1}}var we=U(28628),Te=U(5491),Se=U(39984),Ae=U(67665),Ce=U(85515),Oe=U(55122),Ie=U(68788),De=U(73032),Re=U(2221);class Pe extends G.JTX{constructor(){super(...arguments),this.onClose=new G.HN0,this.currentMenu=null,this.starsGained=0,this.xpBarDelay=500,this.battleDuration=null}get OnClose(){return this.onClose}get StarsGained(){return this.starsGained}set StarsGained(k){this.starsGained=k}get XPBarDelay(){return this.xpBarDelay}set XPBarDelay(k){this.xpBarDelay=k}open(){const k=this.prizeTiers.getShardCount();this.openNewPostBattleFlow(k)}openNewPostBattleFlow(k){var B,U,F,j,$,H;const W=G.wa5.getActiveScene().addLayer(Ce.E.MenusLayer,500,!0);V.q.instance.prodigy.game.state.getCurrentState().battleLayers[Ce.E.MenusLayer]=W;const q=[];k>0&&q.push({type:"currency",ID:11,N:k});const z=[];z.push({type:"currency",ID:11,N:1});const Y=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;(null===(j=null===(F=null===(U=null===(B=Y.data)||void 0===B?void 0:B.chargedLevelData)||void 0===U?void 0:U.newLevelData)||void 0===F?void 0:F.levelsGained)||void 0===j?void 0:j.length)>0&&(Y.data.chargedLevelData.newLevelData.levelsGained=[null===($=Y.data.chargedLevelData.newLevelData.levelsGained)||void 0===$?void 0:$.pop()],Y.data.chargedLevelData.newLevelData.startingLevelRelativeXp=Y.data.chargedLevelData.chargedLevelXpForCurrentLevel,Y.data.chargedLevelData.newLevelData.xpGained=0);const Q=Se.e.starsToLevel(Oe.s.activePlayerLevelCap,Te.V.Player)-Y.getStars();this.StarsGained=Math.min(Q,this.StarsGained),this.StarsGained=Math.max(0,this.StarsGained);const X=K.t.getItem("titan",this.titanInfo.getAssetID());V.q.instance.prodigy.prefabFactory.openPostBattleFlow({currentTeamCreatures:[Y],victory:this.battleStats.Won,battleType:_s.INSECURE_BATTLE_TYPE,postBattleRewards:{xpGained:{memberXp:0,totalNonMemberXp:this.StarsGained,baseXp:this.StarsGained},rewards:q,memberRewards:z},nootTipInfo:{enemyElementWeakness:null===(H=null==X?void 0:X.data)||void 0===H?void 0:H.element}}).promise.then((k=>{const B=k.findComponentInChildren(Ie.D);B.OnDestroy.addOnce((()=>this.returnToMap())),this._postBattleExpressModeController.setPostBattleFlowManager(B)})).catch(G.RQr.createHandler("Error with post battle flow menu"))}returnToMap(){var k;const B=this.createBattleEventMetadata();this.sendBattleCompleteEvent(B.success?"win":"loss");const U={battleResult:B.success?we.XK.Victory:we.XK.Defeat};V.q.instance.prodigy.world.it(this.afterBattleMap,void 0,void 0,U),null===(k=this.currentMenu)||void 0===k||k.close()}sendBattleCompleteEvent(k){this.segment.battle.sendBattleCompleteEvent({outcome:k,battle_type:_s.INSECURE_BATTLE_TYPE,enemy_attacks_made:void 0,enemy_attacks_succeeded:void 0,player_attacks_made:this.battleStats.CorrectAnswers+this.battleStats.IncorrectAnswers,player_attacks_succeeded:this.battleStats.CorrectAnswers,energy:void 0});const B=this.currentPlayer.player.getCurrentHearts();if(this.segment.battle.sendBattleParticipantsOutcomesEvent({health:B,team:ee.B1.Player,name:ee.B1.Player,type:Wt.ELegacyElementType.Wizard,status:B>0?ee.rW.Conscious:ee.rW.Unconscious}),this.battleStats.IsHost){const k=K.t.getItem("titan",this.titanInfo.getAssetID());k&&this.segment.battle.sendBattleParticipantsOutcomesEvent({health:0,team:ee.B1.Opponent,name:k.name,type:k.data.element,status:this.battleStats.Won?ee.rW.Unconscious:ee.rW.Conscious})}}createBattleEventMetadata(){return{type:"TitanBattle",action:"end",success:this.battleStats.Won,duration:this.battleDuration,coop_role:this.battleStats.IsHost?"leader":"participant",num_players:this.battleStats.TeamSize,custom:{questions_answered_correct:this.battleStats.CorrectAnswers,questions_answered_incorrect:this.battleStats.IncorrectAnswers,shard_payout:this.prizeTiers.getShardCount()}}}destroy(){this.onClose.dispose(),super.destroy()}}(0,F.Cg)([(0,G.fFd)(G.t5G.AssetLoader),(0,F.Sn)("design:type",Object)],Pe.prototype,"assetLoader",void 0),(0,F.Cg)([(0,G.fFd)("c47-20b6"),(0,F.Sn)("design:type",Ae.Y)],Pe.prototype,"segment",void 0),(0,F.Cg)([(0,G.fFd)("BattleStats"),(0,F.Sn)("design:type",Object)],Pe.prototype,"battleStats",void 0),(0,F.Cg)([(0,G.fFd)("PrizeProvider"),(0,F.Sn)("design:type",Re.f)],Pe.prototype,"prizeTiers",void 0),(0,F.Cg)([(0,G.fFd)("SummaryPlayer"),(0,F.Sn)("design:type",Object)],Pe.prototype,"currentPlayer",void 0),(0,F.Cg)([(0,G.fFd)("TitanInfo"),(0,F.Sn)("design:type",Object)],Pe.prototype,"titanInfo",void 0),(0,F.Cg)([(0,G.fFd)("SummaryPopUps"),(0,F.Sn)("design:type",Object)],Pe.prototype,"availablePopups",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],Pe.prototype,"audioPlayer",void 0),(0,F.Cg)([(0,G.fFd)("AfterBattleDestination"),(0,F.Sn)("design:type",String)],Pe.prototype,"afterBattleMap",void 0),(0,F.Cg)([(0,G.fFd)("PostBattleExpressModeController"),(0,F.Sn)("design:type",De.o)],Pe.prototype,"_postBattleExpressModeController",void 0);class Me{constructor(k,B){this.titanID=null,this.assetID=null,this.titanID=k,this.assetID=B}getTitanID(){return this.titanID}getAssetID(){return this.assetID}}class Ne extends G.PQK{constructor(k){super(),this.initializationData=null,this.initializationData=k}installBindings(){this.Container.bind("BattleActionQueue").to(Qt).asSingleton(),this.Container.bind("CoOpTeammateData").toConstantValue(this.initializationData.teammates),this.Container.bind("AfterBattleDestination").toConstantValue(this.initializationData.returnToMap),this.Container.bind("TitanInfo").toConstantValue(new Me(this.initializationData.titanNetworkID,this.initializationData.titanAssetID));const k=this.Container.get("FeatureFlags");this.Container.bind("ENABLE_CO_OP_TITAN_LOGGING").toConstantValue(k.getValue("verboseCoOpLogging",!1)),this.Container.bind("ENABLE_CO_OP_SOCKET_LOGGING").toConstantValue(k.getValue("verboseCoOpSocketLogging",!1));const B=new de.h(this.Container);B.setTag("CO_OP_TITAN"),this.Container.bind("CoOpLogging").toConstantValue(B);const U=new de.h(this.Container);U.setTag("CO_OP_SOCKET"),this.Container.bind("CoOpSocketLogging").toConstantValue(U),this.Container.bind("TitanHP").toConstantValue(this.initializationData.titanHP),this.Container.bind("CrystalHP").toConstantValue(this.initializationData.crystalHP),this.Container.bind("TitanBountyXP").toConstantValue(this.initializationData.titanXPBounty),this.Container.bind("LosingPrizeTiers").toConstantValue([{questionsCorrect:3,shards:1}]),this.Container.bind("WinningPrizeTiers").toConstantValue([{questionsCorrect:5,shards:4},{questionsCorrect:3,shards:2},{questionsCorrect:1,shards:1}])}}let xe=class extends G.JTX{create(){super.create(),this.currentPlayer.setSavingEnabled(!1)}destroy(){this.currentPlayer.setSavingEnabled(!0),super.destroy()}};(0,F.Cg)([(0,G.fFd)("CurrentPlayer"),(0,F.Sn)("design:type",Object)],xe.prototype,"currentPlayer",void 0),xe=(0,F.Cg)([(0,G.EVk)("DisableCurrentPlayerSaving")],xe);var Le=U(50503);class ke extends G.JTX{constructor(){super(...arguments),this.questionStreak=0}increaseStreak(){++this.questionStreak}resetStreak(){this.questionStreak=0}getCurrentSpell(){return this.spellIDs[Math.min(this.questionStreak,this.spellIDs.length-1)]}}(0,F.Cg)([(0,G.fFd)("PlayerSpells"),(0,F.Sn)("design:type",Array)],ke.prototype,"spellIDs",void 0);class Be extends G.JTX{doAttack(k,B){const U=j.find(this.battleTeams,(k=>1===k.ID)),F=j.find(this.battleTeams,(k=>0===k.ID)),G=this.teamInfo.getRemainingTitanHP();this.teamInfo.isTitanTeamDefeated()||this.teamInfo.isPlayerTeamDefeated()?this.coOpSocketLogger.logMessage("Received an attack message but a team is defeated. Will not be processed."):B?this.queueMissedAttackAction(k,G,F.ActiveMember,U.ActiveMember):G<=1?this.queueTitanDefeatAction(U.ActiveMember):this.queueAttackAction(k,G,F.ActiveMember,U.ActiveMember),B?this.spellSelector.resetStreak():this.spellSelector.increaseStreak()}queueMissedAttackAction(k,B,U,F){const G={action:le.x.PlayerAttacked,data:{missed:!0,sourcePlayerID:k,titanHealth:B,damage:0,spellID:this.spellSelector.getCurrentSpell()}};this.socketService.broadcastMessage(G),this.coOpSocketLogger.logMessage(`Broadcasting missed attack message for player with ID ${k} and name ${this.battleTeamMember.NameProvider.getName()}.`),this.battleActionsQueue.addAction(new ue(this.battleTeamMember,F,this.spellFactory,this.spellSelector.getCurrentSpell(),U,this.battleUIFactory,this.audioPlayer))}queueAttackAction(k,B,U,F){const G=this.battleTeamMember.DamageSource.getDamageAmount(),j={action:le.x.PlayerAttacked,data:{missed:!1,sourcePlayerID:k,damage:G,titanHealth:B,spellID:this.spellSelector.getCurrentSpell()}};this.socketService.broadcastMessage(j),this.coOpSocketLogger.logMessage(`Broadcasting successful attack message for player with ID ${k} and name ${this.battleTeamMember.NameProvider.getName()}.`),this.battleActionsQueue.addAction(new te(this.battleTeamMember,F,this.spellFactory,G,this.spellSelector.getCurrentSpell(),U,this.battleUIFactory,this.audioPlayer))}queueTitanDefeatAction(k){const B={action:le.x.TitanDefeated};this.socketService.broadcastMessage(B),this.coOpSocketLogger.logMessage("Broadcasting message that the titan has been defeated"),this.battleActionsQueue.addAction(new re(this.battleTeams,this.spellFactory,V.q.instance.game.time.events,this.audioPlayer,this.battleUIFactory))}}(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],Be.prototype,"battleTeams",void 0),(0,F.Cg)([(0,G.fFd)("SpellSelector"),(0,F.Sn)("design:type",ke)],Be.prototype,"spellSelector",void 0),(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],Be.prototype,"socketService",void 0),(0,F.Cg)([(0,G.fFd)("BattleActionQueue"),(0,F.Sn)("design:type",Qt)],Be.prototype,"battleActionsQueue",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamMember"),(0,F.Sn)("design:type",rt)],Be.prototype,"battleTeamMember",void 0),(0,F.Cg)([(0,G.fFd)("SpellFactory"),(0,F.Sn)("design:type",Object)],Be.prototype,"spellFactory",void 0),(0,F.Cg)([(0,G.fFd)("BattleUIFactory"),(0,F.Sn)("design:type",Object)],Be.prototype,"battleUIFactory",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamInfo"),(0,F.Sn)("design:type",oe)],Be.prototype,"teamInfo",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],Be.prototype,"audioPlayer",void 0),(0,F.Cg)([(0,G.fFd)("CoOpSocketLogging"),(0,F.Sn)("design:type",de.h)],Be.prototype,"coOpSocketLogger",void 0);class Ue extends G.JTX{constructor(){super(...arguments),this.playerAttackHandler=null}get AttackHandler(){return this.playerAttackHandler}set AttackHandler(k){this.playerAttackHandler=k}create(){super.create(),this.questionInterface.OnQuestionAnswered.add(this.questionWasAnswered,this)}destroy(){this.questionInterface.OnQuestionAnswered.remove(this.questionWasAnswered,this),super.destroy()}questionWasAnswered(k){this.playerAttackHandler.doAttack(this.currentPlayer.getUserID(),!k)}}(0,F.Cg)([(0,G.fFd)("QuestionInterface"),(0,F.Sn)("design:type",Object)],Ue.prototype,"questionInterface",void 0),(0,F.Cg)([(0,G.fFd)("CurrentPlayer"),(0,F.Sn)("design:type",Object)],Ue.prototype,"currentPlayer",void 0);class Fe extends ce.${constructor(){super(...arguments),this.userID=null,this.playerAttackHandler=null}get UserID(){return this.userID}set UserID(k){this.userID=k}get AttackHandler(){return this.playerAttackHandler}set AttackHandler(k){this.playerAttackHandler=k}receivedMessage(k){k.action===le.x.QuestionAnswered&&k.data.sourcePlayerID===this.userID&&(this.playerAttackHandler.doAttack(this.UserID,!k.data.correct),this.coOpSocketLogger.logMessage(`Received message that user with id ${this.userID} has answered a question ${k.data.correct?"correctly":"incorrectly"}`))}}(0,F.Cg)([(0,G.fFd)("CoOpSocketLogging"),(0,F.Sn)("design:type",de.h)],Fe.prototype,"coOpSocketLogger",void 0);class Ge extends G.s3P{createCoOpTeam(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U;const F=[],G=yield this.createPlayer({appearance:k.getAppearance(),firstName:k.getFirstName(),middleName:k.getMiddleName(),lastName:k.getLastName(),nickname:k.getNickname(),userID:k.getUserID(),level:k.player.data.level,playerTransformation:k.player.getPlayerData().playerTransformation,chargedLevelData:k.getChargedLevelData()}),$=G.addComponent(Ue),H=G.addComponent(Be);$.AttackHandler=H,G.addComponent(he),F.push(G);const V=(0,Kt.G)(qt.q).enabled;for(let k=0;kk.userID)).join(",")}`),F}))}createPlayer(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=j.find(U,(k=>0===k.ID)),$=yield B.createPlayer(k.appearance,F,k.playerTransformation,k.chargedLevelData);$.name="Player";const H=$.findComponent(G.bE_),V=F.GameObject.findComponent(G.bE_);H.Container.bind("DamageReceiver").toConstantValue(V.getInjectedValue("DamageReceiver")),H.Container.bind("DamageSource").toConstantValue(V.getInjectedValue("DamageSource")),H.Container.bind("Health").toConstantValue(V.getInjectedValue("Health")),H.Container.bind("Level").toConstantValue(k.level),H.Container.bind("Element").toConstantValue(Wt.ELegacyElementType.Wizard),$.findComponent(rt).BattleTeam=F;const W=$.addComponent(G.Fid);W.Identifier="SpellSelector",W.Components=[$.addComponent(ke)];const q=$.addComponent(zt);return q.firstNameID=k.firstName,q.middleNameID=k.middleName,q.lastNameID=k.lastName,q.nicknameID=k.nickname,H.Container.bind("Name").toConstantValue(q),$}))}}(0,F.Cg)([(0,G.fFd)("CoOpLogging"),(0,F.Sn)("design:type",de.h)],Ge.prototype,"logger",void 0),(0,F.Cg)([G.IJn,(0,F.Qj)(1,(0,G.vQZ)("PlayerFactory")),(0,F.Qj)(2,(0,G.vQZ)("Teams")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Object,Object,Array]),(0,F.Sn)("design:returntype",Promise)],Ge.prototype,"createPlayer",null);class je extends G.PQK{installBindings(){this.Container.bind("CoOpTeamInitializer").toConstantValue(new Ge(this.Container));const k=this.Container.get("FeatureFlags");this.Container.bind("TitanAttackFrequency").toConstantValue(parseInt(k.getValue("titanCoOpAttackFrequency",ut.s.get("GameConstants.CO_OP_TITAN.ATTACK_FREQUENCY")),10)),this.Container.bind("TitanDifficultyLevel").toConstantValue(parseInt(k.getValue("titanCoOpDifficulty",ut.s.get("GameConstants.CO_OP_TITAN.TITAN_DIFFICULTY")),10)),this.Container.bind("HostHeartbeatTime").toConstantValue(parseInt(k.getValue("coOpHostHeartbeatTime",ut.s.get("GameConstants.CO_OP_TITAN.HOST_HEARTBEAT_TIME")),10)),this.Container.bind("PlayerSpells").toConstantValue(this.getPlayerSpells())}getPlayerSpells(){const k=[],B=K.t.getRawItems("spell");for(let j=0;j0;){const B=F.pop(),U=[];for(let F=1;F<4;++F){const G=j.find(k,(k=>k.data.element===B&&k.data.tier===F&&k.data.targetType===Pt.X.Single));G&&U.push(G.ID);const $=j.find(k,(k=>k.data.element===B&&k.data.tier===F&&k.data.targetType===Pt.X.AOE));$&&U.push($.ID)}6===U.length&&($[B]=U)}const H=j.keys($);if(H.length>0){const k=[];for(let B=0;B<$[H[0]].length;++B){const U=j.sample(H);k.push($[U][B])}return this.Container.get("CoOpLogging").logMessage(`Titan combat loaded with spells of types (${H.join(", ")}) and difficulty ${String(this.Container.get("TitanDifficultyLevel"))}`),k}return G.VyI.log("Co-op spells could not be selected!",G.$bb.Error),[49]}}class $e extends G.JTX{constructor(){super(...arguments),this.attacks=0,this.defeatDelay=800,this.noMissStreak=0,this.maxNoMissStreak=5}get DefeatDelay(){return this.defeatDelay}set DefeatDelay(k){this.defeatDelay=k}get MaxNoMissStreak(){return this.maxNoMissStreak}set MaxNoMissStreak(k){this.maxNoMissStreak=k}create(){super.create(),this.questionInterface.OnQuestionAnswered.add(this.increaseAttackCounter,this,-1),this.socket.onMessage.add(this.socketMessageReceived,this,-1),this.logger.logMessage(`Titan will attack when players cast ${this.attackFrequency} spell(s)`)}destroy(){this.questionInterface.OnQuestionAnswered.remove(this.increaseAttackCounter,this),this.socket.onMessage.remove(this.socketMessageReceived,this),super.destroy()}socketMessageReceived(k){k.action===le.x.QuestionAnswered&&this.increaseAttackCounter()}increaseAttackCounter(){if(++this.attacks,this.attacks>=this.attackFrequency)if(this.attacks=0,this.teamInfo.isPlayerTeamDefeated()||this.teamInfo.isTitanTeamDefeated())this.coOpSocketLogger.logMessage("Titan should attack, but a team is defeated. Not processing this message.");else{let k=Le.A.rollMissChance(this.titanDifficulty);const B=j.find(this.battleTeams,(k=>0===k.ID)),U=this.teamInfo.getRemainingPlayerHP();this.coOpSocketLogger.logMessage(`Titan is attacking. No miss streak is currently at ${this.noMissStreak}.`),k?this.noMissStreak=0:(++this.noMissStreak,this.noMissStreak>=this.maxNoMissStreak&&(this.noMissStreak=0,k=!0)),k?this.queueMissedAttackAction(U,B.ActiveMember):U<=1?this.queuePlayerDefeatAction(B.ActiveMember):this.queueAttackAction(U,B.ActiveMember)}}queueMissedAttackAction(k,B){const U={action:le.x.TitanAttacked,data:{crystalHealth:k,missed:!0,damage:0,spellID:73}};this.socket.broadcastMessage(U),this.coOpSocketLogger.logMessage(`Broadcasting missed attack message for the titan. Crystal is at ${k} HP.`),this.battleQueue.addAction(new ve(this.battleTeamMember,B,this.spellFactory,73,this.battleUIFactory,this.audioPlayer))}queueAttackAction(k,B){const U=this.battleTeamMember.DamageSource.getDamageAmount(),F={action:le.x.TitanAttacked,data:{crystalHealth:k,missed:!1,damage:U,spellID:73}};this.socket.broadcastMessage(F),this.coOpSocketLogger.logMessage(`Broadcasting attack message for the titan. Crystal is at ${k} HP.`),this.battleQueue.addAction(new ie(this.battleTeamMember,B,this.spellFactory,U,73,this.battleUIFactory,this.audioPlayer))}queuePlayerDefeatAction(k){const B={action:le.x.PlayersDefeated};this.socket.broadcastMessage(B),this.coOpSocketLogger.logMessage("Broadcasting titan defeated message. Battle should resolve in player victory."),this.battleQueue.addAction(new ne(this.battleTeams,this.spellFactory,V.q.instance.game.time.events,this.defeatDelay,this.audioPlayer))}}(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],$e.prototype,"socket",void 0),(0,F.Cg)([(0,G.fFd)("TitanAttackFrequency"),(0,F.Sn)("design:type",Number)],$e.prototype,"attackFrequency",void 0),(0,F.Cg)([(0,G.fFd)("QuestionInterface"),(0,F.Sn)("design:type",Object)],$e.prototype,"questionInterface",void 0),(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],$e.prototype,"battleTeams",void 0),(0,F.Cg)([(0,G.fFd)("BattleActionQueue"),(0,F.Sn)("design:type",Qt)],$e.prototype,"battleQueue",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamMember"),(0,F.Sn)("design:type",rt)],$e.prototype,"battleTeamMember",void 0),(0,F.Cg)([(0,G.fFd)("TitanDifficultyLevel"),(0,F.Sn)("design:type",Number)],$e.prototype,"titanDifficulty",void 0),(0,F.Cg)([(0,G.fFd)("SpellFactory"),(0,F.Sn)("design:type",Object)],$e.prototype,"spellFactory",void 0),(0,F.Cg)([(0,G.fFd)("BattleUIFactory"),(0,F.Sn)("design:type",Object)],$e.prototype,"battleUIFactory",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamInfo"),(0,F.Sn)("design:type",oe)],$e.prototype,"teamInfo",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],$e.prototype,"audioPlayer",void 0),(0,F.Cg)([(0,G.fFd)("CoOpLogging"),(0,F.Sn)("design:type",de.h)],$e.prototype,"logger",void 0),(0,F.Cg)([(0,G.fFd)("CoOpSocketLogging"),(0,F.Sn)("design:type",de.h)],$e.prototype,"coOpSocketLogger",void 0);var He=U(87761),Ve=U(28152);let We=class extends G.JTX{constructor(){super(...arguments),this._autoJoin=!0}create(){super.create(),this._autoJoin&&this.join()}destroy(){this.leave(),super.destroy()}join(k){this.canJoinRoom().then((B=>{var U;if(!B)return;const F=null!==(U=null!=k?k:this._roomID)&&void 0!==U?U:this.removeHardOrExpertIdentifierFromZoneMapTag(this.getInjectedValue("ZONE_MAP_TAG"));F&&(this._multiplayerSocket.isDisconnected||F!==this._roomID)&&(this._multiplayerSocket.joinRoom(F),this._roomID=F)})).catch((k=>{G.RQr.logError(k,"Failed to check if player can join room")}))}canJoinRoom(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=yield null===(k=this._localZoneQuestManager)||void 0===k?void 0:k.getTasksInProgress();if(!B||0===B.length)return!0;const U=$().uniq($().flatMap(B,(k=>{var B,U;return null!==(U=null===(B=k.taskDefinition.metadata)||void 0===B?void 0:B.locations)&&void 0!==U?U:[]}))),F=V.q.instance.prodigy.world.getCurrentMap();return void 0!==F&&!U.some((k=>("string"==typeof k?k:k.location)===F))}))}removeHardOrExpertIdentifierFromZoneMapTag(k){return k?k.replace(/_(hard|expert)/,""):null}leave(){this._roomID&&(this._multiplayerSocket.leaveRoom(),this._roomID=void 0)}};(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],We.prototype,"_multiplayerSocket",void 0),(0,F.Cg)([(0,G.Cdj)("a78-11c7"),(0,F.Sn)("design:type",He.B)],We.prototype,"_localZoneQuestManager",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],We.prototype,"_roomID",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],We.prototype,"_autoJoin",void 0),We=(0,F.Cg)([(0,G.EVk)("JoinMultiplayerRoom",Ve.Y.multiplayer)],We);class qe extends G.uAl{constructor(){super(...arguments),this.startPosition=null,this.endPosition=null,this.slideDuration=0,this.onComplete=new G.HN0,this.animationPlayed=!1}get StartPosition(){return this.startPosition}set StartPosition(k){this.startPosition=k}get EndPosition(){return this.endPosition}set EndPosition(k){this.endPosition=k}get SlideDuration(){return this.slideDuration}set SlideDuration(k){this.slideDuration=k}get OnComplete(){return this.onComplete}play(){this.GameObject.legacyTransform.group.position.set(this.startPosition.x,this.startPosition.y);V.q.instance.game.add.tween(this.GameObject.legacyTransform.group.position,this).to(Object.assign({},this.endPosition),this.slideDuration,G.GS3.Quadratic.Out,!0).onTweenComplete.addOnce((()=>{this.animationPlayed=!0,this.onComplete.dispatch()}))}hasFinishedPlaying(){return this.animationPlayed}destroy(){this.onComplete.dispose(),super.destroy()}}class Ke extends G.JTX{constructor(){super(...arguments),this.isHorizontal=!0,this.requestedSize=0,this.startImage=null,this.endImage=null,this.fillTexture=null,this.fillImage=null,this.sourceAtlas=null,this.fillFrame=null}get IsHorizontal(){return this.isHorizontal}set IsHorizontal(k){this.isHorizontal=k}get Size(){return this.requestedSize}set Size(k){this.requestedSize=k,this.updatePositionAndSize()}create(){super.create(),this.startImage=V.q.instance.prodigy.create.image(0,0,null,null),this.GameObject.legacyTransform.group.addChild(this.startImage),this.endImage=V.q.instance.prodigy.create.image(0,0,null,null),this.GameObject.legacyTransform.group.addChild(this.endImage),this.fillTexture=V.q.instance.game.add.renderTexture(),this.fillImage=V.q.instance.prodigy.create.image(0,0,null,null,this.fillTexture),this.GameObject.legacyTransform.group.addChild(this.fillImage),this.startImage.anchor.set(.5,.5),this.endImage.anchor.set(.5,.5),this.fillImage.anchor.set(.5,.5)}destroy(){this.fillTexture.destroy(!0),this.startImage.destroy(),this.endImage.destroy(),this.fillImage.destroy(),super.destroy()}setAsset(k,B,U=null,F=null){this.assetLoader.isLoaded(k,mt.i.Image)?(null===U?(this.startImage.loadTexture(k,F),this.endImage.loadTexture(k,F),this.endImage.scale.set(1,1),this.isHorizontal?this.startImage.scale.set(-1,1):this.startImage.scale.set(1,-1)):null===F?(this.startImage.loadTexture(k,U),this.endImage.loadTexture(k,U),this.startImage.scale.set(1,1),this.isHorizontal?this.endImage.scale.set(-1,1):this.endImage.scale.set(1,-1)):(this.startImage.loadTexture(k,U),this.endImage.loadTexture(k,F),this.startImage.scale.set(1,1),this.endImage.scale.set(1,1)),this.sourceAtlas=k,this.fillFrame=B,this.updatePositionAndSize()):this.assetLoader.loadAssets([k]).then((()=>{this.setAsset(k,U,B,F)}))}applyMask(k){this.startImage.mask=k.getGraphicSource(),this.fillImage.mask=k.getGraphicSource(),this.endImage.mask=k.getGraphicSource()}removeMask(){this.startImage.mask=null,this.fillImage.mask=null,this.endImage.mask=null}updatePositionAndSize(){if(null!==this.sourceAtlas){const k=this.assetLoader.getAsset(this.sourceAtlas,mt.i.Atlas).getFrameByName(this.fillFrame);if(this.isHorizontal){const B=Math.abs(this.startImage.width),U=Math.abs(this.endImage.width),F=Math.max(0,Math.ceil(this.requestedSize-(B+U))+2),G=.5*this.requestedSize;this.startImage.position.set(Math.ceil(-G+Math.round(.5*B)),0),this.fillImage.position.set(.5*(B-U),0),this.endImage.position.set(Math.floor(G-Math.round(.5*U)),0);const j=V.q.instance.prodigy.create.image(0,0,this.sourceAtlas,this.fillFrame),$=Math.ceil(F/j.width),H=F>0&&k.sourceSizeH>0;if(this.fillTexture.resize(F,k.sourceSizeH,H),H){this.fillTexture.clear();for(let k=0;k<$;++k)this.fillTexture.renderXY(j,k*j.width,0)}j.destroy(),this.startImage.y=Math.round(.5*(this.startImage.height-k.sourceSizeH)),this.endImage.y=Math.round(.5*(this.endImage.height-k.sourceSizeH))}else{const B=Math.abs(this.startImage.height),U=Math.abs(this.endImage.height),F=Math.max(0,Math.ceil(this.requestedSize-(B+U))+2),G=.5*this.requestedSize;this.startImage.position.set(0,Math.ceil(-G+Math.round(.5*B))),this.fillImage.position.set(0,.5*(B-U)),this.endImage.position.set(0,Math.floor(G-Math.round(.5*U)));const j=V.q.instance.prodigy.create.image(0,0,this.sourceAtlas,this.fillFrame),$=Math.ceil(F/j.height),H=this.startImage.width>0&&F>0;if(this.fillTexture.resize(this.startImage.width,F,H),H){this.fillTexture.clear();for(let k=0;k<$;++k)this.fillTexture.renderXY(j,0,k*j.height)}j.destroy(),this.startImage.x=Math.round(.5*(this.startImage.width-k.sourceSizeW)),this.endImage.x=Math.round(.5*(this.endImage.width-k.sourceSizeW))}}}}(0,F.Cg)([(0,G.fFd)(G.t5G.AssetLoader),(0,F.Sn)("design:type",Object)],Ke.prototype,"assetLoader",void 0);class ze extends G.uAl{constructor(){super(...arguments),this.segmentCount=0,this.gapSize=0,this.isHorizontal=!0,this.totalBarSize=0,this.fillFrame=null,this.barStartCapFrame=null,this.barEndCapFrame=null,this.barSegmentStartFrame=null,this.barSegmentEndFrame=null,this.barAtlas=null,this.segments=[],this.currentMask=null}get Segments(){return this.segmentCount}set Segments(k){this.segmentCount=k,this.updateSegments()}get GapSize(){return this.gapSize}set GapSize(k){this.gapSize=k,this.updateSegments()}get IsHorizontal(){return this.isHorizontal}set IsHorizontal(k){this.isHorizontal=k,this.updateSegments()}get BarSize(){return this.totalBarSize}set BarSize(k){this.totalBarSize=k,this.updateSegments()}get FillFrame(){return this.fillFrame}set FillFrame(k){this.fillFrame=k,this.updateSegments()}get BarStartCapFrame(){return this.barStartCapFrame}set BarStartCapFrame(k){this.barStartCapFrame=k,this.updateSegments()}get BarEndCapFrame(){return this.barEndCapFrame}set BarEndCapFrame(k){this.barEndCapFrame=k,this.updateSegments()}get SegmentStartFrame(){return this.barSegmentStartFrame}set SegmentStartFrame(k){this.barSegmentStartFrame=k,this.updateSegments()}get SegmentEndFrame(){return this.barSegmentEndFrame}set SegmentEndFrame(k){this.barSegmentEndFrame=k,this.updateSegments()}get Atlas(){return this.barAtlas}set Atlas(k){this.barAtlas=k,this.updateSegments()}applyMask(k){this.currentMask=k;for(let B=0;Bthis.segmentCount;)this.segments.pop().GameObject.destroy();for(;this.segments.length0){const k=Math.round((this.totalBarSize-(this.gapSize*this.segmentCount-1))/this.segmentCount);let B=.5*this.gapSize-.5*this.totalBarSize+.5*k;for(let U=0;U3e3){this.lastLogTime=U;let F=`QuestionAnsweredDecision\nTransition to ${this.NextState}? ${B?"YES":"NO"}\n`;F+=`\t - Question interface closed? ${B?"YES":"NO"}\n`,null===(k=this.logger)||void 0===k||k.logMessage(F)}return B}}class ei extends Xe{get Name(){return Ye.AnsweringQuestion}constructor(k,B){super(),this.logger=null,this.Decisions=[new ti(k,B)],this.logger=B}enter(){this.logger.logMessage("Entering AnsweringQuestionState - Question interface is open")}exit(){}}class ii extends G.uAl{constructor(){super(...arguments),this.menu=null,this.onFadeComplete=new G.HN0}get TargetMenu(){return this.menu}set TargetMenu(k){this.menu=k}get OnFadeComplete(){return this.onFadeComplete}fadeMenu(){if(null!==this.TargetMenu){V.q.instance.game.add.tween(this.TargetMenu.uiRoot,this).to({alpha:0},200,G.GS3.Linear.None,!0).onTweenComplete.addOnce((()=>{this.onFadeComplete.dispatch()}))}}destroy(){this.onFadeComplete.dispose(),super.destroy()}}var si=U(82680),ni=U(5365),ai=U(87776);class ri extends G.bE_{constructor(){super(...arguments),this.redirectContext=null}get RedirectContext(){return this.redirectContext}set RedirectContext(k){this.redirectContext=k}get Container(){return this.redirectContext.Container}getInjectedValue(k){return this.redirectContext.getInjectedValue(k)}}var oi=U(70215);class hi extends G.JTX{constructor(){super(...arguments),this.onClose=new G.HN0,this.heartsGained=0,this.menu=null}get OnClose(){return this.onClose}open(){null===this.menu&&(this.menu=new si.W(V.q.instance.game,this.GameObject.legacyTransform.group,21,{isModal:!1}),this.menu.queuePostCreateCallback((()=>{this.updateUI(),this.menu.openTween(),this.audioPlayer.playSoundEffectClip(32,"popUpDisplay")})))}create(){super.create(),this.targetPlayer.onStatChanged.add(this.playerStatChanged,this)}destroy(){this.targetPlayer.onStatChanged.remove(this.playerStatChanged,this),this.onClose.dispose(),super.destroy()}shouldOpen(){return this.heartsGained>0}playerStatChanged(k,B,U){k===oi.$.MaxHearts&&(this.heartsGained+=B-U)}updateUI(){this.menu.findElement(ai.b,"resultsTitle").setText(this.localizer.getText("SUMMARY_POPUP_NEW_HEARTS"));const k=new G._mx;k.addComponent(G.K16),this.menu.findUIElement("spriteHolder").add(k.legacyTransform.group),k.addComponent(ri).RedirectContext=this.GameObject.findComponentInParent(G.bE_);const B=k.addComponent(gt._);B.OnLoaded.addOnce((()=>{V.q.instance.game.add.tween(B.sprite.scale,this).from({x:0,y:0},1e3,G.GS3.Elastic.Out,!0)})),B.setAnchor(.5,.5),B.setAsset(Ct._.General_battle_json,"icon-heart"),this.menu.findElement(ai.b,"actionText").setText(this.localizer.getText("SUMMARY_POPUP_HEARTS_EARNED",K.t.getItem("name",this.targetPlayer.getFirstName()).data.value,this.heartsGained));const U=this.menu.findElement(ni.Z,"okayButton");U.onUpCallback=()=>{U.setActive(!1);const k=this.GameObject.findComponent(ii);k.TargetMenu=this.menu,k.OnFadeComplete.addOnce(this.closePopUp,this),k.fadeMenu()}}closePopUp(){this.menu.close(),this.onClose.dispatch()}}(0,F.Cg)([(0,G.fFd)("SummaryPlayer"),(0,F.Sn)("design:type",Object)],hi.prototype,"targetPlayer",void 0),(0,F.Cg)([(0,G.fFd)("Localization"),(0,F.Sn)("design:type",G.dTp)],hi.prototype,"localizer",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],hi.prototype,"audioPlayer",void 0);var ci=U(24536),di=U(22023),li=U(30226);class ui extends G.JTX{constructor(){super(...arguments),this.onClose=new G.HN0,this.spellsToShow=[],this.menu=null,this.actionText=null,this.spellImage=null,this.okButton=null,this.backgroundOrb=null}get OnClose(){return this.onClose}create(){super.create(),this.summaryPlayer.onStatChanged.add(this.playerStatChanged,this)}destroy(){this.summaryPlayer.onStatChanged.remove(this.playerStatChanged,this),this.onClose.dispose(),super.destroy()}shouldOpen(){return this.spellsToShow.length>0}open(){null===this.menu&&(this.menu=new si.W(V.q.instance.game,this.GameObject.legacyTransform.group,21,{isModal:!1}),this.menu.queuePostCreateCallback((()=>{this.updateUI(),this.showNextSpell(),this.menu.openTween(),this.audioPlayer.playSoundEffectClip(32,"popUpDisplay")})))}playerStatChanged(k,B,U){k===oi.$.Spell&&this.spellsToShow.push({newSpellID:B,oldSpellID:U})}showNextSpell(){this.okButton.setActive(!1);const k=this.spellsToShow.shift(),B=K.t.getItem("spell",k.newSpellID);let U="";if(null===k.oldSpellID)U=this.localization.getText("SUMMARY_POPUP_SPELL_UNLOCKED",K.t.getItem("name",this.summaryPlayer.getFirstName()).data.value,B.data.name);else{const F=K.t.getItem("spell",k.oldSpellID);U=this.localization.getText("SUMMARY_POPUP_SPELL_EVOLVED",F.data.name,B.data.name)}this.actionText.setText(U);const F=li.J.convertLegacyElements(B.data.element);this.spellImage.setAsset(Ct._.Ui_bam_json,`icons/icon-${F}-ss`),this.backgroundOrb.image.frameName=di.P8.getAtlasElementBackerPath(F)}updateUI(){this.menu.findElement(ai.b,"resultsTitle").setText(this.localization.getText("SUMMARY_POPUP_NEW_SPELL")),this.okButton=this.menu.findElement(ni.Z,"okayButton"),this.okButton.onUpCallback=()=>{if(this.okButton.setActive(!1),this.spellsToShow.length>0)this.showNextSpell();else{const k=this.GameObject.findComponent(ii);k.TargetMenu=this.menu,k.OnFadeComplete.addOnce(this.closePopUp,this),k.fadeMenu()}},this.actionText=this.menu.findElement(ai.b,"actionText"),this.backgroundOrb=this.menu.findElement(ci.v,"ballDisplay");const k=new G._mx;k.addComponent(G.K16).group.position.set(0,15),this.menu.findUIElement("spriteHolder").add(k.legacyTransform.group),k.addComponent(ri).RedirectContext=this.GameObject.findComponentInParent(G.bE_),this.spellImage=k.addComponent(gt._),this.spellImage.OnLoaded.add((()=>{this.spellImage.setAlpha(1),V.q.instance.game.add.tween(this.spellImage.sprite.scale,this).from({x:0,y:0},1e3,G.GS3.Elastic.Out,!0),this.okButton.setActive(!0)})),this.spellImage.setAnchor(.5,.5),this.spellImage.setAlpha(0)}closePopUp(){this.menu.close(),this.OnClose.dispatch()}}(0,F.Cg)([(0,G.fFd)("SummaryPlayer"),(0,F.Sn)("design:type",Object)],ui.prototype,"summaryPlayer",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],ui.prototype,"audioPlayer",void 0),(0,F.Cg)([(0,G.fFd)("Localization"),(0,F.Sn)("design:type",G.dTp)],ui.prototype,"localization",void 0);class fi extends Xe{get Name(){return Ye.SummaryOpen}constructor(k,B,U,F,G,j,$,H){super(),this.menuTarget=null,this.mainPlayer=null,this.combatBounty=null,this.playerWon=!1,this.titanInfo=null,this.logger=null,this.menuTarget=B,this.mainPlayer=U,this.combatBounty=F,this.playerWon=G,this.audioPlayer=j,this.titanInfo=$,this.logger=H}enter(){const k=new G._mx(this.menuTarget);k.name="CoOpSummary",k.addComponent(G.K16);k.addComponent(G.bE_).Container.bind("SummaryPlayer").toConstantValue(this.mainPlayer);const B=class{constructor(){}static create(k){const B=new G._mx(k);B.addComponent(G.K16),B.name="SummaryMenu";const U=B.addComponent(Pe),F=new G._mx(k);F.addComponent(G.K16),F.name="HeartsPopUp",F.addComponent(ii);const j=new G._mx(k);j.addComponent(G.K16),j.name="SpellsPopUp",j.addComponent(ii);const $=k.addComponent(G.Fid);return $.Identifier="SummaryPopUps",$.Components=[F.addComponent(hi),j.addComponent(ui)],U}}.create(k);B.StarsGained=this.combatBounty.getStars(),B.open();const U=this.titanInfo.getTitanID();this.playerWon&&(this.audioPlayer.playMusic(1),U>0&&V.q.instance.prodigy.titansNetworkHandler.hitTitan(U)),this.logger.logMessage(`CoOpTitanSummaryScreenState#enter - Player has ${this.playerWon?"won":"lost"} the battle.\n Titan-api will ${U<=0?"NOT":""} register the hit for titan ${U}`)}exit(){}}class bi extends Je{get NextState(){return Ye.InBattle}constructor(k,B){super(),this.healthBarsEntered=0,this.targetHealthBarsEntered=0,this.logger=null,this.lastLogTime=Date.now(),this.targetHealthBarsEntered=k.length,this.logger=B;for(let U=0;U{++this.healthBarsEntered}))}shouldTransition(){const k=this.healthBarsEntered===this.targetHealthBarsEntered,B=Date.now();if(k||B-this.lastLogTime>3e3){this.lastLogTime=B;let U=`EnterBattleAfterHealthBarsDecision\nTransition to ${this.NextState}? ${k?"YES":"NO"}\n`;U+=`\t - All Health bars entered? ${this.healthBarsEntered===this.targetHealthBarsEntered?"YES":"NO"} (${this.healthBarsEntered} / ${this.targetHealthBarsEntered})`,this.logger.logMessage(U)}return k}}class pi extends Xe{get Name(){return Ye.EnterHealthBars}constructor(k,B){super(),this.healthBars=[],this.logger=null,this.healthBars=k,this.logger=B,this.Decisions=[new bi(k,B)]}enter(){for(let k=0;k{this.animationsCompleted=!0}))}shouldTransition(){const k=this.breadcrumbService.isComplete(vi.B.FEATURE_COOP_BATTLE,vi.B.BREADCRUMB_COOP_BATTLE_START),B=this.animationsCompleted&&k,U=Date.now();if(B||U-this.lastLogTime>3e3){this.lastLogTime=U;let F=`BattleAfterEnteringDecision\nTransition to ${this.NextState}? ${B?"YES":"NO"}\n`;F+=`\t - Animations complete? ${this.animationsCompleted?"YES":"NO"}\n`,F+="\t - BREADCRUMB_COOP_BATTLE_START completed? "+(k?"YES":"NO"),this.logger.logMessage(F)}return B}}class mi extends Je{get NextState(){return Ye.NootBattleTutorial}constructor(k,B,U){super(),this.breadcrumbService=null,this.playersEntered=!1,this.logger=null,this.lastLogTime=Date.now(),this.breadcrumbService=k,this.logger=U,B.OnComplete.addOnce((()=>{this.playersEntered=!0}))}shouldTransition(){const k=this.breadcrumbService.isComplete(vi.B.FEATURE_COOP_BATTLE,vi.B.BREADCRUMB_COOP_BATTLE_START),B=this.playersEntered&&!k,U=Date.now();if(B||U-this.lastLogTime>3e3){this.lastLogTime=U;let F=`GoToTutorialDecision\nTransition to ${this.NextState}? ${B?"YES":"NO"}\n`;F+=`\t - Players have entered? ${this.playersEntered?"YES":"NO"}\n`,F+="\t - BREADCRUMB_COOP_BATTLE_START incomplete? "+(k?"NO":"YES"),this.logger.logMessage(F)}return B}}class yi extends Xe{get Name(){return Ye.EnterPlayers}constructor(k,B,U,F,G){super(),this.playerTeam=null,this.battleUIFactory=null,this.breadcrumbService=null,this.localization=null,this.logger=null,this.playerTeam=k,this.battleUIFactory=U,this.breadcrumbService=B,this.localization=F,this.logger=G}enter(){let k=this.battleUIFactory.showFloatingBanner(this.localization.getText("COMBAT_TITAN_BATTLE")).findComponent(G.bE_).getInjectedValue("Animations");Array.isArray(k)||(k=[k]);const B=[],U=this.playerTeam.Members;for(let G=0;G3e3){this.lastLogTime=k;let B=`OpenQuestionInterfaceDecision\nTransition to ${this.NextState}? ${this.questionOpened?"YES":"NO"}\n`;B+=`\t - Interface is open? ${this.questionOpened?"YES":"NO"}\n`,this.logger.logMessage(B)}return this.questionOpened}markQuestionOpened(){this.questionOpened=!0}handleEasyMode(){0}destroy(){this.questionInterface.OnQuestionOpened.remove(this.markQuestionOpened,this)}}class Ei extends Je{get NextState(){return Ye.PlayActionQueue}constructor(k,B){super(),this.battleActionQueue=null,this.logger=null,this.lastLogTime=Date.now(),this.battleActionQueue=k,this.logger=B}shouldTransition(){const k=this.battleActionQueue.hasQueuedActions(),B=Date.now();if(k||B-this.lastLogTime>3e3){this.lastLogTime=B;let U=`PlayActionQueueDecision\nTransition to ${this.NextState}? ${k?"YES":"NO"}\n`;U+=`\t - Actions are queued? ${k?"YES":"NO"}\n`,this.logger.logMessage(U)}return k}}class wi extends Xe{get Name(){return Ye.InBattle}constructor(k,B,U,F){super(),this.logger=null,this.logger=F,this.Decisions=[new Ei(B,F),new _i(k,F)]}enter(){this.logger.logMessage("InBattleState#enter - Entering the battle state")}exit(){}}class Ti extends Je{get NextState(){return Ye.EnterPlayers}constructor(k,B,U,F,G){super(),this.playersLoaded=!1,this.logger=null,this.lastLogTime=Date.now(),this.currentPlayer=null,this.hostID=null,this.socket=null,this.logger=B,k.then((k=>(this.playersLoaded=!0,k))),this.hostID=U,this.currentPlayer=F,this.socket=G}shouldTransition(){const k=Date.now(),B=this.currentPlayer.getUserID()===this.hostID,U=this.socket.playerList.indexOf(this.hostID)>-1,F=(B||U)&&this.playersLoaded;if(F||k-this.lastLogTime>3e3){this.lastLogTime=k;let G=`PlayersHaveLoadedDecision\nTransition to ${this.NextState}? ${F?"YES":"NO"}\n`;G+=`\t - Players have loaded? ${this.playersLoaded?"YES":"NO"}\n`,G+=`\t - Player is host? ${B?"YES":"NO"}\n`,G+=`\t - Host in room? ${U?"YES":"NO"}\n`,this.logger.logMessage(G)}return F}}class Si extends Je{get NextState(){return Ye.WaitForHost}constructor(k,B,U,F,G){super(),this.playersLoaded=!1,this.logger=null,this.lastLogTime=Date.now(),this.currentPlayer=null,this.hostID=null,this.socket=null,this.logger=B,k.then((k=>(this.playersLoaded=!0,k))),this.hostID=U,this.currentPlayer=F,this.socket=G}shouldTransition(){const k=Date.now(),B=this.currentPlayer.getUserID()!==this.hostID,U=-1===this.socket.playerList.indexOf(this.hostID),F=B&&U&&this.playersLoaded;if(F||k-this.lastLogTime>3e3){this.lastLogTime=k;let G=`PlayersHaveLoadedDecision\nTransition to ${this.NextState}? ${F?"YES":"NO"}\n`;G+=`\t - Players have loaded? ${this.playersLoaded?"YES":"NO"}\n`,G+=`\t - Host is not in the room? ${U?"YES":"NO"}\n`,G+=`\t - Player is host? ${B?"YES":"NO"}\n`,this.logger.logMessage(G)}return F}}class Ai extends Xe{get Name(){return Ye.LoadingPlayers}constructor(k,B,U,F,G,j){super(),this.teamInitializer=null,this.currentPlayer=null,this.teammateData=null,this.logger=null,this.hostID=null,this.socket=null,this.teamInitializer=k,this.currentPlayer=B,this.teammateData=U,this.logger=F,this.hostID=G,this.socket=j}enter(){const k=this.teamInitializer.createCoOpTeam(this.currentPlayer,this.teammateData);this.Decisions=[new Ti(k,this.logger,this.hostID,this.currentPlayer,this.socket),new Si(k,this.logger,this.hostID,this.currentPlayer,this.socket)],this.logger.logMessage(`LoadingPlayerState#enter - Loading data for ${this.teammateData.length+1} player(s)`)}exit(){}}var Ci=U(77078);class Oi extends Je{get NextState(){return Ye.WaitForAction}constructor(k,B){super(),this.questionAnswered=!1,this.logger=null,this.lastLogTime=Date.now(),k.OnQuestionAnswered.addOnce((()=>{this.questionAnswered=!0})),this.logger=B}shouldTransition(){const k=Date.now();if(this.questionAnswered||k-this.lastLogTime>3e3){this.lastLogTime=k;let B=`QuestionAnsweredDecision\nTransition to ${this.NextState}? ${this.questionAnswered?"YES":"NO"}\n`;B+=`\t - Question has been answered? ${this.questionAnswered?"YES":"NO"}\n`,this.logger.logMessage(B)}return this.questionAnswered}}class Ii extends Xe{get Name(){return Ye.NootBattleTutorial}constructor(k,B,U,F,G,j,$,H){super(),this.breadcrumbService=null,this.battleLayer=null,this.game=null,this.tutorialHand=null,this.tutorialHandTween=null,this.dialogueFactory=null,this.logger=null,this.healthBars=[],this.crystalSpine=null,this.breadcrumbService=B,this.battleLayer=U,this.game=k,this.dialogueFactory=F,this.logger=H,this.healthBars=G,this.crystalSpine=j,this.Decisions=[new Oi($,H)]}enter(){this.tutorialHand=new G._mx(this.battleLayer),this.tutorialHand.addComponent(G.K16).group.position.set(550,320),this.tutorialHand.name="TutorialHand";const k=this.tutorialHand.addComponent(gt._);k.setAsset(Ct._.General_icons_json,"help"),k.setAnchor(.5,.5),this.tutorialHandTween=this.game.add.tween(this.tutorialHand.legacyTransform.group,this).to({y:"-=30"},400,G.GS3.Quadratic.InOut,!0,0,-1,!0),this.dialogueFactory.playDialogue("noot",[275,276,277]).then((()=>{this.nootDialogueCompleted()})),this.logger.logMessage("NootTutorialState#enter - Showing co-op titan tutorial dialogue")}exit(){this.tutorialHandTween.destroy(),this.tutorialHand.destroy(),this.breadcrumbService.completeBreadcrumb(vi.B.FEATURE_COOP_BATTLE,vi.B.BREADCRUMB_COOP_BATTLE_START),this.logger.logMessage("NootTutorialState#exit - Completing the BREADCRUMB_COOP_BATTLE_START")}nootDialogueCompleted(){for(let k=0;k{this.allActionsPlayed=!0}))}shouldTransition(){let k=!1;for(let j=0;j3e3){this.lastLogTime=G;let j=`ActionQueueToBannerDecision\nTransition to ${this.NextState}? ${F?"YES":"NO"}\n`;j+=`\t - Any team defeated? ${k?"YES":"NO"}\n`,j+="\t - Action queue is playing? "+(U?"YES":"NO"),j+="\t - Action queue finished playing? "+(B?"NO":"YES"),this.logger.logMessage(j)}return F}}class Ri extends Je{get NextState(){return Ye.InBattle}constructor(k,B,U){super(),this.actionQueue=null,this.battleTeams=null,this.logger=null,this.lastLogTime=Date.now(),this.allActionsPlayed=!1,this.actionQueue=k,this.battleTeams=B,this.logger=U,this.actionQueue.OnQueueComplete.addOnce((()=>{this.allActionsPlayed=!0}))}shouldTransition(){let k=!1;for(let j=0;j3e3){this.lastLogTime=G;let j=`ActionQueueToBannerDecision\nTransition to ${this.NextState}? ${F?"YES":"NO"}\n`;j+=`\t - Any team defeated? ${k?"YES":"NO"}\n`,j+="\t - Action queue is playing? "+(U?"YES":"NO"),j+="\t - Action queue finished playing? "+(B?"NO":"YES"),this.logger.logMessage(j)}return F}}class Pi extends Xe{get Name(){return Ye.PlayActionQueue}constructor(k,B,U){super(),this.battleActionQueue=null,this.logger=null,this.Decisions=[new Ri(k,B,U),new Di(k,B,U)],this.battleActionQueue=k,this.logger=U}enter(){this.battleActionQueue.playAllActions(),this.logger.logMessage(`PlayingActionQueueState#enter - Playing ${this.battleActionQueue.Actions.length} queued actions`)}exit(){}}class Mi extends Je{get NextState(){return Ye.SummaryOpen}constructor(k,B){super(),this.animationCompleted=!1,this.logger=null,this.lastLogTime=Date.now(),this.logger=B;new wt(k).OnComplete.addOnce((()=>{this.animationCompleted=!0}))}shouldTransition(){const k=Date.now();if(this.animationCompleted||k-this.lastLogTime>3e3){this.lastLogTime=k;let B=`GoToSummaryScreenDecision\nTransition to ${this.NextState}? ${this.animationCompleted?"YES":"NO"}\n`;B+=`\t - Animations complete? ${this.animationCompleted?"YES":"NO"}\n`,this.logger.logMessage(B)}return this.animationCompleted}}class Ni extends Xe{get Name(){return Ye.ShowEndGameBanner}constructor(k,B,U,F,G){super(),this.battleUIFactory=null,this.playerWon=!1,this.localization=null,this.healthBars=null,this.logger=null,this.playerWon=U,this.battleUIFactory=k,this.localization=B,this.healthBars=F,this.logger=G}enter(){let k="";k=this.playerWon?this.localization.getText("COMBAT_TITAN_HIT"):this.localization.getText("COMBAT_LOST");let B=this.battleUIFactory.showFloatingBanner(k).findComponent(G.bE_).getInjectedValue("Animations");Array.isArray(B)||(B=[B]),B=B.slice();for(let U=0;U-1}}class ki extends Xe{get Name(){return Ye.WaitForHost}constructor(k,B,U){super(),this.spinner=null,this.battleLayer=null,this.battleLayer=k,this.Decisions=[new Li(B,U)]}enter(){this.spinner=new G._mx(this.battleLayer),this.spinner.addComponent(G.K16).group.position.set(250,420),this.spinner.name="LoadingSpinner";const k=this.spinner.addComponent(gt._);k.setAnchor(.5,.5),k.setAsset(Ct._.General_core_json,"loading"),V.q.instance.game.add.tween(this.spinner.legacyTransform.group,this.spinner).to({angle:360},2e3,G.GS3.Linear.None,!0,0,-1)}exit(){this.spinner&&(V.q.instance.game.tweens.removeAllFromOwner(this.spinner),this.spinner.destroy(),this.spinner=null)}}class Bi extends Ze{constructor(){super(...arguments),this.battleLayer=null}get InitialState(){return Ye.LoadingPlayers}get BattleLayer(){return this.battleLayer}set BattleLayer(k){this.battleLayer=k}createState(k){switch(k){case Ye.LoadingPlayers:return this.createLoadingPlayersState();case Ye.WaitForHost:return this.createWaitForHostState();case Ye.EnterPlayers:return this.createEnterPlayersState();case Ye.NootBattleTutorial:return this.createNootTutorialState();case Ye.EnterHealthBars:return this.createEnterHealthBarsState();case Ye.InBattle:return this.createInBattleState();case Ye.AnsweringQuestion:return this.createAnswerQuestionState();case Ye.WaitForAction:return this.createWaitForActionState();case Ye.PlayActionQueue:return this.createPlayActionQueueState();case Ye.ShowEndGameBanner:return this.createEndGameBannerState();case Ye.SummaryOpen:return this.createSummaryOpenState();default:return null}}createLoadingPlayersState(k,B,U,F,G,j,$){return new Ai(B,U,F,G,$,j)}createWaitForHostState(k,B){return new ki(this.battleLayer,k,B)}createEnterPlayersState(k,B,U,F,G){return new yi(j.find(k,(k=>0===k.ID)),B,F,U,G)}createNootTutorialState(k,B,U,F,G,$){const H=j.find(G,(k=>0===k.ID)).ActiveMember.GameObject.findComponent(Qe.j);return new Ii(V.q.instance.game,k,this.battleLayer,B,F,H,U,$)}createInBattleState(k,B,U,F){return new wi(k,B,U,F)}createAnswerQuestionState(k,B){return new ei(k,B)}createWaitForActionState(k,B){return new xi(k,B)}createPlayActionQueueState(k,B,U){return new Pi(k,B,U)}createEndGameBannerState(k,B,U,F,G){const $=j.find(B,(k=>1===k.ID));return new Ni(k,U,$.IsDefeated(),F,G)}createSummaryOpenState(k,B,U,F,G,$,H){const W=j.find(F,(k=>1===k.ID));return new fi(V.q.instance.game,k,B,U,W.IsDefeated(),G,$,H)}createEnterHealthBarsState(k,B){return new pi(k,B)}}(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("Teams")),(0,F.Qj)(1,(0,G.vQZ)("CoOpTeamInitializer")),(0,F.Qj)(2,(0,G.vQZ)("CurrentPlayer")),(0,F.Qj)(3,(0,G.vQZ)("CoOpTeammateData")),(0,F.Qj)(4,(0,G.vQZ)("CoOpLogging")),(0,F.Qj)(5,(0,G.vQZ)("c5f-aceb")),(0,F.Qj)(6,(0,G.vQZ)("HostID")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Array,Object,Object,Array,de.h,Object,Number]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createLoadingPlayersState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("c5f-aceb")),(0,F.Qj)(1,(0,G.vQZ)("HostID")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Object,Number]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createWaitForHostState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("Teams")),(0,F.Qj)(1,(0,G.vQZ)("BreadcrumbService")),(0,F.Qj)(2,(0,G.vQZ)("Localization")),(0,F.Qj)(3,(0,G.vQZ)("BattleUIFactory")),(0,F.Qj)(4,(0,G.vQZ)("CoOpLogging")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Array,Object,G.dTp,Object,de.h]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createEnterPlayersState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("BreadcrumbService")),(0,F.Qj)(1,(0,G.vQZ)("DialogueFactory")),(0,F.Qj)(2,(0,G.vQZ)("QuestionInterface")),(0,F.Qj)(3,(0,G.vQZ)("ActiveHealthBars")),(0,F.Qj)(4,(0,G.vQZ)("Teams")),(0,F.Qj)(5,(0,G.vQZ)("CoOpLogging")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Object,Object,Object,Array,Array,de.h]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createNootTutorialState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("QuestionInterface")),(0,F.Qj)(1,(0,G.vQZ)("BattleActionQueue")),(0,F.Qj)(2,(0,G.vQZ)("Teams")),(0,F.Qj)(3,(0,G.vQZ)("CoOpLogging")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Object,Qt,Array,de.h]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createInBattleState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("QuestionInterface")),(0,F.Qj)(1,(0,G.vQZ)("CoOpLogging")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Object,de.h]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createAnswerQuestionState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("BattleActionQueue")),(0,F.Qj)(1,(0,G.vQZ)("CoOpLogging")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Qt,de.h]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createWaitForActionState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("BattleActionQueue")),(0,F.Qj)(1,(0,G.vQZ)("Teams")),(0,F.Qj)(2,(0,G.vQZ)("CoOpLogging")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Qt,Array,de.h]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createPlayActionQueueState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("BattleUIFactory")),(0,F.Qj)(1,(0,G.vQZ)("Teams")),(0,F.Qj)(2,(0,G.vQZ)("Localization")),(0,F.Qj)(3,(0,G.vQZ)("ActiveHealthBars")),(0,F.Qj)(4,(0,G.vQZ)("CoOpLogging")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Object,Array,G.dTp,Array,de.h]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createEndGameBannerState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("MenuLayer")),(0,F.Qj)(1,(0,G.vQZ)("CurrentPlayer")),(0,F.Qj)(2,(0,G.vQZ)("CombatBounty")),(0,F.Qj)(3,(0,G.vQZ)("Teams")),(0,F.Qj)(4,(0,G.vQZ)("AudioPlayer")),(0,F.Qj)(5,(0,G.vQZ)("TitanInfo")),(0,F.Qj)(6,(0,G.vQZ)("CoOpLogging")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[G._mx,Object,Object,Array,Object,Object,de.h]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createSummaryOpenState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("ActiveHealthBars")),(0,F.Qj)(1,(0,G.vQZ)("CoOpLogging")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Array,de.h]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createEnterHealthBarsState",null);var Ui=U(34574);class Fi extends G.JTX{constructor(){super(...arguments),this.coOpTeam=new Ui.d,this.hostDisbanded=!1}getTeam(){return this.coOpTeam}getTeamStreak(){return this.teamStreak}hasDisbanded(){return this.hostDisbanded}isHost(){return!1}create(){super.create(),this.socket.onMessage.add(this.messageReceived,this)}destroy(){this.socket.onMessage.remove(this.messageReceived,this),super.destroy()}leaveTeam(){const k={action:le.x.PlayerLeftTeam,target:this.hostID};this.socket.broadcastMessage(k)}rejoinTeam(){const k={action:le.x.PlayerRejoinTeam,target:this.hostID};this.socket.broadcastMessage(k),null!==this.coOpTeam&&this.coOpTeam.readyUpPlayer(this.currentPlayer.getUserID())}messageReceived(k){k.action===le.x.TeamDisbanded?(this.coOpTeam.destroy(),this.coOpTeam=null,this.hostDisbanded=!0):k.action===le.x.TeamUpdated&&(this.coOpTeam.TeamMembers=k.data.teamMembers.slice(),this.coOpTeam.ReadyMembers=k.data.readyMembers.slice())}}(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],Fi.prototype,"socket",void 0),(0,F.Cg)([(0,G.fFd)("CurrentPlayer"),(0,F.Sn)("design:type",Object)],Fi.prototype,"currentPlayer",void 0),(0,F.Cg)([(0,G.fFd)("HostID"),(0,F.Sn)("design:type",Number)],Fi.prototype,"hostID",void 0),(0,F.Cg)([(0,G.fFd)("TeamStreak"),(0,F.Sn)("design:type",Number)],Fi.prototype,"teamStreak",void 0);class Gi extends ce.${constructor(){super(...arguments),this.endDelay=800}get EndDelay(){return this.endDelay}set EndDelay(k){this.endDelay=k}receivedMessage(k){k.action===le.x.TitanDefeated?(this.coOpSocketLogger.logMessage("Received the titan defeat message. Battle should resolve with the players being victorious."),this.actionQueue.addAction(new re(this.battleTeams,this.spellFactory,V.q.instance.game.time.events,this.audioPlayer,this.uiFactory))):k.action===le.x.PlayersDefeated&&(this.coOpSocketLogger.logMessage("Received the player defeat message. Battle should resolve with the players being defeated."),this.actionQueue.addAction(new ne(this.battleTeams,this.spellFactory,V.q.instance.game.time.events,this.endDelay,this.audioPlayer)))}}(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],Gi.prototype,"battleTeams",void 0),(0,F.Cg)([(0,G.fFd)("BattleActionQueue"),(0,F.Sn)("design:type",Qt)],Gi.prototype,"actionQueue",void 0),(0,F.Cg)([(0,G.fFd)("SpellFactory"),(0,F.Sn)("design:type",Object)],Gi.prototype,"spellFactory",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],Gi.prototype,"audioPlayer",void 0),(0,F.Cg)([(0,G.fFd)("BattleUIFactory"),(0,F.Sn)("design:type",Object)],Gi.prototype,"uiFactory",void 0),(0,F.Cg)([(0,G.fFd)("CoOpSocketLogging"),(0,F.Sn)("design:type",de.h)],Gi.prototype,"coOpSocketLogger",void 0);class ji extends G.JTX{constructor(){super(...arguments),this.titanHP=null,this.titanDamage=0,this.crystalHP=null,this.crystalDamage=0}create(){super.create(),this.socket.onMessage.add(this.handleMessage,this),this.questionInterface.OnQuestionOpened.add(this.questionOpened,this),this.stateMachine.OnStateChange.add(this.stateChanged,this)}destroy(){this.socket.onMessage.remove(this.handleMessage,this),this.questionInterface.OnQuestionOpened.remove(this.questionOpened,this),this.stateMachine.OnStateChange.remove(this.stateChanged,this),super.destroy()}handleMessage(k){switch(k.action){case le.x.SyncHealth:{const B=j.find(this.battleTeams,(k=>0===k.ID)),U=j.find(this.battleTeams,(k=>1===k.ID));if(k.data.titanHP!==U.ActiveMember.Health.CurrentValue&&(this.titanHP=k.data.titanHP),k.data.crystalHP!==B.ActiveMember.Health.CurrentValue&&(this.crystalHP=k.data.crystalHP),this.coOpSocketLogger.logMessage(`Received HP sync message.\n \n\tTitan value should be ${k.data.titanHP}. Titan value is ${U.ActiveMember.Health.CurrentValue}. HP will sync? ${null===this.titanHP?"NO":"YES"}\n \n\tCrystal value should be ${k.data.crystalHP}. Crystal value is ${B.ActiveMember.Health.CurrentValue}. HP will sync? ${null===this.crystalHP?"NO":"YES"}\n `),null===this.crystalHP&&null===this.titanHP)return void this.destroy();this.questionInterface.isOpen()&&(this.coOpSocketLogger.logMessage("Received sync message with question open. Will adjust immediately."),this.questionOpened());break}case le.x.PlayerAttacked:this.titanDamage+=k.data.damage,this.coOpSocketLogger.logMessage(`Player attacked message received. Pending titan damage is now ${this.titanDamage}`);break;case le.x.TitanAttacked:this.crystalDamage+=k.data.damage,this.coOpSocketLogger.logMessage(`Titan attacked message received. Pending crystal damage is now ${this.crystalDamage}`)}}stateChanged(){this.stateMachine.CurrentState===Ye.PlayActionQueue&&(null!==this.crystalHP&&(this.crystalHP-=this.crystalDamage,this.coOpSocketLogger.logMessage(`Action queue is being played. Applying ${this.crystalDamage} pending crystal damage to sync HP. New value is ${this.crystalHP}`)),null!==this.titanHP&&(this.titanHP-=this.titanDamage,this.coOpSocketLogger.logMessage(`Action queue is being played. Applying ${this.titanDamage} pending titan damage to sync HP. New value is ${this.titanHP}`)),this.titanDamage=0,this.crystalDamage=0)}questionOpened(){null!==this.titanHP&&(this.coOpSocketLogger.logMessage(`Applying HP sync to titan. Sync HP is ${this.titanHP}. Pending damage is ${this.titanDamage}. Will fix HP to new value ${this.titanHP-this.titanDamage}`),this.updateCurrentHealth(1,this.titanHP-this.titanDamage),this.titanHP=null),null!==this.crystalHP&&(this.coOpSocketLogger.logMessage(`Applying HP sync to crystal. Sync HP is ${this.crystalHP}. Pending damage is ${this.crystalDamage}. Will fix HP to new value ${this.crystalHP-this.crystalDamage}`),this.updateCurrentHealth(0,this.crystalHP-this.crystalDamage),this.crystalHP=null),this.destroy()}updateCurrentHealth(k,B){const U=j.find(this.battleTeams,(B=>B.ID===k)).ActiveMember.Health;U.CurrentValue!==B&&(U.CurrentValue=B)}}(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],ji.prototype,"socket",void 0),(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],ji.prototype,"battleTeams",void 0),(0,F.Cg)([(0,G.fFd)("QuestionInterface"),(0,F.Sn)("design:type",Object)],ji.prototype,"questionInterface",void 0),(0,F.Cg)([(0,G.fFd)("BattleStateMachine"),(0,F.Sn)("design:type",Bi)],ji.prototype,"stateMachine",void 0),(0,F.Cg)([(0,G.fFd)("CoOpSocketLogging"),(0,F.Sn)("design:type",de.h)],ji.prototype,"coOpSocketLogger",void 0);class $i extends G.JTX{create(){super.create(),this.questionInterface.OnQuestionAnswered.add(this.questionWasAnswered,this)}destroy(){this.questionInterface.OnQuestionAnswered.remove(this.questionWasAnswered,this),super.destroy()}questionWasAnswered(k){const B={action:le.x.QuestionAnswered,target:this.hostID,data:{sourcePlayerID:this.currentPlayer.getUserID(),correct:k}};this.socket.sendMessage(B)}}(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],$i.prototype,"socket",void 0),(0,F.Cg)([(0,G.fFd)("CurrentPlayer"),(0,F.Sn)("design:type",Object)],$i.prototype,"currentPlayer",void 0),(0,F.Cg)([(0,G.fFd)("HostID"),(0,F.Sn)("design:type",Number)],$i.prototype,"hostID",void 0),(0,F.Cg)([(0,G.fFd)("QuestionInterface"),(0,F.Sn)("design:type",Object)],$i.prototype,"questionInterface",void 0);var Hi=U(95066),Vi=U(36525),Wi=U(65443);class qi extends G.JTX{constructor(){super(...arguments),this.heartbeatExpiryTime=null,this.hostDisconnected=!1,this.hasReceivedHeartbeat=!1}create(){super.create(),this.socketService.onPlayerDisconnect.add(this.playerDisconnected,this),this.socketService.onMessage.add(this.socketMessageReceived,this),this.heartbeatExpiryTime=Date.now()+this.hostDisconnectTimer}update(){if(super.update(),Date.now()>this.heartbeatExpiryTime&&null!==this.heartbeatExpiryTime&&this.canShowDialogue()){const k=new Vi.i;k.setKey("prodigy_game.coOp.hostHeartbeatTimeout"),k.setValue(1),this.dataDogLogger.logStat(k,Hi.d.Increment),this.showHostDisconnectMessage()}}destroy(){this.socketService.onPlayerDisconnect.remove(this.playerDisconnected,this),this.socketService.onMessage.remove(this.socketMessageReceived,this),super.destroy()}playerDisconnected(k){k===this.hostID&&this.hasReceivedHeartbeat&&this.canShowDialogue()&&this.showHostDisconnectMessage()}socketMessageReceived(k){k.action===le.x.HostHeartbeat&&null!==this.hostDisconnectTimer&&(this.heartbeatExpiryTime=Date.now()+this.hostDisconnectTimer,this.hasReceivedHeartbeat=!0)}showHostDisconnectMessage(){this.hostDisconnected=!0,this.socketService.leaveRoom();const k=this.menuFactory.showMessage("HOST_DISCONNECTED_MESSAGE","","BUTTON_OKAY_CAPITAL");k.OnClose.addOnce((()=>{V.q.instance.prodigy.world.it(this.afterBattleMap)})),k.open(),V.q.instance.prodigy.gameContainer.get("c47-20b6").battle.sendCoopTeamHostLeftEvent(Wi.$.Titan,this.hostID)}canShowDialogue(){return!this.hostDisconnected&&null!==this.teamInfo&&!(this.teamInfo.isPlayerTeamDefeated()||this.teamInfo.isTitanTeamDefeated())}}(0,F.Cg)([(0,G.fFd)("ClientHeartbeatDisconnectTime"),(0,F.Sn)("design:type",Number)],qi.prototype,"hostDisconnectTimer",void 0),(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],qi.prototype,"socketService",void 0),(0,F.Cg)([(0,G.fFd)("HostID"),(0,F.Sn)("design:type",Number)],qi.prototype,"hostID",void 0),(0,F.Cg)([(0,G.fFd)("d30-0043"),(0,F.Sn)("design:type",Object)],qi.prototype,"menuFactory",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamInfo"),(0,F.Sn)("design:type",oe)],qi.prototype,"teamInfo",void 0),(0,F.Cg)([(0,G.fFd)("AfterBattleDestination"),(0,F.Sn)("design:type",String)],qi.prototype,"afterBattleMap",void 0),(0,F.Cg)([(0,G.fFd)("DataDogLogger"),(0,F.Sn)("design:type",Object)],qi.prototype,"dataDogLogger",void 0);class Ki extends G.JTX{constructor(){super(...arguments),this.onComplete=new G.HN0,this.hasCrystalShattered=!1,this.shatterSkinningDelay=0}get OnComplete(){return this.onComplete}get ShatterSkinningDelay(){return this.shatterSkinningDelay}set ShatterSkinningDelay(k){this.shatterSkinningDelay=k}play(){this.animator.OnAnimationComplete.addOnce((()=>{this.hasCrystalShattered=!0,this.onComplete.dispatch()})),V.q.instance.game.time.events.addTimer(this.shatterSkinningDelay,(()=>{this.animator.applySkin("finalbreak")}),this),this.animator.playAnimation("final_break",!1)}hasFinishedPlaying(){return this.hasCrystalShattered}destroy(){this.onComplete.dispose(),super.destroy()}}(0,F.Cg)([(0,G.fFd)("Animators"),(0,F.Sn)("design:type",Qe.j)],Ki.prototype,"animator",void 0);class zi extends G.uAl{constructor(){super(...arguments),this.animationPlayed=!1,this.onComplete=new G.HN0}get OnComplete(){return this.onComplete}create(){super.create()}play(){this.animationPlayed=!0,this.onComplete.dispatch()}hasFinishedPlaying(){return this.animationPlayed}destroy(){this.onComplete.dispose(),super.destroy()}}class Yi extends G.JTX{constructor(){super(...arguments),this.crystalInput=null}create(){super.create(),this.crystalInput=this.GameObject.findComponent(Ci.p),this.battleStateMachine.OnStateChange.add(this.battleStateChanged,this),this.crystalInput.onClicked.add(this.crystalClicked,this)}destroy(){this.battleStateMachine.OnStateChange.remove(this.battleStateChanged,this),this.crystalInput.onClicked.remove(this.crystalClicked,this),super.destroy()}battleStateChanged(){this.crystalInput.InputEnabled=this.battleStateMachine.CurrentState===Ye.InBattle,this.battleStateMachine.CurrentState!==Ye.InBattle&&this.battleStateMachine.CurrentState!==Ye.PlayActionQueue&&this.battleStateMachine.CurrentState!==Ye.AnsweringQuestion||(0,ot.sR)(this.animators,this.crystalInput.InputEnabled?"idle_sparkle":"idle",!0)}crystalClicked(){this.audioPlayer.playSoundEffectClip(18,"pop"),this.questionInterface.open({revampBattleOverride:!1})}}(0,F.Cg)([(0,G.fFd)("BattleStateMachine"),(0,F.Sn)("design:type",Ze)],Yi.prototype,"battleStateMachine",void 0),(0,F.Cg)([(0,G.fFd)("QuestionInterface"),(0,F.Sn)("design:type",Object)],Yi.prototype,"questionInterface",void 0),(0,F.Cg)([(0,G.fFd)("Animators"),(0,F.Sn)("design:type",Array)],Yi.prototype,"animators",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],Yi.prototype,"audioPlayer",void 0);class Qi extends G.uAl{constructor(){super(...arguments),this.onComplete=new G.HN0,this.glowDuration=0,this.spineAnimator=null,this.glowDurationElapsed=!1}get OnComplete(){return this.onComplete}get GlowDuration(){return this.glowDuration}set GlowDuration(k){this.glowDuration=k}get SpineAnimator(){return this.spineAnimator}set SpineAnimator(k){this.spineAnimator=k}play(){this.spineAnimator.applySkin("glow"),V.q.instance.game.time.events.addTimer(this.glowDuration,(()=>{this.onComplete.dispatch(),this.glowDurationElapsed=!0}),this)}hasFinishedPlaying(){return this.glowDurationElapsed}destroy(){this.onComplete.dispose(),super.destroy()}}class Xi extends G.JTX{constructor(){super(...arguments),this.onComplete=new G.HN0,this.spineAnimator=null,this.wasPlayed=!1}get OnComplete(){return this.onComplete}get SpineAnimator(){return this.spineAnimator}set SpineAnimator(k){this.spineAnimator=k}play(){this.spineAnimator.applySkin("crystal"),this.spineAnimator.OnAnimationComplete.addOnce((()=>{this.onComplete.dispatch(),this.wasPlayed=!0})),this.spineAnimator.playAnimation("idle",!0)}hasFinishedPlaying(){return this.wasPlayed}destroy(){this.onComplete.dispose(),super.destroy()}}class Zi extends G.JTX{constructor(){super(...arguments),this.localizationKey="",this.onChange=new G.HN0}get LocalizationKey(){return this.localizationKey}set LocalizationKey(k){this.localizationKey=k,this.onChange.dispatch()}get OnChanged(){return this.onChange}getName(){return this.localizer.getText(this.localizationKey)}destroy(){this.onChange.dispose(),super.destroy()}}(0,F.Cg)([(0,G.fFd)("Localization"),(0,F.Sn)("design:type",G.dTp)],Zi.prototype,"localizer",void 0);var Ji=U(28402),ts=U(56942);class es extends G.uAl{constructor(){super(...arguments),this.segmentedBar=null,this.fillMask=null,this.changeSpeed=0,this.onChangeComplete=new G.HN0,this.previousHealth=null}get SegmentedBar(){return this.segmentedBar}set SegmentedBar(k){this.segmentedBar=k}get FillMask(){return this.fillMask}set FillMask(k){this.fillMask=k}get HealthChangeSpeed(){return this.changeSpeed}set HealthChangeSpeed(k){this.changeSpeed=k}get OnHealthChangeComplete(){return this.onChangeComplete}setMaxHealth(k){this.segmentedBar.Segments=k}setCurrentHealth(k){if(null===this.previousHealth)this.fillMask.setFillPercent(k/this.segmentedBar.Segments),this.OnHealthChangeComplete.dispatch();else{const B=k/this.segmentedBar.Segments,U={percent:this.previousHealth/this.segmentedBar.Segments};V.q.instance.game.add.tween(U,this).to({percent:B},this.changeSpeed,G.GS3.Quadratic.Out,!0).onUpdateCallback((()=>{this.fillMask.setFillPercent(U.percent)})).onTweenComplete.addOnce((()=>{this.fillMask.setFillPercent(B),this.OnHealthChangeComplete.dispatch()}))}this.previousHealth=k}destroy(){this.onChangeComplete.dispose(),super.destroy()}}var is=U(50873),ss=U(18280),ns=U(47332),as=U(9976);class rs{constructor(){}static create(k,B,U){const F=new G._mx(k);F.addComponent(G.K16),F.name="HealthBar",F.addComponent(G.bE_);const j=new G._mx(F);j.addComponent(G.K16),j.legacyTransform.y=j.legacyTransform.y+2,j.name="Background";const $=j.addComponent(Ke);$.Size=400,$.setAsset(Ct._.Ui_bam_json,"scroll-tracks/scroll-hpbar-middle",null,"scroll-tracks/scroll-hpbar-right");const H=new G._mx(F);H.addComponent(G.K16),H.name="Health";const V=H.addComponent(ze);V.GapSize=1,V.Atlas=Ct._.Ui_bam_json,V.BarStartCapFrame="scroll-tracks/scroll-hpbar-fill-end-left",V.BarEndCapFrame="scroll-tracks/scroll-hpbar-fill-right",V.SegmentStartFrame="scroll-tracks/scroll-hpbar-fill-trim-left",V.SegmentEndFrame="scroll-tracks/scroll-hpbar-fill-trim-right",V.FillFrame="scroll-tracks/scroll-hpbar-fill-middle",V.BarSize=400;const W=new G._mx(H);W.addComponent(G.K16),W.name="Mask";const q=W.addComponent(ss.n),z=W.addComponent(is.k);z.Width=400,z.Height=47,V.applyMask(q);const Y=F.addComponent(es);Y.HealthChangeSpeed=700,Y.FillMask=z,Y.SegmentedBar=V;const Q=F.addComponent(G.Fid);Q.Identifier="HealthBar",Q.Components=[Y];const X=F.addComponent(Zi);X.LocalizationKey=B;const Z=F.addComponent(G.Fid);Z.Identifier="Name",Z.Components=[X];const J=new G._mx(F);J.addComponent(G.K16),J.name="ActiveMemberName",J.legacyTransform.y=-45,J.legacyTransform.x=U?-82:-77;const tt=J.addComponent(as.E);tt.TextConfig=K.t.getItem("fontStyle",16).data,tt.Alignment=ns.T.MiddleCenter;return F.addComponent(Vt).NameLabel=tt,F}}class os extends G.JTX{constructor(){super(...arguments),this.coOpTeam=new Ui.d,this.hostDisbanded=!1}getTeam(){return this.coOpTeam}getTeamStreak(){return this.teamStreak}hasDisbanded(){return this.hostDisbanded}isHost(){return!0}create(){super.create(),this.socket.onMessage.add(this.messageReceived,this),this.coOpTeam.OnTeamMemberLeft.add(this.broadcastTeamUpdate,this),this.coOpTeam.OnTeamMemberReady.add(this.broadcastTeamUpdate,this)}destroy(){this.socket.onMessage.remove(this.messageReceived,this),this.coOpTeam.destroy(),super.destroy()}leaveTeam(){const k={action:le.x.TeamDisbanded,data:{hostID:this.currentPlayer.getUserID()}};this.socket.broadcastMessage(k)}rejoinTeam(){var k;null===(k=this.coOpTeam)||void 0===k||k.readyUpPlayer(this.currentPlayer.getUserID())}messageReceived(k){switch(k.action){case le.x.PlayerLeftTeam:this.coOpTeam.removePlayer(k.data.userID);break;case le.x.PlayerRejoinTeam:this.coOpTeam.readyUpPlayer(k.data.userID)}}broadcastTeamUpdate(){const k={action:le.x.TeamUpdated,data:{hostID:this.coOpTeam.HostID,teamMembers:this.coOpTeam.TeamMembers,readyMembers:this.coOpTeam.ReadyMembers,streak:this.coOpTeam.Streak}};this.socket.broadcastMessage(k)}}(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],os.prototype,"socket",void 0),(0,F.Cg)([(0,G.fFd)("CurrentPlayer"),(0,F.Sn)("design:type",Object)],os.prototype,"currentPlayer",void 0),(0,F.Cg)([(0,G.fFd)("TeamStreak"),(0,F.Sn)("design:type",Number)],os.prototype,"teamStreak",void 0);class hs extends G.JTX{constructor(){super(...arguments),this.currentTimer=null}create(){super.create(),this.battleStateMachine.OnStateChange.add(this.battleStateChanged,this),this.currentTimer=window.setInterval((()=>{this.broadcastHeartbeat()}),this.heartbeatTime),this.logger.logMessage(`Host will send heartbeat every ${this.heartbeatTime/1e3} second(s)`)}destroy(){null!==this.currentTimer&&window.clearInterval(this.currentTimer),this.battleStateMachine.OnStateChange.remove(this.battleStateChanged,this),super.destroy()}broadcastHeartbeat(){this.socketService.broadcastMessage({action:le.x.HostHeartbeat})}battleStateChanged(){this.battleStateMachine.CurrentState===Ye.SummaryOpen&&this.destroy()}}(0,F.Cg)([(0,G.fFd)("HostHeartbeatTime"),(0,F.Sn)("design:type",Number)],hs.prototype,"heartbeatTime",void 0),(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],hs.prototype,"socketService",void 0),(0,F.Cg)([(0,G.fFd)("BattleStateMachine"),(0,F.Sn)("design:type",Ze)],hs.prototype,"battleStateMachine",void 0),(0,F.Cg)([(0,G.fFd)("CoOpLogging"),(0,F.Sn)("design:type",de.h)],hs.prototype,"logger",void 0);class cs extends G.JTX{create(){super.create(),this.socket.onPlayerJoined.add(this.playerJoined,this)}destroy(){this.socket.onPlayerJoined.remove(this.playerJoined,this),super.destroy()}playerJoined(k){const B=this.battleTeamInfo.getRemainingTitanHP(),U=this.battleTeamInfo.getRemainingPlayerHP();this.coOpSocketLogger.logMessage(`Sending HP sync to player ${k}. Titan: ${B}. Crystal: ${U}`);const F={action:le.x.SyncHealth,target:k,data:{titanHP:B,crystalHP:U}};this.socket.sendMessage(F)}}(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],cs.prototype,"socket",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamInfo"),(0,F.Sn)("design:type",oe)],cs.prototype,"battleTeamInfo",void 0),(0,F.Cg)([(0,G.fFd)("CoOpSocketLogging"),(0,F.Sn)("design:type",de.h)],cs.prototype,"coOpSocketLogger",void 0);class ds extends G.JTX{constructor(){super(...arguments),this.onComplete=new G.HN0,this.barrierAnimator=null,this.barrierSpark=null,this.animationPlayed=!1}get OnComplete(){return this.onComplete}get BarrierAnimator(){return this.barrierAnimator}set BarrierAnimator(k){this.barrierAnimator=k}get BarrierSpark(){return this.barrierSpark}set BarrierSpark(k){this.barrierSpark=k}play(){const k=[];k.push(new Promise((k=>{const B=this.barrierAnimator.GameObject.findComponent(gt._);B.setAlpha(1),this.barrierAnimator.OnAnimationComplete.addOnce((()=>{B.setAlpha(0),k()})),this.barrierAnimator.playAnimation("break",!1)}))),k.push(new Promise((k=>{const B=this.barrierSpark.GameObject.findComponent(gt._);B.setAlpha(1),this.barrierSpark.OnAnimationComplete.addOnce((()=>{B.setAlpha(0),k()})),this.barrierSpark.playAnimation("spark",!1)}))),Promise.all(k).then((()=>(0,F.sH)(this,void 0,void 0,(function*(){return(0,ot.ye)(this.animators,"knockout")})))).then((()=>(0,F.sH)(this,void 0,void 0,(function*(){this.animationPlayed=!0,this.onComplete.dispatch()})))).catch((()=>{G.VyI.log("TitanDefeatAnimationState - Warning: Could not play all animations",G.$bb.Warning)}))}hasFinishedPlaying(){return this.animationPlayed}destroy(){this.onComplete.dispose(),super.destroy()}}(0,F.Cg)([(0,G.fFd)("Animators"),(0,F.Sn)("design:type",Object)],ds.prototype,"animators",void 0);class ls extends G.JTX{constructor(){super(...arguments),this.onComplete=new G.HN0,this.titanBarrier=null,this.titanSpark=null,this.hasPlayed=!1}get OnComplete(){return this.onComplete}get TitanBarrier(){return this.titanBarrier}set TitanBarrier(k){this.titanBarrier=k}get TitanSpark(){return this.titanSpark}set TitanSpark(k){this.titanSpark=k}play(){const k=[];k.push(new Promise((k=>{const B=this.titanSpark.GameObject.findComponent(gt._);B.setAlpha(1),this.titanSpark.OnAnimationComplete.addOnce((()=>{B.setAlpha(0),k()})),this.titanSpark.playAnimation("spark",!1)}))),k.push(new Promise((k=>{const B=this.titanBarrier.GameObject.findComponent(gt._);B.setAlpha(1),this.titanBarrier.OnAnimationComplete.addOnce((()=>{B.setAlpha(0),k()})),this.titanBarrier.playAnimation("deflect",!1)}))),Promise.all(k).then((()=>{this.hasPlayed=!0,this.onComplete.dispatch()})).catch((()=>{G.VyI.log("TitanTakeDamageAnimationState - Warning: Could not play all animations",G.$bb.Warning)}))}hasFinishedPlaying(){return this.hasPlayed}destroy(){this.onComplete.dispose(),super.destroy()}}var us=U(94393);class fs extends G.JTX{constructor(){super(...arguments),this.teamID=null}get TeamID(){return this.teamID}set TeamID(k){null!==this.teamID&&j.find(this.battleTeams,(k=>k.ID===this.teamID)).OnDefeated.remove(this.titanTeamDefeated,this),this.teamID=k,j.find(this.battleTeams,(k=>k.ID===this.teamID)).OnDefeated.add(this.titanTeamDefeated,this)}destroy(){j.find(this.battleTeams,(k=>k.ID===this.teamID)).OnDefeated.add(this.titanTeamDefeated,this),super.destroy()}titanTeamDefeated(){const k=V.q.instance.prodigy.world.getCurrentZone(),B=V.q.instance.prodigy.gameContainer.get("12b-405a").getMultiplier(k,us.R.Xp),U=this.titanXP*B;this.combatBounty.addStars(U)}}(0,F.Cg)([(0,G.fFd)("CombatBounty"),(0,F.Sn)("design:type",Object)],fs.prototype,"combatBounty",void 0),(0,F.Cg)([(0,G.fFd)("TitanBountyXP"),(0,F.Sn)("design:type",Number)],fs.prototype,"titanXP",void 0),(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],fs.prototype,"battleTeams",void 0);class bs extends G.PQK{installBindings(){const k=new ct(this.Container);k.AnimationName="idle",k.LoopAnimation=!0,this.Container.bind("IdleAnimationState").toConstantValue(k);const B=new ct(this.Container);B.AnimationName="attack",B.LoopAnimation=!1,this.Container.bind("AttackAnimationState").toConstantValue(B),this.Container.bind("CastPoint").toConstantValue({x:-100,y:100}),this.Container.bind("ImpactSize").toConstantValue({x:157.5,y:430}),this.Container.bind("ImpactOffset").toConstantValue({x:-175,y:0})}}var ps=U(38042);let vs=class extends G.JTX{constructor(){super(...arguments),this.hideDelay=0}get HideDelay(){return this.hideDelay}set HideDelay(k){this.hideDelay=k}create(){super.create(),this.questionInterface?(this.questionInterface.OnQuestionOpened.add(this.hideGameObject,this),this.questionInterface.OnQuestionAnswered.add(this.showGameObject,this,0,!0)):G.VyI.log("HideWhenQuestionOpen#questionInterface was nullish",G.$bb.Warning)}destroy(){this.questionInterface&&(this.questionInterface.OnQuestionOpened.remove(this.hideGameObject,this),this.questionInterface.OnQuestionAnswered.remove(this.showGameObject,this)),super.destroy()}setVisibility(k){this.GameObject.active=k}hideGameObject(){this.hideDelay>0?V.q.instance.game.time.events.addTimer(this.hideDelay,this.setVisibility,this,!1):this.setVisibility(!1)}showGameObject(){this.setVisibility(!0)}};(0,F.Cg)([(0,G.fFd)("976-9e42"),(0,F.Sn)("design:type",Object)],vs.prototype,"questionInterface",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],vs.prototype,"hideDelay",void 0),vs=(0,F.Cg)([(0,G.EVk)("HideWhenQuestionOpen",G.YH6.ui)],vs);var gs=U(38268),ms=U(86730),ys=U(97071);class _s extends W.U{constructor(){super(...arguments),this.battleLayers=null,this.rootContext=null,this._currentScene=null,this.postBattleExpressModeController=new De.o}get type(){return _s.INSECURE_BATTLE_TYPE}get stateMachine(){return this.rootContext.getInjectedValue("BattleStateMachine")}update(){this._currentScene.update(),V.q.instance.prodigy.update()}init(k){this._currentScene=G.wa5.getActiveScene(),this.setupLayers(),V.q.instance.prodigy.gameContainer.get("12b-405a").awaitLoad().catch(G.RQr.createHandler("Error loading Weekend Event Data for Battle")),this.rootContext=this.battleLayers.root.addComponent(G.bE_),this.rootContext.Container.bind("MenuLayer").toConstantValue(this.battleLayers.menus),this.rootContext.Container.bind("HostID").toConstantValue(k.hostID),this.rootContext.Container.bind("TeamStreak").toConstantValue(k.teamStreak);const B=this.battleLayers.battleUI.addComponent(G.Fid);B.Identifier="BattleUIFactory",B.Components=[this.battleLayers.battleUI.addComponent(Ot)],this.rootContext.Installers.push(new ys.p(this.game)),this.rootContext.Installers.push(new bt(this.game)),this.rootContext.Installers.push(new Ne(k)),k.isHost?(this.rootContext.Installers.push(new je),this.rootContext.runInstallers()):(this.rootContext.Installers.push(new pe),this.rootContext.runInstallers());this.battleLayers.content.addComponent(vs).HideDelay=500;this.battleLayers.battleUI.addComponent(vs).HideDelay=500;this.battleLayers.root.addComponent(ms.a).BackgroundMusicID=2,this.battleLayers.root.addComponent(xe),this.battleLayers.root.addComponent(gs.R);const U=this.battleLayers.content.addComponent(Bi),$=this.battleLayers.content.addComponent(G.Fid);U.BattleLayer=this.battleLayers.content,$.Identifier="BattleStateMachine",$.Components=[U];const W=new G._mx(this.battleLayers.root);W.addComponent(G.K16),W.name="SummaryScreen",W.active=!1;const q=this.battleLayers.root.addComponent(G.Fid);q.Identifier="SummaryScreen",q.Components=[W.addComponent(Pe)];const K=this.battleLayers.root.addComponent(Ht);K.Game=this.game,K.BattleContent=this.battleLayers.content;const z=this.battleLayers.root.addComponent(G.Fid);z.Identifier="SpellFactory",z.Components=[K],k.isHost?class{constructor(){}static create(k){const B=new G._mx(k);B.addComponent(G.K16),B.name="CoOpHost",B.addComponent(hs),B.addComponent(cs);const U=B.addComponent(G.Fid);return U.Identifier="CurrentCoOpTeam",U.Components=[B.addComponent(os)],B}}.create(this.battleLayers.root):class{constructor(){}static create(k){const B=new G._mx(k);B.addComponent(G.K16),B.name="CoOpClient",B.addComponent($i),B.addComponent(Gi),B.addComponent(qi),B.addComponent(ji);const U=B.addComponent(G.Fid);return U.Identifier="CurrentCoOpTeam",U.Components=[B.addComponent(Fi)],B}}.create(this.battleLayers.root);const Y=this.rootContext.getInjectedValue("CurrentCoOpTeam");Y.getTeam().HostID=k.hostID,Y.getTeam().TeamMembers=j.map(k.teammates,(k=>k.userID)),Y.getTeam().TeamMembers.push(this.rootContext.getInjectedValue("CurrentPlayer").getUserID());const Q=this.battleLayers.root.addComponent(G.Fid);Q.Identifier="BattleStats",Q.Components=[this.battleLayers.root.addComponent(ye)],this.rootContext.Container.bind("PostBattleExpressModeController").toConstantValue(this.postBattleExpressModeController),V.q.instance.prodigy.gameContainer.get("779-a746").setUserStatus(H.a.unavailable).catch(G.RQr.createHandler("Unable to set social status")),Promise.all(k.battleMap.map(((k,B)=>(0,F.sH)(this,void 0,void 0,(function*(){const U=new G._mx(0===B?this.battleLayers.background:this.battleLayers.foreground),F=U.addComponent(gt._);yield F.setAsset(k);const j=U.addComponent(G.K16);j.x=this.game.width>>1,j.y=this.game.height>>1,j.width=F.getWidth(),j.height=F.getHeight(),j.anchorX=.5,j.anchorY=.5}))))).then((()=>{this.createBattleEntities(k)})).catch(G.RQr.createHandler("Error loading map"))}shutdown(){var k;V.q.instance.prodigy.gameContainer.get("779-a746").setUserStatus(H.a.available).catch(G.RQr.createHandler("Unable to set social status")),null===(k=this.postBattleExpressModeController)||void 0===k||k.destroy(),super.shutdown()}setupLayers(){const k=new G._mx;k.name="Scene",k.addComponent(G.K16);const B=new G._mx(k);B.name="Map",B.addComponent(G.K16);const U=new G._mx(k);U.name="Menus",U.addComponent(G.K16);const F=new G._mx(B);F.name="Background",F.addComponent(G.K16);const j=new G._mx(B);j.name="Content",j.addComponent(G.K16);const $=new G._mx(j);$.name="Dim",$.addComponent(G.K16);const H=new G._mx(j);H.name="FarBack",H.addComponent(G.K16);const V=new G._mx(j);V.name="Background",V.addComponent(G.K16);const W=new G._mx(j);W.name="Middle",W.addComponent(G.K16);const q=new G._mx(j);q.name="Foreground",q.addComponent(G.K16);const K=new G._mx(j);K.name="FarFront",K.addComponent(G.K16);const z=new G._mx(B);z.name="Foreground",z.addComponent(G.K16);const Y=new G._mx(B);Y.name="BattleUI",Y.addComponent(G.K16),this.battleLayers={root:k,map:B,background:F,content:j,foreground:z,menus:U,battleUI:Y,battleDim:$,battleFarBack:H,battleBackground:V,battleMid:W,battleForeground:q,battleFarFront:K},this.groupFarBack=H.legacyTransform.group,this.groupFront=q.legacyTransform.group,this.groupMiddle=W.legacyTransform.group,this.groupBack=V.legacyTransform.group,this.groupDim=$.legacyTransform.group,this.groupFarFront=K.legacyTransform.group}createBattleEntities(k){const B=new G._mx(this.battleLayers.content);B.name="PlayerTeamContext",B.addComponent(G.K16),B.addComponent(G.bE_);const U=B.addComponent(pt);U.ID=0;const F=B.addComponent(at);F.InitialValue=this.rootContext.getInjectedValue("CrystalHP"),F.reset();const j=B.addComponent(G.Fid);j.Identifier="Health",j.Components=[F];const $=B.addComponent(G.Fid);$.Identifier="DamageReceiver",$.Components=[B.addComponent(_e)];const H=B.addComponent(G.Fid);H.Identifier="DamageSource",H.Components=[B.addComponent(Ee)];const V=new G._mx(this.battleLayers.content);V.name="TitanTeamContext",V.addComponent(G.K16),V.addComponent(G.bE_);const W=V.addComponent(pt);W.ID=1;const q=V.addComponent(at);q.InitialValue=this.rootContext.getInjectedValue("TitanHP"),q.reset();const K=V.addComponent(G.Fid);K.Identifier="Health",K.Components=[q];const z=V.addComponent(G.Fid);z.Identifier="DamageReceiver",z.Components=[V.addComponent(_e)];const Y=V.addComponent(G.Fid);Y.Identifier="DamageSource",Y.Components=[V.addComponent(Ee)];const Q=this.battleLayers.content.addComponent(G.Fid);Q.Identifier="Teams",Q.Components=[U,W],this.createPlayerTeam(),this.createTitanTeam(k),this.setupHealthBars();const X=this.battleLayers.content.addComponent(G.Fid);X.Identifier="BattleTeamInfo",X.Components=[this.battleLayers.content.addComponent(oe)];this.battleLayers.root.addComponent(We).join(k.multiplayerRoom),this.sendBattleStartEvent(),this.rootContext.getInjectedValue("BattleStateMachine").run()}setupHealthBars(){const k=rs.create(this.battleLayers.battleUI,"CO_OP_CRYSTAL_HEALTH_NAME",!0);k.name="PlayerHealthBar",k.active=!1;const B=k.findComponent(Vt);B.TeamID=0,k.legacyTransform.group.position.set(-220,80);const U=k.addComponent(qe);U.StartPosition={x:-220,y:80},U.EndPosition={x:250,y:80},U.SlideDuration=800;const F=k.addComponent(G.Fid);F.Identifier="SlideInHealthBar",F.Components=[U];const j=k.addComponent(qe);j.StartPosition={x:250,y:80},j.EndPosition={x:250,y:-80},j.SlideDuration=500;const $=k.addComponent(G.Fid);$.Identifier="SlideOutHealthBar",$.Components=[j];const H=rs.create(this.battleLayers.battleUI,"CO_OP_TITAN_HEALTH_NAME",!1);H.name="TitanHealthBar",H.active=!1,H.findComponentInChildren(ze).GameObject.legacyTransform.group.scale.x=-1;const V=H.findComponent(Vt);V.TeamID=1;const W=H.addComponent(qe);W.StartPosition={x:1490,y:80},W.EndPosition={x:1030,y:80},W.SlideDuration=800;const q=H.addComponent(G.Fid);q.Identifier="SlideInHealthBar",q.Components=[W];const K=H.addComponent(qe);K.StartPosition={x:1030,y:80},K.EndPosition={x:1030,y:-80},K.SlideDuration=500;const z=H.addComponent(G.Fid);z.Identifier="SlideOutHealthBar",z.Components=[K];const Y=this.battleLayers.root.addComponent(G.Fid);Y.Identifier="ActiveHealthBars",Y.Components=[B,V]}createPlayerTeam(){const k=class{constructor(){}static create(k){const B=new G._mx(k);B.addComponent(G.K16),B.legacyTransform.x=520,B.legacyTransform.y=420,B.name="Crystal",B.addComponent(rt);const U=B.addComponent(G.bE_);U.Container.bind("CastPoint").toConstantValue({x:140,y:-60}),U.Container.bind("ImpactSize").toConstantValue({x:150,y:200}),U.Container.bind("ImpactOffset").toConstantValue({x:205,y:0});const F=B.addComponent(Ji.v),j=B.addComponent(Qe.j);F.OnLoaded.addOnce((()=>{j.applySkin("crystal"),j.playAnimation("idle",!0)})),F.setAsset(ts.Q.Spine_coop_crystal_json);const $=new G._mx(B);$.addComponent(G.K16),$.legacyTransform.x=50,$.legacyTransform.y=-65,$.name="Input";const H=$.addComponent(Ci.p);H.Width=200,H.Height=250,H.InputEnabled=!1,$.addComponent(Yi);const V=B.addComponent(G.Fid);V.Identifier="Animators",V.Components=[j];const W=B.addComponent(Zi);W.LocalizationKey="CO_OP_CRYSTAL_NAME";const q=B.addComponent(G.Fid);q.Identifier="Name",q.Components=[W];const K=B.addComponent(Xi);K.SpineAnimator=j,U.Container.bind("IdleAnimationState").toConstantValue(K);const z=B.addComponent(G.Fid);z.Identifier="TakeDamageAnimationState",z.Components=[B.addComponent(zi)];const Y=B.addComponent(Ki);Y.ShatterSkinningDelay=500;const Q=B.addComponent(G.Fid);Q.Identifier="DefeatAnimationState",Q.Components=[Y];const X=B.addComponent(Qi);X.GlowDuration=1500,X.SpineAnimator=j;const Z=B.addComponent(G.Fid);return Z.Identifier="AttackAnimationState",Z.Components=[X],B}}.create(this.battleLayers.battleMid),B=k.findComponent(rt),U=j.find(this.rootContext.getInjectedValue("Teams"),(k=>0===k.ID)),F=k.findComponent(G.bE_),$=U.GameObject.findComponent(G.bE_);F.Container.bind("DamageReceiver").toConstantValue($.getInjectedValue("DamageReceiver")),F.Container.bind("DamageSource").toConstantValue($.getInjectedValue("DamageSource")),F.Container.bind("Health").toConstantValue($.getInjectedValue("Health")),B.BattleTeam=U,B.setAsActiveTeamMember();const H=new G._mx(this.battleLayers.battleMid),V=H.addComponent(G.K16);V.x=270,V.y=420;const W=H.addComponent(vt);H.name="Middle",W.TeamID=0,W.OffScreenStartPosition={x:-200,y:420};const q=new G._mx(this.battleLayers.battleBackground),K=q.addComponent(G.K16);K.x=375,K.y=320;const z=q.addComponent(vt);q.name="Top",z.TeamID=0,z.OffScreenStartPosition={x:-200,y:320};const Y=new G._mx(this.battleLayers.battleForeground),Q=Y.addComponent(G.K16);Q.x=375,Q.y=520;const X=Y.addComponent(vt);Y.name="Bottom",X.TeamID=0,X.OffScreenStartPosition={x:-200,y:520}}createTitanTeam(k){const B=K.t.getItem("titan",k.titanAssetID),U=class{constructor(){}static create(k,B){const U=new G._mx(k);U.name="Titan",U.addComponent(G.K16);const F=U.addComponent(G.bE_);F.Installers.push(new bs),F.runInstallers();const j=new G._mx(U);j.name="Spine",j.addComponent(G.K16).group.scale.set(-1.75,1.75);const $=j.addComponent(Ji.v),H=j.addComponent(Qe.j);$.OnLoaded.addOnce((()=>{H.playAnimation("idle",!0)})),$.setAsset(B);const V=U.addComponent(G.Fid);V.Identifier="Animators",V.Components=[H];const W=U.addComponent(rt),q=U.addComponent(G.Fid);q.Identifier="BattleTeamMember",q.Components=[W];const K=new G._mx(U);K.addComponent(G.K16),K.legacyTransform.x=-95,K.legacyTransform.y=15,K.name="Barrier";const z=K.addComponent(gt._),Y=K.addComponent(ps.p);z.OnLoaded.addOnce((()=>{z.setAnchor(.5,.5),Y.createAnimationSequence("deflect",[],10,!1),z.setScale(2.33,2.33),z.sprite.smoothed=!1,z.setAlpha(0)})),z.setAsset(Ct._.Boss_titan_barrier_json,"1");const Q=new G._mx(U);Q.addComponent(G.K16),Q.legacyTransform.x=-115,Q.legacyTransform.y=15,Q.name="Barrier Break";const X=Q.addComponent(gt._),Z=Q.addComponent(ps.p);X.OnLoaded.addOnce((()=>{X.setAnchor(.5,.5),Z.createAnimationSequence("break",[],10,!1),X.setScale(2.33,2.33),X.sprite.smoothed=!1,X.setAlpha(0)})),X.setAsset(Ct._.Boss_titan_barrier_break_json,"1");const J=new G._mx(U);J.addComponent(G.K16),J.legacyTransform.x=-500,J.legacyTransform.y=60,J.name="Barrier Spark";const tt=J.addComponent(gt._),et=J.addComponent(ps.p);tt.OnLoaded.addOnce((()=>{tt.setAnchor(.5,.5),et.createAnimationSequence("spark",[],10,!1),tt.setScale(2.33,2.33),tt.sprite.smoothed=!1,tt.setAlpha(0)})),tt.setAsset(Ct._.Boss_titan_spark_json,"1");const it=U.addComponent(ls);it.TitanBarrier=Y,it.TitanSpark=et;const st=U.addComponent(G.Fid);st.Identifier="TakeDamageAnimationState",st.Components=[it];const nt=U.addComponent(ds);nt.BarrierAnimator=Z,nt.BarrierSpark=et;const at=U.addComponent(G.Fid);at.Identifier="DefeatAnimationState",at.Components=[nt],U.addComponent(fs).TeamID=1;const ot=U.addComponent(Zi);ot.LocalizationKey="TITAN_NAME";const ht=U.addComponent(G.Fid);return ht.Identifier="Name",ht.Components=[ot],U}}.create(this.battleLayers.battleMid,q.E.getTitanSpine(k.titanAssetID)),F=U.findComponent(rt),$=j.find(this.rootContext.getInjectedValue("Teams"),(k=>1===k.ID));U.legacyTransform.group.position.set(1110,325);const H=U.findComponent(G.bE_),V=$.GameObject.findComponent(G.bE_);H.Container.bind("DamageReceiver").toConstantValue(V.getInjectedValue("DamageReceiver")),H.Container.bind("Health").toConstantValue(V.getInjectedValue("Health")),H.Container.bind("Level").toConstantValue(void 0),H.Container.bind("Element").toConstantValue(B.data.element),k.isHost&&H.Container.bind("DamageSource").toConstantValue(V.getInjectedValue("DamageSource")),F.BattleTeam=$,F.setAsActiveTeamMember(),k.isHost?U.addComponent($e):U.addComponent(ge)}sendBattleStartEvent(){V.q.instance.prodigy.gameContainer.get("c47-20b6").battle.sendBattleStartEvent(_s.INSECURE_BATTLE_TYPE,{battle_type:_s.INSECURE_BATTLE_TYPE})}enablePostBattleExpressMode(k){this.rootContext.getInjectedValue("PostBattleExpressModeController").enable(k).catch(G.RQr.createHandler("Failed to enable express mode on post-battle menus"))}canBattleEndInstantly(){const k=this.stateMachine.CurrentState,B=this.rootContext.getInjectedValue("BattleActionQueue");return k===Ye.InBattle&&!B.IsActionQueuePlaying&&0===B.Actions.length}beginEndingBattle(k,B={}){if(B.enablePostBattleFlowExpressMode&&this.enablePostBattleExpressMode(B.forceEndMessageText),this.canBattleEndInstantly())k();else{if(G.Aq$.isDefined(this.forceEndCallback))return;this.forceEndCallback=k,this.rootContext.getInjectedValue("PostBattleExpressModeController").onPostBattleExpressModeComplete.addOnce((()=>{this.callForceEndCallbackIfExists()}));this.rootContext.getInjectedValue("BattleActionQueue").OnQueueComplete.add((()=>{this.attemptToEndBattle()})),this.stateMachine.OnStateChange.add((k=>{this.attemptToEndBattle()}))}}attemptToEndBattle(){this.canBattleEndInstantly()&&this.callForceEndCallbackIfExists()}callForceEndCallbackIfExists(){G.Aq$.isDefined(this.forceEndCallback)&&(this.forceEndCallback(),this.forceEndCallback=void 0)}}_s.INSECURE_BATTLE_TYPE="Titan"},23082:(k,B,U)=>{"use strict";var F;U.d(B,{G:()=>F}),function(k){k.Battle="Battle",k.Boot="Boot",k.CharCreate="CharCreate",k.CharSelect="CharSelect",k.CoOp="CoOp",k.DanceDance="DanceDance",k.DinoDig="DinoDig",k.DuelMatchmaking="DuelMatchmaking",k.Faint="Faint",k.Loading="Loading",k.LootDashMenu="LootDashMenu",k.LootDashTransport="LootDashTransport",k.Museum="Museum",k.PrefabScene="PrefabScene",k.Registration="Registration",k.Rifts="Rifts",k.SecureBattle="SecureBattle",k.SecureBattleRevamp="SecureBattleRevamp",k.SplashScreen="SplashScreen",k.TileScreen="TileScreen",k.Tower="Tower"}(F||(F={}))},1559:(k,B,U)=>{"use strict";U.d(B,{v:()=>q});var F=U(62459),G=U(28628),j=U(35120),$=U(24190),H=U(88022),V=U(73678),W=U(20705);class q extends W.f{constructor(){super("zone-faint","",[]),this.targetZone="",this.showMenu=!1,this.targetZone=""}create(){super.create();const k=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=j.q.instance.game;k.saveEnabled=!1,this.element=j.q.instance.prodigy.create.element(this.uiLayer),this.element.add(new $.C(this.prodigyGame,0,0,B.width,B.height,H._.Tiled_sprites_json,"load"))}start(){this.onDialogueEndOverride?this.onDialogueEndOverride():this.toZone(),super.start()}toZone(){const k={battleResult:G.XK.Defeat};if(F.Aq$.isDefined(this.targetZone)&&0!==this.targetZone.length)if(this.targetZone.indexOf("-")>-1)this._targetPos?j.q.instance.prodigy.world.it(this.targetZone,this._targetPos.x,this._targetPos.y,k):j.q.instance.prodigy.world.it(this.targetZone,void 0,void 0,k);else{const B=this.prodigyGame.state.get(this.targetZone);"startX"in B&&delete B.startX,"startY"in B&&delete B.startY,j.q.instance.prodigy.start(this.targetZone,k)}else j.q.instance.prodigy.world.it(V.A_.HOUSE)}updateTeleportData(k){this.targetZone=k.mapKey,this._targetPos=k.coordinates}shutdown(){var k;this.onDialogueEndOverride=void 0,null===(k=this.element)||void 0===k||k.destroy(),super.shutdown()}}},81617:(k,B,U)=>{"use strict";U.d(B,{R:()=>J});var F=U(8674),G=U(62459),j=U(88022),$=U(35120),H=U(29569),V=U(24190),W=U(34829),q=U(36545),K=U(73797),z=U(91160),Y=U(87776),Q=U(91315),X=U(45716),Z=U(23082);class J extends H.U{get isLoadingAdditional(){return this._additionalLoadPromises.length>0}constructor(){super(),this.timeLoadStartedMS=null,this.isHintPanelShown=!1,this._hint=null,this._mapName=null,this._hintContent=null,this._errorMessageBox=null,this._additionalLoadPromises=[],this.onAdditionalLoadPromisesFinishSignal=new G.HN0,this.prodigyGame=$.q.instance.game,this.initData()}startLoading(k={}){this._additionalLoadPromises.length=0,this.prodigyGame.tweens.removeAll(),this.resetData(),$.q.instance.game.fps.record=!1;for(const B in k)this.data[B]=k[B];this.prodigyGame.state.start(Z.G.Loading)}initData(k=""){this.data={title:k,time:0,fadeIn:!0,fadeOut:!0,callback:null,assets:[],target:Z.G.SplashScreen,autoStart:!0,save:!0}}resetData(){this.initData($.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("LOADING_CAPITALIZE"))}create(){if($.q.instance.prodigy.gameContainer.get("afa-b7c5").startTracing(z.u.LoadingState),super.create(),this.startTime=(new Date).getTime(),this.complete=!1,this.isLoaded=!1,this.isHintPanelShown=!1,this.timeLoadStartedMS=Date.now(),this.element=$.q.instance.prodigy.create.element(void 0),!this.isTargetingInitialScreen()){const k=new V.C(this.prodigyGame,0,0,J.BG_WIDTH,J.BG_HEIGHT,j._.Tiled_sprites_json,"load");k.inputEnabled=!0,this.element.add(k);const B=this.element.add($.q.instance.prodigy.create.sprite(1220,660,j._.General_core_json,"loading"));B.anchor.set(.5,.5),this._spinnerTween=new G.Kak(B,this.game,this).to({angle:360},2e3,G.GS3.Linear.None,!0,0,W.s.MAX_SAFE_INTEGER,!1)}this.element.onDestroy.addOnce(this.cleanUpResources,this),$.q.instance.game.app.ticker.add(this.tick,this),this.start()}start(){$.q.instance.prodigy.game.input.enabled=!0,this.prodigyGame.broadcaster.removeAppListener(K.bv.WorkerLoadComplete,this,"loading");$.q.instance.prodigy.gameContainer.get("afa-b7c5").startTracing(z.u.LoadingStateAssetsLoad);const k=G.Aq$.isDefined(this.data.assets)?this.data.assets:[];if($.q.instance.prodigy.load.assets(k,this.loaded.bind(this)),this.data.save){const k=$.q.instance.prodigy.gameContainer.get("c97-bd0d");if(k.loggedIn&&k.characterProcessed){$.q.instance.prodigy.gameContainer.get("e20-0fb0").player.saveEnabled=!0}}}loaded(k,B){if(!G.Aq$.isDefined(this.prodigyGame))return;$.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(z.u.LoadingStateAssetsLoad,{isLoaded:B,assets:G.Aq$.isDefined(this.data.assets)?this.data.assets:[]}),B?this.isLoaded=!0:this.showErrorPopup($.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(X.l.CheckNetworkConnection))}tick(){var k,B;null===(B=null===(k=this.element)||void 0===k?void 0:k.parent)||void 0===B||B.setChildIndex(this.element,this.element.parent.children.length-1),!this.complete&&this.isLoadingComplete()?this.handleLoadingComplete():!this.isTargetingInitialScreen()&&null!==this.timeLoadStartedMS&&!this.isHintPanelShown&&Date.now()-this.timeLoadStartedMS>=J.MIN_LOAD_TO_SHOW_HINT_PANEL_MS&&this.showHintPanel()}handleLoadingComplete(){var k;this.complete=!0,G.Aq$.isDefined(this.data.callback)&&this.data.callback(),this.data.target!==Z.G.SplashScreen&&($.q.instance.game.fps.record=!0);const B=this.prodigyGame.state;if(B.onStateLoaded.addOnce(this.nextStateLoaded,this),this.data.autoStart&&this.data.target&&!this._errorMessageBox){B.get(this.data.target).fadeInSet=this.data.fadeIn,B.start(this.data.target,!1,...null!==(k=this.data.targetInitArgs)&&void 0!==k?k:[]);$.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(z.u.LoadingState)}const U=$.q.instance.prodigy.gameContainer.get("2a1-fed9");if(null!==U.timeToPlayMS&&U.timeToPlayMS>0){const k=Date.now()-this.timeLoadStartedMS;U.timeInLoadingMS+=k,U.timeToPlayMS+=k}}waitFor(k,B=!1){this._additionalLoadPromises.push({promise:k,isCritical:B})}nextStateLoaded(){this.awaitAdditionalLoadPromises().then((()=>{try{this.onAdditionalLoadPromisesFinishSignal.dispatch(),this.cleanUpResources()}catch(k){G.RQr.logError(k,"Error during loading completion cleanup")}})).catch((()=>{this.onAdditionalLoadPromisesFinishSignal.dispatch(),this._additionalLoadPromises.length=0,this.showErrorPopup($.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(X.l.CheckNetworkConnection))}))}awaitAdditionalLoadPromises(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=$.q.instance.prodigy.gameContainer.get("afa-b7c5");for(const{promise:U,isCritical:F}of this._additionalLoadPromises){const j={"promiseInfo.isCritical":F,"promiseInfo.success":!0};try{k.startTracing(z.u.LoadingStateAdditionalLoadPromise),yield U,k.endTracing(z.u.LoadingStateAdditionalLoadPromise,j)}catch(B){if(G.RQr.logError(B,"Error waiting for additional load promise"),j["promiseInfo.success"]=!1,k.endTracing(z.u.LoadingStateAdditionalLoadPromise,j),F)throw new Error("An error occurred while loading resources.")}}}))}isLoadingComplete(){return!this.complete&&Date.now()-this.startTime>=this.data.time&&this.isLoaded}showHintPanel(){const k=$.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);this.data.time=J.MIN_SHOW_HINT_PANEL_MS,this.isHintPanelShown=!0,this._hintContent=$.q.instance.prodigy.create.element(this.element),this._hintContent.visible=!1,this._hintContent.alpha=0,$.q.instance.prodigy.create.panel(this._hintContent,160,340,24,5,"shine"),this._hintContent.add(new V.C(this.prodigyGame,171,380,J.BG_WIDTH-320-22,40,j._.Tiled_sprites_json,"blue-top")),this._hintContent.add(new V.C(this.prodigyGame,171,420,J.BG_WIDTH-320-22,40,j._.Tiled_sprites_json,"blue-mid")),this._hintContent.add(new V.C(this.prodigyGame,171,460,J.BG_WIDTH-320-22,40,j._.Tiled_sprites_json,"blue-top2")),this._hintContent.add($.q.instance.prodigy.create.sprite(590,310,j._.General_core_json,"award-frame"));const B=k.getText(q.R.getRandomHint("none").textKey);this._hint=new Y.b(this.prodigyGame,this._hintContent);const U=J.BG_WIDTH-420;this._hint.width=U,this._hint.populate({text:B,style:9,fontSize:28,boundsAlignH:"center",boundsAlignV:"middle",color:"#ffffff",wordWrap:!0,wordWrapWidth:U,align:"center"},U),this._hint.position.set(206,442),$.q.instance.prodigy.create.panel(this._hintContent,440,560,10,2,"shine"),this._mapName=new Y.b(this.prodigyGame,this._hintContent),this._mapName.populate({text:this.data.title,style:6,fontSize:24,boundsAlignH:"center",boundsAlignV:"middle",color:"#ffffff"}),this._mapName.position.set(J.BG_HALF_WIDTH,this._mapName.height+564);const F=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player,H=()=>{this._hintContent&&!this._hintContent.destroyed&&(this._hintContent.visible=!0,this.game.add.tween(this._hintContent,this).to({alpha:1},J.HINT_FADE_IN_MS,G.GS3.Linear.None,!0))};if(!$.q.instance.prodigy.gameContainer.get("c97-bd0d").loggedIn)return void H();const W=$.q.instance.prodigy.create.player(this._hintContent,F,1,J.BG_HALF_WIDTH,J.BG_HALF_HEIGHT);W.reload((this.data.useIdleAnimation?W.stopHeavy:W.walk).bind(W));const K=setTimeout(H,J.HINT_REVEAL_FALLBACK_MS);W.onFullyLoaded.addOnce((()=>{clearTimeout(K),H()}),this)}showErrorPopup(k){window.prodigyLoaderHidden?(this._errorMessageBox=new Q.p(this.prodigyGame,this.element),this._errorMessageBox.preprocess(k,void 0,void 0),this._errorMessageBox.queuePostCreateCallback(this._errorMessageBox.setOkay.bind(this._errorMessageBox,$.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("SETTINGS_LOGOUT"),null)),this._errorMessageBox.setCloseCallback(this.onErrorMessageClose)):window.SW.Load.setErrorScreen("Loading Failed",void 0,k,window.SW.Errors.ERROR_CODE_MENU_ASSETS);$.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(z.u.LoadingState,{load_failure:k})}onErrorMessageClose(){$.q.instance.prodigy.gameContainer.get("c97-bd0d").logout(!0),this._errorMessageBox=null}cleanUpResources(){var k,B;$.q.instance.game.app.ticker.remove(this.tick,this),this._additionalLoadPromises.length=0,this.onAdditionalLoadPromisesFinishSignal.dispose(),null===(k=this._spinnerTween)||void 0===k||k.destroy(),this._spinnerTween=void 0,this.element&&(this.element.onDestroy.removeAll(this),this.element.destroyed||this.element.destroy(),this.element=null),this._errorMessageBox=null,this._hint=null,this._mapName=null,this._hintContent=null,(null===(B=this.data.shutdownLoadState)||void 0===B||B)&&$.q.instance.prodigy.notifications.resumeAll()}shutdown(){$.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(z.u.LoadingState,{shutdown:!0})}isTargetingInitialScreen(){return this.data.target===Z.G.SplashScreen||this.data.target===Z.G.CharCreate||this.data.target===Z.G.CharSelect}}J.BG_WIDTH=1280,J.BG_HEIGHT=720,J.BG_HALF_WIDTH=.5*J.BG_WIDTH,J.BG_HALF_HEIGHT=.5*J.BG_HEIGHT,J.MIN_SHOW_HINT_PANEL_MS=3500,J.MIN_LOAD_TO_SHOW_HINT_PANEL_MS=500,J.HINT_REVEAL_FALLBACK_MS=5e3,J.HINT_FADE_IN_MS=100},49334:(k,B,U)=>{"use strict";U.d(B,{Q:()=>Y});var F=U(8674),G=U(62459),j=U(95891),$=U(88022),H=U(99625),V=U(35120),W=U(29569),q=U(24190),K=U(91160),z=U(23082);class Y extends W.U{get prefabGameAssets(){return this._prefabGameAssets}init(k){const B=V.q.instance.prodigy.gameContainer.get("afa-b7c5");B.startTracing(K.u.PrefabLoaderScene);const U={},F=k.prefabIDs.map((k=>k.toString()));U.prefab_ids=F.join(",");const j=new q.C(this.game,0,0,this.game.width,this.game.height,$._.Tiled_sprites_json,"load");this.game.world.addChild(j),this._currentScene=G.wa5.getActiveScene(),this._prefabGameAssets=k.prefabIDs.filter((k=>Object.values(H.l).includes(k)));const W=this._currentScene.container;for(const G in k)W.bind(`InitData-${G}`).toConstantValue(k[G]);if(k.layers){const B=k.layers.length;for(let U=0;U{j.destroy(),U.error=!1,B.endTracing(K.u.PrefabLoaderScene,U)})).catch((k=>{throw U.error=!0,U.error_message=(null==k?void 0:k.message)||"Unknown error",B.endTracing(K.u.PrefabLoaderScene,U),G.RQr.logError(k,"Error loading prefab scene"),k})),!0)}loadScene(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=V.q.instance.prodigy.gameContainer.get("afa-b7c5");B.startTracing(K.u.PrefabLoaderSceneAssetPreload);const U={};if(k.preloadAssets){U.asset_count=k.preloadAssets.length,U.assets=k.preloadAssets;try{yield V.q.instance.prodigy.load.assetsAsPromise(k.preloadAssets),U.assets_loaded=!0}catch(q){throw U.asset_load_error=!0,q}finally{B.endTracing(K.u.PrefabLoaderSceneAssetPreload,U)}}B.endTracing(K.u.PrefabLoaderSceneAssetPreload,U);const F=B.startTracing(K.u.PrefabLoaderScenePrefabLoading),G={},$=[],H=V.q.instance.prodigy.gameContainer.get("d0e-64fd");k.prefabIDs.forEach((k=>{const B=k.toString();let U;F.startAssetTrace(B),U=(0,j.isNumber)(k)?H.loadWithDependencies(k).promise:H.loadWithDependenciesFromGUID(k).promise,$.push(U.then((k=>(F.endAssetTrace(B,{loaded:!0}),k))).catch((k=>{throw F.endAssetTrace(B,{error:!0,error_message:(null==k?void 0:k.message)||"Unknown error"}),k})))}));try{const k=yield Promise.all($);for(const B of k)this._currentScene.addGameObject(B);G.prefabs_loaded_count=k.length,G.success=!0}catch(q){throw G.error=!0,q}finally{B.endTracing(K.u.PrefabLoaderScenePrefabLoading,G)}B.startTracing(K.u.PrefabLoaderSceneConsentBanner);const W={};try{this.initConsentBanner(k.hideParentalConsentBanner),W.hidden=!!k.hideParentalConsentBanner,W.success=!0}catch(q){throw W.error=!0,q}finally{B.endTracing(K.u.PrefabLoaderSceneConsentBanner,W)}}))}initConsentBanner(k=!1){const B=new G._mx;B.layer="ui",B.addComponent(G.dLy),this._currentScene.addGameObject(B),k?this.hideParentalConsentBanner():this.showParentalConsentBanner(B)}update(){this._currentScene.update(),V.q.instance.prodigy.update()}shutdown(){V.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(K.u.PrefabLoaderScene,{completed:!1}),this.hideParentalConsentBanner(),V.q.instance.prodigy.cleanup(),this._currentScene=null,this._prefabGameAssets=null,V.q.instance.prodigy.load.removeAssets(),super.shutdown()}}},20705:(k,B,U)=>{"use strict";U.d(B,{f:()=>J});var F=U(8674),G=U(62459),j=U(68910),$=U(35120),H=U(29569),V=U(83133),W=U(24190),q=U(73797),K=U(88022),z=U(24110),Y=U(85515),Q=U(98252),X=U(81617),Z=U(21134);class J extends H.U{get background(){return this._background?this._background.legacyTransform.group:null}get backgroundGameObject(){return this._background}get contentGameObject(){return this._content}get content(){return this._content?this._content.legacyTransform.group:null}get foreground(){return this._foreground?this._foreground.legacyTransform.group:null}get foregroundGameObject(){return this._foreground}get difficultyOverlay(){return this._difficultyOverlay?this._difficultyOverlay.legacyTransform.group:null}get uiLayer(){return this._uiLayer?this._uiLayer.legacyTransform.group:null}get uiLayerGameObject(){return this._uiLayer}get menusGameObject(){return this._menus}get menus(){return this._menus?this._menus.legacyTransform.group:null}get dialogue(){return this._dialogue?this._dialogue.legacyTransform.group:null}get overlayGameObject(){return this._overlay}get overlay(){return this._overlay?this._overlay.legacyTransform.group:null}get opaque(){return this._opaque?this._opaque.legacyTransform.group:null}get debugOverlay(){return this._debugOverlay?this._debugOverlay:null}get gameRenderCache(){return this._gameRenderCache?this._gameRenderCache.legacyTransform.group:null}constructor(k="zero",B="",U=[]){super(),this._currentScene=null,this._modalFilters=null,this._modalRenderTexture=null,this.screenData=null,this.isCutscenePlaying=!1,this.showMenu=!1,this.prodigyGame=$.q.instance.game,this.screenName=B,this.zoneName=k,this.assets=U}initListeners(){this.prodigyGame.broadcaster.addAppListener(q.lc.AddChild,this.onAddChild.bind(this),this,this.prodigyGame),this.prodigyGame.broadcaster.addAppListener(q.lc.GetLayer,this.onGetLayer.bind(this),this,this.prodigyGame),this.prodigyGame.broadcaster.addAppListener(q.lc.EnableBackground,this.onEnableBackground.bind(this),this,this.prodigyGame),this.prodigyGame.broadcaster.addAppListener(q.lc.EnableContent,this.onEnableContent.bind(this),this,this.prodigyGame)}stopListeners(){this.prodigyGame.broadcaster.removeAppListener(q.lc.AddChild,this,this.prodigyGame),this.prodigyGame.broadcaster.removeAppListener(q.lc.GetLayer,this,this.prodigyGame),this.prodigyGame.broadcaster.removeAppListener(q.lc.EnableBackground,this,this.prodigyGame),this.prodigyGame.broadcaster.removeAppListener(q.lc.EnableContent,this,this.prodigyGame)}onEnableBackground(k){this.background.visible=k,this.foreground.visible=k,this.uiLayer.visible=k}onEnableContent(k){this.content.visible=k}onAddChild(k,B,U){this.stage&&this[B]&&(G.Aq$.isDefined(U)?this[B].addChildAt(k,U):this[B].addChild(k))}onGetLayer(k){return G.Aq$.isDefined(this.stage)&&G.Aq$.isDefined(this[k])?this[k]:null}shutdown(){var k;$.q.instance.prodigy.cleanup(),this.stopListeners();$.q.instance.prodigy.gameContainer.get("c97-bd0d").stopInactiveTimer(),this._disableConsentBanner||this.hideParentalConsentBanner(),this._camera&&(null===(k=this._camera.GameObject)||void 0===k||k.destroy(),this._camera=null),this._background&&(this._background.destroy(),this._background=null),this._content&&(this._content.destroy(),this._content=null),this._foreground&&(this._foreground.destroy(),this._foreground=null),this._difficultyOverlay&&(this._difficultyOverlay.destroy(),this._difficultyOverlay=null),this._uiLayer&&(this._uiLayer.destroy(),this._uiLayer=null),this._consentUiLayer&&(this._consentUiLayer.destroy(),this._consentUiLayer=null),this._gameRenderCache&&(this._gameRenderCache.destroy(),this._gameRenderCache=null),this._menus&&(this._menus.destroy(),this._menus=null),this._dialogue&&(this._dialogue.destroy(),this._dialogue=null),this._overlay&&(this._overlay.destroy(),this._overlay=null),this._opaque&&(this._opaque.destroy(),this._opaque=null),this.rearOverlay=null,this.msg=null,this.questProgress&&(this.questProgress.destroy(),this.questProgress=null),this._debugOverlay&&(this._debugOverlay.destroy(),this._debugOverlay=null),this.menuBar=null,this._root=null,this._currentScene=null,super.shutdown()}preload(){this._currentScene=G.wa5.getActiveScene(),this._root=new G._mx,this._root.name="root",this._root.addComponent(G.K16),this.prodigyGame.stage.addChild(this._root.legacyTransform.group);const k=new G._mx(this._root);k.name="camera",k.addComponent(G.dLy).setPosition(X.R.BG_HALF_WIDTH,X.R.BG_HALF_HEIGHT),this._camera=k.addComponent(G.YPZ),this._camera.setViewportSize(X.R.BG_WIDTH,X.R.BG_HEIGHT),this._camera.reset=()=>{},this._background=new G._mx(this._root),this._background.name=Y.E.BackgroundLayer,this._background.addComponent(G.K16),this._background.addComponent(z.B),this._content=new G._mx(this._root),this._content.name=Y.E.ContentLayer,this._content.addComponent(G.K16),this._content.addComponent(z.B),this._foreground=new G._mx(this._root),this._foreground.name=Y.E.ForegroundLayer,this._foreground.addComponent(G.K16),this._foreground.addComponent(z.B),this._difficultyOverlay=new G._mx(this._root),this._difficultyOverlay.name=Y.E.DifficultyModeOverlay,this._difficultyOverlay.addComponent(G.K16),this._difficultyOverlay.addComponent(z.B),this._uiLayer=new G._mx(this._root),this._uiLayer.name=Y.E.UiLayer,this._uiLayer.addComponent(G.K16),this._uiLayer.addComponent(z.B),this._consentUiLayer=new G._mx(this._root),this._consentUiLayer.name=Y.E.ConsentLayer,this._consentUiLayer.addComponent(G.K16),this._consentUiLayer.addComponent(z.B),this._currentScene.getLayer(this._consentUiLayer.layer).attachToCamera=!0,this._gameRenderCache=new G._mx(this._root),this._gameRenderCache.name=Y.E.GameRenderCacheLayer,this._gameRenderCache.addComponent(G.K16),this._gameRenderCache.addComponent(z.B),this._menus=new G._mx(this._root),this._menus.name=Y.E.MenusLayer,this._menus.addComponent(G.K16),this._menus.addComponent(z.B),this.menus.fixedToCamera=!0,this._dialogue=new G._mx(this._root),this._dialogue.name=Y.E.DialogueLayer,this._dialogue.addComponent(G.K16),this._dialogue.addComponent(z.B),this._overlay=new G._mx(this._root),this._overlay.name=Y.E.OverlayLayer,this._overlay.addComponent(G.K16),this._overlay.addComponent(z.B),this._opaque=new G._mx(this._root),this._opaque.name=Y.E.OpaqueLayer,this._opaque.addComponent(G.K16),this._opaque.addComponent(z.B),this._debugOverlay=new G._mx(this._root),this._debugOverlay.name=Y.E.Debug,this._debugOverlay.addComponent(G.dLy),this._debugOverlay.addComponent(z.B),this.clearAndResetCachedContainer(this.gameRenderCache);this.opaque.addChild(new W.C(this.prodigyGame,0,0,this.game.width,this.game.height,K._.Tiled_sprites_json,"load")).inputEnabled=!0,$.q.instance.prodigy.open.menuLayer=this.menus,$.q.instance.prodigy.open.menusGameObject=this._menus,$.q.instance.prodigy.effects.setSource(this),super.preload(),this.initListeners();$.q.instance.prodigy.gameContainer.get("c97-bd0d").startInactiveTimer();const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player;!this._disableConsentBanner&&B.hasCompletedTutorial()&&this.showParentalConsentBanner(this._consentUiLayer)}triggerElementClick(k){if(this.callFunctionOrSignal(k,"onDown"),this.callFunctionOrSignal(k,"onInputDown"),this.callFunctionOrSignal(k,"onUp"),this.callFunctionOrSignal(k,"onInputUp"),this.callFunctionOrSignal(k,"onClick"),k instanceof V.l){const B=k;this.callFunctionOrSignal(B,"onSelected"),B.setSelected(!B.isSelected())}}callFunctionOrSignal(k,B){G.Aq$.isDefined(k[B])&&(k[B].dispatch?k[B].dispatch():k[B]instanceof Function&&k[B]())}create(k){super.create(),this.screenSetup(),this.complete=!0}fadeIn(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.fadeInSet){const k=this.prodigyGame.add.tween(this.opaque,this).to({alpha:0},1e3,G.GS3.Quadratic.Out).start();yield k.onTweenComplete.asPromise().catch((k=>G.VyI.log("Fading in cancelled before completion",G.$bb.Warning)))}else this.opaque.visible=!1}))}fadeOut(k,B){if(this.opaque&&(this.opaque.visible=!0),$.q.instance.prodigy.notifications.notificationPlayed(),k){this.prodigyGame.add.tween(this.opaque,this).to({alpha:1},1e3,G.GS3.Quadratic.Out).start().onTweenComplete.add(B)}else B()}fadeOutCachedContainer(k){if(!this.gameRenderCache.visible)return;this.prodigyGame.add.tween(this.gameRenderCache,this).to({alpha:0},100,G.GS3.Quadratic.Out).start().onTweenComplete.add(this.clearAndResetCachedContainer.bind(this,k))}clearAndResetCachedContainer(k){k.filters=null,k.visible=!1,k.removeChildren()}setUpModalTransition(k,B){var U,F;this.clearAndResetCachedContainer(k);const H=$.q.instance.game.renderer;if(null===this._modalFilters){const k=new j.filters.BlurFilter;this._modalFilters=[k]}const V=j.RenderTexture.create({width:$.q.instance.game.width,height:$.q.instance.game.height});null===this._modalRenderTexture&&(this._modalRenderTexture=j.RenderTexture.create({width:$.q.instance.game.width,height:$.q.instance.game.height}));const W={renderTexture:V,clear:!0,transform:null,skipUpdateTransform:!1},q=Object.assign(Object.assign({},W),{clear:!1}),K=Object.assign(Object.assign({},W),{renderTexture:this._modalRenderTexture});H.render(this.background,W),H.render(this.content,q),H.render(this.foreground,q),B&&H.render(this.menus,q);const z=null===(F=null===(U=this.menuBar)||void 0===U?void 0:U.findComponent(G.y4o))||void 0===F?void 0:F.getRootContainer();z&&H.render(z,q);const Y=new j.Container;Y.addChild(new j.Sprite(V)),Y.filters=this._modalFilters,H.render(Y,K),Y.destroy(),k.addChild(new j.Sprite(this._modalRenderTexture)),k.alpha=1,k.visible=!0}bitmapCacheContainer(k,B,U){var F,j;const $=null!=B?B:this.gameRenderCache;k?this.setUpModalTransition($,U):this.fadeOutCachedContainer($),this.background.visible=!k,this.content.visible=!k,this.foreground.visible=!k;const H=null===(j=null===(F=this.menuBar)||void 0===F?void 0:F.findComponent(G.y4o))||void 0===j?void 0:j.getRootContainer();H&&(H.alpha=k?0:1)}start(){this.opaque.visible=!1}update(){super.update(),this.complete&&(this.screenUpdate(),this._currentScene.update())}screenSetup(){this.start()}screenUpdate(){$.q.instance.prodigy.update()}showMessage(k,B){G.Aq$.isDefined(this.msg)||(this.msg=new Z.Y(this.prodigyGame,this.overlay,140,10)),this.msg.setMsg(k,B)}enableOverlay(k=.5){G.Aq$.isDefined(this.rearOverlay)&&(this.rearOverlay.visible=!1),this.rearOverlay=this.uiLayer.addChild($.q.instance.prodigy.create.sprite(-10,-10,K._.General_core_json,"overlay-small")),this.rearOverlay.width=1300,this.rearOverlay.height=740,this.rearOverlay.alpha=k,this.rearOverlay.inputEnabled=!0,this.prodigyGame.add.tween(this.rearOverlay,this).from({alpha:0},500,G.GS3.Linear.None,!0)}disableOverlay(k){if(G.Aq$.isDefined(this.rearOverlay)){const B=this.prodigyGame.add.tween(this.rearOverlay,this).to({alpha:0},500,G.GS3.Linear.None);B.onTweenComplete.add((()=>{this.rearOverlay.visible=!1,G.Aq$.isDefined(k)&&k()}),this),B.start()}}addPostFilter(k){G.VyI.log("Post filters disabled",G.$bb.Verbose)}removePostFilter(k){Q.pF.isDeprecatedIOS()||(this.removePostFilterFromLayer(this.foreground,k),this.removePostFilterFromLayer(this.background,k),this.removePostFilterFromLayer(this.content,k))}addPostFilterToLayer(k,B){var U;null!==(U=k.filters)&&void 0!==U||(k.filters=[]),k.filters.push(B)}removePostFilterFromLayer(k,B){if(!k.filters)return;const U=k.filters.indexOf(B);U>=0&&k.filters.splice(U,1)}}},21134:(k,B,U)=>{"use strict";U.d(B,{Y:()=>$});var F=U(62459),G=U(35120),j=U(98623);class $ extends j.H{constructor(k,B,U,F){super(k,B),this.ID=0,this.text=null,this.x=U,this.y=F,this.text=G.q.instance.prodigy.create.font(this,0,5)}setMsg(k,B){this.visible=!0,this.ID++,this.alpha=0,this.game.add.tween(this,this).to({alpha:1},400,F.GS3.Quadratic.Out).start(),this.text.setText(k);this.game.time.events.addTimer(B,(k=>{k===this.ID&&(this.visible=!1)}).bind(this,this.ID),this)}}},77302:(k,B,U)=>{"use strict";U.d(B,{S:()=>Rt});var F=U(8674);const G=window.prodigyExperiments;var j=U(62459),$=U(99625),H=U(40295),V=U(35120),W=U(34829),q=U(96535),K=U(73722),z=U(80974),Y=(U(45373),U(88022)),Q=U(51742),X=U(39324),Z=U(95066),J=U(36525),tt=U(90633),et=U(15821);class it{constructor(k,B){this._inner=k,this._manager=B}isOn(k){return this._inner.isOn(k)&&function(k){if(!et.A.isDefined(k))return!1;if("object"==typeof k&&"enabled"in k&&"boolean"==typeof k.enabled)return k.enabled;return!!k}(this._manager.evaluate(k))}isInExperiment(k){return this._inner.isInExperiment(k)}getFeatureValue(k,B){const U=this._manager.evaluate(k);return!et.A.isDefined(U)&&et.A.isDefined(B)?B:U}loadFeatures(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this._inner.loadFeatures(k)}))}setAttributes(k){return this._inner.setAttributes(k)}setAttribute(k,B){return this._inner.setAttribute(k,B)}getVariation(k){return this._inner.getVariation(k)}evalFeature(k){const B=this._inner.evalFeature(k),{value:U}=B,G=(0,F.Tt)(B,["value"]);return Object.assign(Object.assign({},G),{value:this._manager.evaluate(k)})}forceVariation(k,B){return this._inner.forceVariation(k,B)}getAttributes(){return this._inner.getAttributes()}destroy(){return this._inner.destroy()}}var st=U(77601);class nt{constructor(k){this._initialExperimentVariations=new Map,this._inner=k}setIsTestAccount(k,B=!1){if(B){const B=this.getAttributes();this.setAttributes(Object.assign(Object.assign({},B),{is_test_account:k}))}this.refreshExperimentVariations()}isOn(k){return this._inner.isOn(k)}isInExperiment(k){return this._inner.isInExperiment(k)}getFeatureValue(k){const B=this._inner.evalFeature(k);return this.initExperimentGroup(k,B),this._inner.evalFeature(k).value}loadFeatures(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this._inner.loadFeatures(k)}))}setAttributes(k){this._inner.setAttributes(k)}setAttribute(k,B){this._inner.setAttribute(k,B)}getVariation(k){return this._inner.getVariation(k)}evalFeature(k){const B=this._inner.evalFeature(k);return this.initExperimentGroup(k,B),B}initExperimentGroup(k,B){var U,F;if("experiment"!==B.source||!B.experiment||!B.experimentResult)return;if(1===(null===(U=B.experiment.weights)||void 0===U?void 0:U.filter((k=>1===k)).length))return;if(this._initialExperimentVariations.has(k)||this._initialExperimentVariations.set(k,B.experimentResult.variationId),!(null===(F=this.getAttributes())||void 0===F?void 0:F.is_test_account))return;0!==B.experimentResult.variationId&&(console.log(`Feature "${k}" in experiment "${B.experiment.key}" was changed from variation ${B.experimentResult.variationId}, to control variation 0`),this.forceVariation(B.experiment.key,0))}forceVariation(k,B){this._inner.forceVariation(k,B)}getAttributes(){return this._inner.getAttributes()}destroy(){this._inner.destroy()}refreshExperimentVariations(){this._initialExperimentVariations.forEach(((k,B)=>{var U,F;if(null===(U=this.getAttributes())||void 0===U?void 0:U.is_test_account){const k=this.evalFeature(B);console.log(`Set feature "${B}" in experiment "${null===(F=k.experiment)||void 0===F?void 0:F.key}" to control variation`)}else{const U=this._inner.evalFeature(B);U.experiment?(this.forceVariation(U.experiment.key,k),console.log(`Reset feature "${B}" in experiment "${U.experiment.key}" to initial variation ${k}`)):console.log(`Experiment for feature "${B}" not found; cannot reset to initial variation ${k}`)}}))}}var at=U(13956),rt=U(29738),ot=U(23029);class ht{constructor(k,B){this._overrides={},this._inner=k,this.ot=B}isOn(k){return this._inner.isOn(k)}isInExperiment(k){return this._inner.isInExperiment(k)}getFeatureValue(k,B){return this.applyOverride(k,this._inner.getFeatureValue(k,B))}loadFeatures(k){return(0,F.sH)(this,void 0,void 0,(function*(){const[B]=yield Promise.all([this.ot.loadOverrides(this.getAttributes()),this._inner.loadFeatures(k)]);this._overrides=B}))}setAttributes(k){this._inner.setAttributes(k)}setAttribute(k,B){this._inner.setAttribute(k,B)}getVariation(k){return this._inner.getVariation(k)}evalFeature(k){const B=this._inner.evalFeature(k);return Object.assign(Object.assign({},B),{value:this.applyOverride(k,B.value)})}forceVariation(k,B){this._inner.forceVariation(k,B)}getAttributes(){return this._inner.getAttributes()}destroy(){this._inner.destroy()}applyOverride(k,B){const U=this._overrides[k];return j.Aq$.isDefined(U)?U:B}}var ct=U(93867),dt=U(73797),lt=U(91160),ut=U(10670),ft=U(95891);let bt=null;class pt{constructor(k){ft.isEmpty(k)&&j.VyI.log(`Expected the education question interface but got ${k} instead!`,j.$bb.Error),this.learningEngineManager=k.LearningEngineManager}static getInstance(k){const B=!ft.isEmpty(k),U=ft.isEmpty(window.QI||k),F=ft.isEmpty(bt),G=k||window.QI||{};return ft.isEmpty(G.LearningEngineManager)?null:U&&F&&!B?(j.VyI.log("Expected to find the education question interface but did not!",j.$bb.Error),null):((F||B)&&(bt=new pt(G)),bt)}init(k){const B=k.identityProviderFunction();ft.isEmpty(B)&&j.VyI.log(`Expected an identity object but got ${B}`,j.$bb.Error);const U=B.accessToken;this.initEducationNetworkManager(U)||j.VyI.log("The initialization of the Learning Engine Network Manager Failed",j.$bb.Error),this.initEducationGamePlayerManager(k)||j.VyI.log("The initialization of the Learning Engine Player Context Manager Failed",j.$bb.Error)}getEducationStudentContextManagerInstance(){return this.learningEngineManager.getEducationStudentContextManagerInstance()}getGamePlayerContextManagerInstance(){return this.learningEngineManager.getGamePlayerContextManagerInstance()}initEducationNetworkManager(k){return this.learningEngineManager.getNetworkManagerInstance().initWithParams({authAccessToken:k}),!0}initEducationGamePlayerManager(k){const B=ft.isFunction(k.identityProviderFunction)?k.identityProviderFunction():{},U=ft.isFunction(k.playerProviderFunction)?k.playerProviderFunction:()=>null,F=B.uuid?B.uuid:null;return this.learningEngineManager.getGamePlayerContextManagerInstance().setContext((()=>{const k=U(),G=k.getPlayerData(),j=V.q.instance.prodigy.gameContainer.get("f7c-2e57"),$=k.hasMembership();return{userId:F,deprecatedUserId:k.userID,playerParents:k.playerParents,playerTeachers:k.playerTeachers,parentEmail:k.parentEmail,registerDate:k.registerDate.toDateString(),owners:k.owners,classIDs:k.classIDs,membership:$?{start:k.memberStartDate,end:k.memberEndDate}:null,playerClass:k.getPlayerClass()?k.getPlayerClass():null,playerDevicePlatform:k.userDataPlatform,playerPlayLocation:k.locationSelectionType,goalId:k.goalId,playerSessionId:j.getSessionToken(),identityProviderLabel:B.identityProvider,optionalData:{playerMetadata:ft.cloneDeep(G)}}})),!0}}var vt=U(48813),gt=U(29887),mt=U(5018),yt=U(98252),_t=U(30226),Et=U(72937),wt=U(325),Tt=U(45716),St=U(48417),At=U(76546);class Ct extends At.D{loadOverrides(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(St.D.Experiment.LoadOverrides,{growthbookUserAttributes:k},!0)}))}}var Ot=U(23082),It=U(20705);class Dt extends Error{constructor(k,B,U,F,G,j,$){super(F),this.errorID=k,this.codeMap=B,this.debugMessage=U,this.error=F,this.code=G,this.innerError=j,this.userFacingMessage=$,Object.setPrototypeOf(this,Dt.prototype)}static make(k){var B;return new Dt(k.errorID,k.codeMap,k.debugMessage,null!==(B=k.error)&&void 0!==B?B:j.RQr.stringify(k.innerError),k.code,k.innerError,k.userFacingMessage)}}class Rt extends It.f{constructor(){super("login","login",[Y._.Ui_shared_json,Y._.Ui_buttons_json,Y._.Ui_store_json,Y._.Ui_registration_json]),this._loadingSteps=28,this._loadingStepWeight=[3,6,7,9,12,20,23,26,28],this._loadingStepIndex=0,this._baseLoadingBarPercent=.75,this._timer=null,this._loadingStartTime=null,this._loadingEndTime=null,this._loginStartTimeMS=null,this._loginTimeMS=null,this._servers=[],this._technicalMetricsManager=null,this.UNITED_STATES_ISO="US",this._loadingBarPercent=0,this._technicalMetricsManager=V.q.instance.prodigy.gameContainer.get("2a1-fed9"),this.showMenu=!1,this._loadingStartTime=window.loadStartTime,this._disableConsentBanner=!0,this.startLogin()}create(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.Splash),this.prodigyGame.broadcaster.addAppListener(dt.lT.LoginError,this.onError.bind(this),this),k.startTracing(lt.u.SplashCreate),this.prepLogin();try{yt.pF.isNativeApp()&&yt.pF.appType()===yt.uC.IOS_APP&&webkit.messageHandlers.setGameVisible.postMessage(0)}catch(e){}super.create(),k.endTracing(lt.u.SplashCreate)}prepLogin(){const k=new q.W(this.prodigyGame);V.q.instance.prodigy.gameContainer.get("e20-0fb0").initialize(k)}screenSetup(){this.setLoadingBarProgress("Setting up screen"),V.q.instance.prodigy.load.assets([Q.c.Sfx_ui,Q.c.Sfx_registration]),j.VyI.log(`Expo Release Channel: ${window.expoReleaseChannel}`,j.$bb.Verbose),super.screenSetup(),j.Aq$.isDefined(this._loadingEndTime)||(this._loadingEndTime=Date.now(),this._technicalMetricsManager.timeToPlayMS=this._loadingEndTime-this._loadingStartTime),Rt._firstLogin&&V.q.instance.prodigy.gameContainer.get("fab-547a").getData().then((([k,B])=>{k&&j.VyI.log(`Error fetching geolocation information: ${k.getErrorMessage()}`,j.$bb.Error),setTimeout((()=>{const k=this._loadingEndTime-this._loadingStartTime;j.VyI.log(`TTI: ${k}ms`,j.$bb.Verbose),Rt._firstLogin=!1}),100)})).catch(j.RQr.createHandler("Error sending first login information")),this.loadGame().catch(this.onError.bind(this))}loadQuestionRenderer(k){return(0,F.sH)(this,void 0,void 0,(function*(){return new Promise(((B,U)=>{const F=document.createElement("script");F.type="text/javascript",F.src=k,F.async=!1,F.onload=()=>{B()},F.onerror=k=>{k instanceof Error?U(k):U("string"==typeof k?new Error(k):new Error(JSON.stringify(k)))},document.head.appendChild(F)}))}))}loadQuestionInterface(k){return(0,F.sH)(this,void 0,void 0,(function*(){return new Promise(((B,U)=>{const F=document.createElement("script");F.type="text/javascript",F.src=k,F.async=!1,F.onload=()=>{window.ELA_QI&&(window.QI=window.ELA_QI),window.QI?B():U(new Error("Question Interface not found on window"))},F.onerror=k=>{k instanceof Error?U(k):U("string"==typeof k?new Error(k):new Error(JSON.stringify(k)))},document.head.appendChild(F)}))}))}loadQI(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.SplashLoadQI);const B=V.q.instance.prodigy.gameContainer.get("f1d-f7b1").getSubject();j.VyI.log(`Using subject '${B}' for QI session.`,j.$bb.Info);const U=B===wt.Q.Science?"science":"math";k.startTracing(lt.u.SplashLoadQIEducationStatus);const{questionInterfaceURL:G,questionRendererURL:$}=window.SW.Load.getEducationStatus(U);k.endTracing(lt.u.SplashLoadQIEducationStatus),G||this.throwEducationError(`Splash Screen: Error showing education because questionInterfaceURL (${G}) not provided.`,window.SW.Errors.ERROR_CODE_QI);const H=Date.now();this._loginTimeMS=null!==this._loginStartTimeMS?H-this._loginStartTimeMS:0,j.VyI.log(`Login load time: ${this._loginTimeMS}ms`,j.$bb.Verbose),this.setLoadingBarProgress("Loading education"),k.startTracing(lt.u.SplashLoadQILoadQuestion);try{$&&(yield j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){return this.loadQuestionRenderer($)})))))}catch(q){j.RQr.logError(q,"Splash Screen: Unable to load Question Renderer"),this.throwEducationError("Splash Screen: Unable to load Question Renderer",window.SW.Errors.ERROR_CODE_EDUCATION_QUESTION_RENDERER)}k.endTracing(lt.u.SplashLoadQILoadQuestion),this.setLoadingBarProgress("Loading QI"),k.startTracing(lt.u.SplashLoadQILoadQuestionInterface);try{yield j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){return this.loadQuestionInterface(G)}))))}catch(q){j.RQr.logError(q,"Splash Screen: Unable to load Question Interface");const k=j.RQr.stringify(q);this.throwEducationError(`Splash Screen: Unable to load Question Interface: ${k}`,window.SW.Errors.ERROR_CODE_EDUCATION_QUESTION_INTERFACE)}k.endTracing(lt.u.SplashLoadQILoadQuestionInterface);const W=Date.now()-H;j.VyI.log(`Education load time: ${W}ms`,j.$bb.Verbose),null!==this._technicalMetricsManager.timeToPlayMS&&this._technicalMetricsManager.timeToPlayMS>0&&(this._technicalMetricsManager.timeToPlayMS+=W+this._loginTimeMS),k.endTracing(lt.u.SplashLoadQI)}))}loadGame(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B;const U=V.q.instance.prodigy.gameContainer.get("afa-b7c5");U.startTracing(lt.u.SplashLoadGame);const F=this.loadBundledData(),G=yield this._loginDataPromise,$=this.loadQI();yield this.initIap(),yield this.initializeMembershipPurchases(),yield this.updateFeatureAccess(),yield this.getCharacter(G),yield F,this._endgameDataLoad=this.fetchEndgameQuestData(),yield this.initFeatureProvider(),rt.O.tryApplyLocaleOverrideFromFeatureProvider(),yield this.setupEducationData(G.goalId),this.initParentalConsentService(),yield this.initSegment(),yield this.setUpFeatureProvider(),this._gameNativeAppNotificationProvider.triggerNotification({triggerType:X.$P.AppStart}),U.startTracing(lt.u.SplashTitans),yield V.q.instance.prodigy.titansNetworkHandler.getTitans(),U.endTracing(lt.u.SplashTitans),U.startTracing(lt.u.QuestManagerHubSetup);const H=V.q.instance.prodigy.gameContainer.get("a25-68f4"),W={sucess:!0};H.init().catch((k=>{j.RQr.logError(k,"Error setting up quest manager hub"),W.sucess=!1,W.error=j.RQr.stringify(k)})).finally((()=>{W.quest_managers_set_up=Array.from(H.questManagerMap.keys()),U.endTracing(lt.u.QuestManagerHubSetup,W)})),yield V.q.instance.prodigy.gameContainer.get("d69-defe").refreshPetGear(),yield $,yield this.finishLoad(),V.q.instance.prodigy.gameContainer.get("5c7-e02d").postProcessPets();const q=V.q.instance.prodigy.gameContainer.get("c47-20b6");V.q.instance.prodigy.gameContainer.get("e03-b0a9").queueUncollectedTransactions(...null!==(B=null===(k=G.uncollectedOTPTransactions)||void 0===k?void 0:k.map((k=>Object.assign(Object.assign({},k),{analyticsTransactionID:q.purchase.getFunnelID()}))))&&void 0!==B?B:[]),V.q.instance.prodigy.gameContainer.get("c47-20b6").connection.sendGameLoadingEndedEvent(this._loadingStartTime,!0,this._loadingBarPercent),V.q.instance.prodigy.gameContainer.get("c47-20b6").session.sendSessionStartedEvent(),U.endTracing(lt.u.SplashLoadGame)}))}loadBundledData(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B;try{yield j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){yield ot.R.initialize()}))))}catch(U){throw Dt.make({errorID:null===(B=null===(k=window.SW)||void 0===k?void 0:k.Errors)||void 0===B?void 0:B.ERROR_CODE_DATA_BUNDLE,codeMap:Rt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: data bundle load failed",innerError:U})}}))}startLogin(){this._loginDataPromise=this.login()}login(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.SplashLogin);try{let B;for(;!B;)yield j.Egh.timeout(0),B=window.SW.Load.userInfo?JSON.parse(window.SW.Load.userInfo()):null;const U=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let G;switch(U.username=B.name,B.identity_provider){case"clever":G="clever";break;default:G="prodigy"}if(U.userDataPlatform=G,!B)throw Dt.make({errorID:window.SW.Errors.ERROR_CODE_NO_USER,codeMap:Rt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: login failed because no identity user found"});const $=V.q.instance.prodigy.gameContainer.get("c97-bd0d");return yield j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){return new Promise(((F,G)=>{$.login(B.uuid,B.accessToken,B.name,B.email,U,(B=>{k.endTracing(lt.u.SplashLogin,{login_success:!0}),F(B)}),((B,U)=>{k.endTracing(lt.u.SplashLogin,{login_error:!0,error_code:U});const F=U===Rt.READ_ONLY_STATUS_CODE;G(Dt.make({errorID:F?window.SW.Errors.ERROR_CODE_READ_ONLY_CHARACTER:window.SW.Errors.ERROR_CODE_LOGIN_GAME_AUTH_API,codeMap:Rt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: login failed",error:B,code:U,userFacingMessage:F?window.SW.Load.ERROR_DESCRIPTION_READ_ONLY_CHARACTER:void 0}))}))}))}))))}catch(e){throw this.isLoadError(e)?e:Dt.make({errorID:window.SW.Errors.ERROR_CODE_NO_USER,codeMap:Rt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: login failed",innerError:e})}}))}initIap(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.SplashIapInit),new K.V,k.endTracing(lt.u.SplashIapInit)}))}initializeMembershipPurchases(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U;if((yt.pF.isNativeAndroidApp()||yt.pF.isNativeIOSApp())&&yt.pF.eligibleVersionForMobileMembershipPurchase()){const F=V.q.instance.prodigy.gameContainer.get("f7c-2e57");yield null===(U=null===(B=null===(k=window.SW)||void 0===k?void 0:k.MOBILE_MEMBERSHIP_PURCHASES)||void 0===B?void 0:B.initMobileMembershipPurchase)||void 0===U?void 0:U.call(B,F.getUserID(),F.getSessionToken()).then((()=>{j.VyI.log("Mobile membership purchase initialized",j.$bb.Info)})).catch(j.RQr.createHandler("Mobile membership purchase initialization failed"))}}))}updateFeatureAccess(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.SplashUpdateFeatureAccess);try{this.setLoadingBarProgress("Updating Character Feature Data");const k=V.q.instance.prodigy.gameContainer.get("3a0-8003");yield j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){return k.updateFeatureAccess()})))).then((()=>{}))}catch(e){throw k.endTracing(lt.u.SplashUpdateFeatureAccess),Dt.make({errorID:window.SW.Errors.ERROR_CODE_CHARACTER,codeMap:Rt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: initializeCharacter failed",innerError:e})}k.endTracing(lt.u.SplashUpdateFeatureAccess)}))}getCharacter(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=V.q.instance.prodigy.gameContainer.get("afa-b7c5");B.startTracing(lt.u.SplashCharacter),this.setLoadingBarProgress("Getting character");const U=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=V.q.instance.prodigy.gameContainer.get("c97-bd0d");return new Promise(((G,j)=>{F.getCharacter(k,U,(()=>{B.endTracing(lt.u.SplashCharacter,{character_loaded:!0}),G()}),((k,U)=>{B.endTracing(lt.u.SplashCharacter,{character_error:!0,error_code:U}),j(Dt.make({errorID:window.SW.Errors.ERROR_CODE_CHARACTER,codeMap:Rt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: Get character failed",error:k,code:U}))})).catch((k=>{B.endTracing(lt.u.SplashCharacter,{character_error:!0}),j(Dt.make({errorID:window.SW.Errors.ERROR_CODE_CHARACTER,codeMap:Rt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: Get character failed",innerError:k}))}))}))}))}fetchEndgameQuestData(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.SplashFetchEndGameQuestData);try{yield ct.U.fetchProgress();const k=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;ct.U.progressData.step===H.B.NotStarted&&k.hasFoundAllKeystones()&&V.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(1,ut.jT.AllGemsPreviouslyCollected,tt.B.BREADCRUMB_ENDGAME_QUEST_SAW_NOOT_ACADEMY_DIALOGUE)}catch(e){throw k.endTracing(lt.u.SplashFetchEndGameQuestData),Dt.make({errorID:window.SW.Errors.ERROR_CODE_SECURE_CHARACTER,codeMap:Rt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: fetchEndgameQuestData failed",innerError:e})}k.endTracing(lt.u.SplashFetchEndGameQuestData)}))}initFeatureProvider(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.SplashInitFeatureProvider);try{const k=V.q.instance.prodigy.gameContainer,B=k.get("306-5359"),U=k.get("c47-20b6");let $=window.gameEnvironmentVariables.experimentsClientKey;0;const H=G.FeatureFactory.createFeatureProvider(G.EFeatureProvider.growthBook,{apiHost:window.gameEnvironmentVariables.experimentsAPIHost,clientKey:$,backgroundSync:!1,attributes:{id:B.userID.toString()}}),W=new ht(H,k.resolve(Ct)),q=new nt(W),K=new st.mq({contextBase:{get onMobileApp(){return yt.pF.isNativeApp()},get isMember(){return k.get("306-5359").hasMembership()},get isSchoolHours(){return k.get("306-5359").isPlayingAtSchool()}},get:k=>q.evalFeature(k),activate(k){U.create.experimentVariationAssigned(k.experimentResult.featureId,k.experiment.key,k.experimentResult.key,W.getAttributes()).send()}}),z=new it(q,K);k.bind("073-6f3b").toConstantValue(z),k.bind("4aa-ea56").toConstantValue(q),k.bind("6b4-590f").toConstantValue(K),k.bind("47f-ab6a").toConstantValue(new gt.p(z,U)),yield j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){return z.loadFeatures()}))))}catch(e){throw k.endTracing(lt.u.SplashInitFeatureProvider),Dt.make({errorID:window.SW.Errors.ERROR_CODE_EXPERIMENT_PROVIDER,codeMap:{0:"NETWORK_ERROR"},debugMessage:"Error initializing experiment provider",code:0,innerError:e})}k.endTracing(lt.u.SplashInitFeatureProvider)}))}setupEducationData(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=V.q.instance.prodigy.gameContainer.get("afa-b7c5");B.startTracing(lt.u.SplashEducation);try{this.setLoadingBarProgress("Getting curriculum and grade");const U=V.q.instance.prodigy.gameContainer,G=U.get("e20-0fb0").player,$=U.get("c97-bd0d"),H=yield j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){return $.getCurriculumAndGrade(G)})))),W={login_source:"prodigy",user_agent:navigator.userAgent};j.Aq$.isDefined(this._loadingStartTime)&&j.Aq$.isDefined(this._loadingEndTime)&&(W.load_time=this._loadingEndTime-this._loadingStartTime);const q=window.eventData.trackingCookie;q&&(W.identity_track_id=q);const K=Object.assign(Object.assign({},H),{goalId:k});j.Aq$.isDefined(G.primaryParentID)&&(W.parentID=G.primaryParentID),G.onEducationLoaded(K),B.endTracing(lt.u.SplashEducation,{education_loaded:!0})}catch(e){throw B.endTracing(lt.u.SplashEducation,{education_error:!0}),Dt.make({errorID:window.SW.Errors.ERROR_CODE_EDUCATION_API,codeMap:Rt.SKILLS_ERROR_KEYS,debugMessage:"Splash Screen: Load skills failed",innerError:e})}}))}static makeLoadSkillsError(k,B="Splash Screen: Load skills failed"){return Dt.make({errorID:window.SW.Errors.ERROR_CODE_EDUCATION_API,codeMap:Rt.SKILLS_ERROR_KEYS,debugMessage:B,innerError:k})}initParentalConsentService(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.SplashParentalConsentService),V.q.instance.prodigy.gameContainer.get("580-3bea"),k.endTracing(lt.u.SplashParentalConsentService)}initSegment(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.SplashSegment);const B=V.q.instance.prodigy.gameContainer,U=B.get("e20-0fb0").player,F=B.get("c47-20b6");yield F.identify(),F.connection.sendGameLoadingStartedEvent(),U.hasMembership()&&F.purchase.hasSavedFunnelData()&&F.purchase.sendFunnelComplete(),this.prodigyGame.broadcaster.broadcast(dt.bv.AnalyticsInitialized),k.endTracing(lt.u.SplashSegment,{segment_initialized:!0})}))}setUpFeatureProvider(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U,G,$,H;const q=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!(null==q?void 0:q.registerDate))throw Dt.make({errorID:window.SW.Errors.ERROR_CODE_MISSING_PLAYER_DATA,codeMap:{0:"NETWORK_ERROR"},debugMessage:"Missing player data from GraphQL",code:0});const K=V.q.instance.prodigy.gameContainer.get("afa-b7c5");try{K.startTracing(lt.u.SplashSetupFeatureProvider);const z=V.q.instance.prodigy.gameContainer,Y=z.get("073-6f3b"),Q=V.q.instance.prodigy.gameContainer.get("3a0-8003"),X={id:q.userID.toString(),browser:j.o5U.getBrowserType(),device:j.o5U.getDeviceModel(),environment:_t.J.getEnvironment(),is_native_app:yt.pF.isNativeApp(),locale:rt.O.localeCode,registered_date:null!==(k=q.registerDate.getTime())&&void 0!==k?k:(new Date).getTime(),has_started:j.Aq$.isDefined(null===(B=q.data)||void 0===B?void 0:B.startDate),client_version:W.s.get("GameConstants.Build.VERSION"),is_member:q.hasMembership(),can_upgrade_membership:(yield q.getMembershipUpsellData()).upgradeOptions.length>0,member_features:Q.data.features,is_test_account:null===(U=q.data)||void 0===U?void 0:U.isTestAccount,experiment_eligibility:q.data.experimentEligibilityList};z.get("4aa-ea56").setIsTestAccount(!0===X.is_test_account);const[,Z]=yield z.get("fab-547a").getData();q.geolocationData=Z,(null===(G=Z.country)||void 0===G?void 0:G.name)&&(X.country=Z.country.name),(null===($=Z.country)||void 0===$?void 0:$.iso_code)===this.UNITED_STATES_ISO&&(null===(H=Z.subdivisions[0])||void 0===H?void 0:H.iso_code)?X.usState=Z.subdivisions[0].iso_code:X.usState="",Y.setAttributes(X),yield j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){return Y.loadFeatures()})))),vt.T.sendDecisionEvents(),vt.T.forceExperimentVariation(),yield j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){return vt.T.mergeUserExperimentAssetData(q.userID.toString())})))),this._packageFeatureRequirementLoad=mt.G.loadFeatures(),K.endTracing(lt.u.SplashSetupFeatureProvider,{feature_provider_setup:!0})}catch(e){throw K.endTracing(lt.u.SplashSetupFeatureProvider,{feature_provider_error:!0}),Dt.make({errorID:window.SW.Errors.ERROR_CODE_EXPERIMENT_PROVIDER,codeMap:{0:"NETWORK_ERROR"},debugMessage:"Error initializing experiment provider",code:0,innerError:e})}}))}finishLoad(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this.loadWorldList();yield Promise.all([k,V.q.instance.prodigy.skin.applyFestival().then((()=>this.prodigyGame.broadcaster.broadcast(dt.bv.FestivalInitialized))),this._packageFeatureRequirementLoad,this._endgameDataLoad]),(yield k)()}))}loadWorldList(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.SplashWorldList),this.setLoadingBarProgress("Getting worlds");const B=V.q.instance.prodigy.gameContainer;const U=B.get("c97-bd0d"),F=new j.bnh;U.getWorldList(F.resolve,(()=>F.resolve(null))).catch((k=>{j.RQr.createHandler("Error getting world list")(k),F.resolve(null)})),this._servers=yield F,k.endTracing(lt.u.SplashWorldList,{worlds_loaded:!0});const G=B.get("e20-0fb0").player,$=G.data,H=!j.Aq$.isDefined(G.curriculumTreeID)||!j.Aq$.isDefined(G.educationData.curriculumTreeID),W=!j.Aq$.isDefined($.school)||""===$.school,q=!G.hasGrade||H;return k.assignExtraDataToTrace(lt.u.Splash,{requires_user_setup:q||W}),window.QI&&window.SW.Load.userInfo&&this.initializeEducationLearningEngine(window.QI,JSON.parse(window.SW.Load.userInfo())),delete window.SW.Load.userInfo,()=>{q?(G.classIDs=[],this.setLoadingBarProgress("Starting registration"),k.startTracing(lt.u.SplashRegistrationMenu),V.q.instance.prodigy.open.startRegistration((()=>{k.endTracing(lt.u.SplashRegistrationMenu),W?(this.setLoadingBarProgress("Starting character creation"),this.loadCharacterCreateScreen()):(this.setLoadingBarProgress("Starting character selection"),this.loadCharacterSelectScreen())}),void 0,!0,!W)):this.initializeEducation(W).catch((k=>{var B;null===(B=V.q.instance.prodigy.game.state.getCurrentState())||void 0===B||B.onError(k)}))}}))}initializeEducation(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=V.q.instance.prodigy.gameContainer.get("afa-b7c5");B.startTracing(lt.u.SplashPlayerEducationInit),this.setLoadingBarProgress("Loading skills"),j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){return V.q.instance.prodigy.education.loadAndInitEducationData()})))).then((()=>{B.endTracing(lt.u.SplashPlayerEducationInit,{success:!0}),k?(this.setLoadingBarProgress("Starting character creation"),this.loadCharacterCreateScreen()):(this.setLoadingBarProgress("Starting character selection"),this.loadCharacterSelectScreen())})).catch((k=>{throw B.endTracing(lt.u.SplashPlayerEducationInit,{success:!1}),Rt.makeLoadSkillsError(k)}))}))}loadCharacterCreateScreen(){this.loadInitialScreenPrefabScene([$.l.CharacterCreateScreen])}loadCharacterSelectScreen(){this.loadInitialScreenPrefabScene([$.l.CharSelectScreen])}loadInitialScreenPrefabScene(k){const B=V.q.instance.prodigy.gameContainer.get("afa-b7c5");B.startTracing(lt.u.SplashPrefabRequest);const U={requested_prefabs:k.join(",")},F=k.includes($.l.CharacterCreateScreen),G=k.includes($.l.CharSelectScreen);F?U.screen_type="character_creation":G&&(U.screen_type="character_selection");const j=V.q.instance.game.state.states.get(Ot.G.Loading);j&&(j.data.target=Ot.G.PrefabScene),V.q.instance.prodigy.load.assets([Y._.General_core_2_json,Y._.General_icons_json,Y._.Ui_common_neutral_json,Y._.Font_button_json,Y._.Font_general_json],(()=>{U.assets_loaded=!0,V.q.instance.prodigy.startPrefabScene(k,{servers:this._servers,hideParentalConsentBanner:!0}),U.prefab_scene_started=!0,B.endTracing(lt.u.SplashPrefabRequest,U)}))}autoLoginSelectWorld(){V.q.instance.prodigy.open.serverSelectMode(new z.H(this._servers,(()=>{window.hideGameLoader(),V.q.instance.prodigy.loading(!1),V.q.instance.prodigy.world.enter().catch(j.RQr.createHandler("Error entering world"))}),null,null))}initializeEducationLearningEngine(k,B){const U=pt.getInstance(k);if(!U)return;const F={identityProviderFunction:()=>B,playerProviderFunction:()=>V.q.instance.prodigy.gameContainer.get("e20-0fb0").player};U.init(F)}onError(k){if(this.isLoadError(k)){const{debugMessage:B,codeMap:U,errorID:F,error:G,code:$,innerError:H,userFacingMessage:W}=k,q=`Login: onError: ${G}, error code[${$}], debugMessage: ${B}`;j.VyI.log(q,j.$bb.Error),this._loginStartTimeMS=null;const K=V.q.instance.prodigy.gameContainer.get("c97-bd0d").getErrorMessage($,U)||"Unknown error";V.q.instance.prodigy.gameContainer.get("c47-20b6").connection.sendGameLoadingEndedEvent(this._loadingStartTime,!1,this._loadingBarPercent);const z=new J.i;z.setKey(`prodigy_game.game_loading_error_${F}`),z.setValue(1),V.q.instance.prodigy.gameContainer.get("e59-eea6").logStat(z,Z.d.Increment),Et.u.showLoaderIfHidden();const Y=(null!=W?W:K).trim();window.SW.Load.setErrorScreen(B,void 0,Y,F)}else this.isError(k)?(j.VyI.log(`SplashScreen.onError: Error: ${k.message}`,j.$bb.Error),window.SW.Load.setErrorScreen(k.stack,k.name,k.message,void 0)):(j.VyI.log(`SplashScreen.onError: Unknown error type: ${JSON.stringify(null!=k?k:{})}`,j.$bb.Error),window.SW.Load.setErrorScreen(void 0,void 0,void 0,void 0))}isLoadError(k){return k instanceof Dt}isError(k){return k instanceof Error}shutdown(){this.clear(),this.prodigyGame.broadcaster.removeAppListener(dt.lT.LoginError,this);V.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(lt.u.Splash,{completed:!1}),super.shutdown()}clear(){null!==this._timer&&(window.clearTimeout(this._timer),this._timer=null)}throwEducationError(k,B){throw this._loginStartTimeMS=null,Dt.make({errorID:B,codeMap:{500:"EDUCATION_NOT_LOADED"},debugMessage:k,error:"ERROR",code:500})}setLoadingBarProgress(k){this._loadingStepWeight.length<=this._loadingStepIndex&&(j.VyI.log("SplashScreen.setLoadingBarProgress; more steps than defined.",j.$bb.Warning),this._loadingStepIndex=this._loadingStepWeight.length-1),this._loadingBarPercent=100*(this._loadingStepWeight[this._loadingStepIndex++]/this._loadingSteps*(1-this._baseLoadingBarPercent)+this._baseLoadingBarPercent),window.updateGameLoaderProgress(this._loadingBarPercent,k)}}Rt._firstLogin=!0,Rt.LOGIN_ERROR_KEYS={200:Tt.l.AllGood,400:Tt.l.WrongUsernameOrPassword,401:Tt.l.WrongUsernameOrPassword,403:Tt.l.WrongUsernameOrPassword,408:Tt.l.CheckNetworkConnection,409:Tt.l.CheckNetworkConnection,502:Tt.l.NetworkOffline,503:Tt.l.NetworkOffline,500:Tt.l.NetworkOffline,0:Tt.l.NetworkOffline},Rt.SKILLS_ERROR_KEYS={0:"NETWORK_ERROR_SKILLS"},Rt.READ_ONLY_STATUS_CODE=13,(0,F.Cg)([(0,at.b)("5a6-53a5"),(0,F.Sn)("design:type",Object)],Rt.prototype,"_gameNativeAppNotificationProvider",void 0)},26022:(k,B,U)=>{"use strict";U.d(B,{b:()=>re});var F=U(8674),G=U(62459),j=U(88022),$=U(99625),H=U(90633),V=U(35120),W=U(98013),q=U(34829),K=U(48975),z=U(10592),Y=U(93867),Q=U(33359),X=U(37155),Z=U(52322),J=U(13367),tt=U(78703),et=U(95798),it=U(98623);class st extends it.H{constructor(k,B,U,F,G,j){super(k,B,U,F),this.iceBlockSprite=null,this.iceBlockSprite=this.add(V.q.instance.prodigy.create.sprite(0,0,j.atlas,j.tag)),this.iceBlockSprite.anchor.set(j.x,j.y);const $=Math.floor(this.iceBlockSprite.width/G.size),H=Math.floor((U-this.iceBlockSprite.width*j.x)/G.size),W=Math.floor(this.iceBlockSprite.height/G.size),q=Math.floor((F-this.iceBlockSprite.height*j.y)/G.size);for(let V=H;V=500&&(this.chestType="C")}}const X=U.getState(this.chestID);G.Aq$.isDefined(X)&&0!==X?(this.chestSprite=this.add(V.q.instance.prodigy.create.sprite(0,0,j._.Tileset_core_json,`chest-${this.chestType}-2`)),this.chestSprite.inputEnabled=!1):(this.chestSprite=this.add(V.q.instance.prodigy.create.sprite(0,0,j._.Tileset_core_json,`chest-${this.chestType}-1`)),this.chestSprite.inputEnabled=!0),this.chestSprite.events.onInputDown.add((()=>{this.clicked()}),this),this.chestSprite.x-=Math.floor(.5*this.chestSprite.width),this.chestSprite.y=-this.chestSprite.height;const Z=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(ut.J.shouldSuppressAd(Z)&&"C"===this.chestType){this.chestSprite.tint=3355443;const k=V.q.instance.prodigy.create.sprite(0,.5*-this.chestSprite.height,j._.Ui_icons_json,"icon-medium-lockglow");k.anchor=new nt.Point(.5,.5),this.add(k)}this.path=W,this._segment.container.sendContainerDiscoveredEvent("A"===this.chestType?ct.ZF.WorldChest:ct.ZF.WorldMemberChest,this.chestID,this.chestSprite.x,this.chestSprite.y)}process(k){this.highlight(!1);const B=k.getState(this.chestID);G.Aq$.isDefined(B)&&0!==B&&(this.chestSprite.inputEnabled=!1,this.chestSprite.frameName=`chest-${this.chestType}-2`);const U=k.getQuestState();if(!G.Aq$.isDefined(U)||!G.Aq$.isDefined(U.req))return;const F=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;for(let G=0;GF.backpack.hasItem(U.req.type,U.req.ID)&&this.highlight(!0,-80,-90)}}clicked(){this.path.findPath(this.user.x,this.user.y,this.x-20,this.y+20,!0).then((k=>{k&&this.user.setPath(k,this.collect.bind(this))})).catch(G.RQr.createHandler("Unable to find path to chest"))}collect(){if(!this.user.evtProc&&G.cj9.distance(this.user.x,this.user.y,this.x,this.y)>50)return;const k=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if("C"===this.chestType&&!k.hasMembership()){const B={conversionFunnelName:ft.o.FunnelOpenMemberChestWorld,conversionFunnelMetadata:V.q.instance.prodigy.world.getCurrentMap()},U=ut.J.showYouTubeMembershipAd(this.game,!0)?dt.R.Video:dt.R.Static;if(this._segment.purchase.sendFunnelStart({type:"Open-Member-Chest-World",category:"World",contentId:V.q.instance.prodigy.world.getCurrentMap(),adType:U}),this._segment.container.sendContainerOpenedFailedEvent(ct.ZF.WorldMemberChest,this.chestID,lt.WE.MemberLocked,ht.N.OpenWorld),ut.J.shouldSuppressAd(k)){let k,B,U;k=this.x>640?.75:.25,this.y>360?(B=this.y+10,U=ot.i.UP):(B=this.y-this.chestSprite.height-10,U=ot.i.DOWN),V.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:this.x,yPosition:B,arrowXRelPos:k,arrowDirection:U})}else V.q.instance.prodigy.open.membershipInfo(null,B);return}if(G.Aq$.isDefined(this._chestKey)&&0===k.backpack.hasItem(this._chestKey.type,this._chestKey.ID))return void V.q.instance.prodigy.open.messageBoxPrefab({text:"CHEST_LOCKED_MESSAGE",textArgs:[this._chestKey.type,this._chestKey.ID]});"A"!==this.chestType&&"C"!==this.chestType||this._segment.container.sendContainerOpenedEvent("A"===this.chestType?ct.ZF.WorldChest:ct.ZF.WorldMemberChest,this.chestID,ht.N.OpenWorld),k.saveEnabled=!1,this.game.input.enabled=!1,this.chestSprite.inputEnabled=!1,this.user.evtProc=!0,V.q.instance.prodigy.audio.playSFX(18,"whoosh");this.game.add.tween(this.chestSprite,this).to({x:"-=5"},50,G.GS3.Linear.None).to({x:"+=10"},150,G.GS3.Linear.None).to({x:"-=10"},150,G.GS3.Linear.None).to({x:"+=5"},50,G.GS3.Linear.None).to({y:"-=50"},200,G.GS3.Quadratic.Out).to({y:"+=50"},200,G.GS3.Quadratic.In).to({y:"-=20"},100,G.GS3.Quadratic.Out).to({y:"+=20"},100,G.GS3.Quadratic.In).start().onTweenComplete.add(this.openChest,this,1)}openChest(){V.q.instance.prodigy.audio.playSFX(18,"dig"),V.q.instance.prodigy.audio.playSFX(19,"item"),this.chestSprite.frameName=`chest-${this.chestType}-2`,this.game.input.enabled=!0,V.q.instance.prodigy.open.gotItem(this.reward,(()=>{this.setOpenedState()}),null,"open-chest",void 0,void 0,{source_type:"B"!==this.chestType?"A"===this.chestType?at.C.WorldChest:at.C.WorldMemberChest:null})}setOpenedState(){const k=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.zone.setState(this.chestID,1),G.Aq$.isDefined(this.key)&&k.backpack.consume(this._chestKey.type,this._chestKey.ID,1),this.user.evtProc=!1,k.saveEnabled=!0,this.callback()}}class pt extends it.H{constructor(k,B,U,F,G,$,H,W,q=0){super(k,B,U,F),this._overlayImg=null,this._overlayImg=this.add(V.q.instance.prodigy.create.image(0,0,j._.General_core_json,"overlay-light")),this._overlayImg.width=G,this._overlayImg.height=$,this._overlayImg.inputEnabled=!0,this._overlayImg.alpha=q,this.onProcess=W,this.onClick=H,this._overlayImg.events.onInputDown.add(this.clicked.bind(this))}clicked(k,B){G.Aq$.isDefined(this.onClick)&&this.onClick(this)}process(k,B){G.Aq$.isDefined(this.onProcess)&&this.onProcess(k,B)}cleanup(){this._overlayImg&&(this._overlayImg.destroy(),this._overlayImg=null),this.onClick=null,this.onProcess=null}}var vt=U(95891),gt=U(73797);class mt extends pt{constructor(k,B,U,F,G,j,$,H,V,W){super(k,B,U,F,G,j,H,V,W),this.moveToX=null,this.moveToY=null,this.moveToX=vt.get($,"moveToX",U),this.moveToY=vt.get($,"moveToY",F),this.addPathingIconFunction=vt.get($,"addPathingIconFunction",null)}clicked(k,B){super.clicked(k,B),this.game.broadcaster.broadcast(gt.pm.MovePlayer,null,[this.moveToX,this.moveToY])&&(G.Aq$.isDefined(this.addPathingIconFunction)?this.addPathingIconFunction(B.x,B.y):G.VyI.log("ClickableMoveEvent.clicked - pathing was successful, but parent does not have addPathingIcon function. No pathing star shown.",G.$bb.Error))}}class yt extends it.H{constructor(k,B,U,F,j,$,H,W,q){super(k,B,U,F),this.user=null,this.path=null,this.ID=null,this.callback=null,this.collected=!1,this.allowCollect=!1,this.data=null,this.questState=null,this.user=j,this.path=$,this.ID=H,this.callback=q,this.data=G.Aq$.isDefined(W)?W:{range:30},G.Aq$.isDefined(W.range)||(this.data.range=30),this.allowCollect=!1,this.visible=!1,this.highlight(!1);const K=this.add(V.q.instance.prodigy.icon.createFromData(W,0,0,null,null,null,null,vt.get(W,"showLoading",!0)));K.inputEnabled=!0,K.events.onInputDown.add(this.clicked.bind(this),this),K.x-=Math.floor(.5*K.width),K.y=-K.height}process(k){this.allowCollect=!1,this.visible=!1,this.highlight(!1);const B=k.getQuestState();if(G.Aq$.isDefined(B)&&G.Aq$.isDefined(B.req)&&(this.questState=B.state,1!==B.state[this.ID]&&("item"===B.req.type||"key"===B.req.type)&&B.req.ID===this.data.ID&&!this.collected)){this.visible=!0;const k=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;B.req.N>k.backpack.hasItem(B.req.type,B.req.ID)&&(this.allowCollect=!0,this.highlight(!0,-80,-90))}}clicked(){this.path.findPath(this.user.x,this.user.y,this.x,this.y,!0).then((k=>this.clickedCallback(k))).catch(G.RQr.createHandler("Unable to find a path to the collectable"))}clickedCallback(k){k&&this.user.setPath(k,(()=>{this.collect()}))}collect(){if(!this.allowCollect||G.cj9.distance(this.user.x,this.user.y,this.x,this.y)>this.data.range)return;const k=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.collected=!0,this.questState[this.ID]=1,k.state.updated=!0,V.q.instance.prodigy.audio.playSFX(18,"dig"),k.backpack.add(this.data.type,this.data.ID),this.callback()}}const _t=U(56942).Q.Spine_npc_firefly_json;class Et extends pt{constructor(k,B,U,F,G,j,$,H,W=0){super(k,B,U,F,G,j,$,H,W),this.moving=!1,this._dir=1,V.q.instance.prodigy.load.assets([_t],(()=>{this._spine=this.add(V.q.instance.prodigy.create.spine(.5*G,.5*j+40,_t)),this.delay()}))}move(){if(this.game){this.moving=!0;const k=1080*Math.random()+100,B=520*Math.random()+100;kthis.x&&-1===this._dir&&(this._spine.scale.x*=-1,this._dir=1),this._spine.setAnimationByName(0,"walk",!0).mixDuration=.2,this._tween=this.game.add.tween(this,this,!0).to({x:k,y:B},2500,G.GS3.Quadratic.InOut),this._tween.start(),this._tween.onTweenComplete.add(this.delay,this)}}delay(){if(this._spine.setAnimationByName(0,"idle",!0).mixDuration=.2,this.game){this.moving=!1;const k=V.q.instance.prodigy.event.create();k.delay(3e3*Math.random()+2e3),k.function(this.move.bind(this)),k.start()}}cleanup(){this._spine&&(this._spine.destroy(),this._spine=null),this._tween&&(V.q.instance.game.tweens.remove(this._tween),this._tween=null),super.cleanup()}}var wt=U(79421);class Tt extends it.H{constructor(k,B,U,F,G,$,H,W,q,K){super(k,B,U,F),this.ID=null,this.user=null,this.chestType=null,this.mods=null,this.zoneName="",this.path=null,this.sprite=null,this.zone=null,this.ID=H,this.user=G,this.chestType=W,this.mods=q,this.zoneName=K,this.sprite=this.add(V.q.instance.prodigy.create.animatedSprite(0,0,j._.Tileset_core_json,[`chest-${this.chestType}-1`,`chest-${this.chestType}-2`])),this.sprite.inputEnabled=!0,this.sprite.events.onInputDown.add((()=>{this.clicked()}),this),this.sprite.x-=Math.floor(.5*this.sprite.width),this.sprite.y=-this.sprite.height,this.path=$}process(k){this.zone=k,this.highlight(!1);const B=k.getState(this.ID);G.Aq$.isDefined(B)&&0!==B&&(this.sprite.inputEnabled=!1,this.sprite.frameName=`chest-${this.chestType}-2`)}clicked(){this.path.findPath(this.user.x,this.user.y,this.x-20,this.y+20,!0).then((k=>{k&&this.user.setPath(k,(()=>{this.collect()}))})).catch(G.RQr.createHandler("Unable to find path to mimic"))}collect(){if(!this.user.evtProc&&G.cj9.distance(this.user.x,this.user.y,this.x,this.y)>50)return;V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.saveEnabled=!1,this.sprite.inputEnabled=!1,this.user.evtProc=!0,this.openChest()}openChest(){const k=V.q.instance.prodigy.event.create();k.sound(18,"dig"),k.function(this.user.chat.bind(this.user,1)),k.delay(1e3),k.enableInput(!0),k.function(this.startMimicBattle.bind(this)),k.start()}startMimicBattle(){V.q.instance.prodigy.battle.start(this.mods,this.afterBattle.bind(this,this.game,this.zoneName,this.x,this.y),this.afterBattle.bind(this,this.game,this.zoneName,this.x,this.y),null,this.zone.defaultOnFaint)}afterBattle(k,B,U,F){V.q.instance.prodigy.world.it(B,U-20,F+20,null,{callback:this.zone.setState.bind(this.zone,this.ID,1)})}}var St=U(59968);class At extends St.R{constructor(k,B,U,F,$,H,W){super(k,B,W,null,U,F),this._tag=$,this.sprite=this.sprites.addChild(V.q.instance.prodigy.create.sprite(0,0,$,0,void 0,this.onTextureLoaded.bind(this))),this.sprite.anchor.set(.5,1),G.Aq$.isDefined(H)&&(this.sprite.inputEnabled=!0,this.sprite.events.onInputDown.add((()=>{H(),this.sendNpcClickedEvent()}))),this.showName(),$!==j._.Npc_sprite_slurpy_json&&$!==j._.Npc_sprite_slime_guard_json||(this.nameText.GameObject.legacyTransform.y+=40)}animate(k="stand"){this.sprite.animations.play(k,void 0,!0)}onTextureLoaded(k){k&&(this._tag.indexOf("monster")>-1?(k.animations.add("walk",[0,1,2,3,4,5,6,7],10,!0,!1),k.animations.add("stand",[8,9,10,11,12,13,14,15],10,!0,!1)):k.animations.addIfFound("stand",["npc_0","npc_1","npc_2","npc_3","npc_4","npc_5","npc_6","npc_7"],10,!0))}stand(){1!==this.mode&&(this.mode=1,this.animate("stand"))}walk(){0!==this.mode&&(this.mode=0,this.animate("walk"))}}class Ct extends St.R{constructor(k,B,U,F,$,H,W,q=!1){super(k,B,W,null,U,F),this._fadeIn=q,this.alpha=q?0:this.alpha,this._body=this.add(V.q.instance.prodigy.create.sprite(0,-60,j._.Npc_sprite_broccolina_json,"body_0",void 0,this.onBodyLoaded.bind(this))),this._head=this.add(V.q.instance.prodigy.create.sprite(9,-108,j._.Npc_sprite_broccolina_json,"head_0",void 0,this.onHeadLoaded.bind(this))),this.sprites.addChild(this._body),this.sprites.addChild(this._head),k.add.tween(this._head,this).to({y:"-=1"},100,G.GS3.Linear.None).to({y:"+=2"},400,G.GS3.Linear.None).to({y:this._head.y},300,G.GS3.Linear.None).loop(!0).start(),G.Aq$.isDefined(H)&&this.addOnClick(H.bind(this)),this.nameText.GameObject.legacyTransform.y+=20,this.showName()}onBodyLoaded(k){var B;k.animations.add("stand",["body_0","body_1","body_2"],4,!0,!1),k.animations.play("stand",void 0,!0),this._fadeIn&&(null===(B=this.game.add.tween(this,this))||void 0===B||B.to({alpha:1},800,G.GS3.Quadratic.In,!0))}onHeadLoaded(k){k.animations.add("stand",["head_0","head_1","head_2"],5,!0,!1),k.animations.play("stand",void 0,!0)}}var Ot=U(18916);class It extends St.R{constructor(k,B,U,F,$,H,W){super(k,B,W,null,U,F),this.nameText.GameObject.legacyTransform.group.position.set(26,-140);const q=this.add(V.q.instance.prodigy.create.sprite(-20,-75,j._.Npc_sprite_eugene_json,"right_arm"));this._body=this.add(V.q.instance.prodigy.create.sprite(0,-80,j._.Npc_sprite_eugene_json,"body_0",void 0,this.onTextureLoaded.bind(this)));const K=this.add(V.q.instance.prodigy.create.sprite(40,-75,j._.Npc_sprite_eugene_json,"left_arm_0")),z=this.add(V.q.instance.prodigy.create.sprite(0,-110,j._.Npc_sprite_eugene_json,"head"));this.sprites.addChild(q),this.sprites.addChild(this._body),this.sprites.addChild(z),this.sprites.addChild(K),k.add.tween(z,this).to({y:"-=1"},200,G.GS3.Linear.None).to({y:"+=2"},500,G.GS3.Linear.None).to({y:z.y},400,G.GS3.Linear.None).loop(!0).start(),k.add.tween(K,this).to({y:"+=2"},800,G.GS3.Linear.None).delay(600).to({y:K.y},800,G.GS3.Linear.None).loop(!0).start(),k.add.tween(q,this).to({y:"+=2",x:"-=1"},800,G.GS3.Linear.None).delay(600).to({y:q.y,x:q.x},800,G.GS3.Linear.None).loop(!0).start(),G.Aq$.isDefined(H)&&this.addOnClick(H.bind(this)),this.showName()}onTextureLoaded(k){k&&(k.animations.add("stand",["body_0","body_1","body_2","body_2","body_2","body_2","body_1"],5,!0,!1),k.animations.play("stand",void 0,!1))}}var Dt=U(26657);class Rt extends St.R{constructor(k,B,U,F,G,j){super(k,B,j,null,U,F),this.tween=null,this.nameText.GameObject.legacyTransform.group.position.set(-10,-150)}setup(k,B){const U=j._.Npc_sprite_jim_json,F="jelly-idle-",G=this.add(V.q.instance.prodigy.create.sprite(0,0,U,`${F}1`));G.anchor.set(.5,1),this.sprites.addChild(G),B&&(this.sprites.scale.x=-1),this.tween=new Dt.s(G),this.tween.set("frameName",[`${F}1`,`${F}2`,`${F}3`,`${F}4`,`${F}5`,`${F}6`,`${F}7`,`${F}8`],150,9999),this.stand()}update(){G.Aq$.isDefined(this.tween)&&this.tween.update(Date.now())}walk(){this.stand()}stand(){this.tween.start()}flipJim(k){this.sprites.scale.x=k?-1:1}}class Pt extends St.R{constructor(k,B,U,F,$,H,W,q,K){if(super(k,B,W,null,U,F),this.radish=null,this.nameText.GameObject.legacyTransform.group.position.set(q,K),$===j._.Npc_sprite_slime_worker_json)this.body=this.add(V.q.instance.prodigy.create.sprite(0,-60,j._.Npc_sprite_slime_worker_json,"body_0")),this.face=this.add(V.q.instance.prodigy.create.sprite(12,-45,j._.Npc_sprite_slime_worker_json,"face",void 0,this.onBodyALoaded.bind(this))),this.radish=this.add(V.q.instance.prodigy.create.sprite(20,-80,j._.Npc_sprite_slime_worker_json,"radish_0",void 0,this.onRadishLoaded.bind(this))),this.faceTween=k.add.tween(this.face,this).to({y:"-=1"},300,G.GS3.Linear.None).to({y:this.face.y},300,G.GS3.Linear.None).delay(100).loop(!0).start(),this.sprites.addChild(this.radish),this.sprites.addChild(this.body),this.sprites.addChild(this.face),G.Aq$.isDefined(H)&&(this.body.inputEnabled=!0,this.body.events.onInputDown.add(H)),this.nameText.GameObject.legacyTransform.y-=100;else{this.body=this.add(V.q.instance.prodigy.create.sprite(-30,-63,j._.Npc_sprite_slime_worker_json,"red_0",void 0,this.onBodyBLoaded.bind(this)));const B=this.add(V.q.instance.prodigy.create.sprite(-55,-110,j._.Zone_bonfire_json,"pot"));this.face=this.add(V.q.instance.prodigy.create.sprite(-18,-45,j._.Npc_sprite_slime_worker_json,"face_red")),k.add.tween(this.face,this).to({y:"-=1"},300,G.GS3.Linear.None).to({y:this.face.y},300,G.GS3.Linear.None).delay(100).loop(!0).start(),this.sprites.addChild(B),this.sprites.addChild(this.body),this.sprites.addChild(this.face),this.nameText.GameObject.legacyTransform.y-=100}this.showName()}idle(){this.body.animations.play("idle",void 0,!1),this.face.frameName="stand_face",this.face.x-=7,this.body.y-=15,V.q.instance.game.tweens.remove(this.faceTween),this.face.y=-60,this.faceTween=this.game.add.tween(this.face,this).to({y:"-=1"},300,G.GS3.Linear.None).to({y:this.face.y},300,G.GS3.Linear.None).delay(100).loop(!0).start()}onBodyALoaded(k){k===this.body&&(this.body.animations.add("stand",["body_0","body_1","body_2"],8,!0,!1),this.body.animations.add("idle",["stand_0","stand_1","stand_2"],8,!0,!1),this.body.animations.play("stand",void 0,!1))}onBodyBLoaded(k){k===this.body&&(this.body.animations.add("stand",["red_0","red_0","red_1","red_1","red_2","red_2"],10,!0,!1),this.body.animations.play("stand",void 0,!1))}onRadishLoaded(k){k===this.radish&&this.radish.animations.add("stand",["radish_0","radish_1","radish_2"],10,!0,!1)}}var Mt=U(43531),Nt=U(87337),xt=U(12676);class Lt extends it.H{constructor(k,B,U,F,G,j,$,H,V=!1){super(k,B,U,F),this.SPRITE_ALIAS={slurpy:88,bok:62},this.dialogueController=null,this.npcTag=G,this.onComplete=H,this.updateCallback=$,this.fadeIn=V,V&&(this.alpha=0)}setup(k,B,U,F){const G=F||["npc_0","npc_1","npc_2","npc_3","npc_4","npc_5","npc_6","npc_7"];this.npc=this.add(V.q.instance.prodigy.create.sprite(0,0,`atlas-${this.SPRITE_ALIAS[B]}`,0)),this.npc.animations.addIfFound("stand",G,10,!0),this.npc.animations.play("stand",10,!0),this.npc.inputEnabled=!0,this.npc.anchor.set(.5,1),this.npc.events.onInputDown.add(this.process.bind(this,k,null,!0),this),U&&(this.npc.scale.x=-1),V.q.instance.prodigy.create.nameFont(this,0,0-this.npc.height-20,B.charAt(0).toUpperCase()+B.slice(1))}process(k,B,U){this.dialogueController&&this.dialogueController.close();if(!V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.isZoneQuestEnabled)return;if(this.dialogueController=new Mt.rD(this.game),!G.Aq$.isDefined(k.getQuestState())){if(k.startQuest(1),!G.Aq$.isDefined(k.getQuest(1)))return;return this.queueEventText(k,"onStart",1,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{this.updateCallback()}}]),this.dialogueController.start(),null}const F=k.getQuestState().ID,j=k.getQuest(F);if(k.isQuestComplete(F)&&!j.chain){const B=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.queueEventText(k,"onComplete",F,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{B.saveEnabled=!1,j.end(),G.Aq$.isDefined(j.reward)&&j.reward.length>0?(k.completeQuest(F),V.q.instance.prodigy.open.gotItem(j.reward,(()=>{B.saveEnabled=!0,this.updateCallback()}),null,"advanced-quest-event-reward",null,null,{source_type:at.C.QuestReward})):(k.completeQuest(F),B.saveEnabled=!0,this.updateCallback())}}]),this.dialogueController.start()}else!k.isQuestStarted(F)&&G.Aq$.isDefined(j)?(this.queueEventText(k,"onStart",F,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{k.startQuest(F),this.updateCallback()}}]),this.dialogueController.start()):U&&G.Aq$.isDefined(j)?(this.queueEventText(k,"onStart",F,this.dialogueController),this.dialogueController.start()):U&&this.onComplete()}queueEventText(k,B,U,F){const j=k.getQuest(U);if(G.Aq$.isDefined(null==j?void 0:j[B]))for(let G=0;Gj.x),this.fadeIn&&this.fade(),this.dialogueController&&this.dialogueController.close();if(!V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.isZoneQuestEnabled)return;if(this.dialogueController=new Mt.rD(this.game),U&&this._segment.gameWorld.sendNpcClickedEvent({npc_name:xt.N.Eve,npc_type:Nt.ac.QuestGiver,npc_id:"NPC_NAME_EVE"}),!G.Aq$.isDefined(k.getQuestState()))return void((null===(F=k.getQuest(1))||void 0===F?void 0:F.questGiver)===this.npcTag&&(k.startQuest(1),this.queueEventText(k,"onStart",1,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{this.updateCallback()}}]),this.dialogueController.start()));const $=k.getQuestState().ID,H=k.getQuest($),W=G.Aq$.isDefined(H)&&G.Aq$.isDefined(H.questGiver)?H.questGiver:this.npcTag,q=G.Aq$.isDefined(H)&&G.Aq$.isDefined(H.questReceiver)?H.questReceiver:this.npcTag;if(k.isQuestComplete($)&&!H.chain)if(q===this.npcTag){const B=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.queueEventText(k,"onComplete",$,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{B.saveEnabled=!1,H.end(),G.Aq$.isDefined(H.reward)&&H.reward.length>0?(k.completeQuest($),V.q.instance.prodigy.open.gotItem(H.reward,(()=>{B.saveEnabled=!0,this.updateCallback()}),null,"advanced-quest-event-reward",null,null,{source_type:at.C.QuestReward})):(k.completeQuest($),B.saveEnabled=!0,this.updateCallback())}}]),this.dialogueController.start()}else W===this.npcTag&&(this.queueEventText(k,"onStart",$,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{this.updateCallback()}}]),this.dialogueController.start());else!k.isQuestStarted($)&&G.Aq$.isDefined(H)&&W===this.npcTag?(this.queueEventText(k,"onStart",$,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{k.startQuest($),this.updateCallback()}}]),this.dialogueController.start()):U&&G.Aq$.isDefined(H)?(this.queueEventText(k,W===this.npcTag?"onStart":"alternateOnStart",$,this.dialogueController),this.dialogueController.start()):U&&this.onComplete()}update(){super.update();const k=Date.now();for(let B=0;B100*Math.random()+10&&(this.tweens=this.standTween2,this.stand(),this.idleCounter=0)}resetToDefaultIdle(){this.tweens=this.standTween1,this.stand()}}var Bt=U(52437),Ut=U(85604),Ft=U(23082),Gt=U(73678);class jt extends it.H{constructor(k,B,U){super(k,B,440,5),this.user=null,this.banner=null,this.icon=null,this.state=null,this.text=null,this.user=U,this.banner=V.q.instance.prodigy.create.panel(this,0,0,10,2,"banner"),this.banner.visible=!1,this.icon=this.add(V.q.instance.prodigy.create.sprite(50,5,j._.General_icons_json,"quest")),this.state=this.add(V.q.instance.prodigy.create.sprite(50,5,j._.General_icons_json,"quest")),this.icon.visible=!1,this.state.visible=!1,this.arrow=this.add(V.q.instance.prodigy.create.sprite(175,0,j._.General_icons_json,"up")),this.arrow.visible=!1}process(k,B){const U=V.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);this.visible=!1;let F=null;if(G.Aq$.isDefined(this.text)&&(F=this.text.text,this.text.destroy()),this.state.frameName="quest",this.icon.loadNewTexture(j._.General_icons_json,"quest"),this.state.visible=this.icon.visible=!0,G.Aq$.isDefined(k.getState("dailyQuest"))){if(k.hasDailyQuestExpired()||k.isDailyQuestComplete()&&k.getState("handedOverQuest"))return;const B=k.getDailyQuestDescription(0);if(k.isDailyQuestComplete())this.icon.destroy(),this.icon=this.add(V.q.instance.prodigy.create.sprite(50,5,j._.General_icons_json,"quest-complete")),this.icon.x=350-this.icon.width,this.state.frameName="quest-complete",this.text=V.q.instance.prodigy.create.font(this,98,24,U.getText("QUEST_JOB_COMPLETE"),{align:"center",width:204,size:20});else if("pet"===B.type){this.icon.destroy();const k=k=>{k.x=350-k.width,k.onTextureLoaded=null};this.icon=this.add(V.q.instance.prodigy.icon.createFromData(B,300,5,null,k.bind(this))),this.state.visible=!1,this.text=V.q.instance.prodigy.create.font(this,50,24,U.getText("QUEST_PROGRESS_DEFEAT_MORE",B.N),{size:20})}this.banner.visible=!0,this.visible=!0}else if(Y.U.shouldShowEndgameQuestBanner(k.ID))return this.x-=20,this.icon.x=390-this.icon.width,this.text=V.q.instance.prodigy.create.font(this,98,24,U.getText("ENDGAME_QUEST_BANNER_GO_TO_ACADEMY"),{align:"center",width:244,size:20}),this.banner.destroy(),this.banner=V.q.instance.prodigy.create.panel(this,0,0,11,2,"banner"),this.banner.parent.setChildIndex(this.banner,0),void(this.visible=!0);const $=k.getQuestState();if(!G.Aq$.isDefined($)||!G.Aq$.isDefined($.req))return;const H=k.getQuest($.ID);if(!G.Aq$.isDefined(H))return;const W=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(k.isQuestComplete($.ID)){if(this.icon.destroy(),this.icon=this.add(V.q.instance.prodigy.create.sprite(50,5,j._.General_icons_json,"quest-complete")),this.state.frameName="quest-complete",this.text=V.q.instance.prodigy.create.font(this,98,24,U.getText("QUEST_JOB_COMPLETE"),{align:"center",width:204,size:20}),!H.chain&&!B.isQuestHub&&!k.isQuestProcessed($.ID)){$.ID===k.finalQuestId?this.processLegacyQuestFlow(k,H,$):this.processSimpleQuestFlow(k)}}else if(G.Aq$.isDefined(H.area)&&!ut.J.inArray(H.area,W.data.zone))this.text=V.q.instance.prodigy.create.font(this,98,24,U.getText("QUEST_FOLLOW_PATH"),{align:"center",width:204,size:20});else{const k=$.req;G.Aq$.isDefined(H.descKey)&&vt.size(H.descKey)>0?this.text=V.q.instance.prodigy.create.font(this,98,24,U.getText(H.descKey),{align:"center",width:204,size:20}):ut.J.inArray(["item","weapon","hat","outfit","boots","key"],k.type)?(this.remove(this.icon),this.icon=this.add(V.q.instance.prodigy.icon.createFromData(k,50,5,null,(k=>{this.icon.x=350-k.width}))),this.state.visible=!1,this.text=V.q.instance.prodigy.create.font(this,50,24,U.getText("QUEST_PROGRESS_COLLECT_MORE",Math.max(0,k.N-W.backpack.hasItem(k.type,k.ID))),{size:20}),112===k.ID&&"item"===k.type&&(this.icon.y-=10)):"pet"===k.type?(this.remove(this.icon),this.icon=this.add(V.q.instance.prodigy.icon.createFromData(k,50,5,null,(k=>{this.icon.x=350-k.width}))),this.state.visible=!1,this.text=V.q.instance.prodigy.create.font(this,50,24,U.getText("QUEST_PROGRESS_DEFEAT_MORE",k.N),{size:20})):"clear"===k.type&&(this.state.visible=!1,this.text=V.q.instance.prodigy.create.font(this,50,24,U.getText("QUEST_CLEAR",k.T),{size:20}))}if(this.banner.visible=!0,this.icon.x=350-this.icon.width,G.Aq$.isDefined(this.text)&&F!==this.text.text&&G.Aq$.isDefined(F)){this.arrow.visible=!0,this.arrow.y=50,this.arrow.alpha=1;this.game.add.tween(this.arrow,this).to({y:30,alpha:0},1e3,G.GS3.Linear.None).start().onTweenComplete.add((()=>{this.arrow.visible=!1}),this)}this.visible=!0}destroy(k={children:!0}){this.banner&&(this.banner.destroy(),this.banner=null),this.user=null,this.icon=null,this.state=null,this.text=null,super.destroy(k)}processSimpleQuestFlow(k){var B;const U=jt.ZONE_NPC_CONFIG_MAP[k.ID],F=this.game.state.get(Ft.G.TileScreen),j=175,$=this.user.position.x+j>this.game.width,H=$?this.user.position.x-j:this.user.position.x+j,W=!$&&!U.isRightFacing||$&&U.isRightFacing;if(Object.values(Ut.y).find((k=>k===U.asset))){const B=V.q.instance.prodigy.event.create();B.text(39,U.asset);const G=()=>{B.start()};F.addConstructedQuestNPC(H,this.user.position.y,U.asset,W,G.bind(this),!0).process(k,null,!0)}else V.q.instance.prodigy.prefabFactory.addPrefabNPC(U.asset,H,this.user.position.y,W,!0).then((k=>{k.findComponent(Bt.$).process()})).catch(G.RQr.createHandler(`Unable process the quest for NPC: ${U.asset} in ${k.ID}`));null===(B=U.secondaryAssets)||void 0===B||B.forEach(((B,U)=>{const H=20*(U+1),q=$?this.user.position.x-j-H:this.user.position.x+j+H;Object.values(Ut.y).find((k=>k===B))?F.addConstructedQuestNPC(q,this.user.position.y,B,W,(()=>null),!0):V.q.instance.prodigy.prefabFactory.addPrefabNPC(B,q,this.user.position.y,W,!0).catch(G.RQr.createHandler(`Error loading additional NPC asset: ${B} in ${k.ID}`))}))}processLegacyQuestFlow(k,B,U){const F=V.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),j=V.q.instance.prodigy.event.create();if(j.set(this.user,"evtProc",!0),G.Aq$.isDefined(B.onProc)&&B.onProc.length>0)for(let G=0;G=0&&j.text(B.onProc[G],"noot");else j.text(41,"noot");j.function((()=>{const B=V.q.instance.prodigy.dialogue.create(),G={text:F.getText("DIALOGUE_NOOT_282",F.getText(k.Guardian)),yes:()=>{k.processQuest(U.ID),V.q.instance.prodigy.world.it(k.questHub)},no:()=>{k.processQuest(U.ID)},face:1,anim:2};B.setText(G),B.startDeprecated("noot")})),j.set(this.user,"evtProc",!1),j.start()}}jt.ZONE_NPC_CONFIG_MAP={[Gt.A_.SKYWATCH]:{asset:Ut.y.Benni,isRightFacing:!0,secondaryAssets:[Ut.y.Broccolina]},[Gt.A_.SHIVERCHILL]:{asset:Ut.y.Bok,isRightFacing:!0},[Gt.A_.SHIPWRECK]:{asset:Ut.y.Eve},[Gt.A_.FOREST]:{asset:$.l.FloraNPC},[Gt.A_.BONFIRE]:{asset:Ut.y.Slurpy}};var $t=U(28628),Ht=U(129),Vt=U(47223),Wt=U(76945);class qt extends St.R{constructor(k,B,U,F,$,H,W,q,K){const z=new Vt.s(k);z.init(q.opponent[0]),super(k,B,z,null,U,F),this.ID=W,this.user=$,this.path=H,G.Aq$.isDefined(q.range)||(q.range=qt.DEFAULT_MOD_DISTANCE),this.mods=q;const Y=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player,Q=new Ht.a(this.game);let X=Y.getLevel();X=Wt.o.integerInRange(Math.max(1,X-2),Math.min(X+2,100)),G.Aq$.isDefined(this.mods.opponent[0].data)&&G.Aq$.isDefined(this.mods.opponent[0].data.level)&&(X=this.mods.opponent[0].data.level),this.mods.opponent=this.mods.opponent||[{data:{level:X},appearance:Q.appearance.getData(),equipment:Q.equipment.getData()}];const Z=[],J=Math.min(4,Y.kennel.petTeam.length-2+3*Math.random());for(let G=0;G{this.onStartComplete.dispatch()})).catch(G.RQr.createHandler("Error starting TileScreen"))}startAsync(){const k=Object.create(null,{start:{get:()=>super.start}});return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._loadCompleteSent){this._loadCompleteSent=!0;const k={mapName:this.data.name};this.metricsManager.createLoadingMetricEvent(ft.o.FunnelTileScreen,ft.o.StageLoadEnd,!1,k);V.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(Kt.u.World,{successfully_loaded:!0,zone:this.zoneName})}const B=this.fadeIn();this.walkEnabled=!1;const U=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(ee.F.shouldShowLinearCampaignZoneLockTransition())return ee.F.activateLinearCampaignTransitionCutscene(),void k.start.call(this);const F=V.q.instance.prodigy.gameContainer.get("a25-68f4");this.isCutscenePlaying=yield F.isCutsceneTaskInProgress().catch((()=>(G.RQr.createHandler("[TileScreen] Error checking for cutscene tasks"),!1))),(this.isCutscenePlaying||this.data.isMultiplayerDisabled)&&V.q.instance.prodigy.gameContainer.get("c97-bd0d").leaveZone();const j=this.zone.getQuestState(),$=ie.x.arePopupsEnabled&&!this.data.arePopupsDisabled,W=this.isCutscenePlaying||!$||this.zone.isQuestComplete(null==j?void 0:j.ID)&&j.ID!==this.zone.finalQuestId,q=V.q.instance.prodigy.gameContainer.get("62e-110e");if(this.isMapScreen&&!W||q.shouldShowRetention){k.start.call(this);const B=k=>{this._initiallySeenPopupIDs.push(k)};V.q.instance.prodigy.open.onPrefabMenuOpened.add(B),yield new Promise((k=>{this.processPopups(k)})).then((()=>{V.q.instance.game.broadcaster.broadcast(gt.Y1.CheckForHUDAttention),this.popupsProcessed=!0})).catch(G.RQr.createHandler("TileScreen start error on processPopups")),V.q.instance.prodigy.open.onPrefabMenuOpened.remove(B)}if(this._questTasksSetup||(yield this.setupQuestTasks().catch(G.RQr.createHandler("[TileScreen]: Error setting up zone quests"))),W||(yield this.acknowledgeOtp().catch(G.RQr.createHandler("[TileScreen]: Error setting up OTP"))),U.justLeveled){const k=V.q.instance.prodigy.gameContainer.get("c47-20b6"),B=[H.B.BREADCRUMB_REACHED_LEVEL_2,H.B.BREADCRUMB_REACHED_LEVEL_3,H.B.BREADCRUMB_REACHED_LEVEL_4,H.B.BREADCRUMB_REACHED_LEVEL_5],F=[Qt.l.ReachedLevel2,Qt.l.ReachedLevel3,Qt.l.ReachedLevel4,Qt.l.ReachedLevel5],G=U.getLevel(),j=2,$=5;for(let U=j;U<=$;U++)if(G>=U){const G=B[U-j];this.breadcrumbManager.isBreadcrumbComplete(H.B.FEATURE_PROGRESSION_EVENTS,G)||(this.breadcrumbManager.completeBreadcrumb(H.B.FEATURE_PROGRESSION_EVENTS,G),k.playerProgression.sendFunnelAdvancedEvent({funnelName:"Onboarding",funnelType:"tutorial",stepName:F[U-j]}))}}this.user.evtProc=!1,this.zone.start(this.prodigyGame,this,this.data),this.data.start(this.prodigyGame,this),this.process(),V.q.instance.prodigy.skin.applySkin(this,this.zone),k.start.call(this),yield B,this.walkEnabled=!0}))}setupQuestTasks(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this._questTasksSetup)return;this._questTasksSetup=!0;const k=V.q.instance.prodigy.gameContainer.get("f91-8211");yield k.setupValidTasks().catch(G.RQr.createHandler("[TileScreen] Unable to load zone quests"));const B=V.q.instance.prodigy.gameContainer.get("a25-68f4");yield B.setupValidTasks().catch(G.RQr.createHandler("[TileScreen] Unable to setup tasks via QuestManagerHub"))}))}acknowledgeOtp(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this._otpAcknowledgeAttempted)return;const k=V.q.instance.prodigy.gameContainer.get("e03-b0a9");k.hasUncollectedTransactions&&(this._otpAcknowledgeAttempted=!0,yield k.acknowledgeUncollectedTransactions())}))}createBackground(){this._bgSprite&&this._bgSprite.destroy(),this.below&&this.below.destroy(),this.above&&this.above.destroy(),this.floor&&this.floor.destroy(),this._bgSprite=this.background.addChild(V.q.instance.prodigy.create.sprite(0,0,null)),this._bgSprite.width=this.game.width,this._bgSprite.height=this.game.height,this._bgSprite.alpha=0,this._bgSprite.inputEnabled=!0,this._bgSprite.events.onInputDown.add(this.listener.bind(this),this),V.q.instance.prodigy.gameContainer.get("2e2-6ee6").setBlockType(this._bgSprite.input,te.z.LOCOMOTION),this.below=V.q.instance.prodigy.create.element(this.background,0,0),this.above=V.q.instance.prodigy.create.element(this.foreground,0,0),this.floor=V.q.instance.prodigy.create.element(this.background,0,0)}screenUpdate(){if(super.screenUpdate(),this.data){const k=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.zone&&k&&this.zone.update(this.prodigyGame,this,this.data),this.data.update(this.prodigyGame)}}addAreaEvent(k,B,U,F,G){const j=new et.o(this.prodigyGame,this.floor,k,this.user,this.path,B,U,F,G);this.events.push(j);return F&&this.above.add(j.getOverlay()),j}addQuestNPC(k,B,U,F,G,j){const $=new Lt(this.prodigyGame,this.content,k,B,U,F,this.process.bind(this),G);return $.setup(this.zone,U,F,j),this.events.push($),$}addConstructedQuestNPC(k,B,U,F,G,$,H){let V,W;switch(U){case Ut.y.Benni:W=new zt.p(this.prodigyGame,"NPC_NAME_BENNI",488,Nt.ac.QuestGiver,this.content,k,B,"idle",void 0,F,$),V=new Lt(this.prodigyGame,this.content,k,B,U,F,this.process.bind(this),G),W.onClick.add((()=>{V.process(this.zone,null,!0)}),this);break;case Ut.y.Broccolina:W=this.addConstructedNPC(k,B,j._.Npc_sprite_broccolina_json,G,"NPC_NAME_BROCCOLINA",this.content,$),W.nameText.GameObject.legacyTransform.x+=50,W.scale.x=F?-W.scale.x:W.scale.x,W.nameText.GameObject.legacyTransform.scaleX=F?-1:1;break;case Ut.y.Flora:W=new zt.p(this.prodigyGame,"NPC_NAME_FLORA",489,Nt.ac.QuestGiver,this.content,k,B,"idle",void 0,F,$),V=new Lt(this.prodigyGame,this.content,k,B,U,F,this.process.bind(this),G),W.onClick.add((()=>{V.process(this.zone,null,!0)}),this);break;case Ut.y.Eve:V=new kt(this.prodigyGame,this.content,k,B,U,F,this.process.bind(this),G,$),V.setup(this.zone,U,F);break;case Ut.y.Bok:W=new zt.p(this.prodigyGame,"SHIVERCHILL_GUARDIAN",490,Nt.ac.QuestGiver,this.content,k,B,"idle",void 0,F,$),V=new Lt(this.prodigyGame,this.content,k,B,U,F,this.process.bind(this),G),W.onClick.add((()=>{H?H():V.process(this.zone,null,!0)}),this);break;case Ut.y.Slurpy:W=new zt.p(this.prodigyGame,"NPC_NAME_SLURPY",493,Nt.ac.QuestGiver,this.content,k,B,"animation",void 0,F,$),V=new Lt(this.prodigyGame,this.content,k,B,U,F,this.process.bind(this),G),W.onClick.add((()=>{V.process(this.zone,null,!0)}),this)}return this.events.push(V),V}addClickableEvent(k,B,U,F,G,j,$,H){const V=new pt(this.prodigyGame,H||this.content,k,B,U,F,G,j,$);return this.events.push(V),V}addClickableMoveEvent(k,B,U,F,G,j,$,H,V,W){const q={moveToX:G,moveToY:j,addPathingIconFunction:(k,B)=>{this.addPathingIcon(k,B)}},K=new mt(this.prodigyGame,W||this.content,k,B,U,F,q,$,H,V);return this.events.push(K),K}addClickableArea(k,B,U,F,G){const j={x:k,y:B,w:U,h:F,callback:G};this.clickAreas.push(j)}addFireflyEvent(k,B,U,F,G,j,$){const H=new Et(this.prodigyGame,this.foreground,k,B,U,F,G,j,$);return this.events.push(H),H}addChest(k,B,U,F,G,j){const $=new bt(this.prodigyGame,this.content,this.zone,B,U,this.user,this.path,k,F,G,this.process.bind(this),j);return this.events.push($),$}addMimic(k,B,U,F,G,j){const $=new Tt(this.prodigyGame,this.content,B,U,this.user,this.path,k,F,G,j);return this.events.push($),$}addCollect(k,B,U,F){const G=new yt(this.prodigyGame,this.content,B,U,this.user,this.path,k,F,this.processAddCollect.bind(this,k));return this.events.push(G),G}processAddCollect(k){this.preprocess();for(let B=0;Bthis.user.x&&U.flip(),U.onClick.addOnce((()=>{this.path.findPath(this.user.x,this.user.y,k+(k>this.user.x?-50:50),B+(B>this.user.y?-50:50),!0).then((k=>{k&&this.user.setPath(k,(()=>{U.alert()}))})).catch(G.RQr.createHandler("Error finding path to Pippet"))})),V.q.instance.prodigy.world.pippetEncounterDaily.isComplete()&&U.alert(),this.events.push(U),U}addWizard(k,B,U,F){const j=this.zone.getState(U);if(!(G.Aq$.isDefined(j)&&0!==j||!1)){const G=new qt(this.prodigyGame,this.content,k,B,this.user,this.path,U,F,this);return G.reload(),this.events.push(G),G}return null}addNPC(k,B,U,F=Nt.ac.CareGiver,G,j,$){const H=new K.s(this.prodigyGame);H.init({npc_name:j,npc_type:F,x_coord:k,y_coord:B,npc_animation_id:"idle"});const V=new At(this.prodigyGame,$||this.content,k,B,U,G,H);return this.events.push(V),V}addGnome(k,B,U,F,G,j,$){const H=new K.s(this.prodigyGame);H.init({npc_name:U,npc_type:F,x_coord:k,y_coord:B,npc_animation_id:"idle"});const V=new wt.N(this.prodigyGame,this.content,this.user,this.path,k,B,H,G,j,$);return this.events.push(V),V}addConstructedNPC(k,B,U,F,$,H,V=!1){const W=new K.s(this.prodigyGame);let q;switch(W.init({npc_name:$,npc_type:Nt.ac.QuestGiver,x_coord:k,y_coord:B,npc_animation_id:"idle"}),U){case j._.Npc_sprite_jim_json:q=new Rt(this.prodigyGame,this.content,k,B,U,W);break;case j._.Npc_sprite_broccolina_json:q=new Ct(this.prodigyGame,this.content,k,B,U,F,W,V);break;case j._.Npc_sprite_eugene_json:q=new It(this.prodigyGame,this.content,k,B,U,F,W);break;case j._.Npc_sprite_cebollini_json:q=new Ot.U(this.prodigyGame,H||this.content,k,B,U,F,W);break;case j._.Npc_sprite_slime_worker_json:case"npc-sprite-worker-slime-red":q=new Pt(this.prodigyGame,this.content,k,B,U,F,W);break;default:G.VyI.log("Add Constructed NPC failed: Tag not found",G.$bb.Error)}return this.events.push(q),q}addBlock(k,B,U){const F=new st(this.prodigyGame,U.content?this.content:this.background,k,B,this.path,U);return this.events.push(F),F}addUltimate(k,B,U){this.addPrefabToScreen($.l.UltimatePet,B,U).then((B=>{const U=this.game.time.events.loop(q.s.TARGET_FPS_40_MS,(()=>B.update()),this);B.onDestroy.addOnce((()=>this.game.time.events.remove(U)));B.findComponent(X.i).init(k)})).catch(G.RQr.createHandler("[TileScreen][addUltimate] Error loading the Ultimate prefab from GUID."))}addPrefabToScreen(k,B,U,j){return(0,F.sH)(this,void 0,void 0,(function*(){const F=V.q.instance.prodigy.gameContainer.get("d0e-64fd"),$=yield se.d.loadWithInjectedValuesAndDependenciesFromGUID(F,k,null!=j?j:{});$.transform.setPosition(B,U);const H=$.findComponent(G.y4o).getRootContainer();return this.content.addChild(H),H.x=$.transform.worldPosition.x,H.y=$.transform.worldPosition.y,$}))}preprocess(){var k;const B=this.zone.getQuestState(),U=G.Aq$.isDefined(B)?this.zone.getQuest(B.ID):null,F=G.Aq$.isDefined(U)&&this.zone.isQuestComplete(B.ID),j=G.Aq$.isDefined(U)&&this.zone.isQuestStarted(B.ID),$=[];let H=[];j&&(H=F&&!U.chain&&G.Aq$.isDefined(this.zone.questHub)?[this.zone.questHub]:this.zone.getRemainingQuestAreas(B.ID));for(let G=0;G0)for(let k=0;kk.distance-B.distance));let V=9999999;for(let W=0;W<$.length&&!($[W].distance>V);W++)V=$[W].distance,G.Aq$.isDefined($[W].event)&&G.Aq$.isDefined($[W].event.setClosest)&&$[W].distance>1&&$[W].event.setClosest()}process(k=!1){var B;k||this.preprocess(),this.openHUD();const U=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.isMapScreen&&U.isZoneQuestEnabled&&(null===(B=this.questProgress)||void 0===B||B.process(this.zone,this.data)),this.zone.process(this.prodigyGame,this,this.data),this.data.process(this.prodigyGame,this,this.zone)}showCollisions(k){if(G.Aq$.isDefined(this.menus)&&(W.l.removeAll(this.menus,!0),k)){const k=V.q.instance.game.add.container(),B=this.game.width,U=this.game.height;for(let F=0;F{const U=Z.v.getUltimatesPetLocation(B).split("-"),F=`${U[0]}-${U[1]}`,j=new G.I9Y(parseInt(U[2]),parseInt(U[3]));this.generateTamingUI(B,F),this.generateUltimateTrail(F,k),this.data.zoneName===F&&this.addUltimate(B,j.x,j.y)})).catch(G.RQr.createHandler("[TileScreen][processUltimatesIndicators] Could not get current petID for ultimate UI generation"))}}findTargetEvent(k){if(this.data.locations.includes(k)){return this.events.find((B=>B instanceof et.o&&B.getTarget()===k))}return null}generateUltimateTrail(k,B){const U=this.findTargetEvent(k);U?(0,ne.Ks)().loadWithDependenciesFromGUID($.l.UltimateTrail,this.contentGameObject).then((k=>{this._ultimatesElements.push(k);k.findComponent(tt.o).fireTrail(U),B.onSessionStatusChange.add(this.handleSessionStatusChange,this)})).catch(G.RQr.createHandler("[TileScreen][generateUltimateTrail] Error generating the Ultimate Trail. Reason:")):G.VyI.log(`[TileScreen][generateUltimateTrail] Could not find location ${k} in targetEvent list - probably the user does not have access to it`,G.$bb.Warning)}generateNPCTrail(k){const B=J.m.getSeededLocation().split("-"),U=`${B[0]}-${B[1]}`,F=this.findTargetEvent(U);F?(0,ne.Ks)().loadWithDependenciesFromGUID($.l.WanderingNPCTrail,this.contentGameObject).then((B=>{this._ultimatesElements.push(B);B.findComponent(tt.o).fireTrail(F),k.onSessionStatusChange.add(this.handleSessionStatusChange,this)})).catch((k=>{G.VyI.log(`[TileScreen][generateNPCTrail] Error generating the NPC Trail. Reason: ${k}`,G.$bb.Warning)})):G.VyI.log(`[TileScreen][generateNPCTrail] Could not find location ${U} in targetEvent list - probably the user does not have access to it`,G.$bb.Warning)}handleSessionStatusChange(k,B){if(k===z.n.None||k===z.n.Transition){for(const k of this._ultimatesElements)k.destroy();this._ultimatesElements.length=0,V.q.instance.prodigy.world.inZoneHub()||V.q.instance.prodigy.world.goToZoneHub(V.q.instance.prodigy.world.getCurrentZone())}}generateTrackingUI(){const k=J.m.getSeededLocation(),B=k.split("-")[0],U=k.split("-")[1];if(V.q.instance.prodigy.world.getZone(B).getMap(U).locations.find((k=>k===this.data.zoneName))){const k=new G._mx;k.addComponent(Xt.B).getRootContainer().setParent(this.uiLayer),(0,ne.Ks)().loadWithDependenciesFromGUID($.l.UltimateTaskUI,k).then((k=>{this._ultimatesElements.push(k);const B=V.q.instance.prodigy.gameContainer.get("580-3bea");Zt.b.statusRequiresConsent(B.consentStatus)&&k.transform.setPositionY(k.transform.localPosition.y+Jt.R.HUD_RESERVE_HEIGHT)})).catch((k=>{G.VyI.log(`[TileScreen] Error generating the UltimateTaskUI. Reason: ${k}`,G.$bb.Error)}))}}generateTamingUI(k,B){const U=B.split("-")[0];if(this.zone.ID===U&&this.zoneName!==B){const B=new G._mx;B.addComponent(Xt.B).getRootContainer().setParent(this.uiLayer),(0,ne.Ks)().loadWithDependenciesFromGUID($.l.UltimateTaskUI,B).then((B=>{this._ultimatesElements.push(B);B.findComponent(Q.P).setupTamingUI(k);const U=V.q.instance.prodigy.gameContainer.get("580-3bea");Zt.b.statusRequiresConsent(U.consentStatus)&&B.transform.setPositionY(B.transform.localPosition.y+Jt.R.HUD_RESERVE_HEIGHT)})).catch(G.RQr.createHandler("[TileScreen] Error generating the UltimateTaskUI."))}}onDoorClick(k,B){B||V.q.instance.prodigy.audio.playSFX(15,"door"),G.Aq$.isDefined(k)&&k()}endFX(){this.user.evtProc=!1,this.prodigyGame.input.enabled=!0,this.hideChat(!1)}startFX(){this.hideChat(!0)}hideChat(k){this.questProgress.visible=!k,this.isMapScreen&&this.questProgress.visible&&this.questProgress.process(this.zone,this.data);const B=V.q.instance.prodigy.open.chatMenu;(null==B?void 0:B.textField)&&B.textField.setVisible(!k)}}re.DEBUG_DRAW_AREA_EVENTS=!1},48757:(k,B,U)=>{"use strict";U.d(B,{c:()=>te});var F=U(8674),G=U(62459),j=U(95891),$=U(88022),H=U(85855),V=U(24521),W=U(99625),q=U(28628),K=U(97495),z=U(2090),Y=U(32389),Q=U(40295),X=U(94310),Z=U(58776),J=U(43516),tt=U(66582),et=U(92579),it=U(73678),st=U(81137),nt=U(47728),at=U(35120),rt=U(34829),ot=U(23029),ht=U(77938),ct=U(129),dt=U(2212),lt=U(43518),ut=U(76016),ft=U(93867),bt=U(75781),pt=U(64868),vt=U(70399),gt=U(36811),mt=U(55080),yt=U(43503),_t=U(96797),Et=U(19145),wt=U(19506),Tt=U(41012),St=U(73797),At=U(35084),Ct=U(85056),Ot=U(24981),It=U(31029),Dt=U(96810),Rt=U(41674),Pt=U(96494),Mt=U(76277),Nt=U(13956),xt=U(24110),Lt=U(46);var kt=U(65088),Bt=U(64353),Ut=U(85515),Ft=U(28962),Gt=U(95057),jt=U(40392),$t=U(93375),Ht=U(5075),Vt=U(98252),Wt=U(24695),qt=U(84642),Kt=U(80060),zt=U(30226),Yt=U(47255),Qt=U(35564),Xt=U(38454),Zt=U(15804),Jt=U(20705);class te extends Jt.f{constructor(k,B=[]){super(k.zoneName,k.atlas,B.concat([H.V.Bgm_intro])),this.showMenu=!0,this.tileSize=20,this.hideHex=!1,this.playersInfo={},this.playerList={},this.clickAreas=[],this.walkEnabled=!0,this.saveTag="",this.startX=500,this.startY=300,this.pendingPlayers=null,this.pendingCoordinates=new Map,this.frameUntilAddNextPlayer=-te.FRAMES_BETWEEN_ADDING_PLAYERS,this.hasBroadcastedInfo=!1,this._hasSeenSegmentedOffer=!1,this._hasCheckedForPetOffersPopup=!1,this._initiallySeenPopupIDs=[],this.canStartAddingPlayers=!1,this._world=at.q.instance.prodigy.world}shutdown(){var k,B;this._battlePassDataPromise&&(this._battlePassDataPromise.cancel(),this._battlePassDataPromise=null),G.Aq$.isDefined(this._friendListLoadTimeoutID)&&(window.clearTimeout(this._friendListLoadTimeoutID),this._friendListLoadTimeoutID=null),this.prodigyGame.broadcaster.removeAppListener(St.sd.GotFriendsListAppearance,this,"FriendsListOfActualFriends"),this.prodigyGame.broadcaster.removeAppListener(St.Y1.ShowHUD,this,St.HG.HUD),this.prodigyGame.broadcaster.removeAppListener(St.Y1.HideHUD,this,St.HG.HUD),this.prodigyGame.broadcaster.removeAppListener(St.pm.MovePlayer,this),this.difficultyOverlayPromise&&(this.difficultyOverlayPromise.cancel(),this.difficultyOverlayPromise=null);for(const U in this.playerList)this.playerList.hasOwnProperty(U)&&this.playerList[U].destroy();this.user&&(this.user.clickCallback=null,this.user.destroy(),this.user=null,at.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer=null);for(let U=0;U>1),this.user.enableLocomotion(this,this.user),this.user.reload(),this.user.onFullyLoaded.add((()=>{this.canStartAddingPlayers=!0,this.user.showName()})),at.q.instance.prodigy.world.inRestrictedSocialZone(at.q.instance.prodigy.world.getCurrentZone())||(this.user.clickCallback=at.q.instance.prodigy.open.card.bind(at.q.instance.prodigy.open,F,!0,et.a.available)),at.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer=this.user,this.addFollow(F.userID,F.equipment.getFollow()),this.prodigyGame.broadcaster.addAppListener(St.pm.MovePlayer,this.updateOnFaintData.bind(this),this),this.showMenu&&(this.menuBar=new G._mx,this.menuBar.addComponent(xt.B).getRootContainer().setParent(this.menus),null===(B=this.menuBarCreationPromise)||void 0===B||B.cancel(),this.menuBarCreationPromise=null,at.q.instance.game.broadcaster.addAppListener(St.Y1.ShowHUD,(()=>{this.menuBar.active=!0}),this,St.HG.HUD),at.q.instance.game.broadcaster.addAppListener(St.Y1.HideHUD,(()=>{this.menuBar.active=!1}),this,St.HG.HUD),-1===this.zoneName.indexOf("scene-")&&this.prodigyGame.broadcaster.broadcast(St.lT.Setup,St.HG.NetworkHandlers,[])),this.setupDifficultyOverlay(),super.create()}createBackground(){this.bg=at.q.instance.prodigy.create.sprite(0,0,this.screenName,"bg"),this.bg.inputEnabled=!0,this.bg.events.onInputDown.add(this.listener.bind(this),this),this.background.addChild(this.bg),at.q.instance.prodigy.gameContainer.get("2e2-6ee6").setBlockType(this.bg.input,Ft.z.LOCOMOTION)}screenSetup(){var k,B;if(G.Aq$.isDefined(this.bgmID)&&at.q.instance.prodigy.audio.autoplay&&(at.q.instance.prodigy.audio.playBGM(this.bgmID,!0),at.q.instance.prodigy.audio.resumeBGM()),!(null===(k=this.screenData)||void 0===k?void 0:k.doNotJoinNetworkZone)){at.q.instance.prodigy.gameContainer.get("c97-bd0d").joinZone(this)}if(null===(B=this.screenData)||void 0===B?void 0:B.runFSMOnLoad){const k=new G._mx,B=k.addComponent(It.u);B.assetId=this.screenData.runFSMOnLoad.ID,B.fsmVariables=this.screenData.runFSMOnLoad.variables,B.onComplete.addOnce((()=>{k.destroy()})),B.run()}super.screenSetup()}setupDifficultyOverlay(){var k;const B=at.q.instance.prodigy.world.getCurrentZoneObject(),U=(0,Mt.G)(z.u).enabled&&dt.J.isZoneMapDifficultyModeAgnostic(this.zoneName),F=null!==(k=at.q.instance.prodigy.gameContainer.get("306-5359").currentDifficulty)&&void 0!==k?k:K.i.Regular,G=(null==B?void 0:B.ID)===it.A_.LAMPLIGHT&&at.q.instance.prodigy.skin.isFestivalActive();U&&!G&&F!==K.i.Regular&&(this.difficultyOverlayPromise=Kt.d.loadWithInjectedValuesAndDependenciesFromGUID(at.q.instance.prodigy.gameContainer.get("d0e-64fd"),F===K.i.Hard?W.l.Overlay_difficulty_hard:W.l.Overlay_difficulty_expert,{}))}start(){this.user.evtProc=!1,super.start()}shouldSkipPopups(){if(!qt.x.arePopupsEnabled)return!0;const k=at.q.instance.prodigy.gameContainer.get("fc2-cb0a");return!!(null==k?void 0:k.waitingToTransport)}processPopups(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,j,$,H,z,Y,et,it,st;if(this.shouldSkipPopups())return void(null==k||k());const ht=at.q.instance.prodigy.gameContainer,ct=ht.get("e20-0fb0").player;if(dt.J.canShowNarrativeIntro(null===(B=null==ct?void 0:ct.data)||void 0===B?void 0:B.zone))return void at.q.instance.prodigy.world.it("lamplight-B3");if(dt.J.shouldShowWorldMapHardModeFtue()&&(yield new Promise((k=>{at.q.instance.prodigy.open.map({disableClose:!0,onClose:k})}))),(yield lt.M.canAutoSurfaceDailyLoginCalendar())&&(yield at.q.instance.prodigy.open.dailyLoginCalendar().catch(G.RQr.createHandler("Failed to open Daily Login Calendar on startup"))),ct.hasCompletedTutorial())try{yield gt.V.openPlayerGoalsIfPrizeReady(Rt.$N.AutoSurfaced)}catch(Nt){G.VyI.log(`Error opening player goals: ${Nt}`,G.$bb.Error)}if(!this._hasCheckedForPetOffersPopup&&pt._.isFeatureEnabled()){this._hasCheckedForPetOffersPopup=!0;const B=null!==(F=null===(U=this.screenData)||void 0===U?void 0:U.battleResult)&&void 0!==F&&F,G=null!==($=null===(j=this.screenData)||void 0===j?void 0:j.didRiftBattle)&&void 0!==$&&$;if(B||G){const B=ht.get("0f1-c356"),{sessionBattles:U}=yield B.getBattleStats(),F=ct.isPlayingAtSchool(),G=null!==(Y=null===(z=null===(H=pt._.getVariables())||void 0===H?void 0:H.defeatedPetStore)||void 0===z?void 0:z.battlesToPrompt)&&void 0!==Y?Y:3,j=U.length%G==0,$=0!==U.length&&U[U.length-1].battleType===q.gu.NormalRiftRun,V=ht.get("7a1-ff33"),{resetTime:K,defeatedPetOffers:Q}=yield V.updateDefeatedPetOffers();if(F||j||$){const B=[...Q].filter((k=>k.progress.status===Z.t.IN_PROGRESS));if(B.length>0)return void at.q.instance.prodigy.open.prefabMenu(W.l.LostPetModal,k,!0,!0,!1,{LOST_PETS_OFFER_DATA:B,LOST_PETS_RESET_TIME:K})}}}const ut=at.q.instance.prodigy.achievements.updateAchievementsCompletion(),mt=ht.get("a02-c2b2");if(this.dynamicStoreQuestManager.canTriggerOffer())return void this.dynamicStoreQuestManager.triggerCurrentOffer().catch(G.RQr.createHandler("Error triggering offer"));const Et=ht.get("62e-110e");if(Et.shouldShowRetention)return void Et.showChargedLevelsRetentionModal(k);if(Et.shouldShowDecayImmunityModal)return void Et.showChargedLevelsDecayImmunityModal(k);if(Et.shouldShowConversionModal)return void Et.showChargedLevelsConversionModal(k);if(Zt.h.shouldShowEntryIllustration(this.zoneName))return this.setupContentInputBlocker(),void this.openZoneEntryIllustration((()=>{null==k||k()}));if(ft.U.progressData.step===Q.B.NotStarted&&ct.hasFoundAllKeystones())return void bt.E.runAllKeystonesSequenceOnMapSetup(this.processPopups.bind(this,k));if(dt.J.shouldShowHardModeUnlockedPopup())return void dt.J.showDifficultyUnlockedPopup(K.i.Hard,k);if(dt.J.shouldShowExpertModeUnlockedPopup())return void dt.J.showDifficultyUnlockedPopup(K.i.Expert,k);if(wt.J.canShowUniquePetsIntro())return void wt.J.runUniquePetsIntroSequence(k);if(ct.justLeveled&&Ht.H.canShowEntryPopup())return void at.q.instance.prodigy.open.prefabMenu(W.l.ZoneUnlockedPopup,(()=>{Ht.H.completeEntryBreadcrumb(),null==k||k()}),void 0,void 0,void 0,{ZONE_STATUS_MODAL_TYPE:Ht.A.UNLOCKED,ZONE_STATUS_POPUP_TARGET_ID:jt.i.getHighestAvailableZoneData().zone});const At=mt.currentOfferStatus!==J.v.NO_ACTIVE_OFFER,It=mt.shouldAutoSurfaceSegmentedOffers()&&mt.userCanReceiveSegmentedOffers();if(!this._hasSeenSegmentedOffer&&At&&It){const B=ht.get("c47-20b6");if(mt.userHasLastChance())return B.playerProgression.sendFunnelAdvancedEvent({funnelName:mt.activeOffer.id,funnelType:"segmented_offers",stepName:Dt.l.SegmentedOffersGotExpired},{step_index:5}),this._hasSeenSegmentedOffer=!0,void _t.P.openConfiguredModal(k);if(mt.activeOffer&&G.Aq$.isDefined(null===(et=this.screenData)||void 0===et?void 0:et.battleResult)&&!mt.userHasSeenFirstOffer())return B.playerProgression.sendFunnelAdvancedEvent({funnelName:mt.activeOffer.id,funnelType:"segmented_offers",stepName:Dt.l.SegmentedOffersViewed},{step_index:2}),void _t.P.openConfiguredModal((()=>{this._hasSeenSegmentedOffer=!0,mt.setBreadcrumbHasSeenFirstOffer(),null==k||k()}));if(mt.activeOffer&&(null===(it=this.screenData)||void 0===it?void 0:it.battleResult)===q.XK.Defeat&&!mt.userHasSeenFirstBattleLost())return void _t.P.openConfiguredModal((()=>{this._hasSeenSegmentedOffer=!0,mt.setBreadcrumbHasSeenFirstBattleLost(),null==k||k()}));if(mt.activeOffer&&ct.justLeveled&&mt.userHasChangedSegment())return mt.resetSurfacingBreadcrumbs(),void _t.P.openConfiguredModal((()=>{this._hasSeenSegmentedOffer=!0,mt.setBreadcrumbHasSeenFirstOffer(),null==k||k()}))}if(yield yt.L.shouldShowRiftsCycleModal(this._world.getCurrentZone()))return void yt.L.openRiftsCycleModal(k);if(ct.hasCompletedTutorial()&&nt.x.shouldShowCurrencyDrainPopup(X.L.CurrencyDrainPopup))return void nt.x.openCurrencyDrainModal(Rt.$N.AutoSurfaced,k);if(ct.hasCompletedTutorial()&&!Ot.S.openedThisSession){let B=!1;const U=ht.get(vt.G.MathTower);if(U.isEnabledForPlayer(ct))U.redirectTowerTownPopup();else if(ct.tutorialCompletedThisSession)null==k||k();else{const U=(new Date).getTime();(G.Aq$.isDefined(ct.data.wwCooldownTime)?U-ct.data.wwCooldownTime:rt.s.DAY_IN_MS)>=2*rt.s.HOURS_IN_MS&&(ct.data.wwCooldownTime=U,B=!0),(yield Tt.e.hasWizardWatchAccess())||(B=!1);const F=()=>{const U=ht.get("8dc-04eb");this._battlePassDataPromise=new G.kBN(((k,B)=>{U.getCurrentBattlePassData().then(k).catch(B)})),this._battlePassDataPromise.promise.then((U=>{if(B){const B=()=>{ht.get("d0e-64fd").loadWithDependenciesFromGUID(W.l.PushNotificationPermission).catch((k=>{G.VyI.log("Error loading push notification permission prefab",G.$bb.Error)})),null==k||k()};this.openFeed(B)}else null==k||k()})).catch(G.RQr.createHandler("Walkable Screen: Error retrieving battle pass data"))},j=k=>{k||window.clearTimeout(this._friendListLoadTimeoutID),this._friendListLoadTimeoutID=null,this.prodigyGame.broadcaster.removeAppListener(St.sd.GotFriendsListAppearance,this,"FriendsListOfActualFriends"),F()};at.q.instance.prodigy.friendsListNetworkHandler.hasReceivedFriendsAppearanceOfActualFriends?F():(at.q.instance.game.broadcaster.addAppListener(St.sd.GotFriendsListAppearance,j.bind(this,!1),this,"FriendsListOfActualFriends",!1),this._friendListLoadTimeoutID=window.setTimeout(j.bind(this,!0),2e3))}return void(B||this.showSpellStatusEffectTutorialIfNeeded())}if(ct.hasUnclaimedMembershipRewards())return void(yield ct.rewardMembershipPrizes(k));if(ct.hasCompletedTutorial()&&!(ct.memberPrompt||!ct.hasMembership()&&zt.J.isSchoolHours()||ct.hasMembership()&&ct.backpack.hasItem("mount",1)>0)&&(!ct.isPlayingAtSchool()||ct.hasUnclaimedMembershipRewards())&&(ct.getMemberTier()===tt._$.NonMember&&Vt.pF.isNativeApp()||!Vt.pF.isNativeApp())){if(ct.seenMapTransitionPromptThisSession=!0,Bt.P.shouldUseUnifiedConversionFlow(Yt.o.FunnelTransitMap))return void at.q.instance.prodigy.open.unifiedConversionFlow(k,{conversionFunnelName:Yt.o.FunnelTransitMap,conversionStage:Yt.o.StageTransitMap},Rt.$N.AutoSurfaced);const B=ht.get("c47-20b6").purchase,U=ot.R.loadData(V.r.LevelBasedPromptsRuleset_json),F=kt.H.evaluate(Yt.o.FunnelTransitMap,U);if(F){const U=class{static selectLevelBasedAdAtRandomButNotTwiceInARow(k){const B=at.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=B.data.lastSeenLevelBasedMemberPrompt,F=U?k.filter((k=>k!==U)):k,G=Math.floor(Math.random()*F.length);return B.data.lastSeenLevelBasedMemberPrompt=F[G],B.updated=!0,F[G]}}.selectLevelBasedAdAtRandomButNotTwiceInARow(F.assets);at.q.instance.prodigy.open.dynamicPrompt(U,{MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_NAME:Yt.o.FunnelTransitMap},{originType:Rt.$N.AutoSurfaced},k);const G=Bt.P.shouldUseUnifiedConversionFlow(Yt.o.FunnelTransitMap)?Gt.R.UnifiedConversionFlow:Gt.R.DynamicMemberPrompt,j=null===(st=ot.R.loadData(U))||void 0===st?void 0:st.name;B.sendFunnelStart({adType:G,category:"Map-Transition",contentId:j,type:"Map-Transition",adVersion:Bt.P.getAdVersion(Yt.o.FunnelTransitMap)})}return}if(yield Wt.N.shouldShowFeaturedPetPopup())return void Wt.N.openFeaturedPetPopup((()=>null==k?void 0:k()));if(ut.length>0){for(let k=0;kB!==k.userID))}this.hasBroadcastedInfo=!1,G.VyI.log(`Pending players are of size: ${this.pendingPlayers.length}`,G.$bb.Verbose)}}onPlayerJoined(k){if(!G.Aq$.isDefined(this.content)||this._world.isZoneSinglePlayer(this._world.getCurrentZone()))return;k!==at.q.instance.prodigy.gameContainer.get("e20-0fb0").player.userID&&(G.Aq$.isDefined(this.playersInfo[k])&&(null===this.pendingPlayers||0===this.pendingPlayers.length?(this.addPlayer(this.playersInfo[k]),G.Aq$.isDefined(this.pendingCoordinates[k])&&this.movePlayer(this.pendingCoordinates[k])):(this.pendingPlayers.push(k),this.hasBroadcastedInfo=!1)),G.Aq$.isDefined(this.user)&&this.user.broadcastPlayerFullInfo(k))}onPlayerLeft(k){this.removePlayer(k)}removePlayer(k){G.Aq$.isDefined(this.playerList[k])&&G.Aq$.isDefined(this.content)&&(this.removeFollow(k),this.content.removeChild(this.playerList[k]),this.playerList[k].destroy(),delete this.playerList[k])}canAddUsersToScreen(){const k=j.size(this.playerList);return zt.J.isAvgFrameRateAboveThreshold(rt.s.get("GameConstants.Build.ADD_PLAYER_FPS_THRESHOLD_LIMIT"))?zt.J.isAvgFrameRateAboveThreshold(rt.s.get("GameConstants.Build.ADD_PLAYER_FPS_THRESHOLD_RENABLE"))&&rt.s.resetMaxPlayerLimit():rt.s.setMaxPlayerLimit(Math.max(k,rt.s.get("GameConstants.Build.MAX_ON_SCREEN_FPS_LIMITED"))),k0){const B=this.playerList[k.userID].position,U=ht.t.getItem("fx",k.type).data;let F=U.projectileCount;do{window.setTimeout((()=>{at.q.instance.prodigy.effects.playFX(k.type,B.x,B.y,k.x,k.y)}),U.delay*F),F--}while(F>0)}}movePlayer(k){G.Aq$.isDefined(this.playerList)&&G.Aq$.isDefined(this.playerList[k.userID])&&G.Aq$.isDefined(k.target)&&this.playerList[k.userID].setNewTarget(k.target.x,k.target.y)}handlePlayerChatMessage(k){if(G.Aq$.isDefined(this.playerList)&&G.Aq$.isDefined(this.playerList[k.userID])){const B=this.playerList[k.userID];G.Aq$.isDefined(k.emoteID)?B.emote(k.emoteID):G.Aq$.isDefined(k.chatID)?B.startChat(k.chatID):G.Aq$.isDefined(k.danceID)&&B.dance(k.danceID)}}transformPlayer(k){G.Aq$.isDefined(this.playerList)&&G.Aq$.isDefined(this.playerList[k.userID])&&(k.transformID?this.playerList[k.userID].transformToItem(k.transformType,k.transformID,G.Aq$.isDefined(k.showEffect)&&k.showEffect,null):this.playerList[k.userID].resetItemTransformation(G.Aq$.isDefined(k.showEffect)&&k.showEffect))}removeFollow(k){const B=k===at.q.instance.prodigy.gameContainer.get("e20-0fb0").player.userID?this.user:this.playerList[k];G.Aq$.isDefined(B)&&G.Aq$.isDefined(B.follow)&&(this.content.removeChild(B.follow),B.follow.destroy(),delete B.follow)}addFollow(k,B){if(!G.Aq$.isDefined(this.content))return;const U=k===at.q.instance.prodigy.gameContainer.get("e20-0fb0").player.userID?this.user:this.playerList[k];if(G.Aq$.isDefined(U)&&(this.removeFollow(k),G.Aq$.isDefined(B))){const k=at.q.instance.prodigy.create.follow(this.content,B,1,U);G.Aq$.isDefined(k)&&G.Aq$.isDefined(k.reload)&&k.reload(),U.follow=k}}screenUpdate(){if(super.screenUpdate(),null!==this.pendingPlayers&&this.pendingPlayers.length>0&&this.canStartAddingPlayers)if(this.frameUntilAddNextPlayer>te.FRAMES_BETWEEN_ADDING_PLAYERS){this.frameUntilAddNextPlayer=0;const k=this.pendingPlayers.pop();k!==at.q.instance.prodigy.gameContainer.get("e20-0fb0").player.userID&&G.Aq$.isDefined(this.playersInfo[k])&&(this.addPlayer(this.playersInfo[k]),G.Aq$.isDefined(this.pendingCoordinates[k])&&this.movePlayer(this.pendingCoordinates[k])),G.Aq$.isDefined(this.user)&&!this.hasBroadcastedInfo&&(this.user.broadcastPlayerFullInfo(),this.hasBroadcastedInfo=!0)}else this.frameUntilAddNextPlayer++;0===at.q.instance.prodigy.open.menus.length&&0===at.q.instance.prodigy.open.renderMenus.length&&null===at.q.instance.prodigy.open.chatMenu&&null===at.q.instance.prodigy.notifications.notificationTimer&&at.q.instance.prodigy.notifications.startTimer(),G.Nj.insertion(this.content.children,G.I6z.Y_SORT);const k=at.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(null==k?void 0:k.appearanceChanged){k.appearanceChanged=!1,this.user.reload(),this.user.showName(),this.addFollow(k.userID,this.hideHex?null:k.equipment.getFollow());at.q.instance.prodigy.gameContainer.get("c97-bd0d").emitMessage({action:Qt.x.Change})}}listener(k,B){if(!this.walkEnabled)return;const U=G.Aq$.isDefined(B)?B.x:Math.round(this.prodigyGame.input.x),F=G.Aq$.isDefined(B)?B.y:Math.round(this.prodigyGame.input.y);for(let G=0;G=k.x&&U<=k.x+k.w&&F>=k.y&&F<=k.y+k.h)return void k.callback()}this.prodigyGame.broadcaster.broadcast(St.pm.MovePlayer,null,[U,F])&&this.addPathingIcon(U,F)}addPathingIcon(k,B){const U=at.q.instance.prodigy.create.sprite(k,B,$._.General_icons_json,"star-small");U.scale.set(0,0),U.anchor.set(.5,.5),this.content.addChild(U),this.prodigyGame.add.tween(U,this).to({alpha:0},600,G.GS3.Cubic.In,!0);this.prodigyGame.add.tween(U.scale,this).to({x:1,y:1},600,G.GS3.Linear.None,!0).onTweenComplete.add((()=>{U.destroy()}))}getInjectedValue(k){return at.q.instance.prodigy.gameContainer.get(k)}hideOtherPlayer(k){const B=at.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return k.userID===B.userID||!k||!this.content||this._world.isZoneSinglePlayer(this._world.getCurrentZone())}openHUD(){if(G.Aq$.isDefined(this.menuBarCreationPromise))return;const k=at.q.instance.prodigy.gameContainer.get("d0e-64fd");this.menuBarCreationPromise=k.loadWithDependenciesFromGUID(st.x.isFeatureEnabled()?W.l.HUDMenuBar2025:this.hudMenuStyle),this.menuBarCreationPromise.then((k=>this.hudLoaded(k)))}hudLoaded(k){k.parent=this.menuBar;const B=at.q.instance.prodigy.game.time.events.loop(rt.s.TARGET_FPS_40_MS,k.update,k);k.onDestroy.addOnce((()=>at.q.instance.prodigy.game.time.events.remove(B))),Kt.d.updateInjectedValues(k,{[ut.P.WantsAttention]:this._hasSeenSegmentedOffer,[ut.P.JustSeenSegmentedOfferPopup]:[W.l.LostPetModal,W.l.SegmentedOffersModal].some((k=>this._initiallySeenPopupIDs.includes(k)))})}updateOnFaintData(){var k;const B=at.q.instance.prodigy.gameContainer.get("e20-0fb0").player;(null===(k=B.onFaintData)||void 0===k?void 0:k.mapKey)!==this._world.getCurrentMap()&&(B.onFaintData={mapKey:this._world.getCurrentMap(),coordinates:{x:this.user.position.x,y:this.user.position.y}})}openZoneEntryIllustration(k){Zt.h.openZoneEntryIllustrationPrefabForZone(this.zoneName.split("-")[0]).then((B=>{at.q.instance.game.broadcaster.broadcast(St.Y1.HideHUD,St.HG.HUD),this.destroyContentInputBlocker(),B.findComponentInChildren(Xt.V).onComplete.addOnce((()=>{at.q.instance.game.broadcaster.broadcast(St.Y1.ShowHUD,St.HG.HUD),null==k||k(),B.destroy()}))})).catch(G.RQr.createHandler("Could not load the zone entry illustration prefab"))}setupContentInputBlocker(){if(G.Aq$.isDefined(this._contentInputBlocker))return;this._contentInputBlocker=new G._mx,this._contentInputBlocker.addComponent(G.dLy);this._contentInputBlocker.addComponent(At.n).setSize(this.game.width,this.game.height),this.contentGameObject.addChild(this._contentInputBlocker),this._contentInputBlocker.setLayer(Ut.E.ForegroundLayer)}destroyContentInputBlocker(){var k;null===(k=this._contentInputBlocker)||void 0===k||k.destroy(),this._contentInputBlocker=null}}te.FRAMES_BETWEEN_ADDING_PLAYERS=5,(0,F.Cg)([(0,G.fFd)("db5-fb6e"),(0,F.Sn)("design:type",Object)],te.prototype,"featureRequirements",void 0),(0,F.Cg)([(0,G.fFd)("12f-4e29"),(0,F.Sn)("design:type",Pt.F)],te.prototype,"breadcrumbManager",void 0),(0,F.Cg)([(0,Nt.b)("7a1-ff33"),(0,F.Sn)("design:type",mt.s)],te.prototype,"dynamicStoreQuestManager",void 0)},14335:(k,B,U)=>{"use strict";U.d(B,{P:()=>X});var F=U(8674),G=U(62459),j=U(35120),$=U(76974),H=U(99625),V=U(129),W=U(21492),q=U(24110),K=U(80060),z=U(45716),Y=U(28080),Q=U(81617);class X extends Q.R{get _prefabGuid(){return H.l.DuelsLoadingScreen}constructor(k,B){super(),this.onCloseClicked=new G.HN0,this.data.playerA=k,G.Aq$.isDefined(B)&&(this.data.playerB=V.a.fromCharacter(j.q.instance.game,B))}create(){this._playerA=this.data.playerA,this._playerB=this.data.playerB;j.q.instance.prodigy.gameContainer.get("c97-bd0d").leaveZone(),this.startTime=Date.now(),this.complete=!1,this.isLoaded=!1,this.element=j.q.instance.prodigy.create.element(void 0),this.loadPrefab().then((()=>{this.start()})).catch((k=>{G.RQr.logError(k,"Failed to load duel loading screen"),this.showErrorPopup(j.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(z.l.CheckNetworkConnection))}))}loadPrefab(){return(0,F.sH)(this,arguments,void 0,(function*(k={}){var B,U;const $=j.q.instance.prodigy.gameContainer.resolve(W.C),H=[this._playerA,this._playerB].filter((k=>k)),[V,z]=H.map((k=>($.init(k.appearance.getName()),$.getName()))),Q=yield Promise.all(H.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){const B=new G._mx;B.active=!1,B.addComponent(G.dLy);const U=yield Y.D.createWizardObject(k,!1);return B.addChild(U),U.setLayer(void 0,!0),B})))));Q[1]&&(Q[1].transform.localScale.x=-1);const X=this._prefabRoot=new G._mx;X.addComponent(G.dLy),j.q.instance.game.add.graphics(0,0,this.element).beginFill(16703937).drawRect(0,0,j.q.instance.game.width,j.q.instance.game.height),this.element.addChild(X.addComponent(q.B).getRootContainer()),yield K.d.loadWithInjectedValuesAndDependenciesFromGUID(j.q.instance.prodigy.gameContainer.get("d0e-64fd"),this._prefabGuid,Object.assign({PLAYER_1_NAME:V,PLAYER_2_NAME:z,PLAYER_1_LEVEL:this._playerA.getLevel(),PLAYER_2_LEVEL:null===(B=this._playerB)||void 0===B?void 0:B.getLevel(),PLAYER_1_AVATAR:Q[0],PLAYER_2_AVATAR:Q[1],CLOSE_ON_CLICK:()=>this.onCloseClicked.dispatch()},k),X),this._closeButton=G.Uoy.getInjectedValue(X,"CLOSE_BUTTON"),this._closeButton.GameObject.active=null===(U=this.data.showCancel)||void 0===U||U;for(const F of Q)F.active=!0;return X}))}hideCancelButton(){var k;null===(k=this._closeButton)||void 0===k||k.lockState($.K.Disabled)}update(){var k;super.update(),null===(k=this._prefabRoot)||void 0===k||k.update()}shutdown(){var k;this.onCloseClicked.dispose(),null===(k=this._prefabRoot)||void 0===k||k.destroy(),super.shutdown()}}},76277:(k,B,U)=>{"use strict";U.d(B,{G:()=>j,_:()=>$});var F=U(77601);(0,F.gb)({key:"regional-bundle-triggers",default:!1,activateAssociatedExperiments:0}),(0,F.gb)({key:"use-membership-for-magicoin-out-of-magicoin-prompt",default:!1,activateAssociatedExperiments:0}),(0,F.gb)({key:"vanity-gear-sale",default:!1,activateAssociatedExperiments:0}),(0,F.gb)({key:"reward-scaling",default:{enabled:!1},activateAssociatedExperiments:0}),(0,F.gb)({key:"respawn-timers",default:{enabled:!1}});var G=U(35120);(0,F.gb)({key:"shorten-placement-test-game",activateAssociatedExperiments:0,default:{enabled:!1}});function j(k){return G.q.instance.prodigy.gameContainer.get("073-6f3b").getFeatureValue(k.key)}function $(k){return G.q.instance.prodigy.gameContainer.get("073-6f3b").isOn(k.key)}},65443:(k,B,U)=>{"use strict";var F;U.d(B,{$:()=>F}),function(k){k.Titan="titan",k.TitanMemberBonus="Titan-Member-Bonus"}(F||(F={}))},72042:(k,B,U)=>{"use strict";U.d(B,{U:()=>X});var F,G,j=U(8674),$=U(62459),H=U(79687),V=U(95891),W=U(68910),q=U(35120),K=U(51477),z=U(34829),Y=U(30405),Q=U(47255);!function(k){k.Image="image",k.Pixel="pixel",k.Sound="sound",k.Text="text",k.Json="json"}(G||(G={}));let X=F=class{constructor(k,B){this.loadingMetricProperties={},this.objectCountProperties={},this.deviceInfoProvider=null,this.crashedLastLogin=!1,this._totalAssetDownloadSize=0,this._totalAssetDownloadTime=0,this._totalAssetsDownloaded=0,this._averageDownloadSpeed=0,this._networkRequestCount=0,this._supportsWasm=!1,this.timeToPlayMS=0,this.timeInLoadingMS=0,this.pingMetricsIndex=0,this.game=k,this.deviceInfoProvider=B,this._supportsWasm="object"==typeof window.WebAssembly&&"function"==typeof window.WebAssembly.instantiate}createPingMetricEvent(k,B,U,G){const j=q.q.instance.prodigy.gameContainer,$=j.get("e20-0fb0").player;if(z.s.get("GameConstants.Build.ENABLE_FRAMERATE_METRICS")&&Y.o.inTestGroups($,F.TEST_GROUPS)){j.get("c47-20b6").technical.sendPingEvent(++this.pingMetricsIndex,k,B,U,G)}}createLoadingMetricEvent(k,B,U=!1,G={}){const j=q.q.instance.prodigy.gameContainer,H=j.get("e20-0fb0").player;let W=!1;if(z.s.get("GameConstants.Build.ENABLE_LOADING_METRICS")&&(Y.o.inTestGroups(H,F.TEST_GROUPS)||k===Q.o.FunnelCharSelect)){const U=q.q.instance.prodigy.timeManager.getServerTimeMs(),F=V.merge(G,this.getCustomMetrics()),H=this.loadingMetricProperties[k];let K=U,z=0,Y=!0;if(H&&(z=H.loadingMetricsIndex,B===Q.o.StageLoadEnd&&(K=H.loadingTimeStartMS)),B===Q.o.StageLoadStart)z++,this.loadingMetricProperties[k]={loadingMetricsIndex:z,loadingTimeStartMS:K};else if(B===Q.o.StageLoadEnd){H||$.VyI.log("Stage load end found without stage load start.",$.$bb.Warning);const k=U-K;F.loadTime=k}else $.VyI.log(`Unsupported loading metric type ${B}`,$.$bb.Warning),Y=!1;if(Y){const U=this.getLoadingEventData(F),G=B===Q.o.StageLoadStart?"Technical Loading Started":"Technical Loading Completed";j.get("c47-20b6").technical.sendLoadingEvent(G,k,z,U),W=!0}}return W}getLoadingEventData(k){if(!z.s.get("GameConstants.Build.ENABLE_ADVANCED_METRICS"))return{};const B={};$.Aq$.isDefined(this.objectCountProperties.Element)&&(B.elements_created=this.objectCountProperties.Element.createdCount,B.elements_destroyed=this.objectCountProperties.Element.destroyedCount),$.Aq$.isDefined(this.objectCountProperties.GameObject)&&(B.objects_created=this.objectCountProperties.GameObject.createdCount,B.objects_destroyed=this.objectCountProperties.GameObject.destroyedCount),$.Aq$.isDefined(this.objectCountProperties.UIElement)&&(B.ui_elements_created=this.objectCountProperties.UIElement.createdCount,B.ui_elements_destroyed=this.objectCountProperties.UIElement.destroyedCount),B.connection_downlink_speed=this.deviceInfoProvider.getConnectionDownlinkSpeed(),B.connection_rtt=this.deviceInfoProvider.getConnectionRTT(),B.connection_type=this.deviceInfoProvider.getConnectionType(),B.effective_connection_type=this.deviceInfoProvider.getConnectionEffectiveType(),B.device_memory=this.deviceInfoProvider.getDeviceMemory(),B.hardware_concurrency=this.deviceInfoProvider.getHardwareConcurrency(),B.js_heap_size_limit=this.deviceInfoProvider.getJSHeapSizeLimit(),B.js_heap_size_used=this.deviceInfoProvider.getUsedJSHeapSize(),B.crashed_last_login=this.crashedLastLogin,B.crashed_time=this.crashedLastTime,B.api_request_count=this._networkRequestCount,B.total_asset_bytes_downloaded=this._totalAssetDownloadSize,B.total_asset_time_downloading=this._totalAssetDownloadTime,B.average_download_speed=this.getAverageDownloadSpeedMBps();const U=this.getRenderInfo();B.render_type=U.renderType,B.webgl_version=U.webGLVersion,B.web_worker_support=this.deviceInfoProvider.isWebWorkerAvailable(),B.web_assembly=this._supportsWasm,B.web_socket=this.deviceInfoProvider.isWebSocketAvailable();const F=this.getAssetCounts();return B.image_count=F[G.Image],B.pixel_count=F[G.Pixel],B.sound_count=F[G.Sound],B.text_count=F[G.Text],B.json_count=F[G.Json],B}getAverageDownloadSpeedMBps(){return this._averageDownloadSpeed/1e6*8}getRenderInfo(){switch(q.q.instance.game.renderer.type){case W.RENDERER_TYPE.WEBGL:return{renderType:"webGL",webGLVersion:String(this.game.renderer.context.webGLVersion)};case W.RENDERER_TYPE.CANVAS:return{renderType:"canvas",webGLVersion:"NA"};default:return{renderType:"unknown",webGLVersion:"NA"}}}getAssetCounts(){const k=this.game.cache,B={[G.Image]:0,[G.Pixel]:0,[G.Sound]:0,[G.Text]:0,[G.Json]:0};for(const U in $.r05)if(isNaN(Number(U))){const F=$.r05[U],j=k.getKeys(F),H=j.length;let V=null;switch(F){case $.r05.IMAGE:V=G.Image;let U=0;for(let B=0;B{localStorage.setItem("prodigy_browser_status","unloaded")}));const k=localStorage.getItem("prodigy_browser_status");this.crashedLastLogin=$.Aq$.isDefined(k)&&"unloaded"!==k,this.crashedLastLogin&&(this.crashedLastTime=localStorage.getItem("prodigy_browser_time"),$.Aq$.isDefined(this.crashedLastTime)||(this.crashedLastTime=null)),localStorage.setItem("prodigy_browser_status","loaded"),this.setLastMapLoadStarted("none"),setInterval((()=>{localStorage.setItem("prodigy_browser_time",(new Date).toISOString())}),1e3)}}catch(e){$.VyI.log("checkForCrash failed",$.$bb.Error)}}setLastMapLoadStarted(k){$.o5U.hasLocalStorageSupport()&&localStorage&&localStorage.setItem("prodigy_browser_map_load",k)}setInBattle(k){$.VyI.log(`setInBattle(${k})`,$.$bb.Verbose),$.o5U.hasLocalStorageSupport()&&localStorage&&($.Aq$.isDefined(k)?localStorage.setItem("prodigy_browser_in_battle",k):localStorage.removeItem("prodigy_browser_in_battle"))}objectCreated(k){const B=this.objectCountProperties[k];$.Aq$.isDefined(B)?B.createdCount=B.createdCount+1:this.objectCountProperties[k]={createdCount:1,destroyedCount:0}}objectDestroyed(k){const B=this.objectCountProperties[k];$.Aq$.isDefined(B)?B.destroyedCount=B.destroyedCount+1:($.VyI.log("object destroyed before created",$.$bb.Warning),this.objectCountProperties[k]={createdCount:0,destroyedCount:1})}setLastGameSessionStartTime(k){this.lastGameSessionStartTime=k}getLastGameSessionStartTime(){return this.lastGameSessionStartTime}assetDownloaded(k,B){this._totalAssetDownloadSize+=k,this._totalAssetDownloadTime+=B,++this._totalAssetsDownloaded;const U=k/B;this._averageDownloadSpeed+=(U-this._averageDownloadSpeed)/this._totalAssetsDownloaded}increaseNetworkRequestCount(){++this._networkRequestCount}sendOnboardingFunnelEvent(k){q.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:"Onboarding",funnelType:"tutorial",stepName:k})}};X.TEST_GROUPS=[5],X.loadEventsSent={},X=F=(0,j.Cg)([(0,H.injectable)(),(0,j.Qj)(0,(0,H.inject)("51c-03a0")),(0,j.Qj)(1,(0,H.inject)("880-55b2")),(0,j.Sn)("design:paramtypes",[K.n,Object])],X)},98193:(k,B,U)=>{"use strict";U.d(B,{z:()=>J});var F,G=U(62459),j=U(28628),$=U(90633);!function(k){k[k.None=0]="None",k[k.CriticalHit=1]="CriticalHit",k[k.Effective=2]="Effective",k[k.Ineffective=4]="Ineffective",k[k.Missed=8]="Missed",k[k.Heal=16]="Heal",k[k.Fumble=32]="Fumble",k[k.Absorb=64]="Absorb",k[k.Reflected=128]="Reflected",k[k.Dodge=256]="Dodge"}(F||(F={}));var H=U(35120),V=U(34829),W=U(22023),q=U(10670),K=U(24047),z=U(65050),Y=U(25089),Q=U(67665);const X={critical:F.CriticalHit,effective:F.Effective,ineffective:F.Ineffective,heal:F.Heal,absorbed:F.Absorb,reflected:F.Reflected,dodged:F.Dodge},Z=new Set([j.gu.StatusEffectsTutorial]);class J extends Y.v{get battleId(){var k;return null===(k=this._baseData)||void 0===k?void 0:k.battle_id}setupBattleData(k){var B,U,F,G;const j=k.resumedData;this._baseData={battle_id:k.battle_id,battle_type:k.battle_type,battle_variant:k.battle_variant},this._questionData={questions_answered_correctly:null!==(B=null==j?void 0:j.questionsAnsweredCorrectly)&&void 0!==B?B:0,questions_asked:null!==(U=null==j?void 0:j.questionsAnswered)&&void 0!==U?U:0},this._numberOfRounds=null!==(F=null==j?void 0:j.numberOfRounds)&&void 0!==F?F:0,this._turn=null!==(G=null==j?void 0:j.turn)&&void 0!==G?G:0,this._battleStartTimeMs=Date.now(),this._numberOfClicks=0,this._battleInstanceAndId={instance_id:k.instance_id,instance_type:k.instance_type}}sendBattleStartEvent(k,B=null){if(this.setupBattleData(k),this.shouldSuppressBattleEvents())return;const U=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{boss:k.battle_variant.includes(q.VB.Boss)||!1,pvp:k.battle_type===j.gu.Duel&&k.battle_variant!==q.VB.DuelsStadiumBot,coop:!1}),k),B),this.getCommonEventDataProperties());Q.Y.track("Battle Started",U)}sendBattleResumedEvent(k,B=null){if(this.setupBattleData(k),this.shouldSuppressBattleEvents())return;const U=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{boss:k.battle_variant.includes(q.VB.Boss)||!1,pvp:k.battle_type===j.gu.Duel&&k.battle_variant!==q.VB.DuelsStadiumBot,coop:!1}),k),B),this.getCommonEventDataProperties());Q.Y.track("Battle Resumed",U)}sendBattleCompleteEvent(k,B=null){var U;if(!(null===(U=this._baseData)||void 0===U?void 0:U.battle_id))return void G.VyI.log("Error: Battle Complete event cannot be sent before Battle Start or Resume event",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const F=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),this._questionData),this._battleInstanceAndId),{rounds:this._numberOfRounds,turn:this._turn,duration:(Date.now()-this._battleStartTimeMs)/V.s.SECONDS_TO_MILLISECONDS_MULTIPLIER}),k),B),this.getCommonEventDataProperties());Q.Y.track("Battle Completed",F)}sendBattleParticipantEnteredEvent(k,B=null){var U;if(!(null===(U=this._baseData)||void 0===U?void 0:U.battle_id))return void G.VyI.log("Error: Battle Participant Entered event cannot be sent before Battle Start or Resume event",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const F=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{entry_round:this._numberOfRounds,turn:this._turn}),k),B),this.getCommonEventDataProperties());Q.Y.track("Battle Participant Entered",F)}sendBattleParticipantOutcomesEvent(k,B=null){var U;if(!(null===(U=this._baseData)||void 0===U?void 0:U.battle_id))return void G.VyI.log("Error: Battle Participant Outcomes event cannot be sent before Battle Start or Resume event",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const F=Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),k),B),this.getCommonEventDataProperties());Q.Y.track("Battle Participant Outcomes",F)}sendBattlePetCapturedEvent(k,B=null){var U;if(!(null===(U=this._baseData)||void 0===U?void 0:U.battle_id))return void G.VyI.log("Error: Pet Captured Event cannot be sent before Battle Start or Resume event.",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const F=Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{pet_name:k.petName,pet_element:k.petElement,pet_type:k.petType,pet_level:k.petLevel,pet_rarity:k.petRarity,pet_rank:k.petRank,prev_pet_copies:k.previousPetCopies,capture_source:k.captureSource}),B),this.getCommonEventDataProperties());Q.Y.track("Pet Captured",F)}sendBattlePetRescueAvailableEvent(k,B=null){var U;if(!(null===(U=this._baseData)||void 0===U?void 0:U.battle_id))return void G.VyI.log("Error: Pet Rescue Available Event cannot be sent before Battle Start or Resume event.",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const F=Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),k),B),this.getCommonEventDataProperties());Q.Y.track("Pet Rescue Available",F)}sendBattlePetCaptureFailedEvent(k,B=null){var U;if(!(null===(U=this._baseData)||void 0===U?void 0:U.battle_id))return void G.VyI.log("Error: Pet Capture Failed Event cannot be sent before Battle Start or Resume event.",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const F=Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{pet_name:k.petName,pet_element:k.petElement,pet_type:k.petType,pet_level:k.petLevel,pet_rarity:k.petRarity,fail_reason:k.failReason,prev_pet_copies:k.previousPetCopies,funnel_id:"Member Locked"===k.failReason?this._segment.purchase.getFunnelID():null,capture_source:k.captureSource}),B),this.getCommonEventDataProperties());Q.Y.track("Pet Capture Failed",F)}sendBattleActionPerformedEvent(k){var B;if(!(null===(B=this._baseData)||void 0===B?void 0:B.battle_id))return void G.VyI.log("Error: Battle Action Performed event cannot be sent before Battle Start or Resume event",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const U=Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{round:this._numberOfRounds,turn:this._turn}),k),this.getCommonEventDataProperties());Q.Y.track("Battle Action Performed",U)}sendBattleMpRecoveryAttemptedEvent(k){var B;if(!(null===(B=this._baseData)||void 0===B?void 0:B.battle_id))return void G.VyI.log("Error: Battle MP Recovery Attempted event cannot be sent before Battle Start or Resume event",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const U=Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{round:this._numberOfRounds,turn:this._turn,question_uuid:this._recentQuestionUuid}),k),this.getCommonEventDataProperties());Q.Y.track("Battle MP Recovery Attempted",U)}sendBattleInterfaceClickedEvent(k,B=null){var U;if(!(null===(U=this._baseData)||void 0===U?void 0:U.battle_id))return void G.VyI.log("Error: Battle Interface Clicked event cannot be sent before Battle Start or Resume event",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const F=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{round:this._numberOfRounds,turn:this._turn,clicks:++this._numberOfClicks}),k),B),this.getCommonEventDataProperties());Q.Y.track("Battle Interface Clicked",F)}sendBattleFunnelAdvancedEvent(k,B=null){if(this.shouldSuppressBattleEvents())return;const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Q.Y.track("Funnel Advanced",U)}sendEndGameFunnelAdvancedEvent(k,B,U){if(this.shouldSuppressBattleEvents())return;const F=H.q.instance.prodigy.breadcrumbManager;U&&F.isBreadcrumbComplete($.B.FEATURE_ENDGAME_QUEST,U)||(U&&F.completeBreadcrumb($.B.FEATURE_ENDGAME_QUEST,U),this.sendBattleFunnelAdvancedEvent({funnel_name:K.F.EndGame,funnel_type:K.M.Chapter,step_index:k,step_name:B}))}sendSpellStatusEffectAppliedEvent(k){var B;if(!(null===(B=this._baseData)||void 0===B?void 0:B.battle_id))return void G.VyI.log("Error: Spell Status Effect Applied event cannot be sent before Battle Start or Resume event",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const U=Object.assign(Object.assign(Object.assign({},k),this._baseData),this.getCommonEventDataProperties());Q.Y.track("Spell Status Effect Applied",U)}sendSpellStatusEffectTriggeredEvent(k){var B;if(!(null===(B=this._baseData)||void 0===B?void 0:B.battle_id))return void G.VyI.log("Error: Spell Status Effect Triggered event cannot be sent before Battle Start or Resume event",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const U=Object.assign(Object.assign(Object.assign({},k),this._baseData),this.getCommonEventDataProperties());Q.Y.track("Spell Status Effect Triggered",U)}getSegmentBattleType(k){switch(k){case j.gu.Tutorial1:case j.gu.Tutorial2:case j.gu.Tutorial3:case j.gu.Titan:return q.ju.Titan;case j.gu.EndgamePippet:case j.gu.EndGameGuardianFirefly:case j.gu.EndGameGuardianShiverchill:case j.gu.EndGameGuardianBonfire:case j.gu.EndGameGuardianShipwreck:case j.gu.EndGameGuardianSkywatch:return q.ju.EndGame;case j.gu.EndGamePuppetMaster:return q.ju.PuppetMaster;case j.gu.MatchmakingDuel:case j.gu.MatchmakingBotDuel:return j.gu.Duel}return k}getBattleVariant(k,B){var U,F;let G=q.VB.Standard;switch(k){case j.gu.Basic:case j.gu.FestivalDailyBoss:null===(U=B.units)||void 0===U||U.forEach((k=>{37===k.creature.id?G=q.VB.Pippet:k.type===j.uj.Wizard?G=q.VB.CloakedWizard:k.type===j.uj.Boss&&(G=q.VB.Boss)}));break;case j.gu.Ultimates:G=this.getUltimatesBattleVariant(B.questData);break;case j.gu.Tutorial1:G=q.VB.Tutorial1;break;case j.gu.Tutorial2:G=q.VB.Tutorial2;break;case j.gu.Tutorial3:G=q.VB.Tutorial3;break;case j.gu.Titan:G=q.VB.Titan;break;case j.gu.MatchmakingDuel:G=q.VB.DuelsStadium;break;case j.gu.MatchmakingBotDuel:G=q.VB.DuelsStadiumBot;break;case j.gu.EndgamePippet:case j.gu.EndGameGuardianFirefly:case j.gu.EndGameGuardianShiverchill:case j.gu.EndGameGuardianBonfire:case j.gu.EndGameGuardianShipwreck:case j.gu.EndGameGuardianSkywatch:case j.gu.EndGamePuppetMaster:case j.gu.PumpkinfestBoss:G=q.VB.Boss;break;case j.gu.NormalRiftRun:G=q.VB.RiftRun;break;case j.gu.BossRiftRun:G=q.VB.DragonRift}switch(B.instanceType){case z.N.CrystalCaverns:(null===(F=B.units)||void 0===F?void 0:F.some((k=>k.type===j.uj.Wizard)))&&(G=q.VB.Boss)}return G}getUltimatesBattleVariant(k){switch(H.q.instance.prodigy.gameContainer.get("e20-0fb0").player.ultimateTaskId>0?k.getTamingLevel()+1:1){case 1:return q.VB.Stage1;case 2:return q.VB.Stage2;case 3:return q.VB.Stage3}}getBattleCharacterType(k,B,U){let F;return F=k?q.Xn.Wizard:this._baseData.battle_type===j.gu.Ultimates?q.Xn.Mythic:U?W.P8.getPetEvolutionType(B):q.Xn.Uncapturable,F}updateQuestionData(k,B){this._recentQuestionUuid=B,this._questionData.questions_asked++,k&&this._questionData.questions_answered_correctly++}setRoundNumber(k){this._numberOfRounds=k}setTurn(k){this._turn=k}getCurrentBattleID(){var k;return null===(k=this._baseData)||void 0===k?void 0:k.battle_id}getUnitRarity(k,B){let U=k?-1:null!=B?B:-1;return this._baseData.battle_variant===q.VB.DuelsStadiumBot&&(U=this._segment.duelsStadium.botDifficulty),U}getUnitName(k,B){return k?J.PLAYER_SEGMENT_ID:G.Aq$.isDefined(B.unitNameForSegment)?B.unitNameForSegment:B.name}getUnitPosition(k,B){return k?k.creature.isOpponent?B.rightTeam.rawUnits.findIndex((B=>B.battleId===k.battleId)):B.leftTeam.rawUnits.findIndex((B=>B.battleId===k.battleId)):-1}getHitInformation(k){return k.map((k=>{const B={damage:k.damage};return Object.keys(X).forEach((U=>{const F=X[U];k.damageInformation&F&&(B[U]=!0)})),B}))}shouldSuppressBattleEvents(){var k;return Z.has(null===(k=this._baseData)||void 0===k?void 0:k.battle_type)}}J.PLAYER_SEGMENT_ID="Player"},10670:(k,B,U)=>{"use strict";var F,G,j,$,H,V,W,q,K;U.d(B,{B1:()=>H,VB:()=>G,Xn:()=>j,jT:()=>K,ju:()=>F,rW:()=>$,z2:()=>q,zA:()=>W}),function(k){k.Tutorial="tutorial",k.Titan="titan",k.EndGame="EndGameBossBattle",k.PuppetMaster="EndGamePuppetMasterBattle"}(F||(F={})),function(k){k.Standard="Standard",k.CloakedWizard="Cloaked Wizard",k.Pippet="Pippet",k.Boss="Boss",k.Stage1="Stage1",k.Stage2="Stage2",k.Stage3="Stage3",k.Tutorial1="Tutorial1",k.Tutorial2="Tutorial2",k.Tutorial3="Tutorial3",k.Titan="Titan",k.DarkTower="Dark Tower",k.DuelsStadium="Duels Stadium",k.DuelsStadiumBot="Duels Stadium (Bot)",k.RiftRun="Rift Run",k.DragonRift="Dragon Rift"}(G||(G={})),function(k){k.Wizard="wizard",k.Mythic="mythic",k.Uncapturable="uncapturable"}(j||(j={})),function(k){k.Unconscious="Unconscious",k.Conscious="Conscious",k.Fled="Fled"}($||($={})),function(k){k.Player="Player",k.Opponent="Opponent"}(H||(H={})),function(k){k.Field="Field",k.Reserve="Reserve"}(V||(V={})),function(k){k.Action="action",k.Spell="spell",k.Self="self",k.Ally="ally",k.Enemy="enemy"}(W||(W={})),function(k){k.InBattle="in-battle",k.PostBattle="post-battle",k.PostBattleAuto="post-battle-auto-rescued"}(q||(q={})),function(k){k.AllGemsCollected="All Gems Collected",k.AllGemsPreviouslyCollected="All Gems Previously Collected",k.AllGemsFirstAcademyVisit="All Gems First Academy Visit",k.PippetFirstTimeBattleStart="Pippet 1st Time Battle Start",k.PippetBattleWon="Pippet Battle Won",k.IllusionBoss1FirstTimeBattleStart="Illusion Boss 1 1st Time Battle Start",k.IllusionBoss1BattleWon="Illusion Boss 1 Battle Won",k.IllusionBoss2FirstTimeBattleStart="Illusion Boss 2 1st Time Battle Start",k.IllusionBoss2BattleWon="Illusion Boss 2 Battle Won",k.IllusionBoss3FirstTimeBattleStart="Illusion Boss 3 1st Time Battle Start",k.IllusionBoss3BattleWon="Illusion Boss 3 Battle Won",k.IllusionBoss4FirstTimeBattleStart="Illusion Boss 4 1st Time Battle Start",k.IllusionBoss4BattleWon="Illusion Boss 4 Battle Won",k.IllusionBoss5FirstTimeBattleStart="Illusion Boss 5 1st Time Battle Start",k.IllusionBoss5BattleWon="Illusion Boss 5 Battle Won",k.PuppetMasterFirstTimeBattleStart="Puppet Master 1st Time Battle Start",k.PuppetMasterBattleWon="Puppet Master Battle Won",k.PostPuppetMasterVisualsShown="Post Puppet Master Visuals Shown",k.PostPuppetMasterPedestalClicked="Post Puppet Master Pedestal Clicked"}(K||(K={}))},63693:(k,B,U)=>{"use strict";var F,G,j,$;U.d(B,{B1:()=>j,Io:()=>F,Zj:()=>$,rW:()=>G}),function(k){k.Front="front",k.Top="top",k.bottom="bottom"}(F||(F={})),function(k){k.Unconscious="unconscious",k.Conscious="conscious",k.Fled="fled"}(G||(G={})),function(k){k.Player="Player",k.Opponent="Opponent"}(j||(j={})),function(k){k.Base="base pet",k.Evolution1="evolution1",k.Evolution2="evolution2",k.Evolution3="evolution3",k.Mythic="Mythic"}($||($={}))},16887:(k,B,U)=>{"use strict";var F,G;U.d(B,{f:()=>G,g:()=>F}),function(k){k[k.StepOne=1]="StepOne",k[k.StepTwo=2]="StepTwo",k[k.StepThree=3]="StepThree"}(F||(F={})),function(k){k.PermissionNeeded="Permission Needed",k.WaitingOnPermission="Waiting on Permission",k.PermissionGranted="Permission Granted"}(G||(G={}))},35569:(k,B,U)=>{"use strict";var F;U.d(B,{D:()=>F}),function(k){k.ElementGem="{0}_gem",k.AcademyTeleport="academy_teleport",k.PedestalRoom="pedestal_room",k.AcademyTowerLobby="academy_tower_lobby",k.TowerCommonRoom="tower_common_room",k.TowerComplete="tower_complete",k.FirstKeystonePlaced="{0}_first_gem"}(F||(F={}))},13093:(k,B,U)=>{"use strict";var F,G;U.d(B,{T:()=>G,l:()=>F}),function(k){k.FirstEligible="arcadia_first_eligible",k.WorldMapSeen="arcadia_world_map_seen",k.FirstTap="arcadia_first_tap",k.FirstExit="arcadia_first_exit"}(F||(F={})),function(k){k[k.FirstEligible=0]="FirstEligible",k[k.WorldMapSeen=1]="WorldMapSeen",k[k.FirstTap=2]="FirstTap",k[k.FirstExit=3]="FirstExit"}(G||(G={}))},96073:(k,B,U)=>{"use strict";var F,G;U.d(B,{j:()=>F,t:()=>G}),function(k){k.FirstLogin="costumes_first_login",k.MenuOpen="costumes_menu_open",k.TutorialVideoStarted="costumes_tutorial_video_started",k.TutorialVideoFinished="costumes_tutorial_video_finished",k.CostumePreview="costume_preview",k.CostumeEquipped="costume_equipped"}(F||(F={})),function(k){k[k.FirstLogin=0]="FirstLogin",k[k.MenuOpen=1]="MenuOpen",k[k.TutorialVideoStarted=2]="TutorialVideoStarted",k[k.TutorialVideoFinished=3]="TutorialVideoFinished",k[k.CostumePreview=4]="CostumePreview",k[k.CostumeEquipped=5]="CostumeEquipped"}(G||(G={}))},65050:(k,B,U)=>{"use strict";var F;U.d(B,{N:()=>F}),function(k){k.Academy="academy",k.Archives="archives",k.BattlePass="treasure_track",k.BattleRestriction="battle_restriction",k.CrystalCaverns="crystal-caverns",k.DuelsStadium="Duels Stadium",k.BossRift="boss-rift",k.EndOfBattle="end-of-battle",k.FestivalDaily="festival-daily",k.FestivalDailyBossRouletteSpin="festival-daily-boss-roulette-spin",k.FestivalChestRouletteSpin="festival-chest-roulette-spin",k.FestivalProgressionWindow="festival-progression-window",k.Interface="interface",k.KidsMlpUpgrade="kids_mlp_upgrade",k.KidsMlpUpgradeComplete="kids_mlp_upgrade_complete",k.KidsMlpUpgradeFail="kids_mlp_upgrade_fail",k.LootDash="wizard_dash",k.LootDashQuickQuiz="wizard_dash_assignment",k.MembershipVideo="membership_video",k.OpenWorld="open-world",k.PlayAtHomeVideo="play_at_home_video",k.RiftRun="rift-run",k.ShopVisit="shop-visit",k.StateChallenge="state_challenge",k.TowerRun="tower-run",k.UI="ui",k.UniversalTeamSelection="universal_team_selection",k.WizardDash="WizardDash",k.WhiteGloveOffer="white_glove_offer",k.ElderWhiteGloveOffer="elder_player_white_glove_offer"}(F||(F={}))},96810:(k,B,U)=>{"use strict";var F,G;U.d(B,{h:()=>G,l:()=>F}),function(k){k.SignIn="Sign In",k.EnterClassCode="Enter Class Code",k.EnterCountry="Enter Country",k.EnterSubCountry="Enter Sub-Country",k.EnterGrade="Enter Grade",k.FirstLogin="First Login",k.LoadGame="Load Game",k.CreateCharacter="Create Character",k.CustomizeCharacter="Customize Character",k.SelectLocation="Select Location",k.CompleteSignup="Complete Signup",k.TutorialStart="Tutorial Start",k.FrontYardDialogue1="Front Yard Dialogue 1",k.AcademyDialogue1="Academy Dialogue 1",k.FirstTutorialBattleStarted="First Tutorial Battle Started",k.FirstQuestionAnswered="First Question Answered",k.FirstTutorialBattleWon="First Tutorial Battle Won",k.ReachedLevel2="Reached Level 2",k.PalletPassDialogue1="Pallet Pass Dialogue 1",k.InspectPet="Inspect Pet",k.PalletPassDialogue2="Pallet Pass Dialogue 2",k.PetCaptured1="Pet Captured 1",k.AcademyDialogue2="Academy Dialogue 2",k.MinionBattleStarted="Minion Battle Started",k.PetCaptured2="Pet Captured 2",k.MinionBattleWon="Minion Battle Won",k.ReachedLevel3="Reached Level 3",k.EscapedDialogue1="Escaped Dialogue 1",k.SelectName="Select Name",k.SelectNickname="Select Nickname",k.TutorialComplete="Tutorial Complete",k.FirstPostTutorialBattleStarted="First Post-Tutorial Battle Started",k.ReachedLevel4="Reached Level 4",k.FirstPostTutorialBattleWon="First Post-Tutorial Battle Won",k.ReachedLevel5="Reached Level 5",k.PostBattleFlowChestDisplay="post_battle_chest",k.PostBattleFlowRewardsDisplay="post_battle_rewards",k.PostBattleFlowStarJar="post_battle_star_jar",k.PlayerGoalsFirstBattleWon="first_battle_won",k.PlayerGoalsFirstRewardReceived="received_first_reward",k.PlayerGoalsSecondBattleWon="second_battle_won",k.PlayerGoalsSecondRewardReceived="received_second_reward",k.PlayerGoalsHomeSession="home_session",k.PlayerGoalsHomeSessionRewardReceived="received_home_reward",k.PlayerGoalsParentAttachStarted="parent_attach_started",k.PlayerGoalsParentAttachCompleted="parent_attach_completed",k.PlayerGoalsParentAttachRewardReceived="received_parent_reward",k.PlayerGoalsTeacherAttachStarted="teacher_attach_started",k.PlayerGoalsTeacherAttachComplete="teacher_attach_completed",k.PlayerGoalsTeacherAttachRewardReceived="received_teacher_attach_reward",k.PlayerGoalsProfileQuizComplete="profile_quiz_completed",k.PlayerGoalsProfileQuizRewardReceived="received_profile_quiz_reward",k.DynamicStoreDefeatedPet="dynamic_store_defeated_pet",k.DynamicStoreLostPetsMain="dynamic_store_lost_pets_main",k.DynamicStoreLostPetPurchased="dynamic_store_lost_pet_purchased",k.DynamicStoreLostPetsTab="dynamic_store_lost_pets_tab",k.DynamicStoreLostPetViewed="dynamic_store_lost_pet_viewed",k.PetGearStart="Pet Gear Tutorial Started",k.PetGearTeamMenu="Your Team screen of the PetBook is opened",k.PetGearPetMenu="Your Pet screen of the PetBook is opened",k.PetGearGearMenu="Pet Gear Equip Menu Opened",k.PetGearGearEquipped="Pet Gear Item Equipped",k.PetGearGearUsedInBattle="Pet Gear Item used in battle",k.PetGearTutorialComplete="Pet Gear Tutorial Complete",k.PetHardCurrencyImpression="Pet Hard Currency Impression",k.PetHardCurrencyIntention="Pet Hard Currency Intention",k.PetHardCurrencyTransactionComplete="Pet Hard Currency Transaction Complete",k.DailyLoginCalendarAssigned="daily_login_calendar_assigned",k.DailyLoginCalendarViewed="daily_login_calendar_viewed",k.DailyLoginCalendarFirstReward="daily_login_calendar_first_reward_received",k.DailyLoginCalendarNthReward="daily_login_calendar_N_reward_received",k.DailyLoginCalendarLoopingReward="daily_login_calendar_looping_reward_received",k.DailyLoginCalendarComplete="daily_login_calendar_calendar_complete",k.SegmentedOffersAssigned="segmented_offer_assigned",k.SegmentedOffersViewed="segmented_offer_viewed",k.SegmentedOffersClicked="segmented_offer_clicked",k.SegmentedOffersGotMembership="segmented_offer_got_membership",k.SegmentedOffersGotExpired="segmented_offer_expired",k.CampaignReplayFtueChargedLevelsRemoved="charged levels full removal",k.CampaignReplayFtuePuppetMasterCutSceneStart="Puppet Master cut scene start",k.CampaignReplayFtuePuppetMasterCutSceneEnd="Puppet Master cut scene end",k.CampaignReplayFtueMapScreenOpened="Map screen opened",k.CampaignReplayFtueModal="Campaign replay modal",k.CampaignReplayFtueRestrictions="Campaign replay restrictions",k.CampaignReplayFtueQualifyForHardMode="Qualify for Hard Mode",k.CampaignReplayFtueEnterHardMode="Entered Hard Mode"}(F||(F={})),function(k){k.AfterSchoolWidgetHUDButtonHighlighted="HUD button highlighted",k.AfterSchoolWidgetHUDButtonClicked="HUD button clicked",k.AfterSchoolWidgetNootExplainsDailyGift='Noot explains "daily gift" feature',k.AfterSchoolWidgetPlayerAdvancesToRewardScreen="Player advances to reward screen",k.AfterSchoolWidgetPlayerCollectsSchoolReward="Player collects School Reward",k.AfterSchoolWidgetNootExplainsHowToGetMagicoin="Noot explains how to get Magicoin",k.AfterSchoolWidgetPlayerReturnsToRewardScreen="Player returns to reward screen",k.AfterSchoolWidgetPlayerClicksCollectAtHomeButton='Player clicks the "Collect at Home" button',k.AfterSchoolWidgetNootOopsDialog='Noot "Oops" dialog',k.AfterSchoolWidgetCollectMagicoinTooltipShown="Collect Magicoin tool-tip shown",k.AfterSchoolWidgetNootRemindsPlayersToReturnAfterSchool="Noot reminds players to come back after school",k.AfterSchoolWidgetPlayerCollectsHomeReward="Player collects Home Reward",k.AfterSchoolWidgetNootRemindsPlayersToReturnDaily="Noot reminds players to come back every day",k.AfterSchoolWidgetCollectMagicoinTooltipShownAtHome="Collect Magicoin tool-tip shown",k.AfterSchoolWidgetTutorialComplete="Tutorial Complete"}(G||(G={}))},17642:(k,B,U)=>{"use strict";var F;U.d(B,{V:()=>F}),function(k){k.Start="ftue_start",k.OpenMythicDetailView="open_mythic_detail_view"}(F||(F={}))},23283:(k,B,U)=>{"use strict";var F;U.d(B,{U:()=>F}),function(k){k.WheelOfWonder="Wheel of Wonder",k.TwilightWheel="Twilight Wheel",k.LuckyLoot="Lucky Loot",k.PrizeWheel="Prize Wheel"}(F||(F={}))},41674:(k,B,U)=>{"use strict";var F,G,j,$,H,V,W,q,K,z;U.d(B,{$N:()=>G,Lv:()=>j,No:()=>W,Wm:()=>F,ZF:()=>$,jR:()=>K,k:()=>z,oi:()=>q,ss:()=>H,yO:()=>V}),function(k){k.ClickableSprite="clickable_image",k.Menu="menu",k.Popup="pop_up",k.DialogBox="dialog_box",k.PetBook="pet_book",k.PetDetailsView="pet_details_view",k.InfoPanel="info_panel",k.HUD="hud",k.Screen="screen",k.ScreenBanner="screen_banner",k.Modal="modal",k.Settings="settings",k.Shop="shop",k.Window="window",k.BattlePass="treasure_track_main",k.VideoPlayer="video_player",k.Overworld="overworld"}(F||(F={})),function(k){k.None="none",k.Mail="mail",k.HudClick="hud_click",k.AutoSurfaced="auto_surfaced",k.Npc="npc",k.NpcClick="npc_click",k.Door="door",k.ButtonClick="button_click",k.ButtonClickBadged="button_click_badged",k.TabClick="tab_click",k.QuestComplete="quest_complete",k.MouseHover="mouse_hover",k.SignpostClick="signpost_click",k.WorldObject="world_object_click",k.Battle="battle",k.BattleCompleted="battle_completed",k.Toaster="toast_notification",k.MembershipUpgrade="membership_upgrade",k.MembershipPurchase="membership_purchase",k.PrizeWheel="prize_wheel",k.RestrictedBattle="restricted_battle",k.ElderPlayerTopUp="elder_player_top_up",k.BattleRestrictionsMet="battle_restrictions_met",k.FestivalBossBattleRematch="festival_boss_battle_rematch",k.WizardWatch="wizard_watch",k.PostBattle="post-battle",k.Cutscene="cutscene",k.WizardBank="wizard_bank",k.WizardCostumes="wizard_costumes",k.HudWidget="hud_widget"}(G||(G={})),function(k){k.None="",k.CloseButton="close_button",k.CloseClicked="close-clicked",k.ButtonClick="button_click",k.CloseDialog="close_dialog",k.Done="done",k.KeystonePlaced="keystone_placed",k.TeleportButton="x_teleport",k.X="x_button",k.EvolveNow="evolve_now",k.EvolveLater="evolve_later",k.TeacherAttach="player_goals_teacher_attach",k.LoginCredentials="player_goals_hide_credentials",k.Toggle="toggle"}(j||(j={})),function(k){k.Interactable="interactable",k.Snowpile="crystal-caverns-snowpile",k.Crate="crystal-caverns-crate",k.WorldChest="world-chest",k.WorldMemberChest="world-member-chest",k.BattleChest="battle-chest",k.BattleMemberChest="battle-member-chest",k.MonthlyMemberBox="monthly-member-box"}($||($={})),function(k){k.FtueGoals="ftue_goals",k.BattlePass="Treasure Track",k.Festivals="Festivals",k.FestivalsHidden="hidden-festival-data"}(H||(H={})),function(k){k.Ftue="ftue"}(V||(V={})),function(k){k.Purchased="add_pet_slots_header",k.MemberGiftAwarded="membership",k.AwardedFreeWithPet="awarded_pet",k.TreasureTrack="treasure_track",k.PetRoster="pet_roster"}(W||(W={})),function(k){k.Partial="partial",k.Full="full"}(q||(q={})),function(k){k.Manual="manual",k.Automatic="automatic"}(K||(K={})),function(k){k.PetBook="pet_book",k.PostBattleWin="post_battle_win",k.PostBattleLose="post_battle_lose",k.Other="other"}(z||(z={}))},25089:(k,B,U)=>{"use strict";U.d(B,{v:()=>$});var F=U(35120),G=U(29738),j=U(30226);class ${constructor(k,B,U){this._segment=k,this._activePlayer=U,this._uuidProvider=B,this._subjectProvider=F.q.instance.prodigy.gameContainer.get("f1d-f7b1"),this.setup()}setup(){}getCommonEventDataProperties(){var k;const B=F.q.instance.prodigy.world,U=B.getCurrentZone();return{session_uuid:this._uuidProvider.getUUID(),level:this._activePlayer.getLevel(),zone:U,map:B.getCurrentMapTag(),charged_level:this._activePlayer.getChargedLevel(),subject:this._subjectProvider.getSubject().toUpperCase(),difficulty_tier:null===(k=B.getZone(U))||void 0===k?void 0:k.difficultyMode,is_school_hours:j.J.isDateWithinSchoolDayAndHours(),game_locale:G.O.localeCode}}}},99134:(k,B,U)=>{"use strict";U.d(B,{e:()=>Q,v:()=>F});var F,G=U(24522),j=U(35120),$=U(38156),H=U(53037),V=U(21097),W=U(44094),q=U(41674),K=U(25089),z=U(67665);!function(k){k.FestivalStage1="festival_complete_first_stage",k.FestivalStage2="festival_complete_second_stage",k.FestivalStage3="festival_complete_third_stage",k.FestivalStage4="festival_complete_fourth_stage",k.FestivalStage5="festival_complete_fifth_stage",k.FestivalStage6="festival_complete_sixth_stage",k.FestivalStage7="festival_complete_seventh_stage"}(F||(F={}));const Y="unknown";class Q extends K.v{constructor(){super(...arguments),this._currentFestivalTransactionID=new Map}getCurrentFestivalTransactionID(k){var B;return null!==(B=this._currentFestivalTransactionID.get(k))&&void 0!==B?B:W.$.generateUID()}getCurrentFestivalSpinID(){var k;return null!==(k=this._currentFestivalSpinID)&&void 0!==k?k:W.$.generateUID()}getFestivalInstanceName(){return j.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.getFestivalInstanceName()}sendQuestGoalCompleteEvent(k){var B,U,F,G,j,$,V,K,X,Z,J,tt,et,it,st;const nt=W.$.generateUID();this._currentFestivalTransactionID.set(`${k.questID}-${k.taskID}-${H.q.FESTIVAL_CLAIM_STRING}`,nt);const at=0!==k.getTimeUntilUnlock()||0!==k.getTimeUntilExpiry();let rt=null!==(U=null===(B=k.taskDefinition.metadata)||void 0===B?void 0:B.goalSystemOverride)&&void 0!==U?U:q.ss.Festivals,ot=`${k.questID}-${null!==(G=null===(F=k.taskDefinition.metadata)||void 0===F?void 0:F.questGoalType)&&void 0!==G?G:Y}-${k.taskID}${null!==(j=Q.getQuestDatePrecondition(k.taskDefinition))&&void 0!==j?j:""}`,ht=Q.getQuestDescriptionFromDefinition(k.taskDefinition);(null===($=k.taskDefinition.metadata)||void 0===$?void 0:$.isHiddenQuest)&&(rt=null!==(K=null===(V=k.taskDefinition.metadata)||void 0===V?void 0:V.goalSystemOverride)&&void 0!==K?K:q.ss.FestivalsHidden,ot=k.taskID,ht=null!==(Z=null===(X=k.taskDefinition.metadata)||void 0===X?void 0:X.questName)&&void 0!==Z?Z:"unknown");const ct=Object.assign({goal_system:rt,goal_season:k.questID,goal_name:ht,goal_id:ot,is_repeatable:null!==(J=k.taskDefinition.repeatable)&&void 0!==J&&J,difficulty_level:null!==(et=null===(tt=k.taskDefinition.metadata)||void 0===tt?void 0:tt.difficultyLevel)&&void 0!==et?et:"unknown",is_member_locked:null!==(st=null===(it=k.taskDefinition.metadata)||void 0===it?void 0:it.isMemberLocked)&&void 0!==st&&st,is_time_locked:at,is_goal_locked:!!k.getPrerequisites(),transaction_id:nt},this.getCommonEventDataProperties());z.Y.track("Goal Achieved",ct)}sendQuestGoalUpdatedEvent(k,B,U){var F,G,j,$,H,V;const W=Object.assign({goal_system:null!==(G=null===(F=k.taskDefinition.metadata)||void 0===F?void 0:F.goalSystemOverride)&&void 0!==G?G:q.ss.Festivals,goal_season:k.questID,goal_name:Q.getQuestDescriptionFromDefinition(k.taskDefinition),goal_id:`${k.questID}-${null!==($=null===(j=k.taskDefinition.metadata)||void 0===j?void 0:j.questGoalType)&&void 0!==$?$:Y}-${k.taskID}${null!==(H=Q.getQuestDatePrecondition(k.taskDefinition))&&void 0!==H?H:""}`,deadline:U,target_type:k.type,goal_progress:B,goal_current_progress:null===(V=k.taskProgress.data)||void 0===V?void 0:V.progress,goal_target:k.taskDefinition.completionRequirements.data.target},this.getCommonEventDataProperties());z.Y.track("Goal Progress Updated",W)}sendFestivalPrizeWheelSpunEvent(k,B,U,F,G){const j=W.$.generateUID(),$=W.$.generateUID();this._currentFestivalSpinID=$,this._currentFestivalTransactionID.set(`${F}-${B}`,j),this._currentFestivalTransactionID.set($,j);const H=Object.assign({wheel_type:k,wheel_id:B,instance_id:U,instance_type:F,is_respin:G,spin_id:$,transaction_id:j},this.getCommonEventDataProperties());z.Y.track("Festival Prize Wheel Spun",H)}sendFestivalPrizeWheelSpinFailedEvent(k,B,U,F,G){const j=Object.assign({wheel_type:k,wheel_id:B,fail_reason:U,funnel_id:U===V.WE.MemberLocked?this._segment.purchase.getFunnelID():null,instance_id:F,instance_type:G,spin_id:W.$.generateUID(),transaction_id:W.$.generateUID()},this.getCommonEventDataProperties());z.Y.track("Festival Prize Wheel Spin Failed",j)}static getQuestDescriptionFromDefinition(k){var B;return $.n.getQuestDescription(k.completionRequirements.type,null!==(B=k.completionRequirements.data.target)&&void 0!==B?B:0,k.localizationKey)}static getQuestDatePrecondition(k){var B;if(!k.preconditions)return;let U;return null===(B=k.preconditions)||void 0===B||B.forEach((k=>{k.type!==G.n.DATE_AFTER&&k.type!==G.n.DATE_BEFORE||(U=`-[${k.data.date.split("T")[0]}]`)})),U}sendFestivalFunnelAdvancedEvent(k,B){const U=Object.values(F).indexOf(k)+1,G=Object.assign(Object.assign({funnel_name:"Festival Progress",funnel_type:"festival",funnel_id:j.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.getFestivalInstanceName(),step_name:k,step_index:U},B),this.getCommonEventDataProperties());z.Y.track("Funnel Advanced",G)}}},24047:(k,B,U)=>{"use strict";var F,G;U.d(B,{F:()=>F,M:()=>G}),function(k){k.EndGame="end_game",k.ArcadiaLink="arcadia_link",k.Costumes="costumes",k.MagicoinBattleRewardsIntro="battle_magicoin_intro"}(F||(F={})),function(k){k.Chapter="chapter"}(G||(G={}))},87337:(k,B,U)=>{"use strict";var F,G,j,$,H,V;U.d(B,{J$:()=>G,NM:()=>F,ac:()=>$,iQ:()=>j,kN:()=>V,u_:()=>H}),function(k){k.Interactable="interactable-cooldown",k.SpawnPoint="spawn-point-cooldown"}(F||(F={})),function(k){k.Battle="battle"}(G||(G={})),function(k){k.Walk="Walk",k.FastTravel="Fast-Travel",k.Teleported="Teleported",k.FeaturedSpawnFastTravel="featured-spawn-Fast-Travel"}(j||(j={})),function(k){k.Merchant="Merchant",k.QuestGiver="Quest-Giver",k.Warden="Warden",k.Boss="Boss",k.Pet="pet",k.CareGiver="Care-Giver",k.WheelGiver="Wheel-Giver",k.Nicknamer="Nicknamer",k.Guard="Guard",k.Bouncer="Bouncer"}($||($={})),function(k){k.TitanCatapult="Titan Catapult",k.MinecartBridge="Minecart Bridge",k.Teleporter="Teleporter",k.Nicknamer="Nicknamer",k.HealStone="HealStone",k.LeverSwitch="LeverSwitch"}(H||(H={})),function(k){k.MemberLocked="MEMBER_LOCKED",k.LevelLocked="LEVEL_LOCKED",k.QuestNotComplete="QUEST_NOT_COMPLETE",k.AnswerWrong="ANSWER_WRONG"}(V||(V={}))},215:(k,B,U)=>{"use strict";U.d(B,{Eu:()=>F,S4:()=>G,nu:()=>Q});var F,G,j=U(62459),$=U(90633),H=U(35120),V=U(77938),W=U(22023),q=U(44094),K=U(41674),z=U(25089),Y=U(67665);!function(k){k.PetMergeYourTeam="pet_merge_your_team",k.PetMergeSelectPet="pet_merge_select_pet",k.PetMergeSelectMerge="pet_merge_select_merge_option",k.PetMergeFinalizeMerge="pet_merge_select_finalize_merge",k.PetMergeConfirm="pet_merge_confirmation_popup",k.PetMergeCompleted="pet_merge_completed",k.PetMergeMagicoin="pet_merge_with_magicoin"}(F||(F={})),function(k){k.TutorialUnlocked="unlock_pet_merge",k.TutorialViewed="pet_merge_tutorial_viewed",k.TutorialTriggered="pet_merge_tutorial_triggered",k.HudSelect="pet_merge_tutorial_pet_palm",k.SelectPet="pet_merge_tutorial_pick_a_pet",k.YourPetMergeButton="pet_merge_tutorial_select_merge_option",k.SelectMergeNow="pet_merge_tutorial_select_merge_now",k.TutorialComplete="pet_merge_tutorial_complete"}(G||(G={}));class Q extends z.v{constructor(){super(...arguments),this._tutorialStepIndexCache=[],this.mergeSource=K.k.Other}get petMergeId(){return this._petMergeId}get petMergeTransactionId(){return this._petMergeTransactionId}sendPetMergedEvent(k,B){var U;const F=null===(U=V.t.getItem("pet",k.ID))||void 0===U?void 0:U.data,G=W.P8.getPetDisplayMergeRank(k.ID,k.uniqueID);F?Y.Y.track("Pet Merged",Object.assign({ingredient_name:F.name,ingredient_id:k.ID,ingredient_type:F.type,ingredient_element:F.affinity,ingredient_level:k.level,previous_pet_rank:null!=B?B:G,merged_pet_rank:j.Aq$.isDefined(B)?G:void 0,is_target_pet:j.Aq$.isDefined(B),ingredient_bypass:0,merge_id:this._petMergeId,transaction_id:this._petMergeTransactionId,merge_source:this.mergeSource},this.getCommonEventDataProperties())):j.VyI.log(`Pet item data not found for pet ID ${k.ID}`,j.$bb.Warning)}sendPetsMergedEvents(k){if(k.ingredients){this._petMergeId=q.$.generateUID(),this._petMergeTransactionId=q.$.generateUID(),this.sendPetMergedEvent(k.basePetData,k.previousRank);for(const B of k.ingredients)this.sendPetMergedEvent(B);this.mergeSource=K.k.Other}}sendPetMergedUpsellEvents(k){var B;this._petMergeId=q.$.generateUID(),this._petMergeTransactionId=q.$.generateUID();const U=null===(B=V.t.getItem("pet",k.basePetData.ID))||void 0===B?void 0:B.data;U?(this.sendPetMergedEvent(k.basePetData,k.previousRank),Y.Y.track("Pet Merged",Object.assign({ingredient_name:U.name,ingredient_type:U.type,ingredient_element:U.affinity,ingredient_level:k.basePetData.level,previous_pet_rank:k.previousRank,is_target_pet:!1,ingredient_bypass:k.ingredientBypass,merge_id:this._petMergeId,transaction_id:this._petMergeTransactionId,merge_source:this.mergeSource},this.getCommonEventDataProperties())),this.mergeSource=K.k.Other):j.VyI.log(`Pet item data not found for pet ID ${k.basePetData.ID}`,j.$bb.Warning)}sendPetMergedMagicoinEvents(k){var B;this._petMergeId=q.$.generateUID(),this._petMergeTransactionId=q.$.generateUID();const U=null===(B=V.t.getItem("pet",k.basePetData.ID))||void 0===B?void 0:B.data;if(U){if(this.sendPetMergedEvent(k.basePetData,k.previousRank),Y.Y.track("Pet Merged",Object.assign({ingredient_name:U.name,ingredient_id:k.basePetData.ID,ingredient_type:U.type,ingredient_element:U.affinity,ingredient_level:k.basePetData.level,previous_pet_rank:k.previousRank,is_target_pet:!1,ingredient_bypass:k.ingredientBypass,merge_id:this._petMergeId,transaction_id:this._petMergeTransactionId,merge_source:this.mergeSource},this.getCommonEventDataProperties())),k.ingredients&&k.ingredients.length>0)for(const B of k.ingredients)this.sendPetMergedEvent(B);this.mergeSource=K.k.Other}else j.VyI.log(`Pet item data not found for pet ID ${k.basePetData.ID}`,j.$bb.Warning)}sendPetMergeFunnelAdvancedEvent(k,B){const U=!H.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete($.B.FEATURE_PET_MERGE,$.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED)&&H.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete($.B.FEATURE_PET_MERGE,$.B.BREADCRUMB_PET_MERGE_FTUE_STARTED);if(!W.P8.canPlayerAccessPetMergeFeature()||U)return;const G=null!=B?B:Object.values(F).indexOf(k)+1;G<1||Y.Y.track("Funnel Advanced",Object.assign({funnel_name:"pet_merge",funnel_type:"feature",step_name:k,step_index:G},this.getCommonEventDataProperties()))}sendPetMergeTutorialFunnelAdvancedEvent(k){const B=Object.values(G).indexOf(k)+1,U=this._tutorialStepIndexCache.includes(B);B<1||U||(this._tutorialStepIndexCache.push(B),Y.Y.track("Funnel Advanced",Object.assign({funnel_name:"pet_merge_tutorial",funnel_type:"tutorial",step_name:k,step_index:B},this.getCommonEventDataProperties())))}sendPetMergeCancelledEvent(k,B,U){var F;const G=null===(F=V.t.getItem("pet",k.ID))||void 0===F?void 0:F.data,$=W.P8.getPetDisplayMergeRank(k.ID,k.uniqueID);G?(Y.Y.track("Pet Merged Cancelled",Object.assign({ingredient_name:G.name,ingredient_id:k.ID,ingredient_type:G.type,ingredient_level:k.level,pet_rank:$,ingredient_required:B,game_phase:U?"tutorial":"game",merge_id:this._petMergeId,transaction_id:this._petMergeTransactionId,merge_source:this.mergeSource},this.getCommonEventDataProperties())),this.mergeSource=K.k.Other):j.VyI.log(`Pet item data not found for pet ID ${k.ID}`,j.$bb.Warning)}}},44356:(k,B,U)=>{"use strict";var F;U.d(B,{H:()=>F}),function(k){k.Dance="Dance",k.Emote="Emote"}(F||(F={}))},19464:(k,B,U)=>{"use strict";var F,G,j,$,H,V;U.d(B,{W5:()=>j,Yj:()=>F,lT:()=>$,s2:()=>H,ss:()=>V}),function(k){k.Exit="exit",k.Restart="Restart",k.Success="Success",k.Fail="Fail",k.Abandon="Abandon"}(F||(F={})),function(k){k.Easy="Easy",k.Hard="Hard",k.None="None"}(G||(G={})),function(k){k.New="New",k.Continue="Continue",k.Restart="Restart",k.Spawn="Spawn"}(j||(j={})),function(k){k.Healstone="Healstone",k.Bridge="Bridge",k.Boss="Boss",k.Complete="Complete"}($||($={})),function(k){k.DarkTower="Dark Tower",k.EarthTower="Earth Tower",k.IceTower="Ice Tower"}(H||(H={})),function(k){k.Normal="Normal",k.Random="Random"}(V||(V={}))},47632:(k,B,U)=>{"use strict";U.d(B,{s:()=>$,w:()=>F});var F,G=U(25089),j=U(67665);!function(k){k.Adults="adults"}(F||(F={}));class $ extends G.v{sendQrCodeViewedEvent(k,B,U=null,F=null){const G=Object.assign(Object.assign(Object.assign({name:k,type:B,parameters:U},this._segment.gameWorld.getCurrentInstanceTypeAndID()),F),this.getCommonEventDataProperties());j.Y.track("QR Code Viewed",G)}}},74958:(k,B,U)=>{"use strict";U.d(B,{Aj:()=>nt,fk:()=>F,zE:()=>st});var F,G=U(8674),j=U(62459),$=U(24652),H=U(42448),V=U(90633),W=U(35120),q=U(68836),K=U(14117),z=U(22023),Y=U(44094),Q=U(13956),X=U(23283),Z=U(46784),J=U(65050),tt=U(41674),et=U(25089),it=U(67665);!function(k){k.RiftsReceiveFirstRiftKey="rifts_receive_first_rift_key",k.RiftsOpenRiftSelectionMenu="rifts_open_rift_selection_menu",k.RiftsStartFirstRiftRun="rifts_start_first_rift_run",k.RiftsCompleteFirstRiftRunRound="rifts_complete_first_rift_run_round",k.RiftsCompleteRiftRunWinOrLose="rifts_complete_rift_run_win_or_lose",k.RiftsCompleteRiftRunWin="rifts_complete_rift_run_win",k.RiftsStartBossRift="rifts_start_boss_rift",k.RiftsCompleteBossRift="rifts_complete_boss_rift"}(F||(F={}));const st={[H.ni.Portal1]:Z.B.RiftsPortal1Menu,[H.ni.Portal2]:Z.B.RiftsPortal2Menu,[H.ni.Portal3]:Z.B.RiftsPortal3Menu};class nt extends et.v{constructor(k,B,U){super(k,B,U),this._riftsInstanceToRewardSpinUuidMap={},this._riftsInstanceToRewardSpinTransactionUuidMap={},this._riftsDataProvider=W.q.instance.prodigy.gameContainer.get("196-d3a5")}get riftInstanceUuid(){return j.Aq$.isDefined(this._riftInstanceUuid)||(this._riftInstanceUuid=Y.$.generateUID()),this._riftInstanceUuid}set riftInstanceUuid(k){this._riftInstanceUuid=k}get riftRunUuid(){var k;return null!==(k=this._riftRunUuid)&&void 0!==k?k:"Failed to retrieve the rift run UUID for the ongoing run"}set riftRunUuid(k){this._riftRunUuid=k}get riftRunRoundUuid(){var k;return null!==(k=this._riftRunRoundUuid)&&void 0!==k?k:"Failed to retrieve the rift run round UUID for the ongoing run"}set riftRunRoundUuid(k){this._riftRunRoundUuid=k}getRiftsRewardSpinUuid(){if(!this._riftInstanceUuid)return;let k=this._riftsInstanceToRewardSpinUuidMap[this._riftInstanceUuid];return k||(k=Y.$.generateUID(),this._riftsInstanceToRewardSpinUuidMap[this._riftInstanceUuid]=k),k}getRiftsRewardSpinTransactionUuid(){if(!this._riftInstanceUuid)return;let k=this._riftsInstanceToRewardSpinTransactionUuidMap[this._riftInstanceUuid];return k||(k=Y.$.generateUID(),this._riftsInstanceToRewardSpinTransactionUuidMap[this._riftInstanceUuid]=k),k}sendRiftsSelectionMenuOpenedEvent(){var k;const B=this._riftsSyncedDataStore.getRiftsEntityPortalEntryData();it.Y.track("Rift Selection Menu Opened",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(k=this._riftsDataProvider.getRiftsPortalConfig())||void 0===k?void 0:k.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE,max_rift_tier_unlocked:B.metaProgress.maxRiftTier,max_tier_completions:B.metaProgress.riftTierUnlockData.maxTierCompletions,boss_defeats:B.metaProgress.bossDefeats},this.getCommonEventDataProperties()))}generateRiftRunUuids(){this._riftRunUuid=Y.$.generateUID(),this.riftRunRoundUuid=Y.$.generateUID()}sendRiftRunStartedEvent(k,B,U,F){var G;it.Y.track("Rift Run Started",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(G=this._riftsDataProvider.getRiftsPortalConfig())||void 0===G?void 0:G.tierDataGlobalEntityId,rift_run_id:this._riftRunUuid,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE,rift_tier:k,number_of_rounds:H.vP,cost:B,is_magicoin_boosted:U,transaction_id:F},this.getCommonEventDataProperties()))}sendRiftRunOpponentSelectionMenuOpenedEvent(){var k;const B=this._riftsSyncedDataStore.cache.currentRiftRunProgress;B&&B.type===$.cn.Normal?it.Y.track("Rift Run Opponent Selection Menu Opened",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(k=this._riftsDataProvider.getRiftsPortalConfig())||void 0===k?void 0:k.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE,rift_tier:null==B?void 0:B.currentRiftTier,round_id:this.riftRunRoundUuid,round_number:null==B?void 0:B.round,number_of_rounds:H.vP,pets_used_in_previous_rounds:null==B?void 0:B.usedPetUids.map((k=>nt.getPetDataFromUniqueId(k))),buff_modifier:null==B?void 0:B.buffModifier,previous_rounds_nerf_modifiers:null==B?void 0:B.chosenNerfModifiers,next_opponent_team_options:null==B?void 0:B.nextOpponentTeamOptions},this.getCommonEventDataProperties())):j.VyI.log(`RiftsSegment: Not firing sendRiftRunOpponentSelectionMenuOpenedEvent due to missing rift run progress or the rift type not being ${$.cn.Normal}`,j.$bb.Warning)}sendRiftRunRoundStartedEvent(){var k,B;this.cachedCurrentNormalRiftProgress?it.Y.track("Rift Run Round Started",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(k=this._riftsDataProvider.getRiftsPortalConfig())||void 0===k?void 0:k.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE,rift_tier:this.cachedCurrentNormalRiftProgress.currentRiftTier,round_id:this.riftRunRoundUuid,round_number:this.cachedCurrentNormalRiftProgress.round,number_of_rounds:H.vP,pets_used_in_previous_rounds:this.cachedCurrentNormalRiftProgress.usedPetUids.filter((k=>{var B;return!(null===(B=q.T.chosenHomeTeamPetUids)||void 0===B?void 0:B.includes(k))})).map((k=>nt.getPetDataFromUniqueId(k))),buff_modifier:this.cachedCurrentNormalRiftProgress.buffModifier,nerf_modifiers:this.cachedCurrentNormalRiftProgress.chosenNerfModifiers,chosen_opponent_team_option:null===(B=this.cachedCurrentNormalRiftProgress.nextOpponentTeamOptions)||void 0===B?void 0:B[q.T.chosenOpponentTeamIndex]},this.getCommonEventDataProperties())):j.VyI.log("RiftsSegment: Not firing sendRiftRunRoundStartedEvent due to missing cached current rift run progress",j.$bb.Warning)}sendRiftRunRoundCompletedEvent(k){var B,U;this.cachedCurrentNormalRiftProgress?it.Y.track("Rift Run Round Completed",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(B=this._riftsDataProvider.getRiftsPortalConfig())||void 0===B?void 0:B.tierDataGlobalEntityId,rift_run_id:this._riftRunUuid,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE,rift_tier:this.cachedCurrentNormalRiftProgress.currentRiftTier,round_id:this.riftRunRoundUuid,round_number:this.cachedCurrentNormalRiftProgress.round,number_of_rounds:H.vP,pets_used:this.cachedCurrentNormalRiftProgress.usedPetUids.map((k=>nt.getPetDataFromUniqueId(k))),buff_modifier:this.cachedCurrentNormalRiftProgress.buffModifier,nerf_modifiers:this.cachedCurrentNormalRiftProgress.chosenNerfModifiers,chosen_opponent_team_option:null===(U=this.cachedCurrentNormalRiftProgress.nextOpponentTeamOptions)||void 0===U?void 0:U[q.T.chosenOpponentTeamIndex],outcome:k},this.getCommonEventDataProperties())):j.VyI.log("RiftsSegment: Not firing sendRiftRunRoundCompletedEvent due to missing cached current rift run progress",j.$bb.Warning)}sendRiftRunCompletedEvent(){var k;this.cachedCurrentNormalRiftProgress?it.Y.track("Rift Run Completed",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(k=this._riftsDataProvider.getRiftsPortalConfig())||void 0===k?void 0:k.tierDataGlobalEntityId,rift_run_id:this._riftRunUuid,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE,rift_tier:this.cachedCurrentNormalRiftProgress.currentRiftTier,number_of_rounds:H.vP,pets_used:this.cachedCurrentNormalRiftProgress.usedPetUids.map((k=>nt.getPetDataFromUniqueId(k))),buff_modifier:this.cachedCurrentNormalRiftProgress.buffModifier,nerf_modifiers:this.cachedCurrentNormalRiftProgress.chosenNerfModifiers},this.getCommonEventDataProperties())):j.VyI.log("RiftsSegment: Not firing sendRiftRunCompletedEvent due to missing cached current rift run progress",j.$bb.Warning)}sendBossRiftStartedEvent(){var k;const B=this._riftsSyncedDataStore.cache.currentRiftRunProgress;B&&B.type===$.cn.Boss?it.Y.track("Boss Rift Started",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(k=this._riftsDataProvider.getRiftsPortalConfig())||void 0===k?void 0:k.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE,boss_type:B.bossType,rift_tier:B.currentRiftTier},this.getCommonEventDataProperties())):j.VyI.log(`RiftsSegment: Not firing sendBossRiftStartedEvent due to missing rift run progress or the rift type not being ${$.cn.Boss}`,j.$bb.Warning)}sendBossRiftCompletedEvent(k){var B,U;this.cachedCurrentBossRiftProgress?it.Y.track("Boss Rift Completed",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(B=this._riftsDataProvider.getRiftsPortalConfig())||void 0===B?void 0:B.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE,boss_type:this.cachedCurrentBossRiftProgress.bossType,rift_tier:this.cachedCurrentBossRiftProgress.currentRiftTier,pets_used:null===(U=q.T.chosenHomeTeamPetUids)||void 0===U?void 0:U.map((k=>nt.getPetDataFromUniqueId(k))),nerf_modifiers:this.cachedCurrentBossRiftProgress.bossRiftModifiers,outcome:k},this.getCommonEventDataProperties())):j.VyI.log("RiftsSegment: Not firing sendBossRiftCompletedEvent due to missing cached current boss rift progress",j.$bb.Warning)}sendRiftsFunnelAdvancedEvent(k){const B=Object.values(F).indexOf(k)+1;it.Y.track("Funnel Advanced",Object.assign({funnel_id:this._riftsDataProvider.getCurrentRiftsId(),funnel_name:"rifts",funnel_type:"feature",step_name:k,step_index:B},this.getCommonEventDataProperties()))}sendRiftsPrizeWheelSpunEvent(k,B=!1){var U;it.Y.track("Prize Wheel Spun",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(U=this._riftsDataProvider.getRiftsPortalConfig())||void 0===U?void 0:U.tierDataGlobalEntityId,wheel_type:X.U.LuckyLoot,instance_type:k,instance_id:this.riftInstanceUuid,spin_id:this.getRiftsRewardSpinUuid(),transaction_id:this.getRiftsRewardSpinTransactionUuid(),is_respin:B},this.getCommonEventDataProperties()))}sendRiftsPrizeWheelSpinFailedEvent(k,B){var U;it.Y.track("Prize Wheel Spin Failed",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(U=this._riftsDataProvider.getRiftsPortalConfig())||void 0===U?void 0:U.tierDataGlobalEntityId,wheel_type:X.U.LuckyLoot,instance_type:k,instance_id:this.riftInstanceUuid,fail_reason:B},this.getCommonEventDataProperties()))}getRiftTransactionData(){return Object.assign({transaction_id:Y.$.generateUID(),sink_type:nt.RIFT_INSTANCE_TYPE,sink_id:J.N.RiftRun},this._segment.gameWorld.getCurrentInstanceTypeAndID(J.N.Interface))}static sendFunnelAdvancedEventIfBreadcrumbNotComplete(k,B){W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_RIFTS,B)||(W.q.instance.prodigy.gameContainer.get("c47-20b6").rifts.sendRiftsFunnelAdvancedEvent(k),W.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(V.B.FEATURE_RIFTS,B))}static getPetDataFromUniqueId(k){var B,U;return{assetId:null!==(B=z.P8.getAssetIdFromUniqueId(k))&&void 0!==B?B:`Failed to retrieve pet asset ID from unique ID: ${k}`,uniqueId:k,level:null!==(U=z.P8.getLevelFromUniqueId(k))&&void 0!==U?U:`Failed to retrieve pet level from unique ID: ${k}`}}sendOpenPetReuseInterface(){it.Y.track("Interface Opened",Object.assign({interface_name:"rift_pet_cooldown_bypass",interface_type:"menu",origin_type:tt.$N.ButtonClick,instance_type:nt.RIFT_INSTANCE_TYPE,instance_id:this.riftInstanceUuid},this.getCommonEventDataProperties()))}sendPetCooldownStarted(k,B,U){var F;it.Y.track("Cooldown Timer Started",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(F=this._riftsDataProvider.getRiftsPortalConfig())||void 0===F?void 0:F.tierDataGlobalEntityId,cooldown_type:"rifts-pet-cooldown",cooldown_id:B,cooldown_target_type:"pets",cooldown_target_id:k,cooldown_length:U,cooldown_trigger_type:"rift-run",cooldown_trigger_id:this.riftRunUuid,instance_type:nt.RIFT_INSTANCE_TYPE,instance_id:this.riftInstanceUuid},this.getCommonEventDataProperties()))}sendPetCooldownStartedEvents(k){var B,U,F;const G=null===(U=null===(B=W.q.instance.prodigy.gameContainer.get("196-d3a5").getRiftsPortalConfig())||void 0===B?void 0:B.options)||void 0===U?void 0:U.petReuseData,j=Object.keys(k).sort(((B,U)=>k[U].timestamp-k[B].timestamp)),$=null!==(F=null==G?void 0:G.petCooldownMs)&&void 0!==F?F:0;j.slice(0,2).forEach((B=>{var U;this._segment.rifts.sendPetCooldownStarted(B,null!==(U=k[B].cooldownID)&&void 0!==U?U:"",$/1e3)}))}sendCooldownTimeSkipped(k,B,U,F,G,j){var $;it.Y.track("Cooldown Timer Bypassed",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===($=this._riftsDataProvider.getRiftsPortalConfig())||void 0===$?void 0:$.tierDataGlobalEntityId,cooldown_type:"rifts-pet-cooldown",cooldown_id:k,cooldown_target_type:"pets",cooldown_target_id:B,cooldown_length:U,time_remaining:F,currency:"magicoin",price:G,transaction_id:j,cooldown_trigger_type:"rift-run",sink_type:nt.RIFT_INSTANCE_TYPE,sink_id:this.riftRunUuid,instance_type:nt.RIFT_INSTANCE_TYPE,instance_id:this.riftInstanceUuid},this.getCommonEventDataProperties()))}sendCooldownTimerEnded(k,B,U){var F;it.Y.track("Cooldown Timer Ended",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(F=this._riftsDataProvider.getRiftsPortalConfig())||void 0===F?void 0:F.tierDataGlobalEntityId,cooldown_type:"rifts-pet-cooldown",cooldown_id:k,cooldown_target_type:"pets",cooldown_target_id:B,cooldown_length:U,cooldown_trigger_type:"rift-run",cooldown_trigger_id:this.riftRunUuid,instance_type:nt.RIFT_INSTANCE_TYPE,instance_id:this.riftInstanceUuid},this.getCommonEventDataProperties()))}sendRiftRunBonusOffered(k){var B;this._modifierofferId=Y.$.generateUID(),it.Y.track("Rift Run Bonus Offered",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(B=this._riftsDataProvider.getRiftsPortalConfig())||void 0===B?void 0:B.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE,offer_id:this._modifierofferId,modifier:{name:k.caption,description:k.description}},this.getCommonEventDataProperties()))}sendRiftRunBonusRerolled(k,B,U,F,G){var j;const $=this._modifierofferId;this._modifierofferId=G,it.Y.track("Rift Run Bonus Rerolled",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(j=this._riftsDataProvider.getRiftsPortalConfig())||void 0===j?void 0:j.tierDataGlobalEntityId,modifier:{name:k.caption,description:k.description},offer_id:this._modifierofferId,previous_modifier:{name:B.caption,description:B.description},previous_offer_id:$,currency:"magicoin",price:U,transaction_id:F,instance_type:nt.RIFT_INSTANCE_TYPE,instance_id:this.riftInstanceUuid},this.getCommonEventDataProperties()))}createRiftRunEncounterEventParams(k,B){return(0,G.sH)(this,arguments,void 0,(function*(k,B,U={}){var F,G;const j=Object.assign(Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(F=this._riftsDataProvider.getRiftsPortalConfig())||void 0===F?void 0:F.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE},this.getCommonEventDataProperties()),U);let $=100;const H=W.q.instance.prodigy.gameContainer.get("196-d3a5"),V=null===(G=null==H?void 0:H.riftsTierTotalData)||void 0===G?void 0:G[B],q=null==V?void 0:V.opponentLevelCap;if(q){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getLevel();$=k?Math.min(k,q):q}return j.encounters=k.map(((k,B)=>({position:B+1,enemies:k.petIds.map((k=>({petId:k,level:$}))),modifier:{name:k.nerfModifier.caption,description:k.nerfModifier.description,bonus:k.nerfModifier.goldReward},member_locked:2===B}))),j}))}sendRiftRunEncounterOffered(k,B){this._encounterOfferId=Y.$.generateUID(),this.createRiftRunEncounterEventParams(k,B,{offer_id:this._encounterOfferId}).then((k=>it.Y.track("Rift Run Encounters Offered",k))).catch(j.RQr.createHandler("RiftsSegment: Failed to create rift run encounter event params"))}sendRiftRunEncounterRerolled(k,B,U,F,G){const $=this._encounterOfferId;this._encounterOfferId=G,this.createRiftRunEncounterEventParams(k,B,{offer_id:this._encounterOfferId,previous_offer_id:$,price:U,currency:"magicoin",transaction_id:F}).then((k=>it.Y.track("Rift Run Encounters Rerolled",k))).catch(j.RQr.createHandler("RiftsSegment: Failed to create rift run encounter event params"))}}nt.RIFT_INSTANCE_TYPE="rifts",nt.RIFT_BONUS_REROLL_TYPE="bonus-reroll",nt.RIFT_ENCOUNTER_REROLL_TYPE="encounter-reroll",(0,G.Cg)([(0,Q.b)("9ac-9677"),(0,G.Sn)("design:type",K.M)],nt.prototype,"_riftsSyncedDataStore",void 0)},67665:(k,B,U)=>{"use strict";U.d(B,{r:()=>ke,Y:()=>Be});var F=U(8674),G=U(62459),j=U(88225),$=U(79687),H=U(95891),V=U.n(H),W=U(44751),q=U(88059),K=U(75172),z=U(32389),Y=U(35120),Q=U(34829),X=U(1195),Z=U(65240),J=U(46784),tt=U(65050),et=U(41674),it=U(25089),st=U(95057),nt=U(44094);class at extends it.v{get chestTransactionId(){return this._chestTransactionId}get memberChestTransactionId(){return this._memberChestTransactionId}get currentPbfId(){return this._currentPbfId}get itemTransaction(){return this._itemTransaction}init(){var k;this._currentPbfId=nt.$.generateUID(),null!==(k=this._itemTransaction)&&void 0!==k||(this._itemTransaction=this._segment.item.beginSecureItemTransaction()),this._chestTransactionId=nt.$.generateUID(),this._memberChestTransactionId=nt.$.generateUID(),G.VyI.log(`PBF InstanceId: ${this._currentPbfId}\nBattle Id: ${this.getBattleId()}\nChest Transaction Id: ${this._chestTransactionId}\nMember Chest Transaction Id: ${this._memberChestTransactionId}`,G.$bb.Verbose)}getBattleId(){const k=this._segment.battleRevamp.getCurrentBattleID();return k||this._segment.battle.currentBattleID}getItemReceivedMetadata(){const k=Y.q.instance.prodigy.gameContainer.get("cfe-9c2c");let B=this._chestTransactionId,U=Z.C.BattleChest,F=this.getBattleId(),G=tt.N.UI,j=this._currentPbfId;if(this._activePlayer.isMember()&&(B=this._memberChestTransactionId,F=`${this.getBattleId()}-M`),k.matchController){const k=this._segment.lootDash.getInstanceData();U=Z.C.WizardDashLootBag,G=k.instanceType,j=k.instanceId}return{transaction_id:B,source_type:U,source_id:F,instance_id:j,instance_type:G}}flushSecureRewards(){this._itemTransaction.flush(this.getItemReceivedMetadata()),this._itemTransaction=null}sendPostBattleFlowOpensEvent(){this._timeSincePBFStart=Date.now();const k={event:"Interface Opened",interface_name:J.B.PostBattleFlow,interface_type:et.Wm.Screen,origin_type:et.$N.Battle,origin_id:this.getBattleId(),instance_id:this._currentPbfId,instance_type:tt.N.UI};window.analytics.track("Interface Opened",k)}sendButtonEvent(k,B){this._segment.featureCommon.sendButtonEvent({buttonName:B,interfaceName:k,interfaceType:et.Wm.ScreenBanner},{interface_name:k,instance_type:tt.N.UI,instance_id:this._currentPbfId})}sendPBFClosedEvent(){const k=Date.now()-this._timeSincePBFStart,B={event:"Interface Closed",interface_name:"post_battle",interface_type:"screen",instance_id:this._currentPbfId,instance_type:"ui",duration:k,close_method:"button_click"};window.analytics.track("Interface Closed",B)}sendChestOpenEvent(k){const B=Object.assign({container_type:k?et.ZF.BattleMemberChest:et.ZF.BattleChest,container_id:k?`${this.getBattleId()}-M`:this.getBattleId(),instance_id:this._currentPbfId,instance_type:tt.N.UI,transaction_id:k?this._memberChestTransactionId:this._chestTransactionId},this.getCommonEventDataProperties());window.analytics.track("Container Opened",B)}sendChestFailedToOpenEvent(k,B){k&&this._segment.purchase.sendFunnelStart({type:"Open-Member-Chest-Battle",category:"Reward",contentId:this.getBattleId(),adType:st.R.PostBattleBanner});const U=Object.assign({container_type:k?et.ZF.BattleMemberChest:et.ZF.BattleChest,container_id:k?`${this.getBattleId()}-M`:this.getBattleId(),instance_id:this._currentPbfId,instance_type:tt.N.UI,fail_reason:B,funnel_id:this._segment.purchase.getFunnelID()},this.getCommonEventDataProperties());window.analytics.track("Container Opened Failed",U)}}var rt=U(20952),ot=U(76277),ht=U(90633),ct=U(25531),dt=U(73797),lt=U(68152),ut=U(85126),ft=U(35569);class bt extends it.v{constructor(k,B,U){super(k,B,U),this._funnelNamesAndStepIDs=[],Y.q.instance.game.broadcaster.addAppListener(dt.bv.AnalyticsInitialized,this.onAnalyticsInitialized,this),this._activePlayer.player.backpack.onKeyAddedToBackpack.add((k=>{var B;const U=null===(B=ut.N.getAllTowerData().find((B=>B.keystone.itemID===k)))||void 0===B?void 0:B.element;G.Aq$.isDefined(U)&&(Y.q.instance.prodigy.breadcrumbManager.resetBreadcrumb(ht.B.FEATURE_ACADEMY_TOWERS,ht.B.BREADCRUMB_ACADEMY_VISITED_AFTER_RECIEVING_KEYSTONE),Y.q.instance.prodigy.breadcrumbManager.resetBreadcrumb(ht.B.FEATURE_ACADEMY_TOWERS,ht.B.BREADCRUMB_ACADEMY_PEDESTAL_ROOM_VISITED_AFTER_RECIEVING_KEYSTONE),Y.q.instance.prodigy.gameContainer.get("c47-20b6").academyTowers.sendFunnelEvent({funnelName:ct.w.format("{0}_tower",U),funnelType:"feature",step:ft.D.ElementGem},U))}))}onAnalyticsInitialized(){this.loadAcademyTowersFunnelData()}sendFunnelEvent(k,...B){var U,F;if(window.analytics){const j=Object.values(ft.D).indexOf(k.step),$=null===(U=this._funnelNamesAndStepIDs.find((B=>B.funnelName===k.funnelName)))||void 0===U?void 0:U.stepOrdinalValue;if(!G.Aq$.isDefined($)||j>$){let U=null===(F=this._funnelNamesAndStepIDs.find((B=>B.funnelName===k.funnelName)))||void 0===F?void 0:F.stepIndex;G.Aq$.isDefined(U)?U++:U=1;let $=k.step;B.length>0&&($=ct.w.format($,...B));const H=Object.assign({funnel_name:k.funnelName,funnel_type:k.funnelType,step_index:U,step_name:$},this.getCommonEventDataProperties());Be.track("Funnel Advanced",H),this.saveAcademyTowersFunnelData(k.funnelName,U,j)}}}saveAcademyTowersFunnelData(k,B,U){var F,G;(0,lt.v)(!!this._funnelNamesAndStepIDs,"Segment academy towers funnel is undefined");const j=this._activePlayer.player,$=this._funnelNamesAndStepIDs.findIndex((B=>B.funnelName===k));if(null!==(F=(G=j.data).academyTowersFunnelsData)&&void 0!==F||(G.academyTowersFunnelsData=[]),$<0){const F={funnelName:k,stepIndex:B,stepOrdinalValue:U};this._funnelNamesAndStepIDs.push(F),j.data.academyTowersFunnelsData.push(F)}else this._funnelNamesAndStepIDs[$].stepIndex=B,j.data.academyTowersFunnelsData[$].stepIndex=B,this._funnelNamesAndStepIDs[$].stepOrdinalValue=U,j.data.academyTowersFunnelsData[$].stepOrdinalValue=U;j.forceSaveCharacter(),j.saveEnabled=!1}loadAcademyTowersFunnelData(){const k=this._activePlayer.player.data.academyTowersFunnelsData;k&&k.length>0?k.forEach((k=>{this._funnelNamesAndStepIDs.push(k)})):this._activePlayer.player.data.academyTowersFunnelsData=[]}}var pt=U(38156);class vt extends it.v{get rewardClaimedTransactionId(){return this._rewardClaimedTransactionId}get goalCompleteTransactionId(){return this._goalCompleteTransactionId}generateRewardClaimedTransactionId(){this._rewardClaimedTransactionId=nt.$.generateUID()}sendQuestGoalCompleteEvent(k){var B;this._goalCompleteTransactionId=nt.$.generateUID(),Be.track("Goal Achieved",{goal_system:et.ss.BattlePass,goal_name:pt.n.getQuestDescriptionFromDefinition(k.taskDefinition),goal_id:this.segmentGoalIdFor(k),is_repeatable:null!==(B=k.taskDefinition.repeatable)&&void 0!==B&&B,transaction_id:this._goalCompleteTransactionId})}sendQuestGoalUpdatedEvent(k,B,U){var F;Be.track("Goal Progress Updated",{goal_system:et.ss.BattlePass,goal_name:pt.n.getQuestDescriptionFromDefinition(k.taskDefinition),goal_id:this.segmentGoalIdFor(k),deadline:U,target_type:k.type,goal_progress:B,goal_current_progress:null===(F=k.taskProgress.data)||void 0===F?void 0:F.progress,goal_target:k.taskDefinition.completionRequirements.data.target})}segmentGoalIdFor(k){return`${k.questID}-${k.taskID}`}}var gt=U(98193);class mt extends it.v{get currentBattleID(){return this._currentBattleID}sendBattleStartEvent(k,B,U=null){this._currentBattleID=nt.$.generateUID(),this._battleStartTimeMS=Date.now();const F=Object.assign(Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID,energy:this._activePlayer.player.getEnergy(),pvp:!1,boss:!0,coop:!0},this._segment.gameWorld.getCurrentInstanceTypeAndID()),B),U),this.getCommonEventDataProperties());Be.track("Battle Started",F)}sendBattleCompleteEvent(k,B=null){if(!this._currentBattleID)return void G.VyI.log("An error occurred while sending battle complete segment event: Complete Event cannot be sent before Start Event.",G.$bb.Error);const U=Object.assign(Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID,energy:this._activePlayer.player.getEnergy(),duration:(Date.now()-this._battleStartTimeMS)/Q.s.SECONDS_TO_MILLISECONDS_MULTIPLIER},this._segment.gameWorld.getCurrentInstanceTypeAndID()),k),B),this.getCommonEventDataProperties());Be.track("Battle Completed",U)}sendBattleParticipantsEvent(k,B=null){if(!this._currentBattleID)return void G.VyI.log("An error occurred while sending battle participants segment event: Participants Event cannot be sent before Start Event.",G.$bb.Error);const U=Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID},k),B),this.getCommonEventDataProperties());Be.track("Battle Participants",U)}sendBattleParticipantsOutcomesEvent(k,B=null){if(!this._currentBattleID)return void G.VyI.log("An error occurred while sending battle participant outcomes segment event: Participant Outcomes Event cannot be sent before Start Event.",G.$bb.Error);const U=Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID},k),B),this.getCommonEventDataProperties());Be.track("Battle Participant Outcomes",U)}sendBattlePositionChangedEvent(k,B=null){if(!this._currentBattleID)return void G.VyI.log("An error occurred while sending position changed segment event: Postion Changed Event cannot be sent before Start Event.",G.$bb.Error);const U=Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID},k),B),this.getCommonEventDataProperties());Be.track("Battle Position Changed",U)}sendBattleItemUsedEvent(k,B=null){if(!this._currentBattleID)return void G.VyI.log("An error occurred while sending item used segment event: Item Used Event cannot be sent before Start Event.",G.$bb.Error);const U=Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID},k),B),this.getCommonEventDataProperties());Be.track("Battle Item Used",U)}sendBattlePetCapturedEvent(k,B=null){if(!this._currentBattleID)return void G.VyI.log("An error occurred while sending pet captured segment event: Pet Captured Event cannot be sent before Start Event.",G.$bb.Error);const U=Object.assign(Object.assign({battle_id:this._currentBattleID,pet_name:k.petName,pet_element:k.petElement,pet_type:k.petType,pet_level:k.petLevel,pet_rarity:k.petRarity},B),this.getCommonEventDataProperties());Be.track("Pet Captured",U)}sendBattlePetCaptureFailedEvent(k,B=null){if(!this._currentBattleID)return void G.VyI.log("An error occurred while sending pet capture failed segment event: Pet Capture Failed Event cannot be sent before Start Event.",G.$bb.Error);const U=Object.assign(Object.assign({battle_id:this._currentBattleID,pet_name:k.petName,pet_element:k.petElement,pet_type:k.petType,pet_level:k.petLevel,pet_rarity:k.petRarity,fail_reason:k.failReason,funnel_id:"Member Locked"===k.failReason?this._segment.purchase.getFunnelID():null},B),this.getCommonEventDataProperties());Be.track("Pet Capture Failed",U)}sendBattleSpellCastEvent(k,B=null){if(!this._currentBattleID)return void G.VyI.log("An error occurred while sending spell cast segment event: Spell Cast Event cannot be sent before Start Event.",G.$bb.Error);const U=Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID},k),B),this.getCommonEventDataProperties());Be.track("Battle Spell Cast",U)}sendCoopTeamCreatedEvent(k,B,U=null){const F=Object.assign(Object.assign({team_type:k,team_id:B},U),this.getCommonEventDataProperties());Be.track("Coop Team Created",F)}sendCoopTeamJoinedEvent(k,B,U=null){const F=Object.assign(Object.assign({team_type:k,team_id:B},U),this.getCommonEventDataProperties());Be.track("Coop Team Joined",F)}sendCoopTeamHostLeftEvent(k,B,U=null){const F=Object.assign(Object.assign({team_type:k,team_id:B},U),this.getCommonEventDataProperties());Be.track("Coop Team Host Left",F)}sendCoopBattleStartedEvent(k,B,U=null){this._currentBattleID=nt.$.generateUID();const F=Object.assign(Object.assign({team_type:k,team_id:B,battle_id:this._currentBattleID},U),this.getCommonEventDataProperties());Be.track("Coop Battle Started",F)}}var yt=U(20404);class _t extends it.v{constructor(){super(...arguments),this._currentGameLoadingInstanceID="",this._currentServerInstanceID=""}get CurrentGameLoadingInstanceID(){return this._currentGameLoadingInstanceID}get CurrentServerInstanceID(){return this._currentServerInstanceID}sendGameLoadingStartedEvent(k=null){this._currentGameLoadingInstanceID=nt.$.generateUID();const B="Notification"in window?Notification.permission:null,U=yt.b.isQueryParameterSetForSession(4);let F=null;if(U){const k=yt.b.getQueryParameterKeyFromID(4);F=yt.b.getQueryParameterByName(k)}const G=Object.assign(Object.assign({instance_id:this.CurrentGameLoadingInstanceID,notification_consent:B,launched_from_notification:U,notification_id:F},k),{session_uuid:this._uuidProvider.getUUID()});Be.track("Game Loading Started",G)}sendGameLoadingEndedEvent(k,B,U,F=null){const G=Object.assign(Object.assign({instance_id:this.CurrentGameLoadingInstanceID,success:B,completion_percent:U,duration:(Date.now()-k)/Q.s.SECONDS_TO_MILLISECONDS_MULTIPLIER},F),{session_uuid:this._uuidProvider.getUUID()});Be.track("Game Loading Ended",G)}sendServerSelectedEvent(k,B=null){this._currentServerInstanceID=nt.$.generateUID();const U=Object.assign(Object.assign(Object.assign({instance_id:this.CurrentServerInstanceID},k),B),{session_uuid:this._uuidProvider.getUUID()});Be.track("Server Selected",U)}sendServerConnectedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({instance_id:this.CurrentServerInstanceID},k),B),this.getCommonEventDataProperties());Be.track("Server Connected",U)}sendServerReconnectedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({instance_id:this.CurrentServerInstanceID},k),B),this.getCommonEventDataProperties());Be.track("Server Reconnected",U)}sendServerConnectionFailedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({instance_id:this.CurrentServerInstanceID},k),B),this.getCommonEventDataProperties());Be.track("Server Connection Failed",U)}}class Et extends it.v{sendFunnelAdvancedSegmentEvent(k,B,U=null){const F=Object.assign(Object.assign({funnel_name:"Permission",funnel_type:"Permission",step_index:k,step_name:B},U),this.getCommonEventDataProperties());Be.track("Funnel Advanced",F)}}var wt=U(21097);class Tt extends it.v{getCurrentContainerInstanceID(){return this._currentContainerData?this._currentContainerData.instanceID:""}getCurrentContainerTransactionID(){return this._currentContainerData?this._currentContainerData.transactionID:""}constructor(k,B,U){super(k,B,U),this._currentContainerData=null,this._discoveredContainers=[],this._currentContainerData={instanceID:"",transactionID:""}}sendContainerDiscoveredEvent(k,B,U,F,G){if(!window.analytics||this._discoveredContainers.includes(null!=G?G:k))return;this._discoveredContainers.push(null!=G?G:k);const j=Object.assign(Object.assign({container_type:k,container_id:B,x_coord:U.toString(),y_coord:F.toString()},this._segment.gameWorld.getCurrentInstanceTypeAndID()),this.getCommonEventDataProperties());Be.track("Container Discovered",j)}sendContainerOpenedEvent(k,B,U=tt.N.OpenWorld,F){this._currentContainerData={instanceID:`${k}-${B}`,transactionID:nt.$.generateUID()};const G=Object.assign(Object.assign(Object.assign({container_type:k,container_id:B},this._segment.gameWorld.getCurrentInstanceTypeAndID(U,F)),{transaction_id:this.getCurrentContainerTransactionID()}),this.getCommonEventDataProperties());Be.track("Container Opened",G)}sendContainerOpenedFailedEvent(k,B,U,F=tt.N.OpenWorld,G){const j=Object.assign(Object.assign(Object.assign({container_type:k,container_id:B},this._segment.gameWorld.getCurrentInstanceTypeAndID(F,G)),{fail_reason:U,funnel_id:U===wt.WE.MemberLocked?this._segment.purchase.getFunnelID():null}),this.getCommonEventDataProperties());Be.track("Container Opened Failed",j)}}var St=U(77938),At=U(34616);class Ct extends it.v{sendConversionJarUpdated(k){var B,U;const F=Object.assign({battle_id:k.battleId,jar_id:k.jarId,update_type:k.updateType,current_count:k.currentCount,capacity:k.capacity,transaction_id:k.transactionId,time_until_reset:k.timeUntilReset,contents:k.contents.map(Ot),contents_added:(null!==(B=k.added)&&void 0!==B?B:[]).map(Ot),contents_removed:(null!==(U=k.removed)&&void 0!==U?U:[]).map(Ot)},this.getCommonEventDataProperties());Be.track("Conversion Jar Updated",F)}memberJarUpdate(k){return{jarId:"Member Jar",currentCount:k.savedBattleCount,capacity:At.N.maximumSavedBattleCount,timeUntilReset:null,contents:k.savedRewards.map((k=>({type:k.itemType,ID:k.itemId,N:k.quantity})))}}starJarUpdate(k){var B,U;return{jarId:"Star Jar",currentCount:null!==(B=k.storedMemberStars)&&void 0!==B?B:0,capacity:1/0,timeUntilReset:((null!==(U=k.memberStarsExpirationDate)&&void 0!==U?U:0)-Date.now())/Q.s.SECONDS_TO_MILLISECONDS_MULTIPLIER,contents:[]}}}function Ot(k){var B,U,F,G,j;return{item_type:k.type,item_id:null===(B=k.ID)||void 0===B?void 0:B.toString(),item_name:null!==(F=null===(U=St.t.getItem(k.type,k.ID))||void 0===U?void 0:U.name)&&void 0!==F?F:"unknown",count:null!==(j=null===(G=k.N)||void 0===G?void 0:G.toString())&&void 0!==j?j:"1"}}var It=U(23506);class Dt extends it.v{get botDifficulty(){return this._botDifficulty}get botPersonality(){return this._botPersonality}sendInterfaceOpenedEvent(){this._segment.featureCommon.sendInterfaceEvent({interfaceName:J.B.DuelsStadium,interfaceType:et.Wm.Screen,instanceType:tt.N.Interface,originType:et.$N.ButtonClick})}sendMatchmakingQueuedEvent(){this._matchmakingQueuedTime=Date.now();const k=Object.assign(Object.assign({},this._segment.gameWorld.getCurrentInstanceTypeAndID(tt.N.Interface,J.B.DuelsStadium)),this.getCommonEventDataProperties());Be.track("Duels Stadium Matchmaking Queued",k)}sendMatchFoundEvent(k,B){G.Aq$.isDefined(B)&&(this._botPersonality=B);const U=Object.assign(Object.assign(Object.assign({},this._segment.gameWorld.getCurrentInstanceTypeAndID(tt.N.Interface,J.B.DuelsStadium)),{time_in_queue:Date.now()-this._matchmakingQueuedTime,player_id:this._activePlayer.getUserID(),opponent_id:null!=B?B:k}),this.getCommonEventDataProperties());Be.track("Duels Stadium Start",U)}sendCloseButtonClickedEvent(){this._segment.featureCommon.sendButtonEvent({interfaceName:J.B.DuelsStadium,interfaceType:et.Wm.Screen,buttonName:"close-duels-stadium",destinationName:J.B.WorldMap})}setBotDifficultyEvent(k){const B=It.V.globalDuelBotPersonalityConfig.streakConfig.sort(((k,B)=>k.playerStreak-B.playerStreak)).map((k=>k.playerStreak)),U=G.cj9.clamp(k,B[0],B[B.length-1]);return this._botDifficulty=B.indexOf(U)+1,this._botDifficulty}sendRoomSelectedEvent(k){const B=Array.isArray(k.entryCost)?k.entryCost[0]:k.entryCost,U=Array.isArray(k.prize)?k.prize[0]:k.prize,F=Object.assign(Object.assign({instance_id:nt.$.generateUID()},this.getCommonEventDataProperties()),{room_name:k.name,entry_fee_amount:B?B.amount:0,entry_fee_currency:B?B.type:"Free",reward_amount:U.amount,reward_currency:U.type});Be.track("Room Selected",F)}}class Rt extends it.v{getCurrentMinigameInstanceID(){return this._currentMinigameData?this._currentMinigameData.instanceID:""}getCurrentMinigameTransactionID(){return this._currentMinigameData?this._currentMinigameData.transactionID:""}getCurrentPrizeWheelInstanceID(){return this._currentPrizeWheelData?this._currentPrizeWheelData.instanceID:""}getCurrentPrizeWheelTransactionID(){return this._currentPrizeWheelData?this._currentPrizeWheelData.transactionID:""}getCurrentPrizeWheelSpinID(){return this._currentPrizeWheelData.spinID?this._currentPrizeWheelData.spinID:""}getCurrentGoalRewardInstanceID(){return this._currentGoalRewardTransactionData?this._currentGoalRewardTransactionData.instanceID:""}getCurrentGoalRewardTransactionID(){return this._currentGoalRewardTransactionData?this._currentGoalRewardTransactionData.transactionID:""}constructor(k,B,U){super(k,B,U),this._currentMinigameData=null,this._currentPrizeWheelData=null,this._currentGoalRewardTransactionData=null,this._currentMinigameData={instanceID:"",transactionID:""},this._currentPrizeWheelData={instanceID:"",transactionID:""},this._currentGoalRewardTransactionData={instanceID:"",transactionID:""}}sendMinigameEvent(k,B,U=null){B&&(this._currentMinigameData={instanceID:nt.$.generateUID(),transactionID:nt.$.generateUID()});let F=Object.assign(Object.assign({minigame:k,instance_id:this._currentMinigameData.instanceID},U),this.getCommonEventDataProperties());B?Be.track("Minigame Started",F):(F=Object.assign(Object.assign({},F),{transaction_id:this._currentMinigameData.transactionID}),Be.track("Minigame Completed",F))}sendPrizeWheelSpunEvent(k,B=tt.N.OpenWorld,U={}){var F;this._currentPrizeWheelData={instanceID:nt.$.generateUID(),transactionID:nt.$.generateUID(),spinID:null!==(F=U.spin_id)&&void 0!==F?F:nt.$.generateUID()};const G=Object.assign(Object.assign(Object.assign(Object.assign({wheel_type:k},this._segment.gameWorld.getCurrentInstanceTypeAndID(B)),{transaction_id:this.getCurrentPrizeWheelTransactionID()}),U),this.getCommonEventDataProperties());Be.track("Prize Wheel Spun",G)}sendPrizeWheelSpinFailedEvent(k,B,U=tt.N.OpenWorld,F=null){const G=Object.assign(Object.assign(Object.assign({wheel_type:k,fail_reason:B,funnel_id:B===wt.WE.MemberLocked?this._segment.purchase.getFunnelID():null},this._segment.gameWorld.getCurrentInstanceTypeAndID(U)),F),this.getCommonEventDataProperties());Be.track("Prize Wheel Spin Failed",G)}sendGoalAchievedEvent(k,B,U,F,G=!1,j=null){this._currentPrizeWheelData={instanceID:nt.$.generateUID(),transactionID:nt.$.generateUID()};const $=Object.assign(Object.assign({goal_name:k,goal_id:B,goal_type:U,goal_system:F,is_repeatable:G,transaction_id:this.getCurrentGoalRewardTransactionID()},j),this.getCommonEventDataProperties());Be.track("Goal Achieved",$)}}var Pt=U(30405);class Mt extends it.v{constructor(k,B,U){super(k,B,U)}handleNewClassAssignment(k){if(k.skills.some((k=>k.correct+k.incorrect>0)))return;const B=k.skills.reduce(((k,B)=>k+B.questions.length),0);Be.track("Class Assignment Received",Object.assign({event_text:"Class Assignment Received",class_id:this.getClassId(),assignment_id:k.homeworkID,questions:B},this.getCommonEventDataProperties()))}handleClassAssignmentCompleted(k){const B=k.skills.reduce(((k,B)=>k+B.correct+B.incorrect),0);Be.track("Class Assignment Completed",Object.assign({event_text:"Class Assignment Completed",class_id:this.getClassId(),assignment_id:k.homeworkID,questions_completed:B},this.getCommonEventDataProperties()))}handleRemovedClassAssignment(k){if(k.skills.every((k=>0===k.questions.length)))return;const B=k.skills.reduce(((k,B)=>k+B.correct+B.incorrect),0);Be.track("Class Assignment Ended",Object.assign({event_text:"Class Assignment Ended",class_id:this.getClassId(),assignment_id:k.homeworkID,questions_completed:B},this.getCommonEventDataProperties()))}getClassId(){return Pt.o.getLatestClassID(this._activePlayer.player.owners,this._activePlayer.player.playerTeachers,this._activePlayer.player.playerParents)}}var Nt=U(13093),xt=U(96073),Lt=U(22023);class kt extends it.v{constructor(){super(...arguments),this._currentInterfaceIDAndDuration=new Map,this._postOpenTime=0,this._currentButtonID=new Map}get currentInterfaceName(){return this._currentInterfaceName}getCurrentInterfaceID(k){var B;return null===(B=this._currentInterfaceIDAndDuration.get(k))||void 0===B?void 0:B.ID}getCurrentButtonID(k){var B;return null===(B=this._currentButtonID.get(k))||void 0===B?void 0:B.ID}sendInterfaceEvent(k,B=null){if(!window.analytics)return;const U=!!k.closeMethod;this._currentInterfaceName=k.interfaceName;let F=k.originID;k.originType===et.$N.ButtonClick||k.originType===et.$N.TabClick?F=this.getCurrentButtonID(k.originID):k.originType===et.$N.NpcClick&&(F=this._segment.gameWorld.getCurrentNpcTransactionID());let G=Object.assign(Object.assign(Object.assign({interface_name:k.interfaceName,interface_type:k.interfaceType,origin_type:k.originType,origin_id:F,instance_type:k.instanceType},k.custom),B),this.getCommonEventDataProperties());U?U&&this._currentInterfaceIDAndDuration.has(k.interfaceName)&&(G=Object.assign(Object.assign({},G),{instance_id:this._currentInterfaceIDAndDuration.get(k.interfaceName).ID,close_method:k.closeMethod,duration:((new Date).getTime()-this._currentInterfaceIDAndDuration.get(k.interfaceName).duration)/Q.s.SECONDS_TO_MILLISECONDS_MULTIPLIER}),this._currentInterfaceIDAndDuration.delete(k.interfaceName),Be.track("Interface Closed",G)):(this._currentInterfaceIDAndDuration.set(k.interfaceName,{ID:nt.$.generateUID(),duration:(new Date).getTime()}),G=Object.assign(Object.assign({},G),{instance_id:this._currentInterfaceIDAndDuration.get(k.interfaceName).ID}),Be.track("Interface Opened",G))}getInstanceId(k){var B;if(window.analytics)return null===(B=this._currentInterfaceIDAndDuration.get(k))||void 0===B?void 0:B.ID}sendScreenTransitionEvent(k){if(window.analytics){const B=Object.assign({duration:k.duration,previous_screen_id:k.previousScreenID,screen_id:k.screenID,transition_type:k.transitionType},this.getCommonEventDataProperties());Be.track("Screen Transitioned",B)}}sendButtonEvent(k,B=null){var U,F;const G=nt.$.generateUID(),j=null!==(U=k.interfaceName)&&void 0!==U?U:this._currentInterfaceName;let $=Object.assign(Object.assign({button_name:k.buttonName,destination_name:k.destinationName,click_id:G,interface_name:j,interface_type:k.interfaceType,element_type:k.elementType,element_id:k.elementID,transation_id:k.transactionId,instance_type:k.instanceType},B),this.getCommonEventDataProperties());j&&""!==j?$=Object.assign({instance_id:null===(F=this._currentInterfaceIDAndDuration.get(j))||void 0===F?void 0:F.ID},$):k.instanceId&&($=Object.assign({instance_id:k.instanceId},$)),k.saveClickInfo&&""!==k.saveClickInfo&&this._currentButtonID.set(k.saveClickInfo,{ID:G}),Be.track("Button Clicked",$)}sendTabEvent(k,B=null){var U,F;const G=nt.$.generateUID(),j=null!==(U=k.interfaceName)&&void 0!==U?U:this._currentInterfaceName;let $=Object.assign(Object.assign({tab_name:k.tabName,click_id:G,interface_name:j,interface_type:k.interfaceType,instance_type:k.instanceType},B),this.getCommonEventDataProperties());k.interfaceName&&""!==k.interfaceName&&($=Object.assign({instance_id:null===(F=this._currentInterfaceIDAndDuration.get(k.interfaceName))||void 0===F?void 0:F.ID,instance_type:k.instanceType},$)),k.saveClickInfo&&""!==k.saveClickInfo&&this._currentButtonID.set(k.saveClickInfo,{ID:G}),Be.track("Tab Clicked",$)}sendPostOpenedEvent(k,B=null){var U;this._postOpenTime=Date.now();let F=Object.assign(Object.assign({interface_name:this._currentInterfaceName,post_id:k},B),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(F=Object.assign({instance_id:null===(U=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===U?void 0:U.ID},F)),Be.track("Post Opened",F)}sendPostViewedEvent(k,B=null){var U;let F=Object.assign(Object.assign({interface_name:k.interfaceName,interface_type:k.interfaceType,post_title:k.postTitle,post_id:k.postID,post_rank:k.postRank},B),this.getCommonEventDataProperties());k.interfaceName&&""!==k.interfaceName&&(F=Object.assign({instance_id:null===(U=this._currentInterfaceIDAndDuration.get(k.interfaceName))||void 0===U?void 0:U.ID},F)),Be.track("Post Viewed",F)}sendPostClosedEvent(k,B,U=null){var F;let G=Object.assign(Object.assign({post_id:k,video_loaded:B,interface_name:this._currentInterfaceName,duration:(Date.now()-this._postOpenTime)/Q.s.SECONDS_TO_MILLISECONDS_MULTIPLIER},U),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(G=Object.assign({instance_id:null===(F=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===F?void 0:F.ID},G)),Be.track("Post Closed",G)}sendPetBookViewedEvent(k){var B;let U=Object.assign({book_name:k.bookName,book_page:k.bookPage},this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(U=Object.assign({instance_id:null===(B=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===B?void 0:B.ID},U)),Be.track("Page Viewed",U)}sendPetDetailsViewedEvent(k,B,U=null){var F;let G=Object.assign(Object.assign({pet_name:k.data.name,pet_id:k.ID,pet_type:k.data.type,pet_element:k.data.affinity,pet_rarity:k.data.rarity,origin_name:B},U),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(G=Object.assign({instance_id:null===(F=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===F?void 0:F.ID},G)),Be.track("Pet Details Viewed",G)}sendPetReleasedEvent(k,B,U=null){var F;let G=Object.assign(Object.assign({pet_name:k,pet_level:B},U),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(G=Object.assign({instance_id:null===(F=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===F?void 0:F.ID},G)),Be.track("Pet Released",G)}sendPetUpgradedEvent(k,B,U,F,G,j=null){var $;let H=Object.assign(Object.assign({progression_type:"Pet Level",progression_value:U,previous_value:B,name:k,point_type:G,point_amount:F,transaction_id:nt.$.generateUID()},j),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(H=Object.assign({instance_id:null===($=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===$?void 0:$.ID},H)),Be.track("Player Progression Advanced",H)}sendPetSlotUnlockedEvent(k,B,U,F=nt.$.generateUID(),G=null){const j=Object.assign(Object.assign({source_type:k,slots_unlocked:B-U,slots_available:B,slots_filled:this._activePlayer.player.kennel.getNumPets(),transaction_id:F},G),this.getCommonEventDataProperties());Be.track("Pet Slot Unlocked",j)}sendTeamUpdatedEvent(k,B,U=null){var F;let G=Object.assign(Object.assign({pet_added:k,pet_removed:B},U),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(G=Object.assign({instance_id:null===(F=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===F?void 0:F.ID},G)),Be.track("Team Updated",G)}sendTeamPositionChangedEvent(k,B=null){var U;let F=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(F=Object.assign({instance_id:null===(U=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===U?void 0:U.ID},F)),Be.track("Team Position Changed",F)}sendFetchPetRosterEvent(k,B){const U=k.map((k=>{var B;const U=null===(B=St.t.getItem("pet",k.ID))||void 0===B?void 0:B.data,F=Lt.P8.getPetDisplayMergeRank(k.ID,k.uniqueID);return{pet_name:null==U?void 0:U.name,pet_id:k.ID,pet_level:k.level,pet_rank:F,pet_gear:k.gear}}));Be.track("Fetch Pet Roster",Object.assign(Object.assign({pet_roster:U},B),this.getCommonEventDataProperties()))}sendBadgeUpdatedEvent(k){const B=Object.assign({button_name:k.button_name,badge_value:k.badge_value,previous_badge_value:k.previous_badge_value},this.getCommonEventDataProperties());Be.track("Badge Updated",B)}sendCrossPlatformEvent(k){const B=Object.assign(Object.assign({},k),this.getCommonEventDataProperties());Be.track("Cross Product Navigation Initiated",B)}}var Bt=U(99134);class Ut extends it.v{constructor(k,B,U){super(k,B,U),this._loginSteps=[],Y.q.instance.game.broadcaster.addAppListener(dt.bv.AnalyticsInitialized,this.onAnalyticsInitialized,this)}registerLoginStep(k){this._loginSteps.push(k)}sendStep(k,B,U,F){var G,j;if(!window.analytics)return;const $=null!==(G=this._activePlayer.player.data.featureFunnelProgress)&&void 0!==G?G:{};F<=(null!==(j=$[k])&&void 0!==j?j:-1)||(Be.track("Funnel Advanced",Object.assign({funnel_name:k,funnel_type:B,step_name:U,step_index:F},this.getCommonEventDataProperties())),this._activePlayer.player.data.featureFunnelProgress=Object.assign(Object.assign({},$),{[k]:F}),this._activePlayer.player.forceSaveCharacter())}onAnalyticsInitialized(){for(const k of this._loginSteps)k.condition()&&this.sendStep(k.funnelName,k.funnelType,k.stepName,k.stepIndex)}reset(k){var B;const U=null!==(B=this._activePlayer.player.data.featureFunnelProgress)&&void 0!==B?B:{};return void 0!==U[k]&&(delete U[k],this._activePlayer.player.data.featureFunnelProgress=U,this._activePlayer.player.forceSaveCharacter(),!0)}}var Ft=U(24047),Gt=U(73678),jt=U(30065),$t=U(47728),Ht=U(87337);class Vt extends it.v{constructor(){super(...arguments),this._currentMapStartTime=0,this._discoveredNpcList=[],this._discoveredWorldObjectList=[],this._currentNpcData=null,this.currentOpenWorldInstanceId=""}getCurrentNpcInstanceID(){return this._currentNpcData?this._currentNpcData.instanceID:""}getCurrentNpcOriginID(){return this._currentNpcData?this._currentNpcData.npc_id:""}getCurrentNpcTransactionID(){return this._currentNpcData?this._currentNpcData.transactionID:""}sendMapEnteredEvent(k,B,U,F=null,G=!1){var j;this.currentOpenWorldInstanceId=nt.$.generateUID();const $=Object.assign(Object.assign(Object.assign({previous_map:k,previous_zone:B,transition_type:U,duration:(Date.now()-this._currentMapStartTime)/Q.s.SECONDS_TO_MILLISECONDS_MULTIPLIER},this.getCurrentInstanceTypeAndID(tt.N.OpenWorld,null,{previousZone:B,previousMap:k})),F),this.getCommonEventDataProperties());if("A1"===$.map||"D3"===$.map){if((null===(j=Y.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival())||void 0===j?void 0:j.type)===jt.Q.Springfest){const k=$t.x.getFestivalSegmentContext();$.instance_type=k.instance_type,$.instance_id=k.instance_id}}if(G){const k=$t.x.getFestivalSegmentContext();$.instance_type=k.instance_type,$.instance_id=k.instance_id}this._currentMapStartTime=Date.now(),Be.track("Map Entered",$)}sendWorldObjectDiscoveredEvent(k,B=null){if(!window.analytics||this._discoveredWorldObjectList.includes(k.object_type))return;this._discoveredWorldObjectList.push(k.object_type);const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),this.getCurrentInstanceTypeAndID()),B),this.getCommonEventDataProperties());this._currentMapStartTime=Date.now(),Be.track("World Object Discovered",U)}sendWorldObjectUsedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),this.getCurrentInstanceTypeAndID()),B),this.getCommonEventDataProperties());this._currentMapStartTime=Date.now(),Be.track("World Object Used",U)}sendWorldObjectUsedFailedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},k),{funnel_id:k.fail_reason===Ht.kN.MemberLocked?this._segment.purchase.getFunnelID():null}),this.getCurrentInstanceTypeAndID()),B),this.getCommonEventDataProperties());this._currentMapStartTime=Date.now(),Be.track("World Object Failed",U)}sendNpcClickedEvent(k,B=null){this._currentNpcData=Object.assign(Object.assign({},k),{instanceID:`${k.npc_name}-${k.npc_type}`,transactionID:nt.$.generateUID()});const U=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},k),{click_id:this.getCurrentNpcTransactionID()}),this.getCurrentInstanceTypeAndID()),B),this.getCommonEventDataProperties());Be.track("Npc Clicked",U)}sendNpcDiscoveredEvent(k,B=null){if(!window.analytics||this._discoveredNpcList.includes(k.npc_name))return;this._discoveredNpcList.push(k.npc_name);const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),this.getCurrentInstanceTypeAndID()),B),this.getCommonEventDataProperties());Be.track("Npc Discovered",U)}sendEnemyDiscoveredEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),this.getCurrentInstanceTypeAndID()),B),this.getCommonEventDataProperties());this._currentMapStartTime=Date.now(),Be.track("Enemy Discovered",U)}sendCooldownTimerStartedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),this.getCurrentInstanceTypeAndID()),B),this.getCommonEventDataProperties());Be.track("Cooldown Timer Started",U)}getCurrentInstanceTypeAndID(k=tt.N.OpenWorld,B,U){var F;const[G,j]=U?[U.previousZone,U.previousMap]:Y.q.instance.prodigy.world.getCurrentMap().split("-");let $,H=k;if(!["WR","CR","A1","DungeonHub","hub"].includes(j))switch(G){case Gt.A_.ICETOWER:case Gt.A_.EARTHTOWER:case Gt.A_.DARKTOWER:H=tt.N.TowerRun;break;case Gt.A_.CRYSTALCAVERNS:H=tt.N.CrystalCaverns;break;case Gt.A_.ARCHIVES:H=tt.N.Archives;break;case Gt.A_.ACADEMY:H=tt.N.Academy}return k===tt.N.EndOfBattle?(H=tt.N.EndOfBattle,$=null===(F=this._segment.battle)||void 0===F?void 0:F.currentBattleID):k===tt.N.Interface?$=this._segment.featureCommon.getCurrentInterfaceID(B):k===tt.N.RiftRun||k===tt.N.BossRift?$=this._segment.rifts.riftInstanceUuid:($=this._segment.playerMovementAndDiscovery.getCurrentRunInstanceID(H),$||k!==tt.N.OpenWorld||($=this.currentOpenWorldInstanceId)),{instance_type:H,instance_id:$}}}var Wt=U(62886),qt=U(60157);class Kt extends it.v{constructor(){super(...arguments),this._ongoingTransactions=[]}sendItemRemovedEvent(k,B,U,F,G){const j=Object.assign(Object.assign(Object.assign({item_id:k,item_name:B,item_type:U,item_count:F,item_balance:this._activePlayer.player.getItemCount(U,k),transaction_id:this.getCustomItemRemovedTransactionID(U,G)},this._segment.gameWorld.getCurrentInstanceTypeAndID()),G),this.getCommonEventDataProperties());this.sendItemQuestEvent(Wt.T.REMOVE_ITEM,Wt.T.REMOVE_MULTIPLE_ITEM,j,U,k),Be.track("Item Removed",j)}sendItemReceivedEvent(k,B,U,F,G={}){var j,$;const H=St.t.getItem(U,k),V=this._activePlayer.player.getItemCount(U,k),W=Object.assign(Object.assign(Object.assign(Object.assign({item_id:k,item_name:B,item_type:U,item_count:F,item_balance:V,player_equipment:this._activePlayer.player.equipment.getData(),item_unlock_level:null!==($=null===(j=null==H?void 0:H.data)||void 0===j?void 0:j.lockLevel)&&void 0!==$?$:1},this._segment.gameWorld.getCurrentInstanceTypeAndID(null==G?void 0:G.instance_type,null==G?void 0:G.interface_name)),G),this.getSourceTransactionData(null==G?void 0:G.source_type,null==G?void 0:G.source_id)),this.getCommonEventDataProperties());this.sendItemQuestEvent(Wt.T.RECEIVE_ITEM,Wt.T.RECEIVE_MULTIPLE_ITEM,W,U,k),Y.q.instance.game.broadcaster.broadcast(dt.ib.ItemReceived,void 0,[{ID:k,type:U,N:F,balance:V}]),Be.track("Item Received",W)}sendItemUsedEvent(k,B={}){this._currentItemUsedTransactionID=nt.$.generateUID();const U=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this._segment.gameWorld.getCurrentInstanceTypeAndID()),k),{transaction_id:this._currentItemUsedTransactionID}),B),this.getCommonEventDataProperties());this.sendItemQuestEvent(Wt.T.USE_ITEM,void 0,U,k.item_type,k.item_id),Be.track("Item Used",U)}sendItemEquippedEvent(k,B=null,U={}){const F=Object.assign(Object.assign(Object.assign(Object.assign({},k),{interaction_id:B}),U),this._segment.featureCommon.getCommonEventDataProperties());this.sendItemQuestEvent(Wt.T.EQUIP_ITEM,void 0,F,k.item_type,k.item_id),Be.track("Item Equipped",F)}sendItemEquipFailedEvent(k,B={}){const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),{funnel_id:"Member Locked"===k.fail_reason?this._segment.purchase.getFunnelID():null}),B),this._segment.featureCommon.getCommonEventDataProperties());Be.track("Item Equip Failed",U)}sendItemUnequippedEvent(k,B=null,U={}){const F=Object.assign(Object.assign(Object.assign(Object.assign({},k),{interaction_id:B}),U),this._segment.featureCommon.getCommonEventDataProperties());Be.track("Item Unequipped",F)}getSourceTransactionData(k,B){var U,F;let j,$=null,H=k;if(!H)return null;switch(H){case Z.C.Container:case Z.C.Interactable:case Z.C.WorldChest:case Z.C.WorldMemberChest:$=this._segment.container.getCurrentContainerInstanceID(),j=this._segment.container.getCurrentContainerTransactionID();break;case Z.C.MiniGame:$=this._segment.economy.getCurrentMinigameInstanceID(),j=this._segment.economy.getCurrentMinigameTransactionID();break;case Z.C.PrizeWheel:this._segment.rifts.riftInstanceUuid?($=null!==(U=this._segment.rifts.getRiftsRewardSpinUuid())&&void 0!==U?U:"",j=null!==(F=this._segment.rifts.getRiftsRewardSpinTransactionUuid())&&void 0!==F?F:""):($=this._segment.economy.getCurrentPrizeWheelInstanceID(),j=this._segment.economy.getCurrentPrizeWheelTransactionID());break;case Z.C.Shop:$=this._segment.shop.getCurrentShopInstanceID(),j=this._segment.shop.getCurrentShopTransactionID();break;case Z.C.QuestReward:$=this._segment.playerProgression.getCurrentQuestInstanceID(),j=this._segment.playerProgression.getCurrentQuestTransactionID();break;case Z.C.Npc:$=this._segment.gameWorld.getCurrentNpcInstanceID(),j=this._segment.gameWorld.getCurrentNpcTransactionID();break;case Z.C.Battle:$=this._segment.battle.currentBattleID,j=nt.$.generateUID();break;case Z.C.BattlePass:j=this._segment.battlePass.rewardClaimedTransactionId;break;case Z.C.Festival:case Z.C.FestivalPrizeWheel:j=this._segment.festival.getCurrentFestivalTransactionID(null!=B?B:"");break;case Z.C.FestivalCurrencyConversion:j=nt.$.generateUID();break;case Z.C.FestivalBossLootWheel:$=this._segment.economy.getCurrentPrizeWheelSpinID(),j=this._segment.economy.getCurrentPrizeWheelTransactionID();break;case Z.C.DailyLoginCalendar:const k="daily-login-calendar-collect-button";$="Daily-login-Calendar-Reward",j=this._segment.featureCommon.getCurrentButtonID(k);break;case Z.C.DynamicStore:const G=Y.q.instance.prodigy.gameContainer.get("7a1-ff33").getLastTransactionStore();$=this._segment.shop.getDynamicStoreSourceId(G),j=this._segment.shop.getCurrentShopTransactionID(),H=Z.C.Shop;break;default:return null}const V={source_type:H};return G.Aq$.isDefined($)&&(V.source_id=$),G.Aq$.isDefined(B)&&""===$&&(V.source_id=B),G.Aq$.isDefined(j)&&(V.transaction_id=j),V}beginSecureInventoryTracking(){const k=Y.q.instance.prodigy.gameContainer.get("61f-37d6");k.onChange.removeAll(this),k.onChange.add(((k,B)=>{const U=this._ongoingTransactions[this._ongoingTransactions.length-1];U?U.add({current:k,previous:B,customData:{}}):G.VyI.log("Received secure inventory changes with no associated segment transaction",G.$bb.Error)}),this)}beginSecureItemTransaction(){let k=[];const B={add:B=>{k?k.push(B):G.VyI.log("Attempted to add item to flushed segment transaction",G.$bb.Error)},take:()=>{const B=null!=k?k:[];return k=void 0,B},setIndividualData:(B,U,F)=>{for(const G of null!=k?k:[])G.current.type===B&&G.current.id===U&&(G.customData=F)},flush:U=>{if(!k)return;const F=this._ongoingTransactions.indexOf(B),j=this._ongoingTransactions.splice(F,1/0);for(const k of j)for(const{previous:B,current:F,customData:j}of k.take())St.t.secureGetItem(F.type,F.id).then((k=>{var G,$,H;const V=null!==(G=null==B?void 0:B.quantity)&&void 0!==G?G:0,W=F.quantity,q=null!==(H=null===($=null==k?void 0:k.data)||void 0===$?void 0:$.name)&&void 0!==H?H:"undefined",K=Object.assign(Object.assign({},U),j);W>V&&this._segment.item.sendItemReceivedEvent(F.id,q,F.type,W-V,K),W",currency_balance:this._activePlayer.player.getCurrencyAmount(H,$),item_cost:V}),B),{sink_id:null===(j=B.sink_id)||void 0===j?void 0:j.toString()}))}sendCostumePreviewedEvent(k,B,U,F){Be.track("Costume Previewed",Object.assign({costume_id:k,costume_name:B,is_member_locked:U,rarity:F},this.getCommonEventDataProperties()))}}var zt=U(70156),Yt=U(78746),Qt=U(4764);class Xt extends it.v{get currentLootDashMatchId(){return this._currentLootDashMatchId}constructor(k,B,U){super(k,B,U),this._lootDashManager=Y.q.instance.prodigy.gameContainer.get("cfe-9c2c")}sendMatchmakingStartedEvent(){if(!this.lootDashMatchController)return;const{instanceType:k,instanceId:B}=this.getInstanceData(!0);Be.track("Wizard Dash Matchmaking Started",Object.assign({event_text:"Wizard Dash Matchmaking Started",instance_type:k,instance_id:B,match_type:this.lootDashMatchController.matchType,matchmaking_type:this.lootDashMatchController.matchmakingType},this.getCommonEventDataProperties()))}sendBotDataRetrievedEvent(k){if(!k)return;const{instanceType:B,instanceId:U}=this.getInstanceData();Be.track("Wizard Dash Bot Data Retrieved",Object.assign({event_text:"Wizard Dash Bot Data Retrieved",instance_type:B,instance_id:U,bot_type:k.difficulty,bots:k},this.getCommonEventDataProperties()))}sendRunStartedEvent(){if(!this.lootDashMatchController)return;this._currentLootDashMatchId=nt.$.generateUID();const{instanceType:k,instanceId:B}=this.getInstanceData(!0);Be.track("Wizard Dash Run Started",Object.assign({event_text:"Wizard Dash Run Started",instance_type:k,instance_id:B,match_type:this.lootDashMatchController.matchType,matchmaking_type:this.lootDashMatchController.matchmakingType,number_of_opponents:this.lootDashMatchController.numBotOpponents+this.lootDashMatchController.numLiveOpponents,number_of_bots:this.lootDashMatchController.numBotOpponents,number_of_live_players:this.lootDashMatchController.numLiveOpponents,featured_content_available:0,featured_content_filled:0,total_stages:this.lootDashMatchController.totalStages,revives_remaining:this.filterRevivesRemaining(this._lootDashManager.getNumberOfStartingRevives())},this.getCommonEventDataProperties()))}sendRunCompletedEvent(k,B){var U;if(!this.lootDashMatchController)return;const F=this._activePlayer.player.educationData,{instanceType:G,instanceId:j}=this.getInstanceData();Be.track("Wizard Dash Run Completed",Object.assign({event_text:"Wizard Dash Run Completed",instance_type:G,instance_id:j,outcome:this.lootDashMatchController.lootDashMatchData.matchCompletionState,loot_bags:this.lootDashMatchController.lootDashMatchData.lootBagData,stars_earned:k,place_finished:B,winning_streak:this.lootDashMatchController.lootDashMatchData.currentStreak,revives_remaining:this.filterRevivesRemaining(this.lootDashMatchController.revivesRemaining),questions_answered:this.lootDashMatchController.lootDashMatchData.questionsAnsweredData.totalQuestionsAnswered,questions_correct:this.lootDashMatchController.lootDashMatchData.questionsAnsweredData.totalQuestionsAnsweredCorrectly,grade:null!==(U=F.grade)&&void 0!==U?U:F.chosenGrade},this.getCommonEventDataProperties()))}sendStageStartedEvent(){if(!this.lootDashMatchController)return;const k=this.lootDashMatchController.lootDashMatchData.stageData[this.lootDashMatchController.currentStageIndex+1];this._currentLootDashStageId=nt.$.generateUID();const{instanceType:B,instanceId:U}=this.getInstanceData();Be.track("Wizard Dash Stage Started",Object.assign({event_text:"Wizard Dash Stage Started",instance_type:B,instance_id:U,stage_id:this._currentLootDashStageId,stage_number:this.lootDashMatchController.currentStageIndex+1,stage_type:this.lootDashMatchController.lootDashMatchData.currentStage.stageType,next_stage:k?k.stageIndex+1:"last_stage",total_stages:this.lootDashMatchController.totalStages,total_waves:this.lootDashMatchController.numWavesInCurrentStage,revives_remaining:this.filterRevivesRemaining(this.lootDashMatchController.revivesRemaining)},this.getCommonEventDataProperties()))}sendStageCompletedEvent(){if(!this.lootDashMatchController)return;const{instanceType:k,instanceId:B}=this.getInstanceData();Be.track("Wizard Dash Stage Completed",Object.assign({event_text:"Wizard Dash Stage Completed",instance_type:k,instance_id:B,stage_id:this._currentLootDashStageId,stage_number:this.lootDashMatchController.currentStageIndex+1,stage_type:this.lootDashMatchController.lootDashMatchData.currentStage.stageType,total_stages:this.lootDashMatchController.totalStages,total_waves:this.lootDashMatchController.numWavesInCurrentStage,loot_bags:this.lootDashMatchController.lootDashMatchData.lootBagData,revives_remaining:this.filterRevivesRemaining(this.lootDashMatchController.revivesRemaining),questions_answered:this.lootDashMatchController.lootDashMatchData.questionsAnsweredData.questionsAnsweredThisStage,questions_correct:this.lootDashMatchController.lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisStage},this.getCommonEventDataProperties()))}sendWaveStartedEvent(){if(!this.lootDashMatchController)return;this._currentLootDashWaveId=nt.$.generateUID();const{instanceType:k,instanceId:B}=this.getInstanceData();Be.track("Wizard Dash Wave Started",Object.assign({event_text:"Wizard Dash Wave Started",instance_type:k,instance_id:B,stage_id:this._currentLootDashStageId,stage_number:this.lootDashMatchController.currentStageIndex+1,wave_id:this._currentLootDashWaveId,wave_number:this.lootDashMatchController.currentWaveIndex+1,total_waves:this.lootDashMatchController.numWavesInCurrentStage,revives_remaining:this.filterRevivesRemaining(this.lootDashMatchController.revivesRemaining)},this.getCommonEventDataProperties()))}sendWaveCompletedEvent(){if(!this.lootDashMatchController)return;const{instanceType:k,instanceId:B}=this.getInstanceData();Be.track("Wizard Dash Wave Completed",Object.assign({event_text:"Wizard Dash Wave Completed",instance_type:k,instance_id:B,stage_id:this._currentLootDashStageId,stage_number:this.lootDashMatchController.currentStageIndex+1,wave_id:this._currentLootDashWaveId,wave_number:this.lootDashMatchController.currentWaveIndex+1,total_waves:this.lootDashMatchController.numWavesInCurrentStage,loot_bags:this.lootDashMatchController.lootDashMatchData.lootBagData,revives_remaining:this.filterRevivesRemaining(this.lootDashMatchController.revivesRemaining),questions_answered:this.lootDashMatchController.lootDashMatchData.questionsAnsweredData.questionsAnsweredThisWave,questions_correct:this.lootDashMatchController.lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisWave},this.getCommonEventDataProperties()))}sendMathStreakContinuedEvent(k){if(!this.lootDashMatchController)return;const{instanceType:B,instanceId:U}=this.getInstanceData();Be.track("Wizard Dash Math Streak Continued",Object.assign({event_text:"Wizard Dash Math Streak Continued",instance_type:B,instance_id:U,stage_number:this.lootDashMatchController.currentStageIndex+1,wave_number:this.lootDashMatchController.currentWaveIndex+1,current_streak:k,loot_bags:this.lootDashMatchController.lootDashMatchData.lootBagData},this.getCommonEventDataProperties()))}sendMathStreakResetEvent(k){if(!this.lootDashMatchController)return;const{instanceType:B,instanceId:U}=this.getInstanceData();Be.track("Wizard Dash Math Streak Reset",Object.assign({event_text:"Wizard Dash Math Streak Reset",instance_type:B,instance_id:U,stage_number:this.lootDashMatchController.currentStageIndex+1,wave_number:this.lootDashMatchController.currentWaveIndex+1,previous_streak:k,loot_bags:this.lootDashMatchController.lootDashMatchData.lootBagData},this.getCommonEventDataProperties()))}sendReviveUsedEvent(){if(!this.lootDashMatchController)return;const{instanceType:k,instanceId:B}=this.getInstanceData();Be.track("Wizard Dash Revive Used",Object.assign({event_text:"Wizard Dash Revive Used",instance_type:k,instance_id:B,stage_number:this.lootDashMatchController.currentStageIndex+1,wave_number:this.lootDashMatchController.currentWaveIndex+1,revives_remaining:this.filterRevivesRemaining(this.lootDashMatchController.revivesRemaining)},this.getCommonEventDataProperties()))}sendNoMoreRevivesEvent(){if(!this.lootDashMatchController)return;const{instanceType:k,instanceId:B}=this.getInstanceData();Be.track("Wizard Dash No More Revives",Object.assign({event_text:"Wizard Dash No More Revives",instance_type:k,instance_id:B,stage_number:this.lootDashMatchController.currentStageIndex+1,wave_number:this.lootDashMatchController.currentWaveIndex+1},this.getCommonEventDataProperties()))}getInstanceData(k=!1){var B;const U=this.lootDashMatchController.matchType;let F=tt.N.LootDash,G=this._currentLootDashMatchId;return k&&(G=this._segment.featureCommon.getInstanceId(J.B.LootDashMenu)),U===Yt.B1.QuickQuiz&&(F=tt.N.LootDashQuickQuiz,G=null===(B=Qt.w.instance().currentAssignmentId)||void 0===B?void 0:B.toString()),{instanceType:F,instanceId:G}}filterRevivesRemaining(k){return k===zt.eA?void 0:k}}var Zt=U(215);class Jt extends it.v{get currentTransactionID(){return this._currentTransactionID}constructor(k,B,U){super(k,B,U)}sendPlayerNameUpdatedEvent(k,B,U=null){const F=Object.assign(Object.assign({player_name:k,selected_from:B},U),this.getCommonEventDataProperties());Be.track("Player Name Updated",F)}sendPlayerAvatarUpdatedEvent(k,B,U=null){this._currentTransactionID=nt.$.generateUID();const F=Object.assign(Object.assign({feature:k,selection:B,transaction_id:this.currentTransactionID},U),this.getCommonEventDataProperties());Be.track("Player Avatar Updated",F)}sendEmoteUsedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("Emote Used",U)}sendEmoteFailedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),{funnel_id:"Member Locked"===k.fail_reason?this._segment.purchase.getFunnelID():null}),B),this.getCommonEventDataProperties());Be.track("Emote Failed",U)}}var te=U(83668),ee=U(19464);class ie extends it.v{getCurrentRunInstanceID(k){var B;return null!==(B=this._currentRunInstanceID.get(k))&&void 0!==B?B:""}constructor(k,B,U){super(k,B,U),this._currentRunInstanceID=new Map,this._currentTowerRunData=null,this._currentTowerRunData={towerRunStartTime:0,towerRunFloorStartTime:0,numberOfCompletedFloors:0}}sendCrystalCavernsEnteredEvent(k,B=null){this._currentRunInstanceID.set(tt.N.CrystalCaverns,nt.$.generateUID());const U=Object.assign(Object.assign({instance_id:this._currentRunInstanceID.get(tt.N.CrystalCaverns),instance_origin:k},B),this.getCommonEventDataProperties());Be.track("Crystal Caverns Entered",U)}sendCrystalCavernsParticipantsEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({instance_id:this._currentRunInstanceID.get(tt.N.CrystalCaverns)},k),B),this.getCommonEventDataProperties());Be.track("Crystal Caverns Participants",U)}sendCrystalCavernsMilestoneReachedEvent(k,B=null){const U=this._activePlayer.player.state.getDungeonState(te.o,"crystal_caverns"),F=Object.assign(Object.assign({instance_id:this._currentRunInstanceID.get(tt.N.CrystalCaverns),milestone_type:k,milestone:k===ee.lT.Complete?k:null==U?void 0:U.getCurrentMap()},B),this.getCommonEventDataProperties());Be.track("Crystal Caverns Milestone Reached",F)}sendCrystalCavernsCompletedEvent(k,B=null){const U=Object.assign(Object.assign({instance_id:this._currentRunInstanceID.get(tt.N.CrystalCaverns),outcome:k},B),this.getCommonEventDataProperties());Be.track("Crystal Caverns Completed",U)}sendArchivesRunStartedEvent(k=null){this._currentRunInstanceID.set(tt.N.Archives,nt.$.generateUID());const B=Object.assign(Object.assign({instance_id:this._currentRunInstanceID.get(tt.N.Archives)},k),this.getCommonEventDataProperties());Be.track("Archives Run Started",B)}sendArchivesRunCompletedEvent(k,B=null){const U=Object.assign(Object.assign({instance_id:this._currentRunInstanceID.get(tt.N.Archives),golden_pages:k},B),this.getCommonEventDataProperties());Be.track("Archives Run Completed",U)}sendTowerRunStartedEvent(k,B,U=null){this._currentRunInstanceID.set(tt.N.TowerRun,nt.$.generateUID()),this._currentTowerRunData={towerRunStartTime:Date.now(),towerRunFloorStartTime:0,numberOfCompletedFloors:0};const F=Object.assign(Object.assign({tower_type:k,is_complete:B,instance_id:this._currentRunInstanceID.get(tt.N.TowerRun)},U),this.getCommonEventDataProperties());Be.track("Tower Run Started",F)}sendTowerRunFloorStartedEvent(k,B=null){if(void 0===this._currentRunInstanceID.get(tt.N.TowerRun))return;this._currentTowerRunData.towerRunFloorStartTime=Date.now();const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),{instance_id:this._currentRunInstanceID.get(tt.N.TowerRun)}),B),this.getCommonEventDataProperties());Be.track("Tower Floor Started",U)}sendTowerRunFloorCompletedEvent(k,B=null){if(void 0===this._currentRunInstanceID.get(tt.N.TowerRun))return;this._currentTowerRunData.numberOfCompletedFloors++;const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),{instance_id:this._currentRunInstanceID.get(tt.N.TowerRun),duration:(Date.now()-this._currentTowerRunData.towerRunFloorStartTime)/Q.s.SECONDS_TO_MILLISECONDS_MULTIPLIER}),B),this.getCommonEventDataProperties());Be.track("Tower Floor Completed",U)}sendTowerRunCompletedEvent(k,B,U=null){if(void 0===this._currentRunInstanceID.get(tt.N.TowerRun))return;const F=Object.assign(Object.assign({tower_type:k,is_complete:B,floors_completed:this._currentTowerRunData.numberOfCompletedFloors,duration:(Date.now()-this._currentTowerRunData.towerRunStartTime)/Q.s.SECONDS_TO_MILLISECONDS_MULTIPLIER,instance_id:this._currentRunInstanceID.get(tt.N.TowerRun)},U),this.getCommonEventDataProperties());Be.track("Tower Run Completed",F)}}var se=U(96810);class ne extends it.v{constructor(k,B,U){super(k,B,U)}sendFloatlingTowerCreatedEvent(k,B=null){const U=Object.assign(Object.assign({tower_id:k},B),this.getCommonEventDataProperties());Be.track("Floatling Tower Created",U)}sendFloatlingTowerCompletedEvent(k,B,U=null){const F=Object.assign(Object.assign({tower_id:k,floors:B},U),this.getCommonEventDataProperties());Be.track("Floatling Tower Completed",F)}sendFloatlingFloorCreatedEvent(k,B=null){const U=Object.assign(Object.assign({tower_id:k.towerID,floor_id:k.floorID,infinity_floor:k.isInfinityFloor,algorithm:k.isInfinityFloor?k.algorithmType:"NULL"},B),this.getCommonEventDataProperties());Be.track("Floatling Floor Created",U)}sendFloatlingRoomBuiltEvent(k,B=null){const U=Object.assign(Object.assign({tower_id:k.towerID,floor_id:k.floorID,room_id:k.roomID,room_type:k.roomType,room_border:k.roomBorder,decoration1:k.decorations[0],decoration2:k.decorations[1],decoration3:k.decorations[2],decoration4:k.decorations[3],decoration5:k.decorations[4]},B),this.getCommonEventDataProperties());Be.track("Floatling Room Built",U)}sendFloatlingCreatedEvent(k,B,U=null){const F=Object.assign(Object.assign({floatling_type:k,count:B},U),this.getCommonEventDataProperties());Be.track("Floatling Created",F)}}class ae extends it.v{getCurrentQuestInstanceID(){return this._currentQuestData?this._currentQuestData.instanceID:""}getCurrentQuestTransactionID(){return this._currentQuestData?this._currentQuestData.transactionID:""}constructor(k,B,U){super(k,B,U),this._funnelNamesAndStepIDs=[],this._currentQuestData=null,this.towerTownEvents=new ne(this._segment,this._uuidProvider,this._activePlayer),this._currentQuestData={instanceID:"",transactionID:""}}clearPlayerProgressionDataForFunnelName(k){this._funnelNamesAndStepIDs=this._funnelNamesAndStepIDs.filter((B=>B.funnelName!==k))}sendFunnelAdvancedEvent(k,B=null,U=!1){var F;const j=Object.values(se.l).indexOf(k.stepName),$=null===(F=this._funnelNamesAndStepIDs.find((B=>B.funnelName===k.funnelName)))||void 0===F?void 0:F.stepIndex.includes(j);if(!G.Aq$.isDefined($)||!$||U){const U=Object.assign(Object.assign({funnel_name:k.funnelName,funnel_type:k.funnelType,funnel_id:k.funnelId,step_name:k.stepName,step_index:j},B),this.getCommonEventDataProperties());Be.track("Funnel Advanced",U),this.savePlayerProgressionFunnelData(k.funnelName,j)}}sendAfterSchoolWidgetFunnelAdvancedEvent(k){const B=Object.assign({funnel_name:k.funnelName,funnel_type:k.funnelType,funnel_id:k.funnelId,step_name:k.stepName,step_index:k.stepIndex},this.getCommonEventDataProperties());Be.track("Funnel Advanced",B),this.savePlayerProgressionFunnelData(k.funnelName,k.stepIndex)}sendPetHardCurrencyFunnelAdvancedEventIfApplicable(k,B,U){G.Aq$.isDefined(U)&&!Y.q.instance.prodigy.gameContainer.get("5c7-e02d").petAcquisitionCost(U,k)||this.sendFunnelAdvancedEvent({funnelType:"feature",funnelName:"pet_hard_currency",stepName:B,funnelId:k})}savePlayerProgressionFunnelData(k,B){(0,lt.v)(!!this._funnelNamesAndStepIDs,"Segment player progression funnel is undefined");const U=this._funnelNamesAndStepIDs.findIndex((B=>B.funnelName===k));if(U<0){const U={funnelName:k,stepIndex:[B]};this._funnelNamesAndStepIDs.push(U)}else this._funnelNamesAndStepIDs[U].stepIndex.push(B)}sendPlayerProgressionPointsEarnedEvent(k,B,U=null){const F=Object.assign(Object.assign({point_type:k.pointType,point_count:k.pointCount,progression_type:k.progressionType,name:k.creatureName,instance_type:B.instanceType,instance_id:B.instanceID},U),this.getCommonEventDataProperties());Be.track("Player Progression Points Earned",F)}sendPlayerProgressionAdvancedEvent(k,B,U=null){const F=Object.assign(Object.assign({progression_type:k.progressionType,progression_subtype:k.progressionSubType,progression_value:k.progressionNewValue,previous_value:k.progressionPreviousValue,name:k.creatureName,transaction_id:k.transactionId,point_type:null==B?void 0:B.pointType,point_amount:null==B?void 0:B.pointCount},U),this.getCommonEventDataProperties());Be.track("Player Progression Advanced",F)}sendPlayerProgressionRestrictedEvent(k,B,U=null){const F=Object.assign(Object.assign({progression_type:k.progressionType,progression_action:k.progressionAction,progression_value:k.progressionValue,name:k.creatureName,point_type:null==B?void 0:B.pointType,point_amount:null==B?void 0:B.pointCount,currency:k.currencyType,price:k.currencyAmount},U),this.getCommonEventDataProperties());Be.track("Player Progression Restricted",F)}sendQuestProgressionAdvancedEvent(k,B=null){this._currentQuestData={instanceID:`${k.quest_type}-${k.quest_id}`,transactionID:nt.$.generateUID()};const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),{transaction_id:this.getCurrentQuestTransactionID()}),B),this.getCommonEventDataProperties());Be.track("Quest Progression Advanced",U)}sendPetEvolvedEvent(k,B=null){const U=Object.assign(Object.assign({name:k.petName,old_name:k.petOldName,pet_level:k.petLevel,pet_type:k.petType,pet_rank:k.petRank,evolution_source:k.evolutionSource},B),this.getCommonEventDataProperties());Be.track("Pet Evolved",U)}sendPetEvolutionCancelledEvent(k,B=null){const U=Object.assign(Object.assign({name:k.petName,type:k.petElement,pet_level:k.petLevel,pet_rank:k.petRank,evolution_source:k.evolutionSource},B),this.getCommonEventDataProperties());Be.track("Pet Evolution Cancelled",U)}sendGoalProgressUpdatedEvent(k,B=null){const U=Object.assign(Object.assign({goal_name:k.goalName,goal_id:k.goalId,deadline:k.deadline,target_type:k.targetType,goal_progress:k.goalProgress,goal_target:k.goalTarget},B),this.getCommonEventDataProperties());Be.track("Goal Progress Updated",U)}sendFeatureUnlockedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("Feature Unlocked",U)}}var re,oe=U(47632);!function(k){k.Q1="QUESTS_BONFIRE_SPIRE_PULL_LEVER",k.Q2="QUESTS_BONFIRE_SPIRE_PULL_LEVER",k.Q3="QUESTS_BONFIRE_SPIRE_PULL_LEVER",k.Q4="QUESTS_BONFIRE_RETRIEVE_INGREDIENT",k.Q5="QUESTS_BONFIRE_SPIRE_ADD_INGREDIENT",k.Q6="QUESTS_BONFIRE_SPIRE_ATTEND_DINNER",k.Q7="QUESTS_BONFIRE_COLLECT_COOKING_SUPPLIES",k.Q8="QUESTS_BONFIRE_SPIRE_TALK_TO_GUARDS",k.Q9="QUESTS_BONFIRE_SPIRE_SAVE_GATHERERS",k.Q10="QUESTS_BONFIRE_SPIRE_OFFER_DISH",k.Q11="QUESTS_BONFIRE_SPIRE_FIND_KEY",k.Q12="QUESTS_BONFIRE_SPIRE_UNLOCK_CHEST",k.Q13="QUESTS_BONFIRE_SPIRE_DEFEAT_CHEF",k.Q14="QUESTS_BONFIRE_SPIRE_TALK_TO_QUEEN"}(re||(re={}));var he,ce,de,le=U(72326);!function(k){k.Q1="QUESTS_SHIPWRECK_FIND_BREATHING_BUBBLE",k.Q2="QUESTS_SHIPWRECK_FIND_JIM",k.Q3="QUESTS_SHIPWRECK_FIND_MONSTER",k.Q4="QUESTS_SHIPWRECK_ACQUIRE_INK_SAMPLE",k.Q5="QUESTS_SHIPWRECK_CLEAR_INK",k.Q6="QUESTS_SHIPWRECK_FIND_JIM",k.Q7="QUESTS_SHIPWRECK_GET_CAMERA",k.Q8="QUESTS_SHIPWRECK_TAKE_PICTURE",k.Q9="QUESTS_SHIPWRECK_OPEN_DOOR",k.Q10="QUESTS_SHIPWRECK_DEFEAT_MONSTERS",k.Q11="QUESTS_SHIPWRECK_DEFEAT_BOSS"}(he||(he={})),function(k){k.Q1="QUESTS_SHIVERCHILL_CLEAR_FURNACE",k.Q2="QUESTS_SHIVERCHILL_GET_FUEL",k.Q3="QUESTS_SHIVERCHILL_ACTIVATE_FURNACE",k.Q4="QUESTS_SHIVERCHILL_EXPLORE_CAVES",k.Q5="QUESTS_SHIVERCHILL_FIND_SHOVEL",k.Q6="QUESTS_SHIVERCHILL_HELP_MINER",k.Q7="QUESTS_SHIVERCHILL_UNKNOWN",k.Q8="QUESTS_SHIVERCHILL_DEFEAT_MINI_BOSS",k.Q9="QUESTS_SHIVERCHILL_DEFEAT_SPECTERS",k.Q10="QUESTS_SHIVERCHILL_GET_FUEL",k.Q11="QUESTS_SHIVERCHILL_ACTIVATE_FURNACE",k.Q12="QUESTS_SHIVERCHILL_CHECK_THRONE",k.Q13="QUESTS_SHIVERCHILL_COLLECT_CRYSTALS",k.Q14="QUESTS_SHIVERCHILL_DEFEAT_ICE_WORM",k.Q15="QUESTS_SHIVERCHILL_ACTIVATE_FURNACE",k.Q16="QUESTS_SHIVERCHILL_GET_GEM"}(ce||(ce={})),function(k){k.Q1="QUESTS_SKYWATCH_TRIM_VINES",k.Q2="QUESTS_SKYWATCH_GET_DEVICE",k.Q3="QUESTS_SKYWATCH_FIND_BROCCOLINI",k.Q4="QUESTS_SKYWATCH_TRIM_VINES",k.Q5="QUESTS_SKYWATCH_FIND_FACTORY_KEY",k.Q6="QUESTS_SKYWATCH_GET_KEY",k.Q7="QUESTS_SKYWATCH_UPGRADE_VINECERATOR",k.Q8="QUESTS_SKYWATCH_TRIM_VINES",k.Q9="QUESTS_SKYWATCH_TRIM_VINES",k.Q10="QUESTS_SKYWATCH_TRIM_VINES",k.Q11="QUESTS_SKYWATCH_FIND_EUGENE",k.Q12="QUESTS_SKYWATCH_FIND_KEY",k.Q13="QUESTS_SKYWATCH_DEFEAT_BOSS"}(de||(de={}));class ue extends it.v{setup(){super.setup()}get questEventTransaction(){var k;return null!==(k=this._questEventTransaction)&&void 0!==k?k:{flush(){G.VyI.log("Attempted to flush non-existing quest event transaction",G.$bb.Error)},setIndividualData(){}}}beginQuestEventTransaction(){return this._questEventTransaction=this._segment.item.beginSecureItemTransaction(),this._questEventTransaction}sendZoneQuestStartedEvent(k,B){var U,F;const j=this.getQuestStep(k,B);j?null===(F=null===(U=this._segment)||void 0===U?void 0:U.playerProgression)||void 0===F||F.sendQuestProgressionAdvancedEvent({quest_id:String(B),quest_type:"zone_mission",quest_step:j,zone_complete:!1}):G.VyI.log(`No quest analytics key found for zone quest ${k}`,G.$bb.Warning)}sendZoneQuestlineCompleteEvent(k){var B,U,F;const G=null===(B=Y.q.instance.prodigy.world.getZone(k))||void 0===B?void 0:B.finalQuestId;null===(F=null===(U=this._segment)||void 0===U?void 0:U.playerProgression)||void 0===F||F.sendQuestProgressionAdvancedEvent({quest_id:String(G),quest_type:"zone_mission",quest_step:"Quest Complete",zone_complete:!0})}getQuestStep(k,B){switch(k){case Gt.A_.FOREST:case Gt.A_.FORESTHARD:case Gt.A_.FORESTEXPERT:return le.v[`Q${B}`];case Gt.A_.SHIVERCHILL:case Gt.A_.SHIVERCHILLHARD:case Gt.A_.SHIVERCHILLEXPERT:return ce[`Q${B}`];case Gt.A_.BONFIRE:case Gt.A_.BONFIREHARD:case Gt.A_.BONFIREEXPERT:return re[`Q${B}`];case Gt.A_.SHIPWRECK:case Gt.A_.SHIPWRECKHARD:case Gt.A_.SHIPWRECKEXPERT:return he[`Q${B}`];case Gt.A_.SKYWATCH:case Gt.A_.SKYWATCHHARD:case Gt.A_.SKYWATCHEXPERT:return de[`Q${B}`];default:return G.VyI.log(`No quest step found for zone ${k} and task ${B}`,G.$bb.Warning),null}}}var fe=U(74958);class be extends it.v{sendSegmentedOfferAssignedEvent(k,B){var U;Be.track("Segmented Offer Received",Object.assign({event_text:"Segmented Offer Received",event_type:"segmented_offer_received",offer_name:null!==(U=k.campaignId)&&void 0!==U?U:k.id,offer_type:this._activePlayer.isMember()?"upsell":"non_member",offer_segment:JSON.stringify(k.segments[B].featureRequirements),offers_received:this._activePlayer.player.encounters.getResolvedOffers().length},this.getCommonEventDataProperties()))}}class pe{constructor(k,B){this._data={},this._name=k,this._data=B}setData(k){return this._data=Object.assign(Object.assign({},this._data),k),this}send(){(0,lt.v)(!V().some(this._data,V().isNil),`Metric '${this._name}' has null/undefined values for required properties "${V()(this._data).pickBy(V().isNil).keys().value().join('", "')}".`),Be.track(this._name,this._data)}}class ve{constructor(k){this._segment=k}achievementComplete(k){return this.event("Achievement Completed",k)}experimentVariationAssigned(k,B,U,F){const G=Object.assign(Object.assign({experiment_id:k,feature_key:k,experiment_key:B,variation_id:U,user_id:Y.q.instance.prodigy.gameContainer.get("e20-0fb0").getUserID().toString()},F),this._segment.featureCommon.getCommonEventDataProperties());return this.event("Experiment Variation Assigned",H.omitBy(G,H.isNil))}event(k,B){return new pe(k,B)}}class ge extends it.v{constructor(k,B,U){super(k,B,U)}sendStart(){const k=nt.$.generateUID();this._currentPostBattleEvent={id:k,startTime:(0,H.now)()};const B=Object.assign(Object.assign({},this._currentPostBattleEvent),this.getCommonEventDataProperties());Be.track("Post-Battle-Flow-Started",B)}sendEnd(){this._currentPostBattleEvent.endTime=(0,H.now)(),this._currentPostBattleEvent.durationInSeconds=(this._currentPostBattleEvent.endTime-this._currentPostBattleEvent.startTime)/1e3;const k=Object.assign(Object.assign({},this._currentPostBattleEvent),this.getCommonEventDataProperties());Be.track("Post-Battle-Flow-Ended",k)}}var me=U(223);class ye extends it.v{constructor(k,B,U){super(k,B,U),this._funnelQuitPaused=!1;const F=this._activePlayer.player.data.segmentPurchaseFunnel;this._currentPurchaseFunnel="string"==typeof F?{id:F,trigger:void 0,steps:[]}:F}sendFunnelTriggerImpression(k){if(this.shouldSuppressFunnelEvents(k.type,k.category))return;const B=this.generateNewFunnel(k);return Be.track("Game Purchase Funnel Trigger Impression",this.getCommonFunnelEventProperties(B)),B}sendFunnelStart(k,B){this.shouldSuppressFunnelEvents(k.type,k.category)||(Be.track("Game Purchase Funnel Entered",this.getCommonFunnelEventProperties(null!=B?B:this.generateNewFunnel(k))),this.saveFunnelData())}sendFunnelStep(k){this.isFunnelInvalid()||Be.track("Game Purchase Funnel Step Advanced",Object.assign(Object.assign({},this.getCommonFunnelEventProperties(this._currentPurchaseFunnel)),{funnel_step:k,funnel_index:this.setFunnelCurrentStep(k)}))}sendFunnelError(k,B,U){if(this.isFunnelInvalid())return;let F="";switch(typeof U){case"string":F=U;break;case"object":"string"==typeof(null==U?void 0:U.message)&&(F=U.message)}Be.track("Game Purchase Funnel Step Error",Object.assign(Object.assign({},this.getCommonFunnelEventProperties(this._currentPurchaseFunnel)),{funnel_step:k,funnel_index:this.setFunnelCurrentStep(k),error_code:B,error_reason:F}))}sendFunnelQuit(k,B){this.isFunnelInvalid()||this._funnelQuitPaused||(Be.track("Game Purchase Funnel Quit",Object.assign(Object.assign({},this.getCommonFunnelEventProperties(this._currentPurchaseFunnel)),{funnel_step:k,funnel_index:this.setFunnelCurrentStep(k),exit_cause:B})),this.clearFunnelData())}sendFunnelHandoff(k,B){var U,F,G,j;this.isFunnelInvalid()||((0,lt.v)(this._currentPurchaseFunnel,"Funnel should exist if it is valid"),null!==(U=(j=this._currentPurchaseFunnel).purchase)&&void 0!==U||(j.purchase=B),Be.track("Game Purchase Funnel Hand Off",Object.assign(Object.assign({},this.getCommonFunnelEventProperties(this._currentPurchaseFunnel)),{trigger_tier:null===(F=this._currentPurchaseFunnel.purchase)||void 0===F?void 0:F.triggerTier,purchase_order:null===(G=this._currentPurchaseFunnel.purchase)||void 0===G?void 0:G.purchaseOrder,target:k})))}sendFunnelComplete(k){var B,U,F,G,j,$;if(this.detectFunnelCallError(!1))return;const H=this.getCommonEventDataProperties();Be.track("Game Purchase Funnel Complete",{difficulty_tier:H.difficulty_tier,funnel_id:null===(B=this._currentPurchaseFunnel)||void 0===B?void 0:B.id,session_uuid:this._segment.getSessionUUID(),trigger_tier:null!==(U=null==k?void 0:k.triggerTier)&&void 0!==U?U:null===(G=null===(F=this._currentPurchaseFunnel)||void 0===F?void 0:F.purchase)||void 0===G?void 0:G.triggerTier,purchase_order:(null==k?void 0:k.purchaseOrder)&&k.purchaseOrder.length>1?k.purchaseOrder:null===($=null===(j=this._currentPurchaseFunnel)||void 0===j?void 0:j.purchase)||void 0===$?void 0:$.purchaseOrder}),this.clearFunnelData()}clearFunnelData(){this._activePlayer.player.data.segmentPurchaseFunnel=void 0,this._currentPurchaseFunnel=void 0,this._funnelQuitPaused=!1}hasSavedFunnelData(){return!!this._currentPurchaseFunnel}generateNewFunnel(k){var B;return this._currentPurchaseFunnel={id:nt.$.generateUID(),trigger:k,steps:[],impressionId:null!==(B=null==k?void 0:k.impressionId)&&void 0!==B?B:nt.$.generateUID()}}setFunnelCurrentStep(k){(0,lt.v)(this._currentPurchaseFunnel,"Segment purchase funnel is undefined");const B=this._currentPurchaseFunnel.steps,U=B.indexOf(k);return U>=0?B.length=U+1:B.push(k)}getFunnelID(){var k;return null===(k=this._currentPurchaseFunnel)||void 0===k?void 0:k.id}pauseFunnelQuit(k){this._funnelQuitPaused=k}getCommonFunnelEventProperties(k){var B,U,F,G,j,$;return Object.assign(Object.assign({},this.getCommonEventDataProperties()),{funnel_id:null==k?void 0:k.id,trigger:null===(B=null==k?void 0:k.trigger)||void 0===B?void 0:B.type,trigger_category:null===(U=null==k?void 0:k.trigger)||void 0===U?void 0:U.category,trigger_content_type:null===(F=null==k?void 0:k.trigger)||void 0===F?void 0:F.contentType,trigger_content_id:null===(G=null==k?void 0:k.trigger)||void 0===G?void 0:G.contentId,ad_type:null===(j=null==k?void 0:k.trigger)||void 0===j?void 0:j.adType,ad_version:null===($=null==k?void 0:k.trigger)||void 0===$?void 0:$.adVersion,impression_id:null==k?void 0:k.impressionId})}detectFunnelCallError(k=!0){return!(this._currentPurchaseFunnel&&(!k||this._currentPurchaseFunnel.trigger))&&(G.VyI.log("Segment purchase funnel tracking call sent outside of a purchase funnel",G.$bb.Error),!0)}saveFunnelData(){(0,lt.v)(this._currentPurchaseFunnel,"Segment purchase funnel is undefined");const k=this._activePlayer.player;k.data.segmentPurchaseFunnel=this._currentPurchaseFunnel,k.forceSaveCharacter()}shouldSuppressFunnelEvents(k,B){const U=this._activePlayer.player;if(U.isPlayingAtSchool())return!0;switch(k){case"magicoin_currency_button":return!(0,ot.G)(me.l).enabled;case"visited_mythics_pet_book_upgrade":return!1;default:return U.hasMembership()}}isFunnelInvalid(){var k,B,U,F;return this.shouldSuppressFunnelEvents(null===(B=null===(k=this._currentPurchaseFunnel)||void 0===k?void 0:k.trigger)||void 0===B?void 0:B.type,null===(F=null===(U=this._currentPurchaseFunnel)||void 0===U?void 0:U.trigger)||void 0===F?void 0:F.category)||this.detectFunnelCallError()}}var _e=U(71586),Ee=U(13956),we=U(80105);class Te extends it.v{sendServerSessionStartedEvents(){this.sendPetRosterEvent(),this.sendCurrencyEvent()}sendSessionStartedEvent(k=null){var B,U,F;const j=this._playerProvider.player,$=Y.q.instance.prodigy.gameContainer.get("313-bcd5"),H=Y.q.instance.prodigy.gameContainer.get("c47-20b6"),V={clientVersion:Y.q.instance.prodigy.version,device_hardware_type:G.o5U.getDeviceHardwareType(),device_height:H.getDeviceInfoProvider().getScreenHeight(),device_width:H.getDeviceInfoProvider().getScreenWidth(),device_platform:H.getDeviceInfoProvider().getPlatformName(),device_os_version:G.o5U.getOsName(),timezone_offset:_e.R.SERVER_PLAYER_TIMEZONE_OFFSET,geo_country:null===(B=j.geolocationData.country)||void 0===B?void 0:B.name,geo_state:null===(F=null===(U=j.geolocationData.subdivisions)||void 0===U?void 0:U[0])||void 0===F?void 0:F.name,equipped_gear:j.equipment.getData(),pet_slots_used:j.kennel.getNumPets(),is_pwa:$.isPWAInstalled(),is_mobile_app:G.o5U.isMobile(),currency:this.formatCurrencyValues(j),pet_team:this.formatPetTeam(j),device_pixel_ratio:window.devicePixelRatio},W=Object.assign(Object.assign(Object.assign({},V),k),this.getCommonEventDataProperties());Be.track("Session Started",W)}sendPetRosterEvent(){const k=this._playerProvider.player.kennel.getPets(),B=new Set,U=new Set;let F=0;k.forEach((k=>{var j;if(G.Aq$.isDefined(k.ID)){B.add(k.ID);const G=null!==(j=k.mergeRank)&&void 0!==j?j:0;F+=G,G>=1&&U.add(k.ID)}}));const j=Object.assign({roster_size:k.length,roster_size_unique:B.size,roster_merge_rank:F,roster_merge_unique:U.size},this.getCommonEventDataProperties());Be.track("Session Start Pet Roster",j)}sendCurrencyEvent(){var k,B;const U=this._playerProvider.player,F={};U.backpack.getBackpackItemsByType("currency").forEach((k=>{F[k.ID]=U.getCurrencyAmount(k.ID)})),this._secureInventory.getAllOfType("currency").forEach((k=>{F[k.id]=k.quantity})),F[1]=U.getCurrencyAmount(1,"gold");const G=Object.assign({magicoin_balance:null!==(k=F[27])&&void 0!==k?k:0,gold_balance:F[1],titan_shard_balance:null!==(B=F[11])&&void 0!==B?B:0,summary_balance:F},this.getCommonEventDataProperties());Be.track("Session Start Currency",G)}formatCurrencyValues(k){const B=k.backpack.getBackpackItemsByType("currency"),U=[];return B.forEach((k=>{const B=St.t.itemMap[`currency-${k.ID}`].name;U.push({currencyName:B,currencyID:k.ID,currencyValue:k.N})})),U}formatPetTeam(k){let B=k.kennel.petTeam;B=B.filter((k=>null!==k));const U=[];return B.forEach((k=>{"player"!==k.creatureType&&U.push({petID:k.data.ID,creatureType:k.creatureType,level:k.getLevel(),maxHearts:k.getMaxHearts()})})),U}}(0,F.Cg)([(0,Ee.b)("e20-0fb0"),(0,F.Sn)("design:type",X.E)],Te.prototype,"_playerProvider",void 0),(0,F.Cg)([(0,Ee.b)("61f-37d6"),(0,F.Sn)("design:type",we.U)],Te.prototype,"_secureInventory",void 0);class Se extends it.v{getCurrentShopInstanceID(){return this._currentShopData?this._currentShopData.instanceID:""}getCurrentShopTransactionID(){return this._currentShopData?this._currentShopData.transactionID:""}getDynamicStoreSourceId(k){return`shop_v3_${k}`}constructor(k,B,U){super(k,B,U),this._currentShopData=null,this._currentShopData={instanceID:"",transactionID:""}}sendShopPurchaseCompletedEvent(k,B,U,F=!1,G={}){var j,$,H,V,W,q,K;const z=`${k}${B.getName()}`,Y=St.t.getItem(U.getType(),U.getID()),Q=U.getCost()[0];this._currentShopData={instanceID:z,transactionID:nt.$.generateUID()};const X=St.t.getItem(null!==(j=Q.getType())&&void 0!==j?j:"currency",Q.getID()),Z=Object.assign(Object.assign({shop_name:B.getName(),shop_id:z,item_id:U.getID(),item_name:null!==($=null==Y?void 0:Y.name)&&void 0!==$?$:"",item_type:U.getType(),item_unlock_level:null!==(V=null===(H=null==Y?void 0:Y.data)||void 0===H?void 0:H.lockLevel)&&void 0!==V?V:1,currency:null!==(q=null===(W=null==X?void 0:X.data)||void 0===W?void 0:W.name)&&void 0!==q?q:Q.getType(),price:Q.getAmount(),is_member_lock:!!(null===(K=null==Y?void 0:Y.data)||void 0===K?void 0:K.member),is_magicoin_boosted:F,instance_type:tt.N.Interface,instance_id:this._segment.featureCommon.getCurrentInterfaceID(z),transaction_id:this.getCurrentShopTransactionID()},G),this.getCommonEventDataProperties());this.sendShopQuestEvent(Wt.T.PURCHASE_ITEM,Z),Be.track("Shop Purchase Completed",Z)}startDynamicStoreTransaction(k){return this._currentShopData={instanceID:k,transactionID:nt.$.generateUID()},this._currentShopData.transactionID}sendDynamicStorePurchaseCompletedEvent(k){var B;const U=St.t.getItem(k.itemType,k.itemId),F=Object.assign(Object.assign(Object.assign({},this.extractCommonStoreData(k)),{is_member_locked:!!(null===(B=null==U?void 0:U.data)||void 0===B?void 0:B.member),transaction_id:this.getCurrentShopTransactionID()}),this.getCommonEventDataProperties());this.sendShopQuestEvent(Wt.T.PURCHASE_ITEM,k),Be.track("Shop Purchase Completed",F)}sendShopItemViewedEvent(k,B,U,F={}){var G,j,$,H,V;const W=`${k}${B.getName()}`,q=St.t.getItem(U.getType(),U.getID()),K=U.getCost()[0],z=St.t.getItem(null!==(G=K.getType())&&void 0!==G?G:"currency",K.getID()),Y=Object.assign(Object.assign({shop_name:B.getName(),shop_id:W,item_id:U.getID(),item_name:null==q?void 0:q.name,item_type:U.getType(),instance_type:tt.N.Interface,instance_id:this._segment.featureCommon.getCurrentInterfaceID(W),item_unlock_level:null===(j=null==q?void 0:q.data)||void 0===j?void 0:j.lockLevel,is_owned:this._activePlayer.player.backpack.hasItem(U.getType(),U.getID()),currency:null!==(H=null===($=null==z?void 0:z.data)||void 0===$?void 0:$.name)&&void 0!==H?H:K.getType(),price:K.getAmount(),is_member_lock:!!(null===(V=null==q?void 0:q.data)||void 0===V?void 0:V.member)},F),this.getCommonEventDataProperties());Be.track("Shop Item Viewed",Y)}sendDynamicStoreItemViewedEvent(k){const B=Object.assign(Object.assign(Object.assign({},this.extractCommonStoreData(k)),{is_owned:k.isOwned}),this.getCommonEventDataProperties());Be.track("Shop Item Viewed",B)}sendShopPurchaseFailedEvent(k,B,U,F,G={}){var j,$,H,V,W,q;const K=`${k}${B.getName()}`,z=St.t.getItem(U.getType(),U.getID()),Y=U.getCost()[0],Q=St.t.getItem(null!==(j=Y.getType())&&void 0!==j?j:"currency",Y.getID()),X=Object.assign(Object.assign({shop_name:B.getName(),shop_id:K,fail_reason:F,item_id:U.getID(),item_name:null!==($=null==z?void 0:z.name)&&void 0!==$?$:"",item_type:U.getType(),item_unlock_level:null===(H=null==z?void 0:z.data)||void 0===H?void 0:H.lockLevel,is_member_lock:!!(null===(V=null==z?void 0:z.data)||void 0===V?void 0:V.member),currency:null!==(q=null===(W=null==Q?void 0:Q.data)||void 0===W?void 0:W.name)&&void 0!==q?q:Y.getType(),price:Y.getAmount(),funnel_id:this._segment.purchase.getFunnelID(),instance_type:tt.N.Interface,instance_id:this._segment.featureCommon.getCurrentInterfaceID(K)},G),this.getCommonEventDataProperties());Be.track("Shop Purchase Failed",X)}sendDynamicStorePurchaseFailedEvent(k){k.failReason===wt.WE.NotEnoughCurrency&&this._segment.item.sendInsufficientCurrencyEvent(k.cost,{sink_type:k.itemType,sink_id:k.itemId,transaction_id:this._segment.shop.getCurrentShopTransactionID()});const B=Object.assign(Object.assign(Object.assign({},this.extractCommonStoreData(k)),{fail_reason:k.failReason,funnel_id:k.funnelId}),this.getCommonEventDataProperties());Be.track("Shop Purchase Failed",B)}sendShopQuestEvent(k,B){var U,F,j;const $={params:{taskEventType:qt.Z7.Shop,shopID:null!==(U=B.shop_id)&&void 0!==U?U:B.storeKey,shopName:null!==(F=B.shop_name)&&void 0!==F?F:B.storeKey,shopCategory:null!==(j=B.categoryId)&&void 0!==j?j:B.category}};Y.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(k,$).catch(G.RQr.createHandler(`Error sending ${k} event`))}extractCommonStoreData(k){var B,U,F,G,j,$,H,V,W,q;const K=St.t.getItem(k.itemType,k.itemId),z=St.t.getItem(null!==(B=k.cost.type)&&void 0!==B?B:"currency",k.cost.currency);return{shop_name:k.storeKey,shop_id:this.getDynamicStoreSourceId(k.storeKey),category:k.category,is_member_locked:(null!==(F=null===(U=null==K?void 0:K.data)||void 0===U?void 0:U.member)&&void 0!==F?F:0)>0,item_name:null!==(j=null===(G=k.bundleData)||void 0===G?void 0:G.bundleName)&&void 0!==j?j:null!==($=null==K?void 0:K.name)&&void 0!==$?$:"",item_type:k.itemType,item_id:k.itemId,item_unlock_level:null!==(V=null===(H=null==K?void 0:K.data)||void 0===H?void 0:H.lockLevel)&&void 0!==V?V:1,item_cost:k.cost.value,currency:null!==(q=null===(W=null==z?void 0:z.data)||void 0===W?void 0:W.name)&&void 0!==q?q:"",currency_id:k.cost.currency,currency_balance:this._activePlayer.player.getCurrencyAmount(k.cost.currency,k.cost.type),price:k.cost.value,instance_type:tt.N.ShopVisit,instance_id:k.instanceId}}}class Ae extends it.v{sendFriendRequestAcceptedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("Friend Request Accepted",U)}sendFriendRequestRejectedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("Friend Request Rejected",U)}sendFriendRequestSentEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("Friend Request Sent",U)}sendToastNotificationGeneratedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("Toast Notification Generated",U)}sendHouseVisitedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("House Visited",U)}sendDuelRequestSentEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("Duel Request Sent",U)}sendDuelRequestReceivedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("Duel Request Received",U)}sendDuelRequestAnsweredEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("Duel Request Answered",U)}}var Ce=U(77578);class Oe extends it.v{sendLoadingEvent(k,B,U,F){const G=Object.assign(Object.assign({screen_type:B,views:U},F),this.getCommonEventDataProperties());Be.track(k,G)}sendPingEvent(k,B,U,F,G){const j=Object.assign({n_pings:k,frames:B,standardDeviation:U,minimumFPS:F,currentGameState:G},this.getCommonEventDataProperties());Be.track("Technical Ping",j)}}var Ie=U(17642);class De extends it.v{constructor(k,B,U){super(k,B,U),this._funnelNamesAndStepIDs=[]}sendFunnelEvent(k,...B){var U,F;if(this.loadUltimatesFTUEFunnelData(),window.analytics){const j=Object.values(Ie.V).indexOf(k.step),$=null===(U=this._funnelNamesAndStepIDs.find((B=>B.funnelName===k.funnelName)))||void 0===U?void 0:U.stepOrdinalValue;if(!G.Aq$.isDefined($)||j>$){let U=null===(F=this._funnelNamesAndStepIDs.find((B=>B.funnelName===k.funnelName)))||void 0===F?void 0:F.stepIndex;G.Aq$.isDefined(U)?U++:U=1;let $=k.step;B.length>0&&($=ct.w.format($,...B));const H=Object.assign({funnel_name:k.funnelName,funnel_type:k.funnelType,step_index:U,step_name:$},this.getCommonEventDataProperties());Be.track("Funnel Advanced",H),this.saveUltimatesFTUEFunnelData(k.funnelName,U,j)}}}saveUltimatesFTUEFunnelData(k,B,U){(0,lt.v)(!!this._funnelNamesAndStepIDs,"Segment ultimates FTUE funnel is undefined");const F=this._activePlayer.player,G=this._funnelNamesAndStepIDs.findIndex((B=>B.funnelName===k));if(G<0){const G={funnelName:k,stepIndex:B,stepOrdinalValue:U};this._funnelNamesAndStepIDs.push(G),F.data.ultimatesFTUEFunnelData.push(G)}else this._funnelNamesAndStepIDs[G].stepIndex=B,F.data.ultimatesFTUEFunnelData[G].stepIndex=B,this._funnelNamesAndStepIDs[G].stepOrdinalValue=U,F.data.ultimatesFTUEFunnelData[G].stepOrdinalValue=U;F.forceSaveCharacter(),F.saveEnabled=!1}loadUltimatesFTUEFunnelData(){if(this._funnelNamesAndStepIDs.length>0)return;const k=this._activePlayer.player.data.ultimatesFTUEFunnelData;k&&k.length>0?k.forEach((k=>{this._funnelNamesAndStepIDs.push(k)})):this._activePlayer.player.data.ultimatesFTUEFunnelData=[]}}var Re=U(76253);class Pe extends it.v{constructor(){super(...arguments),this._instanceType=tt.N.MembershipVideo,this._instanceId=nt.$.generateUID()}getGenericVideoSegmentData(){return Object.assign({instance_type:this._instanceType,instance_id:this._instanceId,video_id:this._selectedVideoId,video_type:this._videoType,loading_id:this._videoLoadingId},this.getCommonEventDataProperties())}setNetworkTestStartedTimestamp(){this._videoLoadingStartTimeMS=Date.now()}sendVideoLoadingStartedEvent(k,B,U){this._videoLoadingId=nt.$.generateUID(),this._selectedVideoId=k,this._videoType=B,this._instanceType=U,Be.track("Video Loading Started",this.getGenericVideoSegmentData())}sendVideoLoadingCompletedEvent(k){if(this._videoSizeBytes=k,!this._videoLoadingId||!this._selectedVideoId)return void G.VyI.log("VideoSegment: An error occurred while sending video loading completed segment event: Video Loading Completed Event cannot be sent before Video Loading Started Event.",G.$bb.Error);const B=(Date.now()-this._videoLoadingStartTimeMS)/1e3;Be.track("Video Loading Completed",Object.assign(Object.assign({},this.getGenericVideoSegmentData()),{loading_time:B,video_size:this._videoSizeBytes}))}sendVideoPlayedEvent(k){this._videoLoadingId&&this._selectedVideoId?Be.track("Video Played",Object.assign(Object.assign({},this.getGenericVideoSegmentData()),{video_length:k,video_timestamp:0})):G.VyI.log("VideoSegment: An error occurred while sending video played segment event: Video Played Event cannot be sent before Video Loading Started Event.",G.$bb.Error)}sendVideoStoppedEvent(k){this._videoLoadingId&&this._selectedVideoId&&this._videoSizeBytes?Be.track("Video Stopped",Object.assign(Object.assign({},this.getGenericVideoSegmentData()),{video_size:this._videoSizeBytes,video_timestamp:k})):G.VyI.log("VideoSegment: An error occurred while sending video stopped segment event: Video Stopped Event cannot be sent before Video Loading Completed Event.",G.$bb.Error)}sendVideoErrorEvent(k,B,U){this._videoLoadingId&&this._selectedVideoId||(this._videoLoadingId=nt.$.generateUID(),this._selectedVideoId=k),Be.track("Video Error",Object.assign(Object.assign({},this.getGenericVideoSegmentData()),{error_type:B,video_timestamp:null!=U?U:0}))}sendFunnelTriggerImpressionEvent(k){let B;switch(k){case Re.B.PostBattleFlow:B={type:"post-battle-video",category:"battles",contentId:this._segment.postBattleFlow.getBattleId(),adType:st.R.Video};break;case Re.B.FestivalPortal:B={type:"Festival-Portal-Video",category:"festival",contentId:this._segment.festival.getFestivalInstanceName(),adType:st.R.Video,impressionId:this._instanceId}}B?this._purchaseFunnel=this._segment.purchase.sendFunnelTriggerImpression(B):k!==Re.B.WizardBank&&G.VyI.log(`VideoSegment: Unsupported video event type ${k} for sendFunnelTriggerImpressionEvent.`,G.$bb.Warning)}sendFunnelStartEvent(k){var B;const U=Object.assign(Object.assign({},k),{adType:null!==(B=k.adType)&&void 0!==B?B:st.R.Video});this._segment.purchase.sendFunnelStart(U,this._purchaseFunnel)}sendInterfaceOpenEvent(k,B,U=""){var F;const j=et.Wm.VideoPlayer;let $,H={};switch(k){case Re.B.PostBattleFlow:$={interfaceType:j,instanceType:B,interfaceName:J.B.PostBattleVideo,originType:et.$N.PostBattle,originID:this._segment.postBattleFlow.getBattleId()},H={instance_id:this._instanceId};break;case Re.B.FestivalPortal:$={interfaceType:j,instanceType:tt.N.UI,interfaceName:J.B.FestivalPortalVideo,originType:et.$N.ButtonClick,originID:U};break;case Re.B.WizardBank:$={interfaceType:j,instanceType:B,interfaceName:J.B.WizardBank,originType:et.$N.WizardBank};break;case Re.B.WizardCostumes:$={interfaceType:j,instanceType:B,interfaceName:J.B.WizardCostumesMenu,originType:et.$N.WizardCostumes};break;case Re.B.MemberLockedRifts:$={interfaceType:j,instanceType:B,interfaceName:J.B.RiftsPortalVideo,originType:et.$N.AutoSurfaced};break;case Re.B.MemberLockedRiftsPlay:$={interfaceType:j,instanceType:B,interfaceName:J.B.RiftsPortalVideoWelcome,originType:et.$N.AutoSurfaced}}$?this._segment.featureCommon.sendInterfaceEvent($,H):G.VyI.log(`VideoSegment: Unsupported video event type ${k} for sendInterfaceOpenEvent.`,G.$bb.Warning),k===Re.B.FestivalPortal&&(this._instanceId=null!==(F=this._segment.featureCommon.getInstanceId(J.B.FestivalPortalVideo))&&void 0!==F?F:this._instanceId)}}const Me=["Restrictions screen opened","White Glove Service screen opened","Noot explains free section","Noot explains paid section","Player uses White Glove Service","Restricted battle unlocked","Restricted battle started"];class Ne extends it.v{beginTransaction(){return this._segment.item.beginSecureItemTransaction()}setCurrentRestrictionData(k){this._currentRestrictionData=k}sendHelperScreenOpenEvent(k,B,U=!1){const F={interfaceName:`${J.B.WhiteGloveScreen}_${k}`,interfaceType:et.Wm.Modal,originType:et.$N.RestrictedBattle,instanceType:U?tt.N.ElderWhiteGloveOffer:tt.N.WhiteGloveOffer},G=this._segment.gameWorld.getCurrentInstanceTypeAndID(tt.N.OpenWorld),j={item_list:Object.assign({restrictions:this._currentRestrictionData},B),map_entered_instance_type:G.instance_type,map_entered_instance_id:G.instance_id};this._segment.featureCommon.sendInterfaceEvent(F,j),this._helperScreenInstanceId=this._segment.featureCommon.getCurrentInterfaceID(F.interfaceName)}sendBundlePurchaseEvent(k,B,U,F,G){var j,$;const H=nt.$.generateUID(),V={pets:U.map((k=>{var B,U,F,G;const j=St.t.getItem("pet",k);return{id:k,name:null!==(U=null===(B=null==j?void 0:j.data)||void 0===B?void 0:B.name)&&void 0!==U?U:"unknown",element:null!==(G=null===(F=null==j?void 0:j.data)||void 0===F?void 0:F.element)&&void 0!==G?G:"unknown"}}))},W=St.t.getItem("currency",F);return Be.track("White Glove Bundle Purchased",Object.assign({offer_type:0===G?et.$N.ElderPlayerTopUp:et.$N.RestrictedBattle,offer_id:this._helperScreenInstanceId,trigger_id:k,bundle_name:B,bundle_contents:V,transaction_id:H,currency_name:null!==($=null===(j=null==W?void 0:W.data)||void 0===j?void 0:j.name)&&void 0!==$?$:"unknown",currency_id:F,cost:G},this.getCommonEventDataProperties())),{offerId:this._helperScreenInstanceId,transactionId:H}}sendRestrictionFTUEEvent(k){if(!this._ftueFunnelId)return;const B=Object.assign({funnel_name:"restrictions_ftue",funnel_type:"tutorial",step_index:Me.indexOf(k)+1,step_name:k,funnel_id:this._ftueFunnelId},this.getCommonEventDataProperties());Be.track("Funnel Advanced",B)}initFTUEFunnelId(){return this._ftueFunnelId=nt.$.generateUID(),this._ftueFunnelId}clearFTUEFunnelId(){this._ftueFunnelId=void 0}}class xe extends it.v{sendOpenMailEvent(k,B,U){Be.track("Mail Opened",Object.assign({mail_id:k,is_unread:B,attachments:U},this.getCommonEventDataProperties()))}sendOpenEpicSelectorEvent(k){this._segment.featureCommon.sendInterfaceEvent({interfaceName:J.B.EpicSelection,interfaceType:et.Wm.DialogBox,originType:et.$N.Mail,originID:k.toString(),instanceType:tt.N.Interface})}sendClosedEpicSelectorEvent(k,B){let U;const F=[];k.forEach((k=>{const G=St.t.getItem("pet",k);U=G.ID===B?G.name:U,F.push(G.name)})),this._segment.featureCommon.sendInterfaceEvent({interfaceName:J.B.EpicSelection,interfaceType:et.Wm.DialogBox,instanceType:tt.N.Interface,closeMethod:et.Lv.Done},{selection_options:F,selection:U})}}var Le,ke;!function(k){k.MembershipBundleModalInstanceId="MEMBERSHIP_BUNDLE_MODAL_INSTANCE_ID"}(ke||(ke={}));let Be=Le=class{static track(k,B,U,F){var $,H,V,W;try{const W="analyticsEventBlockList",q=null!==(H=null===($=Y.q.instance.prodigy.gameContainer.get("80c-6fa4"))||void 0===$?void 0:$.getValue(W,[]))&&void 0!==H?H:[];if(q.includes(k)||q.some((U=>"object"==typeof U&&Object.keys(U).every((F=>"event"===F&&U[F]===k||(null==B?void 0:B[F])===U[F])))))return G.VyI.log(`[Analytics] Event '${k}' was blocked to prevent overages. Remove this event from the "analyticsEventBlockList" feature flag if you need to track it.`,G.$bb.Verbose),void(null==F||F());null===(V=window.analytics)||void 0===V||V.track(k,B,U,F),j.addBreadcrumb({category:"Segment",data:Object.assign({event:k},B)})}catch(e){G.RQr.logError(e,`An error occurred while tracking an event, ${k}`),null===(W=window.analytics)||void 0===W||W.track(k,B,U,F)}}constructor(k,B,U,F){this.segmentDataCache={},this._uuidProvider=k,this._activePlayer=B,this._deviceInfoProvider=U,this._geolocationService=F,this.featureCommon=new kt(this,this._uuidProvider,this._activePlayer),this.academyTowers=new bt(this,this._uuidProvider,this._activePlayer),this.battle=new mt(this,this._uuidProvider,this._activePlayer),this.battleRevamp=new gt.z(this,this._uuidProvider,this._activePlayer),this.duelsStadium=new Dt(this,this._uuidProvider,this._activePlayer),this.yourMail=new xe(this,this._uuidProvider,this._activePlayer),this.shop=new Se(this,this._uuidProvider,this._activePlayer),this.container=new Tt(this,this._uuidProvider,this._activePlayer),this.quests=new ue(this,this._uuidProvider,this._activePlayer),this.ultimatesFTUE=new De(this,this._uuidProvider,this._activePlayer),this.funnel=new Ut(this,this._uuidProvider,this._activePlayer),this.registerFunnelLoginSteps(),this.item=new Kt(this,this._uuidProvider,this._activePlayer),this.qrCode=new oe.s(this,this._uuidProvider,this._activePlayer),this.consent=new Et(this,this._uuidProvider,this._activePlayer),this.create=new ve(this),this.playerProgression=new ae(this,this._uuidProvider,this._activePlayer),this.economy=new Rt(this,this._uuidProvider,this._activePlayer),this.playerMovementAndDiscovery=new ie(this,this._uuidProvider,this._activePlayer),this.playerIdentityAvatar=new Jt(this,this._uuidProvider,this._activePlayer),this.gameWorld=new Vt(this,this._uuidProvider,this._activePlayer),this.social=new Ae(this,this._uuidProvider,this._activePlayer),this.connection=new _t(this,this._uuidProvider,this._activePlayer),this.technical=new Oe(this,this._uuidProvider,this._activePlayer),this.purchase=new ye(this,this._uuidProvider,this._activePlayer),this.legacyPostBattleFlow=new ge(this,this._uuidProvider,this._activePlayer),this.postBattleFlow=new at(this,this._uuidProvider,this._activePlayer),this.battlePass=new vt(this,this._uuidProvider,this._activePlayer),this.festival=new Bt.e(this,this._uuidProvider,this._activePlayer),this.conversionJar=new Ct(this,this._uuidProvider,this._activePlayer),this.rifts=new fe.Aj(this,this._uuidProvider,this._activePlayer),this.segmentedOffers=new be(this,this._uuidProvider,this._activePlayer),this.session=new Te(this,this._uuidProvider,this._activePlayer),this.statusEffects=new Ce.e(this,this._uuidProvider,this._activePlayer),this.lootDash=new Xt(this,this._uuidProvider,this._activePlayer),this.educationData=new Mt(this,this._uuidProvider,this._activePlayer),this.petMerge=new Zt.nu(this,this._uuidProvider,this._activePlayer),this.whiteGlove=new Ne(this,this._uuidProvider,this._activePlayer),this.videos=new Pe(this,this._uuidProvider,this._activePlayer)}getSessionUUID(){return this._uuidProvider.getUUID()}identify(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U,F;if(!window.analytics)return void G.VyI.log("window.analytics is undefined",G.$bb.Warning);const[,j]=yield this._geolocationService.getData(),$={device_platform:this._deviceInfoProvider.getPlatformName(),device_width:this._deviceInfoProvider.getScreenWidth(),device_height:this._deviceInfoProvider.getScreenHeight(),device_model:G.o5U.getDeviceModel(),device_hardware_type:G.o5U.getDeviceHardwareType(),grade:this._activePlayer.player.educationData.chosenGrade,level:this._activePlayer.getLevel(),curriculum_id:this._activePlayer.player.curriculumTreeID,client_version:Q.s.get("GameConstants.Build.VERSION"),is_member:this._activePlayer.player.hasMembership(),parent_ids:null===(k=this._activePlayer.player.playerParents)||void 0===k?void 0:k.map((k=>k.id)),teacher_ids:null===(B=this._activePlayer.player.playerTeachers)||void 0===B?void 0:B.map((k=>k.id)),register_date:Math.floor((null===(U=this._activePlayer.player.registerDate)||void 0===U?void 0:U.getTime())/1e3),country:null===(F=null==j?void 0:j.country)||void 0===F?void 0:F.name,state:H.get(j,"subdivisions[0].name")};window.analytics.identify(this._activePlayer.getUserID().toString(),$)}))}sendCustomEvent(k,B={}){Le.track(k,Object.assign(Object.assign({},this.featureCommon.getCommonEventDataProperties()),B))}getDeviceInfoProvider(){return this._deviceInfoProvider}registerFunnelLoginSteps(){this.funnel.registerLoginStep({condition:()=>(0,ot.G)(W.m).enabled,funnelName:Ft.F.ArcadiaLink,funnelType:"feature",stepName:Nt.l.FirstEligible,stepIndex:Nt.T.FirstEligible}),this.funnel.registerLoginStep({condition:()=>(0,ot.G)(z.q).enabled,funnelName:Ft.F.Costumes,funnelType:"feature",stepName:xt.j.FirstLogin,stepIndex:xt.t.FirstLogin}),this.funnel.registerLoginStep({condition:()=>(0,ot.G)(q.s).enabled,funnelName:Ft.F.MagicoinBattleRewardsIntro,funnelType:"feature",stepName:K.T.FeatureUnlocked,stepIndex:K.h.FeatureUnlocked})}};Be=Le=(0,F.Cg)([(0,$.injectable)(),(0,F.Qj)(0,(0,$.inject)("2e6-0f71")),(0,F.Qj)(1,(0,$.inject)("e20-0fb0")),(0,F.Qj)(2,(0,$.inject)("880-55b2")),(0,F.Qj)(3,(0,$.inject)("fab-547a")),(0,F.Sn)("design:paramtypes",[rt.H,X.E,Object,Object])],Be)},84786:(k,B,U)=>{"use strict";U.d(B,{S:()=>F,k:()=>H});var F,G=U(8674),j=U(62459),$=U(99246);!function(k){k.None="",k.Zone="zone",k.Map="map",k.Battle="battle"}(F||(F={}));let H=class extends j.uAl{constructor(){super(...arguments),this._defaultTriggerData=F.None,this._propertiesProviders=[],this._customPropertiesProviders=[]}getPropertiesObject(){let k={};if(this._propertiesProviders.length>0)for(const B of this._propertiesProviders)k=Object.assign(Object.assign({},k),B.getPropertiesObject());return k}getCustomPropertiesObject(){let k={};if(this._customPropertiesProviders.length>0)for(const B of this._customPropertiesProviders)k=Object.assign(Object.assign({},k),B.getPropertiesObject());return k}};(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",Function)],H.prototype,"_segment",void 0),(0,G.Cg)([(0,j.gfw)(F),(0,G.Sn)("design:type",String)],H.prototype,"_defaultTriggerData",void 0),(0,G.Cg)([(0,j.MnK)($.I),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],H.prototype,"_propertiesProviders",void 0),(0,G.Cg)([(0,j.MnK)($.I),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],H.prototype,"_customPropertiesProviders",void 0),H=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsBase (abstract)")],H)},70548:(k,B,U)=>{"use strict";U.d(B,{S:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(84786);let H=class extends $.k{sendInterfaceEvent(){this._segment.featureCommon.sendInterfaceEvent(this.getPropertiesObject())}};H=(0,F.Cg)([(0,G.EVk)("SegmentAnalyticsUiInterface",j.Y.analytics)],H)},7910:(k,B,U)=>{"use strict";U.d(B,{a:()=>K});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(21097),V=U(23283),W=U(65050),q=U(84786);let K=class extends q.k{constructor(){super(...arguments),this.wheelType=V.U.LuckyLoot,this.failedReason=H.WE.MemberLocked,this.instanceType=W.N.EndOfBattle}sendPrizeWheelSpinFailedEvent(){const k=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let B;this.instanceId&&(B={instance_id:this.instanceId}),k.hasMembership()||this._segment.economy.sendPrizeWheelSpinFailedEvent(this.wheelType,this.failedReason,this.instanceType,B)}sendPrizeWheelSpunEvent(){let k;this.instanceId&&(k={instance_id:this.instanceId}),this._segment.economy.sendPrizeWheelSpunEvent(this.wheelType,this.instanceType,k)}};(0,F.Cg)([(0,G.gfw)(V.U),(0,F.Sn)("design:type",String)],K.prototype,"wheelType",void 0),(0,F.Cg)([(0,G.gfw)(H.WE),(0,F.Sn)("design:type",String)],K.prototype,"failedReason",void 0),(0,F.Cg)([(0,G.gfw)(W.N),(0,F.Sn)("design:type",String)],K.prototype,"instanceType",void 0),K=(0,F.Cg)([(0,G.EVk)("SegmentAnalyticsWheel",$.Y.analytics)],K)},99246:(k,B,U)=>{"use strict";U.d(B,{I:()=>j});var F=U(8674),G=U(62459);let j=class extends G.uAl{getPropertiesObject(){return{}}};j=(0,F.Cg)([(0,G.EVk)("SegmentPropertiesObjectProvider (abstract)")],j)},18206:(k,B,U)=>{"use strict";U.d(B,{y:()=>V});var F=U(8674),G=U(62459),j=U(28152),$=U(41674),H=U(99246);let V=class extends H.I{getPropertiesObject(){const k={interfaceName:this.interfaceName,interfaceType:this._interfaceType,originType:this.originType===$.$N.None?void 0:this.originType,originID:this.originID,instanceType:this._instanceType};return G.Aq$.isDefined(this._closeMethod)&&this._closeMethod!==$.Lv.None&&(k.closeMethod=this._closeMethod),k}setOriginID(k){this.originID=k}setInterfaceName(k){this.interfaceName=k}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],V.prototype,"interfaceName",void 0),(0,F.Cg)([(0,G.gfw)($.Wm),(0,F.Sn)("design:type",String)],V.prototype,"_interfaceType",void 0),(0,F.Cg)([(0,G.gfw)($.Lv),(0,F.Sn)("design:type",String)],V.prototype,"_closeMethod",void 0),(0,F.Cg)([(0,G.gfw)($.$N),(0,F.Sn)("design:type",String)],V.prototype,"originType",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],V.prototype,"originID",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],V.prototype,"_instanceType",void 0),V=(0,F.Cg)([(0,G.EVk)("SegmentUiInterfacePropertiesProvider",j.Y.analytics)],V)},77578:(k,B,U)=>{"use strict";U.d(B,{K:()=>F,e:()=>q});var F,G=U(90633),j=U(35120),$=U(63693),H=U(25089),V=U(67665);!function(k){k.StatusEffectFTUEDialogueStarted="Theo's dialogue started",k.StatusEffectFTUEBattleStarted="Spell effects tutorial battle started",k.StatusEffectFTUEBattleCompleted="Spell effects tutorial battle completed",k.StatusEffectFTUECompleted="Spell effects tutorial finished",k.StatusEffectFirstCast="User cast a spell with effect in battle"}(F||(F={}));const W=[F.StatusEffectFTUEDialogueStarted,F.StatusEffectFTUEBattleStarted,F.StatusEffectFTUEBattleCompleted,F.StatusEffectFTUECompleted,F.StatusEffectFirstCast];class q extends H.v{sendStatusEffectFtueEvent(k){const B=Object.assign({funnel_name:"status_effects",funnel_type:"feature",step_index:W.indexOf(k)+1,step_name:k},this.getCommonEventDataProperties());V.Y.track("Funnel Advanced",B)}handleSpellCastWithStatusEffect(k){if(k!==$.B1.Player)return;const B=j.q.instance.prodigy.breadcrumbManager,U=B.isBreadcrumbComplete(G.B.FEATURE_STATUS_EFFECTS,G.B.BREADCRUMB_STATUS_EFFECTS_FTUE_COMPLETED),H=B.isBreadcrumbComplete(G.B.FEATURE_STATUS_EFFECTS,G.B.BREADCRUMB_STATUS_EFFECT_CAST_IN_BATTLE);U&&!H&&(B.completeBreadcrumb(G.B.FEATURE_STATUS_EFFECTS,G.B.BREADCRUMB_STATUS_EFFECT_CAST_IN_BATTLE),this.sendStatusEffectFtueEvent(F.StatusEffectFirstCast))}}},15485:(k,B,U)=>{"use strict";var F;U.d(B,{k:()=>F}),function(k){k.AccountDeletionLink="accountDeletionLink-button",k.AddToTeam="addToTeam-button",k.AttachParentWw="attachAParentWw-button",k.Back="back-button",k.Backpack="backpack-button",k.BackpackCostumesSlot="backpackCostumesSlot-button",k.BecomeAMember="becomeAMember-button",k.Battle="battle-button",k.BattlePassClaimInfiniteTierButton="treasureTrackClaimInfiniteTierReward-button",k.BattlePassClaimQuestButton="treasureTrackClaimQuest-button",k.BattlePassClaimRewardButton="treasureTrackClaimReward-button",k.BattlePassHudButton="treasureTrackHud-button",k.BattlePassQuestGoButton="treasureTrackQuestGo-button",k.BattlePassToasterButton="treasureTrackToaster-button",k.BattlePassWizardWatchButton="treasureTrackWwLaunch",k.BonusStars="bonusStars-button",k.BuyMemberItem="buyMemberItem-button",k.BuyItem="buyItem-button",k.CostumesHowItWorks="costumesHowItWorks-button",k.CostumesHudButton="costumesHud-button",k.CostumesItemCardButton="costumesItemCard-button",k.Continue="continue-button",k.ChangePasswordLink="chnagePasswordLink-button",k.Chat="chat-button",k.CheckItOut="checkItOut-button",k.Close="close-button",k.CrystalCaverns="crystalCaverns-button",k.Delete="delete-button",k.Download="download-button",k.DynamicStoreModalButton="dynamicStoreModal-button",k.EquipItem="equipItem-button",k.EquipMemberItem="equipMemberItem-button",k.EvolveNow="evolveNow-button",k.Feed="feed-button",k.Festival="festival-button",k.Friend="friend-button",k.GoBattle="goBattle-button",k.Item="item-button",k.Later="later-button",k.Leaderboard="leaderboard-button",k.Leave="leave-button",k.LeftArrow="leftArrow-button",k.Like="like-button",k.LinkParent="linkParentSettings-button",k.LootDashHudButton="wizardDashHud-button",k.LootDashGetMoreRevivesButton="lootDashGetMoreRevives-button",k.LootDashWizardWatchButton="wizardDashWizardWatch-button",k.LostPetsButton="lost_pets_button",k.Mail="mail-button",k.Map="map-button",k.MemberHudButton="member-button",k.MembershipUpgradeOkay="membership-upgrade-okay",k.Next="next-button",k.No="no-button",k.NotNow="notNow-button",k.Okay="okay-button",k.Options="options-button",k.ParentGoalTracker="parent-goal-tracker-button",k.ParentGoalTrackerCollectReward="parent-goal-hud-collect-reward",k.ParentGoalTrackerInProgress="parent-goal-hud-goal-status",k.ParentGoalTrackerNeedReward="parent-goal-hud-need-reward",k.ParentGoalTrackerNoGoal="parent-goal-hud-need-goal",k.ParentGoalTrackerNotAttached="parent-goal-hud-attach-parent",k.UnifiedStoreToDynamicStore="dynamic_store_unified_store",k.PetLevelUp="pets-level-up-button",k.PetRescuePayMagicoin="pet_rescue_pay_magicoin",k.Pets="pets-button",k.Play="play-button",k.PostBattleFlowMagicoinCollectAllRewards="postBattleFlowMagicoinCollectAllRewards-button",k.PostBattleFlowMagicoinGetFreeRewards="postBattleFlowMagicoinGetFreeRewards-button",k.PostBattleFlowMagicoinGetMemberRewards="postBattleFlowMagicoinGetMemberRewards-button",k.Rescue="rescue-button",k.RemoveFromTeam="removeFromTeam-button",k.RestrictionsPurchase="restrictionsPurchase-button",k.RevealCredentials="revealCredentialsParentAttach-button",k.RiftsMenuStoreButton="riftsMenuStore-button",k.RightArrow="rightArrow-button",k.SaveName="saveName-button",k.SeasonRewards="seasonRewards-button",k.Share="share-button",k.Shop="shop-button",k.Shuffle="shuffle-button",k.SignUpForMembership="signUpForMembership-button",k.Social="social-button",k.StateChallengesTab="state-challenges-tab",k.StateChallengesViewMilestonesButton="view_milestone_rewards-button",k.StateChallengesCollectMilestonesButton="collect_milestone_rewards-button",k.Stay="stay-button",k.Stop="stop-button",k.Titan="titan-button",k.TryABattle="tryABattle-button",k.UnifiedStore="unifiedStore-button",k.UnifiedStoreCardButton="unifiedStoreCard-button",k.Use="use-button",k.ViewMoreStores="viewMoreStores-button",k.WorldPlayerPortrait="worldPlayerPortrait-button",k.WizardBackpackButton="wizard-backpack-button",k.WizardWatchButton="wizard-watch-button",k.X="x-button",k.Yes="yes-button",k.ZoneGoalsCta="zoneGoalsCta-button"}(F||(F={}))},46784:(k,B,U)=>{"use strict";var F;U.d(B,{B:()=>F}),function(k){k.AfterSchoolWidget="after_school_widget",k.ArcadiaConfirmationModal="arcadia_confirmation_modal",k.Backpack="backpack",k.BattlePassComplexFtueModal="treasure_track_complex_ftue_modal",k.BattlePassFtue="treasure_track_ftue",k.BattlePassMenu="treasure_track_main",k.BattlePassMembershipModal="treasure_track_membership_modal",k.BattlePassUltimateModal="treasure_track_ultimate_prompt",k.BattlePassHomeScreen="treasure_track_home_screen",k.BattlePassQuestsScreen="treasure_track_quests_tab",k.BattlePassRewardsScreen="treasure_track_rewards_tab",k.BattlePassSimpleFtueModal="treasure_track_simple_ftue_modal",k.BattlePetInfoWidget="battle_pet_info_widget",k.BattlePotionSelect="battle_potion_select",k.Chat="chat",k.Dialogue="dialogue",k.DuelsStadium="duels_stadium",k.DynamicPromptMembershipInfoAd="dynamic_prompt_membership_info_ad",k.DynamicStoreBundle="dynamic_store_bundle",k.DynamicStoreModal="dynamic_store_modal",k.EnterGoldRiftModal="enter_gold_rift_modal",k.EpicSelection="epic_selection",k.FeaturedPetModal="featured_spawn_modal",k.FestivalProgressionWindow="festival_progression_window",k.FestivalAboutWindow="festival_about_window",k.FestivalCurrencyDrainPopup="festival_currency_drain_popup",k.FestivalLaunchPopup="festival_zone_entry_popup_lamplight",k.FestivalHudLaunchPopup="festival_hud_launch_popup_lamplight",k.FestivalPortalVideo="festival_portal_video",k.FriendsList="friends_list",k.HiArenaHub="hi_arena_hub",k.HUD="HUD",k.HUDMenuBar="hud_menu_bar",k.ItemInfo="item_info",k.KeystonePopup="keystone_popup",k.KidsMlpModalNonMember="kids_mlp_modal",k.KidsMlpModalLevelUpMember="kids_mlp_upgrade_ultimate_modal",k.KidsMlpModalUltimateMathMember="kids_mlp_upgrade_ultimate_bundle_modal",k.KidsMlpUpgradeComplete="kids_mlp_upgrade_congratulations",k.KidsMlpUpgradeFail="kids_mlp_upgrade_fail",k.LeaveGameDialog="leave_game_dialog",k.LootDashMenu="wizard_dash_lobby",k.LootDashTransportModal="wizard_dash_assignment_transport_modal",k.LostPetsMain="lost_pets_main",k.MemberAd="member_ad",k.MembershipInfoAd="membership_info_ad",k.MembershipParentAd="membership_parent_ad",k.MembershipStaticAd="membership_static_ad",k.MembershipStaticAdCarousel="membership_static_ad_carousel",k.MembershipYouTubeAd="membership_youTube_ad",k.NicknamerMenu="nicknamer_menu",k.NewOtherEvolutions="NEW_other_evolutions",k.OptionsMenu="options_menu",k.OtpAd="otp_modal",k.Overworld="overworld",k.ParentAttach="parent_attachment_qr",k.ParentGoalAttachModal="parent_goal_attach_modal",k.ParentGoalsTracker="parent_goals_tracker",k.PedestalsClicked="pedestals_clicked",k.PetMergePowerUpModal="pet_power_up_window",k.PetMergePowerUpWarning="pet_power_up_warning",k.PetStackDrawer="pet_stack_drawer",k.PetsWindow="pets_window",k.PetRescueAttempt="pet_rescue_attempt",k.PetRescueWindow="pet_rescue_window",k.PlayerCard="player_card",k.PlayerGoals="player_goals",k.PostBattleFlow="post_battle",k.PostBattleFlowMagicoinRewardDisplay="post_battle_magicoin_reward_display",k.PostBattleFlowMemberJarRewardDisplay="post_battle_member_jar_reward_display",k.PostBattleFlowStandardRewardDisplay="post_battle_standard_reward_display",k.PostBattleVideo="post_battle_video",k.PreBattleScreen="pre_battle_screen",k.ProdigyChallenge="prodigy_challenge",k.ProdigyChallengeClassCode="prodigy_challenge_class_code",k.ProdigyChallengeMilestoneRewards="prodigy_challenge_milestone_rewards",k.ProdigyChallengeResult="prodigy_challenge_result",k.PumpkinfestAboutWindow="pumpkinfest_about_window",k.RestrictedBattleCallbackScreen="restricted_battle_call_back_screen",k.ResultsMenu="results_menu",k.RiftsCycleModal="rifts_cycle_modal",k.RiftsPortal1Menu="rifts_portal_1_menu",k.RiftsPortal2Menu="rifts_portal_2_menu",k.RiftsPortal3Menu="rifts_portal_3_menu",k.RiftsPortalVideo="member_locked_rift_video_gate",k.RiftsPortalVideoWelcome="member_locked_rift_welcome_video",k.Shiverchill="shiverchill",k.SirVey="sir_vey",k.Social="social",k.SpringfestAboutWindow="springfest_about_window",k.SpringfestGrottoSelectModal="springfest_grotto_select_modal",k.StadiumRoomsMenu="stadium_rooms_menu",k.StoreBundlesPopup="store_bundles_popup",k.StarlightAboutWindow="starlight_about_window",k.SummerfestAboutWindow="summerfest_about_window",k.TitanProgressionWindow="titan_progression_window",k.UnifiedStore="unified_store_main",k.UnifiedStoreBase="unified_store",k.UniversalTeamSelection="universal_team_screen",k.WhiteGloveScreen="white_glove",k.WinterfestAboutWindow="winterfest_about_window",k.WizardBank="wb_modal",k.WizardCostumesMenu="costumes_menu",k.WizardWatch="wizard_watch",k.WorldMap="world_map",k.YourMail="your_mail",k.YourTeam="your_team",k.ZoneGoals="zone_goals"}(F||(F={}))},12676:(k,B,U)=>{"use strict";var F;U.d(B,{N:()=>F}),function(k){k.Athena="Athena",k.Boardy="Boardy",k.Eve="Eve",k.Harvey="Harvey",k.Merchant="Merchant",k.Noot="Noot",k.Scoog="Scoog",k.UltimatesPlinth="ultimates_plinth",k.Ulla="Ulla"}(F||(F={}))},70703:(k,B,U)=>{"use strict";U.d(B,{x:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(90351);let V=class extends G.uAl{constructor(){super(...arguments),this._fadeDurationMS=500,this._useComponentAlpha=!1,this._startDelay=0,this._repeatCount=0,this._yoyoAlpha=!1,this._autoStart=!1,this.onComplete=new G.HN0,this._easingType=H.i.LinearNone}create(){super.create(),this._autoStart&&this.startTween()}destroy(){this._activeTween&&(j.q.instance.game.tweens.remove(this._activeTween),this._activeTween=null),this.onComplete.dispose(),super.destroy()}startTween(k=this._targetAlpha,B=(this._useComponentAlpha?this.targetComponent.getRootContainer().alpha:this._initialAlpha),U=this._startDelay,F=this._fadeDurationMS){{const G={value:B},$=this.targetComponent.getRootContainer();$?($.alpha=B,this._activeTween=j.q.instance.game.add.tween(G,this).to({value:k},F,H.K.getEasingFunctionFromEnum(this._easingType),!0,U,this._repeatCount,this._yoyoAlpha).onUpdateCallback((()=>{$.alpha=G.value})),this._activeTween.onTweenComplete.addOnce((()=>{j.q.instance.game.tweens.remove(this._activeTween),this._activeTween=null,$.alpha=k,this.onComplete.dispatch()}))):this.targetComponent.onRootContainerSet.addOnce(this.startTween,this)}}stopTween(){this._activeTween&&!this._activeTween.isDestroyed&&this._activeTween.stop(!0)}};(0,F.Cg)([(0,G.MnK)(G.y4o),(0,F.Sn)("design:type",G.y4o)],V.prototype,"targetComponent",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_fadeDurationMS",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_useComponentAlpha",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_initialAlpha",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_targetAlpha",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_startDelay",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_repeatCount",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_yoyoAlpha",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_autoStart",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onComplete",void 0),(0,F.Cg)([(0,G.gfw)(H.i),(0,F.Sn)("design:type",String)],V.prototype,"_easingType",void 0),V=(0,F.Cg)([(0,G.EVk)("AlphaFadeTween",$.Y.animation)],V)},66998:(k,B,U)=>{"use strict";U.d(B,{s:()=>V});var F,G,j=U(8674),$=U(62459),H=U(28152);!function(k){k.RunningInTween="RunningInTween",k.RunningOutTween="RunningOutTween",k.IdleAtEndOfInTween="IdleAtEndOfInTween",k.IdleAtEndOfOutTween="IdleAtEndOfOutTween"}(F||(F={})),function(k){k.DoNothing="DoNothing",k.PlayInTween="PlayInTween",k.PlayOutTween="PlayOutTween",k.GoToEndOfInTween="GoToEndOfInTween",k.GoToEndOfOutTween="GoToEndOfOutTween"}(G||(G={}));let V=class extends $.uAl{constructor(){super(...arguments),this._onCreate=G.DoNothing}create(){super.create(),this._inTween.onTweenComplete.add((()=>this._currentState=F.IdleAtEndOfInTween)),this._outTween.onTweenComplete.add((()=>this._currentState=F.IdleAtEndOfOutTween)),this.runAction(this._onCreate)}runAction(k){if(k!==G.DoNothing)switch(k){case G.GoToEndOfInTween:this.runInTween(!0);break;case G.GoToEndOfOutTween:this.runOutTween(!0);break;case G.PlayInTween:this._outTween.onTweenComplete.addOnce((()=>this.runInTween())),this.runOutTween(!0);break;case G.PlayOutTween:this._inTween.onTweenComplete.addOnce((()=>this.runOutTween())),this.runInTween(!0)}}runInTween(k=!1){this._currentState!==F.IdleAtEndOfInTween&&this._currentState!==F.RunningInTween&&(this._currentState===F.RunningOutTween&&this._outTween.pauseAnimation(),k?this._inTween.completeAnimation():(this._currentState=F.RunningInTween,this._inTween.playAnimation()))}runOutTween(k=!1){this._currentState!==F.IdleAtEndOfOutTween&&this._currentState!==F.RunningOutTween&&(this._currentState===F.RunningInTween&&this._inTween.pauseAnimation(),k?this._outTween.completeAnimation():(this._currentState=F.RunningOutTween,this._outTween.playAnimation()))}};(0,j.Cg)([(0,$.MnK)($.bTj),(0,j.Sn)("design:type",$.bTj)],V.prototype,"_inTween",void 0),(0,j.Cg)([(0,$.MnK)($.bTj),(0,j.Sn)("design:type",$.bTj)],V.prototype,"_outTween",void 0),(0,j.Cg)([(0,$.gfw)(G),(0,j.Sn)("design:type",String)],V.prototype,"_onCreate",void 0),V=(0,j.Cg)([(0,$.EVk)("InOutEasyTweenController",H.Y.animation,'Given an "In" and "Out" tween, handles transitioning between them so they never run at the same time.')],V)},79009:(k,B,U)=>{"use strict";U.d(B,{F:()=>j});var F=U(62459),G=U(95891);class j{constructor(k){this.animations={},this.animationNames=[],G.transform(k,((k,B,U)=>{this.animationNames.push(U);const G=Object.keys(B);for(let j=0;j-1}getAnimationDataForProperty(k,B){return G.get(this.animations,`${B}.${k}`,null)}}},80110:(k,B,U)=>{"use strict";U.d(B,{g:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(84938);let V=class extends G.JTX{constructor(){super(...arguments),this.durationMS=1e3,this.amplitude=20,this.cycles=10,this.buildupDuration=0,this.falloffDuration=500,this.onComplete=new G.HN0,this._shakeTime=null}run(){this._mainPlayer&&(this._loadAreaCameraFollowController=this._mainPlayer.findComponentInChildren(G.mZY),this._loadAreaCameraFollowController&&(this._loadAreaCameraFollowController.Active=!1)),this._cameraTransform=G.i7d.main.GameObject.transform,this._shakeTime=0,this._cameraInitialX=this._cameraTransform.localPosition.x,this._cameraInitialY=this._cameraTransform.localPosition.y}destroy(){this.onComplete.dispose(),super.destroy()}isRunning(){return null!==this._shakeTime}forceCompletion(){this.isRunning()&&(this._shakeTime=this.durationMS,this.update())}update(){if(super.update(),this.isRunning())if(this._shakeTime+=j.q.instance.game.time.deltaMS,this._shakeTime0?Math.min(1,k*(this.durationMS/this.buildupDuration)):1,U=this.falloffDuration>0?Math.min(1,(1-k)*(this.durationMS/this.falloffDuration)):1,F=this.amplitude*B*U*H.B.screenShake.value;this._cameraTransform.setPosition(this._cameraInitialX,Math.floor(this._cameraInitialY+Math.sin(k*Math.PI*2*this.cycles)*F))}else this._cameraTransform.setPosition(this._cameraInitialX,this._cameraInitialY),this._loadAreaCameraFollowController&&(this._loadAreaCameraFollowController.Active=!0),this._shakeTime=null,this.onComplete.dispatch()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"durationMS",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"amplitude",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"cycles",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"buildupDuration",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"falloffDuration",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onComplete",void 0),(0,F.Cg)([(0,G.Cdj)("MainPlayerGameObject"),(0,F.Sn)("design:type",G._mx)],V.prototype,"_mainPlayer",void 0),V=(0,F.Cg)([(0,G.EVk)("ScreenShake",$.Y.motion)],V)},74846:(k,B,U)=>{"use strict";U.d(B,{Q:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(29834);let H=class extends G.uAl{constructor(){super(...arguments),this.animator=null,this.animationName=null,this.loop=!1,this._finished=!0,this._onComplete=new G.HN0}get OnComplete(){return this._onComplete}destroy(){this._onComplete.dispose(),super.destroy()}play(k=!1){this._finished=!1,this.animator.OnAnimationComplete.addOnce((()=>{this._finished=!0,this._onComplete.dispatch()})),this.animator.playAnimation(this.animationName,this.loop,k)}hasFinishedPlaying(){return this._finished}};(0,F.Cg)([(0,G.MnK)($.j),(0,F.Sn)("design:type",$.j)],H.prototype,"animator",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"animationName",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"loop",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"_onComplete",void 0),H=(0,F.Cg)([(0,G.EVk)("SpineAnimationClip",j.Y.animation)],H)},50118:(k,B,U)=>{"use strict";U.d(B,{a:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._autoStart=!1,this.tween=null,this.tweenPlayed=!1,this._onComplete=new G.HN0}get OnComplete(){return this._onComplete}get Tween(){return this.tween}set Tween(k){this.tween=k}create(){var k,B;if(super.create(),this._target&&!((null!==(B=null===(k=this._tweenData)||void 0===k?void 0:k.length)&&void 0!==B?B:0)<=0)){this.tween=j.q.instance.game.add.tween(this._target,this);for(const k of this._tweenData)this.tween.to(k.properties,1e3*k.duration,{value:k.ease.value},this._autoStart,k.delay,k.repeat,k.yoyo)}}play(){this.tween&&!this.tween.isDestroyed?(this.tween.onTweenComplete.addOnce((()=>{this.tweenPlayed=!0,this._onComplete.dispatch()})),this.tween.start()):G.VyI.log("Tween could not play because it has been destroyed.",G.$bb.Warning)}stop(){this.tween&&!this.tween.isDestroyed?this.tween.stop():G.VyI.log("Tween could not be stopped because it has been destroyed.",G.$bb.Warning)}hasFinishedPlaying(){return this.tweenPlayed}destroy(){this.stop(),j.q.instance.game.tweens.removeAllFromOwner(this),this._onComplete.dispose(),this.tween=null,super.destroy()}};(0,F.Cg)([(0,G.SZi)(),(0,G.vCS)(),(0,F.Sn)("design:type",Array)],H.prototype,"_tweenData",void 0),(0,F.Cg)([(0,G.MnK)(G.uAl),(0,F.Sn)("design:type",G.uAl)],H.prototype,"_target",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_autoStart",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"_onComplete",void 0),H=(0,F.Cg)([(0,G.EVk)("TweenAnimationClip",$.Y.animation)],H)},92591:(k,B,U)=>{"use strict";U.d(B,{K:()=>H});var F=U(8674),G=U(62459),j=U(95891),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._onStateChanged=new G.HN0,this._currentState=null,this._animationStates={}}get onStateChanged(){return this._onStateChanged}get currentState(){return this._currentState}destroy(){this._currentState=null;const k=[];for(const B in this._animationStates){const U=this._animationStates[B];k.indexOf(U)<0&&(k.push(U),U.destroy())}k.length=0,this._animationStates=null,this._onStateChanged.dispose(),this._onStateChanged=null,super.destroy()}update(){var k;super.update(),null===(k=this._currentState)||void 0===k||k.update()}changeState(k){const B=this._animationStates[k];this.setCurrentAnimation(B)}setCurrentAnimation(k){var B;this._currentState!==k&&(null===(B=this._currentState)||void 0===B||B.exit(),null==k||k.enter(),this._currentState=k,this._onStateChanged.dispatch())}setAnimationState(k,B){const U=this._animationStates[k];1===j.sumBy(Object.values(this._animationStates),(k=>k===U?1:0))&&U.destroy(),this._animationStates[k]=B}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"_onStateChanged",void 0),H=(0,F.Cg)([(0,G.EVk)("AnimationController",$.Y.animation)],H)},22637:(k,B,U)=>{"use strict";U.d(B,{k:()=>W});var F=U(8674),G=U(62459),j=U(51742),$=U(35120),H=U(28152),V=U(34603);let W=class extends G.uAl{constructor(){super(...arguments),this.preloadSFX=j.c.Sfx_ui,this.onFxComplete=new G.HN0,this._tweens=[]}playEffect(k,B,U){this.gameObject.transform.setPosition(k-20,B+100),U&&this.onFxComplete.add(U);const F=Math.random()+1;this._confettiImage.sprite.animations.add("confetti",["confetti1","confetti2","confetti3","confetti4"],10,!0,!1),this._confettiImage.sprite.animations.play("confetti",void 0,!0),this._confettiImage.sprite.anchor.set(.5,.5),this._confettiImage.sprite.scale.x=.1,this._confettiImage.sprite.scale.y=.1;const j=$.q.instance.game.add.tween(this.gameObject.transform.localPosition,this).to({y:"-=25"},500,G.GS3.Linear.None,!0,0);this._tweens.push(j),this._tweens.push($.q.instance.game.add.tween(this._confettiImage.sprite.scale,this).to({x:F,y:F},500,G.GS3.Quadratic.In,!0,0));const H=$.q.instance.game.add.tween(this.gameObject.transform.localPosition,this).to({y:"+=100"},2e3,G.GS3.Sinusoidal.Out,!1,250);this._tweens.push(H);const V=$.q.instance.game.add.tween(this._confettiImage.sprite,this).to({alpha:0},1e3,G.GS3.Linear.None,!0,2500);this._tweens.push(V),$.q.instance.prodigy.audio.playSFX(18,"dig"),j.chain(H),V.onTweenComplete.addOnce((()=>{this.onFxComplete.dispatch(),this.gameObject.destroy()}))}destroy(){this._tweens.forEach((k=>{$.q.instance.game.tweens.remove(k)})),this.onFxComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.Bak)(),(0,F.Sn)("design:type",String)],W.prototype,"preloadSFX",void 0),(0,F.Cg)([(0,G.MnK)(V._),(0,G.Lr6)(0),(0,G.nKb)("confetti"),(0,F.Sn)("design:type",V._)],W.prototype,"_confettiImage",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],W.prototype,"onFxComplete",void 0),W=(0,F.Cg)([(0,G.EVk)("Confetti",H.Y.effect)],W)},99898:(k,B,U)=>{"use strict";U.d(B,{F:()=>V});var F=U(8674),G=U(62459),j=U(28152),$=U(29834),H=U(71554);let V=class extends G.uAl{constructor(){super(...arguments),this.onFxCompleted=new G.HN0,this.onImpact=new G.HN0}playEffect(k,B,U,F,G,j){const $=B-50;this.gameObject.transform.setPosition(k,$),this.gameObject.setLayer(G,!0),this._parabolicTween.startTween(k,$,U,F),j&&this.onFxCompleted.add(j)}impact(){this.onImpact.dispatch(),this._spineAnimator.OnAnimationComplete.addOnce((()=>{this.completeFx()}))}completeFx(){this.onFxCompleted.dispatch(),setTimeout((()=>{this.gameObject.destroy()}),1)}destroy(){this.onFxCompleted.dispose(),this.onImpact.dispose(),super.destroy()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onFxCompleted",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onImpact",void 0),(0,F.Cg)([(0,G.MnK)(H.L),(0,F.Sn)("design:type",H.L)],V.prototype,"_parabolicTween",void 0),(0,F.Cg)([(0,G.MnK)($.j),(0,F.Sn)("design:type",$.j)],V.prototype,"_spineAnimator",void 0),V=(0,F.Cg)([(0,G.EVk)("FXProjectile",j.Y.effect)],V)},44977:(k,B,U)=>{"use strict";U.d(B,{e:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this.onFxCompleted=new G.HN0}playEffect(k,B,U,F){this.gameObject.transform.setPosition(k,B+200),this.gameObject.setLayer(U,!0),F&&this.onFxCompleted.add(F)}completeFx(){this.onFxCompleted.dispatch(),setTimeout((()=>{this.gameObject.destroy()}),1)}destroy(){this.onFxCompleted.dispose(),super.destroy()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onFxCompleted",void 0),$=(0,F.Cg)([(0,G.EVk)("FXStatic",j.Y.effect)],$)},37854:(k,B,U)=>{"use strict";U.d(B,{v:()=>W});var F=U(8674),G=U(62459),j=U(51742),$=U(35120),H=U(28152),V=U(34603);let W=class extends G.uAl{constructor(){super(...arguments),this.preloadSFX=j.c.Sfx_ui,this.onFxComplete=new G.HN0,this._tweens=[]}playEffect(k,B,U,F=0){this.gameObject.transform.setPosition(k-20,B+100),U&&this.onFxComplete.add(U);const j=75*Math.random()+25,H=Math.random(),V=100*H-50,W=Math.random()+1;this._rocketImage.sprite.anchor.set(.5,.5),this._explosionImage.sprite.anchor.set(.5,.5),this._explosionImage.sprite.angle=360*Math.random(),this._explosionImage.GameObject.transform.setPosition(V,-j-100);const q=$.q.instance.game.add.tween(this._rocketImage.GameObject.transform.localPosition,this).to({y:-j-100},500,G.GS3.Quadratic.Out,!0,F);this._tweens.push(q),this._tweens.push($.q.instance.game.add.tween(this._rocketImage.GameObject.transform.localPosition,this).to({x:V},500,G.GS3.Quadratic.Out,!0,F)),this._tweens.push($.q.instance.game.add.tween(this._rocketImage.sprite,this).to({angle:35*(2*H-1)},500,G.GS3.Linear.None,!0)),this._tweens.push($.q.instance.game.add.tween(this._explosionImage.GameObject.transform.localScale,this).to({x:W,y:W},500,G.GS3.Back.Out,!0,F+500));const K=$.q.instance.game.add.tween(this._explosionImage.sprite,this).to({alpha:0},1e3,G.GS3.Linear.None,!0,F+1e3);this._tweens.push(K),q.onTweenComplete.addOnce((()=>{$.q.instance.prodigy.audio.playSFX(18,"dig")}),this),q.onTweenComplete.addOnce((()=>{this._rocketImage.GameObject.active=!1})),K.onTweenComplete.addOnce((()=>{this.onFxComplete.dispatch(),this.GameObject.destroy()}))}destroy(){this._tweens.forEach((k=>{$.q.instance.game.tweens.remove(k)})),this.onFxComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.Bak)(),(0,F.Sn)("design:type",String)],W.prototype,"preloadSFX",void 0),(0,F.Cg)([(0,G.MnK)(V._),(0,G.Lr6)(0),(0,G.nKb)("rocket"),(0,F.Sn)("design:type",V._)],W.prototype,"_rocketImage",void 0),(0,F.Cg)([(0,G.MnK)(V._),(0,G.Lr6)(0),(0,G.nKb)("explosion"),(0,F.Sn)("design:type",V._)],W.prototype,"_explosionImage",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],W.prototype,"onFxComplete",void 0),W=(0,F.Cg)([(0,G.EVk)("Firework",H.Y.effect)],W)},16184:(k,B,U)=>{"use strict";U.d(B,{J:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(1823);let H=class extends $.k{create(){super.create(),this._color=this._possibleColors[Math.floor(Math.random()*this._possibleColors.length)],this._splashAnimator.playAnimation(`idle-${this._color}`,!1),this._ballonImage.GameObject.active=!1,this._animationOffsetMS=0}playSplash(){this._splashAnimator.playAnimation(`impact-${this._color}`,!1),this._splashAnimator.OnAnimationComplete.addOnce(this.completeFX,this)}};(0,F.Cg)([(0,G.SZi)(),(0,G.W_S)(),(0,F.Sn)("design:type",Array)],H.prototype,"_possibleColors",void 0),H=(0,F.Cg)([(0,G.EVk)("PaintBalloon",j.Y.effect)],H)},54001:(k,B,U)=>{"use strict";U.d(B,{y:()=>$});var F=U(8674),G=U(62459),j=U(35120);let $=class extends G.uAl{constructor(){super(...arguments),this.startPosition=new G.I9Y(0,0),this.endPosition=new G.I9Y(0,0),this.time=1e3,this.height=200,this.onTweenComplete=new G.HN0}startTween(k=this.startPosition.x,B=this.startPosition.y,U=this.endPosition.x,F=this.endPosition.y,$=this.time,H){var V,W;if(!this.targetTransform)throw new Error("ParabolicTween2dComponent: targetTransform is not set.");const q=null!==(V=this.startPosition)&&void 0!==V?V:new G.I9Y(this.targetTransform.localPosition.x,this.targetTransform.localPosition.y),K=null!==(W=this.endPosition)&&void 0!==W?W:new G.I9Y(this.targetTransform.localPosition.x,this.targetTransform.localPosition.y);void 0!==k&&(q.x=k),void 0!==B&&(q.y=B),void 0!==U&&(K.x=U),void 0!==F&&(K.y=F),this.targetTransform.setPosition(q.x,q.y),H&&this.onTweenComplete.add(H),this._horizontalTween=j.q.instance.game.add.tween(this.targetTransform.localPosition,this).to({x:K.x},$,G.GS3.Linear.None,!0),this._verticalTween=j.q.instance.game.add.tween(this.targetTransform.localPosition,this).to({y:Math.min(q.y,K.y)-this.height},$/2,G.GS3.Quadratic.Out).to({y:K.y},$/2,G.GS3.Quadratic.In,!0),this._verticalTween.onTweenComplete.add((()=>{this.targetTransform.setPosition(K.x,K.y),this.onTweenComplete.dispatch()}))}stopTween(){var k,B;null===(k=this._horizontalTween)||void 0===k||k.stop(),null===(B=this._verticalTween)||void 0===B||B.stop()}destroy(){this.stopTween(),j.q.instance.game.tweens.remove(this._horizontalTween),j.q.instance.game.tweens.remove(this._verticalTween),this.onTweenComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.MnK)(G.dLy),(0,F.Sn)("design:type",G.dLy)],$.prototype,"targetTransform",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],$.prototype,"startPosition",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],$.prototype,"endPosition",void 0),(0,F.Cg)([(0,G.g11)({toolTip:"Time in milliseconds for the tween to go between the start and end positions"}),(0,F.Sn)("design:type",Number)],$.prototype,"time",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],$.prototype,"height",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onTweenComplete",void 0),$=(0,F.Cg)([(0,G.EVk)("ParabolicTween2d")],$)},71554:(k,B,U)=>{"use strict";U.d(B,{L:()=>$});var F=U(8674),G=U(62459),j=U(35120);let $=class extends G.uAl{constructor(){super(...arguments),this.onTweenComplete=new G.HN0}startTween(k,B,U,F,$=600,H=.5*G.cj9.distance(k,B,U,F),V){const W=H+$,q={x:k,z:B,y:0};V&&this.onTweenComplete.add(V),this._parabolicTween=j.q.instance.game.add.tween(q,this).to({y:-$/5},W/2,G.GS3.Quadratic.Out).to({y:0},W/2,G.GS3.Quadratic.In,!0),this._linearTween=j.q.instance.game.add.tween(q,this).to({x:U,z:F},W,G.GS3.Linear.None,!0),this._linearTween.onUpdateCallback((()=>{this.targetTransform.setPositionX(q.x),this.targetTransform.setPositionY(q.z+q.y)})),this._linearTween.onTweenComplete.addOnce((()=>{this.targetTransform.setPositionX(U),this.targetTransform.setPositionY(F),this.onTweenComplete.dispatch()}))}stopTween(){var k,B;null===(k=this._linearTween)||void 0===k||k.stop(),null===(B=this._parabolicTween)||void 0===B||B.stop()}destroy(){this.stopTween(),j.q.instance.game.tweens.remove(this._linearTween),j.q.instance.game.tweens.remove(this._parabolicTween),this.onTweenComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.MnK)(G.dLy),(0,F.Sn)("design:type",G.dLy)],$.prototype,"targetTransform",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onTweenComplete",void 0),$=(0,F.Cg)([(0,G.EVk)("ParabolicTween3d")],$)},1823:(k,B,U)=>{"use strict";U.d(B,{k:()=>z});var F=U(8674),G=U(62459),j=U(51742),$=U(35120),H=U(28152),V=U(34603),W=U(29834),q=U(12408),K=U(54001);let z=class extends G.uAl{constructor(){super(...arguments),this.preloadSFX=j.c.Sfx_water_balloon,this.onFxComplete=new G.HN0,this._travelTimeMS=2e3,this._animationOffsetMS=400}playEffect(k,B,U,F,G,j=0){this.gameObject.transform.setPosition(k-20,B+100);const H=B-50;G&&this.onFxComplete.add(G),this._parabolicTween.startTween(k,H,U,F,2e3,(()=>{this._ballonImage.setAlpha(0),this._rotateTween.destroyTween(),$.q.instance.prodigy.audio.playSFX(45,"splash")})),this._rotateTween.startTween(),$.q.instance.game.time.events.addTimer(this._travelTimeMS-this._animationOffsetMS,(()=>{this.playSplash()}),[],this)}playSplash(){this._splashAnimator.playAnimation("impact",!1),this._splashAnimator.OnAnimationComplete.addOnce(this.completeFX,this)}completeFX(){setTimeout((()=>{this.gameObject.destroy()}),1),this.onFxComplete.dispatch()}destroy(){this._parabolicTween.stopTween(),this.onFxComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.Bak)(),(0,F.Sn)("design:type",String)],z.prototype,"preloadSFX",void 0),(0,F.Cg)([(0,G.MnK)(V._),(0,F.Sn)("design:type",V._)],z.prototype,"_ballonImage",void 0),(0,F.Cg)([(0,G.MnK)(W.j),(0,F.Sn)("design:type",W.j)],z.prototype,"_splashAnimator",void 0),(0,F.Cg)([(0,G.MnK)(K.y),(0,F.Sn)("design:type",K.y)],z.prototype,"_parabolicTween",void 0),(0,F.Cg)([(0,G.MnK)(q.Z),(0,F.Sn)("design:type",q.Z)],z.prototype,"_rotateTween",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],z.prototype,"onFxComplete",void 0),z=(0,F.Cg)([(0,G.EVk)("WaterBalloon",H.Y.effect)],z)},79825:(k,B,U)=>{"use strict";var F;U.d(B,{h:()=>F}),function(k){k[k.VoiceClip=0]="VoiceClip",k[k.Sfx=1]="Sfx",k[k.Bgm=2]="Bgm",k[k.BgmSfx=3]="BgmSfx"}(F||(F={}))},27842:(k,B,U)=>{"use strict";U.d(B,{J:()=>q,c:()=>F});var F,G=U(8674),j=U(62459),$=U(35120),H=U(28152),V=U(79825);class W extends j.$KW{generate(k,B){return j.XRp.createVertical([j.Gme.filePickerGroup({id:"audioGUID",labelValue:"Audio",path:k.audioGUID,allowedExtensions:["wav","ogg"],onChange:k=>{const B=this._editorAPI.readFileSync(`${k}.meta`).toString(),U=JSON.parse(B);this._editorAPI.modifyComponent(this._componentGuid,{audioGUID:U.guid})}}),j.Gme.enumGroup({id:"audioPreload",labelValue:"Audio Preload",selectValue:k.audioPreload},F),j.Gme.enumGroup({id:"audioType",labelValue:"Audio Type",selectValue:k.audioType},V.h),j.Gme.numberGroup({id:"start",labelValue:"Start",inputValue:k.start}),j.Gme.numberGroup({id:"duration",labelValue:"Duration",inputValue:k.duration}),j.Gme.numberGroup({id:"fadeInDuration",labelValue:"Fade In Duration",inputValue:k.fadeInDuration}),j.NyS.create({id:"onPlaybackComplete",label:"On Playback Complete",signalValue:k.onPlaybackComplete,componentGUID:this._componentGuid}),j.Gme.checkboxGroup({id:"playOnCreate",labelValue:"Play On Create",inputValue:k.playOnCreate}),j.Gme.checkboxGroup({id:"stopOnDestroy",labelValue:"Stop On Destroy",inputValue:k.stopOnDestroy}),j.Gme.checkboxGroup({id:"loop",labelValue:"Loop",inputValue:k.loop}),j.Gme.checkboxGroup({id:"onlyPlayIfActive",labelValue:"Only Play If Active",inputValue:k.onlyPlayIfActive}),j.X9M.create({id:"testPlay",buttonText:"Play",buttonIcon:j.a2l.Smiley,onClick:()=>{this._editorAPI.getComponent(this._componentGuid).play()}}),j.X9M.create({id:"testStop",buttonText:"Stop",buttonIcon:j.a2l.Cut,onClick:()=>{this._editorAPI.getComponent(this._componentGuid).stop()}})])}}!function(k){k[k.None=0]="None",k[k.OnCreate=1]="OnCreate",k[k.Dependency=2]="Dependency"}(F||(F={}));let q=class extends j.uAl{constructor(){super(...arguments),this._start=0,this._duration=-1,this._fadeInDuration=0,this.onPlaybackComplete=new j.HN0}postDeserialize(){super.postDeserialize(),this._audioPreload===F.Dependency&&(this._preloadTag=this._audioGUID)}postCreate(){super.postCreate(),this._playOnCreate&&this._audioPreload===F.Dependency?this.play():this._audioPreload===F.OnCreate&&this._assetLoader.loadAssets([this._audioGUID]).then((()=>{this._playOnCreate&&this.play()})).catch(j.RQr.createHandler("Error preloading audio"))}destroy(){var k;this._stopOnDestroy&&(null===(k=this._sound)||void 0===k||k.stop()),this.onPlaybackComplete.dispose(),super.destroy()}play(){if(this._onlyPlayIfActive&&!this.GameObject.activeInHierarchy)return;const k=$.q.instance.prodigy.audio.getVolumeForType(this._audioType);let B=!0;switch(this._audioType){case V.h.VoiceClip:this._sound=$.q.instance.prodigy.audio.playVoice(this._audioGUID,(()=>this.onPlaybackComplete.dispatch()),this._start,this._duration);break;case V.h.Sfx:this._sound=$.q.instance.prodigy.audio.playSFXFromGUID(this._audioGUID,(()=>this.onPlaybackComplete.dispatch()),this._start,this._duration,this._loop);break;case V.h.Bgm:$.q.instance.prodigy.audio.playBGM(this._audioGUID,this._loop);break;case V.h.BgmSfx:this._sound=$.q.instance.prodigy.audio.playSound(this._audioGUID,this._loop,k);break;default:B=!1,j.VyI.log("Invalid AudioType. Cannot play sound",j.$bb.Error)}B&&this.applyFadeIn(k)}stop(){var k;null===(k=this._sound)||void 0===k||k.stop()}isPlaying(){return!!this._sound&&this._sound.isPlaying}setGUID(k){this._audioGUID=k,this._assetLoader.loadAssets([this._audioGUID]).catch(j.RQr.createHandler("Error preloading audio"))}preload(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this._assetLoader.loadAssets([this._audioGUID])}))}applyFadeIn(k){this._fadeInDuration>0&&(this._sound.volume=0,$.q.instance.game.add.tween(this._sound,this).to({volume:k},1e3*this._fadeInDuration,j.GS3.Linear.None,!0))}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],q.prototype,"_audioGUID",void 0),(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],q.prototype,"_preloadTag",void 0),(0,G.Cg)([(0,j.gfw)(F),(0,G.Sn)("design:type",Number)],q.prototype,"_audioPreload",void 0),(0,G.Cg)([(0,j.gfw)(V.h),(0,G.Sn)("design:type",Number)],q.prototype,"_audioType",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],q.prototype,"_start",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],q.prototype,"_duration",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],q.prototype,"_fadeInDuration",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],q.prototype,"onPlaybackComplete",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"_playOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"_stopOnDestroy",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"_loop",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"_onlyPlayIfActive",void 0),(0,G.Cg)([(0,j.Cdj)(j.t5G.AssetLoader),(0,G.Sn)("design:type",Object)],q.prototype,"_assetLoader",void 0),q=(0,G.Cg)([(0,j.EVk)("PlayAudioGUID",H.Y.audio),(0,j.WR4)(W)],q)},2224:(k,B,U)=>{"use strict";U.d(B,{Y:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(17425);let V=class extends G.uAl{constructor(){super(...arguments),this._playOnCreate=!1,this._pauseOnDestroy=!1,this._overrideMapBGM=!1}create(){super.create(),j.q.instance.prodigy.audio.autoplay=!this._overrideMapBGM,this._playOnCreate&&this.startBgm()}startBgm(){this.playBgmID(this._bgmGUID?this._bgmGUID:this._bgmID)}playBgmID(k){var B;if(G.Aq$.isDefined(k)){this._bgmID=k;const U=j.q.instance.prodigy,F=H.K.getAssetID("bgm",k),G=null===(B=U.audio.currentBgm)||void 0===B?void 0:B.key;G!==F?(H.K.cacheAsset(j.q.instance.game,F,H.K.zoneAssetsCached),U.load.assets(F,(()=>{U.audio.playBGM(this._bgmID,!0)}))):U.audio.isBGMPlaying(G)||U.audio.resumeBGM()}}pauseBgm(){j.q.instance.prodigy.audio.pauseBGM()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Object)],V.prototype,"_bgmID",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],V.prototype,"_bgmGUID",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_playOnCreate",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_pauseOnDestroy",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_overrideMapBGM",void 0),V=(0,F.Cg)([(0,G.EVk)("PlayBGM",$.Y.audio)],V)},86730:(k,B,U)=>{"use strict";U.d(B,{a:()=>j});var F=U(8674),G=U(62459);class j extends G.JTX{constructor(){super(...arguments),this.backgroundMusicID=null}get BackgroundMusicID(){return this.backgroundMusicID}set BackgroundMusicID(k){this.backgroundMusicID=k,this.audioPlayer.playMusic(this.BackgroundMusicID)}destroy(){this.audioPlayer.stopMusic(),super.destroy()}}(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],j.prototype,"audioPlayer",void 0)},37807:(k,B,U)=>{"use strict";U.d(B,{N:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this.onBreadcrumbComplete=new G.HN0}destroy(){this.onBreadcrumbComplete.dispose(),super.destroy()}markCompleted(){j.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(this._featureName,this._breadcrumbName),this.onBreadcrumbComplete.dispatch()}resetBreadcrumb(){j.q.instance.prodigy.breadcrumbManager.resetBreadcrumb(this._featureName,this._breadcrumbName)}resetBreadcrumbs(){j.q.instance.prodigy.breadcrumbManager.resetBreadcrumbs(this._featureName)}isCompleted(){return j.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(this._featureName,this._breadcrumbName)}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onBreadcrumbComplete",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"_featureName",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"_breadcrumbName",void 0),H=(0,F.Cg)([(0,G.EVk)("BreadcrumbFeature",$.Y.utility)],H)},96494:(k,B,U)=>{"use strict";U.d(B,{F:()=>W});var F=U(8674),G=U(62459),j=U(79687),$=U(90661),H=U(15821),V=U(7408);let W=class{constructor(){this.breadcrumbConfig=null,this._onBreadcrumbCompleted=new G.HN0,this.dataSource=null}get onBreadcrumbCompleted(){return this._onBreadcrumbCompleted}init(k,B){this.dataSource=k,this.breadcrumbConfig=B}completeBreadcrumb(k,B){const U=`breadcrumbs-${k}`;if(this.isBreadcrumbComplete(k,B))return;const F=this.breadcrumbConfig.features[k];if(G.Aq$.isDefined(F)){const j=F.breadcrumbs[B];if(G.Aq$.isDefined(j)){let B=this.dataSource.get(U);if(G.Aq$.isDefined(B)||this.dataSource.set(U,0),B=this.dataSource.get(U),this.dataSource.set(U,$.O.setBit(B,j.index)),G.Aq$.isDefined(j.completes)&&j.completes.length>0)for(const U of j.completes)this.completeBreadcrumb(k,U)}else G.VyI.log(`BreadcrumbManager.completeBreadcrumb - Couldn't find breadcrumb named: ${B} for feature: ${k}. No action taken.`,G.$bb.Error)}else G.VyI.log(`BreadcrumbManager.completeBreadcrumb - Couldn't find feature named: ${k}. No action taken.`,G.$bb.Error);this._onBreadcrumbCompleted.dispatch()}resetBreadcrumb(k,B,U=!1){const F=`breadcrumbs-${k}`;if(!this.isBreadcrumbComplete(k,B))return;const j=this.breadcrumbConfig.features[k];if(G.Aq$.isDefined(j)){const H=j.breadcrumbs[B];if(G.Aq$.isDefined(H)){let B=this.dataSource.get(F);if(G.Aq$.isDefined(B)||this.dataSource.set(F,0),B=this.dataSource.get(F),this.dataSource.set(F,$.O.clearBit(B,H.index)),U&&G.Aq$.isDefined(H.completes)&&H.completes.length>0)for(const F of H.completes)this.resetBreadcrumb(k,F,U)}else G.VyI.log(`BreadcrumbManager.resetBreadcrumb - Couldn't find breadcrumb named: ${B} for feature: ${k}. No action taken.`,G.$bb.Error)}else G.VyI.log(`BreadcrumbManager.resetBreadcrumb - Couldn't find feature named: ${k}. No action taken.`,G.$bb.Error)}isBreadcrumbDefined(k,B){const U=this.breadcrumbConfig.features[k];if(G.Aq$.isDefined(U)){const k=U.breadcrumbs[B];return G.Aq$.isDefined(k)}return!1}isBreadcrumbComplete(k,B){const U=this.dataSource.get(`breadcrumbs-${k}`),F=this.breadcrumbConfig.features[k];return class{static getBreadcrumbFeature(k,B){return(null!=B?B:new V.C).features[k]}static isBreadcrumbComplete(k,B,U){if(H.A.isDefined(B)){const F=B.breadcrumbs[U];if(H.A.isDefined(F)){const B=Math.pow(2,F.index);return $.O.areBitsSet(k,B)}}return!1}}.isBreadcrumbComplete(U,F,B)}resetBreadcrumbs(k){const B=`breadcrumbs-${k}`,U=this.breadcrumbConfig.features[k];if(G.Aq$.isDefined(U)){const k=this.dataSource.get(B);G.Aq$.isDefined(k)&&this.dataSource.set(B,0)}}};W=(0,F.Cg)([(0,j.injectable)()],W)},90744:(k,B,U)=>{"use strict";U.d(B,{E:()=>Y});var F=U(8674),G=U(79687),j=U(99625),$=U(10471),H=U(13381),V=U(35120),W=U(1195),q=U(77938),K=U(43754),z=U(13956);let Y=class{exchange(k,B){const U=H.V.from(k.currency).to(B);return{currency:B,value:H.V.applyExchangeRate(k.value,U)}}canAfford(k){return this.isHardCurrencyValue(k)?this._hardCurrencyDataProvider.canAfford(k):this._playerDataProvider.player.getCurrencyAmount(k.currency,k.type)>=k.value}spend(k){return(0,F.sH)(this,arguments,void 0,(function*(k,B="default",U={}){var F;if(k.value=Math.abs(k.value),!this.canAfford(k))throw new Error(`Insufficient funds. Attempting to spend ${k.value} currency-${k.currency}`);if(this.isHardCurrencyValue(k)){const B=V.q.instance.prodigy.open.prefabMenu(j.l.LoadingOverlay,void 0,void 0,!1);try{yield this._hardCurrencyDataProvider.spend(k,U)}finally{B.close()}}else this.isGoldCurrencyValue(k)?this._playerDataProvider.player.changeGold(-k.value):this._playerDataProvider.player.backpack.consume(null!==(F=k.type)&&void 0!==F?F:"currency",k.currency,k.value);this.sendAnalyticsEvents(k,B,U)}))}sendAnalyticsEvents(k,B,U){var F,G,j;const $=k.currency,H=null!==(F=k.type)&&void 0!==F?F:"currency",V=null===(j=null===(G=q.t.getItem(H,$))||void 0===G?void 0:G.data)||void 0===j?void 0:j.name;this.isHardCurrencyValue(k)||this._analytics.item.sendItemRemovedEvent($,V,H,k.value,U)}isStandardCurrencyValue(k){var B;return"currency"===(null!==(B=k.type)&&void 0!==B?B:"currency")}isHardCurrencyValue(k){return this.isStandardCurrencyValue(k)&&$.B.includes(k.currency)}isGoldCurrencyValue(k){return"gold"===k.type||this.isStandardCurrencyValue(k)&&1===k.currency}};(0,F.Cg)([(0,z.b)("5c7-e02d"),(0,F.Sn)("design:type",K.W)],Y.prototype,"_hardCurrencyDataProvider",void 0),(0,F.Cg)([(0,z.b)("e20-0fb0"),(0,F.Sn)("design:type",W.E)],Y.prototype,"_playerDataProvider",void 0),(0,F.Cg)([(0,z.b)("c47-20b6"),(0,F.Sn)("design:type",Function)],Y.prototype,"_analytics",void 0),Y=(0,F.Cg)([(0,G.injectable)()],Y)},2519:(k,B,U)=>{"use strict";U.d(B,{E:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(90744);let H=class extends G.uAl{constructor(){super(...arguments),this.onStartedSpend=new G.HN0,this.onFinishedSpend=new G.HN0,this.onSuccess=new G.HN0,this.onFailure=new G.HN0,this.customData={},this.isProcessingSpend=!1}spend(){this.isProcessingSpend||(this.isProcessingSpend=!0,this.onStartedSpend.dispatch(),this._paymentManager.spend({currency:this.currencyId,value:this.amount},"default",Object.assign({is_magicoin_boosted:27===this.currencyId},this.customData)).then((()=>{this.onSuccess.dispatch(this.currencyId,this.amount)})).catch((k=>{G.RQr.logError(k,"[MakePaymentComponent] Failed to make payment"),this.onFailure.dispatch()})).finally((()=>{this.isProcessingSpend=!1,this.onFinishedSpend.dispatch()})))}destroy(){this.onSuccess.dispose(),this.onFailure.dispose(),this.onStartedSpend.dispose(),this.onFinishedSpend.dispose()}};(0,F.Cg)([(0,G.Cdj)("743-fd51"),(0,F.Sn)("design:type",$.E)],H.prototype,"_paymentManager",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"currencyId",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"amount",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onStartedSpend",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onFinishedSpend",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onSuccess",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onFailure",void 0),(0,F.Cg)([(0,G.vCS)(),(0,G.YLv)("Optional custom data for analytics purposes"),(0,F.Sn)("design:type",Object)],H.prototype,"customData",void 0),H=(0,F.Cg)([(0,G.EVk)("MakePayment",j.Y.economy)],H)},98400:(k,B,U)=>{"use strict";U.d(B,{w:()=>G});var F=U(62459);U(34829);class G{constructor(k){this.questionInterface=null,this.isOverlayOpen=!1,this.onQuestionOpened=new F.HN0,this.onQuestionAnswered=new F.HN0,this.questionInterface=k}get OnQuestionOpened(){return this.onQuestionOpened}get OnQuestionAnswered(){return this.onQuestionAnswered}open(k){this.isOverlayOpen||(this.isOverlayOpen=!0,this.onQuestionOpened.dispatch(),this.questionInterface.question(((k,B,U,F,G,j,$)=>{this.isOverlayOpen=!1,this.onQuestionAnswered.dispatch(k,B,U,F,G,j,$)}),Object.assign({forceAnswerBonus:this.isNFactorEnabled()},k)))}isOpen(){return this.isOverlayOpen}isNFactorEnabled(){return!1}}},76599:(k,B,U)=>{"use strict";var F,G;U.d(B,{w:()=>F}),function(k){k.DEFAULT="default",k.DEFAULT_STRAND_CLUSTERS="default-strand-clusters",k.HOMEWORK="assignment",k.PLACEMENT="placement-test",k.PLACEMENT_BY_STRAND="placement-by-strand-test",k.PLAN="plan",k.GAME_CHALLENGE="game-challenge",k.BACKEND_DEFAULT="default-backend",k.BACKEND_DEFAULT_STRAND_CLUSTERS="default-strand-clusters-backend",k.BACKEND_HOMEWORK="assignment-backend",k.BACKEND_PLACEMENT_BY_STRAND="placement-by-strand-test-backend",k.BACKEND_PLAN="plan-backend"}(F||(F={})),function(k){k.mc="mc",k.tb="tb",k.dd="dd",k["cp-1"]="cp-1",k["cp-2"]="cp-2",k["cp-3"]="cp-3",k["bbc-1"]="bbc-1",k["bbc-2"]="bbc-2",k["bbt-1"]="bbt-1",k["bbt-2"]="bbt-2",k.fc="fc",k["nl-1"]="nl-1",k.clock="clock",k.hc="hc",k["fs-1"]="fs-1",k["fs-2"]="fs-2",k["tf-1"]="tf-1",k["tf-2"]="tf-2",k.bg="bg",k.lp="lp",k.sp="sp",k.grid="grid"}(G||(G={}))},86824:(k,B,U)=>{"use strict";U.d(B,{e:()=>$});var F=U(62459),G=U(15821),j=U(35120);class ${static areRequirementsMet(k){const B=j.q.instance.prodigy.gameContainer.get("073-6f3b");let U=!0;if(G.A.isDefined(k.requireExperiment)&&(G.A.isDefined(k.requireExperimentGroup)?B.getVariation(k.requireExperiment)!==parseInt(k.requireExperimentGroup,10)&&(U=!1):B.isInExperiment(k.requireExperiment)||(U=!1)),G.A.isDefined(k.requireFeature)&&(B.isOn(k.requireFeature)||(U=!1),G.A.isDefined(k.requireFeatureVariables)))for(const[F,j]of Object.entries(k.requireFeatureVariables)){const $=B.getFeatureValue(k.requireFeature),H=G.A.traverseIfObject($,F);G.A.isDefined(H)&&H===j||(U=!1)}return k.invert&&(U=!U),U}static processExperimentVariables(k){const B=j.q.instance.prodigy.gameContainer.get("073-6f3b");if(B){for(const[U,F]of Object.entries(k))if(this.isCompatible(F)){const j=B.getFeatureValue(F.featureName),$=G.A.traverseIfObject(j,F.variableName);k[U]=null!=$?$:F.defaultValue}}else F.VyI.log("Could not find experiment provider",F.$bb.Warning)}static isCompatible(k){return!("object"!=typeof k||!k)&&("string"==typeof k.featureName&&"string"==typeof k.variableName&&"defaultValue"in k)}}},48813:(k,B,U)=>{"use strict";U.d(B,{T:()=>nt});var F=U(8674),G=U(62459);var j=U(77601);const $=(0,j.gb)({key:"active-entity-overrides",activateAssociatedExperiments:1,default:[]});var H=U(15821),V=U(35120),W=U(84399),q=U(13381),K=U(29887),z=U(13956),Y=U(44367);class Q extends Y.z{static sendActivationEvent(){var k;this._segmentExperimentTracker.track("pet-levelup-magicoin-cost"),(null===(k=Q.getVariables())||void 0===k?void 0:k.exchangeRates)&&q.V.setOverrideRates(Q.getVariables().exchangeRates)}static getVariables(){return super.getFeatureVariables()}static isFeatureEnabled(){var k;return super.isFeatureEnabled()&&(null===(k=this.getFeatureVariables())||void 0===k?void 0:k.enabled)}}Q._featureName="pet-levelup-magicoin-cost",(0,F.Cg)([(0,z.b)("47f-ab6a"),(0,F.Sn)("design:type",K.p)],Q,"_segmentExperimentTracker",void 0);var X=U(36233),Z=U(76277),J=U(73678),tt=U(79600),et=U(37251),it=U(77938);class st{constructor(k){this._userID=k}getExperimentVariations(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this._sdkWrapper.gameAssetsExperiments.getAllExperimentsWithCustomData(this._userID);if(!k.isOK())throw new tt.CatalystSdkError(tt.EErrorCode.Unknown,"Error retrieving asset experiment data",`${k.status}: ${JSON.stringify(k.data)}`);const B=new Map;return k.data.result.experiments.forEach((k=>{var U,F,j;for(const $ of k.linkedFeatures){let H;if(G.Aq$.isDefined(k.variation))H={experimentKey:k.variation.experimentKey,featureKey:k.variation.featureKey,variationKey:k.variation.variationKey,variationIndex:k.variation.variationIndex};else{const B=this._featureProvider.evalFeature($);H={experimentKey:k.experimentKey,featureKey:null===(U=B.experimentResult)||void 0===U?void 0:U.featureId,variationKey:null===(F=B.experimentResult)||void 0===F?void 0:F.key,variationIndex:null===(j=B.experimentResult)||void 0===j?void 0:j.variationId}}if(G.Aq$.isDefined(H.variationKey)&&G.Aq$.isDefined(H.featureKey)&&G.Aq$.isDefined(H.variationIndex)){const{experimentKey:k,featureKey:U,variationKey:F}=H,G=`${k}-${U}-${F}`;B.set(G,H)}}})),Array.from(B.values())}))}mergeExperimentAssetData(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.getExperimentVariations();if(k.length>0){const B=yield this._sdkWrapper.gameAssetsExperiments.getAssetsForExperimentsVariations(tt.SourceType.CMS,this._userID,k);if(!B.isOK())throw new tt.CatalystSdkError(tt.EErrorCode.Unknown,"Error retrieving asset experiments",`${B.status}: ${JSON.stringify(B.data)}`);for(const k of B.data.result.assets){const B=it.t.getItem(k.assetType,k.id);B&&k.data.data&&(B.data=k.data.data,G.Aq$.isDefined(k.data.metadata)&&(B.metadata=k.data.metadata))}}}))}}(0,F.Cg)([(0,z.b)("00d-b27e"),(0,F.Sn)("design:type",et.X)],st.prototype,"_sdkWrapper",void 0),(0,F.Cg)([(0,z.b)("073-6f3b"),(0,F.Sn)("design:type",Object)],st.prototype,"_featureProvider",void 0);class nt{static sendFestivalTravelEvent(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(k===J.A_.LAMPLIGHT&&V.q.instance.prodigy.skin.getActiveFestivals().length>0){V.q.instance.prodigy.gameContainer.get("47f-ab6a").track("game-visit-festival")}}))}static sendDecisionEvents(){const k=V.q.instance.prodigy.gameContainer.get("47f-ab6a"),B=V.q.instance.prodigy.gameContainer.get("6b4-590f"),U=["pippet-quest-encounters","difficulty-progression","difficulty-scaling","zone-entry-illustrations-v2","web-push-notification","member-jar","game-overlay-checkout","treasure-track-ux","store-revamp","contextual-offers","pet-capture-and-evo-costs","rifts-v2","prefab-scenes","regional-currency-changes","hud-revamp-2025"];W.R.sendActivationEvent(),X.p.sendActivationEvent(),Q.sendActivationEvent();for(const G of U)k.track(G);const F=(0,Z.G)($);for(const G of F)(0,j.gb)({key:G,default:{},activateAssociatedExperiments:0});B.setup(),nt._onGrowthbookResolved()}static forceExperimentVariation(){const k=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;Array.isArray(k.data.forceExperiment)?k.data.forceExperiment.forEach((k=>{nt._featureProvider.forceVariation(k.experimentKey,parseInt(k.variationKey,10))})):H.A.isDefined(k.data.forceExperiment)&&G.VyI.log("Experiment data was the incorrect type",G.$bb.Error)}static mergeUserExperimentAssetData(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=new st(k);yield B.mergeExperimentAssetData()}))}}nt.ready=new Promise((k=>{nt._onGrowthbookResolved=k})),(0,F.Cg)([(0,z.b)("073-6f3b"),(0,F.Sn)("design:type",Object)],nt,"_featureProvider",void 0)},29887:(k,B,U)=>{"use strict";U.d(B,{p:()=>G});var F=U(62459);class G{constructor(k,B){this._featureProvider=k,this._segment=B}track(k){const{experimentResult:B,experiment:U}=this._featureProvider.evalFeature(k);(null==B?void 0:B.inExperiment)&&U&&F.Aq$.isDefined(B.variationId)&&this._segment.create.experimentVariationAssigned(k,U.key,B.key,this._featureProvider.getAttributes()).send()}}},57070:(k,B,U)=>{"use strict";U.d(B,{w:()=>H});var F=U(8674),G=U(62459);var j=U(35120),$=U(1195);class H extends class{meetsRequirement(k){return!0}}{get activePlayer(){return this._loggedInPlayer.player}constructor(k){super(),this.game=null,this.game=k}getInjectedValue(k){return j.q.instance.prodigy.gameContainer.get(k)}}(0,F.Cg)([(0,G.fFd)("e20-0fb0"),(0,F.Sn)("design:type",$.E)],H.prototype,"_loggedInPlayer",void 0),(0,F.Cg)([(0,G.fFd)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],H.prototype,"_localizer",void 0)},56735:(k,B,U)=>{"use strict";U.d(B,{p:()=>K});var F=U(62459),G=U(37016),j=U(15821),$=U(77938),H=U(22023),V=U(57070),W=U(30226),q=U(9579);class K extends V.w{getDisplayText(k){const{petCount:B,mergeRank:U,evolutionTier:F,level:G,rarity:$}=k,H=q.a.getRuleDescriptionKey(k);return j.A.isDefined(U)?this._localizer.getText(H,B,U):j.A.isDefined(F)?this._localizer.getText(H,B,F):j.A.isDefined(G)?this._localizer.getText(H,B,G):j.A.isDefined($)?this._localizer.getText(H,B,W.J.convertRarityToText(null!=$?$:0)):this._localizer.getText(H,B)}getCurrentValue(k){return K.getPetsSchema(k,this.activePlayer).length}getCurrentProgress(k){return[this.getCurrentValue(k),k.petCount]}meetsRequirement(k){return this.getCurrentValue(k)>=k.petCount}static checkIfMeetsRequirement(k,B){if(!j.A.isDefined(null==k?void 0:k.petCount))return F.VyI.log('Required parameter: "petCount" is not found.',F.$bb.Error),!1;return this.getPetsSchema(k,B).length>=k.petCount}static getPetsSchema(k,B){let U=B.kennel.getPets();return j.A.isDefined(null==k?void 0:k.mergeRank)&&(U=U.filter((B=>{var U,F,j,$;return(null!==(j=H.P8.getPetDisplayMergeRank(null!==(U=B.ID)&&void 0!==U?U:0,null!==(F=B.uniqueID)&&void 0!==F?F:""))&&void 0!==j?j:G.qd.MIN)>=(null!==($=null==k?void 0:k.mergeRank)&&void 0!==$?$:-1)}))),(null==k?void 0:k.affinity)&&(U=U.filter((B=>{var U,F;return(null===(F=null===(U=$.t.getItem("pet",B.ID))||void 0===U?void 0:U.data)||void 0===F?void 0:F.affinity)===k.affinity}))),(null==k?void 0:k.evolutionTier)&&(U=U.filter((B=>{var U,F,G,j,H;return(null!==(j=null===(G=null===(F=null===(U=$.t.getItem("pet",B.ID))||void 0===U?void 0:U.data)||void 0===F?void 0:F.evolution)||void 0===G?void 0:G.tier)&&void 0!==j?j:0)>=(null!==(H=null==k?void 0:k.evolutionTier)&&void 0!==H?H:0)}))),(null==k?void 0:k.unique)&&(U=U.filter(((k,B,U)=>U.findIndex((B=>B.ID===k.ID))===B))),(null==k?void 0:k.level)&&(U=U.filter((B=>{var U,F;return(null!==(U=B.level)&&void 0!==U?U:0)>=(null!==(F=null==k?void 0:k.level)&&void 0!==F?F:0)}))),(null==k?void 0:k.rarity)&&(U=U.filter((B=>{var U,F;return(null===(F=null===(U=$.t.getItem("pet",B.ID))||void 0===U?void 0:U.data)||void 0===F?void 0:F.rarity)===k.rarity}))),U}}},5018:(k,B,U)=>{"use strict";U.d(B,{G:()=>V});var F=U(8674),G=U(79600),j=U(62459),$=U(35120),H=(U(34829),U(57070));class V extends H.w{getCurrentValue(){return V._features}meetsRequirement(k){return this.getCurrentValue().includes(k)}getCurrentProgress(k){return[this.getCurrentValue(),k]}static loadFeatures(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=$.q.instance.prodigy.gameContainer.get("00d-b27e");try{const B=yield k.featureAccess.getFeatures();this._features=B.data.features}catch(B){const k=B;k.code===G.EErrorCode.RequestError?j.VyI.log(`getFeatureAccess Request Error: ${k.name} - ${k.message}`,j.$bb.Error):j.VyI.log(`getFeatureAccess Unexpected Error: ${j.RQr.stringify(B)}`,j.$bb.Error)}}))}}V._features=[]},20706:(k,B,U)=>{"use strict";U.d(B,{L:()=>G});var F=U(68910);class G extends F.Filter{get color1(){return F.Color.shared.setValue(this.uniforms.color1).toNumber()}set color1(k){this.uniforms.color1=F.Color.shared.setValue(k).toRgbArray()}get color2(){return F.Color.shared.setValue(this.uniforms.color2).toNumber()}set color2(k){this.uniforms.color2=F.Color.shared.setValue(k).toRgbArray()}constructor(k,B){super(null,G.FRAGMENT_SHADER,{color1:F.Color.shared.setValue(k).toRgbArray(),color2:F.Color.shared.setValue(B).toRgbArray()})}}G.FRAGMENT_SHADER="\n precision mediump float;\n varying vec2 vTextureCoord;\n uniform sampler2D uSampler;\n uniform vec4 color1;\n uniform vec4 color2;\n \n void main() {\n vec4 c = texture2D( uSampler, vTextureCoord );\n gl_FragColor.rgb = mix(color1.rgb, color2.rgb, c.rgb/c.a);\n gl_FragColor.a = c.a;\n gl_FragColor.rgb *= c.a;\n }"},44357:(k,B,U)=>{"use strict";U.d(B,{BY:()=>ft,EK:()=>Z,GP:()=>Y,MQ:()=>Q,QQ:()=>lt,Qx:()=>dt,Ry:()=>et,Vy:()=>nt,Wf:()=>st,XL:()=>ct,ce:()=>K,dD:()=>q,dU:()=>X,eK:()=>rt,lz:()=>J,pf:()=>it,qb:()=>z,qe:()=>ot,uk:()=>ut,v$:()=>tt,x:()=>at,yH:()=>ht});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(65240),V=U(35120),W=U(43531);G.Egh.timeout;const q=k=>{V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.saveEnabled=k},K=(k,B,U=!1)=>{k.setAnimationByName(0,B,U)},z=(k,B,...U)=>(0,F.sH)(void 0,[k,B,...U],void 0,(function*(k,B,U=!1){return new Promise((F=>{K(k,B,U),k.onComplete.addOnce(F)}))})),Y=(k,B=null,U=H.C.Interactable,F=null,G=null)=>{V.q.instance.prodigy.open.gotItem(k,null,!0,B,void 0,void 0,{source_type:U,source_id:F,transaction_id:G})},Q=(k,...B)=>(0,F.sH)(void 0,[k,...B],void 0,(function*(k,B=null,U=H.C.Interactable,F=null,G=null,j){return new Promise(($=>{k.length>0?V.q.instance.prodigy.open.gotItem(k,$,!0,B,void 0,!0===j,{source_type:U,source_id:F,transaction_id:G}):$()}))})),X=(k,B)=>{const U=V.q.instance.prodigy.notifications;U.pause(B),U.clearNotifications(),k&&(k.Active=!1)},Z=(k,B)=>{V.q.instance.prodigy.notifications.resume(B),k&&(k.Active=!0)},J=(k,B,...U)=>(0,F.sH)(void 0,[k,B,...U],void 0,(function*(k,B,U=1e3,F=!1,j){return new Promise(($=>{const H=new G.I9Y;H.copyFrom(k.localPosition);const W=new G.I9Y;W.copyFrom(B.worldPosition),W.subtract(k.worldPosition);const q={percent:0};j&&(j.shouldFollow=!1),V.q.instance.game.add.tween(q,this).to({percent:1},U,G.GS3.Quadratic.InOut,!0).onUpdateCallback((()=>{k.setPosition(H.x+W.x*q.percent,H.y+W.y*q.percent)})).onTweenComplete.addOnce((()=>{k.setPosition(H.x+W.x,H.y+W.y),F&&j&&(j.shouldFollow=!0),$()}))}))})),tt=k=>(0,F.sH)(void 0,void 0,void 0,(function*(){return new Promise((B=>{W.rD.runDialogueSequence(k,B)}))})),et=(k,B)=>{k.active=B},it=(k,B)=>{k.Active=B},st=(k,B)=>{k.setPosition(B.x,B.y)},nt=(k,B,U,G)=>(0,F.sH)(void 0,void 0,void 0,(function*(){return new Promise((F=>{const j=B.GameObject.transform,$=k.findPath(j.worldPosition,U),H=()=>{G&&j.setScale(j.worldPosition.x{G.Aq$.isDefined(k)||B.setPath([{x:U,y:j}],F),k.findPath(B.x,B.y,U,j,!0).then((k=>{k?F(k):$()})).catch((()=>$()))}));yield rt(B,...F)}))}function rt(k,...B){return(0,F.sH)(this,void 0,void 0,(function*(){yield new Promise((U=>{B.reverse(),k.setPath(B,U)}))}))}const ot=(k,B,U,G,j)=>(0,F.sH)(void 0,void 0,void 0,(function*(){return new Promise((F=>{let $;$=G?{x:G.x,y:G.y}:{x:k.worldPosition.x,y:k.worldPosition.y};const H=V.q.instance.game.add.tween($,this),W=()=>{V.q.instance.game.tweens.remove(H)};H.to({x:B.x,y:B.y},U,j,!0).onUpdateCallback((()=>{k.setPosition($.x,$.y)})),H.onTweenComplete.addOnce((()=>{k.OnDestroy.remove(W,this),k.setPosition(B.x,B.y),F()})),k.OnDestroy.addOnce(W,this)}))})),ht=(k,B,U,j)=>(0,F.sH)(void 0,void 0,void 0,(function*(){return new Promise((F=>{let $;$=j?{x:j.x,y:j.y}:{x:k.worldScale.x,y:k.worldScale.y};const H=V.q.instance.game.add.tween($,this),W=()=>{V.q.instance.game.tweens.remove(H)};H.to({x:B.x,y:B.y},U,G.GS3.Quadratic.InOut,!0).onUpdateCallback((()=>{k.setScale($.x,$.y)})),H.onTweenComplete.addOnce((()=>{k.OnDestroy.remove(W,this),k.setScale(B.x,B.y),F()})),k.OnDestroy.addOnce(W,this)}))})),ct=(k,B,U,j,$)=>(0,F.sH)(void 0,void 0,void 0,(function*(){let F=null!=$?$:B.anchoredPivotOffset;if(F={x:F.x,y:F.y},!(new G.I9Y(U.x,U.y).getDistanceSq(new G.I9Y(F.x,F.y))<=0))return new Promise(($=>{const H=k.add.tween(F,this),W=()=>{V.q.instance.game.tweens.remove(H)};H.to({x:U.x,y:U.y},j,G.GS3.Quadratic.InOut,!0).onUpdateCallback((()=>{B.setAnchoredPivotOffset(F.x,F.y)})),H.onTweenComplete.addOnce((()=>{B.OnDestroy.remove(W,this),B.setAnchoredPivotOffset(U.x,U.y),$()})),B.OnDestroy.addOnce(W,this)}))}));function dt(k,B,...U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=V.q.instance.game.add.tween(B,k,!0);for(const k of U)F.to($().omit(k,"duration","ease","delay"),k.duration,k.ease,!0,k.delay);yield F.onTweenComplete.asPromise()}))}const lt=(k,B)=>{if(k.input.enabled=B,!B){k.input.reset();for(let B=0;B(0,F.sH)(void 0,void 0,void 0,(function*(){return new Promise((U=>{k.time.events.addTimer(B,U,this)}))}));function ft(k,B){k.faceToward(B.x),B.faceToward(k.x)}},13956:(k,B,U)=>{"use strict";U.d(B,{b:()=>G});var F=U(35120);function G(k,B=!0){return(U,G)=>{Object.defineProperty(U,G,{get(){const U=F.q.instance.prodigy.gameContainer.get(k);return B&&null!==U&&Object.defineProperty(this,G,{get:()=>U}),U},configurable:!0})}}},34234:(k,B,U)=>{"use strict";U.d(B,{d:()=>G});var F=U(62459);const G=(k,B=!0)=>(U,G)=>{Object.defineProperty(U,G,{get(){const U=F.wa5.getActiveScene().container.get(k);return B&&null!==U&&Object.defineProperty(this,G,{get:()=>U}),U},configurable:!0})}},26932:(k,B,U)=>{"use strict";U.d(B,{z:()=>$});var F=U(8674),G=U(62459),j=U(26004);class $ extends G.uAl{bindContext(){}unbindContext(){}updateValue(k,B,U){const F=null!=U?U:this._context,G=F.Container;F.getInjectedValue(k)!==B&&(G.rebind(k).toConstantValue(B),this.consumeInjection(F,k))}consumeInjection(k,B){var U;try{k.GameObject.findComponentsInChildren(j.B).filter((k=>k.id===B)).forEach((k=>k.consume()))}catch(F){let j=`Error updating value for identifier: ${B}`;j+=`\n in context: ${null===(U=null==k?void 0:k.GameObject)||void 0===U?void 0:U.name}`,G.VyI.log(`${j}\n${String(F)}`,G.$bb.Error)}}}(0,F.Cg)([(0,G.Pqz)(G.bE_),(0,F.Sn)("design:type",G.bE_)],$.prototype,"_context",void 0)},26004:(k,B,U)=>{"use strict";U.d(B,{B:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this.onCreated=new G.HN0,this.onInject=new G.HN0,this.onInjectNoParams=new G.HN0,this._isSpreadArray=!1,this._consumeOnCreate=!0,this.consumeOnUpdatedInjectedValue=!0}get id(){return this._id}create(){super.create(),this._consumeOnCreate&&this.consume(),this.onCreated.dispatch()}consume(){const k=this.getInjectedValue(this.id);G.Aq$.isDefined(k)&&(this._targetProperty&&(Array.isArray(this._targetComponent[this._targetProperty])?this._isSpreadArray?this._targetComponent[this._targetProperty].push(...k):this._targetComponent[this._targetProperty].push(k):this._isSpreadArray?G.VyI.log("Value has not been set!",G.$bb.Error):this._targetComponent[this._targetProperty]=k),this._isSpreadArray&&Array.isArray(k)?this.onInject.dispatch(...k):this.onInject.dispatch(k),this.onInjectNoParams.dispatch())}destroy(){this.onCreated.dispose(),this.onInject.dispose(),this.onInjectNoParams.dispose(),super.destroy()}};(0,F.Cg)([(0,G.W_S)(),(0,G.YLv)("A unique ID to use for injection"),(0,F.Sn)("design:type",String)],$.prototype,"_id",void 0),(0,F.Cg)([(0,G.MnK)(G.uAl),(0,G.YLv)("The component to which the injected value should be assigned"),(0,F.Sn)("design:type",G.uAl)],$.prototype,"_targetComponent",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.YLv)("The name of the property that should receive the injected value"),(0,F.Sn)("design:type",String)],$.prototype,"_targetProperty",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,G.YLv)("Fired after `consume()` being run on creation"),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onCreated",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onInject",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onInjectNoParams",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_isSpreadArray",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_consumeOnCreate",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"consumeOnUpdatedInjectedValue",void 0),$=(0,F.Cg)([(0,G.EVk)("InjectionConsume",j.Y.injection,"Consumes the injected value and assigns the value to the referenced property")],$)},97071:(k,B,U)=>{"use strict";U.d(B,{p:()=>J});var F=U(62459),G=U(35120),j=U(2221),$=U(8674),H=U(67255);class V{constructor(k){this.game=null,this.game=k}playDialogue(k,B){return(0,$.sH)(this,void 0,void 0,(function*(){return new Promise((U=>{const F=new H.Z(this.game);for(let k=0;k{U()}))}))}))}}class W extends F.JTX{constructor(){super(...arguments),this.onClose=new F.HN0,this.titleKey="",this.messageKey="",this.confirmButtonKey=""}get OnClose(){return this.onClose}get TitleKey(){return this.titleKey}set TitleKey(k){this.titleKey=k}get MessageKey(){return this.messageKey}set MessageKey(k){this.messageKey=k}get ConfirmButtonKey(){return this.confirmButtonKey}set ConfirmButtonKey(k){this.confirmButtonKey=k}open(){const k=G.q.instance.prodigy.open.coOpModal({title:""===this.titleKey?null:this.localization.getText(this.titleKey),body:this.localization.getText(this.messageKey),greenButton:{text:this.localization.getText(this.confirmButtonKey),callback:()=>{this.onClose.dispatch()}}});this.GameObject.legacyTransform.group.addChild(k)}destroy(){this.onClose.dispose(),super.destroy()}}(0,$.Cg)([(0,F.fFd)("Localization"),(0,$.Sn)("design:type",F.dTp)],W.prototype,"localization",void 0);class q extends F.s3P{constructor(k){super(k)}showMessage(k,B,U){const G=new F._mx(this.menuLayer);G.addComponent(F.K16);const j=G.addComponent(W);return j.TitleKey=B,j.MessageKey=k,j.ConfirmButtonKey=U,j}}(0,$.Cg)([(0,F.fFd)("MenuLayer"),(0,$.Sn)("design:type",F._mx)],q.prototype,"menuLayer",void 0);var K=U(5668),z=U(79009),Y=U(95925),Q=U(17425);class X extends F.s3P{constructor(k,B){super(k),this.audioPlayer=null,this.audioPlayer=B}playSoundEffectClip(k,B){const U=Q.K.getAssetID("sfx",k);return this.assetLoader.isLoaded(U,Y.i.Sound)?this.audioPlayer.playSFX(k,B):(this.assetLoader.loadAssets([U]).then((()=>{this.playSoundEffectClip(k,B)})),null)}playSoundEffect(k,B){const U=Q.K.getAssetID("sfx",k);return this.assetLoader.isLoaded(U,Y.i.Sound)?this.audioPlayer.playSound(k,B):(this.assetLoader.loadAssets([U]).then((()=>{this.playSoundEffect(k,B)})),null)}playMusic(k){const B=`bgm-${k}`;this.assetLoader.isLoaded(B,Y.i.Music)?this.audioPlayer.playBGM(k,!0):this.assetLoader.loadAssets([B]).then((()=>{this.playMusic(k)}))}stopMusic(){this.audioPlayer.pauseBGM()}}(0,$.Cg)([(0,F.fFd)(F.t5G.AssetLoader),(0,$.Sn)("design:type",Object)],X.prototype,"assetLoader",void 0);class Z{constructor(k){this.breadcrumbManager=null,this.breadcrumbManager=k}isComplete(k,B){return this.breadcrumbManager.isBreadcrumbComplete(k,B)}completeBreadcrumb(k,B){this.breadcrumbManager.completeBreadcrumb(k,B)}}class J extends F.PQK{constructor(k){super(),this.game=k}installBindings(){const k=G.q.instance.prodigy.gameContainer,B=k.get(F.t5G.AssetLoader),$=k.get("784-6416");this.Container.bind(F.t5G.AssetLoader).toConstantValue(B),this.Container.bind("ImageTinter").toConstantValue($),this.Container.bind("AnimationData").toConstantValue(new z.F(U(34500))),this.Container.bind("BreadcrumbService").toConstantValue(new Z(G.q.instance.prodigy.breadcrumbManager)),this.Container.bind("DialogueFactory").toConstantValue(new V(this.game)),this.Container.bind("Localization").toConstantValue(k.get(F.$Bt.LocalizationService)),this.Container.bind("c5f-aceb").toConstantValue(new K.D(this.Container,G.q.instance.prodigy.gameContainer.get("c97-bd0d"))),this.Container.bind("CurrentPlayer").toConstantValue(k.get("e20-0fb0")),this.Container.bind("AudioPlayer").toConstantValue(new X(this.Container,G.q.instance.prodigy.audio)),this.Container.bind("FeatureFlags").toConstantValue(k.get("80c-6fa4")),this.Container.bind("d30-0043").toConstantValue(new q(this.Container)),this.Container.bind("PrizeProvider").toConstantValue(new j.f(this.Container)),this.Container.bind("DataDogLogger").toConstantValue(k.get("e59-eea6"))}}},46:(k,B,U)=>{"use strict";U.d(B,{C:()=>$});var F=U(8674),G=U(62459);const j=window.EasyStar;U(34829);class ${constructor(k,B=20){this.callbacks=[],this.lowPriorityPathfinderInUse=!1,this.init(k,B)}addCallback(k,B,U){this.callbacks.push({ID:k,callback:B,mainPlayerRequired:U})}init(k,B=20){this.area=k,this.size=B}getCallback(k,B,U){for(const F of this.callbacks)if(F.ID===this.getNodeValue(k,B)&&(!G.Aq$.isDefined(F.mainPlayerRequired)||!F.mainPlayerRequired||U))return F.callback;return null}xyToTile(k,B){return new G.I9Y(Math.floor(k/this.size),Math.floor(B/this.size))}tileToXY(k,B){return new G.I9Y(Math.floor((k+.5)*this.size),Math.floor((B+.5)*this.size))}findPath(k,B,U,G){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U,F,G=!0){return new Promise((j=>{this.findPathInternal(k,B,U,F,j,G,!1)}))}))}findPathSync(k,B,U,F){let G=null;return this.findPathInternal(k,B,U,F,(k=>{G=k}),!0,!0),G}findPathInternal(k,B,U,F,$,H,V){if(this.lowPriorityPathfinderInUse&&!H)return void G.VyI.log("findPath failed. Already finding a path.",G.$bb.Warning);H||(this.lowPriorityPathfinderInUse=!0);let W=Math.floor(k/this.size),q=Math.floor(B/this.size),K=Math.floor(U/this.size),z=Math.floor(F/this.size);W=W>63?63:W<0?0:W,K=K>63?63:K<0?0:K,q=q>35?35:q<0?0:q,z=z>35?35:z<0?0:z;const Y=new j.js;Y.setGrid(this.area),Y.setAcceptableTiles([1,2,3,4,5]),Y.findPath(W,q,K,z,this.processPath.bind(this,U,F,$,H)),V?Y.enableSync():Y.disableSync(),Y.calculate()}processPath(k,B,U,F,j){let $=null;if(G.Aq$.isDefined(j)){const U=[];U.push(j[0]);for(let k=j.length-1;k>0&&U[U.length-1]!==j[k];k--){this.findNodeBetween(U[U.length-1],j[k])||(U.push(j[k]),k=j.length)}$=[];for(let k=U.length-1;k>0;k--)U[k].x*=this.size,U[k].y*=this.size,$.push(U[k]);$[0]=new G.I9Y(k,B)}G.Aq$.isDefined(U)&&U($),F||(this.lowPriorityPathfinderInUse=!1)}findNodeBetween(k,B){let U=B.x-k.x,F=B.y-k.y;const j=Math.abs(U)>=Math.abs(F)?Math.abs(U):Math.abs(F);if(0===j)return k;U/=j,F/=j;let $=k.x,H=k.y,V=k;for(;$!==B.x||H!==B.y;){if($+=U,H+=F,(U>0&&$>B.x||U<0&&$0&&H>B.y||F<0&&H0&&6!==U}getNodeValue(k,B){return B=0&&k=0?this.area[B][k]:-1}isPathBlocked(k,B,U,F){const j=this.findNodeBetween(new G.I9Y(Math.floor(k/this.size),Math.floor(B/this.size)),new G.I9Y(Math.floor(U/this.size),Math.floor(F/this.size)));return G.Aq$.isDefined(j)}reset(){this.lowPriorityPathfinderInUse=!1}}},24110:(k,B,U)=>{"use strict";U.d(B,{B:()=>H});var F=U(8674),G=U(62459),j=U(72055),$=U(28152);let H=class extends j.Q{};H=(0,F.Cg)([(0,G.EVk)("SortingAnchor",$.Y.map,"Deprecated use BaseRenderComponent instead")],H)},53885:(k,B,U)=>{"use strict";U.d(B,{u:()=>V});var F=U(8674),G=U(62459),j=U(68910),$=U(72055),H=U(28152);let V=class extends $.Q{create(){super.create(),this._updateTicker=j.Ticker.shared.add(this.gameObject.update,this.gameObject),this._groupContainer.onDestroy.addOnce((()=>{var k;null===(k=this.gameObject)||void 0===k||k.destroy()}),this)}destroy(){this._updateTicker&&this.gameObject&&this._updateTicker.remove(this.gameObject.update,this.gameObject),this._updateTicker=null,this._groupContainer.onDestroy.removeAll(this),super.destroy()}overridePIXIUpdateFunction(){}resetPIXIUpdateFunction(){}};V=(0,F.Cg)([(0,G.EVk)("GroupRelay",H.Y.root)],V)},68370:(k,B,U)=>{"use strict";U.d(B,{b:()=>W});var F,G=U(8674),j=U(62459),$=U(35120),H=U(34829),V=U(28152);let W=F=class extends j.y4o{constructor(){super(...arguments),this._parentGroup=null}static make(k,B){const U=k.addComponent(F,!1);return U._legacyTransformTarget=B,U.create(),U}create(){super.create(),this._parentGroup=$.q.instance.game.add.group(null,`${this.GameObject.name} - LegacyTransformRelay`),this.setRootContainer(this._parentGroup),this._legacyTransformTarget&&(this.reParentLegacyTransform(),this._legacyTransformTarget.GameObject.onHierarchyChanged.add(this.reParentLegacyTransform,this,-H.s.MAX_SAFE_INTEGER))}destroy(){var k;this._legacyTransformTarget&&(this._parentGroup.removeChild(this._legacyTransformTarget.group),null===(k=this._legacyTransformTarget.GameObject)||void 0===k||k.onHierarchyChanged.remove(this.reParentLegacyTransform,this)),this._parentGroup.destroy(),super.destroy()}getDimensions(){return new j.or0(this._legacyTransformTarget.width,this._legacyTransformTarget.height)}reParentLegacyTransform(){this._parentGroup.addChild(this._legacyTransformTarget.group)}};(0,G.Cg)([(0,j.MnK)(j.K16),(0,G.Sn)("design:type",j.K16)],W.prototype,"_legacyTransformTarget",void 0),W=F=(0,G.Cg)([(0,j.EVk)("LegacyTransformRelay",V.Y.root)],W)},73402:(k,B,U)=>{"use strict";U.d(B,{N:()=>W});var F,G=U(8674),j=U(62459),$=U(68910),H=U(28152),V=U(53885);let W=F=class extends j.dLy{constructor(){super(...arguments),this._displayObject=null,this._initialValues={}}get localPosition(){return this.worldPosition}set localPosition(k){this._initialValues?this._initialValues.position=k:this._displayObject.position.set(k.x,k.y)}get localScale(){return this.worldScale}set localScale(k){this._initialValues?this._initialValues.scale=k:this._displayObject.scale.set(k.x,k.y)}get localRotation(){var k,B;return null!==(B=null===(k=this._displayObject)||void 0===k?void 0:k.rotation)&&void 0!==B?B:0}set localRotation(k){this._initialValues?this._initialValues.rotation=k:this._displayObject.rotation=k}get localMatrix(){return this.worldMatrix}get worldMatrix(){var k,B;return null!==(B=null===(k=this._displayObject)||void 0===k?void 0:k.worldTransform)&&void 0!==B?B:new $.Matrix}getReadonlyWorldMatrix(){var k,B;const U=null!==(B=null===(k=this._displayObject)||void 0===k?void 0:k.worldTransform)&&void 0!==B?B:new $.Matrix;return new j.E1D(U.a,U.c,U.b,U.d,U.tx,U.ty)}get worldPosition(){var k,B;const U=null!==(B=null===(k=this._displayObject)||void 0===k?void 0:k.worldTransform)&&void 0!==B?B:new $.Matrix;return new j.I9Y(U.tx,U.ty)}get worldScale(){var k,B;const U=null!==(B=null===(k=this._displayObject)||void 0===k?void 0:k.worldTransform)&&void 0!==B?B:new $.Matrix;return new j.I9Y(U.a,U.d)}static make(k,B){const U=k.addComponent(F,!1);return U._groupRelayComponent=B,U.create(),U}create(){super.create();const k=this._groupRelayComponent.getRootContainer();k?(this._displayObject=k,this.applyInitialValues()):this._groupRelayComponent.onRootContainerSet.addOnce((()=>{this._displayObject=this._groupRelayComponent.getRootContainer(),this.applyInitialValues()}))}applyInitialValues(){this._initialValues&&(this._initialValues.position&&this._displayObject.position.set(this._initialValues.position.x,this._initialValues.position.y),this._initialValues.scale&&this._displayObject.scale.set(this._initialValues.scale.x,this._initialValues.scale.y),void 0!==this._initialValues.rotation&&(this._displayObject.rotation=this._initialValues.rotation),this._initialValues=void 0)}recalculateWorldTransform(){const k=this._displayObject.transform._worldID;k!==this._pixiTransform._worldID&&(this._pixiTransform.worldTransform.copyFrom(this._displayObject.worldTransform),this._pixiTransform._worldID=k)}recalculateTransform(){const k=this._displayObject.transform._localID;k!==this._pixiTransform._localID&&(this._pixiTransform.localTransform.copyFrom(this._displayObject.localTransform),this._pixiTransform._localID=k)}};(0,G.Cg)([(0,j.Pqz)(V.u),(0,G.Sn)("design:type",V.u)],W.prototype,"_groupRelayComponent",void 0),W=F=(0,G.Cg)([(0,j.EVk)("TransformRelay",H.Y.root)],W)},65165:(k,B,U)=>{"use strict";U.d(B,{k:()=>K});var F=U(8674),G=U(62459),j=U(10044),$=U(35120),H=U(77801),V=U(28152),W=U(88060),q=U(23082);let K=class extends G.JTX{constructor(){super(...arguments),this._tooCloseThresholdPixels=20,this.onComplete=new G.HN0,this._alwaysCompletes=!1,this._forceLegacyPathfinding=!1}run(){var k;const B=this.GameObject.transform.worldPosition;if(!this._playerPathfinder||this._forceLegacyPathfinding)return this._tileScreen=$.q.instance.game.state.get(q.G.TileScreen),void((null===(k=this._tileScreen)||void 0===k?void 0:k.user)&&this._tileScreen.user.setValidPath(this._tileScreen.path,B.x,B.y,(()=>this.pathCompleted())));const U=this._playerPathfinder.pathTo(B.x,B.y);if(U||this._beelineOnFailure)U||this._playerLocomotion.setPath([this._playerLocomotion.GameObject.transform.worldPosition,B]),this._playerLocomotion.onPathStart.add(this.clearPathListeners,this),this._alwaysCompletes?this._playerLocomotion.onPathEnd.add(this.ensureCompletion,this):this._playerLocomotion.onPathComplete.add(this.pathCompleted,this);else if(!U){const k=this._playerLocomotion.GameObject.transform.worldPosition,U=B;G.cj9.distance(k.x,k.y,U.x,U.y){"use strict";U.d(B,{Z:()=>W});var F,G=U(8674),j=U(62459),$=U(79687),H=U(95891),V=U(35120);let W=F=class{constructor(){var k,B,U;this._nextLimitLower=Number.MAX_SAFE_INTEGER,this._nextLimitRaise=0,this._recentFramerates=[],this._lastFramerateMeasure=0,this._fpsTimer=V.q.instance.game.fps;const G=V.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("remotePlayerDisplayLimit");this._playerLimitMin=null!==(k=null==G?void 0:G.min)&&void 0!==k?k:F.PLAYER_LIMIT_MIN,this._playerLimitMax=null!==(B=null==G?void 0:G.max)&&void 0!==B?B:F.PLAYER_LIMIT_MAX,this._evaluateIntervalMs=null!==(U=null==G?void 0:G.interval)&&void 0!==U?U:F.EVALUATE_INTERVAL_MS}init(){const k=Math.min(this._playerLimitMax,F.INITIAL_PLAYER_LIMIT_MAX);this._currentPlayerLimit=j.cj9.clamp(Math.floor(j.cj9.mapLinear(this._fpsTimer.getAverageFramerate(),F.INITIAL_FPS_INDICATION_MIN,F.INITIAL_FPS_INDICATION_MAX,this._playerLimitMin,k)),this._playerLimitMin,k)}enteredZone(){this._nextLimitLower=Date.now()+F.FPS_STABILIZATION_TIME_MS,this.resetFpsAverage()}evaluateLimit(k,B){const U=this.getFramerate(),G=Date.now(),$=this._currentPlayerLimit;return U=this._nextLimitLower&&(this._currentPlayerLimit=Math.max(this._playerLimitMin,Math.floor(k*U/F.FPS_ADJUST_LOWER_THRESHOLD)),this._nextLimitLower=G+this._evaluateIntervalMs,this._nextLimitRaise=G+F.PLAYER_LIMIT_LOWER_BACKOFF_MS,this.resetFpsAverage()):this._nextLimitLower=G+this._evaluateIntervalMs,k>=this._currentPlayerLimit&&U>F.FPS_ADJUST_UPPER_THRESHOLD&&B>k*F.FPS_ADJUST_VISIBLE_PLAYER_RATIO&&G>=this._nextLimitRaise&&(this._currentPlayerLimit=Math.min(this._playerLimitMax,Math.ceil(k*U/F.FPS_ADJUST_UPPER_THRESHOLD)),this._nextLimitRaise=G+this._evaluateIntervalMs,this.resetFpsAverage()),this._currentPlayerLimit!==$&&j.VyI.log(`Changing player limit from ${$} to ${this._currentPlayerLimit}. Average FPS: ${U}. Visible Players: ${B}`,j.$bb.Verbose),this._currentPlayerLimit}getFramerate(){const k=Date.now();return k>=this._lastFramerateMeasure+1e3&&(this._recentFramerates.length>=F.FPS_AVERAGE_TIME_S&&this._recentFramerates.shift(),this._recentFramerates.push(this._fpsTimer.getFramerate()),this._averageFramerate=H.sum(this._recentFramerates)/this._recentFramerates.length,this._lastFramerateMeasure=k),this._averageFramerate}resetFpsAverage(){this._lastFramerateMeasure=Date.now(),this._recentFramerates.length=0}};W.FPS_ADJUST_LOWER_THRESHOLD=25,W.FPS_ADJUST_UPPER_THRESHOLD=40,W.FPS_ADJUST_VISIBLE_PLAYER_RATIO=.8,W.FPS_STABILIZATION_TIME_MS=2e3,W.EVALUATE_INTERVAL_MS=5e3,W.FPS_AVERAGE_TIME_S=10,W.PLAYER_LIMIT_MIN=5,W.PLAYER_LIMIT_MAX=30,W.INITIAL_FPS_INDICATION_MIN=20,W.INITIAL_FPS_INDICATION_MAX=60,W.INITIAL_PLAYER_LIMIT_MAX=30,W.PLAYER_LIMIT_LOWER_BACKOFF_MS=3e4,W=F=(0,G.Cg)([(0,$.injectable)(),(0,G.Sn)("design:paramtypes",[])],W)},65116:(k,B,U)=>{"use strict";U.d(B,{$:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(40392);let H=class extends G.uAl{constructor(){super(...arguments),this._onAllowed=new G.HN0}check(){const k=this.mapTag.split("-")[0];$.i.isZoneLocked(k)?$.i.openLockMessage(k):this._onAllowed.dispatch()}destroy(){this._onAllowed.dispose(),super.destroy()}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"mapTag",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"_onAllowed",void 0),H=(0,F.Cg)([(0,G.EVk)("CanTeleport",j.Y.MapTeleport)],H)},49037:(k,B,U)=>{"use strict";U.d(B,{q:()=>q});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(40392),V=U(4631),W=U(73678);let q=class extends G.uAl{constructor(){super(...arguments),this.mapTag="",this.goToDefaultMap=!1}teleport(){const k=j.q.instance.prodigy.world.getCurrentZone(),B=j.q.instance.prodigy.world.getZone(k||W.A_.HOUSE),U=this.mapTag.split("-")[0],F=H.i.getZoneData(U),G=this.goToDefaultMap?H.i.getDefaultMapForZone(F):this.mapTag;B.handleLeaving(V.j.teleport,(()=>j.q.instance.prodigy.world.it(G)))}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],q.prototype,"mapTag",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],q.prototype,"goToDefaultMap",void 0),q=(0,F.Cg)([(0,G.EVk)("TeleportToZone",$.Y.MapTeleport)],q)},54336:(k,B,U)=>{"use strict";U.d(B,{s:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(30488);let H=class extends $.E{constructor(){super(...arguments),this.radius=160}containsTarget(){const k=this.GameObject.transform.worldPosition,B=this.target.transform.worldPosition,U=G.C1c.getDistanceSq(k,B);return 0!==U&&U<=this.radius*this.radius}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"radius",void 0),H=(0,F.Cg)([(0,G.EVk)("CircleTrigger",j.Y.trigger)],H)},30488:(k,B,U)=>{"use strict";U.d(B,{E:()=>j});var F=U(8674),G=U(62459);class j extends G.y4o{constructor(){super(...arguments),this.onEnter=new G.HN0,this.onExit=new G.HN0,this._isTargetInBounds=!1,this._allowTriggerOnCreate=!0}create(){var k;super.create(),!this._allowTriggerOnCreate&&(null===(k=this.target)||void 0===k?void 0:k.active)&&this.containsTarget()&&(this._isTargetInBounds=!0)}update(){var k;if(super.update(),null===(k=this.target)||void 0===k?void 0:k.active){const k=this.containsTarget();this._isTargetInBounds?k||this.onExit.dispatch(this.target.transform.worldPosition):k&&this.onEnter.dispatch(this.target.transform.worldPosition),this._isTargetInBounds=k}}destroy(){this.onEnter.dispose(),this.onExit.dispose(),super.destroy()}getDimensions(){return G.or0.ZERO}}(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"onEnter",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"onExit",void 0),(0,F.Cg)([(0,G.Cdj)("TriggerTarget"),(0,F.Sn)("design:type",G._mx)],j.prototype,"target",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],j.prototype,"_allowTriggerOnCreate",void 0)},65826:(k,B,U)=>{"use strict";U.d(B,{P:()=>G,b:()=>Q});var F,G,j=U(8674),$=U(62459),H=U(79687),V=U(35120),W=U(73722),q=U(73797),K=U(64582),z=U(80403),Y=U(16887);!function(k){k.NotRequired="NOT_REQUIRED",k.NotRequested="NOT_REQUESTED",k.Requested="REQUESTED",k.Approved="GRANTED",k.Denied="DENIED",k.Revoked="REVOKED"}(G||(G={}));let Q=F=class{get consentStatus(){return this._consentStatus}get gracePeriodDaysLeft(){if(!this._gracePeriodEndDate)return 0;const k=new Date(V.q.instance.prodigy.timeManager.getServerTimeMs()),B=Date.UTC(k.getUTCFullYear(),k.getUTCMonth(),k.getUTCDate()),U=new Date(this._gracePeriodEndDate),F=Date.UTC(U.getUTCFullYear(),U.getUTCMonth(),U.getUTCDate());return Math.max(0,1.1574074074074074e-8*Math.round(F-B))}get gracePeriodMsLeft(){var k;return Math.max(0,(null!==(k=this._gracePeriodEndDate)&&void 0!==k?k:0)-Date.now())}constructor(k,B,U,F,G){this.onConsentStatusChange=new $.HN0,this.onGracePeriodDaysLeftSet=new $.HN0,this.onGracePeriodMsLeftSet=new $.HN0,this._graphQl=k,this._localizer=B,this._segment=U,this._featureRequirements=G,V.q.instance.prodigy.game.broadcaster.addAppListener(q.H3.MembershipResponseReceived,this.handleMembershipChange,this),F.getData().then((()=>this.scheduleNextFetch(0))).catch((k=>{$.VyI.log(`Could not get geolocation while checking consent status, ${k.message}`,$.$bb.Error),this.scheduleNextFetch(0)}))}sendConsentRequest(k){return(0,j.sH)(this,void 0,void 0,(function*(){let B;try{const U=yield this._graphQl.sendRequest(F.SEND_CONSENT_REQUEST_MUTATION,{parentEmail:k});if(!z.K.responseIsGraphQLError(U))return void this.setConsentStatus(G.Requested);const j=`GRAPHQL_ERROR_${z.K.getGraphQLErrorCode(U)}`,$=this._localizer.getText(j);$!==j&&(B=$)}catch(e){$.VyI.log(`Error sending consent request: ${$.RQr.stringify(e)}`,$.$bb.Error)}return Promise.reject(new Error(null!=B?B:this._localizer.getText("GRAPHQL_ERROR_DEFAULT")))}))}static getConsentStatusMessage(k){return V.q.instance.prodigy.gameContainer.get($.$Bt.LocalizationService).getText(F.CONSENT_STATUS_ACTION_MESSAGES[k])}static statusRequiresConsent(k){return[G.NotRequested,G.Requested].includes(k)}handleMembershipChange(k){"success"===k&&(this.setConsentStatus(G.NotRequired),V.q.instance.prodigy.game.broadcaster.removeAppListener(q.H3.MembershipResponseReceived,this.handleMembershipChange))}scheduleNextFetch(k=F.STATUS_UPDATE_CHECK_INTERVAL_MS){this._fetchTimeout||("school"!==W.V.instance.selectedLocation&&this._featureRequirements.meetsRequirementsDeprecated(28)?this._fetchTimeout=window.setTimeout((()=>{this.fetchStatus().catch((k=>{$.VyI.log(`Error fetching consent status: ${$.RQr.stringify(k)}. Retrying.`,$.$bb.Error),this.scheduleNextFetch()}))}),k):this.setConsentStatus(G.NotRequired))}cancelNextFetch(){this._fetchTimeout&&(window.clearTimeout(this._fetchTimeout),this._fetchTimeout=null)}fetchStatus(){return(0,j.sH)(this,void 0,void 0,(function*(){var k,B,U,G,j,H,V;this._fetchTimeout=null;const W=yield this._graphQl.sendRequest(F.CONSENT_STATUS_QUERY),q=null===(U=null===(B=null===(k=null==W?void 0:W.data)||void 0===k?void 0:k.viewer)||void 0===B?void 0:B.parentalConsent)||void 0===U?void 0:U.inGameDialogStatus,K=new Date(null===(V=null===(H=null===(j=null===(G=null==W?void 0:W.data)||void 0===G?void 0:G.viewer)||void 0===j?void 0:j.parentalConsent)||void 0===H?void 0:H.gracePeriod)||void 0===V?void 0:V.expiresAt).getTime();return q&&this.setConsentStatus(q),$.Aq$.isDefined(K)&&this.setGracePeriodEndDate(K),q}))}setConsentStatus(k){switch(this._consentStatus!==k&&(this._consentStatus=k,this.onConsentStatusChange.dispatch(k)),this._consentStatus){case G.Approved:this._segment.consent.sendFunnelAdvancedSegmentEvent(Y.g.StepThree,Y.f.PermissionGranted);case G.NotRequired:case G.NotRequested:this.cancelNextFetch();break;case G.Requested:default:this.scheduleNextFetch()}}setGracePeriodEndDate(k){this._gracePeriodEndDate=k,this.onGracePeriodDaysLeftSet.dispatch(this.gracePeriodDaysLeft),this.onGracePeriodMsLeftSet.dispatch(this.gracePeriodMsLeft)}};Q.STATUS_UPDATE_CHECK_INTERVAL_MS=6e5,Q.CONSENT_STATUS_ACTION_MESSAGES={[G.NotRequired]:"PARENTAL_CONSENT_NOT_REQUIRED",[G.NotRequested]:"PARENTAL_CONSENT_NOT_REQUESTED",[G.Requested]:"PARENTAL_CONSENT_REQUESTED",[G.Approved]:"PARENTAL_CONSENT_APPROVED",[G.Denied]:"",[G.Revoked]:""},Q.CONSENT_STATUS_QUERY="\n query getParentalConsent {\n viewer {\n parentalConsent {\n inGameDialogStatus,\n gracePeriod {\n expiresAt\n }\n }\n }\n }\n ",Q.SEND_CONSENT_REQUEST_MUTATION="\n mutation createParentalConsentRequest($parentEmail: EmailAddress!) {\n createParentalConsentRequest(input: { parentEmail: $parentEmail }) {\n parentalConsentRequest {\n id\n }\n }\n }\n ",Q=F=(0,j.Cg)([(0,H.injectable)(),(0,j.Qj)(0,(0,H.inject)("8bb-7057")),(0,j.Qj)(1,(0,H.inject)($.$Bt.LocalizationService)),(0,j.Qj)(2,(0,H.inject)("c47-20b6")),(0,j.Qj)(3,(0,H.inject)("fab-547a")),(0,j.Qj)(4,(0,H.inject)("db5-fb6e")),(0,j.Sn)("design:paramtypes",[z.K,$.dTp,Function,K.O,Object])],Q)},15016:(k,B,U)=>{"use strict";U.d(B,{R:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(99625),H=U(73722),V=U(65826);class W{showBanner(k){const B=new G.kBN(((U,F)=>{this.loadBanner().then((U=>{B.cancelled||!U||U.isDestroyed||k.addChild(U)})).catch((k=>{F(k)}))}));return B}hideBanner(){this._gameObject&&(this._gameObject.destroy(),this._gameObject=null),G.Aq$.isDefined(this._gameObjectLoadPromise)&&(this._gameObjectLoadPromise.cancel(),this._gameObjectLoadPromise=null)}getBannerGameObject(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;return null===(k=this._gameObjectLoadPromise)||void 0===k?void 0:k.promise}))}loadBanner(){return(0,F.sH)(this,void 0,void 0,(function*(){if(G.Aq$.isDefined(this._gameObjectLoadPromise))return this._gameObjectLoadPromise;if("school"===H.V.instance.selectedLocation)return Promise.resolve(this._gameObject);switch(this._parentalConsentService||(this._parentalConsentService=j.q.instance.prodigy.gameContainer.get("580-3bea")),this._parentalConsentService.consentStatus){case V.P.NotRequired:case V.P.Approved:return Promise.resolve(this._gameObject)}return this._gameObjectLoadPromise=j.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID($.l.ParentalConsentBanner).then((k=>this._gameObject=k)).catch(G.RQr.createHandler("Unable to load consent banner")),this._gameObjectLoadPromise}))}}W.HUD_RESERVE_HEIGHT=70},20597:(k,B,U)=>{"use strict";U.d(B,{B:()=>V});var F=U(8674),G=U(62459),j=U(51941),$=U(131);class H extends $.w{constructor(){super(...arguments),this.fileExtension="petgear"}}let V=class extends j.c{};(0,F.Cg)([(0,G.SZi)(),(0,G.tW2)("petgear"),(0,F.Sn)("design:type",Array)],V.prototype,"gear",void 0),V=(0,F.Cg)([(0,G.WR4)(H),(0,G.EVk)("PetGearManager",G.YH6.animation)],V)},32500:(k,B,U)=>{"use strict";U.d(B,{h:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this.emotes=[],this.emoteAssets=[]}postCreate(){super.postCreate(),this._playerData&&(j.q.instance.prodigy.load.assets(this.emotes,this.loadEmotes.bind(this)),this.emoteAssets&&this._playerData.isActivePlayer()&&(j.q.instance.prodigy.gameContainer.get("e20-0fb0").player.emotes=this.emoteAssets))}loadEmotes(){for(const k of this.emotes)if(G.Aq$.isDefined(k)&&0!==k.length){const B=j.q.instance.game.cache.getJSON(k);B&&this.emoteAssets.push(B)}}};(0,F.Cg)([(0,G.Cdj)("377-3e7b"),(0,F.Sn)("design:type",Object)],H.prototype,"_playerData",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.tW2)("emote"),(0,F.Sn)("design:type",Array)],H.prototype,"emotes",void 0),H=(0,F.Cg)([(0,G.EVk)("EmoteManager",$.Y.animation)],H)},62889:(k,B,U)=>{"use strict";U.d(B,{M:()=>V});var F=U(8674),G=U(57975),j=U.n(G),$=U(62459),H=U(35120);class V{static loadGearElementFromGuid(k){return(0,F.sH)(this,void 0,void 0,(function*(){H.q.instance.game.cache.checkJSONKey(k)||(yield H.q.instance.prodigy.load.assetsAsPromise([k]));const B=H.q.instance.game.cache.getJSON(k);return B?$.KDe.fromGearFile(B):($.RQr.createHandler(`[GearFileUtil] No content for ${k}`),null)}))}static makeGear(k,B,U){const F=new $.KDe;let G=B;if(U.isDir(k)){U.readdirSync(k,!0).filter((k=>k.endsWith(".meta"))).forEach((B=>{const G=JSON.parse(U.readFileSync(j().join(k,B)).toString());let $=j().basename(B);$=$.substring(0,$.indexOf(".")),F.attachments.push({imageGuid:G.guid,name:$})}))}else{G=`${j().join(j().dirname(B),j().basename(B).split(".")[0])}.gear`;const $=`${k}.meta`,H=JSON.parse(U.readFileSync($).toString());F.attachments.push({imageGuid:H.guid,name:"weapon"})}U.writeToPath(G,$.KDe.toGearFile(F))}static generateGearHelperNode(k,B){const U=[$._Lw.halfBlankLine()],F=j().join(k.getAssetsPath(),B),G=k.getChildFolders(F,!1);let H=0,V=0,W=0;G.forEach((G=>{const q=j().join(F,G,B),K=j().join(F,G,"images"),z=k.readdirSync(q).map((k=>j().basename(k,`.${B}`))),Y=k.readdirSync(K);H+=z.length;const Q=this.findGearMissingImageFolder(z,Y,j().join(F,G),k,B),X=this.findImageFolderMissingGear(z,Y,q,K,k,B);0===Q.length&&0===X.length?U.push($.ly.create({id:`found-${B}-${G}`,labelValue:`✅ Found ${z.length} ${G} .${B} files.`})):(0!==X.length&&(V+=X.length,U.push($.ly.create({id:`missing-${B}-${G}`,labelValue:`⚠️ Found ${X.length} missing ${G} .${B} files.`})),U.push($.XRp.createVertical(X,{isCollapsible:!0,startCollapsed:!0,title:`Missing ${G} ${B} info`}))),0!==Q.length&&(W+=Q.length,U.push($.ly.create({id:`missing-image-${G}`,labelValue:`⚠️ Found ${Q.length} missing ${G} image refs in .${B} files.`})),U.push($.XRp.createVertical(Q,{isCollapsible:!0,startCollapsed:!0,title:`Missing ${G} image info`}))))}));let q="";return V>0&&(q=` ${V} .${B} files missing!`),W>0&&(q+=` ${W} images missing!`),q.length||(q=` ${H} .${B} files in project.`),$.XRp.createVerticalContainer(U,{isCollapsible:!0,startCollapsed:!0,title:`Global Gears -${q}`})}static findGearMissingImageFolder(k,B,U,F,G){const H=[];return k.forEach((k=>{if(-1===B.indexOf(k)&&-1===B.indexOf(`${k}.png`)&&-1===B.indexOf(`${k}.svg`))H.push($.XRp.createHorizontal([$.ly.create({labelValue:`Cant find image/folder for ${k}.`,id:`missing-${k}`}),$.X9M.create({buttonText:"Open Gear Folder",id:`open-gear-${k}`,buttonIcon:$.a2l.Gear,onClick:()=>{F.externalOpenFolder(j().join(U,G))}}),$.X9M.create({buttonText:"Open Image Folder",id:`open-image-${k}`,buttonIcon:$.a2l.Image,onClick:()=>{F.externalOpenFolder(j().join(U,"images"))}})]));else{const B=j().join(U,G,`${k}.${G}`),V=$.KDe.fromGearFile(JSON.parse(F.readFileSync(B).toString()));V?V.attachments.forEach(((G,W)=>{!!F.getFilePath(G.imageGuid)||H.push($.XRp.createVertical([$.ly.create({id:`missing-${k}-image-guid-${G.name}`,labelValue:`⚠️ ${k} can't find ${G.name} guid ${G.imageGuid} in project`}),$.X9M.create({buttonText:"Open Image Folder",id:`open-image-${k}`,buttonIcon:$.a2l.Image,onClick:()=>{F.externalOpenFolder(j().join(U,"images",k))}}),$.X9M.create({buttonText:"Remove Gear Attachment",id:`remove-attachment-${k}`,buttonIcon:$.a2l.Eraser,onClick:()=>{V.attachments.splice(W,1),F.writeToPath(B,$.KDe.toGearFile(V))}})]))})):H.push($.ly.create({id:`failed-to-load-gear-${k}`,labelValue:`⚠️ Failed to parse ${k}`}))}})),H}static findImageFolderMissingGear(k,B,U,F,G,H){const W=[];for(let q=0;q{G.externalOpenFolder(k)}})])):W.push($.XRp.createHorizontal([$.ly.create({id:"missing-gear-label",labelValue:`${B[q]} imageSets missing .${H}.`}),$.X9M.create({id:"missing-gear-fix",buttonText:"Create Gear",buttonIcon:$.a2l.Gear,onClick:()=>{const k=j().join(U,`${B[q]}.${H}`);V.makeGear(j().join(F,B[q]),k,G),G.setEditorBrowserPath(k)}})]))}return W}}},51941:(k,B,U)=>{"use strict";U.d(B,{c:()=>K});var F=U(8674),G=U(62459),j=U(68910),$=U(88818),H=U(35120),V=U(17425),W=U(131),q=U(8900);let K=class extends G.a5k{create(){super.create(),this.attachmentToSlotMap=new Map($.e9),this.slotToAttachmentMap=new Map($.$6),this.initialAtlasFrames=$.yG}refresh(){const k=Object.create(null,{refresh:{get:()=>super.refresh}});return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,j;if((null===(B=this.spine)||void 0===B?void 0:B.pendingDestroy)||(null===(U=this.spine)||void 0===U?void 0:U.destroyed)){const k=null!==(j=null===(F=this.gameObject.findComponent(G.v2j))||void 0===F?void 0:F.getSpine())&&void 0!==j?j:null;if(!k)return void G.VyI.log(`[GearManagerComponent] Spine was destroyed, and could not be found on gameobject ${this.gameObject.name}`,G.$bb.Warning);this.spine=k}this.gear.length&&(yield this.applyGearFiles()),yield k.refresh.call(this),this.cacheCurrentAssets()}))}applyGearFiles(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.loadGearFiles(this.gear);const k=[];this.gear.forEach((B=>{if(null==B?void 0:B.length){const U=G.W$e.instance.game.cache.getJSON(B);if(U){const F=G.KDe.fromGearFile(U);F?k.push(this.addGear(F,!1)):G.VyI.log(`[GearManagerComponent] could not find gear element json ${B}`,G.$bb.Warning)}}})),yield Promise.all(k)}))}cacheCurrentAssets(){V.K.cacheAssets(H.q.instance.game,this.gear,V.K.zoneAssetsCached),V.K.cacheAssets(H.q.instance.game,this._allCurrentImageGuids,V.K.zoneAssetsCached)}getSizeForAttachment(k,B){var U,F;const G=k.name;if(q.M.instance.faceAttachments.includes(G))return new j.Rectangle(4*B.x,4*B.y,4*B.width,4*B.height);if(q.M.instance.eyeAttachments.includes(G))return new j.Rectangle(4*B.x,4*B.y,4*B.width*(null!==(U=k.scaleX)&&void 0!==U?U:1),4*B.height*(null!==(F=k.scaleY)&&void 0!==F?F:1));if(0===k.type){const B=k;return new j.Rectangle(B.x,B.y,B.width,B.height)}return super.getSizeForAttachment(k,B)}loadGearFiles(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=k.filter((k=>null==k?void 0:k.length));return B.every((k=>H.q.instance.game.cache.checkJSONKey(k)))?Promise.resolve():this.loadAssets(B)}))}loadImages(k){return(0,F.sH)(this,void 0,void 0,(function*(){return k.filter((k=>null==k?void 0:k.length)).every((k=>(null==k?void 0:k.length)&&H.q.instance.game.cache.checkImageKey(k)))?Promise.resolve():this.loadAssets(k)}))}loadAssets(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=new G.bnh;return H.q.instance.prodigy.load.assets(k,((k,U)=>{U?B.resolve():B.reject()})),B}))}};K=(0,F.Cg)([(0,G.WR4)(W.w),(0,G.EVk)("GearManager",G.YH6.animation)],K)},131:(k,B,U)=>{"use strict";U.d(B,{w:()=>j});var F=U(62459),G=U(62889);class j extends F.$KW{constructor(){super(...arguments),this.fileExtension="gear"}generate(k,B){const U=[];return U.push(G.M.generateGearHelperNode(this._editorAPI,this.fileExtension)),U.push(F._Lw.line()),U.push(F.X9M.create({id:"from-current",buttonText:"Set stored gear to seen gear",buttonIcon:F.a2l.FloppyDisk,onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{gear:this._editorAPI.getComponent(this._componentGuid).gear})}})),U.push(F.Gme.checkboxGroup({id:"autoRefresh",labelValue:"Auto Refresh",inputValue:k.autoRefresh})),U.push(F.IqD.create({id:"gear",label:"Gear",arrayType:F.bJb.JSONFile,value:k.gear,isReorderable:!0})),U.push(F.NyS.create({id:"onLoadComplete",label:"On Load Complete",signalValue:k.onLoadComplete,componentGUID:this._componentGuid})),F.XRp.createVertical(U)}}},36164:(k,B,U)=>{"use strict";U.d(B,{R:()=>F});class F{}F.bootMap=[null,"9b23f418-b0f1-4caf-8d48-7747f536d843","be0532e2-6ec0-41da-bc07-a4f56e1f0a14","3b505d42-998e-404a-bda8-987150c9e5c0","f290cdd8-ce7f-4591-9891-8a1b62480ceb","88b0ee52-e5b8-481d-bc05-bcfc50138ccc","e76d1209-5de2-49e0-90bb-77631418b7f4","8291490a-2fcc-493d-90d9-1d45506c3452","01974512-4dd8-4dc5-a608-dcf1f35ad9e9","06e67157-a93f-41da-a737-4237b1f1fc40","18f3cfe9-72a5-4734-ab0e-980770cfbd07","80105eb9-8c26-4084-93e9-40436181b7d2","fdca1530-e5c4-489a-bc73-c4b725ac6c07","46cdfbd4-d8bc-460a-a104-06dbdcfa636d","fd430113-2fae-437d-9bde-df7340f9d50f","4cc687fa-7ab7-4a96-9ea0-adbee3598a1d","ac867e17-4a3b-4a15-89f0-1332375b3fcf","195c3d1e-f252-49fd-961c-a83e4ed0dced","4950fb58-7988-47a1-8375-b712f3cd60d6","f10f518e-e978-425e-b130-741f5899ed44","0aef9759-acc3-40e0-aaab-01d29347edf4","3f4ac484-e21c-4cc5-99db-c59759da61dd","6b6ad85f-05d7-4cef-886e-39fe9e4725db","fba6e2a0-2240-417f-82ba-be08a5c61ece","cc4aee55-ad28-4b6c-b7ca-8774db40aad4","703ab37e-3f42-40ce-951b-d898c8e2e9af","d5169702-eab6-4df5-a2f3-f789d63310d1","8f5e4dd3-6115-4292-b35e-986e3c96b8f3","6773c695-3b26-47b6-adbb-d93514883674","3dc1629e-1817-4bdc-a60a-0ec264f57b1e","91fe9a67-ed25-49be-a804-b1b6e5e28ec7","e2e9689c-67a8-4081-9eba-c7181549e887","24123a91-4a85-4a18-8c51-e78924d7388e","2745aefc-6a39-4143-9070-e9044f7f8f21","c4258995-bfcd-45ca-893a-fec26c3cda64","ce1b746e-ad96-47b1-86b9-6a5164702346","cbc2a038-826b-4f4a-8bf7-9f02ce158507","65a73de4-10e4-4b66-b62d-288af996a877","d5b1c815-52db-4cd4-b924-7c91296f1150",null,"185e46b4-cd22-4619-9a25-5ba13e425496","449cfff2-ded0-4f44-b030-a6e6a02f7ea8","3c679598-4717-46f5-b619-7afc6e97d4e4","584276b1-6457-4e52-8647-74b8781409e5","24e2aff7-c838-4ec4-a719-a64bef6a472b","a059c886-2117-4e52-8ef0-74f0f9b87ead","13955743-cade-4475-9c20-5dcc3c9aff9d","225f4e07-48ef-4bad-bb62-57335e94c137","a00655fc-3a2e-4774-9995-150926446ff4","d7d387d8-c986-4317-bd1d-41edc7d55b2e","05b7b955-b9c2-4243-a3be-b3c18b7212ed","7925c800-7659-4b70-9a1c-92c5f9373bb2","d71da1c3-9eb3-4d12-946c-c4a98ae9fc1d","45fcb32d-567e-4a5a-97ae-2e85d9c909f7","a9ff1de5-727c-4e34-a91e-cd1e9d200881","f89da926-e3ff-4180-bea7-272804ba85e7",null,"1ca59a0e-7bbe-4827-973f-5d7ca20ce6eb","15952221-c14d-47ea-869e-69431bbe17bb","0aeb50cf-6f43-4b99-9c51-f4ca83c4e475",null,"7dfcc871-c063-4578-b105-9128a2402725",null,null,null,null,null,null,null,"6ee2fe88-32f9-44b6-8ee0-db774ed09211",null,null,null,null,null,null,null,null,null,"3619c3ee-ae04-42ed-a420-e4925462de24","89f1ccf7-4ae6-40be-aeb2-c113d309cdda","10bbd0ab-136a-49b3-be11-f0a7adf03404","b5931c7d-f864-4333-b202-d9e135be0031","4a4892d5-7bb6-4c9f-855f-987112ad9f50","80d80b66-ead8-4a5e-93be-00398349d636","8a57f5a6-c841-495c-8784-a6f8d8ed3d7f","457d6ace-a891-4eb0-aa7a-999ea0d53d32","4898ef23-23be-4d0b-bdc7-19a82918103b","a740279d-997c-4881-a942-ed551062aa3b","cfe754e9-7450-4b46-9335-23d5cded5c98","ada44228-7f1c-4ac6-9f4d-d1debb96d3a8","f487e290-61d1-4094-9b6a-b7c12eb4fc68","f71122a0-16e5-4e59-8245-505d0cb06a8e","8e2c3891-c330-4a21-b27f-43a4329de362","4049d341-ee70-40f0-9cb0-77096a00d53c",null,null,null,null,null,null,null,"5a032a4d-b87a-46ba-9468-aea45995ca8a",null,null,"f9733b3d-c797-4506-ab02-55bc047cf743",null,"4451af13-f78a-48f0-a89d-c0766ffb24a6","22901e67-6507-49f7-ba3f-c3a3b89f0a39","489f2045-bcad-435f-9f67-5acaf75f281b",null,"0a73cdfb-aa6b-4f15-80b3-4cc25cc0c753","f9e61c40-48fc-4f3c-87d3-a6873519b94e","1c7825ef-1d0d-410a-b58c-d5d7b36febf2",null,"fab552ba-caa5-4846-b0e8-b7fa9481effc","d4c31a01-52cb-41b1-be2b-cdce89a99f0c","f76ff7a8-da83-444a-8cfb-e6bbff11428b","d937671c-78bf-4a7b-837a-12d518d0a084","d1187e0c-abf3-47e6-9c03-7fc9c744024e","af819033-d9e1-4639-961b-bd138131e021","4d8fe963-55a8-418e-b883-d544f20ba00a","22c4ea64-7d4d-4dcd-ab09-0e37b128ce42","fbbf8435-1d6d-4b4e-977c-54036903d3ed","7d7d6ac1-d363-4743-90c7-f98692991ae1","6d9a275f-0597-4c52-a431-022b2f2fde79",null,null,null,null,"ccf1752b-e743-46bd-a704-6a55c42a5187","10128200-2750-4532-aa09-95b146fbec4b","f4d514b8-344f-4742-9ae3-c7f47f560a16","18ba2923-7cf6-4bea-a333-a8a7d6a7f475","9596050d-27ba-45d9-bac9-1caafaa821a4",null,"41bf81f1-f627-4d15-bb88-0ca8ffe8f11c",null,null,"f650873d-1fcd-405b-9fa5-3d7a70ebbde6","a7280f42-f1d5-423f-8410-3ba5439fd9d6","9c803051-841f-4a17-8fef-ba11c17399e5","8deb5fe0-cffb-40b9-b08b-06160407e413","f8cb917f-1b8c-4a55-90a0-865648ff1ac3","2e69b782-0ce5-42d6-aeed-0acea3e19953","0f7cc291-2252-49e5-8640-f518ee80e286","f9ae24c1-a56a-4366-ad6a-0fc206cfefd5","55474e0d-24ee-4970-8b04-13bd7f53e335","86866bb1-9b75-4aa1-a103-ea99271ac935","9008f09c-c52e-4322-8699-c0f9678cfd20","3c27276d-5c0e-4b88-b09c-2efe11852cb7","662969bf-1777-4969-9f10-bd0e96246cfb","1593aac8-9e91-4ca0-8b09-6b32fd8cbcb6","a294cd42-bc9e-4096-806f-89f105a839e1","bebdfa20-6884-4d3d-85e3-1e8692bfb87c","8fef84f3-3261-4931-a650-5647e7bc5235","5db6f2b0-d2cd-4b27-90a3-e3c30ceed27d","be302dac-53d6-4d07-a896-d5d89b3358ac","ecbc977b-5f50-4f38-9ef3-4a2e7b4b23e3","63e0ad07-8e05-4d1e-a318-498120e68754","39e0deb3-06de-422d-840e-797466a69b14","93683764-f1d8-4b97-9e27-6bc5100969ee","f27333fe-3108-4bf5-bb36-7e5f5c0b66a4","490bc74d-4f68-4a7d-a8f7-b5f2473f04bd","6f217862-e537-4847-acd0-a3c1d1174b1f","d418593c-21de-4c1f-8d6e-2d594872a9e1","addbaed5-62af-42f4-85ff-02d0867708af","211fdc93-cf34-4857-a5af-d66f537788c8","dfcde975-952a-43fa-b31b-8f141eb1fbd0","6bdc9ff1-b357-49ee-ab6b-18908f83ce99","acc5f2fc-ea80-4e10-93d1-face68b598b3","d7c691c9-7b1f-400b-867b-629bc132acc1","34157ee5-0fbc-494c-bbf6-afe731cd8608","2b0b2208-9906-47b2-a722-f7dfeaf4388f","d647832a-bea1-4555-a266-ef32694ccf6e","0c1c54b6-65fc-4a5c-ab1c-37d83dd144bc","aa43b3ad-f7cb-4697-b251-e0f505c8c3e7","7626acfc-b8ea-4685-aa06-ddd675ed8870","ac713c01-4fa9-4654-87a7-35d98577d98c","4b04c6de-f501-4b74-8dbf-a7c49dfa105d"],F.bootUpscaledMap=[null,"df75c613-c0af-4257-9866-07b31b617349"],F.costumeMap=[null,"1b859ced-9819-479f-b00c-456e1009f5fc","e1fb79a2-41f1-4013-af4a-9623cf6534e9","2db0c39c-8fcc-47c1-8a60-b9b72c4d352f","967f95ef-88d3-453f-85a6-23c348c02bfa","44230432-098e-4cf4-b4d3-9efc07f1984b","058e018f-ef9c-4161-aa5b-822d9c63cfda","2daf28f9-9a6b-4db1-862e-470d6973df26"],F.faceMap=[null,"c9061655-2a68-4dcc-8f51-549b52ee450c","6548d5d4-1a1d-46b1-80c0-8ddd094cfbea","b596337b-c25e-4966-9646-af9144c75ef0","ec08daeb-2d82-4455-ad7c-6526075c3ebf","0780a14b-b8a3-4f67-84aa-bbc248c4ea89","b648467a-2ca5-4bb3-a256-65c06cae76a5","a7fd169b-7f00-4398-b239-cab46f7258c1","ec3223d7-d4fa-469f-9b34-c20c4087715e","adb927ec-a8fc-4089-b14f-b6cf5529af42","e4e0506d-8f24-4a5f-be22-7e8366a0e211","5c046140-a88d-49ca-8fd0-56acf50d917a","a5c1fa0a-72ee-4c96-9874-188837dfae71","b2e6bbc5-16d6-46dd-9586-9ee4f801263e","1d1d53e7-1b4e-4132-9b06-714105bad06c","72c00425-a3b1-448e-a4e9-ef71512d65d3","ca919e57-7c52-4fb9-ae58-faed3d5aed16","2af0a5d4-5e39-4b34-94bf-5b9cc32a53d6","63f0d439-2017-4266-ba6e-bf80e8cfd1ad","5b45bf9f-fa1d-4964-ad7f-f43d38c81255","e174a819-fa9f-4741-8141-1b9881d6588d"],F.faceUpscaledMap=[null,"ff6e114a-1785-4a49-826f-4befec76e513"],F.hairMap=[null,"8dfe2b54-d037-493f-902c-057a04e26a5b","ad92f9aa-c7af-47d8-89db-a8e22761fddc","5a1df131-1f90-48ed-b44b-861bdbcf6590","e2df1d1b-cf80-4060-81d0-a69af0f08c2b","005227a0-92f9-4b97-81a2-829986b7169f","ecf27096-e440-4b17-b37e-1fa41fe5dd90","cbd74c3d-c13a-4ac9-984c-c82707f57480","afdd9023-64bb-449a-bf1e-d2ec974852d1","f1607715-b2f3-465f-a427-b39f893397b2","7955c22d-2fdc-4de6-8a19-248cfb8fbe46","f90ce3ff-bb7c-4bb2-9e13-c473415c3f8b","6e7e94f4-5d11-4dd1-9a17-7982b82967f6","2f383d1d-c118-4234-af55-2ddc883c6832","97fdaf21-1a33-44bb-8e21-371c1fcc6e64","47ef11fb-0c8c-4961-9a0c-84ce109739d3","b4ba41e3-d5aa-4b22-8d30-af393a8fa623","a01c6408-48dd-4329-8c25-9d840e05f5ee","7b5a9b30-6ceb-41ab-90a4-a5d8de4bc9c2","948b6c85-9c39-4420-8a0b-9ea63251782d","29b3828f-4ca5-4db5-8bc9-8030f563b58c","b786edff-75db-4d99-b570-2de9bfad0eec","4408cfa9-3ec7-4269-a4ea-76ef701cf012","4717c262-b4ca-406a-a440-07f67dd161a6","c6a5b2e7-b3da-44b5-9dc6-4d4ff51e9d64","e162844c-0583-45fc-ae8f-627ca85e4939","90e0d8bd-2998-4cf7-8bd9-2559a55a9d69","eb8c47a7-acea-4bbd-8bf8-211ae79f1d23","af033f6a-b785-4976-9608-7e3ba6c6e1a5","221c6e68-1184-42f8-ac35-7bef09a7f819","483e08b8-a67d-45b7-9e29-d8e350b07077","c4307640-d3ac-4ec3-8d56-c1f0ac0715a7","89fe5f36-ba13-4fbf-b266-60ddd66a3887","da1c939d-a8bf-4f79-8d94-3eadfe4ece0b","448d057b-3b71-48cb-8716-540f56050bd2","1f8293f7-e5f9-442a-8cbd-5ac9edf46317","b7a66004-d694-4dc7-be27-09c6f92cc68f","4d846387-35fd-42c2-8878-ca4e8d434b78","deb9e7b0-dc73-407e-b0a4-f91a38553760","be6e4f00-91ad-4806-86f4-bd0665c78e5a","55d76f5a-3dfd-435a-be95-6e0f860e8a71","acf32a2c-cd89-42a3-aaca-a2e075742e10","9b10f66f-bb15-4225-a495-c286df7d7f5d","2dfcbc0b-1bcf-440b-b362-1f41b0625c2b","1cbe0731-708d-4763-b98f-20e512ce6bb6","ac15c812-fc57-4701-b30b-c17789b9257a","824d20ab-7338-4e63-ba64-779470be32af","2f48a7e9-1453-4bd2-ab00-1545671ef01b","9d300b6b-9823-455a-9007-f8265178cee3","5c58c5e6-2a77-4525-9e20-76bd25d32760","c9b54217-7744-4e99-b232-e582c98ac0b3","435790eb-46d3-4603-aeea-7b171959f23e","02b3e0d3-154a-4776-961a-24f6398957b6",null,"2a044c4b-d722-48af-8add-de6cbaaa922b","7d390558-af96-46b4-8e3b-8d113331a0b8","ceb34e8c-1ed0-4c9f-b8b4-cce0d1ab37ce","916d987d-784d-459c-83bf-2abdd12832cc","94ccb602-e683-4e74-aaa3-8705b620907f","5dfba483-2538-4aab-a3ca-1bb52b0794e8"],F.hairUpscaledMap=[null,null,null,null,null,"dc697ab7-8c53-443b-ad8f-85a30d20b89b",null,null,null,null,"e344980e-4bb5-4c14-9cbe-d401d3a3c3ce",null,null,null,null,null,null,null,null,null,"cbf3c878-db67-421a-8364-f5c44f901462",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"5e303603-fefd-4b91-81c6-7655c952374f",null,null,null,"f6940105-9e08-4ac8-a05f-2bebed5ad262"],F.hatMap=[null,"db18ca1d-53e6-4a8a-8545-d3bea48926c2","7389327d-111a-42cd-964a-5c2a569e968f","2cbf703b-46aa-4890-ac64-62cb8f6c51c1","5d62ca11-a192-4d85-b759-942b77e18774","f0a232fd-3cb2-40ff-a878-c832b5377a65","e79f6aa5-b852-490f-b834-1ca2a4e47100","274ea8c3-6505-41ad-8ccb-334f0485ffe4","d6c741bd-6101-4306-a18e-b2ea8e3d8356","553ae1fb-05e7-4f7b-80d6-f123684fb0b8","e6c0c48d-9fca-46b2-b6cb-22cddba85acb","56c93c2d-32b0-4203-9ac0-4a7493d9f97e","5b6e69df-90f0-419f-b8cc-11216d4526ae","4995fd6e-b799-4042-a721-6d69a6a8a183","d5c33d74-aa16-46d9-ac98-7dae4591d7f2","70c7725d-69df-4a1a-8842-6712c469be80","8f2b6b09-f2bc-47f3-92cd-5dd9b4c165a5","6709c737-473a-4a10-b393-38d9038e5bd4","b44de21a-3a63-471b-abfc-c5f998f97177","836eb80a-8763-4d53-813c-04823260dbe7","8943b5b5-f75e-4c8f-bd87-a113768e2c96","488ce48b-f9d2-4107-82cc-ee369bc8e52f","a4062ddf-a1cb-4b50-bc7d-93017fef885a","a633b8ce-4e0b-4da0-af22-bd79c339157c","edc129d1-aab5-46cb-9853-f87e72aee046","5c9a1881-68f0-4686-89bc-e09a8fbebc10","e9a1efb6-2f80-45a1-905c-e68c19597a57","cdcabe12-14af-474d-a8ea-7b1b0651a47c","8d0316ca-8ddb-464f-901a-3c5c081ac499","8e1e82f0-07bb-46ad-bbd5-d5469d9f8590","90a7764f-1ac5-41ac-9e8a-3ed5bf980561","3c8d2422-a591-482d-acc4-aa9f1a8292aa","f97e80f2-f911-4f16-ba82-c7e1991b74af","d959d262-f91e-4020-88f5-ec9a0e219e6d","4d174773-98e4-432c-8e53-ceba62e64911","e2ba2827-5bf1-4eb6-9d01-dc476be16f4f","4b259e15-a8dc-40a1-b269-da8f0ab9685c","9995f06f-921e-475b-9946-23b734f13fb4","2bbc6eb4-8813-4d87-859e-9d75ab9d335e","af3e7791-7bcc-4236-9ab0-0c727d2c1899","6e9c82a3-aa8b-4bff-9654-86d770f23d83","ca8507dc-df36-459c-b385-b90b967b88ee","26a71cc0-b51f-4f72-a734-bd9cc810a6ea","87c8f836-9227-401f-a208-84078b71c021","b674368f-c7ec-4c85-808b-d727a045bf3a","d15fb78f-d3f8-401e-93b3-b029344ee45f","ae9b39bc-6f8e-49ee-bea6-cdd8295fd5bc","c97cccf4-42ae-4f94-ad02-c6d9895ed58e","8a9ad6bb-d8ed-4ba8-a159-f614cd865ed3","f48cbcdf-c5ad-4c98-b6a5-6aaa2f07e91a","61decef9-d38c-4712-81c9-391679b2b553","baa6266f-d6d5-446f-b75b-e8487cf31a63","47ecec61-13f5-4e2e-a9d2-06c9958174ef","ac384de9-776d-4eb8-8f1d-8084f1a44171","fe0fa775-a9c1-41cd-873d-aa2b86b9d7ca","d638e043-1282-45e5-9e6c-4170520c62c7","e88803b0-1c89-4f8a-a3bb-936e321ec0ce","16ac5120-9d38-4688-b83c-de8d148fee49","c10e33d9-c772-4917-89bb-19a4b2df4627","f5fdaf46-fbfd-41b0-b1d9-1934962d93ce","ac09155a-685e-4b23-914f-aa2f58df51ef","6a110c0e-97b0-4819-b7c4-6f2ffb2ffe17","54165677-2bca-44ac-9dfe-42db98b3c446","7cd87b12-88c4-477e-81a8-bdb3ce708b94","1b5ec853-d63f-4371-979e-ab2595258c8c","f030353f-ebaa-44bd-90ad-cee6de61d60e","96ccb2c5-cb8d-4fce-af20-e1834fea7c09","0be6c419-5c35-48ba-8012-43cbf274f2d8","ba8197e7-91a7-4f8e-9382-cb7b929516b7","1e674199-ba8a-44ca-89ac-10862c60735a","74b76909-1a34-431c-a37e-fd206b41f6bc","aaed306d-8613-484b-9756-d60bba895782","149d2c18-f327-40e3-88d7-a1937cd85535","8d545242-598e-4a04-9e2f-6dc43c18a11e","ba713937-f5fc-4ef2-acd6-cba4ad1460e6","33b93ca1-246c-40bb-be34-99eecce5a66d","b98e4724-9312-4347-8d58-7d086e1f5447","5be7d445-a501-4ba2-8b90-5b9622872a44","36073ba5-c38e-4b68-a5d6-f45190220079","c7975916-8104-4dae-9b7c-772f8ddecd37","dddefdba-4fe3-486e-abef-12c4e3399f08","86f24c92-9565-4f07-b480-e0727e21c8f8","1970bc93-30c8-4440-b62e-7f279780609f","ce569108-dee3-464d-ac1b-251e785f1f12","5e052b7e-4d03-4fb5-966a-251a07bbf5c0","434d6799-8745-427d-9c6d-d8e18c5480b4","c2563391-4174-4bca-a43e-7e90a1a7a636","2abcc418-9d6b-4fc3-b1b1-9cc55e10c21b","e13f4f0c-2e3f-46fd-a4e8-691930fda189","040cfc7e-1ed7-48ad-90e7-68bd5078549f","53509002-1476-48d4-9bd3-077ea25fb334",null,"352241e1-c7c1-4933-b40e-b773f24694d3","1c620fa9-e932-49e0-af95-e87a53206850","f3a513be-25af-46a3-bd23-2ef1a85bf1d1","d5cc8ca3-59fa-4302-bc93-249e0ab71eef","7fcfa3b3-d007-4be1-9c6a-2251453d39b9","e888dcfe-cfef-4a46-a55b-0128944656d3","b5f4fed4-457d-4056-bd20-759a94430bac","961dc65c-e7b2-4d0e-ad97-9f17eb3fe54f","6c993978-29fa-4d64-a01f-3ee0b10d9697","83b0961a-fbf3-4488-8cbf-d8b5ad5ae5ce","4a73a58e-28a8-4993-9633-833847087365","a0b32393-62c3-4714-90d7-7c98ad8258e7","e873a633-66dc-4955-a744-6ccce63b5f38","01da1228-fb6b-41df-8333-53abf77d2c16","fb099962-6b51-4b19-b1a9-41aca1823e73","c28c7c97-b9d2-49eb-b3e7-11345dc1cd77","582a395d-7e25-4916-86d0-2768a3dc7bad","3734c3b3-3991-4837-ba8a-66abfbd1cc34","e05220f7-8c8c-412c-99f3-0275113f8286","085ac0a5-7c07-4311-a181-f8910812bd10","34dbb94b-384e-4eaf-bb33-87bde2b66a9e","bbcaeac7-449c-4efa-8267-28a7097b4284","06b35e5d-13b4-4781-86d5-27d737735cb7","2783e01e-9819-4626-87e7-3d61fb3b712f","c2e91dc6-6099-4757-bd58-2f1ec492126d","e0ed3992-4b81-48bf-ba9f-6ed36a0dd3eb","b75dd2a1-e4a9-48a8-81eb-e1a49ba4f0ae","909d5b14-feb3-4696-8544-d86fd5e70128","73a992ad-d68b-4686-a12f-b09a37261626","d48d6d62-bbf3-4f1e-aa5b-84e09ac7913a","2d1eb47b-9c29-4c79-ae85-7ab56a7fc4fc","baac1bb4-cde0-4467-b71e-af725852309d","07e8d944-e5d9-4f0d-b0d6-385d8783175f","719835ce-5602-40d4-b5d2-fe6ba7c3d5ce","41c6b986-c80b-4977-83ef-8e89b9dfcb8c","365c2e7a-a710-4b75-a543-034fad76414f","105e6b8a-4ab2-4ea0-9421-cbc9a93d98db","557ad5ef-2b25-4e90-9e94-ffe01b33e0a4","e4daf0d8-7045-4c9c-ae07-2d31a884113f","f7a68408-101b-4095-9c01-9564fd3e687b","ae4bd80c-45f0-4cab-bdbf-ff39ef7a6d6b","58e3ebda-8e5e-43d5-92a8-e590da8e8415","d33ce612-2630-408f-b44c-74c0faf9f118","bb9e4294-ad13-4abc-af4f-dacf49fed9bd","07bff02f-cb9f-4acc-808c-32ff4fd4ea71","5c338ab0-f163-4315-bcdc-fd35d8059532","47a0fc8c-9a54-4b29-bbd8-275b27b026e1","b7ea522e-a5b2-4419-acd2-c83d03fc4761","8889582d-3ef1-4024-bd56-eb043d18e9ff","4eb906fe-33d9-4a56-9f09-bfa141bad1f1","debd58c4-1f8f-46be-9c9f-173114f8c9fa","811e5f51-6d5b-4104-b6e1-3ac4e97f485f","e03e9f72-e4d6-40a2-8c05-5de72ea70b70","6798ed67-ac2e-48d5-916b-467d4616e7cd","bfb5d764-e0b6-46c8-ac5e-058b0dc8295c","8d8c0e92-1697-4aff-869b-33c3a44b6fa4","1ab04d26-abff-4483-9ef3-45c9f7719d77","cb6bc2a1-d540-44b1-82d9-6d0ec59ed5f3","93b50095-4b55-4d31-a562-b969b8c099cd",null,"b69c63bc-ad58-4809-9308-a8897b07edb1","05460579-d75a-4adc-b178-53076466077e","046fb18b-fbcc-4dd4-b2b6-f176a13a2581","f0b0ad7f-7a8c-46b5-8782-2cc5dcb7110f","fa8f0633-6609-4a8a-900d-438bdf6df746","04a0f4ef-794c-4b0a-ba08-130e4fbace47","293e3ab4-1265-4519-82e1-e51db758dcf2",null,null,"69d681ad-a8eb-4a3e-b9a0-a7bb578ea52a","cfae53e8-ddd2-4677-ab95-289669adeb2f","7762d8b4-5299-43f8-982c-ffce8f3395ee","9103a474-2aa7-4469-b4e5-502eb1c9979a","9a1f2f8e-a101-4648-9455-18c35fe3bfc1","111d1631-4578-4971-90c5-a198df832a3e","f001779c-42c8-43e3-8cf1-f6f33deb2571",null,null,null,"19a7f114-b128-484c-be67-78baf5c87106","2490f3ed-105a-49ce-a630-11ee6912ad67","438508ec-4811-4b9e-8d92-ab18ff776057","d16b3091-a6fd-4b00-8e41-02ffef728d85","16525015-c413-465e-86be-ddfbcbe5aafa","587a9c09-e48a-4c79-ba38-3c16f1b14525","40dc3406-4921-4f9e-ab27-db6e5113ef1d","3732bfda-d9f6-4e23-bf57-faf381ce7ebb",null,"d6c9e03d-88aa-44f1-8f7e-16e29d705769","fadec8f3-03a0-456e-819d-363111004604",null,null,"26acfb4f-6ee1-40cc-8697-50660e8dd7c2","d5d8f2f4-e1fe-4068-9a76-60d508d436dc","e380813a-b1c7-431c-bc0f-408a38853cf9","93e160c7-43a9-42c7-99a0-13c16efeb5f9","ffd9d964-94cf-4773-acc1-cfdb2c160957","568ea19c-6bfd-44c2-949d-459b1ce05df9","9c073a11-bfb1-46b6-98c2-64e9ff15cfa5","e9d4cace-4382-482c-9c61-8ae18d1faa73","a4fca37c-c275-4571-a4e7-e91ddf8c7d97","d7f3aa1c-3a4b-4ea5-83a9-aafecad2dd98","643bf355-1bf2-45b7-a1dd-b45c6e8b9d03","c1e44c39-b32c-42aa-9703-7e0727e6e61f","44da787d-da3d-4c30-9e29-e8f75c73ab99","f6ba2fd0-5c4a-4653-96f9-138374246627","0b997443-48b3-4d55-bce0-2ebb35ad5c59","7e62e5e7-671e-4bbc-af8f-b906c856a4fa","3e1fe707-42e9-4a72-9085-62fb1725b7da","49eb9679-c7ed-4c2d-b677-4f0f17f84f83","127c2fca-9e6f-404e-8f80-59fc7338d686","a5320ea3-5d5b-40c4-9fc5-4a063d65c849","63d5ebb9-8549-42a2-bd91-0e708c565732","e49a8607-d251-4774-83f8-a6f44bb58741","53fed226-8b66-4e12-9a2f-d295c9a04b42","0ce0a471-6eb3-4043-8591-79c59bcefd2d","883c760a-5c0d-4a7c-bbc8-bc90c19d8bab","0744229c-02c8-4d0e-8af5-3a459f9ccc91","0c2c2c13-d502-45f9-9d95-a061be67d8ad","e257d9a6-3d21-45cf-8f5b-f8ae5493a5a8","c9dfe5de-a3e6-4810-b736-e67bdc5a1384","0c72006a-14ed-4b9e-9e11-253f60642ff0","359d792c-2c42-4e62-822d-73b952adb182","b7ba9461-7613-40fa-bb2c-6e1b7a8d1df5","8a34694a-ac36-4d82-8dad-4ccb5b983186","cf32cccb-2858-4a1c-ac2f-18569a9e4306","1f0330fa-2405-4852-8177-87934bbf3d8b","f0ad7f21-c598-4bc2-b219-9aa70f950909","b4e3cf67-15c5-4042-805c-89ab90e8f2d3","d7fa9700-8146-4336-a320-eca13ea59695","5425e2ad-8f30-429d-83e2-cecce4c5c95b","d73c17cb-bc65-4376-ab61-1a1485eeac49","2f8f136c-93a2-46a3-bf37-c2e4a92d2c0a",null,"3252876b-b451-4429-9ae7-1df419d4526a","1d0a0f67-9760-42cf-b11a-fff7f163030b","ca5a2e59-2967-45f6-854a-8aef4ef41fdd","360db781-a14d-4373-88a0-4292f51a75f3","4157f181-25a5-4dec-986f-d179606403c2","5af849b4-b957-49d7-8774-31b66d85c55f","924e9719-aa02-478e-aa1d-fb54fed5ef36","f7568327-245c-4582-b9f5-c582843ad913","ccf2b938-0e80-46e9-82cd-6ec4648d18b0","0bbcdd4f-fafd-4de9-aaf7-1dc39e2c09d1","cb6a471f-0a5a-4987-b3dd-8b7f5e926d1a","ab229c23-8823-401d-a931-962349d4558c","7a4855f6-3a44-4e2c-b46f-0317370a6dca","8cd6fd61-702c-43f6-8f93-30b2fc125c51","7b4e5b09-9f30-42db-9225-72e00fb67b78",null,"211ae5b2-96f2-49db-8c55-3a66cdfdc452","2cb4706c-43c6-48f2-b10d-5938f4216404","071dc712-e5a7-45fa-8796-341a80458bdf","1970cf63-c86d-4325-8f46-d63adc63f4b9","4cd4d7b8-7a5d-4e9c-89f4-e895025e0079","fd6f1194-3311-41da-9319-6cbcef174558","44374320-2a8a-4814-965f-aba11ec0ae61","dad45f9d-3ed7-40ec-9494-cf5c7930f77b","e2344933-24bf-4ddd-b807-5185d6b89758","dd493f01-a5a3-4482-b95e-0e91f2e1d4d1","311805eb-33f1-4979-9fd2-ad7172fa9676","6eff9aff-7346-4d07-80f7-b1eca5f1d5a3","3c46ef52-1f62-432e-bed7-038be1e9348a",null,"c1be3e04-891b-4da9-9619-cb40edfd27cc","10c7dc75-0f91-40a5-8ac4-a773f7af6dcb","212e27aa-debc-428d-865e-82ecad51315c","5a909a6f-1827-4945-82ea-b7b08cd7b43f","15d7adff-1ec2-44ac-9ae9-279c9c327e35","a2b61f5d-997c-4205-a58e-2e6b43544fa5","772818ff-8adb-4065-88e6-b8a6e4455501","2120c898-697c-42bc-a60d-d5c5d098b9b3","e0354f34-4ab3-40e0-b8e0-0d8100c38211","67688885-c5f7-4035-bab9-b575ebe09f3f","0899df99-ef8d-4a16-9681-99ebaaacb655","3692b02a-33e0-4a30-8a56-96fb642d9044","9225a03b-1bd2-4fb5-961b-8bd437370a74","4e672ea2-101c-4796-bbd2-54ef20275272","1265fb74-8450-4138-82e0-7c9f64ac19a2","22451af7-8059-47cb-92d0-bfde76bdf5f6","32c020db-8d57-4d8f-82b3-e8acf9913602","0e8b6ce2-223c-4623-9cc9-2faef9e2fcac","1149be1b-15f3-45cf-80e3-40c7b8d6ceae","e7e205fe-63c7-4d8e-bea6-f7bcb3c9df1a",null,"b0f62f7e-f6e0-4ee6-93b2-97243d1ddf88","2e7f0886-c916-42dd-b8e3-a05be0a50d9b","2d9d6419-76ec-466d-88ab-a018cb17a8d6","b72760ce-507e-4040-8839-33cd342b6560","80c9d8b5-bf88-48c5-86c7-f595ce70a542","8e191019-600f-418a-bc79-a2858b06e1da","79db3189-317d-439b-b622-aa626f9a7999","7e313a10-bed2-45e3-9325-88feb9020b84","dfc5eccf-e77c-4967-b690-2757e4fcd1ee"],F.hatUpscaledMap=[null,"3a2e9ab6-5a35-4f96-b404-38553c933b86",null,null,null,null,null,null,null,null,null,null,"7bec0f43-4ec3-48ba-9d1f-113189021896"],F.outfitMap=[null,"edd10623-53df-40fd-ad77-2f43d8e8481f","a64512d6-efc2-4111-b8fc-b343e6e91d54","098d0ae8-673d-4650-96bd-5e67976480a9","ca45da21-9914-46f7-ba4f-7dd646c4f47c","80a34e92-7fe7-4861-9967-0daf7cc9a181","88a284ff-a51f-4b85-80b5-08f6acb5b11b","f35ef825-5197-48b8-b4cf-1222a39d1263","9ce0daff-43ee-4ca3-b3e2-eea271ce998b","9e3ae004-cb14-466a-a2d3-eaeed5897822","88c9f6c2-e0aa-437a-97a8-0119ac878d2c","3afc0327-f1e8-461f-bb0a-d5d3eb227e79","8aa00362-959f-47b0-a482-efa991e87e39","034afba6-c852-456f-9c8a-4af1d8dffb18","959f5456-f022-42c6-b23f-24a2b19c9733","5b3b6fc4-4d58-41ec-8e3b-f8b236365a27","331f4f97-9623-4680-80c7-ce6c26cca185","67d638fc-b82f-4509-a75c-7251ac55f2ec","f258b6f0-9db3-4eb3-97ac-e6c7cfb0b902","37fdab08-2e11-4bfd-ae6a-aadf88791d30","5bf0249d-d700-45cd-8591-2cb8c4b8d885","20999087-d202-48e8-9944-f15ca294cd47","c9c85cbc-6c4a-41d2-83d4-fd312d7f9819","0a534c5e-d2d2-4a8b-bb19-e4e02febb1b3","34d287b6-29e6-4c47-80c7-170f174a8c07","c70524ab-bd03-4da9-8166-6fcd0b21735c","54d2f338-ab52-4360-a590-1bdc38445d1b","45e873c0-b9f4-4cdf-a017-c69dd4040229","9bbf3785-85dc-465d-974e-a3a91ee54582","5c35e250-ab4b-4f97-990a-71c541d79e2a","be14e0dd-8ea7-4d06-9c97-349f8098fff8","487fc777-435f-4b7a-98e6-620bcf22b6e4","6fedbc84-6025-4a3f-86b8-814249542c3a","c688c70d-a83b-4361-89a5-7f519cc8a090","3d5f2771-a0b3-4c96-a8f9-2a3a0cf9c1b8","90eea86d-d1be-4a95-8662-f75a9eea9e7d","c7ead47c-6c94-437c-b1f6-408e68a8a010","be4582e4-72fd-4dcd-877a-a552174aa65b","eb48891b-6688-43a4-816e-9af886723f52","0479f791-fd55-4796-ad12-24980ad054bd","1cf13d81-8032-4e5b-b9df-932d68af4552","3720b757-1f39-4ce5-b380-1ba0ffedbfb0","8e22738d-2f75-44a4-a9a3-362b7d43fb3f","326c15ab-64d1-4d90-86ef-51a027e00b4f","a4584d7d-26aa-47ae-bc74-c6087f6e10c0","b5115dbd-2ebd-4791-98ab-1d27c12d5b61","ec7e67dc-940e-48bf-ae94-41f4a4a22599","9ca421b8-7051-47c2-bfe7-f9ae51ebf206","48db52c4-cc71-4397-9103-7dca73c23742","f80d77b4-9296-49e6-b8b9-75c44e6ad25b","b0aabf10-f476-4203-a1c4-fb9acc0ce796","ac78daf8-22b3-43d0-b96c-8acbc579d52f","68fb51e0-d96a-46e0-bedd-87d7a0bb342a","3aa5af5b-5f6e-4a0a-b996-9cd4252cfbfd","2189afd5-57e9-432f-b682-3a9994cf2961","5e5b6236-78d9-4746-bcf7-f030b6b38cde","aea7833c-ec4b-4dc0-b32d-3dc0f8a52892","cc2003b5-f1ef-49f5-a573-c9179d03aa9b","24036ed0-89c0-4391-9123-5e9f8da88632","c07c87a9-562b-41e8-843d-52c401925d53","995d7c84-365f-4d2b-801c-7e9233cc0ee9","355596ad-7eb6-4246-8aac-20eece07eab7","3471fe3b-9c0f-4d91-b2ee-61de014f1657","4aa7b98c-8d6b-48de-909d-e73060d020d7","7c9972cf-9613-4ff4-b857-a79291b10e22","922567e4-5642-464f-9e7d-d8f145cc1352","3cb5fcba-1fff-4b05-ad3a-02d66059d119","2f2ca3d3-3418-4c21-b818-908b2a272b10","cb50c28c-90ee-43b7-8899-2cf9381292ed",null,null,null,"7a9275a3-9a6c-4a0c-833c-e5db4feee992","1774d42f-ed93-47dc-b489-6a768c6acd8a","9a1e04d8-3791-45c3-8dff-3f37e3000d48","3230bba4-3bf8-4d46-9370-e918ac4d04c9","a11d2ddf-d43f-4bb8-96da-38cb8aa1de65",null,"3fd3cec7-49f9-4417-b5f0-07ab3fe02e5b","af1ac1e7-fcd3-4f52-9f4a-68415622b514","3180fa94-710b-455e-abcd-0380d25186aa","f8fdd0d1-9a43-4dc0-b0e1-f5e424bbd2d7","de2e62a3-3804-4750-8ee3-527e4454b651","d560ffe9-3ee5-46c5-8f9f-41604cc596ad","baa36927-1ce6-4c84-88de-bf888d4d720a","fa8386d0-7b28-4765-a20d-07e1e75909a6","ab9fd7b4-54c8-413b-87d1-ab96e2108c83","9ca15b96-9079-4804-9c23-d2caeef42e5e","5951bc4e-3ef6-446d-b6fb-d920a8bddac8","964ed978-1567-43b0-aa5f-a8f51244eb6c","fa3d7607-30bc-4dcc-8824-ddc8603523a5","7b04738c-8881-481c-b95d-7cfb09b72dfc","e6f88b68-8939-420d-ab31-f0c2db0bf5b1","ad0cb732-d166-4a4a-9957-9ec0791e91af","580ab5e7-de69-42ee-aa70-a25581ae0629","d6e41a25-0ec5-4d9d-8b70-1d8c19c8af2f","269d67cc-fa28-4a8a-a71c-9278666ddc36","a6e98a32-e3a6-40d2-8a59-e91a9739ef98","e8830e01-92c7-4b45-83cc-1e7f310b453f","9f811740-a6ec-4acf-a294-e352f2445f06",null,"7909c471-040a-4e1e-a856-6128aba020a1","47ae845a-0e29-4b83-936f-544fc678f937","f22e0aa7-ca49-4350-a96b-40390999dfb6","fef9be16-d26b-4082-b952-cae8672713e0","3d23e05c-6262-4199-bcd0-249f704050dc","f398272a-4a99-4e78-ab5a-97d503b9ed90","62e479bc-d643-465e-b822-5bc92dcef8a4","cc5e532f-dc3b-4d64-b5ab-e9fb66876fa5","2bb0f757-950d-43ea-afd0-5cff16cbb73a","688a8899-0efc-4fa9-985c-ba2ecb9fbd4d","5999ab47-c666-4158-8a75-ae15ec312e75","2bf5d6b0-fd7a-4c13-8707-3b455326a9d8","777fdcad-abad-4d90-abba-76ea209b427c","a0c469de-c0c4-4db6-9962-16b4ecb27ff8","d963d0aa-3ebc-40a5-9cd0-73d17923f394","58b98e92-c091-41db-9917-198fe03913ed","f4989e1d-8a4c-46e5-94b0-2e184f0c4ebd",null,null,null,null,"bd659cfd-b96e-4d28-bde4-f4e20225d80e","24d49340-553c-451e-a0a5-d92bf29e5aba","f4a46535-92cb-490a-86a5-52e459792ac4","4d89f45a-cfd3-4837-a117-d2754b785f13","e958a21d-134b-4208-8a84-d903ef8dfa59",null,"67a8386c-4dd9-489c-80ca-23ee20add54c","edc207f2-6fb0-49c7-a5bf-45d0761188bf","53dec287-351d-4412-87b3-e3dbea73a1e5","bbca3517-04cb-4d1a-a01a-a3516f990620","e90b12b4-6bff-4006-a3de-a8bcd6941886",null,null,null,"55e273ce-d8f4-42d5-a542-aba094b9b91e","d16b3719-af8b-4123-b707-ffffc81dea41","f8ee42ec-911b-4395-b0ad-dd3ba4f9e2ce","3e5f47e3-4ced-4773-a00c-9ac6ce718daf","6c12d23a-02c2-40bb-82f1-88da0ba26586","ab1f6d33-b494-43ff-9a69-4151b932d518","32009ac1-e055-48ed-8ed4-dd0967aa4e8d","24022d2c-4353-43e1-a8e5-869a0f127071","83dbbd6f-970b-48f7-8403-ad01b0d7c32c","9da8cf5b-0c34-4517-b286-47ccefaf1781","34e9fe75-ab9a-43f1-8944-dc595803e7c8","de220f46-652b-4b1b-95c0-db82152912cf","1301ce98-e99d-450d-b717-51b96fc9c79b","afc994cc-0903-4f92-b138-e6c47056c41e","c058bf9b-d94a-4f0c-944b-8454c343b4f6","a0a999ac-9f78-4433-8bd4-d73062a44c1a","2791ca02-1502-496d-8af8-abc0891393ac","fa921c03-a953-4cd3-9b30-be07d8fbf734","bf281071-65c2-4c94-af4c-cf0b709e3cb9","d7650f98-48f0-4513-91c8-efc9265e265c","3a24b217-b0bb-4f24-8c81-c6b5e1aca834","875d0393-d21d-40cb-8054-5b2e5a450b96","f0ebedfc-7765-47f5-bc14-b15fe987b736","578a45e6-1bbd-48fd-9561-900faa3537fe","0f7f65d4-bf53-4f78-963c-f338cfe6b8ca","84fdc403-f0ac-4e7d-81a9-e2d887c1ac37","54029518-1634-4d54-9f90-76de697e196b","ab257659-3c39-445b-9221-0b38d35247fd","ac1c17c2-9c1e-45a8-9f55-50d3d54ac83d","b9a95efc-845f-4cc5-9610-ef7bdb9b5cc8","8201b178-aa26-401f-84e5-f1589814f7fc","78f25e89-7615-49e1-b2b4-7b44aea8683d","13ecd25c-8da4-41ef-8b57-2ceac6b9e8bb","74af95ac-2175-4a24-b78b-ca14edbfd517","d107ac84-013a-4c2a-b6bc-693d6c824dbc","ba2e0fd3-a8d5-4aec-8ed8-c7454f64d2a2","7837b8d0-f2c0-4777-b19c-4e5a478243d2","f3f9b5e2-a951-4b94-8f46-9277591f9875","ec0ad977-f8f1-4228-8d1c-c0185b3af278","165b81ac-a0d7-4325-be81-60c59b012879","d399c720-1e0d-4aee-9903-f1ee4d319aef","c6e4a6f1-d5a4-4fdd-8353-ab86e688358c","cedab087-38f5-433d-b0bf-74bebab4f1ee","383d3e35-5f78-4531-9be4-843baed472ef","d04ce7f3-c9e6-40ee-bab1-93c6365ee162",null,"77e1b710-ac30-40b4-aa36-3c9bbfe57590","5ac73c62-eabb-4ec5-80dc-4f1f964c2f73","fc853655-7fff-412d-89a6-ff8092a5267e","c20852b3-59b8-4338-9084-208bf79e102d","036e72e2-1138-459f-8a98-77eb42eb383d","5ef7e4d2-223c-4ca8-abce-775f7b8c5eb0","5cda9a33-1085-41ea-9bd7-ccef7af83f62","6f6caa11-ad3c-4f66-befd-9a1a09ceab46","57f695a0-ee64-455b-ae26-01cde6907c62","3328bdc0-8091-443c-aa38-303121eeba0f","b8715c07-43a3-46c3-a65c-e7e23ba5d189","5db0d9bf-85e7-411b-83df-0fe6285ec8cf","879e5476-1691-4272-aa14-5e275af924a4",null,"a6eb434b-f2c0-4b73-8883-7d600e0ad4bb","6a08af56-02ba-41eb-9629-5d3f09675caf","13a9ca5c-78d1-49bd-85de-17b1cb646470",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"3643c343-da18-4075-9e83-b21ed7703779","dcc94e6b-c8fb-4013-ad0d-40638fb7482f","63df99c6-9836-4d63-aedb-425687d44f71","16f9203d-1b03-4459-8060-98d1173a7ccf","864adf8b-dcaa-4e63-b431-37fccb0ecbb4","da72a99a-afc3-4a6e-a81d-75b9bc994089","ac33e829-2af5-4695-998c-8a25b83223df","3f76c7b5-f204-4a13-8816-43ea38e744b7","b53585e4-1383-431a-bee9-c2e8c724f523","61b96a3b-7cc9-4ca0-83ad-f53385e1ae1c","f88298fd-f572-4d23-ad17-8b67e8d29c3e","f2ae57ed-0502-4568-94c2-0303d3ea8d99","a431f88b-6500-4d77-b66f-97d451fed345","ffcd9e53-617c-4af6-8e17-a6e71f561131","de7e22fc-0604-453f-b1dd-29e6a5feaf7a","f59f5f0f-d730-4d71-96b4-cd3e71280f80","40b251a8-b289-4f5c-a4ed-a649ecb986d0","17ed2b86-3782-4290-9b3b-353964a07a2c","f59a68d1-74cb-42ee-a23d-3cb0aae637fb","0b700fd0-7714-4c29-9cfd-5ec202aa8fbc","443c5cd7-cd19-4c5e-a45b-74b4bf1dac5b","bb097a76-4d53-4293-84f9-5bc13979ca9d","69037be9-698e-477d-9b49-bb0cb07a4050","314cd99c-55d0-4506-9d41-3afc98ebbc01","8f06a4e3-a7f4-46b5-9aa5-37a243d541a4","9696cde2-bf4a-4fbf-a999-3e47a1dfd209","0d3d6329-18dc-4299-88e1-1a97b228187f","ac61b46f-ed19-435e-ae09-574c6f467c75","54f45e0f-399e-43e6-b0bf-684b7ea1c38c","34852ebc-0fd9-40a0-8816-96d4de885c7b","55ce92a6-faca-4212-ad2e-931ae85b8eaf","9a2f8617-ed56-4093-b60b-c882d15549d7","8907027e-edc2-4084-8660-ad66b3ebf69e","9460c4e0-3e19-4022-af69-fd1947aa882f","2d7b9632-f144-4662-bb71-347a1b1812d1","7a0f25ce-8b6b-4cad-8ebc-6745be931582"],F.outfitUpscaledMap=[null,"3f05fb83-d48e-4b42-bd76-494872e92a2b"],F.weaponMap=[null,"11878a2e-0c68-4cb5-a548-8e7cef3e679c","7dad9b15-4d35-4f3e-98f8-5cdc6bd88b95","595043fa-50f9-4b1b-b38d-ed87cfebeece","af5e6ff2-830d-4e8d-bb20-9a100a740860","53e0a07b-f911-4701-b006-3445483f6d7a","ab5c3b87-a0aa-4e4c-8a1b-700068cb7ec0","812046bb-02cf-4e18-8315-e98f2a97b8fa","e95b3e46-b73a-43a7-816f-0d6cfe1d39ed","1b44276e-a25f-48f1-b59a-a872643da288","533a42de-6948-422e-9327-84a28a962105","ce880839-d88a-4c15-8ef9-936ba6a1c0f2","87508d36-fdde-4493-8b9a-20069fffe302","71c93c49-9591-465d-841d-4c5897edc11b","eb66feb0-cbbe-426a-8bf4-21711b9dee1e","179729af-0e7b-4e09-b342-8d6bea1891f3","62f6f1f7-ebc0-4486-9ec7-52096c770106","900412e2-b85f-435c-85e1-aeab7a05aadb","f90a4c4d-6b49-41eb-a1d6-bf0184671cdc","c408634f-f116-45f8-8050-c6ae7631b333","90cd1579-529d-4533-abb7-bb48b60895be","6fba4fe4-5d9a-43d3-b7c8-d0a9680f9164","2a078d77-bb0f-4feb-b0ff-62d23108f6df","cb16fc74-7ac8-4792-9f56-2f9c00d3f42f","b0978c92-479c-47d2-9ee8-fbb6439a7b44","14ce706d-2296-42fb-ac96-1dbee2da12b8","42af54fd-81ac-48c0-b2af-08adf032b30d","4770f842-a01a-465e-95cd-c3de8256c6cc","1272cbbc-df16-4dbc-b054-484ee6965c94","47bbc901-5fbc-4105-a84d-3ed4f32ce647","a475f844-a67d-4d75-9f26-48628ddccc82","0dcd2f4b-eca1-4371-9c3c-e21820d980b2","728e51d5-178f-45fa-b00b-5dc90dc3395d","d4cdc841-6cf2-439b-be68-e8154add9619","2053dbdc-b9af-4170-b18a-2db791378813","16026e9b-7de1-4851-8b7c-c505937285bc","0e340e59-57d0-498a-b695-ae7626b8fba5","0ce2b425-b2af-4d4b-8b48-d57b0a3eee8f","653810ae-e7fa-4609-b728-799f26e14df5","90cec00f-4b7c-4436-a39b-1a51b69ea02f","bcbffdcd-97e7-41fc-9ad9-33cc1e93c4ec","d68a66b9-8ec5-424d-831f-541271f0121e","71ce696a-7db8-4774-bea5-13b6986ce12a","4c604b18-6db1-4329-ab60-f23d28139b49","a086442d-0570-4f62-a338-3e79f9ae81b0","7f761da7-1094-40e8-a1ae-d352bbc1bf39","c492dcea-1f39-4872-aa0e-f70ae11af14a","b8eb95d7-68c6-4192-9c87-a8148278f3c0","897533de-e2c1-4ac1-8ada-1efd1b0d7354","4ceb1c65-643a-4517-88fd-ed93f0f2402e","e76e24fe-cd41-4b7e-861e-6bb6adb31d40","b3293c7e-1668-41d4-97b4-272f3bcdc5a6","f39378e8-adb3-45b8-8d9c-10cc83096818","6bec7e66-f724-452b-95c5-6b4358bb65b7","c9cfd49c-10be-46b4-965f-6a98dbfc0106","f40220dc-2783-4b16-b94a-3b7485c8d510","47ab1796-e337-4bda-ad70-266e6c1a8026","7a79766e-0ddf-418d-80d8-b78443fd6c20","a226fb36-408b-4904-92f2-5b9b146c0879","81c8c4b1-fdea-43e0-b12c-437df05087ef","196b257d-2ad6-4d13-aa18-c7da92eb4d8f","1f255cc0-ffcc-4e6d-83b4-be54c9d2e039","cd30d9ea-1b42-4d78-a6e4-6d8d15c5757e","23ec66bb-bac5-4884-aa35-65eb3d40450d","400eb6ff-72ca-4825-a576-5f014549c8ad","25148d72-ba48-458e-a4e0-01450161ee28","c9f237a1-e8cc-492c-8737-3605bcc02258","bcb391fe-1a92-452c-9b0f-e360fdbd45ff","4d6d28e1-dddd-4bad-bb52-436dda18fffb","d08769d6-ab31-4541-8c7a-b2fd3a71beec","f940d04f-f293-4bf1-9fdc-3936011d2435","3ac421e2-bff3-4164-895d-39873a9a186d","0c5dddfe-0eb0-4ba0-a2b7-bf1bf11a0264","cd814a09-8808-42cf-92f5-b266a979058e","353652d4-1c7d-45ca-a785-1ef252d597bc","f78ecfe2-2152-44f1-b242-ed71d10d86a3","0941c73c-ebb2-46cf-92b0-20c1da439dd8","e7e73593-49b2-4184-ac58-0d62c1ab1cf6","c298f21c-e8bf-4754-b61e-645537f5b156","51115c6b-9093-4cf4-a67f-84cbd6b00362","bc7da8c5-00dd-41f1-a48f-6b87eb3aed3b","3ed99de2-db84-473c-9549-509cbf7e02f7","bd6945c1-1bc5-46b1-9148-46f3cad35734","9ac0240d-d57c-411a-a970-01a5a009fec9","1bb66c9c-998a-45a1-9595-90c9919cbb28","e2443c0a-ee06-4e91-af53-ec2531c82c5a","af417a05-7308-452a-9897-ee459a1eaebf","437d5d0c-9c59-4815-b4c0-07e84bbda1e2","3a4295de-5a93-48ce-b465-a7b680635d90","3cd2b9c5-e2f8-45a8-8613-dff6dfed75b5","10c2ee66-aeb1-44e6-b678-8cff79cfeadd","f872b493-61aa-4fe7-9027-32093be30340","17984954-a491-4eb6-89e1-2a2943435ea9","b70e8bfb-e85a-4f08-8b99-322bc1f95c46","5d762252-e5bd-41b6-b696-6949ea90af47","1395d0d5-8b14-45d9-bf5f-1e64dbf04674","a0bbe93a-31e7-4101-bd9c-7c84c9684644","dcfc5c6a-04f9-4bb8-870a-cbb20995bf4c","71298639-a8d2-4c21-b170-ae75f568b3a4","7b1b16d3-d15d-47a3-b3c1-257296bba928","3771eb30-ee63-43e8-80b9-205679365c19","a8b265f5-ae54-4ff0-955f-3f20e6882cd0","bb08e1cb-6477-4d28-b6ec-2dc60dc41fff","d22d961c-d268-435f-b051-8bcd7bec19c7","db679490-7136-42b0-8301-5d80f992082f","755dabbd-438c-4778-a428-97e79df476e3","19f9f491-d908-4537-87c7-4735b3706273","3d6b35ba-4ab7-4d05-9423-cb4676a8ff95","787b2888-54dc-4699-ac54-4191df8f8021","e566bc86-6632-49f0-86b9-0f788372d62a",null,"7aa30389-b8b0-4082-a741-0a72c633a9ae","0f40116b-727c-4bcb-8cf5-75f28d2ca09d","1c975f85-aabc-4d37-898b-44045bef5d2a","9fb4c1fb-3e9a-4507-8a87-59475cc5fde2","90513516-6e98-4b13-a449-6f77ed6a3705","f70b5ed1-d43f-4674-ae08-984b45b39773",null,"92e3b847-9520-4518-aa0c-fc5782443f6a","bb676bf3-cc5c-4949-80d7-e564cf5d2dc7","2dfd6021-4890-4d75-8167-5f3b24889b58","77726824-010e-4843-b3e2-ed8f0e37d46b","08529b60-42dc-4d2b-aa6f-118df5e75bee","37586eb4-49d9-4641-806d-e66e6801c61f","7b579fb0-1787-4cef-9a0e-c182ebf81580","657f7ec7-f16b-4d5f-967b-0a81cdf6be65","2fff2342-9383-4f2b-b7ce-1362b772ee9c","4a7afcac-2ba7-4e27-8a70-a08b8956d60f","076d5950-797d-4793-84ed-8895d69cb007","7c548c3f-2540-40c1-9af3-059516120ecd","1a5e0b77-2e51-4f22-9eaa-cce7c0510198","bbb018a5-6e25-4f9e-bebd-868215f83a32","14e24d9c-bbd4-4513-9ae4-51d024bdffe4","d9664b11-9334-46b1-a55c-c6eb1ef94f22","4ba252b9-8fb0-43b3-9e02-6dcca88eb466","8f3b88a8-76b2-407f-906a-fb977ee7b489","bd098f14-e6cb-4dce-bda5-c09ebaf8762a",null,"82d6ae51-4a5d-4ad5-bda4-0c184bb70ce7","0e11d794-54db-4ad5-a09b-01115c932d3f","d74fb899-e782-4a20-a163-965dcfdf5afb","cf1e7405-fc42-4493-b1d1-2a5c56fd40dd","9ed5875a-0464-42a5-94a2-8c7a41b27d5a","46a6167a-7f44-4f4e-ac1e-e8033b635379","4a2c5620-70bb-45aa-98c1-43a9710b0505",null,null,null,"41583903-baff-4c6c-b1d3-e1f17f840e08",null,"7c473e64-ecc2-415c-b7e6-bfcedbbb77ee","51e04c54-2a6e-4b26-b547-8e00a26e2b6e","401e7f85-fbf4-4d34-b3d7-462ca9a3cf36","c34c82a9-7684-45d1-acbe-84a1804f8dd4","0b42243e-1a91-4ca5-9347-33e79e00d7fa","04991883-24ee-4256-ae49-d287dc85f08c","ccf46aac-14af-4531-b759-7a0558841d26","cbb27a25-fd32-4620-949c-7c615bf19424","c90aec2d-ca08-4c9f-862f-c794c1860dbf","7d00cd3a-113a-4ca6-97f2-51920cf1eaea","870802b0-19da-4d0c-ac6c-f25e65396578","83513bda-4420-4b84-b285-6817ddc45d3f","cdd3d998-6ca1-4d9a-9957-2bc7a1e6013a","b1edb6cc-9790-4d1a-ac32-5b5ce35256c7","3f299941-81f6-4f64-be3c-1c09ce2034b7","a8e88a70-3325-4564-a363-7237f9b6b2e3",null,null,null,"7335a481-3685-413d-8560-8486af27093f","d8389d32-a340-4889-a7e9-23945b895863","84ca9e88-453d-49ef-8aef-c93f7074b275","30a0c416-9a2f-49b6-a9a8-9f05200374d4","98c92b6f-9c21-4bd4-b638-b4dd43d1623f","8d7ff62b-997e-4eb5-a672-2ff25ca85db6","63e89734-0b75-445f-88cb-c4eff6d25085","c359f486-624d-4189-86de-aee56dd72605","b556baf3-6e6a-4f43-a376-d66bb72c90fd","d4a82868-fdec-4681-9245-9997b8bedaaa","31e59a50-8acc-4698-9912-a7ffc5115236","625ef6d9-5529-412c-a9e6-fddeba5565df","0d01a341-a33e-4e9c-a9ca-e0d6b090f1bf","2b7cf6d7-4d9a-46fe-9e24-b87e4f93387a","9438f652-82bf-4760-bca8-020cc03b0bf8","50623f55-aaf4-41da-9d16-22f2a744013f","9ad277c2-3c1a-4bf1-9d7c-9434152adf7b",null,"a8644f8d-3f47-44dd-a3e3-e78f73178e05","4c44b9dd-9f05-4ba3-8f3c-379ef7135aa8","f74f0f41-47bd-44de-9c64-c263eca4ecd7","60472b75-a0cf-4709-bc13-b9c06194fea4","59ac9ba8-93ee-4e7c-b619-c02d702651fe","0bf90012-ec05-4e72-b3da-4342ea007d5c","2bcc9aa8-9ea3-494a-ac1d-e77d5d60ef8d","0dc754d5-a62b-4311-a325-27f56b3503c0","6393fd93-9674-4f80-a9dc-aa415bf9c5e7","0ea0335f-bfcf-49d3-8952-54a664110bd6","7ed75172-205d-4257-8f57-b1421e7bf468","868ba3df-b19b-4551-b2b7-348091217601","a46e050d-20c2-4e52-b6ca-fdd81e18d344","d1048577-a23a-4222-86ed-91f2f02c636b","79fca6c4-9f46-4dad-8800-aaa78fe4d7ff","79a516d3-e929-4fd8-82e8-627507dae3b8","568850a1-8e46-4846-9d57-31ac4ffaa26f","371d86dc-a596-42f3-9df4-6f0e0fd95b3b","47821a75-78a8-4c09-8888-c3e69a09db3f","6591e9fc-f201-4f81-929d-b481a7e5b9d3","aaaa2dec-6e1d-41f5-90ca-a9a8daf04155","19e88149-d163-44e7-bff6-1d1a884b0cdd","2001b1e9-fc74-4d45-9ca4-31973068cd55","c2684516-d123-4e44-a27d-d7d239ddb2e6","52c3ff75-7135-4270-ae7a-0a6ab48bd9c8","828971d7-3632-4406-a3aa-ae66667b745a","2c75ebd5-f2ca-49a8-b39f-68a804faed8a","588f1289-8e6e-4901-92f3-1eb327189f5c","aba98ead-de81-47c8-ab86-ca50ecd5fa4a","26615f01-169a-4ff2-934a-8b560929f8eb","f4103474-c1ef-46af-a5a5-386d78ce4b1d","27649a61-6bf4-4c96-be10-b76009350621","83d57fd2-c154-44da-a072-737976d0806a",null,"a9c9279b-6d37-4aa1-af95-1b2beb443b13","70072d78-31f0-4962-9568-d7770e5c3286","68f42243-d374-4c52-a8cb-93ae06f0357c","e9d39910-1e8e-453e-99da-911f6aa23257",null,"e8088038-ba5f-469f-a981-a30cfff03aea","ff0729c5-bca9-4230-8989-15965caf6c12","bcedc636-2745-496f-ada7-ad407e323f53","71edfb59-2e64-45dd-b7e3-993831579a4a","b4fe65ca-ed5d-41a2-b5fc-03fe60fa8781","6f04a6e5-3b48-43ee-9e92-e828561750ff",null,"c3386047-6ad9-4a07-999d-20c15a148003","5023c61e-52b7-47e7-8408-dbb66b67b4a6","6d306a60-baaa-4318-8d5f-a8fb11c57804","e9e5deb8-7322-4313-ad6c-bc81ddb555fa","432e064d-2c87-4282-bc83-88ea238eae90","347326c3-ded1-4e2f-8849-ad00298fbd4c","e97bb403-00b5-402a-b743-ad15c01edc0b","9892ae33-cb22-43b2-aae9-9b20efc535cf","3b2ecfc8-7582-4ef9-983c-dc8f53bd8088","76cbf819-7488-4316-adb5-4ef0320187f9","d0c5445e-fb56-40be-ac15-f7390327a944","59c2c773-81a9-465f-9a62-e4bb453b2e7a","57dce699-46cf-4046-954e-d2f88d17d832","7a9671e3-e195-4c18-8d0a-c79001df8733","1041dc9b-0aac-4ada-b7cf-dc6c5a3517eb","a44fbe1e-0b28-4427-ac92-5d138d3bc8a4",null,"3b9a027f-c744-4db5-8cb0-bdbdb65d415a","1adade9a-b1a9-4c73-a190-f5fafbf0cbc1",null,"6a808f1e-749f-4dca-8b0f-c985ddc88b72","f4b775cd-3463-497c-800e-858394d14ea8","1d94cabd-395b-4ee8-b0a7-1db8933fd16d","1c2cca00-583b-42e7-b534-9481634f8a54","36fc5f65-eb0b-40c8-b7d3-ac80de2d0e6e","46d1dadc-4982-4cb9-9c6f-b36c7cc16b12","c66d6f4e-8366-4c00-abb2-cacd4972be8b","1a315b73-e9e4-40c4-b9f8-f42b12e1a95f","672693eb-0d9b-4b42-b686-434e5a88747b","b3304b37-5ef3-47c4-873d-4a961885a0b5","c4b4ec9a-e759-40b5-8ead-6d7f844325cb","1856ffca-4793-47f6-96f2-74855cd299aa","0a8affd5-06d5-4a9a-9855-ea23416eb154","ac4859a7-ff0f-4d4c-8651-a58f5bb7082b","a9717a24-ba25-4138-922a-ecc50b71e4aa","cd03b4f9-43da-4c34-ae22-07046f68adb7","b9bfa27a-5c10-4c98-a330-15509e6e2405","a072cd77-0d65-4548-b518-b8747acf3fcf","e0813013-2628-4fb8-88f7-4341e0999adb","9df38cc3-6a39-45a8-9c1c-137eb5030cf1","9730671e-84f1-4768-b416-4a3cc1f39403","08ff3834-24a4-4dc6-a758-4917fa5882fa","8e054a97-c226-4ea2-a161-295a7443d8ab","93bc38ad-5a5f-413c-a329-003f659d4c62","f330d928-bb2a-4ac1-ab63-cc1c34cc4837","3df12f64-5f9a-4218-91e4-3380f8dd8ee9","67f382c0-577b-4ded-ba3d-89a5c07b6b2a","76bf1f96-ee33-4fe1-902b-7e5397a187f0",null,"44ebf44a-34c3-4acf-8f2a-135cfb0a363f","025c3c5c-90c1-40f6-b8d2-c7a3670d7084","66b4fa93-f2c6-4622-89b4-22efdaf1603a","b18bf303-1c58-409c-8d37-0d31404466a4","c5437ee7-6a37-450d-806f-439580edf2a1","f3cba0fe-d9af-4aed-bdee-c380b1eef586","587cf90b-02db-4f6e-919b-307dce05c9b2","d6d6a9b9-4320-4735-bd44-b7d38ab4d4b0","3cebe611-65bd-4435-9dda-42d1b9748e70","c779f4ed-29f8-4a10-8687-51d058d74c5d","4d18ec5e-a9b7-4348-9976-bc6134fbf3c2","81526c8c-7e2e-4503-ba3f-b55bda51d85a","28ed63d8-db9f-4bd2-a67d-8d73128dc704","747a4a01-35e6-44c9-94b5-efa3c92e1af7","8aca553e-4415-4f9a-8d2d-67e27d1f3b26","dda4f1e7-c5b8-4aef-887b-048c9253f03e","24899ce6-938f-42e7-a782-c02b625287df","73c8b71d-5af9-4e08-878a-9ae94dbea86e","2aea1c3a-add2-42b8-963c-834278952e7a","c2996c0b-6ae1-48e8-9450-49c7d8dd4265","e622b759-a64b-424b-90b6-a96602057dbf","463927bc-d7cc-4a94-8782-aa2412670925","f202895f-d3de-42ba-8fc2-26415e43c485","101e089e-98a4-498c-87ba-7f0f9c739e39","5fa218ad-9972-4d81-975c-8b8fee3a22cd","e0a05c21-a30c-494f-8519-f8be17bbb8cb","28d1f548-3458-4b34-b84c-db1fc433df3a","5b4fc6ff-70c2-41ef-b6f1-88085f3a2165","70b06004-1599-4116-9884-76abf9e599e2",null,null,null,"949eeb0b-5d58-4e72-a960-b84424694ca3","b4f3f074-a7ae-412f-ae6e-dc5b10eb8f36","e8d599f7-7023-4568-886d-7fb56748a874","fe63e1ab-d5d1-4852-a9fa-d6e8c6b990bb","c471548e-2fac-46ca-aea8-e500ae4e503d","2fb3b149-9d99-4153-9f53-98a13c1247a7","62691a9a-a6dd-4d83-82f7-716d70230f53","2a3d2c03-94ff-47f5-8916-7ea6bc439c4f","64b4233c-1034-4ac1-88da-2c14767ee80b","d64b8f02-1580-4ea0-bfd8-bae7c410b696"],F.weaponUpscaledMap=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"237a530b-307b-498f-bb21-cb49621ae5e8"]},8900:(k,B,U)=>{"use strict";U.d(B,{M:()=>G});var F=U(88818);class G{constructor(){this.eyeAttachments=[F.VE.EyeLIris,F.VE.EyeLWhite,F.VE.EyeRIris,F.VE.EyeRWhite],this.hairAttachments=[F.VE.HairLPigtails,F.VE.HairRPigtails,F.VE.HairInfront,F.VE.HairShort,F.VE.HairBun,F.VE.HairBackLong,F.VE.HairBack,F.VE.HairBehind],this.faceAttachments=[F.VE.EyeLOutline,F.VE.EyeLBlink,F.VE.EyeROutline,F.VE.EyeRBlink,F.VE.EyebrowL,F.VE.EyebrowR,F.VE.FaceLower,F.VE.FaceUpper,F.VE.Nose,F.VE.Neck,F.VE.MouthSmile,F.VE.MouthClose,F.VE.MouthA,F.VE.MouthYeah,F.VE.EyebrowR,F.VE.EyebrowL],this.skinAttachments=[F.VE.BootRSkin,F.VE.BootLSkin,F.VE.LegRSkin,F.VE.LegLSkin,F.VE.SleeveRSkin,F.VE.SleeveLSkin,F.VE.GloveRSkin,F.VE.GloveLFingersSkin,F.VE.GloveLHandSkin]}static get instance(){return G._instance||(G._instance=new G),G._instance}}},57993:(k,B,U)=>{"use strict";U.d(B,{A:()=>G});var F=U(68910);class G extends F.Filter{get y(){return this.uniforms.ySample}set y(k){this.uniforms.ySample=k}get LUT(){return this.uniforms.uLUT}set LUT(k){this.uniforms.uLUT=k}constructor(k,B=.5){super(null,G.fragmentShader,{ySample:B,uLUT:null!=k?k:F.Texture.WHITE})}}G.fragmentShader="\n varying vec2 vTextureCoord;\n uniform sampler2D uSampler;\n uniform sampler2D uLUT;\n uniform float ySample;\n \n void main() {\n vec4 c = texture2D( uSampler, vTextureCoord );\n vec4 l = texture2D( uLUT, vec2(c.r/c.a, ySample) );\n c.rgb = l.rgb;\n c.rgb *= c.a;\n gl_FragColor = c;\n }"},1492:(k,B,U)=>{"use strict";U.d(B,{N:()=>tt});var F,G,j=U(8674),$=U(62459),H=U(68910),V=U(88818),W=U(35120),q=U(38443),K=U(73797),z=U(55741),Y=U(29834),Q=U(28402),X=U(6287),Z=U(63068);!function(k){k[k.Foreground=0]="Foreground",k[k.Background=1]="Background"}(G||(G={}));const J={[G.Foreground]:"front",[G.Background]:"back"};let tt=F=class extends $.uAl{constructor(){super(...arguments),this._foregroundSpineAnimator=null,this._backgroundSpineAnimator=null,this.mountReady=new $.HN0,this._isMountReady=!1,this._cachedVisibilityTuple=null,this._hiddenSlots=[]}get isMountReady(){return this._isMountReady}create(){super.create(),F.mountGear||(F.mountGear=new $.KDe,F.mountGear.hiddenSlots=[V.Cj.Shadow]),this._foregroundSpineAnimator=this._foregroundObject.findComponent(Y.j),this._backgroundSpineAnimator=this._backgroundObject.findComponent(Y.j),this._foregroundSpineAnimator?this._backgroundSpineAnimator?W.q.instance.game.broadcaster.addAppListener(K.B.SlotVisibilityChanged,this.onSlotVisibilityChanged.bind(this),this,"SlotVisibility"):$.VyI.log("No background spine animation found for background",$.$bb.Error):$.VyI.log("No foreground spine animation found for foreground",$.$bb.Error)}postCreate(){const k=Object.create(null,{postCreate:{get:()=>super.postCreate}});return(0,j.sH)(this,void 0,void 0,(function*(){if(k.postCreate.call(this),this.mount)try{yield this.setMount(this.mount)}catch(B){$.RQr.logError(B,"Could not set mount.")}else $.VyI.log("No mount specified for mount component",$.$bb.Verbose)}))}update(){var k;super.update(),(null===(k=this._particleRoot)||void 0===k?void 0:k.transform)&&this._particleRoot.transform.setScale(this.GameObject.transform.worldScale.x<0?-1:1,1)}onSlotVisibilityChanged(k,B,U){var F,G,j;if(!(null===(G=null===(F=null==k?void 0:k.parent)||void 0===F?void 0:F.name)||void 0===G?void 0:G.includes("ChargedLevelEffect")))return;const $=this._backgroundObject.findComponent(Q.v);(null===(j=null==$?void 0:$.getSpine())||void 0===j?void 0:j.pixiSpine)?U?this.unhideMountSlot(B):this.hideMountSlot(B):this._cachedVisibilityTuple=[B,U]}setMount(k){return(0,j.sH)(this,void 0,void 0,(function*(){if((!k||this.mount&&this.mount!==k)&&(yield this.clearMount(),!k))return;const B=$.W$e.instance.game.cache.getJSON(k);let U,F,j;if(B){const k=X.u.fromMountFile(B);U=Promise.resolve(k)}else U=new Promise((B=>{W.q.instance.prodigy.load.assets([k],(()=>{const U=X.u.fromMountFile($.W$e.instance.game.cache.getJSON(k));B(U)}))}));if(this._mountElem=yield U,F=$.W$e.instance.game.cache.checkSpineKey(this._mountElem.spineGuid)?Promise.resolve():new Promise((k=>{W.q.instance.prodigy.load.assets([this._mountElem.spineGuid],(()=>{k()}))})),this._mountElem.particlesGuid){j=W.q.instance.prodigy.gameContainer.get("d0e-64fd").preloadFromGUIDWithDependencies(this._mountElem.particlesGuid).promise}else j=Promise.resolve();yield Promise.all([F,j]),yield Promise.all([this.setupAnimationObject(G.Background,this._mountElem.spineGuid),this.setupAnimationObject(G.Foreground,this._mountElem.spineGuid)]),this.playAnimation("idle"),this.setupPlayerFollow(),this._isMountReady=!0,this.mount=k,this.mountReady.dispatch(),this._cachedVisibilityTuple&&(this._cachedVisibilityTuple[1]?this.unhideMountSlot(this._cachedVisibilityTuple[0]):this.hideMountSlot(this._cachedVisibilityTuple[0]),this._cachedVisibilityTuple=null)}))}hideMountSlot(k){var B,U;if(!this._hiddenSlots.includes(k)){this._hiddenSlots.push(k);const F=this._backgroundObject.findComponent(Q.v);null===(U=null===(B=null==F?void 0:F.getSpine())||void 0===B?void 0:B.pixiSpine)||void 0===U||U.hackTextureBySlotName(k,H.Texture.EMPTY)}}unhideMountSlot(k){var B,U;if(this._hiddenSlots.includes(k)){const F=this._backgroundObject.findComponent(Q.v);null===(U=null===(B=null==F?void 0:F.getSpine())||void 0===B?void 0:B.pixiSpine)||void 0===U||U.hackTextureBySlotName(k,null),this._hiddenSlots.splice(this._hiddenSlots.indexOf(k),1)}}addParticleEffectByID(k,B=-20,U=-35){var F;this.removeParticleEffect(),this._particle=q.d.createParticleEmitter(this.gameObject,k,new $.I9Y(B,U)),this._particle.worldSpaceScaling=!1,null===(F=this._particle.GameObject)||void 0===F||F.sendToBack(),this._particleRoot=this._particle.GameObject}addInternalParticleEffect(){return(0,j.sH)(this,void 0,void 0,(function*(){var k,B,U,F;if(!this.hasInternalParticleEffect())throw new Error("No internal particle effect defined for mount, cannot add");const G=null!==(B=null===(k=this._mountElem.particleOffset)||void 0===k?void 0:k.x)&&void 0!==B?B:0,j=null!==(F=null===(U=this._mountElem.particleOffset)||void 0===U?void 0:U.y)&&void 0!==F?F:0;return this.addParticleEffectByGUID(this._mountElem.particlesGuid,G,j)}))}addParticleEffectByGUID(k,B,U){return(0,j.sH)(this,void 0,void 0,(function*(){var F;this.removeParticleEffect();try{const F=W.q.instance.prodigy.gameContainer.get("d0e-64fd");return this._particleRoot=yield F.loadWithDependenciesFromGUID(k,this.gameObject,!1),this._particleRoot.transform.setPosition(B,U),this._particle=this._particleRoot.findComponentInChildren($.okU),this._particle.worldSpaceScaling=!1,this._particleRoot.sendToBack(),this._particle}catch(G){throw $.RQr.logError(G,`Could not load particle effect ${k} in mount ${null!==(F=this.mount)&&void 0!==F?F:"unknown"}`),this._particleRoot=null,this._particle=null,G}}))}removeParticleEffect(){this._particleRoot&&(this._particleRoot.destroy(),this._particle=null,this._particleRoot=null)}pauseParticles(){this._particle&&(this._particle.pauseEmission=!0)}resumeParticles(){this._particle&&(this._particle.pauseEmission=!1)}hasInternalParticleEffect(){return!!this._mountElem.particlesGuid}clearMount(){return(0,j.sH)(this,void 0,void 0,(function*(){this.stopAnimation(),this.clearPlayerFollow(),this.removeParticleEffect(),yield Promise.all([this.setupAnimationObject(G.Background,null),this.setupAnimationObject(G.Foreground,null)]),this.mount=null,this.mountReady.dispatch()}))}setupPlayerFollow(){var k,B,U,G,j;null===(k=this.playerObject.findComponentInChildren(Z.n,!0))||void 0===k||k.addExtraGear(F.mountGear);let H=this.playerObject.findComponent(z.l);H||(H=this.playerObject.addComponent(z.l));const V=this._backgroundObject.findComponent(Q.v);V?(H.setup({spineComponent:V,boneName:"character",slotName:"character",followAxis:3,followRotation:!1,followScale:4,boneFollowerTransform:this.playerObject.transform}),H.localOffset=new $.I9Y(null!==(U=null===(B=this._mountElem)||void 0===B?void 0:B.offset.x)&&void 0!==U?U:0,null!==(j=null===(G=this._mountElem)||void 0===G?void 0:G.offset.y)&&void 0!==j?j:0)):$.VyI.log("No spine component found on the background object",$.$bb.Error)}clearPlayerFollow(){var k;const B=this.playerObject.findComponent(z.l);B&&(this.playerObject.transform.setPosition(0,0),B.destroy()),null===(k=this.playerObject.findComponentInChildren(Z.n,!0))||void 0===k||k.removeExtraGear(F.mountGear)}stopAnimation(){this._foregroundSpineAnimator&&this._backgroundSpineAnimator?(this._foregroundSpineAnimator.stopAnimation(),this._backgroundSpineAnimator.stopAnimation()):$.VyI.log("No spine animator found for mount",$.$bb.Error)}playAnimation(k,B=0){this._foregroundSpineAnimator&&this._backgroundSpineAnimator?(this._foregroundSpineAnimator.playAnimation(`${k}-${J[G.Foreground]}`,!0,!1,!1,B),this._backgroundSpineAnimator.playAnimation(`${k}-${J[G.Background]}`,!0,!1,!1,B)):$.VyI.log("No spine animator found for mount",$.$bb.Error)}setupAnimationObject(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){const U=J[k],F=k===G.Foreground?this._foregroundObject:this._backgroundObject;if(!F)return void $.VyI.log(`No layer object found for layer ${U}`,$.$bb.Error);const j=F.findComponent(Q.v);if(!j)return void $.VyI.log(`No spine component found on the mount object for layer ${U}`,$.$bb.Warning);const H=new Promise((k=>{j.setAsset(null!=B?B:"",(()=>{k()}))}));yield H}))}destroy(){this.clearPlayerFollow(),this.removeParticleEffect(),this.mount=null,this._foregroundSpineAnimator=null,this._backgroundSpineAnimator=null,this.mountReady.dispose(),W.q.instance.game.broadcaster.removeAppListener(K.B.SlotVisibilityChanged,this,"SlotVisibility"),super.destroy()}};(0,j.Cg)([(0,$.ERr)(),(0,j.Sn)("design:type",$._mx)],tt.prototype,"_foregroundObject",void 0),(0,j.Cg)([(0,$.ERr)(),(0,j.Sn)("design:type",$._mx)],tt.prototype,"_backgroundObject",void 0),(0,j.Cg)([(0,$.ERr)(),(0,j.Sn)("design:type",$._mx)],tt.prototype,"playerObject",void 0),(0,j.Cg)([(0,$.tW2)("mount"),(0,j.Sn)("design:type",String)],tt.prototype,"mount",void 0),tt=F=(0,j.Cg)([(0,$.EVk)("Mount",$.YH6.animation)],tt)},6287:(k,B,U)=>{"use strict";U.d(B,{u:()=>G});var F=U(62459);class G{static fromMountFile(k){const B=new G;return B.offset=new F.I9Y(k.playerOffset.x,k.playerOffset.y),B.spineGuid=k.mountSpine,k.mountParticlesGuid&&(B.particlesGuid=k.mountParticlesGuid),k.particleOffset&&(B.particleOffset=new F.I9Y(k.particleOffset.x,k.particleOffset.y)),B}static toMountFile(k){const B={playerOffset:{x:k.offset.x,y:k.offset.y},mountSpine:k.spineGuid};return k.particlesGuid&&(B.mountParticlesGuid=k.particlesGuid),k.particleOffset&&(B.particleOffset={x:k.particleOffset.x,y:k.particleOffset.y}),`${JSON.stringify(B,null,4)}\n`}}},97651:(k,B,U)=>{"use strict";U.d(B,{e:()=>Y});var F=U(8674),G=U(62459),j=U(82209),$=U(72379),H=U(37773),V=U(97317),W=U(65732),q=U(28152),K=U(26932),z=U(26004);let Y=class extends K.z{constructor(){super(...arguments),this.bindOnCreate=!0,this.ignoreLosingLevels=!1}create(){super.create(),G.Aq$.isDefined(this._playerDataProvider)||G.VyI.log("[PlayerChargedLevelDataProviderComponent] No PlayerDataProvider found in context",G.$bb.Verbose),this.bindOnCreate&&this.bindContext()}bindContext(){var k,B,U,F;if(!this._playerDataProvider)return;if(this._playerDataProvider.getLevel()0)return this._context.Container.rebind(W.E.ChargeRevealEffectEnabled).toConstantValue(!1),void this.bindLevel(this._playerDataProvider.getLevel()+F)}const G=(null===(F=this._playerDataProvider)||void 0===F?void 0:F.getChargedLevel())>0?this._playerDataProvider.getLevel()+this._playerDataProvider.getChargedLevel():this._playerDataProvider.getLevel();this.bindLevel(G)}showChargeKeptEffect(){this._context.Container.rebind(W.E.ChargedCreatureEffectDisplayType).toConstantValue(V.X$.CHARGE_KEPT),this.gameObject.findComponentsInChildren(z.B).forEach((k=>k.consume()))}showChargeLostEffect(){this._context.Container.rebind(W.E.ChargedCreatureEffectDisplayType).toConstantValue(V.X$.CHARGE_LOST),this.gameObject.findComponentsInChildren(z.B).forEach((k=>k.consume()))}bindChargedLevelTier(k){this._context.Container.rebind(W.E.ChargedCreatureEffectTier).toConstantValue(H.e.getChargedLevelTierFromLevel(k))}bindLevel(k){var B;if(k>this._playerDataProvider.player.currentMaxLevel){const U=k-this._playerDataProvider.player.currentMaxLevel;this._context.Container.rebind(W.E.PlayerChargedLevel).toConstantValue(this._playerDataProvider.getChargedLevel()),this._context.Container.rebind(W.E.ChargedCreatureEffectTier).toConstantValue(H.e.getChargedLevelTierFromLevel(U)),this._context.Container.rebind(W.E.PlayerChargedLevelCap).toConstantValue(this._playerDataProvider.getChargedLevelCap());const F=null!==(B=this._context.getInjectedValue(W.E.ChargeRevealEffectEnabled))&&void 0!==B&&B?V.X$.REVEAL_TO_IDLE:V.X$.IDLE;this._context.Container.rebind(W.E.ChargedCreatureEffectDisplayType).toConstantValue(F)}else this._context.Container.rebind(W.E.PlayerChargedLevel).toConstantValue(0),this._context.Container.rebind(W.E.PlayerChargedLevelCap).toConstantValue(0),this._context.Container.rebind(W.E.ChargedCreatureEffectTier).toConstantValue(V.Bv.NO_CHARGE),this._context.Container.rebind(W.E.ChargedCreatureEffectDisplayType).toConstantValue(V.X$.HIDDEN);this.gameObject.findComponentsInChildren(z.B).forEach((k=>k.consume()))}};(0,F.Cg)([(0,G.Cdj)("377-3e7b"),(0,F.Sn)("design:type",j.z)],Y.prototype,"_playerDataProvider",void 0),(0,F.Cg)([(0,G.Cdj)("62e-110e"),(0,F.Sn)("design:type",$.g)],Y.prototype,"_chargedLevelsProgressManager",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"bindOnCreate",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"ignoreLosingLevels",void 0),Y=(0,F.Cg)([(0,G.EVk)("PlayerChargedLevelDataProvider",q.Y.player)],Y)},55950:(k,B,U)=>{"use strict";U.d(B,{y:()=>nt});var F,G,j,$,H=U(8674),V=U(62459),W=U(95891),q=U(68910),K=U(88818);!function(k){k.Attack="attack",k.Attack2="attack2",k.DanceDab="dance-dab",k.DanceMoonwalk="dance-moonwalk",k.DanceRunningman="dance-runningman",k.Dig="dig",k.Idle="idle",k.IdleHeavy="idle-heavy",k.IdlePose="idle-pose",k.IdleToPetInteract="idle-to-pet-interact",k.PetInteract="pet-interact",k.Static="static",k.Walk="walk"}(F||(F={})),function(k){k.Cast="cast"}(G||(G={})),function(k){k.Shadow="shadow",k.HairLPigtails="hair-L-pigtails",k.HatBack="hat-back",k.HairBun="hair-bun",k.HairBackLong="hair-back-long",k.HairBack="hair-back",k.Cape="cape",k.SleeveLSkin="sleeve-L-skin",k.SleeveL="sleeve-L",k.GloveLHandSkin="glove-L-hand-skin",k.GloveLHand="glove-L-hand",k.HairBehind="hair-behind",k.Weapon="weapon",k.Tail="tail",k.Back="back",k.GloveLFingersSkin="glove-L-fingers-skin",k.GloveLFingers="glove-L-fingers",k.LegLSkin="leg-L-skin",k.LegL="leg-L",k.BootLSkin="boot-L-skin",k.BootL="boot-L",k.Hip="hip",k.LegRSkin="leg-R-skin",k.LegR="leg-R",k.BootRSkin="boot-R-skin",k.BootR="boot-R",k.PauldronL="pauldron-L",k.HatMiddle="hat-middle",k.Neck="neck",k.Torso="torso",k.Belt="belt",k.Chest="chest",k.SleeveRSkin="sleeve-R-skin",k.SleeveR="sleeve-R",k.Collar="collar",k.GloveRSkin="glove-R-skin",k.GloveRWrist="glove-R-wrist",k.GloveRHand="glove-R-hand",k.Necklace="necklace",k.FaceLower="face-lower",k.FaceUpper="face-upper",k.EyeLWhite="eye-L-white",k.EyeLIris="eye-L-iris",k.EyeLOutline="eye-L-outline",k.EyeLBlink="eye-L-blink",k.EyeRWhite="eye-R-white",k.EyeRIris="eye-R-iris",k.EyeROutline="eye-R-outline",k.EyeRBlink="eye-R-blink",k.Mouth="mouth",k.Nose="nose",k.EyebrowR="eyebrow-R",k.EyebrowL="eyebrow-L",k.ExpressionFace="expression-face",k.HairInfront="hair-infront",k.HairShort="hair-short",k.HatFace="hat-face",k.HairRPigtails="hair-R-pigtails",k.PauldronR="pauldron-R",k.HatFront="hat-front",k.ExpressionUpper="expression-upper"}(j||(j={})),function(k){k.Back="back",k.Belt="belt",k.BootL="boot-L",k.BootLSkin="boot-L-skin",k.BootR="boot-R",k.BootRSkin="boot-R-skin",k.Cape="cape",k.Chest="chest",k.Collar="collar",k.ExpressionFace="expression-face",k.ExpressionUpper="expression-upper",k.EyeLBlink="eye-L-blink",k.EyeLIris="eye-L-iris",k.EyeLOutline="eye-L-outline",k.EyeLWhite="eye-L-white",k.EyeRBlink="eye-R-blink",k.EyeRIris="eye-R-iris",k.EyeROutline="eye-R-outline",k.EyeRWhite="eye-R-white",k.EyebrowL="eyebrow-L",k.EyebrowR="eyebrow-R",k.FaceLower="face-lower",k.FaceUpper="face-upper",k.GloveLFingers="glove-L-fingers",k.GloveLFingersSkin="glove-L-fingers-skin",k.GloveLHand="glove-L-hand",k.GloveLHandSkin="glove-L-hand-skin",k.GloveRHand="glove-R-hand",k.GloveRSkin="glove-R-skin",k.GloveRWrist="glove-R-wrist",k.HairBack="hair-back",k.HairBackLong="hair-back-long",k.HairBehind="hair-behind",k.HairBun="hair-bun",k.HairInfront="hair-infront",k.HairLPigtails="hair-L-pigtails",k.HairRPigtails="hair-R-pigtails",k.HairShort="hair-short",k.HatBack="hat-back",k.HatFace="hat-face",k.HatFront="hat-front",k.HatMiddle="hat-middle",k.Hip="hip",k.LegL="leg-L",k.LegLSkin="leg-L-skin",k.LegR="leg-R",k.LegRSkin="leg-R-skin",k.MouthA="mouth-A",k.MouthClose="mouth-Close",k.MouthSmile="mouth-smile",k.MouthYeah="mouth-yeah",k.Neck="neck",k.Necklace="necklace",k.Nose="nose",k.PauldronL="pauldron-L",k.PauldronR="pauldron-R",k.Shadow="shadow",k.SleeveL="sleeve-L",k.SleeveLSkin="sleeve-L-skin",k.SleeveR="sleeve-R",k.SleeveRSkin="sleeve-R-skin",k.Tail="tail",k.Torso="torso",k.Weapon="weapon"}($||($={}));const z=new Map([["back",[963,782,353,313]],["belt",[484,25,234,65]],["boot-L",[1883,72,112,113]],["boot-L-skin",[1883,298,113,113]],["boot-R",[1568,18,112,113]],["boot-R-skin",[1888,419,113,113]],["cape",[1587,820,243,275]],["chest",[1766,699,123,120]],["collar",[1038,213,274,105]],["expression-face",[878,1096,398,450]],["expression-upper",[1277,1096,398,450]],["eye-L-blink",[123,31,56,27]],["eye-L-iris",[1676,1100,60,60]],["eye-L-outline",[878,845,69,90]],["eye-L-white",[926,3,57,87]],["eye-R-blink",[520,1392,67,29]],["eye-R-iris",[1737,1100,60,60]],["eye-R-outline",[719,0,104,90]],["eye-R-white",[824,3,101,87]],["eyebrow-L",[520,1422,80,75]],["eyebrow-R",[1156,7,99,70]],["face-lower",[1568,132,314,254]],["face-upper",[1313,42,254,188]],["glove-L-fingers",[1205,319,105,99]],["glove-L-fingers-skin",[1205,419,105,99]],["glove-L-hand",[1831,1041,120,119]],["glove-L-hand-skin",[277,1388,113,109]],["glove-R-hand",[1587,699,121,120]],["glove-R-skin",[1766,412,121,120]],["glove-R-wrist",[1883,186,113,111]],["hair-L-pigtails",[0,1387,276,659]],["hair-R-pigtails",[601,838,276,659]],["hair-back",[1317,675,269,420]],["hair-back-long",[878,1547,431,499]],["hair-behind",[0,375,526,462]],["hair-bun",[1316,231,215,443]],["hair-infront",[0,59,358,315]],["hair-short",[963,519,352,262]],["hat-back",[0,838,600,548]],["hat-face",[1310,1596,398,450]],["hat-front",[277,1498,600,548]],["hat-middle",[527,289,435,548]],["hip",[1156,78,137,134]],["leg-L",[1890,713,115,163]],["leg-L-skin",[1831,877,115,163]],["leg-R",[1881,533,114,165]],["leg-R-skin",[1766,533,114,165]],["mouth-A",[59,21,63,37]],["mouth-Close",[180,35,53,23]],["mouth-smile",[234,37,44,21]],["mouth-yeah",[0,9,58,49]],["neck",[878,1011,79,84]],["necklace",[391,1389,128,108]],["nose",[878,936,75,74]],["pauldron-L",[359,206,147,168]],["pauldron-R",[1709,1632,188,177]],["shadow",[507,91,530,197]],["sleeve-L",[359,5,124,200]],["sleeve-L-skin",[963,319,123,199]],["sleeve-R",[1038,21,117,191]],["sleeve-R-skin",[1087,327,117,191]],["tail",[1709,1810,288,236]],["torso",[1532,387,233,287]],["weapon",[1676,1161,216,434]]]);var Y,Q,X=U(35120),Z=U(34829),J=U(30705),tt=U(51941),et=U(8900),it=U(57993),st=U(97252);!function(k){k.Skin="skin",k.Face="face",k.Hair="hair",k.Eyes="eyes"}(Q||(Q={}));let nt=Y=class extends V.uAl{constructor(){super(...arguments),this.autoRefresh=!1,this.lutGuid="e918c892-6a34-4bc0-8f2d-2d91b3a4e91b",this.skinIndex=0,this.hairIndex=0,this.eyeIndex=0,this.attachmentTextureIdMap=new Map,this.onColorRefreshed=new V.HN0}get initialAtlasFrames(){return this._scaling===st.M.UPSCALED_4x?z:K.yG}postCreate(){super.postCreate(),this.postCreate=super.postCreate.bind(this),Y.lutTexture||(Y.lutTexture=X.q.instance.game.cache.getTexture(this.lutGuid)),this._gear||(this._gear=this.gameObject.findComponent(tt.c)),Z.A.get("GameConstants.Debug.SHOW_PLAYER_COLOR_DEBUG_MENU")&&J.b.debugGUI("player",this,[{parameter:"skinIndex",min:1,max:Y.SKIN_TONES-1,step:1},{parameter:"hairIndex",min:1,max:Y.HAIR_TONES-1,step:1},{parameter:"eyeIndex",min:1,max:Y.EYE_TONES-1,step:1}],void this.refresh.bind(this)),this.autoRefresh&&(this._spineComponent.isLoaded?this.refresh().catch(V.RQr.createHandler("Could not refresh PlayerColorComponent with preloaded spine")):this._spineComponent.OnLoaded.addOnce((()=>{this.refresh().catch(V.RQr.createHandler("Could not refresh PlayerColorComponent with post-loaded spine"))})))}destroy(){Z.A.get("GameConstants.Debug.SHOW_PLAYER_COLOR_DEBUG_MENU")&&J.b.removeDebugGUI("player"),this.onColorRefreshed.dispose(),super.destroy()}validateFilters(){Y.lutTexture?(this.validateLUTFilter(Y.HAIR_FILTERS,this.hairIndex,Y.SKIN_TONES),this.validateLUTFilter(Y.SKIN_FILTERS,this.skinIndex,0),this.validateLUTFilter(Y.EYE_FILTERS,this.eyeIndex,Y.SKIN_TONES+Y.HAIR_TONES)):V.VyI.log("no global lut set for PlayerColorComponent",V.$bb.Warning)}validateLUTFilter(k,B,U){k.has(B)||k.set(B,new it.A(Y.lutTexture,(B+.5+U)/Y.lutTexture.height))}refresh(){return(0,H.sH)(this,void 0,void 0,(function*(){var k;this.postCreate(),this._spine||(this._spine=this._spineComponent.getSpine()),yield this._gear.refresh().catch((k=>{V.RQr.createHandler(`Could not refresh gear from player color\n${k}`)})),this.skinIndex=Math.max(this.skinIndex,0),this.eyeIndex=Math.max(this.eyeIndex,0),this.hairIndex=Math.max(this.hairIndex,0),this.attachmentTextureIdMap=this._gear.attachmentTextureIdMap,Y.lutTexture&&(null===(k=this._spine)||void 0===k?void 0:k.pixiSpine)&&(this.validateFilters(),this.applyFiltersToSlots(Y.SKIN_FILTERS.get(this.skinIndex),et.M.instance.skinAttachments,Q.Skin,this.skinIndex),this.applyFiltersToSlots(Y.SKIN_FILTERS.get(this.skinIndex),et.M.instance.faceAttachments,Q.Face,this.skinIndex),this.applyFiltersToSlots(Y.HAIR_FILTERS.get(this.hairIndex),et.M.instance.hairAttachments,Q.Hair,this.hairIndex),this.applyFiltersToSlots(Y.EYE_FILTERS.get(this.eyeIndex),et.M.instance.eyeAttachments,Q.Eyes,this.eyeIndex),this._gear.updateSkin(),this.onColorRefreshed.dispatch())}))}applyFiltersToSlots(k,B,U,F){var G;const j=null===(G=this._spine)||void 0===G?void 0:G.skeleton;if(!j)return void V.VyI.log("Could not apply filter; spine skeleton not found",V.$bb.Error);const $=[];let H=B.filter((k=>{for(let B=0;B{this._gear.getSlotNames(B).forEach((G=>{var $,H;if(this._gear.isHiddenSlot(G))return;const K=j.findSlot(G),z=j.getAttachment(K.data.index,B);if(!z)return;if(!this._gear.shouldRecolorSlot(z.name))return;const Q=this.attachmentTextureIdMap.get(B),Z=V.Aq$.isDefined(this._scaling)?this._scaling===st.M.DEFAULT_1X?"defaultScale":"upscaled":"default",J=`${Q}-${U}-${F}-${B}-${Z}`;let tt;if(Q&&X.q.instance.game.cache.checkImageKey(Q))Y._sprite.texture=X.q.instance.game.cache.getTexture(Q),tt=this.getCachedFilterTexture(k,Y._sprite,J);else{Y._sprite.texture=new q.Texture(V.a5k.defaultTextures.get(this._spine.name).baseTexture,new q.Rectangle(...this.initialAtlasFrames.get(B)));const F=`${U}-base-${B}-${Z}`,G=this.getBaseTexture(Y._sprite,F);Y._sprite.texture=G,tt=this.getCachedFilterTexture(k,Y._sprite,J)}if(0===z.type||2===z.type){const k=z.copy(),U=(0,W.clone)(k.region);U.names=k.region.names,U.values=k.region.values,U.texture=tt,k.region=U,null===($=this._gear.skin)||void 0===$||$.removeAttachment(K.data.index,B),null===(H=this._gear.skin)||void 0===H||H.setAttachment(K.data.index,B,k)}}))}))}getBaseTexture(k,B){const U=X.q.instance.game.cache.getRenderTexture(B);if(U)return U;const F=X.q.instance.game.renderer.generateTexture(k);return V.qFr.setSmoothed(F,!0),X.q.instance.game.cache.addRenderTexture(B,F),F}getCachedFilterTexture(k,B,U){const F=X.q.instance.game.cache.getRenderTexture(U);if(F)return F;B.filters=Array.isArray(k)?k:[k];const G=X.q.instance.game.renderer.generateTexture(B);return V.qFr.setSmoothed(G,!0),X.q.instance.game.cache.addRenderTexture(U,G),B.filters=null,G}};nt._sprite=new q.Sprite,nt.SKIN_TONES=6,nt.HAIR_TONES=44,nt.EYE_TONES=15,nt.SKIN_FILTERS=new Map,nt.HAIR_FILTERS=new Map,nt.EYE_FILTERS=new Map,(0,H.Cg)([(0,V.vkK)(),(0,H.Sn)("design:type",Boolean)],nt.prototype,"autoRefresh",void 0),(0,H.Cg)([(0,V.Bak)(),(0,V.W_S)(),(0,V.i0J)(V.Z$z.Image),(0,H.Sn)("design:type",String)],nt.prototype,"lutGuid",void 0),(0,H.Cg)([(0,V.Pqz)(V.v2j),(0,H.Sn)("design:type",V.v2j)],nt.prototype,"_spineComponent",void 0),(0,H.Cg)([(0,V.g11)(),(0,H.Sn)("design:type",Number)],nt.prototype,"skinIndex",void 0),(0,H.Cg)([(0,V.g11)(),(0,H.Sn)("design:type",Number)],nt.prototype,"hairIndex",void 0),(0,H.Cg)([(0,V.g11)(),(0,H.Sn)("design:type",Number)],nt.prototype,"eyeIndex",void 0),(0,H.Cg)([(0,V.Cdj)("PLAYER_APPEARANCE_SCALING"),(0,H.Sn)("design:type",Number)],nt.prototype,"_scaling",void 0),(0,H.Cg)([(0,V.bbQ)(),(0,H.Sn)("design:type",V.HN0)],nt.prototype,"onColorRefreshed",void 0),(0,H.Cg)([(0,V.GO0)(),(0,H.Sn)("design:type",Function),(0,H.Sn)("design:paramtypes",[]),(0,H.Sn)("design:returntype",Promise)],nt.prototype,"refresh",null),nt=Y=(0,H.Cg)([(0,V.EVk)("PlayerColor",V.YH6.animation)],nt)},63068:(k,B,U)=>{"use strict";U.d(B,{n:()=>Y});var F=U(8674),G=U(62459),j=U(35120),$=U(34829),H=U(30705),V=U(51941),W=U(36164),q=U(55950),K=U(97252);const z=Object.values(K.EQ).filter((k=>"number"==typeof k)).length;let Y=class extends G.uAl{constructor(){super(...arguments),this._extraGear=[],this.onAppearanceLoaded=new G.HN0,this.onFirstAppearanceLoaded=new G.HN0}create(){if(super.create(),$.s.get("GameConstants.Debug.SHOW_PLAYER_OUTFIT_DEBUG_MENU")){const k={face:1,outfit:1,boot:1,weapon:1,haircut:1,hat:1,skin:1,hair:1,eye:1,scale:1};H.b.debugGUI("outfit",k,[{parameter:"face",step:1,min:1,max:W.R.faceMap.length},{parameter:"outfit",step:1,min:1,max:W.R.outfitMap.length},{parameter:"boot",step:1,min:1,max:W.R.bootMap.length},{parameter:"weapon",step:1,min:1,max:W.R.weaponMap.length},{parameter:"haircut",step:1,min:0,max:W.R.hairMap.length},{parameter:"hat",step:1,min:0,max:W.R.hatMap.length},{parameter:"skin",step:1,min:1,max:q.y.SKIN_TONES},{parameter:"hair",step:1,min:1,max:q.y.HAIR_TONES},{parameter:"eye",step:1,min:1,max:q.y.EYE_TONES},{parameter:"scale",min:1,max:2}],(()=>{this.fromPlayerAppearanceData({weapon:k.weapon,outfit:k.outfit,boot:k.boot,skin:k.skin,hair:{color:k.hair,style:k.haircut},face:k.face,hat:k.hat,eyeColor:k.eye}).catch((k=>{G.RQr.createHandler("Failed to set player outfit from debug gui.")})),this.gameObject.transform.setScale(.125*k.scale,.125*k.scale)}))}this.onAppearanceLoaded.addOnce((()=>{this.onFirstAppearanceLoaded.dispatch()}))}fromPlayerAppearanceData(k){return(0,F.sH)(this,void 0,void 0,(function*(){this._spineComponent.isLoaded||(yield this._spineComponent.OnLoaded.asPromise());try{k.costume?yield Promise.all([this._gearManager.setGearAt(K.EQ.FACE,null,!1),this._gearManager.setGearAt(K.EQ.BOOTS,null,!1),this._gearManager.setGearAt(K.EQ.OUTFIT,null,!1),this._gearManager.setGearAt(K.EQ.HAIR,null,!1),this._gearManager.setGearAt(K.EQ.HAT,null,!1),this.setGearOfType(K.EQ.COSTUME,k.costume,"costume"),this.setGearOfType(K.EQ.WEAPON,k.weapon,"weapon")]):yield Promise.all([this._gearManager.setGearAt(K.EQ.COSTUME,null,!1),this.setGearOfType(K.EQ.FACE,k.face,"face"),this.setGearOfType(K.EQ.BOOTS,k.boot,"boot"),this.setGearOfType(K.EQ.OUTFIT,k.outfit,"outfit"),this.setGearOfType(K.EQ.WEAPON,k.weapon,"weapon"),this.setGearOfType(K.EQ.HAIR,k.hair.style,"hair"),this.setGearOfType(K.EQ.HAT,k.hat,"hat")]);for(let k=0;k{let V=F[B];if(V||k!==K.EQ.OUTFIT||(V=F[1],G.VyI.log(`Asset ${B} of type ${U} could not be found, falling back to default outfit.`,G.$bb.Warning)),!V){if(this._gearManager.setGearAt(k,null,!1).catch(G.RQr.createHandler("setGearAt failed with no guid in PlayerDataAppearanceComponent")),G.Aq$.isDefined(B)){k===K.EQ.HAIR&&53===B||G.VyI.log(`Asset ${B} of type ${U} could not be found`,G.$bb.Warning)}return void $()}const W=()=>{const B=j.q.instance.game.cache.getJSON(V);if(!B)return void H(new Error(`No content for ${V} of type ${U}`));const F=G.KDe.fromGearFile(B);F?(this._gearManager.setGearAt(k,F,!1).catch(G.RQr.createHandler("setGearAt failed with gearElement in PlayerDataAppearanceComponent")),$()):H(new Error(`Failed to parse GearElement from file for ${V} of type ${U}`))};j.q.instance.game.cache.checkJSONKey(V)?W():j.q.instance.prodigy.load.assets([V],W)}))}))}getGearMapByCategory(k){const B=this._scaling===K.M.UPSCALED_4x;switch(k){case K.EQ.FACE:return B?W.R.faceUpscaledMap:W.R.faceMap;case K.EQ.BOOTS:return B?W.R.bootUpscaledMap:W.R.bootMap;case K.EQ.OUTFIT:return B?W.R.outfitUpscaledMap:W.R.outfitMap;case K.EQ.WEAPON:return B?W.R.weaponUpscaledMap:W.R.weaponMap;case K.EQ.HAIR:return B?W.R.hairUpscaledMap:W.R.hairMap;case K.EQ.HAT:return B?W.R.hatUpscaledMap:W.R.hatMap;case K.EQ.COSTUME:return W.R.costumeMap}}addExtraGear(k,B=!0){if(this._extraGear.includes(k))return;const U=this._extraGear.push(k)-1;this._gearManager.setGearAt(z+U,this._extraGear[U],!1).catch(G.RQr.createHandler("PlayerDataAppearanceComponent: Error setting extra gear in addExtraGear")),B&&this._color.refresh().catch(G.RQr.createHandler("PlayerDataAppearanceComponent: Error refreshing color when adding extra gear in addExtraGear"))}removeExtraGear(k,B=!0){const U=this._extraGear.indexOf(k);-1!==U&&(this._gearManager.removeGear(this._extraGear[U],!1),this._extraGear.splice(U,1),B&&this._color.refresh().catch(G.RQr.createHandler("PlayerDataAppearanceComponent: Error refreshing color when removing extra gear in removeExtraGear")))}destroy(){this.onAppearanceLoaded.dispose(),this.onFirstAppearanceLoaded.dispose(),super.destroy()}};(0,F.Cg)([(0,G.Pqz)(G.v2j),(0,F.Sn)("design:type",G.v2j)],Y.prototype,"_spineComponent",void 0),(0,F.Cg)([(0,G.Pqz)(V.c),(0,F.Sn)("design:type",V.c)],Y.prototype,"_gearManager",void 0),(0,F.Cg)([(0,G.Pqz)(q.y),(0,F.Sn)("design:type",q.y)],Y.prototype,"_color",void 0),(0,F.Cg)([(0,G.Cdj)("PLAYER_APPEARANCE_SCALING"),(0,F.Sn)("design:type",Number)],Y.prototype,"_scaling",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onAppearanceLoaded",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onFirstAppearanceLoaded",void 0),Y=(0,F.Cg)([(0,G.EVk)("PlayerDataAppearance",G.YH6.animation)],Y)},47734:(k,B,U)=>{"use strict";U.d(B,{z:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(63068);let H=class extends G.uAl{constructor(){super(...arguments),this.WEAPON_SPINE_SLOT="weapon",this.HAT_SPINE_SLOT="hat-face",this.OUTFIT_SPINE_SLOT="torso",this._loadActivePlayer=!1}postCreate(){super.postCreate(),this.removeSlots(),this._loadActivePlayer&&this.loadPlayerAppearance()}loadPlayerAppearance(){var k,B,U;const F=null!==(U=null===(B=null===(k=this.gameObject.parent.findComponentInChildren(G.bE_))||void 0===k?void 0:k.Container.get("377-3e7b"))||void 0===B?void 0:B.getAppearance())&&void 0!==U?U:j.q.instance.prodigy.gameContainer.get("e20-0fb0").getAppearance();this.updatePlayerAppearance(F)}removeSlots(){const k={hiddenSlots:this._disabledSlots,attachments:[],slotsToNotRecolor:[]};this._playerDataAppearance.addExtraGear(k)}updatePlayerAppearance(k){k&&(k.outfit||(k.outfit=1),this.filterEnabledAppearanceAssets(k),this._playerDataAppearance.fromPlayerAppearanceData(Object.assign({},k)).catch(G.RQr.createHandler("fromPlayerAppearanceData failed in PlayerSpineAppearanceSelectorComponent")))}filterEnabledAppearanceAssets(k){this._disabledSlots.includes(this.WEAPON_SPINE_SLOT)&&(k.weapon=null),this._disabledSlots.includes(this.OUTFIT_SPINE_SLOT)&&(k.outfit=null),this._disabledSlots.includes(this.HAT_SPINE_SLOT)&&(k.hat=null)}};(0,F.Cg)([(0,G.MnK)($.n),(0,F.Sn)("design:type",$.n)],H.prototype,"_playerDataAppearance",void 0),(0,F.Cg)([(0,G.MnK)(G.v2j),(0,F.Sn)("design:type",G.v2j)],H.prototype,"_spine",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_loadActivePlayer",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.W_S)(),(0,F.Sn)("design:type",Array)],H.prototype,"_disabledSlots",void 0),H=(0,F.Cg)([(0,G.EVk)("PlayerSpineAppearanceSelector",G.YH6.animation)],H)},97252:(k,B,U)=>{"use strict";var F,G,j;U.d(B,{At:()=>G,EQ:()=>F,M:()=>j}),function(k){k[k.BOOTS=0]="BOOTS",k[k.OUTFIT=1]="OUTFIT",k[k.WEAPON=2]="WEAPON",k[k.HAIR=3]="HAIR",k[k.HAT=4]="HAT",k[k.FACE=5]="FACE",k[k.COSTUME=6]="COSTUME"}(F||(F={})),function(k){k.Boots="boots",k.Outfit="outfit",k.Weapon="weapon",k.SpellRelic="spellRelic",k.Mount="mount",k.Costume="costume"}(G||(G={})),function(k){k[k.DEFAULT_1X=0]="DEFAULT_1X",k[k.UPSCALED_4x=1]="UPSCALED_4x"}(j||(j={}))},39571:(k,B,U)=>{"use strict";var F;U.d(B,{a:()=>F}),function(k){k.ActiveSideBack="unit-activeSide-back-",k.ActiveSideCast="unit-activeSide-cast-",k.ActiveSideFront="unit-activeSide-front-",k.InactiveSide="unit-inactiveSide-"}(F||(F={}))},77409:(k,B,U)=>{"use strict";U.d(B,{q:()=>G});var F=U(62459);class G extends F.uAl{create(){super.create(),this._filters=[],this.renderComponent||(this.renderComponent=this.gameObject.findComponentInChildren(F.y4o,!0))}addFilter(k){this._filters.push(k),this.refreshFilters()}removeFilter(k){const B=this._filters.indexOf(k);B>-1&&this._filters.splice(B,1),this.refreshFilters()}refreshFilters(){var k;const B=null===(k=this.renderComponent)||void 0===k?void 0:k.getRootContainer();B&&(B.filters=this._filters)}}},76724:(k,B,U)=>{"use strict";U.d(B,{t:()=>H});var F,G=U(8674),j=U(62459),$=U(91016);let H=F=class extends $.lL{constructor(){super(...arguments),this.id="multihit"}play(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=k.manager.steps.indexOf(this);let U=-1;for(let F=B;F{"use strict";U.d(B,{o:()=>St});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(35120),V=U(91016);let W=class extends V.lL{constructor(){super(...arguments),this.target=V.Wo.Caster,this.delayPerTarget=0,this.isHidden=!1}play(k){return(0,F.sH)(this,void 0,void 0,(function*(){this._timeouts=[],this.getTargets(k,this.target,((B,U)=>{this._timeouts.push(window.setTimeout((()=>{k.manager.onApplyDamage.dispatch(B,this.isHidden)}),1e3*this.delayPerTarget*U))}))}))}destroy(){if(this._timeouts)for(const k of this._timeouts)clearTimeout(k)}};W=(0,F.Cg)([(0,G.s0Z)("ApplyDamageStep")],W);var q=U(90351);class K extends V.lL{constructor(){super(...arguments),this.blockSpell=!1}play(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.blockSpell)return new Promise(((k,B)=>{this._resolve||(this._resolve=[]),this._resolve.push(k),this._reject=k}))}))}}let z=class extends K{constructor(){super(...arguments),this.target=V.Wo.Caster,this.delayPerTarget=0,this.movePositionX=0,this.movePositionY=0,this.scaleAmountX=1,this.scaleAmountY=1,this.rotationAmount=0,this.moveTime=.5,this.returnTime=.5,this.positionChangeEase=q.i.ExponentialInOut,this.positionReturnEase=q.i.ExponentialInOut,this.scaleChangeEase=q.i.ExponentialInOut,this.scaleReturnEase=q.i.ExponentialInOut,this.rotationChangeEase=q.i.ExponentialInOut,this.rotationReturnEase=q.i.ExponentialInOut}play(k){const B=Object.create(null,{play:{get:()=>super.play}});return(0,F.sH)(this,void 0,void 0,(function*(){var U,F;const G=B.play.call(this,k),j=[];this.getTargets(k,this.target,((k,B)=>{j.push(this.animate(k,this.delayPerTarget*B*1e3))}));const $=(null===(U=this._resolve)||void 0===U?void 0:U.length)>0?this._resolve.shift():void 0;return Promise.all(j).then(null==$?void 0:$.bind(this),null===(F=this._reject)||void 0===F?void 0:F.bind(this)),G}))}animate(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=Math.sign(k.transform.localScale.x),F=Math.sign(k.transform.localScale.y),j={x:k.transform.localScale.x,y:k.transform.localScale.y},$={x:k.transform.localPosition.x,y:k.transform.localPosition.y},V=k.transform.localRotation;return yield G.Egh.timeout(B),yield new Promise((B=>{H.q.instance.game.add.tween(k.transform.localPosition,this,!0).to({x:$.x-this.movePositionX*U,y:$.y-this.movePositionY*F},1e3*this.moveTime,q.K.getEasingFunctionFromEnum(this.positionChangeEase)).start();const G={x:k.transform.localScale.x,y:k.transform.localScale.y},j=H.q.instance.game.add.tween(G,this,!0);j.to({x:this.scaleAmountX*U,y:this.scaleAmountY*F},1e3*this.moveTime,q.K.getEasingFunctionFromEnum(this.scaleChangeEase)),j.onUpdate.add((()=>{k.transform.setScale(G.x,G.y)})),j.start();const V=H.q.instance.game.add.tween(k.transform,this,!0);V.to({localRotation:this.rotationAmount},1e3*this.moveTime,q.K.getEasingFunctionFromEnum(this.rotationChangeEase)),V.onTweenComplete.addOnce(B),V.start()})),yield new Promise((B=>{H.q.instance.game.add.tween(k.transform.localPosition,this,!0).to({x:$.x,y:$.y},1e3*this.returnTime,q.K.getEasingFunctionFromEnum(this.positionReturnEase)).start();const U={x:k.transform.localScale.x,y:k.transform.localScale.y},F=H.q.instance.game.add.tween(U,this,!0);F.to({x:j.x,y:j.y},1e3*this.returnTime,q.K.getEasingFunctionFromEnum(this.scaleReturnEase)),F.onUpdate.add((()=>{k.transform.setScale(U.x,U.y)})),F.start();const G=H.q.instance.game.add.tween(k.transform,this,!0);G.to({localRotation:V},1e3*this.returnTime,q.K.getEasingFunctionFromEnum(this.rotationReturnEase)),G.onTweenComplete.addOnce(B),G.start()})),Promise.resolve()}))}};var Y;z=(0,F.Cg)([(0,G.s0Z)("GenericMotionStep")],z);let Q=Y=class extends K{constructor(){super(...arguments),this.target=V.Wo.Targets,this.delayPerTarget=0,this.knockbackDistance=35,this.knockbackAngle=0,this.knockbackTime=.1,this.returnTime=.9,this.knockbackEase=q.i.CircularOut,this.returnEase=q.i.ExponentialOut}play(k){const B=Object.create(null,{play:{get:()=>super.play}});return(0,F.sH)(this,void 0,void 0,(function*(){var U,F;const G=B.play.call(this,k),j=[];this.getTargets(k,this.target,((B,U)=>{j.push(this.animate(k,B,this.delayPerTarget*U*1e3))}));const $=(null===(U=this._resolve)||void 0===U?void 0:U.length)>0?this._resolve.shift():void 0;return Promise.all(j).then(null==$?void 0:$.bind(this),null===(F=this._reject)||void 0===F?void 0:F.bind(this)),G}))}animate(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){var k,F;const j=H.q.instance.game.tweens.getAll();for(const U of j)if((null===(k=U.owner)||void 0===k?void 0:k.step)instanceof Y&&(null===(F=U.owner)||void 0===F?void 0:F.target)===B){U.stop(!0);break}const $=Math.sign(B.transform.localScale.x),V={x:B.transform.localPosition.x,y:B.transform.localPosition.y},W=this.knockbackAngle*G.cj9.DEG_TO_RAD+Math.PI,K={x:V.x+Math.cos(W)*this.knockbackDistance*$,y:V.y+Math.sin(W)*this.knockbackDistance};return yield G.Egh.timeout(U),yield new Promise((k=>{const U=H.q.instance.game.add.tween(B.transform.localPosition,{step:this,target:B},!0);U.to(K,1e3*this.knockbackTime,q.K.getEasingFunctionFromEnum(this.knockbackEase)).to(V,1e3*this.returnTime,q.K.getEasingFunctionFromEnum(this.returnEase)),U.onTweenComplete.addOnce(k),U.start()})),Promise.resolve()}))}};Q=Y=(0,F.Cg)([(0,G.s0Z)("KnockbackStep")],Q);let X=class extends V.lL{constructor(){super(...arguments),this.id="multihit"}};X=(0,F.Cg)([(0,G.s0Z)("MultiHitEndStep")],X);var Z=U(76724),J=U(83441),tt=U(29834);let et=class extends K{constructor(){super(...arguments),this.target=V.Wo.Caster,this.animation="attack",this.returnToLoop="idle"}play(k){const B=Object.create(null,{play:{get:()=>super.play}});return(0,F.sH)(this,void 0,void 0,(function*(){var U,F;let j;switch(this._animators=[],this.target){case V.Wo.Caster:if(!k.caster)return;j=[k.caster.gameObject];break;case V.Wo.Centre:j=[k.manager.GameObject];break;default:j=k.targets.map((k=>k.gameObject))}for(let k=0;k{var k;B.playAnimation(this.returnToLoop,!0),(null===(k=this._resolve)||void 0===k?void 0:k.length)>0&&this._resolve.shift()()}))}else this._reject&&this._reject("target animator not found, skipping spell")}yield B.play.call(this,k)}))}};et=(0,F.Cg)([(0,G.s0Z)("PlayAnimationStep")],et);var it,st=U(68910),nt=U(56942),at=U(28402);!function(k){k.SpellSlotBack="spell-slot-back-",k.SpellSlotFront="spell-slot-front-"}(it||(it={}));let rt=class extends K{constructor(){super(...arguments),this.target=V.Wo.Caster,this.isBelow=!1,this.layerOverride=V.Cr.None,this.spineID=nt.Q.Default_follow_172_json,this.animation="idle",this.scale=1,this.offset={x:0,y:0},this.delayPerTarget=0,this.rotateTowards=!1,this.rotateOffset={x:0,y:0},this.allowMultipleSpineInstances=!1,this._spineCount=[],this._activeSpines=[]}play(k){const B=Object.create(null,{play:{get:()=>super.play}});return(0,F.sH)(this,void 0,void 0,(function*(){var U,F,j,$;this._activeSpines=[],this._timeouts=[];const H=Math.sign(null!==(F=null===(U=k.caster)||void 0===U?void 0:U.gameObject.transform.localScale.x)&&void 0!==F?F:1),W=this.target===V.Wo.Caster&&k.spellOriginOffset?k.spellOriginOffset:{x:0,y:0},q=[V.Wo.Caster,V.Wo.Targets,V.Wo.TargetsAverage].includes(this.target)&&null!==($=null===(j=k.caster)||void 0===j?void 0:j.gameObject.transform.worldScale.y)&&void 0!==$?$:1;let K=0;this.getTargets(k,this.target,((B,U)=>{let F=this.getOppositeTargets(k,this.target);!this.allowMultipleSpineInstances&&(null==F?void 0:F.length)>1&&(F=[F[0]]);const j=Math.max(F.length,1);for(let k=0;k{var U,j,$;const K=this.target===V.Wo.Caster?q:this.target===V.Wo.Targets?B.transform.worldScale.y:1,z=new G._mx;z.name=`PlaySpineStep_${k}`;const Y=this.isBelow&&null!==(j=null===(U=B.parent)||void 0===U?void 0:U.children.length)&&void 0!==j?j:0;null===($=B.parent)||void 0===$||$.addChildAt(z,Y);const Q=new st.Point(B.transform.worldPosition.x+(this.offset.x+W.x)*K*H,B.transform.worldPosition.y+(this.offset.y+W.y)*K);z.addComponent(G.dLy).worldPosition=Q;const X=q/z.transform.worldScale.y;if(z.transform.localScale=new st.Point(this.scale*X*H,this.scale*X),this.layerOverride!==V.Cr.None)z.layer=this.layerOverride;else if(this.target===V.Wo.Caster||this.target===V.Wo.Targets){const k=this.isBelow?it.SpellSlotBack:it.SpellSlotFront,U=B.layer.charAt(B.layer.length-1);z.layer=`${k}${U}`}else z.layer=this.isBelow?"background":"foreground";const Z=z.addComponent(at.v),J=z.addComponent(tt.j);if(Z.setAsset(this.spineID,this.onSpineLoaded.bind(this,J)),Z.isLoaded&&this.onSpineLoaded(J),this.rotateTowards){const B=null==F?void 0:F[k].transform;if(B){let k=Math.atan2(B.worldPosition.y+this.rotateOffset.y-Q.y,B.worldPosition.x+this.rotateOffset.x*Math.sign(B.localScale.x)-Q.x);H<0&&(k+=Math.PI),J.GameObject.transform.setRotation(k/Math.PI*180)}}}),1e3*this.delayPerTarget*(U+k))),K++})),K<=0||(this._spineCount||(this._spineCount=[]),this._spineCount.push(K),yield B.play.call(this,k))}))}onSpineLoaded(k){this._activeSpines.includes(k)||(this._activeSpines.push(k),k.playAnimation(this.animation,!1),k.spine.getSpine().onComplete.add((()=>{this.cleanupSpine(k)}),this),k.spine.getSpine().updateMethod=G.ba$.Spine)}cleanupSpine(k){var B;this._activeSpines&&(k.spine.getSpine().onComplete.removeAll(this),k.GameObject.destroyDeferred(),this._activeSpines.splice(this._activeSpines.indexOf(k),1),this._spineCount.length>0&&(this._spineCount[0]--,0===this._spineCount[0]&&(this._spineCount.shift(),(null===(B=this._resolve)||void 0===B?void 0:B.length)>0&&this._resolve.shift()())))}finish(){return(0,F.sH)(this,void 0,void 0,(function*(){yield Promise.all(this._activeSpines.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return k.spine.getSpine().onComplete.asPromise()})))))}))}destroy(){if(this._timeouts)for(let k=0;ksuper.play}});return(0,F.sH)(this,void 0,void 0,(function*(){yield B.play.call(this,k),this._activePrefabs=[],this._promises=[],this.getTargets(k,this.target,((k,B)=>(0,F.sH)(this,void 0,void 0,(function*(){const U=G.Egh.cancelableTimeout(this.delayPerTarget*B*1e3);this._promises.push(U),yield U.promise,this.destroyPrefabsOnDestroy&&U.cancelled||this.loadPrefab(k)}))))}))}loadPrefab(k){const B=H.q.instance.prodigy.gameContainer.get("d0e-64fd"),U=ht.d.loadWithInjectedValuesAndDependenciesFromGUID(B,this.prefabID,{},k).then((k=>{this.destroyPrefabsOnDestroy&&U.cancelled?k.destroyDeferred():(this._activePrefabs.push(k),k.transform.localPosition=this.offset)}));this._promises.push(U)}destroy(){for(let k=0;ksuper.play}});return(0,F.sH)(this,void 0,void 0,(function*(){this.destroyPrefabsOnDestroy=!1,yield B.play.call(this,k)}))}loadPrefab(k){var B,U,F,G;const j=this._spellData.targets.find((B=>B.gameObject===k)),$=null===(B=this._spellData.manager.battleController)||void 0===B?void 0:B.getUnitById(null!==(U=null==j?void 0:j.unitId)&&void 0!==U?U:"");this._spellData.manager.statusEffectAnimationController.queueAnimationAction(this.prefabID,null!==(F=null==j?void 0:j.statusEffectContainer)&&void 0!==F?F:k,this.statusEffectAnimation,this.blockStatusEffectAnimationQueue,null!==(G=null==$?void 0:$.size)&&void 0!==G?G:ot.X.Normal)}destroy(){this._statusEffectAnimations.length=0,super.destroy()}getOverrideInspectorNode(k,B,U){return"statusEffectAnimation"===k?G.Gme.enumGroup({id:B,labelValue:k,selectValue:this[k],onChange:k=>{U("",k)}},dt.l):"destroyPrefabsOnDestroy"!==k}};lt=(0,F.Cg)([(0,G.s0Z)("PlayStatusEffectStep")],lt);let ut=class extends K{constructor(){super(...arguments),this.spineID=nt.Q.Default_follow_172_json,this.animation="idle",this.scale=1,this.startOffset={x:0,y:0},this.endOffset={x:0,y:0},this.delayPerTarget=0,this.travelTime=1,this.syncAnimation=!0,this.rotateTowards=!0,this.isBelow=!1,this._spineCount=[]}play(k){const B=Object.create(null,{play:{get:()=>super.play}});return(0,F.sH)(this,void 0,void 0,(function*(){var U,F,j;if(!k.caster)return void G.VyI.log("Spells with PlayTravelingSpineStep require a caster",G.$bb.Error);this._activeSpines=[],this._activeTweens=[],this._timeouts=[],this._positionScale=Math.sign(k.caster.gameObject.transform.localScale.x);const $=null!==(U=k.spellOriginOffset)&&void 0!==U?U:{x:0,y:0},H=(this.startOffset.x+$.x)*this._positionScale,V=this.startOffset.y+$.y,W=this.endOffset.x*this._positionScale,q=this.endOffset.y,K=null!==(j=null===(F=k.caster)||void 0===F?void 0:F.gameObject.transform.worldScale.y)&&void 0!==j?j:1;let z=0;for(let B=0;B{const U=k.targets[B].gameObject,F=new G._mx(k.caster.gameObject.parent),j=this.isBelow?it.SpellSlotBack:it.SpellSlotFront,$=U.layer.charAt(U.layer.length-1);F.layer=`${j}${$}`,F.addComponent(G.dLy);const z=K/F.transform.worldScale.y;F.transform.localScale=new st.Point(this.scale*z*this._positionScale,this.scale*z);const Y=F.addComponent(at.v),Q=F.addComponent(tt.j);Y.setAsset(this.spineID,this.onSpineLoaded.bind(this,Q)),Y.isLoaded&&this.onSpineLoaded(Q);const X={x:k.caster.gameObject.transform.worldPosition.x+H*K,y:k.caster.gameObject.transform.worldPosition.y+V*K},Z={x:U.transform.worldPosition.x+W*U.transform.worldScale.y,y:U.transform.worldPosition.y+q*U.transform.worldScale.y};this.doTween(X,Z,Q)}),1e3*this.delayPerTarget*B)),z++;this._spineCount||(this._spineCount=[]),this._spineCount.push(z),yield B.play.call(this,k)}))}doTween(k,B,U){if(U.GameObject.transform.worldPosition=k,this.rotateTowards){let F=Math.atan2(B.y-k.y,B.x-k.x);this._positionScale<0&&(F+=Math.PI),U.GameObject.transform.setRotation(F/Math.PI*180)}U.GameObject.update();const F=H.q.instance.game.add.tween(k,this,!0).to(B,1e3*this.travelTime,G.GS3.Linear.None,!1);F.onUpdate.add((()=>{U.GameObject.transform.worldPosition=k}),this),F.onTweenComplete.addOnce((()=>{this.cleanupSpine(U)})),F.start(),this._activeTweens.push(F)}onSpineLoaded(k){if(-1!==this._activeSpines.indexOf(k))return;this._activeSpines.push(k);const B=k.spine.getSpine().setAnimationByName(0,this.animation,!this.syncAnimation).animationEnd;this.syncAnimation&&(k.spine.getSpine().state.timeScale=B/this.travelTime),k.spine.getSpine().updateMethod=G.ba$.Spine}cleanupSpine(k){var B;k.spine.getSpine().onComplete.removeAll(this),k.GameObject.destroyDeferred(),this._activeSpines.splice(this._activeSpines.indexOf(k),1),this._spineCount.length>0&&(this._spineCount[0]--,0===this._spineCount[0]&&(this._spineCount.shift(),(null===(B=this._resolve)||void 0===B?void 0:B.length)>0&&this._resolve.shift()()))}finish(){return(0,F.sH)(this,void 0,void 0,(function*(){yield Promise.race([Promise.all(this._activeTweens.filter((k=>!k.isDestroyed)).map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return k.onTweenComplete.asPromise()}))))),G.Egh.timeout(5e3)])}))}destroy(){for(let k=0;k{H.q.instance.game.tweens.remove(k)})),this._activeSpines.length=0,this._activeTweens.length=0,this._timeouts.length=0}getLoadDependencies(){return[this.spineID]}};ut=(0,F.Cg)([(0,G.s0Z)("PlayTravelingSpineStep")],ut);var ft,bt=U(84938);let pt=ft=class extends K{constructor(){super(...arguments),this.target=V.Wo.Camera,this.delayPerTarget=0,this.xShakeDistance=15,this.yShakeDistance=15,this.attackTime=.1,this.holdTime=0,this.returnTime=.5,this.attackEase=q.i.CircularOut,this.returnEase=q.i.ExponentialOut}play(k){const B=Object.create(null,{play:{get:()=>super.play}});return(0,F.sH)(this,void 0,void 0,(function*(){var U,F;const G=B.play.call(this,k),j=[];this.getTargets(k,this.target,((B,U)=>{j.push(this.animate(k,B,this.delayPerTarget*U*1e3))}));const $=(null===(U=this._resolve)||void 0===U?void 0:U.length)>0?this._resolve.shift():void 0;return Promise.all(j).then(null==$?void 0:$.bind(this),null===(F=this._reject)||void 0===F?void 0:F.bind(this)),G}))}animate(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){var k,F;const j=H.q.instance.game.tweens.getAll();for(const U of j)if((null===(k=U.owner)||void 0===k?void 0:k.step)instanceof ft&&(null===(F=U.owner)||void 0===F?void 0:F.target)===B){U.stop(!0);break}yield G.Egh.timeout(U);const $={x:B.transform.localPosition.x,y:B.transform.localPosition.y},V={strength:0};return yield new Promise((k=>{const U=H.q.instance.game.add.tween(V,{step:this,target:B},!0);U.to({strength:1},1e3*this.attackTime,q.K.getEasingFunctionFromEnum(this.attackEase)).to({strength:1},1e3*this.holdTime).to({strength:0},1e3*this.returnTime,q.K.getEasingFunctionFromEnum(this.returnEase)),U.onUpdate.add((()=>{B.transform.setPosition($.x+(2*Math.random()-1)*V.strength*this.xShakeDistance*bt.B.screenShake.value,$.y+(2*Math.random()-1)*V.strength*this.yShakeDistance*bt.B.screenShake.value)})),U.onTweenComplete.addOnce((()=>{B.transform.setPosition($.x,$.y),k()})),U.start()})),Promise.resolve()}))}};pt=ft=(0,F.Cg)([(0,G.s0Z)("ShakeStep")],pt);var vt=U(51742);let gt=class extends K{constructor(){super(...arguments),this.target=V.Wo.Caster,this.delayPerTarget=0,this.volume=1,this.startTime=0,this.duration=-1,this.soundGUID=vt.c.Sfx_ancient_teleport}play(k){const B=Object.create(null,{play:{get:()=>super.play}});return(0,F.sH)(this,void 0,void 0,(function*(){var U,F;const G=B.play.call(this,k),j=[];this.getTargets(k,this.target,((k,B)=>{j.push(this.playSound(k,this.delayPerTarget*B*1e3))}));const $=(null===(U=this._resolve)||void 0===U?void 0:U.length)>0?this._resolve.shift():void 0;return Promise.all(j).then(null==$?void 0:$.bind(this),null===(F=this._reject)||void 0===F?void 0:F.bind(this)),G}))}playSound(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){yield G.Egh.timeout(B);const k=bt.B.effectVolume.value,U=H.q.instance.game.sound.add(this.soundGUID);return U.addMarker("play",this.startTime,this.duration>0?this.duration:U.duration,this.volume*k),yield new Promise((k=>{U.play("play",k)})),Promise.resolve()}))}getLoadDependencies(){return[this.soundGUID]}};gt=(0,F.Cg)([(0,G.s0Z)("SoundStep")],gt);U(3583);var mt,yt=U(77409);let _t=mt=class extends K{constructor(){super(...arguments),this.target=V.Wo.Caster,this.color="FF0000",this.intensity=1,this.attack=.3,this.sustain=.3,this.release=.3,this.blend=G.PzZ.Multiply,this.delayPerTarget=0}play(k){const B=Object.create(null,{play:{get:()=>super.play}});return(0,F.sH)(this,void 0,void 0,(function*(){var U,F;const G=B.play.call(this,k),j=[];this.getTargets(k,this.target,((k,B)=>{j.push(this.animateTint(k,this.delayPerTarget*B*1e3))}));const $=(null===(U=this._resolve)||void 0===U?void 0:U.length)>0?this._resolve.shift():void 0;return Promise.all(j).then(null==$?void 0:$.bind(this),null===(F=this._reject)||void 0===F?void 0:F.bind(this)),G}))}animateTint(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U,F;const j=H.q.instance.game.tweens.getAll();for(const B of j)if((null===(U=B.owner)||void 0===U?void 0:U.step)instanceof mt&&(null===(F=B.owner)||void 0===F?void 0:F.target)===k){B.stop(!0);break}let $=k.findComponent(yt.q);$||($=k.addComponent(yt.q));const V=new G.oWr({color:Number.parseInt(this.color,16),tintIntensity:0,blend:this.blend});return yield G.Egh.timeout(B),$.addFilter(V),yield new Promise((B=>{const U=H.q.instance.game.add.tween(V,{step:this,target:k},!0);U.to({tintIntensity:this.intensity},1e3*this.attack).to({tintIntensity:this.intensity},1e3*this.sustain).to({tintIntensity:0},1e3*this.release),U.onTweenComplete.addOnce(B),U.start()})),$.removeFilter(V),Promise.resolve()}))}};_t=mt=(0,F.Cg)([(0,G.s0Z)("TintSpineStep")],_t);var Et=U(26460);let wt=class extends V.lL{constructor(){super(...arguments),this.delay=1}play(k){return(0,F.sH)(this,void 0,void 0,(function*(){return G.Egh.timeout(1e3*this.delay)}))}};var Tt;wt=(0,F.Cg)([(0,G.s0Z)("WaitStep")],wt);let St=Tt=class extends G.uAl{constructor(){super(...arguments),this.steps=[],this.index=0,this.subThreads=[],this._loadPromise=new G.bnh,this.assetIDs=[]}static createSpell(k){const B=new k;return B.__type=B.constructor.name,B}get loadPromise(){return this._loadPromise}create(){var k;super.create(),this.onApplyDamage=new G.HN0,this.battleController=G.wa5.getActiveScene().container.get("BattleController"),this.statusEffectAnimationController=null===(k=this.battleController)||void 0===k?void 0:k.statusEffectAnimationController}begin(k){return(0,F.sH)(this,void 0,void 0,(function*(){for(k.multiHit>1&&this.ensureMultihits(k),this.index=0;this.index{throw G.RQr.logError(k,""),k}))}this.subThreads.length>0&&(yield Promise.all(this.subThreads)),yield Promise.all(this.steps.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return k.finish()})))));for(let k=0;k=B?G.VyI.log("Invalid index range.",G.$bb.Error):"MultiHitStartStep"===(null===($=this.steps[k])||void 0===$?void 0:$.__type)?"MultiHitEndStep"===(null===(H=this.steps[B])||void 0===H?void 0:H.__type)?this.subThreads.push((()=>(0,F.sH)(this,void 0,void 0,(function*(){yield G.Egh.timeout(U);const F=[];for(let U=k+1;U{throw G.RQr.logError(k,""),k})):G.VyI.log("Nested multihit ranges are not supported.",G.$bb.Error)}for(let k=0;k"MultiHitStartStep"===k.__type)),U=this.steps.find((k=>"MultiHitEndStep"===k.__type));if(!B){const k=Tt.createSpell(Z.t);k.__type="MultiHitStartStep",this.steps.unshift(k),this._rawSpellStepData.unshift({__type:"MultiHitStartStep"}),G.VyI.log("MultiHitStartStep was added for compatibility. Please include this step for multihit functionality.",G.$bb.Warning)}if(!U){const k=Tt.createSpell(X);k.__type="MultiHitEndStep",this.steps.push(k),this._rawSpellStepData.push({__type:"MultiHitEndStep"}),G.VyI.log("MultiHitEndStep was added for compatibility. Please include this step for multihit functionality.",G.$bb.Warning)}}deserializeSpell(){const k=H.q.instance.game.cache.getJSON(this.spellGUID);if(k){this._rawSpellStepData=k.steps;for(let k=0;k{k[U]=$().cloneDeep(B[U])})),k}}preloadAssets(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.spellGUID){H.q.instance.game.cache.checkJSONKey(this.spellGUID)?this.deserializeSpell():yield new Promise(((k,B)=>{H.q.instance.prodigy.load.assets([this.spellGUID],((U,F)=>{F?(this.deserializeSpell(),k(void 0)):B(new Error(`App.instance.prodigy.load failed for assets ${this.spellGUID}`))}))}));for(const k of this.steps)this.assetIDs.push.apply(this.assetIDs,k.getLoadDependencies());return new Promise(((k,B)=>{H.q.instance.prodigy.load.assets(this.assetIDs,((U,F)=>{F?(this._loadPromise.resolve(),k()):B(new Error(`App.instance.prodigy.load failed for assets ${this.assetIDs.join(", ")}`))}))}))}G.VyI.log("Please set spellGUID before calling SpellComponent. Exiting the function, nothing was loaded.",G.$bb.Error)}))}destroy(){super.destroy(),this.onApplyDamage.dispose()}};St.spellConstructors=new Map([[V.dZ.ApplyDamage,Tt.createSpell.bind(Tt,W)],[V.dZ.Knockback,Tt.createSpell.bind(Tt,Q)],[V.dZ.MultiHitStart,Tt.createSpell.bind(Tt,Z.t)],[V.dZ.MultiHitEnd,Tt.createSpell.bind(Tt,X)],[V.dZ.PlayAnimation,Tt.createSpell.bind(Tt,et)],[V.dZ.PlaySpine,Tt.createSpell.bind(Tt,rt)],[V.dZ.PlayStatusEffect,Tt.createSpell.bind(Tt,lt)],[V.dZ.PlayTravelingSpine,Tt.createSpell.bind(Tt,ut)],[V.dZ.Shake,Tt.createSpell.bind(Tt,pt)],[V.dZ.Sound,Tt.createSpell.bind(Tt,gt)],[V.dZ.SpawnPrefab,Tt.createSpell.bind(Tt,ct)],[V.dZ.TintSpineStep,Tt.createSpell.bind(Tt,_t)],[V.dZ.Wait,Tt.createSpell.bind(Tt,wt)],[V.dZ.WaitForAnimationEvent,Tt.createSpell.bind(Tt,Et.D)],[V.dZ.GenericMotion,Tt.createSpell.bind(Tt,z)]]),(0,F.Cg)([(0,G.tW2)("spell"),(0,F.Sn)("design:type",String)],St.prototype,"spellGUID",void 0),St=Tt=(0,F.Cg)([(0,G.EVk)("Spell",G.YH6.animation)],St)},91016:(k,B,U)=>{"use strict";U.d(B,{Cr:()=>j,Wo:()=>F,dZ:()=>G,lL:()=>V});var F,G,j,$=U(8674),H=U(62459);!function(k){k[k.Caster=0]="Caster",k[k.Targets=1]="Targets",k[k.Centre=2]="Centre",k[k.TargetsAverage=3]="TargetsAverage",k[k.Camera=4]="Camera"}(F||(F={})),function(k){k.ApplyDamage="ApplyDamage",k.ApplyStatus="ApplyStatus",k.GenericMotion="GenericMotion",k.Knockback="Knockback",k.MultiHitStart="MultiHitStart",k.MultiHitEnd="MultiHitEnd",k.PlayAnimation="PlayAnimation",k.PlaySpine="PlaySpine",k.PlayStatusEffect="PlayStatusEffect",k.PlayTravelingSpine="PlayTravelingSpine",k.Shake="Shake",k.Sound="Sound",k.SpawnPrefab="SpawnPrefab",k.TintSpineStep="TintSpine",k.WaitForAnimationEvent="WaitForAnimationEvent",k.Wait="Wait"}(G||(G={})),function(k){k.None="none",k.Content="content",k.Background="background",k.Foreground="foreground",k.AboveForeground="above-foreground"}(j||(j={}));class V{play(k){return(0,$.sH)(this,void 0,void 0,(function*(){this._spellData=k,this._spellComponent=k.manager}))}getTargets(k,B,U){let G;const j=k.targets.map((k=>k.gameObject));switch(B){case F.Caster:G=k.caster?[k.caster.gameObject]:[];break;case F.Centre:G=[k.manager.GameObject];break;case F.TargetsAverage:this._targetsAverage=new H._mx,this._targetsAverage.addComponent(H.dLy);const B=new H.I9Y;for(let k=0;kk.gameObject))}return[]}finish(){return(0,$.sH)(this,void 0,void 0,(function*(){}))}destroy(){this._targetsAverage&&(this._targetsAverage.destroy(),this._targetsAverage=null)}getLoadDependencies(){return[]}getOverrideInspectorNode(k,B,U){return!0}}},90076:(k,B,U)=>{"use strict";U.d(B,{l:()=>F,r:()=>W});var F,G=U(8674),j=U(62459),$=U(35120),H=U(28152),V=U(29834);!function(k){k.Apply="apply",k.Trigger="trigger",k.Idle1TurnRemaining="idle4",k.Idle2TurnsRemaining="idle3",k.Idle3TurnsRemaining="idle2",k.Idle4TurnsRemaining="idle1",k.Exit="exit",k.Hide="hide"}(F||(F={}));let W=class extends j.uAl{constructor(){super(...arguments),this._showApplyAnimation=new j.HN0,this._showTriggerAnimation=new j.HN0,this._showDefaultOr1TurnRemainingIdle=new j.HN0,this._show2TurnRemainingIdle=new j.HN0,this._show3TurnRemainingIdle=new j.HN0,this._show4TurnRemainingIdle=new j.HN0,this._showExitAnimation=new j.HN0,this._ignoreSameAnimation=!1,this.onAnimationComplete=new j.HN0,this.onStatusEffectHidden=new j.HN0}testApplyAnimation(){this.playAnimation(F.Apply)}testTriggerAnimation(){this.playAnimation(F.Trigger)}testIdle1Animation(){this.playAnimation(F.Idle1TurnRemaining)}testIdle2Animation(){this.playAnimation(F.Idle2TurnsRemaining)}testIdle3Animation(){this.playAnimation(F.Idle3TurnsRemaining)}testIdle4Animation(){this.playAnimation(F.Idle4TurnsRemaining)}testExitAnimation(){this.playAnimation(F.Exit)}create(){super.create(),this._rootRenderComponent=this.gameObject.findComponent(j.y4o),this._rootRenderComponent||(this._rootRenderComponent=this.gameObject.addComponent(j.jsv));const k={alpha:1};this._fadeOutTween=$.q.instance.game.add.tween(k,this,!1),this._fadeOutTween.to({alpha:0},500),this._fadeOutTween.onUpdate.add((()=>{this._rootRenderComponent.getRootContainer().alpha=k.alpha})),this._fadeOutTween.onTweenComplete.add((()=>{this.disableAllRenderComponents(),k.alpha=1,this._rootRenderComponent.getRootContainer().alpha=1,this.onStatusEffectHidden.dispatch(),this.onAnimationComplete.dispatch()}))}playAnimation(k){var B,U;if(this._ignoreSameAnimation&&this.shouldIgnore(k))return!1;let G;switch(this._currentAnimation=k,k){case F.Apply:G=this._showApplyAnimation;break;case F.Trigger:G=this._showTriggerAnimation;break;case F.Idle1TurnRemaining:G=this.getIdleSignal(1);break;case F.Idle2TurnsRemaining:G=this.getIdleSignal(2);break;case F.Idle3TurnsRemaining:G=this.getIdleSignal(3);break;case F.Idle4TurnsRemaining:G=this.getIdleSignal(4);break;case F.Exit:G=this._showExitAnimation;break;case F.Hide:return void((null===(B=this._fadeOutTween)||void 0===B?void 0:B.isRunning)||null===(U=this._fadeOutTween)||void 0===U||U.start());default:throw new Error(`StatusEffectComponent: Trying to set invalid animation state: ${k}`)}this.disableAllRenderComponents();const $=[];return G._bindings.forEach((k=>{var B;if(void 0===(null===(B=k.context)||void 0===B?void 0:B.GameObject))return;k.context.GameObject.active=!0;const U=k.context.GameObject.findComponentInChildren(V.j);U&&$.push(U.OnAnimationComplete.asPromise());const F=k.context.GameObject.findComponentInChildren(j.okU);F&&$.push(F.onAllParticlesDead.asPromise())})),Promise.race([j.Egh.timeout(2e3),Promise.all($)]).then((()=>this.onAnimationComplete.dispatch())).catch(j.RQr.createHandler("StatusEffectAnimationComponent.playAnimation Error waiting for animation to complete")),G.dispatch(),!0}disableAllRenderComponents(){this.gameObject.findComponentsInChildren(V.j).forEach((k=>{k.GameObject.active=!1})),this.gameObject.findComponentsInChildren(j.okU).forEach((k=>{k.GameObject.active=!1}))}getIdleSignal(k){return k>=4&&this._show4TurnRemainingIdle.getBindingsCount()>0?this._show4TurnRemainingIdle:k>=3&&this._show3TurnRemainingIdle.getBindingsCount()>0?this._show3TurnRemainingIdle:k>=2&&this._show2TurnRemainingIdle.getBindingsCount()>0?this._show2TurnRemainingIdle:this._showDefaultOr1TurnRemainingIdle}destroy(){this._showApplyAnimation.dispose(),this._showTriggerAnimation.dispose(),this._showDefaultOr1TurnRemainingIdle.dispose(),this._show2TurnRemainingIdle.dispose(),this._show3TurnRemainingIdle.dispose(),this._show4TurnRemainingIdle.dispose(),this._showExitAnimation.dispose(),this.onAnimationComplete.dispose(),this.onStatusEffectHidden.dispose(),this._fadeOutTween&&$.q.instance.game.tweens.remove(this._fadeOutTween),super.destroy()}shouldIgnore(k){return(k===F.Idle1TurnRemaining||k===F.Idle2TurnsRemaining||k===F.Idle3TurnsRemaining||k===F.Idle4TurnsRemaining)&&this._currentAnimation===k}};(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Signal to fire when the status effect is first applied to the unit"),(0,G.Sn)("design:type",j.HN0)],W.prototype,"_showApplyAnimation",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Signal to fire when the status effect is triggered (e.g. for a DOT effect)"),(0,G.Sn)("design:type",j.HN0)],W.prototype,"_showTriggerAnimation",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Signal to show the 1 turn remaining idle animation, which also serves as the default idle animation"),(0,G.Sn)("design:type",j.HN0)],W.prototype,"_showDefaultOr1TurnRemainingIdle",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Signal to show the 2 turn remaining idle animation"),(0,G.Sn)("design:type",j.HN0)],W.prototype,"_show2TurnRemainingIdle",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Signal to show the 3 turn remaining idle animation"),(0,G.Sn)("design:type",j.HN0)],W.prototype,"_show3TurnRemainingIdle",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Signal to show the 4 turn remaining idle animation"),(0,G.Sn)("design:type",j.HN0)],W.prototype,"_show4TurnRemainingIdle",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Signal to fire when the status effect is removed from the unit"),(0,G.Sn)("design:type",j.HN0)],W.prototype,"_showExitAnimation",void 0),(0,G.Cg)([(0,j.vkK)(),(0,j.YLv)("Whether to ignore playAnimation when the animation specified is already playing"),(0,G.Sn)("design:type",Boolean)],W.prototype,"_ignoreSameAnimation",void 0),(0,G.Cg)([(0,j.GO0)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],W.prototype,"testApplyAnimation",null),(0,G.Cg)([(0,j.GO0)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],W.prototype,"testTriggerAnimation",null),(0,G.Cg)([(0,j.GO0)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],W.prototype,"testIdle1Animation",null),(0,G.Cg)([(0,j.GO0)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],W.prototype,"testIdle2Animation",null),(0,G.Cg)([(0,j.GO0)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],W.prototype,"testIdle3Animation",null),(0,G.Cg)([(0,j.GO0)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],W.prototype,"testIdle4Animation",null),(0,G.Cg)([(0,j.GO0)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],W.prototype,"testExitAnimation",null),W=(0,G.Cg)([(0,j.EVk)("StatusEffectAnimation",H.Y.animation)],W)},3583:(k,B,U)=>{"use strict";U.d(B,{c:()=>Z});var F=U(8674),G=U(87490),j=U(62459),$=U(99625),H=U(35120),V=U(77938),W=U(13302),q=U(68152),K=U(80060),z=U(30226),Y=U(90076);const Q={[W.X.Small]:1,[W.X.Medium]:1,[W.X.Normal]:1,[W.X.Large]:2,[W.X.Huge]:2},X={[G.EStatusEffectType.Bomb]:1};class Z{constructor(){this._statusEffectPool=[],this._queuedUnitActions=new Map,this._prefabGuidToTypeMap={},V.t.data.statusEffect.map((k=>k.data)).forEach((k=>{var B;if(null===(B=k.animationData)||void 0===B?void 0:B.statusEffectPrefab){const B=$.l[k.animationData.statusEffectPrefab];if(!j.Aq$.isDefined(B))return void j.VyI.log(`"${k.animationData.statusEffectPrefab}" is not a valid prefab name (ID "${k.id}")`,j.$bb.Error);this._prefabGuidToTypeMap[B]=k.type}else j.VyI.log(`StatusEffectAnimationController: Required status effect animation data missing for ID ${k.id}`,j.$bb.Warning)}))}getStatusEffectAnimation(k,B){let U;(0,q.v)(z.J.isGuid(k),"prefabGuid must be a valid GUID");for(const F of this._statusEffectPool)if(F.prefabGuid===k){if(F.gameObject.parent===B){U=F;break}F.gameObject.parent||(U=F)}return U?(B.addChild(U.gameObject),new j.kBN((k=>k(U.gameObject)))):this.createNewStatusEffect(k,B)}createNewStatusEffect(k,B){(0,q.v)(z.J.isGuid(k),"prefabGuid must be a valid GUID");const U=H.q.instance.prodigy.gameContainer.get("d0e-64fd"),F=K.d.loadWithInjectedValuesAndDependenciesFromGUID(U,k,{}).then((U=>{const G=U.findComponentInChildren(Y.r,!0);if(!G)throw new Error(`StatusEffectAnimationComponent not found on prefab ${k}`);G.onStatusEffectHidden.add((()=>U.parent=void 0)),this._statusEffectPool.push({prefabGuid:k,gameObject:U}),F.cancelled||B.addChild(U)}));return F}hideAnimationOfType(k,B,U){U&&(0,q.v)(z.J.isGuid(U),"prefabGuidToIgnore must be a valid GUID");const F=this._queuedUnitActions.get(B);if(!F)return;const G=F.filter((B=>k===this._prefabGuidToTypeMap[B.prefabGuid])),j=G.length>0&&G[G.length-1].animation!==Y.l.Hide?G[G.length-1]:void 0;j&&j.prefabGuid!==U&&F.push({prefabGuid:j.prefabGuid,parent:B,animation:Y.l.Hide,state:"queued",blocking:!1})}queueAnimationAction(k,B,U,F,G){(0,q.v)(z.J.isGuid(k),"prefabGuid must be a valid GUID");let j=this._queuedUnitActions.get(B);j||(j=[],this._queuedUnitActions.set(B,j)),this.hideAnimationOfType(this._prefabGuidToTypeMap[k],B,k),j.push({prefabGuid:k,parent:B,animation:U,state:"queued",blocking:F,targetSize:G}),this._queuedUnitActions.set(B,j.filter(((k,B)=>{const U=j[B+1];return"queued"!==k.state||k.animation!==Y.l.Hide||(null==U?void 0:U.animation)===Y.l.Hide||k.prefabGuid!==(null==U?void 0:U.prefabGuid)})))}update(){this._queuedUnitActions.forEach((k=>{this.playNextQueuedAnimation(k).catch(j.RQr.createHandler("Error playing queued status effect animations"))}))}playNextQueuedAnimation(k){return(0,F.sH)(this,void 0,void 0,(function*(){let B;for(const G of k){if("active"===G.state)break;if("queued"===G.state){B=G;break}}if(!B)return;B.state=B.blocking?"active":"complete";const U=yield this.getStatusEffectAnimation(B.prefabGuid,B.parent);this._prefabGuidToTypeMap[B.prefabGuid]===G.EStatusEffectType.Bomb?U.bringToFront():U.sendToBack(),this.setStatusEffectScale(U,B.targetSize,this._prefabGuidToTypeMap[B.prefabGuid]);const F=U.findComponent(Y.r);F&&(F.onAnimationComplete.addOnce((()=>B.state="complete")),F.playAnimation(B.animation)||(B.state="complete"))}))}setStatusEffectScale(k,B,U){let F=B?Q[B]:k.transform.localScale.x;const G=X[U];void 0!==G&&(F=G),k.transform.worldScale={x:F,y:F};const j=Math.sign(k.transform.localScale.x),$=Math.sign(k.transform.localScale.y);k.transform.localScale.x*=j,k.transform.localScale.y*=$}destroy(){H.q.instance.game.app.ticker.remove(this.update,this),this._statusEffectPool.forEach((k=>{k.gameObject&&!k.gameObject.isDestroyed&&k.gameObject.destroy()})),this._statusEffectPool.length=0}static getIdleAnimation(k){switch(k){case 4:return Y.l.Idle4TurnsRemaining;case 3:return Y.l.Idle3TurnsRemaining;case 2:return Y.l.Idle2TurnsRemaining;default:return Y.l.Idle1TurnRemaining}}}},26460:(k,B,U)=>{"use strict";U.d(B,{D:()=>V});var F,G=U(8674),j=U(62459),$=U(76724),H=U(91016);let V=F=class extends H.lL{constructor(){super(...arguments),this.eventName="cast"}play(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;let U;for(let F=k.manager.steps.indexOf(this)-1;F>=0;F--)if("PlayAnimationStep"===k.manager.steps[F].__type){U=k.manager.steps[F];break}(null===(B=null==U?void 0:U._animators)||void 0===B?void 0:B.length)&&(yield Promise.race([U._animators[0].spine.waitForEvent(this.eventName),j.Egh.timeout(F.MAX_WAIT_TIME_MS)]))}))}};V.MAX_WAIT_TIME_MS=5*$.t.delay*1e3,V=F=(0,G.Cg)([(0,j.s0Z)("WaitForAnimationEventStep")],V)},37394:(k,B,U)=>{"use strict";U.d(B,{D:()=>W});var F=U(8674),G=U(62459),j=U(68910),$=U(35120),H=U(59231),V=U(30442);class W extends G.uAl{constructor(){super(...arguments),this.allowScrollWheel=!0,this.alwaysScrollWheel=!1,this.onMouseScrollWheelUsed=new G.HN0,this.contentDraggingEnabled=!0,this._contentClicked=!1,this._contentDragged=!1,this._dragThreshold=10,this._maximumMouseWheelSpeed=100,this._wasDraggedSinceLastMouseDown=!1}get wasDraggedSinceLastMouseDown(){return this._wasDraggedSinceLastMouseDown}create(){super.create(),this.rectTransform=this.GameObject.findComponent(G.XVE),this.beginDragDetection=this.beginDragDetection.bind(this),this.onDragEnd=this.onDragEnd.bind(this),this.scrollWheelBounds||(this.scrollWheelBounds=this.rectTransform),this.onMouseWheel=this.onMouseWheel.bind(this),$.q.instance.game.input.mouse.addMouseWheelCallback(this.onMouseWheel),$.q.instance.game.input.onDown.add(this.beginDragDetection),$.q.instance.game.input.onUp.add(this.onDragEnd)}postCreate(){super.postCreate(),this._dragInputSprite=new V.k($.q.instance.game),this._dragInputSprite.visible=!1,this._dragInputHandler=new H.l(this._dragInputSprite),this._dragInputSprite.inputEnabled=!1}destroy(){super.destroy(),this._dragInputHandler.destroy(),this._dragInputSprite.destroy(),$.q.instance.game.input.mouse.removeMouseWheelCallback(this.onMouseWheel),$.q.instance.game.input.onDown.remove(this.beginDragDetection),$.q.instance.game.input.onUp.remove(this.onDragEnd),this.onMouseScrollWheelUsed.dispose()}onMouseWheel(k){this.allowScrollWheel&&this.IsActiveInHierarchy&&(this.alwaysScrollWheel||this.containsPoint(this.scrollWheelBounds,$.q.instance.game.input.activePointer.x,$.q.instance.game.input.activePointer.y))&&(k.stopPropagation(),this.onMouseScrollWheelUsed.dispatch(k))}beginDragDetection(k){if(!this.contentDraggingEnabled)return;const B=$.q.instance.game.input.position;this.containsPoint(this.dragTransform,B.x,B.y)&&(this._dragInputPointer=k,this._contentClicked=!0,this._lastDragMousePosition=new G.I9Y($.q.instance.game.input.activePointer.x,$.q.instance.game.input.activePointer.y),this._wasDraggedSinceLastMouseDown=!1)}onDragEnd(){var k;this._contentDragged&&(null===(k=this._dragInputPointer)||void 0===k||k.swapTarget(null)),this._dragInputPointer=null,this._contentClicked=!1,this._contentDragged=!1}checkDragStartHorizontal(){const k=$.q.instance.game.input.activePointer.x-this._lastDragMousePosition.x;Math.abs(k)>this._dragThreshold&&(this.startDrag(),this.dragContentHorizontal())}checkDragStartVertical(){const k=$.q.instance.game.input.activePointer.y-this._lastDragMousePosition.y;Math.abs(k)>this._dragThreshold&&(this.startDrag(),this.dragContentVertical())}startDrag(){this._contentDragged=!0,this._wasDraggedSinceLastMouseDown=!0,this._dragInputPointer.swapTarget(this._dragInputHandler)}dragContentHorizontal(){this._lastDragMousePosition.x=$.q.instance.game.input.activePointer.x}dragContentVertical(){this._lastDragMousePosition.y=$.q.instance.game.input.activePointer.y}containsPoint(k,B,U){const F=k.getBounds();let G=new j.Point(B,U);return G=k.worldMatrix.applyInverse(G),G.x+=k.fullWidth*k.pivot.x,G.y-=k.fullHeight*(1-k.pivot.y),G.x+=F.left,G.y+=F.bottom,G.xF.left&&G.yF.top}getVisibleLocalRange(){return new G.I9Y(-this.contentArea.posY,-this.contentArea.posY+this.contentArea.fullHeight)}}(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],W.prototype,"allowScrollWheel",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],W.prototype,"alwaysScrollWheel",void 0),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],W.prototype,"scrollWheelBounds",void 0),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],W.prototype,"contentArea",void 0),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],W.prototype,"dragTransform",void 0)},47287:(k,B,U)=>{"use strict";U.d(B,{g:()=>Y});var F=U(8674),G=U(62459),j=U(68910),$=U(35120),H=U(49237),V=U(76974),W=U(56163),q=U(82366),K=U(5269),z=U(28152);let Y=class extends W.t{constructor(){super(...arguments),this._moveDirection=K.H.Horizontal,this.allowMouseInput=!1,this.slide=!0,this.slideTime=500,this.lockInput=!1,this._centerAdjust=new G.I9Y(.5,.5),this.easeType=G.GS3.Linear.None,this.contentView=null,this.useMask=!0,this.maskOverride=null,this.indexMoveOverride=1,this._limitScrollToOverride=!1,this._hideOffscreenObjects=!1,this.onMouseScroll=new G.HN0,this.onScrollingToCompletion=new G.HN0,this.onStartedScrolling=new G.HN0,this.onFinishedScrolling=new G.HN0,this.onTargetSet=new G.HN0,this.onScrollingLocked=new G.HN0,this.onScrollingUnlocked=new G.HN0,this._atTargetLocation=!0,this._targetIndex=0,this._currentIndex=0,this._carouselObjects=[],this._moveToPoint=new G.I9Y,this._renderComponentDimensions=new G.or0,this._reverseNavigation=!1}get moveDirection(){return this._moveDirection}set horizontal(k){this._moveDirection=k?this._moveDirection|K.H.Horizontal:this._moveDirection&~K.H.Horizontal}get canMoveHorizontal(){return(this._moveDirection&K.H.Horizontal)===K.H.Horizontal}set vertical(k){this._moveDirection=k?this._moveDirection|K.H.Vertical:this._moveDirection&~K.H.Vertical}get canMoveVertical(){return(this._moveDirection&K.H.Vertical)===K.H.Vertical}set targetIndex(k){if(this._targetIndex!==k){const B=this.canScrollPositive,U=this.canScrollNegative;this._targetIndex=k,this.scrollingLockUpdated(B,U)}}get canScrollPositive(){if(this._reverseNavigation)return 0!==this._targetIndex;return this._targetIndex+this.indexMoveOverride<=this._carouselObjects.length-1}get canScrollNegative(){return this._reverseNavigation?this._targetIndex!==this._carouselObjects.length-this.indexMoveOverride:0!==this._targetIndex}get carouselObjects(){return this._carouselObjects}get progress(){return this._progress}get isScrolling(){return!this._atTargetLocation}postCreate(){super.postCreate(),this.allowMouseInput&&$.q.instance.game.input.addMoveCallback(this.mouseDragScroll,this),this.createMask(),this.gameObject.transform instanceof G.XVE&&this.gameObject.transform.onRecalculatedBounds.add(this.createMask,this),this.easeType={value:this._easeString},this._centerPoint=this.getCenterPoint(),this._mouseStart=new G.I9Y,this._mouseVelocity=new G.I9Y,this._moveToPoint=new G.I9Y,this._moveTween=$.q.instance.game.add.tween(this.getLocalPositionObject(this.contentView),this),this._carouselObjects.length>0&&this.setToIndex(0)}destroy(){var k;this.gameObject.transform instanceof G.XVE&&(null===(k=this.gameObject.transform.onRecalculatedBounds)||void 0===k||k.remove(this.createMask,this)),$.q.instance.game.input.deleteMoveCallback(this.mouseDragScroll,this),$.q.instance.game.tweens.remove(this._moveTween),this.onFinishedScrolling.dispose(),this.onStartedScrolling.dispose(),this.onScrollingToCompletion.dispose(),this.onMouseScroll.dispose(),this.onTargetSet.dispose(),this.onScrollingLocked.dispose(),this.onScrollingUnlocked.dispose(),this._pressedDown=!1;for(let B=0;BG):this.canMoveVertical&&(H.active=!(k.y$))}}mouseDragScroll(k,B,U){if(this._pressedDown){const k=$.q.instance.game.time.deltaMS;let F;this.canMoveHorizontal&&(F=B-this._mouseStart.x,this._mouseStart.x=B,this._mouseVelocity.x=F/(k+1),this.getLocalPositionObject(this.contentView).x+=F),this.canMoveVertical&&(F=U-this._mouseStart.y,this._mouseStart.y=U,this._mouseVelocity.y=F/(k+1),this.getLocalPositionObject(this.contentView).y+=F),this.onMouseScroll.getBindingsCount()>0&&(this.findNearestIndex(),this.onMouseScroll.dispatch(this._targetIndex))}}setToIndex(k){this.findScrollDistance(k),this.finishedScroll()}scrollToNextLocation(k){const B=this._reverseNavigation?-k:k;this.scrollToTargetLocation(this._targetIndex+B*(this.indexMoveOverride>=1?this.indexMoveOverride:1))}scrollToTargetLocation(k){this.slide?(this.findScrollDistance(k),this.startScroll()):this.setToIndex(k)}scrollToNearestLocation(){this.findNearestIndex(),this.findScrollDistance(this._targetIndex),this.startScroll()}findNearestIndex(){const k=this.getLocalPositionObject(this.contentView),B={x:k.x,y:k.y};B.x+=this._mouseVelocity.x*this.slideTime*2/3,B.y+=this._mouseVelocity.y*this.slideTime*2/3;let U=this._currentIndex;const F=this.getLocalPositionObject(this._carouselObjects[U]),j=new G.I9Y(F.x+B.x,F.y+B.y);let $=this.findPointDistance(this._centerPoint,j);for(let H=0;H{k.transform.setPosition(U.x,U.y)}),this,B.x,B.y);return U}return B}getSize(k){var B,U;return null!==(U=null===(B=k.legacyTransform)||void 0===B?void 0:B.group)&&void 0!==U?U:k.transform.rectTransformDimensions}updateScrollButtons(){this.scrollNegativeButton&&(this.canScrollNegative?this.scrollNegativeButton.unlockState():this.scrollNegativeButton.lockState(V.K.Disabled)),this.scrollPositiveButton&&(this.canScrollPositive?this.scrollPositiveButton.unlockState():this.scrollPositiveButton.lockState(V.K.Disabled))}scrollingLockUpdated(k,B){this.canScrollPositive!==k&&(this.canScrollPositive?this.onScrollingUnlocked.dispatch(1):this.onScrollingLocked.dispatch(1)),this.canScrollNegative!==B&&(this.canScrollNegative?this.onScrollingUnlocked.dispatch(-1):this.onScrollingLocked.dispatch(-1))}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"allowMouseInput",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"slide",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Y.prototype,"slideTime",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"lockInput",void 0),(0,F.Cg)([(0,G.vkK)(),(0,G.Lr6)(0),(0,G.nKb)("horizontalScrolling"),(0,F.Sn)("design:type",Boolean),(0,F.Sn)("design:paramtypes",[Boolean])],Y.prototype,"horizontal",null),(0,F.Cg)([(0,G.vkK)(),(0,G.Lr6)(0),(0,G.nKb)("verticalScrolling"),(0,F.Sn)("design:type",Boolean),(0,F.Sn)("design:paramtypes",[Boolean])],Y.prototype,"vertical",null),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],Y.prototype,"_centerAdjust",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.Lr6)(0),(0,G.nKb)("easeType"),(0,F.Sn)("design:type",String)],Y.prototype,"_easeString",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Y.prototype,"contentView",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"useMask",void 0),(0,F.Cg)([(0,G.MnK)(G.Lom),(0,F.Sn)("design:type",G.Lom)],Y.prototype,"maskOverride",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Y.prototype,"indexMoveOverride",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_limitScrollToOverride",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_hideOffscreenObjects",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onTargetSet",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onScrollingLocked",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onScrollingUnlocked",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],Y.prototype,"_carouselObjects",void 0),(0,F.Cg)([(0,G.MnK)(H.$),(0,F.Sn)("design:type",H.$)],Y.prototype,"scrollNegativeButton",void 0),(0,F.Cg)([(0,G.MnK)(H.$),(0,F.Sn)("design:type",H.$)],Y.prototype,"scrollPositiveButton",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_reverseNavigation",void 0),Y=(0,F.Cg)([(0,G.EVk)("Carousel",z.Y.ui)],Y)},16043:(k,B,U)=>{"use strict";U.d(B,{a:()=>V});var F=U(8674),G=U(62459),j=U(49237),$=U(76974),H=U(28152);let V=class extends G.uAl{constructor(){super(...arguments),this._pageChangeDelta=1,this._maxPage=1,this._onPageChanged=new G.HN0,this._onMaxPageChanged=new G.HN0}get onPageChanged(){return this._onPageChanged}get onMaxPageChanged(){return this._onMaxPageChanged}get currentPage(){return this._currentPage}get maximumPage(){return this._maxPage}create(){super.create(),this._increasePageButton.onClick.add(this.applyPageChangeDelta,this,0,this._pageChangeDelta),this._decreasePageButton.onClick.add(this.applyPageChangeDelta,this,0,-this._pageChangeDelta),this.setCurrentPage(1)}postCreate(){super.postCreate(),this.setCurrentPage(this._currentPage,!0)}destroy(){this._increasePageButton.onClick.remove(this.applyPageChangeDelta,this),this._decreasePageButton.onClick.remove(this.applyPageChangeDelta,this),this._onPageChanged.dispose(),this._onMaxPageChanged.dispose(),super.destroy()}applyPageChangeDelta(k){this.setCurrentPage(this._currentPage+k)}setCurrentPage(k,B=!1){{const U=Math.max(1,Math.min(k,this._maxPage));(this._currentPage!==U||B)&&(1===U?this._decreasePageButton.isStateLocked()||this._decreasePageButton.lockState($.K.Disabled):this._decreasePageButton.isStateLocked()&&this._decreasePageButton.unlockState(),U===this._maxPage?this._increasePageButton.isStateLocked()||this._increasePageButton.lockState($.K.Disabled):this._increasePageButton.isStateLocked()&&this._increasePageButton.unlockState(),this._currentPage=U,this._onPageChanged.dispatch())}}setMaximumPage(k){this._maxPage!==k&&(this._maxPage=k,this._onMaxPageChanged.dispatch(),this._currentPage>k&&this.setCurrentPage(this._maxPage))}};(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],V.prototype,"_increasePageButton",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],V.prototype,"_decreasePageButton",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_pageChangeDelta",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_maxPage",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"_onPageChanged",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"_onMaxPageChanged",void 0),V=(0,F.Cg)([(0,G.EVk)("ChangePageButtons",H.Y.uiPagination)],V)},71041:(k,B,U)=>{"use strict";U.d(B,{Eo:()=>tt,RA:()=>X,n3:()=>Z});var F=U(8674),G=U(62459),j=U(68910),$=U(88022),H=U(91207),V=U(28152),W=U(90744),q=U(38920),K=U(31125),z=U(19633),Y=U(15284);class Q extends Y.T{constructor(){super(...arguments),this.validators=[{validate:k=>{if(/[^0-9,.]/g.test(k.text))return"Text should be some numeric value; eg. 9,999. Change it now?"},fix:k=>{k.text="9,999"}}]}getStandardButtonSettings(k,B){const U=[G.Gme.enumGroup({id:"type",labelValue:"Type",selectValue:k.type},K.vX),G.Gme.enumGroup({id:"size",labelValue:"Size",selectValue:k.size},K.YT)];return k.actionTextPosition===X.NONE?U.push(G.Gme.enumGroup({id:"iconPosition",labelValue:"Icon Position",selectValue:k.iconPosition},z.d)):U.push(G.Gme.enumGroup({id:"iconPosition",labelValue:"Icon Position",selectValue:k.iconPosition},Z)),k.iconPosition!==z.d.ICON_ONLY?U.push(G.Gme.enumGroup({id:"actionTextPosition",labelValue:"Action Text Position",selectValue:k.actionTextPosition},X)):k.actionTextPosition=X.NONE,k.iconPosition!==z.d.NONE&&U.push(G.Gme.numberGroup({id:"currency",labelValue:"Currency ID",inputValue:k.currency})),U.push(G.Gme.colorPickerGroup({id:"insufficientFundsColor",labelValue:"Insufficient Funds Color",inputValue:k.insufficientFundsColor}),G.Gme.numberGroup({id:"debounceTimeMs",labelValue:"Debounce Time (ms)",inputValue:k.debounceTimeMs}),G.Gme.numberGroup({id:"amount",labelValue:"Currency Amount",inputValue:k.amount})),k.actionTextPosition!==X.NONE?U.push(G.Gme.textGroup({id:"actionTextLocKey",labelValue:"Action Text Loc Key",inputValue:k.actionTextLocKey})):k.actionTextLocKey="",U.push(G.Gme.checkboxGroup({id:"fitToContents",labelValue:"Fit to Contents",inputValue:k.fitToContents})),U.push(G.Gme.checkboxGroup({id:"suppressSound",labelValue:"Suppress SFX",inputValue:k.suppressSound})),G.XRp.createVertical(U,{isCollapsible:!0,startCollapsed:!1,title:"Button Style"})}}var X,Z,J=U(97518);!function(k){k[k.NONE=0]="NONE",k[k.LEFT=1]="LEFT",k[k.RIGHT=2]="RIGHT"}(X||(X={})),function(k){k[k.NONE=0]="NONE",k[k.CENTER=1]="CENTER",k[k.ICON_ONLY=3]="ICON_ONLY"}(Z||(Z={}));let tt=class extends z.S{constructor(){super(...arguments),this._customIcons={1:{atlas:$._.General_icons_json,frame:"mail-gold"},27:{atlas:$._.Ui_hard_currency_json,frame:"icon-currency-27-small"}},this.currency=1,this._amount=9999,this.insufficientFundsColor=16711680,this.actionTextPosition=X.NONE,this.actionTextLocKey="",this._actionText=""}get amount(){return this._amount}set amount(k){this._amount=k,this.regenerateButton()}get buttonSizeSpecs(){return Object.assign({},K.Eo[this.size])}get buttonTypeSpecs(){let k=K.jN[this.type].textColor;return this._paymentManager.canAfford({currency:this.currency,value:this.amount})||(k=this.insufficientFundsColor),Object.assign(Object.assign({},K.jN[this.type]),{textColor:k})}updateIcon(k){var B;const U=null!==(B=this._customIcons[this.currency])&&void 0!==B?B:{atlas:H.E.getIconForType("currency",this.currency)};if(!G.Aq$.isDefined(U)||!G.Aq$.isDefined(this._iconComponent))return;this._iconComponent.updateAsset(U.atlas,U.frame),this._iconComponent.tint=16777215;const F=k&&"object"==typeof k?k.iconSize:this.buttonSizeSpecs.iconSize;this._iconTransform.setSizeDelta(F,F)}regenerateButton(){G.Aq$.isDefined(this.amount)&&G.Aq$.isDefined(this._textComponent)&&(this.text=(0,q.Hk)(this.amount,0,","),super.regenerateButton())}populateTextComponents(){var k,B,U,F;this._textComponent=null===(k=this.gameObject.findChildByName("Text"))||void 0===k?void 0:k.findComponentInChildren(G.EYj),this._textTransform=null===(B=this._textComponent)||void 0===B?void 0:B.GameObject.transform,this._actionTextComponent=null===(U=this.gameObject.findChildByName("ActionText"))||void 0===U?void 0:U.findComponentInChildren(J.R),this._actionTextTransform=null===(F=this._actionTextComponent)||void 0===F?void 0:F.GameObject.transform}updateComponentsFromSpecs(k,B){G.Aq$.isDefined(this._actionTextComponent)&&(this._actionTextComponent.localizedText.TextObject.style.fontFamily=k.fontFamily,this._actionTextComponent.localizedText.TextObject.style.fontSize=k.fontSize,this._actionTextComponent.localizedText.fontSize=k.fontSize,this._actionTextComponent.localizedText.TextObject.style.fill=K.jN[this.type].textColor),super.updateComponentsFromSpecs(k,B)}regenerateIconOnlyButton(k){G.Aq$.isDefined(this._actionTextComponent)&&(this._actionTextComponent.GameObject.active=!1),super.regenerateIconOnlyButton(k)}regenerateButtonText(k){if(G.Aq$.isDefined(this._actionTextComponent))if(this.actionTextPosition===X.NONE)this._actionTextComponent.GameObject.active=!1,super.regenerateButtonText(k);else{this._actionTextComponent.GameObject.active=!0,this._textComponent.GameObject.active=!0,this._actionTextComponent.setLocalizationKey(this.actionTextLocKey),this._actionText=this._actionTextComponent.localizedText.text;const B=Math.ceil(j.TextMetrics.measureText(this.text,this._textComponent.TextObject.style).width),U=Math.ceil(j.TextMetrics.measureText(this._actionText,this._actionTextComponent.localizedText.TextObject.style).width);this._textTransform.widthDelta=B,this._actionTextTransform.widthDelta=U,this._buttonWidth=B+U+2*k.margin;const F=this.actionTextPosition===X.LEFT?k.actionTextPadding:k.padding;let G=this.actionTextPosition===X.RIGHT?k.actionTextPadding:k.padding,$=0;this.iconPosition===z.d.NONE?(this._iconComponent.GameObject.active=!1,G=0):(this._iconComponent.GameObject.active=!0,this.updateIcon(this.buttonSizeSpecs),$=this._iconTransform.fullWidth,this._buttonWidth+=$+F+G);const H=Math.ceil(this._buttonWidth/2),V=this.actionTextPosition===X.LEFT?this._actionTextTransform:this._textTransform,W=this.actionTextPosition===X.RIGHT?this._actionTextTransform:this._textTransform,q=Math.ceil(V.widthDelta/2),K=Math.ceil(W.widthDelta/2),Y=Math.ceil($/2);V.posX=-H+k.margin+q,this._iconTransform.posX=V.posX+q+F+Y,W.posX=this._iconTransform.posX+Y+G+K,this._buttonWidth=Math.max(k.minWidth,this._buttonWidth),this._textTransform.top=0,this._textTransform.bottom=0,this._textTransform.posY=-Math.abs(k.yOffset),this._actionTextTransform.top=0,this._actionTextTransform.bottom=0,this._actionTextTransform.posY=-Math.abs(k.yOffset)}else super.regenerateButtonText(k)}};(0,F.Cg)([(0,G.Cdj)("743-fd51"),(0,F.Sn)("design:type",W.E)],tt.prototype,"_paymentManager",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],tt.prototype,"currency",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],tt.prototype,"_amount",void 0),(0,F.Cg)([(0,G.iEU)(),(0,F.Sn)("design:type",Number)],tt.prototype,"insufficientFundsColor",void 0),(0,F.Cg)([(0,G.gfw)(X),(0,F.Sn)("design:type",Number)],tt.prototype,"actionTextPosition",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],tt.prototype,"actionTextLocKey",void 0),tt=(0,F.Cg)([(0,G.EVk)("CurrencyButton",V.Y.ui),(0,G.WR4)(Q)],tt)},85515:(k,B,U)=>{"use strict";var F;U.d(B,{E:()=>F}),function(k){k.Default="default",k.BackgroundLayer="background",k.ContentLayer="content",k.ForegroundLayer="foreground",k.DifficultyModeOverlay="difficultyModeOverlay",k.UiLayer="uiLayer",k.ConsentLayer="consentLayer",k.GameRenderCacheLayer="gameRenderCache",k.MenusLayer="menus",k.DialogueLayer="dialogueLayer",k.OverlayLayer="overlay",k.OpaqueLayer="opaque",k.Result="result",k.Ui="ui",k.Debug="debug"}(F||(F={}))},28829:(k,B,U)=>{"use strict";U.d(B,{q:()=>H});var F=U(8674),G=U(62459),j=U(29834),$=U(99625);let H=class extends G.uAl{constructor(){super(...arguments),this.glowSpinePrefabGuid=$.l.GlowHighlightAnimation,this.numberOfGlowToPreload=1,this._focusGameObjects=new Map}create(){super.create(),this.GameObject.active=!1,this._glowPool=new G.iyL((()=>this._prefabLoader.loadFromGUID(this.glowSpinePrefabGuid,this.GameObject))),this.numberOfGlowToPreload>0&&this._glowPool.allocate(this.numberOfGlowToPreload)}showOverlay(){return(0,F.sH)(this,void 0,void 0,(function*(){this.GameObject.active=!0,this.moveAllToFocusLayer(),yield this._fadeInOverlay()}))}hideOverlay(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this._fadeOutOverlay(),this.restoreAllToOriginalLayers(),this.GameObject.active=!1}))}playGlowAnimations(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=[];this._glowPool.aliveList.forEach((B=>{const U=B.findComponent(j.j);U.playAnimation("idle",!1,!0),k.push(U.OnAnimationComplete.asPromise())})),yield Promise.all(k)}))}setFocusLayer(k){this._focusLayer=k}addFocusableGameObject(k,B,U=!1,F){var G,j,$;if(null==F?void 0:F.applyGlow){const U=this._glowPool.getObject(),$=null!==(G=null==F?void 0:F.position)&&void 0!==G?G:{x:k.transform.worldPosition.x,y:k.transform.worldPosition.y};U.transform.setPosition($.x,$.y),this._focusGameObjects.set(U,{originalLayer:U.layer,focusLayer:null!==(j=null!=B?B:this._focusLayer)&&void 0!==j?j:this.GameObject.layer,applyToChildren:!1})}this._focusGameObjects.set(k,{originalLayer:k.layer,focusLayer:null!==($=null!=B?B:this._focusLayer)&&void 0!==$?$:this.GameObject.layer,applyToChildren:U})}moveAllToFocusLayer(){this._focusGameObjects.forEach(((k,B)=>{B.setLayer(k.focusLayer,k.applyToChildren)}))}restoreAllToOriginalLayers(){this._focusGameObjects.forEach(((k,B)=>{B.setLayer(k.originalLayer,k.applyToChildren)})),this._focusGameObjects.clear(),this._glowPool.aliveList.forEach((k=>{this._glowPool.recycleObject(k)}))}_fadeInOverlay(){return(0,F.sH)(this,void 0,void 0,(function*(){this._inAnimation.playAnimation(),yield this._inAnimation.onTweenComplete.asPromise()}))}_fadeOutOverlay(){return(0,F.sH)(this,void 0,void 0,(function*(){this._outAnimation.playAnimation(),yield this._outAnimation.onTweenComplete.asPromise()}))}};(0,F.Cg)([(0,G.MnK)(G.bTj),(0,F.Sn)("design:type",G.bTj)],H.prototype,"_inAnimation",void 0),(0,F.Cg)([(0,G.MnK)(G.bTj),(0,F.Sn)("design:type",G.bTj)],H.prototype,"_outAnimation",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"_focusLayer",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"glowSpinePrefabGuid",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"numberOfGlowToPreload",void 0),(0,F.Cg)([(0,G.Cdj)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],H.prototype,"_prefabLoader",void 0),H=(0,F.Cg)([(0,G.EVk)("FocusOverlay",G.YH6.ui)],H)},69811:(k,B,U)=>{"use strict";U.d(B,{y:()=>V});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(28152);let V=class extends G.uAl{constructor(){super(...arguments),this._graphicsChildren=[],this._selectedGraphicIndex=0}set selectedGraphicIndex(k){this.selectGraphicAtIndex(k)}get selectedGraphicIndex(){return this._selectedGraphicIndex}postCreate(){super.postCreate(),this._graphicsChildren=this.gameObject.findComponentsInChildren(G.vYh),this.selectGraphicAtIndex(this._selectedGraphicIndex)}selectGraphicAtIndex(k){this._selectedGraphicIndex=$().clamp(k,0,this._graphicsChildren.length-1);for(let B=0;B{"use strict";U.d(B,{P:()=>V});var F,G=U(8674),j=U(62459),$=U(99625),H=(U(70005),U(19690));let V=F=class extends j.uAl{spawnGuideHand(){return(0,G.sH)(this,arguments,void 0,(function*(k=this.gameObject.transform.worldPosition,B){var U;if(!this._spawnedGuideHand){if(!j.Aq$.isDefined(k.x)||!j.Aq$.isDefined(k.y))return j.VyI.log("GuideHandSpawnerComponent: Invalid position provided for guide hand spawn - guide hand was not created",j.$bb.Warning),null;const F={x:k.x,y:k.y},G=yield(0,H.Ks)().loadWithDependenciesFromGUID($.l.NavigationGuideHand);j.Aq$.isDefined(B)&&(G.layer=B),G.parent=this.gameObject,G.transform.worldPosition=F,G.transform.setRotation(null!==(U=this.angle)&&void 0!==U?U:this.getGuideHandDefaultAngle(F)),this._spawnedGuideHand=G}return this._spawnedGuideHand}))}despawnGuideHand(){var k;null===(k=this._spawnedGuideHand)||void 0===k||k.destroy(),this._spawnedGuideHand=void 0}getGuideHandDefaultAngle(k){const{width:B,height:U}=j.W$e.instance.game,G=k.xB-F.SCREEN_EDGE_PADDING,H=k.yU-F.SCREEN_EDGE_PADDING;return G?H?225:V?135:180:$?H?315:V?45:0:H?270:90}toggleGuideHand(){return(0,G.sH)(this,void 0,void 0,(function*(){}))}};V.SCREEN_EDGE_PADDING=40,(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],V.prototype,"angle",void 0),(0,G.Cg)([(0,j.GO0)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",Promise)],V.prototype,"toggleGuideHand",null),V=F=(0,G.Cg)([(0,j.EVk)("GuideHandSpawner")],V)},96304:(k,B,U)=>{"use strict";U.d(B,{j:()=>$});var F=U(8674),G=U(62459),j=U(93171);let $=class extends G.uAl{constructor(){super(...arguments),this.DefaultPunchStrength=.1,this.StrongPunchStrength=.25,this.SuperStrongPunchStrength=.6,this.LowHealthPercent=.2,this.MediumHealthPercent=.8,this.MagicEffectPointsBackgroundArray=[],this.BGFillerGraphicsArray=[],this.BGFillerTransformsArray=[],this.MagicEffectPointsEnabledArray=[],this.MagicEffectPointsEffectArray=[],this.HealthBarTimeline=null,this.LowHealthTimeline=null,this._viewAllUI=!0,this.GameObjectsToShowOnPreview=[],this.AnimatedObjects={}}DebugSetProgress100(){this.restartTimeline(1)}DebugSetProgress10(){this.restartTimeline(.1)}DebugSetProgress20(){this.restartTimeline(.2)}DebugSetProgress50(){this.restartTimeline(.5)}SetVisibleAllUIElements(k){this._viewAllUI}create(){super.create(),this.GameObject&&(this.SetVisibleAllUIElements(!0),this.HealthBarTimeline=new G.Kfn,this.AnimatedObjects.DynamicProgressBar=this.HealthBarTimeline.addGameObject(this.DynamicProgressBar),this.AnimatedObjects.StarGraphic=this.HealthBarTimeline.addGameObject(this.StarGraphic),this.AnimatedObjects.LevelUI=this.HealthBarTimeline.addGameObject(this.LevelUI),this.AnimatedObjects.MergeRankUI=this.HealthBarTimeline.addGameObject(this.MergeRankUI),this.AnimatedObjects.BuffsBackground=this.HealthBarTimeline.addGameObject(this.BuffsBackground),this.AnimatedObjects.TopUI=this.HealthBarTimeline.addGameObject(this.TopUI),this.AnimatedObjects.SpriteGraphic=this.HealthBarTimeline.addGameObject(this.SpriteGraphic),this.AnimatedObjects.MagicEffectPointsBackgroundArray=this.HealthBarTimeline.addGameObjects(this.MagicEffectPointsBackgroundArray),this.AnimatedObjects.MagicEffectPointsEnabledArray=this.HealthBarTimeline.addGameObjects(this.MagicEffectPointsEnabledArray),this.AnimatedObjects.MagicEffectPointsEffectArray=this.HealthBarTimeline.addGameObjects(this.MagicEffectPointsEffectArray),this.LowHealthTimeline=new G.Kfn,this.AnimatedObjects.BGFillerGraphicsArray=this.LowHealthTimeline.addGameObjects(this.BGFillerGraphicsArray),this.AnimatedObjects.BGFillerTransformsArray=this.LowHealthTimeline.addGameObjects(this.BGFillerTransformsArray),this.IsActiveInHierarchy||this.SetVisibleAllUIElements(!1))}destroy(){var k,B;null===(k=this.HealthBarTimeline)||void 0===k||k.destroyTimeline(),null===(B=this.LowHealthTimeline)||void 0===B||B.destroyTimeline(),this.SetVisiblePulseElements(!1),this.SetVisibleAllUIElements(!1),super.destroy()}restartTimeline(k){this._progressBar&&(this._progressBar.setValue(k),this.triggerShake(k))}SetVisiblePulseElements(k){this.BGFillerGraphicsArray&&this.BGFillerGraphicsArray.forEach((B=>{B&&(B.active=k)}))}attachLevelSequence(k){this.AnimatedObjects.StarGraphic&&this.AnimatedObjects.LevelUI&&this.HealthBarTimeline.to(this.AnimatedObjects.LevelUI,.1,{y:11},G.GS3.Quintic.Out,k).to(this.AnimatedObjects.LevelUI,.83,{y:0},G.GS3.generateCustomElasticEase(1.4,.8,!1,!0),k+.1).from(this.AnimatedObjects.StarGraphic,1.73,{rotation:-135,y:0},G.GS3.Quintic.Out,k)}attachMergeRankSequence(k){this.AnimatedObjects.MergeRankUI&&this.HealthBarTimeline.to(this.AnimatedObjects.MergeRankUI,.1,{y:14},G.GS3.Quintic.Out,k).to(this.AnimatedObjects.MergeRankUI,.83,{y:3},G.GS3.generateCustomElasticEase(1.4,.8,!1,!0),k+.1)}attachShieldSequence(k){this.AnimatedObjects.spriteGraphic&&this.HealthBarTimeline.from(this.AnimatedObjects.spriteGraphic,1.1,{x:-11,rotation:-5,scaleX:.94,scaleY:.94},G.GS3.Quintic.Out,k+.1)}attachMagicEffectsSequence(k){if(this.AnimatedObjects.MagicEffectPointsBackgroundArray&&this.AnimatedObjects.MagicEffectPointsEnabledArray&&this.AnimatedObjects.MagicEffectPointsEffectArray){const B={y:14,scaleX:.01,scaleY:.01,stagger:-.065},U={rotation:20,stagger:-.065},F=G.GS3.generateCustomElasticEase(.7,.6,!1,!0);this.HealthBarTimeline.from(this.AnimatedObjects.MagicEffectPointsBackgroundArray,.7,U,F,k).from(this.AnimatedObjects.MagicEffectPointsBackgroundArray,.7,B,F,k).from(this.AnimatedObjects.MagicEffectPointsEnabledArray,.7,U,F,k).from(this.AnimatedObjects.MagicEffectPointsEnabledArray,.7,B,F,k).from(this.AnimatedObjects.MagicEffectPointsEffectArray,.7,U,F,k).from(this.AnimatedObjects.MagicEffectPointsEffectArray,.7,B,F,k)}}CreateLowHealthPulseSequence(k){if(this.SetVisiblePulseElements(!0),this.AnimatedObjects.BGFillerGraphicsArray&&this.AnimatedObjects.BGFillerTransformsArray){this.LowHealthTimeline.new({startDelay:2,loopCount:-1,loopDelay:.4});const B=.5;this.LowHealthTimeline.to(this.AnimatedObjects.BGFillerTransformsArray,.01,{scaleX:1,scaleY:1},G.GS3.Sinusoidal.In,k).to(this.AnimatedObjects.BGFillerTransformsArray,1.4,{scaleX:1+.196*B,scaleY:1+1.232*B,stagger:.3},G.GS3.Exponential.Out,k+.3).fromTo(this.AnimatedObjects.BGFillerGraphicsArray,.3,{alpha:0},{alpha:1,stagger:.3},G.GS3.Sinusoidal.In,k).to(this.AnimatedObjects.BGFillerGraphicsArray,1.6,{alpha:0,stagger:.3},G.GS3.Cubic.Out,k+.3),this.LowHealthTimeline.play()}}attachTopNavigationSequence(k){this.AnimatedObjects.TopUI&&this.HealthBarTimeline.to(this.AnimatedObjects.TopUI,.1,{y:-14},G.GS3.Quartic.Out,k).to(this.AnimatedObjects.TopUI,1.13,{y:5},G.GS3.generateCustomElasticEase(.6,.345,!1,!0),k+.1)}attachTopRightNavigationSequence(k){this.AnimatedObjects.BuffsBackground&&this.HealthBarTimeline.to(this.AnimatedObjects.BuffsBackground,.1,{y:-15},G.GS3.Quartic.Out,k).to(this.AnimatedObjects.BuffsBackground,2.3,{y:0},G.GS3.generateCustomElasticEase(1.13,.3,!1,!0),k+.1)}triggerShake(k){this.setupPulse(k),this.setupSequence(k)}setupPulse(k){k{"use strict";U.d(B,{W:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.y4o{constructor(){super(...arguments),this._collisionBox=null,this._root=null,this._onInputDown=new G.HN0,this._onInputUp=new G.HN0,this._onInputOver=new G.HN0,this._onInputOut=new G.HN0}get inputEnabled(){var k;return!!(null===(k=this._collisionBox)||void 0===k?void 0:k.inputEnabled)}set inputEnabled(k){const B=this.getCollisionBox();B.inputEnabled=k,this.applyUseHandCursorSetting(B,this.useHandCursor)}get useHandCursor(){var k,B,U;return null!==(U=null===(B=null===(k=this._collisionBox)||void 0===k?void 0:k.input)||void 0===B?void 0:B.useHandCursor)&&void 0!==U&&U}set useHandCursor(k){this.applyUseHandCursorSetting(this.getCollisionBox(),k)}get onInputDown(){return this._onInputDown}get onInputUp(){return this._onInputUp}get onInputOver(){return this._onInputOver}get onInputOut(){return this._onInputOut}create(){super.create();const k=this.getCollisionBox().events;k.onInputDown.add(this.onDown,this),k.onInputUp.add(this.onUp,this),k.onInputOver.add(this.onOver,this),k.onInputOut.add(this.onOut,this),this.updateCollisionBox()}setInputPriority(k){const B=this.getCollisionBox();B&&(B.input.priorityID=k)}destroy(){var k;const B=this.getCollisionBox().events;B.onInputDown.remove(this.onDown,this),B.onInputUp.remove(this.onUp,this),B.onInputOver.remove(this.onOver,this),B.onInputOut.remove(this.onOut,this),this._onInputDown.dispose(),this._onInputUp.dispose(),this._onInputOut.dispose(),this._onInputOver.dispose(),null===(k=this._root)||void 0===k||k.destroy(),super.destroy()}getDimensions(){return new G.or0(this._collisionBox?this._collisionBox.width:0,this._collisionBox?this._collisionBox.height:0)}getCollisionBox(k=!0){return k&&!this._collisionBox&&this.createInternalCollisionBox(),this._collisionBox}onDown(k,B){this._onInputDown.dispatch()}onUp(k,B){this._onInputUp.dispatch()}onOver(k,B){this._onInputOver.dispatch()}onOut(k,B){this._onInputOut.dispatch()}applyUseHandCursorSetting(k,B){(null==k?void 0:k.input)&&(k.input.useHandCursor=B)}createInternalCollisionBox(){this._root=j.q.instance.game.add.group(),this.setRootContainer(this._root),this._collisionBox=j.q.instance.game.add.sprite(0,0,"","",this._root),this._collisionBox.width=10,this._collisionBox.height=10,this._collisionBox.alpha=0,this._collisionBox.inputEnabled=!0}updateCollisionBox(){const k=this.getCollisionBox(),B=this.GameObject.findComponent(G.XVE);B&&(k.width=B.widthDelta,k.height=B.heightDelta),k.inputEnabled=this.inputEnabled,this.applyUseHandCursorSetting(k,this.useHandCursor)}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean),(0,F.Sn)("design:paramtypes",[Boolean])],H.prototype,"inputEnabled",null),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean),(0,F.Sn)("design:paramtypes",[Boolean])],H.prototype,"useHandCursor",null),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0),(0,F.Sn)("design:paramtypes",[])],H.prototype,"onInputDown",null),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0),(0,F.Sn)("design:paramtypes",[])],H.prototype,"onInputUp",null),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0),(0,F.Sn)("design:paramtypes",[])],H.prototype,"onInputOver",null),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0),(0,F.Sn)("design:paramtypes",[])],H.prototype,"onInputOut",null),H=(0,F.Cg)([(0,G.EVk)("InteractableRectTransform",$.Y.input)],H)},79424:(k,B,U)=>{"use strict";U.d(B,{D:()=>$});var F=U(8674),G=U(62459),j=U(83133);let $=class extends G.uAl{constructor(){super(...arguments),this.isTab=!1}register(k){const B=this.getInjectedValue(this.stateId);this.isTab?B.registerTab(k,this.gameObject.findComponent(j.l)):B.registerContent(k,this.gameObject)}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],$.prototype,"stateId",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"isTab",void 0),$=(0,F.Cg)([(0,G.EVk)("LinkedScrollItem",void 0,"Use with LinkedScrollState!")],$)},89192:(k,B,U)=>{"use strict";U.d(B,{V:()=>V});var F=U(8674),G=U(62459),j=U(94566),$=U(11647),H=U(94325);let V=class extends((0,$.o)(G.uAl)){constructor(){super(...arguments),this._inset=0,this.onGroupChanged=this.createTidySignal(),this._tabs={},this._contents={},this._toCleanup=new WeakMap,this._selectionDirty=!1,this._skipTargetGroup=!1}get contextId(){return this._contextId}create(){super.create(),this._context.Container.rebind(this._contextId).toConstantValue(this)}update(){if(super.update(),!this._selectionDirty)return;let k,B;const{x:U,y:F}=this._scroll.getVisibleLocalRange();for(const[j,$]of Object.entries(this._contents))for(const H of $){const $=H.top+this._inset;$<=U||$>=F||(!G.Aq$.isDefined(k)||$this.scrollToGroup(k))),this._toCleanup.set(B.GameObject,[B.GameObject.onDestroy.add((()=>{this._tabs[k]===B&&delete this._tabs[k],this.cleanupObject(B.GameObject)}),this)])}registerContent(k,B){var U,F;if(!(B.transform instanceof G.XVE))throw new Error("LinkedScrollState only works with RectTransforms");const j=B.transform,$=null!==(U=(F=this._contents)[k])&&void 0!==U?U:F[k]=[];$.push(j),this._selectionDirty=!0,this._toCleanup.set(B,[B.onDestroy.add((()=>{const U=$.indexOf(j);U>=0&&$.splice(U,1),0===$.length&&delete this._contents[k],this.cleanupObject(B)}),this),j.onWorldMatrixChanged.add((()=>this._selectionDirty=!0),this)])}scrollToGroup(k){const B=this._contents[k];if(!B)return void G.VyI.log("Attempted to scroll to unknown group",G.$bb.Warning,k);let U=1/0;for(const F of B)U=Math.min(F.top,U);isFinite(U)&&(this._skipTargetGroup=!0,this._scroll.setScrollPosition(-U))}scrollToTop(){this._scroll.setScrollPosition(0)}cleanupObject(k){var B;if(!k)return;const U=null!==(B=this._toCleanup.get(k))&&void 0!==B?B:[];for(const F of U)F.destroy();this._toCleanup.delete(k)}};(0,F.Cg)([(0,G.MnK)(H.C),(0,F.Sn)("design:type",H.C)],V.prototype,"_scroll",void 0),(0,F.Cg)([(0,G.MnK)(G.bE_),(0,F.Sn)("design:type",G.bE_)],V.prototype,"_context",void 0),(0,F.Cg)([(0,G.MnK)(j.O),(0,F.Sn)("design:type",j.O)],V.prototype,"_toggles",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],V.prototype,"_contextId",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_inset",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onGroupChanged",void 0),V=(0,F.Cg)([(0,G.EVk)("LinkedScrollState",void 0)],V)},56617:(k,B,U)=>{"use strict";U.d(B,{i:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this.onLoadingUIHidden=new G.HN0,this.onLoadingUIShown=new G.HN0,this._loadingShowGameObjects=[],this._loadingHideGameObjects=[],this._delayToShowLoadGameObjectsMS=0,this._isShowingLoadingUI=!1,this._startLoadingTimestamp=0,this._loadingUIVisible=!1}get minimumLoadingDurationMS(){return this._minimumLoadDurationMS}get delayToShowLoadGameObjectsMS(){return this._delayToShowLoadGameObjectsMS}showLoadingUI(){this._isShowingLoadingUI||(this._delayToShowLoadGameObjectsMS<=0&&this.setVisibleState(!0),this._isShowingLoadingUI=!0,this._startLoadingTimestamp=Date.now())}hideLoadingUI(){this._isShowingLoadingUI&&(this._isShowingLoadingUI=!1,(!G.Aq$.isDefined(this._minimumLoadDurationMS)||Date.now()-this._startLoadingTimestamp>=this._minimumLoadDurationMS)&&this.setVisibleState(!1))}forceHideLoadingUI(){this._isShowingLoadingUI&&(this._isShowingLoadingUI=!1,this.setVisibleState(!1))}update(){super.update(),this._isShowingLoadingUI?!this._loadingUIVisible&&Date.now()-this._startLoadingTimestamp>this._delayToShowLoadGameObjectsMS&&this.setVisibleState(!0):this._loadingUIVisible&&Date.now()-this._startLoadingTimestamp>=this._minimumLoadDurationMS&&this.setVisibleState(!1)}setVisibleState(k){k!==this._loadingUIVisible&&(this._loadingHideGameObjects.forEach((B=>{B.active=!k})),this._loadingShowGameObjects.forEach((B=>{B.active=k})),this._loadingUIVisible=k,this._loadingUIVisible?this.onLoadingUIShown.dispatch():this.onLoadingUIHidden.dispatch())}destroy(){this.onLoadingUIHidden.dispose(),this.onLoadingUIShown.dispose(),super.destroy()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onLoadingUIHidden",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onLoadingUIShown",void 0),(0,F.Cg)([(0,G.ERr)(),(0,G.SZi)(),(0,F.Sn)("design:type",Array)],$.prototype,"_loadingShowGameObjects",void 0),(0,F.Cg)([(0,G.ERr)(),(0,G.SZi)(),(0,F.Sn)("design:type",Array)],$.prototype,"_loadingHideGameObjects",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],$.prototype,"_minimumLoadDurationMS",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],$.prototype,"_delayToShowLoadGameObjectsMS",void 0),$=(0,F.Cg)([(0,G.EVk)("LoadingUI",j.Y.ui)],$)},97518:(k,B,U)=>{"use strict";U.d(B,{R:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._args=[],this._acceptUnlocalized=!1,this._dontRunOnCreate=!1}get localizedText(){return this._localizedText}set localizationKey(k){this.setLocalizationKey(k)}get localizationKey(){return this._localizationKey}create(){super.create(),this._localizationKey&&!this._dontRunOnCreate&&this.setLocalizationKey(this._localizationKey)}setLocalizationKey(k){this._localizationKey=k,this.getLocalizedText()}setTextArguments(...k){this._args=k,this.getLocalizedText()}getLocalizedText(){{const k=j.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);this._localizedText.text=this._acceptUnlocalized&&!k.hasText(this._localizationKey)?this._localizationKey:k.getText(this._localizationKey,...this._args)}}};(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_localizedText",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"_localizationKey",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.W_S)(),(0,F.Sn)("design:type",Array)],H.prototype,"_args",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_acceptUnlocalized",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_dontRunOnCreate",void 0),H=(0,F.Cg)([(0,G.EVk)("LocalizationKeyText",$.Y.ui)],H)},31125:(k,B,U)=>{"use strict";U.d(B,{Eo:()=>q,Se:()=>W,XN:()=>F,YT:()=>j,jN:()=>K,vX:()=>G});var F,G,j,$=U(62459),H=U(88022),V=U(19631);!function(k){k.Left="left",k.Right="right",k.Up="up",k.Down="down",k.Check="check",k.Close="close",k.Info="info",k.Spin="spin",k.Shop="shop",k.Build="build",k.Gift="gift",k.Lock="lock",k.Music="music",k.Play="play",k.Plus="plus",k.Sparkle="sparkle",k.Delete="delete",k.Unspecified="unspecified",k.Custom="custom"}(F||(F={})),function(k){k.Sapphire="sapphire",k.Emerald="emerald",k.Marble="marble",k.Ruby="ruby"}(G||(G={})),function(k){k.Small="small",k.Medium="medium",k.Large="large"}(j||(j={}));const W={[j.Small]:{height:48,minWidth:44,fontFamily:$.dBt.PaytoneOne,fontSize:18,margin:12,padding:4,iconSize:20,iconOnlySize:20,iconOnlyWidth:44,atlasGuid:H._.Ui_library_json,yOffset:2},[j.Medium]:{height:60,minWidth:100,fontFamily:$.dBt.PaytoneOne,fontSize:18,margin:16,padding:4,iconSize:20,iconOnlySize:32,iconOnlyWidth:56,atlasGuid:H._.Ui_library_json,yOffset:3},[j.Large]:{height:68,minWidth:100,fontFamily:$.dBt.PaytoneOne,fontSize:24,margin:16,padding:4,iconSize:20,iconOnlySize:32,iconOnlyWidth:64,atlasGuid:H._.Ui_library_json,yOffset:-4}},q={[j.Small]:Object.assign(Object.assign({},W[j.Small]),{iconSize:32,actionTextPadding:16,padding:8,margin:16}),[j.Medium]:Object.assign(Object.assign({},W[j.Medium]),{iconSize:32,actionTextPadding:16,padding:8}),[j.Large]:Object.assign(Object.assign({},W[j.Large]),{iconSize:32,actionTextPadding:16,padding:8,margin:24})},K={[G.Sapphire]:{textColor:16777215,defaultGuid:V.B.Sapphire_medium_default,activeGuid:V.B.Sapphire_medium_active,hoverGuid:V.B.Sapphire_medium_hover,disabledGuid:V.B.Stone_medium_disabled},[G.Emerald]:{textColor:16777215,defaultGuid:V.B.Emerald_medium_default,activeGuid:V.B.Emerald_medium_active,hoverGuid:V.B.Emerald_medium_hover,disabledGuid:V.B.Stone_medium_disabled},[G.Marble]:{textColor:3552822,defaultGuid:V.B.Marble_medium_default,activeGuid:V.B.Marble_medium_active,hoverGuid:V.B.Marble_medium_hover,disabledGuid:V.B.Stone_medium_disabled},[G.Ruby]:{textColor:16777215,defaultGuid:V.B.Ruby_medium_default,activeGuid:V.B.Ruby_medium_active,hoverGuid:V.B.Ruby_medium_hover,disabledGuid:V.B.Stone_medium_disabled}}},90614:(k,B,U)=>{"use strict";U.d(B,{P:()=>q});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(68152),V=U(90351),W=U(95865);let q=class extends W.A{constructor(){super(...arguments),this._useOffset=!0,this._moveDurationMS=1e3,this._movementX=0,this._movementY=0,this._repeatCount=0,this._hasMoved=!1,this._disabled=!1}get hasMoved(){return this._hasMoved}set disabled(k){this._disabled=k}startTween(){if(super.startTween(),!this._tween&&!this._disabled){const k=this._targetGameObject.transform;(0,H.v)(!!k,"Cannot be attached to a GameObject without a transform");const B=this._useOffset?this._movementX+k.localPosition.x:this._movementX,U=this._useOffset?this._movementY+k.localPosition.y:this._movementY,F={x:k.localPosition.x,y:k.localPosition.y};this._tween=j.q.instance.game.add.tween(F,this).to({x:B,y:U},this._moveDurationMS,V.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._repeatCount,this._yoyo),this._tween.onUpdate.add((()=>{k.setPosition(F.x,F.y)})),this._tween.onTweenComplete.addOnce((()=>{this.destroyTween(),this._hasMoved=!0,this.onComplete.dispatch()}))}}setTransformTarget(k,B){this._movementX=k,this._movementY=B}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],q.prototype,"_useOffset",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_moveDurationMS",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_movementX",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_movementY",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_repeatCount",void 0),q=(0,F.Cg)([(0,G.EVk)("MoveTransform",$.Y.motion)],q)},43714:(k,B,U)=>{"use strict";U.d(B,{x:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(90351),V=U(95865);let W=class extends V.A{constructor(){super(...arguments),this._movementX=0,this._movementY=0,this._repeatCount=0,this._moveDurationMS=1e3}setMovement(k,B){this._movementX=k,this._movementY=B}startTween(){super.startTween();const k=this.GameObject.transform,B=k.worldPosition;this._tween=j.q.instance.game.add.tween(B,this).to({x:this._movementX,y:this._movementY},this._moveDurationMS,H.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._repeatCount,this._yoyo),this._tween.onUpdate.add((()=>{k.worldPosition={x:B.x,y:B.y}})),this._tween.onTweenComplete.addOnce((()=>{this.destroyTween(),this.onComplete.dispatch()}))}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_movementX",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_movementY",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_repeatCount",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_moveDurationMS",void 0),W=(0,F.Cg)([(0,G.EVk)("MoveTransformToWorldPosition",$.Y.motion)],W)},45385:(k,B,U)=>{"use strict";U.d(B,{e:()=>W});var F,G=U(8674),j=U(62459),$=U(88022),H=U(43846),V=U(31125);!function(k){k.Icon="icon",k.Numeric="number",k.Text="text",k.Empty="empty"}(F||(F={}));let W=class extends j.uAl{constructor(){super(...arguments),this.SIZE_OFFSET=4,this._mode=F.Icon,this._icon=V.XN.Info,this._badgeText="!",this._numberedMaxValue=99,this.minWidth=25}get mode(){return this._mode}set mode(k){this._mode!==k&&(this._mode=k,this.refresh())}get icon(){return this._icon}set icon(k){var B;this._icon!==k&&(this._icon=k,null===(B=this._iconComponent)||void 0===B||B.updateAsset($._.Ui_library_json,k))}postCreate(){this.refresh()}refresh(){var k;switch(this.mode){case F.Numeric:this.updateNumberedNotificationBadge(this.GameObject.active,parseInt(this._badgeText));break;case F.Text:this.updateNonNumberedNotificationBadge(this.GameObject.active);break;case F.Icon:null===(k=this._iconComponent)||void 0===k||k.updateAsset($._.Ui_library_json,this._icon)}this.updateEnabled()}setActive(k){this.GameObject.active=k}updateNumberedNotificationBadge(k,B){this.GameObject.active=k,this._mode=F.Numeric,this.updateEnabled(),B>this._numberedMaxValue?this._badgeText=`${this._numberedMaxValue}+`:this._badgeText=`${B}`,this._textToUpdate.text=this._badgeText,this.updateBackgroundWidthToText()}updateBackgroundWidthToText(){var k;const B=null===(k=this._textToUpdate)||void 0===k?void 0:k.GameObject.transform;B instanceof j.XVE&&(this._backgroundTransform.widthDelta=Math.max(B.widthDelta-this.SIZE_OFFSET,this.minWidth))}updateBackgroundWidthToIcon(){j.Aq$.isDefined(this._backgroundTransform)&&(this._backgroundTransform.widthDelta=this.minWidth)}updateNonNumberedNotificationBadge(k){this.GameObject.active=k,this._mode=F.Text,this._textToUpdate.text=(0,H.k)(this._badgeText),this.updateEnabled()}updateEmptyNotificationBadge(k){this.GameObject.active=k,this._mode=F.Empty,this._textToUpdate.text="",this.updateEnabled()}updateEnabled(){if(j.Aq$.isDefined(this._iconComponent)&&j.Aq$.isDefined(this._textToUpdate))switch(this._mode){case F.Icon:this.updateBackgroundWidthToIcon(),this._iconComponent.GameObject.active=!0,this._textToUpdate.GameObject.active=!1;break;case F.Numeric:case F.Text:this.updateBackgroundWidthToText(),this._iconComponent.GameObject.active=!1,this._textToUpdate.GameObject.active=!0;break;case F.Empty:this.updateBackgroundWidthToText(),this._iconComponent.GameObject.active=!1,this._textToUpdate.GameObject.active=!1}}};(0,G.Cg)([(0,j.gfw)(F),(0,j.YLv)("The mode the badge should be in."),(0,G.Sn)("design:type",String),(0,G.Sn)("design:paramtypes",[String])],W.prototype,"mode",null),(0,G.Cg)([(0,j.gfw)(V.XN),(0,j.YLv)("The icon to display on the badge."),(0,j.okD)((k=>k.mode===F.Icon)),(0,G.Sn)("design:type",String),(0,G.Sn)("design:paramtypes",[String])],W.prototype,"icon",null),(0,G.Cg)([(0,j.W_S)(),(0,j.okD)((k=>k.mode!==F.Icon)),(0,G.Sn)("design:type",String)],W.prototype,"_badgeText",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.okD)((k=>k.mode===F.Numeric)),(0,G.Sn)("design:type",Number)],W.prototype,"_numberedMaxValue",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],W.prototype,"minWidth",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,j.Lr6)(10),(0,G.Sn)("design:type",j.vYh)],W.prototype,"_iconComponent",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,j.Lr6)(10),(0,G.Sn)("design:type",j.EYj)],W.prototype,"_textToUpdate",void 0),(0,G.Cg)([(0,j.MnK)(j.XVE),(0,j.Lr6)(10),(0,G.Sn)("design:type",j.XVE)],W.prototype,"_backgroundTransform",void 0),W=(0,G.Cg)([(0,j.EVk)("NotificationBadge")],W)},33744:(k,B,U)=>{"use strict";U.d(B,{N:()=>H});var F=U(8674),G=U(62459),j=U(68910),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._inputOverlays=[],this._inputEnabledWorldPositionX=0,this._inputEnabledWorldPositionY=0,this._inputEnabledWidth=0,this._inputEnabledHeight=0}create(){super.create(),this._inputEnabledAreaTransform?this.updateEnabledAreaByTransform():this._inputEnabledWidth>0&&this._inputEnabledHeight>0&&this.updateEnabledAreaByValue()}setEnabledAreaByTransform(k){this._inputEnabledAreaTransform=k,this.updateEnabledAreaByTransform()}updateEnabledAreaByTransform(){const k=this._inputEnabledAreaTransform.rectTransformDimensions.width,B=this._inputEnabledAreaTransform.rectTransformDimensions.height,U=this._inputEnabledAreaTransform.worldPosition.x-this._inputEnabledAreaTransform.pivot.x*k,F=this._inputEnabledAreaTransform.worldPosition.y-this._inputEnabledAreaTransform.pivot.y*B;this.setEnabledAreaByValue(new j.Point(U,F),new G.or0(k,B))}setEnabledAreaByValue(k,B){this._inputEnabledWorldPositionX=k.x,this._inputEnabledWorldPositionY=k.y,this._inputEnabledWidth=B.width,this._inputEnabledHeight=B.height,this.updateEnabledAreaByValue()}enableFullScreen(){this.setEnabledAreaByValue(new j.Point(0,0),new G.or0(1280,720))}updateEnabledAreaByValue(){const k=this._inputEnabledWorldPositionX+this._inputEnabledWidth,B=this._inputEnabledWorldPositionY+this._inputEnabledHeight;this._inputOverlays[0].setSizeDelta(G.Zt2.DEFAULT_WIDTH,this._inputEnabledWorldPositionY),this._inputOverlays[1].setSizeDelta(this._inputEnabledWorldPositionX,G.Zt2.DEFAULT_HEIGHT),this._inputOverlays[2].setSizeDelta(G.Zt2.DEFAULT_WIDTH-k,G.Zt2.DEFAULT_HEIGHT),this._inputOverlays[3].setSizeDelta(G.Zt2.DEFAULT_WIDTH,G.Zt2.DEFAULT_HEIGHT-B),this._inputOverlays[0].localMatrix,this._inputOverlays[1].localMatrix,this._inputOverlays[2].localMatrix,this._inputOverlays[3].localMatrix,this._inputOverlays[0].worldPosition=new j.Point(0,0),this._inputOverlays[1].worldPosition=new j.Point(0,0),this._inputOverlays[2].worldPosition=new j.Point(k,0),this._inputOverlays[3].worldPosition=new j.Point(0,B)}};(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",Array)],H.prototype,"_inputOverlays",void 0),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],H.prototype,"_inputEnabledAreaTransform",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_inputEnabledWorldPositionX",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_inputEnabledWorldPositionY",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_inputEnabledWidth",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_inputEnabledHeight",void 0),H=(0,F.Cg)([(0,G.EVk)("OverlayInputBlocking",$.Y.ui)],H)},87821:(k,B,U)=>{"use strict";U.d(B,{o:()=>et});var F,G=U(8674),j=U(62459),$=U(17446),H=U(35120),V=U(77938),W=U(95946),q=U(87239),K=U(37773),z=U(34578),Y=U(97317),Q=U(72772),X=U(28152),Z=U(26932),J=U(26004),tt=U(22023);let et=F=class extends Z.z{constructor(){super(...arguments),this._elementMap={[W.a.Fire]:"PET_RESCUE_ELEMENT_FIRE",[W.a.Plant]:"PET_RESCUE_ELEMENT_PLANT",[W.a.Water]:"PET_RESCUE_ELEMENT_WATER",[W.a.Ice]:"PET_RESCUE_ELEMENT_ICE",[W.a.Storm]:"PET_RESCUE_ELEMENT_STORM",[W.a.Astral]:"PET_RESCUE_ELEMENT_ASTRAL",[W.a.Shadow]:"PET_RESCUE_ELEMENT_SHADOW",[W.a.Physical]:"PET_RESCUE_ELEMENT_PHYSICAL"},this._rarityMap={[$.E.Common]:"PET_RESCUE_RARITY_COMMON",[$.E.Uncommon]:"PET_RESCUE_RARITY_UNCOMMON",[$.E.Rare]:"PET_RESCUE_RARITY_RARE",[$.E.Heroic]:"PET_RESCUE_RARITY_HEROIC",[$.E.Legendary]:"PET_RESCUE_RARITY_LEGENDARY"}}get petLevel(){return this._petSchema.level}get petName(){var k;return null!==(k=this._petSchema.nickname)&&void 0!==k?k:this._petSchema.name}bindContext(){var k,B;const U=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=this.getPetDataAsset(),$=tt.P8.isPetOnTeam(this._petSchema),V=$&&U.getChargedLevel()>0?K.e.getActivePlayerChargedLevelTier():Y.Bv.NO_CHARGE,W=U.getGrowthBattleStats(this._petSchema),Q=null!==(B=null===(k=G.data)||void 0===k?void 0:k.affinity)&&void 0!==B?B:"",X=G.data.rarity;let Z=this._elementMap[Q],et=this._rarityMap[X];Z||(Z="PET_RESCUE_ELEMENT_PHYSICAL",j.VyI.log(`[${this.getProviderName()}] Element type from pet data is not valid - defaulting to Physical element`,j.$bb.Error)),this._context.Container.rebind(Z).toConstantValue(!0),et||(et="PET_RESCUE_RARITY_HEROIC",j.VyI.log(`[${this.getProviderName()}] Rarity type from pet data is not valid - defaulting to Heroic rarity`,j.$bb.Error)),this._context.Container.rebind(et).toConstantValue(!0),this._context.Container.rebind("PET_CARD_ELEMENT_NAME").toConstantValue(q.x.getElementDisplayName(Q)),this._context.Container.rebind("PET_RESCUE_NAME").toConstantValue(this.petName),this._context.Container.rebind("PET_RESCUE_LEVEL").toConstantValue(this.petLevel.toString()),this._context.Container.rebind("PET_RESCUE_HEALTH").toConstantValue(W.hp.toString()),this._context.Container.rebind("PET_RESCUE_POWER").toConstantValue(W.power.toString()),this._context.Container.rebind("PET_RESCUE_DEFENCE").toConstantValue(W.defence.toString()),this._context.Container.rebind("PET_RESCUE_SPEED").toConstantValue(W.speed.toString()),this._context.Container.rebind("PET_RESCUE_INITIATIVE").toConstantValue(W.initiative.toString()),this._context.Container.rebind("PET_CARD_LABEL_COLOR").toConstantValue(F.TEXT_COLOR_MAP[X]),this._context.Container.rebind(z.m.ChargedLevelAnimationTier).toConstantValue(V),this._context.Container.rebind("PET_CARD_STAT_TEXT_COLOR").toConstantValue($&&U.getChargedLevel()>0?F.CHARGED_STAT_COLOR_MAP[X]:F.TEXT_COLOR_MAP[X]),this.resolvePetGear().finally((()=>{var k;null===(k=this.gameObject)||void 0===k||k.findComponentsInChildren(J.B).forEach((k=>k.consume()))}))}resolvePetGear(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield Q.I.getStatsOfEquippedGearForPet(this._petSchema.gear);this._context.Container.rebind("PET_RESCUE_GEAR_HEALTH").toConstantValue(k.hp>0?`+${k.hp}`:""),this._context.Container.rebind("PET_RESCUE_GEAR_POWER").toConstantValue(k.power>0?`+${k.power}`:""),this._context.Container.rebind("PET_RESCUE_GEAR_DEFENCE").toConstantValue(k.defence>0?`+${k.defence}`:""),this._context.Container.rebind("PET_RESCUE_GEAR_SPEED").toConstantValue(k.speed>0?`+${k.speed}`:""),this._context.Container.rebind("PET_RESCUE_GEAR_INITIATIVE").toConstantValue(k.initiative>0?`+${k.initiative}`:"")}))}rebindContext(){this.bindContext()}unbindContext(){}getPetDataAsset(){return V.t.getItem("pet",this._petSchema.ID)}getProviderName(){return"PetCardDataProvider"}};et.TEXT_COLOR_MAP={[$.E.Common]:"#363636",[$.E.Uncommon]:"#363636",[$.E.Rare]:"#FFFFFF",[$.E.Heroic]:"#FFFFFF",[$.E.Legendary]:"#363636"},et.CHARGED_STAT_COLOR_MAP={[$.E.Common]:"#6BE04C",[$.E.Uncommon]:"#6BE04C",[$.E.Rare]:"#6BE04C",[$.E.Heroic]:"#6BE04C",[$.E.Legendary]:"#6BE04C"},(0,G.Cg)([(0,j.Cdj)("PET_RESCUE_CREATURE_DATA",!1),(0,G.Sn)("design:type",Object)],et.prototype,"_petSchema",void 0),et=F=(0,G.Cg)([(0,j.EVk)("PetCardDataProvider",X.Y.uiPet)],et)},93171:(k,B,U)=>{"use strict";U.d(B,{a:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this.fillSpeedMS=500,this.reverse=!1,this.onStart=new G.HN0,this.onComplete=new G.HN0,this.onProgress=new G.HN0,this.onToggleAnchors=new G.HN0}get fillValue(){return this._fillValue}set fillValue(k){this._fillValue=Math.min(Math.max(k,0),1)}get fillTransform(){return this._fillTransform}create(){var k,B;super.create();const U=null===(B=null===(k=this._fillGraphic)||void 0===k?void 0:k.GameObject)||void 0===B?void 0:B.transform;U&&U instanceof G.XVE&&(this._fillTransform=U),this.setValue(this._fillValue)}setValue(k){if(!this.GameObject)return;const B=this._fillValue;this._fillValue=Math.min(Math.max(k,0),1),this._fillTransform&&(this.reverse?(this._fillTransform.setAnchorMin(1-this._fillValue,this._fillTransform.anchorMin.y),this._fillTransform.setAnchorMax(1,this._fillTransform.anchorMax.y)):(this._fillTransform.setAnchorMin(0,this._fillTransform.anchorMin.y),this._fillTransform.setAnchorMax(this._fillValue,this._fillTransform.anchorMax.y))),this.onProgress.dispatch(this,B,this._fillValue),1===this._fillValue&&this.toggleAnchorContainers(!1)}tweenValue(k,B=0){var U;null===(U=this._tween)||void 0===U||U.stop().remove();const F=Math.min(Math.max(k,0),1),$=this._fillValue,H={percentage:this._fillValue};this._tween=j.q.instance.game.add.tween(H,H),this._tween.to({percentage:k},this.fillSpeedMS,G.GS3.Linear.None,!1).delay(B).onUpdateCallback((()=>{this.setValue(H.percentage)})),this._tween.onTweenComplete.addOnce((()=>{this.setValue(F),this._tween.stop().remove(),this._tween=null,this.onComplete.dispatch(this,$,F)})),this._tween.onStart.addOnce((()=>{this.onStart.dispatch(this,$,F)})),this._tween.start(),F!==H.percentage&&this.toggleAnchorContainers(!0)}toggleAnchorContainers(k){this.onToggleAnchors.dispatch(k)}setFillColor(k){this._fillGraphic&&(this._fillGraphic.tint="number"==typeof k?k:G.Q1f.hexToColor(k).color)}setInnerColor(k){this._innerGraphic&&(this._innerGraphic.tint="number"==typeof k?k:G.Q1f.hexToColor(k).color)}setOuterColor(k){this._outerGraphic&&(this._outerGraphic.tint="number"==typeof k?k:G.Q1f.hexToColor(k).color)}destroy(){this.onToggleAnchors.dispose(),this.onProgress.dispose(),this.onComplete.dispose(),this.onStart.dispose(),j.q.instance.game.tweens.remove(this._tween),super.destroy()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_fillValue",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"fillSpeedMS",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"reverse",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],H.prototype,"_fillGraphic",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],H.prototype,"_outerGraphic",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],H.prototype,"_innerGraphic",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onStart",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onComplete",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onProgress",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onToggleAnchors",void 0),H=(0,F.Cg)([(0,G.EVk)("ProgressBarComponent",$.Y.ui)],H)},34958:(k,B,U)=>{"use strict";U.d(B,{P:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(93171);let H=class extends $.a{tweenValue(k){this._tweenFrom=this.fillValue,this._tweenTo=Math.min(Math.max(k,0),1),this._tweenStartTime=Date.now(),this.onStart.dispatch(this,this._tweenFrom,this._tweenTo),this._tweenFrom!==this._tweenTo&&this.toggleAnchorContainers(!0)}update(){if(this._tweenStartTime){const k=Math.min(1,(Date.now()-this._tweenStartTime)/this.fillSpeedMS),B=this._tweenFrom+(this._tweenTo-this._tweenFrom)*k;this.setValue(B),k>=1&&(this._tweenStartTime=null,this.onComplete.dispatch(this,B,B))}super.update()}};H=(0,F.Cg)([(0,G.EVk)("RealTimeProgressBar",j.Y.ui)],H)},12408:(k,B,U)=>{"use strict";U.d(B,{Z:()=>q});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(68152),V=U(90351),W=U(95865);let q=class extends W.A{constructor(){super(...arguments),this._rotationDurationMS=1,this._rotationCount=-1,this._rotationDegrees=360}startTween(){if(super.startTween(),!this._tween){const k=this._targetGameObject.transform;(0,H.v)(!!k,"Cannot be attached to a GameObject without a transform");const B={value:k.localRotation};this._tween=j.q.instance.game.add.tween(B,this).to({value:this._rotationDegrees},this._rotationDurationMS,V.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._rotationCount,this._yoyo),this._tween.onUpdate.add((()=>{k.setRotation(B.value)})),this._tween.onTweenComplete.addOnce((()=>{k.setRotation(0),this.destroyTween(),this.onComplete.dispatch()}))}}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_rotationDurationMS",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_rotationCount",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_rotationDegrees",void 0),q=(0,F.Cg)([(0,G.EVk)("RotateTransform",$.Y.motion)],q)},46459:(k,B,U)=>{"use strict";U.d(B,{_:()=>W});var F=U(8674),G=U(62459),j=U(28152),$=U(68152),H=U(90351),V=U(95865);let W=class extends V.A{constructor(){super(...arguments),this._durationMS=1,this._repeatCount=-1,this._xScaleFinal=1,this._yScaleFinal=1}startTween(){if(super.startTween(),!this._tween){const k=this._targetGameObject.transform;(0,$.v)(!!k,"Cannot be attached to a GameObject without a transform");const B={x:k.localScale.x,y:k.localScale.y};this._tween=G.W$e.instance.game.add.tween(B,this).to({x:this._xScaleFinal,y:this._yScaleFinal},this._durationMS,H.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._repeatCount,this._yoyo),this._tween.onUpdate.add((()=>{k.setScale(B.x,B.y)})),this._tween.onTweenComplete.addOnce((()=>{this.destroyTween(),this.onComplete.dispatch()}))}}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_durationMS",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_repeatCount",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_xScaleFinal",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_yScaleFinal",void 0),W=(0,F.Cg)([(0,G.EVk)("ScaleTransform",j.Y.motion)],W)},41365:(k,B,U)=>{"use strict";U.d(B,{Q:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(5269),H=U(68239);let V=class extends H.W{constructor(){super(...arguments),this._start=0,this._pressed=!1,this.direction=$.H.Vertical,this.nib=null,this._scrollView=null,this._rectTransform=null}get start(){return this._start}get pressed(){return this._pressed}set horizontal(k){this.direction=k?$.H.Horizontal:$.H.Vertical}set scrollView(k){this._scrollView=k}get RectTransform(){return this._rectTransform}create(){super.create(),j.q.instance.game.input.addMoveCallback(this.moveNib,this),this._rectTransform=this.GameObject.findComponent(G.XVE)}onDown(k,B){this._pressed=!0,this._start=this.direction===$.H.Vertical?B.y:B.x}onUp(k,B){this._pressed=!1}moveNib(k,B,U){var F,G;if(this._pressed){const k=this.direction===$.H.Vertical?U-this._start:B-this._start;if(this._start=this.direction===$.H.Vertical?U:B,this.direction===$.H.Vertical){this.nib.posY+=k;const B=this.minNibY(),U=this.maxNibY();null===(F=this._scrollView)||void 0===F||F.scrollBarListener.dispatch(1-(this.nib.posY-B)/(U-B),this.direction)}else{this.nib.posX+=k;const B=this.minNibX(),U=this.maxNibX();null===(G=this._scrollView)||void 0===G||G.scrollBarListener.dispatch(1-(this.nib.posX-B)/(U-B),this.direction)}this.limitMovement()}}limitMovement(){if(this.direction===$.H.Vertical){const k=this.maxNibY(),B=this.minNibY();this.nib.posYk&&(this.nib.posY=k)}else{const k=this.maxNibX(),B=this.minNibX();this.nib.posXk&&(this.nib.posX=k)}}scrollToPercent(k){this.direction===$.H.Vertical?this.nib.posY=G.cj9.linear(this.maxNibY(),this.minNibY(),k):this.nib.posX=G.cj9.linear(this.minNibX(),this.maxNibX(),k),this.limitMovement()}maxNibY(){return this._rectTransform.fullHeight/2-this.nib.pivot.y*this.nib.fullHeight}maxNibX(){return this._rectTransform.fullWidth/2+this.nib.pivot.x*this.nib.fullWidth}minNibY(){return-this._rectTransform.fullHeight/2+this.nib.pivot.y*this.nib.fullHeight}minNibX(){return-this._rectTransform.fullWidth/2+this.nib.pivot.x*this.nib.fullWidth}destroy(){j.q.instance.game.input.deleteMoveCallback(this.moveNib,this),super.destroy()}};(0,F.Cg)([(0,G.vkK)(),(0,G.Lr6)(0),(0,G.nKb)("isHorizontal"),(0,F.Sn)("design:type",Boolean),(0,F.Sn)("design:paramtypes",[Boolean])],V.prototype,"horizontal",null),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],V.prototype,"nib",void 0),V=(0,F.Cg)([(0,G.EVk)("ScrollBarRectTransform")],V)},2385:(k,B,U)=>{"use strict";U.d(B,{I:()=>K});var F,G=U(8674),j=U(62459),$=U(35120),H=U(5269),V=U(28152),W=U(68239),q=U(41365);let K=F=class extends W.W{constructor(){super(...arguments),this._direction=0,this._isKinematic=!0,this._verticalScrollBar=null,this._horizontalScrollBar=null,this._contentView=null,this._wheelStep=40,this._wheelOnOver=!1,this._allowMouseWheel=!0,this._allowTouch=!0,this._scrollBarListener=new j.HN0,this._pressedDown=!1,this._timestamp=0,this._startX=0,this._startY=0,this._velocityX=0,this._velocityY=0,this._velocityWheel=0,this._rectTransform=null}get direction(){return this._direction}set vertical(k){this._direction=k?this._direction|H.H.Vertical:this._direction&H.H.Vertical}set horizontal(k){this._direction=k?this._direction|H.H.Horizontal:this._direction&H.H.Horizontal}get scrollBarListener(){return this._scrollBarListener}create(){super.create(),this._scrollBarListener.add(this.scrollToPercent.bind(this),this),this._allowTouch&&$.q.instance.game.input.addMoveCallback(this.moveCanvas,this),this._allowMouseWheel&&(this._mouseWheelCallback=this.mouseWheel.bind(this),$.q.instance.game.input.mouse.addMouseWheelCallback(this._mouseWheelCallback)),this._rectTransform=this.GameObject.findComponent(j.XVE),this._verticalScrollBar&&(this._verticalScrollBar.scrollView=this)}update(){super.update(),this._isKinematic&&(this._direction&H.H.Vertical)===H.H.Vertical&&Math.abs(this._velocityWheel)>F.VELOCITY_THRESHOLD&&(this._contentView.posY+=this._velocityWheel,this.limitMovement(),this._velocityWheel*=F.DECELERATION)}onDown(k,B){this._startX=B.x,this._startY=B.y,this._pressedDown=!0,this._timestamp=Date.now(),this._velocityY=this._velocityX=0}onUp(k,B){this._pressedDown=!1}moveCanvas(k,B,U){if(this._pressedDown){const k=Date.now(),G=k-this._timestamp;this._timestamp=k;let j=0;(this._direction&H.H.Horizontal)===H.H.Horizontal&&(j=B-this._startX,this._startX=B,this._velocityX=j*F.DISPLACEMENT/(G+1)*F.INITIAL_ACCELERATION+this._velocityX*F.FINAL_ACCELERATION,this._contentView.posX+=j,this.limitMovement()),(this._direction&H.H.Vertical)===H.H.Vertical&&(j=U-this._startY,this._startY=U,this._velocityY=j*F.DISPLACEMENT/(G+1)*F.INITIAL_ACCELERATION+this._velocityY*F.FINAL_ACCELERATION,this._contentView.posY+=j,this.limitMovement())}}mouseWheel(k){k.preventDefault();const B=this.getCollisionBox();if(!this._wheelOnOver||null!==B.transform&&j.M_G.containsRaw(B.getGlobalPosition().x,B.getGlobalPosition().y,B.width,B.height,$.q.instance.game.input.activePointer.x,$.q.instance.game.input.activePointer.y)){const k=120*$.q.instance.game.input.mouse.wheelDelta/this._wheelStep;this._isKinematic?this._velocityWheel+=k:(this._contentView.posY+=k,this.limitMovement())}}getTopLimit(){if(.5===this._contentView.anchorMin.y&&.5===this._contentView.anchorMax.y){const k=-this._rectTransform.fullHeight/2+this._contentView.pivot.y*this._contentView.fullHeight;return this._contentView.fullHeight>this._rectTransform.fullHeight?k-(this._contentView.fullHeight-this._rectTransform.fullHeight):k}return 0===this._contentView.anchorMin.y&&0===this._contentView.anchorMax.y?Math.min(this._rectTransform.fullHeight-this._contentView.fullHeight,0):(j.VyI.log(`Unexpected value for content anchor y values (min ${this._contentView.anchorMin.y} and max ${this._contentView.anchorMax.y}) they should both be 0 or 0.5`,j.$bb.Error),0)}getBottomLimit(){if(.5===this._contentView.anchorMin.y&&.5===this._contentView.anchorMax.y){const k=this._rectTransform.fullHeight/2-(1-this._contentView.pivot.y)*this._contentView.fullHeight;return this._contentView.fullHeight>this._rectTransform.fullHeight?k+(this._contentView.fullHeight-this._rectTransform.fullHeight):k}return 0===this._contentView.anchorMin.y&&0===this._contentView.anchorMax.y||j.VyI.log(`Unexpected value for content anchor y values (min ${this._contentView.anchorMin.y} and max ${this._contentView.anchorMax.y}) they should both be 0 or 0.5`,j.$bb.Error),0}getRightLimit(){if(.5===this._contentView.anchorMin.x&&.5===this._contentView.anchorMax.x){const k=this._rectTransform.fullWidth/2-this._contentView.pivot.x*this._contentView.fullWidth;return this._contentView.fullWidth>this._rectTransform.fullWidth?k+(this._contentView.fullWidth-this._rectTransform.fullWidth):k}return 0===this._contentView.anchorMin.x&&0===this._contentView.anchorMax.x||j.VyI.log(`Unexpected value for content anchor x values (min ${this._contentView.anchorMin.x} and max ${this._contentView.anchorMax.x}) they should both be 0 or 0.5`,j.$bb.Error),0}getLeftLimit(){if(.5===this._contentView.anchorMin.x&&.5===this._contentView.anchorMax.x){const k=-this._rectTransform.fullWidth/2+this._contentView.pivot.x*this._contentView.fullWidth;return this._contentView.fullWidth>this._rectTransform.fullWidth?k-(this._contentView.fullWidth-this._rectTransform.fullWidth):k}return 0===this._contentView.anchorMin.x&&0===this._contentView.anchorMax.x?this._rectTransform.fullWidth-this._contentView.fullWidth:(j.VyI.log(`Unexpected value for content anchor x values (min ${this._contentView.anchorMin.x} and max ${this._contentView.anchorMax.x}) they should both be 0 or 0.5`,j.$bb.Error),0)}limitMovement(){if((this._direction&H.H.Vertical)===H.H.Vertical){const k=this.getTopLimit(),B=this.getBottomLimit();if(this._contentView.posY>B&&(this._contentView.posY=B),this._contentView.posYk?(this._contentView.posY-k)/(B-k):100,this._verticalScrollBar.scrollToPercent(U)}}if((this._direction&H.H.Horizontal)===H.H.Horizontal){const k=this.getRightLimit(),B=this.getLeftLimit();if(this._contentView.posX>k&&(this._contentView.posX=k),this._contentView.posX{"use strict";U.d(B,{S:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(97518);let H=class extends G.uAl{run(k){k.findComponent($.R).setLocalizationKey(this.key)}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"key",void 0),H=(0,F.Cg)([(0,G.EVk)("SetLocalizedText",j.Y.uiDialog)],H)},19633:(k,B,U)=>{"use strict";U.d(B,{d:()=>z,S:()=>Y});var F=U(8674),G=U(62459),j=U(68910),$=U(35120),H=U(93690),V=U(28152),W=U(31125),q=U(15284);let K=class extends G.zFe{constructor(){super(...arguments),this.length=.5,this.overrideTransform=void 0,this.updatePosition=!1,this.transitions={[G.ZIW.Default]:{tint:16777215,alpha:1,position:{x:0,y:0},scale:{x:1,y:1},imageID:"d97071f6-18c9-4ca7-8c21-c9af9751af39"},[G.ZIW.Down]:{tint:16777215,alpha:1,position:{x:0,y:0},scale:{x:1,y:1},imageID:"d10ec19a-5675-4176-b604-2682fd5a46c4"},[G.ZIW.Over]:{tint:16777215,alpha:1,position:{x:0,y:0},scale:{x:1,y:1},imageID:"39aeccae-f28c-4520-9135-27c855b39566"},[G.ZIW.Disabled]:{tint:16777215,alpha:1,position:{x:0,y:0},scale:{x:1,y:1},imageID:"6d5b86f3-7e04-43e3-ba99-9ec8e19178b9"},[G.ZIW.Focus]:{tint:16777215,alpha:1,position:{x:0,y:0},scale:{x:1,y:1},imageID:"d97071f6-18c9-4ca7-8c21-c9af9751af39"}},this._defaultRenderComponent=null,this._tween=null,this._defaultPosition=new G.I9Y(0,0)}create(){var k,B,U,F,j,$,H,V,W,q;this._targetTransform=null!==(B=null===(k=this.overrideTransform)||void 0===k?void 0:k.transform)&&void 0!==B?B:this.gameObject.transform,this._defaultPosition=new G.I9Y(this._targetTransform.localPosition.x,this._targetTransform.localPosition.y),super.create(),this.onTweenUpdate=this.onTweenUpdate.bind(this),this._targetState=this.transitions[G.ZIW.Default],this._currentState={alpha:this._targetState.alpha,tint:`#${this._targetState.tint.toString(16)}`,scaleX:null!==(F=null===(U=this._targetState.scale)||void 0===U?void 0:U.x)&&void 0!==F?F:1,scaleY:null!==($=null===(j=this._targetState.scale)||void 0===j?void 0:j.y)&&void 0!==$?$:1,positionX:null!==(V=null===(H=this._targetState.position)||void 0===H?void 0:H.x)&&void 0!==V?V:0,positionY:null!==(q=null===(W=this._targetState.position)||void 0===W?void 0:W.y)&&void 0!==q?q:0,imageID:this._targetState.imageID},this._defaultRenderComponent instanceof G.vYh?(this._updateImageFunction=this.updateGraphicImage,this._updateValuesFunction=this.updateGraphicValues):this._defaultRenderComponent instanceof G.CxD?(this._updateImageFunction=this.updateSlicePlaneGraphicImage,this._updateValuesFunction=this.updateSlicePlaneGraphicValues):this._defaultRenderComponent instanceof G.EYj?this._updateValuesFunction=this.updateTextValues:this._defaultRenderComponent instanceof G.pH6?this._updateValuesFunction=this.updateRoundedRectanglePrimitiveComponentValues:this._updateValuesFunction=this.updateRenderValues}destroy(){this._tween&&!this._tween.isDestroyed&&(this._tween.stop(),G.W$e.instance.game.tweens.remove(this._tween)),this._tween=null,super.destroy()}setState(k){var B,U,F,j,$,H,V,W,q,K,z;const Y=this.transitions[k];if(!Y)return void G.VyI.log(`No transition found for state: ${k}`,G.$bb.Warning);if(Y===this._targetState)return;this._targetTransform=null!==(U=null===(B=this.overrideTransform)||void 0===B?void 0:B.transform)&&void 0!==U?U:this.gameObject.transform;const Q=null!==(F=Y.imageID)&&void 0!==F?F:this.transitions[G.ZIW.Default].imageID;this.updateImageID(Q),this._targetState=Y;const X={};X.alpha=Y.alpha,X.tint=`#${Y.tint.toString(16)}`,X.scaleX=null!==($=null===(j=Y.scale)||void 0===j?void 0:j.x)&&void 0!==$?$:1,X.scaleY=null!==(V=null===(H=Y.scale)||void 0===H?void 0:H.y)&&void 0!==V?V:1,X.positionX=null!==(q=null===(W=Y.position)||void 0===W?void 0:W.x)&&void 0!==q?q:0,X.positionY=null!==(z=null===(K=Y.position)||void 0===K?void 0:K.y)&&void 0!==z?z:0,this._tween&&!this._tween.isDestroyed&&(this._tween.stop(),G.W$e.instance.game.tweens.remove(this._tween)),this._tween=G.W$e.instance.game.tweens.create(this._currentState,this,!0),this._tween.onUpdate.add(this.onTweenUpdate,this),this._tween.to(X,1e3*this.length,G.GS3.Sinusoidal.Out),this._tween.start()}onTweenUpdate(){if(!this._currentState)return;let k=16777215;if(this._currentState.tint.startsWith("rgba")){const B=this._currentState.tint.match(/\d+/g);k=(parseInt(B[0])<<16)+(parseInt(B[1])<<8)+parseInt(B[2])}else k=parseInt(this._currentState.tint.replace("#","0x"));this.applyTransitionValues(this._currentState,Math.round(k))}updateImageID(k){var B;null===(B=this._updateImageFunction)||void 0===B||B.call(this,k)}applyTransitionValues(k,B){var U;this._targetTransform.setScale(k.scaleX,k.scaleY),this.updatePosition&&this._targetTransform.setPosition(this._defaultPosition.x+k.positionX,this._defaultPosition.y+k.positionY),null===(U=this._updateValuesFunction)||void 0===U||U.call(this,B,k.alpha)}updateGraphicValues(k,B){const U=this._defaultRenderComponent;(null==U?void 0:U.isValid())&&(U.tint=k,U.setAlpha(B))}updateSlicePlaneGraphicValues(k,B){const U=this._defaultRenderComponent;U.slicedImage.tint=k,U.slicedImage.alpha=B}updateTextValues(k,B){const U=this._defaultRenderComponent;U.tint=k,U.alpha=B}updateRoundedRectanglePrimitiveComponentValues(k,B){const U=this._defaultRenderComponent;U.setColor(G.TZp.decimalToHex(k)),U.alpha=B}updateRenderValues(k,B){const U=this._defaultRenderComponent.getRootContainer();U&&(U.alpha=B)}updateGraphicImage(k){if((null==k?void 0:k.length)>0){const B=this._defaultRenderComponent,U=G.W$e.instance.game.cache.getTexture(k);U&&(null==B?void 0:B.isValid())&&(B.image.texture=U)}}updateSlicePlaneGraphicImage(k){var B;if((null==k?void 0:k.length)>0){const U=this._defaultRenderComponent;if(!(null===(B=null==U?void 0:U.slicedImage)||void 0===B?void 0:B.shader))return;U.setSlicedImage(k)}}};var z;(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],K.prototype,"length",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],K.prototype,"overrideTransform",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],K.prototype,"updatePosition",void 0),(0,F.Cg)([(0,G.npj)(),(0,F.Sn)("design:type",Object)],K.prototype,"transitions",void 0),(0,F.Cg)([(0,G.Pqz)(G.y4o),(0,F.Sn)("design:type",G.y4o)],K.prototype,"_defaultRenderComponent",void 0),K=(0,F.Cg)([(0,G.EVk)("TweenedTransitions",V.Y.transition)],K),function(k){k[k.NONE=0]="NONE",k[k.LEFT=1]="LEFT",k[k.RIGHT=2]="RIGHT",k[k.ICON_ONLY=3]="ICON_ONLY"}(z||(z={}));let Y=class extends G.Eci{constructor(){super(),this.text="BUTTON_OKAY_CAPITAL",this.type=W.vX.Sapphire,this.size=W.YT.Medium,this.useMaxWidth=!1,this.maxWidth=0,this.iconPosition=z.NONE,this.icon=W.XN.Left,this.customIconGuid="",this.customIconSize=new G.I9Y(W.Se[W.YT.Medium].iconSize),this.customIconTinting=!0,this.suppressSound=!1,this._buttonWidth=0,this.fitToContents=!0,this.disableWhileAwaitingListeners=!0}create(){super.create(),this.localizeButtonText()}postCreate(){var k;super.postCreate(),this.populateTextComponents(),this.populateIconComponents(),this.renderComponent=null!==(k=this.gameObject.findComponentInChildren(G.y4o))&&void 0!==k?k:this.gameObject.addComponent(G.jsv),this._backgroundComponent=this.gameObject.findChildByName("Button").findComponent(G.vYh),this._tweenedTransition=this.gameObject.findComponentInChildren(K),this.regenerateButton(),this.setButtonEnabled(this._inputEnabled),this.useHandCursor=this._inputEnabled,this.onInputEnabledChanged.add((()=>{this.setButtonEnabled(this._inputEnabled),this.useHandCursor=this._inputEnabled}));const B=this.renderComponent.getRootContainer();if(B){H.p.patchPhaserInteraction(B,!0);for(const k of B.children)H.p.patchPhaserInteraction(k,!0)}this.onClick.add((()=>{this.suppressSound||(this._inputEnabled?$.q.instance.prodigy.audio.playSFX(18,"pop"):$.q.instance.prodigy.audio.playSFX(67,"button-disabled"))}),this,10)}destroy(){super.destroy()}updateIcon(k){if(this.icon===W.XN.Custom)return this._iconComponent.updateAsset(this.customIconGuid),void this._iconTransform.setSizeDelta(this.customIconSize.x,this.customIconSize.y);const B=this.icon.toString();B&&this.icon!==W.XN.Unspecified&&(this._iconComponent.updateAsset(k.atlasGuid,B),this._iconTransform.setSizeDelta(k.iconSize,k.iconSize))}getIconSize(k){return this.icon===W.XN.Custom?this.customIconSize:this.iconPosition===z.NONE?new G.I9Y(0,0):new G.I9Y(k.iconSize,k.iconSize)}updateButton(){const k=W.jN[this.type];G.W$e.instance.game.cache.getTexture(k.defaultGuid)?this.setBackgroundImages(k):this._assetLoader.loadAssets([k.defaultGuid,k.activeGuid,k.hoverGuid,k.disabledGuid]).then((()=>{this.setBackgroundImages(k)})).catch((k=>{G.VyI.log(`[StandardButton] Failed to load button textures for ${this.type} - ${this.size}`,G.$bb.Error)}))}setBackgroundImages(k){var B;this._tweenedTransition&&(this._tweenedTransition.transitions[G.ZIW.Default].imageID=k.defaultGuid,this._tweenedTransition.transitions[G.ZIW.Over].imageID=k.hoverGuid,this._tweenedTransition.transitions[G.ZIW.Down].imageID=k.activeGuid,this._tweenedTransition.transitions[G.ZIW.Disabled].imageID=k.disabledGuid);const U=this.inputEnabled?k.defaultGuid:k.disabledGuid;null===(B=this._backgroundComponent)||void 0===B||B.updateAsset(U)}get buttonSizeSpecs(){return W.Se[this.size]}get buttonTypeSpecs(){return W.jN[this.type]}regenerateButton(){if(!this._textComponent||!this._iconComponent)return;this._textComponent.text=this.text;const k=this.buttonSizeSpecs,B=this.buttonTypeSpecs;this.updateComponentsFromSpecs(k,B),this.iconPosition===z.ICON_ONLY?this.regenerateIconOnlyButton(k):this.regenerateButtonText(k),this.updateButton(),this.fitToContents&&(this._rectTransform.fullWidth=this._buttonWidth),this._rectTransform.fullHeight=k.height}populateTextComponents(){this._textComponent=this.gameObject.findComponentInChildren(G.EYj),this._textTransform=this._textComponent.GameObject.transform}populateIconComponents(){this._iconComponent=this.gameObject.findChildByName("Icon").findComponentInChildren(G.vYh),this._iconTransform=this._iconComponent.GameObject.transform}updateComponentsFromSpecs(k,B){this._textComponent.TextObject.style.fontFamily=k.fontFamily,this._textComponent.TextObject.style.fontSize=k.fontSize,this._textComponent.fontSize=k.fontSize,this._textComponent.TextObject.style.fill=B.textColor,this.icon!==W.XN.Custom||!0===this.customIconTinting?this._iconComponent.tint=B.textColor:this._iconComponent.tint=16777215}regenerateIconOnlyButton(k){this._buttonWidth=k.iconOnlyWidth,this._textComponent.GameObject.active=!1,this._iconComponent.GameObject.active=!0,this._iconTransform.posX=0,this._iconTransform.setSizeDelta(k.iconOnlySize,k.iconOnlySize),this.updateIcon(k)}regenerateButtonText(k){this._textComponent.GameObject.active=!0;const B=j.TextMetrics.measureText(this.text,this._textComponent.TextObject.style),U=Math.ceil(B.width),F=this.getIconSize(k),$=this.iconPosition!==z.NONE,H=($?F.x+k.padding:0)+2*k.margin,V=U+H;if(this.useMaxWidth&&this.maxWidth>0&&V>this.maxWidth){const B=this.maxWidth-H,F=B/U;this._textTransform.widthDelta=B,this._textComponent.fontSize=k.fontSize*F,this._buttonWidth=this.maxWidth}else this._textTransform.widthDelta=U,this._buttonWidth=U+2*k.margin,$&&(this._buttonWidth+=F.x+k.padding);if(this.iconPosition===z.NONE)this._textTransform.posX=0,this._iconComponent.GameObject.active=!1;else{this._iconComponent.GameObject.active=!0,this.updateIcon(k);const B=this._iconTransform.fullWidth;this.iconPosition===z.LEFT?(this._textTransform.posX=.5*(B+k.padding),this._iconTransform.posX=.5*-this._buttonWidth+(B/2+k.margin)):this.iconPosition===z.RIGHT&&(this._textTransform.posX=.5*-(B+k.padding),this._iconTransform.posX=.5*this._buttonWidth-(B/2+k.margin))}this.useMaxWidth?this._buttonWidth=G.cj9.clamp(this._buttonWidth,k.minWidth,this.maxWidth):this._buttonWidth=Math.max(k.minWidth,this._buttonWidth),this._textTransform.top=0,this._textTransform.bottom=0,this._textTransform.posY=-Math.abs(k.yOffset)}localizeButtonText(){var k;if(this.text)try{const k=this.getInjectedValue(G.$Bt.LocalizationService);if(!k)throw new Error("No localization service available");const B=k.getText(this.text);B&&B!==this.text&&(this.text=B)}catch(B){G.RQr.logError(B,`StandardButton Component on GameObject '${null===(k=this.GameObject)||void 0===k?void 0:k.name}' failed to localize text '${this.text}'`)}}setButtonText(k,B=!0){this.text=k,B&&this.localizeButtonText(),this.regenerateButton()}};(0,F.Cg)([(0,G.Cdj)(G.t5G.AssetLoader),(0,F.Sn)("design:type",Object)],Y.prototype,"_assetLoader",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],Y.prototype,"text",void 0),(0,F.Cg)([(0,G.gfw)(W.vX),(0,F.Sn)("design:type",String)],Y.prototype,"type",void 0),(0,F.Cg)([(0,G.gfw)(W.YT),(0,F.Sn)("design:type",String)],Y.prototype,"size",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"useMaxWidth",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Y.prototype,"maxWidth",void 0),(0,F.Cg)([(0,G.gfw)(z),(0,F.Sn)("design:type",Number)],Y.prototype,"iconPosition",void 0),(0,F.Cg)([(0,G.gfw)(W.XN),(0,F.Sn)("design:type",String)],Y.prototype,"icon",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],Y.prototype,"customIconGuid",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],Y.prototype,"customIconSize",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"customIconTinting",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"suppressSound",void 0),(0,F.Cg)([(0,G.Pqz)(G.XVE),(0,F.Sn)("design:type",G.XVE)],Y.prototype,"_rectTransform",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"fitToContents",void 0),Y=(0,F.Cg)([(0,G.EVk)("StandardButton",V.Y.ui),(0,G.WR4)(q.T),(0,F.Sn)("design:paramtypes",[])],Y)},15284:(k,B,U)=>{"use strict";U.d(B,{T:()=>$});var F=U(62459),G=U(31125),j=U(19633);class $ extends F.$KW{constructor(){super(...arguments),this.validButtonText=["Not now","Leave","Later","Remove","Okay","Go","Start","Next","See","Done","Choose","Collect now"],this.bannedWords=["Cancel","Delete","Confirm","View","Finished","Select"],this.validators=[{validate:k=>{if(0===k.text.length&&k.iconPosition!==j.d.ICON_ONLY)return"Text must not be empty. Convert to icon only?"},fix:k=>{k.iconPosition=j.d.ICON_ONLY}},{validate:k=>{if(k.text.charAt(0)!==k.text.charAt(0).toUpperCase())return"Text should start with a capital letter. Convert to capital?"},fix:k=>{k.text=k.text.charAt(0).toUpperCase()+k.text.slice(1)}},{validate:k=>{if(!k.text.length||k.text===k.text.toUpperCase())return"Text should not be all caps. Convert to title case?"},fix:k=>{k.text=k.text.toLowerCase().replace(/\b\w/g,(k=>k.toUpperCase()))}},{validate:k=>{if(!this.validButtonText.includes(k.text))return"Text is not one of our standard texts. Click fix to see the confluence page for more info"},fix:k=>{window.open("https://prodigygame.atlassian.net/wiki/spaces/GD/pages/548634641/Buttons#Buttons-ButtonLanguage","_blank")}},{validate:k=>{if(this.bannedWords.includes(k.text))return`${k.text} is explicitly banned. Click fix to see the confluence page for more info`},fix:k=>{window.open("https://prodigygame.atlassian.net/wiki/spaces/GD/pages/548634641/Buttons#Buttons-ButtonLanguage","_blank")}}]}generate(k,B){const U=[this.getStandardButtonSettings(k,B)],G=this.getWarnings(k,B);G&&U.push(G);const j=this.getInputSettings(k,B),$=this.getInputButtonNodes(k,B);return j.elements.push(...$),U.push(j,this.getSignalTerminals(k,B)),F.XRp.createVertical(U)}getWarnings(k,B){const U=[];for(let G=0;G{B.fix(k),this._editorAPI.modifyComponent(this._componentGuid,k)},buttonText:"Fix"})),$.push(F._Lw.line()),U.push(F.XRp.createVertical($))}if(0!==U.length)return F.XRp.createVertical(U,{title:"Warnings"})}getStandardButtonSettings(k,B){const U=[F.Gme.textGroup({id:"text",labelValue:"Text",inputValue:k.text}),F.Gme.enumGroup({id:"type",labelValue:"Type",selectValue:k.type},G.vX),F.Gme.enumGroup({id:"size",labelValue:"Size",selectValue:k.size},G.YT),F.Gme.enumGroup({id:"iconPosition",labelValue:"Icon Position",selectValue:k.iconPosition},j.d)];if(k.iconPosition!==j.d.NONE&&(U.push(F.Gme.enumGroup({id:"icon",labelValue:"Icon",selectValue:k.icon},G.XN)),k.icon===G.XN.Custom)){const B=[F.Gme.imagePickerGroup({id:"customIconGuid",labelValue:"Icon Image",guid:k.customIconGuid}),F.Gme.vectorGroup({id:"customIconSize",labelValue:"Custom Icon Size",vectorValue:k.customIconSize}),F.Gme.checkboxGroup({id:"customIconTinting",labelValue:"Match Custom Icon To Text Color",inputValue:k.customIconTinting})],G=F.XRp.createVertical(B,{isCollapsible:!0,startCollapsed:!1,title:"Custom Icon Settings"});U.push(G)}return U.push(F.Gme.checkboxGroup({id:"fitToContents",labelValue:"Fit to Contents",inputValue:k.fitToContents})),U.push(F.Gme.checkboxGroup({id:"useMaxWidth",labelValue:"Use Max Width",inputValue:k.useMaxWidth})),k.useMaxWidth&&U.push(F.Gme.numberGroup({id:"maxWidth",labelValue:"Max Width",inputValue:k.maxWidth})),U.push(F.Gme.checkboxGroup({id:"suppressSound",labelValue:"Suppress SFX",inputValue:k.suppressSound})),F.XRp.createVertical(U,{isCollapsible:!0,startCollapsed:!1,title:"Button Style"})}getInputButtonNodes(k,B){return[F.Gme.checkboxGroup({id:"allowDisabledInput",labelValue:"Allow Disabled Input",inputValue:k.allowDisabledInput}),F.Gme.checkboxGroup({id:"alwaysTransition",labelValue:"Always Transition",inputValue:k.alwaysTransition}),F.Gme.numberGroup({id:"debounceTimeMs",labelValue:"Debounce Time (ms)",inputValue:k.debounceTimeMs})]}getInputSettings(k,B){return F.XRp.createVertical([F.Gme.checkboxGroup({id:"inputEnabled",labelValue:"Input Enabled",inputValue:k.inputEnabled}),F.Gme.checkboxGroup({id:"attachToCamera",labelValue:"Attach To Camera",inputValue:k.attachToCamera,onChange:(k,B)=>{this._editorAPI.modifyComponent(this._componentGuid,{attachToCamera:B})}}),F.Gme.checkboxGroup({id:"awaitListeners",labelValue:"Await Listeners",inputValue:k.disableWhileAwaitingListeners,onChange:(k,B)=>{this._editorAPI.modifyComponent(this._componentGuid,{disableWhileAwaitingListeners:B})}})],{isCollapsible:!0,startCollapsed:!1,title:"Settings"})}getSignalTerminals(k,B){return F.XRp.createVertical([F.NyS.create({id:"onClick",label:"On Input Click",signalValue:k.onClick,componentGUID:this._componentGuid}),F.NyS.create({id:"onDown",label:"On Input Down",signalValue:k.onDown,componentGUID:this._componentGuid}),F.NyS.create({id:"onRelease",label:"On Input Release",signalValue:k.onRelease,componentGUID:this._componentGuid}),F.NyS.create({id:"onReleaseOutside",label:"On Input Release Outside",signalValue:k.onReleaseOutside,componentGUID:this._componentGuid}),F.NyS.create({id:"onHoverEnter",label:"On Input Hover Enter",signalValue:k.onHoverEnter,componentGUID:this._componentGuid}),F.NyS.create({id:"onHoverExit",label:"On Input Hover Exit",signalValue:k.onHoverExit,componentGUID:this._componentGuid}),F.NyS.create({id:"onHoverMove",label:"On Input Hover Move",signalValue:k.onHoverMove,componentGUID:this._componentGuid}),F.NyS.create({id:"onHold",label:"On Input Hold",signalValue:k.onHold,componentGUID:this._componentGuid}),F.NyS.create({id:"onInputEnabledChanged",label:"On Input Enabled Changed",signalValue:k.onInputEnabledChanged,componentGUID:this._componentGuid})],{isCollapsible:!0,startCollapsed:!0,title:"Event Signals"})}}},94325:(k,B,U)=>{"use strict";U.d(B,{C:()=>X});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(15821),V=U(35120),W=U(5269),q=U(11647),K=U(37394),z=U(19633),Y=U(44564),Q=U(88217);let X=class extends((0,q.o)(K.D)){constructor(){super(...arguments),this.showButtonArrows=!0,this.hideSliderWhenContentFits=!1,this.autoUpdateOnContentResize=!0,this.lockScrollWheel=!1}create(){super.create(),this._sliderTransform=this.slider.GameObject.findComponent(G.XVE),this.onContentSizeChanged=this.onContentSizeChanged.bind(this),this.updateSliderTransform=this.updateSliderTransform.bind(this),this.upButton.onClick.add(this.slider.stepUp.bind(this.slider),this),this.downButton.onClick.add(this.slider.stepDown.bind(this.slider),this),this.scrollWheelBounds||(this.scrollWheelBounds=this.rectTransform),this.addListenerToSignal(this.contentTransform.onWorldMatrixChanged,(()=>this.offsetStickyItems()))}postCreate(){super.postCreate(),this.contentTransform||G.VyI.log("No content transform found for Scroll View, consider adding a RectTransform to the content transform field in the inspector.",G.$bb.Warning),this.updateContent(this.contentTransform),this.updateSliderTransform(),this.rectTransform.onDimensionsChanged.add(this.updateSliderTransform,this)}destroy(){var k,B;super.destroy(),null===(k=this.contentTransform)||void 0===k||k.onDimensionsChanged.remove(this.onContentSizeChanged),null===(B=this.rectTransform)||void 0===B||B.onDimensionsChanged.remove(this.updateSliderTransform,this),this.upButton.onClick.removeAll(this),this.downButton.onClick.removeAll(this)}update(){if(super.update(),this.contentDraggingEnabled)if(this._contentClicked&&!this._contentDragged){if(Y.H.dragTarget)return void this.onDragEnd();this.checkDragStart()}else this._contentDragged&&this.dragContent()}onMouseWheel(k){this.lockScrollWheel||this.contentFitsScrollView()&&this.hideSliderWhenContentFits||(super.onMouseWheel(k),this.slider.value-=$().clamp(k.deltaY,-this._maximumMouseWheelSpeed,this._maximumMouseWheelSpeed))}beginDragDetection(k){Y.H.dragTarget||super.beginDragDetection(k)}checkDragStart(){switch(this.slider.direction){case W.H.Horizontal:this.checkDragStartHorizontal();break;default:case W.H.Vertical:this.checkDragStartVertical()}}dragContent(){switch(this.slider.direction){case W.H.Horizontal:this.dragContentHorizontal();break;default:case W.H.Vertical:this.dragContentVertical()}}dragContentHorizontal(){const k=V.q.instance.game.input.activePointer.x-this._lastDragMousePosition.x;this.slider.value+=k,super.dragContentHorizontal()}dragContentVertical(){const k=V.q.instance.game.input.activePointer.y-this._lastDragMousePosition.y;this.slider.value+=k,super.dragContentVertical()}hideSlider(){this.GameObject&&!this.GameObject.isDestroyed&&(this.upButton.GameObject.active=!1,this.downButton.GameObject.active=!1,this.slider.GameObject.active=!1,this.allowScrollWheel=!1,this.contentDraggingEnabled=!1)}showSlider(){this.GameObject&&!this.GameObject.isDestroyed&&(this.slider.GameObject.active=!0,this.upButton.GameObject.active=this.showButtonArrows,this.downButton.GameObject.active=this.showButtonArrows,this.allowScrollWheel=!0,this.contentDraggingEnabled=!0)}updateSliderTransform(){switch(this.slider.direction){case W.H.Horizontal:this.fitSliderHorizontal();break;default:case W.H.Vertical:this.fitSliderVertical()}}fitSliderVertical(){this.showButtonArrows?this._sliderTransform.fullWidth=this.rectTransform.fullHeight-this.upButton.GameObject.transform.fullHeight-this.downButton.GameObject.transform.fullHeight:this._sliderTransform.fullWidth=this.rectTransform.fullHeight}fitSliderHorizontal(){this.showButtonArrows?this._sliderTransform.fullWidth=this.rectTransform.fullWidth-this.upButton.GameObject.transform.fullHeight-this.downButton.GameObject.transform.fullHeight:this._sliderTransform.fullWidth=this.rectTransform.fullWidth}updateContent(k,B=!1){if(this.contentTransform&&(this.contentTransform.onDimensionsChanged.remove(this.onContentSizeChanged),B?this.contentTransform.GameObject.destroy():this.contentTransform.GameObject.parent=null),this.contentTransform=k,this.updateSliderRange(),!this.contentTransform)return;this.contentArea.GameObject.addChild(this.contentTransform.GameObject);const U=this.contentTransform.GameObject.parent,F=U?U.findComponent(G.XVE):null,j=F?F.rectTransformDimensions:G.or0.ZERO,$=new G.I9Y(this.contentTransform.anchorMin.x*j.width,this.contentTransform.anchorMin.y*j.height),H=new G.I9Y(this.contentTransform.anchorMax.x*j.width,this.contentTransform.anchorMax.y*j.height),V=new G.or0(H.x-$.x,H.y-$.y);switch(this.slider.direction){case W.H.Horizontal:this.contentTransform.setPivot(0,.5),this.contentTransform.setAnchoredPivotOffset(0,.5*(this.contentArea.fullHeight-V.height));break;default:case W.H.Vertical:this.contentTransform.setPivot(.5,0),this.contentTransform.setAnchoredPivotOffset(.5*(this.contentArea.fullWidth-V.width),0)}this.contentTransform.onDimensionsChanged.add(this.onContentSizeChanged)}onContentSizeChanged(){if(this.autoUpdateOnContentResize){const k=this.slider.value;this.updateSliderRange(),this.setScrollPosition(Math.max(this.slider.maxValue,k))}}updateSliderRange(){if(H.A.isDefined(this.rectTransform)){if(H.A.isDefined(this.contentTransform))switch(this.slider.direction){case W.H.Horizontal:this.slider.maxValue=Math.min(.01,this.rectTransform.fullWidth-this.contentTransform.fullWidth);break;default:case W.H.Vertical:this.slider.maxValue=Math.min(.01,this.rectTransform.fullHeight-this.contentTransform.fullHeight)}else this.slider.maxValue=.01;!this.hideSliderWhenContentFits||H.A.isDefined(this.contentTransform)&&!this.contentFitsScrollView()?this.showSlider():this.hideSlider()}}contentFitsScrollView(){switch(this.slider.direction){case W.H.Vertical:return this.contentTransform.fullHeight<=this.rectTransform.fullHeight;case W.H.Horizontal:return this.contentTransform.fullWidth<=this.rectTransform.fullWidth;default:return!1}}scrollToPercent(k=0){this.slider.normalizedValue=G.cj9.clamp(k,0,1)}setScrollPosition(k){this.slider.value=k}scrollToChild(k,B=0){const U=this.contentTransform.GameObject.children.length;if(k<0||k>=U)return;const F=this.contentTransform.GameObject.children[k];if(F)switch(this.slider.direction){case W.H.Horizontal:const k=F.transform.localPosition.x;this.setScrollPosition(-k+B);break;case W.H.Vertical:default:const U=F.transform.localPosition.y;this.setScrollPosition(-U+B)}}offsetStickyItems(){const k=this.contentArea.localPosition.y,B=[];for(const U of this.contentTransform.GameObject.children){const k=U.findComponent(Q.B);H.A.isDefined(k)&&B.push(k)}for(const[U,F]of B.entries()){if(!H.A.isDefined(F))continue;if(k+F.transform.posY<=0){const G=-k-F.transform.posY;let j=0;const $=B[U+1];if(H.A.isDefined($)){const B=k+$.transform.posY-F.transform.fullHeight;j=Math.min(0,B)}F.setContentsOffset(G+j)}else F.setContentsOffset(0)}}};(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],X.prototype,"contentTransform",void 0),(0,F.Cg)([(0,G.MnK)(Y.H),(0,F.Sn)("design:type",Y.H)],X.prototype,"slider",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],X.prototype,"showButtonArrows",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],X.prototype,"hideSliderWhenContentFits",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],X.prototype,"autoUpdateOnContentResize",void 0),(0,F.Cg)([(0,G.MnK)(z.S),(0,F.Sn)("design:type",z.S)],X.prototype,"upButton",void 0),(0,F.Cg)([(0,G.MnK)(z.S),(0,F.Sn)("design:type",z.S)],X.prototype,"downButton",void 0),X=(0,F.Cg)([(0,G.EVk)("StandardScrollView",G.YH6.ui)],X)},44564:(k,B,U)=>{"use strict";U.d(B,{H:()=>K,c:()=>G});var F,G,j=U(8674),$=U(62459),H=U(5269),V=U(35120),W=U(93690),q=U(57103);!function(k){k.DEFAULT="default"}(G||(G={}));let K=F=class extends $.uAl{constructor(){super(...arguments),this.attachToCamera=!0,this.onValueChanged=new $.HN0,this.onSteppedValueChanged=new $.HN0,this.onNormalizedValueChanged=new $.HN0,this.onFinalValue=new $.HN0,this.stepValue=10,this.snapDrag=!1,this.snapRelease=!0,this.minValue=0,this.maxValue=100,this._value=0,this.direction=H.H.Horizontal,this.type=G.DEFAULT,this.lastMousePosition={x:0,y:0},this.smoothing=.8,this.movementMultiplier=1,this.handlePadding=2}get value(){return this._value}set value(k){if(k===this._value)return void this.updateHandle();const B=this._value;this._value=$.cj9.clampArbitrary(k,this.minValue,this.maxValue),this.updateHandle(),this.onValueChanged.dispatch(this._value),this.onNormalizedValueChanged.dispatch(this.normalizedValue);const U=this.valueToSnapped(this._value);U!==this.valueToSnapped(B)&&this.onSteppedValueChanged.dispatch(U)}get normalizedValue(){return $.cj9.inverseLerp(this.minValue,this.maxValue,this.value)}set normalizedValue(k){this.value=$.cj9.clampedLerp(this.minValue,this.maxValue,k)}postCreate(){super.postCreate(),this.handleTransform=this.handle.GameObject.findComponent($.XVE),this.trackTransform=this.track.GameObject.findComponent($.XVE),this.onHandleUp=this.onHandleUp.bind(this),this.onHandleDown=this.onHandleDown.bind(this),this.onTrackDown=this.onTrackDown.bind(this),this.handle.onRelease.add(this.onHandleUp,this),this.handle.onReleaseOutside.add(this.onHandleUp,this),this.handle.onDown.add(this.onHandleDown,this),this.track.onDown.add(this.onTrackDown,this),this.track.onRelease.add(this.onHandleUp,this),this.track.onReleaseOutside.add(this.onHandleUp,this);const k=this.handle.renderComponent.getRootContainer();k&&W.p.patchPhaserInteraction(k,!0);const B=this.track.renderComponent.getRootContainer();B&&W.p.patchPhaserInteraction(B,!0),this.handle.attachToCamera=this.attachToCamera,this.track.attachToCamera=this.attachToCamera,this.gameObject.transform.localRotation=this.direction===H.H.Horizontal?0:90,this.updateHandle()}destroy(){var k,B,U;super.destroy(),null===(k=this.onValueChanged)||void 0===k||k.dispose(),null===(B=this.onNormalizedValueChanged)||void 0===B||B.dispose(),null===(U=this.onFinalValue)||void 0===U||U.dispose(),V.q.instance.game.input.deleteMoveCallback(this.onMouseDrag,this),this.handle.onRelease.removeAll(this),this.handle.onReleaseOutside.removeAll(this),this.handle.onDown.removeAll(this),this.track.onDown.removeAll(this),this.track.onRelease.removeAll(this),this.track.onReleaseOutside.removeAll(this),this.onValueChanged.dispose(),this.onFinalValue.dispose(),this.onNormalizedValueChanged.dispose(),this.onSteppedValueChanged.dispose()}onTrackDown(){const k=this.getSlideableBounds();let B={x:V.q.instance.game.input.activePointer.x,y:V.q.instance.game.input.activePointer.y};this.attachToCamera||(B=$.i7d.main.viewMatrix.applyInverse(B)),B.x-=this.gameObject.transform.worldPosition.x,B.y-=this.gameObject.transform.worldPosition.y,this.direction===H.H.Vertical?this.value=this.positionToValue(B.y,k):this.value=this.positionToValue(B.x,k),this.onHandleDown()}onHandleDown(){this._dragging=!0,F.dragTarget=this,this.lastMousePosition.x=V.q.instance.game.input.activePointer.x,this.lastMousePosition.y=V.q.instance.game.input.activePointer.y,this._handleDragTarget=this.handleTransform.posX,V.q.instance.game.input.addMoveCallback(this.onMouseDrag,this)}onHandleUp(){this._dragging=!1,F.dragTarget=void 0,V.q.instance.game.input.deleteMoveCallback(this.onMouseDrag,this),this.snapRelease&&(this.value=this.valueToSnapped(this.value)),this.onFinalValue.dispatch(this.value)}updateHandle(){this.handleTransform&&(this.handleTransform.posX=this.getHandlePosition())}onMouseDrag(){if(this._dragging){const k=this.getSlideableBounds(),B={x:V.q.instance.game.input.activePointer.x-this.lastMousePosition.x,y:V.q.instance.game.input.activePointer.y-this.lastMousePosition.y};this.lastMousePosition.x=V.q.instance.game.input.activePointer.x,this.lastMousePosition.y=V.q.instance.game.input.activePointer.y,this.direction===H.H.Horizontal?this._handleDragTarget+=B.x*this.movementMultiplier:this._handleDragTarget+=B.y*this.movementMultiplier,this.snapDrag?this.handleTransform.posX=this.snapPosition(this._handleDragTarget,k):this.handleTransform.posX=this._handleDragTarget,this.normalizedValue=$.cj9.inverseLerp(k.left,k.right,this.handleTransform.posX)}}snapPosition(k,B){let U=this.positionToValue(k,B);return U=this.valueToSnapped(U),this.valueToPosition(U,B)}positionToValue(k,B){return $.cj9.clampedLerp(this.minValue,this.maxValue,$.cj9.inverseLerp(B.left,B.right,k))}valueToPosition(k,B){return $.cj9.clampedLerp(B.left,B.right,$.cj9.inverseLerp(this.minValue,this.maxValue,k))}valueToSnapped(k){return Math.round(k/this.stepValue)*this.stepValue}getHandlePosition(){const k=this.getSlideableBounds();return $.cj9.clampedLerp(k.left,k.right,this.normalizedValue)}getSlideableBounds(){const k=this.trackTransform.getBounds();return k.left+=this.handleTransform.fullWidth/2+this.handlePadding,k.right-=this.handleTransform.fullWidth/2+this.handlePadding,k}stepUp(){this.value+=this.stepValue}stepDown(){this.value-=this.stepValue}};K.dragTarget=void 0,(0,j.Cg)([(0,$.vkK)(),(0,j.Sn)("design:type",Boolean)],K.prototype,"attachToCamera",void 0),(0,j.Cg)([(0,$.bbQ)(),(0,j.Sn)("design:type",$.HN0)],K.prototype,"onValueChanged",void 0),(0,j.Cg)([(0,$.bbQ)(),(0,j.Sn)("design:type",$.HN0)],K.prototype,"onSteppedValueChanged",void 0),(0,j.Cg)([(0,$.bbQ)(),(0,j.Sn)("design:type",$.HN0)],K.prototype,"onNormalizedValueChanged",void 0),(0,j.Cg)([(0,$.bbQ)(),(0,j.Sn)("design:type",$.HN0)],K.prototype,"onFinalValue",void 0),(0,j.Cg)([(0,$.g11)(),(0,j.Sn)("design:type",Number)],K.prototype,"stepValue",void 0),(0,j.Cg)([(0,$.vkK)(),(0,j.Sn)("design:type",Boolean)],K.prototype,"snapDrag",void 0),(0,j.Cg)([(0,$.vkK)(),(0,j.Sn)("design:type",Boolean)],K.prototype,"snapRelease",void 0),(0,j.Cg)([(0,$.g11)(),(0,j.Sn)("design:type",Number)],K.prototype,"minValue",void 0),(0,j.Cg)([(0,$.g11)(),(0,j.Sn)("design:type",Number)],K.prototype,"maxValue",void 0),(0,j.Cg)([(0,$.g11)(),(0,j.Sn)("design:type",Number)],K.prototype,"_value",void 0),(0,j.Cg)([(0,$.gfw)(H.H),(0,j.Sn)("design:type",Number)],K.prototype,"direction",void 0),(0,j.Cg)([(0,$.MnK)($.Eci),(0,j.Sn)("design:type",$.Eci)],K.prototype,"handle",void 0),(0,j.Cg)([(0,$.MnK)($.Eci),(0,j.Sn)("design:type",$.Eci)],K.prototype,"track",void 0),(0,j.Cg)([(0,$.MnK)($.XVE),(0,j.Sn)("design:type",$.XVE)],K.prototype,"fill",void 0),(0,j.Cg)([(0,$.gfw)(G),(0,j.Sn)("design:type",String)],K.prototype,"type",void 0),(0,j.Cg)([(0,$.g11)(),(0,j.Sn)("design:type",Number)],K.prototype,"smoothing",void 0),(0,j.Cg)([(0,$.g11)(),(0,j.Sn)("design:type",Number)],K.prototype,"movementMultiplier",void 0),(0,j.Cg)([(0,$.g11)(),(0,j.Sn)("design:type",Number)],K.prototype,"handlePadding",void 0),K=F=(0,j.Cg)([(0,$.EVk)("StandardSlider"),(0,$.WR4)(q.s)],K)},57103:(k,B,U)=>{"use strict";U.d(B,{s:()=>$});var F=U(62459),G=U(5269),j=U(44564);class $ extends F.$KW{generate(k,B){const U=[this.getStandardSliderSettings(k,B)],G=this.getInputSettings(k,B),j=this.getInputSliderNodes(k,B);return G.elements.push(...j),U.push(G,this.getSignalTerminals(k,B)),F.XRp.createVertical(U)}getStandardSliderSettings(k,B){const U=[F.Gme.numberGroup({id:"minValue",labelValue:"Min Value",inputValue:k.minValue}),F.Gme.numberGroup({id:"maxValue",labelValue:"Max Value",inputValue:k.maxValue}),F.Gme.numberGroup({id:"value",labelValue:"Init Value",inputValue:k.value}),F.Gme.numberGroup({id:"stepValue",labelValue:"Step Value",inputValue:k.stepValue}),F.Gme.checkboxGroup({id:"snapDrag",labelValue:"Snap on Drag",inputValue:k.snapDrag}),F.Gme.checkboxGroup({id:"snapRelease",labelValue:"Snap on Release",inputValue:k.snapRelease}),F.Gme.numberGroup({id:"handlePadding",labelValue:"Padding",inputValue:k.handlePadding}),F.Gme.enumGroup({id:"direction",labelValue:"Direction",selectValue:k.direction,onChange:k=>{var B,U;const j=null===(U=null===(B=this._editorAPI.getComponent(this._componentGuid))||void 0===B?void 0:B.GameObject)||void 0===U?void 0:U.findComponent(F.dLy);j?k===G.H.Horizontal?j.localRotation=0:j.localRotation=90:console.error("Transform not found on Slider component.")}},G.H),F.Gme.enumGroup({id:"type",labelValue:"Type",selectValue:k.type},j.c),F.Gme.componentPickerGroup({id:"handle",labelValue:"Handle",componentType:F.Eci,componentGuid:k.handle}),F.Gme.componentPickerGroup({id:"track",labelValue:"Track",componentType:F.Eci,componentGuid:k.track}),F.NyS.create({id:"onValueChanged",label:"On Value Changed",signalValue:k.onValueChanged,componentGUID:this._componentGuid}),F.NyS.create({id:"onSteppedValueChanged",label:"On Stepped Value Changed",signalValue:k.onSteppedValueChanged,componentGUID:this._componentGuid}),F.NyS.create({id:"onNormalizedValueChanged",label:"On Normalized Value Changed",signalValue:k.onNormalizedValueChanged,componentGUID:this._componentGuid}),F.NyS.create({id:"onFinalValue",label:"On Value Finalized",signalValue:k.onFinalValue,componentGUID:this._componentGuid})];return F.XRp.createVertical(U,{isCollapsible:!0,startCollapsed:!1,title:"Slider Style"})}getInputSliderNodes(k,B){return[F.Gme.checkboxGroup({id:"_useHandCursor",labelValue:"Use Hand Cursor",inputValue:k._useHandCursor}),F.Gme.checkboxGroup({id:"allowDisabledInput",labelValue:"Allow Disabled Input",inputValue:k.allowDisabledInput}),F.Gme.checkboxGroup({id:"alwaysTransition",labelValue:"Always Transition",inputValue:k.alwaysTransition})]}getInputSettings(k,B){const U=F.XRp.createVertical([F.Gme.checkboxGroup({id:"_inputEnabled",labelValue:"Input Enabled",inputValue:k._inputEnabled}),F.Gme.checkboxGroup({id:"attachToCamera",labelValue:"Attach to Camera",inputValue:k.attachToCamera}),F.Gme.checkboxGroup({id:"allowContinuousHold",labelValue:"Allow Continuous Hold",inputValue:k.allowContinuousHold})],{isCollapsible:!0,startCollapsed:!1,title:"Settings"});return k.allowContinuousHold&&U.elements.push(F.Gme.numberGroup({id:"_holdDelay",labelValue:"Hold Delay",inputValue:k._holdDelay})),U}getSignalTerminals(k,B){return F.XRp.createVertical([F.NyS.create({id:"onClick",label:"On Input Click",signalValue:k.onClick,componentGUID:this._componentGuid}),F.NyS.create({id:"onDown",label:"On Input Down",signalValue:k.onDown,componentGUID:this._componentGuid}),F.NyS.create({id:"onRelease",label:"On Input Release",signalValue:k.onRelease,componentGUID:this._componentGuid}),F.NyS.create({id:"onReleaseOutside",label:"On Input Release Outside",signalValue:k.onReleaseOutside,componentGUID:this._componentGuid}),F.NyS.create({id:"onHoverEnter",label:"On Input Hover Enter",signalValue:k.onHoverEnter,componentGUID:this._componentGuid}),F.NyS.create({id:"onHoverExit",label:"On Input Hover Exit",signalValue:k.onHoverExit,componentGUID:this._componentGuid}),F.NyS.create({id:"onHoverMove",label:"On Input Hover Move",signalValue:k.onHoverMove,componentGUID:this._componentGuid}),F.NyS.create({id:"onHold",label:"On Input Hold",signalValue:k.onHold,componentGUID:this._componentGuid}),F.NyS.create({id:"onInputEnabledChanged",label:"On Input Enabled Changed",signalValue:k.onInputEnabledChanged,componentGUID:this._componentGuid})],{isCollapsible:!0,startCollapsed:!0,title:"Event Signals"})}}},31818:(k,B,U)=>{"use strict";U.d(B,{tX:()=>X});var F,G=U(8674),j=U(62459),$=U(19631),H=U(35084),V=U(51972),W=U(19633),q=U(59503);!function(k){k.None="none",k.Warning="warning",k.Check="check"}(F||(F={}));const K={[F.None]:"",[F.Warning]:$.B.Circle_warning,[F.Check]:$.B.Circle_checkmark};var z;!function(k){k.Default="default",k.Paper="paper"}(z||(z={}));const Y={[z.Default]:{background:$.B.Tooltip_background,arrow:$.B.Tooltip_arrow,arrowDistance:-4,arrowBoundSlice:!0},[z.Paper]:{background:$.B.Paper_small,arrow:$.B.Paper_small_arrow,arrowDistance:-10,arrowBoundSlice:!0}};var Q;!function(k){k.Body="BODY",k.Title="TITLE",k.Icon="ICON",k.ShowTitle="SHOW_TITLE",k.ShowIcon="SHOW_ICON",k.BodyWrapWidth="BODY_WRAP_WIDTH",k.OnClose="ON_CLOSE",k.UseCloseUnderlay="USE_CLOSE_UNDERLAY"}(Q||(Q={}));let X=class extends j.uAl{constructor(){super(...arguments),this._style=z.Default,this._body="BODY",this._title="TITLE",this._icon=F.None,this.destroyOnClose=!0,this.onClose=new j.HN0,this._useInputOverlay=!0,this._arrowDistance=-5}get body(){return this._body}set body(k){this._body=k,this._textComponent.text=k,this._rectTransform.fullWidth=this.width}get width(){return this._textComponent.getDimensions().width+(this.icon===F.None?131:195)}get title(){return this._title}set title(k){this._title=k,this._titleComponent.text=k,this._title.length>0?(this._titleComponent.GameObject.active=!0,this._textTransform.top=50):(this._titleComponent.GameObject.active=!1,this._textTransform.top=20)}get icon(){return this._icon}set icon(k){this._icon=k}create(){this._rectTransform=this.gameObject.findComponent(j.XVE),this._textTransform=this._textComponent.GameObject.findComponent(j.XVE),this._titleTransform=this._titleComponent.GameObject.findComponent(j.XVE),this.body=this._body,this.title=this._title,this._fitToTarget=this.gameObject.findComponent(q.f),this.getInjectedValue(Q.Body)?this.applyInjection():this.title=this._title,this.icon===F.None?(this._iconGraphic.GameObject.active=!1,this._textTransform.left=20,this._titleTransform.left=20):(this._iconGraphic.GameObject.active=!0,this._textTransform.left=100,this._titleTransform.left=100),this._arrowTransform&&(this._fitToTarget?this._fitToTarget.onPostFit.add(this.updateTagPosition.bind(this)):this._arrowTransform.GameObject.active=!1),this.close=this.close.bind(this),this._closeButton.onClick.add(this.close),this._inputOverlay.onClicked.add(this.close),this._inputOverlay.GameObject.active=this._useInputOverlay}postCreate(){this.updateStyle(this._style)}destroy(){this.onClose.dispose()}updateStyle(k){const B=Y[k],U=()=>{var k,U;this._backgroundGraphic.updateAsset(B.background),this._arrowGraphic.updateAsset(B.arrow),this._arrowGraphic.sizeToSourceImage(),this._arrowDistance=null!==(k=B.arrowDistance)&&void 0!==k?k:this._arrowDistance,B.arrowBoundSlice&&(this._sliceData=this._backgroundGraphic.sliceData),null===(U=this._fitToTarget)||void 0===U||U.fit(),this.icon!==F.None&&this._iconGraphic.updateAsset(K[this.icon])};j.W$e.instance.game.cache.getTexture(B.background)?U():this._assetLoader.loadAssets([B.background,B.arrow,K[this.icon]]).then(U).catch((k=>{j.VyI.log(`[StandardTooltip] Failed to load textures for ${this._style}`,j.$bb.Error)}))}close(){this&&this.gameObject&&(this.onClose.dispatch(),this.destroyOnClose?this.gameObject.destroy():this.gameObject.active=!1)}applyInjection(){var k,B;this.body=null!==(k=this.getInjectedValue(Q.Body))&&void 0!==k?k:this._body,this.title=null!==(B=this.getInjectedValue(Q.Title))&&void 0!==B?B:this._title;const U=this.getInjectedValue(Q.ShowTitle);void 0!==U&&(this.title=U?this._title:"");const G=this.getInjectedValue(Q.ShowIcon);void 0!==G&&(this.icon=G?this._icon:F.None),this._iconGraphic.updateAsset(this.getInjectedValue(Q.Icon)),this._textComponent.wordWrapWidth=this.getInjectedValue(Q.BodyWrapWidth);const j=this.getInjectedValue(Q.OnClose);this._closeButton&&j&&(this._closeButton.onClick.add(j),this._inputOverlay.onClicked.add(j));const $=this.getInjectedValue(Q.UseCloseUnderlay);void 0!==$&&(this._inputOverlay.GameObject.active=$)}updateTagPosition(k,B=.5){var U;if(!(null===(U=this._arrowTransform)||void 0===U?void 0:U.GameObject))return;let F=B;if(this._sliceData&&this._rectTransform){const B=this._rectTransform.fullWidth,U=this._rectTransform.fullHeight,G=.5*this._arrowTransform.fullWidth;if(k===q.H.Left||k===q.H.Right){const k=this._sliceData.top+G,B=this._sliceData.bottom+G;F=k+B>=U?.5:Math.max(k/U,Math.min(F,1-B/U))}else{const k=this._sliceData.left+G,U=this._sliceData.right+G;F=k+U>=B?.5:Math.max(k/B,Math.min(F,1-U/B))}}switch(this._arrowTransform.GameObject.active=!0,k){case q.H.Top:this._arrowTransform.localRotation=0,this._arrowTransform.anchorMin.set(F,1),this._arrowTransform.anchorMax.set(F,1),this._arrowTransform.setPosition(0,this._arrowDistance);break;case q.H.Bottom:this._arrowTransform.localRotation=180,this._arrowTransform.anchorMin.set(F,0),this._arrowTransform.anchorMax.set(F,0),this._arrowTransform.setPosition(0,-this._arrowDistance);break;case q.H.Left:this._arrowTransform.localRotation=270,this._arrowTransform.anchorMin.set(1,F),this._arrowTransform.anchorMax.set(1,F),this._arrowTransform.setPosition(this._arrowDistance,0);break;case q.H.Right:this._arrowTransform.localRotation=90,this._arrowTransform.anchorMin.set(0,F),this._arrowTransform.anchorMax.set(0,F),this._arrowTransform.setPosition(-this._arrowDistance,0);break;default:this._arrowTransform.GameObject.active=!1}}setTarget(k,B){this.gameObject.active=!0,this._fitToTarget?(!B||B.transform instanceof j.XVE?this._fitToTarget.setBounds(null==B?void 0:B.transform,!1):j.VyI.log("Bounds must be a RectTransform",j.$bb.Warning),this._fitToTarget.setTarget(k)):(this._rectTransform.setPosition(k.legacyTransform.group.position.x,k.legacyTransform.group.position.y),this._arrowTransform.GameObject.active=!1)}setFromSchema(k){var B,U;this.gameObject.active=!0,this.title=null!==(B=k.headerText)&&void 0!==B?B:"",this.body=k.bodyText,"number"==typeof k.xPosition&&(this._rectTransform.posX=k.xPosition),"number"==typeof k.yPosition&&(this._rectTransform.posY=k.yPosition);const F=null!==(U=k.arrowDirection)&&void 0!==U?U:V.i.UP;let G;F===V.i.DOWN?G=q.H.Top:F===V.i.UP?G=q.H.Bottom:F===V.i.RIGHT?G=q.H.Left:F===V.i.LEFT&&(G=q.H.Right);let j=.5;"number"==typeof k.arrowXRelPos?j=k.arrowXRelPos:"number"==typeof k.arrowYRelPos&&(j=k.arrowYRelPos),this.updateTagPosition(G,j)}};(0,G.Cg)([(0,j.Cdj)(j.t5G.AssetLoader),(0,G.Sn)("design:type",Object)],X.prototype,"_assetLoader",void 0),(0,G.Cg)([(0,j.gfw)(z),(0,G.Sn)("design:type",String)],X.prototype,"_style",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],X.prototype,"_body",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],X.prototype,"_title",void 0),(0,G.Cg)([(0,j.gfw)(F),(0,G.Sn)("design:type",String)],X.prototype,"_icon",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],X.prototype,"_textComponent",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],X.prototype,"_titleComponent",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],X.prototype,"_iconGraphic",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],X.prototype,"_backgroundGraphic",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],X.prototype,"_arrowGraphic",void 0),(0,G.Cg)([(0,j.MnK)(j.XVE),(0,G.Sn)("design:type",j.XVE)],X.prototype,"_arrowTransform",void 0),(0,G.Cg)([(0,j.MnK)(W.S),(0,G.Sn)("design:type",W.S)],X.prototype,"_closeButton",void 0),(0,G.Cg)([(0,j.MnK)(H.n),(0,G.Sn)("design:type",H.n)],X.prototype,"_inputOverlay",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],X.prototype,"destroyOnClose",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],X.prototype,"onClose",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],X.prototype,"_useInputOverlay",void 0),X=(0,G.Cg)([(0,j.EVk)("StandardTooltip",j.YH6.ui)],X)},43333:(k,B,U)=>{"use strict";U.d(B,{U:()=>H});var F,G=U(8674),j=U(62459),$=U(28152);let H=F=class extends j.uAl{constructor(){super(...arguments),this._offsetAmount=0,this._onTimerUpdated=new j.HN0,this._onTimerCompleted=new j.HN0,this._nextUpdateTimestamp=null,this._lastUpdateTime=null,this._isTimerRunning=!1,this._timerValues=new Map([["w",0],["d",0],["h",0],["m",0],["s",0]])}get weekRemaining(){return this.offset(this._timerValues.get("w"))}get daysRemaining(){return this.offset(this._timerValues.get("d"))}get hoursRemaining(){return this.offset(this._timerValues.get("h"))}get minutesRemaining(){return this.offset(this._timerValues.get("m"))}get secondsRemaining(){return this.offset(this._timerValues.get("s"))}get timeRemainingMS(){return this._timeRemainingMS}get onTimerUpdated(){return this._onTimerUpdated}get onTimerCompleted(){return this._onTimerCompleted}get countdownText(){return this._countdownText}offset(k){return k>0?k+this._offsetAmount:0}get smallestTimeGroup(){return this._groupSecondsRemaining?"s":this._groupMinutesRemaining?"m":this._groupHoursRemaining?"h":this._groupDaysRemaining?"d":this._groupWeeksRemaining?"w":void 0}create(){super.create(),j.Aq$.isDefined(this._countdownFromTimeMS)&&this._countdownFromTimeMS>0&&this.setCountdownTimeMS(this._countdownFromTimeMS)}destroy(){this._onTimerUpdated.dispose(),this._onTimerCompleted.dispose(),super.destroy()}update(){if(super.update(),this._isTimerRunning){const k=Date.now();this._timeRemainingMS=Math.max(this._timeRemainingMS-(k-this._lastUpdateTime),0),this._lastUpdateTime=k,k>this._nextUpdateTimestamp&&(this._timeRemainingMS>0?this.updateTimer():(this._timerValues.forEach(((k,B)=>{this._timerValues[B]=0})),this._isTimerRunning=!1,this._onTimerCompleted.dispatch()))}}setCountdownTimeMS(k){this._countdownFromTimeMS=k,this._timeRemainingMS=k,this._isTimerRunning=k>0,this._isTimerRunning&&(this._lastUpdateTime=Date.now(),this._nextUpdateTimestamp=null,this.updateTimer())}stopTimer(){this._isTimerRunning=!1}setTemplateString(k){this._countdownTemplateString=k,this._countdownText.text=this.getTemplatedTimeString()}updateTimer(){let k=0;k=this._groupSecondsRemaining?1e3:this._groupMinutesRemaining?6e4:this._groupHoursRemaining?36e5:this._groupDaysRemaining?864e5:6048e5;let B=this._timeRemainingMS+(this.allowZeroTime?0:k);this._groupWeeksRemaining&&(B=this.updateTimeValue(B,6048e5,"w")),this._groupDaysRemaining&&(B=this.updateTimeValue(B,864e5,"d")),this._groupHoursRemaining&&(B=this.updateTimeValue(B,36e5,"h")),this._groupMinutesRemaining&&(B=this.updateTimeValue(B,6e4,"m")),this._groupSecondsRemaining&&(B=this.updateTimeValue(B,1e3,"s")),this._nextUpdateTimestamp=Date.now()+Math.min(B,k),this._countdownText.text=this.getTemplatedTimeString(),this._onTimerUpdated.dispatch()}updateTimeValue(k,B,U){const F=Math.floor(k/B);return this._timerValues.set(U,F),k-F*B}getTemplatedTimeString(){return this._countdownTemplateString.replace(RegExp(`{(${F.TIME_SEGMENTS_REGEX})(?:,([0-9])?)?}`,"g"),((k,B,U="1")=>{var F;const G=parseInt(U,10),j=`${null!==(F=this.offset(this._timerValues.get(B)))&&void 0!==F?F:0}`;return`${"0".repeat(Math.max(G-j.length,0))}${j}`}))}};H.TIME_SEGMENTS_REGEX=`[${["w","d","h","m","s"].join("|")}]`,(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],H.prototype,"_countdownText",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],H.prototype,"_countdownTemplateString",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],H.prototype,"_countdownFromTimeMS",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],H.prototype,"_offsetAmount",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],H.prototype,"_onTimerUpdated",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],H.prototype,"_onTimerCompleted",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],H.prototype,"_groupWeeksRemaining",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],H.prototype,"_groupDaysRemaining",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],H.prototype,"_groupHoursRemaining",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],H.prototype,"_groupMinutesRemaining",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],H.prototype,"_groupSecondsRemaining",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],H.prototype,"allowZeroTime",void 0),H=F=(0,G.Cg)([(0,j.EVk)("TimerText",$.Y.ui)],H)},23365:(k,B,U)=>{"use strict";U.d(B,{s:()=>$});var F=U(8674),G=U(62459),j=U(90351);let $=class extends G.uAl{constructor(){super(...arguments),this._autoStart=!1,this._yoyo=!1,this._tweenDelay=0,this._easing=j.i.LinearNone,this.onStart=new G.HN0,this.onComplete=new G.HN0}create(){super.create(),this._autoStart&&(this.startTween(),this.IsActiveInHierarchy||this._tween.pause())}startTween(){this.onStart.dispatch()}destroyTween(){this._tween&&(this._tween.stop(),this._tween.remove(),this._tween=null)}destroy(){this.destroyTween(),this.onStart.dispose(),this.onComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_autoStart",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_yoyo",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],$.prototype,"_tweenDelay",void 0),(0,F.Cg)([(0,G.gfw)(j.i),(0,F.Sn)("design:type",String)],$.prototype,"_easing",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onStart",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onComplete",void 0),$=(0,F.Cg)([(0,G.EVk)("TweenBase (abstract)")],$)},95865:(k,B,U)=>{"use strict";U.d(B,{A:()=>$});var F=U(8674),G=U(62459),j=U(23365);let $=class extends j.s{create(){var k;this._targetGameObject=null!==(k=this._targetGameObject)&&void 0!==k?k:this.GameObject,this._targetGameObject.onActiveInHierarchyChanged.add(this.onActiveStateChanged,this),super.create()}onActiveStateChanged(){var k,B;this.IsActiveInHierarchy?null===(k=this._tween)||void 0===k||k.resume():null===(B=this._tween)||void 0===B||B.pause()}destroy(){var k,B;super.destroy(),null===(B=null===(k=this._targetGameObject)||void 0===k?void 0:k.onActiveInHierarchyChanged)||void 0===B||B.remove(this.onActiveStateChanged,this)}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],$.prototype,"_targetGameObject",void 0),$=(0,F.Cg)([(0,G.EVk)("TweenTransformBase (abstract)")],$)},45902:(k,B,U)=>{"use strict";U.d(B,{_:()=>bt});var F=U(8674),G=U(62459),j=U(88022),$=U(97495),H=U(40295),V=U(42448),W=U(35120),q=U(49237),K=U(43846),z=U(1195),Y=U(93867),Q=U(73797),X=U(28152),Z=U(11624),J=U(59599),tt=U(15485),et=U(46784),it=U(41674),st=U(70548),nt=U(23748),at=U(22023),rt=U(73678),ot=U(40392),ht=U(97518),ct=U(77938);class dt{constructor(){this._currentTitanAsset=null,this.letsGoLocalization="BUTTON_LETS_GO",this._player=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player,this.updateTitanAsset(W.q.instance.prodigy.titansNetworkHandler.titan,!1),W.q.instance.game.broadcaster.addAppListener(Q.RZ.GotTitans,this.updateTitanAsset.bind(this),this,"Titan"),W.q.instance.prodigy.titansNetworkHandler.getTitans().catch(G.RQr.createHandler("WorldMap: Could not get active Titan data"))}updateTitanAsset(k,B=!0){var U;k?(B&&W.q.instance.game.broadcaster.removeAppListener(Q.RZ.GotTitans,this,"Titan"),this._currentTitanAsset=null===(U=ct.t.getItem("titan",k.assetID))||void 0===U?void 0:U.data):G.VyI.log("ZoneGoalsDataProvider.updateTitanAsset: Received no Titan data",G.$bb.Warning)}static isInteractionStarted(){return dt._sessionInteractionStart}static setInteractionStart(){dt._sessionInteractionStart=!0}getZoneName(k){return ot.i.getZoneData(k).getName()}getTitanAsset(){return this._currentTitanAsset}getZoneProgress(k){return this._player.state.getCompletedQuests(k)/Object.keys(W.q.instance.prodigy.world.getZone(k).quests).length}getMapTag(k){return ot.i.getZoneData(k).target}hasFirstQuestStarted(k){return W.q.instance.prodigy.world.getZone(k).isQuestStarted(1)}isQuestCompleted(k,B){return this._player.state.getCompletedQuests(k)>=B}getQuestGiver(k){const B=W.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);switch(k){case rt.A_.BONFIRE:case rt.A_.BONFIREHARD:case rt.A_.BONFIREEXPERT:return B.getText("NPC_NAME_SLURPY");case rt.A_.FOREST:case rt.A_.FORESTHARD:case rt.A_.FORESTEXPERT:return B.getText("NPC_NAME_FLORA");case rt.A_.SHIPWRECK:case rt.A_.SHIPWRECKHARD:case rt.A_.SHIPWRECKEXPERT:return B.getText("NPC_NAME_EVE");case rt.A_.SHIVERCHILL:case rt.A_.SHIVERCHILLHARD:case rt.A_.SHIVERCHILLEXPERT:return B.getText("SHIVERCHILL_GUARDIAN");case rt.A_.SKYWATCH:case rt.A_.SKYWATCHHARD:case rt.A_.SKYWATCHEXPERT:return`${B.getText("NPC_NAME_BENNI")} and ${B.getText("NPC_NAME_BROCCOLINA")}`;default:return null}}getQuestGiverCount(k){switch(k){case rt.A_.SKYWATCH:case rt.A_.SKYWATCHHARD:case rt.A_.SKYWATCHEXPERT:return 2;default:return 1}}getLastVisitedZone(){const k=W.q.instance.prodigy.world.getCurrentZone();return-1!==dt.ZONE_PRIORITY_ORDER.indexOf(k)?k:null}}dt._sessionInteractionStart=!1,dt.ZONE_PRIORITY_ORDER=[rt.A_.FOREST,rt.A_.SHIVERCHILL,rt.A_.SKYWATCH,rt.A_.BONFIRE,rt.A_.SHIPWRECK,rt.A_.FORESTHARD,rt.A_.SHIVERCHILLHARD,rt.A_.SKYWATCHHARD,rt.A_.BONFIREHARD,rt.A_.SHIPWRECKHARD,rt.A_.FORESTEXPERT,rt.A_.SHIVERCHILLEXPERT,rt.A_.SKYWATCHEXPERT,rt.A_.BONFIREEXPERT,rt.A_.SHIPWRECKEXPERT];var lt,ut,ft=U(72849);!function(k){k[k.HoverMode=0]="HoverMode",k[k.DisplayMode=1]="DisplayMode"}(ut||(ut={}));let bt=lt=class extends G.uAl{constructor(){super(...arguments),this.petCollectionCompletionRecord={},this._zonePanels=[],this._booleanStates=[],this._zoneIDFromPanels=[],this._hardModeZoneIDFromPanels=[],this._expertModeZoneIDFromPanels=[],this.onZonePanelActivated=new G.HN0,this._currentMode=ut.HoverMode,this.onApplyCustomDisplay=new G.HN0,this.onClearCustomDisplay=new G.HN0}initialize(){this._dataProvider=new dt,this._zonePanels.forEach(((k,B)=>this.initializePanel(k,B))),W.q.instance.game.broadcaster.addAppListener(Q.n8.WorldMapDifficultyModeChanged,(()=>{this._zonePanels.forEach(((k,B)=>this.initializePanel(k,B)))}),this)}initializePanel(k,B){const U=this.getZoneIdForPanelIndex(B);this.updatePanel(k,U);const F=k.GameObject.findComponentsInChildren(q.$);for(const G of F)G.onInputOver.removeAll(),G.onInputOver.add((()=>{this._booleanStates[B].setValue(!0),this.toggleBubbleVisibility(!0)}),this),G.onInputOut.removeAll(),G.onInputOut.add((()=>{this._currentMode===ut.HoverMode&&(this._booleanStates[B].setValue(!1),this.toggleBubbleVisibility(!1))}),this),G.onClick.removeAll(),G.onClick.add((()=>{this.onZonePanelActivated.dispatch(B),W.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:tt.k.ZoneGoalsCta,interfaceType:it.Wm.DialogBox,interfaceName:et.B.ZoneGoals,destinationName:this._dataProvider.getMapTag(U),elementType:"zone_goals_tooltip",elementID:"destination_zone"})}))}setPanelActive(k,B,U,F=!1){if(U&&this._currentMode===ut.DisplayMode)return;lt.PERMANENT_NOOT_WIDGET_ZONE_INDEXES.includes(k)&&U&&this._currentMode===ut.HoverMode&&(this.toggleBubbleVisibility(B),B&&this.updateWidgetHUD(ot.i.BUTTONS_CONFIG.find((B=>B.prefabIndex===k)).zone)),Y.U.isEndgameQuestActive()&&k===lt.ACADEMY_LOCATION_INDEX&&(this.toggleBubbleVisibility(B),B&&this.updateWidgetHUD(rt.A_.ACADEMY));const G=ot.i.DIFFICULTY_MODE===$.i.Regular&&Y.U.isStepComplete(H.B.PippetDefeated);k>=0&&kB.prefabIndex===k)).zone))}updatePanel(k,B){k.isGemFound=this._playerDataProvider.player.hasFoundKeystone(B),k.updateHeader(this._dataProvider.getZoneName(B),`${lt.ICON_PREFIX}${B.replace(/_hard|_expert/,"")}`),k.setProgressBarIcon(B);const U=k.isGemFound?1:nt.z.roundToNearestMultiplier(this._dataProvider.getZoneProgress(B),.05);k.setProgressBarValue(U,!1),this._dataProvider.hasFirstQuestStarted(B)||this._dataProvider.isQuestCompleted(B,1)||(k.isFirstQuestStarted=!1),k.updateProgressBarText()}showGemAwardSequence(k,B){const U=this.getZoneIdForPanelsByDifficulty().indexOf(k),F=this._zonePanels[U];F.cacheAsBitmap=!1,this.hideWidget(),this._currentMode===ut.HoverMode&&this.toggleDisplayMode(),this.toggleBubbleVisibility(!1),this.setPanelActive(U,!0,!1,!0),F.isGemFound=!1,F.hideBarText(),F.setProgressBarValue(0,!1),F.setProgressBarValue(1,!0),F.onTweenValueComplete.addOnce((()=>{F.isGemFound=!0,F.showBarText(),F.updateProgressBarText(),F.bounceBarIcon(),F.onBarIconBounceComplete.addOnce((()=>{F.cacheAsBitmap=!0,this.setPanelActive(U,!1,!1),this.dismiss(),null==B||B()}))}))}setWidget(k){k!==this._currentWidgetState&&(this._nootIcon.updateAsset(j._.Ui_widget_icon_json,`noot_face_${k}`),this._currentWidgetState=k)}showWidget(){this._nootIcon.GameObject.parent.active=!0}hideWidget(){this._nootIcon.GameObject.parent.active=!1}setSpeechBubbleText(k,...B){k!==this._currentSpeechBubbleText&&(this._speechBubbleText.setLocalizationKey(k),this._currentSpeechBubbleText=k),this._speechBubbleText.setTextArguments(...B)}updateWidgetHUD(k){if(!G.Aq$.isDefined(k))return this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_OVERVIEW"),void this.setWidget(0);if(k===rt.A_.DRAGONISLE)return void this.updateWidgetHudForDragonIsle();if(Y.U.isStepComplete(H.B.PuppetMasterDefeated))return void this.updateWidgetHUDForPostEndgame(k);if(k===rt.A_.ACADEMY)return this.setSpeechBubbleText("WORLD_MAP_SPEECH_BUBBLE_ENDGAME"),void this.setWidget(0);const B=this._dataProvider.getZoneName(k),U=this._dataProvider.getQuestGiver(k),F=this._dataProvider.getZoneProgress(k);if(F>=1)this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_7",B),this.setWidget(3);else if(F>=.9&&F<1)this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_5",B),this.setWidget(2);else if(F>=.75&&F<.9)this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_4",B),this.setWidget(3);else if(F>=.5&&F<.75)this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_3",B),this.setWidget(0);else if(F>=.26&&F<.5)this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_2",B),this.setWidget(4);else if(this._dataProvider.isQuestCompleted(k,2))this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_1",U,B),this.setWidget(4);else if(this._dataProvider.isQuestCompleted(k,1))this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_0",B,U),this.setWidget(2);else if(F<=0){const B=(0,K.k)("GENERAL_PLURAL","",this._dataProvider.getQuestGiverCount(k)>1?"":"s");this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_6",U,B),this.setWidget(4)}}getZoneIdForPanelsByDifficulty(){switch(ot.i.DIFFICULTY_MODE){case $.i.Expert:return this._expertModeZoneIDFromPanels;case $.i.Hard:return this._hardModeZoneIDFromPanels;default:case $.i.Regular:return this._zoneIDFromPanels}}getZoneIdForPanelIndex(k){return this.getZoneIdForPanelsByDifficulty()[k]}updateWidgetHUDForPostEndgame(k){if(lt.PET_COLLECTION_ZONE_IDS.includes(k))this.ownsAllPetsFromZone(k).then((B=>{var U;const F=(null===(U=this._dataProvider.getTitanAsset())||void 0===U?void 0:U.zone)===k;this.setSpeechBubbleText(F?"ZONE_GOALS_SPEECH_BUBBLE_POSTENDGAME_TITAN":B?"ZONE_GOALS_SPEECH_BUBBLE_POSTENDGAME_FOUND_ALL_PETS":"ZONE_GOALS_SPEECH_BUBBLE_POSTENDGAME_PET_COLLECTION"),this.setWidget(F?4:B?2:0)})).catch(G.RQr.createHandler("ZoneGoalsController: Could not determine if the player owns all pets in a regular zone"));else{if(k===rt.A_.ACADEMY)return this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_POSTENDGAME_GALE_ARCHIVES"),void this.setWidget(3);if(k===rt.A_.LAMPLIGHT)return this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_POSTENDGAME_LAMPLIGHT_DUEL"),void this.setWidget(0)}}updateWidgetHudForDragonIsle(){W.q.instance.prodigy.gameContainer.get("196-d3a5").getActiveRiftsPortalIds().then((k=>{k.filter((k=>k!==V.ni.Portal1)).length>0?(this.setSpeechBubbleText("WORLD_MAP_SPEECH_BUBBLE_NEW_RIFTS_PORTAL"),this.setWidget(4)):(this.setSpeechBubbleText("WORLD_MAP_SPEECH_BUBBLE_NO_NEW_RIFTS_PORTAL"),this.setWidget(0))})).catch(G.RQr.createHandler("ZoneGoalsControllerComponent: Failed to fetch the player's active rifts portal IDs"))}ownsAllPetsFromZone(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(G.Aq$.isDefined(this.petCollectionCompletionRecord[k]))return this.petCollectionCompletionRecord[k];{const B=yield at.P8.ownsAllPetsFromZone(k);return this.petCollectionCompletionRecord[k]=B,B}}))}toggleBubbleVisibility(k=!this._speechBubbleBooleanState.getValue()){this._speechBubbleBooleanState.getValue()!==k&&this._speechBubbleBooleanState.setValue(k)}tryAutoTrigger(){dt.isInteractionStarted()||(dt.setInteractionStart(),this.toggleDisplayMode(),this.setDismissalButtonActive(),this.sendPanelInterfaceOpenedEvent(),this.sendWidgetInterfaceOpenedEvent(!0))}toggleDisplayMode(){this.updateWidgetHUD(),this._currentMode===ut.HoverMode?(this._currentMode=ut.DisplayMode,this.applyCustomDisplay(),this.toggleBubbleVisibility(!0),this.sendWidgetInterfaceOpenedEvent(!1)):this._currentMode===ut.DisplayMode&&(this._currentMode=ut.HoverMode,this.toggleBubbleVisibility(!1),this.onClearCustomDisplay.dispatch())}setDismissalButtonActive(k=!0){this._overlayObject.active=k}dismiss(){this._currentMode===ut.DisplayMode&&(this.toggleDisplayMode(),this.setDismissalButtonActive(!1))}applyCustomDisplay(){let k=null;if(k=Y.U.isEndgameQuestActive()?rt.A_.ACADEMY:this._dataProvider.getLastVisitedZone(),G.Aq$.isDefined(k))this.updateWidgetHUD(k),this.onApplyCustomDisplay.dispatch([this.mapZoneIDToLocationID(k)]);else{const k=[],B=W.q.instance.prodigy.gameContainer.get("db5-fb6e");(ot.i.DIFFICULTY_MODE===$.i.Expert?this._expertModeZoneIDFromPanels:ot.i.DIFFICULTY_MODE===$.i.Hard?this._hardModeZoneIDFromPanels:this._zoneIDFromPanels).forEach((U=>{var F;const G=null===(F=ot.i.BUTTONS_CONFIG.find((k=>U===k.zone)))||void 0===F?void 0:F.requirementsID;B.meetsRequirementsDeprecated(G)&&k.push(this.mapZoneIDToLocationID(U))})),this.onApplyCustomDisplay.dispatch(k)}}mapZoneIDToLocationID(k){switch(k){case rt.A_.FOREST:return Z.P.Firefly;case rt.A_.SHIVERCHILL:return Z.P.Shiverchill;case rt.A_.SKYWATCH:return Z.P.Skywatch;case rt.A_.BONFIRE:return Z.P.Bonfire;case rt.A_.SHIPWRECK:return Z.P.Shipwreck;case rt.A_.ACADEMY:return Z.P.Academy;case rt.A_.FORESTHARD:return Z.P.FireflyHard;case rt.A_.SHIVERCHILLHARD:return Z.P.ShiverchillHard;case rt.A_.SKYWATCHHARD:return Z.P.SkywatchHard;case rt.A_.BONFIREHARD:return Z.P.BonfireHard;case rt.A_.SHIPWRECKHARD:return Z.P.ShipwreckHard;case rt.A_.ACADEMYHARD:return Z.P.AcademyHard;default:return null}}sendPanelInterfaceOpenedEvent(){var k,B;this._currentMode===ut.HoverMode?null===(k=this._panelInterfaceOpenHover)||void 0===k||k.sendInterfaceEvent():null===(B=this._panelInterfaceOpenAuto)||void 0===B||B.sendInterfaceEvent()}sendWidgetInterfaceOpenedEvent(k){var B,U;k?null===(B=this._widgetInterfaceOpenAuto)||void 0===B||B.sendInterfaceEvent():null===(U=this._widgetInterfaceOpenClicked)||void 0===U||U.sendInterfaceEvent()}getCurrentActivePanels(){const k=[];return this._booleanStates.forEach(((B,U)=>{B.getValue()&&k.push(this.getZoneIdForPanelIndex(U))})),k}destroy(){W.q.instance.game.broadcaster.removeAppListener(Q.n8.WorldMapDifficultyModeChanged,this),this.onZonePanelActivated.dispose(),this.onApplyCustomDisplay.dispose(),this.onClearCustomDisplay.dispose(),super.destroy()}};bt.ICON_PREFIX="icon-small-",bt.ACADEMY_LOCATION_INDEX=5,bt.POSTENDGAME_NOOT_WIDGET_ZONE_INDEXES=[Z.P.Bonfire,Z.P.Firefly,Z.P.Shipwreck,Z.P.Shiverchill,Z.P.Skywatch,Z.P.Academy,Z.P.Lamplight],bt.PERMANENT_NOOT_WIDGET_ZONE_INDEXES=[Z.P.DragonIsle],bt.PET_COLLECTION_ZONE_IDS=[rt.A_.BONFIRE,rt.A_.SHIVERCHILL,rt.A_.FOREST,rt.A_.SKYWATCH,rt.A_.SHIPWRECK,rt.A_.BONFIREHARD,rt.A_.SHIVERCHILLHARD,rt.A_.FORESTHARD,rt.A_.SKYWATCHHARD,rt.A_.SHIPWRECKHARD,rt.A_.BONFIREEXPERT,rt.A_.SHIVERCHILLEXPERT,rt.A_.FORESTEXPERT,rt.A_.SKYWATCHEXPERT,rt.A_.SHIPWRECKEXPERT],(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",z.E)],bt.prototype,"_playerDataProvider",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],bt.prototype,"_nootIcon",void 0),(0,F.Cg)([(0,G.MnK)(ht.R),(0,F.Sn)("design:type",ht.R)],bt.prototype,"_speechBubbleText",void 0),(0,F.Cg)([(0,G.MnK)(J.f),(0,F.Sn)("design:type",J.f)],bt.prototype,"_speechBubbleBooleanState",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],bt.prototype,"_overlayObject",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(ft.M),(0,F.Sn)("design:type",Array)],bt.prototype,"_zonePanels",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(J.f),(0,F.Sn)("design:type",Array)],bt.prototype,"_booleanStates",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.W_S)(),(0,F.Sn)("design:type",Array)],bt.prototype,"_zoneIDFromPanels",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.W_S)(),(0,F.Sn)("design:type",Array)],bt.prototype,"_hardModeZoneIDFromPanels",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.W_S)(),(0,F.Sn)("design:type",Array)],bt.prototype,"_expertModeZoneIDFromPanels",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],bt.prototype,"onZonePanelActivated",void 0),(0,F.Cg)([(0,G.MnK)(st.S),(0,F.Sn)("design:type",st.S)],bt.prototype,"_panelInterfaceOpenHover",void 0),(0,F.Cg)([(0,G.MnK)(st.S),(0,F.Sn)("design:type",st.S)],bt.prototype,"_panelInterfaceOpenAuto",void 0),(0,F.Cg)([(0,G.MnK)(st.S),(0,F.Sn)("design:type",st.S)],bt.prototype,"_widgetInterfaceOpenAuto",void 0),(0,F.Cg)([(0,G.MnK)(st.S),(0,F.Sn)("design:type",st.S)],bt.prototype,"_widgetInterfaceOpenClicked",void 0),bt=lt=(0,F.Cg)([(0,G.EVk)("ZoneGoalsController",X.Y.ui)],bt)},72849:(k,B,U)=>{"use strict";U.d(B,{M:()=>K});var F,G=U(8674),j=U(62459),$=U(35120),H=U(49237),V=U(37468),W=U(24110),q=U(88022);let K=F=class extends j.uAl{constructor(){super(...arguments),this.onTweenValueComplete=new j.HN0,this.onBarIconBounceComplete=new j.HN0,this.isGemFound=!1,this._isFirstQuestStarted=!0}set isFirstQuestStarted(k){this._isFirstQuestStarted=k}set cacheAsBitmap(k){const B=this.gameObject.transform;k?(B.setPosition(this.originalTransformPosition.x/2,this.originalTransformPosition.y/2),B.setPivot(.25,.25)):(B.setPosition(this.originalTransformPosition.x,this.originalTransformPosition.y),B.setPivot(.5,.5));this.gameObject.findComponent(W.B).getRootContainer().cacheAsBitmap=k}postCreate(){super.postCreate();const k=this.gameObject.transform;this._button.GameObject.parent=this.GameObject.parent;this._button.GameObject.transform.setPosition(k.anchoredPivotOffset.x,k.anchoredPivotOffset.y),this.originalTransformPosition=new j.I9Y(k.posX,k.posY),this.cacheAsBitmap=!0}destroy(){this.onTweenValueComplete.dispose(),this.onBarIconBounceComplete.dispose(),super.destroy()}updateHeader(k,B){this._headerText.text=k,this._headerIcon.updateAsset(this._headerIcon.atlasKey,B);const U=this._headerIcon.GameObject.findComponent(j.XVE),F=this._headerText.GameObject.findComponent(j.XVE);U.setPositionX(F.localPosition.x+F.fullWidth/2)}setProgressBarIcon(k){this._barIcon.updateAsset(q._.Ui_widget_modal_json,`gem-${k.replace(/_hard|_expert/,"")}`)}bounceBarIcon(){this._barIconBounceTween.playAnimation(),this._barIconBounceTween.onTweenComplete.addOnce((()=>this.onBarIconBounceComplete.dispatch()))}setProgressBarValue(k,B){j.Aq$.isDefined(this._progressBar)&&(B?(this._progressBar.setValue(k,!0),this._progressBar.onTweenValueComplete.addOnce((()=>this.onTweenValueComplete.dispatch()))):this._progressBar.setValue(k,!1))}hideBarText(){this._progressBar.hideBarText()}showBarText(){this._progressBar.showBarText()}updateProgressBarText(){this._isFirstQuestStarted?this.isGemFound&&this._progressBar.setBarText($.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(F.GEM_FOUND_KEY)):this._progressBar.setBarText($.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(F.NOT_STARTED_KEY))}};K.NOT_STARTED_KEY="ZONE_GOALS_NOT_STARTED",K.GEM_FOUND_KEY="GEM_FOUND",(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],K.prototype,"_headerText",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],K.prototype,"_headerIcon",void 0),(0,G.Cg)([(0,j.MnK)(V.z),(0,G.Sn)("design:type",V.z)],K.prototype,"_progressBar",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],K.prototype,"_barIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.bTj),(0,G.Sn)("design:type",j.bTj)],K.prototype,"_barIconBounceTween",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],K.prototype,"onTweenValueComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],K.prototype,"onBarIconBounceComplete",void 0),(0,G.Cg)([(0,j.MnK)(H.$),(0,G.Sn)("design:type",H.$)],K.prototype,"_button",void 0),K=F=(0,G.Cg)([(0,j.EVk)("ZoneGoalsPanelController",j.YH6.ui)],K)},25983:(k,B,U)=>{"use strict";U.d(B,{s:()=>$});var F=U(8674),G=U(62459),j=U(49237);let $=class extends G.uAl{constructor(){super(...arguments),this.onClose=new G.HN0,this.onConfirm=new G.HN0}create(){super.create(),this.gameObject.active=!1,this._closeButton.onClick.add(this.close,this),this._okButton.onClick.add(this.close,this),this._noButton.onClick.add(this.close,this),this._yesButton.onClick.add((()=>{this.onConfirm.dispatch()}),this)}destroy(){this._closeButton.onClick.removeAll(this),this._noButton.onClick.removeAll(this),this._okButton.onClick.removeAll(this),this._yesButton.onClick.removeAll(this),this.onClose.dispose(),this.onConfirm.dispose(),super.destroy()}showOneButton(k,B,U,F,j=!1){this.configure(k,B,U,j,!0);for(const $ of this._okButton.GameObject.findComponentsInChildren(G.EYj))$.text=F;this.gameObject.active=!0}showTwoButton(k,B,U,F,j,$=!1){this.configure(k,B,U,$,!1);for(const H of this._noButton.GameObject.findComponentsInChildren(G.EYj))H.text=F;for(const H of this._yesButton.GameObject.findComponentsInChildren(G.EYj))H.text=j;this.gameObject.active=!0}close(){this.gameObject.active=!1,this.onClose.dispatch()}configure(k,B,U,F,G){this._splashGraphic.updateAsset(k.atlas,k.frame),this._titleText.text=B,this._descriptionText.text=U,this._lockIcon.active=F,this._okButton.GameObject.active=G,this._yesButton.GameObject.active=!G,this._noButton.GameObject.active=!G}};(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],$.prototype,"_splashGraphic",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],$.prototype,"_titleText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],$.prototype,"_descriptionText",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],$.prototype,"_closeButton",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],$.prototype,"_okButton",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],$.prototype,"_noButton",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],$.prototype,"_yesButton",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],$.prototype,"_lockIcon",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onClose",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onConfirm",void 0),$=(0,F.Cg)([(0,G.EVk)("LocationDialogPrefab")],$)},55237:(k,B,U)=>{"use strict";U.d(B,{X:()=>Q});var F=U(8674),G=U(62459),j=U(17446),$=U(28152),H=U(6190),V=U(63746),W=U(29834),q=U(65050),K=U(67665),z=U(30226),Y=U(34374);let Q=class extends G.uAl{constructor(){super(...arguments),this._maximumRewardCount=2,this._currentRewardCount=0,this.skipAward=!1,this._menuChangesDelayMs=1300}run(){var k;const B=this._rouletteComponent.getMiddlemostChild().findComponentInChildren(V.Z);B.GameObject.parent.addChild(B.GameObject);const U=B.itemCardData,F=B.itemData;this._cardComponent.initializeItemCard({id:U.id,type:U.type,N:U.N,data:U.data,receivedThroughGotItemFlow:!1});const $=z.J.getItemName(U),H=G.Aq$.isDefined(U.N)&&U.N>1?`${U.N} ${$}`:$;this._titleText.text=H,this._bodyText.text=this._localizer.getText(z.J.getLocalizationFlavorKey(U));const W=z.J.convertRarityToText(null!==(k=F.rarity)&&void 0!==k?k:j.E.Common).toLowerCase(),K=this._localizer.getText(F.rarity===j.E.Uncommon?"YOU_GOT_AN_REWARD":"YOU_GOT_A_REWARD",W);this.skipAward||(this._itemAward.items=[{ID:U.id,type:U.type,N:U.N}],this._itemAward.instanceType=this._rouletteComponent.instanceTypeForSegmentEvent,this._rouletteComponent.sourceTypeForSegmentEvent&&(this._itemAward.awardSourceType=this._rouletteComponent.sourceTypeForSegmentEvent),this._rouletteComponent.instanceTypeForSegmentEvent===q.N.RiftRun||this._rouletteComponent.instanceTypeForSegmentEvent===q.N.BossRift?this._itemAward.instanceId=this._segment.rifts.riftInstanceUuid:this._rouletteComponent.instanceTypeForSegmentEvent!==q.N.FestivalDaily&&this._rouletteComponent.instanceTypeForSegmentEvent!==q.N.FestivalChestRouletteSpin&&this._rouletteComponent.instanceTypeForSegmentEvent!==q.N.FestivalDailyBossRouletteSpin||(this._itemAward.instanceId=this._segment.festival.getFestivalInstanceName(),this._itemAward.instanceType=this._rouletteComponent.instanceTypeForSegmentEvent),this._itemAward.run()),this._cardTransform.setAnchoredPivotOffset(0,this._cardTransform.anchoredPivotOffset.y),this._displayFinalRewardTween.onTweenComplete.addOnce((()=>{this._currentRewardCount++,this._currentRewardCount{this._rouletteComponent.headerText.text=K,this._rouletteObject.active=!1,this._cardComponent.GameObject.active=!0}),this._menuChangesDelayMs)}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Q.prototype,"_rouletteObject",void 0),(0,F.Cg)([(0,G.MnK)(Y.i),(0,F.Sn)("design:type",Y.i)],Q.prototype,"_rouletteComponent",void 0),(0,F.Cg)([(0,G.MnK)(H.q),(0,F.Sn)("design:type",H.q)],Q.prototype,"_itemAward",void 0),(0,F.Cg)([(0,G.MnK)(W.j),(0,F.Sn)("design:type",W.j)],Q.prototype,"_shineAnimator",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],Q.prototype,"_titleText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],Q.prototype,"_bodyText",void 0),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],Q.prototype,"_cardTransform",void 0),(0,F.Cg)([(0,G.MnK)(V.Z),(0,F.Sn)("design:type",V.Z)],Q.prototype,"_cardComponent",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Q.prototype,"_nextButtonContainer",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Q.prototype,"_okayButtonContainer",void 0),(0,F.Cg)([(0,G.MnK)(G.bTj),(0,F.Sn)("design:type",G.bTj)],Q.prototype,"_displayFinalRewardTween",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Q.prototype,"_maximumRewardCount",void 0),(0,F.Cg)([(0,G.Cdj)(G.$Zn.Localization),(0,F.Sn)("design:type",G.dTp)],Q.prototype,"_localizer",void 0),(0,F.Cg)([(0,G.Cdj)("c47-20b6"),(0,F.Sn)("design:type",K.Y)],Q.prototype,"_segment",void 0),Q=(0,F.Cg)([(0,G.EVk)("BossRewardDetermined",$.Y.adventureUi)],Q)},96268:(k,B,U)=>{"use strict";U.d(B,{a:()=>j});var F=U(8674),G=U(62459);let j=class extends G.uAl{get width(){return this._width}get height(){return this._height}create(){var k,B;super.create(),this._width=(null!==(k=this._width)&&void 0!==k?k:this.gameObject.transform.sizeDelta.width)*this.gameObject.transform.localScale.x,this._height=null!==(B=this._height)&&void 0!==B?B:this.gameObject.transform.sizeDelta.height*this.gameObject.transform.localScale.y}};(0,F.Cg)([(0,G.g11)(),(0,G.Lr6)(0),(0,G.nKb)("overrideWidth"),(0,F.Sn)("design:type",Number)],j.prototype,"_width",void 0),(0,F.Cg)([(0,G.g11)(),(0,G.Lr6)(0),(0,G.nKb)("overrideHeight"),(0,F.Sn)("design:type",Number)],j.prototype,"_height",void 0),j=(0,F.Cg)([(0,G.EVk)("RouletteChild")],j)},34374:(k,B,U)=>{"use strict";U.d(B,{i:()=>Q});var F=U(8674),G=U(62459),j=U(95891),$=U(35120),H=U(28152),V=U(63746),W=U(23283),q=U(65050),K=U(53661),z=U(44094),Y=U(96268);let Q=class extends G.uAl{constructor(){super(...arguments),this.padding=20,this.maxVelocity=-2e3,this.initialVelocity=-60,this.spinTime=4,this.decelerationTime=3,this.spinningHeaderTextKey="SPINNING_FOR_YOUR_REWARD",this.onStart=new G.HN0,this.onComplete=new G.HN0,this.onTick=new G.HN0,this._velocity=this.initialVelocity,this._children=new Set,this.isRespin=!1}get width(){return this._width}get height(){return this._height}create(){var k;super.create(),this._width=this.gameObject.transform.sizeDelta.width,this._height=this.gameObject.transform.sizeDelta.height,this.reset(),this.instanceTypeForSegmentEvent=null!==(k=this.getInjectedValue(K.Co.InstanceType))&&void 0!==k?k:q.N.OpenWorld,this._cardSpacing=this._tail.width+this.padding}reset(){for(const k of this.gameObject.children)k.active=!1;for(this._tail=this.getCard(),this._tailTransform=this._tail.GameObject.transform,this._tailTransform.setAnchoredPivotOffset(-this._width/2,this._tailTransform.anchoredPivotOffset.y);this._tailTransform.anchoredPivotOffset.x0&&Math.abs(F+this._winningCardOffset)<.25*B.width){const k=this.forcedRewards.shift();B.GameObject.findComponentInChildren(V.Z,!0).initializeItemCard({id:k.ID,type:k.type,N:k.N,data:k.data})}}getCard(){const k=this.pool.getObject().findComponentInChildren(Y.a);return this._children.add(k),this.gameObject.addChild(k.GameObject),k}update(){super.update(),0!==this._velocity&&this.offsetChildren(this._velocity*($.q.instance.game.time.deltaMS/1e3))}offsetChildren(k){for(const B of Array.from(this._children)){const U=B.GameObject.transform;U.posX+=k,U.anchoredPivotOffset.x+.5*B.width<-.5*this._width&&(B.GameObject.active=!1,this._children.delete(B))}if(this._tailTransform)for(;this._tailTransform.anchoredPivotOffset.x+.5*this._tail.width+this.padding{this._winningCardOffset=U-j.x,this.offsetChildren(j.x-F),F=j.x})).onTweenComplete.add((()=>{this._winningCardOffset=0,this.offsetChildren(U-F),this.onComplete.dispatch()}))}getMiddlemostChild(){return j.minBy(this.gameObject.children,(k=>Math.abs(k.transform.anchoredPivotOffset.x)))}destroy(){this.onStart.dispose(),this.onComplete.dispose(),this.onTick.dispose(),this.pool.destroy(),super.destroy()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Q.prototype,"padding",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Q.prototype,"maxVelocity",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Q.prototype,"initialVelocity",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Q.prototype,"spinTime",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Q.prototype,"decelerationTime",void 0),(0,F.Cg)([(0,G.MnK)(G.uAl),(0,F.Sn)("design:type",Object)],Q.prototype,"pool",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],Q.prototype,"headerText",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],Q.prototype,"spinningHeaderTextKey",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Q.prototype,"onComplete",void 0),(0,F.Cg)([(0,G.Cdj)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],Q.prototype,"_baseLocalizer",void 0),Q=(0,F.Cg)([(0,G.EVk)("Roulette",H.Y.adventureUi)],Q)},65088:(k,B,U)=>{"use strict";U.d(B,{H:()=>rt});var F,G,j,$=U(62459),H=U(24521),V=U(23029),W=U(35120),q=U(98252),K=U(76277),z=U(223),Y=U(92661),Q=U(77981);!function(k){k.Equals="equals",k.DoesNotEqual="doesNotEqual",k.GreaterThan="greaterThan",k.GreaterThanOrEqualTo="greaterThanOrEqualTo",k.LessThan="lessThan",k.LessThanOrEqualTo="lessThanOrEqualTo",k.IncludedIn="includedIn",k.NotIncludedIn="notIncludedIn"}(F||(F={})),function(k){k.FeatureVariable="featureVariable",k.isFeatureEnabled="isFeatureEnabled",k.PlayerLevel="playerLevel",k.WasTriggeredBy="wasTriggeredBy",k.IsMember="isMember",k.IsPlayingAtSchool="isPlayingAtSchool",k.IsPlayingOnMobileApp="isPlayingOnMobileApp",k.MembershipTier="membershipTier",k.IsBattlePassActive="isBattlePassActive",k.isOTPEnabled="isOTPEnabled",k.HasMembershipCategory="hasMembershipCategory",k.membershipThreeTierEligible="membershipThreeTierEligible",k.Locale="locale"}(G||(G={})),function(k){k.Any="any",k.All="all"}(j||(j={}));const X=Y.RZV((()=>Y.KCZ([Y.YjP(),Y.aig(),Y.zMY(),Y.YOg(X)]))),Z=Y.Ikc({featureName:Y.YjP().optional(),featureVariableName:Y.YjP().optional(),membershipCategory:Y.k5n(Q.r).optional()}),J=Y.Ikc({condition:Y.k5n(G),operator:Y.k5n(F),value:X,params:Z.optional()}),tt=Y.RZV((()=>Y.Ikc({matchesAny:Y.YOg(tt).optional(),matchesAll:Y.YOg(tt).optional(),conditions:Y.YOg(J).optional()}))),et=Y.Ikc({assets:Y.YOg(Y.k5n(H.r))}),it=Y.Ikc({id:Y.KCZ([Y.Whr().min(0),Y.YjP()]),description:Y.YjP().optional(),toEvaluate:tt,success:et});Y.Ikc({name:Y.YjP(),sets:Y.YOg(it)});var st=U(89305),nt=U(29738);class at{static checkConditions(k,B,U){return B===j.Any?k.some((k=>this.operatorEvaluate(this.getLeftComparand(k,U),k.value,k.operator))):k.every((k=>this.operatorEvaluate(this.getLeftComparand(k,U),k.value,k.operator)))}static getLeftComparand(k,B){var U,F;let j;const H=W.q.instance.prodigy.gameContainer.get("073-6f3b"),V=W.q.instance.prodigy.gameContainer.get("e20-0fb0");switch(k.condition){case G.FeatureVariable:j=null===(U=H.getFeatureValue(k.params.featureName))||void 0===U?void 0:U[k.params.featureVariableName];break;case G.isFeatureEnabled:j=H.isOn(k.params.featureName);break;case G.PlayerLevel:j=V.player.getLevel();break;case G.WasTriggeredBy:j=B;break;case G.IsMember:j=V.player.hasMembership();break;case G.IsPlayingAtSchool:j=V.player.isPlayingAtSchool();break;case G.IsPlayingOnMobileApp:j=q.pF.isNativeApp();break;case G.MembershipTier:j=V.getMembershipUpsell().tier;break;case G.IsBattlePassActive:const Y=W.q.instance.prodigy.gameContainer.get("8dc-04eb").getCachedBattlePassData();j=$.Aq$.isDefined(Y);break;case G.isOTPEnabled:j=(0,K.G)(z.l).enabled;break;case G.HasMembershipCategory:const Q=null===(F=k.params)||void 0===F?void 0:F.membershipCategory;j=!!$.Aq$.isDefined(Q)&&(0,st.nO)(Q);break;case G.membershipThreeTierEligible:j=q.pF.eligibleForMembershipPurchaseForMultipleTiers();break;case G.Locale:j=nt.O.localeCode;break;default:$.VyI.log(`The specified dynamic prompt condition: '${k.condition}' is not a valid condition.`,$.$bb.Error)}return j}static operatorEvaluate(k,B,U){return at.getOperatorFunction(U)(k,B)}static getOperatorFunction(k){let B;switch(k){case F.Equals:B=(k,B)=>k===B;break;case F.DoesNotEqual:B=(k,B)=>k!==B;break;case F.GreaterThan:B=(k,B)=>k>B;break;case F.GreaterThanOrEqualTo:B=(k,B)=>k>=B;break;case F.LessThan:B=(k,B)=>kk<=B;break;case F.IncludedIn:B=(k,B)=>(Array.isArray(B)?B:[B]).includes(k);break;case F.NotIncludedIn:B=(k,B)=>!(Array.isArray(B)?B:[B]).includes(k);break;default:$.VyI.log(`Invalid operator string: '${k}'.`,$.$bb.Error)}return B}}class rt{static evaluate(k,B){const U=null!=B?B:V.R.loadData(H.r.DynamicPromptRuleset_json);let F;if($.Aq$.isDefined(U))for(const G of U.sets)if(G.toEvaluate.matchesAny?G.toEvaluate.matchesAny.some((B=>this.match(B,j.Any,k)))&&(F=G.success):G.toEvaluate.matchesAll&&G.toEvaluate.matchesAll.every((B=>this.match(B,j.All,k)))&&(F=G.success),F)return F;return this.failureMessage()}static match(k,B,U){return B===j.Any?this.matchAny(k,B,U)||this.matchAll(k,B,U)||this.matchConditions(k,B,U):this.matchAny(k,B,U)&&this.matchAll(k,B,U)&&this.matchConditions(k,B,U)}static matchAny(k,B,U){return k.matchesAny?k.matchesAny.some((k=>this.match(k,j.Any,U))):B!==j.Any}static matchAll(k,B,U){return k.matchesAll?k.matchesAll.every((k=>this.match(k,j.All,U))):B!==j.Any}static matchConditions(k,B,U){return k.conditions?at.checkConditions(k.conditions,B,U):B!==j.Any}static failureMessage(){$.VyI.log("The rules engine failed to determine a success output.",$.$bb.Error)}}},58707:(k,B,U)=>{"use strict";U.d(B,{b:()=>X});var F=U(8674),G=U(62459),j=U(10471),$=U(223),H=U(66582),V=U(35120),W=U(28559),q=U(67665),K=U(76277),z=U(13956),Y=U(95057),Q=U(64353);let X=class extends G.uAl{constructor(){super(...arguments),this._tooltipConfig=W.f}destroy(){this.tryDismissTooltip(),super.destroy()}setTooltipConfig(k){this._tooltipConfig=k}setMemberAdConfig(k){this._memberAdConfig=k}handleNotEnoughCurrency(k,B,U){const F=this._loggedInPlayer.player.getMemberTier(),G=this._loggedInPlayer.player.getCurrencyAmount(k.currency,k.type),W=k.value-G;if(this._segment.item.sendInsufficientCurrencyEvent(k,{sink_type:B,sink_id:U}),!j.h.includes(k.currency)||this._loggedInPlayer.player.isPlayingAtSchool()||!(0,K.G)($.l).enabled&&H.kG.includes(F)){const B=this._tooltipContainer.transform,U=Object.assign(Object.assign({},this._tooltipConfig),{textArgs:[W]}),F=27===k.currency?"YOU_NEED_MORE_MAGICOIN":"YOU_NEED_MORE_CURRENCY";this._tooltipObject=V.q.instance.prodigy.prefabFactory.createTooltip(B,F,U)}else this._segment.purchase.sendFunnelStart({type:this._memberAdConfig.funnelTriggerType,category:this._memberAdConfig.funnelCategory,contentId:U,adType:Y.R.UnifiedConversionFlow,adVersion:Q.P.getAdVersion(this._memberAdConfig.funnelName)}),V.q.instance.prodigy.open.membershipInfo(void 0,{conversionFunnelName:this._memberAdConfig.funnelName,conversionStage:this._memberAdConfig.conversionStage,conversionStaticOrVideo:Y.R.Static})}tryDismissTooltip(){var k;(null===(k=this._tooltipObject)||void 0===k?void 0:k.activeInHierarchy)&&(this._tooltipObject.destroyDeferred(),this._tooltipObject=void 0)}};(0,F.Cg)([(0,z.b)("c47-20b6"),(0,F.Sn)("design:type",q.Y)],X.prototype,"_segment",void 0),(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",Object)],X.prototype,"_loggedInPlayer",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],X.prototype,"_tooltipContainer",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],X.prototype,"_tooltipConfig",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],X.prototype,"_memberAdConfig",void 0),X=(0,F.Cg)([(0,G.EVk)("NotEnoughCurrencyResponseComponent",G.YH6.ui)],X)},64353:(k,B,U)=>{"use strict";U.d(B,{P:()=>W});var F,G=U(62459),j=U(24521),$=U(35120),H=U(23029),V=U(65088);!function(k){k.SchoolCTAGate="School CTA Gate",k.UnifiedConversionFlowTTUpsell="Unified Conversion Flow TT Upsell"}(F||(F={}));class W{static get unifiedConversionFlowRuleset(){return H.R.loadData(j.r.UnifiedConversionFlowRuleset_json)}static getAdVersion(k){const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(this.shouldUseUnifiedConversionFlow(k))return B.isPlayingAtSchool()?F.SchoolCTAGate:F.UnifiedConversionFlowTTUpsell}static getAdVersionFromTriggerCategory(k){const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(this.shouldUseUnifiedConversionFlowForTriggerCategory(k))return B.isPlayingAtSchool()?F.SchoolCTAGate:F.UnifiedConversionFlowTTUpsell}static shouldUseUnifiedConversionFlow(k){return G.Aq$.isDefined(this.evaluateUnifiedConversionFlowRules(k))}static shouldUseUnifiedConversionFlowForTriggerCategory(k){switch(k){case"daily-login-calendar":case"Item-Equip":case"Bounty":case"Daily":case"Duels":case"HUD":case"Loot-Dash":case"Mailbox":case"Map-Transition":case"Member-Jar":case"Minigame-Boost":case"mythics":case"Pet-Gear":case"Pet-Merge":case"Reward":case"Rifts":case"segmented-offers":case"Social":case"Star-Jar":case"Store":case"World":case"Zone-Lock":case"Treasure-Track":return!0;case"Deprecate":case"Pet-Slots":case"Pet":default:return!1}}static evaluateUnifiedConversionFlowRules(k){return V.H.evaluate(k,this.unifiedConversionFlowRuleset)}}},7259:(k,B,U)=>{"use strict";U.d(B,{y:()=>W});var F=U(8674),G=U(78465),j=U.n(G),$=U(35120),H=U(34829),V=U(23034);class W{static showPrompt(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=W.addCustomCSS(),{value:F}=yield j().fire({titleText:k,input:"text",inputValue:B,showCancelButton:!0,position:"bottom",buttonsStyling:!1,reverseButtons:!0,customClass:{popup:"externalPromptPopup",confirmButton:"externalPromptConfirm",cancelButton:"externalPromptCancel",actions:"externalPromptActions",title:"externalPromptTitle",input:"externalPromptInput"}});return W.removeCustomCSS(U),F}))}static showTextareaPrompt(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=W.addCustomCSS(),{value:G}=yield j().fire({titleText:k,allowOutsideClick:!1,input:"textarea",inputAttributes:{maxlength:`${U}`,resize:"none"},inputValue:B,showCancelButton:!0,position:"bottom",buttonsStyling:!1,reverseButtons:!0,customClass:{popup:"externalPromptPopup",confirmButton:"externalPromptConfirm",cancelButton:"externalPromptCancel",actions:"externalPromptActions",title:"externalPromptTitle",input:"externalPromptInput"}});return W.removeCustomCSS(F),G}))}static getSingleImageURL(k){const B=$.q.instance.prodigy.assets.getAsset(`singleImage-${k}`),U=B.filename;return`${H.s.get("GameConstants.Build.ASSETS_LOCATION")}${V.s.ASSET_FOLDER}/single-images/${U}/${B.v}/${U}.png`}static addCustomCSS(){const k=document.createElement("style");return k.innerHTML=`\n .externalPromptPopup {\n border-image: url('${this.getSingleImageURL(337)}');\n border-image-slice: 50 fill;\n border-image-width: 50px;\n background-color: transparent;\n height: 279px;\n width: 466px;\n }\n\n .externalPromptTitle {\n font: 400 24px 'ABeeZee';\n color: #363636;\n margin: 0;\n }\n\n .externalPromptInput {\n height: 56px;\n border-radius: 8px !important;\n border: 1px solid #363636 !important;\n font: 400 18px 'ABeeZee' !important;\n color: #363636 !important;\n }\n\n .externalPromptActions {\n margin-top: 5px;\n }\n\n .externalPromptConfirm {\n border-image: url('${this.getSingleImageURL(332)}');\n border-image-slice: ${this.BUTTON_HEIGHT/2} fill;\n border-image-width: ${this.BUTTON_HEIGHT/2}px;\n width: ${this.BUTTON_WIDTH}px;\n height: ${this.BUTTON_HEIGHT}px;\n font: 400 18px 'Paytone One';\n color: #FFFFFF;\n margin: 0px 8px 0px 8px;\n padding-bottom: 9px;\n }\n\n .externalPromptCancel {\n border-image: url('${this.getSingleImageURL(335)}');\n border-image-slice: ${this.BUTTON_HEIGHT/2} fill;\n border-image-width: ${this.BUTTON_HEIGHT/2}px;\n width: ${this.BUTTON_WIDTH}px;\n height: ${this.BUTTON_HEIGHT}px;\n font: 400 18px 'Paytone One';\n color: #363636;\n margin: 0px 8px 0px 8px;\n padding-bottom: 9px;\n }\n `,document.getElementsByTagName("head")[0].appendChild(k),k}static removeCustomCSS(k){document.getElementsByTagName("head")[0].removeChild(k)}}W.BUTTON_WIDTH=96,W.BUTTON_HEIGHT=60},78407:(k,B,U)=>{"use strict";U.d(B,{_:()=>H});var F=U(8674),G=U(79687),j=U(13956),$=U(97200);let H=class{constructor(){this._hudData=void 0}getHudData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._hudData||(this._hudData=yield this._networkHandler.getHudData()),this._hudData}))}initialize(k){this._hudData=k}};(0,F.Cg)([(0,j.b)("091-489f"),(0,F.Sn)("design:type",$.J)],H.prototype,"_networkHandler",void 0),H=(0,F.Cg)([(0,G.injectable)()],H)},97200:(k,B,U)=>{"use strict";U.d(B,{J:()=>$});var F=U(8674),G=U(48417),j=U(76546);class $ extends j.D{getHudData(){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(G.D.Hud.GetHudData,{})).buttonData}))}}},40579:(k,B,U)=>{"use strict";U.d(B,{W:()=>W});var F=U(8674),G=U(79687),j=U(89067),$=U(35120),H=U(73797),V=U(60228);let W=class{constructor(){this._cachedButtonBreadcrumbs={},this._cachedButtonLabels={},this._demandingExclusiveAttention=new Set,this._cachedButtonAlternateLabels={},this._broadcaster=$.q.instance.game.broadcaster,this.updateCachedLabelData(j.ts.NonMember,{labelValue:(0,V.Bz)(j.ts.NonMember)}),this.updateCachedLabelData(j.ts.CoreMember,{labelValue:(0,V.Bz)(j.ts.CoreMember)}),this.updateCachedLabelData(j.ts.PlusMember,{labelValue:(0,V.Bz)(j.ts.PlusMember)}),this.updateCachedLabelData(j.ts.UltraMember,{labelValue:(0,V.Bz)(j.ts.UltraMember)})}postConstruct(){this._broadcaster.addAppListener(H.Y1.HighlightMapButton,(()=>{this.updateDemandsExclusiveAttention(j.ts.Map,!0)}),this,H.HG.HUD,!0),this._broadcaster.addAppListener(H.Y1.HUDRevampDemandAttention,(k=>{this.updateDemandsExclusiveAttention(k,!0)}),this,void 0,!0),this._broadcaster.addAppListener(H.Y1.HUDRevampEndOperation,(()=>{const k=[...this._demandingExclusiveAttention];this._demandingExclusiveAttention.clear();for(const B of k)this._broadcaster.broadcast(H.Y1.HUDRevampButtonDataUpdated,void 0,[B]);this._broadcaster.broadcast(H.Y1.HUDRevampExclusiveAttentionChanged,void 0,[!1])}),this,void 0,!0)}getCachedButtonData(k){return{demandsExclusiveAttention:this._demandingExclusiveAttention.has(k),notificationData:this._cachedButtonBreadcrumbs[k],alternateLabel:this._cachedButtonAlternateLabels[k],labelData:this.formatLabelDataAsConfig(this._cachedButtonLabels[k])}}formatLabelDataAsConfig(k){return"object"==typeof k?{labelValue:k.labelValue,pillColour:k.pillColour}:{labelValue:k}}updateNotificationBadge(k,B){this._cachedButtonBreadcrumbs[k]=B,this._broadcaster.broadcast(H.Y1.HUDRevampButtonDataUpdated,void 0,[k])}updateCachedLabelData(k,B){this._cachedButtonLabels[k]=B,this._broadcaster.broadcast(H.Y1.HUDRevampButtonDataUpdated,void 0,[k])}updateDemandsExclusiveAttention(k,B){const U=this._demandingExclusiveAttention.size>0;B?this._demandingExclusiveAttention.add(k):this._demandingExclusiveAttention.delete(k);const F=this._demandingExclusiveAttention.size>0;this._broadcaster.broadcast(H.Y1.HUDRevampButtonDataUpdated,void 0,[k]),U!==F&&this._broadcaster.broadcast(H.Y1.HUDRevampExclusiveAttentionChanged,void 0,[F])}updateSecondaryLabel(k,B){this._cachedButtonAlternateLabels[k]=B,$.q.instance.game.broadcaster.broadcast(H.Y1.HUDRevampButtonDataUpdated,void 0,[k])}};(0,F.Cg)([(0,G.postConstruct)(),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],W.prototype,"postConstruct",null),W=(0,F.Cg)([(0,G.injectable)(),(0,F.Sn)("design:paramtypes",[])],W)},67818:(k,B,U)=>{"use strict";U.d(B,{i:()=>q});var F=U(8674),G=U(62459),j=U(91207),$=U(77938),H=U(28152),V=U(34603),W=U(29834);let q=class extends G.uAl{constructor(){super(...arguments),this.onIconLoaded=new G.HN0,this._updateHasBeenCalled=!1}get itemID(){return this._itemID}get isLoaded(){return this._iconTarget.isLoaded}create(){super.create(),this._updateHasBeenCalled||this.updateIconImage()}setItem(k,B,U=!1){this._itemAssetType!==k||this._itemID!==B?(this._itemAssetType=k,this._itemID=B,this.updateIconImage()):U&&this.onIconLoaded.dispatch()}setItemAssetType(k){this._itemAssetType!==k&&(this._itemAssetType=k,this.updateIconImage())}setItemID(k){this._itemID!==k&&(this._itemID=k,this.updateIconImage())}setIconTarget(k){this._iconTarget=k,this.updateIconImage()}updateIconImage(){if(this._updateHasBeenCalled=!0,G.Aq$.isDefined(this._itemAssetType)&&("gold"===this._itemAssetType||G.Aq$.isDefined(this._itemID)))switch(this._morphMarbleSpine&&(this._morphMarbleSpine.GameObject.active=!1),this._iconTarget.OnLoaded.addOnce(this.onIconLoaded.dispatch,this.onIconLoaded),this._itemAssetType){case"gold":this._iconTarget.setAsset(j.E.getIconForType("currency",1)).catch(G.RQr.createHandler("Could not set gold asset"));break;case"item":const k=$.t.getItem(this._itemAssetType,this._itemID).data;k.effect&&G.Aq$.isDefined(k.effect.transform)?(this._iconTarget.setAsset(j.E.getIconForType(k.effect.transform,k.effect.ID)).catch(G.RQr.createHandler("Could not set item asset")),this._morphMarbleSpine&&(this._morphMarbleSpine.GameObject.active=!0,this._morphMarbleSpine.playAnimation("idle",!0))):this._iconTarget.setAsset(j.E.getIconForType(this._itemAssetType,this._itemID)).catch(G.RQr.createHandler("Could not set item asset"));break;default:this._iconTarget.setAsset(j.E.getIconForType(this._itemAssetType,this._itemID)).catch(G.RQr.createHandler("Could not set item asset"))}}destroy(){this.onIconLoaded.dispose(),super.destroy()}};(0,F.Cg)([(0,G.MnK)(V._),(0,F.Sn)("design:type",V._)],q.prototype,"_iconTarget",void 0),(0,F.Cg)([(0,G.MnK)(W.j),(0,F.Sn)("design:type",W.j)],q.prototype,"_morphMarbleSpine",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],q.prototype,"_itemAssetType",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_itemID",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],q.prototype,"onIconLoaded",void 0),q=(0,F.Cg)([(0,G.EVk)("ItemAssetIcon",H.Y.ui)],q)},98762:(k,B,U)=>{"use strict";U.d(B,{U:()=>V});var F=U(8674),G=U(62459),j=U(77938),$=U(28152),H=U(67818);let V=class extends G.uAl{get itemID(){return this._itemID}get itemType(){return this._itemType}create(){super.create(),this._itemID&&this._itemType&&this.updateItemInfo()}init(k,B){this._itemType=k,this._itemID=B,this.updateItemInfo()}updateItemInfo(){var k;const B=null===(k=j.t.getItem(this._itemType,this._itemID))||void 0===k?void 0:k.data;B?(this._name.text=B.name,this._icon.setItem(this._itemType,this._itemID)):G.VyI.log(`Invalid or missing item data found for itemType ${this._itemType}, itemID ${this._itemID}`,G.$bb.Warning)}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_itemID",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],V.prototype,"_itemType",void 0),(0,F.Cg)([(0,G.MnK)(H.i),(0,F.Sn)("design:type",H.i)],V.prototype,"_icon",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],V.prototype,"_name",void 0),V=(0,F.Cg)([(0,G.EVk)("ItemIconAndName",$.Y.ui)],V)},57324:(k,B,U)=>{"use strict";U.d(B,{m:()=>V});var F=U(8674),G=U(62459),j=U(83133),$=U(28152),H=U(98762);let V=class extends G.uAl{constructor(){super(...arguments),this._itemCards=[],this.itemSelected=new G.HN0}create(){super.create(),this._itemCards.forEach((k=>{const B=k.findComponent(H.U);k.findComponent(j.l).onSelected.add((()=>{this.itemSelected.dispatch(B.itemType,B.itemID)}))}))}setItems(k){this._itemCards.length===k.length?this._itemCards.forEach(((B,U)=>{B.findComponent(H.U).init(k[U].type,k[U].ID)})):G.VyI.log(`Attempted to set ${k.length} items for ${this._itemCards.length} cards`,G.$bb.Error)}destroy(){this.itemSelected.dispose(),super.destroy()}};(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],V.prototype,"_itemCards",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"itemSelected",void 0),V=(0,F.Cg)([(0,G.EVk)("ItemSelector",$.Y.ui)],V)},59503:(k,B,U)=>{"use strict";U.d(B,{H:()=>G,f:()=>H});var F,G,j=U(8674),$=U(62459);!function(k){k.Top="top",k.Bottom="bottom",k.Left="left",k.Right="right"}(G||(G={}));let H=F=class extends $.uAl{constructor(){super(...arguments),this._direction=G.Top,this._offset=0,this._fitOnCreate=!0,this._considerTargetBounds=!1,this.onPostFit=new $.HN0}postCreate(){var k;super.postCreate(),this._rectTransform=this.gameObject.findComponent($.XVE),this._rectTransform?(this._fitOnCreate&&this._target&&this.fit(),null===(k=this._target)||void 0===k||k.transform.onWorldMatrixChanged.add(this.fit,this)):$.VyI.log(`FitToTargetComponent: No RectTransform found on ${this.gameObject.name}`,$.$bb.Error)}destroy(){var k;this.onPostFit.dispose(),super.destroy(),null===(k=this._target)||void 0===k||k.transform.onWorldMatrixChanged.remove(this.fit,this)}fit(){var k,B,U;if(!this._target)return void $.VyI.log(`FitToTargetComponent: No target set on ${this.gameObject.name}`,$.$bb.Warning);if(!this._rectTransform)return void $.VyI.log(`FitToTargetComponent: No RectTransform found on ${this.gameObject.name}`,$.$bb.Error);if((null===(k=this.gameObject.parent)||void 0===k?void 0:k.transform)instanceof $.XVE){const k=this.gameObject.parent.transform;this._rectTransform.setAnchorMin(k.pivot.x,k.pivot.y),this._rectTransform.setAnchorMax(k.pivot.x,k.pivot.y)}const j=this._target.transform.worldPosition,H=this._offset,V=null!==(U=null===(B=this._bounds)||void 0===B?void 0:B.getBounds())&&void 0!==U?U:F.defaultBounds,W=new $.or0(this._rectTransform.fullWidth,this._rectTransform.fullHeight);let q;if(this._considerTargetBounds){const k=this._target.findComponent($.XVE);if(k){q=k.getBounds();const B=k.localMatrix.applyInverse({x:q.right,y:q.bottom});B.x+=j.x,B.y+=j.y,q.bottom=B.y,q.right=B.x;const U=k.localMatrix.applyInverse({x:q.left,y:q.top});U.x+=j.x,U.y+=j.y,q.top=U.y,q.left=U.x}}const{x:K,y:z,pivot:Y,finalDirection:Q}=this.findBestFitPosition(j,this._direction,H,V,W,q);this._rectTransform.pivot.set(Y.x,Y.y);const X=this.gameObject.parent.transform.worldMatrix.applyInverse({x:K,y:z});this._rectTransform.setPosition(X.x,X.y);const Z=Q===G.Top||Q===G.Bottom?Y.x:Y.y;this.onPostFit.dispatch(Q,Z)}findBestFitPosition(k,B,U,F,G,j){let $=0,H=0,V={x:.5,y:.5};const W=this.getPositionForDirection(k,B,U,V,j);if($=W.x,H=W.y,V=W.pivot,this.fitsInBounds($,H,G,V,F))return{x:$,y:H,pivot:V,finalDirection:B};const q=this.tryPerpendicularAdjustment(k,B,U,F,G,j);if(q.fits)return Object.assign(Object.assign({},q),{finalDirection:B});const K=this.getAlternateDirections(B);for(const z of K){const B=this.getPositionForDirection(k,z,U,V,j);if(this.fitsInBounds(B.x,B.y,G,B.pivot,F))return Object.assign(Object.assign({},B),{finalDirection:z});const $=this.tryPerpendicularAdjustment(k,z,U,F,G,j);if($.fits)return Object.assign(Object.assign({},$),{finalDirection:z})}return{x:$,y:H,pivot:V,finalDirection:B}}getPositionForDirection(k,B,U,F,j){let H;return B===G.Top?H=j?{x:.5*(j.left+j.right),y:(null==j?void 0:j.top)-U,pivot:{x:.5,y:1}}:{x:k.x,y:k.y-U,pivot:{x:.5,y:1}}:B===G.Left?H=j?{x:(null==j?void 0:j.left)-U,y:.5*(j.top+j.bottom),pivot:{x:1,y:.5}}:{x:k.x-U,y:k.y,pivot:{x:1,y:.5}}:B===G.Right?H=j?{x:(null==j?void 0:j.right)+U,y:.5*(j.top+j.bottom),pivot:{x:0,y:.5}}:{x:k.x+U,y:k.y,pivot:{x:0,y:.5}}:B===G.Bottom&&(H=j?{x:.5*(j.left+j.right),y:(null==j?void 0:j.bottom)+U,pivot:{x:.5,y:0}}:{x:k.x,y:k.y+U,pivot:{x:.5,y:0}}),H||($.VyI.log(`FitToTargetComponent: Unknown direction ${B} on ${this.gameObject.name}`,$.$bb.Error),{x:k.x,y:k.y,pivot:Object.assign({},F)})}fitsInBounds(k,B,U,F,G){const j=k-U.width*F.x,$=k+U.width*(1-F.x),H=B-U.height*F.y,V=B+U.height*(1-F.y);return j>=G.left&&$<=G.right&&H>=G.top&&V<=G.bottom}tryPerpendicularAdjustment(k,B,U,F,j,$){const H=this.getPositionForDirection(k,B,U,{x:.5,y:.5},$),V=H.x,W=H.y,q=Object.assign({},H.pivot);if(B===G.Top||B===G.Bottom){const k=V-j.width*q.x,B=V+j.width*(1-q.x);if(kF.right){const k=B-F.right;q.x=Math.max(0,Math.min(1,q.x+k/j.width))}}else{const k=W-j.height*q.y,B=W+j.height*(1-q.y);if(kF.bottom){const k=B-F.bottom;q.y=Math.max(0,Math.min(1,q.y+k/j.height))}}return{x:V,y:W,pivot:q,fits:this.fitsInBounds(V,W,j,q,F)}}getAlternateDirections(k){return F._DIRECTION_ALTERNATES[k]||[G.Top,G.Bottom,G.Left,G.Right]}setTarget(k,B=!0){this._target=k,B&&this.fit()}setBounds(k,B=!0){this._bounds=k,B&&this.fit()}};H.defaultBounds={left:0,right:$.Zt2.DEFAULT_WIDTH,top:0,bottom:$.Zt2.DEFAULT_HEIGHT},H._DIRECTION_ALTERNATES={[G.Top]:[G.Bottom,G.Left,G.Right],[G.Bottom]:[G.Top,G.Left,G.Right],[G.Left]:[G.Right,G.Top,G.Bottom],[G.Right]:[G.Left,G.Top,G.Bottom]},(0,j.Cg)([(0,$.ERr)(),(0,j.Sn)("design:type",$._mx)],H.prototype,"_target",void 0),(0,j.Cg)([(0,$.MnK)($.XVE),(0,j.Sn)("design:type",$.XVE)],H.prototype,"_bounds",void 0),(0,j.Cg)([(0,$.gfw)(G),(0,j.Sn)("design:type",String)],H.prototype,"_direction",void 0),(0,j.Cg)([(0,$.g11)(),(0,j.Sn)("design:type",Number)],H.prototype,"_offset",void 0),(0,j.Cg)([(0,$.vkK)(),(0,j.Sn)("design:type",Boolean)],H.prototype,"_fitOnCreate",void 0),(0,j.Cg)([(0,$.vkK)(),(0,j.Sn)("design:type",Boolean)],H.prototype,"_considerTargetBounds",void 0),(0,j.Cg)([(0,$.bbQ)(),(0,j.Sn)("design:type",$.HN0)],H.prototype,"onPostFit",void 0),(0,j.Cg)([(0,$.GO0)(),(0,j.Sn)("design:type",Function),(0,j.Sn)("design:paramtypes",[]),(0,j.Sn)("design:returntype",void 0)],H.prototype,"fit",null),H=F=(0,j.Cg)([(0,$.EVk)("FitToTarget")],H)},86050:(k,B,U)=>{"use strict";U.d(B,{$:()=>H});var F=U(62459),G=U(35120),j=U(5365),$=U(95130);class H extends $.D{get state(){return this._state}constructor(k,B){super(k,B),this.onClickCallback=null,this.onUpCallback=null,this.onOverCallback=null,this.onOutCallback=null,this.onClickDisabled=new F.HN0,this.defaultY=0,this.hoverLiftDistance=3,this.internalHoverHitArea=new F.M_G(0,0,80,80),this.broadcasts=[],this.collisionBlock=null,this.disableInput=!1,this._state=j.w.up,this.isActive=!0,this.onDestroy.add((()=>{this.handleDestroy()}))}populate(k){super.populate(k),this.onClickCallback=null,this.onUpCallback=null,this.onOverCallback=null,this.onOutCallback=null,this.defaultY=this.y,this.hoverLiftDistance=F.Aq$.isDefined(k.hoverLiftDistance)?k.hoverLiftDistance:3,this.internalHoverHitArea.height=H.internalHitArea.height+this.hoverLiftDistance,this.broadcasts=k.broadcasts,this.setupCollisionBlock(k)}setActive(k){super.setActive(k),this.y=this.defaultY,this.collisionBlock.hitArea=H.internalHitArea}setDisableInput(k){this.disableInput=k}onDown(){this.disableInput||this.visible&&(this.isActive?(this.y=this.defaultY,G.q.instance.prodigy.audio.playSFX(18,"pop"),F.Aq$.isDefined(this.onClickCallback)&&this.onClickCallback(),this.broadcastAll(),this._state=j.w.down):this.onClickDisabled.dispatch())}setInputBlockPriority(k){G.q.instance.prodigy.gameContainer.get("2e2-6ee6").setBlockType(this.collisionBlock.input,k)}setupCollisionBlock(k){this.collisionBlock=this.add(G.q.instance.prodigy.create.emptySprite(0,0,k.width,k.height)),this.collisionBlock.alpha=0,this.collisionBlock.hitArea=H.internalHitArea,this.collisionBlock.inputEnabled=!0,this.collisionBlock.events.onInputDown.add((()=>{this.onDown()})),this.collisionBlock.events.onInputUp.add((()=>{this.onUp()})),this.collisionBlock.events.onInputOver.add((()=>{this.onOver()})),this.collisionBlock.events.onInputOut.add((()=>{this.onOut()}))}broadcastAll(){F.Aq$.isDefined(this.broadcasts)&&this.broadcasts.forEach((k=>{this.game.broadcaster.broadcast(k.type,G.q.instance.prodigy.open.menus[G.q.instance.prodigy.open.menus.length-1],k.params)}))}onUp(){this.disableInput||this.visible&&this.isActive&&(this.y=this.defaultY-this.hoverLiftDistance,F.Aq$.isDefined(this.onUpCallback)&&this.onUpCallback(),this._state=j.w.up)}onOver(){this.disableInput||this.visible&&this.isActive&&(this.y=this.defaultY-this.hoverLiftDistance,this.collisionBlock.hitArea=this.internalHoverHitArea,F.Aq$.isDefined(this.onOverCallback)&&this.onOverCallback(),this._state=j.w.over)}onOut(){this.visible&&this.isActive&&(this.y=this.defaultY,this.collisionBlock.hitArea=H.internalHitArea,F.Aq$.isDefined(this.onOutCallback)&&this.onOutCallback())}handleDestroy(){this.onClickDisabled.dispose()}}H.internalHitArea=new F.M_G(0,0,80,80)},28962:(k,B,U)=>{"use strict";var F;U.d(B,{z:()=>F}),function(k){k[k.DEFAULT=1]="DEFAULT",k[k.LOCOMOTION=2]="LOCOMOTION",k[k.LOBBY=4]="LOBBY",k[k.SYSTEM_INFO=8]="SYSTEM_INFO",k[k.REAR_OVERLAY=16]="REAR_OVERLAY",k[k.AIMING_OVERLAY=32]="AIMING_OVERLAY"}(F||(F={}))},57128:(k,B,U)=>{"use strict";var F;U.d(B,{h:()=>F}),function(k){k.Top="-top",k.Bottom="-bottom",k.Left="-left",k.Right="-right",k.Middle="-middle",k.TopLeft="-topLeft",k.TopRight="-topRight",k.BottomLeft="-bottomLeft",k.BottomRight="-bottomRight"}(F||(F={}))},31091:(k,B,U)=>{"use strict";U.d(B,{g:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(25456),H=U(28152);let V=class extends $.l{updateContentView(k){this._data=k,this._base.GameObject.findComponentsInChildren(G.EYj).forEach((B=>B.text=k.title)),k.alreadySelected&&(this.setSelected(!0),k.onClick(this)),this.onClick.add((()=>{k.onClick(this),j.q.instance.prodigy.audio.playSFX(18,"pop")}))}getName(){return this._data.title}};V=(0,F.Cg)([(0,G.EVk)("FirstNameCellPrefab",H.Y.ui)],V)},24536:(k,B,U)=>{"use strict";U.d(B,{v:()=>H});var F=U(62459),G=U(35120),j=U(88022),$=U(42413);class H extends $.g{constructor(k,B){super(k,B),this.image=null}populate(k){const B=F.Aq$.isDefined(k.frameName)?k.frameName:"";let U=k.atlasName;F.Aq$.isDefined(k.singleImageID)?U=`singleImage-${k.singleImageID}`:F.Aq$.isDefined(k.atlasName)||(U=F.Aq$.isDefined(k.atlasID)?`atlas-${k.atlasID}`:j._.Ui_shared_json),this.createImage(U,B),super.populate(k),F.Aq$.isDefined(k.tint)&&(this.image.tint=k.tint),F.Aq$.isDefined(k.horizontalFlip)&&k.horizontalFlip&&this.flipHorizontally()}createImage(k,B){this.image=this.add(G.q.instance.prodigy.create.image(0,0,k,B)),F.Aq$.isDefined(this.image.animations.frameData)||F.VyI.log(`Image atlas ${k}, frame ${B} could not be loaded properly!`,F.$bb.Warning)}setImageFrameName(k){this.image.animations.frameData.getFrameByName(k)?this.image.frameName=k:F.VyI.log(`Could not set frame ${k}. The old frame ${this.image.frameName} will be kept.`,F.$bb.Warning)}flipHorizontally(){this.image.pivot.set(this.image.width,0),this.image.scale.x*=-1}setActive(k){this.image.tint=k?16777215:5789784,super.setActive(k)}}},42413:(k,B,U)=>{"use strict";U.d(B,{g:()=>G});var F=U(95130);class G extends F.D{constructor(k,B){super(k,B)}createImage(k,B){}}},3788:(k,B,U)=>{"use strict";U.d(B,{B:()=>G});var F=U(62459);const G={"8-20":{fontFamily:F.dBt.ABeeZee,fontSize:20,fontWeight:"bold",fill:"#000000"},"9-48":{fontFamily:F.dBt.PaytoneOne,fontSize:36,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:4,padding:4,forceCaps:!0,paddingTop:3},"9-36":{fontFamily:F.dBt.PaytoneOne,fontSize:24,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:4,padding:4,forceCaps:!0,paddingTop:3},"10-16":{fontFamily:F.dBt.ABeeZee,fontSize:16,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:4,letterSpacing:1,padding:4},"10-20":{fontFamily:F.dBt.ABeeZee,fontSize:20,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:3,padding:3,letterSpacing:1},"10-30":{fontFamily:F.dBt.ABeeZee,fontSize:30,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:4,padding:4},"10-40":{fontFamily:F.dBt.ABeeZee,fontSize:40,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:5,padding:5},"10-80":{fontFamily:F.dBt.ABeeZee,fontSize:80,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:6,padding:6},"157-0":{fontFamily:F.dBt.PaytoneOne,fontSize:32,fill:"#ffffff",stroke:"#555555",lineJoin:"round",strokeThickness:3,dropShadow:!0,dropShadowColor:"#555555",dropShadowDistance:3,dropShadowAngle:Math.PI/4,dropShadowBlur:0,padding:3,paddingTop:-4},"157-1":{fontFamily:F.dBt.PaytoneOne,fontSize:64,fill:"#ffffff",stroke:"#800000",lineJoin:"round",strokeThickness:3,dropShadow:!0,dropShadowColor:"#800000",dropShadowDistance:6,dropShadowAngle:Math.PI/4,dropShadowBlur:0,padding:3},"157-20":{fontFamily:F.dBt.PaytoneOne,fontSize:20,fill:"#ffffff",stroke:"#555555",lineJoin:"round",strokeThickness:3,dropShadow:!0,dropShadowColor:"#555555",dropShadowDistance:3,dropShadowAngle:Math.PI/4,dropShadowBlur:0,padding:3,paddingTop:-4}}},14088:(k,B,U)=>{"use strict";U.d(B,{h:()=>V});var F=U(62459),G=U(35120),j=U(77938),$=U(95130),H=U(48951);class V extends $.D{constructor(k,B,U,j=[]){super(k,U),this.uiJsonId=B,this.onLoadComplete=new F.HN0,null!==B&&G.q.instance.prodigy.load.assets(j,this.renderMenu.bind(this))}getUiElement(k){let B=null;for(let U=0;U{"use strict";U.d(B,{w:()=>H,Z:()=>q});var F=U(62459),G=U(35120),j=U(30442);class ${get image(){return this._image}constructor(k,B=0,U=0,G,$,H,V,W,q,K){this.type=1,this.physicsType=0,this.onOverSound=null,this.onOutSound=null,this.onDownSound=null,this.onUpSound=null,this.onOverSoundMarker="",this.onOutSoundMarker="",this.onDownSoundMarker="",this.onUpSoundMarker="",this.onInputOver=new F.HN0,this.onInputOut=new F.HN0,this.onInputDown=new F.HN0,this.onInputUp=new F.HN0,this.onOverMouseOnly=!0,this.justReleasedPreventsOver=2,this.freezeFrames=!1,this.forceOut=!1;const z=null!=H?H:this;this.forceOut=!1,this._image=new j.k(k,B,U,G,W),this._image.inputEnabled=!0,this._image.input.start(0,!0),this._image.input.useHandCursor=!0,this.setFrames(V,W,q,K),$&&this.onInputUp.add($,z),this._image.events.onInputOver.add(this.onInputOverHandler,this),this._image.events.onInputOut.add(this.onInputOutHandler,this),this._image.events.onInputDown.add(this.onInputDownHandler,this),this._image.events.onInputUp.add(this.onInputUpHandler,this)}getBounds(){var k;return null===(k=this._image)||void 0===k?void 0:k.getBounds()}clearFrames(){this.setFrames(null,null,null,null)}setStateFrame(k,B,U){const F=`on${k}Frame`;null!==B?(this[F]=B,U&&this.changeStateFrame(k)):this[F]=null}changeStateFrame(k){if(this.freezeFrames)return!1;const B=this[`on${k}Frame`];return!!F.Aq$.isDefined(B)&&(this._image.setTexture(null,B),!0)}setFrames(k,B,U,F){this.setStateFrame($.STATE_OVER,k,this._image.input.pointerOver()),this.setStateFrame($.STATE_OUT,B,!this._image.input.pointerOver()),this.setStateFrame($.STATE_DOWN,U,this._image.input.pointerDown()),this.setStateFrame($.STATE_UP,F,this._image.input.pointerUp())}setStateSound(k,B,U=""){const F=`on${k}Sound`,G=`on${k}SoundMarker`;B?(this[F]=B,this[G]="string"==typeof U?U:""):(this[F]=null,this[G]="")}playStateSound(k){const B=this[`on${k}Sound`];if(B){const U=this[`on${k}SoundMarker`];return B.play(U),!0}return!1}setSounds(k,B,U,F,G,j,H,V){this.setStateSound($.STATE_OVER,k,B),this.setStateSound($.STATE_OUT,G,j),this.setStateSound($.STATE_DOWN,U,F),this.setStateSound($.STATE_UP,H,V)}setOverSound(k,B){this.setStateSound($.STATE_OVER,k,B)}setOutSound(k,B){this.setStateSound($.STATE_OUT,k,B)}setDownSound(k,B){this.setStateSound($.STATE_DOWN,k,B)}setUpSound(k,B){this.setStateSound($.STATE_UP,k,B)}onInputOverHandler(k,B){B.justReleased()&&(this.justReleasedPreventsOver&B.pointerMode)===B.pointerMode||(this.changeStateFrame($.STATE_OVER),this.onOverMouseOnly&&!B.isMouse||(this.playStateSound($.STATE_OVER),this.onInputOver&&this.onInputOver.dispatch(this,B)))}onInputOutHandler(k,B){this.changeStateFrame($.STATE_OUT),this.playStateSound($.STATE_OUT),this.onInputOut&&this.onInputOut.dispatch(this,B)}onInputDownHandler(k,B){this.changeStateFrame($.STATE_DOWN),this.playStateSound($.STATE_DOWN),this.onInputDown&&this.onInputDown.dispatch(this,B)}onInputUpHandler(k,B,U){if(this.playStateSound($.STATE_UP),this.onInputUp&&this.onInputUp.dispatch(this,B,U),!this.freezeFrames)if(!0===this.forceOut||(1&B.pointerMode)===B.pointerMode)this.changeStateFrame($.STATE_OUT);else{this.changeStateFrame($.STATE_UP)||(U?this.changeStateFrame($.STATE_OVER):this.changeStateFrame($.STATE_OUT))}}cleanUp(){this.onInputOver.dispose(),this.onInputOut.dispose(),this.onInputDown.dispose(),this.onInputUp.dispose()}}$.STATE_OVER="Over",$.STATE_OUT="Out",$.STATE_DOWN="Down",$.STATE_UP="Up";var H,V=U(24536),W=U(95130);!function(k){k.up="up",k.down="down",k.over="over"}(H||(H={}));class q extends W.D{constructor(){super(...arguments),this.button=null,this.onUpCallback=null,this.onDownCallback=null,this.onOverCallback=null,this.onOutCallback=null,this.upStateGraphic=null,this.overStateGraphic=null,this.downStateGraphic=null,this.buttonTextGraphic=null,this.isActive=!0,this._state=H.up,this.defaultY=0,this.downStateName=null,this.overStateName=null,this.upStateName=null,this.buttonTextName=null,this.hoverLiftDistance=0,this.textOffset=3,this.isToggle=!1}get state(){return this._state}populate(k){super.populate(k),this.defaultY=this.y,this.downStateName=k.downStateName,this.overStateName=k.overStateName,this.upStateName=k.upStateName,this.buttonTextName=k.buttonTextName,this.hoverLiftDistance=k.hoverLiftDistance,F.Aq$.isDefined(k.textOffset)&&(this.textOffset=k.textOffset),this.isToggle=k.toggle,this.renderMenu(k)}getStateGraphics(){for(const k of this.children){const B=k.name;F.Aq$.isDefined(B)&&(B===this.upStateName&&(this.upStateGraphic=k,this.upDefaultY=this.upStateGraphic.y),B===this.downStateName&&(this.downStateGraphic=k,this.downDefaultY=this.downStateGraphic.y),B===this.overStateName&&(this.overStateGraphic=k,this.overDefaultY=this.overStateGraphic.y),B===this.buttonTextName&&(this.buttonTextGraphic=k,this.textDefaultY=this.buttonTextGraphic.y))}}postPopulate(){this.getStateGraphics(),this.setButtonState(H.up)}renderMenu(k){this.button=new $(this.game,0,0,k.ImageKey,null,this,k.overFrame,k.outFrame,k.downFrame,k.upFrame),this.button.image.width=k.width,this.button.image.height=k.height,this.button.onInputDown.add(this.onDown.bind(this)),this.button.onInputUp.add(this.onUp.bind(this)),this.button.onInputOver.add(this.onOver.bind(this)),this.button.onInputOut.add(this.onOut.bind(this)),this.button.setSounds(k.overSound,"",k.downSound,"",k.outSound,"",k.upSound,""),this.add(this.button.image)}setButtonState(k){this._state=k;let B=k;if(this.downStateGraphic||k!==H.down||(B=H.up),this.overStateGraphic||k!==H.over||(B=H.up),this.upStateGraphic&&this.upStateGraphic.exists)switch(this.upStateGraphic.visible=B===H.up,this.downStateGraphic&&(this.downStateGraphic.visible=B===H.down),this.overStateGraphic&&(this.overStateGraphic.visible=B===H.over),this.upStateGraphic.y=this.upDefaultY,this.downStateGraphic&&(this.downStateGraphic.y=this.downDefaultY),this.overStateGraphic&&(this.overStateGraphic.y=this.overDefaultY),this.buttonTextGraphic.y=this.textDefaultY,k){case H.down:this.downStateGraphic&&(this.downStateGraphic.y-=this.hoverLiftDistance,this.buttonTextGraphic.y+=this.textOffset);break;case H.over:this.buttonTextGraphic.y-=this.hoverLiftDistance,this.upStateGraphic.y-=this.hoverLiftDistance,this.overStateGraphic&&(this.overStateGraphic.y-=this.hoverLiftDistance)}}toggleActive(){this.isActive=!this.isActive,this.exists&&(this.y=this.defaultY)}onDown(){this.visible&&this.isActive&&(G.q.instance.prodigy.audio.playSFX(18,"pop"),F.Aq$.isDefined(this.onDownCallback)&&(this.onDownCallback(),this.isToggle&&this.toggleActive()),this.setButtonState(H.down))}onDownDisabled(){this.visible&&this.isActive&&this.setButtonState(H.down)}onUp(){this.visible&&this.isActive&&(F.Aq$.isDefined(this.onUpCallback)&&this._state===H.down&&(this.onUpCallback(),this.isToggle&&this.toggleActive()),this.setButtonState(H.up))}onOver(){this.visible&&this.isActive&&(F.Aq$.isDefined(this.onOverCallback)&&this.onOverCallback(),this.setButtonState(H.over))}onOut(){this.visible&&this.isActive&&(F.Aq$.isDefined(this.onOutCallback)&&this.onOutCallback(),this.setButtonState(H.up))}setActive(k,B=null){if(this.button.image.inputEnabled=k,F.Aq$.isDefined(B)){if(this.upStateGraphic instanceof V.v)this.upStateGraphic.image.tint=B;else{const k=this.upStateGraphic.images;for(let U=0;U{"use strict";U.d(B,{A:()=>V});var F=U(62459),G=U(35120),j=U(50664),$=U(57128),H=U(95130);class V extends H.D{set enableMask(k){this._enableMask=k,this.activeTrackMask.visible=k,this.activeTrack.mask=k?this.activeTrackMask:null}get enableMask(){return this._enableMask}constructor(k,B){super(k,B),this.maxThumbPositionOffset=0,this._enableMask=!0,this.activeTrackMask=null,this.onScrollChangeCallback=null}populate(k){const B=!F.Aq$.isDefined(k.isInteractive)||k.isInteractive;this.thumbFrameName=F.Aq$.isDefined(k.thumbFrameName)?k.thumbFrameName:"",this.activeTrackBaseFrameName=F.Aq$.isDefined(k.activeTrackBaseFrameName)?k.activeTrackBaseFrameName:"",this.inactiveTrackBaseFrameName=F.Aq$.isDefined(k.inactiveTrackBaseFrameName)?k.inactiveTrackBaseFrameName:"",this.endCapAtlasID=F.Aq$.isDefined(k.endCapAtlasID)?k.endCapAtlasID:"",this.endCapFrameName=F.Aq$.isDefined(k.endCapFrameName)?k.endCapFrameName:"",this.arrowFrameName=F.Aq$.isDefined(k.arrowFrameName)?k.arrowFrameName:"",this.isVertical=!!F.Aq$.isDefined(k.isVertical)&&k.isVertical,this.atlasID=F.Aq$.isDefined(k.atlasID)?k.atlasID:144,this.clickPercentageMovement=F.Aq$.isDefined(k.clickPercentageMovement)?k.clickPercentageMovement:.05,this.eventMode=B?"static":"none",this.hideInactive=!!F.Aq$.isDefined(k.hideInactive)&&k.hideInactive,this.showHead=!!F.Aq$.isDefined(k.showHead)&&k.showHead,this.thumbAnchor=F.Aq$.isDefined(k.thumbAnchor)?k.thumbAnchor:{x:0,y:0};const U=F.Aq$.isDefined(k.trackPadding)?k.trackPadding:0;super.populate(k);const G={width:0,height:0};let j=1;const H=this.game.cache.getFrameData(`atlas-${this.atlasID}`);if(F.Aq$.isDefined(H)){if(this.arrowFrameName){const k=H.getFrameByName(this.arrowFrameName);F.Aq$.isDefined(k)&&(G.width=k.width,G.height=k.height)}if(this.activeTrackBaseFrameName){const k=H.getFrameByName(`${this.activeTrackBaseFrameName}${$.h.Middle}`);F.Aq$.isDefined(k)&&(j=k.height)}}F.Aq$.isDefined(k.children)||(k.children=[],G.width>0&&G.height>0&&k.children.push({type:"Button",name:"lessButton",anchorX:this.isVertical?.5:0,anchorY:this.isVertical?1:.5,relativeX:this.isVertical?.5:0,relativeY:this.isVertical?1:.5,width:G.width,height:G.height,children:[{type:"Graphic",name:"lessButtonGraphic",atlasID:this.atlasID,frameName:this.arrowFrameName}]},{type:"Button",name:"moreButton",anchorX:this.isVertical?.5:1,anchorY:this.isVertical?0:.5,relativeX:this.isVertical?.5:1,relativeY:this.isVertical?0:.5,width:G.width,height:G.height,children:[{type:"Graphic",name:"moreButtonGraphic",atlasID:this.atlasID,frameName:this.arrowFrameName}]}),k.children.push({type:"SlicedGraphic",name:"inactiveTrack",anchorX:this.isVertical?.5:0,anchorY:this.isVertical?0:.5,x:this.isVertical?0:G.width+U,y:this.isVertical?G.height+U:null,relativeX:this.isVertical?.5:null,relativeY:this.isVertical?null:.5,sliceType:"threeScale",isVertical:this.isVertical,atlasID:this.atlasID,baseFrameName:this.inactiveTrackBaseFrameName,width:this.isVertical?j:this.width-2*(G.width+U),height:this.isVertical?this.height-2*(G.height+U):j},{type:"SlicedGraphic",name:"activeTrack",anchorX:this.isVertical?.5:0,anchorY:this.isVertical?0:.5,x:this.isVertical?0:G.width+U,y:this.isVertical?G.height+U:0,relativeX:this.isVertical?.5:null,relativeY:this.isVertical?null:.5,sliceType:"threeScale",isVertical:this.isVertical,atlasID:this.atlasID,baseFrameName:this.activeTrackBaseFrameName,width:this.isVertical?j:this.width-2*(G.width+U),height:this.isVertical?this.height-2*(G.height+U):j}))}postPopulate(){if(this.children.forEach((k=>{"activeTrack"===k.name?this.activeTrack=k:"inactiveTrack"===k.name&&(this.inactiveTrack=k)})),this.isInteractive){this.setupButtons();const k=this.add(G.q.instance.prodigy.create.emptySprite(0,0,this.activeTrack.width,this.activeTrack.height));k.alpha=0,k.x=this.activeTrack.x,k.y=this.activeTrack.y,k.inputEnabled=!0,k.events.onInputDown.add(this.onTrackClick.bind(this))}if(this.hideInactive&&(this.inactiveTrack.visible=!1),""===this.thumbFrameName?this.thumbSprite=G.q.instance.prodigy.create.emptySprite(0,0):this.thumbSprite=G.q.instance.prodigy.create.sprite(0,0,`atlas-${this.atlasID}`,this.thumbFrameName,this.thumbAnchor),this.thumbSprite.name="thumbSprite",this.thumbSprite.y=F.Aq$.getCenteredXY(0,this.thumbSprite.height,0,this.activeTrack.y,0,this.activeTrack.height).y,""!==this.endCapAtlasID){const k=this.getMaxThumbPosition();this.add(G.q.instance.prodigy.create.sprite(k.x,k.y,`atlas-${this.endCapAtlasID}`,this.endCapFrameName))}if(this.add(this.thumbSprite),this.showHead){const k=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.playerHead=G.q.instance.prodigy.create.player(this.thumbSprite,k,1,25,105,!1,{isPreview:!0,headOnly:!0,hideMount:!0}),this.playerHead.startLoad()}this.clampThumbWithinTrack();const k=this.getMinThumbPosition(),B=this.getMaxThumbPosition(),U=new F.M_G(this.isVertical?B.x:k.x,this.isVertical?B.y:k.y,this.isVertical?this.thumbSprite.width:this.activeTrack.width+this.thumbSprite.width,this.isVertical?this.activeTrack.height+this.thumbSprite.height:this.thumbSprite.height),$=j.F.createBox(this.game,0,0,this.activeTrack.width,this.activeTrack.height,0,1);this.thumbSprite.addChild($),$.x=this.isVertical?this.activeTrack.x-this.thumbSprite.x:-this.activeTrack.width,$.y=this.isVertical?0:this.activeTrack.y-this.thumbSprite.y,$.x+=this.isVertical?0:.5*this.thumbSprite.width,$.y+=this.isVertical?.5*this.thumbSprite.height:0,this.activeTrack.mask=$,this.activeTrackMask=$,this.isInteractive&&(this.thumbSprite.inputEnabled=!0,this.thumbSprite.input.enableDrag(),this.thumbSprite.input.boundsRect=U,this.thumbSprite.events.onDragStop.add(this.onDragStop,this))}getActiveTrack(){return this.activeTrack}setupButtons(){let k,B;if(this.children.forEach((U=>{"lessButton"===U.name?k=U:"moreButton"===U.name&&(B=U)})),F.Aq$.isDefined(k)){k.children.find((k=>"lessButtonGraphic"===k.name)).flipHorizontally(),k.onClickCallback=()=>{this.onLessButtonClick()}}F.Aq$.isDefined(B)&&(B.onClickCallback=()=>{this.onMoreButtonClick()})}setPercentComplete(k,B=!1){this.setPercentCompleteOffset(k,0,B)}setPercentCompleteOffset(k,B,U=!1){this.maxThumbPositionOffset=B;const G=this.isVertical?this.getMinThumbPosition().y:this.getMinThumbPosition().x,j=this.isVertical?this.getMaxThumbPosition().y:this.getMaxThumbPosition().x,$=F.cj9.linear(G,j,k);if(this.thumbSprite.x=this.isVertical?this.thumbSprite.x:$,this.thumbSprite.y=this.isVertical?$:this.thumbSprite.y,!this.enableMask)if(this.isVertical){const B=F.cj9.linear(0,this.inactiveTrack.height,k);this.activeTrack.height=B}else{const B=F.cj9.linear(0,this.inactiveTrack.width,k);this.activeTrack.width=B}this.clampThumbWithinTrack(),this.thumbSprite.alpha=k>0||this.showHead?1:0,U||this.onScrollChange()}getPositionAtPercent(k){const B=this.isVertical?this.getMinThumbPosition().y:this.getMinThumbPosition().x,U=this.isVertical?this.getMaxThumbPosition().y:this.getMaxThumbPosition().x;return F.cj9.linear(B,U,k)}adjustThumbPosition(k,B){this.thumbSprite.x+=k,this.thumbSprite.y+=B,this.clampThumbWithinTrack()}clampThumbWithinTrack(){const k=this.getMaxThumbPosition(!0),B=this.getMinThumbPosition();this.thumbSprite.x=F.cj9.clamp(this.thumbSprite.x,B.x,k.x),this.thumbSprite.y=F.cj9.clamp(this.thumbSprite.y,k.y,B.y)}onDragStop(){this.onScrollChange()}onTrackClick(k,B){const U=this.isVertical?B.y:B.x,F=this.isVertical?k.world.y:k.world.x,G=this.isVertical?k.y:k.x,j=this.isVertical?k.height:k.width,$=this.isVertical?this.thumbSprite.height:this.thumbSprite.width,H=(U-F)/j,V=Math.floor(G+j*H-.5*$);this.isVertical?this.thumbSprite.y=V:this.thumbSprite.x=V,this.clampThumbWithinTrack(),this.onScrollChange()}onMoreButtonClick(){this.adjustThumbPosition(this.isVertical?0:this.activeTrack.width*this.clickPercentageMovement,this.isVertical?-this.activeTrack.height*this.clickPercentageMovement:0),this.onScrollChange()}onLessButtonClick(){this.adjustThumbPosition(this.isVertical?0:-this.activeTrack.width*this.clickPercentageMovement,this.isVertical?this.activeTrack.height*this.clickPercentageMovement:0),this.onScrollChange()}onScrollChange(){F.Aq$.isDefined(this.onScrollChangeCallback)&&this.onScrollChangeCallback(this.getPercentageComplete())}getPercentageComplete(){const k=this.isVertical?this.thumbSprite.y:this.thumbSprite.x,B=this.isVertical?this.getMinThumbPosition().y:this.getMinThumbPosition().x,U=(this.isVertical?this.getMaxThumbPosition().y:this.getMaxThumbPosition().x)-B;let F=1;return 0!==U&&(F=(k-B)/U),F}getMaxThumbPosition(k=!1){let B,U;return this.isVertical?(B=F.Aq$.getCenteredXY(this.thumbSprite.width,0,this.activeTrack.x,0,this.activeTrack.width,0).x,U=this.activeTrack.y-.5*this.thumbSprite.height):(B=this.activeTrack.x+(this.enableMask?this.activeTrack.width:this.inactiveTrack.width)-.5*this.thumbSprite.width,U=F.Aq$.getCenteredXY(0,this.thumbSprite.height,0,this.activeTrack.y,0,this.activeTrack.height).y),k||(B+=this.maxThumbPositionOffset,U+=this.maxThumbPositionOffset),{x:B,y:U}}getMinThumbPosition(){let k=0,B=0;return this.isVertical?(k=F.Aq$.getCenteredXY(this.thumbSprite.width,0,this.activeTrack.x,0,this.activeTrack.width,0).x,B=this.activeTrack.y+(this.enableMask?this.activeTrack.height:this.inactiveTrack.height)-.5*this.thumbSprite.height):(k=this.activeTrack.x-.5*this.thumbSprite.width,B=F.Aq$.getCenteredXY(0,this.thumbSprite.height,0,this.activeTrack.y,0,this.activeTrack.height).y),{x:k,y:B}}setActive3SlicedImage(k){this.activeTrack.images[0].frameName=`${k}${$.h.Left}`,this.activeTrack.images[1].frameName=`${k}${$.h.Right}`,this.activeTrack.images[2].frameName=`${k}${$.h.Middle}`}destroy(k){F.W$e.instance.game.tweens.removeAllFromOwner(this),super.destroy(k)}}},27625:(k,B,U)=>{"use strict";U.d(B,{I:()=>H});var F=U(62459),G=U(19273),j=U(70123),$=U(95130);class H extends $.D{populate(k){if(super.populate(k),this.spineRenderer=j.j.createRenderer(k.spineKey,{type:"spine"}),F.Aq$.isDefined(k.animation)&&""!==k.animation){const B=!!F.Aq$.isDefined(k.loop)&&k.loop;this.playAnimation(k.animation,B,null)}new G._(this.game,this,[this.spineRenderer],0,0)}playAnimation(k,B=!1,U=null,G=null){this.spineRenderer.playAnimation(k,B),F.Aq$.isDefined(U)&&(F.Aq$.isDefined(this.spineRenderer.spine)?this.spineRenderer.spine.onComplete.addOnce(U,G):this.spineRenderer.onLoaded.addOnce((()=>{this.spineRenderer.spine.onComplete.addOnce(U,G)})))}}},95130:(k,B,U)=>{"use strict";U.d(B,{D:()=>q});var F=U(62459),G=U(68910),j=U(35120),$=U(34829),H=U(73797),V=U(88022),W=U(26480);class q extends W.g{constructor(k,B){super(k,B),this.name="",this.layoutElement=null,this.dimensionPlaceholderImage=null,this.game=k,this.metricsManager=j.q.instance.prodigy.gameContainer.get("2a1-fed9"),this.metricsManager.objectCreated("UIElement"),this.onDestroy.add(this.handleUIDestroy.bind(this))}handleUIDestroy(){this.metricsManager.objectDestroyed("UIElement")}processRelativeFields(k,B){F.Aq$.isDefined(k.relativeWidth)&&(k.width=Math.floor(B.width*k.relativeWidth)),F.Aq$.isDefined(k.relativeHeight)&&(k.height=Math.floor(B.height*k.relativeHeight)),F.Aq$.isDefined(k.relativeX)?k.x=Math.floor(B.width*k.relativeX):F.Aq$.isDefined(k.x)||(k.x=0),F.Aq$.isDefined(k.relativeY)?k.y=Math.floor(B.height*k.relativeY):F.Aq$.isDefined(k.y)||(k.y=0),F.Aq$.isDefined(k.scaleX)&&(this.scale.x=k.scaleX),F.Aq$.isDefined(k.scaleY)&&(this.scale.y=k.scaleY),F.Aq$.isDefined(k.visible)&&(this.visible=k.visible)}populate(k){let B=0,U=0;F.Aq$.isDefined(k.name)&&(this.name=k.name),(F.Aq$.isDefined(k.width)&&k.width>this.width||F.Aq$.isDefined(k.height)&&k.height>this.height)&&(F.Aq$.isDefined(this.dimensionPlaceholderImage)&&this.dimensionPlaceholderImage.destroy(),this.dimensionPlaceholderImage=j.q.instance.prodigy.create.image(0,0,void 0,void 0,G.Texture.EMPTY),this.dimensionPlaceholderImage.width=this.dimensionPlaceholderImage.height=80,this.dimensionPlaceholderImage.alpha=0,this.add(this.dimensionPlaceholderImage),F.Aq$.isDefined(k.width)&&(this.dimensionPlaceholderImage.width=k.width),F.Aq$.isDefined(k.height)&&(this.dimensionPlaceholderImage.height=k.height)),F.Aq$.isDefined(k.anchorX)&&(B=-Math.floor(k.anchorX*this.width)),F.Aq$.isDefined(k.anchorY)&&(U=-Math.floor(k.anchorY*this.height)),F.Aq$.isDefined(k.x)&&(this.x=k.x),F.Aq$.isDefined(k.y)&&(this.y=k.y),this.x+=B,this.y+=U}postPopulate(){}setActive(k){this.isActive=k;for(let B=0;B{"use strict";U.d(B,{c:()=>wt});var F=U(62459),G=U(86824),j=U(86050);class $ extends j.${constructor(){super(...arguments),this.currentToggleState=0,this.stateGraphics=[],this.buttonToggleGraphic=null}populate(k){super.populate(k);const B={anchorX:0,anchorY:0,relativeX:0,relativeY:0,type:"Graphic",name:"buttonToggleGraphic",atlasID:k.atlasID,frameName:0===k.defaultToggleState?k.frameNameOff:k.frameNameOn};F.Aq$.isDefined(k.children)?k.children.unshift(B):k.children=[B],this.currentToggleState=k.defaultToggleState,this.stateGraphics=[{frameName:k.frameNameOff},{frameName:k.frameNameOn}]}postPopulate(){super.postPopulate(),this.updateToggleImage()}setOnClickCallback(k){this.onClickCallback=()=>{this.toggleState(),this.updateToggleImage(),F.Aq$.isDefined(k)&&k(this.currentToggleState)}}toggleState(){this.currentToggleState=1-this.currentToggleState}toggleAndUpdateImage(){this.toggleState(),this.updateToggleImage()}updateToggleImage(){this.setGraphicFrameName(this.stateGraphics[this.currentToggleState])}setGraphicFrameName(k){F.Aq$.isDefined(this.buttonToggleGraphic)||(this.buttonToggleGraphic=this.children.find((k=>"buttonToggleGraphic"===k.name))),this.buttonToggleGraphic.setImageFrameName(k.frameName)}}var H=U(24536),V=U(35120),W=U(63119),q=U(95130);class K extends q.D{constructor(k,B){super(k,B),this.autoComplete=!1,this.onLostFocus=new F.HN0,this.onTextChanged=new F.HN0,this.isActive=!0,this.onDestroy.add(this.handleDestroy.bind(this))}populate(k){super.populate(k);const B=V.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService);F.Aq$.isDefined(k.textKey)&&(k.label=B.getText(k.textKey));const U=F.Aq$.isDefined(k.isPassword)&&k.isPassword?"password":void 0;this.input=W.F.createInputField(this.game,this.parent,k.name,k.placeholderText,k.x,k.y,k.width,k.height,U),this.input.setLabel(this.parent,k.label),this.autoComplete||this.input.setAutoComplete(!1),this.input.enablePerKeyEvents(!0),this.input.onFocusChanged=k=>{k||this.onLostFocus.dispatch()},this.input.onTextChanged=()=>{this.onTextChanged.dispatch()},F.Aq$.isDefined(k.forceUpperCase)&&k.forceUpperCase&&this.input.setAttribute("autocapitalize","on"),F.Aq$.isDefined(k.fieldColour)&&this.input.setStyle("background-color",k.fieldColour)}handleDestroy(){this.onLostFocus.dispose(),this.onTextChanged.dispose()}setValue(k){this.input.setValue(k)}setVisible(k){this.input.setVisible(k),super.setVisible(k)}getValue(){return this.input.getValue()}}var z=U(73797);class Y extends F.mcf{constructor(k,B,U){super(),this.dirty=!0,this.layoutType=null,this.alignment="top",this.spacing=0,this.startOffset=0,this.ignoreInvisible=!1,this.game=k,B&&B.addChild(this),this.layoutType=U.type,F.Aq$.isDefined(U.alignment)&&(this.alignment=U.alignment),F.Aq$.isDefined(U.spacing)&&(this.spacing=U.spacing),F.Aq$.isDefined(U.offset)&&(this.startOffset=U.offset),F.Aq$.isDefined(U.ignoreInvisible)&&(this.ignoreInvisible=U.ignoreInvisible),V.q.instance.game.broadcaster.addAppListener(z.n8.ChildAdded,this.parentModified.bind(this),this,this.parent,!1),V.q.instance.game.broadcaster.addAppListener(z.n8.ChildRemoved,this.parentModified.bind(this),this,this.parent,!1),this.calculateChildren()}calculateChildren(){this.dirty=!1,"vertical"===this.layoutType?this.alignVertical():"horizontal"===this.layoutType&&this.alignHorizontal()}alignVertical(){let k=this.startOffset;"center"===this.alignment?k+=Math.round((this.parent.height-this.getContentHeight())/2):"bottom"===this.alignment&&(k+=Math.round(this.parent.height-this.getContentHeight()));for(let B=0;B!0===k.visible));if(B){const U=B.gameObjects;if(U&&U.length>0)for(let B=0;B0&&F.y<=G.fullHeight&&(k.push(U[B]),this.objectsViewed.add(U[B]))}}}this.objectsInViewport=k}setElementVisibility(k,B){k.visible=B;const U=k.gameObjects;if(U)for(const F of U)F.active=B}stopDrag(k){et.l.prototype.stopDrag.call(this.inputHandler.input,k),this.scrollStartPos=null,this.maxDistanceThisScroll<=this.clickDragThreshold&&(this.simulateMouseAction(k,1),this.simulateMouseAction(k,2)),this.maxDistanceThisScroll=0}checkOverlap(k,B){return F.M_G.intersects(k,B)}setupMask(){this.rectMask=this.game.add.graphics(this.x,this.y),this.add(this.rectMask),this.rectMask.beginFill(0),this.rectMask.drawRect(0,0,this.viewWidth,this.viewHeight),this.rectMask.endFill(),this.inputHandler=this.game.add.graphics(this.x,this.y),this.add(this.inputHandler),this.inputHandler.beginFill(0,.001),this.inputHandler.drawRect(0,0,this.viewWidth,this.viewHeight),this.inputHandler.endFill(),this.contents.mask=this.rectMask,this.inputHandler.inputEnabled=!0;const k=this.inputHandler.input;k.enableDrag(!1),k.allowVerticalDrag=!0,k.updateDrag=this.dragView.bind(this),k.stopDrag=this.stopDrag.bind(this)}dragView(k){if(this.maxScrollDist<=0)return;F.Aq$.isDefined(this.scrollStartPos)||(this.scrollStartPos=this.contents.y);const B=k.y-k.positionDown.y;let U=this.scrollStartPos+B;this.maxDistanceThisScroll=Math.max(this.maxDistanceThisScroll,Math.abs(B)),U<-1*this.maxScrollDist?U=-1*this.maxScrollDist:U>0&&(U=0),this.contents.y=Math.round(U),F.Aq$.isDefined(this.scrollBar)&&this.scrollBar.setPercent(Math.abs(this.contents.y)/this.maxScrollDist),this.dirty=!0}simulateMouseAction(k,B){var U,F;if(this.worldVisible){if(this.simulateElementsClick(k,B,this.contentsArray),this.overButton){const B=null===(U=this.overButton.getRootContainer())||void 0===U?void 0:U.children.find((k=>k.inputEnabled));B&&!this.elementContains(B,k.position)&&(this.overButton=null,B.events.onInputOut.dispatch(B,k))}for(const U of this.frameworkButtonsArray){const G=null===(F=U.getRootContainer())||void 0===F?void 0:F.children.find((k=>k.inputEnabled));if(G&&this.elementContains(G,k.position)){const F=U.currentState;2===B&&2===this.lastPointerAction&&F!==it.K.Over?(this.overButton=U,G.events.onInputOver.dispatch(G,k)):1===B&&2===this.lastPointerAction?G.events.onInputDown.dispatch(G,k):2===B&&1===this.lastPointerAction&&G.events.onInputUp.dispatch(G,k),this.lastPointerAction=B}}}}simulateElementsClick(k,B,U){for(const F of U){const U=F instanceof j.$||F instanceof X.Z?F:null;if(null==U?void 0:U.visible){const G=this.elementContains(F,k.position),j=U.state;if(!G){U.onOut();continue}2===B&&2===this.lastPointerAction&&j!==X.w.over?U.onOver():1===B&&2===this.lastPointerAction&&j!==X.w.down?U.onDown():2===B&&1===this.lastPointerAction&&j!==X.w.up&&U.onUp(),this.lastPointerAction=B}else F.alpha>0&&F.children&&this.simulateElementsClick(k,B,F.children)}}elementContains(k,B){const U=k.getBounds();return F.M_G.contains(U,B)}destroy(k={children:!0}){this.objectsInViewport.length=0,this.objectsViewed.clear(),this.clearScrollView(),super.destroy(k)}}var nt,at,rt=U(24285),ot=U(42413),ht=U(88022),ct=U(91207),dt=U(3788),lt=U(57750);!function(k){k.Top="top",k.Center="center",k.Bottom="bottom"}(nt||(nt={}));class ut extends q.D{constructor(){super(...arguments),this.sprites=[],this.fontSize=20,this.textAlignment=F.If$.Center,this.fontID=10,this.fontName="",this.lineHeight=null,this.monoSpace=10,this.iconOffsetY=0,this.forceUpperCase=!1,this.numberOfLines=1,this.verticalAlign=nt.Top,this.tint=16777215,this.icon=null}populate(k){super.populate(k),this.sprites=[],this.boundsWidth=F.Aq$.isDefined(k.width)?k.width:this.game.width,this.fontSize=F.Aq$.isDefined(k.fontSize)?k.fontSize:20,this.textAlignment=F.Aq$.isDefined(k.horizontalAlignment)?k.horizontalAlignment:F.If$.Center,this.fontID=F.Aq$.isDefined(k.fontID)?k.fontID:10,this.fontName=`atlas-${this.fontID}`,this.lineHeight=k.lineHeight,this.monoSpace=k.monoSpace,this.iconOffsetY=F.Aq$.isDefined(k.iconOffsetY)?k.iconOffsetY:0,this.forceUpperCase=!!F.Aq$.isDefined(k.forceUpperCase)&&k.forceUpperCase,this.numberOfLines=1,this.verticalAlign=F.Aq$.isDefined(k.verticalAlignment)?k.verticalAlignment:nt.Top,this.tint=F.Aq$.isDefined(k.tint)?parseInt(k.tint):16777215,F.Aq$.isDefined(k.text)?this.setText(k.text):F.Aq$.isDefined(k.textKey)&&this.setText(V.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText(k.textKey))}setText(k){if(!F.Aq$.isDefined(this.game))return;let B=k;this.forceUpperCase&&(B=B.toUpperCase());let U=0,G=null,j=0,$=0,H=0;const W=[];let q=0;for(;qk===k.toLowerCase()))&&(k.fontSize=k.lowerSize),B=B.toUpperCase()),this._pixiText?(this._pixiText.style=k,this._pixiText.text=B):(this._pixiText=new tt.Text(B,k),this._pixiText.roundPixels=!0,this.addChild(this._pixiText)),this._pixiText.style.wordWrap=!0,this._pixiText.style.wordWrapWidth=this.boundsWidth,this.textAlignment){case F.If$.Center:this._pixiText.anchor.set(.5,0),this._pixiText.x=this.boundsWidth/2;break;case F.If$.Right:this._pixiText.anchor.set(1,0),this._pixiText.x=this.boundsWidth;break;default:this._pixiText.anchor.set(0,0),this._pixiText.x=0}switch(this.verticalAlign){case nt.Center:this._pixiText.anchor.set(this._pixiText.anchor.x,.5),this._pixiText.y=this.height/2;break;case nt.Bottom:this._pixiText.anchor.set(this._pixiText.anchor.x,1),this._pixiText.y=this.height;break;default:this._pixiText.anchor.set(this._pixiText.anchor.x,0),this._pixiText.y=0}return this._pixiText.y-=k.fontSize>>2,void(k.paddingTop&&(this._pixiText.y+=k.paddingTop))}F.VyI.log(`[Legacy Font][Text] No legacy text style found for font key ${K}, falling back to sprite-based bitmap font to render "${B}".`,F.$bb.Warning),this.numberOfLines=1;for(let z=0;z=this.sprites.length?(Q=V.q.instance.prodigy.create.sprite(j,$,this.fontName),this.add(Q),this.sprites.push(Q)):(Q=this.sprites[K],Q.visible=!0),Q.tint=this.tint,Q.x=j,Q.y=$,F.Aq$.isDefined(q)){if(-1!==q.indexOf("icon-")){Q.destroy();const k=q.split("-"),B=ct.E.getIconForType(k[1],parseInt(k[2]));this.icon=V.q.instance.prodigy.icon.createIcon(j,$,B,null,null,40,40),Q=this.icon,this.add(this.icon),this.sprites[K]=this.icon,tt.Ticker.shared.addOnce((()=>this.icon.smoothed=!0))}else Q.key!==ht._.General_icons_json&&Q.loadTexture(ht._.General_icons_json),Q.frameName=q;Q.y+=this.iconOffsetY}else if(Q.key!==this.fontName&&Q.loadTexture(this.fontName),10!==k){let U=`${k}-${this.fontSize}`;const G=V.q.instance.game.cache.getFrameData(this.fontName);(null==G?void 0:G.checkFrameName(U))||(F.VyI.log(`Text: Frame name '${U}', character '${B[z]}' does not exist in font '${this.fontName}'`,F.$bb.Error),U=`63-${this.fontSize}`),Q.frameName=U}if(32===k||z===B.length-1||10===k){const B=0===this.fontSize?26:this.fontSize,U=F.Aq$.isDefined(this.lineHeight)?this.lineHeight:B+5;if(j>=this.boundsWidth&&10!==k){const k=j;j=0,$+=U;for(let U=H;U<=K;U++){const k=this.sprites[U];k.x=j,k.y=$,k.key===ht._.General_icons_json&&(k.y+=(k.height-B)/2),j+=F.Aq$.isDefined(this.monoSpace)?this.monoSpace:k.width}W.push(k-j),this.numberOfLines++,this.textAlignment===F.If$.Center&&(j-=Y)}else 10===k&&(Q.visible=!1,$+=U,j=0,this.numberOfLines++);H=K+1,32===k&&(j+=Y)}10!==k&&(j+=F.Aq$.isDefined(this.monoSpace)?this.monoSpace:Q.width),z===B.length-1&&W.push(j)}if(this.textAlignment!==F.If$.Left){let k=-1,B=0,U=-1;for(let G=0;G{this.game.broadcaster.removeAppListener(z.n8.TabSelected,this,B)}))}onTabSelected(k,B){this.setActive(!(this.groupID===k&&this.tabID===B))}}var Et=U(87776);class wt{constructor(k){this.game=null,this.game=k}static parseJSON(k){try{return JSON.parse(k)}catch(e){F.VyI.log("Error parsing config file",F.$bb.Error)}}createUIElements(k,B){let U=null,j=null,$=null,H=[];const V=B.width,W=B.height;for(let q=0;q{"use strict";U.d(B,{b:()=>V});var F=U(62459),G=U(68910),j=U(35120),$=U(77938),H=U(95130);class V extends H.D{constructor(k,B){super(k,B),this.boundsAlignH="left",this.boundsAlignV="top",this.textBounds=new G.Rectangle,this._padding=new F.I9Y,this.isActive=!0}populate(k,B){var U,H,V,W,q,K,z,Y,Q,X,Z,J,tt,et;super.populate(k);const it=j.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService);F.Aq$.isDefined(k.textKey)&&(k.text=it.getText(k.textKey)),F.Aq$.isDefined(k.forceUpperCase)&&k.forceUpperCase&&(k.text=k.text.toUpperCase()),this.textBounds=new G.Rectangle(0,0,null!=B?B:this.width,this.height);const st=new G.TextStyle,nt=F.Aq$.isDefined(k.style)?$.t.getItem("fontStyle",k.style):$.t.getItem("fontStyle",1);if(F.Aq$.isDefined(nt)){const k=nt.data;st.fontFamily=k.font,st.fontSize=k.fontSize,st.fill=k.fill,st.fontStyle=null!==(U=k.fontStyle)&&void 0!==U?U:st.fontStyle,st.fontWeight=null!==(H=k.fontWeight)&&void 0!==H?H:"normal",k.stroke&&(st.stroke=k.stroke),st.strokeThickness=null!==(V=k.strokeThickness)&&void 0!==V?V:st.strokeThickness,k.shadowColor&&(st.dropShadow=!0,st.dropShadowColor=null!==(W=k.shadowColor)&&void 0!==W?W:st.dropShadowColor,st.dropShadowDistance=null!==(q=k.shadowDistance)&&void 0!==q?q:st.dropShadowDistance),this._padding=null!==(K=k.padding)&&void 0!==K?K:this._padding}st.wordWrap=null!==(z=k.wordWrap)&&void 0!==z&&z,st.wordWrapWidth=null!==(Y=k.wordWrapWidth)&&void 0!==Y?Y:this.width,st.align=null!==(Q=k.align)&&void 0!==Q?Q:"center",st.fontSize=null!==(X=k.fontSize)&&void 0!==X?X:st.fontSize,st.fill=null!==(Z=k.color)&&void 0!==Z?Z:st.fill,st.lineHeight=null!==(J=k.lineSpacing)&&void 0!==J?J:st.lineHeight,st.padding=3,this.textObject=new G.Text(k.text,st),this.textObject.roundPixels=!0,this.boundsAlignH=null!==(tt=k.boundsAlignH)&&void 0!==tt?tt:"left",this.boundsAlignV=null!==(et=k.boundsAlignV)&&void 0!==et?et:"top",this.calculateAlignment(),this.add(this.textObject)}calculateAlignment(){const k=new F.I9Y(0,0),B=new G.Rectangle;this.textObject.getLocalBounds(B),"right"===this.boundsAlignH?k.x+=this.textBounds.width-B.width/this.textObject.resolution-this._padding.x:"center"===this.boundsAlignH&&(k.x+=.5*(this.textBounds.width-B.width/this.textObject.resolution-this._padding.x)),"bottom"===this.boundsAlignV?k.y+=this.textBounds.height-3-B.height/this.textObject.resolution-this._padding.y:"middle"===this.boundsAlignV&&(k.y+=.5*(this.textBounds.height-6-B.height/this.textObject.resolution-this._padding.y)),this.textObject.pivot.x=-k.x,this.textObject.pivot.y=-k.y}setText(k){this.textObject.text!==k&&(this.textObject.text=k,this.textObject.updateText(!0),this.calculateAlignment())}applyTint(k){this.textObject.tint=k}}},85313:(k,B,U)=>{"use strict";U.d(B,{B:()=>z});var F=U(62459),G=U(68910),j=U(88022),$=U(66582),H=U(35120),V=U(98013),W=U(37193),q=U(3788),K=U(26480);class z extends K.g{constructor(k,B,U,j,$,V={}){var W,K;super(k,B),this.lines=0,this.text="",this.sprites=[],this.scaleToFit=!1,this.fontSize=20,this._defaultFontSize=26,this.horizontalAlignment=null,this.fontID=10,this.fontName=null,this.lineHeight=0,this.monoSpace=0,this.iconOffsetY=0,this.numberOfLines=1,this.boundsWidth=H.q.instance.game.width,this.x=U,this.y=j,this.letters=H.q.instance.prodigy.create.element(this,0,0),F.Aq$.isDefined(V.width)&&(this.boundsWidth=V.width,V.scaleToFit&&(this.scaleToFit=!0)),F.Aq$.isDefined(V.size)&&(this.fontSize=V.size),this.horizontalAlignment=V.align,F.Aq$.isDefined(V.fontID)&&(this.fontID=V.fontID),this.fontName=`atlas-${this.fontID}`,this.lineHeight=V.lineHeight,this.monoSpace=V.mono,F.Aq$.isDefined(V.iconOffsetY)&&(this.iconOffsetY=V.iconOffsetY);const z=`${null!==(W=V.fontID)&&void 0!==W?W:10}-${null!==(K=V.size)&&void 0!==K?K:20}`;if(q.B[z]){switch(this._pixiTextStyle=Object.assign({},q.B[z]),this._pixiText=new G.Text("",this._pixiTextStyle),this.addChild(this._pixiText),this._pixiText.roundPixels=!0,F.Aq$.isDefined(this.boundsWidth)&&!this.scaleToFit&&(this._pixiTextStyle.wordWrap=!0,this._pixiTextStyle.wordWrapWidth=this.boundsWidth),this.horizontalAlignment){case F.If$.Center:this._pixiText.anchor.set(.5,0),this._pixiText.x=this.boundsWidth>>1;break;case F.If$.Right:this._pixiText.anchor.set(1,0),this._pixiText.x=this.boundsWidth;break;default:this._pixiText.anchor.set(0,0),this._pixiText.x=0}this._pixiTextStyle.paddingTop&&(this._pixiText.y+=this._pixiTextStyle.paddingTop),this.setPixiText($)}else F.Aq$.isDefined($)&&(F.VyI.log(`[Legacy Font][BitmapFont] No legacy text style found for font key ${z}, falling back to sprite-based bitmap font to render "${$}".`,F.$bb.Warning),this.setText($))}setText(k){if(!F.Aq$.isDefined(this._game)||this.text===k)return;if(this._pixiText)return this.setPixiText(k),void(this.text=k);V.l.toggleDisplayObjSettings(this.letters,!0),this.letters.removeAll(!1),this.text=k;let B=0,U=0,G=0;const $=[];let W=0,q=null,K=!1;for(let F=0;F=this.sprites.length?(Z=H.q.instance.prodigy.create.sprite(B,U,this.fontName),this.sprites.push(Z)):(Z=this.sprites[Q],Z.visible=!0),this.letters.add(Z),Z.x=B,Z.y=U,F.Aq$.isDefined(Y)){const k=Y.split(":");if(k.length>=2&&"single-image"===k[0]){const G=k[1],j=k[2],$=k[3],V=k[4],W=k[5];if(Z.key!==G){let k,q,K;this.remove(Z),Z.visible=!1,H.q.instance.prodigy.load.assets([G],(()=>{Z.visible=!0})),F.Aq$.isDefined(j)&&F.Aq$.isDefined($)&&(k={x:parseFloat(j),y:parseFloat($)}),F.Aq$.isDefined(V)&&(q=parseInt(V)),F.Aq$.isDefined(W)&&(K=parseInt(W)),Z=H.q.instance.prodigy.icon.createIcon(B,U,G,k,void 0,q,K,!1),this.letters.add(Z),this.sprites.splice(Q,1,Z)}}else Z.key!==j._.General_icons_json&&Z.loadTexture(j._.General_icons_json),Z.frameName=Y;Z.y+=this.iconOffsetY}else Z.key!==this.fontName&&Z.loadTexture(this.fontName),10!==z&&(Z.frameName=`${z}-${this.fontSize}`);if(32===z||V===k.length-1||10===z){const k=0===this.fontSize?this._defaultFontSize:this.fontSize,H=F.Aq$.isDefined(this.lineHeight)?this.lineHeight:k+5;if(B>=this.boundsWidth){const V=B;B=0,U+=H;for(let $=G;$<=Q;$++)this.sprites[$].x=B,this.sprites[$].y=U,this.sprites[$].key===j._.General_icons_json&&(this.sprites[$].y+=(this.sprites[$].height-k)/2),B+=F.Aq$.isDefined(this.monoSpace)?this.monoSpace:this.sprites[$].width;$.push(V-B),this.numberOfLines++}else 10===z&&(Z.visible=!1,U+=H,B=0,this.numberOfLines++);G=Q+1,32===z&&(B+=X)}10!==z&&(F.Aq$.isDefined(this.monoSpace)?B+=this.monoSpace:B+=Z.width),V===k.length-1&&$.push(B)}if(this.lines=$.length,F.Aq$.isDefined(this.horizontalAlignment)&&this.horizontalAlignment!==F.If$.Left){let k=-1,B=0,U=-1;for(let G=0;G>1),F.atlas,F.frame)),k=" "),G=G.replace("[membership]",k)}for(const F of["mail-gold","mail-heart","mail-star","mail-tower"])G.includes(`[${F}]`)&&(this.addChild(H.q.instance.prodigy.create.sprite(0,(null!==(U=this._pixiTextStyle.paddingTop)&&void 0!==U?U:0)+(this._pixiTextStyle.fontSize-24>>1),j._.General_icons_json,F)),G=G.replace(`[${F}]`," "));switch(this._pixiTextStyle.forceCaps&&(this._pixiTextStyle.lowerSize&&[...G].some((k=>k===k.toLowerCase()))&&(this._pixiTextStyle.fontSize=this._pixiTextStyle.lowerSize),G=G.toUpperCase()),this.horizontalAlignment){case F.If$.Center:this._pixiText.anchor.set(.5,0),this._pixiText.x=this.boundsWidth>>1;break;case F.If$.Right:this._pixiText.anchor.set(1,0),this._pixiText.x=this.boundsWidth;break;default:this._pixiText.anchor.set(0,0),this._pixiText.x=0}if(this._pixiTextStyle.paddingTop&&(this._pixiText.y+=this._pixiTextStyle.paddingTop),this._pixiText.text=G,this._pixiText.style=this._pixiTextStyle,this.scaleToFit&&this._pixiText.width>this.boundsWidth){const k=this.boundsWidth/this._pixiText.width;this._pixiText.scale.set(k,k),F.Aq$.toggleDisplayObjSmooth(this._pixiText,!0)}}addClickCallback(k,B,U){const F=this.add(H.q.instance.prodigy.create.sprite(0,0,j._.General_core_json,"overlay-light"));F.width=B,F.height=U,F.alpha=0,F.inputEnabled=!0,F.events.onInputDown.add(k)}destroy(k={children:!0}){F.W$e.instance.game.tweens.removeAllFromOwner(this),super.destroy(k)}}},98623:(k,B,U)=>{"use strict";U.d(B,{H:()=>V});var F=U(62459),G=U(88022),j=U(35120),$=U(34829),H=U(26480);class V extends H.g{get isModalWithTransparency(){return this._isModalWithTransparency}constructor(k,B,U,F,G){super(k,B,null,null,null,null,U,F,G),this._isModalWithTransparency=!1,this.game=k,this.metricsManager=j.q.instance.prodigy.gameContainer.get("2a1-fed9"),this.metricsManager.objectCreated("Element")}setRenderState(k,B){this.renderOnly=k,this.tintElement=B}showTooltip(k,B){if(this.hasTooltip()&&(this.tooltip.destroy(),this.tooltip=null),F.Aq$.isDefined(k)){this.tooltip=j.q.instance.prodigy.create.element(this,B);let U=this.tooltip.add(j.q.instance.prodigy.create.sprite(30,0,G._.General_core_json,"tooltip"));U.scale.x=-1,U.alpha=.9,U.width=300,U.height=50,j.q.instance.prodigy.create.font(this.tooltip,90,11,k,{width:230,align:"center"}),U=this.tooltip.add(j.q.instance.prodigy.create.sprite(0,0,G._.General_icons_json,"type")),this.game.add.tween(U,this).to({x:10},1e3,F.GS3.Quadratic.InOut,!0,0,$.s.MAX_SAFE_INTEGER,!0)}}hasTooltip(){return F.Aq$.isDefined(this.tooltip)}highlight(k,B=0,U=0,H=400){this.isHighlighted()&&(this.arrow.destroy(),this.arrow=null),k&&(this.arrow=this.add(j.q.instance.prodigy.create.sprite(0,0,G._.General_icons_json,"help")),this.arrow.x=B+Math.floor(this.width/2),this.arrow.y=U-this.arrow.height+10,this.game.add.tween(this.arrow,this).to({y:this.arrow.y+25},H,F.GS3.Quadratic.InOut,!0,0,$.s.MAX_SAFE_INTEGER,!0))}isHighlighted(){return F.Aq$.isDefined(this.arrow)}setElementAsModal(k){this._isModalWithTransparency=k,j.q.instance.prodigy.open.bitmapCacheGameRender(k,this)}destroy(k={children:!0}){this.cacheAsBitmap=!1,this.metricsManager&&(this.metricsManager.objectDestroyed("Element"),this.metricsManager=null),this.tooltip=null,this.arrow=null,super.destroy(k),this.game=null}getInjectedValue(k){return j.q.instance.prodigy.gameContainer.get(k)}}},63119:(k,B,U)=>{"use strict";U.d(B,{F:()=>H});var F=U(62459),G=U(35120),j=U(60881),$=U(98623);class H extends $.H{static createInputField(k,B,U,G,j,$,V=this.WIDTH_MEDIUM,W=this.HEIGHT_MEDIUM,q="textProdigy123"){const K=document.getElementById(U);F.Aq$.isDefined(K)&&K.remove();const z=new H(k,B,U,G,j,$,V-15,W);return z.setAttribute("type",q),z}constructor(k,B,U,G,j,$,H,V,W=null,q="on"){super(k,B),this.onFocusChanged=null,this.onTextChanged=null,this.input=null,this.style={},this.canvas=null,this.allowEvents=!1,this.inputWidth=0,this.inputHeight=0,this.label=null,this._fadeTween=null,this.input=document.createElement("input"),this.input.setAttribute("value",""),this.input.setAttribute("id",U),this.input.setAttribute("class","game-input"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("autocomplete",q),this.input.setAttribute("placeholder",F.Aq$.isDefined(G)?G:""),this.style=W;document.getElementById("external-ui").appendChild(this.input),this.canvas=document.getElementById("game-container").getElementsByTagName("canvas")[0],this.x=j,this.y=$,this.inputWidth=H,this.inputHeight=V,this.allowEvents=!0,this.textChanged=this.textChanged.bind(this),this.input.addEventListener("focus",(k=>{this.handleFocusChanged(!0)})),this.input.addEventListener("blur",(k=>{this.handleFocusChanged(!1)}))}setStyle(k,B){this.input.style.setProperty(k,B)}setAttribute(k,B){this.input.setAttribute(k,B)}setAutoComplete(k){this.setAttribute("autocomplete",k?"on":"off")}setFocus(k){k?this.input.focus():this.input.blur()}clearEvents(k){this.allowEvents=k}getValue(){return this.input.value}setValue(k){this.input.value=k}setVisible(k){this.setStyle("display",k?"":"none")}hide(k){this.visible=!1,this.fade(0,k),F.Aq$.isDefined(this.label)&&(this.label.alpha=0),this.setFocus(!1)}show(k,B=0){this.visible=!0,this.fade(1,k,B),F.Aq$.isDefined(this.label)&&(this.label.alpha=1)}setEnabled(k){this.input.disabled=!k}enablePerKeyEvents(k){k?this.input.addEventListener("keyup",this.textChanged):this.input.removeEventListener("keyup",this.textChanged)}setLabel(k,B=null,U=!1,j=null){F.Aq$.isDefined(this.label)?this.label.setText(B):this.label=G.q.instance.prodigy.create.font(k,F.Aq$.isDefined(j)?j:this.x+10,this.y-30,B,{size:20})}update(){super.update();const k=this.canvas.clientHeight/this.game.world.height;F.Aq$.setOuterHeight(this.input,k*this.inputHeight);const B=this.canvas.clientWidth/this.game.world.width;F.Aq$.setOuterWidth(this.input,B*this.inputWidth);const U=k*this.y+(this.input.style.marginTop?parseInt(this.input.style.marginTop):0),G=B*this.x+(this.canvas.style.marginLeft?parseInt(this.canvas.style.marginLeft):0)+(this.input.style.marginLeft?parseInt(this.input.style.marginLeft):0),j=k*this.inputHeight*.5;if(this.setStyle("top",`${U}px`),this.setStyle("left",`${G}px`),this.setStyle("font-size",`${j}px`),F.Aq$.isDefined(this.style))for(const F in this.style)this.style.hasOwnProperty(F)&&this.setStyle(F,this.style[F])}destroy(){this.setFocus(!1),this.input.remove(),G.q.instance.game.tweens.remove(this._fadeTween),super.destroy()}handleFocusChanged(k){this.allowEvents&&(k?this.game.input.keyboard.clearCaptures():this.game.input.keyboard.addKeyCapture([j.D.BACKSPACE]),F.Aq$.isDefined(this.onFocusChanged)&&this.onFocusChanged(k))}fade(k,B,U=0){if(this._fadeTween&&this._fadeTween.stop(),k>0&&this.setVisible(!0),0===B)this.input.style.opacity=`${k}`,this.onFadeTweenComplete(k);else{const F={opacity:parseInt(this.input.style.opacity)};isNaN(F.opacity)&&(F.opacity=1),this._fadeTween=this.game.add.tween(F,this).to({opacity:k},B,null,null,U).onUpdateCallback((()=>{this.input.style.opacity=`${F.opacity}`})),this._fadeTween.onTweenComplete.add((()=>{this.onFadeTweenComplete(k)})),this._fadeTween.start()}}onFadeTweenComplete(k){this.input.style.opacity=`${k}`,0===k&&this.setVisible(!1)}textChanged(){F.Aq$.isDefined(this.onTextChanged)&&this.onTextChanged()}}H.HEIGHT_MEDIUM=47,H.WIDTH_MEDIUM=320},17291:(k,B,U)=>{"use strict";U.d(B,{b:()=>q});var F=U(62459),G=U(88022),j=U(35120),$=U(24190),H=U(77938),V=U(73797),W=U(98623);class q extends W.H{constructor(k,B,U,$={hideMenu:!0,hideContent:!0,tile:"bg-tile-brown"}){super(k,B),this.menuTutorial=null,this.style=null,this.btns=[],this.currentBtn=null,this.setupComplete=!1,this.overlay=null,this.isHidden=!1,this.spinner=null,this.bg=null,this.fg=null,this.title=null,this.bar=null,this.barSpeedX=0,this.barSpeedY=0,this.menuTutorial=U,this.style=$,j.q.instance.prodigy.open.menuOpen(!this.style.hideMenu),F.Aq$.isDefined(j.q.instance.prodigy.notifications)&&j.q.instance.prodigy.notifications.clearNotifications(),this.style.hideOverlay||(this.overlay=j.q.instance.prodigy.create.sprite(0,0,G._.General_core_json,"overlay-small"),this.overlay.width=this.game.world.width,this.overlay.height=this.game.world.height,this.overlay.alpha=0,this.overlay.inputEnabled=!0,this.add(this.overlay))}hide(k=!1){k?(this.isHidden=!0,this.visible=!1):this.isHidden&&(this.isHidden=!1,this.visible=!0)}onMenuOpen(k){}setup(){this.loadComplete()}update(){super.update(),this.setupComplete&&this.menuUpdate()}loadComplete(){this.game&&(F.Aq$.isDefined(this.spinner)&&this.spinner.destroy(),this.menuSetup())}menuSetup(){F.Aq$.isDefined(this.style.open)&&this.style.open(),this.bg=j.q.instance.prodigy.create.element(this,0,0),F.Aq$.isDefined(this.style.tile)&&this.setBackgroundTile(G._.Tiled_sprites_json,this.style.tile,.25,.25,this.style.full),this.fg=j.q.instance.prodigy.create.element(this,0,0),this.style.hideContent&&(this.game.broadcaster.broadcast(V.lc.EnableBackground,this,[!1]),this.game.broadcaster.broadcast(V.lc.EnableContent,this,[!1]))}close(){if(F.Aq$.isDefined(this.game)){if(this.style.hideContent&&(this.game.broadcaster.broadcast(V.lc.EnableBackground,this,[!0]),this.game.broadcaster.broadcast(V.lc.EnableContent,this,[!0])),j.q.instance.prodigy.open.menuOpen(!0),F.Aq$.isDefined(this.style.close)&&this.style.close(),this.btns)for(let k=0;k=0;U--)B[U].y=650,k+=B[U].width,B[U].x=1230-k,k+=30}if(F.Aq$.isDefined(k)){let B=0;for(let U=0;U{"use strict";U.d(B,{g:()=>j});var F=U(95891),G=U(57308);class j extends G.Y{constructor(k,B,U,G,j,$,H,V,W){super(k,B,U),F.isNil(W)||(this.name=W),F.isNil(H)||(this.x=H),F.isNil(V)||(this.y=V)}destroy(k={children:!0}){super.destroy(k)}}},35452:(k,B,U)=>{"use strict";U.d(B,{a:()=>q});var F=U(62459),G=U(88022),j=U(35120),$=U(73797),H=U(41674),V=U(15485),W=U(98623);class q extends W.H{constructor(k,B,U,G,$){super(k,B,U,G),this.buttons=[],this.renderTexture=null,this.background=null,this.renderImage=null,this.page=0,this.disableModeSet=!1,this._shouldClose=!1,this._currentInterfaceName="",F.Aq$.isDefined(j.q.instance.prodigy.notifications)&&j.q.instance.prodigy.notifications.clearNotifications(),this.renderTexture=$,this.background=j.q.instance.prodigy.create.element(this),this.renderTexture.clear(),this.renderImage=this.add(j.q.instance.prodigy.create.image(0,0,void 0,void 0,this.renderTexture)),this.renderImage.inputEnabled=!0}set currentInterfaceName(k){this._currentInterfaceName=k}get currentInterfaceName(){return this._currentInterfaceName}create(){j.q.instance.prodigy.open.setActiveRenderMenu(this),this.process(),this.game.broadcaster.broadcast($.pm.StopPlayer)}setMode(k){if(F.Aq$.isDefined(this.buttons))for(let B=0;B0&&(st=3*W.length+6),F.Aq$.isDefined(z)&&F.Aq$.isDefined(z.banner)&&(et=z.banner.frameName,it={atlasID:z.banner.atlasID},st=z.banner.width),F.Aq$.isDefined(W)&&W.length>0)j.q.instance.prodigy.create.panel(Z,40,40,st,2,et,it);else if(F.Aq$.isDefined(K)){const k=j.q.instance.prodigy.create.panel(Z,40,40,18,2,et);j.q.instance.prodigy.create.font(k,200,15,K,{size:36,fontID:9})}let nt={x:-40,y:-10};if(F.Aq$.isDefined(z)&&F.Aq$.isDefined(z.closeButton)?(J=z.closeButton.key,tt=z.closeButton.frameName,nt=z.closeButton.offset):(J=G._.General_icons_json,tt="close"),j.q.instance.prodigy.create.button(this,Z.x+40*k+nt.x,Z.y+nt.y,J,tt,(()=>{j.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:V.k.X,interfaceName:this.currentInterfaceName,interfaceType:H.Wm.Menu}),this.close()})),this.buttons=[],F.Aq$.isDefined(W)&&W.length>0){let k={x:0,y:0},B={x:0,y:0},U=120;F.Aq$.isDefined(z)&&F.Aq$.isDefined(z.buttons)&&(k=z.buttons.offset,B=z.buttons.iconOffset,U=null!==(X=z.buttons.spacing)&&void 0!==X?X:U),F.Aq$.isDefined($)&&!Q&&(Z.add(j.q.instance.prodigy.create.sprite(B.x+80,-10,G._.General_icons_json,"menu-crest")),""===$||Y||j.q.instance.prodigy.create.font(Z,B.x+80,70,$,{width:140,align:"center"}));for(let F=0;F{"use strict";U.d(B,{k:()=>V});var F=U(62459),G=U(88022),j=U(35120),$=U(92150),H=U(34829);class V extends $._{get isLoaded(){return!this._loadingAsset}constructor(k,B,U,$,V,W=null,q,K,z,Y){let Q=G._.General_core_json,X="empty";const Z=j.q.instance.prodigy.load.isFileLoaded($);Z?(Q=$,X=V):Y&&(X="icon-loading"),super(k,B,U,Q,X),this.forcedWidth=K,this.forcedHeight=z,this.onTextureLoaded=q,this.loadingTween=null;let J=!1;Z?(this.checkSpriteDimension(),J=!0,F.Aq$.isDefined(W)&&this.anchor.set(W.x,W.y)):(F.Aq$.isDefined(Y)&&Y&&(this.anchor.set(.5,.5),this.x+=40,this.y+=40,this.loadingTween=this.game.add.tween(this,this).to({angle:360},2e3,F.GS3.Linear.None,!0,0,H.s.MAX_SAFE_INTEGER,!1)),this.checkSpriteDimension(),this._loadingAsset={source:$,frame:V},j.q.instance.prodigy.load.assets($,this.onSourceAssetLoaded.bind(this,B,U,$,V,W))),J&&this.checkCallback()}setActive(k){this.tint=k?16777215:5789784}loadNewTexture(k,B,U=null,$=!1){F.Aq$.isDefined(this.loadingTween)&&(j.q.instance.game.tweens.remove(this.loadingTween),this.loadingTween=null,this.anchor.set(0,0),this.x-=40,this.y-=40,this.angle=0),this._loadingAsset={source:k,frame:B},this._updateFrame=null,j.q.instance.prodigy.load.isFileLoaded(k)?this.onSourceAssetLoaded(this.x,this.y,k,B,U):($?(this.loadTexture(G._.General_core_json,"icon-loading"),this.anchor.set(.5,.5),this.x+=40,this.y+=40,this.loadingTween=this.game.add.tween(this,this).to({angle:360},2e3,F.GS3.Linear.None,!0,0,H.s.MAX_SAFE_INTEGER,!1)):this.loadTexture(G._.General_core_json,"empty"),j.q.instance.prodigy.load.assets(k,this.onSourceAssetLoaded.bind(this,this.x,this.y,k,B,U)))}checkSpriteDimension(){F.Aq$.isDefined(this.forcedWidth)&&(this.width=this.forcedWidth),F.Aq$.isDefined(this.forcedHeight)&&(this.height=this.forcedHeight)}rotateMiddleBased(k){this.middleRotatedAngle=k,this.anchor.set(.5,.5),this.angle=this.middleRotatedAngle}onSourceAssetLoaded(k,B,U,G,$=null){var H;if(this.game&&this.exists&&this._loadingAsset&&this._loadingAsset.source===U&&this._loadingAsset.frame===G){if(F.Aq$.isDefined(this.loadingTween)&&(j.q.instance.game.tweens.remove(this.loadingTween),this.loadingTween=null,this.anchor.set(0,0),this.x-=40,this.y-=40,this.angle=0),this.key=U,null!==this.key){let k=null!==(H=this._updateFrame)&&void 0!==H?H:G;0===U.indexOf("icon-")&&(k=void 0),this.loadTexture(U,k)}this._loadingAsset=null,this._updateFrame=null,this.cameraOffset=new F.I9Y(k,B),F.Aq$.isDefined(this.middleRotatedAngle)?this.rotateMiddleBased(this.middleRotatedAngle):F.Aq$.isDefined($)&&this.anchor.set($.x,$.y),this.checkSpriteDimension(),this.checkCallback()}}updateFrame(k){this.isLoaded?super.updateFrame(k):this._updateFrame=k}checkCallback(){var k;null===(k=this.onTextureLoaded)||void 0===k||k.call(this,this)}destroy(){this.onTextureLoaded=null,j.q.instance.game.tweens.remove(this.loadingTween),this.loadingTween=null,super.destroy()}}V.DESTROYED="_destroyed"},8096:(k,B,U)=>{"use strict";U.d(B,{a:()=>J});var F,G=U(62459),j=U(88022),$=U(35120),H=U(60881),V=U(98013),W=U(17425),q=U(8674),K=U(49237),z=U(43531),Y=U(16847);!function(k){k.Default="default",k.NoPortrait="noPortrait",k.NoCancel="noCancel"}(F||(F={}));let Q=class extends G.uAl{constructor(){super(...arguments),this.rootObject=null,this.faceContainer=null,this.nameBackground=null,this.textName=null,this.textBody=null,this.noPortraitTextBody=null,this._cancelButton=null,this.nextButton=null,this.followButton=null,this.wearButton=null,this.startButton=null,this.shopButton=null,this.spinButton=null,this.yesButton=null,this.stayButton=null,this.leaveButton=null,this.keepButton=null,this.changeButton=null,this.currencyButton=null,this.goNowButton=null,this.notNowButton=null,this.iconImageContainer=null,this.currencyDisplay=null,this.infoTextContainer=null,this.confirmButton=null,this.noCancelTextBody=null,this.textBoxMode=F.Default}get cancelButton(){return this._cancelButton}initializeComponents(k){switch(this.followButton.GameObject.active=!1,this.wearButton.GameObject.active=!1,this.startButton.GameObject.active=!1,this.shopButton.GameObject.active=!1,this.spinButton.GameObject.active=!1,this.yesButton.GameObject.active=!1,this.leaveButton.GameObject.active=!1,this.stayButton.GameObject.active=!1,this.changeButton.GameObject.active=!1,this.keepButton.GameObject.active=!1,this.currencyButton.GameObject.active=!1,this._cancelButton.GameObject.active=!1,this.iconImageContainer.GameObject.active=!1,this.infoTextContainer.active=!1,this.textBoxMode=F.Default,this.currencyDisplay&&(this.currencyDisplay.GameObject.active=!1),k){case z.fA.EQUIP:this.confirmButton=this.wearButton;break;case z.fA.START:this.confirmButton=this.startButton;break;case z.fA.STORE:this.confirmButton=this.shopButton;break;case z.fA.WHEEL:this.confirmButton=this.spinButton;break;case z.fA.FOLLOW:this.confirmButton=this.followButton;break;case z.fA.LEAVE:this.confirmButton=this.leaveButton,this._cancelButton=this.stayButton;break;case z.fA.CHANGE:this.confirmButton=this.changeButton,this._cancelButton=this.keepButton;break;case z.fA.CURRENCY:this.confirmButton=this.currencyButton,this._cancelButton=this.stayButton;break;default:this.confirmButton=this.yesButton}}setWindowPosition(k){G.Aq$.isDefined(k)&&(k===z.DG.Bottom?this.rootObject.transform.setPositionY($.q.instance.game.height):k===z.DG.Middle?this.rootObject.transform.setPositionY(555):this.rootObject.transform.setPositionY(236))}setNameWithKey(k){this.textName.text=k,this.textName.TextObject.visible=!0,this.nameBackground.active=!0}setTextBoxMode(k,B=!1){B&&this.textBoxMode!==F.Default||(this.textBoxMode=k,this.textBody.GameObject.active=k===F.Default,this.noPortraitTextBody.GameObject.active=k===F.NoPortrait,this.noCancelTextBody.GameObject.active=k===F.NoCancel,k===F.NoPortrait?this.noPortraitTextBody.text=this.textBody.text:k===F.NoCancel&&(this.noCancelTextBody.text=this.textBody.text))}setItemIcon(k,B){this.iconImageContainer.updateAsset(k,B),this.iconImageContainer.GameObject.active=!0}setCurrency(k){G.Aq$.isDefined(this.currencyDisplay)&&(this.currencyDisplay.GameObject.active=G.Aq$.isDefined(k),this.currencyDisplay.GameObject.active&&this.currencyDisplay.updateCurrencyID(k))}setInfoTextContainer(k){this.infoTextContainer.active=k}};(0,q.Cg)([(0,G.ERr)(),(0,q.Sn)("design:type",G._mx)],Q.prototype,"rootObject",void 0),(0,q.Cg)([(0,G.MnK)(G.y4o),(0,q.Sn)("design:type",G.y4o)],Q.prototype,"faceContainer",void 0),(0,q.Cg)([(0,G.ERr)(),(0,q.Sn)("design:type",G._mx)],Q.prototype,"nameBackground",void 0),(0,q.Cg)([(0,G.MnK)(G.EYj),(0,q.Sn)("design:type",G.EYj)],Q.prototype,"textName",void 0),(0,q.Cg)([(0,G.MnK)(G.EYj),(0,q.Sn)("design:type",G.EYj)],Q.prototype,"textBody",void 0),(0,q.Cg)([(0,G.MnK)(G.EYj),(0,q.Sn)("design:type",G.EYj)],Q.prototype,"noPortraitTextBody",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"_cancelButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"nextButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"followButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"wearButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"startButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"shopButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"spinButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"yesButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"stayButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"leaveButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"keepButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"changeButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"currencyButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"goNowButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"notNowButton",void 0),(0,q.Cg)([(0,G.MnK)(G.vYh),(0,q.Sn)("design:type",G.vYh)],Q.prototype,"iconImageContainer",void 0),(0,q.Cg)([(0,G.MnK)(Y.n),(0,q.Sn)("design:type",Y.n)],Q.prototype,"currencyDisplay",void 0),(0,q.Cg)([(0,G.ERr)(),(0,q.Sn)("design:type",G._mx)],Q.prototype,"infoTextContainer",void 0),(0,q.Cg)([(0,G.MnK)(G.EYj),(0,q.Sn)("design:type",G.EYj)],Q.prototype,"noCancelTextBody",void 0),Q=(0,q.Cg)([(0,G.EVk)("CharacterDialoguePrefab")],Q);var X,Z=U(82680);!function(k){k[k.None=1]="None",k[k.Yes=2]="Yes",k[k.No=4]="No",k[k.Next=8]="Next"}(X||(X={}));class J extends Z.W{constructor(k,B,U,F,G){super(k,B,70,{},G.concat([j._.Ui_dialogues_json,j._.Ui_buttons_json])),this.dialogueConfig={},this.nextEvent=null,this.currentSound=null,this.dialogueContainer=null,this.confirmCallback=null,this.cancelCallback=null,this.prefabObj=null,this.prefabComponent=null,this.game=k,this.dialogueConfig=U,this.nextEvent=F,this.isModal=!1}create(){super.create();const k=$.q.instance.prodigy.gameContainer.get("d0e-64fd");this.prefabObj=k.load(1,void 0,this.getInjectionData(this.dialogueConfig.dialogueData)),this.dialogueContainer.addChild(this.prefabObj.findComponent(G.y4o).getRootContainer()),this.prefabComponent=this.prefabObj.findComponentInChildren(Q),this.prefabComponent.initializeComponents(this.dialogueConfig.type),this.prefabComponent.nextButton.onClick.add(this.dialogueCallback.bind(this)),setTimeout((()=>{this.game.input.enabled=!0,this.game.input.reset();for(let k=0;k"INFO_TEXT"===k.injectionName)))||void 0===B?void 0:B.data)&&this.prefabComponent.setInfoTextContainer(!0),j.avatar.dimmed&&(q.tint=4605510),j.avatar.silhouetted&&(q.tint=0),this.prefabComponent.setCurrency(null===(U=j.currencyButton)||void 0===U?void 0:U.currencyId),""!==j.avatar.atlas||G.Aq$.isDefined(j.nameKey)?this.prefabComponent.setTextBoxMode(F.Default):this.prefabComponent.setTextBoxMode(F.NoPortrait)}if(G.Aq$.isDefined(this.dialogueConfig.text)&&(this.prefabComponent.textBody.text=this.dialogueConfig.text),G.Aq$.isDefined(this.dialogueConfig.blockInput)&&this.dialogueConfig.blockInput?this.setButtonVisibility(X.Next):(this.background.visible=!1,this.setButtonVisibility(X.None)),(G.Aq$.isDefined(this.dialogueConfig.yes)||G.Aq$.isDefined(this.dialogueConfig.no))&&this.setButtonVisibility(X.Yes|X.No),this.dialogueConfig.hideNext&&(this.prefabComponent.nextButton.GameObject.active=!1),!1===this.dialogueConfig.isCancelButtonVisible&&(this.prefabComponent.cancelButton.GameObject.active=!1),G.Aq$.isDefined(this.dialogueConfig.nextButtonText)){this.prefabComponent.nextButton.GameObject.findComponentsInChildren(G.EYj).forEach((k=>{k.text=this.dialogueConfig.nextButtonText}))}if(G.Aq$.isDefined(this.dialogueConfig.yesButtonText)){this.prefabComponent.confirmButton.GameObject.findComponentsInChildren(G.EYj).forEach((k=>{k.text=this.dialogueConfig.yesButtonText}))}if(G.Aq$.isDefined(this.dialogueConfig.noButtonText)){this.prefabComponent.cancelButton.GameObject.findComponentsInChildren(G.EYj).forEach((k=>{k.text=this.dialogueConfig.noButtonText}))}this.prefabComponent.cancelButton.GameObject.active||this.prefabComponent.setTextBoxMode(F.NoCancel,!0);const W=this.game.input.keyboard.addKey(H.D.ENTER);this.prefabComponent.nextButton.GameObject.active?W.onDown.add(this.onEnterKey,this):W.onDown.remove(this.onEnterKey,this)}setButtonVisibility(k){this.prefabComponent.confirmButton.GameObject.active=(k&X.Yes)===X.Yes,this.prefabComponent.cancelButton.GameObject.active=(k&X.No)===X.No,this.prefabComponent.nextButton.GameObject.active=(k&X.Next)===X.Next}updateSchema(k,B){if(G.Aq$.isDefined(this.game))if(this.dialogueConfig=k,this.prefabComponent.confirmButton.onClick.removeAll(),this.prefabComponent.cancelButton.onClick.removeAll(),this.prefabComponent.nextButton.onClick.removeAll(),this.prefabComponent.initializeComponents(this.dialogueConfig.type),this.prefabComponent.nextButton.onClick.add(this.dialogueCallback.bind(this)),B.length>0){for(let k=0;k-1&&W.K.cacheAsset(this.game,U,W.K.zoneAssetsCached)}$.q.instance.prodigy.load.assets(B,this.renderDialogue.bind(this))}else this.renderDialogue()}onEnterKey(){this.dialogueCallback(null)}dialogueCallback(k){$.q.instance.prodigy.audio.playSFX(18,"pop");let B=null;G.Aq$.isDefined(k)&&(this.nextEvent&&this.dialogueConfig.preserveNextEvent&&(B=this.nextEvent),k()),this.nextEvent?this.nextEvent():B?B():G.VyI.log("Dialogue callback nextEvent not found.",G.$bb.Warning)}stopSound(){G.Aq$.isDefined(this.currentSound)&&(this.currentSound.stop(),this.currentSound.destroy())}close(){if(this.stopSound(),this.currentSound=null,this.prefabComponent&&(this.prefabComponent.nextButton.onClick.dispose(),this.prefabComponent.confirmButton.onClick.dispose(),this.prefabComponent.cancelButton.onClick.dispose(),this.prefabComponent=null,this.prefabObj.destroy()),this.nextEvent=null,this.dialogueContainer=null,this.confirmCallback=null,this.cancelCallback=null,this.prefabObj=null,this.game){this.game.input.keyboard.addKey(H.D.ENTER).onDown.remove(this.onEnterKey,this)}super.close()}}J.FACE_X=0,J.FACE_Y=198},95057:(k,B,U)=>{"use strict";var F;U.d(B,{R:()=>F}),function(k){k.Alternative="alternative",k.BattlePass="treasure-track",k.BattlePassUpsell="TT-Upsell",k.Contextual="contextual-ad",k.DynamicMemberPrompt="dynamicMemberPrompt",k.Modal="modal",k.Mythics21Q4="mythics21Q4",k.None="",k.Pet="pet",k.PostBattleBanner="post-battle-banner",k.Static="static",k.UnifiedConversionFlow="unified-upsell",k.Video="video"}(F||(F={}))},11117:(k,B,U)=>{"use strict";U.d(B,{R:()=>at});var F=U(62459),G=U(95891),j=U(88022),$=U(35120),H=U(29738),V=U(35757),W=U(77938),q=U(75017),K=U(65050),z=U(41674),Y=U(15485),Q=U(46784),X=U(76945),Z=U(30226),J=U(21418),tt=U(48951),et=U(95057),it=U(86050),st=U(82680);class nt extends st.W{constructor(k,B,U,F,G,j,H=0){super(k,B,U,G,j),this.currentPageNum=-1,this.pageSets=[],this.pages=[],this.buttonCallbacks={},this.firstPage=0,this.firstPage=H,this.pageSets=F,this.segment=$.q.instance.prodigy.gameContainer.get("c47-20b6")}preprocess(){this.queuePostCreateCallback(this.setCallbacks.bind(this),this.setup.bind(this))}setup(){this.pages=[];for(let k=0;k=0&&B.push(F)}return B.length<1&&F.VyI.log(`Could not find any templates with prefix ${k}`,F.$bb.Verbose),B}setCallbacks(){F.Aq$.isDefined(this.leftArrowButton)&&(this.leftArrowButton.onClickCallback=this.prevPage.bind(this)),F.Aq$.isDefined(this.rightArrowButton)&&(this.rightArrowButton.onClickCallback=this.nextPage.bind(this))}nextPage(){this.setPage(this.currentPageNum+1)}prevPage(){this.setPage(this.currentPageNum-1)}setPage(k){var B;const U=F.cj9.clamp(k,0,this.pages.length-1);U!==this.currentPageNum&&(F.Aq$.isDefined(this.page)&&(this.page[this.pageName].destroy(),this.page=null),this.currentPageNum=U,F.Aq$.isDefined(this.leftArrowButton)&&(this.leftArrowButton.visible=this.currentPageNum>0),F.Aq$.isDefined(this.rightArrowButton)&&(this.rightArrowButton.visible=this.currentPageNum{$.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelQuit("Click-Membership","Close-Clicked"),this.fireButtonEvent({buttonName:Y.k.X,interfaceType:z.Wm.InfoPanel}),this.fireInterfaceEvent({interfaceType:z.Wm.InfoPanel,originType:z.$N.ButtonClick,originID:Y.k.X,closeMethod:z.Lv.X}),this.close()},Z.J.shouldSuppressAd(k)?this.buttonCallbacks.signUpButton=this.buttonCallbacks.closeButton:this.buttonCallbacks.signUpButton=this.onMembershipButtonClick.bind(this,F.Aq$.isDefined(this.sourceOverride)?this.sourceOverride:"MemberButton"),super.setCallbacks()}shouldShowSignupButton(k=!1){const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=$.q.instance.prodigy.gameContainer.get("db5-fb6e"),F=U.meetsRequirementsDeprecated(17)&&!U.meetsRequirementsDeprecated(15);return!B.hasMembership()||k&&F}loadAds(){if(this.availableIndices=this.getFilteredIconArray().map(((k,B)=>B)),F.Aq$.isDefined(this.promotedAd))for(let k=0;k{$.q.instance.prodigy.audio.playVoice(U.tag,null,U.s,U.d)}))}}onMembershipButtonClick(k){const B=$.q.instance.prodigy.gameContainer;this.shouldShowSignupButton(!0)&&(F.Aq$.isDefined(this.analyticEvents)&&(this.fireButtonEvent({buttonName:Y.k.BecomeAMember,interfaceType:z.Wm.InfoPanel}),this.fireInterfaceEvent({interfaceName:Q.B.MembershipParentAd,interfaceType:z.Wm.InfoPanel,originType:z.$N.ButtonClick,originID:Y.k.BecomeAMember})),B.get("c47-20b6").purchase.sendFunnelStep("Click-Membership"),$.q.instance.prodigy.audio.stopVoice(),$.q.instance.prodigy.open.membershipParent(this.promotedAd,this.analyticEvents,this.isUpgradePath))}onPageLoaded(){if(super.onPageLoaded(),this.hideSignup&&F.Aq$.isDefined(this.page.signUpButton)&&(this.page.signUpButton.visible=!1),"playAtHome"===this.pageName||"playMemberAtHome"===this.pageName?F.Aq$.isDefined(this.promotedAd)&&this.page[this.pageName].children[5].setText(this.getFlavourText()):"amazingThings0"===this.pageName?this.renderFeatureIcons(0,this.page[this.pageName].children[4]):"amazingThings1"===this.pageName?(this.renderFeatureIcons(3,this.page[this.pageName].children[4]),this.renderFeatureIcons(6,this.page[this.pageName].children[5])):"amazingThings2"===this.pageName&&(this.renderFeatureIcons(9,this.page[this.pageName].children[4]),this.renderFeatureIcons(12,this.page[this.pageName].children[5])),"amazingThings0"===this.pageName){const k=this.page[this.pageName].children[3];this.generateGearIcons(6,k)}if("memberLockedPets"===this.pageName&&F.Aq$.isDefined(this.spineMonsterConfig)){new tt.c(this.game).createUIElements([this.spineMonsterConfig],this.page.spineBG)}$.q.instance.prodigy.audio.stopVoice()}generateGearIcons(k,B){let U=null;const F=[{category:"boots",count:0},{category:"hat",count:0},{category:"outfit",count:0},{category:"weapon",count:0}],j=[];for(let $=0;${"use strict";U.d(B,{v:()=>Z});var F=U(62459),G=U(88022),j=U(51742),$=U(35120),H=U(60881),V=U(11682),W=U(65050),q=U(41674),K=U(15485),z=U(46784),Y=U(95057),Q=U(29281),X=U(82680);class Z extends X.W{get prefabGameObject(){return this._prefabGameObject}constructor(k,B,U,$,H,V,W=!1){super(k,B,200,{},[G._.Ui_buttons_json,G._.Ui_shared_json,j.c.Sfx_store_equip,j.c.Sfx_store_purchase,G._.Ui_member_jar_json]),this.prefabRoot=null,this._prefabComponent=null,this._youtubeVideoComponent=null,this._isVideoLoaded=!1,this._isPlayerError=!1,this._minThresholdReached=-1,this._showUpgrade=!1,this._youtubeID=V,this._analyticSource=U,this._analyticEvents=F.Aq$.isDefined(H)?H:{conversionFunnelName:"",conversionFunnelMetadata:""},this._analyticEvents.conversionStaticOrVideo=void 0===this._analyticEvents.conversionStaticOrVideo||""===this._analyticEvents.conversionStaticOrVideo?Y.R.Video:this._analyticEvents.conversionStaticOrVideo,this._showUpgrade=W,this.currentInterfaceName=z.B.MembershipYouTubeAd,this.setCloseCallback($)}create(){var k;super.create();const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=$.q.instance.prodigy.gameContainer.get("d0e-64fd");this._prefabGameObject=U.load(Z.MEMBERSHIP_YOUTUBE_AD_PREFAB),this.prefabRoot.addChild(this._prefabGameObject.legacyTransform.group),this._prefabComponent=this._prefabGameObject.findComponentInChildren(Q.X),this._prefabComponent.closeButton.onClick.add(this.closeClicked,this),this._prefabComponent.memberButton.onClick.add(this.memberClicked,this),B.hasMembership()&&(this._prefabComponent.memberButton.GameObject.active=this._showUpgrade),this._youtubeVideoComponent=this._prefabComponent.ytVideo,this._youtubeVideoComponent.onPlayerReady.add(this.playerReadyHandler,this),this._youtubeVideoComponent.onPlayerError.add(this.playerErrorHandler,this),this._youtubeVideoComponent.onPlayerStateChange.add(this.playerStateChangeHandler,this),(null===(k=this._youtubeID)||void 0===k?void 0:k.length)>0&&this._youtubeVideoComponent.applyVideoURL(this._youtubeID),B.updateMembershipVideoAdData(this._youtubeID),this.fireInterfaceEvent({interfaceType:q.Wm.InfoPanel,originID:this._analyticSource,originType:q.$N.ButtonClick,instanceType:W.N.Interface})}playerReadyHandler(){this._isVideoLoaded=!0,this._minThresholdReached=0;this.game.input.keyboard.addKey(H.D.SPACEBAR).onDown.add(this.onKeyDown,this),this.visible||this.setYTVideoActive(!1)}onKeyDown(){if(this._youtubeVideoComponent&&this._youtubeVideoComponent.getPlayerState()===V.w.Playing){this._youtubeVideoComponent.stopVideo(!1);this.game.input.keyboard.addKey(H.D.SPACEBAR).onDown.remove(this.onKeyDown,this)}}playerErrorHandler(){this._isPlayerError=!0}playerStateChangeHandler(){this._youtubeVideoComponent&&this._youtubeVideoComponent.getPlayerState()===V.w.Playing&&!this.visible&&this._youtubeVideoComponent.stopVideo(!0)}closeClicked(){this._segment.purchase.sendFunnelQuit("Click-Membership","Close-Clicked"),this.fireButtonEvent({buttonName:K.k.X,interfaceType:q.Wm.InfoPanel}),this.fireInterfaceEvent({interfaceType:q.Wm.InfoPanel,originType:q.$N.ButtonClick,originID:K.k.X,closeMethod:q.Lv.X},{duration:this._minThresholdReached.toString()}),this.close()}memberClicked(){const k=$.q.instance.prodigy.gameContainer,B=k.get("e20-0fb0").player;B.hasMembership()&&!B.hasLegacyMembership()||(k.get("c47-20b6").purchase.sendFunnelStep("Click-Membership"),this.fireButtonEvent({buttonName:K.k.BecomeAMember,interfaceType:q.Wm.InfoPanel}),$.q.instance.prodigy.audio.stopVoice(),$.q.instance.prodigy.open.membershipParent(void 0,this._analyticEvents,this._showUpgrade,void 0,!0))}setActive(k){super.setActive(k),this.setYTVideoActive(k),this._prefabComponent.memberJar.active=k}setYTVideoActive(k){this._youtubeVideoComponent&&(this._youtubeVideoComponent.setVisible(k),k?this._youtubeVideoComponent.playVideo():this._youtubeVideoComponent.stopVideo(!0))}update(){if(super.update(),this._youtubeVideoComponent&&this._minThresholdReached<100)if(this._youtubeVideoComponent.getPlayerState()===V.w.Playing){const k=this._youtubeVideoComponent.getPercentPlayed();k>this._minThresholdReached&&(this._minThresholdReached=k)}else this._youtubeVideoComponent.getPlayerState()===V.w.Ended&&(this._minThresholdReached=100)}destroy(){this.game.input.keyboard.addKey(H.D.SPACEBAR).onDown.remove(this.onKeyDown,this),this._prefabComponent&&(this._prefabComponent.closeButton.onClick.dispose(),this._prefabComponent.memberButton.onClick.dispose()),this._prefabGameObject&&this._prefabGameObject.destroy(),this._youtubeVideoComponent&&(this._youtubeVideoComponent.onPlayerReady.dispose(),this._youtubeVideoComponent.onPlayerError.dispose(),this._youtubeVideoComponent.onPlayerStateChange.dispose(),this._youtubeVideoComponent.destroy()),this._prefabGameObject=null,this._prefabComponent=null,this._youtubeVideoComponent=null,super.destroy()}}Z.MEMBERSHIP_YOUTUBE_AD_PREFAB=134},29281:(k,B,U)=>{"use strict";U.d(B,{X:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(11682);let H=class extends G.uAl{constructor(){super(...arguments),this.closeButton=null,this.memberButton=null,this.memberButtonDownText=null,this.memberButtonOverText=null,this.memberButtonUpText=null,this.titleText=null,this.ytVideo=null,this.memberJar=null}};(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],H.prototype,"closeButton",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],H.prototype,"memberButton",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],H.prototype,"memberButtonDownText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],H.prototype,"memberButtonOverText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],H.prototype,"memberButtonUpText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],H.prototype,"titleText",void 0),(0,F.Cg)([(0,G.MnK)($.H),(0,F.Sn)("design:type",$.H)],H.prototype,"ytVideo",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],H.prototype,"memberJar",void 0),H=(0,F.Cg)([(0,G.EVk)("MembershipYouTubeAdPrefab")],H)},82680:(k,B,U)=>{"use strict";U.d(B,{W:()=>J});var F=U(62459),G=U(95891),j=U.n(G),$=U(88022),H=U(35120),V=U(77938),W=U(52491),q=U(73797),K=U(65050),z=U(41674),Y=U(85515),Q=U(28962),X=U(95130),Z=U(48951);class J extends X.D{get isModalWithTransparency(){return this._isModalWithTransparency}get onCreate(){return this._onCreate}set pendingClose(k){this._pendingClose=k}set currentInterfaceName(k){this._currentInterfaceName=k}constructor(k,B,U=null,G,j=[]){super(k,B),this.isModal=!0,this.isFullScreenUI=!1,this.isLoaded=!1,this.assetID=null,this.isNotificationCell=!1,this.skipStopPlayer=!1,this.skipSetActiveMenuOnClose=!1,this.skipRenderTransparencyLayer=!1,this.background=null,this.uiElementTemplates=[],this._isModalWithTransparency=!1,this.onClose=null,this.uiElements=[],this.uiRoot=null,this.configModifiers=null,this.onLoadCallbacks=[],this.configObj=null,this._onCreate=new F.HN0,this._pendingClose=!1,this._currentInterfaceName="",this._pendingInputReenable=!1,this._segment=H.q.instance.prodigy.gameContainer.get("c47-20b6"),F.Aq$.isDefined(H.q.instance.prodigy.notifications)&&H.q.instance.prodigy.notifications.clearNotifications(),this.background=H.q.instance.prodigy.create.element(this),this.configModifiers=F.Aq$.isDefined(G)?G:{},F.Aq$.isDefined(this.configModifiers.isModal)&&(this.isModal=this.configModifiers.isModal),F.Aq$.isDefined(U)&&(this.assetID=U),F.Aq$.isDefined(this.assetID)?(H.q.instance.game.input.enabled=!1,this._pendingInputReenable=!0,this.startLoad(j.concat($._.Font_ui_json),this.startLoadComplete.bind(this))):F.VyI.log("Config file for this UI has not been specified",F.$bb.Error),this.onLoadCallbacks=[]}init(k){k.addChild(this),this.process()}close(){H.q.instance.game&&H.q.instance.prodigy&&!this.skipSetActiveMenuOnClose&&H.q.instance.prodigy.open.setMenuInactive(this);try{F.Aq$.isDefined(this.onClose)&&this.onClose.apply(this)}catch(e){F.VyI.log(`Error in Menu Callback: ${e}`,F.$bb.Error)}F.Aq$.isDefined(H.q.instance.game)&&(this._pendingInputReenable&&(this._pendingInputReenable=!1,H.q.instance.game.input.enabled=!0),H.q.instance.prodigy.open.close(this)),this.isFullScreenUI&&this.setGameRenderState(!0),this.destroy()}processConfigObj(){if(F.Aq$.isDefined(this.assetID)&&(this.configObj=j().cloneDeep(V.t.getItem("ui",this.assetID).data)),F.Aq$.isDefined(this.configModifiers)&&F.Aq$.isDefined(this.configObj.elements)){if(F.Aq$.isDefined(this.configModifiers.modifyProperty))for(let k=0;k{"function"==typeof k&&k()})),this.onLoadCallbacks=[]}startLoadComplete(){this.isLoaded=!0}startLoad(k,B){H.q.instance.prodigy.load.assets(k,B)}createUIElements(k,B){const U=new Z.c(H.q.instance.game);F.Aq$.isDefined(k.elements)&&(this.uiRoot=new X.D(H.q.instance.game,B),this.uiRoot.populate({type:"UIElement",width:B.width,height:B.height}),this.uiElements=U.createUIElements(k.elements,this.uiRoot)),F.Aq$.isDefined(k.templates)&&(this.uiElementTemplates=k.templates)}getInjectedValue(k){return H.q.instance.prodigy.gameContainer.get(k)}setElementAsModal(k){this._isModalWithTransparency=k,H.q.instance.prodigy.open.bitmapCacheGameRender(k,this)}destroy(k){this._onCreate.dispose(),this.uiElements.length=0,super.destroy(k)}addInterfaceEventCommonProperties(k){var B,U;return null!==(B=k.interfaceName)&&void 0!==B||(k.interfaceName=this._currentInterfaceName),null!==(U=k.interfaceType)&&void 0!==U||(k.interfaceType=z.Wm.Menu),k}fireInterfaceEvent(k,B){const U=Object.assign({instanceType:K.N.Interface},this.addInterfaceEventCommonProperties(k));this._segment.featureCommon.sendInterfaceEvent(U,B)}fireButtonEvent(k,B){const U=Object.assign(Object.assign({},this.addInterfaceEventCommonProperties(k)),{saveClickInfo:k.buttonName});this._segment.featureCommon.sendButtonEvent(U,B)}fireTabEvent(k,B){this._segment.featureCommon.sendTabEvent(this.addInterfaceEventCommonProperties(k),B)}}},91315:(k,B,U)=>{"use strict";U.d(B,{p:()=>H});var F=U(62459),G=U(88022),j=U(35120),$=U(82680);class H extends $.W{constructor(k,B,U,j){super(k,B,F.Aq$.isDefined(U)?U:3,j,[G._.Ui_shared_json,G._.Font_general_json]),this.timer=null,this.contentText=null,this.currentText=null,this.okayButton=null,this.okayText=null,this.yesButton=null,this.noButton=null,this.closeButton=null}preprocess(k,B=null,U=null){let G=B;(!F.Aq$.isDefined(B)||"pumpkin"!==B&&"star-shard-small"!==B&&"snowflake-small"!==B)&&(G=null),this.currentText=k;const j=F.Aq$.isDefined(G)?`[${B}] ${U}`:U;this.updateConfigModifierProperty("titleBanner","text",j),this.updateConfigModifierProperty("titleBanner","visible",F.Aq$.isDefined(U)),this.updateConfigModifierProperty("contentText","text",k),this.queuePostCreateCallback(this.setTimerText.bind(this,k),this.openTween.bind(this))}close(k){F.Aq$.isDefined(this.timer)&&window.clearInterval(this.timer),super.close(),F.Aq$.isDefined(k)&&k()}setOkay(k=null,B){this.okayButton.visible=!0,this.okayText.setText(F.Aq$.isDefined(k)?k:j.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("BUTTON_OKAY_UPPERCASE")),this.okayButton.onClickCallback=()=>{this.close(B)}}setConfirm(k,B){this.yesButton.visible=!0,this.yesButton.onClickCallback=()=>{this.close(k)},this.noButton.visible=!0,this.noButton.onClickCallback=()=>{this.close(B)}}setConfirmGeneric(k,B,U){this.yesButton.visible=!0,this.yesButton.onClickCallback=()=>{this.close(k)},this.noButton.visible=!0,this.noButton.onClickCallback=()=>{this.close(B)},this.closeButton.visible=!0,this.closeButton.onClickCallback=()=>{this.close(U)}}setTimerText(k){F.Aq$.isDefined(this.timer)&&window.clearInterval(this.timer),F.Aq$.isDefined(k)&&this.setText(k,(new Date).getTime())}setText(k,B){if(F.Aq$.isDefined(this.game))if(F.Aq$.isDefined(this.contentText))if(k.indexOf("XTIMERX")>=0){const U=(new Date).getTime(),F=this.processTime(U-B);this.currentText=k,this.contentText.setText(k.replace("XTIMERX",F)),this.timer=window.setTimeout(this.setText.bind(this,k,B),500)}else this.currentText!==k&&(this.currentText=k,this.contentText.setText(k));else F.VyI.log("ERROR: Attempting to set text before finished loading message.",F.$bb.Error)}setCloseButton(k,B=null){this.closeButton.visible=k,this.closeButton.onClickCallback=()=>{this.close(B)}}processTime(k){if(k<=0)return"00:00";const B=Math.floor(k/36e5),U=Math.floor((k-36e5*B)/6e4),F=Math.floor((k-36e5*B-6e4*U)/1e3);let G="",j="",$="";return G=0===B?"00":B<10?`0${B}`:`${B}`,j=0===U?"00":U<10?`0${U}`:`${U}`,$=0===F?"00":F<10?`0${F}`:`${F}`,"00"===G?`${j}:${$}`:B<24?`${G}:${j}:${$}`:`${Math.floor(B/24)} days`}}},21738:(k,B,U)=>{"use strict";U.d(B,{y:()=>V});var F=U(62459),G=U(35120),j=U(71134),$=U(24110),H=U(82680);class V extends H.W{get prefab(){return this._prefab}get prefabContainer(){var k;return null!==(k=this._prefabContainer)&&void 0!==k?k:this._prefab}constructor(k,B,U,G,j=!0,$,H=!1){super(k,B,200,void 0,[]),this.onPrefabLoaded=new F.HN0,this.onClosed=new F.HN0,this._closeCallback=null,this.createContainer=!0,this._closeCallback=G,this.prefabID=U,this._updateGameObject=j,this._injectablePropertiesDictionary=$,this.obeyMenuStackVisibility=H}create(){super.create();const k=[];if(this.createContainer||this._injectablePropertiesDictionary){if(this._prefabContainer=new F._mx,this._prefabContainer.addComponent(F.dLy),this.createContainer){this._prefabContainer.addComponent($.B).getRootContainer().setParent(this)}if(this._injectablePropertiesDictionary){const B=this._prefabContainer.addComponent(F.bE_);for(const U in this._injectablePropertiesDictionary)B.Container.bind(U).toConstantValue(this._injectablePropertiesDictionary[U]),k.push({injectionName:U,data:this._injectablePropertiesDictionary[U]})}}G.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(this.prefabID,this._prefabContainer,void 0,k).then((k=>{var B;this._prefab=k,k.legacyTransform?this.addChild(k.legacyTransform.group):null===(B=this._rearOverlay)||void 0===B||B.destroy(),k.onDestroy.add(this.close,this);const U=k.findComponentInChildren(j.l,!0);U&&U.onClose.add(this.close.bind(this)),this.onPrefabLoaded.dispatch(k)})).catch((k=>{F.VyI.log(`Failed to load prefab menu: ${F.RQr.stringify(k)}`,F.$bb.Error)}))}update(){super.update(),this._updateGameObject&&this.prefabContainer&&!this.prefabContainer.parent&&this.prefabContainer.update()}setActive(k){this.prefabContainer.active!==k&&this.obeyMenuStackVisibility&&(this.prefabContainer.active=k,super.setActive(k))}close(){var k,B,U,F;this._prefab&&(this._prefab.active=!1),null===(k=this._prefab)||void 0===k||k.onDestroy.remove(this.close,this),this._prefabContainer?null===(B=this._prefabContainer)||void 0===B||B.destroyDeferred():null===(U=this._prefab)||void 0===U||U.destroyDeferred(),null===(F=this._closeCallback)||void 0===F||F.call(this),this._closeCallback=null,this.onClosed.dispatch(),this._prefabContainer=null,this._prefab=null,this.onClosed.dispose(),this.onPrefabLoaded.dispose(),super.close()}}},99183:(k,B,U)=>{"use strict";U.d(B,{k:()=>Lt});var F=U(62459),G=U(95891),j=U(88022),$=U(99625),H=U(51742),V=U(65240),W=U(35120),q=U(15521),K=U(91207),z=(U(34829),U(77938)),Y=U(39984),Q=U(55734),X=U(129),Z=U(47223),J=U(95946),tt=U(55122),et=U(73797),it=U(51790),st=U(79512),nt=U(59599),at=U(65050),rt=U(41674),ot=U(98623),ht=U(95057),ct=U(21097),dt=U(30226),lt=U(47255);class ut extends ot.H{constructor(k,B,U,F,G,j){super(k,B),this.levelUp=!1,this.openCallback=null,this.chests=[],this.locked=!1,this.chestOpened=null,this.rewards=null;const $=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(this.openCallback=j,Math.random()>.6&&$.getLevel()>=-5&&U){const k=0===Math.floor(2*Math.random()),B=110;this.chests.push(this.createChest(k?B:-B,F)),this.chests.push(this.createChest(k?-B:B,F.concat(G),!0))}else this.chests.push(this.createChest(0,F));this.rewards=W.q.instance.prodigy.create.element(this,0,0),this.initListeners()}createChest(k,B,U=!1){let F=null,G=null,$=null;F=W.q.instance.prodigy.create.element(this,k,0),G=W.q.instance.prodigy.create.sprite(0,95,j._.General_battle_json,U?"member-chest-bottom":"chest-bottom"),$=W.q.instance.prodigy.create.sprite(0,U?-25:0,j._.General_battle_json,U?"member-chest-closed":"chest-closed"),G.inputEnabled=!0,F.add(G),$.inputEnabled=!0,F.add($);const H={element:F,reward:B,specialChest:U,chestId:U?2:1,box:G,lid:$},V=()=>{this.onDown(H)};return $.events.onInputDown.add(V,this),G.events.onInputDown.add(V,this),H}initListeners(){this.game.broadcaster.addAppListener(et.cN.ShowMemberStars,(()=>{this.game.broadcaster.broadcast(et.hw.MemberStarsDone,this.game,[this.levelUp])}),this),this.onDestroy.add(this.stopListeners,this)}stopListeners(){F.Aq$.isDefined(this.chestOpened)&&F.Aq$.isDefined(this.chestOpened.box)&&this.chestOpened.box.destroy(),this.game.broadcaster.removeAppListener(et.cN.ShowMemberStars,this)}onDown(k){var B,U;if(this.locked)return;const G=W.q.instance.prodigy.gameContainer,j=G.get("e20-0fb0").player;if(this.chestOpened=k,k.specialChest&&!j.hasMembership()){const U={conversionFunnelName:lt.o.FunnelOpenMemberChestBattle},F=dt.J.showYouTubeMembershipAd(this.game,!0)?ht.R.Video:ht.R.Static;return G.get("c47-20b6").purchase.sendFunnelStart({type:"Open-Member-Chest-Battle",category:"Reward",contentId:W.q.instance.prodigy.world.getCurrentZone(),adType:F}),G.get("c47-20b6").container.sendContainerOpenedFailedEvent(rt.ZF.BattleMemberChest,null===(B=k.chestId)||void 0===B?void 0:B.toString(),ct.WE.MemberLocked,at.N.EndOfBattle),void W.q.instance.prodigy.open.membershipInfo(void 0,U)}k.lid.y=-30,k.lid.frameName=k.specialChest?"member-chest-open":"chest-open",this.locked=!0,G.get("c47-20b6").container.sendContainerOpenedEvent(k.specialChest?rt.ZF.BattleMemberChest:rt.ZF.BattleChest,null===(U=k.chestId)||void 0===U?void 0:U.toString(),at.N.EndOfBattle),this.animateIconPopcorn(k),F.Aq$.isDefined(this.openCallback)&&(W.q.instance.prodigy.audio.playSFX(32,k.specialChest?"chestOpenMember":"chestOpen",null,.6),setTimeout((()=>{this.openCallback(k.specialChest)}),2500))}animateIconPopcorn(k){const B=[];for(let U=0;U{this.visible=!0};j.onStart.add($,B[U]),j.to({y:400},600,F.GS3.Quadratic.In),j.start(),this.game.add.tween(B[U],this).to({x:F.cj9.between(-500,500),angle:Math.floor(360*Math.random())},1200,F.GS3.Linear.None).delay(G).to({alpha:0},100,F.GS3.Linear.None).start()}}}var ft=U(43531),bt=U(98998),pt=U(94236);class vt{constructor(k,B,U,F,G){this.currentCreature=k,this.originalCreatureCopy=B,this.menuFactory=U,this.onFinalSummaryClosed=G,this.onPopupCreated=F}launchSummaryPopups(){pt.K.openEvolutionPromptIfEligible(this.currentCreature,this.originalCreatureCopy).then((()=>{const k=this.menuFactory.statSummary(this.currentCreature,this.originalCreatureCopy);k.setOnCreateCallback(this.onPopupCreated),k.setCloseCallback((()=>{const k=this.menuFactory.spellSummary(this.currentCreature,this.originalCreatureCopy);k.setOnCreateCallback(this.onPopupCreated),k.setCloseCallback(this.onFinalSummaryClosed)}))}),F.RQr.createHandler("Failed to show summary screen"))}}var gt,mt=U(15485),yt=U(46784),_t=U(90633),Et=U(17425),wt=U(23748),Tt=U(22023),St=U(57750),At=U(68910),Ct=U(56942),Ot=U(19273),It=U(70123);class Dt{constructor(k,B,U,F,G=1){this._explodeDelayTimer=null,this._glitterDelayTimer=null,this.starComponent=It.j.createRenderer(Ct.Q.Spine_member_star_explode_json,{type:"spine"}),this.starComponent.onLoaded.add((()=>{const k=245*(0===G?1:G);this._explodeDelayTimer=window.setTimeout(W.q.instance.prodigy.audio.playSound.bind(W.q.instance.prodigy.audio,23),k);const B=1633*(0===G?1:G);this._glitterDelayTimer=window.setTimeout(W.q.instance.prodigy.audio.playSound.bind(W.q.instance.prodigy.audio,24),B)})),new Ot._(k,B,[this.starComponent],U,F),0===G||1===G?this.starComponent.playAnimation(Dt.ANIMATION_NAME):this.starComponent.playAnimationWithTimeScale(Dt.ANIMATION_NAME,1/G)}stopAnimation(){var k;null===(k=this.starComponent)||void 0===k||k.setVisibility(!1),window.clearTimeout(this._explodeDelayTimer),window.clearTimeout(this._glitterDelayTimer),this._explodeDelayTimer=null,this._glitterDelayTimer=null}}Dt.ANIMATION_NAME="animation";class Rt extends F.mcf{constructor(k,B){super(),B&&(B.addChild(this),this.zIndex=B.children.length),this.game=k,this.jarBack=W.q.instance.prodigy.create.group(this),this.jarMiddle=W.q.instance.prodigy.create.group(this),this.jarFront=W.q.instance.prodigy.create.group(this),this.spriteParentLoadWrap(0,0,j._.Popup_star_jar_json,"jar-back",this.jarBack),this.spriteParentLoadWrap(0,0,j._.Popup_star_jar_json,"jar-front",this.jarFront),this.cork=this.spriteParentLoadWrap(40,0,j._.Popup_star_jar_json,"cork",this.jarMiddle)}spriteParentLoadWrap(k,B,U,F,G){return W.q.instance.prodigy.create.sprite(k,B,U,F,null,(k=>{G.addChild(k)}))}fillJar(k){if(k>=1){this.jarFillLevel=k;const B=this.getSpriteFillFrame(k);W.q.instance.prodigy.create.sprite(0,0,j._.Popup_star_jar_json,B,null,(k=>{this.jarMiddle.addChildAt(k,0),this.filledStars=k}))}else k<0&&W.q.instance.prodigy.create.sprite(0,0,j._.Popup_star_jar_json,"dust",null,(k=>{this.jarMiddle.addChildAt(k,0)}))}fillJarAnimate(k,B,U=0){if(k>=1&&k!==this.jarFillLevel){this.jarFillLevel=k;const G=this.getSpriteFillFrame(k);W.q.instance.prodigy.create.sprite(0,0,j._.Popup_star_jar_json,G,null,(k=>{this.jarMiddle.addChildAt(k,0);const G=this.game.add.tween(k,this).from({alpha:0},B,F.GS3.Linear.None,!1,U);G.onStart.add((()=>{W.q.instance.prodigy.audio.playSound(22)})),G.onTweenComplete.add((()=>{F.Aq$.isDefined(this.filledStars)&&this.filledStars.destroy(),this.filledStars=k})),G.start()}))}}openJar(){W.q.instance.prodigy.audio.playSound(26);this.game.add.tween(this.cork,this).to({y:this.cork.y-100,alpha:0},1e3,F.GS3.Cubic.Out,!0),this.doStarFlyOutAnimation(),this.doStarFadeAnimation()}doStarFadeAnimation(){let k=0;const B=[this.filledStars];for(k=this.jarFillLevel-1;k>0;k--){const U=W.q.instance.prodigy.create.sprite(0,0,j._.Popup_star_jar_json,`stars-fill-${k}`,null,(k=>{this.jarMiddle.addChildAt(k,0)}));B.push(U)}const U=2500/B.length;let G=0;for(G=0;G=this.DAY?(U=Math.floor(k/this.DAY),B=gt.Day):k>=this.HOUR?(U=Math.floor(k/this.HOUR),B=gt.Hour):k>=this.MINUTE?(U=Math.floor(k/this.MINUTE),B=gt.Minute):(U=Math.floor(k/this.SECOND),B=gt.Second),this.tickCallback(U,B)}}class Mt{constructor(k,B,U=null){this.showingMembership=!1,this._fillMemberJarComplete=!1,this._fadeDisplayComplete=!1,this.game=k,this.parentMenu=B,this.starController=new bt.b,this.openCallback=U,B.onDestroy.add(this.destroy.bind(this))}beginAnimation(k){this.parentMenu.memberSectionContents.alpha=0;let B=2700;const U=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.starController.hasExpired()&&!U.hasMembership()&&this.starController.getNumberOfStoredStars()>0?B=700:setTimeout(this.showMemberStar.bind(this),700),this._fillMemberJarDelayHandler=()=>{this.fillMemberJar(k)},this._fadeDisplayDelayHandler=()=>{this.fadeDisplay(!0)},setTimeout(this._fillMemberJarDelayHandler,B),setTimeout(this._fadeDisplayDelayHandler,B)}forceMemberStarComplete(){var k,B;return!(!this._memberStarAnimation||this._fillMemberJarComplete||this._fadeDisplayComplete)&&(null===(k=this._fillMemberJarDelayHandler)||void 0===k||k.call(this),null===(B=this._fadeDisplayDelayHandler)||void 0===B||B.call(this),this._memberStarAnimation.stopAnimation(),!0)}createMemberStarsGain(){this.parentMenu.memberStarsGot.visible=!0,this.parentMenu.memberStarsGot.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText(this.parentMenu.getTeamSize()>1?"GAINED_MEMBER_STARS_EACH":"GAINED_MEMBER_STARS",this.parentMenu.xpGained.memberXp)),this.parentMenu.starJarTimer.visible=!1,this.parentMenu.wizardLevels.visible=!1,this.parentMenu.wizardLevelsWorth.visible=!1,this.parentMenu.starsInJarLabel.visible=!1,this.parentMenu.bonusStarsButton.visible=!1,setTimeout(this.openCallback.bind(this.parentMenu,this.parentMenu.xpGained.memberXp,!1),1e3)}createExpiredJar(){this.starJar.fillJar(-1),this.parentMenu.starJarTimer.visible=!1,this.parentMenu.bonusStarsButton.visible=!1,this.parentMenu.wizardLevels.visible=!1,this.parentMenu.bottomMemberTitleText.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("JAR_EXPIRED")),this.parentMenu.starsInJarLabel.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("JAR_BECOME_MEMBER")),this.parentMenu.wizardLevelsWorth.visible=!1,this.parentMenu.starsInJarLabel.x+=70,this.starJar.x+=125,this.starJar.y+=10,this.starController.doLoseStars(),setTimeout(this.parentMenu.showCloseButton.bind(this.parentMenu,!0),1500)}createRegularJar(k,B){const U=700,G=1e3;this.starJar.fillJar(this.starController.calculateStarJarTier(this.starController.getNumberOfStoredStars()-B)),this.starJar.fillJarAnimate(this.starController.getStarJarTier(),G,U),this.parentMenu.wizardLevelsValue.setText(k),this.parentMenu.starsInJarValue.setText(this.starController.getNumberOfStoredStars()-B),k<=0?(this.parentMenu.wizardLevels.visible=!1,this.parentMenu.wizardLevelsWorth.visible=!1,this.parentMenu.wizardLevelsValue.visible=!1):1===k&&this.parentMenu.wizardLevels.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("WIZARD_LEVEL"));const j={number:this.starController.getNumberOfStoredStars()-B},$=this.game.add.tween(j,this).to({number:this.starController.getNumberOfStoredStars()},G,F.GS3.Quadratic.Out,!0,U),H=this.parentMenu.starsInJarValue;$.onUpdate.add((()=>{H[St.k.DESTROYED]||H.setText(Math.round(j.number))})),$.onTweenComplete.add((()=>{H[St.k.DESTROYED]||H.setText(j.number)})),this.createCountdownTimer(),this.setupJarClickables();const V=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(this.starController.getNumberOfStoredStars()>0&&V.hasMembership()){const k=800;this.parentMenu.bottomDisplayBlueStar.image.inputEnabled=!1,this.parentMenu.starJarTimer.visible=!1,this.parentMenu.bonusStarsButton.visible=!1,setTimeout(this.openJar.bind(this),1700+k),this.parentMenu.bonusStarsButton.visible=!1}else setTimeout(this.parentMenu.showCloseButton.bind(this.parentMenu,!0),1700);for(let W=0;W{switch(this.parentMenu.jarTimeValue.setText(k.toString()),B){case gt.Day:this.parentMenu.jarTimeLeft.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText(1===k?"COUNTDOWN_DAY_LEFT":"COUNTDOWN_DAYS_LEFT"));break;case gt.Hour:this.parentMenu.jarTimeLeft.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText(1===k?"COUNTDOWN_HOUR_LEFT":"COUNTDOWN_HOURS_LEFT"));break;case gt.Minute:this.parentMenu.jarTimeLeft.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText(1===k?"COUNTDOWN_MINUTE_LEFT":"COUNTDOWN_MINUTES_LEFT"));break;case gt.Second:k>0&&this.parentMenu.jarTimeValue.setText("1"),this.parentMenu.jarTimeLeft.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText(0===k?"COUNTDOWN_MINUTES_LEFT":"COUNTDOWN_MINUTE_LEFT"))}}))}setupJarClickables(){this.parentMenu.bottomDisplayBlueStar.image.inputEnabled=!0,this.parentMenu.bottomDisplayBlueStar.image.events.onInputUp.add(this.onStarJarMembershipClick.bind(this)),this.parentMenu.bonusStarsButton.onUpCallback=this.onStarJarMembershipClick.bind(this)}onStarJarMembershipClick(){if(this.showingMembership)return;this.showingMembership=!0;const k=W.q.instance.prodigy.gameContainer,B={conversionFunnelName:lt.o.FunnelStarJar,conversionStage:"Member-Converted",conversionFunnelMetadata:null},U=dt.J.showYouTubeMembershipAd(this.game,!0)?ht.R.Video:ht.R.Static;k.get("c47-20b6").purchase.sendFunnelStart({type:"NonMember-Star-Jar",category:"Reward",contentId:void 0,adType:U}),this.parentMenu.fireButtonEvent({buttonName:mt.k.BonusStars}),W.q.instance.prodigy.open.membershipInfo((()=>{this.showingMembership=!1;k.get("e20-0fb0").player.hasMembership()&&(this.parentMenu.showCloseButton(!1),this.openJar())}),B)}openJar(){this.parentMenu.bottomDisplayBlueStar.image.inputEnabled=!1,this.parentMenu.starJarTimer.visible=!1,this.parentMenu.bonusStarsButton.visible=!1,this.starJar.openJar(),this.parentMenu.starsInJarLabel.setText("Gained Stars:");const k=this.starController.claimStarJar()/this.parentMenu.getTeamSize(),B=W.q.instance.prodigy.gameContainer.get("c47-20b6");B.playerProgression.sendPlayerProgressionPointsEarnedEvent({pointType:"stars",pointCount:k},{instanceID:B.battle.currentBattleID,instanceType:at.N.EndOfBattle}),setTimeout(this.openCallback.bind(this.parentMenu,k,!0),1e3)}}var Nt=U(73678),xt=U(82680);class Lt extends xt.W{constructor(k,B,U,G,V,q,K,z,Y=[],Q,X=!0){var Z;super(k,B,F.Aq$.isDefined(z)?z:19,Q?Object.assign({modifyProperty:[{element:"resultsTitle",property:"textKey",value:Q},{element:"titleBanner",property:"relativeWidth",value:.6}]},Lt.configModifiers):Lt.configModifiers,[j._.Ui_pvp_seasons_json,j._.Popup_star_jar_json,j._.Ui_education_badges_json,j._.Npc_face_noot_json,H.c.Sfx_results_screen,H.c.Sfx_jar_fill_ancient_game_gift_bundle_positive_open,H.c.Sfx_star_explode_ancient_game_magic_achievement_1,H.c.Sfx_star_appear_ancient_game_star_glitter,H.c.Sfx_jar_open_ancient_game_magic_bubble_open,H.c.Sfx_bar_fill,j._.Ui_battle_revamp_legacy_json].concat(Y)),this.originalCreatures=[],this.summaryPopupControllers=[],this.drops=[],this.memberDrops=[],this.creatureDisplays=[],this.eventQueue=[],this.choseMemberChest=!1,this._timer=null,this._tweenInProgress=null,this.game=k,this.currentCreatures=U,this.xpGained=G,this.drops=V,this.memberDrops=q,this._skipChests=K,this._afterBattle=X,this.currentInterfaceName=yt.B.ResultsMenu,this.currentCreatures&&(this.starController=new bt.b,this.starXP=this.calculateStarXP(null===(Z=this.xpGained)||void 0===Z?void 0:Z.memberXp,null==U?void 0:U.length),this.setupListeners(),this.cloneCreatures(),F.Aq$.isDefined(z)||this.queuePostCreateCallback(this.createCreatureDisplays.bind(this),this.setupUIElements.bind(this),this.buildEventsQueue.bind(this),this.buildCommonEventsQueue.bind(this),this.animateDropIn.bind(this)));W.q.instance.prodigy.gameContainer.get("PrefabService").getPrefabFromGuid($.l.ResultsSkipInteractable);this.fireInterfaceEvent({originType:rt.$N.AutoSurfaced}),this._segment.legacyPostBattleFlow.sendStart()}calculateStarXP(k,B){return Math.ceil(k*B)}getTeamSize(){return this.currentCreatures.length}showCloseButton(k){this.closeButton.visible=k}bottomSectionFadeOutAnimation(k,B=null){if(k&&!k[St.k.DESTROYED]){const U=k.x,G=()=>{k.x=U,this._tweenInProgress=null,F.Aq$.isDefined(B)&&B()};this._tweenInProgress=this.game.add.tween(k,this),this._tweenInProgress.to({x:k.x-50,alpha:0},500,F.GS3.Cubic.Out,!0).onTweenComplete.add(G,this)}else F.VyI.log("bottomSectionFadeOutAnimation no target specified.",F.$bb.Error),F.Aq$.isDefined(B)&&B()}bottomSectionFadeInAnimation(k,B=null){k.visible=!0,k.alpha=1,q.Z.bringToTop(k),this.game.add.tween(k,this).from({x:k.x+50,alpha:0},500,F.GS3.Cubic.Out,!0).onTweenComplete.add((()=>{F.Aq$.isDefined(B)&&B()}),this)}buildCommonEventsQueue(){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=k.hasCompletedTutorial();k.hasMembership()?(this.eventQueue.push(this.createJar.bind(this),this.bottomSectionFadeInAnimation.bind(this,this.bottomDisplayContainerMember)),this._skipChests?this.eventQueue.push(this.showCloseButton.bind(this,!0)):this.eventQueue.push(this.bottomSectionFadeOutAnimation.bind(this,this.bottomDisplayContainerMember,this.runNextEvent.bind(this)),...this.buildChestsEvent(!0,this.drops,this.memberDrops))):!B||dt.J.shouldSuppressAd(k,void 0)?(this._skipChests?dt.J.shouldSuppressAd(k,void 0)&&this.eventQueue.pop():B?this.eventQueue.push(...this.buildChestsEvent(!dt.J.shouldSuppressAd(k,void 0),this.drops,this.memberDrops)):this.eventQueue.push(...this.buildChestsEvent(!1,this.drops,[])),dt.J.shouldSuppressAd(k,void 0)&&this.starController.hasExpired()&&this.eventQueue.push((()=>{this.starController.doLoseStars(),this.runNextEvent()})),this.eventQueue.push(this.showCloseButton.bind(this,!0))):(this._skipChests||this.eventQueue.push(...this.buildChestsEvent(!dt.J.shouldSuppressAd(k,void 0),this.drops,this.memberDrops)),this.eventQueue.push(this.bottomSectionFadeOutAnimation.bind(this,this.bottomDisplayContainer,this.runNextEvent.bind(this)),this.createJar.bind(this),this.bottomSectionFadeInAnimation.bind(this,this.bottomDisplayContainerMember,this.runNextEvent.bind(this,4e3))))}buildEventsQueue(){this.eventQueue.push(this.runNextEvent.bind(this,300),this.showStarsEarned.bind(this),this.applyXPGainToTeam.bind(this,this.currentCreatures,this.xpGained.totalNonMemberXp),this.ftueNootEvolvePetsDialogue.bind(this),this.unlockAcademyDialogue.bind(this),this.unlockNootTowerDialogue.bind(this),...this.buildPopupEvents(),this.runNextEvent.bind(this,1500),this.bottomSectionFadeOutAnimation.bind(this,this.bottomDisplayContainer,this.runNextEvent.bind(this)))}runNextEvent(k=0){k>0?this._timer=window.setTimeout(this.runNextEvent.bind(this,0),k):this.eventQueue.length>0&&this.eventQueue.shift()()}buildPopupEvents(){const k=[];return G.times(this.currentCreatures.length,(B=>{k.push(this.playShineAnimation.bind(this,B),this.launchSummaries.bind(this,B))})),k}buildChestsEvent(k=!0,B=[],U=[]){return[this.createChests.bind(this,k,B,U),this.awardDrops.bind(this)]}cloneCreatures(){this.originalCreatures=[];for(let k=0;kthis.originalCreatures[k].getLevel()){if(this.currentCreatures[k].getAvailableEvolutions().length>0)return!0;if(this.originalCreatures[k].diffAttackSlots(this.currentCreatures[k].getLevel()).length>0)return!0;if(this.currentCreatures[k].getBaseMaxHearts()-this.originalCreatures[k].getBaseMaxHearts()>0)return!0}return!1}createCreatureDisplays(){let k=!0,B=0;const U=W.q.instance.prodigy.gameContainer.get("e20-0fb0").isMember();for(const F of this.currentCreatures)this.creatureDisplays.push(this.createCreatureDisplay(F)),k&&Y.e.levelFromStars(F.getStars()+this.xpGained.totalNonMemberXp,F.creatureType,tt.s.activePlayerLevelCap)=100&&F.xpBar.setPercentCompleteOffset(1,-20),k instanceof X.a){F.creatureName.setText(k.getFirstName());const B=k.getPlayerData().playerTransformation;if(B)F.spriteHolder.add(W.q.instance.prodigy.create.sprite(0,0,K.E.getIconForType(B.transformType,B.transformID),null,{x:.5,y:.5}));else{const k=W.q.instance.prodigy.create.player(F.spriteHolder,G,1,0,50,!1,{isPreview:!0,hideMount:!0});k.reload((()=>{k.standStill()}))}}else if(k instanceof Z.s){F.creatureName.setText(k.getFirstName());const B=W.q.instance.prodigy.create.character(F.spriteHolder,k,1,0,50,!1,{isPreview:!0,hideMount:!0});B.reload((()=>{B.standStill()}))}else F.creatureName.setText(k.source.name),this.loadPetIcon(F,k.data.ID);const $=F.creatureDisplay.image;let H;return k instanceof Q.R&&(H=null===(U=null===(B=z.t.getItem("pet",k.getID()))||void 0===B?void 0:B.data)||void 0===U?void 0:U.affinity),$.loadTexture(j._.Ui_battle_revamp_legacy_json,`pet-icon-backers-${null!=H?H:J.a.Astral}`),F}close(){this.removeListeners(),window.clearTimeout(this._timer),this.fireInterfaceEvent({closeMethod:rt.Lv.CloseButton}),this._segment.legacyPostBattleFlow.sendEnd(),super.close()}setupListeners(){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;for(const B of this.currentCreatures)if(B.data===k.data){this.game.broadcaster.addAppListener(et.ig.LevelUp,this.onMainPlayerLevelUp.bind(this),this,B);break}}removeListeners(){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;for(const B of this.currentCreatures)if(B.data===k.data){this.game.broadcaster.removeAppListener(et.ig.LevelUp,this,B);break}}onMainPlayerLevelUp(){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getLevel();k<=Lt.MAX_LEVEL_TO_SEND_TUTORIAL_SEGMENT_EVENTS&&this.metricsManager.sendOnboardingFunnelEvent(`Reached Level ${k}`)}createChests(k=!0,B=[],U=[]){0===B.length&&0===U.length?this.runNextEvent():(this.chestGoldBackground.visible=!0,this.battleStarsEarned.visible=!1,this.bottomTitleText.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("OPEN_CHEST")),new ut(this.game,this.chestContainer,k,B,U,(k=>{this.choseMemberChest=k,this.runNextEvent()})),this.bottomSectionFadeInAnimation(this.bottomDisplayContainer))}createJar(){if(this.starJar){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.starController.hasExpired()&&this.starController.getNumberOfStoredStars()>0&&!k.hasMembership()&&this.bottomMemberTitleText.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("JAR_EXPIRED")),this.starJar.beginAnimation(this.starXP),this.runNextEvent()}}loadPetIcon(k,B){for(let F=0;F{this.runNextEvent(200)}))):this.runNextEvent()}launchSummaries(k){this.summaryPopupControllers.push(new vt(this.currentCreatures[k],this.originalCreatures[k],W.q.instance.prodigy.open,(()=>{this.enableOverlay(!0)}),this.processSummaryPopupController.bind(this))),this.processSummaryPopupController()}showStarsEarned(){this.battleStarsEarned.visible=!0,this._tweenInProgress=this.game.add.tween(this.battleStarsEarned.scale,this),this._tweenInProgress.from({x:0,y:0},1e3,F.GS3.Back.Out,!0).onTweenComplete.add((()=>{this._tweenInProgress=null,this.runNextEvent()}),this)}animateDropIn(){this._tweenInProgress=this.game.add.tween(this.woodBackground,this),this._tweenInProgress.from({y:this.woodBackground.y-1e3},1e3,F.GS3.Cubic.Out,!0).onTweenComplete.add((()=>{this._tweenInProgress=null,this.runNextEvent()}),this)}processSummaryPopupController(){if(this.handleEvolutions(),this.summaryPopupControllers.length>0){this.summaryPopupControllers.shift().launchSummaryPopups()}else this.enableOverlay(!1),this.runNextEvent()}handleEvolutions(){for(let k=0;k0){let k=this.drops;this.choseMemberChest&&(k=k.concat(this.memberDrops)),W.q.instance.prodigy.open.gotItem(k,this.runNextEvent.bind(this),null,"battle-victory-drops",null,null,{source_type:V.C.Container,instance_type:at.N.EndOfBattle}),this.drops=[],this.memberDrops=[]}else this.runNextEvent()}setupUIElements(){this.closeButton.onClickCallback=()=>{this.fireButtonEvent({buttonName:mt.k.X})};W.q.instance.prodigy.gameContainer.get("e20-0fb0").isMember()?this.starJar=new Mt(this.game,this,this.memberXPGained.bind(this)):this.showCloseButton(!0)}memberXPGained(k,B=!1){if(this.showCloseButton(!1),this.cloneCreatures(),B)this.eventQueue.push(...this.buildPopupEvents(),this.unlockAcademyDialogue.bind(this),this.unlockNootTowerDialogue.bind(this),this.showCloseButton.bind(this,!0));else{for(let k=this.currentCreatures.length-1;k>=0;k--)this.eventQueue.unshift(this.playShineAnimation.bind(this,k),this.launchSummaries.bind(this,k));F.Aq$.isDefined(this.xpGained.gainInPvp)&&(this.eventQueue.length=0,this.eventQueue.unshift(this.showCloseButton.bind(this,!0)))}this.applyXPGainToTeam(this.currentCreatures,k,!0)}applyXPGainToTeam(k,B,U=!1){let F=0;const G=W.q.instance.prodigy.audio.playSound(33,!0),j=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player,$=()=>{++F>=k.length&&(G.stop(),this.runNextEvent())};for(let H=0;HG&&(j.hasCompletedTutorial()||j.kennel.isCreatureCurrentPlayer(F)||(this._leveledUpCreature=F),F.changeCurrentHearts(k[H].getMaxHearts()))}}doStarsGainAnimation(k,B,U){const G=this.currentCreatures.indexOf(k),j=this.creatureDisplays[G],$=k.getLevel(),H=Y.e.levelFromStars(k.getStars()+B,k.creatureType,k.currentMaxLevel);let V=Y.e.getLevelPercent(k.getStars()+B,k.creatureType,k.currentMaxLevel);V=wt.z.clampedLerp(.085,1,V);const q={percent:wt.z.clampedLerp(.085,1,Y.e.getLevelPercent(k.getStars(),k.creatureType,tt.s.activePlayerLevelCap)),level:$};let K=q.percent;if($>=100||H<$)return void U();j.xpBarGlow.playAnimation("idle",!0),W.q.instance.prodigy.audio.playSFX(32,"highlight");const z=this.game.add.tween(q,this);z.onUpdate.add((()=>{j.xpBar.setPercentCompleteOffset(q.percent,-20),K>q.percent&&(j.xpBarExplode.playAnimation("levelup"),q.level++,F.Aq$.isDefined(this.levelUpSound)&&this.levelUpSound.stop(),this.levelUpSound=W.q.instance.prodigy.audio.playSFX(32,"levelUp"),setTimeout((()=>{j.levelNumberText.setText(q.level.toString())}),400)),K=q.percent}));const Q=1e3;for(let W=$;W<=H&&W<=100;W++)if(100===W)z.to({percent:1},Q,F.GS3.Quadratic.Out);else if(W===H){const k=Q;z.to({percent:V},k,F.GS3.Quadratic.Out)}else z.to({percent:1},Q,F.GS3.Quadratic.Out),z.to({percent:0},1,F.GS3.Linear.None);z.onTweenComplete.add(U),z.onTweenComplete.add((()=>{j.xpBarGlow.playAnimation("idle",!1)})),z.start()}unlockAcademyDialogue(){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(k.hasCompletedTutorial()&&!W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(_t.B.BREADCRUMB_UNLOCK_ACADEMY,_t.B.BREADCRUMB_UNLOCK_ACADEMY_NOOT_DIALOGUE)&&W.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirementsDeprecated(12)&&k.backpack.hasItem("key",22)<=0){const k=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),B=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);k.execute(B.getStateMachine(57),{game:this.game,menu:this},null)}else this.runNextEvent()}unlockNootTowerDialogue(){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(_t.B.FEATURE_TOWERS_PROMPT,_t.B.NOOT_TOWER_PROMPT)&&F.Aq$.isDefined(k.state.get("zone-academy"))&&W.q.instance.prodigy.world.getCurrentZone()!==Nt.A_.EARTHTOWER&&k.getLevel()>=25){const k=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),B=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);k.execute(B.getStateMachine(190),{game:W.q.instance.game,menu:this,open:W.q.instance.prodigy.open,text:W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("DIALOGUE_GALE_17")},null),W.q.instance.prodigy.breadcrumbManager.resetBreadcrumbs(_t.B.FEATURE_ACADEMY_TOWERS)}else this.runNextEvent()}ftueNootEvolvePetsDialogue(){const k=W.q.instance.prodigy.gameContainer,B=k.get("e20-0fb0").player;if(!B.hasMembership()&&!B.hasCompletedTutorial()&&void 0!==this._leveledUpCreature){const B=z.t.getItem("pet",this._leveledUpCreature.data.ID),U=Tt.P8.findNextEvolution(B);if(!U)return void this.runNextEvent();const G=k.get("PrefabService").getPrefabFromGuid($.l.PetEvolutionPanel);W.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromJSONWithDependencies(G,void 0,void 0,void 0,$.l.PetEvolutionPanel).then((k=>{k.layer="legacyMenuLayer",this.configureEvolutionPrefab(k,B,U)})).catch((k=>{F.VyI.log(`Error loading evolution FTUE prefab; ${k.message}`,F.$bb.Error),this.runNextEvent()}))}else this.runNextEvent()}configureEvolutionPrefab(k,B,U){const G="one_time_evolution_ftue_dialogue",j=new ft.rD(this.game),$=k.findComponentInChildren(nt.f),H=$.GameObject.findComponentInChildren(F.EYj),V=k.findComponentInChildren(it.s),[W,q]=k.findComponentsInChildren(st.o),K=Tt.P8.getPetEvolutionGiftThreshold();k.transform.setPositionX(this.game.width/2),k.transform.setPositionY(this.game.height/3),V.setElementalBanner(this._leveledUpCreature.getElement()),W.init(B),q.init(U),$.setValue(!0),H.text+=K.toString(),this.fireInterfaceEvent({interfaceName:G,interfaceType:rt.Wm.DialogBox,originType:rt.$N.AutoSurfaced}),j.addEvents([{dialogueData:j.dataProvider.get(1296),type:ft.fA.DEFAULT,blockInput:!0}]),j.start(!0,(()=>{this.fireInterfaceEvent({interfaceName:G,interfaceType:rt.Wm.DialogBox,closeMethod:rt.Lv.CloseDialog}),k.destroy(),this.runNextEvent()}))}}Lt.MAX_LEVEL_TO_SEND_TUTORIAL_SEGMENT_EVENTS=5,Lt.configModifiers={}},25286:(k,B,U)=>{"use strict";U.d(B,{g:()=>ut});var F=U(8674),G=U(62459),j=U(88022),$=U(99625),H=U(56942),V=U(35120),W=U(49237),q=U(32259),K=U(17737),z=U(65116),Y=U(49037),Q=U(97518),X=U(59347),Z=U(28152),J=U(34603),tt=U(71072);let et=class extends G.uAl{init(k){var B,U,F;const j=k.adConfig;let $="";G.Aq$.isDefined(j.thumbnailURL)?$=`singleImage-${j.thumbnailURL}`:G.Aq$.isDefined(j.thumbnailGUID)&&($=j.thumbnailGUID),null===(B=this._thumbnail)||void 0===B||B.setAsset($),null===(U=this._thumbnail2)||void 0===U||U.setAsset($),this._titleKey.setLocalizationKey(j.title),this._bodyKey.setLocalizationKey(j.body),this._canTeleportComponent&&(this._canTeleportComponent.mapTag=j.travelZone),this._teleportComponent&&(this._teleportComponent.mapTag=j.travelZone),j.travelZone&&(this._teleportMessage.key=this._localizer.getText("TRAVEL_CONFIRM_MESSAGE",V.q.instance.prodigy.world.getZone(j.travelZone.split("-")[0]).name)),null===(F=this._openVideo)||void 0===F||F.loadVideoConfig(k.videoConfig),this.Id=k.videoConfig.adID}};(0,F.Cg)([(0,G.MnK)(J._),(0,F.Sn)("design:type",J._)],et.prototype,"_thumbnail",void 0),(0,F.Cg)([(0,G.MnK)(J._),(0,F.Sn)("design:type",J._)],et.prototype,"_thumbnail2",void 0),(0,F.Cg)([(0,G.MnK)(Q.R),(0,F.Sn)("design:type",Q.R)],et.prototype,"_titleKey",void 0),(0,F.Cg)([(0,G.MnK)(Q.R),(0,F.Sn)("design:type",Q.R)],et.prototype,"_bodyKey",void 0),(0,F.Cg)([(0,G.MnK)(z.$),(0,F.Sn)("design:type",z.$)],et.prototype,"_canTeleportComponent",void 0),(0,F.Cg)([(0,G.MnK)(Y.q),(0,F.Sn)("design:type",Y.q)],et.prototype,"_teleportComponent",void 0),(0,F.Cg)([(0,G.MnK)(X.S),(0,F.Sn)("design:type",X.S)],et.prototype,"_teleportMessage",void 0),(0,F.Cg)([(0,G.MnK)(tt.V),(0,F.Sn)("design:type",tt.V)],et.prototype,"_openVideo",void 0),(0,F.Cg)([(0,G.Cdj)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],et.prototype,"_localizer",void 0),et=(0,F.Cg)([(0,G.EVk)("TemplateAd",Z.Y.uiAd)],et);var it=U(83142),st=U(15485),nt=U(46784),at=U(41674),rt=U(90633),ot=U(56903),ht=U(69698),ct=U(95130),dt=U(80060),lt=U(82680);class ut extends lt.W{constructor(k,B,U,F){super(k,B,22,ut.configModifiers,[j._.Ui_shared_json,j._.Ui_social_feed_json,j._.Ui_towertown_misc_json,j._.Ui_towertown_samples_json]),this._adCellList=[],this._sharingTimeoutTimer=null,this._deletingTimeoutTimer=null,this._activePlayer=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player,super.setCloseCallback(U),this._openedWith=F,this._openedAtTime=this._timeManager.getServerTimeMs(),this.currentInterfaceName=nt.B.WizardWatch}preprocess(){if(!V.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(rt.B.FEATURE_SOCIAL_FEED,rt.B.BREADCRUMB_SOCIAL_FEED_OPENED)){V.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(rt.B.FEATURE_SOCIAL_FEED,rt.B.BREADCRUMB_SOCIAL_FEED_OPENED);const k="voice-10-85";V.q.instance.prodigy.load.assets([k],V.q.instance.prodigy.audio.playVoice.bind(V.q.instance.prodigy.audio,k,null,18,4))}const k=ot.A.getWizardWatchData().catch(G.RQr.createHandler("Error loading data for Wizard Watch ads")).then((k=>(0,F.sH)(this,void 0,void 0,(function*(){return new Promise((k=>{this._adData=ot.A.getActiveEntityAds();const B=[H.Q.Spine_socialfeed_poof_json];for(const U of this._adData)G.Aq$.isDefined(U.thumbnailURL)?B.push(`singleImage-${U.thumbnailURL}`):G.Aq$.isDefined(U.thumbnailGUID)&&B.push(`singleImage-${U.thumbnailGUID}`);V.q.instance.prodigy.load.assets(B,k)}))})))),B=V.q.instance.prodigy.titansNetworkHandler.getTitans(),U=new Promise((k=>{this.queuePostCreateCallback(k)})),j=V.q.instance.prodigy.gameContainer.get("12b-405a").awaitLoad().catch(G.RQr.createHandler("Error loading Weekend Event Data for WW ad"));Promise.all([k,B,U,j]).then((()=>{this.fillView(),this.setButtons();const k=this._adData.map(((k,B)=>({post_id:k.ID,post_name:k.title,post_rank:B+1})));this.fireInterfaceEvent({interfaceType:at.Wm.DialogBox,originType:"from-menu"===this._openedWith?at.$N.ButtonClick:at.$N.AutoSurfaced,originID:st.k.Feed},{item_list:k})}))}setButtons(){this.closeButton.onClickCallback=(k,B=!1)=>{this.sendButtonClickedEvent(st.k.X),this.close(k,B)}}setupScrollBar(){G.Aq$.isDefined(this.feedScrollView)&&(this.feedScrollView.linkScrollBar(this.feedScrollBar),this.feedScrollView.setToScrollPercent(0))}fillView(){this.destroyed||(this.setupAds(),this.noFeedAll.visible=this._adCellList.length<=0,this.feedContents.layoutElement.calculateChildren(),this.feedScrollView.setupVisibleIndices(),this.feedScrollView.calculateMaxScrollDist(),this.setupScrollBar(),this.feedScrollBar.visible=this._adCellList.length>0,ot.A.getUnseenActiveAdCount()>0&&this._adCellList.length>0&&!this._activePlayer.encounters.hasSeenAd(this._adData[0].ID)&&this._adCellList[0].findComponentInChildren(K.n).run(),ot.A.markActiveAdsSeen())}fillAdGroup(k,B){const U=V.q.instance.prodigy.gameContainer.get("d0e-64fd");let F=0;for(let j=0;jthis.close(null,!0)));const F=k.findComponentInChildren(et);if(F)F.init(this.createFullAdConfig(H));else for(const U of k.findComponentsInChildren(it.D))U.loadVideoConfig({adID:H.ID})}catch(e){G.VyI.log(String(e),G.$bb.Error),V=null}V&&(B.addChild(K),B.gameObjects.push(V),this.feedScrollView.frameworkButtonsArray.push(...z),this._adCellList.push(V),K.y=F*ut.AD_HEIGHT,F++)}}createFullAdConfig(k){return{adConfig:{thumbnailGUID:k.thumbnailGUID,thumbnailURL:k.thumbnailURL,title:k.title,body:k.body,travelZone:k.travelZone},videoConfig:{adID:k.ID,videoID:k.videoConfig.videoID,header:k.videoConfig.videoCaption?k.videoConfig.videoTitle:void 0,message:k.videoConfig.videoCaption?k.videoConfig.videoBody:void 0}}}clearScrollView(){G.Aq$.isDefined(this.feedScrollBar)&&(this.feedScrollBar.visible=!1),G.Aq$.isDefined(this.feedScrollView)&&this.feedScrollView.clearScrollView();for(let k=0;k0){const k=new ct.D(this.game,this.feedContents);k.gameObjects=[],k.rect=new G.M_G(0,0,ut.AD_WIDTH,this._adData.length*ut.AD_HEIGHT),this.fillAdGroup(this._adData,k)}}sendCloseEvent(k=!1){const B=(this._timeManager.getServerTimeMs()-this._openedAtTime)/1e3;this.fireInterfaceEvent({interfaceName:nt.B.WizardWatch,interfaceType:at.Wm.DialogBox,closeMethod:k?at.Lv.TeleportButton:at.Lv.CloseButton},{duration:B})}sendPostViewedEvents(){var k;G.Aq$.isDefined(null===(k=this.feedScrollView)||void 0===k?void 0:k.objectsViewed)?this.feedScrollView.objectsViewed.forEach((k=>{const B=k.findComponentInChildren(et);if(B){const k=this._adData.find((k=>k.ID===B.Id)),U=this._adData.findIndex((k=>k.ID===B.Id));k&&U>=0&&V.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendPostViewedEvent({interfaceName:nt.B.WizardWatch,interfaceType:at.Wm.DialogBox,postTitle:k.title,postID:k.ID.toString(),postRank:U+1})}})):G.VyI.log("SocialFeed.sendPostViewedEvents: Scroll view objectsViewed is not defined",G.$bb.Warning)}sendButtonClickedEvent(k,B){this.fireButtonEvent({interfaceType:at.Wm.DialogBox,buttonName:k},{notification_id:B})}destroy(k){this.clearScrollView(),G.Aq$.isDefined(this.allButton)&&(this.allButton.onUpCallback=null,this.allButton=null),G.Aq$.isDefined(this.closeButton)&&(this.closeButton.onClickCallback=null,this.closeButton=null),this._adData=[],this.allTab=null,this.allBadge=null,this.allBadgeNumber=null,this.inactiveAllBadge=null,this.inactiveAllBadgeNumber=null,this.feedScrollView=null,this.feedScrollBar=null,this.noFeedAll=null,this.feedContents=null,super.destroy(k)}}ut.AD_HEIGHT=335,ut.AD_WIDTH=875,ut.configModifiers={modifyProperty:[{element:"allButton",property:"visible",value:!1},{element:"allTab",property:"visible",value:!1},{element:"allBadge",property:"visible",value:!1},{element:"allBadgeNumber",property:"visible",value:!1},{element:"inactiveAllBadge",property:"visible",value:!1},{element:"inactiveAllBadgeNumber",property:"visible",value:!1},{element:"meButton",property:"visible",value:!1},{element:"meTab",property:"visible",value:!1},{element:"friendButton",property:"visible",value:!1},{element:"friendTab",property:"visible",value:!1},{element:"noFeedMe",property:"visible",value:!1},{element:"noFeedFriend",property:"visible",value:!1}]},(0,F.Cg)([(0,G.fFd)("a03-308f"),(0,F.Sn)("design:type",ht.V)],ut.prototype,"_timeManager",void 0)},94236:(k,B,U)=>{"use strict";U.d(B,{K:()=>ut});var F=U(8674),G=U(62459),j=U(62248),$=U(99625),H=U(62886),V=U(60157),W=U(90633),q=U(65240),K=U(73797),z=U(80060),Y=U(35120),Q=U(91207),X=U(77938),Z=U(55734),J=U(88038),tt=U(80711),et=U(51972),it=U(41674),st=U(15485),nt=U(46784),at=U(22023),rt=U(30226),ot=U(47255),ht=U(95057),ct=U(37941),dt=U(76277),lt=U(58347);class ut extends ct.l{constructor(k,B,U,F,G){super(k,B,U,F,20),this.evolutionTime=5e3,this.modalContainerNames=["stopButtonContainer","okayButtonContainer","evolveButtonContainer"],this.queuePostCreateCallback(this.sparkle.bind(this),this.fillElements.bind(this),this.setupButtons.bind(this),this.sendSubsequentEvolutionInterfaceEvent.bind(this)),this._evolutionSource=G,this.startEvolutionLevel=F.getLevel(),this.availableEvolutions=U.getAvailableEvolutions()}isRequired(){return this.currentCreature.getLevel()>this.startEvolutionLevel&&this.availableEvolutions.length>0}getBannerLocKey(){return"SUMMARY_POPUP_EVOLUTION"}showButtonSet(k){for(let B=0;B{this.sendAnalyticsFunnelStage1(),this.fireButtonEvent({buttonName:st.k.EvolveNow}),Y.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:525,yPosition:500,arrowXRelPos:.5,arrowDirection:et.i.DOWN})}):this.evolveButton.onUpCallback=()=>{this.fireButtonEvent({buttonName:st.k.EvolveNow}),this.performEvolution()},this.stopButton.onUpCallback=()=>{this.fireButtonEvent({buttonName:st.k.Stop}),this.stopEvolution()},this.okayButton.onUpCallback=()=>{this.fireButtonEvent({buttonName:st.k.Okay}),this.onOkayButtonPress()},this.closeButton.onUpCallback=()=>{this.fireButtonEvent({buttonName:st.k.Later}),this.closeTween()}}fillElements(){Y.q.instance.prodigy.audio.playSFX(32,"popUpDisplay");const k=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.hasMembership()?this.setActionText(Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("CREATURE_IS_EVOLVING",this.originalCreatureCopy.getFirstName())):this.setActionText(Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("CREATURE_TRYING_TO_EVOLVE",this.originalCreatureCopy.getFirstName())),this.currentCreature.getLevel()>=100&&this.evolveLaterText.setText(Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("DO_NOT_EVOLVE")),k.hasMembership()?(this.showButtonSet("stopButtonContainer"),this.startEvolutionTimer()):this.showButtonSet("evolveButtonContainer"),this.loadMonsterSprite(this.originalCreatureCopy.getID());let B=this.originalCreatureCopy.getElement();B=rt.J.convertLegacyElements(B),this.ballDisplay.image.frameName=at.P8.getAtlasElementBackerPath(B)}performEvolution(){const k=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(k.hasMembership())this.evolveSuccess();else{let B=Y.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableMembershipVideoAd",!1);const U=k.isPlayingAtSchool();(G.o5U.isIOS()||G.o5U.isAndroid()||G.o5U.isSafari()||G.o5U.isEdge()||G.o5U.isOpera()||U)&&(B=!1),B=!1,Y.q.instance.prodigy.open.membershipInfo(this.memberConverted.bind(this),{conversionFunnelName:ot.o.FunnelEvolutionMemberLock,conversionStage:ot.o.StageEvolutionConverted},"evolveNow-button"),this.sendAnalyticsFunnelStage1()}}sendAnalyticsFunnelStage1(){const k=rt.J.showYouTubeMembershipAd(this.game,!0)?ht.R.Video:ht.R.Static;this._segment.purchase.sendFunnelStart({type:"Pet-Evolution-Member-Lock",category:"Pet",contentId:`pet-${this.currentCreature.getID()}`,adType:k})}sendSubsequentEvolutionInterfaceEvent(){Y.q.instance.prodigy.gameContainer.get("12f-4e29").isBreadcrumbComplete(W.B.FEATURE_PET_EVOLUTION,W.B.BREADCRUMB_NONMEMBER_FIRST_PET_EVOLUTION)&&this._segment.featureCommon.sendInterfaceEvent({interfaceName:nt.B.NewOtherEvolutions,interfaceType:it.Wm.DialogBox,originType:it.$N.AutoSurfaced,eventName:"interface_opened"})}memberConverted(){Y.q.instance.prodigy.audio.resumeBGM();Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasMembership()&&setTimeout(this.evolveSuccess.bind(this),100)}stopEvolution(){this.setActionText(Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("CREATURE_STOPPED_EVOLVING",this.originalCreatureCopy.getFirstName())),clearTimeout(this.evolutionTimerID),this.okayButton.onUpCallback=this.closeTween.bind(this),this.evolutionEffect.alpha=0,this.showButtonSet("okayButtonContainer"),this._segment.playerProgression.sendPetEvolutionCancelledEvent({petName:this.currentCreature.getName(),petLevel:this.currentCreature.getLevel(),petElement:this.currentCreature.getElement(),petRank:at.P8.getPetDisplayMergeRank(this.currentCreature.data.ID,this.currentCreature.data.uniqueID),evolutionSource:this._evolutionSource})}startEvolutionTimer(){this.evolutionTimerID=window.setTimeout(this.performEvolution.bind(this),this.evolutionTime)}evolveSuccess(){if(Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasMembership()){const k=this.availableEvolutions[0],B=G.Aq$.isDefined(k.evolveID)?k.evolveID:k.e,U=this.currentCreature.getName();this.currentCreature.evolve(B).then((()=>{this._segment.playerProgression.sendPetEvolvedEvent({petName:this.currentCreature.getName(),petLevel:this.currentCreature.getLevel(),petRank:at.P8.getPetDisplayMergeRank(this.currentCreature.data.ID,this.currentCreature.data.uniqueID),petOldName:U,petType:at.P8.getPetEvolutionType(this.currentCreature.getID()),evolutionSource:this._evolutionSource}),this.sendQuestEvolveEvent(),this.doEvolveAnimation()})).catch(G.RQr.createHandler(`Error evolving creature with ID ${this.currentCreature.getID()}`))}}doEvolveAnimation(){const k=Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("CREATURE_IS_EVOLVING",this.originalCreatureCopy.getFirstName());this.actionText.textObject.text!==k&&this.setActionText(k),this.showButtonSet(""),setTimeout(this.loadMonsterSprite.bind(this,this.currentCreature.getID()),2e3),this.evolutionEffect.playAnimation("sparkle mask",!1,this.doneEvolveAnimation.bind(this))}doneEvolveAnimation(){Y.q.instance.prodigy.audio.playSFX(32,"popUpDisplay"),this.setActionText(`${this.currentCreature.getFirstName()}!`),this.showButtonSet("okayButtonContainer")}loadMonsterSprite(k){G.Aq$.isDefined(this.monsterIcon)&&(this.monsterIcon.destroy(),this.monsterIcon=null),this.monsterIcon=Y.q.instance.prodigy.create.sprite(0,0,Q.E.getIconForType("pet",k),null,new G.I9Y(.5,.5),(k=>{G.Aq$.isDefined(this.spriteHolder)&&this.spriteHolder.add(k)}))}onOkayButtonPress(){this.availableEvolutions=this.currentCreature.getAvailableEvolutions(),this.availableEvolutions.length>0?(this.originalCreatureCopy=this.currentCreature.createDataClone(),this.fillElements()):this.closeTween()}static openEvolutionPromptIfEligible(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){let F;const j=Y.q.instance.prodigy.gameContainer.get("e20-0fb0"),$=at.P8.getEvolutionGiftState(j.isMember());return F=k instanceof Z.R&&at.P8.canPetEvolve(k,k.getLevel())&&$!==at.O2.GIFT_UNAVAILABLE&&!U?yield this.openEvolutionScreen(k,j,null!=G?G:it.k.Other):Y.q.instance.prodigy.open.evolutionSummary(k,null!=B?B:k,null!=G?G:it.k.Other),void 0!==F&&(yield F.onDestroy.asPromise(),this._menu=void 0,!0)}))}static openEvolutionScreen(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const B=Y.q.instance.prodigy;if(B.open.isMenuOpen(tt.l)||ut.isOpening)return;ut.isOpening=!0;const F=$.l.EvolutionScreen,H={},V=B.gameContainer.get("5c7-e02d"),W=V.getBalance(27),q=V.petAcquisitionCost(k.getID(),j.l6.Evolution),K=X.t.getItem("pet",k.getID()),Q=at.P8.findNextEvolution(K),Z=B.gameContainer.get(G.$Bt.LocalizationService);H.PET_EVOLUTION_REACHED_MAX_LEVEL=Z.getText("EVOLUTION_SCREEN_REACHED_MAX_LEVEL",K.data.name),H.PET_EVOLUTION_EVOLVE_TO_GET_STRONGER=Z.getText("EVOLUTION_SCREEN_EVOLVE_TO_GET_STRONGER",Q.data.name),H.PRE_EVOLUTION_CARD_PET_ID=K.ID,H.POST_EVOLUTION_CARD_PET_ID=Q.ID,this.setMembershipInjectableProperties(H,q,W);const et=B.open.prefabMenu(F,null,!0,!1,!0,H,void 0,void 0,void 0,void 0,!0);return et.onPrefabLoaded.addOnce((B=>{this._menu=B.findComponentInChildren(tt.l,!0),this._menu.init(k,U),ut.isOpening=!1,z.d.updateInjectedValues(B,{PET_EVOLUTION_CARD_ANIMATE_BALANCE:W}),J._.anyEvolutionPromptShown()})),et}))}static setMembershipInjectableProperties(k,B,U){var F;const G=Y.q.instance.prodigy.gameContainer.get("e20-0fb0"),j=G.isMember(),$=(0,dt.G)(lt.F),H=G.player.canPurchaseMembershipInGame(),V=B.value<=U,W=Y.q.instance.prodigy.gameContainer.get("5c7-e02d"),q=!V&&(!H||$),z=!$&&!V&&H||W.isHardCurrencyMemberLocked(B.value);k.SHOW_NOT_ENOUGH_MAGICOIN_BUTTON=q,k.SHOW_MEMBERSHIP_BUTTON=z,k.CURRENCY_COST=null!==(F=null==B?void 0:B.value)&&void 0!==F?F:0,k.MAGICOIN_PRICE=B.value,k.UPDATE_MAGICOIN_BUDGET=U,k.SHOW_BUTTON_SPARKLES=V||H,k.IS_MEMBER=j,k.MEMBERSHIP_BUTTON_ENABLED=!0,z&&(Y.q.instance.prodigy.game.broadcaster.addAppListener(K.H3.MembershipResponseReceived,this.handleMembershipChange,this),Y.q.instance.prodigy.game.broadcaster.addAppListener(K.H3.MembershipRewardsFlowComplete,this.handleMembershipRewardsFlowComplete,this))}static handleMembershipChange(k){"success"!==k?z.d.updateInjectedValues(this._menu.GameObject,{MEMBERSHIP_BUTTON_ENABLED:!0}):Y.q.instance.prodigy.game.broadcaster.removeAppListener(K.H3.MembershipResponseReceived,this)}static handleMembershipRewardsFlowComplete(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;Y.q.instance.prodigy.game.broadcaster.removeAppListener(K.H3.MembershipRewardsFlowComplete,this),null===(k=this._menu)||void 0===k||k.startEvolutionFromMembershipPurchase().catch(G.RQr.createHandler("Error starting evolution after membership purchase"))}))}static attemptToForceSkip(){var k,B;G.Aq$.isDefined(this._menu)&&(null===(k=this._menu.skipButton)||void 0===k||k.onClick.dispatch(),null===(B=this._menu.skipButton)||void 0===B||B.onEnabledClick.dispatch())}sendQuestEvolveEvent(){const k=X.t.getItem("pet",this.currentCreature.data.ID).data,B={params:{taskEventType:V.Z7.Pet,rarity:k.rarity,itemType:"pet",source:q.C.PetEvolution,id:k.ID,element:k.affinity,level:k.level}};Y.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(H.T.EVOLVE_PET,B).catch(G.RQr.createHandler("Error sending a quest event for evolving a pet"))}destroy(){super.destroy(),Y.q.instance.prodigy.game.broadcaster.removeAppListener(K.H3.MembershipResponseReceived,this),Y.q.instance.prodigy.game.broadcaster.removeAppListener(K.H3.MembershipRewardsFlowComplete,this),ut.isOpening=!1}}ut.isOpening=!1},47717:(k,B,U)=>{"use strict";U.d(B,{H:()=>K});var F=U(62459),G=U(95359),j=U(88022),$=U(35120),H=U(77938),V=U(39984),W=U(15485),q=U(37941);class K extends q.l{constructor(k,B,U,F){super(k,B,U,F,21),this._statIncreases=[];const G=U.getBattleAssetSpecifier(),j=H.t.getItem(G.type,G.id).data,$=V.e.getStatIncreasesFromLevelUps(j,F.getLevel(),U.getLevel());this._statIncreases=Object.entries($),this.queuePostCreateCallback(this.showNextStatIncrease.bind(this),this.setupButton.bind(this))}isRequired(){var k;return(null===(k=this._statIncreases)||void 0===k?void 0:k.length)>0}getBannerLocKey(){return null}showNextStatIncrease(){this._statIncreases.length<=0?this.close():($.q.instance.prodigy.audio.playSFX(32,"popUpDisplay"),this.setUpUi(...this._statIncreases.shift()))}setBannerTitle(k){this.setBannerTitleLocKey(K.BANNER_LOC_KEY[k])}setUpUi(k,B){var U;this.setBannerTitle(k),this.okayButton.visible=!1,null===(U=this._statIcon)||void 0===U||U.destroy(),this._statIcon=$.q.instance.prodigy.create.sprite(0,0,j._.Ui_battle_revamp_json,K.ICON_FRAMES[k],new F.I9Y(.5,.5),(k=>{F.Aq$.isDefined(this.spriteHolder)&&(this.spriteHolder.add(k),this.game.add.tween(k.scale,this).from({x:0,y:0},1e3,F.GS3.Elastic.Out,!0),$.q.instance.prodigy.audio.playSFX(32,"popUpDisplay"),this.okayButton.visible=!0)}));const G=K.STAT_EARNED_KEY[k],H=1===B&&G.length>1?G[1]:G[0];this.setActionText($.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText(H,this.currentCreature.getFirstName(),B))}setupButton(){this.okayButton.onUpCallback=()=>{this.fireButtonEvent({buttonName:W.k.Okay}),this.showNextStatIncrease()}}}K.ICON_FRAMES={[G.IE.Power]:"icon-levelup-power",[G.IE.Defence]:"icon-levelup-defense",[G.IE.Speed]:"icon-levelup-dodge",[G.IE.Hp]:"icon-levelup-heart"},K.BANNER_LOC_KEY={[G.IE.Power]:"SUMMARY_POPUP_INCREASED_POWER",[G.IE.Defence]:"SUMMARY_POPUP_INCREASED_DEFENSE",[G.IE.Speed]:"SUMMARY_POPUP_INCREASED_SPEED",[G.IE.Hp]:"SUMMARY_POPUP_INCREASED_HP"},K.STAT_EARNED_KEY={[G.IE.Power]:["SUMMARY_POPUP_EARNED_POWER"],[G.IE.Defence]:["SUMMARY_POPUP_EARNED_DEFENSE"],[G.IE.Speed]:["SUMMARY_POPUP_EARNED_SPEED"],[G.IE.Hp]:["SUMMARY_POPUP_EARNED_HP_MULTIPLE","SUMMARY_POPUP_EARNED_HP"]}},37941:(k,B,U)=>{"use strict";U.d(B,{l:()=>W});var F=U(62459),G=U(35120),j=U(15485),$=U(41674),H=U(82680),V=U(51742);class W extends H.W{constructor(k,B,U,F,G){super(k,B,G,{isModal:!1},[V.c.Sfx_results_screen]),this.currentCreature=U,this.originalCreatureCopy=F,this.currentInterfaceName=this.getBannerLocKey(),this.queuePostCreateCallback(this.openTween.bind(this),(()=>{this.okayButton.onUpCallback=()=>{this.closeTween(),this.fireButtonEvent({buttonName:j.k.Okay})},this.setBannerTitleLocKey(this.getBannerLocKey())}))}create(){this.isRequired()?(super.create(),this.background.visible=!1,F.Aq$.isDefined(this.onCreateCallback)&&this.onCreateCallback(),this.fireInterfaceEvent({originType:$.$N.AutoSurfaced})):this.close()}setOnCreateCallback(k){this.onCreateCallback=k}openTween(){if(F.Aq$.isDefined(this.uiRoot)){const k=this.uiRoot;k.pivot.x=k.width/2,k.pivot.y=k.height/2,k.x+=k.pivot.x,k.y+=k.pivot.y,k.scale.x=.1,k.scale.y=.1,k.alpha=0,this.game.add.tween(k.scale,this).to({x:1,y:1},200,F.GS3.Back.Out,!0),this.game.add.tween(k,this).to({alpha:1},120,F.GS3.Linear.None,!0)}}closeTween(){if(F.Aq$.isDefined(this.uiRoot)){this.okayButton.setActive(!1);this.game.add.tween(this.uiRoot,this).to({alpha:0},200,F.GS3.Linear.None,!0).onTweenComplete.add(this.close.bind(this))}}setActionText(k){this.actionText.setText(k),this.game.add.tween(this.actionText,this).from({x:this.actionText.x+20,alpha:0},300,F.GS3.Quadratic.Out,!0)}setBannerTitleLocKey(k){this.resultsTitle.setText(G.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText(k))}close(){this.fireInterfaceEvent({closeMethod:$.Lv.ButtonClick}),super.close()}}},67510:(k,B,U)=>{"use strict";U.d(B,{v:()=>X});var F=U(8674),G=U(62459),j=U(88022),$=U(35120),H=U(88552),V=U(6190),W=U(65050),q=U(7910),K=U(80060),z=U(55237),Y=U(34374),Q=U(82680);class X extends Q.W{constructor(k,B,U,F,G,j,$,H,V,W=!1,q=!0,K,z){super(k,B,200),this._weightedRewards=F,this._prefabLoader=U,this._prefabGuid=G,$&&(this._forceRewards=[...$]),this._instanceType=j,V&&(this._closeCallback=V),H&&(this._fallbackRewards=H),this._immediatelyAwardForcedReward=W,this._awardItems=q,K&&(this._injectableProperties=K),(null==z?void 0:z.instanceId)&&(this._instanceId=z.instanceId),(null==z?void 0:z.sourceType)&&(this._sourceType=z.sourceType)}create(){const k=Object.create(null,{create:{get:()=>super.create}});return(0,F.sH)(this,void 0,void 0,(function*(){k.create.call(this),yield Promise.all([K.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGuid,Object.assign({WEIGHTED_REWARDS:this._weightedRewards,FALLBACK_REWARDS:this._fallbackRewards,INSTANCE_TYPE:this._instanceType},this._injectableProperties)).promise.then((k=>{this._ui=k})),new Promise((k=>{$.q.instance.prodigy.load.assets(j._.Ui_raster_pets_menu_json,k)}))]),this.update=()=>{this._ui.update()};const B=this._ui.findComponentInChildren(G.jsv);this.addChild(B.getRootContainer()),this._ui.findComponentInChildren(H.Z).menu=this,this._roulette=this._ui.findComponentInChildren(Y.i),this._roulette.reset(),this._roulette.forcedRewards=this._forceRewards,this._roulette.instanceTypeForSegmentEvent=this._instanceType,this._roulette.sourceTypeForSegmentEvent=this._sourceType,this._ui.findComponentInChildren(q.a)&&(this._ui.findComponentInChildren(q.a).instanceType=this._instanceType,this._ui.findComponentInChildren(q.a).instanceId=this._instanceId);const U=this._ui.findComponentInChildren(V.q);if(this._immediatelyAwardForcedReward&&this._awardItems){this._ui.findComponentInChildren(z.X).skipAward=!0,U.items=this._forceRewards,U.instanceType=this._instanceType,this._sourceType&&(U.awardSourceType=this._sourceType),this._instanceId&&(U.instanceId=this._instanceId),this._roulette.instanceTypeForSegmentEvent!==W.N.RiftRun&&this._roulette.instanceTypeForSegmentEvent!==W.N.BossRift||(U.instanceId=this._segment.rifts.riftInstanceUuid),U.run();$.q.instance.prodigy.gameContainer.get("306-5359").forceSaveCharacter()}else this._awardItems||(U.awardItems=!1)}))}close(){var k;null===(k=this._closeCallback)||void 0===k||k.call(this),super.close()}destroy(){this._ui.destroy(),super.destroy()}}},50348:(k,B,U)=>{"use strict";U.d(B,{L:()=>q});var F=U(62459),G=U(35120),j=U(49237),$=U(8674);let H=class extends F.uAl{constructor(){super(...arguments),this._footerText=null,this._hyperlinkText=null,this._hyperlinkButton=null}get footerText(){return this._footerText}get hyperlinkText(){return this._hyperlinkText}get hyperlinkButton(){return this._hyperlinkButton}};(0,$.Cg)([(0,F.x4W)("FooterText"),(0,$.Sn)("design:type",F.EYj)],H.prototype,"_footerText",void 0),(0,$.Cg)([(0,F.x4W)("HyperlinkText"),(0,$.Sn)("design:type",F.EYj)],H.prototype,"_hyperlinkText",void 0),(0,$.Cg)([(0,F.x4W)("HyperlinkButton"),(0,$.Sn)("design:type",j.$)],H.prototype,"_hyperlinkButton",void 0),H=(0,$.Cg)([(0,F.EVk)("BannerDialogHyperlink")],H);var V=U(21457),W=U(38134);class q extends W.u{constructor(k,B,U=new V.Z){super(k,B,U),this._bannerDialogConfig=null,this._headerPrefabID=101,this._bodyPrefabID=98,this._footerPrefabID=99,this._bannerDialogConfig=U,this.isModal=!1,this._bannerDialogConfig.hasHyperlink&&(this._footerPrefabID=100)}createHeader(){if(F.Aq$.isDefined(this._bannerDialogConfig.bannerSource)){const k=G.q.instance.prodigy.create.sprite(0,0,this._bannerDialogConfig.bannerSource,F.Aq$.isDefined(this._bannerDialogConfig.bannerFrame)?this._bannerDialogConfig.bannerFrame:null);this._prefabComponent.header.legacyTransform.group.addChild(k)}if(this._bannerDialogConfig.closeButton){const k=this._prefabLoader.load(94,this._prefabComponent.header);this._bannerDialogConfig.closeButtonCallback&&k.findComponentInChildren(j.$).onClick.add(this._bannerDialogConfig.closeButtonCallback),k.findComponentInChildren(j.$).onClick.add(this.close.bind(this))}this._bannerDialogConfig.hasHyperlink&&this._prefabLoader.load(this._headerPrefabID,this._prefabComponent.header)}createBody(){const k=this._prefabLoader.load(this._bodyPrefabID,this._prefabComponent.body).findComponentsInChildren(F.EYj);k[0].text=this._bannerDialogConfig.headerTitle,k[1].text=this._bannerDialogConfig.bodyMessage}createFooter(){const k=this._prefabLoader.load(this._footerPrefabID,this._prefabComponent.footer),B=k.findComponentInChildren(H);if(F.Aq$.isDefined(B))F.Aq$.isDefined(this._bannerDialogConfig.buttonCallback)&&B.hyperlinkButton.onClick.add(this._bannerDialogConfig.buttonCallback),B.hyperlinkText.text=this._bannerDialogConfig.buttonText,B.hyperlinkText.drawUnderline(0,this._bannerDialogConfig.buttonText.length),B.footerText.text=this._bannerDialogConfig.footerMessage;else{F.Aq$.isDefined(this._bannerDialogConfig.buttonCallback)&&k.findComponentInChildren(j.$).onClick.add(this._bannerDialogConfig.buttonCallback),k.findComponentInChildren(j.$).onClick.add(this.close.bind(this));const B=k.findComponentsInChildren(F.EYj);for(let k=0;k{"use strict";U.d(B,{Z:()=>$});var F=U(35120),G=U(49967),j=U(2272);class $ extends G.P{get buttonText(){return this._buttonText}get buttonCallback(){return this._buttonCallback}get bannerSource(){return this._bannerSource}get bannerFrame(){return this._bannerFrame}get closeButton(){return this._closeButton}get closeButtonCallback(){return this._closeButtonCallback}get hasHyperlink(){return this._hasHyperlink}get footerMessage(){return this._footerMessage}constructor(k="DEFAULT",B,U,G,$,H,V,W,q,K,z,Y){super(j.E.Banner,U,G,$,H),this._buttonText=k,this._buttonCallback=()=>{F.q.instance.prodigy.audio.playSFX(18,"pop"),null==B||B()},this._bannerSource=V,this._bannerFrame=W,this._closeButton=q,this._closeButtonCallback=()=>{F.q.instance.prodigy.audio.playSFX(18,"pop"),null==K||K()},this._hasHyperlink=z,this._footerMessage=Y}}},642:(k,B,U)=>{"use strict";U.d(B,{k:()=>$});var F=U(35120),G=U(43846),j=U(49967);class $ extends j.P{get confirmButtonText(){return this._confirmButtonText}get confirmButtonCallback(){return this._confirmButtonCallback}get dismissButtonText(){return this._dismissButtonText}get dismissButtonCallback(){return this._dismissButtonCallback}get headerIcon(){return this._headerIcon}constructor(k=(0,G.k)("BUTTON_QUIT_CAPITAL"),B=null,U=(0,G.k)("DIALOG_STAY"),j=null,$=null,H,V,W,q,K){super(H,V,W,q,K),this._confirmButtonText=k,this._confirmButtonCallback=()=>{F.q.instance.prodigy.audio.playSFX(18,"pop"),null==B||B()},this._dismissButtonText=U,this._dismissButtonCallback=()=>{F.q.instance.prodigy.audio.playSFX(18,"pop"),null==j||j()},this._headerIcon=$}}},38134:(k,B,U)=>{"use strict";U.d(B,{u:()=>q});var F=U(35120),G=U(82680),j=U(88022),$=U(8674),H=U(62459);let V=class extends H.uAl{constructor(){super(...arguments),this._rootObject=null,this._header=null,this._body=null,this._footer=null}get rootObject(){return this._rootObject}get header(){return this._header}get body(){return this._body}get footer(){return this._footer}};(0,$.Cg)([(0,H.x4W)("rootObject"),(0,$.Sn)("design:type",H._mx)],V.prototype,"_rootObject",void 0),(0,$.Cg)([(0,H.x4W)("header"),(0,$.Sn)("design:type",H._mx)],V.prototype,"_header",void 0),(0,$.Cg)([(0,H.x4W)("body"),(0,$.Sn)("design:type",H._mx)],V.prototype,"_body",void 0),(0,$.Cg)([(0,H.x4W)("footer"),(0,$.Sn)("design:type",H._mx)],V.prototype,"_footer",void 0),V=(0,$.Cg)([(0,H.EVk)("DialogBasePrefab")],V);var W=U(49967);class q extends G.W{get prefabComponent(){return this._prefabComponent}constructor(k,B,U=new W.P){super(k,B,200,{},[j._.Ui_buttons_json,j._.Ui_dialogues_json,j._.Ui_store_json]),this._dialogConfig=null,this.prefabRoot=null,this._prefabComponent=null,this._prefabLoader=null,this._dialogConfig=U,this.isModal=!0,this._prefabLoader=F.q.instance.prodigy.gameContainer.get("d0e-64fd")}create(){super.create();const k=this._prefabLoader.loadFromGUID(this._dialogConfig.size);this._prefabComponent=k.findComponentInChildren(V),this.prefabRoot.addChild(k.legacyTransform.group),this.background.visible=this._dialogConfig.bgTransparency,this._prefabComponent.rootObject.legacyTransform.group.width=this._dialogConfig.width,this.createHeader(),this.createBody(),this.createFooter()}}},49967:(k,B,U)=>{"use strict";U.d(B,{P:()=>$});var F=U(62459),G=U(2272);const j={[G.E.Small]:550,[G.E.Medium]:600,[G.E.Large]:700,[G.E.Banner]:700};class ${get size(){return this._size}get width(){return this._width}set width(k){switch(this._size){case G.E.Small:this._width=F.cj9.clamp(k,500,600);break;case G.E.Medium:this._width=F.cj9.clamp(k,600,700);break;case G.E.Large:case G.E.Banner:this._width=F.cj9.clamp(k,700,800);break;default:F.VyI.log("Invalid dialog width, setting to default: 500px",F.$bb.Error),this._width=500}}get headerTitle(){return this._headerTitle}get bodyMessage(){return this._bodyMessage}get bgTransparency(){return this._bgTransparency}constructor(k=G.E.Small,B,U="Default Title Please Fix",F="Default Message Please Fix",$=!0){this._size=k,this.width=null!=B?B:j[k],this._headerTitle=U,this._bodyMessage=F,this._bgTransparency=$}}},2272:(k,B,U)=>{"use strict";var F;U.d(B,{E:()=>F}),function(k){k.Small="223de309-a870-4aed-adaa-5cbe162c5659",k.Medium="69bad6cf-14b6-412e-a50c-292cc979727a",k.Large="e19ecfda-8a24-4a40-92bd-035c7c7e79f2",k.Banner="d17a542f-7dd9-43cb-ba9d-9fa34eb31e22"}(F||(F={}))},75329:(k,B,U)=>{"use strict";U.d(B,{Z:()=>$});var F=U(99625),G=U(35120),j=U(49967);class $ extends j.P{get buttonText(){return this._buttonText}get buttonCallback(){return this._buttonCallback}get graphicSource(){return this._graphicSource}get graphicFrame(){return this._graphicFrame}get headerPrefabID(){return void 0!==this._headerPrefabID?this._headerPrefabID:F.l.DefaultHeader}get footerPrefabID(){return void 0!==this._footerPrefabID?this._footerPrefabID:F.l.DefaultFooter}get bodyPrefabID(){return void 0!==this._bodyPrefabID?this._bodyPrefabID:F.l.DefaultBody}constructor(k="DEFAULT",B,U,F,j,$,H,V,W,q,K,z){super(U,F,j,$,H),this._buttonText=k,this._buttonCallback=()=>{G.q.instance.prodigy.audio.playSFX(18,"pop"),null==B||B()},this._graphicSource=V,this._graphicFrame=W,this._headerPrefabID=q,this._footerPrefabID=K,this._bodyPrefabID=z}}},99429:(k,B,U)=>{"use strict";U.d(B,{K:()=>et});var F,G=U(8674),j=U(62459),$=U(20748),H=U(88022),V=U(35120),W=U(38181),q=U(15485),K=U(46784),z=U(65050),Y=U(41674),Q=U(67665),X=U(10312),Z=U(642),J=U(2272),tt=U(49237);let et=F=class extends j.uAl{constructor(){super(...arguments),this._signOutScrollViewButton=null,this._changePasswordScrollViewButton=null,this._deleteAccountScrollViewButton=null,this._userIDInput=null,this._localization=null}get signOutScrollViewButton(){return this._signOutScrollViewButton}get changePasswordScrollViewButton(){return this._changePasswordScrollViewButton}get deleteAccountScrollViewButton(){return this._deleteAccountScrollViewButton}get userIDInput(){return this._userIDInput}create(){super.create(),this._localization=V.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),this.setUpButtons()}postCreate(){super.postCreate(),this._activePlayer=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player,this.userIDInput.text=this._activePlayer.userID.toString(),this.userIDInput.setDisabled(!0)}destroy(){this.userIDInput.destroy(),super.destroy()}setInputVisibility(k){document.getElementById("external-ui").style.display=k?"unset":"none"}setUpButtons(){var k,B,U;null===(k=this.signOutScrollViewButton)||void 0===k||k.onClick.add(this.onSignOutClicked,this),null===(B=this.changePasswordScrollViewButton)||void 0===B||B.onClick.add(this.onChangePasswordClicked,this),null===(U=this.deleteAccountScrollViewButton)||void 0===U||U.onClick.add(this.onDeleteAccountClicked,this)}onSignOutClicked(){V.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!1);V.q.instance.prodigy.open.confirmationDialogWideButtons(new Z.k(this._localization.getText("SIGN_OUT_BUTTON"),(()=>{V.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!0),V.q.instance.prodigy.gameContainer.get("c97-bd0d").logout()}),this._localization.getText("KEEP_PLAYING_BUTTON"),(()=>{V.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!0)}),{atlas:H._.Ui_store_json,name:"icon-large-exclamation"},J.E.Small,F.CONFIRM_WIDTH,this._localization.getText("SIGN_OUT_TITLE"),this._localization.getText("SIGN_OUT_MESSAGE")))}onChangePasswordClicked(){V.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!1);const k=`${V.q.instance.prodigy.gameContainer.get("be9-3278").getIdentityUrl()}/update_password`;this.leaveGame(k,"update_password",!0,!1),this.sendOpenDialogueSegmentEvents(q.k.ChangePasswordLink)}onDeleteAccountClicked(){V.q.instance.prodigy.audio.playSFX(18,"pop");this.leaveGame("prodigygame.zendesk.com/hc/en-us/articles/206242636-How-Do-I-Delete-My-Account-","cs_support_page"),this.sendOpenDialogueSegmentEvents(q.k.AccountDeletionLink)}leaveGame(k,B,U=!0,G=!0){this.setInputVisibility(!1);V.q.instance.prodigy.open.confirmationDialog(new Z.k(this._localization.getText("BUTTON_LEAVE_TEAM"),(()=>{V.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!0),this.sendCloseDialogueSegmentEvents(q.k.Leave,K.B.LeaveGameDialog,B),X.I.openWebsite(k,U,G)}),this._localization.getText("BUTTON_STAY_TEAM"),(()=>{V.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!0),this.sendCloseDialogueSegmentEvents(q.k.Stay,K.B.LeaveGameDialog,K.B.OptionsMenu)}),{atlas:H._.Ui_store_json,name:"icon-large-exclamation"},J.E.Small,F.CONFIRM_WIDTH,this._localization.getText("LOGIN_LEAVE_GAME"),this._localization.getText("LOGIN_LEAVE_BODY")))}sendOpenDialogueSegmentEvents(k){this._segment.featureCommon.sendButtonEvent({buttonName:k,interfaceType:Y.Wm.Settings,interfaceName:K.B.OptionsMenu,destinationName:K.B.LeaveGameDialog,elementType:"text_link",saveClickInfo:k}),this._segment.featureCommon.sendInterfaceEvent({interfaceName:K.B.LeaveGameDialog,interfaceType:Y.Wm.DialogBox,instanceType:z.N.Interface,originType:Y.$N.ButtonClick,originID:k})}sendCloseDialogueSegmentEvents(k,B,U){this._segment.featureCommon.sendButtonEvent({buttonName:k,interfaceName:B,interfaceType:Y.Wm.DialogBox,destinationName:U,saveClickInfo:k}),this._segment.featureCommon.sendInterfaceEvent({interfaceName:B,interfaceType:Y.Wm.DialogBox,instanceType:z.N.Interface,closeMethod:Y.Lv.ButtonClick})}};et.CONFIRM_WIDTH=550,et.DEBOUNCE_MS=500,(0,G.Cg)([(0,j.MnK)(j.Sjx),(0,G.Sn)("design:type",j.Sjx)],et.prototype,"_signOutScrollViewButton",void 0),(0,G.Cg)([(0,j.MnK)(tt.$),(0,G.Sn)("design:type",tt.$)],et.prototype,"_changePasswordScrollViewButton",void 0),(0,G.Cg)([(0,j.MnK)(tt.$),(0,G.Sn)("design:type",tt.$)],et.prototype,"_deleteAccountScrollViewButton",void 0),(0,G.Cg)([(0,j.MnK)(W.S),(0,G.Sn)("design:type",W.S)],et.prototype,"_userIDInput",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",Q.Y)],et.prototype,"_segment",void 0),(0,G.Cg)([(0,$.sg)(et.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],et.prototype,"onSignOutClicked",null),(0,G.Cg)([(0,$.sg)(et.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],et.prototype,"onChangePasswordClicked",null),(0,G.Cg)([(0,$.sg)(et.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],et.prototype,"onDeleteAccountClicked",null),et=F=(0,G.Cg)([(0,j.EVk)("InfoSection")],et)},12696:(k,B,U)=>{"use strict";U.d(B,{L:()=>$});var F=U(8674),G=U(62459),j=U(35120);let $=class extends G.uAl{constructor(){super(),this._coinCountText=null,this.coinCountNumber=0,this._activePlayer=j.q.instance.prodigy.gameContainer.get("e20-0fb0")}create(){super.create(),this.updateCoinValue(),this.updateCoinCountText()}animateNewCoinCount(){var k,B,U;this._coinValueTween=j.q.instance.prodigy.game.add.tween(this,this).to({coinCountNumber:null===(U=null===(B=null===(k=this._activePlayer)||void 0===k?void 0:k.player)||void 0===B?void 0:B.data)||void 0===U?void 0:U.gold},1500,G.GS3.Quadratic.Out),this._coinValueTween.onUpdate.add(this.updateCoinCountText,this),this._coinValueTween.start()}updateCoinValue(){var k,B,U;const F=null===(U=null===(B=null===(k=this._activePlayer)||void 0===k?void 0:k.player)||void 0===B?void 0:B.data)||void 0===U?void 0:U.gold;F&&(this.coinCountNumber=F)}updateCoinCountText(){this._coinCountText.text=Math.round(this.coinCountNumber).toLocaleString()}destroy(){j.q.instance.game.tweens.remove(this._coinValueTween),super.destroy()}};(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],$.prototype,"_coinCountText",void 0),$=(0,F.Cg)([(0,G.EVk)("CoinDisplayComponent",G.YH6.ui),(0,F.Sn)("design:paramtypes",[])],$)},91033:(k,B,U)=>{"use strict";U.d(B,{M:()=>ht});var F=U(99625),G=U(35120),j=U(73797),$=U(62459),H=U(95891),V=U(60881),W=U(76974),q=U(54422),K=U(77938),z=U(8674),Y=U(58268),Q=U(49237),X=U(98013),Z=U(22023),J=U(28152),tt=U(12861),et=U(65231);let it=class extends et.s{constructor(){super(...arguments),this._rescuedContainer=null,this._amountRescued=null,this._petBookOrdinal=null,this._iconEffect=null}get cardClicked(){return this._cardClicked}get isCardValid(){return!!this._item}get ordinal(){return!this.itemIsImageItemDrop(this._item)&&Z.P8.hasValidOrdinal(this._item)?this._item.data.ordinal:-1}create(){super.create(),this._cardClicked=new $.HN0,this._interactable.onClick.add((()=>{this.onCardClick()}))}setData(k,B,U,F){super.setItemData(k),this._seenPet=B,this._ownedPet=U||F>0,this._numberOwned=F}updateCard(){this.setTimesRescued(this._numberOwned>0,this._numberOwned),this.setPetBookOrdinal(this.ordinal.toString()),this.setIcon(this._seenPet,this._ownedPet)}resetCard(){super.resetCard(),this.clearCardEffect()}setTimesRescued(k,B){this._rescuedContainer.active=k,k&&(this._amountRescued.text=B.toString())}setPetBookOrdinal(k){this._petBookOrdinal.text=`#${k}`}setIcon(k,B){k?(this._iconContainer.active=!0,this._unseenContainer.active=!1,B?this.updateIcon():this.updateIcon((k=>{this.applyCardEffect(k)}))):(this._iconContainer.active=!1,this._unseenContainer.active=!0)}applyCardEffect(k){H.delay((()=>{if(this.GameObject&&!this.GameObject.isDestroyed){if(this._petBookOrdinal.text="",this.clearCardEffect(),k){const B=new Y.N;B.desaturate(),k.filters=[B]}this.setPetBookOrdinal(this.ordinal.toString())}}),0)}clearCardEffect(){X.l.removeAll(this._iconEffect.GameObject.legacyTransform.group)}onCardClick(){this._cardClicked.dispatch(this._item.ID)}destroy(){this._interactable.onClick.dispose(),this._cardClicked.dispose(),super.destroy()}};(0,z.Cg)([(0,$.ERr)(),(0,$.Lr6)(0),(0,$.nKb)("iconContainer"),(0,z.Sn)("design:type",$._mx)],it.prototype,"_iconContainer",void 0),(0,z.Cg)([(0,$.ERr)(),(0,$.Lr6)(0),(0,$.nKb)("unseenContainer"),(0,z.Sn)("design:type",$._mx)],it.prototype,"_unseenContainer",void 0),(0,z.Cg)([(0,$.ERr)(),(0,$.Lr6)(0),(0,$.nKb)("rescuedContainer"),(0,z.Sn)("design:type",$._mx)],it.prototype,"_rescuedContainer",void 0),(0,z.Cg)([(0,$.MnK)($.EYj),(0,$.Lr6)(0),(0,$.nKb)("amountRescued"),(0,z.Sn)("design:type",$.EYj)],it.prototype,"_amountRescued",void 0),(0,z.Cg)([(0,$.MnK)($.EYj),(0,$.Lr6)(0),(0,$.nKb)("petBookOrdinal"),(0,z.Sn)("design:type",$.EYj)],it.prototype,"_petBookOrdinal",void 0),(0,z.Cg)([(0,$.MnK)(tt.A),(0,$.Lr6)(0),(0,$.nKb)("iconEffect"),(0,z.Sn)("design:type",tt.A)],it.prototype,"_iconEffect",void 0),(0,z.Cg)([(0,$.MnK)(Q.$),(0,$.Lr6)(0),(0,$.nKb)("interactable"),(0,z.Sn)("design:type",Q.$)],it.prototype,"_interactable",void 0),it=(0,z.Cg)([(0,$.EVk)("PetBookCard",J.Y.uiPet)],it);var st=U(41674);class nt{get infoSignal(){return this._infoSignal}get currentPage(){return this._currentPage}get currentDisplayPage(){return this._currentPage+1}get hasPreviousPage(){return this._currentPage>0}get hasNextPage(){return this._currentPage{this.tryToChangePage(this.hasNextPage,this._totalPageNumber-this.pagesPerScreen)})),this._petBookPrefab.firstPageButton.onClick.add((()=>{this.tryToChangePage(this.hasPreviousPage,0)}));const j=()=>{this.tryToChangePage(this.hasPreviousPage,this._currentPage-this.pagesPerScreen)},H=()=>{this.tryToChangePage(this.hasNextPage,this._currentPage+this.pagesPerScreen)};this._petBookPrefab.previousPageButton.onClick.add(j),this._petBookPrefab.nextPageButton.onClick.add(H),this._petBookPrefab.previousPageButton.GameObject.addComponent(q.E).initialize(V.D.LEFT,j),this._petBookPrefab.nextPageButton.GameObject.addComponent(q.E).initialize(V.D.RIGHT,H),this.paginatePets(),this.setupRecuseProgressBar(),this.updateCurrentPageDisplay()}paginatePets(){const k=K.t.getCategoryItems("pet");this._petBookPets=k.filter((k=>Z.P8.isValidForPetBook(k))).sort(((k,B)=>k.data.ordinal-B.data.ordinal)),this._petPagination=[];const B=Math.ceil(this._petBookPets.length/this.gridSize);for(let U=1;U<=B;U++){const k=this._petBookPets.slice((U-1)*this.gridSize,U*this.gridSize);this._petPagination.push(k)}this._totalPageNumber=B+B%2}setupRecuseProgressBar(){const k=this._encounters.getAllTotalPetsRescued();this.setProgressBar(k/this._petBookPets.length),this.setProgressText($.cj9.clamp(k,0,this._petBookPets.length),this._petBookPets.length)}updateCurrentPageDisplay(){this.changePage(this._currentPage)}tryToChangePage(k,B){k?(this.changePage(B),G.q.instance.prodigy.audio.playSFX(65,"book-pagination"),this.sendPageChangeAnalytics()):this._audio.playSFX(67,"button-disabled")}changePage(k){this._currentPage=k,this.setPageText(this._currentPage,this._currentPage+1,this._totalPageNumber),this.updateButtonStates(),this.populateGrids(this._petPagination[this._currentPage],this._petPagination[this._currentPage+1])}sendPageChangeAnalytics(){G.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendPetBookViewedEvent({bookName:"Pet Book",bookPage:this.currentDisplayPage,interfaceType:st.Wm.PetBook})}openPetInfoMenu(k){this._infoSignal.dispatch(k)}updateButtonStates(){this.hasPreviousPage?(this._petBookPrefab.previousPageButton.unlockState(),this._petBookPrefab.firstPageButton.unlockState()):(this._petBookPrefab.previousPageButton.lockState(W.K.Disabled),this._petBookPrefab.firstPageButton.lockState(W.K.Disabled)),this.hasNextPage?(this._petBookPrefab.nextPageButton.unlockState(),this._petBookPrefab.lastPageButton.unlockState()):(this._petBookPrefab.nextPageButton.lockState(W.K.Disabled),this._petBookPrefab.lastPageButton.lockState(W.K.Disabled))}populateGrids(k,B){this.populateGrid(this._petBookPrefab.leftGridview,k),this.populateGrid(this._petBookPrefab.rightGridview,B)}populateGrid(k,B){for(;!k.isEmpty();)this.removePetBookCard(k);null==B||B.forEach((B=>{B.data.name,B.data.ordinal;const U=this._petBookCardPool.getObject().findComponentInChildren(it);this.updatePetBookCard(U,B),k.GameObject.addChild(U.GameObject)}))}removePetBookCard(k){const B=H.last(k.GameObject.children);B&&(B.parent=null,this._petBookCardPool.recycleObject(B))}setProgressBar(k){this._petBookPrefab.progressBar.fillPercent=k}setProgressText(k,B){this._petBookPrefab.rescuedText.text=`${k} of ${B} rescued`}setPageText(k,B,U){this._petBookPrefab.leftPageText.text=`Page ${k+1} of ${U}`,this._petBookPrefab.rightPageText.text=`Page ${B+1} of ${U}`}createPetBookCard(){const k=this._prefabLoader.loadFromGUID(F.l.Pets_PetBookCard);return k.findComponentInChildren(it).cardClicked.add(this.openPetInfoMenu,this),k}updatePetBookCard(k,B){k.setData(B,this._encounters.hasPetBeenEncountered(B.ID),this._encounters.getPetTimesRescued(B.ID)>0,this._kennel.amountOfPet(B.ID)),k.updateDisplay()}recyclePetBookCard(k){k.findComponentInChildren(it,!0).clearCard(),k.legacyTransform.x=0,k.legacyTransform.y=0,this._unusedPetBookCardContainer.addChild(k)}enableController(k){const B=this._petBookPrefab.GameObject.findComponentsInChildren(q.E,!0);for(let U=0;U{"use strict";U.d(B,{A:()=>j});var F=U(62459),G=U(82680);class j extends G.W{constructor(){super(...arguments),this.onSubMenuLaunched=new F.HN0,this.onSubMenuLeft=new F.HN0,this._isPaused=!1}resumeMenu(){this._isPaused=!1}pauseMenu(){this._isPaused=!0}launchSubMenu(k){this.onSubMenuLaunched.dispatch(k)}leaveSubMenu(){this.onSubMenuLeft.dispatch()}destroy(){this.onSubMenuLaunched.dispose(),this.onSubMenuLeft.dispose(),super.destroy()}}},25930:(k,B,U)=>{"use strict";U.d(B,{J:()=>H});var F=U(8674),G=U(62459),j=U(83133),$=U(42838);let H=class extends G.uAl{constructor(){super(...arguments),this._aboutToggle=null,this._statsToggle=null,this._spellsToggle=null,this._aboutPanel=null,this._statsPanel=null,this._spellsPanel=null,this._learnMorePanel=null,this._tabsGridLayout=null,this._elementIconAtlas=null,this._elementIconFrameWater=null,this._elementIconFrameFire=null,this._elementIconFrameStorm=null,this._elementIconFrameEarth=null,this._elementIconFrameIce=null,this._lockedIconAtlas=null,this._lockedIconFrame=null,this._fillBarAttackAndHearts=null,this._fillBarHearts=null,this._textAttack=null,this._textHearts=null,this._textElement=null,this._iconContainerElement=null,this._textEvolveLevel=null,this._rowObjectEvolveLevel=null,this._textSpellsTitles=[],this._textSpellsLevel=[],this._textSpellsRange=[],this._gridSpellsLevel=[],this._gridSpellsRange=[],this._gridSpellsLevelOff=[],this._gridSpellsRangeOff=[],this._iconContainerSpells=[],this._textAbout=null}get elementIconAtlas(){return this._elementIconAtlas}get elementIconFrameWater(){return this._elementIconFrameWater}get elementIconFrameFire(){return this._elementIconFrameFire}get elementIconFrameStorm(){return this._elementIconFrameStorm}get elementIconFrameEarth(){return this._elementIconFrameEarth}get elementIconFrameIce(){return this._elementIconFrameIce}get lockedIconAtlas(){return this._lockedIconAtlas}get lockedIconFrame(){return this._lockedIconFrame}get fillBarAttackAndHearts(){return this._fillBarAttackAndHearts}get fillBarHearts(){return this._fillBarHearts}get textAttack(){return this._textAttack}get textHearts(){return this._textHearts}get textElement(){return this._textElement}get iconContainerElement(){return this._iconContainerElement}get textEvolveLevel(){return this._textEvolveLevel}get rowObjectEvolveLevel(){return this._rowObjectEvolveLevel}get textSpellsTitles(){return this._textSpellsTitles}get textSpellsLevel(){return this._textSpellsLevel}get textSpellsRange(){return this._textSpellsRange}get gridSpellsLevel(){return this._gridSpellsLevel}get gridSpellsRange(){return this._gridSpellsRange}get gridSpellsLevelOff(){return this._gridSpellsLevelOff}get gridSpellsRangeOff(){return this._gridSpellsRangeOff}get iconContainerSpells(){return this._iconContainerSpells}get textAbout(){return this._textAbout}get aboutToggle(){return this._aboutToggle}get statsToggle(){return this._statsToggle}get spellsToggle(){return this._spellsToggle}get aboutPanel(){return this._aboutPanel}get statsPanel(){return this._statsPanel}get spellsPanel(){return this._spellsPanel}get learnMorePanel(){return this._learnMorePanel}get tabsGridLayout(){return this._tabsGridLayout}create(){super.create(),this._aboutToggle&&(this._aboutToggle.GameObject.active=!1),this._statsToggle&&(this._statsToggle.GameObject.active=!1),this._spellsToggle&&(this._spellsToggle.GameObject.active=!1),this._aboutPanel&&(this._aboutPanel.active=!1),this._statsPanel&&(this._statsPanel.active=!1),this._spellsPanel&&(this._spellsPanel.active=!1),this._learnMorePanel&&(this._learnMorePanel.active=!1)}};(0,F.Cg)([(0,G.x4W)("aboutToggle"),(0,F.Sn)("design:type",j.l)],H.prototype,"_aboutToggle",void 0),(0,F.Cg)([(0,G.x4W)("statsToggle"),(0,F.Sn)("design:type",j.l)],H.prototype,"_statsToggle",void 0),(0,F.Cg)([(0,G.x4W)("spellsToggle"),(0,F.Sn)("design:type",j.l)],H.prototype,"_spellsToggle",void 0),(0,F.Cg)([(0,G.x4W)("aboutPanel"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_aboutPanel",void 0),(0,F.Cg)([(0,G.x4W)("statsPanel"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_statsPanel",void 0),(0,F.Cg)([(0,G.x4W)("spellsPanel"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_spellsPanel",void 0),(0,F.Cg)([(0,G.x4W)("learnMorePanel"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_learnMorePanel",void 0),(0,F.Cg)([(0,G.x4W)("tabsGridLayout"),(0,F.Sn)("design:type",G.JTA)],H.prototype,"_tabsGridLayout",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.nKb)("elementIconAtlas"),(0,F.Sn)("design:type",String)],H.prototype,"_elementIconAtlas",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.nKb)("elementIconFrameWater"),(0,F.Sn)("design:type",String)],H.prototype,"_elementIconFrameWater",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.nKb)("elementIconFrameFire"),(0,F.Sn)("design:type",String)],H.prototype,"_elementIconFrameFire",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.nKb)("elementIconFrameStorm"),(0,F.Sn)("design:type",String)],H.prototype,"_elementIconFrameStorm",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.nKb)("elementIconFrameEarth"),(0,F.Sn)("design:type",String)],H.prototype,"_elementIconFrameEarth",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.nKb)("elementIconFrameIce"),(0,F.Sn)("design:type",String)],H.prototype,"_elementIconFrameIce",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.nKb)("lockedIconAtlas"),(0,F.Sn)("design:type",String)],H.prototype,"_lockedIconAtlas",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.nKb)("lockedIconFrame"),(0,F.Sn)("design:type",String)],H.prototype,"_lockedIconFrame",void 0),(0,F.Cg)([(0,G.x4W)("fillBarAttackAndHearts"),(0,F.Sn)("design:type",$.s)],H.prototype,"_fillBarAttackAndHearts",void 0),(0,F.Cg)([(0,G.x4W)("fillBarHearts"),(0,F.Sn)("design:type",$.s)],H.prototype,"_fillBarHearts",void 0),(0,F.Cg)([(0,G.x4W)("textAttack"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_textAttack",void 0),(0,F.Cg)([(0,G.x4W)("textHearts"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_textHearts",void 0),(0,F.Cg)([(0,G.x4W)("textElement"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_textElement",void 0),(0,F.Cg)([(0,G.x4W)("iconContainerElement"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_iconContainerElement",void 0),(0,F.Cg)([(0,G.x4W)("textEvolveLevel"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_textEvolveLevel",void 0),(0,F.Cg)([(0,G.x4W)("rowObjectEvolveLevel"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_rowObjectEvolveLevel",void 0),(0,F.Cg)([(0,G.x4W)("textSpellsTitles"),(0,F.Sn)("design:type",Array)],H.prototype,"_textSpellsTitles",void 0),(0,F.Cg)([(0,G.x4W)("textSpellsLevel"),(0,F.Sn)("design:type",Array)],H.prototype,"_textSpellsLevel",void 0),(0,F.Cg)([(0,G.x4W)("textSpellsRange"),(0,F.Sn)("design:type",Array)],H.prototype,"_textSpellsRange",void 0),(0,F.Cg)([(0,G.x4W)("gridSpellsLevel"),(0,F.Sn)("design:type",Array)],H.prototype,"_gridSpellsLevel",void 0),(0,F.Cg)([(0,G.x4W)("gridSpellsRange"),(0,F.Sn)("design:type",Array)],H.prototype,"_gridSpellsRange",void 0),(0,F.Cg)([(0,G.x4W)("gridSpellsLevelOff"),(0,F.Sn)("design:type",Array)],H.prototype,"_gridSpellsLevelOff",void 0),(0,F.Cg)([(0,G.x4W)("gridSpellsRangeOff"),(0,F.Sn)("design:type",Array)],H.prototype,"_gridSpellsRangeOff",void 0),(0,F.Cg)([(0,G.x4W)("iconContainerSpells"),(0,F.Sn)("design:type",Array)],H.prototype,"_iconContainerSpells",void 0),(0,F.Cg)([(0,G.x4W)("textAbout"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_textAbout",void 0),H=(0,F.Cg)([(0,G.EVk)("PetStatsPanelPrefab")],H)},38097:(k,B,U)=>{"use strict";U.d(B,{O:()=>bt});var F=U(8674),G=U(62459),j=U(99625),$=U(35120),H=U(60881),V=U(49237),W=U(54422),q=U(43754),K=U(19592),z=U(72772),Y=U(91020),Q=U(11848),X=U(52894),Z=U(77065),J=U(65050),tt=U(96810),et=U(41674),it=U(215),st=U(46784),nt=U(13956),at=U(80060),rt=U(87821),ot=U(53661),ht=U(16847),ct=U(12696),dt=U(56461),lt=U(74951),ut=U(56345);const ft="Merge";class bt extends dt.A{get petDataProvider(){return this._petDataProvider}constructor(k,B,U,F,j){super(k,B,200,{},[]),this.prefabRoot=null,this._headerComponent=null,this._gameObject=null,this._headerGameObject=null,this._petDataProvider=null,this._petsMenuSetupCancelablePromises=[],this._levelPurchase=null,this._currentDataSchema=null,this.onLoaded=new G.HN0,this.isModal=!1,this.background.visible=!1,j&&(this._headerComponent=j),this._contentLayer=F,this._currentDataSchema=U}create(){super.create(),this._segment.featureCommon.sendInterfaceEvent({interfaceName:st.B.PetsWindow,interfaceType:et.Wm.Window,originType:et.$N.ButtonClick,originID:"pet_info_pop_up",instanceType:J.N.UI}),this._prefabLoader=$.q.instance.prodigy.gameContainer.get("d0e-64fd");const k=at.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,j.l.Pets_YourPetMenu,{PET_RESCUE_CREATURE_DATA:this._currentDataSchema,[ot.hi.YourPetPanelPetData]:this._currentDataSchema,[ot.oD.PetGearFtueOverlayEnabled]:z.I.shouldShowPetGearTutorialCached,[ot.hi.YourPetPanelMergeOnClick]:()=>this.showPetMergeSubMenu()});this._petsMenuSetupCancelablePromises.push(k),k.then((B=>{k.cancelled||this.setUpMenuPrefab(B)})).catch(G.RQr.createHandler("Unable to load Pets - Your Pet Menu prefab"));const B=at.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,j.l.Pets_YourPetMenuHeader,{});this._petsMenuSetupCancelablePromises.push(B),B.then((k=>{B.cancelled||this.setUpMenuHeaderPrefab(k)})).catch(G.RQr.createHandler("Unable to load Pets - Your Pet Menu Header prefab"))}setUpMenuPrefab(k){var B,U,F,j;k&&!this.destroyed&&(this._gameObject=k,this._contentLayer.addChild(this._gameObject.findComponentInChildren(G.y4o).getRootContainer()),this._petDataProvider=this._gameObject.findComponentInChildren(lt.z),null===(B=this._petDataProvider)||void 0===B||B.onLetPetGo.add(this.letPetGoConfirm,this),null===(U=this._petDataProvider)||void 0===U||U.onAddToTeam.add(this.addPetToTeamContinue,this),null===(F=this._petDataProvider)||void 0===F||F.onEvolvePet.add(this.onPetEvolved,this),this._levelPurchase=this._gameObject.findComponentInChildren(ut.R),null===(j=this._levelPurchase)||void 0===j||j.onLevelUpPurchased.add(this.onPetLevelledUp,this),this.setUpGearSubMenu(),$.q.instance.prodigy.audio.playSFX(66,"open-pet-submenu"),this.bindCoinDisplayToLevelPurchase(),Q.N.shouldShowPetMergeTutorial&&this.displayPetMergeFTUE(),this.onLoaded.dispatch())}setUpMenuHeaderPrefab(k){var B;if(!k||this.destroyed)return;this._headerGameObject=k,this._headerComponent&&(this._headerComponent.backToYourTeamButton.onClick.add(this.close,this),this._headerComponent.backToYourTeamButton.GameObject.addComponent(W.E).initialize(H.D.ESC,(()=>{var k;z.I.shouldShowPetGearTutorialCached||(null===(k=this._headerComponent)||void 0===k||k.onSubMenuEsc.dispatch(this),this.close())})));const U=this._headerGameObject.findComponentInChildren(G.y4o);null===(B=this.prefabRoot)||void 0===B||B.addChild(U.getRootContainer()),this.bindCoinDisplayToLevelPurchase()}bindCoinDisplayToLevelPurchase(){var k;if(!this._headerGameObject||!this._gameObject)return;const B=this._headerGameObject.findComponentInChildren(ct.L),U=this._gameObject.findComponentInChildren(ut.R);null==U||U.onLevelUpPurchased.add(B.animateNewCoinCount,B);const F=this._hardCurrencyDataProvider.getBalance(27),G=this._headerGameObject.findComponentInChildren(ht.n),j=this._headerGameObject.findComponentInChildren(Z.B);null==G||G.updateAmount(F),j&&(j.initialNumber=F,null===(k=this._hardCurrencyDataProvider)||void 0===k||k.onBalanceChanged.add((()=>{j.targetNumber=this._hardCurrencyDataProvider.getBalance(27),j.startCounter()}),this));const $=this._gameObject.findComponentInChildren(X.u);null==$||$.onMenuClose.add((()=>{const k=this._hardCurrencyDataProvider.getBalance(27);null==G||G.updateAmount(k),j.initialNumber=k}))}setUpGearSubMenu(){var k,B;if(!this._gameObject)return void G.VyI.log("[YourPetMenu]: Unable to set up gear sub menu, game object is null",G.$bb.Error);const U=this._gameObject.findComponentInChildren(G.bE_),F=U.Container.get("PetHatSlotContainer"),j=U.Container.get("PetRelicSlotContainer");null===(k=null==F?void 0:F.GameObject.findComponentInChildren(V.$))||void 0===k||k.onEnabledClick.add((()=>this.launchSubMenu("petHat"))),null===(B=null==j?void 0:j.GameObject.findComponentInChildren(V.$))||void 0===B||B.onEnabledClick.add((()=>this.launchSubMenu("petRelic"))),z.I.shouldShowPetGearTutorialCached&&this.displayPetGearFtue().catch(G.RQr.createHandler("[YourPetMenu] Error displaying pet gear ftue"))}displayPetGearFtue(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._gameObject)return void G.VyI.log("[YourPetMenu]: Unable to display pet gear ftue, game object is null",G.$bb.Error);$.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:"Pet_gear_tutorial",funnelType:"tutorial",stepName:tt.l.PetGearPetMenu},{step_index:3});const k=(yield z.I.getEquippablePetGears()).sort(((k,B)=>K.R[k.data.asset.type]-K.R[B.data.asset.type])),B=this._gameObject.findComponentInChildren(G.bE_),U=B.Container.get(ot.oD.PetGearFtueEnabledInputTransform),F=B.Container.get(Y.t.GEAR_TYPE_TO_SLOT_IDENTIFIER_MAP[k[0].data.asset.type]).GameObject.findComponent(G.XVE);U.GameObject.parent.setLayer("newHandLayer",!0),U.setPosition(F.worldPosition.x-F.widthDelta*F.pivot.x,F.worldPosition.y-F.heightDelta*F.pivot.y),U.fullWidth=F.fullWidth,U.fullHeight=F.fullHeight}))}displayPetMergeFTUE(){this.showPetMergeSubMenu()}letPetGoConfirm(){var k;null===(k=this._headerComponent)||void 0===k||k.onPetRelease.dispatch(this._currentDataSchema),this._headerComponent&&(this._headerComponent.startAutoTooltip($.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("PET_WAS_LET_GO")),this._headerComponent.onLetPetGo.dispatch()),this.close()}addPetToTeamContinue(){this._headerComponent&&this._headerComponent.onAddPetToTeam.dispatch(this._currentDataSchema),this.close()}onPetEvolved(){this._headerComponent&&this._headerComponent.onPetUpgraded.dispatch()}onPetLevelledUp(){this._headerComponent&&this._headerComponent.onPetUpgraded.dispatch()}showPetMergeSubMenu(){this.launchSubMenu(ft)}onPetMergeSubMenuClosed(){this.closeSubMenu()}launchSubMenu(k){var B;this._gameObject?this._headerComponent?(super.launchSubMenu(k),this.pauseMenu(),this._headerComponent.closeButton.GameObject.active=!1,this._headerComponent.yourTeamToggle.GameObject.parent.active=!1,k===ft?($.q.instance.prodigy.open.petMergeMenu(this._currentDataSchema,et.k.PetBook,(()=>{this.onPetMergeSubMenuClosed()})),this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(it.Eu.PetMergeSelectMerge)):(this._gameObject.active=!1,this._headerGameObject.active=!1,this._headerComponent.backToYourTeamButton.GameObject.active=!1,this._headerComponent.backToYourPetButton.GameObject.active=!0,$.q.instance.prodigy.open.yourPetGear(this._currentDataSchema,k,this._contentLayer,this._headerComponent)),null===(B=this._headerComponent.backToYourTeamButton.GameObject.findComponent(W.E))||void 0===B||B.destroy(),this._headerComponent.backToYourPetButton.onClick.add(this.closeSubMenu,this),this._headerComponent.onSubMenuClose.add(this.closeSubMenu,this),this._headerComponent.onSubMenuEsc.add(this.closeSubMenu,this)):G.VyI.log("[YourPetMenu]: Unable to launch sub menu, header component is not set up",G.$bb.Error):G.VyI.log("[YourPetMenu]: Unable to launch sub menu, game object is null",G.$bb.Error)}closeSubMenu(){return(0,F.sH)(this,void 0,void 0,(function*(){this.resumeMenu(),this.leaveSubMenu(),yield z.I.updateCachedPetGearTutorialFlag(),this._headerComponent&&(this._headerComponent.backToYourTeamButton.GameObject.active=!0,this._headerComponent.backToYourPetButton.GameObject.active=!1,this._headerComponent.backToYourPetButton.onClick.remove(this.closeSubMenu,this),this._headerComponent.onSubMenuClose.remove(this.closeSubMenu,this),this._headerComponent.onSubMenuEsc.remove(this.closeSubMenu,this),this._headerComponent.backToYourTeamButton.GameObject.addComponent(W.E).initialize(H.D.ESC,(()=>{var k;z.I.shouldShowPetGearTutorialCached||(null===(k=this._headerComponent)||void 0===k||k.onSubMenuClose.dispatch(this),this.close())}))),this._headerGameObject&&(this._headerGameObject.active=!0),this._gameObject&&(this._gameObject.active=!0,at.d.updateInjectedValues(this._gameObject,{PET_RESCUE_CREATURE_DATA:this._currentDataSchema,[ot.oD.PetGearFtueOverlayEnabled]:z.I.shouldShowPetGearTutorialCached}),this._gameObject.findComponentInChildren(lt.z).bindContext(),this._gameObject.findComponentInChildren(rt.o).bindContext())}))}cancelPetMenuLoading(){this._petsMenuSetupCancelablePromises.forEach((k=>k.cancel())),this.close()}destroy(){var k,B,U,F,G;this.onLoaded.dispose(),null===(k=this._hardCurrencyDataProvider)||void 0===k||k.onBalanceChanged.removeAll(this),this._petsMenuSetupCancelablePromises.forEach((k=>k.cancel())),this._petsMenuSetupCancelablePromises.length=0,this._headerComponent&&(this._headerComponent.backToYourPetButton.onClick.dispose(),this._headerComponent.onSubMenuClose.dispose(),this._headerComponent.onSubMenuEsc.dispose(),this._headerComponent.backToYourTeamButton.onClick.dispose(),null===(U=null===(B=this._headerComponent.backToYourTeamButton.GameObject)||void 0===B?void 0:B.findComponent(W.E))||void 0===U||U.destroy()),null===(F=this._gameObject)||void 0===F||F.destroy(),null===(G=this._headerGameObject)||void 0===G||G.destroy(),this._currentDataSchema=null,super.destroy()}}(0,F.Cg)([(0,nt.b)("5c7-e02d"),(0,F.Sn)("design:type",q.W)],bt.prototype,"_hardCurrencyDataProvider",void 0)},52142:(k,B,U)=>{"use strict";U.d(B,{Y:()=>$t});var F,G=U(8674),j=U(62459),$=U(88022),H=U(99625),V=U(35120),W=U(49237),q=U(72772),K=U(16383),z=U(11848),Y=U(73797),Q=U(96810),X=U(215),Z=U(80060),J=U(53661),tt=U(60881),et=U(54422),it=U(12420),st=U(11472),nt=U(5269),at=U(77938),rt=U(28152),ot=U(65231),ht=U(29834);let ct=F=class extends ot.s{hideContainer(){this._mainContainer?this._mainContainer.active=!1:j.VyI.log("EmptyPetCardComponent: Main container not set.",j.$bb.Warning)}resetToDefaultState(){this._mainContainer?this._animator?(this._mainContainer.active=!0,this._animator.GameObject.active=!1):j.VyI.log("EmptyPetCardComponent: Animator not set.",j.$bb.Warning):j.VyI.log("EmptyPetCardComponent: Main container not set.",j.$bb.Warning)}playUnlockAnimationAfterDelay(k){return(0,G.sH)(this,void 0,void 0,(function*(){this._animator?(yield j.Egh.timeout(k),this._animator.GameObject.active=!0,this._animator.playAnimation(F.UNLOCK_ANIMATION_STRING,!1,!0)):j.VyI.log("EmptyPetCardComponent: Animator not set.",j.$bb.Warning)}))}};ct.UNLOCK_ANIMATION_STRING="unlock-text",(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ct.prototype,"_mainContainer",void 0),(0,G.Cg)([(0,j.MnK)(ht.j),(0,G.Sn)("design:type",ht.j)],ct.prototype,"_animator",void 0),ct=F=(0,G.Cg)([(0,j.EVk)("EmptyPetCard",rt.Y.uiPet)],ct);var dt=U(16815),lt=U(90633),ut=U(22023),ft=U(89400);class bt extends ft.B{constructor(){super(...arguments),this._data=null}get data(){return this._data}updateContentView(k){this._data=k,this.onClick.add(k.callback)}resetData(){this.onClick.removeAll(),this._data=null}destroy(){this.onClick.dispose(),this._data=null,super.destroy()}}var pt=U(35189),vt=U(51972),gt=U(48199),mt=U(41674),yt=U(46784),_t=U(68370);class Et{constructor(k,B,U){this._isHighlightOn=!1,this._alphaEnabledOnDefaultCard=!1,this._alphaEnabledOnCurrentTeamPet=!1,this.onYourPetAdd=new j.HN0,this.onYourPetInfo=new j.HN0,this.onYourPetRelease=new j.HN0,this.onYourPetClicked=new j.HN0,this.onYourPetHighlightClicked=new j.HN0,this.onCellStateChanged=new j.HN0,this.clearState=new j.HN0,this.clearPetSelection=new j.HN0,this.onStackDrawerOpened=new j.HN0,this._tweenDrawerInSignal=new j.HN0,this._tweenDrawerOutSignal=new j.HN0,this._resetScrollSignal=new j.HN0,this._parentContainer=k,this._tooltip=B,this._scrollView=U,this._tooltipStartX=U.GameObject.legacyTransform.x,this._tooltipStartY=U.GameObject.legacyTransform.y;const F=V.q.instance.prodigy;this._segment=F.gameContainer.get("c47-20b6"),this._tooltip.displayTooltip({bodyText:"",arrowDirection:vt.i.RIGHT,arrowYRelPos:.5},null,!1,[()=>{this.onYourPetInfo.dispatch(this._tooltip.currentCreatureData),this.hideTooltip()},()=>{this._tooltip.toolTipComponent.GameObject.findComponentInChildren(j.JTA,!0).GameObject.children[0].findComponent(W.$).isStateLocked()?(F.open.overlayToolTip(gt.A.TOOLTIP_MANUAL,{bodyText:F.gameContainer.get(j.$Bt.LocalizationService).getText("PET_ALREADY_ON_TEAM"),xPosition:this._tooltip.toolTipComponent.GameObject.legacyTransform.x-74,yPosition:this._tooltip.toolTipComponent.GameObject.legacyTransform.y-79}),F.audio.playSFX(67,"button-disabled"),this.highlightAll(!1)):this.onYourPetAdd.dispatch(this._tooltip.currentCreatureData),this.hideTooltip()}]),this._tooltipParent=new j._mx,this._tooltipParent.layer="tooltip",this._tooltipParent.addComponent(j.dLy),this._tooltip.toolTipComponent.GameObject.parent=this._tooltipParent,_t.b.make(this._tooltipParent,this._tooltip.toolTipComponent.GameObject.legacyTransform)}initPetCardCell(k,B){const U=k.findComponentInChildren(dt.Z,!0),F=B?at.t.getItem("pet",B[0].ID):null;U.setPetData(B,F),U.updateDisplay(),k.findComponentInChildren(pt.e).SecondState=this._isHighlightOn,this.updatePetCardDisabledState(k);const G=k.findComponentInChildren(bt);G.onOver.add((k=>U.onInputOver.dispatch(null,k))),G.onOut.add((k=>U.onInputOut.dispatch(null,k)));const j={creatureData:B,callback:()=>{const F=k.findComponentInChildren(pt.e);if(U.getDisabledState())if(F.SecondState){const k=this._tooltipStartX+G.GameObject.legacyTransform.x+G.GameObject.legacyTransform.width-74,B=this._tooltipStartY+G.GameObject.legacyTransform.y+5+this._scrollView.contentView.legacyTransform.y;this.showAlreadyOnTeamTooltip(k,B)}else this.clearState.dispatch();else if(F.SecondState&&this._tooltip.isActive())this.highlightAll(!1);else if(F.SecondState&&!this._tooltip.isActive())this.onYourPetHighlightClicked.dispatch(B[0]);else{const k=this._tooltipStartX+G.GameObject.legacyTransform.x+20,F=this._tooltipStartY+G.GameObject.legacyTransform.y+G.GameObject.legacyTransform.height/2+this._scrollView.contentView.legacyTransform.y;this.showCreatureContextTooltip(k,F,B[0]),U.setSelectable(!0)}}};G.updateContentView(j)}resetPetCardCell(k){const B=k.findComponentInChildren(bt);B&&B.resetData()}highlightAll(k,B=!0){this._isHighlightOn=k,this.onCellStateChanged.dispatch((k=>{k.findComponentInChildren(pt.e,!0).SecondState=this._isHighlightOn})),B&&this.hideTooltip()}setAlphaState(k,B){this._alphaEnabledOnDefaultCard=k,this._alphaEnabledOnCurrentTeamPet=B,this.onCellStateChanged.dispatch((k=>{this.updatePetCardDisabledState(k)}))}updatePetCardDisabledState(k){const B=k.findComponentInChildren(dt.Z,!0);(this._alphaEnabledOnDefaultCard&&!k.findComponentInChildren(pt.e,!0).SecondState||this._alphaEnabledOnCurrentTeamPet&&B.isOnTeam())&&1===B.creatureData.length?B.setDisabledState(!0):B.setDisabledState(!1)}showCreatureContextTooltip(k,B,U){this._segment.featureCommon.sendButtonEvent({buttonName:"pet",destinationName:"pet_info_pop_up",interfaceType:mt.Wm.Popup,interfaceName:yt.B.PetsWindow,saveClickInfo:"pet_info_pop_up"}),this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(X.Eu.PetMergeSelectPet),this.onYourPetClicked.dispatch(),this.onYourPetInfo.dispatch(U),this.highlightAll(!1,!1)}showAlreadyOnTeamTooltip(k,B){const U=V.q.instance.prodigy;U.audio.playSFX(67,"button-disabled");const F=U.open.overlayToolTip(gt.A.TOOLTIP_MANUAL,{bodyText:U.gameContainer.get(j.$Bt.LocalizationService).getText("PET_ALREADY_ON_TEAM"),xPosition:Math.floor(k),yPosition:Math.floor(B)});F.onCreate.addOnce((()=>{F.ui.parent=this._tooltipParent}))}hideTooltip(){this._tooltip.hideTooltip()}cleanup(){this.onYourPetAdd.dispose(),this.onYourPetInfo.dispose(),this.onYourPetRelease.dispose(),this.onYourPetClicked.dispose(),this.onCellStateChanged.dispose(),this.clearState.dispose(),this.clearPetSelection.dispose(),this.onStackDrawerOpened.dispose(),this.onYourPetHighlightClicked.dispose(),this._tweenDrawerInSignal.dispose(),this._tweenDrawerOutSignal.dispose(),this._resetScrollSignal.dispose(),this._tooltip=null,this._tooltipParent.destroy()}}class wt{get toolTipComponent(){return this._toolTipComponent}get currentCreatureData(){return this._currentCreatureData}set dismissCallback(k){this._tooltipCancelAction=k}constructor(k,B){this._tooltipCancelAction=null,this._currentCreatureData=null,this.onTooltipDisplayed=new j.HN0,this._parentGameObject=k,this._prefabID=B}initCloseArea(k,B){this._tooltipButtonContainer=k,this._tooltipButtonContainer.findComponent(W.$).onClick.add(this.closeAreaClicked,this),this._tooltipButtonContainer.active=!1,B&&(this._tooltipCancelAction=B),this._tooltipButtonContainer.findComponent(W.$).inputEnabled=!1}displayTooltip(k,B,U=!0,F){this._currentCreatureData=B,this._toolTipComponent=gt.A.displayToolTipButtonGrid(this._toolTipComponent,this._parentGameObject,k,this._prefabID,U,F),this._tooltipButtonContainer.active=U,U&&this.onTooltipDisplayed.dispatch()}hideTooltip(){this._tooltipButtonContainer.active=!1,this._toolTipComponent.close(),this._currentCreatureData=null}closeAreaClicked(){this.hideTooltip(),this._tooltipCancelAction&&this._tooltipCancelAction()}isActive(){return!!this._toolTipComponent&&this._toolTipComponent.GameObject.active}cleanup(){this._tooltipButtonContainer&&(this._tooltipButtonContainer.findComponent(W.$).onClick.dispose(),this._tooltipButtonContainer=null),this._tooltipCancelAction=null,this._currentCreatureData=null,this.onTooltipDisplayed.dispose()}}class Tt{get panelGameObject(){return this._panelGameObject}get cardStateManager(){return this._cardStateManager}constructor(k,B,U){this._allocatedPetCardPoolSize=12,this._allocatedEmptySlotPoolSize=12,this._maxActiveSize=0,this._petScrollList=[],this._panelGameObject=null,this._scrollView=null,this._scrollBar=null,this._gridLayout=null,this._scrollUpdater=new j._mx,this._trashContainerGO=null,this._noPetsMessageGameObject=null,this._upInputObject=new j._mx,this._downInputObject=new j._mx,this._startIndexOfCurrentRange=0,this._cachedContentViewLastY=0,this._nextContentViewY=0,this._prevContentViewY=0,this._minContentViewY=180,this._maxRowIndex=0,this._isLoading=!0,this.tooltipContainer=null,this._numEmptySlotsToAnimateOnNextUpdate=0,this._inputScrollLocked=!1,this._player=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;const F=V.q.instance.prodigy.gameContainer.get("d0e-64fd");this._panelGameObject=F.loadFromGUID(H.l.Pets_OwnedPetsScrollviewPanel),k.addChild(this._panelGameObject.legacyTransform.group),this._gridLayout=this._panelGameObject.findComponentInChildren(j.JTA),this._scrollView=this._panelGameObject.findComponentInChildren(st.B),this._scrollBar=this._panelGameObject.findComponentInChildren(it.$),this._trashContainerGO=new j._mx,this._trashContainerGO.addComponent(j.K16),this._panelGameObject.addChild(this._trashContainerGO),this._trashContainerGO.legacyTransform.x=0,this._trashContainerGO.legacyTransform.y=730,this._petCardPool=new j.iyL(this.createPetCard.bind(this),null,this.recyclePetCard.bind(this)),this._petCardPool.allocate(this._allocatedPetCardPoolSize),this._emptySlotPool=new j.iyL(this.createEmptySlotCard.bind(this),null,this.recycleEmptySlotCard.bind(this)),this._emptySlotPool.allocate(this._allocatedEmptySlotPoolSize),this._maxActiveSize=this._allocatedPetCardPoolSize,this._startIndexOfCurrentRange=0,this._nextContentViewY=this.calcNextYThreshold(),this._prevContentViewY=this.calcPrevYThreshold(),this._noPetsMessageGameObject=this._panelGameObject.findComponentInChildren(j.EYj).GameObject.parent,this._noPetsMessageGameObject.active=!1,this.tooltipParent=new j._mx,this.tooltipParent.addComponent(j.K16);const G=H.l.Pets_ButtonTooltipOwnedPanel;this.tooltipContainer=new wt(this.tooltipParent,G),this.tooltipContainer.initCloseArea(this._panelGameObject.findComponentInChildren(W.$).GameObject),this._cardStateManager=new Et(k,this.tooltipContainer,this._scrollView),this._cardStateManager.onCellStateChanged.add(this.cellStateChangedHandler,this),this.tooltipContainer.dismissCallback=()=>{this._cardStateManager.highlightAll(!1)},this._scrollUpdater.update=()=>{this.update()},this._panelGameObject.addChild(this._scrollUpdater),this.setPetList(U),this.cardStateManager.onYourPetHighlightClicked.add(B.sendData,B),this.cardStateManager.clearState.add(B.clearStates,B),this.cardStateManager.clearPetSelection.add(B.clearPetSelection,B),this.cardStateManager.onYourPetAdd.add(B.dispatchAddSignal,B),this.cardStateManager.onYourPetClicked.add(B.reportClick,B),this._scrollBar.onInputUp.add(this.scrollBarClickedHandler,this),this._panelGameObject.addChild(this._upInputObject),this._panelGameObject.addChild(this._downInputObject),this._upInputObject.addComponent(et.E).initialize(tt.D.UP,this.onKeyboardUp.bind(this),!0),this._downInputObject.addComponent(et.E).initialize(tt.D.DOWN,this.onKeyboardDown.bind(this),!0)}onKeyboardUp(){!this._inputScrollLocked&&this._panelGameObject.active&&this._scrollView.scrollByPixels(15,nt.H.Vertical)}onKeyboardDown(){!this._inputScrollLocked&&this._panelGameObject.active&&this._scrollView.scrollByPixels(-15,nt.H.Vertical)}setInputScrollEnabled(k=!0){this._inputScrollLocked=k,this._scrollView.allowMouseWheel=k,this._scrollView.allowTouch=k}createPetCard(){const k=V.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromGUID(H.l.Pets_OwnedPetCardwithmergerank);return k.addComponent(bt),k}createEmptySlotCard(){return V.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromGUID(H.l.Pets_EmptySlotCard)}recyclePetCard(k){k.findComponentInChildren(dt.Z,!0).clearCard(),k.legacyTransform.x=0,k.legacyTransform.y=0,this._trashContainerGO.addChild(k)}recycleEmptySlotCard(k){k.legacyTransform.x=0,k.legacyTransform.y=0,this._trashContainerGO.addChild(k)}setPetList(k,B=0){for(this._isLoading=!0,this.scrollToPercent(0),this._startIndexOfCurrentRange=0,this._nextContentViewY=this.calcNextYThreshold(),this._prevContentViewY=this.calcPrevYThreshold(),this._numEmptySlotsToAnimateOnNextUpdate=B;!this._gridLayout.isEmpty();)this.removeCard();if(k){const B=ut.P8.sortPetList(k).map((k=>[k]));this._petScrollList=B.map((k=>({petData:k,addCardMethod:this.addPetCard.bind(this,k),removeCardMethod:this.onPetCardRemoved.bind(this),gridLayoutIndex:-1})))}this._maxRowIndex=Math.ceil((this._petScrollList.length-this._maxActiveSize)/this._gridLayout.fixedColumnCount);const U=Math.ceil(this._petScrollList.length/this._gridLayout.fixedColumnCount);this._scrollView.contentView.legacyTransform.dimensionPlaceholder.height=this._gridLayout.yPositionOffset+U*this._gridLayout.rowSpacing,this._noPetsMessageGameObject.active=this._petScrollList.length<=0,this.addActivePetCardRange()}addCardFromScrollList(k,B=!1){this._petScrollList[k].addCardMethod(B),B&&this._petScrollList.forEach((k=>{k.gridLayoutIndex>=0&&(k.gridLayoutIndex+=1)})),this._petScrollList[k].gridLayoutIndex=B?0:this._gridLayout.GameObject.children.length-1}addActivePetCardRange(){for(let k=0;k=this._maxActiveSize);k++)this.addCardFromScrollList(k);this._gridLayout.indexOffset=this._startIndexOfCurrentRange,this._gridLayout.updateAll(!1),this._isLoading=!1}hideFtueGuideHands(){var k;(null===(k=this._ftuePetCard)||void 0===k?void 0:k.ftueGuideHand)&&(this._ftuePetCard.ftueGuideHand.active=!1)}addPetCard(k,B=!1){const U=this._petCardPool.getObject().findComponentInChildren(dt.Z,!0);this._cardStateManager.initPetCardCell(U.GameObject,k),B?this._gridLayout.GameObject.addChildAt(U.GameObject,0):this._gridLayout.GameObject.addChild(U.GameObject),!q.I.shouldShowPetGearTutorialCached&&this.petEligibleForUpgradeTutorial(k)&&(this._ftuePetCard=U,this._ftuePetCard.ftueGuideHand.active=!0)}petEligibleForUpgradeTutorial(k){return!V.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(lt.B.FEATURE_PET_UPGRADE_FTUE,lt.B.BREADCRUMB_LEVELLED_UP_PET_FIRST_TIME)&&!this._ftuePetCard&&k.some((k=>k.levelk.gridLayoutIndex===U));G&&(G.gridLayoutIndex=-1,G.removeCardMethod(F),k&&this._petScrollList.forEach((k=>{k.gridLayoutIndex>=1&&(k.gridLayoutIndex-=1)})))}onPetCardRemoved(k){this._cardStateManager.resetPetCardCell(k),this._petCardPool.recycleObject(k)}onEmptySlotRemoved(k){this._emptySlotPool.recycleObject(k)}updateAllActiveCards(){this._petCardPool.aliveList.forEach((k=>{k.findComponentInChildren(dt.Z,!0).updateDisplay()}))}cellStateChangedHandler(k){this._petCardPool.aliveList.forEach(k)}scrollToPercent(k){this._scrollView.scrollToPercent(k,nt.H.Vertical),this.tooltipContainer.isActive()&&this._cardStateManager.highlightAll(!1)}scrollToPet(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=!0){const U=this._petScrollList.indexOf(k);if(U<0)return void j.VyI.log("[OwnedPetsPanel.scrollToPet] Pet scroll card not found",j.$bb.Warning,k);const F=Math.floor(U/this._gridLayout.fixedColumnCount)/Math.ceil(this._petScrollList.length/this._gridLayout.fixedColumnCount);this._scrollView.update(),B&&(yield this._scrollView.scrollToPercentTween(F,nt.H.Vertical,300)),this._scrollView.scrollToPercent(F,nt.H.Vertical)}))}getFirstGearEnabledPet(){return this._petScrollList.find((k=>{var B;return(null===(B=at.t.getItem("pet",k.petData[0].ID).data.gearEquipSlots)||void 0===B?void 0:B.length)>0}))}findCardForPet(k){return this._petScrollList.find((B=>B.petData[0].ID===k.ID))}scrollBarClickedHandler(){this.tooltipContainer.isActive()&&this._cardStateManager.highlightAll(!1)}update(){if(this._scrollView.contentView.legacyTransform.y!==this._cachedContentViewLastY&&!this._isLoading){this._cachedContentViewLastY=this._scrollView.contentView.legacyTransform.y;const k=Math.abs(this._cachedContentViewLastY);if(k>this._nextContentViewY)if(this._isLoading=!0,this._startIndexOfCurrentRange+this._maxActiveSize>=this._petScrollList.length)this._nextContentViewY=this._scrollView.contentView.legacyTransform.height,this._prevContentViewY=this.calcPrevYThreshold(),this._isLoading=!1;else{let B=k-this._minContentViewY;B<0&&(B=0);let U=Math.ceil(B/this._gridLayout.rowSpacing);U>this._maxRowIndex&&(U=this._maxRowIndex);const F=U*this._gridLayout.fixedColumnCount;let G=F-this._startIndexOfCurrentRange;if(this._startIndexOfCurrentRange=F,this._nextContentViewY=this.calcNextYThreshold(),this._prevContentViewY=this.calcPrevYThreshold(),G>0){G>this._maxActiveSize&&(G=this._maxActiveSize);for(let B=0;Bthis._maxRowIndex&&(U=this._maxRowIndex);const F=U*this._gridLayout.fixedColumnCount;let G=this._gridLayout.GameObject.children.length%this._gridLayout.fixedColumnCount;0===G&&(G=this._gridLayout.fixedColumnCount);let j=this._startIndexOfCurrentRange-F-this._gridLayout.fixedColumnCount;j>this._maxActiveSize-this._gridLayout.fixedColumnCount&&(j=this._maxActiveSize-this._gridLayout.fixedColumnCount);const $=j+G;for(let k=0;k<$;k++)this.removeCard();let H=this._startIndexOfCurrentRange-F;H>this._maxActiveSize&&(H=this._maxActiveSize),this._startIndexOfCurrentRange=F;for(let k=H-1;k>=0;k--)this._startIndexOfCurrentRange+k0&&this.playNewEmptySlotAnimations()}calcNextYThreshold(){return this._minContentViewY+Math.floor(this._startIndexOfCurrentRange/this._gridLayout.fixedColumnCount)*this._gridLayout.rowSpacing}calcPrevYThreshold(){if(0===this._startIndexOfCurrentRange)return 0;return this._minContentViewY+Math.floor((this._startIndexOfCurrentRange-1)/this._gridLayout.fixedColumnCount)*this._gridLayout.rowSpacing}pause(){this._cardStateManager.highlightAll(!1),this._cardStateManager.setAlphaState(!1,!1),this._panelGameObject.active=!1}resume(){var k;this._panelGameObject.active=!0,null===(k=this._scrollView)||void 0===k||k.updateScrollEnabled(nt.H.Vertical)}destroyPanel(){const k=k=>{k.findComponentInChildren(dt.Z,!0).cleanupCacheAsBitmap()};this._petCardPool.aliveList.forEach(k),this._petCardPool.deadList.forEach(k),this._petCardPool.destroy(!0),this._emptySlotPool.destroy(!0),this._upInputObject.destroy(),this._downInputObject.destroy(),this._cardStateManager.cleanup(),this._cardStateManager.onCellStateChanged.remove(this.cellStateChangedHandler,this),this.tooltipContainer.cleanup(),this._scrollBar.onInputUp.remove(this.scrollBarClickedHandler,this),this._scrollBar.destroy(),this._scrollView.destroy(),this._cardStateManager=null}playNewEmptySlotAnimations(){const k=this._gridLayout.GameObject.children;if(k.length>this._numEmptySlotsToAnimateOnNextUpdate){k.slice(-this._numEmptySlotsToAnimateOnNextUpdate).forEach(((k,B)=>{const U=k.findComponentInChildren(ct,!0);U&&(U.hideContainer(),U.playUnlockAnimationAfterDelay((B+1)*Tt.EMPTY_PET_SLOTS_ANIMATION_STAGGER_TIME))}))}this._numEmptySlotsToAnimateOnNextUpdate=0}}Tt.EMPTY_PET_SLOTS_ANIMATION_STAGGER_TIME=100;var St,At=U(56461),Ct=U(129),Ot=U(63693);class It{}It.LEADER_TOOLTIP_SHOWN=!1,function(k){k[k.NoState=1]="NoState",k[k.AddFromTeamCard=2]="AddFromTeamCard",k[k.AddFromPetCard=4]="AddFromPetCard",k[k.EditingTeamCard=8]="EditingTeamCard",k[k.EditingPlayerCard=16]="EditingPlayerCard",k[k.AddingToTeamCard=10]="AddingToTeamCard",k[k.CanAdd=14]="CanAdd",k[k.EditMode=24]="EditMode"}(St||(St={}));class Dt{get petTeam(){return this._kennel.petTeam}get sendCardUpdateSignal(){return this._sendCardUpdateSignal}get sendStateSignal(){return this._sendStateSignal}get addPetToTeamComplete(){return this._addPetToTeamComplete}get mustHaveLeaderSignal(){return this._mustHaveLeaderSignal}constructor(k){this._kennel=k,this._sendStateSignal=new j.HN0,this._sendCardUpdateSignal=new j.HN0,this._addPetToTeamComplete=new j.HN0,this._mustHaveLeaderSignal=new j.HN0,this._kennel.setPlayerToFrontPosition(),this._kennel.setPetToTopPosition()}addStateReceiver(k){this.sendStateSignal.add(k.receivePanelStates,k)}sendStateUpdate(k){this.sendStateSignal.dispatch(k)}addCardUpdateReceiver(k){this.sendCardUpdateSignal.add(k.receiveCardUpdates,k)}sendCardUpdates(){this.sendCardUpdateSignal.dispatch()}receivePetData(k,B){0!=(this._currentActionState&St.CanAdd)&&this.completeAdd(k,B)}onCardClicked(){this.clearActionState(),this.addCancelAction()}add(k,B=null){const U=this._kennel.findEmptyTeamIndex();!j.Aq$.isDefined(B)&&U>=0?(this._kennel.setTeamPosition(k,U),this.completeAction(),this.addPetToTeamComplete.dispatch(),V.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendTeamUpdatedEvent(at.t.getItem("pet",k.ID).data.name,null,{pet_added_level:k.level,pet_added_rank:ut.P8.getPetDisplayMergeRank(k.ID,k.uniqueID)})):(this.setInitialData(k,B),this._currentActionState=j.Aq$.isDefined(B)?St.AddFromTeamCard:St.AddFromPetCard,this.sendStateUpdate(this._currentActionState))}completeAdd(k,B){const U=0!=(this._currentActionState&St.AddingToTeamCard),F=U?k:this._initialPetAddData;let G=U?this._initialPosition:B;const $=this._kennel.getTeamPosition(G)?this._kennel.getTeamPosition(G).getName():null;F&&j.Aq$.isDefined(G)?(j.Aq$.isDefined(F.team)&&this._kennel.removeAtTeamPosition(F.team),this._kennel.setTeamPosition(F,G),this._kennel.setPetToTopPosition(),G=1,V.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendTeamUpdatedEvent(at.t.getItem("pet",F.ID).data.name,$,{pet_added_level:F.level,pet_added_rank:ut.P8.getPetDisplayMergeRank(F.ID,F.uniqueID)}),this._currentActionState===St.EditingTeamCard?(this.setInitialData(F,G),this.updateDisplays()):this.completeAction(),this.addPetToTeamComplete.dispatch()):this.clearActionState()}editStart(k,B){this.petTeam[B]instanceof Ct.a?this._currentActionState=St.EditingPlayerCard:(this.setInitialData(k,B),this._currentActionState=St.EditingTeamCard),this.sendStateUpdate(this._currentActionState)}editFinish(){this.completeAction()}swap(k,B){var U,F,G,j;const $=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;V.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendTeamPositionChangedEvent({character:(null===(U=this._kennel.getTeamPosition(B))||void 0===U?void 0:U.getName())===$.getName()?"player":null===(F=this._kennel.getTeamPosition(B))||void 0===F?void 0:F.getName(),position_new:Object.values(Ot.Io)[k],position_old:Object.values(Ot.Io)[B],character_2:(null===(G=this._kennel.getTeamPosition(k))||void 0===G?void 0:G.getName())===$.getName()?"player":null===(j=this._kennel.getTeamPosition(k))||void 0===j?void 0:j.getName()}),this._kennel.swapTeamPositions(k,B),this._currentActionState===St.EditingTeamCard&&(this._initialPosition=k),this.updateDisplays(),V.q.instance.prodigy.audio.playSFX(62,"moving-pet")}remove(k){V.q.instance.prodigy.audio.playSFX(62,"moving-pet"),V.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendTeamUpdatedEvent(null,this._kennel.getTeamPosition(k).getName()),this._kennel.removeAtTeamPosition(k),0===k&&(this._kennel.swapTeamPositions(k,this._kennel.findFirstFilledIndex()),It.LEADER_TOOLTIP_SHOWN||(It.LEADER_TOOLTIP_SHOWN=!0,this.mustHaveLeaderSignal.dispatch())),this._kennel.setPetToTopPosition(),this.completeAction()}release(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=k.team,U=ut.P8.getPetDisplayMergeRank(k.ID,k.uniqueID);yield this._kennel.removePet(k),0===B&&(this._kennel.swapTeamPositions(B,this._kennel.findFirstFilledIndex()),It.LEADER_TOOLTIP_SHOWN||(It.LEADER_TOOLTIP_SHOWN=!0,this.mustHaveLeaderSignal.dispatch()));const F=at.t.getItem("pet",k.ID);V.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendPetReleasedEvent(F.name,k.level,{pet_rank:U}),this.completeAction()}))}updateDisplays(){this.sendCardUpdates(),this.sendStateUpdate(this._currentActionState)}completeAction(){this.clearStoredData(),this.updateDisplays()}setInitialData(k,B){this._initialPetAddData=k,this._initialPosition=B}clearActionState(){this.clearStoredData(),this.sendStateUpdate(this._currentActionState)}clearPetSelection(){this._currentActionState===St.NoState&&this.clearActionState()}addCancelAction(){this.cancelButton.onClick.addOnce(this.clearActionState,this)}removeCancelAction(){this.cancelButton.onClick.removeAll(this)}clearStoredData(){this._initialPetAddData=null,this._initialPosition=null,this.removeCancelAction(),this._currentActionState=St.NoState}clearSignals(){this._sendCardUpdateSignal.dispose(),this._sendStateSignal.dispose(),this._addPetToTeamComplete.dispose(),this._mustHaveLeaderSignal.dispose()}}var Rt,Pt=U(46168),Mt=U(6413),Nt=U(57349),xt=U(41851),Lt=U(19690);class kt{static createEmptyTeamCard(k,B){const U=(0,Lt.Ks)().loadFromGUID(H.l.Pets_EmptyTeamCard),F=U.findComponentInChildren(Nt.$);return F.addSignal.add(k.dispatchAddSignal,k),F.addClickListener(k),F.addDataReceiver(k),F.teamPosition=B,U.active=!1,F}static createFilledTeamCard(k,B){const U=(0,Lt.Ks)().loadFromGUID(H.l.Pets_FilledTeamCard),F=U.findComponentInChildren(Pt.Q);return F.editSignal.add(k.openToolTip,k),F.addClickListener(k),F.addDataReceiver(k),F.teamPosition=B,U.active=!1,F}static createTeamSwapPanel(k,B,U){const F=(0,Lt.Ks)().loadFromGUID(H.l.Pets_TeamSwapUI);k.addChild(F.legacyTransform.group);const G=F.findComponentInChildren(xt.v);return G.finishEditingSignal.add(B.dispatchEditFinishSignal,B),G.swapSignal.add(B.dispatchSwapSignal,B,1),G.swapSignal.add(U.moveTeamSwapPanel,U,0),G.failedSwapSignal.add(B.openTeamMustHaveALeaderTooltip,B),G.setActive(!1),G}static createPetMenuToolTip(k,B){const U=new wt(B,k);return U.initCloseArea(B.findComponentInChildren(W.$).GameObject),U}static createTeamCardToolTip(k,B){const U=kt.createPetMenuToolTip(H.l.Pets_RevampButtonTooltipTeamPanel,k);return U.displayTooltip({bodyText:"",arrowDirection:vt.i.LEFT,arrowYRelPos:.5},null,!1,[()=>B.startEditing(U.currentCreatureData,U.currentCreatureData.team),()=>B.launchReleaseConfirmation(U.currentCreatureData),()=>B.dispatchRemoveSignal(U.currentCreatureData.team)]),U}static openTeamMustHaveALeaderTooltip(k){V.q.instance.prodigy.open.overlayToolTip(gt.A.TOOLTIP_MANUAL,{bodyText:V.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TEAM_MUST_HAVE_A_LEADER"),xPosition:k.legacyTransform.x+42,yPosition:k.legacyTransform.y+200})}}!function(k){k[k.WIZARD_FRONT=0]="WIZARD_FRONT",k[k.WIZARD_BACK=1]="WIZARD_BACK"}(Rt||(Rt={}));class Bt{get onYourPetMove(){return this._onYourPetMove}get onYourPetRemove(){return this._onYourPetRemove}get anchorCard(){return this.filledTeamCards[1].GameObject}constructor(k,B){this._panelGameObject=null,this._layout=null,this._tooltipContainer=null,this._teamSwapPanel=null,this._onYourPetMove=new j.HN0,this._onYourPetRemove=new j.HN0;const U=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=V.q.instance.prodigy.gameContainer.get("d0e-64fd");this._panelGameObject=F.loadFromGUID(H.l.Pets_TeamPanel),k.addChild(this._panelGameObject.legacyTransform.group);const G=this._panelGameObject.findComponentsInChildren(j.BKH);this._layout=G[Rt.WIZARD_BACK],this.createTeamCards(B),this.updateTeamCards(U.kennel.petTeam),this._teamSwapPanel=kt.createTeamSwapPanel(k,B,this),this._tooltipContainer=kt.createTeamCardToolTip(this._panelGameObject,B),this._tooltipParent=new j._mx,this._tooltipParent.layer="tooltip",this._tooltipParent.addComponent(j.dLy),this._tooltipContainer.toolTipComponent.GameObject.parent=this._tooltipParent,_t.b.make(this._tooltipParent,this._tooltipContainer.toolTipComponent.GameObject.legacyTransform),this.setInputEnableAll(!0,!1),this.localizeTeamPanel()}updateTeamCards(k){for(const B of[...this._layout.GameObject.children])B.parent=null;for(let B=0;B!k.isSelected))),B.forEach((k=>{k.containsPlayer?k.setPlayerState():k.setDefaultState()}))}setAddModeAll(k){let B=this.activeTeamCards;k&&(B=this.activeTeamCards.filter((k=>!k.containsPlayer))),B.forEach((k=>{k instanceof Pt.Q&&k.setAddMode()}))}setAlphaAll(k,B){this.activeTeamCards.forEach((U=>{U.containsPlayer?U.enableTransparency(B):U.enableTransparency(k)}))}setInputEnableAll(k,B){this.activeTeamCards.forEach((U=>{U.containsPlayer?U.enableCardInput(B):U.enableCardInput(k)}))}setTeamSwapPanelActive(k){this._teamSwapPanel.setActive(k)}hideToolTip(){this._tooltipContainer.hideTooltip()}noState(){this.setTeamSwapPanelActive(!1),this.hideToolTip(),this.setAllToDefaultState()}addFromPetCard(){this.setTeamSwapPanelActive(!1),this.hideToolTip(),this.setAddModeAll(!0),this.setAlphaAll(!1,!0),this.setInputEnableAll(!0,!1)}pause(){this.noState(),this._panelGameObject.active=!1}resume(){this._panelGameObject.active=!0}destroyPanel(){this.activeTeamCards.forEach((k=>{var B;null===(B=k.GameObject)||void 0===B||B.destroy()})),this.emptyTeamCards.forEach((k=>{var B;null===(B=k.GameObject)||void 0===B||B.destroy()})),this.filledTeamCards.forEach((k=>{var B;null===(B=k.GameObject)||void 0===B||B.destroy()})),this._tooltipContainer.cleanup(),this._tooltipParent.destroy(),this._onYourPetMove.dispose(),this._onYourPetRemove.dispose()}}var Ut=U(38097);class Ft{get sendDataSignal(){return this._sendDataSignal}get sendClickSignal(){return this._sendClickSignal}get addSignal(){return this._addSignal}get clearSignal(){return this._clearSignal}get clearPetSelectionSignal(){return this._clearPetSelectionSignal}get onYourPetInfo(){return this._onYourPetInfo}constructor(k){this._sendDataSignal=new j.HN0,this._addSignal=new j.HN0,this._clearSignal=new j.HN0,this._clearPetSelectionSignal=new j.HN0,this._onYourPetInfo=new j.HN0,this.createSignals(),this.addDataReceiver(k),this.addClickListener(k),this.addKennelListener(k),k.addCardUpdateReceiver(this),k.addStateReceiver(this),this.clearSignal.add(k.clearActionState,k),this.clearPetSelectionSignal.add(k.clearPetSelection,k)}createSignals(){this._sendDataSignal=new j.HN0,this._addSignal=new j.HN0,this._sendClickSignal=new j.HN0,this._clearSignal=new j.HN0,this._clearPetSelectionSignal=new j.HN0}addDataReceiver(k){this.sendDataSignal.add(k.receivePetData,k)}addKennelListener(k){this.addSignal.add(k.add,k)}addClickListener(k){this.sendClickSignal.add(k.onCardClicked,k)}reportClick(){this.sendClickSignal.dispatch()}clearStates(){this.clearSignal.dispatch()}clearPetSelection(){this.clearPetSelectionSignal.dispatch()}sendData(k,B){this.sendDataSignal.dispatch(k,B)}dispatchAddSignal(k,B){this.addSignal.dispatch(k,B)}receiveCardUpdates(){this.updateCards()}receivePanelStates(k){this.updatePanelState(k)}updateCards(){throw new Error("Method not implemented.")}updatePanelState(k){throw new Error("Method not implemented.")}disposeController(){this._sendClickSignal.dispose(),this._onYourPetInfo.dispose(),this._sendDataSignal.dispose(),this._addSignal.dispose(),this._clearSignal.dispose(),this._clearPetSelectionSignal.dispose()}}class Gt extends Ft{set ownedPetsPanel(k){this._ownedPetsPanel=k}get ownedPetsPanel(){return this._ownedPetsPanel}constructor(k){super(k),this._teamController=k}updateCards(){this._ownedPetsPanel.updateAllActiveCards()}updatePanelState(k){switch(k){case St.NoState:this.noState();break;case St.AddFromTeamCard:case St.EditingTeamCard:this.addFromTeamCard();break;case St.AddFromPetCard:this.addFromPetCard()}}noState(){this.ownedPetsPanel.cardStateManager.highlightAll(!1),this.ownedPetsPanel.cardStateManager.setAlphaState(!1,!1)}addFromTeamCard(){this.ownedPetsPanel.cardStateManager.highlightAll(!0),this.ownedPetsPanel.cardStateManager.setAlphaState(!0,!0)}addFromPetCard(){this.ownedPetsPanel.cardStateManager.setAlphaState(!0,!0)}}class jt extends Ft{get swapSignal(){return this._swapSignal}get removeSignal(){return this._removeSignal}get editStartSignal(){return this._editStartSignal}get editFinishSignal(){return this._editFinishSignal}set teamPanel(k){this._teamPanel=k}get teamPanel(){return this._teamPanel}constructor(k){super(k),this.releaseSignal=new j.HN0,this.infoSignal=new j.HN0,this._teamController=k,this._teamController.mustHaveLeaderSignal.add(this.openTeamMustHaveALeaderTooltip,this)}createSignals(){super.createSignals(),this._swapSignal=new j.HN0,this._removeSignal=new j.HN0,this._editStartSignal=new j.HN0,this._editFinishSignal=new j.HN0}addKennelListener(k){super.addKennelListener(k),this.swapSignal.add(k.swap,k),this.removeSignal.add(k.remove,k),this.editStartSignal.add(k.editStart,k),this.editFinishSignal.add(k.editFinish,k)}updateCards(){this.teamPanel.updateTeamCards(this._teamController.petTeam)}updatePanelState(k){switch(k){case St.NoState:this.teamPanel.noState();break;case St.AddFromPetCard:this.teamPanel.addFromPetCard();break;case St.EditingPlayerCard:case St.EditingTeamCard:this.teamPanel.hideToolTip(),this.teamPanel.setAlphaAll(!1,!1),this.teamPanel.setInputEnableAll(!1,!1)}}startEditing(k,B){V.q.instance.prodigy.audio.playSFX(18,"pop"),this.teamPanel.setTeamSwapPanelActive(!0),this.teamPanel.moveTeamSwapPanel(B),this.dispatchEditStartSignal(k,B)}openToolTip(k,B,U){k.containsPlayer?this.startEditing(B,U):(V.q.instance.prodigy.audio.playSFX(18,"pop"),this.teamPanel.positionToolTip(k,B,U))}openTeamMustHaveALeaderTooltip(){var k;(null===(k=this.teamPanel)||void 0===k?void 0:k.anchorCard)&&kt.openTeamMustHaveALeaderTooltip(this.teamPanel.anchorCard)}receivePetData(k,B){this.sendData(k,B)}onCardClicked(){this.reportClick()}dispatchSwapSignal(k,B){this.swapSignal.dispatch(k,B)}dispatchRemoveSignal(k){this.removeSignal.dispatch(k)}dispatchInfoSignal(k){this.infoSignal.dispatch(k)}launchReleaseConfirmation(k){V.q.instance.prodigy.open.petsLetGoConfirmationDialog(k,(()=>{this._teamController.release(k).then((()=>{this.releaseSignal.dispatch(k)})).catch(j.RQr.createHandler("Error releasing a pet"))}))}dispatchEditStartSignal(k,B){this.editStartSignal.dispatch(k,B)}dispatchEditFinishSignal(){this.editFinishSignal.dispatch()}disposeController(){super.disposeController(),this._teamController.mustHaveLeaderSignal.remove(this.openTeamMustHaveALeaderTooltip,this),this._editFinishSignal.dispose(),this._editStartSignal.dispose(),this._swapSignal.dispose(),this._removeSignal.dispose(),this.releaseSignal.dispose(),this.infoSignal.dispose()}}class $t extends At.A{constructor(k,B,U,F,G){super(k,B,200,{},[$._.Ui_petslots_json,$._.Ui_library_json,$._.Ui_pet_gear_json,$._.Ui_hard_currency_json]),this.prefabRoot=null,this._headerComponent=null,this._teamPanel=null,this._ownedPetsPanel=null,this.onPetListUpdated=new j.HN0,this.isModal=!1,this.background.visible=!1,G&&(this._headerComponent=G),this._contentLayer=U;const H=V.q.instance.prodigy.gameContainer.get("e20-0fb0");this._teamController=new Dt(H.player.kennel),this._teamPanelController=new jt(this._teamController),this._ownedPetsPanelController=new Gt(this._teamController),this._petFilterList=F,this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(X.Eu.PetMergeYourTeam),this.cullable=!0}create(){super.create();const k=V.q.instance.prodigy.gameContainer.get("d0e-64fd");if(this._yourTeamGameObject=k.loadFromGUID(H.l.Pets_YourTeamMenu),Z.d.updateInjectedValues(this._yourTeamGameObject,{ON_ADD_PET_SLOTS_CLICKED:()=>{this._teamController.clearActionState()}}),this._backgroundButton=this._yourTeamGameObject.findComponentInChildren(W.$),this._teamController.cancelButton=this._backgroundButton,this._ownedPetsPanel=new Tt(this,this._ownedPetsPanelController,this._petFilterList),this._teamPanel=new Bt(this,this._teamPanelController),this.prefabRoot.addChild(this._yourTeamGameObject.legacyTransform.group),this.addChild(this._ownedPetsPanel.tooltipParent.legacyTransform.group),this._teamPanelController.teamPanel=this._teamPanel,this._ownedPetsPanelController.ownedPetsPanel=this._ownedPetsPanel,this._isPaused&&this.pauseMenu(),this._ownedPetsPanel.cardStateManager.onYourPetInfo.add(this.launchSubMenu,this),this._ownedPetsPanel.cardStateManager.onYourPetRelease.add(this.launchPetLetGoConfirmation,this),this._teamPanelController.infoSignal.add(this.launchSubMenu,this),this._teamPanelController.releaseSignal.add(this.updateAfterLetPetGo,this),this._headerComponent){V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.onPetRemoved.add(this.updateAfterLetPetGo,this),this._headerComponent.onPetRelease.add(this.releasePet,this),this._headerComponent.onAddPetToTeam.add(this.startAddPetToTeam,this),this._teamController.addPetToTeamComplete.add(this.addPetToTeamCompleted,this),this._headerComponent.onPetUpgraded.add(this.onPetUpgradeComplete,this)}this._petInventoryController=this._yourTeamGameObject.findComponentInChildren(K.l,!0),q.I.shouldShowPetGearTutorialCached&&(V.q.instance.game.input.enabled=!1,this.displayPetGearFtue().catch(j.RQr.createHandler("Failed to display pet gear tutorial"))),z.N.shouldShowPetMergeTutorial&&this.displayPetMergeFtue().catch(j.RQr.createHandler("Failed to display pet merge tutorial")),V.q.instance.game.broadcaster.addAppListener(Y.ig.EvolveEnd,(()=>{this.updatePetList()}),this)}focusPet(k){const B=()=>{const B=this._ownedPetsPanel.findCardForPet(k);this._ownedPetsPanel.scrollToPet(B,!1).catch(j.RQr.createHandler("Could not scroll to selected pet"))};this._ownedPetsPanel?B():this.onCreate.addOnce(B)}launchSubMenu(k){super.launchSubMenu(k),this.pauseMenu(),this._headerComponent.closeButton.GameObject.active=!1,this._headerComponent.yourTeamToggle.GameObject.parent.active=!1,this._yourPetMenu=V.q.instance.prodigy.open.yourPet(k,this._contentLayer,this._headerComponent),this._headerComponent.backToYourTeamButton.GameObject.active=!0,this._headerComponent.backToYourTeamButton.onClick.add(this.closeClicked,this),this._headerComponent.onSubMenuClose.add(this.closeClicked,this),this._headerComponent.onSubMenuEsc.add(this.onEscPressed,this)}launchPetLetGoConfirmation(k){this.leaveSubMenu(),V.q.instance.prodigy.open.petsLetGoConfirmationDialog(k,(()=>{this.releasePet(k),this.updateAfterLetPetGo(k)}))}onEscPressed(k){k instanceof Ut.O&&this.closeClicked()}closeClicked(){V.q.instance.prodigy.audio.playSFX(18,"pop"),this.leaveSubMenu()}leaveSubMenu(){super.leaveSubMenu(),this._yourPetMenu&&(this._yourPetMenu.cancelPetMenuLoading(),this._yourPetMenu=void 0),this._headerComponent.closeButton.GameObject.active=!0,this._headerComponent.yourTeamToggle.GameObject.parent.active=!0,this._headerComponent.backToYourTeamButton.onClick.remove(this.closeClicked,this),this._headerComponent.onSubMenuClose.remove(this.closeClicked,this),this._headerComponent.onSubMenuEsc.remove(this.onEscPressed,this),this._headerComponent.backToYourTeamButton.GameObject.active=!1,this._headerComponent.closeButton.GameObject.active=!0,this._teamController.updateDisplays(),this.resumeMenu()}updatePetList(k,B=0){this.leaveSubMenu(),this._ownedPetsPanel.setPetList(null!=k?k:this._petFilterList,B),this._teamPanelController.receiveCardUpdates(),this.onPetListUpdated.dispatch()}updateAfterLetPetGo(k){V.q.instance.prodigy.open.isMenuOpen(Ut.O)||this.leaveSubMenu(),this._ownedPetsPanel.setPetList(this._petFilterList.filter((B=>B!==k))),this._teamPanelController.receiveCardUpdates()}startAddPetToTeam(k){this.leaveSubMenu(),this._ownedPetsPanelController.dispatchAddSignal(k,k.team)}releasePet(k){this._headerComponent.backToYourTeamButton.GameObject.active=!1,V.q.instance.prodigy.loading(!0),this._teamController.release(k).then((()=>{var k;V.q.instance.prodigy.loading(!1),this.leaveSubMenu(),null===(k=this._petInventoryController)||void 0===k||k.updateDisplay()})).catch(j.RQr.createHandler("Error releasing a pet"))}addPetToTeamCompleted(){this._headerComponent.startAutoTooltip(V.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("PET_ADDED_TO_TEAM")),V.q.instance.prodigy.audio.playSFX(61,"add-pet")}onPetUpgradeComplete(){this._ownedPetsPanel.hideFtueGuideHands(),this._ownedPetsPanel.setPetList(this._petFilterList),this._teamPanelController.receiveCardUpdates()}displayPetGearFtue(){return(0,G.sH)(this,void 0,void 0,(function*(){V.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:"Pet_gear_tutorial",funnelType:"tutorial",stepName:Q.l.PetGearTeamMenu},{step_index:2}),this._ownedPetsPanel.setInputScrollEnabled(!1),V.q.instance.game.broadcaster.addAppListener(Y.bI.FtueCompleted,this.onPetGearFtueCompleted.bind(this),this),Z.d.updateInjectedValues(this._yourTeamGameObject,{[J.oD.PetGearFtueOverlayEnabled]:!0},!1);const k=this._yourTeamGameObject.findComponentInChildren(j.bE_);yield j.Egh.timeout(1e3);const B=this._ownedPetsPanel.getFirstGearEnabledPet();yield this._ownedPetsPanel.scrollToPet(B);const U=k.Container.get(J.oD.PetGearFtueEnabledInputTransform),F=this._ownedPetsPanel.panelGameObject.findComponentInChildren(j.JTA).GameObject.children[B.gridLayoutIndex].findComponent(j.K16);U.setPosition(F.group.worldTransform.tx,F.group.worldTransform.ty),U.fullWidth=F.group.width,U.fullHeight=F.group.height,j.wa5.getActiveScene().addLayer("newHandLayer",1e3),U.GameObject.parent.setLayer("newHandLayer",!0),V.q.instance.game.input.enabled=!0,this._ownedPetsPanel.cardStateManager.onStackDrawerOpened.addOnce((()=>(0,G.sH)(this,void 0,void 0,(function*(){U.setPosition(-500,-500),yield j.Egh.timeout(1e3);const k=j.wa5.getActiveScene().container.get(J.oX.PetCardPetSpawner).placeholders[0].transform;U.setPosition(k.worldPosition.x,k.worldPosition.y),U.fullWidth=k.fullWidth,U.fullHeight=k.fullHeight})))),this._ownedPetsPanel.tooltipContainer.onTooltipDisplayed.addOnce((()=>{const B=k.Container.get(J.oD.OwnedPanelTooltipPetInfoButtonTransform),F=B.group.worldTransform.tx,G=B.group.worldTransform.ty;U.setPosition(F,G),U.fullWidth=B.group.width,U.fullHeight=B.group.height}))}))}onPetGearFtueCompleted(){V.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:"Pet_gear_tutorial",funnelType:"tutorial",stepName:Q.l.PetGearGearEquipped},{step_index:5}),this._ownedPetsPanel.setInputScrollEnabled(!0),V.q.instance.game.broadcaster.removeAppListener(Y.bI.FtueCompleted,this)}displayPetMergeFtue(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=z.N.getChosenPetForMergeRankFTUE();this.launchSubMenu(k),V.q.instance.game.broadcaster.broadcast(Y.ki.FtuePetMenuOpened)}))}resumeMenu(){super.resumeMenu(),this._ownedPetsPanel&&this._ownedPetsPanel.resume(),this._teamPanel&&this._teamPanel.resume(),this._yourTeamGameObject&&(this._yourTeamGameObject.active=!0)}pauseMenu(){super.pauseMenu(),this._ownedPetsPanel&&this._ownedPetsPanel.pause(),this._teamPanel&&this._teamPanel.pause(),this._yourTeamGameObject&&(this._yourTeamGameObject.active=!1)}close(){var k;null===(k=this._yourTeamGameObject)||void 0===k||k.destroy(),this.onPetListUpdated.dispose(),super.close()}destroy(){var k,B,U,F,G,j,$,H,W,q;V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.onPetRemoved.remove(this.updateAfterLetPetGo,this),this._headerComponent&&(this._headerComponent.onLetPetGo.remove(this.updateAfterLetPetGo,this),this._headerComponent.onPetRelease.remove(this.releasePet,this),this._headerComponent.onAddPetToTeam.remove(this.startAddPetToTeam,this),this._headerComponent.onPetUpgraded.remove(this.onPetUpgradeComplete,this)),null===(k=this._ownedPetsPanel)||void 0===k||k.cardStateManager.onYourPetInfo.remove(this.launchSubMenu,this),null===(B=this._teamPanelController)||void 0===B||B.infoSignal.remove(this.launchSubMenu,this),null===(U=this._teamPanelController)||void 0===U||U.releaseSignal.remove(this.updateAfterLetPetGo,this),null===(F=this._teamController)||void 0===F||F.addPetToTeamComplete.remove(this.addPetToTeamCompleted,this),null===(G=this._teamController)||void 0===G||G.clearSignals(),null===(j=this._teamPanelController)||void 0===j||j.disposeController(),null===($=this._ownedPetsPanelController)||void 0===$||$.disposeController(),null===(H=this._ownedPetsPanel)||void 0===H||H.destroyPanel(),null===(W=this._teamPanel)||void 0===W||W.destroyPanel(),null===(q=this._backgroundButton)||void 0===q||q.onClick.dispose(),V.q.instance.game.broadcaster.removeAppListener(Y.ig.EvolveEnd,this),super.destroy()}}},74951:(k,B,U)=>{"use strict";U.d(B,{z:()=>dt});var F=U(8674),G=U(62459),j=U(37016),$=U(5491),H=U(35120),V=U(1195),W=U(77938),q=U(55734),K=U(37773),z=U(97317),Y=U(65732),Q=U(43754),X=U(55122),Z=U(10674),J=U(46855),tt=U(99979),et=U(73797),it=U(28152),st=U(90744),nt=U(26932),at=U(26004),rt=U(22023),ot=U(80060),ht=U(53661),ct=U(16909);let dt=class extends nt.z{constructor(){super(...arguments),this.onLetPetGo=new G.HN0,this.onAddToTeam=new G.HN0,this.onEvolvePet=new G.HN0,this._processJustLeveledUpOnNextRebind=!1}bindContext(){var k,B,U;const F=W.t.getItem("pet",this._petData.ID),V=new q.R(H.q.instance.prodigy.game,this._petData),Q=rt.P8.getMaxOwnableLevel(this._petData.ID),Z=new J.r(this._petData.stars,$.V.Pet,{baseXp:0,memberXp:0,totalNonMemberXp:0},Math.max(Q,this._petData.level));Z.levels=[this._petData.level],this._context.Container.rebind(ht.hi.PetCreatureData).toConstantValue(this._petData),this._context.Container.rebind(ht.hi.YourPetPanelPetId).toConstantValue(this._petData.ID);const it=!!this._petData.nickname;this._context.Container.rebind(ht.hi.YourPetPanelPetName).toConstantValue(it?this._petData.nickname:null!==(k=F.data.name)&&void 0!==k?k:F.name),this._context.Container.rebind(ht.hi.YourPetPanelPetHasNickname).toConstantValue(it),it&&this._context.Container.rebind(ht.hi.YourPetPanelPetSpecies).toConstantValue(null!==(B=F.data.name)&&void 0!==B?B:F.name),this._context.Container.rebind(ht.hi.YourPetElementalBaseFrame).toConstantValue(tt.bf[F.data.affinity]),this._context.Container.rebind(ht.hi.YourPetPanelXpBarInfo).toConstantValue(Z),this._context.Container.rebind(ht.hi.YourPetPanelEnableReleaseButton).toConstantValue(!rt.P8.isPetEpic(this._petData.ID)),this._context.Container.rebind(ht.hi.YourPetPanelEnableAddTeamButton).toConstantValue(!rt.P8.isPetOnTeam(this._petData)),this._context.Container.rebind(ht.hi.YourPetPanelReleasePetFunction).toConstantValue(H.q.instance.prodigy.open.petsLetGoConfirmationDialog.bind(H.q.instance.prodigy.open,this._petData,(()=>this.onLetPetGo.dispatch(this._petData)))),this._context.Container.rebind(ht.hi.YourPetPanelAddToTeamFunction).toConstantValue(this.onAddToTeam.dispatch.bind(this.onAddToTeam,this._petData));if(rt.P8.canPlayerAccessPetMergeFeature(this._loggedInPlayer.player)){const k=rt.P8.canPetAccessMergeRanks(this._petData.ID),B=null!==(U=rt.P8.getPetDisplayMergeRank(this._petData.ID,this._petData.uniqueID))&&void 0!==U?U:j.qd.MIN,F=B>=j.qd.MAX,G=k&&!F;this._context.Container.rebind(ht.hi.YourPetPanelDisplayMergeButton).toConstantValue(G),this._context.Container.rebind(ht.hi.YourPetPanelDisplayMergeRankBadge).toConstantValue(k),k&&this._context.Container.rebind(ht.hi.YourPetPanelPetMergeRank).toConstantValue(B)}const st=rt.P8.GetEvolutionaryLine(F);for(;st.length>4&&st[0]!==F.ID;)st.shift();const nt=[{id:ht.hi.YourPetPanelEvoLineStage1Id,seen:ht.hi.YourPetPanelEvoLineStage1Seen,rescued:ht.hi.YourPetPanelEvoLineStage1Rescued},{id:ht.hi.YourPetPanelEvoLineStage2Id,seen:ht.hi.YourPetPanelEvoLineStage2Seen,rescued:ht.hi.YourPetPanelEvoLineStage2Rescued},{id:ht.hi.YourPetPanelEvoLineStage3Id,seen:ht.hi.YourPetPanelEvoLineStage3Seen,rescued:ht.hi.YourPetPanelEvoLineStage3Rescued},{id:ht.hi.YourPetPanelEvoLineStage4Id,seen:ht.hi.YourPetPanelEvoLineStage4Seen,rescued:ht.hi.YourPetPanelEvoLineStage4Rescued}],ot=this._loggedInPlayer.player.encounters;this._context.Container.rebind(ht.hi.YourPetPanelEvoLineNumStages).toConstantValue(st.length);for(let G=0;G0,V=j===F.ID;this._context.Container.rebind(k).toConstantValue(st[G]),this._context.Container.rebind(B).toConstantValue($||H||V),this._context.Container.rebind(U).toConstantValue(H||V)}const dt=st.findIndex((k=>F.ID===k))+1;this._context.Container.rebind(ht.hi.YourPetPanelEvoLineOwnedStage).toConstantValue(dt);const lt=rt.P8.canPetEvolve(V,this._petData.level),ut=V.getAvailableEvolutions(X.s.activePlayerLevelCap).length>0;this._context.Container.rebind(ht.hi.YourPetPanelShowEvolveButton).toConstantValue(ut),this._context.Container.rebind(ht.hi.YourPetPanelEnableEvolveButton).toConstantValue(lt),H.q.instance.prodigy.game.broadcaster.addAppListener(et.ig.Evolved,this.onEvolvePet.dispatch,this.onEvolvePet),this._context.Container.rebind(ht.hi.YourPetPanelEvolveButtonWithHC).toConstantValue(lt),this._context.Container.rebind(ht.hi.YourPetPanelShowLevelUp).toConstantValue(!lt),this._context.Container.rebind(ht.hi.YourPetPanelShowEvolveButton).toConstantValue(lt);const ft=this._loggedInPlayer.getLevel(),bt=this._petData.level>=Q,pt=this._petData.levelgt&&!bt&&([_t,Et]=ct.M.getLevelPurchaseCost(this._petData.level,vt,yt));const wt=_t<=gt,Tt=wt?"PET_MAX_LEVEL_UP_TO_SAME_LEVEL_ONLY":"PET_LEVEL_UP_NOT_ENOUGH_GOLD",St=this._paymentManager.exchange({currency:1,value:_t},27).value;if(this._context.Container.rebind(ht.hi.YourPetPanelShouldShowCurrencyConversion).toConstantValue(!0),this._context.Container.rebind(ht.hi.YourPetPanelLevelUpButtonDisabledMessage).toConstantValue(Tt),this._context.Container.rebind(ht.hi.YourPetPanelLevelUpMaxLevelState).toConstantValue(bt),this._context.Container.rebind(ht.hi.YourPetPanelEnableLevelUpButton).toConstantValue(pt&&wt),this._context.Container.rebind(ht.hi.YourPetPanelLevelUpButtonLevel).toConstantValue(Et),this._context.Container.rebind(ht.hi.YourPetPanelLevelUpButtonCost).toConstantValue(_t),this._context.Container.rebind(ht.hi.YourPetPanelLevelUpButtonCostDifference).toConstantValue(_t-gt),this._context.Container.rebind(ht.hi.YourPetPanelLevelUpButtonCostText).toConstantValue(_t.toLocaleString()),this._context.Container.rebind(ht.hi.YourPetPanelLevelUpMagicoinCost).toConstantValue(St),this._context.Container.rebind(ht.hi.YourPetPanelLevelUpMagicoinCostDifference).toConstantValue(St-mt),this._context.Container.rebind(ht.FK.OtpMissingMagicoin).toConstantValue(St-mt),this._context.Container.rebind(ht.hi.YourPetPanelLevelUpConversionButtonEnabled).toConstantValue(pt),G.Aq$.isDefined(this._petData.team)){const k=this._loggedInPlayer.getChargedLevel();this._context.Container.rebind(Y.E.ChargedCreatureEffectTier).toConstantValue(K.e.getChargedLevelTierFromLevel(k)),this._context.Container.rebind(Y.E.ChargedCreatureEffectDisplayType).toConstantValue(k>0?z.X$.IDLE:z.X$.HIDDEN)}const At=rt.P8.getPetDisplayMergeRank(this._petData.ID,this._petData.uniqueID);H.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendPetDetailsViewedEvent(F,"your-pet",{pet_level:this._petData.level,pet_rank:At,gear_list:this._petData.gear,is_on_team:rt.P8.isPetOnTeam(this._petData)}),this._context.Container.rebind(ht.hi.SpinePetEvolveBurst).toConstantValue(this._processJustLeveledUpOnNextRebind&<),this._context.Container.rebind(ht.hi.SpinePetEvolveIdle).toConstantValue(!this._processJustLeveledUpOnNextRebind&<),this._processJustLeveledUpOnNextRebind=!1,this.resolvePetGear(F).finally((()=>{var k;null===(k=this.gameObject)||void 0===k||k.findComponentsInChildren(at.B,!1).forEach((k=>k.consume()))}))}onPetLeveledUp(){this._processJustLeveledUpOnNextRebind=!0}resolvePetGear(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,G,j;const $=!((null===(B=k.data.gearEquipSlots)||void 0===B?void 0:B.length)>0);if(this._context.Container.rebind(ht.hi.YourPetPanelPetGearShowGearPanel).toConstantValue(!0),this._context.Container.rebind(ht.hi.YourPetPanelPetGearSlotsDisabled).toConstantValue($),$)return;const H=yield this._gearManager.getPetGearByUniqueId(null===(U=this._petData.gear)||void 0===U?void 0:U.petHat),V=yield this._gearManager.getPetGearByUniqueId(null===(F=this._petData.gear)||void 0===F?void 0:F.petRelic);null===(G=this._context.Container.get("PetHatSlotContainer"))||void 0===G||G.Container.rebind("PetGearSlotData").toConstantValue(null!=H?H:{}),null===(j=this._context.Container.get("PetRelicSlotContainer"))||void 0===j||j.Container.rebind("PetGearSlotData").toConstantValue(null!=V?V:{})}))}updateInjectedValues(k){ot.d.updateInjectedValues(this.gameObject,k)}destroy(){this.onLetPetGo.dispose(),this.onAddToTeam.dispose(),this.onEvolvePet.dispose(),H.q.instance.prodigy.game.broadcaster.removeAppListener(et.ig.Evolved,this.onEvolvePet),super.destroy()}};(0,F.Cg)([(0,G.Cdj)("d69-defe"),(0,F.Sn)("design:type",Z.q)],dt.prototype,"_gearManager",void 0),(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",V.E)],dt.prototype,"_loggedInPlayer",void 0),(0,F.Cg)([(0,G.Cdj)("5c7-e02d"),(0,F.Sn)("design:type",Q.W)],dt.prototype,"_hardCurrencyProvider",void 0),(0,F.Cg)([(0,G.Cdj)("743-fd51"),(0,F.Sn)("design:type",st.E)],dt.prototype,"_paymentManager",void 0),(0,F.Cg)([(0,G.Cdj)(ht.hi.YourPetPanelPetData),(0,F.Sn)("design:type",Object)],dt.prototype,"_petData",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],dt.prototype,"onLetPetGo",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],dt.prototype,"onAddToTeam",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],dt.prototype,"onEvolvePet",void 0),dt=(0,F.Cg)([(0,G.EVk)("YourPetDataProvider",it.Y.uiPet)],dt)},3119:(k,B,U)=>{"use strict";U.d(B,{o:()=>dt});var F=U(8674),G=U(62459),j=U(88022),$=U(99625),H=U(51742),V=U(36648),W=U(90633),q=U(35120),K=U(60881),z=U(54422),Y=U(94566),Q=U(72772),X=U(73797),Z=U(41674),J=U(15485),tt=U(46784),et=U(82680),it=U(91033),st=U(56461),nt=U(49237),at=U(83133),rt=U(48199),ot=U(97518);let ht=class extends G.uAl{constructor(){super(...arguments),this._closeButton=null,this._yourTeamToggle=null,this._petBookToggle=null,this._backToYourTeam=null,this._backToYourPet=null,this._backToPetBook=null,this._autoTooltipContainer=null,this._titleText=null,this._autoToolTip=null,this._onLetPetGo=new G.HN0,this._onAddPetToTeam=new G.HN0,this._onPetRelease=new G.HN0,this.onPetUpgraded=new G.HN0,this._onSubMenuClose=new G.HN0,this._onSubMenuEsc=new G.HN0}set autoToolTip(k){this._autoToolTip=k}get autoToolTip(){return this._autoToolTip}get closeButton(){return this._closeButton}get yourTeamToggle(){return this._yourTeamToggle}get petBookToggle(){return this._petBookToggle}get backToYourTeamButton(){return this._backToYourTeam}get backToYourPetButton(){return this._backToYourPet}get backToPetBookButton(){return this._backToPetBook}get autoTooltipContainer(){return this._autoTooltipContainer}get onLetPetGo(){return this._onLetPetGo}get onAddPetToTeam(){return this._onAddPetToTeam}get onPetRelease(){return this._onPetRelease}get onSubMenuClose(){return this._onSubMenuClose}get onSubMenuEsc(){return this._onSubMenuEsc}create(){super.create(),this._closeButton&&(this._closeButton.GameObject.active=!1),this._yourTeamToggle&&(this._yourTeamToggle.GameObject.active=!1),this._petBookToggle&&(this._petBookToggle.GameObject.active=!1),this._backToYourTeam&&(this._backToYourTeam.GameObject.active=!1),this._backToYourPet&&(this._backToYourPet.GameObject.active=!1),this._backToPetBook&&(this._backToPetBook.GameObject.active=!1)}startAutoTooltip(k){this._autoToolTip=rt.A.displayToolTipAuto(this._autoToolTip,this._autoTooltipContainer,{bodyText:k,xPosition:640,yPosition:100}),this._autoTooltipContainer.legacyTransform.group.setParent(q.q.instance.game.stage)}setTitleText(k){this._titleText.setLocalizationKey(k)}destroy(){this._onLetPetGo.dispose(),this._onAddPetToTeam.dispose(),this._onPetRelease.dispose(),this._onSubMenuClose.dispose(),this._onSubMenuEsc.dispose(),this.onPetUpgraded.dispose(),super.destroy()}};(0,F.Cg)([(0,G.x4W)("closeButton"),(0,F.Sn)("design:type",nt.$)],ht.prototype,"_closeButton",void 0),(0,F.Cg)([(0,G.x4W)("yourTeamToggle"),(0,F.Sn)("design:type",at.l)],ht.prototype,"_yourTeamToggle",void 0),(0,F.Cg)([(0,G.x4W)("petBookToggle"),(0,F.Sn)("design:type",at.l)],ht.prototype,"_petBookToggle",void 0),(0,F.Cg)([(0,G.x4W)("backToYourTeam"),(0,F.Sn)("design:type",nt.$)],ht.prototype,"_backToYourTeam",void 0),(0,F.Cg)([(0,G.x4W)("backToYourPet"),(0,F.Sn)("design:type",nt.$)],ht.prototype,"_backToYourPet",void 0),(0,F.Cg)([(0,G.x4W)("backToPetBook"),(0,F.Sn)("design:type",nt.$)],ht.prototype,"_backToPetBook",void 0),(0,F.Cg)([(0,G.x4W)("autoTooltipContainer"),(0,F.Sn)("design:type",G._mx)],ht.prototype,"_autoTooltipContainer",void 0),(0,F.Cg)([(0,G.MnK)(ot.R),(0,F.Sn)("design:type",ot.R)],ht.prototype,"_titleText",void 0),ht=(0,F.Cg)([(0,G.EVk)("PetsMenuHeaderPrefab")],ht);var ct=U(52142);class dt extends et.W{get headerPrefab(){return this._headerPrefab}get contentLayer(){return this._contentLayer}constructor(k,B,U,F){super(k,B,200,{},[j._.Ui_raster_bars_json,j._.Ui_raster_icons_json,j._.Ui_raster_panels_json,j._.Ui_raster_pets_menu_json,j._.Ui_buttons_json,j._.Ui_store_json,j._.Ui_registration_json,j._.Ui_icons_json,j._.Ui_raster_pet_card_json,j._.Ui_postbattle_json,j._.Ui_battle_revamp_json,H.c.Sfx_ui,H.c.Sfx_adding_pet_to_team,H.c.Sfx_moving_pet_position,H.c.Sfx_book_close,H.c.Sfx_book_open,H.c.Sfx_petbook_pagination,H.c.Sfx_open_petinfo_yourpet,H.c.Sfx_pets_button_disabled_state,H.c.Sfx_paper_tab,V.q.Merge_rank_badge_small]),this.prefabRoot=null,this._headerPrefab=null,this._backgroundContainer=null,this._yourTeamMidGroundGO=null,this._petBookMidGroundGO=null,this._currentMenu=[],this._onInitialize=U,this.closeCallback=F,this.currentInterfaceName=tt.B.PetsWindow}create(){super.create(),this.name="PetsMenuController";const k=q.q.instance.prodigy.gameContainer.get("d0e-64fd");this._backgroundContainer=k.loadFromGUID($.l.Pets_Background),this.prefabRoot.addChild(this._backgroundContainer.legacyTransform.group),this._contentLayer=new G.mcf,this._contentLayer.name="ContentLayer",this.prefabRoot.addChild(this._contentLayer);const B=k.loadFromGUID($.l.Pets_MenuHeader);this._headerPrefab=B.findComponentInChildren(ht),this.prefabRoot.addChild(B.legacyTransform.group),this._yourTeamSelectHandler=()=>{this.showYourTeam(),q.q.instance.prodigy.audio.playSFX(63,"book-close")},this._headerPrefab.yourTeamToggle.onSelected.add(this._yourTeamSelectHandler),this._petBookSelectHandler=()=>{this.showPetBook(k),q.q.instance.prodigy.audio.playSFX(64,"book-open")},this._headerPrefab.petBookToggle.onSelected.add(this._petBookSelectHandler),this._petsMenuCloseHandler=()=>{q.q.instance.prodigy.audio.playSFX(18,"pop"),this.clearCurrentMenu(),this.fireButtonEvent({buttonName:J.k.Close}),this.fireInterfaceEvent({interfaceType:Z.Wm.DialogBox,closeMethod:Z.Lv.CloseDialog}),this.close()},this._headerPrefab.closeButton.onClick.add(this._petsMenuCloseHandler),this._onInitialize&&this._onInitialize(),this.setDefaultMenu()}setDefaultMenu(){const k=this._headerPrefab.GameObject.findComponentInChildren(Y.O);k.setItemSelected(this._headerPrefab.yourTeamToggle,!1),k.setItemSelected(this._headerPrefab.petBookToggle,!1),k.setItemSelected(this._headerPrefab.yourTeamToggle,!0),this.showYourTeam(),this._headerPrefab.closeButton.GameObject.active=!0,this._headerPrefab.yourTeamToggle.GameObject.active=!0,this._headerPrefab.petBookToggle.GameObject.active=!0,this._headerPrefab.closeButton.GameObject.addComponent(z.E).initialize(K.D.ESC,this.onEscPressed.bind(this)),this._headerPrefab.yourTeamToggle.GameObject.addComponent(z.E).initialize(K.D.TAB,this.onTabPressed.bind(this))}onEscPressed(){Q.I.shouldShowPetGearTutorialCached||this.isTopMenu()&&this._petsMenuCloseHandler()}onTabPressed(){if(Q.I.shouldShowPetGearTutorialCached)return;if(!this.isTopMenu())return;const k=this._headerPrefab.GameObject.findComponentInChildren(Y.O);this._headerPrefab.yourTeamToggle.isSelected()?(k.setItemSelected(this._headerPrefab.yourTeamToggle,!1),k.setItemSelected(this._headerPrefab.petBookToggle,!0),this._petBookSelectHandler()):this._headerPrefab.petBookToggle.isSelected()?(k.setItemSelected(this._headerPrefab.petBookToggle,!1),k.setItemSelected(this._headerPrefab.yourTeamToggle,!0),this._yourTeamSelectHandler()):(k.setItemSelected(this._headerPrefab.yourTeamToggle,!0),this._yourTeamSelectHandler())}toggleKeyController(k){const B=this._headerPrefab.GameObject.findComponentsInChildren(z.E,!0);for(let U=0;Uk instanceof ct.Y));F?(F.updatePetList(U),F.resumeMenu()):(F=q.q.instance.prodigy.open.yourTeam(this._contentLayer,U,this._headerPrefab),this._currentMenu.push(F)),this._currentMenu.forEach(this.pauseMenuIfInactive.bind(this,F)),this.loadYourTeamMidground(B),F.onSubMenuLaunched.add((()=>{this._yourTeamMidGroundGO.active=!1})),F.onSubMenuLeft.add((()=>{this._yourTeamMidGroundGO.active=!0})),this._petBookMidGroundGO&&(this._petBookMidGroundGO.active=!1),k&&F.focusPet(k);this._headerPrefab.yourTeamToggle.GameObject.findComponentInParent(Y.O).setSelected(this._headerPrefab.yourTeamToggle),this._headerPrefab.yourTeamToggle.setSelected(!0)}showPetBook(k){let B=this._currentMenu.find((k=>k instanceof it.M));B?B.resumeMenu():(B=q.q.instance.prodigy.open.petBook(this._headerPrefab),this._currentMenu.push(B)),this._currentMenu.forEach(this.pauseMenuIfInactive.bind(this,B)),this.loadPetBookMidground(k),this._yourTeamMidGroundGO&&(this._yourTeamMidGroundGO.active=!1)}checkPetGearFtue(){return(0,F.sH)(this,void 0,void 0,(function*(){return!q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(W.B.FEATURE_PET_GEAR,W.B.BREADCRUMB_EQUIP_PET_GEAR_FTUE)&&Q.I.updateCachedPetGearTutorialFlag()}))}pauseMenuIfInactive(k,B){k.onSubMenuLeft.removeAll(),k.onSubMenuLaunched.removeAll(),k.onSubMenuLeft.add((()=>this.toggleKeyController(!0))),k.onSubMenuLaunched.add((()=>this.toggleKeyController(!1))),B!==k&&(B.onSubMenuLeft.removeAll(),B.onSubMenuLaunched.removeAll(),B.pauseMenu())}loadYourTeamMidground(k){G.Aq$.isDefined(this._yourTeamMidGroundGO)||(this._yourTeamMidGroundGO=k.loadFromGUID($.l.Pets_BackgroundYourTeam),this._backgroundContainer.addChild(this._yourTeamMidGroundGO)),this._yourTeamMidGroundGO.active=!0}loadPetBookMidground(k){G.Aq$.isDefined(this._petBookMidGroundGO)||(this._petBookMidGroundGO=k.loadFromGUID($.l.Pets_BackgroundPetBook),this._petBookMidGroundGO.findComponentInChildren(G.V09).elementsGroup.scale.x=-1,this._backgroundContainer.addChild(this._petBookMidGroundGO)),this._petBookMidGroundGO.active=!0}forceClose(){this.clearCurrentMenu(),this.close()}clearCurrentMenu(){if(this._currentMenu.length>0){for(let k=0;k{"use strict";U.d(B,{R:()=>rt});var F,G=U(8674),j=U(62459),$=U(5491),H=U(65050);!function(k){k.PetTeamLevelUp="my-team-pet-level-up"}(F||(F={}));var V=U(35120),W=U(1195),q=U(39984),K=U(87239),z=U(55122),Y=U(28152),Q=U(25809),X=U(95913),Z=U(62886),J=U(60157),tt=U(65240),et=U(77938),it=U(63834),st=U(2519),nt=U(44094),at=U(53661);let rt=class extends j.uAl{constructor(){super(...arguments),this.onLevelUpPurchased=new j.HN0}get purchaseCost(){return this._purchaseCost}get purchaseLevel(){return this._purchaseLevel}purchaseLevels(){if(!j.Aq$.isDefined(this._purchaseLevel)||!j.Aq$.isDefined(this._purchaseCost))return void j.VyI.log("Cannot purchase levels without a purchase level and cost set.",j.$bb.Error);const k=new it.r(V.q.instance.prodigy.game,this._petData);this._petData.stats=k.source.stats,this._petData.statGrowth=k.source.statGrowth;const B=k.getStars(),U=Math.max(0,B-z.s.xpRequiredForLevel(this._purchaseLevel,$.V.Pet)),F=z.s.xpRequiredForLevel(this._purchaseLevel,$.V.Pet)-B+U,G=k.diffAvailableSpellsV2(this._purchaseLevel),H=q.e.getStatIncreasesFromLevelUps(this._petData,this._petData.level,this._purchaseLevel);k.addStars(F);V.q.instance.prodigy.gameContainer.get("8dc-04eb").sendGainPetXpEvent(F).catch(j.RQr.createHandler("Error sending a battle pass quest event for gaining pet XP")),this._loggedInPlayer.player.kennel.updated=!0,this._loggedInPlayer.player.forceSaveCharacter(),this.sendLevelPurchasedSegmentEvents(k),this.sendPurchasePetLevelQuestEvent(k.data),this.showLevelUpPopups(H,G),V.q.instance.prodigy.audio.playSound(33,!1),this.onLevelUpPurchased.dispatch(k.data)}setPurchaseLevel(k){this._purchaseLevel=k}setPurchaseCost(k){this._purchaseCost=k}sendPurchasePetLevelQuestEvent(k){const B=et.t.getItem("pet",k.ID).data,U={params:{taskEventType:J.Z7.Pet,rarity:B.rarity,itemType:"pet",source:tt.C.LevelUp,id:B.ID,element:B.affinity,level:B.level}};V.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(Z.T.PURCHASE_PET_LEVEL,U).catch(j.RQr.createHandler("Error sending a quest event for purchasing a pet level up"))}sendLevelPurchasedSegmentEvents(k){this._segment.featureCommon.sendPetUpgradedEvent(k.getName(),k.getLevel(),this._purchaseLevel,this._purchaseCost,this._currentCurrencyId.toString(),{transaction_id:this._segmentTransactionId})}updateItemRemovedCustomData(k){this._segmentTransactionId=nt.$.generateUID(),this._currentCurrencyId=k;const B={transaction_id:this._segmentTransactionId,sink_type:tt.C.LevelUp,sink_id:F.PetTeamLevelUp,instance_type:H.N.Interface,instance_id:this._segment.featureCommon.getInstanceId(this._segment.featureCommon.currentInterfaceName)};27===k&&this._magicoinPaymentComponent?this._magicoinPaymentComponent.customData=B:1===k&&this._goldPaymentComponent&&(this._goldPaymentComponent.customData=B)}showLevelUpPopups(k,B){var U;const F=[];F.push(X.v4.levelUp()),F.push(...X.v4.battleStats(k)),B.forEach((k=>{const B=X.v4.spell(K.x.getUnlockedSpellDisplayInformation(k));F.push(B)})),null===(U=this._popupMessageManager)||void 0===U||U.playPopupMessageAnimations(F).catch(j.RQr.createHandler("Failed to play popup message animations."))}destroy(){this.onLevelUpPurchased.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",W.E)],rt.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",Function)],rt.prototype,"_segment",void 0),(0,G.Cg)([(0,j.Cdj)(at.hi.YourPetPanelPopupMessageManager),(0,G.Sn)("design:type",Q.g)],rt.prototype,"_popupMessageManager",void 0),(0,G.Cg)([(0,j.Cdj)(at.hi.YourPetPanelPetData),(0,G.Sn)("design:type",Object)],rt.prototype,"_petData",void 0),(0,G.Cg)([(0,j.MnK)(st.E),(0,G.Sn)("design:type",st.E)],rt.prototype,"_magicoinPaymentComponent",void 0),(0,G.Cg)([(0,j.MnK)(st.E),(0,G.Sn)("design:type",st.E)],rt.prototype,"_goldPaymentComponent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rt.prototype,"onLevelUpPurchased",void 0),rt=(0,G.Cg)([(0,j.EVk)("LevelPurchase",Y.Y.uiPet)],rt)},16909:(k,B,U)=>{"use strict";U.d(B,{M:()=>$});var F=U(5491),G=U(39984),j=U(23748);class ${static getLevelPurchaseCost(k,B,U){let $=k,H=0;do{const k=30+(G.e.starsToLevel($+1,F.V.Pet)-G.e.starsToLevel($,F.V.Pet))/1.568+$+1,B=j.z.ceilToNearestMultiplier(H+k,5);if(H>0&&B>U)break;H=B,$++}while(${"use strict";U.d(B,{h:()=>F,n:()=>rt});var F,G=U(8674),j=U(62459),$=U(10471),H=U(223),V=U(13956),W=U(59701),q=U(35120),K=U(49237),z=U(1195),Y=U(77938),Q=U(43754),X=U(73797),Z=U(28152),J=U(77065),tt=U(76277),et=U(38920),it=U(11647),st=U(30226),nt=U(97518),at=U(90614);!function(k){k[k.ByItem=0]="ByItem",k[k.ByType=1]="ByType",k[k.ByTypeForStore=2]="ByTypeForStore"}(F||(F={}));let rt=class extends((0,it.o)(j.uAl)){constructor(){super(...arguments),this._iconMode=F.ByItem,this._maxAbbreviatedDigits=1/0,this._forceDisableClickables=!1,this.onBudgetInvalid=new j.HN0,this.onBudgetValid=new j.HN0,this._onItemIdStringChanged=new j.HN0,this.onCurrencyUpdateComplete=new j.HN0,this.onAddClicked=new j.HN0,this._automaticallyUpdate=!0,this._abbreviate=!0}get currencyID(){return this._currencyID}set currencyID(k){this._currencyID=k}create(){super.create(),this._addIcon&&(this._addIcon.active=!1),this._button&&(this.addListenerToSignal(this._button.onEnabledClick,(()=>{this._addIcon.active&&this.onAddClicked.dispatch()})),this.addListenerToSignal(this._button.onInputOver,(()=>{this._abbreviate=!1,this.updateAmount(this._currentAmount,this._currentBudget)})),this.addListenerToSignal(this._button.onInputOut,(()=>{this._abbreviate=!0,this.updateAmount(this._currentAmount,this._currentBudget)}))),j.Aq$.isDefined(this._currencyID)&&(this.updateIcon(),this.updateMagicoinElements()),this._automaticallyUpdate&&this._currencyID&&this.updateAmount(this._currentPlayer.player.getCurrencyAmount(this._currencyID)),this.addAutoUpdateListeners(),$.h.includes(this._currencyID)&&this._hardCurrency.isHardCurrencyMemberLocked()&&(this.gameObject.active=!1)}destroy(){this.onBudgetInvalid.dispose(),this.onBudgetValid.dispose(),this.onCurrencyUpdateComplete.dispose(),this.onAddClicked.dispose(),this._hardCurrency.onBalanceChanged.remove(this.handleHardCurrencyBalanceChanged,this),q.q.instance.game.broadcaster.removeAppListener(X.ib.ItemReceived,this),q.q.instance.game.broadcaster.removeAppListener(X.ib.ItemConsumed,this),this._onItemIdStringChanged.dispose(),super.destroy()}updateAmount(k,B){this._currencyText.text=(0,et.cC)(k,this._abbreviate?this._maxAbbreviatedDigits:1/0),this._currentAmount=k,(j.Aq$.isDefined(B)||j.Aq$.isDefined(this._currentBudget))&&(this._currentBudget=null!=B?B:this._currentBudget,this.updateBudgetDifference(k-this._currentBudget))}updateBudget(k){this._currentBudget=k,j.Aq$.isDefined(this._currentAmount)&&this.updateBudgetDifference(this._currentAmount-k)}updateBudgetFromNewAmount(k){j.Aq$.isDefined(this._currentBudget)&&(this.updateBudgetDifference(this._currentBudget-k),this._currentBudget=k)}updateBudgetDifference(k){var B,U;const F=j.Aq$.isDefined(k)&&k>0;j.Aq$.isDefined(this._insufficientFundsColor)&&(this._currencyText.fill=F?j.Q1f.numberToHexString(this._insufficientFundsColor):j.Q1f.numberToHexString(this._sufficientFundsColor)),this._currencyText.updateText();const G=Y.t.getItem("currency",this._currencyID);null===(B=this._missingAmountPrompt)||void 0===B||B.setTextArguments(null!==(U=F?k:void 0)&&void 0!==U?U:0,st.J.getItemName(G));(F?this.onBudgetInvalid:this.onBudgetValid).dispatch()}updateCurrencyID(k){-1===k||$.h.includes(k)&&this._hardCurrency.isHardCurrencyMemberLocked()?this.gameObject.active=!1:(this.gameObject.active=!0,k!==this._currencyID&&(this._currencyID=k,this._onItemIdStringChanged.dispatch(`currency-${k}`),this.updateIcon(),this._automaticallyUpdate&&this.updateAmount(this._currentPlayer.player.getCurrencyAmount(k)),this.updateMagicoinElements()))}setIconVisible(k){this._currencyIcon&&(this._currencyIcon.Active=k)}playEarnEffect(k){this._currentAmount>=k?j.VyI.log("Attempted to play earn effect with an invalid initial amount",j.$bb.Warning):(this.animateCurrencyChangeIndicator(k-this._currentAmount,"+",this._currencyGainMove),this.startCurrencyCounter(k))}playSpendEffect(k){this._currentAmount<=k?j.VyI.log("Attempted to play spend effect with an invalid initial amount",j.$bb.Warning):(this.animateCurrencyChangeIndicator(this._currentAmount-k,"-",this._currencySpendMove),this.startCurrencyCounter(k))}animateCurrencyChangeIndicator(k,B,U){this._currencyChangeText&&(this._currencyChangeText.text=`${B}${(0,et.cC)(k)}`),null==U||U.startTween()}startCurrencyCounter(k){const B=this._counterTextObject.findComponent(J.B);B.initialNumber=this._currentAmount,B.targetNumber=k;const U=k-this._currentAmount;B.onComplete.addOnce((()=>this.onCurrencyUpdateComplete.dispatch(U<0)),this),this._currentAmount=k,B.startCounter()}enableAutomaticUpdates(k,B){if(this._automaticallyUpdate=k,!k)return;if(!j.Aq$.isDefined(this.currencyID))return;const U=this._currentPlayer.player.getCurrencyAmount(this._currencyID,1===this._currencyID?"gold":"currency");B?this.handleHardCurrencyBalanceChanged({value:U,currency:this._currencyID}):this.updateAmount(U)}updateIcon(){if(!this._currencyIcon)return;const k=this._currencyID,{atlas:B,frame:U}=W.W.getCurrencyIcon(this._iconMode,k);q.q.instance.prodigy.load.assetsAsPromise(B).then((()=>{var G,j,H,V;if(null!==(j=null===(G=this.gameObject)||void 0===G?void 0:G.isDestroyed)&&void 0!==j&&!j&&k===this._currencyID){(null===(H=this._currencyIcon)||void 0===H?void 0:H.GameObject)&&($.h.includes(this._currencyID)&&!this._hardCurrency.isHardCurrencyMemberLocked()&&(this._currencyIcon.GameObject.active=!0),this._currencyIcon.updateAsset(B,U));const G=W.W.getCurrencyIcon(F.ByTypeForStore,k);null===(V=this._currencyChangeIcon)||void 0===V||V.updateAsset(G.atlas,G.frame)}}),j.RQr.createHandler("Failed to load currency icon"))}handleHardCurrencyBalanceChanged(k){!this._automaticallyUpdate||!$.B.includes(this._currencyID)||k.currency!==this._currencyID||$.h.includes(this._currencyID)&&this._hardCurrency.isHardCurrencyMemberLocked()||(k.valuethis._currentAmount&&this.playEarnEffect(k.value))}handleItemReceived(k){var B;if(!this._automaticallyUpdate||this._currencyID!==k.ID||"currency"!==k.type&&"gold"!==k.type)return;const U=null!==(B=k.balance)&&void 0!==B?B:this._currentAmount+k.N;this.playEarnEffect(U)}handleItemConsumed(k){var B;if(!this._automaticallyUpdate||this._currencyID!==k.ID||"currency"!==k.type&&"gold"!==k.type)return;const U=null!==(B=k.balance)&&void 0!==B?B:this._currentAmount-Math.abs(k.N);this.playSpendEffect(U)}updateMagicoinElements(){this._addIcon&&this._button&&!this._forceDisableClickables&&(this._addIcon.active=(0,tt.G)(H.l).enabled&&27===this._currencyID&&!this._currentPlayer.player.isPlayingAtSchool())}addAutoUpdateListeners(){this._hardCurrency.onBalanceChanged.add(this.handleHardCurrencyBalanceChanged,this),q.q.instance.game.broadcaster.addAppListener(X.ib.ItemReceived,this.handleItemReceived,this),q.q.instance.game.broadcaster.addAppListener(X.ib.ItemConsumed,this.handleItemConsumed,this)}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",z.E)],rt.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,V.b)("5c7-e02d"),(0,G.Sn)("design:type",Q.W)],rt.prototype,"_hardCurrency",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],rt.prototype,"_baseLocalizer",void 0),(0,G.Cg)([(0,j.gfw)(F),(0,G.Sn)("design:type",Number)],rt.prototype,"_iconMode",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number),(0,G.Sn)("design:paramtypes",[Number])],rt.prototype,"currencyID",null),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],rt.prototype,"_currencyIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],rt.prototype,"_currencyChangeIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],rt.prototype,"_currencyText",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],rt.prototype,"_maxAbbreviatedDigits",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",Number)],rt.prototype,"_insufficientFundsColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",Number)],rt.prototype,"_sufficientFundsColor",void 0),(0,G.Cg)([(0,j.MnK)(nt.R),(0,G.Sn)("design:type",nt.R)],rt.prototype,"_missingAmountPrompt",void 0),(0,G.Cg)([(0,j.MnK)(at.P),(0,G.Sn)("design:type",at.P)],rt.prototype,"_currencyGainMove",void 0),(0,G.Cg)([(0,j.MnK)(at.P),(0,G.Sn)("design:type",at.P)],rt.prototype,"_currencySpendMove",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],rt.prototype,"_currencyChangeText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],rt.prototype,"_counterTextObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],rt.prototype,"_addIcon",void 0),(0,G.Cg)([(0,j.MnK)(K.$),(0,G.Sn)("design:type",K.$)],rt.prototype,"_button",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],rt.prototype,"_forceDisableClickables",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rt.prototype,"onBudgetInvalid",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rt.prototype,"onBudgetValid",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rt.prototype,"_onItemIdStringChanged",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rt.prototype,"onCurrencyUpdateComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rt.prototype,"onAddClicked",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],rt.prototype,"_automaticallyUpdate",void 0),rt=(0,G.Cg)([(0,j.EVk)("CurrencyDisplay",Z.Y.ui)],rt)},63811:(k,B,U)=>{"use strict";U.d(B,{H:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this._openingUnifiedStore=!1}close(){this.store.close(this._openingUnifiedStore)}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_openingUnifiedStore",void 0),$=(0,F.Cg)([(0,G.EVk)("StoreClose",j.Y.ui)],$)},25317:(k,B,U)=>{"use strict";U.d(B,{D:()=>X});var F=U(8674),G=U(87490),j=U(62459),$=U(95359),H=U(88022),V=U(35120),W=U(43846),q=U(34603),K=U(47717);const z={[$.IE.Defence]:"ITEM_BONUS_DEFENCE",[$.IE.Hp]:"ITEM_BONUS_HP",[$.IE.Power]:"ITEM_BONUS_POWER",[$.IE.Speed]:"ITEM_BONUS_SPEED"},Y={[G.EElementType.Astral]:"icon-32x32-astral",[G.EElementType.Fire]:"icon-32x32-fire",[G.EElementType.Ice]:"icon-32x32-ice",[G.EElementType.Physical]:"icon-32x32-physical",[G.EElementType.Plant]:"icon-32x32-earth",[G.EElementType.Shadow]:"icon-32x32-shadow",[G.EElementType.Storm]:"icon-32x32-storm",[G.EElementType.Water]:"icon-32x32-water",[G.EElementType.Neutral]:"icon-32x32-neutral"},Q={[G.EElementType.Astral]:"ELEMENT_ASTRAL",[G.EElementType.Fire]:"ELEMENT_FIRE",[G.EElementType.Ice]:"ELEMENT_ICE",[G.EElementType.Physical]:"ELEMENT_PHYSICAL",[G.EElementType.Plant]:"ELEMENT_PLANT",[G.EElementType.Shadow]:"ELEMENT_SHADOW",[G.EElementType.Storm]:"ELEMENT_STORM",[G.EElementType.Water]:"ELEMENT_WATER",[G.EElementType.Neutral]:"ELEMENT_NEUTRAL"};let X=class extends j.uAl{constructor(){super(...arguments),this._positiveDiffColor=4717145,this._negativeDiffColor=15953264,this._neutralDiffColor=16777215}create(){super.create(),this.hideAll()}setGearStatData(k,B,U){this.hideAll(),this.setLabel((0,W.k)(z[k])),this.setStatDiff(U),this.setStatValue(B),this.setIconAsset(H._.Ui_battle_revamp_json,K.H.ICON_FRAMES[k]),this._statValue.GameObject.transform.setPositionX(-(this._statDiff.getDimensions().width+5))}setSpellStatData(k){this.hideAll(),this.setLabel(k.name),this.setIconAsset(k.iconGuid),this.setElementAsset(H._.Ui_raster_icons_json,Y[k.element])}setPetElementData(k){this.hideAll(),this.setIconAsset(H._.Ui_raster_icons_json,Y[k]),this.setLabel((0,W.k)(Q[k]))}setLabel(k){this._label.text=k,this._label.GameObject.active=!0,this.gameObject.active=!0}setStatValue(k){this._statValue.text=`${k}`,this._statValue.GameObject.active=!0,this.gameObject.active=!0}setStatDiff(k){if(!j.Aq$.isDefined(k))return void(this._statDiff.GameObject.active=!1);const B=k<0?"":"+";let U=this._neutralDiffColor;k<0?U=this._negativeDiffColor:k>0&&(U=this._positiveDiffColor),this._statDiff.text=`(${B}${k})`,this._statDiff.fill=j.Q1f.numberToHexString(U),this._statDiff.GameObject.active=!0,this.gameObject.active=!0}setIconAsset(k,B){this._icon.setAsset(k,B).then((()=>{this._icon.GameObject.active=!0,this.gameObject.active=!0})).catch(j.RQr.createHandler("Error loading gear stat icon"))}setElementAsset(k,B){this._spellElement.setAsset(k,B).then((()=>{this._spellElement.GameObject.active=V.q.instance.game.cache.getFrameData(k).checkFrameName(B),this.gameObject.active=!0})).catch(j.RQr.createHandler("Error loading spell element icon"))}hideAll(){this._icon.GameObject.active=!1,this._label.GameObject.active=!1,this._statValue.GameObject.active=!1,this._statDiff.GameObject.active=!1,this._spellElement.GameObject.active=!1,this.gameObject.active=!1}};(0,F.Cg)([(0,j.MnK)(q._),(0,F.Sn)("design:type",q._)],X.prototype,"_icon",void 0),(0,F.Cg)([(0,j.MnK)(j.EYj),(0,F.Sn)("design:type",j.EYj)],X.prototype,"_label",void 0),(0,F.Cg)([(0,j.MnK)(j.EYj),(0,F.Sn)("design:type",j.EYj)],X.prototype,"_statValue",void 0),(0,F.Cg)([(0,j.MnK)(j.EYj),(0,F.Sn)("design:type",j.EYj)],X.prototype,"_statDiff",void 0),(0,F.Cg)([(0,j.MnK)(q._),(0,F.Sn)("design:type",q._)],X.prototype,"_spellElement",void 0),(0,F.Cg)([(0,j.iEU)(),(0,F.Sn)("design:type",Number)],X.prototype,"_positiveDiffColor",void 0),(0,F.Cg)([(0,j.iEU)(),(0,F.Sn)("design:type",Number)],X.prototype,"_negativeDiffColor",void 0),(0,F.Cg)([(0,j.iEU)(),(0,F.Sn)("design:type",Number)],X.prototype,"_neutralDiffColor",void 0),X=(0,F.Cg)([(0,j.EVk)("StoreGearStats")],X)},21097:(k,B,U)=>{"use strict";U.d(B,{Dq:()=>It,NL:()=>Dt,WE:()=>Ot});var F=U(8674),G=U(62459),j=U(95359),$=U(88022),H=U(51742),V=U(36648),W=U(10471),q=U(223),K=U(17446),z=U(64868),Y=U(59701),Q=U(35120),X=U(49237),Z=U(76974),J=U(91207),tt=U(77938),et=U(55734),it=U(73797),st=U(31427),nt=U(99617),at=U(13693),rt=U(85540),ot=U(51972),ht=U(48199),ct=U(76277),dt=U(41674),lt=U(15485),ut=U(46784),ft=U(24110),bt=U(30405),pt=U(44094),vt=U(30226),gt=U(47255),mt=U(64353),yt=U(21418),_t=U(53661),Et=U(95057),wt=U(16847),Tt=U(25317);const St=1.55,At={pet:1,dorm:1.25,mathTownFrame:.75,mathTownInterior:.75,mathTownDecor:.75,follow:St,item:St,spellRelic:St,weapon:St,hat:St,outfit:St,boots:St,hair:St,hairColor:St,costume:St},Ct=[37,15,14,13,25,24,38,62,64,63,66,68,71,70,69];var Ot;!function(k){k.MemberLocked="MEMBER_LOCKED",k.LevelLocked="LEVEL_LOCKED",k.NotEnoughCurrency="NOT_ENOUGH_CURRENCY",k.NotEnoughUnsecureCurrency="NOT_ENOUGH_UNSECURE_CURRENCY",k.ServerPurchaseFailed="SERVER_PURCHASE_FAILED",k.OutsideOfHours="Outside of Hours",k.NetworkFailure="Network Failure",k.OfferExpired="Offer is expired",k.NoData="Item card does not have dynamicStoreData",k.AllPurchased="All offers of this card group have been purchased"}(Ot||(Ot={}));const It=["costume","weapon","mount","follow"];let Dt=class extends G.uAl{constructor(){super(...arguments),this._rarityBanners=[],this.onEquipItem=new G.HN0,this.onPurchaseSuccess=new G.HN0,this.onPurchaseFailure=new G.HN0,this._oneLineItemNameRarityBanners=[],this._twoLineItemNameRarityBanners=[],this._autoTooltipPosition={x:640,y:100,arrowDirection:ot.i.DOWN},this._secureCurrencyTooltipPosition={x:1065,y:72,arrowDirection:ot.i.UP},this._buttonLevelLockTooltipPosition={x:1040,y:635,arrowDirection:ot.i.DOWN},this.overrideCurrencyTooltipPosition={x:0,y:0,arrowDirection:ot.i.UP,isOverriding:!1},this._renderOnly=!1,this._renderSelectedItemCount=0}create(){super.create(),Q.q.instance.prodigy.load.assets([H.c.Sfx_button_disabled_state,H.c.Sfx_store_equip,H.c.Sfx_store_purchase,H.c.Sfx_tab_click]),Q.q.instance.game.broadcaster.addAppListener(it.iZ.ToolTipClosed,(()=>{var k;null===(k=this._manualToolTip)||void 0===k||k.close()}),this),this._activePlayer.player.onEquipmentChange.add(this.onEquipmentChanged,this),this.setToDefaultState()}onEquipmentChanged(){var k;(null===(k=this._currentItemData)||void 0===k?void 0:k.data)&&this.renderItemPreview(this._currentItemData.data)}renderSelectedItem(k,B,U=!1){this._purchaseCallback=U?void 0:B,this._renderOnly=U,"currencyID"in k?(this._storeItemCardData=k,this._currentItemData={id:k.item.ID,type:k.item.type,cost:{type:"currency",ID:k.currencyID,N:k.currencyAmount},data:tt.t.getItem(k.item.type,k.item.ID)}):this._currentItemData=Object.assign(Object.assign({},k),{data:tt.t.getItem(k.type,k.id)});const F=++this._renderSelectedItemCount;tt.t.secureGetItem(this._currentItemData.type,this._currentItemData.id).then((k=>{var B,U;if(this.GameObject.isDestroyed||F!==this._renderSelectedItemCount)return;const j=null===(B=k.data)||void 0===B?void 0:B.rarity,$=vt.J.getItemName(k);this.renderItemPreview(k),this.renderBottomPanel(),this._rarityBanners.forEach((k=>k.active=!1)),G.Aq$.isDefined(j)&&(this._rarityBanners[j].active=!0),this.renderItemNameRarityBanner($,null!=j?j:K.E.Common),this.renderButtons(),this.renderItemOwnedCount(),null===(U=this._manualToolTip)||void 0===U||U.close()})).catch(G.RQr.createHandler("StoreItemDetailPreviewComponent: Error fetching item data when attempting to render selected item"))}renderItemOwnedCount(){const k=this._currentItemData.data;if(this._quantityParent.active=!1,!G.Aq$.isDefined(null==k?void 0:k.type)||!G.Aq$.isDefined(null==k?void 0:k.ID))return;const B=this._activePlayer.player.getItemCount(k.type,k.ID);this._quantityParent.active=!0,this._quantityText.text=B.toString()}renderItemNameRarityBanner(k,B){var U;this._itemName.text=k,this._oneLineItemNameRarityBanners.forEach((k=>k.active=!1)),this._twoLineItemNameRarityBanners.forEach((k=>k.active=!1)),this._itemName.wordWrap=!1,(null===(U=this._itemName.GameObject)||void 0===U?void 0:U.transform).sizeDelta.width<=300?this._oneLineItemNameRarityBanners[null!=B?B:0].active=!0:(this._twoLineItemNameRarityBanners[null!=B?B:0].active=!0,this._itemName.wordWrap=!0,this._itemName.updateText()),B===K.E.Rare||B===K.E.Heroic?this._itemName.fill="#ffffff":this._itemName.fill="#363636"}renderBottomPanel(){var k,B;this._bottomSectionLines.active=!1,this._defaultDescription.active=!1,this._spellStats.GameObject.active=!1,this._gearStats.GameObject.active=!1;const U=this._currentItemData.type,F=null===(B=null===(k=this._currentItemData)||void 0===k?void 0:k.data)||void 0===B?void 0:B.data;switch(U){case"pet":this._gearStats.GameObject.active=!0,this._gearStats.setPetElementData(null==F?void 0:F.affinity);break;case"weapon":this.setSpellData(),this.setGearStatData(!0);break;case"hat":case"outfit":case"boots":case"mount":case"follow":this.setGearStatData(!0);break;case"petHat":case"petRelic":this.setGearStatData(!1);break;case"spellRelic":this.setSpellData()}}setSpellData(){var k,B,U,F,j,$,H,W,q;const K=null===(B=null===(k=this._currentItemData)||void 0===k?void 0:k.data)||void 0===B?void 0:B.data;if(!G.Aq$.isDefined(K))return;const z=tt.t.getItem("spellV2",K.spellID);if(!G.Aq$.isDefined(z))return;this._spellStats.GameObject.active=!0;const Y=V.q[pt.$.capitalizeFirstLetter(null!==($=null===(j=null===(F=null===(U=z.metadata)||void 0===U?void 0:U.assets)||void 0===F?void 0:F.icon)||void 0===j?void 0:j.assetKey)&&void 0!==$?$:"")];this._spellStats.setSpellStatData({name:null!==(W=null===(H=z.data)||void 0===H?void 0:H.name)&&void 0!==W?W:"",iconGuid:Y,element:null===(q=z.data)||void 0===q?void 0:q.element})}setGearStatData(k){var B,U,F;const $=this._currentItemData.type,H=null===(U=null===(B=this._currentItemData)||void 0===B?void 0:B.data)||void 0===U?void 0:U.data;if(!G.Aq$.isDefined(null==H?void 0:H.stats))return void G.VyI.log("Could not update gear stat data because itemData is undefined.",G.$bb.Warning);let V=j.IE.Defence,W=0;for(const G of Object.values(j.IE)){const k=H.stats[G];k>W&&(V=G,W=k)}if(W>0)if(this._gearStats.GameObject.active=!0,k){const k=null!==(F=this._activePlayer.player.getGearBattleStats()[$][V])&&void 0!==F?F:0;this._gearStats.setGearStatData(V,W,W-k)}else this._gearStats.setGearStatData(V,W)}setToDefaultState(){var k;this._bottomSectionLines.active=!0,this._defaultDescription.active=!0,this._characterPreview.GameObject.active=!0,this._spellStats.GameObject.active=!1,this._gearStats.GameObject.active=!1,this._itemName.text="",this._quantityParent.active=!1,this._rarityBanners.forEach((k=>k.active=!1)),this._oneLineItemNameRarityBanners.forEach((k=>k.active=!1)),this._twoLineItemNameRarityBanners.forEach((k=>k.active=!1)),this.renderDefaultButtons(),this.cleanUpPreview(),this._characterPreview.addCharacter(this._activePlayer.player),this._characterPreview.setInputEnabled(!1),this._previewContainer.transform.setScale(St,St),null===(k=this._manualToolTip)||void 0===k||k.close()}renderItemPreview(k){var B;this.cleanUpPreview();const U=At[k.type]||1;switch(this._previewContainer.transform.setScale(U,U),k.type){case"pet":this.createPetPreview(k.ID);break;case"follow":this.createFollowPreview(k.ID);break;case"dorm":this.createDormItemPreview(k.ID);break;case"mathTownFrame":this.createTowerTownFrame(k);break;case"mathTownInterior":this.createTowerTownInterior(k);break;case"mathTownDecor":this.createTowerTownDecoration(k);break;case"weapon":case"hat":case"outfit":case"boots":case"costume":case"mount":this._characterPreview.addCharacter(this._activePlayer.player),this._characterPreview.setInputEnabled(!1),this._characterPreview.setEquipment(k.type,k.ID);break;case"item":if(null===(B=k.data.effect)||void 0===B?void 0:B.transform){this._previewContainer.transform.setScale(1,1),this._characterPreview.addCharacter(this._activePlayer.player),this._characterPreview.setInputEnabled(!1),this._characterPreview.transformEffect(k.data.effect);break}case"hair":case"hairColor":this._characterPreview.addCharacter(this._activePlayer.player),this._characterPreview.setAppearance(k.type,k.ID),this._characterPreview.setInputEnabled(!1),this._characterPreview.setEquipment("hat",null);break;default:this.createIconPreview(k)}It.includes(k.type)||this._characterPreview.setEquipment("costume",null)}createPetPreview(k){const B=Q.q.instance.prodigy.create.monster(this.createPreviewContainer(),new et.R(Q.q.instance.game,{ID:k}),1,0,0);B.loadedCallback=()=>B.walk(),B.startLoad(),this._activePlayer.player.encounters.onPetEncountered(k)}createFollowPreview(k){var B;const U=Q.q.instance.prodigy.create.follow(this.createPreviewContainer(),k,1,null,null);null===(B=U.reload)||void 0===B||B.call(U,(()=>{var k;return null===(k=U.walk)||void 0===k?void 0:k.call(U)}))}createDormItemPreview(k){Q.q.instance.prodigy.create.houseItem(this.createPreviewContainer(),k,0,0).findComponent(st.A).setAnchor(.5,1)}createIconPreview(k){const B=Q.q.instance.prodigy.create.item(this.createPreviewContainer(),null,null,{id:k.ID,type:k.type},yt.s.IconNoBackground);B.onContainerLoaded.addOnce((()=>{B.centerX=0,B.bottom=-40}))}createTowerTownFrame(k){const B=J.E.getTowerTownImage(k.data.tag);Q.q.instance.prodigy.load.assets([B],(()=>{this.createPreviewContainer().addChild(Q.q.instance.prodigy.create.sprite(0,0,B,void 0,{x:1,y:1}),Q.q.instance.prodigy.create.sprite(0,0,B,void 0,{x:1,y:1})).scale.x=-1}))}createTowerTownInterior(k){const B=J.E.getTowerTownImage(k.data.tag),U=$._.Ui_towertown_misc_json;Q.q.instance.prodigy.load.assets([U,B],(()=>{this.createPreviewContainer().addChild(Q.q.instance.prodigy.create.sprite(0,0,B,void 0,{x:.5,y:1}),Q.q.instance.prodigy.create.sprite(0,0,U,"interior-ui-mask",{x:.5,y:1}))}))}createTowerTownDecoration(k){const B=J.E.getTowerTownImage(k.data.tag),U=$._.Ui_towertown_misc_json;Q.q.instance.prodigy.load.assets([U,B],(()=>{this.createPreviewContainer().addChild(Q.q.instance.prodigy.create.sprite(0,0,U,"pre-floor-placer",{x:.5,y:1}),Q.q.instance.prodigy.create.sprite(0,0,U,"interior-ui-mask",{x:.5,y:1}),Q.q.instance.prodigy.create.sprite(0,-110,B,void 0,{x:.5,y:1}))}))}createPreviewContainer(){return new G._mx(this._itemPreviewContainer).addComponent(ft.B).getRootContainer()}cleanUpPreview(){this._characterPreview.removeCharacter();for(const k of this._itemPreviewContainer.children)k!==this._characterPreview.GameObject&&k.destroy()}destroy(){var k,B;Q.q.instance.game.broadcaster.removeAppListener(it.iZ.ToolTipClosed,this),this._activePlayer.player.onEquipmentChange.removeAll(this),this.cleanUpPreview(),this.onEquipItem.dispose(),this.onPurchaseFailure.dispose(),this.onPurchaseSuccess.dispose(),null===(k=this._autoToolTip)||void 0===k||k.close(),null===(B=this._manualToolTip)||void 0===B||B.close(),super.destroy()}onBuyButtonClicked(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=Q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),B=this._currentItemData.data;if(Q.q.instance.prodigy.audio.playSFX(43,"purchase"),this._purchaseCallback)try{const U=yield this._purchaseCallback(this._storeItemCardData);if(!U.isSuccess())return void this.onPurchaseFailure.dispatch(this._currentItemData,U.error);if(!U.get())return;this.onPurchaseSuccess.dispatch(this._currentItemData),this._autoToolTip=ht.A.displayToolTipAuto(this._autoToolTip,this._tooltipContainer,{bodyText:k.getText("STORE_TOOLTIP_MESSAGE_0",B.data.name),xPosition:this._autoTooltipPosition.x,yPosition:this._autoTooltipPosition.y}),this.renderButtons(),this.renderItemOwnedCount()}catch(U){G.RQr.logError(U,"Error confirming store purchase"),Q.q.instance.prodigy.open.message(k.getText("NETWORK_ERROR"))}}))}showOtpMlp(){const k=this._currentItemData.cost;if(null!=k&&null!=this._unifiedConversionOpener){const B=gt.o.FunnelNotEnoughCurrency,U=mt.P.shouldUseUnifiedConversionFlow(B)?Et.R.UnifiedConversionFlow:vt.J.showYouTubeMembershipAd(Q.q.instance.game,!0)?Et.R.Video:Et.R.Static,F=Q.q.instance.prodigy.gameContainer.get("c47-20b6");F.featureCommon.sendButtonEvent({buttonName:lt.k.BuyItem,interfaceName:this.shopInterfaceName,interfaceType:dt.Wm.DialogBox,destinationName:(0,ct.G)(q.l).enabled?ut.B.OtpAd:ut.B.MemberAd,saveClickInfo:lt.k.BuyItem});const j=Ct.includes(this.shopId);F.purchase.sendFunnelStart({type:j?"Festival-Store-Hard-Currency-Insufficient-Resources":"Dynamic-Store-Hard-Currency-Insufficient-Resources",category:j?"Festival-Store":"Store",contentId:`${this._currentItemData.type}-${this._currentItemData.id}`,adType:U,adVersion:mt.P.getAdVersion(B)}),this._unifiedConversionOpener.open({[_t.FK.OtpMissingMagicoin]:this.getCurrencyDiff(k)}).catch((k=>{G.VyI.log("There was an error attempting to load the unified conversion flow. Using default behaviour.",G.$bb.Error)}))}}onLockedButtonClicked(){const k=Q.q.instance.prodigy,B=this._activePlayer.player,U="pet"===this._currentItemData.type&&B.kennel.isFull();k.audio.playSFX(49,"pop"),this.getIsOwned()?this.showTooltip("STORE_TOOLTIP_MESSAGE_5",this._buyLockButton.GameObject):B.hasMembership()&&U?this.showTooltip("PURCHASING_MESSAGE_TOO_MANY_PETS_BODY",this._buyLockButton.GameObject):!B.hasMembership()&&U?k.open.battlePassUltimateMemberUpsellModal().catch(G.RQr.createHandler("Could not open MLP.")):this.handleInsufficientCurrency(),this.renderButtons()}handleInsufficientCurrency(){const k=this._currentItemData.cost;if(this.meetsCurrencyRequirement(k))return;if(!("currency"===k.type&&W.h.includes(k.ID)))return void this.showInsufficientCurrencyTooltip();const B=this._activePlayer.player;(0,ct.G)(q.l).enabled?this.showOtpMlp():!B.hasMembership()||B.hasMembershipUpgradeOptions()?this.onMemberBuyButtonClicked(gt.o.FunnelNotEnoughCurrency,"Dynamic-Store-Hard-Currency-Insufficient-Resources","Dynamic-Store-Hard-Currency-Insufficient-Resources-Store",Ot.NotEnoughCurrency):this.showInsufficientCurrencyTooltip()}showInsufficientCurrencyTooltip(){const k=this._currentItemData.cost,B=tt.t.getItem(k.type,k.ID),U=this.getCurrencyDiff(k),F=this.overrideCurrencyTooltipPosition.isOverriding,G=W.h.includes(k.ID)?this._secureCurrencyTooltipPosition:void 0;this.onPurchaseFailure.dispatch(this._currentItemData,Ot.NotEnoughCurrency),this.showTooltip("STORE_TOOLTIP_MESSAGE_3",this._buyLockButton.GameObject,[U,(null==B?void 0:B.data)?vt.J.getItemName(B,U>1):""],F?this.overrideCurrencyTooltipPosition:G)}onDynamicStoreMemberBuyButtonClicked(){let k,B,U,F;const G=this._currentItemData.cost;!this.meetsCurrencyRequirement(G)&&(k=gt.o.FunnelNotEnoughCurrency,B="Dynamic-Store-Hard-Currency-Insufficient-Resources",U="Dynamic-Store-Hard-Currency-Insufficient-Resources-Store",F=Ot.NotEnoughCurrency),this.onMemberBuyButtonClicked(k,B,U,F)}onMemberBuyButtonClicked(k=gt.o.FunnelBuyMemberItem,B="Store-Buy-Member-Item",U="Store",F=Ot.MemberLocked){var G;const j=this._currentItemData.data,$=Q.q.instance.prodigy.gameContainer;Q.q.instance.prodigy.audio.playSFX(18,"pop");const H=mt.P.shouldUseUnifiedConversionFlow(k)?Et.R.UnifiedConversionFlow:vt.J.showYouTubeMembershipAd(Q.q.instance.game,!0)?Et.R.Video:Et.R.Static;$.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:lt.k.BuyMemberItem,interfaceName:this.shopInterfaceName,interfaceType:dt.Wm.DialogBox,saveClickInfo:lt.k.BuyMemberItem}),$.get("c47-20b6").purchase.sendFunnelStart({type:B,category:U,contentId:`${j.type}-${j.ID}`,adType:H,adVersion:mt.P.getAdVersion(k)}),null===(G=this._manualToolTip)||void 0===G||G.close(),Q.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:k,conversionFunnelMetadata:`${j.type}-${j.ID}`},lt.k.BuyMemberItem),this.onPurchaseFailure.dispatch(this._currentItemData,F),this.renderButtons()}onEquipButtonPressed(){const k=this._currentItemData.data,B=Q.q.instance.prodigy.gameContainer;Q.q.instance.prodigy.audio.playSFX(42,"equip"),this._activePlayer.player.equip(k.ID,k.type).then((U=>{U&&(this._activePlayer.player.appearanceChanged=!0,this.onEquipItem.dispatch(k),Q.q.instance.game.broadcaster.broadcast(it.J8.PlayerAppearanceUpdated),this._autoToolTip=ht.A.displayToolTipAuto(this._autoToolTip,this._tooltipContainer,{bodyText:B.get(G.$Bt.LocalizationService).getText("STORE_TOOLTIP_MESSAGE_1",k.data.name),xPosition:this._autoTooltipPosition.x,yPosition:this._autoTooltipPosition.y}))})).catch(G.RQr.createHandler(`StoreItemDetailPreviewComponent:onEquipButtonPressed Error equipping item ${k.type}-${k.ID}`)).finally((()=>this.renderButtons()))}onUnequipButtonPressed(){const k=this._currentItemData.data;Q.q.instance.prodigy.audio.playSFX(42,"equip"),this._activePlayer.player.unEquip(k.ID,k.type).then((k=>{k&&(this._activePlayer.player.appearanceChanged=!0,Q.q.instance.game.broadcaster.broadcast(it.J8.PlayerAppearanceUpdated)),this.renderButtons()})).catch(G.RQr.createHandler(`StoreItemDetailPreviewComponent:onUnequipButtonPressed Error unequipping item ${k.type}-${k.ID}`))}onLevelLockedButtonPressed(){const k=this._currentItemData.data;if(!G.Aq$.isDefined(k))return;const B=bt.o.isEquipableType(k.type),U=this._activePlayer.player.isItemOwned({type:k.type,ID:k.ID});this.showTooltip(U&&B?"STORE_TOOLTIP_MESSAGE_6":"STORE_TOOLTIP_MESSAGE_7",this._levelLockButton.GameObject,[k.data.lockLevel,this._activePlayer.player.data.level],this._buttonLevelLockTooltipPosition),this.onPurchaseFailure.dispatch(this._currentItemData,Ot.LevelLocked),this.renderButtons()}showTooltip(k,B,U,F){var j;const $=Q.q.instance.prodigy.gameContainer;Q.q.instance.prodigy.audio.playSFX(49,"pop"),this._manualToolTip=ht.A.displayTooltipTargeted(this._manualToolTip,this._tooltipContainer,{bodyText:$.get(G.$Bt.LocalizationService).getText(k,...null!=U?U:[]),arrowDirection:null!==(j=null==F?void 0:F.arrowDirection)&&void 0!==j?j:ot.i.DOWN},B)}renderDefaultButtons(){this._unequipButton.GameObject.active=!1,this._memberBuyButton.GameObject.active=!1,this._buyButton.GameObject.active=!1,this._wearButton.GameObject.active=!1,this._memberWearButton.GameObject.active=!1,this._levelLockButton.GameObject.active=!1,this._buyLockButton.GameObject.active=!1}getIsOwned(){if(this._storeItemCardData&&z._.isFeatureEnabled())return(0,rt.w)(this._storeItemCardData);const k=this._currentItemData.data;return this._activePlayer.player.isItemOwned({type:k.type,ID:k.ID})}renderButtons(){var k,B;const U=this._currentItemData.data;if(!G.Aq$.isDefined(U)||this._renderOnly)return;const F=bt.o.isEquipableType(U.type),j=Q.q.instance.prodigy.gameContainer.get("5c7-e02d"),$=this._activePlayer.player.hasMembership(),H=!$||this._activePlayer.player.hasMembershipUpgradeOptions(),V="pet"===U.type&&this._activePlayer.player.kennel.isFull(),q=bt.o.isLevelLocked(this._activePlayer.player,null!==(B=null===(k=null==U?void 0:U.data)||void 0===k?void 0:k.lockLevel)&&void 0!==B?B:0),K=this._activePlayer.player.equipment.getEquipment(U.type)===U.ID,z=this.meetsCurrencyRequirement(this._currentItemData.cost),Y="dorm"===U.type&&this._activePlayer.player.house.getOwned(U.ID)>=9,X=this.getIsOwned();let Z=!$&&this.isCurrentItemMemberLocked();"currency"===this._currentItemData.cost.type&&W.h.includes(this._currentItemData.cost.ID)&&!this.isCurrentItemMemberLocked()&&(Z=j.isHardCurrencyMemberLocked(this._currentItemData.cost.N)||H&&!z),this.renderDefaultButtons(),X&&!q?F?(Z?this._memberWearButton.GameObject.active=!K:this._wearButton.GameObject.active=!K,this._unequipButton.GameObject.active=K):this._buyLockButton.GameObject.active=!0:V?this._buyLockButton.GameObject.active=!0:q?(this._levelLockButton.GameObject.findComponentsInChildren(G.EYj).forEach((k=>k.text=`Level ${U.data.lockLevel}`)),this._levelLockButton.GameObject.active=!0):Z?this._memberBuyButton.GameObject.active=!0:!z||Y?this._buyLockButton.GameObject.active=!0:this._buyButton.GameObject.active=!0,this.updateBuyButtonAppearance(this._buyButton.GameObject),this.updateBuyButtonAppearance(this._buyLockButton.GameObject)}lockBuyButton(){this._buyButton.lockState(Z.K.Disabled)}unlockBuyButton(){this._buyButton.unlockState()}updateBuyButtonAppearance(k){const B=this._currentItemData.cost;if(!G.Aq$.isDefined(B.N)||!G.Aq$.isDefined(B.ID))return G.VyI.log("Cost is not correctly defined for this item.",G.$bb.Warning),void(k.active=!1);k.findComponentsInChildren(G.EYj).forEach((k=>{k.text=B.N.toString()}));const U=Y.W.getCurrencyIcon(wt.h.ByTypeForStore,B.ID);Q.q.instance.prodigy.load.assetsAsPromise(U.atlas).then((()=>{k.findComponentsInChildren(G.vYh).forEach((k=>{k.updateAsset(U.atlas,U.frame),k.GameObject.active=!0}))}),G.RQr.createHandler("Failed to load currency icon"))}isCurrentItemMemberLocked(){var k,B,U,F,G;return 1===(null!==(U=null!==(k=this._currentItemData.member)&&void 0!==k?k:null===(B=this._currentItemData.data)||void 0===B?void 0:B.member)&&void 0!==U?U:null===(G=null===(F=this._currentItemData.data)||void 0===F?void 0:F.data)||void 0===G?void 0:G.member)}meetsCurrencyRequirement(k){if(1===k.ID)return this._activePlayer.player.getGold()>=k.N;if("currency"===k.type&&W.B.includes(k.ID)){return Q.q.instance.prodigy.gameContainer.get("5c7-e02d").getBalance(k.ID)>=k.N}return this._activePlayer.player.backpack.hasItem(k.type,k.ID)>=k.N}getCurrencyDiff(k){if("currency"===k.type&&1===k.ID)return k.N-this._activePlayer.player.getGold();if("currency"===k.type&&W.B.includes(k.ID)){const B=Q.q.instance.prodigy.gameContainer.get("5c7-e02d");return k.N-B.getBalance(k.ID)}return k.N-this._activePlayer.player.backpack.hasItem(k.type,k.ID)}};(0,F.Cg)([(0,G.MnK)(nt.I),(0,F.Sn)("design:type",nt.I)],Dt.prototype,"_unifiedConversionOpener",void 0),(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",Object)],Dt.prototype,"_activePlayer",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Dt.prototype,"_bottomSectionLines",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Dt.prototype,"_defaultDescription",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Dt.prototype,"_previewContainer",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Dt.prototype,"_itemPreviewContainer",void 0),(0,F.Cg)([(0,G.MnK)(at.Y),(0,F.Sn)("design:type",at.Y)],Dt.prototype,"_characterPreview",void 0),(0,F.Cg)([(0,G.MnK)(Tt.D),(0,F.Sn)("design:type",Tt.D)],Dt.prototype,"_gearStats",void 0),(0,F.Cg)([(0,G.MnK)(Tt.D),(0,F.Sn)("design:type",Tt.D)],Dt.prototype,"_spellStats",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],Dt.prototype,"_rarityBanners",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Dt.prototype,"_tooltipContainer",void 0),(0,F.Cg)([(0,G.MnK)(X.$),(0,F.Sn)("design:type",X.$)],Dt.prototype,"_buyButton",void 0),(0,F.Cg)([(0,G.MnK)(X.$),(0,F.Sn)("design:type",X.$)],Dt.prototype,"_buyLockButton",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Dt.prototype,"onEquipItem",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Dt.prototype,"onPurchaseSuccess",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Dt.prototype,"onPurchaseFailure",void 0),(0,F.Cg)([(0,G.MnK)(X.$),(0,F.Sn)("design:type",X.$)],Dt.prototype,"_wearButton",void 0),(0,F.Cg)([(0,G.MnK)(X.$),(0,F.Sn)("design:type",X.$)],Dt.prototype,"_unequipButton",void 0),(0,F.Cg)([(0,G.MnK)(X.$),(0,F.Sn)("design:type",X.$)],Dt.prototype,"_memberBuyButton",void 0),(0,F.Cg)([(0,G.MnK)(X.$),(0,F.Sn)("design:type",X.$)],Dt.prototype,"_memberWearButton",void 0),(0,F.Cg)([(0,G.MnK)(X.$),(0,F.Sn)("design:type",X.$)],Dt.prototype,"_levelLockButton",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],Dt.prototype,"_oneLineItemNameRarityBanners",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],Dt.prototype,"_twoLineItemNameRarityBanners",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],Dt.prototype,"_itemName",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Dt.prototype,"_quantityParent",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],Dt.prototype,"_quantityText",void 0),Dt=(0,F.Cg)([(0,G.EVk)("StoreItemDetailPreview")],Dt)},40392:(k,B,U)=>{"use strict";U.d(B,{i:()=>ne});var F=U(8674),G=U(58268),j=U(62459),$=U(95891),H=U.n($),V=U(113),W=U(88022),q=U(99625),K=U(51742),z=U(36648),Y=U(56942),Q=U(47708),X=U(97495),Z=U(40295);class J{}J.DEFAULT_ICON_SCALE=.8,J.DEFAULT_ICON_OFFET={x:3,y:-12},J.SUB_ICON_SCALE=.8,J.SUB_ICON_OFFSET={x:30,y:20},J.ICON_BASE_FRAME="Map-Pin-FeaturedPet",J.SUB_ICON_FRAME="FeaturedPet-Paw-Icon";var tt=U(28344),et=U(42448),it=U(90633),st=U(73678),nt=U(61468),at=U(35120),rt=U(49237),ot=U(91207),ht=U(34829),ct=U(77938),dt=U(86051),lt=U(10592),ut=U(90817),ft=U(2212),bt=U(93867),pt=U(84399),vt=U(35488),gt=U(17740),mt=U(52322),yt=U(13367),_t=U(73797),Et=U(11624),wt=U(46548),Tt=U(17509),St=U(42749),At=U(43531),Ct=U(15485),Ot=U(46784),It=U(65050),Dt=U(41674),Rt=U(96494),Pt=U(76277),Mt=U(44357),Nt=U(68152),xt=U(29546),Lt=U(24285),kt=U(80060),Bt=U(64271),Ut=U(47728),Ft=U(85126),Gt=U(4631),jt=U(76711),$t=U(25983),Ht=U(85515),Vt=U(48842),Wt=U(5075),qt=U(41968),Kt=U(26691),zt=U(45902),Yt=U(82680),Qt=U(74208),Xt=U(32456),Zt=U(13751),Jt=U(3785),te=U(15989);const ee=(0,U(77601).gb)({key:"arcadia-branding-in-math-rpg",activateAssociatedExperiments:0,default:!1});var ie=U(93054);class se{constructor(k){var B;this.isForceLocked=!1,Object.assign(this,k),k.difficultyModeAgnostic||null!==(B=this.difficultyMode)&&void 0!==B||(this.difficultyMode=X.i.Regular)}getLocalizer(){var k;return null!==(k=this._localizer)&&void 0!==k?k:this._localizer=at.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService)}meetsRequirements(){const k=this.getRequirementsID();return!this.isUnreleased&&(!j.Aq$.isDefined(k)||at.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirementsDeprecated(k))}getRequiredLevel(){var k;return null!==(k=this._requiredLevel)&&void 0!==k?k:this._requiredLevel=xt.X.getLevelRequirement(this.getRequirementsID())}getDeniedSubjects(){return xt.X.getDeniedSubjectRequirement(this.getRequirementsID())}isCurrentSubjectDenied(){const k=this.getDeniedSubjects();if(k){const B=at.q.instance.prodigy.gameContainer.get("f1d-f7b1").getSubject();if(k.includes(B))return!0}return!1}isCurrentProgressDenied(){const k=this.getZonePrerequisites();if(!k||0===k.length)return!1;return k.some((k=>!ie.P.hasPlayerCompletedFinalQuestForZone(k)))}isHidden(){return!!this.hideEvaluationFunc&&this.hideEvaluationFunc()}getRequirementsID(){return this.requirementsID}getGenericLockMessage(){return this.getLocalizer().getText("ZONE_LEVEL_REQUIREMENT",this.getRequiredLevel(),this.getName())}getLockMessage(){var k;const B=at.q.instance.prodigy.gameContainer.get("db5-fb6e").getFeatureRequirementAsset(this.getRequirementsID()),U=null===(k=null==B?void 0:B.metadata)||void 0===k?void 0:k.textKey,F=(null==U?void 0:U.length)>0;if(F&&(this.lockKey=U),F){const k=ne.getHighestAvailableZoneData().getName();return k?this.getLocalizer().getText(this.lockKey,k,this.getName()):this.getGenericLockMessage()}return this.getLocalizer().getText(this.lockKey,this.getRequiredLevel())}getName(){return"arcadia"!==this.zone||(0,Pt.G)(ee)?this.nameKey?this.getLocalizer().getText(this.nameKey):null:this.getLocalizer().getText("GAME_ISLAND_MAP")}getLockName(){return this.lockNameKey?this.getLocalizer().getText(this.lockNameKey):null}getSummary(){return this.summaryKeyOverrideFunc?this.getLocalizer().getText(this.summaryKeyOverrideFunc()):this.summaryKey?this.getLocalizer().getText(this.summaryKey):null}getGoButtonText(){return this.goButtonKey?this.getLocalizer().getText(this.goButtonKey):null}isVisited(){return!this.shouldTrackVisits||j.Aq$.isDefined(at.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.get(`zone-${this.zone}`))}getZonePrerequisites(){return xt.X.getZonePrerequisiteRequirement(this.getRequirementsID())}}class ne extends Yt.W{get prefab(){return this._prefabComponent}get forceLockedZoneIds(){var k;return null!==(k=this._forceLock)&&void 0!==k?k:[]}static setNextVisitParameters(k){Object.assign(this._nextVisitOverrides,k)}constructor(k,B,U={}){var F;const{disableClose:G=!1,forceLock:$=[],assets:W=[],forceUnlock:q=[],disableZoneGoals:K=!1,injectedValues:z={},disableDifficultyModeSelect:Y=!1,difficultyMode:Q,autoOpenDialogueForZoneID:Z,onClose:J=H().noop,onCloseButton:tt=H().noop,onInitialized:et}=Object.assign(Object.assign({},U),ne._nextVisitOverrides);if(super(k,B,70,{},ne.BASE_ASSETS.concat(W).concat(ne.getNonDependencyAssetsForPreload())),this.dialogueContainer=null,this._prefabComponent=null,this._prefabObj=null,this._strokeObjects=[],this._puppetMasterIndicator=null,this._gameObjectCreationPromises=[],this._isZoneGoalsActive=!0,this._isZoneLockCutsceneActive=!1,this.onWorldMapInitialized=new j.HN0,this._destroyZoneGoalsLayerOnClose=!1,this._isFestivalActive=!!at.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival(),this._festivalTravelModalEnabled=(0,Pt.G)(gt.t),this._notificationBlockedZones=[],this.game=k,this._disableClose=G,this._disableDifficultyModeSelect=Y,this._autoOpenDialogueForZoneID=Z,this._disableZoneGoals=K,this._forceUnlock=q,this._forceLock=[...$,...at.q.instance.prodigy.classModeController.getInClassDisabledZones()],this._injectedValues=z,this._injectedValues[Jt.z.WorldMapMenuInstanceLockedZones]=[...this._forceLock],this.onClose=J,this.isFullScreenUI=!0,this._closeButtonCallback=tt,ne.DIFFICULTY_MODE=null!==(F=null!=Q?Q:this.playerData.player.currentDifficulty)&&void 0!==F?F:X.i.Regular,at.q.instance.prodigy.gameContainer.get("12f-4e29").isBreadcrumbComplete(it.B.FEATURE_FIREFLY_QUEST_REVISIONS,it.B.BREADCRUMB_SHIVERCHILL_UNLOCKED)){const k=ne.BUTTONS_CONFIG.find((k=>k.tag===V.O.Shiverchill));k&&(k.requirementsID=32)}ne._nextVisitOverrides={},et&&this.onWorldMapInitialized.addOnce(et)}create(){super.create();const k=at.q.instance.prodigy.gameContainer.get("d0e-64fd");if(this._prefabObj=kt.d.loadWithInjectedValuesFromGUID(k,q.l.WorldMap,this._injectedValues),this._prefabComponent=this._prefabObj.findComponentInChildren(Zt.n),this._difficultyModeComponent=this._prefabObj.findComponentInChildren(Qt.k),this._difficultyModeComponent.setDifficultyMode(ne.DIFFICULTY_MODE),this.dialogueContainer.addChild(this._prefabObj.legacyTransform.group),at.q.instance.game.broadcaster.addAppListener(_t.n8.WorldMapDifficultyModeChanged,(()=>{this.onDifficultyModeChanged()}),this),this._isZoneLockCutsceneActive||this._showZoneLockCutsceneLinearCampaignTransition)return void this.loadZoneLockingExperience().catch((()=>j.VyI.log("Failed to load zone locking experience",j.$bb.Error)));let B=!this._disableZoneGoals&&this.isZoneGoalsEnabled();this.initializePrefab(B).suppressInteractions&&(B=!1),B?this.loadZoneGoalsUI().catch((()=>j.VyI.log("Failed to load zone goals UI",j.$bb.Error))):this.sendInterfaceOpenEvent(),this._prefabComponent.difficultySelectorButtonText&&this.setDifficultyButtonText(),this._prefabComponent.difficultySelectorButtonNotificationBadge&&(this._prefabComponent.difficultySelectorButtonNotificationBadge.active=!this.breadcrumbManager.isBreadcrumbComplete(it.B.FEATURE_CAMPAIGN_REPLAY,it.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_HARD_MODE)),this._prefabComponent.onEnableZoneGoals.add((k=>{this.enableZoneGoals(k)}),this)}onDifficultyModeChanged(){var k;if(!ft.J.shouldShowWorldMapHardModeFirstEntryDialogue()||ut.gz.initialized){for(const k of this._prefabObj.findComponentsInChildren(qt.P))k.run();this._notificationBlockedZones=[],this.setupAllLocations(),this.setDifficultyButtonText(),this._forceLock.indexOf("DISABLE_TITAN")<0&&this.fetchTitanData(),null===(k=this._zoneGoalsController)||void 0===k||k.dismiss(),this._prefabComponent.closeButton.GameObject.active=!1}else this.startHigherDifficultyFTUE(X.i.Hard)}startHigherDifficultyFTUE(k){at.q.instance.game.broadcaster.addAppListener(_t.sn.HardModeFtueStepAdvanced,this.hardModeFtueStepEventHandler.bind(this),this),ut.gz.instance.beginHardModeFirstEntryExperience();const B=k===X.i.Hard?st.A_.FORESTHARD:st.A_.FORESTEXPERT;for(const U of this._prefabObj.findComponentsInChildren(qt.P))U._zoneId!==B&&U.showGuideHand(!1)}setActive(k){super.setActive(k),ut.gz.initialized&&(j.wa5.getActiveScene().getLayer(Ht.E.OverlayLayer).visible=!0)}static getNonDependencyAssetsForPreload(){return[...Ut.x.getAllFestivalMapButtonImages(),Xt.u.getDailyElementalBoostSpineGUID()]}addOrMakeZoneGoalsLayerVisible(){j.wa5.getActiveScene().hasLayer(ne.ZONE_GOALS_LAYER_NAME)?j.wa5.getActiveScene().getLayer(ne.ZONE_GOALS_LAYER_NAME).visible=!0:(this._destroyZoneGoalsLayerOnClose=!0,j.wa5.getActiveScene().addLayer(ne.ZONE_GOALS_LAYER_NAME,ne.ZONE_GOALS_LAYER_DEPTH,!0))}showGemAwardedSequence(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;yield this.loadZoneGoalsUI();const F=Bt.N.getCoreZonesInOrder(ne.DIFFICULTY_MODE),G=F[F.findIndex((B=>B.zone===k))+1],$=j.Aq$.isDefined(G)&&!ne.isZoneLockedParams(G,this.featureRequirements,this._forceLock,this._forceUnlock);if(this._prefabObj&&!this._prefabObj.isDestroyed){(null!==(B=this.prefab.GameObject.findComponentsInChildren(qt.P,!0))&&void 0!==B?B:[]).forEach((k=>{k.showGuideHand(!1),k._zoneId!==(null==G?void 0:G.zone)&&k.onShowGuideHand.removeAll()})),this._indicatorContainer.visible=!1,this.addOrMakeZoneGoalsLayerVisible(),null===(U=this._zoneGoalsController)||void 0===U||U.showGemAwardSequence(k,(()=>{var k;this._indicatorContainer.visible=!1,$&&(null===(k=this._prefabObj.findComponentsInChildren(qt.P).find((k=>k._zoneId===(null==G?void 0:G.zone))))||void 0===k||k.onShowGuideHand.dispatch(!0)),this.enableZoneGoals(!1)}))}}))}loadZoneLockingExperience(){return(0,F.sH)(this,void 0,void 0,(function*(){this.initializePrefab(!1),this._prefabComponent.GameObject.findComponentsInChildren(rt.$).forEach((k=>{k.inputEnabled=!1})),this.game.broadcaster.addAppListener(_t._D.PuppetmasterWorldMapSpell,(()=>this.onPuppetMasterZoneLockSpell()),this),this.game.broadcaster.addAppListener(_t._D.PuppetmasterCutsceneComplete,(()=>this.onZoneLockCutsceneComplete()),this),this.game.broadcaster.addAppListener(_t.n8.WorldMapZoneSelected,(()=>this.completeZoneLockExperienceSeenBreadcrumb()),this);const k=at.q.instance.prodigy.gameContainer.get("d0e-64fd"),B=yield k.loadWithDependenciesFromGUID(q.l.ZoneLockedSequence);this._prefabObj&&!this._prefabObj.isDestroyed&&(j.wa5.getActiveScene().addGameObject(B),this.addOrMakeZoneGoalsLayerVisible(),B.setLayer(ne.ZONE_GOALS_LAYER_NAME,!0),this.sendInterfaceOpenEvent())}))}onPuppetMasterZoneLockSpell(){var k;for(let B=0;B{k.inputEnabled=!0}));const B=null===(k=ne.getHighestAvailableZoneData())||void 0===k?void 0:k.prefabIndex;if(j.Aq$.isDefined(B)){const k=this._prefabComponent.getIconContainer(B),U=at.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(q.l.GuideHandSortingAnchor).then((B=>{var U,F;this.dialogueContainer.addChild(B.findComponent(j.jsv).getRootContainer()),null===(U=B.findComponent(j.XVE))||void 0===U||U.setPositionX(k.legacyTransform.x-50),null===(F=B.findComponent(j.XVE))||void 0===F||F.setPositionY(k.legacyTransform.y-100)})).catch((()=>j.VyI.log("Failed to load Guide Hand prefab",j.$bb.Error)));this._gameObjectCreationPromises.push(U)}}completeZoneLockExperienceSeenBreadcrumb(){at.q.instance.prodigy.gameContainer.get("12f-4e29").completeBreadcrumb(it.B.FEATURE_ZONE_LOCK_CUTSCENE,it.B.BREADCRUMB_PUPPETMASTER_WORLD_MAP_SEQUENCE),this.game.broadcaster.removeAppListener(_t.n8.WorldMapZoneSelected,this)}activateLinearCampaignTransition(){this._showZoneLockCutsceneLinearCampaignTransition=!0}isZoneGoalsEnabled(){const k=at.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return k.ultimateSessionStatus===lt.n.None&&k.hasCompletedTutorial()}loadZoneGoalsUI(){return(0,F.sH)(this,void 0,void 0,(function*(){if(j.Aq$.isDefined(this._zoneGoalsPromise))return this._zoneGoalsPromise;const k=at.q.instance.prodigy.gameContainer.get("d0e-64fd");return this._zoneGoalsPromise=k.loadWithDependenciesFromGUID(q.l.ZoneGoalsMain).then((k=>{this._prefabObj&&!this._prefabObj.isDestroyed&&(this._zoneGoalsObject=k,j.wa5.getActiveScene().addGameObject(this._zoneGoalsObject),this.addOrMakeZoneGoalsLayerVisible(),this._zoneGoalsObject.setLayer(ne.ZONE_GOALS_LAYER_NAME,!0),this._zoneGoalsController=this._zoneGoalsObject.findComponentInChildren(zt._),this._zoneGoalsController.onApplyCustomDisplay.add(this.applyCustomHighlight,this),this._zoneGoalsController.onClearCustomDisplay.add(this.clearCustomHighlight,this),this._zoneGoalsController.onZonePanelActivated.add((k=>{const B=this.buttonConfigByQuestIndexAndDifficulty(k,ne.DIFFICULTY_MODE),U=ne.isZoneLockedParams(B,this.featureRequirements,this._forceLock);this.openLocation(B,U)})),this._isZoneGoalsActive?bt.U.shouldShowEndgameNootWorldMapDialogue()||bt.U.isStepComplete(Z.B.PuppetMasterDefeated)||this._zoneGoalsController.tryAutoTrigger():this.enableZoneGoals(!1),this.sendInterfaceOpenEvent(this._zoneGoalsController.getCurrentActivePanels()))})).catch((()=>{j.VyI.log("Failed to load zone goals UI",j.$bb.Error)})),this._zoneGoalsPromise}))}initializePrefab(k){var B;const U={suppressInteractions:!1};if(this._prefabComponent.GameObject.legacyTransform.group.updateTransform(),this._indicatorContainer=at.q.instance.game.add.container(),this._prefabObj.legacyTransform.group.addChild(this._indicatorContainer),this._prefabComponent.menuTitle.text=this.localizer.getText("WORLD_MAP_TITLE"),this._disableClose?this._prefabComponent.closeButton.GameObject.active=!1:this.setupCloseButton(),pt.R.isFeatureEnabled()&&bt.U.isStepComplete(Z.B.PuppetMasterDefeated)&&(this._prefabComponent.difficultySelectorButton.GameObject.active=!this._disableDifficultyModeSelect),this._isZoneLockCutsceneActive||this._showZoneLockCutsceneLinearCampaignTransition){for(const k of ne.BUTTONS_CONFIG)this.setupLocation(k,null===(B=k.shouldLockForPuppetMasterZoneLockSpell)||void 0===B?void 0:B.call(k),!1,!1);return this._indicatorContainer.visible=!1,this.setupStrokeObjects(!1),this.onWorldMapInitialized.dispatch(this),U}if(U.suppressInteractions||(U.suppressInteractions=this.startDialogue()),this.setupAllLocations(U.suppressInteractions),this.setupStrokeObjects(k),!U.suppressInteractions)for(const j of this._prefabObj.findComponentsInChildren(qt.P))j.run()&&(U.suppressInteractions=!0,U.activeZoneUnlockComponent=j);const F=this._prefabObj.findComponentInChildren(Xt.u);U.suppressInteractions?F.blockReveal=!0:F.attemptReveal();const G=this.playerData.player;if(G.tutorial.getMenuValue(dt.K.WORLD_MAP.INTRO)<1){G.tutorial.setMenuValue(dt.K.WORLD_MAP.INTRO,1);const k=new At.rD(this.game);k.addEvents([{dialogueData:k.dataProvider.get(28),blockInput:!0}]),k.start()}if(G.ultimateSessionStatus===lt.n.TrackingNPC&&this._forceLock.indexOf("DISABLE_ULTIMATES_QUEST")<0&&this.setupNPCLocation(),G.ultimateSessionStatus===lt.n.TamingUltimate&&this._forceLock.indexOf("DISABLE_ULTIMATES_QUEST")<0&&this.setupUltimateLocation(),this._forceLock.indexOf("DISABLE_TITAN")<0&&this.fetchTitanData(),this._forceLock.indexOf("DISABLE_DUNGEON")<0&&this.featureRequirements.meetsRequirementsDeprecated(43)&&!ne.isZoneLockedParams(ne.BUTTONS_CONFIG[Et.P.Shiverchill],this.featureRequirements)&&ne.isInDifficultyMode(X.i.Regular)&&this.setupDungeonIcons(),bt.U.isEndgameQuestActive()&&this.setupPuppetMasterIndicator(),this._indicatorTween=this.game.add.tween(this._indicatorContainer,this._indicatorContainer).to({y:10},400,j.GS3.Quadratic.InOut,!0,0,ht.s.MAX_SAFE_INTEGER,!0),this.game.broadcaster.broadcast(_t.sd.GetTotalFriendRequests,"FriendsList",[!1]),j.Aq$.isDefined(this._autoOpenDialogueForZoneID)){const k=ne.BUTTONS_CONFIG.find((k=>k.zone===this._autoOpenDialogueForZoneID));if(k){const B=ne.isZoneLockedParams(k,this.featureRequirements,this._forceLock);U.activeZoneUnlockComponent?U.activeZoneUnlockComponent.onShowGuideHand.addOnce((()=>this.openLocation(k,B)),this):this.openLocation(k,B)}else j.VyI.log("WorldMapMenu: Auto-open dialogue zone not found",j.$bb.Warning)}return this.onWorldMapInitialized.dispatch(this),U}setupStrokeObjects(k){if(this._strokeObjects=this._prefabComponent.menuContainer.findComponentsInChildren(wt.t),j.o5U.isDesktop())for(let B=0;B{var k;const U=ne.ZONE_GOALS_STROKE_OBJECT_MAPPING[B];-1!==U&&(null===(k=this._zoneGoalsController)||void 0===k||k.setPanelActive(U,this._strokeObjects[B].GameObject.active,!0))}))}setupCloseButton(){this._prefabComponent.closeButton.onClick.getBindingsCount()>0&&j.VyI.log("WorldMapMenu: Close button already has a click binding",j.$bb.Warning),this._prefabComponent.closeButton.onClick.add((()=>{var k;null===(k=this._closeButtonCallback)||void 0===k||k.call(this),ne.sendButtonClickedEvent(Ct.k.X,at.q.instance.prodigy.world.getCurrentZone(),Ot.B.WorldMap),at.q.instance.prodigy.audio.playSFX(18,"pop"),at.q.instance.prodigy.world.getZone(at.q.instance.prodigy.world.getCurrentZone()).createTopLeftNavigationButton(),ut.gz.initialized&&ut.gz.instance.completeFtue(!1),this.close()}))}setupAllLocations(k=!1){this._indicatorContainer.removeChildren();for(const B of ne.BUTTONS_CONFIG){const U=at.q.instance.prodigy.breadcrumbManager,F=k&&U.isBreadcrumbDefined(...this.getZoneUnlockAnimationBreadcrumb(B))&&!U.isBreadcrumbComplete(...this.getZoneUnlockAnimationBreadcrumb(B)),G=!this._isZoneLockCutsceneActive&&ne.isZoneLockedParams(B,this.featureRequirements,this._forceLock,this._forceUnlock)||F;this.setupLocation(B,G)}}setupLocation(k,B,U=!0,G=!0){var $,H,V;if(k.isHidden())return this.prefab.getDisabledLocation(k.prefabIndex).active=!1,this.prefab.getLockTransition(k.prefabIndex).active=!1,this.prefab.getLockObject(k.prefabIndex).active=!1,this.prefab.getMapLocation(k.prefabIndex).active=!1,void(this.prefab.getIconContainer(k.prefabIndex).active=!1);const q=k.useLocationDialogPrefab?()=>this.openLocationDialogPrefab(k,B):()=>this.openLocation(k,B),K=this._prefabComponent.getMapLocation(k.prefabIndex),z=K.findComponentsInChildren(rt.$);for(let F=0;F{q(),k.analyticsClickOverride?k.analyticsClickOverride():(ne.sendButtonClickedEvent(`${k.target.split("-")[0]}-button`,k.target,Ot.B.WorldMap,{elementType:"map_screen"}),this.sendZoneProgressInterfaceEvent(k))})));const Y=this.getZonePinOffsets(k,B);if(!B&&Y.hasFeaturedPet&&this.setupFeaturedSpawnNotification(k,Y.pinOffsetValues[0]),Y.festivalButton&&(this.game.cache.checkImageKey(Y.festivalButton)?K.findComponentsInChildren(j.vYh).forEach((k=>{k.updateAsset(Y.festivalButton)})):j.VyI.log(`WorldMap: Festival button image not loaded: ${Y.festivalButton}`,j.$bb.Error)),Y.hasFestivalNotification){const B=Ut.x.getFestivalMapIconImage();B?this.createNotificationIcon(k,B,void 0,1,{x:Y.pinOffsetValues[1],y:0}):this.createNotificationIcon(k,W._.General_icons_json,"exclamation",1,{x:Y.pinOffsetValues[1],y:0})}const Q=this._prefabComponent.getDisabledLocation(k.prefabIndex);Q.active=B,this._prefabComponent.getLockTransition(k.prefabIndex).active=B;const X=this._prefabComponent.getLockObject(k.prefabIndex);X.active=B;const Z=X.findComponent(rt.$);if(Z.inputEnabled=B,B)if(Z.onClick.removeAll(),Z.onClick.add((()=>{q(),ne.sendButtonClickedEvent(`${k.target.split("-")[0]}-button`,"Locked",Ot.B.WorldMap,{elementType:"map_screen"}),this.fireInterfaceEvent({interfaceName:k.target.split("-")[0],originType:Dt.$N.ButtonClick,originID:`${k.target.split("-")[0]}-button`})})),k.hideZoneOnLocked)K.active=!1;else if(St.m.useFilter(this.game))this.tintLockedZoneGameObject(K);else{const B=Q.findComponentInChildren(Tt.e),U=ne.BUTTONS_CONFIG.indexOf(k);B.Active=!0,B.initialize(`world-map-disable-tint-${U}`)}if(!B&&ne.isInDifficultyMode(null==k?void 0:k.difficultyMode)&&(U&&(null===($=null==k?void 0:k.showNotificationIcon)||void 0===$?void 0:$.call(k))?this.createNotificationIcon(k):U&&k.zone===st.A_.DRAGONISLE&&this.breadcrumbManager.isBreadcrumbComplete(it.B.FEATURE_ZONE_UNLOCKED_POPUP,it.B.BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE)&&(()=>(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F;const G=at.q.instance.prodigy.gameContainer.get("196-d3a5"),[j,$]=yield Promise.all([G.getActiveRiftsPortalIds(),G.fetchRiftsConfig()]),H=null==j?void 0:j.filter((k=>k!==et.ni.Portal1));if(!$||!j||!H||0===(null==H?void 0:H.length))return;const V=(null!==(B=(F=this.playerData.player.data).rifts)&&void 0!==B?B:F.rifts={}).dragonIsleNotificationLastSeenTimestampMs;if(V)for(const W of H){const B=null===(U=$[W])||void 0===U?void 0:U.dragonIsleNotificationCooldownMs;if(!B||Date.now()-V>B)return void this.createNotificationIcon(k)}else this.createNotificationIcon(k)})))().catch(j.RQr.createHandler("WorldMapMenu: Failed to set up notifications based on active rift portals")),G&&!1===(null===(H=null==k?void 0:k.isVisited)||void 0===H?void 0:H.call(k))&&this.createSparkles(k.tag,X),St.m.useFilter(this.game)?this.untintLockedZoneGameObject(K):Q.findComponentInChildren(Tt.e).Active=!1),!(B||k.zone!==st.A_.LAMPLIGHT||this._isZoneLockCutsceneActive||ft.J.shouldShowWorldMapHardModeFtue()||this._showZoneLockCutsceneLinearCampaignTransition))for(const F of this._prefabObj.findComponentsInChildren(qt.P))F._zoneId===st.A_.LAMPLIGHT&&this._isFestivalActive&&this._festivalTravelModalEnabled&&F.showGuideHand(!0);null===(V=k.onSetupLocation)||void 0===V||V.call(k)}setupFeaturedSpawnNotification(k,B=0){var U,F,G,j,$,H;const V=this._featuredSpawnService.getCachedData();if(this._featuredSpawnService.shouldShowMapPin(k.zone)&&V){const q=ot.E.getIconForType("pet",V.petId),K=null!==(F=null===(U=V.iconData)||void 0===U?void 0:U.offset)&&void 0!==F?F:J.DEFAULT_ICON_OFFET;this.createNotificationIcon(k,W._.Ui_featured_pet_json,J.ICON_BASE_FRAME,1,{x:B,y:0}),this.createNotificationIcon(k,q,void 0,null!==(j=null===(G=V.iconData)||void 0===G?void 0:G.scale)&&void 0!==j?j:J.DEFAULT_ICON_SCALE,{x:(null!==($=K.x)&&void 0!==$?$:0)+B,y:K.y}),this.createNotificationIcon(k,W._.Ui_featured_pet_json,J.SUB_ICON_FRAME,J.SUB_ICON_SCALE,{x:(null!==(H=J.SUB_ICON_OFFSET.x)&&void 0!==H?H:0)+B,y:J.SUB_ICON_OFFSET.y})}}getZonePinOffsets(k,B){const U=[],F=Ut.x.getFestivalMapButtonImage(k.zone),G=this._featuredSpawnService.getCachedData(),$=j.Aq$.isDefined(G),H=this._isFestivalActive&&k.zone===st.A_.LAMPLIGHT&&!ne.isZoneLocked(k.zone);H&&U.push("festival"),!B&&$&&this._featuredSpawnService.shouldShowMapPin(k.zone)&&U.push("featuredPet");const V=k=>{const B=U.indexOf(k);return-1===B?0:(B-(U.length-1)/2)*ne.NOTIFICATION_PIN_SPACING};return{pinOffsetValues:[V("featuredPet"),V("festival")],festivalButton:F,hasFeaturedPet:$,hasFestivalNotification:H}}applyCustomHighlight(k){var B,U;for(let F=0;F{k.visible=!1})),this._puppetMasterIndicator.visible=!0):this._indicatorContainer.visible=!1}clearCustomHighlight(){var k;for(let B=0;B{k.visible=!0}))}tintLockedZoneGameObject(k){const B=new G.N;B.tint(10388653,!0),k.legacyTransform.group.filters=[B],Lt.s.cacheAsBitmap(k.legacyTransform.group)}untintLockedZoneGameObject(k){k.legacyTransform.group.filters=[],k.legacyTransform.group.cacheAsBitmap=!1}sendInterfaceOpenEvent(k){this.fireInterfaceEvent({interfaceName:Ot.B.WorldMap,interfaceType:Dt.Wm.Screen,instanceType:It.N.Interface,originType:Dt.$N.ButtonClick,originID:Ct.k.Map},{item_list:null!=k?k:[]})}static sendButtonClickedEvent(k,B,U,F){at.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent(Object.assign({buttonName:k,destinationName:B,interfaceName:U,interfaceType:Dt.Wm.Menu,saveClickInfo:k},F))}sendZoneProgressInterfaceEvent(k,B){this._festivalTravelModalEnabled&&this._isFestivalActive&&k.zone===st.A_.LAMPLIGHT||this.fireInterfaceEvent({interfaceName:`zone_entry_popup_${k.zone}`,interfaceType:Dt.Wm.Modal,originType:Dt.$N.ButtonClick,originID:B?Ct.k.X:`${k.zone}-button`,closeMethod:B?Dt.Lv.ButtonClick:void 0})}setupDungeonIcons(){const k=ne.BUTTONS_CONFIG.length,B=at.q.instance.prodigy.gameContainer.get("80c-6fa4"),U=this.playerData.player;for(let F=0;FB.zone===k)),at.q.instance.prodigy.gameContainer.get("db5-fb6e"),at.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),!1,B)}static getZoneName(k){var B;const U=ne.BUTTONS_CONFIG.find((B=>B.zone===k));return null!==(B=null==U?void 0:U.getName())&&void 0!==B?B:""}static getZoneTagForZoneId(k){var B;const U=ne.BUTTONS_CONFIG.find((B=>B.zone===k));return null!==(B=null==U?void 0:U.tag)&&void 0!==B?B:""}static openLockMessageParams(k,B,U,F,G=null){var $,H,W;if(k.isForceLocked)at.q.instance.prodigy.open.message(U.getText("WORLD_MAP_ZONE_LOCKED"),G,k.icon,null!==($=k.getLockName())&&void 0!==$?$:k.getName(),null,{isModal:!1});else if(j.Aq$.isDefined(k.requirementsID)&&!B.meetsRequirementsDeprecated(k.requirementsID)&&26===k.requirementsID)at.q.instance.prodigy.open.message(U.getText("WORLD_MAP_ZONE_LOCKED"),G,k.icon,k.getName(),null,{isModal:!1});else if(this.checkFeatureRequirementsForLock(B,k)){let B;B=k.isCurrentSubjectDenied()?Wt.A.LOCKEDSUBJECT:k.isCurrentProgressDenied()||"arcadia"===k.zone?Wt.A.LOCKEDPREREQUISITE:Wt.A.LOCKEDLEVEL,at.q.instance.prodigy.open.prefabMenu(q.l.ZoneLockedPopup,G,void 0,!1,void 0,{ZONE_STATUS_MODAL_TYPE:B,ZONE_STATUS_POPUP_TARGET_ID:k.zone})}else ne.getZoneData(k.zone).isUnreleased&&this.getZoneTagForZoneId(k.zone)!==V.O.Shiverchill?at.q.instance.prodigy.open.prefabMenu(q.l.ZoneComingSoonPopup,G,void 0,!1,void 0,{ZONE_STATUS_MODAL_TYPE:Wt.A.COMINGSOON,ZONE_STATUS_POPUP_TARGET_ID:k.zone}):!F&&j.Aq$.isDefined(null==k?void 0:k.classCodeKey)&&at.q.instance.prodigy.classModeController.isClassMode()?at.q.instance.prodigy.open.classModeMessage(U.getText(k.classCodeKey),G,null,k.getName(),k.classModeFrame,{isModal:!0},k.nameKey):at.q.instance.prodigy.open.message(U.getText(null!==(H=k.lockKey)&&void 0!==H?H:"WORLD_MAP_ZONE_LOCKED"),G,k.icon,null!==(W=k.getLockName())&&void 0!==W?W:k.getName(),null,{isModal:!1})}openLocation(k,B){var U;if(at.q.instance.prodigy.audio.playSFX(18,"pop"),this.enableZoneGoals(!1),B)ne.openLockMessageParams(k,this.featureRequirements,this.localizer,this._disableClose,(()=>{this.enableZoneGoals(!0),ne.sendButtonClickedEvent(Ct.k.Okay,null,k.target.split("-")[0]),this.fireInterfaceEvent({interfaceName:k.target.split("-")[0],closeMethod:Dt.Lv.ButtonClick})}));else if(this._festivalTravelModalEnabled&&k.zone===st.A_.LAMPLIGHT&&this._isFestivalActive)Ut.x.openTravelModal(Dt.$N.ButtonClick,void 0,(()=>{this.close()}));else if(pt.R.isFeatureEnabled()&&ne.DIFFICULTY_MODE!==X.i.Regular&&k.difficultyMode===X.i.Regular){const B=()=>{j.Aq$.isDefined(k.onClickOverride)?k.onClickOverride(this):ne.goTo(k.target,null==k?void 0:k.clickEventName)};at.q.instance.prodigy.open.difficultyUnavailableConfirmationModal(k,B)}else if(k.onClickOverride)k.onClickOverride(this);else if(!j.Aq$.isDefined(k.tag)||k.tag&&!k.msgKeys){const B=[st.A_.BONFIRE,st.A_.FOREST,st.A_.SHIPWRECK,st.A_.SHIVERCHILL,st.A_.SKYWATCH],F=at.q.instance.prodigy.gameContainer.get("e20-0fb0"),G=at.q.instance.prodigy.world.zones[k.zone],j=(null==G?void 0:G.allQuestsAreComplete)||(null==G?void 0:G.isKeystonePlaced)||!B.includes(null==G?void 0:G.ID)?k.target:null!==(U=F.player.getLastVisitedMapForZone(k.zone))&&void 0!==U?U:k.target;at.q.instance.prodigy.open.messageBoxPrefab({text:"WORLD_MAP_CONFIRM_TRAVEL",textArgs:[k.getSummary()],buttonState:Kt.D.YesNoButtons,confirmCallback:()=>{ne.goTo(j,k.clickEventName,null,Ct.k.Yes),this.fireInterfaceEvent({interfaceName:k.target.split("-")[0],closeMethod:Dt.Lv.ButtonClick})},noCallback:()=>{this.enableZoneGoals(!0),ne.sendButtonClickedEvent(Ct.k.No,k.target,k.target.split("-")[0]),this.fireInterfaceEvent({interfaceName:k.target.split("-")[0],closeMethod:Dt.Lv.ButtonClick})},title:k.getName(),isModal:!1})}else{if((0,Pt.G)(tt.y).enabled&&!this.featureRequirements.meetsRequirementsDeprecated(8))return void ne.goTo(ne.getDefaultMapForZone(k),k.clickEventName,!0,Ct.k.Play,`zone_entry_popup_${k.zone}`);ne.openZoneProgressDialog(this._titanAsset,k,this.playerData.player,this._ultimateQuestTarget,!this.featureRequirements.meetsRequirementsDeprecated(43)||this._forceLock.includes("DISABLE_DUNGEON"),(()=>{this.enableZoneGoals(!0),this.sendZoneProgressInterfaceEvent(k,!0)}))}}static getDefaultMapForZone(k){var B;const U=at.q.instance.prodigy.gameContainer.get("e20-0fb0"),F=at.q.instance.prodigy.world.zones[k.zone];return(null==F?void 0:F.allQuestsAreComplete)||(null==F?void 0:F.isKeystonePlaced)?k.target:null!==(B=U.player.getLastVisitedMapForZone(k.zone))&&void 0!==B?B:k.target}static openZoneProgressDialog(k,B,U,F,G=!1,$){let H="";j.Aq$.isDefined(k)&&(H=`${k.zone}-Titan`);const V=ne.generateZoneData(B);let W=Vt.SB.WorldMap,K=!0,z=ne.getDefaultMapForZone(B);U.ultimateSessionStatus===lt.n.TrackingNPC&&(null==F?void 0:F.startsWith(B.zone))&&(W=Vt.SB.TrackingNPC,V.npcAtlasID=229,V.npcFrameName="icon-npc-loc-assembled",V.zoneActionText="UI_ZONE_TRADE",z=this.getQuestLocation(F),K=!1),U.ultimateSessionStatus===lt.n.TamingUltimate&&(null==F?void 0:F.startsWith(B.zone))&&(W=Vt.SB.TrackingMythic,V.npcAtlasID=229,V.npcFrameName="icon-epics-loc-assembled",V.zoneActionText="UI_ZONE_TAME",z=at.q.instance.prodigy.world.getZone(F.split("-")[0]).questHub,K=!1),G&&(V.dungeonAvailable=!1);const Y=at.q.instance.prodigy.gameContainer.get("fa6-b1fc"),Q=`zone_entry_popup_${B.zone}`,Z=ne.goTo.bind(this,z,B.clickEventName,K,Ct.k.Play,Q),J=this.isInDifficultyMode(X.i.Regular)?ne.goTo.bind(this,H,B.clickEventName,null,Ct.k.Titan,Q):()=>at.q.instance.prodigy.open.difficultySelectorConfirmationModal(X.i.Regular,ne.goTo.bind(this,H,B.clickEventName,null,Ct.k.Titan,Q)),tt=ne.enterDungeon.bind(this,B.dungeon,B.clickEventName,Q);Promise.all([Y.getPetsInZone(V.zone),Y.getMinMaxEnemyLevelsForZone(V.zone)]).then((([U,F])=>{at.q.instance.prodigy.open.prefabMenu(q.l.Pets_ZoneUI,(()=>null),void 0,void 0,void 0,{PET_ZONE_ID:B.prefabIndex,PET_ZONE_MENU_STATE:W,PET_ZONE_PLAY_BUTTON:Z,PET_ZONE_TITAN_BUTTON:k&&k.zone===B.zone.replace(/(_hard|_expert)/g,"")?J:null,PET_ZONE_DUNGEON_BUTTON:B.dungeon&&!G?tt:null,GRID_VIEW_DATA:U.map((k=>k.ID)),PET_ZONE_ENEMY_MIN_MAX_LEVEL:F}).onDestroy.add($)})).catch(j.RQr.createHandler("Could not fetch pets for current zone"))}static generateZoneData(k){const B=at.q.instance.prodigy.gameContainer.get("80c-6fa4");return{zone:k.zone,msgKeys:k.msgKeys,summary:k.getSummary(),tag:k.tag,dungeonAvailable:j.Aq$.isDefined(k.dungeon)&&B.getValue(k.dungeon.featureFlagName,!0)}}static getQuestLocation(k){const B=k.split("-")[0],U=k.split("-")[1],F=at.q.instance.prodigy.world.getZone(B).getMap(U);return nt.l.getRandomItem(F.locations)}openLocationDialogPrefab(k,B){if(at.q.instance.prodigy.audio.playSFX(18,"pop"),(0,Nt.v)(!!k.splashImage,`No splash image defined for ${k.getName()}`),this.enableZoneGoals(!1),ne.isZoneFeatureFlagLocked(k))at.q.instance.prodigy.open.messageBoxPrefab({title:"FEATURE_DISABLED",confirmCallback:()=>{this.enableZoneGoals(!0)}});else{const U=at.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromGUID(q.l.MapLocationDialog);this.dialogueContainer.addChild(U.legacyTransform.group);const F=U.findComponent($t.s);B?F.showOneButton(k.splashImage,k.getLockName(),k.getLockMessage(),this.localizer.getText("BUTTON_OKAY_CAPITAL"),B):F.showTwoButton(k.splashImage,k.getName(),k.getSummary(),this.localizer.getText("NOT_NOW"),k.getGoButtonText(),B);const G=U.findComponentsInChildren(rt.$);for(let B=0;B{this.fireInterfaceEvent({interfaceName:k.zone,closeMethod:Dt.Lv.ButtonClick}),U.destroy()}));F.onClose.addOnce((()=>{this.enableZoneGoals(!0)})),F.onConfirm.addOnce((()=>{ne.goTo(k.target,k.clickEventName)}))}}static enterDungeon(k,B,U){ne.goTo(k.dungeonHub,B,null,Ct.k.CrystalCaverns,null!=U?U:Ot.B.Shiverchill)}static goTo(k,B,U=!0,F,G){j.Aq$.isDefined(B)&&at.q.instance.game.broadcaster.broadcast(B,"UI"),ut.gz.initialized&&ut.gz.instance.completeFtue(!0);const $=at.q.instance.prodigy.gameContainer.get("e20-0fb0").player,H=k.split("-")[0];F&&ne.sendButtonClickedEvent(F,H,null!=G?G:H),at.q.instance.prodigy.open.menuCloseAll();const V=at.q.instance.prodigy.world.getCurrentZone(),W=at.q.instance.prodigy.world.getZone(V);U&&$.isTrackingQuestEnabled&&V!==H&&$.setUltimateSessionStatus(lt.n.None,"",0),j.Aq$.isDefined(W)?W.handleLeaving(Gt.j.mapTeleport,(()=>{ne.startZone(k)})):ne.startZone(k)}static startZone(k){at.q.instance.game.broadcaster.broadcast(_t.n8.WorldMapZoneSelected);const B=at.q.instance.prodigy.gameContainer.get("e20-0fb0").player;"Dorm"===k?(at.q.instance.game.state[k].player=B,at.q.instance.prodigy.start(k)):k.indexOf("-")>0?at.q.instance.prodigy.world.it(k):at.q.instance.prodigy.start(k)}setupNPCLocation(){this._ultimateQuestTarget=yt.m.getSeededLocation();const k=ne.getZoneData(this._ultimateQuestTarget.split("-")[0]);this.createUltimateQuestIndicator(k,at.q.instance.prodigy.create.npcIndicator.bind(this,k.ultimatesQuestIconOffset.x,k.ultimatesQuestIconOffset.y))}setupUltimateLocation(){const k=at.q.instance.prodigy.gameContainer.get("e20-0fb0").player;at.q.instance.prodigy.gameContainer.get("e50-b09b").getQuestMetaData(k.ultimateQuestId).then((k=>{const B=k.petID;this._ultimateQuestTarget=mt.v.getUltimatesPetLocation(B);const U=ne.getZoneData(this._ultimateQuestTarget.split("-")[0]);this.createUltimateQuestIndicator(U,at.q.instance.prodigy.create.ultimatesIndicator.bind(this,U.ultimatesQuestIconOffset.x,U.ultimatesQuestIconOffset.y))})).catch((k=>{j.VyI.log(`Error getting quest data ${k.message}`,j.$bb.Error)}))}createUltimateQuestIndicator(k,B){if(k){const U=B(k.ultimatesQuestIconOffset.x,k.ultimatesQuestIconOffset.y),F=this._prefabComponent.getIconContainer(k.prefabIndex).legacyTransform.group;U.anchor.set(.5,.5),this._indicatorContainer.addChild(U),U.position.x+=F.getGlobalPosition().x,U.position.y+=F.getGlobalPosition().y}else j.VyI.log("Unable to retrieve Zone Data from target string. Indicator creation aborted.",j.$bb.Error)}fetchTitanData(){this.game.broadcaster.addAppListener(_t.RZ.GotTitans,this.setupTitan.bind(this),this,"Titan"),at.q.instance.prodigy.titansNetworkHandler.getTitans().catch(j.RQr.createHandler("WorldMap: Could not get active Titan data"))}setupTitan(k){if(this.game.broadcaster.removeAppListener(_t.RZ.GotTitans,this,"Titan"),k&&j.Aq$.isDefined(k.assetID)&&at.q.instance.prodigy.titansNetworkHandler.isTitanAlive()){const B=ct.t.getItem("titan",k.assetID);if(j.Aq$.isDefined(B)){let k,U=!1;for(let G=0;G{var k;at.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(it.B.FEATURE_ENDGAME_QUEST,it.B.BREADCRUMB_ENDGAME_QUEST_SAW_WORLD_MAP_DIALOGUE),this._isZoneGoalsActive&&(null===(k=this._zoneGoalsController)||void 0===k||k.tryAutoTrigger())})).catch(j.RQr.createHandler("Error showing pippet dialogue")),!1}hardModeFtueStepEventHandler(k){var B;switch(k){case ut.cM.STEP_1_NOOT_DIALOGUE_INTRO:for(let U=0;U{ut.gz.instance.advanceFtueStep()})).catch(j.RQr.createHandler("Error showing Campaign Replay Intro dialogue"));break;case ut.cM.STEP_5A_CLOSE_DIFFICULTY_SELECTOR:this.setupCloseButton(),this._prefabComponent.closeButton.GameObject.active=!0;break;case ut.cM.STEP_6A_RESUME_WORLD_MAP_NORMAL:ut.gz.initialized&&ut.gz.instance.completeFtue(!1);break;case ut.cM.STEP_7B_NOOT_HARD_MODE_INTRO:const k=ne.BUTTONS_CONFIG.find((k=>k.zone===st.A_.FORESTHARD));if(!k){j.VyI.log("Error finding forest hard mode zone info during Hard Mode FTUE",j.$bb.Error);break}this._prefabComponent.GameObject.findComponentsInChildren(rt.$).forEach((k=>{k.inputEnabled=!1})),this._prefabComponent.getMapLocation(k.prefabIndex).findComponentsInChildren(rt.$).forEach((k=>k.inputEnabled=!0)),this._indicatorContainer.removeChildren(),Mt.v$([1687,1688]).then((()=>{ut.gz.instance.advanceFtueStep()})).catch(j.RQr.createHandler("Error showing Campaign Replay Intro dialogue"))}}startTitanUnlockedDialogue(){this.enableZoneGoals(!1);const k=new At.rD(this.game);k.addEvents([{dialogueData:k.dataProvider.get(862),blockInput:!0},{dialogueData:k.dataProvider.get(863),blockInput:!0},{dialogueData:k.dataProvider.get(864),blockInput:!0},{dialogueData:k.dataProvider.get(865),blockInput:!0},{callback:()=>{this.breadcrumbManager.completeBreadcrumb(it.B.FEATURE_TITAN_UNLOCKED,it.B.BREADCRUMB_TITAN_UNLOCKED_DIALOGUE),this.enableZoneGoals(!0)}}]),k.start()}enableZoneGoals(k){this._isZoneGoalsActive=k,this._zoneGoalsObject&&(this._zoneGoalsObject.active=k,j.wa5.getActiveScene().getLayer(ne.ZONE_GOALS_LAYER_NAME).visible=k)}activateZoneLockCutscene(){this._isZoneLockCutsceneActive=!0}static get highestZoneLevelRequirement(){return ne.BUTTONS_CONFIG.map((k=>xt.X.getLevelRequirement(k.requirementsID))).reduce(((k,B)=>k>B?k:B))}destroy(){var k,B,U;if(this._titanAsset=null,at.q.instance.game.broadcaster.removeAppListener(_t.n8.WorldMapDifficultyModeChanged,this),at.q.instance.game.broadcaster.removeAppListener(_t.sn.HardModeFtueStepAdvanced,this),this._indicatorTween&&at.q.instance.game.tweens.remove(this._indicatorTween),this._indicatorTween=null,this._strokeObjects&&this._strokeObjects.length>0)for(let F=0;Fk.cancel())),this._zoneGoalsObject&&(j.wa5.getActiveScene().removeGameObject(this._zoneGoalsObject),this._destroyZoneGoalsLayerOnClose&&j.wa5.getActiveScene().destroyLayer(ne.ZONE_GOALS_LAYER_NAME),this._zoneGoalsObject.destroy(),this._zoneGoalsObject=null),this._prefabObj&&this._prefabObj.destroy(),this._prefabObj=null,this._prefabComponent=null,this._difficultyModeComponent=null,this.fireInterfaceEvent({interfaceName:Ot.B.WorldMap,interfaceType:Dt.Wm.Screen,instanceType:It.N.Interface,closeMethod:Dt.Lv.CloseButton}),ut.gz.initialized&&ut.gz.instance.cancelSession(),this.completeZoneLockExperienceSeenBreadcrumb(),this.onWorldMapInitialized.dispose(),super.destroy()}static getTeleportMapTag(k){return k===st.A_.CRYSTALCAVERNS?at.q.instance.prodigy.world.getZone(k).questHub:at.q.instance.prodigy.world.getZone(k).defaultOnFaint}static getZoneData(k){return ne.BUTTONS_CONFIG.find((B=>B.zone===k))}static getHighestAvailableZoneData(k){var B,U;const F=at.q.instance.prodigy.gameContainer.get("306-5359").highestDifficultyUnlocked,G=Bt.N.getCoreZonesInOrder(null!==(B=null!=k?k:F)&&void 0!==B?B:this.DIFFICULTY_MODE),j=H().findLast(G,(k=>k.meetsRequirements()));if(!j||j.zone===st.A_.SHIVERCHILLEXPERT)return G[0];if(j.tag===V.O.Shiverchill){const k=at.q.instance.prodigy.world.getZone(G[0].zone);return(null===(U=k.getQuestState())||void 0===U?void 0:U.ID)>k.finalQuestId?j:G[0]}return j}static getZoneDataFromDungeon(k){return ne.BUTTONS_CONFIG.find((B=>{var U;return(null===(U=B.dungeon)||void 0===U?void 0:U.zone)===k}))}static isZoneLocked(k){const B=ne.BUTTONS_CONFIG.find((B=>{var U;return B.zone===k||(null===(U=B.dungeon)||void 0===U?void 0:U.zone)===k}));let U=!1;return U=B?at.q.instance.prodigy.classModeController.isLockedZone(k)||this.isZoneLockedParams(B,at.q.instance.prodigy.gameContainer.get("db5-fb6e")):!Ft.N.getAllTowerData().find((B=>B.towerID===k)),U}static isZoneLockedParams(k,B,U,F){var G,$;const H=null!==(G=null==F?void 0:F.includes(k.nameKey))&&void 0!==G&&G,V=null!==($=null==U?void 0:U.includes(k.nameKey))&&void 0!==$&&$,W=j.Aq$.isDefined(k.isLocked)&&k.isLocked(),q=ne.isZoneFeatureFlagLocked(k),K=!!k.isUnreleased,z=ne.DIFFICULTY_MODE!==k.difficultyMode&&W,Y=V||W||K||z||this.checkFeatureRequirementsForLock(B,k)||q;return k.isForceLocked=V,!H&&Y}static checkFeatureRequirementsForLock(k,B){return j.Aq$.isDefined(B.requirementsID)&&!k.meetsRequirementsDeprecated(B.requirementsID)}static isZoneFeatureFlagLocked(k){return j.Aq$.isDefined(k.featureFlagLock)&&!at.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue(k.featureFlagLock,!0)}static applyZoneLocking(k,B,U,F){let G=this.getZoneData(k);if(j.Aq$.isDefined(G)||(G=this.getZoneDataFromDungeon(k)),j.Aq$.isDefined(G)){if(ne.isZoneLockedParams(G,U)){const k=G.getLockMessage(),U=F.getText(G.nameKey);B.action=()=>at.q.instance.prodigy.open.message(k,null,G.icon,U,null,{isModal:!1}),B.configModifiers={modifyProperty:[{element:"actionButton",property:"toggle",value:!1}]}}}else j.VyI.log(`Error getting zone map config for zone ${k}. Zone locking check not applied.`,j.$bb.Warning)}createNotificationIcon(k,B=W._.General_icons_json,U="exclamation",F=1,G){var j,$;if(this._notificationBlockedZones.includes(k.zone))return;const H=k.iconOffset?k.iconOffset:{x:0,y:10},V=this._indicatorContainer.addChild(at.q.instance.prodigy.create.sprite(H.x,H.y,B,U));V.anchor.set(.5,.5);const q=this._prefabComponent.getIconContainer(k.prefabIndex).legacyTransform.group;V.position.x=V.position.x+q.getGlobalPosition().x+(null!==(j=null==G?void 0:G.x)&&void 0!==j?j:0),V.position.y=V.position.y+q.getGlobalPosition().y+(null!==($=null==G?void 0:G.y)&&void 0!==$?$:0),V.scale.x=F,V.scale.y=F}createSparkles(k,B){const U=B.legacyTransform.group,F=this.game.add.spine(U.getGlobalPosition().x,U.getGlobalPosition().y,Y.Q.Spine_sparkle_worldmap_json);F.setAnimationByName(0,k,!0),this.dialogueContainer.addChild(F)}getZoneUnlockAnimationBreadcrumb(k){var B;return[it.B.FEATURE_ZONE_UNLOCKED_POPUP,`BREADCRUMB_ZONE_UNLOCKED_ANIM_${(null!==(B=k.tag)&&void 0!==B?B:k.zone).toUpperCase()}`]}static setDifficultyMode(k){ne.DIFFICULTY_MODE!==k&&(ne.DIFFICULTY_MODE=k,at.q.instance.game.broadcaster.broadcast(_t.n8.WorldMapDifficultyModeChanged))}static getDifficultyMode(){return ne.DIFFICULTY_MODE}static isInDifficultyMode(k){return j.Aq$.isDefined(k)&&k===ne.getDifficultyMode()}setDifficultyButtonText(){const k=ne.DIFFICULTY_MODE===X.i.Expert?Q.K_.Expert:ne.DIFFICULTY_MODE===X.i.Hard?Q.K_.Hard:Q.K_.Regular;this._prefabComponent.difficultySelectorButtonText.text=this.localizer.getText(k)}buttonConfigByQuestIndexAndDifficulty(k,B){switch(B){case X.i.Expert:return ne.BUTTONS_CONFIG_BY_QUEST_INDEX_EXPERT_MODE[k];case X.i.Hard:return ne.BUTTONS_CONFIG_BY_QUEST_INDEX_HARD_MODE[k];case X.i.Regular:return ne.BUTTONS_CONFIG_BY_QUEST_INDEX[k];default:j.RQr.logError(null,`Invalid difficulty mode: ${B}`)}}}ne.BASE_ASSETS=[Y.Q.Spine_sparkle_worldmap_json,W._.General_icons_json,W._.General_map_json,W._.Ui_buttons_json,W._.Ui_cc_adventure_map_json,W._.Ui_icons_json,W._.Ui_store_json,W._.Ui_titan_json,W._.Ui_shipwreck_progress_json,W._.Ui_shiverchill_progress_json,W._.Ui_dialogues_json,W._.Ui_raster_epicsv2_json,W._.Ui_library_json,W._.Ui_guide_hands_json,K.c.Sfx_store_equip,K.c.Sfx_store_purchase,z.q.Lock_glow_purple,z.q.Lock_glow_blue,z.q.Lock_glow_magenta,Y.Q.Spine_duels_matchmaking_unlock_json,Y.Q.Spine_dragon_isle_unlock_json,Y.Q.Spine_dragon_isle_whirlpool_json,z.q.Vignette_general_map_hard,z.q.Vignette_general_map_expert,W._.Ui_replay_campaign_json,Y.Q.Spine_game_island_json],ne.ZONE_GOALS_LAYER_NAME="zonegoals",ne.ZONE_GOALS_LAYER_DEPTH=110,ne.ZONE_GOALS_STROKE_OBJECT_MAPPING=[Et.P.Dyno,Et.P.DragonIsle,Et.P.Firefly,Et.P.Shiverchill,Et.P.Skywatch,Et.P.Bonfire,Et.P.Shipwreck,Et.P.Academy,Et.P.Firefly,Et.P.Shiverchill,Et.P.Skywatch,Et.P.Bonfire,Et.P.Shipwreck,Et.P.Academy,Et.P.House,Et.P.Lamplight,Et.P.Darktower,Et.P.TowerTown],ne.BRIGHTNESS_VALUE_LOCATION=.2,ne.BRIGHTNESS_VALUE_BACKGROUND=.5,ne.NOTIFICATION_PIN_SPACING=75,ne.DIFFICULTY_MODE=X.i.Regular,ne._nextVisitOverrides={},ne.BUTTONS_CONFIG=[new se(te.Ne),new se(te.kO),new se(te.Hg),new se(te.di),new se(te.Rk),new se(te.II),new se(te.y6),new se(te.fO),new se(te.F9),new se(te.DD),new se(te.Ih),new se(te.ZS),new se(te.bk),new se(te.uO),new se(te.bI),new se(te.Sl),new se(te.OE),new se(te.BT),new se(te.IM),new se(te.kw)],ne.BUTTONS_CONFIG_BY_QUEST_INDEX=[ne.BUTTONS_CONFIG[0],ne.BUTTONS_CONFIG[1],ne.BUTTONS_CONFIG[2],ne.BUTTONS_CONFIG[4],ne.BUTTONS_CONFIG[5]],ne.BUTTONS_CONFIG_BY_QUEST_INDEX_HARD_MODE=[ne.BUTTONS_CONFIG[13],ne.BUTTONS_CONFIG[14],ne.BUTTONS_CONFIG[15],ne.BUTTONS_CONFIG[16],ne.BUTTONS_CONFIG[17]],ne.BUTTONS_CONFIG_BY_QUEST_INDEX_EXPERT_MODE=[],(0,F.Cg)([(0,j.fFd)("db5-fb6e"),(0,F.Sn)("design:type",Object)],ne.prototype,"featureRequirements",void 0),(0,F.Cg)([(0,j.fFd)("12f-4e29"),(0,F.Sn)("design:type",Rt.F)],ne.prototype,"breadcrumbManager",void 0),(0,F.Cg)([(0,j.fFd)(j.$Bt.LocalizationService),(0,F.Sn)("design:type",j.dTp)],ne.prototype,"localizer",void 0),(0,F.Cg)([(0,j.fFd)("e20-0fb0"),(0,F.Sn)("design:type",Object)],ne.prototype,"playerData",void 0),(0,F.Cg)([(0,j.fFd)("a2e-a635"),(0,F.Sn)("design:type",vt.J)],ne.prototype,"_featuredSpawnService",void 0)},74208:(k,B,U)=>{"use strict";U.d(B,{k:()=>Y});var F=U(8674),G=U(62459),j=U(97495),$=U(35120),H=U(73797),V=U(28152),W=U(96494),q=U(90633),K=U(40392),z=U(13751);let Y=class extends G.uAl{constructor(){super(...arguments),this._onRegularMode=new G.HN0,this._onHardMode=new G.HN0,this._onExpertMode=new G.HN0}create(){super.create(),$.q.instance.game.broadcaster.addAppListener(H.n8.WorldMapDifficultyModeChanged,this.onWorldMapDifficultyModeChanged,this)}destroy(){this._onHardMode.dispose(),this._onExpertMode.dispose(),this._onRegularMode.dispose(),$.q.instance.game.broadcaster.removeAppListener(H.n8.WorldMapDifficultyModeChanged,this),super.destroy()}onWorldMapDifficultyModeChanged(){this.setDifficultyMode(K.i.getDifficultyMode())}setDifficultyMode(k){switch(k){case j.i.Expert:this._breadcrumbManager.isBreadcrumbComplete(q.B.FEATURE_CAMPAIGN_REPLAY,q.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_EXPERT_MODE)||this._breadcrumbManager.completeBreadcrumb(q.B.FEATURE_CAMPAIGN_REPLAY,q.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_EXPERT_MODE),this._onExpertMode.dispatch();break;case j.i.Hard:this._breadcrumbManager.isBreadcrumbComplete(q.B.FEATURE_CAMPAIGN_REPLAY,q.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_HARD_MODE)||this._breadcrumbManager.completeBreadcrumb(q.B.FEATURE_CAMPAIGN_REPLAY,q.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_HARD_MODE),this._onHardMode.dispatch();break;default:case j.i.Regular:this._onRegularMode.dispatch()}}};(0,F.Cg)([(0,G.Pqz)(z.n),(0,F.Sn)("design:type",z.n)],Y.prototype,"_worldMapComponent",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"_onRegularMode",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"_onHardMode",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"_onExpertMode",void 0),(0,F.Cg)([(0,G.Cdj)("12f-4e29"),(0,F.Sn)("design:type",W.F)],Y.prototype,"_breadcrumbManager",void 0),Y=(0,F.Cg)([(0,G.EVk)("WorldMapDifficultyMode",V.Y.ui)],Y)},32456:(k,B,U)=>{"use strict";U.d(B,{u:()=>Z});var F,G=U(8674),j=U(87490),$=U(62459),H=U(56942),V=U(90633),W=U(35120),q=U(28152),K=U(29834),z=U(30226),Y=U(40392),Q=U(3785),X=U(15989);let Z=F=class extends $.uAl{constructor(){super(...arguments),this.onPrepReveal=new $.HN0,this.onStartReveal=new $.HN0,this._hasBattledInDuelsStadium=null,this._blockReveal=!1}set blockReveal(k){this._blockReveal=k}create(){super.create(),W.q.instance.prodigy.gameContainer.get("0f1-c356").getBattleStats().then((k=>{this._hasBattledInDuelsStadium=(null==k?void 0:k.duelMatchmakingStats)&&(k.duelMatchmakingStats.losses>0||k.duelMatchmakingStats.wins>0),this.attemptReveal()})).catch((()=>{this._hasBattledInDuelsStadium=!1})),this.applyElementalBoostSpine()}attemptReveal(){var k;if(null===(k=this._worldMapMenuInstanceLockedZoneKeys)||void 0===k?void 0:k.includes(X.ZS.nameKey))return;if(!Y.i.getZoneData("duels_stadium").meetsRequirements()||Y.i.isZoneLocked("duels_stadium")||this._blockReveal)return;if(null===this._hasBattledInDuelsStadium)return;const B=W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_ZONE_UNLOCKED_POPUP,V.B.BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM),U=W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_ZONE_UNLOCKED_POPUP,V.B.BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER);B||!this._hasBattledInDuelsStadium?(B||this.onPrepReveal.dispatch(),!B&&U&&(this._timeoutId=window.setTimeout((()=>{this.onStartReveal.dispatch()}),500))):this.markRevealComplete()}markRevealComplete(){W.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(V.B.FEATURE_ZONE_UNLOCKED_POPUP,V.B.BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM)}applyElementalBoostSpine(){const k=W.q.instance.prodigy.gameContainer.get("ce9-b630"),B=k.elementalBoost;k.cacheElementalBoost().then((k=>{k!==B&&this.applyElementalBoostSpine()})).catch($.RQr.createHandler("Error caching elemental boost"));const U=this._spineGameObject.findComponent($.v2j),G=this._spineGameObject.findComponent(K.j);U&&G&&(U.setAsset(F.getDailyElementalBoostSpineGUID()),G.playAnimation("idle",!0))}static getDailyElementalBoostSpineGUID(){const k=W.q.instance.prodigy.gameContainer.get("ce9-b630").elementalBoost;return F.ELEMENTAL_BOOST_WORLD_MAP_SPINE_GUIDS[null!=k?k:j.EElementType.Fire]}destroy(){this.onPrepReveal.dispose(),this.onStartReveal.dispose(),z.J.isDefined(this._timeoutId)&&window.clearTimeout(this._timeoutId),super.destroy()}};Z.ELEMENTAL_BOOST_WORLD_MAP_SPINE_GUIDS={[j.EElementType.Plant]:H.Q.Spine_duels_matchmaking_plant_boost_json,[j.EElementType.Fire]:H.Q.Spine_duels_matchmaking_fire_boost_json,[j.EElementType.Water]:H.Q.Spine_duels_matchmaking_water_boost_json,[j.EElementType.Storm]:H.Q.Spine_duels_matchmaking_storm_boost_json,[j.EElementType.Ice]:H.Q.Spine_duels_matchmaking_ice_boost_json,[j.EElementType.Physical]:H.Q.Spine_duels_matchmaking_physical_boost_json},(0,G.Cg)([(0,$.bbQ)(),(0,G.Sn)("design:type",$.HN0)],Z.prototype,"onPrepReveal",void 0),(0,G.Cg)([(0,$.bbQ)(),(0,G.Sn)("design:type",$.HN0)],Z.prototype,"onStartReveal",void 0),(0,G.Cg)([(0,$.ERr)(),(0,G.Sn)("design:type",$._mx)],Z.prototype,"_spineGameObject",void 0),(0,G.Cg)([(0,$.Cdj)(Q.z.WorldMapMenuInstanceLockedZones),(0,G.Sn)("design:type",Array)],Z.prototype,"_worldMapMenuInstanceLockedZoneKeys",void 0),Z=F=(0,G.Cg)([(0,$.EVk)("WorldMapDuelsStadium",q.Y.worldMapDuelsStadium)],Z)},13751:(k,B,U)=>{"use strict";U.d(B,{n:()=>$});var F=U(8674),G=U(62459),j=U(49237);let $=class extends G.uAl{constructor(){super(...arguments),this._menuContainer=null,this._backgroundContainer=null,this._menuTitle=null,this._closeButton=null,this._mapLocations=[],this._disabledLocations=[],this._lockObjects=[],this._lockTransition=[],this._iconContainer=[],this.onEnableZoneGoals=new G.HN0}get menuContainer(){return this._menuContainer}get backgroundContainer(){return this._backgroundContainer}get menuTitle(){return this._menuTitle}get closeButton(){return this._closeButton}get difficultySelectorButtonText(){return this._difficultySelectorButtonText}get difficultySelectorButtonNotificationBadge(){return this._difficultySelectorButtonNotificationBadge}getMapLocation(k){return this._mapLocations[k]}getDisabledLocation(k){return this._disabledLocations[k]}getLockObject(k){return this._lockObjects[k]}getLockTransition(k){return this._lockTransition[k]}getIconContainer(k){return this._iconContainer[k]}enableZoneGoals(k){this.onEnableZoneGoals.dispatch(k)}destroy(){this.onEnableZoneGoals.dispose(),super.destroy()}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],$.prototype,"_menuContainer",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],$.prototype,"_backgroundContainer",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],$.prototype,"_menuTitle",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],$.prototype,"_closeButton",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],$.prototype,"difficultySelectorButton",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],$.prototype,"_difficultySelectorButtonText",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],$.prototype,"_difficultySelectorButtonNotificationBadge",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],$.prototype,"_mapLocations",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],$.prototype,"_disabledLocations",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],$.prototype,"_lockObjects",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],$.prototype,"_lockTransition",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],$.prototype,"_iconContainer",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onEnableZoneGoals",void 0),$=(0,F.Cg)([(0,G.EVk)("WorldMapPrefab")],$)},3785:(k,B,U)=>{"use strict";var F;U.d(B,{z:()=>F}),function(k){k.WorldMapMenuInstanceLockedZones="WorldMapMenuInstanceLockedZones"}(F||(F={}))},15989:(k,B,U)=>{"use strict";U.d(B,{F9:()=>Mt,IM:()=>Nt,kw:()=>jt,Rk:()=>It,OE:()=>Dt,y6:()=>Lt,bk:()=>Gt,ZS:()=>Ft,di:()=>xt,Ne:()=>wt,uO:()=>Tt,DD:()=>Bt,fO:()=>kt,II:()=>Rt,BT:()=>Pt,kO:()=>St,bI:()=>At,Hg:()=>Ct,Sl:()=>Ot,Ih:()=>Ut,NJ:()=>yt});var F=U(87490),G=U(62459),j=U(113),$=U(44751),H=U(97495),V=U(2090),W=U(40295),q=U(90633),K=U(73678),z=U(35120),Y=U(29738),Q=U(93867),X=U(75408),Z=U(73797),J=U(11624),tt=U(24047),et=U(46784),it=U(13093),st=U(76277),nt=U(31478),at=U(40392),rt=U(8674),ot=U(95891),ht=U.n(ot),ct=U(99625),dt=U(4903),lt=U(3374),ut=U(41674),ft=U(84415),bt=U(73722),pt=U(37251),vt=U(98252),gt=U(10312);class mt{static launch(){return(0,rt.sH)(this,void 0,void 0,(function*(){const k=yield mt.executeHandoff();return z.q.instance.prodigy.game.broadcaster.broadcast(k?Z.lT.ArcadiaHandoffSuccess:Z.lT.ArcadiaHandoffFailure),k}))}static executeHandoff(){return(0,rt.sH)(this,void 0,void 0,(function*(){var k;const B=z.q.instance.prodigy.gameContainer,U=B.get("c97-bd0d"),F=B.get("f7c-2e57"),j=B.get("be9-3278"),$=B.get("00d-b27e"),H=B.get("30b-3020"),V=F.getSessionToken();if(!G.Aq$.isDefined(V)||0===V.length)return this.onHandoffResult.dispatch(!1,""),!1;let W;try{W=yield H.sendRequest((new G.u1k).setBaseURI(j.getCortexRootURL()).setRequestURI("game-cortex-server/v1/coreGame.setSession").setMethod(G.iXQ.Post).setBody(new G._A9({clientId:pt.X.CLIENT_ID,identityUri:j.getIdentityUrl(),identity_token:null===(k=$.authHandler)||void 0===k?void 0:k.getIdentityToken(),refresh_token:U.api.getRefreshToken(),profile:{premises:bt.V.instance.selectedLocation}})).addResponseInterceptor(G.XKG.convertToJson))}catch(Q){return this.onHandoffResult.dispatch(!1,""),!1}if(!W.wasSuccessful())return this.onHandoffResult.dispatch(!1,""),!1;const q=W.getData();if(!(null==q?void 0:q.code))return this.onHandoffResult.dispatch(!1,""),!1;yield new Promise((k=>{z.q.instance.prodigy.gameContainer.get("306-5359").forceSaveCharacter(k)}));const K=`${j.getArcadiaLauncherUrl()}/?launcher=true&code=${q.code}`;this.onHandoffResult.dispatch(!0,K);const Y=vt.pF.isNativeApp();return gt.I.openWebsite(K,Y,!1),!0}))}}mt.onHandoffResult=new G.HN0;var yt,_t=U(53661);function Et(){return(0,rt.sH)(this,void 0,void 0,(function*(){var k,B,U,F;const G=z.q.instance.prodigy.gameContainer.get("306-5359"),j=z.q.instance.prodigy.gameContainer.get("c47-20b6"),$=lt.C.getVideosDataProvider(),H=yield $.getVideosDataByType(dt.s.ArcadiaLink),V=ht().sample(Object.keys(null!==(B=null===(k=null==H?void 0:H.data)||void 0===k?void 0:k.videos)&&void 0!==B?B:{})),W=null===(U=null==H?void 0:H.data)||void 0===U?void 0:U.videos[null!=V?V:""],q=!ft.a.doesFeatureTimestampExist(G,dt.s.ArcadiaLink)&&void 0!==V;z.q.instance.prodigy.open.prefabMenu({prefabID:ct.l.GoingToArcadiaModal,isModal:!1,injectablePropertiesDictionary:{GO_TO_ARCADIA_MODAL_CALLBACK:()=>(0,rt.sH)(this,void 0,void 0,(function*(){return function(k){return(0,rt.sH)(this,void 0,void 0,(function*(){mt.onHandoffResult.addOnce(((B,U)=>{B&&(k.funnel.sendStep(tt.F.ArcadiaLink,"feature",it.l.FirstExit,it.T.FirstExit),k.featureCommon.sendCrossPlatformEvent({source_product:"math_game",destination_product:"arcadia",navigation_type:"modal_confirm",entry_surface:"world_map_arcadia_icon",interaction_id:k.featureCommon.getCurrentButtonID("arcadia-zone-button"),instance_type:"navigation",target_url:U,instance_id:k.featureCommon.getCurrentInterfaceID("arcadia_confirmation_modal")}))})),yield mt.launch()}))}(j)})),PLAY_ARCADIA_FEATURE_VIDEO:q,[_t.Ut.VideoId]:V,[_t.Ut.SupportedResolutionIds]:null==W?void 0:W.supportedResolutionIds,[_t.Ut.SizeRatio]:null===(F=null==H?void 0:H.metadata)||void 0===F?void 0:F.sizeRatio},sendEvents:!0,interfaceEventProps:{interfaceName:et.B.ArcadiaConfirmationModal,interfaceType:ut.Wm.Modal,originType:ut.$N.ButtonClick,originID:j.featureCommon.getCurrentButtonID("arcadia-zone-button")}}),q&&ft.a.saveTimestampData(dt.s.ArcadiaLink)}))}!function(k){k.FireflyForest="WORLD_FIREFLY_FOREST",k.ShiverchillMountains="WORLD_SHIVERCHILL_MOUNTAINS",k.Skywatch="WORLD_SKYWATCH",k.BonfireSpire="WORLD_BONFIRE_SPIRE",k.ShipwreckShore="WORLD_SHIPWRECK_SHORE",k.TheAcademy="WORLD_THE_ACADEMY",k.DynoDigOasis="WORLD_DYNO_DIG_OASIS",k.DarkTower="WORLD_DARK_TOWER",k.LamplightTown="WORLD_LAMPLIGHT_TOWN",k.YourHouse="WORLD_YOUR_HOUSE",k.TowerTown="TOWER_TOWN_MAP",k.DuelsStadium="DUELS_MATCHMAKING_MAP",k.DragonIsle="DRAGON_ISLE_MAP",k.Arcadia="ARCADIA_MAP"}(yt||(yt={}));const wt={prefabIndex:J.P.Firefly,nameKey:yt.FireflyForest,zone:K.A_.FOREST,tag:j.O.Firefly,target:"forest-C8",summaryKey:"WORLD_FIREFLY_FOREST_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:32,titanIconOffset:{x:-70,y:10},ultimatesQuestIconOffset:{x:0,y:10},msgKeys:{1:"WORLD_MAP_FOREST_QUEST_0",2:"WORLD_MAP_FOREST_QUEST_1",3:"WORLD_MAP_FOREST_QUEST_2",4:"WORLD_MAP_FOREST_QUEST_3",5:"WORLD_MAP_FOREST_QUEST_4",6:"WORLD_MAP_FOREST_QUEST_5",7:"WORLD_MAP_FOREST_QUEST_6",8:"WORLD_MAP_FOREST_QUEST_7",9:"WORLD_MAP_FOREST_QUEST_8",10:"WORLD_MAP_FOREST_QUEST_9",11:"WORLD_MAP_FOREST_QUEST_10",12:"WORLD_MAP_FOREST_QUEST_11"},shouldTrackVisits:!0},Tt=Object.assign(Object.assign({},wt),{prefabIndex:J.P.FireflyHard,zone:K.A_.FORESTHARD,target:"forest_hard-C8",difficultyMode:H.i.Hard,requirementsID:32}),St={prefabIndex:J.P.Shiverchill,nameKey:yt.ShiverchillMountains,zone:K.A_.SHIVERCHILL,tag:j.O.Shiverchill,target:"shiverchill-A10",summaryKey:"WORLD_SHIVERCHILL_MOUNTAINS_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:33,titanIconOffset:{x:-60,y:-20},ultimatesQuestIconOffset:{x:-70,y:10},msgKeys:{1:"WORLD_MAP_SHIVERCHILL_QUEST_0",2:"WORLD_MAP_SHIVERCHILL_QUEST_1",3:"WORLD_MAP_SHIVERCHILL_QUEST_2",4:"WORLD_MAP_SHIVERCHILL_QUEST_3",5:"WORLD_MAP_SHIVERCHILL_QUEST_4",6:"WORLD_MAP_SHIVERCHILL_QUEST_5",7:"WORLD_MAP_SHIVERCHILL_QUEST_6",8:"WORLD_MAP_SHIVERCHILL_QUEST_7",9:"WORLD_MAP_SHIVERCHILL_QUEST_8",10:"WORLD_MAP_SHIVERCHILL_QUEST_9",11:"WORLD_MAP_SHIVERCHILL_QUEST_10",12:"WORLD_MAP_SHIVERCHILL_QUEST_11",13:"WORLD_MAP_SHIVERCHILL_QUEST_12",14:"WORLD_MAP_SHIVERCHILL_QUEST_13",15:"WORLD_MAP_SHIVERCHILL_QUEST_14"},shouldTrackVisits:!0},At=Object.assign(Object.assign({},St),{isUnreleased:!1,prefabIndex:J.P.ShiverchillHard,zone:K.A_.SHIVERCHILLHARD,target:"shiverchill_hard-A10",difficultyMode:H.i.Hard,dungeon:void 0,requirementsID:61}),Ct={prefabIndex:J.P.Skywatch,nameKey:yt.Skywatch,zone:K.A_.SKYWATCH,tag:j.O.Skywatch,target:"skywatch-A1",summaryKey:"WORLD_SKYWATCH_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:34,titanIconOffset:{x:0,y:-65},ultimatesQuestIconOffset:{x:-20,y:20},msgKeys:{1:"WORLD_MAP_SKYWATCH_QUEST_0",2:"WORLD_MAP_SKYWATCH_QUEST_1",3:"WORLD_MAP_SKYWATCH_QUEST_2",4:"WORLD_MAP_SKYWATCH_QUEST_3",5:"WORLD_MAP_SKYWATCH_QUEST_4",6:"WORLD_MAP_SKYWATCH_QUEST_5",7:"WORLD_MAP_SKYWATCH_QUEST_6",8:"WORLD_MAP_SKYWATCH_QUEST_7",9:"WORLD_MAP_SKYWATCH_QUEST_8",10:"WORLD_MAP_SKYWATCH_QUEST_9",11:"WORLD_MAP_SKYWATCH_QUEST_10",12:"WORLD_MAP_SKYWATCH_QUEST_11",13:"WORLD_MAP_SKYWATCH_QUEST_12"},shouldTrackVisits:!0},Ot=Object.assign(Object.assign({},Ct),{isUnreleased:!1,prefabIndex:J.P.SkywatchHard,zone:K.A_.SKYWATCHHARD,target:"skywatch_hard-A1",difficultyMode:H.i.Hard,requirementsID:62}),It={prefabIndex:J.P.Bonfire,nameKey:yt.BonfireSpire,zone:K.A_.BONFIRE,tag:j.O.Bonfire,target:"bonfire_spire-B1",summaryKey:"WORLD_BONFIRE_SPIRE_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:35,titanIconOffset:{x:-45,y:-20},ultimatesQuestIconOffset:{x:25,y:-20},msgKeys:{1:"WORLD_MAP_BONFIRE_QUEST_0",2:"WORLD_MAP_BONFIRE_QUEST_1",3:"WORLD_MAP_BONFIRE_QUEST_2",4:"WORLD_MAP_BONFIRE_QUEST_3",5:"WORLD_MAP_BONFIRE_QUEST_4",6:"WORLD_MAP_BONFIRE_QUEST_5",7:"WORLD_MAP_BONFIRE_QUEST_6",8:"WORLD_MAP_BONFIRE_QUEST_7",9:"WORLD_MAP_BONFIRE_QUEST_8",10:"WORLD_MAP_BONFIRE_QUEST_9",11:"WORLD_MAP_BONFIRE_QUEST_10",12:"WORLD_MAP_BONFIRE_QUEST_11",13:"WORLD_MAP_BONFIRE_QUEST_12",14:"WORLD_MAP_BONFIRE_QUEST_13"},shouldTrackVisits:!0},Dt=Object.assign(Object.assign({},It),{isUnreleased:!1,prefabIndex:J.P.BonfireHard,zone:K.A_.BONFIREHARD,target:"bonfire_spire_hard-B1",difficultyMode:H.i.Hard,requirementsID:63}),Rt={prefabIndex:J.P.Shipwreck,nameKey:yt.ShipwreckShore,zone:K.A_.SHIPWRECK,tag:j.O.Shipwreck,icon:"zone-water",target:"shipwreck_shore-B12",summaryKey:"WORLD_SHIPWRECK_SHORE_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:36,titanIconOffset:{x:-50,y:40},ultimatesQuestIconOffset:{x:20,y:40},msgKeys:{1:"WORLD_MAP_SHIPWRECK_QUEST_0",2:"WORLD_MAP_SHIPWRECK_QUEST_1",3:"WORLD_MAP_SHIPWRECK_QUEST_2",4:"WORLD_MAP_SHIPWRECK_QUEST_3",5:"WORLD_MAP_SHIPWRECK_QUEST_4",6:"WORLD_MAP_SHIPWRECK_QUEST_5",7:"WORLD_MAP_SHIPWRECK_QUEST_6",8:"WORLD_MAP_SHIPWRECK_QUEST_7",9:"WORLD_MAP_SHIPWRECK_QUEST_8",10:"WORLD_MAP_SHIPWRECK_QUEST_9",11:"WORLD_MAP_SHIPWRECK_QUEST_10"},shouldTrackVisits:!0},Pt=Object.assign(Object.assign({},Rt),{isUnreleased:!1,prefabIndex:J.P.ShipwreckHard,zone:K.A_.SHIPWRECKHARD,target:"shipwreck_shore_hard-B12",difficultyMode:H.i.Hard,requirementsID:64}),Mt={prefabIndex:J.P.Academy,nameKey:yt.TheAcademy,zone:K.A_.ACADEMY,target:"academy-GH3",summaryKey:"WORLD_THE_ACADEMY_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:12,puppetMasterIconOffset:{x:-3,y:-190},showNotificationIcon:()=>z.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("key",22)<=0||!z.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(q.B.FEATURE_ACADEMY_TOWERS,q.B.BREADCRUMB_ACADEMY_VISITED)},Nt=Object.assign(Object.assign({},Mt),{isUnreleased:!0,prefabIndex:J.P.AcademyHard,zone:K.A_.ACADEMYHARD,target:"academy_hard-GH3",difficultyMode:H.i.Hard,requirementsID:65}),xt={prefabIndex:J.P.Dyno,nameKey:yt.DynoDigOasis,zone:K.A_.DYNO,target:"dyno-A0",summaryKey:"WORLD_DYNO_DIG_OASIS_DESC",lockKey:"WORLD_MAP_ZONE_LEVEL_LOCKED",classCodeKey:"WORLD_DYNO_DIG_OASIS_CLASS_MODE",classModeFrame:"popup-travel-dinodig",requirementsID:44,hideEvaluationFunc:()=>(0,st.G)($.m).enabled},Lt={prefabIndex:J.P.Darktower,nameKey:yt.DarkTower,zone:K.A_.DARKTOWER,target:"darktower-A1",summaryKey:"WORLD_DARK_TOWER_DESC",lockKey:"WORLD_MAP_DARK_TOWER_LEVEL_LOCKED",requirementsID:40},kt={prefabIndex:J.P.Lamplight,nameKey:yt.LamplightTown,zone:K.A_.LAMPLIGHT,target:"lamplight-B3",summaryKey:"WORLD_LAMPLIGHT_TOWN_DESC",classCodeKey:"WORLD_LAMPLIGHT_TOWN_CLASS_MODE",classModeFrame:"popup-travel-lamplight",lockKey:"WORLD_MAP_ZONE_LEVEL_LOCKED",requirementsID:37,iconOffset:{x:10,y:-90},ultimatesQuestIconOffset:{x:-70,y:10}},Bt={prefabIndex:J.P.House,nameKey:yt.YourHouse,zone:K.A_.HOUSE,target:"house-suburbs",summaryKey:"WORLD_YOUR_HOUSE_DESC",lockKey:"WORLD_MAP_ZONE_LEVEL_LOCKED",classCodeKey:"WORLD_YOUR_HOUSE_CLASS_MODE",classModeFrame:"popup-travel-home",clickEventName:Z.F0.ClickedHouseIcon,requirementsID:38},Ut={prefabIndex:J.P.TowerTown,nameKey:yt.TowerTown,zone:K.A_.TOWERTOWN,tag:j.O.TowerTown,target:"tower_town-A1",summaryKey:"TOWER_TOWN_MAP_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:41,isLocked:()=>{if(!Y.O.isEnglishLocale())return!0;return z.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("lockTowerTown",!1)},shouldTrackVisits:!0,summaryKeyOverrideFunc:()=>Q.U.isStepComplete(W.B.PuppetMasterDefeated)?"TOWER_TOWN_MAP_DESC_POST_ENDGAME":"TOWER_TOWN_MAP_DESC"},Ft={prefabIndex:J.P.DuelsStadium,nameKey:yt.DuelsStadium,zone:"duels_stadium",target:"duels_stadium",requirementsID:54,onClickOverride:()=>{var k;const B=at.i.BUTTONS_CONFIG.find((k=>"duels_stadium"===k.zone));F.Util.isDefined(B)?((0,st.G)(V.u).enabled||at.i.DIFFICULTY_MODE===B.difficultyMode||(z.q.instance.prodigy.gameContainer.get("ba4-af03").setCurrentDifficulty(H.i.Regular),at.i.setDifficultyMode(null!==(k=B.difficultyMode)&&void 0!==k?k:H.i.Regular)),X.d.openDuelsStadiumMenu().catch(G.RQr.createHandler("Error opening duels stadium menu"))):G.VyI.log("DuelsStadiumConfig.onClickOverride: Duels Stadium info not found",G.$bb.Error)}},Gt={prefabIndex:J.P.DragonIsle,nameKey:yt.DragonIsle,lockNameKey:"UNKNOWN_QUESTION_MARKS",zone:K.A_.DRAGONISLE,target:"dragon_isle-A1",summaryKey:"WORLD_DRAGON_ISLE_DESC",lockKey:"DRAGON_ISLE_WORLD_MAP_LOCKED",shouldLockForPuppetMasterZoneLockSpell:()=>0===(0,nt.k)(),isLocked:()=>0===(0,nt.k)(),tintLockOnZoneGoals:!0,hideZoneOnLocked:!0},jt={prefabIndex:J.P.Arcadia,nameKey:yt.Arcadia,zone:"arcadia",target:"arcadia",requirementsID:74,difficultyModeAgnostic:!0,onSetupLocation(){(0,st.G)($.m).enabled&&z.q.instance.prodigy.gameContainer.get("c47-20b6").funnel.sendStep(tt.F.ArcadiaLink,"feature",it.l.WorldMapSeen,it.T.WorldMapSeen)},onClickOverride:()=>{Et().catch(G.RQr.createHandler("Error handling Arcadia zone button click"))},analyticsClickOverride(){at.i.sendButtonClickedEvent("arcadia-zone-button","arcadia_confirmation_modal",et.B.WorldMap,{elementType:"map_screen",interfaceType:"overworld"}),z.q.instance.prodigy.gameContainer.get("c47-20b6").funnel.sendStep(tt.F.ArcadiaLink,"feature",it.l.FirstTap,it.T.FirstTap)},hideEvaluationFunc:()=>!(0,st.G)($.m).enabled}},60654:(k,B,U)=>{"use strict";U.d(B,{i:()=>X});var F=U(62459),G=U(88022),j=U(35120),$=U(77938),H=U(86051),V=U(52491),W=U(23082),q=U(30226),K=U(47255),z=U(64353),Y=U(17291),Q=U(95057);class X extends Y.b{constructor(k,B,U,F){super(k,B,H.K.BOOST_SELECT,{hideMenu:!0,hideContent:!1,hideClose:!0}),this.boosts=U,this.callback=F,this.setup()}menuSetup(){super.menuSetup();const k=j.q.instance.prodigy.create.panel(this,340,160,13,6);k.add(j.q.instance.prodigy.create.sprite(-15,-15,G._.General_icons_json,"member")),j.q.instance.prodigy.create.font(k,-310,15,j.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("BOOST_MENU_TITLE"),{align:"center",size:30});for(let B=0;B{"use strict";var F;U.d(B,{s:()=>F}),function(k){k[k.Key=0]="Key",k[k.View=1]="View",k[k.Icon=2]="Icon",k[k.IconNoBackground=3]="IconNoBackground",k[k.Store=4]="Store",k[k.Inventory=5]="Inventory",k[k.Card=6]="Card",k[k.Info=7]="Info",k[k.StylistCard=8]="StylistCard",k[k.Buy=9]="Buy",k[k.Equip=10]="Equip",k[k.Item=11]="Item",k[k.GotItem=12]="GotItem",k[k.WizardCostumesMenu=13]="WizardCostumesMenu"}(F||(F={}))},25480:(k,B,U)=>{"use strict";U.d(B,{u:()=>st});var F=U(8674),G=U(62459),j=U(95891),$=U(88022),H=U(35120),V=U(77938),W=U(13729),q=U(73797),K=U(35084),z=U(63746),Y=U(43531),Q=U(70703),X=U(30226),Z=U(47255),J=U(64353),tt=U(35452),et=U(95057),it=U(21418);class st extends tt.a{get content(){return this._content}constructor(k,B,U,F,j,$,V,W=!1,K={},z){super(k,B,0,0,H.q.instance.prodigy.textureMenu),this.storeName=null,this._itemCards=[],this.enableItemInput=!0,this._equippingItemInProgress=!1,this._deferredPromiseResolve=null,this.game=k,this.items=st.mergeItems(U),this.onClose=()=>{H.q.instance.game.broadcaster.broadcast(q.n8.GotItemClosed),null==F||F()},this.shouldStartDialogueOnCreate=!G.Aq$.isDefined(j)||j,this.eventType=$,this.storeName=V,this.fakeAward=W,this._segmentItemMetadata=K,this._additionalDialogueIds=z,this.create(),G.VyI.log("GotItem------------------------------------",G.$bb.Verbose)}create(){var k;for(super.create();st._menuIsOpen&&!H.q.instance.prodigy.open.isClosingMenus;)H.q.instance.prodigy.open.menuCloseTopmost(1),0===H.q.instance.prodigy.open.menus.length&&(st._menuIsOpen=!1);if(st._menuIsOpen=!0,this.dialogue=H.q.instance.prodigy.dialogue.create(),this._content=H.q.instance.prodigy.create.element(this,0,0),this.overlay=H.q.instance.prodigy.create.element(this,0,0),null===(k=this._additionalDialogueIds)||void 0===k?void 0:k.precedingDialogue)return this.addDialogueToQueue(this._additionalDialogueIds.precedingDialogue),void this.dialogue.start(!0,this.startGotItemSequence.bind(this),!0,!1);this.startGotItemSequence()}startGotItemSequence(){this.addTransparent(),this.shouldStartDialogueOnCreate?(this.getDialogue(),this.dialogue.startDeprecated("noot")):this.getItems(this.items.length,0,!0,void 0)}addDialogueToQueue(k){k.forEach((k=>{this.dialogue.addEvents([{dialogueData:this.dialogue.dataProvider.get(k),blockInput:!0,hideNext:!1}])}))}startDialogue(){G.Aq$.isDefined(this.dialogue)?this.dialogue.startDeprecated("noot"):G.VyI.log("GotItem.startDialogue - dialogue was null. Cannot start",G.$bb.Error)}getItems(k,B,U,F){var j;const $=[],H=[];for(let V=0;V{var U;X.J.awardXpToActiveTeam(k.N,null===(U=this._segmentItemMetadata)||void 0===U?void 0:U.source_type,B)}}}for(;H.length>0;){const k=H.splice(0,5);this.dialogue.addEvents([{callback:this.showBatchOfItems.bind(this,k)}]),F&&this.dialogue.setText(F)}for(const G of $)X.J.bagItem(G,this.game,this.eventType,this.storeName,this._segmentItemMetadata)}showBatchOfItems(k){this.clearItems();const B=(this.game.width-200*k.length-10*(k.length-1))/2;k.forEach(((k,U)=>{const F=B+210*U;this.revealItem(F,k,400*U)}))}static mergeItems(k){const B=[];let U,F=0;const $=[];for(let G=0;G"currency"===B.type&&B.ID===k[G].ID));let F=0;j.forEach(U,(k=>F+="N"in k?k.N:1)),k[G].N=F,B.push(k[G]),$.push(k[G].ID)}}else B.push(k[G]);return 0!==F&&B.unshift({type:"gold",N:F}),G.Aq$.isDefined(U)&&B.unshift(U),G.VyI.log(JSON.stringify(B),G.$bb.Verbose),B}getDialogue(){if(1===this.items.length)this.getSingleDialogue(this.items[0],0,!0),this.dialogue.setText({callback:this.processClose.bind(this)});else if("memberBox-reward"===this.eventType){const k=this.game.rnd.integerInRange(191,197),B=H.q.instance.prodigy.dialogues.get("noot",k);this.getItems(this.items.length,0,!0,B),this.dialogue.setText({callback:this.processClose.bind(this)})}else{const k=H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);let B=k.getText("GOT_ITEM_YOU_GOT_SOMETHING");G.Aq$.isDefined(this.eventType)&&("combat-drop"===this.eventType?B=k.getText("GOT_ITEM_AWESOME_STUFF"):"mystery-bag"===this.eventType&&(B=k.getText("GOT_ITEM_YOU_GOT_MYSTERY_BAG"))),this.getItems(this.items.length,0,!0,{text:B,face:2,anim:1}),(()=>{(0,F.sH)(this,void 0,void 0,(function*(){yield new Promise((k=>{this.dialogue.setText({callback:k})}));for(let k=0;k{this._deferredPromiseResolve=k,this.dialogue.setText({callback:()=>{this._equippingItemInProgress||(k(),this._deferredPromiseResolve=null)}}),this.dialogue.startDeprecated("noot")})))}this._equippingItemInProgress||this.processClose()}))})()}}getSingleDialogue(k,B,U=!0){this.clearItems();const F=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player,j=H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);if("pet"===k.type)this.getItems(1,B,U,{text:j.getText("GOT_ITEM_YOU_GOT_PET"),face:2,anim:1});else if("dorm"===k.type)this.getItems(1,B,U,{text:j.getText("GOT_ITEM_YOU_GOT_FURNITURE"),face:2,anim:1});else if("dormbg"===k.type)this.getItems(1,B,U,{text:j.getText("GOT_ITEM_MOVED_HOUSE"),face:2,anim:1});else if("gold"===k.type)this.getItems(1,B,U,{text:j.getText("GOT_ITEM_GOLD"),face:2,anim:1});else if("spell"===k.type)this.getItems(1,B,U,{text:j.getText("GOT_ITEM_SPELL"),face:2,anim:1});else if("hat"===k.type||"outfit"===k.type||"weapon"===k.type||"boots"===k.type||"follow"===k.type){let $=!1;const H=V.t.getItem(k.type,k.ID).data;!F.hasMembership()&&(1===H.member&&!G.Aq$.isDefined(k.isGift)||G.Aq$.isDefined(H.lockLevel)&&F.getLevel(){const B=k.findComponent(z.Z);B.revealOverlay.active=!0;B.revealOverlay.findComponent(Q.x).startTween(void 0,void 0,U+500),this.setItemInput(k),this._itemCards.push(k)})).catch(G.RQr.createHandler("Error creating an item card")),this.shootStars(U+500,k+100)}setInputEnabled(k){this.enableItemInput=k,this._itemCards.forEach((k=>{this.setItemInput(k)}))}setItemInput(k){k.findComponentInChildren(K.n).InputEnabled=this.enableItemInput}clearItems(){G.Aq$.isDefined(this._content)&&(this._content.destroy(),this._content=H.q.instance.prodigy.create.element(this,0,0)),G.Aq$.isDefined(this.overlay)&&(this.overlay.destroy(),this.overlay=H.q.instance.prodigy.create.element(this,0,0))}skip(){G.Aq$.isDefined(this.overlay)&&this.overlay.destroy(),this.overlay=H.q.instance.prodigy.create.element(this,0,0)}wearItem(k){var B,U;this._equippingItemInProgress=!0;const F=H.q.instance.prodigy.gameContainer,j=F.get("e20-0fb0").player,$=V.t.getItem(k.type,k.ID).data;if(j.hasMembership()||1!==$.member||G.Aq$.isDefined(k.isGift))if(G.Aq$.isDefined($.lockLevel)&&j.getLevel()<$.lockLevel){const B=F.get(G.$Bt.LocalizationService).getText("LEVEL_LOCK_EQUIP",$.name,$.lockLevel);H.q.instance.prodigy.open.message(B).onClose=this.showLevelLockMembershipAd.bind(this,`${k.type}-${k.ID}`)}else j.equip(k.ID,k.type).then((k=>{k&&(j.appearanceChanged=!0,H.q.instance.game.broadcaster.broadcast(q.J8.PlayerAppearanceUpdated)),this.handleEquipFlowCompletion()})).catch(G.RQr.createHandler(`GotItem:wearItem Error equipping item ${k.type}-${k.ID}`));else{const G={conversionFunnelName:Z.o.FunnelEquipNewLockedItem,conversionFunnelMetadata:`${k.type}-${k.ID}`},j=J.P.shouldUseUnifiedConversionFlow(Z.o.FunnelUseMemberLockedItem)?et.R.UnifiedConversionFlow:X.J.showYouTubeMembershipAd(this.game,!0)?et.R.Video:et.R.Static;F.get("c47-20b6").purchase.sendFunnelStart({type:"Equip-Member-Locked-Item-Reward",category:"Item-Equip",contentId:`${k.type}-${k.ID}`,adType:j,adVersion:J.P.getAdVersion(Z.o.FunnelUseMemberLockedItem)}),F.get("c47-20b6").item.sendItemEquipFailedEvent({item_name:null===(U=null===(B=V.t.getItem(k.type,k.ID))||void 0===B?void 0:B.data)||void 0===U?void 0:U.name,item_type:k.type,item_id:k.ID,fail_reason:"Member Locked"}),H.q.instance.prodigy.open.membershipInfo(this.handleEquipFlowCompletion.bind(this),G)}}showLevelLockMembershipAd(k){var B,U;if(!H.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasMembership()){const F=H.q.instance.prodigy.gameContainer.get("c47-20b6"),G=k.split("-"),j=J.P.shouldUseUnifiedConversionFlow(Z.o.FunnelEquipLevelLockedItem)?et.R.UnifiedConversionFlow:X.J.showYouTubeMembershipAd(this.game,!0)?et.R.Video:et.R.Static;F.purchase.sendFunnelStart({type:"Equip-Level-Locked-Item-Reward",category:"Item-Equip",contentId:k,adType:j,adVersion:J.P.getAdVersion(Z.o.FunnelEquipLevelLockedItem)}),F.item.sendItemEquipFailedEvent({item_name:null===(U=null===(B=V.t.getItem(G[0],parseInt(G[1])))||void 0===B?void 0:B.data)||void 0===U?void 0:U.name,item_type:G[0],item_id:parseInt(G[1]),fail_reason:"Member Locked"}),H.q.instance.prodigy.open.membershipInfo(this.handleEquipFlowCompletion.bind(this),{conversionFunnelName:Z.o.FunnelEquipLevelLockedItem})}}handleEquipFlowCompletion(){this._equippingItemInProgress=!1,this._deferredPromiseResolve?(this._deferredPromiseResolve(),this._deferredPromiseResolve=null):this.processClose()}shootStars(k,B){const U=H.q.instance.prodigy.create.element(this.overlay);for(let F=0;F<5;F++){const j=B-100+50*F;let V=(this.game.height>>1)-100-150;0===F||4===F?V+=120:1!==F&&3!==F||(V+=50);const W=H.q.instance.prodigy.create.sprite(B,(this.game.height>>1)-100,$._.General_icons_json,"star");U.add(W),W.anchor.set(.5,.5),W.alpha=0;const q=this.game.add.tween(W,this).to({alpha:.5},1,G.GS3.Linear.None).delay(k),K=this.game.add.tween(W,this).to({x:j,y:V,alpha:0},1e3,G.GS3.Quadratic.Out);q.onTweenComplete.add((()=>{K.start()})),q.start()}}processClose(){var k;if(null===(k=this._additionalDialogueIds)||void 0===k?void 0:k.succeedingDialogue)return this.addDialogueToQueue(this._additionalDialogueIds.succeedingDialogue),this.clearItems(),this.background.destroy(),void this.dialogue.start(!0,this.close.bind(this),!0,!1);st._menuIsOpen=!1,this.close()}destroy(){st._menuIsOpen=!1,G.Aq$.isDefined(this._content)&&this._content.destroy(),G.Aq$.isDefined(this.overlay)&&this.overlay.destroy(),this._itemCards.forEach((k=>k.destroy())),super.destroy()}}},93375:(k,B,U)=>{"use strict";var F;U.d(B,{f:()=>F}),function(k){k.Standard="bfea05f6-bb3d-472d-ad13-2601f2f565e1",k.House="3e8bba0f-fc57-4411-8180-ac8948aa48ed"}(F||(F={}))},53661:(k,B,U)=>{"use strict";function F(k){return k}var G,j,$,H,V,W,q,K,z,Y,Q,X,Z,J,tt,et,it,st,nt,at,rt,ot,ht,ct,dt,lt,ut,ft,bt,pt,vt,gt,mt,yt,_t,Et,wt,Tt;U.d(B,{$u:()=>pt,$z:()=>rt,AP:()=>_t,Co:()=>bt,Dw:()=>$,Eh:()=>H,F:()=>F,FK:()=>V,FO:()=>K,Fm:()=>X,G9:()=>gt,ML:()=>tt,OA:()=>et,OP:()=>it,R$:()=>Q,Tl:()=>j,Ut:()=>Et,V8:()=>ft,Wg:()=>J,Wr:()=>wt,XU:()=>ot,YM:()=>yt,ZE:()=>mt,_R:()=>nt,bL:()=>vt,eV:()=>dt,fM:()=>ht,hi:()=>Y,ht:()=>lt,iu:()=>ut,jP:()=>ct,n7:()=>G,oD:()=>at,oX:()=>Z,sD:()=>q,sv:()=>Tt,uo:()=>W,xO:()=>st,zw:()=>z}),function(k){k.BattleProgressPointsAwarded="BATTLE_PROGRESS_POINTS_AWARDED",k.IFrameClosePostMessage="I_FRAME_CLOSE_POST_MESSAGE",k.IFrameSource="I_FRAME_SOURCE",k.InsufficientResource="INSUFFICIENT_RESOURCE",k.StoreName="STORE_NAME",k.ShowTimeRemaining="SHOW_TIME_REMAINING",k.TimeRemainingMs="TIME_REMAINING_MS",k.TimeRemainingText="TIME_REMAINING_TEXT",k.TitleText="TITLE_TEXT",k.WizardInjectionConfiguredAppearance="APPEARANCE",k.WizardInjectionConfiguredInputEnabled="INPUT_ENABLED"}(G||(G={})),function(k){k.Data="ITEM_CARD_DATA",k.OnClick="ITEM_CARD_ON_CLICK"}(j||(j={})),function(k){k.DynamicPromptContentAssetGuid="DYNAMIC_PROMPT_CONTENT_ASSET_GUID"}($||($={})),function(k){k.MembershipPurchaseConversionFunnelMetadata="MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_METADATA",k.MembershipPurchaseConversionFunnelName="MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_NAME",k.MembershipPurchaseConversionFunnelStage="MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_STAGE",k.MembershipPurchaseConversionFunnelStaticOrVideo="MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_STATIC_OR_VIDEO",k.MembershipPurchaseMemberPanelAdFlavourText="MEMBERSHIP_PURCHASE_MEMBER_PANEL_AD_FLAVOUR_TEXT",k.MembershipPurchaseMemberPanelAdFrameName="MEMBERSHIP_PURCHASE_MEMBER_PANEL_AD_FRAME_NAME",k.MembershipPurchaseMemberPanelAdTrackingEvent="MEMBERSHIP_PURCHASE_MEMBER_PANEL_AD_TRACKING_EVENT",k.MembershipPurchaseUpgrade="MEMBERSHIP_PURCHASE_UPGRADE"}(H||(H={})),function(k){k.OtpMissingMagicoin="OTP_MISSING_MAGICOIN"}(V||(V={})),function(k){k.PostBattleFlowData="POST_BATTLE_FLOW_DATA",k.PostBattleFlowBattleType="POST_BATTLE_FLOW_BATTLE_TYPE",k.PostBattleFlowRewardCardAmountText="POST_BATTLE_FLOW_REWARD_CARD_AMOUNT_TEXT",k.PostBattleFlowRewardCardAssetId="POST_BATTLE_FLOW_REWARD_CARD_ASSET_ID",k.PostBattleFlowRewardCardAssetType="POST_BATTLE_FLOW_REWARD_CARD_ASSET_TYPE",k.PostBattleFlowRewardCardFrame="POST_BATTLE_FLOW_REWARD_CARD_FRAME",k.PostBattleFlowRewardCardIsLocked="POST_BATTLE_FLOW_REWARD_CARD_LOCKED",k.PostBattleFlowRewardCardMemberItem="POST_BATTLE_FLOW_REWARD_CARD_MEMBER_ITEM",k.PostBattleFlowRewardCardMoreThanOneItem="POST_BATTLE_FLOW_REWARD_CARD_MORE_THAN_ONE_ITEM",k.PostBattleFlowRewardsScalingInfo="POST_BATTLE_FLOW_REWARDS_SCALING_INFO",k.PostBattleFlowNumberOfRegularRewardCards="POST_BATTLE_FLOW_NUMBER_OF_REGULAR_REWARD_CARDS",k.PostBattleFlowNumberOfMemberRewardCards="POST_BATTLE_FLOW_NUMBER_OF_MEMBER_REWARD_CARDS",k.PostBattleFlowVictory="POST_BATTLE_FLOW_VICTORY",k.PostBattleFlowWizardWillLevelUp="POST_BATTLE_FLOW_WIZARD_WILL_LEVEL_UP",k.PostBattleFlowWizardEndLevel="POST_BATTLE_FLOW_WIZARD_LEVEL",k.PostBattleFlowContinueCallback="POST_BATTLE_FLOW_CONTINUE_CALLBACK",k.PostBattleFlowMemberChestActive="POST_BATTLE_FLOW_MEMBER_CHEST_ACTIVE",k.PostBattleFlowXpWarningLocalizedTextId="POST_BATTLE_FLOW_XP_WARNING_LOCALIZED_TEXT_ID",k.EnableRescueButtonInput="ENABLE_RESCUE_BUTTON_INPUT",k.PetRescued="PET_RESCUED",k.PostBattleFlowRescueContinueButtonText="RESCUE_CONTINUE_BUTTON_TEXT",k.PostBattleFlowRescueTitle="POST_BATTLE_FLOW_RESCUE_TITLE",k.PostBattleFlowShowClouds="POST_BATTLE_FLOW_SHOW_CLOUDS",k.ShowFreeRescueButton="SHOW_FREE_RESCUE_BUTTON",k.ShowMagicoinButton="SHOW_MAGICOIN_RESCUE_BUTTON",k.ShowMembershipButton="SHOW_MEMBERSHIP_RESCUE_BUTTON"}(W||(W={})),function(k){k.RescuablePetsContainer="RESCUABLE_PETS_CONTAINER"}(q||(q={})),function(k){k.PopupMessageAtlasFrameName="POPUP_MESSAGE_ATLAS_FRAME_NAME",k.PopupMessageAtlasGuid="POPUP_MESSAGE_ATLAS_GUID",k.PopupMessageText="POPUP_MESSAGE_TEXT",k.PopupMessageTextFill="POPUP_MESSAGE_TEXT_FILL",k.PopupMessageTextStroke="POPUP_MESSAGE_TEXT_STROKE",k.PopupMessageTextStrokeThickness="POPUP_MESSAGE_TEXT_STROKE_THICKNESS"}(K||(K={})),function(k){k.UnifiedStoreButton="UNIFIED_STORE_BUTTON",k.UnifiedStoreButtonIconFrame="UNIFIED_STORE_BUTTON_ICON_FRAME",k.UnifiedStoreButtonImageFrame="UNIFIED_STORE_BUTTON_IMAGE_FRAME",k.UnifiedStoreButtonName="UNIFIED_STORE_BUTTON_NAME",k.UnifiedStoreSegmentButtonName="UNIFIED_STORE_SEGMENT_BUTTON_NAME",k.UnifiedStoreSegmentDestinationName="UNIFIED_STORE_SEGMENT_DESTINATION_NAME"}(z||(z={})),function(k){k.CanPurchaseSlots="CAN_PURCHASE_SLOTS",k.PetCreatureData="PET_DATA",k.PetSlotMemberBonus="PET_SLOT_MEMBER_BONUS",k.PetSlotMemberMaximumLimit="PET_SLOT_MEMBER_MAXIMUM_LIMIT",k.PurchasePetSlotTransactionId="PURCHASE_PET_SLOT_TRANSACTION_ID",k.PurchasePetSlotCompleteCallback="PURCHASE_PET_SLOT_COMPLETE_CALLBACK",k.SpinePetEvolveBurst="SPINE_PET_EVOLVE_BURST",k.SpinePetEvolveIdle="SPINE_PET_EVOLVE_IDLE",k.YourPetPanelPetId="YOUR_PET_PANEL_PET_ID",k.YourPetPanelPetData="YOUR_PET_PANEL_PET_DATA",k.YourPetPanelPetName="YOUR_PET_PANEL_PET_NAME",k.YourPetPanelPetHasNickname="YOUR_PET_PANEL_PET_HAS_NICKNAME",k.YourPetPanelPetSpecies="YOUR_PET_PANEL_PET_SPECIES",k.YourPetPanelXpBarInfo="YOUR_PET_PANEL_XP_BAR_INFO",k.YourPetElementalBaseFrame="YOUR_PET_ELEMENTAL_BASE_FRAME",k.YourPetPanelEvoLineNumStages="PET_EVO_LINE_NUM_STAGES",k.YourPetPanelEvoLineOwnedStage="PET_EVO_LINE_OWNED_STAGE",k.YourPetPanelEvoLineStage1Id="PET_EVO_LINE_STAGE_1_ID",k.YourPetPanelEvoLineStage1Seen="PET_EVO_LINE_STAGE_1_SEEN",k.YourPetPanelEvoLineStage1Rescued="PET_EVO_LINE_STAGE_1_RESCUED",k.YourPetPanelEvoLineStage2Id="PET_EVO_LINE_STAGE_2_ID",k.YourPetPanelEvoLineStage2Seen="PET_EVO_LINE_STAGE_2_SEEN",k.YourPetPanelEvoLineStage2Rescued="PET_EVO_LINE_STAGE_2_RESCUED",k.YourPetPanelEvoLineStage3Id="PET_EVO_LINE_STAGE_3_ID",k.YourPetPanelEvoLineStage3Seen="PET_EVO_LINE_STAGE_3_SEEN",k.YourPetPanelEvoLineStage3Rescued="PET_EVO_LINE_STAGE_3_RESCUED",k.YourPetPanelEvoLineStage4Id="PET_EVO_LINE_STAGE_4_ID",k.YourPetPanelEvoLineStage4Seen="PET_EVO_LINE_STAGE_4_SEEN",k.YourPetPanelEvoLineStage4Rescued="PET_EVO_LINE_STAGE_4_RESCUED",k.YourPetPanelEvolveButtonWithHC="YOUR_PET_ENABLE_EVOLVE_BUTTON_WITH_HC",k.YourPetPanelShowEvolveButton="YOUR_PET_PANEL_SHOW_EVOLVE_BUTTON",k.YourPetPanelEnableEvolveButton="YOUR_PET_PANEL_ENABLE_EVOLVE_BUTTON",k.YourPetPanelEnableReleaseButton="YOUR_PET_PANEL_ENABLE_RELEASE_BUTTON",k.YourPetPanelEnableAddTeamButton="YOUR_PET_PANEL_ENABLE_ADD_TEAM_BUTTON",k.YourPetPanelAddToTeamFunction="YOUR_PET_PANEL_ADD_TO_TEAM_FUNCTION",k.YourPetPanelReleasePetFunction="YOUR_PET_PANEL_RELEASE_PET_FUNCTION",k.YourPetPanelLevelUpButtonDisabledMessage="YOUR_PET_PANEL_LEVEL_UP_BUTTON_DISABLED_MESSAGE",k.YourPetPanelLevelUpMaxLevelState="YOUR_PET_PANEL_LEVEL_UP_MAX_LEVEL_STATE",k.YourPetPanelEnableLevelUpButton="YOUR_PET_PANEL_ENABLE_LEVEL_UP_BUTTON",k.YourPetPanelLevelUpButtonLevel="YOUR_PET_PANEL_LEVEL_UP_BUTTON_LEVEL",k.YourPetPanelLevelUpButtonCost="YOUR_PET_PANEL_LEVEL_UP_BUTTON_COST",k.YourPetPanelLevelUpButtonCostDifference="YOUR_PET_PANEL_LEVEL_UP_BUTTON_COST_DIFFERENCE",k.YourPetPanelLevelUpButtonCostText="YOUR_PET_PANEL_LEVEL_UP_BUTTON_COST_TEXT",k.YourPetPanelLevelUpMagicoinCost="YOUR_PET_PANEL_LEVEL_UP_MAGICOIN_COST",k.YourPetPanelLevelUpMagicoinCostDifference="YOUR_PET_PANEL_LEVEL_UP_MAGICOIN_COST_DIFFERENCE",k.YourPetPanelLevelUpConversionButtonEnabled="YOUR_PET_PANEL_LEVEL_UP_CONVERSION_BUTTON_ENABLED",k.YourPetPanelShouldShowCurrencyConversion="SHOULD_SHOW_CURRENCY_CONVERSION",k.YourPetPanelPopupMessageManager="YOUR_PET_PANEL_POPUP_MESSAGE_MANAGER",k.YourPetPanelShowLevelUp="YOUR_PET_PANEL_SHOW_LEVEL_UP",k.YourPetPanelShowRightSideButtons="YOUR_PET_PANEL_SHOW_RIGHT_SIDE_BUTTONS",k.YourPetPanelPetGearShowGearPanel="PET_GEAR_SHOW_GEAR_PANEL",k.YourPetPanelPetGearSlotsDisabled="PET_GEAR_SLOTS_DISABLED",k.YourPetPanelDisplayMergeButton="YOUR_PET_PANEL_DISPLAY_MERGE_BUTTON",k.YourPetPanelDisplayMergeRankBadge="YOUR_PET_PANEL_DISPLAY_MERGE_RANK_BADGE",k.YourPetPanelPetMergeRank="YOUR_PET_PANEL_PET_MERGE_RANK",k.YourPetPanelMergeOnClick="YOUR_PET_PANEL_MERGE_ON_CLICK",k.YourPetPanelEnableRemoveFromTeamButton="ENABLE_REMOVE_FROM_TEAM_BUTTON",k.YourPetShowOnYourTeamBadge="SHOW_ON_YOUR_TEAM_BADGE",k.YourPetEnableAddTeamButton="ENABLE_ADD_TEAM_BUTTON",k.YourPetInfoLoreText="PET_INFO_LORE_TEXT",k.YourPetShowEvolveSparkles="SHOW_EVOLVE_SPARKLES",k.YourPetShowEvolveInfo="SHOW_EVOLVE_INFO",k.YourPetEvolveInfoText="EVOLVE_INFO_TEXT",k.YourPetPetEvolveButtonFunction="PET_EVOLVE_BUTTON_FUNCTION",k.YourPetHideEvolutionLine="HIDE_EVOLUTION_LINE"}(Y||(Y={})),function(k){k.TeamCardData="TEAM_CARD_DATA",k.TeamCardId="TEAM_CARD_ID",k.TeamCardPetGear="TEAM_CARD_PET_GEAR",k.PetRarityText="PET_RARITY_TEXT",k.PetRarity="PET_RARITY"}(Q||(Q={})),function(k){k.ShowRestrictionBadge="SHOW_RESTRICTION_BADGE",k.RestrictionBadgeTest="RESTRICTION_BADGE_TEXT"}(X||(X={})),function(k){k.PetCardPetSpawner="PET_SPAWNER"}(Z||(Z={})),function(k){k.RarityGraphic="RARITY_GRAPHIC",k.RarityTint="RARITY_TINT",k.RarityStroke="RARITY_STROKE",k.IconEnabled="RARITY_ICON_ENABLED",k.BackgroundEnabled="RARITY_BACKGROUND_ENABLED"}(J||(J={})),function(k){k.Disabled="DISABLED",k.InputEnabled="INPUT_ENABLED",k.Selected="SELECTED",k.PetID="PET_ID",k.PetIconID="PET_ICON_ID",k.PetElementID="PET_ELEMENT_ID",k.PetData="PET_DATA",k.Pet="PET",k.Name="NAME",k.NameAlignH="NAME_ALIGN_H",k.Level="LEVEL",k.MergeRank="MERGE_RANK",k.ReadyToMerge="READY_TO_MERGE",k.IconTint="ICON_TINT",k.ShowUpgrade="SHOW_UPGRADE",k.ShowEvolve="SHOW_EVOLVE",k.ShowStaticEvolve="SHOW_STATIC_EVOLVE",k.ShowOnTeam="SHOW_ON_TEAM",k.ShowGuideHand="SHOW_GUIDE_HAND",k.OverlayText="OVERLAY_TEXT",k.ShowElementIcon="SHOW_ELEMENT_ICON",k.ShowMemberLock="SHOW_MEMBERLOCK_ICON",k.ShowStatIcon="SHOW_STAT_ICON",k.ShowLevelIcon="SHOW_LEVEL_ICON",k.ShowPetGear="SHOW_PET_GEAR",k.ShowMergeRankBadge="SHOW_MERGE_RANK_BADGE",k.ShowTimeRemaining="SHOW_TIME_REMAINING",k.TimeRemainingMs="TIME_REMAINING_MS",k.DisabledIcon="DISABLED_ICON",k.ShowMergeBar="SHOW_MERGE_BAR",k.PetRarity="PET_RARITY",k.PetRarityBackground="PET_BACKROUND_RARITY",k.ApplyGreyScale="APPLY_GREYSCALE",k.ShowUnknownBackground="SHOW_UNKNOWN_BACKGROUND",k.ShowRarityBackground="SHOW_RARITY_BACKGROUND",k.ShowTreasureTrackBadge="SHOW_TREASURE_TRACK_BADGE",k.ShowNotificationBadge="SHOW_NOTIFICATION_BADGE",k.ShowNotificationText="SHOW_NOTIFICATION_TEXT",k.NotificationText="NOTIFICATION_TEXT",k.OnClick="ON_CLICK",k.PetDataList="PET_DATA_LIST",k.WhiteOverlay="WHITE_OVERLAY",k.AlphaMode="ALPHA_MODE",k.ShowSelectionAvailableOutline="SHOW_SELECTION_AVAILABLE_OUTLINE",k.PetBookBackgroundClicked="PET_BOOK_BACKGROUND_CLICKED",k.PetRarityText="PET_RARITY_TEXT",k.ShowPetRarity="SHOW_PET_RARITY",k.ShowCloseButton="SHOW_CLOSE_BUTTON",k.ApplyColorFilter="APPLY_COLOR_FILTER",k.UniquePetsTotal="UNIQUE_PETS_TOTAL",k.IsSelecting="IS_SELECTING"}(tt||(tt={})),function(k){k.IngredientCardSpawner="INGREDIENT_CARD_SPAWNER",k.PetSpineComponent="PET_SPINE",k.MergeRankBadge="MERGE_RANK_BADGE",k.MergeFanfare="MERGE_FANFARE",k.MiddlePanelBacking="MIDDLE_PANEL_BACKING",k.IngredientWidget="INGREDIENT_WIDGET",k.MergeBar="MERGE_BAR"}(et||(et={})),function(k){k.MagicoinDisplay="MAGICOIN_DISPLAY",k.GoldDisplay="GOLD_DISPLAY",k.PetInfoPetGearWidget="PET_INFO_PET_GEAR_WIDGET",k.PetLoadingDisplay="PET_INFO_LOADING_DISPLAY",k.LevelUpWidget="LEVEL_UP_WIDGET",k.PetInfoNavigationTabsController="PET_INFO_NAVIGATION_TABS_CONTROLLER",k.PetInfoWidgetController="PET_INFO_WIDGET_CONTROLLER",k.MergeWidgetController="MERGE_WIDGET_CONTROLLER",k.SpellsWidgetController="SPELLS_WIDGET_CONTROLLER",k.EpicCounterWidget="EPIC_COUNTER_WIDGET"}(it||(it={})),function(k){k.TeamCardsParent="TEAM_CARDS_PARENT",k.PetCardPetSpawner="PET_CARD_SPAWNER",k.PetBookScrollView="PET_BOOK_SCROLL_VIEW",k.PetBookFlexContainer="PET_BOOK_FLEX_CONTAINER"}(st||(st={})),function(k){k.PetGearBonusStatAmountText="PET_GEAR_BONUS_STAT_AMOUNT_TEXT",k.PetGearBonusStatAppliedAmount="PET_GEAR_BONUS_STAT_APPLIED_AMOUNT",k.PetGearBonusStatEnabled="PET_GEAR_BONUS_STAT_ENABLED",k.PetGearBonusStatIcon="PET_GEAR_BONUS_STAT_ICON",k.PetGearBonusStatTextKey="PET_GEAR_BONUS_STAT_TEXT_KEY",k.PetGearCategoryLabel="PET_GEAR_CATEGORY_LABEL",k.PetGearFlavourText="PET_GEAR_FLAVOUR_TEXT",k.PetGearInitialGearDisplay="PET_GEAR_INITIAL_GEAR_DISPLAY",k.PetGearItemData="PET_GEAR_ITEM_DATA",k.PetGearItemEquipped="PET_GEAR_ITEM_EQUIPPED",k.PetGearItemIcon="PET_GEAR_ITEM_ICON",k.PetGearItemInfoDataProvider="PET_GEAR_ITEM_INFO_DATA_PROVIDER",k.PetGearItemMember="PET_GEAR_ITEM_MEMBER",k.PetGearItemName="PET_GEAR_ITEM_NAME",k.PetGearItemNew="PET_GEAR_ITEM_NEW",k.PetGearItemSelected="PET_GEAR_ITEM_SELECTED",k.PetGearItemRarity="PET_GEAR_ITEM_RARITY",k.PetGearItemRarityLabel="PET_GEAR_ITEM_RARITY_LABEL",k.PetGearMenuHatGridManager="PET_GEAR_MENU_HAT_GRID_MANAGER",k.PetGearMenuRelicGridManager="PET_GEAR_MENU_RELIC_GRID_MANAGER",k.PetGearPetIcon="PET_GEAR_PET_ICON",k.PetGearPetPreviewDataProvider="PET_GEAR_PET_PREVIEW_DATA_PROVIDER",k.PetGearPreviewLoadout="PET_GEAR_PREVIEW_LOADOUT",k.PetGearShowPetIcon="PET_GEAR_SHOW_PET_ICON",k.PetGearType="PET_GEAR_TYPE",k.PetGearHeaderEnable="PET_GEAR_HEADER_ENABLE",k.PetGearHeaderClose="PET_GEAR_HEADER_CLOSE"}(nt||(nt={})),function(k){k.OwnedPanelTooltipPetInfoButtonTransform="OWNED_PANEL_TOOLTIP_PET_INFO_BUTTON_TRANSFORM",k.PetGearFtueEnabledInputTransform="PET_GEAR_FTUE_INPUT_TRANSFORM",k.PetGearFtueOverlayGameObject="PET_GEAR_FTUE_OVERLAY_GAMEOBJECT",k.PetGearFtueOverlayEnabled="PET_GEAR_FTUE_OVERLAY_ENABLED"}(at||(at={})),function(k){k.PetMergeFtueOverlayEnabled="PET_MERGE_FTUE_OVERLAY_ENABLED",k.PetMergeModalFTUECloseButtonEnabled="PET_MERGE_MODAL_FTUE_CLOSE_BUTTON_ENABLED",k.PetMergeModalFTUEEnabled="PET_MERGE_MODAL_FTUE_ENABLED",k.PetMergeModalCloseButton="PET_MERGE_MODAL_CLOSE_BUTTON"}(rt||(rt={})),function(k){k.CloseCallback="BATTLE_PASS_CLOSE_CALLBACK",k.DestroyBattlePassMenuCallback="BATTLE_PASS_DESTROY_BATTLE_PASS_MENU",k.FocusTabOverride="BATTLE_PASS_FOCUS_TAB_OVERRIDE",k.FocusTierOverride="BATTLE_PASS_FOCUS_TIER_OVERRIDE",k.GoalCompleteToasterDescription="BATTLE_PASS_GOAL_COMPLETE_TOASTER_DESCRIPTION",k.GoalCompleteToasterTitle="BATTLE_PASS_GOAL_COMPLETE_TOASTER_TITLE",k.ItemCardClaimableBorderAtlasGuid="BATTLE_PASS_ITEM_CARD_CLAIMABLE_BORDER_ATLAS_GUID",k.ItemCardClaimableBorderFrameName="BATTLE_PASS_ITEM_CARD_CLAIMABLE_BORDER_FRAME_NAME",k.ItemCardOffSeasonStateAtlasGuid="BATTLE_PASS_ITEM_CARD_OFF_SEASON_STATE_ATLAS_GUID",k.ItemCardOffSeasonStateFrameName="BATTLE_PASS_ITEM_CARD_OFF_SEASON_STATE_FRAME_NAME",k.ItemCardOffSeasonStateIsEnabled="BATTLE_PASS_ITEM_CARD_OFF_SEASON_STATE_IS_ENABLED",k.ItemCardClaimableBorderFrameSizeDelta="BATTLE_PASS_ITEM_CARD_CLAIMABLE_BORDER_FRAME_SIZE_DELTA",k.ItemCardCollectedTextBackingColour="BATTLE_PASS_ITEM_CARD_COLLECTED_TEXT_BACKING_COLOUR",k.ItemCardCollectedTextBackingStrokeColour="BATTLE_PASS_ITEM_CARD_COLLECTED_TEXT_BACKING_STROKE_COLOUR",k.ItemCardCollectedTextColour="BATTLE_PASS_ITEM_CARD_COLLECTED_TEXT_COLOUR",k.ItemCardRarityBackgroundAtlasGuid="BATTLE_PASS_ITEM_CARD_RARITY_BACKGROUND_ATLAS_GUID",k.ItemCardRarityBackgroundFrameName="BATTLE_PASS_ITEM_CARD_RARITY_BACKGROUND_FRAME_NAME",k.ItemRewardId="BATTLE_PASS_ITEM_REWARD_ID",k.ItemTierNumber="BATTLE_PASS_ITEM_TIER_NUMBER",k.ItemRewardType="BATTLE_PASS_ITEM_REWARD_TYPE",k.IsMysteryReward="BATTLE_PASS_IS_MYSTERY_REWARD",k.IsLevelupMemberReward="BATTLE_PASS_IS_LEVELUP_MEMBER_REWARD",k.IsUltimateMemberReward="BATTLE_PASS_IS_ULTIMATE_MEMBER_REWARD",k.MenuBarQuestsTabOpenCallback="BATTLE_PASS_MENU_BAR_QUESTS_TAB_OPEN",k.MenuBarRewardTabOpenCallback="BATTLE_PASS_MENU_BAR_REWARD_TAB_OPEN",k.MythicGuid="BATTLE_PASS_MYTHIC_GUID",k.LevelupMythicGuid="BATTLE_PASS_LEVELUP_MYTHIC_GUID",k.UltimateMemberPetGuid="BATTLE_PASS_ULTIMATE_MEMBER_PET_GUID",k.PremiumTrackIconAtlasGuid="BATTLE_PASS_PREMIUM_TRACK_ICON_ATLAS_GUID",k.PremiumTrackIconFrameName="BATTLE_PASS_PREMIUM_TRACK_ICON_FRAME_NAME",k.PremiumTrackName="BATTLE_PASS_PREMIUM_TRACK_NAME",k.QuestDescription="BATTLE_PASS_QUEST_DESCRIPTION",k.QuestType="BATTLE_PASS_QUEST_TYPE",k.Reward="BATTLE_PASS_REWARD",k.RewardAmount="BATTLE_PASS_REWARD_AMOUNT",k.RewardClaimable="BATTLE_PASS_REWARD_CLAIMABLE",k.RewardClaimed="BATTLE_PASS_REWARD_CLAIMED",k.RewardClaimedAnimationGuid="BATTLE_PASS_REWARD_CLAIMED_ANIMATION_GUID",k.RewardClaimedAnimationName="BATTLE_PASS_REWARD_CLAIMED_ANIMATION_NAME",k.RewardMovementAnimationName="BATTLE_PASS_REWARD_MOVEMENT_ANIMATION_NAME",k.ShouldHighlightCard="BATTLE_PASS_SHOULD_HIGHLIGHT_CARD",k.ShowRewardAmount="BATTLE_PASS_SHOW_REWARD_AMOUNT",k.ShowRewardClaimableAnimation="BATTLE_PASS_SHOW_REWARD_CLAIMABLE_ANIMATION",k.RewardClaimableAnimationName="BATTLE_PASS_REWARD_CLAIMABLE_ANIMATION_NAME",k.TierComplete="BATTLE_PASS_TIER_COMPLETE",k.ToasterNotificationId="BATTLE_PASS_TOASTER_NOTIFICATION_ID",k.MagicoinAmount="MAGICOIN_AMOUNT"}(ot||(ot={})),function(k){k.ChaseItemCorePrefix="CHASE_ITEM_CORE_",k.ChaseItemCoreQuantityPrefix="CHASE_ITEM_CORE_QUANTITY_",k.ChaseItemCoreTextPrefix="CHASE_ITEM_CORE_TEXT_",k.ChaseItemPlusPrefix="CHASE_ITEM_PLUS_",k.ChaseItemPlusQuantityPrefix="CHASE_ITEM_PLUS_QUANTITY_",k.ChaseItemPlusTextPrefix="CHASE_ITEM_PLUS_TEXT_",k.ChaseItemUltraPrefix="CHASE_ITEM_ULTRA_",k.ChaseItemUltraQuantityPrefix="CHASE_ITEM_ULTRA_QUANTITY_",k.ChaseItemUltraTextPrefix="CHASE_ITEM_ULTRA_TEXT_",k.IsPlayerCoreMember="BATTLE_PASS_UPSELL_IS_CORE",k.IsPlayerPlusMember="BATTLE_PASS_UPSELL_IS_PLUS",k.IsPlayerUltraMember="BATTLE_PASS_UPSELL_IS_ULTRA",k.ShowCoreCta="BATTLE_PASS_UPSELL_SHOW_CORE_CTA",k.ShowCorePanel="BATTLE_PASS_UPSELL_SHOW_CORE_PANEL",k.ShowPlusCta="BATTLE_PASS_UPSELL_SHOW_PLUS_CTA",k.ShowPlusPanel="BATTLE_PASS_UPSELL_SHOW_PLUS_PANEL",k.ShowUltraCta="BATTLE_PASS_UPSELL_SHOW_ULTRA_CTA"}(ht||(ht={})),function(k){k.ShouldShowMemberJar="DLC_SHOULD_SHOW_MEMBER_JAR",k.ThresholdPrizePackageFeatureKey="DLC_THRESHOLD_PRIZE_PACKAGE_FEATURE_KEY",k.ThresholdPrizeMembershipTier="DLC_THRESHOLD_PRIZE_MEMBERSHIP_TIER",k.UltimateTrackProgressBarFillData="DLC_ULTIMATE_TRACK_PROGRESS_BAR_FILL_DATA",k.UltimateTrackRewardAvailable="DLC_ULTIMATE_TRACK_REWARD_AVAILABLE",k.UltimateTrackRewardClaimed="DLC_ULTIMATE_TRACK_REWARD_CLAIMED",k.UltimateTrackRewardDisplayConfig="DLC_ULTIMATE_TRACK_REWARD_DISPLAY_CONFIG",k.UltimateTrackTimeRemaining="DLC_ULTIMATE_TRACK_TIME_REMAINING"}(ct||(ct={})),function(k){k.ExitButtonCallback="LOOT_DASH_EXIT_BUTTON_CALLBACK",k.FeatureItemCardAssetId="LOOT_DASH_FEATURED_ITEM_CARD_ASSET_ID",k.FeaturedItemCardAssetType="LOOT_DASH_FEATURED_ITEM_CARD_ASSET_TYPE",k.FeaturedItemCardItemName="LOOT_DASH_FEATURED_ITEM_CARD_ITEM_NAME",k.FeaturedItemCardLocked="LOOT_DASH_FEATURED_ITEM_CARD_LOCKED",k.FeaturedItemConfirmationModalHeaderText="LOOT_DASH_FEATURED_ITEM_CONFIRMATION_MODAL_HEADER_TEXT",k.FeaturedItemConfirmationModalBodyText="LOOT_DASH_FEATURED_ITEM_CONFIRMATION_MODAL_BODY_TEXT",k.FeaturedItemConfirmationModalYesButtonCallback="LOOT_DASH_FEATURED_ITEM_CONFIRMATION_MODAL_YES_BUTTON_CALLBACK",k.FeaturedItemConfirmationModalNoButtonCallback="LOOT_DASH_FEATURED_ITEM_CONFIRMATION_MODAL_NO_BUTTON_CALLBACK",k.MatchBoardPieceHeadTexture="LOOT_DASH_MATCH_BOARD_PIECE_HEAD_TEXTURE",k.MatchBoardPieceName="LOOT_DASH_MATCH_PIECE_NAME",k.MatchFinishedButtonCallback="LOOT_DASH_MATCH_FINISHED_BUTTON_CALLBACK",k.MatchFinishedFireworkAnimationName="LOOT_DASH_MATCH_FINISHED_FIREWORK_ANIMATION_NAME",k.MatchFinishedInfoText="LOOT_DASH_MATCH_FINISHED_INFO_TEXT",k.MatchFinishedLootBagAmountText="LOOT_DASH_MATCH_FINISHED_LOOT_BAG_AMOUNT_TEXT",k.MatchFinishedMatchCompleted="LOOT_DASH_MATCH_FINISHED_MATCH_COMPLETED",k.MatchFinishedPlacement="LOOT_DASH_MATCH_FINISHED_PLACEMENT",k.MatchFinishedPlacementSuffix="LOOT_DASH_MATCH_FINISHED_PLACEMENT_SUFFIX",k.MatchFinishedPlacementReplacementText="LOOT_DASH_MATCH_FINISHED_PLACEMENT_REPLACEMENT_TEXT",k.MatchFinishedRewardsEarned="LOOT_DASH_MATCH_FINISHED_REWARDS_EARNED",k.MatchFinishedShowNumberedPlacement="LOOT_DASH_MATCH_FINISHED_SHOW_NUMBERED_PLACEMENT",k.NoMoreRevivesBannerTextCore="LOOT_DASH_NO_MORE_REVIVES_BANNER_TEXT_CORE",k.NoMoreRevivesBannerTextPlus="LOOT_DASH_NO_MORE_REVIVES_BANNER_TEXT_PLUS",k.NoMoreRevivesBannerTextUltra="LOOT_DASH_NO_MORE_REVIVES_BANNER_TEXT_ULTRA",k.NoMoreRevivesReviveAmountTextCore="LOOT_DASH_NO_MORE_REVIVES_REVIVE_AMOUNT_TEXT_CORE",k.NoMoreRevivesReviveAmountTextPlusAndUltra="LOOT_DASH_NO_MORE_REVIVES_REVIVE_AMOUNT_TEXT_PLUS_AND_ULTRA",k.NoMoreRevivesShowCoreAndPlus="LOOT_DASH_NO_MORE_REVIVES_SHOW_CORE_AND_PLUS",k.NoMoreRevivesShowCoreAndUltra="LOOT_DASH_NO_MORE_REVIVES_SHOW_CORE_AND_ULTRA",k.NoMoreRevivesShowPlusOnly="LOOT_DASH_NO_MORE_REVIVES_SHOW_PLUS_ONLY",k.NoMoreRevivesShowUltraOnly="LOOT_DASH_NO_MORE_REVIVES_SHOW_ULTRA_ONLY",k.NoMoreRevivesLineOneText="LOOT_DASH_NO_MORE_REVIVES_LINE_ONE_TEXT",k.NoMoreRevivesLineTwoText="LOOT_DASH_NO_MORE_REVIVES_LINE_TWO_TEXT",k.StageCompleted="LOOT_DASH_STAGE_COMPLETED",k.StageCurrent="LOOT_DASH_STAGE_CURRENT",k.StageFuture="LOOT_DASH_STAGE_FUTURE",k.StageInfoWidgetActionProgress="LOOT_DASH_STAGE_INFO_WIDGET_ACTION_PROGRESS",k.StageInfoWidgetActionTitle="LOOT_DASH_STAGE_INFO_WIDGET_ACTION_TITLE",k.StageInfoWidgetCurrentStageIcon="LOOT_DASH_STAGE_INFO_WIDGET_CURRENT_STAGE_ICON",k.StageInfoWidgetNextStageIcon="LOOT_DASH_STAGE_INFO_WIDGET_NEXT_STAGE_ICON",k.StageInfoWidgetShowFinishLine="LOOT_DASH_STAGE_INFO_WIDGET_SHOW_FINISH_LINE",k.ShowStageIcon="LOOT_DASH_SHOW_STAGE_ICON",k.StageType="LOOT_DASH_STAGE_TYPE",k.StageHasMultiplePlayers="LOOT_DASH_STAGE_HAS_MULTIPLE_PLAYERS"}(dt||(dt={})),function(k){k.SegmentedOfferCurrentOfferStatus="SEGMENTED_OFFERS_CURRENT_OFFER_STATUS",k.SegmentedOffersEnding="SEGMENTED_OFFERS_ENDING",k.SegmentedOffersItemIcon="OFFER_ITEM_ICON_",k.SegmentedOffersItemId="OFFER_ITEM_ID_",k.SegmentedOffersItemName="OFFER_ITEM_NAME_",k.SegmentedOffersItemQuantity="OFFER_ITEM_QUANTITY_",k.SegmentedOffersRejected="SEGMENTED_OFFERS_REJECTED",k.SegmentedOffersTimeRemainingMS="SEGMENTED_OFFERS_TIME_REMAINING",k.SegmentedOffersFunnelAdvancedCTA="SEGMENTED_OFFERS_FUNNEL_ADVANCED_CTA",k.SegmentedOffersFunnelAdvancedGotMembership="SEGMENTED_OFFERS_FUNNEL_ADVANCED_GOT_MEMBERSHIP",k.SegmentedOffersModalInjectableProperties="SEGMENTED_OFFERS_MODAL_INJECTABLE_PROPERTIES"}(lt||(lt={})),function(k){k.ClassCodeSubmitSuccess="CLASS_CODE_SUBMIT_SUCCESS"}(ut||(ut={})),function(k){k.LoginDetailsUsername="LoginDetailsUsername",k.LoginDetailsPassword="LoginDetailsPassword"}(ft||(ft={})),function(k){k.CurrencyId="CURRENCY_ID",k.FallbackRewards="FALLBACK_REWARDS",k.InstanceType="INSTANCE_TYPE",k.WeightedRewards="WEIGHTED_REWARDS",k.RespinCost="RESPIN_COST"}(bt||(bt={})),function(k){k.CurrencyID="CURRENCY_DISPLAY_ID",k.CurrencyAmount="CURRENCY_DISPLAY_AMOUNT"}(pt||(pt={})),function(k){k.CanRerollOpponents="CAN_REROLL_OPPONENTS",k.HeaderTitle="HEADER_TITLE",k.MenuInterfaceName="MENU_INTERFACE_NAME",k.OnBack="ON_BACK",k.OnClose="ON_CLOSE",k.OpponentsRerollCost="OPPONENTS_REROLL_COST",k.RiftCurrencyId="RIFT_CURRENCY_ID",k.RiftKeyAmount="RIFT_KEY_AMOUNT",k.RiftKeyIcon="RIFT_KEY_ICON",k.ShowHeaderText="SHOW_HEADER_TEXT",k.ShowMagicoin="SHOW_MAGICOIN_COUNT",k.ShowMagicoinText="SHOW_MAGICOIN_TEXT",k.ShowRerollMagicoinCost="SHOW_REROLL_MC_COST",k.ShowRerollMemberIcon="SHOW_REROLL_MEMBER_ICON",k.ShowRiftKeys="SHOW_RIFT_KEYS",k.ShowTooltip="SHOW_TOOLTIP",k.StoreEnabled="STORE_ENABLED",k.StoreKey="STORE_KEY",k.BackgroundHex="BACKGROUND_HEX",k.DiamondsHex="DIAMONDS_HEX",k.DiamondsAlpha="DIAMONDS_ALPHA",k.GradientHex="GRADIENT_HEX"}(vt||(vt={})),function(k){k.OpenRiftsPortalCallback="OPEN_RIFTS_PORTAL_CALLBACK",k.SelectedRiftId="SELECTED_RIFT_ID"}(gt||(gt={})),function(k){k.Title="TITLE",k.Message="MESSAGE",k.CTAButtonEnabled="CTA_BUTTON_ENABLED",k.CTAButtonFunction="CTA_BUTTON_FUNCTION"}(mt||(mt={})),function(k){k.BodyText="DYNAMIC_STORE_BODY_TEXT",k.HeaderText="DYNAMIC_STORE_HEADER_TEXT",k.OfferData="DYNAMIC_STORE_OFFER_DATA",k.OfferReadById="DYNAMIC_STORE_OFFER_READ_BY_ID",k.ShowTimer="DYNAMIC_STORE_SHOW_TIMER",k.StoreKey="DYNAMIC_STORE_STORE_KEY"}(yt||(yt={})),function(k){k.ItemCardData="STORE_ITEM_CARD_DATA",k.ItemCardIsNew="STORE_ITEM_CARD_IS_NEW"}(_t||(_t={})),function(k){k.FunnelStartTrigger="VIDEO_FUNNEL_START_TRIGGER",k.SizeRatio="VIDEO_SIZE_RATIO",k.SupportedResolutionIds="VIDEO_SUPPORTED_RESOLUTION_IDS",k.VideoAtSchool="VIDEO_AT_SCHOOL",k.VideoCountdownEnabled="VIDEO_COUNTDOWN_ENABLED",k.VideoEventType="VIDEO_EVENT_TYPE",k.VideoId="VIDEO_ID",k.VideoInstanceType="VIDEO_INSTANCE_TYPE",k.VideoMember="VIDEO_MEMBER"}(Et||(Et={})),function(k){k.FollowupPrefabCloseSignal="FOLLOWUP_PREFAB_CLOSE_SIGNAL",k.HomeImageGuid="HOME_IMAGE_GUID",k.MemberFollowupPrefabGuid="MEMBER_FOLLOWUP_PREFAB_GUID",k.MemberImageGuid="MEMBER_IMAGE_GUID",k.OriginId="ORIGIN_ID",k.SchoolImageGuid="SCHOOL_IMAGE_GUID",k.TargetMapTag="TARGET_MAP_TAG",k.TargetPosition="TARGET_POSITION"}(wt||(wt={})),function(k){k.FtueMainCostumeId="MAIN_COSTUME_ID",k.FtueMainCostumeName="MAIN_COSTUME_NAME",k.FtueAdditionalCostumes="ADDITIONAL_COSTUMES",k.FtuePopupNextButtonCallback="FTUE_POPUP_NEXT_BUTTON_CALLBACK"}(Tt||(Tt={}))},88217:(k,B,U)=>{"use strict";U.d(B,{B:()=>V});var F=U(8674),G=U(62459),j=U(15821),$=U(11647),H=U(61917);let V=class extends((0,$.o)(H.d)){constructor(){super(...arguments),this._depth=100}get transform(){var k;return j.A.isDefined(this._transform)||(this._transform=null!==(k=this.gameObject.findComponent(G.XVE))&&void 0!==k?k:this.gameObject.addComponent(G.XVE)),this._transform}setContentsOffset(k){this.gameObject.children.forEach((B=>{B.transform.setPositionY(k)}))}destroy(){this.gameObject.children.forEach((k=>{k.transform.setPositionY(0)})),super.destroy()}};(0,F.Cg)([(0,G.Pqz)(G.XVE),(0,F.Sn)("design:type",G.XVE)],V.prototype,"_transform",void 0),V=(0,F.Cg)([(0,G.EVk)("StickyScrollItem")],V)},47878:(k,B,U)=>{"use strict";U.d(B,{p:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{};(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],H.prototype,"leaderboardsButton",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],H.prototype,"battleRequestsButton",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],H.prototype,"awardsButton",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],H.prototype,"badgesButton",void 0),H=(0,F.Cg)([(0,G.EVk)("SocialMenuHeader",$.Y.ui)],H)},28832:(k,B,U)=>{"use strict";U.d(B,{O5:()=>z});var F,G=U(8674),j=U(62459),$=U(35120),H=U(91207),V=U(77938),W=U(10674),q=U(28152);!function(k){k.Weapon="weapon",k.Hat="hat",k.Outfit="outfit",k.Relic="spellRelic",k.Boots="boots",k.Mount="mount",k.Buddy="follow",k.PetHat="petHat",k.PetRelic="petRelic"}(F||(F={}));const K={[F.Weapon]:"948ea863-fc01-4492-bba4-6c4c918bf334",[F.Hat]:"138d6852-a1e1-42c5-9457-bdef12678314",[F.Outfit]:"adfa2804-c0df-4158-8ea8-bf69d1715b6d",[F.Relic]:"c6a5ccbb-7c55-49ba-bf5c-eeec195008d9",[F.Boots]:"0b178835-e2fc-432a-9728-b6fbfea6091e",[F.Mount]:"09344c5c-9c34-421b-842c-ad3d02861879",[F.Buddy]:"82322c96-1611-479f-abb5-9bf8e7d3b65e",[F.PetHat]:"8adc1ca8-607e-43fe-98a3-e2d0a6137e3c",[F.PetRelic]:"b8caf254-84cc-4c09-8e19-6064377ca580"};let z=class extends j.uAl{constructor(){super(...arguments),this._rarityBackgrounds=[]}postCreate(){super.postCreate(),this._activeRarityBackground=this._unequippedBackground}setupPlayerGear(k){this._activeRarityBackground.active=!1;const B=k.getEquipment(this._equipmentType);B?V.t.secureGetItem(this._equipmentType,B).then((k=>{var B;this._activeRarityBackground=this._rarityBackgrounds[null!==(B=k.data.rarity)&&void 0!==B?B:0],this._activeRarityBackground.active=!0;const U=H.E.getIconForType(k.type,k.ID);this.loadGearIcon(U)})).catch(j.RQr.createHandler(`Error fetching item for equipment type ${this._equipmentType} with ID ${B}:`)):this.setupUnequippedItem()}setupPetGear(k){var B,U;this._activeRarityBackground.active=!1;const G=this._equipmentType===F.PetHat?null!==(B=null==k?void 0:k.petHat)&&void 0!==B?B:null:null!==(U=null==k?void 0:k.petRelic)&&void 0!==U?U:null;G?this._gearManager.getPetGearByUniqueId(G).then((k=>{V.t.secureGetItem(k.data.asset.type,k.data.asset.id).then((k=>{var B;this._rarityBackgrounds[null!==(B=k.data.rarity)&&void 0!==B?B:0].active=!0;const U=H.E.getIconForType(k.type,k.ID);this.loadGearIcon(U)})).catch(j.RQr.createHandler(`Error fetching item for equipment type ${this._equipmentType} with ID ${k.data.asset.id}:`))})).catch(j.RQr.createHandler(`Error fetching pet gear item for type ${this._equipmentType} with ID ${G}:`)):this.setupUnequippedItem()}setupUnequippedItem(){return(0,G.sH)(this,void 0,void 0,(function*(){this._rarityBackgrounds.forEach((k=>{k.active=!1})),this._activeRarityBackground=this._unequippedBackground,this._activeRarityBackground.active=!0,yield this.loadGearIcon(K[this._equipmentType])}))}loadGearIcon(k){return(0,G.sH)(this,void 0,void 0,(function*(){return $.q.instance.prodigy.gameContainer.get(j.t5G.AssetLoader).loadAssets([k]).then((()=>{this._gearIcon.updateAsset(k)}))}))}};(0,G.Cg)([(0,j.gfw)(F),(0,G.Sn)("design:type",String)],z.prototype,"_equipmentType",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],z.prototype,"_rarityBackgrounds",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],z.prototype,"_unequippedBackground",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],z.prototype,"_gearIcon",void 0),(0,G.Cg)([(0,j.Cdj)("d69-defe"),(0,G.Sn)("design:type",W.q)],z.prototype,"_gearManager",void 0),z=(0,G.Cg)([(0,j.EVk)("GearSlot",q.Y.uiPetMenu)],z)},29853:(k,B,U)=>{"use strict";U.d(B,{J:()=>J});var F=U(8674),G=U(62459),j=U(21574),$=U(17446),H=U(77938),V=U(28152),W=U(22023),q=U(80060),K=U(30226),z=U(53661),Y=U(53671),Q=U(11647),X=U(28832),Z=U(52211);let J=class extends((0,Q.o)(Z.V)){constructor(){super(...arguments),this._gearSlots=[],this.onPetInfoClicked=this.createTidySignal()}setupCard(){var k,B,U;const F=W.P8.canPlayerAccessPetMergeFeature(this._activePlayer),G=W.P8.canPetAccessMergeRanks(this.petData.ID);if(this._mergeBar.GameObject.active=F&&G,this._mergeUnlockText.GameObject.active=!F&&G,G)if(F)this._mergeBar.setup(this.petData,!0);else{const B=null!==(k=j.g.config.minimumPlayerLevel)&&void 0!==k?k:0;this._mergeUnlockText.text=this._localizer.getText("PET_BOOK_UNLOCK_MERGE",B)}const V=H.t.getItem("pet",this.petData.ID),Y=null!==(U=null===(B=V.data)||void 0===B?void 0:B.rarity)&&void 0!==U?U:$.E.Common;this.updateGearSlots(V),q.d.updateInjectedValues(this.gameObject,{[z.R$.PetRarityText]:K.J.convertRarityToText(Y),[z.R$.PetRarity]:Y})}updateCard(){this.petData&&this._mergeBar.setup(this.petData,!0),this.updateCardCreature()}updateCardCreature(){var k,B;if(super.updateCardCreature(),this.setCardToDefaultState(),this.petData){const U=H.t.getItem("pet",this.petData.ID),F=null!==(B=null===(k=U.data)||void 0===k?void 0:k.rarity)&&void 0!==B?B:$.E.Common;q.d.updateInjectedValues(this.gameObject,{[z.R$.PetRarityText]:K.J.convertRarityToText(F),[z.R$.PetRarity]:F}),this.updateGearSlots(U)}}updateGearSlots(k){var B;const U=(null===(B=k.data.gearEquipSlots)||void 0===B?void 0:B.length)>0;this._gearContainer.active=U,U&&this._gearSlots.forEach((k=>{k.setupPetGear(this.petData.gear)}))}onCardClicked(){this.onPetCardClicked.dispatch(this)}setCardToDefaultState(){this._petSelectionContainer.active=!1,this._emptyCardContainer.active=!this.hasData(),this._cardContainer.active=this.hasData(),this._inputButton.inputEnabled=!0,this._infoButton.active=this.hasData()}setCardToSelectionState(k,B,U=!1){if(this._inputButton.inputEnabled=!0,U)this._selectionText.text=this._localizer.getText("PET_BOOK_CLICK_TO_ADD"),this._petSelectionContainer.active=!0,this._removeButton.active=!1;else if(k)this._removeButton.active=this.hasData(),this._petSelectionContainer.active=!0,this._selectionText.text=this._localizer.getText("PET_BOOK_CHOOSE_PET"),this._infoButton.active=this.hasData();else{if(!B||!this.hasData())return void(this._inputButton.inputEnabled=!1);this._selectionText.text=this._localizer.getText("PET_BOOK_SWAP"),this._petSelectionContainer.active=!0,this._removeButton.active=!1}}onInfoButtonClicked(){const k=H.t.getItem("pet",this.petData.ID);this.onPetInfoClicked.dispatch(k,this.petData)}setName(){const k=H.t.getItem("pet",this.petData.ID);this._nameText.text=W.P8.getPetDisplayName(k,this.petData,15)}setLevel(){const k=W.P8.getPetLevel(this.petData);this._levelText.text=k.toString()}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_emptyCardContainer",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_cardContainer",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_petSelectionContainer",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],J.prototype,"_selectionText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],J.prototype,"_mergeUnlockText",void 0),(0,F.Cg)([(0,G.MnK)(Y.J),(0,F.Sn)("design:type",Y.J)],J.prototype,"_mergeBar",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(X.O5),(0,F.Sn)("design:type",Array)],J.prototype,"_gearSlots",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_removeButton",void 0),(0,F.Cg)([(0,G.Cdj)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],J.prototype,"_localizer",void 0),(0,F.Cg)([(0,G.MnK)(G.Eci),(0,F.Sn)("design:type",G.Eci)],J.prototype,"_inputButton",void 0),J=(0,F.Cg)([(0,G.EVk)("PetTeamCard",V.Y.uiPetMenu)],J)},5679:(k,B,U)=>{"use strict";U.d(B,{t:()=>Z});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(15485),V=U(41674),W=U(67665),q=U(13956),K=U(47734),z=U(94325),Y=U(11647),Q=U(28832),X=U(52211);let Z=class extends((0,Y.o)(X.V)){setupCard(){this._gearContainer.findComponentsInChildren(Q.O5).forEach((k=>{k.setupPlayerGear(this._activePlayer.equipment)})),this._activePlayer.onEquipmentChange.add(this.updateCard,this)}updateCard(){this._gearContainer.findComponentsInChildren(Q.O5).forEach((k=>{k.setupPlayerGear(this._activePlayer.equipment)})),this._playerSpineAppearanceSelector.loadPlayerAppearance()}onCardClicked(){super.onCardClicked();const k=j.q.instance.prodigy.open.backpack();k&&this._inventoryScrollView&&(this._inventoryScrollView.lockScrollWheel=!0,this._inventoryScrollView.contentDraggingEnabled=!1,k.onDestroy.add((()=>{this._inventoryScrollView.lockScrollWheel=!1,this._inventoryScrollView.contentDraggingEnabled=!0}),this)),this._segment.featureCommon.sendButtonEvent({buttonName:H.k.WizardBackpackButton,interfaceName:"wizard_backpack_window",interfaceType:V.Wm.Menu,destinationName:"wizard_backpack_window"})}destroy(){this._activePlayer.onEquipmentChange.remove(this.updateCard,this)}setName(){var k;this._nameText.text=null===(k=this._activePlayer)||void 0===k?void 0:k.getName()}setLevel(){const k=this._activePlayer.getLevel()+this._activePlayer.getChargedLevel();this._levelText.text=k.toString()}};(0,F.Cg)([(0,G.MnK)(K.z),(0,F.Sn)("design:type",K.z)],Z.prototype,"_playerSpineAppearanceSelector",void 0),(0,F.Cg)([(0,G.MnK)(z.C),(0,F.Sn)("design:type",z.C)],Z.prototype,"_inventoryScrollView",void 0),(0,F.Cg)([(0,q.b)("c47-20b6"),(0,F.Sn)("design:type",W.Y)],Z.prototype,"_segment",void 0),Z=(0,F.Cg)([(0,G.EVk)("PlayerTeamCard",$.Y.uiPetMenu)],Z)},52211:(k,B,U)=>{"use strict";U.d(B,{V:()=>Y});var F=U(8674),G=U(62459),j=U(37773),$=U(65732),H=U(97317),V=U(13956),W=U(96535),q=U(80060),K=U(11647),z=U(53661);class Y extends((0,K.o)(G.uAl)){constructor(){super(...arguments),this.onPetCardClicked=this.createTidySignal(),this.onPetRemoved=this.createTidySignal(),this._petData=null,this._cardPosition=-1}get petData(){return this._petData}get cardPosition(){return this._cardPosition}setup(k){this._kennel=this._activePlayer.kennel,this._cardPosition=k,this.updateCardCreature()}updateCardCreature(){const k=this._kennel.getTeamPosition(this._cardPosition);if(!!!k){this._petData=null;const k={[z.hi.PetCreatureData]:this.petData,[z.R$.TeamCardId]:null,[z.R$.TeamCardPetGear]:null};return void q.d.updateInjectedValues(this.gameObject,k)}const B={},U=this.getInjectedValue(z.R$.TeamCardId),F=G.Aq$.isDefined(this._petData)&&this._petData.uniqueID===k.data.uniqueID&&U!==k.getID();if(this.petData&&this._petData.uniqueID===k.data.uniqueID&&!F||(this._petData=k.data,this.setupCard(),B[z.R$.TeamCardId]=this.petData.ID),this.setName(),this.setLevel(),B[z.hi.PetCreatureData]=this.petData,B[z.R$.TeamCardPetGear]=this.petData.gear,G.Aq$.isDefined(this.petData.team)){const k=this._activePlayer.getChargedLevel();B[$.E.ChargedCreatureEffectTier]=j.e.getChargedLevelTierFromLevel(k),B[$.E.ChargedCreatureEffectDisplayType]=k>0?H.X$.IDLE:H.X$.HIDDEN}q.d.updateInjectedValues(this.gameObject,B)}hasData(){return!!this.petData}onRemoveButtonClicked(){this.onPetRemoved.dispatch(this.petData,this.cardPosition)}destroy(){this.onPetRemoved.dispose(),this.onPetCardClicked.dispose()}onCardClicked(){this.onPetCardClicked.dispatch(this)}}(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Y.prototype,"_gearContainer",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],Y.prototype,"_nameText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],Y.prototype,"_levelText",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Y.prototype,"_infoButton",void 0),(0,F.Cg)([(0,V.b)("306-5359"),(0,F.Sn)("design:type",W.W)],Y.prototype,"_activePlayer",void 0)},53671:(k,B,U)=>{"use strict";U.d(B,{J:()=>K});var F=U(8674),G=U(62459),j=U(79998),$=U(37016),H=U(15821),V=U(12472),W=U(37468),q=U(29834);let K=class extends G.uAl{constructor(){super(...arguments),this._showBadge=!0,this._animateFill=!1,this._animationDelay=0,this._requiredIngredientsCount=0,this._validPetIngredientCount=0}get isFull(){return this._validPetIngredientCount>=this._requiredIngredientsCount}create(){super.create(),this.mergeRankBadgeGraphic.Active=this._showBadge}setup(k,B,U=!1){var F;const G=null!==(F=k.mergeRank)&&void 0!==F?F:$.qd.MIN;this.mergeRankBadgeText.text=B?G.toString():"0",this.progressBar.GameObject.active=B,this._barGlow.GameObject.active=B,B?(this.progressBar.showBarText(),this.setProgressBarProperties(G,k,U)):this.progressBar.hideBarText()}setProgressBarProperties(k,B,U=!1){const F=k>=$.qd.MAX;if(F)return this._barFill.updateAsset(j.u.Merge_bar_max),this.progressBar.setFromValues(1,1,this._animateFill,this._animationDelay),this.progressBar.progressBar.GameObject.active=!0,void(this._barGlow.GameObject.active=!1);let G={requiredIngredientsCount:0,validPetIngredientCount:0,mergeRecipe:void 0};F||(G=V.r.getMergeIngredientInfo(B),H.A.isDefined(G))?(this._requiredIngredientsCount=G.requiredIngredientsCount,this._validPetIngredientCount=U?this._requiredIngredientsCount:G.validPetIngredientCount,this.progressBar.progressBar.GameObject.active=!this.isFull,this._barGlow.GameObject.active=this.isFull,this._barFill.updateAsset(this.isFull?j.u.Merge_bar_full:j.u.Merge_bar_progress),this.progressBar.setFromValues(this._validPetIngredientCount,this._requiredIngredientsCount,!this.isFull&&this._animateFill,this.isFull?0:this._animationDelay),this.progressBar.setBarText(`${this._validPetIngredientCount} / ${this._requiredIngredientsCount}`)):this.progressBar.GameObject.active=!1}};(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],K.prototype,"mergeRankBadgeText",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],K.prototype,"mergeRankBadgeGraphic",void 0),(0,F.Cg)([(0,G.MnK)(W.z),(0,F.Sn)("design:type",W.z)],K.prototype,"progressBar",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],K.prototype,"_barFill",void 0),(0,F.Cg)([(0,G.MnK)(q.j),(0,F.Sn)("design:type",q.j)],K.prototype,"_barGlow",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],K.prototype,"_showBadge",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],K.prototype,"_animateFill",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],K.prototype,"_animationDelay",void 0),K=(0,F.Cg)([(0,G.EVk)("MergeBar")],K)},63086:(k,B,U)=>{"use strict";U.d(B,{Zb:()=>G});var F,G,j=U(8674),$=U(62459),H=U(28152),V=U(80060);!function(k){k.AlphaContainerEnable="ALPHA_CONTAINER_ENABLE",k.AlphaFilterEnable="ALPHA_FILTER_ENABLE"}(F||(F={})),function(k){k.Container="Container",k.Filter="Filter"}(G||(G={}));let W=class extends $.uAl{constructor(){super(...arguments),this.alphaMode=G.Container,this.alphaEnabledValue=.35}create(){super.create(),$.Aq$.isDefined(this._injectionTarget)||(this._injectionTarget=this.gameObject),Object.values(G).forEach((k=>{var B;this.setUpAlphaFunctions(k),null===(B=this._enableAlphaFunction)||void 0===B||B.call(this,!1)})),this.setUpAlphaFunctions(this.alphaMode)}setAlphaMode(k){var B;this.alphaMode=k,null===(B=this._enableAlphaFunction)||void 0===B||B.call(this,!1),this.setUpAlphaFunctions(this.alphaMode),this.enableAlpha(this.alphaEnabled)}enableAlpha(k){var B;this.alphaEnabled=k,null===(B=this._enableAlphaFunction)||void 0===B||B.call(this,this.alphaEnabled)}setUpAlphaFunctions(k){switch(k){case G.Container:this._enableAlphaFunction=this.enableContainerAlpha;break;case G.Filter:this._enableAlphaFunction=this.enableFilterAlpha;break;default:$.VyI.log("Invalid Alpha Mode Selected",$.$bb.Error)}}enableContainerAlpha(k){V.d.updateInjectedValues(this._injectionTarget,{[F.AlphaContainerEnable]:k?this.alphaEnabledValue:1})}enableFilterAlpha(k){V.d.updateInjectedValues(this._injectionTarget,{[F.AlphaFilterEnable]:k?this.alphaEnabledValue:1})}};(0,j.Cg)([(0,$.ERr)(),(0,j.Sn)("design:type",$._mx)],W.prototype,"_injectionTarget",void 0),(0,j.Cg)([(0,$.gfw)(G),(0,j.Sn)("design:type",String)],W.prototype,"alphaMode",void 0),(0,j.Cg)([(0,$.vkK)(),(0,j.Sn)("design:type",Boolean)],W.prototype,"alphaEnabled",void 0),(0,j.Cg)([(0,$.g11)(),(0,j.Sn)("design:type",Number)],W.prototype,"alphaEnabledValue",void 0),W=(0,j.Cg)([(0,$.EVk)("PetCardAlphaMode",H.Y.uiPetMenu)],W)},8763:(k,B,U)=>{"use strict";U.d(B,{j:()=>z});var F=U(58182),G=U(17446),j=U(15821),$=U(30226),H=U(77938),V=U(76277),W=U(22023),q=U(53661),K=U(63086);class z{static GetOwnedPetCardInjectionValues(k,B,U,z,Y){var Q,X,Z,J;const tt=H.t.getItem("pet",k.ID),et=null!==(X=null===(Q=tt.data)||void 0===Q?void 0:Q.rarity)&&void 0!==X?X:G.E.Common,it=W.P8.getUpgradeSuggestion(k),st=(null===(Z=tt.data.gearEquipSlots)||void 0===Z?void 0:Z.length)>0,nt=j.A.isDefined(k.team),at=U&&z&&!nt,rt=!U||U&&z&&!nt,ot=(0,V.G)(F.N)&&(null!==(J=k.evolutionCount)&&void 0!==J?J:0)>0;return{[q.ML.PetData]:[k,!0],[q.ML.PetID]:tt.ID,[q.ML.ShowLevelIcon]:!0,[q.ML.Level]:k.level,[q.ML.ShowOnTeam]:nt,[q.ML.ShowEvolve]:it===W.Tc.ShowEvolve&&!ot,[q.ML.ShowUpgrade]:it===W.Tc.ShowUpgrade,[q.ML.ShowStaticEvolve]:it===W.Tc.ShowStaticEvolve&&!ot,[q.ML.Name]:W.P8.getPetDisplayName(tt,k),[q.ML.ShowElementIcon]:!0,[q.ML.ShowMergeBar]:W.P8.canPetAccessMergeRanks(k.ID)&&Y,[q.ML.PetRarity]:et,[q.ML.PetRarityBackground]:et,[q.ML.ShowPetGear]:st,[q.ML.ShowRarityBackground]:!0,[q.ML.ShowUnknownBackground]:!1,[q.ML.IconTint]:16777215,[q.ML.InputEnabled]:rt,[q.ML.ShowNotificationBadge]:!1,[q.ML.ShowNotificationText]:!1,[q.ML.ShowTreasureTrackBadge]:!1,[q.ML.WhiteOverlay]:!1,[q.ML.AlphaMode]:K.Zb.Filter,[q.ML.OnClick]:()=>B(tt,k),[q.ML.ShowSelectionAvailableOutline]:at,[q.ML.PetRarityText]:$.J.convertRarityToText(et),[q.ML.ShowPetRarity]:!0,[q.ML.ApplyColorFilter]:!!U&&nt,[q.ML.ApplyGreyScale]:!1}}static GetSeenPetCardInjectionValues(k,B,U,F=!1){var j,V,W;const K=H.t.getItem("pet",k),z=null!==(V=null===(j=K.data)||void 0===j?void 0:j.rarity)&&void 0!==V?V:G.E.Common,Y=!U;return{[q.ML.PetID]:[K.ID,!0],[q.ML.ShowPetGear]:!1,[q.ML.ShowMergeBar]:!1,[q.ML.ShowLevelIcon]:!1,[q.ML.ShowOnTeam]:!1,[q.ML.ShowEvolve]:!1,[q.ML.ShowUpgrade]:!1,[q.ML.ShowStaticEvolve]:!1,[q.ML.Name]:null===(W=K.data)||void 0===W?void 0:W.name,[q.ML.PetRarity]:-1,[q.ML.PetRarityBackground]:z,[q.ML.ApplyGreyScale]:!0,[q.ML.ShowRarityBackground]:!0,[q.ML.ShowElementIcon]:!0,[q.ML.ShowUnknownBackground]:!1,[q.ML.IconTint]:14540253,[q.ML.InputEnabled]:Y,[q.ML.ShowNotificationBadge]:!1,[q.ML.ShowNotificationText]:!1,[q.ML.ShowTreasureTrackBadge]:F,[q.ML.WhiteOverlay]:!0,[q.ML.OnClick]:()=>B(K,void 0),[q.ML.ShowSelectionAvailableOutline]:!1,[q.ML.PetRarityText]:$.J.convertRarityToText(z),[q.ML.ShowPetRarity]:!0}}static GetUnknownPetCardInjectionValues(k,B,U){var F,j;const $=H.t.getItem("pet",k),V=null!==(j=null===(F=$.data)||void 0===F?void 0:F.rarity)&&void 0!==j?j:G.E.Common;return{[q.ML.PetID]:$.ID,[q.ML.ShowPetGear]:!1,[q.ML.ShowMergeBar]:!1,[q.ML.ShowLevelIcon]:!1,[q.ML.ShowOnTeam]:!1,[q.ML.ShowEvolve]:!1,[q.ML.ShowUpgrade]:!1,[q.ML.ShowStaticEvolve]:!1,[q.ML.Name]:"???",[q.ML.PetRarity]:V,[q.ML.ShowElementIcon]:!1,[q.ML.ApplyGreyScale]:!1,[q.ML.ShowRarityBackground]:!1,[q.ML.ShowUnknownBackground]:!0,[q.ML.IconTint]:0,[q.ML.InputEnabled]:!1,[q.ML.ShowNotificationBadge]:!1,[q.ML.ShowNotificationText]:!1,[q.ML.ShowTreasureTrackBadge]:!1,[q.ML.WhiteOverlay]:!1,[q.ML.AlphaMode]:K.Zb.Container,[q.ML.ShowSelectionAvailableOutline]:!1,[q.ML.ShowPetRarity]:!1,[q.ML.OnClick]:()=>B($,void 0)}}}},63546:(k,B,U)=>{"use strict";U.d(B,{$:()=>H});var F=U(8674),G=U(62459),j=U(67665),$=U(13956);class H{constructor(k){this._stateMachine=k}enter(k){return(0,F.sH)(this,void 0,void 0,(function*(){}))}exit(){return(0,F.sH)(this,void 0,void 0,(function*(){}))}}(0,F.Cg)([(0,$.b)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],H.prototype,"_prefabLoader",void 0),(0,F.Cg)([(0,$.b)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],H.prototype,"_localizer",void 0),(0,F.Cg)([(0,$.b)("c47-20b6"),(0,F.Sn)("design:type",j.Y)],H.prototype,"_segment",void 0)},54865:(k,B,U)=>{"use strict";U.d(B,{w:()=>G});var F=U(8674);class G{constructor(k){this.currentState=new k(this)}start(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.currentState.enter()}))}stop(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.currentState.exit()}))}goToState(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U;yield null===(U=this.currentState)||void 0===U?void 0:U.exit(),this.currentState=new k(this),yield this.currentState.enter(B)}))}}},48842:(k,B,U)=>{"use strict";U.d(B,{J8:()=>at,SB:()=>G});var F,G,j,$=U(8674),H=U(87490),V=U(62459),W=U(113),q=U(88022),K=U(35120),z=U(49237),Y=U(95946),Q=U(28152),X=U(11624),Z=U(34603),J=U(93991),tt=U(15485),et=U(41674),it=U(26932),st=U(16043),nt=U(97518);!function(k){k[k.InZone=0]="InZone",k[k.WorldMap=1]="WorldMap",k[k.TrackingNPC=2]="TrackingNPC",k[k.TrackingMythic=3]="TrackingMythic"}(G||(G={})),function(k){k.FireFly="0x00914a",k.Shiverchill="0x0086eb",k.Skywatch="0x976cd1",k.Bonfire="0xd93525",k.Shipwreck="0x009fa2"}(j||(j={}));let at=F=class extends it.z{postCreate(){super.postCreate(),this._config=F.ZONE_TYPE_CONFIGURATION_MAPPING[this._zoneId],this.updateValue("PET_ZONE_TAG",this._config.zoneTag),this.configureBanner(),this.configureButtons(),this.setPetRescuedCount(),this.setMinMaxEnemyLevels()}configureBanner(){this.setContainerText(this._bannerContainer,this._config.zoneName),this.setTintColor(this._bannerContainer,this._config.hexCode)}configureButtons(){this._inZoneFooter.active=this._zoneMenuState===G.InZone,this._inWorldMapFooter.active=!this._inZoneFooter.active,this._leftButton.active=this._zoneMenuState===G.WorldMap&&!!this._onTitanClick,this._rightButton.active=this._zoneMenuState===G.WorldMap&&!!this._onDungeonClick,this._middleButton.active=this._zoneMenuState===G.WorldMap,this._trackingButton.active=this._zoneMenuState===G.TrackingMythic||this._zoneMenuState===G.TrackingNPC,this.setContainerSignal(this._leftButton,this._onTitanClick),this.setContainerSignal(this._rightButton,this._onDungeonClick),this.setContainerSignal(this._middleButton,this._onPlayClick),this.setContainerSignal(this._trackingButton,this._onPlayClick);const[k,B]=this._zoneMenuState===G.TrackingNPC?["UI_ZONE_GO_TRADE","icon-npc-loc-assembled"]:["UI_ZONE_TRACK_MYTHIC","icon-epics-loc-assembled"];this.setContainerText(this._trackingButton,k),this.setContainerIcons(this._trackingButton,q._.Ui_raster_epicsv2_json,B),this.setContainerIcons(this._middleButton,q._.Ui_raster_pet_zone_menu_json,`button-npc-${this._config.zoneTag}`)}setContainerIcons(k,B,U){k.findComponentsInChildren(Z._).forEach((k=>{k.setAsset(B,U).then((()=>{k.sizeToSourceImage()})).catch(V.RQr.createHandler(`[ZoneMenuConfigurationComponent] Error loading the image: ${U}`))}))}setContainerText(k,B){k.findComponentsInChildren(nt.R).forEach((k=>{k.setLocalizationKey(B)}))}setContainerSignal(k,B){B&&k.findComponentInChildren(z.$).onEnabledClick.add(B)}setTintColor(k,B){const U=k.findComponentInChildren(J.w);U.hexTintColor=B,U.enableTint()}setPetRescuedCount(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=this._petIdsInZone.filter((B=>k.encounters.getPetTimesRescued(B)>0)).length;this._rescuedText.setTextArguments(B,this._petIdsInZone.length)}setMinMaxEnemyLevels(){this._minMaxText.setTextArguments(this._enemyMinMaxLevel.minLevel,this._enemyMinMaxLevel.maxLevel)}clearNewlyRescuedPets(){if(this._zoneMenuState===G.InZone){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.newPetRescueData.clearNewestRescuesByAmount(F.PET_CARDS_PER_PAGE,K.q.instance.prodigy.world.getCurrentZone()),k.forceSaveCharacter()}}sendPageViewedEvent(){this._config&&this._segment.featureCommon.sendPetBookViewedEvent({bookName:this._zoneMenuState===G.InZone?`zone_pet_menu_${this._config.zoneTag}`:`zone_entry_popup_${this._config.zoneTag}`,bookPage:this.gameObject.findComponentInChildren(st.a).currentPage,interfaceType:et.Wm.Modal})}sendCloseEvent(){this._config&&this._segment.featureCommon.sendButtonEvent({buttonName:tt.k.X,interfaceName:this._zoneMenuState===G.InZone?`zone_pet_menu_${this._config.zoneTag}`:`zone_entry_popup_${this._config.zoneTag}`,interfaceType:et.Wm.Modal})}};at.PET_CARDS_PER_PAGE=15,at.ZONE_TYPE_CONFIGURATION_MAPPING={[X.P.Firefly]:{zoneName:"UI_ZONE_FIREFLY_FOREST_CAPITAL",zoneTag:W.O.Firefly,elementAsset:H.ELegacyElementType.Earth,hexCode:j.FireFly},[X.P.Shiverchill]:{zoneName:"UI_ZONE_SHIVERCHILL_MOUNTAINS_CAPITAL",zoneTag:W.O.Shiverchill,elementAsset:Y.a.Ice,hexCode:j.Shiverchill},[X.P.Skywatch]:{zoneName:"UI_ZONE_SKYWATCH_CAPITAL",zoneTag:W.O.Skywatch,elementAsset:Y.a.Storm,hexCode:j.Skywatch},[X.P.Bonfire]:{zoneName:"UI_ZONE_BONFIRE_SPIRE_CAPITAL",zoneTag:W.O.Bonfire,elementAsset:Y.a.Fire,hexCode:j.Bonfire},[X.P.Shipwreck]:{zoneName:"UI_ZONE_SHIPWRECK_SHORE_CAPITAL",zoneTag:W.O.Shipwreck,elementAsset:Y.a.Water,hexCode:j.Shipwreck},[X.P.FireflyHard]:{zoneName:"UI_ZONE_FIREFLY_FOREST_CAPITAL",zoneTag:W.O.Firefly,elementAsset:H.ELegacyElementType.Earth,hexCode:j.FireFly},[X.P.ShiverchillHard]:{zoneName:"UI_ZONE_SHIVERCHILL_MOUNTAINS_CAPITAL",zoneTag:W.O.Shiverchill,elementAsset:Y.a.Ice,hexCode:j.Shiverchill},[X.P.SkywatchHard]:{zoneName:"UI_ZONE_SKYWATCH_CAPITAL",zoneTag:W.O.Skywatch,elementAsset:Y.a.Storm,hexCode:j.Skywatch},[X.P.BonfireHard]:{zoneName:"UI_ZONE_BONFIRE_SPIRE_CAPITAL",zoneTag:W.O.Bonfire,elementAsset:Y.a.Fire,hexCode:j.Bonfire},[X.P.ShipwreckHard]:{zoneName:"UI_ZONE_SHIPWRECK_SHORE_CAPITAL",zoneTag:W.O.Shipwreck,elementAsset:Y.a.Water,hexCode:j.Shipwreck}},(0,$.Cg)([(0,V.Cdj)("PET_ZONE_ID"),(0,$.Sn)("design:type",Number)],at.prototype,"_zoneId",void 0),(0,$.Cg)([(0,V.Cdj)("PET_ZONE_MENU_STATE"),(0,$.Sn)("design:type",Number)],at.prototype,"_zoneMenuState",void 0),(0,$.Cg)([(0,V.Cdj)("PET_ZONE_PLAY_BUTTON"),(0,$.Sn)("design:type",Function)],at.prototype,"_onPlayClick",void 0),(0,$.Cg)([(0,V.Cdj)("PET_ZONE_TITAN_BUTTON"),(0,$.Sn)("design:type",Function)],at.prototype,"_onTitanClick",void 0),(0,$.Cg)([(0,V.Cdj)("PET_ZONE_DUNGEON_BUTTON"),(0,$.Sn)("design:type",Function)],at.prototype,"_onDungeonClick",void 0),(0,$.Cg)([(0,V.Cdj)("GRID_VIEW_DATA"),(0,$.Sn)("design:type",Array)],at.prototype,"_petIdsInZone",void 0),(0,$.Cg)([(0,V.Cdj)("PET_ZONE_ENEMY_MIN_MAX_LEVEL"),(0,$.Sn)("design:type",Object)],at.prototype,"_enemyMinMaxLevel",void 0),(0,$.Cg)([(0,V.Cdj)("c47-20b6"),(0,$.Sn)("design:type",Function)],at.prototype,"_segment",void 0),(0,$.Cg)([(0,V.ERr)(),(0,$.Sn)("design:type",V._mx)],at.prototype,"_bannerContainer",void 0),(0,$.Cg)([(0,V.ERr)(),(0,$.Sn)("design:type",V._mx)],at.prototype,"_inZoneFooter",void 0),(0,$.Cg)([(0,V.ERr)(),(0,$.Sn)("design:type",V._mx)],at.prototype,"_inWorldMapFooter",void 0),(0,$.Cg)([(0,V.ERr)(),(0,$.Sn)("design:type",V._mx)],at.prototype,"_leftButton",void 0),(0,$.Cg)([(0,V.ERr)(),(0,$.Sn)("design:type",V._mx)],at.prototype,"_middleButton",void 0),(0,$.Cg)([(0,V.ERr)(),(0,$.Sn)("design:type",V._mx)],at.prototype,"_rightButton",void 0),(0,$.Cg)([(0,V.ERr)(),(0,$.Sn)("design:type",V._mx)],at.prototype,"_trackingButton",void 0),(0,$.Cg)([(0,V.MnK)(nt.R),(0,$.Sn)("design:type",nt.R)],at.prototype,"_rescuedText",void 0),(0,$.Cg)([(0,V.MnK)(nt.R),(0,$.Sn)("design:type",nt.R)],at.prototype,"_minMaxText",void 0),at=F=(0,$.Cg)([(0,V.EVk)("ZoneMenuConfiguration",Q.Y.uiPetsInZones)],at)},5075:(k,B,U)=>{"use strict";U.d(B,{A:()=>Y,H:()=>J});var F=U(8674),G=U(62459),j=U(113),$=U(97495),H=U(35120),V=U(28152),W=U(90633),q=U(26932),K=U(325);var z,Y,Q=U(30226),X=U(73678),Z=U(40392);!function(k){k.LOCKEDLEVEL="locked-level",k.LOCKEDSUBJECT="locked-subject",k.LOCKEDPREREQUISITE="locked-prerequisite",k.UNLOCKED="unlocked",k.COMINGSOON="comingsoon"}(Y||(Y={}));let J=z=class extends q.z{create(){super.create(),this.bindContext()}bindContext(){this.modalType===Y.COMINGSOON?this.bindZoneComingSoonPopup():this.modalType===Y.UNLOCKED?this.bindZoneUnlockedPopup():this.bindZoneLockedPopup()}bindZoneLockedPopup(){const k=Z.i.getZoneName(this._targetZoneId),B=Z.i.getZoneTagForZoneId(this._targetZoneId),U=Z.i.getHighestAvailableZoneData().zone,F=Z.i.getZoneName(U),j=Z.i.getZoneTagForZoneId(U),$=z.lockTextConfig[this.modalType];if(this._context.Container.rebind("ZONE_STATUS_POPUP_TITLE_KEY").toConstantValue($.title),this._context.Container.rebind("ZONE_STATUS_POPUP_DESCRIPTION_KEY").toConstantValue($.description),this.modalType===Y.LOCKEDLEVEL){const k=Z.i.getZoneData(this._targetZoneId).getRequiredLevel().toString();this._context.Container.rebind("ZONE_STATUS_POPUP_TITLE_ARGS").toConstantValue([k]),this._context.Container.rebind("ZONE_STATUS_POPUP_DESCRIPTION_ARGS").toConstantValue([F])}else if(this.modalType===Y.LOCKEDSUBJECT){const B=class{static getSubjectDisplay(){const k=H.q.instance.prodigy.gameContainer.get("f1d-f7b1").getSubject();switch(k){default:return k;case K.Q.ELA:return H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("SUBJECT_NAME_ENGLISH");case K.Q.Math:return H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("SUBJECT_NAME_MATH");case K.Q.Science:return H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("SUBJECT_NAME_SCIENCE")}}}.getSubjectDisplay();this._context.Container.rebind("ZONE_STATUS_POPUP_TITLE_ARGS").toConstantValue([k]),this._context.Container.rebind("ZONE_STATUS_POPUP_DESCRIPTION_ARGS").toConstantValue([k,B])}else this.modalType===Y.LOCKEDPREREQUISITE&&(this._context.Container.rebind("ZONE_STATUS_POPUP_TITLE_ARGS").toConstantValue([k]),this._context.Container.rebind("ZONE_STATUS_POPUP_DESCRIPTION_ARGS").toConstantValue([F]));this._context.Container.rebind("ZONE_STATUS_POPUP_CURRENT_ZONE_ICON").toConstantValue(`icon-zone-${j}`),this._context.Container.rebind("ZONE_STATUS_POPUP_TELEPORT_MAP_TAG").toConstantValue(U),this._context.Container.rebind("ZONE_STATUS_POPUP_SEGMENT_BUTTON_INTERFACE_NAME").toConstantValue(`zone_locked_popup_${j}`),this._context.Container.rebind("ZONE_STATUS_POPUP_TARGET_NAME").toConstantValue(k),this._context.Container.rebind("ZONE_STATUS_POPUP_BANNER").toConstantValue(Q.J.isCoreZone(this._targetZoneId)?`hdr-${B}`:"hdr-generic")}bindZoneUnlockedPopup(){const k=Z.i.getZoneData(this._targetZoneId),B=Z.i.getZoneTagForZoneId(this._targetZoneId),{puppetmasterText:U,description:F}=z.unlockedTextConfig[B];this._context.Container.rebind("ZONE_STATUS_POPUP_TARGET_NAME").toConstantValue(k.getName()),this._context.Container.rebind("ZONE_STATUS_POPUP_BANNER").toConstantValue(`hdr-${B}-unlocked`),this._context.Container.rebind("ZONE_STATUS_POPUP_PUPPETMASTER_TEXT").toConstantValue(U),this._context.Container.rebind("ZONE_STATUS_POPUP_TARGET_ZONE_ICON").toConstantValue(`icon-zone-${B}`),this._context.Container.rebind("ZONE_STATUS_POPUP_DESCRIPTION_KEY").toConstantValue(F),this._context.Container.rebind("ZONE_STATUS_POPUP_SEGMENT_BUTTON_INTERFACE_NAME").toConstantValue(`zone_unlocked_popup_${B}`),this._context.Container.rebind("ZONE_STATUS_POPUP_DIFFICULTY").toConstantValue(k.difficultyMode)}bindZoneComingSoonPopup(){var k;const B=null===(k=z.zoneRequirementsMap[this._targetZoneId])||void 0===k?void 0:k.showZoneInjectionId,U=Z.i.getZoneName(this._targetZoneId),F=Z.i.getZoneTagForZoneId(this._targetZoneId);B&&this._context.Container.rebind(B).toConstantValue(!0),this._context.Container.rebind("ZONE_STATUS_POPUP_BANNER").toConstantValue(Q.J.isCoreZone(this._targetZoneId)?`gamemode-lock-${F}`:"gamemode-lock-generic"),this._context.Container.rebind("ZONE_STATUS_POPUP_TARGET_NAME").toConstantValue(U)}openDifficultyConfirmationPopup(){H.q.instance.prodigy.open.difficultySelectorConfirmationModal($.i.Regular)}static canShowEntryPopup(k){var B,U;const F=H.q.instance.prodigy.gameContainer.get("306-5359").highestDifficultyUnlocked,G=z.zoneUnlockedBreadcrumbFeature[F],j=null!=k?k:Z.i.getHighestAvailableZoneData(F).zone,$=z.zoneRequirementsMap[j].entryBreadcrumb,V=j===X.A_.SHIVERCHILL,W=(null===(U=null===(B=H.q.instance.prodigy.world.getZone(j))||void 0===B?void 0:B.getQuestState())||void 0===U?void 0:U.ID)>1,q=H.q.instance.prodigy.world.getCurrentZone()===j,K=H.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(G,$);return $&&!V&&!W&&!q&&!K}static completeEntryBreadcrumb(k){const B=H.q.instance.prodigy.gameContainer.get("306-5359").highestDifficultyUnlocked,U=z.zoneUnlockedBreadcrumbFeature[B],F=null!=k?k:Z.i.getHighestAvailableZoneData(B).zone,G=z.zoneRequirementsMap[F].entryBreadcrumb;H.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(U,G)}};J.lockTextConfig={[Y.LOCKEDLEVEL]:{title:"UNLOCK_ZONE_AT",description:"CONTINUE_EXPLORING_X"},[Y.LOCKEDSUBJECT]:{title:"ZONE_LOCKED",description:"CHANGE_SUBJECTS_TO_UNLOCK"},[Y.LOCKEDPREREQUISITE]:{title:"ZONE_LOCKED",description:"CONTINUE_EXPLORING_X"}},J.unlockedTextConfig={[j.O.Shiverchill]:{description:"ZONE_UNLOCKED_EXPLORE_SHIVERCHILL",puppetmasterText:"PUPPETMASTER_ZONE_UNLOCKED_SHIVERCHILL"},[j.O.Bonfire]:{description:"ZONE_UNLOCKED_EXPLORE_BONFIRE",puppetmasterText:"PUPPETMASTER_ZONE_UNLOCKED_BONFIRE"},[j.O.Shipwreck]:{description:"ZONE_UNLOCKED_EXPLORE_SHIPWRECK",puppetmasterText:"PUPPETMASTER_ZONE_UNLOCKED_SHIPWRECK"},[j.O.Skywatch]:{description:"ZONE_UNLOCKED_EXPLORE_SKYWATCH",puppetmasterText:"PUPPETMASTER_ZONE_UNLOCKED_SKYWATCH"}},J.zoneRequirementsMap={[X.A_.FOREST]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_FIREFLY"},[X.A_.SHIVERCHILL]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SHIVERCHILL",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL},[X.A_.BONFIRE]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_BONFIRE",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE},[X.A_.SHIPWRECK]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SHIPWRECK",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK},[X.A_.SKYWATCH]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SKYWATCH",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH},[X.A_.ACADEMY]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_ACADEMY"},[X.A_.FORESTHARD]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_FIREFLY"},[X.A_.SHIVERCHILLHARD]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SHIVERCHILL",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL_HARD},[X.A_.BONFIREHARD]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_BONFIRE",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE_HARD},[X.A_.SHIPWRECKHARD]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SHIPWRECK",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK_HARD},[X.A_.SKYWATCHHARD]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SKYWATCH",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH_HARD},[X.A_.ACADEMYHARD]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_ACADEMY"},[X.A_.FORESTEXPERT]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_FIREFLY"},[X.A_.SHIVERCHILLEXPERT]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SHIVERCHILL",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL_EXPERT},[X.A_.BONFIREEXPERT]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_BONFIRE",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE_EXPERT},[X.A_.SHIPWRECKEXPERT]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SHIPWRECK",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK_EXPERT},[X.A_.SKYWATCHEXPERT]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SKYWATCH",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH_EXPERT},[X.A_.ACADEMYEXPERT]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_ACADEMY"}},J.zoneUnlockedBreadcrumbFeature={[$.i.Regular]:W.B.FEATURE_ZONE_UNLOCKED_POPUP,[$.i.Hard]:W.B.FEATURE_ZONE_UNLOCKED_POPUP_HARD,[$.i.Expert]:W.B.FEATURE_ZONE_UNLOCKED_POPUP_EXPERT},(0,F.Cg)([(0,G.Cdj)("ZONE_STATUS_MODAL_TYPE"),(0,F.Sn)("design:type",String)],J.prototype,"modalType",void 0),(0,F.Cg)([(0,G.Cdj)("ZONE_STATUS_POPUP_TARGET_ID"),(0,F.Sn)("design:type",String)],J.prototype,"_targetZoneId",void 0),J=z=(0,F.Cg)([(0,G.EVk)("ZoneStatusPopupDataProvider",V.Y.uiDialog)],J)},41968:(k,B,U)=>{"use strict";U.d(B,{P:()=>J});var F=U(8674),G=U(62459),j=U(97495),$=U(35120),H=U(28152),V=U(37807),W=U(31478),q=U(73678),K=U(3785),z=U(15989),Y=U(40392),Q=U(76277),X=U(17740),Z=U(47728);let J=class extends G.uAl{constructor(){super(...arguments),this._zoneId=q.A_.FOREST,this.runOnCreate=!1,this._isNonZoneLocation=!1,this.onUnlockPopupEnabled=new G.HN0,this.onUnlockPopupDisabled=new G.HN0,this.onShowGuideHand=new G.HN0}create(){super.create(),this.runOnCreate&&this.run()}destroy(){this.onUnlockPopupEnabled.dispose(),this.onUnlockPopupDisabled.dispose(),this.onShowGuideHand.dispose(),super.destroy()}run(){var k;if(this._isNonZoneLocation)return!1;const B=$.q.instance.prodigy.world.getZone(this._zoneId),U=Y.i.getZoneData(this._zoneId),F=!U.isHidden()&&U.meetsRequirements()&&!this._breadcrumb.isCompleted()&&!Y.i.isZoneLocked(this._zoneId)&&!1===(null===(k=this._worldMapMenuInstanceLockedZoneKeys)||void 0===k?void 0:k.includes(U.nameKey))&&((null==B?void 0:B.difficultyModeAgnostic)||Y.i.isInDifficultyMode(U.difficultyMode));return(F?this.onUnlockPopupEnabled:this.onUnlockPopupDisabled).dispatch(),F}showGuideHand(k=!0){var B;if(this._isNonZoneLocation)return;if(!k)return void this.onShowGuideHand.dispatch(k);const U=Y.i.BUTTONS_CONFIG.find((k=>k.zone===this._zoneId));if(Y.i.isInDifficultyMode(null==U?void 0:U.difficultyMode))if((null===(B=this._worldMapMenuInstanceLockedZoneKeys)||void 0===B?void 0:B.includes(z.NJ.DragonIsle))||1!==(0,W.k)()||(null==U?void 0:U.difficultyMode)!==j.i.Regular){if(Y.i.getHighestAvailableZoneData().zone!==this._zoneId&&this._zoneId!==q.A_.ACADEMY||this.onShowGuideHand.dispatch(!0),this._zoneId===q.A_.LAMPLIGHT){const k=(0,Q.G)(X.t),B=Z.x.hasFestivalBeenSeen();this.onShowGuideHand.dispatch(k&&!B)}}else this._zoneId===q.A_.DRAGONISLE&&this.onShowGuideHand.dispatch(!0)}};(0,F.Cg)([(0,G.MnK)(V.N),(0,F.Sn)("design:type",V.N)],J.prototype,"_breadcrumb",void 0),(0,F.Cg)([(0,G.gfw)(q.A_),(0,F.Sn)("design:type",String)],J.prototype,"_zoneId",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],J.prototype,"runOnCreate",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],J.prototype,"_isNonZoneLocation",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],J.prototype,"onUnlockPopupEnabled",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],J.prototype,"onUnlockPopupDisabled",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],J.prototype,"onShowGuideHand",void 0),(0,F.Cg)([(0,G.Cdj)(K.z.WorldMapMenuInstanceLockedZones),(0,F.Sn)("design:type",Array)],J.prototype,"_worldMapMenuInstanceLockedZoneKeys",void 0),J=(0,F.Cg)([(0,G.EVk)("ZoneUnlockPopupGuard",H.Y.utility)],J)},26691:(k,B,U)=>{"use strict";var F;U.d(B,{D:()=>F}),function(k){k[k.OkayButton=0]="OkayButton",k[k.YesNoButtons=1]="YesNoButtons"}(F||(F={}))},21644:(k,B,U)=>{"use strict";U.d(B,{Bi:()=>q,Uh:()=>F,ju:()=>K,p1:()=>z});var F,G=U(113),j=U(64270),$=U(35120),H=U(15485),V=U(46784),W=U(41674);function q(k){if(k)return"storeId"in k?k.storeId:void 0}!function(k){k.OpenFireflyOutfitters="Open Firefly Outfitters",k.OpenHotHotThreads="Open Hot Hot Threads",k.OpenOceanOutfitters="Open Ocean Outfitters",k.OpenSnowdaySales="Open Snowday Sales",k.OpenSkyHighValues="Open Sky High Values",k.OpenPetStore="Open Pet Store",k.OpenWandStore="Open Wand Store",k.OpenPotionShop="Open Potion Shop",k.OpenDynamicStore="Open Dynamic Store"}(F||(F={}));const K=[F.OpenFireflyOutfitters,F.OpenSnowdaySales,F.OpenHotHotThreads,F.OpenOceanOutfitters,F.OpenSkyHighValues],z={[F.OpenDynamicStore]:{name:"Pet Center",imageFrame:"unified-store-pet-store",iconFrame:"icon-currency-unified",customCallback:()=>{$.q.instance.prodigy.open.dynamicStore({storeKey:j.GA.PetShop,origin:{originType:W.$N.ButtonClick,originId:H.k.UnifiedStoreToDynamicStore}})},segmentData:{UNIFIED_STORE_SEGMENT_BUTTON_NAME:H.k.UnifiedStoreToDynamicStore,UNIFIED_STORE_SEGMENT_DESTINATION_NAME:V.B.UnifiedStore}},[F.OpenFireflyOutfitters]:{name:"Firefly Outfitters",imageFrame:"unified-store-firefly-outfitters",iconFrame:"mail-floran",storeId:7,zone:G.O.Firefly},[F.OpenHotHotThreads]:{name:"Hot Hot Threads",imageFrame:"unified-store-hot-hot-threads",iconFrame:"mail-hot-hot",storeId:6,zone:G.O.Bonfire},[F.OpenOceanOutfitters]:{name:"Ocean Outfitters",imageFrame:"unified-store-ocean-outfitters",iconFrame:"mail-yar",storeId:19,zone:G.O.Shipwreck},[F.OpenSnowdaySales]:{name:"Snowday Sales",imageFrame:"unified-store-snowday-sales",iconFrame:"mail-shiver",storeId:8,zone:G.O.Shiverchill},[F.OpenSkyHighValues]:{name:"Sky-High Values",imageFrame:"unified-store-sky-high-values",iconFrame:"mail-aero",storeId:5,zone:G.O.Skywatch},[F.OpenPetStore]:{name:"Pet Store",imageFrame:"unified-store-pet-store",iconFrame:"small-icon-gold",storeId:1},[F.OpenWandStore]:{name:"Wand Store",imageFrame:"unified-store-wand-store",iconFrame:"small-icon-gold",storeId:2},[F.OpenPotionShop]:{name:"Potion Shop",imageFrame:"unified-store-potion-store",iconFrame:"small-icon-gold",storeId:4}}},56903:(k,B,U)=>{"use strict";U.d(B,{A:()=>K});var F=U(8674),G=U(62459),j=U(95891),$=U(35120),H=U(73797),V=U(13956),W=U(34854),q=U(30226);class K{static setWizardWatchData(k){this._wizardWatchData=k}static clearWizardWatchData(){this._wizardWatchData=null}static getWizardWatchData(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=new G.bnh;return G.Aq$.isDefined(this._wizardWatchData)?(k.resolve({items:this._wizardWatchData}),k):(yield K._networkHandler.getWizardWatchData().catch((()=>{k.reject("Failed to fetch wizard watch data")})).then((B=>{var U;this.setWizardWatchData(B.items),k.resolve({items:null!==(U=this._wizardWatchData)&&void 0!==U?U:[]})})),k)}))}static getActiveEntityAds(){return G.Aq$.isDefined(this._wizardWatchData)?(this._activeAds=K.getActiveEntityAdsFromList(this._wizardWatchData),this._activeAds):(G.VyI.log("[WizardWatch] Error: Wizard watch ads have not been fetched",G.$bb.Error),[])}static getActiveEntityAdsFromList(k){const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=$.q.instance.prodigy.gameContainer.get("073-6f3b"),F=Date.now(),j=$.q.instance.prodigy.gameContainer.get("db5-fb6e");return k.filter((k=>{const $=k.conditions.requirementsID;if(G.Aq$.isDefined($)&&!j.meetsRequirementsDeprecated($))return!1;const H=k.conditions.growthbook;if(H.feature){const k=U.getFeatureValue(H.feature),B=k?k.enabled:null;if(!U.isOn(H.feature)||!1===B)return!1}if(k.conditions.memberSuppression&&(B.hasMembership()||q.J.shouldSuppressAd(B)))return!1;if(k.conditions.nonMemberSuppression&&!B.hasMembership())return!1;const V=new Date(Date.now());if(k.conditions.hideDuringSchoolHours&&q.J.isDateWithinSchoolDayAndHours(V)||k.conditions.hideDuringHomeHours&&!q.J.isDateWithinSchoolDayAndHours(V))return!1;k.body=K.fixEscapeCharacters(k.body);const W=k.sendDate?new Date(k.sendDate):null,z=k.removeDate?new Date(k.removeDate):null;if(W&&isNaN(W.getTime()))return G.VyI.log(`[WizardWatch] Bad send date ${k.sendDate}.`,G.$bb.Warning),!1;if(z&&isNaN(z.getTime()))return G.VyI.log(`[WizardWatch] Bad expiry date ${k.removeDate}.`,G.$bb.Warning),!1;const Y=null===W||F>W.getTime(),Q=k.noExpiry||null===z||Fk.ID))}static getUnseenActiveAdCount(){const k=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return j.difference(this.getActiveAdIDs(),k.encounters.getSeenAds()).length}static markActiveAdsSeen(){$.q.instance.prodigy.gameContainer.get("e20-0fb0").player.encounters.setSeenAds(K.getActiveAdIDs()),$.q.instance.prodigy.game.broadcaster.broadcast(H.Y1.RefreshWizardWatchAdCount,H.HG.HUD)}static fixEscapeCharacters(k){return k.replace(/\\n/g,"\n").replace(/\\t/g,"\t")}}(0,F.Cg)([(0,V.b)("152-d9b2"),(0,F.Sn)("design:type",W.J)],K,"_networkHandler",void 0)},68152:(k,B,U)=>{"use strict";U.d(B,{v:()=>F});const F=(k,B)=>{0}},39473:(k,B,U)=>{"use strict";U.d(B,{S:()=>H});var F=U(8674),G=U(62459),j=U(79687),$=U(30226);let H=class{constructor(k){this._localizer=null,this.ut=[],this._localizer=k}addPhrases(k,B=!1){for(let U=0;Uk?this.ut[k]:null}getPhraseIndex(k){for(let B=0;B{"use strict";U.d(B,{b:()=>F});class F{static isValidClassCode(k){const B=`^[A-F0-9]{${this.CLASS_CODE_LENGTH}}$`;return RegExp(B).test(k)}static reformatClassCode(k){return k.toUpperCase().replace(/[^A-F0-9]/gi,"").substring(0,this.CLASS_CODE_LENGTH)}}F.CLASS_CODE_LENGTH=7,F.CLASSCODE_COOLDOWN_MONTH=7,F.CLASSCODE_COOLDOWN_DATE=15},8770:(k,B,U)=>{"use strict";U.d(B,{Hh:()=>$,TZ:()=>V,wB:()=>H});var F=U(62459),G=U(17446),j=U(23748);const $={[G.E.Legendary]:16745216,[G.E.Heroic]:12984810,[G.E.Rare]:2664440,[G.E.Uncommon]:1890938,[G.E.Common]:8296667},H={[G.E.Legendary]:"#C32300",[G.E.Heroic]:"#690BC9",[G.E.Rare]:"#0B43B1",[G.E.Uncommon]:"#0B6C57",[G.E.Common]:"#363636"};class V{static convertPixelToGreyscale(k,B,U){return.3*k+.59*B+.11*U}static lerpRgb(k,B,U){return j.z.clampedLerp(k>>16&255,B>>16&&255,U)<<16|j.z.clampedLerp(k>>8&255,B>>8&&255,U)<<8|255&j.z.clampedLerp(255&k,B&&255,U)}static generateRgbColorReplacementPairs(k,B){const U=[];k.length!==B.length&&F.VyI.log("WARNING Color replacement arrays not of same length. Not all colors will be replaced correctly.",F.$bb.Warning);for(let F=0;F{"use strict";U.d(B,{o:()=>$});var F=U(8674),G=U(62459),j=U(68152);class ${constructor(){this._counter=0,this._callback=null,this._counterPromise=null,this._resolveFunction=null}get counter(){return this._counter}init(k,B){(0,j.v)(B>0,"Semaphore counter must be greater than 0"),this._callback=k,this._counter=B,this.resolvePendingPromise(!1),this._counterPromise=new Promise((k=>{this._resolveFunction=k}))}wait(){return(0,F.sH)(this,void 0,void 0,(function*(){return(0,j.v)(null!==this._counterPromise,"Cannot await a semaphore before it is initialized"),this._counterPromise}))}decrement(){--this._counter,0===this._counter&&(this._callback?this._callback():G.VyI.log("Semaphore callback was null.",G.$bb.Warning),this.resolvePendingPromise(!0),this._callback=null)}increment(){++this._counter}destroy(){this._resolveFunction&&this.resolvePendingPromise(!1),this._callback=null}resolvePendingPromise(k){this._resolveFunction&&(this._resolveFunction(k),this._resolveFunction=null,this._counterPromise=null)}}},88253:(k,B,U)=>{"use strict";U.d(B,{M:()=>G});var F=U(35120);class G{static getCutsceneDeterminers(){return{isNotificationsPaused:F.q.instance.prodigy.notifications.isPaused(),isInputEnabled:F.q.instance.prodigy.game.input.enabled}}static isCutscenePlaying(){const{isNotificationsPaused:k,isInputEnabled:B}=G.getCutsceneDeterminers();return k||!B}}},98252:(k,B,U)=>{"use strict";U.d(B,{pF:()=>K,uC:()=>F});var F,G,j=U(62459),$=U(99625),H=(U(34829),U(2272)),V=U(75329);!function(k){k[k.NONE=0]="NONE",k[k.IOS_APP=1]="IOS_APP",k[k.NATIVE_APP=2]="NATIVE_APP"}(F||(F={})),function(k){k.WEB="WEB",k.APPLE="APPLE",k.GOOGLE="GOOGLE"}(G||(G={}));const W=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],q=["cancelFullScreen","exitFullscreen","webkitCancelFullScreen","webkitExitFullscreen","msCancelFullScreen","msExitFullscreen","mozCancelFullScreen","mozExitFullscreen"];class K{static getMetricsPlatformName(){let k="web";return j.o5U.isIOS()?k="ios":j.o5U.isMobile()&&(k="android"),k}static appType(){if("1"===j.Aq$.getUrlVariable("iosApp"))return F.IOS_APP;const k=j.Aq$.getUrlVariable("nativeApp");return parseInt(k,10)>=1?F.NATIVE_APP:F.NONE}static isNativeApp(){return this.appType()!==F.NONE}static isNewMobileLogin(){const k=j.Aq$.getUrlVariable("nativeApp");return parseInt(k,10)>=2}static getNativeAppVersion(){return this.isNativeApp()?j.Aq$.getUrlVariable("nativeVersion"):null}static eligibleVersionForMobileOtpPurchase(){const k=this.getNativeAppVersion();if(!k)return!1;const B=k.split(".").map(Number),U=K.isNativeIOSApp()?[4,9,3]:[4,9,0];return this.compareVersion(B,U)}static eligibleVersionForMobileMembershipPurchase(){const k=this.getNativeAppVersion();if(!k)return!1;const B=k.split(".").map(Number);return this.compareVersion(B,this.isNativeIOSApp()?this._minimumSupportedVersionForIosRevenueCatMembershipPurchase:this._minimumSupportedVersionForMobileMembershipPurchase)}static eligibleVersionForMobileMembershipPurchaseForMultipleTiers(k){const B=this.getNativeAppVersion();if(!B)return!1;const U=B.split(".").map(Number),F=k?k.split(".").map(Number):void 0;return(this.isNativeAndroidApp()||this.isNativeIOSApp())&&this.compareVersion(U,null!=F?F:this._minimumSupportedVersionForMobileMembershipPurchaseMultipleTiers)}static eligibleForMembershipPurchaseForMultipleTiers(){return!this.isNativeApp()||this.eligibleVersionForMobileMembershipPurchaseForMultipleTiers()}static compareVersion(k,B){for(let U=0;UB[U])return!0}return!0}static isNativeIOSApp(){return this.isNativeApp()&&(j.o5U.isIOS()||j.o5U.isIpadOS()||"OS X"===j.o5U.getOsName())}static isNativeAndroidApp(){return this.isNativeApp()&&j.o5U.isAndroid()&&!this.isNativeAmazonApp()}static getDeviceSource(){return this.isNativeApp()?this.isNativeIOSApp()?G.APPLE:G.GOOGLE:G.WEB}static isNativeAmazonApp(){const k=window.expoReleaseChannel;return j.Aq$.isDefined(k)&&k.indexOf("amazon")>-1}static isDeprecatedIOS(){let k=!1;const B=screen.availWidth,U=screen.availHeight;return j.o5U.isIOS()&&((B<=768&&U<=1024||B<=1024&&U<=768)&&window.devicePixelRatio<2&&(k=!0),(B<=320&&U<=480||B<=480&&U<=320)&&(k=!0)),k}static getWheelEventName(){let k=null;return"onwheel"in window?k="wheel":"onmousewheel"in window?k="mousewheel":j.o5U.isFirefox()&&"MouseScrollEvent"in window&&(k="DOMMouseScroll"),k}static hasMSPointerSupport(){return navigator.msPointerEnabled||navigator.pointerEnabled||!1}static hasPointerLockSupport(){return"pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document}static hasTouchSupport(){return"ontouchstart"in window}static isFullscreenSupported(){return null!==this.getFullscreenRequestMethod()}static isFullscreenKeyboardSupported(){var k;return(null===(k=window.Element)||void 0===k?void 0:k.ALLOW_KEYBOARD_INPUT)||!1}static getFullscreenRequestMethod(){if(void 0!==this._requestFullscreenMethod)return this._requestFullscreenMethod;this._requestFullscreenMethod=null;const k=document.createElement("div");for(const B of W)if(k[B]){this._requestFullscreenMethod=B;break}return this._requestFullscreenMethod}static getFullscreenCancelMethod(){if(void 0!==this._cancelFullscreenMethod)return this._cancelFullscreenMethod;this._cancelFullscreenMethod=null;for(const k of q)if(document[k]){this._cancelFullscreenMethod=k;break}return this._cancelFullscreenMethod}}K._minimumSupportedVersionForMobileMembershipPurchase=[4,9,1],K._minimumSupportedVersionForIosRevenueCatMembershipPurchase=[4,9,4],K._minimumSupportedVersionForMobileMembershipPurchaseMultipleTiers=[4,9,6],K.PERFORMANCE_WARNING_CONFIG=new V.Z("BUTTON_OKAY_CAPITAL",null,H.E.Medium,500,"WARNING","WARNING_DEVICE_PERFORMANCE",void 0,void 0,void 0,$.l.ErrorDialogHeader)},50664:(k,B,U)=>{"use strict";U.d(B,{F:()=>j});var F=U(68910),G=U(82366);class j{static createBox(k,B,U,F,G,j,$,H){const V=k.add.graphics(0,0,H);return V.beginFill(j,$),V.lineTo(F,0),V.lineTo(F,G),V.lineTo(0,G),V.lineTo(0,0),V.x=B,V.y=U,V.endFill(),V}static drawBounds(k,B,U=B.getLocalBounds(),j=16711680){const $=new G.A(k,0,0);$.name="debugBounds",$.lineStyle(2,j,.5);return $.drawPolygon([new F.Point(-8,-8),new F.Point(8,8),new F.Point(0,0),new F.Point(8,-8),new F.Point(-8,8)]),$.drawRect(U.x,U.y,U.width,U.height),B.addChild($),$}}},3862:(k,B,U)=>{"use strict";U.d(B,{B:()=>$});var F=U(95891),G=U(35120),j=U(5898);class ${static setLastDungeonRun(k,B,U){const j=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let $=j.data.dungeonRunsTimeStamps;if($){const k=F.find($,["dungeonName",B]);k?k.lastRunTimeStamp=U:$.push({dungeonName:B,lastRunTimeStamp:U})}else $=[{dungeonName:B,lastRunTimeStamp:U}];j.data.dungeonRunsTimeStamps=$}static getLastDungeonRun(k,B){const U=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(U.data.dungeonRunsTimeStamps){const k=F.find(U.data.dungeonRunsTimeStamps,["dungeonName",B]);if(k)return k}return null}static setDungeonRunCompleteTime(k,B,U){const $=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let H=$.data.dungeonRunsCompleteTimeStamps;if(H){const k=F.find(H,["dungeonName",B]);k?k.lastRunTimeStamp=U:H.push({dungeonName:B,lastRunTimeStamp:U})}else H=[{dungeonName:B,lastRunTimeStamp:U}];$.data.dungeonRunsCompleteTimeStamps=H,$.achievements.increment(j.f.ArchivesRuns,1)}static getDungeonRunComplete(k){return G.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.dungeonRunsCompleteTimeStamps}}},10711:(k,B,U)=>{"use strict";U.d(B,{$U:()=>Z,H9:()=>X,K8:()=>q,KQ:()=>Y,Nx:()=>z,_m:()=>Q,ty:()=>J,uA:()=>W});var F=U(62459),G=U(34656),j=U(35120),$=U(77938);const H={hat:0,outfit:1,boots:2,weapon:3,spellRelic:4,pet:5,petHat:6,petRelic:7,follow:8,mount:9,dorm:10,item:11,currency:12},V={27:0,1:1,12:2,13:3,14:4,15:5,16:6,19:7,11:8};function W(k,B){var U;return null!==(U=k.finalPrice)&&void 0!==U?U:G.j.calculateFinalCost(k.task,B)}function q(k,B){const U=k.reduce(((k,B)=>{var U;const j=G.j.getItemRewards(B.task);if(!F.Aq$.isDefined(j[0].ID))return k;const $=`${j[0].type}-${j[0].ID}`;return null!==(U=k[$])&&void 0!==U||(k[$]=[]),k[$].push(B),k}),{});return Object.keys(U).map((k=>{const j=U[k][0],H=!!B&&!0!==B[j.task.id],V=W(j,((k,B)=>{var U;return null===(U=$.t.getItem(k,B))||void 0===U?void 0:U.data})),q=G.j.getItemRewards(j.task),K=q[0],z=new Map;q.slice(1).forEach((k=>{const B=z.get(k.ID);F.Aq$.isDefined(B)?B.N+=k.N:z.set(k.ID,k)}));const Y=U[k].reduce((k=>k+ +(j.task.repeatable||1)),0);return{item:$.t.getItem(K.type,K.ID),additionalItems:Array.from(z.values()),currencyID:V.currency,currencyAmount:V.value,dynamicStoreData:{itemQuantity:Y,offers:U[k],isNew:H,title:j.task.metadata.displayName,subtitle:j.task.metadata.displaySubtitle}}})).sort(K)}function K(k,B){var U,j,W,q,K,z,Y,Q,X,Z,J,tt;if(!F.Aq$.isDefined(k.dynamicStoreData)||!F.Aq$.isDefined(B.dynamicStoreData))return F.VyI.log("DynamicStoreUtils: Trying to sort something undefined.",F.$bb.Warning),0;const et=G.j.getItemRewards(k.dynamicStoreData.offers[0].task)[0],it=G.j.getItemRewards(B.dynamicStoreData.offers[0].task)[0],st=$.t.getItem(et.type,et.ID),nt=$.t.getItem(it.type,it.ID);if(!F.Aq$.isDefined(st)||!F.Aq$.isDefined(nt))return F.VyI.log("DynamicStoreUtils: Trying to sort a null item.",F.$bb.Warning),0;const at=(null!==(U=H[st.type])&&void 0!==U?U:Number.MAX_SAFE_INTEGER)-(null!==(j=H[nt.type])&&void 0!==j?j:Number.MAX_SAFE_INTEGER);if(0!==at)return at;if("currency"===st.type){const k=(null!==(W=V[st.ID])&&void 0!==W?W:Number.MAX_SAFE_INTEGER)-(null!==(q=V[nt.ID])&&void 0!==q?q:Number.MAX_SAFE_INTEGER);if(0!==k)return k}const rt=null!==(z=null===(K=null==st?void 0:st.data)||void 0===K?void 0:K.rarity)&&void 0!==z?z:Number.MAX_SAFE_INTEGER,ot=(null!==(Q=null===(Y=null==nt?void 0:nt.data)||void 0===Y?void 0:Y.rarity)&&void 0!==Q?Q:Number.MAX_SAFE_INTEGER)-rt;if(0!==ot)return ot;const ht=(null!==(X=V[k.currencyID])&&void 0!==X?X:Number.MAX_SAFE_INTEGER)-(null!==(Z=V[B.currencyID])&&void 0!==Z?Z:Number.MAX_SAFE_INTEGER);if(0!==ht)return ht;const ct=B.currencyAmount-k.currencyAmount;return 0!==ct?ct:(null!==(J=st.ID)&&void 0!==J?J:Number.MAX_SAFE_INTEGER)-(null!==(tt=nt.ID)&&void 0!==tt?tt:Number.MAX_SAFE_INTEGER)}function z(k){const B=k.task.repeatable;return"boolean"==typeof B&&B?Number.MAX_SAFE_INTEGER:"number"==typeof B?B:1}function Y(k){const B=j.q.instance.prodigy.gameContainer.get("306-5359");return B.data.dynamicStoreModalLastSeenDateMap||(B.data.dynamicStoreModalLastSeenDateMap={}),B.data.dynamicStoreModalLastSeenDateMap[k]}function Q(k){const B=j.q.instance.prodigy.gameContainer.get("306-5359");B.data.dynamicStoreModalLastSeenDateMap||(B.data.dynamicStoreModalLastSeenDateMap={}),B.data.dynamicStoreModalLastSeenDateMap[k]=Date.now()}function X(k){return k.some((k=>{var B,U;const G=$.t.getItem(k.type,k.ID);return F.Aq$.isDefined(G)&&(null!==(U=null===(B=G.data)||void 0===B?void 0:B.member)&&void 0!==U?U:0)>0}))}function Z(k,B){return k.some((k=>{var U,G;const j=$.t.getItem(k.type,k.ID);return F.Aq$.isDefined(j)&&(null!==(G=null===(U=j.data)||void 0===U?void 0:U.lockLevel)&&void 0!==G?G:0)>B}))}function J(k){return(!F.Aq$.isDefined(k.emptySectionInfo)||0===k.emptySectionInfo.title.length||0===k.emptySectionInfo.subtitle.length)&&0===k.offers.length}},14726:(k,B,U)=>{"use strict";var F;U.d(B,{T:()=>F}),function(k){k[k.Day=864e5]="Day",k[k.Week=6048e5]="Week",k[k.Month=2592e6]="Month",k[k.Year=31556952e3]="Year"}(F||(F={}))},52498:(k,B,U)=>{"use strict";var F;U.d(B,{h:()=>F}),function(k){k[k.Local=0]="Local",k[k.QABox=1]="QABox",k[k.Dev=2]="Dev",k[k.Staging=3]="Staging",k[k.Production=4]="Production"}(F||(F={}))},90351:(k,B,U)=>{"use strict";U.d(B,{K:()=>j,i:()=>F});var F,G=U(62459);!function(k){k.LinearNone="linearNone",k.BackIn="backIn",k.BackOut="backOut",k.BackInOut="backInOut",k.BounceIn="bounceIn",k.BounceOut="bounceOut",k.BounceInOut="bounceInOut",k.CircularIn="circularIn",k.CircularOut="circularOut",k.CircularInOut="circularInOut",k.CubicIn="cubicIn",k.CubicOut="cubicOut",k.CubicInOut="cubicInOut",k.ElasticIn="elasticIn",k.ElasticOut="elasticOut",k.ElasticInOut="elasticInOut",k.ExponentialIn="exponentialIn",k.ExponentialOut="exponentialOut",k.ExponentialInOut="exponentialInOut",k.QuadraticIn="quadraticIn",k.QuadraticOut="quadraticOut",k.QuadraticInOut="quadraticInOut",k.QuinticIn="quinticIn",k.QuinticOut="quinticOut",k.QuinticInOut="quinticInOut",k.QuarticIn="quarticIn",k.QuarticOut="quarticOut",k.QuarticInOut="quarticInOut",k.SinusoidalIn="sinusoidalIn",k.SinusoidalOut="sinusoidalOut",k.SinusoidalInOut="sinusoidalInOut"}(F||(F={}));class j{static getEasingFunctionFromEnum(k){switch(k){case F.BackIn:return G.GS3.Back.In;case F.BackOut:return G.GS3.Back.Out;case F.BackInOut:return G.GS3.Back.InOut;case F.BounceIn:return G.GS3.Bounce.In;case F.BounceOut:return G.GS3.Bounce.Out;case F.BounceInOut:return G.GS3.Bounce.InOut;case F.CircularIn:return G.GS3.Circular.In;case F.CircularOut:return G.GS3.Circular.Out;case F.CircularInOut:return G.GS3.Circular.InOut;case F.CubicIn:return G.GS3.Cubic.In;case F.CubicOut:return G.GS3.Cubic.Out;case F.CubicInOut:return G.GS3.Cubic.InOut;case F.ElasticIn:return G.GS3.Elastic.In;case F.ElasticOut:return G.GS3.Elastic.Out;case F.ElasticInOut:return G.GS3.Elastic.InOut;case F.ExponentialIn:return G.GS3.Exponential.In;case F.ExponentialOut:return G.GS3.Exponential.Out;case F.ExponentialInOut:return G.GS3.Exponential.InOut;case F.QuadraticIn:return G.GS3.Quadratic.In;case F.QuadraticOut:return G.GS3.Quadratic.Out;case F.QuadraticInOut:return G.GS3.Quadratic.InOut;case F.QuinticIn:return G.GS3.Quintic.In;case F.QuinticOut:return G.GS3.Quintic.Out;case F.QuinticInOut:return G.GS3.Quintic.InOut;case F.QuarticIn:return G.GS3.Quartic.In;case F.QuarticOut:return G.GS3.Quartic.Out;case F.QuarticInOut:return G.GS3.Quartic.InOut;case F.SinusoidalIn:return G.GS3.Sinusoidal.In;case F.SinusoidalOut:return G.GS3.Sinusoidal.Out;case F.SinusoidalInOut:return G.GS3.Sinusoidal.InOut;case F.LinearNone:default:return G.GS3.Linear.None}}}},29546:(k,B,U)=>{"use strict";U.d(B,{X:()=>$});var F=U(62459),G=U(35120),j=U(77938);class ${static isMathSubjectRequirementMet(){return G.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirementsDeprecated(58)}static getFeatureRequirementData(k){var B;return null===(B=j.t.getItem("featureRequirements",k))||void 0===B?void 0:B.data}static getLevelRequirement(k){const B=this.getFeatureRequirementData(k);if(B)for(let U=0;U{"use strict";U.d(B,{N:()=>Rn});var F=U(8674);class G extends Error{}class j extends G{constructor(k){super(`Invalid DateTime: ${k.toMessage()}`)}}class $ extends G{constructor(k){super(`Invalid Interval: ${k.toMessage()}`)}}class H extends G{constructor(k){super(`Invalid Duration: ${k.toMessage()}`)}}class V extends G{}class W extends G{constructor(k){super(`Invalid unit ${k}`)}}class q extends G{}class K extends G{constructor(){super("Zone is an abstract class")}}const z="numeric",Y="short",Q="long",X={year:z,month:z,day:z},Z={year:z,month:Y,day:z},J={year:z,month:Y,day:z,weekday:Y},tt={year:z,month:Q,day:z},et={year:z,month:Q,day:z,weekday:Q},it={hour:z,minute:z},st={hour:z,minute:z,second:z},nt={hour:z,minute:z,second:z,timeZoneName:Y},at={hour:z,minute:z,second:z,timeZoneName:Q},rt={hour:z,minute:z,hourCycle:"h23"},ot={hour:z,minute:z,second:z,hourCycle:"h23"},ht={hour:z,minute:z,second:z,hourCycle:"h23",timeZoneName:Y},ct={hour:z,minute:z,second:z,hourCycle:"h23",timeZoneName:Q},dt={year:z,month:z,day:z,hour:z,minute:z},lt={year:z,month:z,day:z,hour:z,minute:z,second:z},ut={year:z,month:Y,day:z,hour:z,minute:z},ft={year:z,month:Y,day:z,hour:z,minute:z,second:z},bt={year:z,month:Y,day:z,weekday:Y,hour:z,minute:z},pt={year:z,month:Q,day:z,hour:z,minute:z,timeZoneName:Y},vt={year:z,month:Q,day:z,hour:z,minute:z,second:z,timeZoneName:Y},gt={year:z,month:Q,day:z,weekday:Q,hour:z,minute:z,timeZoneName:Q},mt={year:z,month:Q,day:z,weekday:Q,hour:z,minute:z,second:z,timeZoneName:Q};class yt{get type(){throw new K}get name(){throw new K}get ianaName(){return this.name}get isUniversal(){throw new K}offsetName(k,B){throw new K}formatOffset(k,B){throw new K}offset(k){throw new K}equals(k){throw new K}get isValid(){throw new K}}let _t=null;class Et extends yt{static get instance(){return null===_t&&(_t=new Et),_t}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(k,{format:B,locale:U}){return je(k,B,U)}formatOffset(k,B){return We(this.offset(k),B)}offset(k){return-new Date(k).getTimezoneOffset()}equals(k){return"system"===k.type}get isValid(){return!0}}const wt=new Map;const Tt={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};const St=new Map;class At extends yt{static create(k){let B=St.get(k);return void 0===B&&St.set(k,B=new At(k)),B}static resetCache(){St.clear(),wt.clear()}static isValidSpecifier(k){return this.isValidZone(k)}static isValidZone(k){if(!k)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:k}).format(),!0}catch(e){return!1}}constructor(k){super(),this.zoneName=k,this.valid=At.isValidZone(k)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(k,{format:B,locale:U}){return je(k,B,U,this.name)}formatOffset(k,B){return We(this.offset(k),B)}offset(k){if(!this.valid)return NaN;const B=new Date(k);if(isNaN(B))return NaN;const U=function(k){let B=wt.get(k);return void 0===B&&(B=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:k,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),wt.set(k,B)),B}(this.name);let[F,G,j,$,H,V,W]=U.formatToParts?function(k,B){const U=k.formatToParts(B),F=[];for(let G=0;G=0?K:1e3+K,(Be({year:F,month:G,day:j,hour:24===H?0:H,minute:V,second:W,millisecond:0})-q)/6e4}equals(k){return"iana"===k.type&&k.name===this.name}get isValid(){return this.valid}}let Ct={};const Ot=new Map;function It(k,B={}){const U=JSON.stringify([k,B]);let F=Ot.get(U);return void 0===F&&(F=new Intl.DateTimeFormat(k,B),Ot.set(U,F)),F}const Dt=new Map;const Rt=new Map;let Pt=null;const Mt=new Map;function Nt(k){let B=Mt.get(k);return void 0===B&&(B=new Intl.DateTimeFormat(k).resolvedOptions(),Mt.set(k,B)),B}const xt=new Map;function Lt(k,B,U,F){const G=k.listingMode();return"error"===G?null:"en"===G?U(B):F(B)}class kt{constructor(k,B,U){this.padTo=U.padTo||0,this.floor=U.floor||!1;const{padTo:F,floor:G,...j}=U;if(!B||Object.keys(j).length>0){const B={useGrouping:!1,...U};U.padTo>0&&(B.minimumIntegerDigits=U.padTo),this.inf=function(k,B={}){const U=JSON.stringify([k,B]);let F=Dt.get(U);return void 0===F&&(F=new Intl.NumberFormat(k,B),Dt.set(U,F)),F}(k,B)}}format(k){if(this.inf){const B=this.floor?Math.floor(k):k;return this.inf.format(B)}return De(this.floor?Math.floor(k):Ne(k,3),this.padTo)}}class Bt{constructor(k,B,U){let F;if(this.opts=U,this.originalZone=void 0,this.opts.timeZone)this.dt=k;else if("fixed"===k.zone.type){const B=k.offset/60*-1,U=B>=0?`Etc/GMT+${B}`:`Etc/GMT${B}`;0!==k.offset&&At.create(U).valid?(F=U,this.dt=k):(F="UTC",this.dt=0===k.offset?k:k.setZone("UTC").plus({minutes:k.offset}),this.originalZone=k.zone)}else"system"===k.zone.type?this.dt=k:"iana"===k.zone.type?(this.dt=k,F=k.zone.name):(F="UTC",this.dt=k.setZone("UTC").plus({minutes:k.offset}),this.originalZone=k.zone);const G={...this.opts};G.timeZone=G.timeZone||F,this.dtf=It(B,G)}format(){return this.originalZone?this.formatToParts().map((({value:k})=>k)).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const k=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?k.map((k=>{if("timeZoneName"===k.type){const B=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...k,value:B}}return k})):k}resolvedOptions(){return this.dtf.resolvedOptions()}}class Ut{constructor(k,B,U){this.opts={style:"long",...U},!B&&Te()&&(this.rtf=function(k,B={}){const{base:U,...F}=B,G=JSON.stringify([k,F]);let j=Rt.get(G);return void 0===j&&(j=new Intl.RelativeTimeFormat(k,B),Rt.set(G,j)),j}(k,U))}format(k,B){return this.rtf?this.rtf.format(k,B):function(k,B,U="always",F=!1){const G={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},j=-1===["hours","minutes","seconds"].indexOf(k);if("auto"===U&&j){const U="days"===k;switch(B){case 1:return U?"tomorrow":`next ${G[k][0]}`;case-1:return U?"yesterday":`last ${G[k][0]}`;case 0:return U?"today":`this ${G[k][0]}`}}const $=Object.is(B,-0)||B<0,H=Math.abs(B),V=1===H,W=G[k],q=F?V?W[1]:W[2]||W[1]:V?G[k][0]:k;return $?`${H} ${q} ago`:`in ${H} ${q}`}(B,k,this.opts.numeric,"long"!==this.opts.style)}formatToParts(k,B){return this.rtf?this.rtf.formatToParts(k,B):[]}}const Ft={firstDay:1,minimalDays:4,weekend:[6,7]};class Gt{static fromOpts(k){return Gt.create(k.locale,k.numberingSystem,k.outputCalendar,k.weekSettings,k.defaultToEN)}static create(k,B,U,F,G=!1){const j=k||ne.defaultLocale,$=j||(G?"en-US":Pt||(Pt=(new Intl.DateTimeFormat).resolvedOptions().locale,Pt)),H=B||ne.defaultNumberingSystem,V=U||ne.defaultOutputCalendar,W=Oe(F)||ne.defaultWeekSettings;return new Gt($,H,V,W,j)}static resetCache(){Pt=null,Ot.clear(),Dt.clear(),Rt.clear(),Mt.clear(),xt.clear()}static fromObject({locale:k,numberingSystem:B,outputCalendar:U,weekSettings:F}={}){return Gt.create(k,B,U,F)}constructor(k,B,U,F,G){const[j,$,H]=function(k){const B=k.indexOf("-x-");-1!==B&&(k=k.substring(0,B));const U=k.indexOf("-u-");if(-1===U)return[k];{let B,F;try{B=It(k).resolvedOptions(),F=k}catch(e){const j=k.substring(0,U);B=It(j).resolvedOptions(),F=j}const{numberingSystem:G,calendar:j}=B;return[F,G,j]}}(k);this.locale=j,this.numberingSystem=B||$||null,this.outputCalendar=U||H||null,this.weekSettings=F,this.intl=function(k,B,U){return U||B?(k.includes("-u-")||(k+="-u"),U&&(k+=`-ca-${U}`),B&&(k+=`-nu-${B}`),k):k}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=G,this.fastNumbersCached=null}get fastNumbers(){var k;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(k=this).numberingSystem||"latn"===k.numberingSystem)&&("latn"===k.numberingSystem||!k.locale||k.locale.startsWith("en")||"latn"===Nt(k.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const k=this.isEnglish(),B=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return k&&B?"en":"intl"}clone(k){return k&&0!==Object.getOwnPropertyNames(k).length?Gt.create(k.locale||this.specifiedLocale,k.numberingSystem||this.numberingSystem,k.outputCalendar||this.outputCalendar,Oe(k.weekSettings)||this.weekSettings,k.defaultToEN||!1):this}redefaultToEN(k={}){return this.clone({...k,defaultToEN:!0})}redefaultToSystem(k={}){return this.clone({...k,defaultToEN:!1})}months(k,B=!1){return Lt(this,k,Qe,(()=>{const U="ja"===this.intl||this.intl.startsWith("ja-"),F=(B&=!U)?{month:k,day:"numeric"}:{month:k},G=B?"format":"standalone";if(!this.monthsCache[G][k]){const B=U?k=>this.dtFormatter(k,F).format():k=>this.extract(k,F,"month");this.monthsCache[G][k]=function(k){const B=[];for(let U=1;U<=12;U++){const F=en.utc(2009,U,1);B.push(k(F))}return B}(B)}return this.monthsCache[G][k]}))}weekdays(k,B=!1){return Lt(this,k,ti,(()=>{const U=B?{weekday:k,year:"numeric",month:"long",day:"numeric"}:{weekday:k},F=B?"format":"standalone";return this.weekdaysCache[F][k]||(this.weekdaysCache[F][k]=function(k){const B=[];for(let U=1;U<=7;U++){const F=en.utc(2016,11,13+U);B.push(k(F))}return B}((k=>this.extract(k,U,"weekday")))),this.weekdaysCache[F][k]}))}meridiems(){return Lt(this,void 0,(()=>ei),(()=>{if(!this.meridiemCache){const k={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[en.utc(2016,11,13,9),en.utc(2016,11,13,19)].map((B=>this.extract(B,k,"dayperiod")))}return this.meridiemCache}))}eras(k){return Lt(this,k,ai,(()=>{const B={era:k};return this.eraCache[k]||(this.eraCache[k]=[en.utc(-40,1,1),en.utc(2017,1,1)].map((k=>this.extract(k,B,"era")))),this.eraCache[k]}))}extract(k,B,U){const F=this.dtFormatter(k,B).formatToParts().find((k=>k.type.toLowerCase()===U));return F?F.value:null}numberFormatter(k={}){return new kt(this.intl,k.forceSimple||this.fastNumbers,k)}dtFormatter(k,B={}){return new Bt(k,this.intl,B)}relFormatter(k={}){return new Ut(this.intl,this.isEnglish(),k)}listFormatter(k={}){return function(k,B={}){const U=JSON.stringify([k,B]);let F=Ct[U];return F||(F=new Intl.ListFormat(k,B),Ct[U]=F),F}(this.intl,k)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||Nt(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Se()?function(k){let B=xt.get(k);if(!B){const U=new Intl.Locale(k);B="getWeekInfo"in U?U.getWeekInfo():U.weekInfo,"minimalDays"in B||(B={...Ft,...B}),xt.set(k,B)}return B}(this.locale):Ft}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(k){return this.locale===k.locale&&this.numberingSystem===k.numberingSystem&&this.outputCalendar===k.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let jt=null;class $t extends yt{static get utcInstance(){return null===jt&&(jt=new $t(0)),jt}static instance(k){return 0===k?$t.utcInstance:new $t(k)}static parseSpecifier(k){if(k){const B=k.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(B)return new $t($e(B[1],B[2]))}return null}constructor(k){super(),this.fixed=k}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${We(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${We(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(k,B){return We(this.fixed,B)}get isUniversal(){return!0}offset(){return this.fixed}equals(k){return"fixed"===k.type&&k.fixed===this.fixed}get isValid(){return!0}}class Ht extends yt{constructor(k){super(),this.zoneName=k}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Vt(k,B){if(_e(k)||null===k)return B;if(k instanceof yt)return k;if("string"==typeof k){const U=k.toLowerCase();return"default"===U?B:"local"===U||"system"===U?Et.instance:"utc"===U||"gmt"===U?$t.utcInstance:$t.parseSpecifier(U)||At.create(k)}return Ee(k)?$t.instance(k):"object"==typeof k&&"offset"in k&&"function"==typeof k.offset?k:new Ht(k)}const Wt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},qt={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Kt=Wt.hanidec.replace(/[\[|\]]/g,"").split("");const zt=new Map;function Yt({numberingSystem:k},B=""){const U=k||"latn";let F=zt.get(U);void 0===F&&(F=new Map,zt.set(U,F));let G=F.get(B);return void 0===G&&(G=new RegExp(`${Wt[U]}${B}`),F.set(B,G)),G}let Qt,Xt=()=>Date.now(),Zt="system",Jt=null,te=null,ee=null,ie=60,se=null;class ne{static get now(){return Xt}static set now(k){Xt=k}static set defaultZone(k){Zt=k}static get defaultZone(){return Vt(Zt,Et.instance)}static get defaultLocale(){return Jt}static set defaultLocale(k){Jt=k}static get defaultNumberingSystem(){return te}static set defaultNumberingSystem(k){te=k}static get defaultOutputCalendar(){return ee}static set defaultOutputCalendar(k){ee=k}static get defaultWeekSettings(){return se}static set defaultWeekSettings(k){se=Oe(k)}static get twoDigitCutoffYear(){return ie}static set twoDigitCutoffYear(k){ie=k%100}static get throwOnInvalid(){return Qt}static set throwOnInvalid(k){Qt=k}static resetCaches(){Gt.resetCache(),At.resetCache(),en.resetCache(),zt.clear()}}class ae{constructor(k,B){this.reason=k,this.explanation=B}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const re=[0,31,59,90,120,151,181,212,243,273,304,334],oe=[0,31,60,91,121,152,182,213,244,274,305,335];function he(k,B){return new ae("unit out of range",`you specified ${B} (of type ${typeof B}) as a ${k}, which is invalid`)}function ce(k,B,U){const F=new Date(Date.UTC(k,B-1,U));k<100&&k>=0&&F.setUTCFullYear(F.getUTCFullYear()-1900);const G=F.getUTCDay();return 0===G?7:G}function de(k,B,U){return U+(xe(k)?oe:re)[B-1]}function le(k,B){const U=xe(k)?oe:re,F=U.findIndex((k=>kFe(F,B,U)?(V=F+1,W=1):V=F,{weekYear:V,weekNumber:W,weekday:H,...qe(k)}}function be(k,B=4,U=1){const{weekYear:F,weekNumber:G,weekday:j}=k,$=ue(ce(F,1,B),U),H=Le(F);let V,W=7*G+j-$-7+B;W<1?(V=F-1,W+=Le(V)):W>H?(V=F+1,W-=Le(F)):V=F;const{month:q,day:K}=le(V,W);return{year:V,month:q,day:K,...qe(k)}}function pe(k){const{year:B,month:U,day:F}=k;return{year:B,ordinal:de(B,U,F),...qe(k)}}function ve(k){const{year:B,ordinal:U}=k,{month:F,day:G}=le(B,U);return{year:B,month:F,day:G,...qe(k)}}function ge(k,B){if(!_e(k.localWeekday)||!_e(k.localWeekNumber)||!_e(k.localWeekYear)){if(!_e(k.weekday)||!_e(k.weekNumber)||!_e(k.weekYear))throw new V("Cannot mix locale-based week fields with ISO-based week fields");return _e(k.localWeekday)||(k.weekday=k.localWeekday),_e(k.localWeekNumber)||(k.weekNumber=k.localWeekNumber),_e(k.localWeekYear)||(k.weekYear=k.localWeekYear),delete k.localWeekday,delete k.localWeekNumber,delete k.localWeekYear,{minDaysInFirstWeek:B.getMinDaysInFirstWeek(),startOfWeek:B.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function me(k){const B=we(k.year),U=Ie(k.month,1,12),F=Ie(k.day,1,ke(k.year,k.month));return B?U?!F&&he("day",k.day):he("month",k.month):he("year",k.year)}function ye(k){const{hour:B,minute:U,second:F,millisecond:G}=k,j=Ie(B,0,23)||24===B&&0===U&&0===F&&0===G,$=Ie(U,0,59),H=Ie(F,0,59),V=Ie(G,0,999);return j?$?H?!V&&he("millisecond",G):he("second",F):he("minute",U):he("hour",B)}function _e(k){return void 0===k}function Ee(k){return"number"==typeof k}function we(k){return"number"==typeof k&&k%1==0}function Te(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function Se(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Ae(k,B,U){if(0!==k.length)return k.reduce(((k,F)=>{const G=[B(F),F];return k&&U(k[0],G[0])===k[0]?k:G}),null)[1]}function Ce(k,B){return Object.prototype.hasOwnProperty.call(k,B)}function Oe(k){if(null==k)return null;if("object"!=typeof k)throw new q("Week settings must be an object");if(!Ie(k.firstDay,1,7)||!Ie(k.minimalDays,1,7)||!Array.isArray(k.weekend)||k.weekend.some((k=>!Ie(k,1,7))))throw new q("Invalid week settings");return{firstDay:k.firstDay,minimalDays:k.minimalDays,weekend:Array.from(k.weekend)}}function Ie(k,B,U){return we(k)&&k>=B&&k<=U}function De(k,B=2){let U;return U=k<0?"-"+(""+-k).padStart(B,"0"):(""+k).padStart(B,"0"),U}function Re(k){return _e(k)||null===k||""===k?void 0:parseInt(k,10)}function Pe(k){return _e(k)||null===k||""===k?void 0:parseFloat(k)}function Me(k){if(!_e(k)&&null!==k&&""!==k){const B=1e3*parseFloat("0."+k);return Math.floor(B)}}function Ne(k,B,U="round"){const F=10**B;switch(U){case"expand":return k>0?Math.ceil(k*F)/F:Math.floor(k*F)/F;case"trunc":return Math.trunc(k*F)/F;case"round":return Math.round(k*F)/F;case"floor":return Math.floor(k*F)/F;case"ceil":return Math.ceil(k*F)/F;default:throw new RangeError(`Value rounding ${U} is out of range`)}}function xe(k){return k%4==0&&(k%100!=0||k%400==0)}function Le(k){return xe(k)?366:365}function ke(k,B){const U=function(k,B){return k-B*Math.floor(k/B)}(B-1,12)+1;return 2===U?xe(k+(B-U)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][U-1]}function Be(k){let B=Date.UTC(k.year,k.month-1,k.day,k.hour,k.minute,k.second,k.millisecond);return k.year<100&&k.year>=0&&(B=new Date(B),B.setUTCFullYear(k.year,k.month-1,k.day)),+B}function Ue(k,B,U){return-ue(ce(k,1,B),U)+B-1}function Fe(k,B=4,U=1){const F=Ue(k,B,U),G=Ue(k+1,B,U);return(Le(k)-F+G)/7}function Ge(k){return k>99?k:k>ne.twoDigitCutoffYear?1900+k:2e3+k}function je(k,B,U,F=null){const G=new Date(k),j={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};F&&(j.timeZone=F);const $={timeZoneName:B,...j},H=new Intl.DateTimeFormat(U,$).formatToParts(G).find((k=>"timezonename"===k.type.toLowerCase()));return H?H.value:null}function $e(k,B){let U=parseInt(k,10);Number.isNaN(U)&&(U=0);const F=parseInt(B,10)||0;return 60*U+(U<0||Object.is(U,-0)?-F:F)}function He(k){const B=Number(k);if("boolean"==typeof k||""===k||!Number.isFinite(B))throw new q(`Invalid unit value ${k}`);return B}function Ve(k,B){const U={};for(const F in k)if(Ce(k,F)){const G=k[F];if(null==G)continue;U[B(F)]=He(G)}return U}function We(k,B){const U=Math.trunc(Math.abs(k/60)),F=Math.trunc(Math.abs(k%60)),G=k>=0?"+":"-";switch(B){case"short":return`${G}${De(U,2)}:${De(F,2)}`;case"narrow":return`${G}${U}${F>0?`:${F}`:""}`;case"techie":return`${G}${De(U,2)}${De(F,2)}`;default:throw new RangeError(`Value format ${B} is out of range for property format`)}}function qe(k){return function(k,B){return B.reduce(((B,U)=>(B[U]=k[U],B)),{})}(k,["hour","minute","second","millisecond"])}const Ke=["January","February","March","April","May","June","July","August","September","October","November","December"],ze=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ye=["J","F","M","A","M","J","J","A","S","O","N","D"];function Qe(k){switch(k){case"narrow":return[...Ye];case"short":return[...ze];case"long":return[...Ke];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Xe=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ze=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Je=["M","T","W","T","F","S","S"];function ti(k){switch(k){case"narrow":return[...Je];case"short":return[...Ze];case"long":return[...Xe];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const ei=["AM","PM"],ii=["Before Christ","Anno Domini"],si=["BC","AD"],ni=["B","A"];function ai(k){switch(k){case"narrow":return[...ni];case"short":return[...si];case"long":return[...ii];default:return null}}function ri(k,B){let U="";for(const F of k)F.literal?U+=F.val:U+=B(F.val);return U}const oi={D:X,DD:Z,DDD:tt,DDDD:et,t:it,tt:st,ttt:nt,tttt:at,T:rt,TT:ot,TTT:ht,TTTT:ct,f:dt,ff:ut,fff:pt,ffff:gt,F:lt,FF:ft,FFF:vt,FFFF:mt};class hi{static create(k,B={}){return new hi(k,B)}static parseFormat(k){let B=null,U="",F=!1;const G=[];for(let j=0;j0||F)&&G.push({literal:F||/^\s+$/.test(U),val:""===U?"'":U}),B=null,U="",F=!F):F||$===B?U+=$:(U.length>0&&G.push({literal:/^\s+$/.test(U),val:U}),U=$,B=$)}return U.length>0&&G.push({literal:F||/^\s+$/.test(U),val:U}),G}static macroTokenToFormatOpts(k){return oi[k]}constructor(k,B){this.opts=B,this.loc=k,this.systemLoc=null}formatWithSystemDefault(k,B){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(k,{...this.opts,...B}).format()}dtFormatter(k,B={}){return this.loc.dtFormatter(k,{...this.opts,...B})}formatDateTime(k,B){return this.dtFormatter(k,B).format()}formatDateTimeParts(k,B){return this.dtFormatter(k,B).formatToParts()}formatInterval(k,B){return this.dtFormatter(k.start,B).dtf.formatRange(k.start.toJSDate(),k.end.toJSDate())}resolvedOptions(k,B){return this.dtFormatter(k,B).resolvedOptions()}num(k,B=0,U){if(this.opts.forceSimple)return De(k,B);const F={...this.opts};return B>0&&(F.padTo=B),U&&(F.signDisplay=U),this.loc.numberFormatter(F).format(k)}formatDateTimeFromString(k,B){const U="en"===this.loc.listingMode(),F=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,G=(B,U)=>this.loc.extract(k,B,U),j=B=>k.isOffsetFixed&&0===k.offset&&B.allowZ?"Z":k.isValid?k.zone.formatOffset(k.ts,B.format):"",$=()=>U?function(k){return ei[k.hour<12?0:1]}(k):G({hour:"numeric",hourCycle:"h12"},"dayperiod"),H=(B,F)=>U?function(k,B){return Qe(B)[k.month-1]}(k,B):G(F?{month:B}:{month:B,day:"numeric"},"month"),V=(B,F)=>U?function(k,B){return ti(B)[k.weekday-1]}(k,B):G(F?{weekday:B}:{weekday:B,month:"long",day:"numeric"},"weekday"),W=B=>{const U=hi.macroTokenToFormatOpts(B);return U?this.formatWithSystemDefault(k,U):B},q=B=>U?function(k,B){return ai(B)[k.year<0?0:1]}(k,B):G({era:B},"era");return ri(hi.parseFormat(B),(B=>{switch(B){case"S":return this.num(k.millisecond);case"u":case"SSS":return this.num(k.millisecond,3);case"s":return this.num(k.second);case"ss":return this.num(k.second,2);case"uu":return this.num(Math.floor(k.millisecond/10),2);case"uuu":return this.num(Math.floor(k.millisecond/100));case"m":return this.num(k.minute);case"mm":return this.num(k.minute,2);case"h":return this.num(k.hour%12==0?12:k.hour%12);case"hh":return this.num(k.hour%12==0?12:k.hour%12,2);case"H":return this.num(k.hour);case"HH":return this.num(k.hour,2);case"Z":return j({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return j({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return j({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return k.zone.offsetName(k.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return k.zone.offsetName(k.ts,{format:"long",locale:this.loc.locale});case"z":return k.zoneName;case"a":return $();case"d":return F?G({day:"numeric"},"day"):this.num(k.day);case"dd":return F?G({day:"2-digit"},"day"):this.num(k.day,2);case"c":return this.num(k.weekday);case"ccc":return V("short",!0);case"cccc":return V("long",!0);case"ccccc":return V("narrow",!0);case"E":return this.num(k.weekday);case"EEE":return V("short",!1);case"EEEE":return V("long",!1);case"EEEEE":return V("narrow",!1);case"L":return F?G({month:"numeric",day:"numeric"},"month"):this.num(k.month);case"LL":return F?G({month:"2-digit",day:"numeric"},"month"):this.num(k.month,2);case"LLL":return H("short",!0);case"LLLL":return H("long",!0);case"LLLLL":return H("narrow",!0);case"M":return F?G({month:"numeric"},"month"):this.num(k.month);case"MM":return F?G({month:"2-digit"},"month"):this.num(k.month,2);case"MMM":return H("short",!1);case"MMMM":return H("long",!1);case"MMMMM":return H("narrow",!1);case"y":return F?G({year:"numeric"},"year"):this.num(k.year);case"yy":return F?G({year:"2-digit"},"year"):this.num(k.year.toString().slice(-2),2);case"yyyy":return F?G({year:"numeric"},"year"):this.num(k.year,4);case"yyyyyy":return F?G({year:"numeric"},"year"):this.num(k.year,6);case"G":return q("short");case"GG":return q("long");case"GGGGG":return q("narrow");case"kk":return this.num(k.weekYear.toString().slice(-2),2);case"kkkk":return this.num(k.weekYear,4);case"W":return this.num(k.weekNumber);case"WW":return this.num(k.weekNumber,2);case"n":return this.num(k.localWeekNumber);case"nn":return this.num(k.localWeekNumber,2);case"ii":return this.num(k.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(k.localWeekYear,4);case"o":return this.num(k.ordinal);case"ooo":return this.num(k.ordinal,3);case"q":return this.num(k.quarter);case"qq":return this.num(k.quarter,2);case"X":return this.num(Math.floor(k.ts/1e3));case"x":return this.num(k.ts);default:return W(B)}}))}formatDurationFromString(k,B){const U="negativeLargestOnly"===this.opts.signMode?-1:1,F=k=>{switch(k[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},G=hi.parseFormat(B),j=G.reduce(((k,{literal:B,val:U})=>B?k:k.concat(U)),[]),$=k.shiftTo(...j.map(F).filter((k=>k)));return ri(G,((k,B)=>G=>{const j=F(G);if(j){const F=B.isNegativeDuration&&j!==B.largestUnit?U:1;let $;return $="negativeLargestOnly"===this.opts.signMode&&j!==B.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(k.get(j)*F,G.length,$)}return G})($,{isNegativeDuration:$<0,largestUnit:Object.keys($.values)[0]}))}}const ci=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function di(...k){const B=k.reduce(((k,B)=>k+B.source),"");return RegExp(`^${B}$`)}function li(...k){return B=>k.reduce((([k,U,F],G)=>{const[j,$,H]=G(B,F);return[{...k,...j},$||U,H]}),[{},null,1]).slice(0,2)}function ui(k,...B){if(null==k)return[null,null];for(const[U,F]of B){const B=U.exec(k);if(B)return F(B)}return[null,null]}function fi(...k){return(B,U)=>{const F={};let G;for(G=0;Gvoid 0!==k&&(B||k&&q)?-k:k;return[{years:z(Pe(U)),months:z(Pe(F)),weeks:z(Pe(G)),days:z(Pe(j)),hours:z(Pe($)),minutes:z(Pe(H)),seconds:z(Pe(V),"-0"===V),milliseconds:z(Me(W),K)}]}const Di={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ri(k,B,U,F,G,j,$){const H={year:2===B.length?Ge(Re(B)):Re(B),month:ze.indexOf(U)+1,day:Re(F),hour:Re(G),minute:Re(j)};return $&&(H.second=Re($)),k&&(H.weekday=k.length>3?Xe.indexOf(k)+1:Ze.indexOf(k)+1),H}const Pi=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Mi(k){const[,B,U,F,G,j,$,H,V,W,q,K]=k,z=Ri(B,G,F,U,j,$,H);let Y;return Y=V?Di[V]:W?0:$e(q,K),[z,new $t(Y)]}const Ni=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,xi=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Li=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function ki(k){const[,B,U,F,G,j,$,H]=k;return[Ri(B,G,F,U,j,$,H),$t.utcInstance]}function Bi(k){const[,B,U,F,G,j,$,H]=k;return[Ri(B,H,U,F,G,j,$),$t.utcInstance]}const Ui=di(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,gi),Fi=di(/(\d{4})-?W(\d\d)(?:-?(\d))?/,gi),Gi=di(/(\d{4})-?(\d{3})/,gi),ji=di(vi),$i=li((function(k,B){return[{year:wi(k,B),month:wi(k,B+1,1),day:wi(k,B+2,1)},null,B+3]}),Ti,Si,Ai),Hi=li(mi,Ti,Si,Ai),Vi=li(yi,Ti,Si,Ai),Wi=li(Ti,Si,Ai);const qi=li(Ti);const Ki=di(/(\d{4})-(\d\d)-(\d\d)/,Ei),zi=di(_i),Yi=li(Ti,Si,Ai);const Qi="Invalid Duration",Xi={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},Zi={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...Xi},Ji=365.2425,ts=30.436875,es={years:{quarters:4,months:12,weeks:52.1775,days:Ji,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:ts,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...Xi},is=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ss=is.slice(0).reverse();function ns(k,B,U=!1){const F={values:U?B.values:{...k.values,...B.values||{}},loc:k.loc.clone(B.loc),conversionAccuracy:B.conversionAccuracy||k.conversionAccuracy,matrix:B.matrix||k.matrix};return new hs(F)}function as(k,B){let U=B.milliseconds??0;for(const F of ss.slice(1))B[F]&&(U+=B[F]*k[F].milliseconds);return U}function rs(k,B){const U=as(k,B)<0?-1:1;is.reduceRight(((F,G)=>{if(_e(B[G]))return F;if(F){const j=B[F]*U,$=k[G][F],H=Math.floor(j/$);B[G]+=H*U,B[F]-=H*$*U}return G}),null),is.reduce(((U,F)=>{if(_e(B[F]))return U;if(U){const G=B[U]%1;B[U]-=G,B[F]+=G*k[U][F]}return F}),null)}function os(k){const B={};for(const[U,F]of Object.entries(k))0!==F&&(B[U]=F);return B}class hs{constructor(k){const B="longterm"===k.conversionAccuracy||!1;let U=B?es:Zi;k.matrix&&(U=k.matrix),this.values=k.values,this.loc=k.loc||Gt.create(),this.conversionAccuracy=B?"longterm":"casual",this.invalid=k.invalid||null,this.matrix=U,this.isLuxonDuration=!0}static fromMillis(k,B){return hs.fromObject({milliseconds:k},B)}static fromObject(k,B={}){if(null==k||"object"!=typeof k)throw new q("Duration.fromObject: argument expected to be an object, got "+(null===k?"null":typeof k));return new hs({values:Ve(k,hs.normalizeUnit),loc:Gt.fromObject(B),conversionAccuracy:B.conversionAccuracy,matrix:B.matrix})}static fromDurationLike(k){if(Ee(k))return hs.fromMillis(k);if(hs.isDuration(k))return k;if("object"==typeof k)return hs.fromObject(k);throw new q(`Unknown duration argument ${k} of type ${typeof k}`)}static fromISO(k,B){const[U]=function(k){return ui(k,[Oi,Ii])}(k);return U?hs.fromObject(U,B):hs.invalid("unparsable",`the input "${k}" can't be parsed as ISO 8601`)}static fromISOTime(k,B){const[U]=function(k){return ui(k,[Ci,qi])}(k);return U?hs.fromObject(U,B):hs.invalid("unparsable",`the input "${k}" can't be parsed as ISO 8601`)}static invalid(k,B=null){if(!k)throw new q("need to specify a reason the Duration is invalid");const U=k instanceof ae?k:new ae(k,B);if(ne.throwOnInvalid)throw new H(U);return new hs({invalid:U})}static normalizeUnit(k){const B={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[k?k.toLowerCase():k];if(!B)throw new W(k);return B}static isDuration(k){return k&&k.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(k,B={}){const U={...B,floor:!1!==B.round&&!1!==B.floor};return this.isValid?hi.create(this.loc,U).formatDurationFromString(this,k):Qi}toHuman(k={}){if(!this.isValid)return Qi;const B=!1!==k.showZeros,U=is.map((U=>{const F=this.values[U];return _e(F)||0===F&&!B?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...k,unit:U.slice(0,-1)}).format(F)})).filter((k=>k));return this.loc.listFormatter({type:"conjunction",style:k.listStyle||"narrow",...k}).format(U)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let k="P";return 0!==this.years&&(k+=this.years+"Y"),0===this.months&&0===this.quarters||(k+=this.months+3*this.quarters+"M"),0!==this.weeks&&(k+=this.weeks+"W"),0!==this.days&&(k+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(k+="T"),0!==this.hours&&(k+=this.hours+"H"),0!==this.minutes&&(k+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(k+=Ne(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===k&&(k+="T0S"),k}toISOTime(k={}){if(!this.isValid)return null;const B=this.toMillis();if(B<0||B>=864e5)return null;k={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...k,includeOffset:!1};return en.fromMillis(B,{zone:"UTC"}).toISOTime(k)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?as(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(k){if(!this.isValid)return this;const B=hs.fromDurationLike(k),U={};for(const F of is)(Ce(B.values,F)||Ce(this.values,F))&&(U[F]=B.get(F)+this.get(F));return ns(this,{values:U},!0)}minus(k){if(!this.isValid)return this;const B=hs.fromDurationLike(k);return this.plus(B.negate())}mapUnits(k){if(!this.isValid)return this;const B={};for(const U of Object.keys(this.values))B[U]=He(k(this.values[U],U));return ns(this,{values:B},!0)}get(k){return this[hs.normalizeUnit(k)]}set(k){if(!this.isValid)return this;return ns(this,{values:{...this.values,...Ve(k,hs.normalizeUnit)}})}reconfigure({locale:k,numberingSystem:B,conversionAccuracy:U,matrix:F}={}){return ns(this,{loc:this.loc.clone({locale:k,numberingSystem:B}),matrix:F,conversionAccuracy:U})}as(k){return this.isValid?this.shiftTo(k).get(k):NaN}normalize(){if(!this.isValid)return this;const k=this.toObject();return rs(this.matrix,k),ns(this,{values:k},!0)}rescale(){if(!this.isValid)return this;return ns(this,{values:os(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...k){if(!this.isValid)return this;if(0===k.length)return this;k=k.map((k=>hs.normalizeUnit(k)));const B={},U={},F=this.toObject();let G;for(const j of is)if(k.indexOf(j)>=0){G=j;let k=0;for(const B in U)k+=this.matrix[B][j]*U[B],U[B]=0;Ee(F[j])&&(k+=F[j]);const $=Math.trunc(k);B[j]=$,U[j]=(1e3*k-1e3*$)/1e3}else Ee(F[j])&&(U[j]=F[j]);for(const j in U)0!==U[j]&&(B[G]+=j===G?U[j]:U[j]/this.matrix[G][j]);return rs(this.matrix,B),ns(this,{values:B},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const k={};for(const B of Object.keys(this.values))k[B]=0===this.values[B]?0:-this.values[B];return ns(this,{values:k},!0)}removeZeros(){if(!this.isValid)return this;return ns(this,{values:os(this.values)},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(k){if(!this.isValid||!k.isValid)return!1;if(!this.loc.equals(k.loc))return!1;for(const F of is)if(B=this.values[F],U=k.values[F],!(void 0===B||0===B?void 0===U||0===U:B===U))return!1;var B,U;return!0}}const cs="Invalid Interval";class ds{constructor(k){this.s=k.start,this.e=k.end,this.invalid=k.invalid||null,this.isLuxonInterval=!0}static invalid(k,B=null){if(!k)throw new q("need to specify a reason the Interval is invalid");const U=k instanceof ae?k:new ae(k,B);if(ne.throwOnInvalid)throw new $(U);return new ds({invalid:U})}static fromDateTimes(k,B){const U=sn(k),F=sn(B),G=function(k,B){return k&&k.isValid?B&&B.isValid?Bk}isBefore(k){return!!this.isValid&&this.e<=k}contains(k){return!!this.isValid&&(this.s<=k&&this.e>k)}set({start:k,end:B}={}){return this.isValid?ds.fromDateTimes(k||this.s,B||this.e):this}splitAt(...k){if(!this.isValid)return[];const B=k.map(sn).filter((k=>this.contains(k))).sort(((k,B)=>k.toMillis()-B.toMillis())),U=[];let{s:F}=this,G=0;for(;F+this.e?this.e:k;U.push(ds.fromDateTimes(F,j)),F=j,G+=1}return U}splitBy(k){const B=hs.fromDurationLike(k);if(!this.isValid||!B.isValid||0===B.as("milliseconds"))return[];let U,{s:F}=this,G=1;const j=[];for(;Fk*G)));U=+k>+this.e?this.e:k,j.push(ds.fromDateTimes(F,U)),F=U,G+=1}return j}divideEqually(k){return this.isValid?this.splitBy(this.length()/k).slice(0,k):[]}overlaps(k){return this.e>k.s&&this.s=k.e)}equals(k){return!(!this.isValid||!k.isValid)&&(this.s.equals(k.s)&&this.e.equals(k.e))}intersection(k){if(!this.isValid)return this;const B=this.s>k.s?this.s:k.s,U=this.e=U?null:ds.fromDateTimes(B,U)}union(k){if(!this.isValid)return this;const B=this.sk.e?this.e:k.e;return ds.fromDateTimes(B,U)}static merge(k){const[B,U]=k.sort(((k,B)=>k.s-B.s)).reduce((([k,B],U)=>B?B.overlaps(U)||B.abutsStart(U)?[k,B.union(U)]:[k.concat([B]),U]:[k,U]),[[],null]);return U&&B.push(U),B}static xor(k){let B=null,U=0;const F=[],G=k.map((k=>[{time:k.s,type:"s"},{time:k.e,type:"e"}])),j=Array.prototype.concat(...G).sort(((k,B)=>k.time-B.time));for(const $ of j)U+="s"===$.type?1:-1,1===U?B=$.time:(B&&+B!=+$.time&&F.push(ds.fromDateTimes(B,$.time)),B=null);return ds.merge(F)}difference(...k){return ds.xor([this].concat(k)).map((k=>this.intersection(k))).filter((k=>k&&!k.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:cs}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(k=X,B={}){return this.isValid?hi.create(this.s.loc.clone(B),k).formatInterval(this):cs}toISO(k){return this.isValid?`${this.s.toISO(k)}/${this.e.toISO(k)}`:cs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:cs}toISOTime(k){return this.isValid?`${this.s.toISOTime(k)}/${this.e.toISOTime(k)}`:cs}toFormat(k,{separator:B=" – "}={}){return this.isValid?`${this.s.toFormat(k)}${B}${this.e.toFormat(k)}`:cs}toDuration(k,B){return this.isValid?this.e.diff(this.s,k,B):hs.invalid(this.invalidReason)}mapEndpoints(k){return ds.fromDateTimes(k(this.s),k(this.e))}}class ls{static hasDST(k=ne.defaultZone){const B=en.now().setZone(k).set({month:12});return!k.isUniversal&&B.offset!==B.set({month:6}).offset}static isValidIANAZone(k){return At.isValidZone(k)}static normalizeZone(k){return Vt(k,ne.defaultZone)}static getStartOfWeek({locale:k=null,locObj:B=null}={}){return(B||Gt.create(k)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:k=null,locObj:B=null}={}){return(B||Gt.create(k)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:k=null,locObj:B=null}={}){return(B||Gt.create(k)).getWeekendDays().slice()}static months(k="long",{locale:B=null,numberingSystem:U=null,locObj:F=null,outputCalendar:G="gregory"}={}){return(F||Gt.create(B,U,G)).months(k)}static monthsFormat(k="long",{locale:B=null,numberingSystem:U=null,locObj:F=null,outputCalendar:G="gregory"}={}){return(F||Gt.create(B,U,G)).months(k,!0)}static weekdays(k="long",{locale:B=null,numberingSystem:U=null,locObj:F=null}={}){return(F||Gt.create(B,U,null)).weekdays(k)}static weekdaysFormat(k="long",{locale:B=null,numberingSystem:U=null,locObj:F=null}={}){return(F||Gt.create(B,U,null)).weekdays(k,!0)}static meridiems({locale:k=null}={}){return Gt.create(k).meridiems()}static eras(k="short",{locale:B=null}={}){return Gt.create(B,null,"gregory").eras(k)}static features(){return{relative:Te(),localeWeek:Se()}}}function us(k,B){const U=k=>k.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),F=U(B)-U(k);return Math.floor(hs.fromMillis(F).as("days"))}function fs(k,B,U,F){let[G,j,$,H]=function(k,B,U){const F=[["years",(k,B)=>B.year-k.year],["quarters",(k,B)=>B.quarter-k.quarter+4*(B.year-k.year)],["months",(k,B)=>B.month-k.month+12*(B.year-k.year)],["weeks",(k,B)=>{const U=us(k,B);return(U-U%7)/7}],["days",us]],G={},j=k;let $,H;for(const[V,W]of F)U.indexOf(V)>=0&&($=V,G[V]=W(k,B),H=j.plus(G),H>B?(G[V]--,(k=j.plus(G))>B&&(H=k,G[V]--,k=j.plus(G))):k=H);return[k,G,H,$]}(k,B,U);const V=B-G,W=U.filter((k=>["hours","minutes","seconds","milliseconds"].indexOf(k)>=0));0===W.length&&($0?hs.fromMillis(V,F).shiftTo(...W).plus(q):q}function bs(k,B=(k=>k)){return{regex:k,deser:([k])=>B(function(k){let B=parseInt(k,10);if(isNaN(B)){B="";for(let U=0;U=U&&F<=G&&(B+=F-U)}}return parseInt(B,10)}return B}(k))}}const ps=`[ ${String.fromCharCode(160)}]`,vs=new RegExp(ps,"g");function gs(k){return k.replace(/\./g,"\\.?").replace(vs,ps)}function ms(k){return k.replace(/\./g,"").replace(vs," ").toLowerCase()}function ys(k,B){return null===k?null:{regex:RegExp(k.map(gs).join("|")),deser:([U])=>k.findIndex((k=>ms(U)===ms(k)))+B}}function _s(k,B){return{regex:k,deser:([,k,B])=>$e(k,B),groups:B}}function Es(k){return{regex:k,deser:([k])=>k}}const ws={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let Ts=null;function Ss(k,B){return Array.prototype.concat(...k.map((k=>function(k,B){if(k.literal)return k;const U=Os(hi.macroTokenToFormatOpts(k.val),B);return null==U||U.includes(void 0)?k:U}(k,B))))}class As{constructor(k,B){if(this.locale=k,this.format=B,this.tokens=Ss(hi.parseFormat(B),k),this.units=this.tokens.map((B=>function(k,B){const U=Yt(B),F=Yt(B,"{2}"),G=Yt(B,"{3}"),j=Yt(B,"{4}"),$=Yt(B,"{6}"),H=Yt(B,"{1,2}"),V=Yt(B,"{1,3}"),W=Yt(B,"{1,6}"),q=Yt(B,"{1,9}"),K=Yt(B,"{2,4}"),z=Yt(B,"{4,6}"),Y=k=>{return{regex:RegExp((B=k.val,B.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([k])=>k,literal:!0};var B},Q=(Q=>{if(k.literal)return Y(Q);switch(Q.val){case"G":return ys(B.eras("short"),0);case"GG":return ys(B.eras("long"),0);case"y":return bs(W);case"yy":return bs(K,Ge);case"yyyy":return bs(j);case"yyyyy":return bs(z);case"yyyyyy":return bs($);case"M":return bs(H);case"MM":return bs(F);case"MMM":return ys(B.months("short",!0),1);case"MMMM":return ys(B.months("long",!0),1);case"L":return bs(H);case"LL":return bs(F);case"LLL":return ys(B.months("short",!1),1);case"LLLL":return ys(B.months("long",!1),1);case"d":return bs(H);case"dd":return bs(F);case"o":return bs(V);case"ooo":return bs(G);case"HH":return bs(F);case"H":return bs(H);case"hh":return bs(F);case"h":return bs(H);case"mm":return bs(F);case"m":case"q":return bs(H);case"qq":return bs(F);case"s":return bs(H);case"ss":return bs(F);case"S":return bs(V);case"SSS":return bs(G);case"u":return Es(q);case"uu":return Es(H);case"uuu":return bs(U);case"a":return ys(B.meridiems(),0);case"kkkk":return bs(j);case"kk":return bs(K,Ge);case"W":return bs(H);case"WW":return bs(F);case"E":case"c":return bs(U);case"EEE":return ys(B.weekdays("short",!1),1);case"EEEE":return ys(B.weekdays("long",!1),1);case"ccc":return ys(B.weekdays("short",!0),1);case"cccc":return ys(B.weekdays("long",!0),1);case"Z":case"ZZ":return _s(new RegExp(`([+-]${H.source})(?::(${F.source}))?`),2);case"ZZZ":return _s(new RegExp(`([+-]${H.source})(${F.source})?`),2);case"z":return Es(/[a-z_+-/]{1,256}?/i);case" ":return Es(/[^\S\n\r]/);default:return Y(Q)}})(k)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return Q.token=k,Q}(B,k))),this.disqualifyingUnit=this.units.find((k=>k.invalidReason)),!this.disqualifyingUnit){const[k,B]=[`^${(U=this.units).map((k=>k.regex)).reduce(((k,B)=>`${k}(${B.source})`),"")}$`,U];this.regex=RegExp(k,"i"),this.handlers=B}var U}explainFromTokens(k){if(this.isValid){const[B,U]=function(k,B,U){const F=k.match(B);if(F){const k={};let B=1;for(const G in U)if(Ce(U,G)){const j=U[G],$=j.groups?j.groups+1:1;!j.literal&&j.token&&(k[j.token.val[0]]=j.deser(F.slice(B,B+$))),B+=$}return[F,k]}return[F,{}]}(k,this.regex,this.handlers),[F,G,j]=U?function(k){let B,U=null;return _e(k.z)||(U=At.create(k.z)),_e(k.Z)||(U||(U=new $t(k.Z)),B=k.Z),_e(k.q)||(k.M=3*(k.q-1)+1),_e(k.h)||(k.h<12&&1===k.a?k.h+=12:12===k.h&&0===k.a&&(k.h=0)),0===k.G&&k.y&&(k.y=-k.y),_e(k.u)||(k.S=Me(k.u)),[Object.keys(k).reduce(((B,U)=>{const F=(k=>{switch(k){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(U);return F&&(B[F]=k[U]),B}),{}),U,B]}(U):[null,null,void 0];if(Ce(U,"a")&&Ce(U,"H"))throw new V("Can't include meridiem when specifying 24-hour format");return{input:k,tokens:this.tokens,regex:this.regex,rawMatches:B,matches:U,result:F,zone:G,specificOffset:j}}return{input:k,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Cs(k,B,U){return new As(k,U).explainFromTokens(B)}function Os(k,B){if(!k)return null;const U=hi.create(B,k).dtFormatter((Ts||(Ts=en.fromMillis(1555555555555)),Ts)),F=U.formatToParts(),G=U.resolvedOptions();return F.map((B=>function(k,B,U){const{type:F,value:G}=k;if("literal"===F){const k=/^\s+$/.test(G);return{literal:!k,val:k?" ":G}}const j=B[F];let $=F;"hour"===F&&($=null!=B.hour12?B.hour12?"hour12":"hour24":null!=B.hourCycle?"h11"===B.hourCycle||"h12"===B.hourCycle?"hour12":"hour24":U.hour12?"hour12":"hour24");let H=ws[$];if("object"==typeof H&&(H=H[j]),H)return{literal:!1,val:H}}(B,k,G)))}const Is="Invalid DateTime",Ds=864e13;function Rs(k){return new ae("unsupported zone",`the zone "${k.name}" is not supported`)}function Ps(k){return null===k.weekData&&(k.weekData=fe(k.c)),k.weekData}function Ms(k){return null===k.localWeekData&&(k.localWeekData=fe(k.c,k.loc.getMinDaysInFirstWeek(),k.loc.getStartOfWeek())),k.localWeekData}function Ns(k,B){const U={ts:k.ts,zone:k.zone,c:k.c,o:k.o,loc:k.loc,invalid:k.invalid};return new en({...U,...B,old:U})}function xs(k,B,U){let F=k-60*B*1e3;const G=U.offset(F);if(B===G)return[F,B];F-=60*(G-B)*1e3;const j=U.offset(F);return G===j?[F,G]:[k-60*Math.min(G,j)*1e3,Math.max(G,j)]}function Ls(k,B){const U=new Date(k+=60*B*1e3);return{year:U.getUTCFullYear(),month:U.getUTCMonth()+1,day:U.getUTCDate(),hour:U.getUTCHours(),minute:U.getUTCMinutes(),second:U.getUTCSeconds(),millisecond:U.getUTCMilliseconds()}}function ks(k,B,U){return xs(Be(k),B,U)}function Bs(k,B){const U=k.o,F=k.c.year+Math.trunc(B.years),G=k.c.month+Math.trunc(B.months)+3*Math.trunc(B.quarters),j={...k.c,year:F,month:G,day:Math.min(k.c.day,ke(F,G))+Math.trunc(B.days)+7*Math.trunc(B.weeks)},$=hs.fromObject({years:B.years-Math.trunc(B.years),quarters:B.quarters-Math.trunc(B.quarters),months:B.months-Math.trunc(B.months),weeks:B.weeks-Math.trunc(B.weeks),days:B.days-Math.trunc(B.days),hours:B.hours,minutes:B.minutes,seconds:B.seconds,milliseconds:B.milliseconds}).as("milliseconds"),H=Be(j);let[V,W]=xs(H,U,k.zone);return 0!==$&&(V+=$,W=k.zone.offset(V)),{ts:V,o:W}}function Us(k,B,U,F,G,j){const{setZone:$,zone:H}=U;if(k&&0!==Object.keys(k).length||B){const F=B||H,G=en.fromObject(k,{...U,zone:F,specificOffset:j});return $?G:G.setZone(H)}return en.invalid(new ae("unparsable",`the input "${G}" can't be parsed as ${F}`))}function Fs(k,B,U=!0){return k.isValid?hi.create(Gt.create("en-US"),{allowZ:U,forceSimple:!0}).formatDateTimeFromString(k,B):null}function Gs(k,B,U){const F=k.c.year>9999||k.c.year<0;let G="";if(F&&k.c.year>=0&&(G+="+"),G+=De(k.c.year,F?6:4),"year"===U)return G;if(B){if(G+="-",G+=De(k.c.month),"month"===U)return G;G+="-"}else if(G+=De(k.c.month),"month"===U)return G;return G+=De(k.c.day),G}function js(k,B,U,F,G,j,$){let H=!U||0!==k.c.millisecond||0!==k.c.second,V="";switch($){case"day":case"month":case"year":break;default:if(V+=De(k.c.hour),"hour"===$)break;if(B){if(V+=":",V+=De(k.c.minute),"minute"===$)break;H&&(V+=":",V+=De(k.c.second))}else{if(V+=De(k.c.minute),"minute"===$)break;H&&(V+=De(k.c.second))}if("second"===$)break;!H||F&&0===k.c.millisecond||(V+=".",V+=De(k.c.millisecond,3))}return G&&(k.isOffsetFixed&&0===k.offset&&!j?V+="Z":k.o<0?(V+="-",V+=De(Math.trunc(-k.o/60)),V+=":",V+=De(Math.trunc(-k.o%60))):(V+="+",V+=De(Math.trunc(k.o/60)),V+=":",V+=De(Math.trunc(k.o%60)))),j&&(V+="["+k.zone.ianaName+"]"),V}const $s={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Hs={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Vs={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ws=["year","month","day","hour","minute","second","millisecond"],qs=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Ks=["year","ordinal","hour","minute","second","millisecond"];function zs(k){const B={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[k.toLowerCase()];if(!B)throw new W(k);return B}function Ys(k){switch(k.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return zs(k)}}function Qs(k,B){const U=Vt(B.zone,ne.defaultZone);if(!U.isValid)return en.invalid(Rs(U));const F=Gt.fromObject(B);let G,j;if(_e(k.year))G=ne.now();else{for(const U of Ws)_e(k[U])&&(k[U]=$s[U]);const B=me(k)||ye(k);if(B)return en.invalid(B);const F=function(k){if(void 0===Js&&(Js=ne.now()),"iana"!==k.type)return k.offset(Js);const B=k.name;let U=tn.get(B);return void 0===U&&(U=k.offset(Js),tn.set(B,U)),U}(U);[G,j]=ks(k,F,U)}return new en({ts:G,zone:U,loc:F,o:j})}function Xs(k,B,U){const F=!!_e(U.round)||U.round,G=_e(U.rounding)?"trunc":U.rounding,j=(k,j)=>{k=Ne(k,F||U.calendary?0:2,U.calendary?"round":G);return B.loc.clone(U).relFormatter(U).format(k,j)},$=F=>U.calendary?B.hasSame(k,F)?0:B.startOf(F).diff(k.startOf(F),F).get(F):B.diff(k,F).get(F);if(U.unit)return j($(U.unit),U.unit);for(const H of U.units){const k=$(H);if(Math.abs(k)>=1)return j(k,H)}return j(k>B?-0:0,U.units[U.units.length-1])}function Zs(k){let B,U={};return k.length>0&&"object"==typeof k[k.length-1]?(U=k[k.length-1],B=Array.from(k).slice(0,k.length-1)):B=Array.from(k),[U,B]}let Js;const tn=new Map;class en{constructor(k){const B=k.zone||ne.defaultZone;let U=k.invalid||(Number.isNaN(k.ts)?new ae("invalid input"):null)||(B.isValid?null:Rs(B));this.ts=_e(k.ts)?ne.now():k.ts;let F=null,G=null;if(!U){if(k.old&&k.old.ts===this.ts&&k.old.zone.equals(B))[F,G]=[k.old.c,k.old.o];else{const j=Ee(k.o)&&!k.old?k.o:B.offset(this.ts);F=Ls(this.ts,j),U=Number.isNaN(F.year)?new ae("invalid input"):null,F=U?null:F,G=U?null:j}}this._zone=B,this.loc=k.loc||Gt.create(),this.invalid=U,this.weekData=null,this.localWeekData=null,this.c=F,this.o=G,this.isLuxonDateTime=!0}static now(){return new en({})}static local(){const[k,B]=Zs(arguments),[U,F,G,j,$,H,V]=B;return Qs({year:U,month:F,day:G,hour:j,minute:$,second:H,millisecond:V},k)}static utc(){const[k,B]=Zs(arguments),[U,F,G,j,$,H,V]=B;return k.zone=$t.utcInstance,Qs({year:U,month:F,day:G,hour:j,minute:$,second:H,millisecond:V},k)}static fromJSDate(k,B={}){const U=(F=k,"[object Date]"===Object.prototype.toString.call(F)?k.valueOf():NaN);var F;if(Number.isNaN(U))return en.invalid("invalid input");const G=Vt(B.zone,ne.defaultZone);return G.isValid?new en({ts:U,zone:G,loc:Gt.fromObject(B)}):en.invalid(Rs(G))}static fromMillis(k,B={}){if(Ee(k))return k<-Ds||k>Ds?en.invalid("Timestamp out of range"):new en({ts:k,zone:Vt(B.zone,ne.defaultZone),loc:Gt.fromObject(B)});throw new q(`fromMillis requires a numerical input, but received a ${typeof k} with value ${k}`)}static fromSeconds(k,B={}){if(Ee(k))return new en({ts:1e3*k,zone:Vt(B.zone,ne.defaultZone),loc:Gt.fromObject(B)});throw new q("fromSeconds requires a numerical input")}static fromObject(k,B={}){k=k||{};const U=Vt(B.zone,ne.defaultZone);if(!U.isValid)return en.invalid(Rs(U));const F=Gt.fromObject(B),G=Ve(k,Ys),{minDaysInFirstWeek:j,startOfWeek:$}=ge(G,F),H=ne.now(),W=_e(B.specificOffset)?U.offset(H):B.specificOffset,q=!_e(G.ordinal),K=!_e(G.year),z=!_e(G.month)||!_e(G.day),Y=K||z,Q=G.weekYear||G.weekNumber;if((Y||q)&&Q)throw new V("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(z&&q)throw new V("Can't mix ordinal dates with month/day");const X=Q||G.weekday&&!Y;let Z,J,tt=Ls(H,W);X?(Z=qs,J=Hs,tt=fe(tt,j,$)):q?(Z=Ks,J=Vs,tt=pe(tt)):(Z=Ws,J=$s);let et=!1;for(const V of Z){_e(G[V])?G[V]=et?J[V]:tt[V]:et=!0}const it=(X?function(k,B=4,U=1){const F=we(k.weekYear),G=Ie(k.weekNumber,1,Fe(k.weekYear,B,U)),j=Ie(k.weekday,1,7);return F?G?!j&&he("weekday",k.weekday):he("week",k.weekNumber):he("weekYear",k.weekYear)}(G,j,$):q?function(k){const B=we(k.year),U=Ie(k.ordinal,1,Le(k.year));return B?!U&&he("ordinal",k.ordinal):he("year",k.year)}(G):me(G))||ye(G);if(it)return en.invalid(it);const st=X?be(G,j,$):q?ve(G):G,[nt,at]=ks(st,W,U),rt=new en({ts:nt,zone:U,o:at,loc:F});return G.weekday&&Y&&k.weekday!==rt.weekday?en.invalid("mismatched weekday",`you can't specify both a weekday of ${G.weekday} and a date of ${rt.toISO()}`):rt.isValid?rt:en.invalid(rt.invalid)}static fromISO(k,B={}){const[U,F]=function(k){return ui(k,[Ui,$i],[Fi,Hi],[Gi,Vi],[ji,Wi])}(k);return Us(U,F,B,"ISO 8601",k)}static fromRFC2822(k,B={}){const[U,F]=function(k){return ui(function(k){return k.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(k),[Pi,Mi])}(k);return Us(U,F,B,"RFC 2822",k)}static fromHTTP(k,B={}){const[U,F]=function(k){return ui(k,[Ni,ki],[xi,ki],[Li,Bi])}(k);return Us(U,F,B,"HTTP",B)}static fromFormat(k,B,U={}){if(_e(k)||_e(B))throw new q("fromFormat requires an input string and a format");const{locale:F=null,numberingSystem:G=null}=U,j=Gt.fromOpts({locale:F,numberingSystem:G,defaultToEN:!0}),[$,H,V,W]=function(k,B,U){const{result:F,zone:G,specificOffset:j,invalidReason:$}=Cs(k,B,U);return[F,G,j,$]}(j,k,B);return W?en.invalid(W):Us($,H,U,`format ${B}`,k,V)}static fromString(k,B,U={}){return en.fromFormat(k,B,U)}static fromSQL(k,B={}){const[U,F]=function(k){return ui(k,[Ki,$i],[zi,Yi])}(k);return Us(U,F,B,"SQL",k)}static invalid(k,B=null){if(!k)throw new q("need to specify a reason the DateTime is invalid");const U=k instanceof ae?k:new ae(k,B);if(ne.throwOnInvalid)throw new j(U);return new en({invalid:U})}static isDateTime(k){return k&&k.isLuxonDateTime||!1}static parseFormatForOpts(k,B={}){const U=Os(k,Gt.fromObject(B));return U?U.map((k=>k?k.val:null)).join(""):null}static expandFormat(k,B={}){return Ss(hi.parseFormat(k),Gt.fromObject(B)).map((k=>k.val)).join("")}static resetCache(){Js=void 0,tn.clear()}get(k){return this[k]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ps(this).weekYear:NaN}get weekNumber(){return this.isValid?Ps(this).weekNumber:NaN}get weekday(){return this.isValid?Ps(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Ms(this).weekday:NaN}get localWeekNumber(){return this.isValid?Ms(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Ms(this).weekYear:NaN}get ordinal(){return this.isValid?pe(this.c).ordinal:NaN}get monthShort(){return this.isValid?ls.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ls.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ls.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ls.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const k=864e5,B=6e4,U=Be(this.c),F=this.zone.offset(U-k),G=this.zone.offset(U+k),j=this.zone.offset(U-F*B),$=this.zone.offset(U-G*B);if(j===$)return[this];const H=U-j*B,V=U-$*B,W=Ls(H,j),q=Ls(V,$);return W.hour===q.hour&&W.minute===q.minute&&W.second===q.second&&W.millisecond===q.millisecond?[Ns(this,{ts:H}),Ns(this,{ts:V})]:[this]}get isInLeapYear(){return xe(this.year)}get daysInMonth(){return ke(this.year,this.month)}get daysInYear(){return this.isValid?Le(this.year):NaN}get weeksInWeekYear(){return this.isValid?Fe(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Fe(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(k={}){const{locale:B,numberingSystem:U,calendar:F}=hi.create(this.loc.clone(k),k).resolvedOptions(this);return{locale:B,numberingSystem:U,outputCalendar:F}}toUTC(k=0,B={}){return this.setZone($t.instance(k),B)}toLocal(){return this.setZone(ne.defaultZone)}setZone(k,{keepLocalTime:B=!1,keepCalendarTime:U=!1}={}){if((k=Vt(k,ne.defaultZone)).equals(this.zone))return this;if(k.isValid){let F=this.ts;if(B||U){const B=k.offset(this.ts),U=this.toObject();[F]=ks(U,B,k)}return Ns(this,{ts:F,zone:k})}return en.invalid(Rs(k))}reconfigure({locale:k,numberingSystem:B,outputCalendar:U}={}){return Ns(this,{loc:this.loc.clone({locale:k,numberingSystem:B,outputCalendar:U})})}setLocale(k){return this.reconfigure({locale:k})}set(k){if(!this.isValid)return this;const B=Ve(k,Ys),{minDaysInFirstWeek:U,startOfWeek:F}=ge(B,this.loc),G=!_e(B.weekYear)||!_e(B.weekNumber)||!_e(B.weekday),j=!_e(B.ordinal),$=!_e(B.year),H=!_e(B.month)||!_e(B.day),W=$||H,q=B.weekYear||B.weekNumber;if((W||j)&&q)throw new V("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(H&&j)throw new V("Can't mix ordinal dates with month/day");let K;G?K=be({...fe(this.c,U,F),...B},U,F):_e(B.ordinal)?(K={...this.toObject(),...B},_e(B.day)&&(K.day=Math.min(ke(K.year,K.month),K.day))):K=ve({...pe(this.c),...B});const[z,Y]=ks(K,this.o,this.zone);return Ns(this,{ts:z,o:Y})}plus(k){if(!this.isValid)return this;return Ns(this,Bs(this,hs.fromDurationLike(k)))}minus(k){if(!this.isValid)return this;return Ns(this,Bs(this,hs.fromDurationLike(k).negate()))}startOf(k,{useLocaleWeeks:B=!1}={}){if(!this.isValid)return this;const U={},F=hs.normalizeUnit(k);switch(F){case"years":U.month=1;case"quarters":case"months":U.day=1;case"weeks":case"days":U.hour=0;case"hours":U.minute=0;case"minutes":U.second=0;case"seconds":U.millisecond=0}if("weeks"===F)if(B){const k=this.loc.getStartOfWeek(),{weekday:B}=this;B=3&&(H+="T"),H+=js(this,$,B,U,F,G,j),H}toISODate({format:k="extended",precision:B="day"}={}){return this.isValid?Gs(this,"extended"===k,zs(B)):null}toISOWeekDate(){return Fs(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:k=!1,suppressSeconds:B=!1,includeOffset:U=!0,includePrefix:F=!1,extendedZone:G=!1,format:j="extended",precision:$="milliseconds"}={}){if(!this.isValid)return null;return $=zs($),(F&&Ws.indexOf($)>=3?"T":"")+js(this,"extended"===j,B,k,U,G,$)}toRFC2822(){return Fs(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Fs(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Gs(this,!0):null}toSQLTime({includeOffset:k=!0,includeZone:B=!1,includeOffsetSpace:U=!0}={}){let F="HH:mm:ss.SSS";return(B||k)&&(U&&(F+=" "),B?F+="z":k&&(F+="ZZ")),Fs(this,F,!0)}toSQL(k={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(k)}`:null}toString(){return this.isValid?this.toISO():Is}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(k={}){if(!this.isValid)return{};const B={...this.c};return k.includeConfig&&(B.outputCalendar=this.outputCalendar,B.numberingSystem=this.loc.numberingSystem,B.locale=this.loc.locale),B}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(k,B="milliseconds",U={}){if(!this.isValid||!k.isValid)return hs.invalid("created by diffing an invalid DateTime");const F={locale:this.locale,numberingSystem:this.numberingSystem,...U},G=(H=B,Array.isArray(H)?H:[H]).map(hs.normalizeUnit),j=k.valueOf()>this.valueOf(),$=fs(j?this:k,j?k:this,G,F);var H;return j?$.negate():$}diffNow(k="milliseconds",B={}){return this.diff(en.now(),k,B)}until(k){return this.isValid?ds.fromDateTimes(this,k):this}hasSame(k,B,U){if(!this.isValid)return!1;const F=k.valueOf(),G=this.setZone(k.zone,{keepLocalTime:!0});return G.startOf(B,U)<=F&&F<=G.endOf(B,U)}equals(k){return this.isValid&&k.isValid&&this.valueOf()===k.valueOf()&&this.zone.equals(k.zone)&&this.loc.equals(k.loc)}toRelative(k={}){if(!this.isValid)return null;const B=k.base||en.fromObject({},{zone:this.zone}),U=k.padding?thisk.valueOf()),Math.min)}static max(...k){if(!k.every(en.isDateTime))throw new q("max requires all arguments be DateTimes");return Ae(k,(k=>k.valueOf()),Math.max)}static fromFormatExplain(k,B,U={}){const{locale:F=null,numberingSystem:G=null}=U;return Cs(Gt.fromOpts({locale:F,numberingSystem:G,defaultToEN:!0}),k,B)}static fromStringExplain(k,B,U={}){return en.fromFormatExplain(k,B,U)}static buildFormatParser(k,B={}){const{locale:U=null,numberingSystem:F=null}=B,G=Gt.fromOpts({locale:U,numberingSystem:F,defaultToEN:!0});return new As(G,k)}static fromFormatParser(k,B,U={}){if(_e(k)||_e(B))throw new q("fromFormatParser requires an input string and a format parser");const{locale:F=null,numberingSystem:G=null}=U,j=Gt.fromOpts({locale:F,numberingSystem:G,defaultToEN:!0});if(!j.equals(B.locale))throw new q(`fromFormatParser called with a locale of ${j}, but the format parser was created for ${B.locale}`);const{result:$,zone:H,specificOffset:V,invalidReason:W}=B.explainFromTokens(k);return W?en.invalid(W):Us($,H,U,`format ${B.format}`,k,V)}static get DATE_SHORT(){return X}static get DATE_MED(){return Z}static get DATE_MED_WITH_WEEKDAY(){return J}static get DATE_FULL(){return tt}static get DATE_HUGE(){return et}static get TIME_SIMPLE(){return it}static get TIME_WITH_SECONDS(){return st}static get TIME_WITH_SHORT_OFFSET(){return nt}static get TIME_WITH_LONG_OFFSET(){return at}static get TIME_24_SIMPLE(){return rt}static get TIME_24_WITH_SECONDS(){return ot}static get TIME_24_WITH_SHORT_OFFSET(){return ht}static get TIME_24_WITH_LONG_OFFSET(){return ct}static get DATETIME_SHORT(){return dt}static get DATETIME_SHORT_WITH_SECONDS(){return lt}static get DATETIME_MED(){return ut}static get DATETIME_MED_WITH_SECONDS(){return ft}static get DATETIME_MED_WITH_WEEKDAY(){return bt}static get DATETIME_FULL(){return pt}static get DATETIME_FULL_WITH_SECONDS(){return vt}static get DATETIME_HUGE(){return gt}static get DATETIME_HUGE_WITH_SECONDS(){return mt}}function sn(k){if(en.isDateTime(k))return k;if(k&&k.valueOf&&Ee(k.valueOf()))return en.fromJSDate(k);if(k&&"object"==typeof k)return en.fromObject(k);throw new q(`Unknown datetime argument: ${k}, of type ${typeof k}`)}var nn,an,rn=U(62459),on=U(35120),hn=U(35488),cn=U(99625),dn=U(77938),ln=U(28085),un=U(88131),fn=U(15821);function bn(k){return(0,ln.Um)(k,nn)}function pn(k){const B=parseInt(k);return!isNaN(B)&&B>=1&&B<=31}function vn(k){const B=parseInt(k);return!isNaN(B)&&B>0}function gn(k){switch(k){case nn.Monday:return 1;case nn.Tuesday:return 2;case nn.Wednesday:return 3;case nn.Thursday:return 4;case nn.Friday:return 5;case nn.Saturday:return 6;case nn.Sunday:return 7;default:return 1}}function mn(k,B,U){var F,G;if(!function(k){if(!k||"string"!=typeof k)return!1;const B=k.toLocaleLowerCase().split(".");if(0===B.length||B.length>4)return!1;const[U,F,G,j]=B,$=(0,ln.Um)(U,an),H=(0,ln.Um)(U,nn);if(!$&&!H)return!1;if(1===B.length)return!0;if("every"!==F)return!1;if(3===B.length)return"other"===G||U===an.Daily&&vn(G)||U===an.Monthly&&pn(G)||U===an.Weekly&&(bn(G)||vn(G));if(U===an.Daily)return!1;const V="other"===G||vn(G),W=H&&!fn.A.isDefined(j)||U===an.Weekly&&bn(j)||U===an.Monthly&&pn(j);return V&&W}(k))return un.Q.error("invalid-pattern");const[j,$,H,V]=k.split("."),W=parseInt(null!=H?H:""),q=parseInt(null!=V?V:""),{hour:K,minute:z}=B,Y=U>=B?U:B,Q=Y.hour1){const k=12*(Y.year-B.year)+(Y.month-B.month),U=k%J;if(0===U&&Y.day===tt&&Q){X=Object.assign(Object.assign({},Y.toObject()),{hour:K,minute:z});break}const F=J-U;X=Object.assign(Object.assign({},B.plus({months:k+F}).toObject()),{day:tt,hour:K,minute:z})}else{if(Y.day===tt&&Q){X=Object.assign(Object.assign({},Y.toObject()),{hour:K,minute:z});break}if(Y.day=U.year&&fn.A.isDefined(J)&&J>0&&J<=12&&fn.A.isDefined(tt)&&(X=Object.assign(Object.assign({},X),{day:Math.min(null!==(G=en.local(Z,J).daysInMonth)&&void 0!==G?G:-1,tt)}));const et=en.fromObject(X);return et.isValid?un.Q.success(et):un.Q.error("invalid-pattern")}!function(k){k.Monday="monday",k.Tuesday="tuesday",k.Wednesday="wednesday",k.Thursday="thursday",k.Friday="friday",k.Saturday="saturday",k.Sunday="sunday"}(nn||(nn={})),function(k){k.Daily="daily",k.Weekly="weekly",k.Monthly="monthly"}(an||(an={}));var yn=U(40392),_n=U(73678),En=U(13956),wn=U(46784),Tn=U(41674),Sn=U(65050),An=U(36648),Cn=U(12596),On=U(80060),In=U(84415),Dn=U(87490);class Rn{static shouldShowFeaturedPetPopup(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=on.q.instance.prodigy.gameContainer.get("db5-fb6e");if(!(yield B.meetsRequirements(72)))return!1;const U=yn.i.getZoneData(_n.A_.LAMPLIGHT);if(yn.i.isZoneLockedParams(U,B,on.q.instance.prodigy.classModeController.getInClassDisabledZones()))return!1;const F=this._featuredSpawnService.getCachedData();if(Rn.getMapName(F)===this._loggedInPlayer.player.data.zone)return!1;const G=In.a.getTimestampData(this.MODAL_NAME),j=rn.Aq$.isDefined(null==G?void 0:G.timestamp),$=!this._featuredSpawnService.isOnCooldown()&&this._featuredSpawnService.isActive();if(!j||rn.Aq$.isDefined(null==G?void 0:G.id)&&G.id!==(null==F?void 0:F.petId))return $;if(!rn.Aq$.isDefined(null==G?void 0:G.id)&&In.a.isFeatureReadyForNextInteraction(this.MODAL_NAME,0))return $;const H=Cn.R.parseDateToTimestamp(null==F?void 0:F.startDate);if((null==F?void 0:F.popupRecurrence)&&H){const B=null!==(k=null==G?void 0:G.timestamp)&&void 0!==k?k:0,U=mn(F.popupRecurrence,en.fromMillis(B),en.now());if(U.isSuccess()&&en.now()>=U.expect())return $}return!1}))}static openFeaturedPetPopup(k){var B,U;const F=this._featuredSpawnService.getCachedData();if(F){const G=on.q.instance.prodigy.gameContainer.get(rn.$Bt.LocalizationService),j=dn.t.getItem("pet",F.petId),$=Rn.getMapName(F);let H=new rn.I9Y(0,0);const[V,W]=$.split("-"),q=on.q.instance.prodigy.world.getZone(V).getMap(W).getDefaultSpawnPosition();q&&(H=new rn.I9Y(q.x,q.y));const K={TIME_LEFT_TEXT:this._featuredSpawnService.getTimeUntilExpiry(),RESCUE_TEXT:G.getText("FEATURED_PET_MODAL_DESCRIPTION",null!==(U=null===(B=null==j?void 0:j.data)||void 0===B?void 0:B.name)&&void 0!==U?U:""),PET_SPINE_GUID:F.petId.toString(),MAP_NAME:$,MAP_LOCATION:H},z=on.q.instance.prodigy.gameContainer.get("d0e-64fd");On.d.loadWithInjectedValuesAndDependenciesFromGUID(z,cn.l.FeaturedPetModal,K).then((B=>{In.a.saveTimestampData(this.MODAL_NAME,{id:F.petId});on.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:wn.B.FeaturedPetModal,interfaceType:Tn.Wm.Modal,instanceType:Sn.N.Interface,originType:Tn.$N.AutoSurfaced}),rn.Aq$.isDefined(k)&&B.onDestroy.addOnce(k)})).catch((k=>{rn.VyI.log("Error loading push notification permission prefab",rn.$bb.Error)}))}}static getMapName(k){var B,U;return null!==(U=null===(B=null==k?void 0:k.maps)||void 0===B?void 0:B[0])&&void 0!==U?U:this.SPAWN_MAP}}Rn.ELEMENT_TO_WIDGET_BG_MAP={[Dn.EElementType.Astral]:An.q.FeaturedPet_HUD_BG_Astral,[Dn.EElementType.Fire]:An.q.FeaturedPet_HUD_BG_Fire,[Dn.EElementType.Ice]:An.q.FeaturedPet_HUD_BG_Ice,[Dn.EElementType.Neutral]:An.q.FeaturedPet_HUD_BG_Physical,[Dn.EElementType.Physical]:An.q.FeaturedPet_HUD_BG_Physical,[Dn.EElementType.Plant]:An.q.FeaturedPet_HUD_BG_Plant,[Dn.EElementType.Shadow]:An.q.FeaturedPet_HUD_BG_Shadow,[Dn.EElementType.Storm]:An.q.FeaturedPet_HUD_BG_Storm,[Dn.EElementType.Water]:An.q.FeaturedPet_HUD_BG_Water},Rn.MODAL_NAME="FeaturedPetModal",Rn.SPAWN_MAP="lamplight-C3",(0,F.Cg)([(0,En.b)("a2e-a635"),(0,F.Sn)("design:type",hn.J)],Rn,"_featuredSpawnService",void 0),(0,F.Cg)([(0,En.b)("e20-0fb0"),(0,F.Sn)("design:type",Object)],Rn,"_loggedInPlayer",void 0)},56625:(k,B,U)=>{"use strict";U.d(B,{s:()=>$});var F=U(35120),G=U(5075),j=U(73678);class ${static canShowFtue(){const k=F.q.instance.prodigy.gameContainer.get("306-5359"),B=!F.q.instance.prodigy.notifications.isPaused(),U=k.hasCompletedTutorial(),j=k.justLeveled&&G.H.canShowEntryPopup();return B&&U&&!j&&!$.isOnBlockedQuest()}static isOnBlockedQuest(){const k=F.q.instance.prodigy.world.getCurrentZone(),B=F.q.instance.prodigy.world.getCurrentMapTag();return[{zoneId:j.A_.FOREST,questId:3,sequenceId:3,mapId:"B7"},{zoneId:j.A_.FOREST,questId:3,sequenceId:4,mapId:"B7"},{zoneId:j.A_.FOREST,questId:4,sequenceId:0,mapId:"B7"},{zoneId:j.A_.FOREST,questId:4,sequenceId:1,mapId:"B7"},{zoneId:j.A_.FOREST,questId:5,sequenceId:1,mapId:"B6"},{zoneId:j.A_.FOREST,questId:6,sequenceId:5,mapId:"D3"},{zoneId:j.A_.FOREST,questId:12,sequenceId:4,mapId:"D3"}].some((U=>{const G=F.q.instance.prodigy.world.getZone(U.zoneId);return k===U.zoneId&&B===U.mapId&&G.isOnSequence(U.questId,U.sequenceId)}))}}},6719:(k,B,U)=>{"use strict";U.d(B,{y:()=>j});var F=U(8674);var G=U(35120);class j extends class{static getAsset(k){return"string"==typeof k?k:k.atlas}static isImageSpecifierCompatible(k){return"string"==typeof k||"object"==typeof k&&null!==k&&"atlas"in k&&"frame"in k}}{static toInjectionParams(k){return"string"==typeof k?[k]:[k.atlas,k.frame]}static loadAssets(...k){return(0,F.sH)(this,void 0,void 0,(function*(){yield G.q.instance.prodigy.load.assetsAsPromise(k.map((k=>this.getAsset(k))))}))}}},87331:(k,B,U)=>{"use strict";U.d(B,{G:()=>F});class F{static shouldShowMemberLockIcon(k,B){if(("follow"===k.type||"mount"===k.type)&&1===k.data.member){return 1===B.backpack.getItem(k.type,k.ID).L}return!1}}},34612:(k,B,U)=>{"use strict";U.d(B,{F:()=>$});var F=U(90633),G=U(35120),j=U(3032);class ${static validateZoneProgressionType(){var k;const B=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=G.q.instance.prodigy.gameContainer.get("12f-4e29"),H=G.q.instance.prodigy.gameContainer.get("db5-fb6e");if(B.getQuestSystem("zoneUnlockType")!==j.p.ZoneUnlockedLinearCampaign){if(B.getLevel()<$.LOWEST_LEVEL_FIRST_ZONE_UNLOCK||H.meetsRequirementsDeprecated(12)||!0===(null===(k=null==B?void 0:B.difficultyUnlocks)||void 0===k?void 0:k.hard))return B.setQuestSystem("zoneUnlockType",j.p.ZoneUnlockedLinearCampaign),void U.completeBreadcrumb(F.B.FEATURE_ZONE_LOCK_CUTSCENE,F.B.BREADCRUMB_PUPPETMASTER_WORLD_MAP_SEQUENCE);B.setQuestSystem("zoneUnlockType",j.p.ZoneUnlockedLinearCampaign),U.resetBreadcrumb(F.B.FEATURE_ZONE_LOCK_CUTSCENE,F.B.BREADCRUMB_PUPPETMASTER_WORLD_MAP_SEQUENCE)}}static shouldShowLinearCampaignZoneLockTransition(){return!G.q.instance.prodigy.gameContainer.get("12f-4e29").isBreadcrumbComplete(F.B.FEATURE_ZONE_LOCK_CUTSCENE,F.B.BREADCRUMB_PUPPETMASTER_WORLD_MAP_SEQUENCE)}static activateLinearCampaignTransitionCutscene(){G.q.instance.prodigy.open.map({disableClose:!0,forceLock:[]}).activateLinearCampaignTransition()}}$.LOWEST_LEVEL_FIRST_ZONE_UNLOCK=25},17425:(k,B,U)=>{"use strict";U.d(B,{K:()=>K});var F=U(88022),G=U(85855),j=U(99625),$=U(51742),H=U(36648),V=U(56942),W=U(35120),q=U(91207);class K{static cacheAssets(k,B,U){for(let F=0;F{"use strict";U.d(B,{b:()=>F});class F{static mailHasGameMethod(k,B){var U;return(null===(U=k.gameMethod)||void 0===U?void 0:U.name)===B}static isSingleUse(k){return F.SINGLE_USE_MAIL_METHODS.some((B=>F.mailHasGameMethod(k,B)))}static isDebugMailData(k){return!0===(null==k?void 0:k.debug)}static isClientInsertedMail(k){return!k.id||null===k.id}static mergeSecureUnsecure(k,B){var U,F;const G=null!==(U=null==k?void 0:k.map((k=>({ID:k.id,type:k.type,N:k.quantity,isSecure:!0}))))&&void 0!==U?U:[],j=null!==(F=null==B?void 0:B.map((k=>({ID:k.id,type:k.type,N:k.quantity}))))&&void 0!==F?F:[];return G.concat(j)}}F.SINGLE_USE_MAIL_METHODS=["openGiftBox","openPromoPetEgg","singleUseGotItem"]},23748:(k,B,U)=>{"use strict";U.d(B,{z:()=>G});var F=U(62459);class G{static validateInt(k,B=0){if("number"!=typeof k){const U=parseInt(k,10);return Number.isNaN(U)?B:U}return Number.isNaN(k)?B:k}static getWorldPosition(k){let B=0,U=0;if(F.Aq$.isDefined(k)){B=k.position.x,U=k.position.y;let G=k.parent;for(;F.Aq$.isDefined(G);)B+=G.position.x,U+=G.position.y,G=G.parent}return{x:B,y:U}}static convertWorldToScreenPosition(k){let B=k.x,U=k.y;return F.i7d.main&&(B=B-F.i7d.main.GameObject.transform.worldPosition.x+F.i7d.main.viewportSize.getHalfWidth(),U=U-F.i7d.main.GameObject.transform.worldPosition.y+F.i7d.main.viewportSize.getHalfHeight()),{x:B,y:U}}static convertScreenToWorldPosition(k){let B=k.x,U=k.y;return F.i7d.main&&(B=B+F.i7d.main.GameObject.transform.worldPosition.x-F.i7d.main.viewportSize.getHalfWidth(),U=U+F.i7d.main.GameObject.transform.worldPosition.y-F.i7d.main.viewportSize.getHalfHeight()),{x:B,y:U}}static normalizeRange(k,B,U){return B>k?(U-k)/(B-k):B1?1:F,k+(B-k)*F}static roundToNearestMultiplier(k,B){return Math.round(k/B)*B}static ceilToNearestMultiplier(k,B){return 0===B?k:Math.ceil(k/B)*B}static selectRandomWeightedSelection(k){const B=k.reduce(((k,B)=>k+B),0);let U=Math.random()*B;for(let F=0;F{"use strict";U.d(B,{o:()=>Q});var F,G=U(8674),j=U(62459),$=U(95891),H=U(88022),V=U(50654),W=U(35120),q=U(34829),K=U(77938),z=U(24110),Y=U(23748);!function(k){k[k.UserID=0]="UserID",k[k.ClassID=1]="ClassID",k[k.Grade=2]="Grade"}(F||(F={}));class Q{static isEmptyObject(k){if(!j.Aq$.isDefined(k))return!0;for(const B in k)if(k.hasOwnProperty(B))return!1;return!0}static inTestGroups(k,B,U=Q.LANE_SIZE,G=Q.TOTAL_LANES,j=F.UserID){for(let F=0;FG-1||B<0)return j.VyI.log(`Lane ${B} is invalid for totalLanes ${G}`,j.$bb.Error),!1;switch($){case F.UserID:H=k.userID;break;case F.ClassID:H=Q.getLatestClassID(k.owners,k.playerTeachers,k.playerParents);break;case F.Grade:H=k.grade;break;default:return j.VyI.log(`Invalid type ${$}`,j.$bb.Error),!1}return j.Aq$.isDefined(H)?Math.floor(H/U)%G===B:(j.VyI.log(`Invalid ID being used. type = ${$} player = ${JSON.stringify(k)}`,j.$bb.Error),!1)}static getTestLane(k,B=Q.LANE_SIZE,U=Q.TOTAL_LANES,G=F.UserID){let $=null;const H=q.s.get("GameConstants.Features.SplitTests.DEBUG_LANE");if(j.Aq$.isDefined(H))return H;switch(G){case F.UserID:$=k.userID;break;case F.ClassID:$=Q.getLatestClassID(k.owners,k.playerTeachers,k.playerParents);break;case F.Grade:$=k.grade;break;default:return j.VyI.log(`Invalid type ${G}`,j.$bb.Error),-1}return j.Aq$.isDefined($)?Math.floor($/B)%U:(j.VyI.log(`Invalid ID being used. type = ${G} player = ${JSON.stringify(k)}`,j.$bb.Error),-1)}static getLatestClassID(k,B,U){let F=[],G=null,$=null,H=null;j.Aq$.isDefined(U)&&U.length>0&&(F=U),j.Aq$.isDefined(B)&&B.length>0&&(F=B);for(let j=0;jH.startDate)&&(H=G)}return j.Aq$.isDefined(H)?H.id:0}static highlightObjectOnLayer(k,B=0,U=0,F,G){const $=j.Aq$.isDefined(G)?G:F,V=$.addChild(W.q.instance.prodigy.create.sprite(B,U,H._.General_icons_json,"help"));return V.anchor.set(.5,1),j.Aq$.isDefined(F)&&(V.x+=Y.z.getWorldPosition(F).x-Y.z.getWorldPosition($).x,V.y+=Y.z.getWorldPosition(F).y-Y.z.getWorldPosition($).y),k.add.tween(V,this).to({y:V.y+25},400,j.GS3.Quadratic.InOut,!0,0,q.s.MAX_SAFE_INTEGER,!0),V}static isLevelLocked(k,B){return k.getLevel()0&&(j.cost=U?B.price:$[0].getAmount(),j.currency=null===(G=null===(F=K.t.getItem($[0].getType(),$[0].getID()))||void 0===F?void 0:F.data)||void 0===G?void 0:G.name)}return j}static isNumber(k){return!isNaN(parseFloat(k))&&isFinite(k)}static wrapPrefabForPixiObject(k,B){const U=new j._mx;U.layer="default",U.addComponent(j.dLy);return U.addComponent(z.B).getRootContainer().setParent(B),k.parent=U,U}static recursiveItemDrops(k){if(k.length>7){const B=k.slice(0,7);W.q.instance.prodigy.open.gotItem(B,this.recursiveItemDrops.bind(this,k.slice(7)))}else{if(!(k.length>0))return;W.q.instance.prodigy.open.gotItem(k)}}static wait(k){return(0,G.sH)(this,void 0,void 0,(function*(){return new Promise((B=>window.setTimeout(B,k)))}))}}Q.LANE_SIZE=1e3,Q.TOTAL_LANES=10},87392:(k,B,U)=>{"use strict";U.d(B,{f:()=>j});var F=U(95891),G=U(77938);class j{static getFilteredFirstNames(){return F.orderBy(G.t.getItemsWithFilter("name",(k=>0===k.data.type&&!k.data.deprecated)),["data.value"])}static getFullNameByID(k,B,U){var F,j,$,H,V,W,q,K,z,Y;const Q=null!==($=null===(j=null===(F=G.t.getItem("name",k))||void 0===F?void 0:F.data)||void 0===j?void 0:j.value)&&void 0!==$?$:"",X=null!==(W=null===(V=null===(H=G.t.getItem("name",B))||void 0===H?void 0:H.data)||void 0===V?void 0:V.value)&&void 0!==W?W:"",Z=null!==(z=null===(K=null===(q=G.t.getItem("name",U))||void 0===q?void 0:q.data)||void 0===K?void 0:K.value)&&void 0!==z?z:" ";return`${Q} ${X}${null===(Y=Z[0])||void 0===Y?void 0:Y.toLowerCase()}${Z.slice(1)}`.replace(/\s\s+/g," ").trim()}static getFilteredMiddleNames(){return G.t.getItemsWithFilter("name",(k=>1===k.data.type&&!k.data.deprecated))}static getFilteredLastNames(){return G.t.getItemsWithFilter("name",(k=>2===k.data.type&&!k.data.deprecated))}}},38920:(k,B,U)=>{"use strict";U.d(B,{Hk:()=>j,RL:()=>$,cC:()=>H});var F=U(62459);const G=[[1e6,"M"],[1e3,"k"]],j=(k,B=0,U=" ")=>null==k?void 0:k.toFixed(B).replace(/\B(?=(\d{3})+(?!\d))/g,U),$=(k,B)=>`${j(k)} / ${j(B)}`;function H(k,B=0){if(!F.Aq$.isDefined(k))return"?";let U=k,j="";const $=Math.log10(k);if($>B)for(const[F,W]of G)if(k>=F){U=k/F,j=W;break}let H=2;U%1<1/Math.pow(10,H)&&(H=1);const V=Math.log10(U)+H+j.length;return Math.floor(V)>Math.floor($)?k.toFixed(0):`${U.toFixed(H-1)}${j}`}},39938:(k,B,U)=>{"use strict";U.d(B,{n:()=>$});var F=U(62459),G=U(41170),j=U(40743);function $(k,B){(0,F.EVk)(`${B}StateManager`)(class extends j.r{set state(k){0}constructor(){super(),(0,F.gfw)(k)(this,"_state")}}),(0,F.EVk)(`${B}State`)(class extends G.A{constructor(){super(),(0,F.gfw)(k)(this,"state"),(0,F.gfw)(k)(this,"blendStates"),(0,F.SZi)()(this,"blendStates")}})}},24285:(k,B,U)=>{"use strict";U.d(B,{s:()=>G});var F=U(62459);class G{static resetCacheAsBitmap(k){k.cacheAsBitmap&&(k.cacheAsBitmap=!1,k.cacheAsBitmap=!0)}static cacheAsBitmap(k,B=!0){k&&(k.cacheAsBitmap=!1,k.cacheAsBitmap=B)}static setLayerCacheAsBitmap(k,B=!0){if(!F.wa5.getActiveScene().hasLayer(k))return void F.VyI.log(`Tried to set cacheAsBitmap on layer ${k} but it doesn't exist`,F.$bb.Warning);const U=F.wa5.getActiveScene().getLayer(k);U.cacheAsBitmap!==B&&(U.cacheAsBitmap=!1,U.cacheAsBitmap=B)}}},22023:(k,B,U)=>{"use strict";U.d(B,{O2:()=>it,tA:()=>nt,Tc:()=>st,P8:()=>Tt});var F=U(8674),G=U(87490),j=U(62459),$=U(95891),H=U.n($),V=U(62248),W=U(24521),q=U(56942),K=U(58182),z=U(77601);const Y=(0,z.gb)({key:"fab_remove_evolution_level_cap",activateAssociatedExperiments:0,default:!1});var Q=U(21574),X=U(50788),Z=U(37016),J=U(96989),tt=U(90156);const et=(0,z.gb)({key:"show-unique-pets",activateAssociatedExperiments:1,default:!1});var it,st,nt,at=U(90633),rt=U(35120),ot=U(34829),ht=U(23029),ct=U(77938),dt=U(39984),lt=U(50503),ut=U(15218),ft=U(17148),bt=U(55122),pt=U(12472),vt=U(76277),gt=U(63693),mt=U(6413),yt=U(43846),_t=U(68152),Et=U(14726),wt=U(30226);!function(k){k[k.GIFT_UNAVAILABLE=0]="GIFT_UNAVAILABLE",k[k.GIFT_AVAILABLE=1]="GIFT_AVAILABLE",k[k.GIFT_REDEEMED=2]="GIFT_REDEEMED"}(it||(it={})),function(k){k[k.None=0]="None",k[k.ShowEvolve=1]="ShowEvolve",k[k.ShowStaticEvolve=2]="ShowStaticEvolve",k[k.ShowUpgrade=3]="ShowUpgrade"}(st||(st={})),function(k){k[k.None=0]="None",k[k.NoOwnership=1]="NoOwnership",k[k.NoMerge=2]="NoMerge",k[k.NoPurchase=4]="NoPurchase",k[k.NoCapture=8]="NoCapture",k[k.NoEvolution=16]="NoEvolution",k[k.All=31]="All"}(nt||(nt={}));class Tt{static getPetEvolutionGiftThreshold(){const k=parseInt(rt.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("petEvolutionGiftThreshold"));return isNaN(k)?Tt.DEFAULT_PET_EVOLUTION_GIFT_THRESHOLD:k}static getEvolutionLVL(k){var B,U;if(ft.k.cachedDisabledEvolutionFeature)return;const F=null===(U=null===(B=null==k?void 0:k.data)||void 0===B?void 0:B.curve)||void 0===U?void 0:U.find((k=>k.evolveID));return null==F?void 0:F.lvl}static getEvolutionID(k){var B,U;if(ft.k.cachedDisabledEvolutionFeature)return;const F=null===(U=null===(B=null==k?void 0:k.data)||void 0===B?void 0:B.curve)||void 0===U?void 0:U.find((k=>k.evolveID));return null==F?void 0:F.evolveID}static hasEvolutionID(k,B){if(ft.k.cachedDisabledEvolutionFeature)return!1;return!!(null==B?void 0:B.data.curve.find((B=>B.evolveID===k)))}static findPreviousEvolution(k,B){return B.find((B=>this.hasEvolutionID(null==k?void 0:k.ID,B)))}static findNextEvolution(k){const B=this.getEvolutionID(k);return j.Aq$.isDefined(B)?ct.t.getItem("pet",B):null}static GetEvolutionaryLine(k){const B=ct.t.getCategoryItems("pet"),U=[k.ID];let F=this.findNextEvolution(k);for(;F;)U.push(F.ID),F=this.findNextEvolution(F);for(F=this.findPreviousEvolution(k,B);F;)U.unshift(F.ID),F=this.findPreviousEvolution(F,B);return U}static hasValidOrdinal(k){var B;return j.Aq$.isDefined(null===(B=k.data)||void 0===B?void 0:B.ordinal)&&k.data.ordinal>0}static isValidForPetBook(k){return this.hasValidOrdinal(k)&&this.isValidForUltimatesExperiment(k)}static isValidForUltimatesExperiment(k){const B=rt.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("ultimates"),U=this.isUltimate(k.ID);return!U||U&&B}static isUltimatesFollow(k){const B=ct.t.getItem("follow",k).metadata.petID;return this.isUltimate(B)}static isPetOnTeam(k){return j.Aq$.isDefined(k.team)}static getElementType(k){return k.data.affinity}static getPetDisplayName(k,B,U){var F;let G=null!==(F=null==B?void 0:B.nickname)&&void 0!==F?F:wt.J.getLocalizationNameKey({ID:k.ID,type:"pet"});return G=(0,yt.k)(G),j.Aq$.isDefined(U)&&G.length>U&&(G=`${G.substr(0,U)}...`),G}static canPlayerAccessPetMergeFeature(k){var B;if((0,vt.G)(X.J))return!0;return(null!=k?k:rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player).getLevel()>=(null!==(B=Q.g.config.minimumPlayerLevel)&&void 0!==B?B:0)}static getPetDisplayMergeRank(k,B){var U,F;if(Tt.canPlayerAccessPetMergeFeature()&&this.canPetAccessMergeRanks(k))return null!==(F=null===(U=rt.q.instance.prodigy.gameContainer.get("306-5359").kennel.getPetByUniqueID(B))||void 0===U?void 0:U.mergeRank)&&void 0!==F?F:Z.qd.MIN}static canPetAccessMergeRanks(k){const B=ht.R.loadData(W.r.PetOwnershipRestrictions_json),U=Array.from(new Set([...B.noOwnership,...B.noMerge]));return!(!(0,vt.G)(X.J)&&this.isPetEpic(+k)||U.includes(+k))}static getExcludedPetIDs(k){const B=ht.R.loadData(W.r.PetOwnershipRestrictions_json),U=[];k&nt.NoCapture&&U.push(...B.noCapture),k&nt.NoEvolution&&U.push(...B.noEvolution),k&nt.NoMerge&&U.push(...B.noMerge),k&nt.NoOwnership&&U.push(...B.noOwnership),k&nt.NoPurchase&&U.push(...B.noPurchase);return Array.from(new Set([...U]))}static getRequiredPetMergeIngredient(k,B){var U;if(!j.Aq$.isDefined(null===(U=null==k?void 0:k.data)||void 0===U?void 0:U.evolution))return;let F=k;if(J.Y.isMerge1Recipe(B)){if(k.data.evolution.tier===B.evolutionTier)return F;if(k.data.evolution.tier>B.evolutionTier){const B=ct.t.getCategoryItems("pet");F=Tt.findPreviousEvolution(k,B)}else k.data.evolution.tier=125&&k<=133||B&&this.isUltimate(k))}static isUltimate(k){return ht.R.loadData(W.r.UltimatesPetLocationConfig_json).ultimatesData.some((B=>B.id===+k))}static isPetStater(k){return mt.h.STARTER_PETS.includes(k)}static isPetEvolvedStarter(k){return mt.h.STARTER_PETS.map((k=>ct.t.getItem("pet",k))).map((k=>Tt.GetEvolutionaryLine(k))).reduce(((k,B)=>k.concat(B))).includes(k)}static isPetACrystalMonster(k){return mt.h.CRYSTAL_MONSTERS.includes(k)}static getPetLevel(k){return j.Aq$.isDefined(k.level)?j.cj9.clamp(k.level,1,bt.s.activePlayerLevelCap):1}static getPetChargedLevelCumulative(k){if(!Tt.isPetOnTeam(k))return Tt.getPetLevel(k);const B=rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return Tt.getPetLevel(k)+B.getChargedLevel()}static getPetsEffectiveLevel(k){var B;const U=ht.R.loadData(W.r.BattleRevampConstants_json).battleConstants,F=this.getPetChargedLevelCumulative(k)*(1+(null!==(B=k.mergeRank)&&void 0!==B?B:Z.qd.MIN)/U.divisors[G.EDivisor.MergeRank]);return Math.trunc(F)}static getTeamsEffectiveLevels(){return rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPetTeam(!1).map((k=>this.getPetsEffectiveLevel(k.data)))}static getPetMaxHealth(k,B){const U=ct.t.getItem("pet",k.ID);return lt.A.getHPFromParams(null!=B?B:Tt.getPetLevel(k),U.data.statHealth)}static getPetCurrentHealth(k){return j.Aq$.isDefined(null==k?void 0:k.hp)?k.hp:this.getPetMaxHealth(k)}static getAtlasElementBackerPath(k){return`pet-icon-backers/pet-icon-backers-${"plant"===k?"earth":k}`}static getAllOwnedPetsFromList(k){return rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPets().filter((B=>k.find((k=>B.ID===k.ID))))}static getAllOwnedPetsFromExcludeList(k){return rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPets().filter((B=>!k.some((k=>B.ID===k.ID))))}static ownsAllPetsFromList(k){const B=rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPets();return k.every((k=>B.some((B=>B.ID===k.ID))))}static ownsAllPetsFromZone(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=rt.q.instance.prodigy.gameContainer.get("fa6-b1fc"),U=yield B.getPetsInZone(k);return Tt.ownsAllPetsFromList(U)}))}static getAllOwnedEpicPetIDs(k=!0){const B=ot.A.get("GameConstants.Debug.OVERRIDE_OWNED_EPIC_IDS"),U=rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return null!=B?B:U.kennel.getPets().map((k=>k.ID)).filter(((B,U,F)=>Tt.isPetEpic(B,k)&&F.indexOf(B)===U))}static getAllOwnedUltimatePetIDs(){return rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPets().map((k=>k.ID)).filter(((k,B,U)=>Tt.isUltimate(k)&&U.indexOf(k)===B))}static getAllUltimatesPetData(){const k=ht.R.loadData(W.r.UltimatesPetLocationConfig_json),B=[];return k.ultimatesData.forEach((k=>{B.push({ID:k.id})})),B}static isUltimateLeavingSoon(k,B=Et.T.Week){return rt.q.instance.prodigy.gameContainer.get("a03-308f").getServerTimeMs()+B>=k.valueOf()}static getPetEvolutionType(k){let B=gt.Zj.Base;const U=ct.t.getItem("pet",k);if(!U)return j.VyI.log(`Pet ID ${k} could not be found`,j.$bb.Error),null;const F=this.GetEvolutionaryLine(U);return 1===F.length||F.forEach(((U,F)=>{U===k&&(B=`evolution${F+1}`)})),B}static getPetBench(k){var B,U,F,G;const j=ht.R.loadData(W.r.PetBenchVariationConfig_json).benchData,$=ct.t.getItem("pet",k);return j&&ut.A.useRevisedDifficulty?null!==(F=null!==(U=null===(B=j.find((B=>B.petID===k)))||void 0===B?void 0:B.bench)&&void 0!==U?U:$.data.bench)&&void 0!==F?F:[]:null!==(G=$.data.bench)&&void 0!==G?G:[]}static canPetEvolve(k,B){var U;if(ft.k.cachedDisabledEvolutionFeature)return!1;if((0,vt.G)(K.N)&&(null!==(U=k.data.evolutionCount)&&void 0!==U?U:0)>0)return!1;const F=k.getAvailableEvolutions(),G=B>=Tt.getPetEvolutionGiftThreshold(),j=F.length>0;return G&&j}static getEvolutionGiftState(k){const B=!rt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(at.B.FEATURE_PET_EVOLUTION,at.B.BREADCRUMB_NONMEMBER_FIRST_PET_EVOLUTION);return k||B?it.GIFT_AVAILABLE:it.GIFT_REDEEMED}static getBattleStats(k,B,U,F=0){var G,$,V;const W=rt.q.instance.prodigy.gameContainer.get("306-5359");(0,_t.v)(k.data,`Pet ${k.ID} does not have data`);const q=dt.e.getBattleStats(k.data,B),K=H().mergeWith({},k.data.stats,q);if(!U)return K;const z=W.kennel.getPetByUniqueID(U);if(!z)return K;let Y=null!==(G=z.mergeRank)&&void 0!==G?G:Z.qd.MIN;Y=j.cj9.clamp(Y+F,Z.qd.MIN,Z.qd.MAX);const X=null!==(V=null===($=Q.g.config.statScalers)||void 0===$?void 0:$[Y])&&void 0!==V?V:{};if(X)for(const[j,H]of Object.entries(X))K[j]=Math.round(K[j]*H);return K}static getPetSpineId(k){var B,U,F;const G=ct.t.getItem("pet",k).metadata.assets;return j.Aq$.isDefined(G.default)&&"spine"===G.default.type?(null===(B=G.default)||void 0===B?void 0:B.assetKey)?q.Q[null===(U=G.default)||void 0===U?void 0:U.assetKey]:`spine-${null===(F=G.default)||void 0===F?void 0:F.ID}`:(j.VyI.log(`Could not retrieve spine asset data from pet Id: ${k}`,j.$bb.Error),null)}static getMaxOwnableLevel(k,B=Z.qd.MIN){var U,F;const G=ct.t.getItem("pet",k);if(ft.k.cachedDisabledEvolutionFeature){if(B===Z.qd.MAX)return bt.s.activePlayerLevelCap;const k=J.Y.getMerge2RecipeForPet(G.ID,G.data.rarity,B);return null!==(U=null==k?void 0:k.levelCap)&&void 0!==U?U:bt.s.activePlayerLevelCap}return(0,vt.G)(Y)?bt.s.activePlayerLevelCap:null!==(F=this.getEvolutionLVL(G))&&void 0!==F?F:bt.s.activePlayerLevelCap}static getAssetIdFromUniqueId(k){var B;return null===(B=rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPets().find((B=>B.uniqueID===k)))||void 0===B?void 0:B.ID}static getLevelFromUniqueId(k){var B;return null===(B=rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPets().find((B=>B.uniqueID===k)))||void 0===B?void 0:B.level}static getUpgradeSuggestion(k){const B=rt.q.instance.prodigy.gameContainer,U=B.get("5c7-e02d"),F=Tt.getPetLevel(k),G=F=$,W=U.canAfford(U.petAcquisitionCost(k.ID,V.l6.Evolution));return H?W?st.ShowEvolve:st.ShowStaticEvolve:G?st.ShowUpgrade:st.None}static createItemDataFromPet(k,B){const U=ct.t.getItem("pet",k);return{ID:k,hp:this.getPetMaxHealth(U,B)}}static isPetReadyToMerge(k){const B=Tt.getPetRecipeData(k);if(!j.Aq$.isDefined(B))return!1;return pt.r.getOwnedIngredientsForRecipe(k,(k=>ct.t.getItem("pet",k)),B).length>=B.ingredientCount}static getPetRecipeData(k,B){const U=ct.t.getItem("pet",k.ID),F=null!=B?B:k.mergeRank;return(0,vt.G)(X.J)?J.Y.getMerge2RecipeForPet(U.ID,U.data.rarity,F):J.Y.getRecipeForPet(U.data.evolution.totalEvos,F)}static sortPetList(k){const B=[k=>Tt.getPetLevel(k),k=>{var B;return null!==(B=k.mergeRank)&&void 0!==B?B:0},k=>ct.t.getItem("pet",k.ID).data.rarity,k=>ct.t.getItem("pet",k.ID).data.ordinal],U=["desc","desc","desc","asc"];return Tt.showUniquePetsFeature()&&(B.unshift((k=>!Tt.isPetEpic(k.ID,!0)&&Tt.isPetReadyToMerge(k))),U.unshift("desc")),H().orderBy(k,B,U)}static sortPetItems(k){return H().orderBy(k,[k=>k.data.ordinal],["asc"])}static getPrimaryPet(k,B){const U=B.filter((B=>B.ID===k));if(!(U.length<1))return 1===U.length?U[0]:H().orderBy(U,[k=>{var B;return null!==(B=k.mergeRank)&&void 0!==B?B:0},k=>k.level,k=>k.catchDate],["desc","desc","asc"])[0]}static filterPrimaryPets(k){if(!Tt.showUniquePetsFeature())return k;const B=H().uniq(k.map((k=>k.ID))),U=[];for(const F of B){const B=this.getPrimaryPet(F,k);B&&U.push(B)}return U}static showUniquePetsFeature(){return(0,vt.G)(et)&&(0,vt.G)(tt.m)}static canPetMerge(k){if(k.mergeRank>=Z.qd.MAX)return!1;const B=ct.t.getItem("pet",k.ID),U=(0,vt.G)(X.J),F=U?J.Y.getMerge2RecipeForPet(B.ID,B.data.rarity,k.mergeRank):J.Y.getRecipeForPet(B.data.evolution.totalEvos,k.mergeRank);if(!j.Aq$.isDefined(F))return!1;const G=pt.r.getOwnedIngredientsForRecipe(k,(k=>ct.t.getItem("pet",k)),F);return!(U&&k.level{"use strict";U.d(B,{E:()=>W});var F=U(95891),G=U.n(F),j=U(35120),$=U(82209),H=U(77938),V=U(129);class W{static renderFriendAndClassmateFace(k,B,U){const F=j.q.instance.prodigy.friendsListNetworkHandler.classList;let G=j.q.instance.prodigy.friendsListNetworkHandler.friendsList;G=G.concat(F);for(let $=0;${"use strict";U.d(B,{x:()=>H});var F=U(62459),G=U(35120),j=U(34829),$=U(91315);class H{static showErrorMessage(k){const B=G.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService),U=new $.p(G.q.instance.game,G.q.instance.prodigy.game.state.getCurrentState().stage);return U.preprocess(k,void 0,void 0),U.queuePostCreateCallback(U.setOkay.bind(U,B.getText("SETTINGS_LOGOUT"),null)),U.setCloseCallback((()=>{G.q.instance.prodigy.gameContainer.get("c97-bd0d").logout(!0)})),U}static showErrorMessageThenReturnToCurrentMap(){G.q.instance.prodigy.open.messageBoxPrefab({text:"STUCK_POPUP_TEXT",confirmCallback:()=>{G.q.instance.prodigy.world.teleportToCurrentMap()}})}static get arePopupsEnabled(){return j.A.get("GameConstants.Debug.POPUPS_ENABLED")&&!G.q.instance.prodigy.notifications.isPaused()&&!G.q.instance.prodigy.world.inRestrictedSocialZone(G.q.instance.prodigy.world.getCurrentZone())}}},80060:(k,B,U)=>{"use strict";U.d(B,{d:()=>$});var F=U(8674),G=U(62459),j=U(26004);class ${static loadWithInjectedValuesAndDependenciesFromGUID(k,B,U,F,j=!1){const $=new G._mx(F);$.addComponent(G.dLy);const H=$.addComponent(G.bE_);for(const G in U)H.Container.bind(G).toConstantValue(U[G]);const V=Object.keys(null!=U?U:{}).map((k=>({injectionName:k,data:U[k]})));return k.loadWithDependenciesFromGUID(B,$,j,V)}static preloadWithInjectedValuesAndDependenciesFromGUID(k,B,U,F=!1){const j=new G._mx;j.addComponent(G.dLy);const $=j.addComponent(G.bE_);for(const G in U)$.Container.bind(G).toConstantValue(U[G]);return k.preloadFromGUIDWithDependencies(B,F,this.getDataForInjection(U))}static getDataForInjection(k){return Object.keys(null!=k?k:{}).map((B=>({injectionName:B,data:k[B]})))}static loadWithInjectedValuesFromGUID(k,B,U,F){const j=new G._mx(F);j.addComponent(G.dLy);const $=j.addComponent(G.bE_);for(const G in U)$.Container.bind(G).toConstantValue(U[G]);const H=Object.keys(null!=U?U:{}).map((k=>({injectionName:k,data:U[k]})));return k.loadFromGUID(B,j,H)}static updateInjectedValues(k,B,U=!0){let F=k.findComponent(G.bE_);const $=!F;$&&(F=k.addComponent(G.bE_));for(const G in B)F.Container.rebind(G).toConstantValue(B[G]);let H=k.findComponentsInChildren(j.B,U);const V=Object.keys(B);H=H.filter((k=>V.includes(k.id)));for(const G of H)G.consumeOnUpdatedInjectedValue&&G.consume();$&&F.destroy()}static updateInjectedValuesWithDelay(k,B){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U=!0,F=0){yield G.Egh.timeout(F).then((()=>$.updateInjectedValues(k,B,U)))}))}}},19690:(k,B,U)=>{"use strict";U.d(B,{Ks:()=>j,mD:()=>G,vt:()=>$});var F=U(35120);const G=()=>F.q.instance.prodigy.icon,j=()=>F.q.instance.prodigy.gameContainer.get("d0e-64fd"),$=()=>F.q.instance.prodigy.create},20404:(k,B,U)=>{"use strict";U.d(B,{b:()=>j});var F=U(62459),G=U(77938);class j{static getQueryParameterByName(k,B=window.location.href){const U=new RegExp(`[?&]${k}(=([^&#]*)|&|#|$)`).exec(B);return U?U[2]?decodeURIComponent(U[2].replace(/\+/g," ")):"":null}static getQueryParameterAssetID(k,B){if(F.Aq$.isDefined(B)&&0!==B.length){const U=G.t.getCategoryItems("queryParameter").filter((U=>U.data.key===k&&new RegExp(U.data.value).test(B)));if(U.length>0)return U.length>1&&F.VyI.log("Multiple assetIDs found. Multiple assets for the same query parameter is not supported.",F.$bb.Warning),U[0].ID}}static isQueryParameterSetForSession(k){const B=G.t.getItem("queryParameter",k),U=B.data.key;return new RegExp(B.data.value).test(j.getQueryParameterByName(U))}static getQueryParameterKeyFromID(k){return G.t.getItem("queryParameter",k).data.key}}},76945:(k,B,U)=>{"use strict";U.d(B,{o:()=>H});var F=U(62459),G=U(95891),j=U(43924),$=U.n(j);class H{static integerInRange(k,B){return Math.floor(H.realInRange(k,B))}static realInRange(k,B,U){if(F.Aq$.isDefined(U)){return new F.bsf([U]).realInRange(k,B)}return Math.random()*(B-k)+k}static seededRandom(k){return $()(k.toString())()}static seededRange(k,B,U){return Math.floor(this.seededRandom(U)*(B-k+1)+k)}static normalDistribution(k,B){let U=0;for(let F=0;F<6;F++)U+=Math.random();return U/=6,k+U*(B-k+1)}static weightedArrayElement(k,B){let U=0;const j=[];if(!F.Aq$.isDefined(G.find(k,(k=>k.weight<=0)))&&k.length>0){const $=Math.round(1/(G.minBy(k,"weight").weight/100));for(let B=0;B{"use strict";U.d(B,{R:()=>$});var F=U(87490),G=U(62459),j=U(34829);class ${static applyRewardsScalar(k,B=1){return Math.ceil(k*B)}static addDebugMessage(k){this._debugBuffer.add(k)}static outputDebugMessages(){this._debugBuffer.flush()}static bucketRewards(k){let B=[];const U=new Map;return k.forEach((k=>{if("gold"===k.type||"currency"===k.type){let B=k.ID;"currency"===k.type&&1===k.ID?k.type="gold":"gold"===k.type&&(B=1),U.has(B)?U.get(B).push(k):U.set(B,[k])}else B.push(k)})),B=[...B,...Array.from(U.values()).map((k=>{var B;const U=k.reduce(((k,B)=>k+B.N),0);return $.addDebugMessage(`${k[0].type} ${null!==(B=k[0].ID)&&void 0!==B?B:""} with values [${k.map((k=>k.N)).join(", ")}] has been bucketed to ${U}`),Object.assign(Object.assign({},k[0]),{N:U})}))],B}static scaleRewards(k,B){return k.map((k=>{var U;if("gold"===k.type||"currency"===k.type){const F=$.applyRewardsScalar(k.N,B);return $.addDebugMessage(`Scaling ${k.type} ${null!==(U=k.ID)&&void 0!==U?U:""} from ${k.N} x ${B} = ${F}`),Object.assign(Object.assign({},k),{N:F})}return k}))}static bucketAndScaleRewards(k,B){const U=$.bucketRewards(k);return $.scaleRewards(U,B)}static shouldShowRewardsScalingWarning(k){return!!(G.Aq$.isDefined(k)&&G.Aq$.isDefined(k.rewardsScalar)&&G.Aq$.isDefined(k.levelDelta))&&(k.rewardsScalar<1&&k.levelDelta>=5)}}$._debugBuffer=new class{constructor(k,B=25,U=G.$bb.Info){this._buffer=[],this._typeListConstant="GameConstants.Debug.DISPLAY_CLIENT_DEBUG_MESSAGES",this._type=k,this._maxLength=B,this._logLevel=U}add(k){this.isSubscribed()&&(this._buffer.length>=this._maxLength&&this.flush(),this._buffer.push(k))}getBuffer(){return this._buffer.join("\n")}flush(){this.getBuffer();this.clear()}clear(){this._buffer=[]}isSubscribed(){const k=j.s.get(this._typeListConstant);return!!G.Aq$.isDefined(k)&&k.includes(this._type)}}(F.EDebugMessageType.RewardScaling)},92864:(k,B,U)=>{"use strict";U.d(B,{t:()=>G});var F=U(62459);class G{constructor(k){this.seed=k,this.currentSeed=k}next(){return this.currentSeed=this.currentSeed+G.CONSTANT,this.generate(this.currentSeed)}jumpFromStart(k){let B=0;for(let U=0;U<=k;U++)B=this.generate(this.seed+U*G.CONSTANT);return B}jump(k){let B=this.generate();for(let U=0;U{"use strict";U.d(B,{o:()=>G});var F=U(62459);function G(k){return class extends k{addListenerToSignal(k,B){k.add(B);this.OnDestroy.addOnce((()=>{k.remove(B)}))}addOneTimeListenerToSignal(k,B){k.addOnce(B);this.OnDestroy.addOnce((()=>{k.remove(B)}))}addListenerToObservable(k,B,U){k.addListener(B,U);this.OnDestroy.addOnce((()=>{k.removeListener(B,U)}))}addListenerToPromise(k,B,U){const G=this.createTidySignal();this.addOneTimeListenerToSignal(G,B),k.then((k=>{null==G||G.dispatch(k)})).catch(null!=U?U:F.RQr.createHandler)}createTidySignal(){const k=new F.HN0;return this.OnDestroy.addOnce((()=>{k.dispose()})),k}}}},67462:(k,B,U)=>{"use strict";U.d(B,{U:()=>F,x:()=>H});var F,G=U(62459),j=U(95891),$=U(77938);!function(k){k.Native="native",k.Foreign="foreign",k.Weapon="weapon",k.SpellRelic="spellRelic"}(F||(F={}));class H{static getSpellTierAtLevel(k,B){const U=j.sortBy(B);return j.sortedLastIndex(U,k)}static getNextTierSpell(k,B){let U=$.t.getItem("spell",k);for(let F=0;F{"use strict";U.d(B,{f:()=>$});var F=U(62459),G=U(68910),j=U(35120);class ${static resizeSpriteMaintainingAspectRatio(k,B,U){k.width>k.height?k.scale.x=k.scale.y=B/k.width:k.scale.x=k.scale.y=U/k.height}static trimTransparentPixels(k,B,U=0){if(!(null==k?void 0:k.texture))return k;const F=k.texture,j=F.frame,$=B.extract.pixels(k),H=Math.floor(k.width),V=Math.floor(k.height);if(!$||H<=1||V<=1)return k;let W=H,q=V,K=0,z=0;for(let G=0;GU&&(W=Math.min(W,k),K=Math.max(K,k),q=Math.min(q,G),z=Math.max(z,G))}if(W>K||q>z)return k;const Y=K-W+1,Q=z-q+1;if(0===W&&0===q&&Y===H&&Q===V)return k;const X=new G.Sprite(new G.Texture(F.baseTexture,new G.Rectangle(j.x+W,j.y+q,Y,Q)));return X.anchor.copyFrom(k.anchor),X.position.copyFrom(k.position),X.scale.copyFrom(k.scale),X.rotation=k.rotation,X.alpha=k.alpha,X.tint=k.tint,X}static getScaledTextureFromSpriteWithAspectRatio(k,B,U){let $=B,H=U;(!F.Aq$.isDefined(B)||!F.Aq$.isDefined(U)||B<=0||U<=0)&&(F.VyI.log("SpriteUtils: Invalid maxWidth or maxHeight provided for SpriteUtils#getScaledTextureFromSpriteWithAspectRatio(). Falling back to the sprite's original dimensions",F.$bb.Error),$=k.width,H=k.height);const V=k.texture.width,W=k.texture.height,q=V>W?$/V:H/W,K=($-V*q)/2,z=(H-W*q)/2,Y=(new G.Matrix).scale(q,q).translate(K,z),Q=G.RenderTexture.create({width:$,height:H});return j.q.instance.game.renderer.render(k,{renderTexture:Q,transform:Y}),F.qFr.setSmoothed(Q,!0),Q}}},59701:(k,B,U)=>{"use strict";U.d(B,{W:()=>K});var F=U(95891),G=U.n(F),j=U(88022),$=U(91207),H=U(77938),V=U(16847),W=U(64794),q=U(30405);class K{static getItemOwnedQuantity(k,B){return"item"===B.type?k.backpack.hasItem(B.type,B.ID):"dorm"===B.type?k.house.getOwned(B.ID):K.isMathTowerConsumableItem(B.type)?k.backpack.hasItem(B.type,B.ID):-1}static isItemLevelLocked(k,B){return q.o.isLevelLocked(k,B.data.lockLevel)}static isItemOwned(k,B){return k.isItemOwned({type:B.type,ID:B.ID})}static isItemMemberLocked(k){return 1===k.data.member}static isMathTowerConsumableItem(k){return k===W.D.ASSET_TYPE_FRAME||k===W.D.ASSET_TYPE_DECORATION||k===W.D.ASSET_TYPE_STREET_FURNITURE}static isPrimaryMajorZoneStore(k){return[5,6,7,8,19].includes(k)}}K.getCurrencyIcon=G().memoize(((k,B)=>{var U,F;let G,W;switch(k){case V.h.ByItem:const k=$.P[`Icon_currency_${B}`];if(k){G=k;break}27!==B?(G=j._.General_icons_json,W=null===(F=null===(U=H.t.getItem("currency",B))||void 0===U?void 0:U.data)||void 0===F?void 0:F.icon):(G=j._.Ui_hard_currency_json,W="icon-currency-27-small");break;case V.h.ByType:G=$.E.getIconForType("currency",B);break;case V.h.ByTypeForStore:G=$.E.getIconForType("currency",B,"_store"),G===$.E.MISSING_ASSET_GUID&&(G=$.E.getIconForType("currency",B))}return{atlas:G,frame:W}}),((...k)=>k.join()))},44094:(k,B,U)=>{"use strict";U.d(B,{$:()=>j});var F=U(62459),G=U(29738);class j{static toKebabCase(k){return k?String(k).match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).map((k=>k.toLowerCase())).join("-"):""}static toTitleCase(k){return k.replace(/([a-z])([A-Z])/g,"$1 $2").split(" ").map((k=>k.charAt(0).toUpperCase()+k.slice(1))).join(" ").trim()}static replaceAll(k,B,U){return k?String(k).split(B).join(U):""}static stringsToPath(k){return k.filter((k=>k)).map((k=>this.toKebabCase(k))).join(".")}static capitalizeFirstLetter(k){return k.charAt(0).toUpperCase()+k.slice(1).toLowerCase()}static intToNth(k){if(G.O.isEnglishLocale()){if(!(k<1||k>99))return k<5?this.onesExceptions[k-1]:k<10?`${this.prefix[k-2]}h`:k<13?this.tensExceptions[k-10]:14===k?"fourteenth":k<19?`${this.prefix[k-12]}eenth`:19===k?"nineteenth":k%10==0?`${this.prefix[Math.floor(k/10)-2]}ieth`:`${this.prefix[Math.floor(k/10)-2]}y-${this.intToNth(k%10)}`;F.VyI.log("Unsupported integer range",F.$bb.Error)}return k.toString()}static isString(k){return"string"==typeof k||k instanceof String}static isTruthy(k){return this.isString(k)?!["","0","false","null","undefined","nan"].includes(k.toLowerCase()):!!k}static generateUID(k="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"){let B=(new Date).getTime();"undefined"!=typeof performance&&"function"==typeof performance.now&&(B+=performance.now());return k.replace(/[xy]/g,(k=>{const U=(B+16*Math.random())%16|0;return B=Math.floor(B/16),("x"===k?U:3&U|8).toString(16)}))}static addOrdinalSuffix(k){if(!F.Aq$.isDefined(k)||k<=0)return F.VyI.log("Unsupported integer",F.$bb.Warning),null;if(G.O.isEnglishLocale()){const B=k%10,U=k%100;return 1===B&&11!==U?`${k}st`:2===B&&12!==U?`${k}nd`:3===B&&13!==U?`${k}rd`:`${k}th`}return k.toString()}static truncate(k,B,U){if(k.length<=B)return k;let F=k.slice(0,B);return U&&(F=F.slice(0,F.length-2).concat("...")),F}static containsURL(k){return/(https?:\/\/[^\s]+)/g.test(k)}static normalizeStringAndToLowercase(k){return k.toLowerCase().replace(/[^a-z0-9]+/g,"")}static isValidHex(k){let B=!1;if("string"==typeof k){const U=parseInt(k.replace("#",""),16);B=!isNaN(U)}else B="number"==typeof k&&k>=0;return B||F.VyI.log(`isValidHex: ${k} is not a valid hex string or number`,F.$bb.Warning),B}}j.onesExceptions=["first","second","third","fourth"],j.tensExceptions=["tenth","eleventh","twelfth"],j.prefix=["twent","thirt","fort","fift","sixt","sevent","eight","nint"]},79422:(k,B,U)=>{"use strict";U.d(B,{h:()=>G});var F=U(62459);class G extends F.s3P{constructor(){super(...arguments),this.loggingTag=null}setTag(k){this.loggingTag=k}logMessage(k){if(null!==this.loggingTag){this.getInjectedValue(`ENABLE_${this.loggingTag}_LOGGING`)&&F.VyI.log(`(${this.loggingTag}) - ${k}`,F.$bb.Verbose)}}}},71586:(k,B,U)=>{"use strict";U.d(B,{R:()=>G});var F=U(35120);class G{static getNow(){return new Date(Date.now())}static isNowInRange(k,B){const U=F.q.instance.prodigy.timeManager.getServerTimeMs(),G=!k||new Date(k).getTime()U;return G&&j}static getISOWeekNumber(k){const B=new Date(k);B.setHours(0,0,0,0),B.setDate(B.getDate()+3-(B.getDay()+6)%7);const U=new Date(B.getFullYear(),0,4);return 1+Math.round(((B.getTime()-U.getTime())/864e5-3+(U.getDay()+6)%7)/7)}static getCurrentMonthName(){return(new Date).toLocaleString("en-US",{month:"long"})}static getISOYearNumber(k){const B=new Date(k);return B.setDate(B.getDate()+3-(B.getDay()+6)%7),B.getFullYear()}static getTimezoneOffset(){return-(new Date).getTimezoneOffset()}static getNowWithServerTimezoneOffset(){return new Date(Date.now()-6e4*G.getTimezoneOffset()+6e4*G.SERVER_PLAYER_TIMEZONE_OFFSET)}static getDaysUntilNextMonth(){const k=new Date,B=new Date(k.getFullYear(),k.getMonth()+1,1).getTime()-k.getTime();return Math.ceil(B/864e5)}static findPreviousMonthWithYear(k){const B=k.getUTCMonth(),U=k.getUTCFullYear();return{month:0===B?11:B-1,year:0===B?U-1:U}}static getDateTime(){const k=new Date(Date.now());return new Date(k.getUTCFullYear(),k.getUTCMonth(),k.getUTCDate()).getTime()}static getDateTimeLocal(){const k=G.getNowWithServerTimezoneOffset();return new Date(k.getFullYear(),k.getMonth(),k.getDate()).getTime()}static getDateTimeTomorrowLocal(){const k=G.getNowWithServerTimezoneOffset();return new Date(k.getFullYear(),k.getMonth(),k.getDate()+1).getTime()}}G.SERVER_PLAYER_TIMEZONE_OFFSET=G.getTimezoneOffset()},84415:(k,B,U)=>{"use strict";U.d(B,{a:()=>j});var F=U(35120),G=U(15821);class j{static isFeatureReadyForNextInteraction(k,B){var U,G;if(B<0)return!1;const j=1e3*B,$=null===(G=null===(U=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.featureInteractionTimestamps)||void 0===U?void 0:U[k])||void 0===G?void 0:G.timestamp;return Date.now()-j>=(null!=$?$:0)}static saveTimestampData(k,B){const U=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player;U.data.featureInteractionTimestamps=Object.assign(Object.assign({},U.data.featureInteractionTimestamps),{[k]:Object.assign({timestamp:Date.now()},B)}),U.updated=!0}static getTimestampData(k){var B;return null===(B=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.featureInteractionTimestamps)||void 0===B?void 0:B[k]}static doesFeatureTimestampExist(k,B){var U,F;const j=null===(F=null===(U=k.data.featureInteractionTimestamps)||void 0===U?void 0:U[B])||void 0===F?void 0:F.timestamp;return G.A.isDefined(j)}static doesAnyFeatureTimestampExist(k,B){var U,F;for(const j of B){const B=null===(F=null===(U=k.data.featureInteractionTimestamps)||void 0===U?void 0:U[j])||void 0===F?void 0:F.timestamp;if(G.A.isDefined(B))return!0}return!1}static getMostRecentFeatureTimestamp(k,B){var U,F;let j=0;for(const $ of B){const B=null===(F=null===(U=k.data.featureInteractionTimestamps)||void 0===U?void 0:U[$])||void 0===F?void 0:F.timestamp;G.A.isDefined(B)&&B>j&&(j=B)}return j}static clearFeatureTimestamp(k,B=!1){const U=F.q.instance.prodigy.gameContainer.get("306-5359");U.data.featureInteractionTimestamps&&(delete U.data.featureInteractionTimestamps[k],B?U.forceSaveCharacter():U.updated=!0)}}},13021:(k,B,U)=>{"use strict";U.d(B,{w:()=>G});var F=U(35120);class G{static isTitanMap(k){return k.toLowerCase().endsWith("-titan")}static isInTitanParty(){var k,B;return null!==(B=null===(k=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player.coOpTeamHandler)||void 0===k?void 0:k.IsOnTeam)&&void 0!==B&&B}}},67238:(k,B,U)=>{"use strict";U.d(B,{D:()=>j});var F=U(8674),G=U(76546);class j extends G.D{makeCloudscriptRequest(k,B){const U=Object.create(null,{makeCloudscriptRequest:{get:()=>super.makeCloudscriptRequest}});return(0,F.sH)(this,arguments,void 0,(function*(k,B,F=!0){return U.makeCloudscriptRequest.call(this,k,B,F)}))}call(k,B,U){const G=Object.create(null,{makeCloudscriptRequest:{get:()=>super.makeCloudscriptRequest}});return(0,F.sH)(this,void 0,void 0,(function*(){return G.makeCloudscriptRequest.call(this,k,B,U)}))}}},20952:(k,B,U)=>{"use strict";U.d(B,{H:()=>H});var F=U(8674),G=U(62459),j=U(79687),$=U(44094);let H=class{constructor(){this._uuid="",this._identitySID="";const k=window.eventData;(null==k?void 0:k.uuid)?this._uuid=k.uuid:this._uuid=$.$.generateUID("xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx");{const k=window.SW.Load.userInfo?JSON.parse(window.SW.Load.userInfo()):window.userInfo;(null==k?void 0:k.sid)?this._identitySID=k.sid:G.VyI.log("Identity UUID not set",G.$bb.Warning)}}getUUID(){return this._uuid}getIdentitySID(){return this._identitySID}};H=(0,F.Cg)([(0,j.injectable)(),(0,F.Sn)("design:paramtypes",[])],H)},30226:(k,B,U)=>{"use strict";U.d(B,{J:()=>nt});var F=U(8674),G=U(62459),j=U(95891),$=U(95066),H=U(36525),V=U(17446),W=U(65240),q=U(73678),K=U(35120),z=(U(34829),U(77938)),Y=U(50503),Q=U(73797),X=U(52156),Z=U(62430),J=U(23082),tt=U(41674),et=U(98252),it=U(44094),st=U(71586);class nt{static capitalize(k){return G.Aq$.isDefined(k)?k.charAt(0).toUpperCase()+k.slice(1):""}static getDate(){const k=new Date,B=k.getDate(),U=k.getMonth()+1;let F=`${B}`,G=`${U}`;return B<10&&(F=`0${B}`),U<10&&(G=`0${U}`),`${G}${F}${k.getFullYear()}`}static getDateId(){return Math.floor((new Date).getTime()/864e5)}static getDayName(k,B){return K.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(`WEEKDAY_NAME_${B}`)}static addDays(k,B){const U=new Date(k);return U.setDate(U.getDate()+B),U}static convertItemToIcon(k){return"gold"===k.type?"item/26":"spell"===k.type?(k.data=G.Aq$.isDefined(k.data)?k.data:z.t.getItem(k.type,k.ID).data,k.data.element):"boss"===k.type?"boss":"player"===k.type?"player":"dorm"===k.type?`${k.ID}`:G.Aq$.isDefined(k.metadata)&&G.Aq$.isDefined(k.metadata.icon)?String(k.metadata.icon):G.Aq$.isDefined(k.type)&&G.Aq$.isDefined(k.ID)?`${k.type}/${k.ID}`:G.Aq$.isDefined(k.tag)?k.tag:"string"==typeof k?k:"empty"}static numberToString(k){const B=`${k}`;let U="",F=1;for(let G=B.length-1;G>=0;G--)U=`${B.charAt(G)}${U}`,F%3==0&&F>0&&G>0&&(U=`,${U}`),F++;return U}static isSchoolHours(){const k=st.R.getNow().getHours(),B=nt.getSchoolStartHour(),U=nt.getSchoolEndHour();return k>=B&&k<=U-1}static isDateWithinSchoolHours(k){const B=k.getHours(),U=nt.getSchoolStartHour(),F=nt.getSchoolEndHour();return B>=U&&B=16&&k<=23}static isNightTimeLocal(){const k=st.R.getNowWithServerTimezoneOffset().getHours();return k>=16&&k<=23}static isDefined(k){return!(null==k||"null"===k)}static has(k,B){if(G.Aq$.isDefined(k)){const U=B.split(".");let F=k;for(let k=0;kthis.removeFromArray(k,F,U))),F}static equalArrayContents(k,B){if(k===B)return!0;if(null===k||null===B)return!1;if(k.length!==B.length)return!1;const U=[...k];for(const F of B)if(!this.removeFromArray(F,U))return!1;return!(U.length>0)}static removeFromArray(k,B,U=((k,B)=>k===B)){for(let F=0;F$.width&&($.width=U.width),$.height+=U.height}$.height/=k.length}let H=U?0:B.x,V=U?0:B.y;G.Aq$.isDefined(F)&&(H+=G.Aq$.isDefined(F.x)?F.x:0,V+=G.Aq$.isDefined(F.y)?F.y:0);const W=nt.calculateItemSpacing(k.length,$.width,B.width),q=nt.calculateItemSpacing(1,$.height,B.height),K=V+nt.calculateItemCoordinate(0,$.height,q);k.forEach(((k,B)=>{k.x=H+nt.calculateItemCoordinate(B,$.width,W),k.y=K}))}static frameDataToFrameJson(k){const B={};for(let U=0;U0||"item"===k.type&&F.backpack.hasItem("item",k.ID)>0||"spell"===k.type&&G.Aq$.isDefined(F.data.spells)&&-1!==F.data.spells.indexOf(k.ID)||U.push(k)}return U}static validateVersion(k){return/^[0-9-]+$/.test(k)?k:"undefined"}static joinByProperty(k,B,U=","){let F="";const G=k.length;for(let j=0;j=0||k.indexOf("dev.prodigygame.org")>=0?U="test":k.indexOf("prodigygame.net")>=0||B.indexOf("env=dev")>=0?U="dev":k.indexOf("prodigygame.org")>=0||B.indexOf("env=staging")>=0?U="staging":(k.indexOf("prodigygame.com")>=0||B.indexOf("env=production")>=0||B.indexOf("env=prod")>=0)&&(U="production"),U}static getEnvironmentByHost(){const k=window.location.host;let B="local";return k.indexOf("-qa")>=0||k.indexOf("dev.prodigygame.org")>=0?B="test":k.indexOf("prodigygame.net")>=0?B="dev":k.indexOf("prodigygame.org")>=0?B="staging":k.indexOf("prodigygame.com")>=0&&(B="production"),B}static getOptionalParameter(k,B){return void 0===k?B:k}static getRealWorldPosition(k,B,U){return U?{x:k+U.viewMatrix.tx,y:B+U.viewMatrix.ty}:{x:k,y:B}}static safeDeleteObjectProperty(k,B){G.Aq$.isDefined(k[B])&&delete k[B]}static deleteFieldsWithNullsOrEmptyStrings(k,B=!1){for(const U in k)k.hasOwnProperty(U)&&(""===k[U]?(B&&G.VyI.log(`Util.deleteFieldsWithNullsOrEmptyStrings - deleted key with empty string value named: ${U}`,G.$bb.Verbose),delete k[U]):null===k[U]?(B&&G.VyI.log(`Util.deleteFieldsWithNullsOrEmptyStrings - deleted key with null value named: ${U}`,G.$bb.Verbose),delete k[U]):"object"==typeof k[U]&&nt.deleteFieldsWithNullsOrEmptyStrings(k[U]))}static validateString(k,B=""){for(let U=0;Uk));K.q.instance.prodigy.open.resultsMenu($,G,[],[],void 0,F,!1).onClose=()=>{j.forceSaveCharacter(),null==U||U()}}static setOuterWidth(k,B){k.style.width=B-(k.style.borderLeftWidth?parseInt(k.style.borderLeftWidth):0)-(k.style.borderRightWidth?parseInt(k.style.borderRightWidth):0)+"px"}static setOuterHeight(k,B){k.style.height=B-(k.style.borderTopWidth?parseInt(k.style.borderTopWidth):0)-(k.style.borderBottomWidth?parseInt(k.style.borderBottomWidth):0)+"px"}static shouldSuppressAd(k,B=!0){return k.isPlayingAtSchool()&&(!B||!k.hasMembership())}static showYouTubeMembershipAd(k,B=!0,U){const F=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,$=j.data.membershipVideoTimeStamp;return F.getValue("enableMembershipVideoAd",!1)&&!j.isPlayingAtSchool()&&!(()=>{const k=F.getValue("disableMembershipVideoAdDuringSchoolHours",!0),B=F.getValue("useServerTimeForVideoLockout",!0)?new Date(K.q.instance.prodigy.timeManager.getServerTimeMs()):new Date;return k&&nt.isSchoolDay(B)&&nt.isDateWithinSchoolHours(B)})()&&!et.pF.isNativeApp()&&!(B&&G.Aq$.isDefined($)&&nt.isDateWithinSameDay(new Date($),new Date(K.q.instance.prodigy.timeManager.getServerTimeMs())))}static isDateWithinSameDay(k,B){return k.getDate()===B.getDate()&&k.getMonth()===B.getMonth()&&k.getFullYear()===B.getFullYear()}static wrapArrayIndex(k,B){if(B<=0)return null;let U=k;for(;U<0;)U+=B;for(;U>=B;)U-=B;return U}static logUpdateUserFailed(k=1){const B=new H.i;B.setKey("prodigy_game.education.updateUserFailed"),B.setValue(k);K.q.instance.prodigy.gameContainer.get("e59-eea6").logStat(B,$.d.Increment),G.VyI.log("Education update user failed.",G.$bb.Error)}static logSetInitialGradesFailed(k=1){const B=new H.i;B.setKey("prodigy_game.education.setInitialGradesFailed"),B.setValue(k);K.q.instance.prodigy.gameContainer.get("e59-eea6").logStat(B,$.d.Increment),G.VyI.log("Education set initial grades failed.",G.$bb.Error)}static logSetCurriculumFailed(k=1){const B=new H.i;B.setKey("prodigy_game.education.setCurriculumFailed"),B.setValue(k);K.q.instance.prodigy.gameContainer.get("e59-eea6").logStat(B,$.d.Increment),G.VyI.log("Education set curriculum failed.",G.$bb.Error)}static createTransformEffectAssetKey(k){const B=k.effect.transform,U=k.effect.ID,F=z.t.getItem(B,U);return"spine"===F.metadata.assets.default.type?Z.N.createSpineAssetSourceName(F,B,U):X.X.createImageAssetSourceName(B,U)}static isTransformEffectLoaded(k){const B=k.effect.transform,U=k.effect.ID,F=z.t.getItem(B,U),G=this.createTransformEffectAssetKey(k);return"spine"===F.metadata.assets.default.type?K.q.instance.game.cache.checkSpineKey(G):K.q.instance.game.cache.checkImageKey(G)}static getEnvironmentURL(){let k="";switch(nt.getEnvironment()){case"test":case"local":k=window.location.hostname;break;case"dev":k="www.prodigygame.net";break;case"staging":k="www.prodigygame.org";break;case"production":k="www.prodigygame.com"}return k}static convertItemDefinitionToItemDrop(k){return k.map((k=>({ID:k.ID,type:k.type,N:k.quantity})))}static getPurchasePrice(k,B){var U;return null!==(U=k.price)&&void 0!==U?U:B.getAmount()}static isCoreZone(k){return q.s0.includes(k)}static isAvgFrameRateAboveThreshold(k){return K.q.instance.game.fps.getAverageFramerate()>=k}static cacheAsBitmap(k,B){k.cacheAsBitmap=!1,B&&(k.cacheAsBitmap=B)}static asyncFilter(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=yield Promise.all(k.map(B));return k.filter(((k,B)=>U[B]))}))}static isGuid(k){if(!k)return!1;return/^[A-F\d]{8}-[A-F\d]{4}-4[A-F\d]{3}-[89AB][A-F\d]{3}-[A-F\d]{12}$/i.test(k)}static applyBlurToScreen(k=!0){K.q.instance.prodigy.game.input.enabled=!k;const B=K.q.instance.game.state.getCurrentState().key;if(B===J.G.TileScreen){const U=K.q.instance.game.state.get(B);(null==U?void 0:U.isMapScreen)&&(null==U?void 0:U.complete)&&(U.opaque.visible=k,U.bitmapCacheContainer(k,U.opaque,!0))}}static callAfterFrameDelay(k,B=1){let U=0;const F=()=>{U++,U>=B&&(k(),K.q.instance.game.app.ticker.remove(F))};K.q.instance.game.app.ticker.add(F)}static waitForFrames(){return(0,F.sH)(this,arguments,void 0,(function*(k=1){yield new Promise((B=>nt.callAfterFrameDelay((()=>B()),k)))}))}static isObjectOnScreen(k){if(!k.active)return!1;const{width:B,height:U}=G.W$e.instance.game,F=k.findComponent(G.XVE);if(G.Aq$.isDefined(F)){const k=F.worldPosition.x,G=F.worldPosition.y,j=k+F.widthDelta,$=G+F.heightDelta;return k<=B&&j>=0&&G<=U&&$>=0}const j=k.transform;return j.worldPosition.x=0&&j.worldPosition.y=0}static getItemName(k,B=!1){const U=K.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),F=this.getLocalizationNameKey(k);if(B){const k=`${F}S`;if(U.hasText(k))return U.getText(k)}return U.getText(F)}static getLocalizationNameKey(k,B){return nt.resolveLocalizationKey(k,B,"NAME")}static getLocalizationFlavorKey(k,B){return nt.resolveLocalizationKey(k,B,"FLAVORTEXT")}static getLocalizationActiveNameKey(k,B){return nt.resolveLocalizationKey(k,B,"ACTIVENAME")}static getLocalizationActiveFlavorKey(k,B){return nt.resolveLocalizationKey(k,B,"ACTIVEFLAVORTEXT")}static resolveLocalizationKey(k,B,U){var F;if(!k||"string"==typeof k&&!G.Aq$.isDefined(B))return"";return`${"string"==typeof k?k:String(k.type)}_${"string"==typeof k?B:null!==(F=k.ID)&&void 0!==F?F:k.id}_${U}`.toUpperCase()}}nt.DEBUG_DAY_LENGTH=864e5},48982:(k,B,U)=>{"use strict";U.d(B,{h:()=>V});var F=U(76253),G=U(35120),j=U(65050),$=U(53661),H=U(84415);class V{static selectNextVideoInFeature(k,B){var U,F;const j=null===(F=null===(U=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.featureInteractionTimestamps)||void 0===U?void 0:U[k])||void 0===F?void 0:F.videoId;let $=0;if(j){const k=B.indexOf(j)+1;$=k{"use strict";U.d(B,{u:()=>j});var F=U(62459),G=U(35120);class j{static getGameApiStatusData(){try{return Object.assign(Object.assign({},window.gameApiStatusData),window.gameApiStatusData.prodigyGameFlags)}catch(e){return F.VyI.log("Could not load game api status",F.$bb.Error),[]}}static fetchGameApiStatusData(k){let B=3;const U=new XMLHttpRequest;U.onreadystatechange=()=>{U.readyState===XMLHttpRequest.DONE&&(200===U.status?(window.gameApiStatusData=U.response.data,k(j.getGameApiStatusData())):B>0?(B--,j.fetchGameApiStatusData(k)):window.statusErrored=!0)};const F=`${G.q.instance.prodigy.urlProvider.getAPIRootUrl()}/game-api/status`;U.responseType="json",U.open("GET",F,!0),U.send("")}static showLoaderIfHidden(){window.prodigyLoaderHidden&&(window.SW.Load.setLoadingVisible(!0),window.prodigyLoaderHidden=!1)}}},64271:(k,B,U)=>{"use strict";U.d(B,{N:()=>W});var F,G=U(62459),j=U(40392),$=U(73678),H=U(15989),V=U(30226);!function(k){k.LevelPrerequisite="LevelPrerequisite",k.ZonePrerequisite="ZonePrerequisite",k.MultipleZonePrerequisite="MultipleZonePrerequisite",k.None="None"}(F||(F={}));class W{static sortZonesByLevel(k){return k.filter((k=>V.J.isCoreZone(k.zone))).sort(((k,B)=>{var U,F;return(null!==(U=null==k?void 0:k.getRequiredLevel())&&void 0!==U?U:0)-(null!==(F=null==B?void 0:B.getRequiredLevel())&&void 0!==F?F:0)}))}static sortZonesBySinglePrerequisite(k){const B=[...k],U=B.find((k=>k.zone===$.A_.SHIVERCHILL));if(U&&(U.requirementsID=33),B.some((k=>{var B;return(null!==(B=k.getZonePrerequisites().length)&&void 0!==B?B:0)>=1})))return G.VyI.log("Zones have multiple or no prerequisites. Cannot sort by single prerequisites. Returning unsorted zones!",G.$bb.Warning),k;const F=new Map(k.map((k=>[k.getZonePrerequisites()[0],k]))),j=[];let H=k.find((k=>!k.getZonePrerequisites()[0]));for(;H;)j.push(H),H=F.get(H.zone);return j}static sortZonesByNumPrerequisite(k){return[...k].sort(((k,B)=>{var U,F;return(null!==(U=k.getZonePrerequisites().length)&&void 0!==U?U:0)-(null!==(F=B.getZonePrerequisites().length)&&void 0!==F?F:0)}))}static getCoreZonesInOrder(k=j.i.getDifficultyMode()){const B=j.i.BUTTONS_CONFIG.filter((B=>B.difficultyMode===k&&V.J.isCoreZone(B.zone)));switch(W.getCoreZoneRequirementType(B)){case F.LevelPrerequisite:return this.sortZonesByLevel(B);case F.ZonePrerequisite:return this.sortZonesBySinglePrerequisite(B);case F.MultipleZonePrerequisite:return this.sortZonesByNumPrerequisite(B);case F.None:default:return G.VyI.log("Zones have mixed or no prerequisites. Returning unsorted zones!",G.$bb.Warning),B}}static getCoreZoneRequirementType(k){const B=k.filter((k=>k.nameKey!==H.NJ.FireflyForest&&k.nameKey!==H.NJ.ShiverchillMountains));if(B.every((k=>void 0!==k.getRequiredLevel())))return F.LevelPrerequisite;if(B.every((k=>0!==(null==k?void 0:k.getZonePrerequisites().length)))){return B.some((k=>{var B;return(null!==(B=k.getZonePrerequisites().length)&&void 0!==B?B:0)>1}))?F.MultipleZonePrerequisite:F.ZonePrerequisite}return F.None}}},80882:(k,B,U)=>{"use strict";U.d(B,{y:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this.constant=!1,this.isTrue=new G.HN0,this.isFalse=new G.HN0}fireBooleanSignal(k){(k?this.isTrue:this.isFalse).dispatch()}fireBooleanSignalAgainstConstant(){(this.constant?this.isTrue:this.isFalse).dispatch()}destroy(){this.isTrue.dispose(),this.isFalse.dispose(),super.destroy()}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"constant",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"isTrue",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"isFalse",void 0),$=(0,F.Cg)([(0,G.EVk)("BooleanSignal",j.Y.utility)],$)},77713:(k,B,U)=>{"use strict";U.d(B,{h:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(80060);let H=class extends G.uAl{constructor(){super(...arguments),this.defaultPrefabGuid="",this.loadWithDependencies=!0,this.contentLoadedSignalName="",this._waitForAllLoadedToActivate=!0,this._clearOnSpawn=!1,this.onPrefabSpawned=new G.HN0,this.onAllPrefabsSpawned=new G.HN0,this.onSpawnStart=new G.HN0,this.onAllImagesLoaded=new G.HN0,this.spawnedPrefabs=[],this._spawnPrefabsPromise=null}spawnDefaultPrefabsFromDataArray(k){return(0,F.sH)(this,arguments,void 0,(function*(k,B=this.container){this.defaultPrefabGuid?yield this.spawnPrefabsFromDataArray(this.defaultPrefabGuid,k,B):G.VyI.log("DataArrayPrefabSpawnerComponent: No default prefab GUID set, cannot spawn prefabs",G.$bb.Error)}))}spawnPrefabsFromDataArray(k,B){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U=this.container,F=!1){yield this._spawnPrefabsPromise,this._spawnPrefabsPromise=new G.bnh,this.onSpawnStart.dispatch();const j=null!=U?U:this.gameObject,H=[],V=[];this._clearOnSpawn&&this.destroySpawnedPrefabs();for(const W of B){const B=new G._mx;B.active=!1,B.addComponent(G.dLy);B.addComponent(G.bE_).Container.parent=G.Uoy.getParentContainer(j);const U=this.loadWithDependencies?yield $.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,k,W,B).promise:$.d.loadWithInjectedValuesFromGUID(this._prefabLoader,k,W,B);if(this.contentLoadedSignalName)for(const k of U.findComponentsInChildren(G.uAl,!0)){const B=k[this.contentLoadedSignalName];if(B instanceof G.HN0&&0===B.dispatchCount){V.push(new Promise((k=>{B.addOnce(k)})));break}}if(this._waitForAllLoadedToActivate&&(U.active=!1,H.push(U)),!j||j.isDestroyed)return U.destroy(),void B.destroy();if(F){U.addComponent(G.bE_).bindInjectedValues(W)}U.parent=j,B.destroy(),this.spawnedPrefabs.push(U),this.onPrefabSpawned.dispatch(U)}if(this._waitForAllLoadedToActivate)for(const G of H)G.active=!0;this.onAllPrefabsSpawned.dispatch(),this._spawnPrefabsPromise.resolve(),Promise.all(V).then((()=>{this.gameObject.isDestroyed||this.onAllImagesLoaded.dispatch()})).catch(G.RQr.createHandler("DataArrayPrefabSpawnerComponent: Failed to resolve image load promises for spawned prefabs"))}))}spawnPrefabsFromDataArrayWithContext(k,B){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U=this.container){yield this.spawnPrefabsFromDataArray(k,B,U,!0)}))}destroySpawnedPrefabs(){for(const k of this.spawnedPrefabs)null==k||k.destroy();this.spawnedPrefabs.length=0}destroy(){this.onSpawnStart.dispose(),this.onPrefabSpawned.dispose(),this.onAllPrefabsSpawned.dispose(),this.onAllImagesLoaded.dispose(),super.destroy()}};(0,F.Cg)([(0,G.Cdj)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],H.prototype,"_prefabLoader",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"defaultPrefabGuid",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"loadWithDependencies",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],H.prototype,"container",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"contentLoadedSignalName",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_waitForAllLoadedToActivate",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_clearOnSpawn",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onPrefabSpawned",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onAllPrefabsSpawned",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onSpawnStart",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onAllImagesLoaded",void 0),H=(0,F.Cg)([(0,G.EVk)("DataArrayPrefabSpawner",j.Y.utility,"Spawns a prefab for each item in a data array, injecting the data into the prefab")],H)},10704:(k,B,U)=>{"use strict";U.d(B,{f:()=>K});var F=U(8674),G=U(62459),j=U(99625),$=U(11647),H=U(15821),V=U(80060),W=U(30226);let q=class extends((0,$.o)(G.uAl)){constructor(){super(...arguments),this.keepAlive=!1}get config(){return this._config}get attachedObject(){var k;return null===(k=this.gameObject)||void 0===k?void 0:k.children[0]}get isOnScreen(){return W.J.isObjectOnScreen(this.gameObject)}postCreate(){super.postCreate(),this.addListenerToSignal(this.gameObject.onChildAdded,(()=>{H.A.isDefined(this.config)&&this.setConfig(this.config)}))}setConfig(k){H.A.isDefined(this.attachedObject)&&(V.d.updateInjectedValues(this.attachedObject,k.data),this.matchTransform(this.attachedObject.findComponent(G.XVE))),this._config=k}matchTransform(k){var B;if(!H.A.isDefined(k))return void G.VyI.log("DynamicObjectPoolSlotContainerComponent can only match RectTransforms; transform passed was undefined",G.$bb.Warning);const{sizeDelta:U,anchorMax:F,anchorMin:j,pivot:$}=k,V=null!==(B=this.gameObject.findComponent(G.XVE))&&void 0!==B?B:this.gameObject.addComponent(G.XVE);V.setSizeDelta(U.width,U.height),V.setAnchorMax(F.x,F.y),V.setAnchorMin(j.x,j.y),V.setPivot($.x,$.y)}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],q.prototype,"keepAlive",void 0),q=(0,F.Cg)([(0,G.EVk)("DynamicObjectPoolSlotComponent")],q);let K=class extends((0,$.o)(G.uAl)){constructor(){super(...arguments),this.onObjectAddedToPool=this.createTidySignal(),this.onObjectAddedToSlot=this.createTidySignal(),this.debugSlotRect=!1,this.minimumPooledObjects=0,this.prefabGuids=[],this._objectPools=new Map,this._slots=[],this._changedSlots=new Set,this._didInitialPreload=!1,this._preloadedAssets=[]}destroy(){this.flushPool(),super.destroy()}update(){super.update(),G.Aq$.isDefined(this._preloadPromise)&&!this._didInitialPreload||(this._didInitialPreload?this.processChangedSlots():this._preloadPromise=this.preloadPrefabs(new Set(this.prefabGuids)).catch(G.RQr.createHandler("Error preloading DynamicObjectPoolManager prefabs")).finally((()=>{this._didInitialPreload=!0})))}spawnPrefabsWithData(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;if(!G.Aq$.isDefined(this.container))return G.VyI.log("DynamicObjectPoolManager requires a container object to spawn objects into!",G.$bb.Error),[];this._didInitialPreload||(yield this._preloadPromise);const F=new Set(k.map((({prefabGuid:k})=>k)));yield this.preloadPrefabs(F);const j=[];for(const[G,$]of k.entries()){const k=null!==(B=this._slots[G])&&void 0!==B?B:this.createObjectSlot(G);$.prefabGuid!==(null===(U=k.config)||void 0===U?void 0:U.prefabGuid)&&(this.returnSlotObjectToPool(k),this.updateSlotTransform(k,$.prefabGuid)),k.setConfig($),j.push(k),this._changedSlots.add(k)}return this._slots.length>j.length&&this.destroyObjectSlots(((k,B)=>B>=j.length)),this._slots=j,this.processChangedSlots(),this._slots}))}processChangedSlots(){0!==this._changedSlots.size&&this._didInitialPreload&&(this._changedSlots.forEach((k=>{const{attachedObject:B,keepAlive:U,isOnScreen:F}=k;if(F||U){if(F){if(G.Aq$.isDefined(B))return;this.attachPooledObjectToSlot(k)}}else this.returnSlotObjectToPool(k)})),this._changedSlots.clear())}destroyObjectSlots(k){var B;const U=[];for(const[F,G]of this._slots.entries())k(G,F)?(this.returnSlotObjectToPool(G),this._changedSlots.delete(G),null===(B=G.GameObject)||void 0===B||B.destroy()):U.push(G);this._slots=U}updateData(k){for(const[B,U]of this._slots.entries()){const F=k[B],j=G.Aq$.isDefined(F);U.GameObject.active!==j&&(U.GameObject.active=j,this._changedSlots.add(U)),j&&U.setConfig(F)}}updateDataAtIndex(k,B){var U;null===(U=this._slots[k])||void 0===U||U.setConfig(B)}getSlotAtIndex(k){return this._slots[k]}flushPool(k=!1){if(this.destroyObjectSlots((()=>!0)),this._objectPools.forEach((k=>{for(const B of k)B.destroy()})),this._objectPools.clear(),k)for(const B of this.prefabGuids)this.prespawnObjectsWithGuid(B)}createObjectSlot(k){const B=new G._mx,U=B.addComponent(G.XVE),F=B.addComponent(q);return this.debugSlotRect&&B.addComponent(G.Lom).setColor("00ff00"),B.name="dynamic-pool-placeholder",this.container.addChildAt(B,k),this.addListenerToSignal(U.onWorldMatrixChanged,(()=>{this._changedSlots.add(F)})),F}preloadPrefabs(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield Promise.all(Array.from(k).map((k=>(0,F.sH)(this,void 0,void 0,(function*(){if(this._preloadedAssets.includes(k))return;const B=this._preloadedAssets.push(k);try{yield this._prefabLoader.preloadFromGUIDWithDependencies(k),this._objectPools.set(k,this.prespawnObjectsWithGuid(k))}catch(e){throw this._preloadedAssets.splice(B-1,1),e}})))))}))}prespawnObjectsWithGuid(k){if(this.minimumPooledObjects<=0)return[];const B=[];for(let U=0;U{"use strict";U.d(B,{A:()=>$});var F=U(8674),G=U(62459),j=U(11647);class $ extends((0,j.o)(G.uAl)){constructor(){super(...arguments),this.showInState=[],this.onStateEnter=this.createTidySignal(),this.onStateExit=this.createTidySignal()}}(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],$.prototype,"showInState",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onStateEnter",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onStateExit",void 0)},40743:(k,B,U)=>{"use strict";U.d(B,{r:()=>q});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(15821),V=U(11647),W=U(41170);class q extends((0,V.o)(G.uAl)){constructor(){super(...arguments),this._stateComponents=[],this.onStateUpdated=this.createTidySignal(),this.debugDeactivate=!1,this.matchForState=k=>k.state===this._state}postCreate(){super.postCreate(),this._stateComponents=this.gameObject.findComponents(W.A),this.setState(this._state)}get currentState(){return this._state}setState(k){var B;const U=this._stateComponents.find(this.matchForState);if(this._state=k,this.debugDeactivate||!H.A.isDefined(this._state))return;const F=this._stateComponents.find(this.matchForState),G=[];null==F||F.blendStates.forEach((k=>{var B;const U=this._stateComponents.find((B=>B.state===k));G.push(...null!==(B=null==U?void 0:U.showInState)&&void 0!==B?B:[])}));const j=[...null!==(B=null==F?void 0:F.showInState)&&void 0!==B?B:[],...G],V=$().flatten(this._stateComponents.map((k=>k.showInState.filter((k=>!j.includes(k))))));j.forEach((k=>{k.active=!0})),V.forEach((k=>{k.active=!1})),this.onStateUpdated.dispatch(this._state),null==U||U.onStateExit.dispatch(),null==F||F.onStateEnter.dispatch()}}(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],q.prototype,"onStateUpdated",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],q.prototype,"debugDeactivate",void 0)},11191:(k,B,U)=>{"use strict";U.d(B,{N:()=>q});var F,G=U(8674),j=U(62459),$=U(68910),H=U(15821),V=U(11647),W=U(61917);let q=F=class extends((0,V.o)(j.y4o)){constructor(){super(...arguments),this.allowDepthSorting=!1,this._depthLayerContainers=new Map,this._depthValues=[],this._depthComponents=[]}getDimensions(){var k,B;return null!==(B=null===(k=this.gameObject.findComponent(j.XVE))||void 0===k?void 0:k.sizeDelta)&&void 0!==B?B:j.or0.ZERO}get _transform(){var k;return null!==(k=this._rectTransform)&&void 0!==k?k:this.gameObject.findComponent(j.XVE)}create(){if(super.create(),!H.A.isDefined(this._transform))return void j.VyI.log(`RenderContainerComponent on ${this.gameObject.name} needs to have a RectTransform`,j.$bb.Warning);const k=new $.Container;k.name=`render-container-root-${this.gameObject.name}`,this.setUpDisplayObject(k),this.sizeContainer(),this.addListenerToSignal(this._transform.onDimensionsChanged,(()=>this.sizeContainer())),this.allowDepthSorting&&(this.addListenerToSignal(this.gameObject.onChildAdded,(k=>this.sortChildToLayer(k))),this.createDepthLayerContainer(0))}postCreate(){super.postCreate(),this.triggerSort()}triggerSort(){if(this.allowDepthSorting)for(const k of this.GameObject.children)this.sortChildToLayer(k)}sortChildToLayer(k){var B;const U=k.findComponent(W.d);if(!H.A.isDefined(U)){return void(null!==(B=k.findComponent(j.y4o))&&void 0!==B?B:k.addComponent(F)).getRootContainer().setParent(this._depthLayerContainers.get(0))}this._depthComponents.some((k=>k===U))||(this.addListenerToSignal(U.OnDestroy,(()=>{this._depthComponents=this._depthComponents.filter((k=>k!==U)),this.cleanDepthLayer(U.depth)})),this.addListenerToSignal(U.onDepthChanged,(({old:k,val:B})=>{const F=this.getDepthLayer(B);U.renderComponent.getRootContainer().setParent(F),this.cleanDepthLayer(k)})),this._depthComponents.push(U));const{depth:G,renderComponent:$}=U;this.getDepthLayer(G).addChild($.getRootContainer())}cleanDepthLayer(k){const B=this._depthLayerContainers.get(k);H.A.isDefined(B)&&0===B.children.length&&(B.destroy(),this._depthValues=this._depthValues.filter((B=>B!==k)),this._depthLayerContainers.delete(k))}getDepthLayer(k){return this._depthLayerContainers.has(k)?this._depthLayerContainers.get(k):this.createDepthLayerContainer(k)}createDepthLayerContainer(k){let B=-1;for(const[F,G]of this._depthValues.entries())G>k&&(B=F);B>=0?this._depthValues.splice(B,0,k):(B=this._depthValues.length,this._depthValues.push(k));const U=new $.Container;return U.name=`depth-layer-${k}`,this._depthLayerContainers.set(k,U),this.getRootContainer().addChildAt(U,B),U}sizeContainer(){if(!H.A.isDefined(this._transform))return;const{fullHeight:k,fullWidth:B}=this._transform,U=this.getRootContainer();U.width=B,U.height=k}};(0,G.Cg)([(0,j.Pqz)(j.XVE),(0,G.Sn)("design:type",j.XVE)],q.prototype,"_rectTransform",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"allowDepthSorting",void 0),q=F=(0,G.Cg)([(0,j.EVk)("RenderContainer",void 0,"Adds an empty Pixi Container to the GameObject that matches the size of any attached RectTransform.")],q)},61917:(k,B,U)=>{"use strict";U.d(B,{d:()=>H});var F=U(8674),G=U(62459),j=U(11647),$=U(11191);let H=class extends((0,j.o)(G.uAl)){constructor(){super(...arguments),this.onDepthChanged=this.createTidySignal(),this._depth=0}set depth(k){if(k===this._depth)return;const B=this._depth;this._depth=k,this.onDepthChanged.dispatch({old:B,val:k})}get depth(){return this._depth}get renderComponent(){const k=this.gameObject.findComponent(G.y4o);return G.Aq$.isDefined(k)?k:this.gameObject.addComponent($.N)}postCreate(){var k;super.postCreate(),null===(k=this.gameObject.parent.findComponent($.N))||void 0===k||k.triggerSort()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onDepthChanged",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number),(0,F.Sn)("design:paramtypes",[Number])],H.prototype,"depth",null),H=(0,F.Cg)([(0,G.EVk)("RenderDepth",void 0,"Applies a depth to a game object to provide granular control of the draw order. NOTE: You likely want to use layers instead, be aware of caveats before use.")],H)},1312:(k,B,U)=>{"use strict";U.d(B,{s:()=>$});var F=U(62459),G=U(88225),j=U(35120);class ${static startRecording(k,B){var U;const F=function(){var k,B,U;const F=null===(U=null===(B=null===(k=null===j.q||void 0===j.q?void 0:j.q.instance)||void 0===k?void 0:k.prodigy)||void 0===B?void 0:B.gameContainer)||void 0===U?void 0:U.get("80c-6fa4");if(!F)return 0;const G=F.getValue("sentryReplaySampleRate",0);return"number"==typeof G?G:0}();Math.random(){F.VyI.log(`Failed to stop Sentry replay recording ${String(k)}`,F.$bb.Error)}))}}},27488:(k,B,U)=>{"use strict";U.d(B,{r:()=>F});class F extends Error{constructor(k,B){super(B),this.code=k,Object.setPrototypeOf(this,F.prototype)}}},76546:(k,B,U)=>{"use strict";U.d(B,{D:()=>Y});var F,G=U(8674),j=U(62459),$=U(79687),H=U(95891),V=U.n(H),W=(U(34829),U(37251)),q=U(13956),K=U(27488),z=U(35537);let Y=F=class{get networkRequestBehaviour(){return{}}makeCloudscriptRequest(k,B){return(0,G.sH)(this,arguments,void 0,(function*(k,B,U=!0){if(this._featureFlags.getValue("disableCloudscriptRequestQueue",!1))return this.doRequest(k,B,U,Promise.resolve());const G=this.doRequest(k,B,U,F._lastRequest);return F._lastRequest=G,G}))}doRequest(k,B,U,$){return(0,G.sH)(this,void 0,void 0,(function*(){yield $.catch((()=>{}));const G=V().merge(V().clone(F.DEFAULT_NETWORK_REQUEST_BEHAVIOUR),this.networkRequestBehaviour);for(const k in B)Array.isArray(B[k])&&0===B[k].length&&(B[k]=void 0);try{let j=G.retryCount;0;const $=yield this._catalyst.cloudScript.setServiceUrlVersion("v2").useIdempotency(U).timeoutMS(G.timeoutMs).setRetryOption({retryCount:j,retryIntervalMS:G.retryIntervalMs,retryIncreamentMS:G.retryIncrementMs,retryMaxDelayMS:G.retryMaxDelayMs}).execute(k,B);if(!$.isOK())throw new K.r($.status,JSON.stringify($.data));const H=yield this._sideEffect.processEnvelope($.data);return F.assertResponseDataIdempotency(H,U)?H.response:H}catch(H){throw j.RQr.logError(H,`Error calling CloudScript ${k}`),H}}))}static assertResponseDataIdempotency(k,B){return B}};Y.DEFAULT_NETWORK_REQUEST_BEHAVIOUR={timeoutMs:1e4,retryCount:3,retryIntervalMs:1e3,retryIncrementMs:1e3,retryMaxDelayMs:1e4},Y._lastRequest=Promise.resolve(),(0,G.Cg)([(0,q.b)("00d-b27e"),(0,G.Sn)("design:type",W.X)],Y.prototype,"_catalyst",void 0),(0,G.Cg)([(0,q.b)("80c-6fa4"),(0,G.Sn)("design:type",Object)],Y.prototype,"_featureFlags",void 0),(0,G.Cg)([(0,q.b)("48b-b777"),(0,G.Sn)("design:type",z.zj)],Y.prototype,"_sideEffect",void 0),Y=F=(0,G.Cg)([(0,$.injectable)()],Y)},47255:(k,B,U)=>{"use strict";var F;U.d(B,{o:()=>F}),function(k){k.FunnelBossStatueModalPurchaseRematch="Boss-Statue-Modal-Purchase-Rematch",k.FunnelBuyMemberItem="Buy-Member-Item",k.FunnelSecondWheelSpin="Second-Wheel-Spin",k.FunnelEnterDarkTower="Enter-Dark-Tower",k.FunnelCatchMorePets="Catch-More-Pets",k.FunnelOpenMemberChestBattle="Open-Member-Chest-Battle",k.FunnelOpenMemberChestWorld="Open-Member-Chest-World",k.FunnelEquipNewLockedItem="Equip-New-Locked-Item",k.FunnelEquipBackpackLockedItem="Equip-Backpack-Locked-Item",k.FunnelEquipMemberLockedCostume="Equip-Member-Locked-Costume",k.FunnelEquipCardLockedItem="Equip-Card-Locked-Item",k.FunnelCatchPetAgain="Catch-Pet-Again",k.FunnelUseBoost="Use-Boost",k.FunnelClickHUDButton="Click-HUD-Button",k.FunnelEvolutionMemberLock="Evolution-Member-Lock",k.FunnelEvolutionInsufficientResource="Evolution-Insufficient-Resource",k.FunnelTileScreen="Tile-Screen-Load",k.FunnelCharSelect="Char-Select-Load",k.FunnelPVEBattleScreen="PVE-Battle-Screen-Load",k.FunnelPVPBattleScreen="PVP-Battle-Screen-Load",k.FunnelVideoPlayer="Video-Player",k.FunnelTransitMap="Transit-First-Map",k.FunnelClickMemberDance="Click-Member-Dance",k.FunnelFireTitanCatapult="Fire-Titan-Catapult",k.FunnelSelectMemberNickname="Select-Member-Nickname",k.FunnelClickMemberBounty="Click-Member-Bounty",k.FunnelClickMemberBoxMail="Click-Member-Box-Mail",k.FunnelEquipLevelLockedItem="Equip-Level-Locked-Item",k.FunnelCatchUpToClass="Catch-up-to-Your-Class",k.FunnelClickWizardWatch="Click-Wizard-Watch-CTA",k.FunnelCatchMemberLockedPet="Catch-Member-Locked-Pet",k.FunnelCatchEvolvedPet="Catch-Evolved-Pet",k.FunnelLoginScreen="login_screen_funnel",k.FunnelUltimatesTab="Ultimates-Tab",k.FunnelMythics21Q4="mythics",k.FunnelStarJar="NonMember-Star-Jar",k.FunnelUseMemberLockedItem="Use-Member-Locked-Item",k.FunnelNotEnoughCurrency="Not-Enough-Currency",k.FunnelNotEnoughCurrencyRifts="Not-Enough-Currency-Rifts",k.FunnelBattlePassMemberUnlock="Battle-Pass-Member-Unlock",k.FunnelMemberJar="Member-Jar",k.FunnelPostBattleMagicoinGetMemberRewards="Post-Battle-Magicoin-Get-Member-Rewards",k.FunnelLockedStadiumRoom="Locked-Stadium-Room",k.FunnelRiftRunMemberLockedOpponentOption="Rift-Run-Member-Locked-Opponent-Option",k.FunnelPetSlots="Pet-Slots",k.FunnelPetGear="Equip-Member-Locked-Pet-Gear",k.FunnelLootDash="Loot-Dash",k.FunnelSegmentedOffers="Segmented-Offers",k.FunnelChargedLevels="Charged-Levels",k.FunnelCurrencyConversion="Currency-Conversion",k.FunnelPrizeWheelPurchaseSpin="Prize-Wheel-Purchase-Spin",k.FunnelFestivalMemberQuest="Festival-Member-Quest",k.FunnelPetMergeNotEnoughCurrency="Pet-Merge-Not-Enough-Currency",k.FunnelMembersGetSevenLevels="Members-Get-Seven-Levels",k.FunnelWizardBank="wizard_bank",k.FunnelMemberLockedGoldRifts="Member-Locked-Gold-Rifts",k.StageClickItem="Click-Item",k.StageClickBuy="Click-Buy",k.StageClickMembership="Click-Membership",k.StageClickParentConfirmation="Click-Parent-Confirmation",k.StageClickSpinAgain="Click-Spin-Again",k.StageEnterTower="Enter-Tower",k.StageCatchPet="Catch-Pet",k.StageOpenChest="Open-Chest",k.StageEquipItem="Equip-Item",k.StageCatchPetFail="Catch-Pet-Fail",k.StageTryAgain="Try-Again",k.StageClickBoost="Click-Boost",k.StageClickStars="Click-Stars",k.StageClickButton="Click-Button",k.StageEvolutionSeeButton="Evolution-See-Button",k.StageEvolutionClickButton="Evolution-Click-Button",k.StageEvolutionEvolvePet="Evolve-Pet",k.StageEvolutionConverted="Evolution-Converted",k.StageTransitMap="Transit-Map",k.StageDanceStart="Dance",k.StageFireCatapult="Fire-Catapult",k.StageSelectNickname="Select-Nickname",k.StageClickBounty="Click-Bounty",k.StageEquipFromBackpack="Equip-From-Backpack",k.StageEquipFromPouch="Equip-From-Pouch",k.StageLoadStart="Load-Start",k.StageLoadEnd="Load-End",k.StageSaved="Character-Saved",k.StageVideoStart="Video-Start",k.StageVideoEnd="Video-Complete",k.StageCloseVideo="Close-Video",k.StageInsufficientCurrency="Insufficient-Currency",k.StageClickCTA="Click-CTA",k.StageSessionLoadGame="load_game",k.StageSessionLoadEnd="load_end",k.StageSessionLoadLogin="load_login",k.StageSessionLoadStart="load_start",k.StageClickMembershipBenefits="Click-Membership-Benefits",k.StageClickLockedItemBattlePass="Click-Item-Treasure-Track",k.StageClickGetMoreRevivesLootDash="Click-Get-More-Revives-Loot-Dash",k.StageClickRerollRiftBuff="Click-Reroll-Rift-Buff",k.StageClickRerollRiftOpponents="Click-Reroll-Rift-Opponents",k.StageClickRouletteSpinAgain="Click-Roulette-Spin-Again",k.StagePostBattleMagicoinClickGetMemberRewards="Post-Battle-Magicoin-Click-Get-Member-Rewards"}(F||(F={}))},325:(k,B,U)=>{"use strict";var F;U.d(B,{Q:()=>F}),function(k){k.Math="math",k.Science="science",k.ELA="ela"}(F||(F={}))},37629:(k,B,U)=>{"use strict";U.d(B,{c:()=>G});var F=U(62459);class G{constructor(k=null){this._jsonObject=null,this._jsonObject=k}setJson(k){this._jsonObject=k}getJson(){return this._jsonObject}getData(){const k=[];return this.encodeAsUrl(this._jsonObject,null,k),k.join("&")}getContentType(){return"application/x-www-form-urlencoded; charset=UTF-8"}encodeAsUrl(k,B,U){if(k instanceof Array)k.forEach(((k,F)=>{const G=`${B}[${F}]`;null!==k&&"object"==typeof k?this.encodeAsUrl(k,G,U):this.appendKeyValuePair(U,G,k)}));else if(null!==k&&"object"==typeof k)for(const G in k)k.hasOwnProperty(G)&&this.encodeAsUrl(k[G],F.Aq$.isDefined(B)?`${B}[${G}]`:G,U);else this.appendKeyValuePair(U,B,k)}appendKeyValuePair(k,B,U){null===U?k.push(`${B}=`):void 0!==U&&k.push(`${B}=${encodeURIComponent(U)}`)}}},80403:(k,B,U)=>{"use strict";U.d(B,{K:()=>H});var F,G=U(8674),j=U(62459),$=U(79687);let H=F=class{constructor(k,B,U){this._identityAuthProvider=k,this._httpClient=B,this._technicalMetricsManager=U}sendRequest(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){const G=this.createRequest(k,B,null!=U?U:this.determineOperationName(k),F),j=yield this._httpClient.sendRequest(G);return this._technicalMetricsManager.increaseNetworkRequestCount(),j.wasSuccessful()?j.getData():Promise.reject(new Error(j.getErrorMessage()))}))}static responseIsGraphQLError(k){var B;return(null===(B=null==k?void 0:k.errors)||void 0===B?void 0:B.length)>0}static getGraphQLErrorCode(k){var B,U;if(F.responseIsGraphQLError(k))for(const F of k.errors){const k=F.extensions,G=null===(U=null===(B=null==k?void 0:k.response)||void 0===B?void 0:B.body)||void 0===U?void 0:U.errors;if((null==G?void 0:G.length)>0)for(const B of G)if(j.Aq$.isDefined(B.code))return B.code;if(j.Aq$.isDefined(k.code))return k.code}}createRequest(k,B,U,G){const $=Object.assign(Object.assign({},F.DEFAULT_NETWORK_REQUEST_BEHAVIOUR),G),H=new j.u1k;return H.setTimeout($.timeoutMs).setRetryCount($.retryCount).setHeader("apollographql-client-name","prodigy-game").setHeader("apollographql-client-version","1.0").setMethod(j.iXQ.Post).setRequestURI("graphql/").addRequestInterceptor(this._identityAuthProvider.authenticateRequest,this._identityAuthProvider).addResponseInterceptor(j.XKG.convertToJson).setBody(new j._A9({query:k,variables:B,operationName:U})),H}determineOperationName(k){const B=/^\s*(query|mutation|subscription)\s+(\w+)/i.exec(k);return null==B?void 0:B[2]}};H.DEFAULT_NETWORK_REQUEST_BEHAVIOUR={timeoutMs:1e4,retryCount:0,retryIntervalMs:1e3,retryIncrementMs:1e3,retryMaxDelayMs:1e4},H=F=(0,G.Cg)([(0,$.injectable)(),(0,G.Qj)(0,(0,$.inject)("40f-f847")),(0,G.Qj)(1,(0,$.inject)("30b-3020")),(0,G.Qj)(2,(0,$.inject)("2a1-fed9")),(0,G.Sn)("design:paramtypes",[Object,Object,Object])],H)},45716:(k,B,U)=>{"use strict";var F;U.d(B,{l:()=>F}),function(k){k.AllGood="NETWORK_ALL_GOOD",k.WrongUsernameOrPassword="WRONG_USERNAME_PASSWORD",k.CheckNetworkConnection="NETWORK_CHECK_CONNECTION",k.NetworkOffline="NETWORK_OFFLINE"}(F||(F={}))},10312:(k,B,U)=>{"use strict";U.d(B,{I:()=>_t});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U(99625),V=U(95066),W=U(36525),q=U(2952),K=U(17516),z=U(59287),Y=U(35120),Q=U(51477),X=U(34829),Z=U(73797),J=U(2272),tt=U(75329),et=U(98252),it=U(30405),st=U(51979),nt=U(78686),at=U(51151),rt=U(48417),ot=U(30628),ht=U(72042),ct=U(22023),dt=U(37629);var lt;!function(k){k.Math="MATH",k.English="ELA",k.Science="SCIENCE"}(lt||(lt={}));class ut{constructor(k,B,U,F,G,j,$,H,V){if(this.userID=null,this.genericAjaxError=()=>{},this.defaultSettings=null,this.defaultHandlers={},this.wasSocketConnected=!1,this.socketConnectUrl="",this.socketConnectParams={},this.worldID=0,this.gameContainer=null,this.zone=null,this.clientVersion=null,this.httpClient=null,this._jwtAuthProvider=null,this._tokenAuthProvider=null,this._identityAuthProvider=null,this.urlProvider=null,this.socketInterface=null,this.disconnectCountInSession=0,this.reconnectAttemptsCount=0,this._remoteLogger=null,this._worldName="",this.gameContainer=U,this.clientVersion=k.clientVersion,this.urlProvider=$,this.defaultSettings=ut.getDefaultSettings(this.urlProvider),this.httpClient=F,this._jwtAuthProvider=G,this._tokenAuthProvider=j,this._remoteLogger=H,this._identityAuthProvider=V,this.socketInterface=U.get("e2e-64d8"),this.game=U.get("51c-03a0"),null!==k)for(const W in k)void 0!==k[W]&&(this.defaultSettings[W]=k[W]);if(null!==B){const k=Object.keys(B),U=k.length;for(let F=0;F{G.VyI.log("client connected",G.$bb.Verbose),this.wasSocketConnected=!0},J=k=>{G.Aq$.isDefined(k)&&G.VyI.log(k,G.$bb.Error);const B=k,U=ut.getStatusKey(K,B.code.toString());G.Aq$.isDefined(B.code)&&G.Aq$.isDefined(U)?K[B.code](B.code,"joinMultiplayerServer"):q?q("joinMultiplayerServer",B.code):this.genericAjaxError("joinMultiplayerServer",B.code)},tt=()=>{this.socketInterface.removeListener(G.KZk.Connect,Z),this.socketInterface.removeListener(G.KZk.Connect,W),this.socketInterface.removeListener(G.KZk.Error,J);const k=ut.getStatusKey(K,"503","503");G.Aq$.isDefined(k)&&this.socketInterface.removeListener(G.KZk.ConnectError,K[k])};this.socketInterface.addListener(G.KZk.Connect,Z),this.socketInterface.addListener(G.KZk.Connect,W),this.socketInterface.addListener(G.KZk.Connect,tt),this.socketInterface.addListener(G.KZk.ConnectError,(k=>{G.VyI.log("connect_error",G.$bb.Verbose),G.VyI.log(k,G.$bb.Error),this.wasSocketConnected||(this.socketInterface.disconnect(),this.trackConnection(G.KZk.Disconnect))})),this.socketInterface.addListener(G.KZk.Error,J),this.socketInterface.addListener(G.KZk.Error,tt);const et=ut.getStatusKey(K,"503","503");return G.Aq$.isDefined(et)&&this.socketInterface.addListener(G.KZk.ConnectError,K[et]),this.socketInterface.addListener(G.KZk.ConnectError,tt),this.socketInterface.addListener(G.KZk.ReconnectAttempt,(()=>{G.Aq$.isDefined(this.zone)?X.zone=this.zone:G.Aq$.isDefined(X.zone)||delete X.zone,X.jwt=this._jwtAuthProvider.getToken(),this.socketInterface.setQuery(X)})),this.socketInterface.addListener(G.KZk.Message,(k=>{U(k)})),this.socketInterface.addListener(G.KZk.PlayerJoined,(k=>{G.VyI.log(`player Joined - playerId: ${k}`,G.$bb.Verbose),H(k)})),this.socketInterface.addListener(G.KZk.PlayerLeft,(k=>{G.VyI.log(`player Left - playerId: ${k}`,G.$bb.Verbose),V(k)})),this.socketInterface.addListener(G.KZk.PlayerList,(k=>{G.VyI.log("player list received",G.$bb.Verbose),F(k)})),this.socketInterface.addListener(G.KZk.Disconnect,(k=>{G.VyI.log("Disconnected from multiplayer server",G.$bb.Verbose),j(k),this.trackConnection(G.KZk.Disconnect)})),this.socketInterface.addListener(G.KZk.Reconnect,(()=>{G.VyI.log("Reconnected to the multiplayer server",G.$bb.Verbose),this.trackConnection(G.KZk.Reconnect),$()})),this.socketInterface.addListener(G.KZk.Reconnecting,(()=>{this.trackConnection(G.KZk.Reconnecting)})),!0}trackConnection(k){const B=new Date;if(k===G.KZk.Disconnect)this.disconnectTime=B,this.disconnectCountInSession++;else if(k===G.KZk.Reconnecting)this.reconnectAttemptsCount++;else if(k===G.KZk.Reconnect){if(this.disconnectTime){const k=Y.q.instance.prodigy.gameContainer,U=B.getTime()-this.disconnectTime.getTime();k.get("fab-547a").getData().then((([,B])=>{const F={disconnectTime:this.disconnectTime,disconnectPeriod:Math.round(U/1e3),disconnectCountInSession:this.disconnectCountInSession,reconnectAttemptsCount:this.reconnectAttemptsCount},j=k.get("e20-0fb0").player;G.Aq$.isDefined(j.primaryParentID)&&(F.parentID=j.primaryParentID)})),k.get("c47-20b6").connection.sendServerReconnectedEvent({name:this._worldName,duration:U/X.A.SECONDS_TO_MILLISECONDS_MULTIPLIER,disconnect_time:this.disconnectTime.getTime()/X.A.SECONDS_TO_MILLISECONDS_MULTIPLIER,disconnect_count:this.disconnectCountInSession,reconnection_attempt_count:this.reconnectAttemptsCount.toString()})}else G.VyI.log("Could not log reconnect event as disconnect event never occurred.",G.$bb.Warning);this.reconnectAttemptsCount=0}G.VyI.log(`Multiplayer Socket ${k} at ${B.toLocaleString()}`,G.$bb.Verbose)}emitMessage(k,B){return null!==this.assignHandlers(B,["200"],"emit message")&&null!==this.socketInterface&&(this.socketInterface.emitEvent(G.KZk.Message,k),!0)}getWorldList(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.multiplayer}worlds`,{},"getWorldList",k,B,U)}))}getCharacter(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=this.gameContainer.get("00d-b27e"),F=rt.D.Character.GetFieldsOnInitialLogin,G={fields:[]};try{const j=yield U.cloudScript.useIdempotency(!1).execute(F,G);if(j.isOK()){const B=Object.keys(j.data)[0];k(j.data[B],j.status)}else B("getCharacter",j.status)}catch(j){const k=j;(null==k?void 0:k.errorInfo)?B("getCharacter",k.errorInfo.status):B("getUser",500)}}))}static isSuccess(k){return 200===k}static isError(k){return k/100>=4}static httpStatusCodeToString(k){let B;const U={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",408:"Timeout Error",409:"Conflict",426:"Upgrade required",500:"Internal Server Error",503:"Service Not Available"};return B=k in U?U[k]:"No defined Handler detected for ErrorCode",B+=` [${k}]`,B}processRequestResponse(k,B,U,F,j){if(B.wasSuccessful()&&ut.isSuccess(k))j&&k in j?j[k](k,void 0,B.getData()):U&&U(B.getData(),k);else{B.wasSuccessful()&&!ut.isSuccess(k)?G.VyI.log(`http response code is not 200 [${k}] - treat as failed`,G.$bb.Warning):ut.isError(k)?G.VyI.log(ut.httpStatusCodeToString(k),G.$bb.Error):G.VyI.log(`No defined Handler detected [${k}]`,G.$bb.Warning);let U=ut.getStatusKey(j,k.toString());G.Aq$.isDefined(U)?j[U](k,B.getErrorMessage()):(U=ut.getStatusKey(this.defaultHandlers,k.toString()),G.Aq$.isDefined(U)?this.defaultHandlers[U](k,B.getErrorMessage()):F?F(B.getErrorMessage(),k):this.genericAjaxError(B.getErrorMessage(),k))}}loginSDK(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this.gameContainer.get("00d-b27e"),B=this.gameContainer.get("40f-f847"),U=Y.q.instance.prodigy.gameContainer.get("a03-308f"),F={sessionID:this.gameContainer.get("2e6-0f71").getUUID()};return k.authHandler.login(F).then((F=>{this.userID=F.data.userID,this._tokenAuthProvider.setSessionToken(this.userID,F.data.authToken);const G=nt.read(F.data.token);return U.setServerTime(1e3*G.claim.iat),k.setToken("Authorization",`Bearer ${F.data.token}`,!0,!1),k.authHandler.setCallback("onSetIdentityJWT",B.setAuthorizationToken.bind(B)),window.SW.Load.userInfo=()=>JSON.stringify({accessToken:F.data.identityToken,premises:F.data.premises,name:F.data.name}),{data:F.data,status:F.status}}))}))}login(k,B,U){if(this._tokenAuthProvider.isLoggedIn())return!1;const F=this.gameContainer.get("00d-b27e");return(null==F?void 0:F.authHandler)&&this.loginSDK().then((B=>{k(B.data,B.status)})).catch((k=>{B(k.message,k.code)})),!0}attachStudentUsingClassCode(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){const F=yield this.sendGraphQLRequest("\n mutation JoinClassroom($code: ClassCode!) {\n joinClassroom(input: { code: $code }) {\n classroomJoined\n classroom {\n id\n }\n player {\n grade {\n id\n number\n }\n chosenGrade {\n id\n number\n }\n classrooms {\n id\n code\n }\n }\n }\n }\n",{code:k});this.processRequestResponse(F.getHttpStatusCode(),F,B,U,G)}))}setCurriculum(k,B,U,G,j){return(0,F.sH)(this,void 0,void 0,(function*(){const F=yield this.sendGraphQLRequest("\n mutation setCurriculum($subject: Subject!, $curriculumId: ID!) {\n setCurriculum(input: {curriculumId: $curriculumId}) {\n viewer {\n curriculum(subject: $subject) {\n node {\n id\n }\n }\n chosenGrade(subject: $subject) {\n number\n }\n }\n }\n }\n",{subject:B,curriculumId:k});this.processRequestResponse(F.getHttpStatusCode(),F,U,G,j)}))}setInitialGrades(k,B,U,G,j){return(0,F.sH)(this,void 0,void 0,(function*(){const F=yield this.sendGraphQLRequest("\n mutation setInitialGrades($subject: Subject!, $grade: GradeNumber!) {\n setInitialGrades(input: {grade: $grade }) {\n viewer {\n curriculum(subject: $subject) {\n node {\n id\n }\n }\n chosenGrade(subject: $subject) {\n number\n }\n }\n }\n }\n",{subject:B,grade:k});this.processRequestResponse(F.getHttpStatusCode(),F,U,G,j)}))}updatePlayerGrade(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.sendGraphQLRequest("\n mutation UpdateGradeFromAlgorithm($grade: GradeNumber!) {\n _updateDataForAlgorithm(input: { grade: $grade }) {\n player {\n id\n grade {\n id\n number\n }\n }\n }\n }\n",k)}))}logout(){this.userID=null,this.socketInterface&&this.socketInterface.disconnect();const k=window.gameLoaderLogout;k&&k(),et.pF.isNewMobileLogin()||window.SW.Load.redirectToLauncher(window.launcherUrl)}updateCharacter(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=Date.now();if(B&&U&&this._jwtAuthProvider.isLoggedIn()){const j=this.gameContainer.get("00d-b27e"),$=rt.D.Character.Update,H={data:k,userID:this.userID};try{const k=yield j.cloudScript.useIdempotency(!1).execute($,H),G=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(X.A.get("GameConstants.Build.ENABLE_LOADING_METRICS")&&it.o.inTestGroups(G,ht.U.TEST_GROUPS)){const k=Date.now()-F,B=new W.i;B.setKey("prodigy_game.gameAPI.RTT"),B.setValue(k),this._remoteLogger.logStat(B,V.d.Timing)}k.isOK()?B(k.data,k.body):U(k)}catch(G){const k=G;(null==k?void 0:k.errorInfo)?U({status:k.errorInfo.status,data:k.errorInfo.result}):U({status:500,data:"Internal Server Error"})}return!0}return!1}))}leaveZone(){null!==this.socketInterface&&(this.zone=null,this.socketInterface.emitEvent("leaveZone"))}joinZone(k){null!==this.socketInterface&&(this.zone=k,this.socketInterface.emitEvent("joinZone",k))}refreshMultiplayer(){null!==this.socketInterface&&this.socketInterface.emitEvent("refresh",{})}getClassCodes(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.sendGraphQLRequest("\n query fetchAllClassCodes {\n player {\n id\n classrooms {\n id\n code\n }\n }\n }\n");return k.wasSuccessful()?k.getData():Promise.reject(new Error("Failed to get class code data from server"))}))}getCurrentClassCode(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.sendGraphQLRequest("\n query fetchCurrentClassCode {\n player {\n id\n currentClassroom {\n id\n code\n }\n }\n }\n");return k.wasSuccessful()?k.getData():Promise.reject(new Error("Failed to get current class code data from server"))}))}getCurriculumAndGrade(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U,F,j;let $;switch(B){default:case lt.Math:$="\n query mathCurriculumAndGrades {\n viewer {\n curriculum(subject: MATH) {\n node {\n id\n }\n }\n chosenGrade(subject: MATH) {\n value: number\n }\n }\n }\n"}const H=yield this.sendGraphQLRequest($);if(!H.wasSuccessful())return Promise.reject(new Error("Failed to get curriculum and grade from the server"));const V=H.getData(),W={userID:k.userID,goalId:k.goalId};return G.Aq$.isDefined(null===(F=null===(U=V.data.viewer.curriculum)||void 0===U?void 0:U.node)||void 0===F?void 0:F.id)&&(W.curriculumTreeID=V.data.viewer.curriculum.node.id),G.Aq$.isDefined(null===(j=V.data.viewer.chosenGrade)||void 0===j?void 0:j.value)&&(W.grade=V.data.viewer.chosenGrade.value,W.chosenGrade=V.data.viewer.chosenGrade.value),W}))}updateStrandBasedPlacementTest(k,B,U,j,$){return(0,F.sH)(this,void 0,void 0,(function*(){const F=`${this.defaultSettings.url.education}v4/placement-tests/instance/${k}/${this.userID}`,H=(new G.u1k).setBaseURI(F).setBody(new dt.c(B)).addRequestInterceptor(this._identityAuthProvider.authenticateRequest,this._identityAuthProvider).setMethod(G.iXQ.Post);return this.httpClient.sendRequest(H).then((k=>{this.processRequestResponse(k.getHttpStatusCode(),k,U,j,$)}))}))}getVideoLessonSignedUrls(k,B,U,j,$){return(0,F.sH)(this,void 0,void 0,(function*(){const F=`${this.defaultSettings.url.education}v4/users/${this.userID}/signed-urls/video-lessons`,H=(new G.u1k).setBaseURI(F).addRequestInterceptor(this._identityAuthProvider.authenticateRequest,this._identityAuthProvider).addResponseInterceptor(G.XKG.convertToJson).setQueryParameter("videoURL",k).setQueryParameter("captionsURL",B);return this.httpClient.sendRequest(H).then((k=>{this.processRequestResponse(k.getHttpStatusCode(),k,U,j,$)}))}))}updatePlanStudent(k,B,U){const F={planId:k};U||(F.currentSkillId=B);this.defaultSettings.loader;this.sendGraphQLRequest(U?"\n mutation failFromPlanMutation($planId: ID!) {\n failFromPlan(input: { planId: $planId }) {\n failedAt\n }\n }\n":"\n mutation updateCurrentSkillForPlanMutation($planId: ID!, $currentSkillId: ID!) {\n updateCurrentSkillForPlan(input: { planId: $planId, currentSkillId: $currentSkillId }) {\n currentSkillId\n }\n }\n",F)}updatePlacementTest(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.sendGraphQLRequest("\n mutation completePlacementTestMutation(\n $curriculumId: ID\n $finalGradeNumCompletePercentage: Float\n $grade: GradeNumber!\n $placementTestInstanceId: ID\n $subject: Subject\n $studentDataGrade: PositiveInt\n $studentDataCurriculumId: ID\n $studentDataChosenGrade: PositiveInt\n ) {\n completePlacementTest(\n input: {\n curriculumId: $curriculumId\n finalGradeNumCompletePercentage: $finalGradeNumCompletePercentage\n grade: $grade\n placementTestInstanceId: $placementTestInstanceId\n subject: $subject\n studentDataGrade: $studentDataGrade\n studentDataCurriculumId: $studentDataCurriculumId\n studentDataChosenGrade: $studentDataChosenGrade\n }\n ) {\n player {\n id\n }\n }\n }\n",k)}))}saveAnswer(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("post",`${this.defaultSettings.url.answer}users/${this.userID}/answers`,k,"saveAnswer",B,U,G)}))}getUser(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){const F=this.gameContainer.get("00d-b27e"),j=rt.D.Character.GetMultiple,$={userIDs:k.split(","),fields:B};try{const k=yield F.cloudScript.useIdempotency(!1).execute(j,$);k.isOK()?U(k.data,k.status):G("getUser",k.status)}catch(H){const k=H;(null==k?void 0:k.errorInfo)?G("getUser",k.errorInfo.status):G("getUser",500)}}))}getTitans(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.titan}v1/titans`,{userID:this.userID},"getTitans",k,B,U)}))}getTitan(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.titan}v1/titan/${k}`,{userID:this.userID},"getTitan",B,U,G)}))}hitTitan(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("post",`${this.defaultSettings.url.titan}v1/titan/${k}/hit`,{userID:this.userID,hits:1},"hitTitan",B,U,G)}))}getTitanUserData(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.titan}v1/titan/user/${this.userID}`,{},"getTitanUserData",k,B,U)}))}startMatchmaking(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=B.appearance,F=B.getPlayerData().playerTransformation,j=this.gameContainer.get("03c-6e1e"),$=at.DuelInviteProto.create({userID:B.userID,team:B.data.team,member:B.hasMembership()?1:0,level:B.getChargedLevelCumulative(),appearance:{faceID:U.getFace(),hair:{styleID:U.getHair().style,colorID:U.getHair().color},skinColorID:U.getSkinColor(),eyeColorID:U.getEyeColor(),morph:F?{type:F.transformType,ID:F.transformID}:null},equipment:{hatID:B.equipment.getHat(),bootsID:B.equipment.getBoots(),weaponID:B.equipment.getWeapon(),outfitID:B.equipment.getOutfit()},name:{first:U.getName().getFirstName(),middle:U.getName().getMiddleName(),last:U.getName().getLastName(),nick:U.getName().getNickname()}}),H={"force new connection":!0,reconnection:!1,transports:["websocket"],reconnectionDelay:1e4,reconnectionDelayMax:15e3,reconnectionAttempts:10,pingInterval:6e3,pingTimeout:6e3,query:{userId:this.userID,jwt:this.jwtAuthProvider.getToken(),level:B.getChargedLevelCumulative(),playerData:JSON.stringify({data:ot.B.toArray(at.DuelInviteProto,$)}),bucketId:k,maxRange:this.getMatchmakingMaxRange(),maxWait:this.getMatchmakingMaxWait(),effectivePetLevels:ct.P8.getTeamsEffectiveLevels()},secure:this.defaultSettings.url.matchmaking.startsWith("https://"),path:this.defaultSettings.path.matchmaking},V=new G.bnh;j.connect(this.defaultSettings.url.matchmaking,null,H);const W=()=>{G.VyI.log("client connected to matchmaking",G.$bb.Verbose),V.resolve(!0)},q=k=>{G.Aq$.isDefined(k)&&G.RQr.logError(k,"Error connecting to the matchmaking service");const B=k;G.Aq$.isDefined(B.code)&&this.genericAjaxError("joinMatchmakingService",B.code),V.resolve(!1)};j.addListener(G.KZk.ConnectError,(k=>{G.VyI.log("connect_error",G.$bb.Verbose),G.VyI.log(k,G.$bb.Error),V.resolve(!1)}));const K=()=>{j.removeListener(G.KZk.Connect,W),j.removeListener(G.KZk.Connect,K),j.removeListener(G.KZk.Error,q),j.removeListener(G.KZk.Error,K)};return j.addListener(G.KZk.Connect,W),j.addListener(G.KZk.Connect,K),j.addListener(G.KZk.Error,q),j.addListener(G.KZk.Error,K),V}))}getMatchmakingMaxRange(){return 3}getMatchmakingMaxWait(){return 10}quitMatchmaking(){this.gameContainer.get("03c-6e1e").disconnect()}getFriendList(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.friend}v1/friend/${this.userID}`,{offset:0,limit:0},"getFriendList",k,B,U)}))}getTotalFriendRequests(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/countFriendRequest`,{},"getTotalFriendRequests",k,B,U)}))}getFriendRequestList(k,B,U,G,j){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/request`,{offset:k,limit:B},"getFriendRequestList",U,G,j)}))}sendFriendRequest(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("post",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/add/${k}`,{},"sendFriendRequest",B,U,G)}))}cancelFriendRequest(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("delete",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/cancel/${k}`,{},"cancelFriendRequest",B,U,G)}))}acceptFriendRequest(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("post",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/accept/${k}`,{},"acceptFriendRequest",B,U,G)}))}rejectFriendRequest(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("delete",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/reject/${k}`,{},"rejectFriendRequest",B,U,G)}))}removeFriend(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("delete",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/remove/${k}`,{},"removeFriend",B,U,G)}))}getGiftBoxes(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.root}v1/users/${this.userID}/giftboxes`,{},"getGiftBoxes",k,B,U)}))}updateGiftBox(k,B,U,G,j){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("post",`${this.defaultSettings.root}v1/users/${this.userID}/giftbox/${k}`,{giftBoxData:JSON.stringify(B)},"updateGiftBox",U,G,j)}))}addGiftBox(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("post",`${this.defaultSettings.root}v1/users/${this.userID}/giftboxes`,{giftBoxID:k},"addGiftBox",B,U,G)}))}completeAssignment(k,B){return null!==this.assignHandlers(B,["200"],"completeStudentAssignment")&&(this.sendGraphQLRequest("\n mutation completeAssignment($assignmentId: ID!) {\n completeAssignment(input: { id: $assignmentId }) {\n assignment {\n id\n }\n }\n }\n",{assignmentId:k}),!0)}getStudentData(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=k,U=yield this.sendGraphQLRequest("\n query fetchStudentData ($subject: Subject!) {\n player {\n id\n curriculum (subject: $subject) {\n id\n subject\n }\n chosenGrade (subject: $subject) {\n chosenGradeNumber: number\n }\n grade (subject: $subject) {\n gradeNumber: number\n }\n goal (subject: $subject) {\n id\n }\n }\n }\n",{subject:B});if(!U.wasSuccessful())return Promise.reject(new Error("Failed to get student data from server"));return U.getData().data}))}static getDefaultSettings(k){const B=`${k.getAPIRootUrl()}/`,U=`${k.getMatcherApiRootUrl()}/`,F=`${k.getLoaderUrl()}/`;return{version:"v1",root:`${F}game-api/`,loader:F,url:{matchmaking:U,multiplayer:`${B}multiplayer-api/`,friend:`${B}friend-api/`,mailer:`${B}game-mailer-api/`,education:`${F}education-api/`,titan:`${B}titan-api/`,gameAPI:`${B}game-api/`,answer:`${k.getAnswerURL()}/`,websocket:U},path:{matchmaking:"/game-matcher-api/socket.io/"}}}sendGraphQLRequest(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return this.httpClient.sendRequest((new G.u1k).addRequestInterceptor(this._identityAuthProvider.authenticateRequest,this._identityAuthProvider).setHeader("userID",`${this.userID}`).setHeader("usertype","student").setHeader("apollographql-client-name","prodigy-game").setHeader("apollographql-client-version","1.0").setMethod(G.iXQ.Post).setRequestURI("graphql/").setBody(new G._A9({query:k,variables:B})).addResponseInterceptor(G.XKG.convertToJson))}))}}var ft,bt,pt=U(325),vt=U(35564),gt=U(69698),mt=U(21314),yt=U(70330);!function(k){k.Info="info",k.PlayerLeft="playerLeft",k.PlayerJoined="playerJoined"}(bt||(bt={}));let _t=ft=class{get OnSocketMessage(){return this.onSocketMessage}get OnPlayerJoinedSignal(){return this.onPlayerJoinedSignal}get OnPlayerLeftSignal(){return this.onPlayerLeftSignal}get OnPlayerListSignal(){return this.onPlayerListSignal}get characterProcessed(){return this._characterProcessed}set characterProcessed(k){this._characterProcessed=k}constructor(k,B,U,F){this.loggedIn=!1,this._characterProcessed=!1,this.offlineTimer=-1,this.socketConnected=!0,this.onPlayerSaved=new G.HN0,this.saving=!1,this.processPlayer=!1,this.processFriendsList=!1,this.hasFailedUpdate=!1,this.isActivityDialogOpen=!1,this._isTokenExpiredMessageOpen=!1,this.expiredToken=!1,this.onSocketMessage=new G.HN0,this.onPlayerJoinedSignal=new G.HN0,this.onPlayerLeftSignal=new G.HN0,this.onPlayerListSignal=new G.HN0,this.onSocketReconnect=new G.HN0,this._multiplayerWorldSuccessHandler=null,this._multiplayerWorldErrorHandler=null,this._multiplayerWorldFullErrorHandler=null;const j=Y.q.instance.prodigy.gameContainer;this.game=k,this.timeManager=B,this.metricsManager=F,this._sessionTokenAuthProvider=j.get("f7c-2e57"),this.jwtAuthProvider=j.get("330-3c25"),this._identityAuthProvider=j.get("40f-f847"),this._playerDataProvider=j.get("e20-0fb0"),this._subjectProvider=j.get("f1d-f7b1"),this._multiplayerMessageService=j.get("c35-2f95"),this.api=new ut({clientVersion:this.game.clientVersion},{},j,j.get("30b-3020"),j.get("330-3c25"),this._sessionTokenAuthProvider,U,j.get("e59-eea6"),this._identityAuthProvider),this.api.setErrorHandler(this.onError.bind(this));const $=j.get("30b-3020");$.setDefaultResponseHandler(418,this.showInvalidCharacterPopup,this),$.setDefaultResponseHandler(403,this.showTokenExpiredPopup,this),$.setDefaultResponseHandler(412,this.onReadOnlyCharacter,this),setInterval(this.updateCharacter.bind(this),3e3)}onReadOnlyCharacter(){var k,B;G.VyI.log("HTTP 412: Read-only character cannot login",G.$bb.Warning);try{null===(B=null===(k=window.localStorage)||void 0===k?void 0:k.removeItem)||void 0===B||B.call(k,"autoLogin")}catch(F){}const U=Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);Y.q.instance.prodigy.open.informationDialog(new tt.Z(U.getText("SETTINGS_LOGOUT"),(()=>this.logout(!0)),J.E.Small,500,U.getText("ERROR"),U.getText("READ_ONLY_CHARACTER_LOGIN"),void 0,void 0,void 0,H.l.ErrorDialogHeader,H.l.ErrorDialogFooter))}updatePlayerPositionOnMap(){this.lastPlayerPosition&&this.emitMessage({action:vt.x.Move,data:{target:this.lastPlayerPosition}}),this.lastPlayerPositionTimer&&clearTimeout(this.lastPlayerPositionTimer),this.lastPlayerPositionTimer=null}static openWebsite(k,B=!0,U=!0){try{const F=U?`https://${k}`:k,j=G.o5U.isSafari()&&G.o5U.isIOS();et.pF.isNativeApp()&&et.pF.appType()===et.uC.NATIVE_APP?window.postMessage(JSON.stringify({type:"OPEN_URL_IN_BROWSER",payload:F}),window.location.origin):B&&!j?window.open(F):window.location.href=F}catch(e){}}getErrorMessage(k,B,U=!0){const F=Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);let j="NETWORK_ERROR";return G.Aq$.isDefined(k)&&G.Aq$.isDefined(B)?j=B[k]:G.Aq$.isDefined(B)&&(j=B[0]),U?F.getText(j):j}sendZoneEvent(k){const B=Y.q.instance.prodigy.world.getCurrentMap();if(G.Aq$.isDefined(B)){2!==B.split("-").length&&G.VyI.log(`Zone event failed to send for current map ${B}`,G.$bb.Warning)}}onError(k,B){G.VyI.log(`FAIL : ${k}, ${B}`,G.$bb.Verbose),null===this.updateFailedTime&&this.loggedIn&&G.Aq$.isDefined(k)&&-1!==k.indexOf("update")&&(this.updateFailedTime=this.timeManager.getLocalTimeMs(),G.VyI.log("logout countdown",G.$bb.Verbose))}generalErrorHandler(k,B,U,F,j){if(426===U)return G.VyI.log(`NetworkManager.generalErrorHandler[${k}] - httpResponseCode ${U} - version error`,G.$bb.Warning),void this.versionError();B?B(`NetworkManager.generalErrorHandler[${k}] - ${F}`,U):G.VyI.log(`NetworkManager.generalErrorHandler[${k}] - httpResponseCode ${U}`,G.$bb.Verbose)}getCharData(k,B){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U=(()=>{}),F=(()=>{})){return this.api.getUser(k,B,U,((k,B)=>{this.generalErrorHandler("getCharData",F,B,k)}))}))}initGoingOffline(){-1===this.offlineTimer&&this.loggedIn&&(this.offlineTimer=this.timeManager.getLocalTimeMs()+7e4,this.offlineMessage="NETWORK_GOING_OFFLINE")}getWorldList(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){try{const B=yield this._multiplayerMessageService.getWorldList();k(B.data,200)}catch(U){B("",U.errorInfo.status)}return{}}))}startMatchmaking(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.api.startMatchmaking(k)}))}quitMatchmaking(){this.api.quitMatchmaking()}joinMultiplayerServer(k,B,U,F,j){this.world=k;Y.q.instance.prodigy.gameContainer.get("779-a746").joinWorldChannel(k.name,this.processWorldMessage.bind(this),this.processAllWorldSubscriptionError.bind(this)).catch(G.RQr.createHandler("Error joining world channel")),this._multiplayerWorldSuccessHandler=U,this._multiplayerWorldErrorHandler=F,this._multiplayerWorldFullErrorHandler=j}isMultiplayerZone(k){const B=Y.q.instance.prodigy.world;return!(k.isCutscenePlaying||0===k.zoneName.indexOf("scene-")||k.zoneName===st.W||B.isZoneSinglePlayer(k.zoneName))}joinZone(k){var B;if(this.zone=k,!this.loggedIn||!this.characterProcessed)return;const U=Y.q.instance.prodigy.gameContainer.get("779-a746");U.isSubscribedToWorld()&&(this.isMultiplayerZone(this.zone)?(U.joinLocationChannel(z.K.getZoneMapChannelName(this.world.name,this.zone.zoneName),this.processZoneLocationMessage.bind(this),this.processZoneMapSubscriptionError.bind(this),this.processZoneMapDisconnection.bind(this),this.processZoneMapReconnection.bind(this),null===(B=k.onSubscribed)||void 0===B?void 0:B.bind(k)).catch(G.RQr.createHandler("Error joining map channel")),U.onNotificationReceived.has(this.handleNotificationMessages,this)||U.onNotificationReceived.add(this.handleNotificationMessages,this)):U.leaveLocationChannel().catch(G.RQr.createHandler("Error leaving map channel")))}leaveZone(){if(this.zone=null,!this.loggedIn||!this.characterProcessed)return;const k=Y.q.instance.prodigy.gameContainer.get("779-a746");k.onNotificationReceived.has(this.handleNotificationMessages,this)&&(k.leaveLocationChannel().catch(G.RQr.createHandler("Error leaving map channel")),k.onNotificationReceived.remove(this.handleNotificationMessages,this)),this.lastPlayerPosition=null}refreshMultiplayer(){this.api.refreshMultiplayer()}setZone(k){this.zone=k}attachClassCode(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return this.api.attachStudentUsingClassCode(k,((k,F)=>{var j,$,H;const V=null===(j=null==k?void 0:k.data)||void 0===j?void 0:j.joinClassroom;if(null==V?void 0:V.classroomJoined){const U=null===(H=null===($=V.player)||void 0===$?void 0:$.classrooms)||void 0===H?void 0:H.map((k=>parseInt(k.id))).filter((k=>!Number.isNaN(k)));if(U)return this._playerDataProvider.player.classIDs=U,void B(k,F)}G.VyI.log("JoinClassroom request did not return the expected response",G.$bb.Error),U()}),((k,B)=>{this.generalErrorHandler("attachClassCode",U,B,k)}))}))}emitMessage(k){if(!this.canUseMultiplayer()||!this.zone)return!1;ft.emitMessageCount++,G.Aq$.isDefined(k.action)&&G.VyI.log(`[${ft.emitMessageCount}] emitMessage called action: ${k.action}`,G.$bb.Verbose);if(!Y.q.instance.prodigy.gameContainer.get("779-a746").isSubscribedToWorld()||G.Aq$.isDefined(this.zone.zoneName)&&!this.isMultiplayerZone(this.zone))return!1;const B=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=z.K.getZoneMapChannelName(this.world.name,this.zone.zoneName);switch(k.action){case vt.x.FX:return this._multiplayerMessageService.sendFXMessage(z.K.getZoneMapChannelName(this.world.name,this.zone.zoneName),k.data.type,k.data.x,k.data.y).catch(G.RQr.createHandler("Could not send fx message")),!0;case vt.x.Move:return Y.q.instance.prodigy.gameContainer.get("779-a746").moveOnArea(k.data.target).catch(G.RQr.createHandler("Could not send move message")),this.lastPlayerPosition=k.data.target,!0;case vt.x.Chat:return this._multiplayerMessageService.sendChatMessage(U,k.data.emoteID,k.data.danceID,k.data.chatID).catch(G.RQr.createHandler("Could not send chat message")),!0;case vt.x.Transform:return B.forceSaveCharacter((()=>{const U=z.K.getZoneMapChannelName(this.world.name,this.zone.zoneName);this._multiplayerMessageService.sendTransformMessage(U,k.data.showEffect,k.data.transformID,k.data.transformType).catch(G.RQr.createHandler("Could not send transform message")),this._multiplayerMessageService.updateCachedAppearance(U,B.getID()).catch(G.RQr.createHandler("Could not send update cached appearance"))})),B.saveEnabled=!1,!0;case vt.x.HostTeam:return this._multiplayerMessageService.sendCoopHostTeamMessage(U,k.data.hostID,k.data.teamMembers,k.data.streak,k.data.readyMembers).catch(G.RQr.createHandler("Could not send Coop Host Team message")),!0;case vt.x.TeamDisbanded:return this._multiplayerMessageService.sendCoopTeamDisbandedMessage(U,k.data.hostID).catch(G.RQr.createHandler("Could not send Coop Team disbanded message")),!0;case vt.x.JoinTeam:return this._multiplayerMessageService.sendCoopJoinTeamMessage(U,k.data.hostID,k.data.teamMembers,k.data.streak,k.data.readyMembers,k.target).catch(G.RQr.createHandler("Could not send Coop Join Team message")),!0;case vt.x.TeamUpdated:return this._multiplayerMessageService.sendCoopTeamUpdatedMessage(U,k.data.hostID,k.data.teamMembers,k.data.streak,k.data.readyMembers).catch(G.RQr.createHandler("Could not send Coop Team Updated message")),!0;case vt.x.RequestJoinTeam:return this._multiplayerMessageService.sendCoopTeamRequestJoinMessage(U,B.getID(),k.target).catch(G.RQr.createHandler("Could not send Coop Request Join Team message")),!0;case vt.x.PlayerLeftTeam:return this._multiplayerMessageService.sendCoopPlayerLeftTeamMessage(U,B.getID(),k.target).catch(G.RQr.createHandler("Could not send Coop Player Left Team message")),!0;case vt.x.StartCoOpTitanMatch:return this._multiplayerMessageService.sendCoopStartCoopTitanMatchMessage(U,k.data,k.target).catch(G.RQr.createHandler("Could not send Coop Stat Match message")),!0;case vt.x.HostHeartbeat:return this._multiplayerMessageService.sendCoopHostHeartbeatMessage(U,{}).catch(G.RQr.createHandler("Could not send Coop Host Heartbeat message")),!0;case vt.x.SyncHealth:return this._multiplayerMessageService.sendCoopSyncHealthMessage(U,k.data.crystalHP,k.data.titanHP).catch(G.RQr.createHandler("Could not send Sync health message")),!0;case vt.x.QuestionAnswered:return this._multiplayerMessageService.sendCoopQuestionAnsweredMessage(U,k.target,k.data.sourcePlayerID,k.data.correct).catch(G.RQr.createHandler("Could not send question answered message")),!0;case vt.x.PlayerAttacked:return this._multiplayerMessageService.sendCoopPlayerAttackedMessage(U,k.data.sourcePlayerID,k.data.missed,k.data.titanHealth,k.data.damage,k.data.spellID).catch(G.RQr.createHandler("Could not send player attacked message")),!0;case vt.x.TitanAttacked:return this._multiplayerMessageService.sendCoopTitanAttackedMessage(U,k.data.missed,k.data.crystalHealth,k.data.damage,k.data.spellID).catch(G.RQr.createHandler("Could not send titan attacked message")),!0;case vt.x.TitanDefeated:return this._multiplayerMessageService.sendCoopTitanDefeatedMessage(U).catch(G.RQr.createHandler("Could not send titan defeated message")),!0;case vt.x.PlayersDefeated:return this._multiplayerMessageService.sendCoopPlayersDefeatedMessage(U).catch(G.RQr.createHandler("Could not send players defeated message")),!0;case vt.x.JoinTeamFailed:return this._multiplayerMessageService.sendCoopJoinTeamFailedMessage(U,k.target,k.data.reason).catch(G.RQr.createHandler("Could not send join team failed message")),!0;case vt.x.PlayerRejoinTeam:return this._multiplayerMessageService.sendCoopRejoinJoinTeamMessage(U,k.target,B.getID()).catch(G.RQr.createHandler("Could not send rejoin team message")),!0;case vt.x.Catapult:return this._multiplayerMessageService.sendCoopCatapultMessage(U,B.getID()).catch(G.RQr.createHandler("Could not send catapult team message")),!0;case vt.x.Change:return B.forceSaveCharacter((()=>{const k=z.K.getZoneMapChannelName(this.world.name,this.zone.zoneName);this._multiplayerMessageService.sendChangeAppearanceMessage(k).catch(G.RQr.createHandler("Could not send change appearance message")),this._multiplayerMessageService.updateCachedAppearance(k,B.getID()).catch(G.RQr.createHandler("Could not send update cached appearance"))})),B.saveEnabled=!1,!0;case vt.x.Info:return k.data.coOpTeam&&this._multiplayerMessageService.sendCoopTeamMessage(U,$.pick(k.data,ft.MESSAGE_SCHEMAS.info)).catch(G.RQr.createHandler("Could not send change appearance message")),!0}return!1}onMessage(k,B=!0){if(this.canUseMultiplayer()&&this.zone){const U=ft.MESSAGE_SCHEMAS[k.action];B&&G.Aq$.isDefined(U)&&ft.decompressMessage(k,U),this.onSocketMessage.dispatch(k),G.Aq$.isDefined(this.zone.onMessage)&&this.zone.onMessage(k)}}getFriendsList(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return X.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(G.VyI.log("Test get friend list",G.$bb.Verbose),this.game.time.events.addTimer(1e3,k.bind(this,{data:[{userID:5339281,status:0},{userID:5339282,status:1},{userID:5339279,status:1}],meta:{}}),this),Promise.resolve(null)):this.api.getFriendList(k,((k,U)=>{this.generalErrorHandler("getFriendsList",B,U,k)}))}))}getTotalFriendRequests(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return X.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(G.VyI.log("Test get total friend requests",G.$bb.Verbose),this.game.time.events.addTimer(2,k.bind(this,{data:{pendingRequests:1},meta:{friendsCap:20}}),this),Promise.resolve(null)):this.api.getTotalFriendRequests(k,((k,U)=>{this.generalErrorHandler("getTotalFriendRequests",B,U,k)}))}))}getFriendRequestList(k,B,U,j){return(0,F.sH)(this,void 0,void 0,(function*(){return X.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(G.VyI.log("Test get friend request list",G.$bb.Verbose),this.game.time.events.addTimer(2,U.bind(this,{data:[{userID:15263772}],meta:{}}),this),Promise.resolve(null)):this.api.getFriendRequestList(k,B,U,((k,B)=>{this.generalErrorHandler("getFriendRequestList",j,B,k)}))}))}sendFriendRequest(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return X.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(G.VyI.log("Test send friend request",G.$bb.Verbose),this.game.time.events.addTimer(2,B.bind(this,k),this),Promise.resolve(null)):this.api.sendFriendRequest(k,B,((k,B)=>{this.generalErrorHandler("sendFriendRequest",U,B,k)}))}))}cancelFriendRequest(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return X.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(G.VyI.log("Test cancel friend request",G.$bb.Verbose),this.game.time.events.addTimer(2,B.bind(this,k),this),Promise.resolve(null)):this.api.cancelFriendRequest(k,B,((k,B)=>{this.generalErrorHandler("cancelFriendRequest",U,B,k)}))}))}acceptFriendRequest(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return X.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(G.VyI.log("Test accept friend request",G.$bb.Verbose),this.game.time.events.addTimer(2,B.bind(this,k),this),Promise.resolve(null)):this.api.acceptFriendRequest(k,B,((k,B)=>{this.generalErrorHandler("acceptFriendRequest",U,B,k)}))}))}rejectFriendRequest(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return X.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(G.VyI.log("Test reject friend request",G.$bb.Verbose),this.game.time.events.addTimer(2,B.bind(this,k),this),Promise.resolve(null)):this.api.rejectFriendRequest(k,B,((k,B)=>{this.generalErrorHandler("rejectFriendRequest",U,B,k)}))}))}removeFriend(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return X.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(G.VyI.log("Test remove friend",G.$bb.Verbose),this.game.time.events.addTimer(2,B.bind(this,k),this),Promise.resolve(null)):this.api.removeFriend(k,B,((k,B)=>{this.generalErrorHandler("removeFriend",U,B,k)}))}))}getTitans(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return this.api.getTitans(k,((k,U)=>{this.generalErrorHandler("getTitans",B,U,k)}))}))}getTitan(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return this.api.getTitan(k,B,((k,B)=>{this.generalErrorHandler("getTitan",U,B,k)}))}))}hitTitan(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return this.api.hitTitan(k,B,((k,B)=>{this.generalErrorHandler("hitTitan",U,B,k)}))}))}getTitanUserData(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return this.api.getTitanUserData(k,((k,U)=>{this.generalErrorHandler("getTitanUserData",B,U,k)}))}))}completeAssignment(k){this.api.completeAssignment(k,{200:()=>{}})}answerQuestion(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=Object.assign(Object.assign({},k),{isMember:B.hasMembership(),playLocation:this._playerDataProvider.player.locationSelectionType,sessionID:this._sessionTokenAuthProvider.getSessionToken()});return this.api.saveAnswer(U,(()=>{}))}))}updatePlanStudent(k){this.api.updatePlanStudent(k.id,k.currentSkillId,k.hasFailed)}updateStrandBasedPlacementTest(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=k.placementTestInstanceId;return this.api.updateStrandBasedPlacementTest(B,k)}))}finishPlacement(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.api.updatePlacementTest(k)}))}setCurriculum(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){var F;return this.api.setCurriculum(k.curriculumTreeID,null!==(F=k.subject)&&void 0!==F?F:lt.Math,B,U)}))}setInitialGrades(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){var F;return this.api.setInitialGrades(k.grade,null!==(F=k.subject)&&void 0!==F?F:lt.Math,B,U)}))}updatePlayerGrade(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.api.updatePlayerGrade(k)}))}loadEducation(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.loggedIn&&this.characterProcessed?Y.q.instance.prodigy.education.getStudentData(k):Promise.resolve(null)}))}getClassCodes(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.loggedIn?this.api.getClassCodes():Promise.resolve(null)}))}getCurrentClassCode(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.loggedIn?this.api.getCurrentClassCode():Promise.resolve(null)}))}getCurriculumAndGrade(k){return(0,F.sH)(this,arguments,void 0,(function*(k,B=lt.Math){return this.loggedIn?this.api.getCurriculumAndGrade(k,B):Promise.resolve(null)}))}getVideoLessonSignedUrls(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.loggedIn?this.api.getVideoLessonSignedUrls(k,B,U,G):Promise.resolve(null)}))}login(k,B,U,F,j,$,H,V=0){this._playerDataProvider.initialize(j),null!==this._retryTimer&&(window.clearInterval(this._retryTimer),this._retryTimer=null);const W=V+1;if(W>3)return G.VyI.log("NetworkManager.login; retried 3 times. Go to failure",G.$bb.Error),void H();const q=this.login.bind(this,k,B,U,F,j,$,H,W);this.api.login(((k,B)=>{this.processLoginSuccess($,k,k.identityToken,B)}),((k,B)=>{this.processLoginFailure("login",H,q,B,k)}))}getCharacter(k,B,U,G){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U,F,G=0){this._playerDataProvider.initialize(B);const j=this.getCharacter.bind(this,k,B,U,F,G+1);return null!==this._retryTimer&&(window.clearInterval(this._retryTimer),this._retryTimer=null),this.api.getCharacter(((B,F)=>{this.processCharacterSuccess(U,k,B,F)}),((k,B)=>{this.processCharacterFailure("getCharacter",F,j,G,B,k)}))}))}logout(k=!1){G.VyI.log("Logging out",G.$bb.Info),this._playerDataProvider.logout(),this.loggedIn=!1,this.characterProcessed=!1,this.jwtAuthProvider.logout(),this._sessionTokenAuthProvider.logout(),this.api.logout(),et.pF.isNativeApp()&&window.postMessage(JSON.stringify({type:"NATIVE_LOGOUT",payload:k,token:this.api.getRefreshToken()}))}updateCharacter(){var k;if(!this.saving)if(!this.expiredToken&&!this._isTokenExpiredMessageOpen&&this.loggedIn&&this.characterProcessed&&this._playerDataProvider.player&&this._sessionTokenAuthProvider.getSessionToken()){if(G.Aq$.isDefined(this.updateFailedTime)&&null===this.offlineTimer&&(this.timeManager.getLocalTimeMs()-this.updateFailedTime)/1e3>X.s.get("GameConstants.Inactivity.CANNOT_CONNECT_TIMER_SECONDS")&&(this.offlineTimer=this.timeManager.getLocalTimeMs()+X.s.get("GameConstants.Inactivity.NETWORK_BOOT_TIMER_SECONDS"),this.offlineMessage="NETWORK_CANNOT_CONNECT"),null!==this.offlineTimer){const B=this.offlineTimer-this.timeManager.getLocalTimeMs();B<0?this.logout(!0):(null===(k=this.zone)||void 0===k?void 0:k.showMessage)&&this.zone.showMessage(Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(this.offlineMessage,Math.floor(B/1e3)),5e3)}if(this._playerDataProvider.player.saveEnabled){const k=this._playerDataProvider.player.getUpdatedData(this.processPlayer);if(this.processFriendsList&&Y.q.instance.prodigy.friendsListNetworkHandler.getTotalFriendRequests(),this.processPlayer=!1,this.processFriendsList=!1,this.saving=!it.o.isEmptyObject(k),this.saving||G.Aq$.isDefined(this.lastUpdate)&&!(this.timeManager.getLocalTimeMs()-this.lastUpdate>3e4)||(this.saving=!0),this.saving)if(this.jwtAuthProvider.isLoggedIn()){if(G.VyI.log("Token is still valid so let's save",G.$bb.Verbose),k.data&&!G.Aq$.isDefined(k.data.level)){G.VyI.log("APIClient: Player data has been corrupted",G.$bb.Error);const k=new W.i;k.setKey("prodigy_game.APIClient.updateCharacterNoLevel"),k.setValue(1);return Y.q.instance.prodigy.gameContainer.get("e59-eea6").logStat(k,V.d.Increment),void this.logout(!0)}this.api.updateCharacter(k,this.onUpdateCharacterSuccess.bind(this),this.onUpdateCharacterFailure.bind(this));const B=Date.now()-this.metricsManager.getLastGameSessionStartTime();isNaN(B)&&G.VyI.log("Updated session without time being defined",G.$bb.Warning)}else this.showTokenExpiredPopup();else this.onPlayerSaved.dispatch()}else this.onPlayerSaved.dispatch()}else this.onPlayerSaved.dispatch()}showTokenExpiredPopup(){this.expiredToken=!0,this._isTokenExpiredMessageOpen||(this._isTokenExpiredMessageOpen=!0,Y.q.instance.prodigy.open.messageBoxPrefab({text:"TOKEN_EXPIRE_MESSAGE",title:"MESSAGE_TITLE_UH_OH",confirmCallback:()=>{this.logout(!0)}}))}showInvalidCharacterPopup(){const k=Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);this.jwtAuthProvider.logout(),this._sessionTokenAuthProvider.logout(),Y.q.instance.prodigy.open.informationDialog(new tt.Z(k.getText("SETTINGS_LOGOUT"),(()=>{this.logout()}),J.E.Small,500,k.getText("ERROR_RCI_POPUP_A"),k.getText("ERROR_RCI_POPUP_B"),void 0,void 0,void 0,H.l.ErrorDialogHeader,H.l.DefaultFooter))}onUpdateCharacterSuccess(k,B){this.processUpdate(!0,!1),G.VyI.log("Character saved successfully to GameAPI",G.$bb.Verbose)}onUpdateCharacterFailure(k){const B=$.includes([409,503],k.status);this.processUpdate(!1,B)}startInactiveTimer(){this.stopInactiveTimer(),this.loggedIn&&this.characterProcessed&&!et.pF.isNativeApp()&&(this.game.input.onDown.add(this.stopInactiveTimer,this),this.game.input.onUp.add(this.startInactiveTimer,this),this.inactiveTimer=window.setTimeout(this.showInactiveDialog.bind(this),1e3*X.s.get("GameConstants.Inactivity.DIALOG_TIMER_SECONDS")))}stopInactiveTimer(){null!==this.inactiveTimer&&(this.game.input.onDown.removeAll(this),clearTimeout(this.inactiveTimer),this.inactiveTimer=null)}showInactiveDialog(){this.isActivityDialogOpen||this.expiredToken||this._isTokenExpiredMessageOpen||(this.isActivityDialogOpen=!0,Y.q.instance.prodigy.open.messageBoxPrefab({text:"INACTIVITY_MESSAGE",confirmButtonTextKey:"INACTIVITY_BUTTON",confirmCallback:()=>{this.onInactivityPopupButtonPress()}}));const k=Y.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("inactivityLogoutTimerSeconds",X.s.get("GameConstants.Inactivity.LOG_OUT_TIMER_SECONDS"));this.inactiveTimer=window.setTimeout(this.logout.bind(this,!0),1e3*k)}onInactivityPopupButtonPress(){this.isActivityDialogOpen=!1,this.startInactiveTimer()}onPlayerList(k){var B;G.VyI.log(`playerList ${JSON.stringify(k)}`,G.$bb.Verbose),this.canUseMultiplayer()&&G.Aq$.isDefined(null===(B=this.zone)||void 0===B?void 0:B.onPlayerList)&&(this.onPlayerListSignal.dispatch(k),this.zone.onPlayerList(k))}onDisconnect(k,B){G.VyI.log(`disconnect ${String(B)}`,G.$bb.Verbose),this.socketConnected=!1,G.Aq$.isDefined(k)&&k()}onReconnect(){this.socketConnected=!0}onPlayerJoined(k){G.VyI.log(`join ${k}`,G.$bb.Verbose),this.canUseMultiplayer()&&this.zone&&(this.onPlayerJoinedSignal.dispatch(k),G.Aq$.isDefined(this.zone.onPlayerJoined)&&this.zone.onPlayerJoined(k))}onPlayerLeft(k){G.VyI.log(`left ${k}`,G.$bb.Verbose),this.canUseMultiplayer()&&this.zone&&(this.onPlayerLeftSignal.dispatch(k),G.Aq$.isDefined(this.zone.onPlayerLeft)&&this.zone.onPlayerLeft(k))}canUseMultiplayer(){return this.loggedIn&&this.characterProcessed&&this.socketConnected}joinSuccess(k,B){Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player.world=k,this.socketConnected=!0,B()}static compressMessage(k,B){const U=[];for(let F=0;F(null!==(H=X.s.get("GameConstants.Debug.GET_CHARACTER_RETRIES"))&&void 0!==H?H:5))return G.VyI.log("NetworkManager.getCharacter; retried 5 times. Go to failure",G.$bb.Error),void B();if(G.Aq$.isDefined(U)&&(0===j||500===j||340===j))return void(this._retryTimer=window.setInterval(U,1e3));const q=new W.i;q.setKey("prodigy_game.APIClient.processCharacterFailed"),q.setValue(1);Y.q.instance.prodigy.gameContainer.get("e59-eea6").logStat(q,V.d.Increment),G.VyI.log("Process Character failed.",G.$bb.Error),this.generalErrorHandler(k,B,j,$)}versionError(){Y.q.instance.prodigy.open.informationDialog(new tt.Z("BUTTON_OKAY_CAPITAL",(()=>{this.logout(!0)}),J.E.Small,500,"ERROR","NETWORK_OUT_OF_DATE",void 0,void 0,void 0,H.l.ErrorDialogHeader,H.l.ErrorDialogFooter))}processUpdate(k,B){if(this.saving=!1,k||(!G.Aq$.isDefined(this.updateFailedTime)&&this.loggedIn&&this.characterProcessed&&(this.updateFailedTime=this.timeManager.getLocalTimeMs()),B&&null===this.offlineTimer&&this.loggedIn&&this.characterProcessed&&(this.offlineMessage="NETWORK_LOGGED_IN_ELSEWHERE",this.offlineTimer=this.timeManager.getLocalTimeMs()+5e3),G.VyI.log("network update fail",G.$bb.Verbose),this.hasFailedUpdate=!0),k){this.onPlayerSaved.dispatch(),this.updateFailedTime=null,this.lastUpdate=this.timeManager.getLocalTimeMs(),this.processFriendsList=this.hasFailedUpdate,this.hasFailedUpdate=!1;Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player}this.processPlayer=!k}processWorldMessage(k){if("subscribed"===k.type){const k=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this._multiplayerMessageService.updateCachedAppearance(z.K.getWorldChannelName(this.world.name),k.getID()).catch(G.RQr.createHandler("Could not send update cached appearance on world join")),this.joinSuccess(this.world,this._multiplayerWorldSuccessHandler)}}processAllWorldSubscriptionError(k){if(k.message===yt.p.DoesNotExist){Y.q.instance.prodigy.gameContainer.get("779-a746").createAndJoinWorldChannel(this.world.name,this.processWorldMessage.bind(this),this.processWorldSubscriptionError.bind(this)).catch(G.RQr.createHandler("Error initializing world"))}else this.processWorldSubscriptionError(k)}processWorldSubscriptionError(k){k.message===yt.p.Full?this._multiplayerWorldFullErrorHandler():this.onDisconnect(this._multiplayerWorldErrorHandler,"Error Subscribing to world")}processZoneLocationMessage(k){var B;if("broadcastAction"===k.type){let B;switch(k.actionInfo.action){case q.P.FX:B=this.createFXAction(k);break;case q.P.Chat:B=this.createChatAction(k);break;case q.P.HostTeam:B=this.createHostTeamAction(k);break;case q.P.TeamDisbanded:B=this.createTeamDisbandedAction(k);break;case q.P.TeamUpdated:B=this.createTeamUpdateAction(k);break;case q.P.HostHeartbeat:B=this.createCoopHostHeartbeatAction(k);break;case q.P.SyncHealth:B=this.createCoopSyncHealthAction(k);break;case q.P.PlayerAttacked:B=this.createCoopPlayerAttackedAction(k);break;case q.P.TitanAttacked:B=this.createCoopTitanAttackedAction(k);break;case q.P.TitanDefeated:B=this.createCoopTitanDefeatedAction(k);break;case q.P.PlayersDefeated:B=this.createCoopPlayersDefeatedAction(k);break;case q.P.Transform:B=this.createTransformAction(k);break;case q.P.Catapult:B=this.createCatapultAction(k);break;case q.P.Change:B=this.createChangeAction(k);break;case q.P.CoopTeam:B=this.createInfoFromCoopTeamAction(k)}G.Aq$.isDefined(B)&&this.onMessage(B,!1)}else if("playerMoved"===k.type)this.onMessage(this.createMoveAction(k),!1);else if("userList"===k.type){this.onPlayerList(this.createPlayerList(k));const B=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getID();k.userList.forEach((k=>{if(B.toString()!==k.userID){const B=this.createPlayerJoinedAction({action:q.P.Info,data:k.appearance});this.onMessage(B,!1)}}))}else if("playerJoined"===k.type){this.onPlayerJoined(k.playerInfo.userID);if(Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getID().toString()!==k.playerInfo.userID){const U=this.createPlayerJoinedAction({action:q.P.Info,data:k.playerInfo.appearance});this.onMessage(U,!1),!this.zone||null!==(B=this.zone.autoBroadcastPosition)&&void 0!==B&&!B||this.lastPlayerPositionTimer||(this.lastPlayerPositionTimer=window.setTimeout((()=>this.updatePlayerPositionOnMap()),5e3))}}else"playerLeft"===k.type&&this.onPlayerLeft(k.playerInfo.userID)}createPlayerList(k){return k.userList.map((k=>k.userID))}createMoveAction(k){return{action:vt.x.Move,data:{userID:parseInt(k.userID,10),target:k.movementInfo}}}createFXAction(k){var B,U;return{action:vt.x.FX,data:{type:k.actionInfo.type,userID:parseInt(k.userID,10),x:null===(B=k.actionInfo.data)||void 0===B?void 0:B.x,y:null===(U=k.actionInfo.data)||void 0===U?void 0:U.y}}}createHostTeamAction(k){let B,U,F,j;return G.Aq$.isDefined(k.actionInfo.data)&&(j=k.actionInfo.data.streak,B=k.actionInfo.data.hostID,U=k.actionInfo.data.teamMembers,F=k.actionInfo.data.readyMembers),{action:vt.x.HostTeam,data:{hostID:B,streak:j,readyMembers:F,teamMembers:U}}}createTeamDisbandedAction(k){let B;return G.Aq$.isDefined(k.actionInfo.data)&&(B=k.actionInfo.data.hostID),{action:vt.x.TeamDisbanded,data:{hostID:B}}}createRequestJoinTeamAction(k){let B;return G.Aq$.isDefined(k.data)&&(B=k.data.userID),{action:vt.x.RequestJoinTeam,data:{userID:B}}}createTransformAction(k){return{action:vt.x.Transform,data:{userID:parseInt(k.userID,10),showEffect:k.actionInfo.showEffect,transformID:k.actionInfo.transformID,transformType:k.actionInfo.transformType}}}createJoinTeamAction(k){let B,U,F,j;return G.Aq$.isDefined(k.data)&&(F=k.data.streak,B=k.data.teamMembers,U=k.data.readyMembers,j=k.data.hostID),{action:vt.x.JoinTeam,data:{hostID:j,streak:F,teamMembers:B,readyMembers:U}}}createTeamUpdateAction(k){let B,U,F,j;return G.Aq$.isDefined(k.actionInfo.data)&&(j=k.actionInfo.data.streak,B=k.actionInfo.data.hostID,U=k.actionInfo.data.teamMembers,F=k.actionInfo.data.readyMembers),{action:vt.x.TeamUpdated,data:{hostID:B,streak:j,teamMembers:U,readyMembers:F}}}createPlayerLeftTeamAction(k){let B;return G.Aq$.isDefined(k.data)&&(B=k.target),{action:vt.x.PlayerLeftTeam,data:{userID:k.data.userID}}}createStartCoopTitanMatchAction(k){return{action:vt.x.StartCoOpTitanMatch,data:k.data}}createCoopHostHeartbeatAction(k){return{action:vt.x.HostHeartbeat}}createCoopSyncHealthAction(k){return{action:vt.x.SyncHealth,data:k.actionInfo.data}}createCoopQuestionAnsweredAction(k){let B,U;return G.Aq$.isDefined(k.data)&&(B=k.data.sourcePlayerID,U=k.data.correct),{action:vt.x.QuestionAnswered,data:{sourcePlayerID:B,correct:U}}}createCoopPlayerAttackedAction(k){let B,U,F,j,$;return G.Aq$.isDefined(k.actionInfo.data)&&(B=k.actionInfo.data.sourcePlayerID,U=k.actionInfo.data.damage,F=k.actionInfo.data.titanHealth,j=k.actionInfo.data.spellID,$=k.actionInfo.data.missed),{action:vt.x.PlayerAttacked,data:{sourcePlayerID:B,spellID:j,damage:U,titanHealth:F,missed:$}}}createCoopTitanAttackedAction(k){let B,U,F,j;return G.Aq$.isDefined(k.actionInfo.data)&&(B=k.actionInfo.data.crystalHealth,U=k.actionInfo.data.damage,F=k.actionInfo.data.spellID,j=k.actionInfo.data.missed),{action:vt.x.TitanAttacked,data:{crystalHealth:B,spellID:F,damage:U,missed:j}}}createCoopTitanDefeatedAction(k){return{action:vt.x.TitanDefeated}}createCoopPlayersDefeatedAction(k){return{action:vt.x.PlayersDefeated}}createCoopJoinTeamFailedAction(k){let B;return G.Aq$.isDefined(k.data)&&(B=k.data.reason),{action:vt.x.JoinTeamFailed,data:{reason:B}}}createCoopRejoinTeamAction(k){let B;return G.Aq$.isDefined(k.data)&&(B=k.data.userID),{action:vt.x.PlayerRejoinTeam,data:{userID:B}}}createPlayerJoinedAction(k){return{action:vt.x.Info,data:k.data}}createCatapultAction(k){return{action:vt.x.Catapult}}createChangeAction(k){return{action:vt.x.Change,data:{appearance:k.actionInfo.data.appearance.appearance,equipment:k.actionInfo.data.appearance.equipment,userID:k.actionInfo.data.appearance.userID}}}createInfoFromCoopTeamAction(k){return{action:vt.x.Info,data:k.actionInfo.data.appearance}}handleNotificationMessages(k){let B;switch(k.action){case K.m.RequestJoinTeam:B=this.createRequestJoinTeamAction(k);break;case K.m.JoinTeam:B=this.createJoinTeamAction(k);break;case K.m.PlayerLeftTeam:B=this.createPlayerLeftTeamAction(k);break;case K.m.StartCoOpTitanMatch:B=this.createStartCoopTitanMatchAction(k);break;case K.m.QuestionAnswered:B=this.createCoopQuestionAnsweredAction(k);break;case K.m.JoinTeamFailed:B=this.createCoopJoinTeamFailedAction(k);break;case K.m.PlayerRejoinTeam:B=this.createCoopRejoinTeamAction(k);break;case K.m.PlayerJoined:}G.Aq$.isDefined(B)&&this.onMessage(B,!1)}processZoneMapSubscriptionError(k){if(k.message===yt.p.DoesNotExist){Y.q.instance.prodigy.gameContainer.get("779-a746").createAndJoinZoneMapChannel(this.world.name,this.zone.zoneName,this.processZoneLocationMessage.bind(this)).catch(G.RQr.createHandler("Error initializing zone channel"))}else G.RQr.createHandler("Error Joining Zone")}processZoneMapDisconnection(k){this.socketConnected=!1}processZoneMapReconnection(){this.socketConnected=!0,this.onSocketReconnect.dispatch()}createChatAction(k){return{action:vt.x.Chat,data:{userID:parseInt(k.userID,10),emoteID:k.actionInfo.emoteID,danceID:k.actionInfo.danceID,chatID:k.actionInfo.chatID}}}fetchStudentData(k){return(0,F.sH)(this,void 0,void 0,(function*(){let B;switch(k){case pt.Q.ELA:B=lt.English;break;case pt.Q.Science:B=lt.Science;break;default:case pt.Q.Math:B=lt.Math}return this.api.getStudentData(B)}))}get isCurrentlySaving(){return this.saving}};_t.VERBOSE_ANALYTICS=!1,_t.emitMessageCount=0,_t.MESSAGE_SCHEMAS={info:["userID","target.x","target.y","appearance.name","appearance.name.first","appearance.name.middle","appearance.name.last","appearance.name.nick","appearance.gender","appearance.hair.style","appearance.hair.color","appearance.skinColor","appearance.eyeColor","appearance.face","isMember","equipment.boots","equipment.follow","equipment.hat","equipment.outfit","equipment.weapon","data.level","data.win","data.loss","data.gold","data.tower","data.stars","data.hp","data.team","data.allowsHouseVisitors","data.versionID","data.playerTransformation.transformType","data.playerTransformation.transformID","equipment.mount","coOpTeam.hostID","coOpTeam.teamMembers"],catapult:[]},_t=ft=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("51c-03a0")),(0,F.Qj)(1,(0,j.inject)("a03-308f")),(0,F.Qj)(2,(0,j.inject)("be9-3278")),(0,F.Qj)(3,(0,j.inject)("2a1-fed9")),(0,F.Sn)("design:paramtypes",[Q.n,gt.V,mt.p,Object])],_t)},35564:(k,B,U)=>{"use strict";var F;U.d(B,{x:()=>F}),function(k){k.FX="fx",k.Move="move",k.Chat="chat",k.Transform="transform",k.HostTeam="create_co_op_team",k.TeamDisbanded="co_op_team_disbanded",k.TeamUpdated="co_op_team_updated",k.HostHeartbeat="co_op_host_heartbeat",k.SyncHealth="co_op_health_sync",k.PlayerAttacked="player_attacked",k.TitanAttacked="titan_attacked",k.TitanDefeated="titan_defeated",k.PlayersDefeated="players_defeated",k.Catapult="catapult",k.Change="change",k.Info="info",k.CoopTeam="coopTeam",k.RequestJoinTeam="request_co_op_team_join",k.JoinTeam="join_co_op_team",k.PlayerLeftTeam="co_op_player_left_team",k.StartCoOpTitanMatch="start_co_op_titan",k.QuestionAnswered="question_answered",k.JoinTeamFailed="join_co_op_team_failed",k.PlayerRejoinTeam="co_op_player_rejoin_team"}(F||(F={}))},81623:(k,B,U)=>{"use strict";U.d(B,{u:()=>W});var F,G=U(8674),j=U(62459),$=U(79687),H=U(35120),V=U(98252);let W=F=class{constructor(){this._isServiceWorkerRegistered=!1,this._initComplete=!1}init(){if(this._initComplete)j.VyI.log("Error at ProgressiveWebAppInstallerService#init. Initialization should only run once.",j.$bb.Error);else{if(!this.isPlatformSupported())return void(this._initComplete=!0);"ServiceWorkerRegistration"in window?navigator.serviceWorker.getRegistration().then((k=>{k&&(this._isServiceWorkerRegistered=!0),this._initComplete=!0})).catch((()=>{j.VyI.log("CLIENT: Error at service worker getRegistration.",j.$bb.Error)})):this._initComplete=!0}}registerServiceWorker(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this.isPlatformSupported())return!1;if("ServiceWorkerRegistration"in window){j.VyI.log("CLIENT: service worker registration started.",j.$bb.Verbose);const k=H.q.instance.prodigy.gameContainer.get("be9-3278").getServiceWorkerPath(F.SERVICE_WORKER_FILE_NAME);let B;return yield navigator.serviceWorker.register(k).then((()=>{j.VyI.log("CLIENT: service worker registration COMPLETE.",j.$bb.Verbose),this._isServiceWorkerRegistered=!0,B=!0}),(()=>{j.VyI.log("CLIENT: service worker registration FAILED.",j.$bb.Verbose),B=!1})).catch((()=>{j.VyI.log("CLIENT: service worker registration ERROR.",j.$bb.Verbose)})),B}return j.VyI.log("CLIENT: service worker is NOT supported.",j.$bb.Verbose),!1}))}promptInstall(){return(0,G.sH)(this,void 0,void 0,(function*(){let k="error";return F.PWA_BEFORE_INSTALL_DEFERRED_EVENT&&this.isPlatformSupported()&&(yield F.PWA_BEFORE_INSTALL_DEFERRED_EVENT.prompt(),yield F.PWA_BEFORE_INSTALL_DEFERRED_EVENT.userChoice.then((B=>{"accepted"===B.outcome?k="accepted":"dismissed"===B.outcome&&(k="dismissed"),F.PWA_BEFORE_INSTALL_DEFERRED_EVENT=null})).catch((()=>{k="error"}))),k}))}isServiceWorkerRegistered(){return this._initComplete?this._isServiceWorkerRegistered:(j.VyI.log("Error at ProgressiveWebAppInstallerService#isServiceWorkerRegistered. Initialization not complete.",j.$bb.Error),!1)}isPWAInstalled(){if(this._initComplete){if(this._isServiceWorkerRegistered&&null===F.PWA_BEFORE_INSTALL_DEFERRED_EVENT)return!0}else j.VyI.log("Error at ProgressiveWebAppInstallerService#isPWAInstalled. Initialization not complete.",j.$bb.Error);return!1}isPlatformSupported(){return!V.pF.isNativeApp()&&!j.o5U.isMobile()&&j.o5U.isChrome()}};W.PWA_BEFORE_INSTALL_DEFERRED_EVENT=null,W.PWA_INSTALLED_DURING_CURRENT_SESSION=!1,W.SERVICE_WORKER_FILE_NAME="service-worker",W=F=(0,G.Cg)([(0,$.injectable)()],W),window.addEventListener("beforeinstallprompt",(k=>{W.PWA_BEFORE_INSTALL_DEFERRED_EVENT=k})),window.addEventListener("appinstalled",(()=>{W.PWA_INSTALLED_DURING_CURRENT_SESSION=!0}))},29044:(k,B,U)=>{"use strict";U.d(B,{F:()=>V});var F,G=U(8674),j=U(62459),$=U(79687),H=U(35120);let V=F=class{constructor(){this._currentPermissionState=null}registerServiceWorkerForFirebase(){return(0,G.sH)(this,void 0,void 0,(function*(){if("ServiceWorkerRegistration"in window){const k=H.q.instance.prodigy.gameContainer.get("be9-3278").getServiceWorkerPath(F._SERVICE_WORKER_FILE_NAME);let B;return yield navigator.serviceWorker.register(k).then((()=>{j.VyI.log("CLIENT: Firebase service worker registration COMPLETE.",j.$bb.Verbose),B=!0}),(()=>{j.VyI.log("CLIENT: Firebase service worker registration FAILED.",j.$bb.Verbose),B=!1})).catch((()=>{j.VyI.log("CLIENT: Firebase service worker registration ERROR.",j.$bb.Verbose)})),B}return j.VyI.log("CLIENT: Firebase service worker is NOT supported.",j.$bb.Verbose),!1}))}notificationPermissionRequest(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!("Notification"in window))return void j.VyI.log("Notification API not supported",j.$bb.Verbose);let k;return this._currentPermissionState=Notification.permission,yield Notification.requestPermission().then((B=>{j.VyI.log(`Notification requestPermission option selected: ${B}`,j.$bb.Verbose),this._currentPermissionState!==B?(this._currentPermissionState=B,k={hasChanged:!0,status:this._currentPermissionState}):k={hasChanged:!1,status:this._currentPermissionState}})).catch((k=>{j.VyI.log(`Notification requestPermission error: ${k}`,j.$bb.Verbose)})),k}))}};V._SERVICE_WORKER_FILE_NAME="firebase-messaging-sw",V=F=(0,G.Cg)([(0,$.injectable)()],V)},35537:(k,B,U)=>{"use strict";U.d(B,{Gq:()=>V,JN:()=>q,sE:()=>W,zj:()=>K});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U.n($);const V=Symbol("NETWORK_SIDE_EFFECT_HANDLER"),W=Symbol("INetworkSideEffectHandler.key"),q=Symbol("INetworkSideEffectHandler.consume");let K=class{broadcast(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=H().groupBy(this._handlers,W);yield Promise.all(Object.entries(k).map((k=>(0,F.sH)(this,[k],void 0,(function*([k,U]){try{const F=B[k][0];yield F[q](U)}catch(F){G.RQr.logError(F,`Error running ${k} side effect handler`)}})))))}))}processEnvelope(k){return(0,F.sH)(this,void 0,void 0,(function*(){return"object"==typeof k&&"$sideEffects"in k&&"$data"in k?(yield this.broadcast(k.$sideEffects),k.$data):k}))}};(0,F.Cg)([(0,j.multiInject)(V),(0,F.Sn)("design:type",Array)],K.prototype,"_handlers",void 0),K=(0,F.Cg)([(0,j.injectable)()],K)},69698:(k,B,U)=>{"use strict";U.d(B,{V:()=>$});var F=U(8674),G=U(62459),j=U(79687);let $=class{constructor(){this.isServerDeltaSet=!1,this.serverTimeDeltaMs=0,this._timezoneOffset=null}getIsServerDeltaSet(){return this.isServerDeltaSet}setServerTime(k){const B=this.getLocalTimeMs();this.serverTimeDeltaMs=k-B,this.isServerDeltaSet=!0}getServerTimeMs(){return this.isServerDeltaSet||G.VyI.log("Server time has not been set yet.",G.$bb.Warning),this.getLocalTimeMs()+this.serverTimeDeltaMs}getLocalTimeMs(){return Date.now()}getServerTimeDeltaMs(){return this.serverTimeDeltaMs}getUTCOffset(){return G.Aq$.isDefined(this._timezoneOffset)||(this._timezoneOffset=(new Date).getTimezoneOffset()),this._timezoneOffset}};$=(0,F.Cg)([(0,j.injectable)()],$)},21314:(k,B,U)=>{"use strict";U.d(B,{p:()=>W});var F=U(8674),G=U(62459),j=U(79687),$=U(86663),H=U(34829),V=U(52498);let W=class{constructor(k){this.environmentProvider=null,this.environmentProvider=k}getRootUrl(){var k,B;switch(this.environmentProvider.getCurrentEnvironment()){case V.h.Production:return"https://www.prodigygame.com";case V.h.Staging:case V.h.QABox:return null!==(B=null===(k=window.gameEnvironmentVariables)||void 0===k?void 0:k.webRootUrl)&&void 0!==B?B:"https://www.prodigygame.org";case V.h.Dev:default:return"https://www.prodigygame.net"}}getAPIRootUrl(){switch(this.environmentProvider.getCurrentEnvironment()){case V.h.Production:return"https://api.prodigygame.com";case V.h.Staging:return"https://api.prodigygame.org";case V.h.Dev:return"https://api.prodigygame.net";case V.h.QABox:case V.h.Local:const k=$.qg(window.location.search);return G.Aq$.isDefined(k.env)&&k.env.indexOf("-qa")>-1?`https://api.${k.env}.prodigygame.${G.Aq$.isDefined(k.boxEnv)?k.boxEnv:"org"}`:`https://${window.location.host}`;default:return""}}getMatcherApiRootUrl(){var k,B;return null!==(B=null===(k=window.gameEnvironmentVariables)||void 0===k?void 0:k.matcherApiRootUrl)&&void 0!==B?B:this.getMultiplayerRootURL()}getCDNRootUrl(){return"https://cdn.prodigygame.com"}getLoaderUrl(){return this.getAPIRootUrl()}getCortexRootURL(){var k,B,U;return null!==(U=null!==(B=null===(k=window.gameEnvironmentVariables)||void 0===k?void 0:k.cortexRootUrl)&&void 0!==B?B:H.A.get("GameConstants.Network.CORTEX_ROOT"))&&void 0!==U?U:this.getLoaderUrl()}getMultiplayerRootURL(){var k,B;return null!==(B=null===(k=window.gameEnvironmentVariables)||void 0===k?void 0:k.multiplayerRootUrl)&&void 0!==B?B:this.getCortexRootURL()}getIdentityUrl(){switch(this.environmentProvider.getCurrentEnvironment()){case V.h.Production:return"https://sso.prodigygame.com";case V.h.Staging:case V.h.QABox:return"https://sso.prodigygame.org";case V.h.Dev:default:return"https://sso.prodigygame.net"}}getWorkerPath(k){const B=this.environmentProvider.getCurrentEnvironmentByHost(),U=window.gameCodeFile?window.gameCodeFile.replace("code.prodigygame.",`${window.location.hostname.split(".")[0]}.prodigygame.`):"../bin/",F=Math.max(U.lastIndexOf("/"),U.lastIndexOf("\\"));return`${`${F>=0?U.substr(0,F+1):U}workers/`}${k}.${B===V.h.Local||window.location.origin.indexOf("localhost")>-1?"js":"min.js"}${B===V.h.Production?"":`?v=${Date.now()}`}`}getServiceWorkerPath(k){const B=this.environmentProvider.getCurrentEnvironmentByHost();return B===V.h.Local?`/${k}.js`:B===V.h.QABox?`${this.getLoaderUrl()}/Play/${k}.js`:`/${k}.js`}getAnswerURL(){let k=this.environmentProvider.getCurrentEnvironment();if(k===V.h.QABox){const B=window.location.host;k=B.indexOf(".com")>-1?V.h.Production:B.indexOf(".org")>-1||B.indexOf(".run")>-1?V.h.Staging:V.h.Dev}switch(k){case V.h.Production:return"https://answers-v1.prodigygame.com";case V.h.Staging:return"https://answers-v1.prodigygame.org";case V.h.Dev:return"https://answers-v1.prodigygame.net";default:return""}}getParentAttachURL(){return`${this.getRootUrl()}/parent/onboarding/`}getMembershipUpgradeUrl(k){return`${this.getRootUrl()}/membership-management/upgrade/${k}/plan-selection/`}getOtpUrl(k){const B=encodeURIComponent(JSON.stringify({priceOptions:k}));return`${this.getRootUrl()}/Memberships/purchase/otp/selection/?options=${B}`}getUuidUrl(){return`${this.getRootUrl()}/Memberships/api/game-uuid/`}getArcadiaLauncherUrl(){switch(this.environmentProvider.getCurrentEnvironment()){case V.h.Production:return"https://games.prodigygame.com";case V.h.Staging:case V.h.QABox:return"https://games.prodigygame.org";case V.h.Dev:default:return"https://games.prodigygame.net"}}};W=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("6a1-4b92")),(0,F.Sn)("design:paramtypes",[Object])],W)},20352:(k,B,U)=>{"use strict";U.d(B,{j:()=>q});var F=U(8674),G=U(79687),j=U(99625),$=U(35120),H=U(21397),V=U(53661),W=U(80060);let q=class{constructor(){this._iframeOpenOrLoading=!1}canOpenIframe(){return!this._iframeOpenOrLoading}flagIframeClosed(){this._iframeOpenOrLoading=!1}createIFrame(k,B){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U=j.l.IFrameModal){if(!this.canOpenIframe())return null;this._iframeOpenOrLoading=!0;const F=(yield W.d.loadWithInjectedValuesAndDependenciesFromGUID($.q.instance.prodigy.gameContainer.get("d0e-64fd"),U,{[V.n7.IFrameSource]:k,[V.n7.IFrameClosePostMessage]:B})).findComponent(H.w);return F.onIFrameClosed.addOnce((()=>this.flagIframeClosed())),F.GameObject.onDestroy.addOnce((()=>this.flagIframeClosed())),F}))}};q=(0,F.Cg)([(0,G.injectable)()],q)},64582:(k,B,U)=>{"use strict";U.d(B,{O:()=>W});var F,G=U(8674),j=U(62459),$=U(79687),H=U(76572),V=U(21314);let W=F=class{constructor(k,B,U){this.httpClient=k,this.featureFlags=B,this._urlProvider=U}getData(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.getDataAndCache()}))}spoofIp(k){return(0,G.sH)(this,void 0,void 0,(function*(){return j.Aq$.isDefined(this.fetchPromise)&&(yield this.fetchPromise,this.fetchPromise=null),this.cachedGeolocationData&&(this.cachedGeolocationData=null),this.getDataAndCache(k)}))}getDataAndCache(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this.featureFlags.getValue("enableGeolocationService",!0))return[new H._("Geolocation Service is disabled"),null];if(!this.cachedGeolocationData){j.Aq$.isDefined(this.fetchPromise)||(this.fetchPromise=this.fetchGeolocationData(k));const[B,U]=yield this.fetchPromise;if(this.fetchPromise=null,B)return[B,null];this.cachedGeolocationData=U}return[null,this.cachedGeolocationData]}))}fetchGeolocationData(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=this._urlProvider.getLoaderUrl();let U=F.BASE_URL;j.Aq$.isDefined(k)&&(U+=`?ip=${k}`);const G=new j.u1k;G.setMethod(j.iXQ.Get).setBaseURI(B).setRequestURI(U).addResponseInterceptor(j.XKG.convertToJson);const $=yield this.httpClient.sendRequest(G);return $.wasSuccessful()?[null,$.getData()]:[new H._($.getErrorMessage()),null]}))}static GeolocationDataToIGeolocationMetadata(k){if(!k)return null;const B={country:k.country?k.country.name:null,city:null,time_zone:k.time_zone,subdivisions:k.subdivisions?k.subdivisions.map(((k,B,U)=>k.name)):null};return j.Aq$.isDefined(B.country)&&(j.Aq$.isDefined(B.city)||j.Aq$.isDefined(B.time_zone)||j.Aq$.isDefined(B.subdivisions)&&!(B.subdivisions.length<=0))?B:null}};W.BASE_URL="geolocation-api/v1",W=F=(0,G.Cg)([(0,$.injectable)(),(0,G.Qj)(0,(0,$.inject)("30b-3020")),(0,G.Qj)(1,(0,$.inject)("80c-6fa4")),(0,G.Qj)(2,(0,$.inject)("be9-3278")),(0,G.Sn)("design:paramtypes",[Object,Object,V.p])],W)},46014:(k,B,U)=>{"use strict";var F;U.d(B,{R:()=>F}),function(k){k.BattlePass="BattlePassMailExtension",k.Titan="TitanMailExtension",k.Popup="PopupMailExtension",k.Prefab="OpenPrefabMailExtension"}(F||(F={}))},83634:(k,B,U)=>{"use strict";U.d(B,{Z:()=>$});var F=U(8674),G=U(48417),j=U(67238);class $ extends j.D{getRewardStatus(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.call(G.D.AfterSchoolWidget.GetRewardsStatus,{},!0)}))}claimReward(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.call(G.D.AfterSchoolWidget.ClaimReward,{rewardType:k},!0)}))}resetState(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.call(G.D.AfterSchoolWidget.ResetState,{rewardType:k},!0)}))}}},35571:(k,B,U)=>{"use strict";U.d(B,{e:()=>W});var F=U(8674),G=U(79687),j=U(48417),$=U(1195),H=U(13956),V=U(76546);let W=class extends V.D{GetChargedLevelProgressData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.ChargedLevels.GetChargedLevelProgressData,{},!1)}))}sendTutorialReminderMailer(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.ChargedLevels.SendTutorialReminderMailer,{})}))}awardMemberOnlyChargedLevelXp(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this._player.getUserID().toString();return this.makeCloudscriptRequest(j.D.ChargedLevels.AwardMemberOnlyChargedLevelXp,{userId:B,xpAmount:Math.round(k)})}))}abandonChargedLevelLosses(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.ChargedLevels.AbandonChargedLevelLosses,{},!1)}))}recuperateChargedLevelLosses(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.ChargedLevels.RecuperateChargedLevelLosses,{},!1)}))}updateDecayImmunity(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.ChargedLevels.UpdateDecayImmunity,{},!1)}))}debugSetChargedLevel(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.ChargedLevels.Debug.SetChargedLevel,{level:k},!1)}))}clearChargedLevelData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.ChargedLevels.ClearChargedLevelData,{},!1)}))}};(0,F.Cg)([(0,H.b)("e20-0fb0"),(0,F.Sn)("design:type",$.E)],W.prototype,"_player",void 0),W=(0,F.Cg)([(0,G.injectable)()],W)},55328:(k,B,U)=>{"use strict";U.d(B,{v:()=>W});var F=U(8674),G=U(62459),j=U(88225),$=U(48417),H=U(88131),V=U(76546);class W extends V.D{debugAddDefeatedPets(k){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest($.D.DynamicStore.Debug.AddDefeatedPet,{idsToAdd:k})).updated}))}debugRemoveDefeatedPets(k){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest($.D.DynamicStore.Debug.RemoveDefeatedPet,{handlesToRemove:k})).updated}))}debugListDefeatedPets(){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest($.D.DynamicStore.Debug.ListDefeatedPets,{})).updated}))}debugClearDefeatedPets(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest($.D.DynamicStore.Debug.ClearDefeatedPets,{})}))}debugResetStoreProgress(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest($.D.DynamicStore.Debug.ResetStoreProgress,{})}))}purchaseItem(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest($.D.DynamicStore.PurchaseItem,{taskId:k,analyticsTransactionId:B})).questProgress}))}getStoreOffers(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.makeCloudscriptRequest($.D.DynamicStore.GetStore,{store:k});return H.Q.fromJSON(B)}))}getStoreConfigurationEntity(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest($.D.DynamicStore.GetStoreConfiguration,{})}))}getNextSectionExpiry(){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest($.D.DynamicStore.GetNextSectionExpiry,{})).expiryTime}))}getRestrictionOffer(k){return(0,F.sH)(this,void 0,void 0,(function*(){try{const B=yield this.makeCloudscriptRequest($.D.Restrictions.GetRestrictionOffers,{restrictionIds:[k]});if(B.offers.length>0)return B.offers[0]}catch(B){j.captureException(B),G.RQr.logError(B,"Error fetching restriction offer")}}))}markFreeRestrictionOfferClaimed(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest($.D.Restrictions.MarkFreeRestrictionOfferClaimed,{})}))}getHudWidgetItems(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest($.D.DynamicStore.GetHudWidgetItems,{})}))}}},7001:(k,B,U)=>{"use strict";U.d(B,{W:()=>$});var F=U(8674),G=U(48417),j=U(67238);class $ extends j.D{getFeaturedSpawnData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.call(G.D.FeaturedSpawn.GetConfig,{},!0)}))}}},47968:(k,B,U)=>{"use strict";U.d(B,{b:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(67238);let H=class extends $.D{spend(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.call(j.D.HardCurrency.Spend,{value:k,analyticsTransactionId:B},!0)}))}grantCaptureTutorialMagicoin(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.call(j.D.HardCurrency.GrantCaptureTutorialMagicoin,{analyticsTransactionId:k},!0)}))}claimAllowances(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return this.call(j.D.HardCurrency.ClaimAllowances,{keys:k,analyticsTransactionId:B},!0)}))}getAllowanceClaimData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.call(j.D.HardCurrency.GetAllowanceClaimData,{findAll:!0},!0)}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},88061:(k,B,U)=>{"use strict";U.d(B,{o:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(76546);let H=class extends $.D{fetchOptions(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.OTP.FetchOptions,{storeName:k})}))}collectPurchasedItems(k){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(j.D.OTP.CollectPurchasedItems,{transactions:k})).result}))}updatePurchaseHistory(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(j.D.OTP.UpdatePurchaseHistory,{amount:k})}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},60126:(k,B,U)=>{"use strict";U.d(B,{L:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(76546);let H=class extends $.D{getOwnedPetGear(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.PetGearInventory.ListItem,null!=k?k:{},!1)}))}markGearAsSeen(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=Array.isArray(k)?k:[k];return this.makeCloudscriptRequest(j.D.PetGearInventory.SeenItem,{items:B},!1)}))}removeGearFromInventory(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.PetGearInventory.DeleteItems,k,!1)}))}addGearToInventory(k){return(0,F.sH)(this,void 0,void 0,(function*(){0}))}clearAllPetGear(){return(0,F.sH)(this,void 0,void 0,(function*(){0}))}getPetGearAdGifts(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.PetGearInventory.ReceiveAdGift,{},!1)}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},65933:(k,B,U)=>{"use strict";U.d(B,{Y:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(76546);let H=class extends $.D{getPetInventoryData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.PetInventory.GetPetInventoryData,{},!1)}))}updateSlots(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(j.D.PetInventory.UpdateSlots,{reason:k},!1)}))}setSlots(k){return(0,F.sH)(this,void 0,void 0,(function*(){0}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},38560:(k,B,U)=>{"use strict";U.d(B,{B:()=>z});var F=U(8674),G=U(79687),j=U(24652),$=U(90633),H=U(48417),V=U(74958),W=U(67665),q=U(13956),K=U(76546);let z=class extends K.D{getInventory(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(H.D.Rifts.GetInventory,{riftKeyId:k},!1)}))}startRiftRun(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){this._segment.rifts.generateRiftRunUuids();const F=this._segment.item.beginSecureItemTransaction();yield this.makeCloudscriptRequest(H.D.Rifts.StartRiftRun,{riftTier:k,riftRunSegmentUuid:this._segment.rifts.riftRunUuid,roundOneSegmentUuid:this._segment.rifts.riftRunRoundUuid},!1),V.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(V.fk.RiftsStartFirstRiftRun,$.B.BREADCRUMB_RIFTS_STARTED_FIRST_RIFT_RUN);const G=this._segment.rifts.getRiftTransactionData();this._segment.rifts.sendRiftRunStartedEvent(k,B,U,G.transaction_id),F.flush(G)}))}startRiftRunDebug(k){return(0,F.sH)(this,arguments,void 0,(function*(k,B="enemy-hp-buff",U=1,F=j.cn.Normal){this._segment.rifts.generateRiftRunUuids(),yield this.makeCloudscriptRequest(H.D.Rifts.Debug.SetRiftRunDebug,{riftStartingNerf:k,riftStartingBuff:B,currentRiftTier:U,riftType:F,riftRunSegmentUuid:this._segment.rifts.riftRunUuid,roundOneSegmentUuid:this._segment.rifts.riftRunRoundUuid},!1)}))}rerollRiftBuffModifier(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(H.D.Rifts.RerollRiftBuffModifier,{riftTier:k},!1)}))}rerollRiftOpponents(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._segment.item.beginSecureItemTransaction();yield this.makeCloudscriptRequest(H.D.Rifts.RerollRiftOpponents,{},!1);const B=this._segment.rifts.getRiftTransactionData();k.flush(B)}))}startBossRift(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=yield this.makeCloudscriptRequest(H.D.Rifts.StartBossRift,{riftTier:k,bossType:B},!1);return V.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(V.fk.RiftsStartBossRift,$.B.BREADCRUMB_RIFTS_STARTED_FIRST_BOSS_RIFT),this._segment.rifts.sendBossRiftStartedEvent(),U}))}resetRiftRun(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(H.D.Rifts.ResetRiftRun,{},!0)}))}updateTierUnlockProgress(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(H.D.Rifts.UpdateTierUnlockProgress,{},!0)}))}getRiftsTierData(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(H.D.Rifts.GetTierData,{selectedPortalId:k},!1)}))}getRiftsConfig(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(H.D.Rifts.GetConfig,{},!1)}))}getSelectedPortalId(){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(H.D.Rifts.GetSelectedPortal,{},!1)).currentPortalId}))}updateSelectedPortal(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(H.D.Rifts.UpdateSelectedPortal,{selectedPortalId:k},!0)}))}attemptSecureUnlockNextRiftTier(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(H.D.Rifts.AttemptSecureUnlockNextRiftTier,{selectedPortalId:k},!0)}))}reuseRiftPet(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(H.D.Rifts.ReuseRiftPet,{petId:k},!0)}))}expireRiftPetCooldown(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(H.D.Rifts.ExpireRiftPetCooldown,{petId:k},!0)}))}getFirstTimeRewardsData(){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(H.D.Rifts.GetFirstTimeRewardsData,{},!1)).firstTimeRewardsData}))}updateRiftsConfigVersion(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(H.D.Rifts.UpdateRiftsConfigVersion,{},!1)}))}};(0,F.Cg)([(0,q.b)("c47-20b6"),(0,F.Sn)("design:type",W.Y)],z.prototype,"_segment",void 0),z=(0,F.Cg)([(0,G.injectable)()],z)},59219:(k,B,U)=>{"use strict";U.d(B,{E:()=>K});var F,G,j=U(8674),$=U(79687),H=U(76546),V=U(80403),W=U(48417),q=U(15821);!function(k){k.NEAR_RANKINGS="NEAR_RANKINGS",k.TOP_RANKINGS="TOP_RANKINGS"}(G||(G={}));let K=F=class extends H.D{isEligibleForMenu(){return(0,j.sH)(this,void 0,void 0,(function*(){var k,B,U,G,j,$,H,V,W,K;const z=yield this._graphQL.sendRequest(F.STATE_CHALLENGES_CLASS_OPTED_OUT);return null!==(K=!(null===(G=null===(U=null===(B=null===(k=z.data)||void 0===k?void 0:k.viewer)||void 0===B?void 0:B.currentClassroom)||void 0===U?void 0:U.node)||void 0===G?void 0:G.isOptedOutOfStateChallenge)&&q.A.isDefined(null===(W=null===(V=null===(H=null===($=null===(j=z.data)||void 0===j?void 0:j.viewer)||void 0===$?void 0:$.currentClassroom)||void 0===H?void 0:H.node)||void 0===V?void 0:V.currentProdigyCup)||void 0===W?void 0:W.tier))&&void 0!==K&&K}))}fetchStateChallengesData(){return(0,j.sH)(this,void 0,void 0,(function*(){return this._graphQL.sendRequest(F.STATE_CHALLENGES_QUERY)}))}getStateChallengeGoalsData(k){return(0,j.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(W.D.StateChallenge.GetStateChallengeGoalsData,{params:k},!1)).goalsData}))}claimStateChallengeGoalsRewards(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(W.D.StateChallenge.ClaimStateChallengeGoalsRewards,{id:k,params:B},!1)}))}claimPreviousStateChallengeGoalsRewards(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(W.D.StateChallenge.ClaimPreviousStateChallengeGoalsRewards,Object.assign({params:k},void 0!==B&&{id:B}),!1)}))}hasUnclaimedPreviousStateChallengeGoalsRewards(k){return(0,j.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(W.D.StateChallenge.HasUnclaimedPreviousStateChallengeGoalsRewards,{params:k},!1)}))}getEndOfChallengeRewards(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(W.D.StateChallenge.GetEndOfChallengeRewards,{rank:k,correctAnswers:B},!1)}))}getRewardsGrantingPeriodEndDate(k){return(0,j.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(W.D.StateChallenge.GetRewardsGrantingPeriodEndDate,{competition:k},!1)}))}getProdigyCupConfigData(){return(0,j.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(W.D.StateChallenge.GetProdigyCupConfigData,{},!1)}))}};K.STATE_CHALLENGES_QUERY="\n query stateChallengesQuery {\n viewer {\n id\n username\n currentClassroom {\n node {\n id\n classroomMonthlyLeaderboard {\n currentLeaderboard {\n node {\n leaderboard {\n nodes {\n correctAnswers\n displayName\n rank\n }\n }\n currentClassroom {\n node {\n correctAnswers\n displayName\n rank\n rankDeltaValue\n }\n }\n }\n }\n }\n currentProdigyCup {\n tier\n finalsPhase {\n competition\n startDate\n endDate\n lastUpdated\n currentFinalsSchoolEntry {\n correctAnswers\n displayName\n rank\n schoolId\n }\n leaderboard {\n correctAnswers\n displayName\n rank\n schoolId\n }\n }\n stateChallengesPhase {\n startDate\n endDate\n lastUpdated\n nationalCupQualificationDate\n stateChallengeWinnerDate\n currentStateChallenge {\n node {\n topRankings: leaderboard(leaderboardType: TOP_RANKINGS) {\n nodes {\n correctAnswers\n displayName\n rank\n schoolId\n }\n }\n nearRankings: leaderboard(leaderboardType: NEAR_RANKINGS) {\n nodes {\n correctAnswers\n displayName\n rank\n schoolId\n }\n }\n currentSchool {\n node {\n correctAnswers\n displayName\n schoolId\n rank\n }\n }\n }\n }\n stateChallenges {\n\t\t\t\t\t\t\t\t\tnodes {\n month\n\t\t\t\t\t\t\t\t\t\tcurrentSchool {\n\t\t\t\t\t\t\t\t\t\t\tnode {\n rank\n\t\t\t\t\t\t\t\t\t\t\t\tcorrectAnswers\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n }\n }\n }\n }\n }\n }\n ",K.STATE_CHALLENGES_SCHOOL_RANK_ONLY_QUERY="\n query stateChallengesSchoolRankQuery {\n viewer {\n id\n username\n currentClassroom {\n node {\n id\n currentProdigyCup {\n stateChallengesPhase {\n currentStateChallenge {\n node {\n currentSchool {\n node {\n rank\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n ",K.STATE_CHALLENGES_CLASS_OPTED_OUT="\n query stateChallengesClassOptedOut {\n viewer {\n id\n username\n currentClassroom {\n node {\n isOptedOutOfStateChallenge\n currentProdigyCup {\n tier\n }\n }\n }\n }\n }\n ",(0,j.Cg)([(0,$.inject)("8bb-7057"),(0,j.Sn)("design:type",V.K)],K.prototype,"_graphQL",void 0),K=F=(0,j.Cg)([(0,$.injectable)()],K)},70330:(k,B,U)=>{"use strict";U.d(B,{d:()=>Z,p:()=>G});var F,G,j=U(8674),$=U(79600),H=U(3332),V=U(62459),W=U(79687),q=U(95891),K=U(48417),z=U(59287),Y=U(35120),Q=U(34829),X=U(37251);!function(k){k.DoesNotExist="Channel does not exist",k.Full="Channel is full"}(G||(G={}));let Z=F=class{constructor(){this.onError=new V.HN0,this.onNotificationReceived=new V.HN0,this._onSubscribeLocationError=new V.HN0,this._onSubscribeWorldError=new V.HN0,this._onSubscribeFeatureError=new V.HN0,this._onDisconnection=new V.HN0,this._onReconnection=new V.HN0,this._worldChannel=null,this._featureChannels={}}connect(){return(0,j.sH)(this,void 0,void 0,(function*(){if(this._multiplayer)return;const k=Y.q.instance.prodigy.gameContainer.get("be9-3278"),B=new H.Multiplayer(`${X.X.CLIENT_ID}`,k.getMultiplayerRootURL());this._multiplayer=B,B.connect(),B.enableMoveOnAreaPerChannel(),yield B.authenticate(this._catalyst.authHandler.getJWT()),B.generalError((k=>this.onError.dispatch(k))).catch(V.RQr.createHandler("Error in the multiplayer error callback")),B.subscribeFailError(this.onSubscribeFailError.bind(this)).catch(V.RQr.createHandler("Error in subscribeFailError")),B.onReconnect((()=>this._onReconnection.dispatch())).catch(V.RQr.createHandler("Error in onReconnect")),B.disconnectError((()=>this._onDisconnection.dispatch())).catch(V.RQr.createHandler("Error in onDisconnection")),B.addNotificationListener((k=>{"notification"===k.type?this.onNotificationReceived.dispatch(k.notificationInfo):"playerJoined"===k.type?this.onNotificationReceived.dispatch({notificationInfo:k.playerInfo.appearance,action:"player_joined",target:k.playerInfo.userID}):V.VyI.log(`Notification received with invalid message type ${k.type}`,V.$bb.Error)})).catch(V.RQr.createHandler("Error in notification listener"))}))}joinLocationChannel(k,B,U,F,G,$){return(0,j.sH)(this,void 0,void 0,(function*(){yield this.connect();const j=this.createVerboseMessageProcessor(k,B);yield this.leaveLocationChannel().catch(V.RQr.createHandler("Error leaving channel")),this._multiplayer.userListReceiver((B=>{B.channel!==k&&B.channel!==this.getChannelName(k)||j(Object.assign(Object.assign({},B),{type:"userList"}))})).catch(V.RQr.createHandler("Error in user list receiver")),U&&(this.onError.add(U,this.joinLocationChannel),this._onSubscribeLocationError.add(U,this.joinLocationChannel)),F&&this._onDisconnection.add(F,this.joinLocationChannel),G&&this._onReconnection.add(G,this.joinLocationChannel),this._channelSubscriptionCallback=[`${X.X.CLIENT_ID}-${k}`,$],this._multiplayer.subscribe(k,j).catch(V.RQr.createHandler("Error in channel subscription")),this._locationChannel=k}))}leaveLocationChannel(){return(0,j.sH)(this,void 0,void 0,(function*(){if(V.Aq$.isDefined(this._locationChannel)){const k=this._locationChannel;this._locationChannel=null,yield this._multiplayer.unsubscribe(k),this.onError.removeAll(this.joinLocationChannel),this._onSubscribeLocationError.removeAll(this.joinLocationChannel),this._onDisconnection.removeAll(this.joinLocationChannel),this._onReconnection.removeAll(this.joinLocationChannel)}}))}joinWorldChannel(k,B,U){return(0,j.sH)(this,arguments,void 0,(function*(k,B,U,F=!1){const G=z.K.getWorldChannelName(k);if(G===this._worldChannel&&!F)return;const j=this.createVerboseMessageProcessor(k,B);yield this.connect(),yield this.leaveWorldChannel().catch(V.RQr.createHandler("Error world leaving channel")),this._multiplayer.subscribedReceiver((k=>{var B;k.channel!==G&&k.channel!==this.getChannelName(G)||j(Object.assign(Object.assign({},k),{type:"subscribed"})),(null===(B=this._channelSubscriptionCallback)||void 0===B?void 0:B[1])&&this._channelSubscriptionCallback[0]===k.channel&&(this._channelSubscriptionCallback[1](k),this._channelSubscriptionCallback=void 0)})).catch(V.RQr.createHandler("Error in subscribed receiver")),this._onSubscribeWorldError.add(U,this.joinWorldChannel);try{this._multiplayer.subscribe(G,j).catch(V.RQr.createHandler("Error subscribing to world channel"))}catch($){return}this._worldChannel=G}))}createAndJoinWorldChannel(k,B,U){return(0,j.sH)(this,void 0,void 0,(function*(){const F=z.K.sanitizeName(k),G=yield this._catalyst.cloudScript.timeoutMS(1e4).setRetryOption({retryCount:5,retryIntervalMS:1e3}).execute(K.D.World.CreateChannel,{worldName:F});if(!G.isOK())throw new $.CatalystSdkError($.EErrorCode.Unknown,"Unknown CatalystSDK Error",`Status: ${G.status}`);yield this.joinWorldChannel(F,B,(k=>{this.leaveLocationChannel(),V.VyI.log("Could not connect to World",V.$bb.Error),U(k)}),!0)}))}createAndJoinZoneMapChannel(k,B,U,F,G){return(0,j.sH)(this,void 0,void 0,(function*(){const j=z.K.sanitizeName(k),H=z.K.sanitizeName(B),V=yield this._catalyst.cloudScript.timeoutMS(1e4).setRetryOption({retryCount:5,retryIntervalMS:1e3}).execute(K.D.ZoneMap.CreateChannel,{worldName:j,zoneMapName:H});if(!V.isOK())throw new $.CatalystSdkError($.EErrorCode.Unknown,"Unknown CatalystSDK Error",`Status: ${V.status}`);yield this.joinLocationChannel(z.K.getZoneMapChannelName(j,H),U,this.createAndJoinZoneMapSocketError,F,G)}))}createAndJoinZoneMapSocketError(k){this.leaveLocationChannel(),V.VyI.log("Could not connect to map channel",V.$bb.Error)}leaveWorldChannel(){return(0,j.sH)(this,void 0,void 0,(function*(){if(V.Aq$.isDefined(this._worldChannel)){const k=this._worldChannel;this._worldChannel=null,yield this._multiplayer.unsubscribe(k),this.onError.removeAll(this.joinWorldChannel),this._onSubscribeWorldError.removeAll(this.joinWorldChannel)}}))}joinFeatureChannel(k,B,U,F,G){return(0,j.sH)(this,void 0,void 0,(function*(){yield this.connect();const j=this.createVerboseMessageProcessor(k,B);this._multiplayer.userListReceiver((B=>{B.channel!==k&&B.channel!==this.getChannelName(k)||j(Object.assign(Object.assign({},B),{type:"userList"}))})).catch(V.RQr.createHandler("Error in user list receiver"));const $={name:k};U&&(this.onError.add(U,$),this._onSubscribeFeatureError.add(U,$)),F&&this._onDisconnection.add(F,$),G&&this._onReconnection.add(G,$),this._multiplayer.subscribe(k,j).catch(V.RQr.createHandler("Error in channel subscription")),this._featureChannels[k]=$}))}leaveFeatureChannel(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=this._featureChannels[k];V.Aq$.isDefined(B)&&(delete this._featureChannels[k],yield this._multiplayer.unsubscribe(k),this.onError.removeAll(B),this._onSubscribeFeatureError.removeAll(B))}))}leaveAllFeatureChannels(){return(0,j.sH)(this,void 0,void 0,(function*(){for(const k of Object.values(this._featureChannels))delete this._featureChannels[k.name],yield this.leaveFeatureChannel(k.name),this.onError.removeAll(k),this._onSubscribeFeatureError.removeAll(k)}))}moveOnArea(k){return(0,j.sH)(this,void 0,void 0,(function*(){this.isSubscribedToWorld()&&V.Aq$.isDefined(this._locationChannel)&&(yield this._multiplayer.moveOnArea(this.getChannelName(this._locationChannel),k))}))}setUserStatus(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=yield this._catalyst.cloudScript.timeoutMS(1e4).setRetryOption({retryCount:5,retryIntervalMS:1e3}).execute(K.D.Social.SetStatus,{status:k});if(!B.isOK())throw new $.CatalystSdkError($.EErrorCode.Unknown,"Unknown CatalystSDK Error",`Status: ${B.status}`)}))}getFriendsStatuses(k){return(0,j.sH)(this,void 0,void 0,(function*(){return this._throttledGetFriendStatuses||(this._throttledGetFriendStatuses=q.throttle(this.getFriendStatusesImpl,F.FRIEND_STATUS_UPDATE_INTERVAL,{trailing:!1})),this._throttledGetFriendStatuses(k)}))}getFriendStatusesImpl(k){return(0,j.sH)(this,void 0,void 0,(function*(){k.length>F.GET_FRIENDS_STATUSES_ID_LIMIT&&(V.VyI.log(`Truncating friend status request to ${F.GET_FRIENDS_STATUSES_ID_LIMIT} IDs (${k.length} given)`,V.$bb.Warning),k.length=F.GET_FRIENDS_STATUSES_ID_LIMIT);const B=yield this._catalyst.cloudScript.timeoutMS(1e4).setRetryOption({retryCount:5,retryIntervalMS:1e3}).execute(K.D.Social.GetFriendsStatuses,{friendIds:k});if(!B.isOK())throw new $.CatalystSdkError($.EErrorCode.Unknown,"Unknown CatalystSDK Error",`Status: ${B.status}, Data: ${JSON.stringify(B.data)}`);return B.data}))}onSubscribeFailError(k,B){B===this.getChannelName(this._locationChannel)?this._onSubscribeLocationError.dispatch(k):B===this.getChannelName(this._worldChannel)&&this._onSubscribeWorldError.dispatch(k)}getChannelName(k){return`${X.X.CLIENT_ID}-${k}`}isSubscribedToWorld(){return null!==this._worldChannel}destroy(){this.onError.dispose(),this._onSubscribeLocationError.dispose(),this._onSubscribeWorldError.dispose(),this._onSubscribeFeatureError.dispose(),this.onNotificationReceived.dispose(),this._onDisconnection.dispose(),this._onReconnection.dispose()}createVerboseMessageProcessor(k,B){return Q.s.get("GameConstants.Debug.VERBOSE_SYNAPSE_MESSAGES")?U=>{V.VyI.log(`Message received on channel ${k}: ${JSON.stringify(U)}`,V.$bb.Verbose),B(U)}:B}};Z.FRIEND_STATUS_UPDATE_INTERVAL=1e4,Z.GET_FRIENDS_STATUSES_ID_LIMIT=100,(0,j.Cg)([(0,W.inject)("00d-b27e"),(0,j.Sn)("design:type",X.X)],Z.prototype,"_catalyst",void 0),Z=F=(0,j.Cg)([(0,W.injectable)()],Z)},37962:(k,B,U)=>{"use strict";U.d(B,{j:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(76546);let H=class extends $.D{getVideosConfig(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Videos.GetConfig,{},!1)}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},34854:(k,B,U)=>{"use strict";U.d(B,{J:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(76546);let H=class extends $.D{getWizardWatchData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.WizardWatch.GetWizardWatchData,{},!1)}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},5668:(k,B,U)=>{"use strict";U.d(B,{D:()=>H});var F=U(8674),G=U(62459),j=U(95891),$=U(79422);class H extends G.s3P{get multiplayerRoomID(){return this._multiplayerRoomID}get playerList(){return this._playerList}get isDisconnected(){return!!this.joinPromise}constructor(k,B){var U,F;super(k),this.onConnect=new G.HN0,this.onMessage=new G.HN0,this.onPlayerJoined=new G.HN0,this.onPlayerDisconnect=new G.HN0,this._multiplayerRoomID="None",this._playerList=[],this._activePlayerId=null!==(F=null===(U=this.getInjectedValue("306-5359"))||void 0===U?void 0:U.getID())&&void 0!==F?F:G.wa5.getActiveScene().container.get("306-5359").getID(),this.ft=B,this.joinPromise=new G.bnh}broadcastMessage(k){var B,U;null===(B=this.logger)||void 0===B||B.logMessage("Broadcasting message"),null===(U=this.logger)||void 0===U||U.logMessage(JSON.stringify(k)),this.ft.emitMessage(k)}sendMessage(k){var B,U;null===(B=this.logger)||void 0===B||B.logMessage("Sending message"),null===(U=this.logger)||void 0===U||U.logMessage(JSON.stringify(k)),this.ft.emitMessage(k)}joinRoom(k){var B;null===(B=this.joinPromise)||void 0===B||B.resolve(),this.joinPromise=null,this.ft.joinZone({zoneName:k,autoBroadcastPosition:!1,onSubscribed:k=>{this._multiplayerRoomID=k.channel,this.onConnect.dispatch()},onMessage:k=>{var B,U;this.onMessage.dispatch(k),null===(B=this.logger)||void 0===B||B.logMessage("Received Message"),null===(U=this.logger)||void 0===U||U.logMessage(JSON.stringify(k))},onPlayerList:k=>{this._playerList=j.map(k,(k=>parseInt(k,10))).filter((k=>k!==this._activePlayerId))},onPlayerJoined:k=>{const B=parseInt(k,10);B!==this._activePlayerId&&(this._playerList.push(B),this.onPlayerJoined.dispatch(B))},onPlayerLeft:k=>{const B=parseInt(k,10);j.remove(this._playerList,B),this.onPlayerDisconnect.dispatch(B)}})}leaveRoom(){this.joinPromise=new G.bnh,this._multiplayerRoomID="None",this.ft.leaveZone()}awaitRoomJoined(){return(0,F.sH)(this,void 0,void 0,(function*(){this.joinPromise&&(yield this.joinPromise)}))}}(0,F.Cg)([(0,G.fFd)("CoOpLogging"),(0,F.Sn)("design:type",$.h)],H.prototype,"logger",void 0)},6413:(k,B,U)=>{"use strict";U.d(B,{h:()=>F});class F{}F.MAX_TEAM_SIZE=3,F.MAX_NONMEMBER_KENNEL_SIZE=150,F.MAX_KENNEL_SIZE_MULTIPLIER=2,F.STARTER_PET_SNOWFLUFF=148,F.STARTER_PET_MERMINA=145,F.STARTER_PET_WOTT=142,F.STARTER_PET_SPROOT=139,F.STARTER_PET_CHARFOAL=136,F.STARTER_PETS=[F.STARTER_PET_SNOWFLUFF,F.STARTER_PET_MERMINA,F.STARTER_PET_WOTT,F.STARTER_PET_SPROOT,F.STARTER_PET_CHARFOAL],F.CRYSTAL_MONSTER_1=152,F.CRYSTAL_MONSTER_2=153,F.CRYSTAL_MONSTER_3=154,F.CRYSTAL_MONSTERS=[F.CRYSTAL_MONSTER_1,F.CRYSTAL_MONSTER_2,F.CRYSTAL_MONSTER_3],F.DRAGONS=[130,131,132,133]},49282:(k,B,U)=>{"use strict";U.d(B,{D:()=>W});var F=U(8674),G=U(62459),j=U(88022),$=U(77938),H=U(28152),V=U(34603);let W=class extends G.uAl{constructor(){super(...arguments),this.onIconLoaded=new G.HN0}create(){super.create(),G.Aq$.isDefined(this._petID)&&this.setPetID(this._petID)}setPetID(k,B=!1){var U;this._petID=k;{const k=$.t.getItem("pet",this._petID);if(this._petIcon.OnLoaded.addOnce(this.onIconLoaded.dispatch,this.onIconLoaded),k){const F=B?"-cooldown":"";this._petIcon.setAsset(j._.Ui_battle_revamp_json,`icon-mini-element-${null===(U=k.data)||void 0===U?void 0:U.affinity}${F}`).catch(G.RQr.createHandler("Could not set element asset"))}else this._petIcon.setAsset("").catch(G.RQr.createHandler("Could not set asset"))}}destroy(){this.onIconLoaded.dispose(),super.destroy()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_petID",void 0),(0,F.Cg)([(0,G.MnK)(V._),(0,F.Sn)("design:type",V._)],W.prototype,"_petIcon",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],W.prototype,"onIconLoaded",void 0),W=(0,F.Cg)([(0,G.EVk)("PetElementDisplay",H.Y.uiPet)],W)},30065:(k,B,U)=>{"use strict";var F;U.d(B,{Q:()=>F}),function(k){k[k.Springfest=0]="Springfest",k[k.Summerfest=1]="Summerfest",k[k.Pumpkinfest=2]="Pumpkinfest",k[k.Winterfest=3]="Winterfest",k[k.StarlightFestival=4]="StarlightFestival",k[k.MoonlightFestival=5]="MoonlightFestival",k[k.GenericFestival=6]="GenericFestival"}(F||(F={}))},47728:(k,B,U)=>{"use strict";U.d(B,{x:()=>st});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(99625),V=U(36648),W=U(57797),q=U(99842),K=U(56567),z=U(92240),Y=U(94310),Q=U(35120),X=U(34829),Z=U(77938),J=U(53880),tt=U(65050),et=U(41674),it=U(46784);class st{static sampleDailyBattleData(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=k.dailyPlacements.filter((k=>k.type!==W.k$.Boss&&(U!==W.je.Normal||B!==k.location))),G=$().sample(F),j=k.dailyPlacements.filter((k=>k.type!==W.k$.Normal&&k.location!==(null==G?void 0:G.location)&&(U!==W.je.Boss||B!==k.location))),H=$().sample(j),V=new K.f,[z,Y]=yield Promise.all([q.s.sampleRandomEncounter(k.encounterEntity,V),k.bossEncounterEntity?q.s.sampleRandomEncounter(k.bossEncounterEntity,V):Promise.resolve(void 0)]);return{normalPlacement:G,bossPlacement:H,normalEncounter:z,bossEncounter:Y}}))}static openFestivalAboutMenu(k,B){var U,F,j,$,W,q;const K=H.l.FestivalAboutMenu,z=it.B.FestivalAboutWindow,Y=Q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),X=Q.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig(),Z=Y.getText("ABOUT_X",(null===(U=null==X?void 0:X.tintableBanner)||void 0===U?void 0:U.titleText)?Y.getText(null===(F=null==X?void 0:X.tintableBanner)||void 0===F?void 0:F.titleText):Y.getText("FESTIVAL")),st=Q.q.instance.prodigy.open.prefabMenu(K,void 0,void 0,void 0,!0,{[J.J.BackgroundImageGuid]:null!==(j=null==X?void 0:X.backgroundImageGuid)&&void 0!==j?j:V.q.Background_starlight,[J.J.TitleText]:Z,[J.J.LeftColumnText]:Y.getText(null!==($=null==X?void 0:X.aboutScreenData.leftColumnText)&&void 0!==$?$:""),[J.J.MiddleColumnText]:Y.getText(null!==(W=null==X?void 0:X.aboutScreenData.middleColumnText)&&void 0!==W?W:""),[J.J.RightColumnText]:Y.getText(null!==(q=null==X?void 0:X.aboutScreenData.rightColumnText)&&void 0!==q?q:""),[J.J.FestivalAtlasGuid]:null==X?void 0:X.festivalUiAtlasGuid,[J.J.LeftColumnFrame]:null==X?void 0:X.aboutScreenData.leftAtlasFrame,[J.J.MiddleColumnFrame]:null==X?void 0:X.aboutScreenData.middleAtlasFrame,[J.J.RightColumnFrame]:null==X?void 0:X.aboutScreenData.rightAtlasFrame},{interfaceName:z,interfaceType:et.Wm.Modal,originType:k,originID:B,instanceType:tt.N.Interface},!0,!1,void 0,!1,!0);return st.createContainer=!1,st}static openFestivalProgressMenu(k,B,U,F){let G;return G=this.shouldShowCurrencyDrainPopup(Y.L.CurrencyDrainHudOverride)?st.openCurrencyDrainModal(et.$N.HudClick,F):Q.q.instance.prodigy.gameContainer.get("12b-405a").handleFestivalProgressPopup(F,{originType:k,originID:B}),U&&(null==G||G.onPrefabLoaded.addOnce(U)),G}static openCurrencyDrainModal(k,B){const U=Q.q.instance.prodigy.gameContainer.get("99d-5e9e").getCachedFestivalQuestData();if(!U)return void(null==B||B());const F=Q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),j=U.getEndDate()-Date.now(),$=U.getMetadata();return Q.q.instance.prodigy.open.prefabMenu(H.l.CurrencyDrainWarningModal,B,!0,!0,!0,{CurrencyModalHeader:$.currencyDrainModalTitle?F.getText($.currencyDrainModalTitle):"",CurrencyModalText:$.currencyDrainModalText?F.getText($.currencyDrainModalText):"",CurrencyModalStoreId:U.getMetadata().festivalStoreId,CURRENCY_DISPLAY_ID:U.getMetadata().festivalCurrencyId,CURRENCY_DISPLAY_PROMO:U.getMetadata().currencyDrainPromoGuid,TIMER_TEXT:F.getText(st.DAYS_LEFT_TEXT_KEY,Math.ceil(j/X.s.DAY_IN_MS)),CLOSE_BUTTON_ACTIVE:k!==et.$N.HudClick},{interfaceName:it.B.FestivalCurrencyDrainPopup,interfaceType:et.Wm.Modal,originType:k,originID:"festival",instanceType:tt.N.Interface},!0,!1,void 0,!1,!1)}static openTravelModal(k,B,U){var F;const j=Q.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig(),$=Q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),W={travelModalTitle:$.getText("X_IS_ON",(null==j?void 0:j.tintableBanner.titleText)?$.getText(null==j?void 0:j.tintableBanner.titleText):$.getText("FESTIVAL")),travelModalImageGuid:null!==(F=null==j?void 0:j.modalImageGuid)&&void 0!==F?F:V.q.Pumpkinfest_modal,actionButtonName:st.TRAVEL_MODAL_ACTION_BUTTON_NAME_MAP,actionButtonDestination:st.TRAVEL_MODAL_DESTINATION,actionButtonInterfaceName:st.TRAVEL_MODAL_INTERFACE_NAME_MAP,closeButtonDestination:st.TRAVEL_MODAL_CLOSE_BUTTON_DESTINATION,closeButtonInterfaceName:st.TRAVEL_MODAL_INTERFACE_NAME_MAP};k===et.$N.HudClick&&(W.actionButtonName=st.TRAVEL_MODAL_ACTION_BUTTON_NAME_HUD,W.actionButtonDestination=st.TRAVEL_MODAL_DESTINATION,W.actionButtonInterfaceName=st.TRAVEL_MODAL_INTERFACE_NAME_HUD,W.closeButtonInterfaceName=st.TRAVEL_MODAL_INTERFACE_NAME_HUD);const q=k===et.$N.HudClick?it.B.FestivalHudLaunchPopup:it.B.FestivalLaunchPopup;return Q.q.instance.prodigy.open.prefabMenu(H.l.FestivalTravelModal,B,!0,!1,!0,Object.assign(Object.assign({},W),{[st.TRAVEL_MODAL_TRAVEL_SUCCESS_CALLBACK]:U}),{interfaceName:q,interfaceType:et.Wm.Modal,originType:k,originID:"festival",instanceType:tt.N.Interface},!0,!1,void 0,!1,!1)}static getFestivalMapButtonImage(k){var B,U;const F=Q.q.instance.prodigy.gameContainer.get("12b-405a");if(!F.getActiveFestival())return;return(null!==(U=null===(B=F.getFestivalConfig())||void 0===B?void 0:B.worldMapButtonGuids)&&void 0!==U?U:{})[k]}static getFestivalMapIconImage(){var k;return null===(k=Q.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig())||void 0===k?void 0:k.worldMapIconGuid}static getAllFestivalMapButtonImages(){var k;const B=[],U=Q.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig(),F=null!==(k=null==U?void 0:U.worldMapButtonGuids)&&void 0!==k?k:{};return B.push(...Object.values(F)),(null==U?void 0:U.worldMapIconGuid)&&B.push(U.worldMapIconGuid),B}static isMorphMarbleAsset(k){var B,U;const F=null===(B=Z.t.getItem("item",k))||void 0===B?void 0:B.data;return F?!!((null===(U=F.effect)||void 0===U?void 0:U.transform)&&F.effect.time&&F.effect.ID):(G.VyI.log(`FestivalUtil.isMorphMarbleAsset: Item with ID ${k} not found.`,G.$bb.Warning),!1)}static shouldShowCurrencyDrainPopup(k){var B,U,F,G,j;const $=Q.q.instance.prodigy.gameContainer.get("99d-5e9e"),H=$.getCachedFestivalQuestData();if(!(null===(B=null==H?void 0:H.getMetadata())||void 0===B?void 0:B.festivalCurrencyId))return!1;if(!(null===(U=Q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.getItem("currency",null==H?void 0:H.getMetadata().festivalCurrencyId))||void 0===U?void 0:U.N))return!1;const V=null==H?void 0:H.getStates(),W=null===(F=$.getCachedFestivalQuestData())||void 0===F?void 0:F.getTasks().map((k=>k.taskProgress)),q=z.h.calculateState(k,null!=V?V:[],null!=W?W:[]);return null!==(j=null===(G=null==q?void 0:q.active)||void 0===G?void 0:G.isActive)&&void 0!==j&&j}static getFestivalSegmentContext(){var k;const B=Q.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=Q.q.instance.prodigy.gameContainer.get("99d-5e9e");return{instance_type:B.daily.festivalType,instance_id:null!==(k=U.getCurrentQuestID())&&void 0!==k?k:""}}static hasFestivalBeenSeen(){var k;const B=Q.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=Q.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival();if(!U)return!1;const F=null===(k=B.data.hudAttentionSeenFlags)||void 0===k?void 0:k.Festival;return!!F&&Number.parseInt(F.identifier.toString())===U.type}}st.MULTIPLE_PREREQUISITES_TEXT_KEY="FESTIVAL_COMPLETE_OTHER_QUESTS",st.LONG_PREREQUISITE_TEXT_KEY="FESTIVAL_TIER_COMPLETE_X",st.SHORT_PREREQUISITE_TEXT_KEY="FESTIVAL_TIER_COMPLETE_X_TO_UNLOCK",st.DAYS_LEFT_TEXT_KEY="FESTIVAL_TIER_X_DAYS_LEFT",st.STARTS_IN_TEXT_KEY="FESTIVAL_TIER_STARTS_IN_X_DAYS",st.STORY_COMPLETE_TEXT_KEY="FESTIVAL_STORY_TIER_COMPLETE",st.LONG_QUEST_NAME_CHAR_LENGTH=14,st.PROGRESS_STORY_KEY="FESTIVAL_PROGRESS_STORY",st.PROGRESS_COMPLETE_KEY="FESTIVAL_PROGRESS_COMPLETED",st.QUEST_LAMPLIGHT_PROMPT_KEY="FESTIVAL_QUEST_LAMPLIGHT_PROMPT",st.FESTIVAL_TIER_RETURN_TODAY_KEY="FESTIVAL_TIER_RETURN_TODAY",st.FESTIVAL_TIER_RETURN_TOMORROW_KEY="FESTIVAL_TIER_RETURN_TOMORROW",st.FESTIVAL_QUEST_COMING_SOON_KEY="FESTIVAL_QUEST_COMING_SOON",st.TRAVEL_MODAL_ACTION_BUTTON_NAME_HUD="festival-launch-play",st.TRAVEL_MODAL_ACTION_BUTTON_NAME_MAP="festival-play-button",st.TRAVEL_MODAL_DESTINATION="lamplight-B3",st.TRAVEL_MODAL_INTERFACE_NAME_HUD="hud-button",st.TRAVEL_MODAL_INTERFACE_NAME_MAP="world-map",st.TRAVEL_MODAL_CLOSE_BUTTON_DESTINATION="map-screen",st.TRAVEL_MODAL_TRAVEL_SUCCESS_CALLBACK="travel-success-callback"},92946:(k,B,U)=>{"use strict";U.d(B,{E:()=>it});var F=U(8674),G=U(62459),j=U(28152),$=U(35120),H=U(57797),V=U(13956),W=U(90744),q=U(47255),K=U(41674),z=U(65240),Y=U(95057),Q=U(64353),X=U(88022),Z=U(19633),J=U(43333),tt=U(31125),et=U(80060);let it=class extends G.uAl{constructor(){super(...arguments),this._playerDaily=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily,this._assetID="festival-boss-statue-modal",this._bossGraphicsAtlas=X._.Ui_shared_revamp_json,this._bossGraphicOnAssetFrame="boss-statue-on",this._bossGraphicOffAssetFrame="boss-statue-off",this._localizer=$.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService)}create(){var k,B,U,F;super.create();const j=null===(k=$.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig())||void 0===k?void 0:k.bossBattleModalData;if(j)if(this._bossBattleModalData=j,this._bossGraphicsAtlas=null!==(B=j.bossGraphicsAtlas)&&void 0!==B?B:this._bossGraphicsAtlas,this._bossGraphicOnAssetFrame=null!==(U=j.bossGraphicOnAssetFrame)&&void 0!==U?U:this._bossGraphicOnAssetFrame,this._bossGraphicOffAssetFrame=null!==(F=j.bossGraphicOffAssetFrame)&&void 0!==F?F:this._bossGraphicOffAssetFrame,this._bossGraphic.updateAsset(this._bossGraphicsAtlas,this._bossGraphicOnAssetFrame),this._playerDaily.isDailyBattleComplete(H.je.Boss))if(this._playerDaily.dailyBossBattleRematchCount>=this._bossBattleModalData.purchaseRematchLimit)this._titleText.text=this._localizer.getText("BOSS_STATUE_TITLE_INACTIVE"),this._bodyText.text=this._localizer.getText("BOSS_STATUE_BODY_INACTIVE"),this._bossGraphic.updateAsset(this._bossGraphicsAtlas,this._bossGraphicOffAssetFrame),this._actionButton.text=this._localizer.getText("CLOSE_BUTTON_SENTENCE_CASE"),this._countdownTimer.active=!1,this._noButton.GameObject.active=!1,this._rematchCounterGameObject.active=!1,this._actionButton.icon=tt.XN.Close,this._actionButton.onClick.add((()=>{this.GameObject.destroy()}));else{const k=$.q.instance.prodigy.gameContainer.get("5c7-e02d");this._titleText.text=this._localizer.getText("BOSS_STATUE_TITLE_REMATCH"),this._bodyText.text=this._localizer.getText("BOSS_STATUE_BODY_REMATCH"),this._actionButton.text=k.isHardCurrencyMemberLocked(this._bossBattleModalData.respinCostMagicoin)?"Battle Now":this._bossBattleModalData.respinCostMagicoin.toString(),et.d.updateInjectedValues(this.gameObject,{SHOW_MEMBER_ICON:k.isHardCurrencyMemberLocked(this._bossBattleModalData.respinCostMagicoin)}),this._countdownTimer.active=!0;const B=Math.abs(this._playerDaily.lastStarted.getTime()+this._playerDaily.dailyBattleRefreshInterval-Date.now());this._countdownTimerText.setTemplateString("Rematch time"),this._countdownTimerText.setCountdownTimeMS(B),this._rematchCounterText.text=this._localizer.getText("REMATCHES_LEFT_X",this._bossBattleModalData.purchaseRematchLimit-this._playerDaily.dailyBossBattleRematchCount),this._actionButton.onClick.add((()=>{this.spendMagicoinForRematch()}))}else this._titleText.text=this._localizer.getText("BOSS_STATUE_TITLE_ACTIVE"),this._bodyText.text=this._localizer.getText("BOSS_STATUE_BODY_ACTIVE"),this._actionButton.text=this._localizer.getText("BATTLE_NOW"),this._actionButton.icon=tt.XN.Right,this._countdownTimer.active=!1,this._rematchCounterGameObject.active=!1,this._actionButton.onClick.add((()=>{this.startDailyBossBattleCallback()}));else G.RQr.createHandler("BossBattleModalData is undefined")}spendMagicoinForRematch(){const k=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily,B=$.q.instance.prodigy.gameContainer.get("12b-405a"),U=$.q.instance.prodigy.gameContainer.get("c47-20b6");let F;if(B.getActiveFestival()){const B=`${k.festivalType}-${this._assetID}`,G=k.getFestivalInstanceName();F={instance_id:B,instance_type:G,sink_type:z.C.FestivalDailyRespawnBossBattle,sink_id:U.festival.getCurrentFestivalSpinID()}}else F={sink_type:z.C.FestivalDailyRespawnBossBattle,sink_id:q.o.FunnelBossStatueModalPurchaseRematch};const j={currency:27,value:this._bossBattleModalData.respinCostMagicoin};this._bossBattleModalData.respinCostMagicoin&&this._paymentManager.canAfford(j)?this._paymentManager.spend(j,"festivalBossBattleRematch",F).then((()=>{this._playerDaily.dailyBossBattleRematchCount++,this.startDailyBossBattleCallback(),this.destroy()})).catch((()=>{G.RQr.createHandler("Error purchasing a boss daily battle rematch"),this.showConversionUpsellPopup(j,U,F),this.GameObject.destroy()})):(this.showConversionUpsellPopup(j,U,F),this.GameObject.destroy())}showConversionUpsellPopup(k,B,U){B.item.sendInsufficientCurrencyEvent(k,U),B.purchase.sendFunnelStart({type:"Festival-Boss-Battle-Hard-Currency-Insufficient-Resources",category:"festival-daily-boss-battle",contentId:`${this._playerDaily.festivalType}-${this._assetID}`,adType:Y.R.UnifiedConversionFlow,adVersion:Q.P.getAdVersion(q.o.FunnelNotEnoughCurrency)});const F={conversionFunnelName:q.o.FunnelNotEnoughCurrency};$.q.instance.prodigy.open.unifiedConversionFlow((()=>this.destroy()),F,{type:K.$N.FestivalBossBattleRematch,id:this._assetID})}};(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],it.prototype,"_titleText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],it.prototype,"_bodyText",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],it.prototype,"_bossGraphic",void 0),(0,F.Cg)([(0,G.MnK)(Z.S),(0,F.Sn)("design:type",Z.S)],it.prototype,"_noButton",void 0),(0,F.Cg)([(0,G.MnK)(Z.S),(0,F.Sn)("design:type",Z.S)],it.prototype,"_actionButton",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],it.prototype,"_countdownTimer",void 0),(0,F.Cg)([(0,G.MnK)(J.U),(0,F.Sn)("design:type",J.U)],it.prototype,"_countdownTimerText",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],it.prototype,"_rematchCounterGameObject",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],it.prototype,"_rematchCounterText",void 0),(0,F.Cg)([(0,V.b)("743-fd51"),(0,F.Sn)("design:type",W.E)],it.prototype,"_paymentManager",void 0),it=(0,F.Cg)([(0,G.EVk)("BossStatueModalComponent",j.Y.festival)],it)},31589:(k,B,U)=>{"use strict";U.d(B,{l:()=>ot});var F,G=U(8674),j=U(62459),$=U(35120),H=U(28402),V=U(95891),W=U(99625),q=U(65240),K=U(41674),z=U(90744),Y=U(13956),Q=U(64353),X=U(80060),Z=U(47255),J=U(43846),tt=U(43531),et=U(95057),it=U(21097),st=U(30226),nt=U(46318);class at extends nt.Q{constructor(){super(...arguments),this._segment=$.q.instance.prodigy.gameContainer.get("c47-20b6"),this._weekendEvents=$.q.instance.prodigy.gameContainer.get("12b-405a")}start(){let k=this.data.spinDialogueID;const B=this.data.firstSpinBreadcrumb;j.Aq$.isDefined(this.data.firstSpinDialogueID)&&!$.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(B.featureName,B.breadcrumbName)&&(k=this.data.firstSpinDialogueID,$.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(B.featureName,B.breadcrumbName)),this.showInitialDialogue(k)}tryAgain(){const k=new tt.rD(this.game);k.addEvents([{dialogueData:k.dataProvider.get(this.data.prizeReceivedDialogueID),blockInput:!0},{callback:this.showInitialDialogue.bind(this,this.data.spinAgainDialogueID)}]),k.start()}showInitialDialogue(k){const B=$.q.instance.prodigy.gameContainer.get("5c7-e02d");if(this.player.canSpin(this.assetID)||!this.player.canPurchaseSpin(this.assetID,this.data)||B.isHardCurrencyMemberLocked(this.data.respinCost.amount)){const B=(this.player.hasMembership()?2:1)-this.player.getNumSpins(this.assetID),U={INFO_TEXT:B>0?(0,J.k)("WHEEL_FREE_SPINS",B):void 0},F=$.q.instance.prodigy.gameContainer.get("d0e-64fd");X.d.preloadWithInjectedValuesAndDependenciesFromGUID(F,W.l.CharacterDialogue,U).then((()=>{const B=new tt.rD(this.game);B.addEvents([{type:tt.fA.WHEEL,dialogueData:Object.assign(Object.assign({},B.dataProvider.get(k)),{injectedValues:X.d.getDataForInjection(U)}),yes:this.trySpin.bind(this),no:this.showGoodbyeDialogue.bind(this)}]),B.start()})).catch(j.RQr.createHandler("Error preloading dialogue prefab"))}else this.showPurchaseSpinDialogue()}showSpinningDialogue(){this._spinDialogue=new tt.rD(this.game),this._spinDialogue.addEvents([{dialogueData:this._spinDialogue.dataProvider.get(this.data.spinningDialogueID)}]),this._spinDialogue.start(!0)}closeSpinDialogue(){this._spinDialogue.close()}showOutOfSpinsDialogue(k){var B,U;const F=new tt.rD(this.game),G=[];if(this._weekendEvents.getActiveFestival()){const k=this.player.daily,F=k.getFestivalInstanceName(),G=k.festivalType,j=null===(U=null===(B=this._weekendEvents.getFestivalConfig())||void 0===B?void 0:B.festivalPrizeWheels.find((k=>k.wheelId===this.assetID)))||void 0===U?void 0:U.name;this._segment.festival.sendFestivalPrizeWheelSpinFailedEvent(null!=j?j:this.assetID.toString(),this.assetID,it.WE.OutsideOfHours,F,G)}if(G.push({dialogueData:F.dataProvider.get(this.data.outOfSpinsDialogueID),blockInput:!0}),!this.player.hasMembership()&&!st.J.shouldSuppressAd(this.player)&&this.player.getNumSpins(this.assetID)<2){G.push({callback:$.q.instance.prodigy.open.membershipInfo.bind($.q.instance.prodigy.open,void 0,k)});const B=st.J.showYouTubeMembershipAd(this.game,!0)?et.R.Video:et.R.Static;this._segment.purchase.sendFunnelStart(Object.assign(Object.assign({},this.getSegmentPurchaseFunnelTriggerTypeAndCategory()),{contentId:`prizeWheel-${this.assetID}`,adType:B}))}G.push({callback:this.close.bind(this)}),F.addEvents(G),F.start()}openPrizesDialogue(k,B){let U={source_type:q.C.PrizeWheel};if(this._weekendEvents.getActiveFestival()){const k=this.player.daily,B=k.getFestivalInstanceName(),F=`${k.festivalType}-${this.assetID}`;U={source_type:q.C.FestivalPrizeWheel,source_id:this._segment.festival.getCurrentFestivalSpinID(),instance_id:B,instance_type:F}}const F=$.q.instance.prodigy.open.gotItem(k,(()=>{F.onClose=null,this.tryAgain()}),void 0,B,void 0,void 0,U)}showGoodbyeDialogue(){const k=new tt.rD(this.game);k.addEvents([{dialogueData:k.dataProvider.get(this.data.declineSpinDialogueID),blockInput:!0},{callback:this.close.bind(this)}]),k.start()}showPurchaseSpinDialogue(){var k,B,U;const F=new tt.rD(this.game),G=[],H=(null!==(k=this.data.purchaseSpinCount)&&void 0!==k?k:this.player.getNumSpins(this.assetID))-this.player.getNumSpins(this.assetID)+(this.player.hasMembership()?2:1),q={CURRENCY_AMOUNT:null!==(U=null===(B=this.data.respinCost)||void 0===B?void 0:B.amount.toString())&&void 0!==U?U:"",STAY_BUTTON_TEXT:(0,J.k)("NOT_NOW_CAPITAL"),INFO_TEXT:(0,J.k)("WHEEL_REMAINING",(0,V.clamp)(H,0,99))},K=$.q.instance.prodigy.gameContainer.get("d0e-64fd");X.d.preloadWithInjectedValuesAndDependenciesFromGUID(K,W.l.CharacterDialogue,q).then((()=>{G.push({type:tt.fA.CURRENCY,dialogueData:Object.assign(Object.assign({},F.dataProvider.get(this.data.purchaseSpinDialogueID)),{currencyButton:this.data.respinCost?{currencyId:this.data.respinCost.currencyId,amount:this.data.respinCost.amount}:void 0,injectedValues:X.d.getDataForInjection(q)}),yes:this.spendMagicoinToSpin.bind(this),no:this.showGoodbyeDialogue.bind(this)}),F.addEvents(G),F.start()})).catch(j.RQr.createHandler("Error preloading dialogue prefab"))}spendMagicoinToSpin(){let k;if(this._weekendEvents.getActiveFestival()){const B=this.player.daily,U=B.getFestivalInstanceName(),F=`${B.festivalType}-${this.assetID}`;k={instance_id:U,instance_type:F,sink_type:q.C.FestivalPrizeWheel,sink_id:this._segment.festival.getCurrentFestivalSpinID()}}else k={sink_type:q.C.PrizeWheel,sink_id:Z.o.FunnelPrizeWheelPurchaseSpin};const B={currency:this.data.respinCost.currencyId,value:this.data.respinCost.amount};this.data.respinCost&&this._paymentManager.canAfford(B)?this._paymentManager.spend(B,"prizeWheelSpin",k).then((()=>{this.showSpinningDialogue(),this.startSpin()})).catch((()=>{j.RQr.createHandler("Error purchasing a prize wheel spin"),this.showNotEnoughMagicoinDialogue(B,k)})):this.showNotEnoughMagicoinDialogue(B,k)}showNotEnoughMagicoinDialogue(k,B){var U,F,G;$.q.instance.prodigy.gameContainer.get("c47-20b6").item.sendInsufficientCurrencyEvent(k,B);const j=new tt.rD(this.game),H={CURRENCY_AMOUNT:null!==(F=null===(U=this.data.respinCost)||void 0===U?void 0:U.amount.toString())&&void 0!==F?F:"",STAY_BUTTON_TEXT:"Okay"};j.addEvents([{type:tt.fA.CURRENCY,dialogueData:Object.assign(Object.assign({},j.dataProvider.get(null!==(G=this.data.purchaseSpinFailedDialogueID)&&void 0!==G?G:this.data.declineSpinDialogueID)),{injectedValues:X.d.getDataForInjection(H)}),yes:this.showConversionUpsellPopup.bind(this),no:this.close.bind(this)},{callback:this.close.bind(this)}]),j.start()}showConversionUpsellPopup(){$.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:"Prize-Wheel-Hard-Currency-Insufficient-Resources-Respin",category:"festival-prize-wheel",contentId:`${this.player.daily.festivalType}-${this.assetID}`,adType:et.R.UnifiedConversionFlow,adVersion:Q.P.getAdVersion(Z.o.FunnelNotEnoughCurrency)});const k={conversionFunnelName:Z.o.FunnelNotEnoughCurrency};$.q.instance.prodigy.open.unifiedConversionFlow((()=>this.close()),k,{type:K.$N.PrizeWheel,id:this.assetID.toString()})}}(0,G.Cg)([(0,Y.b)("743-fd51"),(0,G.Sn)("design:type",z.E)],at.prototype,"_paymentManager",void 0);class rt extends at{constructor(k,B,U,F,G,j){super(k,B,U,F,G),this.festivalPrizeWheelComponent=j}trySpin(){this.festivalPrizeWheelComponent&&this.festivalPrizeWheelComponent.toggleWheelNewContainerActive(!1),super.trySpin()}}let ot=F=class extends j.jsv{constructor(){super(...arguments),this.wheelID=F.WHEEL_OF_WONDER_ID,this.wheelNpcContainerActive=!0,this.wheelNewStateContainerActive=!0,this.onWheelClose=new j.HN0}create(){super.create(),this.wheelNpcContainer.active=this.wheelNpcContainerActive,this.toggleWheelNewContainerActive()}destroy(){this.onWheelClose.dispose(),super.destroy()}toggleWheelNewContainerActive(k){if(void 0!==k)this.wheelNewStateContainerActive=k;else{const k=this._loggedInPlayer.player;this.wheelNewStateContainerActive=void 0===k.getNumSpins(this.wheelID)}this.wheelNewStateContainer.active=this.wheelNewStateContainerActive}openWheel(k){$.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.isNewFestivalWheel=!1;const B=k&&"number"==typeof k?k:this.wheelID;new rt($.q.instance.prodigy.game,this.screen.uiLayer,this._loggedInPlayer.player,this.screen,B,this)}moveSparkleEffect(k=0,B=0){const U=this.wheelSparklesGO.findComponent(j.XVE);U.setPosition(U.localPosition.x+k,U.localPosition.y+B)}};ot.WHEEL_OF_WONDER_ID=1,(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],ot.prototype,"wheelID",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],ot.prototype,"wheelGraphic",void 0),(0,G.Cg)([(0,j.MnK)(H.v),(0,G.Sn)("design:type",H.v)],ot.prototype,"wheelNpcSpine",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ot.prototype,"wheelNpcContainer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ot.prototype,"wheelNpcContainerActive",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ot.prototype,"wheelSparklesGO",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ot.prototype,"wheelNewStateContainer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ot.prototype,"wheelNewStateContainerActive",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],ot.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ot.prototype,"onWheelClose",void 0),ot=F=(0,G.Cg)([(0,j.EVk)("FestivalPrizeWheel",j.YH6.ui)],ot)},28080:(k,B,U)=>{"use strict";U.d(B,{D:()=>Q});var F,G=U(8674),j=U(62459),$=U(99625),H=(U(5491),U(35120)),V=U(82209),W=U(129),q=U(28152),K=U(6476),z=U(51941),Y=U(80060);let Q=F=class extends j.uAl{constructor(){super(...arguments),this.skinColor=1,this.eyeColor=1,this.face=1,this.hairColor=1,this.hairStyle=1,this.morphId=1}create(){super.create(),this.spawn().catch(j.RQr.createHandler("Error spawning wizard"))}spawn(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=new W.a(H.q.instance.game);k.appearance.setFace(this.face),k.appearance.setHair(this.hairStyle,this.hairColor),k.appearance.setSkinColor(this.skinColor),k.appearance.setEyeColor(this.eyeColor),k.equipment.setHat(this.hat),k.equipment.setOutfit(this.outfit),k.equipment.setWeapon(this.weapon),k.equipment.setBoots(this.boots),k.equipment.setMount(this.mount),this.morphType&&this.morphId&&k.setData({playerTransformation:{transformType:this.morphType,transformID:this.morphId}});const B=yield F.createWizardObject(k);this.gameObject.addChild(B)}))}static createWizardObject(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=!0){var U;const F=new V.z;F.initialize(k);const G=new j._mx;G.active=!1,G.addComponent(j.dLy);const W=yield Y.d.loadWithInjectedValuesAndDependenciesFromGUID(H.q.instance.prodigy.gameContainer.get("d0e-64fd"),$.l.WizardInjectionConfigured,{"377-3e7b":F,APPEARANCE:{face:k.appearance.getFace(),hair:k.appearance.getHair(),skin:k.appearance.getSkinColor(),eyeColor:k.appearance.getEyeColor(),hat:k.equipment.getHat(),outfit:k.equipment.getOutfit(),weapon:k.equipment.getWeapon(),boot:k.equipment.getBoots(),costume:k.equipment.getCostume()}},G);if(!B){W.findComponentInChildren(K.T).GameObject.active=!1}return yield null===(U=W.findComponentInChildren(z.c))||void 0===U?void 0:U.onLoadComplete.asPromise(),W}))}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"skinColor",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"eyeColor",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"face",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"hairColor",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"hairStyle",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"hat",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"outfit",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"weapon",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"boots",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"mount",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Q.prototype,"morphType",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"morphId",void 0),Q=F=(0,G.Cg)([(0,j.EVk)("WizardSpawner",q.Y.player)],Q)},71802:(k,B,U)=>{"use strict";U.d(B,{D:()=>tt});var F=U(62459),G=U(95891),j=U(68910),$=U(88022),H=U(56942),V=U(73678),W=U(35120),q=U(34829),K=U(77938),z=U(10730),Y=U(28930),Q=U(73797),X=U(48951),Z=U(21922),J=U(83726);class tt extends J.T{constructor(k,B,U,F,G,j,H,V){const W=`${V}-${H.tilemap}`;super(k,B,U,F,G,[],j.concat([W,$._.Ui_social_feed_json,$._.Ui_coop_json])),this.mapConfig=H,this.file=W,this.dungeonZone=k,this.key=`${this.mapConfig.x}-${this.mapConfig.y}`}setup(k,B,U){super.setup(k,B,U);const G=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let j=this.dungeonZone.collectedItems[this.key];F.Aq$.isDefined(j)||(j=this.dungeonZone.collectedItems[this.key]=[]),B.zoneName=`${this.dungeonZone.ID}-${G.userID}`;for(let F=0;F<4;F++)this.toggleDynamicLayer(this.game,F+1,!1,0);for(let F=0;F{this.dungeonZone.skipProgressBarAnimation=!0,this.dungeonZone.teleportInDungeon(U.map,j.exit.x,j.exit.y)})).name=Y.O[G];const H=W.q.instance.prodigy.create.sprite(j.area.x,j.area.y,$._.General_core_json,"empty",{x:.5,y:.5},null,200,200);H.events.onInputUp.add((()=>{this.walkToDoorway(j.walkTarget.x,j.walkTarget.y,null)})),H.alpha=0,H.inputEnabled=!0,this.screen.content.addChild(H),this.toggleDynamicLayer(this.game,G+1,!0,0),this.addDoorGlow(G,j)}for(let F=0;F{k&&this.screen.user.setPath(k,U)})).catch(F.RQr.createHandler("Unable to find path to doorway"))}addCollected(k){this.dungeonZone.addCollected(this.key,k)}addDoorGlow(k,B){const U=this.game.add.spine(B.glowPos.x,B.glowPos.y,H.Q.Spine_archive_door_glow_json);U.setToSetupPose(),U.setAnimationByName(0,B.glowAnimation,!0),U.scale.x=B.isGlowFlipped?-1:1,F.Aq$.toggleDisplayObjSmooth(U,!1),this.screen.above.add(U)}createHUDCounter(){if(this.isInAcademyElementalTower())W.q.instance.prodigy.open.academyTowerProgress().onPrefabLoaded.add((k=>{k.findComponent(Z.u).initialize(this.dungeonZone.skipProgressBarAnimation)}));else if(F.Aq$.isDefined(this.counterUI)){const k=K.t.getItem("ui",this.counterUI).data;this.hudCounterContainer=new j.Container;const B=new X.c(this.game).createUIElements(k.elements,this.hudCounterContainer);this.hudCounterText=B.find((k=>"counterText"===k.name));const U=this.dungeonZone.goalTotal,F=this.dungeonZone.goalCollected;this.hudCounterText.setText(`${F} / ${U}`),this.game.broadcaster.addAppListener(Q.$i.TargetCollected,(()=>{this.updateHUDCounter()}),this)}}isInAcademyElementalTower(){return tt.ELEMENTAL_TOWER_ZONE_IDS.includes(this.zone.ID)}updateHUDCounter(){F.Aq$.isDefined(this.hudCounterText)&&this.hudCounterText.setText(`${this.dungeonZone.goalCollected} / ${this.dungeonZone.goalTotal}`)}guideToExit(k){if(!tt.hasExit(this.mapConfig,k)){const B=this.getDirectionToExit(k);if(F.Aq$.isDefined(B)){const k=Y.O[B],U=this.screen.floor.getByName(k);if(F.Aq$.isDefined(U)){const k=this.screen.above.add(W.q.instance.prodigy.create.sprite(U.x,U.y,$._.General_core_json,"area-pointer"));k.anchor.set(.5,0);let G=0,j=0;switch(B){case Y.O.North:j=20,k.x-=5;break;case Y.O.East:G=-20,k.x-=20,k.y-=10,k.angle=90;break;case Y.O.South:j=-20,k.y-=80,k.x-=5,k.angle=190;break;case Y.O.West:G=20,k.x+=20,k.y-=10,k.angle=270}this.game.add.tween(k,this).to({x:k.x+G,y:k.y+j},400,F.GS3.Quadratic.InOut,!0,0,q.A.MAX_SAFE_INTEGER,!0)}}}}getDirectionToExit(k){for(let B=0;Bk instanceof z.v&&k.id===B))>=0}cleanup(){this.game.broadcaster.removeAppListener(Q.$i.TargetCollected,this),this.hudCounterText&&(this.hudCounterText.destroy(),this.hudCounterText=null),super.cleanup()}}tt.ELEMENTAL_TOWER_ZONE_IDS=[V.A_.EARTHTOWER,V.A_.ICETOWER,V.A_.STORMTOWER,V.A_.FIRETOWER,V.A_.WATERTOWER,V.A_.ASTRALTOWER]},4631:(k,B,U)=>{"use strict";var F;U.d(B,{j:()=>F}),function(k){k[k.openMap=0]="openMap",k[k.mapTeleport=1]="mapTeleport",k[k.teleport=2]="teleport",k[k.logout=3]="logout"}(F||(F={}))},83726:(k,B,U)=>{"use strict";U.d(B,{T:()=>et});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(88022),V=U(51742),W=U(62886),q=U(35120),K=U(15521),z=U(34829),Y=U(77938),Q=U(10592),X=U(13367),Z=U(73797),J=U(30226),tt=U(1041);class et extends tt.Z{constructor(k,B,U,F,j,$,W,K,z){super(q.q.instance.prodigy.gameContainer),this.tag="",this.isScene=!1,this.isMultiplayerDisabled=!1,this.arePopupsDisabled=!1,this.nameKey="",this.x=0,this.y=0,this.battleBG="",this.locations=[],this.questParams={},this.mapMonsters=[],this.guideHandData=[],this.tag=B,this.nameKey=U,this.zoneName=`${k.ID}-${B}`,this.x=F,this.y=j,this.file=`map-${this.zoneName.toLowerCase()}`,this.onFaint=k.defaultOnFaint,this.zone=k,this.battleBG=k.battleBG,this.technicalMetricsManager=q.q.instance.prodigy.gameContainer.get("2a1-fed9"),G.Aq$.isDefined(K)?this.file=K.toLowerCase():this.file=`map-${this.zoneName.toLowerCase()}`,this.assets.clear();const Y=[this.file,H._.Particles_json,H._.Ui_social_feed_json,V.c.Sfx_toaster_open].concat(W);G.Mnj.addAll(this.assets,Y),this.locations=$,this.guideHandData=null!=z?z:[]}get isQuestHub(){return this.zone.questHub.indexOf(this.tag)>=0}get name(){return this.getName()}getName(){return q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(this.nameKey)}getLocation(){return this.zoneName}setup(k,B,U={}){this.questParams=G.Aq$.isDefined(U)?U:{},q.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(W.T.ENTER_MAP,{id:`${this.zone.ID}-${this.tag}`}).catch(G.RQr.createHandler(`Error sending EnterMap event for ${this.zone.ID}-${this.tag}`));const F=this.technicalMetricsManager.timeToPlayMS;null!==F&&(G.VyI.log(`TTP: ${F}`,G.$bb.Verbose),this.technicalMetricsManager.timeToPlayMS=null),this.zone.hasDaily(this)&&G.Aq$.isDefined(this.zone.monsters)&&this.zone.placeDaily(this,k,B);const j=q.q.instance.prodigy.gameContainer.get("e5b-e931");if(this.canRegularMonsterSpawn()){const U=q.q.instance.prodigy.world;U.getPreviousMap()!==U.getCurrentMap()&&this.clearRespawns(),Promise.all([j.getSpawnDataForMap(this.zoneName),j.getMaximumSpawnsForMap(this.zoneName)]).then((([U,F])=>{U.map(((k,B)=>Object.assign({spawnId:B},k))).sort((()=>Math.random()-.5)).sort((k=>this.mapMonsters[k.spawnId+1]?-1:1)).slice(0,F).forEach((k=>{this.screen.user.playerPrefab?this.addPrefabEncounter(k.spawnId,k.x,k.y):this.screen.user.OnLoad.addOnce((()=>this.addPrefabEncounter(k.spawnId,k.x,k.y)))})),this.onMonsterSpawns(k,B)})).catch(G.RQr.createHandler(`Error loading spawn data for map ${this.zoneName}`))}else this.onMonsterSpawns(k,B);this.game=k,this.screen=B,this.game.broadcaster.addAppListener(Z.ph.EnableDynamicLayer,this.toggleDynamicLayer.bind(this),this,null,!0)}getEncounterDataFromLocalAsset(k){return(0,F.sH)(this,void 0,void 0,(function*(){return q.q.instance.prodigy.gameContainer.get("e5b-e931").loadDataSchemaFromJson(k)}))}start(k,B,U){const F=G.Aq$.isDefined(U)?U:this.zone.bgmID;q.q.instance.prodigy.audio.autoplay&&(q.q.instance.prodigy.audio.playBGM(F,!0),q.q.instance.prodigy.audio.resumeBGM())}process(k,B,U){}update(k){}getTag(){return this.tag}cleanup(){this.game?(this.game.broadcaster.removeAppListener(Z.ph.EnableDynamicLayer,this),super.cleanup()):G.VyI.log("Map cleanup called after map destroyed.",G.$bb.Warning)}processDynamicLayers(k,B){for(const U of this.dynamicSprites)G.Aq$.isDefined(U.collisionTile)&&U.collisionTile?U.destroy():U.isAbove?(K.Z.bringToTop(this.dynamicLayerContainers[`element-${U.dynamicToggle}`].above),this.dynamicLayerContainers[`element-${U.dynamicToggle}`].above.add(U)):(K.Z.bringToTop(this.dynamicLayerContainers[`element-${U.dynamicToggle}`].below),this.dynamicLayerContainers[`element-${U.dynamicToggle}`].below.add(U))}addAreaEvent(k,B,U,F,j,$,H,V,W=!1,K=!1){var z,Y;const Q=null!==(Y=null===(z=this.questParams)||void 0===z?void 0:z.enableAreaEvents)&&void 0!==Y?Y:!K,X=Q&&W;return U.target=F,!G.Aq$.isDefined(H)&&q.q.instance.prodigy.classModeController.isLockedZone(F)?(U.canReTrigger=!0,B.addAreaEvent(U,q.q.instance.prodigy.classModeController.onClassMode.bind(q.q.instance.prodigy.classModeController,F),V,X,!Q)):G.Aq$.isDefined(H)?B.addAreaEvent(U,H,V,X,!Q):B.addAreaEvent(U,q.q.instance.prodigy.world.it.bind(q.q.instance.prodigy.world,F,j,$),V,X,!Q)}addChest(k,B,F,j,$,H,V){if(G.Aq$.isDefined(this.questParams.enableChests)&&!this.questParams.enableChests)return null;const W=U(93096)[`${this.zoneName}-${F}`];return W||G.VyI.log(`No chest rewards found for chest with ID ${F} in ${this.zoneName}`,G.$bb.Error),B.addChest(F,j,$,W,H,V)}clearRespawns(){var k;for(let B=0;Bk===this.zoneName)))return!1;H.setUltimateSessionStatus(Q.n.None,null,0)}if(G.Aq$.isDefined(this.questParams.enableMonsters)&&!this.questParams.enableMonsters||G.Aq$.isDefined(this.questParams.overrideMonsterIDWithPippet)&&k===this.questParams.overrideMonsterIDWithPippet)return!1;if(J.J.isCoreZone(this.zone.ID)&&!B){const B=this.zone.getQuestState();if((null==B?void 0:B.req)&&(null===(F=null===(U=B.monsterState)||void 0===U?void 0:U[this.tag])||void 0===F?void 0:F[k])>0)return!1;if(1===(null===(j=B.state)||void 0===j?void 0:j[k]))return!1}return!(!B&&(null===($=this.mapMonsters[k])||void 0===$?void 0:$.respawn))}addMonster(k,B,U,F,j,$,H,V=!1,W=null,K=!1){if(G.Aq$.isDefined(this.mapMonsters[U])||(this.mapMonsters[U]={}),!this.canSpawnMonsterWithId(U,V))return null;const z=J.J.copyObject(H);z.onEnd=G.Aq$.isDefined(z.onEnd)?z.onEnd:this.zoneName,z.onFaint=G.Aq$.isDefined(z.onFaint)?z.onFaint:this.onFaint,z.screen=G.Aq$.isDefined(z.screen)?z.screen:this.battleBG,G.Aq$.isDefined(this.mapMonsters[U].data)&&!K&&(z.encounter=[this.mapMonsters[U].data]);const Y=q.q.instance.prodigy.gameContainer.get("d1f-4da3"),Q=B.addMonster(U,F,j,$,z,et.resetMonsterRespawn.bind(this,this.mapMonsters[U],z,Y.spawnCooldownDurationSeconds),G.Aq$.isDefined(this.mapMonsters[U].respawn),W);return this.mapMonsters[U].data=Q.monsterData,this.mapMonsters[U].event=Q,delete this.mapMonsters[U].respawn,Q}addPrefabEncounter(k,B,U){this.canSpawnMonsterWithId(k+1)&&q.q.instance.prodigy.prefabFactory.addMonster(this,B,U,k).catch(G.RQr.createHandler("Could not load spawn encounter prefab"))}static resetMonsterRespawn(k,B,U){k.monsterData=null,k.respawn=(new Date).getTime()+1e3*U,G.Aq$.isDefined(B)&&(k.data=null,G.Aq$.isDefined(B.onEnc)&&B.onEnc())}addPippet(k,B,U,F,j){const $=this.questParams.enableMonsters||!1;this.featureRequirements.meetsRequirementsDeprecated(1)&&G.Aq$.isDefined(q.q.instance.prodigy.world.pippetEncounterSpawn)&&this.zoneName===q.q.instance.prodigy.world.pippetEncounterSpawn.location&&!$&&(this.questParams.overrideMonsterIDWithPippet=G.Aq$.isDefined(U)?U:1,B.addPippet(F,j))}addWizard(k,B,U,F,j,$,H){const V=this.generateRogueWizardMod($);V.onEnd=G.Aq$.isDefined(V.onEnd)?V.onEnd:this.zoneName,V.onFaint=G.Aq$.isDefined(V.onFaint)?V.onFaint:this.onFaint,V.screen=G.Aq$.isDefined(V.screen)?V.screen:this.battleBG;const W=B.addWizard(U,F,j,V);return null!==W&&(H&&W.flip(),G.Aq$.isDefined(this.questParams.enableWizards)&&!this.questParams.enableWizards&&(W.visible=!1)),W}addConstructedNPC(k,B,U,F,j,$,H,V){return G.Aq$.isDefined(this.questParams.hiddenNPCs)&&this.questParams.hiddenNPCs.indexOf(j)>-1?null:B.addConstructedNPC(U,F,j,$,H,V)}addCollisionZone(k,B,U,F,G){const j=k.path.size,$=Math.floor(F/j),H=Math.floor(G/j),V=Math.floor(B/j),W=Math.floor(U/j);for(let q=V;q0?(k.add.tween([$.above],this).to({alpha:j},G.Aq$.isDefined(F)?F:1,G.GS3.Linear.None).start(),k.add.tween([$.below],this).to({alpha:j},G.Aq$.isDefined(F)?F:1,G.GS3.Linear.None).start()):($.above.alpha=j,$.below.alpha=j)),G.Aq$.isDefined(H)&&(H.forEach((k=>{this.screen.area[k.y][k.x]=U?k.value:1})),this.screen.path.init(this.screen.area,this.screen.tileSize))}}canRegularMonsterSpawn(){return!0}onMonsterSpawns(k,B){}getDefaultSpawnPosition(){return{x:this.x,y:this.y}}}(0,F.Cg)([(0,G.fFd)("db5-fb6e"),(0,F.Sn)("design:type",Object)],et.prototype,"featureRequirements",void 0),(0,F.Cg)([(0,G.fFd)("c47-20b6"),(0,F.Sn)("design:type",Function)],et.prototype,"segment",void 0)},85182:(k,B,U)=>{"use strict";U.d(B,{T:()=>$});var F=U(5491),G=U(35120),j=U(39984);class ${constructor(k,B,U,F,G,j,$,H,V,W,q,K,z=null,Y=null,Q=null){this.collectionMaps=null,this.zone=k,this.assets=B,this.ID=U,this.descKey=F,this.descCacheKey=F,this.req=G,this.area=j,this.areaCache=j,this.onStart=$,this.onProc=H,this.onComplete=V,this.reward=W,this.chain=q||!1,this.questGiver=z,this.questReceiver=Y,this.alternateOnStart=Q,this.questStep=K}setup(k,B,U){return this.screen=B,this.map=U,{}}start(k,B,U){return{}}end(){}process(k,B,U){}update(k,B,U){}static getXpRewardedForCompletingQuest(){const k=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getLevel(),B=Math.pow(.5,k/25);return Math.round(Math.max(this.MIN_QUEST_XP_REWARD,(j.e.starsToLevel(k+1,F.V.Player)-j.e.starsToLevel(k,F.V.Player))*B))}onQuestEventDialogue(k){}}$.MIN_QUEST_XP_REWARD=20},79340:(k,B,U)=>{"use strict";U.d(B,{Z:()=>z});var F=U(8674),G=U(62459),j=U(35120),$=U(24190),H=U(88022),V=U(80060),W=U(99625),q=U(76642),K=U(83726);class z extends K.T{constructor(k,B,U,F,G=0,j=0){super(k,B,"",G,j,[],U,F),this.isScene=!0,this.hasStarted=!1,this.isScene=!0,this.loadingData={fadeIn:!0,time:1,fadeOut:!0,save:!1}}setup(k,B,U){this.zone.hideFollow(B),B.walkEnabled=!1,B.user.clickEnabled=!1,B.menuBar.active=!1,j.q.instance.prodigy.notifications.clearNotifications(),super.setup(k,B,U)}start(k,B,U){super.start(k,B,U),this.hasStarted=!0}playCutscene(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;this.cutsceneHUDControllerPromise=V.d.loadWithInjectedValuesAndDependenciesFromGUID(j.q.instance.prodigy.gameContainer.get("d0e-64fd"),W.l.CutsceneHUDController,{}),this.cutsceneHUDController=yield this.cutsceneHUDControllerPromise;const B=null===(k=this.cutsceneHUDController)||void 0===k?void 0:k.findChildByName("Disable HUD / Notifs / Input / AreaEvents"),U=null==B?void 0:B.findComponent(q.S);null==U||U.run()}))}endCutscene(){var k,B;null===(k=this.cutsceneHUDControllerPromise)||void 0===k||k.cancel(),null===(B=this.cutsceneHUDController)||void 0===B||B.destroy()}end(k,B){}enterScene(k,B,U){var F;const j=k.state.getCurrentState();null===(F=j.hideParentalConsentBanner)||void 0===F||F.call(j);const V=k.width,W=k.height;this.sceneTop=B.menus.addChild(new $.C(k,0,-50,V,50,H._.Tiled_sprites_json,"overlay-small")),this.sceneBot=B.menus.addChild(new $.C(k,0,W,V,50,H._.Tiled_sprites_json,"overlay-small"));const q=k.add.tween(this.sceneTop,this).to({y:0},1e3,G.GS3.Quadratic.Out).start();G.Aq$.isDefined(U)&&q.onTweenComplete.add(U),k.add.tween(this.sceneBot,this).to({y:W-50},1e3,G.GS3.Quadratic.Out).start(),B.user.unmount()}cleanup(){this.sceneTop&&(this.sceneTop.destroy(),this.sceneTop=null),this.sceneBot&&(this.sceneBot.destroy(),this.sceneBot=null),super.cleanup()}}},1041:(k,B,U)=>{"use strict";U.d(B,{Z:()=>tt});var F=U(8674),G=U(62459),j=U(95891),$=U(88022),H=U(99625),V=U(35120),W=U(34829),q=U(77078),K=U(28402),z=U(85515),Y=U(92150);class Q extends Y._{constructor(k,B,U,F,G){super(k,B,U,F,`${G}`)}}var X=U(57750);class Z extends X.k{constructor(k,B,U,F,G=0,j=null,$,H,V,W){super(k,B,U,F,`${G}`,j,$,H,V,W)}}var J=U(19690);class tt extends G.s3P{constructor(){super(...arguments),this.animatedSprites=[],this.dynamicSprites=[],this.disabledLayers=[""],this.disabledLayerIDs=[],this.dynamicLayerContainers={},this.contentLayerContainers={},this.tempCollisionData=null,this.onLoad=null,this.assets=new Set,this.skipPrefabInitialization=!1}init(k,B,U,F,j,H){var W,q;this.cleanupMap(),this.game=k,this.onLoad=H,this.screen=F,this.above=U,this.below=B,this.dynamicSprites=[],this.dynamicLayerContainers={},G.Aq$.isDefined(j)&&(this.file=j.mapName),null!==(W=this.assets)&&void 0!==W||(this.assets=new Set),G.Mnj.addEntry(this.assets,$._.Tileset_core_json);for(let $=0;$0?(B.x+=U.width/2,B.y+=U.height):(B.scale.x=-1,B.y+=U.height/2):"objectgroup"===k.type&&(B.y+=U.height/2,B.scale.x=F.scale.x,B.scale.y=F.scale.y),B.add(U)}}this.contentLayerContainers[B].content.destroy()}else J&&this.initLayer(tt?this.above:this.below,k,K.tilesets,Y,tt?null:Q)}}return G.Aq$.isDefined(this.onLoad)&&this.onLoad(),G.Aq$.toggleDisplayObjSmooth(this.screen.background,!1),Q}getTiledObjectTypeProperty(k,B){var U;return(null===(U=k.tiledversion)||void 0===U?void 0:U.startsWith("1.9"))?B.class:B.type}enableLayerID(k,B){const U=this.disabledLayerIDs.indexOf(k);B?-1!==U&&this.disabledLayerIDs.splice(U,1):-1===U&&(this.disabledLayerIDs.push(k),this.disabledLayerIDs.sort(((k,B)=>k-B)))}initLayer(k,B,U,F,j){return G.Aq$.isDefined(B)?G.Aq$.isDefined(B.objects)?this.initObjectLayer(k,B,U,F,j):this.initTiledLayer(k,B,U,F,j):null}initObjectLayer(k,B,U,F,j){const $=G.Aq$.isDefined(B.properties)&&B.properties.useAnimDuration;for(let H=0;H0?(W.anchor.set(0,1),W.angle=V.rotation,W.x=V.x,W.y=parseInt(V.y)+40):(W.anchor.set(.5,.5),W.x=parseInt(V.x)+(W.width>>1),W.y=parseInt(V.y)-(W.height>>1)),this.addSpriteToLayer(W,k,B))}return k}initTiledLayer(k,B,U,F,j){const $=G.Aq$.isDefined(B.properties)&&B.properties.useAnimDuration;for(let H=0;H<32;H++)for(let V=0;V<18;V++){const W=32*V+H,q=this.getTile(B.data[W],40*H,40*V,F,j,U,null,$);if(G.Aq$.isDefined(q)){const U=B.opacity;G.Aq$.isDefined(U)&&(q.alpha=U),this.addSpriteToLayer(q,k,B)}}return k}initImage(k,B){const U=k.properties,F=B?`singleImage-${U.id}`:`atlas-${U.id}`,j=B?void 0:k.name;V.q.instance.prodigy.create.sprite(k.x+k.width/2,k.y-k.height/2,F,j,new G.I9Y(.5,.5),((k,B)=>{this.screen[U.layer].addChild(k)}))}initSpineObject(k){const B=new G._mx;B.name=k.name;const U=k.properties;if(B.addComponent(G.dLy),B.transform.setPosition(k.x+k.width/2,k.y-k.height/2),j.get(U,"flip",!1)){const k=B.transform.localScale;k.x*=-1,B.transform.setScale(k.x,k.y)}const F=new G._mx(B);F.addComponent(G.dLy);const $=F.addComponent(K.v);$.setAsset(`spine-${U.id}`,(()=>{const k=G.Aq$.isDefined(U.offsetX)?U.offsetX:0,B=G.Aq$.isDefined(U.offsetY)?U.offsetY:0;F.transform.setPosition(k,B),$.getSpine().setAnimationByName(0,U.animation,U.loop)}));const H=new G._mx(B);H.addComponent(G.dLy);const V=H.addComponent(q.p);V.InputEnabled=!1,V.Width=k.width,V.Height=k.height,this.addObjectToScreen(B,k.properties.layer)}loadPrefab(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=(0,J.Ks)();return G.Aq$.isDefined(k.properties.assetKey)?B.loadWithDependenciesFromGUID(H.l[k.properties.assetKey]):B.loadWithDependencies(k.properties.id)}))}initPrefab(k){this.loadPrefab(k).then((B=>{B.name=k.name,B.transform.setPosition(k.x,k.y),k.properties.layer===z.E.ContentLayer?this.legacyAddObjectToScreen(B,k.properties.layer):this.addObjectToScreen(B,k.properties.layer)})).catch((B=>{G.VyI.log(`Error loading prefab ${k.properties.id} from TMX Map: ${B}`,G.$bb.Error)}))}addObjectToScreen(k,B){this.screen?this.screen[`${B}GameObject`]?this.screen[`${B}GameObject`].addChild(k):G.VyI.log(`TiledMap no ${B} game object to parent object to`,G.$bb.Error):G.VyI.log("TiledMap no screen to parent object to",G.$bb.Error)}legacyAddObjectToScreen(k,B){if(this.screen)if(this.screen[B]){const U=k.findComponent(G.y4o).getRootContainer();this.screen[B].addChild(U),U.x=k.transform.worldPosition.x,U.y=k.transform.worldPosition.y;const F=this.game.time.events.loop(W.s.TARGET_FPS_40_MS,(()=>k.update()),this);k.onDestroy.addOnce((()=>this.game.time.events.remove(F)))}else G.VyI.log(`TiledMap no ${B} game object to parent object to`,G.$bb.Error);else G.VyI.log("TiledMap no screen to parent object to",G.$bb.Error)}getTile(k,B,U,F,j,$,H,V=!1){const W=G.Aq$.isDefined($)?$:this.game.cache.getJSON(this.file).tilesets;let q=k;const K=0!=(q&G.DXe.flippedHorizontally),z=0!=(q&G.DXe.flippedVertically),Y=0!=(q&G.DXe.flippedDiagonally);q&=~G.DXe.all;const X=this.getTileset(W,q);if(!G.Aq$.isDefined(X)||!G.Aq$.isDefined(q))return null;q-=X.firstgid;const J=this.getTileProperties(X,q,F);let tt,et,it;if(G.Aq$.isDefined(J)&&(tt=J.x),et=G.Aq$.isDefined(X.tiles)&&G.Aq$.isDefined(X.tiles[q])?new Z(this.game,B,U,X.name,q):new Q(this.game,B,U,X.name,q),(Y||z||K)&&(et.anchor.set(.5,.5),et.x+=20,et.y+=20),Y?(et.angle=-90,G.Aq$.isDefined(J)&&(it=J.x[1],it+=J.x[3],it+=J.x[0],it+=J.x[2],J.x=it),et.scale.x=-1,G.Aq$.isDefined(J)&&(it=J.x[1],it+=J.x[0],it+=J.x[3],it+=J.x[2],J.x=it),K&&(et.scale.y=-et.scale.y,G.Aq$.isDefined(J)&&(it=J.x[2],it+=J.x[3],it+=J.x[0],it+=J.x[1],J.x=it)),z&&(et.scale.x=-et.scale.x,G.Aq$.isDefined(J)&&(it=J.x[1],it+=J.x[0],it+=J.x[3],it+=J.x[2],J.x=it))):(K&&(et.scale.x=-et.scale.x,G.Aq$.isDefined(J)&&(it=J.x[1],it+=J.x[0],it+=J.x[3],it+=J.x[2],J.x=it)),z&&(et.scale.y=-et.scale.y,G.Aq$.isDefined(J)&&(it=J.x[2],it+=J.x[3],it+=J.x[0],it+=J.x[1],J.x=it))),G.Aq$.isDefined(j)&&G.Aq$.isDefined(J)&&G.Aq$.isDefined(J.x)){const k=J.x,F=Math.floor(B/40),$=Math.floor(U/40);1===parseInt(k[0],10)&&(j[2*$][2*F]=0,G.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*F,y:2*$,value:0}),et.visible=!1,et.collisionTile=!0)),1===parseInt(k[1],10)&&(j[2*$][2*F+1]=0,G.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*F+1,y:2*$,value:0}),et.visible=!1,et.collisionTile=!0)),1===parseInt(k[2],10)&&(j[2*$+1][2*F]=0,G.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*F,y:2*$+1,value:0}),et.visible=!1,et.collisionTile=!0)),1===parseInt(k[3],10)&&(j[2*$+1][2*F+1]=0,G.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*F+1,y:2*$+1,value:0}),et.visible=!1,et.collisionTile=!0)),6===parseInt(k[0],10)&&(j[2*$][2*F]=6,G.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*F,y:2*$,value:6}),et.visible=!1,et.collisionTile=!0)),6===parseInt(k[1],10)&&(j[2*$][2*F+1]=6,G.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*F+1,y:2*$,value:6}),et.visible=!1,et.collisionTile=!0)),6===parseInt(k[2],10)&&(j[2*$+1][2*F]=6,G.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*F,y:2*$+1,value:6}),et.visible=!1,et.collisionTile=!0)),6===parseInt(k[3],10)&&(j[2*$+1][2*F+1]=6,G.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*F+1,y:2*$+1,value:6}),et.visible=!1,et.collisionTile=!0))}if(G.Aq$.isDefined(J)&&G.Aq$.isDefined(tt)&&(J.x=tt),G.Aq$.isDefined(j)&&H)for(let G=0;G<2;G++)for(let k=0;k<2;k++)j[U/40*2+G][B/40*2+k]=1;return this.processTileAnimations(et,X,q,V),et}addSpriteToLayer(k,B,U){var F,j,$,H;G.Aq$.isDefined(U.properties)&&G.Aq$.isDefined(U.properties.dynamicToggle)?(this.dynamicSprites.push(k),k.isAbove=null!==(j=null===(F=U.properties)||void 0===F?void 0:F.isAbove)&&void 0!==j&&j,k.dynamicToggle=U.properties.dynamicToggle):k.isAnimatedSprite?(this.animatedSprites.push(k),k.isAbove=null!==(H=null===($=U.properties)||void 0===$?void 0:$.isAbove)&&void 0!==H&&H):B.addChild(k)}processAnimations(k,B){for(let U=0;U=F.firstgid&&B{"use strict";U.d(B,{W:()=>F});const F="house-exterior"},87820:(k,B,U)=>{"use strict";U.d(B,{b:()=>vt});var F=U(62459),G=U(95891),j=U(99625),$=U(97495),H=U(40295),V=U(90633),W=U(81137),q=U(35120),K=U(49237),z=U(76974),Y=U(34829),Q=U(93867),X=U(75781),Z=U(84399),J=U(46725),tt=U(44677),et=U(80434),it=U(52191),st=U(73797),nt=U(23082),at=U(15485),rt=U(65050),ot=U(41674),ht=U(87337),ct=U(70703),dt=U(48842),lt=U(45385),ut=U(17425),ft=U(92864),bt=U(30226),pt=U(73678);class vt{get Guardian(){return this.guardian}get timeWhenZoneLoaded(){return this._timeWhenZoneLoaded}get allQuestsAreComplete(){return this.getCurrentQuestID()>0&&!this.quests[this.getCurrentQuestID()]}get isKeystonePlaced(){return 1===q.q.instance.prodigy.world.getZone(pt.A_.ACADEMY).getKeystoneState(this.ID)}get finalQuestId(){var k,B,U;return null===(U=null===(B=null===(k=Object.values(this.quests))||void 0===k?void 0:k.slice(-1))||void 0===B?void 0:B.pop())||void 0===U?void 0:U.ID}isTeleportingIntoNewPlayerFTUEZone(k,B){return!B.hasCompletedTutorial()&&this._newPlayerFTUEZones.includes(k)}constructor(k){this.states=[],this.maps={},this.quests={},this.scenes={},this.monsters={},this.bgmID=3,this.debugBounties=!1,this.battleBG="",this.difficultyMode=$.i.Regular,this.difficultyModeAgnostic=!1,this.mapEnteredFestivalContext=!1,this.questManagerIdentifier="a78-11c7",this._petsInZoneButtonObject=null,this._hidePetsInZoneButtonOnCreate=!1,this._newPlayerFTUEZones=["house-exterior","academy-GH1","academy-GH2"],this.game=k}getMap(k){return this.maps[k]}getScene(k){return this.scenes[k]}getDailyQuestDescription(k){return{}}teleport(k,B,U,G,j){var $,H,V,W;const K=this.getMap(k);if(!F.Aq$.isDefined(K))return;this._teleportData={mapKey:k,map:K,x:B,y:U,data:G,ld:j};const z=`${this.ID}-${this._teleportData.mapKey}`,Q=q.q.instance.prodigy.gameContainer,X=Q.get("c47-20b6"),tt=Q.get("e20-0fb0").player,[et,it]=q.q.instance.prodigy.world.getCurrentMap().split("-");tt.data.previousZone=tt.data.zone,j.callback||z!==`${pt.A_.ACADEMY}-GH2`&&z!==`${pt.A_.ACADEMY}-${Y.s.TOWER_COMMON_ROOM_SHORTFORM}1`&&!z.includes(`tower-${Y.s.TOWER_COMMON_ROOM_SHORTFORM}`)||X.featureCommon.sendScreenTransitionEvent({screenID:z,previousScreenID:tt.data.previousZone,transitionType:this.ID!==et?"spawned":"walk",duration:F.Aq$.isDefined(j.timeWhenPreviousZoneLoaded)?((new Date).getTime()-j.timeWhenPreviousZoneLoaded)/Y.s.SECONDS_TO_MILLISECONDS_MULTIPLIER:null}),tt.setZone(this.ID,z),tt.forceSaveCharacter(),q.q.instance.prodigy.world.setCurrentMap(z),this.game.state.states.get(nt.G.TileScreen).initMap(this._teleportData.map,this,this._teleportData.x,this._teleportData.y),this.createLoadingData();const st=J.D.getAvailablePrefabMap(z)||Z.R.isFeatureEnabled()&&(null===(H=null===($=Z.R.getVariables())||void 0===$?void 0:$.maps)||void 0===H?void 0:H[z]);if(st&&!this.isTeleportingIntoNewPlayerFTUEZone(z,tt)){const G={BGM_ID:null!==(V=q.q.instance.prodigy.skin.getSkinOverrideBgm(z))&&void 0!==V?V:this.bgmID,ZONE_MAP_TAG:z,Zone:this,ZoneId:this.ID,MapTag:k,"a78-11c7":Q.get(this.questManagerIdentifier)};F.Aq$.isDefined(B)&&F.Aq$.isDefined(U)&&(G.ACTIVE_PLAYER_POSITION={x:B,y:U}),this.loadingData.targetInitArgs=[{prefabIDs:[st],injectedValues:G}],q.q.instance.prodigy.start(nt.G.PrefabScene,this.loadingData,this._teleportData.data),this.updatePrefabMapFaintData(K.zoneName,B,U)}else q.q.instance.prodigy.start(nt.G.TileScreen,this.loadingData,this._teleportData.data);F.Aq$.isDefined(it)&&it!==k&&(X.gameWorld.sendMapEnteredEvent(it,et,null!==(W=null==j?void 0:j.mapEnteredTransitionType)&&void 0!==W?W:vt._screenTransactionType,null,this.mapEnteredFestivalContext),vt._screenTransactionType=ht.iQ.Walk)}updatePrefabMapFaintData(k,B,U){const G=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k&&G&&(G.onFaintData={mapKey:k,coordinates:F.Aq$.isDefined(B)&&F.Aq$.isDefined(U)?{x:B,y:U}:null})}isTutorialZone(){return this.ID===pt.A_.ACADEMY||this.ID===pt.A_.HOUSE}createLoadingData(){var k,B;this.loadingData=this._teleportData.ld||{},this.loadingData.assets=this.loadingData.assets||[],this.loadingData.assets=this.loadingData.assets.concat(["map-pathing"]).concat(Array.from(this._teleportData.map.assets)),this.loadingData.assets=this.loadingData.assets.concat(q.q.instance.prodigy.skin.getAssets(this._teleportData.map.zoneName));const U=this.getCurrentQuest();F.Aq$.isDefined(U)&&(this.loadingData.assets=this.loadingData.assets.concat(U.assets)),this.loadingData.assets=[...new Set(this.loadingData.assets)],this.cacheZoneAssets(this.loadingData.assets),this.loadingData.title=F.Aq$.isDefined(this.loadingData.title)?this.loadingData.title:null===(B=(k=this._teleportData.map).getName)||void 0===B?void 0:B.call(k),this.loadingData.x=this._teleportData.x,this.loadingData.y=this._teleportData.y}teleportLoad(){const k=this.game.state.getCurrentState(),B=this.game.state.get(nt.G.Loading);k.fadeOut?k.fadeOut(!0,(()=>{B.startLoading(this.loadingData)})):B.startLoading(this.loadingData)}teleportPrefabScene(k,B,U,G){var $,H,V;const W=q.q.instance.prodigy,K=W.gameContainer.get("e20-0fb0").player,z=`${this.ID}-${k}`,[Y,Q]=W.world.getCurrentMap().split("-");W.world.setCurrentMap(z),K.setZone(this.ID,z);const X=q.q.instance.game.state.states.get(nt.G.Loading);X&&(X.data.target=nt.G.PrefabScene);const Z=[this.maps[k]];if(tt.p.isQuestComplete||Z.push(j.l.FtuePlayerGoalsHudIcon),W.startPrefabScene(Z,{layers:[],spawnPosition:F.Aq$.isDefined(B)&&F.Aq$.isDefined(U)?new F.I9Y(B,U):null,spawnFacingDirection:null!==($=null==G?void 0:G.playerDirection)&&void 0!==$?$:1,playFSM:null!==(H=null==G?void 0:G.runFSMOnLoad)&&void 0!==H?H:null,spawnLocationName:null!==(V=null==G?void 0:G.spawnLocationName)&&void 0!==V?V:null}),F.Aq$.isDefined(Q)&&Q!==k){const k=ht.iQ.Walk;q.q.instance.prodigy.gameContainer.get("c47-20b6").gameWorld.sendMapEnteredEvent(Q,Y,this.ID===Y?k:ht.iQ.FastTravel)}}playScene(k){const B=this.getScene(k);F.Aq$.isDefined(B)?this.initScene(B):F.VyI.log(`Scene: ${k} was not found in Zone: ${this.ID}`,F.$bb.Warning)}initScene(k,B={}){var U;this.game.state.get(nt.G.TileScreen).initScene(k,this);let F=k.loadingData;F.assets=[],F.assets=F.assets.concat(["map-pathing"]).concat(Array.from(k.assets)),F.title=k.name,F=G.merge(F,B),this.cacheZoneAssets(F.assets),null===(U=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer)||void 0===U||U.unmount(),q.q.instance.prodigy.start(nt.G.TileScreen,F)}init(k,B,U){}handleLeaving(k,B){var U,F;null===(U=this._playerGoalsButtonLoadPromise)||void 0===U||U.cancel(),null===(F=this._playerGoalsButton)||void 0===F||F.destroy(),vt._screenTransactionType=ht.iQ.FastTravel,B()}setup(k,B,U){const G=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.isTutorialZone()||G.hasCompletedTutorial()||new it.G("",0).markTutorialComplete(),this.game.broadcaster.broadcast(st.sd.GetFriendList,st.HG.FriendsList),U.questParams={};const j=this.getValidatedCurrentQuest();return F.Aq$.isDefined(j)&&!U.isScene?j.setup(k,B,U):null}start(k,B,U){const G=this.getCurrentQuest();F.Aq$.isDefined(G)&&G.start(k,B,U),this._timeWhenZoneLoaded=(new Date).getTime()}update(k,B,U){const G=this.getCurrentQuest();F.Aq$.isDefined(G)&&G.update(k,B,U)}cleanup(){var k,B,U;null===(k=this._playerGoalsButtonLoadPromise)||void 0===k||k.cancel(),q.q.instance.prodigy.load.removeAssets(),this.game.time.events.removeAll(),null===(B=this._petsInZoneButtonObject)||void 0===B||B.destroy(),this._petsInZoneButtonObject=null,null===(U=this._playerGoalsButton)||void 0===U||U.destroy(),this._playerGoalsButton=null,this.loadingData=null}process(k,B,U){F.Aq$.isDefined(this.monsters)&&(F.Aq$.isDefined(this.getState("daily"))?bt.J.getDate()!==this.getState("daily").date&&this.setState("daily",{date:bt.J.getDate(),flags:[1,1,1,1,1],rewards:this.getState("daily").rewards}):this.setState("daily",{date:bt.J.getDate(),flags:[1,1,1,1,1],rewards:0}));const G=this.getCurrentQuest();F.Aq$.isDefined(G)&&G.process(k,B,U)}meetsQuestPrerequisite(){return!0}getQuest(k){return q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.isZoneQuestEnabled?this.quests[k]:void 0}getCurrentQuest(){const k=this.getQuestState();return F.Aq$.isDefined(k)?this.getQuest(k.ID):null}getValidatedCurrentQuest(){const k=this.getCurrentQuest(),B=this.getQuestState();return this.validateQuestProgress(B,k),k}getState(k){let B=-1;const U=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return B="string"!=typeof k||!k.startsWith("quest")&&!k.startsWith("uniqueEncounters")?this.states.findIndex((B=>B===k)):k,-1===B?null:U.state.get(`zone-${this.ID}-${B}`)}setState(k,B){let U=-1;if("string"==typeof k&&k.startsWith("quest"))U=k;else for(let F=0;F!F.Aq$.isDefined(B.state[k])||1!==B.state[k])).length>0&&k.push(`${this.ID}-${G}`)}return k}return U.area}}startQuest(k,B=!1){let U=this.getQuestState();if(F.Aq$.isDefined(U)&&!B||(U={ID:B?k:1}),U.ID!==k)return null;const G=this.getQuest(U.ID);if(!G)return null;U.req=bt.J.copyObject(G.req),U.state=bt.J.copyObject(G.state)||{},U.seq=0;return q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.set(`zone-${this.ID}-quest`,U),G}isQuestStarted(k){const B=this.getQuestState();return!(!F.Aq$.isDefined(B)||!F.Aq$.isDefined(B.req)||B.ID!==k)}isQuestComplete(k){if(!this.isQuestStarted(k))return!1;const B=this.getQuestState(),U=this.getQuest(k),F=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return this.getQuestState().ID===k&&(!("pet"===B.req.type&&B.req.N>0)&&(!("clear"===B.req.type&&B.req.N>0)&&(!(bt.J.inArray(["item","weapon","hat","outfit","boots","key"],B.req.type)&&F.backpack.hasItem(B.req.type,B.req.ID)"key"===k.type&&k.ID===vt.ZONE_KEYSTONES[this.ID]))),K=null!==(U=null==V?void 0:V.questStep)&&void 0!==U?U:null==V?void 0:V.descKey;if(!W&&bt.J.isCoreZone(this.ID)?$.state.set(`zone-${this.ID}-quest`,{ID:G.ID+1,monsterState:G.monsterState}):$.state.set(`zone-${this.ID}-quest`,{ID:G.ID+1}),K&&""!==K&&j.get("c47-20b6").playerProgression.sendQuestProgressionAdvancedEvent({quest_id:`${k}`,quest_type:"zone_mission",quest_step:W?"Quest Complete":1===k?"Quest Start":K,zone_complete:W}),W){const k=q.q.instance.game.broadcaster;k.addAppListener(st.n8.GotItemClosed,(()=>{k.removeAppListener(st.n8.GotItemClosed,this),Q.U.progressData.step===H.B.NotStarted&&$.hasFoundAllKeystones()&&X.E.runCollectedLastKeystoneSequence()}),this)}return!0}isQuestProcessed(k){return this.isQuestStarted(k)&&this.isQuestComplete(k)&&this.getQuestState().proc}processQuest(k){if(this.isQuestStarted(k)&&this.isQuestComplete(k)){q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.set(`zone-${this.ID}-quest-proc`,1)}}isOnQuest(k){const B=this.getQuestState();return F.Aq$.isDefined(B)&&B.ID===k}getCurrentQuestID(){const k=this.getQuestState();return F.Aq$.isDefined(null==k?void 0:k.ID)?k.ID:0}validateQuestProgress(k,B){var U;const F=(null==B?void 0:B.req)&&!(null==k?void 0:k.req)&&!this.allQuestsAreComplete,G=(null==B?void 0:B.req)&&(null==k?void 0:k.req)&&(k.req.ID!==B.req.ID||k.req.type!==B.req.type);(F||G)&&B.zone.startQuest(B.ID),(null==B?void 0:B.req)&&(null==k?void 0:k.req)&&"pet"===B.req.type&&Object.keys(null!==(U=null==k?void 0:k.state)&&void 0!==U?U:{}).length>=B.req.N&&k.req.N>0&&(k.state={},q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.set(`zone-${B.zone.ID}-quest`,k))}defeatMonster(k,B,U,G,j=!1){const $=this.getQuestState(),H=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player;U&&(j?$.state[B]=1:H.state.set(`zone-${this.ID}-uniqueEncounters-${q.q.instance.prodigy.world.getCurrentMapTag()}-${B}`,1),H.state.updated=!0),F.Aq$.isDefined($)&&F.Aq$.isDefined($.req)&&("pet"===$.req.type&&$.req.ID===k&&j||"clear"===$.req.type&&j?($.req.N--,H.state.updated=!0):bt.J.isCoreZone(this.ID)&&!U&&H.state.set(`zone-${this.ID}-quest-monsterState-${q.q.instance.prodigy.world.getCurrentMapTag()}-${B}`,1))}isUniqueEncounterDefeated(k){return 1===q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.get(`zone-${this.ID}-uniqueEncounters-${q.q.instance.prodigy.world.getCurrentMapTag()}-${k+1}`)}isNamedUniqueEncounterDefeated(k,B=q.q.instance.prodigy.world.getCurrentMapTag()){return q.q.instance.prodigy.gameContainer.get("306-5359").state.get(`zone-${this.ID}-uniqueEncounters-${B}-${k}`)}isOnSequence(k,B){const U=this.getQuestState();return!(!F.Aq$.isDefined(U)||U.ID!==k||!F.Aq$.isDefined(U.req)||U.seq!==B)}isSequenceComplete(k,B){const U=this.getQuestState();return F.Aq$.isDefined(U)&&U.ID===k&&U.seq>B}completeSequence(k,B){const U=this.getQuestState();if(F.Aq$.isDefined(U)&&U.ID===k&&F.Aq$.isDefined(U.req)&&U.seq===B){U.seq++;q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.updated=!0}}getDailyMaps(){const k=[];for(const B in this.maps)k.push(B);return k}hasDaily(k){if(F.Aq$.isDefined(this.getState("daily"))){const B=new ft.t(this.getState("daily").date),U=this.getDailyMaps();if(F.Aq$.isDefined(U))for(let F=0;F<5;F++)if(U[Math.floor(B.jumpFromStart(F)*(U.length-1))]===k.tag&&0!==this.getState("daily").flags[F])return!0}return!1}testQuest(k,B,U){q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.data.zone[this.ID]={};for(let F=1;F{const B=this.game.state.getCurrentState();B.uiLayerGameObject?B.uiLayerGameObject.addChild(k):k.setLayer("ui"),this.setUpPetsInZoneButton(k)})).catch(F.RQr.createHandler("Unable to load the Pets In Zones Button")))}setUpPetsInZoneButton(k){this._petsInZoneButtonObject=k;const B=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=this.ID,G=k.findComponentInChildren(K.$),$=k.findComponentInChildren(lt.e),H=B.newPetRescueData.getNumberOfNewRescues(U);if($.updateNumberedNotificationBadge(H>0,H),!q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_PETS_IN_ZONES,V.B.BREADCRUMB_PETS_IN_ZONES_BUTTON_FTUE)){q.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(V.B.FEATURE_PETS_IN_ZONES,V.B.BREADCRUMB_PETS_IN_ZONES_BUTTON_FTUE);k.findComponentsInChildren(ct.x).forEach((k=>{k.GameObject.active=!0,k.startTween()}))}const W=q.q.instance.prodigy.gameContainer.get("fa6-b1fc");G.onEnabledClick.add((()=>{Promise.all([W.getPetsInZone(U),W.getMinMaxEnemyLevelsForZone(U)]).then((([k,F])=>{this.sendPetsInZonesButtonEvent(U),this.sendPetsInZonesInterfaceEvent(U);const H=q.q.instance.prodigy.open.prefabMenu(j.l.Pets_ZoneUI,(()=>G.unlockState()),void 0,void 0,void 0,{PET_ZONE_ID:this.zoneIndex,PET_ZONE_MENU_STATE:dt.SB.InZone,GRID_VIEW_DATA:k.map((k=>k.ID)),PET_ZONE_ENEMY_MIN_MAX_LEVEL:F});H.onPrefabLoaded.add((()=>{B.newPetRescueData.clearNewestRescuesByAmount(dt.J8.PET_CARDS_PER_PAGE,U),B.forceSaveCharacter()})),H.onDestroy.add((()=>{this.sendPetsInZonesInterfaceEvent.bind(this,U,!0),B.newPetRescueData.clearNewRescues(),B.forceSaveCharacter(),$.updateNumberedNotificationBadge(!1,0)}))})).catch(F.RQr.createHandler("Could not fetch pets for current zone")),G.lockState(z.K.Disabled)})),this._hidePetsInZoneButtonOnCreate&&(this._petsInZoneButtonObject.active=!1,this._hidePetsInZoneButtonOnCreate=!1)}togglePetsInZoneButtonVisibility(k){this._petsInZoneButtonObject?this._petsInZoneButtonObject.active=k:this._hidePetsInZoneButtonOnCreate=!k}destroyPetsInZoneButton(){var k;null===(k=this._petsInZoneButtonObject)||void 0===k||k.destroy(),this._petsInZoneButtonObject=null}showTopLeftNavigationButton(){W.x.isFeatureEnabled()||this.spawnPetsInZoneButton()}createTopLeftNavigationButton(){}sendPetsInZonesButtonEvent(k){const B=`pet_menu_${k}`;q.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:B,interfaceName:B,interfaceType:ot.Wm.Modal,saveClickInfo:B})}sendPetsInZonesInterfaceEvent(k,B){const U=`zone_pet_menu_${k}`,F=ot.Wm.Modal,G=ot.Lv.ButtonClick,j=`pet_menu_${k}`;q.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:U,interfaceType:F,instanceType:rt.N.Interface,originType:ot.$N.ButtonClick,originID:B?at.k.X:j,closeMethod:B?G:void 0})}getOnFaintData(){const k=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.onFaintData;return null!=k?k:{mapKey:this.defaultOnFaint}}}vt.ZONE_KEYSTONES={[pt.A_.FOREST]:3,[pt.A_.SHIVERCHILL]:4,[pt.A_.BONFIRE]:11,[pt.A_.SHIPWRECK]:17,[pt.A_.SKYWATCH]:10,[pt.A_.FORESTHARD]:3,[pt.A_.SHIVERCHILLHARD]:4,[pt.A_.BONFIREHARD]:11,[pt.A_.SHIPWRECKHARD]:17,[pt.A_.SKYWATCHHARD]:10,[pt.A_.FORESTEXPERT]:3,[pt.A_.SHIVERCHILLEXPERT]:4,[pt.A_.BONFIREEXPERT]:11,[pt.A_.SHIPWRECKEXPERT]:17,[pt.A_.SKYWATCHEXPERT]:10},vt.ZONE_TOWERS={[pt.A_.FOREST]:1,[pt.A_.SHIVERCHILL]:3,[pt.A_.BONFIRE]:5,[pt.A_.SHIPWRECK]:6,[pt.A_.SKYWATCH]:4},vt._screenTransactionType=ht.iQ.Walk},38454:(k,B,U)=>{"use strict";U.d(B,{V:()=>V});var F=U(8674),G=U(62459),j=U(28152),$=U(26932),H=U(26004);let V=class extends $.z{constructor(){super(...arguments),this._counter=0,this.onComplete=new G.HN0}postCreate(){super.postCreate(),this.bindContext()}advance(){this._counterk.consume()))}unbindContext(){this._context.Container.unbind("ZONE_ENTRY_ILLUSTRATION_DIALOGUE_IDS"),this._context.Container.unbind("ZONE_ENTRY_ILLUSTRATION_CURRENT_DIALOGUE_INDEX"),this._context.Container.unbind("ZONE_ENTRY_ILLUSTRATION_CURRENT_DIALOGUE_ID"),this.gameObject.findComponentsInChildren(H.B).forEach((k=>k.consume()))}destroy(){this.onComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_illustrationCount",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.g11)(),(0,F.Sn)("design:type",Array)],V.prototype,"_dialogueIds",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onComplete",void 0),V=(0,F.Cg)([(0,G.EVk)("ZoneEntryIllustrationDataProvider",j.Y.map)],V)},15804:(k,B,U)=>{"use strict";U.d(B,{h:()=>Y});var F=U(8674),G=U(62459),j=U(99625),$=U(35120),H=U(96494),V=U(90633),W=U(13956),q=U(13021),K=U(80060),z=U(73678);class Y extends G.s3P{static shouldShowEntryIllustration(k){var B;const U=k.split("-")[0],F=$.q.instance.prodigy.world.getZone(U);return Y.ZONE_WHITELIST.includes(U)&&(null==F?void 0:F.meetsQuestPrerequisite())&&(null==F?void 0:F.getCurrentQuestID())<=1&&!q.w.isTitanMap(k)&&!this._breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_ZONE_ENTRY_ILLUSTRATION,null!==(B=Y.getZoneBreadcrumbName(U))&&void 0!==B?B:"")}static openZoneEntryIllustrationPrefabForZone(k){let B;switch(k){case z.A_.FOREST:case z.A_.FORESTHARD:case z.A_.FORESTEXPERT:B=j.l.ZoneEntryIllustrationFirefly;break;case z.A_.SHIVERCHILL:case z.A_.SHIVERCHILLHARD:case z.A_.SHIVERCHILLEXPERT:B=j.l.ZoneEntryIllustrationShiverchill;break;case z.A_.SHIPWRECK:case z.A_.SHIPWRECKHARD:case z.A_.SHIPWRECKEXPERT:B=j.l.ZoneEntryIllustrationShipwreck;break;case z.A_.BONFIRE:case z.A_.BONFIREHARD:case z.A_.BONFIREEXPERT:B=j.l.ZoneEntryIllustrationBonfire;break;case z.A_.SKYWATCH:case z.A_.SKYWATCHHARD:case z.A_.SKYWATCHEXPERT:B=j.l.ZoneEntryIllustrationSkywatch;break;default:return G.RQr.createHandler(`No zone entry prefab for zone id ${k}`),new G.kBN(((B,U)=>U(`No zone entry prefab for zone id ${k}`)))}return K.d.loadWithInjectedValuesAndDependenciesFromGUID($.q.instance.prodigy.gameContainer.get("d0e-64fd"),B,{ZONE_ID:this.getZoneBreadcrumbName(k)})}static getZoneBreadcrumbName(k){switch(k){case z.A_.LAMPLIGHT:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_LAMPLIGHT;case z.A_.FOREST:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FOREST;case z.A_.SHIVERCHILL:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILL;case z.A_.SKYWATCH:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCH;case z.A_.BONFIRE:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIRE;case z.A_.SHIPWRECK:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECK;case z.A_.FORESTHARD:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FORESTHARD;case z.A_.SHIVERCHILLHARD:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILLHARD;case z.A_.SKYWATCHHARD:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCHHARD;case z.A_.BONFIREHARD:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIREHARD;case z.A_.SHIPWRECKHARD:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECKHARD;case z.A_.FORESTEXPERT:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FORESTEXPERT;case z.A_.SHIVERCHILLEXPERT:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILLEXPERT;case z.A_.SKYWATCHEXPERT:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCHEXPERT;case z.A_.BONFIREEXPERT:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIREEXPERT;case z.A_.SHIPWRECKEXPERT:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECKEXPERT;default:return null}}}Y.ZONE_WHITELIST=[z.A_.FOREST,z.A_.SHIVERCHILL,z.A_.BONFIRE,z.A_.SHIPWRECK,z.A_.SKYWATCH,z.A_.FORESTHARD,z.A_.SHIVERCHILLHARD,z.A_.BONFIREHARD,z.A_.SHIPWRECKHARD,z.A_.SKYWATCHHARD,z.A_.FORESTEXPERT,z.A_.SHIVERCHILLEXPERT,z.A_.BONFIREEXPERT,z.A_.SHIPWRECKEXPERT,z.A_.SKYWATCHEXPERT],(0,F.Cg)([(0,W.b)("12f-4e29"),(0,F.Sn)("design:type",H.F)],Y,"_breadcrumbManager",void 0)},93054:(k,B,U)=>{"use strict";U.d(B,{P:()=>Y});var F,G,j=U(62459),$=U(95891);!function(k){k.Equal="=",k.NotEqual="!="}(F||(F={})),function(k){k.GreaterThanOrEqualTo=">=",k.LessThanOrEqualTo="<=",k.GreaterThan=">",k.LessThan="<"}(G||(G={}));var H,V=U(35120),W=U(30065),q=U(73678);!function(k){k.ZoneState="zoneState",k.Festival="festival"}(H||(H={}));const K={[q.A_.FOREST]:{A3:[{zone:q.A_.FOREST,tag:"A4"}],A4:[{zone:q.A_.FOREST,tag:"A3"},{zone:q.A_.FOREST,tag:"A5"},{zone:q.A_.FOREST,tag:"B5"}],A5:[{zone:q.A_.FOREST,tag:"A4"}],B5:[{zone:q.A_.FOREST,tag:"A4"},{zone:q.A_.FOREST,tag:"C4"},{zone:q.A_.FOREST,tag:"B6"}],B6:[{zone:q.A_.FOREST,tag:"B5"},{zone:q.A_.FOREST,tag:"B7"}],B7:[{zone:q.A_.FOREST,tag:"B6"},{zone:q.A_.FOREST,tag:"C7"}],B8:[{zone:q.A_.FOREST,tag:"C8"}],C4:[{zone:q.A_.FOREST,tag:"B5"},{zone:q.A_.FOREST,tag:"D3"}],C7:[{zone:q.A_.FOREST,tag:"B7"},{zone:q.A_.FOREST,tag:"C8"}],C8:[{zone:q.A_.FOREST,tag:"C7"},{zone:q.A_.FOREST,tag:"B8"},{zone:q.A_.LAMPLIGHT,tag:"B1"}],D3:[{zone:q.A_.FOREST,tag:"C4"}]},[q.A_.SHIVERCHILL]:{A2:[{zone:q.A_.SHIVERCHILL,tag:"A3"}],A3:[{zone:q.A_.SHIVERCHILL,tag:"A2",prereq:{type:H.ZoneState,dataKey:"furnace",target:3,operator:G.GreaterThanOrEqualTo}},{zone:q.A_.SHIVERCHILL,tag:"A4"},{zone:q.A_.SHIVERCHILL,tag:"B3"}],A4:[{zone:q.A_.SHIVERCHILL,tag:"A3"},{zone:q.A_.SHIVERCHILL,tag:"A5"}],A5:[{zone:q.A_.SHIVERCHILL,tag:"A4"},{zone:q.A_.SHIVERCHILL,tag:"A6"}],A6:[{zone:q.A_.SHIVERCHILL,tag:"A5"},{zone:q.A_.SHIVERCHILL,tag:"A9",prereq:{type:H.ZoneState,dataKey:"furnace",target:2,operator:G.GreaterThanOrEqualTo}},{zone:q.A_.SHIVERCHILL,tag:"B6"}],A7:[{zone:q.A_.SHIVERCHILL,tag:"B7"},{zone:q.A_.SHIVERCHILL,tag:"B8"}],A9:[{zone:q.A_.SHIVERCHILL,tag:"A6",prereq:{type:H.ZoneState,dataKey:"furnace",target:2,operator:G.GreaterThanOrEqualTo}},{zone:q.A_.SHIVERCHILL,tag:"A10"},{zone:q.A_.SHIVERCHILL,tag:"B8",prereq:{type:H.ZoneState,dataKey:"furnace",target:1,operator:G.GreaterThanOrEqualTo}}],A10:[{zone:q.A_.SHIVERCHILL,tag:"A9"},{zone:q.A_.SHIVERCHILL,tag:"A11"},{zone:q.A_.SHIVERCHILL,tag:"B10"}],A11:[{zone:q.A_.SHIVERCHILL,tag:"A10"}],B1:[{zone:q.A_.SHIVERCHILL,tag:"B3"}],B2:[{zone:q.A_.SHIVERCHILL,tag:"B3"}],B3:[{zone:q.A_.SHIVERCHILL,tag:"A3"},{zone:q.A_.SHIVERCHILL,tag:"B1"},{zone:q.A_.SHIVERCHILL,tag:"B2",prereq:{type:H.ZoneState,dataKey:"furnace",target:3,operator:G.GreaterThanOrEqualTo}}],B6:[{zone:q.A_.SHIVERCHILL,tag:"A6"},{zone:q.A_.SHIVERCHILL,tag:"B7"}],B7:[{zone:q.A_.SHIVERCHILL,tag:"A7"},{zone:q.A_.SHIVERCHILL,tag:"B6"}],B8:[{zone:q.A_.SHIVERCHILL,tag:"A7"},{zone:q.A_.SHIVERCHILL,tag:"A9"}],B9:[{zone:q.A_.SHIVERCHILL,tag:"B10"}],B10:[{zone:q.A_.SHIVERCHILL,tag:"A10"},{zone:q.A_.SHIVERCHILL,tag:"B9"}]},[q.A_.SKYWATCH]:{A0:[{zone:q.A_.SKYWATCH,tag:"A1"},{zone:q.A_.SHIVERCHILL,tag:"B1"}],A1:[{zone:q.A_.SKYWATCH,tag:"A0"},{zone:q.A_.SKYWATCH,tag:"B1"},{zone:q.A_.SKYWATCH,tag:"C1"},{zone:q.A_.SKYWATCH,tag:"D1"}],B1:[{zone:q.A_.SKYWATCH,tag:"A1"},{zone:q.A_.SKYWATCH,tag:"B2"},{zone:q.A_.SKYWATCH,tag:"B3"}],B2:[{zone:q.A_.SKYWATCH,tag:"B1"}],B3:[{zone:q.A_.SKYWATCH,tag:"B1"}],C1:[{zone:q.A_.SKYWATCH,tag:"A1"},{zone:q.A_.SKYWATCH,tag:"C2"},{zone:q.A_.SKYWATCH,tag:"C3"}],C2:[{zone:q.A_.SKYWATCH,tag:"C1"}],C3:[{zone:q.A_.SKYWATCH,tag:"C1"},{zone:q.A_.SKYWATCH,tag:"C4"}],C4:[{zone:q.A_.SKYWATCH,tag:"C3"}],D1:[{zone:q.A_.SKYWATCH,tag:"A1"},{zone:q.A_.SKYWATCH,tag:"D2"},{zone:q.A_.SKYWATCH,tag:"E1"}],D2:[{zone:q.A_.SKYWATCH,tag:"D1"},{zone:q.A_.SKYWATCH,tag:"D3"}],D3:[{zone:q.A_.SKYWATCH,tag:"D2"}],E1:[{zone:q.A_.SKYWATCH,tag:"D1"},{zone:q.A_.SKYWATCH,tag:"E2"},{zone:q.A_.SKYWATCH,tag:"E3"}],E2:[{zone:q.A_.SKYWATCH,tag:"E1"}],E3:[{zone:q.A_.SKYWATCH,tag:"E1"},{zone:q.A_.SKYWATCH,tag:"E4"}],E4:[{zone:q.A_.SKYWATCH,tag:"E3"},{zone:q.A_.SKYWATCH,tag:"E5"}],E5:[{zone:q.A_.SKYWATCH,tag:"E4"}]},[q.A_.BONFIRE]:{A1:[{zone:q.A_.BONFIRE,tag:"B1"}],A4:[{zone:q.A_.BONFIRE,tag:"B4"}],B1:[{zone:q.A_.BONFIRE,tag:"C1"},{zone:q.A_.BONFIRE,tag:"B2"},{zone:q.A_.BONFIRE,tag:"A1"}],B2:[{zone:q.A_.BONFIRE,tag:"B1"},{zone:q.A_.BONFIRE,tag:"C3"},{zone:q.A_.BONFIRE,tag:"B4"}],B4:[{zone:q.A_.BONFIRE,tag:"A4"},{zone:q.A_.BONFIRE,tag:"B2"},{zone:q.A_.BONFIRE,tag:"C4"},{zone:q.A_.BONFIRE,tag:"B5"}],B5:[{zone:q.A_.BONFIRE,tag:"B4"},{zone:q.A_.BONFIRE,tag:"C6"}],C1:[{zone:q.A_.BONFIRE,tag:"D1"},{zone:q.A_.BONFIRE,tag:"D2"},{zone:q.A_.BONFIRE,tag:"B1"}],C2:[{zone:q.A_.BONFIRE,tag:"C3"}],C3:[{zone:q.A_.BONFIRE,tag:"C2"},{zone:q.A_.BONFIRE,tag:"D3"},{zone:q.A_.BONFIRE,tag:"B2"}],C4:[{zone:q.A_.BONFIRE,tag:"D4"},{zone:q.A_.BONFIRE,tag:"B4"}],C6:[{zone:q.A_.BONFIRE,tag:"D5"},{zone:q.A_.BONFIRE,tag:"D6"},{zone:q.A_.BONFIRE,tag:"B5"}],D1:[{zone:q.A_.BONFIRE,tag:"C1"}],D2:[{zone:q.A_.BONFIRE,tag:"C1"}],D3:[{zone:q.A_.BONFIRE,tag:"C3"}],D4:[{zone:q.A_.BONFIRE,tag:"C4"}],D5:[{zone:q.A_.BONFIRE,tag:"E6"},{zone:q.A_.BONFIRE,tag:"C6"}],D6:[{zone:q.A_.BONFIRE,tag:"C6"}],E5:[{zone:q.A_.BONFIRE,tag:"E6"}],E6:[{zone:q.A_.BONFIRE,tag:"E5"},{zone:q.A_.BONFIRE,tag:"D5"}]},[q.A_.SHIPWRECK]:{A1:[{zone:q.A_.SHIPWRECK,tag:"A2"},{zone:q.A_.SHIPWRECK,tag:"B2"}],A2:[{zone:q.A_.SHIPWRECK,tag:"A1"},{zone:q.A_.SHIPWRECK,tag:"A3"}],A3:[{zone:q.A_.SHIPWRECK,tag:"A2"}],A4:[{zone:q.A_.SHIPWRECK,tag:"A5"},{zone:q.A_.SHIPWRECK,tag:"B4"}],A5:[{zone:q.A_.SHIPWRECK,tag:"A4"}],A7:[{zone:q.A_.SHIPWRECK,tag:"B6"},{zone:q.A_.SHIPWRECK,tag:"B7"}],B2:[{zone:q.A_.SHIPWRECK,tag:"A1"},{zone:q.A_.SHIPWRECK,tag:"B4"}],B4:[{zone:q.A_.SHIPWRECK,tag:"A4"},{zone:q.A_.SHIPWRECK,tag:"B2"},{zone:q.A_.SHIPWRECK,tag:"B5"}],B5:[{zone:q.A_.SHIPWRECK,tag:"B4"},{zone:q.A_.SHIPWRECK,tag:"B6"}],B6:[{zone:q.A_.SHIPWRECK,tag:"A7"},{zone:q.A_.SHIPWRECK,tag:"B5"},{zone:q.A_.SHIPWRECK,tag:"C6"}],B7:[{zone:q.A_.SHIPWRECK,tag:"A7"},{zone:q.A_.SHIPWRECK,tag:"C7"},{zone:q.A_.SHIPWRECK,tag:"C9",prereq:{type:H.ZoneState,dataKey:"inkC9",target:1,operator:G.GreaterThanOrEqualTo}}],B8:[{zone:q.A_.SHIPWRECK,tag:"C8"}],B10:[{zone:q.A_.SHIPWRECK,tag:"B11"}],B11:[{zone:q.A_.SHIPWRECK,tag:"B10"},{zone:q.A_.SHIPWRECK,tag:"C11"}],B12:[{zone:q.A_.SHIPWRECK,tag:"B13"},{zone:q.A_.SHIPWRECK,tag:"C12"}],B13:[{zone:q.A_.SHIPWRECK,tag:"B12"}],C6:[{zone:q.A_.SHIPWRECK,tag:"B6"}],C7:[{zone:q.A_.SHIPWRECK,tag:"B7"},{zone:q.A_.SHIPWRECK,tag:"C8"}],C8:[{zone:q.A_.SHIPWRECK,tag:"B8"},{zone:q.A_.SHIPWRECK,tag:"C7"},{zone:q.A_.SHIPWRECK,tag:"C9"}],C9:[{zone:q.A_.SHIPWRECK,tag:"B7",prereq:{type:H.ZoneState,dataKey:"inkB7",target:1,operator:G.GreaterThanOrEqualTo}},{zone:q.A_.SHIPWRECK,tag:"C8"},{zone:q.A_.SHIPWRECK,tag:"C10"}],C10:[{zone:q.A_.SHIPWRECK,tag:"C9"},{zone:q.A_.SHIPWRECK,tag:"C11"}],C11:[{zone:q.A_.SHIPWRECK,tag:"B11"},{zone:q.A_.SHIPWRECK,tag:"C10"},{zone:q.A_.SHIPWRECK,tag:"C12"}],C12:[{zone:q.A_.SHIPWRECK,tag:"B12"},{zone:q.A_.SHIPWRECK,tag:"C11"}]},[q.A_.LAMPLIGHT]:{A1:[{zone:q.A_.LAMPLIGHT,tag:"B2"}],A2:[{zone:q.A_.LAMPLIGHT,tag:"B2"},{zone:q.A_.LAMPLIGHT,tag:"A3"}],A3:[{zone:q.A_.LAMPLIGHT,tag:"A2"},{zone:q.A_.LAMPLIGHT,tag:"B3"},{zone:q.A_.LAMPLIGHT,tag:"A4"}],A4:[{zone:q.A_.LAMPLIGHT,tag:"A3"},{zone:q.A_.LAMPLIGHT,tag:"B4"},{zone:q.A_.LAMPLIGHT,tag:"B2"},{zone:q.A_.LAMPLIGHT,tag:"house-exit"}],B0:[{zone:q.A_.LAMPLIGHT,tag:"B1"}],B1:[{zone:q.A_.FOREST,tag:"C8"},{zone:q.A_.LAMPLIGHT,tag:"B2"}],B2:[{zone:q.A_.LAMPLIGHT,tag:"B1"},{zone:q.A_.LAMPLIGHT,tag:"C2"},{zone:q.A_.LAMPLIGHT,tag:"A2"}],B3:[{zone:q.A_.LAMPLIGHT,tag:"A3"},{zone:q.A_.LAMPLIGHT,tag:"C3"},{zone:q.A_.MOON,tag:"A1",prereq:{type:H.Festival,activeFestival:W.Q.MoonlightFestival}}],B4:[{zone:q.A_.LAMPLIGHT,tag:"A4"},{zone:q.A_.LAMPLIGHT,tag:"C4"},{zone:q.A_.LAMPLIGHT,tag:"B5"}],B5:[{zone:q.A_.LAMPLIGHT,tag:"B4"}],C2:[{zone:q.A_.LAMPLIGHT,tag:"B2"},{zone:q.A_.LAMPLIGHT,tag:"C3"}],C3:[{zone:q.A_.LAMPLIGHT,tag:"B3"},{zone:q.A_.LAMPLIGHT,tag:"C2"},{zone:q.A_.LAMPLIGHT,tag:"C4"},{zone:q.A_.LAMPLIGHT,tag:"D3"}],C4:[{zone:q.A_.LAMPLIGHT,tag:"B4"},{zone:q.A_.LAMPLIGHT,tag:"C3"}],D3:[{zone:q.A_.LAMPLIGHT,tag:"C3"}]},[q.A_.FORESTHARD]:{A3:[{zone:q.A_.FORESTHARD,tag:"A4"}],A4:[{zone:q.A_.FORESTHARD,tag:"A3"},{zone:q.A_.FORESTHARD,tag:"A5"},{zone:q.A_.FORESTHARD,tag:"B5"}],A5:[{zone:q.A_.FORESTHARD,tag:"A4"}],B5:[{zone:q.A_.FORESTHARD,tag:"A4"},{zone:q.A_.FORESTHARD,tag:"C4"},{zone:q.A_.FORESTHARD,tag:"B6"}],B6:[{zone:q.A_.FORESTHARD,tag:"B5"},{zone:q.A_.FORESTHARD,tag:"B7"}],B7:[{zone:q.A_.FORESTHARD,tag:"B6"},{zone:q.A_.FORESTHARD,tag:"C7"}],B8:[{zone:q.A_.FORESTHARD,tag:"C8"}],C4:[{zone:q.A_.FORESTHARD,tag:"B5"},{zone:q.A_.FORESTHARD,tag:"D3"}],C7:[{zone:q.A_.FORESTHARD,tag:"B7"},{zone:q.A_.FORESTHARD,tag:"C8"}],C8:[{zone:q.A_.FORESTHARD,tag:"C7"},{zone:q.A_.FORESTHARD,tag:"B8"},{zone:q.A_.LAMPLIGHT,tag:"B1"}],D3:[{zone:q.A_.FORESTHARD,tag:"C4"}]},[q.A_.SHIVERCHILLHARD]:{A2:[{zone:q.A_.SHIVERCHILLHARD,tag:"A3"}],A3:[{zone:q.A_.SHIVERCHILLHARD,tag:"A2",prereq:{type:H.ZoneState,dataKey:"furnace",target:3,operator:G.GreaterThanOrEqualTo}},{zone:q.A_.SHIVERCHILLHARD,tag:"A4"},{zone:q.A_.SHIVERCHILLHARD,tag:"B3"}],A4:[{zone:q.A_.SHIVERCHILLHARD,tag:"A3"},{zone:q.A_.SHIVERCHILLHARD,tag:"A5"}],A5:[{zone:q.A_.SHIVERCHILLHARD,tag:"A4"},{zone:q.A_.SHIVERCHILLHARD,tag:"A6"}],A6:[{zone:q.A_.SHIVERCHILLHARD,tag:"A5"},{zone:q.A_.SHIVERCHILLHARD,tag:"A9",prereq:{type:H.ZoneState,dataKey:"furnace",target:2,operator:G.GreaterThanOrEqualTo}},{zone:q.A_.SHIVERCHILLHARD,tag:"B6"}],A7:[{zone:q.A_.SHIVERCHILLHARD,tag:"B7"},{zone:q.A_.SHIVERCHILLHARD,tag:"B8"}],A9:[{zone:q.A_.SHIVERCHILLHARD,tag:"A6",prereq:{type:H.ZoneState,dataKey:"furnace",target:2,operator:G.GreaterThanOrEqualTo}},{zone:q.A_.SHIVERCHILLHARD,tag:"A10"},{zone:q.A_.SHIVERCHILLHARD,tag:"B8",prereq:{type:H.ZoneState,dataKey:"furnace",target:1,operator:G.GreaterThanOrEqualTo}}],A10:[{zone:q.A_.SHIVERCHILLHARD,tag:"A9"},{zone:q.A_.SHIVERCHILLHARD,tag:"A11"},{zone:q.A_.SHIVERCHILLHARD,tag:"B10"}],A11:[{zone:q.A_.SHIVERCHILLHARD,tag:"A10"}],B1:[{zone:q.A_.SHIVERCHILLHARD,tag:"B3"}],B2:[{zone:q.A_.SHIVERCHILLHARD,tag:"B3"}],B3:[{zone:q.A_.SHIVERCHILLHARD,tag:"A3"},{zone:q.A_.SHIVERCHILLHARD,tag:"B1"},{zone:q.A_.SHIVERCHILLHARD,tag:"B2",prereq:{type:H.ZoneState,dataKey:"furnace",target:3,operator:G.GreaterThanOrEqualTo}}],B6:[{zone:q.A_.SHIVERCHILLHARD,tag:"A6"},{zone:q.A_.SHIVERCHILLHARD,tag:"B7"}],B7:[{zone:q.A_.SHIVERCHILLHARD,tag:"A7"},{zone:q.A_.SHIVERCHILLHARD,tag:"B6"}],B8:[{zone:q.A_.SHIVERCHILLHARD,tag:"A7"},{zone:q.A_.SHIVERCHILLHARD,tag:"A9"}],B9:[{zone:q.A_.SHIVERCHILLHARD,tag:"B10"}],B10:[{zone:q.A_.SHIVERCHILLHARD,tag:"A10"},{zone:q.A_.SHIVERCHILLHARD,tag:"B9"}]},[q.A_.SKYWATCHHARD]:{A0:[{zone:q.A_.SKYWATCHHARD,tag:"A1"},{zone:q.A_.SHIVERCHILLHARD,tag:"B1"}],A1:[{zone:q.A_.SKYWATCHHARD,tag:"A0"},{zone:q.A_.SKYWATCHHARD,tag:"B1"},{zone:q.A_.SKYWATCHHARD,tag:"C1"},{zone:q.A_.SKYWATCHHARD,tag:"D1"}],B1:[{zone:q.A_.SKYWATCHHARD,tag:"A1"},{zone:q.A_.SKYWATCHHARD,tag:"B2"},{zone:q.A_.SKYWATCHHARD,tag:"B3"}],B2:[{zone:q.A_.SKYWATCHHARD,tag:"B1"}],B3:[{zone:q.A_.SKYWATCHHARD,tag:"B1"}],C1:[{zone:q.A_.SKYWATCHHARD,tag:"A1"},{zone:q.A_.SKYWATCHHARD,tag:"C2"},{zone:q.A_.SKYWATCHHARD,tag:"C3"}],C2:[{zone:q.A_.SKYWATCHHARD,tag:"C1"}],C3:[{zone:q.A_.SKYWATCHHARD,tag:"C1"},{zone:q.A_.SKYWATCHHARD,tag:"C4"}],C4:[{zone:q.A_.SKYWATCHHARD,tag:"C3"}],D1:[{zone:q.A_.SKYWATCHHARD,tag:"A1"},{zone:q.A_.SKYWATCHHARD,tag:"D2"},{zone:q.A_.SKYWATCHHARD,tag:"E1"}],D2:[{zone:q.A_.SKYWATCHHARD,tag:"D1"},{zone:q.A_.SKYWATCHHARD,tag:"D3"}],D3:[{zone:q.A_.SKYWATCHHARD,tag:"D2"}],E1:[{zone:q.A_.SKYWATCHHARD,tag:"D1"},{zone:q.A_.SKYWATCHHARD,tag:"E2"},{zone:q.A_.SKYWATCHHARD,tag:"E3"}],E2:[{zone:q.A_.SKYWATCHHARD,tag:"E1"}],E3:[{zone:q.A_.SKYWATCHHARD,tag:"E1"},{zone:q.A_.SKYWATCHHARD,tag:"E4"}],E4:[{zone:q.A_.SKYWATCHHARD,tag:"E3"},{zone:q.A_.SKYWATCHHARD,tag:"E5"}],E5:[{zone:q.A_.SKYWATCHHARD,tag:"E4"}]},[q.A_.BONFIREHARD]:{A1:[{zone:q.A_.BONFIREHARD,tag:"B1"}],A4:[{zone:q.A_.BONFIREHARD,tag:"B4"}],B1:[{zone:q.A_.BONFIREHARD,tag:"C1"},{zone:q.A_.BONFIREHARD,tag:"B2"},{zone:q.A_.BONFIREHARD,tag:"A1"}],B2:[{zone:q.A_.BONFIREHARD,tag:"B1"},{zone:q.A_.BONFIREHARD,tag:"C3"},{zone:q.A_.BONFIREHARD,tag:"B4"}],B4:[{zone:q.A_.BONFIREHARD,tag:"A4"},{zone:q.A_.BONFIREHARD,tag:"B2"},{zone:q.A_.BONFIREHARD,tag:"C4"},{zone:q.A_.BONFIREHARD,tag:"B5"}],B5:[{zone:q.A_.BONFIREHARD,tag:"B4"},{zone:q.A_.BONFIREHARD,tag:"C6"}],C1:[{zone:q.A_.BONFIREHARD,tag:"D1"},{zone:q.A_.BONFIREHARD,tag:"D2"},{zone:q.A_.BONFIREHARD,tag:"B1"}],C2:[{zone:q.A_.BONFIREHARD,tag:"C3"}],C3:[{zone:q.A_.BONFIREHARD,tag:"C2"},{zone:q.A_.BONFIREHARD,tag:"D3"},{zone:q.A_.BONFIREHARD,tag:"B2"}],C4:[{zone:q.A_.BONFIREHARD,tag:"D4"},{zone:q.A_.BONFIREHARD,tag:"B4"}],C6:[{zone:q.A_.BONFIREHARD,tag:"D5"},{zone:q.A_.BONFIREHARD,tag:"D6"},{zone:q.A_.BONFIREHARD,tag:"B5"}],D1:[{zone:q.A_.BONFIREHARD,tag:"C1"}],D2:[{zone:q.A_.BONFIREHARD,tag:"C1"}],D3:[{zone:q.A_.BONFIREHARD,tag:"C3"}],D4:[{zone:q.A_.BONFIREHARD,tag:"C4"}],D5:[{zone:q.A_.BONFIREHARD,tag:"E6"},{zone:q.A_.BONFIREHARD,tag:"C6"}],D6:[{zone:q.A_.BONFIREHARD,tag:"C6"}],E5:[{zone:q.A_.BONFIREHARD,tag:"E6"}],E6:[{zone:q.A_.BONFIREHARD,tag:"E5"},{zone:q.A_.BONFIREHARD,tag:"D5"}]},[q.A_.SHIPWRECKHARD]:{A1:[{zone:q.A_.SHIPWRECKHARD,tag:"A2"},{zone:q.A_.SHIPWRECKHARD,tag:"B2"}],A2:[{zone:q.A_.SHIPWRECKHARD,tag:"A1"},{zone:q.A_.SHIPWRECKHARD,tag:"A3"}],A3:[{zone:q.A_.SHIPWRECKHARD,tag:"A2"}],A4:[{zone:q.A_.SHIPWRECKHARD,tag:"A5"},{zone:q.A_.SHIPWRECKHARD,tag:"B4"}],A5:[{zone:q.A_.SHIPWRECKHARD,tag:"A4"}],A7:[{zone:q.A_.SHIPWRECKHARD,tag:"B6"},{zone:q.A_.SHIPWRECKHARD,tag:"B7"}],B2:[{zone:q.A_.SHIPWRECKHARD,tag:"A1"},{zone:q.A_.SHIPWRECKHARD,tag:"B4"}],B4:[{zone:q.A_.SHIPWRECKHARD,tag:"A4"},{zone:q.A_.SHIPWRECKHARD,tag:"B2"},{zone:q.A_.SHIPWRECKHARD,tag:"B5"}],B5:[{zone:q.A_.SHIPWRECKHARD,tag:"B4"},{zone:q.A_.SHIPWRECKHARD,tag:"B6"}],B6:[{zone:q.A_.SHIPWRECKHARD,tag:"A7"},{zone:q.A_.SHIPWRECKHARD,tag:"B5"},{zone:q.A_.SHIPWRECKHARD,tag:"C6"}],B7:[{zone:q.A_.SHIPWRECKHARD,tag:"A7"},{zone:q.A_.SHIPWRECKHARD,tag:"C7"},{zone:q.A_.SHIPWRECKHARD,tag:"C9",prereq:{type:H.ZoneState,dataKey:"inkC9",target:1,operator:G.GreaterThanOrEqualTo}}],B8:[{zone:q.A_.SHIPWRECKHARD,tag:"C8"}],B10:[{zone:q.A_.SHIPWRECKHARD,tag:"B11"}],B11:[{zone:q.A_.SHIPWRECKHARD,tag:"B10"},{zone:q.A_.SHIPWRECKHARD,tag:"C11"}],B12:[{zone:q.A_.SHIPWRECKHARD,tag:"B13"},{zone:q.A_.SHIPWRECKHARD,tag:"C12"}],B13:[{zone:q.A_.SHIPWRECKHARD,tag:"B12"}],C6:[{zone:q.A_.SHIPWRECKHARD,tag:"B6"}],C7:[{zone:q.A_.SHIPWRECKHARD,tag:"B7"},{zone:q.A_.SHIPWRECKHARD,tag:"C8"}],C8:[{zone:q.A_.SHIPWRECKHARD,tag:"B8"},{zone:q.A_.SHIPWRECKHARD,tag:"C7"},{zone:q.A_.SHIPWRECKHARD,tag:"C9"}],C9:[{zone:q.A_.SHIPWRECKHARD,tag:"B7",prereq:{type:H.ZoneState,dataKey:"inkB7",target:1,operator:G.GreaterThanOrEqualTo}},{zone:q.A_.SHIPWRECKHARD,tag:"C8"},{zone:q.A_.SHIPWRECKHARD,tag:"C10"}],C10:[{zone:q.A_.SHIPWRECKHARD,tag:"C9"},{zone:q.A_.SHIPWRECKHARD,tag:"C11"}],C11:[{zone:q.A_.SHIPWRECKHARD,tag:"B11"},{zone:q.A_.SHIPWRECKHARD,tag:"C10"},{zone:q.A_.SHIPWRECKHARD,tag:"C12"}],C12:[{zone:q.A_.SHIPWRECKHARD,tag:"B12"},{zone:q.A_.SHIPWRECKHARD,tag:"C11"}]},[q.A_.MOON]:{A1:[{zone:q.A_.MOON,tag:"B1"}],B1:[{zone:q.A_.MOON,tag:"A1"},{zone:q.A_.MOON,tag:"C1"}],C1:[{zone:q.A_.MOON,tag:"B1"},{zone:q.A_.MOON,tag:"D1"}],D1:[{zone:q.A_.MOON,tag:"C1"}]},[q.A_.SPRINGFESTGROTTO_BUNNY]:{A3:[{zone:q.A_.SPRINGFESTGROTTO_BUNNY,tag:"B7"}],A9:[{zone:q.A_.SPRINGFESTGROTTO_BUNNY,tag:"B2"},{zone:q.A_.SPRINGFESTGROTTO_BUNNY,tag:"B7"}],B2:[{zone:q.A_.SPRINGFESTGROTTO_BUNNY,tag:"A9"}],B7:[{zone:q.A_.SPRINGFESTGROTTO_BUNNY,tag:"A3"},{zone:q.A_.SPRINGFESTGROTTO_BUNNY,tag:"A9"}]},[q.A_.SPRINGFESTGROTTO_FOX]:{A3:[{zone:q.A_.SPRINGFESTGROTTO_FOX,tag:"B7"}],A9:[{zone:q.A_.SPRINGFESTGROTTO_FOX,tag:"B2"},{zone:q.A_.SPRINGFESTGROTTO_FOX,tag:"B7"}],B2:[{zone:q.A_.SPRINGFESTGROTTO_FOX,tag:"A9"}],B7:[{zone:q.A_.SPRINGFESTGROTTO_FOX,tag:"A3"},{zone:q.A_.SPRINGFESTGROTTO_FOX,tag:"A9"}]}};var z=U(39144);class Y{static findShortestPaths(k,B){return this.findShortestPathsInternal(k,B)}static findShortestPathsInternal(k,B,U=[]){const F=[...U,k];if(k===B)return[F];const G=k.split("-");if(G.length<2)return void j.VyI.log(`Invalid map format: ${k}`,j.$bb.Error);const $=G[0],H=G[1],V=K[$];if(!(null==V?void 0:V[H]))return;const W=V[H];let q,z=1/0;for(const j of W){if(!this.isConnectionAvailable(j))continue;const k=`${j.zone}-${j.tag}`;if(F.includes(k))continue;const U=this.findShortestPathsInternal(k,B,F);if(U&&U.length>0){const k=U[0].length;kthis.findShortestPaths(k,B))).filter((k=>k));if(0===U.length)return;const F=Math.min(...U.map((k=>k[0].length)));return $.flatten(U.filter((k=>k[0].length===F)))}static findShortestPathsToAllOf(k,B){const U=B.map((B=>this.findShortestPaths(k,B))).filter((k=>k));return 0===U.length?[]:$.flatten(U)}static isHouse(k){return j.Aq$.isDefined(k)&&k.indexOf(q.A_.HOUSE)>-1&&-1===k.indexOf("exit")}static isConnectionAvailable(k){var B;if(!k.prereq)return!0;let U,$,W,q;switch(k.prereq.type){case H.ZoneState:return U=V.q.instance.prodigy.world.getCurrentZoneObject(),$=U.getState(k.prereq.dataKey),"object"==typeof $&&null!==$?(j.VyI.log("Unable to compare zone state objects in a map connection prerequisite comparison",j.$bb.Error),!1):(W=k.prereq.target,class{static compare(k,B,U){if(U in G&&(!this.isNumeric(k)||!this.isNumeric(B)))return console.log(`Unable to compare non-numeric values: ${k} and ${B} with operator ${U}`),!1;switch(U){case F.Equal:return k===B;case F.NotEqual:return k!==B;case G.GreaterThan:return k>B;case G.GreaterThanOrEqualTo:return k>=B;case G.LessThan:return kU.finalQuestId}static getTargetMapsFromLocations(k,B){const U=null!=B?B:V.q.instance.prodigy.world.getCurrentZoneObject(),F=[];for(const G of k)if("string"!=typeof G){if(G.uniqueEncounters){if(Object.entries(G.uniqueEncounters).every((([k,B])=>B.every((B=>U.isNamedUniqueEncounterDefeated(B,k))))))continue}if(G.requiredStates){if(!Object.entries(G.requiredStates).every((([k,B])=>{var F;return(null!==(F=U.getState(k))&&void 0!==F?F:void 0)===B})))continue}if(G.disallowedStates){if(Object.entries(G.disallowedStates).every((([k,B])=>{var F;return(null!==(F=U.getState(k))&&void 0!==F?F:void 0)===B})))continue}F.push(G.location)}else F.push(G);return F}static manageTeleportTriggerGuideHands(k,B){let U;const F=null!=B?B:this.findSceneTeleportTriggers();return F.length?(F.forEach((B=>{const F=B.GameObject.findComponentInChildren(z.P,!0);F&&(B.targetMapTag===k?(F.spawnGuideHand().catch(j.RQr.createHandler("Failed to spawn guide hand")),U=F):F.despawnGuideHand())})),U):U}static despawnTeleportTriggerGuideHands(k){(null!=k?k:this.findSceneTeleportTriggers()).forEach((k=>{const B=k.GameObject.findComponentInChildren(z.P,!0);B&&B.despawnGuideHand()}))}static findSceneTeleportTriggers(){let k=[];return j.wa5.getActiveScene().container.sourceContainer.isBound("TELEPORT_TRIGGER")&&(k=j.wa5.getActiveScene().container.sourceContainer.getAll("TELEPORT_TRIGGER")),$.uniq(k)}}},85126:(k,B,U)=>{"use strict";U.d(B,{N:()=>Xt,s:()=>Kt});var F=U(62459),G=U(51742),j=U(84317),$=U(90633),H=U(73678),V=U(25531),W=U(35120),q=U(34829),K=U(77938),z=U(11624),Y=U(35569),Q=U(87820),X=U(56942),Z=U(93867),J=U(77078),tt=U(10213);class et extends tt.z{constructor(k,B){super(k,"CR1","MAP_ACADEMY_SECOND_FLOOR",640,520,["academy-CR1"],B.concat([X.Q.Spine_academy_landingdoors_json,X.Q.Spine_pmlocks_basic_json])),this.localizer=null}setup(k,B,U){super.setup(k,B,U),this.localizer=W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService);const G=this.game.width,j=this.game.height;this.addAreaEvent(k,B,{x:162,y:j,w:500,h:80,rect:!0},"academy-CR2",162,100),this.addAreaEvent(k,B,{x:G-162,y:j,w:500,h:80,rect:!0},"academy-CR2",1114,100);const $=Xt.getAllTowerData(),V=W.q.instance.prodigy.gameContainer.get("306-5359");for(let F=0;F<$.length;F++){const k=$[F],U=k.keystone.zone;if(U===H.A_.ACADEMY)continue;const G=this.screen.contentGameObject.findChildByName(`${U}_tower_lock`),j=this.screen.aboveGameObject.findChildByName(`${U}_warden`);V.data.previousZone.includes(k.towerID)&&(V.playerContainer.x=.5*(G.transform.worldPosition.x+j.transform.worldPosition.x),V.playerContainer.y=.5*(G.transform.worldPosition.y+j.transform.worldPosition.y)),j&&(j.active=!1),this.addCollisionZone(B,G.transform.localPosition.x-40,G.transform.localPosition.y,80,80);const q=G.findComponentInChildren(J.p);q.InputEnabled=!0,q.onClicked.add((()=>{const k=this.localizer.getText("BUTTON_OKAY_UPPERCASE"),B=this.localizer.getText("ACADEMY_TOWER_NOT_RELEASED");W.q.instance.prodigy.open.messageBoxOkay(B,k,null)}))}}start(k,B,U){Z.U.isEndgameQuestActive()&&(this.addGuideHand(k,B,150,660,0,20,180),this.addGuideHand(k,B,1130,660,0,20,180)),super.start(k,B,U)}}class it extends tt.z{constructor(k,B){super(k,"CR2","MAP_ACADEMY_SECOND_FLOOR",640,530,["academy-CR2"],B.concat([]))}setup(k,B,U){super.setup(k,B,U),this.localizer=W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService),this.addAreaEvent(k,B,{x:162,y:40,w:500,h:80,rect:!0},"academy-CR1",200,660),this.addAreaEvent(k,B,{x:1114,y:40,w:500,h:80,rect:!0},"academy-CR1",1090,660),this.addAreaEvent(k,B,{x:640,y:655,w:this.game.width,h:130,rect:!0},"academy-GH1",640,100);const G=B.contentGameObject.findChildByName("astral_tower_lock");if(F.Aq$.isDefined(G)){const k=G.findComponentInChildren(J.p);k.InputEnabled=!0,k.onClicked.add((()=>{const k=this.localizer.getText("BUTTON_OKAY_UPPERCASE"),B=this.localizer.getText("ACADEMY_TOWER_NOT_RELEASED");W.q.instance.prodigy.open.messageBoxOkay(B,k,null)}))}}start(k,B,U){Z.U.isEndgameQuestActive()&&this.addGuideHand(k,B,640,570,0,20,180),super.start(k,B,U)}}class st extends tt.z{constructor(k,B){const U=[X.Q.Spine_academystairlight_json,X.Q.Spine_academylanternglow_json,X.Q.Spine_academy_window_glow_horizontal_json,X.Q.Spine_academy_window_light_horizontal_json,X.Q.Spine_stair_lock_json,G.c.Sfx_academy_rumble];super(k,"GH1","MAP_ACADEMY_GREATHALL",640,500,["academy-GH2"],B.concat(U))}init(k,B,U,F){return this.enableLayerID(1,!1),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U);k.rootContainer.get("e20-0fb0").player.hasCompletedTutorial()&&(this.addAreaEvent(k,B,{x:640,y:655,w:1110,h:150,rect:!0},"academy-GH2",640,100),this.addAreaEvent(k,B,{x:640,y:40,w:1110,h:80,rect:!0},"academy-CR2",640,560)),st.addEffects(k,B)}start(k,B,U){Z.U.isEndgameQuestActive()&&this.addGuideHand(k,B,640,570,0,20,180),super.start(k,B,U)}static addEffects(k,B){const U=265,F=420,G=1015,j=420,$=k.add.spine(419,212,X.Q.Spine_academystairlight_json);$.setToSetupPose(),$.setAnimationByName(0,"animation",!0);const H=k.add.spine(861,212,X.Q.Spine_academystairlight_json);H.setToSetupPose(),H.setAnimationByName(0,"animation",!0),B.foreground.addChild($),B.foreground.addChild(H);const V=k.add.spine(U,F,X.Q.Spine_academy_window_glow_horizontal_json);V.setToSetupPose(),V.setAnimationByName(0,"animation",!0),V.scale.x=-1;const W=k.add.spine(G,j,X.Q.Spine_academy_window_glow_horizontal_json);W.setToSetupPose(),W.setAnimationByName(0,"animation",!0),B.foreground.addChild(V),B.foreground.addChild(W);const q=k.add.spine(U,F,X.Q.Spine_academy_window_light_horizontal_json);q.setToSetupPose(),q.setAnimationByName(0,"animation",!0),q.scale.x=-1;const K=k.add.spine(G,j,X.Q.Spine_academy_window_light_horizontal_json);K.setToSetupPose(),K.setAnimationByName(0,"animation",!0),B.background.addChild(q),B.background.addChild(K)}}var nt=U(4324),at=U(88022),rt=U(75214),ot=U(87337),ht=U(3862);class ct extends tt.z{constructor(k,B){super(k,"GH3","MAP_ACADEMY_GREATHALL",640,500,["academy-GH2"],B.concat([X.Q.Spine_academylanternglow_json,X.Q.Spine_trap_door_glow_json,X.Q.Spine_npc_gale_json,X.Q.Spine_npc_floatlingmerchant_json]))}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:640,y:40,w:1110,h:80,rect:!0},"academy-GH2",640,570),this.addAreaEvent(k,B,{x:640,y:600,w:500,h:180,canReTrigger:!0},null,null,null,(()=>{W.q.instance.prodigy.open.map({disableClose:!1})})),this._archiveEntranceAreaEvent=this.addAreaEvent(k,B,{x:900,y:465,w:150,h:120,rect:!0,canReTrigger:!0},null,null,null,(()=>{W.q.instance.prodigy.open.archiveEntranceMenu(H.A_.ARCHIVES,(()=>{this.moveOffArchiveEntrance()}))}));const G=W.q.instance.prodigy.create.sprite(900,465,at._.General_core_json,"empty",{x:.5,y:.5},null,150,120);G.events.onInputUp.add((()=>{this.screen.path.findPath(this.screen.user.x,this.screen.user.y,G.x-40,G.y+20,!0).then((k=>{k&&this.screen.user.setPath(k)})).catch(F.RQr.createHandler("Unable to find path to trapdoor"))})),G.alpha=0,G.inputEnabled=!0,this.screen.content.addChild(G);new rt.p(k,"NPC_NAME_GALE",83,ot.ac.CareGiver,B.content,915,180,"idle").onClick.add((()=>{const k=W.q.instance.prodigy.event.create();k.text(14,"gale"),k.start()}),this);new rt.p(k,"NPC_NAME_ACADEMY_MERCHANT",84,ot.ac.Merchant,B.content,345,180,"idle").onClick.add((()=>W.q.instance.prodigy.open.store(35)));const j=k.add.spine(949,450,X.Q.Spine_trap_door_glow_json);j.setAnimationByName(0,"animation",!0),j.scale.x=-1,B.content.addChild(j)}start(k,B,U){if(Z.U.isEndgameQuestActive())this.addGuideHand(k,B,640,30,0,20);else if(F.Aq$.isDefined(ht.B.getLastDungeonRun(this.game,H.A_.ARCHIVES))&&0!==ht.B.getLastDungeonRun(this.game,H.A_.ARCHIVES).lastRunTimeStamp)W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_UNPLACED_KEYSTONES)||W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_NO_KEYSTONES)||this.addGuideHand(k,B,640,30,0,20);else{W.q.instance.prodigy.create.element(B.foreground,880,410).highlight(!0)}super.start(k,B,U)}moveOffArchiveEntrance(){if(!this._archiveEntranceAreaEvent)return;const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer;k.setValidPath(this.screen.path,this._archiveEntranceAreaEvent.x-k.width,k.y)}}var dt=U(18155),lt=U(79340),ut=U(85855);class ft extends lt.Z{constructor(k,B){super(k,"B0",B.concat([j.t.Tileset_generic_new_png,j.t.Tileset_town_new_png,j.t.Tileset_firefly_new_png,ut.V.Bgm_puppetmaster,X.Q.Spine_shadowportal_json,ut.V.Bgm_lamplight,G.c.Sfx_academy_portal_open,G.c.Sfx_academy_portal_close]),"map-lamplight-B0"),this.noot=null,this.pippet=null,this.portal=null}setup(k,B,U){super.setup(k,B,U),B.user.position.x=120,B.user.position.y=880,this.portal=k.add.spine(870,425,X.Q.Spine_shadowportal_json),this.portal.setToSetupPose(),B.content.addChild(this.portal)}start(k,B){super.start(k,B),this.noot=B.addNPC(150,850,at._.Npc_sprite_noot_json),this.noot.float(!0),this.noot.walkSpeed=2,this.pippet=new dt.N(k,"NPC_NAME_PIPPET",B.content,120,880,"idle",B.user);const U=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),G=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);U.execute(G.getStateMachine(67),{game:k,screen:B,scene:this,player:B.user,noot:this.noot,pippet:this.pippet,path:B.path,pathfinder:B.path,portal:this.portal},null)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),this.pippet&&(this.pippet.destroy(),this.pippet=null),this.portal&&(this.portal.destroy(),this.portal=null),super.cleanup()}resizeContainer(k,B){W.q.instance.prodigy.effects.resizeContainer(k,B)}removePippet(){this.pippet.destroy()}playNextScene(){W.q.instance.prodigy.world.playScene("academy-introPt2")}}class bt extends lt.Z{constructor(k,B){super(k,"GH3",B.concat([at._.Npc_sprite_noot_json,at._.Zone_lamplight_json,ut.V.Bgm_puppetmaster,X.Q.Spine_shadowportal_json,X.Q.Spine_trap_door_glow_json,X.Q.Spine_npc_gale_json,X.Q.Spine_npc_floatlingmerchant_json,G.c.Sfx_academy_portal_open,G.c.Sfx_academy_portal_close,ut.V.Bgm_fun]),"map-academy-GH3"),this.noot=null,this.gale=null,this.academyMerchan=null,this.portal=null,this.trapDoor=null}setup(k,B,U){super.setup(k,B,U),B.user.scale.set(0,0),B.user.position.x=370,B.user.position.y=350,this.gale=new rt.p(k,"NPC_NAME_GALE",83,ot.ac.CareGiver,B.content,915,235,"animation"),this.gale.walkSpeed=2,this.academyMerchan=new rt.p(k,"NPC_NAME_ACADEMY_MERCHANT",84,ot.ac.Merchant,B.content,350,180,"animation"),this.portal=k.add.spine(370,300,X.Q.Spine_shadowportal_json),this.portal.setToSetupPose(),B.content.addChild(this.portal),this.trapDoor=k.add.spine(949,450,X.Q.Spine_trap_door_glow_json),this.trapDoor.setAnimationByName(0,"animation",!0),this.trapDoor.scale.x=-1,B.content.addChild(this.trapDoor)}start(k,B){super.start(k,B),this.noot=B.addNPC(370,350,at._.Npc_sprite_noot_json),this.noot.scale.set(0,0),this.noot.float(!0),this.noot.walkSpeed=2;const U=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),G=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);U.execute(G.getStateMachine(76),{game:k,screen:B,scene:this,player:B.user,noot:this.noot,gale:this.gale,path:B.path,pathfinder:B.path,portal:this.portal,nootDialogueEndgame:Z.U.isEndgameQuestActive()?292:230},null)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),this.gale&&(this.gale.destroy(),this.gale=null),this.portal&&(this.portal.destroy(),this.portal=null),this.trapDoor&&(this.trapDoor.destroy(),this.trapDoor=null),super.cleanup()}resizeContainer(k,B){W.q.instance.prodigy.effects.resizeContainer(k,B)}}class pt extends lt.Z{constructor(k,B){super(k,"CR2",B.concat([]),"map-academy-CR2"),this.noot=null}setup(k,B,U){super.setup(k,B,U),this.screen.user.position.x=640,this.screen.user.position.y=900,this.noot=this.screen.addNPC(700,900,at._.Npc_sprite_noot_json),this.noot.float(!0)}start(k,B){super.start(k,B);const U=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),G=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);U.execute(G.getStateMachine(81),{game:k,screen:B,scene:this,player:B.user,noot:this.noot,pathfinder:B.path},null)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),super.cleanup()}}class vt extends lt.Z{constructor(k,B){super(k,"GH1",B.concat([at._.Npc_sprite_noot_json,at._.Zone_lamplight_json,X.Q.Spine_academy_window_light_horizontal_json,ut.V.Bgm_fun,ut.V.Bgm_puppetmaster,X.Q.Spine_academystairlight_json,X.Q.Spine_academylanternglow_json,X.Q.Spine_academy_window_glow_horizontal_json,X.Q.Spine_stair_lock_json,X.Q.Spine_academy_window_glow_vertical_json,X.Q.Spine_academy_window_light_vertical_json,X.Q.Spine_screendebris_json,G.c.Sfx_puppetmaster_blast,G.c.Sfx_keystone_disappear]),"map-academy-GH1"),this.noot=null}setup(k,B,U){super.setup(k,B,U),this.screen.user.position.x=640,this.screen.user.position.y=900,this.noot=this.screen.addNPC(700,900,at._.Npc_sprite_noot_json),this.noot.float(!0),st.addEffects(k,B)}start(k,B){super.start(k,B);const U=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),G=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);U.execute(G.getStateMachine(80),{game:k,screen:B,scene:this,player:B.user,noot:this.noot,pathfinder:B.path},null)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),super.cleanup()}}var gt=U(8674),mt=U(99625),yt=U(80060);class _t extends lt.Z{constructor(k,B){super(k,"GH1",B.concat([ut.V.Bgm_academy_greathall]),"map-academy-GH1"),this.onSceneComplete=new F.HN0,this.cutscenePrefab=mt.l.AcademyStatusEffects1Cutscene,this.isMultiplayerDisabled=!0,this.arePopupsDisabled=!0}setup(k,B,U){super.setup(k,B,U),B.user.position.set(550,445)}start(k,B){super.start(k,B,20),this.playCutscene().catch((k=>{F.VyI.log(`Error during Academy Status Effect FTUE cutscene: ${k}`,F.$bb.Error),this.endCutscene()}))}playCutscene(){return(0,gt.sH)(this,void 0,void 0,(function*(){const k=new F._mx;F.wa5.getActiveScene().addGameObject(k),this.cutsceneLoadPromise=yt.d.loadWithInjectedValuesAndDependenciesFromGUID(W.q.instance.prodigy.gameContainer.get("d0e-64fd"),this.cutscenePrefab,{END_CUTSCENE:this.endCutscene.bind(this)},k),yield this.cutsceneLoadPromise}))}endCutscene(){W.q.instance.prodigy.open.menuCloseAll(),this.onSceneComplete.dispatch(),super.endCutscene()}cleanup(){var k;null===(k=this.cutsceneLoadPromise)||void 0===k||k.cancel(),this.onSceneComplete.dispose(),super.cleanup()}}class Et extends _t{constructor(){super(...arguments),this.cutscenePrefab=mt.l.AcademyStatusEffects2Cutscene}}var wt=U(96535),Tt=U(44357),St=U(13956);class At extends lt.Z{constructor(k,B){super(k,"GH2",B.concat(At.PRELOAD_ASSETS),"map-academy-GH2")}setup(k,B,U){super.setup(k,B,U),nt.k.initKeystones(this.game,this.screen),nt.k.addEffects(k,B),B.user.position.set(350,400),this._pippet=new rt.p(W.q.instance.game,"NPC_NAME_PIPPET",X.Q.Spine_npc_pippet_json,ot.ac.Boss,this.screen.content,930,400,"idle"),this._pippet.flip()}start(k,B){super.start(k,B),this.playCutscene().catch((k=>{F.RQr.logError(k,"Error playing Pippet post-battle cutscene"),this.endCutscene()}))}playCutscene(){const k=Object.create(null,{playCutscene:{get:()=>super.playCutscene}});return(0,gt.sH)(this,void 0,void 0,(function*(){yield k.playCutscene.call(this),this._player.saveEnabled=!1,yield Tt.v$([1425]),yield Tt.x(this.screen.path,this._pippet,900,0),this._pippet.visible=!1;for(const k of Object.keys(Q.b.ZONE_TOWERS)){const B=K.t.getItem("academyTower",Q.b.ZONE_TOWERS[k]).data,U=B.keystone.zone;this._player.state.get(`keystones-${U}`)>0||(yield F.Egh.timeout(800),nt.k.placeKeystone(this.game,this.screen,B.keystone,B.element).catch(F.RQr.createHandler(`Error placing ${k} keystone`)))}yield F.Egh.timeout(3500),this.endCutscene()}))}endCutscene(){super.endCutscene(),this._player.saveEnabled=!0,W.q.instance.prodigy.world.it("academy-GH2",290,490)}}At.PRELOAD_ASSETS=[X.Q.Spine_academygh_centre_json,X.Q.Spine_academygh_addkeystone_json,X.Q.Spine_academy_window_glow_vertical_json,X.Q.Spine_academy_window_light_vertical_json],(0,gt.Cg)([(0,St.b)("306-5359"),(0,gt.Sn)("design:type",wt.W)],At.prototype,"_player",void 0);var Ct=U(95891),Ot=U.n(Ct),It=U(84399),Dt=U(85604);class Rt extends lt.Z{constructor(k,B){super(k,"GH2",B.concat(Rt.PRELOAD_ASSETS),"map-academy-GH2"),this._noot=null,this._hasBeenSetup=!1}setup(k,B,U){super.setup(k,B,U),nt.k.initKeystones(this.game,this.screen),nt.k.addEffects(k,B),B.user.position.set(370,400);for(const{type:F,x:G,y:j,flip:$}of Rt.NPC_DATA)B.addConstructedQuestNPC(G,j,F,$,Ct.noop);this._noot=new rt.p(k,"NPC_NAME_NOOT",X.Q.Spine_npc_noot_json,void 0,B.content,910,400,"idle"),this._noot.flip(),this._hasBeenSetup=!0}start(k,B){this._hasBeenSetup&&(super.start(k,B),this.playCutscene().catch(F.RQr.createHandler("Error playing Pippet post-battle cutscene")).finally((()=>this.endCutscene())))}playCutscene(){const k=Object.create(null,{playCutscene:{get:()=>super.playCutscene}});return(0,gt.sH)(this,void 0,void 0,(function*(){yield k.playCutscene.call(this),yield Tt.v$([1483,1484,1485,1486,1487,1488,1489,1490,1595,1492])}))}endCutscene(){super.endCutscene();const k=W.q.instance.prodigy.gameContainer.get("306-5359");k.data.puppetMasterDefeatDate=Date.now(),k.updated=!0,It.R.sendActivationEvent(),W.q.instance.prodigy.world.it(k.isPlayingAtSchool()&&!It.R.isFeatureEnabled()?"academy-GH3":"lamplight-B3")}cleanup(){this._noot&&(this._noot.destroy(),this._noot=null),super.cleanup()}}Rt.PRELOAD_ASSETS=[X.Q.Spine_npc_flora_json,X.Q.Spine_npc_benni_json,X.Q.Spine_npc_bok_json,X.Q.Spine_npc_slurpy_json,at._.Npc_sprite_windsail_json,X.Q.Spine_npc_noot_json,X.Q.Spine_academygh_centre_json,X.Q.Spine_academygh_addkeystone_json,X.Q.Spine_academy_window_glow_vertical_json,X.Q.Spine_academy_window_light_vertical_json],Rt.NPC_DATA=[{type:Dt.y.Flora,x:445,y:258,flip:!1},{type:Dt.y.Eve,x:553,y:211,flip:!1},{type:Dt.y.Benni,x:642,y:143,flip:!1},{type:Dt.y.Slurpy,x:720,y:213,flip:!1},{type:Dt.y.Bok,x:857,y:258,flip:!1}];var Pt=U(82351),Mt=U(36648),Nt=U(28628),xt=U(40295),Lt=U(48975),kt=U(59968);class Bt extends kt.R{constructor(k,B,U,G,j,$,H=-260){const V=new Lt.s(W.q.instance.game);V.init({npc_name:G,npc_type:j,x_coord:B,y_coord:U,npc_animation_id:"idle"}),super(W.q.instance.game,k,V,1,B,U),this.nameText.GameObject.legacyTransform.group.position.set(0,H),this.setup($).catch(F.RQr.createHandler("Error loading NPC spine"))}setup(k){return(0,gt.sH)(this,void 0,void 0,(function*(){if(this._initialState=this.stand,!F.E3R.isLoaded(k)){const B=W.q.instance.prodigy.gameContainer.get(F.t5G.AssetLoader);yield B.loadAssets([k])}this._spine=W.q.instance.prodigy.create.spine(0,0,k,this.sprites),this._initialState.apply(this)}))}walk(){this._spine?this._spine.setAnimationByName(0,"walk",!0):this._initialState=this.walk}stand(){this._spine?this._spine.setAnimationByName(0,"idle",!0):this._initialState=this.stand}}var Ut=U(10670),Ft=U(76945);class Gt extends lt.Z{get cutsceneErrorMessage(){return"Error playing endgame pre-battle cutscene"}get cutsceneDialogueSequence(){return[1477]}get battleType(){return Nt.gu.EndGamePuppetMaster}get battleBackground(){return[Mt.q.Battle_puppet_master_bg,""]}get firstTimeBreadcrumbKey(){return $.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PUPPET_MASTER}constructor(k,B){super(k,"GH2",B.concat(Gt.PRELOAD_ASSETS),"map-academy-GH2")}setup(k,B,U){super.setup(k,B,U),nt.k.initKeystones(this.game,this.screen),nt.k.addEffects(k,B),this.screen.user.position.set(350,400),this._puppetMaster=new Bt(B.content,930,0,"NPC_NAME_PUPPETMASTER",ot.ac.Boss,X.Q.Spine_npc_puppetmaster_json),this._puppetMaster.flip()}start(k,B){super.start(k,B),this.playCutscene().catch((k=>{F.RQr.logError(k,this.cutsceneErrorMessage),this.endCutscene()}))}playCutscene(){const k=Object.create(null,{playCutscene:{get:()=>super.playCutscene}});return(0,gt.sH)(this,void 0,void 0,(function*(){yield k.playCutscene.call(this),yield Tt.x(this.screen.path,this._puppetMaster,900,400);const B=W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete($.B.FEATURE_ENDGAME_QUEST,this.firstTimeBreadcrumbKey)?Gt.getRetryDialogue():this.cutsceneDialogueSequence;yield Tt.v$(B),this.endCutscene()}))}static getRetryDialogue(){const k=Ft.o.integerInRange(0,this._currentRetryDialogues.length),B=this._currentRetryDialogues.splice(k,1)[0];return 0===this._currentRetryDialogues.length&&(this._currentRetryDialogues.push(...this.RETRY_DIALOGUES),this._currentRetryDialogues.splice(this._currentRetryDialogues.indexOf(B),1)),B}endCutscene(){super.endCutscene();const k={revampBattleType:this.battleType,screen:this.battleBackground};Z.U.progressData.step===xt.B.Guardian5Defeated&&(k.backgroundMusic=Pt.B.Bgm_battle_puppet_master,k.victoryMusic=Pt.B.Bgm_puppet_master_victory_loop);let B=null,U=null,F=null;switch(this.battleType){case Nt.gu.EndGameGuardianFirefly:B=5,U=Ut.jT.IllusionBoss1FirstTimeBattleStart,F=$.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_FIREFLY;break;case Nt.gu.EndGameGuardianShiverchill:B=7,U=Ut.jT.IllusionBoss2FirstTimeBattleStart,F=$.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIVERCHILL;break;case Nt.gu.EndGameGuardianBonfire:B=9,U=Ut.jT.IllusionBoss3FirstTimeBattleStart,F=$.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_BONFIRE;break;case Nt.gu.EndGameGuardianShipwreck:B=11,U=Ut.jT.IllusionBoss4FirstTimeBattleStart,F=$.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIPWRECK;break;case Nt.gu.EndGameGuardianSkywatch:B=13,U=Ut.jT.IllusionBoss5FirstTimeBattleStart,F=$.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SKYWATCH;break;case Nt.gu.EndGamePuppetMaster:B=15,U=Ut.jT.PuppetMasterFirstTimeBattleStart,F=$.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PUPPET_MASTER}U&&W.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(B,U,F),W.q.instance.prodigy.battle.start(k,void 0,this.onBattleWon,this.onBattleEnd)}onBattleWon(){Z.U.locallyAdvanceQuest(),W.q.instance.prodigy.world.it("academy-GH2",290,490)}onBattleEnd(){W.q.instance.prodigy.world.it("academy-GH2",290,490)}}Gt.PRELOAD_ASSETS=[X.Q.Spine_npc_puppetmaster_json,X.Q.Spine_academygh_centre_json,X.Q.Spine_academygh_addkeystone_json,X.Q.Spine_academy_window_glow_vertical_json,X.Q.Spine_academy_window_light_vertical_json],Gt.RETRY_DIALOGUES=[[1517],[1518],[1519],[1520],[1521],[1522],[1523]],Gt._currentRetryDialogues=Ot().clone(Gt.RETRY_DIALOGUES);var jt=U(87539);class $t extends Gt{get cutsceneErrorMessage(){return"Error playing guardian pre-battle cutscene"}get cutsceneDialogueSequence(){return this._guardianData.puppetMasterPreBattleDialogue}get battleType(){return this._battleType}get firstTimeBreadcrumbKey(){switch(this._battleType){case Nt.gu.EndGameGuardianFirefly:return $.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_FIREFLY;case Nt.gu.EndGameGuardianShiverchill:return $.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIVERCHILL;case Nt.gu.EndGameGuardianBonfire:return $.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_BONFIRE;case Nt.gu.EndGameGuardianShipwreck:return $.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIPWRECK;case Nt.gu.EndGameGuardianSkywatch:return $.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SKYWATCH}}get battleBackground(){return[Mt.q[this._guardianData.backgroundImageKey],Mt.q[this._guardianData.foregroundImageKey]]}setup(k,B,U){super.setup(k,B,U),this._battleIndex=Z.U.getCurrentGuardianIndex(),this._battleType=$t.GUARDIAN_BATTLE_TYPE[this._battleIndex],this._guardianData=jt.m.getGuardianData(this._battleType)}onBattleWon(){Z.U.locallyAdvanceQuest(),W.q.instance.prodigy.world.it("academy-GH2",290,490,{guardianJustDefeated:!0})}}$t.GUARDIAN_BATTLE_TYPE=[Nt.gu.EndGameGuardianFirefly,Nt.gu.EndGameGuardianShiverchill,Nt.gu.EndGameGuardianBonfire,Nt.gu.EndGameGuardianShipwreck,Nt.gu.EndGameGuardianSkywatch];var Ht=U(29834);class Vt extends lt.Z{constructor(k,B){super(k,"GH2",B.concat(Vt.PRELOAD_ASSETS),"map-academy-GH2")}setup(k,B,U){super.setup(k,B,U),nt.k.initKeystones(this.game,this.screen),nt.k.addEffects(k,B),this.screen.user.position.set(350,400),this._pippet=new rt.p(W.q.instance.game,"NPC_NAME_PIPPET",X.Q.Spine_npc_pippet_json,ot.ac.Boss,this.screen.content,930,0,"idle"),this._pippet.flip()}start(k,B){super.start(k,B),this.playCutscene().catch((k=>{F.RQr.logError(k,"Error playing pippet pre-battle cutscene"),this.endCutscene()}))}playCutscene(){const k=Object.create(null,{playCutscene:{get:()=>super.playCutscene}});return(0,gt.sH)(this,void 0,void 0,(function*(){var B;yield k.playCutscene.call(this),yield Tt.x(this.screen.path,this._pippet,900,400),null===(B=this._pippet.spineNPC.findComponent(Ht.j))||void 0===B||B.playAnimation("idle",!0),yield Tt.v$([1454]),this.endCutscene()}))}endCutscene(){super.endCutscene(),Vt.startEndgamePippetBattle()}static startEndgamePippetBattle(){const k={revampBattleType:Nt.gu.EndgamePippet,screen:[Mt.q.Battle_academy_gh_stairs_bg,Mt.q.Battle_academy_gh_stairs_fg]};W.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(3,Ut.jT.PippetFirstTimeBattleStart,$.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PIPPET),W.q.instance.prodigy.battle.start(k,void 0,(()=>{Z.U.locallyAdvanceQuest(),W.q.instance.prodigy.world.it("academy-GH2",290,490)}),(()=>{W.q.instance.prodigy.world.it("academy-GH2",290,490)}))}}Vt.PRELOAD_ASSETS=[X.Q.Spine_academygh_centre_json,X.Q.Spine_academygh_addkeystone_json,X.Q.Spine_academy_window_glow_vertical_json,X.Q.Spine_academy_window_light_vertical_json];class Wt extends lt.Z{constructor(k,B){super(k,"GH3",B.concat([at._.Npc_sprite_noot_json,at._.Zone_lamplight_json,ut.V.Bgm_fun,ut.V.Bgm_puppetmaster,X.Q.Spine_academylanternglow_json,G.c.Sfx_academy_rumble,X.Q.Spine_academy_window_glow_vertical_json,X.Q.Spine_screendebris_json]),"map-academy-GH3"),this.noot=null}setup(k,B,U){super.setup(k,B,U),B.user.position.x=640,B.user.position.y=850,this.debris=this.game.add.spine(640,480,X.Q.Spine_screendebris_json),this.debris.setToSetupPose(),this.screen.foreground.addChild(this.debris)}start(k,B){super.start(k,B,20),this.noot=B.addNPC(640,760,at._.Npc_sprite_noot_json),this.noot.float(!0),this.noot.walkSpeed=2;const U=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),G=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);U.execute(G.getStateMachine(53),{game:k,screen:B,scene:this,player:B.user,noot:this.noot,path:B.path,pathfinder:B.path,debris:this.debris},null)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),this.debris&&(this.debris.destroy(),this.debris=null),super.cleanup()}}class qt extends lt.Z{constructor(k,B){super(k,"GH2",B.concat([at._.Npc_sprite_noot_json,at._.Zone_lamplight_json,ut.V.Bgm_puppetmaster,X.Q.Spine_academylanternglow_json,ut.V.Bgm_fun,X.Q.Spine_academy_window_light_horizontal_json,X.Q.Spine_screendebris_json,X.Q.Spine_screendebris_json,X.Q.Spine_academy_window_glow_vertical_json,X.Q.Spine_academy_window_light_vertical_json,X.Q.Spine_academygh_centre_json,G.c.Sfx_puppetmaster_blast,G.c.Sfx_keystone_disappear]),"map-academy-GH2"),this.noot=null}setup(k,B,U){super.setup(k,B,U),B.user.position.x=640,B.user.position.y=850,this.keystonesSpine=this.game.add.spine(640,403,X.Q.Spine_academygh_centre_json),this.keystonesSpine.setToSetupPose(),this.screen.content.addChild(this.keystonesSpine),this.debris=this.game.add.spine(640,480,X.Q.Spine_screendebris_json),this.debris.setToSetupPose(),this.screen.foreground.addChild(this.debris),nt.k.addEffects(k,B)}start(k,B){super.start(k,B,12),this.noot=B.addNPC(640,800,at._.Npc_sprite_noot_json),this.noot.float(!0),this.noot.walkSpeed=2;const U=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),G=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);U.execute(G.getStateMachine(54),{game:k,screen:B,scene:this,player:B.user,noot:this.noot,keystones:this.keystonesSpine,debris:this.debris},null)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),this.keystonesSpine&&(this.keystonesSpine.destroy(),this.keystonesSpine=null),this.debris&&(this.debris.destroy(),this.debris=null),super.cleanup()}}var Kt,zt=U(96810);class Yt extends lt.Z{constructor(k,B){super(k,"GH1",B.concat([at._.Npc_sprite_noot_json,at._.Zone_lamplight_json,ut.V.Bgm_puppetmaster,X.Q.Spine_academylanternglow_json,ut.V.Bgm_fun,X.Q.Spine_academystairlight_json,X.Q.Spine_academy_window_glow_horizontal_json,X.Q.Spine_academy_window_light_horizontal_json]),"map-academy-GH1"),this._noot=null}setup(k,B,U){super.setup(k,B,U),B.user.position.x=640,B.user.position.y=850,this._puppetMaster=new rt.p(k,"NPC_NAME_PUPPETMASTER",X.Q.Spine_npc_puppetmaster_json,ot.ac.Boss,B.content,640,-50,"idle"),this._pippet=new dt.N(k,"NPC_NAME_PIPPET",B.content,640,-50,"idle",B.user),this._puppetMaster.alpha=this._pippet.alpha=1,st.addEffects(k,B)}start(k,B){super.start(k,B,12),this._noot=B.addNPC(640,800,at._.Npc_sprite_noot_json),this._noot.float(!0),this._noot.walkSpeed=2;const U=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),G=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);U.execute(G.getStateMachine(55),{game:k,screen:B,scene:this,player:B.user,noot:this._noot,path:B.path,puppetmaster:this._puppetMaster,pippet:this._pippet,pathfinder:B.path},null)}battle(k){const B={revampBattleType:Nt.gu.Tutorial3,intro:W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("COMBAT_MINION_BATTLE"),screen:"battle-academy-gh-stairs",encounter:[{ID:69}],drops:[{type:"gold",N:50}],dropsDisabled:!0,difficulty:3,minTeamSize:2,maxTeamSize:2,bench:[{petID:122,weight:1}]};W.q.instance.prodigy.gameContainer.get("e20-0fb0").player.setEnergy(1),this.technicalMetricsManager.sendOnboardingFunnelEvent(zt.l.MinionBattleStarted),W.q.instance.prodigy.battle.battleStats.type="AcademyTutorialBattle",W.q.instance.prodigy.battle.start(B,(()=>{this.endBattle()}),(()=>{this.endBattle()}),(()=>{this.endBattle()}),"academy-GH1")}endBattle(){this.technicalMetricsManager.sendOnboardingFunnelEvent(zt.l.MinionBattleWon),W.q.instance.prodigy.world.it("academy-GH1"),this.zone.completeSequence(1,0)}cleanup(){this._noot&&(this._noot.destroy(),this._noot=null),this._puppetMaster&&(this._puppetMaster.destroy(),this._puppetMaster=null),this._pippet&&(this._pippet.destroy(),this._pippet=null),super.cleanup()}}class Qt extends lt.Z{constructor(k,B){super(k,"GH1",B.concat([at._.Npc_sprite_noot_json,at._.Zone_lamplight_json,ut.V.Bgm_puppetmaster,X.Q.Spine_academylanternglow_json,ut.V.Bgm_fun,X.Q.Spine_academystairlight_json,X.Q.Spine_academy_window_glow_horizontal_json,X.Q.Spine_academy_window_light_horizontal_json]),"map-academy-GH1"),this._noot=null}setup(k,B,U){super.setup(k,B,U),B.user.position.x=320,B.user.position.y=520,this._noot=B.addNPC(430,520,at._.Npc_sprite_noot_json),this._noot.float(!0),this._noot.walkSpeed=2,this._puppetMaster=new rt.p(k,"NPC_NAME_PUPPETMASTER",X.Q.Spine_npc_puppetmaster_json,ot.ac.Boss,B.content,640,480,"idle",null,!0),this._pippet=new dt.N(k,"NPC_NAME_PIPPET",B.content,815,490,"idle",B.user),this._puppetMaster.alpha=this._pippet.alpha=1,st.addEffects(k,B)}start(k,B){super.start(k,B,12);const U=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),G=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);U.execute(G.getStateMachine(77),{game:this.game,screen:this.screen,scene:this,player:B.user,noot:this._noot,path:this.screen.path,puppetmaster:this._puppetMaster,pippet:this._pippet,pathfinder:this.screen.path},null)}cleanup(){this._noot&&(this._noot.destroy(),this._noot=null),this._puppetMaster&&(this._puppetMaster.destroy(),this._puppetMaster=null),this._pippet&&(this._pippet.destroy(),this._pippet=null),super.cleanup()}}!function(k){k[k.None=0]="None",k[k.Placed=1]="Placed"}(Kt||(Kt={}));class Xt extends Q.b{constructor(k){super(k),this.assets=[j.t.Tileset_academy_png,j.t.Tileset_academy_sup_png,j.t.Tileset_collisions_png,`bgm-${this.bgmID}`,G.c.Sfx_lamplight],this.name="The Academy",this.ID=H.A_.ACADEMY,this.battleBG="battle-academy-gh-stairs",this.defaultOnFaint="academy-GH3",this.questHub="academy-GH3",this.bgmID=20,this.currency=13,this.zoneIndex=z.P.Academy,this.states=["daily"],this.monsters=[],this.maps={GH1:new st(this,this.assets),GH2:new nt.k(this,this.assets),GH3:new ct(this,this.assets),CR1:new et(this,this.assets),CR2:new it(this,this.assets)},this.scenes={greatHallPt1:new Wt(this,this.assets),greatHallPt2:new qt(this,this.assets),greatHallPt3:new Yt(this,this.assets),greatHallPt4:new Qt(this,this.assets),introPt1:new ft(this,this.assets),introPt2:new bt(this,this.assets),stairsUnlocked:new vt(this,this.assets),secondFloor:new pt(this,this.assets),endgamePrePippet:new Vt(this,this.assets),endgamePostPippet:new At(this,this.assets),endgamePreGuardian:new $t(this,this.assets),endgamePrePuppetMaster:new Gt(this,this.assets),endgamePostPuppetMaster:new Rt(this,this.assets),statusEffectFTUE1:new _t(this,this.assets),statusEffectFTUE2:new Et(this,this.assets)}}placeDaily(k,B,U){}init(k,B,U){super.init(k,B,U),this.quests={},this.bgmID=20}setup(k,B,U){return W.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasCompletedTutorial()||(B.menuBar.active=!1),super.setup(k,B,U)}teleport(k,B,U,F,G){const j=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;j.backpack.hasItem("key",22,this.difficultyMode);j.hasCompletedTutorial()&&j.backpack.hasItem("key",22,this.difficultyMode)<=0?W.q.instance.prodigy.world.it("lamplight-B0"):(W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_VISITED)||W.q.instance.prodigy.breadcrumbManager.completeBreadcrumb($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_VISITED),super.teleport(k,B,U,F,G),this.sendSegmentTrackingEvents())}sendSegmentTrackingEvents(){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=k.data.zone,U=k.data.previousZone;if(!W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_VISITED_AFTER_RECIEVING_KEYSTONE)){const B=Xt.getAllTowerData().filter((B=>k.backpack.hasItem("key",B.keystone.itemID)));B&&(B.forEach((k=>{W.q.instance.prodigy.gameContainer.get("c47-20b6").academyTowers.sendFunnelEvent({funnelName:V.w.format("{0}_tower",k.element),funnelType:"feature",step:Y.D.AcademyTeleport})})),W.q.instance.prodigy.breadcrumbManager.completeBreadcrumb($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_VISITED_AFTER_RECIEVING_KEYSTONE))}if(B===`${H.A_.ACADEMY}-${q.s.TOWER_COMMON_ROOM_SHORTFORM}1`&&U===`${H.A_.ACADEMY}-${q.s.TOWER_COMMON_ROOM_SHORTFORM}2`&&!W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_TOWER_LOBBY_VISITED_AFTER_PLACING_KEYSTONE)){const k=Xt.getAllTowerData().filter((k=>this.getKeystoneState(k.keystone.zone)===Kt.Placed));k&&(k.forEach((k=>{W.q.instance.prodigy.gameContainer.get("c47-20b6").academyTowers.sendFunnelEvent({funnelName:V.w.format("{0}_tower",k.element),funnelType:"feature",step:Y.D.AcademyTowerLobby})})),W.q.instance.prodigy.breadcrumbManager.completeBreadcrumb($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_TOWER_LOBBY_VISITED_AFTER_PLACING_KEYSTONE))}if(B===`${H.A_.ACADEMY}-GH2`&&U===`${H.A_.ACADEMY}-GH3`&&!W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_PEDESTAL_ROOM_VISITED_AFTER_RECIEVING_KEYSTONE)){const B=Xt.getAllTowerData().filter((B=>k.backpack.hasItem("key",B.keystone.itemID)));B&&(B.forEach((k=>{W.q.instance.prodigy.gameContainer.get("c47-20b6").academyTowers.sendFunnelEvent({funnelName:V.w.format("{0}_tower",k.element),funnelType:"feature",step:Y.D.PedestalRoom})})),W.q.instance.prodigy.breadcrumbManager.completeBreadcrumb($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_PEDESTAL_ROOM_VISITED_AFTER_RECIEVING_KEYSTONE))}}static getAllTowerData(){return K.t.getCategoryItems("academyTower").sort(((k,B)=>k.ID-B.ID)).map((k=>k.data))}static getTowerData(k){const B=Xt.getAllTowerData();for(let U=0;U0}static getKeystonesToPlace(){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=Xt.getAllTowerData();let U=[];for(let F=0;F0&&k.state.get(`keystones-${G.keystone.zone}`)!==Kt.Placed&&U.push(G.keystone.zone)}return U}}},4324:(k,B,U)=>{"use strict";U.d(B,{k:()=>nt});var F=U(8674),G=U(62459),j=U(88022),$=U(82351),H=U(99625),V=U(51742),W=U(56942),q=U(40295),K=U(90633),z=U(73678),Y=U(35120),Q=U(93867),X=U(10670),Z=U(41674),J=U(46784),tt=U(44357),et=U(38454),it=U(85126),st=U(10213);class nt extends st.z{constructor(k,B){const U=[W.Q.Spine_academygh_centre_json,W.Q.Spine_academylanternglow_json,W.Q.Spine_academy_window_glow_vertical_json,W.Q.Spine_academy_window_light_horizontal_json,W.Q.Spine_academy_window_light_vertical_json,W.Q.Spine_shadowportal_json,W.Q.Spine_academygh_addkeystone_json,V.c.Sfx_academy_portal_open,V.c.Sfx_academy_portal_close,V.c.Sfx_keystone_appear,V.c.Sfx_bubble_pop,W.Q.Spine_circle_bloom_1_json,$.B.Sfx_academy_keystone_activation_sheen];super(k,"GH2","MAP_ACADEMY_GREATHALL",640,570,["academy-GH3","academy-GH1"],B.concat(U))}setup(k,B,U){var F;super.setup(k,B,U);const $=Y.q.instance.prodigy.gameContainer.get("306-5359");this.addAreaEvent(k,B,{x:640,y:45,w:1110,h:75,rect:!0},"academy-GH1",640,560),this.addAreaEvent(k,B,{x:640,y:655,w:1110,h:130,rect:!0},"academy-GH3",640,100),Q.U.progressData.step===q.B.LastKeystoneCutsceneViewed&&Y.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(2,X.jT.AllGemsFirstAcademyVisit,K.B.BREADCRUMB_ENDGAME_QUEST_FIRST_ACADEMY_VISIT_WITH_ALL_GEMS);const V=this.screen.content.addChild(Y.q.instance.prodigy.create.sprite(640,383,j._.General_core_json,"empty",{x:.5,y:.5},null,260,220));if(V.events.onInputUp.add((()=>{Y.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:J.B.PedestalsClicked,interfaceType:Z.Wm.ClickableSprite}),nt.setGuideHandActive(!1),Q.U.progressData.step===q.B.LastKeystoneCutsceneViewed?this.zone.playScene("endgamePrePippet"):Q.U.getCurrentGuardianIndex()>=0?this.zone.playScene("endgamePreGuardian"):Q.U.progressData.step===q.B.Guardian5Defeated?this.zone.playScene("endgamePrePuppetMaster"):Q.U.isStepComplete(q.B.PuppetMasterDefeated)?(Y.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(18,X.jT.PostPuppetMasterPedestalClicked,K.B.BREADCRUMB_ENDGAME_QUEST_FIRST_CLICK_POST_PUPPET_MASTER_PEDESTAL),tt.v$([1493,1494]).catch(G.RQr.createHandler("Error running dialog"))):Y.q.instance.prodigy.open.keystonePedestals((()=>{it.N.anyKeystonesToPlace()||Y.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(K.B.FEATURE_ACADEMY_TOWERS,K.B.BREADCRUMB_ACADEMY_NO_KEYSTONES)||(Y.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(K.B.FEATURE_ACADEMY_TOWERS,K.B.BREADCRUMB_ACADEMY_NO_KEYSTONES),nt.setGuideHandActive(!1))}))})),V.alpha=0,V.inputEnabled=!0,nt.addEffects(k,B),Q.U.progressData.step===q.B.PippetDefeated&&it.N.anyKeystonesToPlace())return void this.zone.playScene("endgamePostPippet");if(Q.U.progressData.step===q.B.PuppetMasterDefeated&&!G.Aq$.isDefined($.data.puppetMasterDefeatDate))return void($.backpack.hasItem("hat",240)?this.zone.playScene("endgamePostPuppetMaster"):this.playMissedPuppetMasterGearSequence().catch(G.RQr.createHandler("Error playing missed Puppet Master gear sequence")));const W=Y.q.instance.prodigy.gameContainer.get("d0e-64fd");nt._guideHand=new G._mx(B.foregroundGameObject),nt._guideHand.addComponent(G.dLy).setPosition(640,360),nt.setGuideHandActive(!1),W.loadWithDependenciesFromGUID(H.l.ClickHereGuideHand,nt._guideHand).catch(G.RQr.createHandler("Error loading guide hand")),(null===(F=$.data.previousZone)||void 0===F?void 0:F.includes(z.A_.SHIVERCHILL))&&this.portalInSetup(k,B,1035,480)}start(k,B,U){var F;(null===(F=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.previousZone)||void 0===F?void 0:F.includes(z.A_.SHIVERCHILL))&&this.portalInStart(k,this.screen),super.start(k,B,U),Q.U.progressData.step===q.B.LastKeystoneCutsceneViewed?Y.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(K.B.FEATURE_ENDGAME_QUEST,K.B.BREADCRUMB_ENDGAME_QUEST_SAW_KEYSTONE_DIALOGUE)?nt.setGuideHandActive(!0):(Y.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(K.B.FEATURE_ENDGAME_QUEST,K.B.BREADCRUMB_ENDGAME_QUEST_SAW_KEYSTONE_DIALOGUE),tt.v$([1473]).then((()=>{nt.setGuideHandActive(!0)})).catch(G.RQr.createHandler("Error showing pippet dialogue"))):nt.setGuideHandActive(it.N.anyKeystonesToPlace()||Q.U.isEndgameQuestActive())}cleanup(){var k;null===(k=nt._guideHand)||void 0===k||k.destroy(),nt._guideHand=null,super.cleanup()}static setGuideHandActive(k){nt._guideHand&&(nt._guideHand.active=k)}portalInSetup(k,B,U,F){B.user.scale.set(0,0),B.user.x=U,B.user.y=F,G.Aq$.isDefined(B.user.follow)&&(B.user.follow.visible=!1,B.user.follow.x=U,B.user.follow.y=F)}portalInStart(k,B){const U=k.add.spine(B.user.x,B.user.y,W.Q.Spine_shadowportal_json);U.setToSetupPose(),B.content.addChild(U);const F=-150,j=50,$=Y.q.instance.prodigy.gameContainer.get(G.$Bt.IFSMController),H=Y.q.instance.prodigy.gameContainer.get(G.$Bt.FSMService);$.execute(H.getStateMachine(185),{game:k,map:this,player:B.user,playerScale:B.user.scale,path:B.path,portal:U,startX:B.user.x+F,startY:B.user.y+j},(()=>{G.Aq$.isDefined(B.user.follow)&&(B.user.follow.visible=!0)}))}static addEffects(k,B){const U=k.add.spine(160,600,W.Q.Spine_academy_window_glow_vertical_json);U.setToSetupPose(),U.setAnimationByName(0,"animation",!0);const F=k.add.spine(1120,600,W.Q.Spine_academy_window_glow_vertical_json);F.setToSetupPose(),F.setAnimationByName(0,"animation",!0),B.foreground.addChild(U),B.foreground.addChild(F);const G=k.add.spine(160,600,W.Q.Spine_academy_window_light_vertical_json);G.setToSetupPose(),G.setAnimationByName(0,"animation",!0);const j=k.add.spine(1120,600,W.Q.Spine_academy_window_light_vertical_json);j.setToSetupPose(),j.setAnimationByName(0,"animation",!0),B.background.addChild(G),B.background.addChild(j)}static placeKeystone(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){Y.q.instance.prodigy.audio.playSFX(39,"appear"),k.time.events.addTimer(2333,(()=>{Y.q.instance.prodigy.audio.playSFX(40,"pop")}),this),Y.q.instance.prodigy.world.getZone(z.A_.ACADEMY).setKeystoneState(U,it.s.Placed),Y.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(K.B.FEATURE_TOWERS_PROMPT,K.B.NOOT_TOWER_PROMPT),Y.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(K.B.FEATURE_ACADEMY_TOWERS,K.B.BREADCRUMB_ACADEMY_UNPLACED_KEYSTONES),Y.q.instance.prodigy.breadcrumbManager.resetBreadcrumb(K.B.FEATURE_ACADEMY_TOWERS,K.B.BREADCRUMB_ACADEMY_TOWER_LOBBY_VISITED_AFTER_PLACING_KEYSTONE);const F=k.add.spine(U.x,U.y,W.Q.Spine_academygh_addkeystone_json);F.setToSetupPose(),B.above.add(F),F.setAnimationByName(0,`keystone-add-${U.zone}`),yield F.onComplete.asPromise(),F.setAnimationByName(0,`keystone-idle-${U.zone}`,!0),nt.setGuideHandActive(it.N.anyKeystonesToPlace()||Q.U.isEndgameQuestActive())}))}static initKeystones(k,B){var U;const F=k.add.spine(640,403,W.Q.Spine_academygh_centre_json);F.setToSetupPose(),F.updateMethod=G.ba$.Pixi;const j=F.setAnimationByName(0,"tutorial");j.time=j.animationEnd,F.updateMethod=G.ba$.Spine,B.content.addChild(F);const H=it.N.getAllTowerData(),V=Q.U.progressData.step===q.B.Guardian5Defeated?5:Q.U.getCurrentGuardianIndex();for(let G=0;G<5;G++){const F=H[nt.TOWER_DATA_INDEX_BY_GUARDIAN_INDEX[G]];if(Y.q.instance.prodigy.world.getZone(z.A_.ACADEMY).getKeystoneState(F.keystone.zone)===it.s.Placed){const j=k.add.spine(F.keystone.x,F.keystone.y,W.Q.Spine_academygh_addkeystone_json),H=(null===(U=B.screenData)||void 0===U?void 0:U.guardianJustDefeated)&&V===G+1,q=`keystone-${V>G?"active-":""}idle-${F.keystone.zone}`;if(j.setToSetupPose(),H){const U=k.add.spine(F.keystone.x,F.keystone.y,W.Q.Spine_circle_bloom_1_json);U.alpha=0,U.setAnimationByName(0,"animation",!0),B.above.add(U);const G=Y.q.instance.game.add.tween(U,this).to({alpha:1},450,null,!1).to({alpha:1},750,null,!1).to({alpha:0},900,null,!1),H=()=>{Y.q.instance.prodigy.audio.playSFXFromGUID($.B.Sfx_academy_keystone_activation_sheen)};G.onStart.addOnce(H),j.onStart.addOnce((()=>{G.start()})),j.setAnimationByName(0,`keystone-activate-${F.keystone.zone}`,!1),j.addAnimationByName(0,q,!0)}else j.setAnimationByName(0,q,!0);B.above.add(j)}}F.setToSetupPose()}playMissedPuppetMasterGearSequence(){return(0,F.sH)(this,void 0,void 0,(function*(){try{const k=Y.q.instance.prodigy.gameContainer.get("d0e-64fd"),B=(yield k.loadWithDependenciesFromGUID(H.l.EndgameIllustrationPuppetMasterDefeat)).findComponentInChildren(et.V);yield B.onComplete.asPromise()}catch(e){G.RQr.logError(e,"Error showing story panels")}const k={};yield new Promise((B=>{Q.U.awardMissedPuppetMasterGear(),Y.q.instance.game.broadcaster.addAppListener("Prodigy.Events.Endgame.MISSED_PUPPET_MASTER_GEAR_AWARDED",(()=>B()),k)})),Y.q.instance.game.broadcaster.removeAppListener("Prodigy.Events.Endgame.MISSED_PUPPET_MASTER_GEAR_AWARDED",k),this.zone.playScene("endgamePostPuppetMaster")}))}}nt.TOWER_DATA_INDEX_BY_GUARDIAN_INDEX=[0,1,3,4,2]},10213:(k,B,U)=>{"use strict";U.d(B,{z:()=>$});var F=U(28029),G=U(93867),j=U(83726);class $ extends j.T{setup(k,B,U={}){super.setup(k,B,U),G.U.shouldShowPuppetMasterDefeatCelebration()&&F.E.addConfetti(B.foregroundGameObject)}}},64544:(k,B,U)=>{"use strict";U.d(B,{w:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.uAl{create(){super.create();{const k=j.q.instance.prodigy.world.getCurrentZone();this._towerZone=j.q.instance.prodigy.world.getZone(k);const B=j.q.instance.prodigy.world.getCurrentMap().split("-")[1];this._currentMap=this._towerZone.getMap(B)}}getCurrentFloor(){return this._towerZone.CurrentFloor}getNextFloor(){return this._towerZone.CurrentFloor+1}getElement(){return this._towerZone.Element}getBattlesWon(){return this._towerZone.monstersDefeated}getTotalBattles(){return this._towerZone.goalTotal}getCurrentTowerMap(){return this._currentMap}getCurrentTowerZone(){return this._towerZone}getCurrentTowerMaxFloor(){return this._towerZone.TotalFloors}getWardenSaved(){return this._towerZone.isWardenSaved}destroy(){this._towerZone=null,this._currentMap=null,super.destroy()}};H=(0,F.Cg)([(0,G.EVk)("AcademyTowerDataProvider",$.Y.academy)],H)},90029:(k,B,U)=>{"use strict";U.d(B,{l:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(17331),V=U(64544);let W=class extends G.uAl{create(){super.create(),this._towerZone=this._academyTowerDataProvider.getCurrentTowerZone(),this._currentMap=this._academyTowerDataProvider.getCurrentTowerMap()}destroy(){this._currentMap=null,this._towerZone=null,super.destroy()}setCallbacks(k,B,U){this._gotoNextFloor=B,this._gotoCommonRoom=k,this._exitElevator=U}goToNextFloor(){this._gotoNextFloor?this._gotoNextFloor(this._currentMap):(this.onFloorExit(),this._currentMap.dungeonZone.enterDungeon()),this._rootGameObject.destroy()}goToCommonRoom(){this._gotoCommonRoom?this._gotoCommonRoom(this._currentMap):(this.onFloorExit(),j.q.instance.prodigy.world.it(this._towerZone.commonRoom)),this._rootGameObject.destroy()}exitElevator(){var k;this._exitElevator?this._exitElevator():null===(k=this._elevator)||void 0===k||k.exit(),this._rootGameObject.destroy()}onFloorExit(){this._towerZone.monstersDefeated===this._towerZone.goalTotal&&(this._towerZone.setFloor(this._towerZone.CurrentFloor,!0),this._towerZone.sendSegmentEvent("Tower Floor Completed"))}};(0,F.Cg)([(0,G.MnK)(H.H),(0,F.Sn)("design:type",H.H)],W.prototype,"_elevator",void 0),(0,F.Cg)([(0,G.MnK)(V.w),(0,F.Sn)("design:type",V.w)],W.prototype,"_academyTowerDataProvider",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],W.prototype,"_rootGameObject",void 0),(0,F.Cg)([(0,G.DTs)(),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Function,Function,Function]),(0,F.Sn)("design:returntype",void 0)],W.prototype,"setCallbacks",null),(0,F.Cg)([(0,G.DTs)(),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],W.prototype,"onFloorExit",null),W=(0,F.Cg)([(0,G.EVk)("ExitTowerFloor",$.Y.academy)],W)},21922:(k,B,U)=>{"use strict";U.d(B,{u:()=>W});var F=U(8674),G=U(62459),j=U(28152),$=U(74846),H=U(44094),V=U(64544);let W=class extends G.uAl{constructor(){super(...arguments),this._uiSpineAnimatonClip=[],this._enemyDefeatedFillVisual=[]}postCreate(){super.postCreate(),this.resetVisuals()}resetVisuals(){for(let k=0;k=B)this._completionFill.active=!0,this.updateFloorCompleteText();else for(let U=0;U=this._academyTowerDataProvider.getTotalBattles())this._uiSpineAnimatonClip[1].play();else for(let B=0;B{"use strict";U.d(B,{M:()=>V});var F=U(88022),G=U(51742),j=U(56942),$=U(28930),H=U(71802);class V extends H.D{constructor(k,B,U){super(k,"map","MAP_ACADEMY_ARCHIVES",640,280,B.concat([G.c.Sfx_academy_portal_open,j.Q.Spine_archive_door_glow_json,F._.Popup_ui_roulette_json]),U,"map-archives"),this.doorways=[{area:{x:640,y:160},exit:{x:640,y:560},walkTarget:{x:640,y:220},glowPos:{x:640,y:155},glowAnimation:"front-glow"},{area:{x:1180,y:400},exit:{x:180,y:420},walkTarget:{x:1135,y:430},glowPos:{x:1160,y:395},glowAnimation:"side-2-glow",isGlowFlipped:!0},{area:{x:640,y:640},exit:{x:640,y:280},walkTarget:{x:640,y:595},glowPos:{x:640,y:595},glowAnimation:"bottom-glow"},{area:{x:100,y:400},exit:{x:1100,y:420},walkTarget:{x:140,y:430},glowPos:{x:120,y:395},glowAnimation:"side-2-glow"}],this.counterUI=50}setup(k,B,U){super.setup(k,B,U),this.dungeonZone.goalCollected===this.dungeonZone.goalTotal&&this.guideToExit(1)}updateHUDCounter(){super.updateHUDCounter(),this.dungeonZone.goalCollected===this.dungeonZone.goalTotal&&this.guideToExit(1)}addDoorGlow(k,B){if(super.addDoorGlow(k,B),k===$.O.North){const k=this.game.add.spine(B.glowPos.x,B.glowPos.y,j.Q.Spine_archive_door_glow_json);k.setToSetupPose(),k.setAnimationByName(0,"front-light",!0),this.screen.content.addChild(k)}}}},31478:(k,B,U)=>{"use strict";U.d(B,{k:()=>$});var F=U(42448),G=U(90633),j=U(35120);function $(){var k,B,U,$,H,V;const W=j.q.instance.prodigy.gameContainer.get("61f-37d6"),[q,K,z]=[null!==(B=null===(k=W.get({type:"riftRunKey",id:F.BN.PortalOneKey}))||void 0===k?void 0:k.quantity)&&void 0!==B?B:0,null!==($=null===(U=W.get({type:"riftRunKey",id:F.BN.PortalTwoKey}))||void 0===U?void 0:U.quantity)&&void 0!==$?$:0,null!==(V=null===(H=W.get({type:"riftRunKey",id:F.BN.PortalThreeKey}))||void 0===H?void 0:H.quantity)&&void 0!==V?V:0],Y=Math.max(q,K,z)>0,Q=j.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(G.B.FEATURE_ZONE_UNLOCKED_POPUP,G.B.BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE);return Y||Q?Q?2:1:0}},97447:(k,B,U)=>{"use strict";U.d(B,{j:()=>ut});var F=U(8674),G=U(62459),j=U(99625),$=U(56942),H=U(42448),V=U(4903),W=U(90633),q=U(38170),K=U(35120),z=U(34829);const Y={PORTAL_SPINE:$.Q.Spine_rift_portal_basic_json,SHOW_TIMER:!1};var Q=U(72955),X=U(3374),Z=U(35084),J=U(29834),tt=U(23082),et=U(46784),it=U(65050),st=U(70703),nt=U(65165),at=U(95057),rt=U(53661),ot=U(80882),ht=U(84415),ct=U(30226),dt=U(4631),lt=U(83726);class ut extends lt.T{constructor(k,B){super(k,"A1","DRAGON_ISLE_MAP",ut.PLAYER_SPAWN_LOCATION_X,ut.PLAYER_SPAWN_LOCATION_Y,[],B.concat([j.l.RiftRunPortal,j.l.Overlay_difficulty_hard,j.l.Overlay_difficulty_expert])),this.portalTimeouts=[]}cleanup(){this.portalTimeouts.forEach((k=>window.clearTimeout(k))),this.portalTimeouts.length=0,super.cleanup()}setup(){var k;let B=!1;(null===(k=this.screen.screenData)||void 0===k?void 0:k[ut.SHOW_PORTAL_GUIDE_HAND])&&(B=!0),K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(W.B.FEATURE_RIFTS,W.B.BREADCRUMB_RIFTS_AFTER_FIRST_CUTSCENE_SEEN)||(B=!0),(()=>(0,F.sH)(this,void 0,void 0,(function*(){var k,U;const j=K.q.instance.prodigy.gameContainer.get("196-d3a5"),$=yield j.fetchRiftsConfig();if(!$){const k=K.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);return void K.q.instance.prodigy.open.messageBoxOkay(k.getText(ut.FAILED_DATA_LOAD_LOCALIZED_TEXT_KEY))}(null!==(k=(U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data).rifts)&&void 0!==k?k:U.rifts={}).dragonIsleNotificationLastSeenTimestampMs=Date.now();const H=yield this.getActivePortals($),V=B?[H[0]]:H,W=K.q.instance.prodigy.prefabFactory,q=V.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){var U;const F=[];F.push(this.addPortal(k)),(null===(U=$[k.id])||void 0===U?void 0:U.storeEnabled)&&!B&&F.push(W.addPrefabNPC(k.shopNpcPrefab,k.shopNpcLocation.x,k.shopNpcLocation.y));const G=(yield Promise.all(F))[0];B&&this.addGuideHand(this.game,this.screen,G.transform.worldPosition.x,G.transform.worldPosition.y-80,0,20,180)}))));yield Promise.all(q)})))().catch(G.RQr.createHandler("DragonIsleA1: Failed to set up dragon isle"))}addPortal(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=K.q.instance.prodigy.gameContainer.get("196-d3a5");let U;const F=k.spine&&Object.values($.Q).includes(k.spine)?k.spine:$.Q.Spine_rift_portal_basic_json;U=k.timeRemainingMs?{PORTAL_SPINE:F,SHOW_TIMER:!0,TIME_REMAINING_MS:k.timeRemainingMs}:{PORTAL_SPINE:F,SHOW_TIMER:!1};const G=yield ut.addPortalToScreen(this.screen,k.location.x,k.location.y,!0,U);G.name=k.id,ut.portalGameObjects[k.id]=G;const j=G.findComponentInChildren(Z.n),H=G.findComponentInChildren(nt.k);return G.findComponentInChildren(st.x).onComplete.add((()=>{H.onComplete.add(this.interactWithPortal.bind(this,B,k)),j.useHandCursor=!0,j.onClicked.add((()=>{H.run()}))})),G}))}interactWithPortal(k,B){var U;k.selectedPortalId=B.id;const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0"),j=F.player.hasMembership(),$=F.player.isPlayingAtSchool()||ct.J.isDateWithinSchoolDayAndHours(new Date(Date.now())),H=this.getVideoType(j,$);this.shouldShowMemberLockedRiftsVideo(H,j,k,F.player)?this.showVideoMenu(H,j,$,null!==(U=k.getCurrentRiftsId())&&void 0!==U?U:"",(()=>{this.zone.handleLeaving(dt.j.teleport,(()=>K.q.instance.game.state.start(tt.G.Rifts,void 0,Q.I,B.id)))})).catch(G.RQr.createHandler("Error setting up rift selection menu after showing video")):this.zone.handleLeaving(dt.j.teleport,(()=>K.q.instance.game.state.start(tt.G.Rifts,void 0,Q.I,B.id)))}static addPortalToScreen(k,B,U){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U,F=!1,G=Y){const $=yield k.addPrefabToScreen(j.l.RiftRunPortal,B,U,G),H=$.findComponentInChildren(st.x),V=$.findComponentInChildren(J.j);if(F){const k=2e3;H.startTween(1,0,void 0,k),V.OnAnimationComplete.addOnce((()=>{$.transform.setScale(1,1),V.playAnimation("idle",!0);const k=$.findComponentInChildren(ot.y);k&&k.fireBooleanSignalAgainstConstant()}))}else V.playAnimation("idle",!0);return $}))}setupTimeoutForPortalOpening(k,B,U){const F=q.r.millisecondsBetween(new Date,new Date(B));F>2*z.s.HOURS_IN_MS||this.portalTimeouts.push(window.setTimeout((()=>{U&&this.setupTimeoutForPortalClosing(k,U),this.addPortal(k).catch(G.RQr.createHandler("DragonIsleA1: Failed to open a portal after the start date has passed"))}),F))}setupTimeoutForPortalClosing(k,B){k.timeRemainingMs=B-q.r.toDateUtcMs(Date.now());q.r.millisecondsBetween(new Date,new Date(B))>2*z.s.HOURS_IN_MS||this.portalTimeouts.push(window.setTimeout((()=>{const B=ut.portalGameObjects[k.id];if(!B)return;const U=B.findComponentInChildren(G.bTj);U&&U.playAnimation()}),q.r.millisecondsBetween(new Date,new Date(B))))}getActivePortals(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=K.q.instance.prodigy.gameContainer.get("196-d3a5"),U=yield B.getActiveRiftsPortalIds();if(!G.Aq$.isDefined(U)||0===U.length)return[];const F=U.map((k=>H.R7[k]));for(const G of F){const B=k[G.id];B&&(B.spine&&(G.spine=B.spine),B.startDate||!B.endDate?B.endDate||!B.startDate?B.startDate&&B.endDate&&(q.r.isDateWithinRange(Date.now(),B.startDate,B.endDate)?this.setupTimeoutForPortalClosing(G,q.r.toDateUtcMs(B.endDate)):q.r.toDateUtcMs(Date.now()){"use strict";var F;U.d(B,{v:()=>F}),function(k){k.Q1="QUESTS_FOREST_LEVEL_UP",k.Q2="QUESTS_FOREST_FIRST_MINIBOSS_FIGHT",k.Q3="QUESTS_FOREST_SECOND_MINIBOSS_FIGHT",k.Q4="QUESTS_FOREST_FIND_FLORIAN",k.Q5="QUESTS_FOREST_TALK_TO_MERCHANT",k.Q6="QUESTS_FOREST_SAVE_FLORIAN",k.Q7="QUESTS_FOREST_COLLECT_MANDRAKE",k.Q8="QUESTS_FOREST_DEFEAT_THE_TRIO",k.Q9="QUESTS_FOREST_FIND_GERALD",k.Q10="QUESTS_FOREST_FIX_FLUTE",k.Q11="QUESTS_FOREST_COLLECT_WAND",k.Q12="QUESTS_FOREST_WAKE_GERALD"}(F||(F={}))},76711:(k,B,U)=>{"use strict";U.d(B,{c:()=>it,p:()=>F});var F,G=U(62459),j=U(99625),$=U(90633),H=U(5491),V=U(65240),W=U(35120),q=U(77938),K=U(55122),z=U(73797),Y=U(43531),Q=U(54336),X=U(40392),Z=U(22023),J=U(30226),tt=U(85182),et=U(73678);!function(k){k[k.TALK_TO_FLORIAN=0]="TALK_TO_FLORIAN",k[k.TRAVEL_TO_SHIVERCHILL=1]="TRAVEL_TO_SHIVERCHILL",k[k.TALK_TO_BOK=2]="TALK_TO_BOK"}(F||(F={}));class it extends tt.T{constructor(k,B,U){super(k,B,it.QUEST_INDEX,"Go to Shiverchill",{type:"seq",ID:1,N:3},["forest-B6","shiverchill-A10"],[],[],[],U,!1,"QUESTS_FOREST_GO_TO_SHIVERCHIL"),this._isDialogueShowing=!1}setup(k,B,U){return super.setup(k,B,U),W.q.instance.prodigy.world.getCurrentZone()===et.A_.SHIVERCHILL?(this.unlockShiverchill(),this.showBokDialogue(),{enableAreaEvents:!1}):(this.zone.isSequenceComplete(it.QUEST_INDEX,F.TALK_TO_FLORIAN)&&this.unlockShiverchill(),U.getTag()===it.DIALOGUE_MAP_TAG?(W.q.instance.prodigy.prefabFactory.addPrefabNPC(j.l.FloraNPC,800,330,!0).catch(G.RQr.createHandler(`Unable to load the NPC Prefab: ${j.l.FloraNPC}`)),W.q.instance.prodigy.prefabFactory.addPrefabNPC(j.l.FlorianNPCLegacyMaps,700,320).catch(G.RQr.createHandler(`Unable to load the NPC Prefab: ${j.l.FlorianNPCLegacyMaps}`)),{enableMonsters:!1,enableAreaEvents:!1}):{enableMonsters:!1})}process(k,B,U){this.screen=B,this._playerData=W.q.instance.prodigy.gameContainer.get("e20-0fb0"),U.tag===it.DIALOGUE_MAP_TAG&&(this.zone.isOnSequence(it.QUEST_INDEX,F.TALK_TO_FLORIAN)?this.showFlorianDialogue():this.zone.isOnSequence(it.QUEST_INDEX,F.TRAVEL_TO_SHIVERCHILL)&&B.menuBarCreationPromise.then((()=>this.highlightWorldMap())).catch(G.RQr.createHandler("The menu bar could not be loaded"))),W.q.instance.prodigy.world.getCurrentZone()===et.A_.SHIVERCHILL&&this._playerData.player.playerContainer.setPath([{x:326,y:650}],(()=>this._playerData.player.playerContainer.setPath([{x:426,y:500}])))}unlockShiverchill(){X.i.BUTTONS_CONFIG.map((k=>k.nameKey)).filter((k=>!it.ENABLED_ZONE_IDS.includes(k)));W.q.instance.prodigy.gameContainer.get("12f-4e29").completeBreadcrumb($.B.FEATURE_FIREFLY_QUEST_REVISIONS,$.B.BREADCRUMB_SHIVERCHILL_UNLOCKED)}showFlorianDialogue(){if(this._isDialogueShowing)return;const k=W.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),B=new Y.rD(W.q.instance.prodigy.game),U=[1395,1396].map((k=>({dialogueData:B.dataProvider.get(k),blockInput:!0})));U[U.length-1].nextButtonText=k.getText("BUTTON_LETS_GO"),B.addEvents(U),B.start(!0,(()=>{this.zone.completeSequence(it.QUEST_INDEX,F.TALK_TO_FLORIAN),this.unlockShiverchill(),this.highlightWorldMap()})),this._isDialogueShowing=!0}highlightWorldMap(){W.q.instance.game.broadcaster.broadcast(z.Y1.HighlightMapButton,z.HG.HUD),X.i.setNextVisitParameters({disableClose:!0,disableZoneGoals:!0,disableDifficultyModeSelect:!0})}showBokDialogue(){let k;W.q.instance.prodigy.prefabFactory.addMonster(this.map,520,410,0,{encounter:[{ID:it.PET_AWARD_ID}],showNewIndicator:!1}).then((B=>{k=B,B.findComponentInChildren(Q.s).Active=!1})).catch(G.RQr.createHandler("Could not catch monster"));const B=W.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),U=new Y.rD(W.q.instance.prodigy.game),F=[1397,1398,1399].map((k=>({dialogueData:U.dataProvider.get(k),blockInput:!0})));F[F.length-1].nextButtonText=B.getText("BUTTON_GET_GIFT"),U.addEvents(F),U.start(!0,(()=>{k&&(k.active=!1),this.awardPet()}))}awardPet(){const k=it.PET_AWARD_ID,B=this._playerData.getLevel(),U=q.t.getItem("pet",k),F={type:"pet",ID:k,N:1,data:{level:B,stars:K.s.xpRequiredForLevel(B,H.V.Pet)}},G={ID:k,name:U.name,level:B};W.q.instance.prodigy.open.prefabMenu(j.l.PetRescueCardSequence,(()=>{J.J.bagItem(F,W.q.instance.game,"got-pet",void 0,{source_type:V.C.QuestReward}),this.autoEquipPet(k),this.zone.completeQuest(it.QUEST_INDEX),this.screen.process()}),void 0,void 0,void 0,{PET_RESCUE_CREATURE_DATA:G,PET_RESCUE_BUTTON_TEXT_KEY:"EPIC_VIEWER_ADD_TO_TEAM",PET_RESCUE_STAMP_ENABLED:!1})}autoEquipPet(k){const B=this._playerData.player.kennel.getPetTeamIDs();if(!B.includes(k)){const U=Z.P8.isPetEvolvedStarter(B[1])?1:2,F=this._playerData.player.kennel.getPetByID(k);this._playerData.player.kennel.removeAtTeamPosition(U),this._playerData.player.kennel.setTeamPosition(F,U)}}}it.DIALOGUE_MAP_TAG="B6",it.QUEST_INDEX=5,it.PET_AWARD_ID=79,it.ENABLED_ZONE_IDS=["WORLD_FIREFLY_FOREST","WORLD_SHIVERCHILL_MOUNTAINS"]},46318:(k,B,U)=>{"use strict";U.d(B,{Q:()=>dt});var F=U(8674),G=U(62459),j=U(95891),$=U(68910),H=U(88022),V=U(62886),W=U(60157),q=U(17446),K=U(65240),z=U(35120),Y=U(34829),Q=U(43846),X=U(77938),Z=U(73797),J=U(43531),tt=U(23283),et=U(64353),it=U(95057),st=U(21097),nt=U(95130),at=U(17425),rt=U(76945),ot=U(30226),ht=U(47255),ct=U(71586);class dt extends nt.D{constructor(k,B,U,F,j,$=-55,V,W=!1){if(super(k,B),this.soundTimeoutInterval=null,this.onClose=null,this.numSpins=0,this.player=U,this.screen=F,this.assetID=j,this.data=X.t.getItem("prizeWheel",j).data,this.onClose=V,G.Aq$.isDefined(this.screen)&&(this.wasVisible=G.Aq$.isDefined(this.screen.questProgress)&&this.screen.questProgress.visible,this.wasVisible&&(this.screen.questProgress.visible=!1)),this.wheelItems=dt.getWheelItems(this.game,this.assetID),!W){const k=z.q.instance.prodigy.create.sprite(0,0,H._.General_core_json,"overlay-small");k.width=this.game.world.width,k.height=this.game.world.height,k.alpha=.5,this.add(k),k.inputEnabled=!0}this.drawWheel($).catch(G.RQr.createHandler("Wheel: Failed to draw the wheel"))}drawWheel(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=.5*this.game.world.width,U=.5*this.game.world.height+k;let F=null;F="singleImage"===this.data.atlas?this.add(z.q.instance.prodigy.create.sprite(B+this.data.wheelTopOffset.x,U+this.data.wheelTopOffset.y,`singleImage-${this.data.wheelTop}`)):this.add(z.q.instance.prodigy.create.sprite(B+this.data.wheelTopOffset.x,U+this.data.wheelTopOffset.y,this.data.atlas,this.data.wheelTop)),F.anchor.set(.5,.5);const j=360/this.wheelItems.length;this.wheel=z.q.instance.prodigy.create.element(this,B,U),this.wheel.angle=j/2;const H=this.wheel.angle;let V=null;"singleImage"===this.data.atlas?(V=this.wheel.add(z.q.instance.prodigy.create.sprite(0,0,`singleImage-${this.data.wheelSprite}`)),at.K.cacheAsset(this.game,`singleImage-${this.data.wheelSprite}`,at.K.zoneAssetsCached)):(V=this.wheel.add(z.q.instance.prodigy.create.sprite(0,0,this.data.atlas,this.data.wheelSprite)),V.scale.set(1,1)),V.anchor.set(.5,.5);for(let k=0;k0&&(k={conversionFunnelName:ht.o.FunnelSecondWheelSpin}),this.player.canSpin(this.assetID)?(this.showSpinningDialogue(),this.startSpin()):this.checkTickets(this.assetID)?this.consumeTicket(this.assetID):this.showOutOfSpinsDialogue(k)}close(){this.wasVisible&&(this.screen.questProgress.visible=!0),z.q.instance.game.broadcaster.broadcast(Z.Y1.ShowHUD,Z.HG.HUD),G.Aq$.isDefined(this.onClose)&&this.onClose(),this.destroy()}startSpin(){var k,B,U;let F=Y.s.get("GameConstants.Features.Wheel.SPIN_TIME");const j=G.Aq$.isDefined(this.selectedIndex)?this.selectedIndex:0;this.selectedIndex=this.wheelItems.indexOf(rt.o.weightedArrayElement(this.wheelItems));const $=this.wheelItems[this.selectedIndex].item,H=z.q.instance.prodigy.gameContainer.get("e20-0fb0").player;G.Aq$.isDefined(this.data.maxedItemPrizeSubstitute)&&H.hasMaxQuantityOfItem($.type,$.ID)&&(this.selectedIndex=this.data.maxedItemPrizeSubstitute),this.playSound(F,100);const V=360/this.wheelItems.length,W=this.wheel.angle+2880+(this.selectedIndex-j)*-V;this.game.add.tween(this.wheel,this).to({angle:W},F,G.GS3.Cubic.Out).start().onTweenComplete.addOnce(this.endSpin,this),this.player.spinWheel(this.assetID),this.sendSpinWheelQuestEvent();const q=z.q.instance.prodigy.gameContainer.get("c47-20b6"),K=z.q.instance.prodigy.gameContainer.get("12b-405a");if(K.getActiveFestival()){const F=z.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily,G=F.getFestivalInstanceName(),j=F.festivalType;this.wheelName=null===(B=null===(k=K.getFestivalConfig())||void 0===k?void 0:k.festivalPrizeWheels.find((k=>k.wheelId===this.assetID)))||void 0===B?void 0:B.name,q.festival.sendFestivalPrizeWheelSpunEvent(null!==(U=this.wheelName)&&void 0!==U?U:this.assetID.toString(),this.assetID,G,j,this.numSpins>0)}else q.economy.sendPrizeWheelSpunEvent(this.assetID===dt.DAYTIME_WHEEL?tt.U.WheelOfWonder:tt.U.TwilightWheel)}playSound(k,B){if(k<=0)return;z.q.instance.prodigy.audio.playSFX(19,"tick");const U=B+9e-7*Math.pow(B,3);this.soundTimeoutInterval=window.setTimeout(this.playSound.bind(this,k-U,U),B)}endSpin(){this.numSpins++,this.closeSpinDialogue(),this.openPrizesDialogue([this.wheelItems[this.selectedIndex].item],this.data.eventType)}tryAgain(){const k={yes:this.trySpin.bind(this),no:this.close.bind(this),text:z.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(this.checkTickets(this.assetID)&&!this.player.canSpin(this.assetID)?this.data.ticketDialogue:this.data.spinAgainDialogue),anim:4};this.showDialogue([k])}destroy(k={children:!0}){this.player=null,super.destroy(k),null!==this.soundTimeoutInterval&&(clearTimeout(this.soundTimeoutInterval),this.soundTimeoutInterval=null)}showSpinningDialogue(){const k={text:z.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(this.data.spinningDialogue),anim:4,hideNext:!0};this.showDialogue([k])}closeSpinDialogue(){this.dialogueController.close()}showOutOfSpinsDialogue(k){const B=z.q.instance.prodigy.gameContainer,U=B.get("c47-20b6"),F=[];F.push({text:B.get(G.$Bt.LocalizationService).getText(this.data.outOfSpinsDialogue),anim:1});const j=B.get("e20-0fb0").player;if(!this.player.hasMembership()&&!ot.J.shouldSuppressAd(j)){F.push({callback:z.q.instance.prodigy.open.membershipInfo.bind(z.q.instance.prodigy.open,null,k)});const U=et.P.shouldUseUnifiedConversionFlow(ht.o.FunnelSecondWheelSpin)?it.R.UnifiedConversionFlow:ot.J.showYouTubeMembershipAd(this.game,!0)?it.R.Video:it.R.Static;B.get("c47-20b6").purchase.sendFunnelStart(Object.assign(Object.assign({},this.getSegmentPurchaseFunnelTriggerTypeAndCategory()),{contentId:`prizeWheel-${this.assetID}`,adType:U,adVersion:et.P.getAdVersion(ht.o.FunnelSecondWheelSpin)}))}F.push({callback:this.close.bind(this)}),U.economy.sendPrizeWheelSpinFailedEvent(this.assetID===dt.DAYTIME_WHEEL?tt.U.WheelOfWonder:tt.U.TwilightWheel,this.player.hasMembership()?st.WE.OutsideOfHours:st.WE.MemberLocked),this.showDialogue(F)}getSegmentPurchaseFunnelTriggerTypeAndCategory(){return{type:"Second-Daily-Wheel-Spin",category:"Daily"}}openPrizesDialogue(k,B){const U=z.q.instance.prodigy.open.gotItem(k,this.tryAgain.bind(this),null,B,null,null,{source_type:K.C.PrizeWheel});U.setParent(this),U.dialogue.setParent(U)}checkTickets(k){if(1===k){return z.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("item",130)>0}return!1}consumeTicket(k){1===k&&this.player.backpack.consume("item",130,1);const B={text:z.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(this.data.spinningDialogue),anim:4,hideNext:!0};this.showDialogue([B]),this.startSpin()}sendSpinWheelQuestEvent(){const k=z.q.instance.prodigy.gameContainer.get("a25-68f4"),B={params:{taskEventType:W.Z7.Item,rarity:q.E.Common,itemType:"prizeWheel",source:K.C.PrizeWheel,id:this.assetID}};k.sendQuestEventViaHub(V.T.SPIN_WHEEL,B).catch(G.RQr.createHandler("Error sending a quest event for spinning a wheel"))}generateFestivalWheelCountdownText(k){const B=z.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily,U=k.getFestivalConfig(),F=k.getActiveFestival();let j=0;if(U&&F&&B.currentWheelEndDate){const k=z.q.instance.prodigy.gameContainer.get("a03-308f");let U=new Date(B.currentWheelEndDate);const G=new Date(F.endDate);U>G&&(U=G),j=Math.floor((U.getTime()-k.getServerTimeMs())/864e5),0===j&&(j=1)}const H=new $.TextStyle({fontFamily:G.dBt.PaytoneOne,fontSize:32,fill:16777215,fontWeight:"bold",stroke:3552822,strokeThickness:4,align:"center"});return new $.Text((0,Q.k)("WHEEL_TIME_REMAINING",j,1===j?"":"s"),H)}}dt.DEBUG_SPIN_TIME_MS=-1,dt.DAYTIME_WHEEL=1},8674:(k,B,U)=>{"use strict";U.d(B,{Cg:()=>G,Qj:()=>j,Sn:()=>$,Tt:()=>F,sH:()=>H});function F(k,B){var U={};for(var F in k)Object.prototype.hasOwnProperty.call(k,F)&&B.indexOf(F)<0&&(U[F]=k[F]);if(null!=k&&"function"==typeof Object.getOwnPropertySymbols){var G=0;for(F=Object.getOwnPropertySymbols(k);G=0;H--)(G=k[H])&&($=(j<3?G($):j>3?G(B,U,$):G(B,U))||$);return j>3&&$&&Object.defineProperty(B,U,$),$}function j(k,B){return function(U,F){B(U,F,k)}}function $(k,B){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,B)}function H(k,B,U,F){return new(U||(U=Promise))((function(G,j){function $(k){try{V(F.next(k))}catch(e){j(e)}}function H(k){try{V(F.throw(k))}catch(e){j(e)}}function V(k){var B;k.done?G(k.value):(B=k.value,B instanceof U?B:new U((function(k){k(B)}))).then($,H)}V((F=F.apply(k,B||[])).next())}))}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError},20748:(k,B)=>{"use strict";function U(k,B,U,F){var G={timer:void 0,lastArgs:[]},j=function(){for(var F=this,j=[],$=0;$1&&"object"==typeof k[1]&&void 0!==k[1].leading&&(G=k[1]),G&&(F=G.leading),function(){for(var k=[],B=0;B{"use strict"},88835:(k,B,U)=>{"use strict";var F=U(9655);function G(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var j=/^([a-z0-9.+-]+:)/i,$=/:[0-9]*$/,H=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,V=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),W=["'"].concat(V),q=["%","/","?",";","#"].concat(W),K=["/","?","#"],z=/^[+a-z0-9A-Z_-]{0,63}$/,Y=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Q={javascript:!0,"javascript:":!0},X={javascript:!0,"javascript:":!0},Z={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},J=U(55373);function tt(k,B,U){if(k&&"object"==typeof k&&k instanceof G)return k;var F=new G;return F.parse(k,B,U),F}G.prototype.parse=function(k,B,U){if("string"!=typeof k)throw new TypeError("Parameter 'url' must be a string, not "+typeof k);var G=k.indexOf("?"),$=-1!==G&&G127?bt+="x":bt+=ft[pt];if(!bt.match(z)){var gt=lt.slice(0,ht),mt=lt.slice(ht+1),yt=ft.match(Y);yt&&(gt.push(yt[1]),mt.unshift(yt[2])),mt.length&&(tt="/"+mt.join(".")+tt),this.hostname=gt.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),dt||(this.hostname=F.toASCII(this.hostname));var _t=this.port?":"+this.port:"",Et=this.hostname||"";this.host=Et+_t,this.href+=this.host,dt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==tt[0]&&(tt="/"+tt))}if(!Q[st])for(ht=0,ut=W.length;ht0)&&U.host.split("@"))&&(U.auth=dt.shift(),U.hostname=dt.shift(),U.host=U.hostname);return U.search=k.search,U.query=k.query,null===U.pathname&&null===U.search||(U.path=(U.pathname?U.pathname:"")+(U.search?U.search:"")),U.href=U.format(),U}if(!nt.length)return U.pathname=null,U.search?U.path="/"+U.search:U.path=null,U.href=U.format(),U;for(var rt=nt.slice(-1)[0],ot=(U.host||k.host||nt.length>1)&&("."===rt||".."===rt)||""===rt,ht=0,ct=nt.length;ct>=0;ct--)"."===(rt=nt[ct])?nt.splice(ct,1):".."===rt?(nt.splice(ct,1),ht++):ht&&(nt.splice(ct,1),ht--);if(!it&&!st)for(;ht--;ht)nt.unshift("..");!it||""===nt[0]||nt[0]&&"/"===nt[0].charAt(0)||nt.unshift(""),ot&&"/"!==nt.join("/").substr(-1)&&nt.push("");var dt,lt=""===nt[0]||nt[0]&&"/"===nt[0].charAt(0);at&&(U.hostname=lt?"":nt.length?nt.shift():"",U.host=U.hostname,(dt=!!(U.host&&U.host.indexOf("@")>0)&&U.host.split("@"))&&(U.auth=dt.shift(),U.hostname=dt.shift(),U.host=U.hostname));return(it=it||U.host&&nt.length)&&!lt&&nt.unshift(""),nt.length>0?U.pathname=nt.join("/"):(U.pathname=null,U.path=null),null===U.pathname&&null===U.search||(U.path=(U.pathname?U.pathname:"")+(U.search?U.search:"")),U.auth=k.auth||U.auth,U.slashes=U.slashes||k.slashes,U.href=U.format(),U},G.prototype.parseHost=function(){var k=this.host,B=$.exec(k);B&&(":"!==(B=B[0])&&(this.port=B.substr(1)),k=k.substr(0,k.length-B.length)),k&&(this.hostname=k)},B.qg=tt,B.hd=function(k,B){return tt(k,!1,!0).resolve(B)},B.GP=function(k){return"string"==typeof k&&(k=tt(k)),k instanceof G?k.format():G.prototype.format.call(k)}},81135:k=>{k.exports=function(k){return k&&"object"==typeof k&&"function"==typeof k.copy&&"function"==typeof k.fill&&"function"==typeof k.readUInt8}},49032:(k,B,U)=>{"use strict";var F=U(47244),G=U(48184),j=U(25767),$=U(35680);function H(k){return k.call.bind(k)}var V="undefined"!=typeof BigInt,W="undefined"!=typeof Symbol,q=H(Object.prototype.toString),K=H(Number.prototype.valueOf),z=H(String.prototype.valueOf),Y=H(Boolean.prototype.valueOf);if(V)var Q=H(BigInt.prototype.valueOf);if(W)var X=H(Symbol.prototype.valueOf);function Z(k,B){if("object"!=typeof k)return!1;try{return B(k),!0}catch(e){return!1}}function J(k){return"[object Map]"===q(k)}function tt(k){return"[object Set]"===q(k)}function et(k){return"[object WeakMap]"===q(k)}function it(k){return"[object WeakSet]"===q(k)}function st(k){return"[object ArrayBuffer]"===q(k)}function nt(k){return"undefined"!=typeof ArrayBuffer&&(st.working?st(k):k instanceof ArrayBuffer)}function at(k){return"[object DataView]"===q(k)}function rt(k){return"undefined"!=typeof DataView&&(at.working?at(k):k instanceof DataView)}B.isArgumentsObject=F,B.isGeneratorFunction=G,B.isTypedArray=$,B.isPromise=function(k){return"undefined"!=typeof Promise&&k instanceof Promise||null!==k&&"object"==typeof k&&"function"==typeof k.then&&"function"==typeof k.catch},B.isArrayBufferView=function(k){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(k):$(k)||rt(k)},B.isUint8Array=function(k){return"Uint8Array"===j(k)},B.isUint8ClampedArray=function(k){return"Uint8ClampedArray"===j(k)},B.isUint16Array=function(k){return"Uint16Array"===j(k)},B.isUint32Array=function(k){return"Uint32Array"===j(k)},B.isInt8Array=function(k){return"Int8Array"===j(k)},B.isInt16Array=function(k){return"Int16Array"===j(k)},B.isInt32Array=function(k){return"Int32Array"===j(k)},B.isFloat32Array=function(k){return"Float32Array"===j(k)},B.isFloat64Array=function(k){return"Float64Array"===j(k)},B.isBigInt64Array=function(k){return"BigInt64Array"===j(k)},B.isBigUint64Array=function(k){return"BigUint64Array"===j(k)},J.working="undefined"!=typeof Map&&J(new Map),B.isMap=function(k){return"undefined"!=typeof Map&&(J.working?J(k):k instanceof Map)},tt.working="undefined"!=typeof Set&&tt(new Set),B.isSet=function(k){return"undefined"!=typeof Set&&(tt.working?tt(k):k instanceof Set)},et.working="undefined"!=typeof WeakMap&&et(new WeakMap),B.isWeakMap=function(k){return"undefined"!=typeof WeakMap&&(et.working?et(k):k instanceof WeakMap)},it.working="undefined"!=typeof WeakSet&&it(new WeakSet),B.isWeakSet=function(k){return it(k)},st.working="undefined"!=typeof ArrayBuffer&&st(new ArrayBuffer),B.isArrayBuffer=nt,at.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&at(new DataView(new ArrayBuffer(1),0,1)),B.isDataView=rt;var ot="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function ht(k){return"[object SharedArrayBuffer]"===q(k)}function ct(k){return void 0!==ot&&(void 0===ht.working&&(ht.working=ht(new ot)),ht.working?ht(k):k instanceof ot)}function dt(k){return Z(k,K)}function lt(k){return Z(k,z)}function ut(k){return Z(k,Y)}function ft(k){return V&&Z(k,Q)}function bt(k){return W&&Z(k,X)}B.isSharedArrayBuffer=ct,B.isAsyncFunction=function(k){return"[object AsyncFunction]"===q(k)},B.isMapIterator=function(k){return"[object Map Iterator]"===q(k)},B.isSetIterator=function(k){return"[object Set Iterator]"===q(k)},B.isGeneratorObject=function(k){return"[object Generator]"===q(k)},B.isWebAssemblyCompiledModule=function(k){return"[object WebAssembly.Module]"===q(k)},B.isNumberObject=dt,B.isStringObject=lt,B.isBooleanObject=ut,B.isBigIntObject=ft,B.isSymbolObject=bt,B.isBoxedPrimitive=function(k){return dt(k)||lt(k)||ut(k)||ft(k)||bt(k)},B.isAnyArrayBuffer=function(k){return"undefined"!=typeof Uint8Array&&(nt(k)||ct(k))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(k){Object.defineProperty(B,k,{enumerable:!1,value:function(){throw new Error(k+" is not supported in userland")}})}))},40537:(k,B,U)=>{var F=Object.getOwnPropertyDescriptors||function(k){for(var B=Object.keys(k),U={},F=0;F=j)return k;switch(k){case"%s":return String(F[U++]);case"%d":return Number(F[U++]);case"%j":try{return JSON.stringify(F[U++])}catch(B){return"[Circular]"}default:return k}})),H=F[U];U=3&&(F.depth=arguments[2]),arguments.length>=4&&(F.colors=arguments[3]),X(U)?F.showHidden=U:U&&B._extend(F,U),et(F.showHidden)&&(F.showHidden=!1),et(F.depth)&&(F.depth=2),et(F.colors)&&(F.colors=!1),et(F.customInspect)&&(F.customInspect=!0),F.colors&&(F.stylize=W),K(F,k,F.depth)}function W(k,B){var U=V.styles[B];return U?"["+V.colors[U][0]+"m"+k+"["+V.colors[U][1]+"m":k}function q(k,B){return k}function K(k,U,F){if(k.customInspect&&U&&rt(U.inspect)&&U.inspect!==B.inspect&&(!U.constructor||U.constructor.prototype!==U)){var G=U.inspect(F,k);return tt(G)||(G=K(k,G,F)),G}var j=function(k,B){if(et(B))return k.stylize("undefined","undefined");if(tt(B)){var U="'"+JSON.stringify(B).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return k.stylize(U,"string")}if(J(B))return k.stylize(""+B,"number");if(X(B))return k.stylize(""+B,"boolean");if(Z(B))return k.stylize("null","null")}(k,U);if(j)return j;var $=Object.keys(U),H=function(k){var B={};return k.forEach((function(k,U){B[k]=!0})),B}($);if(k.showHidden&&($=Object.getOwnPropertyNames(U)),at(U)&&($.indexOf("message")>=0||$.indexOf("description")>=0))return z(U);if(0===$.length){if(rt(U)){var V=U.name?": "+U.name:"";return k.stylize("[Function"+V+"]","special")}if(it(U))return k.stylize(RegExp.prototype.toString.call(U),"regexp");if(nt(U))return k.stylize(Date.prototype.toString.call(U),"date");if(at(U))return z(U)}var W,q="",st=!1,ot=["{","}"];(Q(U)&&(st=!0,ot=["[","]"]),rt(U))&&(q=" [Function"+(U.name?": "+U.name:"")+"]");return it(U)&&(q=" "+RegExp.prototype.toString.call(U)),nt(U)&&(q=" "+Date.prototype.toUTCString.call(U)),at(U)&&(q=" "+z(U)),0!==$.length||st&&0!=U.length?F<0?it(U)?k.stylize(RegExp.prototype.toString.call(U),"regexp"):k.stylize("[Object]","special"):(k.seen.push(U),W=st?function(k,B,U,F,G){for(var j=[],$=0,H=B.length;$=0&&0,k+B.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return U[0]+(""===B?"":B+"\n ")+" "+k.join(",\n ")+" "+U[1];return U[0]+B+" "+k.join(", ")+" "+U[1]}(W,q,ot)):ot[0]+q+ot[1]}function z(k){return"["+Error.prototype.toString.call(k)+"]"}function Y(k,B,U,F,G,j){var $,H,V;if((V=Object.getOwnPropertyDescriptor(B,G)||{value:B[G]}).get?H=V.set?k.stylize("[Getter/Setter]","special"):k.stylize("[Getter]","special"):V.set&&(H=k.stylize("[Setter]","special")),lt(F,G)||($="["+G+"]"),H||(k.seen.indexOf(V.value)<0?(H=Z(U)?K(k,V.value,null):K(k,V.value,U-1)).indexOf("\n")>-1&&(H=j?H.split("\n").map((function(k){return" "+k})).join("\n").slice(2):"\n"+H.split("\n").map((function(k){return" "+k})).join("\n")):H=k.stylize("[Circular]","special")),et($)){if(j&&G.match(/^\d+$/))return H;($=JSON.stringify(""+G)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?($=$.slice(1,-1),$=k.stylize($,"name")):($=$.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),$=k.stylize($,"string"))}return $+": "+H}function Q(k){return Array.isArray(k)}function X(k){return"boolean"==typeof k}function Z(k){return null===k}function J(k){return"number"==typeof k}function tt(k){return"string"==typeof k}function et(k){return void 0===k}function it(k){return st(k)&&"[object RegExp]"===ot(k)}function st(k){return"object"==typeof k&&null!==k}function nt(k){return st(k)&&"[object Date]"===ot(k)}function at(k){return st(k)&&("[object Error]"===ot(k)||k instanceof Error)}function rt(k){return"function"==typeof k}function ot(k){return Object.prototype.toString.call(k)}function ht(k){return k<10?"0"+k.toString(10):k.toString(10)}B.debuglog=function(k){if(k=k.toUpperCase(),!j[k])if($.test(k)){var U=process.pid;j[k]=function(){var F=B.format.apply(B,arguments);console.error("%s %d: %s",k,U,F)}}else j[k]=function(){};return j[k]},B.inspect=V,V.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},V.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},B.types=U(49032),B.isArray=Q,B.isBoolean=X,B.isNull=Z,B.isNullOrUndefined=function(k){return null==k},B.isNumber=J,B.isString=tt,B.isSymbol=function(k){return"symbol"==typeof k},B.isUndefined=et,B.isRegExp=it,B.types.isRegExp=it,B.isObject=st,B.isDate=nt,B.types.isDate=nt,B.isError=at,B.types.isNativeError=at,B.isFunction=rt,B.isPrimitive=function(k){return null===k||"boolean"==typeof k||"number"==typeof k||"string"==typeof k||"symbol"==typeof k||void 0===k},B.isBuffer=U(81135);var ct=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function dt(){var k=new Date,B=[ht(k.getHours()),ht(k.getMinutes()),ht(k.getSeconds())].join(":");return[k.getDate(),ct[k.getMonth()],B].join(" ")}function lt(k,B){return Object.prototype.hasOwnProperty.call(k,B)}B.log=function(){console.log("%s - %s",dt(),B.format.apply(B,arguments))},B.inherits=U(56698),B._extend=function(k,B){if(!B||!st(B))return k;for(var U=Object.keys(B),F=U.length;F--;)k[U[F]]=B[U[F]];return k};var ut="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function ft(k,B){if(!k){var U=new Error("Promise was rejected with a falsy value");U.reason=k,k=U}return B(k)}B.promisify=function(k){if("function"!=typeof k)throw new TypeError('The "original" argument must be of type Function');if(ut&&k[ut]){var B;if("function"!=typeof(B=k[ut]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(B,ut,{value:B,enumerable:!1,writable:!1,configurable:!0}),B}function B(){for(var B,U,F=new Promise((function(k,F){B=k,U=F})),G=[],j=0;j{"use strict";var F=U(82682),G=U(39209),j=U(10487),$=U(36556),H=U(75795),V=U(93628),W=$("Object.prototype.toString"),q=U(49092)(),K="undefined"==typeof globalThis?U.g:globalThis,z=G(),Y=$("String.prototype.slice"),Q=$("Array.prototype.indexOf",!0)||function(k,B){for(var U=0;U-1?B:"Object"===B&&function(k){var B=!1;return F(X,(function(U,F){if(!B)try{U(k),B=Y(F,1)}catch(e){}})),B}(k)}return H?function(k){var B=!1;return F(X,(function(U,F){if(!B)try{"$"+U(k)===F&&(B=Y(F,1))}catch(e){}})),B}(k):null}},55904:k=>{class B{constructor(k,B,U,F){this.id=B,this._backpressure=0,this.currentNode=U,this.timeout=F,this.isAlive=!0,this.stream=k,this.stream.setConsumer(this.id,this)}getStats(){let k={id:this.id,backpressure:this._backpressure};return null!=this.timeout&&(k.timeout=this.timeout),k}_resetBackpressure(){this._backpressure=0}applyBackpressure(k){this._backpressure++}releaseBackpressure(k){this._backpressure--}getBackpressure(){return this._backpressure}clearActiveTimeout(){clearTimeout(this._timeoutId),delete this._timeoutId}write(k){void 0!==this._timeoutId&&this.clearActiveTimeout(k),this.applyBackpressure(k),this._resolve&&(this._resolve(),delete this._resolve)}kill(k){this._killPacket={value:k,done:!0},void 0!==this._timeoutId&&this.clearActiveTimeout(this._killPacket),this._destroy(),this._resolve&&(this._resolve(),delete this._resolve)}_destroy(){this.isAlive=!1,this._resetBackpressure(),this.stream.removeConsumer(this.id)}async _waitForNextItem(k){return new Promise(((B,U)=>{let F;if(this._resolve=B,void 0!==k){let B=new Error("Stream consumer iteration timed out");(async()=>{let G=function(k){let B,U=new Promise((U=>{B=setTimeout(U,k)}));return{timeoutId:B,promise:U}}(k);F=G.timeoutId,await G.promise,B.name="TimeoutError",delete this._resolve,U(B)})()}this._timeoutId=F}))}async next(){for(this.stream.setConsumer(this.id,this);;){if(!this.currentNode.next)try{await this._waitForNextItem(this.timeout)}catch(k){throw this._destroy(),k}if(this._killPacket){this._destroy();let k=this._killPacket;return delete this._killPacket,k}if(this.currentNode=this.currentNode.next,this.releaseBackpressure(this.currentNode.data),!this.currentNode.consumerId||this.currentNode.consumerId===this.id)return this.currentNode.data.done&&this._destroy(),this.currentNode.data}}return(){return delete this.currentNode,this._destroy(),{}}[Symbol.asyncIterator](){return this}}k.exports=B},44658:(k,B,U)=>{const F=U(52960),G=U(55904);k.exports=class extends F{constructor(k){super(),k=k||{},this._nextConsumerId=1,this.generateConsumerId=k.generateConsumerId,this.generateConsumerId||(this.generateConsumerId=()=>this._nextConsumerId++),this.removeConsumerCallback=k.removeConsumerCallback,this._consumers=new Map,this.tailNode={next:null,data:{value:void 0,done:!1}}}_write(k,B,U){let F={data:{value:k,done:B},next:null};U&&(F.consumerId=U),this.tailNode.next=F,this.tailNode=F;for(let G of this._consumers.values())G.write(F.data)}write(k){this._write(k,!1)}close(k){this._write(k,!0)}writeToConsumer(k,B){this._write(B,!1,k)}closeConsumer(k,B){this._write(B,!0,k)}kill(k){for(let B of this._consumers.keys())this.killConsumer(B,k)}killConsumer(k,B){let U=this._consumers.get(k);U&&U.kill(B)}getBackpressure(){let k=0;for(let B of this._consumers.values()){let U=B.getBackpressure();U>k&&(k=U)}return k}getConsumerBackpressure(k){let B=this._consumers.get(k);return B?B.getBackpressure():0}hasConsumer(k){return this._consumers.has(k)}setConsumer(k,B){this._consumers.set(k,B),B.currentNode||(B.currentNode=this.tailNode)}removeConsumer(k){let B=this._consumers.delete(k);return this.removeConsumerCallback&&this.removeConsumerCallback(k),B}getConsumerStats(k){let B=this._consumers.get(k);if(B)return B.getStats()}getConsumerStatsList(){let k=[];for(let B of this._consumers.values())k.push(B.getStats());return k}createConsumer(k){return new G(this,this.generateConsumerId(),this.tailNode,k)}getConsumerList(){return[...this._consumers.values()]}getConsumerCount(){return this._consumers.size}}},52960:k=>{class B{async next(k){let B=this.createConsumer(k),U=await B.next();return B.return(),U}async once(k){let B=await this.next(k);if(B.done){if(null!=k){let k=new Error("Stream consumer operation timed out early because stream ended");throw k.name="TimeoutError",k}await new Promise((()=>{}))}return B.value}createConsumer(){throw new TypeError("Method must be overriden by subclass")}[Symbol.asyncIterator](){return this.createConsumer()}}k.exports=B},87490:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);U(33482),F.__exportStar(U(79687),B),F.__exportStar(U(47547),B)},2771:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BattleAction=void 0;var U=function(){};B.BattleAction=U},61582:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.CastSpellAction=void 0;var F=U(17498),G=U(95891),j=U(15907),$=U(51648),H=U(36700),V=U(44503),W=U(82825),q=U(49042),K=U(12634),z=U(88250),Y=U(66020),Q=U(58690),X=U(89647),Z=U(1191),J=function(k){function B(B,U,F){var G=k.call(this)||this;return G.countsAsPlayedTurn=!0,G._container=B,G._stateUpdateManager=B.get($.StateUpdateManager),G._spellCastUtil=B.get(K.SpellCastUtil),G._affixStateDataProvider=B.get(H.AffixStateDataProvider),G._statusEffectStateDataProvider=B.get(W.StatusEffectStateDataProvider),G._spell=U,G._targets=F,G}return F.__extends(B,k),B.prototype.run=function(){var k,B,U,$,H,W,K,J,tt,et=this,it={type:Q.EBattleStateUpdate.CastSpell,id:this._spell.id,targets:[]};if(this._spell instanceof X.UnitSpell){if(this._spell.isLocked)throw new j.BattleError("Cannot cast a locked spell. Spell ID - ".concat(this._spell.id));if(0!==this._spell.currentCooldown)throw new j.BattleError("Cannot cast a spell on cooldown. Spell ID: ".concat(this._spell.id));var st=this._spell.energyCost;if(tt=this._spell.unit,st>0){if(tt.mp0?++this._spell.currentCooldown:-1===this._spell.currentCooldown&&this._stateUpdateManager.addToBack({type:Q.EBattleStateUpdate.ModifySpellCooldown,unitId:tt.id,spellId:this._spell.id,cooldown:this._spell.currentCooldown})}var nt={caster:tt,targets:this._targets,spell:this._spell};this._container.dispatchEvent(q.EBattleEvent.CastingSpell,nt),this._targets=nt.targets,this._spell=nt.spell;var at=[],rt={},ot=[],ht=this._spellCastUtil.generateSpellEffects(this._container,this._spell,this._targets),ct={};if(this._spell.statusEffects.length>0&&tt)try{for(var dt=F.__values(this._spell.statusEffects),lt=dt.next();!lt.done;lt=dt.next()){var ut=lt.value,ft=[];try{for(var bt=(U=void 0,F.__values(this._targets)),pt=bt.next();!pt.done;pt=bt.next()){var vt=pt.value;ft.push.apply(ft,F.__spreadArray([],F.__read(this._spellCastUtil.getStatusEffectTargets(this._container,ut.targetType,tt,vt)),!1))}}catch(Ct){U={error:Ct}}finally{try{pt&&!pt.done&&($=bt.return)&&$.call(bt)}finally{if(U)throw U.error}}ct[ut.statusEffectId]=ft.map((function(k){return k.id}))}}catch(Ot){k={error:Ot}}finally{try{lt&&!lt.done&&(B=dt.return)&&B.call(dt)}finally{if(k)throw k.error}}null===(J=this.spellEffectProcessor)||void 0===J||J.call(this,ht);var gt=G.groupBy(ht,(function(k){return k.target.id})),mt=function(k,B){var U=!1;it.targets.push({unitId:k,hits:B.map((function(B){var j,$,H,V,W,q;et._spellCastUtil.applySpellEffectsToTarget(B);var K=B.affixes.filter((function(k){return k.isDisplayed})),Y=B.removedAffixes.filter((function(k){return k.isDisplayed})),X={damage:B.damage,damageInformation:B.damageInformation,hpResult:B.target.health,affixes:K.length>0?K:void 0,removedAffixes:Y.length>0?Y.map((function(k){return k.id})):void 0};try{for(var Z=(j=void 0,F.__values(B.flags)),J=Z.next();!J.done;J=Z.next()){var tt=J.value;switch(tt.flag){case z.ESpellFlag.Rescue:U=!0;break;case z.ESpellFlag.ChangeMp:tt.flagValue&&(X.mpDamage=-tt.flagValue,X.mpResult=B.target.mp);break;case z.ESpellFlag.ChangeCooldown:if(tt.flagValue)try{for(var it=(H=void 0,F.__values(B.target.spells)),st=it.next();!st.done;st=it.next()){var nt=st.value,at=G.clamp(nt.currentCooldown+tt.flagValue,0,nt.cooldown);nt.currentCooldown!==at&&nt.currentCooldown>=0&&(nt.currentCooldown=at,et._stateUpdateManager.addToBack({type:Q.EBattleStateUpdate.ModifySpellCooldown,unitId:k,spellId:nt.id,cooldown:nt.currentCooldown}))}}catch(ut){H={error:ut}}finally{try{st&&!st.done&&(V=it.return)&&V.call(it)}finally{if(H)throw H.error}}}}}catch(ft){j={error:ft}}finally{try{J&&!J.done&&($=Z.return)&&$.call(Z)}finally{if(j)throw j.error}}try{for(var ot=(W=void 0,F.__values(B.statusEffectsAdded)),ht=ot.next();!ht.done;ht=ot.next()){var dt=ht.value,lt=et._statusEffectStateDataProvider.addStatusEffect(dt,!1);lt.intendedTargets=ct[dt.statusEffectId],rt[dt.statusEffectId]?rt[dt.statusEffectId].statusEffects.push(lt.statusEffects[0]):rt[dt.statusEffectId]=lt}}catch(bt){W={error:bt}}finally{try{ht&&!ht.done&&(q=ot.return)&&q.call(ot)}finally{if(W)throw W.error}}return X}))});var j=B[0].target;at.push.apply(at,F.__spreadArray([],F.__read(Z.AffixUtils.handleAfterDamageAffixesForTarget(yt._affixStateDataProvider,j)),!1)),(j.isDefeated()||U)&&(j.battleStatus=U?V.EUnitBattleStatus.Rescued:V.EUnitBattleStatus.Defeated,ot.push({type:Q.EBattleStateUpdate.DefeatUnit,unitId:j.id,isRescued:U}))},yt=this;try{for(var _t=F.__values(Object.entries(gt)),Et=_t.next();!Et.done;Et=_t.next()){var wt=F.__read(Et.value,2);mt(wt[0],wt[1])}}catch(It){H={error:It}}finally{try{Et&&!Et.done&&(W=_t.return)&&W.call(_t)}finally{if(H)throw H.error}}var Tt={};for(var St in rt){var At=rt[St];Tt[St]=At.statusEffects.map((function(k){return k.id}))}return Object.keys(Tt).length>0&&(it.statusEffectsApplied=Tt),this._container.dispatchEvent(q.EBattleEvent.AddingCastSpellStateUpdate,nt,it),(K=this._stateUpdateManager).addToBack.apply(K,F.__spreadArray(F.__spreadArray(F.__spreadArray([it],F.__read(Object.values(rt)),!1),F.__read(at),!1),F.__read(ot),!1)),!0},B}(U(2771).BattleAction);B.CastSpellAction=J},43396:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.EmptyAction=void 0;var F=U(17498),G=function(k){function B(){var B=k.apply(this,F.__spreadArray([],F.__read(arguments),!1))||this;return B.countsAsPlayedTurn=!1,B}return F.__extends(B,k),B.prototype.run=function(){return!0},B}(U(2771).BattleAction);B.EmptyAction=G},27996:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.FumbleAction=void 0;var F=U(17498),G=U(51448),j=U(51648),$=U(58690),H=U(54705),V=function(k){function B(B,U){var F=k.call(this)||this;return F.countsAsPlayedTurn=!0,F._stateUpdateManager=B.get(j.StateUpdateManager),F._battleConstants=B.get(G.BattleConstants),F._target=U,F}return F.__extends(B,k),B.prototype.run=function(){var k={type:$.EBattleStateUpdate.CastSpell,id:this._battleConstants.fumbleSpellId,targets:[{unitId:this._target.id,hits:[{damage:0,damageInformation:H.EDamageInformation.Fumble,hpResult:this._target.health}]}]};return this._stateUpdateManager.addToBack(k),!0},B}(U(2771).BattleAction);B.FumbleAction=V},9189:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.PowerUpAction=void 0;var F=U(17498),G=U(51448),j=U(16104),$=U(51648),H=U(58690),V=U(54705),W=function(k){function B(B,U,F){var H=k.call(this)||this;return H._stateUpdateManager=B.get($.StateUpdateManager),H._battleCalculations=B.get(j.BattleCalculations),H._battleConstants=B.get(G.BattleConstants),H.correctAnswer=U,H.target=F,H}return F.__extends(B,k),B.prototype.run=function(){return this.correctAnswer?(this.countsAsPlayedTurn=!1,this.awardMp(this.target)):(this.countsAsPlayedTurn=!0,this.makeUnitFumble(this.target)),!this.correctAnswer},B.prototype.awardMp=function(k){var B=this._battleCalculations.getUnitMPIncrement(k);k.mp+=B;var U={type:H.EBattleStateUpdate.ModifyMp,unitId:k.id,mpResult:k.mp};this._stateUpdateManager.addToBack(U)},B.prototype.makeUnitFumble=function(k){var B={type:H.EBattleStateUpdate.CastSpell,id:this._battleConstants.fumbleSpellId,targets:[{unitId:k.id,hits:[{damage:0,damageInformation:V.EDamageInformation.Fumble,hpResult:k.health}]}]};this._stateUpdateManager.addToBack(B)},B}(U(2771).BattleAction);B.PowerUpAction=W},24573:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.SkipTurnAction=void 0;var F=U(17498),G=U(51648),j=U(58690),$=function(k){function B(B,U){var F=k.call(this)||this;return F.countsAsPlayedTurn=!1,F._stateUpdateManager=B.get(G.StateUpdateManager),F._target=U,F}return F.__extends(B,k),B.prototype.run=function(){return this._stateUpdateManager.addToBack({type:j.EBattleStateUpdate.SkipTurn,unitId:this._target.id}),!0},B}(U(2771).BattleAction);B.SkipTurnAction=$},40783:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(2771),B),F.__exportStar(U(61582),B),F.__exportStar(U(43396),B),F.__exportStar(U(27996),B),F.__exportStar(U(9189),B),F.__exportStar(U(24573),B)},54284:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.Affix=void 0;var U=function(k){this._data=k};B.Affix=U},81327:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EAffixType=void 0,function(k){k.Stat="stat",k.DodgeChance="dodgeChance",k.ApplyDamage="applyDamage",k.ApplyHealing="applyHealing",k.BonusElement="bonusElement",k.IncomingDamageMultiplier="incomingDamage",k.OutgoingDamageMultiplier="outgoingDamage",k.IncomingHealingMultiplier="incomingHealing",k.OutgoingHealingMultiplier="outgoingHealing",k.IncomingCritChanceBonus="incomingCritChance",k.PreventDefeat="preventDefeat",k.Survivor="survivor",k.OneHitKill="oneHitKill",k.AlwaysDodge="alwaysDodge",k.NeverDodge="neverDodge",k.Shield="shield",k.AdditiveDamageMultiplier="additiveDamageMultiplier",k.Revive="revive"}(U||(B.EAffixType=U={}))},1191:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.AffixUtils=void 0;var F=U(17498),G=U(95891),j=U(81327),$=U(54705),H=U(9546),V=U(58690),W=function(){function k(){}return k.hasWhenToTrigger=function(k){return H.Util.isDefined(null==k?void 0:k.whenToTrigger)},k.handleAffixesForTarget=function(k,B,U,H){var V,W,q,K,z,Y;if(k.getAffixesForUnit(U.id).find((function(k){return k.type===j.EAffixType.PreventDefeat}))){var Q=H.filter((function(k){return k.target===U})),X=U.health;try{for(var Z=F.__values(Q),J=Z.next();!J.done;J=Z.next()){(nt=J.value).damage>=X&&(nt.damage=X-1),X-=nt.damage}}catch(lt){V={error:lt}}finally{try{J&&!J.done&&(W=Z.return)&&W.call(Z)}finally{if(V)throw V.error}}}if(U.health>1&&k.getAffixesForUnit(U.id).find((function(k){return k.type===j.EAffixType.Survivor}))){Q=H.filter((function(k){return k.target===U}));try{for(var tt=F.__values(Q),et=tt.next();!et.done;et=tt.next()){if((nt=et.value).damage>U.health){nt.damage=U.health-1;break}}}catch(ut){q={error:ut}}finally{try{et&&!et.done&&(K=tt.return)&&K.call(tt)}finally{if(q)throw q.error}}}var it=k.getAffixesForUnit(U.id).filter((function(k){return k.type===j.EAffixType.Shield}));if(it.length>0){Q=H.filter((function(k){return k.target===U}));for(var st=0;st0;++st)for(var nt=Q[st],at=0;at0;++at){var rt=it[at];nt.damage=rt.damageRange?Math.min(nt.damage,G.random(rt.damageRange.min,rt.damageRange.max)):0,nt.damageInformation=$.EDamageInformation.None,rt.removeAfterHit&&(nt.removedAffixes.push(rt),k.removeAffix(rt,!1),it.shift())}}var ot=B?k.getAffixesForUnit(B.id).find((function(k){return k.type===j.EAffixType.OutgoingHealingMultiplier})):void 0,ht=k.getAffixesForUnit(U.id).find((function(k){return k.type===j.EAffixType.IncomingHealingMultiplier}));if(ht||ot){Q=H.filter((function(k){return k.target===U}));try{for(var ct=F.__values(Q),dt=ct.next();!dt.done;dt=ct.next()){(nt=dt.value).isDamageInformationFlagSet($.EDamageInformation.Heal)&&(ht&&(nt.damage=Math.round(nt.damage*ht.multiplier)),ot&&(nt.damage=Math.round(nt.damage*ot.multiplier)))}}catch(ft){z={error:ft}}finally{try{dt&&!dt.done&&(Y=ct.return)&&Y.call(ct)}finally{if(z)throw z.error}}}},k.handleAfterDamageAffixesForTarget=function(k,B){var U=[];if(B.isDefeated()){var F=k.getAffixesForUnit(B.id).find((function(k){return k.type===j.EAffixType.Revive}));F&&(B.health=Math.max(1,Math.round(B.maxHealth*F.percentHealth)),k.removeAffix(F,!1),U.push({type:V.EBattleStateUpdate.RemoveAffix,affixId:F.id}),U.push({type:V.EBattleStateUpdate.ReviveUnit,unitId:B.id,hpResult:B.health}))}return U},k}();B.AffixUtils=W},26342:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EWhenToReduce=void 0,function(k){k.StartOfTurn="startOfTurn",k.EndOfTurn="endOfTurn"}(U||(B.EWhenToReduce=U={}))},18902:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EWhenToTrigger=void 0,function(k){k.StartOfTurn="startOfTurn",k.EndOfTurn="endOfTurn",k.WhenDurationExpires="whenDurationExpires"}(U||(B.EWhenToTrigger=U={}))},38126:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(54284),B),F.__exportStar(U(81327),B),F.__exportStar(U(1191),B),F.__exportStar(U(18902),B),F.__exportStar(U(26342),B)},24599:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BattleController=void 0;var F=U(17498),G=U(79687),j=U(41334),$=U(87584),H=U(21073),V=function(){function k(){}return k.prototype.getVictoriousTeam=function(){var k=this.getTeams().filter((function(k){return!k.isDefeated()}));return 1===k.length?k[0]:null},k.prototype.getTeams=function(){var k=this;return this._battleStateDataProvider.getTeamIds().map((function(B){return k._battleContainer.getNamed($.Team,B)}))},k.prototype.getUnits=function(){var k=this;return this._battleStateDataProvider.getUnitIds().map((function(B){return k._battleContainer.getNamed(H.Unit,B)}))},k.prototype.removeUnit=function(k){this._battleContainer.get(j.BattleStateDataProvider).deleteUnitData(k)},F.__decorate([(0,G.inject)(G.Container),F.__metadata("design:type",Function)],k.prototype,"_battleContainer",void 0),F.__decorate([(0,G.inject)(j.BattleStateDataProvider),F.__metadata("design:type",j.BattleStateDataProvider)],k.prototype,"_battleStateDataProvider",void 0),k=F.__decorate([(0,G.injectable)()],k)}();B.BattleController=V},16636:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.TeamController=void 0;var F=U(87584),G=U(24599),j=function(){function k(k,B){this._battleContainer=B,this._battleController=B.get(G.BattleController),this._team=B.getNamed(F.Team,k)}return Object.defineProperty(k.prototype,"team",{get:function(){return this._team},enumerable:!1,configurable:!0}),k.prototype.start=function(){},k}();B.TeamController=j},12030:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BasicBattleCalculations=void 0;var F=U(17498),G=U(79687),j=function(){function k(){}return k.prototype.getUnitMPIncrement=function(k){return k.maxMp-k.mp},k=F.__decorate([(0,G.injectable)()],k)}();B.BasicBattleCalculations=j},19124:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.createDefaultBasicBattleConfiguration=void 0;B.createDefaultBasicBattleConfiguration=function(){return{difficulty:5}}},1616:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BasicBattleController=void 0;var F=U(17498),G=U(79687),j=U(2771),$=U(10141),H=U(51648),V=U(36700),W=U(44503),q=U(13435),K=U(73566),z=U(49042),Y=U(12634),Q=U(41866),X=U(58690),Z=U(387),J=U(21073),tt=U(9546),et=U(24599),it=U(16636),st=U(84951),nt=U(19124),at=function(k){function B(){return null!==k&&k.apply(this,arguments)||this}return F.__extends(B,k),Object.defineProperty(B.prototype,"config",{get:function(){return this._battleControllerDataStore.getObjectOrDefault("config",nt.createDefaultBasicBattleConfiguration)},set:function(k){this._battleControllerDataStore.setObject("config",k)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"_turnOrder",{get:function(){var k=this._battleControllerDataStore.getObject("turnOrder");return tt.Util.assertDefined(k,"turnOrder is undefined"),k},set:function(k){this._battleControllerDataStore.setObject("turnOrder",k)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"_turnIndex",{get:function(){var k=this._battleControllerDataStore.getObject("turnIndex");return tt.Util.assertDefined(k,"turnIndex is undefined"),k},set:function(k){this._battleControllerDataStore.setObject("turnIndex",k)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"currentTurnOrder",{get:function(){return{turnOrder:this._turnOrder,turnIndex:this._turnIndex}},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"_round",{get:function(){var k;return null!==(k=this._battleControllerDataStore.getObject("round"))&&void 0!==k?k:0},set:function(k){this._battleControllerDataStore.setObject("round",k)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"turn",{get:function(){var k;return null!==(k=this._battleControllerDataStore.getObject("turn"))&&void 0!==k?k:1},set:function(k){this._battleControllerDataStore.setObject("turn",k)},enumerable:!1,configurable:!0}),B.prototype.start=function(){var k,B;this._turnOrder=this._battleStateDataProvider.getUnitIds(),this._turnIndex=-1,this.changeTurn();try{for(var U=F.__values(this.getTeamControllers()),G=U.next();!G.done;G=U.next()){G.value.start()}}catch(j){k={error:j}}finally{try{G&&!G.done&&(B=U.return)&&B.call(U)}finally{if(k)throw k.error}}this.doCurrentUnitTurn()},B.prototype.resume=function(){this.doCurrentUnitTurn()},B.prototype.getTeamControllers=function(){var k=this;return this._battleStateDataProvider.getTeamIds().map((function(B){return k._battleContainer.getNamed(it.TeamController,B)}))},B.prototype.runAction=function(k){var B=k.run();this.checkForVictory(),B&&this.changeTurn(k.countsAsPlayedTurn),this.doCurrentUnitTurn()},B.prototype.checkForVictory=function(){var k=this.getVictoriousTeam();if(k)throw this._stateUpdateManager.addToBack({type:X.EBattleStateUpdate.EndBattle,victoriousTeamId:k.id}),new $.BattleEndError},B.prototype.getActiveUnit=function(){var k=this._battleControllerDataStore.getObjectOrDefault("turnOrder",(function(){return[]}));if(!(k.length<1||this._turnIndex<0))return this._battleContainer.getNamed(J.Unit,k[this._turnIndex])},B.prototype.recalculateTurnOrder=function(){var k=this,B=this._turnOrder.map((function(B){return k._battleContainer.getNamed(J.Unit,B)})),U=this._unitSorter.sort({units:B,currentUnitIndex:this._turnIndex});this._turnOrder=U.units.map((function(k){return k.id})),this._turnIndex=U.currentUnitIndex},B.prototype.changeTurn=function(k){this.removeDefeatedUnits();var B=this.getActiveUnit();do{this.recalculateTurnOrder(),null==B||B.endTurn(),this._affixStateDataProvider.endTurn(),this._turnIndex=(this._turnIndex+1)%this._turnOrder.length,0===this._turnIndex&&this.changeRound(),this.checkForVictory(),B=this.getActiveUnit(),tt.Util.assertDefined(B,"No active unit"),B.startTurn(),this.removeDefeatedUnits()}while(B.passive||B.isDefeated());k&&this.turn++,this.addActiveUnitStateUpdate(B.id),tt.Util.isDebugEnabled()&&this._stateUpdateManager.addDebugMessage(Z.EDebugMessageType.TurnOrder,this.getTurnOrderDebugMessage())},B.prototype.addActiveUnitStateUpdate=function(k){var B;if(null!==k){var U=this._battleContainer.getNamed(J.Unit,k);if(this.shouldSendCalculatedSpellData(U)){var F=this._battleContainer.get(Y.SpellCastUtil);B=U.spells.map((function(k){return{spellId:k.id,spellPower:F.calculateSpellPower(k),spellAccuracy:F.calculateSpellAccuracy(k)}}))}}this._stateUpdateManager.addToBack({type:X.EBattleStateUpdate.SetActiveUnit,unitId:k,spellData:B,turn:this.turn})},B.prototype.shouldSendCalculatedSpellData=function(k){return k.teamId===Q.ETeamId.Home},B.prototype.changeRound=function(){this._stateUpdateManager.addToBack({type:X.EBattleStateUpdate.NewRound,round:++this._round}),this._battleContainer.dispatchEvent(z.EBattleEvent.NewRoundStarted,this._round)},B.prototype.doCurrentUnitTurn=function(){var k=this.getActiveUnit();tt.Util.assertDefined(k,"No active unit");var B=this.getTeamControllers().find((function(B){return B.team.getMembers().includes(k)}));tt.Util.assertDefined(B,"Active unit not found on any team"),B.readyActionForUnit(k)},B.prototype.removeDefeatedUnits=function(){var k,B;try{for(var U=F.__values(this._battleStateDataProvider.getUnitIds()),G=U.next();!G.done;G=U.next()){var j=G.value,$=this._battleContainer.getNamed(J.Unit,j);$.isDefeated()&&this.removeUnit($.id)}}catch(H){k={error:H}}finally{try{G&&!G.done&&(B=U.return)&&B.call(U)}finally{if(k)throw k.error}}},B.prototype.removeUnit=function(B){var U=this._turnOrder.indexOf(B);-1!==U&&(this._turnOrder.splice(U,1),U===this._turnIndex?0!==this._turnIndex?--this._turnIndex:this._turnIndex=this._turnOrder.length-1:U>":""," \t ").concat(F+1,". ").concat(B.id," (").concat(G.slot,") (").concat(B.getStat(W.EStat.Initiative),", ").concat(B.rarity,", ").concat(B.level,")\n")})),U},F.__decorate([(0,G.inject)(q.BattleStateDataStore),F.__metadata("design:type",Object)],B.prototype,"_battleControllerDataStore",void 0),F.__decorate([(0,G.inject)(H.StateUpdateManager),F.__metadata("design:type",H.StateUpdateManager)],B.prototype,"_stateUpdateManager",void 0),F.__decorate([(0,G.inject)(V.AffixStateDataProvider),F.__metadata("design:type",V.AffixStateDataProvider)],B.prototype,"_affixStateDataProvider",void 0),F.__decorate([(0,G.inject)(st.BattleUnitSorter),F.__metadata("design:type",st.BattleUnitSorter)],B.prototype,"_unitSorter",void 0),F.__decorate([$.handleBattleEnd,F.__metadata("design:type",Function),F.__metadata("design:paramtypes",[]),F.__metadata("design:returntype",void 0)],B.prototype,"start",null),F.__decorate([$.handleBattleEnd,F.__metadata("design:type",Function),F.__metadata("design:paramtypes",[j.BattleAction]),F.__metadata("design:returntype",void 0)],B.prototype,"runAction",null),B=F.__decorate([(0,G.injectable)()],B)}(et.BattleController);B.BasicBattleController=at},48531:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BasicBattleFormulas=void 0;var U=function(){function k(){}return k.getEnemyUnitStartMP=function(k,B){switch(k){case 1:return 0;case 2:return Math.floor(.5*B);case 3:return Math.ceil(.5*B);default:return B}},k.getEnemyQIPercentage=function(k){switch(k){case 1:return.6;case 2:case 3:return.75;default:return.9}},k}();B.BasicBattleFormulas=U},45960:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(12030),B),F.__exportStar(U(19124),B),F.__exportStar(U(1616),B),F.__exportStar(U(48531),B)},21889:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(24599),B),F.__exportStar(U(16636),B),F.__exportStar(U(45960),B),F.__exportStar(U(15450),B)},84951:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BattleUnitSorter=void 0;var F=U(17498),G=U(79687),j=function(){function k(){}return k=F.__decorate([(0,G.injectable)()],k)}();B.BattleUnitSorter=j},764:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.InitiativeRarityLevelBattleUnitSorter=void 0;var F=U(17498),G=U(44503),j=function(k){function B(){return null!==k&&k.apply(this,arguments)||this}return F.__extends(B,k),B.prototype.sort=function(k){var B=k.units,U=k.currentUnitIndex,F=B.map((function(k){var B;return{unit:k,initiative:k.getStat(G.EStat.Initiative),rarity:null!==(B=k.rarity)&&void 0!==B?B:-1,level:k.level}}));return F.sort((function(k,B){return F.indexOf(k)<=U||F.indexOf(B)<=U?0:k.initiative!==B.initiative?B.initiative-k.initiative:k.rarity!==B.rarity?B.rarity-k.rarity:k.level!==B.level?B.level-k.level:.5-Math.random()})),{units:F.map((function(k){return k.unit})),currentUnitIndex:U}},B}(U(84951).BattleUnitSorter);B.InitiativeRarityLevelBattleUnitSorter=j},62359:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.MultipleTurnPingPongInitiativeRarityLevelBattleUnitSorter=void 0;var F=U(17498),G=U(95891),j=function(k){function B(){return null!==k&&k.apply(this,arguments)||this}return F.__extends(B,k),B.prototype.getNextUnitIndex=function(B){var U=k.prototype.getNextUnitIndex.call(this,B);if(U>=0)return U;var F=B.units,j=B.currentUnitIndex,$=F[j].teamId;return G.findLastIndex(F,(function(k){return k.teamId!==$&&!k.passive}),j-1)},B}(U(88266).PingPongInitiativeRarityLevelBattleUnitSorter);B.MultipleTurnPingPongInitiativeRarityLevelBattleUnitSorter=j},88266:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.PingPongInitiativeRarityLevelBattleUnitSorter=void 0;var F=U(17498),G=U(95891),j=U(9546),$=function(k){function B(){return null!==k&&k.apply(this,arguments)||this}return F.__extends(B,k),B.prototype.sort=function(B){var U=k.prototype.sort.call(this,B),F=U.units,G=U.currentUnitIndex;if(G<0||G>=F.length)return{units:F,currentUnitIndex:G};var j=this.getNextNaturalUnit({units:F,currentUnitIndex:G});if(j.unit.teamId!==F[G].teamId)return j.newRoundOrderData?j.newRoundOrderData:{units:F,currentUnitIndex:G};var $=this.getNextUnitIndex({units:F,currentUnitIndex:G});if($>=0){var H=F.splice($,1)[0],V=$=B.length-1)return-1;var F=B[U].teamId;return G.findIndex(B,(function(k){return k.teamId!==F&&!k.passive}),U+1)},B}(U(764).InitiativeRarityLevelBattleUnitSorter);B.PingPongInitiativeRarityLevelBattleUnitSorter=$},15450:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(84951),B),F.__exportStar(U(764),B),F.__exportStar(U(62359),B),F.__exportStar(U(88266),B)},51448:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BattleConstants=void 0;var F=U(17498),G=U(79687),j=U(44503),$=U(26036),H=U(50532),V=U(87452),W=function(){function k(){}return Object.defineProperty(k.prototype,"baseLevelMinimum",{get:function(){return this._constantsDataProvider.constants.baseLevelMinimum},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"baseLevelMaximum",{get:function(){return this._constantsDataProvider.constants.baseLevelMaximum},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"baseLevelMaximumConfig",{get:function(){return this._constantsDataProvider.constants.baseLevelMaximumConfig},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"minPlayerHeartsOnEndBattle",{get:function(){return this._constantsDataProvider.constants.minPlayerHeartsOnEndBattle},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"elementalAffinityBonus",{get:function(){return this._constantsDataProvider.constants.multipliers.stabElement},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"criticalHitBonus",{get:function(){return this._constantsDataProvider.constants.multipliers.criticalHit},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"criticalHitChanceBonus",{get:function(){var k;return null!==(k=this._constantsDataProvider.constants.multipliers.critChance)&&void 0!==k?k:1},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"physicalMultiplier",{get:function(){return this._constantsDataProvider.constants.multipliers.physical},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"finalDamageMultiplier",{get:function(){return this._constantsDataProvider.constants.multipliers.finalDamage},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"enemyNerfMinMultiplier",{get:function(){return this._constantsDataProvider.constants.multipliers.enemyNerf.min},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"minimumHitChance",{get:function(){return this._constantsDataProvider.constants.minimumHitChance},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"maximumHitChance",{get:function(){return this._constantsDataProvider.constants.maximumHitChance},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"enemyNerfBonusMultiplier",{get:function(){return this._constantsDataProvider.constants.multipliers.enemyNerf.bonus},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"chanceHitOffset",{get:function(){return this._constantsDataProvider.constants.multipliers.hitChanceScaling.chanceHitOffset},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"chanceHitCoefSquared",{get:function(){return this._constantsDataProvider.constants.multipliers.hitChanceScaling.chanceHitCoefSquared},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"chanceHitCoefPrime",{get:function(){return this._constantsDataProvider.constants.multipliers.hitChanceScaling.chanceHitCoefPrime},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"equipmentBaseHpModifier",{get:function(){return this._constantsDataProvider.constants.equipmentModifierBaseValues.health},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"equipmentBasePowerModifier",{get:function(){return this._constantsDataProvider.constants.equipmentModifierBaseValues.power},enumerable:!1,configurable:!0}),k.prototype.getMultiplierByName=function(k){return this._constantsDataProvider.constants.multipliers[k]},Object.defineProperty(k.prototype,"aoaSpellId",{get:function(){return this._constantsDataProvider.constants.aoaSpellId},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"rescueSpellId",{get:function(){return this._constantsDataProvider.constants.rescueSpellId},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"fumbleSpellId",{get:function(){return this._constantsDataProvider.constants.fumbleSpellId},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"rescueDamageThreshold",{get:function(){return this._constantsDataProvider.constants.rescue.damageThreshold},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"difficultyStreak",{get:function(){return this._constantsDataProvider.constants.difficultyStreak},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"difficultyStreakBench",{get:function(){return this._constantsDataProvider.constants.difficultyStreakBench},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"difficultyStreakLoseStep",{get:function(){return this._constantsDataProvider.constants.difficultyStreakLoseStep},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"difficultyStreakWinStep",{get:function(){return this._constantsDataProvider.constants.difficultyStreakWinStep},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"xpRewards",{get:function(){return this._constantsDataProvider.constants.xp},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"unitStatDefaults",{get:function(){return this._constantsDataProvider.constants.unitStatDefaults},enumerable:!1,configurable:!0}),k.prototype.getDivisor=function(k){return this._constantsDataProvider.constants.divisors[k]},k.prototype.getSpellElementalMultiplier=function(k,B){var U=this._constantsDataProvider.constants.elementalMultiplier.find((function(B){return B.name===k}));return(null==U?void 0:U.data[B])?U.data[B]:1},k.prototype.getBestElementalAdvantageType=function(k,B,U){var F=this,G=this.getSpellElementalMultiplier(U,B),j=U;return k.forEach((function(k){var U=F.getSpellElementalMultiplier(k,B);U>G&&(G=U,j=k)})),j},k.prototype.getElementalAdvantage=function(k,B){return k===this.getElementalWeakness(B)?H.EElementalAdvantage.Strong:k===this.getElementalResistance(B)?H.EElementalAdvantage.Weak:H.EElementalAdvantage.Neutral},k.prototype.getDamageLimit=function(k){return k?new V.ValueRange(this._constantsDataProvider.constants.damageRange.aoa.min,this._constantsDataProvider.constants.damageRange.aoa.max):new V.ValueRange(this._constantsDataProvider.constants.damageRange.spell.min,this._constantsDataProvider.constants.damageRange.spell.max)},k.prototype.getElementalWeakness=function(k){var B=this._constantsDataProvider.constants.elementalMultiplier.find((function(B){return B.name===k}));return null==B?void 0:B.weakness},k.prototype.getElementalResistance=function(k){var B=this._constantsDataProvider.constants.elementalMultiplier.find((function(B){return B.name===k}));return null==B?void 0:B.resistance},k.prototype.getEnemyDamageMultiplier=function(k){var B=this.getDivisor(j.EDivisor.EnemyNerf);return this.enemyNerfBonusMultiplier-this.enemyNerfBonusMultiplier/((k+B-1)/B)+this.enemyNerfMinMultiplier},F.__decorate([(0,G.inject)($.ConstantsDataProvider),F.__metadata("design:type",Object)],k.prototype,"_constantsDataProvider",void 0),k=F.__decorate([(0,G.injectable)()],k)}();B.BattleConstants=W},10424:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},10141:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.handleBattleEnd=B.BattleEndError=void 0;var F=U(17498),G=function(k){function B(){var U=k.call(this)||this;return U.name="BattleEndError",Object.setPrototypeOf(U,B.prototype),U}return F.__extends(B,k),B}(Error);B.BattleEndError=G,B.handleBattleEnd=function(k,B,U){var F=U.value;U.value=function(){for(var k=[],B=0;B{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BattleError=void 0;var F=U(17498),G=function(k){function B(U){var F=k.call(this,U)||this;return Object.setPrototypeOf(F,B.prototype),F}return F.__extends(B,k),B}(Error);B.BattleError=G},79152:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.COMBAT_LEVEL_FIELD=void 0,B.COMBAT_LEVEL_FIELD="level"},8571:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.CombatFormulaScalingConstants=void 0;var F=U(17498),G=U(79687),j=U(99928),$=U(9546),H=U(79152),V=function(){function k(){}return k.prototype.getChanceToHitCoef1=function(k){var B;return null===(B=$.Util.findFirstElementBelowThreshold(H.COMBAT_LEVEL_FIELD,k,this._combatFormulaScalingProvider.constants.casterLevelBonusConfigs))||void 0===B?void 0:B.chanceToHitFormulaCoef1},k.prototype.getChanceToHitCoef2=function(k){var B;return null===(B=$.Util.findFirstElementBelowThreshold(H.COMBAT_LEVEL_FIELD,k,this._combatFormulaScalingProvider.constants.casterLevelBonusConfigs))||void 0===B?void 0:B.chanceToHitFormulaCoef2},k.prototype.getDefenceFormulaCoef=function(k){var B;return null===(B=$.Util.findFirstElementBelowThreshold(H.COMBAT_LEVEL_FIELD,k,this._combatFormulaScalingProvider.constants.casterLevelBonusConfigs))||void 0===B?void 0:B.defenceFormulaCoef},k.prototype.getDefenceFormulaExponent=function(k){var B;return null===(B=$.Util.findFirstElementBelowThreshold(H.COMBAT_LEVEL_FIELD,k,this._combatFormulaScalingProvider.constants.casterLevelBonusConfigs))||void 0===B?void 0:B.defenceExponent},k.prototype.getDamageLevelAverage=function(k){var B;return null===(B=$.Util.findFirstElementBelowThreshold(H.COMBAT_LEVEL_FIELD,k,this._combatFormulaScalingProvider.constants.casterLevelBonusConfigs))||void 0===B?void 0:B.damageAverage},k.prototype.getDefenceLevelAverage=function(k){var B;return null===(B=$.Util.findFirstElementBelowThreshold(H.COMBAT_LEVEL_FIELD,k,this._combatFormulaScalingProvider.constants.casterLevelBonusConfigs))||void 0===B?void 0:B.defenceAverage},Object.defineProperty(k.prototype,"getDamageAveragePower",{get:function(){return this._combatFormulaScalingProvider.constants.damageAveragePower},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"getDefenceAveragePower",{get:function(){return this._combatFormulaScalingProvider.constants.defenceAveragePower},enumerable:!1,configurable:!0}),F.__decorate([(0,G.inject)(j.CombatFormulaScalingDataProvider),F.__metadata("design:type",Object)],k.prototype,"_combatFormulaScalingProvider",void 0),k=F.__decorate([(0,G.injectable)()],k)}();B.CombatFormulaScalingConstants=V},16104:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BattleCalculations=void 0,B.BattleCalculations=Symbol("IBattleCalculations")},94167:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.SimStateUpdateManager=void 0;var F=U(17498),G=U(79687),j=U(58690),$=function(k){function B(){return null!==k&&k.apply(this,arguments)||this}return F.__extends(B,k),B.prototype.addToBack=function(){for(var k,B=[],U=0;U{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.SPELL_LEVEL_SPEED_PREFIX=B.SPELL_LEVEL_POWER_PREFIX=B.SPELL_LEVEL_FIELD=void 0,B.SPELL_LEVEL_FIELD="level",B.SPELL_LEVEL_POWER_PREFIX="pwr",B.SPELL_LEVEL_SPEED_PREFIX="spd"},52431:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.SpellLevelBonusConstants=void 0;var F=U(17498),G=U(79687),j=U(13135),$=U(9546),H=U(57276),V=function(){function k(){}return k.prototype.getSpeedLevelBonus=function(k,B){var U=this._spellLevelDataProvider.constants.casterLevelBonusConfigs,F=this.getSpeedField(B);if(!$.Util.isDefined(F))return 0;for(var G=1;G0?U[U.length-1].speed[F]:0},k.prototype.getPowerLevelBonus=function(k,B){var U=this._spellLevelDataProvider.constants.casterLevelBonusConfigs,F=this.getPowerField(B);if(!$.Util.isDefined(F))return 1;for(var G=1;G0?U[U.length-1].power[F]:1},k.prototype.getPowerField=function(k){return void 0!==k?"".concat(H.SPELL_LEVEL_POWER_PREFIX).concat(k):void 0},k.prototype.getSpeedField=function(k){return void 0!==k?"".concat(H.SPELL_LEVEL_SPEED_PREFIX).concat(k):void 0},k.prototype.getSpellSpeed=function(k){var B,U,F=null!==(B=this.getSpeedField(k.upgradeType))&&void 0!==B?B:"",G=$.Util.findFirstElementBelowThreshold(H.SPELL_LEVEL_FIELD,k.level,this._spellLevelDataProvider.constants.casterLevelBonusConfigs);return k.casterValue+k.spellBaseValue+(null!==(U=null==G?void 0:G.speed[F])&&void 0!==U?U:0)},k.prototype.getSpellPower=function(k){var B,U,F=null!==(B=this.getPowerField(k.upgradeType))&&void 0!==B?B:"",G=$.Util.findFirstElementBelowThreshold(H.SPELL_LEVEL_FIELD,k.level,this._spellLevelDataProvider.constants.casterLevelBonusConfigs);return k.casterValue*k.spellBaseValue*(null!==(U=null==G?void 0:G.power[F])&&void 0!==U?U:1)},k.prototype.getDisplaySpellPower=function(k,B){var U,F,G,j,H,V=null!==(U=this._spellLevelDataProvider.constants.powerDisplayRoundToDecimals)&&void 0!==U?U:0;if(B){var W=null!==(F=this._spellLevelDataProvider.constants.powerDisplayHealRoundSignificance)&&void 0!==F?F:0;H="".concat($.Util.toFixedTrimmed($.Util.round(100*k,W),V),"%")}else H=$.Util.toFixedTrimmed($.Util.ceiling(k/(null!==(G=this._spellLevelDataProvider.constants.powerDisplayDivider)&&void 0!==G?G:1),null!==(j=this._spellLevelDataProvider.constants.powerDisplayCeiling)&&void 0!==j?j:1),V);return H},k.prototype.getDisplaySpellAccuracy=function(k){var B,U;return $.Util.ceiling(k/(null!==(B=this._spellLevelDataProvider.constants.speedDisplayDivider)&&void 0!==B?B:1),null!==(U=this._spellLevelDataProvider.constants.speedDisplayCeiling)&&void 0!==U?U:1).toString()},F.__decorate([(0,G.inject)(j.SpellLevelDataProvider),F.__metadata("design:type",Object)],k.prototype,"_spellLevelDataProvider",void 0),k=F.__decorate([(0,G.injectable)()],k)}();B.SpellLevelBonusConstants=V},51648:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.StateUpdateManager=void 0;var F=U(17498),G=U(79687),j=U(49042),$=U(58690),H=function(){function k(){this.stateUpdates=[]}return k.prototype.consume=function(k){var B=F.__spreadArray([],F.__read(this.stateUpdates),!1);return this.clearList(),null==k||k.dispatchEvent(j.EBattleEvent.StateUpdatesConsumed,B),B},k.prototype.addToBack=function(){for(var k,B=[],U=0;U0&&G[j].type===$.EBattleStateUpdate.EndBattle?G.splice(j-1,0,F):this.addToBack(F))},k=F.__decorate([(0,G.injectable)()],k)}();B.StateUpdateManager=H},16779:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(51448),B),F.__exportStar(U(10424),B),F.__exportStar(U(15907),B),F.__exportStar(U(79152),B),F.__exportStar(U(8571),B),F.__exportStar(U(16104),B),F.__exportStar(U(16825),B),F.__exportStar(U(94167),B),F.__exportStar(U(57276),B),F.__exportStar(U(52431),B),F.__exportStar(U(51648),B)},94820:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BattleContainer=void 0;var F=U(17498),G=U(79687),j=U(36700),$=U(41334),H=U(26036),V=U(13135),W=U(99928),q=U(13435),K=U(68688),z=U(95142),Y=U(82825),Q=U(35223),X=U(11282),Z=U(73566),J=U(12634),tt=U(87584),et=U(21073),it=U(89647),st=U(9546),nt=U(51448),at=U(51648),rt=U(52431),ot=U(8571),ht=function(k){function B(U){var st=k.call(this)||this;return st.bind(G.Container).toConstantValue(st),st.bind(B).toConstantValue(st),st.bind(at.StateUpdateManager).toSelf().inSingletonScope(),st.bind(H.ConstantsDataProvider).to(H.HardCodedConstantsDataProvider).inSingletonScope(),st.bind(V.SpellLevelDataProvider).to(V.HardCodedSpellLevelDataProvider).inSingletonScope(),st.bind(W.CombatFormulaScalingDataProvider).to(W.HardCodedCombatFormulaScalingDataProvider).inSingletonScope(),st.bind(nt.BattleConstants).toSelf().inSingletonScope(),st.bind(rt.SpellLevelBonusConstants).toSelf().inSingletonScope(),st.bind(ot.CombatFormulaScalingConstants).toSelf().inSingletonScope(),st.bind(J.SpellCastUtil).toSelf().inSingletonScope(),st.bind(q.BattleStateDataStore).to(z.InMemoryBattleStateDataStore).inSingletonScope(),st.bind($.BattleStateDataProvider).toSelf().inSingletonScope(),st.bind(j.AffixStateDataProvider).toSelf().inSingletonScope(),st.bind(Y.StatusEffectStateDataProvider).toSelf().inSingletonScope(),st.bind(K.SpellDataProvider).toDynamicValue(st.createCachedDynamicBinding(U)),st.bind(Z.UnitStateDataProvider).toDynamicValue(st.createCachedDynamicBinding((function(k){return new Z.UnitStateDataProvider(k,st.get($.BattleStateDataProvider))}))),st.bind(Q.TeamStateDataProvider).toDynamicValue(st.createCachedDynamicBinding((function(k){return new Q.TeamStateDataProvider(k,st.get($.BattleStateDataProvider))}))),st.bind(X.UnitSpellStateDataProvider).toDynamicValue(st.createCachedDynamicBinding((function(k){var B=F.__read(st.getDynamicBindingIdsFromName(k),2),U=B[0],G=B[1],j=st.getNamed(Z.UnitStateDataProvider,U);return new X.UnitSpellStateDataProvider(G,j)}))),st.bind(et.Unit).toDynamicValue(st.createCachedDynamicBinding((function(k){return new et.Unit(k,st)}))),st.bind(tt.Team).toDynamicValue(st.createCachedDynamicBinding((function(k){return new tt.Team(k,st)}))),st.bind(it.UnitSpell).toDynamicValue(st.createCachedDynamicBinding((function(k){var B=F.__read(st.getDynamicBindingIdsFromName(k),2),U=B[0],G=B[1];return new it.UnitSpell(U,G,st)}))),st}return F.__extends(B,k),B.prototype.getByIds=function(k){for(var B=[],U=1;U{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.injectOnDemand=void 0;var F=U(79687),G=U(9546),j="__container__";B.injectOnDemand=function(k){return function(B,U,$){(0,F.inject)(F.Container)(B,j,$),Object.defineProperty(B,U,{get:function(){return G.Util.assertDefined(this.__container__,"injectOnDemand: Container not bound"),this.__container__.get(k)},configurable:!0})}}},16825:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(94820),B),F.__exportStar(U(49586),B)},36700:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.AffixStateDataProvider=void 0;var F=U(17498),G=U(79687),j=U(95891),$=U(81327),H=U(1191),V=U(18902),W=U(51448),q=U(51648),K=U(98239),z=U(58690),Y=U(54705),Q=U(387),X=U(9546),Z=U(50532),J=U(44503),tt=U(41334),et=U(82825),it=function(){function k(){this._affixesAddedThisTurn=[]}return k.prototype.endTurn=function(){this._affixesAddedThisTurn.length=0},k.prototype.getAffixesForUnit=function(k){return this._battleStateDataProvider.getAffixInstances().filter((function(B){return B.unitId===k}))},k.prototype.addAffix=function(k,B){void 0===B&&(B=!1),k.id||(k.id=X.Util.generateInstanceId()),this._battleStateDataProvider.getAffixInstances().push(k),this._affixesAddedThisTurn.push(k),B&&this._stateUpdateManager.addToBack({type:z.EBattleStateUpdate.AddAffix,affix:k})},k.prototype.removeAffixes=function(k,B){var U,G;void 0===B&&(B=!1);var $=j.remove(this._battleStateDataProvider.getAffixInstances(),k);if(B)try{for(var H=F.__values($),V=H.next();!V.done;V=H.next()){var W=V.value;this._stateUpdateManager.addToBack({type:z.EBattleStateUpdate.RemoveAffix,affixId:W.id}),this._statusEffectStateDataProvider.handleRemovedAffix(W.id)}}catch(q){U={error:q}}finally{try{V&&!V.done&&(G=H.return)&&G.call(H)}finally{if(U)throw U.error}}},k.prototype.removeAffix=function(k,B){void 0===B&&(B=!1),this.removeAffixes((function(B){return B.id===k.id}),B)},k.prototype.reduceAffixDuration=function(k,B,U){if(void 0===U&&(U=1),B.duration&&(!1!==B.duration.canReduceOnTurnAdded||!this._affixesAddedThisTurn.includes(B))){if(B.duration.remainingDuration-=U,B.duration.remainingDuration<=0){var F=this._statusEffectStateDataProvider.getStatusEffectForAffix(B.id);return this._statusEffectStateDataProvider.handleModifiedAffix(B.id,!1),H.AffixUtils.hasWhenToTrigger(B)&&B.whenToTrigger===V.EWhenToTrigger.WhenDurationExpires&&this.triggerAffix(k,B,F,!0),void this.removeAffix(B,!0)}this._stateUpdateManager.addToBack({type:z.EBattleStateUpdate.ModifyAffixDuration,affixId:B.id,remainingDuration:B.duration.remainingDuration}),this._statusEffectStateDataProvider.handleModifiedAffix(B.id,!0)}},k.prototype.triggerAffix=function(k,B,U,G){var j,V;if(void 0===G&&(G=!1),!k.isDefeated()){var W,q;if(X.Util.isDebugEnabled()){var K=-1,Y=-1;B.debug="",U&&(K=U.timesTriggered+1,Y=null!==(V=U.remainingDuration)&&void 0!==V?V:-1,B.debug+="Status Id: ".concat(U.statusEffectId,", ")),B.debug+="Trigger type: ".concat(B.type,"\n")+"target: ".concat(k.id,", duration left: ").concat(Y,", times triggered: ").concat(K,"\n")}switch(B.type){case $.EAffixType.ApplyDamage:W=this.applyDamage(k,B),q=B.element;break;case $.EAffixType.ApplyHealing:W=this.applyHealing(k,B);break;default:return}var Z=H.AffixUtils.handleAfterDamageAffixesForTarget(this,k),tt=[];k.isDefeated()&&(k.battleStatus=J.EUnitBattleStatus.Defeated,tt.push({type:z.EBattleStateUpdate.DefeatUnit,unitId:k.id,isRescued:!1})),U&&(U.timesTriggered+=1,(j=this._stateUpdateManager).addToBack.apply(j,F.__spreadArray(F.__spreadArray([{type:z.EBattleStateUpdate.TriggerStatusEffect,statusEffects:[U],hitData:W,element:q,isBeingRemoved:G}],F.__read(Z),!1),F.__read(tt),!1))),X.Util.isDebugEnabled()&&X.Util.isDefined(B.debug)&&(this._stateUpdateManager.addDebugMessage(Q.EDebugMessageType.StatusTrigger,B.debug),delete B.debug)}},k.prototype.applyDamage=function(k,B){var U=this._battleStateDataProvider.getUnitData(B.unitId);X.Util.assertDefined(U,"Unit data not found for affix with ID ".concat(B.id," and unit ID ").concat(B.unitId));var F=Math.random()*(B.damagePercentRange.max-B.damagePercentRange.min)+B.damagePercentRange.min,G=F*U.health.max,j=new K.SpellEffectInstance(null,k);if(B.element){var $=this._battleConstants.getSpellElementalMultiplier(B.element,k.element),V=this._battleConstants.getElementalAdvantage(B.element,k.element);V===Z.EElementalAdvantage.Strong?j.setDamageInformationFlag(Y.EDamageInformation.Effective):V===Z.EElementalAdvantage.Weak&&j.setDamageInformationFlag(Y.EDamageInformation.Ineffective),G*=$}return j.damage=G,H.AffixUtils.handleAffixesForTarget(this,null,k,[j]),j.damage=Math.ceil(j.damage),this._debugMode||(U.health.current-=j.damage),X.Util.isDebugEnabled()&&(B.debug+="Percent Roll: ".concat(F,", Range: ").concat(B.damagePercentRange.min,"-").concat(B.damagePercentRange.max,"\n")+"Trigger: ".concat(B.whenToTrigger,"\n")+"Element: ".concat(B.element,", Bonus Applied: ").concat(1,"\n")+"PreAffix Damage: ".concat(G,", Final: ").concat(j.damage,", Final Percent: ").concat(j.damage/k.maxHealth,"\n")),{damage:j.damage,damageInformation:j.damageInformation,hpResult:U.health.current}},k.prototype.applyHealing=function(k,B){var U=this._battleStateDataProvider.getUnitData(B.unitId);X.Util.assertDefined(U,"Unit data not found for affix with ID ".concat(B.id," and unit ID ").concat(B.unitId));var F=Math.random()*(B.healingPercentRange.max-B.healingPercentRange.min)+B.healingPercentRange.min,G=-1*F*U.health.max,j=new K.SpellEffectInstance(null,k);return j.damage=G,j.damageInformation=Y.EDamageInformation.Heal,H.AffixUtils.handleAffixesForTarget(this,null,k,[j]),j.damage=Math.ceil(j.damage),this._debugMode||(U.health.current=Math.min(U.health.max,U.health.current-j.damage)),X.Util.isDebugEnabled()&&(B.debug+="Percent Roll: ".concat(F,", Range: ").concat(B.healingPercentRange.min,"-").concat(B.healingPercentRange.max)+"Trigger: ".concat(B.whenToTrigger,"\n")+"PreAffix Heal: ".concat(G,", Final: ").concat(j.damage,"\n")),{damage:j.damage,damageInformation:j.damageInformation,hpResult:U.health.current}},k.prototype.setDebugMode=function(k){this._debugMode=k},F.__decorate([(0,G.inject)(tt.BattleStateDataProvider),F.__metadata("design:type",tt.BattleStateDataProvider)],k.prototype,"_battleStateDataProvider",void 0),F.__decorate([(0,G.inject)(q.StateUpdateManager),F.__metadata("design:type",q.StateUpdateManager)],k.prototype,"_stateUpdateManager",void 0),F.__decorate([(0,G.inject)(et.StatusEffectStateDataProvider),F.__metadata("design:type",et.StatusEffectStateDataProvider)],k.prototype,"_statusEffectStateDataProvider",void 0),F.__decorate([(0,G.inject)(W.BattleConstants),F.__metadata("design:type",W.BattleConstants)],k.prototype,"_battleConstants",void 0),k=F.__decorate([(0,G.injectable)()],k)}();B.AffixStateDataProvider=it},44503:(k,B)=>{"use strict";var U,F,G;Object.defineProperty(B,"__esModule",{value:!0}),B.EUnitBattleStatus=B.EDivisor=B.EStat=void 0,function(k){k.Hp="hp",k.Mp="mp",k.Power="power",k.Defence="defence",k.Speed="speed",k.Initiative="initiative",k.Accuracy="accuracy",k.Dodge="dodge",k.DodgeDamage="dodgeDamage",k.CritChance="critChance",k.CritDamage="critDamage"}(U||(B.EStat=U={})),function(k){k.Level="level",k.Aoa="aoa",k.Physical="physical",k.Magical="magical",k.Critical="speedCrit",k.EnemyNerf="enemyNerf",k.MergeRank="mergeRank"}(F||(B.EDivisor=F={})),function(k){k.Active="active",k.Defeated="defeated",k.Rescued="rescued"}(G||(B.EUnitBattleStatus=G={}))},41334:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BattleStateDataProvider=void 0;var F=U(17498),G=U(79687),j=U(9546),$=U(13435),H=function(){function k(){}return k.prototype.setUnitData=function(k,B){this._battleStateDataStore.getObjectOrDefault("units",(function(){return{}}))[k]=B},k.prototype.getUnitData=function(k){var B;return null===(B=this._battleStateDataStore.getObject("units"))||void 0===B?void 0:B[k]},k.prototype.deleteUnitData=function(k){var B;null===(B=this._battleStateDataStore.getObject("units"))||void 0===B||delete B[k]},k.prototype.getUnitsOnTeam=function(k){var B=this._battleStateDataStore.getObject("units");return j.Util.assertDefined(B,"No units exist"),Object.keys(B).filter((function(U){return B[U].teamId===k}))},k.prototype.getUnitDataForTeam=function(k){var B=this._battleStateDataStore.getObject("units");return j.Util.assertDefined(B,"No units exist"),Object.values(B).filter((function(B){return B.teamId===k}))},k.prototype.getUnitIds=function(){var k=this._battleStateDataStore.getObject("units");return j.Util.assertDefined(k,"No units exist"),Object.keys(k)},k.prototype.setTeamData=function(k,B){this._battleStateDataStore.getObjectOrDefault("teams",(function(){return{}}))[k]=B},k.prototype.getTeamData=function(k){var B;return null===(B=this._battleStateDataStore.getObject("teams"))||void 0===B?void 0:B[k]},k.prototype.getTeamIds=function(){var k=this._battleStateDataStore.getObject("teams");return j.Util.assertDefined(k,"No teams exist"),Object.keys(k)},k.prototype.getAffixInstances=function(){return this._battleStateDataStore.getObjectOrDefault("affixes",(function(){return[]}))},k.prototype.getStatusEffectInstances=function(){return this._battleStateDataStore.getObjectOrDefault("statusEffects",(function(){return[]}))},F.__decorate([(0,G.inject)($.BattleStateDataStore),F.__metadata("design:type",Object)],k.prototype,"_battleStateDataStore",void 0),k=F.__decorate([(0,G.injectable)()],k)}();B.BattleStateDataProvider=H},99928:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.HardCodedCombatFormulaScalingDataProvider=B.CombatFormulaScalingDataProvider=void 0;var F=U(17498),G=U(79687);B.CombatFormulaScalingDataProvider=Symbol("ICombatFormulaScalingDataProvider");var j=function(){function k(){}var B;return B=k,Object.defineProperty(k.prototype,"constants",{get:function(){return B.DEFAULT_CONSTANTS},enumerable:!1,configurable:!0}),k.DEFAULT_CONSTANTS={damageAveragePower:1,defenceAveragePower:1,casterLevelBonusConfigs:[{level:0,chanceToHitFormulaCoef1:1,chanceToHitFormulaCoef2:1,defenceFormulaCoef:2,defenceExponent:-.649512743064356,damageAverage:120,defenceAverage:.1057777778},{level:20,chanceToHitFormulaCoef1:6.905378704,chanceToHitFormulaCoef2:2.520833333,defenceFormulaCoef:2,defenceExponent:-.671129653966679,damageAverage:333,defenceAverage:.06574960128}]},k=B=F.__decorate([(0,G.injectable)()],k)}();B.HardCodedCombatFormulaScalingDataProvider=j},26036:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.HardCodedConstantsDataProvider=B.ConstantsDataProvider=void 0;var F=U(17498),G=U(79687),j=U(56132);B.ConstantsDataProvider=Symbol("IConstantsDataProvider");var $=function(){function k(){}var B;return B=k,Object.defineProperty(k.prototype,"constants",{get:function(){return B.DEFAULT_CONSTANTS},enumerable:!1,configurable:!0}),k.DEFAULT_CONSTANTS={baseLevelMinimum:1,baseLevelMaximum:100,baseLevelMaximumConfig:{regular:100,hard:150,expert:200},aoaSpellId:"1100",rescueSpellId:"1101",fumbleSpellId:"1103",multipliers:{physical:1.2,stabElement:.2,criticalHit:.5,critChance:1,finalDamage:1,enemyNerf:{min:.65,bonus:.35},hitChanceScaling:{chanceHitOffset:.78,chanceHitCoefSquared:-32e-8,chanceHitCoefPrime:.0015}},minimumHitChance:.25,maximumHitChance:1,primaryStatModifier:{tier1:.25,tier2:.4},secondaryStatModifier:{tier1:.15,tier2:.25},equipmentModifierBaseValues:{health:500,power:500},divisors:{level:25,physical:5,magical:75,aoa:33,speedCrit:50,enemyNerf:20,mergeRank:10},damageRange:{aoa:{min:100,max:1e3},spell:{min:1,max:999}},elementalMultiplier:[{name:j.EElementType.Physical,weakness:j.EElementType.Shadow,resistance:j.EElementType.Physical,data:{physical:.75,fire:1,ice:1,plant:1,storm:1,water:1,shadow:1,astral:1.25,neutral:1}},{name:j.EElementType.Fire,weakness:j.EElementType.Water,resistance:j.EElementType.Ice,data:{physical:1,fire:.75,ice:2,plant:1,storm:1,water:.5,shadow:.75,astral:1,neutral:1}},{name:j.EElementType.Ice,weakness:j.EElementType.Fire,resistance:j.EElementType.Plant,data:{physical:1,fire:.5,ice:.75,plant:2,storm:1,water:1,shadow:.75,astral:1,neutral:1}},{name:j.EElementType.Plant,weakness:j.EElementType.Ice,resistance:j.EElementType.Storm,data:{physical:1,fire:1,ice:.5,plant:.75,storm:2,water:1,shadow:.75,astral:1,neutral:1}},{name:j.EElementType.Storm,weakness:j.EElementType.Plant,resistance:j.EElementType.Water,data:{physical:1,fire:1,ice:1,plant:.5,storm:.75,water:2,shadow:.75,astral:1,neutral:1}},{name:j.EElementType.Water,weakness:j.EElementType.Storm,resistance:j.EElementType.Fire,data:{physical:1,fire:2,ice:1,plant:1,storm:.5,water:.75,shadow:.75,astral:1,neutral:1}},{name:j.EElementType.Shadow,weakness:j.EElementType.Astral,resistance:j.EElementType.Physical,data:{physical:1.5,fire:1.25,ice:1.25,plant:1.25,storm:1.25,water:1.25,shadow:1,astral:.75,neutral:1}},{name:j.EElementType.Astral,weakness:j.EElementType.Physical,resistance:j.EElementType.Shadow,data:{physical:1,fire:.75,ice:.75,plant:.75,storm:.75,water:.75,shadow:2,astral:1,neutral:1}},{name:j.EElementType.Neutral,data:{physical:1,fire:1,ice:1,plant:1,storm:1,water:1,shadow:1,astral:1,neutral:1}}],rescue:{damageThreshold:.5},minPlayerHeartsOnEndBattle:20,ai:{accuracyPenalty:{max:.3,levelCap:33},fumbleChanceIncrease:.05},difficultyStreak:{min:-3,max:10},difficultyStreakBench:{min:-1,max:7},difficultyStreakLoseStep:.1,difficultyStreakWinStep:.025,xp:{base:10,miniBoss:30,singularBoss:200,repeatableBoss:100,illusionBoss:333,finalBoss:1e3,cloakedWizard:80,pippet:30,mythic:30,titan:30},unitStatDefaults:{initiative:5}},k=B=F.__decorate([(0,G.injectable)()],k)}();B.HardCodedConstantsDataProvider=$},13435:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BattleStateDataStore=void 0,B.BattleStateDataStore=Symbol("IBattleStateDataStore")},68688:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.SpellDataProvider=void 0,B.SpellDataProvider=Symbol("ISpellDataProvider")},95142:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.InMemoryBattleStateDataStore=void 0;var F=U(17498),G=U(79687),j=function(){function k(){this._data={}}return k.prototype.getObject=function(k){return this._data[k]},k.prototype.setObject=function(k,B){return this._data[k]=B},k.prototype.getObjectOrDefault=function(k,B){var U,F;return null!==(U=(F=this._data)[k])&&void 0!==U?U:F[k]=B()},k=F.__decorate([(0,G.injectable)()],k)}();B.InMemoryBattleStateDataStore=j},91549:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.SimulateDebugUtil=void 0;var F=U(17498),G=U(1191),j=U(51648),$=U(24599),H=U(9546),V=U(51448),W=U(81327),q=U(82825),K=U(36700),z=function(){function k(){}return k.debugTriggerAllAffixes=function(k,B){var U,z,Y,Q,X=k.get(K.AffixStateDataProvider),Z=k.get(j.StateUpdateManager),J=k.get($.BattleController),tt=k.get(q.StatusEffectStateDataProvider),et="Status Sim running for ".concat(B.numberOfTimesToTrigger,"\n");X.setDebugMode(!0);try{for(var it=F.__values(J.getUnits()),st=it.next();!st.done;st=it.next()){var nt=st.value;try{for(var at=(Y=void 0,F.__values(X.getAffixesForUnit(nt.id))),rt=at.next();!rt.done;rt=at.next()){var ot=rt.value;if(G.AffixUtils.hasWhenToTrigger(ot)&&(!H.Util.isDefined(B.whenToTriggerFilter)||ot.whenToTrigger===B.whenToTriggerFilter)){et+="\nStatus ".concat(ot.type," on Unit ").concat(nt.id,"\n");for(var ht=0,ct=Number.MAX_VALUE,dt=0,lt=0;lt0;){var ut=Z.shiftState();ut.hitData&&(Math.abs(ut.hitData.damage)dt&&(dt=ut.hitData.damage),ht+=ut.hitData.damage)}if(ot.type===W.EAffixType.ApplyDamage&&ot.element){var ft=k.get(V.BattleConstants).getSpellElementalMultiplier(ot.element,nt.element);et+="Status Element: ".concat(ot.element,", Multiplier: ").concat(ft,"\n")}et+="Min Damage Rolled: ".concat(ct,", Min Percent: ").concat((ct/nt.maxHealth).toFixed(2),",\n")+"Max Damage Rolled: ".concat(dt,", Max Percent: ").concat((dt/nt.maxHealth).toFixed(2),",\n")+"Average Damage: ".concat(ht/B.numberOfTimesToTrigger,", ")+"Average Percent: ".concat((ht/B.numberOfTimesToTrigger/nt.maxHealth).toFixed(2),"\n")}}}catch(bt){Y={error:bt}}finally{try{rt&&!rt.done&&(Q=at.return)&&Q.call(at)}finally{if(Y)throw Y.error}}}}catch(pt){U={error:pt}}finally{try{st&&!st.done&&(z=it.return)&&z.call(it)}finally{if(U)throw U.error}}return X.setDebugMode(!1),et},k}();B.SimulateDebugUtil=z},13135:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.HardCodedSpellLevelDataProvider=B.SpellLevelDataProvider=void 0;var F=U(17498),G=U(79687);B.SpellLevelDataProvider=Symbol("ISpellLevelDataProvider");var j=function(){function k(){}var B;return B=k,Object.defineProperty(k.prototype,"constants",{get:function(){return B.DEFAULT_CONSTANTS},enumerable:!1,configurable:!0}),k.DEFAULT_CONSTANTS={casterLevelBonusConfigs:[{level:0,speed:{spdSingleHits1:1,spdAOEHits1:1,spdSingleHits2:1,spdAOEHits2:1,spdSingleHits3:1,spdAOEHits3:1,spdSingleHits4:1,spdAOEHits4:1,spdSingleHits5:1,spdAOEHits5:1,spdNoDmgSingle:1,spdNoDmgAOE:1},power:{pwrSingleHits1:1,pwrAOEHits1:1,pwrSingleHits2:1,pwrAOEHits2:1,pwrSingleHits3:1,pwrAOEHits3:1,pwrSingleHits4:1,pwrAOEHits4:1,pwrSingleHits5:1,pwrAOEHits5:1,pwrNoDmgSingle:1,pwrNoDmgAOE:1}},{level:5,speed:{spdSingleHits1:1.2,spdAOEHits1:1.2,spdSingleHits2:1.2,spdAOEHits2:1.2,spdSingleHits3:1.2,spdAOEHits3:1.2,spdSingleHits4:1.2,spdAOEHits4:1.2,spdSingleHits5:1.2,spdAOEHits5:1.2,spdNoDmgSingle:1,spdNoDmgAOE:1},power:{pwrSingleHits1:1,pwrAOEHits1:1,pwrSingleHits2:1,pwrAOEHits2:1,pwrSingleHits3:1,pwrAOEHits3:1,pwrSingleHits4:1,pwrAOEHits4:1,pwrSingleHits5:1,pwrAOEHits5:1,pwrNoDmgSingle:1,pwrNoDmgAOE:1}}]},k=B=F.__decorate([(0,G.injectable)()],k)}();B.HardCodedSpellLevelDataProvider=j},82825:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.StatusEffectStateDataProvider=void 0;var F=U(17498),G=U(79687),j=U(95891),$=U(51648),H=U(58690),V=U(9546),W=U(41334),q=function(){function k(){}return k.prototype.getAllStatusEffects=function(){return this._battleStateDataProvider.getStatusEffectInstances()},k.prototype.getStatusEffectsForUnit=function(k){return this.getAllStatusEffects().filter((function(B){return B.unitId===k}))},k.prototype.getStatusEffectForAffix=function(k){return this.getAllStatusEffects().find((function(B){return B.affixIds.includes(k)}))},k.prototype.addStatusEffect=function(k,B){void 0===B&&(B=!1),k.id||(k.id=V.Util.generateInstanceId()),this.getAllStatusEffects().push(k);var U={type:H.EBattleStateUpdate.AddStatusEffect,statusEffects:[j.clone(k)],intendedTargets:[]};return B&&this._stateUpdateManager.addToBack(U),U},k.prototype.removeStatusEffects=function(k,B){var U;void 0===B&&(B=!1);var G=j.remove(this.getAllStatusEffects(),k).map((function(k){return{type:H.EBattleStateUpdate.RemoveStatusEffect,statusEffects:[k]}}));return B&&(U=this._stateUpdateManager).addToBack.apply(U,F.__spreadArray([],F.__read(G),!1)),G},k.prototype.removeStatusEffect=function(k,B){void 0===B&&(B=!1);var U=this.removeStatusEffects((function(B){return B.id===k.id}),B);return U.length>0?U[0]:null},k.prototype.handleRemovedAffix=function(k){var B=this;this.getAllStatusEffects().forEach((function(U){var F=U.affixIds.indexOf(k);-1!==F&&U.affixIds.splice(F,1),0===U.affixIds.length&&B.removeStatusEffect(U,!0)}))},k.prototype.handleModifiedAffix=function(k,B){var U=this;this.getAllStatusEffects().forEach((function(F){if(F.affixIds.includes(k)){var G=0;U._battleStateDataProvider.getAffixInstances().forEach((function(k){var B,U,j=null!==(U=null===(B=k.duration)||void 0===B?void 0:B.remainingDuration)&&void 0!==U?U:0;F.affixIds.includes(k.id)&&j>G&&(G=j)}));var j=G!==F.remainingDuration;F.remainingDuration=G,B&&j&&U._stateUpdateManager.addToBack({type:H.EBattleStateUpdate.ModifyStatusEffect,statusEffects:[F]})}}))},F.__decorate([(0,G.inject)(W.BattleStateDataProvider),F.__metadata("design:type",W.BattleStateDataProvider)],k.prototype,"_battleStateDataProvider",void 0),F.__decorate([(0,G.inject)($.StateUpdateManager),F.__metadata("design:type",$.StateUpdateManager)],k.prototype,"_stateUpdateManager",void 0),k=F.__decorate([(0,G.injectable)()],k)}();B.StatusEffectStateDataProvider=q},35223:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.TeamStateDataProvider=void 0;var F=U(9546),G=function(k,B){var U=B.getTeamData(k);F.Util.assertDefined(U,"No data for team ".concat(k)),this.teamStateData=U};B.TeamStateDataProvider=G},11282:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.UnitSpellStateDataProvider=void 0;var F=U(9546),G=function(k,B){var U=B.unitStateData.spells.find((function(B){return B.spellId===k}));F.Util.assertDefined(U,"Unit does not have access to spell ".concat(k)),this.unitSpellStateData=U};B.UnitSpellStateDataProvider=G},73566:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.UnitStateDataProvider=void 0;var F=U(9546),G=function(k,B){var U=B.getUnitData(k);F.Util.assertDefined(U,"No data for unit ".concat(k)),this.unitStateData=U};B.UnitStateDataProvider=G},95448:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(36700),B),F.__exportStar(U(91549),B),F.__exportStar(U(44503),B),F.__exportStar(U(41334),B),F.__exportStar(U(99928),B),F.__exportStar(U(26036),B),F.__exportStar(U(13435),B),F.__exportStar(U(68688),B),F.__exportStar(U(95142),B),F.__exportStar(U(82825),B),F.__exportStar(U(13135),B),F.__exportStar(U(35223),B),F.__exportStar(U(11282),B),F.__exportStar(U(73566),B)},49042:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.EBattleEvent=void 0;var U=function(){function k(){}return k.NewRoundStarted=Symbol("NewRoundStarted"),k.CastingSpell=Symbol("CastingSpell"),k.AddingCastSpellStateUpdate=Symbol("AddingCastSpellStateUpdate"),k.StateUpdatesConsumed=Symbol("StateUpdatesConsumed"),k}();B.EBattleEvent=U},12073:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),U(17498).__exportStar(U(49042),B)},47547:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(40783),B),F.__exportStar(U(38126),B),F.__exportStar(U(21889),B),F.__exportStar(U(16779),B),F.__exportStar(U(95448),B),F.__exportStar(U(12073),B),F.__exportStar(U(24439),B),F.__exportStar(U(4497),B),F.__exportStar(U(38041),B),F.__exportStar(U(18035),B),F.__exportStar(U(77536),B)},38641:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.Spell=void 0;var U=function(){function k(k){this._schema=k}return Object.defineProperty(k.prototype,"id",{get:function(){return this._schema.id},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"name",{get:function(){return this._schema.name},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"element",{get:function(){return this._schema.element},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"energyCost",{get:function(){return this._schema.cost},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"target",{get:function(){return this._schema.target},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"delivery",{get:function(){return this._schema.delivery},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"baseDamage",{get:function(){return this._schema.damage},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"accuracy",{get:function(){return this._schema.accuracy},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"accuracySpeedBonus",{get:function(){var k;return null!==(k=this._schema.accuracySpeedBonus)&&void 0!==k?k:0},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"critical",{get:function(){return this._schema.critical},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"hitCount",{get:function(){var k;return null!==(k=this._schema.hits)&&void 0!==k?k:1},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"warmup",{get:function(){var k;return null!==(k=this._schema.warmup)&&void 0!==k?k:0},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"upgradeType",{get:function(){var k;return null!==(k=this._schema.upgradeType)&&void 0!==k?k:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"cooldown",{get:function(){var k;return null!==(k=this._schema.cooldown)&&void 0!==k?k:0},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"statusEffects",{get:function(){var k;return null!==(k=this._schema.statusEffects)&&void 0!==k?k:[]},enumerable:!1,configurable:!0}),k.prototype.getFlags=function(){var k,B;return null!==(B=null===(k=this._schema.flags)||void 0===k?void 0:k.filter((function(k){return k.flag})))&&void 0!==B?B:[]},k.prototype.findFlag=function(k){var B;return null===(B=this._schema.flags)||void 0===B?void 0:B.find((function(B){return B.flag===k}))},k.prototype.hasFlag=function(k){var B=Array.isArray(k)?k:[k];return this.getFlags().some((function(k){return B.includes(k.flag)}))},Object.defineProperty(k.prototype,"affixes",{get:function(){return Array.isArray(this._schema.affixes)?this._schema.affixes:[]},enumerable:!1,configurable:!0}),k}();B.Spell=U},12634:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.SpellCastUtil=void 0;var F=U(17498),G=U(79687),j=U(95891),$=U(81327),H=U(1191),V=U(24599),W=U(51448),q=U(15907),K=U(8571),z=U(52431),Y=U(51648),Q=U(36700),X=U(44503),Z=U(68688),J=U(87584),tt=U(41866),et=U(54705),it=U(387),st=U(56132),nt=U(50532),at=U(47747),rt=U(89647),ot=U(9546),ht=U(98239),ct=U(88250),dt=U(66020),lt=function(){function k(){this.bossStatGrowths=[at.EStatGrowthTrackName.Boss,at.EStatGrowthTrackName.Miniboss,at.EStatGrowthTrackName.IllusionBoss,at.EStatGrowthTrackName.DragonBoss,at.EStatGrowthTrackName.PuppetMaster,at.EStatGrowthTrackName.Pippet]}return k.prototype.generateSpellEffects=function(k,B,U){var F,G=this,j=B instanceof rt.UnitSpell?B:void 0,$=null!==(F=null==j?void 0:j.unit)&&void 0!==F?F:null,H=[],V=[];return U.forEach((function(U){for(var F=!1,W=0;W0&&(q.damage=G.commonBaseDamage($,U,j),G.calculateMultipliers($,U,j,q),q.isDamageInformationFlagSet(et.EDamageInformation.Heal)||(q.damage=G.limitDamage(j,q.damage,U))),q.damage=Math.round(q.damage),G.generateAffixApplication(B,q),H.push(q),q.isDamageInformationFlagSet(et.EDamageInformation.Dodge)||(V.push(q),F||(F=!0,G.applyStatusEffect(k,B,q)))}})),this.handleAffixes($,H),H},k.prototype.calculateHitChance=function(k,B,U){var F,G,$=this.calculateSpellAccuracy(U),H=B.getStat(X.EStat.Speed),V=this._battleConstants.chanceHitCoefSquared,W=null!==(F=this._combatFormulaScalingConstants.getChanceToHitCoef1(k.level))&&void 0!==F?F:1,q=null!==(G=this._combatFormulaScalingConstants.getChanceToHitCoef2(k.level))&&void 0!==G?G:1,K=$-H,z=this._battleConstants.chanceHitCoefPrime,Y=this._battleConstants.chanceHitOffset,Q=V/W*Math.pow(K,2)+z/q*K+Y;return Q+=k.getStat(X.EStat.Accuracy)-B.getStat(X.EStat.Dodge),j.clamp(Q,this._battleConstants.minimumHitChance,this._battleConstants.maximumHitChance)},k.prototype.calculateSpellAccuracy=function(k){var B=k.unit.getStat(X.EStat.Speed);return this._spellLevelBonusConstants.getSpellSpeed({casterValue:B,spellBaseValue:k.accuracySpeedBonus,upgradeType:k.upgradeType,level:k.unit.level})},k.prototype.applySpellEffectsToTarget=function(k){var B,U,G,$,H,V,W,q;if(!k.isDamageInformationFlagSet(et.EDamageInformation.Missed)){var K=k.target;if(!K.isDefeated()){try{for(var z=F.__values(k.flags),Y=z.next();!Y.done;Y=z.next()){switch((Z=Y.value).flag){case ct.ESpellFlag.ChangeMp:Z.flagValue&&(K.mp=j.clamp(K.mp+Z.flagValue,0,K.maxMp))}}}catch(at){B={error:at}}finally{try{Y&&!Y.done&&(U=z.return)&&U.call(z)}finally{if(B)throw B.error}}if(K.health-=k.damage,!K.isDefeated())try{for(var Q=F.__values(k.flags),X=Q.next();!X.done;X=Q.next()){var Z;switch((Z=X.value).flag){case ct.ESpellFlag.Rescue:this._battleController.removeUnit(K.id);break;case ct.ESpellFlag.StealUnit:k.caster&&(K.teamId=k.caster.teamId)}}}catch(rt){G={error:rt}}finally{try{X&&!X.done&&($=Q.return)&&$.call(Q)}finally{if(G)throw G.error}}try{for(var J=F.__values(k.affixes),tt=J.next();!tt.done;tt=J.next()){var it=tt.value;K.isDefeated()&&K.id===it.unitId||this._affixStateDataProvider.addAffix(it)}}catch(ot){H={error:ot}}finally{try{tt&&!tt.done&&(V=J.return)&&V.call(J)}finally{if(H)throw H.error}}try{for(var st=F.__values(k.removedAffixes),nt=st.next();!nt.done;nt=st.next()){it=nt.value;K.isDefeated()&&K.id===it.unitId||this._affixStateDataProvider.removeAffix(it)}}catch(ht){W={error:ht}}finally{try{nt&&!nt.done&&(q=st.return)&&q.call(st)}finally{if(W)throw W.error}}}}},k.prototype.getValidSpellTargets=function(k,B){try{var U=this.getUnitsFromTeamType(k,B.target.team,B.unit.teamId);return this.filterUnitsFromUnitType(B.target.unit,U,B.unit.id)}catch(F){throw new q.BattleError("Error getting valid spell targets for spell ".concat(B.id,": ").concat(F))}},k.prototype.getUnitsFromTeamType=function(k,B,U){var G=[];switch(B){case dt.ESpellTeamTarget.Enemy:G.push.apply(G,F.__spreadArray([],F.__read(k.get(V.BattleController).getTeams().filter((function(k){return k.id!==U}))),!1));break;case dt.ESpellTeamTarget.Own:G.push(k.getNamed(J.Team,U));break;case dt.ESpellTeamTarget.Any:case dt.ESpellTeamTarget.All:G.push.apply(G,F.__spreadArray([],F.__read(k.get(V.BattleController).getTeams()),!1));break;default:throw new q.BattleError("Invalid team target type ".concat(B))}return j.flatMap(G,(function(k){return k.getMembers()})).filter((function(k){return!k.isDefeated()}))},k.prototype.filterUnitsFromUnitType=function(k,B,U){return B.filter((function(B){switch(k){case dt.ESpellUnitTarget.Self:return B.id===U;case dt.ESpellUnitTarget.Ally:case dt.ESpellUnitTarget.Allies:return B.id!==U;case dt.ESpellUnitTarget.Single:case dt.ESpellUnitTarget.Team:case dt.ESpellUnitTarget.Row:case dt.ESpellUnitTarget.Random:break;default:throw new q.BattleError("Invalid unit target type ".concat(k))}return!0}))},k.prototype.hasValidSpellOption=function(k,B){var U,F=this;return null===(U=B.currentLoadout)||void 0===U?void 0:U.map((function(k){return B.spells.find((function(B){return B.id===k}))})).some((function(U){if(0!==U.currentCooldown||U.isLocked)return!1;var G=F._battleController.getTeams().find((function(k){return k.getMembers().includes(B)}));return ot.Util.assertDefined(G,'Unit "'.concat(B.id,'" is not in an active team.')),F.getValidSpellTargets(k,U).some((function(k){return!k.isDefeated()}))}))},k.prototype.handleAffixes=function(k,B){var U,G,V,W;if(k&&this._affixStateDataProvider.getAffixesForUnit(k.id).find((function(k){return k.type===$.EAffixType.OneHitKill})))try{for(var q=F.__values(B),K=q.next();!K.done;K=q.next()){var z=K.value;this._affixStateDataProvider.getAffixesForUnit(z.target.id).some((function(k){return k.type===$.EAffixType.AlwaysDodge}))||(z.isDamageInformationFlagSet(et.EDamageInformation.Heal)||(z.damage=90001,z.clearDamageInformationFlag(et.EDamageInformation.Missed)))}}catch(J){U={error:J}}finally{try{K&&!K.done&&(G=q.return)&&G.call(q)}finally{if(U)throw U.error}}var Y=j.uniq(j.map(B,"target"));try{for(var Q=F.__values(Y),X=Q.next();!X.done;X=Q.next()){var Z=X.value;H.AffixUtils.handleAffixesForTarget(this._affixStateDataProvider,k,Z,B)}}catch(tt){V={error:tt}}finally{try{X&&!X.done&&(W=Q.return)&&W.call(Q)}finally{if(V)throw V.error}}},k.prototype.generateAffixApplication=function(k,B){var U,G,$;try{for(var H=F.__values(k.affixes),V=H.next();!V.done;V=H.next()){var W=V.value;(null!==($=W.requireHit)&&void 0!==$&&!$||!B.isDamageInformationFlagSet(et.EDamageInformation.Missed)&&!B.isDamageInformationFlagSet(et.EDamageInformation.Dodge))&&(ot.Util.isDefined(W.chance)&&Math.random()>W.chance||B.affixes.push(F.__assign(F.__assign({},j.cloneDeep(W.affix)),{unitId:B.target.id})))}}catch(q){U={error:q}}finally{try{V&&!V.done&&(G=H.return)&&G.call(H)}finally{if(U)throw U.error}}},k.prototype.applyStatusEffect=function(k,B,U){var G,$;if(0!==B.statusEffects.length&&U.caster){var H=k.getNamed(Z.SpellDataProvider,B.id),V=function(G){var $,V,K=H.statusEffectData[G.statusEffectId];if(!K)throw new q.BattleError("Data for status effect ".concat(G.statusEffectId," not found for spell ").concat(B.id));var z=W.getStatusEffectTargets(k,G.targetType,U.caster,U.target),Y=function(k){var $,H=K.affixes;K.bossAffixes&&K.bossAffixes.length>0&&k.statGrowthTrack&&W.getIsStatGrowthBoss(k.statGrowthTrack)&&(H=K.bossAffixes);var V=H.map((function(B){return F.__assign(F.__assign({},j.cloneDeep(B)),{id:ot.Util.generateInstanceId(),unitId:k.id,duration:j.clone(G.duration)})}));($=U.affixes).push.apply($,F.__spreadArray([],F.__read(V),!1));var q=V.map((function(k){return k.id}));U.statusEffectsAdded.push({id:ot.Util.generateInstanceId(),unitId:k.id,statusEffectId:K.id,affixIds:q,timesTriggered:0,remainingDuration:G.duration.remainingDuration,spellId:B.id})};try{for(var Q=($=void 0,F.__values(z)),X=Q.next();!X.done;X=Q.next()){Y(X.value)}}catch(Z){$={error:Z}}finally{try{X&&!X.done&&(V=Q.return)&&V.call(Q)}finally{if($)throw $.error}}},W=this;try{for(var K=F.__values(B.statusEffects),z=K.next();!z.done;z=K.next()){V(z.value)}}catch(Y){G={error:Y}}finally{try{z&&!z.done&&($=K.return)&&$.call(K)}finally{if(G)throw G.error}}}},k.prototype.getStatusEffectTargets=function(k,B,U,F){var G=this.getUnitsFromTeamType(k,B.team,U.teamId),$=G.filter((function(k){return k!==U&&k!==F}));switch(B.unit){case dt.ESpellUnitTarget.Team:return G;case dt.ESpellUnitTarget.Allies:return $;case dt.ESpellUnitTarget.Self:return G.includes(U)?[U]:[];case dt.ESpellUnitTarget.Single:return G.includes(F)?[F]:[];case dt.ESpellUnitTarget.Random:return[j.sample(G)];case dt.ESpellUnitTarget.Ally:var H=j.sample($);return H?[H]:[];default:throw new q.BattleError("Status effect target unit type:".concat(B.unit," is unsupported"))}},k.prototype.processSpellFlags=function(k,B,U){U.flags=B.getFlags();var F=B.findFlag(ct.ESpellFlag.ChangeHp);F&&(U.damage=F.flagValue?-1*F.flagValue*k.maxHealth:0,U.setDamageInformationFlag(et.EDamageInformation.Heal))},k.prototype.limitDamage=function(k,B,U){return this._battleConstants.getDamageLimit(k.id===this._battleConstants.aoaSpellId).clamp(B)},k.prototype.calculateMultipliers=function(k,B,U,F){var G,H,V=this.getUnitElements(k);V.push(U.element);var W=this._battleConstants.getBestElementalAdvantageType(V,B.element,U.element),q=this._battleConstants.getSpellElementalMultiplier(W,B.element),K=this._battleConstants.getElementalAdvantage(W,B.element);K===nt.EElementalAdvantage.Strong?F.setDamageInformationFlag(et.EDamageInformation.Effective):K===nt.EElementalAdvantage.Weak&&F.setDamageInformationFlag(et.EDamageInformation.Ineffective);var z=k.getStat(X.EStat.Speed)>B.getStat(X.EStat.Speed)?k.getStat(X.EStat.Speed)-B.getStat(X.EStat.Speed):0,Y=0,Q=0,Z=U.findFlag(ct.ESpellFlag.NoDodge)?1:this.calculateHitChance(k,B,U);if(ot.Util.isDebugEnabled()){var J=null===(G=this._affixStateDataProvider.getAffixesForUnit(B.id).find((function(k){return k.type===$.EAffixType.AlwaysDodge||k.type===$.EAffixType.NeverDodge})))||void 0===G?void 0:G.type;J===$.EAffixType.AlwaysDodge?Z=0:J===$.EAffixType.NeverDodge&&(Z=1)}var st=z/this._battleConstants.getDivisor(X.EDivisor.Critical),at=this._battleConstants.criticalHitChanceBonus,rt=(k.getStat(X.EStat.CritChance)+st+this.getIncomingCritChanceBonus(B))*at;Math.random()<=Z?Math.random()0&&(j=(j+$*U.baseDamage*H)/(H+1));var V=this.calculateTargetDefenceRate(B);return U.element===st.EElementType.Physical&&(j*=this._battleConstants.physicalMultiplier),j*V},k.prototype.calculateSpellPower=function(k){var B=k.unit.getStat(X.EStat.Power);return this._spellLevelBonusConstants.getSpellPower({casterValue:B,spellBaseValue:k.baseDamage,upgradeType:k.upgradeType,level:k.unit.level})},k.prototype.calculateTargetDefenceRate=function(k){var B,U,F,G,j=k.getStat(X.EStat.Defence),$=null!==(B=this._combatFormulaScalingConstants.getDefenceFormulaCoef(k.level))&&void 0!==B?B:1,H=null!==(U=this._combatFormulaScalingConstants.getDefenceFormulaExponent(k.level))&&void 0!==U?U:1,V=$*Math.pow(j,H),W=null!==(F=this._combatFormulaScalingConstants.getDefenceLevelAverage(k.level))&&void 0!==F?F:0,q=null!==(G=this._combatFormulaScalingConstants.getDefenceAveragePower)&&void 0!==G?G:0;return W>0&&(V=(V+W*q)/(q+1)),V},k.prototype.getAdditiveDamageMultiplier=function(k,B){var U,G,j=this._affixStateDataProvider.getAffixesForUnit(k.id).filter((function(k){return k.type===$.EAffixType.AdditiveDamageMultiplier}));if(!j.length)return 0;var H=0;try{for(var V=F.__values(j),W=V.next();!W.done;W=V.next()){var q=W.value;q.element&&!ot.Util.singleOrArrayIncludes(B,q.element)||(H+=q.additiveMultiplier)}}catch(K){U={error:K}}finally{try{W&&!W.done&&(G=V.return)&&G.call(V)}finally{if(U)throw U.error}}return+H.toFixed(2)},k.prototype.getIncomingCritChanceBonus=function(k){var B,U,G=this._affixStateDataProvider.getAffixesForUnit(k.id).filter((function(k){return k.type===$.EAffixType.IncomingCritChanceBonus}));if(!G.length)return 0;var H=0;try{for(var V=F.__values(G),W=V.next();!W.done;W=V.next()){var q=W.value;H+=j.random(q.multiplier.min,q.multiplier.max)}}catch(K){B={error:K}}finally{try{W&&!W.done&&(U=V.return)&&U.call(V)}finally{if(B)throw B.error}}return+H.toFixed(2)},k.prototype.getUnitElements=function(k){var B=this._affixStateDataProvider.getAffixesForUnit(k.id).filter((function(k){return k.type===$.EAffixType.BonusElement})),U=[];return B.forEach((function(k){U.push(k.element)})),U},k.prototype.getIsStatGrowthBoss=function(k){return this.bossStatGrowths.includes(k)},F.__decorate([(0,G.inject)(W.BattleConstants),F.__metadata("design:type",W.BattleConstants)],k.prototype,"_battleConstants",void 0),F.__decorate([(0,G.inject)(z.SpellLevelBonusConstants),F.__metadata("design:type",z.SpellLevelBonusConstants)],k.prototype,"_spellLevelBonusConstants",void 0),F.__decorate([(0,G.inject)(K.CombatFormulaScalingConstants),F.__metadata("design:type",K.CombatFormulaScalingConstants)],k.prototype,"_combatFormulaScalingConstants",void 0),F.__decorate([(0,G.inject)(Q.AffixStateDataProvider),F.__metadata("design:type",Q.AffixStateDataProvider)],k.prototype,"_affixStateDataProvider",void 0),F.__decorate([(0,G.inject)(V.BattleController),F.__metadata("design:type",V.BattleController)],k.prototype,"_battleController",void 0),F.__decorate([(0,G.inject)(Y.StateUpdateManager),F.__metadata("design:type",Y.StateUpdateManager)],k.prototype,"_stateUpdateManager",void 0),k=F.__decorate([(0,G.injectable)()],k)}();B.SpellCastUtil=lt},98239:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.SpellEffectInstance=void 0;var F=U(54705),G=function(){function k(k,B){this.damage=0,this.damageInformation=F.EDamageInformation.None,this.flags=[],this.affixes=[],this.removedAffixes=[],this.statusEffectsAdded=[],this.caster=k,this.target=B}return k.prototype.isDamageInformationFlagSet=function(k){return(this.damageInformation&k)===k},k.prototype.setDamageInformationFlag=function(k){this.damageInformation|=k},k.prototype.clearDamageInformationFlag=function(k){this.damageInformation&=~k},k}();B.SpellEffectInstance=G},88250:(k,B)=>{"use strict";var U,F,G;Object.defineProperty(B,"__esModule",{value:!0}),B.ESpellDelivery=B.EAffixStatusEffect=B.ESpellFlag=void 0,function(k){k.ChangeHp="Change-HP",k.ChangeMp="Change-MP",k.Rescue="Rescue",k.StealUnit="Switch-Sides",k.ChangeCooldown="Change-Timers",k.NoDamage="No-Damage",k.NoDodge="No-Dodge"}(U||(B.ESpellFlag=U={})),function(k){k.Burning="burning",k.Confused="confused",k.Frozen="frozen",k.Regen="regen",k.Shocked="shocked"}(F||(B.EAffixStatusEffect=F={})),function(k){k.Melee="melee",k.Projectile="projectile",k.Above="above",k.Below="below",k.Direct="direct"}(G||(B.ESpellDelivery=G={}))},66020:(k,B)=>{"use strict";var U,F;Object.defineProperty(B,"__esModule",{value:!0}),B.ESpellTeamTarget=B.ESpellUnitTarget=void 0,function(k){k.Self="self",k.Ally="ally",k.Allies="allies",k.Single="single",k.Team="team",k.Row="row",k.Random="random"}(U||(B.ESpellUnitTarget=U={})),function(k){k.Enemy="enemy",k.Own="own",k.Any="any",k.All="all"}(F||(B.ESpellTeamTarget=F={}))},9664:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EStatusEffectType=void 0,function(k){k.DOT="DOT",k.HOT="HOT",k.Bomb="bomb",k.Gift="gift",k.Buff="buff",k.Debuff="debuff"}(U||(B.EStatusEffectType=U={}))},24439:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(38641),B),F.__exportStar(U(12634),B),F.__exportStar(U(98239),B),F.__exportStar(U(88250),B),F.__exportStar(U(66020),B),F.__exportStar(U(9664),B)},87584:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.Team=void 0;var F=U(41334),G=U(21073),j=function(){function k(k,B){this.id=k,this._container=B}return k.prototype.getMembers=function(){var k=this;return this._container.get(F.BattleStateDataProvider).getUnitsOnTeam(this.id).map((function(B){return k._container.getNamed(G.Unit,B)}))},k.prototype.isDefeated=function(){return this.getMembers().every((function(k){return k.isDefeated()}))},k}();B.Team=j},4497:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),U(17498).__exportStar(U(87584),B)},15855:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},71211:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},41866:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.ETeamId=void 0,function(k){k.Home="home",k.Away="away"}(U||(B.ETeamId=U={}))},11454:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EBattleAction=void 0,function(k){k.CastSpell="castSpell",k.UseConsumable="useConsumable",k.RescuePet="rescuePet",k.PowerUp="powerUp",k.EscapeBattle="escapeBattle",k.Fumble="fumble"}(U||(B.EBattleAction=U={}))},58690:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EBattleStateUpdate=void 0,function(k){k.SetActiveUnit="setActiveUnit",k.CastSpell="castSpell",k.Escape="escape",k.DefeatUnit="defeatUnit",k.ModifyMp="modifyMp",k.ModifyLevel="modifyLevel",k.ModifySpellCooldown="modifySpellCooldown",k.ModifyUnitTeam="modifyUnitTeam",k.AddUnit="addUnit",k.ReviveUnit="reviveUnit",k.AddAffix="addAffix",k.RemoveAffix="removeAffix",k.ModifyAffixDuration="modifyAffixDuration",k.AddStatusEffect="addStatusEffect",k.TriggerStatusEffect="triggerStatusEffect",k.RemoveStatusEffect="removeStatusEffect",k.ModifyStatusEffect="modifyStatusEffect",k.SkipTurn="skipTurn",k.EndBattle="endBattle",k.NewRound="newRound",k.CustomEvent="event",k.DebugMessage="debugMessage"}(U||(B.EBattleStateUpdate=U={}))},54705:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EDamageInformation=void 0,function(k){k[k.None=0]="None",k[k.CriticalHit=1]="CriticalHit",k[k.Effective=2]="Effective",k[k.Ineffective=4]="Ineffective",k[k.Missed=8]="Missed",k[k.Heal=16]="Heal",k[k.Fumble=32]="Fumble",k[k.Absorb=64]="Absorb",k[k.Reflected=128]="Reflected",k[k.Dodge=256]="Dodge"}(U||(B.EDamageInformation=U={}))},387:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EDebugMessageType=void 0,function(k){k.TurnOrder="turn-order",k.CombatStats="combat-stats",k.RewardScaling="reward-scaling",k.StatusTrigger="status-trigger"}(U||(B.EDebugMessageType=U={}))},56132:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.invertElementType=B.ELegacyElementType=B.EElementType=void 0;var F,G,j=U(9546);!function(k){k.Astral="astral",k.Fire="fire",k.Ice="ice",k.Physical="physical",k.Plant="plant",k.Shadow="shadow",k.Storm="storm",k.Water="water",k.Neutral="neutral"}(F||(B.EElementType=F={})),function(k){k.Astral="astral",k.Fire="fire",k.Ice="ice",k.Physical="physical",k.Plant="plant",k.Shadow="shadow",k.Storm="storm",k.Water="water",k.Neutral="neutral",k.Earth="earth",k.Wizard="wizard",k.Mech="mech"}(G||(B.ELegacyElementType=G={})),B.invertElementType=function(k){var B=j.Util.guaranteeArray(k);return Object.values(F).filter((function(k){return!B.includes(k)}))}},50532:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EElementalAdvantage=void 0,function(k){k[k.Strong=0]="Strong",k[k.Weak=1]="Weak",k[k.Neutral=2]="Neutral"}(U||(B.EElementalAdvantage=U={}))},47747:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EStatGrowthTrackName=void 0,function(k){k.StatsCommon="statsCom",k.StatsUncommon="statsUnc",k.StatsRare="statsRar",k.StatsHeroic="statsHer",k.StatsLegendary="statsLeg",k.Default="default",k.Wizard="wizard",k.PuppetMaster="puppetMaster",k.Boss="boss",k.Miniboss="miniboss",k.IllusionBoss="illusionBoss",k.DragonBoss="dragonBoss",k.HoodedWizard="hoodedWizard",k.Pippet="pippet"}(U||(B.EStatGrowthTrackName=U={}))},7178:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},38041:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(15855),B),F.__exportStar(U(71211),B),F.__exportStar(U(41866),B),F.__exportStar(U(11454),B),F.__exportStar(U(58690),B),F.__exportStar(U(54705),B),F.__exportStar(U(387),B),F.__exportStar(U(56132),B),F.__exportStar(U(50532),B),F.__exportStar(U(47747),B),F.__exportStar(U(7178),B)},21073:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.Unit=void 0;var F=U(17498),G=U(95891),j=U(81327),$=U(1191),H=U(26342),V=U(18902),W=U(51448),q=U(15907),K=U(51648),z=U(36700),Y=U(44503),Q=U(82825),X=U(73566),Z=U(58690),J=U(9546),tt=U(89647),et=function(){function k(k,B){this.id=k,this._container=B,this._unitStateData=B.getNamed(X.UnitStateDataProvider,k).unitStateData,this._affixStateDataProvider=B.get(z.AffixStateDataProvider),this._statusEffectStateDataProvider=B.get(Q.StatusEffectStateDataProvider)}return Object.defineProperty(k.prototype,"type",{get:function(){return this._unitStateData.type},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"passive",{get:function(){var k;return null!==(k=this._unitStateData.passive)&&void 0!==k&&k},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"rarity",{get:function(){return this._unitStateData.rarity},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"health",{get:function(){return this._unitStateData.health.current},set:function(k){this._unitStateData.health.current=G.clamp(k,0,this.maxHealth)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"maxHealth",{get:function(){return this._unitStateData.health.max},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"mp",{get:function(){return this._unitStateData.mp.current},set:function(k){this._unitStateData.mp.current=G.clamp(k,0,this.maxMp)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"maxMp",{get:function(){return this._unitStateData.mp.max},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"level",{get:function(){var k;return this._unitStateData.level+(null!==(k=this._unitStateData.chargedLevel)&&void 0!==k?k:0)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"mergeRank",{get:function(){var k;return null!==(k=this._unitStateData.mergeRank)&&void 0!==k?k:0},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"statGrowthTrack",{get:function(){return this._unitStateData.statGrowthTrackName},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"teamId",{get:function(){return this._unitStateData.teamId},set:function(k){this._unitStateData.teamId=k},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"spells",{get:function(){var k,B=this;return null!==(k=this._spells)&&void 0!==k?k:this._spells=this._unitStateData.spells.map((function(k){return B._container.getByIds(tt.UnitSpell,B.id,k.spellId)})).filter((function(k){return k}))},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"loadout",{get:function(){return this._unitStateData.loadout},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"currentLoadout",{get:function(){return this._unitStateData.currentLoadout},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"battleStatus",{get:function(){return this._unitStateData.battleStatus},set:function(k){this._unitStateData.battleStatus=k},enumerable:!1,configurable:!0}),k.prototype.removeFromCurrentLoadout=function(k){var B=this._unitStateData.currentLoadout;J.Util.assertDefined(B,"Current loadout does not exist");var U=B.indexOf(k);if(U<0)throw new q.BattleError('Spell id "'.concat(k,'" not found in current loadout'));B.splice(U,1)},k.prototype.resetCurrentLoadout=function(){this._unitStateData.currentLoadout=G.cloneDeep(this._unitStateData.loadout)},Object.defineProperty(k.prototype,"element",{get:function(){return this._unitStateData.element},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"catchChance",{get:function(){return this._unitStateData.catchChance},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"catchHealth",{get:function(){var k;return null!==(k=this._unitStateData.catchHealth)&&void 0!==k?k:Math.round(this.maxHealth*this._container.get(W.BattleConstants).rescueDamageThreshold)},enumerable:!1,configurable:!0}),k.prototype.startTurn=function(){var k,B;try{for(var U=F.__values(this.getAffixes()),G=U.next();!G.done;G=U.next()){var j=G.value;$.AffixUtils.hasWhenToTrigger(j)&&j.whenToTrigger===V.EWhenToTrigger.StartOfTurn&&this._affixStateDataProvider.triggerAffix(this,j,this._statusEffectStateDataProvider.getStatusEffectForAffix(j.id)),!j.duration||j.duration.whenToReduce!==H.EWhenToReduce.StartOfTurn&&j.duration.whenToReduce||this._affixStateDataProvider.reduceAffixDuration(this,j,1)}}catch(W){k={error:W}}finally{try{G&&!G.done&&(B=U.return)&&B.call(U)}finally{if(k)throw k.error}}},k.prototype.endTurn=function(){var k,B,U,G,j;try{for(var W=F.__values(this.getAffixes()),q=W.next();!q.done;q=W.next()){var z=q.value;$.AffixUtils.hasWhenToTrigger(z)&&z.whenToTrigger===V.EWhenToTrigger.EndOfTurn&&this._affixStateDataProvider.triggerAffix(this,z,this._statusEffectStateDataProvider.getStatusEffectForAffix(z.id)),(null===(j=z.duration)||void 0===j?void 0:j.whenToReduce)===H.EWhenToReduce.EndOfTurn&&this._affixStateDataProvider.reduceAffixDuration(this,z,1)}}catch(J){k={error:J}}finally{try{q&&!q.done&&(B=W.return)&&B.call(W)}finally{if(k)throw k.error}}try{for(var Y=F.__values(this.spells),Q=Y.next();!Q.done;Q=Y.next()){var X=Q.value;X.currentCooldown>0&&(--X.currentCooldown,this._container.get(K.StateUpdateManager).addToBack({type:Z.EBattleStateUpdate.ModifySpellCooldown,unitId:this.id,spellId:X.id,cooldown:X.currentCooldown}))}}catch(tt){U={error:tt}}finally{try{Q&&!Q.done&&(G=Y.return)&&G.call(Y)}finally{if(U)throw U.error}}},k.prototype.isDefeated=function(){return this.health<=0},k.prototype.getBaseStat=function(k){return this._unitStateData.stats[k]},k.prototype.getStat=function(B){var U=this._unitStateData.stats[B],F=this.getAffixes().filter((function(k){return k.type===j.EAffixType.Stat&&k.stat===B})).reduce((function(k,B){var U,F;return k*(null!==(U=B.multiplier)&&void 0!==U?U:1)+(null!==(F=B.amount)&&void 0!==F?F:0)}),U);return k.PERCENTAGE_STATS.includes(B)?F:Math.round(F)},k.prototype.getAffixes=function(){return this._affixStateDataProvider.getAffixesForUnit(this.id)},k.prototype.getStatAffixesDebug=function(k){var B="";return this.getAffixes().filter((function(B){return B.type===j.EAffixType.Stat&&B.stat===k})).forEach((function(k,U){B+="".concat(U+1,". amount: ").concat(k.amount,", multiplier: ").concat(k.multiplier,"\n")})),B},k.PERCENTAGE_STATS=[Y.EStat.CritChance,Y.EStat.CritDamage,Y.EStat.Accuracy,Y.EStat.Dodge,Y.EStat.DodgeDamage],k}();B.Unit=et},89647:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.UnitSpell=void 0;var F=U(17498),G=U(68688),j=U(11282),$=U(38641),H=U(9546),V=U(21073),W=function(k){function B(B,U,F){var $,V=this,W=F.getNamed(G.SpellDataProvider,U);(V=k.call(this,W.spellData)||this)._container=F,V._unitId=B;var q=null===($=F.getByIds(j.UnitSpellStateDataProvider,B,U))||void 0===$?void 0:$.unitSpellStateData;return H.Util.assertDefined(q,"Spell ".concat(U," not available for unit ").concat(B)),V._unitSpellStateData=q,V}return F.__extends(B,k),Object.defineProperty(B.prototype,"isLocked",{get:function(){return this._unitSpellStateData.isLocked},set:function(k){this._unitSpellStateData.isLocked=k},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"currentCooldown",{get:function(){return this._unitSpellStateData.currentCooldown},set:function(k){this._unitSpellStateData.currentCooldown=k},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"unit",{get:function(){var k;return null!==(k=this._unit)&&void 0!==k?k:this._unit=this._container.getNamed(V.Unit,this._unitId)},enumerable:!1,configurable:!0}),B}($.Spell);B.UnitSpell=W},18035:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(21073),B),F.__exportStar(U(89647),B)},9546:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.Util=void 0;var F=U(15907),G=function(){function k(){}return k.isDefined=function(k){return!(null==k)},k.assertDefined=function(k,B){if(void 0===B&&(B="value is not defined"),!this.isDefined(k))throw new F.BattleError("string"==typeof B?B:B())},k.guaranteeArray=function(B){return k.isDefined(B)?Array.isArray(B)?B:[B]:[]},k.singleOrArrayIncludes=function(B,U){return k.guaranteeArray(B).includes(U)},k.generateInstanceId=function(){return Math.random().toString(36).substr(2,9)},k.isDebugEnabled=function(k,B){return void 0===B&&(B=!0),B&&!!process.env.DEBUG&&"false"!==process.env.DEBUG||!!k&&!!process.env[k]&&"false"!==process.env[k]},k.findFirstElementBelowThreshold=function(B,U,F){if(0!==F.length){for(var G,j=0,$=F.length-1;j<=$;){var H=Math.floor((j+$)/2),V=F[H];k.isDefined(V[B])?V[B]>U?$=H-1:(G=V,j=H+1):j=H+1}return G=null!=G?G:F[0],k.isDefined(G[B])?G:void 0}},k.ceiling=function(k,B){return 0===B?k:Math.ceil(Math.abs(k)/Math.abs(B))*Math.abs(B)*Math.sign(k*B)},k.round=function(k,B){return 0===B?k:Math.round(Math.abs(k)/Math.abs(B))*Math.abs(B)*Math.sign(k*B)},k.toFixedTrimmed=function(k,B){return parseFloat(k.toFixed(B)).toString()},k}();B.Util=G},87452:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.ValueRange=void 0;var U=function(){function k(k,B){this._minValue=0,this._maxValue=0,this._minValue=k,this._maxValue=B}return Object.defineProperty(k.prototype,"min",{get:function(){return this._minValue},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"max",{get:function(){return this._maxValue},enumerable:!1,configurable:!0}),k.prototype.isInRange=function(k){return!(kthis._maxValue)},k.prototype.clamp=function(k){return Math.max(Math.min(k,this._maxValue),this._minValue)},k.prototype.getRange=function(){return this._maxValue-this._minValue},k}();B.ValueRange=U},77536:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(87452),B),F.__exportStar(U(9546),B)},33482:(k,B,U)=>{var F;!function(k){!function(B){var F="object"==typeof U.g?U.g:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),G=j(k);function j(k,B){return function(U,F){"function"!=typeof k[U]&&Object.defineProperty(k,U,{configurable:!0,writable:!0,value:F}),B&&B(U,F)}}void 0===F.Reflect?F.Reflect=k:G=j(F.Reflect,G),function(k){var B=Object.prototype.hasOwnProperty,U="function"==typeof Symbol,F=U&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",G=U&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",j="function"==typeof Object.create,$={__proto__:[]}instanceof Array,H=!j&&!$,V={create:j?function(){return Ft(Object.create(null))}:$?function(){return Ft({__proto__:null})}:function(){return Ft({})},has:H?function(k,U){return B.call(k,U)}:function(k,B){return B in k},get:H?function(k,U){return B.call(k,U)?k[U]:void 0}:function(k,B){return k[B]}},W=Object.getPrototypeOf(Function),q="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,K=q||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?kt():Map,z=q||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?Bt():Set,Y=new(q||"function"!=typeof WeakMap?Ut():WeakMap);function Q(k,B,U,F){if(gt(U)){if(!Ct(k))throw new TypeError;if(!It(B))throw new TypeError;return rt(k,B)}if(!Ct(k))throw new TypeError;if(!_t(B))throw new TypeError;if(!_t(F)&&!gt(F)&&!mt(F))throw new TypeError;return mt(F)&&(F=void 0),ot(k,B,U=At(U),F)}function X(k,B){function U(U,F){if(!_t(U))throw new TypeError;if(!gt(F)&&!Dt(F))throw new TypeError;ft(k,B,U,F)}return U}function Z(k,B,U,F){if(!_t(U))throw new TypeError;return gt(F)||(F=At(F)),ft(k,B,U,F)}function J(k,B,U){if(!_t(B))throw new TypeError;return gt(U)||(U=At(U)),ct(k,B,U)}function tt(k,B,U){if(!_t(B))throw new TypeError;return gt(U)||(U=At(U)),dt(k,B,U)}function et(k,B,U){if(!_t(B))throw new TypeError;return gt(U)||(U=At(U)),lt(k,B,U)}function it(k,B,U){if(!_t(B))throw new TypeError;return gt(U)||(U=At(U)),ut(k,B,U)}function st(k,B){if(!_t(k))throw new TypeError;return gt(B)||(B=At(B)),bt(k,B)}function nt(k,B){if(!_t(k))throw new TypeError;return gt(B)||(B=At(B)),pt(k,B)}function at(k,B,U){if(!_t(B))throw new TypeError;gt(U)||(U=At(U));var F=ht(B,U,!1);if(gt(F))return!1;if(!F.delete(k))return!1;if(F.size>0)return!0;var G=Y.get(B);return G.delete(U),G.size>0||Y.delete(B),!0}function rt(k,B){for(var U=k.length-1;U>=0;--U){var F=(0,k[U])(B);if(!gt(F)&&!mt(F)){if(!It(F))throw new TypeError;B=F}}return B}function ot(k,B,U,F){for(var G=k.length-1;G>=0;--G){var j=(0,k[G])(B,U,F);if(!gt(j)&&!mt(j)){if(!_t(j))throw new TypeError;F=j}}return F}function ht(k,B,U){var F=Y.get(k);if(gt(F)){if(!U)return;F=new K,Y.set(k,F)}var G=F.get(B);if(gt(G)){if(!U)return;G=new K,F.set(B,G)}return G}function ct(k,B,U){if(dt(k,B,U))return!0;var F=Lt(B);return!mt(F)&&ct(k,F,U)}function dt(k,B,U){var F=ht(B,U,!1);return!gt(F)&&Tt(F.has(k))}function lt(k,B,U){if(dt(k,B,U))return ut(k,B,U);var F=Lt(B);return mt(F)?void 0:lt(k,F,U)}function ut(k,B,U){var F=ht(B,U,!1);if(!gt(F))return F.get(k)}function ft(k,B,U,F){ht(U,F,!0).set(k,B)}function bt(k,B){var U=pt(k,B),F=Lt(k);if(null===F)return U;var G=bt(F,B);if(G.length<=0)return U;if(U.length<=0)return G;for(var j=new z,$=[],H=0,V=U;H=0&&k=this._keys.length?(this._index=-1,this._keys=B,this._values=B):this._index++,{value:U,done:!1}}return{value:void 0,done:!0}},k.prototype.throw=function(k){throw this._index>=0&&(this._index=-1,this._keys=B,this._values=B),k},k.prototype.return=function(k){return this._index>=0&&(this._index=-1,this._keys=B,this._values=B),{value:k,done:!0}},k}();return function(){function B(){this._keys=[],this._values=[],this._cacheKey=k,this._cacheIndex=-2}return Object.defineProperty(B.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),B.prototype.has=function(k){return this._find(k,!1)>=0},B.prototype.get=function(k){var B=this._find(k,!1);return B>=0?this._values[B]:void 0},B.prototype.set=function(k,B){var U=this._find(k,!0);return this._values[U]=B,this},B.prototype.delete=function(B){var U=this._find(B,!1);if(U>=0){for(var F=this._keys.length,G=U+1;G{"use strict";U.r(B),U.d(B,{__assign:()=>j,__asyncDelegator:()=>st,__asyncGenerator:()=>it,__asyncValues:()=>nt,__await:()=>et,__awaiter:()=>q,__classPrivateFieldGet:()=>ct,__classPrivateFieldIn:()=>lt,__classPrivateFieldSet:()=>dt,__createBinding:()=>z,__decorate:()=>H,__exportStar:()=>Y,__extends:()=>G,__generator:()=>K,__importDefault:()=>ht,__importStar:()=>ot,__makeTemplateObject:()=>at,__metadata:()=>W,__param:()=>V,__read:()=>X,__rest:()=>$,__spread:()=>Z,__spreadArray:()=>tt,__spreadArrays:()=>J,__values:()=>Q});var F=function(k,B){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,B){k.__proto__=B}||function(k,B){for(var U in B)Object.prototype.hasOwnProperty.call(B,U)&&(k[U]=B[U])})(k,B)};function G(k,B){if("function"!=typeof B&&null!==B)throw new TypeError("Class extends value "+String(B)+" is not a constructor or null");function U(){this.constructor=k}F(k,B),k.prototype=null===B?Object.create(B):(U.prototype=B.prototype,new U)}var j=function(){return(j=Object.assign||function(k){for(var B,U=1,F=arguments.length;U=0;H--)(G=k[H])&&($=(j<3?G($):j>3?G(B,U,$):G(B,U))||$);return j>3&&$&&Object.defineProperty(B,U,$),$}function V(k,B){return function(U,F){B(U,F,k)}}function W(k,B){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,B)}function q(k,B,U,F){return new(U||(U=Promise))((function(G,j){function $(k){try{V(F.next(k))}catch(e){j(e)}}function H(k){try{V(F.throw(k))}catch(e){j(e)}}function V(k){var B;k.done?G(k.value):(B=k.value,B instanceof U?B:new U((function(k){k(B)}))).then($,H)}V((F=F.apply(k,B||[])).next())}))}function K(k,B){var U,F,G,j,$={label:0,sent:function(){if(1&G[0])throw G[1];return G[1]},trys:[],ops:[]};return j={next:H(0),throw:H(1),return:H(2)},"function"==typeof Symbol&&(j[Symbol.iterator]=function(){return this}),j;function H(j){return function(H){return function(j){if(U)throw new TypeError("Generator is already executing.");for(;$;)try{if(U=1,F&&(G=2&j[0]?F.return:j[0]?F.throw||((G=F.return)&&G.call(F),0):F.next)&&!(G=G.call(F,j[1])).done)return G;switch(F=0,G&&(j=[2&j[0],G.value]),j[0]){case 0:case 1:G=j;break;case 4:return $.label++,{value:j[1],done:!1};case 5:$.label++,F=j[1],j=[0];continue;case 7:j=$.ops.pop(),$.trys.pop();continue;default:if(!(G=$.trys,(G=G.length>0&&G[G.length-1])||6!==j[0]&&2!==j[0])){$=0;continue}if(3===j[0]&&(!G||j[1]>G[0]&&j[1]=k.length&&(k=void 0),{value:k&&k[F++],done:!k}}};throw new TypeError(B?"Object is not iterable.":"Symbol.iterator is not defined.")}function X(k,B){var U="function"==typeof Symbol&&k[Symbol.iterator];if(!U)return k;var F,G,j=U.call(k),$=[];try{for(;(void 0===B||B-- >0)&&!(F=j.next()).done;)$.push(F.value)}catch(H){G={error:H}}finally{try{F&&!F.done&&(U=j.return)&&U.call(j)}finally{if(G)throw G.error}}return $}function Z(){for(var k=[],B=0;B1||H(k,B)}))})}function H(k,B){try{(U=G[k](B)).value instanceof et?Promise.resolve(U.value.v).then(V,W):q(j[0][2],U)}catch(e){q(j[0][3],e)}var U}function V(k){H("next",k)}function W(k){H("throw",k)}function q(k,B){k(B),j.shift(),j.length&&H(j[0][0],j[0][1])}}function st(k){var B,U;return B={},F("next"),F("throw",(function(k){throw k})),F("return"),B[Symbol.iterator]=function(){return this},B;function F(F,G){B[F]=k[F]?function(B){return(U=!U)?{value:et(k[F](B)),done:"return"===F}:G?G(B):B}:G}}function nt(k){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var B,U=k[Symbol.asyncIterator];return U?U.call(k):(k=Q(k),B={},F("next"),F("throw"),F("return"),B[Symbol.asyncIterator]=function(){return this},B);function F(U){B[U]=k[U]&&function(B){return new Promise((function(F,G){(function(k,B,U,F){Promise.resolve(F).then((function(B){k({value:B,done:U})}),B)})(F,G,(B=k[U](B)).done,B.value)}))}}}function at(k,B){return Object.defineProperty?Object.defineProperty(k,"raw",{value:B}):k.raw=B,k}var rt=Object.create?function(k,B){Object.defineProperty(k,"default",{enumerable:!0,value:B})}:function(k,B){k.default=B};function ot(k){if(k&&k.__esModule)return k;var B={};if(null!=k)for(var U in k)"default"!==U&&Object.prototype.hasOwnProperty.call(k,U)&&z(B,k,U);return rt(B,k),B}function ht(k){return k&&k.__esModule?k:{default:k}}function ct(k,B,U,F){if("a"===U&&!F)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof B?k!==B||!F:!B.has(k))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===U?F:"a"===U?F.call(k):F?F.value:B.get(k)}function dt(k,B,U,F,G){if("m"===F)throw new TypeError("Private method is not writable");if("a"===F&&!G)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof B?k!==B||!G:!B.has(k))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===F?G.call(k,U):G?G.value=U:B.set(k,U),U}function lt(k,B){if(null===B||"object"!=typeof B&&"function"!=typeof B)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof k?B===k:k.has(B)}},68910:k=>{"use strict";k.exports=window.PIXI},88225:k=>{"use strict";k.exports=window.Sentry},95891:k=>{"use strict";k.exports=window._},79687:k=>{"use strict";k.exports=window.inversify},42634:()=>{},39209:(k,B,U)=>{"use strict";var F=U(76578),G="undefined"==typeof globalThis?U.g:globalThis;k.exports=function(){for(var k=[],B=0;B{"use strict";U.d(B,{t:()=>X});var F=[],G=[],j={},$={},H={};function V(k){return"string"==typeof k?new RegExp("^"+k+"$","i"):k}function W(k,B){return k===B?B:k===k.toLowerCase()?B.toLowerCase():k===k.toUpperCase()?B.toUpperCase():k[0]===k[0].toUpperCase()?B.charAt(0).toUpperCase()+B.substr(1).toLowerCase():B.toLowerCase()}function q(k,B){return k.replace(/\$(\d{1,2})/g,(function(k,U){return B[U]||""}))}function K(k,B){return k.replace(B[0],(function(U,F){var G=q(B[1],arguments);return W(""===U?k[F-1]:U,G)}))}function z(k,B,U){if(!k.length||j.hasOwnProperty(k))return B;for(var F=U.length;F--;){var G=U[F];if(G[0].test(B))return K(B,G)}return B}function Y(k,B,U){return function(F){var G=F.toLowerCase();return B.hasOwnProperty(G)?W(F,G):k.hasOwnProperty(G)?W(F,k[G]):z(G,F,U)}}function Q(k,B,U){return function(F){var G=F.toLowerCase();return!!B.hasOwnProperty(G)||!k.hasOwnProperty(G)&&z(G,G,U)===G}}function X(k,B,U){return(U?B+" ":"")+(1===B?X.singular(k):X.plural(k))}X.plural=Y(H,$,F),X.isPlural=Q(H,$,F),X.singular=Y($,H,G),X.isSingular=Q($,H,G),X.addPluralRule=function(k,B){F.push([V(k),B])},X.addSingularRule=function(k,B){G.push([V(k),B])},X.addUncountableRule=function(k){"string"!=typeof k?(X.addPluralRule(k,"$0"),X.addSingularRule(k,"$0")):j[k.toLowerCase()]=!0},X.addIrregularRule=function(k,B){B=B.toLowerCase(),k=k.toLowerCase(),H[k]=B,$[B]=k},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["my","our"],["its","their"],["his","their"],["her","their"],["mosquito","mosquitoes"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(k){return X.addIrregularRule(k[0],k[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(k){return X.addPluralRule(k[0],k[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/(dg|ss|ois|lk|ok|wn|mb|th|ch|ec|oal|is|ck|ix|sser|ts|wb)ies$/i,"$1ie"],[/\b(l|(?:neck|cross|hog|aun)?t|coll|faer|food|gen|goon|group|hipp|junk|vegg|(?:pork)?p|charl|calor|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(k){return X.addSingularRule(k[0],k[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hertz","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(X.addUncountableRule)},44329:(k,B,U)=>{"use strict";U.d(B,{Ak:()=>F});let F=(k=21)=>crypto.getRandomValues(new Uint8Array(k)).reduce(((k,B)=>k+=(B&=63)<36?B.toString(36):B<62?(B-26).toString(36).toUpperCase():B>62?"-":"_"),"")},92661:(k,B,U)=>{"use strict";U.d(B,{YOg:()=>Zs,zMY:()=>qs,k5n:()=>hn,Whr:()=>Vs,RZV:()=>Tn,aig:()=>$s,Ikc:()=>tn,g1P:()=>rn,YjP:()=>_s,KCZ:()=>sn,L5J:()=>zs});Object.freeze({status:"aborted"});function F(k,B,U){function F(U,F){var G;Object.defineProperty(U,"_zod",{value:U._zod??{},enumerable:!1}),(G=U._zod).traits??(G.traits=new Set),U._zod.traits.add(k),B(U,F);for(const k in $.prototype)k in U||Object.defineProperty(U,k,{value:$.prototype[k].bind(U)});U._zod.constr=$,U._zod.def=F}const G=U?.Parent??Object;class j extends G{}function $(k){var B;const G=U?.Parent?new j:this;F(G,k),(B=G._zod).deferred??(B.deferred=[]);for(const U of G._zod.deferred)U();return G}return Object.defineProperty(j,"name",{value:k}),Object.defineProperty($,"init",{value:F}),Object.defineProperty($,Symbol.hasInstance,{value:B=>!!(U?.Parent&&B instanceof U.Parent)||B?._zod?.traits?.has(k)}),Object.defineProperty($,"name",{value:k}),$}Symbol("zod_brand");class G extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class j extends Error{constructor(k){super(`Encountered unidirectional transform during encode: ${k}`),this.name="ZodEncodeError"}}const $={};function H(k){return k&&Object.assign($,k),$}function V(k,B="|"){return k.map((k=>ct(k))).join(B)}function W(k,B){return"bigint"==typeof B?B.toString():B}function q(k){return{get value(){{const B=k();return Object.defineProperty(this,"value",{value:B}),B}}}}function K(k){return null==k}function z(k){const B=k.startsWith("^")?1:0,U=k.endsWith("$")?k.length-1:k.length;return k.slice(B,U)}const Y=Symbol("evaluating");function Q(k,B,U){let F;Object.defineProperty(k,B,{get(){if(F!==Y)return void 0===F&&(F=Y,F=U()),F},set(U){Object.defineProperty(k,B,{value:U})},configurable:!0})}function X(k,B,U){Object.defineProperty(k,B,{value:U,writable:!0,enumerable:!0,configurable:!0})}function Z(...k){const B={};for(const U of k){const k=Object.getOwnPropertyDescriptors(U);Object.assign(B,k)}return Object.defineProperties({},B)}function J(k){return JSON.stringify(k)}const tt="captureStackTrace"in Error?Error.captureStackTrace:(...k)=>{};function et(k){return"object"==typeof k&&null!==k&&!Array.isArray(k)}const it=q((()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(k){return!1}}));function st(k){if(!1===et(k))return!1;const B=k.constructor;if(void 0===B)return!0;const U=B.prototype;return!1!==et(U)&&!1!==Object.prototype.hasOwnProperty.call(U,"isPrototypeOf")}function nt(k){return st(k)?{...k}:Array.isArray(k)?[...k]:k}const at=new Set(["string","number","symbol"]);new Set(["string","number","bigint","boolean","symbol","undefined"]);function rt(k){return k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ot(k,B,U){const F=new k._zod.constr(B??k._zod.def);return B&&!U?.parent||(F._zod.parent=k),F}function ht(k){const B=k;if(!B)return{};if("string"==typeof B)return{error:()=>B};if(void 0!==B?.message){if(void 0!==B?.error)throw new Error("Cannot specify both `message` and `error` params");B.error=B.message}return delete B.message,"string"==typeof B.error?{...B,error:()=>B.error}:B}function ct(k){return"bigint"==typeof k?k.toString()+"n":"string"==typeof k?`"${k}"`:`${k}`}const dt={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function lt(k,B=0){if(!0===k.aborted)return!0;for(let U=B;U{var U;return(U=B).path??(U.path=[]),B.path.unshift(k),B}))}function ft(k){return"string"==typeof k?k:k?.message}function bt(k,B,U){const F={...k,path:k.path??[]};if(!k.message){const G=ft(k.inst?._zod.def?.error?.(k))??ft(B?.error?.(k))??ft(U.customError?.(k))??ft(U.localeError?.(k))??"Invalid input";F.message=G}return delete F.inst,delete F.continue,B?.reportInput||delete F.input,F}function pt(k){return Array.isArray(k)?"array":"string"==typeof k?"string":"unknown"}function vt(...k){const[B,U,F]=k;return"string"==typeof B?{message:B,code:"custom",input:U,inst:F}:{...B}}const gt=(k,B)=>{k.name="$ZodError",Object.defineProperty(k,"_zod",{value:k._zod,enumerable:!1}),Object.defineProperty(k,"issues",{value:B,enumerable:!1}),k.message=JSON.stringify(B,W,2),Object.defineProperty(k,"toString",{value:()=>k.message,enumerable:!1})},mt=F("$ZodError",gt),yt=F("$ZodError",gt,{Parent:Error});const _t=k=>(B,U,F,j)=>{const $=F?Object.assign(F,{async:!1}):{async:!1},V=B._zod.run({value:U,issues:[]},$);if(V instanceof Promise)throw new G;if(V.issues.length){const B=new(j?.Err??k)(V.issues.map((k=>bt(k,$,H()))));throw tt(B,j?.callee),B}return V.value},Et=k=>async(B,U,F,G)=>{const j=F?Object.assign(F,{async:!0}):{async:!0};let $=B._zod.run({value:U,issues:[]},j);if($ instanceof Promise&&($=await $),$.issues.length){const B=new(G?.Err??k)($.issues.map((k=>bt(k,j,H()))));throw tt(B,G?.callee),B}return $.value},wt=k=>(B,U,F)=>{const j=F?{...F,async:!1}:{async:!1},$=B._zod.run({value:U,issues:[]},j);if($ instanceof Promise)throw new G;return $.issues.length?{success:!1,error:new(k??mt)($.issues.map((k=>bt(k,j,H()))))}:{success:!0,data:$.value}},Tt=wt(yt),St=k=>async(B,U,F)=>{const G=F?Object.assign(F,{async:!0}):{async:!0};let j=B._zod.run({value:U,issues:[]},G);return j instanceof Promise&&(j=await j),j.issues.length?{success:!1,error:new k(j.issues.map((k=>bt(k,G,H()))))}:{success:!0,data:j.value}},At=St(yt),Ct=k=>(B,U,F)=>{const G=F?Object.assign(F,{direction:"backward"}):{direction:"backward"};return _t(k)(B,U,G)},Ot=k=>(B,U,F)=>_t(k)(B,U,F),It=k=>async(B,U,F)=>{const G=F?Object.assign(F,{direction:"backward"}):{direction:"backward"};return Et(k)(B,U,G)},Dt=k=>async(B,U,F)=>Et(k)(B,U,F),Rt=k=>(B,U,F)=>{const G=F?Object.assign(F,{direction:"backward"}):{direction:"backward"};return wt(k)(B,U,G)},Pt=k=>(B,U,F)=>wt(k)(B,U,F),Mt=k=>async(B,U,F)=>{const G=F?Object.assign(F,{direction:"backward"}):{direction:"backward"};return St(k)(B,U,G)},Nt=k=>async(B,U,F)=>St(k)(B,U,F),xt=/^[cC][^\s-]{8,}$/,Lt=/^[0-9a-z]+$/,kt=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Bt=/^[0-9a-vA-V]{20}$/,Ut=/^[A-Za-z0-9]{27}$/,Ft=/^[a-zA-Z0-9_-]{21}$/,Gt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,jt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,$t=k=>k?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${k}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ht=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const Vt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Wt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,qt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Kt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Yt=/^[A-Za-z0-9_-]*$/,Qt=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Xt=/^\+(?:[0-9]){6,14}[0-9]$/,Zt="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Jt=new RegExp(`^${Zt}$`);function te(k){const B="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof k.precision?-1===k.precision?`${B}`:0===k.precision?`${B}:[0-5]\\d`:`${B}:[0-5]\\d\\.\\d{${k.precision}}`:`${B}(?::[0-5]\\d(?:\\.\\d+)?)?`}const ee=/^-?\d+$/,ie=/^-?\d+(?:\.\d+)?/,se=/^(?:true|false)$/i,ne=/^[^A-Z]*$/,ae=/^[^a-z]*$/;const re=F("$ZodCheck",((k,B)=>{var U;k._zod??(k._zod={}),k._zod.def=B,(U=k._zod).onattach??(U.onattach=[])})),oe={number:"number",bigint:"bigint",object:"date"},he=F("$ZodCheckLessThan",((k,B)=>{re.init(k,B);const U=oe[typeof B.value];k._zod.onattach.push((k=>{const U=k._zod.bag,F=(B.inclusive?U.maximum:U.exclusiveMaximum)??Number.POSITIVE_INFINITY;B.value{(B.inclusive?F.value<=B.value:F.value{re.init(k,B);const U=oe[typeof B.value];k._zod.onattach.push((k=>{const U=k._zod.bag,F=(B.inclusive?U.minimum:U.exclusiveMinimum)??Number.NEGATIVE_INFINITY;B.value>F&&(B.inclusive?U.minimum=B.value:U.exclusiveMinimum=B.value)})),k._zod.check=F=>{(B.inclusive?F.value>=B.value:F.value>B.value)||F.issues.push({origin:U,code:"too_small",minimum:B.value,input:F.value,inclusive:B.inclusive,inst:k,continue:!B.abort})}})),de=F("$ZodCheckMultipleOf",((k,B)=>{re.init(k,B),k._zod.onattach.push((k=>{var U;(U=k._zod.bag).multipleOf??(U.multipleOf=B.value)})),k._zod.check=U=>{if(typeof U.value!=typeof B.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof U.value?U.value%B.value===BigInt(0):0===function(k,B){const U=(k.toString().split(".")[1]||"").length,F=B.toString();let G=(F.split(".")[1]||"").length;if(0===G&&/\d?e-\d?/.test(F)){const k=F.match(/\d?e-(\d?)/);k?.[1]&&(G=Number.parseInt(k[1]))}const j=U>G?U:G;return Number.parseInt(k.toFixed(j).replace(".",""))%Number.parseInt(B.toFixed(j).replace(".",""))/10**j}(U.value,B.value))||U.issues.push({origin:typeof U.value,code:"not_multiple_of",divisor:B.value,input:U.value,inst:k,continue:!B.abort})}})),le=F("$ZodCheckNumberFormat",((k,B)=>{re.init(k,B),B.format=B.format||"float64";const U=B.format?.includes("int"),F=U?"int":"number",[G,j]=dt[B.format];k._zod.onattach.push((k=>{const F=k._zod.bag;F.format=B.format,F.minimum=G,F.maximum=j,U&&(F.pattern=ee)})),k._zod.check=$=>{const H=$.value;if(U){if(!Number.isInteger(H))return void $.issues.push({expected:F,format:B.format,code:"invalid_type",continue:!1,input:H,inst:k});if(!Number.isSafeInteger(H))return void(H>0?$.issues.push({input:H,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:k,origin:F,continue:!B.abort}):$.issues.push({input:H,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:k,origin:F,continue:!B.abort}))}Hj&&$.issues.push({origin:"number",input:H,code:"too_big",maximum:j,inst:k})}})),ue=F("$ZodCheckMaxLength",((k,B)=>{var U;re.init(k,B),(U=k._zod.def).when??(U.when=k=>{const B=k.value;return!K(B)&&void 0!==B.length}),k._zod.onattach.push((k=>{const U=k._zod.bag.maximum??Number.POSITIVE_INFINITY;B.maximum{const F=U.value;if(F.length<=B.maximum)return;const G=pt(F);U.issues.push({origin:G,code:"too_big",maximum:B.maximum,inclusive:!0,input:F,inst:k,continue:!B.abort})}})),fe=F("$ZodCheckMinLength",((k,B)=>{var U;re.init(k,B),(U=k._zod.def).when??(U.when=k=>{const B=k.value;return!K(B)&&void 0!==B.length}),k._zod.onattach.push((k=>{const U=k._zod.bag.minimum??Number.NEGATIVE_INFINITY;B.minimum>U&&(k._zod.bag.minimum=B.minimum)})),k._zod.check=U=>{const F=U.value;if(F.length>=B.minimum)return;const G=pt(F);U.issues.push({origin:G,code:"too_small",minimum:B.minimum,inclusive:!0,input:F,inst:k,continue:!B.abort})}})),be=F("$ZodCheckLengthEquals",((k,B)=>{var U;re.init(k,B),(U=k._zod.def).when??(U.when=k=>{const B=k.value;return!K(B)&&void 0!==B.length}),k._zod.onattach.push((k=>{const U=k._zod.bag;U.minimum=B.length,U.maximum=B.length,U.length=B.length})),k._zod.check=U=>{const F=U.value,G=F.length;if(G===B.length)return;const j=pt(F),$=G>B.length;U.issues.push({origin:j,...$?{code:"too_big",maximum:B.length}:{code:"too_small",minimum:B.length},inclusive:!0,exact:!0,input:U.value,inst:k,continue:!B.abort})}})),pe=F("$ZodCheckStringFormat",((k,B)=>{var U,F;re.init(k,B),k._zod.onattach.push((k=>{const U=k._zod.bag;U.format=B.format,B.pattern&&(U.patterns??(U.patterns=new Set),U.patterns.add(B.pattern))})),B.pattern?(U=k._zod).check??(U.check=U=>{B.pattern.lastIndex=0,B.pattern.test(U.value)||U.issues.push({origin:"string",code:"invalid_format",format:B.format,input:U.value,...B.pattern?{pattern:B.pattern.toString()}:{},inst:k,continue:!B.abort})}):(F=k._zod).check??(F.check=()=>{})})),ve=F("$ZodCheckRegex",((k,B)=>{pe.init(k,B),k._zod.check=U=>{B.pattern.lastIndex=0,B.pattern.test(U.value)||U.issues.push({origin:"string",code:"invalid_format",format:"regex",input:U.value,pattern:B.pattern.toString(),inst:k,continue:!B.abort})}})),ge=F("$ZodCheckLowerCase",((k,B)=>{B.pattern??(B.pattern=ne),pe.init(k,B)})),me=F("$ZodCheckUpperCase",((k,B)=>{B.pattern??(B.pattern=ae),pe.init(k,B)})),ye=F("$ZodCheckIncludes",((k,B)=>{re.init(k,B);const U=rt(B.includes),F=new RegExp("number"==typeof B.position?`^.{${B.position}}${U}`:U);B.pattern=F,k._zod.onattach.push((k=>{const B=k._zod.bag;B.patterns??(B.patterns=new Set),B.patterns.add(F)})),k._zod.check=U=>{U.value.includes(B.includes,B.position)||U.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:B.includes,input:U.value,inst:k,continue:!B.abort})}})),_e=F("$ZodCheckStartsWith",((k,B)=>{re.init(k,B);const U=new RegExp(`^${rt(B.prefix)}.*`);B.pattern??(B.pattern=U),k._zod.onattach.push((k=>{const B=k._zod.bag;B.patterns??(B.patterns=new Set),B.patterns.add(U)})),k._zod.check=U=>{U.value.startsWith(B.prefix)||U.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:B.prefix,input:U.value,inst:k,continue:!B.abort})}})),Ee=F("$ZodCheckEndsWith",((k,B)=>{re.init(k,B);const U=new RegExp(`.*${rt(B.suffix)}$`);B.pattern??(B.pattern=U),k._zod.onattach.push((k=>{const B=k._zod.bag;B.patterns??(B.patterns=new Set),B.patterns.add(U)})),k._zod.check=U=>{U.value.endsWith(B.suffix)||U.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:B.suffix,input:U.value,inst:k,continue:!B.abort})}}));const we=F("$ZodCheckOverwrite",((k,B)=>{re.init(k,B),k._zod.check=k=>{k.value=B.tx(k.value)}}));class Te{constructor(k=[]){this.content=[],this.indent=0,this&&(this.args=k)}indented(k){this.indent+=1,k(this),this.indent-=1}write(k){if("function"==typeof k)return k(this,{execution:"sync"}),void k(this,{execution:"async"});const B=k.split("\n").filter((k=>k)),U=Math.min(...B.map((k=>k.length-k.trimStart().length))),F=B.map((k=>k.slice(U))).map((k=>" ".repeat(2*this.indent)+k));for(const G of F)this.content.push(G)}compile(){return new Function(...this?.args,[...(this?.content??[""]).map((k=>` ${k}`))].join("\n"))}}const Se={major:4,minor:1,patch:12},Ae=F("$ZodType",((k,B)=>{var U;k??(k={}),k._zod.def=B,k._zod.bag=k._zod.bag||{},k._zod.version=Se;const F=[...k._zod.def.checks??[]];k._zod.traits.has("$ZodCheck")&&F.unshift(k);for(const G of F)for(const B of G._zod.onattach)B(k);if(0===F.length)(U=k._zod).deferred??(U.deferred=[]),k._zod.deferred?.push((()=>{k._zod.run=k._zod.parse}));else{const B=(k,B,U)=>{let F,j=lt(k);for(const $ of B){if($._zod.def.when){if(!$._zod.def.when(k))continue}else if(j)continue;const B=k.issues.length,H=$._zod.check(k);if(H instanceof Promise&&!1===U?.async)throw new G;if(F||H instanceof Promise)F=(F??Promise.resolve()).then((async()=>{await H;k.issues.length!==B&&(j||(j=lt(k,B)))}));else{if(k.issues.length===B)continue;j||(j=lt(k,B))}}return F?F.then((()=>k)):k},U=(U,j,$)=>{if(lt(U))return U.aborted=!0,U;const H=B(j,F,$);if(H instanceof Promise){if(!1===$.async)throw new G;return H.then((B=>k._zod.parse(B,$)))}return k._zod.parse(H,$)};k._zod.run=(j,$)=>{if($.skipChecks)return k._zod.parse(j,$);if("backward"===$.direction){const B=k._zod.parse({value:j.value,issues:[]},{...$,skipChecks:!0});return B instanceof Promise?B.then((k=>U(k,j,$))):U(B,j,$)}const H=k._zod.parse(j,$);if(H instanceof Promise){if(!1===$.async)throw new G;return H.then((k=>B(k,F,$)))}return B(H,F,$)}}k["~standard"]={validate:B=>{try{const U=Tt(k,B);return U.success?{value:U.data}:{issues:U.error?.issues}}catch(U){return At(k,B).then((k=>k.success?{value:k.data}:{issues:k.error?.issues}))}},vendor:"zod",version:1}})),Ce=F("$ZodString",((k,B)=>{var U;Ae.init(k,B),k._zod.pattern=[...k?._zod.bag?.patterns??[]].pop()??(U=k._zod.bag,new RegExp(`^${U?`[\\s\\S]{${U?.minimum??0},${U?.maximum??""}}`:"[\\s\\S]*"}$`)),k._zod.parse=(U,F)=>{if(B.coerce)try{U.value=String(U.value)}catch(F){}return"string"==typeof U.value||U.issues.push({expected:"string",code:"invalid_type",input:U.value,inst:k}),U}})),Oe=F("$ZodStringFormat",((k,B)=>{pe.init(k,B),Ce.init(k,B)})),Ie=F("$ZodGUID",((k,B)=>{B.pattern??(B.pattern=jt),Oe.init(k,B)})),De=F("$ZodUUID",((k,B)=>{if(B.version){const k={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[B.version];if(void 0===k)throw new Error(`Invalid UUID version: "${B.version}"`);B.pattern??(B.pattern=$t(k))}else B.pattern??(B.pattern=$t());Oe.init(k,B)})),Re=F("$ZodEmail",((k,B)=>{B.pattern??(B.pattern=Ht),Oe.init(k,B)})),Pe=F("$ZodURL",((k,B)=>{Oe.init(k,B),k._zod.check=U=>{try{const F=U.value.trim(),G=new URL(F);return B.hostname&&(B.hostname.lastIndex=0,B.hostname.test(G.hostname)||U.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Qt.source,input:U.value,inst:k,continue:!B.abort})),B.protocol&&(B.protocol.lastIndex=0,B.protocol.test(G.protocol.endsWith(":")?G.protocol.slice(0,-1):G.protocol)||U.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:B.protocol.source,input:U.value,inst:k,continue:!B.abort})),void(B.normalize?U.value=G.href:U.value=F)}catch(F){U.issues.push({code:"invalid_format",format:"url",input:U.value,inst:k,continue:!B.abort})}}})),Me=F("$ZodEmoji",((k,B)=>{B.pattern??(B.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Oe.init(k,B)})),Ne=F("$ZodNanoID",((k,B)=>{B.pattern??(B.pattern=Ft),Oe.init(k,B)})),xe=F("$ZodCUID",((k,B)=>{B.pattern??(B.pattern=xt),Oe.init(k,B)})),Le=F("$ZodCUID2",((k,B)=>{B.pattern??(B.pattern=Lt),Oe.init(k,B)})),ke=F("$ZodULID",((k,B)=>{B.pattern??(B.pattern=kt),Oe.init(k,B)})),Be=F("$ZodXID",((k,B)=>{B.pattern??(B.pattern=Bt),Oe.init(k,B)})),Ue=F("$ZodKSUID",((k,B)=>{B.pattern??(B.pattern=Ut),Oe.init(k,B)})),Fe=F("$ZodISODateTime",((k,B)=>{B.pattern??(B.pattern=function(k){const B=te({precision:k.precision}),U=["Z"];k.local&&U.push(""),k.offset&&U.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const F=`${B}(?:${U.join("|")})`;return new RegExp(`^${Zt}T(?:${F})$`)}(B)),Oe.init(k,B)})),Ge=F("$ZodISODate",((k,B)=>{B.pattern??(B.pattern=Jt),Oe.init(k,B)})),je=F("$ZodISOTime",((k,B)=>{B.pattern??(B.pattern=new RegExp(`^${te(B)}$`)),Oe.init(k,B)})),$e=F("$ZodISODuration",((k,B)=>{B.pattern??(B.pattern=Gt),Oe.init(k,B)})),He=F("$ZodIPv4",((k,B)=>{B.pattern??(B.pattern=Vt),Oe.init(k,B),k._zod.onattach.push((k=>{k._zod.bag.format="ipv4"}))})),Ve=F("$ZodIPv6",((k,B)=>{B.pattern??(B.pattern=Wt),Oe.init(k,B),k._zod.onattach.push((k=>{k._zod.bag.format="ipv6"})),k._zod.check=U=>{try{new URL(`http://[${U.value}]`)}catch{U.issues.push({code:"invalid_format",format:"ipv6",input:U.value,inst:k,continue:!B.abort})}}})),We=F("$ZodCIDRv4",((k,B)=>{B.pattern??(B.pattern=qt),Oe.init(k,B)})),qe=F("$ZodCIDRv6",((k,B)=>{B.pattern??(B.pattern=Kt),Oe.init(k,B),k._zod.check=U=>{const F=U.value.split("/");try{if(2!==F.length)throw new Error;const[k,B]=F;if(!B)throw new Error;const U=Number(B);if(`${U}`!==B)throw new Error;if(U<0||U>128)throw new Error;new URL(`http://[${k}]`)}catch{U.issues.push({code:"invalid_format",format:"cidrv6",input:U.value,inst:k,continue:!B.abort})}}}));function Ke(k){if(""===k)return!0;if(k.length%4!=0)return!1;try{return atob(k),!0}catch{return!1}}const ze=F("$ZodBase64",((k,B)=>{B.pattern??(B.pattern=zt),Oe.init(k,B),k._zod.onattach.push((k=>{k._zod.bag.contentEncoding="base64"})),k._zod.check=U=>{Ke(U.value)||U.issues.push({code:"invalid_format",format:"base64",input:U.value,inst:k,continue:!B.abort})}}));const Ye=F("$ZodBase64URL",((k,B)=>{B.pattern??(B.pattern=Yt),Oe.init(k,B),k._zod.onattach.push((k=>{k._zod.bag.contentEncoding="base64url"})),k._zod.check=U=>{(function(k){if(!Yt.test(k))return!1;const B=k.replace(/[-_]/g,(k=>"-"===k?"+":"/"));return Ke(B.padEnd(4*Math.ceil(B.length/4),"="))})(U.value)||U.issues.push({code:"invalid_format",format:"base64url",input:U.value,inst:k,continue:!B.abort})}})),Qe=F("$ZodE164",((k,B)=>{B.pattern??(B.pattern=Xt),Oe.init(k,B)}));const Xe=F("$ZodJWT",((k,B)=>{Oe.init(k,B),k._zod.check=U=>{(function(k,B=null){try{const U=k.split(".");if(3!==U.length)return!1;const[F]=U;if(!F)return!1;const G=JSON.parse(atob(F));return!("typ"in G&&"JWT"!==G?.typ||!G.alg||B&&(!("alg"in G)||G.alg!==B))}catch{return!1}})(U.value,B.alg)||U.issues.push({code:"invalid_format",format:"jwt",input:U.value,inst:k,continue:!B.abort})}})),Ze=F("$ZodNumber",((k,B)=>{Ae.init(k,B),k._zod.pattern=k._zod.bag.pattern??ie,k._zod.parse=(U,F)=>{if(B.coerce)try{U.value=Number(U.value)}catch($){}const G=U.value;if("number"==typeof G&&!Number.isNaN(G)&&Number.isFinite(G))return U;const j="number"==typeof G?Number.isNaN(G)?"NaN":Number.isFinite(G)?void 0:"Infinity":void 0;return U.issues.push({expected:"number",code:"invalid_type",input:G,inst:k,...j?{received:j}:{}}),U}})),Je=F("$ZodNumber",((k,B)=>{le.init(k,B),Ze.init(k,B)})),ti=F("$ZodBoolean",((k,B)=>{Ae.init(k,B),k._zod.pattern=se,k._zod.parse=(U,F)=>{if(B.coerce)try{U.value=Boolean(U.value)}catch(j){}const G=U.value;return"boolean"==typeof G||U.issues.push({expected:"boolean",code:"invalid_type",input:G,inst:k}),U}})),ei=F("$ZodUnknown",((k,B)=>{Ae.init(k,B),k._zod.parse=k=>k})),ii=F("$ZodNever",((k,B)=>{Ae.init(k,B),k._zod.parse=(B,U)=>(B.issues.push({expected:"never",code:"invalid_type",input:B.value,inst:k}),B)}));function si(k,B,U){k.issues.length&&B.issues.push(...ut(U,k.issues)),B.value[U]=k.value}const ni=F("$ZodArray",((k,B)=>{Ae.init(k,B),k._zod.parse=(U,F)=>{const G=U.value;if(!Array.isArray(G))return U.issues.push({expected:"array",code:"invalid_type",input:G,inst:k}),U;U.value=Array(G.length);const j=[];for(let k=0;ksi(B,U,k)))):si(H,U,k)}return j.length?Promise.all(j).then((()=>U)):U}}));function ai(k,B,U,F){k.issues.length&&B.issues.push(...ut(U,k.issues)),void 0===k.value?U in F&&(B.value[U]=void 0):B.value[U]=k.value}function ri(k){const B=Object.keys(k.shape);for(const G of B)if(!k.shape?.[G]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${G}": expected a Zod schema`);const U=(F=k.shape,Object.keys(F).filter((k=>"optional"===F[k]._zod.optin&&"optional"===F[k]._zod.optout)));var F;return{...k,keys:B,keySet:new Set(B),numKeys:B.length,optionalKeys:new Set(U)}}function oi(k,B,U,F,G,j){const $=[],H=G.keySet,V=G.catchall._zod,W=V.def.type;for(const q of Object.keys(B)){if(H.has(q))continue;if("never"===W){$.push(q);continue}const G=V.run({value:B[q],issues:[]},F);G instanceof Promise?k.push(G.then((k=>ai(k,U,q,B)))):ai(G,U,q,B)}return $.length&&U.issues.push({code:"unrecognized_keys",keys:$,input:B,inst:j}),k.length?Promise.all(k).then((()=>U)):U}const hi=F("$ZodObject",((k,B)=>{Ae.init(k,B);if(!Object.getOwnPropertyDescriptor(B,"shape")?.get){const k=B.shape;Object.defineProperty(B,"shape",{get:()=>{const U={...k};return Object.defineProperty(B,"shape",{value:U}),U}})}const U=q((()=>ri(B)));Q(k._zod,"propValues",(()=>{const k=B.shape,U={};for(const B in k){const F=k[B]._zod;if(F.values){U[B]??(U[B]=new Set);for(const k of F.values)U[B].add(k)}}return U}));const F=et,G=B.catchall;let j;k._zod.parse=(B,$)=>{j??(j=U.value);const H=B.value;if(!F(H))return B.issues.push({expected:"object",code:"invalid_type",input:H,inst:k}),B;B.value={};const V=[],W=j.shape;for(const k of j.keys){const U=W[k]._zod.run({value:H[k],issues:[]},$);U instanceof Promise?V.push(U.then((U=>ai(U,B,k,H)))):ai(U,B,k,H)}return G?oi(V,H,B,$,U.value,k):V.length?Promise.all(V).then((()=>B)):B}})),ci=F("$ZodObjectJIT",((k,B)=>{hi.init(k,B);const U=k._zod.parse,F=q((()=>ri(B)));let G;const j=et,H=!$.jitless,V=H&&it.value,W=B.catchall;let K;k._zod.parse=($,q)=>{K??(K=F.value);const z=$.value;return j(z)?H&&V&&!1===q?.async&&!0!==q.jitless?(G||(G=(k=>{const B=new Te(["shape","payload","ctx"]),U=F.value,G=k=>{const B=J(k);return`shape[${B}]._zod.run({ value: input[${B}], issues: [] }, ctx)`};B.write("const input = payload.value;");const j=Object.create(null);let $=0;for(const F of U.keys)j[F]="key_"+$++;B.write("const newResult = {};");for(const F of U.keys){const k=j[F],U=J(F);B.write(`const ${k} = ${G(F)};`),B.write(`\n if (${k}.issues.length) {\n payload.issues = payload.issues.concat(${k}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${U}, ...iss.path] : [${U}]\n })));\n }\n \n \n if (${k}.value === undefined) {\n if (${U} in input) {\n newResult[${U}] = undefined;\n }\n } else {\n newResult[${U}] = ${k}.value;\n }\n \n `)}B.write("payload.value = newResult;"),B.write("return payload;");const H=B.compile();return(B,U)=>H(k,B,U)})(B.shape)),$=G($,q),W?oi([],z,$,q,K,k):$):U($,q):($.issues.push({expected:"object",code:"invalid_type",input:z,inst:k}),$)}}));function di(k,B,U,F){for(const j of k)if(0===j.issues.length)return B.value=j.value,B;const G=k.filter((k=>!lt(k)));return 1===G.length?(B.value=G[0].value,G[0]):(B.issues.push({code:"invalid_union",input:B.value,inst:U,errors:k.map((k=>k.issues.map((k=>bt(k,F,H())))))}),B)}const li=F("$ZodUnion",((k,B)=>{Ae.init(k,B),Q(k._zod,"optin",(()=>B.options.some((k=>"optional"===k._zod.optin))?"optional":void 0)),Q(k._zod,"optout",(()=>B.options.some((k=>"optional"===k._zod.optout))?"optional":void 0)),Q(k._zod,"values",(()=>{if(B.options.every((k=>k._zod.values)))return new Set(B.options.flatMap((k=>Array.from(k._zod.values))))})),Q(k._zod,"pattern",(()=>{if(B.options.every((k=>k._zod.pattern))){const k=B.options.map((k=>k._zod.pattern));return new RegExp(`^(${k.map((k=>z(k.source))).join("|")})$`)}}));const U=1===B.options.length,F=B.options[0]._zod.run;k._zod.parse=(G,j)=>{if(U)return F(G,j);let $=!1;const H=[];for(const k of B.options){const B=k._zod.run({value:G.value,issues:[]},j);if(B instanceof Promise)H.push(B),$=!0;else{if(0===B.issues.length)return B;H.push(B)}}return $?Promise.all(H).then((B=>di(B,G,k,j))):di(H,G,k,j)}})),ui=F("$ZodIntersection",((k,B)=>{Ae.init(k,B),k._zod.parse=(k,U)=>{const F=k.value,G=B.left._zod.run({value:F,issues:[]},U),j=B.right._zod.run({value:F,issues:[]},U);return G instanceof Promise||j instanceof Promise?Promise.all([G,j]).then((([B,U])=>bi(k,B,U))):bi(k,G,j)}}));function fi(k,B){if(k===B)return{valid:!0,data:k};if(k instanceof Date&&B instanceof Date&&+k==+B)return{valid:!0,data:k};if(st(k)&&st(B)){const U=Object.keys(B),F=Object.keys(k).filter((k=>-1!==U.indexOf(k))),G={...k,...B};for(const j of F){const U=fi(k[j],B[j]);if(!U.valid)return{valid:!1,mergeErrorPath:[j,...U.mergeErrorPath]};G[j]=U.data}return{valid:!0,data:G}}if(Array.isArray(k)&&Array.isArray(B)){if(k.length!==B.length)return{valid:!1,mergeErrorPath:[]};const U=[];for(let F=0;F{Ae.init(k,B),k._zod.parse=(U,F)=>{const G=U.value;if(!st(G))return U.issues.push({expected:"record",code:"invalid_type",input:G,inst:k}),U;const j=[];if(B.keyType._zod.values){const $=B.keyType._zod.values;U.value={};for(const k of $)if("string"==typeof k||"number"==typeof k||"symbol"==typeof k){const $=B.valueType._zod.run({value:G[k],issues:[]},F);$ instanceof Promise?j.push($.then((B=>{B.issues.length&&U.issues.push(...ut(k,B.issues)),U.value[k]=B.value}))):($.issues.length&&U.issues.push(...ut(k,$.issues)),U.value[k]=$.value)}let H;for(const k in G)$.has(k)||(H=H??[],H.push(k));H&&H.length>0&&U.issues.push({code:"unrecognized_keys",input:G,inst:k,keys:H})}else{U.value={};for(const $ of Reflect.ownKeys(G)){if("__proto__"===$)continue;const V=B.keyType._zod.run({value:$,issues:[]},F);if(V instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(V.issues.length){U.issues.push({code:"invalid_key",origin:"record",issues:V.issues.map((k=>bt(k,F,H()))),input:$,path:[$],inst:k}),U.value[V.value]=V.value;continue}const W=B.valueType._zod.run({value:G[$],issues:[]},F);W instanceof Promise?j.push(W.then((k=>{k.issues.length&&U.issues.push(...ut($,k.issues)),U.value[V.value]=k.value}))):(W.issues.length&&U.issues.push(...ut($,W.issues)),U.value[V.value]=W.value)}}return j.length?Promise.all(j).then((()=>U)):U}}));const vi=F("$ZodEnum",((k,B)=>{Ae.init(k,B);const U=function(k){const B=Object.values(k).filter((k=>"number"==typeof k));return Object.entries(k).filter((([k,U])=>-1===B.indexOf(+k))).map((([k,B])=>B))}(B.entries),F=new Set(U);k._zod.values=F,k._zod.pattern=new RegExp(`^(${U.filter((k=>at.has(typeof k))).map((k=>"string"==typeof k?rt(k):k.toString())).join("|")})$`),k._zod.parse=(B,G)=>{const j=B.value;return F.has(j)||B.issues.push({code:"invalid_value",values:U,input:j,inst:k}),B}})),gi=F("$ZodTransform",((k,B)=>{Ae.init(k,B),k._zod.parse=(U,F)=>{if("backward"===F.direction)throw new j(k.constructor.name);const $=B.transform(U.value,U);if(F.async){return($ instanceof Promise?$:Promise.resolve($)).then((k=>(U.value=k,U)))}if($ instanceof Promise)throw new G;return U.value=$,U}}));function mi(k,B){return k.issues.length&&void 0===B?{issues:[],value:void 0}:k}const yi=F("$ZodOptional",((k,B)=>{Ae.init(k,B),k._zod.optin="optional",k._zod.optout="optional",Q(k._zod,"values",(()=>B.innerType._zod.values?new Set([...B.innerType._zod.values,void 0]):void 0)),Q(k._zod,"pattern",(()=>{const k=B.innerType._zod.pattern;return k?new RegExp(`^(${z(k.source)})?$`):void 0})),k._zod.parse=(k,U)=>{if("optional"===B.innerType._zod.optin){const F=B.innerType._zod.run(k,U);return F instanceof Promise?F.then((B=>mi(B,k.value))):mi(F,k.value)}return void 0===k.value?k:B.innerType._zod.run(k,U)}})),_i=F("$ZodNullable",((k,B)=>{Ae.init(k,B),Q(k._zod,"optin",(()=>B.innerType._zod.optin)),Q(k._zod,"optout",(()=>B.innerType._zod.optout)),Q(k._zod,"pattern",(()=>{const k=B.innerType._zod.pattern;return k?new RegExp(`^(${z(k.source)}|null)$`):void 0})),Q(k._zod,"values",(()=>B.innerType._zod.values?new Set([...B.innerType._zod.values,null]):void 0)),k._zod.parse=(k,U)=>null===k.value?k:B.innerType._zod.run(k,U)})),Ei=F("$ZodDefault",((k,B)=>{Ae.init(k,B),k._zod.optin="optional",Q(k._zod,"values",(()=>B.innerType._zod.values)),k._zod.parse=(k,U)=>{if("backward"===U.direction)return B.innerType._zod.run(k,U);if(void 0===k.value)return k.value=B.defaultValue,k;const F=B.innerType._zod.run(k,U);return F instanceof Promise?F.then((k=>wi(k,B))):wi(F,B)}}));function wi(k,B){return void 0===k.value&&(k.value=B.defaultValue),k}const Ti=F("$ZodPrefault",((k,B)=>{Ae.init(k,B),k._zod.optin="optional",Q(k._zod,"values",(()=>B.innerType._zod.values)),k._zod.parse=(k,U)=>("backward"===U.direction||void 0===k.value&&(k.value=B.defaultValue),B.innerType._zod.run(k,U))})),Si=F("$ZodNonOptional",((k,B)=>{Ae.init(k,B),Q(k._zod,"values",(()=>{const k=B.innerType._zod.values;return k?new Set([...k].filter((k=>void 0!==k))):void 0})),k._zod.parse=(U,F)=>{const G=B.innerType._zod.run(U,F);return G instanceof Promise?G.then((B=>Ai(B,k))):Ai(G,k)}}));function Ai(k,B){return k.issues.length||void 0!==k.value||k.issues.push({code:"invalid_type",expected:"nonoptional",input:k.value,inst:B}),k}const Ci=F("$ZodCatch",((k,B)=>{Ae.init(k,B),Q(k._zod,"optin",(()=>B.innerType._zod.optin)),Q(k._zod,"optout",(()=>B.innerType._zod.optout)),Q(k._zod,"values",(()=>B.innerType._zod.values)),k._zod.parse=(k,U)=>{if("backward"===U.direction)return B.innerType._zod.run(k,U);const F=B.innerType._zod.run(k,U);return F instanceof Promise?F.then((F=>(k.value=F.value,F.issues.length&&(k.value=B.catchValue({...k,error:{issues:F.issues.map((k=>bt(k,U,H())))},input:k.value}),k.issues=[]),k))):(k.value=F.value,F.issues.length&&(k.value=B.catchValue({...k,error:{issues:F.issues.map((k=>bt(k,U,H())))},input:k.value}),k.issues=[]),k)}})),Oi=F("$ZodPipe",((k,B)=>{Ae.init(k,B),Q(k._zod,"values",(()=>B.in._zod.values)),Q(k._zod,"optin",(()=>B.in._zod.optin)),Q(k._zod,"optout",(()=>B.out._zod.optout)),Q(k._zod,"propValues",(()=>B.in._zod.propValues)),k._zod.parse=(k,U)=>{if("backward"===U.direction){const F=B.out._zod.run(k,U);return F instanceof Promise?F.then((k=>Ii(k,B.in,U))):Ii(F,B.in,U)}const F=B.in._zod.run(k,U);return F instanceof Promise?F.then((k=>Ii(k,B.out,U))):Ii(F,B.out,U)}}));function Ii(k,B,U){return k.issues.length?(k.aborted=!0,k):B._zod.run({value:k.value,issues:k.issues},U)}const Di=F("$ZodReadonly",((k,B)=>{Ae.init(k,B),Q(k._zod,"propValues",(()=>B.innerType._zod.propValues)),Q(k._zod,"values",(()=>B.innerType._zod.values)),Q(k._zod,"optin",(()=>B.innerType._zod.optin)),Q(k._zod,"optout",(()=>B.innerType._zod.optout)),k._zod.parse=(k,U)=>{if("backward"===U.direction)return B.innerType._zod.run(k,U);const F=B.innerType._zod.run(k,U);return F instanceof Promise?F.then(Ri):Ri(F)}}));function Ri(k){return k.value=Object.freeze(k.value),k}const Pi=F("$ZodLazy",((k,B)=>{Ae.init(k,B),Q(k._zod,"innerType",(()=>B.getter())),Q(k._zod,"pattern",(()=>k._zod.innerType._zod.pattern)),Q(k._zod,"propValues",(()=>k._zod.innerType._zod.propValues)),Q(k._zod,"optin",(()=>k._zod.innerType._zod.optin??void 0)),Q(k._zod,"optout",(()=>k._zod.innerType._zod.optout??void 0)),k._zod.parse=(B,U)=>k._zod.innerType._zod.run(B,U)})),Mi=F("$ZodCustom",((k,B)=>{re.init(k,B),Ae.init(k,B),k._zod.parse=(k,B)=>k,k._zod.check=U=>{const F=U.value,G=B.fn(F);if(G instanceof Promise)return G.then((B=>Ni(B,U,F,k)));Ni(G,U,F,k)}}));function Ni(k,B,U,F){if(!k){const k={code:"custom",input:U,inst:F,path:[...F._zod.def.path??[]],continue:!F._zod.def.abort};F._zod.def.params&&(k.params=F._zod.def.params),B.issues.push(vt(k))}}const xi=()=>{const k={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function B(B){return k[B]??null}const U={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return k=>{switch(k.code){case"invalid_type":return`Invalid input: expected ${k.expected}, received ${(k=>{const B=typeof k;switch(B){case"number":return Number.isNaN(k)?"NaN":"number";case"object":if(Array.isArray(k))return"array";if(null===k)return"null";if(Object.getPrototypeOf(k)!==Object.prototype&&k.constructor)return k.constructor.name}return B})(k.input)}`;case"invalid_value":return 1===k.values.length?`Invalid input: expected ${ct(k.values[0])}`:`Invalid option: expected one of ${V(k.values,"|")}`;case"too_big":{const U=k.inclusive?"<=":"<",F=B(k.origin);return F?`Too big: expected ${k.origin??"value"} to have ${U}${k.maximum.toString()} ${F.unit??"elements"}`:`Too big: expected ${k.origin??"value"} to be ${U}${k.maximum.toString()}`}case"too_small":{const U=k.inclusive?">=":">",F=B(k.origin);return F?`Too small: expected ${k.origin} to have ${U}${k.minimum.toString()} ${F.unit}`:`Too small: expected ${k.origin} to be ${U}${k.minimum.toString()}`}case"invalid_format":{const B=k;return"starts_with"===B.format?`Invalid string: must start with "${B.prefix}"`:"ends_with"===B.format?`Invalid string: must end with "${B.suffix}"`:"includes"===B.format?`Invalid string: must include "${B.includes}"`:"regex"===B.format?`Invalid string: must match pattern ${B.pattern}`:`Invalid ${U[B.format]??k.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${k.divisor}`;case"unrecognized_keys":return`Unrecognized key${k.keys.length>1?"s":""}: ${V(k.keys,", ")}`;case"invalid_key":return`Invalid key in ${k.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${k.origin}`;default:return"Invalid input"}}};Symbol("ZodOutput"),Symbol("ZodInput");class Li{constructor(){this._map=new WeakMap,this._idmap=new Map}add(k,...B){const U=B[0];if(this._map.set(k,U),U&&"object"==typeof U&&"id"in U){if(this._idmap.has(U.id))throw new Error(`ID ${U.id} already exists in the registry`);this._idmap.set(U.id,k)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(k){const B=this._map.get(k);return B&&"object"==typeof B&&"id"in B&&this._idmap.delete(B.id),this._map.delete(k),this}get(k){const B=k._zod.parent;if(B){const U={...this.get(B)??{}};delete U.id;const F={...U,...this._map.get(k)};return Object.keys(F).length?F:void 0}return this._map.get(k)}has(k){return this._map.has(k)}}function ki(){return new Li}const Bi=ki();function Ui(k,B){return new k({type:"string",format:"guid",check:"string_format",abort:!1,...ht(B)})}function Fi(k,B){return new he({check:"less_than",...ht(B),value:k,inclusive:!1})}function Gi(k,B){return new he({check:"less_than",...ht(B),value:k,inclusive:!0})}function ji(k,B){return new ce({check:"greater_than",...ht(B),value:k,inclusive:!1})}function $i(k,B){return new ce({check:"greater_than",...ht(B),value:k,inclusive:!0})}function Hi(k,B){return new de({check:"multiple_of",...ht(B),value:k})}function Vi(k,B){return new ue({check:"max_length",...ht(B),maximum:k})}function Wi(k,B){return new fe({check:"min_length",...ht(B),minimum:k})}function qi(k,B){return new be({check:"length_equals",...ht(B),length:k})}function Ki(k){return new we({check:"overwrite",tx:k})}function zi(k){const B=function(k,B){const U=new re({check:"custom",...ht(B)});return U._zod.check=k,U}((U=>(U.addIssue=k=>{if("string"==typeof k)U.issues.push(vt(k,U.value,B._zod.def));else{const F=k;F.fatal&&(F.continue=!1),F.code??(F.code="custom"),F.input??(F.input=U.value),F.inst??(F.inst=B),F.continue??(F.continue=!B._zod.def.abort),U.issues.push(vt(F))}},k(U.value,U))));return B}const Yi=F("ZodISODateTime",((k,B)=>{Fe.init(k,B),Es.init(k,B)}));function Qi(k){return function(k,B){return new k({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ht(B)})}(Yi,k)}const Xi=F("ZodISODate",((k,B)=>{Ge.init(k,B),Es.init(k,B)}));function Zi(k){return function(k,B){return new k({type:"string",format:"date",check:"string_format",...ht(B)})}(Xi,k)}const Ji=F("ZodISOTime",((k,B)=>{je.init(k,B),Es.init(k,B)}));function ts(k){return function(k,B){return new k({type:"string",format:"time",check:"string_format",precision:null,...ht(B)})}(Ji,k)}const es=F("ZodISODuration",((k,B)=>{$e.init(k,B),Es.init(k,B)}));function is(k){return function(k,B){return new k({type:"string",format:"duration",check:"string_format",...ht(B)})}(es,k)}const ss=(k,B)=>{mt.init(k,B),k.name="ZodError",Object.defineProperties(k,{format:{value:B=>function(k,B=(k=>k.message)){const U={_errors:[]},F=k=>{for(const G of k.issues)if("invalid_union"===G.code&&G.errors.length)G.errors.map((k=>F({issues:k})));else if("invalid_key"===G.code)F({issues:G.issues});else if("invalid_element"===G.code)F({issues:G.issues});else if(0===G.path.length)U._errors.push(B(G));else{let k=U,F=0;for(;Ffunction(k,B=(k=>k.message)){const U={},F=[];for(const G of k.issues)G.path.length>0?(U[G.path[0]]=U[G.path[0]]||[],U[G.path[0]].push(B(G))):F.push(B(G));return{formErrors:F,fieldErrors:U}}(k,B)},addIssue:{value:B=>{k.issues.push(B),k.message=JSON.stringify(k.issues,W,2)}},addIssues:{value:B=>{k.issues.push(...B),k.message=JSON.stringify(k.issues,W,2)}},isEmpty:{get:()=>0===k.issues.length}})},ns=(F("ZodError",ss),F("ZodError",ss,{Parent:Error})),as=_t(ns),rs=Et(ns),os=wt(ns),hs=St(ns),cs=Ct(ns),ds=Ot(ns),ls=It(ns),us=Dt(ns),fs=Rt(ns),bs=Pt(ns),ps=Mt(ns),vs=Nt(ns),gs=F("ZodType",((k,B)=>(Ae.init(k,B),k.def=B,k.type=B.type,Object.defineProperty(k,"_def",{value:B}),k.check=(...U)=>k.clone(Z(B,{checks:[...B.checks??[],...U.map((k=>"function"==typeof k?{_zod:{check:k,def:{check:"custom"},onattach:[]}}:k))]})),k.clone=(B,U)=>ot(k,B,U),k.brand=()=>k,k.register=(B,U)=>(B.add(k,U),k),k.parse=(B,U)=>as(k,B,U,{callee:k.parse}),k.safeParse=(B,U)=>os(k,B,U),k.parseAsync=async(B,U)=>rs(k,B,U,{callee:k.parseAsync}),k.safeParseAsync=async(B,U)=>hs(k,B,U),k.spa=k.safeParseAsync,k.encode=(B,U)=>cs(k,B,U),k.decode=(B,U)=>ds(k,B,U),k.encodeAsync=async(B,U)=>ls(k,B,U),k.decodeAsync=async(B,U)=>us(k,B,U),k.safeEncode=(B,U)=>fs(k,B,U),k.safeDecode=(B,U)=>bs(k,B,U),k.safeEncodeAsync=async(B,U)=>ps(k,B,U),k.safeDecodeAsync=async(B,U)=>vs(k,B,U),k.refine=(B,U)=>k.check(function(k,B={}){return function(k,B,U){return new k({type:"custom",check:"custom",fn:B,...ht(U)})}(Sn,k,B)}(B,U)),k.superRefine=B=>k.check(zi(B)),k.overwrite=B=>k.check(Ki(B)),k.optional=()=>un(k),k.nullable=()=>bn(k),k.nullish=()=>un(bn(k)),k.nonoptional=B=>function(k,B){return new gn({type:"nonoptional",innerType:k,...ht(B)})}(k,B),k.array=()=>Zs(k),k.or=B=>sn([k,B]),k.and=B=>new nn({type:"intersection",left:k,right:B}),k.transform=B=>_n(k,dn(B)),k.default=B=>{return U=B,new pn({type:"default",innerType:k,get defaultValue(){return"function"==typeof U?U():nt(U)}});var U},k.prefault=B=>{return U=B,new vn({type:"prefault",innerType:k,get defaultValue(){return"function"==typeof U?U():nt(U)}});var U},k.catch=B=>{return new mn({type:"catch",innerType:k,catchValue:"function"==typeof(U=B)?U:()=>U});var U},k.pipe=B=>_n(k,B),k.readonly=()=>new En({type:"readonly",innerType:k}),k.describe=B=>{const U=k.clone();return Bi.add(U,{description:B}),U},Object.defineProperty(k,"description",{get:()=>Bi.get(k)?.description,configurable:!0}),k.meta=(...B)=>{if(0===B.length)return Bi.get(k);const U=k.clone();return Bi.add(U,B[0]),U},k.isOptional=()=>k.safeParse(void 0).success,k.isNullable=()=>k.safeParse(null).success,k))),ms=F("_ZodString",((k,B)=>{Ce.init(k,B),gs.init(k,B);const U=k._zod.bag;k.format=U.format??null,k.minLength=U.minimum??null,k.maxLength=U.maximum??null,k.regex=(...B)=>k.check(function(k,B){return new ve({check:"string_format",format:"regex",...ht(B),pattern:k})}(...B)),k.includes=(...B)=>k.check(function(k,B){return new ye({check:"string_format",format:"includes",...ht(B),includes:k})}(...B)),k.startsWith=(...B)=>k.check(function(k,B){return new _e({check:"string_format",format:"starts_with",...ht(B),prefix:k})}(...B)),k.endsWith=(...B)=>k.check(function(k,B){return new Ee({check:"string_format",format:"ends_with",...ht(B),suffix:k})}(...B)),k.min=(...B)=>k.check(Wi(...B)),k.max=(...B)=>k.check(Vi(...B)),k.length=(...B)=>k.check(qi(...B)),k.nonempty=(...B)=>k.check(Wi(1,...B)),k.lowercase=B=>k.check(function(k){return new ge({check:"string_format",format:"lowercase",...ht(k)})}(B)),k.uppercase=B=>k.check(function(k){return new me({check:"string_format",format:"uppercase",...ht(k)})}(B)),k.trim=()=>k.check(Ki((k=>k.trim()))),k.normalize=(...B)=>k.check(function(k){return Ki((B=>B.normalize(k)))}(...B)),k.toLowerCase=()=>k.check(Ki((k=>k.toLowerCase()))),k.toUpperCase=()=>k.check(Ki((k=>k.toUpperCase())))})),ys=F("ZodString",((k,B)=>{Ce.init(k,B),ms.init(k,B),k.email=B=>k.check(function(k,B){return new k({type:"string",format:"email",check:"string_format",abort:!1,...ht(B)})}(ws,B)),k.url=B=>k.check(function(k,B){return new k({type:"string",format:"url",check:"string_format",abort:!1,...ht(B)})}(As,B)),k.jwt=B=>k.check(function(k,B){return new k({type:"string",format:"jwt",check:"string_format",abort:!1,...ht(B)})}(Gs,B)),k.emoji=B=>k.check(function(k,B){return new k({type:"string",format:"emoji",check:"string_format",abort:!1,...ht(B)})}(Cs,B)),k.guid=B=>k.check(Ui(Ts,B)),k.uuid=B=>k.check(function(k,B){return new k({type:"string",format:"uuid",check:"string_format",abort:!1,...ht(B)})}(Ss,B)),k.uuidv4=B=>k.check(function(k,B){return new k({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ht(B)})}(Ss,B)),k.uuidv6=B=>k.check(function(k,B){return new k({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ht(B)})}(Ss,B)),k.uuidv7=B=>k.check(function(k,B){return new k({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ht(B)})}(Ss,B)),k.nanoid=B=>k.check(function(k,B){return new k({type:"string",format:"nanoid",check:"string_format",abort:!1,...ht(B)})}(Os,B)),k.guid=B=>k.check(Ui(Ts,B)),k.cuid=B=>k.check(function(k,B){return new k({type:"string",format:"cuid",check:"string_format",abort:!1,...ht(B)})}(Is,B)),k.cuid2=B=>k.check(function(k,B){return new k({type:"string",format:"cuid2",check:"string_format",abort:!1,...ht(B)})}(Ds,B)),k.ulid=B=>k.check(function(k,B){return new k({type:"string",format:"ulid",check:"string_format",abort:!1,...ht(B)})}(Rs,B)),k.base64=B=>k.check(function(k,B){return new k({type:"string",format:"base64",check:"string_format",abort:!1,...ht(B)})}(Bs,B)),k.base64url=B=>k.check(function(k,B){return new k({type:"string",format:"base64url",check:"string_format",abort:!1,...ht(B)})}(Us,B)),k.xid=B=>k.check(function(k,B){return new k({type:"string",format:"xid",check:"string_format",abort:!1,...ht(B)})}(Ps,B)),k.ksuid=B=>k.check(function(k,B){return new k({type:"string",format:"ksuid",check:"string_format",abort:!1,...ht(B)})}(Ms,B)),k.ipv4=B=>k.check(function(k,B){return new k({type:"string",format:"ipv4",check:"string_format",abort:!1,...ht(B)})}(Ns,B)),k.ipv6=B=>k.check(function(k,B){return new k({type:"string",format:"ipv6",check:"string_format",abort:!1,...ht(B)})}(xs,B)),k.cidrv4=B=>k.check(function(k,B){return new k({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ht(B)})}(Ls,B)),k.cidrv6=B=>k.check(function(k,B){return new k({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ht(B)})}(ks,B)),k.e164=B=>k.check(function(k,B){return new k({type:"string",format:"e164",check:"string_format",abort:!1,...ht(B)})}(Fs,B)),k.datetime=B=>k.check(Qi(B)),k.date=B=>k.check(Zi(B)),k.time=B=>k.check(ts(B)),k.duration=B=>k.check(is(B))}));function _s(k){return function(k,B){return new k({type:"string",...ht(B)})}(ys,k)}const Es=F("ZodStringFormat",((k,B)=>{Oe.init(k,B),ms.init(k,B)})),ws=F("ZodEmail",((k,B)=>{Re.init(k,B),Es.init(k,B)}));const Ts=F("ZodGUID",((k,B)=>{Ie.init(k,B),Es.init(k,B)}));const Ss=F("ZodUUID",((k,B)=>{De.init(k,B),Es.init(k,B)}));const As=F("ZodURL",((k,B)=>{Pe.init(k,B),Es.init(k,B)}));const Cs=F("ZodEmoji",((k,B)=>{Me.init(k,B),Es.init(k,B)}));const Os=F("ZodNanoID",((k,B)=>{Ne.init(k,B),Es.init(k,B)}));const Is=F("ZodCUID",((k,B)=>{xe.init(k,B),Es.init(k,B)}));const Ds=F("ZodCUID2",((k,B)=>{Le.init(k,B),Es.init(k,B)}));const Rs=F("ZodULID",((k,B)=>{ke.init(k,B),Es.init(k,B)}));const Ps=F("ZodXID",((k,B)=>{Be.init(k,B),Es.init(k,B)}));const Ms=F("ZodKSUID",((k,B)=>{Ue.init(k,B),Es.init(k,B)}));const Ns=F("ZodIPv4",((k,B)=>{He.init(k,B),Es.init(k,B)}));const xs=F("ZodIPv6",((k,B)=>{Ve.init(k,B),Es.init(k,B)}));const Ls=F("ZodCIDRv4",((k,B)=>{We.init(k,B),Es.init(k,B)}));const ks=F("ZodCIDRv6",((k,B)=>{qe.init(k,B),Es.init(k,B)}));const Bs=F("ZodBase64",((k,B)=>{ze.init(k,B),Es.init(k,B)}));const Us=F("ZodBase64URL",((k,B)=>{Ye.init(k,B),Es.init(k,B)}));const Fs=F("ZodE164",((k,B)=>{Qe.init(k,B),Es.init(k,B)}));const Gs=F("ZodJWT",((k,B)=>{Xe.init(k,B),Es.init(k,B)}));const js=F("ZodNumber",((k,B)=>{Ze.init(k,B),gs.init(k,B),k.gt=(B,U)=>k.check(ji(B,U)),k.gte=(B,U)=>k.check($i(B,U)),k.min=(B,U)=>k.check($i(B,U)),k.lt=(B,U)=>k.check(Fi(B,U)),k.lte=(B,U)=>k.check(Gi(B,U)),k.max=(B,U)=>k.check(Gi(B,U)),k.int=B=>k.check(Vs(B)),k.safe=B=>k.check(Vs(B)),k.positive=B=>k.check(ji(0,B)),k.nonnegative=B=>k.check($i(0,B)),k.negative=B=>k.check(Fi(0,B)),k.nonpositive=B=>k.check(Gi(0,B)),k.multipleOf=(B,U)=>k.check(Hi(B,U)),k.step=(B,U)=>k.check(Hi(B,U)),k.finite=()=>k;const U=k._zod.bag;k.minValue=Math.max(U.minimum??Number.NEGATIVE_INFINITY,U.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,k.maxValue=Math.min(U.maximum??Number.POSITIVE_INFINITY,U.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,k.isInt=(U.format??"").includes("int")||Number.isSafeInteger(U.multipleOf??.5),k.isFinite=!0,k.format=U.format??null}));function $s(k){return function(k,B){return new k({type:"number",checks:[],...ht(B)})}(js,k)}const Hs=F("ZodNumberFormat",((k,B)=>{Je.init(k,B),js.init(k,B)}));function Vs(k){return function(k,B){return new k({type:"number",check:"number_format",abort:!1,format:"safeint",...ht(B)})}(Hs,k)}const Ws=F("ZodBoolean",((k,B)=>{ti.init(k,B),gs.init(k,B)}));function qs(k){return function(k,B){return new k({type:"boolean",...ht(B)})}(Ws,k)}const Ks=F("ZodUnknown",((k,B)=>{ei.init(k,B),gs.init(k,B)}));function zs(){return function(k){return new k({type:"unknown"})}(Ks)}const Ys=F("ZodNever",((k,B)=>{ii.init(k,B),gs.init(k,B)}));function Qs(k){return function(k,B){return new k({type:"never",...ht(B)})}(Ys,k)}const Xs=F("ZodArray",((k,B)=>{ni.init(k,B),gs.init(k,B),k.element=B.element,k.min=(B,U)=>k.check(Wi(B,U)),k.nonempty=B=>k.check(Wi(1,B)),k.max=(B,U)=>k.check(Vi(B,U)),k.length=(B,U)=>k.check(qi(B,U)),k.unwrap=()=>k.element}));function Zs(k,B){return function(k,B,U){return new k({type:"array",element:B,...ht(U)})}(Xs,k,B)}const Js=F("ZodObject",((k,B)=>{ci.init(k,B),gs.init(k,B),Q(k,"shape",(()=>B.shape)),k.keyof=()=>hn(Object.keys(k._zod.def.shape)),k.catchall=B=>k.clone({...k._zod.def,catchall:B}),k.passthrough=()=>k.clone({...k._zod.def,catchall:zs()}),k.loose=()=>k.clone({...k._zod.def,catchall:zs()}),k.strict=()=>k.clone({...k._zod.def,catchall:Qs()}),k.strip=()=>k.clone({...k._zod.def,catchall:void 0}),k.extend=B=>function(k,B){if(!st(B))throw new Error("Invalid input to extend: expected a plain object");const U=k._zod.def.checks;if(U&&U.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const F=Z(k._zod.def,{get shape(){const U={...k._zod.def.shape,...B};return X(this,"shape",U),U},checks:[]});return ot(k,F)}(k,B),k.safeExtend=B=>function(k,B){if(!st(B))throw new Error("Invalid input to safeExtend: expected a plain object");const U={...k._zod.def,get shape(){const U={...k._zod.def.shape,...B};return X(this,"shape",U),U},checks:k._zod.def.checks};return ot(k,U)}(k,B),k.merge=B=>function(k,B){const U=Z(k._zod.def,{get shape(){const U={...k._zod.def.shape,...B._zod.def.shape};return X(this,"shape",U),U},get catchall(){return B._zod.def.catchall},checks:[]});return ot(k,U)}(k,B),k.pick=B=>function(k,B){const U=k._zod.def;return ot(k,Z(k._zod.def,{get shape(){const k={};for(const F in B){if(!(F in U.shape))throw new Error(`Unrecognized key: "${F}"`);B[F]&&(k[F]=U.shape[F])}return X(this,"shape",k),k},checks:[]}))}(k,B),k.omit=B=>function(k,B){const U=k._zod.def,F=Z(k._zod.def,{get shape(){const F={...k._zod.def.shape};for(const k in B){if(!(k in U.shape))throw new Error(`Unrecognized key: "${k}"`);B[k]&&delete F[k]}return X(this,"shape",F),F},checks:[]});return ot(k,F)}(k,B),k.partial=(...B)=>function(k,B,U){const F=Z(B._zod.def,{get shape(){const F=B._zod.def.shape,G={...F};if(U)for(const B in U){if(!(B in F))throw new Error(`Unrecognized key: "${B}"`);U[B]&&(G[B]=k?new k({type:"optional",innerType:F[B]}):F[B])}else for(const B in F)G[B]=k?new k({type:"optional",innerType:F[B]}):F[B];return X(this,"shape",G),G},checks:[]});return ot(B,F)}(ln,k,B[0]),k.required=(...B)=>function(k,B,U){const F=Z(B._zod.def,{get shape(){const F=B._zod.def.shape,G={...F};if(U)for(const B in U){if(!(B in G))throw new Error(`Unrecognized key: "${B}"`);U[B]&&(G[B]=new k({type:"nonoptional",innerType:F[B]}))}else for(const B in F)G[B]=new k({type:"nonoptional",innerType:F[B]});return X(this,"shape",G),G},checks:[]});return ot(B,F)}(gn,k,B[0])}));function tn(k,B){const U={type:"object",shape:k??{},...ht(B)};return new Js(U)}const en=F("ZodUnion",((k,B)=>{li.init(k,B),gs.init(k,B),k.options=B.options}));function sn(k,B){return new en({type:"union",options:k,...ht(B)})}const nn=F("ZodIntersection",((k,B)=>{ui.init(k,B),gs.init(k,B)}));const an=F("ZodRecord",((k,B)=>{pi.init(k,B),gs.init(k,B),k.keyType=B.keyType,k.valueType=B.valueType}));function rn(k,B,U){return new an({type:"record",keyType:k,valueType:B,...ht(U)})}const on=F("ZodEnum",((k,B)=>{vi.init(k,B),gs.init(k,B),k.enum=B.entries,k.options=Object.values(B.entries);const U=new Set(Object.keys(B.entries));k.extract=(k,F)=>{const G={};for(const j of k){if(!U.has(j))throw new Error(`Key ${j} not found in enum`);G[j]=B.entries[j]}return new on({...B,checks:[],...ht(F),entries:G})},k.exclude=(k,F)=>{const G={...B.entries};for(const B of k){if(!U.has(B))throw new Error(`Key ${B} not found in enum`);delete G[B]}return new on({...B,checks:[],...ht(F),entries:G})}}));function hn(k,B){const U=Array.isArray(k)?Object.fromEntries(k.map((k=>[k,k]))):k;return new on({type:"enum",entries:U,...ht(B)})}const cn=F("ZodTransform",((k,B)=>{gi.init(k,B),gs.init(k,B),k._zod.parse=(U,F)=>{if("backward"===F.direction)throw new j(k.constructor.name);U.addIssue=F=>{if("string"==typeof F)U.issues.push(vt(F,U.value,B));else{const B=F;B.fatal&&(B.continue=!1),B.code??(B.code="custom"),B.input??(B.input=U.value),B.inst??(B.inst=k),U.issues.push(vt(B))}};const G=B.transform(U.value,U);return G instanceof Promise?G.then((k=>(U.value=k,U))):(U.value=G,U)}}));function dn(k){return new cn({type:"transform",transform:k})}const ln=F("ZodOptional",((k,B)=>{yi.init(k,B),gs.init(k,B),k.unwrap=()=>k._zod.def.innerType}));function un(k){return new ln({type:"optional",innerType:k})}const fn=F("ZodNullable",((k,B)=>{_i.init(k,B),gs.init(k,B),k.unwrap=()=>k._zod.def.innerType}));function bn(k){return new fn({type:"nullable",innerType:k})}const pn=F("ZodDefault",((k,B)=>{Ei.init(k,B),gs.init(k,B),k.unwrap=()=>k._zod.def.innerType,k.removeDefault=k.unwrap}));const vn=F("ZodPrefault",((k,B)=>{Ti.init(k,B),gs.init(k,B),k.unwrap=()=>k._zod.def.innerType}));const gn=F("ZodNonOptional",((k,B)=>{Si.init(k,B),gs.init(k,B),k.unwrap=()=>k._zod.def.innerType}));const mn=F("ZodCatch",((k,B)=>{Ci.init(k,B),gs.init(k,B),k.unwrap=()=>k._zod.def.innerType,k.removeCatch=k.unwrap}));const yn=F("ZodPipe",((k,B)=>{Oi.init(k,B),gs.init(k,B),k.in=B.in,k.out=B.out}));function _n(k,B){return new yn({type:"pipe",in:k,out:B})}const En=F("ZodReadonly",((k,B)=>{Di.init(k,B),gs.init(k,B),k.unwrap=()=>k._zod.def.innerType}));const wn=F("ZodLazy",((k,B)=>{Pi.init(k,B),gs.init(k,B),k.unwrap=()=>k._zod.def.getter()}));function Tn(k){return new wn({type:"lazy",getter:k})}const Sn=F("ZodCustom",((k,B)=>{Mi.init(k,B),gs.init(k,B)}));var An;An||(An={}),H({localeError:xi()})},6030:k=>{"use strict";k.exports=JSON.parse('{"normal-forest-1-pet-collection":{"data":{"name":"normal-forest-1-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":1}}]},"metadata":{"location":"forest"}},"normal-forest-2-pet-collection":{"data":{"name":"normal-forest-2-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":2}}]},"metadata":{"location":"forest"}},"normal-forest-3-pet-collection":{"data":{"name":"normal-forest-3-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":3}}]},"metadata":{"location":"forest"}},"normal-forest-4-pet-collection":{"data":{"name":"normal-forest-4-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":4}}]},"metadata":{"location":"forest"}},"normal-shiverchill-5-pet-collection":{"data":{"name":"normal-shiverchill-5-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":4}}]},"metadata":{"location":"shiverchill"}},"normal-shiverchill-6-pet-collection":{"data":{"name":"normal-shiverchill-6-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":5}}]},"metadata":{"location":"shiverchill"}},"normal-shiverchill-7-pet-collection":{"data":{"name":"normal-shiverchill-7-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":6}}]},"metadata":{"location":"shiverchill"}},"normal-shiverchill-8-pet-collection":{"data":{"name":"normal-shiverchill-8-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":7}}]},"metadata":{"location":"shiverchill"}},"normal-shiverchill-9-pet-collection":{"data":{"name":"normal-shiverchill-9-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":9}}]},"metadata":{"location":"shiverchill"}},"normal-bonfire-spire-10-pet-collection":{"data":{"name":"normal-bonfire-spire-10-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":9}}]},"metadata":{"location":"bonfire-spire"}},"normal-bonfire-spire-11-pet-collection":{"data":{"name":"normal-bonfire-spire-11-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":10}}]},"metadata":{"location":"bonfire-spire"}},"normal-bonfire-spire-12-pet-collection":{"data":{"name":"normal-bonfire-spire-12-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":11}}]},"metadata":{"location":"bonfire-spire"}},"normal-bonfire-spire-13-pet-collection":{"data":{"name":"normal-bonfire-spire-13-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":12}}]},"metadata":{"location":"bonfire-spire"}},"normal-bonfire-spire-14-pet-collection":{"data":{"name":"normal-bonfire-spire-14-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":14}}]},"metadata":{"location":"bonfire-spire"}},"normal-shipwreck-shore-15-pet-collection":{"data":{"name":"normal-shipwreck-shore-15-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":14}}]},"metadata":{"location":"shipwreck-shore"}},"normal-shipwreck-shore-16-pet-collection":{"data":{"name":"normal-shipwreck-shore-16-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":15}}]},"metadata":{"location":"shipwreck-shore"}},"normal-shipwreck-shore-17-pet-collection":{"data":{"name":"normal-shipwreck-shore-17-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":16}}]},"metadata":{"location":"shipwreck-shore"}},"normal-shipwreck-shore-18-pet-collection":{"data":{"name":"normal-shipwreck-shore-18-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":17}}]},"metadata":{"location":"shipwreck-shore"}},"normal-shipwreck-shore-19-pet-collection":{"data":{"name":"normal-shipwreck-shore-19-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":19}}]},"metadata":{"location":"shipwreck-shore"}},"normal-skywatch-20-pet-collection":{"data":{"name":"normal-skywatch-20-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":19}}]},"metadata":{"location":"skywatch"}},"normal-skywatch-21-pet-collection":{"data":{"name":"normal-skywatch-21-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":20}}]},"metadata":{"location":"skywatch"}},"normal-skywatch-22-pet-collection":{"data":{"name":"normal-skywatch-22-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":21}}]},"metadata":{"location":"skywatch"}},"normal-skywatch-23-pet-collection":{"data":{"name":"normal-skywatch-23-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":22}}]},"metadata":{"location":"skywatch"}},"normal-skywatch-24-pet-collection":{"data":{"name":"normal-skywatch-24-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":25}}]},"metadata":{"location":"skywatch"}},"normal-academy-25-pet-collection":{"data":{"name":"normal-academy-25-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":27}}]},"metadata":{"location":"academy"}},"normal-academy-26-pet-collection":{"data":{"name":"normal-academy-26-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":30}}]},"metadata":{"location":"academy"}},"normal-academy-27-pet-collection":{"data":{"name":"normal-academy-27-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":35}}]},"metadata":{"location":"academy"}},"normal-optional-wizard-28-pet-collection":{"data":{"name":"normal-optional-wizard-28-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":10}}]},"metadata":{"location":"optional-wizard"}},"normal-optional-wizard-29-pet-collection":{"data":{"name":"normal-optional-wizard-29-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":20}}]},"metadata":{"location":"optional-wizard"}},"normal-optional-wizard-30-pet-collection":{"data":{"name":"normal-optional-wizard-30-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":30}}]},"metadata":{"location":"optional-wizard"}},"normal-optional-wizard-31-pet-collection":{"data":{"name":"normal-optional-wizard-31-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":40}}]},"metadata":{"location":"optional-wizard"}},"normal-optional-wizard-32-pet-collection":{"data":{"name":"normal-optional-wizard-32-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":50}}]},"metadata":{"location":"optional-wizard"}},"hard-world-map-1-pet-collection":{"data":{"name":"hard-world-map-1-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":35}}]},"metadata":{"location":"world-map"}},"hard-forest-2-pet-collection":{"data":{"name":"hard-forest-2-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":37}}]},"metadata":{"location":"forest"}},"hard-forest-3-pet-collection":{"data":{"name":"hard-forest-3-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":39}}]},"metadata":{"location":"forest"}},"hard-forest-4-pet-collection":{"data":{"name":"hard-forest-4-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":42}}]},"metadata":{"location":"forest"}},"hard-forest-5-pet-collection":{"data":{"name":"hard-forest-5-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":46}}]},"metadata":{"location":"forest"}},"hard-shiverchill-6-pet-collection":{"data":{"name":"hard-shiverchill-6-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":48}}]},"metadata":{"location":"shiverchill"}},"hard-shiverchill-7-pet-collection":{"data":{"name":"hard-shiverchill-7-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":50}}]},"metadata":{"location":"shiverchill"}},"hard-shiverchill-8-pet-collection":{"data":{"name":"hard-shiverchill-8-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":52}}]},"metadata":{"location":"shiverchill"}},"hard-shiverchill-9-pet-collection":{"data":{"name":"hard-shiverchill-9-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":55}}]},"metadata":{"location":"shiverchill"}},"hard-shiverchill-10-pet-collection":{"data":{"name":"hard-shiverchill-10-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":59}}]},"metadata":{"location":"shiverchill"}},"hard-bonfire-spire-11-pet-collection":{"data":{"name":"hard-bonfire-spire-11-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":61}}]},"metadata":{"location":"bonfire-spire"}},"hard-bonfire-spire-12-pet-collection":{"data":{"name":"hard-bonfire-spire-12-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":63}}]},"metadata":{"location":"bonfire-spire"}},"hard-bonfire-spire-13-pet-collection":{"data":{"name":"hard-bonfire-spire-13-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":65}}]},"metadata":{"location":"bonfire-spire"}},"hard-bonfire-spire-14-pet-collection":{"data":{"name":"hard-bonfire-spire-14-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":68}}]},"metadata":{"location":"bonfire-spire"}},"hard-bonfire-spire-15-pet-collection":{"data":{"name":"hard-bonfire-spire-15-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":72}}]},"metadata":{"location":"bonfire-spire"}},"hard-shipwreck-shore-16-pet-collection":{"data":{"name":"hard-shipwreck-shore-16-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":74}}]},"metadata":{"location":"shipwreck-shore"}},"hard-shipwreck-shore-17-pet-collection":{"data":{"name":"hard-shipwreck-shore-17-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":76}}]},"metadata":{"location":"shipwreck-shore"}},"hard-shipwreck-shore-18-pet-collection":{"data":{"name":"hard-shipwreck-shore-18-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":78}}]},"metadata":{"location":"shipwreck-shore"}},"hard-shipwreck-shore-19-pet-collection":{"data":{"name":"hard-shipwreck-shore-19-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":81}}]},"metadata":{"location":"shipwreck-shore"}},"hard-shipwreck-shore-20-pet-collection":{"data":{"name":"hard-shipwreck-shore-20-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":85}}]},"metadata":{"location":"shipwreck-shore"}},"hard-skywatch-21-pet-collection":{"data":{"name":"hard-skywatch-21-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":87}}]},"metadata":{"location":"skywatch"}},"hard-skywatch-22-pet-collection":{"data":{"name":"hard-skywatch-22-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":89}}]},"metadata":{"location":"skywatch"}},"hard-skywatch-23-pet-collection":{"data":{"name":"hard-skywatch-23-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":91}}]},"metadata":{"location":"skywatch"}},"hard-skywatch-24-pet-collection":{"data":{"name":"hard-skywatch-24-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":94}}]},"metadata":{"location":"skywatch"}},"hard-skywatch-25-pet-collection":{"data":{"name":"hard-skywatch-25-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":98}}]},"metadata":{"location":"skywatch"}},"hard-academy-26-pet-collection":{"data":{"name":"hard-academy-26-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":100}}]},"metadata":{"location":"academy"}},"hard-academy-27-pet-collection":{"data":{"name":"hard-academy-27-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":105}}]},"metadata":{"location":"academy"}},"hard-academy-28-pet-collection":{"data":{"name":"hard-academy-28-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":110}}]},"metadata":{"location":"academy"}},"hard-optional-wizard-29-pet-collection":{"data":{"name":"hard-optional-wizard-29-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":50}}]},"metadata":{"location":"optional-wizard"}},"hard-optional-wizard-30-pet-collection":{"data":{"name":"hard-optional-wizard-30-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":65}}]},"metadata":{"location":"optional-wizard"}},"hard-optional-wizard-31-pet-collection":{"data":{"name":"hard-optional-wizard-31-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":85}}]},"metadata":{"location":"optional-wizard"}},"hard-optional-wizard-32-pet-collection":{"data":{"name":"hard-optional-wizard-32-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":110}}]},"metadata":{"location":"optional-wizard"}},"hard-optional-wizard-33-pet-collection":{"data":{"name":"hard-optional-wizard-33-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":130}}]},"metadata":{"location":"optional-wizard"}},"expert-world-map-1-pet-collection":{"data":{"name":"expert-world-map-1-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":115}}]},"metadata":{"location":"world-map"}},"expert-forest-2-pet-collection":{"data":{"name":"expert-forest-2-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":116}}]},"metadata":{"location":"forest"}},"expert-forest-3-pet-collection":{"data":{"name":"expert-forest-3-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":117}}]},"metadata":{"location":"forest"}},"expert-forest-4-pet-collection":{"data":{"name":"expert-forest-4-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":118}}]},"metadata":{"location":"forest"}},"expert-forest-5-pet-collection":{"data":{"name":"expert-forest-5-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":119}}]},"metadata":{"location":"forest"}},"expert-shiverchill-6-pet-collection":{"data":{"name":"expert-shiverchill-6-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":120}}]},"metadata":{"location":"shiverchill"}},"expert-shiverchill-7-pet-collection":{"data":{"name":"expert-shiverchill-7-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":121}}]},"metadata":{"location":"shiverchill"}},"expert-shiverchill-8-pet-collection":{"data":{"name":"expert-shiverchill-8-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":122}}]},"metadata":{"location":"shiverchill"}},"expert-shiverchill-9-pet-collection":{"data":{"name":"expert-shiverchill-9-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":123}}]},"metadata":{"location":"shiverchill"}},"expert-shiverchill-10-pet-collection":{"data":{"name":"expert-shiverchill-10-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":124}}]},"metadata":{"location":"shiverchill"}},"expert-bonfire-spire-11-pet-collection":{"data":{"name":"expert-bonfire-spire-11-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":125}}]},"metadata":{"location":"bonfire-spire"}},"expert-bonfire-spire-12-pet-collection":{"data":{"name":"expert-bonfire-spire-12-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":126}}]},"metadata":{"location":"bonfire-spire"}},"expert-bonfire-spire-13-pet-collection":{"data":{"name":"expert-bonfire-spire-13-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":127}}]},"metadata":{"location":"bonfire-spire"}},"expert-bonfire-spire-14-pet-collection":{"data":{"name":"expert-bonfire-spire-14-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":128}}]},"metadata":{"location":"bonfire-spire"}},"expert-bonfire-spire-15-pet-collection":{"data":{"name":"expert-bonfire-spire-15-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":129}}]},"metadata":{"location":"bonfire-spire"}},"expert-shipwreck-shore-16-pet-collection":{"data":{"name":"expert-shipwreck-shore-16-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":130}}]},"metadata":{"location":"shipwreck-shore"}},"expert-shipwreck-shore-17-pet-collection":{"data":{"name":"expert-shipwreck-shore-17-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":131}}]},"metadata":{"location":"shipwreck-shore"}},"expert-shipwreck-shore-18-pet-collection":{"data":{"name":"expert-shipwreck-shore-18-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":132}}]},"metadata":{"location":"shipwreck-shore"}},"expert-shipwreck-shore-19-pet-collection":{"data":{"name":"expert-shipwreck-shore-19-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":133}}]},"metadata":{"location":"shipwreck-shore"}},"expert-shipwreck-shore-20-pet-collection":{"data":{"name":"expert-shipwreck-shore-20-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":134}}]},"metadata":{"location":"shipwreck-shore"}},"expert-skywatch-21-pet-collection":{"data":{"name":"expert-skywatch-21-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":135}}]},"metadata":{"location":"skywatch"}},"expert-skywatch-22-pet-collection":{"data":{"name":"expert-skywatch-22-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":136}}]},"metadata":{"location":"skywatch"}},"expert-skywatch-23-pet-collection":{"data":{"name":"expert-skywatch-23-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":137}}]},"metadata":{"location":"skywatch"}},"expert-skywatch-24-pet-collection":{"data":{"name":"expert-skywatch-24-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":138}}]},"metadata":{"location":"skywatch"}},"expert-skywatch-25-pet-collection":{"data":{"name":"expert-skywatch-25-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":139}}]},"metadata":{"location":"skywatch"}},"expert-academy-26-pet-collection":{"data":{"name":"expert-academy-26-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":140}}]},"metadata":{"location":"academy"}},"expert-academy-27-pet-collection":{"data":{"name":"expert-academy-27-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":145}}]},"metadata":{"location":"academy"}},"expert-academy-28-pet-collection":{"data":{"name":"expert-academy-28-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":150}}]},"metadata":{"location":"academy"}},"expert-optional-wizard-29-pet-collection":{"data":{"name":"expert-optional-wizard-29-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":130}}]},"metadata":{"location":"optional-wizard"}},"expert-optional-wizard-30-pet-collection":{"data":{"name":"expert-optional-wizard-30-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":145}}]},"metadata":{"location":"optional-wizard"}},"expert-optional-wizard-31-pet-collection":{"data":{"name":"expert-optional-wizard-31-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":165}}]},"metadata":{"location":"optional-wizard"}},"expert-optional-wizard-32-pet-collection":{"data":{"name":"expert-optional-wizard-32-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":190}}]},"metadata":{"location":"optional-wizard"}},"expert-optional-wizard-33-pet-collection":{"data":{"name":"expert-optional-wizard-33-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":205}}]},"metadata":{"location":"optional-wizard"}}}')},94554:k=>{"use strict";k.exports=JSON.parse('{"spawnLevelChanceSame":1,"spawnLevelChanceHigher":0,"spawnLevelChanceLower":0,"benchLevelChanceSame":1,"benchLevelChanceLower":0,"benchLevelChanceLowest":0,"spawnCooldownDuration":120,"threatIndicatorLevel":2,"encounterRatesPerRarity":{"regular":{"0":0.5,"1":0.25,"2":0.15,"3":0.07,"4":0.03},"hard":{"0":0.1,"1":0.2,"2":0.5,"3":0.15,"4":0.05},"expert":{"0":0.06,"1":0.12,"2":0.42,"3":0.25,"4":0.15}},"encounterRatesPerEvolutionTier":{"regular":{"1":1.5,"2":1.25,"3":1,"4":0},"hard":{"1":1,"2":1.25,"3":1,"4":0},"expert":{"1":1,"2":1.15,"3":1.5,"4":0}}}')},93096:k=>{"use strict";k.exports=JSON.parse('{"bonfire_spire-A1-chest1":[{"type":"gold","N":200}],"bonfire_spire-A4-chestGuardian":[{"type":"key","ID":12},{"type":"item","ID":92}],"bonfire_spire-B5-chest4":[{"type":"gold","N":200}],"bonfire_spire-C6-chest5":[{"type":"weapon","ID":21}],"bonfire_spire-D2-chest2":[{"type":"hat","ID":34}],"bonfire_spire-D3-chest3":[{"type":"outfit","ID":27}],"bonfire_spire-E5-chest6":[{"type":"gold","N":200}],"shipwreck_shore-A3-chestA3":[{"type":"gold","N":800},{"type":"weapon","ID":93}],"shipwreck_shore-A5-chestA5":[{"type":"hat","ID":81}],"shipwreck_shore-B10-chestB10":[{"type":"gold","N":600},{"type":"boots","ID":31}],"shipwreck_shore-B13-chestB13":[{"type":"gold","N":200}],"shipwreck_shore-B5-chestB5":[{"type":"gold","N":200}],"shipwreck_shore-C10-chestBreathingBubble":[{"type":"key","ID":14}],"shiverchill-A2-chest3":[{"type":"item","ID":71}],"shiverchill-A5-chest4":[{"type":"outfit","ID":48}],"shiverchill-A9-chest6":[{"type":"weapon","ID":73}],"shiverchill-B6-chest1":[{"type":"item","ID":73},{"type":"gold","N":250},{"type":"item","ID":75}],"shiverchill-B8-chest2":[{"type":"hat","ID":55}],"shiverchill-B9-chest5":[{"type":"item","ID":2},{"type":"item","ID":5},{"type":"item","ID":6},{"type":"item","ID":7},{"type":"item","ID":15}],"skywatch-A0-chest1":[{"type":"gold","N":200}],"skywatch-B1-chest2":[{"type":"outfit","ID":41}],"skywatch-C3-chest3":[{"type":"gold","N":500}],"skywatch-D2-chest4":[{"type":"weapon","ID":69}],"skywatch-E3-chest5":[{"type":"hat","ID":45}],"forest-A5-chest3":[{"type":"outfit","ID":12}],"forest-B7-chest1":[{"type":"weapon","ID":1}],"forest-B8-chest4":[{"type":"gold","N":500}],"forest-C4-chest2":[{"type":"gold","N":250}],"forest-C7-chest5":[{"type":"gold","N":500}],"forest-A4-chest6":[{"type":"gold","N":100},{"type":"currency","ID":13,"N":50},{"type":"item","ID":179,"N":10}]}')},56351:k=>{"use strict";k.exports=JSON.parse('{"endgame-guardian-firefly":{"bossID":54,"puppetMasterPreBattleDialogue":[1429],"puppetMasterDialogueSequence":[1436],"backgroundImageKey":"Battle_forest_generic_bg","foregroundImageKey":"Battle_forest_generic_fg","npcHelperData":[{"entranceRound":2,"dialogueSequence":[1414,1415]}]},"endgame-guardian-shiverchill":{"bossID":55,"puppetMasterPreBattleDialogue":[1430,1434],"puppetMasterDialogueSequence":[1437],"backgroundImageKey":"Battle_shiverchill_inside_bg","foregroundImageKey":"Battle_shiverchill_inside_fg","displayShield":true,"npcHelperData":[{"entranceRound":2,"dialogueSequence":[1416,1417]}]},"endgame-guardian-bonfire":{"bossID":56,"puppetMasterPreBattleDialogue":[1431],"puppetMasterDialogueSequence":[1438],"backgroundImageKey":"Battle_bonfire_lava_bg","foregroundImageKey":"Battle_bonfire_lava_fg","npcHelperData":[{"entranceRound":3,"dialogueSequence":[1418,1419]}]},"endgame-guardian-shipwreck":{"bossID":57,"puppetMasterPreBattleDialogue":[1432],"puppetMasterDialogueSequence":[1439],"backgroundImageKey":"Battle_shipwreck_inside_bg","foregroundImageKey":"Battle_shipwreck_inside_fg","npcHelperData":[{"entranceRound":1,"dialogueSequence":[1420,1421]}]},"endgame-guardian-skywatch":{"bossID":58,"puppetMasterPreBattleDialogue":[1433],"puppetMasterDialogueSequence":[1440],"backgroundImageKey":"Battle_skywatch_outside_bg","foregroundImageKey":"Battle_skywatch_outside_fg","displayShield":true,"npcHelperData":[{"entranceRound":2,"dialogueSequence":[1422],"dialogueSequenceReprise":[1495]},{"entranceRound":3,"dialogueSequence":[1423,1424]}]}}')},79259:k=>{"use strict";k.exports=JSON.parse('{"battle-academy-classroom-icetower":"bf36ed9d-a1bd-4bc6-8e07-dc2e9deb9bc2","7d49da25-cd3e-454d-91ef-0a3b093d6797":"bf36ed9d-a1bd-4bc6-8e07-dc2e9deb9bc2","battle-academy-classroom":"c2efc300-2e72-48d8-b646-e7c14b85fd63","9fef2c8a-2ff5-4670-9588-7204f3c70691":"c2efc300-2e72-48d8-b646-e7c14b85fd63","battle-academy-gh":"b9aed696-a108-4316-8077-3defba917de6","battle-academy-gh-stairs":["8c3bf69a-1282-416d-90c1-57efca053c5f","ca4194f4-8626-4ff4-b1f1-4d84fa0f823b"],"1f3b1af5-5868-4801-b68b-5338e46c0014":["8c3bf69a-1282-416d-90c1-57efca053c5f","ca4194f4-8626-4ff4-b1f1-4d84fa0f823b"],"battle-academy-office-icetower":"5e70d317-5751-462f-98b7-e9f30afbe201","56774bcb-6165-4235-829e-d5558d1a231b":"5e70d317-5751-462f-98b7-e9f30afbe201","battle-academy-office":"dd1bdac4-6044-465f-8fbf-7daf26e2fe1e","7ce67cd8-aa5a-4efe-af8c-2fd128061016":"dd1bdac4-6044-465f-8fbf-7daf26e2fe1e","battle-archives":["41f23d64-af23-4ad2-8c33-0f3ccfeaf3b4","88182fd5-723a-4ac5-9c21-ae0de5cb8b1c"],"5d4d4526-8264-4db6-bd65-8d8be4868e2e":["41f23d64-af23-4ad2-8c33-0f3ccfeaf3b4","88182fd5-723a-4ac5-9c21-ae0de5cb8b1c"],"battle-bonfire-inside":["6ba91a53-b9f0-4e76-a99a-133121d1f163","b292329a-50c6-46e7-92fb-e3b6b4fb0694"],"4f9b4c38-36d4-4dcc-83c3-aa39e345fd6c":["6ba91a53-b9f0-4e76-a99a-133121d1f163","b292329a-50c6-46e7-92fb-e3b6b4fb0694"],"battle-bonfire-lava":["49f70191-39bb-4f25-832e-84f6c2b1149b","b95d2b2d-cd94-4e1f-beac-149c9f023809"],"545efb2b-e4e2-4797-927d-f5f0fadc1672":["49f70191-39bb-4f25-832e-84f6c2b1149b","b95d2b2d-cd94-4e1f-beac-149c9f023809"],"battle-bonfire-outside":["16b4a938-d5bc-41ea-9089-c308b24b7237","ace7fd1a-3c7c-42fc-8b11-471d19098b40"],"4908067d-bf10-48bd-9341-81ae43b755de":["16b4a938-d5bc-41ea-9089-c308b24b7237","ace7fd1a-3c7c-42fc-8b11-471d19098b40"],"battle-bonfire-titan":"4f9b4c38-36d4-4dcc-83c3-aa39e345fd6c","battle-forest-generic":["351db49c-f8f5-4076-b713-a6175f9c1c0e","f5e3e053-a0f4-471d-88e9-c10404d8da07"],"29f4ad28-df74-4133-958f-12bbde4cc27f":["351db49c-f8f5-4076-b713-a6175f9c1c0e","f5e3e053-a0f4-471d-88e9-c10404d8da07"],"battle-forest-outside":["325a0230-611d-4d79-8c9e-784703b77721","c376bd6d-ef20-4c13-a396-4085486ef68c"],"62ae1ab1-881c-472f-bc99-7eb63564e017":["325a0230-611d-4d79-8c9e-784703b77721","c376bd6d-ef20-4c13-a396-4085486ef68c"],"battle-lamplight-outside":["33d861e0-8416-4366-b640-75bd58a76419","8088a9e2-278a-48cc-a429-be02d472fbbc"],"f369358a-fdea-43c7-83e6-c1a5b1f3e467":["33d861e0-8416-4366-b640-75bd58a76419","8088a9e2-278a-48cc-a429-be02d472fbbc"],"battle-lamplight-outside-pumpkinfest":["83af8521-a111-4086-8412-90998096923b","e96058b9-7536-4dfd-9c4f-b89a9a6f312d"],"087fd393-236a-4749-bdd7-dca2b7708960":["83af8521-a111-4086-8412-90998096923b","e96058b9-7536-4dfd-9c4f-b89a9a6f312d"],"battle-lamplight-outside-pumpkinfest-night":["ebf28489-f1ca-4961-9c9a-b4833bfb8b5a","6f160c28-ca59-4b62-b5b8-ea9f0e5e9fe0"],"battle-lamplight-outside-springfest":["99a5fe98-a71a-4c17-a9b4-c85809f08d82","e636c55e-fde2-4c8d-870c-b7d8035fce92"],"battle-lamplight-outside-summerfest":["dc9e3505-30bd-4e74-9fc5-bc9147af52ce","25f0b480-cadc-43c3-835b-ffd6e60115ad"],"battle-lamplight-outside-starlight":["e666e7f9-6294-41e6-8a7a-45fdbc61a69b","654aa629-489e-4cb6-bf46-fed109a439ce"],"9d7b7d41-fa35-41a7-af78-87398d3eeff1":["e666e7f9-6294-41e6-8a7a-45fdbc61a69b","654aa629-489e-4cb6-bf46-fed109a439ce"],"battle-lamplight-outside-winterfest":["a24b5f19-0b31-47ae-ab9e-2be6854dfc5f","d133013e-92a7-467e-875b-c599d5fffff5"],"battle-moon":["bd6ba53d-dd8a-4a7f-a68c-26161c17f5df","aa0f953d-a092-4ba4-9ea6-3e017d4f8e77"],"battle-moonlight":["6b62b005-097a-4580-9701-061386e71920","dddabadb-b443-4499-a8e0-a896944e727f"],"e30f311b-73b7-409c-8850-46f8ae854b3c":["a24b5f19-0b31-47ae-ab9e-2be6854dfc5f","d133013e-92a7-467e-875b-c599d5fffff5"],"battle-shipwreck-inside":["510850d9-61d9-49ed-a600-4ba7f2b7f397","c547d4ff-e235-4bd4-be23-b503cb6cad72"],"510850d9-61d9-49ed-a600-4ba7f2b7f397":["510850d9-61d9-49ed-a600-4ba7f2b7f397","c547d4ff-e235-4bd4-be23-b503cb6cad72"],"battle-shipwreck-outside":["d502cd37-ef8c-46d6-81e8-7c548b66dc0d","bc6618a6-f008-446e-8ead-5391c4cce57d"],"19cbd9ec-281e-4fe3-80fc-72edfd2289ba":["d502cd37-ef8c-46d6-81e8-7c548b66dc0d","bc6618a6-f008-446e-8ead-5391c4cce57d"],"battle-shipwreck-underwater":["9e53b099-9941-466f-8ea8-e6e7d0126049","c883bf41-56ea-4415-bd75-1157fa748a67"],"ef6a2f9a-5d14-4afd-8767-e34ca09db5ee":["9e53b099-9941-466f-8ea8-e6e7d0126049","c883bf41-56ea-4415-bd75-1157fa748a67"],"battle-shiverchill-inside":["b7555e19-a333-47c4-ab5c-7eb5dc06893e","a5a80e5b-5680-4b3e-a53f-6155540dcc9c"],"9ee1391b-9efb-4898-ac14-7d0168d82825":["b7555e19-a333-47c4-ab5c-7eb5dc06893e","a5a80e5b-5680-4b3e-a53f-6155540dcc9c"],"battle-shiverchill-outside":["0d6c6911-c576-4200-8a99-7be16d46e7e8","c14e6f6f-83dd-48ac-970a-4d9cd6d30f59"],"d0e470ef-38cc-4dc7-8259-ab85abd2cf5a":["0d6c6911-c576-4200-8a99-7be16d46e7e8","c14e6f6f-83dd-48ac-970a-4d9cd6d30f59"],"battle-skywatch-inside":["bec82905-9385-4c6d-a27a-2027d27d9f0f","d87f5a6b-64e8-4afd-ac23-a9905ca5e2a0"],"9b95d790-0d89-48dc-a95d-add23a4d3885":["bec82905-9385-4c6d-a27a-2027d27d9f0f","d87f5a6b-64e8-4afd-ac23-a9905ca5e2a0"],"battle-skywatch-outside":["29189a36-c263-472b-9375-6340c7e5486a","858eb9e5-97cd-4d79-bd4a-66347b53f294"],"19a67124-2042-4cb6-a4b9-4a39c0d02002":["29189a36-c263-472b-9375-6340c7e5486a","858eb9e5-97cd-4d79-bd4a-66347b53f294"],"battle-tower-inside":["6689ef4f-ed14-4a10-b50b-7c51aeb172ef","d21d9862-1f9a-42e6-988b-efcd34f5f397"],"0a2117f2-2b4e-463b-b22d-00e4b9404e03":["6689ef4f-ed14-4a10-b50b-7c51aeb172ef","d21d9862-1f9a-42e6-988b-efcd34f5f397"],"battle-grotto":["e3602904-def2-4b94-ba3f-1f2e5ae65d83","211ad4ee-1450-4931-b4e4-4964e9e4199e"]}')},73792:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"tail":{"y":{"interval":10000,"frames":[6]},"frameName":{"interval":150,"frames":[0,1,2]}},"body":{"frameName":{"interval":150,"frames":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]}},"legs":{"visible":{"interval":10000,"frames":[false]}}},"walk":{"loop":true,"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":[0]}},"legs":{"frameName":{"interval":150,"frames":[0,1,2,3]}},"tail":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":150,"frames":[0,1]}}}}')},60675:k=>{"use strict";k.exports=JSON.parse('{"H":["CHAT_ALL_RIGHT","CHAT_ALL_GOOD","CHAT_ABRACADABRA","CHAT_ANIMALS","CHAT_ARE_YOU_COMING","CHAT_ARE_YOU_LEAVING","CHAT_ARE_YOU_STAYING","CHAT_ARE_YOU_HAVING_FUN","CHAT_BAD","CHAT_BUSY","CHAT_BYE","CHAT_BYE_BYE","CHAT_BORING","CHAT_BOUGHT_IT","CHAT_BUT","CHAT_BARELY","CHAT_BECAUSE","CHAT_CANT_RIGHT_NOW","CHAT_CHECK_IT_OUT","CHAT_COME_OVER_HERE","CHAT_CRUD","CHAT_DO_YOU_HAVE_A_MIN","CHAT_DO_YOU_HAVE","CHAT_DID_YOU_SEE_THAT","CHAT_DID_YOU_CATCH","CHAT_DONT_BOTHER","CHAT_DUDE","CHAT_DEPENDS","CHAT_EVERYONE_LOOK","CHAT_ELEMENTARY","CHAT_FOLLOW_ME","CHAT_FRIENDS","CHAT_FORGET_IT","CHAT_FUN","CHAT_FOUND_YOU","CHAT_FOUND_IT","CHAT_FUNDERFUL","CHAT_FREAKY","CHAT_GO_AWAY","CHAT_GOOD","CHAT_GOODBYE","CHAT_GREETINGS","CHAT_GOOD_MORNING","CHAT_GOOD_NIGHT","CHAT_GOOD_AFTERNOON","CHAT_GOOD_TO_KNOW","CHAT_GHOSTS","CHAT_GREAT","CHAT_GUESS_AGAIN","CHAT_GUESS","CHAT_GOLLY","CHAT_GOT_TO_GO","CHAT_HI","CHAT_HELLO","CHAT_HELLO_THERE","CHAT_HEY","CHAT_HOW_ARE_YOU","CHAT_HOW","CHAT_HAPPY","CHAT_HELP_ME","CHAT_I_CAUGHT_A","CHAT_I_GOT_A","CHAT_I_HAVE_TO_GO","CHAT_I_HAVE_TO_LEAVE","CHAT_I_LEVELED_UP","CHAT_I_LOVE_PRODIGY","CHAT_I_LIKE_YOUR_HAIR","CHAT_I_LIKE_YOUR_OUTFIT","CHAT_I_LIKE_YOUR_HAT","CHAT_I_LIKE_YOUR_WAND","CHAT_I_LIKE_YOU_PET","CHAT_I_LIKE_THIS_PLACE","CHAT_I_DONT_LIKE_IT_HERE","CHAT_I_LIKE_IT_HERE","CHAT_ITS_SPOOKY_HERE","CHAT_ITS_SUPER_RARE","CHAT_ITS_TIME","CHAT_IM_RICH","CHAT_JUST_KIDDING","CHAT_JUST_YOU_WAIT","CHAT_JOKING","CHAT_JEALOUS","CHAT_KEEP_GOING","CHAT_KEEP_IT_UP","CHAT_KEEP_WALKING","CHAT_LEAVE_ME_ALONE","CHAT_LOOK","CHAT_LOOK_AT_THIS","CHAT_LOVE_IT","CHAT_LETS_GO","CHAT_LETS_BATTLE","CHAT_LET_ME_SEE","CHAT_LOCKED","CHAT_MY_FAVOURITE_IS","CHAT_MY_FAVOURITE_ITEM_IS","CHAT_MY_FAVOURITE_PET_IS","CHAT_MAYBE","CHAT_MAKE_ME","CHAT_MADE_IT","CHAT_MANY_THANKS","CHAT_MADE_TONS_OF_GOLD","CHAT_NEAT","CHAT_NO","CHAT_NOT_RIGHT_NOW","CHAT_NOT_TODAY","CHAT_NEVER_MIND","CHAT_NAH","CHAT_NO_CAN_DO","CHAT_NEVER","CHAT_NOW_QUESTION","CHAT_NOW","CHAT_NO_WAY","CHAT_OVER","CHAT_OVER_HERE","CHAT_ONE_OF_THESE_IS","CHAT_OKAY","CHAT_OMINOUS","CHAT_PUYOY","CHAT_PERHAPS","CHAT_PARTY_TIME","CHAT_PRETTY_COOL","CHAT_PRACTICE","CHAT_QUACK_QUACK","CHAT_QUITE","CHAT_QUIET","CHAT_RIGHT","CHAT_RIGHT_BEHIND_YOU","CHAT_RIBBIT","CHAT_RIGHT_OVER_HERE","CHAT_RIGHT_THERE","CHAT_SEE_YOU_LATER","CHAT_SEE_YA","CHAT_SEE","CHAT_SORRY","CHAT_SAFE_AND_SOUND","CHAT_SHHH","CHAT_SOUNDS_LIKE","CHAT_SEEMS_LIKE_IT","CHAT_SOMEONE_SAID_SO","CHAT_SOMEDAY","CHAT_THANK_YOU","CHAT_THERE_YOU_ARE","CHAT_THINK_ABOUT_IT","CHAT_TIME_FOR_BED","CHAT_TIME_FOR_DINNER","CHAT_TIME_FOR_LUNCH","CHAT_TIME_FOR_SUPPER","CHAT_TIME_TO_GET_UP","CHAT_TIME_TO_GO","CHAT_TERRIBLE","CHAT_TELL_YOU_WHAT","CHAT_VERY_GOOD","CHAT_WHATS_UP","CHAT_WHO","CHAT_WHO_ARE_YOU","CHAT_WHY","CHAT_WHAT","CHAT_WHERE","CHAT_YES","CHAT_YOU_COMING","CHAT_YOU_LOOK_COOL","CHAT_YOU_STILL_THERE","CHAT_YOLO","CHAT_YOURE_WELCOME","CHAT_ZZZ","CHAT_DRAGONS","CHAT_DRAGONS_COMING","CHAT_DRAGONS_HERE","CHAT_DRAGONS_COOL","CHAT_DRAGONS_WANT","CHAT_DRAGONS_SEEN","CHAT_CHILL_CHAR_COOL","CHAT_TIDUS_COOL","CHAT_ECLIPSE_COOL","CHAT_LUMA_COOL","CHAT_CHILL_CHAR_FAVOURITE","CHAT_TIDUS_FAVOURITE","CHAT_ECLIPSE_FAVOURITE","CHAT_LUMA_FAVOURITE","CHAT_DRAGONS_LIKE","CHAT_ABRACA_DAB_RA","CHAT_FEEL_LIKE_DANCING","CHAT_LETS_DANCE","CHAT_SHOW_FUNNY_FACE","CHAT_ASK_PARENTS","CHAT_PARENTS_BEST","CHAT_MEMBER_AWESOME","CHAT_TEACHER_AWESOME","CHAT_BUNNIES_ARE_BEST","CHAT_I_LIKE_BUNNIES","CHAT_GO_BUNNY_BANDITS","CHAT_DO_YOU_LIKE_BUNNIES","CHAT_HIPPITY_HOP","CHAT_HOP_HOP","CHAT_HARRIET_HOOD_RULES","CHAT_FOXES_ARE_BEST","CHAT_I_LIKE_FOXES","CHAT_GO_FOX_KNIGHTS","CHAT_DO_YOU_LIKE_FOXES","CHAT_WHAT_DOES_FOX_SAY","CHAT_DON_ZORRO_FANTASTICO"]}')},7640:k=>{"use strict";k.exports=JSON.parse('{"noot":[{"textKey":"DIALOGUE_NOOT_0","face":2,"anim":4,"audio":{"tag":"voice-10-12","s":0,"d":1}},{"textKey":"DIALOGUE_NOOT_1","face":3,"anim":1,"audio":{"tag":"voice-10-12","s":1,"d":4}},{"textKey":"DIALOGUE_NOOT_2","face":0,"audio":{"tag":"voice-10-12","s":5,"d":7}},{"textKey":"DIALOGUE_NOOT_3","face":0,"anim":2,"audio":{"tag":"voice-10-13","s":0,"d":7}},{"textKey":"DIALOGUE_NOOT_4","face":1,"audio":{"tag":"voice-10-13","s":7,"d":6}},{"textKey":"DIALOGUE_NOOT_5","face":4,"audio":{"tag":"voice-10-13","s":13,"d":7}},{"textKey":"DIALOGUE_NOOT_6","face":4,"audio":{"tag":"voice-10-14","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_7","face":3,"anim":2,"audio":{"tag":"voice-10-14","s":6,"d":4}},{"textKey":"DIALOGUE_NOOT_8","face":0,"audio":{"tag":"voice-10-87","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_9","face":1,"audio":{"tag":"voice-10-1","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_10","face":0,"audio":{"tag":"voice-10-1","s":6,"d":3.5}},{"textKey":"DIALOGUE_NOOT_11","face":2,"anim":4,"audio":{"tag":"voice-10-2","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_12","face":3,"audio":{"tag":"voice-10-2","s":4,"d":3}},{"textKey":"DIALOGUE_NOOT_13","face":4,"audio":{"tag":"voice-10-4","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_14","face":0,"audio":{"tag":"voice-10-15","s":8,"d":6}},{"textKey":"DIALOGUE_NOOT_15","face":0,"audio":{"tag":"voice-10-5","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_16","face":4,"audio":{"tag":"voice-10-5","s":4,"d":4}},{"textKey":"DIALOGUE_NOOT_17","face":3,"audio":{"tag":"voice-10-5","s":8,"d":5}},{"textKey":"DIALOGUE_NOOT_18","face":2,"audio":{"tag":"voice-10-6","s":2.8,"d":3.2}},{"textKey":"DIALOGUE_NOOT_19","face":0,"audio":{"tag":"voice-10-7","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_20","face":4,"audio":{"tag":"voice-10-7","s":3,"d":3}},{"textKey":"DIALOGUE_NOOT_21","face":0,"audio":{"tag":"voice-10-7","s":6,"d":6}},{"textKey":"DIALOGUE_NOOT_22","face":1,"anim":1,"audio":{"tag":"voice-10-8","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_23","face":4,"audio":{"tag":"voice-10-8","s":4,"d":5}},{"textKey":"DIALOGUE_NOOT_24","face":3,"anim":2,"audio":{"tag":"voice-10-16","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_25","face":5,"anim":4,"audio":{"tag":"voice-10-16","s":4,"d":3}},{"textKey":"DIALOGUE_NOOT_26","face":4,"audio":{"tag":"voice-10-16","s":7,"d":8}},{"textKey":"DIALOGUE_NOOT_27","face":0,"audio":{"tag":"voice-10-15","s":0,"d":8}},{"textKey":"DIALOGUE_NOOT_28","face":1,"audio":{"tag":"voice-10-12","s":12,"d":5}},{"textKey":"DIALOGUE_NOOT_29","face":5,"anim":2,"audio":{"tag":"voice-10-17","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_30","face":2,"anim":4,"audio":{"tag":"voice-10-17","s":6,"d":8}},{"textKey":"DIALOGUE_NOOT_31","face":1,"audio":{"tag":"voice-10-17","s":14,"d":5}},{"textKey":"DIALOGUE_NOOT_32","face":3,"audio":{"tag":"voice-10-18","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_33","face":2,"anim":4,"audio":{"tag":"voice-10-18","s":5,"d":4}},{"textKey":"DIALOGUE_NOOT_34","face":0,"audio":{"tag":"voice-10-16","s":15,"d":6}},{"textKey":"DIALOGUE_NOOT_35","face":0,"audio":{"tag":"voice-10-19","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_36","face":2,"audio":{"tag":"voice-10-19","s":10,"d":5}},{"textKey":"DIALOGUE_NOOT_37","face":3,"anim":2,"audio":{"tag":"voice-10-19","s":6,"d":4}},{"textKey":"DIALOGUE_NOOT_38","face":3,"anim":2,"audio":{"tag":"voice-10-20","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_39","face":1,"audio":{"tag":"voice-10-20","s":3,"d":2}},{"textKey":"DIALOGUE_NOOT_40","face":3,"anim":4,"audio":{"tag":"voice-10-20","s":5,"d":3}},{"textKey":"DIALOGUE_NOOT_41","face":3,"anim":4,"audio":{"tag":"voice-10-20","s":8,"d":3}},{"textKey":"DIALOGUE_NOOT_42","face":0,"audio":{"tag":"voice-10-19","s":15,"d":7}},{"textKey":"DIALOGUE_NOOT_43","face":0,"audio":{"tag":"voice-10-19","s":22,"d":6}},{"textKey":"DIALOGUE_NOOT_44","face":0,"audio":{"tag":"voice-10-21","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_45","face":2,"audio":{"tag":"voice-10-21","s":4,"d":3}},{"textKey":"DIALOGUE_NOOT_46","face":3,"audio":{"tag":"voice-10-21","s":7,"d":4}},{"textKey":"DIALOGUE_NOOT_47","face":4,"audio":{"tag":"voice-10-21","s":11,"d":1}},{"textKey":"DIALOGUE_NOOT_48","face":1,"audio":{"tag":"voice-10-21","s":12,"d":1}},{"textKey":"DIALOGUE_NOOT_49","face":2,"audio":{"tag":"voice-10-21","s":13,"d":2}},{"textKey":"DIALOGUE_NOOT_50","face":3,"audio":{"tag":"voice-10-21","s":15,"d":2}},{"textKey":"DIALOGUE_NOOT_51","face":2,"anim":4,"audio":{"tag":"voice-10-21","s":17,"d":4}},{"textKey":"DIALOGUE_NOOT_52","face":1,"audio":{"tag":"voice-10-21","s":21,"d":4}},{"textKey":"DIALOGUE_NOOT_53","face":2,"anim":4,"audio":{"tag":"voice-10-22","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_54","face":2,"anim":4,"audio":{"tag":"voice-10-23","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_55","face":0,"audio":{"tag":"voice-10-23","s":6,"d":4}},{"textKey":"DIALOGUE_NOOT_56","face":1,"anim":2,"audio":{"tag":"voice-10-24","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_57","face":2,"audio":{"tag":"voice-10-24","s":4,"d":4}},{"textKey":"DIALOGUE_NOOT_58","face":4,"audio":{"tag":"voice-10-24","s":8,"d":7}},{"textKey":"DIALOGUE_NOOT_59","face":2,"anim":4,"audio":{"tag":"voice-10-25","s":0,"d":7}},{"textKey":"DIALOGUE_NOOT_60","face":5,"audio":{"tag":"voice-10-26","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_61","face":1,"audio":{"tag":"voice-10-27","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_62","face":3,"audio":{"tag":"voice-10-27","s":6,"d":2}},{"textKey":"DIALOGUE_NOOT_63","face":5,"audio":{"tag":"voice-10-27","s":8,"d":3}},{"textKey":"DIALOGUE_NOOT_64","face":2,"anim":4,"audio":{"tag":"voice-10-28","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_65","face":3,"audio":{"tag":"voice-10-28","s":4,"d":3}},{"textKey":"DIALOGUE_NOOT_66","face":1,"audio":{"tag":"voice-10-21","s":25,"d":3}},{"textKey":"DIALOGUE_NOOT_67","face":1,"anim":4,"audio":{"tag":"voice-10-29","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_68","face":1,"audio":{"tag":"voice-10-30","s":0,"d":2}},{"textKey":"DIALOGUE_NOOT_69","face":4,"audio":{"tag":"voice-10-31","s":0,"d":2}},{"textKey":"DIALOGUE_NOOT_70","face":5,"audio":{"tag":"voice-10-32","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_71","face":1,"audio":{"tag":"voice-10-33","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_72","face":4,"audio":{"tag":"voice-10-33","s":3,"d":7}},{"textKey":"DIALOGUE_NOOT_73","face":3,"anim":2,"audio":{"tag":"voice-10-34","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_74","face":1,"audio":{"tag":"voice-10-35","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_75","face":2,"anim":2,"audio":{"tag":"voice-10-35","s":5,"d":6}},{"textKey":"DIALOGUE_NOOT_76","face":1,"audio":{"tag":"voice-10-35","s":11,"d":4}},{"textKey":"DIALOGUE_NOOT_77","face":2,"anim":4,"audio":{"tag":"voice-10-36","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_78","face":2,"anim":4,"audio":{}},{"textKey":"DIALOGUE_NOOT_79","face":3},{"textKey":"DIALOGUE_NOOT_80","face":2,"anim":4,"audio":{"tag":"voice-10-37","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_81","face":2,"anim":4,"audio":{"tag":"voice-10-37","s":6,"d":5}},{"textKey":"DIALOGUE_NOOT_82","face":2,"anim":4,"audio":{"tag":"voice-10-37","s":11,"d":5}},{"textKey":"DIALOGUE_NOOT_83","face":2,"anim":4,"audio":{"tag":"voice-10-38","s":0,"d":8}},{"textKey":"DIALOGUE_NOOT_84","face":2,"anim":4,"audio":{"tag":"voice-10-38","s":8,"d":7}},{"textKey":"DIALOGUE_NOOT_85","face":2,"anim":4,"audio":{"tag":"voice-10-39","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_86","face":2,"anim":4,"audio":{"tag":"voice-10-39","s":5,"d":4}},{"textKey":"DIALOGUE_NOOT_87","face":2,"anim":4,"audio":{"tag":"voice-10-39","s":9,"d":6}},{"textKey":"DIALOGUE_NOOT_88","face":2,"anim":4,"audio":{"tag":"voice-10-40","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_89","face":2,"anim":4,"audio":{"tag":"voice-10-40","s":4,"d":5}},{"textKey":"DIALOGUE_NOOT_90","face":2,"anim":4,"audio":{"tag":"voice-10-40","s":9,"d":4}},{"textKey":"DIALOGUE_NOOT_91","face":2,"anim":4,"audio":{"tag":"voice-10-41","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_92","face":2,"anim":4,"audio":{"tag":"voice-10-41","s":4,"d":8}},{"textKey":"DIALOGUE_NOOT_93","face":2,"anim":4,"audio":{"tag":"voice-10-41","s":12,"d":6}},{"textKey":"DIALOGUE_NOOT_94","face":2,"anim":4,"audio":{"tag":"voice-10-42","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_95","face":5,"anim":1,"audio":{"tag":"voice-10-43","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_96","face":5,"anim":4,"audio":{"tag":"voice-10-43","s":4,"d":2}},{"textKey":"DIALOGUE_NOOT_97","face":1,"anim":2,"audio":{"tag":"voice-10-44","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_98","face":4,"anim":1,"audio":{"tag":"voice-10-45","s":0,"d":2}},{"textKey":"DIALOGUE_NOOT_99","face":1},{"textKey":"DIALOGUE_NOOT_100","face":5,"anim":4,"audio":{"tag":"voice-10-46","s":0,"d":2}},{"textKey":"DIALOGUE_NOOT_101","face":2,"anim":2,"audio":{"tag":"voice-10-47","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_102","face":3,"anim":4,"audio":{"tag":"voice-10-47","s":4,"d":3}},{"textKey":"DIALOGUE_NOOT_103","face":4,"anim":1,"audio":{"tag":"voice-10-50","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_104","face":5,"anim":1,"audio":{"tag":"voice-10-51","s":0,"d":2}},{"textKey":"DIALOGUE_NOOT_105","face":1,"anim":2,"audio":{"tag":"voice-10-51","s":2,"d":3}},{"textKey":"DIALOGUE_NOOT_106","face":4,"anim":2,"audio":{"tag":"voice-10-51","s":5,"d":3}},{"textKey":"DIALOGUE_NOOT_107","face":1,"anim":2,"audio":{"tag":"voice-10-52","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_108","face":3,"anim":4,"audio":{"tag":"voice-10-48","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_109","face":2,"anim":2,"audio":{"tag":"voice-10-49","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_110","face":3,"anim":4},{"textKey":"DIALOGUE_NOOT_111","face":3,"anim":4,"audio":{"tag":"voice-10-20","s":9,"d":2}},{"textKey":"DIALOGUE_NOOT_112","face":1,"anim":4,"audio":{"tag":"voice-10-66","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_113","face":1,"anim":4,"audio":{"tag":"voice-10-66","s":6,"d":6}},{"textKey":"DIALOGUE_NOOT_114","face":4,"anim":4,"audio":{"tag":"voice-10-66","s":12,"d":5}},{"textKey":"DIALOGUE_NOOT_115","face":3,"anim":4,"audio":{"tag":"voice-10-66","s":17,"d":4}},{"textKey":"DIALOGUE_NOOT_116","face":3,"anim":4,"audio":{"tag":"voice-10-66","s":21,"d":3}},{"textKey":"DIALOGUE_NOOT_117","face":2},{"textKey":"DIALOGUE_NOOT_118","face":1,"audio":{"tag":"voice-10-53","s":0,"d":2}},{"textKey":"DIALOGUE_NOOT_119","face":5,"anim":2,"audio":{"tag":"voice-10-53","s":2,"d":2}},{"textKey":"DIALOGUE_NOOT_120","face":5,"anim":4,"audio":{"tag":"voice-10-53","s":6.4,"d":3.2}},{"textKey":"DIALOGUE_NOOT_121","face":2,"anim":4,"audio":{"tag":"voice-10-54","s":0,"d":1}},{"textKey":"DIALOGUE_NOOT_122","face":0,"anim":2,"audio":{"tag":"voice-10-54","s":3,"d":5}},{"textKey":"DIALOGUE_NOOT_123","face":1,"anim":2,"audio":{"tag":"voice-10-54","s":8,"d":1}},{"textKey":"DIALOGUE_NOOT_124","face":3,"anim":4,"audio":{"tag":"voice-10-55","s":0,"d":1}},{"textKey":"DIALOGUE_NOOT_125","face":2,"anim":2,"audio":{"tag":"voice-10-55","s":1,"d":1}},{"textKey":"DIALOGUE_NOOT_126","face":0,"anim":2,"audio":{"tag":"voice-10-55","s":4,"d":5}},{"textKey":"DIALOGUE_NOOT_127","face":1,"anim":3,"audio":{"tag":"voice-10-55","s":9,"d":5}},{"textKey":"DIALOGUE_NOOT_128","face":2,"anim":2,"audio":{"tag":"voice-10-56","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_129","face":4,"anim":2,"audio":{"tag":"voice-10-56","s":4,"d":5}},{"textKey":"DIALOGUE_NOOT_130","face":0,"anim":2,"audio":{"tag":"voice-10-56","s":9,"d":5}},{"textKey":"DIALOGUE_NOOT_131","face":2,"anim":2,"audio":{"tag":"voice-10-56","s":14,"d":2}},{"textKey":"DIALOGUE_NOOT_132","face":3,"anim":2,"audio":{"tag":"voice-10-57","s":0,"d":7}},{"textKey":"DIALOGUE_NOOT_133","face":2,"anim":2,"audio":{"tag":"voice-10-57","s":7,"d":5}},{"textKey":"DIALOGUE_NOOT_134","face":2,"anim":2,"audio":{"tag":"voice-10-57","s":12,"d":5}},{"textKey":"DIALOGUE_NOOT_135","face":0,"audio":{"tag":"voice-10-96","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_136","face":2,"anim":4,"audio":{"tag":"voice-10-57","s":22,"d":4}},{"textKey":"DIALOGUE_NOOT_137","face":4,"anim":3,"audio":{"tag":"voice-10-57","s":26,"d":3}},{"textKey":"DIALOGUE_NOOT_138","face":2,"anim":2,"audio":{"tag":"voice-10-57","s":29,"d":6}},{"textKey":"DIALOGUE_NOOT_139","face":0,"anim":2,"audio":{"tag":"voice-10-96","s":5,"d":6}},{"textKey":"DIALOGUE_NOOT_140","face":2,"anim":2,"audio":{"tag":"voice-10-58","s":4,"d":5}},{"textKey":"DIALOGUE_NOOT_141","face":5,"anim":2,"audio":{"tag":"voice-10-59","s":0,"d":7}},{"textKey":"DIALOGUE_NOOT_142","face":5,"anim":4,"audio":{"tag":"voice-10-60","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_143","face":2,"anim":2,"audio":{"tag":"voice-10-61","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_144","face":2,"anim":2,"audio":{"tag":"voice-10-61","s":5,"d":9}},{"textKey":"DIALOGUE_NOOT_145","face":1,"anim":3,"audio":{"tag":"voice-10-61","s":14,"d":1}},{"textKey":"DIALOGUE_NOOT_146","face":1,"anim":2,"audio":{"tag":"voice-10-61","s":15,"d":5}},{"textKey":"DIALOGUE_NOOT_147","face":1,"anim":1,"audio":{"tag":"voice-10-62","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_148","face":5,"anim":4,"audio":{"tag":"voice-10-62","s":4,"d":3}},{"textKey":"DIALOGUE_NOOT_149","face":5,"anim":2,"audio":{"tag":"voice-10-62","s":7,"d":3}},{"textKey":"DIALOGUE_NOOT_150","face":1,"anim":4,"audio":{"tag":"voice-10-63","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_151","face":2,"anim":2,"audio":{"tag":"voice-10-63","s":5,"d":3}},{"textKey":"DIALOGUE_NOOT_152","face":5,"anim":2,"audio":{"tag":"voice-10-63","s":8,"d":7}},{"textKey":"DIALOGUE_NOOT_153","face":1,"anim":3,"audio":{"tag":"voice-10-63","s":15,"d":3}},{"textKey":"DIALOGUE_NOOT_154","face":0,"anim":2,"audio":{"tag":"voice-10-64","s":0,"d":7}},{"textKey":"DIALOGUE_NOOT_155","face":2,"anim":2,"audio":{"tag":"voice-10-64","s":7,"d":3}},{"textKey":"DIALOGUE_NOOT_156","face":3,"anim":4,"audio":{"tag":"voice-10-86","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_157","face":1,"anim":2,"audio":{"tag":"voice-10-64","s":15,"d":5}},{"textKey":"DIALOGUE_NOOT_158","face":3,"anim":2,"audio":{"tag":"voice-10-64","s":20,"d":4}},{"textKey":"DIALOGUE_NOOT_159","face":2,"anim":2,"audio":{"tag":"voice-10-64","s":24,"d":5}},{"textKey":"DIALOGUE_NOOT_160","face":3,"anim":4,"audio":{"tag":"voice-10-64","s":29,"d":2}},{"textKey":"DIALOGUE_NOOT_161","face":2,"anim":2,"audio":{"tag":"voice-10-64","s":31,"d":5}},{"textKey":"DIALOGUE_NOOT_162","face":0,"anim":4,"audio":{"tag":"voice-10-96","s":11,"d":4}},{"textKey":"DIALOGUE_NOOT_163","face":0,"anim":2,"audio":{"tag":"voice-10-64","s":40,"d":7}},{"textKey":"DIALOGUE_NOOT_164","face":2,"anim":2,"audio":{"tag":"voice-10-64","s":47,"d":7}},{"textKey":"DIALOGUE_NOOT_165","face":2,"anim":4,"audio":{"tag":"voice-10-18","s":7,"d":1.6}},{"textKey":"DIALOGUE_NOOT_166","face":1},{"textKey":"DIALOGUE_NOOT_167","face":0,"anim":2,"audio":{"tag":"voice-25-1","s":0,"d":2.8}},{"textKey":"DIALOGUE_NOOT_168","face":1,"audio":{"tag":"voice-25-1","s":3,"d":5.5}},{"textKey":"DIALOGUE_NOOT_169","face":1,"audio":{"tag":"voice-25-1","s":9,"d":1.6}},{"textKey":"DIALOGUE_NOOT_170","face":0,"anim":2,"audio":{"tag":"voice-25-1","s":11,"d":3.1}},{"textKey":"DIALOGUE_NOOT_171","face":1,"anim":2,"audio":{"tag":"voice-25-1","s":15,"d":8}},{"textKey":"DIALOGUE_NOOT_172","face":1,"anim":4,"audio":{"tag":"voice-25-1","s":32,"d":7.3}},{"textKey":"DIALOGUE_NOOT_173","face":0,"anim":2,"audio":{"tag":"voice-25-1","s":40,"d":2.9}},{"textKey":"DIALOGUE_NOOT_174","face":1,"anim":2,"audio":{"tag":"voice-25-1","s":44,"d":5.4}},{"textKey":"DIALOGUE_NOOT_175","face":2,"anim":2,"audio":{"tag":"voice-25-1","s":50,"d":1.4}},{"textKey":"DIALOGUE_NOOT_176","face":4,"anim":2,"audio":{"tag":"voice-25-1","s":52,"d":2.74}},{"textKey":"DIALOGUE_NOOT_177","face":4,"anim":2,"audio":{"tag":"voice-10-65","s":0,"d":2.54}},{"textKey":"DIALOGUE_NOOT_178","face":3,"anim":4,"audio":{"tag":"voice-10-67","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_179","face":0,"anim":2,"audio":{"tag":"voice-10-67","s":5.5,"d":8.5}},{"textKey":"DIALOGUE_NOOT_180","face":0,"anim":2,"audio":{"tag":"voice-10-67","s":15,"d":3}},{"textKey":"DIALOGUE_NOOT_181","face":0,"audio":{"tag":"voice-10-67","s":19,"d":8}},{"textKey":"DIALOGUE_NOOT_182","face":3,"anim":2,"audio":{"tag":"voice-10-67","s":28,"d":5}},{"textKey":"DIALOGUE_NOOT_183","face":2,"anim":4,"audio":{"tag":"voice-10-67","s":33,"d":4}},{"textKey":"DIALOGUE_NOOT_184","face":0,"anim":4,"audio":{"tag":"voice-10-69","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_185","face":3,"anim":4,"audio":{"tag":"voice-10-70","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_186","face":3,"anim":4,"audio":{"tag":"voice-10-71","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_187","face":3,"anim":4,"audio":{"tag":"voice-10-72","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_188","face":3,"anim":4,"audio":{"tag":"voice-10-73","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_189","face":3,"anim":4,"audio":{"tag":"voice-10-74","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_190","face":3,"anim":4,"audio":{"tag":"voice-10-75","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_191","face":3,"anim":4,"audio":{"tag":"voice-10-76","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_192","face":3,"anim":4,"audio":{"tag":"voice-10-77","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_193","face":3,"anim":4,"audio":{"tag":"voice-10-78","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_194","face":3,"anim":4,"audio":{"tag":"voice-10-79","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_195","face":3,"anim":4,"audio":{"tag":"voice-10-80","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_196","face":3,"anim":4,"audio":{"tag":"voice-10-81","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_197","face":3,"anim":4,"audio":{"tag":"voice-10-82","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_198","face":3,"anim":4,"audio":{"tag":"voice-10-57","s":32.5,"d":2}},{"textKey":"DIALOGUE_NOOT_199","face":3,"anim":4,"audio":{"tag":"voice-10-16","s":0,"d":1.2}},{"textKey":"DIALOGUE_NOOT_200","face":4,"anim":4,"audio":{"tag":"voice-10-87","s":3,"d":5}},{"textKey":"DIALOGUE_NOOT_201","face":4,"anim":2,"audio":{"tag":"voice-10-87","s":8,"d":4}},{"textKey":"DIALOGUE_NOOT_202","face":0,"anim":4,"audio":{"tag":"voice-10-87","s":12,"d":6}},{"textKey":"DIALOGUE_NOOT_203","face":1,"anim":1,"audio":{"tag":"voice-10-87","s":18,"d":4}},{"textKey":"DIALOGUE_NOOT_204","face":4,"anim":2,"audio":{"tag":"voice-10-87","s":22,"d":4}},{"textKey":"DIALOGUE_NOOT_205","face":0,"anim":4,"audio":{"tag":"voice-10-87","s":26,"d":5}},{"textKey":"DIALOGUE_NOOT_206","face":2,"anim":2,"audio":{"tag":"voice-10-87","s":31,"d":4}},{"textKey":"DIALOGUE_NOOT_207","face":3,"anim":3,"audio":{"tag":"voice-10-87","s":35,"d":6}},{"textKey":"DIALOGUE_NOOT_208","face":1,"anim":2,"audio":{"tag":"voice-10-87","s":41,"d":6}},{"textKey":"DIALOGUE_NOOT_209","face":4,"anim":1,"audio":{"tag":"voice-10-87","s":47,"d":7}},{"textKey":"DIALOGUE_NOOT_210","face":4,"anim":1,"audio":{"tag":"voice-10-87","s":54,"d":4}},{"textKey":"DIALOGUE_NOOT_211","face":4,"anim":1,"audio":{"tag":"voice-10-87","s":58,"d":5}},{"textKey":"DIALOGUE_NOOT_212","face":4,"anim":1,"audio":{"tag":"voice-10-87","s":63,"d":4}},{"textKey":"DIALOGUE_NOOT_213","face":3,"anim":0,"audio":{"tag":"voice-10-87","s":67,"d":4}},{"textKey":"DIALOGUE_NOOT_214","face":3,"anim":0,"audio":{"tag":"voice-10-87","s":71,"d":6}},{"textKey":"DIALOGUE_NOOT_215","face":3,"anim":0,"audio":{"tag":"voice-10-87","s":77,"d":3}},{"textKey":"DIALOGUE_NOOT_216","face":3,"anim":0,"audio":{"tag":"voice-10-87","s":80,"d":5}},{"textKey":"DIALOGUE_NOOT_217","face":1,"anim":4,"audio":{"tag":"voice-10-87","s":85,"d":5}},{"textKey":"DIALOGUE_NOOT_218","face":0,"anim":2,"audio":{"tag":"voice-10-87","s":90,"d":4}},{"textKey":"DIALOGUE_NOOT_219","face":2,"anim":4,"audio":{"tag":"voice-10-87","s":94,"d":2}},{"textKey":"DIALOGUE_NOOT_220","face":0,"anim":2,"audio":{"tag":"voice-10-87","s":96,"d":6}},{"textKey":"DIALOGUE_NOOT_221","face":4,"anim":1,"audio":{"tag":"voice-10-87","s":102,"d":3}},{"textKey":"DIALOGUE_NOOT_222","face":5,"anim":3,"audio":{"tag":"voice-10-88","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_223","face":1,"anim":4,"audio":{"tag":"voice-10-88","s":5,"d":9}},{"textKey":"DIALOGUE_NOOT_224","face":1,"anim":4,"audio":{"tag":"voice-10-88","s":15,"d":4}},{"textKey":"DIALOGUE_NOOT_225","face":5,"anim":2,"audio":{"tag":"voice-10-88","s":20,"d":4}},{"textKey":"DIALOGUE_NOOT_226","face":2,"anim":4,"audio":{"tag":"voice-10-88","s":25,"d":4}},{"textKey":"DIALOGUE_NOOT_227","face":2,"anim":4,"audio":{"tag":"voice-10-88","s":30,"d":9}},{"textKey":"DIALOGUE_NOOT_228","face":1,"anim":2,"audio":{"tag":"voice-10-88","s":40,"d":4}},{"textKey":"DIALOGUE_NOOT_229","face":3,"anim":2,"audio":{"tag":"voice-10-88","s":45,"d":4}},{"textKey":"DIALOGUE_NOOT_230","face":0,"anim":2,"audio":{"tag":"voice-10-88","s":50,"d":9}},{"textKey":"DIALOGUE_NOOT_231","face":0,"audio":{"tag":"voice-10-88","s":60,"d":4}},{"textKey":"DIALOGUE_NOOT_232","face":0,"audio":{"tag":"voice-10-88","s":65,"d":4}},{"textKey":"DIALOGUE_NOOT_233","face":4,"anim":2,"audio":{"tag":"voice-10-88","s":70,"d":9}},{"textKey":"DIALOGUE_NOOT_234","face":3,"anim":4,"audio":{"tag":"voice-10-88","s":80,"d":4}},{"textKey":"DIALOGUE_NOOT_235","face":0,"audio":{"tag":"voice-10-88","s":85,"d":4}},{"textKey":"DIALOGUE_NOOT_236","face":1,"anim":3,"audio":{"tag":"voice-10-90","s":0,"d":1.5}},{"textKey":"DIALOGUE_NOOT_237","face":4,"anim":2,"audio":{"tag":"voice-10-90","s":2,"d":1.5}},{"textKey":"DIALOGUE_NOOT_238","face":1,"anim":4,"audio":{"tag":"voice-10-90","s":4,"d":2.5}},{"textKey":"DIALOGUE_NOOT_239","face":2,"anim":4,"audio":{"tag":"voice-10-90","s":7,"d":3}},{"textKey":"DIALOGUE_NOOT_240","face":1,"anim":2,"audio":{"tag":"voice-10-90","s":11,"d":4}},{"textKey":"DIALOGUE_NOOT_241","face":5,"audio":{"tag":"voice-10-90","s":16,"d":4}},{"textKey":"DIALOGUE_NOOT_242","face":0,"anim":0,"audio":{"tag":"voice-10-90","s":21,"d":2}},{"textKey":"DIALOGUE_NOOT_243","face":0,"anim":2,"audio":{"tag":"voice-10-91","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_244","face":1,"anim":2,"audio":{"tag":"voice-10-91","s":7,"d":5}},{"textKey":"DIALOGUE_NOOT_245","face":2,"anim":4,"audio":{"tag":"voice-10-91","s":13,"d":3}},{"textKey":"DIALOGUE_NOOT_246","face":1,"anim":3,"audio":{"tag":"voice-10-91","s":16,"d":1.5}},{"textKey":"DIALOGUE_NOOT_247","face":3,"anim":4,"audio":{"tag":"voice-10-91","s":18,"d":2}},{"textKey":"DIALOGUE_NOOT_248","face":0,"anim":0,"audio":{"tag":"voice-10-91","s":20,"d":2}},{"textKey":"DIALOGUE_NOOT_249","face":1,"anim":4,"audio":{"tag":"voice-10-92","s":0,"d":2.5}},{"textKey":"DIALOGUE_NOOT_250","face":0,"anim":2,"audio":{"tag":"voice-10-92","s":3,"d":2.5}},{"textKey":"DIALOGUE_NOOT_251","face":4,"anim":0,"audio":{"tag":"voice-10-93","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_252","face":1,"anim":1,"audio":{"tag":"voice-10-94","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_253","face":5,"audio":{"tag":"voice-10-94","s":5,"d":5}},{"textKey":"DIALOGUE_NOOT_254","face":4,"anim":2,"audio":{"tag":"voice-10-94","s":10,"d":3}},{"textKey":"DIALOGUE_NOOT_255","face":1,"audio":{"tag":"voice-10-95","s":2,"d":3}},{"textKey":"DIALOGUE_NOOT_256","face":0,"anim":2,"audio":{"tag":"voice-10-95","s":6,"d":5}},{"textKey":"DIALOGUE_NOOT_257","face":3,"anim":4,"audio":{"tag":"voice-10-20","s":9,"d":2}},{"textKey":"DIALOGUE_NOOT_258","face":0},{"textKey":"DIALOGUE_NOOT_259","face":0},{"textKey":"DIALOGUE_NOOT_260","face":2,"anim":0},{"textKey":"DIALOGUE_NOOT_261","face":2,"anim":0},{"textKey":"DIALOGUE_NOOT_262","face":0,"anim":0},{"textKey":"DIALOGUE_NOOT_263","face":2,"anim":0},{"textKey":"DIALOGUE_NOOT_264","face":2,"anim":0},{"textKey":"DIALOGUE_NOOT_265","face":1,"anim":0},{"textKey":"DIALOGUE_NOOT_266","face":4,"anim":0},{"textKey":"DIALOGUE_NOOT_267","face":0,"anim":0},{"textKey":"DIALOGUE_NOOT_268","face":2,"anim":1},{"textKey":"DIALOGUE_NOOT_269","face":2,"anim":0},{"textKey":"DIALOGUE_NOOT_270","face":2,"anim":0},{"textKey":"DIALOGUE_NOOT_271","face":3,"anim":0},{"textKey":"DIALOGUE_NOOT_272","face":1,"anim":0},{"textKey":"DIALOGUE_NOOT_273","face":0,"anim":0},{"textKey":"DIALOGUE_NOOT_274","face":0,"anim":0},{"textKey":"DIALOGUE_NOOT_275","face":0,"audio":{"tag":"voice-10-89","s":23,"d":6.5}},{"textKey":"DIALOGUE_NOOT_276","face":0,"audio":{"tag":"voice-10-89","s":30,"d":5.5}},{"textKey":"DIALOGUE_NOOT_277","face":0,"audio":{"tag":"voice-10-89","s":36,"d":3}},{"textKey":"DIALOGUE_NOOT_278","face":2,"anim":4,"audio":{"tag":"voice-10-89","s":0,"d":9}},{"textKey":"DIALOGUE_NOOT_279","face":0,"anim":2,"audio":{"tag":"voice-10-89","s":10,"d":3}},{"textKey":"DIALOGUE_NOOT_280","face":4,"anim":2,"audio":{"tag":"voice-10-89","s":13,"d":2}},{"textKey":"DIALOGUE_NOOT_281","face":0,"anim":2,"audio":{"tag":"voice-10-89","s":16,"d":6}},{"textKey":"DIALOGUE_NOOT_282","face":1,"anim":2},{"textKey":"DIALOGUE_NOOT_283","face":1,"anim":2,"audio":{"tag":"voice-10-97","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_284","face":1,"anim":2,"audio":{"tag":"voice-10-97","s":4,"d":8}},{"textKey":"DIALOGUE_NOOT_285","face":1,"anim":2},{"textKey":"DIALOGUE_NOOT_286","face":0,"anim":2},{"textKey":"DIALOGUE_NOOT_287","face":5},{"textKey":"DIALOGUE_NOOT_288","face":3,"anim":4},{"textKey":"DIALOGUE_NOOT_289","face":0,"anim":2},{"textKey":"DIALOGUE_POST_ENDGAME_NOOT_TITAN_INTRO_1","face":4,"audio":{"tag":"e907829b-e167-4a74-a007-43560ed75270","s":0,"d":3}},{"textKey":"DIALOGUE_POST_ENDGAME_NOOT_TITAN_INTRO_2","face":4,"audio":{"tag":"6ad06bed-0669-466a-b4e4-e31543f53f3f","s":0,"d":10}},{"textKey":"DIALOGUE_ENDGAME_NOOT_ACADEMY_INTRO","face":0,"audio":{"tag":"800500cb-684b-419e-b760-3509c1005d58","s":0,"d":6}}],"flora":[{"textKey":"DIALOGUE_FLORA_0","face":5,"anim":4,"audio":{"tag":"voice-8-1","s":0,"d":6}},{"textKey":"DIALOGUE_FLORA_1","face":3,"audio":{"tag":"voice-8-1","s":6,"d":6}},{"textKey":"DIALOGUE_FLORA_2","face":2,"audio":{"tag":"voice-8-1","s":12,"d":3}},{"textKey":"DIALOGUE_FLORA_3","face":6,"anim":2,"audio":{"tag":"voice-8-1","s":15,"d":5}},{"textKey":"DIALOGUE_FLORA_4","face":2,"audio":{"tag":"voice-8-2","s":0,"d":4}},{"textKey":"DIALOGUE_FLORA_5","face":1,"audio":{"tag":"voice-8-2","s":4,"d":8}},{"textKey":"DIALOGUE_FLORA_6","face":2,"audio":{"tag":"voice-8-2","s":12,"d":3}},{"textKey":"DIALOGUE_FLORA_7","face":1,"audio":{"tag":"voice-8-2","s":15,"d":2}},{"textKey":"DIALOGUE_FLORA_8","face":2,"audio":{"tag":"voice-8-3","s":2.1,"d":6}},{"textKey":"DIALOGUE_FLORA_9","face":5,"audio":{"tag":"voice-8-3","s":4,"d":6}},{"textKey":"DIALOGUE_FLORA_10","face":3,"audio":{"tag":"voice-8-3","s":10,"d":5}},{"textKey":"DIALOGUE_FLORA_11","face":4,"anim":4,"audio":{"tag":"voice-8-4","s":0,"d":7}},{"textKey":"DIALOGUE_FLORA_12","face":6,"audio":{"tag":"voice-8-4","s":7,"d":6}},{"textKey":"DIALOGUE_FLORA_13","face":7,"audio":{"tag":"voice-8-4","s":13,"d":3}},{"textKey":"DIALOGUE_FLORA_14","face":2,"audio":{"tag":"voice-8-5","s":0,"d":5}},{"textKey":"DIALOGUE_FLORA_15","face":0,"audio":{"tag":"voice-8-5","s":5,"d":3}},{"textKey":"DIALOGUE_FLORA_16","face":6,"anim":1,"audio":{"tag":"voice-8-6","s":0,"d":5}},{"textKey":"DIALOGUE_FLORA_17","face":6,"audio":{"tag":"voice-8-6","s":5,"d":8}},{"textKey":"DIALOGUE_FLORA_18","face":3,"audio":{"tag":"voice-8-7","s":0,"d":6}},{"textKey":"DIALOGUE_FLORA_19","face":6,"audio":{"tag":"voice-8-7","s":6,"d":5}},{"textKey":"DIALOGUE_FLORA_20","face":1,"audio":{"tag":"voice-8-7","s":11,"d":4}},{"textKey":"DIALOGUE_FLORA_21","face":6,"anim":4,"audio":{"tag":"voice-8-8","s":0,"d":6}},{"textKey":"DIALOGUE_FLORA_22","face":7,"audio":{"tag":"voice-8-8","s":6,"d":4}},{"textKey":"DIALOGUE_FLORA_23","face":6,"audio":{"tag":"voice-8-8","s":10,"d":5}},{"textKey":"DIALOGUE_FLORA_24","face":6,"anim":2,"audio":{"tag":"voice-8-9","s":0,"d":6}},{"textKey":"DIALOGUE_FLORA_25","face":2,"audio":{"tag":"voice-8-9","s":6,"d":6}},{"textKey":"DIALOGUE_FLORA_26","face":6,"anim":4,"audio":{"tag":"voice-8-9","s":12,"d":4}},{"textKey":"DIALOGUE_FLORA_27","face":2,"audio":{"tag":"voice-8-10","s":0,"d":7}},{"textKey":"DIALOGUE_FLORA_28","face":7,"audio":{"tag":"voice-8-10","s":7,"d":5}},{"textKey":"DIALOGUE_FLORA_29","face":0,"audio":{"tag":"voice-8-10","s":12,"d":4}},{"textKey":"DIALOGUE_FLORA_30","face":6,"anim":2,"audio":{"tag":"voice-8-10","s":16,"d":3}},{"textKey":"DIALOGUE_FLORA_31","face":6,"anim":4,"audio":{"tag":"voice-8-11","s":0,"d":9}},{"textKey":"DIALOGUE_FLORA_32","face":6,"audio":{"tag":"voice-8-11","s":9,"d":5}},{"textKey":"DIALOGUE_FLORA_33","face":3,"audio":{"tag":"voice-8-12","s":0,"d":4}},{"textKey":"DIALOGUE_FLORA_34","face":2,"audio":{"tag":"voice-8-12","s":4,"d":6}},{"textKey":"DIALOGUE_FLORA_35","face":4,"anim":4,"audio":{"tag":"voice-8-12","s":10,"d":6}},{"textKey":"DIALOGUE_FLORA_36","face":5,"audio":{"tag":"voice-8-13","s":0,"d":6}},{"textKey":"DIALOGUE_FLORA_37","face":4,"audio":{"tag":"voice-8-13","s":6,"d":3}},{"textKey":"DIALOGUE_FLORA_38","face":0,"anim":2,"audio":{"tag":"voice-8-14","s":0,"d":2}},{"textKey":"DIALOGUE_FLORA_39","face":4,"anim":2,"audio":{"tag":"voice-8-14","s":2,"d":2}}],"bok":[{"textKey":"DIALOGUE_BOK_0","face":0,"anim":4,"audio":{"tag":"voice-1-1","s":0,"d":5}},{"textKey":"DIALOGUE_BOK_1","face":7,"anim":2,"audio":{"tag":"voice-1-1","s":5,"d":8}},{"textKey":"DIALOGUE_BOK_2","face":2,"audio":{"tag":"voice-1-1","s":13,"d":1}},{"textKey":"DIALOGUE_BOK_3","face":1,"audio":{"tag":"voice-1-2","s":0,"d":8}},{"textKey":"DIALOGUE_BOK_4","face":6,"anim":1,"audio":{"tag":"voice-1-2","s":8,"d":8}},{"textKey":"DIALOGUE_BOK_5","face":3,"audio":{"tag":"voice-1-2","s":16,"d":6}},{"textKey":"DIALOGUE_BOK_6","face":4,"audio":{"tag":"voice-1-2","s":22,"d":7}},{"textKey":"DIALOGUE_BOK_7","face":8,"audio":{"tag":"voice-1-3","s":0,"d":8}},{"textKey":"DIALOGUE_BOK_8","face":6,"audio":{"tag":"voice-1-3","s":8,"d":8}},{"textKey":"DIALOGUE_BOK_9","face":3,"audio":{"tag":"voice-1-3","s":16,"d":6}},{"textKey":"DIALOGUE_BOK_10","face":0,"audio":{"tag":"voice-1-4","s":0,"d":5}},{"textKey":"DIALOGUE_BOK_11","face":1,"audio":{"tag":"voice-1-4","s":5,"d":6}},{"textKey":"DIALOGUE_BOK_12","face":5,"audio":{"tag":"voice-1-5","s":0,"d":9}},{"textKey":"DIALOGUE_BOK_13","face":0,"audio":{"tag":"voice-1-5","s":9,"d":9}},{"textKey":"DIALOGUE_BOK_14","face":3,"anim":2,"audio":{"tag":"voice-1-5","s":18,"d":6}},{"textKey":"DIALOGUE_BOK_15","face":8,"audio":{"tag":"voice-1-5","s":24,"d":10}},{"textKey":"DIALOGUE_BOK_16","face":5,"audio":{"tag":"voice-1-5","s":34,"d":12}},{"textKey":"DIALOGUE_BOK_17","face":4,"audio":{"tag":"voice-1-6","s":0,"d":11}},{"textKey":"DIALOGUE_BOK_18","face":8,"anim":2,"audio":{"tag":"voice-1-6","s":11,"d":8}},{"textKey":"DIALOGUE_BOK_19","face":3,"anim":4,"audio":{"tag":"voice-1-6","s":19,"d":2}},{"textKey":"DIALOGUE_BOK_20","face":0,"audio":{"tag":"voice-1-7","s":0,"d":7}},{"textKey":"DIALOGUE_BOK_21","face":8,"audio":{"tag":"voice-1-8","s":0,"d":7}},{"textKey":"DIALOGUE_BOK_22","face":0,"audio":{"tag":"voice-1-8","s":7,"d":5}},{"textKey":"DIALOGUE_BOK_23","face":5,"audio":{"tag":"voice-1-9","s":0,"d":6}},{"textKey":"DIALOGUE_BOK_24","face":1,"audio":{"tag":"voice-1-9","s":6,"d":7}},{"textKey":"DIALOGUE_BOK_25","face":8,"audio":{"tag":"voice-1-9","s":13,"d":7}},{"textKey":"DIALOGUE_BOK_26","face":3,"audio":{"tag":"voice-1-10","s":0,"d":9}},{"textKey":"DIALOGUE_BOK_27","face":0,"audio":{"tag":"voice-1-11","s":0,"d":10}},{"textKey":"DIALOGUE_BOK_28","face":4,"audio":{"tag":"voice-1-11","s":10,"d":7}},{"textKey":"DIALOGUE_BOK_29","face":6,"audio":{"tag":"voice-1-11","s":17,"d":8}},{"textKey":"DIALOGUE_BOK_30","face":0,"audio":{"tag":"voice-1-12","s":0,"d":3}},{"textKey":"DIALOGUE_BOK_31","face":3,"audio":{"tag":"voice-1-12","s":3,"d":5}},{"textKey":"DIALOGUE_BOK_32","face":5,"audio":{"tag":"voice-1-12","s":8,"d":5}},{"textKey":"DIALOGUE_BOK_33","face":1,"audio":{"tag":"voice-1-12","s":13,"d":8}},{"textKey":"DIALOGUE_BOK_34","face":3,"anim":4,"audio":{"tag":"voice-1-13","s":0,"d":7}},{"textKey":"DIALOGUE_BOK_35","face":4,"audio":{"tag":"voice-1-13","s":7,"d":4}},{"textKey":"DIALOGUE_BOK_36","face":1,"anim":4,"audio":{"tag":"voice-1-14","s":7,"d":6}},{"textKey":"DIALOGUE_BOK_37","face":5,"audio":{"tag":"voice-1-14","s":13,"d":9}},{"textKey":"DIALOGUE_BOK_38","face":7,"anim":4,"audio":{"tag":"voice-1-15","s":0,"d":8}},{"textKey":"DIALOGUE_BOK_39","face":5}],"merchant":[{"textKey":"DIALOGUE_MERCHANT_0","face":0,"anim":4,"audio":{"tag":"voice-11","s":0,"d":4}},{"textKey":"DIALOGUE_MERCHANT_1","face":0,"anim":2,"audio":{"tag":"voice-11","s":24,"d":3}},{"textKey":"DIALOGUE_MERCHANT_2","face":0,"anim":4,"audio":{"tag":"voice-11","s":6,"d":3}},{"textKey":"DIALOGUE_MERCHANT_3","face":0,"audio":{"tag":"voice-11","s":9,"d":5}},{"textKey":"DIALOGUE_MERCHANT_4","face":0,"audio":{"tag":"voice-11","s":19,"d":5}},{"textKey":"DIALOGUE_MERCHANT_5","face":0,"audio":{"tag":"voice-11","s":14,"d":5}},{"textKey":"DIALOGUE_MERCHANT_6","face":0,"audio":{"tag":"voice-11","s":4,"d":2}},{"textKey":"DIALOGUE_MERCHANT_7","face":0,"audio":{"tag":"voice-11-1","s":0,"d":6}},{"textKey":"DIALOGUE_MERCHANT_8","face":0,"audio":{"tag":"voice-11-1","s":6,"d":4}},{"textKey":"DIALOGUE_MERCHANT_9","face":0,"audio":{"tag":"voice-11-2","s":0,"d":4}},{"textKey":"DIALOGUE_MERCHANT_10","face":0,"audio":{"tag":"voice-11-2","s":4,"d":6}},{"textKey":"DIALOGUE_MERCHANT_11","face":0,"audio":{"tag":"voice-11-2","s":10,"d":4}},{"textKey":"DIALOGUE_MERCHANT_12","face":0,"audio":{"tag":"voice-11-2","s":14,"d":5}},{"textKey":"DIALOGUE_MERCHANT_13"},{"textKey":"DIALOGUE_MERCHANT_14"},{"textKey":"DIALOGUE_MERCHANT_15"},{"textKey":"DIALOGUE_MERCHANT_16"},{"textKey":"DIALOGUE_MERCHANT_17"},{"textKey":"DIALOGUE_MERCHANT_18","face":0},{"textKey":"DIALOGUE_MERCHANT_19","face":0},{"textKey":"DIALOGUE_MERCHANT_20","face":0},{"textKey":"DIALOGUE_MERCHANT_21","face":0},{"textKey":"DIALOGUE_MERCHANT_22","face":0},{"textKey":"DIALOGUE_MERCHANT_23","face":0},{"textKey":"DIALOGUE_MERCHANT_24","face":0},{"textKey":"DIALOGUE_MERCHANT_25","face":0},{"textKey":"DIALOGUE_MERCHANT_26","face":0},{"textKey":"DIALOGUE_MERCHANT_27","face":0},{"textKey":"DIALOGUE_MERCHANT_28","face":0},{"textKey":"DIALOGUE_MERCHANT_29","face":0},{"textKey":"DIALOGUE_MERCHANT_30","face":0},{"textKey":"DIALOGUE_MERCHANT_31","face":0},{"textKey":"DIALOGUE_MERCHANT_32","face":0},{"textKey":"DIALOGUE_MERCHANT_33","face":0},{"textKey":"DIALOGUE_MERCHANT_34","face":0},{"textKey":"DIALOGUE_MERCHANT_35","face":0},{"textKey":"DIALOGUE_MERCHANT_36","face":0},{"textKey":"DIALOGUE_MERCHANT_37","face":1,"anim":1,"audio":{"tag":"voice-11-3","s":0,"d":6}},{"textKey":"DIALOGUE_MERCHANT_38","face":1,"anim":2,"audio":{"tag":"voice-11-3","s":6,"d":4}},{"textKey":"DIALOGUE_MERCHANT_39","face":1,"audio":{"tag":"voice-11-3","s":10,"d":8}}],"winterfest":[{"textKey":"DIALOGUE_WINTERFEST_0","audio":{}},{"textKey":"DIALOGUE_WINTERFEST_1","audio":{}}],"benni":[{"textKey":"DIALOGUE_BENNI_0","face":7,"anim":4,"audio":{"tag":"voice-12-1","s":0,"d":2}},{"textKey":"DIALOGUE_BENNI_1","face":4,"anim":4,"audio":{"tag":"voice-12-1","s":2,"d":2}},{"textKey":"DIALOGUE_BENNI_2","face":1,"anim":2,"audio":{"tag":"voice-12-2","s":0,"d":5.05}},{"textKey":"DIALOGUE_BENNI_3","face":6,"anim":2,"audio":{"tag":"voice-12-2","s":5,"d":3}},{"textKey":"DIALOGUE_BENNI_4","face":10,"anim":2,"audio":{"tag":"voice-12-2","s":8,"d":2}},{"textKey":"DIALOGUE_BENNI_5","face":1,"anim":2,"audio":{"tag":"voice-12-2","s":10,"d":4}},{"textKey":"DIALOGUE_BENNI_6","face":6,"anim":1,"audio":{"tag":"voice-12-2","s":14,"d":6}},{"textKey":"DIALOGUE_BENNI_7","face":10,"anim":2,"audio":{"tag":"voice-12-2","s":20,"d":5}},{"textKey":"DIALOGUE_BENNI_8","face":0,"anim":4,"audio":{"tag":"voice-12-3","s":0,"d":3}},{"textKey":"DIALOGUE_BENNI_9","face":0,"anim":2,"audio":{"tag":"voice-12-4","s":0,"d":6}},{"textKey":"DIALOGUE_BENNI_10","face":0,"anim":2,"audio":{"tag":"voice-12-4","s":6,"d":10}},{"textKey":"DIALOGUE_BENNI_11","face":0,"anim":2,"audio":{"tag":"voice-12-4","s":16,"d":3}},{"textKey":"DIALOGUE_BENNI_12","face":0,"anim":2,"audio":{"tag":"voice-12-4","s":19,"d":6}},{"textKey":"DIALOGUE_BENNI_13","face":2,"audio":{"tag":"voice-12-5","s":0,"d":6}},{"textKey":"DIALOGUE_BENNI_14","face":2,"anim":2,"audio":{"tag":"voice-12-5","s":6,"d":4}},{"textKey":"DIALOGUE_BENNI_15","face":1,"anim":2,"audio":{"tag":"voice-12-5","s":10,"d":3}},{"textKey":"DIALOGUE_BENNI_16","face":0,"anim":2,"audio":{"tag":"voice-12-6","s":0,"d":5}},{"textKey":"DIALOGUE_BENNI_17","face":9,"audio":{"tag":"voice-12-6","s":5,"d":3}},{"textKey":"DIALOGUE_BENNI_18","face":1,"anim":1,"audio":{"tag":"voice-12-6","s":8,"d":9}},{"textKey":"DIALOGUE_BENNI_19","face":3,"audio":{"tag":"voice-12-7","s":0,"d":5}},{"textKey":"DIALOGUE_BENNI_20","face":8,"anim":2,"audio":{"tag":"voice-12-7","s":5,"d":5}},{"textKey":"DIALOGUE_BENNI_21","face":1,"anim":2,"audio":{"tag":"voice-12-7","s":10,"d":6}},{"textKey":"DIALOGUE_BENNI_22","face":0,"anim":2,"audio":{"tag":"voice-12-7","s":16,"d":4}},{"textKey":"DIALOGUE_BENNI_23","face":1,"anim":4,"audio":{"tag":"voice-12-8","s":0,"d":5}},{"textKey":"DIALOGUE_BENNI_24","face":5,"anim":2,"audio":{"tag":"voice-12-8","s":5,"d":2}},{"textKey":"DIALOGUE_BENNI_25","face":0,"anim":2,"audio":{"tag":"voice-12-9","s":0,"d":5}},{"textKey":"DIALOGUE_BENNI_26","face":4,"anim":4,"audio":{"tag":"voice-12-10","s":0,"d":4}},{"textKey":"DIALOGUE_BENNI_27","face":8,"anim":2,"audio":{"tag":"voice-12-10","s":4,"d":2}},{"textKey":"DIALOGUE_BENNI_28","face":1,"anim":2,"audio":{"tag":"voice-12-10","s":6,"d":6}},{"textKey":"DIALOGUE_BENNI_29","face":5,"anim":2,"audio":{"tag":"voice-12-11","s":0,"d":3}},{"textKey":"DIALOGUE_BENNI_30","face":0,"anim":2,"audio":{"tag":"voice-12-12","s":0,"d":3}},{"textKey":"DIALOGUE_BENNI_31","face":0,"anim":2,"audio":{"tag":"voice-12-13","s":0,"d":4}},{"textKey":"DIALOGUE_BENNI_32","face":8,"anim":2,"audio":{"tag":"voice-12-13","s":4,"d":3}},{"textKey":"DIALOGUE_BENNI_33","face":1,"anim":2,"audio":{"tag":"voice-12-13","s":7,"d":6}},{"textKey":"DIALOGUE_BENNI_34","face":9,"audio":{"tag":"voice-12-14","s":0,"d":3}},{"textKey":"DIALOGUE_BENNI_35","face":3,"anim":1,"audio":{"tag":"voice-12-14","s":3,"d":4}},{"textKey":"DIALOGUE_BENNI_36","face":5,"anim":2,"audio":{"tag":"voice-12-14","s":7,"d":4}},{"textKey":"DIALOGUE_BENNI_37","face":2,"anim":2,"audio":{"tag":"voice-12-15","s":0,"d":7}},{"textKey":"DIALOGUE_BENNI_38","face":6,"anim":2,"audio":{"tag":"voice-12-15","s":7,"d":2}},{"textKey":"DIALOGUE_BENNI_39","face":2,"anim":4,"audio":{"tag":"voice-12-16","s":0,"d":3}},{"textKey":"DIALOGUE_BENNI_40","face":6,"anim":1,"audio":{"tag":"voice-12-16","s":3,"d":3}},{"textKey":"DIALOGUE_BENNI_41","face":15,"anim":4,"audio":{"tag":"voice-12-16","s":6,"d":7}},{"textKey":"DIALOGUE_BENNI_42","face":0,"anim":2,"audio":{"tag":"voice-12-17","s":0,"d":5}},{"textKey":"DIALOGUE_BENNI_43","face":8,"anim":4,"audio":{"tag":"voice-12-17","s":5,"d":3}},{"textKey":"DIALOGUE_BENNI_44","face":4,"audio":{"tag":"voice-12-17","s":8,"d":3}},{"textKey":"DIALOGUE_BENNI_45","face":15,"anim":4,"audio":{"tag":"voice-12-17","s":11,"d":2}},{"textKey":"DIALOGUE_BENNI_46","face":4,"anim":2,"audio":{"tag":"voice-12-18","s":0,"d":3}}],"broccolina":[{"textKey":"DIALOGUE_BROCCOLINA_0","face":0,"anim":2,"audio":{"tag":"voice-13-1","s":0,"d":5}},{"textKey":"DIALOGUE_BROCCOLINA_1","face":3,"anim":2},{"textKey":"DIALOGUE_BROCCOLINA_2","face":3,"anim":2,"audio":{"tag":"voice-12-1","s":0,"d":2}}],"eugene":[{"textKey":"DIALOGUE_EUGENE_0","face":3,"anim":4,"audio":{"tag":"voice-14-1","s":0,"d":4}},{"textKey":"DIALOGUE_EUGENE_1","face":0,"anim":2,"audio":{"tag":"voice-14-2","s":0,"d":4}},{"textKey":"DIALOGUE_EUGENE_2","face":1,"anim":2,"audio":{"tag":"voice-14-2","s":4,"d":6}},{"textKey":"DIALOGUE_EUGENE_3","face":4,"anim":4,"audio":{"tag":"voice-14-2","s":10,"d":2}},{"textKey":"DIALOGUE_EUGENE_4","face":2,"anim":2,"audio":{"tag":"voice-14-2","s":12,"d":4}},{"textKey":"DIALOGUE_EUGENE_5","face":0,"anim":2,"audio":{"tag":"voice-14-2","s":16,"d":9}},{"textKey":"DIALOGUE_EUGENE_6","face":4,"anim":1,"audio":{"tag":"voice-14-2","s":25,"d":6}}],"cebollini":[{"textKey":"DIALOGUE_CEBOLLINI_0","face":0,"anim":2,"audio":{"tag":"voice-18-2","s":0,"d":5}},{"textKey":"DIALOGUE_CEBOLLINI_1","face":0,"anim":2,"audio":{"tag":"voice-18-3","s":0,"d":3}},{"textKey":"DIALOGUE_CEBOLLINI_2","face":0,"anim":2,"audio":{"tag":"voice-18-3","s":3,"d":3}},{"textKey":"DIALOGUE_CEBOLLINI_3","face":0,"anim":2,"audio":{"tag":"voice-18-3","s":6,"d":5}},{"textKey":"DIALOGUE_CEBOLLINI_4","face":0,"anim":2,"audio":{"tag":"voice-18-3","s":11,"d":4}},{"textKey":"DIALOGUE_CEBOLLINI_5","face":0,"anim":2,"audio":{"tag":"voice-18-4","s":0,"d":3}},{"textKey":"DIALOGUE_CEBOLLINI_6","face":0,"anim":2,"audio":{"tag":"voice-18-4","s":3,"d":7}},{"textKey":"DIALOGUE_CEBOLLINI_7","face":0,"anim":2,"audio":{"tag":"voice-18-4","s":10,"d":4}},{"textKey":"DIALOGUE_CEBOLLINI_8","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":0,"d":5}},{"textKey":"DIALOGUE_CEBOLLINI_9","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":5,"d":5}},{"textKey":"DIALOGUE_CEBOLLINI_10","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":10,"d":3}},{"textKey":"DIALOGUE_CEBOLLINI_11","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":13,"d":4}},{"textKey":"DIALOGUE_CEBOLLINI_12","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":17,"d":3}},{"textKey":"DIALOGUE_CEBOLLINI_13","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":20,"d":9}},{"textKey":"DIALOGUE_CEBOLLINI_14","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":29,"d":4}},{"textKey":"DIALOGUE_CEBOLLINI_15","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":33,"d":7}},{"textKey":"DIALOGUE_CEBOLLINI_16","face":0,"anim":2,"audio":{"tag":"voice-18-1","s":0,"d":5}},{"textKey":"DIALOGUE_CEBOLLINI_17","face":0,"anim":2,"audio":{"tag":"voice-18-1","s":5,"d":9}},{"textKey":"DIALOGUE_CEBOLLINI_18","face":0,"anim":2,"audio":{"tag":"voice-18-1","s":14,"d":3}},{"textKey":"DIALOGUE_CEBOLLINI_19","face":0,"anim":2,"audio":{"tag":"voice-18-1","s":17,"d":4}}],"slime_queen":[{"textKey":"DIALOGUE_SLIME_QUEEN_0","face":0,"anim":2,"audio":{"tag":"voice-16-3","s":0,"d":7}},{"textKey":"DIALOGUE_SLIME_QUEEN_1","face":1,"anim":2},{"textKey":"DIALOGUE_SLIME_QUEEN_2","face":5,"anim":1,"audio":{"tag":"voice-16-3","s":7,"d":4}},{"textKey":"DIALOGUE_SLIME_QUEEN_3","face":5,"anim":4,"audio":{"tag":"voice-16-3","s":11,"d":8}},{"textKey":"DIALOGUE_SLIME_QUEEN_4","face":5,"anim":1,"audio":{"tag":"voice-16-3","s":19,"d":7}},{"textKey":"DIALOGUE_SLIME_QUEEN_5","face":0,"anim":2,"audio":{"tag":"voice-16-1","s":0,"d":5}},{"textKey":"DIALOGUE_SLIME_QUEEN_6","face":0,"anim":2,"audio":{"tag":"voice-16-3","s":7.8,"d":0.85}},{"textKey":"DIALOGUE_SLIME_QUEEN_7","face":2,"anim":2,"audio":{"tag":"voice-16-1","s":5,"d":6}},{"textKey":"DIALOGUE_SLIME_QUEEN_8","face":0,"anim":2,"audio":{"tag":"voice-16-1","s":11,"d":8}},{"textKey":"DIALOGUE_SLIME_QUEEN_9","face":4,"anim":2,"audio":{"tag":"voice-16-1","s":19,"d":10}},{"textKey":"DIALOGUE_SLIME_QUEEN_10","face":4,"anim":1,"audio":{"tag":"voice-16-2","s":0,"d":5}}],"slime_guard":[{"textKey":"DIALOGUE_SLIME_GUARD_0","face":0,"anim":2,"audio":{"tag":"voice-17-3","s":0,"d":3}},{"textKey":"DIALOGUE_SLIME_GUARD_1","face":3,"anim":2,"audio":{"tag":"voice-17-4","s":0,"d":4}},{"textKey":"DIALOGUE_SLIME_GUARD_2","face":0,"anim":1,"audio":{"tag":"voice-17-4","s":4,"d":4}},{"textKey":"DIALOGUE_SLIME_GUARD_3","face":1,"anim":2,"audio":{"tag":"voice-17-4","s":8,"d":4}},{"textKey":"DIALOGUE_SLIME_GUARD_4","face":2,"anim":1,"audio":{"tag":"voice-17-4","s":12,"d":5}},{"textKey":"DIALOGUE_SLIME_GUARD_5","face":4,"anim":2,"audio":{"tag":"voice-17-2","s":0,"d":6}}],"slime_worker":[{"textKey":"DIALOGUE_SLIME_WORKER_0","face":3,"anim":1,"audio":{"tag":"voice-17-1","s":0,"d":4}},{"textKey":"DIALOGUE_SLIME_WORKER_1","face":2,"anim":2,"audio":{"tag":"voice-17-1","s":4,"d":6}}],"slurpy":[{"textKey":"DIALOGUE_SLURPY_0","face":1,"anim":2,"audio":{"tag":"voice-15-2","s":0,"d":3}},{"textKey":"DIALOGUE_SLURPY_1","face":1,"anim":4,"audio":{"tag":"voice-15-7","s":0,"d":4}},{"textKey":"DIALOGUE_SLURPY_2","face":0,"anim":2,"audio":{"tag":"voice-15-1","s":0,"d":6}},{"textKey":"DIALOGUE_SLURPY_3","face":4,"anim":4,"audio":{"tag":"voice-15-1","s":6,"d":7}},{"textKey":"DIALOGUE_SLURPY_4","face":0,"anim":2,"audio":{"tag":"voice-15-1","s":13,"d":5}},{"textKey":"DIALOGUE_SLURPY_5","face":4,"anim":2,"audio":{"tag":"voice-15-1","s":18,"d":5}},{"textKey":"DIALOGUE_SLURPY_6","face":1,"anim":4,"audio":{"tag":"voice-15-3","s":0,"d":4}},{"textKey":"DIALOGUE_SLURPY_7","face":4,"anim":2,"audio":{"tag":"voice-15-3","s":4,"d":4}},{"textKey":"DIALOGUE_SLURPY_8","face":1,"anim":4,"audio":{"tag":"voice-15-4","s":0,"d":9}},{"textKey":"DIALOGUE_SLURPY_9","face":4,"anim":2,"audio":{"tag":"voice-15-4","s":9,"d":7}},{"textKey":"DIALOGUE_SLURPY_10","face":1,"anim":2,"audio":{"tag":"voice-15-5","s":0,"d":9}},{"textKey":"DIALOGUE_SLURPY_11","face":0,"anim":2,"audio":{"tag":"voice-15-5","s":9,"d":3}},{"textKey":"DIALOGUE_SLURPY_12","face":2,"anim":1,"audio":{"tag":"voice-15-5","s":12,"d":6}},{"textKey":"DIALOGUE_SLURPY_13","face":4,"anim":2,"audio":{"tag":"voice-15-6","s":0,"d":6}},{"textKey":"DIALOGUE_SLURPY_14","face":0,"anim":2,"audio":{"tag":"voice-15-6","s":6,"d":3}},{"textKey":"DIALOGUE_SLURPY_15","face":1,"anim":4,"audio":{"tag":"voice-15-8","s":0,"d":7}},{"textKey":"DIALOGUE_SLURPY_16","face":2,"anim":1,"audio":{"tag":"voice-15-8","s":7,"d":6}},{"textKey":"DIALOGUE_SLURPY_17","face":3,"anim":4,"audio":{"tag":"voice-15-9","s":0,"d":6}},{"textKey":"DIALOGUE_SLURPY_18","face":2,"anim":1,"audio":{"tag":"voice-15-9","s":6,"d":7}},{"textKey":"DIALOGUE_SLURPY_19","face":4,"anim":2,"audio":{"tag":"voice-15-9","s":13,"d":4}},{"textKey":"DIALOGUE_SLURPY_20","face":1,"anim":4,"audio":{"tag":"voice-15-9","s":17,"d":2}},{"textKey":"DIALOGUE_SLURPY_21","face":4,"anim":2,"audio":{"tag":"voice-15-9","s":19,"d":7}},{"textKey":"DIALOGUE_SLURPY_22","face":1,"anim":2,"audio":{"tag":"voice-15-10","s":0,"d":6}},{"textKey":"DIALOGUE_SLURPY_23","face":4,"anim":2,"audio":{"tag":"voice-15-10","s":6,"d":6}},{"textKey":"DIALOGUE_SLURPY_24","face":0,"anim":2,"audio":{"tag":"voice-15-10","s":12,"d":2}},{"textKey":"DIALOGUE_SLURPY_25","face":2,"anim":1,"audio":{"tag":"voice-15-11","s":0,"d":7}},{"textKey":"DIALOGUE_SLURPY_26","face":0,"anim":2,"audio":{"tag":"voice-15-11","s":7,"d":6}},{"textKey":"DIALOGUE_SLURPY_27","face":1,"anim":4,"audio":{"tag":"voice-15-12","s":0,"d":10}},{"textKey":"DIALOGUE_SLURPY_28","face":4,"anim":2,"audio":{"tag":"voice-15-12","s":10,"d":5}},{"textKey":"DIALOGUE_SLURPY_29","face":3,"anim":4,"audio":{"tag":"voice-15-13","s":0,"d":4}},{"textKey":"DIALOGUE_SLURPY_30","face":0,"anim":2},{"textKey":"DIALOGUE_SLURPY_31","face":0,"anim":2,"audio":{"tag":"voice-15-13","s":4,"d":5}},{"textKey":"DIALOGUE_SLURPY_32","face":0,"anim":2,"audio":{"tag":"voice-15-13","s":9,"d":6}},{"textKey":"DIALOGUE_SLURPY_33","face":4,"anim":2,"audio":{"tag":"voice-15-13","s":15,"d":8}},{"textKey":"DIALOGUE_SLURPY_34","face":4,"anim":2,"audio":{"tag":"voice-15-13","s":23,"d":4}},{"textKey":"DIALOGUE_SLURPY_35","face":4,"anim":2,"audio":{"tag":"voice-15-14","s":0,"d":3}},{"textKey":"DIALOGUE_SLURPY_36","face":0,"anim":2,"audio":{"tag":"voice-15-14","s":3,"d":5}},{"textKey":"DIALOGUE_SLURPY_37","face":0,"anim":2,"audio":{"tag":"voice-15-14","s":8,"d":6}},{"textKey":"DIALOGUE_SLURPY_38","face":3,"anim":1,"audio":{"tag":"voice-15-16","s":0,"d":8}},{"textKey":"DIALOGUE_SLURPY_39","face":4,"anim":4,"audio":{"tag":"voice-15-16","s":8,"d":2}},{"textKey":"DIALOGUE_SLURPY_40","face":0,"anim":2,"audio":{"tag":"voice-15-16","s":10,"d":6}},{"textKey":"DIALOGUE_SLURPY_41","face":1,"anim":4,"audio":{"tag":"voice-15-17","s":0,"d":4}},{"textKey":"DIALOGUE_SLURPY_42","face":0,"anim":2,"audio":{"tag":"voice-15-17","s":4,"d":4}},{"textKey":"DIALOGUE_SLURPY_43","face":2,"anim":4,"audio":{"tag":"voice-15-17","s":8,"d":3}},{"textKey":"DIALOGUE_SLURPY_44","face":2,"anim":1,"audio":{"tag":"voice-15-17","s":11,"d":2}},{"textKey":"DIALOGUE_SLURPY_45","face":0,"anim":2,"audio":{"tag":"voice-15-17","s":13,"d":7}},{"textKey":"DIALOGUE_SLURPY_46","face":4,"anim":2,"audio":{"tag":"voice-15-17","s":20,"d":2}},{"textKey":"DIALOGUE_SLURPY_47","face":1,"anim":4,"audio":{"tag":"voice-15-17","s":22,"d":5}},{"textKey":"DIALOGUE_SLURPY_48","face":1,"anim":4,"audio":{"tag":"voice-15-18","s":0,"d":5}},{"textKey":"DIALOGUE_SLURPY_49","face":4,"anim":2,"audio":{"tag":"voice-15-18","s":5,"d":9}}],"puppetmaster":[{"textKey":"DIALOGUE_PUPPET_MASTER_0","face":0,"audio":{"tag":"voice-20-1","s":0,"d":10}},{"textKey":"DIALOGUE_PUPPET_MASTER_1","face":2,"anim":4,"audio":{"tag":"voice-20-1","s":10,"d":5}},{"textKey":"DIALOGUE_PUPPET_MASTER_2","face":0,"audio":{"tag":"voice-20-1","s":15,"d":5}},{"textKey":"DIALOGUE_PUPPET_MASTER_3","face":0,"audio":{"tag":"voice-20-1","s":20,"d":10}},{"textKey":"DIALOGUE_PUPPET_MASTER_4","face":2,"audio":{"tag":"voice-20-1","s":30,"d":3}},{"textKey":"DIALOGUE_PUPPET_MASTER_5","face":1,"anim":2,"audio":{"tag":"voice-20-1","s":33,"d":5}},{"textKey":"DIALOGUE_PUPPET_MASTER_6","face":3,"anim":1,"audio":{"tag":"voice-20-1","s":38,"d":3}},{"textKey":"DIALOGUE_PUPPET_MASTER_7","face":3,"anim":1,"audio":{"tag":"voice-20-1","s":41,"d":4.3}},{"textKey":"DIALOGUE_PUPPET_MASTER_8","face":1,"audio":{"tag":"voice-20-1","s":48,"d":2}},{"textKey":"DIALOGUE_PUPPET_MASTER_9","face":2,"anim":2,"audio":{"tag":"voice-20-1","s":50,"d":6}},{"textKey":"DIALOGUE_PUPPET_MASTER_10","face":2,"anim":2,"audio":{"tag":"voice-20-2","s":0,"d":8}},{"textKey":"DIALOGUE_PUPPET_MASTER_11","face":1,"anim":4,"audio":{"tag":"voice-20-2","s":9,"d":11}},{"textKey":"DIALOGUE_PUPPET_MASTER_12","face":0,"anim":4,"audio":{"tag":"voice-20-2","s":21,"d":5}},{"textKey":"DIALOGUE_PUPPET_MASTER_13","face":2,"anim":2,"audio":{"tag":"voice-20-2","s":26,"d":6}},{"textKey":"DIALOGUE_PUPPET_MASTER_14","face":2,"anim":2,"audio":{"tag":"voice-20-2","s":33,"d":6}}],"pippet":[{"textKey":"DIALOGUE_PIPPIT_0","face":1,"anim":2,"audio":{"tag":"voice-19-1","s":0,"d":5}},{"textKey":"DIALOGUE_PIPPIT_1","face":3,"anim":2,"audio":{"tag":"voice-19-1","s":5,"d":8}},{"textKey":"DIALOGUE_PIPPIT_2","face":4,"anim":2,"audio":{"tag":"voice-19-1","s":13,"d":8}},{"textKey":"DIALOGUE_PIPPIT_3","face":5,"anim":4,"audio":{"tag":"voice-28-1","s":0,"d":6}},{"textKey":"DIALOGUE_PIPPIT_4","face":3,"anim":2,"audio":{"tag":"voice-28-1","s":7,"d":4.5}},{"textKey":"DIALOGUE_PIPPIT_5","face":0,"anim":4,"audio":{"tag":"voice-28-1","s":12,"d":4}},{"textKey":"DIALOGUE_PIPPIT_6","face":5,"anim":2,"audio":{"tag":"voice-28-1","s":17,"d":6}},{"textKey":"DIALOGUE_PIPPIT_7","face":5,"anim":4,"audio":{"tag":"voice-28-1","s":25,"d":5}},{"textKey":"DIALOGUE_PIPPIT_8","face":0,"anim":2,"audio":{"tag":"voice-28-1","s":31,"d":7}},{"textKey":"DIALOGUE_PIPPIT_9","face":5,"anim":4}],"julia_ghoulia":[{"textKey":"DIALOGUE_JULIA_GHOULIA_0","face":0,"anim":2,"audio":{"tag":"voice-21-2","s":0,"d":6}},{"textKey":"DIALOGUE_JULIA_GHOULIA_1","face":0,"anim":4,"audio":{"tag":"voice-21-1","s":0,"d":3}},{"textKey":"DIALOGUE_JULIA_GHOULIA_2","face":0,"anim":2,"audio":{"tag":"voice-21-1","s":3,"d":7}},{"textKey":"DIALOGUE_JULIA_GHOULIA_3","face":0,"anim":2,"audio":{"tag":"voice-21-1","s":10,"d":5}},{"textKey":"DIALOGUE_JULIA_GHOULIA_4","face":0,"anim":2,"audio":{"tag":"voice-21-1","s":15,"d":11}},{"textKey":"DIALOGUE_JULIA_GHOULIA_5","face":0,"anim":4,"audio":{"tag":"voice-21-1","s":26,"d":7}}],"mama_star":[{"textKey":"DIALOGUE_MAMA_STAR_0","face":0,"anim":2,"audio":{"tag":"voice-22-1","s":34,"d":5}},{"textKey":"DIALOGUE_MAMA_STAR_1","face":0,"anim":4,"audio":{"tag":"voice-22-1","s":37.4,"d":10}},{"textKey":"DIALOGUE_MAMA_STAR_2","face":0,"anim":2,"audio":{"tag":"voice-22-1","s":49,"d":7}},{"textKey":"DIALOGUE_MAMA_STAR_3","face":0,"anim":4,"audio":{"tag":"voice-22-1","s":0,"d":6}},{"textKey":"DIALOGUE_MAMA_STAR_4","face":0,"anim":2,"audio":{"tag":"voice-22-1","s":6,"d":5.4}},{"textKey":"DIALOGUE_MAMA_STAR_5","face":0,"anim":2,"audio":{"tag":"voice-22-1","s":11.4,"d":4}},{"textKey":"DIALOGUE_MAMA_STAR_6","face":0,"anim":2,"audio":{"tag":"voice-22-1","s":15.4,"d":9.6}},{"textKey":"DIALOGUE_MAMA_STAR_7","face":0,"anim":4,"audio":{"tag":"voice-22-1","s":25.4,"d":6.6}},{"textKey":"DIALOGUE_MAMA_STAR_8","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":0,"d":7}},{"textKey":"DIALOGUE_MAMA_STAR_9","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":7,"d":5}},{"textKey":"DIALOGUE_MAMA_STAR_10","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":12,"d":9}},{"textKey":"DIALOGUE_MAMA_STAR_11","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":21,"d":10}},{"textKey":"DIALOGUE_MAMA_STAR_12","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":31,"d":9}},{"textKey":"DIALOGUE_MAMA_STAR_13","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":40,"d":6}},{"textKey":"DIALOGUE_MAMA_STAR_14","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":46,"d":8}},{"textKey":"DIALOGUE_MAMA_STAR_15","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":54,"d":8}},{"textKey":"DIALOGUE_MAMA_STAR_16","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":62,"d":5}}],"toy":[{"textKey":"DIALOGUE_TOY_0","face":0,"audio":{"tag":"voice-23-1","s":0,"d":8}},{"textKey":"DIALOGUE_TOY_1","face":0,"audio":{"tag":"voice-23-1","s":8,"d":4}},{"textKey":"DIALOGUE_TOY_2","face":0,"audio":{"tag":"voice-23-1","s":8,"d":4}},{"textKey":"DIALOGUE_TOY_3","face":0,"audio":{"tag":"voice-23-2","s":12.6,"d":10.4}},{"textKey":"DIALOGUE_TOY_4","face":0,"audio":{"tag":"voice-23-2","s":23.1,"d":9}},{"textKey":"DIALOGUE_TOY_5","face":0,"audio":{"tag":"voice-23-2","s":32.4,"d":9.6}},{"textKey":"DIALOGUE_TOY_6","face":0,"audio":{"tag":"voice-23-2","s":42,"d":8}},{"textKey":"DIALOGUE_TOY_7","face":0,"audio":{"tag":"voice-23-2","s":50,"d":9}},{"textKey":"DIALOGUE_TOY_8","face":0,"audio":{"tag":"voice-23-2","s":59,"d":7.3}},{"textKey":"DIALOGUE_TOY_9","face":0,"audio":{"tag":"voice-23-2","s":67.5,"d":8.5}},{"textKey":"DIALOGUE_TOY_10","face":0,"audio":{"tag":"voice-23-2","s":0,"d":7}},{"textKey":"DIALOGUE_TOY_11","face":0,"audio":{"tag":"voice-23-2","s":7,"d":6}},{"textKey":"DIALOGUE_TOY_12","face":0},{"textKey":"DIALOGUE_TOY_13","face":0,"audio":{"tag":"voice-23-3","s":0,"d":5}},{"textKey":"DIALOGUE_TOY_14","face":0,"audio":{"tag":"voice-23-3","s":22,"d":9}},{"textKey":"DIALOGUE_TOY_15","face":0,"audio":{"tag":"voice-23-3","s":31,"d":6}},{"textKey":"DIALOGUE_TOY_16","face":0,"audio":{"tag":"voice-23-3","s":5,"d":9}},{"textKey":"DIALOGUE_TOY_17","face":0,"audio":{"tag":"voice-23-3","s":14,"d":8}}],"howard_cornelius":[{"textKey":"DIALOGUE_HOWARD_CORNELIUS_0","face":0,"anim":4,"audio":{"tag":"voice-24-1","s":21.9,"d":5.1}},{"textKey":"DIALOGUE_HOWARD_CORNELIUS_1","face":0,"anim":2,"audio":{"tag":"voice-24-1","s":27,"d":2.25}},{"textKey":"DIALOGUE_HOWARD_CORNELIUS_2","face":0,"anim":2,"audio":{"tag":"voice-24-1","s":29.25,"d":3.5}},{"textKey":"DIALOGUE_HOWARD_CORNELIUS_3","face":0,"anim":4,"audio":{"tag":"voice-24-1","s":0,"d":5}},{"textKey":"DIALOGUE_HOWARD_CORNELIUS_4","face":0,"anim":2,"audio":{"tag":"voice-24-1","s":5.9,"d":8}},{"textKey":"DIALOGUE_HOWARD_CORNELIUS_5","face":0,"anim":2,"audio":{"tag":"voice-24-1","s":13.9,"d":8}}],"sir-vey":[{"textKey":"DIALOGUE_SIR_VEY_0","anim":4,"face":0},{"textKey":"DIALOGUE_SIR_VEY_1","anim":4,"face":1}],"mozza-ella":[{"textKey":"DIALOGUE_MOZZA_ELLE_0","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_1","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_2","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_3","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_4","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_5","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_6","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_7","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_8","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_9","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_10","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_11","face":1}],"potion":[{"textKey":"DIALOGUE_POTION_0","face":1},{"textKey":"DIALOGUE_POTION_1","face":0},{"textKey":"DIALOGUE_POTION_2","face":1},{"textKey":"DIALOGUE_POTION_3","face":0},{"textKey":"DIALOGUE_POTION_4","face":0},{"textKey":"DIALOGUE_POTION_5","face":1},{"textKey":"DIALOGUE_POTION_6","face":0},{"textKey":"DIALOGUE_POTION_7","face":0}],"swoopy":[{"textKey":"DIALOGUE_SWOOPY_0","face":1},{"textKey":"DIALOGUE_SWOOPY_1","face":0},{"textKey":"DIALOGUE_SWOOPY_2","face":1},{"textKey":"DIALOGUE_SWOOPY_3","face":0},{"textKey":"DIALOGUE_SWOOPY_4","face":0}],"eve":[{"textKey":"DIALOGUE_EVE_0","face":1,"anim":4,"audio":{"tag":"voice-27-1","s":62,"d":3}},{"textKey":"DIALOGUE_EVE_1","face":3,"audio":{"tag":"voice-27-1","s":0,"d":1.2}},{"textKey":"DIALOGUE_EVE_2","face":0,"anim":2,"audio":{"tag":"voice-27-1","s":2,"d":7}},{"textKey":"DIALOGUE_EVE_3","face":0,"audio":{"tag":"voice-27-1","s":11,"d":8.2}},{"textKey":"DIALOGUE_EVE_4","face":0,"audio":{"tag":"voice-27-1","s":20,"d":4.2}},{"textKey":"DIALOGUE_EVE_5","face":4,"audio":{"tag":"voice-27-1","s":25,"d":7.5}},{"textKey":"DIALOGUE_EVE_6","face":3,"anim":4,"audio":{"tag":"voice-27-1","s":34,"d":6}},{"textKey":"DIALOGUE_EVE_7","face":4,"audio":{"tag":"voice-27-1","s":41,"d":5.5}},{"textKey":"DIALOGUE_EVE_8","face":4,"anim":2,"audio":{"tag":"voice-27-1","s":47,"d":5.5}},{"textKey":"DIALOGUE_EVE_9","face":0,"audio":{"tag":"voice-27-1","s":53,"d":7.5}},{"textKey":"DIALOGUE_EVE_10","face":0,"anim":4,"audio":{"tag":"voice-27-1","s":66,"d":4}},{"textKey":"DIALOGUE_EVE_11","face":4,"audio":{"tag":"voice-27-1","s":71,"d":5.5}},{"textKey":"DIALOGUE_EVE_12","face":0,"audio":{"tag":"voice-27-1","s":77,"d":7}},{"textKey":"DIALOGUE_EVE_13","face":4,"audio":{"tag":"voice-27-1","s":85,"d":4.5}},{"textKey":"DIALOGUE_EVE_14","face":5,"anim":2,"audio":{"tag":"voice-25-1","s":24,"d":4.2}},{"textKey":"DIALOGUE_EVE_15","face":4,"audio":{"tag":"voice-27-1","s":90,"d":5}},{"textKey":"DIALOGUE_EVE_16","face":2,"anim":2,"audio":{"tag":"voice-27-1","s":96,"d":3.5}},{"textKey":"DIALOGUE_EVE_17","face":0,"anim":4,"audio":{"tag":"voice-27-1","s":100,"d":5}},{"textKey":"DIALOGUE_EVE_18","face":0,"anim":2,"audio":{"tag":"voice-27-1","s":106,"d":4.5}},{"textKey":"DIALOGUE_EVE_19","face":2,"audio":{"tag":"voice-27-1","s":111,"d":3}},{"textKey":"DIALOGUE_EVE_20","face":0,"audio":{"tag":"voice-27-1","s":115,"d":7}},{"textKey":"DIALOGUE_EVE_21","face":1,"anim":2,"audio":{"tag":"voice-27-1","s":123,"d":3.2}},{"textKey":"DIALOGUE_EVE_22","face":6,"anim":2,"audio":{"tag":"voice-25-1","s":29,"d":2.5}},{"textKey":"DIALOGUE_EVE_23","face":1,"audio":{"tag":"voice-27-1","s":127,"d":5.5}},{"textKey":"DIALOGUE_EVE_24","face":3,"anim":2,"audio":{"tag":"voice-27-1","s":133,"d":4}},{"textKey":"DIALOGUE_EVE_25","face":0,"anim":4,"audio":{"tag":"voice-27-1","s":138,"d":2}},{"textKey":"DIALOGUE_EVE_26","face":0,"anim":4,"audio":{"tag":"voice-27-1","s":141,"d":7.5}},{"textKey":"DIALOGUE_EVE_27","face":3,"audio":{"tag":"voice-27-1","s":150,"d":6}},{"textKey":"DIALOGUE_EVE_28","face":0,"anim":2,"audio":{"tag":"voice-27-1","s":157,"d":7.5}},{"textKey":"DIALOGUE_EVE_29","face":2,"anim":2,"audio":{"tag":"voice-27-1","s":165,"d":6}},{"textKey":"DIALOGUE_EVE_30","face":2,"audio":{"tag":"voice-27-1","s":172,"d":5.5}},{"textKey":"DIALOGUE_EVE_31","face":3,"audio":{"tag":"voice-27-1","s":178,"d":4}},{"textKey":"DIALOGUE_EVE_32","face":2,"anim":2,"audio":{"tag":"voice-27-1","s":182,"d":7}},{"textKey":"DIALOGUE_EVE_33","face":3,"anim":2,"audio":{"tag":"voice-27-1","s":190,"d":7.5}},{"textKey":"DIALOGUE_EVE_34","face":4,"anim":2,"audio":{"tag":"voice-27-1","s":198,"d":2.5}},{"textKey":"DIALOGUE_EVE_35","face":2,"anim":4,"audio":{"tag":"voice-27-1","s":201,"d":8.5}},{"textKey":"DIALOGUE_EVE_36","face":2,"audio":{"tag":"voice-27-1","s":210,"d":8}},{"textKey":"DIALOGUE_EVE_37","face":3,"anim":2,"audio":{"tag":"voice-27-1","s":219,"d":8.5}},{"textKey":"DIALOGUE_EVE_38","face":0,"anim":4,"audio":{"tag":"voice-27-1","s":228,"d":2}},{"textKey":"DIALOGUE_EVE_39","face":0,"audio":{"tag":"voice-27-1","s":231,"d":3.5}},{"textKey":"DIALOGUE_EVE_40","face":3,"anim":2,"audio":{"tag":"voice-27-1","s":235,"d":10}},{"textKey":"DIALOGUE_EVE_41","face":3,"audio":{"tag":"voice-27-1","s":246,"d":5}},{"textKey":"DIALOGUE_EVE_42","face":4,"anim":2,"audio":{"tag":"voice-27-1","s":253,"d":6}},{"textKey":"DIALOGUE_EVE_43","face":4,"anim":2,"audio":{"tag":"voice-27-1","s":260,"d":2.5}},{"textKey":"DIALOGUE_EVE_44","face":0,"anim":4,"audio":{"tag":"voice-27-1","s":265,"d":3.5}},{"textKey":"DIALOGUE_EVE_45","face":0,"anim":2,"audio":{"tag":"voice-27-1","s":269,"d":4.5}}],"jim":[{"textKey":"DIALOGUE_JELLY_JIM_0","face":0,"anim":2,"audio":{"tag":"voice-26-1","s":0,"d":7.2}},{"textKey":"DIALOGUE_JELLY_JIM_1","face":1,"audio":{"tag":"voice-26-1","s":8,"d":9.2}},{"textKey":"DIALOGUE_JELLY_JIM_2","face":0,"audio":{"tag":"voice-26-1","s":18,"d":9.5}},{"textKey":"DIALOGUE_JELLY_JIM_3","face":1,"anim":2,"audio":{"tag":"voice-26-1","s":28,"d":4}},{"textKey":"DIALOGUE_JELLY_JIM_4","face":2,"anim":4,"audio":{"tag":"voice-26-1","s":33,"d":7.2}},{"textKey":"DIALOGUE_JELLY_JIM_5","face":0,"anim":2,"audio":{"tag":"voice-26-1","s":41,"d":5.7}},{"textKey":"DIALOGUE_JELLY_JIM_6","face":2,"anim":4,"audio":{"tag":"voice-26-1","s":47,"d":8.4}},{"textKey":"DIALOGUE_JELLY_JIM_7","face":2,"anim":4,"audio":{"tag":"voice-26-1","s":56,"d":10.3}}],"harvey":[{"textKey":"DIALOGUE_HARVEY_0","face":0,"anim":2,"audio":{"tag":"voice-29-1","s":0,"d":4}},{"textKey":"DIALOGUE_HARVEY_1","face":1,"audio":{"tag":"voice-29-1","s":5,"d":10}},{"textKey":"DIALOGUE_HARVEY_2","face":1,"audio":{"tag":"voice-29-1","s":16,"d":3}},{"textKey":"DIALOGUE_HARVEY_3","face":1,"anim":2,"audio":{"tag":"voice-29-1","s":20,"d":7}},{"textKey":"DIALOGUE_HARVEY_4","face":1,"anim":4,"audio":{"tag":"voice-29-1","s":28,"d":4}},{"textKey":"DIALOGUE_HARVEY_5","face":1}],"professor_scoog":[{"textKey":"DIALOGUE_PROFESSOR_SCOOG_0","face":1,"audio":{"tag":"voice-9","s":3,"d":2},"anim":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_1","face":0,"audio":{"tag":"voice-9","s":7,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_2","face":2,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_3","face":1,"audio":{"tag":"voice-9","s":0,"d":3}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_4","face":3},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_5","face":2,"audio":{"tag":"voice-9","s":9,"d":2},"anim":3},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_6","face":1},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_7","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_8","face":1,"audio":{"tag":"voice-9","s":3,"d":2},"anim":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_9","face":0,"audio":{"tag":"voice-9","s":11,"d":3}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_10","face":1,"anim":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_11","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_12","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_13","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_14","anim":1,"face":2,"audio":{"tag":"voice-9","s":5,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_15","anim":2,"face":1,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_16","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_17","face":3},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_18","face":1,"anim":3,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_19","anim":4,"face":1},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_20","face":1,"audio":{"tag":"voice-9","s":9,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_21","face":3},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_22","face":1,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_23","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_24","face":3,"anim":1},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_25","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_26","face":3,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_27","face":3,"anim":1,"audio":{"tag":"voice-9","s":5,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_28","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_29","face":0,"anim":4,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_30","face":3,"anim":1,"audio":{"tag":"voice-9","s":5,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_31","face":1,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_32","face":1},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_33","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_34","face":3},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_35","face":3,"audio":{"tag":"voice-9","s":9,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_36","face":0,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_37","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_38","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_39","face":1,"anim":2,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_40","face":3},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_41","face":3,"anim":1,"audio":{"tag":"voice-9","s":5,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_42","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_43","face":1,"anim":2,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_44","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_45","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_46","face":3,"anim":2,"audio":{"tag":"voice-9","s":5,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_47","face":3,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_48","face":3,"anim":2,"audio":{"tag":"voice-9","s":5,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_49","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_50","face":1},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_51","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_52","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_53","face":1,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_54","face":2,"audio":{"tag":"voice-9","s":9,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_55","face":3,"anim":4,"audio":{"tag":"voice-9","s":9,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_56","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_57","face":3,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_58","face":3,"anim":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_59","face":1,"anim":4,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_60","face":1},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_61","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_62","face":1,"anim":2,"audio":{"tag":"voice-9","s":11,"d":3}}],"don-zorro":[{"textKey":"DIALOGUE_DON_ZORRO_0","face":2},{"textKey":"DIALOGUE_DON_ZORRO_1","face":1},{"textKey":"DIALOGUE_DON_ZORRO_2","face":1},{"textKey":"DIALOGUE_DON_ZORRO_3","face":1},{"textKey":"DIALOGUE_DON_ZORRO_4","face":0},{"textKey":"DIALOGUE_DON_ZORRO_5","face":0},{"textKey":"DIALOGUE_DON_ZORRO_6","face":2},{"textKey":"DIALOGUE_DON_ZORRO_7","face":1},{"textKey":"DIALOGUE_DON_ZORRO_8","face":0},{"textKey":"DIALOGUE_DON_ZORRO_9","face":2},{"textKey":"DIALOGUE_DON_ZORRO_10","face":1},{"textKey":"DIALOGUE_DON_ZORRO_11","face":0},{"textKey":"DIALOGUE_DON_ZORRO_12","face":1},{"textKey":"DIALOGUE_DON_ZORRO_13","face":2},{"textKey":"DIALOGUE_DON_ZORRO_14","face":0}],"harriet":[{"textKey":"DIALOGUE_HARRIET_0","face":1},{"textKey":"DIALOGUE_HARRIET_1","face":0},{"textKey":"DIALOGUE_HARRIET_2","face":2},{"textKey":"DIALOGUE_HARRIET_3","face":0},{"textKey":"DIALOGUE_HARRIET_4","face":1},{"textKey":"DIALOGUE_HARRIET_5","face":0},{"textKey":"DIALOGUE_HARRIET_6","face":2},{"textKey":"DIALOGUE_HARRIET_7","face":1},{"textKey":"DIALOGUE_HARRIET_8","face":0},{"textKey":"DIALOGUE_HARRIET_9","face":2},{"textKey":"DIALOGUE_HARRIET_10","face":2},{"textKey":"DIALOGUE_HARRIET_11","face":1},{"textKey":"DIALOGUE_HARRIET_12","face":0}],"verna":[{"textKey":"DIALOGUE_VERNA_0","face":0},{"textKey":"DIALOGUE_VERNA_1","face":2},{"textKey":"DIALOGUE_VERNA_2","face":0},{"textKey":"DIALOGUE_VERNA_3","face":1}],"bargo-bunny":[{"textKey":"DIALOGUE_BARGO_0","face":0},{"textKey":"DIALOGUE_BARGO_1","face":1},{"textKey":"DIALOGUE_BARGO_2","face":3},{"textKey":"DIALOGUE_BARGO_3","face":1},{"textKey":"DIALOGUE_BARGO_4","face":2}],"gale":[{"textKey":"DIALOGUE_GALE_0","face":1,"anim":4,"audio":{"tag":"voice-30-1","s":0,"d":2}},{"textKey":"DIALOGUE_GALE_1","face":1,"anim":0,"audio":{"tag":"voice-30-1","s":3,"d":5}},{"textKey":"DIALOGUE_GALE_2","face":3,"anim":3,"audio":{"tag":"voice-30-1","s":9,"d":6}},{"textKey":"DIALOGUE_GALE_3","face":0,"anim":0,"audio":{"tag":"voice-30-1","s":16,"d":3}},{"textKey":"DIALOGUE_GALE_4","face":3,"anim":0,"audio":{"tag":"voice-30-1","s":20,"d":6}},{"textKey":"DIALOGUE_GALE_5","face":3,"anim":0,"audio":{"tag":"voice-30-1","s":27,"d":4}},{"textKey":"DIALOGUE_GALE_6","face":0,"anim":4,"audio":{"tag":"voice-30-1","s":32,"d":2}},{"textKey":"DIALOGUE_GALE_7","face":2,"anim":0,"audio":{"tag":"voice-30-1","s":35,"d":7}},{"textKey":"DIALOGUE_GALE_8","face":2,"anim":4,"audio":{"tag":"voice-30-1","s":43,"d":1}},{"textKey":"DIALOGUE_GALE_9","face":0,"anim":0,"audio":{"tag":"voice-30-1","s":45,"d":6}},{"textKey":"DIALOGUE_GALE_10","face":3,"anim":0,"audio":{"tag":"voice-30-1","s":52,"d":8}},{"textKey":"DIALOGUE_GALE_11","face":3,"anim":3,"audio":{"tag":"voice-30-1","s":61,"d":10}},{"textKey":"DIALOGUE_GALE_12","face":0,"anim":0,"audio":{"tag":"voice-30-1","s":72,"d":7}},{"textKey":"DIALOGUE_GALE_13","face":0,"anim":0,"audio":{"tag":"voice-30-1","s":80,"d":5}},{"textKey":"DIALOGUE_GALE_14","face":2,"anim":4,"audio":{"tag":"voice-30-1","s":86,"d":3}},{"textKey":"DIALOGUE_GALE_15","face":3},{"textKey":"DIALOGUE_GALE_16","face":0,"anim":2}],"florian":[{"textKey":"DIALOGUE_FLORIAN_0","face":0,"anim":0,"dimmed":true,"audio":{"tag":"voice-31-9","s":0,"d":2}},{"textKey":"DIALOGUE_FLORIAN_1","face":3,"anim":0,"dimmed":true,"audio":{"tag":"voice-31-9","s":2,"d":9.5}},{"textKey":"DIALOGUE_FLORIAN_2","face":3,"anim":0,"dimmed":true,"audio":{"tag":"voice-31-9","s":12,"d":7}},{"textKey":"DIALOGUE_FLORIAN_3","face":3,"anim":0,"dimmed":true,"audio":{"tag":"voice-31-9","s":20,"d":4}},{"textKey":"DIALOGUE_FLORIAN_4","face":0,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-9","s":24,"d":6.5}},{"textKey":"DIALOGUE_FLORIAN_5","face":1,"anim":0,"dimmed":true,"audio":{"tag":"voice-31-9","s":31,"d":3.5}},{"textKey":"DIALOGUE_FLORIAN_6","face":0,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-1","s":0,"d":4.5}},{"textKey":"DIALOGUE_FLORIAN_7","face":3,"anim":3,"dimmed":true,"audio":{"tag":"voice-31-1","s":5,"d":4.5}},{"textKey":"DIALOGUE_FLORIAN_8","face":1,"anim":4,"dimmed":true,"audio":{"tag":"voice-31-1","s":10,"d":1}},{"textKey":"DIALOGUE_FLORIAN_9","face":2,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-2","s":0,"d":3}},{"textKey":"DIALOGUE_FLORIAN_10","face":1,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-3","s":0,"d":9}},{"textKey":"DIALOGUE_FLORIAN_11","face":2,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-4","s":0,"d":7}},{"textKey":"DIALOGUE_FLORIAN_12","face":1,"anim":4,"dimmed":true,"audio":{"tag":"voice-31-5","s":0,"d":4.5}},{"textKey":"DIALOGUE_FLORIAN_13","face":3,"anim":1,"dimmed":true,"audio":{"tag":"voice-31-6","s":0,"d":7}},{"textKey":"DIALOGUE_FLORIAN_14","face":3,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-7","s":0,"d":8}},{"textKey":"DIALOGUE_FLORIAN_15","face":0,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-8","s":0,"d":7.5}},{"textKey":"DIALOGUE_FLORIAN_16","face":0,"anim":0,"audio":{"tag":"voice-31-10","s":0,"d":6}},{"textKey":"DIALOGUE_FLORIAN_17","face":3,"anim":1,"audio":{"tag":"voice-31-10","s":6,"d":7}},{"textKey":"DIALOGUE_FLORIAN_18","face":3,"audio":{"tag":"voice-31-10","s":13,"d":9}},{"textKey":"DIALOGUE_FLORIAN_19","face":1,"anim":2,"audio":{"tag":"voice-31-10","s":22,"d":9}},{"textKey":"DIALOGUE_FLORIAN_20","face":0,"anim":2,"audio":{"tag":"voice-31-10","s":32,"d":3}},{"textKey":"DIALOGUE_FLORIAN_21","face":0,"audio":{"tag":"voice-31-10","s":35,"d":4}},{"textKey":"DIALOGUE_FLORIAN_22","face":1,"anim":2,"audio":{"tag":"voice-31-10","s":39,"d":7}},{"textKey":"DIALOGUE_FLORIAN_23","face":0,"anim":2,"audio":{"tag":"voice-31-10","s":53,"d":6}},{"textKey":"DIALOGUE_FLORIAN_24","face":1,"anim":2,"audio":{"tag":"voice-31-10","s":60,"d":2}},{"textKey":"DIALOGUE_FLORIAN_25","face":2,"anim":0,"audio":{"tag":"voice-10-87","s":102,"d":3}},{"textKey":"DIALOGUE_FLORIAN_26","face":2,"anim":0,"audio":{"tag":"voice-31-11","s":0,"d":4.5}}]}')},34500:k=>{"use strict";k.exports=JSON.parse('{"stand":{"loop":true,"head":{"y":{"interval":30,"frames":[0,-0.2,-0.4,-0.6,-0.8,-1,-1.2,-1.4,-1.6,-1.8,-2,-2.2,-2.4,-2.6,-2.8,-3,-2.8,-2.6,-2.4,-2.2,-2,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.3,-0.15]},"x":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"legs":{"frameName":{"interval":10000,"frames":[0]},"y":{"interval":10000,"frames":[0]},"x":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":30,"frames":[0,-0.15,-0.3,-0.45,-0.6,-0.75,-0.9,-1.05,-1.2,-1.35,-1.5,-1.65,-1.8,-1.95,-2.1,-2.25,-2.4,-2.4,-2.2,-2,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.3,-0.2,-0.1]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"leftArm":{"y":{"interval":30,"frames":[0,-0.25,-0.5,-0.75,-1,-1.25,-1.5,-1.75,-2,-2.25,-2.5,-2.75,-3,-3.25,-3.5,-3.75,-3.75,-3.5,-3.25,-3,-2.75,-2.5,-2.25,-2,-1.75,-1.5,-1.25,-1,-0.75,-0.5,-0.25]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"y":{"interval":30,"frames":[0,-0.25,-0.5,-0.75,-1,-1.25,-1.5,-1.75,-2,-2.25,-2.5,-2.75,-3,-3.25,-3.5,-3.75,-3.75,-3.5,-3.25,-3,-2.75,-2.5,-2.25,-2,-1.75,-1.5,-1.25,-1,-0.75,-0.5,-0.25]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"weapon":{"x":{"interval":93,"frames":[0,-0.1,-0.2,-0.3,-0.4,-0.5,-0.4,-0.3,-0.2,-0.1]},"y":{"interval":30,"frames":[0,-0.35,-0.7,-1.05,-1.4,-1.75,-2.1,-2.45,-2.8,-3.15,-3.5,-3.85,-4.2,-4.55,-4.9,-5.25,-5.25,-4.9,-4.55,-4.2,-3.85,-3.5,-3.15,-2.8,-2.45,-2.1,-1.75,-1.4,-1.05,-0.7,-0.35]},"angle":{"interval":10000,"frames":[0]}},"transformedObject":{"y":{"interval":30,"frames":[0,-0.15,-0.3,-0.45,-0.6,-0.75,-0.9,-1.05,-1.2,-1.35,-1.5,-1.65,-1.8,-1.95,-2.1,-2.25,-2.4,-2.4,-2.2,-2,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.3,-0.2,-0.1]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}}},"standFloat":{"loop":true,"head":{"y":{"interval":30,"frames":[0,-0.2,-0.4,-0.6,-0.8,-1,-1.2,-1.4,-1.6,-1.8,-2,-2.2,-2.4,-2.6,-2.8,-3,-2.8,-2.6,-2.4,-2.2,-2,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.3,-0.15]},"x":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"legs":{"frameName":{"interval":10000,"frames":[3]},"y":{"interval":30,"frames":[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,0.9,0.85,0.8,0.75,0.7,0.65,0.6,0.55,0.5,0.45,0.4,0.35,0.3,0.25,0.2,0.15,0.1,0.05,0,-0.05,-0.05]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":30,"frames":[0,-0.15,-0.3,-0.45,-0.6,-0.75,-0.9,-1.05,-1.2,-1.35,-1.5,-1.65,-1.8,-1.95,-2.1,-2.25,-2.4,-2.4,-2.2,-2,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.3,-0.2,-0.1]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"leftArm":{"y":{"interval":30,"frames":[0,-0.25,-0.5,-0.75,-1,-1.25,-1.5,-1.75,-2,-2.25,-2.5,-2.75,-3,-3.25,-3.5,-3.75,-3.75,-3.5,-3.25,-3,-2.75,-2.5,-2.25,-2,-1.75,-1.5,-1.25,-1,-0.75,-0.5,-0.25]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"y":{"interval":30,"frames":[0,-0.25,-0.5,-0.75,-1,-1.25,-1.5,-1.75,-2,-2.25,-2.5,-2.75,-3,-3.25,-3.5,-3.75,-3.75,-3.5,-3.25,-3,-2.75,-2.5,-2.25,-2,-1.75,-1.5,-1.25,-1,-0.75,-0.5,-0.25]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"weapon":{"x":{"interval":93,"frames":[0,-0.1,-0.2,-0.3,-0.4,-0.5,-0.4,-0.3,-0.2,-0.1]},"y":{"interval":30,"frames":[0,-0.35,-0.7,-1.05,-1.4,-1.75,-2.1,-2.45,-2.8,-3.15,-3.5,-3.85,-4.2,-4.55,-4.9,-5.25,-5.25,-4.9,-4.55,-4.2,-3.85,-3.5,-3.15,-2.8,-2.45,-2.1,-1.75,-1.4,-1.05,-0.7,-0.35]},"angle":{"interval":10000,"frames":[0]}}},"walk":{"loop":true,"head":{"y":{"interval":30,"frames":[0,-1,-2,-2.6,-2.4,-2.2,-2,-1.8,-0.5,0.2,1.2,1.4,1.5,1.6]},"x":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":30,"frames":[0,-0.4,-0.8,-1,-1.2,-1.5,-1.5,-1.6,-0.6,0.6,1.6,1.5,1.4,1.3]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"leftArm":{"y":{"interval":30,"frames":[0,-0.6,-1.3,-1.7,-2,-2.5,-2.4,-2.3,-1,0.2,1.5,1.7,1.9,2]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"y":{"interval":30,"frames":[0,-0.6,-1.3,-1.7,-2,-2.5,-2.4,-2.3,-1,0.2,1.5,1.7,1.9,2]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"weapon":{"y":{"interval":30,"frames":[0,-0.7,-1.4,-1.9,-2.4,-2.8,-2.8,-2.7,-1.4,-0.1,1.2,1.3,1.4,1.5]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"legs":{"frameName":{"interval":80,"frames":[1,2,3,4]},"y":{"interval":10000,"frames":[0]},"x":{"interval":10000,"frames":[0]}},"transformedObject":{"y":{"interval":30,"frames":[0,-2.4,-4.8,-6,-7.2,-9,-9,-9.6,-3.6,1.8,9.6,9,8.4,7.8]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}}},"walkmale":{"loop":true,"head":{"y":{"interval":30,"frames":[0,-1,-2,-2.6,-2.4,-2.2,-2,-1.8,-0.5,0.2,1.2,1.4,1.5,1.6]},"x":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":30,"frames":[0,-0.4,-0.8,-1,-1.2,-1.5,-1.5,-1.6,-0.6,0.6,1.6,1.5,1.4,1.3]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"leftArm":{"y":{"interval":30,"frames":[0,-0.6,-1.3,-1.7,-2,-2.5,-2.4,-2.3,-1,0.2,1.5,1.7,1.9,2]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"y":{"interval":30,"frames":[0,-0.6,-1.3,-1.7,-2,-2.5,-2.4,-2.3,-1,0.2,1.5,1.7,1.9,2]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"weapon":{"y":{"interval":30,"frames":[0,-0.7,-1.4,-1.9,-2.4,-2.8,-2.8,-2.7,-1.4,-0.1,1.2,1.3,1.4,1.5]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"legs":{"frameName":{"interval":80,"frames":[1,2,3,4]},"y":{"interval":10000,"frames":[2]},"x":{"interval":10000,"frames":[0]}},"transformedObject":{"y":{"interval":30,"frames":[0,-2.4,-4.8,-6,-7.2,-9,-9,-9.6,-3.6,1.8,9.6,9,8.4,7.8]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}}},"walkfemale":{"loop":true,"head":{"y":{"interval":30,"frames":[0,-1,-2,-2.6,-2.4,-2.2,-2,-1.8,-0.5,0.2,1.2,1.4,1.5,1.6]},"x":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":30,"frames":[0,-0.4,-0.8,-1,-1.2,-1.5,-1.5,-1.6,-0.6,0.6,1.6,1.5,1.4,1.3]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"leftArm":{"y":{"interval":30,"frames":[0,-0.6,-1.3,-1.7,-2,-2.5,-2.4,-2.3,-1,0.2,1.5,1.7,1.9,2]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"y":{"interval":30,"frames":[0,-0.6,-1.3,-1.7,-2,-2.5,-2.4,-2.3,-1,0.2,1.5,1.7,1.9,2]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"weapon":{"y":{"interval":30,"frames":[0,-0.7,-1.4,-1.9,-2.4,-2.8,-2.8,-2.7,-1.4,-0.1,1.2,1.3,1.4,1.5]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"legs":{"frameName":{"interval":80,"frames":[1,2,3,4]},"y":{"interval":10000,"frames":[4]},"x":{"interval":10000,"frames":[0]}},"transformedObject":{"y":{"interval":30,"frames":[0,-2.4,-4.8,-6,-7.2,-9,-9,-9.6,-3.6,1.8,9.6,9,8.4,7.8]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}}},"walkFloat":{"loop":true,"head":{"y":{"interval":30,"frames":[-0.4,0,0.5,1,1.4,1.9,2.3,2.1,2,1.8,1.2,0.6,0.4,0.2,0,0,-0.1,-0.2]},"x":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":30,"frames":[1.3,1.5,1.7,1.9,2,2.2,2.4,2.5,2.7,2.9,2.6,2.3,1.9,1.6,1.3,1.2,1.1,1]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"leftArm":{"y":{"interval":30,"frames":[1.3,1.5,1.7,1.9,2,2.2,2.4,2.5,2.7,2.9,2.6,2.3,1.9,1.6,1.3,1.2,1.1,1]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"y":{"interval":30,"frames":[1.3,1.5,1.7,1.9,2,2.2,2.4,2.5,2.7,2.9,2.6,2.3,1.9,1.6,1.3,1.2,1.1,1]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"weapon":{"y":{"interval":30,"frames":[1.3,1.5,1.7,1.9,2,2.2,2.4,2.5,2.7,2.9,2.6,2.3,1.9,1.6,1.3,1.2,1.1,1]},"angle":{"interval":10000,"frames":[0]}},"legs":{"y":{"interval":30,"frames":[0,-0.3,-0.6,-0.9,-1.2,-1.5,-1.8,-2.1,-1.9,-1.7,-1.5,-1.3,-1.1,-0.9,-0.7,-0.5,-0.3,-0.1]},"x":{"interval":10000,"frames":[0]},"frameName":{"interval":10000,"frames":[3]},"angle":{"interval":10000,"frames":[15]}}},"dig":{"loop":false,"head":{"x":{"interval":30,"frames":[-4.4,-1,2.2,5.6,5.4,5.2,5,4.9,4.7,4.5,4.4,4.2,4,3.9,3.8,3.6,2.8,1.4,0.6,-0.1,-0.9,-1.6,-2.4,-3.1,0]},"y":{"interval":30,"frames":[0.4,0.2,0.9,1.6,1.5,1.4,1.3,1.2,1,1,0.9,0.8,0.8,0.8,0.8,0.8,0.6,0.2,0,-0.2,-0.4,-0.6,-0.8,-1,0]},"angle":{"interval":30,"frames":[-4,0,2,6,10,9,9,9,9,9,9,9,9,9,9,9,8,6,5,4,3,2,1,0,0]}},"shirt":{"angle":{"interval":30,"frames":[0,5,11,17,16,16,15,15,15,14,14,14,13,13,13,12,11,10,9,8,7,6,4,2,0]},"x":{"interval":30,"frames":[0,0.9,1.8,2.7,2.5,2.5,2.4,2.2,2.1,2,1.9,1.8,1.7,1.6,1.5,1.4,1.2,1.1,1,0.9,0.8,0.7,0.6,0.4,0]},"y":{"interval":30,"frames":[0,0.5,1,1.5,1.5,1.4,1.3,1.3,1.2,1.1,1,1,0.9,0.8,0.8,0.7,0.6,0.5,0.5,0.4,0.3,0.3,0.2,0.1,0]}},"rightArm":{"angle":{"interval":30,"frames":[0,11,22,34,40,45,42,38,35,32,29,25,22,19,15,12,8,4,0,-4,-8,-12,-16,-20,-24]},"x":{"interval":30,"frames":[0,2.4,4.9,7.4,7,6.8,6.5,6.2,5.9,5.7,5.4,5.1,4.8,4.6,4.3,4,3.5,3.1,2.7,2.3,1.8,1.4,1,0.6,0.2]}},"leftArm":{"angle":{"interval":30,"frames":[0,5,10,15,15,20,18,16,16,15,13,12,10,9,6,3,0,-4,-7,-11,-14,-18,-22,-25,-29]},"x":{"interval":30,"frames":[0,2.4,4.6,6.8,6.6,6.4,6.2,6,5.8,5.6,5.4,5.2,5,4.9,4.7,4.5,4,3.7,3.3,2.9,2.6,2.2,1.7,1.4,0.9]},"y":{"interval":30,"frames":[0,1.2,2.4,3.9,3.7,3.6,3.5,3.3,3.2,3,2.9,2.8,2.6,2.5,2.4,2.3,2,1.8,1.5,1.3,1.1,0.9,0.7,0.5,0.2]}},"legs":{"frameName":{"interval":10000,"frames":[1]},"y":{"interval":10000,"frames":[0]}},"weapon":{"x":{"interval":30,"frames":[-25.2,-24.5,-23.8,-22.9,-23.5,-24.8,-24.6,-24.3,-24.2,-24,-23.8,-23.7,-23.5,-22.8,-22.1,-21.5,-20.9,-20.2,-19.6,-18.9,-18.3,-17.7,-17.1,-16.6,-16.2]},"y":{"interval":30,"frames":[0.4,0.1,-0.6,-1.3,-1.4,-3.4,-3.1,-2.8,-2.6,-2.3,-2,-1.8,-1.6,-1.4,-1,-0.6,-0.2,0,0.3,0.4,0.4,0.4,0.2,0,0,-0.5]},"angle":{"interval":30,"frames":[45,46,60,67,68,75,74,73,72,70,69,68,67,66,64,61,59,55,53,50,47,43,41,38,35,33]}}},"attack":{"loop":false,"head":{"y":{"interval":30,"frames":[0,-0.1,-0.1,-0.2,-0.2,-0.3,0.3,0.8,1.4,2.6,0,-2.7,-5.4,-8,-10.7,-13.5,-16.1,-18.8,-21.5,-24.2,-26,-28,-24.8,-21.5,-18.3,-15,-11.8,-8.6,-5.4,-2,1.5,2,2,1.8,1,0,-0.4,-0.8,-0.6,-0.4,-0.2,0,0,0,0,0,0,0,0,0]}},"shirt":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"legs":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0,0,0,0,0,-2.2,-4.4,-6.6,-8.7,-10.9,-13.1,-15.3,-17.5,-19.7,-21.9,-24.1,-26.27,-23.3,-20.3,-17.4,-14.4,-11.5,-8.5,-5.5,-2.6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"frameName":{"interval":30,"frames":[0,0,0,0,0,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},"rightArm":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"angle":{"interval":30,"frames":[0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,28,36,44,52,60,68,76,84,92,100,93,86,79,72,65,58,51,44,37,30,23,16,8,0,0,0,0,0,0,0,0,0,0,0]}},"leftArm":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"angle":{"interval":30,"frames":[0,0,0,0,0,0,0,-8,-16,-24,-32,-40,-48,-56,-64,-72,-80,-85,-90,-95,-100,-104,-107,-97,-87,-77,-67,-57,-47,-37,-27,-17,-7,-5,-3,-2,-1,0,0,0,0,0,0,0,0,0,0,0,0,0]}},"weapon":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.9,0.2,-0.7,-1,8,-3,-7.7,-12.4,-17.13,-21.9,-26.6,-31.3,-35.8,-40.3,-44.5,-48.6,-48.3,-47.7,-41.6,-35.3,-28.9,-22.6,-16.5,-12.8,-9.1,-5.5,-1.8,0,-0.2,-0.6,-1,-1.4,-1.8,-2.3,-2.6,-3,-2.9,-2.8,-2.4,-2,-1.5,-1,-0.5,0]},"x":{"interval":30,"frames":[0,0,0,0,0,0,1.5,3,4.2,5.2,5.9,6.4,6.5,6.4,6,5.4,4.5,3.3,1.9,0.4,2.7,4.5,5.7,6.4,6.5,5.8,4.7,4.5,4.2,3.9,3.6,3.6,3.5,3.5,3.5,3.4,3.4,3.3,3.3,3.3,3.2,3.2,3.1,2.9,2.5,2,1.5,1,0.5,0]},"angle":{"interval":30,"frames":[0,0,0,0,0,0,-8,-15,-23,-31,-37,-46,-54,-62,-69,-77,-84,-92,-100,-73,-58,-43,-28,-13,2,17,32,37,43,48,53,58,55,52,49,45,42,38,35,32,29,25,22,18,15,12,9,6,3,0]}},"transformedObject":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}}},"attackFloat":{"loop":false,"head":{"y":{"interval":30,"frames":[0,-0.1,-0.1,-0.2,-0.2,-0.3,0.3,0.8,1.4,2.6,0,-2.7,-5.4,-8,-10.7,-13.5,-16.1,-18.8,-21.5,-24.2,-26,-28,-24.8,-21.5,-18.3,-15,-11.8,-8.6,-5.4,-2,1.5,2,2,1.8,1,0,-0.4,-0.8,-0.6,-0.4,-0.2,0,0,0,0,0,0,0,0,0]}},"shirt":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"legs":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0,0,0,0,0,-2.2,-4.4,-6.6,-8.7,-10.9,-13.1,-15.3,-17.5,-19.7,-21.9,-24.1,-26.27,-23.3,-20.3,-17.4,-14.4,-11.5,-8.5,-5.5,-2.6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"frameName":{"interval":10000,"frames":[3]},"angle":{"interval":30,"frames":[0,0,0,0,-1,-2,-3,-5,-8,-10,-12,-14,-16,-18,-20,-22,-24,-24,-24,-24,-24,-24,-24,-24,-24,-24,-23,-22,-21,-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0]}},"rightArm":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"angle":{"interval":30,"frames":[0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,28,36,44,52,60,68,76,84,92,100,93,86,79,72,65,58,51,44,37,30,23,16,8,0,0,0,0,0,0,0,0,0,0,0]}},"leftArm":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"angle":{"interval":30,"frames":[0,0,0,0,0,0,0,-8,-16,-24,-32,-40,-48,-56,-64,-72,-80,-85,-90,-95,-100,-104,-107,-97,-87,-77,-67,-57,-47,-37,-27,-17,-7,-5,-3,-2,-1,0,0,0,0,0,0,0,0,0,0,0,0,0]}},"weapon":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.9,0.2,-0.7,-1,8,-3,-7.7,-12.4,-17.13,-21.9,-26.6,-31.3,-35.8,-40.3,-44.5,-48.6,-48.3,-47.7,-41.6,-35.3,-28.9,-22.6,-16.5,-12.8,-9.1,-5.5,-1.8,0,-0.2,-0.6,-1,-1.4,-1.8,-2.3,-2.6,-3,-2.9,-2.8,-2.4,-2,-1.5,-1,-0.5,0]},"x":{"interval":30,"frames":[0,0,0,0,0,0,1.5,3,4.2,5.2,5.9,6.4,6.5,6.4,6,5.4,4.5,3.3,1.9,0.4,2.7,4.5,5.7,6.4,6.5,5.8,4.7,4.5,4.2,3.9,3.6,3.6,3.5,3.5,3.5,3.4,3.4,3.3,3.3,3.3,3.2,3.2,3.1,2.9,2.5,2,1.5,1,0.5,0]},"angle":{"interval":30,"frames":[0,0,0,0,0,0,-8,-15,-23,-31,-37,-46,-54,-62,-69,-77,-84,-92,-100,-73,-58,-43,-28,-13,2,17,32,37,43,48,53,58,55,52,49,45,42,38,35,32,29,25,22,18,15,12,9,6,3,0]}}},"attackBig":{"loop":false,"head":{"y":{"interval":30,"frames":[0,-0.1,-0.1,-0.2,-0.2,-0.3,0.3,0.8,1.4,2.6,0,-2.7,-5.4,-8,-10.7,-13.5,-16.1,-18.8,-21.5,-24.2,-26,-28,-24.8,-21.5,-18.3,-15,-11.8,-8.6,-5.4,-2,1.5,2,2,1.8,1,0,-0.4,-0.8,-0.6,-0.4,-0.2,0,0,0,0,0,0,0,0,0]}},"shirt":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"legs":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0,0,0,0,0,-2.2,-4.4,-6.6,-8.7,-10.9,-13.1,-15.3,-17.5,-19.7,-21.9,-24.1,-26.27,-23.3,-20.3,-17.4,-14.4,-11.5,-8.5,-5.5,-2.6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"frameName":{"interval":30,"frames":[0,0,0,0,0,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},"rightArm":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"angle":{"interval":30,"frames":[0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,28,36,44,52,60,68,76,84,92,100,93,86,79,72,65,58,51,44,37,30,23,16,8,0,0,0,0,0,0,0,0,0,0,0]}},"leftArm":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"angle":{"interval":30,"frames":[0,0,0,0,0,0,0,-8,-16,-24,-32,-40,-48,-56,-64,-72,-80,-85,-90,-95,-100,-104,-107,-97,-87,-77,-67,-57,-47,-37,-27,-17,-7,-5,-3,-2,-1,0,0,0,0,0,0,0,0,0,0,0,0,0]}},"weapon":{"angle":{"interval":30,"frames":[23,24,26,27,29,30,32,33,25,16,8,0,-8,-16,-25,-33,-29,-26,-20,-15,-9,-3,3,8.5,14,22,26,31,36,40,43,43,44,45,45,46,47,48,49,47,45,43,42,40,41,42,42,43,44,45]},"x":{"interval":30,"frames":[-26.1,-27.6,-29.2,-31,-32.7,-34.6,-36.6,-38.6,-35,-31.6,-28.7,-26.6,-25.1,-24,-23.5,-23.5,-23.5,-23.5,-23,-22.4,-22,-22,-21.4,-21.4,-21.7,-22.2,-24.1,-26,-28,-30.3,-32.7,-32,-33,-33,-33,-34,-34,-34.3,-34.6,-36.5,-38.5,-40.4,-42.3,-44.2,-38.2,-32.3,-27,-21,-16,-6]},"y":{"interval":30,"frames":[13.5,14.6,15.7,16.6,17.4,18,18.5,18.8,19.8,19.8,19.1,17,14.7,5.2,-4.2,-13.4,-21.5,-29.6,-36,-42.2,-37,-31.6,-26,-19.9,-13.6,-7.1,-2,3,8,12,15.8,15.2,15,15,15,15,15,14.7,14.6,14.5,14.3,14,14,13.4,15.2,16,16,15,15,12.4]}}},"moonwalkfemale":{"loop":true,"rightArm":{"x":{"interval":40,"frames":[0,0.5,1,1.4,1.9,1.5,1,0.5,0,0.4,0.9,1.4,1.9,1.5,1,0.5,0,0.4,0.9,1.4,2,1.5,1,0.5,0,0.4,0.9,1.5,2,1.5,1,0.5,0,0.4,1,1.5,2.1,1.6,1,0.4,-0.2,0.4,1,1.6,2.3,1.6,0.8,0,-0.9]},"y":{"interval":40,"frames":[0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0]}},"character":{"x":{"interval":40,"frames":[0,-1.2,-2.4,-3.6,-4.8,-6,-7.2,-8.4,-9.6,-11.2,-12.4,-13.6,-14.8,-16,-17.2,-18.4,-19.6,-21.2,-22.4,-23.6,-24.8,-26,-27.2,-28.4,-29.6,-28.8,-27.6,-26.4,-25.2,-24,-22.8,-21.6,-20.4,-18.8,-17.6,-16.4,-15.2,-14,-12.8,-11.6,-10.4,-8.8,-7.6,-6.4,-5.2,-4,-2.8,-1.6,-0.4]},"xScale":{"interval":40,"frames":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]}},"head":{"y":{"interval":40,"frames":[0,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]},"x":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":40,"frames":[0,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,-2]}},"leftArm":{"x":{"interval":40,"frames":[0,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1]},"y":{"interval":40,"frames":[0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0]}},"legs":{"frameName":{"interval":40,"frames":[3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4]}}},"moonwalkmale":{"loop":true,"rightArm":{"x":{"interval":40,"frames":[0,0.5,1,1.4,1.9,1.5,1,0.5,0,0.4,0.9,1.4,1.9,1.5,1,0.5,0,0.4,0.9,1.4,2,1.5,1,0.5,0,0.4,0.9,1.5,2,1.5,1,0.5,0,0.4,1,1.5,2.1,1.6,1,0.4,-0.2,0.4,1,1.6,2.3,1.6,0.8,0,-0.9]},"y":{"interval":40,"frames":[0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0]}},"character":{"x":{"interval":40,"frames":[0,-1.2,-2.4,-3.6,-4.8,-6,-7.2,-8.4,-9.6,-11.2,-12.4,-13.6,-14.8,-16,-17.2,-18.4,-19.6,-21.2,-22.4,-23.6,-24.8,-26,-27.2,-28.4,-29.6,-28.8,-27.6,-26.4,-25.2,-24,-22.8,-21.6,-20.4,-18.8,-17.6,-16.4,-15.2,-14,-12.8,-11.6,-10.4,-8.8,-7.6,-6.4,-5.2,-4,-2.8,-1.6,-0.4]},"xScale":{"interval":40,"frames":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]}},"head":{"y":{"interval":40,"frames":[0,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]},"x":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":40,"frames":[0,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,-2]}},"leftArm":{"x":{"interval":40,"frames":[0,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1]},"y":{"interval":40,"frames":[0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0]}},"legs":{"frameName":{"interval":40,"frames":[0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4]}}},"runningMan":{"loop":true,"character":{"x":{"interval":40,"frames":[0,0,2.67,2.67,4.67,4.67,6.67,8.67,8.67,8.67,8.67,8.67,7.67,6.67,5.67,4.67,2.67,2.67,0,0,0,0]}},"leftArm":{"x":{"interval":10000,"frames":[-1.31]},"y":{"interval":10000,"frames":[1.52]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":40,"frames":[-18.45,-13.9,-9.4,-4.8,-0.3,-2.4,-5.3,-8.1,-10.9,-13.7,-16.5,-27.2,-36,-44.7,-53.5,-62.3,-59.3,-49.1,-38.9,-28.7]}},"rightArm":{"x":{"interval":10000,"frames":[-1]},"y":{"interval":10000,"frames":[-1]},"angle":{"interval":40,"frames":[0.39,-5.4,-11.3,-17.1,-23,-28.8,-26.8,-20,-13.2,-6.4,13.8,27.2,40.6,54,67.3,62.8,47.2,31.6,16,8]}},"head":{"y":{"interval":40,"frames":[-2,-1.5,-1.1,-0.6,-0.2,0.3,0.7,0.3,-0.4,-1.2,-1.9,-1.6,-1.1,-0.7,-0.2,0.2,0.7,0.3,-0.4,-1.2,-1.9]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]},"x":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":40,"frames":[-2,-1.7,-1.4,-1.1,-0.8,-0.5,-0.2,-0.5,-1,-1.4,-1.9,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-1.2,-1.8,-2.3,-2.9]}},"legs":{"frameName":{"interval":40,"frames":[1,1,2,2,2,2,3,3,3,4,4,1,1,2,2,2,3,3,3,3,4,4]}}},"hammermale":{"loop":true,"character":{"x":{"interval":40,"frames":[0,0.4,0.7,1.1,1.4,1.8,2.2,2.5,2.9,3.9,4.8,5.7,6.9,7.8,8.7,9.9,10.8,11.7,12.9,13.8,14.7,15.9,16.8,17.7,17.4,16.8,16.2,15.6,14.1,13.2,12.3,11.1,10.2,9.3,8.1,7.2,6.3,5.1,4.2,3.3,2.1,1.2,0.3,0,0,0]},"y":{"interval":10000,"frames":[0]}},"head":{"x":{"interval":40,"frames":[0,0.4,0.8,1.6,2.4,2.8,2.4,1.6,1.2,0.4,-0.4,-0.8,-1.6,-2.4,-2.8,-2.4,-1.6,-1.2,-0.4,0.4,0.8,1.6,2.4,2.8,2.4,1.6,1.2,0.4,-0.4,-0.8,-1.6,-2.4,-2.8,-2.4,-1.6,-1.2,-0.4]},"y":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"x":{"interval":40,"frames":[0,0.2,0.3,0.5,0.6,0.8,1,1.1,1.3,1.4,1.6,1.8,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1]},"y":{"interval":40,"frames":[0,0,0,0,0,0,0,0,0,-0.1,-0.1,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0]},"angle":{"interval":40,"frames":[0,8.7,17.4,26,34.7,43.4,52.1,60.7,69.4,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,54.9,37.6,20.3,3]}},"leftArm":{"x":{"interval":40,"frames":[0,0.2,0.3,0.5,0.6,0.8,1,1.1,1.3,1.4,1.6,1.8,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-6.9,-13.8,-20.6,-27.5,-34.4,-41.3,-48.2,-55,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-43.6,-29.8,-16.1,-2.4]}},"legs":{"frameName":{"interval":40,"frames":[2,2,2,2,2,0,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,2,2,2,2,0,0,0,0,0,2,2,2,0,0,0,2,2,2,2,0,0,0,2,2,2,0,0,0,0]}}},"hammerfemale":{"loop":true,"character":{"x":{"interval":40,"frames":[0,0.4,0.7,1.1,1.4,1.8,2.2,2.5,2.9,3.9,4.8,5.7,6.9,7.8,8.7,9.9,10.8,11.7,12.9,13.8,14.7,15.9,16.8,17.7,17.4,16.8,16.2,15.6,14.1,13.2,12.3,11.1,10.2,9.3,8.1,7.2,6.3,5.1,4.2,3.3,2.1,1.2,0.3,0,0,0]},"y":{"interval":10000,"frames":[0]}},"head":{"x":{"interval":40,"frames":[0,0.4,0.8,1.6,2.4,2.8,2.4,1.6,1.2,0.4,-0.4,-0.8,-1.6,-2.4,-2.8,-2.4,-1.6,-1.2,-0.4,0.4,0.8,1.6,2.4,2.8,2.4,1.6,1.2,0.4,-0.4,-0.8,-1.6,-2.4,-2.8,-2.4,-1.6,-1.2,-0.4]},"y":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"x":{"interval":40,"frames":[0,0.2,0.3,0.5,0.6,0.8,1,1.1,1.3,1.4,1.6,1.8,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1]},"y":{"interval":40,"frames":[0,0,0,0,0,0,0,0,0,-0.1,-0.1,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0]},"angle":{"interval":40,"frames":[0,8.7,17.4,26,34.7,43.4,52.1,60.7,69.4,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,54.9,37.6,20.3,3]}},"leftArm":{"x":{"interval":40,"frames":[0,0.2,0.3,0.5,0.6,0.8,1,1.1,1.3,1.4,1.6,1.8,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-6.9,-13.8,-20.6,-27.5,-34.4,-41.3,-48.2,-55,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-43.6,-29.8,-16.1,-2.4]}},"legs":{"frameName":{"interval":40,"frames":[1,1,1,1,1,1,3,3,3,4,4,4,3,3,3,3,4,4,4,3,3,3,4,4,4,4,1,1,1,1,1,3,3,3,4,4,4,3,3,3,3,4,4,4,3,3,3,4,4,4,4]}}},"shimmy":{"loop":true,"rightArm":{"x":{"interval":10000,"frames":[0]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0.13,-17,-34.2,-51.4,-68.5,-103,-120.4,-118.4,-107.8,-97.1,-86.5,-93.9,-111.9,-129.9,-118.2,-100.6,-83.1,-68.4,-59.5,-50.6,-41.7,-51.9,-63.6,-75.3,-68.8,-58.5,-48.2,-37.9,-43,-58.4,-73.8,-64.6,-50,-35.4,-41.8,-53,-64.2,-75.3,-72.4,-67.5,-62.6,-57.7,-52.9,-48,-43.1,-38.2,-33.3,-28.5,-23.6,-18.7,-13.8,-8.9,-4]}},"leftArm":{"x":{"interval":10000,"frames":[0]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-10.3,-20.6,-30.8,-41.1,-56.6,-61.8,-51.3,-38.2,-25.1,-12,-17.9,-36.9,-55.9,-45.1,-28.1,-11.1,-19.3,-32.9,-46.6,-60.2,-41.8,-21,-0.2,-7.5,-21.5,-35.5,-49.5,-42.2,-20.9,0.4,-14,-35.9,-57.7,-61,-57.1,-53.2,-49.3,-45.4,-41.5,-37.6,-33.8,-29.9,-26,-22.1,-18.2,-14.3,-10.4,-6.6,-2.7,1.2,5.1,9]}},"head":{"x":{"interval":10000,"frames":[0]},"y":{"interval":40,"frames":[0,0.4,0.8,1.2,1.7,1.2,0.4,0.7,1.3,2,2.6,2,0.8,-0.5,0.2,1.2,2.3,1.9,1.1,0.3,-0.5,0.4,1.5,2.5,2.1,1.3,0.6,-0.2,-0.1,0.7,1.5,1.4,1.1,0.8,1.1,1.5,1.9,2.4,2.3,2.1,2,1.8,1.7,1.5,1.4,1.3,1.1,1,0.8,0.7,0.5,0.4,0.2]},"angle":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]}},"legs":{"frameName":{"interval":40,"frames":[3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0]}}},"dabfemale":{"loop":true,"character":{"xScale":{"interval":2040,"frames":[1,-1]}},"legs":{"frameName":{"interval":40,"frames":[4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]},"x":{"interval":40,"frames":[0,0,0,0,0,0,0,0,0,0,0,0,0,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6]}},"rightArm":{"x":{"interval":10000,"frames":[0]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-6.7,-13.4,-20.2,-26.9,-33.6,-40.3,-47.1,-60.8,-70.5,-80.2,-90.9,-100.7,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120]}},"leftArm":{"x":{"interval":10000,"frames":[0]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-6.1,-12.2,-18.4,-24.5,-30.6,-36.7,-42.9,-49,-55.1,-61.2,-67.3,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80]}},"head":{"x":{"interval":40,"frames":[0,-0.2,-0.4,-0.6,-0.8,-1,-1.3,-1.5,-1.7,-1.9,-2.1,-2.3,-2.3,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12]},"y":{"interval":40,"frames":[0,-0.4,-0.7,-1.1,-1.5,-1.9,-2.2,-2.6,-3,-3,-3,-3,-3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]},"xScale":{"interval":40,"frames":[1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]},"angle":{"interval":40,"frames":[0,0,0,0,0,0,0,0,0,0,0,0,0,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94]}},"shirt":{"x":{"interval":10000,"frames":[0]},"y":{"interval":40,"frames":[0,-0.3,-0.5,-0.8,-1.1,-1.4,-1.6,-1.9,-2.2,-2.4,-2.7,-3,1,0.9,0.7,0.6,0.5,0.3,0.2,0,0.1,0.1,0.2,0.3,0.3,0.4,0.5,0.5,0.6,0.7,0.7,0.8,0.9,0.9,1,1.1,1,0.9,0.8,0.7,0.6,0.5,0.4,0.3,0.2,0.1,0,0,0,0,0]}}},"dabmale":{"loop":true,"character":{"xScale":{"interval":2040,"frames":[1,-1]}},"legs":{"frameName":{"interval":40,"frames":[4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},"rightArm":{"x":{"interval":10000,"frames":[-2]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-6.7,-13.4,-20.2,-26.9,-33.6,-40.3,-47.1,-60.8,-70.5,-80.2,-90.9,-100.7,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120]}},"leftArm":{"x":{"interval":10000,"frames":[0]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-6.1,-12.2,-18.4,-24.5,-30.6,-36.7,-42.9,-49,-55.1,-61.2,-67.3,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80]}},"head":{"x":{"interval":40,"frames":[0,-0.2,-0.4,-0.6,-0.8,-1,-1.3,-1.5,-1.7,-1.9,-2.1,-2.3,-2.3,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12]},"y":{"interval":40,"frames":[0,-0.4,-0.7,-1.1,-1.5,-1.9,-2.2,-2.6,-3,-3,-3,-3,-3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]},"xScale":{"interval":40,"frames":[1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]},"angle":{"interval":40,"frames":[0,0,0,0,0,0,0,0,0,0,0,0,0,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94]}},"shirt":{"x":{"interval":10000,"frames":[0]},"y":{"interval":40,"frames":[0,-0.3,-0.5,-0.8,-1.1,-1.4,-1.6,-1.9,-2.2,-2.4,-2.7,-3,1,0.9,0.7,0.6,0.5,0.3,0.2,0,0.1,0.1,0.2,0.3,0.3,0.4,0.5,0.5,0.6,0.7,0.7,0.8,0.9,0.9,1,1.1,1,0.9,0.8,0.7,0.6,0.5,0.4,0.3,0.2,0.1,0,0,0,0,0]}}},"floatDig":{},"setup":{}}')},77628:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":80,"frames":["{birdTag}/walk/body-0","{birdTag}/walk/body-1","{birdTag}/walk/body-2","{birdTag}/walk/body-3"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":80,"frames":["{birdTag}/walk/body-0","{birdTag}/walk/body-1","{birdTag}/walk/body-2","{birdTag}/walk/body-3"]}}}}}')},60296:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["cactus-0/idle/body-0","cactus-0/idle/body-1","cactus-0/idle/body-2","cactus-0/idle/body-3"]}},"head":{"frameName":{"interval":150,"frames":["cactus-0/idle/flower-0","cactus-0/idle/flower-1","cactus-0/idle/flower-2","cactus-0/idle/flower-3"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["cactus-0/walk/body-0","cactus-0/walk/body-1","cactus-0/walk/body-2","cactus-0/walk/body-3"]}},"head":{"frameName":{"interval":150,"frames":["cactus-0/walk/flower-0","cactus-0/walk/flower-1","cactus-0/walk/flower-2","cactus-0/walk/flower-3"]}}}}}')},48687:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":10000,"frames":["{catTag}/idle/body-0"]}},"legs":{"visible":{"interval":10000,"frames":[false]}},"tail":{"y":{"interval":10000,"frames":[6]},"frameName":{"interval":150,"frames":["{catTag}/idle/tail-0","{catTag}/idle/tail-1","{catTag}/idle/tail-2"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["{catTag}/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["{catTag}/walk/legs-0","{catTag}/walk/legs-1","{catTag}/walk/legs-2","{catTag}/walk/legs-3"]}},"tail":{"frameName":{"interval":150,"frames":["{catTag}/walk/tail-0","{catTag}/walk/tail-1"]},"y":{"interval":150,"frames":[0,1]}}}}}')},24625:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":10000,"frames":["{dogTag}/idle/body-0"]}},"legs":{"visible":{"interval":10000,"frames":[false]}},"tail":{"y":{"interval":10000,"frames":[6]},"frameName":{"interval":150,"frames":["{dogTag}/idle/tail-0","{dogTag}/idle/tail-1","{dogTag}/idle/tail-2"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["{dogTag}/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["{dogTag}/walk/legs-0","{dogTag}/walk/legs-1","{dogTag}/walk/legs-2","{dogTag}/walk/legs-3"]}},"tail":{"frameName":{"interval":150,"frames":["{dogTag}/walk/tail-0","{dogTag}/walk/tail-1"]},"y":{"interval":150,"frames":[0,1]}}}}}')},57131:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["lizard-3/idle/body-0","lizard-3/idle/body-1","lizard-3/idle/body-2","lizard-3/idle/body-3"]}},"head":{"visible":{"interval":10000,"frames":[false]}},"tail":{"frameName":{"interval":150,"frames":["lizard-3/idle/tail-0","lizard-3/idle/tail-1","lizard-3/idle/tail-2","lizard-3/idle/tail-3"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["lizard-3/walk/body-0","lizard-3/walk/body-1","lizard-3/walk/body-2","lizard-3/walk/body-3"]}},"head":{"frameName":{"interval":10000,"frames":["lizard-3/walk/head-0"]},"y":{"interval":150,"frames":[0,1]}},"tail":{"y":{"interval":150,"frames":[0,-1]},"frameName":{"interval":150,"frames":["lizard-3/walk/tail-0","lizard-3/walk/tail-1"]}}}}}')},85218:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"x":{"interval":10000,"frames":[-6]},"frameName":{"interval":150,"frames":["fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-1"]}},"legs":{"visible":{"interval":10000,"frames":[false]}},"tail":{"frameName":{"interval":150,"frames":["fox-0/idle/tail-0","fox-0/idle/tail-0","fox-0/idle/tail-0","fox-0/idle/tail-0","fox-0/idle/tail-0","fox-0/idle/tail-0","fox-0/idle/tail-1"]},"y":{"interval":10000,"frames":[-1]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["fox-0/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["fox-0/walk/legs-0","fox-0/walk/legs-1","fox-0/walk/legs-2","fox-0/walk/legs-3"]}},"tail":{"frameName":{"interval":150,"frames":["fox-0/walk/tail-0","fox-0/walk/tail-1"]},"y":{"interval":150,"frames":[0,1]}}}}}')},22967:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":10000,"frames":["{lizardTag}/idle/body-0"]}},"head":{"visible":{"interval":10000,"frames":[false]}},"tail":{"frameName":{"interval":10000,"frames":["{lizardTag}/idle/tail-0"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["{lizardTag}/walk/body-0","{lizardTag}/walk/body-1","{lizardTag}/walk/body-2","{lizardTag}/walk/body-3"]}},"head":{"frameName":{"interval":10000,"frames":["{lizardTag}/walk/head-0"]},"y":{"interval":150,"frames":[0,1]}},"tail":{"y":{"interval":150,"frames":[0,-1]},"frameName":{"interval":150,"frames":["{lizardTag}/walk/tail-0","{lizardTag}/walk/tail-1"]}}}}}')},67987:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["panda-0/idle/body-0","panda-0/idle/body-1","panda-0/idle/body-2"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["panda-0/walk/body-0","panda-0/walk/body-1","panda-0/walk/body-2","panda-0/walk/body-3"]}}}}}')},11475:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["penguin-0/idle/body-0","penguin-0/idle/body-1","penguin-0/idle/body-2"]}},"head":{"x":{"interval":10000,"frames":[-3]},"frameName":{"interval":10000,"frames":["penguin-0/idle/head-0"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["penguin-0/walk/body-0","penguin-0/walk/body-1","penguin-0/walk/body-2","penguin-0/walk/body-3"]}},"head":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["penguin-0/walk/head-0"]}}}}}')},45221:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"x":{"interval":10000,"frames":[4]},"frameName":{"interval":10000,"frames":["reindeer-0/idle/body-0"]}},"legs":{"visible":{"interval":10000,"frames":[false]}},"tail":{"y":{"interval":10000,"frames":[8]},"frameName":{"interval":150,"frames":["reindeer-0/idle/tail-0","reindeer-0/idle/tail-2","reindeer-0/idle/tail-1","reindeer-0/idle/tail-2"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["reindeer-0/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["reindeer-0/walk/legs-0","reindeer-0/walk/legs-1","reindeer-0/walk/legs-2","reindeer-0/walk/legs-3"]}},"tail":{"frameName":{"interval":150,"frames":["reindeer-0/walk/tail-0","reindeer-0/walk/tail-1"]},"y":{"interval":150,"frames":[0,1]}}}}}')},88505:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-1"]}},"legs":{"visible":{"interval":10000,"frames":[false]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["{rodentTag}/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["{rodentTag}/walk/legs-0","{rodentTag}/walk/legs-1","{rodentTag}/walk/legs-2","{rodentTag}/walk/legs-3"]}}}}}')},43168:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":300,"frames":["sheep-0/idle/body-0","sheep-0/idle/body-1"]},"y":{"interval":150,"frames":[0,-1,0,1]}},"legs":{"frameName":{"interval":150,"frames":["sheep-0/idle/legs-0","sheep-0/idle/legs-1","sheep-0/idle/legs-2","sheep-0/idle/legs-3"]},"y":{"interval":10000,"frames":[-14]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["sheep-0/walk/body-0","sheep-0/walk/body-1"]},"y":{"interval":150,"frames":[0,-1,0,1]}},"legs":{"frameName":{"interval":10000,"frames":["sheep-0/walk/shadow-0"]}}}}}')},35002:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["snowman-0/idle/body-0","snowman-0/idle/body-1","snowman-0/idle/body-0","snowman-0/idle/body-1"]}},"head":{"y":{"interval":150,"frames":[-1,-2,-3,-2]},"frameName":{"interval":10000,"frames":["snowman-0/idle/head-0"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["snowman-0/walk/body-0","snowman-0/walk/body-1","snowman-0/walk/body-2","snowman-0/walk/body-3"]}},"head":{"x":{"interval":150,"frames":[0,1,2,1]},"y":{"interval":150,"frames":[0,-1,-1,0]},"frameName":{"interval":10000,"frames":["snowman-0/walk/head-0"]}}}}}')},74109:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"x":{"interval":10000,"frames":[-12]},"frameName":{"interval":150,"frames":["sparkle-cat-0/idle/body-0","sparkle-cat-0/idle/body-1","sparkle-cat-0/idle/body-2","sparkle-cat-0/idle/body-3"]}},"legs":{"visible":{"interval":10000,"frames":[false]}},"tail":{"visible":{"interval":10000,"frames":[false]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["sparkle-cat-0/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["sparkle-cat-0/walk/legs-0","sparkle-cat-0/walk/legs-1","sparkle-cat-0/walk/legs-2","sparkle-cat-0/walk/legs-3"]}},"tail":{"frameName":{"interval":150,"frames":["sparkle-cat-0/walk/tail-0","sparkle-cat-0/walk/tail-1"]},"y":{"interval":150,"frames":[0,1]}}}}}')},67131:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"x":{"interval":10000,"frames":[-12]},"frameName":{"interval":150,"frames":["sparkle-dog-0/idle/body-0","sparkle-dog-0/idle/body-1","sparkle-dog-0/idle/body-2","sparkle-dog-0/idle/body-3"]}},"legs":{"visible":{"interval":10000,"frames":[false]}},"tail":{"visible":{"interval":10000,"frames":[false]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["sparkle-dog-0/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["sparkle-dog-0/walk/legs-0","sparkle-dog-0/walk/legs-1","sparkle-dog-0/walk/legs-2","sparkle-dog-0/walk/legs-3"]}},"tail":{"frameName":{"interval":150,"frames":["sparkle-dog-0/walk/tail-0","sparkle-dog-0/walk/tail-1"]},"y":{"interval":150,"frames":[0,1]}}}}}')},98179:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["sparkle-rodent-0/idle/body-0","sparkle-rodent-0/idle/body-1","sparkle-rodent-0/idle/body-2","sparkle-rodent-0/idle/body-3"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["sparkle-rodent-0/walk/body-0","sparkle-rodent-0/walk/body-1","sparkle-rodent-0/walk/body-2","sparkle-rodent-0/walk/body-3"]}}}}}')},43081:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":10000,"frames":["{turtleTag}/idle/body-0"]}},"legs":{"visible":{"interval":10000,"frames":[false]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":10000,"frames":["{turtleTag}/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["{turtleTag}/walk/legs-0","{turtleTag}/walk/legs-1","{turtleTag}/walk/legs-2","{turtleTag}/walk/legs-3"]}}}}}')}},__webpack_module_cache__={},leafPrototypes,getProto;function __webpack_require__(k){var B=__webpack_module_cache__[k];if(void 0!==B)return B.exports;var U=__webpack_module_cache__[k]={id:k,loaded:!1,exports:{}};return __webpack_modules__[k].call(U.exports,U,U.exports,__webpack_require__),U.loaded=!0,U.exports}__webpack_require__.n=k=>{var B=k&&k.__esModule?()=>k.default:()=>k;return __webpack_require__.d(B,{a:B}),B},getProto=Object.getPrototypeOf?k=>Object.getPrototypeOf(k):k=>k.__proto__,__webpack_require__.t=function(k,B){if(1&B&&(k=this(k)),8&B)return k;if("object"==typeof k&&k){if(4&B&&k.__esModule)return k;if(16&B&&"function"==typeof k.then)return k}var U=Object.create(null);__webpack_require__.r(U);var F={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var G=2&B&&k;"object"==typeof G&&!~leafPrototypes.indexOf(G);G=getProto(G))Object.getOwnPropertyNames(G).forEach((B=>F[B]=()=>k[B]));return F.default=()=>k,__webpack_require__.d(U,F),U},__webpack_require__.d=(k,B)=>{for(var U in B)__webpack_require__.o(B,U)&&!__webpack_require__.o(k,U)&&Object.defineProperty(k,U,{enumerable:!0,get:B[U]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(k,B)=>Object.prototype.hasOwnProperty.call(k,B),__webpack_require__.r=k=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(k,"__esModule",{value:!0})},__webpack_require__.nmd=k=>(k.paths=[],k.children||(k.children=[]),k),__webpack_require__(85409),__webpack_require__(52250);var __webpack_exports__=__webpack_require__(67820),__webpack_export_target__=window;for(var i in __webpack_exports__)__webpack_export_target__[i]=__webpack_exports__[i];__webpack_exports__.__esModule&&Object.defineProperty(__webpack_export_target__,"__esModule",{value:!0})})(); //# sourceMappingURL=game.min.js.map -/** P-NP Patcher v4.3.0 — Suffix **/ +/** P-NP Patcher v4.4.0 — Suffix **/ /* ── 1. Immediate: Signal game script loaded ── */ SW.Load.decrementLoadSemaphore(); console.log("%cP-NP Patcher", "font-size:40px;color:#540052;font-weight:900;font-family:sans-serif;"); -console.log("%cVersion 4.3.0", "font-size:20px;color:#000025;font-weight:700;font-family:sans-serif;"); +console.log("%cVersion 4.4.0", "font-size:20px;color:#000025;font-weight:700;font-family:sans-serif;"); console.image((e => e[Math.floor(Math.random() * e.length)])(["https://i.imgur.com/bPtAQ8I.png","https://i.imgur.com/EVbS5zG.png","https://i.imgur.com/ij1DgZi.png","https://i.imgur.com/lJTWDu2.png","https://i.imgur.com/EPAdHYN.png","https://i.imgur.com/5S5Tr1t.png","https://i.imgur.com/d3BGwnZ.png","https://i.imgur.com/Thdxszk.png","https://i.imgur.com/zpyv4TJ.png","https://i.imgur.com/lHztg3K.png","https://i.imgur.com/Odu0WDF.png","https://i.imgur.com/ExRgzlL.png","https://i.imgur.com/2tj8ArT.png","https://i.imgur.com/JMVR4wZ.png","https://i.imgur.com/QhybQ9J.png","https://i.imgur.com/sFdJp9c.png","https://i.imgur.com/N4XnUY6.png","https://i.imgur.com/0ivwtH8.png","https://i.imgur.com/qJJh7nf.png","https://i.imgur.com/BTnE99I.png","https://i.imgur.com/T0LEsCe.png","https://i.imgur.com/Nh20Jwl.png","https://i.imgur.com/MvV56er.png","https://i.imgur.com/Jyd6Uuy.png","https://i.imgur.com/a3Tfych.png","https://i.imgur.com/oNZIEhl.png","https://i.imgur.com/VEJxBcM.png","https://i.imgur.com/5UvWETx.png","https://i.imgur.com/Pt9u23U.png","https://i.imgur.com/Q5nVNus.png","https://i.imgur.com/bDtTVd4.png","https://i.imgur.com/0xAJCAy.png","https://i.imgur.com/2rm0eUH.png","https://i.imgur.com/lrbPvoc.png","https://i.imgur.com/2xz4muk.png","https://i.imgur.com/vURg371.png","https://i.imgur.com/woEnk7L.png","https://i.imgur.com/NX4pThk.png","https://i.imgur.com/qwIznNP.png","https://i.imgur.com/hwPeqbQ.png","https://i.imgur.com/c4kM2cV.png","https://i.imgur.com/k3CTGox.png","https://i.imgur.com/SidLEMT.png","https://i.imgur.com/C7uQ4mr.png","https://i.imgur.com/orHdDCF.png","https://i.imgur.com/caJF6R6.png","https://i.imgur.com/hPZtRjb.png","https://i.imgur.com/rwlTCpQ.png","https://i.imgur.com/r0gIjUt.png","https://i.imgur.com/k4YfiWs.png","https://i.imgur.com/R89VSXH.png","https://i.imgur.com/5X4tgvR.png","https://i.imgur.com/E79ZaFT.png","https://i.imgur.com/rZEGd27.png","https://i.imgur.com/v5pDXsL.png","https://i.imgur.com/VEHoaR9.png","https://i.imgur.com/qyKbB5L.png","https://i.imgur.com/NG0rZgL.png","https://i.imgur.com/l3UODvl.png","https://i.imgur.com/fQFxBi5.png","https://i.imgur.com/dybtFOP.png","https://i.imgur.com/iPua2Dg.png","https://i.imgur.com/pXK2yWH.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/iLC5pQW.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/iDM2afL.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/y2fa9gg.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/22a89fh.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/80ahwofi.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/q29pgra.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/39ahfaai.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/19jamaa.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/a92upaaa.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/q8r9pqh.png"])); /* ── 2. Setup P-NP properties (waits for lodash if needed) ── */ diff --git a/dist/manifest.json b/dist/manifest.json index 1c9187f..be1c232 100644 --- a/dist/manifest.json +++ b/dist/manifest.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, - "patcherVersion": "4.3.0", - "hash": "4509448a4c39c84d", + "patcherVersion": "4.4.0", + "hash": "9af20f1557abfe88", "rules": [ { "id": "singleton-exposure", @@ -52,6 +52,6 @@ "minMatches": 1 } ], - "prefix": "\n/** P-NP Patcher v4.3.0 — Prefix **/\nconst _getBox=(o,t)=>({string:\"+\",style:\"font-size: 1px; padding: 0 \"+Math.floor(o/2)+\"px; line-height: \"+t+\"px;\"});\nconsole.image=((o,t=1)=>{const e=new Image;e.onload=(()=>{const n=_getBox(e.width*t,e.height*t);\nconsole.log(\"%c\"+n.string,n.style+\"background: url(\"+o+\"); background-size: \"+e.width*t+\"px \"\n+e.height*t+\"px; color: transparent;\")}),e.src=o});\nconst _pnpOldLog = console.log.bind(console);\nconsole.log = (...d) => {\n if (d && d.length && typeof d[0] === \"string\" && d[0].includes(\"This is a browser feature for developers only\")) return \"lol no\";\n if (new Error().stack?.split(\"\\n\").reverse()[0]?.includes(\"load-identity\")) return \"denied\";\n return _pnpOldLog(...d);\n};\n/** Ensure window._ exists before game code (lodash may load separately) **/\nif (typeof window._ === 'undefined' || window._ === null) window._ = {};\nwindow.__PNP_ORIG_UNDERSCORE__ = window._;\nwindow._.variables = Object.create(null);\n/** Pre-init _.constants as empty obj with Map-like API so game-side patches don't crash\n * before the suffix wires up __PNP_CONSTANTS_RAW__. Real values populated post-game-load. **/\nif (!window._.constants) {\n var _c = Object.create(null);\n _c.get = function(k) { return _c[k]; };\n _c.set = function(k, v) { _c[k] = v; return _c; };\n _c.has = function(k) { return k in _c; };\n _c.constants = _c;\n window._.constants = _c;\n}\n\n/** Fix Inversify duplicate binding errors (e.g. \"Ambiguous match: MathTower\").\n * Some installers bind services to the GLOBAL gameContainer and can fire more\n * than once in the patched execution context. We define a helper that the\n * game-code patch below uses to safely bind (rebind if already bound). */\nwindow.__pnp_safeBind = function(container, id) {\n try {\n var inv = container._inversifyContainer || container;\n if (typeof inv.isBound === 'function' && inv.isBound(id)) {\n return (typeof container.rebind === 'function') ? container.rebind(id) : inv.rebind(id);\n }\n } catch(e) {}\n return container.bind(id);\n};\n\n/** Guard SW.Load.decrementLoadSemaphore against duplicate calls.\n * ROOT CAUSE: The old extension build (fetch+onreset approach) appends a second\n * SW.Load.decrementLoadSemaphore() call after the game code, AND the patcher\n * suffix calls it too → createGame() fires twice → all Inversify bind() calls\n * run twice on the same container → \"Ambiguous match found for MathTower\" crash.\n *\n * Fix: wrap the function so only the FIRST call triggers createGame().\n * This works for both old extension (fetch+onreset) and new extension (doc-rewrite). */\n/** Runtime service discovery — enumerate Inversify bindings and match by shape (duck-typing).\n * This replaces hardcoded service IDs that break every game update. */\nwindow.__pnp_discoverService = function(gc, shapeFn, label) {\n try {\n var map = gc._inversifyContainer._bindingDictionary._map;\n if (!map) return null;\n var hexPattern = /^[0-9a-f]{2,4}-[0-9a-f]{2,6}$/;\n var iter = map.keys();\n var next = iter.next();\n while (!next.done) {\n var id = next.value;\n next = iter.next();\n if (typeof id !== 'string' || !hexPattern.test(id)) continue;\n try {\n var inst = gc.get(id);\n if (inst && shapeFn(inst)) {\n console.log(\"[Play Origin] Discovered \" + label + \" \\u2192 \" + id);\n return inst;\n }\n } catch(e) {}\n }\n } catch(e) {\n console.warn(\"[Play Origin] Discovery failed for \" + label + \":\", e);\n }\n return null;\n};\n\nif (typeof SW !== 'undefined' && SW.Load && typeof SW.Load.decrementLoadSemaphore === 'function') {\n var _pnpOrigDecrement = SW.Load.decrementLoadSemaphore.bind(SW.Load);\n SW.Load.decrementLoadSemaphore = function() {\n if (window.__PNP_SEM_DECREMENTED__) {\n console.warn(\"[Play Origin] SW.Load.decrementLoadSemaphore() called twice — blocking duplicate createGame()\");\n return;\n }\n window.__PNP_SEM_DECREMENTED__ = true;\n return _pnpOrigDecrement();\n };\n}\n", - "suffix": "\n/** P-NP Patcher v4.3.0 — Suffix **/\n\n/* ── 1. Immediate: Signal game script loaded ── */\nSW.Load.decrementLoadSemaphore();\nconsole.log(\"%cP-NP Patcher\", \"font-size:40px;color:#540052;font-weight:900;font-family:sans-serif;\");\nconsole.log(\"%cVersion 4.3.0\", \"font-size:20px;color:#000025;font-weight:700;font-family:sans-serif;\");\nconsole.image((e => e[Math.floor(Math.random() * e.length)])([\"https://i.imgur.com/bPtAQ8I.png\",\"https://i.imgur.com/EVbS5zG.png\",\"https://i.imgur.com/ij1DgZi.png\",\"https://i.imgur.com/lJTWDu2.png\",\"https://i.imgur.com/EPAdHYN.png\",\"https://i.imgur.com/5S5Tr1t.png\",\"https://i.imgur.com/d3BGwnZ.png\",\"https://i.imgur.com/Thdxszk.png\",\"https://i.imgur.com/zpyv4TJ.png\",\"https://i.imgur.com/lHztg3K.png\",\"https://i.imgur.com/Odu0WDF.png\",\"https://i.imgur.com/ExRgzlL.png\",\"https://i.imgur.com/2tj8ArT.png\",\"https://i.imgur.com/JMVR4wZ.png\",\"https://i.imgur.com/QhybQ9J.png\",\"https://i.imgur.com/sFdJp9c.png\",\"https://i.imgur.com/N4XnUY6.png\",\"https://i.imgur.com/0ivwtH8.png\",\"https://i.imgur.com/qJJh7nf.png\",\"https://i.imgur.com/BTnE99I.png\",\"https://i.imgur.com/T0LEsCe.png\",\"https://i.imgur.com/Nh20Jwl.png\",\"https://i.imgur.com/MvV56er.png\",\"https://i.imgur.com/Jyd6Uuy.png\",\"https://i.imgur.com/a3Tfych.png\",\"https://i.imgur.com/oNZIEhl.png\",\"https://i.imgur.com/VEJxBcM.png\",\"https://i.imgur.com/5UvWETx.png\",\"https://i.imgur.com/Pt9u23U.png\",\"https://i.imgur.com/Q5nVNus.png\",\"https://i.imgur.com/bDtTVd4.png\",\"https://i.imgur.com/0xAJCAy.png\",\"https://i.imgur.com/2rm0eUH.png\",\"https://i.imgur.com/lrbPvoc.png\",\"https://i.imgur.com/2xz4muk.png\",\"https://i.imgur.com/vURg371.png\",\"https://i.imgur.com/woEnk7L.png\",\"https://i.imgur.com/NX4pThk.png\",\"https://i.imgur.com/qwIznNP.png\",\"https://i.imgur.com/hwPeqbQ.png\",\"https://i.imgur.com/c4kM2cV.png\",\"https://i.imgur.com/k3CTGox.png\",\"https://i.imgur.com/SidLEMT.png\",\"https://i.imgur.com/C7uQ4mr.png\",\"https://i.imgur.com/orHdDCF.png\",\"https://i.imgur.com/caJF6R6.png\",\"https://i.imgur.com/hPZtRjb.png\",\"https://i.imgur.com/rwlTCpQ.png\",\"https://i.imgur.com/r0gIjUt.png\",\"https://i.imgur.com/k4YfiWs.png\",\"https://i.imgur.com/R89VSXH.png\",\"https://i.imgur.com/5X4tgvR.png\",\"https://i.imgur.com/E79ZaFT.png\",\"https://i.imgur.com/rZEGd27.png\",\"https://i.imgur.com/v5pDXsL.png\",\"https://i.imgur.com/VEHoaR9.png\",\"https://i.imgur.com/qyKbB5L.png\",\"https://i.imgur.com/NG0rZgL.png\",\"https://i.imgur.com/l3UODvl.png\",\"https://i.imgur.com/fQFxBi5.png\",\"https://i.imgur.com/dybtFOP.png\",\"https://i.imgur.com/iPua2Dg.png\",\"https://i.imgur.com/pXK2yWH.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/iLC5pQW.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/iDM2afL.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/y2fa9gg.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/22a89fh.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/80ahwofi.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/q29pgra.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/39ahfaai.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/19jamaa.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/a92upaaa.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/q8r9pqh.png\"]));\n\n/* ── 2. Setup P-NP properties (waits for lodash if needed) ── */\n(function _pnpSetup() {\n function _applyProps() {\n const W = window;\n if (!W._) W._ = {};\n\n /* variables & functions namespaces */\n if (!W._.variables) W._.variables = Object.create(null);\n W._.functions = Object.create(null);\n\n /* _.instance → the prodigy singleton exposed by our constructor patch */\n Object.defineProperty(W._, \"instance\", {\n get: () => W.__PNP__,\n enumerable: true, configurable: true\n });\n\n /* _.constants → raw plain object with Map-compatible .get()/.set() + self-alias .constants\n * WHY: cheatGUI uses _.constants.constants[\"GameConstants.X\"] = val (plain object writes)\n * patcher game-side bypasses use _.constants.get(\"GameConstants.X\") (Map-like reads)\n * Both must work on the same underlying storage. We make _.constants the raw object\n * and bolt on get/set/has methods + a .constants self-alias so every call site works. */\n if (W.__PNP_CONSTANTS_RAW__) {\n var raw = W.__PNP_CONSTANTS_RAW__;\n /* bolt Map-like API onto the plain object */\n raw.get = function(key) { return raw[key]; };\n raw.set = function(key, val) { raw[key] = val; return raw; };\n raw.has = function(key) { return key in raw; };\n /* self-alias: _.constants.constants[\"GameConstants.X\"] = val */\n raw.constants = raw;\n W._.constants = raw;\n }\n\n /* _.player → discovered dynamically from DI container by shape.\n * Cache the SERVICE (stable ref), not the player object (.player getter\n * returns a new object each call). */\n Object.defineProperty(W._, \"player\", {\n get: function() {\n if (W.__PNP_PLAYER_SVC__) return W.__PNP_PLAYER_SVC__.player;\n try {\n var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer;\n if (!gc) return null;\n var svc = W.__pnp_discoverService(gc, function(inst) {\n try { var p = inst.player; return p && typeof p === 'object' && ('data' in p); }\n catch(e) { return false; }\n }, \"PlayerService\");\n if (svc) {\n W.__PNP_PLAYER_SVC__ = svc;\n return svc.player;\n }\n } catch(e) {}\n return null;\n },\n enumerable: true, configurable: true\n });\n\n /* _.gameData */\n Object.defineProperty(W._, \"gameData\", {\n get: () => {\n try { return W.__PNP__?.game?.state?.states?.get?.(\"Boot\")?._gameData; }\n catch(e) { return null; }\n },\n enumerable: true, configurable: true\n });\n\n /* _.localizer */\n Object.defineProperty(W._, \"localizer\", {\n get: () => {\n try { return W.__PNP__?.prodigy?.gameContainer?.get(\"LocalizationService\"); }\n catch(e) { return null; }\n },\n enumerable: true, configurable: true\n });\n\n /* _.network → discovered dynamically from DI container by shape */\n Object.defineProperty(W._, \"network\", {\n get: function() {\n if (W.__PNP_NETWORK__) return W.__PNP_NETWORK__;\n try {\n var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer;\n if (!gc) return null;\n var nm = W.__pnp_discoverService(gc, function(inst) {\n return typeof inst.getCharData === 'function'\n && ('processPlayer' in inst)\n && typeof inst.sendZoneEvent === 'function';\n }, \"NetworkManager\");\n if (nm && typeof nm === \"object\") {\n if (!nm.game) {\n Object.defineProperty(nm, \"game\", {\n get: function() { return W.__PNP__ && W.__PNP__.game; },\n enumerable: true, configurable: true\n });\n }\n W.__PNP_NETWORK__ = nm;\n return nm;\n }\n } catch(e) {}\n return null;\n },\n enumerable: true, configurable: true\n });\n\n /* _.hack → self-reference */\n Object.defineProperty(W._, \"hack\", {\n get: () => W._, enumerable: true, configurable: true\n });\n\n /* Escape battle helper — handles SecureBattleRevamp via BattleController */\n W._.functions.escapeBattle = () => {\n try {\n const g = W.__PNP__?.game;\n const currentState = g?.state?.current;\n if (currentState === \"PVP\") {\n g.state.states.PVP.endPVP();\n } else if (currentState === \"CoOp\") {\n W.__PNP__.prodigy.world.$(W._.player?.data?.zone);\n } else if (currentState === \"SecureBattleRevamp\") {\n const st = g.state.states.get(\"SecureBattleRevamp\");\n const bc = st?._battleController;\n if (bc?.escapeBattle) bc.escapeBattle();\n else g?.state?.callbackContext?.runAwayCallback();\n } else {\n g?.state?.callbackContext?.runAwayCallback();\n }\n } catch(e) { console.warn(\"[Play Origin] escapeBattle failed:\", e); }\n };\n\n /* _.membership → discovered by shape (isMember getter + hasFeatureAccess).\n * Service ID drifts per build; shape is stable. */\n Object.defineProperty(W._, \"membership\", {\n get: function() {\n if (W.__PNP_MEMBERSHIP__) return W.__PNP_MEMBERSHIP__;\n try {\n var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer;\n if (!gc) return null;\n var ms = W.__pnp_discoverService(gc, function(inst) {\n return inst && typeof inst.hasFeatureAccess === 'function'\n && 'isMember' in inst;\n }, \"MembershipService\");\n if (ms) { W.__PNP_MEMBERSHIP__ = ms; return ms; }\n } catch(e) {}\n return null;\n },\n enumerable: true, configurable: true\n });\n\n /* _.functions.setMembership(bool) — deep membership override.\n memberTier is derived from three hasFeatureAccess checks, so forcing it to return\n true auto-promotes to Ultra tier. We snapshot the original _data on first call so\n disable restores it. */\n W._.functions.setMembership = function(active) {\n var ms = W._.membership;\n if (!ms) return false;\n if (!W.__PNP_MEMBERSHIP_ORIG__) {\n W.__PNP_MEMBERSHIP_ORIG__ = { data: ms._data };\n }\n if (active) {\n var start = new Date(Date.now() - 86400000).toISOString();\n var end = new Date(Date.now() + 365 * 86400000 * 10).toISOString();\n ms._data = {\n active: true,\n features: [],\n membershipStartTs: start,\n membershipEndTs: end\n };\n Object.defineProperty(ms, \"hasFeatureAccess\", {\n value: function() { return true; },\n configurable: true, writable: true\n });\n try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {}\n try { W._.player && W._.player.unlockMemberItems && W._.player.unlockMemberItems(); } catch(e) {}\n } else {\n ms._data = W.__PNP_MEMBERSHIP_ORIG__.data;\n if (Object.getOwnPropertyDescriptor(ms, \"hasFeatureAccess\")) {\n delete ms.hasFeatureAccess;\n }\n try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {}\n }\n try { W._.player && (W._.player.appearanceChanged = true); } catch(e) {}\n return true;\n };\n\n if (!W.__PNP_PROPS_APPLIED__) {\n W.__PNP_PROPS_APPLIED__ = true;\n console.log(\"[Play Origin] Properties applied to window._\");\n }\n }\n\n /* Lodash loads as a SEPARATE script AFTER game.min.js.\n When it loads, it overwrites window._ entirely — and the game keeps\n reassigning window._ (chunks, runInContext, etc.) indefinitely.\n We PERMANENTLY poll and re-apply our properties whenever they're\n missing. The 500ms interval is negligible overhead. */\n _applyProps();\n\n setInterval(() => {\n try {\n const desc = Object.getOwnPropertyDescriptor(window._, 'instance');\n if (!desc || !desc.get || !window.__PNP__) {\n _applyProps();\n }\n /* Singleton auto-fix: the constructor may fire twice (onreset context).\n Our patch captures the first instance, but the REAL fully-initialized\n singleton (with #prodigy set) is stored on the class's static _instance.\n Detect the mismatch and update __PNP__ to the real one. */\n if (window.__PNP__ && !window.__PNP__.prodigy) {\n try {\n var ctor = Object.getPrototypeOf(window.__PNP__).constructor;\n if (ctor._instance && ctor._instance !== window.__PNP__ && ctor._instance.prodigy) {\n window.__PNP__ = ctor._instance;\n console.log(\"[Play Origin] Singleton auto-fixed to real instance (prodigy available)\");\n }\n } catch(e) {}\n }\n /* Trigger lazy discovery for player and network via their getters */\n if (!window.__PNP_PLAYER_SVC__ && window.__PNP__) {\n try { void window._.player; } catch(e) {}\n }\n if (!window.__PNP_NETWORK__ && window.__PNP__) {\n try { void window._.network; } catch(e) {}\n }\n } catch(e) { _applyProps(); }\n }, 500);\n})();\n\n/* ── 3. CheatGUI loader (delayed to ensure game is ready) ── */\nsetTimeout(() =>\n (async () => {\n try {\n eval(await (await fetch(\"https://raw.githubusercontent.com/ProdigyPXP/ProdigyOrigin/master/originGUI/dist/bundle.js\")).text());\n } catch(e) {\n console.error(\"[Play Origin] CheatGUI load failed:\", e);\n }\n })(), 15000);\nconsole.trace = () => {};\n" + "prefix": "\n/** P-NP Patcher v4.4.0 — Prefix **/\nconst _getBox=(o,t)=>({string:\"+\",style:\"font-size: 1px; padding: 0 \"+Math.floor(o/2)+\"px; line-height: \"+t+\"px;\"});\nconsole.image=((o,t=1)=>{const e=new Image;e.onload=(()=>{const n=_getBox(e.width*t,e.height*t);\nconsole.log(\"%c\"+n.string,n.style+\"background: url(\"+o+\"); background-size: \"+e.width*t+\"px \"\n+e.height*t+\"px; color: transparent;\")}),e.src=o});\nconst _pnpOldLog = console.log.bind(console);\nconsole.log = (...d) => {\n if (d && d.length && typeof d[0] === \"string\" && d[0].includes(\"This is a browser feature for developers only\")) return \"lol no\";\n if (new Error().stack?.split(\"\\n\").reverse()[0]?.includes(\"load-identity\")) return \"denied\";\n return _pnpOldLog(...d);\n};\n/** Ensure window._ exists before game code (lodash may load separately) **/\nif (typeof window._ === 'undefined' || window._ === null) window._ = {};\nwindow.__PNP_ORIG_UNDERSCORE__ = window._;\nwindow._.variables = Object.create(null);\n/** Pre-init _.constants as empty obj with Map-like API so game-side patches don't crash\n * before the suffix wires up __PNP_CONSTANTS_RAW__. Real values populated post-game-load. **/\nif (!window._.constants) {\n var _c = Object.create(null);\n _c.get = function(k) { return _c[k]; };\n _c.set = function(k, v) { _c[k] = v; return _c; };\n _c.has = function(k) { return k in _c; };\n _c.constants = _c;\n window._.constants = _c;\n}\n\n/** Fix Inversify duplicate binding errors (e.g. \"Ambiguous match: MathTower\").\n * Some installers bind services to the GLOBAL gameContainer and can fire more\n * than once in the patched execution context. We define a helper that the\n * game-code patch below uses to safely bind (rebind if already bound). */\nwindow.__pnp_safeBind = function(container, id) {\n try {\n var inv = container._inversifyContainer || container;\n if (typeof inv.isBound === 'function' && inv.isBound(id)) {\n return (typeof container.rebind === 'function') ? container.rebind(id) : inv.rebind(id);\n }\n } catch(e) {}\n return container.bind(id);\n};\n\n/** Guard SW.Load.decrementLoadSemaphore against duplicate calls.\n * ROOT CAUSE: The old extension build (fetch+onreset approach) appends a second\n * SW.Load.decrementLoadSemaphore() call after the game code, AND the patcher\n * suffix calls it too → createGame() fires twice → all Inversify bind() calls\n * run twice on the same container → \"Ambiguous match found for MathTower\" crash.\n *\n * Fix: wrap the function so only the FIRST call triggers createGame().\n * This works for both old extension (fetch+onreset) and new extension (doc-rewrite). */\n/** Runtime service discovery — enumerate Inversify bindings and match by shape (duck-typing).\n * This replaces hardcoded service IDs that break every game update. */\nwindow.__pnp_discoverService = function(gc, shapeFn, label) {\n try {\n var map = gc._inversifyContainer._bindingDictionary._map;\n if (!map) return null;\n var hexPattern = /^[0-9a-f]{2,4}-[0-9a-f]{2,6}$/;\n var iter = map.keys();\n var next = iter.next();\n while (!next.done) {\n var id = next.value;\n next = iter.next();\n if (typeof id !== 'string' || !hexPattern.test(id)) continue;\n try {\n var inst = gc.get(id);\n if (inst && shapeFn(inst)) {\n console.log(\"[Play Origin] Discovered \" + label + \" \\u2192 \" + id);\n return inst;\n }\n } catch(e) {}\n }\n } catch(e) {\n console.warn(\"[Play Origin] Discovery failed for \" + label + \":\", e);\n }\n return null;\n};\n\nif (typeof SW !== 'undefined' && SW.Load && typeof SW.Load.decrementLoadSemaphore === 'function') {\n var _pnpOrigDecrement = SW.Load.decrementLoadSemaphore.bind(SW.Load);\n SW.Load.decrementLoadSemaphore = function() {\n if (window.__PNP_SEM_DECREMENTED__) {\n console.warn(\"[Play Origin] SW.Load.decrementLoadSemaphore() called twice — blocking duplicate createGame()\");\n return;\n }\n window.__PNP_SEM_DECREMENTED__ = true;\n return _pnpOrigDecrement();\n };\n}\n", + "suffix": "\n/** P-NP Patcher v4.4.0 — Suffix **/\n\n/* ── 1. Immediate: Signal game script loaded ── */\nSW.Load.decrementLoadSemaphore();\nconsole.log(\"%cP-NP Patcher\", \"font-size:40px;color:#540052;font-weight:900;font-family:sans-serif;\");\nconsole.log(\"%cVersion 4.4.0\", \"font-size:20px;color:#000025;font-weight:700;font-family:sans-serif;\");\nconsole.image((e => e[Math.floor(Math.random() * e.length)])([\"https://i.imgur.com/bPtAQ8I.png\",\"https://i.imgur.com/EVbS5zG.png\",\"https://i.imgur.com/ij1DgZi.png\",\"https://i.imgur.com/lJTWDu2.png\",\"https://i.imgur.com/EPAdHYN.png\",\"https://i.imgur.com/5S5Tr1t.png\",\"https://i.imgur.com/d3BGwnZ.png\",\"https://i.imgur.com/Thdxszk.png\",\"https://i.imgur.com/zpyv4TJ.png\",\"https://i.imgur.com/lHztg3K.png\",\"https://i.imgur.com/Odu0WDF.png\",\"https://i.imgur.com/ExRgzlL.png\",\"https://i.imgur.com/2tj8ArT.png\",\"https://i.imgur.com/JMVR4wZ.png\",\"https://i.imgur.com/QhybQ9J.png\",\"https://i.imgur.com/sFdJp9c.png\",\"https://i.imgur.com/N4XnUY6.png\",\"https://i.imgur.com/0ivwtH8.png\",\"https://i.imgur.com/qJJh7nf.png\",\"https://i.imgur.com/BTnE99I.png\",\"https://i.imgur.com/T0LEsCe.png\",\"https://i.imgur.com/Nh20Jwl.png\",\"https://i.imgur.com/MvV56er.png\",\"https://i.imgur.com/Jyd6Uuy.png\",\"https://i.imgur.com/a3Tfych.png\",\"https://i.imgur.com/oNZIEhl.png\",\"https://i.imgur.com/VEJxBcM.png\",\"https://i.imgur.com/5UvWETx.png\",\"https://i.imgur.com/Pt9u23U.png\",\"https://i.imgur.com/Q5nVNus.png\",\"https://i.imgur.com/bDtTVd4.png\",\"https://i.imgur.com/0xAJCAy.png\",\"https://i.imgur.com/2rm0eUH.png\",\"https://i.imgur.com/lrbPvoc.png\",\"https://i.imgur.com/2xz4muk.png\",\"https://i.imgur.com/vURg371.png\",\"https://i.imgur.com/woEnk7L.png\",\"https://i.imgur.com/NX4pThk.png\",\"https://i.imgur.com/qwIznNP.png\",\"https://i.imgur.com/hwPeqbQ.png\",\"https://i.imgur.com/c4kM2cV.png\",\"https://i.imgur.com/k3CTGox.png\",\"https://i.imgur.com/SidLEMT.png\",\"https://i.imgur.com/C7uQ4mr.png\",\"https://i.imgur.com/orHdDCF.png\",\"https://i.imgur.com/caJF6R6.png\",\"https://i.imgur.com/hPZtRjb.png\",\"https://i.imgur.com/rwlTCpQ.png\",\"https://i.imgur.com/r0gIjUt.png\",\"https://i.imgur.com/k4YfiWs.png\",\"https://i.imgur.com/R89VSXH.png\",\"https://i.imgur.com/5X4tgvR.png\",\"https://i.imgur.com/E79ZaFT.png\",\"https://i.imgur.com/rZEGd27.png\",\"https://i.imgur.com/v5pDXsL.png\",\"https://i.imgur.com/VEHoaR9.png\",\"https://i.imgur.com/qyKbB5L.png\",\"https://i.imgur.com/NG0rZgL.png\",\"https://i.imgur.com/l3UODvl.png\",\"https://i.imgur.com/fQFxBi5.png\",\"https://i.imgur.com/dybtFOP.png\",\"https://i.imgur.com/iPua2Dg.png\",\"https://i.imgur.com/pXK2yWH.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/iLC5pQW.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/iDM2afL.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/y2fa9gg.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/22a89fh.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/80ahwofi.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/q29pgra.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/39ahfaai.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/19jamaa.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/a92upaaa.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/q8r9pqh.png\"]));\n\n/* ── 2. Setup P-NP properties (waits for lodash if needed) ── */\n(function _pnpSetup() {\n function _applyProps() {\n const W = window;\n if (!W._) W._ = {};\n\n /* variables & functions namespaces */\n if (!W._.variables) W._.variables = Object.create(null);\n W._.functions = Object.create(null);\n\n /* _.instance → the prodigy singleton exposed by our constructor patch */\n Object.defineProperty(W._, \"instance\", {\n get: () => W.__PNP__,\n enumerable: true, configurable: true\n });\n\n /* _.constants → raw plain object with Map-compatible .get()/.set() + self-alias .constants\n * WHY: cheatGUI uses _.constants.constants[\"GameConstants.X\"] = val (plain object writes)\n * patcher game-side bypasses use _.constants.get(\"GameConstants.X\") (Map-like reads)\n * Both must work on the same underlying storage. We make _.constants the raw object\n * and bolt on get/set/has methods + a .constants self-alias so every call site works. */\n if (W.__PNP_CONSTANTS_RAW__) {\n var raw = W.__PNP_CONSTANTS_RAW__;\n /* bolt Map-like API onto the plain object */\n raw.get = function(key) { return raw[key]; };\n raw.set = function(key, val) { raw[key] = val; return raw; };\n raw.has = function(key) { return key in raw; };\n /* self-alias: _.constants.constants[\"GameConstants.X\"] = val */\n raw.constants = raw;\n W._.constants = raw;\n }\n\n /* _.player → discovered dynamically from DI container by shape.\n * Cache the SERVICE (stable ref), not the player object (.player getter\n * returns a new object each call). */\n Object.defineProperty(W._, \"player\", {\n get: function() {\n if (W.__PNP_PLAYER_SVC__) return W.__PNP_PLAYER_SVC__.player;\n try {\n var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer;\n if (!gc) return null;\n var svc = W.__pnp_discoverService(gc, function(inst) {\n try { var p = inst.player; return p && typeof p === 'object' && ('data' in p); }\n catch(e) { return false; }\n }, \"PlayerService\");\n if (svc) {\n W.__PNP_PLAYER_SVC__ = svc;\n return svc.player;\n }\n } catch(e) {}\n return null;\n },\n enumerable: true, configurable: true\n });\n\n /* _.gameData */\n Object.defineProperty(W._, \"gameData\", {\n get: () => {\n try { return W.__PNP__?.game?.state?.states?.get?.(\"Boot\")?._gameData; }\n catch(e) { return null; }\n },\n enumerable: true, configurable: true\n });\n\n /* _.localizer */\n Object.defineProperty(W._, \"localizer\", {\n get: () => {\n try { return W.__PNP__?.prodigy?.gameContainer?.get(\"LocalizationService\"); }\n catch(e) { return null; }\n },\n enumerable: true, configurable: true\n });\n\n /* _.network → discovered dynamically from DI container by shape */\n Object.defineProperty(W._, \"network\", {\n get: function() {\n if (W.__PNP_NETWORK__) return W.__PNP_NETWORK__;\n try {\n var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer;\n if (!gc) return null;\n var nm = W.__pnp_discoverService(gc, function(inst) {\n return typeof inst.getCharData === 'function'\n && ('processPlayer' in inst)\n && typeof inst.sendZoneEvent === 'function';\n }, \"NetworkManager\");\n if (nm && typeof nm === \"object\") {\n if (!nm.game) {\n Object.defineProperty(nm, \"game\", {\n get: function() { return W.__PNP__ && W.__PNP__.game; },\n enumerable: true, configurable: true\n });\n }\n W.__PNP_NETWORK__ = nm;\n return nm;\n }\n } catch(e) {}\n return null;\n },\n enumerable: true, configurable: true\n });\n\n /* _.hack → self-reference */\n Object.defineProperty(W._, \"hack\", {\n get: () => W._, enumerable: true, configurable: true\n });\n\n /* Escape battle helper — handles SecureBattleRevamp via BattleController */\n W._.functions.escapeBattle = () => {\n try {\n const g = W.__PNP__?.game;\n const currentState = g?.state?.current;\n if (currentState === \"PVP\") {\n g.state.states.PVP.endPVP();\n } else if (currentState === \"CoOp\") {\n W.__PNP__.prodigy.world.$(W._.player?.data?.zone);\n } else if (currentState === \"SecureBattleRevamp\") {\n const st = g.state.states.get(\"SecureBattleRevamp\");\n const bc = st?._battleController;\n if (bc?.escapeBattle) bc.escapeBattle();\n else g?.state?.callbackContext?.runAwayCallback();\n } else {\n g?.state?.callbackContext?.runAwayCallback();\n }\n } catch(e) { console.warn(\"[Play Origin] escapeBattle failed:\", e); }\n };\n\n /* _.membership → discovered by shape (isMember getter + hasFeatureAccess).\n * Service ID drifts per build; shape is stable. */\n Object.defineProperty(W._, \"membership\", {\n get: function() {\n if (W.__PNP_MEMBERSHIP__) return W.__PNP_MEMBERSHIP__;\n try {\n var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer;\n if (!gc) return null;\n var ms = W.__pnp_discoverService(gc, function(inst) {\n return inst && typeof inst.hasFeatureAccess === 'function'\n && 'isMember' in inst;\n }, \"MembershipService\");\n if (ms) { W.__PNP_MEMBERSHIP__ = ms; return ms; }\n } catch(e) {}\n return null;\n },\n enumerable: true, configurable: true\n });\n\n /* _.functions.setMembership(bool) — deep membership override.\n memberTier is derived from three hasFeatureAccess checks, so forcing it to return\n true auto-promotes to Ultra tier. We snapshot the original _data on first call so\n disable restores it. */\n W._.functions.setMembership = function(active) {\n var ms = W._.membership;\n if (!ms) return false;\n if (!W.__PNP_MEMBERSHIP_ORIG__) {\n W.__PNP_MEMBERSHIP_ORIG__ = { data: ms._data };\n }\n if (active) {\n var start = new Date(Date.now() - 86400000).toISOString();\n var end = new Date(Date.now() + 365 * 86400000 * 10).toISOString();\n ms._data = {\n active: true,\n features: [],\n membershipStartTs: start,\n membershipEndTs: end\n };\n Object.defineProperty(ms, \"hasFeatureAccess\", {\n value: function() { return true; },\n configurable: true, writable: true\n });\n try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {}\n try { W._.player && W._.player.unlockMemberItems && W._.player.unlockMemberItems(); } catch(e) {}\n } else {\n ms._data = W.__PNP_MEMBERSHIP_ORIG__.data;\n if (Object.getOwnPropertyDescriptor(ms, \"hasFeatureAccess\")) {\n delete ms.hasFeatureAccess;\n }\n try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {}\n }\n try { W._.player && (W._.player.appearanceChanged = true); } catch(e) {}\n return true;\n };\n\n if (!W.__PNP_PROPS_APPLIED__) {\n W.__PNP_PROPS_APPLIED__ = true;\n console.log(\"[Play Origin] Properties applied to window._\");\n }\n }\n\n /* Lodash loads as a SEPARATE script AFTER game.min.js.\n When it loads, it overwrites window._ entirely — and the game keeps\n reassigning window._ (chunks, runInContext, etc.) indefinitely.\n We PERMANENTLY poll and re-apply our properties whenever they're\n missing. The 500ms interval is negligible overhead. */\n _applyProps();\n\n setInterval(() => {\n try {\n const desc = Object.getOwnPropertyDescriptor(window._, 'instance');\n if (!desc || !desc.get || !window.__PNP__) {\n _applyProps();\n }\n /* Singleton auto-fix: the constructor may fire twice (onreset context).\n Our patch captures the first instance, but the REAL fully-initialized\n singleton (with #prodigy set) is stored on the class's static _instance.\n Detect the mismatch and update __PNP__ to the real one. */\n if (window.__PNP__ && !window.__PNP__.prodigy) {\n try {\n var ctor = Object.getPrototypeOf(window.__PNP__).constructor;\n if (ctor._instance && ctor._instance !== window.__PNP__ && ctor._instance.prodigy) {\n window.__PNP__ = ctor._instance;\n console.log(\"[Play Origin] Singleton auto-fixed to real instance (prodigy available)\");\n }\n } catch(e) {}\n }\n /* Trigger lazy discovery for player and network via their getters */\n if (!window.__PNP_PLAYER_SVC__ && window.__PNP__) {\n try { void window._.player; } catch(e) {}\n }\n if (!window.__PNP_NETWORK__ && window.__PNP__) {\n try { void window._.network; } catch(e) {}\n }\n } catch(e) { _applyProps(); }\n }, 500);\n})();\n\n/* ── 3. CheatGUI loader (delayed to ensure game is ready) ── */\nsetTimeout(() =>\n (async () => {\n try {\n eval(await (await fetch(\"https://raw.githubusercontent.com/ProdigyPXP/ProdigyOrigin/master/originGUI/dist/bundle.js\")).text());\n } catch(e) {\n console.error(\"[Play Origin] CheatGUI load failed:\", e);\n }\n })(), 15000);\nconsole.trace = () => {};\n" } diff --git a/dist/metadata.json b/dist/metadata.json index 0847e65..14a5514 100644 --- a/dist/metadata.json +++ b/dist/metadata.json @@ -1,11 +1,11 @@ { - "generatedAt": "2026-05-24T09:04:05.416Z", - "patcherVersion": "4.3.0", + "generatedAt": "2026-05-24T19:13:33.212Z", + "patcherVersion": "4.4.0", "gameVersion": "2026.25.0", "publicGameHash": null, "loadGamePath": "/js/load-game-f2baaaba58.min.js", "patchDegraded": false, - "manifestHash": "4509448a4c39c84d", + "manifestHash": "9af20f1557abfe88", "perRuleCounts": { "singleton-exposure": 1, "safe-bind": 9, diff --git a/src/constants.ts b/src/constants.ts index 94c25ca..0c7d65a 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,4 +1,4 @@ -export const VERSION = "4.3.0"; +export const VERSION = "4.4.0"; export const GUI_LINK = "https://raw.githubusercontent.com/ProdigyPXP/ProdigyOrigin/master/originGUI/dist/bundle.js"; export const PRODIGY_LOAD_URL = "https://math.prodigygame.com/load"; export const PRODIGY_CODE_ORIGIN = "https://code.prodigygame.com"; From a016b5e5a32a8d8c8f993d573b26ff0a7c4507fd Mon Sep 17 00:00:00 2001 From: Alexey Fedorov Date: Sun, 24 May 2026 12:16:42 -0700 Subject: [PATCH 08/16] test(p-np): integration test for rules + wrappers + manifest pipeline Co-Authored-By: Claude Sonnet 4.6 --- tests/integration.test.ts | 53 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 tests/integration.test.ts diff --git a/tests/integration.test.ts b/tests/integration.test.ts new file mode 100644 index 0000000..9d941ab --- /dev/null +++ b/tests/integration.test.ts @@ -0,0 +1,53 @@ +import { describe, it } from "node:test"; +import assert from "node:assert/strict"; +import { RULES, applyRules } from "../src/patches.ts"; +import { buildPrefix, buildSuffix } from "../src/wrappers.ts"; +import { buildManifest } from "../src/manifest.ts"; + +// Synthetic mini-bundle exhibiting all patch sites we care about. +const FIXTURE = ` +class Prodigy{constructor(E){_instance=this),this._game=E}destroy(){this._prodigy=null}} +class GC{thing(){return A.q.instance.prodigy.gameContainer.bind("MathTower").to(X);}} +var M={};M.constants={"GameConstants.Build.VERSION":"2026.18.1","GameConstants.Debug.EDUCATION_ENABLED":false}; +class Q{answerQuestion(){if(!this._isOpen){return this._dispatch();}}} +class EF{run(){const Z=this.findParameter("externalFactory");return Z();}} +class OQ{openQuestionInterfaceThenEmitNotifications(a,b,c,d,e){this._education.fire();}} +`; + +describe("integration — full pipeline on synthetic bundle", () => { + it("apply rules → wrap → manifest pipeline produces expected output", () => { + const { output: patched, perRuleCounts } = applyRules(FIXTURE, RULES); + + for (const rule of RULES) { + assert.ok( + (perRuleCounts[rule.id] ?? 0) >= rule.minMatches, + `rule ${rule.id} matched ${perRuleCounts[rule.id]} times, needs ${rule.minMatches}` + ); + } + + const prefix = buildPrefix("4.4.0"); + const suffix = buildSuffix("4.4.0", "https://x/y.js", ["https://img/1.png"]); + const wrapped = `${prefix}\n${patched}\n${suffix}`; + + assert.ok(wrapped.includes("window.__PNP__=this")); + assert.ok(wrapped.includes("window.__pnp_safeBind")); + assert.ok(wrapped.includes("__PNP_CONSTANTS_RAW__")); + assert.ok(wrapped.includes("AUTO_ANSWER_CORRECT_PERCENT")); + assert.ok(wrapped.includes("P-NP Patcher v4.4.0 — Prefix")); + assert.ok(wrapped.includes("P-NP Patcher v4.4.0 — Suffix")); + + const manifest = buildManifest({ + patcherVersion: "4.4.0", + rules: RULES, + prefix, + suffix + }); + + assert.equal(manifest.schemaVersion, 1); + assert.equal(manifest.patcherVersion, "4.4.0"); + assert.match(manifest.hash, /^[0-9a-f]{16}$/); + assert.equal(manifest.rules.length, RULES.length); + assert.equal(manifest.prefix, prefix); + assert.equal(manifest.suffix, suffix); + }); +}); From c78f8042fdcb25b1973f69ed85f4cf87e168501a Mon Sep 17 00:00:00 2001 From: Alexey Fedorov Date: Sun, 24 May 2026 12:17:35 -0700 Subject: [PATCH 09/16] ci(p-np): add dist/manifest.json to commit list --- .github/workflows/patch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index 3a27fde..b5b0b12 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -54,7 +54,7 @@ jobs: git config user.email "41898282+github-actions[bot]@users.noreply.github.com" git config user.name "github-actions[bot]" - git add dist/game.min.js dist/metadata.json + git add dist/manifest.json dist/game.min.js dist/metadata.json git add dist/public-game.min.js 2>/dev/null || true if git diff --cached --quiet; then From 8a2b222e4e92462a2ac7db5d01a4cd77c9c5b8f2 Mon Sep 17 00:00:00 2001 From: Alexey Fedorov Date: Sun, 24 May 2026 12:18:24 -0700 Subject: [PATCH 10/16] docs(p-np): document client-side patching architecture (v4.4.0) --- CLAUDE.md | 12 ++++++++---- README.md | 16 ++++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 2402755..a53ee83 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -10,7 +10,10 @@ The Play Origin extension (in `ProdigyPXP/ProdigyOrigin`, formerly "Prodigy Orig ### Architecture -- **src/patch.ts** — Core patcher. Fetches game files, applies regex-based patches, writes output. +- **src/patch.ts** — Orchestrator. Fetches game files, runs rules via `src/patches.ts` for VERIFICATION, builds the prefix/suffix via `src/wrappers.ts`, assembles `dist/manifest.json` (primary artifact) + `dist/game.min.js` (verification copy) + `dist/metadata.json`. +- **src/patches.ts** — `PatchRule` type, `RULES` array, `applyRules`, `hashRules`. +- **src/wrappers.ts** — `buildPrefix(version)`, `buildSuffix(version, guiLink, displayImages)`. +- **src/manifest.ts** — `Manifest` type, `buildManifest`, `hashManifest`. - **src/constants.ts** — URLs, version, GUI link. - **src/displayImages.ts** — Console splash images. - **build.mjs** — esbuild build script. @@ -45,6 +48,7 @@ node dist/patch.js # Run patcher locally ## Output The patcher writes to the output directory: -- `game.min.js` — Patched game with injected hack entry points -- `metadata.json` — Build metadata (version, hash, degraded status) -- `public-game.min.js` — Patched public game file (if available) +- `manifest.json` — **Primary artifact.** Consumed by the Play Origin extension. +- `game.min.js` — Verification copy of the patched bundle (not loaded by the extension at runtime). +- `metadata.json` — Per-run metadata: version, hash, perRuleCounts, degraded status. +- `public-game.min.js` — Patched public game file (if available). diff --git a/README.md b/README.md index b4aff2e..1421751 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,22 @@ P-NP is the static patch pipeline that powers **Play Origin** (the browser-exten The repository no longer runs an HTTP server. Instead, a GitHub Action fetches current Prodigy assets, applies the patcher logic, and pushes the patched files to a dedicated `patched` branch so they can be served from `raw.githubusercontent.com`. +## Architecture (v4.4.0+) + +The patcher's primary artifact is `dist/manifest.json` — a small JSON file containing: + +- `rules` — ordered list of regex find/replace rules applied to `game.min.js`. +- `prefix` — pre-rendered JS string prepended to the patched game. +- `suffix` — pre-rendered JS string appended after the patched game. +- `hash` — content hash of `{rules, prefix, suffix}` for cache invalidation. + +The Play Origin extension fetches this manifest, fetches the original `game.min.js` +from `code.prodigygame.com`, applies the rules locally in its background service +worker, wraps with prefix/suffix, and caches the result in `chrome.storage.local`. + +`dist/game.min.js` is still produced as a verification copy so this repo's history +stays auditable, but the extension no longer fetches it. + ## How It Works 1. `.github/workflows/patch.yml` runs every 2 hours (cron) and on manual dispatch. From 1ba9ee9e55050fbcd1ecf3af5f14e6062f6d98b6 Mon Sep 17 00:00:00 2001 From: Alexey Fedorov Date: Sun, 24 May 2026 12:47:38 -0700 Subject: [PATCH 11/16] chore(p-np): refresh dist artifacts Co-Authored-By: Claude Sonnet 4.6 --- dist/metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/metadata.json b/dist/metadata.json index 14a5514..ecc6dd2 100644 --- a/dist/metadata.json +++ b/dist/metadata.json @@ -1,5 +1,5 @@ { - "generatedAt": "2026-05-24T19:13:33.212Z", + "generatedAt": "2026-05-24T19:47:21.595Z", "patcherVersion": "4.4.0", "gameVersion": "2026.25.0", "publicGameHash": null, From 924135f2815cf0a2962076086e421adea4c1782c Mon Sep 17 00:00:00 2001 From: Alexey Fedorov Date: Sun, 24 May 2026 13:30:58 -0700 Subject: [PATCH 12/16] refactor(patcher): drop guiLink param from buildSuffix; use global The mod-bundle URL is now supplied at runtime by the extension via window.__ORIGIN_MENU_URL__. This unblocks per-user override from the extension popup without rebuilding the manifest. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/wrappers.ts | 12 +++++++++--- tests/wrappers.test.ts | 38 +++++++++++++++++++++++--------------- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/src/wrappers.ts b/src/wrappers.ts index ea187bf..b5f9a76 100644 --- a/src/wrappers.ts +++ b/src/wrappers.ts @@ -91,7 +91,6 @@ if (typeof SW !== 'undefined' && SW.Load && typeof SW.Load.decrementLoadSemaphor export const buildSuffix = ( version: string, - guiLink: string, displayImages: ReadonlyArray ): string => { return ` @@ -327,11 +326,18 @@ console.image((e => e[Math.floor(Math.random() * e.length)])(${JSON.stringify(di }, 500); })(); -/* ── 3. CheatGUI loader (delayed to ensure game is ready) ── */ +/* ── 3. CheatGUI loader (delayed to ensure game is ready) ── + * URL is supplied by the extension via window.__ORIGIN_MENU_URL__. + * The extension resolves: popup override → manifest.defaultMenuUrl. */ setTimeout(() => (async () => { try { - eval(await (await fetch("${guiLink}")).text()); + var url = window.__ORIGIN_MENU_URL__; + if (typeof url !== "string" || url.length === 0) { + console.warn("[Play Origin] No menu URL set (window.__ORIGIN_MENU_URL__ missing). Mod bundle skipped."); + return; + } + eval(await (await fetch(url)).text()); } catch(e) { console.error("[Play Origin] CheatGUI load failed:", e); } diff --git a/tests/wrappers.test.ts b/tests/wrappers.test.ts index d8f5b16..298abfd 100644 --- a/tests/wrappers.test.ts +++ b/tests/wrappers.test.ts @@ -1,4 +1,4 @@ -import { describe, it } from "node:test"; +import { describe, it, test } from "node:test"; import assert from "node:assert/strict"; import { buildPrefix, buildSuffix } from "../src/wrappers.ts"; @@ -40,51 +40,59 @@ describe("buildPrefix", () => { describe("buildSuffix", () => { it("returns a string", () => { - assert.equal(typeof buildSuffix("4.4.0", "https://example.com/bundle.js", ["https://img/1.png"]), "string"); + assert.equal(typeof buildSuffix("4.4.0", ["https://img/1.png"]), "string"); }); it("interpolates the version into the patcher header", () => { - const out = buildSuffix("4.4.0", "https://example.com/bundle.js", []); + const out = buildSuffix("4.4.0", []); assert.ok(out.includes("P-NP Patcher v4.4.0 — Suffix")); }); - it("interpolates the GUI link verbatim into the loader fetch", () => { - const guiLink = "https://raw.githubusercontent.com/foo/bar/main/dist/bundle.js"; - const out = buildSuffix("4.4.0", guiLink, []); - assert.ok(out.includes(guiLink)); - }); - it("serializes displayImages as a JSON array literal in console.image", () => { - const out = buildSuffix("4.4.0", "https://x/y.js", ["https://a/1.png", "https://b/2.png"]); + const out = buildSuffix("4.4.0", ["https://a/1.png", "https://b/2.png"]); assert.ok(out.includes(JSON.stringify(["https://a/1.png", "https://b/2.png"]))); }); it("calls SW.Load.decrementLoadSemaphore at the top", () => { - const out = buildSuffix("4.4.0", "https://x/y.js", []); + const out = buildSuffix("4.4.0", []); assert.ok(out.includes("SW.Load.decrementLoadSemaphore()")); }); it("schedules the CheatGUI loader via setTimeout(15000)", () => { - const out = buildSuffix("4.4.0", "https://x/y.js", []); + const out = buildSuffix("4.4.0", []); assert.ok(/setTimeout\b/.test(out)); assert.ok(/,\s*15000\)/.test(out)); }); it("polls every 500ms to re-apply window._ properties", () => { - const out = buildSuffix("4.4.0", "https://x/y.js", []); + const out = buildSuffix("4.4.0", []); assert.ok(/setInterval\b/.test(out)); assert.ok(/,\s*500\)/.test(out)); }); it("exposes _.player via discovery", () => { - const out = buildSuffix("4.4.0", "https://x/y.js", []); + const out = buildSuffix("4.4.0", []); assert.ok(out.includes("PlayerService")); assert.ok(out.includes("_.player") || out.includes('"player"')); }); it("exposes _.membership via discovery + setMembership helper", () => { - const out = buildSuffix("4.4.0", "https://x/y.js", []); + const out = buildSuffix("4.4.0", []); assert.ok(out.includes("MembershipService")); assert.ok(out.includes("setMembership")); }); + + test("buildSuffix references window.__ORIGIN_MENU_URL__ instead of baking a URL", () => { + const suffix = buildSuffix("4.4.1", ["https://example.com/img.png"]); + assert.match(suffix, /window\.__ORIGIN_MENU_URL__/); + assert.doesNotMatch(suffix, /raw\.githubusercontent\.com\/ProdigyPXP\/ProdigyOrigin/); + assert.doesNotMatch(suffix, /https?:\/\/[^"]*bundle\.js/); + }); + + test("buildSuffix interpolates version and displayImages", () => { + const suffix = buildSuffix("9.9.9", ["https://example.com/a.png", "https://example.com/b.png"]); + assert.match(suffix, /Version 9\.9\.9/); + assert.match(suffix, /https:\/\/example\.com\/a\.png/); + assert.match(suffix, /https:\/\/example\.com\/b\.png/); + }); }); From d22d1c706ad02015947a4a264e32d41e50635808 Mon Sep 17 00:00:00 2001 From: Alexey Fedorov Date: Sun, 24 May 2026 13:33:01 -0700 Subject: [PATCH 13/16] feat(patcher): add defaultMenuUrl to manifest schema + hash defaultMenuUrl is the URL the patched bundle fetches for the mod (cheatGUI) loader at runtime. It is included in the manifest hash so that changes invalidate extension caches. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/manifest.ts | 12 ++++-- tests/manifest.test.ts | 95 +++++++++++++++--------------------------- 2 files changed, 42 insertions(+), 65 deletions(-) diff --git a/src/manifest.ts b/src/manifest.ts index 99bb988..cf630cb 100644 --- a/src/manifest.ts +++ b/src/manifest.ts @@ -8,14 +8,16 @@ export type Manifest = { rules: ReadonlyArray; prefix: string; suffix: string; + defaultMenuUrl: string; }; export const hashManifest = ( rules: ReadonlyArray, prefix: string, - suffix: string + suffix: string, + defaultMenuUrl: string ): string => { - const canonical = JSON.stringify({ rules, prefix, suffix }); + const canonical = JSON.stringify({ rules, prefix, suffix, defaultMenuUrl }); return createHash("sha256").update(canonical).digest("hex").slice(0, 16); }; @@ -24,11 +26,13 @@ export const buildManifest = (input: { rules: ReadonlyArray; prefix: string; suffix: string; + defaultMenuUrl: string; }): Manifest => ({ schemaVersion: 1, patcherVersion: input.patcherVersion, - hash: hashManifest(input.rules, input.prefix, input.suffix), + hash: hashManifest(input.rules, input.prefix, input.suffix, input.defaultMenuUrl), rules: input.rules, prefix: input.prefix, - suffix: input.suffix + suffix: input.suffix, + defaultMenuUrl: input.defaultMenuUrl }); diff --git a/tests/manifest.test.ts b/tests/manifest.test.ts index 43a58fa..f204779 100644 --- a/tests/manifest.test.ts +++ b/tests/manifest.test.ts @@ -1,66 +1,39 @@ -import { describe, it } from "node:test"; +import test from "node:test"; import assert from "node:assert/strict"; -import { buildManifest, hashManifest, type Manifest } from "../src/manifest.ts"; -import { RULES } from "../src/patches.ts"; - -describe("buildManifest", () => { - it("produces a Manifest with schemaVersion=1", () => { - const m = buildManifest({ - patcherVersion: "4.4.0", - rules: RULES, - prefix: "PREFIX", - suffix: "SUFFIX" - }); - assert.equal(m.schemaVersion, 1); - }); - - it("includes patcherVersion verbatim", () => { - const m = buildManifest({ - patcherVersion: "9.9.9", - rules: RULES, - prefix: "P", - suffix: "S" - }); - assert.equal(m.patcherVersion, "9.9.9"); - }); - - it("attaches the hash field as a 16-char hex string", () => { - const m = buildManifest({ - patcherVersion: "4.4.0", - rules: RULES, - prefix: "P", - suffix: "S" - }); - assert.equal(m.hash.length, 16); - assert.match(m.hash, /^[0-9a-f]{16}$/); - }); - - it("the hash field equals hashManifest(rules, prefix, suffix)", () => { - const m = buildManifest({ - patcherVersion: "4.4.0", - rules: RULES, - prefix: "P", - suffix: "S" - }); - assert.equal(m.hash, hashManifest(RULES, "P", "S")); - }); +import { buildManifest, hashManifest } from "../src/manifest.ts"; + +const RULE = { + id: "demo", + description: "demo rule", + find: "abc", + flags: "g", + replace: "xyz", + minMatches: 1 +}; + +test("buildManifest includes defaultMenuUrl", () => { + const m = buildManifest({ + patcherVersion: "9.9.9", + rules: [RULE], + prefix: "P", + suffix: "S", + defaultMenuUrl: "https://example.com/bundle.js" + }); + assert.equal(m.schemaVersion, 1); + assert.equal(m.patcherVersion, "9.9.9"); + assert.equal(m.defaultMenuUrl, "https://example.com/bundle.js"); + assert.equal(typeof m.hash, "string"); + assert.equal(m.hash.length, 16); }); -describe("hashManifest", () => { - it("is deterministic", () => { - assert.equal(hashManifest(RULES, "P", "S"), hashManifest(RULES, "P", "S")); - }); - - it("changes when prefix changes", () => { - assert.notEqual(hashManifest(RULES, "P1", "S"), hashManifest(RULES, "P2", "S")); - }); - - it("changes when suffix changes", () => { - assert.notEqual(hashManifest(RULES, "P", "S1"), hashManifest(RULES, "P", "S2")); - }); +test("hashManifest changes when defaultMenuUrl changes", () => { + const a = hashManifest([RULE], "P", "S", "https://example.com/a.js"); + const b = hashManifest([RULE], "P", "S", "https://example.com/b.js"); + assert.notEqual(a, b, "hash must include defaultMenuUrl"); +}); - it("changes when rules change", () => { - const empty: Manifest["rules"] = []; - assert.notEqual(hashManifest(RULES, "P", "S"), hashManifest(empty, "P", "S")); - }); +test("hashManifest stable across equal inputs", () => { + const a = hashManifest([RULE], "P", "S", "https://example.com/x.js"); + const b = hashManifest([RULE], "P", "S", "https://example.com/x.js"); + assert.equal(a, b); }); From a38c508946d4ae0f6480ef52e7ca54f96f92b12d Mon Sep 17 00:00:00 2001 From: Alexey Fedorov Date: Sun, 24 May 2026 13:35:27 -0700 Subject: [PATCH 14/16] feat(patcher): orchestrator emits defaultMenuUrl; bump to 4.4.1 manifest.json now ships defaultMenuUrl=GUI_LINK and the suffix no longer bakes in the URL. dist artifacts regenerated against current game version. Co-Authored-By: Claude Opus 4.7 (1M context) --- dist/game.min.js | 17 ++++++++++++----- dist/manifest.json | 9 +++++---- dist/metadata.json | 6 +++--- package.json | 2 +- src/constants.ts | 2 +- src/patch.ts | 13 ++++++++++--- tests/integration.test.ts | 33 +++++++++++++++++++++++++-------- 7 files changed, 57 insertions(+), 25 deletions(-) diff --git a/dist/game.min.js b/dist/game.min.js index b7bd32b..11f0a79 100644 --- a/dist/game.min.js +++ b/dist/game.min.js @@ -1,7 +1,7 @@ // game.min.js v2026.25.0 (verification copy — extension uses manifest.json) -/** P-NP Patcher v4.4.0 — Prefix **/ +/** P-NP Patcher v4.4.1 — Prefix **/ const _getBox=(o,t)=>({string:"+",style:"font-size: 1px; padding: 0 "+Math.floor(o/2)+"px; line-height: "+t+"px;"}); console.image=((o,t=1)=>{const e=new Image;e.onload=(()=>{const n=_getBox(e.width*t,e.height*t); console.log("%c"+n.string,n.style+"background: url("+o+"); background-size: "+e.width*t+"px " @@ -92,12 +92,12 @@ if (typeof SW !== 'undefined' && SW.Load && typeof SW.Load.decrementLoadSemaphor try{let k="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},B=(new k.Error).stack;B&&(k._sentryDebugIds=k._sentryDebugIds||{},k._sentryDebugIds[B]="f947ccf2-3be2-4d46-b53d-563d22a1a5ed",k._sentryDebugIdIdentifier="sentry-dbid-f947ccf2-3be2-4d46-b53d-563d22a1a5ed")}catch(e){}{let k="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};k._sentryModuleMetadata=k._sentryModuleMetadata||{},k._sentryModuleMetadata[(new k.Error).stack]=Object.assign({},k._sentryModuleMetadata[(new k.Error).stack],{dsn:"https://a84188f8494e47ea9adc6469ec4f4deb@o94449.ingest.us.sentry.io/1217080",release:"2026.25.0",project:"prodigy-game"})}{let k="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};k.SENTRY_RELEASE={id:"2026.25.0"}}(()=>{var __webpack_modules__={51151:function(k,B,U){var F,G,j;G=[U(26946)],void 0===(j="function"==typeof(F=function(k){"use strict";var B=k.Reader,U=k.Writer,F=k.util,G=k.roots.default||(k.roots.default={});return G.Spell=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.id=k.int32();break;case 2:j.element=k.string();break;case 3:j.tier=k.int32();break;case 4:j.energyCost=k.int32();break;case 5:j.target=k.int32();break;case 6:j.type=k.string();break;case 7:j.locked=k.bool();break;case 8:j.unlockLevel=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.id&&k.hasOwnProperty("id")&&!F.isInteger(k.id)?"id: integer expected":null!=k.element&&k.hasOwnProperty("element")&&!F.isString(k.element)?"element: string expected":null!=k.tier&&k.hasOwnProperty("tier")&&!F.isInteger(k.tier)?"tier: integer expected":null!=k.energyCost&&k.hasOwnProperty("energyCost")&&!F.isInteger(k.energyCost)?"energyCost: integer expected":null!=k.target&&k.hasOwnProperty("target")&&!F.isInteger(k.target)?"target: integer expected":null!=k.type&&k.hasOwnProperty("type")&&!F.isString(k.type)?"type: string expected":null!=k.locked&&k.hasOwnProperty("locked")&&"boolean"!=typeof k.locked?"locked: boolean expected":null!=k.unlockLevel&&k.hasOwnProperty("unlockLevel")&&!F.isInteger(k.unlockLevel)?"unlockLevel: integer expected":null},j.fromObject=function(k){if(k instanceof G.Spell)return k;var B=new G.Spell;return null!=k.id&&(B.id=0|k.id),null!=k.element&&(B.element=String(k.element)),null!=k.tier&&(B.tier=0|k.tier),null!=k.energyCost&&(B.energyCost=0|k.energyCost),null!=k.target&&(B.target=0|k.target),null!=k.type&&(B.type=String(k.type)),null!=k.locked&&(B.locked=Boolean(k.locked)),null!=k.unlockLevel&&(B.unlockLevel=0|k.unlockLevel),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.id=0,U.element="",U.tier=0,U.energyCost=0,U.target=0,U.type="",U.locked=!1,U.unlockLevel=0),null!=k.id&&k.hasOwnProperty("id")&&(U.id=k.id),null!=k.element&&k.hasOwnProperty("element")&&(U.element=k.element),null!=k.tier&&k.hasOwnProperty("tier")&&(U.tier=k.tier),null!=k.energyCost&&k.hasOwnProperty("energyCost")&&(U.energyCost=k.energyCost),null!=k.target&&k.hasOwnProperty("target")&&(U.target=k.target),null!=k.type&&k.hasOwnProperty("type")&&(U.type=k.type),null!=k.locked&&k.hasOwnProperty("locked")&&(U.locked=k.locked),null!=k.unlockLevel&&k.hasOwnProperty("unlockLevel")&&(U.unlockLevel=k.unlockLevel),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.Name=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.last=k.int32();break;case 2:j.first=k.int32();break;case 3:j.middle=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.last&&k.hasOwnProperty("last")&&!F.isInteger(k.last)?"last: integer expected":null!=k.first&&k.hasOwnProperty("first")&&!F.isInteger(k.first)?"first: integer expected":null!=k.middle&&k.hasOwnProperty("middle")&&!F.isInteger(k.middle)?"middle: integer expected":null},j.fromObject=function(k){if(k instanceof G.Name)return k;var B=new G.Name;return null!=k.last&&(B.last=0|k.last),null!=k.first&&(B.first=0|k.first),null!=k.middle&&(B.middle=0|k.middle),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.last=0,U.first=0,U.middle=0),null!=k.last&&k.hasOwnProperty("last")&&(U.last=k.last),null!=k.first&&k.hasOwnProperty("first")&&(U.first=k.first),null!=k.middle&&k.hasOwnProperty("middle")&&(U.middle=k.middle),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.Hair=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.color=k.int32();break;case 2:j.style=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.color&&k.hasOwnProperty("color")&&!F.isInteger(k.color)?"color: integer expected":null!=k.style&&k.hasOwnProperty("style")&&!F.isInteger(k.style)?"style: integer expected":null},j.fromObject=function(k){if(k instanceof G.Hair)return k;var B=new G.Hair;return null!=k.color&&(B.color=0|k.color),null!=k.style&&(B.style=0|k.style),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.color=0,U.style=0),null!=k.color&&k.hasOwnProperty("color")&&(U.color=k.color),null!=k.style&&k.hasOwnProperty("style")&&(U.style=k.style),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.WizardAppearance=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.name=G.Name.decode(k,k.uint32());break;case 2:j.hair=G.Hair.decode(k,k.uint32());break;case 3:j.face=k.int32();break;case 4:j.gender=k.string();break;case 5:j.eyeColor=k.int32();break;case 6:j.skinColor=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.name&&k.hasOwnProperty("name")&&(B=G.Name.verify(k.name))?"name."+B:null!=k.hair&&k.hasOwnProperty("hair")&&(B=G.Hair.verify(k.hair))?"hair."+B:null!=k.face&&k.hasOwnProperty("face")&&!F.isInteger(k.face)?"face: integer expected":null!=k.gender&&k.hasOwnProperty("gender")&&!F.isString(k.gender)?"gender: string expected":null!=k.eyeColor&&k.hasOwnProperty("eyeColor")&&!F.isInteger(k.eyeColor)?"eyeColor: integer expected":null!=k.skinColor&&k.hasOwnProperty("skinColor")&&!F.isInteger(k.skinColor)?"skinColor: integer expected":null;var B},j.fromObject=function(k){if(k instanceof G.WizardAppearance)return k;var B=new G.WizardAppearance;if(null!=k.name){if("object"!=typeof k.name)throw TypeError(".WizardAppearance.name: object expected");B.name=G.Name.fromObject(k.name)}if(null!=k.hair){if("object"!=typeof k.hair)throw TypeError(".WizardAppearance.hair: object expected");B.hair=G.Hair.fromObject(k.hair)}return null!=k.face&&(B.face=0|k.face),null!=k.gender&&(B.gender=String(k.gender)),null!=k.eyeColor&&(B.eyeColor=0|k.eyeColor),null!=k.skinColor&&(B.skinColor=0|k.skinColor),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.name=null,U.hair=null,U.face=0,U.gender="",U.eyeColor=0,U.skinColor=0),null!=k.name&&k.hasOwnProperty("name")&&(U.name=G.Name.toObject(k.name,B)),null!=k.hair&&k.hasOwnProperty("hair")&&(U.hair=G.Hair.toObject(k.hair,B)),null!=k.face&&k.hasOwnProperty("face")&&(U.face=k.face),null!=k.gender&&k.hasOwnProperty("gender")&&(U.gender=k.gender),null!=k.eyeColor&&k.hasOwnProperty("eyeColor")&&(U.eyeColor=k.eyeColor),null!=k.skinColor&&k.hasOwnProperty("skinColor")&&(U.skinColor=k.skinColor),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.Affix=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.type=k.string();break;case 2:j.amount=k.float();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.type&&k.hasOwnProperty("type")&&!F.isString(k.type)?"type: string expected":null!=k.amount&&k.hasOwnProperty("amount")&&"number"!=typeof k.amount?"amount: number expected":null},j.fromObject=function(k){if(k instanceof G.Affix)return k;var B=new G.Affix;return null!=k.type&&(B.type=String(k.type)),null!=k.amount&&(B.amount=Number(k.amount)),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.type="",U.amount=0),null!=k.type&&k.hasOwnProperty("type")&&(U.type=k.type),null!=k.amount&&k.hasOwnProperty("amount")&&(U.amount=B.json&&!isFinite(k.amount)?String(k.amount):k.amount),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.Appearance=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.ID=k.int32();break;case 2:j.wizardAppearance=G.WizardAppearance.decode(k,k.uint32());break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";var B={};if(null!=k.ID&&k.hasOwnProperty("ID")&&(B.appearance=1,!F.isInteger(k.ID)))return"ID: integer expected";if(null!=k.wizardAppearance&&k.hasOwnProperty("wizardAppearance")){if(1===B.appearance)return"appearance: multiple values";B.appearance=1;var U=G.WizardAppearance.verify(k.wizardAppearance);if(U)return"wizardAppearance."+U}return null},j.fromObject=function(k){if(k instanceof G.Appearance)return k;var B=new G.Appearance;if(null!=k.ID&&(B.ID=0|k.ID),null!=k.wizardAppearance){if("object"!=typeof k.wizardAppearance)throw TypeError(".Appearance.wizardAppearance: object expected");B.wizardAppearance=G.WizardAppearance.fromObject(k.wizardAppearance)}return B},j.toObject=function(k,B){B||(B={});var U={};return null!=k.ID&&k.hasOwnProperty("ID")&&(U.ID=k.ID,B.oneofs&&(U.appearance="ID")),null!=k.wizardAppearance&&k.hasOwnProperty("wizardAppearance")&&(U.wizardAppearance=G.WizardAppearance.toObject(k.wizardAppearance,B),B.oneofs&&(U.appearance="wizardAppearance")),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.Equipment=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 0:j.key=k.int32();break;case 1:j.follow=k.int32();break;case 2:j.hat=k.int32();break;case 3:j.outfit=k.int32();break;case 4:j.weapon=k.int32();break;case 5:j.spellRelic=k.int32();break;case 6:j.boots=k.int32();break;case 7:j.mount=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";var B={};return null!=k.key&&k.hasOwnProperty("key")&&(B._key=1,!F.isInteger(k.key))?"key: integer expected":null!=k.follow&&k.hasOwnProperty("follow")&&(B._follow=1,!F.isInteger(k.follow))?"follow: integer expected":null!=k.hat&&k.hasOwnProperty("hat")&&(B._hat=1,!F.isInteger(k.hat))?"hat: integer expected":null!=k.outfit&&k.hasOwnProperty("outfit")&&(B._outfit=1,!F.isInteger(k.outfit))?"outfit: integer expected":null!=k.weapon&&k.hasOwnProperty("weapon")&&(B._weapon=1,!F.isInteger(k.weapon))?"weapon: integer expected":null!=k.spellRelic&&k.hasOwnProperty("spellRelic")&&(B._spellRelic=1,!F.isInteger(k.spellRelic))?"spellRelic: integer expected":null!=k.boots&&k.hasOwnProperty("boots")&&(B._boots=1,!F.isInteger(k.boots))?"boots: integer expected":null!=k.mount&&k.hasOwnProperty("mount")&&(B._mount=1,!F.isInteger(k.mount))?"mount: integer expected":null},j.fromObject=function(k){if(k instanceof G.Equipment)return k;var B=new G.Equipment;return null!=k.key&&(B.key=0|k.key),null!=k.follow&&(B.follow=0|k.follow),null!=k.hat&&(B.hat=0|k.hat),null!=k.outfit&&(B.outfit=0|k.outfit),null!=k.weapon&&(B.weapon=0|k.weapon),null!=k.spellRelic&&(B.spellRelic=0|k.spellRelic),null!=k.boots&&(B.boots=0|k.boots),null!=k.mount&&(B.mount=0|k.mount),B},j.toObject=function(k,B){B||(B={});var U={};return null!=k.key&&k.hasOwnProperty("key")&&(U.key=k.key,B.oneofs&&(U._key="key")),null!=k.follow&&k.hasOwnProperty("follow")&&(U.follow=k.follow,B.oneofs&&(U._follow="follow")),null!=k.hat&&k.hasOwnProperty("hat")&&(U.hat=k.hat,B.oneofs&&(U._hat="hat")),null!=k.outfit&&k.hasOwnProperty("outfit")&&(U.outfit=k.outfit,B.oneofs&&(U._outfit="outfit")),null!=k.weapon&&k.hasOwnProperty("weapon")&&(U.weapon=k.weapon,B.oneofs&&(U._weapon="weapon")),null!=k.spellRelic&&k.hasOwnProperty("spellRelic")&&(U.spellRelic=k.spellRelic,B.oneofs&&(U._spellRelic="spellRelic")),null!=k.boots&&k.hasOwnProperty("boots")&&(U.boots=k.boots,B.oneofs&&(U._boots="boots")),null!=k.mount&&k.hasOwnProperty("mount")&&(U.mount=k.mount,B.oneofs&&(U._mount="mount")),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.Unit=function(){function j(k){if(this.affixes=[],this.spells=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.level=k.int32();break;case 2:j.health=k.int32();break;case 3:j.affixes&&j.affixes.length||(j.affixes=[]),j.affixes.push(G.Affix.decode(k,k.uint32()));break;case 4:j.type=k.string();break;case 5:j.appearance=G.Appearance.decode(k,k.uint32());break;case 7:j.accuracy=k.float();break;case 8:j.criticalHitChance=k.float();break;case 9:j.criticalHitBonusDamage=k.float();break;case 10:j.spells&&j.spells.length||(j.spells=[]),j.spells.push(G.Spell.decode(k,k.uint32()));break;case 11:j.powerStat=k.int32();break;case 12:j.healthStat=k.int32();break;case 13:j.element=k.string();break;case 14:j.nickname=k.string();break;case 15:j.equipment=G.Equipment.decode(k,k.uint32());break;case 16:j.maxHealth=k.int32();break;case 17:j.name=k.string();break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";var B={};if(null!=k.level&&k.hasOwnProperty("level")&&!F.isInteger(k.level))return"level: integer expected";if(null!=k.health&&k.hasOwnProperty("health")&&!F.isInteger(k.health))return"health: integer expected";if(null!=k.affixes&&k.hasOwnProperty("affixes")){if(!Array.isArray(k.affixes))return"affixes: array expected";for(var U=0;U>>3){case 1:j.energy=k.int32();break;case 2:j.units&&j.units.length||(j.units=[]),j.units.push(G.Unit.decode(k,k.uint32()));break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.energy&&k.hasOwnProperty("energy")&&!F.isInteger(k.energy))return"energy: integer expected";if(null!=k.units&&k.hasOwnProperty("units")){if(!Array.isArray(k.units))return"units: array expected";for(var B=0;B>>3){case 1:j.min=k.int32();break;case 2:j.max=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.min&&k.hasOwnProperty("min")&&!F.isInteger(k.min)?"min: integer expected":null!=k.max&&k.hasOwnProperty("max")&&!F.isInteger(k.max)?"max: integer expected":null},j.fromObject=function(k){if(k instanceof G.UnitLevel)return k;var B=new G.UnitLevel;return null!=k.min&&(B.min=0|k.min),null!=k.max&&(B.max=0|k.max),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.min=0,U.max=0),null!=k.min&&k.hasOwnProperty("min")&&(U.min=k.min),null!=k.max&&k.hasOwnProperty("max")&&(U.max=k.max),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.TeamLimit=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 0:j.limit=G.TeamLimit.Limit.decode(k,k.uint32());break;case 1:j.units=G.TeamLimit.Units.decode(k,k.uint32());break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.limit&&k.hasOwnProperty("limit")&&(B=G.TeamLimit.Limit.verify(k.limit))?"limit."+B:null!=k.units&&k.hasOwnProperty("units")&&(B=G.TeamLimit.Units.verify(k.units))?"units."+B:null;var B},j.fromObject=function(k){if(k instanceof G.TeamLimit)return k;var B=new G.TeamLimit;if(null!=k.limit){if("object"!=typeof k.limit)throw TypeError(".TeamLimit.limit: object expected");B.limit=G.TeamLimit.Limit.fromObject(k.limit)}if(null!=k.units){if("object"!=typeof k.units)throw TypeError(".TeamLimit.units: object expected");B.units=G.TeamLimit.Units.fromObject(k.units)}return B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.limit=null,U.units=null),null!=k.limit&&k.hasOwnProperty("limit")&&(U.limit=G.TeamLimit.Limit.toObject(k.limit,B)),null!=k.units&&k.hasOwnProperty("units")&&(U.units=G.TeamLimit.Units.toObject(k.units,B)),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j.Limit=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.min=k.int32();break;case 2:j.max=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.min&&k.hasOwnProperty("min")&&!F.isInteger(k.min)?"min: integer expected":null!=k.max&&k.hasOwnProperty("max")&&!F.isInteger(k.max)?"max: integer expected":null},j.fromObject=function(k){if(k instanceof G.TeamLimit.Limit)return k;var B=new G.TeamLimit.Limit;return null!=k.min&&(B.min=0|k.min),null!=k.max&&(B.max=0|k.max),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.min=0,U.max=0),null!=k.min&&k.hasOwnProperty("min")&&(U.min=k.min),null!=k.max&&k.hasOwnProperty("max")&&(U.max=k.max),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),j.Units=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.min=k.int32();break;case 2:j.max=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.min&&k.hasOwnProperty("min")&&!F.isInteger(k.min)?"min: integer expected":null!=k.max&&k.hasOwnProperty("max")&&!F.isInteger(k.max)?"max: integer expected":null},j.fromObject=function(k){if(k instanceof G.TeamLimit.Units)return k;var B=new G.TeamLimit.Units;return null!=k.min&&(B.min=0|k.min),null!=k.max&&(B.max=0|k.max),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.min=0,U.max=0),null!=k.min&&k.hasOwnProperty("min")&&(U.min=k.min),null!=k.max&&k.hasOwnProperty("max")&&(U.max=k.max),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),j}(),G.Battle=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.id=k.string();break;case 2:j.userId=k.int32();break;case 3:j.status=k.string();break;case 4:j.homeState=G.TeamState.decode(k,k.uint32());break;case 5:j.awayState=G.TeamState.decode(k,k.uint32());break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.id&&k.hasOwnProperty("id")&&!F.isString(k.id)?"id: string expected":null!=k.userId&&k.hasOwnProperty("userId")&&!F.isInteger(k.userId)?"userId: integer expected":null!=k.status&&k.hasOwnProperty("status")&&!F.isString(k.status)?"status: string expected":null!=k.homeState&&k.hasOwnProperty("homeState")&&(B=G.TeamState.verify(k.homeState))?"homeState."+B:null!=k.awayState&&k.hasOwnProperty("awayState")&&(B=G.TeamState.verify(k.awayState))?"awayState."+B:null;var B},j.fromObject=function(k){if(k instanceof G.Battle)return k;var B=new G.Battle;if(null!=k.id&&(B.id=String(k.id)),null!=k.userId&&(B.userId=0|k.userId),null!=k.status&&(B.status=String(k.status)),null!=k.homeState){if("object"!=typeof k.homeState)throw TypeError(".Battle.homeState: object expected");B.homeState=G.TeamState.fromObject(k.homeState)}if(null!=k.awayState){if("object"!=typeof k.awayState)throw TypeError(".Battle.awayState: object expected");B.awayState=G.TeamState.fromObject(k.awayState)}return B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.id="",U.userId=0,U.status="",U.homeState=null,U.awayState=null),null!=k.id&&k.hasOwnProperty("id")&&(U.id=k.id),null!=k.userId&&k.hasOwnProperty("userId")&&(U.userId=k.userId),null!=k.status&&k.hasOwnProperty("status")&&(U.status=k.status),null!=k.homeState&&k.hasOwnProperty("homeState")&&(U.homeState=G.TeamState.toObject(k.homeState,B)),null!=k.awayState&&k.hasOwnProperty("awayState")&&(U.awayState=G.TeamState.toObject(k.awayState,B)),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.TargetData=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 0:j.deltaHealth=k.int32();break;case 1:j.finalHealth=k.int32();break;case 2:j.effect=k.int32();break;case 3:j.targetUnit=k.int32();break;case 4:j.deltaEnergy=k.int32();break;case 5:j.finalEnergy=k.int32();break;case 6:j.index=k.int32();break;case 7:j.nFactor=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";var B={};return null!=k.deltaHealth&&k.hasOwnProperty("deltaHealth")&&!F.isInteger(k.deltaHealth)?"deltaHealth: integer expected":null!=k.finalHealth&&k.hasOwnProperty("finalHealth")&&!F.isInteger(k.finalHealth)?"finalHealth: integer expected":null!=k.effect&&k.hasOwnProperty("effect")&&(B._effect=1,!F.isInteger(k.effect))?"effect: integer expected":null!=k.targetUnit&&k.hasOwnProperty("targetUnit")&&(B._targetUnit=1,!F.isInteger(k.targetUnit))?"targetUnit: integer expected":null!=k.deltaEnergy&&k.hasOwnProperty("deltaEnergy")&&(B._deltaEnergy=1,!F.isInteger(k.deltaEnergy))?"deltaEnergy: integer expected":null!=k.finalEnergy&&k.hasOwnProperty("finalEnergy")&&(B._finalEnergy=1,!F.isInteger(k.finalEnergy))?"finalEnergy: integer expected":null!=k.index&&k.hasOwnProperty("index")&&(B._index=1,!F.isInteger(k.index))?"index: integer expected":null!=k.nFactor&&k.hasOwnProperty("nFactor")&&!F.isInteger(k.nFactor)?"nFactor: integer expected":null},j.fromObject=function(k){if(k instanceof G.TargetData)return k;var B=new G.TargetData;return null!=k.deltaHealth&&(B.deltaHealth=0|k.deltaHealth),null!=k.finalHealth&&(B.finalHealth=0|k.finalHealth),null!=k.effect&&(B.effect=0|k.effect),null!=k.targetUnit&&(B.targetUnit=0|k.targetUnit),null!=k.deltaEnergy&&(B.deltaEnergy=0|k.deltaEnergy),null!=k.finalEnergy&&(B.finalEnergy=0|k.finalEnergy),null!=k.index&&(B.index=0|k.index),null!=k.nFactor&&(B.nFactor=0|k.nFactor),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.deltaHealth=0,U.finalHealth=0,U.nFactor=0),null!=k.deltaHealth&&k.hasOwnProperty("deltaHealth")&&(U.deltaHealth=k.deltaHealth),null!=k.finalHealth&&k.hasOwnProperty("finalHealth")&&(U.finalHealth=k.finalHealth),null!=k.effect&&k.hasOwnProperty("effect")&&(U.effect=k.effect,B.oneofs&&(U._effect="effect")),null!=k.targetUnit&&k.hasOwnProperty("targetUnit")&&(U.targetUnit=k.targetUnit,B.oneofs&&(U._targetUnit="targetUnit")),null!=k.deltaEnergy&&k.hasOwnProperty("deltaEnergy")&&(U.deltaEnergy=k.deltaEnergy,B.oneofs&&(U._deltaEnergy="deltaEnergy")),null!=k.finalEnergy&&k.hasOwnProperty("finalEnergy")&&(U.finalEnergy=k.finalEnergy,B.oneofs&&(U._finalEnergy="finalEnergy")),null!=k.index&&k.hasOwnProperty("index")&&(U.index=k.index,B.oneofs&&(U._index="index")),null!=k.nFactor&&k.hasOwnProperty("nFactor")&&(U.nFactor=k.nFactor),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.Action=function(){function j(k){if(this.targetData=[],k)for(var B=Object.keys(k),U=0;U>>3){case 0:j.team=k.int32();break;case 1:j.type=k.string();break;case 2:j.id=k.int32();break;case 3:j.targetData&&j.targetData.length||(j.targetData=[]),j.targetData.push(G.TargetData.decode(k,k.uint32()));break;case 4:j.epicID=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.team&&k.hasOwnProperty("team")&&!F.isInteger(k.team))return"team: integer expected";if(null!=k.type&&k.hasOwnProperty("type")&&!F.isString(k.type))return"type: string expected";if(null!=k.id&&k.hasOwnProperty("id")&&!F.isInteger(k.id))return"id: integer expected";if(null!=k.targetData&&k.hasOwnProperty("targetData")){if(!Array.isArray(k.targetData))return"targetData: array expected";for(var B=0;B>>3){case 0:j.ID=k.int32();break;case 1:j.type=k.string();break;case 2:j.quantity=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";var B={};return null!=k.ID&&k.hasOwnProperty("ID")&&(B._ID=1,!F.isInteger(k.ID))?"ID: integer expected":null!=k.type&&k.hasOwnProperty("type")&&(B._type=1,!F.isString(k.type))?"type: string expected":null!=k.quantity&&k.hasOwnProperty("quantity")&&(B._quantity=1,!F.isInteger(k.quantity))?"quantity: integer expected":null},j.fromObject=function(k){if(k instanceof G.LootItem)return k;var B=new G.LootItem;return null!=k.ID&&(B.ID=0|k.ID),null!=k.type&&(B.type=String(k.type)),null!=k.quantity&&(B.quantity=0|k.quantity),B},j.toObject=function(k,B){B||(B={});var U={};return null!=k.ID&&k.hasOwnProperty("ID")&&(U.ID=k.ID,B.oneofs&&(U._ID="ID")),null!=k.type&&k.hasOwnProperty("type")&&(U.type=k.type,B.oneofs&&(U._type="type")),null!=k.quantity&&k.hasOwnProperty("quantity")&&(U.quantity=k.quantity,B.oneofs&&(U._quantity="quantity")),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.BattleAction=function(){function j(k){if(this.actions=[],this.lootSecure=[],this.lootUnSecure=[],k)for(var B=Object.keys(k),U=0;U>>3){case 0:j.id=k.string();break;case 1:j.userId=k.int32();break;case 2:j.status=k.string();break;case 3:j.actionID=k.string();break;case 4:j.actions&&j.actions.length||(j.actions=[]),j.actions.push(G.Action.decode(k,k.uint32()));break;case 5:j.lootSecure&&j.lootSecure.length||(j.lootSecure=[]),j.lootSecure.push(G.LootItem.decode(k,k.uint32()));break;case 6:j.lootUnSecure&&j.lootUnSecure.length||(j.lootUnSecure=[]),j.lootUnSecure.push(G.LootItem.decode(k,k.uint32()));break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.id&&k.hasOwnProperty("id")&&!F.isString(k.id))return"id: string expected";if(null!=k.userId&&k.hasOwnProperty("userId")&&!F.isInteger(k.userId))return"userId: integer expected";if(null!=k.status&&k.hasOwnProperty("status")&&!F.isString(k.status))return"status: string expected";if(null!=k.actionID&&k.hasOwnProperty("actionID")&&!F.isString(k.actionID))return"actionID: string expected";if(null!=k.actions&&k.hasOwnProperty("actions")){if(!Array.isArray(k.actions))return"actions: array expected";for(var B=0;B>>3){case 1:j.userId=k.int32();break;case 2:j.runs&&j.runs.length||(j.runs=[]),j.runs.push(G.Run.decode(k,k.uint32()));break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.userId&&k.hasOwnProperty("userId")&&!F.isInteger(k.userId))return"userId: integer expected";if(null!=k.runs&&k.hasOwnProperty("runs")){if(!Array.isArray(k.runs))return"runs: array expected";for(var B=0;B>>3){case 1:j.bounties&&j.bounties.length||(j.bounties=[]),j.bounties.push(G.Bounty.decode(k,k.uint32()));break;case 2:if(j.pets&&j.pets.length||(j.pets=[]),2==(7&$))for(var H=k.uint32()+k.pos;k.pos>>3){case 1:j.name=k.string();break;case 2:j.statBonus=G.StatBonus.decode(k,k.uint32());break;case 3:j.isMember=k.bool();break;case 4:j.petID=k.int32();break;case 5:j.bountyLoot&&j.bountyLoot.length||(j.bountyLoot=[]),j.bountyLoot.push(G.BountyRunLoot.decode(k,k.uint32()));break;case 6:if(j.randomLootItemTableIds&&j.randomLootItemTableIds.length||(j.randomLootItemTableIds=[]),2==(7&$))for(var H=k.uint32()+k.pos;k.pos>>3){case 1:j.ID=k.int32();break;case 2:j.quantity=k.int32();break;case 3:j.weight=k.float();break;case 4:j.type=k.string();break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";var B={};return null!=k.ID&&k.hasOwnProperty("ID")&&!F.isInteger(k.ID)?"ID: integer expected":null!=k.quantity&&k.hasOwnProperty("quantity")&&(B._quantity=1,!F.isInteger(k.quantity))?"quantity: integer expected":null!=k.weight&&k.hasOwnProperty("weight")&&(B._weight=1,"number"!=typeof k.weight)?"weight: number expected":null!=k.type&&k.hasOwnProperty("type")&&(B._type=1,!F.isString(k.type))?"type: string expected":null},j.fromObject=function(k){if(k instanceof G.BountyRunLoot)return k;var B=new G.BountyRunLoot;return null!=k.ID&&(B.ID=0|k.ID),null!=k.quantity&&(B.quantity=0|k.quantity),null!=k.weight&&(B.weight=Number(k.weight)),null!=k.type&&(B.type=String(k.type)),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.ID=0),null!=k.ID&&k.hasOwnProperty("ID")&&(U.ID=k.ID),null!=k.quantity&&k.hasOwnProperty("quantity")&&(U.quantity=k.quantity,B.oneofs&&(U._quantity="quantity")),null!=k.weight&&k.hasOwnProperty("weight")&&(U.weight=B.json&&!isFinite(k.weight)?String(k.weight):k.weight,B.oneofs&&(U._weight="weight")),null!=k.type&&k.hasOwnProperty("type")&&(U.type=k.type,B.oneofs&&(U._type="type")),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.StatBonus=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.type=k.string();break;case 2:j.amount=k.float();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.type&&k.hasOwnProperty("type")&&!F.isString(k.type)?"type: string expected":null!=k.amount&&k.hasOwnProperty("amount")&&"number"!=typeof k.amount?"amount: number expected":null},j.fromObject=function(k){if(k instanceof G.StatBonus)return k;var B=new G.StatBonus;return null!=k.type&&(B.type=String(k.type)),null!=k.amount&&(B.amount=Number(k.amount)),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.type="",U.amount=0),null!=k.type&&k.hasOwnProperty("type")&&(U.type=k.type),null!=k.amount&&k.hasOwnProperty("amount")&&(U.amount=B.json&&!isFinite(k.amount)?String(k.amount):k.amount),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.Character=function(){function j(k){if(this.loadouts=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userId=k.int32();break;case 2:j.gameVersion=k.string();break;case 3:j.dataVersion=k.int32();break;case 4:j.inventory=G.Inventory.decode(k,k.uint32());break;case 5:j.loadouts&&j.loadouts.length||(j.loadouts=[]),j.loadouts.push(G.Loadout.decode(k,k.uint32()));break;case 6:j.membership=G.Membership.decode(k,k.uint32());break;case 7:j.egInfo=G.EgInfo.decode(k,k.uint32());break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.userId&&k.hasOwnProperty("userId")&&!F.isInteger(k.userId))return"userId: integer expected";if(null!=k.gameVersion&&k.hasOwnProperty("gameVersion")&&!F.isString(k.gameVersion))return"gameVersion: string expected";if(null!=k.dataVersion&&k.hasOwnProperty("dataVersion")&&!F.isInteger(k.dataVersion))return"dataVersion: integer expected";if(null!=k.inventory&&k.hasOwnProperty("inventory")&&(U=G.Inventory.verify(k.inventory)))return"inventory."+U;if(null!=k.loadouts&&k.hasOwnProperty("loadouts")){if(!Array.isArray(k.loadouts))return"loadouts: array expected";for(var B=0;B>>3){case 1:j.orb&&j.orb.length||(j.orb=[]),j.orb.push(G.Item.decode(k,k.uint32()));break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.orb&&k.hasOwnProperty("orb")){if(!Array.isArray(k.orb))return"orb: array expected";for(var B=0;B>>3){case 1:j.ID=k.int32();break;case 2:j.quantity=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";var B={};return null!=k.ID&&k.hasOwnProperty("ID")&&!F.isInteger(k.ID)?"ID: integer expected":null!=k.quantity&&k.hasOwnProperty("quantity")&&(B._quantity=1,!F.isInteger(k.quantity))?"quantity: integer expected":null},j.fromObject=function(k){if(k instanceof G.Item)return k;var B=new G.Item;return null!=k.ID&&(B.ID=0|k.ID),null!=k.quantity&&(B.quantity=0|k.quantity),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.ID=0),null!=k.ID&&k.hasOwnProperty("ID")&&(U.ID=k.ID),null!=k.quantity&&k.hasOwnProperty("quantity")&&(U.quantity=k.quantity,B.oneofs&&(U._quantity="quantity")),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.Loadout=function(){function j(k){if(this.orbs=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:if(j.orbs&&j.orbs.length||(j.orbs=[]),2==(7&$))for(var H=k.uint32()+k.pos;k.pos>>3){case 1:j.active=k.bool();break;case 2:j.memberStartDate=k.int32();break;case 3:j.memberEndDate=k.int32();break;case 4:j.membershipStartTs=k.double();break;case 5:j.membershipEndTs=k.double();break;case 6:j.features&&j.features.length||(j.features=[]),j.features.push(k.string());break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.active&&k.hasOwnProperty("active")&&"boolean"!=typeof k.active)return"active: boolean expected";if(null!=k.memberStartDate&&k.hasOwnProperty("memberStartDate")&&!F.isInteger(k.memberStartDate))return"memberStartDate: integer expected";if(null!=k.memberEndDate&&k.hasOwnProperty("memberEndDate")&&!F.isInteger(k.memberEndDate))return"memberEndDate: integer expected";if(null!=k.membershipStartTs&&k.hasOwnProperty("membershipStartTs")&&"number"!=typeof k.membershipStartTs)return"membershipStartTs: number expected";if(null!=k.membershipEndTs&&k.hasOwnProperty("membershipEndTs")&&"number"!=typeof k.membershipEndTs)return"membershipEndTs: number expected";if(null!=k.features&&k.hasOwnProperty("features")){if(!Array.isArray(k.features))return"features: array expected";for(var B=0;B>>3){case 1:j.tier=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.tier&&k.hasOwnProperty("tier")&&!F.isInteger(k.tier)?"tier: integer expected":null},j.fromObject=function(k){if(k instanceof G.EgInfo)return k;var B=new G.EgInfo;return null!=k.tier&&(B.tier=0|k.tier),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.tier=0),null!=k.tier&&k.hasOwnProperty("tier")&&(U.tier=k.tier),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.CoOpTeamProto=function(){function j(k){if(this.teamMembers=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.hostID=k.double();break;case 2:j.teamMembers&&j.teamMembers.length||(j.teamMembers=[]),j.teamMembers.push(G.CoOpTeamMemberProto.decode(k,k.uint32()));break;case 3:j.battleStreak=k.double();break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.hostID&&k.hasOwnProperty("hostID")&&"number"!=typeof k.hostID)return"hostID: number expected";if(null!=k.teamMembers&&k.hasOwnProperty("teamMembers")){if(!Array.isArray(k.teamMembers))return"teamMembers: array expected";for(var B=0;B>>3){case 1:j.hostID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.hostID&&k.hasOwnProperty("hostID")&&"number"!=typeof k.hostID?"hostID: number expected":null},F.fromObject=function(k){if(k instanceof G.CoOpTeamDisbandedProto)return k;var B=new G.CoOpTeamDisbandedProto;return null!=k.hostID&&(B.hostID=Number(k.hostID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.hostID=0),null!=k.hostID&&k.hasOwnProperty("hostID")&&(U.hostID=B.json&&!isFinite(k.hostID)?String(k.hostID):k.hostID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.CoOpTeamJoinRequestProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null},F.fromObject=function(k){if(k instanceof G.CoOpTeamJoinRequestProto)return k;var B=new G.CoOpTeamJoinRequestProto;return null!=k.userID&&(B.userID=Number(k.userID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.CoOpTeamErrorProto=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.reason=k.string();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.reason&&k.hasOwnProperty("reason")&&!F.isString(k.reason)?"reason: string expected":null},j.fromObject=function(k){if(k instanceof G.CoOpTeamErrorProto)return k;var B=new G.CoOpTeamErrorProto;return null!=k.reason&&(B.reason=String(k.reason)),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.reason=""),null!=k.reason&&k.hasOwnProperty("reason")&&(U.reason=k.reason),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.CoOpTeamJoinSuccessProto=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.socketRoomID=k.string();break;case 2:j.team=G.CoOpTeamProto.decode(k,k.uint32());break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.socketRoomID&&k.hasOwnProperty("socketRoomID")&&!F.isString(k.socketRoomID))return"socketRoomID: string expected";if(null!=k.team&&k.hasOwnProperty("team")){var B=G.CoOpTeamProto.verify(k.team);if(B)return"team."+B}return null},j.fromObject=function(k){if(k instanceof G.CoOpTeamJoinSuccessProto)return k;var B=new G.CoOpTeamJoinSuccessProto;if(null!=k.socketRoomID&&(B.socketRoomID=String(k.socketRoomID)),null!=k.team){if("object"!=typeof k.team)throw TypeError(".CoOpTeamJoinSuccessProto.team: object expected");B.team=G.CoOpTeamProto.fromObject(k.team)}return B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.socketRoomID="",U.team=null),null!=k.socketRoomID&&k.hasOwnProperty("socketRoomID")&&(U.socketRoomID=k.socketRoomID),null!=k.team&&k.hasOwnProperty("team")&&(U.team=G.CoOpTeamProto.toObject(k.team,B)),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.CoOpTeamMatchDetailsProto=function(){function j(k){if(this.teammates=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.hostID=k.double();break;case 2:j.type=k.string();break;case 3:j.teammates&&j.teammates.length||(j.teammates=[]),j.teammates.push(G.PlayerProto.decode(k,k.uint32()));break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.hostID&&k.hasOwnProperty("hostID")&&"number"!=typeof k.hostID)return"hostID: number expected";if(null!=k.type&&k.hasOwnProperty("type")&&!F.isString(k.type))return"type: string expected";if(null!=k.teammates&&k.hasOwnProperty("teammates")){if(!Array.isArray(k.teammates))return"teammates: array expected";for(var B=0;B>>3){case 1:j.userID=k.double();break;case 2:j.ready=k.bool();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null!=k.ready&&k.hasOwnProperty("ready")&&"boolean"!=typeof k.ready?"ready: boolean expected":null},F.fromObject=function(k){if(k instanceof G.CoOpTeamMemberProto)return k;var B=new G.CoOpTeamMemberProto;return null!=k.userID&&(B.userID=Number(k.userID)),null!=k.ready&&(B.ready=Boolean(k.ready)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0,U.ready=!1),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),null!=k.ready&&k.hasOwnProperty("ready")&&(U.ready=k.ready),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.CoOpTeamReadyUpProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null},F.fromObject=function(k){if(k instanceof G.CoOpTeamReadyUpProto)return k;var B=new G.CoOpTeamReadyUpProto;return null!=k.userID&&(B.userID=Number(k.userID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.PlayerProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;case 2:j.appearance=G.PlayerAppearanceProto.decode(k,k.uint32());break;case 3:j.equipment=G.PlayerEquipmentProto.decode(k,k.uint32());break;case 4:j.name=G.PlayerNameProto.decode(k,k.uint32());break;case 5:j.level=k.double();break;case 6:j.member=k.double();break;case 7:j.team=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null!=k.appearance&&k.hasOwnProperty("appearance")&&(B=G.PlayerAppearanceProto.verify(k.appearance))?"appearance."+B:null!=k.equipment&&k.hasOwnProperty("equipment")&&(B=G.PlayerEquipmentProto.verify(k.equipment))?"equipment."+B:null!=k.name&&k.hasOwnProperty("name")&&(B=G.PlayerNameProto.verify(k.name))?"name."+B:null!=k.level&&k.hasOwnProperty("level")&&"number"!=typeof k.level?"level: number expected":null!=k.member&&k.hasOwnProperty("member")&&"number"!=typeof k.member?"member: number expected":null!=k.team&&k.hasOwnProperty("team")&&"number"!=typeof k.team?"team: number expected":null;var B},F.fromObject=function(k){if(k instanceof G.PlayerProto)return k;var B=new G.PlayerProto;if(null!=k.userID&&(B.userID=Number(k.userID)),null!=k.appearance){if("object"!=typeof k.appearance)throw TypeError(".PlayerProto.appearance: object expected");B.appearance=G.PlayerAppearanceProto.fromObject(k.appearance)}if(null!=k.equipment){if("object"!=typeof k.equipment)throw TypeError(".PlayerProto.equipment: object expected");B.equipment=G.PlayerEquipmentProto.fromObject(k.equipment)}if(null!=k.name){if("object"!=typeof k.name)throw TypeError(".PlayerProto.name: object expected");B.name=G.PlayerNameProto.fromObject(k.name)}return null!=k.level&&(B.level=Number(k.level)),null!=k.member&&(B.member=Number(k.member)),null!=k.team&&(B.team=Number(k.team)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0,U.appearance=null,U.equipment=null,U.name=null,U.level=0,U.member=0,U.team=0),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),null!=k.appearance&&k.hasOwnProperty("appearance")&&(U.appearance=G.PlayerAppearanceProto.toObject(k.appearance,B)),null!=k.equipment&&k.hasOwnProperty("equipment")&&(U.equipment=G.PlayerEquipmentProto.toObject(k.equipment,B)),null!=k.name&&k.hasOwnProperty("name")&&(U.name=G.PlayerNameProto.toObject(k.name,B)),null!=k.level&&k.hasOwnProperty("level")&&(U.level=B.json&&!isFinite(k.level)?String(k.level):k.level),null!=k.member&&k.hasOwnProperty("member")&&(U.member=B.json&&!isFinite(k.member)?String(k.member):k.member),null!=k.team&&k.hasOwnProperty("team")&&(U.team=B.json&&!isFinite(k.team)?String(k.team):k.team),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.PlayerAppearanceProto=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.faceID=k.double();break;case 2:j.hair=G.PlayerHairProto.decode(k,k.uint32());break;case 3:j.skinColorID=k.double();break;case 4:j.eyeColorID=k.double();break;case 5:j.gender=k.string();break;case 6:j.morph=G.MorphProto.decode(k,k.uint32());break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.faceID&&k.hasOwnProperty("faceID")&&"number"!=typeof k.faceID?"faceID: number expected":null!=k.hair&&k.hasOwnProperty("hair")&&(B=G.PlayerHairProto.verify(k.hair))?"hair."+B:null!=k.skinColorID&&k.hasOwnProperty("skinColorID")&&"number"!=typeof k.skinColorID?"skinColorID: number expected":null!=k.eyeColorID&&k.hasOwnProperty("eyeColorID")&&"number"!=typeof k.eyeColorID?"eyeColorID: number expected":null!=k.gender&&k.hasOwnProperty("gender")&&!F.isString(k.gender)?"gender: string expected":null!=k.morph&&k.hasOwnProperty("morph")&&(B=G.MorphProto.verify(k.morph))?"morph."+B:null;var B},j.fromObject=function(k){if(k instanceof G.PlayerAppearanceProto)return k;var B=new G.PlayerAppearanceProto;if(null!=k.faceID&&(B.faceID=Number(k.faceID)),null!=k.hair){if("object"!=typeof k.hair)throw TypeError(".PlayerAppearanceProto.hair: object expected");B.hair=G.PlayerHairProto.fromObject(k.hair)}if(null!=k.skinColorID&&(B.skinColorID=Number(k.skinColorID)),null!=k.eyeColorID&&(B.eyeColorID=Number(k.eyeColorID)),null!=k.gender&&(B.gender=String(k.gender)),null!=k.morph){if("object"!=typeof k.morph)throw TypeError(".PlayerAppearanceProto.morph: object expected");B.morph=G.MorphProto.fromObject(k.morph)}return B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.faceID=0,U.hair=null,U.skinColorID=0,U.eyeColorID=0,U.gender="",U.morph=null),null!=k.faceID&&k.hasOwnProperty("faceID")&&(U.faceID=B.json&&!isFinite(k.faceID)?String(k.faceID):k.faceID),null!=k.hair&&k.hasOwnProperty("hair")&&(U.hair=G.PlayerHairProto.toObject(k.hair,B)),null!=k.skinColorID&&k.hasOwnProperty("skinColorID")&&(U.skinColorID=B.json&&!isFinite(k.skinColorID)?String(k.skinColorID):k.skinColorID),null!=k.eyeColorID&&k.hasOwnProperty("eyeColorID")&&(U.eyeColorID=B.json&&!isFinite(k.eyeColorID)?String(k.eyeColorID):k.eyeColorID),null!=k.gender&&k.hasOwnProperty("gender")&&(U.gender=k.gender),null!=k.morph&&k.hasOwnProperty("morph")&&(U.morph=G.MorphProto.toObject(k.morph,B)),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.MorphProto=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.type=k.string();break;case 2:j.ID=k.double();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.type&&k.hasOwnProperty("type")&&!F.isString(k.type)?"type: string expected":null!=k.ID&&k.hasOwnProperty("ID")&&"number"!=typeof k.ID?"ID: number expected":null},j.fromObject=function(k){if(k instanceof G.MorphProto)return k;var B=new G.MorphProto;return null!=k.type&&(B.type=String(k.type)),null!=k.ID&&(B.ID=Number(k.ID)),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.type="",U.ID=0),null!=k.type&&k.hasOwnProperty("type")&&(U.type=k.type),null!=k.ID&&k.hasOwnProperty("ID")&&(U.ID=B.json&&!isFinite(k.ID)?String(k.ID):k.ID),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.PlayerEquipmentProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.hatID=k.double();break;case 2:j.outfitID=k.double();break;case 3:j.weaponID=k.double();break;case 4:j.bootsID=k.double();break;case 5:j.costumeID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.hatID&&k.hasOwnProperty("hatID")&&"number"!=typeof k.hatID?"hatID: number expected":null!=k.outfitID&&k.hasOwnProperty("outfitID")&&"number"!=typeof k.outfitID?"outfitID: number expected":null!=k.weaponID&&k.hasOwnProperty("weaponID")&&"number"!=typeof k.weaponID?"weaponID: number expected":null!=k.bootsID&&k.hasOwnProperty("bootsID")&&"number"!=typeof k.bootsID?"bootsID: number expected":null!=k.costumeID&&k.hasOwnProperty("costumeID")&&"number"!=typeof k.costumeID?"costumeID: number expected":null},F.fromObject=function(k){if(k instanceof G.PlayerEquipmentProto)return k;var B=new G.PlayerEquipmentProto;return null!=k.hatID&&(B.hatID=Number(k.hatID)),null!=k.outfitID&&(B.outfitID=Number(k.outfitID)),null!=k.weaponID&&(B.weaponID=Number(k.weaponID)),null!=k.bootsID&&(B.bootsID=Number(k.bootsID)),null!=k.costumeID&&(B.costumeID=Number(k.costumeID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.hatID=0,U.outfitID=0,U.weaponID=0,U.bootsID=0,U.costumeID=0),null!=k.hatID&&k.hasOwnProperty("hatID")&&(U.hatID=B.json&&!isFinite(k.hatID)?String(k.hatID):k.hatID),null!=k.outfitID&&k.hasOwnProperty("outfitID")&&(U.outfitID=B.json&&!isFinite(k.outfitID)?String(k.outfitID):k.outfitID),null!=k.weaponID&&k.hasOwnProperty("weaponID")&&(U.weaponID=B.json&&!isFinite(k.weaponID)?String(k.weaponID):k.weaponID),null!=k.bootsID&&k.hasOwnProperty("bootsID")&&(U.bootsID=B.json&&!isFinite(k.bootsID)?String(k.bootsID):k.bootsID),null!=k.costumeID&&k.hasOwnProperty("costumeID")&&(U.costumeID=B.json&&!isFinite(k.costumeID)?String(k.costumeID):k.costumeID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.PlayerHairProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.styleID=k.double();break;case 2:j.colorID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.styleID&&k.hasOwnProperty("styleID")&&"number"!=typeof k.styleID?"styleID: number expected":null!=k.colorID&&k.hasOwnProperty("colorID")&&"number"!=typeof k.colorID?"colorID: number expected":null},F.fromObject=function(k){if(k instanceof G.PlayerHairProto)return k;var B=new G.PlayerHairProto;return null!=k.styleID&&(B.styleID=Number(k.styleID)),null!=k.colorID&&(B.colorID=Number(k.colorID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.styleID=0,U.colorID=0),null!=k.styleID&&k.hasOwnProperty("styleID")&&(U.styleID=B.json&&!isFinite(k.styleID)?String(k.styleID):k.styleID),null!=k.colorID&&k.hasOwnProperty("colorID")&&(U.colorID=B.json&&!isFinite(k.colorID)?String(k.colorID):k.colorID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.PlayerNameProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.first=k.double();break;case 2:j.middle=k.double();break;case 3:j.last=k.double();break;case 4:j.nick=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.first&&k.hasOwnProperty("first")&&"number"!=typeof k.first?"first: number expected":null!=k.middle&&k.hasOwnProperty("middle")&&"number"!=typeof k.middle?"middle: number expected":null!=k.last&&k.hasOwnProperty("last")&&"number"!=typeof k.last?"last: number expected":null!=k.nick&&k.hasOwnProperty("nick")&&"number"!=typeof k.nick?"nick: number expected":null},F.fromObject=function(k){if(k instanceof G.PlayerNameProto)return k;var B=new G.PlayerNameProto;return null!=k.first&&(B.first=Number(k.first)),null!=k.middle&&(B.middle=Number(k.middle)),null!=k.last&&(B.last=Number(k.last)),null!=k.nick&&(B.nick=Number(k.nick)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.first=0,U.middle=0,U.last=0,U.nick=0),null!=k.first&&k.hasOwnProperty("first")&&(U.first=B.json&&!isFinite(k.first)?String(k.first):k.first),null!=k.middle&&k.hasOwnProperty("middle")&&(U.middle=B.json&&!isFinite(k.middle)?String(k.middle):k.middle),null!=k.last&&k.hasOwnProperty("last")&&(U.last=B.json&&!isFinite(k.last)?String(k.last):k.last),null!=k.nick&&k.hasOwnProperty("nick")&&(U.nick=B.json&&!isFinite(k.nick)?String(k.nick):k.nick),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.PlayerPetProto=function(){function j(k){if(this.foreignSpells=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.ID=k.double();break;case 2:j.stars=k.double();break;case 3:j.team=k.double();break;case 4:j.level=k.double();break;case 5:j.levelCaught=k.double();break;case 6:if(j.foreignSpells&&j.foreignSpells.length||(j.foreignSpells=[]),2==(7&$))for(var H=k.uint32()+k.pos;k.pos>>3){case 1:j.matchDetails=G.CoOpTeamMatchDetailsProto.decode(k,k.uint32());break;case 2:j.titanNetworkID=k.double();break;case 3:j.titanAssetID=k.double();break;case 4:j.titanHP=k.double();break;case 5:j.crystalHP=k.double();break;case 6:j.titanXPBounty=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.matchDetails&&k.hasOwnProperty("matchDetails")){var B=G.CoOpTeamMatchDetailsProto.verify(k.matchDetails);if(B)return"matchDetails."+B}return null!=k.titanNetworkID&&k.hasOwnProperty("titanNetworkID")&&"number"!=typeof k.titanNetworkID?"titanNetworkID: number expected":null!=k.titanAssetID&&k.hasOwnProperty("titanAssetID")&&"number"!=typeof k.titanAssetID?"titanAssetID: number expected":null!=k.titanHP&&k.hasOwnProperty("titanHP")&&"number"!=typeof k.titanHP?"titanHP: number expected":null!=k.crystalHP&&k.hasOwnProperty("crystalHP")&&"number"!=typeof k.crystalHP?"crystalHP: number expected":null!=k.titanXPBounty&&k.hasOwnProperty("titanXPBounty")&&"number"!=typeof k.titanXPBounty?"titanXPBounty: number expected":null},F.fromObject=function(k){if(k instanceof G.StartCoOpTitanMatchProto)return k;var B=new G.StartCoOpTitanMatchProto;if(null!=k.matchDetails){if("object"!=typeof k.matchDetails)throw TypeError(".StartCoOpTitanMatchProto.matchDetails: object expected");B.matchDetails=G.CoOpTeamMatchDetailsProto.fromObject(k.matchDetails)}return null!=k.titanNetworkID&&(B.titanNetworkID=Number(k.titanNetworkID)),null!=k.titanAssetID&&(B.titanAssetID=Number(k.titanAssetID)),null!=k.titanHP&&(B.titanHP=Number(k.titanHP)),null!=k.crystalHP&&(B.crystalHP=Number(k.crystalHP)),null!=k.titanXPBounty&&(B.titanXPBounty=Number(k.titanXPBounty)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.matchDetails=null,U.titanNetworkID=0,U.titanAssetID=0,U.titanHP=0,U.crystalHP=0,U.titanXPBounty=0),null!=k.matchDetails&&k.hasOwnProperty("matchDetails")&&(U.matchDetails=G.CoOpTeamMatchDetailsProto.toObject(k.matchDetails,B)),null!=k.titanNetworkID&&k.hasOwnProperty("titanNetworkID")&&(U.titanNetworkID=B.json&&!isFinite(k.titanNetworkID)?String(k.titanNetworkID):k.titanNetworkID),null!=k.titanAssetID&&k.hasOwnProperty("titanAssetID")&&(U.titanAssetID=B.json&&!isFinite(k.titanAssetID)?String(k.titanAssetID):k.titanAssetID),null!=k.titanHP&&k.hasOwnProperty("titanHP")&&(U.titanHP=B.json&&!isFinite(k.titanHP)?String(k.titanHP):k.titanHP),null!=k.crystalHP&&k.hasOwnProperty("crystalHP")&&(U.crystalHP=B.json&&!isFinite(k.crystalHP)?String(k.crystalHP):k.crystalHP),null!=k.titanXPBounty&&k.hasOwnProperty("titanXPBounty")&&(U.titanXPBounty=B.json&&!isFinite(k.titanXPBounty)?String(k.titanXPBounty):k.titanXPBounty),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.CoOpTitanHostReadyCheckProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null},F.fromObject=function(k){if(k instanceof G.CoOpTitanHostReadyCheckProto)return k;var B=new G.CoOpTitanHostReadyCheckProto;return null!=k.userID&&(B.userID=Number(k.userID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.CoOpTitanHostReadyResponseProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.currentTitanHP=k.double();break;case 2:j.currentCrystalHP=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.currentTitanHP&&k.hasOwnProperty("currentTitanHP")&&"number"!=typeof k.currentTitanHP?"currentTitanHP: number expected":null!=k.currentCrystalHP&&k.hasOwnProperty("currentCrystalHP")&&"number"!=typeof k.currentCrystalHP?"currentCrystalHP: number expected":null},F.fromObject=function(k){if(k instanceof G.CoOpTitanHostReadyResponseProto)return k;var B=new G.CoOpTitanHostReadyResponseProto;return null!=k.currentTitanHP&&(B.currentTitanHP=Number(k.currentTitanHP)),null!=k.currentCrystalHP&&(B.currentCrystalHP=Number(k.currentCrystalHP)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.currentTitanHP=0,U.currentCrystalHP=0),null!=k.currentTitanHP&&k.hasOwnProperty("currentTitanHP")&&(U.currentTitanHP=B.json&&!isFinite(k.currentTitanHP)?String(k.currentTitanHP):k.currentTitanHP),null!=k.currentCrystalHP&&k.hasOwnProperty("currentCrystalHP")&&(U.currentCrystalHP=B.json&&!isFinite(k.currentCrystalHP)?String(k.currentCrystalHP):k.currentCrystalHP),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.CoOpTitanPlayerAttackedProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;case 2:j.missed=k.bool();break;case 3:j.titanHealth=k.double();break;case 4:j.damage=k.double();break;case 5:j.spellID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null!=k.missed&&k.hasOwnProperty("missed")&&"boolean"!=typeof k.missed?"missed: boolean expected":null!=k.titanHealth&&k.hasOwnProperty("titanHealth")&&"number"!=typeof k.titanHealth?"titanHealth: number expected":null!=k.damage&&k.hasOwnProperty("damage")&&"number"!=typeof k.damage?"damage: number expected":null!=k.spellID&&k.hasOwnProperty("spellID")&&"number"!=typeof k.spellID?"spellID: number expected":null},F.fromObject=function(k){if(k instanceof G.CoOpTitanPlayerAttackedProto)return k;var B=new G.CoOpTitanPlayerAttackedProto;return null!=k.userID&&(B.userID=Number(k.userID)),null!=k.missed&&(B.missed=Boolean(k.missed)),null!=k.titanHealth&&(B.titanHealth=Number(k.titanHealth)),null!=k.damage&&(B.damage=Number(k.damage)),null!=k.spellID&&(B.spellID=Number(k.spellID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0,U.missed=!1,U.titanHealth=0,U.damage=0,U.spellID=0),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),null!=k.missed&&k.hasOwnProperty("missed")&&(U.missed=k.missed),null!=k.titanHealth&&k.hasOwnProperty("titanHealth")&&(U.titanHealth=B.json&&!isFinite(k.titanHealth)?String(k.titanHealth):k.titanHealth),null!=k.damage&&k.hasOwnProperty("damage")&&(U.damage=B.json&&!isFinite(k.damage)?String(k.damage):k.damage),null!=k.spellID&&k.hasOwnProperty("spellID")&&(U.spellID=B.json&&!isFinite(k.spellID)?String(k.spellID):k.spellID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.CoOpTitanTitanAttackedProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.missed=k.bool();break;case 2:j.crystalHP=k.double();break;case 3:j.damage=k.double();break;case 4:j.spellID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.missed&&k.hasOwnProperty("missed")&&"boolean"!=typeof k.missed?"missed: boolean expected":null!=k.crystalHP&&k.hasOwnProperty("crystalHP")&&"number"!=typeof k.crystalHP?"crystalHP: number expected":null!=k.damage&&k.hasOwnProperty("damage")&&"number"!=typeof k.damage?"damage: number expected":null!=k.spellID&&k.hasOwnProperty("spellID")&&"number"!=typeof k.spellID?"spellID: number expected":null},F.fromObject=function(k){if(k instanceof G.CoOpTitanTitanAttackedProto)return k;var B=new G.CoOpTitanTitanAttackedProto;return null!=k.missed&&(B.missed=Boolean(k.missed)),null!=k.crystalHP&&(B.crystalHP=Number(k.crystalHP)),null!=k.damage&&(B.damage=Number(k.damage)),null!=k.spellID&&(B.spellID=Number(k.spellID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.missed=!1,U.crystalHP=0,U.damage=0,U.spellID=0),null!=k.missed&&k.hasOwnProperty("missed")&&(U.missed=k.missed),null!=k.crystalHP&&k.hasOwnProperty("crystalHP")&&(U.crystalHP=B.json&&!isFinite(k.crystalHP)?String(k.crystalHP):k.crystalHP),null!=k.damage&&k.hasOwnProperty("damage")&&(U.damage=B.json&&!isFinite(k.damage)?String(k.damage):k.damage),null!=k.spellID&&k.hasOwnProperty("spellID")&&(U.spellID=B.json&&!isFinite(k.spellID)?String(k.spellID):k.spellID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.CoOpTitanQuestionAnsweredProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;case 2:j.correct=k.bool();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null!=k.correct&&k.hasOwnProperty("correct")&&"boolean"!=typeof k.correct?"correct: boolean expected":null},F.fromObject=function(k){if(k instanceof G.CoOpTitanQuestionAnsweredProto)return k;var B=new G.CoOpTitanQuestionAnsweredProto;return null!=k.userID&&(B.userID=Number(k.userID)),null!=k.correct&&(B.correct=Boolean(k.correct)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0,U.correct=!1),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),null!=k.correct&&k.hasOwnProperty("correct")&&(U.correct=k.correct),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.Mail=function(){function j(k){if(this.emails=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.emails&&j.emails.length||(j.emails=[]),j.emails.push(G.MailData.decode(k,k.uint32()));break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.emails&&k.hasOwnProperty("emails")){if(!Array.isArray(k.emails))return"emails: array expected";for(var B=0;B>>3){case 1:j.id=k.double();break;case 2:j.rawData=G.MailData.decode(k,k.uint32());break;case 3:j.userID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.id&&k.hasOwnProperty("id")&&"number"!=typeof k.id)return"id: number expected";if(null!=k.rawData&&k.hasOwnProperty("rawData")){var B=G.MailData.verify(k.rawData);if(B)return"rawData."+B}return null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null},F.fromObject=function(k){if(k instanceof G.OpenMailData)return k;var B=new G.OpenMailData;if(null!=k.id&&(B.id=Number(k.id)),null!=k.rawData){if("object"!=typeof k.rawData)throw TypeError(".OpenMailData.rawData: object expected");B.rawData=G.MailData.fromObject(k.rawData)}return null!=k.userID&&(B.userID=Number(k.userID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.id=0,U.rawData=null,U.userID=0),null!=k.id&&k.hasOwnProperty("id")&&(U.id=B.json&&!isFinite(k.id)?String(k.id):k.id),null!=k.rawData&&k.hasOwnProperty("rawData")&&(U.rawData=G.MailData.toObject(k.rawData,B)),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.MailData=function(){function j(k){if(this.attachments=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.id=k.double();break;case 2:j.isOpened=k.bool();break;case 3:j.subject=k.string();break;case 4:j.image=k.string();break;case 5:j.vImage=k.int32();break;case 6:j.message=k.string();break;case 7:j.attachments&&j.attachments.length||(j.attachments=[]),j.attachments.push(G.Attachment.decode(k,k.uint32()));break;case 8:j.gameMethod=G.GameMethod.decode(k,k.uint32());break;case 9:j.splitTest=k.string();break;case 10:j.membership=k.int32();break;case 11:j.userName=k.string();break;case 12:j.expiryDate=k.string();break;case 13:j.sendDate=k.string();break;case 14:j.name=k.string();break;case 15:j.extension=G.ExtensionData.decode(k,k.uint32());break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.id&&k.hasOwnProperty("id")&&"number"!=typeof k.id)return"id: number expected";if(null!=k.isOpened&&k.hasOwnProperty("isOpened")&&"boolean"!=typeof k.isOpened)return"isOpened: boolean expected";if(null!=k.subject&&k.hasOwnProperty("subject")&&!F.isString(k.subject))return"subject: string expected";if(null!=k.image&&k.hasOwnProperty("image")&&!F.isString(k.image))return"image: string expected";if(null!=k.vImage&&k.hasOwnProperty("vImage")&&!F.isInteger(k.vImage))return"vImage: integer expected";if(null!=k.message&&k.hasOwnProperty("message")&&!F.isString(k.message))return"message: string expected";if(null!=k.attachments&&k.hasOwnProperty("attachments")){if(!Array.isArray(k.attachments))return"attachments: array expected";for(var B=0;B>>3){case 1:j.ID=k.double();break;case 2:j.type=k.string();break;case 3:j.N=k.int32();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.ID&&k.hasOwnProperty("ID")&&"number"!=typeof k.ID?"ID: number expected":null!=k.type&&k.hasOwnProperty("type")&&!F.isString(k.type)?"type: string expected":null!=k.N&&k.hasOwnProperty("N")&&!F.isInteger(k.N)?"N: integer expected":null},j.fromObject=function(k){if(k instanceof G.Attachment)return k;var B=new G.Attachment;return null!=k.ID&&(B.ID=Number(k.ID)),null!=k.type&&(B.type=String(k.type)),null!=k.N&&(B.N=0|k.N),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.ID=0,U.type="",U.N=0),null!=k.ID&&k.hasOwnProperty("ID")&&(U.ID=B.json&&!isFinite(k.ID)?String(k.ID):k.ID),null!=k.type&&k.hasOwnProperty("type")&&(U.type=k.type),null!=k.N&&k.hasOwnProperty("N")&&(U.N=k.N),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.GameMethod=function(){function j(k){if(this.params=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.name=k.string();break;case 2:j.buttonText=k.string();break;case 3:j.params&&j.params.length||(j.params=[]),j.params.push(k.string());break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.name&&k.hasOwnProperty("name")&&!F.isString(k.name))return"name: string expected";if(null!=k.buttonText&&k.hasOwnProperty("buttonText")&&!F.isString(k.buttonText))return"buttonText: string expected";if(null!=k.params&&k.hasOwnProperty("params")){if(!Array.isArray(k.params))return"params: array expected";for(var B=0;B>>3){case 1:j.name=k.string();break;case 2:j.unOpenedFrame=k.string();break;case 3:j.openedFrame=k.string();break;case 4:j.trashButtonVisible=k.bool();break;case 5:j.deleteMailOnClose=k.bool();break;case 6:j.params&&j.params.length||(j.params=[]),j.params.push(k.string());break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.name&&k.hasOwnProperty("name")&&!F.isString(k.name))return"name: string expected";if(null!=k.unOpenedFrame&&k.hasOwnProperty("unOpenedFrame")&&!F.isString(k.unOpenedFrame))return"unOpenedFrame: string expected";if(null!=k.openedFrame&&k.hasOwnProperty("openedFrame")&&!F.isString(k.openedFrame))return"openedFrame: string expected";if(null!=k.trashButtonVisible&&k.hasOwnProperty("trashButtonVisible")&&"boolean"!=typeof k.trashButtonVisible)return"trashButtonVisible: boolean expected";if(null!=k.deleteMailOnClose&&k.hasOwnProperty("deleteMailOnClose")&&"boolean"!=typeof k.deleteMailOnClose)return"deleteMailOnClose: boolean expected";if(null!=k.params&&k.hasOwnProperty("params")){if(!Array.isArray(k.params))return"params: array expected";for(var B=0;B>>3){case 1:j.roomID=k.string();break;case 2:j.userID=k.double();break;case 3:j.appearance=G.PlayerAppearanceProto.decode(k,k.uint32());break;case 4:j.equipment=G.PlayerEquipmentProto.decode(k,k.uint32());break;case 5:j.name=G.PlayerNameProto.decode(k,k.uint32());break;case 6:j.level=k.double();break;case 7:j.member=k.double();break;case 8:j.team=k.double();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.roomID&&k.hasOwnProperty("roomID")&&!F.isString(k.roomID)?"roomID: string expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null!=k.appearance&&k.hasOwnProperty("appearance")&&(B=G.PlayerAppearanceProto.verify(k.appearance))?"appearance."+B:null!=k.equipment&&k.hasOwnProperty("equipment")&&(B=G.PlayerEquipmentProto.verify(k.equipment))?"equipment."+B:null!=k.name&&k.hasOwnProperty("name")&&(B=G.PlayerNameProto.verify(k.name))?"name."+B:null!=k.level&&k.hasOwnProperty("level")&&"number"!=typeof k.level?"level: number expected":null!=k.member&&k.hasOwnProperty("member")&&"number"!=typeof k.member?"member: number expected":null!=k.team&&k.hasOwnProperty("team")&&"number"!=typeof k.team?"team: number expected":null;var B},j.fromObject=function(k){if(k instanceof G.DuelInviteProto)return k;var B=new G.DuelInviteProto;if(null!=k.roomID&&(B.roomID=String(k.roomID)),null!=k.userID&&(B.userID=Number(k.userID)),null!=k.appearance){if("object"!=typeof k.appearance)throw TypeError(".DuelInviteProto.appearance: object expected");B.appearance=G.PlayerAppearanceProto.fromObject(k.appearance)}if(null!=k.equipment){if("object"!=typeof k.equipment)throw TypeError(".DuelInviteProto.equipment: object expected");B.equipment=G.PlayerEquipmentProto.fromObject(k.equipment)}if(null!=k.name){if("object"!=typeof k.name)throw TypeError(".DuelInviteProto.name: object expected");B.name=G.PlayerNameProto.fromObject(k.name)}return null!=k.level&&(B.level=Number(k.level)),null!=k.member&&(B.member=Number(k.member)),null!=k.team&&(B.team=Number(k.team)),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.roomID="",U.userID=0,U.appearance=null,U.equipment=null,U.name=null,U.level=0,U.member=0,U.team=0),null!=k.roomID&&k.hasOwnProperty("roomID")&&(U.roomID=k.roomID),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),null!=k.appearance&&k.hasOwnProperty("appearance")&&(U.appearance=G.PlayerAppearanceProto.toObject(k.appearance,B)),null!=k.equipment&&k.hasOwnProperty("equipment")&&(U.equipment=G.PlayerEquipmentProto.toObject(k.equipment,B)),null!=k.name&&k.hasOwnProperty("name")&&(U.name=G.PlayerNameProto.toObject(k.name,B)),null!=k.level&&k.hasOwnProperty("level")&&(U.level=B.json&&!isFinite(k.level)?String(k.level):k.level),null!=k.member&&k.hasOwnProperty("member")&&(U.member=B.json&&!isFinite(k.member)?String(k.member):k.member),null!=k.team&&k.hasOwnProperty("team")&&(U.team=B.json&&!isFinite(k.team)?String(k.team):k.team),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.DuelRejectionProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null},F.fromObject=function(k){if(k instanceof G.DuelRejectionProto)return k;var B=new G.DuelRejectionProto;return null!=k.userID&&(B.userID=Number(k.userID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.DuelCancellationProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null},F.fromObject=function(k){if(k instanceof G.DuelCancellationProto)return k;var B=new G.DuelCancellationProto;return null!=k.userID&&(B.userID=Number(k.userID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.PvPReadyProto=function(){function F(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID?"userID: number expected":null},F.fromObject=function(k){if(k instanceof G.PvPReadyProto)return k;var B=new G.PvPReadyProto;return null!=k.userID&&(B.userID=Number(k.userID)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.userID=0),null!=k.userID&&k.hasOwnProperty("userID")&&(U.userID=B.json&&!isFinite(k.userID)?String(k.userID):k.userID),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.PvPTeamProto=function(){function j(k){if(this.pets=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.userID=k.double();break;case 2:j.pets&&j.pets.length||(j.pets=[]),j.pets.push(G.PlayerPetProto.decode(k,k.uint32()));break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.userID&&k.hasOwnProperty("userID")&&"number"!=typeof k.userID)return"userID: number expected";if(null!=k.pets&&k.hasOwnProperty("pets")){if(!Array.isArray(k.pets))return"pets: array expected";for(var B=0;B>>3){case 1:V.id=k.double();break;case 2:V.type=k.string();break;case 4:V.answers&&V.answers.length||(V.answers=[]),V.answers.push(G.SurveyAnswerData.decode(k,k.uint32()));break;case 5:V.questionText===F.emptyObject&&(V.questionText={});var q=k.uint32()+k.pos;for(j="",$="";k.pos>>3){case 1:j=k.string();break;case 2:$=k.string();break;default:k.skipType(7&K)}}V.questionText[j]=$;break;default:k.skipType(7&W)}}return V},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.id&&k.hasOwnProperty("id")&&"number"!=typeof k.id)return"id: number expected";if(null!=k.type&&k.hasOwnProperty("type")&&!F.isString(k.type))return"type: string expected";if(null!=k.answers&&k.hasOwnProperty("answers")){if(!Array.isArray(k.answers))return"answers: array expected";for(var B=0;B>>3){case 1:j.randomizeAnswers=k.bool();break;default:k.skipType(7&$)}}return j},F.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.randomizeAnswers&&k.hasOwnProperty("randomizeAnswers")&&"boolean"!=typeof k.randomizeAnswers?"randomizeAnswers: boolean expected":null},F.fromObject=function(k){if(k instanceof G.SurveySettings)return k;var B=new G.SurveySettings;return null!=k.randomizeAnswers&&(B.randomizeAnswers=Boolean(k.randomizeAnswers)),B},F.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.randomizeAnswers=!1),null!=k.randomizeAnswers&&k.hasOwnProperty("randomizeAnswers")&&(U.randomizeAnswers=k.randomizeAnswers),U},F.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},F}(),G.SurveyReward=function(){function j(k){if(k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.ID=k.double();break;case 2:j.N=k.double();break;case 3:j.type=k.string();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.ID&&k.hasOwnProperty("ID")&&"number"!=typeof k.ID?"ID: number expected":null!=k.N&&k.hasOwnProperty("N")&&"number"!=typeof k.N?"N: number expected":null!=k.type&&k.hasOwnProperty("type")&&!F.isString(k.type)?"type: string expected":null},j.fromObject=function(k){if(k instanceof G.SurveyReward)return k;var B=new G.SurveyReward;return null!=k.ID&&(B.ID=Number(k.ID)),null!=k.N&&(B.N=Number(k.N)),null!=k.type&&(B.type=String(k.type)),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.ID=0,U.N=0,U.type=""),null!=k.ID&&k.hasOwnProperty("ID")&&(U.ID=B.json&&!isFinite(k.ID)?String(k.ID):k.ID),null!=k.N&&k.hasOwnProperty("N")&&(U.N=B.json&&!isFinite(k.N)?String(k.N):k.N),null!=k.type&&k.hasOwnProperty("type")&&(U.type=k.type),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G.SurveyData=function(){function j(k){if(this.data=[],this.rewards=[],k)for(var B=Object.keys(k),U=0;U>>3){case 1:j.id=k.double();break;case 2:j.name=k.string();break;case 3:j.data&&j.data.length||(j.data=[]),j.data.push(G.SurveyQuestionData.decode(k,k.uint32()));break;case 4:j.startDate=k.string();break;case 5:j.endDate=k.string();break;case 6:j.rewards&&j.rewards.length||(j.rewards=[]),j.rewards.push(G.SurveyReward.decode(k,k.uint32()));break;case 7:j.settings=G.SurveySettings.decode(k,k.uint32());break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.id&&k.hasOwnProperty("id")&&"number"!=typeof k.id)return"id: number expected";if(null!=k.name&&k.hasOwnProperty("name")&&!F.isString(k.name))return"name: string expected";if(null!=k.data&&k.hasOwnProperty("data")){if(!Array.isArray(k.data))return"data: array expected";for(var B=0;B>>3){case 1:V.id=k.string();break;case 3:V.text===F.emptyObject&&(V.text={});var q=k.uint32()+k.pos;for(j="",$="";k.pos>>3){case 1:j=k.string();break;case 2:$=k.string();break;default:k.skipType(7&K)}}V.text[j]=$;break;case 4:V.image=G.SurveyAnswerImage.decode(k,k.uint32());break;default:k.skipType(7&W)}}return V},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.id&&k.hasOwnProperty("id")&&!F.isString(k.id))return"id: string expected";if(null!=k.text&&k.hasOwnProperty("text")){if(!F.isObject(k.text))return"text: object expected";for(var B=Object.keys(k.text),U=0;U>>3){case 1:j.data&&j.data.length||(j.data=[]),j.data.push(G.SurveyData.decode(k,k.uint32()));break;case 2:j.lastAnswerDate=k.string();break;default:k.skipType(7&$)}}return j},j.verify=function(k){if("object"!=typeof k||null===k)return"object expected";if(null!=k.data&&k.hasOwnProperty("data")){if(!Array.isArray(k.data))return"data: array expected";for(var B=0;B>>3){case 1:j.label=k.string();break;default:k.skipType(7&$)}}return j},j.verify=function(k){return"object"!=typeof k||null===k?"object expected":null!=k.label&&k.hasOwnProperty("label")&&!F.isString(k.label)?"label: string expected":null},j.fromObject=function(k){if(k instanceof G.SurveyAnswerImage)return k;var B=new G.SurveyAnswerImage;return null!=k.label&&(B.label=String(k.label)),B},j.toObject=function(k,B){B||(B={});var U={};return B.defaults&&(U.label=""),null!=k.label&&k.hasOwnProperty("label")&&(U.label=k.label),U},j.prototype.toJSON=function(){return this.constructor.toObject(this,k.util.toJSONOptions)},j}(),G})?F.apply(B,G):F)||(k.exports=j)},8157:(k,B,U)=>{"use strict";U.d(B,{wh:()=>F,aG:()=>G,Q1:()=>Q,cj:()=>Z,qU:()=>j,mj:()=>$,bC:()=>et,pw:()=>H,Dr:()=>V,bJ:()=>Kt,eE:()=>z,QL:()=>K,_C:()=>W,Aq:()=>tt,I9:()=>it,W0:()=>st});var F=(k=>(k[k.Region=0]="Region",k[k.BoundingBox=1]="BoundingBox",k[k.Mesh=2]="Mesh",k[k.LinkedMesh=3]="LinkedMesh",k[k.Path=4]="Path",k[k.Point=5]="Point",k[k.Clipping=6]="Clipping",k))(F||{});class G{constructor(k,B=new Array,U=0,F=new DataView(k.buffer)){this.strings=B,this.index=U,this.buffer=F}readByte(){return this.buffer.getInt8(this.index++)}readUnsignedByte(){return this.buffer.getUint8(this.index++)}readShort(){const k=this.buffer.getInt16(this.index);return this.index+=2,k}readInt32(){const k=this.buffer.getInt32(this.index);return this.index+=4,k}readInt(k){let B=this.readByte(),U=127&B;return 0!=(128&B)&&(B=this.readByte(),U|=(127&B)<<7,0!=(128&B)&&(B=this.readByte(),U|=(127&B)<<14,0!=(128&B)&&(B=this.readByte(),U|=(127&B)<<21,0!=(128&B)&&(B=this.readByte(),U|=(127&B)<<28)))),k?U:U>>>1^-(1&U)}readStringRef(){const k=this.readInt(!0);return 0==k?null:this.strings[k-1]}readString(){let k=this.readInt(!0);switch(k){case 0:return null;case 1:return""}k--;let B="";for(let U=0;U>4){case 12:case 13:B+=String.fromCharCode((31&k)<<6|63&this.readByte()),U+=2;break;case 14:B+=String.fromCharCode((15&k)<<12|(63&this.readByte())<<6|63&this.readByte()),U+=3;break;default:B+=String.fromCharCode(k),U++}}return B}readFloat(){const k=this.buffer.getFloat32(this.index);return this.index+=4,k}readBoolean(){return 0!=this.readByte()}}var j=(k=>(k[k.setup=0]="setup",k[k.first=1]="first",k[k.replace=2]="replace",k[k.add=3]="add",k))(j||{}),$=(k=>(k[k.mixIn=0]="mixIn",k[k.mixOut=1]="mixOut",k))($||{}),H=(k=>(k[k.Fixed=0]="Fixed",k[k.Percent=1]="Percent",k))(H||{}),V=(k=>(k[k.Tangent=0]="Tangent",k[k.Chain=1]="Chain",k[k.ChainScale=2]="ChainScale",k))(V||{}),W=(k=>(k[k.Normal=0]="Normal",k[k.OnlyTranslation=1]="OnlyTranslation",k[k.NoRotationOrReflection=2]="NoRotationOrReflection",k[k.NoScale=3]="NoScale",k[k.NoScaleOrReflection=4]="NoScaleOrReflection",k))(W||{}),q=U(22478);class K{constructor(){this.size=null,this.names=null,this.values=null,this.renderObject=null}get width(){const k=this.texture;return k.trim?k.trim.width:k.orig.width}get height(){const k=this.texture;return k.trim?k.trim.height:k.orig.height}get u(){return this.texture._uvs.x0}get v(){return this.texture._uvs.y0}get u2(){return this.texture._uvs.x2}get v2(){return this.texture._uvs.y2}get offsetX(){const k=this.texture;return k.trim?k.trim.x:0}get offsetY(){return this.spineOffsetY}get pixiOffsetY(){const k=this.texture;return k.trim?k.trim.y:0}get spineOffsetY(){const k=this.texture;return this.originalHeight-this.height-(k.trim?k.trim.y:0)}get originalWidth(){return this.texture.orig.width}get originalHeight(){return this.texture.orig.height}get x(){return this.texture.frame.x}get y(){return this.texture.frame.y}get rotate(){return 0!==this.texture.rotate}get degrees(){return(360-45*this.texture.rotate)%360}}class z{constructor(){this.entries={},this.size=0}add(k){const B=this.entries[k];return this.entries[k]=!0,!B&&(this.size++,!0)}addAll(k){const B=this.size;for(let U=0,F=k.length;U1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(k,B){k.r=((4278190080&B)>>>24)/255,k.g=((16711680&B)>>>16)/255,k.b=((65280&B)>>>8)/255,k.a=(255&B)/255}static rgb888ToColor(k,B){k.r=((16711680&B)>>>16)/255,k.g=((65280&B)>>>8)/255,k.b=(255&B)/255}static fromString(k){return(new Y).setFromString(k)}};let Q=Y;Q.WHITE=new Y(1,1,1,1),Q.RED=new Y(1,0,0,1),Q.GREEN=new Y(0,1,0,1),Q.BLUE=new Y(0,0,1,1),Q.MAGENTA=new Y(1,0,1,1);const X=class{static clamp(k,B,U){return kU?U:k}static cosDeg(k){return Math.cos(k*X.degRad)}static sinDeg(k){return Math.sin(k*X.degRad)}static signum(k){return Math.sign(k)}static toInt(k){return k>0?Math.floor(k):Math.ceil(k)}static cbrt(k){const B=Math.pow(Math.abs(k),1/3);return k<0?-B:B}static randomTriangular(k,B){return X.randomTriangularWith(k,B,.5*(k+B))}static randomTriangularWith(k,B,U){const F=Math.random(),G=B-k;return F<=(U-k)/G?k+Math.sqrt(F*G*(U-k)):B-Math.sqrt((1-F)*G*(B-U))}static isPowerOfTwo(k){return k&&0==(k&k-1)}};let Z=X;Z.PI=3.1415927,Z.PI2=2*X.PI,Z.radiansToDegrees=180/X.PI,Z.radDeg=X.radiansToDegrees,Z.degreesToRadians=X.PI/180,Z.degRad=X.degreesToRadians;const J=class{static arrayCopy(k,B,U,F,G){for(let j=B,$=F;j=B?k:J.setArraySize(k,B,U)}static newArray(k,B){const U=new Array(k);for(let F=0;F0?this.items.pop():this.instantiator()}free(k){k.reset&&k.reset(),this.items.push(k)}freeAll(k){for(let B=0;B=F&&at.x=G&&at.y=0&&H>=0&&G>=0&&j>=0))return void(B.length=0);const V=Math.ceil(2.3*Math.sqrt($+H)),W=8*V+(G?4:0)+(j?4:0);if(B.length=W,0===W)return;if(0===V)return B.length=8,B[0]=B[6]=U+G,B[1]=B[3]=F+j,B[2]=B[4]=U-G,void(B[5]=B[7]=F-j);let K=0,z=4*V+(G?2:0)+2,Y=z,Q=W;{const k=G+$,H=j,V=U+k,W=U-k,q=F+H;if(B[K++]=V,B[K++]=q,B[--z]=q,B[--z]=W,j){const k=F-H;B[Y++]=W,B[Y++]=k,B[--Q]=k,B[--Q]=V}}for(let q=1;q0||B&&F<=0){const B=U/2;for(let F=B+B%2;F=6){gt(U,!1);const k=[];for(let G=0;G=0&&j>=0&&$.push(U,F,U+G,F,U+G,F+j,U,F+j)},triangulate(k,B){const U=k.points,F=B.points;if(0===U.length)return;const G=F.length/2;F.push(U[0],U[1],U[2],U[3],U[6],U[7],U[4],U[5]),B.indices.push(G,G+1,G+2,G+1,G+2,G+3)}},_t={build(k){vt.build(k)},triangulate(k,B){vt.triangulate(k,B)}};var Et=(k=>(k.MITER="miter",k.BEVEL="bevel",k.ROUND="round",k))(Et||{}),wt=(k=>(k.BUTT="butt",k.ROUND="round",k.SQUARE="square",k))(wt||{});const Tt={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(k,B=20){if(!this.adaptive||!k||isNaN(k))return B;let U=Math.ceil(k/this.maxLength);return Uthis.maxSegments&&(U=this.maxSegments),U}};class St{static curveTo(k,B,U,F,G,j){const $=j[j.length-2],H=j[j.length-1]-B,V=$-k,W=F-B,q=U-k,K=Math.abs(H*q-V*W);if(K<1e-8||0===G)return(j[j.length-2]!==k||j[j.length-1]!==B)&&j.push(k,B),null;const z=H*H+V*V,Y=W*W+q*q,Q=H*W+V*q,X=G*Math.sqrt(z)/K,Z=G*Math.sqrt(Y)/K,J=X*Q/z,tt=Z*Q/Y,et=X*q+Z*V,it=X*W+Z*H,st=V*(Z+J),nt=H*(Z+J),at=q*(X+tt),rt=W*(X+tt);return{cx:et+k,cy:it+B,radius:G,startAngle:Math.atan2(nt-it,st-et),endAngle:Math.atan2(rt-it,at-et),anticlockwise:V*W>q*H}}static arc(k,B,U,F,G,j,$,H,V){const W=$-j,K=Tt._segmentsCount(Math.abs(W)*G,40*Math.ceil(Math.abs(W)/q.TO)),z=W/(2*K),Y=2*z,Q=Math.cos(z),X=Math.sin(z),Z=K-1,J=Z%1/Z;for(let q=0;q<=Z;++q){const k=z+j+Y*(q+J*q),B=Math.cos(k),$=-Math.sin(k);V.push((Q*B+X*$)*G+U,(Q*-$+X*B)*G+F)}}}class At{static curveLength(k,B,U,F,G,j,$,H){let V=0,W=0,q=0,K=0,z=0,Y=0,Q=0,X=0,Z=0,J=0,tt=0,et=k,it=B;for(let st=1;st<=10;++st)W=st/10,q=W*W,K=q*W,z=1-W,Y=z*z,Q=Y*z,X=Q*k+3*Y*W*U+3*z*q*G+K*$,Z=Q*B+3*Y*W*F+3*z*q*j+K*H,J=et-X,tt=it-Z,et=X,it=Z,V+=Math.sqrt(J*J+tt*tt);return V}static curveTo(k,B,U,F,G,j,$){const H=$[$.length-2],V=$[$.length-1];$.length-=2;const W=Tt._segmentsCount(At.curveLength(H,V,k,B,U,F,G,j));let q=0,K=0,z=0,Y=0,Q=0;$.push(H,V);for(let X=1,Z=0;X<=W;++X)Z=X/W,q=1-Z,K=q*q,z=K*q,Y=Z*Z,Q=Y*Z,$.push(z*H+3*K*Z*k+3*q*Y*U+Q*G,z*V+3*K*Z*B+3*q*Y*F+Q*j)}}function Ct(k,B,U,F,G,j,$,H){let V,W;$?(V=F,W=-U):(V=-F,W=U);const q=k-U*G+V,K=B-F*G+W,z=k+U*j+V,Y=B+F*j+W;return H.push(q,K,z,Y),2}function Ot(k,B,U,F,G,j,$,H){const V=U-k,W=F-B;let q=Math.atan2(V,W),K=Math.atan2(G-k,j-B);H&&qK&&(K+=2*Math.PI);let z=q;const Y=K-q,Q=Math.abs(Y),X=Math.sqrt(V*V+W*W),Z=1+(15*Q*Math.sqrt(X)/Math.PI>>0),J=Y/Z;if(z+=J,H){$.push(k,B,U,F);for(let U=1,F=z;U=0&&(j.join===Et.ROUND?Y+=Ot(it,st,it-rt*ut,st-ot*ut,it-ht*ut,st-ct*ut,K,!1)+4:Y+=2,K.push(it-ht*ft,st-ct*ft,it+ht*ut,st+ct*ut));continue}const W=(-rt+tt)*(-ot+st)-(-rt+it)*(-ot+et),z=(-ht+nt)*(-ct+st)-(-ht+it)*(-ct+at),Q=(k*z-U*W)/H,lt=(G*W-B*z)/H,bt=(Q-it)*(Q-it)+(lt-st)*(lt-st),pt=it+(Q-it)*ut,vt=st+(lt-st)*ut,gt=it-(Q-it)*ft,mt=st-(lt-st)*ft,yt=V?ut:ft,_t=bt<=Math.min(k*k+B*B,U*U+G*G)+yt*yt*Z;let wt=j.join;if(wt===Et.MITER&&bt/Z>J&&(wt=Et.BEVEL),_t)switch(wt){case Et.MITER:K.push(pt,vt,gt,mt);break;case Et.BEVEL:V?K.push(pt,vt,it+rt*ft,st+ot*ft,pt,vt,it+ht*ft,st+ct*ft):K.push(it-rt*ut,st-ot*ut,gt,mt,it-ht*ut,st-ct*ut,gt,mt),Y+=2;break;case Et.ROUND:V?(K.push(pt,vt,it+rt*ft,st+ot*ft),Y+=Ot(it,st,it+rt*ft,st+ot*ft,it+ht*ft,st+ct*ft,K,!0)+4,K.push(pt,vt,it+ht*ft,st+ct*ft)):(K.push(it-rt*ut,st-ot*ut,gt,mt),Y+=Ot(it,st,it-rt*ut,st-ot*ut,it-ht*ut,st-ct*ut,K,!1)+4,K.push(it-ht*ut,st-ct*ut,gt,mt))}else{switch(K.push(it-rt*ut,st-ot*ut,it+rt*ft,st+ot*ft),wt){case Et.MITER:V?K.push(gt,mt,gt,mt):K.push(pt,vt,pt,vt),Y+=2;break;case Et.ROUND:Y+=V?Ot(it,st,it+rt*ft,st+ot*ft,it+ht*ft,st+ct*ft,K,!0)+2:Ot(it,st,it-rt*ut,st-ot*ut,it-ht*ut,st-ct*ut,K,!1)+2}K.push(it-ht*ut,st-ct*ut,it+ht*ft,st+ct*ft),Y+=2}}tt=F[2*(z-2)],et=F[2*(z-2)+1],it=F[2*(z-1)],st=F[2*(z-1)+1],rt=-(et-st),ot=tt-it,dt=Math.sqrt(rt*rt+ot*ot),rt/=dt,ot/=dt,rt*=X,ot*=X,K.push(it-rt*ut,st-ot*ut,it+rt*ft,st+ot*ft),V||(j.cap===wt.ROUND?Y+=Ot(it-rt*(ut-ft)*.5,st-ot*(ut-ft)*.5,it-rt*ut,st-ot*ut,it+rt*ft,st+ot*ft,K,!1)+2:j.cap===wt.SQUARE&&(Y+=Ct(it,st,rt,ot,ut,ft,!1,K)));const bt=B.indices,pt=Tt.epsilon*Tt.epsilon;for(let q=Q;q0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(k,B=null,U=null,F=null){const G=new Nt(k,B,U,F);return this.graphicsData.push(G),this.dirty++,this}drawHole(k,B=null){if(!this.graphicsData.length)return null;const U=new Nt(k,null,null,B),F=this.graphicsData[this.graphicsData.length-1];return U.lineStyle=F.lineStyle,F.holes.push(U),this.dirty++,this}destroy(){super.destroy();for(let k=0;k0&&(U=this.batches[this.batches.length-1],F=U.style);for(let H=this.shapeIndex;H65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&$===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=$?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(k,B){return!(!k||!B||k.texture.baseTexture!==B.texture.baseTexture||k.color+k.alpha!==B.color+B.alpha||!!k.native!=!!B.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let k=0,B=this.graphicsData.length;k131070)return!1;const B=this.batches;for(let k=0;k0&&(F=Mt.pop(),F||(F=new q.hq,F.texArray=new q.cc),this.drawCalls.push(F)),F.start=W,F.size=0,F.texArray.count=0,F.type=V),X.touched=1,X._batchEnabled=k,X._batchLocation=G,X.wrapMode=q.uR.REPEAT,F.texArray.elements[F.texArray.count++]=X,G++)),F.size+=z.size,W+=z.size,$=X._batchLocation,this.addColors(B,Q.color,Q.alpha,z.attribSize,z.attribStart),this.addTextureIds(U,$,z.attribSize,z.attribStart)}q.t5._globalBatch=k,this.packAttributes()}packAttributes(){const k=this.points,B=this.uvs,U=this.colors,F=this.textureIds,G=new ArrayBuffer(3*k.length*4),j=new Float32Array(G),$=new Uint32Array(G);let H=0;for(let V=0;V0&&k.alpha>0;return U?(k.matrix&&(k.matrix=k.matrix.clone(),k.matrix.invert()),Object.assign(this._lineStyle,{visible:U},k)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const k=this.currentPath.points,B=this.currentPath.points.length;B>2&&(this.drawShape(this.currentPath),this.currentPath=new q.tS,this.currentPath.closeStroke=!1,this.currentPath.points.push(k[B-2],k[B-1]))}else this.currentPath=new q.tS,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(k,B){return this.startPoly(),this.currentPath.points[0]=k,this.currentPath.points[1]=B,this}lineTo(k,B){this.currentPath||this.moveTo(0,0);const U=this.currentPath.points,F=U[U.length-2],G=U[U.length-1];return(F!==k||G!==B)&&U.push(k,B),this}_initCurve(k=0,B=0){this.currentPath?0===this.currentPath.points.length&&(this.currentPath.points=[k,B]):this.moveTo(k,B)}quadraticCurveTo(k,B,U,F){this._initCurve();const G=this.currentPath.points;return 0===G.length&&this.moveTo(0,0),Dt.curveTo(k,B,U,F,G),this}bezierCurveTo(k,B,U,F,G,j){return this._initCurve(),At.curveTo(k,B,U,F,G,j,this.currentPath.points),this}arcTo(k,B,U,F,G){this._initCurve(k,B);const j=this.currentPath.points,$=St.curveTo(k,B,U,F,G,j);if($){const{cx:k,cy:B,radius:U,startAngle:F,endAngle:G,anticlockwise:j}=$;this.arc(k,B,U,F,G,j)}return this}arc(k,B,U,F,G,j=!1){if(F===G)return this;if(!j&&G<=F?G+=q.TO:j&&F<=G&&(F+=q.TO),G-F==0)return this;const $=k+Math.cos(F)*U,H=B+Math.sin(F)*U,V=this._geometry.closePointEps;let W=this.currentPath?this.currentPath.points:null;if(W){const k=Math.abs(W[W.length-2]-$),B=Math.abs(W[W.length-1]-H);k0;return U?(k.matrix&&(k.matrix=k.matrix.clone(),k.matrix.invert()),Object.assign(this._fillStyle,{visible:U},k)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(k,B,U,F){return this.drawShape(new q.M_(k,B,U,F))}drawRoundedRect(k,B,U,F,G){return this.drawShape(new q.TE(k,B,U,F,G))}drawCircle(k,B,U){return this.drawShape(new q.jl(k,B,U))}drawEllipse(k,B,U,F){return this.drawShape(new q.Pp(k,B,U,F))}drawPolygon(...k){let B,U=!0;const F=k[0];F.points?(U=F.closeStroke,B=F.points):B=Array.isArray(k[0])?k[0]:k;const G=new q.tS(B);return G.closeStroke=U,this.drawShape(G),this}drawShape(k){return this._holeMode?this._geometry.drawHole(k,this._matrix):this._geometry.drawShape(k,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const k=this._geometry.graphicsData;return!(1!==k.length||k[0].shape.type!==q.HY.RECT||k[0].matrix||k[0].holes.length||k[0].lineStyle.visible&&k[0].lineStyle.width)}_render(k){this.finishPoly();const B=this._geometry;B.updateBatches(),B.batchable?(this.batchDirty!==B.batchDirty&&this._populateBatches(),this._renderBatched(k)):(k.batch.flush(),this._renderDirect(k))}_populateBatches(){const k=this._geometry,B=this.blendMode,U=k.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=k.batchDirty,this.batches.length=U,this.vertexData=new Float32Array(k.points);for(let F=0;FB&&(k=B),this.state.update(k),this.state.apply(this.skeleton),!this.skeleton)return;this.skeleton.updateWorldTransform();const U=this.skeleton.slots,G=this.color;let j=null,$=null;G?(j=G.light,$=G.dark):j=this.tintRgb;for(let K=0,z=U.length;K{"use strict";U.d(B,{qd:()=>Rt,Qb:()=>Y,MR:()=>$t,yE:()=>Vt});var F=U(8157);class G{constructor(k){if(!k)throw new Error("name cannot be null.");this.name=k}}const j=class extends G{constructor(k){super(k),this.id=j.nextID++,this.bones=null,this.vertices=[],this.worldVerticesLength=0,this.timelineAttachment=this}computeWorldVerticesOld(k,B){this.computeWorldVertices(k,0,this.worldVerticesLength,B,0,2)}computeWorldVertices(k,B,U,F,G,j){U=G+(U>>1)*j;const $=k.bone.skeleton,H=k.deform;let V=this.vertices;const W=this.bones;if(!W){H.length>0&&(V=H);const $=k.bone.matrix,W=$.tx,q=$.ty,K=$.a,z=$.c,Y=$.b,Q=$.d;for(let k=B,H=G;H=this.regions.length&&(U=this.regions.length-1);const F=this.regions[U];B.region!=F&&(B.region=F)}getPath(k,B){let U=k;const F=(this.start+B).toString();for(let G=this.digits-F.length;G>0;G--)U+="0";return U+=F,U}static nextID(){return Q._nextID++}};let X=Q;X._nextID=0;var Z=(k=>(k[k.hold=0]="hold",k[k.once=1]="once",k[k.loop=2]="loop",k[k.pingpong=3]="pingpong",k[k.onceReverse=4]="onceReverse",k[k.loopReverse=5]="loopReverse",k[k.pingpongReverse=6]="pingpongReverse",k))(Z||{});const J=[0,1,2,3,4,5,6];class tt{constructor(k,B,U){if(this.timelines=[],this.timelineIds=new F.eE,!k)throw new Error("name cannot be null.");this.name=k,this.setTimelines(B),this.duration=U}setTimelines(k){if(!k)throw new Error("timelines cannot be null.");this.timelines=k,this.timelineIds.clear();for(let B=0;B0&&(B%=this.duration));const V=this.timelines;for(let W=0,q=V.length;WB)return F-1;return U-1}static search(k,B,U){const F=k.length;for(let G=U;GB)return G-U;return F-U}}class ot extends rt{constructor(k,B,U){super(k,U),this.curves=F.Aq.newFloatArray(k+18*B),this.curves[k-1]=1}setLinear(k){this.curves[k]=0}setStepped(k){this.curves[k]=1}shrink(k){const B=this.getFrameCount()+18*k;if(this.curves.length>B){const k=F.Aq.newFloatArray(B);F.Aq.arrayCopy(this.curves,0,k,0,B),this.curves=k}}setBezier(k,B,U,F,G,j,$,H,V,W,q){const K=this.curves;let z=this.getFrameCount()+18*k;0==U&&(K[B]=2+z);const Y=.03*(F-2*j+H),Q=.03*(G-2*$+V),X=.006*(3*(j-H)-F+W),Z=.006*(3*($-V)-G+q);let J=2*Y+X,tt=2*Q+Z,et=.3*(j-F)+Y+.16666667*X,it=.3*($-G)+Q+.16666667*Z,st=F+et,nt=G+it;for(let at=z+18;zk){const j=this.frames[B],$=this.frames[B+U];return $+(k-j)/(G[F]-j)*(G[F+1]-$)}const j=F+18;for(F+=2;F=k){const B=G[F-2],U=G[F-1];return U+(k-B)/(G[F]-B)*(G[F+1]-U)}B+=this.getFrameEntries();const $=G[j-2],H=G[j-1];return H+(k-$)/(this.frames[B]-$)*(this.frames[B+U]-H)}}class ht extends ot{constructor(k,B,U){super(k,B,[U])}getFrameEntries(){return 2}setFrame(k,B,U){k<<=1,this.frames[k]=B,this.frames[k+1]=U}getCurveValue(k){const B=this.frames;let U=B.length-2;for(let G=2;G<=U;G+=2)if(B[G]>k){U=G-2;break}const F=this.curves[U>>1];switch(F){case 0:const F=B[U],G=B[U+1];return G+(k-F)/(B[U+2]-F)*(B[U+2+1]-G);case 1:return B[U+1]}return this.getBezierValue(k,U,1,F-2)}}class ct extends ht{constructor(k,B,U){super(k,B,`${et}|${U}`),this.boneIndex=0,this.boneIndex=U}apply(k,B,U,G,j,$,H){const V=k.bones[this.boneIndex];if(!V.active)return;if(UU)this.apply(k,B,Number.MAX_VALUE,F,G,j,$),B=-1;else if(B>=H[V-1])return;if(U0&&H[W-1]==k;)W--}for(;W=H[W];W++)F.push(this.events[W])}};let ut=lt;ut.propertyIds=[`${st}`];const ft=class extends rt{constructor(k){super(k,ft.propertyIds),this.drawOrders=new Array(k)}getFrameCount(){return this.frames.length}setFrame(k,B,U){this.frames[k]=B,this.drawOrders[k]=U}apply(k,B,U,G,j,$,H){if(H==F.mj.mixOut)return void($==F.qU.setup&&F.Aq.arrayCopy(k.slots,0,k.drawOrder,0,k.slots.length));if(U>4;const it=this.attachment.sequence.regions.length,st=J[15&X];if(st!=Z.hold)switch(et+=(U-Q)/tt+1e-5|0,st){case Z.once:et=Math.min(it-1,et);break;case Z.loop:et%=it;break;case Z.pingpong:{const k=(it<<1)-2;et=0==k?0:et%k,et>=it&&(et=k-et);break}case Z.onceReverse:et=Math.max(it-1-et,0);break;case Z.loopReverse:et=it-1-et%it;break;case Z.pingpongReverse:{const k=(it<<1)-2;et=0==k?0:(et+it-1)%k,et>=it&&(et=k-et)}}W.sequenceIndex=et}};let vt=pt;vt.ENTRIES=3,vt.MODE=1,vt.DELAY=2;const gt=class{constructor(k){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Et(this),this.propertyIDs=new F.eE,this.animationsChanged=!1,this.trackEntryPool=new F.bC((()=>new _t)),this.data=k}static emptyAnimation(){return gt._emptyAnimation}update(k){k*=this.timeScale;const B=this.tracks;for(let U=0,F=B.length;U0){if(F.delay-=G,F.delay>0)continue;G=-F.delay,F.delay=0}let j=F.next;if(j){const B=F.trackLast-j.delay;if(B>=0){for(j.delay=0,j.trackTime+=0==F.timeScale?0:(B/F.timeScale+k)*j.timeScale,F.trackTime+=G,this.setCurrent(U,j,!0);j.mixingFrom;)j.mixTime+=k,j=j.mixingFrom;continue}}else if(F.trackLast>=F.trackEnd&&!F.mixingFrom){B[U]=null,this.queue.end(F),this.clearNext(F);continue}if(F.mixingFrom&&this.updateMixingFrom(F,k)){let k=F.mixingFrom;for(F.mixingFrom=null,k&&(k.mixingTo=null);k;)this.queue.end(k),k=k.mixingFrom}F.trackTime+=G}this.queue.drain()}updateMixingFrom(k,B){const U=k.mixingFrom;if(!U)return!0;const F=this.updateMixingFrom(U,B);return U.animationLast=U.nextAnimationLast,U.trackLast=U.nextTrackLast,k.mixTime>0&&k.mixTime>=k.mixDuration?(0!=U.totalAlpha&&0!=k.mixDuration||(k.mixingFrom=U.mixingFrom,U.mixingFrom&&(U.mixingFrom.mixingTo=k),k.interruptAlpha=U.interruptAlpha,this.queue.end(U)),F):(U.trackTime+=B*U.timeScale,k.mixTime+=B,!1)}apply(k){if(!k)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();const B=this.events,U=this.tracks;let G=!1;for(let H=0,V=U.length;H0)continue;G=!0;const $=0==H?F.qU.first:j.mixBlend;let V=j.alpha;j.mixingFrom?V*=this.applyMixingFrom(j,k,$):j.trackTime>=j.trackEnd&&!j.next&&(V=0);const W=j.animationLast,q=j.getAnimationTime();let K=q,z=B;j.reverse&&(K=j.animation.duration-K,z=null);const Y=j.animation.timelines,Q=Y.length;if(0==H&&1==V||$==F.qU.add)for(let B=0;B1&&(j=1),U!=F.qU.first&&(U=G.mixBlend));const $=j0&&this.queueEvents(G,Y),this.events.length=0,G.nextAnimationLast=Y,G.nextTrackLast=G.trackTime,j}applyAttachmentTimeline(k,B,U,G,j){const $=B.slots[k.slotIndex];$.bone.active&&(U0;let G=k>=0;F.cj.signum(B)!=F.cj.signum(Y)&&Math.abs(B)<=90&&(Math.abs(k)>180&&(k+=360*F.cj.signum(k)),G=U),z=Y+k-k%360,G!=U&&(z+=360*F.cj.signum(k)),$[H]=z}$[H+1]=Y,W.rotation=q+z*G}queueEvents(k,B){const U=k.animationStart,F=k.animationEnd,G=F-U,j=k.trackLast%G,$=this.events;let H=0;const V=$.length;for(;HF||this.queue.event(k,B)}let W=!1;for(W=k.loop?0==G||j>k.trackTime%G:B>=F&&k.animationLast=this.tracks.length)return;const B=this.tracks[k];if(!B)return;this.queue.end(B),this.clearNext(B);let U=B;for(;;){const k=U.mixingFrom;if(!k)break;this.queue.end(k),U.mixingFrom=null,U.mixingTo=null,U=k}this.tracks[B.trackIndex]=null,this.queue.drain()}setCurrent(k,B,U){const F=this.expandToIndex(k);this.tracks[k]=B,B.previous=null,F&&(U&&this.queue.interrupt(F),B.mixingFrom=F,F.mixingTo=B,B.mixTime=0,F.mixingFrom&&F.mixDuration>0&&(B.interruptAlpha*=Math.min(1,F.mixTime/F.mixDuration)),F.timelinesRotation.length=0),this.queue.start(B)}setAnimation(k,B,U=!1){const F=this.data.skeletonData.findAnimation(B);if(!F)throw new Error(`Animation not found: ${B}`);return this.setAnimationWith(k,F,U)}setAnimationWith(k,B,U=!1){if(!B)throw new Error("animation cannot be null.");let F=!0,G=this.expandToIndex(k);G&&(-1==G.nextTrackLast?(this.tracks[k]=G.mixingFrom,this.queue.interrupt(G),this.queue.end(G),this.clearNext(G),G=G.mixingFrom,F=!1):this.clearNext(G));const j=this.trackEntry(k,B,U,G);return this.setCurrent(k,j,F),this.queue.drain(),j}addAnimation(k,B,U=!1,F=0){const G=this.data.skeletonData.findAnimation(B);if(!G)throw new Error(`Animation not found: ${B}`);return this.addAnimationWith(k,G,U,F)}addAnimationWith(k,B,U=!1,F=0){if(!B)throw new Error("animation cannot be null.");let G=this.expandToIndex(k);if(G)for(;G.next;)G=G.next;const j=this.trackEntry(k,B,U,G);return G?(G.next=j,j.previous=G,F<=0&&(F+=G.getTrackComplete()-j.mixDuration)):(this.setCurrent(k,j,!0),this.queue.drain()),j.delay=F,j}setEmptyAnimation(k,B=0){const U=this.setAnimationWith(k,gt.emptyAnimation(),!1);return U.mixDuration=B,U.trackEnd=B,U}addEmptyAnimation(k,B=0,U=0){const F=this.addAnimationWith(k,gt.emptyAnimation(),!1,U);return U<=0&&(F.delay+=F.mixDuration-B),F.mixDuration=B,F.trackEnd=B,F}setEmptyAnimations(k=0){const B=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let U=0,F=this.tracks.length;U0){G[H]=Ot,j[H]=U;continue k}break}G[H]=Ct}else G[H]=Tt}}getCurrent(k){return k>=this.tracks.length?null:this.tracks[k]}addListener(k){if(!k)throw new Error("listener cannot be null.");this.listeners.push(k)}removeListener(k){const B=this.listeners.indexOf(k);B>=0&&this.listeners.splice(B,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}setAnimationByName(k,B,U){gt.deprecatedWarning1||(gt.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.")),this.setAnimation(k,B,U)}addAnimationByName(k,B,U,F){gt.deprecatedWarning2||(gt.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.")),this.addAnimation(k,B,U,F)}hasAnimation(k){return null!==this.data.skeletonData.findAnimation(k)}hasAnimationByName(k){return gt.deprecatedWarning3||(gt.deprecatedWarning3=!0,console.warn("Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.")),this.hasAnimation(k)}};let mt=gt;mt._emptyAnimation=new tt("",[],0),mt.deprecatedWarning1=!1,mt.deprecatedWarning2=!1,mt.deprecatedWarning3=!1;const yt=class{constructor(){this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=F.qU.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(this.loop){const k=this.animationEnd-this.animationStart;return 0==k?this.animationStart:this.trackTime%k+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}setAnimationLast(k){this.animationLast=k,this.nextAnimationLast=k}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.length=0}getTrackComplete(){const k=this.animationEnd-this.animationStart;if(0!=k){if(this.loop)return k*(1+(this.trackTime/k|0));if(this.trackTime(k[k.start=0]="start",k[k.interrupt=1]="interrupt",k[k.end=2]="end",k[k.dispose=3]="dispose",k[k.complete=4]="complete",k[k.event=5]="event",k))(wt||{});const Tt=0,St=1,At=2,Ct=3,Ot=4,It=1,Dt=2;class Rt{constructor(k){this.atlas=k}loadSequence(k,B,U){const F=U.regions;for(let G=0,j=F.length;G1e-4?(k=Math.abs(z*X-Y*Q)/k,z/=q,Q/=K,Y=Q*k,X=z*k,B=Math.atan2(Q,z)*F.cj.radDeg):(z=0,Q=0,B=90-Math.atan2(X,Y)*F.cj.radDeg);const V=U+$-B,Z=U+H-B+90,J=F.cj.cosDeg(V)*G,tt=F.cj.cosDeg(Z)*j,et=F.cj.sinDeg(V)*G,it=F.cj.sinDeg(Z)*j;W.a=z*J-Y*et,W.c=z*tt-Y*it,W.b=Q*J+X*et,W.d=Q*tt+X*it;break}case F._C.NoScale:case F._C.NoScaleOrReflection:{const k=F.cj.cosDeg(U),B=F.cj.sinDeg(U);let V=(z*k+Y*B)/q,Z=(Q*k+X*B)/K,J=Math.sqrt(V*V+Z*Z);J>1e-5&&(J=1/J),V*=J,Z*=J,J=Math.sqrt(V*V+Z*Z),this.data.transformMode==F._C.NoScale&&z*X-Y*Q<0!=(q<0!=K<0)&&(J=-J);const tt=Math.PI/2+Math.atan2(Z,V),et=Math.cos(tt)*J,it=Math.sin(tt)*J,st=F.cj.cosDeg($)*G,nt=F.cj.cosDeg(90+H)*j,at=F.cj.sinDeg($)*G,rt=F.cj.sinDeg(90+H)*j;W.a=V*st+et*at,W.c=V*nt+et*rt,W.b=Z*st+it*at,W.d=Z*nt+it*rt;break}}W.a*=q,W.c*=q,W.b*=K,W.d*=K}setToSetupPose(){const k=this.data;this.x=k.x,this.y=k.y,this.rotation=k.rotation,this.scaleX=k.scaleX,this.scaleY=k.scaleY,this.shearX=k.shearX,this.shearY=k.shearY}getWorldRotationX(){return Math.atan2(this.matrix.b,this.matrix.a)*F.cj.radDeg}getWorldRotationY(){return Math.atan2(this.matrix.d,this.matrix.c)*F.cj.radDeg}getWorldScaleX(){const k=this.matrix;return Math.sqrt(k.a*k.a+k.b*k.b)}getWorldScaleY(){const k=this.matrix;return Math.sqrt(k.c*k.c+k.d*k.d)}updateAppliedTransform(){const k=this.parent,B=this.matrix;if(!k)return this.ax=B.tx-this.skeleton.x,this.ay=B.ty-this.skeleton.y,this.arotation=Math.atan2(B.b,B.a)*F.cj.radDeg,this.ascaleX=Math.sqrt(B.a*B.a+B.b*B.b),this.ascaleY=Math.sqrt(B.c*B.c+B.d*B.d),this.ashearX=0,void(this.ashearY=Math.atan2(B.a*B.c+B.b*B.d,B.a*B.d-B.b*B.c)*F.cj.radDeg);const U=k.matrix,G=1/(U.a*U.d-U.b*U.c),j=B.tx-U.tx,$=B.ty-U.ty;this.ax=j*U.d*G-$*U.c*G,this.ay=$*U.a*G-j*U.b*G;const H=G*U.d,V=G*U.a,W=G*U.c,q=G*U.b,K=H*B.a-W*B.b,z=H*B.c-W*B.d,Y=V*B.b-q*B.a,Q=V*B.d-q*B.c;if(this.ashearX=0,this.ascaleX=Math.sqrt(K*K+Y*Y),this.ascaleX>1e-4){const k=K*Q-z*Y;this.ascaleY=k/this.ascaleX,this.ashearY=Math.atan2(K*z+Y*Q,k)*F.cj.radDeg,this.arotation=Math.atan2(Y,K)*F.cj.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(z*z+Q*Q),this.ashearY=0,this.arotation=90-Math.atan2(Q,z)*F.cj.radDeg}worldToLocal(k){const B=this.matrix,U=B.a,F=B.c,G=B.b,j=B.d,$=1/(U*j-F*G),H=k.x-B.tx,V=k.y-B.ty;return k.x=H*j*$-V*F*$,k.y=V*U*$-H*G*$,k}localToWorld(k){const B=this.matrix,U=k.x,F=k.y;return k.x=U*B.a+F*B.c+B.tx,k.y=U*B.b+F*B.d+B.ty,k}worldToLocalRotation(k){const B=F.cj.sinDeg(k),U=F.cj.cosDeg(k),G=this.matrix;return Math.atan2(G.a*B-G.b*U,G.d*U-G.c*B)*F.cj.radDeg}localToWorldRotation(k){k-=this.rotation-this.shearX;const B=F.cj.sinDeg(k),U=F.cj.cosDeg(k),G=this.matrix;return Math.atan2(U*G.b+B*G.d,U*G.a+B*G.c)*F.cj.radDeg}rotateWorld(k){const B=this.matrix,U=B.a,G=B.c,j=B.b,$=B.d,H=F.cj.cosDeg(k),V=F.cj.sinDeg(k);B.a=H*U-V*j,B.c=H*G-V*$,B.b=V*U+H*j,B.d=V*G+H*$}}class Nt{constructor(k,B){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,!k)throw new Error("data cannot be null.");if(!B)throw new Error("skeleton cannot be null.");this.data=k,this.mix=k.mix,this.softness=k.softness,this.bendDirection=k.bendDirection,this.compress=k.compress,this.stretch=k.stretch,this.bones=new Array;for(let F=0;F180?Y-=360:Y<-180&&(Y+=360);let tt=k.ascaleX,et=k.ascaleY;if(G||j){switch(k.data.transformMode){case F._C.NoScale:case F._C.NoScaleOrReflection:Q=B-k.worldX,X=U-k.worldY}const V=k.data.length*tt,W=Math.sqrt(Q*Q+X*X);if(G&&WV&&V>1e-4){const k=(W/V-1)*H+1;tt*=k,$&&(et*=k)}}k.updateWorldTransformWith(k.ax,k.ay,k.arotation+Y*H,tt,et,k.ashearX,k.ashearY)}apply2(k,B,U,G,j,$,H,V,W){const q=k.ax,K=k.ay;let z=k.ascaleX,Y=k.ascaleY,Q=z,X=Y,Z=B.ascaleX;const J=k.matrix;let tt=0,et=0,it=0;z<0?(z=-z,tt=180,it=-1):(tt=0,it=1),Y<0&&(Y=-Y,it=-it),Z<0?(Z=-Z,et=180):et=0;const st=B.ax;let nt=0,at=0,rt=0,ot=J.a,ht=J.c,ct=J.b,dt=J.d;const lt=Math.abs(z-Y)<=1e-4;!lt||$?(nt=0,at=ot*st+J.tx,rt=ct*st+J.ty):(nt=B.ay,at=ot*st+ht*nt+J.tx,rt=ct*st+dt*nt+J.ty);const ut=k.parent.matrix;if(!ut)throw new Error("IK parent must itself have a parent.");ot=ut.a,ht=ut.c,ct=ut.b,dt=ut.d;const ft=1/(ot*dt-ht*ct);let bt=at-ut.tx,pt=rt-ut.ty;const vt=(bt*dt-pt*ht)*ft-q,gt=(pt*ot-bt*ct)*ft-K,mt=Math.sqrt(vt*vt+gt*gt);let yt,_t,Et=B.data.length*Z;if(mt<1e-4)return this.apply1(k,U,G,!1,$,!1,W),void B.updateWorldTransformWith(st,nt,0,B.ascaleX,B.ascaleY,B.ashearX,B.ashearY);bt=U-ut.tx,pt=G-ut.ty;let wt=(bt*dt-pt*ht)*ft-q,Tt=(pt*ot-bt*ct)*ft-K,St=wt*wt+Tt*Tt;if(0!=V){V*=z*(Z+1)*.5;const k=Math.sqrt(St),B=k-mt-Et*z+V;if(B>0){let U=Math.min(1,B/(2*V))-1;U=(B-V*(1-U*U))/k,wt-=U*wt,Tt-=U*Tt,St=wt*wt+Tt*Tt}}k:if(lt){Et*=z;let k=(St-mt*mt-Et*Et)/(2*mt*Et);k<-1?(k=-1,_t=Math.PI*j):k>1?(k=1,_t=0,$&&(ot=(Math.sqrt(St)/(mt+Et)-1)*W+1,Q*=ot,H&&(X*=ot))):_t=Math.acos(k)*j,ot=mt+Et*k,ht=Et*Math.sin(_t),yt=Math.atan2(Tt*ot-wt*ht,wt*ot+Tt*ht)}else{ot=z*Et,ht=Y*Et;const k=ot*ot,B=ht*ht,U=Math.atan2(Tt,wt);ct=B*mt*mt+k*St-k*B;const G=-2*B*mt,$=B-k;if(dt=G*G-4*$*ct,dt>=0){let k=Math.sqrt(dt);G<0&&(k=-k),k=.5*-(G+k);const B=k/$,F=ct/k,H=Math.abs(B)=-1&&ct<=1&&(ct=Math.acos(ct),bt=ot*Math.cos(ct)+mt,pt=ht*Math.sin(ct),dt=bt*bt+pt*pt,dtX&&(K=ct,X=dt,Q=bt,Z=pt)),St<=.5*(W+X)?(yt=U-Math.atan2(q*j,V),_t=H*j):(yt=U-Math.atan2(Z*j,Q),_t=K*j)}const At=Math.atan2(nt,st)*it;let Ct=k.arotation;yt=(yt-At)*F.cj.radDeg+tt-Ct,yt>180?yt-=360:yt<-180&&(yt+=360),k.updateWorldTransformWith(q,K,Ct+yt*W,Q,X,0,0),Ct=B.arotation,_t=((_t+At)*F.cj.radDeg-B.ashearX)*it+et-Ct,_t>180?_t-=360:_t<-180&&(_t+=360),B.updateWorldTransformWith(st,nt,Ct+_t*W,B.ascaleX,B.ascaleY,B.ashearX,B.ashearY)}}var xt=(k=>(k[k.Length=0]="Length",k[k.Fixed=1]="Fixed",k[k.Percent=2]="Percent",k[k.Proportional=3]="Proportional",k))(xt||{});const Lt=class{constructor(k,B){if(this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!k)throw new Error("data cannot be null.");if(!B)throw new Error("skeleton cannot be null.");this.data=k,this.bones=new Array;for(let F=0,G=k.bones.length;F0){k=K/k*Q;for(let B=1;B0?F.cj.degRad:-F.cj.degRad}for(let q=0,it=3;q0){const U=j.a,G=j.c,H=j.b,V=j.d;let W=0,K=0,Y=0;if(W=$?X[it-1]:0==z[q+1]?X[it+2]:Math.atan2(st,Q),W-=Math.atan2(H,U),et){K=Math.cos(W),Y=Math.sin(W);const F=k.data.length;Z+=(F*(K*U-Y*H)-Q)*B,J+=(F*(Y*U+K*H)-st)*B}else W+=tt;W>F.cj.PI?W-=F.cj.PI2:W<-F.cj.PI&&(W+=F.cj.PI2),W*=B,K=Math.cos(W),Y=Math.sin(W),j.a=K*U-Y*H,j.c=K*G-Y*V,j.b=Y*U+K*H,j.d=Y*G+K*V}k.updateAppliedTransform()}}computeWorldPositions(k,B,U){const G=this.target;let j=this.position;const $=this.spaces,H=F.Aq.setArraySize(this.positions,3*B+2);let V=this.world;const W=k.closed;let q=k.worldVerticesLength,K=q/6,z=Lt.NONE;if(!k.constantSpeed){const Y=k.lengths;K-=W?1:2;const Q=Y[K];let X;switch(this.data.positionMode==F.pw.Percent&&(j*=Q),this.data.spacingMode){case xt.Percent:X=Q;break;case xt.Proportional:X=Q/B;break;default:X=1}V=F.Aq.setArraySize(this.world,8);for(let F=0,Z=0,J=0;FQ){z!=Lt.AFTER&&(z=Lt.AFTER,k.computeWorldVertices(G,q-6,4,V,0,2)),this.addAfterPosition(tt-Q,V,0,H,Z);continue}}for(;;J++){const k=Y[J];if(!(tt>k)){if(0==J)tt/=k;else{const B=Y[J-1];tt=(tt-B)/(k-B)}break}}J!=z&&(z=J,W&&J==K?(k.computeWorldVertices(G,q-4,4,V,0,2),k.computeWorldVertices(G,0,4,V,4,2)):k.computeWorldVertices(G,6*J+2,8,V,0,2)),this.addCurvePosition(tt,V[0],V[1],V[2],V[3],V[4],V[5],V[6],V[7],H,Z,U||F>0&&0==B)}return H}W?(q+=2,V=F.Aq.setArraySize(this.world,q),k.computeWorldVertices(G,2,q-4,V,0,2),k.computeWorldVertices(G,0,2,V,q-4,2),V[q-2]=V[0],V[q-1]=V[1]):(K--,q-=4,V=F.Aq.setArraySize(this.world,q),k.computeWorldVertices(G,2,q,V,0,2));const Y=F.Aq.setArraySize(this.curves,K);let Q,X=0,Z=V[0],J=V[1],tt=0,et=0,it=0,st=0,nt=0,at=0,rt=0,ot=0,ht=0,ct=0,dt=0,lt=0,ut=0,ft=0;for(let F=0,vt=2;FX){this.addAfterPosition(B-X,V,q-4,H,vt);continue}}for(;;gt++){const k=Y[gt];if(!(B>k)){if(0==gt)B/=k;else{const U=Y[gt-1];B=(B-U)/(k-U)}break}}if(gt!=z){z=gt;let k=6*gt;for(Z=V[k],J=V[k+1],tt=V[k+2],et=V[k+3],it=V[k+4],st=V[k+5],nt=V[k+6],at=V[k+7],rt=.03*(Z-2*tt+it),ot=.03*(J-2*et+st),ht=.006*(3*(tt-it)-Z+nt),ct=.006*(3*(et-st)-J+at),dt=2*rt+ht,lt=2*ot+ct,ut=.3*(tt-Z)+rt+.16666667*ht,ft=.3*(et-J)+ot+.16666667*ct,pt=Math.sqrt(ut*ut+ft*ft),bt[0]=pt,k=1;k<8;k++)ut+=dt,ft+=lt,dt+=ht,lt+=ct,pt+=Math.sqrt(ut*ut+ft*ft),bt[k]=pt;ut+=dt,ft+=lt,pt+=Math.sqrt(ut*ut+ft*ft),bt[8]=pt,ut+=dt+ht,ft+=lt+ct,pt+=Math.sqrt(ut*ut+ft*ft),bt[9]=pt,mt=0}for(B*=pt;;mt++){const k=bt[mt];if(!(B>k)){if(0==mt)B/=k;else{const U=bt[mt-1];B=mt+(B-U)/(k-U)}break}}this.addCurvePosition(.1*B,Z,J,tt,et,it,st,nt,at,H,vt,U||F>0&&0==k)}return H}addBeforePosition(k,B,U,F,G){const j=B[U],$=B[U+1],H=B[U+2]-j,V=B[U+3]-$,W=Math.atan2(V,H);F[G]=j+k*Math.cos(W),F[G+1]=$+k*Math.sin(W),F[G+2]=W}addAfterPosition(k,B,U,F,G){const j=B[U+2],$=B[U+3],H=j-B[U],V=$-B[U+1],W=Math.atan2(V,H);F[G]=j+k*Math.cos(W),F[G+1]=$+k*Math.sin(W),F[G+2]=W}addCurvePosition(k,B,U,F,G,j,$,H,V,W,q,K){if(0==k||isNaN(k))return W[q]=B,W[q+1]=U,void(W[q+2]=Math.atan2(G-U,F-B));const z=k*k,Y=z*k,Q=1-k,X=Q*Q,Z=X*Q,J=Q*k,tt=3*J,et=Q*tt,it=tt*k,st=B*Z+F*et+j*it+H*Y,nt=U*Z+G*et+$*it+V*Y;W[q]=st,W[q+1]=nt,K&&(W[q+2]=k<.001?Math.atan2(G-U,F-B):Math.atan2(nt-(U*X+G*J*2+$*z),st-(B*X+F*J*2+j*z)))}};let kt=Lt;kt.NONE=-1,kt.BEFORE=-2,kt.AFTER=-3,kt.epsilon=1e-5;class Bt{constructor(k,B){if(this.darkColor=null,this.attachment=null,this.attachmentState=0,this.sequenceIndex=-1,this.deform=new Array,!k)throw new Error("data cannot be null.");if(!B)throw new Error("bone cannot be null.");this.data=k,this.bone=B,this.color=new F.Q1,this.darkColor=k.darkColor?new F.Q1:null,this.setToSetupPose(),this.blendMode=this.data.blendMode}getSkeleton(){return this.bone.skeleton}getAttachment(){return this.attachment}setAttachment(k){this.attachment!=k&&(k instanceof $&&this.attachment instanceof $&&k.timelineAttachment==this.attachment.timelineAttachment||(this.deform.length=0),this.attachment=k,this.sequenceIndex=-1)}setToSetupPose(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}}class Ut{constructor(k,B){if(this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new F.I9,this.active=!1,!k)throw new Error("data cannot be null.");if(!B)throw new Error("skeleton cannot be null.");this.data=k,this.mixRotate=k.mixRotate,this.mixX=k.mixX,this.mixY=k.mixY,this.mixScaleX=k.mixScaleX,this.mixScaleY=k.mixScaleY,this.mixShearY=k.mixShearY,this.bones=new Array;for(let F=0;F0?F.cj.degRad:-F.cj.degRad,X=this.data.offsetRotation*Q,Z=this.data.offsetShearY*Q,J=this.bones;for(let tt=0,et=J.length;ttF.cj.PI?$-=F.cj.PI2:$<-F.cj.PI&&($+=F.cj.PI2),$*=k;const H=Math.cos($),V=Math.sin($);Q.a=H*B-V*G,Q.c=H*U-V*j,Q.b=V*B+H*G,Q.d=V*U+H*j}if(H){const k=this.temp;V.localToWorld(k.set(this.data.offsetX,this.data.offsetY)),Q.tx+=(k.x-Q.tx)*B,Q.ty+=(k.y-Q.ty)*U}if(0!=G){let k=Math.sqrt(Q.a*Q.a+Q.b*Q.b);0!=k&&(k=(k+(Math.sqrt(q*q+z*z)-k+this.data.offsetScaleX)*G)/k),Q.a*=k,Q.b*=k}if(0!=j){let k=Math.sqrt(Q.c*Q.c+Q.d*Q.d);0!=k&&(k=(k+(Math.sqrt(K*K+Y*Y)-k+this.data.offsetScaleY)*j)/k),Q.c*=k,Q.d*=k}if($>0){const k=Q.c,B=Q.d,U=Math.atan2(B,k);let G=Math.atan2(Y,K)-Math.atan2(z,q)-(U-Math.atan2(Q.b,Q.a));G>F.cj.PI?G-=F.cj.PI2:G<-F.cj.PI&&(G+=F.cj.PI2),G=U+(G+Z)*$;const j=Math.sqrt(k*k+B*B);Q.c=Math.cos(G)*j,Q.d=Math.sin(G)*j}W.updateAppliedTransform()}}applyRelativeWorld(){const k=this.mixRotate,B=this.mixX,U=this.mixY,G=this.mixScaleX,j=this.mixScaleY,$=this.mixShearY,H=0!=B||0!=U,V=this.target,W=V.matrix,q=W.a,K=W.c,z=W.b,Y=W.d,Q=q*Y-K*z>0?F.cj.degRad:-F.cj.degRad,X=this.data.offsetRotation*Q,Z=this.data.offsetShearY*Q,J=this.bones;for(let tt=0,et=J.length;ttF.cj.PI?$-=F.cj.PI2:$<-F.cj.PI&&($+=F.cj.PI2),$*=k;const H=Math.cos($),V=Math.sin($);Q.a=H*B-V*G,Q.c=H*U-V*j,Q.b=V*B+H*G,Q.d=V*U+H*j}if(H){const k=this.temp;V.localToWorld(k.set(this.data.offsetX,this.data.offsetY)),Q.tx+=k.x*B,Q.ty+=k.y*U}if(0!=G){const k=(Math.sqrt(q*q+z*z)-1+this.data.offsetScaleX)*G+1;Q.a*=k,Q.b*=k}if(0!=j){const k=(Math.sqrt(K*K+Y*Y)-1+this.data.offsetScaleY)*j+1;Q.c*=k,Q.d*=k}if($>0){let k=Math.atan2(Y,K)-Math.atan2(z,q);k>F.cj.PI?k-=F.cj.PI2:k<-F.cj.PI&&(k+=F.cj.PI2);const B=Q.c,U=Q.d;k=Math.atan2(U,B)+(k-F.cj.PI/2+Z)*$;const G=Math.sqrt(B*B+U*U);Q.c=Math.cos(k)*G,Q.d=Math.sin(k)*G}W.updateAppliedTransform()}}applyAbsoluteLocal(){const k=this.mixRotate,B=this.mixX,U=this.mixY,F=this.mixScaleX,G=this.mixScaleY,j=this.mixShearY,$=this.target,H=this.bones;for(let V=0,W=H.length;V=F.length&&(F.length=k+1),F[k]||(F[k]={}),F[k][B]=U}addSkin(k){for(let U=0;U{"use strict";U.d(B,{B9:()=>H,t5:()=>bi,hq:()=>pi,JH:()=>Si,cc:()=>ps,hp:()=>gi,jl:()=>Mi,Q1:()=>ve,Td:()=>Oi,_4:()=>V,Pp:()=>Ni,Ag:()=>Je,dJ:()=>_s,V2:()=>Ti,vg:()=>it,uq:()=>ki,oA:()=>Wi,TO:()=>Ai,bR:()=>Di,tS:()=>xi,BP:()=>ds,bO:()=>Ci,M_:()=>Pi,TE:()=>Li,HY:()=>Ii,$f:()=>ea,Mt:()=>fs,Uw:()=>ri,QE:()=>K,gP:()=>Ms,NW:()=>Ks,Rv:()=>Fn,dL:()=>Ki,k2:()=>us,A5:()=>sa,uR:()=>Q,Eo:()=>Hn,MT:()=>$n,XO:()=>ii,W0:()=>at,Wp:()=>F});var F={};U.r(F),U.d(F,{BaseTextureCache:()=>$e,BoundingBox:()=>Fe,CanvasRenderTarget:()=>We,DATA_URI:()=>Ce,EventEmitter:()=>At(),ProgramCache:()=>Ge,TextureCache:()=>je,clearTextureCache:()=>Ve,correctBlendMode:()=>we,createIndicesForQuads:()=>Oe,decomposeDataUri:()=>Qe,deprecation:()=>Rt,destroyTextureCache:()=>He,detectVideoAlphaMode:()=>Bt,determineCrossOrigin:()=>Xe,earcut:()=>Ot(),getBufferType:()=>Ie,getCanvasBoundingBox:()=>ze,getResolutionOfUrl:()=>Ze,hex2rgb:()=>ge,hex2string:()=>me,interleaveTypedArrays:()=>Re,isMobile:()=>Tt,isPow2:()=>Me,isWebGLSupported:()=>Gt,log2:()=>Ne,nextPow2:()=>Pe,path:()=>xt,premultiplyBlendMode:()=>Ee,premultiplyRgba:()=>Te,premultiplyTint:()=>Se,premultiplyTintToRgba:()=>Ae,removeItems:()=>xe,rgb2hex:()=>_e,sayHello:()=>Ft,sign:()=>Le,skipHello:()=>Ut,string2hex:()=>ye,trimCanvas:()=>Ye,uid:()=>Be,url:()=>Pt});var G=(k=>(k[k.WEBGL_LEGACY=0]="WEBGL_LEGACY",k[k.WEBGL=1]="WEBGL",k[k.WEBGL2=2]="WEBGL2",k))(G||{}),j=(k=>(k[k.UNKNOWN=0]="UNKNOWN",k[k.WEBGL=1]="WEBGL",k[k.CANVAS=2]="CANVAS",k))(j||{}),$=(k=>(k[k.COLOR=16384]="COLOR",k[k.DEPTH=256]="DEPTH",k[k.STENCIL=1024]="STENCIL",k))($||{}),H=(k=>(k[k.NORMAL=0]="NORMAL",k[k.ADD=1]="ADD",k[k.MULTIPLY=2]="MULTIPLY",k[k.SCREEN=3]="SCREEN",k[k.OVERLAY=4]="OVERLAY",k[k.DARKEN=5]="DARKEN",k[k.LIGHTEN=6]="LIGHTEN",k[k.COLOR_DODGE=7]="COLOR_DODGE",k[k.COLOR_BURN=8]="COLOR_BURN",k[k.HARD_LIGHT=9]="HARD_LIGHT",k[k.SOFT_LIGHT=10]="SOFT_LIGHT",k[k.DIFFERENCE=11]="DIFFERENCE",k[k.EXCLUSION=12]="EXCLUSION",k[k.HUE=13]="HUE",k[k.SATURATION=14]="SATURATION",k[k.COLOR=15]="COLOR",k[k.LUMINOSITY=16]="LUMINOSITY",k[k.NORMAL_NPM=17]="NORMAL_NPM",k[k.ADD_NPM=18]="ADD_NPM",k[k.SCREEN_NPM=19]="SCREEN_NPM",k[k.NONE=20]="NONE",k[k.SRC_OVER=0]="SRC_OVER",k[k.SRC_IN=21]="SRC_IN",k[k.SRC_OUT=22]="SRC_OUT",k[k.SRC_ATOP=23]="SRC_ATOP",k[k.DST_OVER=24]="DST_OVER",k[k.DST_IN=25]="DST_IN",k[k.DST_OUT=26]="DST_OUT",k[k.DST_ATOP=27]="DST_ATOP",k[k.ERASE=26]="ERASE",k[k.SUBTRACT=28]="SUBTRACT",k[k.XOR=29]="XOR",k))(H||{}),V=(k=>(k[k.POINTS=0]="POINTS",k[k.LINES=1]="LINES",k[k.LINE_LOOP=2]="LINE_LOOP",k[k.LINE_STRIP=3]="LINE_STRIP",k[k.TRIANGLES=4]="TRIANGLES",k[k.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",k[k.TRIANGLE_FAN=6]="TRIANGLE_FAN",k))(V||{}),W=(k=>(k[k.RGBA=6408]="RGBA",k[k.RGB=6407]="RGB",k[k.RG=33319]="RG",k[k.RED=6403]="RED",k[k.RGBA_INTEGER=36249]="RGBA_INTEGER",k[k.RGB_INTEGER=36248]="RGB_INTEGER",k[k.RG_INTEGER=33320]="RG_INTEGER",k[k.RED_INTEGER=36244]="RED_INTEGER",k[k.ALPHA=6406]="ALPHA",k[k.LUMINANCE=6409]="LUMINANCE",k[k.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",k[k.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",k[k.DEPTH_STENCIL=34041]="DEPTH_STENCIL",k))(W||{}),q=(k=>(k[k.TEXTURE_2D=3553]="TEXTURE_2D",k[k.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",k[k.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",k[k.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",k[k.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",k[k.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",k[k.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",k[k.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",k[k.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",k))(q||{}),K=(k=>(k[k.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",k[k.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",k[k.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",k[k.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",k[k.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",k[k.UNSIGNED_INT=5125]="UNSIGNED_INT",k[k.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",k[k.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",k[k.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",k[k.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",k[k.BYTE=5120]="BYTE",k[k.SHORT=5122]="SHORT",k[k.INT=5124]="INT",k[k.FLOAT=5126]="FLOAT",k[k.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",k[k.HALF_FLOAT=36193]="HALF_FLOAT",k))(K||{}),z=(k=>(k[k.FLOAT=0]="FLOAT",k[k.INT=1]="INT",k[k.UINT=2]="UINT",k))(z||{}),Y=(k=>(k[k.NEAREST=0]="NEAREST",k[k.LINEAR=1]="LINEAR",k))(Y||{}),Q=(k=>(k[k.CLAMP=33071]="CLAMP",k[k.REPEAT=10497]="REPEAT",k[k.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",k))(Q||{}),X=(k=>(k[k.OFF=0]="OFF",k[k.POW2=1]="POW2",k[k.ON=2]="ON",k[k.ON_MANUAL=3]="ON_MANUAL",k))(X||{}),Z=(k=>(k[k.NPM=0]="NPM",k[k.UNPACK=1]="UNPACK",k[k.PMA=2]="PMA",k[k.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",k[k.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",k[k.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",k))(Z||{}),J=(k=>(k[k.NO=0]="NO",k[k.YES=1]="YES",k[k.AUTO=2]="AUTO",k[k.BLEND=0]="BLEND",k[k.CLEAR=1]="CLEAR",k[k.BLIT=2]="BLIT",k))(J||{}),tt=(k=>(k[k.AUTO=0]="AUTO",k[k.MANUAL=1]="MANUAL",k))(tt||{}),et=(k=>(k.LOW="lowp",k.MEDIUM="mediump",k.HIGH="highp",k))(et||{}),it=(k=>(k[k.NONE=0]="NONE",k[k.SCISSOR=1]="SCISSOR",k[k.STENCIL=2]="STENCIL",k[k.SPRITE=3]="SPRITE",k[k.COLOR=4]="COLOR",k))(it||{}),st=(k=>(k[k.NONE=0]="NONE",k[k.LOW=2]="LOW",k[k.MEDIUM=4]="MEDIUM",k[k.HIGH=8]="HIGH",k))(st||{}),nt=(k=>(k[k.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",k[k.ARRAY_BUFFER=34962]="ARRAY_BUFFER",k[k.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",k))(nt||{});const at={ADAPTER:{createCanvas:(k,B)=>{const U=document.createElement("canvas");return U.width=k,U.height=B,U},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(k,B)=>fetch(k,B),parseXML:k=>(new DOMParser).parseFromString(k,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var rt=/iPhone/i,ot=/iPod/i,ht=/iPad/i,ct=/\biOS-universal(?:.+)Mac\b/i,dt=/\bAndroid(?:.+)Mobile\b/i,lt=/Android/i,ut=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,ft=/Silk/i,bt=/Windows Phone/i,pt=/\bWindows(?:.+)ARM\b/i,vt=/BlackBerry/i,gt=/BB10/i,mt=/Opera Mini/i,yt=/\b(CriOS|Chrome)(?:.+)Mobile/i,_t=/Mobile(?:.+)Firefox\b/i,Et=function(k){return void 0!==k&&"MacIntel"===k.platform&&"number"==typeof k.maxTouchPoints&&k.maxTouchPoints>1&&"undefined"==typeof MSStream};function wt(k){var B={userAgent:"",platform:"",maxTouchPoints:0};k||"undefined"==typeof navigator?"string"==typeof k?B.userAgent=k:k&&k.userAgent&&(B={userAgent:k.userAgent,platform:k.platform,maxTouchPoints:k.maxTouchPoints||0}):B={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var U=B.userAgent,F=U.split("[FBAN");void 0!==F[1]&&(U=F[0]),void 0!==(F=U.split("Twitter"))[1]&&(U=F[0]);var G=function(k){return function(B){return B.test(k)}}(U),j={apple:{phone:G(rt)&&!G(bt),ipod:G(ot),tablet:!G(rt)&&(G(ht)||Et(B))&&!G(bt),universal:G(ct),device:(G(rt)||G(ot)||G(ht)||G(ct)||Et(B))&&!G(bt)},amazon:{phone:G(ut),tablet:!G(ut)&&G(ft),device:G(ut)||G(ft)},android:{phone:!G(bt)&&G(ut)||!G(bt)&&G(dt),tablet:!G(bt)&&!G(ut)&&!G(dt)&&(G(ft)||G(lt)),device:!G(bt)&&(G(ut)||G(ft)||G(dt)||G(lt))||G(/\bokhttp\b/i)},windows:{phone:G(bt),tablet:G(pt),device:G(bt)||G(pt)},other:{blackberry:G(vt),blackberry10:G(gt),opera:G(mt),firefox:G(_t),chrome:G(yt),device:G(vt)||G(gt)||G(mt)||G(_t)||G(yt)},any:!1,phone:!1,tablet:!1};return j.any=j.apple.device||j.android.device||j.windows.device||j.other.device,j.phone=j.apple.phone||j.android.phone||j.windows.phone,j.tablet=j.apple.tablet||j.android.tablet||j.windows.tablet,j}const Tt=(wt.default??wt)(globalThis.navigator);at.RETINA_PREFIX=/@([0-9\.]+)x/,at.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var St=U(30228),At=U.n(St),Ct=U(1858),Ot=U.n(Ct),It=U(88835);const Dt={};function Rt(k,B,U=3){if(Dt[B])return;let F=(new Error).stack;typeof F>"u"?console.warn("PixiJS Deprecation Warning: ",`${B}\nDeprecated since v${k}`):(F=F.split("\n").splice(U).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${B}\nDeprecated since v${k}`),console.warn(F),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${B}\nDeprecated since v${k}`),console.warn(F))),Dt[B]=!0}const Pt={get parse(){return Rt("7.3.0","utils.url.parse is deprecated, use native URL API instead."),It.qg},get format(){return Rt("7.3.0","utils.url.format is deprecated, use native URL API instead."),It.GP},get resolve(){return Rt("7.3.0","utils.url.resolve is deprecated, use native URL API instead."),It.hd}};function Mt(k){if("string"!=typeof k)throw new TypeError(`Path must be a string. Received ${JSON.stringify(k)}`)}function Nt(k){return k.split("?")[0].split("#")[0]}const xt={toPosix(k){return B="\\",U="/",k.replace(new RegExp(B.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g"),U);var B,U},isUrl(k){return/^https?:/.test(this.toPosix(k))},isDataUrl:k=>/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(k),isBlobUrl:k=>k.startsWith("blob:"),hasProtocol(k){return/^[^/:]+:/.test(this.toPosix(k))},getProtocol(k){Mt(k),k=this.toPosix(k);const B=/^file:\/\/\//.exec(k);if(B)return B[0];const U=/^[^/:]+:\/{0,2}/.exec(k);return U?U[0]:""},toAbsolute(k,B,U){if(Mt(k),this.isDataUrl(k)||this.isBlobUrl(k))return k;const F=Nt(this.toPosix(B??at.ADAPTER.getBaseUrl())),G=Nt(this.toPosix(U??this.rootname(F)));return(k=this.toPosix(k)).startsWith("/")?xt.join(G,k.slice(1)):this.isAbsolute(k)?k:this.join(F,k)},normalize(k){if(Mt(k),0===k.length)return".";if(this.isDataUrl(k)||this.isBlobUrl(k))return k;let B="";const U=(k=this.toPosix(k)).startsWith("/");this.hasProtocol(k)&&(B=this.rootname(k),k=k.slice(B.length));const F=k.endsWith("/");return(k=function(k,B){let U="",F=0,G=-1,j=0,$=-1;for(let H=0;H<=k.length;++H){if(H2){const k=U.lastIndexOf("/");if(k!==U.length-1){-1===k?(U="",F=0):(U=U.slice(0,k),F=U.length-1-U.lastIndexOf("/")),G=H,j=0;continue}}else if(2===U.length||1===U.length){U="",F=0,G=H,j=0;continue}B&&(U.length>0?U+="/..":U="..",F=2)}else U.length>0?U+=`/${k.slice(G+1,H)}`:U=k.slice(G+1,H),F=H-G-1;G=H,j=0}else 46===$&&-1!==j?++j:j=-1}return U}(k,!1)).length>0&&F&&(k+="/"),U?`/${k}`:B+k},isAbsolute(k){return Mt(k),k=this.toPosix(k),!!this.hasProtocol(k)||k.startsWith("/")},join(...k){if(0===k.length)return".";let B;for(let U=0;U0)if(void 0===B)B=F;else{const G=k[U-1]??"";this.joinExtensions.includes(this.extname(G).toLowerCase())?B+=`/../${F}`:B+=`/${F}`}}return void 0===B?".":this.normalize(B)},dirname(k){if(Mt(k),0===k.length)return".";let B=(k=this.toPosix(k)).charCodeAt(0);const U=47===B;let F=-1,G=!0;const j=this.getProtocol(k),$=k;for(let H=(k=k.slice(j.length)).length-1;H>=1;--H)if(B=k.charCodeAt(H),47===B){if(!G){F=H;break}}else G=!1;return-1===F?U?"/":this.isUrl($)?j+k:j:U&&1===F?"//":j+k.slice(0,F)},rootname(k){Mt(k);let B="";if(B=(k=this.toPosix(k)).startsWith("/")?"/":this.getProtocol(k),this.isUrl(k)){const U=k.indexOf("/",B.length);B=-1!==U?k.slice(0,U):k,B.endsWith("/")||(B+="/")}return B},basename(k,B){Mt(k),B&&Mt(B),k=Nt(this.toPosix(k));let U,F=0,G=-1,j=!0;if(void 0!==B&&B.length>0&&B.length<=k.length){if(B.length===k.length&&B===k)return"";let $=B.length-1,H=-1;for(U=k.length-1;U>=0;--U){const V=k.charCodeAt(U);if(47===V){if(!j){F=U+1;break}}else-1===H&&(j=!1,H=U+1),$>=0&&(V===B.charCodeAt($)?-1==--$&&(G=U):($=-1,G=H))}return F===G?G=H:-1===G&&(G=k.length),k.slice(F,G)}for(U=k.length-1;U>=0;--U)if(47===k.charCodeAt(U)){if(!j){F=U+1;break}}else-1===G&&(j=!1,G=U+1);return-1===G?"":k.slice(F,G)},extname(k){Mt(k);let B=-1,U=0,F=-1,G=!0,j=0;for(let $=(k=Nt(this.toPosix(k))).length-1;$>=0;--$){const H=k.charCodeAt($);if(47!==H)-1===F&&(G=!1,F=$+1),46===H?-1===B?B=$:1!==j&&(j=1):-1!==B&&(j=-1);else if(!G){U=$+1;break}}return-1===B||-1===F||0===j||1===j&&B===F-1&&B===U+1?"":k.slice(B,F)},parse(k){Mt(k);const B={root:"",dir:"",base:"",ext:"",name:""};if(0===k.length)return B;let U=(k=Nt(this.toPosix(k))).charCodeAt(0);const F=this.isAbsolute(k);let G;B.root=this.rootname(k),G=F||this.hasProtocol(k)?1:0;let j=-1,$=0,H=-1,V=!0,W=k.length-1,q=0;for(;W>=G;--W)if(U=k.charCodeAt(W),47!==U)-1===H&&(V=!1,H=W+1),46===U?-1===j?j=W:1!==q&&(q=1):-1!==j&&(q=-1);else if(!V){$=W+1;break}return-1===j||-1===H||0===q||1===q&&j===H-1&&j===$+1?-1!==H&&(B.base=B.name=0===$&&F?k.slice(1,H):k.slice($,H)):(0===$&&F?(B.name=k.slice(1,j),B.base=k.slice(1,H)):(B.name=k.slice($,j),B.base=k.slice($,H)),B.ext=k.slice(j,H)),B.dir=this.dirname(k),B},sep:"/",delimiter:":",joinExtensions:[".html"]};let Lt,kt;async function Bt(){return Lt??(Lt=(async()=>{const k=document.createElement("canvas").getContext("webgl");if(!k)return Z.UNPACK;const B=await new Promise((k=>{const B=document.createElement("video");B.onloadeddata=()=>k(B),B.onerror=()=>k(null),B.autoplay=!1,B.crossOrigin="anonymous",B.preload="auto",B.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",B.load()}));if(!B)return Z.UNPACK;const U=k.createTexture();k.bindTexture(k.TEXTURE_2D,U);const F=k.createFramebuffer();k.bindFramebuffer(k.FRAMEBUFFER,F),k.framebufferTexture2D(k.FRAMEBUFFER,k.COLOR_ATTACHMENT0,k.TEXTURE_2D,U,0),k.pixelStorei(k.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),k.pixelStorei(k.UNPACK_COLORSPACE_CONVERSION_WEBGL,k.NONE),k.texImage2D(k.TEXTURE_2D,0,k.RGBA,k.RGBA,k.UNSIGNED_BYTE,B);const G=new Uint8Array(4);return k.readPixels(0,0,1,1,k.RGBA,k.UNSIGNED_BYTE,G),k.deleteFramebuffer(F),k.deleteTexture(U),k.getExtension("WEBGL_lose_context")?.loseContext(),G[0]<=G[3]?Z.PMA:Z.UNPACK})()),Lt}function Ut(){Rt("7.0.0","skipHello is deprecated, please use settings.RENDER_OPTIONS.hello")}function Ft(){Rt("7.0.0",'sayHello is deprecated, please use Renderer\'s "hello" option')}function Gt(){return typeof kt>"u"&&(kt=function(){const k={stencil:!0,failIfMajorPerformanceCaveat:at.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!at.ADAPTER.getWebGLRenderingContext())return!1;const B=at.ADAPTER.createCanvas();let U=B.getContext("webgl",k)||B.getContext("experimental-webgl",k);const F=!!U?.getContextAttributes()?.stencil;if(U){const k=U.getExtension("WEBGL_lose_context");k&&k.loseContext()}return U=null,F}catch{return!1}}()),kt}var jt={grad:.9,turn:360,rad:360/(2*Math.PI)},$t=function(k){return"string"==typeof k?k.length>0:"number"==typeof k},Ht=function(k,B,U){return void 0===B&&(B=0),void 0===U&&(U=Math.pow(10,B)),Math.round(U*k)/U+0},Vt=function(k,B,U){return void 0===B&&(B=0),void 0===U&&(U=1),k>U?U:k>B?k:B},Wt=function(k){return(k=isFinite(k)?k%360:0)>0?k:k+360},qt=function(k){return{r:Vt(k.r,0,255),g:Vt(k.g,0,255),b:Vt(k.b,0,255),a:Vt(k.a)}},Kt=function(k){return{r:Ht(k.r),g:Ht(k.g),b:Ht(k.b),a:Ht(k.a,3)}},zt=/^#([0-9a-f]{3,8})$/i,Yt=function(k){var B=k.toString(16);return B.length<2?"0"+B:B},Qt=function(k){var B=k.r,U=k.g,F=k.b,G=k.a,j=Math.max(B,U,F),$=j-Math.min(B,U,F),H=$?j===B?(U-F)/$:j===U?2+(F-B)/$:4+(B-U)/$:0;return{h:60*(H<0?H+6:H),s:j?$/j*100:0,v:j/255*100,a:G}},Xt=function(k){var B=k.h,U=k.s,F=k.v,G=k.a;B=B/360*6,U/=100,F/=100;var j=Math.floor(B),$=F*(1-U),H=F*(1-(B-j)*U),V=F*(1-(1-B+j)*U),W=j%6;return{r:255*[F,H,$,$,V,F][W],g:255*[V,F,F,H,$,$][W],b:255*[$,$,V,F,F,H][W],a:G}},Zt=function(k){return{h:Wt(k.h),s:Vt(k.s,0,100),l:Vt(k.l,0,100),a:Vt(k.a)}},Jt=function(k){return{h:Ht(k.h),s:Ht(k.s),l:Ht(k.l),a:Ht(k.a,3)}},te=function(k){return Xt((U=(B=k).s,{h:B.h,s:(U*=((F=B.l)<50?F:100-F)/100)>0?2*U/(F+U)*100:0,v:F+U,a:B.a}));var B,U,F},ee=function(k){return{h:(B=Qt(k)).h,s:(G=(200-(U=B.s))*(F=B.v)/100)>0&&G<200?U*F/100/(G<=100?G:200-G)*100:0,l:G/2,a:B.a};var B,U,F,G},ie=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,se=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ne=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ae=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,re={string:[[function(k){var B=zt.exec(k);return B?(k=B[1]).length<=4?{r:parseInt(k[0]+k[0],16),g:parseInt(k[1]+k[1],16),b:parseInt(k[2]+k[2],16),a:4===k.length?Ht(parseInt(k[3]+k[3],16)/255,2):1}:6===k.length||8===k.length?{r:parseInt(k.substr(0,2),16),g:parseInt(k.substr(2,2),16),b:parseInt(k.substr(4,2),16),a:8===k.length?Ht(parseInt(k.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(k){var B=ne.exec(k)||ae.exec(k);return B?B[2]!==B[4]||B[4]!==B[6]?null:qt({r:Number(B[1])/(B[2]?100/255:1),g:Number(B[3])/(B[4]?100/255:1),b:Number(B[5])/(B[6]?100/255:1),a:void 0===B[7]?1:Number(B[7])/(B[8]?100:1)}):null},"rgb"],[function(k){var B=ie.exec(k)||se.exec(k);if(!B)return null;var U,F,G=Zt({h:(U=B[1],F=B[2],void 0===F&&(F="deg"),Number(U)*(jt[F]||1)),s:Number(B[3]),l:Number(B[4]),a:void 0===B[5]?1:Number(B[5])/(B[6]?100:1)});return te(G)},"hsl"]],object:[[function(k){var B=k.r,U=k.g,F=k.b,G=k.a,j=void 0===G?1:G;return $t(B)&&$t(U)&&$t(F)?qt({r:Number(B),g:Number(U),b:Number(F),a:Number(j)}):null},"rgb"],[function(k){var B=k.h,U=k.s,F=k.l,G=k.a,j=void 0===G?1:G;if(!$t(B)||!$t(U)||!$t(F))return null;var $=Zt({h:Number(B),s:Number(U),l:Number(F),a:Number(j)});return te($)},"hsl"],[function(k){var B=k.h,U=k.s,F=k.v,G=k.a,j=void 0===G?1:G;if(!$t(B)||!$t(U)||!$t(F))return null;var $=function(k){return{h:Wt(k.h),s:Vt(k.s,0,100),v:Vt(k.v,0,100),a:Vt(k.a)}}({h:Number(B),s:Number(U),v:Number(F),a:Number(j)});return Xt($)},"hsv"]]},oe=function(k,B){for(var U=0;U=.5},k.prototype.toHex=function(){return B=(k=Kt(this.rgba)).r,U=k.g,F=k.b,j=(G=k.a)<1?Yt(Ht(255*G)):"","#"+Yt(B)+Yt(U)+Yt(F)+j;var k,B,U,F,G,j},k.prototype.toRgb=function(){return Kt(this.rgba)},k.prototype.toRgbString=function(){return B=(k=Kt(this.rgba)).r,U=k.g,F=k.b,(G=k.a)<1?"rgba("+B+", "+U+", "+F+", "+G+")":"rgb("+B+", "+U+", "+F+")";var k,B,U,F,G},k.prototype.toHsl=function(){return Jt(ee(this.rgba))},k.prototype.toHslString=function(){return B=(k=Jt(ee(this.rgba))).h,U=k.s,F=k.l,(G=k.a)<1?"hsla("+B+", "+U+"%, "+F+"%, "+G+")":"hsl("+B+", "+U+"%, "+F+"%)";var k,B,U,F,G},k.prototype.toHsv=function(){return k=Qt(this.rgba),{h:Ht(k.h),s:Ht(k.s),v:Ht(k.v),a:Ht(k.a,3)};var k},k.prototype.invert=function(){return fe({r:255-(k=this.rgba).r,g:255-k.g,b:255-k.b,a:k.a});var k},k.prototype.saturate=function(k){return void 0===k&&(k=.1),fe(ce(this.rgba,k))},k.prototype.desaturate=function(k){return void 0===k&&(k=.1),fe(ce(this.rgba,-k))},k.prototype.grayscale=function(){return fe(ce(this.rgba,-1))},k.prototype.lighten=function(k){return void 0===k&&(k=.1),fe(le(this.rgba,k))},k.prototype.darken=function(k){return void 0===k&&(k=.1),fe(le(this.rgba,-k))},k.prototype.rotate=function(k){return void 0===k&&(k=15),this.hue(this.hue()+k)},k.prototype.alpha=function(k){return"number"==typeof k?fe({r:(B=this.rgba).r,g:B.g,b:B.b,a:k}):Ht(this.rgba.a,3);var B},k.prototype.hue=function(k){var B=ee(this.rgba);return"number"==typeof k?fe({h:k,s:B.s,l:B.l,a:B.a}):Ht(B.h)},k.prototype.isEqual=function(k){return this.toHex()===fe(k).toHex()},k}(),fe=function(k){return k instanceof ue?k:new ue(k)},be=[];!function(k){k.forEach((function(k){be.indexOf(k)<0&&(k(ue,re),be.push(k))}))}([function(k,B){var U={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},F={};for(var G in U)F[U[G]]=G;var j={};k.prototype.toName=function(B){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var G,$,H=F[this.toHex()];if(H)return H;if(null==B?void 0:B.closest){var V=this.toRgb(),W=1/0,q="black";if(!j.length)for(var K in U)j[K]=new k(U[K]).toRgb();for(var z in U){var Y=(G=V,$=j[z],Math.pow(G.r-$.r,2)+Math.pow(G.g-$.g,2)+Math.pow(G.b-$.b,2));Yk===B[U]));if(null!==k&&null!==B){const U=Object.keys(k),F=Object.keys(B);return U.length===F.length&&U.every((U=>k[U]===B[U]))}return k===B}toRgba(){const[k,B,U,F]=this._components;return{r:k,g:B,b:U,a:F}}toRgb(){const[k,B,U]=this._components;return{r:k,g:B,b:U}}toRgbaString(){const[k,B,U]=this.toUint8RgbArray();return`rgba(${k},${B},${U},${this.alpha})`}toUint8RgbArray(k){const[B,U,F]=this._components;return(k=k??[])[0]=Math.round(255*B),k[1]=Math.round(255*U),k[2]=Math.round(255*F),k}toRgbArray(k){k=k??[];const[B,U,F]=this._components;return k[0]=B,k[1]=U,k[2]=F,k}toNumber(){return this._int}toLittleEndianNumber(){const k=this._int;return(k>>16)+(65280&k)+((255&k)<<16)}multiply(B){const[U,F,G,j]=k.temp.setValue(B)._components;return this._components[0]*=U,this._components[1]*=F,this._components[2]*=G,this._components[3]*=j,this.refreshInt(),this._value=null,this}premultiply(k,B=!0){return B&&(this._components[0]*=k,this._components[1]*=k,this._components[2]*=k),this._components[3]=k,this.refreshInt(),this._value=null,this}toPremultiplied(k,B=!0){if(1===k)return(255<<24)+this._int;if(0===k)return B?0:this._int;let U=this._int>>16&255,F=this._int>>8&255,G=255&this._int;return B&&(U=U*k+.5|0,F=F*k+.5|0,G=G*k+.5|0),(255*k<<24)+(U<<16)+(F<<8)+G}toHex(){const k=this._int.toString(16);return`#${"000000".substring(0,6-k.length)+k}`}toHexa(){const k=Math.round(255*this._components[3]).toString(16);return this.toHex()+"00".substring(0,2-k.length)+k}setAlpha(k){return this._components[3]=this._clamp(k),this}round(k){const[B,U,F]=this._components;return this._components[0]=Math.round(B*k)/k,this._components[1]=Math.round(U*k)/k,this._components[2]=Math.round(F*k)/k,this.refreshInt(),this._value=null,this}toArray(k){k=k??[];const[B,U,F,G]=this._components;return k[0]=B,k[1]=U,k[2]=F,k[3]=G,k}normalize(B){let U,F,G,j;if(("number"==typeof B||B instanceof Number)&&B>=0&&B<=16777215){U=(B>>16&255)/255,F=(B>>8&255)/255,G=(255&B)/255,j=1}else if((Array.isArray(B)||B instanceof Float32Array)&&B.length>=3&&B.length<=4)B=this._clamp(B),[U,F,G,j=1]=B;else if((B instanceof Uint8Array||B instanceof Uint8ClampedArray)&&B.length>=3&&B.length<=4)B=this._clamp(B,0,255),[U,F,G,j=255]=B,U/=255,F/=255,G/=255,j/=255;else if("string"==typeof B||"object"==typeof B){if("string"==typeof B){const U=k.HEX_PATTERN.exec(B);U&&(B=`#${U[2]}`)}const $=fe(B);$.isValid()&&(({r:U,g:F,b:G,a:j}=$.rgba),U/=255,F/=255,G/=255)}if(void 0===U)throw new Error(`Unable to convert color ${B}`);this._components[0]=U,this._components[1]=F,this._components[2]=G,this._components[3]=j,this.refreshInt()}refreshInt(){this._clamp(this._components);const[k,B,U]=this._components;this._int=(255*k<<16)+(255*B<<8)+(255*U|0)}_clamp(k,B=0,U=1){return"number"==typeof k?Math.min(Math.max(k,B),U):(k.forEach(((F,G)=>{k[G]=Math.min(Math.max(F,B),U)})),k)}};pe.shared=new pe,pe.temp=new pe,pe.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let ve=pe;function ge(k,B=[]){return Rt("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),ve.shared.setValue(k).toRgbArray(B)}function me(k){return Rt("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),ve.shared.setValue(k).toHex()}function ye(k){return Rt("7.2.0","utils.string2hex is deprecated, use Color#toNumber instead"),ve.shared.setValue(k).toNumber()}function _e(k){return Rt("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),ve.shared.setValue(k).toNumber()}const Ee=function(){const k=[],B=[];for(let F=0;F<32;F++)k[F]=F,B[F]=F;k[H.NORMAL_NPM]=H.NORMAL,k[H.ADD_NPM]=H.ADD,k[H.SCREEN_NPM]=H.SCREEN,B[H.NORMAL]=H.NORMAL_NPM,B[H.ADD]=H.ADD_NPM,B[H.SCREEN]=H.SCREEN_NPM;const U=[];return U.push(B),U.push(k),U}();function we(k,B){return Ee[B?1:0][k]}function Te(k,B,U,F=!0){return Rt("7.2.0","utils.premultiplyRgba has moved to Color.premultiply"),ve.shared.setValue(k).premultiply(B,F).toArray(U??new Float32Array(4))}function Se(k,B){return Rt("7.2.0","utils.premultiplyTint has moved to Color.toPremultiplied"),ve.shared.setValue(k).toPremultiplied(B)}function Ae(k,B,U,F=!0){return Rt("7.2.0","utils.premultiplyTintToRgba has moved to Color.premultiply"),ve.shared.setValue(k).premultiply(B,F).toArray(U??new Float32Array(4))}const Ce=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;function Oe(k,B=null){const U=6*k;if((B=B||new Uint16Array(U)).length!==U)throw new Error(`Out buffer length is incorrect, got ${B.length} and expected ${U}`);for(let F=0,G=0;F>>1,k|=k>>>2,k|=k>>>4,k|=k>>>8,(k|=k>>>16)+1}function Me(k){return!(k&k-1||!k)}function Ne(k){let B=(k>65535?1:0)<<4,U=((k>>>=B)>255?1:0)<<3;return B|=U,U=((k>>>=U)>15?1:0)<<2,B|=U,U=((k>>>=U)>3?1:0)<<1,B|=U,B|(k>>>=U)>>1}function xe(k,B,U){const F=k.length;let G;if(B>=F||0===U)return;const j=F-(U=B+U>F?F-B:U);for(G=B;G(k.Renderer="renderer",k.Application="application",k.RendererSystem="renderer-webgl-system",k.RendererPlugin="renderer-webgl-plugin",k.CanvasRendererSystem="renderer-canvas-system",k.CanvasRendererPlugin="renderer-canvas-plugin",k.Asset="asset",k.LoadParser="load-parser",k.ResolveParser="resolve-parser",k.CacheParser="cache-parser",k.DetectionParser="detection-parser",k))(Je||{});const ti=k=>{if("function"==typeof k||"object"==typeof k&&k.extension){if(!k.extension)throw new Error("Extension class must have an extension object");k={..."object"!=typeof k.extension?{type:k.extension}:k.extension,ref:k}}if("object"!=typeof k)throw new Error("Invalid extension type");return"string"==typeof(k={...k}).type&&(k.type=[k.type]),k},ei=(k,B)=>ti(k).priority??B,ii={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...k){return k.map(ti).forEach((k=>{k.type.forEach((B=>this._removeHandlers[B]?.(k)))})),this},add(...k){return k.map(ti).forEach((k=>{k.type.forEach((B=>{const U=this._addHandlers,F=this._queue;U[B]?U[B]?.(k):(F[B]=F[B]||[],F[B]?.push(k))}))})),this},handle(k,B,U){const F=this._addHandlers,G=this._removeHandlers;if(F[k]||G[k])throw new Error(`Extension type ${k} already has a handler`);F[k]=B,G[k]=U;const j=this._queue;return j[k]&&(j[k]?.forEach((k=>B(k))),delete j[k]),this},handleByMap(k,B){return this.handle(k,(k=>{k.name&&(B[k.name]=k.ref)}),(k=>{k.name&&delete B[k.name]}))},handleByList(k,B,U=-1){return this.handle(k,(k=>{B.includes(k.ref)||(B.push(k.ref),B.sort(((k,B)=>ei(B,U)-ei(k,U))))}),(k=>{const U=B.indexOf(k.ref);-1!==U&&B.splice(U,1)}))}};class si{constructor(k){"number"==typeof k?this.rawBinaryData=new ArrayBuffer(k):k instanceof Uint8Array?this.rawBinaryData=k.buffer:this.rawBinaryData=k,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(k){return this[`${k}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(k){switch(k){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${k} isn't a valid view type`)}}}const ni=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");function ai(k){let B="";for(let U=0;U0&&(B+="\nelse "),U=0;--F){const G=oi[F];if(G.test&&G.test(k,U))return new G(k,B)}throw new Error("Unrecognized source type to auto-detect Resource")}class ci{constructor(k){this.items=[],this._name=k,this._aliasCount=0}emit(k,B,U,F,G,j,$,H){if(arguments.length>8)throw new Error("max arguments reached");const{name:V,items:W}=this;this._aliasCount++;for(let q=0,K=W.length;q0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(k){return k[this._name]&&(this.ensureNonAliasedItems(),this.remove(k),this.items.push(k)),this}remove(k){const B=this.items.indexOf(k);return-1!==B&&(this.ensureNonAliasedItems(),this.items.splice(B,1)),this}contains(k){return this.items.includes(k)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items.length=0,this._name=""}get empty(){return 0===this.items.length}get name(){return this._name}}Object.defineProperties(ci.prototype,{dispatch:{value:ci.prototype.emit},run:{value:ci.prototype.emit}});class di{constructor(k=0,B=0){this._width=k,this._height=B,this.destroyed=!1,this.internal=!1,this.onResize=new ci("setRealSize"),this.onUpdate=new ci("update"),this.onError=new ci("onError")}bind(k){this.onResize.add(k),this.onUpdate.add(k),this.onError.add(k),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(k){this.onResize.remove(k),this.onUpdate.remove(k),this.onError.remove(k)}resize(k,B){(k!==this._width||B!==this._height)&&(this._width=k,this._height=B,this.onResize.emit(k,B))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(k,B,U){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(k,B){return!1}}class li extends di{constructor(k,B){const{width:U,height:F}=B||{};if(!U||!F)throw new Error("BufferResource width or height invalid");super(U,F),this.data=k,this.unpackAlignment=B.unpackAlignment??4}upload(k,B,U){const F=k.gl;F.pixelStorei(F.UNPACK_ALIGNMENT,this.unpackAlignment),F.pixelStorei(F.UNPACK_PREMULTIPLY_ALPHA_WEBGL,B.alphaMode===Z.UNPACK);const G=B.realWidth,j=B.realHeight;return U.width===G&&U.height===j?F.texSubImage2D(B.target,0,0,0,G,j,B.format,U.type,this.data):(U.width=G,U.height=j,F.texImage2D(B.target,0,U.internalFormat,G,j,0,B.format,U.type,this.data)),!0}dispose(){this.data=null}static test(k){return null===k||k instanceof Int8Array||k instanceof Uint8Array||k instanceof Uint8ClampedArray||k instanceof Int16Array||k instanceof Uint16Array||k instanceof Int32Array||k instanceof Uint32Array||k instanceof Float32Array}}const ui={scaleMode:Y.NEAREST,alphaMode:Z.NPM},fi=class k extends(At()){constructor(B=null,U=null){super(),U=Object.assign({},k.defaultOptions,U);const{alphaMode:F,mipmap:G,anisotropicLevel:j,scaleMode:$,width:H,height:V,wrapMode:W,format:q,type:K,target:z,resolution:Y,resourceOptions:Q}=U;B&&!(B instanceof di)&&((B=hi(B,Q)).internal=!0),this.resolution=Y||at.RESOLUTION,this.width=Math.round((H||0)*this.resolution)/this.resolution,this.height=Math.round((V||0)*this.resolution)/this.resolution,this._mipmap=G,this.anisotropicLevel=j,this._wrapMode=W,this._scaleMode=$,this.format=q,this.type=K,this.target=z,this.alphaMode=F,this.uid=Be(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=H>0&&V>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(B)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(k){this._mipmap!==k&&(this._mipmap=k,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(k){this._scaleMode!==k&&(this._scaleMode=k,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(k){this._wrapMode!==k&&(this._wrapMode=k,this.dirtyStyleId++)}setStyle(k,B){let U;return void 0!==k&&k!==this.scaleMode&&(this.scaleMode=k,U=!0),void 0!==B&&B!==this.mipmap&&(this.mipmap=B,U=!0),U&&this.dirtyStyleId++,this}setSize(k,B,U){return U=U||this.resolution,this.setRealSize(k*U,B*U,U)}setRealSize(k,B,U){return this.resolution=U||this.resolution,this.width=Math.round(k)/this.resolution,this.height=Math.round(B)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=Me(this.realWidth)&&Me(this.realHeight)}setResolution(k){const B=this.resolution;return B===k||(this.resolution=k,this.valid&&(this.width=Math.round(this.width*B)/k,this.height=Math.round(this.height*B)/k,this.emit("update",this)),this._refreshPOT()),this}setResource(k){if(this.resource===k)return this;if(this.resource)throw new Error("Resource can be set only once");return k.bind(this),this.resource=k,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(k){this.emit("error",this,k)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete $e[this.cacheId],delete je[this.cacheId],this.cacheId=null),this.valid=!1,this.dispose(),k.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(B,U,F=at.STRICT_TEXTURE_CACHE){const G="string"==typeof B;let j=null;if(G)j=B;else{if(!B._pixiId){const k=U?.pixiIdPrefix||"pixiid";B._pixiId=`${k}_${Be()}`}j=B._pixiId}let $=$e[j];if(G&&F&&!$)throw new Error(`The cacheId "${j}" does not exist in BaseTextureCache.`);return $||($=new k(B,U),$.cacheId=j,k.addToCache($,j)),$}static fromBuffer(B,U,F,G){B=B||new Float32Array(U*F*4);const j=new li(B,{width:U,height:F,...G?.resourceOptions});let $,H;return B instanceof Float32Array?($=W.RGBA,H=K.FLOAT):B instanceof Int32Array?($=W.RGBA_INTEGER,H=K.INT):B instanceof Uint32Array?($=W.RGBA_INTEGER,H=K.UNSIGNED_INT):B instanceof Int16Array?($=W.RGBA_INTEGER,H=K.SHORT):B instanceof Uint16Array?($=W.RGBA_INTEGER,H=K.UNSIGNED_SHORT):B instanceof Int8Array?($=W.RGBA,H=K.BYTE):($=W.RGBA,H=K.UNSIGNED_BYTE),j.internal=!0,new k(j,Object.assign({},ui,{type:H,format:$},G))}static addToCache(k,B){B&&(k.textureCacheIds.includes(B)||k.textureCacheIds.push(B),$e[B]&&$e[B]!==k&&console.warn(`BaseTexture added to the cache with an id [${B}] that already had an entry`),$e[B]=k)}static removeFromCache(k){if("string"==typeof k){const B=$e[k];if(B){const U=B.textureCacheIds.indexOf(k);return U>-1&&B.textureCacheIds.splice(U,1),delete $e[k],B}}else if(k?.textureCacheIds){for(let B=0;B1){for(let k=0;k(k[k.POLY=0]="POLY",k[k.RECT=1]="RECT",k[k.CIRC=2]="CIRC",k[k.ELIP=3]="ELIP",k[k.RREC=4]="RREC",k))(Ii||{});class Di{constructor(k=0,B=0){this.x=0,this.y=0,this.x=k,this.y=B}clone(){return new Di(this.x,this.y)}copyFrom(k){return this.set(k.x,k.y),this}copyTo(k){return k.set(this.x,this.y),k}equals(k){return k.x===this.x&&k.y===this.y}set(k=0,B=k){return this.x=k,this.y=B,this}}Di.prototype.toString=function(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`};const Ri=[new Di,new Di,new Di,new Di];class Pi{constructor(k=0,B=0,U=0,F=0){this.x=Number(k),this.y=Number(B),this.width=Number(U),this.height=Number(F),this.type=Ii.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new Pi(0,0,0,0)}clone(){return new Pi(this.x,this.y,this.width,this.height)}copyFrom(k){return this.x=k.x,this.y=k.y,this.width=k.width,this.height=k.height,this}copyTo(k){return k.x=this.x,k.y=this.y,k.width=this.width,k.height=this.height,k}contains(k,B){return!(this.width<=0||this.height<=0)&&(k>=this.x&&k=this.y&&Bk.right?k.right:this.right)<=B)return!1;const U=this.yk.bottom?k.bottom:this.bottom)>U}const U=this.left,F=this.right,G=this.top,j=this.bottom;if(F<=U||j<=G)return!1;const $=Ri[0].set(k.left,k.top),H=Ri[1].set(k.left,k.bottom),V=Ri[2].set(k.right,k.top),W=Ri[3].set(k.right,k.bottom);if(V.x<=$.x||H.y<=$.y)return!1;const q=Math.sign(B.a*B.d-B.b*B.c);if(0===q||(B.apply($,$),B.apply(H,H),B.apply(V,V),B.apply(W,W),Math.max($.x,H.x,V.x,W.x)<=U||Math.min($.x,H.x,V.x,W.x)>=F||Math.max($.y,H.y,V.y,W.y)<=G||Math.min($.y,H.y,V.y,W.y)>=j))return!1;const K=q*(H.y-$.y),z=q*($.x-H.x),Y=K*U+z*G,Q=K*F+z*G,X=K*U+z*j,Z=K*F+z*j;if(Math.max(Y,Q,X,Z)<=K*$.x+z*$.y||Math.min(Y,Q,X,Z)>=K*W.x+z*W.y)return!1;const J=q*($.y-V.y),tt=q*(V.x-$.x),et=J*U+tt*G,it=J*F+tt*G,st=J*U+tt*j,nt=J*F+tt*j;return!(Math.max(et,it,st,nt)<=J*$.x+tt*$.y||Math.min(et,it,st,nt)>=J*W.x+tt*W.y)}pad(k=0,B=k){return this.x-=k,this.y-=B,this.width+=2*k,this.height+=2*B,this}fit(k){const B=Math.max(this.x,k.x),U=Math.min(this.x+this.width,k.x+k.width),F=Math.max(this.y,k.y),G=Math.min(this.y+this.height,k.y+k.height);return this.x=B,this.width=Math.max(U-B,0),this.y=F,this.height=Math.max(G-F,0),this}ceil(k=1,B=.001){const U=Math.ceil((this.x+this.width-B)*k)/k,F=Math.ceil((this.y+this.height-B)*k)/k;return this.x=Math.floor((this.x+B)*k)/k,this.y=Math.floor((this.y+B)*k)/k,this.width=U-this.x,this.height=F-this.y,this}enlarge(k){const B=Math.min(this.x,k.x),U=Math.max(this.x+this.width,k.x+k.width),F=Math.min(this.y,k.y),G=Math.max(this.y+this.height,k.y+k.height);return this.x=B,this.width=U-B,this.y=F,this.height=G-F,this}}Pi.prototype.toString=function(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class Mi{constructor(k=0,B=0,U=0){this.x=k,this.y=B,this.radius=U,this.type=Ii.CIRC}clone(){return new Mi(this.x,this.y,this.radius)}contains(k,B){if(this.radius<=0)return!1;const U=this.radius*this.radius;let F=this.x-k,G=this.y-B;return F*=F,G*=G,F+G<=U}getBounds(){return new Pi(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)}}Mi.prototype.toString=function(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`};class Ni{constructor(k=0,B=0,U=0,F=0){this.x=k,this.y=B,this.width=U,this.height=F,this.type=Ii.ELIP}clone(){return new Ni(this.x,this.y,this.width,this.height)}contains(k,B){if(this.width<=0||this.height<=0)return!1;let U=(k-this.x)/this.width,F=(B-this.y)/this.height;return U*=U,F*=F,U+F<=1}getBounds(){return new Pi(this.x-this.width,this.y-this.height,this.width,this.height)}}Ni.prototype.toString=function(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`};class xi{constructor(...k){let B=Array.isArray(k[0])?k[0]:k;if("number"!=typeof B[0]){const k=[];for(let U=0,F=B.length;UB!=V>B&&k<(B-$)/(V-$)*(H-F)+F&&(U=!U)}return U}}xi.prototype.toString=function(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce(((k,B)=>`${k}, ${B}`),"")}]`};class Li{constructor(k=0,B=0,U=0,F=0,G=20){this.x=k,this.y=B,this.width=U,this.height=F,this.radius=G,this.type=Ii.RREC}clone(){return new Li(this.x,this.y,this.width,this.height,this.radius)}contains(k,B){if(this.width<=0||this.height<=0)return!1;if(k>=this.x&&k<=this.x+this.width&&B>=this.y&&B<=this.y+this.height){const U=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(B>=this.y+U&&B<=this.y+this.height-U||k>=this.x+U&&k<=this.x+this.width-U)return!0;let F=k-(this.x+U),G=B-(this.y+U);const j=U*U;if(F*F+G*G<=j||(F=k-(this.x+this.width-U),F*F+G*G<=j)||(G=B-(this.y+this.height-U),F*F+G*G<=j)||(F=k-(this.x+U),F*F+G*G<=j))return!0}return!1}}Li.prototype.toString=function(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`};class ki{constructor(k=1,B=0,U=0,F=1,G=0,j=0){this.array=null,this.a=k,this.b=B,this.c=U,this.d=F,this.tx=G,this.ty=j}fromArray(k){this.a=k[0],this.b=k[1],this.c=k[3],this.d=k[4],this.tx=k[2],this.ty=k[5]}set(k,B,U,F,G,j){return this.a=k,this.b=B,this.c=U,this.d=F,this.tx=G,this.ty=j,this}toArray(k,B){this.array||(this.array=new Float32Array(9));const U=B||this.array;return k?(U[0]=this.a,U[1]=this.b,U[2]=0,U[3]=this.c,U[4]=this.d,U[5]=0,U[6]=this.tx,U[7]=this.ty,U[8]=1):(U[0]=this.a,U[1]=this.c,U[2]=this.tx,U[3]=this.b,U[4]=this.d,U[5]=this.ty,U[6]=0,U[7]=0,U[8]=1),U}apply(k,B){B=B||new Di;const U=k.x,F=k.y;return B.x=this.a*U+this.c*F+this.tx,B.y=this.b*U+this.d*F+this.ty,B}applyInverse(k,B){B=B||new Di;const U=1/(this.a*this.d+this.c*-this.b),F=k.x,G=k.y;return B.x=this.d*U*F+-this.c*U*G+(this.ty*this.c-this.tx*this.d)*U,B.y=this.a*U*G+-this.b*U*F+(-this.ty*this.a+this.tx*this.b)*U,B}translate(k,B){return this.tx+=k,this.ty+=B,this}scale(k,B){return this.a*=k,this.d*=B,this.c*=k,this.b*=B,this.tx*=k,this.ty*=B,this}rotate(k){const B=Math.cos(k),U=Math.sin(k),F=this.a,G=this.c,j=this.tx;return this.a=F*B-this.b*U,this.b=F*U+this.b*B,this.c=G*B-this.d*U,this.d=G*U+this.d*B,this.tx=j*B-this.ty*U,this.ty=j*U+this.ty*B,this}append(k){const B=this.a,U=this.b,F=this.c,G=this.d;return this.a=k.a*B+k.b*F,this.b=k.a*U+k.b*G,this.c=k.c*B+k.d*F,this.d=k.c*U+k.d*G,this.tx=k.tx*B+k.ty*F+this.tx,this.ty=k.tx*U+k.ty*G+this.ty,this}setTransform(k,B,U,F,G,j,$,H,V){return this.a=Math.cos($+V)*G,this.b=Math.sin($+V)*G,this.c=-Math.sin($-H)*j,this.d=Math.cos($-H)*j,this.tx=k-(U*this.a+F*this.c),this.ty=B-(U*this.b+F*this.d),this}prepend(k){const B=this.tx;if(1!==k.a||0!==k.b||0!==k.c||1!==k.d){const B=this.a,U=this.c;this.a=B*k.a+this.b*k.c,this.b=B*k.b+this.b*k.d,this.c=U*k.a+this.d*k.c,this.d=U*k.b+this.d*k.d}return this.tx=B*k.a+this.ty*k.c+k.tx,this.ty=B*k.b+this.ty*k.d+k.ty,this}decompose(k){const B=this.a,U=this.b,F=this.c,G=this.d,j=k.pivot,$=-Math.atan2(-F,G),H=Math.atan2(U,B),V=Math.abs($+H);return V<1e-5||Math.abs(Ai-V)<1e-5?(k.rotation=H,k.skew.x=k.skew.y=0):(k.rotation=0,k.skew.x=$,k.skew.y=H),k.scale.x=Math.sqrt(B*B+U*U),k.scale.y=Math.sqrt(F*F+G*G),k.position.x=this.tx+(j.x*B+j.y*F),k.position.y=this.ty+(j.x*U+j.y*G),k}invert(){const k=this.a,B=this.b,U=this.c,F=this.d,G=this.tx,j=k*F-B*U;return this.a=F/j,this.b=-B/j,this.c=-U/j,this.d=k/j,this.tx=(U*this.ty-F*G)/j,this.ty=-(k*this.ty-B*G)/j,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const k=new ki;return k.a=this.a,k.b=this.b,k.c=this.c,k.d=this.d,k.tx=this.tx,k.ty=this.ty,k}copyTo(k){return k.a=this.a,k.b=this.b,k.c=this.c,k.d=this.d,k.tx=this.tx,k.ty=this.ty,k}copyFrom(k){return this.a=k.a,this.b=k.b,this.c=k.c,this.d=k.d,this.tx=k.tx,this.ty=k.ty,this}static get IDENTITY(){return new ki}static get TEMP_MATRIX(){return new ki}}ki.prototype.toString=function(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`};const Bi=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Ui=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Fi=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Gi=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],ji=[],$i=[],Hi=Math.sign;!function(){for(let k=0;k<16;k++){const B=[];ji.push(B);for(let U=0;U<16;U++){const F=Hi(Bi[k]*Bi[U]+Fi[k]*Ui[U]),G=Hi(Ui[k]*Bi[U]+Gi[k]*Ui[U]),j=Hi(Bi[k]*Fi[U]+Fi[k]*Gi[U]),$=Hi(Ui[k]*Fi[U]+Gi[k]*Gi[U]);for(let k=0;k<16;k++)if(Bi[k]===F&&Ui[k]===G&&Fi[k]===j&&Gi[k]===$){B.push(k);break}}}for(let k=0;k<16;k++){const B=new ki;B.set(Bi[k],Ui[k],Fi[k],Gi[k],0,0),$i.push(B)}}();const Vi={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:k=>Bi[k],uY:k=>Ui[k],vX:k=>Fi[k],vY:k=>Gi[k],inv:k=>8&k?15&k:7&-k,add:(k,B)=>ji[k][B],sub:(k,B)=>ji[k][Vi.inv(B)],rotate180:k=>4^k,isVertical:k=>2==(3&k),byDirection:(k,B)=>2*Math.abs(k)<=Math.abs(B)?B>=0?Vi.S:Vi.N:2*Math.abs(B)<=Math.abs(k)?k>0?Vi.E:Vi.W:B>0?k>0?Vi.SE:Vi.SW:k>0?Vi.NE:Vi.NW,matrixAppendRotationInv:(k,B,U=0,F=0)=>{const G=$i[Vi.inv(B)];G.tx=U,G.ty=F,k.append(G)}};class Wi{constructor(k,B,U=0,F=0){this._x=U,this._y=F,this.cb=k,this.scope=B}clone(k=this.cb,B=this.scope){return new Wi(k,B,this._x,this._y)}set(k=0,B=k){return(this._x!==k||this._y!==B)&&(this._x=k,this._y=B,this.cb.call(this.scope)),this}copyFrom(k){return(this._x!==k.x||this._y!==k.y)&&(this._x=k.x,this._y=k.y,this.cb.call(this.scope)),this}copyTo(k){return k.set(this._x,this._y),k}equals(k){return k.x===this._x&&k.y===this._y}get x(){return this._x}set x(k){this._x!==k&&(this._x=k,this.cb.call(this.scope))}get y(){return this._y}set y(k){this._y!==k&&(this._y=k,this.cb.call(this.scope))}}Wi.prototype.toString=function(){return`[@pixi/math:ObservablePoint x=${this.x} y=${this.y} scope=${this.scope}]`};const qi=class{constructor(){this.worldTransform=new ki,this.localTransform=new ki,this.position=new Wi(this.onChange,this,0,0),this.scale=new Wi(this.onChange,this,1,1),this.pivot=new Wi(this.onChange,this,0,0),this.skew=new Wi(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}updateLocalTransform(){const k=this.localTransform;this._localID!==this._currentLocalID&&(k.a=this._cx*this.scale.x,k.b=this._sx*this.scale.x,k.c=this._cy*this.scale.y,k.d=this._sy*this.scale.y,k.tx=this.position.x-(this.pivot.x*k.a+this.pivot.y*k.c),k.ty=this.position.y-(this.pivot.x*k.b+this.pivot.y*k.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(k){const B=this.localTransform;if(this._localID!==this._currentLocalID&&(B.a=this._cx*this.scale.x,B.b=this._sx*this.scale.x,B.c=this._cy*this.scale.y,B.d=this._sy*this.scale.y,B.tx=this.position.x-(this.pivot.x*B.a+this.pivot.y*B.c),B.ty=this.position.y-(this.pivot.x*B.b+this.pivot.y*B.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==k._worldID){const U=k.worldTransform,F=this.worldTransform;F.a=B.a*U.a+B.b*U.c,F.b=B.a*U.b+B.b*U.d,F.c=B.c*U.a+B.d*U.c,F.d=B.c*U.b+B.d*U.d,F.tx=B.tx*U.a+B.ty*U.c+U.tx,F.ty=B.tx*U.b+B.ty*U.d+U.ty,this._parentID=k._worldID,this._worldID++}}setFromMatrix(k){k.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(k){this._rotation!==k&&(this._rotation=k,this.updateSkew())}};qi.IDENTITY=new qi;let Ki=qi;Ki.prototype.toString=function(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`};const zi=[{test:k=>"float"===k.type&&1===k.size&&!k.isArray,code:k=>`\n if(uv["${k}"] !== ud["${k}"].value)\n {\n ud["${k}"].value = uv["${k}"]\n gl.uniform1f(ud["${k}"].location, uv["${k}"])\n }\n `},{test:(k,B)=>!("sampler2D"!==k.type&&"samplerCube"!==k.type&&"sampler2DArray"!==k.type||1!==k.size||k.isArray||null!=B&&void 0===B.castToBaseTexture),code:k=>`t = syncData.textureCount++;\n\n renderer.texture.bind(uv["${k}"], t);\n\n if(ud["${k}"].value !== t)\n {\n ud["${k}"].value = t;\n gl.uniform1i(ud["${k}"].location, t);\n; // eslint-disable-line max-len\n }`},{test:(k,B)=>"mat3"===k.type&&1===k.size&&!k.isArray&&void 0!==B.a,code:k=>`\n gl.uniformMatrix3fv(ud["${k}"].location, false, uv["${k}"].toArray(true));\n `,codeUbo:k=>`\n var ${k}_matrix = uv.${k}.toArray(true);\n\n data[offset] = ${k}_matrix[0];\n data[offset+1] = ${k}_matrix[1];\n data[offset+2] = ${k}_matrix[2];\n \n data[offset + 4] = ${k}_matrix[3];\n data[offset + 5] = ${k}_matrix[4];\n data[offset + 6] = ${k}_matrix[5];\n \n data[offset + 8] = ${k}_matrix[6];\n data[offset + 9] = ${k}_matrix[7];\n data[offset + 10] = ${k}_matrix[8];\n `},{test:(k,B)=>"vec2"===k.type&&1===k.size&&!k.isArray&&void 0!==B.x,code:k=>`\n cv = ud["${k}"].value;\n v = uv["${k}"];\n\n if(cv[0] !== v.x || cv[1] !== v.y)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n gl.uniform2f(ud["${k}"].location, v.x, v.y);\n }`,codeUbo:k=>`\n v = uv.${k};\n\n data[offset] = v.x;\n data[offset+1] = v.y;\n `},{test:k=>"vec2"===k.type&&1===k.size&&!k.isArray,code:k=>`\n cv = ud["${k}"].value;\n v = uv["${k}"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2f(ud["${k}"].location, v[0], v[1]);\n }\n `},{test:(k,B)=>"vec4"===k.type&&1===k.size&&!k.isArray&&void 0!==B.width,code:k=>`\n cv = ud["${k}"].value;\n v = uv["${k}"];\n\n if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n cv[2] = v.width;\n cv[3] = v.height;\n gl.uniform4f(ud["${k}"].location, v.x, v.y, v.width, v.height)\n }`,codeUbo:k=>`\n v = uv.${k};\n\n data[offset] = v.x;\n data[offset+1] = v.y;\n data[offset+2] = v.width;\n data[offset+3] = v.height;\n `},{test:(k,B)=>"vec4"===k.type&&1===k.size&&!k.isArray&&void 0!==B.red,code:k=>`\n cv = ud["${k}"].value;\n v = uv["${k}"];\n\n if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha)\n {\n cv[0] = v.red;\n cv[1] = v.green;\n cv[2] = v.blue;\n cv[3] = v.alpha;\n gl.uniform4f(ud["${k}"].location, v.red, v.green, v.blue, v.alpha)\n }`,codeUbo:k=>`\n v = uv.${k};\n\n data[offset] = v.red;\n data[offset+1] = v.green;\n data[offset+2] = v.blue;\n data[offset+3] = v.alpha;\n `},{test:(k,B)=>"vec3"===k.type&&1===k.size&&!k.isArray&&void 0!==B.red,code:k=>`\n cv = ud["${k}"].value;\n v = uv["${k}"];\n\n if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.a)\n {\n cv[0] = v.red;\n cv[1] = v.green;\n cv[2] = v.blue;\n \n gl.uniform3f(ud["${k}"].location, v.red, v.green, v.blue)\n }`,codeUbo:k=>`\n v = uv.${k};\n\n data[offset] = v.red;\n data[offset+1] = v.green;\n data[offset+2] = v.blue;\n `},{test:k=>"vec4"===k.type&&1===k.size&&!k.isArray,code:k=>`\n cv = ud["${k}"].value;\n v = uv["${k}"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4f(ud["${k}"].location, v[0], v[1], v[2], v[3])\n }`}],Yi={float:"\n if (cv !== v)\n {\n cu.value = v;\n gl.uniform1f(location, v);\n }",vec2:"\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2f(location, v[0], v[1])\n }",vec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3f(location, v[0], v[1], v[2])\n }",vec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4f(location, v[0], v[1], v[2], v[3]);\n }",int:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1i(location, v);\n }",ivec2:"\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2i(location, v[0], v[1]);\n }",ivec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3i(location, v[0], v[1], v[2]);\n }",ivec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4i(location, v[0], v[1], v[2], v[3]);\n }",uint:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1ui(location, v);\n }",uvec2:"\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2ui(location, v[0], v[1]);\n }",uvec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3ui(location, v[0], v[1], v[2]);\n }",uvec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4ui(location, v[0], v[1], v[2], v[3]);\n }",bool:"\n if (cv !== v)\n {\n cu.value = v;\n gl.uniform1i(location, v);\n }",bvec2:"\n if (cv[0] != v[0] || cv[1] != v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2i(location, v[0], v[1]);\n }",bvec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3i(location, v[0], v[1], v[2]);\n }",bvec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4i(location, v[0], v[1], v[2], v[3]);\n }",mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1i(location, v);\n }",samplerCube:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1i(location, v);\n }",sampler2DArray:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1i(location, v);\n }"},Qi={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};const Xi={};let Zi,Ji=Xi;function ts(){if(!Zi){Zi=et.MEDIUM;const k=function(){if(Ji===Xi||Ji?.isContextLost()){const k=at.ADAPTER.createCanvas();let B;at.PREFER_ENV>=G.WEBGL2&&(B=k.getContext("webgl2",{})),B||(B=k.getContext("webgl",{})||k.getContext("experimental-webgl",{}),B?B.getExtension("WEBGL_draw_buffers"):B=null),Ji=B}return Ji}();if(k&&k.getShaderPrecisionFormat){const B=k.getShaderPrecisionFormat(k.FRAGMENT_SHADER,k.HIGH_FLOAT);B&&(Zi=B.precision?et.HIGH:et.MEDIUM)}}return Zi}const es={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function is(k){return es[k]}let ss=null;const ns={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function as(k,B){if(!ss){const B=Object.keys(ns);ss={};for(let U=0;U0&&(B+="\nelse "),Uthis.size&&this.flush(),this._vertexCount+=k.vertexData.length/2,this._indexCount+=k.indices.length,this._bufferedTextures[this._bufferSize]=k._texture.baseTexture,this._bufferedElements[this._bufferSize++]=k)}buildTexturesAndDrawCalls(){const{_bufferedTextures:B,maxTextures:U}=this,F=k._textureArrayPool,G=this.renderer.batch,j=this._tempBoundTextures,$=this.renderer.textureGC.count;let H=++bi._globalBatch,V=0,W=F[0],q=0;G.copyBoundTextures(j,U);for(let k=0;k=U&&(G.boundArray(W,j,H,U),this.buildDrawCalls(W,q,k),q=k,W=F[++V],++H),K._batchEnabled=H,K.touched=$,W.elements[W.count++]=K)}W.count>0&&(G.boundArray(W,j,H,U),this.buildDrawCalls(W,q,this._bufferSize),++V,++H);for(let k=0;k0);for(let Q=0;Q=0;--F)k[F]=U[F]||null,k[F]&&(k[F]._batchLocation=F)}boundArray(k,B,U,F){const{elements:G,ids:j,count:$}=k;let H=0;for(let V=0;V<$;V++){const k=G[V],$=k._batchLocation;if($>=0&&$=G.WEBGL2&&(U=k.getContext("webgl2",B)),U)this.webGLVersion=2;else if(this.webGLVersion=1,U=k.getContext("webgl",B)||k.getContext("experimental-webgl",B),!U)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=U,this.getExtensions(),this.gl}getExtensions(){const{gl:k}=this,B={loseContext:k.getExtension("WEBGL_lose_context"),anisotropicFiltering:k.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:k.getExtension("OES_texture_float_linear"),s3tc:k.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:k.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:k.getExtension("WEBGL_compressed_texture_etc"),etc1:k.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:k.getExtension("WEBGL_compressed_texture_pvrtc")||k.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:k.getExtension("WEBGL_compressed_texture_atc"),astc:k.getExtension("WEBGL_compressed_texture_astc"),bptc:k.getExtension("EXT_texture_compression_bptc")};1===this.webGLVersion?Object.assign(this.extensions,B,{drawBuffers:k.getExtension("WEBGL_draw_buffers"),depthTexture:k.getExtension("WEBGL_depth_texture"),vertexArrayObject:k.getExtension("OES_vertex_array_object")||k.getExtension("MOZ_OES_vertex_array_object")||k.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:k.getExtension("OES_element_index_uint"),floatTexture:k.getExtension("OES_texture_float"),floatTextureLinear:k.getExtension("OES_texture_float_linear"),textureHalfFloat:k.getExtension("OES_texture_half_float"),textureHalfFloatLinear:k.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,B,{colorBufferFloat:k.getExtension("EXT_color_buffer_float")})}handleContextLost(k){k.preventDefault(),setTimeout((()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()}),0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const k=this.renderer.view;this.renderer=null,void 0!==k.removeEventListener&&(k.removeEventListener("webglcontextlost",this.handleContextLost),k.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(k){const B=k.getContextAttributes(),U="WebGL2RenderingContext"in globalThis&&k instanceof globalThis.WebGL2RenderingContext;U&&(this.webGLVersion=2),B&&!B.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const F=U||!!k.getExtension("OES_element_index_uint");this.supports.uint32Indices=F,F||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}Ss.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},Ss.extension={type:Je.RendererSystem,name:"context"},ii.add(Ss);class As{constructor(k,B){if(this.width=Math.round(k),this.height=Math.round(B),!this.width||!this.height)throw new Error("Framebuffer width or height is zero");this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new ci("disposeFramebuffer"),this.multisample=st.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(k=0,B){return this.colorTextures[k]=B||new bi(null,{scaleMode:Y.NEAREST,resolution:1,mipmap:X.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(k){return this.depthTexture=k||new bi(null,{scaleMode:Y.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:X.OFF,format:W.DEPTH_COMPONENT,type:K.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(k,B){if(k=Math.round(k),B=Math.round(B),!k||!B)throw new Error("Framebuffer width and height must not be zero");if(k!==this.width||B!==this.height){this.width=k,this.height=B,this.dirtyId++,this.dirtySize++;for(let U=0;U{const U=this.source;this.url=U.src;const F=()=>{this.destroyed||(U.onload=null,U.onerror=null,this.update(),this._load=null,this.createBitmap?k(this.process()):k(this))};U.complete&&U.src?F():(U.onload=F,U.onerror=k=>{B(k),this.onError.emit(k)})}))),this._load}process(){const k=this.source;if(null!==this._process)return this._process;if(null!==this.bitmap||!globalThis.createImageBitmap)return Promise.resolve(this);const B=globalThis.createImageBitmap,U=!k.crossOrigin||"anonymous"===k.crossOrigin;return this._process=fetch(k.src,{mode:U?"cors":"no-cors"}).then((k=>k.blob())).then((U=>B(U,0,0,k.width,k.height,{premultiplyAlpha:null===this.alphaMode||this.alphaMode===Z.UNPACK?"premultiply":"none"}))).then((k=>this.destroyed?Promise.reject():(this.bitmap=k,this.update(),this._process=null,Promise.resolve(this)))),this._process}upload(k,B,U){if("number"==typeof this.alphaMode&&(B.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(k,B,U);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(k,B,U,this.bitmap),!this.preserveBitmap){let k=!0;const F=B._glTextures;for(const G in F){const j=F[G];if(j!==U&&j.dirtyId!==B.dirtyId){k=!1;break}}k&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(k){return typeof HTMLImageElement<"u"&&("string"==typeof k||k instanceof HTMLImageElement)}}class Ds{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(k,B,U){const F=B.width,G=B.height;if(U){const B=k.width/2/F,j=k.height/2/G,$=k.x/F+B,H=k.y/G+j;U=Vi.add(U,Vi.NW),this.x0=$+B*Vi.uX(U),this.y0=H+j*Vi.uY(U),U=Vi.add(U,2),this.x1=$+B*Vi.uX(U),this.y1=H+j*Vi.uY(U),U=Vi.add(U,2),this.x2=$+B*Vi.uX(U),this.y2=H+j*Vi.uY(U),U=Vi.add(U,2),this.x3=$+B*Vi.uX(U),this.y3=H+j*Vi.uY(U)}else this.x0=k.x/F,this.y0=k.y/G,this.x1=(k.x+k.width)/F,this.y1=k.y/G,this.x2=(k.x+k.width)/F,this.y2=(k.y+k.height)/G,this.x3=k.x/F,this.y3=(k.y+k.height)/G;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}}Ds.prototype.toString=function(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`};const Rs=new Ds;function Ps(k){k.destroy=function(){},k.on=function(){},k.once=function(){},k.emit=function(){}}class Ms extends(At()){constructor(k,B,U,F,G,j,$){if(super(),this.noFrame=!1,B||(this.noFrame=!0,B=new Pi(0,0,1,1)),k instanceof Ms&&(k=k.baseTexture),this.baseTexture=k,this._frame=B,this.trim=F,this.valid=!1,this.destroyed=!1,this._uvs=Rs,this.uvMatrix=null,this.orig=U||B,this._rotate=Number(G||0),!0===G)this._rotate=2;else if(this._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=j?new Di(j.x,j.y):new Di(0,0),this.defaultBorders=$,this._updateID=0,this.textureCacheIds=[],k.valid?this.noFrame?k.valid&&this.onBaseTextureUpdated(k):this.frame=B:k.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&k.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(k){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=k.width,this._frame.height=k.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(k){if(this.baseTexture){if(k){const{resource:k}=this.baseTexture;k?.url&&je[k.url]&&Ms.removeFromCache(k.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,Ms.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0,this.emit("destroyed",this),this.removeAllListeners()}clone(){const k=this._frame.clone(),B=this._frame===this.orig?k:this.orig.clone(),U=new Ms(this.baseTexture,!this.noFrame&&k,B,this.trim?.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(U._frame=k),U}updateUvs(){this._uvs===Rs&&(this._uvs=new Ds),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(k,B={},U=at.STRICT_TEXTURE_CACHE){const F="string"==typeof k;let G=null;if(F)G=k;else if(k instanceof bi){if(!k.cacheId){const U=B?.pixiIdPrefix||"pixiid";k.cacheId=`${U}-${Be()}`,bi.addToCache(k,k.cacheId)}G=k.cacheId}else{if(!k._pixiId){const U=B?.pixiIdPrefix||"pixiid";k._pixiId=`${U}_${Be()}`}G=k._pixiId}let j=je[G];if(F&&U&&!j)throw new Error(`The cacheId "${G}" does not exist in TextureCache.`);return j||k instanceof bi?!j&&k instanceof bi&&(j=new Ms(k),Ms.addToCache(j,G)):(B.resolution||(B.resolution=Ze(k)),j=new Ms(new bi(k,B)),j.baseTexture.cacheId=G,bi.addToCache(j.baseTexture,G),Ms.addToCache(j,G)),j}static fromURL(k,B){const U=Object.assign({autoLoad:!1},B?.resourceOptions),F=Ms.from(k,Object.assign({resourceOptions:U},B),!1),G=F.baseTexture.resource;return F.baseTexture.valid?Promise.resolve(F):G.load().then((()=>Promise.resolve(F)))}static fromBuffer(k,B,U,F){return new Ms(bi.fromBuffer(k,B,U,F))}static fromLoader(k,B,U,F){const G=new bi(k,Object.assign({scaleMode:bi.defaultOptions.scaleMode,resolution:Ze(B)},F)),{resource:j}=G;j instanceof Is&&(j.url=B);const $=new Ms(G);return U||(U=B),bi.addToCache($.baseTexture,U),Ms.addToCache($,U),U!==B&&(bi.addToCache($.baseTexture,B),Ms.addToCache($,B)),$.baseTexture.valid?Promise.resolve($):new Promise((k=>{$.baseTexture.once("loaded",(()=>k($)))}))}static addToCache(k,B){B&&(k.textureCacheIds.includes(B)||k.textureCacheIds.push(B),je[B]&&je[B]!==k&&console.warn(`Texture added to the cache with an id [${B}] that already had an entry`),je[B]=k)}static removeFromCache(k){if("string"==typeof k){const B=je[k];if(B){const U=B.textureCacheIds.indexOf(k);return U>-1&&B.textureCacheIds.splice(U,1),delete je[k],B}}else if(k?.textureCacheIds){for(let B=0;Bthis.baseTexture.width,$=U+G>this.baseTexture.height;if(j||$){const k=j&&$?"and":"or",H=`X: ${B} + ${F} = ${B+F} > ${this.baseTexture.width}`,V=`Y: ${U} + ${G} = ${U+G} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${H} ${k} ${V}`)}this.valid=F&&G&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=k),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(k){this._rotate=k,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return Ms._EMPTY||(Ms._EMPTY=new Ms(new bi),Ps(Ms._EMPTY),Ps(Ms._EMPTY.baseTexture)),Ms._EMPTY}static get WHITE(){if(!Ms._WHITE){const k=at.ADAPTER.createCanvas(16,16),B=k.getContext("2d");k.width=16,k.height=16,B.fillStyle="white",B.fillRect(0,0,16,16),Ms._WHITE=new Ms(bi.from(k)),Ps(Ms._WHITE),Ps(Ms._WHITE.baseTexture)}return Ms._WHITE}}class Ns extends Ms{constructor(k,B){super(k,B),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(k){this.framebuffer.multisample=k}resize(k,B,U=!0){const F=this.baseTexture.resolution,G=Math.round(k*F)/F,j=Math.round(B*F)/F;this.valid=G>0&&j>0,this._frame.width=this.orig.width=G,this._frame.height=this.orig.height=j,U&&this.baseTexture.resize(G,j),this.updateUvs()}setResolution(k){const{baseTexture:B}=this;B.resolution!==k&&(B.setResolution(k),this.resize(B.width,B.height,!1))}static create(k){return new Ns(new Cs(k))}}class xs{constructor(k){this.texturePool={},this.textureOptions=k||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(k,B,U=st.NONE){const F=new Cs(Object.assign({width:k,height:B,resolution:1,multisample:U},this.textureOptions));return new Ns(F)}getOptimalTexture(k,B,U=1,F=st.NONE){let G;k=Math.max(Math.ceil(k*U-1e-6),1),B=Math.max(Math.ceil(B*U-1e-6),1),this.enableFullScreen&&k===this._pixelsWidth&&B===this._pixelsHeight?G=F>1?-F:-1:(G=((65535&(k=Pe(k)))<<16|65535&(B=Pe(B)))>>>0,F>1&&(G+=4294967296*F)),this.texturePool[G]||(this.texturePool[G]=[]);let j=this.texturePool[G].pop();return j||(j=this.createTexture(k,B,F)),j.filterPoolKey=G,j.setResolution(U),j}getFilterTexture(k,B,U){const F=this.getOptimalTexture(k.width,k.height,B||k.resolution,U||st.NONE);return F.filterFrame=k.filterFrame,F}returnTexture(k){const B=k.filterPoolKey;k.filterFrame=null,this.texturePool[B].push(k)}returnFilterTexture(k){this.returnTexture(k)}clear(k){if(k=!1!==k)for(const B in this.texturePool){const k=this.texturePool[B];if(k)for(let B=0;B0&&k.height>0;for(const k in this.texturePool){if(!(Number(k)<0))continue;const B=this.texturePool[k];if(B)for(let k=0;k1&&(F=this.getOptimalFilterTexture(k.width,k.height,B.resolution),F.filterFrame=k.filterFrame),U[G].apply(this,k,F,J.CLEAR,B);const j=k;k=F,F=j}U[G].apply(this,k,H.renderTexture,J.BLEND,B),G>1&&B.multisample>1&&this.returnFilterTexture(B.renderTexture),this.returnFilterTexture(k),this.returnFilterTexture(F)}B.clear(),this.statePool.push(B)}bindAndClear(k,B=J.CLEAR){const{renderTexture:U,state:F}=this.renderer;if(k===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,k?.filterFrame){const B=this.tempRect;B.x=0,B.y=0,B.width=k.filterFrame.width,B.height=k.filterFrame.height,U.bind(k,k.filterFrame,B)}else k!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?U.bind(k):this.renderer.renderTexture.bind(k,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const G=1&F.stateId||this.forceClear;(B===J.CLEAR||B===J.BLIT&&G)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(k,B,U,F){const G=this.renderer;G.state.set(k.state),this.bindAndClear(U,F),k.uniforms.uSampler=B,k.uniforms.filterGlobals=this.globalUniforms,G.shader.bind(k),k.legacy=!!k.program.attributeData.aTextureCoord,k.legacy?(this.quadUv.map(B._frame,B.filterFrame),G.geometry.bind(this.quadUv),G.geometry.draw(V.TRIANGLES)):(G.geometry.bind(this.quad),G.geometry.draw(V.TRIANGLE_STRIP))}calculateSpriteMatrix(k,B){const{sourceFrame:U,destinationFrame:F}=this.activeState,{orig:G}=B._texture,j=k.set(F.width,0,0,F.height,U.x,U.y),$=B.worldTransform.copyTo(ki.TEMP_MATRIX);return $.invert(),j.prepend($),j.scale(1/G.width,1/G.height),j.translate(B.anchor.x,B.anchor.y),j}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(k,B,U=1,F=st.NONE){return this.texturePool.getOptimalTexture(k,B,U,F)}getFilterTexture(k,B,U){if("number"==typeof k){const U=k;k=B,B=U}k=k||this.activeState.renderTexture;const F=this.texturePool.getOptimalTexture(k.width,k.height,B||k.resolution,U||st.NONE);return F.filterFrame=k.filterFrame,F}returnFilterTexture(k){this.texturePool.returnTexture(k)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(k,B){const U=Us[0],F=Us[1],G=Us[2],j=Us[3];U.set(B.left,B.top),F.set(B.left,B.bottom),G.set(B.right,B.top),j.set(B.right,B.bottom),k.apply(U,U),k.apply(F,F),k.apply(G,G),k.apply(j,j);const $=Math.min(U.x,F.x,G.x,j.x),H=Math.min(U.y,F.y,G.y,j.y),V=Math.max(U.x,F.x,G.x,j.x),W=Math.max(U.y,F.y,G.y,j.y);B.x=$,B.y=H,B.width=V-$,B.height=W-H}roundFrame(k,B,U,F,G){if(!(k.width<=0||k.height<=0||U.width<=0||U.height<=0)){if(G){const{a:k,b:B,c:U,d:F}=G;if((Math.abs(B)>1e-4||Math.abs(U)>1e-4)&&(Math.abs(k)>1e-4||Math.abs(F)>1e-4))return}(G=G?Fs.copyFrom(G):Fs.identity()).translate(-U.x,-U.y).scale(F.width/U.width,F.height/U.height).translate(F.x,F.y),this.transformAABB(G,k),k.ceil(B),this.transformAABB(G.invert(),k)}}}Gs.extension={type:Je.RendererSystem,name:"filter"},ii.add(Gs);class js{constructor(k){this.framebuffer=k,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=st.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const $s=new Pi;class Hs{constructor(k){this.renderer=k,this.managedFramebuffers=[],this.unknownFramebuffer=new As(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const k=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Pi,this.hasMRT=!0,this.writeDepthTexture=!0,1===this.renderer.context.webGLVersion){let B=this.renderer.context.extensions.drawBuffers,U=this.renderer.context.extensions.depthTexture;at.PREFER_ENV===G.WEBGL_LEGACY&&(B=null,U=null),B?k.drawBuffers=k=>B.drawBuffersWEBGL(k):(this.hasMRT=!1,k.drawBuffers=()=>{}),U||(this.writeDepthTexture=!1)}else this.msaaSamples=k.getInternalformatParameter(k.RENDERBUFFER,k.RGBA8,k.SAMPLES)}bind(k,B,U=0){const{gl:F}=this;if(k){const G=k.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(k);this.current!==k&&(this.current=k,F.bindFramebuffer(F.FRAMEBUFFER,G.framebuffer)),G.mipLevel!==U&&(k.dirtyId++,k.dirtyFormat++,G.mipLevel=U),G.dirtyId!==k.dirtyId&&(G.dirtyId=k.dirtyId,G.dirtyFormat!==k.dirtyFormat?(G.dirtyFormat=k.dirtyFormat,G.dirtySize=k.dirtySize,this.updateFramebuffer(k,U)):G.dirtySize!==k.dirtySize&&(G.dirtySize=k.dirtySize,this.resizeFramebuffer(k)));for(let B=0;B>U,F=B.height>>U,G=k/B.width;this.setViewport(B.x*G,B.y*G,k,F)}else{const B=k.width>>U,F=k.height>>U;this.setViewport(0,0,B,F)}}else this.current&&(this.current=null,F.bindFramebuffer(F.FRAMEBUFFER,null)),B?this.setViewport(B.x,B.y,B.width,B.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(k,B,U,F){const G=this.viewport;k=Math.round(k),B=Math.round(B),U=Math.round(U),F=Math.round(F),(G.width!==U||G.height!==F||G.x!==k||G.y!==B)&&(G.x=k,G.y=B,G.width=U,G.height=F,this.gl.viewport(k,B,U,F))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(k,B,U,F,G=$.COLOR|$.DEPTH){const{gl:j}=this;j.clearColor(k,B,U,F),j.clear(G)}initFramebuffer(k){const{gl:B}=this,U=new js(B.createFramebuffer());return U.multisample=this.detectSamples(k.multisample),k.glFramebuffers[this.CONTEXT_UID]=U,this.managedFramebuffers.push(k),k.disposeRunner.add(this),U}resizeFramebuffer(k){const{gl:B}=this,U=k.glFramebuffers[this.CONTEXT_UID];if(U.stencil){let F;B.bindRenderbuffer(B.RENDERBUFFER,U.stencil),F=1===this.renderer.context.webGLVersion?B.DEPTH_STENCIL:k.depth&&k.stencil?B.DEPTH24_STENCIL8:k.depth?B.DEPTH_COMPONENT24:B.STENCIL_INDEX8,U.msaaBuffer?B.renderbufferStorageMultisample(B.RENDERBUFFER,U.multisample,F,k.width,k.height):B.renderbufferStorage(B.RENDERBUFFER,F,k.width,k.height)}const F=k.colorTextures;let G=F.length;B.drawBuffers||(G=Math.min(G,1));for(let j=0;j1&&this.canMultisampleFramebuffer(k)?F.msaaBuffer=F.msaaBuffer||U.createRenderbuffer():F.msaaBuffer&&(U.deleteRenderbuffer(F.msaaBuffer),F.msaaBuffer=null,F.blitFramebuffer&&(F.blitFramebuffer.dispose(),F.blitFramebuffer=null));const $=[];for(let H=0;H1&&U.drawBuffers($),k.depthTexture&&this.writeDepthTexture){const F=k.depthTexture;this.renderer.texture.bind(F,0),U.framebufferTexture2D(U.FRAMEBUFFER,U.DEPTH_ATTACHMENT,U.TEXTURE_2D,F._glTextures[this.CONTEXT_UID].texture,B)}if(!k.stencil&&!k.depth||k.depthTexture&&this.writeDepthTexture)F.stencil&&(U.deleteRenderbuffer(F.stencil),F.stencil=null);else{let B,G;F.stencil=F.stencil||U.createRenderbuffer(),1===this.renderer.context.webGLVersion?(B=U.DEPTH_STENCIL_ATTACHMENT,G=U.DEPTH_STENCIL):k.depth&&k.stencil?(B=U.DEPTH_STENCIL_ATTACHMENT,G=U.DEPTH24_STENCIL8):k.depth?(B=U.DEPTH_ATTACHMENT,G=U.DEPTH_COMPONENT24):(B=U.STENCIL_ATTACHMENT,G=U.STENCIL_INDEX8),U.bindRenderbuffer(U.RENDERBUFFER,F.stencil),F.msaaBuffer?U.renderbufferStorageMultisample(U.RENDERBUFFER,F.multisample,G,k.width,k.height):U.renderbufferStorage(U.RENDERBUFFER,G,k.width,k.height),U.framebufferRenderbuffer(U.FRAMEBUFFER,B,U.RENDERBUFFER,F.stencil)}}canMultisampleFramebuffer(k){return 1!==this.renderer.context.webGLVersion&&k.colorTextures.length<=1&&!k.depthTexture}detectSamples(k){const{msaaSamples:B}=this;let U=st.NONE;if(k<=1||null===B)return U;for(let F=0;F=0&&this.managedFramebuffers.splice(G,1),k.disposeRunner.remove(this),B||(F.deleteFramebuffer(U.framebuffer),U.msaaBuffer&&F.deleteRenderbuffer(U.msaaBuffer),U.stencil&&F.deleteRenderbuffer(U.stencil)),U.blitFramebuffer&&this.disposeFramebuffer(U.blitFramebuffer,B)}disposeAll(k){const B=this.managedFramebuffers;this.managedFramebuffers=[];for(let U=0;UB.createVertexArrayOES(),k.bindVertexArray=k=>B.bindVertexArrayOES(k),k.deleteVertexArray=k=>B.deleteVertexArrayOES(k)):(this.hasVao=!1,k.createVertexArray=()=>null,k.bindVertexArray=()=>null,k.deleteVertexArray=()=>null)}if(2!==B.webGLVersion){const B=k.getExtension("ANGLE_instanced_arrays");B?(k.vertexAttribDivisor=(k,U)=>B.vertexAttribDivisorANGLE(k,U),k.drawElementsInstanced=(k,U,F,G,j)=>B.drawElementsInstancedANGLE(k,U,F,G,j),k.drawArraysInstanced=(k,U,F,G)=>B.drawArraysInstancedANGLE(k,U,F,G)):this.hasInstance=!1}this.canUseUInt32ElementIndex=2===B.webGLVersion||!!B.extensions.uint32ElementIndex}bind(k,B){B=B||this.renderer.shader.shader;const{gl:U}=this;let F=k.glVertexArrayObjects[this.CONTEXT_UID],G=!1;F||(this.managedGeometries[k.id]=k,k.disposeRunner.add(this),k.glVertexArrayObjects[this.CONTEXT_UID]=F={},G=!0);const j=F[B.program.id]||this.initGeometryVao(k,B,G);this._activeGeometry=k,this._activeVao!==j&&(this._activeVao=j,this.hasVao?U.bindVertexArray(j):this.activateVao(k,B.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const k=this._activeGeometry,B=this.renderer.buffer;for(let U=0;U"u"?.5:B,this.isSimple=!1}get texture(){return this._texture}set texture(k){this._texture=k,this._textureID=-1}multiplyUvs(k,B){void 0===B&&(B=k);const U=this.mapCoord;for(let F=0;F0?this.maskStack[this.maskStack.length-1]._colorMask:15;U!==B&&this.renderer.gl.colorMask(0!=(1&U),0!=(2&U),0!=(4&U),0!=(8&U))}destroy(){this.renderer=null}}Qs.extension={type:Je.RendererSystem,name:"mask"},ii.add(Qs);class Xs{constructor(k){this.renderer=k,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(k){const{gl:B}=this.renderer,U=this.getStackLength();this.maskStack=k;const F=this.getStackLength();F!==U&&(0===F?B.disable(this.glConst):(B.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const Zs=new ki,Js=[],tn=class k extends Xs{constructor(k){super(k),this.glConst=at.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const k=this.maskStack[this.maskStack.length-1];return k?k._scissorCounter:0}calcScissorRect(k){if(k._scissorRectLocal)return;const B=k._scissorRect,{maskObject:U}=k,{renderer:F}=this,G=F.renderTexture,j=U.getBounds(!0,Js.pop()??new Pi);this.roundFrameToPixels(j,G.current?G.current.resolution:F.resolution,G.sourceFrame,G.destinationFrame,F.projection.transform),B&&j.fit(B),k._scissorRectLocal=j}static isMatrixRotated(k){if(!k)return!1;const{a:B,b:U,c:F,d:G}=k;return(Math.abs(U)>1e-4||Math.abs(F)>1e-4)&&(Math.abs(B)>1e-4||Math.abs(G)>1e-4)}testScissor(B){const{maskObject:U}=B;if(!U.isFastRect||!U.isFastRect()||k.isMatrixRotated(U.worldTransform)||k.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(B);const F=B._scissorRectLocal;return F.width>0&&F.height>0}roundFrameToPixels(B,U,F,G,j){k.isMatrixRotated(j)||((j=j?Zs.copyFrom(j):Zs.identity()).translate(-F.x,-F.y).scale(G.width/F.width,G.height/F.height).translate(G.x,G.y),this.renderer.filter.transformAABB(j,B),B.fit(G),B.x=Math.round(B.x*U),B.y=Math.round(B.y*U),B.width=Math.round(B.width*U),B.height=Math.round(B.height*U))}push(k){k._scissorRectLocal||this.calcScissorRect(k);const{gl:B}=this.renderer;k._scissorRect||B.enable(B.SCISSOR_TEST),k._scissorCounter++,k._scissorRect=k._scissorRectLocal,this._useCurrent()}pop(k){const{gl:B}=this.renderer;k&&Js.push(k._scissorRectLocal),this.getStackLength()>0?this._useCurrent():B.disable(B.SCISSOR_TEST)}_useCurrent(){const k=this.maskStack[this.maskStack.length-1]._scissorRect;let B;B=this.renderer.renderTexture.current?k.y:this.renderer.height-k.height-k.y,this.renderer.gl.scissor(k.x,B,k.width,k.height)}};tn.extension={type:Je.RendererSystem,name:"scissor"};let en=tn;ii.add(en);class sn extends Xs{constructor(k){super(k),this.glConst=at.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const k=this.maskStack[this.maskStack.length-1];return k?k._stencilCounter:0}push(k){const B=k.maskObject,{gl:U}=this.renderer,F=k._stencilCounter;0===F&&(this.renderer.framebuffer.forceStencil(),U.clearStencil(0),U.clear(U.STENCIL_BUFFER_BIT),U.enable(U.STENCIL_TEST)),k._stencilCounter++;const G=k._colorMask;0!==G&&(k._colorMask=0,U.colorMask(!1,!1,!1,!1)),U.stencilFunc(U.EQUAL,F,4294967295),U.stencilOp(U.KEEP,U.KEEP,U.INCR),B.renderable=!0,B.render(this.renderer),this.renderer.batch.flush(),B.renderable=!1,0!==G&&(k._colorMask=G,U.colorMask(0!=(1&G),0!=(2&G),0!=(4&G),0!=(8&G))),this._useCurrent()}pop(k){const B=this.renderer.gl;if(0===this.getStackLength())B.disable(B.STENCIL_TEST);else{const U=0!==this.maskStack.length?this.maskStack[this.maskStack.length-1]:null,F=U?U._colorMask:15;0!==F&&(U._colorMask=0,B.colorMask(!1,!1,!1,!1)),B.stencilOp(B.KEEP,B.KEEP,B.DECR),k.renderable=!0,k.render(this.renderer),this.renderer.batch.flush(),k.renderable=!1,0!==F&&(U._colorMask=F,B.colorMask(0!=(1&F),0!=(2&F),0!=(4&F),0!=(8&F))),this._useCurrent()}}_useCurrent(){const k=this.renderer.gl;k.stencilFunc(k.EQUAL,this.getStackLength(),4294967295),k.stencilOp(k.KEEP,k.KEEP,k.KEEP)}}sn.extension={type:Je.RendererSystem,name:"stencil"},ii.add(sn);class nn{constructor(k){this.renderer=k,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get:()=>(Rt("7.0.0","renderer.plugins.extract has moved to renderer.extract"),k.extract)},prepare:{enumerable:!1,get:()=>(Rt("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),k.prepare)},interaction:{enumerable:!1,get:()=>(Rt("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),k.events)}})}init(){const k=this.rendererPlugins;for(const B in k)this.plugins[B]=new k[B](this.renderer)}destroy(){for(const k in this.plugins)this.plugins[k].destroy(),this.plugins[k]=null}}nn.extension={type:[Je.RendererSystem,Je.CanvasRendererSystem],name:"_plugin"},ii.add(nn);class an{constructor(k){this.renderer=k,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new ki,this.transform=null}update(k,B,U,F){this.destinationFrame=k||this.destinationFrame||this.defaultFrame,this.sourceFrame=B||this.sourceFrame||k,this.calculateProjection(this.destinationFrame,this.sourceFrame,U,F),this.transform&&this.projectionMatrix.append(this.transform);const G=this.renderer;G.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,G.globalUniforms.update(),G.shader.shader&&G.shader.syncUniformGroup(G.shader.shader.uniforms.globals)}calculateProjection(k,B,U,F){const G=this.projectionMatrix,j=F?-1:1;G.identity(),G.a=1/B.width*2,G.d=j*(1/B.height*2),G.tx=-1-B.x*G.a,G.ty=-j-B.y*G.d}setTransform(k){}destroy(){this.renderer=null}}an.extension={type:Je.RendererSystem,name:"projection"},ii.add(an);const rn=new Ki,on=new Pi;class hn{constructor(k){this.renderer=k,this._tempMatrix=new ki}generateTexture(k,B){const{region:U,...F}=B||{},G=U?.copyTo(on)||k.getLocalBounds(on,!0),j=F.resolution||this.renderer.resolution;G.width=Math.max(G.width,1/j),G.height=Math.max(G.height,1/j),F.width=G.width,F.height=G.height,F.resolution=j,F.multisample??(F.multisample=this.renderer.multisample);const $=Ns.create(F);this._tempMatrix.tx=-G.x,this._tempMatrix.ty=-G.y;const H=k.transform;return k.transform=rn,this.renderer.render(k,{renderTexture:$,transform:this._tempMatrix,skipUpdateTransform:!!k.parent,blit:!0}),k.transform=H,$}destroy(){}}hn.extension={type:[Je.RendererSystem,Je.CanvasRendererSystem],name:"textureGenerator"},ii.add(hn);const cn=new Pi,dn=new Pi;class ln{constructor(k){this.renderer=k,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Pi,this.destinationFrame=new Pi,this.viewportFrame=new Pi}contextChange(){const k=this.renderer?.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(k&&k.alpha&&k.premultipliedAlpha)}bind(k=null,B,U){const F=this.renderer;let G,j,$;this.current=k,k?(G=k.baseTexture,$=G.resolution,B||(cn.width=k.frame.width,cn.height=k.frame.height,B=cn),U||(dn.x=k.frame.x,dn.y=k.frame.y,dn.width=B.width,dn.height=B.height,U=dn),j=G.framebuffer):($=F.resolution,B||(cn.width=F._view.screen.width,cn.height=F._view.screen.height,B=cn),U||((U=cn).width=B.width,U.height=B.height));const H=this.viewportFrame;H.x=U.x*$,H.y=U.y*$,H.width=U.width*$,H.height=U.height*$,k||(H.y=F.view.height-(H.y+H.height)),H.ceil(),this.renderer.framebuffer.bind(j,H),this.renderer.projection.update(U,B,$,!j),k?this.renderer.mask.setMaskStack(G.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(B),this.destinationFrame.copyFrom(U)}clear(k,B){const U=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,F=ve.shared.setValue(k||U);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&F.premultiply(F.alpha);const G=this.destinationFrame,j=this.current?this.current.baseTexture:this.renderer._view.screen,$=G.width!==j.width||G.height!==j.height;if($){let{x:k,y:B,width:U,height:F}=this.viewportFrame;k=Math.round(k),B=Math.round(B),U=Math.round(U),F=Math.round(F),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(k,B,U,F)}this.renderer.framebuffer.clear(F.red,F.green,F.blue,F.alpha,B),$&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}ln.extension={type:Je.RendererSystem,name:"renderTexture"},ii.add(ln);class un{constructor(k,B){this.program=k,this.uniformData=B,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function fn(k,B,U){const F=k.createShader(B);return k.shaderSource(F,U),k.compileShader(F),F}function bn(k){const B=new Array(k);for(let U=0;U`${B}: ${k}`)),F=k.getShaderInfoLog(B),G=F.split("\n"),j={},$=G.map((k=>parseFloat(k.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1")))).filter((k=>!(!k||j[k])&&(j[k]=!0,!0))),H=[""];$.forEach((k=>{U[k-1]=`%c${U[k-1]}%c`,H.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")}));const V=U.join("\n");H[0]=V,console.error(F),console.groupCollapsed("click to view full shader code"),console.warn(...H),console.groupEnd()}function gn(k,B){const U=fn(k,k.VERTEX_SHADER,B.vertexSrc),F=fn(k,k.FRAGMENT_SHADER,B.fragmentSrc),G=k.createProgram();k.attachShader(G,U),k.attachShader(G,F);const j=B.extra?.transformFeedbackVaryings;if(j&&("function"!=typeof k.transformFeedbackVaryings?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):k.transformFeedbackVaryings(G,j.names,"separate"===j.bufferMode?k.SEPARATE_ATTRIBS:k.INTERLEAVED_ATTRIBS)),k.linkProgram(G),k.getProgramParameter(G,k.LINK_STATUS)||function(k,B,U,F){k.getProgramParameter(B,k.LINK_STATUS)||(k.getShaderParameter(U,k.COMPILE_STATUS)||vn(k,U),k.getShaderParameter(F,k.COMPILE_STATUS)||vn(k,F),console.error("PixiJS Error: Could not initialize shader."),""!==k.getProgramInfoLog(B)&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",k.getProgramInfoLog(B)))}(k,G,U,F),B.attributeData=function(k,B){const U={},F=B.getProgramParameter(k,B.ACTIVE_ATTRIBUTES);for(let G=0;Gk>B?1:-1));for(let F=0;Fk.index-B.index)),U}(k.uniforms,B),{uboElements:F,size:G}=function(k){const B=k.map((k=>({data:k,offset:0,dataLen:0,dirty:0})));let U=0,F=0,G=0;for(let j=0;j1&&(U=Math.max(U,16)*k.data.size),k.dataLen=U,F%U!=0&&F<16){const k=F%U%16;F+=k,G+=k}F+U>16?(G=16*Math.ceil(G/16),k.offset=G,G+=U,F=U):(k.offset=G,F+=U,G+=U)}return G=16*Math.ceil(G/16),{uboElements:B,size:G}}(U),j=["\n var v = null;\n var v2 = null;\n var cv = null;\n var t = 0;\n var gl = renderer.gl\n var index = 0;\n var data = buffer.data;\n "];for(let $=0;$1){const k=is(B.data.type),U=Math.max(_n[B.data.type]/16,1),F=k/U,$=(4-F%4)%4;j.push(`\n cv = ud.${G}.value;\n v = uv.${G};\n offset = ${B.offset/4};\n\n t = 0;\n\n for(var i=0; i < ${B.data.size*U}; i++)\n {\n for(var j = 0; j < ${F}; j++)\n {\n data[offset++] = v[t++];\n }\n offset += ${$};\n }\n\n `)}else{const k=yn[B.data.type];j.push(`\n cv = ud.${G}.value;\n v = uv.${G};\n offset = ${B.offset/4};\n ${k};\n `)}}return j.push("\n renderer.buffer.update(buffer);\n "),{size:G,syncFunc:new Function("ud","uv","renderer","syncData","buffer",j.join("\n"))}}let wn;let Tn=0;const Sn={textureCount:0,uboCount:0};class An{constructor(k){this.destroyed=!1,this.renderer=k,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=Tn++}systemCheck(){if(!function(){if("boolean"==typeof wn)return wn;try{wn=!0===new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")}catch{wn=!1}return wn}())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(k){this.gl=k,this.reset()}bind(k,B){k.disposeRunner.add(this),k.uniforms.globals=this.renderer.globalUniforms;const U=k.program,F=U.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(k);return this.shader=k,this.program!==U&&(this.program=U,this.gl.useProgram(F.program)),B||(Sn.textureCount=0,Sn.uboCount=0,this.syncUniformGroup(k.uniformGroup,Sn)),F}setUniforms(k){const B=this.shader.program,U=B.glPrograms[this.renderer.CONTEXT_UID];B.syncUniforms(U.uniformData,k,this.renderer)}syncUniformGroup(k,B){const U=this.getGlProgram();(!k.static||k.dirtyId!==U.uniformDirtyGroups[k.id])&&(U.uniformDirtyGroups[k.id]=k.dirtyId,this.syncUniforms(k,U,B))}syncUniforms(k,B,U){(k.syncUniforms[this.shader.program.id]||this.createSyncGroups(k))(B.uniformData,k.uniforms,this.renderer,U)}createSyncGroups(k){const B=this.getSignature(k,this.shader.program.uniformData,"u");return this.cache[B]||(this.cache[B]=function(k,B){const U=["\n var v = null;\n var cv = null;\n var cu = null;\n var t = 0;\n var gl = renderer.gl;\n "];for(const F in k.uniforms){const G=B[F];if(!G){!0===k.uniforms[F]?.group&&(k.uniforms[F].ubo?U.push(`\n renderer.shader.syncUniformBufferGroup(uv.${F}, '${F}');\n `):U.push(`\n renderer.shader.syncUniformGroup(uv.${F}, syncData);\n `));continue}const j=k.uniforms[F];let $=!1;for(let k=0;k>=1,U++;this.stateId=k.data}for(let B=0;Bk.systems[B])),U=[...B,...Object.keys(k.systems).filter((k=>!B.includes(k)))];for(const F of U)this.addSystem(k.systems[F],F)}addRunners(...k){k.forEach((k=>{this.runners[k]=new ci(k)}))}addSystem(k,B){const U=new k(this);if(this[B])throw new Error(`Whoops! The name "${B}" is already in use`);this[B]=U,this._systemsHash[B]=U;for(const F in this.runners)this.runners[F].add(U);return this}emitWithCustomOptions(k,B){const U=Object.keys(this._systemsHash);k.items.forEach((F=>{const G=U.find((k=>this._systemsHash[k]===F));F[k.name](B[G])}))}destroy(){Object.values(this.runners).forEach((k=>{k.destroy()})),this._systemsHash={}}}const Rn=class k{constructor(B){this.renderer=B,this.count=0,this.checkCount=0,this.maxIdle=k.defaultMaxIdle,this.checkCountMax=k.defaultCheckCountMax,this.mode=k.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==tt.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const k=this.renderer.texture,B=k.managedTextures;let U=!1;for(let F=0;Fthis.maxIdle&&(k.destroyTexture(G,!0),B[F]=null,U=!0)}if(U){let k=0;for(let U=0;U=0;F--)this.unload(k.children[F])}destroy(){this.renderer=null}};Rn.defaultMode=tt.AUTO,Rn.defaultMaxIdle=3600,Rn.defaultCheckCountMax=600,Rn.extension={type:Je.RendererSystem,name:"textureGC"};let Pn=Rn;ii.add(Pn);class Mn{constructor(k){this.texture=k,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=K.UNSIGNED_BYTE,this.internalFormat=W.RGBA,this.samplerType=0}}class Nn{constructor(k){this.renderer=k,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new bi,this.hasIntegerTextures=!1}contextChange(){const k=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=function(k){let B;return B="WebGL2RenderingContext"in globalThis&&k instanceof globalThis.WebGL2RenderingContext?{[K.UNSIGNED_BYTE]:{[W.RGBA]:k.RGBA8,[W.RGB]:k.RGB8,[W.RG]:k.RG8,[W.RED]:k.R8,[W.RGBA_INTEGER]:k.RGBA8UI,[W.RGB_INTEGER]:k.RGB8UI,[W.RG_INTEGER]:k.RG8UI,[W.RED_INTEGER]:k.R8UI,[W.ALPHA]:k.ALPHA,[W.LUMINANCE]:k.LUMINANCE,[W.LUMINANCE_ALPHA]:k.LUMINANCE_ALPHA},[K.BYTE]:{[W.RGBA]:k.RGBA8_SNORM,[W.RGB]:k.RGB8_SNORM,[W.RG]:k.RG8_SNORM,[W.RED]:k.R8_SNORM,[W.RGBA_INTEGER]:k.RGBA8I,[W.RGB_INTEGER]:k.RGB8I,[W.RG_INTEGER]:k.RG8I,[W.RED_INTEGER]:k.R8I},[K.UNSIGNED_SHORT]:{[W.RGBA_INTEGER]:k.RGBA16UI,[W.RGB_INTEGER]:k.RGB16UI,[W.RG_INTEGER]:k.RG16UI,[W.RED_INTEGER]:k.R16UI,[W.DEPTH_COMPONENT]:k.DEPTH_COMPONENT16},[K.SHORT]:{[W.RGBA_INTEGER]:k.RGBA16I,[W.RGB_INTEGER]:k.RGB16I,[W.RG_INTEGER]:k.RG16I,[W.RED_INTEGER]:k.R16I},[K.UNSIGNED_INT]:{[W.RGBA_INTEGER]:k.RGBA32UI,[W.RGB_INTEGER]:k.RGB32UI,[W.RG_INTEGER]:k.RG32UI,[W.RED_INTEGER]:k.R32UI,[W.DEPTH_COMPONENT]:k.DEPTH_COMPONENT24},[K.INT]:{[W.RGBA_INTEGER]:k.RGBA32I,[W.RGB_INTEGER]:k.RGB32I,[W.RG_INTEGER]:k.RG32I,[W.RED_INTEGER]:k.R32I},[K.FLOAT]:{[W.RGBA]:k.RGBA32F,[W.RGB]:k.RGB32F,[W.RG]:k.RG32F,[W.RED]:k.R32F,[W.DEPTH_COMPONENT]:k.DEPTH_COMPONENT32F},[K.HALF_FLOAT]:{[W.RGBA]:k.RGBA16F,[W.RGB]:k.RGB16F,[W.RG]:k.RG16F,[W.RED]:k.R16F},[K.UNSIGNED_SHORT_5_6_5]:{[W.RGB]:k.RGB565},[K.UNSIGNED_SHORT_4_4_4_4]:{[W.RGBA]:k.RGBA4},[K.UNSIGNED_SHORT_5_5_5_1]:{[W.RGBA]:k.RGB5_A1},[K.UNSIGNED_INT_2_10_10_10_REV]:{[W.RGBA]:k.RGB10_A2,[W.RGBA_INTEGER]:k.RGB10_A2UI},[K.UNSIGNED_INT_10F_11F_11F_REV]:{[W.RGB]:k.R11F_G11F_B10F},[K.UNSIGNED_INT_5_9_9_9_REV]:{[W.RGB]:k.RGB9_E5},[K.UNSIGNED_INT_24_8]:{[W.DEPTH_STENCIL]:k.DEPTH24_STENCIL8},[K.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[W.DEPTH_STENCIL]:k.DEPTH32F_STENCIL8}}:{[K.UNSIGNED_BYTE]:{[W.RGBA]:k.RGBA,[W.RGB]:k.RGB,[W.ALPHA]:k.ALPHA,[W.LUMINANCE]:k.LUMINANCE,[W.LUMINANCE_ALPHA]:k.LUMINANCE_ALPHA},[K.UNSIGNED_SHORT_5_6_5]:{[W.RGB]:k.RGB},[K.UNSIGNED_SHORT_4_4_4_4]:{[W.RGBA]:k.RGBA},[K.UNSIGNED_SHORT_5_5_5_1]:{[W.RGBA]:k.RGBA}},B}(k),this.samplerTypes=function(k){let B;return B="WebGL2RenderingContext"in globalThis&&k instanceof globalThis.WebGL2RenderingContext?{[k.RGB]:z.FLOAT,[k.RGBA]:z.FLOAT,[k.ALPHA]:z.FLOAT,[k.LUMINANCE]:z.FLOAT,[k.LUMINANCE_ALPHA]:z.FLOAT,[k.R8]:z.FLOAT,[k.R8_SNORM]:z.FLOAT,[k.RG8]:z.FLOAT,[k.RG8_SNORM]:z.FLOAT,[k.RGB8]:z.FLOAT,[k.RGB8_SNORM]:z.FLOAT,[k.RGB565]:z.FLOAT,[k.RGBA4]:z.FLOAT,[k.RGB5_A1]:z.FLOAT,[k.RGBA8]:z.FLOAT,[k.RGBA8_SNORM]:z.FLOAT,[k.RGB10_A2]:z.FLOAT,[k.RGB10_A2UI]:z.FLOAT,[k.SRGB8]:z.FLOAT,[k.SRGB8_ALPHA8]:z.FLOAT,[k.R16F]:z.FLOAT,[k.RG16F]:z.FLOAT,[k.RGB16F]:z.FLOAT,[k.RGBA16F]:z.FLOAT,[k.R32F]:z.FLOAT,[k.RG32F]:z.FLOAT,[k.RGB32F]:z.FLOAT,[k.RGBA32F]:z.FLOAT,[k.R11F_G11F_B10F]:z.FLOAT,[k.RGB9_E5]:z.FLOAT,[k.R8I]:z.INT,[k.R8UI]:z.UINT,[k.R16I]:z.INT,[k.R16UI]:z.UINT,[k.R32I]:z.INT,[k.R32UI]:z.UINT,[k.RG8I]:z.INT,[k.RG8UI]:z.UINT,[k.RG16I]:z.INT,[k.RG16UI]:z.UINT,[k.RG32I]:z.INT,[k.RG32UI]:z.UINT,[k.RGB8I]:z.INT,[k.RGB8UI]:z.UINT,[k.RGB16I]:z.INT,[k.RGB16UI]:z.UINT,[k.RGB32I]:z.INT,[k.RGB32UI]:z.UINT,[k.RGBA8I]:z.INT,[k.RGBA8UI]:z.UINT,[k.RGBA16I]:z.INT,[k.RGBA16UI]:z.UINT,[k.RGBA32I]:z.INT,[k.RGBA32UI]:z.UINT,[k.DEPTH_COMPONENT16]:z.FLOAT,[k.DEPTH_COMPONENT24]:z.FLOAT,[k.DEPTH_COMPONENT32F]:z.FLOAT,[k.DEPTH_STENCIL]:z.FLOAT,[k.DEPTH24_STENCIL8]:z.FLOAT,[k.DEPTH32F_STENCIL8]:z.FLOAT}:{[k.RGB]:z.FLOAT,[k.RGBA]:z.FLOAT,[k.ALPHA]:z.FLOAT,[k.LUMINANCE]:z.FLOAT,[k.LUMINANCE_ALPHA]:z.FLOAT,[k.DEPTH_STENCIL]:z.FLOAT},B}(k);const B=k.getParameter(k.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=B;for(let F=0;F=0;--G){const k=B[G];k&&k._glTextures[F].samplerType!==z.FLOAT&&this.renderer.texture.unbind(k)}}initTexture(k){const B=new Mn(this.gl.createTexture());return B.dirtyId=-1,k._glTextures[this.CONTEXT_UID]=B,this.managedTextures.push(k),k.on("dispose",this.destroyTexture,this),B}initTextureType(k,B){B.internalFormat=this.internalFormats[k.type]?.[k.format]??k.format,B.samplerType=this.samplerTypes[B.internalFormat]??z.FLOAT,2===this.webGLVersion&&k.type===K.HALF_FLOAT?B.type=this.gl.HALF_FLOAT:B.type=k.type}updateTexture(k){const B=k._glTextures[this.CONTEXT_UID];if(!B)return;const U=this.renderer;if(this.initTextureType(k,B),k.resource?.upload(U,k,B))B.samplerType!==z.FLOAT&&(this.hasIntegerTextures=!0);else{const F=k.realWidth,G=k.realHeight,j=U.gl;(B.width!==F||B.height!==G||B.dirtyId<0)&&(B.width=F,B.height=G,j.texImage2D(k.target,0,B.internalFormat,F,G,0,k.format,B.type,null))}k.dirtyStyleId!==B.dirtyStyleId&&this.updateTextureStyle(k),B.dirtyId=k.dirtyId}destroyTexture(k,B){const{gl:U}=this;if((k=k.castToBaseTexture())._glTextures[this.CONTEXT_UID]&&(this.unbind(k),U.deleteTexture(k._glTextures[this.CONTEXT_UID].texture),k.off("dispose",this.destroyTexture,this),delete k._glTextures[this.CONTEXT_UID],!B)){const B=this.managedTextures.indexOf(k);-1!==B&&xe(this.managedTextures,B,1)}}updateTextureStyle(k){const B=k._glTextures[this.CONTEXT_UID];B&&(k.mipmap!==X.POW2&&2===this.webGLVersion||k.isPowerOfTwo?B.mipmap=k.mipmap>=1:B.mipmap=!1,2===this.webGLVersion||k.isPowerOfTwo?B.wrapMode=k.wrapMode:B.wrapMode=Q.CLAMP,k.resource?.style(this.renderer,k,B)||this.setStyle(k,B),B.dirtyStyleId=k.dirtyStyleId)}setStyle(k,B){const U=this.gl;if(B.mipmap&&k.mipmap!==X.ON_MANUAL&&U.generateMipmap(k.target),U.texParameteri(k.target,U.TEXTURE_WRAP_S,B.wrapMode),U.texParameteri(k.target,U.TEXTURE_WRAP_T,B.wrapMode),B.mipmap){U.texParameteri(k.target,U.TEXTURE_MIN_FILTER,k.scaleMode===Y.LINEAR?U.LINEAR_MIPMAP_LINEAR:U.NEAREST_MIPMAP_NEAREST);const B=this.renderer.context.extensions.anisotropicFiltering;if(B&&k.anisotropicLevel>0&&k.scaleMode===Y.LINEAR){const F=Math.min(k.anisotropicLevel,U.getParameter(B.MAX_TEXTURE_MAX_ANISOTROPY_EXT));U.texParameterf(k.target,B.TEXTURE_MAX_ANISOTROPY_EXT,F)}}else U.texParameteri(k.target,U.TEXTURE_MIN_FILTER,k.scaleMode===Y.LINEAR?U.LINEAR:U.NEAREST);U.texParameteri(k.target,U.TEXTURE_MAG_FILTER,k.scaleMode===Y.LINEAR?U.LINEAR:U.NEAREST)}destroy(){this.renderer=null}}Nn.extension={type:Je.RendererSystem,name:"texture"},ii.add(Nn);class xn{constructor(k){this.renderer=k}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(k){const{gl:B,CONTEXT_UID:U}=this,F=k._glTransformFeedbacks[U]||this.createGLTransformFeedback(k);B.bindTransformFeedback(B.TRANSFORM_FEEDBACK,F)}unbind(){const{gl:k}=this;k.bindTransformFeedback(k.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(k,B){const{gl:U,renderer:F}=this;B&&F.shader.bind(B),U.beginTransformFeedback(k)}endTransformFeedback(){const{gl:k}=this;k.endTransformFeedback()}createGLTransformFeedback(k){const{gl:B,renderer:U,CONTEXT_UID:F}=this,G=B.createTransformFeedback();k._glTransformFeedbacks[F]=G,B.bindTransformFeedback(B.TRANSFORM_FEEDBACK,G);for(let j=0;jbi.defaultOptions.wrapMode,set(k){Rt("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),bi.defaultOptions.wrapMode=k}},SCALE_MODE:{get:()=>bi.defaultOptions.scaleMode,set(k){Rt("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),bi.defaultOptions.scaleMode=k}},MIPMAP_TEXTURES:{get:()=>bi.defaultOptions.mipmap,set(k){Rt("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),bi.defaultOptions.mipmap=k}},ANISOTROPIC_LEVEL:{get:()=>bi.defaultOptions.anisotropicLevel,set(k){Rt("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),bi.defaultOptions.anisotropicLevel=k}},FILTER_RESOLUTION:{get:()=>(Rt("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),_s.defaultResolution),set(k){_s.defaultResolution=k}},FILTER_MULTISAMPLE:{get:()=>(Rt("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),_s.defaultMultisample),set(k){_s.defaultMultisample=k}},SPRITE_MAX_TEXTURES:{get:()=>ms.defaultMaxTextures,set(k){Rt("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),ms.defaultMaxTextures=k}},SPRITE_BATCH_SIZE:{get:()=>ms.defaultBatchSize,set(k){Rt("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),ms.defaultBatchSize=k}},CAN_UPLOAD_SAME_BUFFER:{get:()=>ms.canUploadSameBuffer,set(k){Rt("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),ms.canUploadSameBuffer=k}},GC_MODE:{get:()=>Pn.defaultMode,set(k){Rt("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),Pn.defaultMode=k}},GC_MAX_IDLE:{get:()=>Pn.defaultMaxIdle,set(k){Rt("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),Pn.defaultMaxIdle=k}},GC_MAX_CHECK_COUNT:{get:()=>Pn.defaultCheckCountMax,set(k){Rt("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),Pn.defaultCheckCountMax=k}},PRECISION_VERTEX:{get:()=>ds.defaultVertexPrecision,set(k){Rt("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),ds.defaultVertexPrecision=k}},PRECISION_FRAGMENT:{get:()=>ds.defaultFragmentPrecision,set(k){Rt("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),ds.defaultFragmentPrecision=k}}});var kn=(k=>(k[k.INTERACTION=50]="INTERACTION",k[k.HIGH=25]="HIGH",k[k.NORMAL=0]="NORMAL",k[k.LOW=-25]="LOW",k[k.UTILITY=-50]="UTILITY",k))(kn||{});class Bn{constructor(k,B=null,U=0,F=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=k,this.context=B,this.priority=U,this.once=F}match(k,B=null){return this.fn===k&&this.context===B}emit(k){this.fn&&(this.context?this.fn.call(this.context,k):this.fn(k));const B=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),B}connect(k){this.previous=k,k.next&&(k.next.previous=this),this.next=k.next,k.next=this}destroy(k=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const B=this.next;return this.next=k?null:B,this.previous=null,B}}const Un=class k{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new Bn(null,null,1/0),this.deltaMS=1/k.targetFPMS,this.elapsedMS=1/k.targetFPMS,this._tick=k=>{this._requestId=null,this.started&&(this.update(k),this.started&&null===this._requestId&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(k,B,U=kn.NORMAL){return this._addListener(new Bn(k,B,U))}addOnce(k,B,U=kn.NORMAL){return this._addListener(new Bn(k,B,U,!0))}_addListener(k){let B=this._head.next,U=this._head;if(B){for(;B;){if(k.priority>B.priority){k.connect(U);break}U=B,B=B.next}k.previous||k.connect(U)}else k.connect(U);return this._startIfPossible(),this}remove(k,B){let U=this._head.next;for(;U;)U=U.match(k,B)?U.destroy():U.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let k=0,B=this._head;for(;B=B.next;)k++;return k}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let k=this._head.next;for(;k;)k=k.destroy(!0);this._head.destroy(),this._head=null}}update(B=performance.now()){let U;if(B>this.lastTime){if(U=this.elapsedMS=B-this.lastTime,U>this._maxElapsedMS&&(U=this._maxElapsedMS),U*=this.speed,this._minElapsedMS){const k=B-this._lastFrame|0;if(kFn.targetFPMS,set(k){Rt("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),Fn.targetFPMS=k}}});class Gn{static init(k){k=Object.assign({autoStart:!0,sharedTicker:!1},k),Object.defineProperty(this,"ticker",{set(k){this._ticker&&this._ticker.remove(this.render,this),this._ticker=k,k&&k.add(this.render,this,kn.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=k.sharedTicker?Fn.shared:new Fn,k.autoStart&&this.start()}static destroy(){if(this._ticker){const k=this._ticker;this.ticker=null,k.destroy()}}}Gn.extension=Je.Application,ii.add(Gn);const jn=[];ii.handleByList(Je.Renderer,jn);const $n="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",Hn="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n";class Vn{constructor(k){this.renderer=k}contextChange(k){let B;if(1===this.renderer.context.webGLVersion){const U=k.getParameter(k.FRAMEBUFFER_BINDING);k.bindFramebuffer(k.FRAMEBUFFER,null),B=k.getParameter(k.SAMPLES),k.bindFramebuffer(k.FRAMEBUFFER,U)}else{const U=k.getParameter(k.DRAW_FRAMEBUFFER_BINDING);k.bindFramebuffer(k.DRAW_FRAMEBUFFER,null),B=k.getParameter(k.SAMPLES),k.bindFramebuffer(k.DRAW_FRAMEBUFFER,U)}B>=st.HIGH?this.multisample=st.HIGH:B>=st.MEDIUM?this.multisample=st.MEDIUM:B>=st.LOW?this.multisample=st.LOW:this.multisample=st.NONE}destroy(){}}Vn.extension={type:Je.RendererSystem,name:"_multisample"},ii.add(Vn);class Wn{constructor(k){this.buffer=k||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class qn{constructor(k){this.renderer=k,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(k){const{gl:B,CONTEXT_UID:U}=this,F=k._glBuffers[U]||this.createGLBuffer(k);B.bindBuffer(k.type,F.buffer)}unbind(k){const{gl:B}=this;B.bindBuffer(k,null)}bindBufferBase(k,B){const{gl:U,CONTEXT_UID:F}=this;if(this.boundBufferBases[B]!==k){const G=k._glBuffers[F]||this.createGLBuffer(k);this.boundBufferBases[B]=k,U.bindBufferBase(U.UNIFORM_BUFFER,B,G.buffer)}}bindBufferRange(k,B,U){const{gl:F,CONTEXT_UID:G}=this;U=U||0;const j=k._glBuffers[G]||this.createGLBuffer(k);F.bindBufferRange(F.UNIFORM_BUFFER,B||0,j.buffer,256*U,256)}update(k){const{gl:B,CONTEXT_UID:U}=this,F=k._glBuffers[U]||this.createGLBuffer(k);if(k._updateID!==F.updateID)if(F.updateID=k._updateID,B.bindBuffer(k.type,F.buffer),F.byteLength>=k.data.byteLength)B.bufferSubData(k.type,0,k.data);else{const U=k.static?B.STATIC_DRAW:B.DYNAMIC_DRAW;F.byteLength=k.data.byteLength,B.bufferData(k.type,k.data,U)}}dispose(k,B){if(!this.managedBuffers[k.id])return;delete this.managedBuffers[k.id];const U=k._glBuffers[this.CONTEXT_UID],F=this.gl;k.disposeRunner.remove(this),U&&(B||F.deleteBuffer(U.buffer),delete k._glBuffers[this.CONTEXT_UID])}disposeAll(k){const B=Object.keys(this.managedBuffers);for(let U=0;Uk.resource)).filter((k=>k)).map((k=>k.load()));return this._load=Promise.all(k).then((()=>{const{realWidth:k,realHeight:B}=this.items[0];return this.resize(k,B),this.update(),Promise.resolve(this)})),this._load}}const Xn=class k extends Qn{constructor(B,U){const{width:F,height:G,autoLoad:j,linkBaseTexture:$}=U||{};if(B&&B.length!==k.SIDES)throw new Error(`Invalid length. Got ${B.length}, expected 6`);super(6,{width:F,height:G});for(let H=0;H0){if(!k.resource)throw new Error("CubeResource does not support copying of renderTexture.");this.addResourceAt(k.resource,B)}else k.target=q.TEXTURE_CUBE_MAP_POSITIVE_X+B,k.parentTextureArray=this.baseTexture,this.items[B]=k;return k.valid&&!this.valid&&this.resize(k.realWidth,k.realHeight),this.items[B]=k,this}upload(B,U,F){const G=this.itemDirtyIds;for(let j=0;j{if(null!==this.url)try{const B=await at.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const U=await B.blob();if(this.destroyed)return;const F=await createImageBitmap(U,{premultiplyAlpha:null===this.alphaMode||this.alphaMode===Z.UNPACK?"premultiply":"none"});if(this.destroyed)return void F.close();this.source=F,this.update(),k(this)}catch(Vt){if(this.destroyed)return;B(Vt),this.onError.emit(Vt)}else k(this)}))),this._load}upload(k,B,U){return this.source instanceof ImageBitmap?("number"==typeof this.alphaMode&&(B.alphaMode=this.alphaMode),super.upload(k,B,U)):(this.load(),!1)}dispose(){this.ownsImageBitmap&&this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(k){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&("string"==typeof k||k instanceof ImageBitmap)}static get EMPTY(){return Jn._EMPTY=Jn._EMPTY??at.ADAPTER.createCanvas(0,0),Jn._EMPTY}}const ta=class k extends Os{constructor(k,B){B=B||{},super(at.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=k,this.scale=B.scale||1,this._overrideWidth=B.width,this._overrideHeight=B.height,this._resolve=null,this._crossorigin=B.crossorigin,this._load=null,!1!==B.autoLoad&&this.load()}load(){return this._load||(this._load=new Promise((B=>{if(this._resolve=()=>{this.update(),B(this)},k.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}))),this._load}_loadSvg(){const k=new Image;Os.crossOrigin(k,this.svg,this._crossorigin),k.src=this.svg,k.onerror=B=>{this._resolve&&(k.onerror=null,this.onError.emit(B))},k.onload=()=>{if(!this._resolve)return;const B=k.width,U=k.height;if(!B||!U)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let F=B*this.scale,G=U*this.scale;(this._overrideWidth||this._overrideHeight)&&(F=this._overrideWidth||this._overrideHeight/U*B,G=this._overrideHeight||this._overrideWidth/B*U),F=Math.round(F),G=Math.round(G);const j=this.source;j.width=F,j.height=G,j._pixiId=`canvas_${Be()}`,j.getContext("2d").drawImage(k,0,0,B,U,0,0,F,G),this._resolve(),this._resolve=null}}static getSize(B){const U=k.SVG_SIZE.exec(B),F={};return U&&(F[U[1]]=Math.round(parseFloat(U[3])),F[U[5]]=Math.round(parseFloat(U[7]))),F}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(B,U){return"svg"===U||"string"==typeof B&&B.startsWith("data:image/svg+xml")||"string"==typeof B&&k.SVG_XML.test(B)}};ta.SVG_XML=/^(<\?xml[^?]+\?>)?\s*()]*-->)?\s*\]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;let ea=ta;const ia=class k extends Os{constructor(B,U){if(U=U||{},!(B instanceof HTMLVideoElement)){const F=document.createElement("video");!1!==U.autoLoad&&F.setAttribute("preload","auto"),!1!==U.playsinline&&(F.setAttribute("webkit-playsinline",""),F.setAttribute("playsinline","")),!0===U.muted&&(F.setAttribute("muted",""),F.muted=!0),!0===U.loop&&F.setAttribute("loop",""),!1!==U.autoPlay&&F.setAttribute("autoplay",""),"string"==typeof B&&(B=[B]);const G=B[0].src||B[0];Os.crossOrigin(F,G,U.crossorigin);for(let U=0;U{this.valid?B(this):(this._resolve=B,this._reject=U,k.load())})),this._load}_onError(k){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(k),this._reject&&(this._reject(k),this._reject=null,this._resolve=null)}_isSourcePlaying(){const k=this.source;return!k.paused&&!k.ended}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0)}_onCanPlay(){const k=this.source;k.removeEventListener("canplay",this._onCanPlay),k.removeEventListener("canplaythrough",this._onCanPlay);const B=this.valid;this._msToNextUpdate=0,this.update(),this._msToNextUpdate=0,!B&&this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&k.play()}dispose(){this._configureAutoUpdate();const k=this.source;k&&(k.removeEventListener("play",this._onPlayStart),k.removeEventListener("pause",this._onPlayStop),k.removeEventListener("seeked",this._onSeeked),k.removeEventListener("canplay",this._onCanPlay),k.removeEventListener("canplaythrough",this._onCanPlay),k.removeEventListener("error",this._onError,!0),k.pause(),k.src="",k.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(k){k!==this._autoUpdate&&(this._autoUpdate=k,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(k){k!==this._updateFPS&&(this._updateFPS=k,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.source.requestVideoFrameCallback?(this._isConnectedToTicker&&(Fn.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),null===this._videoFrameRequestCallbackHandle&&(this._videoFrameRequestCallbackHandle=this.source.requestVideoFrameCallback(this._videoFrameRequestCallback))):(null!==this._videoFrameRequestCallbackHandle&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(Fn.shared.add(this.update,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(null!==this._videoFrameRequestCallbackHandle&&(this.source.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Fn.shared.remove(this.update,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(B,U){return globalThis.HTMLVideoElement&&B instanceof HTMLVideoElement||k.TYPES.includes(U)}};ia.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],ia.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let sa=ia;oi.push(Jn,Is,class extends Os{constructor(k){super(k)}static test(k){const{OffscreenCanvas:B}=globalThis;return!!(B&&k instanceof B)||globalThis.HTMLCanvasElement&&k instanceof HTMLCanvasElement}},sa,class extends Os{constructor(k){super(k)}static test(k){return!!globalThis.VideoFrame&&k instanceof globalThis.VideoFrame}},ea,li,Zn,class extends Qn{constructor(k,B){const{width:U,height:F}=B||{};let G,j;Array.isArray(k)?(G=k,j=k.length):j=k,super(j,{width:U,height:F}),G&&this.initFromArray(G,B)}addBaseTextureAt(k,B){if(!k.resource)throw new Error("ArrayResource does not support RenderTexture");return this.addResourceAt(k.resource,B),this}bind(k){super.bind(k),k.target=q.TEXTURE_2D_ARRAY}upload(k,B,U){const{length:F,itemDirtyIds:G,items:j}=this,{gl:$}=k;U.dirtyId<0&&$.texImage3D($.TEXTURE_2D_ARRAY,0,U.internalFormat,this._width,this._height,F,0,B.format,U.type,null);for(let H=0;H{"use strict";U.d(B,{cz:()=>G,mc:()=>q,q9:()=>j});var F=U(22478);class G{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(k){return this.minX>this.maxX||this.minY>this.maxY?F.M_.EMPTY:((k=k||new F.M_(0,0,1,1)).x=this.minX,k.y=this.minY,k.width=this.maxX-this.minX,k.height=this.maxY-this.minY,k)}addPoint(k){this.minX=Math.min(this.minX,k.x),this.maxX=Math.max(this.maxX,k.x),this.minY=Math.min(this.minY,k.y),this.maxY=Math.max(this.maxY,k.y)}addPointMatrix(k,B){const{a:U,b:F,c:G,d:j,tx:$,ty:H}=k,V=U*B.x+G*B.y+$,W=F*B.x+j*B.y+H;this.minX=Math.min(this.minX,V),this.maxX=Math.max(this.maxX,V),this.minY=Math.min(this.minY,W),this.maxY=Math.max(this.maxY,W)}addQuad(k){let B=this.minX,U=this.minY,F=this.maxX,G=this.maxY,j=k[0],$=k[1];B=jF?j:F,G=$>G?$:G,j=k[2],$=k[3],B=jF?j:F,G=$>G?$:G,j=k[4],$=k[5],B=jF?j:F,G=$>G?$:G,j=k[6],$=k[7],B=jF?j:F,G=$>G?$:G,this.minX=B,this.minY=U,this.maxX=F,this.maxY=G}addFrame(k,B,U,F,G){this.addFrameMatrix(k.worldTransform,B,U,F,G)}addFrameMatrix(k,B,U,F,G){const j=k.a,$=k.b,H=k.c,V=k.d,W=k.tx,q=k.ty;let K=this.minX,z=this.minY,Y=this.maxX,Q=this.maxY,X=j*B+H*U+W,Z=$*B+V*U+q;K=XY?X:Y,Q=Z>Q?Z:Q,X=j*F+H*U+W,Z=$*F+V*U+q,K=XY?X:Y,Q=Z>Q?Z:Q,X=j*B+H*G+W,Z=$*B+V*G+q,K=XY?X:Y,Q=Z>Q?Z:Q,X=j*F+H*G+W,Z=$*F+V*G+q,K=XY?X:Y,Q=Z>Q?Z:Q,this.minX=K,this.minY=z,this.maxX=Y,this.maxY=Q}addVertexData(k,B,U){let F=this.minX,G=this.minY,j=this.maxX,$=this.maxY;for(let H=B;Hj?B:j,$=U>$?U:$}this.minX=F,this.minY=G,this.maxX=j,this.maxY=$}addVertices(k,B,U,F){this.addVerticesMatrix(k.worldTransform,B,U,F)}addVerticesMatrix(k,B,U,F,G=0,j=G){const $=k.a,H=k.b,V=k.c,W=k.d,q=k.tx,K=k.ty;let z=this.minX,Y=this.minY,Q=this.maxX,X=this.maxY;for(let Z=U;ZF?k.maxX:F,this.maxY=k.maxY>G?k.maxY:G}addBoundsMask(k,B){const U=k.minX>B.minX?k.minX:B.minX,F=k.minY>B.minY?k.minY:B.minY,G=k.maxX$?G:$,this.maxY=j>H?j:H}}addBoundsMatrix(k,B){this.addFrameMatrix(B,k.minX,k.minY,k.maxX,k.maxY)}addBoundsArea(k,B){const U=k.minX>B.x?k.minX:B.x,F=k.minY>B.y?k.minY:B.y,G=k.maxX$?G:$,this.maxY=j>H?j:H}}pad(k=0,B=k){this.isEmpty()||(this.minX-=k,this.maxX+=k,this.minY-=B,this.maxY+=B)}addFramePad(k,B,U,F,G,j){k-=G,B-=j,U+=G,F+=j,this.minX=this.minXU?this.maxX:U,this.minY=this.minYF?this.maxY:F}}class j extends F.Wp.EventEmitter{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new F.dL,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new G,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(k){const B=Object.keys(k);for(let U=0;U1)for(let B=0;Bthis.children.length)throw new Error(`${k}addChildAt: The index ${B} supplied is out of bounds ${this.children.length}`);return k.parent&&k.parent.removeChild(k),k.parent=this,this.sortDirty=!0,k.transform._parentID=-1,this.children.splice(B,0,k),this._boundsID++,this.onChildrenChange(B),k.emit("added",this),this.emit("childAdded",k,this,B),k}swapChildren(k,B){if(k===B)return;const U=this.getChildIndex(k),F=this.getChildIndex(B);this.children[U]=B,this.children[F]=k,this.onChildrenChange(U=this.children.length)throw new Error(`The index ${B} supplied is out of bounds ${this.children.length}`);const U=this.getChildIndex(k);F.Wp.removeItems(this.children,U,1),this.children.splice(B,0,k),this.onChildrenChange(B)}getChildAt(k){if(k<0||k>=this.children.length)throw new Error(`getChildAt: Index (${k}) does not exist.`);return this.children[k]}removeChild(...k){if(k.length>1)for(let B=0;B0&&F<=B){G=this.children.splice(U,F);for(let k=0;k1&&this.children.sort(V),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let k=0,B=this.children.length;k0&&U.height>0))return;let F,G;this.cullArea?(F=this.cullArea,G=this.worldTransform):this._render!==k.prototype._render&&(F=this.getBounds(!0));const j=B.projection.transform;if(j&&(G?(G=H.copyFrom(G),G.prepend(j)):G=j),F&&U.intersects(F,G))this._render(B);else if(this.cullArea)return;for(let k=0,$=this.children.length;k<$;++k){const U=this.children[k],F=U.cullable;U.cullable=F||!this.cullArea,U.render(B),U.cullable=F}}render(k){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this.filters?.length)this.renderAdvanced(k);else if(this.cullable)this._renderWithCulling(k);else{this._render(k);for(let B=0,U=this.children.length;Bq.defaultSortableChildren,set(k){F.Wp.deprecation("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),q.defaultSortableChildren=k}}})},20136:(k,B,U)=>{"use strict";U.d(B,{Z:()=>G});var F=U(22478);class G extends F.dJ{constructor(k=1){super(F.MT,"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n",{uAlpha:1}),this.alpha=k}get alpha(){return this.uniforms.uAlpha}set alpha(k){this.uniforms.uAlpha=k}}},58268:(k,B,U)=>{"use strict";U.d(B,{N:()=>G});var F=U(22478);class G extends F.dJ{constructor(){const k={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};super(F.Eo,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n if (uAlpha == 0.0) {\n gl_FragColor = c;\n return;\n }\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (c.a > 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n",k),this.alpha=1}_loadMatrix(k,B=!1){let U=k;B&&(this._multiply(U,this.uniforms.m,k),U=this._colorMatrix(U)),this.uniforms.m=U}_multiply(k,B,U){return k[0]=B[0]*U[0]+B[1]*U[5]+B[2]*U[10]+B[3]*U[15],k[1]=B[0]*U[1]+B[1]*U[6]+B[2]*U[11]+B[3]*U[16],k[2]=B[0]*U[2]+B[1]*U[7]+B[2]*U[12]+B[3]*U[17],k[3]=B[0]*U[3]+B[1]*U[8]+B[2]*U[13]+B[3]*U[18],k[4]=B[0]*U[4]+B[1]*U[9]+B[2]*U[14]+B[3]*U[19]+B[4],k[5]=B[5]*U[0]+B[6]*U[5]+B[7]*U[10]+B[8]*U[15],k[6]=B[5]*U[1]+B[6]*U[6]+B[7]*U[11]+B[8]*U[16],k[7]=B[5]*U[2]+B[6]*U[7]+B[7]*U[12]+B[8]*U[17],k[8]=B[5]*U[3]+B[6]*U[8]+B[7]*U[13]+B[8]*U[18],k[9]=B[5]*U[4]+B[6]*U[9]+B[7]*U[14]+B[8]*U[19]+B[9],k[10]=B[10]*U[0]+B[11]*U[5]+B[12]*U[10]+B[13]*U[15],k[11]=B[10]*U[1]+B[11]*U[6]+B[12]*U[11]+B[13]*U[16],k[12]=B[10]*U[2]+B[11]*U[7]+B[12]*U[12]+B[13]*U[17],k[13]=B[10]*U[3]+B[11]*U[8]+B[12]*U[13]+B[13]*U[18],k[14]=B[10]*U[4]+B[11]*U[9]+B[12]*U[14]+B[13]*U[19]+B[14],k[15]=B[15]*U[0]+B[16]*U[5]+B[17]*U[10]+B[18]*U[15],k[16]=B[15]*U[1]+B[16]*U[6]+B[17]*U[11]+B[18]*U[16],k[17]=B[15]*U[2]+B[16]*U[7]+B[17]*U[12]+B[18]*U[17],k[18]=B[15]*U[3]+B[16]*U[8]+B[17]*U[13]+B[18]*U[18],k[19]=B[15]*U[4]+B[16]*U[9]+B[17]*U[14]+B[18]*U[19]+B[19],k}_colorMatrix(k){const B=new Float32Array(k);return B[4]/=255,B[9]/=255,B[14]/=255,B[19]/=255,B}brightness(k,B){const U=[k,0,0,0,0,0,k,0,0,0,0,0,k,0,0,0,0,0,1,0];this._loadMatrix(U,B)}tint(k,B){const[U,G,j]=F.Q1.shared.setValue(k).toArray(),$=[U,0,0,0,0,0,G,0,0,0,0,0,j,0,0,0,0,0,1,0];this._loadMatrix($,B)}greyscale(k,B){const U=[k,k,k,0,0,k,k,k,0,0,k,k,k,0,0,0,0,0,1,0];this._loadMatrix(U,B)}blackAndWhite(k){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],k)}hue(k,B){k=(k||0)/180*Math.PI;const U=Math.cos(k),F=Math.sin(k),G=1/3,j=(0,Math.sqrt)(G),$=[U+(1-U)*G,G*(1-U)-j*F,G*(1-U)+j*F,0,0,G*(1-U)+j*F,U+G*(1-U),G*(1-U)-j*F,0,0,G*(1-U)-j*F,G*(1-U)+j*F,U+G*(1-U),0,0,0,0,0,1,0];this._loadMatrix($,B)}contrast(k,B){const U=(k||0)+1,F=-.5*(U-1),G=[U,0,0,0,F,0,U,0,0,F,0,0,U,0,F,0,0,0,1,0];this._loadMatrix(G,B)}saturate(k=0,B){const U=2*k/3+1,F=-.5*(U-1),G=[U,F,F,0,0,F,U,F,0,0,F,F,U,0,0,0,0,0,1,0];this._loadMatrix(G,B)}desaturate(){this.saturate(-1)}negative(k){this._loadMatrix([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],k)}sepia(k){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],k)}technicolor(k){this._loadMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],k)}polaroid(k){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],k)}toBGR(k){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],k)}kodachrome(k){this._loadMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],k)}browni(k){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],k)}vintage(k){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],k)}colorTone(k,B,U,G,j){k=k||.2,B=B||.15,U=U||16770432,G=G||3375104;const $=F.Q1.shared,[H,V,W]=$.setValue(U).toArray(),[q,K,z]=$.setValue(G).toArray(),Y=[.3,.59,.11,0,0,H,V,W,k,0,q,K,z,B,0,H-q,V-K,W-z,0,0];this._loadMatrix(Y,j)}night(k,B){const U=[-2*(k=k||.1),-k,0,0,0,-k,0,k,0,0,0,k,2*k,0,0,0,0,0,1,0];this._loadMatrix(U,B)}predator(k,B){const U=[11.224130630493164*k,-4.794486999511719*k,-2.8746118545532227*k,0*k,.40342438220977783*k,-3.6330697536468506*k,9.193157196044922*k,-2.951810836791992*k,0*k,-1.316135048866272*k,-3.2184197902679443*k,-4.2375030517578125*k,7.476448059082031*k,0*k,.8044459223747253*k,0,0,0,1,0];this._loadMatrix(U,B)}lsd(k){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],k)}reset(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)}get matrix(){return this.uniforms.m}set matrix(k){this.uniforms.m=k}get alpha(){return this.uniforms.uAlpha}set alpha(k){this.uniforms.uAlpha=k}}G.prototype.grayscale=G.prototype.greyscale},37692:(k,B,U)=>{"use strict";U.d(B,{N:()=>j});var F=U(22478),G="varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float epsilon;\n\nconst int MAX_COLORS = %maxColors%;\n\nuniform vec3 originalColors[MAX_COLORS];\nuniform vec3 targetColors[MAX_COLORS];\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n\n float alpha = gl_FragColor.a;\n if (alpha < 0.0001)\n {\n return;\n }\n\n vec3 color = gl_FragColor.rgb / alpha;\n\n for(int i = 0; i < MAX_COLORS; i++)\n {\n vec3 origColor = originalColors[i];\n if (origColor.r < 0.0)\n {\n break;\n }\n vec3 colorDiff = origColor - color;\n if (length(colorDiff) < epsilon)\n {\n vec3 targetColor = targetColors[i];\n gl_FragColor = vec4((targetColor + colorDiff) * alpha, alpha);\n return;\n }\n }\n}\n";class j extends F.dJ{constructor(k,B=.05,U=k.length){super("attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",G.replace(/%maxColors%/g,U.toFixed(0))),this._replacements=[],this._maxColors=0,this.epsilon=B,this._maxColors=U,this.uniforms.originalColors=new Float32Array(3*U),this.uniforms.targetColors=new Float32Array(3*U),this.replacements=k}set replacements(k){const B=this.uniforms.originalColors,U=this.uniforms.targetColors,G=k.length;if(G>this._maxColors)throw new Error(`Length of replacements (${G}) exceeds the maximum colors length (${this._maxColors})`);B[3*G]=-1;for(let j=0;j{"use strict";let F;function G(){return F}U.d(B,{AB:()=>nt,s3:()=>re,kx:()=>ae});var j=U(22478);let $=0;const H=class extends j.Wp.EventEmitter{constructor(k){super(),this.id=$++,this.init(k)}set(k,B){if(void 0===this[k])throw new Error(`Property with name ${k} does not exist.`);switch(k){case"speed":this.speed=B;break;case"volume":this.volume=B;break;case"paused":this.paused=B;break;case"loop":this.loop=B;break;case"muted":this.muted=B}return this}get progress(){const{currentTime:k}=this._source;return k/this._duration}get paused(){return this._paused}set paused(k){this._paused=k,this.refreshPaused()}_onPlay(){this._playing=!0}_onPause(){this._playing=!1}init(k){this._playing=!1,this._duration=k.source.duration;const B=this._source=k.source.cloneNode(!1);B.src=k.parent.url,B.onplay=this._onPlay.bind(this),B.onpause=this._onPause.bind(this),k.context.on("refresh",this.refresh,this),k.context.on("refreshPaused",this.refreshPaused,this),this._media=k}_internalStop(){this._source&&this._playing&&(this._source.onended=null,this._source.pause())}stop(){this._internalStop(),this._source&&this.emit("stop")}get speed(){return this._speed}set speed(k){this._speed=k,this.refresh()}get volume(){return this._volume}set volume(k){this._volume=k,this.refresh()}get loop(){return this._loop}set loop(k){this._loop=k,this.refresh()}get muted(){return this._muted}set muted(k){this._muted=k,this.refresh()}get filters(){return console.warn("HTML Audio does not support filters"),null}set filters(k){console.warn("HTML Audio does not support filters")}refresh(){const k=this._media.context,B=this._media.parent;this._source.loop=this._loop||B.loop;const U=k.volume*(k.muted?0:1),F=B.volume*(B.muted?0:1),G=this._volume*(this._muted?0:1);this._source.volume=G*U*F,this._source.playbackRate=this._speed*k.speed*B.speed}refreshPaused(){const k=this._media.context,B=this._media.parent,U=this._paused||B.paused||k.paused;U!==this._pausedReal&&(this._pausedReal=U,U?(this._internalStop(),this.emit("paused")):(this.emit("resumed"),this.play({start:this._source.currentTime,end:this._end,volume:this._volume,speed:this._speed,loop:this._loop})),this.emit("pause",U))}play(k){const{start:B,end:U,speed:F,loop:G,volume:$,muted:V}=k;U&&console.assert(U>B,"End time is before start time"),this._speed=F,this._volume=$,this._loop=!!G,this._muted=V,this.refresh(),this.loop&&null!==U&&(console.warn('Looping not support when specifying an "end" time'),this.loop=!1),this._start=B,this._end=U||this._duration,this._start=Math.max(0,this._start-H.PADDING),this._end=Math.min(this._end+H.PADDING,this._duration),this._source.onloadedmetadata=()=>{this._source&&(this._source.currentTime=B,this._source.onloadedmetadata=null,this.emit("progress",B,this._duration),j.Rv.shared.add(this._onUpdate,this))},this._source.onended=this._onComplete.bind(this),this._source.play(),this.emit("start")}_onUpdate(){this.emit("progress",this.progress,this._duration),this._source.currentTime>=this._end&&!this._source.loop&&this._onComplete()}_onComplete(){j.Rv.shared.remove(this._onUpdate,this),this._internalStop(),this.emit("progress",1,this._duration),this.emit("end",this)}destroy(){j.Rv.shared.remove(this._onUpdate,this),this.removeAllListeners();const k=this._source;k&&(k.onended=null,k.onplay=null,k.onpause=null,this._internalStop()),this._source=null,this._speed=1,this._volume=1,this._loop=!1,this._end=null,this._start=0,this._duration=0,this._playing=!1,this._pausedReal=!1,this._paused=!1,this._muted=!1,this._media&&(this._media.context.off("refresh",this.refresh,this),this._media.context.off("refreshPaused",this.refreshPaused,this),this._media=null)}toString(){return`[HTMLAudioInstance id=${this.id}]`}};let V=H;V.PADDING=.1;class W extends j.Wp.EventEmitter{init(k){this.parent=k,this._source=k.options.source||new Audio,k.url&&(this._source.src=k.url)}create(){return new V(this)}get isPlayable(){return!!this._source&&4===this._source.readyState}get duration(){return this._source.duration}get context(){return this.parent.context}get filters(){return null}set filters(k){console.warn("HTML Audio does not support filters")}destroy(){this.removeAllListeners(),this.parent=null,this._source&&(this._source.src="",this._source.load(),this._source=null)}get source(){return this._source}load(k){const B=this._source,U=this.parent;if(4===B.readyState){U.isLoaded=!0;const B=U.autoPlayStart();return void(k&&setTimeout((()=>{k(null,U,B)}),0))}if(!U.url)return void k(new Error("sound.url or sound.source must be set"));B.src=U.url;const F=()=>{$(),U.isLoaded=!0;const B=U.autoPlayStart();k&&k(null,U,B)},G=()=>{$(),k&&k(new Error("Sound loading has been aborted"))},j=()=>{$();const U=`Failed to load audio element (code: ${B.error.code})`;k?k(new Error(U)):console.error(U)},$=()=>{B.removeEventListener("canplaythrough",F),B.removeEventListener("load",F),B.removeEventListener("abort",G),B.removeEventListener("error",j)};B.addEventListener("canplaythrough",F,!1),B.addEventListener("load",F,!1),B.addEventListener("abort",G,!1),B.addEventListener("error",j,!1),B.load()}}class q{constructor(k,B){this.parent=k,Object.assign(this,B),this.duration=this.end-this.start,console.assert(this.duration>0,"End time must be after start time")}play(k){return this.parent.play({complete:k,speed:this.speed||this.parent.speed,end:this.end,start:this.start,loop:this.loop})}destroy(){this.parent=null}}const K=["ogg","oga","opus","m4a","mp3","mpeg","wav","aiff","wma","mid","caf"],z=["audio/mpeg","audio/ogg"],Y={};!function(k){const B={m4a:"audio/mp4",oga:"audio/ogg",opus:'audio/ogg; codecs="opus"',caf:'audio/x-caf; codecs="opus"',...k||{}},U=document.createElement("audio"),F={},G=/^no$/;K.forEach((k=>{const j=U.canPlayType(`audio/${k}`).replace(G,""),$=B[k]?U.canPlayType(B[k]).replace(G,""):"";F[k]=!!j||!!$})),Object.assign(Y,F)}();class Q{static setParamValue(k,B){if(k.setValueAtTime){const U=G().context;k.setValueAtTime(B,U.audioContext.currentTime)}else k.value=B;return B}}let X=0;class Z extends j.Wp.EventEmitter{constructor(k){super(),this.id=X++,this._media=null,this._paused=!1,this._muted=!1,this._elapsed=0,this.init(k)}set(k,B){if(void 0===this[k])throw new Error(`Property with name ${k} does not exist.`);switch(k){case"speed":this.speed=B;break;case"volume":this.volume=B;break;case"muted":this.muted=B;break;case"loop":this.loop=B;break;case"paused":this.paused=B}return this}stop(){this._source&&(this._internalStop(),this.emit("stop"))}get speed(){return this._speed}set speed(k){this._speed=k,this.refresh(),this._update(!0)}get volume(){return this._volume}set volume(k){this._volume=k,this.refresh()}get muted(){return this._muted}set muted(k){this._muted=k,this.refresh()}get loop(){return this._loop}set loop(k){this._loop=k,this.refresh()}get filters(){return this._filters}set filters(k){this._filters&&(this._filters?.filter((k=>k)).forEach((k=>k.disconnect())),this._filters=null,this._source.connect(this._gain)),this._filters=k?.length?k.slice(0):null,this.refresh()}refresh(){if(!this._source)return;const k=this._media.context,B=this._media.parent;this._source.loop=this._loop||B.loop;const U=k.volume*(k.muted?0:1),F=B.volume*(B.muted?0:1),G=this._volume*(this._muted?0:1);Q.setParamValue(this._gain.gain,G*F*U),Q.setParamValue(this._source.playbackRate,this._speed*B.speed*k.speed),this.applyFilters()}applyFilters(){if(this._filters?.length){this._source.disconnect();let k=this._source;this._filters.forEach((B=>{k.connect(B.destination),k=B})),k.connect(this._gain)}}refreshPaused(){const k=this._media.context,B=this._media.parent,U=this._paused||B.paused||k.paused;U!==this._pausedReal&&(this._pausedReal=U,U?(this._internalStop(),this.emit("paused")):(this.emit("resumed"),this.play({start:this._elapsed%this._duration,end:this._end,speed:this._speed,loop:this._loop,volume:this._volume})),this.emit("pause",U))}play(k){const{start:B,end:U,speed:F,loop:G,volume:j,muted:$,filters:H}=k;U&&console.assert(U>B,"End time is before start time"),this._paused=!1;const{source:V,gain:W}=this._media.nodes.cloneBufferSource();this._source=V,this._gain=W,this._speed=F,this._volume=j,this._loop=!!G,this._muted=$,this._filters=H,this.refresh();const q=this._source.buffer.duration;this._duration=q,this._end=U,this._lastUpdate=this._now(),this._elapsed=B,this._source.onended=this._onComplete.bind(this),this._loop?(this._source.loopEnd=U,this._source.loopStart=B,this._source.start(0,B)):U?this._source.start(0,B,U-B):this._source.start(0,B),this.emit("start"),this._update(!0),this.enableTicker(!0)}enableTicker(k){j.Rv.shared.remove(this._updateListener,this),k&&j.Rv.shared.add(this._updateListener,this)}get progress(){return this._progress}get paused(){return this._paused}set paused(k){this._paused=k,this.refreshPaused()}destroy(){this.removeAllListeners(),this._internalStop(),this._gain&&(this._gain.disconnect(),this._gain=null),this._media&&(this._media.context.events.off("refresh",this.refresh,this),this._media.context.events.off("refreshPaused",this.refreshPaused,this),this._media=null),this._filters?.forEach((k=>k.disconnect())),this._filters=null,this._end=null,this._speed=1,this._volume=1,this._loop=!1,this._elapsed=0,this._duration=0,this._paused=!1,this._muted=!1,this._pausedReal=!1}toString(){return`[WebAudioInstance id=${this.id}]`}_now(){return this._media.context.audioContext.currentTime}_updateListener(){this._update()}_update(k=!1){if(this._source){const B=this._now(),U=B-this._lastUpdate;if(U>0||k){const k=this._source.playbackRate.value;this._elapsed+=U*k,this._lastUpdate=B;const F=this._duration;let G;if(this._source.loopStart){const k=this._source.loopEnd-this._source.loopStart;G=(this._source.loopStart+this._elapsed%k)/F}else G=this._elapsed%F/F;this._progress=G,this.emit("progress",this._progress,F)}}}init(k){this._media=k,k.context.events.on("refresh",this.refresh,this),k.context.events.on("refreshPaused",this.refreshPaused,this)}_internalStop(){if(this._source){this.enableTicker(!1),this._source.onended=null,this._source.stop(0),this._source.disconnect();try{this._source.buffer=null}catch(k){console.warn("Failed to set AudioBufferSourceNode.buffer to null:",k)}this._source=null}}_onComplete(){if(this._source){this.enableTicker(!1),this._source.onended=null,this._source.disconnect();try{this._source.buffer=null}catch(k){console.warn("Failed to set AudioBufferSourceNode.buffer to null:",k)}}this._source=null,this._progress=1,this.emit("progress",1,this._duration),this.emit("end",this)}}class J{constructor(k,B){this._output=B,this._input=k}get destination(){return this._input}get filters(){return this._filters}set filters(k){if(this._filters&&(this._filters.forEach((k=>{k&&k.disconnect()})),this._filters=null,this._input.connect(this._output)),k&&k.length){this._filters=k.slice(0),this._input.disconnect();let B=null;k.forEach((k=>{null===B?this._input.connect(k.destination):B.connect(k.destination),B=k})),B.connect(this._output)}}destroy(){this.filters=null,this._input=null,this._output=null}}const tt=class extends J{constructor(k){const B=k.audioContext,U=B.createBufferSource(),F=B.createGain(),G=B.createAnalyser();U.connect(G),G.connect(F),F.connect(k.destination),super(G,F),this.context=k,this.bufferSource=U,this.gain=F,this.analyser=G}get script(){return this._script||(this._script=this.context.audioContext.createScriptProcessor(tt.BUFFER_SIZE),this._script.connect(this.context.destination)),this._script}destroy(){super.destroy(),this.bufferSource.disconnect(),this._script&&this._script.disconnect(),this.gain.disconnect(),this.analyser.disconnect(),this.bufferSource=null,this._script=null,this.gain=null,this.analyser=null,this.context=null}cloneBufferSource(){const k=this.bufferSource,B=this.context.audioContext.createBufferSource();B.buffer=k.buffer,Q.setParamValue(B.playbackRate,k.playbackRate.value),B.loop=k.loop;const U=this.context.audioContext.createGain();return B.connect(U),U.connect(this.destination),{source:B,gain:U}}get bufferSize(){return this.script.bufferSize}};let et=tt;et.BUFFER_SIZE=0;class it{init(k){this.parent=k,this._nodes=new et(this.context),this._source=this._nodes.bufferSource,this.source=k.options.source}destroy(){this.parent=null,this._nodes.destroy(),this._nodes=null;try{this._source.buffer=null}catch(k){console.warn("Failed to set AudioBufferSourceNode.buffer to null:",k)}this._source=null,this.source=null}create(){return new Z(this)}get context(){return this.parent.context}get isPlayable(){return!!this._source&&!!this._source.buffer}get filters(){return this._nodes.filters}set filters(k){this._nodes.filters=k}get duration(){return console.assert(this.isPlayable,"Sound not yet playable, no duration"),this._source.buffer.duration}get buffer(){return this._source.buffer}set buffer(k){this._source.buffer=k}get nodes(){return this._nodes}load(k){this.source?this._decode(this.source,k):this.parent.url?this._loadUrl(k):k?k(new Error("sound.url or sound.source must be set")):console.error("sound.url or sound.source must be set")}async _loadUrl(k){const B=this.parent.url,U=await j.W0.ADAPTER.fetch(B);this._decode(await U.arrayBuffer(),k)}_decode(k,B){const U=(k,U)=>{if(k)B&&B(k);else{this.parent.isLoaded=!0,this.buffer=U;const k=this.parent.autoPlayStart();B&&B(null,this.parent,k)}};if(k instanceof AudioBuffer)U(null,k);else{this.parent.context.decode(k,U)}}}const st=class{static from(k){let B={};"string"==typeof k?B.url=k:k instanceof ArrayBuffer||k instanceof AudioBuffer||k instanceof HTMLAudioElement?B.source=k:Array.isArray(k)?B.url=k:B=k,B={autoPlay:!1,singleInstance:!1,url:null,source:null,preload:!1,volume:1,speed:1,complete:null,loaded:null,loop:!1,...B},Object.freeze(B);const U=G().useLegacy?new W:new it;return new st(U,B)}constructor(k,B){this.media=k,this.options=B,this._instances=[],this._sprites={},this.media.init(this);const U=B.complete;this._autoPlayOptions=U?{complete:U}:null,this.isLoaded=!1,this._preloadQueue=null,this.isPlaying=!1,this.autoPlay=B.autoPlay,this.singleInstance=B.singleInstance,this.preload=B.preload||this.autoPlay,this.url=Array.isArray(B.url)?this.preferUrl(B.url):B.url,this.speed=B.speed,this.volume=B.volume,this.loop=B.loop,B.sprites&&this.addSprites(B.sprites),this.preload&&this._preload(B.loaded)}preferUrl(k){const[B]=k.map((k=>({url:k,ext:j.Wp.path.extname(k).slice(1)}))).filter((({ext:k})=>Y[k])).sort(((k,B)=>K.indexOf(k.ext)-K.indexOf(B.ext)));if(!B)throw new Error("No supported file type found");return B.url}get context(){return G().context}pause(){return this.isPlaying=!1,this.paused=!0,this}resume(){return this.isPlaying=this._instances.length>0,this.paused=!1,this}get paused(){return this._paused}set paused(k){this._paused=k,this.refreshPaused()}get speed(){return this._speed}set speed(k){this._speed=k,this.refresh()}get filters(){return this.media.filters}set filters(k){this.media.filters=k}addSprites(k,B){if("object"==typeof k){const B={};for(const U in k)B[U]=this.addSprites(U,k[U]);return B}console.assert(!this._sprites[k],`Alias ${k} is already taken`);const U=new q(this,B);return this._sprites[k]=U,U}destroy(){this._removeInstances(),this.removeSprites(),this.media.destroy(),this.media=null,this._sprites=null,this._instances=null}removeSprites(k){if(k){const B=this._sprites[k];void 0!==B&&(B.destroy(),delete this._sprites[k])}else for(const B in this._sprites)this.removeSprites(B);return this}get isPlayable(){return this.isLoaded&&this.media&&this.media.isPlayable}stop(){if(!this.isPlayable)return this.autoPlay=!1,this._autoPlayOptions=null,this;this.isPlaying=!1;for(let k=this._instances.length-1;k>=0;k--)this._instances[k].stop();return this}play(k,B){let U;if("string"==typeof k){U={sprite:k,loop:this.loop,complete:B}}else"function"==typeof k?(U={},U.complete=k):U=k;if(U={complete:null,loaded:null,sprite:null,end:null,start:0,volume:1,speed:1,muted:!1,loop:!1,...U||{}},U.sprite){const k=U.sprite;console.assert(!!this._sprites[k],`Alias ${k} is not available`);const B=this._sprites[k];U.start=B.start+(U.start||0),U.end=B.end,U.speed=B.speed||1,U.loop=B.loop||U.loop,delete U.sprite}if(U.offset&&(U.start=U.offset),!this.isLoaded)return this._preloadQueue?new Promise((k=>{this._preloadQueue.push((()=>{k(this.play(U))}))})):(this._preloadQueue=[],this.autoPlay=!0,this._autoPlayOptions=U,new Promise(((k,B)=>{this._preload(((F,G,j)=>{this._preloadQueue.forEach((k=>k())),this._preloadQueue=null,F?B(F):(U.loaded&&U.loaded(F,G,j),k(j))}))})));(this.singleInstance||U.singleInstance)&&this._removeInstances();const F=this._createInstance();return this._instances.push(F),this.isPlaying=!0,F.once("end",(()=>{U.complete&&U.complete(this),this._onComplete(F)})),F.once("stop",(()=>{this._onComplete(F)})),F.play(U),F}refresh(){const k=this._instances.length;for(let B=0;B=0;k--)this._poolInstance(this._instances[k]);this._instances.length=0}_onComplete(k){if(this._instances){const B=this._instances.indexOf(k);B>-1&&this._instances.splice(B,1),this.isPlaying=this._instances.length>0}this._poolInstance(k)}_createInstance(){if(st._pool.length>0){const k=st._pool.pop();return k.init(this.media),k}return this.media.create()}_poolInstance(k){k.destroy(),st._pool.indexOf(k)<0&&st._pool.push(k)}};let nt=st;nt._pool=[];class at extends j.Wp.EventEmitter{constructor(){super(...arguments),this.speed=1,this.muted=!1,this.volume=1,this.paused=!1}refresh(){this.emit("refresh")}refreshPaused(){this.emit("refreshPaused")}get filters(){return console.warn("HTML Audio does not support filters"),null}set filters(k){console.warn("HTML Audio does not support filters")}get audioContext(){return console.warn("HTML Audio does not support audioContext"),null}toggleMute(){return this.muted=!this.muted,this.refresh(),this.muted}togglePause(){return this.paused=!this.paused,this.refreshPaused(),this.paused}destroy(){this.removeAllListeners()}}class rt extends J{constructor(){const k=window,B=new rt.AudioContext,U=B.createDynamicsCompressor(),F=B.createAnalyser();F.connect(U),U.connect(B.destination),super(F,U),this.autoPause=!0,this._ctx=B,this._offlineCtx=new rt.OfflineAudioContext(1,2,k.OfflineAudioContext?Math.max(8e3,Math.min(96e3,B.sampleRate)):44100),this.compressor=U,this.analyser=F,this.events=new j.Wp.EventEmitter,this.volume=1,this.speed=1,this.muted=!1,this.paused=!1,this._locked="suspended"===B.state&&("ontouchstart"in globalThis||"onclick"in globalThis),this._locked&&(this._unlock(),this._unlock=this._unlock.bind(this),document.addEventListener("mousedown",this._unlock,!0),document.addEventListener("touchstart",this._unlock,!0),document.addEventListener("touchend",this._unlock,!0)),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),globalThis.addEventListener("focus",this.onFocus),globalThis.addEventListener("blur",this.onBlur)}onFocus(){if(!this.autoPause)return;const k=this._ctx.state;"suspended"!==k&&"interrupted"!==k&&this._locked||(this.paused=this._pausedOnBlur,this.refreshPaused())}onBlur(){this.autoPause&&(this._locked||(this._pausedOnBlur=this._paused,this.paused=!0,this.refreshPaused()))}_unlock(){this._locked&&(this.playEmptySound(),"running"===this._ctx.state&&(document.removeEventListener("mousedown",this._unlock,!0),document.removeEventListener("touchend",this._unlock,!0),document.removeEventListener("touchstart",this._unlock,!0),this._locked=!1))}playEmptySound(){const k=this._ctx.createBufferSource();k.buffer=this._ctx.createBuffer(1,1,22050),k.connect(this._ctx.destination),k.start(0,0,0),"suspended"===k.context.state&&k.context.resume()}static get AudioContext(){const k=window;return k.AudioContext||k.webkitAudioContext||null}static get OfflineAudioContext(){const k=window;return k.OfflineAudioContext||k.webkitOfflineAudioContext||null}destroy(){super.destroy();const k=this._ctx;void 0!==k.close&&k.close(),globalThis.removeEventListener("focus",this.onFocus),globalThis.removeEventListener("blur",this.onBlur),this.events.removeAllListeners(),this.analyser.disconnect(),this.compressor.disconnect(),this.analyser=null,this.compressor=null,this.events=null,this._offlineCtx=null,this._ctx=null}get audioContext(){return this._ctx}get offlineContext(){return this._offlineCtx}set paused(k){k&&"running"===this._ctx.state?this._ctx.suspend():k||"suspended"!==this._ctx.state||this._ctx.resume(),this._paused=k}get paused(){return this._paused}refresh(){this.events.emit("refresh")}refreshPaused(){this.events.emit("refreshPaused")}toggleMute(){return this.muted=!this.muted,this.refresh(),this.muted}togglePause(){return this.paused=!this.paused,this.refreshPaused(),this._paused}decode(k,B){const U=k=>{B(new Error(k?.message||"Unable to decode file"))},F=this._offlineCtx.decodeAudioData(k,(k=>{B(null,k)}),U);F&&F.catch(U)}}class ot{constructor(k,B){this.init(k,B)}init(k,B){this.destination=k,this.source=B||k}connect(k){this.source?.connect(k)}disconnect(){this.source?.disconnect()}destroy(){this.disconnect(),this.destination=null,this.source=null}}const ht=class extends ot{constructor(k=0,B=0,U=0,F=0,j=0,$=0,H=0,V=0,W=0,q=0){let K=[];const z=[{f:ht.F32,type:"lowshelf",gain:k},{f:ht.F64,type:"peaking",gain:B},{f:ht.F125,type:"peaking",gain:U},{f:ht.F250,type:"peaking",gain:F},{f:ht.F500,type:"peaking",gain:j},{f:ht.F1K,type:"peaking",gain:$},{f:ht.F2K,type:"peaking",gain:H},{f:ht.F4K,type:"peaking",gain:V},{f:ht.F8K,type:"peaking",gain:W},{f:ht.F16K,type:"highshelf",gain:q}];G().useLegacy||(K=z.map((k=>{const B=G().context.audioContext.createBiquadFilter();return B.type=k.type,Q.setParamValue(B.Q,1),B.frequency.value=k.f,Q.setParamValue(B.gain,k.gain),B}))),super(K[0],K[K.length-1]),this.bands=K,this.bandsMap={};for(let G=0;G0&&this.bands[G-1].connect(k),this.bandsMap[k.frequency.value]=k}}setGain(k,B=0){if(!this.bandsMap[k])throw new Error(`No band found for frequency ${k}`);Q.setParamValue(this.bandsMap[k].gain,B)}getGain(k){if(!this.bandsMap[k])throw new Error(`No band found for frequency ${k}`);return this.bandsMap[k].gain.value}set f32(k){this.setGain(ht.F32,k)}get f32(){return this.getGain(ht.F32)}set f64(k){this.setGain(ht.F64,k)}get f64(){return this.getGain(ht.F64)}set f125(k){this.setGain(ht.F125,k)}get f125(){return this.getGain(ht.F125)}set f250(k){this.setGain(ht.F250,k)}get f250(){return this.getGain(ht.F250)}set f500(k){this.setGain(ht.F500,k)}get f500(){return this.getGain(ht.F500)}set f1k(k){this.setGain(ht.F1K,k)}get f1k(){return this.getGain(ht.F1K)}set f2k(k){this.setGain(ht.F2K,k)}get f2k(){return this.getGain(ht.F2K)}set f4k(k){this.setGain(ht.F4K,k)}get f4k(){return this.getGain(ht.F4K)}set f8k(k){this.setGain(ht.F8K,k)}get f8k(){return this.getGain(ht.F8K)}set f16k(k){this.setGain(ht.F16K,k)}get f16k(){return this.getGain(ht.F16K)}reset(){this.bands.forEach((k=>{Q.setParamValue(k.gain,0)}))}destroy(){this.bands.forEach((k=>{k.disconnect()})),this.bands=null,this.bandsMap=null}};let ct=ht;ct.F32=32,ct.F64=64,ct.F125=125,ct.F250=250,ct.F500=500,ct.F1K=1e3,ct.F2K=2e3,ct.F4K=4e3,ct.F8K=8e3,ct.F16K=16e3;const dt={loader:j.Ag.LoadParser,resolver:j.Ag.ResolveParser,cache:j.Ag.CacheParser,detection:j.Ag.DetectionParser};j.XO.handle(j.Ag.Asset,(k=>{const B=k.ref;Object.entries(dt).filter((([k])=>!!B[k])).forEach((([k,U])=>j.XO.add(Object.assign(B[k],{extension:B[k].extension??U}))))}),(k=>{const B=k.ref;Object.keys(dt).filter((k=>!!B[k])).forEach((k=>j.XO.remove(B[k])))}));class lt{constructor(k,B=!1){this._loader=k,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=B}add(k){k.forEach((k=>{this._assetList.push(k)})),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;const k=[],B=Math.min(this._assetList.length,this._maxConcurrent);for(let U=0;U(Array.isArray(k)||(k=[k]),B?k.map((k=>"string"==typeof k||U?B(k):k)):k);const bt=new class{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(k){return this._cache.has(k)}get(k){const B=this._cache.get(k);return B||console.warn(`[Assets] Asset id ${k} was not found in the Cache`),B}set(k,B){const U=ft(k);let F;for(let j=0;j{F[k]=B})));const G=Object.keys(F),$={cacheKeys:G,keys:U};if(U.forEach((k=>{this._cacheMap.set(k,$)})),G.forEach((k=>{this._cache.has(k)&&this._cache.get(k)!==B&&console.warn("[Cache] already has key:",k),this._cache.set(k,F[k])})),B instanceof j.gP){const k=B;U.forEach((B=>{k.baseTexture!==j.gP.EMPTY.baseTexture&&j.t5.addToCache(k.baseTexture,B),j.gP.addToCache(k,B)}))}}remove(k){if(!this._cacheMap.has(k))return void console.warn(`[Assets] Asset id ${k} was not found in the Cache`);const B=this._cacheMap.get(k);B.cacheKeys.forEach((k=>{this._cache.delete(k)})),B.keys.forEach((k=>{this._cacheMap.delete(k)}))}get parsers(){return this._parsers}},pt=k=>!Array.isArray(k);class vt{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(k,B,U)=>(this._parsersValidated=!1,k[B]=U,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(k,B){const U={promise:null,parser:null};return U.promise=(async()=>{let F=null,G=null;if(B.loadParser&&(G=this._parserHash[B.loadParser],G||console.warn(`[Assets] specified load parser "${B.loadParser}" not found while loading ${k}`)),!G){for(let U=0;U({alias:[k],src:k}))),H=$.length,V=$.map((async k=>{const G=j.Wp.path.toAbsolute(k.src);if(!F[k.src])try{this.promiseCache[G]||(this.promiseCache[G]=this._getLoadPromiseAndParser(G,k)),F[k.src]=await this.promiseCache[G].promise,B&&B(++U/H)}catch(e){throw delete this.promiseCache[G],delete F[k.src],new Error(`[Loader.load] Failed to load ${G}.\n${e}`)}}));return await Promise.all(V),G?F[$[0].src]:F}async unload(k){const B=ft(k,(k=>({alias:[k],src:k}))).map((async k=>{const B=j.Wp.path.toAbsolute(k.src),U=this.promiseCache[B];if(U){const F=await U.promise;delete this.promiseCache[B],U.parser?.unload?.(F,k,this)}}));await Promise.all(B)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter((k=>k.name)).reduce(((k,B)=>(k[B.name]&&console.warn(`[Assets] loadParser name conflict "${B.name}"`),{...k,[B.name]:B})),{})}}var gt=(k=>(k[k.Low=0]="Low",k[k.Normal=1]="Normal",k[k.High=2]="High",k))(gt||{});function mt(k,B){if(Array.isArray(B)){for(const U of B)if(k.startsWith(`data:${U}`))return!0;return!1}return k.startsWith(`data:${B}`)}const yt={extension:{type:j.Ag.LoadParser,priority:gt.Low},name:"loadJson",test:k=>mt(k,"application/json")||ut(k,".json"),load:async k=>await(await j.W0.ADAPTER.fetch(k)).json()};j.XO.add(yt);const _t={name:"loadTxt",extension:{type:j.Ag.LoadParser,priority:gt.Low},test:k=>mt(k,"text/plain")||ut(k,".txt"),load:async k=>await(await j.W0.ADAPTER.fetch(k)).text()};j.XO.add(_t);const Et=["normal","bold","100","200","300","400","500","600","700","800","900"],wt=[".ttf",".otf",".woff",".woff2"],Tt=["font/ttf","font/otf","font/woff","font/woff2"],St=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;const At=/^[0-9A-Za-z%:/?#\[\]@!\$&'()\*\+,;=\-._~]*$/;const Ct={extension:{type:j.Ag.LoadParser,priority:gt.Low},name:"loadWebFont",test:k=>mt(k,Tt)||ut(k,wt),async load(k,B){const U=j.W0.ADAPTER.getFontFaceSet();if(U){const G=[],$=B.data?.family??function(k){const B=j.Wp.path.extname(k),U=j.Wp.path.basename(k,B).replace(/(-|_)/g," ").toLowerCase().split(" ").map((k=>k.charAt(0).toUpperCase()+k.slice(1)));let F=U.length>0;for(const j of U)if(!j.match(St)){F=!1;break}let G=U.join(" ");return F||(G=`"${G.replace(/[\\"]/g,"\\$&")}"`),G}(k),H=B.data?.weights?.filter((k=>Et.includes(k)))??["normal"],V=B.data??{};for(let B=0;Bj.W0.ADAPTER.getFontFaceSet().delete(k)))}};j.XO.add(Ct);let Ot=null;class It{constructor(){Ot||(Ot=URL.createObjectURL(new Blob(['(function() {\n "use strict";\n const WHITE_PNG = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=";\n async function checkImageBitmap() {\n try {\n if (typeof createImageBitmap != "function")\n return !1;\n const imageBlob = await (await fetch(WHITE_PNG)).blob(), imageBitmap = await createImageBitmap(imageBlob);\n return imageBitmap.width === 1 && imageBitmap.height === 1;\n } catch {\n return !1;\n }\n }\n checkImageBitmap().then((result) => {\n self.postMessage(result);\n });\n})();\n'],{type:"application/javascript"}))),this.worker=new Worker(Ot)}}It.revokeObjectURL=function(){Ot&&(URL.revokeObjectURL(Ot),Ot=null)};let Dt=null;class Rt{constructor(){Dt||(Dt=URL.createObjectURL(new Blob(['(function() {\n "use strict";\n async function loadImageBitmap(url) {\n const response = await fetch(url);\n if (!response.ok)\n throw new Error(`[WorkerManager.loadImageBitmap] Failed to fetch ${url}: ${response.status} ${response.statusText}`);\n const imageBlob = await response.blob();\n return await createImageBitmap(imageBlob);\n }\n self.onmessage = async (event) => {\n try {\n const imageBitmap = await loadImageBitmap(event.data.data[0]);\n self.postMessage({\n data: imageBitmap,\n uuid: event.data.uuid,\n id: event.data.id\n }, [imageBitmap]);\n } catch (e) {\n self.postMessage({\n error: e,\n uuid: event.data.uuid,\n id: event.data.id\n });\n }\n };\n})();\n'],{type:"application/javascript"}))),this.worker=new Worker(Dt)}}Rt.revokeObjectURL=function(){Dt&&(URL.revokeObjectURL(Dt),Dt=null)};let Pt,Mt=0;const Nt=new class{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return void 0!==this._isImageBitmapSupported||(this._isImageBitmapSupported=new Promise((k=>{const{worker:B}=new It;B.addEventListener("message",(U=>{B.terminate(),It.revokeObjectURL(),k(U.data)}))}))),this._isImageBitmapSupported}loadImageBitmap(k){return this._run("loadImageBitmap",[k])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){void 0===Pt&&(Pt=navigator.hardwareConcurrency||4);let k=this.workerPool.pop();return!k&&this._createdWorkers{this.complete(k.data),this.returnWorker(k.target),this.next()}))),k}returnWorker(k){this.workerPool.push(k)}complete(k){void 0!==k.error?this.resolveHash[k.uuid].reject(k.error):this.resolveHash[k.uuid].resolve(k.data),this.resolveHash[k.uuid]=null}async _run(k,B){await this._initWorkers();const U=new Promise(((U,F)=>{this.queue.push({id:k,arguments:B,resolve:U,reject:F})}));return this.next(),U}next(){if(!this.queue.length)return;const k=this.getWorker();if(!k)return;const B=this.queue.pop(),U=B.id;this.resolveHash[Mt]={resolve:B.resolve,reject:B.reject},k.postMessage({data:B.arguments,uuid:Mt++,id:U})}};function xt(k,B,U){k.resource.internal=!0;const F=new j.gP(k),G=()=>{delete B.promiseCache[U],bt.has(U)&&bt.remove(U)};return F.baseTexture.once("destroyed",(()=>{U in B.promiseCache&&(console.warn("[Assets] A BaseTexture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the BaseTexture."),G())})),F.once("destroyed",(()=>{k.destroyed||(console.warn("[Assets] A Texture managed by Assets was destroyed instead of unloaded! Use Assets.unload() instead of destroying the Texture."),G())})),F}const Lt=[".jpeg",".jpg",".png",".webp",".avif"],kt=["image/jpeg","image/png","image/webp","image/avif"];const Bt={name:"loadTextures",extension:{type:j.Ag.LoadParser,priority:gt.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test:k=>mt(k,kt)||ut(k,Lt),async load(k,B,U){const F=globalThis.createImageBitmap&&this.config.preferCreateImageBitmap;let G;G=F?this.config.preferWorkers&&await Nt.isImageBitmapSupported()?await Nt.loadImageBitmap(k):await async function(k){const B=await j.W0.ADAPTER.fetch(k);if(!B.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${k}: ${B.status} ${B.statusText}`);const U=await B.blob();return await createImageBitmap(U)}(k):await new Promise(((B,U)=>{const F=new Image;F.crossOrigin=this.config.crossOrigin,F.src=k,F.complete?B(F):(F.onload=()=>B(F),F.onerror=k=>U(k))}));const $={...B.data};$.resolution??($.resolution=j.Wp.getResolutionOfUrl(k)),F&&void 0===$.resourceOptions?.ownsImageBitmap&&($.resourceOptions={...$.resourceOptions},$.resourceOptions.ownsImageBitmap=!0);const H=new j.t5(G,$);return H.resource.src=k,xt(H,U,k)},unload(k){k.destroy(!0)}};j.XO.add(Bt);const Ut={extension:{type:j.Ag.LoadParser,priority:gt.High},name:"loadSVG",test:k=>mt(k,"image/svg+xml")||ut(k,".svg"),testParse:async k=>j.$f.test(k),async parse(k,B,U){const F=new j.$f(k,B?.data?.resourceOptions);await F.load();const G=new j.t5(F,{resolution:j.Wp.getResolutionOfUrl(k),...B?.data});return G.resource.src=B.src,xt(G,U,B.src)},load:async(k,B)=>(await j.W0.ADAPTER.fetch(k)).text(),unload:Bt.unload};j.XO.add(Ut);const Ft=[".mp4",".m4v",".webm",".ogv"],Gt=["video/mp4","video/webm","video/ogg"],jt={name:"loadVideo",extension:{type:j.Ag.LoadParser,priority:gt.High},config:{defaultAutoPlay:!0,defaultUpdateFPS:0,defaultLoop:!1,defaultMuted:!1,defaultPlaysinline:!0},test:k=>mt(k,Gt)||ut(k,Ft),async load(k,B,U){let F;const G=await(await j.W0.ADAPTER.fetch(k)).blob(),$=URL.createObjectURL(G);try{const G={autoPlay:this.config.defaultAutoPlay,updateFPS:this.config.defaultUpdateFPS,loop:this.config.defaultLoop,muted:this.config.defaultMuted,playsinline:this.config.defaultPlaysinline,...B?.data?.resourceOptions,autoLoad:!0},H=new j.A5($,G);await H.load();const V=new j.t5(H,{alphaMode:await j.Wp.detectVideoAlphaMode(),resolution:j.Wp.getResolutionOfUrl(k),...B?.data});V.resource.src=k,F=xt(V,U,k),F.baseTexture.once("destroyed",(()=>{URL.revokeObjectURL($)}))}catch(e){throw URL.revokeObjectURL($),e}return F},unload(k){k.destroy(!0)}};function $t(k,B,U,F,G){const j=B[U];for(let $=0;${const B=k.substring(1,k.length-1).split(",");F.push(B)})),$t(k,F,0,B,U)}else U.push(k);return U}j.XO.add(jt);class Vt{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(k,B)=>`${k}${this._bundleIdConnector}${B}`,extractAssetIdFromBundle:(k,B)=>B.replace(`${k}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(k){if(this._bundleIdConnector=k.connector??this._bundleIdConnector,this._createBundleAssetId=k.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=k.extractAssetIdFromBundle??this._extractAssetIdFromBundle,"bar"!==this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar")))throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...k){k.forEach((k=>{this._preferredOrder.push(k),k.priority||(k.priority=Object.keys(k.params))})),this._resolverHash={}}set basePath(k){this._basePath=k}get basePath(){return this._basePath}set rootPath(k){this._rootPath=k}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(k){if("string"==typeof k)this._defaultSearchParams=k;else{const B=k;this._defaultSearchParams=Object.keys(B).map((k=>`${encodeURIComponent(k)}=${encodeURIComponent(B[k])}`)).join("&")}}getAlias(k){const{alias:B,name:U,src:F,srcs:G}=k;return ft(B||U||F||G,(k=>"string"==typeof k?k:Array.isArray(k)?k.map((k=>k?.src??k?.srcs??k)):k?.src||k?.srcs?k.src??k.srcs:k),!0)}addManifest(k){this._manifest&&console.warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=k,k.bundles.forEach((k=>{this.addBundle(k.name,k.assets)}))}addBundle(k,B){const U=[];Array.isArray(B)?B.forEach((B=>{const F=B.src??B.srcs,G=B.alias??B.name;let j;if("string"==typeof G){const B=this._createBundleAssetId(k,G);U.push(B),j=[G,B]}else{const B=G.map((B=>this._createBundleAssetId(k,B)));U.push(...B),j=[...G,...B]}this.add({...B,alias:j,src:F})})):Object.keys(B).forEach((F=>{const G=[F,this._createBundleAssetId(k,F)];if("string"==typeof B[F])this.add({alias:G,src:B[F]});else if(Array.isArray(B[F]))this.add({alias:G,src:B[F]});else{const k=B[F],U=k.src??k.srcs;this.add({...k,alias:G,src:Array.isArray(U)?U:[U]})}U.push(...G)})),this._bundles[k]=U}add(k,B,U,F,G){const $=[];let H;"string"==typeof k||Array.isArray(k)&&"string"==typeof k[0]?(j.Wp.deprecation("7.2.0","Assets.add now uses an object instead of individual parameters.\nPlease use Assets.add({ alias, src, data, format, loadParser }) instead."),$.push({alias:k,src:B,data:U,format:F,loadParser:G})):Array.isArray(k)?$.push(...k):$.push(k),H=k=>{this.hasKey(k)&&console.warn(`[Resolver] already has key: ${k} overwriting`)},ft($).forEach((k=>{const{src:B,srcs:U}=k;let{data:F,format:G,loadParser:j}=k;const $=ft(B||U).map((k=>"string"==typeof k?Ht(k):Array.isArray(k)?k:[k])),V=this.getAlias(k);Array.isArray(V)?V.forEach(H):H(V);const W=[];$.forEach((k=>{k.forEach((k=>{let B={};if("object"!=typeof k){B.src=k;for(let U=0;U{this._assetMap[k]=W}))}))}resolveBundle(k){const B=pt(k);k=ft(k);const U={};return k.forEach((k=>{const B=this._bundles[k];if(B){const F=this.resolve(B),G={};for(const B in F){const U=F[B];G[this._extractAssetIdFromBundle(k,B)]=U}U[k]=G}})),B?U[k[0]]:U}resolveUrl(k){const B=this.resolve(k);if("string"!=typeof k){const k={};for(const U in B)k[U]=B[U].src;return k}return B.src}resolve(k){const B=pt(k);k=ft(k);const U={};return k.forEach((k=>{if(!this._resolverHash[k])if(this._assetMap[k]){let B=this._assetMap[k];const U=B[0],F=this._getPreferredOrder(B);F?.priority.forEach((k=>{F.params[k].forEach((U=>{const F=B.filter((B=>!!B[k]&&B[k]===U));F.length&&(B=F)}))})),this._resolverHash[k]=B[0]??U}else this._resolverHash[k]=this.buildResolvedAsset({alias:[k],src:k},{});U[k]=this._resolverHash[k]})),B?U[k[0]]:U}hasKey(k){return!!this._assetMap[k]}hasBundle(k){return!!this._bundles[k]}_getPreferredOrder(k){for(let B=0;Bk.params.format.includes(B.format)));if(U)return U}return this._preferredOrder[0]}_appendDefaultSearchParams(k){if(!this._defaultSearchParams)return k;return`${k}${/\?/.test(k)?"&":"?"}${this._defaultSearchParams}`}buildResolvedAsset(k,B){const{aliases:U,data:F,loadParser:G,format:$}=B;return(this._basePath||this._rootPath)&&(k.src=j.Wp.path.toAbsolute(k.src,this._basePath,this._rootPath)),k.alias=U??k.alias??[k.src],k.src=this._appendDefaultSearchParams(k.src),k.data={...F||{},...k.data},k.loadParser=G??k.loadParser,k.format=$??k.format??j.Wp.path.extname(k.src).slice(1),k.srcs=k.src,k.name=k.alias,k}}const Wt=new class{constructor(){this._detections=[],this._initialized=!1,this.resolver=new Vt,this.loader=new vt,this.cache=bt,this._backgroundLoader=new lt(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(k={}){if(this._initialized)return void console.warn("[Assets]AssetManager already initialized, did you load before calling this Assets.init()?");if(this._initialized=!0,k.defaultSearchParams&&this.resolver.setDefaultSearchParams(k.defaultSearchParams),k.basePath&&(this.resolver.basePath=k.basePath),k.bundleIdentifier&&this.resolver.setBundleIdentifier(k.bundleIdentifier),k.manifest){let B=k.manifest;"string"==typeof B&&(B=await this.load(B)),this.resolver.addManifest(B)}const B=k.texturePreference?.resolution??1,U="number"==typeof B?[B]:B,F=await this._detectFormats({preferredFormats:k.texturePreference?.format,skipDetections:k.skipDetections,detections:this._detections});this.resolver.prefer({params:{format:F,resolution:U}}),k.preferences&&this.setPreferences(k.preferences)}add(k,B,U,F,G){this.resolver.add(k,B,U,F,G)}async load(k,B){this._initialized||await this.init();const U=pt(k),F=ft(k).map((k=>{if("string"!=typeof k){const B=this.resolver.getAlias(k);return B.some((k=>!this.resolver.hasKey(k)))&&this.add(k),Array.isArray(B)?B[0]:B}return this.resolver.hasKey(k)||this.add({alias:k,src:k}),k})),G=this.resolver.resolve(F),j=await this._mapLoadToResolve(G,B);return U?j[F[0]]:j}addBundle(k,B){this.resolver.addBundle(k,B)}async loadBundle(k,B){this._initialized||await this.init();let U=!1;"string"==typeof k&&(U=!0,k=[k]);const F=this.resolver.resolveBundle(k),G={},j=Object.keys(F);let $=0,H=0;const V=()=>{B?.(++$/H)},W=j.map((k=>{const B=F[k];return H+=Object.keys(B).length,this._mapLoadToResolve(B,V).then((B=>{G[k]=B}))}));return await Promise.all(W),U?G[k[0]]:G}async backgroundLoad(k){this._initialized||await this.init(),"string"==typeof k&&(k=[k]);const B=this.resolver.resolve(k);this._backgroundLoader.add(Object.values(B))}async backgroundLoadBundle(k){this._initialized||await this.init(),"string"==typeof k&&(k=[k]);const B=this.resolver.resolveBundle(k);Object.values(B).forEach((k=>{this._backgroundLoader.add(Object.values(k))}))}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(k){if("string"==typeof k)return bt.get(k);const B={};for(let U=0;U{const U=G[k.src],$=[k.src];k.alias&&$.push(...k.alias),j[F[B]]=U,bt.set($,U)})),j}async unload(k){this._initialized||await this.init();const B=ft(k).map((k=>"string"!=typeof k?k.src:k)),U=this.resolver.resolve(B);await this._unloadFromResolved(U)}async unloadBundle(k){this._initialized||await this.init(),k=ft(k);const B=this.resolver.resolveBundle(k),U=Object.keys(B).map((k=>this._unloadFromResolved(B[k])));await Promise.all(U)}async _unloadFromResolved(k){const B=Object.values(k);B.forEach((k=>{bt.remove(k.src)})),await this.loader.unload(B)}async _detectFormats(k){let B=[];k.preferredFormats&&(B=Array.isArray(k.preferredFormats)?k.preferredFormats:[k.preferredFormats]);for(const U of k.detections)k.skipDetections||await U.test()?B=await U.add(B):k.skipDetections||(B=await U.remove(B));return B=B.filter(((k,U)=>B.indexOf(k)===U)),B}get detections(){return this._detections}get preferWorkers(){return Bt.config.preferWorkers}set preferWorkers(k){j.Wp.deprecation("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:k})}setPreferences(k){this.loader.parsers.forEach((B=>{B.config&&Object.keys(B.config).filter((B=>B in k)).forEach((U=>{B.config[U]=k[U]}))}))}};j.XO.handleByList(j.Ag.LoadParser,Wt.loader.parsers).handleByList(j.Ag.ResolveParser,Wt.resolver.parsers).handleByList(j.Ag.CacheParser,Wt.cache.parsers).handleByList(j.Ag.DetectionParser,Wt.detections);const qt={extension:j.Ag.CacheParser,test:k=>Array.isArray(k)&&k.every((k=>k instanceof j.gP)),getCacheableAssets:(k,B)=>{const U={};return k.forEach((k=>{B.forEach(((B,F)=>{U[k+(0===F?"":F+1)]=B}))})),U}};async function Kt(k){if("Image"in globalThis)return new Promise((B=>{const U=new Image;U.onload=()=>{B(!0)},U.onerror=()=>{B(!1)},U.src=k}));if("createImageBitmap"in globalThis&&"fetch"in globalThis){try{const B=await(await fetch(k)).blob();await createImageBitmap(B)}catch{return!1}return!0}return!1}j.XO.add(qt);const zt={extension:{type:j.Ag.DetectionParser,priority:1},test:async()=>Kt("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A="),add:async k=>[...k,"avif"],remove:async k=>k.filter((k=>"avif"!==k))};j.XO.add(zt);const Yt={extension:{type:j.Ag.DetectionParser,priority:0},test:async()=>Kt("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="),add:async k=>[...k,"webp"],remove:async k=>k.filter((k=>"webp"!==k))};j.XO.add(Yt);const Qt=["png","jpg","jpeg"],Xt={extension:{type:j.Ag.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async k=>[...k,...Qt],remove:async k=>k.filter((k=>!Qt.includes(k)))};j.XO.add(Xt);const Zt="WorkerGlobalScope"in globalThis&&globalThis instanceof globalThis.WorkerGlobalScope;function Jt(k){return!Zt&&""!==document.createElement("video").canPlayType(k)}const te={extension:{type:j.Ag.DetectionParser,priority:0},test:async()=>Jt("video/webm"),add:async k=>[...k,"webm"],remove:async k=>k.filter((k=>"webm"!==k))};j.XO.add(te);const ee={extension:{type:j.Ag.DetectionParser,priority:0},test:async()=>Jt("video/mp4"),add:async k=>[...k,"mp4","m4v"],remove:async k=>k.filter((k=>"mp4"!==k&&"m4v"!==k))};j.XO.add(ee);const ie={extension:{type:j.Ag.DetectionParser,priority:0},test:async()=>Jt("video/ogg"),add:async k=>[...k,"ogv"],remove:async k=>k.filter((k=>"ogv"!==k))};j.XO.add(ie);const se={extension:j.Ag.ResolveParser,test:Bt.test,parse:k=>({resolution:parseFloat(j.W0.RETINA_PREFIX.exec(k)?.[1]??"1"),format:j.Wp.path.extname(k).slice(1),src:k})};j.XO.add(se);const ne=k=>{const B=k.src;return k?.alias?.[0]??j.Wp.path.basename(B,j.Wp.path.extname(B))},ae={extension:j.Ag.Asset,detection:{test:async()=>!0,add:async k=>[...k,...K.filter((k=>Y[k]))],remove:async k=>k.filter((B=>k.includes(B)))},loader:{extension:{type:[j.Ag.LoadParser],priority:gt.High},test(k){const B=j.Wp.path.extname(k).slice(1);return!!Y[B]||z.some((B=>k.startsWith(`data:${B}`)))},async load(k,B){const U=await new Promise(((U,F)=>nt.from({...B.data,url:k,preload:!0,loaded(k,G){k?F(k):U(G),B.data?.loaded?.(k,G)}})));return G().add(ne(B),U),U},async unload(k,B){G().remove(ne(B))}}};j.XO.add(ae);const re=function(k){return F=k,k}(new class{constructor(){this.init()}init(){return this.supported&&(this._webAudioContext=new rt),this._htmlAudioContext=new at,this._sounds={},this.useLegacy=!this.supported,this}get context(){return this._context}get filtersAll(){return this.useLegacy?[]:this._context.filters}set filtersAll(k){this.useLegacy||(this._context.filters=k)}get supported(){return null!==rt.AudioContext}add(k,B){if("object"==typeof k){const U={};for(const F in k){const G=this._getOptions(k[F],B);U[F]=this.add(F,G)}return U}if(console.assert(!this._sounds[k],`Sound with alias ${k} already exists.`),B instanceof nt)return this._sounds[k]=B,B;const U=this._getOptions(B),F=nt.from(U);return this._sounds[k]=F,F}_getOptions(k,B){let U;return U="string"==typeof k||Array.isArray(k)?{url:k}:k instanceof ArrayBuffer||k instanceof AudioBuffer||k instanceof HTMLAudioElement?{source:k}:k,U={...U,...B||{}},U}get useLegacy(){return this._useLegacy}set useLegacy(k){this._useLegacy=k,this._context=!k&&this.supported?this._webAudioContext:this._htmlAudioContext}get disableAutoPause(){return!this._webAudioContext.autoPause}set disableAutoPause(k){this._webAudioContext.autoPause=!k}remove(k){return this.exists(k,!0),this._sounds[k].destroy(),delete this._sounds[k],this}get volumeAll(){return this._context.volume}set volumeAll(k){this._context.volume=k,this._context.refresh()}get speedAll(){return this._context.speed}set speedAll(k){this._context.speed=k,this._context.refresh()}togglePauseAll(){return this._context.togglePause()}pauseAll(){return this._context.paused=!0,this._context.refreshPaused(),this}resumeAll(){return this._context.paused=!1,this._context.refreshPaused(),this}toggleMuteAll(){return this._context.toggleMute()}muteAll(){return this._context.muted=!0,this._context.refresh(),this}unmuteAll(){return this._context.muted=!1,this._context.refresh(),this}removeAll(){for(const k in this._sounds)this._sounds[k].destroy(),delete this._sounds[k];return this}stopAll(){for(const k in this._sounds)this._sounds[k].stop();return this}exists(k,B=!1){const U=!!this._sounds[k];return B&&console.assert(U,`No sound matching alias '${k}'.`),U}isPlaying(){for(const k in this._sounds)if(this._sounds[k].isPlaying)return!0;return!1}find(k){return this.exists(k,!0),this._sounds[k]}play(k,B){return this.find(k).play(B)}stop(k){return this.find(k).stop()}pause(k){return this.find(k).pause()}resume(k){return this.find(k).resume()}volume(k,B){const U=this.find(k);return void 0!==B&&(U.volume=B),U.volume}speed(k,B){const U=this.find(k);return void 0!==B&&(U.speed=B),U.speed}duration(k){return this.find(k).duration}close(){return this.removeAll(),this._sounds=null,this._webAudioContext&&(this._webAudioContext.destroy(),this._webAudioContext=null),this._htmlAudioContext&&(this._htmlAudioContext.destroy(),this._htmlAudioContext=null),this._context=null,this}})},1858:k=>{"use strict";function B(k,B,F){F=F||2;var j,$,H,V,K,z,Q,X=B&&B.length,Z=X?B[0]*F:k.length,J=U(k,0,Z,F,!0),tt=[];if(!J||J.next===J.prev)return tt;if(X&&(J=function(k,B,F,G){var j,$,H,V=[];for(j=0,$=B.length;j<$;j++)(H=U(k,B[j]*G,j<$-1?B[j+1]*G:k.length,G,!1))===H.next&&(H.steiner=!0),V.push(Y(H));for(V.sort(W),j=0;j80*F){j=H=k[0],$=V=k[1];for(var et=F;etH&&(H=K),z>V&&(V=z);Q=0!==(Q=Math.max(H-j,V-$))?32767/Q:0}return G(J,tt,F,j,$,Q,0),tt}function U(k,B,U,F,G){var j,$;if(G===ht(k,B,U,F)>0)for(j=B;j=B;j-=F)$=at(j,k[j],k[j+1],$);return $&&J($,$.next)&&(rt($),$=$.next),$}function F(k,B){if(!k)return k;B||(B=k);var U,F=k;do{if(U=!1,F.steiner||!J(F,F.next)&&0!==Z(F.prev,F,F.next))F=F.next;else{if(rt(F),(F=B=F.prev)===F.next)break;U=!0}}while(U||F!==B);return B}function G(k,B,U,W,q,K,Y){if(k){!Y&&K&&function(k,B,U,F){var G=k;do{0===G.z&&(G.z=z(G.x,G.y,B,U,F)),G.prevZ=G.prev,G.nextZ=G.next,G=G.next}while(G!==k);G.prevZ.nextZ=null,G.prevZ=null,function(k){var B,U,F,G,j,$,H,V,W=1;do{for(U=k,k=null,j=null,$=0;U;){for($++,F=U,H=0,B=0;B0||V>0&&F;)0!==H&&(0===V||!F||U.z<=F.z)?(G=U,U=U.nextZ,H--):(G=F,F=F.nextZ,V--),j?j.nextZ=G:k=G,G.prevZ=j,j=G;U=F}j.nextZ=null,W*=2}while($>1)}(G)}(k,W,q,K);for(var Q,X,Z=k;k.prev!==k.next;)if(Q=k.prev,X=k.next,K?$(k,W,q,K):j(k))B.push(Q.i/U|0),B.push(k.i/U|0),B.push(X.i/U|0),rt(k),k=X.next,Z=X.next;else if((k=X)===Z){Y?1===Y?G(k=H(F(k),B,U),B,U,W,q,K,2):2===Y&&V(k,B,U,W,q,K):G(F(k),B,U,W,q,K,1);break}}}function j(k){var B=k.prev,U=k,F=k.next;if(Z(B,U,F)>=0)return!1;for(var G=B.x,j=U.x,$=F.x,H=B.y,V=U.y,W=F.y,q=Gj?G>$?G:$:j>$?j:$,Y=H>V?H>W?H:W:V>W?V:W,X=F.next;X!==B;){if(X.x>=q&&X.x<=z&&X.y>=K&&X.y<=Y&&Q(G,H,j,V,$,W,X.x,X.y)&&Z(X.prev,X,X.next)>=0)return!1;X=X.next}return!0}function $(k,B,U,F){var G=k.prev,j=k,$=k.next;if(Z(G,j,$)>=0)return!1;for(var H=G.x,V=j.x,W=$.x,q=G.y,K=j.y,Y=$.y,X=HV?H>W?H:W:V>W?V:W,et=q>K?q>Y?q:Y:K>Y?K:Y,it=z(X,J,B,U,F),st=z(tt,et,B,U,F),nt=k.prevZ,at=k.nextZ;nt&&nt.z>=it&&at&&at.z<=st;){if(nt.x>=X&&nt.x<=tt&&nt.y>=J&&nt.y<=et&&nt!==G&&nt!==$&&Q(H,q,V,K,W,Y,nt.x,nt.y)&&Z(nt.prev,nt,nt.next)>=0)return!1;if(nt=nt.prevZ,at.x>=X&&at.x<=tt&&at.y>=J&&at.y<=et&&at!==G&&at!==$&&Q(H,q,V,K,W,Y,at.x,at.y)&&Z(at.prev,at,at.next)>=0)return!1;at=at.nextZ}for(;nt&&nt.z>=it;){if(nt.x>=X&&nt.x<=tt&&nt.y>=J&&nt.y<=et&&nt!==G&&nt!==$&&Q(H,q,V,K,W,Y,nt.x,nt.y)&&Z(nt.prev,nt,nt.next)>=0)return!1;nt=nt.prevZ}for(;at&&at.z<=st;){if(at.x>=X&&at.x<=tt&&at.y>=J&&at.y<=et&&at!==G&&at!==$&&Q(H,q,V,K,W,Y,at.x,at.y)&&Z(at.prev,at,at.next)>=0)return!1;at=at.nextZ}return!0}function H(k,B,U){var G=k;do{var j=G.prev,$=G.next.next;!J(j,$)&&tt(j,G,G.next,$)&&st(j,$)&&st($,j)&&(B.push(j.i/U|0),B.push(G.i/U|0),B.push($.i/U|0),rt(G),rt(G.next),G=k=$),G=G.next}while(G!==k);return F(G)}function V(k,B,U,j,$,H){var V=k;do{for(var W=V.next.next;W!==V.prev;){if(V.i!==W.i&&X(V,W)){var q=nt(V,W);return V=F(V,V.next),q=F(q,q.next),G(V,B,U,j,$,H,0),void G(q,B,U,j,$,H,0)}W=W.next}V=V.next}while(V!==k)}function W(k,B){return k.x-B.x}function q(k,B){var U=function(k,B){var U,F=B,G=k.x,j=k.y,$=-1/0;do{if(j<=F.y&&j>=F.next.y&&F.next.y!==F.y){var H=F.x+(j-F.y)*(F.next.x-F.x)/(F.next.y-F.y);if(H<=G&&H>$&&($=H,U=F.x=F.x&&F.x>=q&&G!==F.x&&Q(jU.x||F.x===U.x&&K(U,F)))&&(U=F,Y=V)),F=F.next}while(F!==W);return U}(k,B);if(!U)return B;var G=nt(U,k);return F(G,G.next),F(U,U.next)}function K(k,B){return Z(k.prev,k,B.prev)<0&&Z(B.next,k,k.next)<0}function z(k,B,U,F,G){return(k=1431655765&((k=858993459&((k=252645135&((k=16711935&((k=(k-U)*G|0)|k<<8))|k<<4))|k<<2))|k<<1))|(B=1431655765&((B=858993459&((B=252645135&((B=16711935&((B=(B-F)*G|0)|B<<8))|B<<4))|B<<2))|B<<1))<<1}function Y(k){var B=k,U=k;do{(B.x=(k-$)*(j-H)&&(k-$)*(F-H)>=(U-$)*(B-H)&&(U-$)*(j-H)>=(G-$)*(F-H)}function X(k,B){return k.next.i!==B.i&&k.prev.i!==B.i&&!function(k,B){var U=k;do{if(U.i!==k.i&&U.next.i!==k.i&&U.i!==B.i&&U.next.i!==B.i&&tt(U,U.next,k,B))return!0;U=U.next}while(U!==k);return!1}(k,B)&&(st(k,B)&&st(B,k)&&function(k,B){var U=k,F=!1,G=(k.x+B.x)/2,j=(k.y+B.y)/2;do{U.y>j!=U.next.y>j&&U.next.y!==U.y&&G<(U.next.x-U.x)*(j-U.y)/(U.next.y-U.y)+U.x&&(F=!F),U=U.next}while(U!==k);return F}(k,B)&&(Z(k.prev,k,B.prev)||Z(k,B.prev,B))||J(k,B)&&Z(k.prev,k,k.next)>0&&Z(B.prev,B,B.next)>0)}function Z(k,B,U){return(B.y-k.y)*(U.x-B.x)-(B.x-k.x)*(U.y-B.y)}function J(k,B){return k.x===B.x&&k.y===B.y}function tt(k,B,U,F){var G=it(Z(k,B,U)),j=it(Z(k,B,F)),$=it(Z(U,F,k)),H=it(Z(U,F,B));return G!==j&&$!==H||(!(0!==G||!et(k,U,B))||(!(0!==j||!et(k,F,B))||(!(0!==$||!et(U,k,F))||!(0!==H||!et(U,B,F)))))}function et(k,B,U){return B.x<=Math.max(k.x,U.x)&&B.x>=Math.min(k.x,U.x)&&B.y<=Math.max(k.y,U.y)&&B.y>=Math.min(k.y,U.y)}function it(k){return k>0?1:k<0?-1:0}function st(k,B){return Z(k.prev,k,k.next)<0?Z(k,B,k.next)>=0&&Z(k,k.prev,B)>=0:Z(k,B,k.prev)<0||Z(k,k.next,B)<0}function nt(k,B){var U=new ot(k.i,k.x,k.y),F=new ot(B.i,B.x,B.y),G=k.next,j=B.prev;return k.next=B,B.prev=k,U.next=G,G.prev=U,F.next=U,U.prev=F,j.next=F,F.prev=j,F}function at(k,B,U,F){var G=new ot(k,B,U);return F?(G.next=F.next,G.prev=F,F.next.prev=G,F.next=G):(G.prev=G,G.next=G),G}function rt(k){k.next.prev=k.prev,k.prev.next=k.next,k.prevZ&&(k.prevZ.nextZ=k.nextZ),k.nextZ&&(k.nextZ.prevZ=k.prevZ)}function ot(k,B,U){this.i=k,this.x=B,this.y=U,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function ht(k,B,U,F){for(var G=0,j=B,$=U-F;j0&&(F+=k[G-1].length,U.holes.push(F))}return U}},15369:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.catalystSDK=void 0;var F=U(83387),G=U(52931),j=U(71195),$=U(6818),H=U(37367),V=U(24445),W=U(2895),q=U(83976),K=U(79140),z=function(){function k(){}return Object.defineProperty(k.prototype,"genericRequest",{get:function(){return this._genericRequest.reset(),this._genericRequest},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"cloudScript",{get:function(){return new F.CloudScript(this._genericRequest)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"featureAccess",{get:function(){return this._featureAccess.reset(),this._featureAccess},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"authHandler",{get:function(){return this._authHandler.reset(),this._authHandler},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"mailer",{get:function(){return this._mailer.reset(),this._mailer},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"gameAssetsExperiments",{get:function(){return this._gameAssetsExperiments.reset(),this._gameAssetsExperiments},enumerable:!1,configurable:!0}),k.prototype.init=function(k,B){if(0===k.length){throw{name:"CatalystSdk.init error",message:"No Client ID"}}G.CommonInfo.init(k,B),this._http=new q.HttpRequest,this._authHandler=new K.AuthHandler,this._genericRequest=new W.GenericRequest(this._http,this.authHandler).useAuthorization(),this.leaderboard=new H.Leaderboard(this._genericRequest),this._featureAccess=new j.FeatureAccess(this._genericRequest,this._authHandler),this._mailer=new V.Mailer(this._genericRequest),this._gameAssetsExperiments=new $.GameAssetsExperiments(this._genericRequest)},k.prototype.setToken=function(k,B,U){void 0===U&&(U={header:!0,body:!1}),G.CommonInfo.setToken(k,B,U)},k}();B.catalystSDK=new z},32943:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.CatalystSdkError=void 0;var F=U(95912),G=U(6556),j=function(k){function B(U,F,G,j){var $=this;return B.isCloudScriptErrorResponse(U,G)?($=k.call(this,G.result.message)||this).errorInfo=G:$=k.call(this,G)||this,F&&($.name=F),$.code=U,$.httpStatus=j,$}return(0,F.__extends)(B,k),B.isCloudScriptErrorResponse=function(k,B){return k===G.EErrorCode.ScriptError||k===G.EErrorCode.CloudScriptRequestError},B.fromHttpStatus=function(k,U,F){var j;switch(k){case 412:j=G.EErrorCode.PreconditionFailed,console.warn("HTTP 412 Precondition Failed detected: ".concat(U||"Read-only Character enabled"),{httpStatus:k,message:U,name:F,timestamp:(new Date).toISOString()});break;case 401:case 403:j=G.EErrorCode.ReauthenticationRequired;break;case 408:case 504:j=G.EErrorCode.RequestTimeout;break;case 429:j=G.EErrorCode.RetryRequired;break;case 501:case 502:case 503:j=G.EErrorCode.NotImplemented;break;default:j=k>=400&&k<500?G.EErrorCode.RequestError:k>=500?G.EErrorCode.ConnectionFail:G.EErrorCode.Unknown}return new B(j,F||"HTTP ".concat(k," Error"),U||"Request failed with status ".concat(k),k)},B.stringify=function(k){var B;return k instanceof Error?"".concat(null!==(B=k.stack)&&void 0!==B?B:k.message):JSON.stringify(k)},B.prototype.isPreconditionFailed=function(){return this.code===G.EErrorCode.PreconditionFailed||412===this.httpStatus},B.prototype.isHttpStatus=function(k){return this.httpStatus===k},B.prototype.getUserFriendlyMessage=function(){switch(this.code){case G.EErrorCode.PreconditionFailed:return"The request could not be completed due to a precondition failure.";case G.EErrorCode.ReauthenticationRequired:return"Your session has expired. Please log in again.";case G.EErrorCode.RequestTimeout:return"The request timed out. Please check your connection and try again.";case G.EErrorCode.ConnectionFail:return"Unable to connect to the server. Please check your internet connection.";case G.EErrorCode.RetryRequired:return"The server is busy. Please try again in a moment.";case G.EErrorCode.GameTokenNotPresent:return"Authentication token is missing. Please log in again.";default:return this.message||"An unexpected error occurred. Please try again."}},B}(Error);B.CatalystSdkError=j},69016:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},83387:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.CloudScript=void 0;var F=U(95912),G=U(32943),j=U(27596),$=U(85262),H=U(52931),V=U(32009),W=U(6962),q=function(k){function B(B){var U=k.call(this,B)||this;return U.setServiceUrlVersion(U.getVersion()),U}return(0,F.__extends)(B,k),B.prototype.execute=function(k,B,U){return(0,F.__awaiter)(this,void 0,void 0,(function(){var G,j,$;return(0,F.__generator)(this,(function(F){switch(F.label){case 0:G={scriptName:k,params:B},F.label=1;case 1:return F.trys.push([1,3,,4]),j=this.extractResponse,[4,this.request(V.EHttpRequestType.POST,this._serviceURL,G,U)];case 2:return[2,j.apply(this,[F.sent()])];case 3:return $=F.sent(),[2,Promise.reject($)];case 4:return[2]}}))}))},B.prototype.extractResponse=function(k){var B=new W.HttpResponse;if(B.status=k.status,B.isOK()){var U=k.data;if(W.HttpResponse.isStatusOK(U.status))return B.data=U.result,B;throw new G.CatalystSdkError(j.EErrorCode.ScriptError,"".concat(k.status),k.data)}if(W.HttpResponse.isClientError(B.status)){var F=k.data;throw new G.CatalystSdkError(j.EErrorCode.CloudScriptRequestError,"".concat(k.status),void 0!==F.result?F:{result:k.data})}throw new G.CatalystSdkError(j.EErrorCode.CloudScriptRequestError,"".concat(k.status),k.data)},B.prototype.setServiceUrlVersion=function(B){return k.prototype.setVersion.call(this,B),this._serviceURL="".concat(H.CommonInfo.ServiceRootURL,"/game-cortex-server/").concat(this.getVersion(),"/cloudscripts.execute"),this},B.prototype.reset=function(){return k.prototype.reset.call(this),this.setServiceUrlVersion("v2"),this},B}($.BaseRequest);B.CloudScript=q},51901:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),(0,U(95912).__exportStar)(U(83387),B)},85262:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BaseRequest=void 0;var F=U(95912),G=U(2895),j=function(){function k(k){this._version="v1",this._request=null!=k?k:new G.GenericRequest,this.reset()}return k.prototype.reset=function(){return this._request.reset(),this},k.prototype.timeoutMS=function(k){return this._request.requestTimeoutMS(k),this},k.prototype.useIdempotency=function(k){return this._request.useIdempotency(k),this},k.prototype.requestID=function(k){return this._request.requestID(k),this},k.prototype.useTokenInBody=function(k){return this._request.useTokenInBody(k),this},k.prototype.useRetry=function(k){return this._request.useRetry(k),this},k.prototype.setRetryOption=function(k){return this._request.setRetryOption(k),this},k.prototype.setVersion=function(k){return this._version=k,this},k.prototype.getVersion=function(){return this._version},k.prototype.getRetryOption=function(){return this._request.getRetryOption()},k.prototype.useCredentials=function(){return this._request.useCredentials(),this},k.prototype.request=function(k,B,U,G,j){return(0,F.__awaiter)(this,void 0,void 0,(function(){return(0,F.__generator)(this,(function(F){return[2,this._request.request(k,B,U,G,j)]}))}))},k}();B.BaseRequest=j},52931:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.CommonInfo=void 0;var F=U(54770),G=function(){function k(){}return k.init=function(B,U){var G,j;k.Tokens=new Map,k.Tokens.set("header",new Map),k.Tokens.set("body",new Map),k.ClientID=B,k.ServiceRootURL=U.serviceRootURL,k.RequestTimeout=null!==(G=U.requestTimeout)&&void 0!==G?G:F.Constants.DefaultTimeoutMS,k.UseIdempotency=null!==(j=U.useIdempotency)&&void 0!==j?j:k.UseIdempotency,(null==U?void 0:U.retryOption)&&(k.RetryOption=U.retryOption)},Object.defineProperty(k,"headerToken",{get:function(){return k.Tokens.get("header")},enumerable:!1,configurable:!0}),Object.defineProperty(k,"bodyToken",{get:function(){return k.Tokens.get("body")},enumerable:!1,configurable:!0}),k.setToken=function(B,U,F){var G,j;void 0===F&&(F={header:!0,body:!1}),F.header&&(null===(G=k.headerToken)||void 0===G||G.set(B,U)),F.body&&(null===(j=k.bodyToken)||void 0===j||j.set(B,U))},k.UseIdempotency=!1,k}();B.CommonInfo=G},54770:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.Constants=void 0;var U=function(){function k(){}return k.DefaultTimeoutMS=3e4,k.DefaultRetryDelayMS=5e3,k.DefaultRetryMaxDelayMS=15e3,k.DefaultRetryRequiredStatusCodes=new Set([202,408,500,502,503,504]),k.ReauthenticationRequiredStatusCodes=new Set([401]),k}();B.Constants=U},6556:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.EErrorCode=void 0,function(k){k[k.NoError=0]="NoError",k[k.Unknown=1]="Unknown",k[k.InvalidMethodType=2]="InvalidMethodType",k[k.RequestTimeout=3]="RequestTimeout",k[k.ConnectionFail=4]="ConnectionFail",k[k.RetryRequired=5]="RetryRequired",k[k.IdempotencyError=6]="IdempotencyError",k[k.NotImplemented=7]="NotImplemented",k[k.CloudScriptRequestError=8]="CloudScriptRequestError",k[k.ScriptError=9]="ScriptError",k[k.RequestError=10]="RequestError",k[k.ReauthenticationRequired=11]="ReauthenticationRequired",k[k.GameTokenNotPresent=12]="GameTokenNotPresent",k[k.PreconditionFailed=13]="PreconditionFailed"}(B.EErrorCode||(B.EErrorCode={}))},27596:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(95912);(0,F.__exportStar)(U(85262),B),(0,F.__exportStar)(U(52931),B),(0,F.__exportStar)(U(54770),B),(0,F.__exportStar)(U(6556),B)},71195:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.FeatureAccess=void 0;var F=U(95912),G=U(32943),j=U(27596),$=U(85262),H=U(52931),V=U(32009),W=function(k){function B(B,U){var F=k.call(this,B)||this;return F._authHandler=U,F.setServiceUrlVersion("v2"),F}return(0,F.__extends)(B,k),B.prototype.getFeatures=function(){return(0,F.__awaiter)(this,void 0,void 0,(function(){var k,U;return(0,F.__generator)(this,(function(F){switch(F.label){case 0:this.setEndpoint(B.GetFeaturesEndpoint),this.setServiceUrlEndpoint(B.GetFeaturesEndpoint),F.label=1;case 1:return F.trys.push([1,3,,4]),[4,this.request(V.EHttpRequestType.GET,this._serviceURL,{clientID:H.CommonInfo.ClientID})];case 2:return k=F.sent(),[3,4];case 3:throw U=F.sent(),new G.CatalystSdkError(j.EErrorCode.Unknown,"Error calling ".concat(this._serviceURL),G.CatalystSdkError.stringify(U));case 4:if(k.isOK())return[2,k];throw new G.CatalystSdkError(j.EErrorCode.RequestError,"Call to ".concat(this._serviceURL," failed with status ").concat(k.status),JSON.stringify(k))}}))}))},B.prototype.update=function(){return(0,F.__awaiter)(this,void 0,void 0,(function(){var k,U;return(0,F.__generator)(this,(function(F){switch(F.label){case 0:this.setEndpoint(B.UpdateEndpoint),this.setServiceUrlEndpoint(B.UpdateEndpoint),F.label=1;case 1:return F.trys.push([1,3,,4]),[4,this.request(V.EHttpRequestType.POST,this._serviceURL,{clientID:H.CommonInfo.ClientID,identityToken:this._authHandler.getIdentityToken()})];case 2:return k=F.sent(),[3,4];case 3:throw U=F.sent(),new G.CatalystSdkError(j.EErrorCode.Unknown,"Error calling ".concat(this._serviceURL),G.CatalystSdkError.stringify(U));case 4:return k.isOK()?[4,this._authHandler.renewJWT()]:[3,6];case 5:return F.sent(),[2,k];case 6:throw new G.CatalystSdkError(j.EErrorCode.RequestError,"Call to ".concat(this._serviceURL," failed with status ").concat(k.status),JSON.stringify(k))}}))}))},B.prototype.setEndpoint=function(k){return this._currentEndpoint=k,this},B.prototype.getEndpoint=function(){return this._currentEndpoint},B.prototype.setServiceUrlVersion=function(B){return k.prototype.setVersion.call(this,B),this._serviceURL="".concat(H.CommonInfo.ServiceRootURL,"/game-cortex-server/v2/featureAccess.").concat(this.getEndpoint()),this},B.prototype.setServiceUrlEndpoint=function(k){return this.setEndpoint(k),this._serviceURL="".concat(H.CommonInfo.ServiceRootURL,"/game-cortex-server/v2/featureAccess.").concat(this.getEndpoint()),this},B.prototype.reset=function(){return k.prototype.reset.call(this),this.setServiceUrlVersion("v2"),this},B.GetFeaturesEndpoint="getFeatures",B.UpdateEndpoint="update",B}($.BaseRequest);B.FeatureAccess=W},79543:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),(0,U(95912).__exportStar)(U(71195),B)},92571:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.GameAssetsExperiments=B.SourceType=void 0;var F=U(95912),G=U(27596),j=U(41093);!function(k){k.CMS="CMS",k.LocalAssets="LocalAssets",k.GlobalEntities="GlobalEntities"}(B.SourceType||(B.SourceType={}));var $=function(k){function B(B){var U=k.call(this,B)||this;return k.prototype.setVersion.call(U,"v2"),U}return(0,F.__extends)(B,k),B.prototype.getAllExperimentsWithCustomData=function(k){return(0,F.__awaiter)(this,void 0,void 0,(function(){var B;return(0,F.__generator)(this,(function(U){return B="".concat(G.CommonInfo.ServiceRootURL,"/game-cortex-server/").concat(this.getVersion(),"/cloudscripts.execute"),[2,this.request(j.EHttpRequestType.POST,B,{userID:k,scriptName:"assetExperiments.getAllExperimentsWithCustomData"})]}))}))},B.prototype.getAssetsForExperimentsVariations=function(k,B,U){return(0,F.__awaiter)(this,void 0,void 0,(function(){var $,H;return(0,F.__generator)(this,(function(F){return $="".concat(G.CommonInfo.ServiceRootURL,"/game-cortex-server/").concat(this.getVersion(),"/cloudscripts.execute"),H={sourceType:k,experimentVariations:U},[2,this.request(j.EHttpRequestType.POST,$,{userID:B,scriptName:"assetExperiments.getAssetsForExperimentsVariations",params:H})]}))}))},B}(G.BaseRequest);B.GameAssetsExperiments=$},6818:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),(0,U(95912).__exportStar)(U(92571),B)},79600:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(95912);(0,F.__exportStar)(U(15369),B),(0,F.__exportStar)(U(32943),B),(0,F.__exportStar)(U(69016),B),(0,F.__exportStar)(U(51901),B),(0,F.__exportStar)(U(27596),B),(0,F.__exportStar)(U(79543),B),(0,F.__exportStar)(U(91801),B),(0,F.__exportStar)(U(85108),B),(0,F.__exportStar)(U(41093),B),(0,F.__exportStar)(U(56230),B),(0,F.__exportStar)(U(6818),B)},85108:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),(0,U(95912).__exportStar)(U(37367),B)},37367:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.Leaderboard=void 0;var F=U(95912),G=U(52931),j=function(){function k(k){this._genericRequest=k}return k.prototype.getUsers=function(){console.log("Leaderboard.getUsers"),this.call()},k.prototype.call=function(){return(0,F.__awaiter)(this,void 0,void 0,(function(){return(0,F.__generator)(this,(function(B){switch(B.label){case 0:return[4,this._genericRequest.request("get","".concat(G.CommonInfo.ServiceRootURL,"/game-cortex-server/").concat(k.Version,"/call"))];case 1:return[2,B.sent()]}}))}))},k.Version="v1",k}();B.Leaderboard=j},24445:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.Mailer=void 0;var F=U(95912),G=U(27596),j=U(85262),$=U(41093),H=function(k){function B(B){var U=k.call(this,B)||this;return U.setServiceUrlVersion("v1"),U}return(0,F.__extends)(B,k),B.prototype.setServiceUrlVersion=function(B){return k.prototype.setVersion.call(this,B),this},B.prototype.listMail=function(k,B,U,j,H,V){return(0,F.__awaiter)(this,void 0,void 0,(function(){var W;return(0,F.__generator)(this,(function(F){return W="".concat(G.CommonInfo.ServiceRootURL,"/game-cortex-server/").concat(this.getVersion(),"/mailer.listMail"),[2,this.request($.EHttpRequestType.GET,W,{userID:k,templateID:B,limit:U,offset:j,sortBy:H,sortDirection:V})]}))}))},B}(j.BaseRequest);B.Mailer=H},91801:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),(0,U(95912).__exportStar)(U(24445),B)},32009:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.EHttpRequestType=void 0,function(k){k.POST="post",k.GET="get",k.PUT="put",k.PATCH="patch",k.DELETE="delete",k.HEAD="head"}(B.EHttpRequestType||(B.EHttpRequestType={}))},2895:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.GenericRequest=void 0;var F=U(95912),G=U(32943),j=U(52931),$=U(54770),H=U(6556),V=U(32009),W=U(83976),q=U(61068),K=function(){function k(k,B){this._newBodyTokens=new Array,this._shouldIncludeCredentials=!1,this._shouldIncludeAuthorization=!1,this._idempotencyKeyName="Idempotency-Key",this._http=null!=k?k:new W.HttpRequest,this._authHandler=B}return Object.defineProperty(k.prototype,"idempotency",{get:function(){return this._idempotency},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"lastRequestID",{get:function(){return this._lastRequestID},enumerable:!1,configurable:!0}),k.prototype.reset=function(){var k,B,U;this._timeoutMS=j.CommonInfo.RequestTimeout,this._idempotency=j.CommonInfo.UseIdempotency,this._useRetry=(null===(k=j.CommonInfo.RetryOption)||void 0===k?void 0:k.retryCount)>0;var F=null===(U=null===(B=j.CommonInfo.RetryOption)||void 0===B?void 0:B.retryRequiredStatusCodes)||void 0===U?void 0:U.length;return this._retryRequiredStatusCodes=F&&F>0?new Set(j.CommonInfo.RetryOption.retryRequiredStatusCodes):$.Constants.DefaultRetryRequiredStatusCodes,this._lastRequestID="",this},k.prototype.requestTimeoutMS=function(k){return this._timeoutMS=k,this},k.prototype.useIdempotency=function(k){return this._idempotency=k,this},k.prototype.requestID=function(k){return this._idempotency=!0,this._newRequestID=k,this},k.prototype.useTokenInBody=function(k){var B,U;(null===(B=j.CommonInfo.headerToken)||void 0===B?void 0:B.has(k))?(null===(U=j.CommonInfo.headerToken)||void 0===U?void 0:U.get(k))?this._newBodyTokens.push(k):console.log("The token[".concat(k,"] has no value.")):console.log("Cannot find the token[".concat(k,"]"));return this},k.prototype.useRetry=function(k){return this._useRetry=k,this},k.prototype.useCredentials=function(){return this._shouldIncludeCredentials=!0,this},k.prototype.useAuthorization=function(){return this._shouldIncludeAuthorization=!0,this},k.prototype.setRetryOption=function(k){return this._useRetry=!0,this._retryOption=k,void 0!==k.retryRequiredStatusCodes&&k.retryRequiredStatusCodes.forEach(this._retryRequiredStatusCodes.add,this._retryRequiredStatusCodes),this},k.prototype.getRetryOption=function(){var k;if(this._useRetry)return null!==(k=this._retryOption)&&void 0!==k?k:j.CommonInfo.RetryOption},k.prototype.request=function(k,B,U,G,j){var $;return(0,F.__awaiter)(this,void 0,void 0,(function(){var V,W;return(0,F.__generator)(this,(function(F){switch(F.label){case 0:V="string"==typeof k?this.stringToHttpRequestType(k):k,this._idempotency&&(this._lastRequestID=null!==($=this._newRequestID)&&void 0!==$?$:this.uuidv4(),this._newRequestID=void 0),F.label=1;case 1:return F.trys.push([1,3,,6]),[4,this.sendRequest(V,B,U,G,j)];case 2:return[2,F.sent()];case 3:return(W=F.sent()).code===H.EErrorCode.ReauthenticationRequired&&this._authHandler?[4,this._authHandler.renewJWT()]:[3,5];case 4:return F.sent(),[2,this.sendRequest(V,B,U,G,j)];case 5:throw W;case 6:return[2]}}))}))},k.prototype.sendRequest=function(k,B,U,j,$){return(0,F.__awaiter)(this,void 0,void 0,(function(){var V,W,K,z,Y;return(0,F.__generator)(this,(function(Q){switch(Q.label){case 0:if((V=new q.HttpRequestInfo(k,B)).timeoutMS=this._timeoutMS,V.shouldIncludeCredentials=this._shouldIncludeCredentials,this._shouldIncludeAuthorization){if(!this._authHandler)throw new G.CatalystSdkError(H.EErrorCode.GameTokenNotPresent,void 0,"Attempt to call SDK while request does not have access to auth handler");if(!(W=this._authHandler.getGameJWT()))throw K=0===this._authHandler.getUserID()?"user is not logged in yet":"user is logged out",new G.CatalystSdkError(H.EErrorCode.GameTokenNotPresent,void 0,"Attempt to call SDK while ".concat(K));V.addHeader("Authorization",W)}return z=U,this._idempotency&&(z=(0,F.__assign)((0,F.__assign)({},z),{requestID:this._lastRequestID}),V.addHeader(this._idempotencyKeyName,this._lastRequestID)),this._newBodyTokens.length>0&&this._newBodyTokens.forEach((function(k){return V.useTokenInBody(k)})),z&&V.setBody(z),$&&V.setUrlSearchParamsBody($),(Y=null!=j?j:this.getRetryOption())&&(V.retryOption=Y,V.retryRequiredStatusCodes=this._retryRequiredStatusCodes),[4,this._http.send(V)];case 1:return[2,Q.sent()]}}))}))},k.prototype.stringToHttpRequestType=function(k){var B=V.EHttpRequestType.POST;switch(k.toLowerCase()){case"get":B=V.EHttpRequestType.GET;break;case"post":B=V.EHttpRequestType.POST;break;default:throw new G.CatalystSdkError(H.EErrorCode.InvalidMethodType,"GenericRequest.stringToHttpRequestType","undefined request method type: ".concat(k))}return B},k.prototype.uuidv4=function(){return"".concat(1e7,"-").concat(1e3,"-").concat(4e3,"-").concat(8e3,"-").concat(1e11).replace(/[018]/g,(function(k){return(parseInt(k)^crypto.getRandomValues(new Uint8Array(1))[0]&15>>parseInt(k)/4).toString(16)}))},k}();B.GenericRequest=K},83976:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.HttpRequest=void 0;var F=U(95912),G=U(32943),j=U(54770),$=U(6556),H=U(6962),V=function(){function k(){}return k.prototype.send=function(k){var B,U,G,H;return(0,F.__awaiter)(this,void 0,void 0,(function(){var V,W;return(0,F.__generator)(this,(function(F){switch(F.label){case 0:void 0!==k&&(this._requestInfo=k,this._retryCount=null!==(U=null===(B=this._requestInfo.retryOption)||void 0===B?void 0:B.retryCount)&&void 0!==U?U:0,this._retryDelayMS=null!==(H=null===(G=this._requestInfo.retryOption)||void 0===G?void 0:G.retryIntervalMS)&&void 0!==H?H:j.Constants.DefaultRetryDelayMS),F.label=1;case 1:return F.trys.push([1,3,,7]),[4,this.fetch(this._requestInfo)];case 2:return[2,F.sent()];case 3:if(V=F.sent(),W=!1,void 0!==V.code)switch(V.code){case $.EErrorCode.RequestTimeout:case $.EErrorCode.RetryRequired:W=!0}else W=!0;return W&&this._retryCount>0?(--this._retryCount,[4,this.waitInterval(this._retryDelayMS)]):[3,5];case 4:return F.sent(),this.updateRetryInterval(),[2,this.send()];case 5:return[2,Promise.reject(V)];case 6:return[3,7];case 7:return[2]}}))}))},k.prototype.fetch=function(k){return(0,F.__awaiter)(this,void 0,void 0,(function(){var B;return(0,F.__generator)(this,(function(U){switch(U.label){case 0:return[4,Promise.race([fetch(k.getURL(),k.getRequestInit()),this.waitInterval(k.timeoutMS)])];case 1:if(B=U.sent(),clearTimeout(this._timerID),B instanceof Response){if(j.Constants.ReauthenticationRequiredStatusCodes.has(B.status))throw new G.CatalystSdkError($.EErrorCode.ReauthenticationRequired,"".concat(B.status),"the status ".concat(B.status," requires reauthentication."));if(this.isRetryRequired(B.status))throw new G.CatalystSdkError($.EErrorCode.RetryRequired,"".concat(B.status),"the status ".concat(B.status," requires retry."));return[2,(new H.HttpResponse).set(B)]}throw"number"==typeof B?new G.CatalystSdkError($.EErrorCode.RequestTimeout):new G.CatalystSdkError($.EErrorCode.Unknown)}}))}))},k.prototype.waitInterval=function(k){return(0,F.__awaiter)(this,void 0,void 0,(function(){var B=this;return(0,F.__generator)(this,(function(U){return[2,new Promise((function(U){B._timerID=setTimeout((function(){return U(0)}),k)}))]}))}))},k.prototype.updateRetryInterval=function(){var k,B,U,F;this._retryDelayMS=Math.min(this._retryDelayMS+(null!==(B=null===(k=this._requestInfo.retryOption)||void 0===k?void 0:k.retryIncreamentMS)&&void 0!==B?B:0),null!==(F=null===(U=this._requestInfo.retryOption)||void 0===U?void 0:U.retryMaxDelayMS)&&void 0!==F?F:j.Constants.DefaultRetryMaxDelayMS)},k.prototype.isRetryRequired=function(k){var B;return null===(B=this._requestInfo.retryRequiredStatusCodes)||void 0===B?void 0:B.has(k)},k}();B.HttpRequest=V},61068:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.HttpRequestInfo=void 0;var F=U(95912),G=U(52931),j=U(32009),$=function(){function k(k,B,U){var F,j=this;this.timeoutMS=G.CommonInfo.RequestTimeout,this._queryParameters=new Map,this._newBodyTokens=new Map,this.shouldIncludeCredentials=!1,this._method=k,this._url=this.ensureUrlHasProtocol(B),this._header=null!=U?U:{},null===(F=G.CommonInfo.headerToken)||void 0===F||F.forEach((function(k,B){j._header[B]=k}))}return k.prototype.addHeader=function(k,B){return this._header[k]=B,this},k.prototype.getHeader=function(k){return this._header[k]},k.prototype.useTokenInBody=function(k){var B,U;if(null===(B=G.CommonInfo.headerToken)||void 0===B?void 0:B.has(k)){var F=null===(U=G.CommonInfo.headerToken)||void 0===U?void 0:U.get(k);F?this._newBodyTokens.set(k,F):console.log("The token[".concat(k,"] has no value."))}else console.log("Cannot find the token[".concat(k,"]"));return this},k.prototype.addQueryParameter=function(k,B){return this._queryParameters.set(k,B),this},k.prototype.setBody=function(k){var B,U=(0,F.__assign)((0,F.__assign)({},k),{clientID:G.CommonInfo.ClientID});if(null===(B=G.CommonInfo.bodyToken)||void 0===B||B.forEach((function(k,B){U[B]=k})),this._newBodyTokens.size>0&&this._newBodyTokens.forEach((function(k,B){return U[B]=k})),this._method===j.EHttpRequestType.GET)for(var $ in U)"object"!=typeof U[$]&&(void 0!==U[$]&&this.addQueryParameter($,U[$]),delete U[$]);return 0!==Object.keys(U).length&&(this.addHeader("Content-Type","application/json"),this._body=U),this},k.prototype.setUrlSearchParamsBody=function(k){this._method!==j.EHttpRequestType.GET&&this.addHeader("Content-Type","application/x-www-form-urlencoded"),this._body=k},k.prototype.getBody=function(){return JSON.stringify(this._body)},k.prototype.getURL=function(){var k=this._url;if(this._queryParameters.size>0){var B=[];this._queryParameters.forEach((function(k,U){B.push("".concat(encodeURIComponent(U),"=").concat(encodeURIComponent(k)))})),k+="".concat(-1!==this._url.indexOf("?")?"&":"?").concat(B.join("&"))}return k},k.prototype.getRequestInit=function(){var k={method:this._method,headers:this._header,redirect:"follow"};return this.shouldIncludeCredentials&&(k.credentials="include"),void 0!==this._body&&("application/json"===this._header["Content-Type"]?k.body=JSON.stringify(this._body):("application/x-www-form-urlencoded"===this._header["Content-Type"]&&(k.headers={"Content-Type":"application/x-www-form-urlencoded"},k.credentials="omit"),k.body=this._body)),k},k.prototype.ensureUrlHasProtocol=function(k){return/^https?/.exec(k)?k:"https://".concat(k)},k}();B.HttpRequestInfo=$},20153:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},6962:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.HttpResponse=void 0;var F=U(95912),G=U(32943),j=U(6556),$=function(){function k(){}return k.prototype.set=function(k){return(0,F.__awaiter)(this,void 0,void 0,(function(){var B,U,$;return(0,F.__generator)(this,(function(F){switch(F.label){case 0:return this.status=k.status,B=this,[4,this.obtainArrayBuffer(k)];case 1:if(B._body=F.sent(),U=this._body.byteLength>0?this.decodeData(this._body):"",null==($=k.headers.get("Content-Type"))?void 0:$.startsWith("application/json"))this.data=JSON.parse(U);else if("application/octet-stream"===$)throw new G.CatalystSdkError(j.EErrorCode.NotImplemented,"HttpResponse.set","Not implemented yet. ".concat($));return[2,this]}}))}))},Object.defineProperty(k.prototype,"requestID",{get:function(){var k;return null===(k=this.data)||void 0===k?void 0:k.requestID},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"body",{get:function(){return this._body},enumerable:!1,configurable:!0}),k.prototype.isOK=function(){return k.isStatusOK(this.status)},k.prototype.obtainArrayBuffer=function(k){return(0,F.__awaiter)(this,void 0,void 0,(function(){return(0,F.__generator)(this,(function(B){return[2,k.arrayBuffer()]}))}))},k.prototype.decodeData=function(k){try{return(new TextDecoder).decode(k)}catch(B){return(new(U(40537).TextDecoder)).decode(k)}},k.isStatusOK=function(k){return"number"==typeof k&&(k>=200&&k<300)},k.isClientError=function(k){return k>=400&&k<500},k}();B.HttpResponse=$},41093:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(95912);(0,F.__exportStar)(U(32009),B),(0,F.__exportStar)(U(2895),B),(0,F.__exportStar)(U(83976),B),(0,F.__exportStar)(U(61068),B),(0,F.__exportStar)(U(20153),B),(0,F.__exportStar)(U(6962),B)},79140:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.AuthHandler=void 0;var F,G=U(95912),j=(0,G.__importStar)(U(78686)),$=U(32943),H=U(27596),V=U(85262),W=U(52931),q=U(32009),K=(0,G.__importStar)(U(33770));!function(k){k.Login="coreGame.login",k.RenewJWT="coreGame.renewJWT",k.RenewIdentity="/oauth/token",k.SetSession="coreGame.setSession"}(F||(F={}));var z=function(k){function B(B){var U=k.call(this,B)||this;U.IsWorkerEnabled=!1,U._authInfo=null,U._serviceWorkerName="jwt-renewal-worker",U._renewJWTTimerID=null,U._renewIdentityTimerID=null,U._callbacks={},U._identityUri="";try{j.defaults.storage=sessionStorage,U._worker=K.createServiceWorker(U._serviceWorkerName),U.IsWorkerEnabled=!0,U.registerWorkerListener()}catch(F){U.IsWorkerEnabled=!1,console.log("Could not create Worker",F)}return U}return(0,G.__extends)(B,k),B.prototype.reset=function(){return k.prototype.reset.call(this),this.setServiceUrlVersion(B.Version),this},B.prototype.setAuthInfo=function(k){this._authInfo=k},B.prototype.getUserID=function(){var k,B;return null!==(B=null===(k=this._authInfo)||void 0===k?void 0:k.userID)&&void 0!==B?B:0},B.prototype.getIdentityToken=function(){var k,B;return null!==(B=null===(k=this._authInfo)||void 0===k?void 0:k.identityToken)&&void 0!==B?B:""},B.prototype.setIdentityToken=function(k){this._authInfo&&(this._authInfo.identityToken=k)},B.prototype.getRefreshToken=function(){var k,B;return null!==(B=null===(k=this._authInfo)||void 0===k?void 0:k.refreshToken)&&void 0!==B?B:""},B.prototype.setRefreshToken=function(k){this._authInfo&&(this._authInfo.refreshToken=k)},B.prototype.getAuthToken=function(){var k,B;return null!==(B=null===(k=this._authInfo)||void 0===k?void 0:k.authToken)&&void 0!==B?B:""},B.prototype.getPremises=function(){var k,B;return null!==(B=null===(k=this._authInfo)||void 0===k?void 0:k.premises)&&void 0!==B?B:""},B.prototype.setIdentityUri=function(k){this._identityUri=k},B.prototype.getIdentityUri=function(){return this._identityUri},B.prototype.getTimeToExpireMS=function(k){var U=k.exp,F=k.iat;if(!U||0===F&&isNaN(F))return B.TimeToExpireDefaultMS;var G=1e3*(U-F);return Math.max(G-B.TokenExpiryTimeOffsetMS,B.TokenExpiryTimeOffsetMS)},B.prototype.handleRequestError=function(k,B,U){var F,G,j,V;if(k instanceof $.CatalystSdkError)return 412===k.httpStatus&&(null===(G=(F=this._callbacks).onPreconditionFailed)||void 0===G||G.call(F,k)),k;if(k instanceof TypeError&&k.message.includes("Failed to fetch"))return new $.CatalystSdkError(H.EErrorCode.ConnectionFail,B,"Network error: Failed to fetch ".concat(U));if(k&&"object"==typeof k&&"status"in k){var W=k,q=W.message||W.statusText||"Request to ".concat(U," failed"),K=$.CatalystSdkError.fromHttpStatus(W.status,q,B);return 412===W.status&&(null===(V=(j=this._callbacks).onPreconditionFailed)||void 0===V||V.call(j,K)),K}return new $.CatalystSdkError(H.EErrorCode.Unknown,B,"Unknown error: ".concat($.CatalystSdkError.stringify(k)))},B.prototype.login=function(k){var U,j;return(0,G.__awaiter)(this,void 0,void 0,(function(){var $,H,V,W,K,z;return(0,G.__generator)(this,(function(Y){switch(Y.label){case 0:H=this.getRequestURL(F.Login),V=null;try{V=null!==(U=this.getSessionCodeFromUrl())&&void 0!==U?U:window.localStorage.getItem(B.SessionCodeKey)}catch(Q){console.log("error getting session code from local storage",Q)}W={metadata:{}},V&&(W.code=V),k&&(W.metadata=(0,G.__assign)({},k)),(K=null!==(j=localStorage.getItem("ajs_anonymous_id"))&&void 0!==j?j:void 0)&&(W.metadata.anonymousID=K),Y.label=1;case 1:return Y.trys.push([1,3,,4]),this._request.useCredentials(),[4,this.request(q.EHttpRequestType.POST,H,W)];case 2:return $=Y.sent(),[3,4];case 3:throw z=Y.sent(),this.handleRequestError(z,"LoginError",H);case 4:return this.processTokenResponse($,H),[2,$]}}))}))},B.prototype.logout=function(){var k,B;this.clearRenewTimer(this._renewJWTTimerID),this.clearRenewTimer(this._renewIdentityTimerID),this.IsWorkerEnabled?this._worker.terminate():(this._renewIdentityTimerID=null,this._renewJWTTimerID=null),j.forget(),this._authInfo=null,null===(B=(k=this._callbacks).onLogout)||void 0===B||B.call(k)},B.prototype.isLoggedIn=function(){var k=j.remember();return this.isValid(k)},B.prototype.setSession=function(){var k,B;return(0,G.__awaiter)(this,void 0,void 0,(function(){var U,j,V,K,z,Y;return(0,G.__generator)(this,(function(G){switch(G.label){case 0:if(!this._authInfo)throw new $.CatalystSdkError(H.EErrorCode.Unknown,"AuthHandler.setSession()","setSession() called without authInfo");j=this.getRequestRetryOptions(),V=this.getRequestURL(F.SetSession),K={client_id:W.CommonInfo.ClientID,identity_uri:this.getIdentityUri(),identity_token:this.getIdentityToken(),refresh_token:this.getRefreshToken(),profile:{premises:this.getPremises()}},G.label=1;case 1:return G.trys.push([1,3,,4]),[4,this.setServiceUrlVersion("v1").setRetryOption(j).request(q.EHttpRequestType.POST,V,K)];case 2:return U=G.sent(),[3,4];case 3:throw z=G.sent(),this.handleRequestError(z,"SetSessionError",V);case 4:if(!(null==U?void 0:U.isOK()))throw(Y=$.CatalystSdkError.fromHttpStatus((null==U?void 0:U.status)||0,"Call to ".concat(V," failed"),"SetSessionError")).isPreconditionFailed()&&(null===(B=(k=this._callbacks).onPreconditionFailed)||void 0===B||B.call(k,Y)),Y;return[2,U]}}))}))},B.prototype.renewJWT=function(){var k,B;return(0,G.__awaiter)(this,void 0,void 0,(function(){var U,V,W,K,z,Y,Q,X,Z;return(0,G.__generator)(this,(function(G){switch(G.label){case 0:this.clearRenewTimer(this._renewJWTTimerID),G.label=1;case 1:if(G.trys.push([1,6,,7]),!this._authInfo)throw new $.CatalystSdkError(H.EErrorCode.Unknown,"AuthHandler.renewJWT()","renewJWT() is called without authInfo");U=void 0,V=this._authInfo,W=V.userID,K=V.authToken,this.setServiceUrlVersion("v2"),z=this.getRequestURL("".concat(F.RenewJWT,"/").concat(W)),G.label=2;case 2:return G.trys.push([2,4,,5]),Y=this.getRequestRetryOptions(),[4,this.setRetryOption(Y).request(q.EHttpRequestType.POST,z,{token:K})];case 3:return U=G.sent(),[3,5];case 4:throw Q=G.sent(),this.handleRequestError(Q,"RenewJWTError",z);case 5:return this.processTokenResponse(U,z),[3,7];case 6:throw X=G.sent(),j.forget(),Z=X instanceof $.CatalystSdkError?X:this.handleRequestError(X,"RenewJWTError","renewJWT"),null===(B=(k=this._callbacks).onRenewJWTError)||void 0===B||B.call(k,Z),X;case 7:return[2]}}))}))},B.prototype.renewIdentityJWT=function(){var k,B;return(0,G.__awaiter)(this,void 0,void 0,(function(){var U,F,j,H,V,W,K,z;return(0,G.__generator)(this,(function(G){switch(G.label){case 0:this.clearRenewTimer(this._renewIdentityTimerID),this.IsWorkerEnabled||(this._renewIdentityTimerID=null),G.label=1;case 1:G.trys.push([1,6,,7]),U=void 0,F=this.getIdentityTokenRenewalRequest(),j=F.url,H=F.params,j.searchParams.append("version","1"),G.label=2;case 2:return G.trys.push([2,4,,5]),V=this.getRequestRetryOptions(),[4,this.request(q.EHttpRequestType.POST,j.toString(),{},V,H)];case 3:return U=G.sent(),[3,5];case 4:throw W=G.sent(),this.handleRequestError(W,"RenewIdentityJWTError",j.toString());case 5:return this.processIdentityResponse(U),[3,7];case 6:throw K=G.sent(),z=K instanceof $.CatalystSdkError?K:this.handleRequestError(K,"RenewIdentityJWTError","renewIdentityJWT"),null===(B=(k=this._callbacks).onRenewJWTError)||void 0===B||B.call(k,z),K;case 7:return[2]}}))}))},B.prototype.getRequestRetryOptions=function(){return{retryCount:10,retryIncreamentMS:2e3,retryMaxDelayMS:B.TokenExpiryTimeOffsetMS}},B.prototype.setServiceUrlVersion=function(B){return k.prototype.setVersion.call(this,B),this._serviceURL="".concat(W.CommonInfo.ServiceRootURL,"/game-cortex-server/").concat(this.getVersion(),"/"),this},B.prototype.getRequestURL=function(k){return"".concat(this._serviceURL).concat(k)},B.prototype.getJWT=function(){var k,B;return null!==(B=null===(k=this._authInfo)||void 0===k?void 0:k.token)&&void 0!==B?B:""},B.prototype.validateAndExtractJWT=function(k){var B=j.read(k);if(this.isValid(B))return B;throw new $.CatalystSdkError(H.EErrorCode.Unknown,"AuthHandler.processJWT()","jwtSessions is invalid")},B.prototype.setGameJWT=function(k){var B,U,G,$;if(!k.data.token)return!1;try{var H=this.validateAndExtractJWT(k.data.token),V=H.claim;j.keep(H);var W=this.getUserID(),q={userID:W,token:this.getAuthToken()};this.setServiceUrlVersion("v2");var K=this.getRequestURL("".concat(F.RenewJWT,"/").concat(W));return this.IsWorkerEnabled?this.setRenewJWTTimer(V):this._renewJWTTimerID=this.setRenewJWTTimerWithSetInterval(V,q,K,this._renewJWTTimerID,void 0),null===(U=(B=this._callbacks).onSetJWT)||void 0===U||U.call(B,"Bearer ".concat(k.data.token)),!0}catch(z){return null===($=(G=this._callbacks).onSetJWTError)||void 0===$||$.call(G,z),!1}},B.prototype.getGameJWT=function(){return j.get()},B.prototype.processTokenResponse=function(k,U){var F,G;if(!(null==k?void 0:k.isOK())){var j=$.CatalystSdkError.fromHttpStatus((null==k?void 0:k.status)||0,"Call to ".concat(U," failed with status ").concat(null==k?void 0:k.status),"processTokenResponse");throw 412===(null==k?void 0:k.status)&&(null===(G=(F=this._callbacks).onPreconditionFailed)||void 0===G||G.call(F,j)),j}if(!this.setGameJWT(k))throw new $.CatalystSdkError(H.EErrorCode.RequestError,"Failed to set JWT ".concat(k.data.token));if(void 0!==k.data.userID){var V=k;this.setAuthInfo(V.data),W.CommonInfo.setToken(B.TokenKeyUserID,"".concat(V.data.userID),{header:!1,body:!0}),W.CommonInfo.IdentityClientId=V.data.identityClientId,this.setIdentityUri(V.data.identityUri),this.setIdentityJWT(V.data.identityToken)}},B.prototype.setIdentityJWT=function(k){if(!k)return!1;try{var U=this.validateAndExtractJWT(k).claim;W.CommonInfo.setToken(B.TokenKeyIdentity,k,{header:!1,body:!1});var F=this.getTimeToExpireMS(U);return this.IsWorkerEnabled?this._worker.postMessage({message:"setIdentityJWT",expireTime:F,timerId:this._renewIdentityTimerID}):this._renewIdentityTimerID=window.setTimeout(this.renewIdentityJWT.bind(this),F),!0}catch(G){return!1}},B.prototype.getIdentityTokenRenewalRequest=function(){var k={client_id:W.CommonInfo.IdentityClientId,grant_type:B.IdentityRefreshTokenGrantType,refresh_token:this.getRefreshToken()},U=new URL("".concat(this.getIdentityUri()).concat(F.RenewIdentity)),G=new URLSearchParams;return G.append("client_id",k.client_id),G.append("refresh_token",k.refresh_token),G.append("grant_type",k.grant_type),{url:U,params:G}},B.prototype.processIdentityResponse=function(k){var B,U;if(!(null==k?void 0:k.isOK()))throw new $.CatalystSdkError(H.EErrorCode.RequestError,"Call to set identityJWT with status ".concat(null==k?void 0:k.status),$.CatalystSdkError.stringify(k));this.setIdentityJWT(k.data.access_token)&&(this.setRefreshToken(k.data.refresh_token),this.setIdentityToken(k.data.access_token),null===(U=(B=this._callbacks).onSetIdentityJWT)||void 0===U||U.call(B,k.data.access_token))},B.prototype.setRenewJWTTimer=function(k){var B=this.getTimeToExpireMS(k);return this._worker.postMessage({message:"setRenewJWT",expireTime:B,timerId:this._renewJWTTimerID}),!0},B.prototype.setRenewJWTTimerWithSetInterval=function(k,B,U,F,G){var j=this,$=this.getTimeToExpireMS(k);return window.setTimeout((function(){return j.renewJWT()}),$)},B.prototype.clearRenewTimer=function(k){k&&window.clearTimeout(k)},B.prototype.isValid=function(k){var B=null==k?void 0:k.claim;if(void 0!==B&&0!==B.iat&&!isNaN(B.iat)){var U=B.iat/1e3,F=!B.exp||B.exp>U,G=!B.nbf||B.nbf{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.createServiceWorker=void 0;var F=U(32943),G=U(27596);B.createServiceWorker=function(k){try{var B=new Blob(["\nonmessage = function (event) {\n if (event && event.data) {\n var message = event.data.message;\n if (message === 'setRenewJWT' || message === 'setIdentityJWT') {\n var expireTime = event.data.expireTime;\n var timerIdEvent = event.data.timerId;\n \n \n var initTimer = function (message, expireTime) {\n var timerId = self.setInterval(function () {\n var obj = {message, command: 'timer-started'}\n postMessage(obj);\n }, expireTime)\n postMessage({ timerId, message, command: 'timer-init' });\n }\n if(timerIdEvent && timerIdEvent >= 0) {\n self.clearInterval(timerIdEvent);\n }\n \n initTimer(message, expireTime);\n }\n }\n }"],{type:"application/javascript"}),U=URL.createObjectURL(B);return new Worker(U,{name:k})}catch(e){throw new F.CatalystSdkError(G.EErrorCode.Unknown,"Could not create Worker",F.CatalystSdkError.stringify(e))}}},22042:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},56230:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(95912);(0,F.__exportStar)(U(79140),B),(0,F.__exportStar)(U(33770),B),(0,F.__exportStar)(U(22042),B)},95912:(k,B,U)=>{"use strict";U.r(B),U.d(B,{__assign:()=>j,__asyncDelegator:()=>st,__asyncGenerator:()=>it,__asyncValues:()=>nt,__await:()=>et,__awaiter:()=>q,__classPrivateFieldGet:()=>ct,__classPrivateFieldSet:()=>dt,__createBinding:()=>z,__decorate:()=>H,__exportStar:()=>Y,__extends:()=>G,__generator:()=>K,__importDefault:()=>ht,__importStar:()=>ot,__makeTemplateObject:()=>at,__metadata:()=>W,__param:()=>V,__read:()=>X,__rest:()=>$,__spread:()=>Z,__spreadArray:()=>tt,__spreadArrays:()=>J,__values:()=>Q});var F=function(k,B){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,B){k.__proto__=B}||function(k,B){for(var U in B)Object.prototype.hasOwnProperty.call(B,U)&&(k[U]=B[U])})(k,B)};function G(k,B){if("function"!=typeof B&&null!==B)throw new TypeError("Class extends value "+String(B)+" is not a constructor or null");function U(){this.constructor=k}F(k,B),k.prototype=null===B?Object.create(B):(U.prototype=B.prototype,new U)}var j=function(){return(j=Object.assign||function(k){for(var B,U=1,F=arguments.length;U=0;H--)(G=k[H])&&($=(j<3?G($):j>3?G(B,U,$):G(B,U))||$);return j>3&&$&&Object.defineProperty(B,U,$),$}function V(k,B){return function(U,F){B(U,F,k)}}function W(k,B){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,B)}function q(k,B,U,F){return new(U||(U=Promise))((function(G,j){function $(k){try{V(F.next(k))}catch(e){j(e)}}function H(k){try{V(F.throw(k))}catch(e){j(e)}}function V(k){var B;k.done?G(k.value):(B=k.value,B instanceof U?B:new U((function(k){k(B)}))).then($,H)}V((F=F.apply(k,B||[])).next())}))}function K(k,B){var U,F,G,j,$={label:0,sent:function(){if(1&G[0])throw G[1];return G[1]},trys:[],ops:[]};return j={next:H(0),throw:H(1),return:H(2)},"function"==typeof Symbol&&(j[Symbol.iterator]=function(){return this}),j;function H(j){return function(H){return function(j){if(U)throw new TypeError("Generator is already executing.");for(;$;)try{if(U=1,F&&(G=2&j[0]?F.return:j[0]?F.throw||((G=F.return)&&G.call(F),0):F.next)&&!(G=G.call(F,j[1])).done)return G;switch(F=0,G&&(j=[2&j[0],G.value]),j[0]){case 0:case 1:G=j;break;case 4:return $.label++,{value:j[1],done:!1};case 5:$.label++,F=j[1],j=[0];continue;case 7:j=$.ops.pop(),$.trys.pop();continue;default:if(!(G=$.trys,(G=G.length>0&&G[G.length-1])||6!==j[0]&&2!==j[0])){$=0;continue}if(3===j[0]&&(!G||j[1]>G[0]&&j[1]=k.length&&(k=void 0),{value:k&&k[F++],done:!k}}};throw new TypeError(B?"Object is not iterable.":"Symbol.iterator is not defined.")}function X(k,B){var U="function"==typeof Symbol&&k[Symbol.iterator];if(!U)return k;var F,G,j=U.call(k),$=[];try{for(;(void 0===B||B-- >0)&&!(F=j.next()).done;)$.push(F.value)}catch(H){G={error:H}}finally{try{F&&!F.done&&(U=j.return)&&U.call(j)}finally{if(G)throw G.error}}return $}function Z(){for(var k=[],B=0;B1||H(k,B)}))})}function H(k,B){try{(U=G[k](B)).value instanceof et?Promise.resolve(U.value.v).then(V,W):q(j[0][2],U)}catch(e){q(j[0][3],e)}var U}function V(k){H("next",k)}function W(k){H("throw",k)}function q(k,B){k(B),j.shift(),j.length&&H(j[0][0],j[0][1])}}function st(k){var B,U;return B={},F("next"),F("throw",(function(k){throw k})),F("return"),B[Symbol.iterator]=function(){return this},B;function F(F,G){B[F]=k[F]?function(B){return(U=!U)?{value:et(k[F](B)),done:"return"===F}:G?G(B):B}:G}}function nt(k){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var B,U=k[Symbol.asyncIterator];return U?U.call(k):(k=Q(k),B={},F("next"),F("throw"),F("return"),B[Symbol.asyncIterator]=function(){return this},B);function F(U){B[U]=k[U]&&function(B){return new Promise((function(F,G){(function(k,B,U,F){Promise.resolve(F).then((function(B){k({value:B,done:U})}),B)})(F,G,(B=k[U](B)).done,B.value)}))}}}function at(k,B){return Object.defineProperty?Object.defineProperty(k,"raw",{value:B}):k.raw=B,k}var rt=Object.create?function(k,B){Object.defineProperty(k,"default",{enumerable:!0,value:B})}:function(k,B){k.default=B};function ot(k){if(k&&k.__esModule)return k;var B={};if(null!=k)for(var U in k)"default"!==U&&Object.prototype.hasOwnProperty.call(k,U)&&z(B,k,U);return rt(B,k),B}function ht(k){return k&&k.__esModule?k:{default:k}}function ct(k,B,U,F){if("a"===U&&!F)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof B?k!==B||!F:!B.has(k))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===U?F:"a"===U?F.call(k):F?F.value:B.get(k)}function dt(k,B,U,F,G){if("m"===F)throw new TypeError("Private method is not writable");if("a"===F&&!G)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof B?k!==B||!G:!B.has(k))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===F?G.call(k,U):G?G.value=U:B.set(k,U),U}},57530:(k,B,U)=>{"use strict";U.d(B,{i:()=>K});var F=U(8674),G=U(68910),j=U(64527),$=U(823),H=U(40794),V=U(15740),W=U(61806),q=U(43501);class K extends H.u{static get main(){return K._main}get viewportSize(){return this._viewportSize}get cameraMatrixID(){return this.recalculateViewMatrix(),this._transformWorldID}get viewMatrix(){return this.recalculateViewMatrix(),this._cameraMatrix}constructor(){super(),this.onViewportChanged=new V.H,this._viewportSize=new j.o(W.W.instance.game.world.width,W.W.instance.game.world.height),this._cameraMatrix=new G.Matrix,this._transformWorldID=-1,this._attachedTransform=null,K._main||(K._main=this)}create(){super.create(),this.GameObject.transform?this.attachToTransform():this.GameObject.onComponentAdded.add(this.componentWasAdded,this)}destroy(){K._main===this&&(K._main=null),this.GameObject.transform&&this.GameObject.transform.OnDestroy.remove(this.transformDestroyed,this),this.GameObject.onComponentAdded.remove(this.componentWasAdded,this),this.onViewportChanged.dispose(),super.destroy()}reset(){const k=this.GameObject.transform;k.setPosition(0,0),k.setScale(1,1),k.setRotation(0)}setViewportSize(k,B){if(this._viewportSize.setTo(k,B),this._attachedTransform){this._attachedTransform.pixiTransform._worldID++}this.onViewportChanged.dispatch()}setCameraActive(k,B){const U=B.projection;k!==(U.transform===this._cameraMatrix)&&(B.batch.flush(),U.transform=k?this.viewMatrix:null,U.update(U.destinationFrame,U.sourceFrame,B.resolution,!B.renderTexture.current))}attachToTransform(){null===this._attachedTransform&&(this._attachedTransform=this.GameObject.transform,this._attachedTransform.OnDestroy.add(this.transformDestroyed,this))}transformDestroyed(){this._cameraMatrix.identity(),this._attachedTransform=null}componentWasAdded(k){k instanceof q.d&&(this.GameObject.onComponentAdded.remove(this.componentWasAdded,this),this.attachToTransform())}}(0,F.Cg)([(0,$.oB)(),(0,F.Sn)("design:type",j.o)],K.prototype,"_viewportSize",void 0)},40794:(k,B,U)=>{"use strict";U.d(B,{X:()=>W,u:()=>q});var F,G=U(8674),j=U(79687),$=U(32154),H=U(15740),V=U(89683);const W={};let q=F=class{constructor(){this.gameObject=null,this.updateFunction=this.firstUpdate,this.onActiveChanged=new H.H,this.onDestroy=new H.H,this.isActive=!0,this._isCreated=!1}get GameObject(){return this.gameObject}set GameObject(k){!$.A.isDefined(this.gameObject)&&$.A.isDefined(k)&&(this.gameObject=k,V.G.addObject(this))}get OnActiveChanged(){return this.onActiveChanged}get IsActiveInHierarchy(){return this.Active&&Boolean(this.GameObject)&&this.GameObject.activeInHierarchy}get OnDestroy(){return this.onDestroy}get Active(){return this.isActive}set Active(k){this.isActive!==k&&(this.isActive=k,k?this.onEnable():this.onDisable(),this.onActiveChanged.dispatch())}get isCreated(){return this._isCreated}create(){this._isCreated=!0,this.registerComponent()}postCreate(){}firstUpdate(){this.updateFunction=this.update,this.update()}update(){}onEnable(){}onDisable(){}static customSerialize(k,B,U){}customDeserialize(k){}preDeserialize(k){}postDeserialize(){}destroy(){V.G.removeObject(this),this.isActive&&this.onDisable(),this.onActiveChanged.dispose(),this.onDestroy.dispatch(this),this.onDestroy.dispose(),this.unregisterComponent(),this.gameObject=null}getInjectedValue(k){return U(78178).U.getInjectedValue(this.gameObject,k)}registerComponent(){if(!F._enableRegistry)return;const k=this.constructor.name;F._componentRegistry.has(k)||F._componentRegistry.set(k,new Set),F._componentRegistry.get(k).add(this)}unregisterComponent(){const k=this.constructor.name,B=F._componentRegistry.get(k);null==B||B.delete(this)}static getComponents(k){const B=k.name,U=F._componentRegistry.get(B);return U?Array.from(U):[]}static getComponentsByString(k){return F.getComponents(W[k])}static toggleComponentRegistryStatus(k){F._enableRegistry=k}};q._enableRegistry=!1,q._componentRegistry=new Map,q=F=(0,G.Cg)([(0,j.injectable)()],q)},29658:(k,B,U)=>{"use strict";U.d(B,{EV:()=>j,S1:()=>V,YH:()=>H,s0:()=>$});var F=U(40794),G=U(49769);const j=(k,B,U)=>j=>{F.X[k]=j,F.X[k].alias=k,G.Er[G.ml.PATHS]||(G.Er[G.ml.PATHS]={},G.Er[G.ml.TOOL_TIPS]={}),G.Er[G.ml.PATHS][k]=B,G.Er[G.ml.TOOL_TIPS][k]=U},$=k=>B=>{G.oD[k]=B};var H;!function(k){k.root="",k.animation="Animation",k.filter="Filter",k.injection="Injection",k.input="Input",k.map="Map",k.motion="Motion",k.primitive="Primitive",k.physics="Physics",k.render="Render",k.saving="Saving",k.streaming="Streaming",k.tiled="Tiled",k.transform="Transform",k.transition="Transition",k.ui="UI",k.uiLayout="UI/Layout"}(H||(H={}));const V=()=>k=>{-1===G.Jr.indexOf(k.name)&&G.Jr.push(k.name)}},49769:(k,B,U)=>{"use strict";var F;U.d(B,{Bk:()=>$,EL:()=>j,Er:()=>G,Jr:()=>V,ml:()=>F,oD:()=>H}),function(k){k[k.PATHS=0]="PATHS",k[k.TOOL_TIPS=1]="TOOL_TIPS"}(F||(F={}));const G={},j={},$={},H={},V=[]},53924:(k,B,U)=>{"use strict";U.d(B,{W:()=>G,a:()=>j});var F=U(49769);function G(k){return B=>{F.EL[B.name]=k}}function j(k){return B=>{F.Bk[k]=B}}},82538:(k,B,U)=>{"use strict";var F;U.d(B,{e:()=>F}),function(k){k.Vertical="vertical",k.Horizontal="horizontal"}(F||(F={}))},83793:(k,B,U)=>{"use strict";U.d(B,{G:()=>G});const F="custom:annotations:editorFunctions",G=()=>(k,B)=>{let U=[B];if(Reflect.hasMetadata(F,k.constructor)){const G=Reflect.getMetadata(F,k.constructor);if(G.indexOf(B)>=0)return;U=G.concat(U)}Reflect.defineMetadata(F,U,k.constructor)}},55366:(k,B,U)=>{"use strict";U.d(B,{Y:()=>H});var F=U(8674),G=U(79687),j=U(80267),$=U(5191);let H=class{get frameTimeElapsed(){return this._now()-this._frameStartTime}get frameBudgetRemaining(){return this.frameBudget-this.frameTimeElapsed}constructor(k){this._frameStartTime=0,this._frameWorkDone=!1,this._workPromises=[],this.frameBudget=k,"undefined"!=typeof performance&&"function"==typeof performance.now?this._now=performance.now.bind(performance):"function"==typeof Date.now?this._now=Date.now.bind(Date):"function"==typeof Date.prototype.getTime?this._now=()=>(new Date).getTime():(this._now=()=>0,j.V.log("FrameWorkManager: None of the expected timing functions are available",$.$.Error))}markFrameStart(){this._frameStartTime=this._now(),this._frameWorkDone=!1}markFrameEnd(){for(;this._workPromises.length>0&&(this.frameBudgetRemaining>0||!this._frameWorkDone);)this._frameWorkDone=!0,this._workPromises[0][0]()&&this._workPromises.shift()}flushWorkQueue(){for(;this._workPromises.length>0;)this._frameWorkDone=!0,this._workPromises[0][0]()&&this._workPromises.shift()}cancelWork(){var k;for(const B of this._workPromises)null===(k=B[1])||void 0===k||k.call(B);this._workPromises=[]}awaitFreeTime(k,B){this._workPromises.push([k,B]),1===this._workPromises.length&&this.markFrameEnd()}};H=(0,F.Cg)([(0,G.injectable)(),(0,F.Sn)("design:paramtypes",[Number])],H)},61806:(k,B,U)=>{"use strict";U.d(B,{W:()=>F});class F{static get instance(){return this._instance}get game(){return this._game}constructor(k,B,U){this.prefabLoaderInstance=null,this.getWorkerURL=null,F._instance||(F._instance=this),this._game=k,this.loader=B,this.prefabLoaderInstance=U}destroy(){F._instance=null,this._game=null}}},42979:(k,B,U)=>{"use strict";U.d(B,{Z:()=>ht});var F=U(68910),G=U(36361),j=U(57530);class ${constructor(){this._cameraColliders=[]}get cameraColliders(){return this._cameraColliders}addCollider(k){this._cameraColliders.push({collider:k,bounds:this.getColliderBounds(k)})}removeCollider(k){const B=this._cameraColliders.length,U=this._cameraColliders.findIndex((B=>B.collider===k));return U>-1&&this._cameraColliders.splice(U,1),this._cameraColliders.lengthB.collider===k));B&&(B.bounds=this.getColliderBounds(k))}getColliderBounds(k){var B,U,G;const $=j.i.main.viewportSize,H=k.getBounds(),V=null!==(G=null===(U=null===(B=k.GameObject.parent)||void 0===B?void 0:B.transform)||void 0===U?void 0:U.worldMatrix)&&void 0!==G?G:F.Matrix.IDENTITY,W=k.GameObject.transform.worldScale,q=new F.Matrix(1/W.x,0,0,1/W.y,0,0).append(V),K=q.apply({x:H.left-$.getHalfWidth(),y:H.top-$.getHalfHeight()}),z=q.apply({x:H.right+$.getHalfWidth(),y:H.bottom+$.getHalfHeight()});return H.left=K.x,H.top=K.y,H.right=z.x,H.bottom=z.y,H}}var H=U(6686),V=U(32154),W=U(61806);class q{constructor(){this._queue=null,this._maxDeletesPerFrame=500,this._queue=new Set}processDestroyQueue(){let k=0;const B=[...this._queue];for(;this._queue.size>0&&k-1){const B=[`\n %c %c %c PixiJS ${F.VERSION} - ✰ renderType: ${k} ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n`,"background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log(...B)}else window.console&&window.console.log(`PixiJS ${F.VERSION} - ${k} - http://www.pixijs.com/`)}destroy(){var k;null===(k=this._device)||void 0===k||k.cleanUp(),this._onPause.dispose(),this._onResume.dispose(),this.state.destroy(),this.sound.destroy(),this.stage.destroy(),this.tweens.destroy(),this._time.removeAll(),this._destroyQueue.destroy(),this._rootContainer.unbindAll(),this._state=null,this._sound=null,this._stage=null,this._tweens=null,this._cache=null,this._load=null,this._time=null,this._cameraCollisions=null,this._destroyQueue=null,this._rootContainer=null,this._app.ticker.remove(this.update,this),this.app.destroy(!0),this.isBooted=!1}pauseGame(k){k?(this._paused||(this._paused=k,this._sound.muteOnPause&&this._sound.setMute(),this._time.gamePaused(),this.onPause.dispatch()),this._pausedByCode=!0):(this._paused&&(this._paused=k,this._sound.unsetMute(),this._time.gameResumed(),this.onResume.dispatch()),this._pausedByCode=!1)}gamePaused(k){this._paused||(this._paused=!0,this.time.gamePaused(),this.sound.muteOnPause&&this.sound.setMute(),this.onPause.dispatch(k))}gameResumed(k){this._paused&&(this._paused=!1,this.time.gameResumed(),this.sound.muteOnPause&&this.sound.unsetMute(),this.onResume.dispatch(k))}focusLoss(k){this.stage.disableVisibilityChange||this.gamePaused(k)}focusGain(k){window.focus&&window.focus(),this.stage.disableVisibilityChange||this.gameResumed(k)}createApp(k,B){let U;F.settings.ROUND_PIXELS=!!V.A.isDefined(k.roundPixels)&&k.roundPixels,F.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!V.A.isDefined(k.failIfMajorPerformanceCaveat)||k.failIfMajorPerformanceCaveat,F.settings.SCALE_MODE=B.antialias?F.SCALE_MODES.LINEAR:F.SCALE_MODES.NEAREST,void 0!==B.filterResolution&&(F.settings.FILTER_RESOLUTION=B.filterResolution),this._width=V.A.isDefined(k.width)?k.width:ht.DEFAULT_WIDTH,this._height=V.A.isDefined(k.height)?k.height:ht.DEFAULT_HEIGHT,this._app=new F.Application({width:this._width,height:this._height,view:document.createElement("canvas"),autoStart:!!B.autoStart&&B.autoStart,autoDensity:!B.autoDensity||B.autoDensity,preserveDrawingBuffer:B.preserveDrawingBuffer,antialias:B.antialias,backgroundAlpha:B.backgroundAlpha,sharedTicker:!B.sharedTicker||B.sharedTicker,resolution:B.resolution,forceCanvas:B.forceCanvas,backgroundColor:B.backgroundColor,clearBeforeRender:B.clearBeforeRender,powerPreference:B.powerPreference,resizeTo:B.resizeTo}),F.TextMetrics.nextLineHeightBehavior=!1,U=V.A.isDefined(k.parent)?k.parent instanceof HTMLElement?k.parent:document.getElementById(k.parent):document.createElement("div"),rt.D.addToDOM(this.canvas,U),F.Texture.addToCache=(k,B)=>{},F.BaseTexture.addToCache=(k,B)=>{},F.Texture.removeFromCache=k=>null,F.BaseTexture.removeFromCache=k=>null}createSystems(){this._add=new K.W(this),this._sound=new X.x(this),this._load=new tt.a,this._cache=new J.l(this),this._time=new nt.g(this),this._device=new at.p,this._state=new st.f(null),this._tweens=new Q.$(this),this._rnd=new et.b,this._cameraCollisions=new $,this._destroyQueue=new q,this._rootContainer=new G.r(null),this._triggerSystem=new H.G,this._useElaNavMeshSystem?this._navMeshSystem=new Y.s:this._navMeshSystem=new z.k}bootSystems(){this._time.boot(),this._sound.boot()}}ht.DEFAULT_WIDTH=1280,ht.DEFAULT_HEIGHT=720,ht.DEFAULT_FPS=60,ht.DEFAULT_SPF=1/ht.DEFAULT_FPS},27780:(k,B,U)=>{"use strict";U.d(B,{_:()=>Q});var F=U(95891),G=U(5191),j=U(80267),$=U(87987),H=U(62481),V=U(32154),W=(U(49769),U(61806)),q=U(44716),K=U(43501),z=U(15740),Y=U(89683);class Q{get name(){return this._name}set name(k){this._name=k}get components(){return this._components}get layer(){return this._layer?this._layer:this._parent?this._parent.layer:$.W.DEFAULT_NAME}set layer(k){this.setLayer(k,!1)}set parent(k){this.removeFromParent(),this.setParent(k),k&&k.onChildAdded.dispatch(this)}get parent(){return this._parent}get children(){return this._children}get isMarkedForDestruction(){return this._markedForDestruction}get active(){return this._isActive}set active(k){this._isActive!==k&&(this._isActive=k,this.onActiveChanged.dispatch(),this.activeInHierarchyChanged())}get activeInHierarchy(){return this._isActiveInHierarchy}get legacyTransform(){return null===this._legacyTransform&&(this._legacyTransform=this.findComponent(q.K)),this._legacyTransform}get isDestroyed(){return this._destroyed}get transform(){return null===this._transform&&(this._transform=this.findComponent(K.d)),this._transform}constructor(k=null){this.onActiveChanged=new z.H,this.onActiveInHierarchyChanged=new z.H,this.onHierarchyChanged=new z.H,this.onChildAdded=new z.H,this.onChildRemoved=new z.H,this.onLayerChanged=new z.H,this.onComponentAdded=new z.H,this.onComponentRemoved=new z.H,this.onComponentAddedToHierarchy=new z.H,this.onDestroy=new z.H,this._markedForDestruction=!1,this.updateFunction=this.firstUpdate,this._parent=null,this._isActive=!0,this._components=[],this._children=[],this._isActiveInHierarchy=!0,this._legacyTransform=null,this._transform=null,this._name="",this._destroyed=!1,this.setParent(k),Y.G.addObject(this)}addChild(k){k.removeFromParent(),k.setParent(this),this.onChildAdded.dispatch(k)}addChildAt(k,B){k.removeFromParent(),k.setParent(this,B),this.onChildAdded.dispatch(k)}getRenderOrder(){return this._parent._children.indexOf(this)}isInFront(){const k=this._parent._children;return k[k.length-1]===this}isInBack(){return this._parent._children[0]===this}sendToBack(){const k=this._parent._children.indexOf(this);-1!==k?(this._parent._children.splice(k,1),this._parent._children.unshift(this),this._parent.onHierarchyChanged.dispatch()):j.V.log("Parent did not have this game object in its list of children!",G.$.Error)}setRenderOrder(k){const B=this._parent._children.indexOf(this);-1!==B?(this._parent._children.splice(B,1),this._parent._children.splice(k,0,this),this._parent.onHierarchyChanged.dispatch()):j.V.log("Parent did not have this game object in its list of children!",G.$.Error)}firstUpdate(){this.updateFunction=this.update,this.update()}update(){if(this.activeInHierarchy&&!this._markedForDestruction){for(let k=this._components.length-1;k>=0;--k){const B=this._components[k];B.Active&&B.updateFunction()}for(let k=this._children.length-1;k>=0;--k)this._children[k].updateFunction()}}addComponent(k,B=!0){const U=new k;this._components.push(U),U.GameObject=this,U.OnDestroy.addOnce(this.removeComponent.bind(this)),B&&(U.create(),U.Active&&U.onEnable(),U.postCreate()),this.onComponentAdded.dispatch(U);const F=this._children.length;for(let G=0;GB instanceof k));return V.A.isDefined(B)?B:null}findComponents(k){return this._components.filter((B=>B instanceof k))}hasComponent(k){return V.A.isDefined(this.findComponent(k))}bringToFront(){const k=this._parent._children.indexOf(this);-1!==k?k!==this._parent.children.length-1&&(this._parent._children.splice(k,1),this._parent._children.push(this),this._parent.onHierarchyChanged.dispatch()):j.V.log("Parent did not have this game object in its list of children!",G.$.Error)}destroy(){var k;if(this._destroyed=!0,this.onDestroy.dispatch(),!this._markedForDestruction){for(let B=this._children.length-1;B>=0;--B)null===(k=this._children[B])||void 0===k||k.destroy();this._children.length=0}for(let U=this._components.length-1;U>=0;--U)try{this._components[U].destroy()}catch(B){H.R.logError(B,"Failed to destroy component")}this._components.length=0,this.removeFromParent(),Y.G.removeObject(this),this.onComponentAdded.dispose(),this.onComponentRemoved.dispose(),this.onComponentAddedToHierarchy.dispose(),this.onChildAdded.dispose(),this.onChildRemoved.dispose(),this.onActiveChanged.dispose(),this.onActiveInHierarchyChanged.dispose(),this.onHierarchyChanged.dispose(),this.onDestroy.dispose(),this.onLayerChanged.dispose()}destroyDeferred(){var k;const B=this._children.length;for(let U=0;U=0))return void j.V.log(`index ${B} out-of-bounds of child array length ${k._children.length}`,G.$.Error);k._children.splice(B,0,this)}else k._children.push(this);this._parent=k,this._parent.onActiveInHierarchyChanged.add(this.activeInHierarchyChanged,this),this._parent.onHierarchyChanged.add(this.onHierarchyChanged.dispatch,this.onHierarchyChanged)}this.onHierarchyChanged.dispatch();const U=this.isActiveInHierarchy();U!==this._isActiveInHierarchy&&(this._isActiveInHierarchy=U,this.onActiveInHierarchyChanged.dispatch())}activeInHierarchyChanged(){this._isActiveInHierarchy=this.isActiveInHierarchy();const k=this._components.length;for(let B=0;B{"use strict";U.d(B,{W:()=>H});var F=U(68910),G=U(61806),j=U(16649),$=U(71392);class H{constructor(k){this.game=null,this.stage=null,this.game=k,this.stage=k.stage}existing(k){return this.stage.addChild(k)}tween(k,B,U=!0){return this.game.tweens.create(k,B,U)}audio(k="",B=1,U=!1,F){return this.sound(k,B,U,F)}sound(k="",B=1,U=!1,F){return this.game.sound.add(k,B,U,F)}text(k=0,B=0,U="",G,j=this.stage){const $=new F.Text(U,G);return $.x=k,$.y=B,j.addChild($),$}graphics(k=0,B=0,U=this.stage){const G=new F.Graphics;return G.position.set(k,B),U.addChild(G),G}spine(k,B,U,F){const G=new j.y(U);return G.setToSetupPose(),G.position.x=k,G.position.y=B,F?F.addChild(G):this.game.stage.addChild(G),G}simpleMesh(k){return new F.SimpleMesh(null==k?void 0:k.texture,null==k?void 0:k.vertices,null==k?void 0:k.uvs,null==k?void 0:k.indices,null==k?void 0:k.drawMode)}texture(k,B){return new F.Texture(k,null==B?void 0:B.frame,null==B?void 0:B.orig,null==B?void 0:B.trim,null==B?void 0:B.rotate,null==B?void 0:B.anchor)}container(k,B="container",U=!1){const F=new $.m;return F.name=B,U?(G.W.instance.game.stage.addChild(F),F.zIndex=G.W.instance.game.stage.children.length):k&&(k.addChild(F),F.zIndex=k.children.length),F}sprite(k=0,B=0,U,j,$,H){const V=H||(U?G.W.instance.game.cache.getTexture(U,j):F.Texture.EMPTY),W=new F.Sprite(V);return W.position.set(k,B),$?$.addChild(W):G.W.instance.game.stage.addChild(W),W}renderTexture(k=100,B=100,U,j=!1){const $={width:k,height:B,resolution:1},H=new F.BaseRenderTexture($),V=new F.RenderTexture(H);return j&&G.W.instance.game.cache.addRenderTexture(U||G.W.instance.game.rnd.uuid(),V),V}}},57056:(k,B,U)=>{"use strict";U.d(B,{D:()=>G});var F=U(22494);const G=()=>(k,B)=>{const U="function"==typeof k?k:k.constructor;F.Q.addProperty("custom:annotations:ignoreInEditor",U,B)}},44716:(k,B,U)=>{"use strict";U.d(B,{K:()=>tt});var F=U(8674),G=U(80267),j=U(5191),$=U(15308),H=U(71392);class V extends H.m{constructor(){super(...arguments),this.placeholderBounds=new $.M(0,0,0,0),this._vertexData=new Float32Array([0,0,0,0,0,0,0,0])}set width(k){this.placeholderBounds.width=k,this._vertexData[2]=k,this._vertexData[4]=k}get width(){return this.placeholderBounds.width}set height(k){this.placeholderBounds.height=k,this._vertexData[5]=k,this._vertexData[7]=k}get height(){return this.placeholderBounds.height}_calculateBounds(){this._bounds.addQuad(this._vertexData)}}var W,q=U(32154),K=U(27179),z=U(8490),Y=U(823),Q=U(40794),X=U(29658),Z=U(61806),J=U(53924);let tt=W=class extends Q.u{get group(){return this._group}set RoundRelativeValues(k){this.roundRelativeValues=k}get RoundRelativeValues(){return this.roundRelativeValues}set GameObject(k){!q.A.isDefined(this.GameObject)&&q.A.isDefined(k)&&(this.gameObject=k,k.parent&&k.parent.legacyTransform&&k.parent.legacyTransform.group.addChild(this._group))}get GameObject(){return this.gameObject}set x(k){this.cachedRelativeX=null,this._group.x=k}get x(){return this._group.x}set y(k){this.cachedRelativeY=null,this._group.y=k}get y(){return this._group.y}set relativeX(k){const B=this.GameObject.parent&&this.GameObject.parent.legacyTransform?this.GameObject.parent.legacyTransform.width:0;this.x=W.applyScaleValue(B,k,this.roundRelativeValues),this.cachedRelativeX=k}get relativeX(){let k=0;return q.A.isDefined(this.cachedRelativeX)?k=this.cachedRelativeX:this.GameObject.parent&&this.GameObject.parent.legacyTransform&&(k=W.determineScaleValue(this._group.x,this.GameObject.parent.legacyTransform.width,this.roundRelativeValues)),k}set relativeY(k){const B=this.GameObject.parent&&this.GameObject.parent.legacyTransform?this.GameObject.parent.legacyTransform.height:0;this.y=W.applyScaleValue(B,k,this.roundRelativeValues),this.cachedRelativeY=k}get relativeY(){let k=0;return q.A.isDefined(this.cachedRelativeY)?k=this.cachedRelativeY:this.GameObject.parent&&this.GameObject.parent.legacyTransform&&(k=W.determineScaleValue(this._group.y,this.GameObject.parent.legacyTransform.height,this.roundRelativeValues)),k}set roundedX(k){this.x=Math.round(k)}get roundedX(){return Math.round(this.x)}set roundedY(k){this.y=Math.round(k)}get roundedY(){return Math.round(this.y)}set width(k){this.cachedRelativeWidth=null,this.dimensionPlaceholder&&(this.dimensionPlaceholder.width=k),this._group.width=k,this.updatePivotXFromAnchorX(),this.reapplyChildRelativeValues()}get width(){return this._group.width}set height(k){this.cachedRelativeHeight=null,this.dimensionPlaceholder&&(this.dimensionPlaceholder.height=k),this._group.height=k,this.updatePivotYFromAnchorY(),this.reapplyChildRelativeValues()}get height(){return this._group.height}set relativeWidth(k){const B=this.GameObject.parent&&this.GameObject.parent.legacyTransform?this.GameObject.parent.legacyTransform.width:0;this.width=W.applyScaleValue(B,k,this.roundRelativeValues),this.cachedRelativeWidth=k}get relativeWidth(){let k=0;return q.A.isDefined(this.cachedRelativeWidth)?k=this.cachedRelativeWidth:this.GameObject.parent&&this.GameObject.parent.legacyTransform&&(k=W.determineScaleValue(this.width,this.GameObject.parent.legacyTransform.width,!1)),k}set relativeHeight(k){const B=this.GameObject.parent&&this.GameObject.parent.legacyTransform?this.GameObject.parent.legacyTransform.height:0;this.height=W.applyScaleValue(B,k,this.roundRelativeValues),this.cachedRelativeHeight=k}get relativeHeight(){let k=0;return q.A.isDefined(this.cachedRelativeHeight)?k=this.cachedRelativeHeight:this.GameObject.parent&&this.GameObject.parent.legacyTransform&&(k=W.determineScaleValue(this.height,this.GameObject.parent.legacyTransform.height,!1)),k}set roundedWidth(k){this.width=Math.round(k)}get roundedWidth(){return Math.round(this.width)}set roundedHeight(k){this.height=Math.round(k)}get roundedHeight(){return Math.round(this.height)}set anchorX(k){this.anchor.x=k,this.updatePivotXFromAnchorX()}get anchorX(){return this.anchor.x}set anchorY(k){this.anchor.y=k,this.updatePivotYFromAnchorY()}get anchorY(){return this.anchor.y}set scaleX(k){this._group.scale.x=k}get scaleX(){return this._group.scale.x}set scaleY(k){this._group.scale.y=k}get scaleY(){return this._group.scale.y}customDeserialize(k){this.dimensionPlaceholder||(this.dimensionPlaceholder=this._group.addChild(new V),this.dimensionPlaceholder.name=`${this.GameObject.name}-dimensionalPlaceholder`);const B=k.width;q.A.isDefined(B)&&(this.width=B);const U=k.height;if(q.A.isDefined(U)&&(this.height=U),q.A.isDefined(this.GameObject.parent)){const B=this.GameObject.parent.legacyTransform,U=k.relativeWidth;q.A.isDefined(U)&&(this.dimensionPlaceholder.width=W.applyScaleValue(B?B.width:0,U,this.roundRelativeValues),this.cachedRelativeWidth=U);const F=k.relativeHeight;q.A.isDefined(F)&&(this.dimensionPlaceholder.height=W.applyScaleValue(B?B.height:0,F,this.roundRelativeValues),this.cachedRelativeHeight=F)}const F=k.anchorX;q.A.isDefined(F)&&(this.anchorX=F);const G=k.anchorY;q.A.isDefined(G)&&(this.anchorY=G);const j=k.scaleX;q.A.isDefined(j)&&(this.scaleX=j);const $=k.scaleY;q.A.isDefined($)&&(this.scaleY=$),super.customDeserialize(k)}reapplyChildRelativeValues(){const k=this.GameObject.children;for(let B=0;B{k(),this.GameObject&&!this.GameObject.parent&&this.GameObject.updateFunction()},this.group.visible=this.GameObject.activeInHierarchy}destroy(){this.GameObject.onActiveInHierarchyChanged.remove(this.updateGroupVisibility,this),this.GameObject.onHierarchyChanged.remove(this.updateParentGroup,this),this._group.gameObjectRef=null,super.destroy(),this._group.destroy(),this._group=null}updateGroupVisibility(){this._group&&!this._group.destroyed&&(this._group.visible=this.GameObject.activeInHierarchy,this._group.worldVisible&&this._group.parent?this._group.updateTransform():this._group.worldVisible&&!this._group.parent&&G.V.log("Attempting to update a group that has no parent but is set to visible",j.$.Warning))}updateParentGroup(){this.GameObject.parent&&this.GameObject.parent.legacyTransform?this.GameObject.parent.legacyTransform.group.addChild(this._group):Z.W.instance.game.world.addChild(this._group)}static applyScaleValue(k,B,U){const F=k*B;return W.roundIfNeeded(F,U)}static determineScaleValue(k,B,U){const F=k/B;return W.roundIfNeeded(F,U)}static roundIfNeeded(k,B){return B?Math.round(k):k}};(0,F.Cg)([(0,Y.vk)(),(0,F.Sn)("design:type",Boolean)],tt.prototype,"roundRelativeValues",void 0),(0,F.Cg)([(0,Y.g1)(),(0,F.Sn)("design:type",Number),(0,F.Sn)("design:paramtypes",[Number])],tt.prototype,"x",null),(0,F.Cg)([(0,Y.g1)(),(0,F.Sn)("design:type",Number),(0,F.Sn)("design:paramtypes",[Number])],tt.prototype,"y",null),(0,F.Cg)([(0,Y.g1)(),(0,F.Sn)("design:type",Number),(0,F.Sn)("design:paramtypes",[Number])],tt.prototype,"relativeX",null),(0,F.Cg)([(0,Y.g1)(),(0,F.Sn)("design:type",Number),(0,F.Sn)("design:paramtypes",[Number])],tt.prototype,"relativeY",null),(0,F.Cg)([(0,Y.g1)(),(0,F.Sn)("design:type",Number),(0,F.Sn)("design:paramtypes",[Number])],tt.prototype,"scaleX",null),(0,F.Cg)([(0,Y.g1)(),(0,F.Sn)("design:type",Number),(0,F.Sn)("design:paramtypes",[Number])],tt.prototype,"scaleY",null),tt=W=(0,F.Cg)([(0,X.EV)("LegacyTransform",X.YH.transform,"Works with the position and scale of the game object
    to which it is attached (deprecated)"),(0,J.W)(z.L),(0,F.Sn)("design:paramtypes",[])],tt)},70028:(k,B,U)=>{"use strict";U.d(B,{k:()=>z});var F=U(8674),G=U(68910),j=U(5191),$=U(80267),H=U(2136),V=U(27179),W=U(94341),q=U(15073),K=U(61806);class z{getNavMeshConstructor(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._navMeshConstructorWorker){const k=K.W.instance.getWorkerURL("NavMeshConstructor");this._navMeshConstructorWorker=q.p.createWorker(H.b,k)}return this._navMeshConstructorWorker.start()}))}constructor(){this.navMesh=null,this._blockPolygonIDs=new Map,this._globalPolygonIDs=[],this._navMeshConstructorWorker=null,this._globalWalkableAreas=[],this._globalNonWalkableAreas=[],this._currentStreamedMap=null,this._streamedBlockMeshes=new Map;this.navMesh=new W.L([],0,10)}destroy(){this._navMeshConstructorWorker.stop(),this._navMeshConstructorWorker=null}findPath(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.navMesh){let U=this.navMesh.findPath(k,B);if((null==U?void 0:U.length)>0)return U;if(yield this._currentStreamedMap.loadingPromiseQueueHead,U=this.navMesh.findPath(k,B),(null==U?void 0:U.length)>0)return U;$.V.log(`Failed to find path in navmesh at source ${k} with destination ${B}`,j.$.Error)}return[]}))}addWalkableArea(k){this._globalWalkableAreas.concat(k),this.buildNavMeshFromGlobalPolys().then((k=>{const B=this._globalPolygonIDs;this._globalPolygonIDs=[],this.modifyNavMesh(k,B)})).catch((()=>{$.V.log("Error while building NavMesh from global polys",j.$.Error)}))}addNonWalkableArea(k){for(const U of k)this._globalNonWalkableAreas.push(U);const B=[];for(const U of k){const k=U.GameObject.transform.worldPosition;for(const U of this._streamedBlockMeshes.values())U.block.block.containsPoint(k)&&B.push(U.block)}B.length>0&&this.onStreamedMapBlocksChanged(B,[]),this.buildNavMeshFromGlobalPolys().then((k=>{const B=this._globalPolygonIDs;this._globalPolygonIDs=[],this.modifyNavMesh(k,B)})).catch((()=>{$.V.log("Error while building NavMesh after adding ColliderPolygon",j.$.Error)}))}buildNavMeshFromGlobalPolys(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=[];for(const U of this._globalWalkableAreas)k.push(this.getPolyBoolPoly(U));const B=[];for(const U of this._globalNonWalkableAreas)B.push(this.getPolyBoolPoly(U));return(yield this.getNavMeshConstructor()).constructNavMesh(void 0,k,B)}))}modifyNavMesh(k,B,U){if(B)for(const F of B)this.navMesh.removePolygon(F);if(k){const B=k.regions.map((k=>k.map((k=>new V.I(k[0],k[1])))));for(const k of B)k.length>0&&this._globalPolygonIDs.push(this.navMesh.addPolygon(k))}if(U)for(const F of U){const k=F[0];this._blockPolygonIDs.has(k)&&(this._blockPolygonIDs.get(k).forEach((k=>{this.navMesh.removePolygon(k)})),this._blockPolygonIDs.delete(k));const B=[],U=F[1].regions.map((k=>k.map((k=>new V.I(k[0],k[1])))));for(const F of U)F.length>0&&B.push(this.navMesh.addPolygon(F));B.length>0&&this._blockPolygonIDs.set(F[0],B)}}bindStreamedMap(k){this._currentStreamedMap=k,this._currentStreamedMap.onLoadedBlocksChanged.add(this.onStreamedMapBlocksChanged,this),this._currentStreamedMap.onStreamedBlockChanged.add(this.reloadStreamedBlock,this)}releaseStreamedMap(){if(this._currentStreamedMap){this._currentStreamedMap.onLoadedBlocksChanged.remove(this.onStreamedMapBlocksChanged,this),this._currentStreamedMap.onStreamedBlockChanged.remove(this.reloadStreamedBlock,this),this._currentStreamedMap=null;for(const k of this._blockPolygonIDs)for(const B of k[1])this.navMesh.removePolygon(B);this._blockPolygonIDs.clear(),this._streamedBlockMeshes.clear()}}onStreamedMapBlocksChanged(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){let U=[];for(const k of B)U=U.concat(this.unloadStreamedBlock(k));const F=new Map;for(const B of k){const k=this.generateBlockID(B);this._blockPolygonIDs.has(k)&&(U=U.concat(this.unloadStreamedBlock(B)));const G=B.block,j=Object.assign({block:B},G.getNavData());this._streamedBlockMeshes.set(k,j);for(const B of this._globalNonWalkableAreas)G.containsPoint(B.GameObject.transform.worldPosition)&&j.nonWalkableAreas.push(this.getPolyBoolPoly(B));const $=yield this.constructBlockMesh(j);F.set(k,$)}this.modifyNavMesh(void 0,Array.from(U.values()),F),k.forEach((k=>{k.block.resolveNavMeshConstructionPromise()}))}))}getPolyBoolPoly(k){const B=k.GameObject.transform.worldMatrix,U=new G.Point;return{inverted:!1,regions:[k.points.map((k=>(B.apply(k,U),[U.x,U.y])))]}}constructBlockMesh(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.getNavMeshConstructor(),U=k.block.block.getBoundsPoly();try{return yield B.constructNavMesh(U,k.walkableAreas,k.nonWalkableAreas)}catch(e){$.V.log(`Error while constructing NavMesh for block at ${JSON.stringify(k.block.block)} ${e}`,j.$.Error)}}))}unloadStreamedBlock(k){const B=this.generateBlockID(k);let U=[];return this._streamedBlockMeshes.delete(B),this._blockPolygonIDs.has(B)&&(U=this._blockPolygonIDs.get(B),this._blockPolygonIDs.delete(B)),U}reloadStreamedBlock(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.onStreamedMapBlocksChanged([k],[k])}))}generateBlockID(k){const B=k.x,U=k.y;return(B+U)*(B+U+1)*.5+U}}},8460:(k,B,U)=>{"use strict";U.d(B,{s:()=>Q});var F=U(8674),G=U(80267),j=U(5191),$=U(12915);class H{constructNavMesh(k,B,U){try{if(!k||k.length<=0)return[];const F=this.convertToPolyBoolPoly(k);let G=$.segments(F[0]);const j=F.length;for(let k=1;k({regions:[k.map((k=>[k.x,k.y]))],inverted:!1})))}}var V,W=U(94341),q=U(15073),K=U(15740),z=U(39002),Y=U(61806);!function(k){k.Walkable="walkable",k.NonWalkable="non-walkable"}(V||(V={}));class Q{get isRebuildingNavMesh(){return this._isRebuildingNavMesh}constructor(){this.navMesh=null,this.onNavMeshChanged=new K.H,this.onFlushCompleted=new K.H,this._navMeshConstructorWorker=null,this._gridResolution=1200,this._nextPolygonID=1,this._nextBlockID=1,this._navMeshBlocks=[],this._updateBlockIdQueue=[],this._polyBlockMapping=new Map,this._queueRequestCount=0,this._isRebuildingNavMesh=!1;this.navMesh=new W.L([],0,10)}destroy(){this.onNavMeshChanged.dispose(),this.onFlushCompleted.dispose(),this._navMeshConstructorWorker.stop(),this._navMeshConstructorWorker=null,this._navMeshBlocks.forEach((k=>{k.onBuildComplete.dispose()})),this.navMesh.destroy()}findPath(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.navMesh){const U=this.navMesh.findPath(k,B);if((null==U?void 0:U.length)>0)return U;if(this._isRebuildingNavMesh)return new Promise((k=>{this.onNavMeshChanged.addOnce(void 0)}))}return[]}))}setNavMeshConstructorWorker(k){this._navMeshConstructorWorker=k}getNavMeshConstructor(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._navMeshConstructorWorker){const k=Y.W.instance.getWorkerURL("NavMeshConstructor");this._navMeshConstructorWorker=q.p.createWorker(H,k)}return this._navMeshConstructorWorker.start()}))}setGridResolution(k){return(0,F.sH)(this,void 0,void 0,(function*(){this._gridResolution=k;let B=this._navMeshBlocks.reduce(((k,B)=>(k.push(...B.polygons),k)),[]);B=B.filter(((k,U)=>U===B.findIndex((B=>B.ID===k.ID)))),this.beginNavMeshUpdateQueue(),this._navMeshBlocks.forEach((k=>{k.navMeshPolygonIDs.forEach((k=>this.navMesh.removePolygon(k)))})),this._polyBlockMapping.clear(),this._navMeshBlocks=[];const U=B.length;for(let k=0;k{this.removePolygon(k)})),this.flushNavMeshUpdateQueue()}removePolygon(k){return this.removePolygonFromNavMesh(k)}beginNavMeshUpdateQueue(){++this._queueRequestCount}flushNavMeshUpdateQueue(){return(0,F.sH)(this,void 0,void 0,(function*(){return--this._queueRequestCount,this._queueRequestCount>0||this._isRebuildingNavMesh?new Promise((k=>{this.onFlushCompleted.addOnce(k)})):this._updateBlockIdQueue.length>0?this.rebuildAllBlocksInQueue():void 0}))}rebuildAllBlocksInQueue(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this.getBlocks(this._updateBlockIdQueue);this._updateBlockIdQueue=[],this._isRebuildingNavMesh=!0;const B=k.length;for(let U=0;U0)return this.rebuildAllBlocksInQueue();this.onFlushCompleted.dispatch()}))}getBlocksForNavPoly(k){const B=z.c.getAABBforPoints(k.poly),U=Math.floor(B.left/this._gridResolution),F=Math.floor(B.top/this._gridResolution),G=Math.ceil(B.right/this._gridResolution),j=Math.ceil(B.bottom/this._gridResolution),$=[];for(let H=U;H0){this.getBlocks(U).forEach((B=>{const U=B.polygons.findIndex((B=>B.ID===k));U>-1?B.polygons.splice(U,1):G.V.log(`Polygon with id ${k} was not found in block with ID ${B.ID}, but was expected`,j.$.Warning),this.updateNavMeshBlock(B)})),this._polyBlockMapping.delete(k)}}createBlockNavPoly(k,B){return{ID:this._nextPolygonID++,type:B,poly:k}}addPolygonsToNavMesh(k,B){this.beginNavMeshUpdateQueue();const U=k.map((k=>{const U=this.createBlockNavPoly(k,B);return this.addPolygonToNavMesh(U),U.ID}));return this.flushNavMeshUpdateQueue(),U}addPolygonToNavMesh(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this.getBlocksForNavPoly(k);this._polyBlockMapping.set(k.ID,B.map((k=>k.ID))),yield Promise.all(B.map((B=>(0,F.sH)(this,void 0,void 0,(function*(){return B.polygons.push(k),this.updateNavMeshBlock(B)})))))}))}updateNavMeshBlock(k){return(0,F.sH)(this,void 0,void 0,(function*(){this._queueRequestCount>0?-1===this._updateBlockIdQueue.indexOf(k.ID)&&this._updateBlockIdQueue.push(k.ID):(yield this.rebuildNavMeshBlock(k),this.onNavMeshChanged.dispatch())}))}rebuildNavMeshBlock(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(k.isBuilding)return new Promise((B=>{k.onBuildComplete.addOnce((()=>{this.rebuildNavMeshBlock(k).then(B)}))}));k.isBuilding=!0,k.navMeshPolygonIDs.length>0&&(k.navMeshPolygonIDs.forEach((k=>{this.navMesh.removePolygon(k)})),k.navMeshPolygonIDs=[]);const B=k.x*this._gridResolution,U=k.y*this._gridResolution,F={left:B,top:U,right:B+this._gridResolution,bottom:U+this._gridResolution},G=yield this.getNavMeshConstructor(),j=[],$=[];k.polygons.forEach((k=>{k.poly.forEach((k=>{k.x=this.alignValuesSmallerThanEpsilon(k.x,B),k.y=this.alignValuesSmallerThanEpsilon(k.y,U),k.x=this.alignValuesSmallerThanEpsilon(k.x,F.right),k.y=this.alignValuesSmallerThanEpsilon(k.y,F.bottom)})),k.type===V.Walkable?j.push(k):k.type===V.NonWalkable&&$.push(k)}));const H=yield G.constructNavMesh(j.map((k=>k.poly)),$.map((k=>k.poly)),F);k.navMeshPolygonIDs=H.map((k=>this.navMesh.addPolygon(k))),k.isBuilding=!1,k.onBuildComplete.dispatch()}))}alignValuesSmallerThanEpsilon(k,B){return k!==B&&Math.abs(k-B)<1?B:k}getGridBlock(k,B){const U=this._navMeshBlocks.findIndex((U=>U.x===k&&U.y===B));if(U>-1)return this._navMeshBlocks[U];const F={ID:this._nextBlockID++,x:k,y:B,polygons:[],navMeshPolygonIDs:[],isBuilding:!1,onBuildComplete:new K.H};return this._navMeshBlocks.push(F),F}getBlocks(k){return k.map((k=>this._navMeshBlocks.find((B=>B.ID===k)))).filter((k=>!!k))}}},82119:(k,B,U)=>{"use strict";U.d(B,{l:()=>F});const F={}},563:(k,B,U)=>{"use strict";U.d(B,{X:()=>z});var F,G=U(8674),j=U(64527),$=U(27179),H=U(823),V=U(29658),W=U(43501),q=U(15740),K=U(39002);let z=F=class extends W.d{constructor(){super(...arguments),this._anchorMin=new $.I(.5,.5),this._anchorMax=new $.I(.5,.5),this._anchoredPivotOffset=new $.I,this._sizeDelta=new j.o,this._pivot=new $.I(.5,.5),this._rectTransformDimensions=new j.o,this._isTransformRectDirty=!0,this._onRecalculatedBounds=new q.H,this._onDimensionsChanged=new q.H}get anchorMin(){return this._anchorMin}set anchorMin(k){this.setAnchorMin(k.x,k.y)}get anchorMax(){return this._anchorMax}set anchorMax(k){this.setAnchorMax(k.x,k.y)}get localPosition(){return this._anchoredPivotOffset}set localPosition(k){this.setAnchoredPivotOffset(k.x,k.y)}get left(){return-this._sizeDelta.width*this._pivot.x+this._anchoredPivotOffset.x}set left(k){this.setSizeDelta(-this.right-k,this._sizeDelta.height),this.setAnchoredPivotOffset(this._sizeDelta.width*this._pivot.x+k,this._anchoredPivotOffset.y)}get right(){return-(this._sizeDelta.width*(1-this._pivot.x)+this._anchoredPivotOffset.x)}set right(k){this.setSizeDelta(-this.left-k,this._sizeDelta.height),this.setAnchoredPivotOffset(-(this._sizeDelta.width*(1-this._pivot.x)+k),this._anchoredPivotOffset.y)}get top(){return-this._sizeDelta.height*this._pivot.y+this._anchoredPivotOffset.y}set top(k){this.setSizeDelta(this._sizeDelta.width,-this.bottom-k),this.setAnchoredPivotOffset(this._anchoredPivotOffset.x,this._sizeDelta.height*this._pivot.y+k)}get bottom(){return-(this._sizeDelta.height*(1-this._pivot.y)+this._anchoredPivotOffset.y)}set bottom(k){this.setSizeDelta(this._sizeDelta.width,-this.top-k),this.setAnchoredPivotOffset(this._anchoredPivotOffset.x,-(this._sizeDelta.height*(1-this._pivot.y)+k))}get posX(){return this._anchoredPivotOffset.x}set posX(k){this.setAnchoredPivotOffset(k,this._anchoredPivotOffset.y)}get posY(){return this._anchoredPivotOffset.y}set posY(k){this.setAnchoredPivotOffset(this._anchoredPivotOffset.x,k)}get widthDelta(){return this._sizeDelta.width}set widthDelta(k){this.setSizeDelta(k,this._sizeDelta.height)}get heightDelta(){return this._sizeDelta.height}set heightDelta(k){this.setSizeDelta(this._sizeDelta.width,k)}get rectTransformDimensions(){return this.recalculateRectTransform(),this._rectTransformDimensions}get pivot(){return this._pivot}set pivot(k){this.setPivot(k.x,k.y)}get anchoredPivotOffset(){return this._anchoredPivotOffset}set anchoredPivotOffset(k){this.setAnchoredPivotOffset(k.x,k.y)}get sizeDelta(){return this._sizeDelta}set sizeDelta(k){this.setSizeDelta(k.width,k.height)}get fullWidth(){return this.rectTransformDimensions.width}set fullWidth(k){const B=this.rectTransformDimensions.width-this._sizeDelta.width;this._sizeDelta.width=k-B,this.markRectTransformDirty()}get fullHeight(){return this.rectTransformDimensions.height}set fullHeight(k){const B=this.rectTransformDimensions.height-this._sizeDelta.height;this._sizeDelta.height=k-B,this.markRectTransformDirty()}get onRecalculatedBounds(){return this._onRecalculatedBounds}get onDimensionsChanged(){return this._onDimensionsChanged}create(){super.create(),this._isTransformRectDirty=!0,this._previousParent&&(this._previousParent.onComponentAdded.add(this.parentComponentAddedOrRemoved,this),this._previousParent.onComponentRemoved.add(this.parentComponentAddedOrRemoved,this))}destroy(){var k,B,U,F;this._onRecalculatedBounds.dispose(),this._onDimensionsChanged.dispose(),null===(B=null===(k=this._previousParent)||void 0===k?void 0:k.onComponentAdded)||void 0===B||B.remove(this.parentComponentAddedOrRemoved,this),null===(F=null===(U=this._previousParent)||void 0===U?void 0:U.onComponentRemoved)||void 0===F||F.remove(this.parentComponentAddedOrRemoved,this),super.destroy()}preDeserialize(k){super.preDeserialize(k),null==k||delete k.localPosition}setAnchorMin(k,B){K.c.isNearlyEqual(this._anchorMin.x,k)&&K.c.isNearlyEqual(this._anchorMin.y,B)||(this._anchorMin.x=k,this._anchorMin.y=B,this.markRectTransformDirty())}setAnchorMax(k,B){K.c.isNearlyEqual(this._anchorMax.x,k)&&K.c.isNearlyEqual(this._anchorMax.y,B)||(this._anchorMax.x=k,this._anchorMax.y=B,this.markRectTransformDirty())}setAnchoredPivotOffset(k,B){this._anchoredPivotOffset.isNearlyEqualToValues(k,B)||(this._anchoredPivotOffset.x=k,this._anchoredPivotOffset.y=B,this.markRectTransformDirty())}setPosition(k,B){this.setAnchoredPivotOffset(k,B)}setPositionX(k){this.setAnchoredPivotOffset(k,this._anchoredPivotOffset.y)}setPositionY(k){this.setAnchoredPivotOffset(this._anchoredPivotOffset.x,k)}setSizeDelta(k,B){this._sizeDelta.isNearlyEqualToValues(k,B)||(this._sizeDelta.width=k,this._sizeDelta.height=B,this.markRectTransformDirty())}setPivot(k,B){this._pivot.isNearlyEqualToValues(k,B)||(this._pivot.x=k,this._pivot.y=B,this.markRectTransformDirty())}postDeserialize(){super.postDeserialize(),this._isTransformRectDirty=!0}recalculateTransform(){this.recalculateRectTransform(),super.recalculateTransform()}recalculateWorldTransform(){this.recalculateRectTransform(),super.recalculateWorldTransform()}parentComponentAddedOrRemoved(k){k instanceof W.d&&this.markRectTransformDirty()}hierarchyUpdated(){var k,B;this.GameObject.parent!==this._previousParent&&(this._previousParent&&(this._previousParent.onComponentAdded.remove(this.parentComponentAddedOrRemoved,this),this._previousParent.onComponentRemoved.remove(this.parentComponentAddedOrRemoved,this)),null===(k=this.GameObject.parent)||void 0===k||k.onComponentAdded.add(this.parentComponentAddedOrRemoved,this),null===(B=this.GameObject.parent)||void 0===B||B.onComponentRemoved.add(this.parentComponentAddedOrRemoved,this),this.markRectTransformDirty()),super.hierarchyUpdated()}recalculateRectTransform(){if(this._isTransformRectDirty){const k=this.GameObject.parent,B=k?k.findComponent(F):null,U=B?B.rectTransformDimensions:j.o.ZERO,G=new $.I(this._anchorMin.x*U.width,this._anchorMin.y*U.height),H=new $.I(this._anchorMax.x*U.width,this._anchorMax.y*U.height),V=new j.o(H.x-G.x,H.y-G.y),W=new $.I(0,0),q=this._rectTransformDimensions.width,K=this._rectTransformDimensions.height;B&&(W.x=U.width*B.pivot.x,W.y=U.height*B.pivot.y),this._rectTransformDimensions.width=V.width+this._sizeDelta.width,this._rectTransformDimensions.height=V.height+this._sizeDelta.height,super.setPosition(G.x+V.width*this._pivot.x+this._anchoredPivotOffset.x-W.x,G.y+V.height*this._pivot.y+this._anchoredPivotOffset.y-W.y),this._isTransformRectDirty=!1,this._onRecalculatedBounds.dispatch(),q===this._rectTransformDimensions.width&&K===this._rectTransformDimensions.height||this._onDimensionsChanged.dispatch()}}markRectTransformDirty(){if(!this._isTransformRectDirty){this._isTransformRectDirty=!0;const k=this.GameObject.children;if(!k)return;const B=k.length;for(let U=0;U to place values dynamically")],z)},96352:(k,B,U)=>{"use strict";U.d(B,{M:()=>j});var F=U(80267),G=U(5191);class j{constructor(k){this._gl=k}destroy(){this._gl.deleteProgram(this._program)}useProgram(){this._gl.useProgram(this._program)}compileProgram(k,B){const U=this._gl,j=this.compileFragmentShader(U,B),$=this.compileVertexShader(U,k);if(!j||!$)return null;const H=U.createProgram();return U.attachShader(H,$),U.attachShader(H,j),U.linkProgram(H),U.getProgramParameter(H,U.LINK_STATUS)?this._program=H:(F.V.log(`Could not initialize shaders:\n${U.getProgramInfoLog(H)}`,G.$.Error),null)}compileVertexShader(k,B){return this.compileShader(k,B,k.VERTEX_SHADER)}compileFragmentShader(k,B){return this.compileShader(k,B,k.FRAGMENT_SHADER)}compileShader(k,B,U){const j=k.createShader(U);return k.shaderSource(j,B),k.compileShader(j),k.getShaderParameter(j,k.COMPILE_STATUS)?j:(F.V.log(`Could not compile shader of type ${U}:\n${k.getShaderInfoLog(j)}`,G.$.Error),null)}}},43501:(k,B,U)=>{"use strict";U.d(B,{d:()=>K});var F=U(8674),G=U(68910),j=U(823),$=U(71082),H=U(40794),V=U(29658),W=U(15740),q=U(39002);let K=class extends H.u{constructor(){super(...arguments),this._previousParent=null,this.onWorldMatrixChanged=new W.H,this._worldPosition=new G.Point,this._worldScale=new G.Point(1,1),this._pixiTransform=new G.Transform,this._worldScaleID=0}get localPosition(){return this._pixiTransform.position}set localPosition(k){this.setPixiTransformPosition(k.x,k.y)}get localScale(){return this._pixiTransform.scale}set localScale(k){this.setScale(k.x,k.y)}get localRotation(){return q.c.radiansToDegrees(this._pixiTransform.rotation)}set localRotation(k){this.setRotation(k)}get localMatrix(){return this.recalculateTransform(),this._pixiTransform.localTransform}get worldMatrix(){return this.recalculateWorldTransform(),this._pixiTransform.worldTransform}get worldPosition(){this.recalculateWorldTransform();const k=this._pixiTransform.worldTransform;return this._worldPosition.set(k.tx,k.ty),this._worldPosition}set worldPosition(k){var B;const U=null===(B=this.GameObject.parent)||void 0===B?void 0:B.transform;if(U){const B=U.worldMatrix.applyInverse(k);this.setPixiTransformPosition(B.x,B.y)}else this.localPosition=k}get worldScale(){var k,B;this.recalculateWorldTransform();const U=this._pixiTransform._worldID;if(this._worldScaleID!==U){this._worldScale.copyFrom(this._pixiTransform.scale);let F=null===(k=this.GameObject.parent)||void 0===k?void 0:k.transform;for(;F;)$.C.multiplyPointData(this._worldScale,F.localScale),F=null===(B=F.GameObject.parent)||void 0===B?void 0:B.transform;this._worldScaleID=U}return this._worldScale}set worldScale(k){var B;const U=null===(B=this.GameObject.parent)||void 0===B?void 0:B.transform;if(U){const B=U.worldScale;this.setScale(k.x/B.x,k.y/B.y)}else this.setScale(k.x,k.y)}get pixiTransform(){return this.recalculateWorldTransform(),this._pixiTransform}create(){super.create(),this._previousParent=this.GameObject.parent,this.GameObject.onHierarchyChanged.add(this.hierarchyUpdated,this),this.appendObservablePointCallback(this._pixiTransform.position,(()=>{this.markChildTransformsDirty()})),this.appendObservablePointCallback(this._pixiTransform.scale,(()=>{this.markChildTransformsDirty()})),this.appendObservablePointCallback(this._pixiTransform.pivot,(()=>{this.markChildTransformsDirty()})),this.appendObservablePointCallback(this._pixiTransform.skew,(()=>{this.markChildTransformsDirty()}))}destroy(){var k,B;null===(B=null===(k=this.GameObject)||void 0===k?void 0:k.onHierarchyChanged)||void 0===B||B.remove(this.hierarchyUpdated,this),this.onWorldMatrixChanged.dispose(),super.destroy()}setPosition(k,B){this.setPixiTransformPosition(k,B)}setPositionX(k){this._pixiTransform.position.x=k}setPositionY(k){this._pixiTransform.position.y=k}setPixiTransformPosition(k,B){this._pixiTransform.position.set(k,B)}setScale(k,B=k){this._pixiTransform.scale.set(k,B)}setSkew(k,B=k){this._pixiTransform.skew.set(q.c.degreesToRadians(k),q.c.degreesToRadians(B))}setRotation(k){this._pixiTransform.rotation=q.c.degreesToRadians(k)}recalculateWorldTransform(){this._pixiTransform.updateTransform(this.getParentTransform())}recalculateTransform(){this._pixiTransform.updateLocalTransform()}getParentTransform(){var k,B;const U=null===(B=null===(k=this.GameObject)||void 0===k?void 0:k.parent)||void 0===B?void 0:B.transform;return U?U.pixiTransform:(this._fakeParentTransform||(this._fakeParentTransform=new G.Transform),this._fakeParentTransform)}markChildTransformsDirty(){var k,B,U;this._pixiTransform._worldID++,this.onWorldMatrixChanged.dispatch();const F=null!==(B=null===(k=this.GameObject)||void 0===k?void 0:k.children)&&void 0!==B?B:[],G=F.length;for(let j=0;j{U.call(F),B()}}};(0,F.Cg)([(0,j._H)(),(0,F.Sn)("design:type",Object),(0,F.Sn)("design:paramtypes",[Object])],K.prototype,"localPosition",null),(0,F.Cg)([(0,j._H)(),(0,F.Sn)("design:type",Object),(0,F.Sn)("design:paramtypes",[Object])],K.prototype,"localScale",null),(0,F.Cg)([(0,j.g1)(),(0,F.Sn)("design:type",Number),(0,F.Sn)("design:paramtypes",[Number])],K.prototype,"localRotation",null),K=(0,F.Cg)([(0,V.EV)("Transform",V.YH.transform,"A basic transform that only holds position rotation and scale")],K)},55539:(k,B,U)=>{"use strict";var F;U.d(B,{C:()=>F}),function(k){k[k.TOP_LEFT=0]="TOP_LEFT",k[k.TOP_CENTER=1]="TOP_CENTER",k[k.TOP_RIGHT=2]="TOP_RIGHT",k[k.LEFT_TOP=3]="LEFT_TOP",k[k.LEFT_CENTER=4]="LEFT_CENTER",k[k.LEFT_BOTTOM=5]="LEFT_BOTTOM",k[k.CENTER=6]="CENTER",k[k.RIGHT_TOP=7]="RIGHT_TOP",k[k.RIGHT_CENTER=8]="RIGHT_CENTER",k[k.RIGHT_BOTTOM=9]="RIGHT_BOTTOM",k[k.BOTTOM_LEFT=10]="BOTTOM_LEFT",k[k.BOTTOM_CENTER=11]="BOTTOM_CENTER",k[k.BOTTOM_RIGHT=12]="BOTTOM_RIGHT"}(F||(F={}))},30290:(k,B,U)=>{"use strict";var F;U.d(B,{G:()=>G,J:()=>F}),function(k){k.None="none",k.Easy="power1",k.Strong="power2",k.VeryStrong="power3",k.SuperStrong="power4",k.Back="back",k.Elastic="elastic"}(F||(F={}));class G{static generateCustomElasticEase(k=1,B=.3,U=!1,F=!0){let j;return j=U?F?{value:`elastic.inOut(${k}, ${B})`}:{value:`elastic.in(${k}, ${B})`}:F?{value:`elastic.out(${k}, ${B})`}:G.Linear.None,j}static generateCustomBackEase(k=2,B=!0,U=!1){let F;return F=B?U?{value:`back.inOut(${k})`}:{value:`back.in(${k})`}:U?{value:`back.out(${k})`}:G.Linear.None,F}static generateSteppedEase(k=16){return{value:`steps (${k})`}}static generateSlowMoEase(k=.5,B=.5,U=!1){return{value:`slow (${k}, ${B}, ${U})`}}static generateRoughEase(k=1,B=20,U=!0,F=!1,j=!0,$=!0,H=G.Linear.None){let V="none";return j?V=$?"both":"in":$&&(V="out"),{value:`rough ({ template: ${H}, strength: ${k}, points: ${B}, randomize: ${U}, clamp: ${F}, taper: ${V})`}}}G.Back={In:{value:"back.in(2) "},Out:{value:"back.out(2) "},InOut:{value:"back.inOut(2)"}},G.Bounce={In:{value:"bounce.in"},Out:{value:"bounce.out"},InOut:{value:"bounce.inOut"}},G.Circular={In:{value:"circ.in"},Out:{value:"circ.out"},InOut:{value:"circ.inOut"}},G.Cubic={In:{value:"power2.in"},Out:{value:"power2.out"},InOut:{value:"power2.inOut"}},G.Elastic={In:{value:"elastic.in(1, 0.3)"},Out:{value:"elastic.out(1, 0.3)"},InOut:{value:"elastic.inOut(1, 0.3)"}},G.Exponential={In:{value:"expo.in"},Out:{value:"expo.out"},InOut:{value:"expo.inOut"}},G.Linear={None:{value:"none"}},G.Quadratic={In:{value:"power1.in"},Out:{value:"power1.out"},InOut:{value:"power1.inOut"}},G.Quintic={In:{value:"power4.in"},Out:{value:"power4.out"},InOut:{value:"power4.inOut"}},G.Quartic={In:{value:"power3.in"},Out:{value:"power3.out"},InOut:{value:"power3.inOut"}},G.Sinusoidal={In:{value:"sine.in"},Out:{value:"sine.out"},InOut:{value:"sine.inOut"}}},29104:(k,B,U)=>{"use strict";U.d(B,{K:()=>W});var F=U(85880),G=U(80267),j=U(5191),$=U(32154),H=U(15740),V=U(30290);class W{get onLoop(){return this.onRepeat}get isRunning(){return this._timeline.isActive()}get isPaused(){return this._timeline.paused()}get timeScale(){return this._timeline.timeScale()}set timeScale(k){this.checkInitialized("timeScale"),this._timeline.timeScale(k)}get properties(){return this.checkInitialized("get properties"),this._rootTween.vars}get reverse(){return this.checkInitialized("get reverse"),this._timeline.reversed()}set reverse(k){this.checkInitialized("set reverse"),this._timeline.reversed(k)}getDuration(){return this.checkInitialized("get duration"),1e3*this._rootTween.duration()}duration(k){return this.checkInitialized("set duration"),this._rootTween.duration(.001*k),this}getDelay(){return this.checkInitialized("get delay"),1e3*this._timeline.delay()}delay(k){return this.checkInitialized("set delay"),this._timeline.delay(.001*k),this}getRepeat(){return this.checkInitialized("get repeat"),this._timeline.repeat()}repeat(k){return this.checkInitialized("set repeat"),this._timeline=this._timeline.repeat(k),this}getYoyo(){return this.checkInitialized("get yoyo"),this._timeline.yoyo()}yoyo(k){return this.checkInitialized("set yoyo"),this._timeline.yoyo(k),this}get totalDuration(){return this.checkInitialized("get totalDuration"),1e3*this._timeline.duration()}get target(){return this._target}constructor(k,B,U,G){this._tweenInitialized=!1,this.chainedTween=null,this.pendingDelete=!1,this.killed=!1,this.isDestroyed=!1,this._target=k,this.game=B,this.manager=G,this.owner=U,this.onTweenComplete=new H.H,this.onChildComplete=new H.H,this.onRepeat=new H.H,this.onUpdate=new H.H,this.onStart=new H.H,this.onDestroy=new H.H,this._timeline=F.os.timeline({onComplete:()=>{this.onCompleteCallback()},onRepeat:()=>{this.onRepeat.dispatch()},onUpdate:()=>{this.onUpdate.dispatch()},onStart:()=>{this.onStart.dispatch()}}),this._rootTween=F.os.set(this._target,{})}fixDeprecatedRelativeValues(k){const B=Object.keys(k);for(let U=0;U=0?(K.delay=.001*q,this._timeline.to(this._target,K)):this._timeline.add(this._rootTween),this._timeline.paused(!G),$.A.isDefined(B)&&this.duration(B),$.A.isDefined(H)&&this.repeat(H),$.A.isDefined(j)&&this.delay(j),$.A.isDefined(W)&&this.yoyo(W),this}from(k,B,U=V.G.Linear.None,G=!1,j,H,W,q=-1){const K=this.fixDeprecatedRelativeValues(k);return K.ease=U.value,this._rootTween=F.os.from(this._target,K),this._tweenInitialized=!0,q>=0?(K.delay=.001*q,this._timeline.to(this._target,K)):this._timeline.add(this._rootTween),this._timeline.paused(!G),$.A.isDefined(B)&&this.duration(B),$.A.isDefined(H)&&this.repeat(H),$.A.isDefined(j)&&this.delay(j),$.A.isDefined(W)&&this.yoyo(W),this}onCompleteCallback(){this.game&&(this.onTweenComplete.dispatch(),this.chainedTween&&this.chainedTween.start())}onUpdateCallback(k,B){return this.onUpdate.add(k,B),this}chain(...k){let B=k.length;for(;--B>=0;)k[B].onTweenComplete.add((()=>{this.game&&this.onChildComplete.dispatch()}),this,Number.MAX_SAFE_INTEGER),B>0?k[B-1].chainedTween=k[B]:this.chainedTween=k[B];return this}pause(){return this._timeline&&(this._timeline=this._timeline.pause()),this}loop(k){return this._timeline=this._timeline.repeat(k?-1:0),this}repeatDelay(k){return this._timeline=this._timeline.repeatDelay(.001*k),this}resume(){var k;return this._timeline=null===(k=this._timeline)||void 0===k?void 0:k.resume(),this}start(){return this._timeline=this._timeline.restart(!0),this}stop(k=!1){return this._timeline&&(this._timeline=this._timeline.pause(),k&&(this._timeline=this._timeline.progress(1,!1))),this}remove(){this._timeline&&this._timeline.kill(),this._rootTween&&this._rootTween.kill(),this.pendingDelete=!0,this.killed=!0}destroy(){this.isDestroyed?G.V.log("Tween destroy called, but tween is already destroyed",j.$.Warning):(this._timeline&&(this.killed||this._timeline.kill(),this._timeline=null),this._rootTween&&(this.killed||this._rootTween.kill(),this._rootTween=null),this.killed=!0,this.onStart.dispose(),this.onTweenComplete.dispose(),this.onChildComplete.dispose(),this.onUpdate.dispose(),this.onRepeat.dispose(),this.game=null,this.manager=null,this.owner=null,this.chainedTween=null,this.onTweenComplete=null,this.onChildComplete=null,this.onRepeat=null,this.onUpdate=null,this.onStart=null,this.isDestroyed=!0,this.onDestroy.dispatch(),this.onDestroy.dispose(),this.onDestroy=null)}checkInitialized(k){this._tweenInitialized||G.V.log(`Please call Tween.to/from before calling ${k}, the value has not been set!`,j.$.Error)}}},78821:(k,B,U)=>{"use strict";U.d(B,{$:()=>H});var F=U(85880),G=U(80267),j=U(5191),$=U(29104);class H{constructor(k){this._tweens=[],this._owners=new Map,this.game=k,this.game.onPause.add(this.pauseAll,this),this.game.onResume.add(this.resumeAll,this)}getAll(){return this._tweens}removeAll(){this._tweens.forEach((k=>{k.pendingDelete=!0,k.remove()}))}removeFrom(k,B=!0){let U,F;if(Array.isArray(k))for(F=k.length,U=0;U{U&&(k.pendingDelete=!0)}),this,-Number.MAX_SAFE_INTEGER),k}create(k,B,U=!0){const F=new $.K(k,this.game,B);return this.add(F,B,U),F}remove(k){const B=this._tweens.indexOf(k);-1!==B&&(this._tweens[B].pendingDelete=!0,this._tweens[B].remove())}update(){for(let k=this._tweens.length-1;k>=0;k--){const B=this._tweens[k];if(!1!=!!B)if(B.isDestroyed){this._tweens.splice(k,1);const U=this.findOwnerForTween(B);null!==U?G.V.log(`Attempted to update a destroyed tween, owner: ${U.constructor.name}`,j.$.Warning):G.V.log("Attempted to update a destroyed tween.",j.$.Warning)}else B.pendingDelete&&(B.isRunning&&B.stop(!1),this.removeTweenFromOwner(B),B.destroy(),this._tweens.splice(k,1));else this._tweens.splice(k,1)}return this._tweens.length>0}pauseAll(){this._tweens.forEach((k=>{k.pendingDelete||k.pause()}))}resumeAll(){this._tweens.forEach((k=>{k.pendingDelete||k.resume()}))}removeAllFromOwner(k){if(!this._owners.has(k))return;this._owners.get(k).forEach((k=>{k.remove(),k.pendingDelete=!0})),this._owners.delete(k)}removeTweenFromOwner(k){let B=!1;if(this._owners.has(k.owner)){const U=this._owners.get(k.owner);U.has(k)&&(U.delete(k),0===U.size&&this._owners.delete(k.owner),B=!0)}return B}findOwnerForTween(k){let B=null;if(null!==k.owner)B=k.owner;else for(const[U,F]of this._owners.entries())if(F.has(k)){B=U;break}return B}destroy(){this.game.onPause.remove(this.pauseAll,this),this.game.onResume.remove(this.resumeAll,this),this.game=null,this._tweens=null}static setGlobalTimeScale(k){F.os.globalTimeline.timeScale(k)}}},50740:(k,B,U)=>{"use strict";U.d(B,{K:()=>H});var F=U(5191),G=U(80267),j=U(15740),$=U(39002);class H{get isDestroyed(){return this._destroyed}get isLoaded(){return this.sound.isLoaded}set isLoaded(k){this.sound.isLoaded=k}get isPlaying(){return this.sound.isPlaying}set isPlaying(k){this.sound.isPlaying=k}get autoPlay(){return this.sound.autoPlay}set autoPlay(k){this.sound.autoPlay=k}get singleInstance(){return this.sound.singleInstance}set singleInstance(k){this.sound.singleInstance=k}get preload(){return this.sound.preload}set preload(k){this.sound.preload=k}get paused(){return this.sound.paused}set paused(k){this.sound.paused=k}get muted(){return this.sound.muted}set muted(k){this.instancesValid()&&(this.sound.muted=k)}get mute(){return this.muted}set mute(k){this.muted=k}get loop(){return this.sound.loop}set loop(k){this.instancesValid()&&(this.sound.loop=k)}get url(){return this.sound.url}set url(k){this.sound.url=k}get options(){return this.sound.options}set options(k){this.sound.options=k}get media(){return this.sound.media}set media(k){this.sound.media=k}get speed(){return this.sound.speed}set speed(k){this.instancesValid()&&(this.sound.speed=k)}get filters(){return this.sound.filters}set filters(k){this.sound.filters=k}get volume(){return this.sound.volume}set volume(k){this.instancesValid()&&(this.sound.volume=k)}get context(){return this.sound.context}get instances(){return this.sound.instances}get sprites(){return this.sound.sprites}get duration(){return this.sound.duration}get isPlayable(){return this.sound.isPlayable}get isDecoding(){return!this.sound.isLoaded}get onPlay(){return this._onPlay}get onStop(){return this._onStop}get onComplete(){return this._onComplete}get onPause(){return this._onPause}get onResume(){return this._onResume}constructor(k,B,U,$){this._destroyed=!1,this._onPlay=new j.H,this._onStop=new j.H,this._onComplete=new j.H,this._onPause=new j.H,this._onResume=new j.H,this.sound=k,this.game=B,this.key=U,this.usingAudioTag=$,k?this.singleInstance=!1:G.V.log("PIXISound constructor called without a sound.",F.$.Error)}instancesValid(){let k=!0;return this.sound.instances||(k=!1,G.V.log(`Sound instances invalid for key ${this.key}`,F.$.Warning)),k}pause(){return this.isPlaying&&(this.onPause.dispatch(),this.sound.pause()),this}resume(){return this.paused&&(this.onResume.dispatch(),this.sound.resume()),this}addSprites(k,B){return this.sound.addSprites(k,B)}destroy(){this._destroyed=!0,this._onComplete.dispose(),this._onStop.dispose(),this._onPlay.dispose(),this._onPause.dispose(),this._onResume.dispose(),this.game.sound.remove(this),this.sound&&(this.sound.instances&&this.sound.destroy(),this.sound=null)}removeSprites(k){return this.sound.removeSprites(k),this}stop(){return this.sound&&(this.isPlaying||this.paused)&&(this._onStop.dispatch(),this.sound.stop()),this}play(k,B){return this.onPlay.dispatch(),this.sound.play(k,(k=>{this.onComplete.dispatch(),B&&B(k)})),this}playWithOptions(k={start:0}){return this.onPlay.dispatch(),this.sound.play(k,(k=>{this.onComplete.dispatch()})),this}refresh(){this.sound.refresh()}refreshPaused(){this.sound.refreshPaused()}autoPlayStart(){return this.sound.autoPlayStart()}addMarker(k,B,U,F=null){null!==F&&(this.volume=F);const G={start:B,end:B+U},j=this.sound.sprites[k];return j?Object.assign(j,G):this.sound.addSprites(k,G),this}playMarker(k,B=0,U=null,j=null,H=!1,V){const W=this.sprites[k];if(W){const F=$.c.clamp(B,0,1);W.start=$.c.linear(W.start,W.end,F),null!==U&&(this.volume=U),null!==j&&(this.loop=j),H&&this.stop(),this.play(k,V)}else G.V.log(`Cannot find sound ${k} so cannot play it.`,F.$.Error);return this}removeMarker(k){return this.sound.removeSprites(k),this}}},78321:(k,B,U)=>{"use strict";U.d(B,{x:()=>W});var F=U(8674),G=U(34711),j=U(22070),$=U(30615),H=U(15740),V=U(50740);class W{get mute(){return this._muted}set mute(k){if(k){if(this._muted)return;this._codeMuted=!0,this.setMute()}else{if(!this._muted)return;this._codeMuted=!1,this.unsetMute()}}get volume(){return G.s3.volumeAll}set volume(k){const B=Math.min(Math.max(k,0),1);if(G.s3.volumeAll!==B){G.s3.volumeAll=B;for(let k=0;k{this.setTouchUnlock(),this.resumeWebAudio()},void 0===this._unlockSource.start?this._unlockSource.noteOn(0):this._unlockSource.start(0),this.resumeWebAudio())),!0}stopAll(){this.noAudio||G.s3.stopAll()}pauseAll(){this.noAudio||G.s3.pauseAll()}resumeAll(){this.noAudio||G.s3.resumeAll()}setDecodedCallback(k,B,U){let F=k;"string"==typeof F&&(F=[F]),this._watchList.reset();for(let G=0;G0;)if(this._sounds[B]===k)return this._sounds.splice(B,1),!0;return!1}removeAll(){G.s3.removeAll(),this._sounds.length=0}removeByKey(k){let B=this._sounds.length,U=0;for(G.s3.remove(k);B-- >0;)this._sounds[B].key===k&&(this._sounds.splice(B,1),U++);return U}play(k="",B=1,U=!1){if(this.noAudio)return null;const F=this.add(k,B,U);return F.play(),F}setMute(){this._muted||(this._muted=!0,G.s3.muteAll(),this.onMute.dispatch())}unsetMute(){this._muted&&!this._codeMuted&&(this._muted=!1,G.s3.unmuteAll(),this.onUnMute.dispatch())}destroy(){var k,B;this.removeAll(),this.onSoundDecode.dispose(),this.onVolumeChange.dispose(),this.onMute.dispose(),this.onUnMute.dispose(),this.onTouchUnlock.dispose(),this.game.canvas.removeEventListener("click",this._resumeWebAudioOnClick),null===(B=null===(k=this.context)||void 0===k?void 0:k.close)||void 0===B||B.call(k),this._sounds=null,this._watchList=null,G.s3.close()}_onResumeWebAudioOnClick(){this.resumeWebAudio(),this.game.canvas.removeEventListener("click",this._resumeWebAudioOnClick)}}},48368:(k,B,U)=>{"use strict";U.d(B,{q:()=>$});var F=U(68910),G=U(5191),j=U(80267);class ${static setSmoothed(k,B){(null==k?void 0:k.baseTexture)?(k.baseTexture.scaleMode=B?F.SCALE_MODES.LINEAR:F.SCALE_MODES.NEAREST,k.baseTexture.update()):j.V.log("Object not found, cannot set smoothing",G.$.Warning)}static getSmoothed(k){return k.baseTexture.scaleMode===F.SCALE_MODES.LINEAR}}},15740:(k,B,U)=>{"use strict";U.d(B,{H:()=>H});var F=U(8674),G=U(41560),j=U(32154);class ${get listener(){return this._listener}get context(){return this._context}get callCount(){return this._callCount}constructor(k,B=null,U=!1,F=0,G){this.isOnce=!1,this.priority=0,this.active=!0,this._callCount=0,this._listener=k,this._context=B,this.isOnce=U,this.priority=F,this._args=G}isBound(){return!!this._listener}execute(k){var B;let U;if(this.active&&this.isBound()){++this._callCount;let F=[];k.length>0&&(F=F.concat(k)),(null===(B=this._args)||void 0===B?void 0:B.length)>0&&(F=F.concat(this._args)),U=this._listener.apply(this.context,F)}return U}destroy(){this._listener=null,this._context=null,this._args=null}toString(){return`[SignalBinding isOnce: ${String(this.isOnce)}, isBound: ${String(this.isBound())}, active: ${String(this.active)}]`}}class H{constructor(){this._bindings=[],this._shouldPropagate=!0,this.active=!0,this._dispatchCount=0}get dispatchCount(){return this._dispatchCount}add(k,B=null,U=0,...F){return this.validateListener(k,"add"),this.addBinding(k,B,!1,U,F)}addOnce(k,B=null,U=0,...F){return this.validateListener(k,"addOnce"),this.addBinding(k,B,!0,U,F)}asPromise(){return(0,F.sH)(this,void 0,void 0,(function*(){return j.A.isDefined(this._promise)||(this._promise=new G.b,this.addOnce(((...k)=>{var B;null===(B=this._promise)||void 0===B||B.resolve(k),this._promise=null}))),this._promise}))}remove(k,B=null){if(!k)return;this.validateListener(k,"remove");const U=this.indexOfListener(k,B);-1!==U&&this.removeAtIndex(U)}removeAll(k=null){for(let B=this._bindings.length-1;B>=0;--B)k&&k!==this._bindings[B].context||this.removeAtIndex(B)}has(k,B=null){return-1!==this.indexOfListener(k,B)}halt(){this._shouldPropagate=!1}dispatch(...k){this.active&&this.dispatchInternal(k)}dispatchAsync(...k){return(0,F.sH)(this,void 0,void 0,(function*(){this.active&&(yield Promise.all(this.dispatchInternal(k)))}))}dispatchInternal(k){this._shouldPropagate=!0;const B=[...this._bindings],U=[];for(let F=B.length-1;F>=0&&this._shouldPropagate;--F){const G=B[F];U.push(G.execute(k)),G.isOnce&&G.isBound()&&this.remove(G.listener,G.context)}return this._dispatchCount++,U}dispose(){var k;null===(k=this._promise)||void 0===k||k.reject(`Signal disposed before firing. ${this.toString()}`),this.removeAll(),this._bindings.length=0}getBindingsCount(){return this._bindings.length}toString(){return`[Signal bindings count: ${this.getBindingsCount()}, active: ${String(this.active)}]`}validateListener(k,B){if("function"!=typeof k)throw new Error(`Signal: listener is a required param of ${B}() and must be a function.`)}addBinding(k,B=null,U=!1,F=0,G){const j=this.indexOfListener(k,B);let H;if(j>=0){if(H=this._bindings[j],H.isOnce!==U)throw new Error(`You cannot add ${U?"":"Once"}() then add ${U?"Once":""}() the same listener without removing the relationship first`)}else{H=new $(k,B,U,F,G);let j=0;for(let k=this._bindings.length-1;k>=0;--k)if(this._bindings[k].priorityU.listener===k&&U.context===B))}}},9938:(k,B,U)=>{"use strict";var F,G,j,$;U.d(B,{bX:()=>F}),function(k){k.PointerDown="pointerdown",k.PointerCancel="pointercancel",k.PointerUp="pointerup",k.PointerTap="pointertap",k.PointerUpOutside="pointerupoutside",k.PointerMove="pointermove",k.PointerOver="pointerover",k.PointerOut="pointerout"}(F||(F={})),function(k){k.TouchStart="touchstart",k.TouchCancel="touchcancel",k.TouchEnd="touchend",k.TouchEndOutside="touchendoutside",k.TouchMove="touchmove",k.Tap="tap"}(G||(G={})),function(k){k.RightDown="rightdown",k.MouseDown="mousedown",k.RightUp="rightup",k.MouseUp="mouseup",k.RightClick="rightclick",k.Click="click",k.RightUpOutside="rightupoutside",k.MouseUpOutside="mouseupoutside",k.MouseMove="mousemove",k.MouseOver="mouseover",k.MouseOut="mouseout"}(j||(j={})),function(k){k.Added="added",k.Removed="removed"}($||($={}))},86766:(k,B,U)=>{"use strict";U.d(B,{S:()=>Z});var F=U(8674),G=U(27179),j=U(823),$=U(4697),H=U(52751),V=U(62481),W=U(93337),q=U(57530),K=U(40794),z=U(29658),Y=U(61806),Q=U(15740),X=U(9938);let Z=class extends K.u{constructor(){super(...arguments),this.onDown=new Q.H,this.onRelease=new Q.H,this.onReleaseOutside=new Q.H,this.onHoverEnter=new Q.H,this.onHoverExit=new Q.H,this.onHoverMove=new Q.H,this.onHold=new Q.H,this.onClick=new Q.H,this._holdDelay=1e3,this.debounceTimeMs=0,this.allowContinuousHold=!1,this._pointerDown=!1,this._touchDuration=0,this._holdSent=!1,this._isTargetInput=!1,this._lastClickTime=0,this.onInputEnabledChanged=new Q.H,this._inputEnabled=!0,this.attachToCamera=!1,this.disableWhileAwaitingListeners=!1,this.sendClickLocationWithPointerSignals=!0,this._awaitingListeners=!1,this._renderComponent=null,this._displayObject=null}get inputEnabled(){return this._inputEnabled}set inputEnabled(k){this._inputEnabled=k,this.applyInputEnabledSetting(k),this.onInputEnabledChanged.dispatch()}set useHandCursor(k){this._useHandCursor=k,this.applyUseHandCursorSetting(k)}get useHandCursor(){return this._useHandCursor}set awaitingListeners(k){this._awaitingListeners=k,this.applyInputEnabledSetting(!k)}get renderComponent(){return this._renderComponent}set renderComponent(k){this._renderComponent=k,this._renderComponent?this.updateRenderComponent(this._renderComponent):this.updateRenderComponent(null)}create(){super.create(),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerUpOutside=this.onPointerUpOutside.bind(this),this.onPointerOver=this.onPointerOver.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onPointerMove=this.onPointerMove.bind(this)}postCreate(){super.postCreate(),this.updateRenderComponent(this._renderComponent)}hasContainsPoint(k){return void 0!==k.containsPoint}hasOriginalContainsPoint(k){return void 0!==k.originalContainsPoint}overrideContainsPoint(k){if(!this.hasContainsPoint(k))return;let B;this.hasOriginalContainsPoint(k)?B=k.originalContainsPoint.bind(k):(B=k.containsPoint.bind(k),k.originalContainsPoint=B),k.containsPoint=k=>{let U=this.attachToCamera||H.w.getActiveScene().getLayer(this._renderComponent.GameObject.layer).attachToCamera||!q.i.main;return B(U?k:q.i.main.viewMatrix.applyInverse(k))}}recursiveOverrideContainsPoint(k){if(this.overrideContainsPoint(k),void 0!==k.children&&!1!==Array.isArray(k.children))for(let B=0;B{var k,B;null===(B=null===(k=this.gameObject)||void 0===k?void 0:k.isDestroyed)||void 0===B||B||(this.awaitingListeners=!1)}))):this.onClick.dispatch(...this.sendClickLocationWithPointerSignals?[B]:[])),this._isTargetInput=!1,this._holdSent=!1,this._pointerDown=!1}onPointerUpOutside(k){(0,W.H)(k)||(this.onReleaseOutside.dispatch(),this._holdSent=!1,this._pointerDown=!1)}onPointerOver(k){(0,W.H)(k)||this.onHoverEnter.dispatch()}onPointerOut(k){(0,W.H)(k)||(this._isTargetInput=!1,this._touchDuration=0,this.onHoverExit.dispatch())}onPointerMove(k){if((0,W.H)(k))return;const B=new G.I(k.global.x,k.global.y);this.onHoverMove.dispatch(B)}applyUseHandCursorSetting(k){this._displayObject&&(this._displayObject.cursor=k?"pointer":"auto")}applyInputEnabledSetting(k){this._displayObject&&(this._displayObject.eventMode=k?"static":"auto")}enableInteractiveChildrenOnHierarchy(k){var B;const U=k.parent;U&&(U.interactiveChildCount=(null!==(B=U.interactiveChildCount)&&void 0!==B?B:0)+1,U.interactiveChildren=!0,this.enableInteractiveChildrenOnHierarchy(U))}disableInteractiveChildrenOnHierarchy(k){const B=k.parent;B&&B.interactiveChildCount>0&&(--B.interactiveChildCount,B.interactiveChildren=B.interactiveChildCount>0,this.disableInteractiveChildrenOnHierarchy(B))}shouldDebounce(){return!this.inputEnabled||this._awaitingListeners||this.debounceTimeMs>0&&Date.now(){"use strict";U.d(B,{l:()=>it});var F=U(68910),G=U(5191),j=U(80267),$=U(32154),H=U(61806),V=U(39688),W=U(66032),q=U(52777),K=U(88651);class z extends K.${constructor(k,B,U,F){super(k,B),this.bitmapData=U,this.frameData=F}destroy(){this.game.cache.removeBitmapData(this.key),super.destroy()}}var Y=U(37950),Q=U(37061);class X extends K.${constructor(k,B,U,F){super(k,B),this.renderTexture=U,this.frameData=F}destroy(){this.game.cache.removeRenderTexture(this.key),super.destroy()}}var Z=U(89460);class J extends K.${get spineData(){return this._spineData}constructor(k,B){super(H.W.instance.game,k),this._spineData=B}destroy(){this._spineData=null,super.destroy()}}var tt=U(49356),et=U(90157);class it{get game(){return this._game}static getAssetTypeIDs(){return Object.keys(q.r).filter((k=>!isNaN(Number(q.r[k])))).map((k=>q.r[k]))}addAtlasAlias(k,B,U){this._atlasFrameAlias.set(k,{atlasGuid:B,atlasFrame:U})}removeAtlasAlias(k){this._atlasFrameAlias.delete(k)}getAtlasAlias(k){return this._atlasFrameAlias.has(k)?this._atlasFrameAlias.get(k):null}addSliceData(k,B){this._sliceData.set(k,B)}getSliceData(k){return this._sliceData.get(k)}get cacheMap(){return this._cacheMap}constructor(k){this._atlasFrameAlias=new Map,this._sliceData=new Map,this._game=k,this._cacheMap=new Map,this._cacheMap.set(q.r.IMAGE,new Map),this._cacheMap.set(q.r.TEXTURE_ATLAS,new Map),this._cacheMap.set(q.r.JSON,new Map),this._cacheMap.set(q.r.SOUND,new Map),this._cacheMap.set(q.r.TEXT,new Map),this._cacheMap.set(q.r.RENDER_TEXTURE,new Map),this._cacheMap.set(q.r.BITMAPDATA,new Map),this._cacheMap.set(q.r.SPINE,new Map)}getKeys(k){return this.hasMap(k)?Array.from(this._cacheMap.get(k).keys()):[]}getSpine(k){const B=this.getMap(q.r.SPINE);if(!B.has(k))return null;let U=!0;const F=B.get(k),G=F.spineData;return F.destroyed&&!G&&(U=!1),U?G:(this.deleteStaleCache(B,k,q.e.SPINE),this.deleteStaleCache(B,k,q.e.TEXT),this.deleteStaleCache(B,`${k}Atlas`,q.e.JSON),null)}getImage(k){const B=this.getMap(q.r.IMAGE);if(!B.has(k))return null;const U=B.get(k),F=U.image;return U.destroyed||!F?(this.deleteStaleCache(B,k,q.e.IMAGE),null):F}getTexture(k,B){let U=k,G=B;const j=this.getMap(q.r.IMAGE),H=this.getAtlasAlias(k);if(H&&(U=H.atlasGuid,G=H.atlasFrame),j.has(U)){const k=j.get(U);if(k.destroyed||!k.image&&k.texture.baseTexture.resource)this.deleteStaleCache(j,U,q.e.IMAGE);else{if($.A.isDefined(G)){const B=k.subTextures[G];if(B&&null!==B.textureCacheIds&&B.baseTexture&&!B.baseTexture.destroyed)return B}const B=k.texture;if(B&&null!==B.textureCacheIds&&B.baseTexture&&!B.baseTexture.destroyed)return B;this.deleteStaleCache(j,U,q.e.IMAGE)}}return F.Texture.EMPTY}getFrameData(k,B=q.r.TEXTURE_ATLAS){const U=this.getMap(B);if(!U.has(k))return null;const F=U.get(k),G=F.frameData;return F.destroyed||!$.A.isDefined(G)||G.destroyed?(this.deleteStaleCache(U,k,Object.values(q.e)[B]),null):G}getFrameByName(k,B,U=q.r.TEXTURE_ATLAS){const F=this.getFrameData(k,U);return F?(B||j.V.log(`Cache getFrameByName called with no frame name: ${k}`,G.$.Error),F.getFrameByName(B)):null}getJSON(k){const B=this.getMap(q.r.JSON);if(!B.has(k))return null;const U=B.get(k),F=U.json;return U.destroyed||!$.A.isDefined(F)?(this.deleteStaleCache(B,k,q.e.JSON),null):F}getSound(k){const B=this.getMap(q.r.SOUND);if(!B.has(k))return null;const U=B.get(k),F=U.sound;return U.destroyed||!F||F.isDestroyed||!F.sound?(this.deleteStaleCache(B,k,q.e.SOUND),null):F}getText(k){const B=this.getMap(q.r.TEXT);if(!B.has(k))return null;const U=B.get(k),F=U.text;return U.destroyed||!$.A.isDefined(F)?(this.deleteStaleCache(B,k,q.e.TEXT),null):F}getRenderTexture(k){const B=this.getMap(q.r.RENDER_TEXTURE);if(!B.has(k))return null;const U=B.get(k),F=U.renderTexture;return U.destroyed||!F||null===F.textureCacheIds?(this.deleteStaleCache(B,k,q.e.RENDER_TEXTURE),null):F}getBitmapData(k){const B=this.getMap(q.r.BITMAPDATA);if(!B.has(k))return null;const U=B.get(k),F=U.bitmapData;return U.destroyed||!F||null===F.textureCacheIds?(this.deleteStaleCache(B,k,q.e.BITMAPDATA),null):F}getTextureAtlas(k){const B=this.getMap(q.r.TEXTURE_ATLAS);if(!B.has(k))return null;const U=B.get(k);return U.destroyed?(this.deleteStaleCache(B,k,q.e.TEXTURE_ATLAS),null):U}addSpine(k,B){this.addItem(k,q.r.SPINE,new J(k,B))}addImage(k,B,U){const F=this.getMap(q.r.IMAGE).get(k);if(F&&$.A.isDefined(U)){const $=`${U}`;return F.subTextures[$]&&j.V.log(`Warning: The frame key ${$} already exists as a subtexture in the texture key ${k}. Overwritting...`,G.$.Warning),void(F.subTextures[$]=B)}const H=new Y.E(this._game,k,B);this.addItem(k,q.r.IMAGE,H)}addTextureAtlas(k,B,U){const F=new et.Z(this._game,k,k,U);this.addItem(k,q.r.TEXTURE_ATLAS,F)}addBitmapData(k,B,U){let F=U;return void 0===F&&(F=new W.o,F.addFrame(new V.w(0,B.frame.x,B.frame.y,B.frame.width,B.frame.height,k))),this.addItem(k,q.r.BITMAPDATA,new z(H.W.instance.game,k,B,F)),B}addRenderTexture(k,B){const U=new W.o;U.addFrame(new V.w(0,0,0,B.width,B.height,"")),this.addItem(k,q.r.RENDER_TEXTURE,new X(H.W.instance.game,k,B,U))}addJSON(k,B){this.addItem(k,q.r.JSON,new Q.F(this._game,k,B))}addSound(k,B){this.addItem(k,q.r.SOUND,new Z.I(this._game,k,B))}addText(k,B){this.addItem(k,q.r.TEXT,new tt.q(this._game,k,B))}checkKey(k){for(const B of this._cacheMap.values())if(B.has(k))return!0;return!1}checkImageKey(k){return null!==this.getImage(k)}checkTextureAtlasKey(k){return null!==this.getTextureAtlas(k)}checkRenderTextureKey(k){return null!==this.getRenderTexture(k)}checkBitmapDataKey(k){return null!==this.getBitmapData(k)}checkJSONKey(k){return null!==this.getJSON(k)}checkSoundKey(k){return null!==this.getSound(k)}checkTextKey(k){return null!==this.getText(k)}checkFrameData(k){return null!==this.getFrameData(k)}checkSpineKey(k){return null!==this.getSpine(k)}removeSpine(k){this.removeItem(k,q.r.SPINE)}removeImage(k){this.removeItem(k,q.r.IMAGE)}removeJSON(k){this.removeItem(k,q.r.JSON)}removeSound(k){this.removeItem(k,q.r.SOUND)}removeText(k){this.removeItem(k,q.r.TEXT)}removeTextureAtlas(k){this.removeItem(k,q.r.TEXTURE_ATLAS)}removeBitmapData(k){this.removeItem(k,q.r.BITMAPDATA)}removeRenderTexture(k){this.removeItem(k,q.r.RENDER_TEXTURE)}destroy(){this.removeAllItems(),this._cacheMap.clear()}getMap(k){return this._cacheMap.get(k)}addItem(k,B,U){this._cacheMap.get(B).set(k,U)}removeItem(k,B){const U=this._cacheMap.get(B);U.has(k)&&(U.get(k).destroy(),U.delete(k))}removeAllItemsOfType(k){this.getKeys(k).forEach((B=>{this.removeItem(B,k)}))}removeAllItems(){it.getAssetTypeIDs().forEach((k=>{this.removeAllItemsOfType(k)}))}hasMap(k){return this._cacheMap.has(k)}isSoundDecoded(k){const B=this.getMap(q.r.SOUND).get(k);if(B){const k=B.sound;if(k)return k.isLoaded}return!1}deleteStaleCache(k,B,U){j.V.log(`--- ${U} ${it.CACHE_WARNING} ${B} ---`,G.$.Warning),k.delete(B)}}it.CACHE_WARNING="found in cache that has been destroyed. Clearing cache for: "},52777:(k,B,U)=>{"use strict";var F,G;U.d(B,{e:()=>G,r:()=>F}),function(k){k[k.BITMAPDATA=0]="BITMAPDATA",k[k.IMAGE=1]="IMAGE",k[k.JSON=2]="JSON",k[k.RENDER_TEXTURE=3]="RENDER_TEXTURE",k[k.SOUND=4]="SOUND",k[k.SPINE=5]="SPINE",k[k.TEXT=6]="TEXT",k[k.TEXTURE_ATLAS=7]="TEXTURE_ATLAS"}(F||(F={})),function(k){k.BITMAPDATA="BitmapData",k.IMAGE="Image",k.JSON="Json",k.RENDER_TEXTURE="RenderTexture",k.SOUND="Sound",k.SPINE="Spine",k.TEXT="Text",k.TEXTURE_ATLAS="TextureAtlas"}(G||(G={}))},72077:(k,B,U)=>{"use strict";U.d(B,{a:()=>Q});var F,G=U(8674),j=U(34711),$=U(68910),H=U(5191),V=U(80267),W=U(62481),q=U(61806),K=U(50740),z=U(15740),Y=U(66032);!function(k){k.JSON="json",k.IMAGE="image",k.AUDIO="audio",k.ATLAS="atlas",k.SPINE="spine",k.SPRITESHEET="spritesheet"}(F||(F={}));class Q{static renameJSONKeys(k,B){const U=Object.keys(k).map((U=>({[B.get(U)||U]:k[U]})));return Object.assign({},...U)}get crossOrigin(){return this._crossOrigin}set crossOrigin(k){this._crossOrigin=k}get baseURL(){return $.Assets.resolver.basePath}set baseURL(k){$.Assets.resolver.basePath=k}get isLoading(){return this._isloading}totalQueuedFiles(){return this._loadingDictionary.size}constructor(){this._queue=[],this._immediateQueue=[],this._loadingDictionary=new Map,this._wasFail=!1,this._isLoading=!1,this.onLoadComplete=new z.H,this.onFileStart=new z.H,this.onFileComplete=new z.H,this.onFileLoadComplete=new z.H,this.onFilesLoaded=new z.H,this._isloading=!1,this.onReset=new z.H,this._crossOrigin="anonymous",$.Assets.resolver.basePath="",$.loadTextures.config={preferWorkers:!1,preferCreateImageBitmap:!1,crossOrigin:"anonymous"},$.extensions.add(j.kx)}removeFromLoadingQueue(k){if(this._loadingDictionary.has(k)){const B=this._loadingDictionary.get(k);return this._loadingDictionary.delete(k),B}return null}isInQueue(k){return this._queue.some((B=>B.key===k))}isInImmediateQueue(k){return this._immediateQueue.some((B=>B.key===k))}isInLoadingQueue(k){return this._loadingDictionary.has(k)}start(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._isLoading){for(let k=0;k(0,G.sH)(this,void 0,void 0,(function*(){const B=Object.keys(k);let U=0;for(let G=0;G{this._wasFail=!0,this._isloading=!1;const B=Array.from(this._loadingDictionary.keys()),U=W.R.stringify(k);B.forEach((k=>{const B=this._loadingDictionary.get(k).url.split(/\?\w+=/)[0];if(U.includes(B)){this.removeFromLoadingQueue(k);this.onFileLoadComplete.dispatch(k,!1)}})),W.R.logError(k,"Promise rejected while loading assets in framework loader"),this.finalizeLoad()}))}))}finalizeLoad(){if(this._immediateQueue.length>0){for(let k=0;k{const B=k.metaData;B.frameWidth=U,B.frameHeight=G,B.extruded=j,B.spritesheetMargin=$,B.spritesheetSpacing=H}))}audio(k,B,U=!0,G){if(0===B.length)return;let j=`${B[0].substring(0,B[0].lastIndexOf(".")+1)}{${B[0].substr(B[0].lastIndexOf(".")+1)}`;for(let F=1;F{k.metaData.spineAtlasSuffix=G}))}destroy(){this.onFileComplete.dispose(),this.onFileStart.dispose(),this.onFileLoadComplete.dispose(),this.onLoadComplete.dispose(),this.onReset.dispose(),this.onFilesLoaded.dispose()}getResourceData(k){var B;return null!==(B=this._loadingDictionary.get(k))&&void 0!==B?B:null}addFile(k,B,U,F,G){if(this.isInLoadingQueue(B)||this.isInQueue(B)||this.isInImmediateQueue(B))return;const j={type:k,key:B,url:U,onAssetQueuedCallback:G,parentResourceKey:F,isLoading:!1,metaData:{}};this._isLoading?this._queue.push(j):this.addFileToInternalLoader(j)}addFileToInternalLoader(k){this._loadingDictionary.set(k.key,k),k.type===F.JSON?$.Assets.add({alias:k.key,src:k.url,loadParser:"loadJson"}):$.Assets.add({alias:k.key,src:k.url}),k.onAssetQueuedCallback&&k.onAssetQueuedCallback(this._loadingDictionary.get(k.key))}processJSON(k,B,U){k.addJSON(U,B)}processImage(k,B,U){k.addImage(U,B)}processSound(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){let F=B;B.instances||(F=yield new Promise(((k,U)=>j.AB.from({url:B.url,preload:!0,loaded(B,F){B?U(B):k(F)}}))));const G=new K.K(F,q.W.instance.game,U,j.s3.useLegacy);k.addSound(U,G)}))}processTextureAtlas(k,B,U){const F={frames:{}};let G;(null==B?void 0:B.baseTexture)&&(G=new $.Texture(B.baseTexture)),G?k.addImage(U,G):V.V.log(`Atlas resource with key ${U} has no texture.`,H.$.Warning),B.textures?Object.keys(B.textures).forEach((G=>{const j=B.textures[G],H=B._frames[G];if(F.frames[G]=H,j.baseTexture)k.addImage(U,j,G);else{const F=new $.Texture(B.baseTexture);F.frame=new $.Rectangle(H.frame.x,H.frame.y,H.frame.w,H.frame.h),k.addImage(U,F,G)}})):V.V.log(`Atlas resource with key ${U} has no textures array.`,H.$.Warning),k.addTextureAtlas(U,G,Y.o.configToFrameData(F))}processSpine(k,B,U){k.addSpine(U,B)}processSpritesheet(k,B,U,F){var G,j;const H={frames:{}},V=F.metaData,W=V.frameWidth,q=V.frameHeight,K=B.width/W,z=B.height/q,Q=V.extruded,X=Q?null!==(G=V.spritesheetMargin)&&void 0!==G?G:1:0,Z=Q?null!==(j=V.spritesheetSpacing)&&void 0!==j?j:2:0,J=B.height/(q+Z)|0,tt=B.width/(W+Z)|0;let et=X,it=X,st=0;for(let Y=0;Y{"use strict";U.d(B,{E:()=>V});var F=U(8674),G=U(68910),j=U(80267),$=U(5191),H=U(88651);class V extends H.${constructor(k,B,U){var F,G;super(k,B),this.texture=U,this.subTextures={},U||j.V.log(`CachedImageResource texture is null for key: ${B}`,$.$.Error),this.image=null===(G=null===(F=U.baseTexture)||void 0===F?void 0:F.resource)||void 0===G?void 0:G.source}destroy(){const k=Object.create(null,{destroy:{get:()=>super.destroy}});return(0,F.sH)(this,void 0,void 0,(function*(){yield G.Assets.unload(this.key),Object.values(this.subTextures).forEach((k=>{k.destroy()})),this.subTextures={},this.texture.destroy(),this.texture=null,k.destroy.call(this)}))}}},37061:(k,B,U)=>{"use strict";U.d(B,{F:()=>G});var F=U(88651);class G extends F.${constructor(k,B,U){super(k,B),this.json=U}destroy(){this.json=null,super.destroy()}}},88651:(k,B,U)=>{"use strict";U.d(B,{$:()=>F});class F{get destroyed(){return this._destroyed}constructor(k,B){this._destroyed=!1,this.game=k,this.key=B}destroy(){this._destroyed=!0}}},89460:(k,B,U)=>{"use strict";U.d(B,{I:()=>G});var F=U(88651);class G extends F.${constructor(k,B,U){super(k,B),this.sound=U}destroy(){this.game.sound.remove(this.sound),this.sound=null,super.destroy()}}},49356:(k,B,U)=>{"use strict";U.d(B,{q:()=>G});var F=U(88651);class G extends F.${constructor(k,B,U){super(k,B),this.text=U}destroy(){this.text=null,super.destroy()}}},90157:(k,B,U)=>{"use strict";U.d(B,{Z:()=>G});var F=U(88651);class G extends F.${constructor(k,B,U,F){super(k,B),this.imageKey=U,this.frameData=F}destroy(){this.game.cache.removeImage(this.imageKey),super.destroy()}}},49415:(k,B,U)=>{"use strict";U.d(B,{J:()=>j});var F=U(55539),G=U(39002);class j{static getOffsetX(k){return(void 0!==k.anchor?k.anchor.x:0)*Math.abs(k.width)}static getOffsetY(k){return(void 0!==k.anchor?k.anchor.y:0)*Math.abs(k.height)}static getCenterX(k){let B=k.x+.5*Math.abs(k.width);return void 0!==k.getLocalBounds&&(B+=k.getLocalBounds().x),void 0!==k.offsetX&&(B-=k.offsetX),B}static setCenterX(k,B){k.x+=B-this.getCenterX(k)}static getCenterY(k){let B=k.y+.5*Math.abs(k.height);return void 0!==k.getLocalBounds&&(B+=k.getLocalBounds().y),void 0!==k.offsetY&&(B-=k.offsetY),B}static setCenterY(k,B){k.y+=B-this.getCenterY(k)}static getLeft(k){let B=k.x;return void 0!==k.getLocalBounds&&(B+=k.getLocalBounds().x),void 0!==k.offsetX&&(B-=k.offsetX),B}static setLeft(k,B){k.x+=B-this.getLeft(k)}static getRight(k){let B=k.x+Math.abs(k.width);return void 0!==k.getLocalBounds&&(B+=k.getLocalBounds().x),void 0!==k.offsetX&&(B-=k.offsetX),B}static setRight(k,B){k.x+=B-this.getRight(k)}static getTop(k){let B=k.y;return void 0!==k.getLocalBounds&&(B+=k.getLocalBounds().y),void 0!==k.offsetY&&(B-=k.offsetY),B}static setTop(k,B){k.y+=B-this.getTop(k)}static getBottom(k){let B=k.y+Math.abs(k.height);return void 0!==k.getLocalBounds&&(B+=k.getLocalBounds().y),void 0!==k.offsetY&&(B-=k.offsetY),B}static setBottom(k,B){k.y+=B-this.getBottom(k)}static alignIn(k,B,U=F.C.TOP_LEFT,G=0,$=0){switch(U){default:case F.C.TOP_LEFT:j.setLeft(B,k.left-G),j.setTop(B,k.top-$);break;case F.C.TOP_CENTER:j.setCenterX(B,k.centerX+G),j.setTop(B,k.top-$);break;case F.C.TOP_RIGHT:j.setRight(B,k.right+$),j.setTop(B,k.top-$);break;case F.C.LEFT_CENTER:j.setLeft(B,k.left-G),j.setCenterY(B,k.centerY+$);break;case F.C.CENTER:j.setCenterX(B,k.centerX+G),j.setCenterY(B,k.centerY+$);break;case F.C.RIGHT_CENTER:j.setRight(B,k.right+G),j.setCenterY(B,k.centerY+$);break;case F.C.BOTTOM_LEFT:j.setLeft(B,k.left-G),j.setBottom(B,k.bottom+$);break;case F.C.BOTTOM_CENTER:j.setCenterX(B,k.centerX+G),j.setBottom(B,k.bottom+$);break;case F.C.BOTTOM_RIGHT:j.setRight(B,k.right+G),j.setBottom(B,k.bottom+$)}}static alignTo(k,B,U=F.C.TOP_LEFT,G=0,$=0){switch(U){default:case F.C.TOP_LEFT:j.setLeft(B,k.left-G),j.setBottom(B,k.top-$);break;case F.C.TOP_CENTER:j.setCenterX(B,k.centerX+G),j.setBottom(B,k.top-$);break;case F.C.TOP_RIGHT:j.setRight(B,k.right+G),j.setBottom(B,k.top-$);break;case F.C.LEFT_TOP:j.setRight(B,k.left-G),j.setTop(B,k.top-$);break;case F.C.LEFT_CENTER:j.setRight(B,k.left-G),j.setCenterY(B,k.centerY+$);break;case F.C.LEFT_BOTTOM:j.setRight(B,k.left-G),j.setBottom(B,k.bottom+$);break;case F.C.RIGHT_TOP:j.setLeft(B,k.right+G),j.setTop(B,k.top-$);break;case F.C.RIGHT_CENTER:j.setLeft(B,k.right+G),j.setCenterY(B,k.centerY+$);break;case F.C.RIGHT_BOTTOM:j.setLeft(B,k.right+G),j.setBottom(B,k.bottom+$);break;case F.C.BOTTOM_LEFT:j.setLeft(B,k.left-G),j.setTop(B,k.bottom+$);break;case F.C.BOTTOM_CENTER:j.setCenterX(B,k.centerX+G),j.setTop(B,k.bottom+$);break;case F.C.BOTTOM_RIGHT:j.setRight(B,k.right+G),j.setTop(B,k.bottom+$)}}static applyMatrixToBounds(k,B){const U=B.apply({x:k.left,y:k.top}),F=B.apply({x:k.right,y:k.bottom});return{left:U.x,right:F.x,top:U.y,bottom:F.y}}static applyInverseMatrixToBounds(k,B){const U=B.applyInverse({x:k.left,y:k.top}),F=B.applyInverse({x:k.right,y:k.bottom});return{left:U.x,right:F.x,top:U.y,bottom:F.y}}static mergeBounds(k,B){return k.left=Math.min(k.left,B.left),k.right=Math.max(k.right,B.right),k.top=Math.min(k.top,B.top),k.bottom=Math.max(k.bottom,B.bottom),k}static intersectBounds(k,B){k.left=Math.max(k.left,B.left),k.right=Math.min(k.right,B.right),k.top=Math.max(k.top,B.top),k.bottom=Math.min(k.bottom,B.bottom)}static areEqual(k,B,U){return G.c.isNearlyEqual(k.left,B.left,U)&&G.c.isNearlyEqual(k.right,B.right,U)&&G.c.isNearlyEqual(k.top,B.top,U)&&G.c.isNearlyEqual(k.bottom,B.bottom,U)}}},39002:(k,B,U)=>{"use strict";U.d(B,{_:()=>F,c:()=>$});var F,G=U(95891),j=U(68910);!function(k){k.X="x",k.Y="y",k.Z="z"}(F||(F={}));class ${static degreesToRadians(k){return k*$.DEGREES_TO_RAD}static radiansToDegrees(k){return k*$.RAD_TO_DEGREES}static isNearlyEqual(k,B,U=1e-5){return Math.abs(k-B)0&&0==(k&k-1))return k;{let B=1;for(;B0&&0==(k&k-1)&&B>0&&0==(B&B-1)}static random(k=0,B=1){return k===B?k:Math.random()*(B-k)+k}static between(k=0,B=1){let U=k,F=B;return U===F?U:(U=Math.round(U),F=Math.round(F),Math.floor(Math.random()*(F-U+1))+U)}static fuzzyEqual(k,B,U=$.EPSILON){return Math.abs(k-B)B-U}static average(...k){let B=0;for(let U=0;U=$.PI2-U?F=G:(Math.abs(G-F)>Math.PI&&(GF?F+=U:GB[F]&&(F=U);return B[F]}static minProperty(k,...B){const U=G.flatten(B);let F=1,j=0;const $=U.length;for(;F<$;F++)U[F][k]U[j][k]&&(j=F);return U[j][k]}static wrapAngle(k,B){return B?this.wrap(k,-Math.PI,Math.PI):this.wrap(k,-180,180)}static linearInterpolation(k,B){const U=k.length-1,F=U*B,G=Math.floor(F);return B<0?this.linear(k[0],k[1],F):B>1?this.linear(k[U],k[U-1],U-F):this.linear(k[G],k[G+1>U?U:G+1],F-G)}static bezierInterpolation(k,B){let U=0;const F=k.length-1;for(let G=0;G<=F;G++)U+=Math.pow(1-B,F-G)*Math.pow(B,G)*k[G]*this.bernstein(F,G);return U}static catmullRomInterpolation(k,B){const U=k.length-1;let F=U*B,G=Math.floor(F);return k[0]===k[U]?(B<0&&(G=Math.floor(F=U*(B+1))),this.catmullRom(k[(G-1+U)%U],k[G],k[(G+1)%U],k[(G+2)%U],F-G)):B<0?k[0]-(this.catmullRom(k[0],k[0],k[1],k[1],-F)-k[0]):B>1?k[U]-(this.catmullRom(k[U],k[U],k[U-1],k[U-1],F-U)-k[U]):this.catmullRom(k[G>0?G-1:0],k[G],k[U0;)B*=U;return this.clamp(B,Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}static catmullRom(k,B,U,F,G){const j=.5*(U-k),$=.5*(F-B),H=G*G;return(2*B-2*U+j+$)*(G*H)+(-3*B+3*U-2*j-$)*H+j*G+B}static difference(k,B){return Math.abs(k-B)}static roundAwayFromZero(k){return k>0?Math.ceil(k):Math.floor(k)}static sinCosGenerator(k,B=1,U=1,F=1){let G=B,j=U;const $=F*Math.PI/k,H=[],V=[];for(let W=0;W0?1:0}static percent(k,B,U=0){return k>B||U>B?1:kk?0:(k-U)/B}static circumferencePoint(k,B,U,F=-1,G=!0){const H=F>0?.5*F:1;let V=U;G||(V=$.degToRad(U));const W=new j.Point;return W.x=k+H*Math.cos(V),W.y=B+H*Math.sin(V),W}static clampedLerp(k,B,U){let F=U<0?0:U;return F=F>1?1:F,k+(B-k)*F}static inverseLerp(k,B,U){return(U-k)/(B-k)}static validateInt(k,B=0){if("number"!=typeof k){const U=parseInt(k,10);return Number.isNaN(U)?B:U}return Number.isNaN(k)?B:k}static normalizeRange(k,B,U){return B>k?(U-k)/(B-k):BB.left&&k.topB.top}static getAABBforPoints(k){const B={left:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,top:Number.POSITIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY};return k.forEach((k=>{B.left=Math.min(k.x,B.left),B.right=Math.max(k.x,B.right),B.top=Math.min(k.y,B.top),B.bottom=Math.max(k.y,B.bottom)})),B}}$.DEGREES_TO_RAD=Math.PI/180,$.RAD_TO_DEGREES=180/Math.PI,$.EPSILON=1e-4,$.PI2=2*Math.PI,$.TAU=2*Math.PI,$.PHI=1.61803398875,$.DEG_TO_RAD=Math.PI/180,$.RAD_TO_DEG=180/Math.PI},13409:(k,B,U)=>{"use strict";U.d(B,{b:()=>G});var F=U(32154);class G{constructor(k=[]){this.c=1,this.s0=0,this.s1=0,this.s2=0,"string"==typeof k?this.state(k):this.sow(k)}rnd(){const k=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|k,this.s0=this.s1,this.s1=this.s2,this.s2=k-this.c,this.s2}sow(k){if(this.s0=this.hash(" "),this.s1=this.hash(this.s0),this.s2=this.hash(this.s1),this.c=1,k)for(let B=0;B>>0,B-=F,B*=F,F=B>>>0,B-=F,F+=4294967296*B;return 2.3283064365386963e-10*(F>>>0)}integer(){return 4294967296*this.rnd.apply(this)}frac(){return this.rnd.apply(this)+11102230246251565e-32*(2097152*this.rnd.apply(this)|0)}real(){return this.integer()+this.frac()}integerInRange(k,B){return Math.floor(this.realInRange(0,B-k+1)+k)}realInRange(k,B){return this.frac()*(B-k)+k}normal(){return 1-2*this.frac()}pick(k){return k[this.integerInRange(0,k.length-1)]}sign(){return this.pick([-1,1])}weightedPick(k){return k[~~(Math.pow(this.frac(),2)*(k.length-1)+.5)]}angle(){return this.integerInRange(-180,180)}shuffle(k){const B=k.length-1;for(let U=B;U>0;U--){const F=Math.floor(this.frac()*(B+1)),G=k[F];k[F]=k[U],k[U]=G}return k}state(k=""){if(k.match(/^!rnd/)){const B=k.split(",");this.c=parseFloat(B[1]),this.s0=parseFloat(B[2]),this.s1=parseFloat(B[3]),this.s2=parseFloat(B[4])}return["!rnd",this.c,this.s0,this.s1,this.s2].join(",")}uuid(){let k,B=0;for(k="";B++<36;k+=(~B%5|3*B&4)>0?((15^B)>0?8^this.frac()*((20^B)>0?16:4):4).toString(16):"-");return k}}},15308:(k,B,U)=>{"use strict";U.d(B,{M:()=>H});var F=U(68910),G=U(80267),j=U(5191),$=U(32154);class H extends F.Rectangle{get offsetX(){return this.x+.5*this.width}set offsetX(k){this.x=k-.5*this.width}get offsetY(){return this.y+.5*this.height}set offsetY(k){this.y=k-.5*this.height}get anchor(){return new F.Point(0,0)}get bottomRight(){return new F.Point(this.right,this.bottom)}set bottomRight(k){this.x=k.x-this.width,this.y=k.y-this.height}get bottomLeft(){return new F.Point(this.x,this.bottom)}set bottomLeft(k){this.x=k.x,this.y=k.y-this.height}get centerX(){return this.x+this.halfWidth}set centerX(k){this.x=k-this.halfWidth}get centerY(){return this.y+this.halfHeight}set centerY(k){this.y=k-this.halfHeight}get empty(){return!$.A.isDefined(this.width)||!$.A.isDefined(this.height)}set empty(k){k&&this.setTo(0,0,0,0)}get halfHeight(){return Math.round(this.height/2)}get halfWidth(){return Math.round(this.width/2)}get topLeft(){return new F.Point(this.x,this.y)}set topLeft(k){this.x=k.x,this.y=k.y}get topRight(){return new F.Point(this.x+this.width,this.y)}set topRight(k){this.x=k.x-this.width,this.y=k.y}setTo(k,B,U,F){return this.x=k,this.y=B,this.width=U,this.height=F,this}resize(k,B){return this.width=k,this.height=B,this}setPosition(k,B){this.x=k,this.y=B}intersectsRectValues(k,B,U,F){return H.intersects(this,new H(k,B,U,F))}static intersects(k,B){return!(k.width<=0||k.height<=0||B.width<=0||B.height<=0)&&!(k.rightB.right||k.y>B.bottom)}static clone(k){return k?new H(k.x,k.y,k.width,k.height):(G.V.log("Clone failed. Rect does not exist.",j.$.Error),null)}static sameDimensions(k,B){return k.width===B.width&&k.height===B.height}static containsRaw(k,B,U,F,G,j){return G>=k&&G=B&&j{"use strict";var F;U.d(B,{Q:()=>G,y:()=>F}),function(k){k[k.BLACK=0]="BLACK",k[k.RED=16711680]="RED",k[k.ORANGE=16750848]="ORANGE",k[k.YELLOW=16776960]="YELLOW",k[k.GREEN=65280]="GREEN",k[k.AQUA=65535]="AQUA",k[k.BLUE=255]="BLUE",k[k.VIOLET=16711935]="VIOLET",k[k.WHITE=16777215]="WHITE",k[k.GRAY=6710886]="GRAY"}(F||(F={}));class G{static numberToHexString(k){let B="";return k>16777215?(B+=`0${((4278190080&k)>>>24).toString(16)}`.slice(-2),B+=`0${((16711680&k)>>>16).toString(16)}`.slice(-2),B+=`0${((65280&k)>>>8).toString(16)}`.slice(-2),B+=`0${(255&k).toString(16)}`.slice(-2)):(B+=`0${((16711680&k)>>>16).toString(16)}`.slice(-2),B+=`0${((65280&k)>>>8).toString(16)}`.slice(-2),B+=`0${(255&k).toString(16)}`.slice(-2),B+="FF"),`#${B.toUpperCase()}`}static convertPixelToGreyscale(k,B,U){return.3*k+.59*B+.11*U}static createColor(k=0,B=0,U=0,F=1,j=0,$=0,H=0,V=0){const W={r:k,g:B,b:U,a:F,h:j,s:$,l:H,v:V,color:0,color32:0,rgba:""};return G.updateColor(W)}static updateColor(k){return k.rgba=`rgba(${k.r.toFixed()},${k.g.toFixed()},${k.b.toFixed()},${k.a.toString()})`,k.color=G.getColor(k.r,k.g,k.b),k.color32=G.getColor32(255*k.a,k.r,k.g,k.b),k}static getColor32(k,B,U,F){return k<<24|B<<16|U<<8|F}static getColor(k,B,U){return k<<16|B<<8|U}static hexToRGB(k){const B=G.hexToColor(k);if(B)return G.getColor32(B.a,B.r,B.g,B.b)}static hexToColor(k,B){const U=k.replace(/^(?:#|0x)?([a-f\d])([a-f\d])([a-f\d])$/i,((k,B,U,F)=>B+B+U+U+F+F)),F=/^(?:#|0x)?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(U);if(F){const k=parseInt(F[1],16),U=parseInt(F[2],16),j=parseInt(F[3],16);if(!B)return G.createColor(k,U,j);B.r=k,B.g=U,B.b=j}return B}static hexToRGBArray(k){return[(k>>16&255)/255,(k>>8&255)/255,(255&k)/255]}static RGBArrayToHex(k){return(255*k[0]<<16)+(255*k[1]<<8)+255*k[2]}static getRGB(k){return k>16777215?{alpha:k>>>24,red:k>>16&255,green:k>>8&255,blue:255&k,a:k>>>24,r:k>>16&255,g:k>>8&255,b:255&k}:{alpha:255,red:k>>16&255,green:k>>8&255,blue:255&k,a:255,r:k>>16&255,g:k>>8&255,b:255&k}}}},39688:(k,B,U)=>{"use strict";U.d(B,{w:()=>V});var F=U(68910),G=U(80267),j=U(5191),$=U(39002),H=U(15308);class V extends F.Rectangle{constructor(k,B,U,F,H,V){super(B,U,F,H),this.index=k,0!==this.width&&0!==this.height||G.V.log(`Frame: Frame ${this.name} has a width or height of zero`,j.$.Warning),this.name=V,this.centerX=Math.floor(F/2),this.centerY=Math.floor(H/2),this.distance=$.c.distance(0,0,F,H),this.sourceSizeW=F,this.sourceSizeH=H}resize(k,B){this.width=k,this.height=B,this.centerX=Math.floor(k/2),this.centerY=Math.floor(B/2),this.distance=$.c.distance(0,0,k,B),this.sourceSizeW=k,this.sourceSizeH=B}setTrim(k,B,U,F,G,j,$){this.trimmed=k,k&&(this.sourceSizeW=B,this.sourceSizeH=U,this.centerX=Math.floor(B/2),this.centerY=Math.floor(U/2),this.spriteSourceSizeX=F,this.spriteSourceSizeY=G,this.spriteSourceSizeW=j,this.spriteSourceSizeH=$)}clone(){const k=new V(this.index,this.x,this.y,this.width,this.height,this.name);for(const B in this)this.hasOwnProperty(B)&&(k[B]=this[B]);return k}getRect(k){let B=k;return null==B?B=new H.M(this.x,this.y,this.width,this.height):B.setTo(this.x,this.y,this.width,this.height),B}}},66032:(k,B,U)=>{"use strict";U.d(B,{o:()=>H});var F=U(80267),G=U(5191),j=U(32154),$=U(39688);class H{constructor(){this._frames=[],this._frameNames=new Map,this._destroyed=!1}get destroyed(){return this._destroyed}get total(){return this._frames.length}addFrame(k){return k.index=this._frames.length,this._frames.push(k),j.A.isDefined(k.name)&&""!==k.name&&this._frameNames.set(k.name,k.index),k}getFrame(k){return"string"==typeof k?(k||F.V.log(`frame name get with no name: ${k}`,G.$.Error),this.getFrameByName(k)):this._frames[k>=this._frames.length?0:k]}getFrameByName(k){if("number"==typeof k)return this.getFrame(k);const B=this._frameNames.get(k);return"number"==typeof B?this._frames[B]:(F.V.log(`Frame does not exist with name: ${k}`,G.$.Warning),null)}checkFrameName(k){return this._frameNames.has(k)}clone(){const k=new H;for(let B=0;B{"use strict";U.d(B,{B:()=>H});var F,G=U(68910),j=U(57530),$=U(71392);!function(k){k.BLUR="blur",k.PAGE_HIDE="pagehide",k.CLICK="click",k.FOCUS="focus",k.PAGE_SHOW="pageshow",k.PAUSE="pause",k.RESUME="resume"}(F||(F={}));class H extends $.m{setBackgroundColor(k){this.game.app.renderer.background.backgroundColor.setValue(k),this.game.app.view.parentElement.style.backgroundColor=G.Color.shared.setValue(k).toHex()}get game(){return this._game}get width(){return this.game.width}get height(){return this.game.height}get camera(){return j.i.main}constructor(k){super(),this.disableVisibilityChange=!1,this._hiddenVar="hidden",this._game=k,this.name="_stage_root",this.game.stage=this,this.interactiveChildren=!0,this.game.config&&this.parseConfig(this.game.config),k.app.stage&&(k.app.stage.addChild(this),this.zIndex=k.app.stage.children.length)}parseConfig(k){k.disableVisibilityChange&&(this.disableVisibilityChange=k.disableVisibilityChange)}boot(){this.checkVisibility()}checkVisibility(){const k=document;void 0!==k.hidden?this._hiddenVar="visibilitychange":void 0!==k.webkitHidden?this._hiddenVar="webkitvisibilitychange":void 0!==k.mozHidden?this._hiddenVar="mozvisibilitychange":void 0!==k.msHidden?this._hiddenVar="msvisibilitychange":this._hiddenVar=null,this._onChange=k=>{this.visibilityChange(k)},this._onChangePause=()=>{this._onChange({type:F.PAUSE})},this._onChangeResume=()=>{this._onChange({type:F.RESUME})},this._onClick=k=>{void 0===document.hasFocus||document.hasFocus()||this.visibilityChange(k)},this._hiddenVar&&document.addEventListener(this._hiddenVar,this._onChange,!1),window.onblur=this._onChange,window.onfocus=this._onChange,window.onpagehide=this._onChange,window.onpageshow=this._onChange,window.addEventListener(F.CLICK,this._onClick)}visibilityChange(k){switch(k.type){case F.BLUR:case F.PAGE_HIDE:return void this.game.focusLoss(k);case F.CLICK:case F.FOCUS:case F.PAGE_SHOW:return void this.game.focusGain(k)}if(this.disableVisibilityChange)return;const B=document;B.hidden||B.mozHidden||B.msHidden||B.webkitHidden||k.type===F.PAUSE?this.game.gamePaused(k):this.game.gameResumed(k)}destroy(){this._hiddenVar&&document.removeEventListener(this._hiddenVar,this._onChange,!1),window.onpagehide=null,window.onpageshow=null,window.onblur=null,window.onfocus=null,window.removeEventListener(F.CLICK,this._onClick),super.destroy({children:!0,texture:!0,baseTexture:!0})}}},16649:(k,B,U)=>{"use strict";U.d(B,{b:()=>F,y:()=>V});var F,G=U(85999),j=U(61806),$=U(15740),H=U(71392);!function(k){k.Spine="spine",k.Pixi="pixi",k.Component="component"}(F||(F={}));class V extends H.m{get paused(){return this._paused}set paused(k){this._paused!==k&&(this._paused=k,k?(this._wasSpineUpdateOnPause=this._updateMethod===F.Spine)&&(this._updateMethod=F.Pixi):(this._wasSpineUpdateOnPause&&(this._updateMethod=F.Spine),this._wasSpineUpdateOnPause=void 0))}get game(){return j.W.instance.game}get pixiSpine(){return this._pixiSpine}get skeleton(){return this._pixiSpine.skeleton}get state(){return this._pixiSpine.state}constructor(k){super(),this.pendingDestroy=!1,this._updateMethod=F.Pixi,this._paused=!1,this.onStart=new $.H,this.onComplete=new $.H,this.onEnd=new $.H,this.onEvent=new $.H,this.name=k;const B=this.game.cache.getSpine(k),U=B.spineAtlas,j=(new G.qd(U),B.spineData);this._pixiSpine=new G.yE(j),this._pixiSpine.state.addListener({start:this.onSpineStart.bind(this),event:this.onSpineEvent.bind(this),complete:this.onSpineComplete.bind(this),end:this.onSpineEnd.bind(this)}),this._pixiSpine.renderable=!0,this._pixiSpine.autoUpdate=!0,this._pixiSpine.eventMode="none",this.addChild(this._pixiSpine)}onSpineStart(k){this.onStart.dispatch(k)}onSpineComplete(k){this.onComplete.dispatch(k)}onSpineEnd(k){this.onEnd.dispatch(k)}onSpineEvent(k,B){this.onEvent.dispatch(k.trackIndex,B)}setTint(k){this._pixiSpine.tint=k}set updateMethod(k){this._paused&&(this._wasSpineUpdateOnPause=k===F.Spine),this._pixiSpine.autoUpdate=k===F.Spine,this._updateMethod=k}get updateMethod(){return this._updateMethod}update(){this.updateSpine(!1)}updateFromComponent(){this.updateSpine(!0)}updateSpine(k){this._pixiSpine.autoUpdate||this.paused||this._updateMethod===F.Component!==k||this._pixiSpine.update(.001*this.game.app.ticker.deltaMS),this.pendingDestroy&&this.destroy()}destroy(k){this._pixiSpine&&(this._pixiSpine.autoUpdate=!1,this._pixiSpine.state.clearListeners(),this._pixiSpine.state.clearListenerNotifications(),this.removeChild(this._pixiSpine),this._pixiSpine.destroy(k),this._pixiSpine=null),this.onComplete&&(this.onComplete.dispose(),this.onComplete=null),this.onEnd&&(this.onEnd.dispose(),this.onEnd=null),this.onEvent&&(this.onEvent.dispose(),this.onEvent=null),this.onStart&&(this.onStart.dispose(),this.onStart=null),this.pendingDestroy=!1,super.destroy(k)}setAnimationByName(k,B,U=!1){var F;const G=this._pixiSpine.state.setAnimation(k,B,U);return(null===(F=null==G?void 0:G.animation)||void 0===F?void 0:F.duration)>0&&this._pixiSpine.update(0),G}addAnimationByName(k,B,U=!1,F=0){this._pixiSpine.state.addAnimation(k,B,U,F)}setAnimationMix(k,B,U){this._pixiSpine.stateData.setMix(k,B,U)}setSkinByName(k){this._pixiSpine.skeleton.setSkinByName(k)}setSkin(k){this._pixiSpine.skeleton.setSkin(k)}setToSetupPose(k=!1){k&&(this._pixiSpine.lastTime=null),this._pixiSpine.skeleton.setToSetupPose()}getSlotContainer(k){return this.getSlotContainerByIndex(k.data.index)}getSlotContainerByIndex(k){return this._pixiSpine.slotContainers[k]}}},12033:(k,B,U)=>{"use strict";U.d(B,{f:()=>V});var F=U(5191),G=U(80267),j=U(71082),$=U(61806),H=U(15740);class V{get current(){return this._current.key}getCurrentState(){return this._current}get states(){return this._states}get game(){return $.W.instance.game}get onStateChange(){return this._onStateChange}get onStateLoaded(){return this._onStateLoaded}constructor(k){this._onStateChange=new H.H,this._onStateLoaded=new H.H,this._states=new Map,this._pendingState=k||null,this._current=null}boot(){this.game.onPause.add(this.pause,this),this.game.onResume.add(this.resume,this),this._pendingState&&this.add(this._pendingState.key,this._pendingState,!0)}add(k,B,U=!1){return B.key=k,this._states.set(k,B),U&&(this._pendingState=B),B}remove(k){this._current&&this._current.key===k&&(this._current=null),this._states.delete(k)}start(k,B=!0,...U){this._states.has(k)?(this._pendingState=this._states.get(k),this._clearWorld=B,this._initArgs=U):G.V.log("Invalid key passed to start method",F.$.Warning)}preUpdate(){if(this._pendingState){const k=this._current?this.current:null;if(this.clearCurrentState(),this.setCurrentState(this._pendingState.key),this._onStateChange.dispatch(this._current,k||""),this.current&&this.current!==this._pendingState.key)return;this._pendingState=null,this._current.preload(),this._current.create(),this._onStateLoaded.dispatch(this._current,k||"")}}update(){this._current.update()}get(k){return this.states.has(k)?this.states.get(k):null}loadComplete(){this._current.create()}clearCurrentState(){var k;this._current&&(this._current.shutdown(),this.game.tweens.removeAll(),this.game.time.removeAll(),null===(k=this.game.stage.camera)||void 0===k||k.reset(),this._clearWorld&&j.C.removeAllChildren(this.game.world,!0),this._current=null,this.game.load.reset(!0))}setCurrentState(k){this._current=this._states.get(k),this._current.init(...this._initArgs),k===this._pendingState.key&&(this._initArgs=[])}pause(){this._current&&this._current.paused()}resume(){this._current&&this._current.resumed()}destroy(){this._clearWorld=!0,this.clearCurrentState(),this._pendingState=null,this._onStateChange.dispose(),this._onStateLoaded.dispose()}}},65321:(k,B,U)=>{"use strict";U.d(B,{g:()=>G});var F=U(84215);class G{get timeMS(){return this._timeMS}get deltaMS(){return this._deltaMS}get deltaMultiplier(){return this._deltaMultiplier}get events(){return this._events}constructor(k){this._timeMS=0,this._deltaMS=0,this._deltaMultiplier=1,this._events=null,this._timers=[],this._game=k,this._events=new F.M(this._game,!1)}boot(){this.updateTime(),this._events.start()}add(k){return this._timers.includes(k)||this._timers.push(k),k}create(k=!0){return this.add(new F.M(this._game,k))}removeAll(){this._timers.forEach((k=>k.destroy())),this._timers=[],this._events.removeAll()}destroy(k){if(!k)return;k.destroy();const B=this._timers.indexOf(k);-1!==B&&this._timers.splice(B,1)}update(){if(this.updateTime(),!this._game.paused){this._events.update();for(let k=this._timers.length-1;k>=0;--k){const B=this._timers[k];B.update(),B.canDestroy()&&(B.destroy(),this._timers.splice(k,1))}}}gamePaused(){this._events.pause(),this._timers.forEach((k=>k.pause()))}gameResumed(){this.updateTime(),this._events.resume(),this._timers.forEach((k=>k.resume()))}updateTime(){this._timeMS=this._game.app.ticker.lastTime,this._deltaMS=this._game.app.ticker.deltaMS,this._deltaMultiplier=this._deltaMS/16.6666666666667}}},84215:(k,B,U)=>{"use strict";U.d(B,{M:()=>H});var F=U(80267),G=U(5191),j=U(15740);class ${get callbackArgs(){return this._callbackArgs}get markedForDelete(){return this._markedForDelete}constructor(k,B,U,F,G,...j){this._markedForDelete=!1,this.delayMS=k,this.tick=B,this.runCount=U,this.callback=F,this.callbackContext=G,this._callbackArgs=j}markForDeletion(){this._markedForDelete=!0}}class H{constructor(k,B=!0){this._state="stopped",this._expired=!1,this._events=[],this.onComplete=new j.H,this._updateTimeThreshold=1e3,this._timeAtLastUpdate=0,this._game=k,this._destroyOnExpire=B}start(k=0){if("running"===this._state)return void F.V.log("Timer is already running.",G.$.Warning);if("paused"===this._state)return void F.V.log("Timer is currently paused. Call resume() instead.",G.$.Warning);const B=this.getGameTime();this._timeAtLastUpdate=B;const U=B+k;this._state="running",this._events.forEach((k=>k.tick=U+k.delayMS))}stop(k=!0,B=!1){this._state="stopped",k?this.removeAll(B):B&&this.onComplete.removeAll()}removeAll(k=!0){for(let B=this._events.length-1;B>=0;--B)this.removeAtIndex(B);k&&this.onComplete.removeAll()}addTimer(k,B,U,...F){return this.createTimer(k,1,B,U,...F)}repeat(k,B,U,F,...G){return this.createTimer(k,B,U,F,...G)}loop(k,B,U,...F){return this.createTimer(k,-1,B,U,...F)}createTimer(k,B,U,F,...G){const j=Math.round(k),H=j+(0===this._timeAtLastUpdate?this.getGameTime():this._timeAtLastUpdate),V=new $(j,H,B,U,F,...G);return this._events.push(V),this.sortEvents(),this._expired=!1,V}remove(k){return this.removeAtIndex(this._events.indexOf(k))}removeAtIndex(k){return k>=0&&kk.tick-B.tick))}update(){if("running"!==this._state)return;const k=this.getGameTime(),B=k-this._timeAtLastUpdate;B>this._updateTimeThreshold&&this.offsetEventTimers(B);const U=[];let F=!1;for(let G=0;G0&&0==--B.runCount?B.markForDeletion():(B.tick+=B.delayMS,F=!0),U.push(B)}if(U.length>0){for(let k=0;kB.tick+=k))}getGameTime(){return this._game.time.timeMS}destroy(){this.removeAll(!0),this.onComplete.dispose(),this._state="stopped",this._expired=!0,this._events=[]}}H.MINUTE=6e4,H.SECOND=1e3,H.HALF_SECOND=500,H.QUARTER_SECOND=250},42687:(k,B,U)=>{"use strict";U.d(B,{p:()=>H});var F=U(80267),G=U(5191),j=U(77120),$=U(15740);class H{constructor(){this.deviceReadyAt=0,this.callbacks=[],this.rotationEvent=new $.H}get isInitialized(){return this.deviceReadyAt>0}whenReady(k){this.isInitialized?k():(this.callbacks.push(k),j.D.isReady?this.initialize():j.D.addDOMContentLoadedListener(this.initialize.bind(this)))}initialize(){"orientation"in screen&&screen.orientation.addEventListener("change",this.onDeviceRotation.bind(this)),this.deviceReadyAt=Date.now(),j.D.removeDOMContentLoadedListener(this.initialize.bind(this)),this.callbacks.forEach((k=>{k()})),this.callbacks=[]}onDeviceRotation(){F.V.log(`onDeviceRotation: ${screen.orientation.type}`,G.$.Verbose),this.rotationEvent.dispatch(screen.orientation.type.startsWith("landscape"))}cleanUp(){this.rotationEvent.dispose(),"orientation"in screen&&screen.orientation.removeEventListener("change",this.onDeviceRotation)}}},71392:(k,B,U)=>{"use strict";U.d(B,{m:()=>W});var F=U(68910),G=U(61806),j=U(15740),$=U(35192);$.q9.prototype.name=null,$.mc.prototype.getChildByName=function(k,B){for(let U=0,F=this.children.length;U=0;--B){const U=this.children[B];if(U&&!U.destroyed&&!1!==U.exists&&"function"==typeof U.update)try{U.update(G.W.instance.game.time.deltaMS)}catch(k){H.R.logError(k,"Exception updating child container")}}}destroy(k){var B,U;this.destroyed||(null===(B=this.onDestroy)||void 0===B||B.dispatch(),null===(U=this.onDestroy)||void 0===U||U.dispose(),this.onDestroy=null,this.exists=!1,super.destroy(k))}render(k){V.C.canContainerRender(this)&&super.render(k)}}},86787:(k,B,U)=>{"use strict";U.d(B,{CL:()=>ve.C,lv:()=>ge,J6:()=>Vt.J,l2:()=>$t.l,r0:()=>Ht.r,i7:()=>F.i,YP:()=>H,jl:()=>qt,Q1:()=>Qt.Q,uA:()=>V.u,XF:()=>V.X,oD:()=>z.oD,mc:()=>ie.m,DX:()=>me.D,yQ:()=>Qt.y,YH:()=>j.YH,e$:()=>Pt.e,b:()=>Zt.b,GS:()=>rt.G,bT:()=>Ct,sV:()=>Ft,wI:()=>Xt.w,YA:()=>se.Y,W$:()=>Jt.W,Zt:()=>ne.Z,_m:()=>ae._,Wz:()=>oe.W,mk:()=>te,Sj:()=>jt.S,K1:()=>ce.K,cj:()=>kt.c,bs:()=>Yt.b,XV:()=>tt.X,M_:()=>Bt.M,HN:()=>q.H,qF:()=>Ut.q,gX:()=>ee.g,Kf:()=>ot,dL:()=>pe.d,K:()=>Lt.K,EV:()=>j.EV,s0:()=>j.s0,WR:()=>X.W,GO:()=>Rt.G,aw:()=>X.a,DT:()=>he.D,x4:()=>de,Og:()=>ue,Wf:()=>be,S1:()=>j.S1});var F=U(57530),G=U(8674),j=U(29658);let $=class extends F.i{recalculateViewMatrix(){if(!this._attachedTransform)return;const k=this._attachedTransform.pixiTransform._worldID;if(k!==this._transformWorldID){const B=this._attachedTransform.worldMatrix,U=this._attachedTransform.worldScale,F=B.a/U.x,G=B.c/U.y;this._cameraMatrix.set(F,G,-G,F,-B.tx*F- -B.ty*G+this._viewportSize.getHalfWidth(),-B.tx*G+-B.ty*F+this._viewportSize.getHalfHeight()),this._transformWorldID=k}}};$=(0,G.Cg)([(0,j.EV)("CameraEla",j.YH.root,"Represents an ELA version camera and provides a matrix from translating
    from world space into view space")],$);let H=class extends F.i{recalculateViewMatrix(){if(!this._attachedTransform)return;const k=this._attachedTransform.pixiTransform._worldID;k!==this._transformWorldID&&(this._attachedTransform.worldMatrix.clone().invert().translate(this._viewportSize.getHalfWidth(),this._viewportSize.getHalfHeight()).copyTo(this._cameraMatrix),this._transformWorldID=k)}};H=(0,G.Cg)([(0,j.EV)("Camera",j.YH.root,"Represents a camera and provides a matrix from translating
    from world space into view space")],H);var V=U(40794),W=U(823),q=U(15740);let K=class extends V.u{constructor(){super(...arguments),this.onCreate=new q.H,this.onPostCreate=new q.H,this.onUpdate=new q.H,this.onOnEnable=new q.H,this.onOnDisable=new q.H,this.onPostDeserialize=new q.H}create(){super.create(),this.onCreate.dispatch()}destroy(){this.onCreate.dispose(),this.onPostCreate.dispose(),this.onUpdate.dispose(),this.onOnEnable.dispose(),this.onOnDisable.dispose(),this.onPostDeserialize.dispose(),super.destroy()}postCreate(){super.postCreate(),this.onPostCreate.dispatch()}update(){super.update(),this.onUpdate.dispatch()}onEnable(){super.onEnable(),this.onOnEnable.dispatch()}onDisable(){super.onDisable(),this.onOnDisable.dispatch()}postDeserialize(){super.postDeserialize(),this.onPostDeserialize.dispatch()}};(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],K.prototype,"onCreate",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],K.prototype,"onPostCreate",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],K.prototype,"onUpdate",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],K.prototype,"onOnEnable",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],K.prototype,"onOnDisable",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],K.prototype,"onPostDeserialize",void 0),K=(0,G.Cg)([(0,j.EV)("ComponentEvents",j.YH.root,"Provides signals fired with component lifecycle events")],K);var z=U(49769),Y=U(5191),Q=U(80267),X=U(53924),Z=U(85880),J=U(95891),tt=U(563),et=U(43234),it=U(21979),st=U(59859),nt=U(4697),at=U(32154),rt=U(30290);class ot{constructor(k){this._defaultEase=rt.G.Linear.None,this._listOfTransformHolders={},this._createdFilters=new Map,this._originalRenderValuesMap=new Map,this.new(k)}new(k={}){const{startDelay:B=0,loopCount:U=0,yoyo:F=!1,loopDelay:G=0,onStart:j,onComplete:$}=k;at.A.isDefined(this._timeline)&&this.destroyTimeline(),this._timeline=new Z.os.core.Timeline({delay:B,yoyo:F,repeat:U,repeatDelay:G}),Z.os.config({nullTargetWarn:!1}),this._timeline.eventCallback("onStart",(()=>{this.update(),null==j||j()})),this._timeline.eventCallback("onUpdate",(()=>{this.update()})),this._onCompleteCallback=$,this._timeline.eventCallback("onComplete",(()=>{this.internalOnComplete()})),this._timeline.pause()}to(k,B,U,F=this._defaultEase,G,j){if(!this.canAnimate(k))return this;const $="string"==typeof F?F:F.value;return this._timeline.to(k,Object.assign(Object.assign({},this.convertToGSAPCompatibleProps(Object.assign({},U),j)),{duration:B,ease:$}),G),this}convertToGSAPCompatibleProps(k,B){const U={};for(const F in k)"number"!=typeof k[F]&&"string"!=typeof k[F]||(U[F]=B?`+=${k[F]}`:k[F]),"stagger"===F&&(U[F]=k[F]);return U}from(k,B,U,F=this._defaultEase,G,j){if(!this.canAnimate(k))return this;const $="string"==typeof F?F:F.value;return this._timeline.from(k,Object.assign(Object.assign({},this.convertToGSAPCompatibleProps(Object.assign({},U),j)),{duration:B,ease:$}),G),this}fromTo(k,B,U,F,G=this._defaultEase,j,$){if(!this.canAnimate(k))return this;const H="string"==typeof G?G:G.value;return this._timeline.fromTo(k,Object.assign({},this.convertToGSAPCompatibleProps(Object.assign({},U),$)),Object.assign(Object.assign({},this.convertToGSAPCompatibleProps(Object.assign({},F),$)),{duration:B,ease:H}),j),this}restart(){var k;return null===(k=this._timeline)||void 0===k||k.restart(),this}play(k=0){var B;return null===(B=this._timeline)||void 0===B||B.play(k),this}pause(){var k;return null===(k=this._timeline)||void 0===k||k.pause(),this}resume(){var k;return null===(k=this._timeline)||void 0===k||k.paused(!1),this}isPaused(){var k,B;return null!==(B=null===(k=this._timeline)||void 0===k?void 0:k.paused())&&void 0!==B&&B}onComplete(k){return this._onCompleteCallback=k,this}internalOnComplete(){var k;this.clearFiltersFromAnimatingObject(),null===(k=this._onCompleteCallback)||void 0===k||k.call(this)}clearFiltersFromAnimatingObject(k=!1){var B;if(!(null===(B=this._timeline)||void 0===B?void 0:B.repeat()))for(const[U,F]of this._createdFilters){if(!k){const k=this._originalRenderValuesMap.get(U);if(k&&(k.alpha!==U.alpha||k.tintStrength!==U.tintStrength||k.tintColor!==U.tintColor||k.blendMode!==U.blendMode))continue}if(U.filters&&(U.filters.baseFilter=void 0),U.filters=void 0,U.components.rootContainer.filters){const k=U.components.rootContainer.filters.indexOf(F);k>-1&&U.components.rootContainer.filters.splice(k,1)}}}get objectCount(){return Object.keys(this._listOfTransformHolders).length}addGameObject(k){const B=Object.values(this._listOfTransformHolders).find((B=>B.GameObjectLink===k)),U=B||this.addNewAnimatedObject(k);if(!B&&U){const k=at.A.generateGUID();this._listOfTransformHolders[k]=U,this._originalRenderValuesMap.has(U)||this._originalRenderValuesMap.set(U,{alpha:U.alpha,tintStrength:U.tintStrength,tintColor:U.tintColor,blendMode:U.blendMode})}return U}addGameObjects(k){return k.map((k=>this.addGameObject(k)))}destroyTimeline(k){var B;k&&this.complete(),null===(B=this._timeline)||void 0===B||B.kill(),this._timeline=null}resetToStart(){var k;return null===(k=this._timeline)||void 0===k||k.seek(0).pause(),this.update(),this}complete(){var k;return null===(k=this._timeline)||void 0===k||k.progress(1).pause(),this.update(),this}addNewAnimatedObject(k){var B,U,F;const G=[];if(!k)return null;if(k.legacyTransform)return G.push("Game Object has a legacy transform, animations might not play. Please use Transform /Rect transform."),{warningLog:G};const j=k.activeInHierarchy,$=k.transform,H=k.transform instanceof tt.X?k.transform:null,V=k.findComponent(nt.y),W=k.findComponent(st.j),q={alpha:V?W?W.alpha:1:null,tintStrength:V?1:null,tintColor:V?"rgba(255,255,255,1)":null,blendMode:V?"Multiply":null};W&&(q.alpha=W.alpha,q.tintStrength=W.tintIntensity,q.tintColor=W.tintColor,q.blendMode=W.tintBlendMode);const K=null===(B=k.parent)||void 0===B?void 0:B.findComponent(it.P);K&&G.push("Position changes are not yet supported for objects with a parent that has a layout component.");const z=H||$;return Object.assign(Object.assign({rotation:null==z?void 0:z.localRotation,x:null==z?void 0:z.localPosition.x,y:null==z?void 0:z.localPosition.y,scaleX:null!==(U=null==z?void 0:z.localScale.x)&&void 0!==U?U:1,scaleY:null!==(F=null==z?void 0:z.localScale.y)&&void 0!==F?F:1,skewX:0,skewY:0},q),{visible:j,GameObjectLink:k,components:{transformComponent:z,parentLayoutComponent:K},warningLog:G})}updateAnimatedGameObjects(k){var B,U;(null==k?void 0:k.GameObjectLink)&&(this.updateGeometryPass(k),(B=k.components).renderComponent||(B.renderComponent=k.GameObjectLink.findComponent(nt.y)),k.components.renderComponent&&((U=k.components).rootContainer||(U.rootContainer=k.components.renderComponent.getRootContainer()),k.components.rootContainer&&this.updateRenderPass(k)))}updateGeometryPass(k){const B=k.components.transformComponent;(null==B?void 0:B.GameObject)&&(k.components.parentLayoutComponent||B.setPosition(k.x,k.y),B.setRotation(k.rotation),B.setScale(k.scaleX,k.scaleY),B.setSkew(k.skewX,k.skewY))}updateRenderPass(k){var B;const U=this.setupFilters(k);if((null===(B=k.filters)||void 0===B?void 0:B.baseFilter)&&(at.A.isDefined(k.alpha)&&(k.filters.baseFilter.alpha=k.alpha),at.A.isDefined(k.tintStrength)&&(k.filters.baseFilter.tintIntensity=k.tintStrength),at.A.isDefined(k.blendMode)&&(k.filters.baseFilter.blend=parseInt(et.P[k.blendMode])),at.A.isDefined(k.tintColor))){const[B=255,U=255,F=255]=Z.os.utils.splitColor(k.tintColor);k.filters.baseFilter.tintColor=[B/255,U/255,F/255]}k.components.rootContainer.filters=U}setupFilters(k){const B=k.components.rootContainer.filters||[];if(!(at.A.isDefined(k.alpha)||at.A.isDefined(k.tintStrength)||at.A.isDefined(k.blendMode)||at.A.isDefined(k.tintColor)))return B;if(!k.filters){const U=["alpha","tintStrength","tintColor","blendMode"];k.filters={},k.filters.baseFilter||U.forEach((U=>{void 0!==k[U]&&(k.filters.baseFilter=B.find((k=>k instanceof et.o))||this._createdFilters.get(k),k.filters.baseFilter||(k.filters.baseFilter=new et.o,this._createdFilters.set(k,k.filters.baseFilter)),B.includes(k.filters.baseFilter)||B.push(k.filters.baseFilter))}))}return B}update(){Object.keys(this._listOfTransformHolders).forEach((k=>{const B=this._listOfTransformHolders[k];this.updateAnimatedGameObjects(B)}))}updateObjects(k){k instanceof Array?(0,J.forEach)(k,(k=>{this.updateAnimatedGameObjects(k)})):this.updateAnimatedGameObjects(k)}canAnimate(k){return null!==this._timeline&&null!==k}destroy(){this._onCompleteCallback=void 0,this.destroyTimeline(),this.clearFiltersFromAnimatingObject(!0),this._createdFilters.clear(),this._originalRenderValuesMap.clear()}}var ht,ct,dt=U(26731),lt=U(15887),ut=U(32928),ft=U(32357),bt=U(23664),pt=U(900),vt=U(46386),gt=U(42149),mt=U(56761),yt=U(33431),_t=U(84893),Et=U(5440),wt=U(84097);!function(k){k.From="From",k.To="To",k.FromTo="From To"}(ht||(ht={})),function(k){k.From="from",k.To="to",k.FromTo="fromTo"}(ct||(ct={}));const Tt=["#817","#a35","#c66","#e94","#ed0","#9d5","#4d8","#2cb","#0bc","#09c","#36b","#639"];class St extends dt.${constructor(){super(...arguments),this.easyTweenUI=[],this._hasValidTweenData=!1,this._lastClipboardContent=null,this.firstFocus=!0,this.infoBoxNodes=[],this.activeKeyRequiresRenderComponent=null,this.activeGUID=null,this.activeSelectedSelf=!1,this.lastRegenerationTime=null,this.regenerationMinimumIntervalMS=700,this.allowRegeneration=!1,this.jestTesting=!1,this.uiNodeSize1="1of12",this.uiNodeSize2="2of12",this.uiNodeSize3="3of12",this.uiNodeSize4="4of12",this.uiNodeSize6="6of12",this.uiNodeSize8="8of12",this.uiNodeSize9="9of12",this.uiNodeSize12="12of12",this.terminalIDPreviewAnimation="preview-animation"}generate(k,B){var U;return this.currentState=k,this.firstRunDoChecks(),this.checkClipboardForTweenData(),!this.jestTesting&&!this.allowRegeneration&&this.lastRegenerationTime&&Date.now()-this.lastRegenerationTime0){const k=this.currentState.selectedTween;this.activeSelectedSelf="self"===(null===(U=this.currentState.timeline.tweens[k])||void 0===U?void 0:U.GameObjectLinks.join()),this.activeGUID=this.currentState.gameObjectRecords[k],this.addSectionTargetPicker(),(this.activeGUID||this.activeSelectedSelf)&&(this.addSectionPropertySettings(),this.addSectionTweenType(),this.addSectionFromToValues(),this.addSectionEasingType(),this.addTweenGameObjectInfo())}this.addSectionSequenceSettings(),this.addSectionInfo()}}addSectionPreviewMode(){const k=ft.X.create({buttonText:this.currentState.playMode?"STOP":"Preview Sequence",tooltip:this.currentState.playMode?"Stop the animation preview":"Start the animation preview in the editor's game view",id:this.terminalIDPreviewAnimation,nodeSize:this.uiNodeSize12,buttonIcon:this.currentState.playMode?Et.a2.Stop:Et.a2.Play,buttonType:this.currentState.playMode?Et.VQ.Highlight:Et.VQ.Prodigy,onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{playMode:!this.currentState.playMode})}}),B=ft.X.create({buttonText:"Docs",tooltip:"Open the Easy Tween documentation",id:"info-button",nodeSize:this.uiNodeSize6,buttonIcon:Et.a2.Copy,onClick:()=>{this._editorAPI.openLinkInDefaultBrowser("https://prodigygame.atlassian.net/wiki/spaces/GD/pages/5048729640/EasyTween")}}),U=lt.X.createHorizontal([k,B],{spacing:4});this.easyTweenUI.push(U),this.easyTweenUI=this.easyTweenUI.concat(this.createTimelinePreview())}createTimelinePreview(){var k;const B=[];if(!(null===(k=this.currentState.timeline)||void 0===k?void 0:k.tweens)||0===this.currentState.timeline.tweens.length)return B;let U=0;return this.currentState.timeline.tweens.forEach((k=>{const B=(k.how.delay||0)+k.how.duration;U=Math.max(U,B)})),B.push(yt.l.create({id:"easy-tween-duration",labelValue:`Total Duration: ${U}s`})),0===U||this.currentState.timeline.tweens.forEach(((k,F)=>{const G=k.how.delay||0,j=G+k.how.duration,$=G/U*100,H=100-j/U*100,V=this.getTweenColor(F),W=Object.assign(bt._.line(`timeline-preview-${F}`),{style:{borderLeft:`1px solid ${V}`,borderRight:`1px solid ${V}`,marginLeft:`${$}%`,marginRight:`${H}%`,marginTop:"1px",marginBottom:"1px",height:"6px",backgroundColor:V,opacity:this.currentState.selectedTween===F?1:.6,width:"unset",alignSelf:"unset"}});B.push(W)})),B}getTweenColor(k){return Tt[k%Tt.length]}addSectionAddRemoveTween(){var k,B,U;const F=Math.min(null!==(U=null===(B=null===(k=this.currentState.timeline)||void 0===k?void 0:k.tweens)||void 0===B?void 0:B.length)&&void 0!==U?U:0,At.maximumTweensAllowed-1),G=[];for(let H=0;H0){const k=`${j}of12`;G.push(ft.X.create({buttonText:"",id:"tweens-filler",nodeSize:k,buttonDisabled:!0}))}const $=lt.X.createHorizontal(this.createTweenClipboardButtons());this.easyTweenUI.push(lt.X.createVertical([lt.X.createHorizontal(G),$],{isContainer:!0,title:"Tweens"}))}addSectionTargetPicker(){const k=this.currentState.selectedTween,B=lt.X.createHorizontal([],{isContainer:!0,title:`Tween ${k+1} Target`}),U=ft.X.create({buttonText:"SELF",tooltip:"Tween a different Game Object, currently targeting the object this component is attached to",id:this.terminalIDPreviewAnimation,nodeSize:this.uiNodeSize3,buttonIcon:Et.a2.None,buttonType:this.activeSelectedSelf?Et.VQ.Prodigy:Et.VQ.Default,onClick:this.userClickSelf.bind(this)}),F=ft.X.create({id:"select-game-object-button",nodeSize:this.uiNodeSize2,buttonType:Et.VQ.Prodigy,tooltip:"Tween this Game Object, currently targeting an arbitrary object",onClick:()=>{this.activeGUID&&this._editorAPI.selectGameObject(this.activeGUID)},buttonText:"",buttonIcon:Et.a2.ArrowPointer});B.elements.push(U),this.activeSelectedSelf||(B.elements.push(vt.W.create({id:`gameObjectRecords${this.currentState.selectedTween.toString()}`,propertyPath:["gameObjectRecords",this.currentState.selectedTween.toString()],gameObjectGuid:this.activeGUID,onChange:this.userClickPickGameObject.bind(this)})),this.activeGUID&&B.elements.push(F)),this.easyTweenUI.push(B)}addSectionPropertySettings(){var k,B;const U=this.createTextBox("Property","Pick the property to animate",this.uiNodeSize3),F=pt._.create({id:"propertyGroup",nodeSize:this.uiNodeSize9,selectValue:null!==(B=null===(k=this.currentState.timeline.tweens[this.currentState.selectedTween].customData)||void 0===k?void 0:k.propertyGroup)&&void 0!==B?B:"Position",propertyPath:["timeline","tweens",this.currentState.selectedTween.toString(),"customData","propertyGroup"],selectOptions:Object.keys(At.propertyGroups),onChange:()=>{this.resetActiveTweenProperties()}}),G=this.createTextBox("Duration","The length of the animation, in seconds",this.uiNodeSize3),j=this.createHowInput("duration",this.uiNodeSize9),$=this.createTextBox("Delay","Initial delay before animation starts",this.uiNodeSize3),H=this.createHowInput("delay",this.uiNodeSize9);this.easyTweenUI.push(lt.X.createHorizontal([U,F]),lt.X.createHorizontal([G,j]),lt.X.createHorizontal([$,H]))}createCheckboxGroup(k,B,U,F=!0){return ut.G.checkboxGroup({id:`${this.currentState.selectedTween.toString()}-${k}`,readonly:!F,labelValue:k,labelPosition:Et.G5.Right,inputValue:B,onChange:(k,B)=>{"boolean"==typeof B&&U(B)}})}addSectionTweenType(){var k,B,U,F,G;const j=[{label:ht.From,value:ct.From},{label:ht.To,value:ct.To},{label:ht.FromTo,value:ct.FromTo}],$=this.currentState.selectedTween,H=this.currentState.timeline.tweens[$],V=pt._.create({id:`${$.toString()}-${ct.FromTo}`,selectOptions:j.map((k=>k.label)),selectValue:null!==(B=null===(k=H.customData)||void 0===k?void 0:k.fromTo)&&void 0!==B?B:ht.To,propertyPath:["timeline","tweens",$.toString(),"customData","fromTo"],onChange:()=>{this.resetActiveTweenProperties()}}),W=!(!(null===(U=H.customData)||void 0===U?void 0:U.useTargetFrom)&&!(null===(F=H.customData)||void 0===F?void 0:F.useTargetTo)),q=this.createCheckboxGroup("Relative",H.how.relative,(k=>{H.how.relative=k,this.safelyModifyTimeline()}),!W),K=this.createCheckboxGroup("Tween children",null===(G=H.customData)||void 0===G?void 0:G.tweenChildren,(k=>{H.customData.tweenChildren=k,this.safelyModifyTimeline()}));this.easyTweenUI.push(lt.X.createVertical([lt.X.createHorizontal([V,q,K],{style:{width:"100%"}})],{isContainer:!0,title:"Tween Type"}))}addSectionFromToValues(){var k,B,U,F,G,j,$,H,V;const W=this.currentState.selectedTween,q=this.currentState.timeline.tweens[W],K=null===(k=q.customData)||void 0===k?void 0:k.propertyGroup,z=At.propertyGroups[K],Y=lt.X.createVertical([],{isContainer:!0}),Q=lt.X.createVertical([],{isContainer:!0}),X=this.createTextBox(ht.From,"The value to start from",this.uiNodeSize6),Z=this.createTextBox(ht.To,"The value to go towards",this.uiNodeSize6),J=ft.X.create({buttonText:"Match Target Object",id:"use-target-from",tooltip:"Match the starting value to the target object's value for this property",nodeSize:this.uiNodeSize6,buttonIcon:Et.a2.None,buttonType:(null===(B=q.customData)||void 0===B?void 0:B.useTargetFrom)?Et.VQ.Prodigy:Et.VQ.Default,onClick:()=>{var k,B;(null===(k=q.customData)||void 0===k?void 0:k.useTargetFrom)||(this.currentState.timeline.tweens[W].how.relative=!1),this.currentState.timeline.tweens[W].customData.useTargetFrom=!(null===(B=q.customData)||void 0===B?void 0:B.useTargetFrom),this.safelyModifyTimeline()}}),tt=ft.X.create({buttonText:"Match Target Object",id:"use-target-to",tooltip:"Match the ending value to the target objects value for this property",nodeSize:this.uiNodeSize6,buttonIcon:Et.a2.None,buttonType:(null===(U=q.customData)||void 0===U?void 0:U.useTargetTo)?Et.VQ.Prodigy:Et.VQ.Default,onClick:()=>{var k,B;(null===(k=q.customData)||void 0===k?void 0:k.useTargetTo)||(this.currentState.timeline.tweens[W].how.relative=!1),this.currentState.timeline.tweens[W].customData.useTargetTo=!(null===(B=q.customData)||void 0===B?void 0:B.useTargetTo),this.safelyModifyTimeline()}}),et=null===(F=q.customData)||void 0===F?void 0:F.fromTo,it=et===ht.From||et===ht.FromTo,st=et===ht.To||et===ht.FromTo;it&&Y.elements.push(lt.X.createHorizontal([X,J])),st&&Q.elements.push(lt.X.createHorizontal([Z,tt])),this.activeKeyRequiresRenderComponent=null;for(const nt in z){At.renderKeys.includes(nt)&&(this.activeKeyRequiresRenderComponent=nt);const k=z[nt];it&&!(null===(G=q.customData)||void 0===G?void 0:G.useTargetFrom)&&it&&Y.elements.push(this.createFromToInput(nt,k,ct.From)),st&&!(null===(j=q.customData)||void 0===j?void 0:j.useTargetTo)&&Q.elements.push(this.createFromToInput(nt,k,ct.To))}(null===($=q.customData)||void 0===$?void 0:$.useTargetFrom)&&Y.elements.push(vt.W.create({id:`gameObjectRecordsFrom${this.currentState.selectedTween.toString()}`,propertyPath:["gameObjectRecordsFrom",this.currentState.selectedTween.toString()],gameObjectGuid:this.currentState.gameObjectRecordsFrom[this.currentState.selectedTween]})),(null===(H=q.customData)||void 0===H?void 0:H.useTargetTo)&&Q.elements.push(vt.W.create({id:`gameObjectRecordsTo${this.currentState.selectedTween.toString()}`,propertyPath:["gameObjectRecordsTo",this.currentState.selectedTween.toString()],gameObjectGuid:this.currentState.gameObjectRecordsTo[this.currentState.selectedTween]})),(null===(V=this.currentState.timeline.tweens[this.currentState.selectedTween].customData)||void 0===V?void 0:V.tweenChildren)&&(it&&Y.elements.push(this.createFromToInput("stagger",0,ct.From,!1)),st&&Q.elements.push(this.createFromToInput("stagger",0,ct.To,!1))),it&&this.easyTweenUI.push(Y),st&&this.easyTweenUI.push(Q)}addSectionEasingType(){var k,B,U,F,G,j,$,H;const V=[],W=this.currentState.timeline.tweens[this.currentState.selectedTween],q="string"==typeof(null==W?void 0:W.ease)?W.ease:(null===(k=null==W?void 0:W.ease)||void 0===k?void 0:k.value)||"none",K={};for(const et in rt.J)K[rt.J[et]]=et;const z=(null===(U=null===(B=null==q?void 0:q.split(".")[0])||void 0===B?void 0:B.match(/\w+$/))||void 0===U?void 0:U[0])||"none",Y=(null===(G=null===(F=null==q?void 0:q.split(".")[1])||void 0===F?void 0:F.match(/^\w+/))||void 0===G?void 0:G[0])||"out",Q=(null===(j=null==q?void 0:q.match(/[+-]?\d+(\.\d+)?/g))||void 0===j?void 0:j.map((function(k){return parseFloat(k)})))||[],X=pt._.create({id:`${this.currentState.selectedTween}-ease`,nodeSize:this.uiNodeSize8,selectValue:K[z],selectOptions:Object.keys(rt.J),onChange:k=>{const B=k.toLowerCase()===rt.J.None?"":`.${Y}`;this.currentState.timeline.tweens[this.currentState.selectedTween].ease=`${rt.J[k]}${B}`,this.safelyModifyTimeline()}}),Z=pt._.create({id:`${this.currentState.selectedTween}-easeInOut`,nodeSize:this.uiNodeSize4,selectValue:Y,selectOptions:["in","out","inOut"],onChange:k=>{this.currentState.timeline.tweens[this.currentState.selectedTween].ease=`${z}.${k}`,this.safelyModifyTimeline()}});V.push(X),z!==rt.J.None&&V.push(Z),this.easyTweenUI.push(lt.X.createVertical([lt.X.createHorizontal(V)],{isContainer:!0,title:"Easing"}));const J=z===rt.J.Back,tt=z===rt.J.Elastic;if(J||tt){const k=[];k.push(yt.l.create({id:"back-overshoot-label",labelValue:"Overshoot",nodeSize:this.uiNodeSize3}),mt.f.create({id:`${this.currentState.selectedTween}-back--overshoot`,inputType:"number",inputValue:null!==($=Q[0])&&void 0!==$?$:1,inputUpdateMode:Et.JG.OnTheFly,nodeSize:this.uiNodeSize3,onChange:(k,B)=>{var U,F;Q[0]=B;const G=J?`${Q[0]}`:`${null!==(U=Q[0])&&void 0!==U?U:1}, ${null!==(F=Q[1])&&void 0!==F?F:1}`;this.currentState.timeline.tweens[this.currentState.selectedTween].ease=`${z}.${Y}(${G})`,this.safelyModifyTimeline()}})),tt&&k.push(yt.l.create({id:"back-amplitude-label",labelValue:"Amplitude",nodeSize:this.uiNodeSize3}),mt.f.create({id:`${this.currentState.selectedTween}-back--amplitude`,inputType:"number",inputValue:null!==(H=Q[1])&&void 0!==H?H:1,inputUpdateMode:Et.JG.OnTheFly,nodeSize:this.uiNodeSize3,onChange:(k,B)=>{var U,F;Q[1]=B;const G=J?`${Q[0]}`:`${null!==(U=Q[0])&&void 0!==U?U:1}, ${null!==(F=Q[1])&&void 0!==F?F:1}`;this.currentState.timeline.tweens[this.currentState.selectedTween].ease=`${z}.${Y}(${G})`,this.safelyModifyTimeline()}})),this.easyTweenUI.push(lt.X.createVertical([lt.X.createHorizontal(k)]))}}createTweenButtons(k){var B;const U=k===this.currentState.selectedTween;let F=!1;this.currentState.timeline&&(F=k<(null===(B=this.currentState.timeline.tweens)||void 0===B?void 0:B.length));return[ft.X.create({buttonText:F?"-":"+",tooltip:F?"Remove this tween layer":"Add a new tween layer",id:`${this._componentGuid}-tween-add-remove-${k}`,nodeSize:this.uiNodeSize1,buttonType:F?Et.VQ.Default:Et.VQ.Highlight,onClick:()=>{this.userClickAddRemoveTween(k)}}),ft.X.create({buttonText:[k+1].toString(),id:`tween-${k}`,tooltip:`Select Tween ${k+1}`,nodeSize:this.uiNodeSize1,buttonDisabled:!F,buttonType:U?Et.VQ.Prodigy:Et.VQ.Default,onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{selectedTween:k})},style:{backgroundColor:F?this.getTweenColor(k):void 0,opacity:U?1:.6,borderColor:U?"#FFFFFF":"transparent",borderWidth:"1px",borderStyle:"solid",color:"white",textShadow:"-1px -1px 0 black, \n 1px -1px 0 black, \n -1px 1px 0 black, \n 1px 1px 0 black"}})]}addTweenGameObjectInfo(){var k,B;let U=null;this.activeSelectedSelf?U=null===(k=this._editorAPI.getComponent(this._componentGuid))||void 0===k?void 0:k.GameObject:this.activeGUID&&(U=this._editorAPI.getGameObject(this.activeGUID));if(null!==(B=null==U?void 0:U.hasComponent(nt.y))&&void 0!==B&&B||!this.activeKeyRequiresRenderComponent)return;const F=lt.X.createVertical([],{isContainer:!0,title:"Tween Info"});F.elements.push(gt.b.create({id:"no-render-component-warning",iconType:Et.AT.Question,message:`Uh oh! It looks like you\`re trying to tween ${this.activeKeyRequiresRenderComponent} but that requires a RenderComponent.\nWould you like to create a basic render component?`})),F.elements.push(ft.X.create({buttonText:"Yes, add a BaseRender",id:"add-base-render-btn",tooltip:"Add a basic render component to this Game Object so the selected property can be tweened",onClick:()=>{U&&(this.activeSelectedSelf||this._editorAPI.selectGameObject(this.activeGUID),this._editorAPI.addComponent("BaseRender"))}})),0!==F.elements.length&&this.easyTweenUI.push(F)}addSectionSequenceSettings(){var k,B,U,F;const G=(null===(B=null===(k=this.currentState.timeline)||void 0===k?void 0:k.tweens)||void 0===B?void 0:B.length)>0,j=ft.X.create({buttonText:"Save Motion to File",id:"save-motion",tooltip:"Save the current animation timeline to a file for later use",buttonTextWrap:Et.K3.Wrap,style:{paddingRight:"1px"},onClick:G?this.userClickSaveAnimation.bind(this):null}),$=ft.X.create({buttonText:"Load Motion from File",id:"load-motion",tooltip:"Load an animation timeline from a file",buttonTextWrap:Et.K3.Wrap,style:{paddingLeft:"1px"},onClick:this.userClickLoadAnimation.bind(this)}),H=lt.X.createHorizontal([this.createTextBox("Loop Count","The number of times the animation will loop",this.uiNodeSize4),mt.f.create({id:"loopCount",inputType:"number",nodeSize:this.uiNodeSize4,inputValue:0|(null===(U=this.currentState.timeline)||void 0===U?void 0:U.loopCount),propertyPath:["timeline","loopCount"],inputUpdateMode:Et.JG.OnTheFly}),ut.G.checkboxGroup({id:"yoyo",labelPosition:Et.G5.Right,inputValue:(null===(F=this.currentState.timeline)||void 0===F?void 0:F.yoyo)||!1,labelValue:"yoyo",onChange:(k,B)=>{this.currentState.timeline.yoyo=B,this.safelyModifyTimeline()}})]),V=lt.X.createVertical([lt.X.createVertical([this.createPlaybackButton("Autoplay Tween","playbackPlayOnEnable","Play the tween automatically when the prefab is enabled/created"),this.createPlaybackButton("Destroy Object On Complete","playbackKillOnComplete","Destroy the GameObject with this component when the tween finishes playing"),lt.X.createHorizontal([j,$],{spacing:10}),bt._.line(),_t.N.create({id:"onTweenComplete",label:"On Tween Complete",signalValue:this.currentState.onTweenComplete,componentGUID:this._componentGuid})])],{isContainer:!0,title:"Sequence settings",isCollapsible:!0,spacing:4});this.currentState.timeline&&V.elements.unshift(H),this.easyTweenUI.push(V)}addSectionInfo(){var k,B,U,F,G;this.infoBoxNodes.length=0;const j=null!==(U=null===(B=null===(k=this.currentState.timeline)||void 0===k?void 0:k.tweens)||void 0===B?void 0:B.length)&&void 0!==U?U:0;for(let H=0;H0)for(const U of B.warningLog)this.createWarning(`Tween ${H+1}: ${U}`,Et.AT.Warning)}}else this.createWarning(`Tween ${H+1} has no target! Nothing will play for it :(`,Et.AT.Warning)}0===j&&this.createWarning("Click on the + icon to add a tween to animate!",Et.AT.Info),this.createWarning(`Tween will play on prefab enable: ${this.currentState.playbackPlayOnEnable}`,Et.AT.Info),this.createWarning(`Tween will get destroyed on completion: ${this.currentState.playbackKillOnComplete}`,Et.AT.Info);const $=lt.X.createVertical(this.infoBoxNodes,{isContainer:!0,title:"Timeline Info"});this.easyTweenUI.push($)}createTextBox(k,B,U){return yt.l.create({id:`${k}-label`,labelTextWrap:Et.K3.Wrap,labelTooltip:B,labelValue:k,nodeSize:U})}createWarning(k,B){this.infoBoxNodes.push(gt.b.create({id:`infoBox${this.infoBoxNodes.length}`,iconType:B,message:k})),this.allowRegeneration=!0}createPlaybackButton(k,B,U){return ft.X.create({buttonText:k,id:B,buttonTextWrap:Et.K3.Wrap,nodeSize:this.uiNodeSize2,buttonType:this.currentState[B]?Et.VQ.Prodigy:Et.VQ.Default,tooltip:U,onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{[B]:!this.currentState[B]})}})}createHowInput(k,B){const U=this.currentState.selectedTween,F=this.currentState.timeline.tweens[U];return mt.f.create({id:`${this._componentGuid.toString()}--selectedTween.toString()}-how-${k}`,propertyPath:["timeline","tweens",this.currentState.selectedTween.toString(),"how",k],inputType:"number",inputValue:F.how[k],inputUpdateMode:Et.JG.OnTheFly,nodeSize:B})}createFromToInput(k,B,U,F=!0){const G=this.currentState.selectedTween,j=this.currentState.timeline.tweens[G],$=F&&j.how.relative?":+=":":",H=j[U]||{},V="undefined"!==H[k]?H[k]:B,W={labelValue:`${k}${$}`,id:`${this._componentGuid.toString()}-${U}-${k}`,propertyPath:["timeline","tweens",this.currentState.selectedTween.toString(),U,k],inputUpdateMode:Et.JG.OnTheFly};return"tintColor"===k?mt.f.create(Object.assign(Object.assign({},W),{inputType:"color",inputValue:"#"===V[0]?V:"#ffffff"})):"blendMode"===k?pt._.create(Object.assign(Object.assign({},W),{selectOptions:Object.keys(et.P).filter((k=>isNaN(Number(k)))),selectValue:V})):mt.f.create(Object.assign(Object.assign({},W),{inputType:"number",inputValue:V}))}resetActiveTweenProperties(){var k,B;const U=this.currentState.selectedTween,F=null===(k=this.currentState.timeline.tweens[U].customData)||void 0===k?void 0:k.propertyGroup,G=null===(B=this.currentState.timeline.tweens[U].customData)||void 0===B?void 0:B.fromTo;G===ht.From?(delete this.currentState.timeline.tweens[U].to,this.currentState.timeline.tweens[U].from=Object.assign({},At.propertyGroups[F])):G===ht.To?(delete this.currentState.timeline.tweens[U].from,this.currentState.timeline.tweens[U].to=Object.assign({},At.propertyGroups[F])):(this.currentState.timeline.tweens[U].from=Object.assign({},At.propertyGroups[F]),this.currentState.timeline.tweens[U].to=Object.assign({},At.propertyGroups[F])),this.safelyModifyTimeline()}firstRunDoChecks(){this.firstFocus&&(this._editorAPI.isPlayMode()||(this.currentState.playMode=!1),this.firstFocus=!1)}userClickSelf(){const k=this.currentState.selectedTween;this.activeSelectedSelf="self"===this.currentState.timeline.tweens[k].GameObjectLinks.join(),this.currentState.gameObjectRecords[k]=null,this.currentState.timeline.tweens[this.currentState.selectedTween].GameObjectLinks=this.activeSelectedSelf?[]:["self"],this.safelyModifyTimeline(),this._editorAPI.modifyComponent(this._componentGuid,{gameObjectRecords:this.cleanGORecords()})}userClickPickGameObject(){this._editorAPI.getComponent(this._componentGuid).GameObject===this._editorAPI.getGameObject(this.activeGUID)&&(this.currentState.timeline.tweens[this.currentState.selectedTween].GameObjectLinks=["self"],this.safelyModifyTimeline())}userClickAddRemoveTween(k){if(this.currentState.timeline||(this.currentState.timeline={timelineID:this._componentGuid,tweens:[]},this.safelyModifyTimeline()),this.currentState.timeline.timelineID!==this._componentGuid)return;const B=this.currentState.timeline.tweens.length,U=kAt.maximumTweensAllowed,F=!U,G=B+(F?1:-1);if(F){const k={GameObjectLinks:["self"],to:Object.assign({},At.propertyGroups[At.defaultPropertyGroup]),how:Object.assign({},At.how),ease:`${rt.J[At.ease]}.${At.direction}`,customData:{propertyGroup:At.defaultPropertyGroup,fromTo:At.fromTo}};this.currentState.timeline.tweens.push(k)}else if(U&&B>0){this.currentState.timeline.tweens.splice(k,1);const B=12;for(let U=k;U{k?this._editorAPI.showPopup(`Animation saved!\n${k}`):Q.V.log("Save operation was cancelled.",Y.$.Info)})).catch((k=>{this._editorAPI.showPopup("Error during save operation. Please contact TNT Team!")}))}userClickLoadAnimation(){this._editorAPI.showFileDialog(wt.r.Load,"Load Your File","example","animation").then((k=>{if(k)try{const B=JSON.parse(k);if(null==B?void 0:B.tweens)return void this.processTimeline(B);this._editorAPI.showPopup("Invalid or incomplete animation data.")}catch(B){this._editorAPI.showPopup("Invalid JSON. Please contact TNT Team!")}else Q.V.log("Load operation was cancelled.",Y.$.Info)})).catch((k=>{this._editorAPI.showPopup("Error during load operation. Please contact TNT Team!")}))}processTimeline(k){this.currentState.selectedTween=0,this.activeGUID=null,this.currentState.gameObjectRecords={},this._editorAPI.modifyComponent(this._componentGuid,{gameObjectRecords:this.cleanGORecords()}),this.currentState.timeline=k,this.currentState.timeline.timelineID=this._componentGuid,this.safelyModifyTimeline()}cleanGORecords(){const k={};for(const B in this.currentState.gameObjectRecords)this.currentState.gameObjectRecords[B]&&(k[B]=this.currentState.gameObjectRecords[B]);return k}safelyModifyTimeline(){this.currentState.timeline.timelineID===this._componentGuid&&this._editorAPI.modifyComponent(this._componentGuid,{timeline:this.currentState.timeline})}checkClipboardForTweenData(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;try{const U=yield navigator.clipboard.readText();if(U!==this._lastClipboardContent){this._lastClipboardContent=U;try{const B=JSON.parse(U);this._hasValidTweenData=void 0!==(null===(k=null==B?void 0:B.easyTween)||void 0===k?void 0:k.tween)}catch(B){this._hasValidTweenData=!1}}}catch(U){this._hasValidTweenData=!1}}))}copyTweenToClipboard(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;if(void 0===this.currentState.selectedTween||!(null===(k=this.currentState.timeline)||void 0===k?void 0:k.tweens))return;const B=this.currentState.timeline.tweens[this.currentState.selectedTween];if(!B)return;const U={easyTween:{tween:Object.assign(Object.assign({},B),{GameObjectLinks:[]})}};try{yield navigator.clipboard.writeText(JSON.stringify(U,null,2)),Q.V.log("Tween copied to clipboard",Y.$.Info)}catch(F){Q.V.log("Failed to copy tween to clipboard",Y.$.Error)}}))}pasteTweenFromClipboard(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;try{if(void 0===this.currentState.selectedTween)return void Q.V.log("Please select a tween to paste into",Y.$.Error);const B=yield navigator.clipboard.readText(),U=JSON.parse(B);if(null===(k=null==U?void 0:U.easyTween)||void 0===k?void 0:k.tween){const k=U.easyTween.tween;this.currentState.timeline.tweens||(this.currentState.timeline.tweens=[]),this.currentState.timeline.tweens[this.currentState.selectedTween]=Object.assign(Object.assign({},k),{GameObjectLinks:["self"]}),this.safelyModifyTimeline(),Q.V.log("Tween pasted from clipboard",Y.$.Info)}}catch(B){Q.V.log("Failed to paste tween from clipboard",Y.$.Error)}}))}shiftTween(k){var B;if(void 0===this.currentState.selectedTween||!(null===(B=this.currentState.timeline)||void 0===B?void 0:B.tweens))return;const U=this.currentState.selectedTween,F=this.currentState.timeline.tweens.length-1,G=U+(k?1:-1);if(G<0||G>F)return;const j=this.currentState.timeline.tweens,$=j[U];j[U]=j[G],j[G]=$,this._editorAPI.modifyComponent(this._componentGuid,{selectedTween:G}),this.safelyModifyTimeline()}createTweenClipboardButtons(){var k,B,U;return[ft.X.create({id:"shift-left",buttonText:"←",tooltip:"Shift the selected tween one layer lower",nodeSize:this.uiNodeSize1,buttonType:Et.VQ.Default,buttonDisabled:void 0===this.currentState.selectedTween||!(null===(k=this.currentState.timeline)||void 0===k?void 0:k.tweens)||this.currentState.selectedTween<=0,onClick:()=>{this.shiftTween(!1)}}),ft.X.create({id:"copy-tween",buttonText:"Copy",tooltip:"Copy the selected tween to the clipboard",nodeSize:this.uiNodeSize2,buttonType:Et.VQ.Default,buttonDisabled:void 0===this.currentState.selectedTween||!(null===(B=this.currentState.timeline)||void 0===B?void 0:B.tweens),onClick:()=>{this.copyTweenToClipboard()}}),ft.X.create({id:"paste-tween",buttonText:"Paste",tooltip:"Paste tween data from the clipboard into the selected tween",nodeSize:this.uiNodeSize2,buttonType:Et.VQ.Default,buttonDisabled:!this._hasValidTweenData,onClick:()=>{this.pasteTweenFromClipboard()}}),ft.X.create({id:"shift-right",buttonText:"→",tooltip:"Shift the selected tween one layer higher",nodeSize:this.uiNodeSize1,buttonType:Et.VQ.Default,buttonDisabled:void 0===this.currentState.selectedTween||!(null===(U=this.currentState.timeline)||void 0===U?void 0:U.tweens)||this.currentState.selectedTween>=this.currentState.timeline.tweens.length-1,onClick:()=>{this.shiftTween(!0)}})]}}const At={propertyGroups:{Position:{x:0,y:0},Rotation:{rotation:0},Scale:{scaleX:1,scaleY:1},Skew:{skewX:0,skewY:0},Alpha:{alpha:1},Tint:{tintColor:"rgba(255,255,255,1)",tintStrength:1,blendMode:"Multiply"}},renderKeys:["alpha","tintStrength","tintColor"],ease:"Easy",fromTo:"To",direction:"out",defaultPropertyGroup:"Position",how:{duration:1,delay:0,relative:!1},maximumTweensAllowed:12};let Ct=class extends V.u{constructor(){super(...arguments),this.playMode=!1,this.playbackPlayOnEnable=!0,this.playbackKillOnComplete=!1,this.gameObjectRecords={},this.gameObjectRecordsFrom={},this.gameObjectRecordsTo={},this.timeline=null,this.selectedTween=-1,this.onTweenComplete=new q.H}get _animationWrapper(){return this._animation||this.reloadAnimation(),this._animation}create(){super.create(),this.checkAndTriggerAnimation()}checkForAGameObjectEditor(){let k=0;const B=()=>{var U;editorAPI.getGameObjectGuid(this.GameObject)?this.isCurrentlySelected()?this.checkAndTriggerAnimation():null===(U=this._animation)||void 0===U||U.destroyTimeline():++k<100&&window.setTimeout(B,100)};window.setTimeout(B,100)}isCurrentlySelected(){return!1}checkAndTriggerAnimation(){var k;if(!(null===(k=this.GameObject)||void 0===k?void 0:k.active))return;this.playbackPlayOnEnable&&this.playAnimation()}playAnimation(k=0){this._animationWrapper.play(k)}pauseAnimation(){this._animationWrapper.pause()}resumeAnimation(){this._animationWrapper.resume()}completeAnimation(){this._animationWrapper.complete()}resetToStart(){this._animationWrapper.resetToStart()}reloadAnimation(){var k,B,U,F,G,j,$,H;this._animation&&this._animation.destroy(),this._animation=new ot({loopCount:null!==(B=null===(k=this.timeline)||void 0===k?void 0:k.loopCount)&&void 0!==B?B:0,yoyo:null!==(F=null===(U=this.timeline)||void 0===U?void 0:U.yoyo)&&void 0!==F&&F}),this._animation.onComplete((()=>{var k,B;null===(k=this.onTweenComplete)||void 0===k||k.dispatch(),this.playbackKillOnComplete&&(null===(B=this._animation)||void 0===B||B.destroy(),this._animation=null)}));const V=this.timeline;if(!V)return void Q.V.log("Easy Tween: not loaded properly",Y.$.Error);const W=V.tweens.length;if(0!==W)for(let q=0;q0)){Q.V.log(`Easy Tween: tween ${q} has no children to animate`,Y.$.Info);continue}W=this._animation.addGameObjects(F.children)}if(k.to&&(null===($=k.customData)||void 0===$?void 0:$.useTargetTo)&&this.gameObjectRecordsTo[q]){const B=this._animation.addGameObject(this.gameObjectRecordsTo[q]);Object.keys(k.to).forEach((U=>{U in B&&(k.to[U]=B[U])}))}if(k.from&&(null===(H=k.customData)||void 0===H?void 0:H.useTargetFrom)&&this.gameObjectRecordsFrom[q]){const B=this._animation.addGameObject(this.gameObjectRecordsFrom[q]);Object.keys(k.from).forEach((U=>{U in B&&(k.from[U]=B[U])}))}k.from&&k.to?this._animation.fromTo(W,k.how.duration,k.from,k.to,k.ease,k.how.delay,k.how.relative):k.to?this._animation.to(W,k.how.duration,k.to,k.ease,k.how.delay,k.how.relative):k.from&&this._animation.from(W,k.how.duration,k.from,k.ease,k.how.delay,k.how.relative)}else Q.V.log("Easy Tween: No tweens to animate",Y.$.Info)}destroy(){var k,B;null===(k=this._animation)||void 0===k||k.destroy(),null===(B=this.onTweenComplete)||void 0===B||B.dispose(),super.destroy()}};(0,G.Cg)([(0,W.vk)(),(0,G.Sn)("design:type",Boolean)],Ct.prototype,"playMode",void 0),(0,G.Cg)([(0,W.vk)(),(0,G.Sn)("design:type",Boolean)],Ct.prototype,"playbackPlayOnEnable",void 0),(0,G.Cg)([(0,W.vk)(),(0,G.Sn)("design:type",Boolean)],Ct.prototype,"playbackKillOnComplete",void 0),(0,G.Cg)([(0,W.Om)(),(0,W.ER)(),(0,G.Sn)("design:type",Object)],Ct.prototype,"gameObjectRecords",void 0),(0,G.Cg)([(0,W.Om)(),(0,W.ER)(),(0,G.Sn)("design:type",Object)],Ct.prototype,"gameObjectRecordsFrom",void 0),(0,G.Cg)([(0,W.Om)(),(0,W.ER)(),(0,G.Sn)("design:type",Object)],Ct.prototype,"gameObjectRecordsTo",void 0),(0,G.Cg)([(0,W.np)(),(0,W.SZ)(),(0,G.Sn)("design:type",Object)],Ct.prototype,"timeline",void 0),(0,G.Cg)([(0,W.g1)(),(0,G.Sn)("design:type",Number)],Ct.prototype,"selectedTween",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],Ct.prototype,"onTweenComplete",void 0),Ct=(0,G.Cg)([(0,j.EV)("EasyTween",j.YH.animation),(0,X.W)(St)],Ct);let Ot=class extends V.u{constructor(){super(...arguments),this.separator=" ",this.buildStringOnCreate=!0,this.chunks=[],this.onStringChanged=new q.H,this.onStringBuilt=new q.H,this._originalChunks=[]}create(){super.create(),this.buildStringOnCreate&&this.buildString(),this._originalChunks=[...this.chunks]}addChunk(k,B){if(at.A.isDefined(B)){const U=B<0?this.chunks.length+B:B;if(U<0||U>this.chunks.length)return void Q.V.log(`StringBuilderComponent: Index out of bounds trying to add string "${k}" at index ${B}`,Y.$.Error);this.chunks.splice(U,0,k)}else this.chunks.push(k);this.onStringChanged.dispatch(this.getString())}setChunk(k,B){const U=B<0?this.chunks.length+B:B;U<0||U>=this.chunks.length?Q.V.log(`StringBuilderComponent: Index out of bounds trying to set chunk to "${k}" at index ${B}`,Y.$.Error):this.chunks[U]!==k&&(this.chunks[U]=k,this.onStringChanged.dispatch(this.getString()))}deleteChunk(k){const B=k<0?this.chunks.length+k:k;B<0||B>=this.chunks.length?Q.V.log(`StringBuilderComponent: Index out of bounds trying to delete string at index ${k}`,Y.$.Error):(this.chunks.splice(B,1),this.onStringChanged.dispatch(this.getString()))}reset(){const k=this.getString();this.chunks=[...this._originalChunks],this.getString()!==k&&this.onStringChanged.dispatch(this.getString())}buildString(){this.onStringBuilt.dispatch(this.getString())}getString(){return this.chunks.filter((k=>(null==k?void 0:k.length)>0)).join(this.separator)}destroy(){this.onStringChanged.dispose(),this.onStringBuilt.dispose(),super.destroy()}};(0,G.Cg)([(0,W.W_)(),(0,G.Sn)("design:type",String)],Ot.prototype,"separator",void 0),(0,G.Cg)([(0,W.vk)(),(0,G.Sn)("design:type",Boolean)],Ot.prototype,"buildStringOnCreate",void 0),(0,G.Cg)([(0,W.W_)(),(0,W.SZ)(),(0,G.Sn)("design:type",Array)],Ot.prototype,"chunks",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],Ot.prototype,"onStringChanged",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],Ot.prototype,"onStringBuilt",void 0),Ot=(0,G.Cg)([(0,j.EV)("StringBuilder",j.YH.ui)],Ot);class It extends dt.${generate(k,B){const U=[];return U.push(ut.G.componentPickerGroup({id:"source",labelValue:"Source",componentType:"Component",componentGuid:k.source})),U.push(ut.G.componentPickerGroup({id:"target",labelValue:"Target",componentType:"Component",componentGuid:k.target})),U.push(ut.G.checkboxGroup({id:"copyOnCreate",labelValue:"Copy on Create",labelPosition:Et.G5.Left,inputValue:k.copyOnCreate})),U.push(_t.N.create({id:"beforeCopy",label:"Before Copy",signalValue:k.beforeCopy,componentGUID:this._componentGuid})),U.push(_t.N.create({id:"onCopy",label:"On Copy",signalValue:k.onCopy,componentGUID:this._componentGuid})),U.push(bt._.blankLine("divider")),U.push(this.buildPropertiesSection(k)),lt.X.createVertical(U)}buildPropertiesSection(k){var B,U,F;const G=[];if(!k.source||!k.target)return G.push(gt.b.create({id:"property-cloner-empty",iconType:Et.AT.Info,message:"Select source and target to see common properties."})),lt.X.createVertical(G,{isContainer:!0,title:"Properties to copy"});const j=this.getCommonProperties(k.source,k.target),$=new Set(null!==(B=k.propertiesToCopy)&&void 0!==B?B:[]),H=new Set(j),V=(null!==(U=k.propertiesToCopy)&&void 0!==U?U:[]).filter((k=>H.has(k)));if(V.length!==(null!==(F=k.propertiesToCopy)&&void 0!==F?F:[]).length){this._editorAPI.modifyComponent(this._componentGuid,{propertiesToCopy:V});for(const k of $)H.has(k)||$.delete(k)}if(0===j.length)G.push(gt.b.create({id:"property-cloner-no-common",iconType:Et.AT.Info,message:"Source and target have no public properties in common."}));else for(const W of j)G.push(ut.G.checkboxGroup({id:`prop-${W}`,labelValue:W,labelPosition:Et.G5.Left,inputValue:$.has(W),onChange:(k,B)=>{if("boolean"!=typeof B)return;const U=new Set($);B?U.add(W):U.delete(W);const F=j.filter((k=>U.has(k)));this._editorAPI.modifyComponent(this._componentGuid,{propertiesToCopy:F})}}));return lt.X.createVertical(G,{isContainer:!0,title:"Properties to copy",isCollapsible:!0})}getCommonProperties(k,B){const U=this._editorAPI.getComponent(k),F=this._editorAPI.getComponent(B);if(!U||!F)return[];const G=U,j=F,$=new Set(this.collectPublicKeys(F));return this.collectPublicKeys(U).filter((k=>$.has(k))).filter((k=>typeof G[k]==typeof j[k])).filter((k=>"function"!=typeof G[k])).sort(((k,B)=>k.localeCompare(B)))}collectPublicKeys(k){const B=new Set;let U=k;for(;U&&Object.getPrototypeOf(U);){const k=Object.getOwnPropertyDescriptors(U);for(const U of Object.keys(k)){if(B.has(U)||U.startsWith("_"))continue;const F=k[U];"function"!=typeof F.value&&"object"!=typeof F.value&&B.add(U)}U=Object.getPrototypeOf(U)}return[...B]}}let Dt=class extends V.u{constructor(){super(...arguments),this.source=null,this.target=null,this.copyOnCreate=!1,this.propertiesToCopy=[],this.beforeCopy=new q.H,this.onCopy=new q.H}create(){super.create(),this.copyOnCreate&&this.copy()}copy(){if(!this.source||!this.target)return;this.beforeCopy.dispatch();const k=this.source,B=this.target;for(const U of this.propertiesToCopy){if(!(U in k)||!(U in B))continue;const F=k[U];typeof F==typeof B[U]&&("function"!=typeof F&&(B[U]=F))}this.onCopy.dispatch()}destroy(){this.beforeCopy.dispose(),this.onCopy.dispose(),super.destroy()}};(0,G.Cg)([(0,W.Mn)(V.u),(0,G.Sn)("design:type",V.u)],Dt.prototype,"source",void 0),(0,G.Cg)([(0,W.Mn)(V.u),(0,G.Sn)("design:type",V.u)],Dt.prototype,"target",void 0),(0,G.Cg)([(0,W.vk)(),(0,G.Sn)("design:type",Boolean)],Dt.prototype,"copyOnCreate",void 0),(0,G.Cg)([(0,W.W_)(),(0,W.SZ)(),(0,G.Sn)("design:type",Array)],Dt.prototype,"propertiesToCopy",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],Dt.prototype,"beforeCopy",void 0),(0,G.Cg)([(0,W.bb)(),(0,G.Sn)("design:type",q.H)],Dt.prototype,"onCopy",void 0),Dt=(0,G.Cg)([(0,j.EV)("PropertyCloner",j.YH.root,"Copies matching public properties from a source component to a target component"),(0,X.W)(It)],Dt);var Rt=U(83793),Pt=U(82538),Mt=(U(55539),U(10673));class Nt{constructor(k,B){this.onStart=new q.H,this.onStop=new q.H,this.key=k,this.loop=B}destroy(){this.onStart.dispose(),this.onStop.dispose()}play(k,B){B.isLoaded?this.playInternal(B.getSpine()):B.OnLoaded.addOnce((()=>{this.playInternal(B.getSpine())})),this.onStop.addOnce(k.onAnimationStateStop,k)}playInternal(k){var B;k.setAnimationByName(0,this.key,this.loop),null===(B=this.onStart)||void 0===B||B.dispatch(),this.loop||k.onComplete.addOnce((()=>{this.sendStopSignal()}))}sendStopSignal(){this.onStop.dispatch()}}let xt=class extends V.u{constructor(){super(...arguments),this._states=new Map,this._currentState=null,this._defaultState=null}get CurrentStateKey(){return this._currentState?this._currentState.key:this._defaultState?this._defaultState.key:""}destroy(){this._states.forEach((k=>{k.destroy()})),this._states=null,super.destroy()}setDefaultAnimationState(k,B){this.addAnimationState(k,B)&&(this._defaultState=this._states.get(k),this._currentState||this._defaultState.play(this,this._spineComponent))}addAnimationState(k,B){if(!this._states.has(k)){const U=new Nt(k,B);return this._states.set(k,U),!0}return!1}setAnimationState(k){var B;this._states.has(k)&&this.CurrentStateKey!==k?(null===(B=this._currentState)||void 0===B||B.sendStopSignal(),this._currentState=this._states.get(k),this._currentState.play(this,this._spineComponent),this._currentState.onStop.addOnce(this.onAnimationStateStop,this)):Q.V.log(`Spine animation for key ${k} does not exist on this controller`,Y.$.Error)}onAnimationStateStop(){var k;this._currentState=null,null===(k=this._defaultState)||void 0===k||k.play(this,this._spineComponent)}};(0,G.Cg)([(0,W.Mn)(Mt.v),(0,G.Sn)("design:type",Mt.v)],xt.prototype,"_spineComponent",void 0),xt=(0,G.Cg)([(0,j.EV)("SpineAnimationController",j.YH.animation,"A controller to manage animation states for a given SpineComponent")],xt);var Lt=U(29104),kt=(U(78821),U(50740),U(78321),U(39002));var Bt=U(15308);U(68910);var Ut=U(48368);class Ft{constructor(k){this.onAddedToGroup=new q.H,this.onRemovedFromGroup=new q.H,this.onRemovedFromWorld=new q.H,this.onOutOfBounds=new q.H,this.onEnterBounds=new q.H,this.onInputOver=new q.H,this.onInputOut=new q.H,this.onInputDown=new q.H,this.onInputUp=new q.H,this.onDestroy=new q.H,this.onDragStart=new q.H,this.onDragStop=new q.H,this.onDragUpdate=new q.H,this.onAnimationStart=new q.H,this.onAnimationComplete=new q.H,this.onAnimationLoop=new q.H,this.parent=k}destroy(){this.parent=null,this.onDestroy.dispose(),this.onAddedToGroup.dispose(),this.onRemovedFromGroup.dispose(),this.onEnterBounds.dispose(),this.onOutOfBounds.dispose(),this.onInputOver.dispose(),this.onInputOut.dispose(),this.onInputDown.dispose(),this.onInputUp.dispose(),this.onDragStart.dispose(),this.onDragUpdate.dispose(),this.onDragStop.dispose(),this.onAnimationStart.dispose(),this.onAnimationComplete.dispose(),this.onAnimationLoop.dispose(),this.onRemovedFromWorld.dispose()}}U(9938);var Gt,jt=U(86766),$t=U(48011),Ht=(U(37950),U(37061),U(89460),U(49356),U(90157),U(52777));!function(k){k[k.JSON_HASH=0]="JSON_HASH",k[k.JSON_ARRAY=1]="JSON_ARRAY"}(Gt||(Gt={}));U(72077);var Vt=U(49415),Wt=U(27179);class qt{get diameter(){return this._diameter}set diameter(k){k>0?(this._diameter=k,this._radius=.5*k):Q.V.log(`Circle diameter must be greater than 0. You provided: ${k}`,Y.$.Warning)}get radius(){return this._radius}set radius(k){k>0?(this._radius=k,this._diameter=2*k):Q.V.log(`Circle radius must be greater than 0. You provided: ${k}`,Y.$.Warning)}constructor(k=0,B=0,U=0){this._diameter=0,this._radius=0,this.setTo(k,B,U)}get circumference(){return Math.PI*this._radius*2}circumferencePoint(k,B=!1,U=new Wt.I){return B&&(k=kt.c.degToRad(k)),U.x=this.x+this.radius*Math.cos(k),U.y=this.y+this.radius*Math.sin(k),U}getBounds(){return new Bt.M(this.x-this.radius,this.y-this.radius,this.diameter,this.diameter)}setTo(k,B,U){return this.x=k,this.y=B,this.diameter=U,this}}var Kt,zt,Yt=U(13409),Qt=U(99414),Xt=U(39688);U(66032),U(16883);!function(k){k[k.NORMAL=0]="NORMAL",k[k.ADD=1]="ADD",k[k.MULTIPLY=2]="MULTIPLY",k[k.SCREEN=3]="SCREEN",k[k.OVERLAY=4]="OVERLAY",k[k.DARKEN=5]="DARKEN",k[k.LIGHTEN=6]="LIGHTEN",k[k.COLOR_DODGE=7]="COLOR_DODGE",k[k.COLOR_BURN=8]="COLOR_BURN",k[k.HARD_LIGHT=9]="HARD_LIGHT",k[k.SOFT_LIGHT=10]="SOFT_LIGHT",k[k.DIFFERENCE=11]="DIFFERENCE",k[k.EXCLUSION=12]="EXCLUSION",k[k.HUE=13]="HUE",k[k.SATURATION=14]="SATURATION",k[k.COLOR=15]="COLOR",k[k.LUMINOSITY=16]="LUMINOSITY"}(Kt||(Kt={})),function(k){k[k.DEFAULT=0]="DEFAULT",k[k.LINEAR=1]="LINEAR",k[k.NEAREST=2]="NEAREST"}(zt||(zt={}));var Zt=U(16649),Jt=U(61806);class te{static DUMMY_METHOD(){}get add(){return Jt.W.instance.game.add}get game(){return Jt.W.instance.game}get stage(){return Jt.W.instance.game.stage}get key(){return this._key}set key(k){this._key=k}init(...k){te.DUMMY_METHOD()}preload(){te.DUMMY_METHOD()}create(){te.DUMMY_METHOD()}update(){te.DUMMY_METHOD()}shutdown(){te.DUMMY_METHOD()}paused(){te.DUMMY_METHOD()}resumed(){te.DUMMY_METHOD()}}U(12033);var ee=U(65321),ie=(U(84215),U(42687),U(71392)),se=U(55366),ne=U(42979),ae=U(27780);let re=class extends V.u{get onGameObjectActiveChanged(){return this.gameObject.onActiveChanged}get onGameObjectActiveInHierarchyChanged(){return this.gameObject.onActiveInHierarchyChanged}get onGameObjectHierarchyChanged(){return this.gameObject.onHierarchyChanged}get onGameObjectChildAdded(){return this.gameObject.onChildAdded}get onGameObjectChildRemoved(){return this.gameObject.onChildRemoved}get onGameObjectLayerChanged(){return this.gameObject.onLayerChanged}get onGameObjectComponentAdded(){return this.gameObject.onComponentAdded}get onGameObjectComponentRemoved(){return this.gameObject.onComponentRemoved}get onGameObjectComponentAddedToHierarchy(){return this.gameObject.onComponentAddedToHierarchy}get onGameObjectDestroy(){return this.gameObject.onDestroy}};(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("activeChanged"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectActiveChanged",null),(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("activeInHierarchyChanged"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectActiveInHierarchyChanged",null),(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("hierarchyChanged"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectHierarchyChanged",null),(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("childAdded"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectChildAdded",null),(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("childRemoved"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectChildRemoved",null),(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("layerChanged"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectLayerChanged",null),(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("componentAdded"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectComponentAdded",null),(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("componentRemoved"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectComponentRemoved",null),(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("componentAddedToHierarchy"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectComponentAddedToHierarchy",null),(0,G.Cg)([(0,W.bb)(),(0,W.Lr)(0),(0,W.nK)("destroy"),(0,G.Sn)("design:type",q.H),(0,G.Sn)("design:paramtypes",[])],re.prototype,"onGameObjectDestroy",null),re=(0,G.Cg)([(0,j.EV)("GameObjectEvents",j.YH.root,"Provides access to signals dispatched by GameObject")],re);var oe=U(17400),he=U(57056),ce=U(44716);U(70028),U(8460);const de=(k,B)=>(U,F)=>{(0,W.E8)()(U,F),(0,W.Lr)(B)(U,F),(0,W.nK)(k)(U,F)};var le=U(82119);const ue=(k,B)=>U=>{const F={ctor:U};B&&(F.category=B),le.l[k]=F};U(96352);var fe=U(22494);const be=()=>(k,B)=>{fe.Q.addProperty("custom:annotations:skipMapExport",k.constructor,B)};var pe=U(43501),ve=U(30615);class ge{static getRandomItem(k,B=0,U=0){let F=U;if(!k)return null;U<1&&(F=k.length);const G=B+Math.floor(Math.random()*F);return void 0===k[G]?null:k[G]}}U(89683);var me=U(77120)},30615:(k,B,U)=>{"use strict";U.d(B,{C:()=>F});class F{get list(){return this._list}set list(k){this.reset(),this._list=k}constructor(k=[]){this._cursor=0,this._list=[],this._list=k}get total(){return this._list.length}get first(){return this._cursor=0,this._list.length>0?this._list[0]:null}get next(){var k;return this._cursorU[k]===B)))&&void 0!==U?U:null}exists(k){return this._list.indexOf(k)>-1}reset(){this._list=[],this._cursor=0}remove(k){const B=this._list.indexOf(k);if(B>-1)return this._list.splice(B,1),k}setAll(k,B){this._list.forEach((U=>{U[k]=B}))}callAll(k,...B){this._list.forEach((U=>{U[k].apply(U,B)}))}removeAll(k=!1){k&&this._list.forEach((k=>{k.destroy()})),this.reset()}}},89683:(k,B,U)=>{"use strict";U.d(B,{G:()=>F});class F{static addObject(k){this.enabled&&this.objects.push(k)}static removeObject(k){if(this.enabled){const B=this.objects.indexOf(k);B>=0&&this.objects.splice(B,1)}}static getPropertiesFromObject(k,B){const U={};for(const G in B)Object.keys(B[G]).length>0?U[G]=F.getPropertiesFromObject(k[G],B[G]):k&&null!==k[G]&&void 0!==k[G]?U[G]=k[G]:U[G]=B[G];return U}static getPropertiesFromComponent(k,B){return this.getPropertiesFromObject(k,B)}}F.enabled=!1,F.objects=[]},77120:(k,B,U)=>{"use strict";U.d(B,{D:()=>G});var F=U(95891);class G{static get width(){return Math.max(window.innerWidth,document.documentElement.clientWidth)}static get height(){return Math.max(window.innerHeight,document.documentElement.clientHeight)}static get isReady(){return F.includes(["complete","interactive"],document.readyState)}static addDOMContentLoadedListener(k){document.addEventListener("DOMContentLoaded",k)}static removeDOMContentLoadedListener(k){document.removeEventListener("DOMContentLoaded",k)}static isFullScreen(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)}static addToDOM(k,B,U=!0){const F=null!=B?B:document.body;U&&F.style&&(F.style.overflow="hidden"),F.appendChild(k)}}},81071:(k,B,U)=>{"use strict";U.d(B,{n:()=>H});var F=U(40794),G=U(27179),j=U(32469),$=U(823);class H{static getDefaultsForComponent(k){const B=F.X[k],U=Reflect.getMetadata($.UW,B);if(!U)return{};const H=U.map((k=>Reflect.getMetadata($.fY,B,k))),V=new B,W={};return H.forEach((k=>{var B;const U=null!==(B=k.alias)&&void 0!==B?B:k.property;if(k.type===j.b.Signal)return;let F;try{F=k.type!==j.b.Vector||k.isArray||k.isReorderableList?V[k.property]:new G.I(V[k.property].x,V[k.property].y)}catch(e){switch(k.type){case j.b.Vector:F={x:0,y:0};break;case j.b.Size:F={width:0,height:0}}}W[U]=F})),W}}},26731:(k,B,U)=>{"use strict";U.d(B,{$:()=>F});class F{initialize(k,B){this._componentGuid=k,this._editorAPI=B}}},15887:(k,B,U)=>{"use strict";U.d(B,{X:()=>j});var F,G=U(32154);!function(k){k[k.Vertical=0]="Vertical",k[k.Horizontal=1]="Horizontal"}(F||(F={}));class j{constructor(k,B,U){if(this.nodeSize="auto",this.isContainer=!1,this.title="",this.isCollapsible=!1,this.startCollapsed=!1,this.spacing=0,this.style={},this.type=k,this.elements=B,G.A.isDefined(U)){if(G.A.isDefined(U.nodeSize)&&(this.nodeSize=U.nodeSize),G.A.isDefined(U.isContainer)&&!0===U.isContainer&&(this.isContainer=U.isContainer),U.title&&(this.isContainer=!0,this.title=U.title),G.A.isDefined(U.isCollapsible)&&!0===U.isCollapsible&&(this.isContainer=!0,this.isCollapsible=U.isCollapsible),G.A.isDefined(U.startCollapsed)&&!0===U.startCollapsed&&(this.isContainer=!0,this.isCollapsible=!0,this.startCollapsed=U.startCollapsed),G.A.isDefined(U.isContainer)&&this.isContainer!==U.isContainer)throw new Error("Value for isContainer set to false, but other container options were set.");if(G.A.isDefined(U.isCollapsible)&&this.isCollapsible!==U.isCollapsible)throw new Error("Value for isCollapsible set to false, but startCollapsed was set to true.");G.A.isDefined(U.spacing)&&(this.spacing=U.spacing),G.A.isDefined(U.style)&&(this.style=U.style)}}static createHorizontal(k,B){return new j(F.Horizontal,k,B)}static createVertical(k,B){return new j(F.Vertical,k,B)}static createVerticalContainer(k,B){const U=Object.assign(Object.assign({},B),{isContainer:!0});return j.createVertical(k,U)}static createHorizontalContainer(k,B){const U=Object.assign(Object.assign({},B),{isContainer:!0});return j.createHorizontal(k,U)}}},32928:(k,B,U)=>{"use strict";U.d(B,{G:()=>Y});var F=U(15887),G=U(32357),j=U(1596),$=U(900),H=U(47681),V=U(46386),W=U(31042),q=U(56761),K=U(33431),z=U(76814);class Y{static checkboxGroup(k){const B=this.createLabelTerminal(k,"11of12"),U=q.f.create({id:k.id,inputType:"checkbox",inputValue:k.inputValue,onChange:k.onChange,readonly:k.readonly,nodeSize:"1of12"});return F.X.createHorizontal([B,U])}static numberGroup(k){const B=this.createLabelTerminal(k),U=q.f.create({id:k.id,inputValue:k.inputValue,inputType:"number",inputUpdateMode:k.inputUpdateMode,showDeleteButton:k.showDeleteButton,readonly:k.readonly,onChange:k.onChange});return F.X.createHorizontal([B,U])}static textGroup(k){const B=this.createLabelTerminal(k),U=q.f.create({id:k.id,inputValue:k.inputValue,inputType:"text",inputUpdateMode:k.inputUpdateMode,showDeleteButton:k.showDeleteButton,readonly:k.readonly,onChange:k.onChange});return F.X.createHorizontal([B,U])}static colorPickerGroup(k){const B=this.createLabelTerminal(k),U=q.f.create({id:k.id,inputValue:k.inputValue,inputType:"color",inputUpdateMode:k.inputUpdateMode,readonly:k.readonly,onChange:k.onChange});return F.X.createHorizontal([B,U])}static vectorGroup(k){var B,U,G,j;const $=this.createLabelTerminal(k),H=q.f.create({labelValue:"x:",id:null!==(B=k.xKey)&&void 0!==B?B:`${k.id}X`,propertyPath:k.xKey?[k.xKey]:[k.id,"x"],inputValue:null===(U=k.vectorValue)||void 0===U?void 0:U.x,inputType:"number",inputUpdateMode:k.inputUpdateMode,readonly:k.readonly,showDeleteButton:k.showDeleteButton,onChange:k.onChange}),V=q.f.create({labelValue:"y:",id:null!==(G=k.yKey)&&void 0!==G?G:`${k.id}Y`,propertyPath:k.yKey?[k.yKey]:[k.id,"y"],inputValue:null===(j=k.vectorValue)||void 0===j?void 0:j.y,inputType:"number",inputUpdateMode:k.inputUpdateMode,readonly:k.readonly,showDeleteButton:k.showDeleteButton,onChange:k.onChange});return F.X.createHorizontal([$,F.X.createVertical([H,V])])}static sizeGroup(k){var B,U,G,j;const $=this.createLabelTerminal(k),H=q.f.create({labelValue:"w:",id:null!==(B=k.widthKey)&&void 0!==B?B:`${k.id}W`,propertyPath:k.widthKey?[k.widthKey]:[k.id,"width"],inputValue:null===(U=k.sizeValue)||void 0===U?void 0:U.width,inputType:"number",inputUpdateMode:k.inputUpdateMode,readonly:k.readonly,showDeleteButton:k.showDeleteButton,onChange:k.onChange}),V=q.f.create({labelValue:"h:",id:null!==(G=k.heightKey)&&void 0!==G?G:`${k.id}H`,propertyPath:k.heightKey?[k.heightKey]:[k.id,"height"],inputValue:null===(j=k.sizeValue)||void 0===j?void 0:j.height,inputType:"number",inputUpdateMode:k.inputUpdateMode,readonly:k.readonly,showDeleteButton:k.showDeleteButton,onChange:k.onChange});return F.X.createHorizontal([$,F.X.createVertical([H,V])])}static fourDimensionGroup(k){var B,U,G,j,$,H,V,W;const K=this.createLabelTerminal(k),z=q.f.create({labelValue:`${k.xKey?k.xKey:"X"}:`,id:null!==(B=k.xKey)&&void 0!==B?B:`${k.id}Top`,propertyPath:k.xKey?[k.xKey]:[k.id,"x"],inputValue:null===(U=k.fourInputValue)||void 0===U?void 0:U.top,inputType:"number",inputUpdateMode:k.inputUpdateMode,readonly:k.readonly,showDeleteButton:k.showDeleteButton,onChange:k.onChange}),Y=q.f.create({labelValue:`${k.yKey?k.yKey:"Y"}:`,id:null!==(G=k.yKey)&&void 0!==G?G:`${k.id}Bottom`,propertyPath:k.yKey?[k.yKey]:[k.id,"y"],inputValue:null===(j=k.fourInputValue)||void 0===j?void 0:j.bottom,inputType:"number",inputUpdateMode:k.inputUpdateMode,readonly:k.readonly,showDeleteButton:k.showDeleteButton,onChange:k.onChange}),Q=q.f.create({labelValue:`${k.zKey?k.zKey:"Z"}:`,id:null!==($=k.zKey)&&void 0!==$?$:`${k.id}Right`,propertyPath:k.zKey?[k.zKey]:[k.id,"z"],inputValue:null===(H=k.fourInputValue)||void 0===H?void 0:H.right,inputType:"number",inputUpdateMode:k.inputUpdateMode,readonly:k.readonly,showDeleteButton:k.showDeleteButton,onChange:k.onChange}),X=q.f.create({labelValue:`${k.wKey?k.wKey:"W"}:`,id:null!==(V=k.wKey)&&void 0!==V?V:`${k.id}Left`,propertyPath:k.wKey?[k.wKey]:[k.id,"w"],inputValue:null===(W=k.fourInputValue)||void 0===W?void 0:W.left,inputType:"number",inputUpdateMode:k.inputUpdateMode,readonly:k.readonly,showDeleteButton:k.showDeleteButton,onChange:k.onChange});return F.X.createVertical([K,F.X.createHorizontal([z,Y]),F.X.createHorizontal([Q,X])])}static dropdownGroup(k){const B=this.createLabelTerminal(k),U=$._.create({id:k.id,selectOptions:k.selectOptions,selectValue:k.selectValue,readonly:k.readonly,onChange:k.onChange});return F.X.createHorizontal([B,U])}static enumGroup(k,B){const U=Object.keys(B).filter((k=>isNaN(k))).map((k=>({label:k,value:B[k]})));return this.dropdownGroup(Object.assign(Object.assign({},k),{selectOptions:U}))}static presetGroup(k){const B=this.createLabelTerminal(k),U=z.E.create(k);return F.X.createHorizontal([B,U])}static buttonGroup(k){const B=this.createLabelTerminal(k),U=G.X.create({id:k.id,buttonText:k.buttonText,buttonIcon:k.buttonIcon,buttonType:k.buttonType,onClick:k.onClick,buttonDisabled:k.buttonDisabled});return F.X.createHorizontal([B,U])}static componentPickerGroup(k){const B=this.createLabelTerminal(k),U=j.G.create({id:k.id,componentType:k.componentType,componentGuid:k.componentGuid,readonly:k.readonly,onChange:k.onChange});return F.X.createHorizontal([B,U])}static gameObjectPickerGroup(k){const B=this.createLabelTerminal(k),U=V.W.create({id:k.id,gameObjectGuid:k.gameObjectGuid,readonly:k.readonly,onChange:k.onChange});return F.X.createHorizontal([B,U])}static filePickerGroup(k){const B=this.createLabelTerminal(k),U=H.H.create({id:k.id,path:k.path,onChange:k.onChange,allowedExtensions:k.allowedExtensions});return F.X.createHorizontal([B,U])}static imagePickerGroup(k){const B=this.createLabelTerminal(k),U=W.A.create({id:k.id,guid:k.guid,onChange:k.onChange});return F.X.createHorizontal([B,U])}static createLabelTerminal(k,B="4of12"){return K.l.create({id:`${k.id}-label`,labelTooltip:k.labelTooltip,labelValue:k.labelValue,labelTextWrap:k.labelTextWrap,nodeSize:B})}}},97573:(k,B,U)=>{"use strict";U.d(B,{H:()=>G});var F=U(81071);class G{constructor(){this.oldType="LegacyTransform",this.newType="RectTransform"}convert(k){const B=Object.assign(Object.assign({},F.n.getDefaultsForComponent(this.oldType)),{x:0,y:0,relativeX:0,relativeY:0,width:0,height:0,relativeWidth:0,relativeHeight:0,anchorX:0,anchorY:0,scaleX:1,scaleY:1}),U=Object.assign({},k);Object.keys(U).forEach((k=>{void 0===U[k]&&delete U[k]})),"relativeX"in U&&delete U.x,"relativeY"in U&&delete U.y,"relativeWidth"in U&&delete U.width,"relativeHeight"in U&&delete U.height;const G=Object.assign(Object.assign({},B),U),j=F.n.getDefaultsForComponent(this.newType);return Object.assign(Object.assign({},j),{localPosition:{x:G.x,y:G.y},localRotation:0,localScale:{x:G.scaleX,y:G.scaleY},anchorMin:{x:G.relativeX-G.relativeWidth*G.anchorX,y:G.relativeY-G.relativeHeight*G.anchorY},anchorMax:{x:G.relativeX+G.relativeWidth*(1-G.anchorX),y:G.relativeY+G.relativeHeight*(1-G.anchorY)},anchoredPivotOffset:{x:G.x,y:G.y},sizeDelta:{width:G.width,height:G.height},pivot:{x:G.anchorX,y:G.anchorY}})}}},8490:(k,B,U)=>{"use strict";U.d(B,{L:()=>K});var F=U(26731),G=U(15887),j=U(32928),$=U(23664),H=U(5440),V=U(32357),W=U(97573),q=U(62131);class K extends F.${handleValueChange(k,B,U,F){null!==F&&K.exclusiveMap[U]&&B.modifyComponent(k,{[K.exclusiveMap[U]]:null})}generate(k,B){const U=[];return U.push(j.G.vectorGroup({id:"position",labelValue:"Position",showDeleteButton:!0,vectorValue:{x:k.x,y:k.y},xKey:"x",yKey:"y",onChange:this.handleValueChange.bind(this,this._componentGuid,this._editorAPI)})),U.push($._.halfBlankLine()),U.push(j.G.vectorGroup({id:"relativePosition",labelValue:"Relative Pos",showDeleteButton:!0,vectorValue:{x:k.relativeX,y:k.relativeY},xKey:"relativeX",yKey:"relativeY",onChange:this.handleValueChange.bind(this,this._componentGuid,this._editorAPI)})),U.push($._.halfBlankLine()),U.push(j.G.sizeGroup({id:"size",labelValue:"Size",showDeleteButton:!0,sizeValue:{width:k.width,height:k.height},widthKey:"width",heightKey:"height",onChange:this.handleValueChange.bind(this,this._componentGuid,this._editorAPI)})),U.push($._.halfBlankLine()),U.push(j.G.sizeGroup({id:"relativeSize",labelValue:"Relative Size",showDeleteButton:!0,sizeValue:{width:k.relativeWidth,height:k.relativeHeight},widthKey:"relativeWidth",heightKey:"relativeHeight",onChange:this.handleValueChange.bind(this,this._componentGuid,this._editorAPI)})),U.push($._.halfBlankLine()),U.push(j.G.vectorGroup({id:"anchor",labelValue:"Anchor",showDeleteButton:!0,vectorValue:{x:k.anchorX,y:k.anchorY},xKey:"anchorX",yKey:"anchorY"})),U.push($._.halfBlankLine()),U.push(j.G.vectorGroup({id:"scale",labelValue:"Scale",showDeleteButton:!0,vectorValue:{x:k.scaleX,y:k.scaleY},xKey:"scaleX",yKey:"scaleY"})),this._editorAPI.isFeatureEnabled(q.b.ConvertLegacyTransformButton)&&(U.push($._.halfBlankLine()),U.push(V.X.create({id:"convert-button",buttonText:"Convert to RectTransform",buttonIcon:H.a2.Bolt,buttonType:H.VQ.Highlight,onClick:()=>{this._editorAPI.convertComponent(this._componentGuid,new W.H)}}))),G.X.createVertical(U)}}K.exclusiveMap={x:"relativeX",y:"relativeY",relativeX:"x",relativeY:"y",width:"relativeWidth",height:"relativeHeight",relativeWidth:"width",relativeHeight:"height"}},140:(k,B,U)=>{"use strict";U.d(B,{I:()=>G});var F=U(49860);class G extends F.A{constructor(k){var B;super(k),this.label=k.label,this.arrayType=k.arrayType,this.enumeration=k.enumeration,this.value=k.value,this.isReorderable=null===(B=k.isReorderable)||void 0===B||B,this.insertElementCallbacks=k.insertElementCallbacks,this.onChange=k.onChange,this.getElementInspector=k.getElementInspector}static create(k){return new G(k)}}},32357:(k,B,U)=>{"use strict";U.d(B,{X:()=>j});var F=U(5440),G=U(49860);class j extends G.A{constructor(k){var B;super(k),this.onClick=k.onClick,this.buttonText=k.buttonText,this.buttonIcon=k.buttonIcon,this.buttonType=k.buttonType,this.disabled=k.buttonDisabled,this.buttonTextWrap=null!==(B=k.buttonTextWrap)&&void 0!==B?B:F.K3.Wrap,this.tooltip=k.tooltip}static create(k){return new j(k)}}},1596:(k,B,U)=>{"use strict";U.d(B,{G:()=>G});var F=U(49860);class G extends F.A{constructor(k){var B,U;super(k),this.componentType="string"==typeof k.componentType?k.componentType:null===(B=k.componentType)||void 0===B?void 0:B.name,this.componentGuid=k.componentGuid,this.readonly=null!==(U=k.readonly)&&void 0!==U&&U,this.onChange=k.onChange}static create(k){return new G(k)}}},23664:(k,B,U)=>{"use strict";U.d(B,{_:()=>j});var F=U(5440),G=U(49860);class j extends G.A{constructor(k){super(k),this.dividerType=k.dividerType}static line(k=""){return new j({id:k,dividerType:F.gY.Line})}static blankLine(k=""){return new j({id:k,dividerType:F.gY.Blank})}static halfBlankLine(k=""){return new j({id:k,dividerType:F.gY.HalfBlank})}static verticalLine(k=""){return new j({id:k,dividerType:F.gY.VerticalLine})}static verticalBlank(k=""){return new j({id:k,dividerType:F.gY.VerticalBlank})}}},900:(k,B,U)=>{"use strict";U.d(B,{_:()=>G});var F=U(49860);class G extends F.A{constructor(k){var B;super(k),this.selectOptions=k.selectOptions,this.selectValue=k.selectValue,this.readonly=null!==(B=k.readonly)&&void 0!==B&&B,this.onChange=k.onChange}static create(k){const B=k.selectOptions.length>0&&"string"==typeof k.selectOptions[0]?k.selectOptions.map((k=>({label:k,value:k}))):k.selectOptions;return new G(Object.assign(Object.assign({},k),{selectOptions:B}))}}},47681:(k,B,U)=>{"use strict";U.d(B,{H:()=>G});var F=U(49860);class G extends F.A{constructor(k){super(k),this.path=k.path,this.onChange=k.onChange,this.allowedExtensions=k.allowedExtensions}static create(k){return new G(k)}}},46386:(k,B,U)=>{"use strict";U.d(B,{W:()=>G});var F=U(49860);class G extends F.A{constructor(k){var B;super(k),this.gameObjectGuid=k.gameObjectGuid,this.readonly=null!==(B=k.readonly)&&void 0!==B&&B,this.onChange=k.onChange}static create(k){return new G(k)}}},31042:(k,B,U)=>{"use strict";U.d(B,{A:()=>G});var F=U(49860);class G extends F.A{constructor(k){super(k),this.guid=k.guid,this.onChange=k.onChange}static create(k){return new G(k)}}},42149:(k,B,U)=>{"use strict";U.d(B,{b:()=>G});var F=U(49860);class G extends F.A{constructor(k){super(k),this.message=k.message.replace(/\n/gm," "),this.iconType=k.iconType}static create(k){return new G(k)}}},56761:(k,B,U)=>{"use strict";U.d(B,{f:()=>G});var F=U(49860);class G extends F.A{constructor(k){var B;super(k),this.label=k.labelValue,this.value=k.inputValue,this.type=k.inputType,this.onChange=k.onChange,this.updateMode=k.inputUpdateMode,this.readOnly=k.readonly,this.showDeleteButton=null!==(B=k.showDeleteButton)&&void 0!==B&&B}static create(k){return new G(k)}}},49860:(k,B,U)=>{"use strict";U.d(B,{A:()=>F});class F{constructor(k){var B,U;this.id=k.id,this.nodeSize=null!==(B=k.nodeSize)&&void 0!==B?B:"auto",this.propertyPath=k.propertyPath&&k.propertyPath.length>0?k.propertyPath:[this.id],this.style=null!==(U=k.style)&&void 0!==U?U:{}}static create(k){throw new Error("Implement the create function")}}},33431:(k,B,U)=>{"use strict";U.d(B,{l:()=>j});var F=U(5440),G=U(49860);class j extends G.A{constructor(k){var B,U,G;super(k),this.labelValue=k.labelValue,this.labelTooltip=null!==(B=k.labelTooltip)&&void 0!==B?B:"",this.labelPosition=null!==(U=k.labelPosition)&&void 0!==U?U:F.G5.Left,this.labelTextWrap=null!==(G=k.labelTextWrap)&&void 0!==G?G:F.K3.Wrap}static create(k){return new j(k)}}},76814:(k,B,U)=>{"use strict";U.d(B,{E:()=>G});var F=U(49860);class G extends F.A{constructor(k){super(k)}static create(k){return new G(k)}}},84893:(k,B,U)=>{"use strict";U.d(B,{N:()=>G});var F=U(49860);class G extends F.A{constructor(k){super(k),this.label=k.label,this.signalValue=k.signalValue,this.componentGUID=k.componentGUID}static create(k){return new G(k)}}},74786:(k,B,U)=>{"use strict";U.d(B,{Iq:()=>F.I,X9:()=>G.X,_L:()=>j._,_6:()=>$._,Hn:()=>H.H,WV:()=>W.W,bl:()=>q.b,fq:()=>K.f,ly:()=>z.l,T7:()=>X,Ny:()=>Y.N,IC:()=>Q});var F=U(140),G=U(32357),j=(U(1596),U(23664)),$=U(900),H=U(47681),V=U(49860);V.A;var W=U(46386);V.A;U(31042);var q=U(42149),K=U(56761),z=U(33431),Y=(U(76814),U(84893));class Q extends V.A{constructor(k){super(k),this.guid=k.guid,this.onChange=k.onChange}static create(k){return new Q(k)}}class X extends V.A{constructor(k){super(k),this.guid=k.guid,this.onChange=k.onChange}static create(k){return new X(k)}}},62131:(k,B,U)=>{"use strict";var F;U.d(B,{b:()=>F}),function(k){k.ConvertLegacyTransformButton="convertLegacyTransformButton",k.PreserveWorldPositionOnHierarchyChange="preserveWorldPositionOnHierarchyChange"}(F||(F={}))},5440:(k,B,U)=>{"use strict";var F,G,j,$,H,V,W;U.d(B,{AT:()=>$,G5:()=>F,JG:()=>W,K3:()=>G,VQ:()=>H,a2:()=>V,gY:()=>j}),function(k){k.Left="left",k.Right="right",k.Center="center"}(F||(F={})),function(k){k.None="none",k.Wrap="wrap"}(G||(G={})),function(k){k.HalfBlank="halfBlank",k.Blank="blank",k.Line="line",k.VerticalLine="verticalLine",k.VerticalBlank="verticalBlank"}(j||(j={})),function(k){k.Info="info",k.Warning="warning",k.Error="error",k.Verbose="verbose",k.Question="question"}($||($={})),function(k){k.Default="default",k.Highlight="highlight",k.Danger="danger",k.Prodigy="prodigy"}(H||(H={})),function(k){k.None="none",k.Eraser="eraser",k.Image="image",k.Pencil="pencil",k.Trash="trash",k.Bolt="bolt",k.Gear="gear",k.ArrowUp="arrow-up",k.ArrowDown="arrow-down",k.ArrowLeft="arrow-left",k.ArrowRight="arrow-right",k.Smiley="face-smile",k.FloppyDisk="floppy-disk",k.VolumeOn="volume",k.VolumeOff="volume-xmark",k.EyeOpen="eye",k.EyeClosed="eye-slash",k.Folder="folder",k.Copy="copy",k.Cut="scissors",k.Paste="paste",k.Play="play",k.Pause="pause",k.Stop="stop",k.Rewind="backward",k.FastForward="forward",k.Record="record-vinyl",k.StepForward="forward-step",k.StepBackward="backward-step",k.ArrowPointer="arrow-pointer",k.Add="plus",k.Spinner="spinner"}(V||(V={})),function(k){k.OnTheFly="onTheFly",k.Confirm="confirm"}(W||(W={}))},43234:(k,B,U)=>{"use strict";U.d(B,{P:()=>F,o:()=>j});var F,G=U(68910);!function(k){k[k.Add=0]="Add",k[k.Average=1]="Average",k[k.Darken=2]="Darken",k[k.Difference=3]="Difference",k[k.Exclusion=4]="Exclusion",k[k.Lighten=5]="Lighten",k[k.Multiply=6]="Multiply",k[k.Negation=7]="Negation",k[k.Phoenix=8]="Phoenix",k[k.Screen=9]="Screen",k[k.Subtract=10]="Subtract"}(F||(F={}));class j extends G.Filter{get tintIntensity(){return this.uniforms.tintIntensity}set tintIntensity(k){this.uniforms.tintIntensity=k}get alpha(){return this.uniforms.alpha}set alpha(k){this.uniforms.alpha=k}get blend(){return F[this.uniforms.blend]}set blend(k){this.uniforms.blend=k}get tintColor(){return G.Color.shared.setValue(this.uniforms.color).toRgbArray()}set tintColor(k){this.uniforms.color=k}constructor(k={}){const B=Object.assign(Object.assign({},j.defaultOptions),k);super(null,j.FRAGMENT_SHADER,{alpha:B.alpha,blend:B.blend,tintIntensity:B.tintIntensity,color:G.Color.shared.setValue(B.color).toRgbArray()})}}j.defaultOptions={color:111,tintIntensity:0,blend:F.Multiply,alpha:1},j.FRAGMENT_SHADER="\n precision mediump float;\n varying vec2 vTextureCoord;\n uniform sampler2D uSampler;\n uniform vec3 color;\n uniform float alpha;\n uniform float tintIntensity;\n uniform int blend;\n \n void main() {\n // set overall alpha on image first, we can affect children this way.\n vec4 processedColor = texture2D( uSampler, vTextureCoord ) * alpha;\n\n // apply tint\n if(tintIntensity>0.0){\n vec3 a = processedColor.rgb/processedColor.a;\n vec3 b = color;\n\n // blend modes\n if (blend == 0) { // add\n processedColor.rgb = min(a + b, vec3(1.0));\n } else if (blend == 1) { // average\n processedColor.rgb = (a + b) * 0.5;\n } else if (blend == 2) { // darken\n processedColor.rgb = min(a, b);\n } else if (blend == 3) { // difference\n processedColor.rgb = abs(a - b);\n } else if (blend == 4) { // exclusion\n processedColor.rgb = a + b - 2.0 * a * b;\n } else if (blend == 5) { // lighten\n processedColor.rgb = max(a, b);\n } else if (blend == 6) { // multiply\n processedColor.rgb = a * b;\n } else if (blend == 7) { // negation\n processedColor.rgb = vec3(1.0) - abs(vec3(1.0) - a - b);\n } else if (blend == 8) { // phoenix\n processedColor.rgb = min(a, b) - max(a, b) + vec3(1.0);\n } else if (blend == 9) { // screen\n processedColor.rgb = 1.0 - ((1.0 - a) * (1.0 - b));\n } else if (blend == 10) { // subtract\n processedColor.rgb = max(a + b - vec3(1.0), vec3(0.0));\n };\n processedColor.rgb = mix(a, processedColor.rgb, tintIntensity);\n processedColor.rgb*=processedColor.a;\n }\n\n // cleanup\n processedColor = clamp(processedColor, 0.0, 1.0);\n gl_FragColor = processedColor;\n }"},47131:(k,B,U)=>{"use strict";U.d(B,{d:()=>G});var F=U(40794);class G extends F.u{}},300:(k,B,U)=>{"use strict";U.d(B,{db:()=>Y,X2:()=>X,oW:()=>nt.o,Pz:()=>nt.P});var F=U(8674),G=U(68910),j=U(29658),$=U(823),H=U(47131);let V=class extends H.d{constructor(){super(...arguments),this.alpha=1}createFilter(){return new G.filters.AlphaFilter(this.alpha)}};(0,F.Cg)([(0,$.g1)(),(0,F.Sn)("design:type",Number)],V.prototype,"alpha",void 0),V=(0,F.Cg)([(0,j.EV)("AlphaFilter",j.YH.filter,"A component for a alpha filter")],V);var W=U(61806),q=U(5191),K=U(80267),z=U(32154);class Y{constructor(){this.filters=[]}bake(k){if(!z.A.isDefined(k))return K.V.log("No Texture provided for BakeStep",q.$.Error),null;if(k.width*k.height==0)return K.V.log("Texture in BakeTexture does not have a proper width or height",q.$.Error),null;Y._sprite.texture=k,Y._sprite.filters=this.filters,Y._sprite.width=k.width,Y._sprite.height=k.height,Y._sprite.position.set(0,0);const B={width:k.width,height:k.height},U=W.W.instance.game.renderer.generateTexture(Y._sprite,Object.assign({region:k.frame},B));return Y._sprite.texture=null,Y._sprite.filters=null,U}}Y._sprite=new G.Sprite;class Q{constructor(){this.decals=[]}bake(k){Q._sprite.texture=k;for(const U of this.decals)for(const k of U.transforms){const B=new G.Sprite(U.texture);Q._sprite.addChild(B),B.transform=k}const B=W.W.instance.game.renderer.generateTexture(Q._sprite);for(let U=Q._sprite.children.length-1;U>=0;U--)Q._sprite.children[U].destroy();return Q._sprite.texture=null,B}}Q._sprite=new G.Sprite;class X extends G.Texture{constructor(k,B=[]){super(k.baseTexture,k.frame,k.orig,k.trim,k.rotate,k.defaultAnchor),this.original=this.baseTexture,this.bakeSteps=B,this.bakeSteps.length&&this.bake()}bake(){this.baseTexture=this.original.castToBaseTexture();for(const k of this.bakeSteps)this.baseTexture=k.bake(this).baseTexture}addStep(k){this.bakeSteps.push(k),this.baseTexture=k.bake(this).baseTexture}destroy(k){this.original.dispose(),k&&this.original.destroy(),this.bakeSteps=[],super.destroy(k)}}var Z=U(53924),J=U(26731),tt=U(15887),et=U(32928);class it extends J.${generate(k,B){const U=et.G.numberGroup({id:"strength",labelValue:"strength",inputValue:k.strength}),F=et.G.numberGroup({id:"quality",labelValue:"quality",inputValue:k.quality}),G=et.G.numberGroup({id:"resolution",labelValue:"resolution",inputValue:k.resolution}),j=et.G.dropdownGroup({id:"kernelSize",labelValue:"kernelSize",selectOptions:[5,7,9,11,13,15].map((k=>({label:k.toString(),value:k}))),selectValue:k.kernelSize});return tt.X.createVertical([U,F,G,j])}}let st=class extends H.d{constructor(){super(...arguments),this.strength=8,this.quality=4,this.resolution=G.settings.FILTER_RESOLUTION,this.kernelSize=5}createFilter(){return new G.filters.BlurFilter(this.strength,this.quality,this.resolution,this.kernelSize)}};(0,F.Cg)([(0,$.g1)(),(0,F.Sn)("design:type",Number)],st.prototype,"strength",void 0),(0,F.Cg)([(0,$.g1)(),(0,F.Sn)("design:type",Number)],st.prototype,"quality",void 0),(0,F.Cg)([(0,$.g1)(),(0,F.Sn)("design:type",Number)],st.prototype,"resolution",void 0),(0,F.Cg)([(0,$.g1)(),(0,F.Sn)("design:type",Number)],st.prototype,"kernelSize",void 0),st=(0,F.Cg)([(0,j.EV)("BlurFilter",j.YH.filter,"A component for a blur filter"),(0,Z.W)(it)],st);var nt=U(43234);class at extends G.Filter{get y(){return this.uniforms.ySample}set y(k){this.uniforms.ySample=k}get LUT(){return this.uniforms.uLUT}set LUT(k){this.uniforms.uLUT=k}constructor(k,B=.5){super(null,at.fragmentShader,{ySample:B,uLUT:null!=k?k:G.Texture.WHITE})}}at.fragmentShader="\n precision mediump float;\n varying vec2 vTextureCoord;\n uniform sampler2D uSampler;\n uniform sampler2D uLUT;\n uniform float ySample;\n \n void main() {\n vec4 c = texture2D( uSampler, vTextureCoord );\n vec4 l = texture2D( uLUT, vec2(c.r/c.a, ySample) );\n c.rgb = l.rgb;\n c.rgb *= c.a;\n gl_FragColor = c;\n }";var rt=U(37692);let ot=class extends H.d{constructor(){super(...arguments),this.replacementArray=[],this.tolerance=.05,this.maxColors=null}createFilter(){return new rt.N(this.replacementArray,this.tolerance,this.maxColors)}};(0,F.Cg)([(0,$.SZ)(),(0,F.Sn)("design:type",Array)],ot.prototype,"replacementArray",void 0),(0,F.Cg)([(0,$.g1)(),(0,F.Sn)("design:type",Number)],ot.prototype,"tolerance",void 0),(0,F.Cg)([(0,$.g1)(),(0,F.Sn)("design:type",Number)],ot.prototype,"maxColors",void 0),ot=(0,F.Cg)([(0,j.EV)("ColorReplaceFilter",j.YH.filter)],ot);class ht extends G.Filter{get y(){return this.uniforms.ySample}set y(k){this.uniforms.ySample=k}get LUT(){return this.uniforms.uLUT}set LUT(k){this.uniforms.uLUT=k}constructor(k,B=.5){super(null,ht.fragmentShader,{ySample:B,uLUT:null!=k?k:G.Texture.WHITE})}}ht.fragmentShader="\n precision mediump float;\n varying vec2 vTextureCoord;\n uniform sampler2D uSampler;\n uniform sampler2D uLUT;\n uniform float ySample;\n \n void main() {\n vec4 c = texture2D( uSampler, vTextureCoord );\n c.rgb /= c.a;\n c.r = texture2D( uLUT, vec2(c.r, ySample) ).r;\n c.g = texture2D( uLUT, vec2(c.g, ySample) ).g;\n c.b = texture2D( uLUT, vec2(c.b, ySample) ).b;\n c.rgb *= c.a;\n gl_FragColor = c;\n }";let ct=class extends H.d{constructor(){super(...arguments),this.noise=.5,this.seed=1}createFilter(){return new G.filters.NoiseFilter(this.noise,this.seed)}};(0,F.Cg)([(0,$.g1)(),(0,F.Sn)("design:type",Number)],ct.prototype,"noise",void 0),(0,F.Cg)([(0,$.g1)(),(0,F.Sn)("design:type",Number)],ct.prototype,"seed",void 0),ct=(0,F.Cg)([(0,j.EV)("NoiseFilter",j.YH.filter,"A component for a noise filter")],ct)},62459:(k,B,U)=>{"use strict";U.d(B,{rcl:()=>$e,BKH:()=>Xi,CLt:()=>Q.CL,IqD:()=>xe.Iq,lv2:()=>Q.lv,dbg:()=>Fe.db,X2n:()=>Fe.X2,oWr:()=>Fe.oW,dTp:()=>is,jsv:()=>Ui.j,OQO:()=>Lt,J6z:()=>Q.J6,a2l:()=>Tt.a2,X9M:()=>xe.X9,l2R:()=>Q.l2,r05:()=>Q.r0,i7d:()=>Q.i7,YPZ:()=>Q.YP,kBN:()=>qt,jlt:()=>Q.jl,ESH:()=>yo,Q1f:()=>Q.Q1,TZp:()=>Rt,uAl:()=>Q.uA,XFX:()=>Q.XF,AY_:()=>nn,Crq:()=>ns,oDK:()=>Q.oD,mcf:()=>Q.mc,Fid:()=>wi,$KW:()=>gt.$,nvu:()=>zr,o5U:()=>Bt.o,_Lw:()=>xe._L,DX_:()=>Q.DX,_6c:()=>xe._6,iO0:()=>es,PzZ:()=>Fe.Pz,yQ0:()=>Q.yQ,YH6:()=>Q.YH,Z$z:()=>hs.Z$,dBt:()=>Jt,EQV:()=>ee,vLr:()=>te,DEw:()=>Zi,If$:()=>se,t5G:()=>z,ZIW:()=>Li,$Zn:()=>Ps,e$E:()=>Q.e$,bJb:()=>hs.bJ,ba$:()=>Q.b,iXQ:()=>dr,KZk:()=>or,GS3:()=>Q.GS,bTj:()=>Q.bT,RQr:()=>Ut.R,sVA:()=>Q.sV,rPI:()=>mi,zL:()=>gi,CQn:()=>ii,myN:()=>ur,wvl:()=>mt,Hnb:()=>xe.Hn,wIr:()=>Q.wI,YAt:()=>Q.YA,W$e:()=>Q.W$,Zt2:()=>Q.Zt,$Bt:()=>Y,_mx:()=>Q._m,bE_:()=>Ei.b,WzQ:()=>Q.Wz,WVg:()=>xe.WV,Htv:()=>Ft,mk0:()=>Q.mk,KDe:()=>ro,Ff4:()=>Gt,vYh:()=>ge,JTA:()=>Qi,Sz7:()=>ts,wGs:()=>On,ATc:()=>Tt.AT,bl1:()=>xe.bl,s3P:()=>Di,JTX:()=>Ii,Uoy:()=>jt.U,Eci:()=>ki,Sjx:()=>Q.Sj,fqe:()=>xe.fq,JGO:()=>Tt.JG,XRp:()=>yt.X,PQK:()=>Oi,rrh:()=>_i.r,AA4:()=>gr,UvC:()=>vr,XKG:()=>fr,_A9:()=>br,ly:()=>xe.ly,I6z:()=>Do.I,PEP:()=>Yi.P,K16:()=>Q.K1,mZY:()=>hn,Oap:()=>ss,$bb:()=>J.$,VyI:()=>Z.V,cj9:()=>Q.cj,E1D:()=>Ln.E1,pV3:()=>Rn,iyL:()=>Er,uFJ:()=>Tr,m$y:()=>Sr,wPU:()=>Ar,nbL:()=>qr,ibt:()=>Cr,d53:()=>Or,s1c:()=>Ir,Ayx:()=>Kr,Qgu:()=>Rr,ZxM:()=>Pr,mYY:()=>Mr,CIs:()=>Nr,f84:()=>xr,Lzo:()=>Lr,hQR:()=>kr,U8B:()=>jr,l_K:()=>$r,l28:()=>Dr,okU:()=>Wr,KhP:()=>Mn,lx6:()=>wo,C1c:()=>Wt.C,Uuu:()=>sn,wNP:()=>Jr,T7t:()=>xe.T7,iNH:()=>Xr,sG1:()=>en,H12:()=>no,Egh:()=>Kt,LkC:()=>hs.Lk,bsf:()=>Q.bs,XVE:()=>Q.XV,M_G:()=>Q.M_,Lom:()=>To,y4o:()=>Pt.y,bnh:()=>zt.b,v14:()=>Qt,aSj:()=>Yt,pH6:()=>So,Tyz:()=>ct,ey1:()=>at,eXg:()=>nt,wa5:()=>st.w,Mnj:()=>Xt,HN0:()=>Q.HN,NyS:()=>xe.Ny,or0:()=>Ln.or,hQi:()=>Ao,CxD:()=>Fi,V09:()=>Io,qFr:()=>Q.qF,xTJ:()=>cr,Nj:()=>ne.N,v2j:()=>Gr.v,a5k:()=>uo,ICs:()=>xe.IC,E3R:()=>ae.E,Ee5:()=>rn,uFU:()=>xt,Phd:()=>Sn,i4g:()=>ws,DXe:()=>rs,tJn:()=>Tn,w4d:()=>us,Gme:()=>It.G,EYj:()=>re,BSH:()=>Cs,gXL:()=>Q.gX,Kfn:()=>Q.Kf,dLy:()=>Q.dL,zFe:()=>xi,Kak:()=>Q.K,Aq$:()=>it.A,I9Y:()=>Ln.I9,u1k:()=>pr,ba9:()=>Ve,nKb:()=>hs.nK,Bak:()=>W.B,EVk:()=>Q.EV,s0Z:()=>Q.s0,WR4:()=>Q.WR,i0J:()=>hs.i0,GO0:()=>Q.GO,aw3:()=>Q.aw,xkT:()=>$t.x,DTs:()=>Q.DT,Cdj:()=>Ai,IJn:()=>Ti,vQZ:()=>Si,fFd:()=>Ci,lu3:()=>hs.lu,x4W:()=>Q.x4,Og1:()=>Q.Og,Lr6:()=>hs.Lr,okD:()=>hs.ok,Pqz:()=>hs.Pq,SZi:()=>hs.SZ,vkK:()=>hs.vk,iEU:()=>hs.iE,MnK:()=>hs.Mn,gfw:()=>hs.gf,ERr:()=>hs.ER,npj:()=>hs.np,vCS:()=>hs.vC,tW2:()=>hs.tW,Mts:()=>hs.Mt,g11:()=>hs.g1,OmD:()=>hs.Om,g8Q:()=>hs.g8,bbQ:()=>hs.bb,W_S:()=>hs.W_,_Hz:()=>hs._H,Wf4:()=>Q.Wf,V84:()=>kt,YLv:()=>hs.YL,S1F:()=>Q.S1,tfT:()=>hs.tf});var F={};U.r(F),U.d(F,{Decoder:()=>Za,Encoder:()=>Qa,PacketType:()=>Ya,protocol:()=>za});var G,j=U(8674),$=U(40794),H=U(29658),V=U(61806),W=U(41444),q=U(823);let K=G=class extends $.u{constructor(){super(...arguments),this._sound=null,this._key="",this._startTime=0,this._duration=0,this._playOnAwake=!1,this._stopOnDestroy=!1,this._volume=1,this._loop=!1,this._pausedWhenHidden=!1}set key(k){this._key=k,this.createSound()}get key(){return this._key}set volume(k){this._volume=k}get volume(){return this._volume}set loop(k){this._loop=k}get loop(){return this._loop}get isPlaying(){return!!this._sound&&this._sound.isPlaying}create(){super.create(),this.createSound(),this._playOnAwake&&this.play(),this.handlePauseOnEvent=this.handlePauseOnEvent.bind(this),G.PAUSE_ON_EVENTS.forEach((k=>{document.addEventListener(k,this.handlePauseOnEvent)}))}handlePauseOnEvent(){var k;document.hidden?(null===(k=this._sound.sound)||void 0===k?void 0:k.paused)||(this._pausedWhenHidden=!0,this._sound.pause()):this._pausedWhenHidden&&(this._pausedWhenHidden=!1,this._sound.resume())}createSound(){this._key&&(this._sound=V.W.instance.game.sound.add(this._key,this.volume,this.loop))}play(k=null){if(this._sound){let B=null;this._duration>0&&(B="play",this._sound.addMarker(B,this._startTime,this._duration)),this._sound.volume=this.volume,this._sound.loop=this.loop,this._sound.play(B,k)}}pause(){this._sound&&this._sound.pause()}resume(){this._sound&&this._sound.resume()}stop(){this._sound&&this._sound.stop()}destroy(){var k;this._sound&&((null===(k=this._sound.sound)||void 0===k?void 0:k.sprites.play)&&this._sound.removeMarker("play"),this._stopOnDestroy&&this.stop()),this._sound=null,G.PAUSE_ON_EVENTS.forEach((k=>{document.removeEventListener(k,this.handlePauseOnEvent)})),super.destroy()}};var z,Y;K.PAUSE_ON_EVENTS=["visibilitychange","webkitvisibilitychange","mozvisibilitychange","msvisibilitychange"],(0,j.Cg)([(0,W.B)(),(0,q.W_)(),(0,j.Sn)("design:type",String)],K.prototype,"_key",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],K.prototype,"_startTime",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],K.prototype,"_duration",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],K.prototype,"_playOnAwake",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],K.prototype,"_stopOnDestroy",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],K.prototype,"_volume",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],K.prototype,"_loop",void 0),K=G=(0,j.Cg)([(0,H.EV)("Sound",H.YH.root,"Lowest level audio component")],K),function(k){k.PrefabService="PrefabService",k.PrefabDataProvider="PrefabDataProvider",k.AssetLoader="AssetLoader",k.FrameWorkManager="FrameWorkManager"}(z||(z={})),function(k){k.IFSMController="IFSMController",k.FSMFactories="FSMFactories",k.FSMDataProvider="FSMDataProvider",k.FSMService="FSMService",k.LocalizationData="LocalizationData",k.LocalizationService="LocalizationService",k.LoggerService="LoggerService"}(Y||(Y={}));var Q=U(86787),X=U(57056),Z=U(80267),J=U(5191),tt=U(95891);class et{constructor(){this._bitFieldArray=[],this._bitLength=0}static fromBase64(k){const B=k.length,U=new et;U.reserveSize(B*et.BITS_PER_BASE64_CHAR);let F=0;for(let G=0;G=this._bitLength)&&this.getUnchecked(k)}set(k,B){this.reserveSize(k+1),this.setUnchecked(k,B)}getUnchecked(k){const B=Math.floor(k/et.BITS_PER_FIELD),U=1<=0?G:F.push(B)-1}getBitField(){var k,B;return null!==(k=this._bitField)&&void 0!==k?k:this._bitField=et.fromBase64(null!==(B=this.baseGetData())&&void 0!==B?B:"")}getBitIndex(k){const B=this._registeredComponents.indexOf(k);return B<0&&Z.V.log(`No component is registered for guid ${k}. Re-saving the prefab may fix this problem.`,J.$.Error),B}};(0,j.Cg)([(0,X.D)(),(0,q.SZ)(),(0,q.W_)(),(0,j.Sn)("design:type",Array)],ot.prototype,"_registeredComponents",void 0),ot=(0,j.Cg)([(0,H.EV)("BitFieldSaveData",H.YH.saving,"Reads and writes bits to a datastore using its guid as a key")],ot);let ht=class extends $.u{setBit(k){this._bitFieldSaveDataComponent.setBit(this._index,k)}getBit(){return this._bitFieldSaveDataComponent.getBit(this._index)}static customSerialize(k,B,U){super.customSerialize(k,B,U);const F=U.getComponentPropertyValue(k.guid,"bitFieldSaveDataComponent");F?k.properties.index=ot.registerComponent(U.getNormalizedComponentByGuid(F),k.guid):Z.V.log("BitFieldBitComponent has no bitFieldSaveDataComponent set.",J.$.Warning)}};(0,j.Cg)([(0,q.g8)(ot),(0,j.Sn)("design:type",ot)],ht.prototype,"_bitFieldSaveDataComponent",void 0),(0,j.Cg)([(0,X.D)(),(0,q.g1)(),(0,j.Sn)("design:type",Number)],ht.prototype,"_index",void 0),ht=(0,j.Cg)([(0,H.EV)("BitFieldBit",H.YH.saving,"Represents one bit of the bit field save data")],ht);let ct=class extends rt{setData(k){this.baseSetData(k)}getData(){return this.baseGetData()}};ct=(0,j.Cg)([(0,H.EV)("SaveData",H.YH.saving,"Reads and writes data to a datastore using its guid as a key")],ct);var dt=U(68910),lt=U(57530),ut=U(39002),ft=U(563),bt=U(64527),pt=U(27179);class vt{static drawTransformDirectionVectors(k,B,U={}){const F=tt.merge(vt.DEFAULT_TRANSFORM_DIRECTION_VECTOR_STYLE,U),G=new dt.Matrix;if(G.copyFrom(k.worldMatrix),F.drawRightVector){const k=new pt.I(G.a,G.c);k.normalize(),vt.drawDirectionVector(new pt.I(G.tx,G.ty),k,B,F.rightVectorStyle)}if(F.drawUpVector){const k=new pt.I(G.b,G.d);k.normalize(),vt.drawDirectionVector(new pt.I(G.tx,G.ty),k,B,F.upVectorStyle)}}static drawDirectionVector(k,B,U,F={}){const G=tt.merge(vt.DEFAULT_DIRECTION_VECTOR_STYLE,F);vt.drawArrow(new pt.I(k.x+B.x*(F.arrowHeightPx+F.bodyHeightPx),k.y+B.y*(F.arrowHeightPx+F.bodyHeightPx)),ut.c.radiansToDegrees(Math.atan2(B.y,B.x)),U,G)}static drawTransformAnchor(k,B,U={}){const F=tt.merge(vt.DEFAULT_TRANSFORM_ANCHOR_STYLE,U),G=this.calculateTransformPosition(k);"square"===F.shapeType&&(G.x-=.5*F.shape.sizePx,G.y-=.5*F.shape.sizePx),B.beginFill(F.shape.fill.color,F.shape.fill.alpha),"circle"===F.shapeType?B.drawCircle(G.x,G.y,F.shape.sizePx):B.drawRect(G.x,G.y,F.shape.sizePx,F.shape.sizePx),B.endFill(),F.shape.outline&&F.shape.outline.thicknessPx>0&&(B.lineStyle(F.shape.outline.thicknessPx,F.shape.outline.color,F.shape.outline.alpha),"circle"===F.shapeType?B.drawCircle(G.x,G.y,F.shape.sizePx):B.drawRect(G.x,G.y,F.shape.sizePx,F.shape.sizePx),B.lineStyle(0))}static calculateTransformPosition(k,B=!0){const U=new dt.Matrix;return U.copyFrom(k.worldMatrix),B&<.i.main&&U.prepend(lt.i.main.viewMatrix),new pt.I(U.tx,U.ty)}static drawRectTransformOutline(k,B,U={},F=!0){const G=tt.merge(vt.DEFAULT_RECT_TRANSFORM_OUTLINE_STYLE,U),j=this.calculateRectTransformCorners(k,F);B.lineStyle(G.thicknessPx,G.color,G.alpha),B.moveTo(j[0].x,j[0].y),B.lineTo(j[1].x,j[1].y),B.lineTo(j[2].x,j[2].y),B.lineTo(j[3].x,j[3].y),B.lineTo(j[0].x,j[0].y),B.lineStyle(0)}static drawRectTransformCorners(k,B,U={},F=!0){const G=tt.merge(vt.DEFAULT_RECT_TRANSFORM_OUTLINE_STYLE,U),j=this.calculateRectTransformCorners(k,F);this.drawArrow(j[0],45,B,{fill:G},F),this.drawArrow(j[1],135,B,{fill:G},F),this.drawArrow(j[2],225,B,{fill:G},F),this.drawArrow(j[3],315,B,{fill:G},F)}static calculateRectTransformCorners(k,B=!0){const U=k.rectTransformDimensions,F=[new dt.Point(-U.width*k.pivot.x,-U.height*k.pivot.y),new dt.Point(U.width*(1-k.pivot.x),-U.height*k.pivot.y),new dt.Point(U.width*(1-k.pivot.x),U.height*(1-k.pivot.y)),new dt.Point(-U.width*k.pivot.x,U.height*(1-k.pivot.y))],G=new dt.Matrix;G.copyFrom(k.worldMatrix),B&<.i.main&&G.prepend(lt.i.main.viewMatrix);for(let j=0;j<4;++j)F[j]=G.apply(F[j]);return F}static drawRectTransformAnchors(k,B,U={},F=!0){const G=tt.merge(vt.DEFAULT_TRIANGLE_STYLE,{widthPx:8,heightPx:18},U);let j=bt.o.ZERO,$=0;const H=new dt.Matrix;k.GameObject.parent&&k.GameObject.parent.transform&&(k.GameObject.parent.transform instanceof ft.X&&(j=k.GameObject.parent.transform.rectTransformDimensions),$=Math.atan2(k.GameObject.parent.transform.worldMatrix.b,k.GameObject.parent.transform.worldMatrix.d)*(180/Math.PI),H.copyFrom(k.GameObject.parent.transform.worldMatrix));const V=new bt.o(j.width*(k.anchorMax.x-k.anchorMin.x),j.height*(k.anchorMax.y-k.anchorMin.y)),W=new pt.I(k.localMatrix.tx-V.width*k.pivot.x,k.localMatrix.ty-V.height*k.pivot.y),q=new pt.I(k.localMatrix.tx+V.width*(1-k.pivot.x),k.localMatrix.ty+V.height*(1-k.pivot.y));q.x-=k.localPosition.x,q.y-=k.localPosition.y,W.x-=k.localPosition.x,W.y-=k.localPosition.y,vt.drawTriangle(H.apply(new pt.I(q.x,q.y)),$-50,B,G,F),vt.drawTriangle(H.apply(new pt.I(W.x,q.y)),$+50,B,G,F),vt.drawTriangle(H.apply(new pt.I(q.x,W.y)),$-130,B,G,F),vt.drawTriangle(H.apply(new pt.I(W.x,W.y)),$+130,B,G,F)}static drawArrow(k,B,U,F={},G=!0){const j=tt.merge(vt.DEFAULT_ARROW_STYLE,F),$=[new dt.Point(0,0),new dt.Point(-j.arrowHeightPx,.5*j.arrowWidthPx),new dt.Point(-j.arrowHeightPx,-.5*j.arrowWidthPx),new dt.Point(-j.arrowHeightPx,-.5*j.bodyWidthPx),new dt.Point(-j.arrowHeightPx,.5*j.bodyWidthPx),new dt.Point(-j.arrowHeightPx-j.bodyHeightPx,-.5*j.bodyWidthPx),new dt.Point(-j.arrowHeightPx-j.bodyHeightPx,.5*j.bodyWidthPx)],H=new dt.Matrix;H.rotate(ut.c.degreesToRadians(B)),H.translate(k.x,k.y),G&<.i.main&&H.prepend(lt.i.main.viewMatrix);const V=$.length;for(let W=0;W0&&(U.lineStyle(F.outline.thicknessPx,F.outline.color,F.outline.alpha),U.drawPolygon([...H,new dt.Point($.x,$.y)]),U.lineStyle(0))}}vt.DEFAULT_TRANSFORM_ANCHOR_STYLE={shapeType:"circle",shape:{sizePx:20,fill:{color:16777215,alpha:.4},outline:{color:16777215,alpha:1,thicknessPx:2}}},vt.DEFAULT_ARROW_STYLE={fill:{color:16777215,alpha:1},arrowWidthPx:20,arrowHeightPx:10,bodyHeightPx:30,bodyWidthPx:5},vt.DEFAULT_TRANSFORM_DIRECTION_VECTOR_STYLE={drawRightVector:!0,rightVectorStyle:{fill:{color:16711680,alpha:1},arrowWidthPx:15,arrowHeightPx:10,bodyWidthPx:5,bodyHeightPx:30},drawUpVector:!0,upVectorStyle:{fill:{color:65280,alpha:1},arrowWidthPx:15,arrowHeightPx:10,bodyWidthPx:5,bodyHeightPx:30}},vt.DEFAULT_DIRECTION_VECTOR_STYLE={arrowWidthPx:15,arrowHeightPx:10,bodyWidthPx:5,bodyHeightPx:30,fill:{color:16777215,alpha:1}},vt.DEFAULT_RECT_TRANSFORM_OUTLINE_STYLE={thicknessPx:2,color:16777215,alpha:1},vt.DEFAULT_TRIANGLE_STYLE={fill:{color:16777215,alpha:1},outline:null,widthPx:15,heightPx:20};U(81071),U(97573);var gt=U(26731);class mt{initialize(k,B){this._fileGuid=k,this._editorAPI=B}}var yt=U(15887),_t=U(53924),Et=U(32357),wt=U(56761),Tt=U(5440);class St extends gt.${generate(k,B){const U=[];return U.push(this.generateGrid(4,3)),U.push(this.generateStaggeredRows()),U.push(this.generateStaggeredGrid()),yt.X.createVertical(U)}generateGrid(k,B){const U=[];for(let F=0;F0?G.push(It.G.dropdownGroup({id:"font",labelValue:"Font",selectValue:k.font,selectOptions:j})):G.push(It.G.enumGroup({id:"font",labelValue:"Font",selectValue:k.font},Jt)),G.push(It.G.enumGroup({id:"fontStyle",labelValue:"Style",selectValue:k.fontStyle},ee)),G.push(It.G.enumGroup({id:"fontWeight",labelValue:"Weight",selectValue:k.fontWeight},te)),G.push(It.G.textGroup({id:"fontSize",inputValue:k.fontSize>0?`${k.fontSize}`:"",labelValue:"Size",onChange:(k,B)=>{let U=parseInt(B);(isNaN(U)||U<0)&&(U=0),this._editorAPI.modifyComponent(this._componentGuid,{fontSize:U})}})),F.push(yt.X.createVertical(G,{isContainer:!0,title:`Font '${k.font}' (${k.fontSize})`,isCollapsible:!0}));const $=[];if($.push(It.G.checkboxGroup({id:"smooth",labelValue:"Smooth",inputValue:k.smooth,labelTooltip:"When true, sets scale mode to linear. Reduces pixelation but can cause blurriness."})),$.push(It.G.checkboxGroup({id:"roundPixels",labelValue:"Round Pixels",inputValue:k.roundPixels,labelTooltip:"When true, rounds the pixel values when rendering."})),$.push(It.G.enumGroup({id:"blendMode",labelValue:"Blend Mode",selectValue:k.blendMode},dt.BLEND_MODES)),$.push(It.G.colorPickerGroup({id:"tint",labelValue:"Tint",inputValue:k.tint})),$.push(It.G.numberGroup({id:"strokeThickness",labelValue:"Stroke Thickness",inputValue:k.strokeThickness})),k.strokeThickness>0&&$.push(It.G.colorPickerGroup({id:"stroke",labelValue:"Stoke Color",inputValue:k.stroke})),$.push(It.G.checkboxGroup({id:"underline",labelValue:"Underline",inputValue:k.underline})),k.underline){const B=[];B.push(It.G.numberGroup({id:"underlineStartIndex",labelValue:"Start Index",inputValue:k.underlineStartIndex})),B.push(It.G.numberGroup({id:"underlineEndIndex",labelValue:"End Index",inputValue:k.underlineEndIndex})),$.push(yt.X.createVertical(B,{isContainer:!0}))}if($.push(It.G.checkboxGroup({id:"dropShadow",labelValue:"Drop Shadow",inputValue:k.dropShadow})),k.dropShadow){const B=[];B.push(It.G.numberGroup({id:"dropShadowAlpha",labelValue:"Alpha",inputValue:k.dropShadowAlpha})),B.push(It.G.numberGroup({id:"dropShadowAngle",labelValue:"Angle",inputValue:k.dropShadowAngle})),B.push(It.G.colorPickerGroup({id:"dropShadowColor",labelValue:"Color",inputValue:k.dropShadowColor})),B.push(It.G.numberGroup({id:"dropShadowBlur",labelValue:"Blur",inputValue:k.dropShadowBlur})),B.push(It.G.numberGroup({id:"dropShadowDistance",labelValue:"Distance",inputValue:k.dropShadowDistance})),B.push(It.G.numberGroup({id:"dropShadowPadding",labelValue:"Padding",inputValue:k.dropShadowPadding})),$.push(yt.X.createVertical(B,{isContainer:!0}))}F.push(yt.X.createVertical($,{isContainer:!0,title:"Effects",isCollapsible:!0,startCollapsed:!1}));const H=[];if(k.scaleToFitRectTransform||H.push(It.G.checkboxGroup({id:"resizeRectTransform",labelValue:"Resize RectTransform",inputValue:k.resizeRectTransform})),k.resizeRectTransform||k.textOverflow&&k.textOverflowUseRectTransformSize||H.push(It.G.checkboxGroup({id:"scaleToFitRectTransform",labelValue:"Scale To Fit RectTransform",inputValue:k.scaleToFitRectTransform})),k.scaleToFitRectTransform||(H.push(It.G.checkboxGroup({id:"textOverflow",labelValue:"Text Overflow",inputValue:k.textOverflow})),k.textOverflow&&(H.push(It.G.checkboxGroup({id:"textOverflowUseRectTransformSize",labelValue:"Use RectTransform Size",inputValue:k.textOverflowUseRectTransformSize})),k.textOverflowUseRectTransformSize||H.push(It.G.numberGroup({id:"textOverflowWidth",labelValue:"Overflow Width",inputValue:k.textOverflowWidth})))),H.push(It.G.checkboxGroup({id:"wordWrap",labelValue:"Word Wrap",inputValue:k.wordWrap})),k.wordWrap){const B=[];B.push(It.G.checkboxGroup({id:"wrapToRectTransformWidth",labelValue:"Wrap To RectTransform Width",inputValue:k.wrapToRectTransformWidth})),k.wrapToRectTransformWidth||B.push(It.G.numberGroup({id:"wordWrapWidth",labelValue:"Width",inputValue:k.wordWrapWidth})),H.push(yt.X.createVertical(B,{isContainer:!0}))}return H.push(It.G.numberGroup({id:"lineSpacing",labelValue:"Line Spacing",inputValue:k.lineSpacing})),H.push(It.G.enumGroup({id:"align",labelValue:"Align",selectValue:k.align},se)),H.push(It.G.enumGroup({id:"boundsAlignH",labelValue:"Bounds Align H",selectValue:k.boundsAlignH},se)),H.push(It.G.enumGroup({id:"boundsAlignV",labelValue:"Bounds Align V",selectValue:k.boundsAlignV},ie)),H.push(It.G.vectorGroup({id:"padding",labelValue:"Padding",vectorValue:{x:k.paddingX,y:k.paddingY},xKey:"paddingX",yKey:"paddingY"})),F.push(yt.X.createVertical(H,{isContainer:!0,title:"Layout",isCollapsible:!0,startCollapsed:!1})),U.push(yt.X.createVertical(F,{isContainer:!0,title:"Advanced",isCollapsible:!0,startCollapsed:!0})),yt.X.createVertical(U)}}class Rt{static validateHTMLHexColor(k,B="#",U=!1){return new RegExp(`^${B}[A-Fa-f0-9]{6}${U?"|[A-Fa-f0-9]{8}":""}$`).test(k)}static decimalToHex(k,B="#",U=!1){return`${B}${k.toString(16).padStart(U?8:6,"0")}`}static hexToDecimal(k,B="#"){return parseInt(k.replace(B,""),16)}static rgbToHsv(k){const B=k.r/255,U=k.g/255,F=k.b/255,G=Math.max(B,U,F),j=G-Math.min(B,U,F);return 0===j?{h:0,s:0,v:G}:G===B?{h:(U-F)/j%6/6,s:j/G,v:G}:G===U?{h:((F-B)/j+2)/6,s:j/G,v:G}:{h:((B-U)/j+4)/6,s:j/G,v:G}}static hsvToRgb(k){const B=6*k.h;let U;U=B<0?B%6+6:B%6;const F=U-Math.floor(U),G=k.v*(1-k.s),j=k.v*(1-F*k.s),$=k.v*(1-(1-F)*k.s);let H;return H=U<1?{r:k.v,g:$,b:G}:U<2?{r:j,g:k.v,b:G}:U<3?{r:G,g:k.v,b:$}:U<4?{r:G,g:j,b:k.v}:U<5?{r:$,g:G,b:k.v}:{r:k.v,g:G,b:j},H.r=255*H.r|0,H.g=255*H.g|0,H.b=255*H.b|0,H}static rgbToXyz(k){let B=k.r/255,U=k.g/255,F=k.b/255;B=B>.04045?Math.pow((B+.055)/1.055,2.4):B/12.92,U=U>.04045?Math.pow((U+.055)/1.055,2.4):U/12.92,F=F>.04045?Math.pow((F+.055)/1.055,2.4):F/12.92;return{x:.49*B+.31*U+.2*F,y:.176*B+.812*U+.01*F,z:0*B+.01*U+.99*F}}static xyzToRgb(k){const B=k.x,U=k.y,F=k.z;let G=2.364*B-.896*U-.468*F,j=-.515*B+1.426*U+.088*F,$=.005*B-.014*U+1.009*F;return G=G>.0031308?1.055*Math.pow(G,1/2.4)-.055:12.92*G,j=j>.0031308?1.055*Math.pow(j,1/2.4)-.055:12.92*j,$=$>.0031308?1.055*Math.pow($,1/2.4)-.055:12.92*$,G=Math.min(Math.max(255*G|0,0),255),j=Math.min(Math.max(255*j|0,0),255),$=Math.min(Math.max(255*$|0,0),255),{r:G,g:j,b:$}}static xyzToLab(k){const B=k=>k>.008856?Math.cbrt(k):(903.3*k+16)/116;return{l:116*B(k.y/100)-16,a:500*(B(k.x/95.0489)-B(k.y/100)),b:200*(B(k.y/100)-B(k.z/108.884))}}static labToXyz(k){const B=6/29,U=k=>k>B?k*k*k:3*B*B*(k-4/29);return{x:95.0489*U((k.l+16)/116+k.a/500),y:100*U((k.l+16)/116),z:108.884*U((k.l+16)/116-k.b/200)}}static labToLch(k){return{l:k.l,c:Math.sqrt(k.a*k.a+k.b*k.b),h:Math.atan2(k.b,k.a)}}static lchToLab(k){return{l:k.l,a:k.c*Math.cos(k.h),b:k.c*Math.sin(k.h)}}static rgbToLch(k){return Rt.labToLch(Rt.xyzToLab(Rt.rgbToXyz(k)))}static lchToRgb(k){return Rt.xyzToRgb(Rt.labToXyz(Rt.lchToLab(k)))}static rgbInterpolate(k,B,U){return{r:k.r+(B.r-k.r)*U,g:k.g+(B.g-k.g)*U,b:k.b+(B.b-k.b)*U}}static circularInterpolate(k,B,U){let F,G=k,j=B,$=U,H=j-G;if(G>j){const k=j;j=G,G=k,H=-H,$=1-$}return H>.5?(G+=1,F=(G+$*(j-G))%1):F=G+$*H,F}static hsvInterpolate(k,B,U){const F=Rt.rgbToHsv(k),G=Rt.rgbToHsv(B),j=this.circularInterpolate(F.h,G.h,U),$=F.s+U*(G.s-F.s),H=F.v+U*(G.v-F.v);return Rt.hsvToRgb({h:j,s:$,v:H})}static lchInterpolate(k,B,U){const F=Rt.rgbToLch(k),G=Rt.rgbToLch(B),j=this.circularInterpolate(F.h,G.h,U),$=F.c+U*(G.c-F.c),H=F.l+U*(G.l-F.l);return Rt.lchToRgb({l:H,c:$,h:j})}static stringToRgb(k){const B=k.replace(/^#/,"");return{r:parseInt(B.substring(0,2),16)/255,g:parseInt(B.substring(2,4),16)/255,b:parseInt(B.substring(4,6),16)/255}}static rgbToNumber(k){return(k.r<<16)+(k.g<<8)+k.b}}var Pt=U(4697),Mt=U(15740);class Nt{constructor(){this.onTextChanged=new Mt.H}get OnTextChanged(){return this.onTextChanged}cleanUp(){this.onTextChanged.dispose()}}class xt extends Nt{constructor(k){super(),this.source=null,this.setText(k)}getText(){return this.source}setText(k){this.source=k,this.OnTextChanged.dispatch(this,k)}}class Lt{static areBitsSet(k,B){return(k&B)===B}static isBitSet(k,B){return Lt.areBitsSet(k,1<{}}var Bt=U(22070),Ut=U(62481);class Ft{static getWidth(k){if(k.legacyTransform)return k.legacyTransform.width;if(k.transform){const B=k.transform;if(B instanceof ft.X)return B.rectTransformDimensions.width}return 0}static getHeight(k){if(k.legacyTransform)return k.legacyTransform.height;if(k.transform){const B=k.transform;if(B instanceof ft.X)return B.rectTransformDimensions.height}return 0}}class Gt{static completeGenerator(k){let B;do{B=k.next()}while(!B.done);return B.value}static completeGeneratorAsync(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){if(B)return Gt.processGeneratorStepFrameWorkManager(k,B);let U;do{U=k.next()}while(!U.done);return U.value}))}static processGeneratorStepFrameWorkManager(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){return new Promise(((U,F)=>{B.awaitFreeTime((()=>{const B=k.next();return B.done&&U(B.value),B.done}),F)}))}))}}var jt=U(78178),$t=U(22494),Ht=U(32469),Vt=U(6e4);var Wt=U(71082);class qt{get promise(){return this._promise}get[Symbol.toStringTag](){return"CancelablePromise"}get cancelled(){return this._cancelled}constructor(k){this._cancelled=!1,this._promise=new Promise(k)}cancel(){this._cancelled=!0}then(k,B){return this._promise.then((B=>{if(!this._cancelled)return null==k?void 0:k(B)}),(k=>{if(!this._cancelled)return null==B?void 0:B(k)})),this}catch(k){return this._promise.catch((B=>{if(!this._cancelled)return null==k?void 0:k(B)})),this}}class Kt{static timeout(k){return(0,j.sH)(this,void 0,void 0,(function*(){return new Promise((B=>{window.setTimeout(B,k)}))}))}static cancelableTimeout(k){return new qt((B=>{window.setTimeout(B,k)}))}static autoRetry(k){return(0,j.sH)(this,arguments,void 0,(function*(k,B=3,U=100){let F=U;for(let j=0;jB.size?B:k,G=k.size>B.size?k:B;for(const j of F)G.has(j)&&U.add(j);return U}static getSymmetricDifference(k,B){const U=k.size>B.size?B:k,F=k.size>B.size?k:B,G=new Set(F);for(const j of U)G.has(j)?G.delete(j):G.add(j);return G}static isSuperset(k,B){for(const U of B)if(!k.has(U))return!1;return!0}static getDifference(k,B){const U=new Set(k);for(const F of B)U.delete(F);return U}static addAll(k,B){if(it.A.isDefined(B))for(const U of B)this.addEntry(k,U)}static addEntry(k,B){it.A.isDefined(B)&&k.add(B)}}var Zt,Jt,te,ee,ie,se,ne=U(21695),ae=(U(22300),U(548));!function(k){k.ABeeZee="ABeeZee",k.LuckiestGuy="Luckiest Guy",k.FredokaOne="Fredoka One",k.PaytoneOne="Paytone One"}(Jt||(Jt={})),function(k){k.Normal="normal",k.Lighter="lighter",k.Bold="bold",k.Bolder="bolder"}(te||(te={})),function(k){k.Normal="normal",k.Italic="italic",k.Oblique="oblique"}(ee||(ee={})),function(k){k.Bottom="bottom",k.Middle="middle",k.Top="top"}(ie||(ie={})),function(k){k.Left="left",k.Center="center",k.Right="right"}(se||(se={}));let re=Zt=class extends Pt.y{get TextObject(){return this.createTextObject(),this.textObject}set Source(k){this.isCreated?(null!==this.textSource&&this.textSource.OnTextChanged.removeAll(this),this.textSource=k,this.textSource.OnTextChanged.add(this.updateText,this),this.updateText()):this._preCreateCacheValues.text=k}get Source(){if(!this.isCreated){const k=this._preCreateCacheValues.text;return k&&k instanceof Nt?k:null}return this.textSource}set text(k){this.isCreated?this.Source instanceof xt&&this.Source.getText()===k||(this.Source=new xt(this.localize(k))):this._preCreateCacheValues.text=k}get text(){if(!this.isCreated){const k=this._preCreateCacheValues.text;return k?k instanceof Nt?k.getText():k:""}return this.TextObject.text}set font(k){this.isCreated?(this.textObject.style.fontFamily=k,this.handleTextOverflow()):this._preCreateCacheValues.fontFamily=k}get font(){var k;return this.isCreated?this.textObject.style.fontFamily:null!==(k=this._preCreateCacheValues.fontFamily)&&void 0!==k?k:""}set fontStyle(k){this.isCreated?(this.setInternalFontStyle(k),this.handleTextOverflow()):this._preCreateCacheValues.fontStyle=k}get fontStyle(){var k;return this.isCreated?this.TextObject.style.fontStyle:null!==(k=this._preCreateCacheValues.fontStyle)&&void 0!==k?k:ee.Normal}setInternalFontStyle(k){const B=""===k?ee.Normal:k;switch(B){case ee.Normal:case ee.Italic:case ee.Oblique:this.textObject.style.fontStyle=B;break;default:Z.V.log(`Font style '${B}' is not valid.`,J.$.Warning)}}set fontWeight(k){this.isCreated?(this.setInternalFontWeight(k),this.handleTextOverflow()):this._preCreateCacheValues.fontWeight=k}get fontWeight(){var k;return this.isCreated?this.TextObject.style.fontWeight:null!==(k=this._preCreateCacheValues.fontWeight)&&void 0!==k?k:te.Normal}setInternalFontWeight(k){switch(k){case te.Normal:case te.Lighter:case te.Bold:case te.Bolder:this.textObject.style.fontWeight=k;break;default:Z.V.log(`Font weight '${k}' is not valid.`,J.$.Warning)}}get fontSize(){var k;return this.isCreated?this._fontSize:null!==(k=this._preCreateCacheValues.fontSize)&&void 0!==k?k:1}set fontSize(k){this.isCreated?(this._fontSize=k,this.updateTextSize()):this._preCreateCacheValues.fontSize=k}set textObjectFontSize(k){this.isCreated?(this.setInternalTextObjectFontSize(k),this.handleTextOverflow()):this._preCreateCacheValues.fontSize=k}get textObjectFontSize(){var k;return this.isCreated?this.TextObject.style.fontSize:null!==(k=this._preCreateCacheValues.fontSize)&&void 0!==k?k:1}setInternalTextObjectFontSize(k){this.textObject.style.fontSize=k>0?k:1}set fill(k){this.isCreated?this.isValidColor(k)&&(this.textObject.style.fill=k):this._preCreateCacheValues.fill=k}get fill(){var k;return this.isCreated?this.TextObject.style.fill:null!==(k=this._preCreateCacheValues.fill)&&void 0!==k?k:""}set align(k){this.isCreated?this.textObject.style.align=k:this._preCreateCacheValues.align=k}get align(){var k;return this.isCreated?this.TextObject.style.align:null!==(k=this._preCreateCacheValues.align)&&void 0!==k?k:se.Center}set boundsAlignH(k){this.isCreated?(this._boundsAlignH=k,this.applyTextPivot()):this._preCreateCacheValues.boundsAlignH=k}get boundsAlignH(){var k;return this.isCreated?this._boundsAlignH:null!==(k=this._preCreateCacheValues.boundsAlignH)&&void 0!==k?k:se.Center}set boundsAlignV(k){this.isCreated?(this._boundsAlignV=k,this.applyTextPivot()):this._preCreateCacheValues.boundsAlignV=k}get boundsAlignV(){var k;return this.isCreated?this._boundsAlignV:null!==(k=this._preCreateCacheValues.boundsAlignV)&&void 0!==k?k:ie.Middle}set stroke(k){this.isCreated?this.isValidColor(k)&&(this.textObject.style.stroke=k):this._preCreateCacheValues.stroke=k}get stroke(){var k;return this.isCreated?this.TextObject.style.stroke:null!==(k=this._preCreateCacheValues.stroke)&&void 0!==k?k:""}set strokeThickness(k){this.isCreated?this.textObject.style.strokeThickness=k:this._preCreateCacheValues.strokeThickness=k}get strokeThickness(){var k;return this.isCreated?this.TextObject.style.strokeThickness:null!==(k=this._preCreateCacheValues.strokeThickness)&&void 0!==k?k:0}set wordWrap(k){this.isCreated?this.textObject.style.wordWrap=k:this._preCreateCacheValues.wordWrap=k}get wordWrap(){var k;return this.isCreated?this.TextObject.style.wordWrap:null!==(k=this._preCreateCacheValues.wordWrap)&&void 0!==k&&k}set wordWrapWidth(k){this.isCreated?this.textObject.style.wordWrapWidth=k:this._preCreateCacheValues.wordWrapWidth=k}get wordWrapWidth(){var k;return this.isCreated?this.TextObject.style.wordWrapWidth:null!==(k=this._preCreateCacheValues.wordWrapWidth)&&void 0!==k?k:0}set wrapToRectTransformWidth(k){this.isCreated?(this._wrapToRectTransformWidth=k,this.updateWrapToRectTransform()):this._preCreateCacheValues.wrapToRectTransformWidth=k}get wrapToRectTransformWidth(){var k;return this.isCreated?this._wrapToRectTransformWidth:null!==(k=this._preCreateCacheValues.wrapToRectTransformWidth)&&void 0!==k&&k}set blendMode(k){this.isCreated?this.TextObject.blendMode=k:this._preCreateCacheValues.blendMode=k}get blendMode(){var k;return this.isCreated?this.TextObject.blendMode:null!==(k=this._preCreateCacheValues.blendMode)&&void 0!==k?k:dt.BLEND_MODES.NORMAL}set lineSpacing(k){this.isCreated?this.textObject.style.leading=k:this._preCreateCacheValues.leading=k}get lineSpacing(){var k;return this.isCreated?this.TextObject.style.leading:null!==(k=this._preCreateCacheValues.leading)&&void 0!==k?k:0}set paddingX(k){this._paddingX=k}get paddingX(){return this._paddingX}set paddingY(k){this._paddingY=k}get paddingY(){return this._paddingY}set dropShadow(k){this.isCreated?this.TextObject.style.dropShadow=k:this._preCreateCacheValues.dropShadow=k}get dropShadow(){var k;return this.isCreated?this.TextObject.style.dropShadow:null!==(k=this._preCreateCacheValues.dropShadow)&&void 0!==k&&k}set dropShadowAlpha(k){this.isCreated?this.TextObject.style.dropShadowAlpha=k:this._preCreateCacheValues.dropShadowAlpha=k}get dropShadowAlpha(){var k;return this.isCreated?this.TextObject.style.dropShadowAlpha:null!==(k=this._preCreateCacheValues.dropShadowAlpha)&&void 0!==k?k:0}set dropShadowAngle(k){this.isCreated?this.TextObject.style.dropShadowAngle=k:this._preCreateCacheValues.dropShadowAngle=k}get dropShadowAngle(){var k;return this.isCreated?this.TextObject.style.dropShadowAngle:null!==(k=this._preCreateCacheValues.dropShadowAngle)&&void 0!==k?k:0}set dropShadowColor(k){this.isCreated?this.isValidColor(k)&&(this.TextObject.style.dropShadowColor=k):this._preCreateCacheValues.dropShadowColor=k}get dropShadowColor(){var k;return this.isCreated?this.TextObject.style.dropShadowColor:null!==(k=this._preCreateCacheValues.dropShadowColor)&&void 0!==k?k:""}set dropShadowBlur(k){this.isCreated?this.TextObject.style.dropShadowBlur=k:this._preCreateCacheValues.dropShadowBlur=k}get dropShadowBlur(){var k;return this.isCreated?this.TextObject.style.dropShadowBlur:null!==(k=this._preCreateCacheValues.dropShadowBlur)&&void 0!==k?k:0}set dropShadowDistance(k){this.isCreated?this.TextObject.style.dropShadowDistance=k:this._preCreateCacheValues.dropShadowDistance=k}get dropShadowDistance(){var k;return this.isCreated?this.TextObject.style.dropShadowDistance:null!==(k=this._preCreateCacheValues.dropShadowDistance)&&void 0!==k?k:0}set dropShadowPadding(k){this.isCreated?this.TextObject.style.padding=k:this._preCreateCacheValues.padding=k}get dropShadowPadding(){var k;return this.isCreated?this.TextObject.style.padding:null!==(k=this._preCreateCacheValues.padding)&&void 0!==k?k:0}set tint(k){this.isCreated?this.TextObject.tint=k:this._preCreateCacheValues.tint=k}get tint(){var k;return this.isCreated?this.TextObject.tint:null!==(k=this._preCreateCacheValues.tint)&&void 0!==k?k:0}set alpha(k){this.isCreated?this.textObject.alpha=k:this._preCreateCacheValues.alpha=k}get alpha(){var k;return this.isCreated?this.textObject.alpha:null!==(k=this._preCreateCacheValues.alpha)&&void 0!==k?k:1}set underline(k){this._underline=k}get underline(){return this._underline}set underlineStartIndex(k){this._underlineStartIndex=k}get underlineStartIndex(){return this._underlineStartIndex}set underlineEndIndex(k){this._underlineEndIndex=k}get underlineEndIndex(){return this._underlineEndIndex}get scaleToFitRectTransform(){var k;return this.isCreated?this._scaleToFitRectTransform:null!==(k=this._preCreateCacheValues.scaleToFitRectTransform)&&void 0!==k&&k}set scaleToFitRectTransform(k){this.isCreated?(this._scaleToFitRectTransform=k,this.updateScaleToRectTransform()):this._preCreateCacheValues.scaleToFitRectTransform=k}set roundPixels(k){this.isCreated?this.textObject.roundPixels=k:this._preCreateCacheValues.roundPixels=k}get roundPixels(){var k;return this.isCreated?this.textObject.roundPixels:null!==(k=this._preCreateCacheValues.roundPixels)&&void 0!==k&&k}constructor(){super(),this.textSource=null,this._underlines=[],this._boundsAlignH=se.Left,this._boundsAlignV=ie.Top,this._paddingX=0,this._paddingY=0,this._preCreateCacheValues={},this.textObject=null,this._wrapToRectTransformWidth=!1,this._underline=!1,this._underlineStartIndex=null,this._underlineEndIndex=null,this.resizeRectTransform=!1,this._scaleToFitRectTransform=!1,this.textOverflow=!1,this.textOverflowUseRectTransformSize=!0,this._isLocKey=!0,this._textSize=new bt.o,this._smooth=!0}create(){var k,B;super.create(),this.createTextObject(),this.assignCacheValuesToComponent()||this.phaserTextObjectSetup();if(""!==this.textObject.text||this.updateTextSize(),this.textObject.visible=this.Active,this.GameObject.onActiveInHierarchyChanged.add((()=>{this.IsActiveInHierarchy&&this.applyTextPivot()})),this.OnActiveChanged.add((()=>this.textObject.visible=this.Active)),this.setUpDisplayObject(this.textObject),this.gameObject.legacyTransform){const k=this.gameObject.legacyTransform;0!==k.width&&0!==k.height&&this.textObject.position.set(Zt.LEGACY_STYLE_PADDING),this._textBounds=new dt.Rectangle(0,0,k.width,k.height)}if(this.applyTextPivot(),this._underline){const U=null!==(k=this.underlineStartIndex)&&void 0!==k?k:0,F=null!==(B=this.underlineEndIndex)&&void 0!==B?B:this.textObject.text.length;this.drawUnderline(U,F)}this._preCreateCacheValues=void 0}assignCacheValuesToComponent(){var k,B,U,F,G,j,$,H,V,W,q,K,z,Y,Q,X,Z,J,tt,et,it,st;return!!this._preCreateCacheValues&&(this.dropShadowPadding=null!==(k=this._preCreateCacheValues.padding)&&void 0!==k?k:this.dropShadowPadding,this.textObject.style.fontFamily=null!==(B=this._preCreateCacheValues.fontFamily)&&void 0!==B?B:this.textObject.style.fontFamily,void 0!==this._preCreateCacheValues.fontStyle&&this.setInternalFontStyle(this._preCreateCacheValues.fontStyle),void 0!==this._preCreateCacheValues.fontWeight&&this.setInternalFontWeight(this._preCreateCacheValues.fontWeight),this.fill=null!==(U=this._preCreateCacheValues.fill)&&void 0!==U?U:this.fill,this.stroke=null!==(F=this._preCreateCacheValues.stroke)&&void 0!==F?F:this.stroke,this.strokeThickness=null!==(G=this._preCreateCacheValues.strokeThickness)&&void 0!==G?G:this.strokeThickness,this.wordWrapWidth=null!==(j=this._preCreateCacheValues.wordWrapWidth)&&void 0!==j?j:this.wordWrapWidth,this.wordWrap=null!==($=this._preCreateCacheValues.wordWrap)&&void 0!==$?$:this.wordWrap,this.align=null!==(H=this._preCreateCacheValues.align)&&void 0!==H?H:this.align,this._boundsAlignH=null!==(V=this._preCreateCacheValues.boundsAlignH)&&void 0!==V?V:this._boundsAlignH,this._boundsAlignV=null!==(W=this._preCreateCacheValues.boundsAlignV)&&void 0!==W?W:this._boundsAlignV,this.roundPixels=null!==(q=this._preCreateCacheValues.roundPixels)&&void 0!==q?q:this.roundPixels,this._scaleToFitRectTransform=null!==(K=this._preCreateCacheValues.scaleToFitRectTransform)&&void 0!==K?K:this._scaleToFitRectTransform,this.alpha=null!==(z=this._preCreateCacheValues.alpha)&&void 0!==z?z:this.alpha,this.tint=null!==(Y=this._preCreateCacheValues.tint)&&void 0!==Y?Y:this.tint,this.blendMode=null!==(Q=this._preCreateCacheValues.blendMode)&&void 0!==Q?Q:this.blendMode,void 0!==this._preCreateCacheValues.fontSize&&(this._fontSize=this._preCreateCacheValues.fontSize,this.setInternalTextObjectFontSize(this._preCreateCacheValues.fontSize)),this.dropShadow=null!==(X=this._preCreateCacheValues.dropShadow)&&void 0!==X?X:this.dropShadow,this.dropShadowAlpha=null!==(Z=this._preCreateCacheValues.dropShadowAlpha)&&void 0!==Z?Z:this.dropShadowAlpha,this.dropShadowAngle=null!==(J=this._preCreateCacheValues.dropShadowAngle)&&void 0!==J?J:this.dropShadowAngle,this.dropShadowColor=null!==(tt=this._preCreateCacheValues.dropShadowColor)&&void 0!==tt?tt:this.dropShadowColor,this.dropShadowBlur=null!==(et=this._preCreateCacheValues.dropShadowBlur)&&void 0!==et?et:this.dropShadowBlur,this.dropShadowDistance=null!==(it=this._preCreateCacheValues.dropShadowDistance)&&void 0!==it?it:this.dropShadowDistance,this.lineSpacing=null!==(st=this._preCreateCacheValues.leading)&&void 0!==st?st:this.lineSpacing,void 0!==this._preCreateCacheValues.wrapToRectTransformWidth&&(this.wrapToRectTransformWidth=this._preCreateCacheValues.wrapToRectTransformWidth),this.phaserTextObjectSetup(),void 0!==this._preCreateCacheValues.text&&(this._preCreateCacheValues.text instanceof Nt?this.Source=this._preCreateCacheValues.text:this.text=this._preCreateCacheValues.text),!0)}phaserTextObjectSetup(){this.textObject.style.leading+=6,this.textObject.style.lineJoin="round"}applyScalingToTransform(k,B,U){const F=k.rectTransformDimensions;let G=-F.width*k.pivot.x,j=-F.height*k.pivot.y;this._boundsAlignH===se.Center?G+=F.getHalfWidth()-B.getHalfWidth():this._boundsAlignH===se.Right&&(G+=F.width-B.width),this._boundsAlignV===ie.Middle?j+=F.getHalfHeight()-B.getHalfHeight():this._boundsAlignV===ie.Bottom&&(j+=F.height-B.height),U.position.set(G,j)}applyToMatrix(k,B){B.append(k)}getDimensions(){return this._textSize}createPixiTransformOverride(){const k=super.createPixiTransformOverride();return k.setCustomRectTransformScaling(this),k}localize(k){var B;if(!this._isLocKey||!k||"string"!=typeof k||!this.isCreated)return k;try{const B=this.getInjectedValue(Y.LocalizationService);if(!B)throw new Error("No localization service available");const U=B.getText(k);if(U&&U!==k)return U}catch(U){Ut.R.logError(U,`Text Component on GameObject '${null===(B=this.GameObject)||void 0===B?void 0:B.name}' failed to localize text '${k}'`)}return k}createTextObject(){this.textObject||(this.isCreated||Z.V.log("Making the textObject before create() is not recommended",J.$.Warning),this.textObject=new dt.Text(""),this.textObject.style.fontFamily=Jt.ABeeZee,this.textObject.style.fill=Ot.y.BLACK,this.textObject.style.stroke=Ot.y.BLACK,this.textObject.style.dropShadowColor=Ot.y.BLACK,this.updateSmooth())}updateText(){if(!this.isCreated)return;const k=this.textObject.text;this.textObject.text=this.Source.getText(),this.updateTextSize(),this.Source&&this.Source.getText()!==k&&this.applyTextPivot()}applyTextPivot(){if(!this._textBounds||this.textObject.destroyed)return;let k=this._textBounds.x,B=this._textBounds.y;const U=this.textObject.resolution,F=Zt.LEGACY_STYLE_PADDING;this._boundsAlignH===se.Right?(k+=this._textBounds.width-this.textObject.canvas.width/U-this._paddingX,this.gameObject.legacyTransform&&this.gameObject.legacyTransform.width!==this.textObject.canvas.width&&(k+=2*F)):this._boundsAlignH===se.Center?(k+=Math.ceil(.5*(this._textBounds.width-this.textObject.canvas.width/U)),this.gameObject.legacyTransform&&this.gameObject.legacyTransform.width!==this.textObject.canvas.width&&(k+=F)):k+=this._paddingX,this._boundsAlignV===ie.Bottom?B+=this._textBounds.height-this.textObject.canvas.height/U-this._paddingY:this._boundsAlignV===ie.Middle?B+=Math.ceil(.5*(this._textBounds.height-this.textObject.canvas.height/U)):B+=this._paddingY,this.textObject.position.set(k,B)}drawUnderline(k,B){const U=Math.max(k,0),F=Math.max(B,0);if(U===F)return;if(!this.isCreated)return this.underlineStartIndex=U,this.underlineEndIndex=F,void(this._underline=!0);const G=this.text.substring(U,Math.min(F,this.text.length)),j=dt.TextMetrics.measureText(G,this.textObject.style),$=dt.TextMetrics.measureText(this.text.substring(0,U),this.textObject.style).width,H=j.height,W=V.W.instance.game.add.graphics($,H),q=parseInt(this.fill.substr(1),16)<<8,K=Math.abs(q/256);W.lineStyle(2,K,1,1),W.moveTo(0,0),W.lineTo(j.width,0),this._underlines.push(W),this.textObject.addChild(W)}isValidColor(k){return Rt.validateHTMLHexColor(k,"#",!0)}customDeserialize(k){var B;this._isLocKey=!1!==k.isLocKey;let U=!1;it.A.isDefined(k.dropShadowAlpha)?U=!0:this.dropShadowAlpha=k.dropShadowAlpha=0,it.A.isDefined(k.dropShadowAngle)?U=!0:this.dropShadowAngle=k.dropShadowAngle=0,it.A.isDefined(k.dropShadowBlur)?U=!0:this.dropShadowBlur=k.dropShadowBlur=0,it.A.isDefined(k.dropShadowDistance)?U=!0:this.dropShadowDistance=k.dropShadowDistance=0,it.A.isDefined(k.dropShadowColor)?(this.dropShadowColor=k.dropShadowColor="black"===k.dropShadowColor?"#000000":k.dropShadowColor,U=!0):this.dropShadowColor=k.dropShadowColor="#000000",it.A.isDefined(k.dropShadowPadding)?U=!0:this.dropShadowPadding=k.dropShadowPadding=3,this.dropShadow=k.dropShadow=null!==(B=k.dropShadow)&&void 0!==B?B:U,super.customDeserialize(k)}destroy(){var k,B;this._underlines.forEach((k=>{k.destroy()})),this._underlines=[],null===(k=this.textSource)||void 0===k||k.cleanUp(),(null===(B=this.textObject)||void 0===B?void 0:B.texture)&&this.textObject.destroy(),this.textObject=null,super.destroy()}updateTextSize(){this.updateScaleToRectTransform(),this._textSize.setTo(this.textObject.width,this.textObject.height),this.resizeRectTransformUponTextChange(),this.handleTextOverflow()}resizeRectTransformUponTextChange(){this.resizeRectTransform&&this.GameObject.transform instanceof ft.X&&this.GameObject.transform.setSizeDelta(this._textSize.width,this._textSize.height)}handleTextOverflow(){var k,B,U;const F=this.textOverflowUseRectTransformSize?null===(U=null===(B=null===(k=this.GameObject)||void 0===k?void 0:k.transform)||void 0===B?void 0:B.sizeDelta)||void 0===U?void 0:U.width:this.textOverflowWidth;if(this.textOverflow&&F&&this._textSize.width>F&&this.text.length>3){let k=dt.TextMetrics.measureText(this.text,this.textObject.style),B=this.text,U=!0;for(;k.width>F&&B.length>3;)B=`${B.slice(0,-(U?1:4))}...`,k=dt.TextMetrics.measureText(B,this.textObject.style),U=!1;this.text=B}}updateWrapToRectTransform(){this.gameObject.transform instanceof ft.X&&(this.gameObject.transform.onDimensionsChanged.remove(this.updateWrapToRectTransform,this),this.wrapToRectTransformWidth&&(this.wordWrapWidth=this.gameObject.transform.fullWidth,this.gameObject.transform.onDimensionsChanged.add(this.updateWrapToRectTransform,this),this.resizeRectTransform=!1))}updateScaleToRectTransform(){if(this.textObjectFontSize=this._fontSize,this.gameObject.transform instanceof ft.X&&(this.gameObject.transform.onDimensionsChanged.removeAll(this),this.scaleToFitRectTransform)){const k=this.gameObject.transform,B=Math.min(k.fullWidth/this.textObject.width,k.fullHeight/this.textObject.height,1);this.textObjectFontSize=this._fontSize*B,this.gameObject.transform.onDimensionsChanged.add(this.updateScaleToRectTransform,this)}}canRootContainerRender(){var k;const B=null===(k=this.textObject)||void 0===k?void 0:k.text;return!!(null==B?void 0:B.trim())&&super.canRootContainerRender()}static customSerialize(k,B,U){super.customSerialize(k,B,U);!1!==k.properties.isLocKey&&(delete k.properties.isLocKey,U.setComponentPropertyValue(k.guid,"isLocKey",void 0))}};re.LEGACY_STYLE_PADDING=3,(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"text",null),(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"font",null),(0,j.Cg)([(0,q.gf)(ee),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"fontStyle",null),(0,j.Cg)([(0,q.gf)(te),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"fontWeight",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],re.prototype,"_fontSize",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"fill",null),(0,j.Cg)([(0,q.gf)(se),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"align",null),(0,j.Cg)([(0,q.gf)(se),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"boundsAlignH",null),(0,j.Cg)([(0,q.gf)(ie),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"boundsAlignV",null),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"stroke",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"strokeThickness",null),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean),(0,j.Sn)("design:paramtypes",[Boolean])],re.prototype,"wordWrap",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"wordWrapWidth",null),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean),(0,j.Sn)("design:paramtypes",[Boolean])],re.prototype,"wrapToRectTransformWidth",null),(0,j.Cg)([(0,q.gf)(dt.BLEND_MODES),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"blendMode",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"lineSpacing",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"paddingX",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"paddingY",null),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean),(0,j.Sn)("design:paramtypes",[Boolean])],re.prototype,"dropShadow",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"dropShadowAlpha",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"dropShadowAngle",null),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],re.prototype,"dropShadowColor",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"dropShadowBlur",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"dropShadowDistance",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"dropShadowPadding",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"tint",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],re.prototype,"alpha",null),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],re.prototype,"_underline",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],re.prototype,"_underlineStartIndex",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],re.prototype,"_underlineEndIndex",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],re.prototype,"resizeRectTransform",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean),(0,j.Sn)("design:paramtypes",[Boolean])],re.prototype,"scaleToFitRectTransform",null),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],re.prototype,"textOverflow",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],re.prototype,"textOverflowUseRectTransformSize",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],re.prototype,"textOverflowWidth",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean),(0,j.Sn)("design:paramtypes",[Boolean])],re.prototype,"roundPixels",null),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],re.prototype,"_isLocKey",void 0),re=Zt=(0,j.Cg)([(0,H.EV)("Text",H.YH.ui,"Draws a web font on the screen as a child of the parent game object"),(0,_t.W)(Dt),(0,j.Sn)("design:paramtypes",[])],re);var oe=U(140),he=U(42149),ce=U(33431);class de extends gt.${generate(k,B){const U=oe.I.create({id:"numberArray",label:"Number Array",arrayType:Ht.b.Number,value:k.numberArray,insertElementCallbacks:new Map([["Value: 10",()=>10],["Value: 5",()=>5],["This should fail",()=>""]])}),F=oe.I.create({id:"stringArray",label:"String Array",arrayType:Ht.b.String,value:k.stringArray,isReorderable:!1}),G=oe.I.create({id:"booleanArray",label:"Boolean Array",arrayType:Ht.b.Boolean,value:k.booleanArray}),j=oe.I.create({id:"enumArray",label:"Enum Array",arrayType:Ht.b.Enum,value:k.enumArray}),$=oe.I.create({id:"reducedEnumArray",label:"Reduced Enum Array",arrayType:Ht.b.Enum,value:k.reducedEnumArray,enumeration:{Bold:te.Bold,Normal:te.Normal}}),H=oe.I.create({id:"componentArray",label:"Component Array",arrayType:Ht.b.ComponentReference,value:k.componentArray}),V=oe.I.create({id:"gameObjectArray",label:"GameObject Array",arrayType:Ht.b.GameObjectReference,value:k.gameObjectArray}),W=oe.I.create({id:"colorArray",label:"Color Array",arrayType:Ht.b.String,value:k.colorArray}),q=oe.I.create({id:"jsonFileArray",label:"Json File Array",arrayType:Ht.b.String,value:k.jsonFileArray}),K=oe.I.create({id:"jsonArray",label:"JSON Array",arrayType:Ht.b.JSON,value:k.jsonArray}),z=oe.I.create({id:"customInspectorArray",label:"Custom Inspector Array",arrayType:Ht.b.GenericObject,value:k.customInspectorArray,insertElementCallbacks:new Map([["color",()=>({label:"a color element",color:"#660000"})],["bool",()=>({label:"a bool element",bool:!0})],["color + bool",()=>({label:"a color + bool element",color:"#66BB00",bool:!0})],["neither",()=>({label:"neither color nor bool"})]]),getElementInspector:(k,B)=>{const U=[];return U.push(ce.l.create({id:`label-${B}`,labelValue:k.label})),k.color&&U.push(wt.f.create({id:`color-${B}`,inputType:"color",inputValue:k.color,propertyPath:[`${B}`,"color"]})),it.A.isDefined(k.bool)&&U.push(wt.f.create({id:`boolean-${B}`,inputType:"checkbox",inputValue:k.bool,propertyPath:[`${B}`,"bool"]})),it.A.isDefined(k.bool)||k.color||U.push(he.b.create({id:`boolean-${B}`,message:"Object contains neither color nor bool",iconType:Tt.AT.Warning})),yt.X.createVertical(U)}}),Y=this.getDemoEnemyGenericObjectArrayTerminal(k);return yt.X.createVertical([U,F,G,j,$,H,V,W,q,K,Y,z])}getDemoEnemyGenericObjectArrayTerminal(k){let B;!function(k){k.Goblin="Goblin",k.Orc="Orc",k.Troll="Troll"}(B||(B={}));const U=new Map([[B.Goblin,{name:B.Goblin,hp:5,spawnRate:1,dropIds:[{id:1,name:"Sword"},{id:2,name:"Hammer"}]}],[B.Orc,{name:B.Orc,hp:10,spawnRate:.8,dropIds:[{id:2,name:"Hammer"},{id:3,name:"Shield"},{id:4,name:"Helmet"}]}],[B.Troll,{name:B.Troll,hp:50,spawnRate:.2,dropIds:[{id:5,name:"Club"},{id:4,name:"Helmet"}]}]]),F=new Map;for(const G of Object.values(B))F.set(G,(()=>U.get(G)));return oe.I.create({id:"genericObjectArray",label:"Generic Object Array",arrayType:Ht.b.GenericObject,value:k.genericObjectArray,insertElementCallbacks:F})}}let le=class extends $.u{constructor(){super(...arguments),this._numberArray=[1,2,3],this._stringArray=["a","b","c"],this._booleanArray=[!0,!1,!0],this._enumArray=[],this._reducedEnumArray=[],this._componentArray=[],this._gameObjectArray=[],this._colorArray=[],this._jsonFileArray=[],this._jsonArray=[{name:"jsonTest1",id:1},{name:"jsonTest2",id:2}],this._customInspectorArray=[{label:"An object with a color",color:"#660000"},{label:"An object with a bool",bool:!0},{label:"An object with color and a bool",color:"#66BB00",bool:!0},{label:"An object with neither color nor bool"}]}};(0,j.Cg)([(0,q.g1)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_numberArray",void 0),(0,j.Cg)([(0,q.W_)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_stringArray",void 0),(0,j.Cg)([(0,q.vk)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_booleanArray",void 0),(0,j.Cg)([(0,q.gf)(te),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_enumArray",void 0),(0,j.Cg)([(0,q.gf)(te),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_reducedEnumArray",void 0),(0,j.Cg)([(0,q.Mn)(Ct.d),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_componentArray",void 0),(0,j.Cg)([(0,q.ER)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_gameObjectArray",void 0),(0,j.Cg)([(0,q.iE)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_colorArray",void 0),(0,j.Cg)([(0,q.tW)("gear"),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_jsonFileArray",void 0),(0,j.Cg)([(0,q.np)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_genericObjectArray",void 0),(0,j.Cg)([(0,q.vC)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_jsonArray",void 0),(0,j.Cg)([(0,q.np)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],le.prototype,"_customInspectorArray",void 0),le=(0,j.Cg)([(0,H.EV)("DemoArray"),(0,_t.W)(de)],le);class ue extends gt.${generate(k,B){const U=[];return U.push(this.generateButtonsByType()),U.push(this.generateButtonsByIcon()),U.push(this.generateButtonsByState()),U.push(this.generateButtonsWordWrap()),U.push(this.generateStandaloneButton(k)),yt.X.createVertical(U)}generateButtonsByType(){const k=[];return Object.keys(Tt.VQ).forEach((B=>{const U=Tt.VQ[B],F=It.G.buttonGroup({id:`button-${U}`,buttonText:B,buttonType:U,labelValue:B});k.push(F)})),yt.X.createVertical(k,{isContainer:!0,title:"Button Types",isCollapsible:!0})}generateButtonsByIcon(){const k=[];return Object.keys(Tt.a2).forEach((B=>{const U=Tt.a2[B],F=It.G.buttonGroup({id:`button-${U}`,buttonText:B,buttonIcon:U,labelValue:B});k.push(F)})),yt.X.createVertical(k,{isContainer:!0,title:"Button Icons",isCollapsible:!0})}generateButtonsByState(){const k=[It.G.buttonGroup({id:"button-enabled",buttonText:"Enabled",labelValue:"Enabled"}),It.G.buttonGroup({id:"button-disabled",buttonText:"Disabled",labelValue:"Disabled",buttonDisabled:!0})];return yt.X.createVertical(k,{isContainer:!0,title:"Button States",isCollapsible:!0})}generateStandaloneButton(k){const B=[he.b.create({id:"info-box--button-standalone",iconType:Tt.AT.Info,message:"Standalone button. Another way to create buttons when TerminalGroup.buttonGroup() doesn't suit your needs."}),Et.X.create({id:"button-standalone",buttonText:"Standalone Button",onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{lastClickTime:(new Date).toLocaleString()})}}),ce.l.create({id:"last-click-label",labelValue:k.lastClickTime?`Last Click at: ${k.lastClickTime}`:"Click the Standalone Button!",labelTextWrap:Tt.K3.Wrap})];return yt.X.createVertical(B,{isContainer:!0,title:"Standalone Button",isCollapsible:!0})}generateButtonsWordWrap(){const k=[Et.X.create({id:"button-no-wrap",buttonText:"This is a whole lot of text that will get cut off becaue word wrapping is off.",buttonTextWrap:Tt.K3.None}),Et.X.create({id:"button-text-wrap",buttonText:"This is a whole lot of text that will get wrapped into multiple lines because word wrapping is turned on.",buttonTextWrap:Tt.K3.Wrap})];return yt.X.createVertical(k,{isContainer:!0,title:"Text Wrap on Buttons",isCollapsible:!0})}}let fe=class extends $.u{};(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],fe.prototype,"_lastClickTime",void 0),fe=(0,j.Cg)([(0,H.EV)("DemoButtonsComponent"),(0,_t.W)(ue)],fe);var be,pe=U(44716);!function(k){k.Scale="scale",k.Stop="stop",k.ClipInner="clip-inner",k.ClipHigh="clip-high"}(be||(be={}));class ve extends dt.NineSlicePlane{constructor(){super(...arguments),this._shrinkHorizontal=be.Scale,this._shrinkVertical=be.Scale}get shrinkHorizontal(){return this._shrinkHorizontal}set shrinkHorizontal(k){this._shrinkHorizontal!==k&&(this._shrinkHorizontal=k,this._refresh())}get shrinkVertical(){return this._shrinkVertical}set shrinkVertical(k){this._shrinkVertical!==k&&(this._shrinkVertical=k,this._refresh())}setShrinkModes(k,B){this._shrinkHorizontal===k&&this._shrinkVertical===B||(this._shrinkHorizontal=k,this._shrinkVertical=B,this._refresh())}_refresh(){if(this.destroyed)return;const k=this.texture,B=k.orig.width,U=k.orig.height,F=k.trim||{x:0,y:0,width:B,height:U},G=F.y,j=U-F.height-F.y,$=G/U,H=j/U,V=Math.max(this._topHeight-G,0),W=Math.max(this._bottomHeight-j,0),q=F.x,K=B-F.width-F.x,z=q/B,Y=K/B,Q=Math.max(this._leftWidth-q,0),X=Math.max(this._rightWidth-K,0),Z=this._getMinScale(),J=this.vertices,tt=this.geometry.buffers[1].data;let et,it,st,nt,at,rt,ot,ht,ct,dt,lt,ut,ft,bt,pt,vt;switch(this._shrinkHorizontal){case be.Stop:et=q,it=q+Q,this.width0?(et=q,it=q+Q*Z):et=it=this._width*z,X>0?(st=this._width-K-X*Z,nt=this._width-K):st=nt=this._width*(1-Y),ct=z,dt=z+Q/B,lt=1-Y-X/B,ut=1-Y}switch(this._shrinkVertical){case be.Stop:at=G,rt=G+V,this.height0?(at=G,rt=G+V*Z):at=rt=this._height*$,ft=$,bt=$+V/U,W>0?(ot=this._height-j-W*Z,ht=this._height-j):ot=ht=this._height*(1-H),pt=1-H-W/U,vt=1-H}J[0]=J[8]=J[16]=J[24]=et,J[2]=J[10]=J[18]=J[26]=it,J[4]=J[12]=J[20]=J[28]=st,J[6]=J[14]=J[22]=J[30]=nt,J[1]=J[3]=J[5]=J[7]=at,J[9]=J[11]=J[13]=J[15]=rt,J[17]=J[19]=J[21]=J[23]=ot,J[25]=J[27]=J[29]=J[31]=ht,tt[0]=tt[8]=tt[16]=tt[24]=ct,tt[2]=tt[10]=tt[18]=tt[26]=dt,tt[4]=tt[12]=tt[20]=tt[28]=lt,tt[6]=tt[14]=tt[22]=tt[30]=ut,tt[1]=tt[3]=tt[5]=tt[7]=ft,tt[9]=tt[11]=tt[13]=tt[15]=bt,tt[17]=tt[19]=tt[21]=tt[23]=pt,tt[25]=tt[27]=tt[29]=tt[31]=vt,this.geometry.buffers[0].update(),this.geometry.buffers[1].update()}}let ge=class extends Pt.y{constructor(){super(...arguments),this.image=null,this._alpha=1,this._shrinkHorizontal=be.Scale,this._shrinkVertical=be.Scale,this.atlas="",this.frame="",this._imageID=null,this._tint="#FFFFFF",this._imageDimensions=new bt.o}get alpha(){return this._alpha}set alpha(k){this._alpha=k,this.image&&(this.image.alpha=k)}get shrinkHorizontal(){return this._shrinkHorizontal}get shrinkVertical(){return this._shrinkVertical}get atlasKey(){return this.atlas}set tint(k){this._tint=dt.Color.shared.setValue(k).toHex(),this.image&&(this.image.tint=k)}get sliceData(){return this._sliceData}create(){super.create();let k="",B="";this._imageID?B=this._imageID:(B=this.atlas,k=this.frame),this.updateAssetInternal(B,k)}destroy(){this.image&&!this.image.destroyed&&this.image.destroy(),this.image=null,super.destroy()}getDimensions(){return this._sliceData?new bt.o(this.image.width,this.image.height):this._imageDimensions}updateAsset(k,B){var U;this.isCreated?this.atlas===k&&this.frame===B||(null===(U=this.image)||void 0===U?void 0:U.destroyed)||this.updateAssetInternal(k,B):this._onCreateAction.addOnce(this.updateAsset,this,void 0,k,B)}updateAssetInternal(k,B){this.atlas=k,this.frame=B,this._sliceData=V.W.instance.game.cache.getSliceData(k),(this._sliceData&&this.image instanceof dt.Sprite||!this._sliceData&&this.image instanceof ve)&&(this.image.destroy(),this.image=null);const U=V.W.instance.game.cache.getTexture(k,B);this.image?(this.image.texture=U,this.image instanceof ve&&(this.image.leftWidth=this._sliceData.left,this.image.topHeight=this._sliceData.top,this.image.rightWidth=this._sliceData.right,this.image.bottomHeight=this._sliceData.bottom),this.updateSmooth()):(this._sliceData?(this.image=new ve(U,this._sliceData.left,this._sliceData.top,this._sliceData.right,this._sliceData.bottom),this.image.setShrinkModes(this._shrinkHorizontal,this._shrinkVertical)):this.image=new dt.Sprite,this.image.texture=U,this.image.tint=dt.utils.string2hex(this._tint),this.image.alpha=this._alpha,this.setRootContainer(this.image)),this.image.roundPixels=!0,this._imageDimensions.width=this.image.width,this._imageDimensions.height=this.image.height}setTexture(k){this.image.texture=k,this._imageDimensions.width=this.image.width,this._imageDimensions.height=this.image.height}setAnchor(k,B){this.image instanceof dt.Sprite&&this.image.anchor.set(k,B)}setAngle(k){this.image.angle=k}setScale(k,B){this.image.scale.set(k,B)}setAlpha(k){this.image.alpha=k}setBlend(k){this.image.blendMode=k}setShrinkModes(k,B){this._shrinkHorizontal=k,this._shrinkVertical=B,this.image instanceof ve&&this.image.setShrinkModes(k,B)}createPixiTransformOverride(){const k=super.createPixiTransformOverride();return this._sliceData&&k.setCustomRectTransformScaling(this),k}applyScalingToTransform(k,B,U){if(!this._sliceData){const F=k.rectTransformDimensions,G=F.width/B.width,j=F.height/B.height,$=-B.width*k.pivot.x*G,H=-B.height*k.pivot.y*j;return U.scale.set(G,j),void U.position.set($,H)}this.image.width=k.rectTransformDimensions.width,this.image.height=k.rectTransformDimensions.height,U.position.set(-k.rectTransformDimensions.width*k.pivot.x,-k.rectTransformDimensions.height*k.pivot.y)}applyToMatrix(k,B){B.append(k)}sizeToSourceImage(){const k=this.gameObject.transform;k instanceof ft.X?(k.fullWidth=this.image.width,k.fullHeight=this.image.height):Z.V.log("Graphic: Cannot size to source image due to missing RectTransform.",J.$.Verbose)}isValid(){return!(!this.image||this.image.destroyed)&&(!(this.image instanceof dt.Sprite&&!this.image.texture)&&!(this.image instanceof ve&&!this.image.shader))}};(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],ge.prototype,"_alpha",void 0),(0,j.Cg)([(0,q.gf)(be),(0,j.Sn)("design:type",String)],ge.prototype,"_shrinkHorizontal",void 0),(0,j.Cg)([(0,q.gf)(be),(0,j.Sn)("design:type",String)],ge.prototype,"_shrinkVertical",void 0),(0,j.Cg)([(0,W.B)(),(0,q.W_)(),(0,j.Sn)("design:type",String)],ge.prototype,"atlas",void 0),(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],ge.prototype,"frame",void 0),(0,j.Cg)([(0,W.B)(),(0,q.W_)(),(0,q.nK)("singleImageID"),(0,j.Sn)("design:type",String)],ge.prototype,"_imageID",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String)],ge.prototype,"_tint",void 0),ge=(0,j.Cg)([(0,H.EV)("Graphic",H.YH.ui,"Lowest level graphic component")],ge);class me extends gt.${generate(k,B){const U=[];return U.push(It.G.componentPickerGroup({id:"componentPickerText",labelValue:"Text Component",componentType:re,componentGuid:k.componentPickerText})),U.push(It.G.componentPickerGroup({id:"componentPickerGraphic",labelValue:"Graphic Component",componentType:ge,componentGuid:k.componentPickerGraphic,readonly:!0})),U.push(It.G.componentPickerGroup({id:"componentPickerRectTransform",labelValue:"RectTransform Component",componentType:ft.X,componentGuid:k.componentPickerRectTransform})),U.push(It.G.componentPickerGroup({id:"componentPickerLegacyTransform",labelValue:"LegacyTransform Component",componentType:pe.K,componentGuid:k.componentPickerLegacyTransform})),yt.X.createVertical(U)}}let ye=class extends $.u{};(0,j.Cg)([(0,q.Mn)(re),(0,j.Sn)("design:type",re)],ye.prototype,"_componentPickerText",void 0),(0,j.Cg)([(0,q.Mn)(ge),(0,j.Sn)("design:type",ge)],ye.prototype,"_componentPickerGraphic",void 0),(0,j.Cg)([(0,q.Mn)(ft.X),(0,j.Sn)("design:type",ft.X)],ye.prototype,"_componentPickerRectTransform",void 0),(0,j.Cg)([(0,q.Mn)(pe.K),(0,j.Sn)("design:type",pe.K)],ye.prototype,"_componentPickerLegacyTransform",void 0),ye=(0,j.Cg)([(0,H.EV)("DemoComponentPickerComponent"),(0,_t.W)(me)],ye);var _e=U(47681);class Ee extends gt.${generate(k,B){const U=[];return U.push(this.generateGenericPicker()),U.push(this.generateInitialPathPicker()),U.push(this.generateFilteredPicker()),U.push(this.generateOnChangeButton(k)),yt.X.createVertical(U)}generateGenericPicker(){const k=[It.G.filePickerGroup({id:"demoGenericPicker",labelValue:"Generic Picker"}),ce.l.create({id:"demoGenericPickerStandaloneLabel",labelValue:"Standalone Picker"}),_e.H.create({id:"demoGenericPickerStandalone"})];return yt.X.createVertical(k,{isContainer:!0,title:"Generic Picker",isCollapsible:!0})}generateInitialPathPicker(){const k=[It.G.filePickerGroup({id:"demoInitialPathPicker",labelValue:"Initial Path",path:"test/fake/path/image.png"})];return yt.X.createVertical(k,{isContainer:!0,title:"Initial Path Picker",isCollapsible:!0})}generateFilteredPicker(){const k=[It.G.filePickerGroup({id:"demoFilteredPickerPng",labelValue:"PNG Picker",allowedExtensions:["png"]}),It.G.filePickerGroup({id:"demoFilteredPickerImages",labelValue:"Images Picker",allowedExtensions:["png","jpg","jpeg","webp","jfif","tiff","drwg"]}),It.G.filePickerGroup({id:"demoFilteredPickerGear",labelValue:"Gear Picker",allowedExtensions:["gear"]}),It.G.filePickerGroup({id:"demoFilteredPickerDefault",labelValue:"Default Filtering",allowedExtensions:[]})];return yt.X.createVertical(k,{isContainer:!0,title:"Filtered Picker",isCollapsible:!0})}generateOnChangeButton(k){var B;const U=[It.G.filePickerGroup({id:"demoOnChangePicker",labelValue:"On Change Picker",onChange:k=>{this._editorAPI.modifyComponent(this._componentGuid,{lastPickedPath:k})}}),ce.l.create({id:"demoOnChangeLabel",labelValue:null!==(B=k.lastPickedPath)&&void 0!==B?B:"No path picked yet",labelTextWrap:Tt.K3.Wrap})];return yt.X.createVertical(U,{isContainer:!0,title:"OnChange Picker",isCollapsible:!0})}}let we=class extends $.u{};(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],we.prototype,"_lastPickedPath",void 0),we=(0,j.Cg)([(0,H.EV)("DemoFilePickerComponent"),(0,_t.W)(Ee)],we);var Te=U(27780);class Se extends gt.${generate(k,B){const U=[];return U.push(It.G.gameObjectPickerGroup({id:"targetGameObjectA",labelValue:"Target A Game Object",gameObjectGuid:k.targetGameObjectA})),U.push(It.G.gameObjectPickerGroup({id:"targetGameObjectB",labelValue:"Target B Game Object",gameObjectGuid:k.targetGameObjectB,readonly:k.targetGameObjectBReadonly})),U.push(It.G.checkboxGroup({id:"targetGameObjectBReadonly",labelValue:"Target B is Readonly",inputValue:k.targetGameObjectBReadonly})),yt.X.createVertical(U)}}let Ae=class extends $.u{constructor(){super(...arguments),this._targetGameObjectA=null,this._targetGameObjectB=null,this._targetGameObjectBReadonly=!1}};(0,j.Cg)([(0,q.ER)(),(0,j.Sn)("design:type",Te._)],Ae.prototype,"_targetGameObjectA",void 0),(0,j.Cg)([(0,q.ER)(),(0,j.Sn)("design:type",Te._)],Ae.prototype,"_targetGameObjectB",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Ae.prototype,"_targetGameObjectBReadonly",void 0),Ae=(0,j.Cg)([(0,H.EV)("DemoGameObjectPickerComponent"),(0,_t.W)(Se)],Ae);U(8490);var Ce=U(23664),Oe=U(84893);const Ie="Change the values below to test the info box. ";class De extends gt.${generate(k,B){let U="";switch(k.testDropdown){case"Long":U+=`${Ie}${Ie}${Ie}${Ie}`;case"Medium":U+=`${Ie}${Ie}`;case"Short":default:U+=Ie}let F="";switch(k.testUpdateMode){case Tt.JG.OnTheFly:F="Updates occur regularly on a short delay after user input is detected.";break;case Tt.JG.Confirm:F="Updates occur only after user confirms input with Enter or when focus is lost."}return yt.X.createVertical([It.G.checkboxGroup({id:"readonly",labelValue:"Readonly",inputValue:B.readonly,onChange:(k,U)=>{U?this._editorAPI.saveComponentMetadata(this._componentGuid,{readonly:!B.readonly}):this._editorAPI.deleteComponentMetadata(this._componentGuid,["readonly"])}}),Ce._.blankLine(),It.G.textGroup({id:"testString",labelValue:"String Test",inputValue:k.testString,readonly:B.readonly}),It.G.numberGroup({id:"testNumber",labelValue:"Number Test",inputValue:k.testNumber,readonly:B.readonly}),It.G.colorPickerGroup({id:"testColorStr",labelValue:"Color Test (String)",inputValue:k.testColorStr,readonly:B.readonly}),It.G.colorPickerGroup({id:"testColorNum",labelValue:"Color Test (Number)",inputValue:k.testColorNum,readonly:B.readonly}),It.G.buttonGroup({id:"randomButton",buttonText:"Ok",labelValue:"Randomize",onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{testString:it.A.generateGUID(),testNumber:Math.floor(1e3*Math.random()),testColorStr:`#${(16777215*Math.random()*1e6).toString(16).slice(0,6)}`,testColorNum:Rt.hexToDecimal(`#${(16777215*Math.random()*1e6).toString(16).slice(0,6)}`)})}}),Ce._.blankLine(),It.G.checkboxGroup({id:"testBoolean",labelValue:"Checkbox Test",inputValue:k.testBoolean,readonly:B.readonly}),It.G.vectorGroup({id:"testVector",labelValue:"Vector Test",vectorValue:k.testVector,readonly:B.readonly}),It.G.sizeGroup({id:"testSize",labelValue:"Size Test",sizeValue:k.testSize,readonly:B.readonly}),Ce._.blankLine(),ce.l.create({id:"longLabel",labelValue:"This is some very long text that is definitely going to wrap basically no matter how wide the inspector panel.",labelTextWrap:Tt.K3.Wrap}),ce.l.create({id:"longLabelNoWrap",labelValue:"Same but nowrap. This is some very long text that is definitely going to wrap basically no matter how wide the inspector panel.",labelTextWrap:Tt.K3.None}),Et.X.create({id:"longButton",buttonText:"This is some more very long text designed to not fit on the button and be forced to word wrap. I bet it even works.",buttonTextWrap:Tt.K3.Wrap}),Et.X.create({id:"longButtonNoWrap",buttonText:"Same but nowrap. This is some more very long text designed to not fit on the button and be forced to word wrap. I bet it even works.",buttonTextWrap:Tt.K3.None}),Ce._.blankLine(),he.b.create({id:"infoBox",iconType:k.testEnum,message:U}),Ce._.halfBlankLine(),It.G.enumGroup({id:"testEnum",labelValue:"Icon Type",selectValue:k.testEnum,readonly:B.readonly},Tt.AT),It.G.dropdownGroup({id:"testDropdown",labelValue:"Info Box Size",selectOptions:["Short","Medium","Long"],selectValue:k.testDropdown,readonly:B.readonly}),Ce._.blankLine(),Oe.N.create({id:"testSignal",label:"Test Signal",signalValue:k.testSignal,componentGUID:this._componentGuid}),Ce._.blankLine(),yt.X.createVertical([It.G.textGroup({id:"testString",labelValue:"String A",inputValue:k.testString,readonly:B.readonly}),It.G.numberGroup({id:"testNumber",labelValue:"Number Test",inputValue:k.testNumber,readonly:B.readonly})],{isContainer:!0,isCollapsible:!0,title:"Collapsible"}),yt.X.createVertical([It.G.textGroup({id:"testString",labelValue:"String A",inputValue:k.testString,readonly:B.readonly}),It.G.numberGroup({id:"testNumber",labelValue:"Number Test",inputValue:k.testNumber,readonly:B.readonly})],{isContainer:!0,title:"Not Collapsible"}),yt.X.createVertical([It.G.textGroup({id:"testString",labelValue:"String A",inputValue:k.testString,readonly:B.readonly}),It.G.numberGroup({id:"testNumber",labelValue:"Number Test",inputValue:k.testNumber,readonly:B.readonly})],{isContainer:!0,title:"Start Collapsed",isCollapsible:!0,startCollapsed:!0}),Ce._.line(),yt.X.createVertical([he.b.create({id:"updateModeInfoBox",iconType:Tt.AT.Verbose,message:F}),Ce._.halfBlankLine(),It.G.enumGroup({id:"testUpdateMode",labelValue:"Mode",selectValue:k.testUpdateMode},Tt.JG),It.G.textGroup({id:"testUpdateModeInput",labelValue:"Input",inputValue:k.testUpdateModeInput,inputUpdateMode:k.testUpdateMode}),It.G.textGroup({id:"testUpdateModeOutput",labelValue:"Output",inputValue:k.testUpdateModeInput,readonly:!0})],{isContainer:!0,isCollapsible:!0,title:"Update Modes"}),Ce._.line(),It.G.filePickerGroup({id:"testFilePicker",labelValue:"File Picker",allowedExtensions:["png"],onChange:k=>{console.log(`****** picked: ${k}`)}})])}}let Re=class extends $.u{constructor(){super(...arguments),this._testVector=new pt.I,this._testSize=new bt.o,this._testEnum=Tt.AT.Info,this._testUpdateMode=Tt.JG.Confirm}destroy(){var k;super.destroy(),null===(k=this._testSignal)||void 0===k||k.dispose()}};(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],Re.prototype,"_testString",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Re.prototype,"_testNumber",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String)],Re.prototype,"_testColorStr",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",Number)],Re.prototype,"_testColorNum",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Re.prototype,"_testBoolean",void 0),(0,j.Cg)([(0,q._H)(),(0,j.Sn)("design:type",pt.I)],Re.prototype,"_testVector",void 0),(0,j.Cg)([(0,q.oB)(),(0,j.Sn)("design:type",bt.o)],Re.prototype,"_testSize",void 0),(0,j.Cg)([(0,q.gf)(Tt.AT),(0,j.Sn)("design:type",String)],Re.prototype,"_testEnum",void 0),(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],Re.prototype,"_testDropdown",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Re.prototype,"_testSignal",void 0),(0,j.Cg)([(0,q.gf)(Tt.JG),(0,j.Sn)("design:type",String)],Re.prototype,"_testUpdateMode",void 0),(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],Re.prototype,"_testUpdateModeInput",void 0),Re=(0,j.Cg)([(0,H.EV)("TestComponent"),(0,_t.W)(De)],Re);class Pe{static fromSliceFile(k){const B=new Pe,U=JSON.parse(k);return B.sliceData={top:U.top,bottom:U.bottom,right:U.right,left:U.left},B.sliceImage=U.image,B}static toSliceFile(k){return JSON.stringify({top:k.sliceData.top,bottom:k.sliceData.bottom,right:k.sliceData.right,left:k.sliceData.left,image:k.sliceImage})}}let Me=class extends mt{constructor(){super(...arguments),this._slice=new Pe}initialize(k,B){super.initialize(k,B);const U=this._editorAPI.getFilePath(this._fileGuid);U?(this._path=U,this._slice=Pe.fromSliceFile(this._editorAPI.readFileSync(this._path).toString())):Z.V.log(`Failed to get filepath for ${this._fileGuid}`,J.$.Error)}generateImageGuidInspector(){return wt.f.create({id:`image-guid-picker-${this._fileGuid}`,labelValue:"Image",inputValue:this._slice.sliceImage,inputType:"text",onChange:k=>{this._slice.sliceImage=k,this._editorAPI.writeToPath(this._path,Pe.toSliceFile(this._slice)),this._editorAPI.redrawCustomInspector()}})}generateNineSliceInspector(){return It.G.fourDimensionGroup({id:`slice-inspector-${this._fileGuid}`,labelValue:"Slice Data",xKey:"top",yKey:"bottom",zKey:"right",wKey:"left",labelTooltip:"The slice data for the image",fourInputValue:this._slice.sliceData,inputUpdateMode:Tt.JG.Confirm,onChange:(k,B)=>{this._slice.sliceData=Object.assign(Object.assign({},this._slice.sliceData),{[k]:B}),this._editorAPI.writeToPath(this._path,Pe.toSliceFile(this._slice)),this._editorAPI.redrawCustomInspector()}})}generate(){return this._path?yt.X.createVertical([this.generateNineSliceInspector(),this.generateImageGuidInspector()]):he.b.create({id:`failed-slice-path-${this._fileGuid}`,iconType:Tt.AT.Error,message:`Failed to get filepath for ${this._fileGuid} (likely a race condition with the editors internal file structure). Please re-select the file.`})}};Me=(0,j.Cg)([(0,Q.aw)("slice")],Me);class Ne extends gt.${generate(k,B){const U=[],F=[];F.push(It.G.colorPickerGroup({id:"tintDefault",labelValue:"Tint Default",inputValue:k.tintDefault}),It.G.numberGroup({id:"tintIntensityDefault",labelValue:"Tint Intensity Default",inputValue:k.tintIntensityDefault})),F.push(It.G.colorPickerGroup({id:"tintOver",labelValue:"Tint Over",inputValue:k.tintOver}),It.G.numberGroup({id:"tintIntensityOver",labelValue:"Tint Intensity Over",inputValue:k.tintIntensityOver})),F.push(It.G.colorPickerGroup({id:"tintDown",labelValue:"Tint Down",inputValue:k.tintDown}),It.G.numberGroup({id:"tintIntensityDown",labelValue:"Tint Intensity Down",inputValue:k.tintIntensityDown})),F.push(It.G.colorPickerGroup({id:"tintFocus",labelValue:"Tint Focus",inputValue:k.tintFocus}),It.G.numberGroup({id:"tintIntensityFocus",labelValue:"Tint Intensity Focus",inputValue:k.tintIntensityFocus})),F.push(It.G.colorPickerGroup({id:"tintDisable",labelValue:"Tint Disable",inputValue:k.tintDisable}),It.G.numberGroup({id:"tintIntensityDisable",labelValue:"Tint Intensity Disable",inputValue:k.tintIntensityDisable}));const G=[];G.push(It.G.numberGroup({id:"alphaDefault",labelValue:"Alpha Default",inputValue:k.alphaDefault}),It.G.numberGroup({id:"alphaOver",labelValue:"Alpha Over",inputValue:k.alphaOver}),It.G.numberGroup({id:"alphaDown",labelValue:"Alpha Down",inputValue:k.alphaDown}),It.G.numberGroup({id:"alphaFocus",labelValue:"Alpha Focus",inputValue:k.alphaFocus}),It.G.numberGroup({id:"alphaDisable",labelValue:"Alpha Disable",inputValue:k.alphaDisable}));const j=[];j.push(It.G.vectorGroup({id:"scaleDefault",labelValue:"Vector Default",vectorValue:k.scaleDefault}),It.G.vectorGroup({id:"scaleOver",labelValue:"Vector Over",vectorValue:k.scaleOver}),It.G.vectorGroup({id:"scaleDown",labelValue:"Vector Down",vectorValue:k.scaleDown}),It.G.vectorGroup({id:"testFocus",labelValue:"Vector Focus",vectorValue:k.scaleFocus}),It.G.vectorGroup({id:"testDisable",labelValue:"Vector Disable",vectorValue:k.scaleDisable}));const $=[];return $.push(It.G.imagePickerGroup({id:"assetDefault",labelValue:"Asset Default",guid:k.assetDefault}),It.G.imagePickerGroup({id:"assetOver",labelValue:"Asset Over",guid:k.assetOver}),It.G.imagePickerGroup({id:"assetDown",labelValue:"Asset Down",guid:k.assetDown}),It.G.imagePickerGroup({id:"assetFocus",labelValue:"Asset Focus",guid:k.assetFocus}),It.G.imagePickerGroup({id:"assetDisable",labelValue:"Asset Disable",guid:k.assetDisable})),U.push(yt.X.createVertical(F,{isContainer:!0,title:"Tint",isCollapsible:!0,startCollapsed:!0}),yt.X.createVertical(G,{isContainer:!0,title:"Alpha",isCollapsible:!0,startCollapsed:!0}),yt.X.createVertical(j,{isContainer:!0,title:"Scale",isCollapsible:!0,startCollapsed:!0}),yt.X.createVertical($,{isContainer:!0,title:"Asset",isCollapsible:!0,startCollapsed:!0})),yt.X.createVertical(U)}}var xe=U(74786),Le=(U(62131),U(83793));let ke=class extends $.u{constructor(){super(...arguments),this.imageGuids=[],this._targetGraphic=new ge,this.onImageChanged=new Mt.H}postCreate(){super.postCreate(),this._currentIndex=0,this.imageGuids.length&&this.updateImage()}nextImage(){0!==this.imageGuids.length?(this._currentIndex++,this._currentIndex%=this.imageGuids.length,this.updateImage()):Z.V.log("There are no images in imageGuids to display",J.$.Error)}previousImage(){0!==this.imageGuids.length?(this._currentIndex+=this.imageGuids.length-1,this._currentIndex%=this.imageGuids.length,this.updateImage()):Z.V.log("There are no images in imageGuids to display",J.$.Error)}updateImage(){const k=this.imageGuids[this._currentIndex];this._targetGraphic.updateAsset(k),this.onImageChanged.dispatch(k)}destroy(){this.onImageChanged.dispose(),super.destroy()}};(0,j.Cg)([(0,q.SZ)(),(0,q.W_)(),(0,j.Sn)("design:type",Array)],ke.prototype,"imageGuids",void 0),(0,j.Cg)([(0,q.Mn)(ge),(0,j.Sn)("design:type",ge)],ke.prototype,"_targetGraphic",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],ke.prototype,"onImageChanged",void 0),(0,j.Cg)([(0,Le.G)(),(0,j.Sn)("design:type",Function),(0,j.Sn)("design:paramtypes",[]),(0,j.Sn)("design:returntype",void 0)],ke.prototype,"nextImage",null),(0,j.Cg)([(0,Le.G)(),(0,j.Sn)("design:type",Function),(0,j.Sn)("design:paramtypes",[]),(0,j.Sn)("design:returntype",void 0)],ke.prototype,"previousImage",null),ke=(0,j.Cg)([(0,H.EV)("ImageCycle",H.YH.ui)],ke);var Be=U(30290);let Ue=class extends $.u{constructor(){super(...arguments),this._speed=250,this.onTweenStarted=new Mt.H,this.onTweenStopped=new Mt.H,this._isReturning=!1}toggleTween(){const k=this.gameObject.transform;this._movementTween?(this._movementTween.onRepeat.removeAll(),this._movementTween.remove(),this._movementTween=null,this.resetPosition(),this.onTweenStopped.dispatch()):(this.resetPosition(),this._movementTween=V.W.instance.game.add.tween(k.localPosition,this),this._movementTween.to({x:this._endPosition.localPosition.x,y:this._endPosition.localPosition.y},this.getTravelDuration(),Be.G.Linear.None,!0,0,-1,!0),this._movementTween.onRepeat.add((()=>{this._isReturning=!this._isReturning,this.faceDirection()})),this.onTweenStarted.dispatch())}resetPosition(){this.gameObject.transform.localPosition=this._startPosition.localPosition,this._isReturning=!1,this.faceDirection()}faceDirection(){if(this.gameObject){const k=this.gameObject.transform,B=this._isReturning?this._startPosition:this._endPosition,U=Math.sign(B.localPosition.x-k.localPosition.x);0!==U&&this.gameObject.transform.setScale(U,k.localScale.y)}}getTravelDuration(){return ut.c.distance(this.gameObject.transform.localPosition.x,this.gameObject.transform.localPosition.y,this._endPosition.localPosition.x,this._endPosition.localPosition.y)/this._speed*1e3}destroy(){this.onTweenStarted.dispose(),this.onTweenStopped.dispose(),super.destroy()}};(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Ue.prototype,"_speed",void 0),(0,j.Cg)([(0,q.Mn)(Ct.d),(0,j.Sn)("design:type",Ct.d)],Ue.prototype,"_startPosition",void 0),(0,j.Cg)([(0,q.Mn)(Ct.d),(0,j.Sn)("design:type",Ct.d)],Ue.prototype,"_endPosition",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Ue.prototype,"onTweenStarted",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Ue.prototype,"onTweenStopped",void 0),Ue=(0,j.Cg)([(0,H.EV)("TransformYoyo",H.YH.motion,"Transform patrol between two points")],Ue);var Fe=U(300),Ge=U(79687);let je=class{constructor(){this.fsmFactories=null,this.data=null,this.variables=null,this.currentState=null,this.onComplete=new Mt.H}get OnComplete(){return this.onComplete}init(k,B,U){this.fsmFactories=k,this.data=B,this.variables=U}execute(k=!1){this.currentState||this.executeNext(k)}executeWithData(k,B){this.currentState=k;const U=this.fsmFactories.createState(k,this.variables);U.OnComplete.addOnce((()=>{this.onStateCompleted(B)}),this),U.execute(B)}executeWithName(k,B){for(let U=0;U0){for(let B=0;B0){let k=!0;for(let B=0;B1)switch(k.charAt(0)){case"$":U=this.findVariable(k.substr(1),B);break;case"#":U=st.w.getActiveScene().container.get(k.substr(1))}return U}if(k.constructor===Array){const U=[];for(let F=0;FB=>{He[k]=B};var We;let qe=We=class{deserializeCollection(k){return We.deserializeCollection(k,this.deserialize)}serializeCollection(k){return We.serializeCollection(k,this.serialize)}static deserializeCollection(k,B){const U=[];if(k)for(let F=0;FB;default:return!1}}};pi=(0,j.Cg)([(0,Ge.injectable)()],pi);let vi=class{constructor(){this.fsmFactories=null,this.data=null,this.variables=null,this.actions=[],this.actionsCompleted=0,this.onComplete=new Mt.H}get OnComplete(){return this.onComplete}init(k,B,U){this.fsmFactories=k,this.data=B,this.variables=U}execute(k=!1){if(k&&Z.V.log(`Executing STATE ${this.data.name}`,J.$.Verbose),this.data.actions.length>0){for(let B=0;B(B,U)=>{const F=k.container.resolve(je);return F.init(this,B,U),F})),this.add(vi,(k=>(B,U)=>{const F=k.container.resolve(vi);return F.init(this,B,U),F})),this.add($e,(k=>(B,U)=>{const F=B.Type;if(He.hasOwnProperty(F)){const G=k.container.resolve(He[F]);return G.init(B,U),G}return null})),this.add(pi,(k=>(B,U)=>{const F=k.container.resolve(pi);return F.init(B,U),F}))}createStateMachine(k,B){return this.create(je,k,B)}createState(k,B){return this.create(vi,k,B)}createAction(k,B){return this.create($e,k,B)}createCondition(k,B){return this.create(pi,k,B)}};gi=(0,j.Cg)([(0,Ge.injectable)()],gi);let mi=class{constructor(k){this.fsmFactories=null,this.fsmFactories=k}execute(k,B,U=null){this.createStateMachine(k,B,U).execute()}createStateMachine(k,B,U){const F=this.fsmFactories.createStateMachine(k,B);return U&&F.OnComplete.addOnce(U),F}};mi=(0,j.Cg)([(0,Ge.injectable)(),(0,j.Qj)(0,(0,Ge.inject)(Y.FSMFactories)),(0,j.Sn)("design:paramtypes",[gi])],mi);let yi=class extends mi{execute(k,B,U=null){this.createStateMachine(k,B,U).execute(!0)}};yi=(0,j.Cg)([(0,Ge.injectable)()],yi);U(3004);var _i=U(36361),Ei=U(18830);let wi=class extends $.u{constructor(){super(...arguments),this.components=[],this.identifier=null,this.context=null}get Identifier(){return this.identifier}set Identifier(k){const B=this.GameObject.findComponentInParent(Ei.b);null!==B&&null!==this.components&&(null!==this.identifier&&B.Container.unbind(this.identifier),null!==k&&this.bindComponents(k,this.components)),this.identifier=k}get Components(){return this.components}set Components(k){const B=this.GameObject.findComponentInParent(Ei.b);null!==B&&null!==this.identifier&&(null!==this.components&&B.Container.unbind(this.identifier),null!==k&&this.bindComponents(this.identifier,k)),this.components=k}get Context(){return null!==this.context?this.context:this.GameObject.findComponentInParent(Ei.b)}set Context(k){null!==this.context&&this.context.Container.unbind(this.identifier),this.context=k,null!==this.identifier&&null!==this.components&&this.bindComponents(this.identifier,this.components)}create(){super.create(),null!==this.identifier&&null!==this.components&&this.bindComponents(this.identifier,this.components)}destroy(){if(null!==this.identifier){const k=this.Context;null!==k&&k.Container.unbind(this.identifier)}super.destroy()}bindComponents(k,B){const U=this.Context;null!==U&&(1===B.length?U.Container.bind(k).toConstantValue(B[0]):B.length>1&&U.Container.bind(k).toConstantValue(B))}};(0,j.Cg)([(0,q.E8)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],wi.prototype,"components",void 0),(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],wi.prototype,"identifier",void 0),(0,j.Cg)([(0,q.Mn)(Ei.b),(0,j.Sn)("design:type",Ei.b)],wi.prototype,"context",void 0),wi=(0,j.Cg)([(0,H.EV)("ContextBinding",H.YH.injection,"Context binding component is a way of pushing binding up the chain of GameObjects")],wi);const Ti=(k,B,U)=>{const F=`INJECTION_PARAMS_${B}`,G=U.value;U.value=function(...B){const U=Reflect.getMetadata(F,k);if(Array.isArray(U))for(let k=0;k(B,U,F)=>{const G=`INJECTION_PARAMS_${U}`,j=Reflect.getMetadata(G,B);Array.isArray(j)?j.push({identifier:k,index:F}):Reflect.defineMetadata(G,[{identifier:k,index:F}],B)},Ai=(k,B=!0)=>(U,F)=>{Object.defineProperty(U,F,{get(){const U=jt.U.getInjectedValue(this.gameObject,k);return B&&null!==U&&Object.defineProperty(this,F,{get:()=>U}),U},configurable:!0})},Ci=(k,B=!0)=>(U,F)=>{Object.defineProperty(U,F,{get(){const U=this.getInjectedValue(k);return B&&null!==U&&Object.defineProperty(this,F,{get:()=>U}),U},configurable:!0})};class Oi{constructor(){this.container=null,this._isInstalled=!1}get Container(){return this.container}install(k){this.container=k,this._isInstalled||(this.installBindings(),this._isInstalled=!0)}cleanup(){}}class Ii extends $.u{getInjectedValue(k){return jt.U.getInjectedValue(this.gameObject,k)}}class Di{constructor(k){this.container=null,this.container=k}getInjectedValue(k){return this.container.get(k)}}let Ri=class extends $.u{constructor(){super(...arguments),this.installers=[]}get Installers(){return this.installers}create(){super.create(),this.installers.length>0&&this.runInstallers()}runInstallers(){for(let k=0;k0){const k=st.w.getActiveScene().container;k.hasBinding(this._identifier)||k.bind(this._identifier).toConstantValue(1===this._components.length?this._components[0]:this._components)}}destroy(){if(null!==this._identifier){const k=1===this._components.length?this._components[0]:this._components;st.w.getActiveScene().container.get(this._identifier)===k&&st.w.getActiveScene().container.unbind(this._identifier)}super.destroy()}};(0,j.Cg)([(0,q.Mn)($.u),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],Pi.prototype,"_components",void 0),(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],Pi.prototype,"_identifier",void 0),Pi=(0,j.Cg)([(0,H.EV)("SceneContextBinding",H.YH.injection,"Binds the list of components to the scene container")],Pi);var Mi=U(86766),Ni=U(93337);let xi=class extends $.u{setState(k){}};var Li;xi=(0,j.Cg)([(0,H.EV)("TransitionComponent (abstract)")],xi),function(k){k[k.Default=0]="Default",k[k.Over=1]="Over",k[k.Down=2]="Down",k[k.Focus=3]="Focus",k[k.Disabled=4]="Disabled"}(Li||(Li={}));let ki=class extends Mi.S{constructor(){super(...arguments),this._transitions=[],this._useHandCursor=!0,this.allowDisabledInput=!1,this._isButtonEnabled=!0,this.alwaysTransition=!1,this._currentState=Li.Default}get isButtonEnabled(){return this._isButtonEnabled}get _canTransition(){return this._currentState!==Li.Disabled||this.alwaysTransition}get currentState(){return this._currentState}set awaitingListeners(k){this._awaitingListeners=k,this.applyInputEnabledSetting(!k),this.setState(k?Li.Disabled:Li.Default)}create(){super.create(),this._transitions=this.GameObject.findComponentsInChildren(xi)}destroy(){this._transitions=[],super.destroy()}firstUpdate(){super.firstUpdate(),this.setState(this._currentState)}setButtonEnabled(k=!0){k!==this._isButtonEnabled&&(this._isButtonEnabled=k,this.allowDisabledInput||(this.inputEnabled=k,this.applyUseHandCursorSetting(!!k&&this._useHandCursor)),this.setState(k?Li.Default:Li.Disabled))}onPointerDown(k){(0,Ni.H)(k)||this.shouldDebounce()||(this._canTransition&&this.setState(Li.Down),super.onPointerDown(k))}onPointerUp(k){(0,Ni.H)(k)||this.shouldDebounce()||(this._canTransition&&(this._isOver?this.setState(Li.Over):this.setState(this._isButtonEnabled?Li.Default:Li.Disabled)),super.onPointerUp(k))}onPointerUpOutside(k){(0,Ni.H)(k)||(this._canTransition&&this.setState(this._isButtonEnabled?Li.Default:Li.Disabled),super.onPointerUpOutside(k))}onPointerOver(k){(0,Ni.H)(k)||(this._canTransition&&this.setState(Li.Over),this._isOver=!0,super.onPointerOver(k))}onPointerOut(k){(0,Ni.H)(k)||(this._canTransition&&this.setState(this._isButtonEnabled?Li.Default:Li.Disabled),this._isOver=!1,super.onPointerOut(k))}setState(k){this._currentState=k;for(let B=0;B0){const k=V.W.instance.game.cache.getTexture(F);k&&($.image.texture=k)}$.tint=j,$.setAlpha(U),this.gameObject.transform.setScale(k.x,k.y);break;case this._defaultRenderComponent instanceof Fi:const H=this._defaultRenderComponent;(null==F?void 0:F.length)>0&&H.setSlicedImage(F),H.slicedImage.tint=j,H.slicedImage.alpha=U,this.gameObject.transform.setScale(k.x,k.y);break;case this._defaultRenderComponent instanceof re:(null==F?void 0:F.length)>0&&Z.V.log("Associated RenderComponent (Text) is not a supported type for image transitions",J.$.Warning);const W=this._defaultRenderComponent;W.tint=j,W.alpha=U,this.gameObject.transform.setScale(k.x,k.y);break;case this._defaultRenderComponent instanceof Ui.j:const q=this._defaultRenderComponent;q.tintColor=B,q.alpha=U,q.tintIntensity=G,this.gameObject.transform.setScale(k.x,k.y),q.updateFilter();break;default:const K=this._defaultRenderComponent.getRootContainer();K&&(K.alpha=U),this.gameObject.transform.setScale(k.x,k.y),Z.V.log("Associated RenderComponent is not a supported type for tint or image transitions",J.$.Warning)}}};(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String)],Gi.prototype,"_tintDefault",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String)],Gi.prototype,"_tintOver",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String)],Gi.prototype,"_tintDown",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String)],Gi.prototype,"_tintFocus",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String)],Gi.prototype,"_tintDisable",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"tintIntensityDefault",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"tintIntensityOver",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"tintIntensityDown",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"tintIntensityFocus",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"tintIntensityDisable",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"alphaDefault",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"alphaOver",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"alphaDown",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"alphaFocus",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Gi.prototype,"alphaDisable",void 0),(0,j.Cg)([(0,q._H)(),(0,j.Sn)("design:type",pt.I)],Gi.prototype,"_scaleDefault",void 0),(0,j.Cg)([(0,q._H)(),(0,j.Sn)("design:type",pt.I)],Gi.prototype,"_scaleOver",void 0),(0,j.Cg)([(0,q._H)(),(0,j.Sn)("design:type",pt.I)],Gi.prototype,"_scaleDown",void 0),(0,j.Cg)([(0,q._H)(),(0,j.Sn)("design:type",pt.I)],Gi.prototype,"_scaleFocus",void 0),(0,j.Cg)([(0,q._H)(),(0,j.Sn)("design:type",pt.I)],Gi.prototype,"_scaleDisable",void 0),(0,j.Cg)([(0,q.i0)(Bi.Z.SingleImage),(0,j.Sn)("design:type",String)],Gi.prototype,"_assetDefault",void 0),(0,j.Cg)([(0,q.i0)(Bi.Z.SingleImage),(0,j.Sn)("design:type",String)],Gi.prototype,"_assetOver",void 0),(0,j.Cg)([(0,q.i0)(Bi.Z.SingleImage),(0,j.Sn)("design:type",String)],Gi.prototype,"_assetDown",void 0),(0,j.Cg)([(0,q.i0)(Bi.Z.SingleImage),(0,j.Sn)("design:type",String)],Gi.prototype,"_assetFocus",void 0),(0,j.Cg)([(0,q.i0)(Bi.Z.SingleImage),(0,j.Sn)("design:type",String)],Gi.prototype,"_assetDisable",void 0),(0,j.Cg)([(0,Vt.Pq)(Pt.y),(0,j.Sn)("design:type",Pt.y)],Gi.prototype,"_defaultRenderComponent",void 0),Gi=(0,j.Cg)([(0,H.EV)("RenderableTransition",H.YH.transition),(0,_t.W)(Ne)],Gi);let ji=class extends $.u{constructor(){super(...arguments),this.ratio=1}get rectTransform(){return this._rectTransform}};(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],ji.prototype,"ratio",void 0),(0,j.Cg)([(0,Vt.Pq)(ft.X),(0,j.Sn)("design:type",ft.X)],ji.prototype,"_rectTransform",void 0),ji=(0,j.Cg)([(0,H.EV)("FlexGrow",H.YH.uiLayout,"A data component that tells `FlexContainerComponent` that this child object should grow.")],ji);const $i=(k,B)=>k+B;var Hi,Vi,Wi;!function(k){k[k.Rows=0]="Rows",k[k.Columns=1]="Columns"}(Hi||(Hi={})),function(k){k[k.Gutter=0]="Gutter",k[k.Centered=1]="Centered",k[k.SpaceEvenly=2]="SpaceEvenly"}(Vi||(Vi={})),function(k){k[k.Top=0]="Top",k[k.Center=1]="Center",k[k.Bottom=2]="Bottom"}(Wi||(Wi={}));let qi=class extends $.u{constructor(){super(...arguments),this.onChildrenRearranged=new Mt.H,this.resizeContainer=!0,this.minWidth=0,this.minHeight=0,this.wrap=!1,this.direction=Hi.Rows,this.gutter=0,this.rowGutter=0,this.useRowGutter=!1,this.spacing=Vi.Gutter,this.align=Wi.Top,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0,this.paddingLeft=0,this._shouldRearrangeChildren=!0}getSizeOfRectForDirection(k,B=!1){return this.direction===Hi.Columns?B?k.widthDelta:k.heightDelta:B?k.heightDelta:k.widthDelta}rowSizeOfChildren(k){return k.reduce(((k,B)=>k+this.getSizeOfRectForDirection(B.findComponent(ft.X))),0)+(k.length-1)*this.gutter}resizeChildrenForRow(k,B){const U=k.reduce(((k,B)=>{const U=B.findComponent(ji);if(U){const{rectTransform:B}=U;this.direction===Hi.Rows?B.setSizeDelta(0,B.heightDelta):B.setSizeDelta(B.widthDelta,0),k.push(U)}return k}),[]),F=Math.max(B-this.rowSizeOfChildren(k),0),G=U.map((k=>k.ratio)).reduce($i,0);U.forEach((k=>{const{rectTransform:B}=k,U=F/G*k.ratio+this.getSizeOfRectForDirection(B);this.direction===Hi.Rows?B.setSizeDelta(U,B.heightDelta):B.setSizeDelta(B.widthDelta,U)}))}distributeChildrenOnRow(k,B,U){this.resizeChildrenForRow(k,B);const F=k.map((k=>k.findComponent(ft.X))),G=F.map((k=>this.getSizeOfRectForDirection(k))).reduce($i,0),j=(()=>this.spacing===Vi.SpaceEvenly?Math.max(this.gutter,(B-G)/(k.length-1)):this.gutter)();let $=this.direction===Hi.Rows?this.paddingLeft:this.paddingTop;if(this.spacing===Vi.Centered){$+=Math.max(B-this.rowSizeOfChildren(k),0)/2}const H=F.map((k=>this.getSizeOfRectForDirection(k,!0))).reduce(((k,B)=>Math.max(k,B)),0);for(const V of F){let k=U;const B=this.getSizeOfRectForDirection(V,!0);this.align===Wi.Center?k+=(H-B)/2:this.align===Wi.Bottom&&(k+=H-B),this.direction===Hi.Columns?V.setPosition(k,$):V.setPosition($,k),$+=this.getSizeOfRectForDirection(V)+j}return H}arrangeChildren(){const k=this.gameObject.children.filter((k=>k.active));if(0===k.length)return;const B=(()=>this.direction===Hi.Columns?this._rectTransform.fullHeight-this.paddingBottom-this.paddingTop:this._rectTransform.fullWidth-this.paddingLeft-this.paddingRight)();let U=this.direction===Hi.Rows?this.paddingTop:this.paddingLeft;const F=[];if(this.wrap)for(const j of k){const k=this.getSizeOfRectForDirection(j.findComponent(ft.X));if(this.rowSizeOfChildren(F)+k+this.gutter>B){U+=this.distributeChildrenOnRow(F,B,U)+(this.useRowGutter?this.rowGutter:this.gutter),F.length=0}F.push(j)}else F.push(...k);const G=this.distributeChildrenOnRow(F,B,U);if(this.resizeContainer){const k=G+U+(this.direction===Hi.Rows?this.paddingBottom:this.paddingRight);this.direction===Hi.Rows?this._rectTransform.setSizeDelta(this._rectTransform.widthDelta,Math.max(this.minHeight,k)):this.direction===Hi.Columns&&this._rectTransform.setSizeDelta(Math.max(this.minWidth,k),this._rectTransform.heightDelta)}}triggerRearrange(){this._shouldRearrangeChildren=!0}postCreate(){super.postCreate(),this._rectTransform||(this._rectTransform=this.gameObject.findComponent(ft.X)||this.gameObject.addComponent(ft.X)),this._rectTransform.onDimensionsChanged.add(this.arrangeChildren,this);const k=k=>{k.onActiveChanged.add(this.triggerRearrange,this);const B=k.findComponent(ft.X);if(!B)throw new Error("Children of FlexContainerComponent must have a RectTransform");B.onDimensionsChanged.add(this.triggerRearrange,this),this.triggerRearrange()};this.gameObject.children.forEach(k),this.gameObject.onChildAdded.add(k),this.gameObject.onChildRemoved.add((k=>{var B;k.onActiveChanged.remove(this.triggerRearrange,this),null===(B=k.findComponent(ft.X))||void 0===B||B.onDimensionsChanged.remove(this.triggerRearrange,this),this.triggerRearrange()}))}destroy(){this._rectTransform.onDimensionsChanged.remove(this.arrangeChildren,this),super.destroy()}update(){this._shouldRearrangeChildren&&(this.arrangeChildren(),this._shouldRearrangeChildren=!1,this.onChildrenRearranged.dispatch())}setMinHeight(k){this.minHeight=k,this.resizeContainerToMins()}resizeContainerToMins(){this._rectTransform.setSizeDelta(Math.max(this.minWidth,this._rectTransform.widthDelta),Math.max(this.minHeight,this._rectTransform.heightDelta))}};(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],qi.prototype,"onChildrenRearranged",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],qi.prototype,"resizeContainer",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],qi.prototype,"minWidth",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],qi.prototype,"minHeight",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],qi.prototype,"wrap",void 0),(0,j.Cg)([(0,q.gf)(Hi),(0,j.Sn)("design:type",Number)],qi.prototype,"direction",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],qi.prototype,"gutter",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],qi.prototype,"rowGutter",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],qi.prototype,"useRowGutter",void 0),(0,j.Cg)([(0,q.gf)(Vi),(0,j.Sn)("design:type",Number)],qi.prototype,"spacing",void 0),(0,j.Cg)([(0,q.gf)(Wi),(0,j.Sn)("design:type",Number)],qi.prototype,"align",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],qi.prototype,"paddingTop",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],qi.prototype,"paddingRight",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],qi.prototype,"paddingBottom",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],qi.prototype,"paddingLeft",void 0),(0,j.Cg)([(0,Vt.Pq)(ft.X),(0,j.Sn)("design:type",ft.X)],qi.prototype,"_rectTransform",void 0),qi=(0,j.Cg)([(0,H.EV)("FlexContainer",H.YH.uiLayout,"`FlexContainerComponent` will automatically arrange its children into rows or columns based on the size of the its and the child's `RectTransform`.")],qi);var Ki,zi=U(82538),Yi=U(21979);!function(k){k[k.Start=0]="Start",k[k.Center=1]="Center",k[k.End=2]="End"}(Ki||(Ki={}));let Qi=class extends Yi.P{constructor(){super(...arguments),this._fixedRowCount=0,this._fixedColumnCount=0,this._dynamicRowHeight=!1,this._dynamicColumnWidth=!1,this._rowSpacing=0,this._columnSpacing=0,this._xPositionOffset=0,this._yPositionOffset=0,this._alignmentAnchorX=0,this._alignmentAnchorY=0,this._fillPriority=zi.e.Horizontal,this._reverseFillRow=!1,this._reverseFillColumn=!1,this._indexOffset=0,this.onUpdated=new Mt.H,this._lastLineAlignment=Ki.Start}get fixedRowCount(){return this._fixedRowCount}get fixedColumnCount(){return this._fixedColumnCount}get dynamicRowHeight(){return this._dynamicRowHeight}get dynamicColumnWidth(){return this._dynamicColumnWidth}get rowSpacing(){return this._rowSpacing}get columnSpacing(){return this._columnSpacing}get xPositionOffset(){return this._xPositionOffset}get yPositionOffset(){return this._yPositionOffset}get alignmentAnchorX(){return this._alignmentAnchorX}get alignmentAnchorY(){return this._alignmentAnchorY}get fillPriority(){return this._fillPriority}get indexOffset(){return this._indexOffset}set indexOffset(k){this._indexOffset=k}postDeserialize(){super.postDeserialize(),this._fixedRowCount<1&&this._fixedColumnCount<1?(Z.V.log("At least one direction in grid needs to be a fixed size",J.$.Error),this._fixedRowCount=1,this._fixedColumnCount=1):this._fixedRowCount<1&&this._fixedColumnCount>=1?(this._fillPriority=zi.e.Horizontal,this._reverseFillRow=!1):this._fixedRowCount>=1&&this._fixedColumnCount<1&&(this._fillPriority=zi.e.Vertical,this._reverseFillColumn=!1)}destroy(){this.onUpdated.dispose(),super.destroy()}setFixedColumnCount(k){this._fixedColumnCount=k,this.updateAll()}setFixedRowCount(k){this._fixedRowCount=k,this.updateAll()}setXOffset(k){this._xPositionOffset=k,this.updateAll()}setYOffset(k){this._yPositionOffset=k,this.updateAll()}getLayoutPositionX(k){const B=this.getColumn(k+this._indexOffset),U=this.getTotalCellCount(),F=this.getGameObjectList().length;if(this.fillPriority===zi.e.Vertical||1===this.getColumnCount()||this._dynamicColumnWidth||F===U||k+this._indexOffset=1&&(B=this._fixedRowCount-1-B),B}getColumn(k){let B;return B=this._fillPriority===zi.e.Horizontal?k%this._fixedColumnCount:Math.floor(k/this._fixedRowCount),this._reverseFillColumn&&this._fixedColumnCount>=1&&(B=this._fixedColumnCount-1-B),B}getRowCount(){const k=this.getGameObjectList().length+this._indexOffset;return this._fillPriority===zi.e.Horizontal?Math.ceil(k/this._fixedColumnCount):Math.min(k,this._fixedRowCount)}getColumnCount(){const k=this.getGameObjectList().length+this._indexOffset;return this._fillPriority===zi.e.Horizontal?Math.min(k,this._fixedColumnCount):Math.ceil(k/this._fixedRowCount)}getTotalCellCount(){if(this._fixedRowCount>0&&this._fixedColumnCount>0)return this._fixedRowCount*this._fixedColumnCount}isFilled(){return this._fixedRowCount>=1&&this._fixedColumnCount>=1&&this.getGameObjectList().length>=this._fixedRowCount*this._fixedColumnCount}isEmpty(){return this.getGameObjectList().length<=0}setRowSpacing(k){this._rowSpacing=k,this.updateAll()}setColumnSpacing(k){this._columnSpacing=k,this.updateAll()}updateAll(k=!0){const B=this.updateCachedDimensions();super.updateAll(k),this.onUpdated.dispatch(B)}updateCachedDimensions(){const k=Math.max(1,this.getRowCount()),B=Math.max(1,this.getColumnCount()),U=new Array(k).fill(0),F=new Array(B).fill(0),G=this.getGameObjectList();for(let H=G.length-1;H>=0;--H){const k=this.getRow(H),B=this.getColumn(H),j=G[H],$=Ft.getWidth(j),V=Ft.getHeight(j);U[k]=Math.max(U[k],V),F[B]=Math.max(F[B],$)}this._cachedColumnX=new Array(B),this._cachedRowY=new Array(k);let j=this._xPositionOffset,$=this._yPositionOffset;for(let H=0;H0){return this.getColumn(k+this.indexOffset)%this.fixedRowCount%2==0?this.alignmentAnchorX:this._alternateAnchorX}return this.alignmentAnchorX}getLayoutAnchorY(k){if(it.A.isDefined(this._alternateAnchorY)&&this.fixedColumnCount>0){return this.getColumn(k+this.indexOffset)%this.fixedColumnCount%2==0?this.alignmentAnchorY:this._alternateAnchorY}return this.alignmentAnchorY}};var Zi,Ji;(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Xi.prototype,"_alternateAnchorX",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Xi.prototype,"_alternateAnchorY",void 0),Xi=(0,j.Cg)([(0,H.EV)("AlternatingAnchorGridLayout",H.YH.uiLayout,"A custom grid layout component")],Xi),function(k){k[k.Start=0]="Start",k[k.Center=1]="Center",k[k.End=2]="End"}(Zi||(Zi={})),function(k){k[k.None=0]="None",k[k.SpaceAround=1]="SpaceAround",k[k.SpaceBetween=2]="SpaceBetween"}(Ji||(Ji={}));let ts=class extends Yi.P{constructor(){super(...arguments),this.resizeRectTransform=!1,this.fixedRowCount=0,this.fixedColumnCount=0,this.dynamicRowHeight=!1,this.dynamicColumnWidth=!1,this.justifyRowSpacing=Ji.None,this.justifyColumnSpacing=Ji.None,this.rowHeight=0,this.columnWidth=0,this._rowSpacing=0,this._columnSpacing=0,this.childAlignmentX=.5,this.childAlignmentY=.5,this.applyChildPivotX=!1,this.applyChildPivotY=!1,this.childPivotX=.5,this.childPivotY=.5,this._fillPriority=zi.e.Horizontal,this.reverseFillRow=!1,this.reverseFillColumn=!1,this.beginningEmptyCells=0,this.lastLineAlignment=Zi.Start,this.onUpdated=new Mt.H}get rowSpacing(){return this._rowSpacing}set rowSpacing(k){this._rowSpacing=k,this.updateAll()}get columnSpacing(){return this._columnSpacing}set columnSpacing(k){this._columnSpacing=k,this.updateAll()}get fillPriority(){return this.fixedRowCount<1&&this.fixedColumnCount>=1?zi.e.Horizontal:this.fixedRowCount>=1&&this.fixedColumnCount<1?zi.e.Vertical:this._fillPriority}set fillPriority(k){this._fillPriority=k,this.updateAll()}destroy(){this.onUpdated.dispose(),super.destroy()}getLayoutAnchorX(k){var B;if(this.applyChildPivotX)return this.childPivotX;const U=null===(B=this.getGameObjectList()[k])||void 0===B?void 0:B.transform;return U instanceof ft.X?U.pivot.x:0}getLayoutAnchorY(k){var B;if(this.applyChildPivotY)return this.childPivotY;const U=null===(B=this.getGameObjectList()[k])||void 0===B?void 0:B.transform;return U instanceof ft.X?U.pivot.y:0}getLayoutPositionX(k){const B=this.getColumn(k+this.beginningEmptyCells);return!this._cachedLastLinePositions||this.fillPriority===zi.e.Vertical||k+this.beginningEmptyCells=1&&(U=B-1-U),U}getColumn(k){const B=this.getColumnCount();let U;return U=this.fillPriority===zi.e.Horizontal?k%B:Math.floor(k/this.getRowCount()),this.reverseFillColumn&&B>=1&&(U=B-1-U),U}getRowCount(){const k=this.getGameObjectList().length+this.beginningEmptyCells;return this.fillPriority===zi.e.Vertical?this.fixedRowCount>0?this.fixedRowCount:Math.max(1,k):this.fixedColumnCount>=1?Math.max(1,this.fixedRowCount,Math.ceil(k/this.fixedColumnCount)):1}getColumnCount(){const k=this.getGameObjectList().length+this.beginningEmptyCells;return this.fillPriority===zi.e.Horizontal?this.fixedColumnCount>0?this.fixedColumnCount:Math.max(1,k):this.fixedRowCount>=1?Math.max(1,this.fixedColumnCount,Math.ceil(k/this.fixedRowCount)):1}getTotalCellCount(){return this.getRowCount()*this.getColumnCount()}isFilled(){return this.fixedRowCount>=1&&this.fixedColumnCount>=1&&this.getGameObjectList().length+this.beginningEmptyCells>=this.fixedRowCount*this.fixedColumnCount}isEmpty(){return this.getGameObjectList().length+this.beginningEmptyCells<=0}updateByIndex(k){var B;const U=null===(B=this.getGameObjectList()[k])||void 0===B?void 0:B.transform;U instanceof ft.X&&(U.setAnchorMin(.5,.5),U.setAnchorMax(.5,.5)),super.updateByIndex(k)}updateAll(k=!0){const B=this.updateCachedDimensions();super.updateAll(k),k&&this.resizeRectTransform&&this.gameObject.transform instanceof ft.X&&(this.gameObject.transform.fullWidth=B.width,this.gameObject.transform.fullHeight=B.height),this.onUpdated.dispatch(B)}updateCachedDimensions(){const k=this.getRowCount(),B=this.getColumnCount(),U=new Array(k).fill(this.rowHeight),F=new Array(B).fill(this.columnWidth),G=this.getGameObjectList();if(this.dynamicColumnWidth||this.dynamicRowHeight)for(let Y=G.length-1;Y>=0;--Y){const k=this.getRow(Y+this.beginningEmptyCells),B=this.getColumn(Y+this.beginningEmptyCells),j=G[Y],$=j.transform instanceof ft.X?j.transform:null;if(this.dynamicColumnWidth&&(!$||$.anchorMax.x===$.anchorMin.x)){const k=Ft.getWidth(j);F[B]=Math.max(F[B],k)}if(this.dynamicRowHeight&&(!$||$.anchorMax.y===$.anchorMin.y)){const B=Ft.getHeight(j);U[k]=Math.max(U[k],B)}}if(this.GameObject.children.length>1&&this.justifyRowSpacing!==Ji.None&&this.GameObject.transform instanceof ft.X){const B=tt.sum(U),F=this.justifyRowSpacing===Ji.SpaceAround?k+1:k-1;this._rowSpacing=Math.max(0,(this.GameObject.transform.sizeDelta.height-B)/F)}if(this.GameObject.children.length>1&&this.justifyColumnSpacing!==Ji.None&&this.GameObject.transform instanceof ft.X){const k=tt.sum(F),U=this.justifyColumnSpacing===Ji.SpaceAround?B+1:B-1;this._columnSpacing=Math.max(0,(this.GameObject.transform.sizeDelta.width-k)/U)}this._cachedColumnX=new Array(B),this._cachedRowY=new Array(k);const j=tt.sum(F)+(B-1)*this._columnSpacing,$=tt.sum(U)+(k-1)*this._rowSpacing;let H=.5,V=.5,W=j,q=$;this.gameObject.transform instanceof ft.X&&(H=this.gameObject.transform.pivot.x,V=this.gameObject.transform.pivot.y,this.resizeRectTransform||(W=this.gameObject.transform.fullWidth,q=this.gameObject.transform.fullHeight));let K=Math.round(H*-j+(H-.5)*W),z=Math.round(V*-$+(V-.5)*q);for(let Y=0;Y1&&k>1){const U=this.fillPriority===zi.e.Horizontal,F=(G.length+this.beginningEmptyCells)%(U?B:k);if(F>0)if(this.lastLineAlignment===Zi.Center){const k=U?this._columnSpacing:this._rowSpacing;let B=-k;const j=U?this.dynamicColumnWidth?Ft.getWidth:()=>0:this.dynamicRowHeight?Ft.getHeight:()=>0,$=tt.takeRight(G,F).map((U=>{const F=j(U);return B+=F+k,B})),H=$[0],V=B;this._cachedLastLinePositions=$.map((k=>k-H+this.childPivotX*H-(V>>1)))}else this._cachedLastLinePositions=tt.takeRight(U?this._cachedColumnX:this._cachedRowY,F)}return new bt.o(j,$)}};var es;(0,j.Cg)([(0,q.vk)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Boolean)],ts.prototype,"resizeRectTransform",void 0),(0,j.Cg)([(0,q.g1)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"fixedRowCount",void 0),(0,j.Cg)([(0,q.g1)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"fixedColumnCount",void 0),(0,j.Cg)([(0,q.vk)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Boolean)],ts.prototype,"dynamicRowHeight",void 0),(0,j.Cg)([(0,q.vk)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Boolean)],ts.prototype,"dynamicColumnWidth",void 0),(0,j.Cg)([(0,q.gf)(Ji),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"justifyRowSpacing",void 0),(0,j.Cg)([(0,q.gf)(Ji),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"justifyColumnSpacing",void 0),(0,j.Cg)([(0,q.g1)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"rowHeight",void 0),(0,j.Cg)([(0,q.g1)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"columnWidth",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],ts.prototype,"_rowSpacing",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],ts.prototype,"_columnSpacing",void 0),(0,j.Cg)([(0,q.g1)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"childAlignmentX",void 0),(0,j.Cg)([(0,q.g1)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"childAlignmentY",void 0),(0,j.Cg)([(0,q.vk)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Boolean)],ts.prototype,"applyChildPivotX",void 0),(0,j.Cg)([(0,q.vk)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Boolean)],ts.prototype,"applyChildPivotY",void 0),(0,j.Cg)([(0,q.g1)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"childPivotX",void 0),(0,j.Cg)([(0,q.g1)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"childPivotY",void 0),(0,j.Cg)([(0,q.gf)(zi.e),(0,j.Sn)("design:type",String)],ts.prototype,"_fillPriority",void 0),(0,j.Cg)([(0,q.vk)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Boolean)],ts.prototype,"reverseFillRow",void 0),(0,j.Cg)([(0,q.vk)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Boolean)],ts.prototype,"reverseFillColumn",void 0),(0,j.Cg)([(0,q.g1)(),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"beginningEmptyCells",void 0),(0,j.Cg)([(0,q.gf)(Zi),(0,$t.x)("updateAll"),(0,j.Sn)("design:type",Number)],ts.prototype,"lastLineAlignment",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],ts.prototype,"onUpdated",void 0),ts=(0,j.Cg)([(0,H.EV)("GridLayoutNew",H.YH.uiLayout,"Grid layout component for UI")],ts),function(k){k[k.JSON=0]="JSON",k[k.Image=1]="Image",k[k.Atlas=2]="Atlas",k[k.Music=3]="Music",k[k.Sound=4]="Sound",k[k.Spine=5]="Spine",k[k.Binary=6]="Binary"}(es||(es={}));let is=class{constructor(){this.dataSource=null,this.onDataSourceUpdated=new Mt.H}setDataSource(k){this.dataSource=k,this.onDataSourceUpdated.dispatch()}destroy(){this.onDataSourceUpdated.dispose()}};is=(0,j.Cg)([(0,Ge.injectable)()],is);let ss=class extends is{getText(k,...B){if(it.A.isDefined(k)&&""===k.trim())return k;if(it.A.isDefined(this.dataSource)){let U=this.dataSource.getValue(k);if(it.A.isDefined(U)){for(let k=0;k=this._minimumLogLevel&&(this._shouldColorCodeLogs?console.log(`%c[${J.$[B].toUpperCase()}]%c ${k}`,this.getLogStyle(B),this.getTextStyle(),...U):console.log(`[${J.$[B].toUpperCase()}] ${k}`,...U),B===this._stackTraceLogLevel&&(console.groupCollapsed(`Error: ${k}`),console.trace(),console.groupEnd()))}table(k,B,U){"object"==typeof k?B>=this._minimumLogLevel&&console.table(k,U):this.log("Message must be an object or array to be logged as a table",J.$.Warning)}setLogLevel(k){this._minimumLogLevel=k}setColoredLogsEnabled(k){this._shouldColorCodeLogs=k}getLogStyle(k){switch(k){case J.$.Verbose:return"background: #009688; color: #EEEEEE; padding: 2px";case J.$.Warning:return"background: #FEEFB3; color: #9F6000; padding: 2px";case J.$.Error:return"background: #FFD2D2; color: #D8000C; padding: 2px";default:return""}}getTextStyle(){return"color: #000; background-color: #FFF; padding: 0"}}ns.CSS_HIGHLIGHT_PINK="display: inline-block ; background-color: #e0005a ; color: #ffffff ; font-weight: bold ; padding: 3px 7px 3px 7px ; border-radius: 3px 3px 3px 3px ;",ns.CSS_HIGHLIGHT_GOLD="display: inline-block ; background-color: gold ; color: black ; font-weight: bold ; padding: 3px 7px 3px 7px ; border-radius: 3px 3px 3px 3px ;",ns.CSS_HIGHLIGHT_GREEN="display: inline-block ; background-color: #2ffa62 ; color: black ; font-weight: bold ; padding: 3px 7px 3px 7px ; border-radius: 3px 3px 3px 3px ;",ns.CSS_BOLD="font-weight: bold ;";var as,rs,os=U(49415),hs=U(80473);class cs extends $.u{constructor(){super(...arguments),this.image=null,this.animationData=[],this.isPlaying=!1,this.frameTimeElapsed=0,this.frameIndex=0}create(){super.create(),this.image=this.GameObject.findComponent(ge)}update(){if(super.update(),this.isPlaying){this.frameTimeElapsed+=V.W.instance.game.time.deltaMS;let k=this.animationData[this.frameIndex].duration,B=this.frameIndex;for(;this.frameTimeElapsed>=k;)++B,this.frameTimeElapsed-=k,B>=this.animationData.length&&(B=0),k=this.animationData[B].duration;B!==this.frameIndex&&(this.frameIndex=B,this.image.updateAsset(this.image.atlasKey,`${this.animationData[this.frameIndex].frame}`))}}playAnimation(){null!==this.image&&(this.isPlaying=!0)}stopAnimation(){this.isPlaying=!1}}class ds extends $.u{constructor(){super(...arguments),this.tiles=[]}addTile(k){this.tiles.push(k),k.OnDestroy.add(this.removeTile,this)}destroy(){var k;for(const B of this.tiles)B.OnDestroy.remove(this.removeTile,this),null===(k=B.GameObject)||void 0===k||k.destroy();super.destroy()}setTileGroupVisibility(k,B,U=1){const F=B?1:0,G={tiles:[],alpha:1-F};for(let j=0;j{for(let k=0;k(0,j.sH)(this,void 0,void 0,(function*(){return as.loadTilesets(k)})))).then((k=>this.parseMap(B,k,U,F,G))).catch((k=>{Z.V.log(`TMXMapLoader: ${Ut.R.stringify(k)}`,J.$.Warning)})).then((B=>(0,j.sH)(this,void 0,void 0,(function*(){this.optimizeMapLayer(B,F),this.optimizeMapLayer(B,G),this._loadedMap=B,this.onMapLoaded.dispatch(k)}))))}static loadMapFileFromUrl(k){return(0,j.sH)(this,void 0,void 0,(function*(){return V.W.instance.loader.assignAssetData(k,{type:"json",fullURL:k}),as.loadMapFile(k)}))}static loadMapFile(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=V.W.instance.game;return V.W.instance.loader.isLoaded(k,es.JSON)?B.cache.getJSON(k):V.W.instance.loader.loadAssets([k]).then((()=>(0,j.sH)(this,void 0,void 0,(function*(){return Promise.resolve(tt.cloneDeep(B.cache.getJSON(k)))}))))}))}static loadTilesets(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=k.tilesets.map((k=>k.name));return B.every((k=>V.W.instance.loader.isLoaded(k,es.JSON)))?Promise.resolve(k):V.W.instance.loader.loadAssets(B).then((()=>(0,j.sH)(this,void 0,void 0,(function*(){return Promise.resolve(k)}))))}))}parseMap(k,B,U,F,G){const j=k.addComponent(ds);for(const $ of B.layers){let k=$.visible,H=F;if($.properties){it.A.isDefined($.properties.isAbove)?H=G:it.A.isDefined($.properties.content)&&(H=U);const B=tt.get($,"properties.toggle",-1);B>-1&&this._disabledToggleGroups.includes(B)&&(k=!1),it.A.isDefined($.properties.reference)&&(k=!1)}if(k){const k=this.createLayer(H,$,B.tilesets);for(const B of k)j.addTile(B)}}return j}createLayer(k,B,U){const F=new Te._(k);return F.name=B.name,F.addComponent(this.useLegacyTransforms?pe.K:Ct.d),it.A.isDefined(B.objects)?this.createObjectLayer(F,B,U):this.createTiledLayer(F,B,U)}createObjectLayer(k,B,U){var F,G,j;const $=[],H=as.TILE_SIZE>>1;for(const V of B.objects){const W=tt.get(B,"properties.dynamicToggle",-1),q=this.createTile(k,V.gid,V.x,V.y,U,W,null,null===(F=B.properties)||void 0===F?void 0:F.tag,B.opacity);if(it.A.isDefined(q)){if(this.useLegacyTransforms)null===(G=q.GameObject.legacyTransform)||void 0===G||G.group.position.set(V.x+H,V.y-H),q.GameObject.findComponent(ge).setAnchor(.5,.5);else{const k=V.x+H+Math.sin(V.rotation*Math.PI/180)*as.TILE_SIZE,B=V.y-H,U=q.GameObject.transform;U.setPosition(k,B),U.setRotation(null!==(j=V.rotation)&&void 0!==j?j:0)}$.push(q)}}return $}createTiledLayer(k,B,U){var F;const G=it.A.isDefined(B.properties)&&B.properties.useAnimDuration,j=tt.get(B,"properties.dynamicToggle",-1),$=[];let H=0;const V=B.height,W=B.width;for(let q=0;q({isLoaded:k=>V.W.instance.loader.isLoaded(k,es.Image)})}),J.updateAsset(Q.name,`${q}`),J.setAlpha(W);const et=!!(null==Z?void 0:Z.animation);if(et){const k=V.W.instance.game,B=[],U=X.addComponent(cs);for(const F of Z.animation)B.push(k.cache.getTexture(Q.name,F.tileid)),U.animationData.push({frame:`${F.tileid}`,duration:$?F.duration:250});U.playAnimation()}X.addComponent(ls).rotate(z,K,Y);const st=X.addComponent(us);return it.A.isDefined(j)&&(st.hasToggleGroup=j>-1,st.groupID=j,st.isAnimated=et,st.tag=H,this._disabledToggleGroups.includes(j)&&J.setAlpha(0)),st}static getTileData(k,B){let U=k;U&=~rs.all;const F=as.getTileset(B,U);return it.A.isDefined(F)&&it.A.isDefined(U)?(U-=F.firstgid,{tileset:F,id:U,transform:k&rs.all}):null}static getTileset(k,B){for(const U of k)if(B>=U.firstgid&&B the tiles into the target game objects that are assigned.")],fs),function(k){k[k.none=0]="none",k[k.flippedVertically=1073741824]="flippedVertically",k[k.flippedHorizontally=2147483648]="flippedHorizontally",k[k.flippedDiagonally=536870912]="flippedDiagonally",k[k.all=-536870912]="all"}(bs||(bs={}));class ps{constructor(k,B){this._currentTileCount=0,this._tileIDLocations=new Map,this._nextTileID=1;const U=V.W.instance.game;this.mesh=U.add.simpleMesh({texture:U.add.texture(U.cache.getTexture(k).baseTexture)}),this.mesh.autoUpdate=!1,this.mesh.tint=B,this.mesh.shader.batchable=!1,this.mesh.drawMode=dt.DRAW_MODES.TRIANGLES,this.mesh.visible=!1}destroy(){this.mesh.destroy(),this._tileIDLocations.clear(),this._indexBuffer=null,this._vertexBuffer=null,this._uvBuffer=null}addTiles(k){return this.addTilesAtIndex(k,this._currentTileCount)}addTilesAtIndex(k,B){const U=k.length;if(this.ensureBufferSize(this._currentTileCount+U),B{k>=B&&this._tileIDLocations.set(F,this._tileIDLocations.get(F)+U)}))}const F=[];for(let G=0;Gthis._tileIDLocations.has(k))).sort(((k,B)=>this._tileIDLocations.get(k)-this._tileIDLocations.get(B))),U=B.length;let F=0;for(;Fthis._tileIDLocations.get(B)===k+U),F),G=k*ps.FLOATS_PER_TILE,j=U*ps.FLOATS_PER_TILE;this._vertexBuffer.set(this._vertexBuffer.subarray(G+j),G),this._uvBuffer.set(this._uvBuffer.subarray(G+j),G);const $=B.slice(F,F+U);this._tileIDLocations.forEach(((B,F)=>{$.indexOf(F)>-1?this._tileIDLocations.delete(F):B>k&&this._tileIDLocations.set(F,this._tileIDLocations.get(F)-U)})),F+=U}this.mesh.verticesBuffer.update(this._vertexBuffer),this.mesh.uvBuffer.update(this._uvBuffer),this.mesh.size-=U*ps.INDICES_PER_TILE,this.mesh.visible=this.mesh.size>0,this._currentTileCount-=U}addTileVertexDataAtIndex(k,B){const U=B*ps.FLOATS_PER_TILE;this._vertexBuffer.set([k.x,k.y,k.x+k.width,k.y,k.x+k.width,k.y+k.height,k.x,k.y+k.height],U);const F=this.mesh.texture;it.A.isGuid(k.tileset)||Z.V.log(`${k.tileset} needs its metadata GUID in the name property, not a string for ELA game compatibility.`,J.$.Error);const G=V.W.instance.game.cache.getTextureAtlas(k.tileset).frameData.getFrame(k.frame),j=[{u:G.x/F.width,v:G.y/F.height},{u:(G.x+G.width)/F.width,v:G.y/F.height},{u:(G.x+G.width)/F.width,v:(G.y+G.height)/F.height},{u:G.x/F.width,v:(G.y+G.height)/F.height}];0!=(k.transform&bs.flippedDiagonally)&&it.A.swapArrayIndex(j,1,3),0!=(k.transform&bs.flippedHorizontally)&&(it.A.swapArrayIndex(j,0,1),it.A.swapArrayIndex(j,2,3)),0!=(k.transform&bs.flippedVertically)&&(it.A.swapArrayIndex(j,0,3),it.A.swapArrayIndex(j,1,2)),this._uvBuffer.set([j[0].u,j[0].v,j[1].u,j[1].v,j[2].u,j[2].v,j[3].u,j[3].v],U)}ensureBufferSize(k){var B,U,F,G;const j=k*ps.FLOATS_PER_TILE;if((null!==(U=null===(B=this._vertexBuffer)||void 0===B?void 0:B.length)&&void 0!==U?U:0){k.tileMesh.destroy()})),this._meshTargets=[],this._externalTileIDs.clear()}addTiles(k){const B=this.addTilesToMeshTargets(k),U=new Array(k.length);return B.forEach(((k,B)=>{const F=this._nextTileID++;k.externalID=F,this._externalTileIDs.set(F,k),U[B]=F})),U}addHiddenTiles(k){const B=new Array(k.length);return k.forEach(((k,U)=>{this._hiddenTiles.has(k.dynamicToggleID)||this._hiddenTiles.set(k.dynamicToggleID,[]);const F=this._nextTileID++;this._hiddenTiles.get(k.dynamicToggleID).push({meshID:null,tileID:null,tileData:k,externalID:F}),B[U]=F})),B}removeTiles(k){const B=k.map((k=>this._externalTileIDs.get(k))).filter((k=>!!k)).sort(((k,B)=>k.meshID-B.meshID));let U=0;const F=B.length;for(;UB.meshID===k),U),G=this._meshTargets.find((B=>B.ID===k)),j=B.slice(U,U+F),$=j.map((k=>k.tileID));G.tileMesh.removeTiles($);const H=j.reduce(((k,B)=>{var U;const F=B.tileData.layerIndex;return k[F]=(null!==(U=k[F])&&void 0!==U?U:0)+1,k}),{}),V=Object.keys(H).map((k=>parseInt(k,10))),W=V.length;for(let B=0;B{const F=B.filter((B=>-1===k.indexOf(B.externalID)));F.length>0?this._hiddenTiles.set(U,F):this._hiddenTiles.delete(U)})),this.cleanMeshInstances()}setToggleLayerVisibility(k,B){if(B){if(this._hiddenTiles.has(k)){const B=this._hiddenTiles.get(k),U=this.addTilesToMeshTargets(B.map((k=>k.tileData)));B.forEach(((k,B)=>{const F=U[B];F.externalID=k.externalID,this._externalTileIDs.set(k.externalID,F)})),this._hiddenTiles.delete(k)}}else{const B=Array.from(this._externalTileIDs.values()).filter((B=>B.tileData.dynamicToggleID===k));this._hiddenTiles.set(k,B),this.removeTiles(B.map((k=>k.externalID)))}}addTilesToMeshTargets(k){var B;const U=k.slice().sort(((k,B)=>k.tileset!==B.tileset?k.tileset.localeCompare(B.tileset):k.layerIndex-B.layerIndex)),F=[];U.forEach((k=>{const B={0:k.tileset,1:k.tint},U=k.layerIndex;-1===F.findIndex((k=>this.isConfigurationEqual(k,B)&&k.layer===U))&&F.push(Object.assign(Object.assign({},B),{layer:U}))})),F.forEach((k=>{this.createMeshTarget(k,k.layer)}));let G=0;const j=U.length,$=[];for(;Gk.tileset===F&&k.tint===j&&k.layerIndex===H),G),W=this.getMeshTarget({0:F,1:j},H),q=U.slice(G,G+V),K=W.tileMesh.addTilesAtIndex(q,this.getTileOffsetForLayer(W,H)).map(((k,B)=>({tileID:k,meshID:W.ID,tileData:q[B],externalID:null})));W.layerTileCount[H]=(null!==(B=W.layerTileCount[H])&&void 0!==B?B:0)+V,$.push(...K),G+=V}const H=new Array($.length);return $.forEach((B=>{H[k.indexOf(B.tileData)]=B})),H}hasMeshTarget(k,B){return this._meshTargets.findIndex((U=>this.isConfigurationEqual(k,U.config)&&U.layerRange.min<=B&&U.layerRange.max>=B))>-1}createMeshTarget(k,B){if(this.hasMeshTarget(k,B))return;const U=this._meshTargets.filter((B=>this.isConfigurationEqual(B.config,k))),F=[null,null];if(U.forEach((k=>{k.layerRange.maxk.layerRange.max?F[0]:k:F[1]=F[1]&&F[1].layerRange.mink.layerRange.min!==k.layerRange.max));U.length>0&&U.forEach((k=>{this.splitMeshAtLayer(k,B)})),this.createTileMeshTarget(k,B,B)}}getMeshTarget(k,B){return this._meshTargets.find((U=>this.isConfigurationEqual(k,U.config)&&U.layerRange.min<=B&&U.layerRange.max>=B))}getTargetsBetweenLayers(k,B){return this._meshTargets.filter((U=>U.layerRange.min>k&&U.layerRange.mink&&U.layerRange.maxB))}splitMeshAtLayer(k,B){const U=k.layerRange.max;k.layerRange.max=B;const F=this.createTileMeshTarget(k.config,B+1,U),G=Object.keys(k.layerTileCount).map((k=>parseInt(k,10))).filter((k=>k>B)),j=G.length;for(let $=0;$=this._meshTargets[V].layerRange.max&&U<=(null!==(G=null===(F=this._meshTargets[V+1])||void 0===F?void 0:F.layerRange.min)&&void 0!==G?G:Number.POSITIVE_INFINITY)&&(H=V+1);return this.meshContainer.addChildAt(j.tileMesh.mesh,H),this._meshTargets.splice(H,0,j),j}getTileOffsetForLayer(k,B){const U=Object.keys(k.layerTileCount).map((k=>parseInt(k,10)));let F=0;const G=U.length;for(let j=0;j0;--k){Object.values(this._meshTargets[k].layerTileCount).reduce(((k,B)=>k+B),0)<=0&&(this._meshTargets[k].tileMesh.destroy(),this._meshTargets.splice(k,1))}for(let k=this._meshTargets.length-1;k>0;--k){const B=this._meshTargets[k-1],U=this._meshTargets[k];if(this.isConfigurationEqual(U.config,B.config)){const F=Object.keys(U.layerTileCount).map((k=>parseInt(k,10))),G=F.length;for(let k=0;kB.meshID===k.ID&&B.tileData.layerIndex===U)),j=B.tileMesh.addTilesAtIndex(G.map((k=>k.tileData)),this.getTileOffsetForLayer(B,U));k.tileMesh.removeTiles(G.map((k=>k.tileID))),B.layerTileCount[U]=(null!==(F=B.layerTileCount[U])&&void 0!==F?F:0)+G.length,k.layerTileCount[U]=0,G.forEach(((k,U)=>{k.meshID=B.ID,k.tileID=j[U]}))}isConfigurationEqual(k,B){for(let U=0;U<2;++U)if(k[U]!==B[U])return!1;return!0}}class gs{constructor(){this._toggleLayerVisibility={},this._tileMultiMesh=new vs}destroy(){this._tileMultiMesh.destroy()}clear(){this._tileMultiMesh.clear()}setParentContainer(k){k.addChild(this._tileMultiMesh.meshContainer)}addTilesToBatch(k){const B=[],U=[];k.forEach((k=>{var F;null===(F=this._toggleLayerVisibility[k.dynamicToggleID])||void 0===F||F?B.push(k):U.push(k)}));const F=this._tileMultiMesh.addTiles(B),G=this._tileMultiMesh.addHiddenTiles(U),j=new Array(k.length);return F.forEach(((U,F)=>{j[k.indexOf(B[F])]=U})),G.forEach(((B,F)=>{j[k.indexOf(U[F])]=B})),j}removeTilesFromBatch(k){this._tileMultiMesh.removeTiles(k)}setToggleLayerVisibility(k,B){this._toggleLayerVisibility[k]=B,this._tileMultiMesh.setToggleLayerVisibility(k,B)}}class ms{constructor(k,B){this._batchedTiles=new Map,this._nextTileID=1,this._toggleLayerVisibility={},this._renderOffset=k,this._renderTextureDimensions=B}destroy(){this.resetRenderTexture(),this._batchedTiles.clear()}clear(){this.resetRenderTexture(),this._renderTextureSprite=null,this._currentRenderTexture=null,this._toggleLayerVisibility={},this._batchedTiles.clear()}setParentContainer(k){this._parentContainer=k,this._renderTextureSprite&&this._parentContainer.addChild(this._renderTextureSprite)}addTilesToBatch(k){const B=this.createIDsForBatchedTiles(k);return this.redrawTileBatch(),B}removeTilesFromBatch(k){const B=k.length;for(let U=0;Uk.layerIndex!==B.layerIndex?k.layerIndex-B.layerIndex:k.tileset!==B.tileset?k.tileset.localeCompare(B.tileset):k.frame!==B.frame?k.frame-B.frame:k.tint!==B.tint?k.tint-B.tint:k.transform-B.transform)),$=null!==(k=V.W.instance.game.renderer)&&void 0!==k?k:dt.autoDetectRenderer(),H=V.W.instance.game.cache;null===(B=this._renderTextureSprite)||void 0===B||B.destroy(),null===(U=this._currentRenderTexture)||void 0===U||U.destroy(!0),this._currentRenderTexture=dt.RenderTexture.create(this._renderTextureDimensions);const W=new dt.Sprite,q=new dt.Matrix,K=new dt.Matrix;let z=bs.none;const Y=j.length;for(let V=0;V{k.destroy()})),this._gridRenderers=[],this._currentTileData=[]}setParentContainer(k){this._parentContainer=k;const B=this._gridRenderers.length;for(let U=0;U0){const B={width:k[0].width,height:k[0].height},U=this.getRenderTextureDimensions(B),F=this.getTileDrawData(k.concat(this._currentTileData.map((k=>k.sourceTileData)))),G={width:Math.ceil(F.size.width/U.width),height:Math.ceil(F.size.height/U.height)};this.updateRendererBufferForGrid(F.offset,G,U);const j=this.renderTiles(k,U,G);return this.updateTextureGridPositions(U,G),j.map((k=>k.externalID))}return[]}removeTilesFromBatch(k){const B=[];k.forEach((k=>{const U=this._currentTileData.find((B=>B.externalID===k));U&&B.push(U)}));const U=this._gridRenderers.length;for(let F=0;Fk.rendererIndex===F));k.length>0&&this._gridRenderers[F].removeTilesFromBatch(k.map((k=>k.internalID)))}this._currentTileData=this._currentTileData.filter((k=>-1===B.indexOf(k)))}clear(){this._gridRenderers.forEach((k=>{k.destroy()})),this._gridRenderers=[],this._textureGridSize={width:0,height:0},this._currentTileData=[]}setToggleLayerVisibility(k,B){this._toggleLayerVisibility[k]=B,this._gridRenderers.forEach((U=>{U.setToggleLayerVisibility(k,B)})),this.updateTextureGridPositions(this._renderTextureDimensions,this._textureGridSize)}getGridSprites(){return this._gridRenderers.map((k=>k.getTextureSprite()))}getRenderTextureDimensions(k){return{width:Math.floor(ys.MAX_RENDER_TEXTURE_SIZE/k.width)*k.width,height:Math.floor(ys.MAX_RENDER_TEXTURE_SIZE/k.height)*k.height}}getTileDrawData(k){const B=k[0];let U=B.x,F=B.y,G=B.x+B.width,j=B.y+B.height;const $=k.length;for(let H=0;H<$;++H){const B=k[H];U=Math.min(U,B.x),F=Math.min(F,B.y),G=Math.max(G,B.x+B.width),j=Math.max(j,B.y+B.height)}return{size:{width:G-U,height:j-F},offset:{x:U,y:F}}}updateRendererBufferForGrid(k,B,U){if(this._textureGridSize.width!==B.width||this._textureGridSize.height!==B.height||k.x!==this._renderTextureOffset.x||k.y!==this._renderTextureOffset.y){const F=B.width*B.height-this._gridRenderers.length,G=this._gridRenderers.length;if(F<0){for(let k=0;kparseInt(k,10))).filter((k=>!this._toggleLayerVisibility[k]));this._gridRenderers.forEach((k=>{j.forEach((B=>{k.setToggleLayerVisibility(B,!1)}))})),this._textureGridSize=B,this._renderTextureDimensions=U,this._renderTextureOffset=k;const $=this._currentTileData.splice(0);this._currentTileData=[];const H=this.renderTiles($.map((k=>k.sourceTileData)),U,B),V=this._currentTileData.length;for(let k=0;kB.sourceTileData===H[k].sourceTileData)).externalID}}renderTiles(k,B,U){const F=[],G=this._gridRenderers.length;for(let H=0;H0){const B=this._gridRenderers[H].addTilesToBatch(k.map((k=>Object.assign(Object.assign({},k.sourceTileData),{x:k.tilePosition.x,y:k.tilePosition.y})))),U=B.length;for(let F=0;F{k.destroy()})),this._pooledTiles=[],this._tileBatch.forEach((k=>{k.sprite.destroy()})),this._tileBatch=[]}setParentContainer(k){this._parentContainer=k;const B=this._tileBatch.length;for(let U=0;UB.id===k[U])),F=this._tileBatch[B],G=F.sprite;G.visible=!1,--this._layerTileCount[F.layer],this._parentContainer.removeChildAt(this._parentContainer.getChildIndex(G)),this._pooledTiles.push(G),this._tileBatch.splice(B,1)}}clear(){this._tileBatch.forEach((k=>{k.sprite.visible=!1,this._pooledTiles.push(k.sprite)})),this._tileBatch=[],this._layerTileCount={}}setToggleLayerVisibility(k,B){-1!==k&&(this._toggleLayerVisibility[k]=B,this._tileBatch.forEach((U=>{U.toggleLayerID===k&&(U.sprite.visible=B)})))}getCanvasTile(){return 0===this._pooledTiles.length&&this.addTilesToPool(Math.ceil(this._tileBatch.length*_s.POOL_GROW_RATIO)),this._pooledTiles.pop()}addTilesToPool(k){for(let B=0;Bk.name===B));if(U)return U.value}}return U}}class ws{constructor(k){this.setMapData(k)}getSize(){return this.getLayerDimensions(this.getActiveLayers())}getLayers(){return this._mapJSON.layers}getActiveLayers(){return this.filterActiveLayers(this._mapJSON.layers)}getTileDimensions(){var k,B;return{width:null!==(k=this._mapJSON.tilewidth)&&void 0!==k?k:ws.DEFAULT_TILE_SIZE,height:null!==(B=this._mapJSON.tileheight)&&void 0!==B?B:ws.DEFAULT_TILE_SIZE}}getMapDimensions(){var k,B;return{width:null!==(k=this._mapJSON.width)&&void 0!==k?k:0,height:null!==(B=this._mapJSON.height)&&void 0!==B?B:0}}getTilesetNames(){var k,B;return null!==(B=null===(k=this._mapJSON.tilesets)||void 0===k?void 0:k.map((k=>k.name)))&&void 0!==B?B:[]}getTilesets(){return this._mapJSON.tilesets}getTileData(k){let B=k;B&=~bs.all;const U=this.getTilesetForTile(B);return U?(B-=U.firstgid,{tileset:U,id:B,transform:k&bs.all}):null}getTileRenderDataForGrid(k,B){var U,F;if(k<0||B<0||k>this._mapJSON.width||B>this._mapJSON.height)return[];const G=[],j=this._renderableLayers.length;for(let $=0;$=k.firstgid&&B{if(B.layers){const U=this.filterActiveLayers(B.layers);U.length>0&&k.push(Object.assign(Object.assign({},B),{layers:U}))}else this.isLayerActive(B)&&k.push(B);return k}),[])}isLayerActive(k){return k.visible&&k.data&&k.width>0&&k.height>0&&!Es.readPropertyValue(k.properties,"reference")}parseRenderableLayers(k){var B;const U=[],F=null!==(B=null==k?void 0:k.length)&&void 0!==B?B:0;for(let G=0;G{this._mapDataArray.push(k),this._mapDataFiles.set(V,k),B.push(fs.loadTilesets(k))})));yield Promise.all(k),yield Promise.all(B);const U=[],F={firstgid:1,name:`tileset-${it.A.generateGUID()}`,tilecount:0,tiles:U},G=new Map,j=[],$=(k,B)=>{if(k&&k.id>=0){const U=k.id,$=`${k.tileset.name}#${U}`;let H=G.get($);return it.A.isDefined(H)||(G.set($,H=j.length),j.push(k),++F.tilecount),B?H+1|k.transform:H}return B?0:-1};for(const V of this._mapDataArray){for(let B=0;B=0;--B){const U=fs.getTileData(k.data[B],V.tilesets);k.data[B]=$(U,!0)}if(k.objects)for(let B=k.objects.length-1;B>=0;--B){const U=k.objects[B],F=fs.getTileData(U.gid,V.tilesets);U.gid=$(F,!0),U.x=Math.floor(U.x),U.y=Math.floor(U.y)}}}const k=(k,B,F)=>{const G={animation:[]};if(it.A.isDefined(k)){const B={tileset:F,id:k,transform:rs.none};G.id=$(B,!1)}for(const U of B){const k={tileset:F,id:U.tileid,transform:rs.none};G.animation.push({duration:U.duration,tileid:$(k,!1)})}U.push(G)};for(const B of V.tilesets)if(B.tiles)if(Array.isArray(B.tiles))for(const U of B.tiles)U.animation&&k(U.id,U.animation,B);else for(const U in B.tiles){const F=B.tiles[U];F.animation&&k(Number(U),F.animation,B)}V.tilesets=[F]}const H=Math.floor(Math.sqrt(j.length)),W=Math.ceil(j.length/H),q=H*(fs.TILE_SIZE+2)+1,K=W*(fs.TILE_SIZE+2)+1,z=V.W.instance.game.add.renderTexture(q,K,F.name,!0);yield Promise.all(B);const Y=V.W.instance.game.cache.cacheMap.get(Ts.r.RENDER_TEXTURE).get(F.name);(V.W.instance.game.renderer.type===dt.RENDERER_TYPE.WEBGL?this.renderWebGl:this.renderCanvas)(j,H,z,Y),this._enableDebugDrawCombinerAtlas&&this.renderDebugText(j,H,z);const Q=V.W.instance.loader;return Q.assignAssetData(F.name,{type:"tileset",key:F.name,w:fs.TILE_SIZE,h:fs.TILE_SIZE,forceExtruded:!0}),yield Q.loadAssets([F.name]),F.name}))}renderWebGl(k,B,U,F){const G={};k.forEach(((k,U)=>{var F;const j=k.tileset.name,$=`${k.id}`;(null!==(F=G[j])&&void 0!==F?F:G[j]=[]).push({id:$,newId:U,x:U%B*(fs.TILE_SIZE+2)+1,y:Math.floor(U/B)*(fs.TILE_SIZE+2)+1})}));const j=V.W.instance.game.cache,$=new dt.SimpleMesh(void 0,void 0,void 0,void 0,dt.DRAW_MODES.TRIANGLE_STRIP);for(const H of Object.keys(G)){const k=G[H],B=new dt.Texture(j.getTexture(H).baseTexture);$.texture=B;const V=new Float32Array(4*k.length*2),W=new Float32Array(4*k.length*2),q=new Uint16Array(6*k.length-1);let K=-1;for(let U=0;U0&&(q[++K]=Z),q[++K]=Z,q[++K]=Z+1,q[++K]=Z+2,q[++K]=Z+3,q[++K]=Z+3,F.frameData.addFrame(new Ss.w(G.newId,G.x,G.y,fs.TILE_SIZE,fs.TILE_SIZE,G.newId.toString()))}$.geometry.getIndex().update(q),$.verticesBuffer.update(V),$.uvBuffer.update(W),$.size=K,Wt.C.renderRawXY(U,$,0,0,!1)}}renderCanvas(k,B,U,F){const G=V.W.instance.game.add.sprite(0,0,"");G.parent=null;const j=k.length;for(let $=0;${this.onMapLoaded.dispatch()})),this._mapLoader.loadMap(this.mapID,this.map,this.content,this.background,this.foreground)}destroy(){this.onMapLoaded.dispose(),super.destroy()}};(0,j.Cg)([(0,q.W_)(),(0,W.B)(),(0,j.Sn)("design:type",String)],Cs.prototype,"mapID",void 0),(0,j.Cg)([(0,q.Mn)(fs),(0,j.Sn)("design:type",fs)],Cs.prototype,"_mapLoader",void 0),(0,j.Cg)([(0,q.ER)(),(0,j.Sn)("design:type",Te._)],Cs.prototype,"map",void 0),(0,j.Cg)([(0,q.ER)(),(0,j.Sn)("design:type",Te._)],Cs.prototype,"background",void 0),(0,j.Cg)([(0,q.ER)(),(0,j.Sn)("design:type",Te._)],Cs.prototype,"foreground",void 0),(0,j.Cg)([(0,q.ER)(),(0,j.Sn)("design:type",Te._)],Cs.prototype,"content",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Cs.prototype,"_loadOnCreate",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Cs.prototype,"_animateInEditor",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Cs.prototype,"onMapLoaded",void 0),Cs=(0,j.Cg)([(0,H.EV)("TileMapLoader",void 0,"Loads a tilemap onto serialized GameObject layers")],Cs);let Os=class extends Pt.y{create(){super.create(),this._mapContainer=V.W.instance.game.add.container(),this._mapContainer.interactiveChildren=!1,this.setRootContainer(this._mapContainer),this._tileBatchRenderMode=Es.getBestBatchRenderMode(),this._tileBatchRenderMode.setParentContainer(this._mapContainer);const k=V.W.instance.game.cache.getJSON(this._tiledMapAsset);if(k){const B=new ws(k);this._tileBatchRenderMode.addTilesToBatch(B.getMapTilesRenderData())}}destroy(){this._mapContainer.destroy(),super.destroy()}};(0,j.Cg)([(0,q.i0)(Bi.Z.TiledMap),(0,j.Sn)("design:type",String)],Os.prototype,"_tiledMapAsset",void 0),Os=(0,j.Cg)([(0,H.EV)("TiledMap",H.YH.tiled)],Os);let Is=class extends Pt.y{constructor(){super(...arguments),this._tileBorderBuffer=3,this._tileLoadedLeft=-1/0,this._tileLoadedTop=-1/0,this._mapSize=new bt.o,this._cachedWorldScale={x:1,y:1}}create(){if(super.create(),this._mapContainer=V.W.instance.game.add.container(),this._mapContainer.interactiveChildren=!1,this.setRootContainer(this._mapContainer),this._tileBatchRenderer=Es.getBestBatchRenderMode(),this._tileBatchRenderer.setParentContainer(this._mapContainer),this.tiledMap){const k=V.W.instance.game.cache.getJSON(this.tiledMap);k&&this.setMapData(new ws(k))}}destroy(){this._mapContainer.destroy(),this._mapContainer=null,this._tileBatchRenderer.destroy(),this._tileBatchRenderer=null,super.destroy()}update(){if(super.update(),this._mapData){const k=this.GameObject.transform.worldScale;this._cachedWorldScale.x===k.x&&this._cachedWorldScale.y===k.y||this.setStreamingDimensions(lt.i.main.viewportSize),this.setStreamingCenter(lt.i.main.GameObject.transform.worldPosition)}}setStreamingDimensions(k){this._cachedWorldScale=Object.assign({},this.GameObject.transform.worldScale);const B={width:k.width/this._cachedWorldScale.x,height:k.height/this._cachedWorldScale.y},U=2*this._tileBorderBuffer;this._streamingDimensions=B,this._gridWidth=Math.floor(B.width/this._tileDimensions.width)+U,this._gridHeight=Math.floor(B.height/this._tileDimensions.height)+U,this._tileBatchRenderer.clear(),this._tileLoadedLeft=Number.NEGATIVE_INFINITY,this._tileLoadedTop=Number.NEGATIVE_INFINITY,this._renderedTiles=new Array(this._gridWidth);for(let F=0;F0&&(U.push(...B),this._renderedTiles[F][k]=[])}}}if(0!==B){const G=this._gridWidth-F,j=k<0?0:F;for(let k=0;k0&&(U.push(...j),this._renderedTiles[F][B]=[])}}}if(U.length>0&&this._tileBatchRenderer.removeTilesFromBatch(U),0!==k&&(k<0?this._renderedTiles.unshift(...this._renderedTiles.splice(this._renderedTiles.length+k)):this._renderedTiles.push(...this._renderedTiles.splice(0,k))),0!==B)for(let k=0;k0?this._gridWidth-k:0;for(let k=0;k<$;++k){const U=B+k;for(let k=0;k0&&(j.push(...B),G.push({indexX:U,indexY:k,count:B.length}))}}}if(0!==B){const U=this._gridWidth-Math.abs(k),F=k>0?0:$;for(let k=0;k0?this._gridHeight-B:0,H=Math.abs(B);for(let k=0;k0&&(j.push(...F),G.push({indexX:U,indexY:B,count:F.length}))}}}if(j.length>0){const k=[...this._tileBatchRenderer.addTilesToBatch(j)];for(;G.length>0;){const B=G.shift();this._renderedTiles[B.indexX][B.indexY]=k.splice(0,B.count)}}}}getDimensions(){return this._mapSize}setMapData(k){this._mapData=k,this._tileDimensions=k.getTileDimensions(),this._tileBatchRenderer.clear();const B=k.getTileDimensions(),U=k.getMapDimensions();this._mapSize.setTo(B.width*U.width,B.height*U.height),this.setStreamingDimensions(lt.i.main.viewportSize)}};(0,j.Cg)([(0,q.i0)(Bi.Z.TiledMap),(0,j.Sn)("design:type",String)],Is.prototype,"tiledMap",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Is.prototype,"_tileBorderBuffer",void 0),Is=(0,j.Cg)([(0,H.EV)("StreamedTiledMapEla",H.YH.tiled)],Is);let Ds=class extends Pt.y{constructor(){super(...arguments),this._width=100,this._height=100}getDimensions(){return new bt.o(this._width,this._height)}};(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Ds.prototype,"_width",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Ds.prototype,"_height",void 0),Ds=(0,j.Cg)([(0,H.EV)("BoundsExpander","Map","An empty RenderComponent that will cause the export bounds to grow")],Ds);let Rs=class extends $.u{constructor(){super(...arguments),this._cameraCollisions=null}create(){super.create(),this._cameraCollisions=V.W.instance.game.cameraCollisions,this._cameraCollisions.addCollider(this)}destroy(){this._cameraCollisions.removeCollider(this),super.destroy()}getBounds(){return this.rectTransform.getBounds()}};var Ps;(0,j.Cg)([(0,Vt.Pq)(ft.X),(0,j.Sn)("design:type",ft.X)],Rs.prototype,"rectTransform",void 0),Rs=(0,j.Cg)([(0,H.EV)("CameraCollider",H.YH.map,"Prevents the LoadAreaCameraFollowController from viewing an area")],Rs),function(k){k.AwaitMapCombiner="AwaitMapCombiner",k.Localization="Localization",k.MainPlayerGameObject="MainPlayerGameObject",k.PopupHandler="PopupHandler",k.PlayerPathfinder="PlayerPathfinder",k.StreamedMap="StreamedMap",k.StreamedMapEla="StreamedMapEla",k.GameObjectReference="GameObjectReference",k.GameObjectBounds="GameObjectBounds",k.InitDataPlayFsm="InitData-playFSM",k.InitDataSpawnLocationName="InitData-spawnLocationName",k.InitDataSpawnPosition="InitData-spawnPosition",k.InitDataSpawnFacingDirection="InitData-spawnFacingDirection"}(Ps||(Ps={}));let Ms=class extends $.u{create(){super.create();{const k=lt.i.main;this._cameraTransform=k.GameObject.transform,this._cameraTransform.onWorldMatrixChanged.add(this.cull,this),this.cull()}}destroy(){this._cameraTransform.onWorldMatrixChanged.remove(this.cull,this),super.destroy()}cull(){const k=this._bounds;if(k){const B=lt.i.main,U=B.viewportSize.getHalfWidth(),F=B.viewportSize.getHalfHeight(),G=this._cameraTransform.worldPosition;this.gameObject.active=k.leftG.x-U&&k.topG.y-F}}};(0,j.Cg)([Ai(Ps.GameObjectBounds),(0,j.Sn)("design:type",Object)],Ms.prototype,"_bounds",void 0),Ms=(0,j.Cg)([(0,H.EV)("CameraCulling",H.YH.map,"Deactivates the attached game object when offscreen")],Ms);let Ns=class extends $.u{constructor(){super(...arguments),this.onOffsetChanged=new Mt.H,this._cameraCollisions=null,this.maxCameraMovePerMs=1/0,this._offset={x:0,y:0},this.target=null,this._cameraSpeedVector=new pt.I}set offset(k){this._offset=k,this.onOffsetChanged.dispatch()}get offset(){return this._offset}create(){if(super.create(),this._cameraCollisions=V.W.instance.game.cameraCollisions,this.target){st.w.getActiveScene().onPostUpdate.add(this);{const k=this.target.transform.worldPosition;lt.i.main.GameObject.transform.worldPosition=k}}}destroy(){this.target&&(st.w.getActiveScene().onPostUpdate.remove(this),this.target=null),this._cameraCollisions=null,this.onOffsetChanged.dispose(),super.destroy()}postUpdate(){const k=lt.i.main.GameObject.transform,B=this.target.transform,U={x:B.worldPosition.x+this._offset.x,y:B.worldPosition.y+this._offset.y};if(this.IsActiveInHierarchy){const F=new pt.I(k.worldPosition.x,k.worldPosition.y);if(U.x/=B.worldScale.x,U.y/=B.worldScale.y,this._cameraCollisions)for(const k of this._cameraCollisions.cameraColliders){const B=k.bounds.left-U.x,F=k.bounds.right-U.x,G=k.bounds.top-U.y,j=k.bounds.bottom-U.y,$=B<0&&F>0?-B0?-Gj*j&&(G.normalize(),this._cameraSpeedVector.set(j,j),G.multiply(this._cameraSpeedVector),U.x=F.x+G.x,U.y=F.y+G.y),k.worldPosition={x:Math.round(U.x),y:Math.round(U.y)}}}};(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Ns.prototype,"maxCameraMovePerMs",void 0),(0,j.Cg)([(0,q.vC)(),(0,j.Sn)("design:type",Object)],Ns.prototype,"_offset",void 0),(0,j.Cg)([(0,q.ER)(),(0,j.Sn)("design:type",Te._)],Ns.prototype,"target",void 0),Ns=(0,j.Cg)([(0,H.EV)("CameraFollowController",H.YH.map,"Simplified camera follow controller that follows a target within bounds without
    requiring a streamed map or camera collider components")],Ns);var xs,Ls=U(55366),ks=U(42979),Bs=U(49769);class Us extends Ke{constructor(){super(...arguments),this.injectionName=null,this.type=null,this.required=null,this.injectionLinks=[]}get InjectionName(){return this.injectionName}set InjectionName(k){this.injectionName=k}get Type(){return this.type}set Type(k){this.type=k}get Required(){return this.required}set Required(k){this.required=k}get InjectionLinks(){return this.injectionLinks}set InjectionLinks(k){this.injectionLinks=k}}class Fs extends Ke{constructor(){super(...arguments),this.propertyName=null,this.componentGUID=null}get PropertyName(){return this.propertyName}set PropertyName(k){this.propertyName=k}get ComponentGUID(){return this.componentGUID}set ComponentGUID(k){this.componentGUID=k}}class Gs extends Ke{constructor(){super(...arguments),this.guid=null,this.type=null,this.properties={}}get GUID(){return this.guid}set GUID(k){this.guid=k}get Type(){return this.type}set Type(k){this.type=k}get Properties(){return this.properties}set Properties(k){this.properties=k}}class js extends Ke{constructor(){super(...arguments),this.guid=null,this.tuid=null,this.properties={}}get GUID(){return this.guid}set GUID(k){this.guid=k}get TUID(){return this.tuid}set TUID(k){this.tuid=k}get Properties(){return this.properties}set Properties(k){this.properties=k}}class $s extends Ke{constructor(){super(...arguments),this.name=null,this.layer=null,this.guid=null,this.components=[],this.children=[],this.active=null,this.injections=[]}get Name(){return this.name}set Name(k){this.name=k}get Layer(){return this.layer}set Layer(k){this.layer=k}get GUID(){return this.guid}set GUID(k){this.guid=k}get Components(){return this.components}set Components(k){this.components=k}get Children(){return this.children}set Children(k){this.children=k}get Active(){return this.active}set Active(k){this.active=k}get Injections(){return this.injections}set Injections(k){this.injections=k}}class Hs extends $s{constructor(){super(...arguments),this.tuid=null}get TUID(){return this.tuid}set TUID(k){this.tuid=k}}class Vs extends $s{constructor(){super(...arguments),this.template=null,this.templateKey=null}}let Ws=xs=class extends qe{deserialize(k){return xs.deserializePrefab(k)}serialize(k){return xs.serializePrefab(k)}static deserializePrefab(k){let B=null;if(xs.isPrefabSchemaTemplate(k)){const U=new Vs;U.template=k.template,U.templateKey=k.templateKey,B=U}else if(xs.isPrefabSchemaOverride(k)){const U=new Hs;U.TUID=k.tuid,B=U}else B=new $s;return B.Name=k.name,B.Layer=k.layer,B.Active=k.active,B.GUID=k.guid,B.Components=qe.deserializeCollection(k.components,xs.deserializeComponent),B.Children=qe.deserializeCollection(k.children,xs.deserializePrefab),B.Injections=qe.deserializeCollection(k.injections,xs.deserializeInjection),B}static serializePrefab(k){return xs.isPrefabDataTemplate(k)?{name:k.Name,layer:k.Layer,guid:k.GUID,template:k.template,components:qe.serializeCollection(k.Components,xs.serializeComponent),children:qe.serializeCollection(k.Children,xs.prototype.serialize)}:xs.isPrefabDataOverride(k)?{name:k.Name,layer:k.Layer,guid:k.GUID,tuid:k.TUID,components:qe.serializeCollection(k.Components,xs.serializeComponent),children:qe.serializeCollection(k.Children,xs.prototype.serialize)}:{name:k.Name,layer:k.Layer,guid:k.GUID,components:qe.serializeCollection(k.Components,xs.serializeComponent),children:qe.serializeCollection(k.Children,xs.prototype.serialize)}}static restoreArrayObjects(k){return(null==k?void 0:k.properties)?(Object.keys(k.properties).forEach((B=>{if(!Array.isArray(k.properties[B]))return;const U=k.properties[B];if(0===U.length||"object"!=typeof U[0])return;const F=U;F.forEach(((k,B)=>{if((null==k?void 0:k.__type)&&Bs.oD[null==k?void 0:k.__type]){const U=new Bs.oD[k.__type];Object.keys(k).forEach((B=>{U[B]=k[B]})),F[B]=U}})),k.properties[B]=F})),k.properties):null}static deserializeComponent(k){if(k&&(k.properties=xs.restoreArrayObjects(k)),xs.isComponentSchemaOverride(k)){const B=new js;return B.GUID=k.guid,B.TUID=k.tuid,B.Properties=k.properties,B}if(k){const B=new Gs;return B.GUID=k.guid,B.Type=k.type,B.Properties=k.properties,B}}static serializeComponent(k){return xs.isComponentDataOverride(k)?{guid:k.GUID,tuid:k.TUID,properties:k.Properties}:{guid:k.GUID,type:k.Type,properties:k.Properties}}static deserializeInjectionLink(k){const B=new Fs;return B.ComponentGUID=k.componentGuid,B.PropertyName=k.propertyName,B}static deserializeInjection(k){const B=new Us;return B.InjectionName=k.injectionName,B.Type=k.type,B.Required=k.required,B.InjectionLinks=qe.deserializeCollection(k.injectionLinks,xs.deserializeInjectionLink),B}static isPrefabSchemaTemplate(k){return k.hasOwnProperty("template")||k.hasOwnProperty("templateKey")}static isPrefabDataTemplate(k){return k instanceof Vs}static isPrefabSchemaOverride(k){return null==k?void 0:k.hasOwnProperty("tuid")}static isPrefabDataOverride(k){return k instanceof Hs}static isComponentSchemaOverride(k){return k&&k.hasOwnProperty("tuid")}static isComponentDataOverride(k){return k instanceof js}};Ws=xs=(0,j.Cg)([(0,Ge.injectable)()],Ws);let qs=class extends $.u{constructor(){super(...arguments),this.points=[{x:0,y:0},{x:100,y:0},{x:100,y:100},{x:0,y:100}]}};(0,j.Cg)([(0,q.vC)(),(0,j.Sn)("design:type",Array)],qs.prototype,"points",void 0),qs=(0,j.Cg)([(0,H.EV)("ColliderPolygon",H.YH.map,"A polygon defining a non-walkable area")],qs);let Ks=class extends $.u{constructor(){super(...arguments),this.points=[{x:0,y:0},{x:100,y:0},{x:100,y:100},{x:0,y:100}]}};(0,j.Cg)([(0,q.vC)(),(0,j.Sn)("design:type",Array)],Ks.prototype,"points",void 0),Ks=(0,j.Cg)([(0,H.EV)("NavMeshPolygon",H.YH.map,"A navigation mesh polygon that the player can walk on")],Ks);class zs{get isLoaded(){return this._loaded}constructor(k){this._gameObjects=[],this._loaded=!1,this.names=k}addGameObject(k){return(0,j.sH)(this,void 0,void 0,(function*(){return this._gameObjects.push(k),this._loaded?k.addReference().catch((k=>{Z.V.log(`ConditionGroup: Error in addGameObject. The error is ${k.message} and stack trace is: ${k.stack}`,J.$.Error)})):null}))}removeGameObject(k){const B=this._gameObjects.indexOf(k);return!!(B>=0&&(this._gameObjects.splice(B,1),this._loaded))&&(k.removeReference(),!0)}getGameObjects(){return this._gameObjects}getGameObjectComponents(k){let B=[];return this._loaded&&this._gameObjects.forEach((U=>{const F=U.getGameObject();F&&(B=B.concat(F.findComponentsInChildren(k)))})),B}isActive(k){return this.names.every((B=>k.isConditionActive(B)))}loadIfActive(k){return(0,j.sH)(this,void 0,void 0,(function*(){this.isActive(k)?(this._loaded=!0,yield Promise.all(this._gameObjects.map((k=>(0,j.sH)(this,void 0,void 0,(function*(){return k.addReference()})))))):this._loaded&&this.unload()}))}unload(){this._loaded&&(this._gameObjects.forEach((k=>{k.removeReference()})),this._loaded=!1)}}class Ys{constructor(k,B){this.onBlockChanged=new Mt.H,this._conditionGroups=[],this._map=k,this._bounds=B}destroy(){this.unloadAssets(),this.onBlockChanged.dispose()}loadAssets(){return(0,j.sH)(this,void 0,void 0,(function*(){return it.A.isDefined(this._currentLoadingPromise)?this._currentLoadingPromise:this._currentLoadingPromise=Promise.all(this._conditionGroups.map((k=>(0,j.sH)(this,void 0,void 0,(function*(){return k.loadIfActive(this._map)}))))).then((()=>{this._currentLoadingPromise=null}))}))}unloadAssets(){for(const k of this._conditionGroups)k.unload()}addGameObject(k,B=[]){let U=!1;for(const F of this._conditionGroups)if(it.A.equalArrayContents(F.names,B)){F.addGameObject(k).catch((()=>{Z.V.log("Error while adding game object reference",J.$.Error)})),U=!0;break}if(!U){const U=new zs(B);U.addGameObject(k).catch((()=>{Z.V.log("Error while adding game object reference",J.$.Error)})),this._conditionGroups.push(U)}}removeGameObject(k){let B=!1;for(const U of this._conditionGroups)U.removeGameObject(k)&&(B=!0)}getGameObjectComponents(k){let B=[];return this._conditionGroups.forEach((U=>{U.isActive(this._map)&&(B=B.concat(U.getGameObjectComponents(k)))})),B}setConditionGroupActive(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){it.A.isDefined(this._currentLoadingPromise)&&(yield this._currentLoadingPromise);const U=this._conditionGroups.filter((B=>B.names.indexOf(k)>=0));if(U.length<=0)return!1;if(B)yield this._currentLoadingPromise=Promise.all(U.map((k=>(0,j.sH)(this,void 0,void 0,(function*(){return k.loadIfActive(this._map)}))))),this._currentLoadingPromise=null;else for(const k of U)k.unload();return!0}))}getBounds(){return this._bounds}}class Qs extends Ys{constructor(k,B){super(k,B),this._navmeshDirty=!1,this._constructNavmeshPromise=null,this._polyListeners=new Set}containsPoint(k){return k.x>this._bounds.left&&k.xthis._bounds.top&&k.y{Z.V.log("Error while adding game object reference",J.$.Error)})),U=!0;break}if(!U){const U=new zs(B);U.addGameObject(k).catch((()=>{Z.V.log("Error while adding game object reference",J.$.Error)})),this._conditionGroups.push(U)}k.onNavigationChange.add(this.requestNavMeshRecalculation,this),k.onLoaded.add(this.requestNavMeshRecalculation,this),k.onUnloaded.add(this.requestNavMeshRecalculation,this)}removeGameObject(k){var B;let U=!1;for(const F of this._conditionGroups)F.removeGameObject(k)&&(U=!0);k.onNavigationChange.remove(this.requestNavMeshRecalculation,this),k.onLoaded.remove(this.requestNavMeshRecalculation,this),k.onUnloaded.remove(this.requestNavMeshRecalculation,this),U&&(null===(B=this.requestNavMeshRecalculation())||void 0===B||B.catch((()=>{Z.V.log("Error while recalculating navMesh after removing gameobject",J.$.Error)})))}getActiveGameObjectComponents(k){let B=[];return this._conditionGroups.forEach((U=>{U.isActive(this._map)&&(B=B.concat(U.getGameObjectComponents(k).filter((k=>k.Active&&k.GameObject.activeInHierarchy))))})),B}isReconstructingNavMesh(){return!!this._constructNavmeshPromise}getReconstructionCompletionPromise(){return(0,j.sH)(this,void 0,void 0,(function*(){this._constructNavmeshPromise&&(yield this._constructNavmeshPromise)}))}getNavData(){const k=[];for(const U of this.getActiveGameObjectComponents(Ks)){this._polyListeners.has(U)||(U.OnActiveChanged.add(this.requestNavMeshRecalculation,this),U.GameObject.onActiveInHierarchyChanged.add(this.requestNavMeshRecalculation,this),this._polyListeners.add(U));const B=U.GameObject.transform.worldMatrix,F=new dt.Point,G={inverted:!1,regions:[U.points.map((k=>(B.apply(k,F),[F.x,F.y])))]};k.push(G)}const B=[];for(const U of this.getActiveGameObjectComponents(qs)){this._polyListeners.has(U)||(U.OnActiveChanged.add(this.requestNavMeshRecalculation,this),U.GameObject.onActiveInHierarchyChanged.add(this.requestNavMeshRecalculation,this),this._polyListeners.add(U));const k=U.GameObject.transform.worldMatrix,F=new dt.Point,G={inverted:!1,regions:[U.points.map((B=>(k.apply(B,F),[F.x,F.y])))]};B.push(G)}return{walkableAreas:k,nonWalkableAreas:B}}}Qs.isInitialLoading=!1;class Xs{get bounds(){return this._bounds}get gameObject(){return this._gameObject}constructor(k,B){this.onNavigationChange=new Mt.H,this.onLoaded=new Mt.H,this.onUnloaded=new Mt.H,this._referenceCount=0,this._loadPromise=null,this._gameObject=k,this._bounds=B}destroy(){this.onNavigationChange.dispose(),this.onLoaded.dispose(),this.onUnloaded.dispose()}addReference(){return(0,j.sH)(this,void 0,void 0,(function*(){if(1==++this._referenceCount){if(this._loadPromise=this.load(),null!==this._loadPromise&&!this._loadPromise.cancelled)try{yield this._loadPromise.then((k=>{this._gameObject=k,this._loadPromise=null,this.onLoaded.dispatch()})).catch((()=>{this._loadPromise=null})).promise}catch(k){Z.V.log(`Error in GameObjectReference.addReference: ${k}`,J.$.Error)}}else if(null!==this._loadPromise&&!this._loadPromise.cancelled)try{yield this._loadPromise.promise}catch(k){Z.V.log(`Error in GameObjectReference.addReference else block: ${k}`,J.$.Error)}}))}removeReference(){var k;0==--this._referenceCount&&(null===(k=this._loadPromise)||void 0===k||k.cancel(),this.unload(),this.onUnloaded.dispatch())}load(){return null}unload(){}getGameObject(){return this._gameObject}}class Zs extends Xs{constructor(k,B,U=!1){super(null,k.bounds),this._definition=k,this._parentObject=B,this._usingLegacyStreamedMap=U}load(){const k=new Ws,B=V.W.instance.prefabLoaderInstance,U=new Te._;U.addComponent(Ei.b).Container.bind(Ps.GameObjectBounds).toConstantValue(this.bounds);const F=this._usingLegacyStreamedMap?B.loadFromJSONWithDependencies(k.deserialize(this._definition.prefab),U,!0):B.loadFromJSONProject(k.deserialize(this._definition.prefab),U,!0);return F.then((k=>{var B;const U=null!==(B=k.findComponent(Ei.b))&&void 0!==B?B:k.addComponent(Ei.b);U.Container.rebind(Ps.GameObjectBounds).toConstantValue(this.bounds),U.Container.bind(Ps.GameObjectReference).toConstantValue(this),k.parent=this._parentObject})).catch((k=>{Z.V.log(`Failed to load from GameObjectReference: ${k}\n${JSON.stringify(this._definition.prefab)}`,J.$.Error)})),F}unload(){var k;null===(k=this._gameObject)||void 0===k||k.destroy(),this._gameObject=null}}class Js{get onLoadedBlocksChanged(){return this._onLoadedBlocksChanged}get onStreamedBlockChanged(){return this._onStreamedBlockChanged}get offset(){return this._offset}get blockSize(){return this._blockSize}get loadingPromiseQueueHead(){return this._loadingPromiseQueue.head}constructor(k,B,U){this._onLoadedBlocksChanged=new Mt.H,this._globalObjects=[],this._offset={x:0,y:0},this._conditions={},this._loadedBlocks=[],this._gameObjectReferences=[],this._loadingPromiseQueue=new Yt,this._onStreamedBlockChanged=new Mt.H,this._isLegacy=!1,this.parent=k,this._blockSize=B}destroy(){for(const k of this._blocks)for(const B of k)B.destroy();for(const k of this._gameObjectReferences)k.destroy();this._onLoadedBlocksChanged.dispose(),this._onStreamedBlockChanged.dispose()}addGlobalObject(k){k.parent=this.parent,this._globalObjects.push(k)}addGameObjectReference(k){const B=function(k){return!!k.gameObject}(k)?new Xs(k.gameObject,k.bounds):new Zs(k,this.parent,this._isLegacy);return this.getBlocksInBounds(k.bounds).forEach((U=>{U.block.addGameObject(B,k.conditionGroups)})),this._gameObjectReferences.push(B),B}removeGameObjectReference(k){this.getBlocksInBounds(k.bounds).forEach((B=>{B.block.removeGameObject(k)})),tt.pull(this._gameObjectReferences,k),k.destroy()}isConditionActive(k){var B;return!it.A.isDefined(k)||(null===(B=this._conditions[k])||void 0===B?void 0:B.active)}unloadBlocks(){this._loadedBlocks.forEach((k=>{k.block.unloadAssets()})),this._loadedBlocks=[]}getBlocksInBounds(k){const B=[],U=ut.c.clamp(Math.floor((k.left-this._offset.x)/this._blockSize),0,this._blockCountX-1),F=ut.c.clamp(Math.floor((k.right-this._offset.x)/this._blockSize),0,this._blockCountX-1),G=ut.c.clamp(Math.floor((k.top-this._offset.y)/this._blockSize),0,this._blockCountY-1),j=ut.c.clamp(Math.floor((k.bottom-this._offset.y)/this._blockSize),0,this._blockCountY-1);for(let $=U;$<=F;++$)for(let k=G;k<=j;++k)B.push({block:this._blocks[$][k],x:$,y:k,size:this._blockSize});return B}loadBlocks(k){return(0,j.sH)(this,void 0,void 0,(function*(){}))}}class tn extends Js{constructor(k,B,U){super(k,B,U),this._isLegacy=!0,V.W.instance.game.navMeshSystem.bindStreamedMap(this),this._offset.x=U.left,this._offset.y=U.top;const F=U.right-U.left,G=U.bottom-U.top;Qs.isInitialLoading=!0,this._blockCountX=Math.ceil(F/B),this._blockCountY=Math.ceil(G/B),this._blocks=[],this._blocks.length=this._blockCountX;for(let j=0;j{this._onStreamedBlockChanged.dispatch({block:U,x:j,y:k})}))}}}destroy(){V.W.instance.game.navMeshSystem.releaseStreamedMap(),super.destroy()}static createFromData(k,B,U){return(0,j.sH)(this,void 0,void 0,(function*(){const F=new tn(k,B,U.bounds);U.globalObjects&&(yield Promise.all(U.globalObjects.map((k=>(0,j.sH)(this,void 0,void 0,(function*(){return F.addGlobalObjectPrefab(k).promise}))))));for(const k of U.mapObjects)F.addGameObjectReference(k);return F}))}addGlobalObjectPrefab(k){const B=new Ws,U=V.W.instance.prefabLoaderInstance.loadFromJSONWithDependencies(B.deserialize(k),null,!0);return U.then((k=>{this.addGlobalObject(k)})).catch((B=>{Z.V.log(`Failed to load map global object: ${B}\n${JSON.stringify(k)}`,J.$.Error)})),U}setConditionActive(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){const U=yield this._loadingPromiseQueue.push();if(it.A.isDefined(k)){const F=this._conditions[k];if(F){if(F.active===B)return void U();F.active=B}else this._conditions[k]={active:B};yield Promise.all(this._loadedBlocks.map((U=>(0,j.sH)(this,void 0,void 0,(function*(){return U.block.setConditionGroupActive(k,B).then((k=>(0,j.sH)(this,void 0,void 0,(function*(){k&&(yield this.buildBlockNavMesh(U))}))))})))))}U()}))}loadBlocks(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=yield this._loadingPromiseQueue.push(),U=(k,B)=>k.x===B.x&&k.y===B.y,F=this.getBlocksInBounds(k),G=it.A.removeMultipleFromArray(this._loadedBlocks,F,U),$=it.A.removeMultipleFromArray(F,this._loadedBlocks,U);if(G.forEach((k=>{k.block.unloadAssets()})),yield Promise.all($.map((k=>(0,j.sH)(this,void 0,void 0,(function*(){yield k.block.loadAssets(),Qs.isInitialLoading||(yield this.buildBlockNavMesh(k))}))))),this._loadedBlocks=F,Qs.isInitialLoading){Qs.isInitialLoading=!1;const B=[];this.getBlocksInBounds(k).forEach((k=>{B.push(this.buildBlockNavMesh(k))})),yield Promise.all(B)}($.length>0||G.length>0)&&this._onLoadedBlocksChanged.dispatch($,G),B()}))}buildBlockNavMesh(k){return(0,j.sH)(this,void 0,void 0,(function*(){yield k.block.requestNavMeshRecalculation()}))}}class en extends Pt.y{}let sn=class extends en{constructor(){super(...arguments),this._filled=!0,this._color="#393939",this._alpha=1,this._points=[],this._graphics=null}get filled(){return this._filled}set filled(k){this._filled=k,this.drawPolygon()}get color(){return this._color}set color(k){this._color=k,this.drawPolygon()}get alpha(){return this._alpha}set alpha(k){this._alpha=k,this.drawPolygon()}get points(){return this._points}set points(k){this._points=k,this.drawPolygon()}create(){super.create(),this._graphics=V.W.instance.game.add.graphics(0,0),this.setUpDisplayObject(this._graphics),this._points.length>0&&this.drawPolygon()}destroy(){var k;null===(k=this._graphics)||void 0===k||k.destroy(),this._graphics=null,super.destroy()}drawPolygon(){if(!this._graphics)return;this._graphics.clear();const k=parseInt(this._color.substr(1),16);this._filled?this._graphics.beginFill(k,this._alpha):this._graphics.lineStyle(2,k,this._alpha),this._graphics.drawPolygon(this._points),this._filled?this._graphics.endFill():this._graphics.lineStyle(0)}getGraphics(){return this._graphics}};(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],sn.prototype,"_filled",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String)],sn.prototype,"_color",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],sn.prototype,"_alpha",void 0),(0,j.Cg)([(0,q.SZ)(),(0,q._H)(),(0,j.Sn)("design:type",Array)],sn.prototype,"_points",void 0),sn=(0,j.Cg)([(0,H.EV)("PolygonPrimitive",H.YH.primitive,"Draws a box using the PIXI Graphics library")],sn);class nn extends $.u{}class an extends Ii{constructor(){super(...arguments),this.blockSize=400,this.onMapLoaded=new Mt.H,this._conditionGroupEvaluators=[],this._navMeshGameObjects=[],this._blockBoundGameObjects=[],this._loadPromise=new zt.b,this._enableDebugMesh=!1,this._enableDebugDrawBlocks=!1,this._navmeshDirty=!1}set EnableDebugMesh(k){this._enableDebugMesh=k}set EnableDebugDrawBlocks(k){this._enableDebugDrawBlocks=k}create(){super.create(),st.w.getActiveScene().container.bind(Ps.StreamedMap).toConstantValue(this)}destroy(){var k;null===(k=this.map)||void 0===k||k.destroy(),this.onMapLoaded.dispose(),delete window.toggleNavMesh,this._debugParent&&this._debugParent.destroy(),super.destroy()}awaitLoaded(){return(0,j.sH)(this,void 0,void 0,(function*(){return this._loadPromise}))}update(){super.update(),this._navmeshDirty&&(this.drawNavMesh(),this._navmeshDirty=!1)}drawNavMesh(k){this._debugParent||(this._debugParent=new Te._(this.GameObject),k||this._debugParent.addComponent(Ct.d),this._debugParent.layer="debug"),this._navMeshGameObjects.forEach((k=>{k.destroy()})),this._blockBoundGameObjects.forEach((k=>{k.destroy()})),this._navMeshGameObjects=[],this._blockBoundGameObjects=[];for(const B of V.W.instance.game.navMeshSystem.navMesh.getPolygons()){const k=B.getPoints(),U=new Te._(this._debugParent);U.addComponent(Ct.d);const F=new Te._(U);F.addComponent(Ct.d);const G=F.addComponent(sn,!1);G.alpha=.2,G.color="#3333AA",G.filled=!0,G.points=[...k,k[0]],G.create();const j=new Te._(U);j.addComponent(Ct.d);const $=j.addComponent(sn,!1);$.alpha=.5,$.color="#3333AA",$.filled=!1,$.points=[...k,k[0]],$.create();for(const H of B.neighbours){const k=new Te._(U);k.addComponent(Ct.d);const F=k.addComponent(sn,!1);F.alpha=.5,F.color="#AA3333",F.filled=!1,F.points=[B.centroid,H.centroid],F.create()}this._navMeshGameObjects.push(U)}if(this._enableDebugDrawBlocks){const k=lt.i.main.GameObject.transform,B=lt.i.main.viewportSize,U=k.worldPosition.x-B.getHalfWidth(),F=k.worldPosition.x+B.getHalfWidth(),G=k.worldPosition.y-B.getHalfHeight(),j=k.worldPosition.y+B.getHalfHeight();for(let $=Math.floor(U/this.blockSize)*this.blockSize;${Z.V.log(`StreamedMapComponent: Error in create. The error is ${k.message} and stack trace is: ${k.stack}`,J.$.Error)}))}createAsync(){return(0,j.sH)(this,void 0,void 0,(function*(){if(!this.mapData&&(yield V.W.instance.loader.loadAssets([this.mapDataPath]).then((()=>{this.mapData=V.W.instance.game.cache.getJSON(this.mapDataPath)})),!this.mapData))throw new Error(`Couldn't load streamed map ${this.mapDataPath}`);if(this.map=yield tn.createFromData(this.GameObject,this.blockSize,this.mapData),this._conditionGroupEvaluators){const k=[];for(const B of this._conditionGroupEvaluators)for(const U of B.getActiveConditions())k.push(this.map.setConditionActive(U,!0));yield Promise.all(k)}let k=null;window.toggleNavMesh=()=>{k?(this.map.onStreamedBlockChanged.remove(k),k=null,this._debugParent&&(this._debugParent.destroy(),this._debugParent=null),this._navMeshGameObjects=[]):(this.map.onStreamedBlockChanged.add(k=()=>{this._navmeshDirty=!0}),this.drawNavMesh())},this._enableDebugMesh&&window.toggleNavMesh(),this.onMapLoaded.dispatch(),this._loadPromise.resolve()}))}drawNavMesh(){super.drawNavMesh(!0)}};var on;rn=(0,j.Cg)([(0,H.EV)("StreamedMap",H.YH.map,"Allows a streamed map to be added as a component")],rn);let hn=on=class extends Ii{constructor(){super(...arguments),this._cameraCollisions=null,this.horizontalLoadDistance=940,this.verticalLoadDistance=660,this.deadZoneSize=100,this.maxCameraMovePerMs=1/0,this.shouldFollow=!0,this._offset={x:0,y:0},this._target=null,this._frameWorkManagerNormalBudget=ks.Z.DEFAULT_FPS,this._loadingBlocks=!1,this._enableDebugStreaming=!1}set EnableDebugStreaming(k){this._enableDebugStreaming=k}set Offset(k){this._offset=k}create(){super.create(),this._cameraCollisions=V.W.instance.game.cameraCollisions,this._lastLoadPosition=new pt.I(1/0,1/0);const k=this._target.transform.worldPosition;this._loadedBounds={left:k.x,right:k.x,top:k.y,bottom:k.y},this._deadZoneSizeSq=this.deadZoneSize*this.deadZoneSize,this._frameWorkManager&&(this._frameWorkManagerNormalBudget=this._frameWorkManager.frameBudget),this._target&&st.w.getActiveScene().onPostUpdate.add(this)}destroy(){this._frameWorkManager&&(this._frameWorkManager.frameBudget=this._frameWorkManagerNormalBudget),super.destroy()}postUpdate(){var k;const B=lt.i.main.GameObject.transform;if(this._enableDebugStreaming)B.setPosition(Math.round(this._target.transform.worldPosition.x+this._offset.x),Math.round(this._target.transform.worldPosition.y+this._offset.y));else{let U=ut.c.clamp(this._target.transform.worldPosition.x,this._loadedBounds.left,this._loadedBounds.right)+this._offset.x,F=ut.c.clamp(this._target.transform.worldPosition.y,this._loadedBounds.top,this._loadedBounds.bottom)+this._offset.y;if(this.shouldFollow){const G=new pt.I(B.worldPosition.x,B.worldPosition.y);for(const B of null===(k=this._cameraCollisions)||void 0===k?void 0:k.cameraColliders){const k=B.bounds.left-U,G=B.bounds.right-U,j=B.bounds.top-F,$=B.bounds.bottom-F,H=k<0&&G>0?-k0?-j<$?j:$:0;0!==H&&0!==V&&(Math.abs(H)$*$&&this._lastLoadPosition.x!==1/0&&(j.normalize(),j.multiply(new pt.I($,$)),U=G.x+j.x,F=G.y+j.y),B.setPosition(Math.round(U),Math.round(F))}const G=Math.min(U-this._loadedBounds.left,this._loadedBounds.right-U,F-this._loadedBounds.top,this._loadedBounds.bottom-F);this._frameWorkManager.frameBudget=ut.c.clampedLerp(on._frameWorkManagerLargeBudget,this._frameWorkManagerNormalBudget,G/on._frameWorkManagerBudgetRampDistance)}if(!this._loadingBlocks){const k=this._target.transform.worldPosition;if(new pt.I(k.x-this._lastLoadPosition.x,k.y-this._lastLoadPosition.y).getMagnitudeSq()>=this._deadZoneSizeSq){const B=this.getLoadBounds();this._loadingBlocks=!0,this._loadedBounds.left=Math.max(this._loadedBounds.left,B.left),this._loadedBounds.right=Math.min(this._loadedBounds.right,B.right),this._loadedBounds.top=Math.max(this._loadedBounds.top,B.top),this._loadedBounds.bottom=Math.min(this._loadedBounds.bottom,B.bottom),this.mapComponent.map?this.mapComponent.map.loadBlocks(B).then((()=>{const k=lt.i.main.viewportSize;this._loadedBounds.left=B.left+k.getHalfWidth(),this._loadedBounds.right=B.right-k.getHalfWidth(),this._loadedBounds.top=B.top+k.getHalfHeight(),this._loadedBounds.bottom=B.bottom-k.getHalfHeight(),this._loadingBlocks=!1})).catch((()=>{this._loadingBlocks=!1})):this._loadingBlocks=!1,this._lastLoadPosition.copyFrom(k)}}}getLoadBounds(){const k=this._target.transform.worldPosition;return{top:k.y-this.verticalLoadDistance,bottom:k.y+this.verticalLoadDistance,left:k.x-this.horizontalLoadDistance,right:k.x+this.horizontalLoadDistance}}};hn._frameWorkManagerLargeBudget=200,hn._frameWorkManagerBudgetRampDistance=500,(0,j.Cg)([(0,q.Mn)(rn),(0,j.Sn)("design:type",rn)],hn.prototype,"mapComponent",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],hn.prototype,"horizontalLoadDistance",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],hn.prototype,"verticalLoadDistance",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],hn.prototype,"deadZoneSize",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],hn.prototype,"maxCameraMovePerMs",void 0),(0,j.Cg)([(0,q.ER)(),(0,j.Sn)("design:type",Te._)],hn.prototype,"_target",void 0),(0,j.Cg)([Ci(z.FrameWorkManager),(0,j.Sn)("design:type",Ls.Y)],hn.prototype,"_frameWorkManager",void 0),hn=on=(0,j.Cg)([(0,Ge.injectable)(),(0,H.EV)("LoadAreaCameraFollowController",H.YH.map,"A camera follow controller that follows a target and informs asset loading in a legacy StreamedMap")],hn);let cn=class extends $.u{constructor(){super(...arguments),this._enableFollowControllerAfter=!1,this._panTimeMs=1e3,this.onFinish=new Mt.H}create(){super.create(),this._cameraFollowController=this._mainPlayer.findComponentInChildren(hn)}destroy(){this.onFinish.dispose(),super.destroy()}run(){const k=lt.i.main.GameObject.transform,B=new pt.I;B.copyFrom(k.localPosition);const U=new pt.I;U.copyFrom(this._targetTransform.worldPosition),U.subtract(k.worldPosition);const F={percent:0};this.setCameraControllerEnabled(!1),V.W.instance.game.add.tween(F,this).to({percent:1},this._panTimeMs,Be.G.Quadratic.InOut,!0).onUpdateCallback((()=>{k.setPosition(Math.round(B.x+U.x*F.percent),Math.round(B.y+U.y*F.percent))})).onTweenComplete.addOnce((()=>{k.setPosition(B.x+U.x,B.y+U.y),this._enableFollowControllerAfter&&this.setCameraControllerEnabled(!0),this.onFinish.dispatch()}))}setCameraControllerEnabled(k){this._cameraFollowController&&(this._cameraFollowController.shouldFollow=k)}};(0,j.Cg)([Ai(Ps.MainPlayerGameObject),(0,j.Sn)("design:type",Te._)],cn.prototype,"_mainPlayer",void 0),(0,j.Cg)([(0,q.Mn)(Ct.d),(0,j.Sn)("design:type",Ct.d)],cn.prototype,"_targetTransform",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],cn.prototype,"_enableFollowControllerAfter",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],cn.prototype,"_panTimeMs",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],cn.prototype,"onFinish",void 0),cn=(0,j.Cg)([(0,H.EV)("CameraPan",H.YH.motion,"Pans the camera to a target location")],cn);let dn=class extends $.u{};dn=(0,j.Cg)([(0,H.EV)("GlobalExport",H.YH.map,"Adds the attached prefab to a list of prefabs to always be loaded within a streamed map")],dn);class ln extends Js{constructor(k,B,U){super(k,B,U),this.onBoundsLoaded=new Mt.H,this._offset.x=U.left,this._offset.y=U.top;const F=U.right-U.left,G=U.bottom-U.top;this._blockCountX=Math.ceil(F/B),this._blockCountY=Math.ceil(G/B),this._blocks=[],this._blocks.length=this._blockCountX;for(let j=0;j{this._onStreamedBlockChanged.dispatch({block:U,x:j,y:k})}))}}}destroy(){super.destroy(),this.onBoundsLoaded.dispose()}static createFromData(k,B,U){return(0,j.sH)(this,void 0,void 0,(function*(){const F=new ln(k,B,U.bounds);U.globalObjects&&(yield Promise.all(U.globalObjects.map((k=>(0,j.sH)(this,void 0,void 0,(function*(){return F.addGlobalObjectPrefab(k).promise}))))));for(const k of U.mapObjects)F.addGameObjectReference(k);return F}))}addGlobalObjectPrefab(k){const B=new Ws,U=V.W.instance.prefabLoaderInstance.loadFromJSONProject(B.deserialize(k),null,!0);return U.then((k=>{this.addGlobalObject(k)})).catch((B=>{Z.V.log(`Failed to load map global object: ${B}\n${JSON.stringify(k)}`,J.$.Error)})),U}setConditionActive(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){const U=yield this._loadingPromiseQueue.push();if(it.A.isDefined(k)){let F=this._conditions[k];if(F){if(F.active===B)return void U();F.active=B}else F=this._conditions[k]={active:B};yield Promise.all(this._loadedBlocks.map((U=>(0,j.sH)(this,void 0,void 0,(function*(){return U.block.setConditionGroupActive(k,B)})))))}U()}))}loadBlocks(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=yield this._loadingPromiseQueue.push(),U=(k,B)=>k.x===B.x&&k.y===B.y,F=this.getBlocksInBounds(k),G=it.A.removeMultipleFromArray(this._loadedBlocks,F,U),$=it.A.removeMultipleFromArray(F,this._loadedBlocks,U);G.forEach((k=>{k.block.unloadAssets()})),yield Promise.all($.map((k=>(0,j.sH)(this,void 0,void 0,(function*(){return k.block.loadAssets()}))))),this._loadedBlocks=F,B(),($.length>0||G.length>0)&&this._onLoadedBlocksChanged.dispatch($,G,k)}))}}let un=class extends an{constructor(){super(...arguments),this._navMeshPolyIDs=[]}create(){super.create(),this._streamedMapAsset&&this.loadMap()}loadMap(){return(0,j.sH)(this,void 0,void 0,(function*(){const k=V.W.instance.game.cache.getJSON(this._streamedMapAsset);if(this.map=yield ln.createFromData(this.GameObject,this.blockSize,k),this._conditionGroupEvaluators){const k=[];for(const B of this._conditionGroupEvaluators)for(const U of B.getActiveConditions())k.push(this.map.setConditionActive(U,!0));yield Promise.all(k)}this._navMeshPolyIDs=V.W.instance.game.navMeshSystem.addWalkablePolygons(k.navMesh);let B=null;window.toggleNavMesh=()=>{const k=V.W.instance.game.navMeshSystem;B?(k.onNavMeshChanged.remove(B),B=null,this._debugParent&&(this._debugParent.destroy(),this._debugParent=null),this._navMeshGameObjects=[]):(k.onNavMeshChanged.add(B=()=>{this._navmeshDirty=!0}),this.drawNavMesh())},this._enableDebugMesh&&window.toggleNavMesh(),this.onMapLoaded.dispatch(),this._loadPromise.resolve()}))}destroy(){this._navMeshPolyIDs.length>0&&(V.W.instance.game.navMeshSystem.removePolygons(this._navMeshPolyIDs),this._navMeshPolyIDs=[]),super.destroy()}};(0,j.Cg)([(0,q.i0)(Bi.Z.StreamedMapEla),(0,j.Sn)("design:type",String)],un.prototype,"_streamedMapAsset",void 0),un=(0,j.Cg)([(0,H.EV)("StreamedMapEla",H.YH.map,"Allows an ELA version streamed map to be added as a component")],un);let fn=class extends $.u{constructor(){super(...arguments),this._horizontalLoadPadding=300,this._verticalLoadPadding=300,this.onStreamingBoundsChanged=new Mt.H,this._deadZoneSize=100,this._lastLoadPosition=new pt.I(1/0,1/0)}create(){super.create(),this._deadZoneSizeSq=this._deadZoneSize*this._deadZoneSize,this._target&&st.w.getActiveScene().onPostUpdate.add(this)}destroy(){this._target&&st.w.getActiveScene().onPostUpdate.remove(this),this.onStreamingBoundsChanged.dispose(),this._target=null,super.destroy()}postUpdate(){if(!this.GameObject.activeInHierarchy)return;const k=this._target.worldPosition,B=new pt.I(k.x-this._lastLoadPosition.x,k.y-this._lastLoadPosition.y),U=lt.i.main.viewportSize,F=this.GameObject.transform.worldScale,G=U.getHalfWidth()+this._horizontalLoadPadding*F.x,j=U.getHalfHeight()+this._verticalLoadPadding*F.y;if(B.getMagnitudeSq()>=this._deadZoneSizeSq){const k=this._target.worldPosition;this.onStreamingBoundsChanged.dispatch({top:k.y-j,bottom:k.y+j,left:k.x-G,right:k.x+G}),this._lastLoadPosition.copyFrom(k)}}getTarget(){var k;return null!==(k=this._target)&&void 0!==k?k:null}};(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],fn.prototype,"_horizontalLoadPadding",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],fn.prototype,"_verticalLoadPadding",void 0),(0,j.Cg)([(0,q.Mn)(Ct.d),(0,j.Sn)("design:type",Ct.d)],fn.prototype,"_target",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],fn.prototype,"onStreamingBoundsChanged",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],fn.prototype,"_deadZoneSize",void 0),fn=(0,j.Cg)([(0,H.EV)("StreamingBoundsEla",H.YH.streaming)],fn);let bn=class extends $.u{constructor(){super(...arguments),this.onLoadedAreaChanged=new Mt.H,this._loadedBounds=null}create(){var k;super.create(),null===(k=this._streamingBounds)||void 0===k||k.onStreamingBoundsChanged.add(this.streamingAreaChanged,this)}destroy(){var k;null===(k=this._streamingBounds)||void 0===k||k.onStreamingBoundsChanged.remove(this.streamingAreaChanged,this),this.onLoadedAreaChanged.dispose(),this._streamedMap=null,this._streamingBounds=null,this._loadedBounds=null,super.destroy()}getLoadedBounds(){return this._loadedBounds?this.convertBoundsToWorld(this._loadedBounds):null}streamingAreaChanged(k){if(this._streamedMap){const B=this._streamedMap.GameObject.transform.worldMatrix,U=os.J.applyInverseMatrixToBounds(k,B);this._loadedBounds&&os.J.intersectBounds(this._loadedBounds,U),this._streamedMap.map.loadBlocks(os.J.applyInverseMatrixToBounds(k,B)).then((()=>{this._loadedBounds=U,this.onLoadedAreaChanged.dispatch(this.convertBoundsToWorld(this._loadedBounds))}))}}convertBoundsToWorld(k){const B=this._streamedMap.GameObject.transform.worldMatrix;return os.J.applyMatrixToBounds(k,B)}};var pn,vn;(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],bn.prototype,"onLoadedAreaChanged",void 0),(0,j.Cg)([(0,q.Mn)(fn),(0,j.Sn)("design:type",fn)],bn.prototype,"_streamingBounds",void 0),(0,j.Cg)([(0,q.Mn)(un),(0,j.Sn)("design:type",un)],bn.prototype,"_streamedMap",void 0),bn=(0,j.Cg)([(0,H.EV)("StreamingLoadedAreaEla",H.YH.streaming)],bn),function(k){k[k.Left=0]="Left",k[k.Right=1]="Right",k[k.Top=2]="Top",k[k.Bottom=3]="Bottom"}(vn||(vn={}));let gn=pn=class extends $.u{create(){var k;super.create(),lt.i.main.onViewportChanged.add(this.loadedAreaChanged,this),null===(k=this._loadedArea)||void 0===k||k.onLoadedAreaChanged.add(this.loadedAreaChanged,this)}destroy(){var k;lt.i.main.onViewportChanged.remove(this.loadedAreaChanged,this),null===(k=this._loadedArea)||void 0===k||k.onLoadedAreaChanged.remove(this.loadedAreaChanged,this),this._cameraColliders=[],this._cameraBounds=[],this._loadedArea=null,super.destroy()}loadedAreaChanged(k){if(!k)return;this._cameraBounds||this.createCameraBounds();const B=lt.i.main.viewportSize,U=this.GameObject.transform.worldScale,F=new bt.o(B.width/U.x,B.height/U.y),G=this.GameObject.transform.worldMatrix.applyInverse({x:.5*(k.right-k.left)+k.left,y:.5*(k.bottom-k.top)+k.top}),j=.5*Math.max(k.right-k.left,B.width)/U.x,$=.5*Math.max(k.bottom-k.top,B.height)/U.y,H=G.x-j,W=G.x+j,q=G.y-$,K=G.y+$,z=K-q,Y={width:W-H+2*F.width,height:z+2*F.height};this._cameraBounds[vn.Left].setAnchoredPivotOffset(H-pn.HALF_COLLIDER_SIZE,G.y),this._cameraBounds[vn.Left].setSizeDelta(pn.COLLIDER_SIZE,Y.height),this._cameraBounds[vn.Right].setAnchoredPivotOffset(W+pn.HALF_COLLIDER_SIZE,G.y),this._cameraBounds[vn.Right].setSizeDelta(pn.COLLIDER_SIZE,Y.height),this._cameraBounds[vn.Top].setAnchoredPivotOffset(G.x,q-pn.HALF_COLLIDER_SIZE),this._cameraBounds[vn.Top].setSizeDelta(Y.width,pn.COLLIDER_SIZE),this._cameraBounds[vn.Bottom].setAnchoredPivotOffset(G.x,K+pn.HALF_COLLIDER_SIZE),this._cameraBounds[vn.Bottom].setSizeDelta(Y.width,pn.COLLIDER_SIZE);const Q=V.W.instance.game.cameraCollisions;this._cameraColliders.forEach((k=>{Q.updateColliderBounds(k)}))}createCameraBounds(){this._cameraBounds=[],this._cameraColliders=[];for(let k=0;k0&&(this._indices[++k]=B.vertexIndex),this._indices[++k]=B.vertexIndex,this._indices[++k]=B.vertexIndex+1,this._indices[++k]=B.vertexIndex+2,this._indices[++k]=B.vertexIndex+3,this._indices[++k]=B.vertexIndex+3);k>0?(this._mesh.visible=!0,this._mesh.geometry.getIndex().update(this._indices),this._mesh.verticesBuffer.update(this._vertices),this._mesh.uvBuffer.update(this._uvs),this._mesh.size=k):this._mesh.visible=!1,this._isGeometryDirty=!1}setUpTile(k,B,U,F,G,j,$){let H=k;const W=0!=(H&rs.flippedHorizontally),q=0!=(H&rs.flippedVertically),K=0!=(H&rs.flippedDiagonally);H&=~rs.all;const z=fs.getTileset(this._mapData.tilesets,H);if(!z||!it.A.isDefined(H))return null;H-=z.firstgid;const Y=this._streamer.getOrCreateTile(),Q=Y.uvs,X=V.W.instance.game.cache.getFrameByName(z.name,`${H}`,Ts.r.RENDER_TEXTURE),Z=X.x/this._texture.width,J=X.right/this._texture.width,tt=X.y/this._texture.height,et=X.bottom/this._texture.height;Q[0].x=Z,Q[0].y=tt,Q[1].x=J,Q[1].y=tt,Q[2].x=Z,Q[2].y=et,Q[3].x=J,Q[3].y=et;const st=Math.max(0,F),nt=Math.min(0,F),at=Math.max(0,G),rt=Math.min(0,G),ot=-nt/this._texture.width,ht=-st/this._texture.width,ct=-rt/this._texture.height,dt=-at/this._texture.height;let lt=[1,0,0,1];K&&(this.swap(Q,1,2),lt=[0,1,1,0]),W&&(this.swap(Q,0,1),this.swap(Q,2,3),lt[0]*=-1,lt[2]*=-1),q&&(this.swap(Q,0,2),this.swap(Q,1,3),lt[1]*=-1,lt[3]*=-1),Q[0].x+=ot*lt[0]+ct*lt[2],Q[0].y+=ot*lt[1]+ct*lt[3],Q[1].x+=ht*lt[0]+ct*lt[2],Q[1].y+=ht*lt[1]+ct*lt[3],Q[2].x+=ot*lt[0]+dt*lt[2],Q[2].y+=ot*lt[1]+dt*lt[3],Q[3].x+=ht*lt[0]+dt*lt[2],Q[3].y+=ht*lt[1]+dt*lt[3];const ut=B+st,ft=B+fs.TILE_SIZE+nt,bt=U+at,pt=U+fs.TILE_SIZE+rt;let vt=Y.vertexIndex*En.FLOATS_PER_VERTEX;return[[ut,Q[0].x],[bt,Q[0].y],[ft,Q[1].x],[bt,Q[1].y],[ut,Q[2].x],[pt,Q[2].y],[ft,Q[3].x],[pt,Q[3].y]].forEach((k=>{this._vertices[vt]=k[0],this._uvs[vt]=k[1],++vt})),Y.toggleGroup=j,Y.active=!(j>-1)||this._streamer.isToggleGroupVisible(j),this._isGeometryDirty=!0,Y}swap(k,B,U){const F=k[B];k[B]=k[U],k[U]=F}createGenericTile(){this.ensureBufferAvailable(1+(this._nextTileVertex>>2));const k={vertexIndex:this._nextTileVertex,uvs:[{x:0,y:0},{x:0,y:0},{x:0,y:0},{x:0,y:0}],toggleGroup:-1,active:!0};return this._nextTileVertex+=En.VERTICES_PER_TILE,k}releaseTile(k){this._isGeometryDirty=!0}ensureBufferAvailable(k){var B,U,F,G;const j=k*En.FLOATS_PER_TILE;if((null!==(U=null===(B=this._vertices)||void 0===B?void 0:B.length)&&void 0!==U?U:0){Z.V.log(`TMXMapStreamer#loadMapByFilename: ${k}`,J.$.Error)}))}loadMapByAsset(k){fs.loadMapFile(k).then(this.loadMapFromData.bind(this)).catch((k=>{Z.V.log(`TMXMapStreamer#loadMapByAsset: ${k}`,J.$.Error)}))}loadMapFromData(k){return(0,j.sH)(this,void 0,void 0,(function*(){return fs.loadTilesets(this.mapData=k).then((()=>(0,j.sH)(this,void 0,void 0,(function*(){return this.setup()})))).catch((k=>{Z.V.log(`TMXMapStreamer#loadMapFromData: ${k}`,J.$.Error)})).then((()=>(0,j.sH)(this,void 0,void 0,(function*(){this.onMapLoaded.dispatch()}))))}))}setup(){var k;const B=this.GameObject.addComponent(ds);for(let F=0;F0;--F)this.releaseTile(this.createGenericTile());return B}update(){if(super.update(),this._setupComplete){const k=lt.i.main.GameObject.transform.worldPosition,B=Math.floor((k.x-lt.i.main.viewportSize.getHalfWidth()-this.GameObject.transform.worldPosition.x)/fs.TILE_SIZE+.5)-wn.OFFSCREEN_TILE_PRELOAD,U=Math.floor((k.y-lt.i.main.viewportSize.getHalfHeight()-this.GameObject.transform.worldPosition.y)/fs.TILE_SIZE+.5)-wn.OFFSCREEN_TILE_PRELOAD,F=ut.c.clamp(B-this._tileLoadedLeft,-this._tileGridWidth,this._tileGridWidth),G=Math.sign(F);if(0!==F)for(let H=F;0!==H;H-=G){const k=H>0?H-1:H;for(let B=0;B0?H+F:H;for(let B=j;0!==B;B-=$){const U=B>0?B-1:B;this.releaseGridCell(k,U)}}if(this._tileGridLeftIndex+=F,this._tileGridTopIndex+=j,this._tileLoadedLeft=B,this._tileLoadedTop=U,0!==F)for(let H=-F;0!==H;H+=G){const k=H>0?H-1:H;for(let B=0;B0?H:H-F;for(let B=-j;0!==B;B+=$){const U=B>0?B-1:B;this.setUpTilesForLayers(k,U)}}this._renderer.update()}}setUpTilesForLayers(k,B){const U=this.getTileGridCell(k,B),F=this.screenToTmxIndex(k,B),G=this.screenToLocalPosition(k,B),j=this._layerData.length;for(let $=0;$=k.width||F.y>=k.height))if(k.data){const B=k.data[k.width*F.y+F.x];if(Boolean(B)){const F=this.setUpTileForLayer(B,G.x,G.y,0,0,k);F&&U.tiles.push(F)}}else if(k.objects){const B=this._objectsByLayer[`${$}|${F.x},${F.y}`];if(B)for(const F of B){const B=this.setUpTileForLayer(F.gid,G.x,G.y,F.x-G.x,F.y-G.y,k);B&&U.tiles.push(B)}}}}setUpTileForLayer(k,B,U,F,G,j){const $=tt.get(j,"properties.dynamicToggle",-1),H=it.A.isDefined(j.properties)&&j.properties.useAnimDuration;return this._renderer.setUpTile(k,B,U,F,G,$,H)}createGenericTile(){const k=this._renderer.createGenericTile();return this._createdTiles.push(k),this._activeTiles.push(k),k}releaseGridCell(k,B){const U=this.getTileGridCell(k,B);for(const F of U.tiles)this.releaseTile(F),U.tiles=[]}releaseTile(k){this._renderer.releaseTile(k),this._activeTiles.splice(this._activeTiles.indexOf(k),1),this._tilePool.push(k)}getPooledTile(){const k=this._tilePool.pop();return k&&this._activeTiles.push(k),k}getOrCreateTile(){var k;return null!==(k=this.getPooledTile())&&void 0!==k?k:this.createGenericTile()}screenToTileGridIndex(k,B){return{x:it.A.wrapArrayIndex(this._tileGridLeftIndex+k,this._tileGridWidth),y:it.A.wrapArrayIndex(this._tileGridTopIndex+B,this._tileGridHeight)}}screenToTmxIndex(k,B){return{x:this._tileLoadedLeft+it.A.wrapArrayIndex(k,this._tileGridWidth),y:this._tileLoadedTop+it.A.wrapArrayIndex(B,this._tileGridHeight)}}screenToLocalPosition(k,B){const U=this.screenToTmxIndex(k,B);return U.x=U.x*fs.TILE_SIZE,U.y=U.y*fs.TILE_SIZE,U}getTileGridCell(k,B){const U=this.screenToTileGridIndex(k,B);return this._tileGrid[U.x][U.y]}setToggleGroupVisible(k,B){var U;this._toggleGroupState[k]=B,null===(U=this._renderer)||void 0===U||U.setToggleGroupVisible(k,B)}isToggleGroupVisible(k){var B;return null===(B=this._toggleGroupState[k])||void 0===B||B}};Tn.OFFSCREEN_TILE_PRELOAD=3,Tn.STREAMER_POOL_BUFFER_SCALE=.25,(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],Tn.prototype,"fileName",void 0),(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String)],Tn.prototype,"asset",void 0),Tn=wn=(0,j.Cg)([(0,H.EV)("TMXMapStreamer",H.YH.tiled,"Handles the creation of on-screen tiles for the streaming system"),(0,X.D)()],Tn);let Sn=class extends $.u{constructor(){super(...arguments),this._hasCombinedMaps=!1,this.onMapsCombined=new Mt.H,this._enableDebugDrawCombinerAtlas=!1}set EnableDebugDrawCombinerAtlas(k){this._enableDebugDrawCombinerAtlas=k}postCreate(){super.postCreate(),this.loadAndCombineMapData().catch((k=>{Z.V.log(`TMXMapCombiner: Error in load and combine map data. The error is ${k.message} and stack trace is: ${k.stack}`,J.$.Error)}))}destroy(){this.onMapsCombined.dispose(),super.destroy()}loadAndCombineMapData(){return(0,j.sH)(this,void 0,void 0,(function*(){const k=this.GameObject.findComponentsInChildren(Tn);if(k){const B=new As,U=[];for(const G of k)G.mapData?B.addMapData(G.mapData):it.A.isDefined(G.asset)?(U.push(Tn.loadMapFile(G.asset).then((k=>(0,j.sH)(this,void 0,void 0,(function*(){return fs.loadTilesets(k)})))).then((k=>{G.mapData=k,B.addMapData(k)}))),G.fileName=G.asset=void 0):it.A.isDefined(G.fileName)?(U.push(Tn.loadMapFileFromUrl(G.fileName).then((k=>(0,j.sH)(this,void 0,void 0,(function*(){return fs.loadTilesets(k)})))).then((k=>{G.mapData=k,B.addMapData(k)}))),G.fileName=G.asset=void 0):Z.V.log("TMXMapCombiner: Data is not defined for a streamer",J.$.Error);yield Promise.all(U);const F=yield B.combine();for(const G of k)G.loadMapFromData(G.mapData).catch((k=>{Z.V.log(`TMXMapCombiner: Error loading map from data. The error is ${k.message} and stack trace is: ${k.stack}`,J.$.Error)}));if(this._hasCombinedMaps=!0,this.onMapsCombined.dispatch(),this._enableDebugDrawCombinerAtlas){const k=V.W.instance.game,B=V.W.instance.game.add.sprite(0,0,void 0,void 0,void 0,k.cache.getRenderTexture(F));B.fixedToCamera=!0;const U=V.W.instance.game.height;let G=B.width,j=B.height;if(j>U){const k=U/j;G*=k,j=U,B.scale.set(k,k)}const $=V.W.instance.game.add.graphics(0,0);$.beginFill(65535,1).drawRect(0,0,G,j).endFill();const H=V.W.instance.game.add.renderTexture(G,j);Wt.C.clear(H),Wt.C.renderRawXY(H,$,0,0),Wt.C.renderXY(H,B,0,0),k.world.addChild(B)}}}))}hasCombinedMaps(){return this._hasCombinedMaps}};var An;Sn=(0,j.Cg)([(0,H.EV)("TMXMapCombiner",H.YH.tiled,"Runs TMXMapDataCombiner on TMXMapStreamers in children to generate a shared atlas
    and remap the tile data")],Sn);let Cn=An=class extends fs{create(){super.create(),""!==this.tiledMap?this._generatedAssetTag=it.A.generateGUID():this._generatedAssetTag=this.tiledMap,(this.inGameAsset||this.tiledMap)&&this.reloadMapFile(!1)}destroy(){this._container&&this._container.destroy(),super.destroy()}reloadMapFile(k=!0){if(this._container&&this._container.destroy(),super.create(),this._container=new Te._(this.GameObject),this._container.onDestroy.addOnce((()=>{this._container=null})),this._container.addComponent(Ct.d),k){const k=V.W.instance.game.cache;k.checkJSONKey(this.tiledMap)&&k.removeJSON(this.tiledMap)}else{const k=An.spriteCache.get(this.tiledMap);if(k){const B=new Te._(this._container);B.addComponent(Ct.d);return void B.addComponent(ge).setTexture(k)}}this.loadMap()}loadMap(){fs.loadMapFile(this._generatedAssetTag).then((k=>(0,j.sH)(this,void 0,void 0,(function*(){return fs.loadTilesets(k)})))).then((k=>(0,j.sH)(this,void 0,void 0,(function*(){return this.createFlatImage(k)})))).catch((k=>{Z.V.log(`TMXMapEditorComponent#loadMap: ${k}`,J.$.Error)})).then((()=>(0,j.sH)(this,void 0,void 0,(function*(){this.onMapLoaded.dispatch(this._generatedAssetTag)}))))}createFlatImage(k){return(0,j.sH)(this,void 0,void 0,(function*(){var B;let U=0,F=0;for(let V=0;V0&&B.height>0&&(B.properties&&it.A.isDefined(B.properties.reference)||(U=Math.max(U,B.width),F=Math.max(F,B.height)))}const G=V.W.instance.game.add.renderTexture(U*Tn.TILE_SIZE,F*Tn.TILE_SIZE),j=new Te._;j.addComponent(pe.K);const $=j.addComponent(ge);Object.defineProperty($,"assetLoader",{get:()=>({isLoaded:k=>V.W.instance.loader.isLoaded(k,es.Image)})});const H=j.addComponent(ls);let W=rs.none;for(let V=0;V0&&q.height>0))continue;if(q.properties&&it.A.isDefined(q.properties.reference))continue;$.setAlpha(null!==(B=q.opacity)&&void 0!==B?B:1);const K=new Map;for(let B=0;B<=F;++B)for(let F=0;F<=U;++F){const U=fs.getTileData(q.data[q.width*B+F],k.tilesets);if(U&&U.id>=0){U.x=F*fs.TILE_SIZE,U.y=B*fs.TILE_SIZE;let k=K.get(U.tileset.name);k||K.set(U.tileset.name,k=new Map),k.has(U.id)?k.get(U.id).push(U):k.set(U.id,[U])}}if(K.size<=0)continue;const z=.5*Tn.TILE_SIZE;for(const[k,B]of K.entries())for(const[U,F]of B.entries()){$.updateAsset(k,`${U}`);for(const k of F)W!==k.transform&&(H.rotate(0!=(k.transform&rs.flippedVertically),0!=(k.transform&rs.flippedHorizontally),0!=(k.transform&rs.flippedDiagonally)),W=k.transform),j.legacyTransform.group.updateTransform(),Wt.C.renderRawXY(G,j.legacyTransform.group,k.x+z,k.y+z,!1)}}j.destroy();const q=new Te._(this._container);q.addComponent(Ct.d);q.addComponent(ge).setTexture(G),An.spriteCache.set(this.tiledMap,G)}))}};Cn.spriteCache=new Map,(0,j.Cg)([(0,q.W_)(),(0,q.nK)("asset"),(0,j.Sn)("design:type",String)],Cn.prototype,"inGameAsset",void 0),(0,j.Cg)([(0,q.i0)(Bi.Z.TiledMap),(0,j.Sn)("design:type",String)],Cn.prototype,"tiledMap",void 0),(0,j.Cg)([(0,Le.G)(),(0,j.Sn)("design:type",Function),(0,j.Sn)("design:paramtypes",[Boolean]),(0,j.Sn)("design:returntype",void 0)],Cn.prototype,"reloadMapFile",null),Cn=An=(0,j.Cg)([(0,H.EV)("TiledMap",H.YH.tiled,"Loads and displays a Tiled map file in editor")],Cn);let On=class extends $.u{findPath(k,B){throw new Error("Not implemented")}findPathAsync(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){throw new Error("Not implemented")}))}};var In;On=(0,j.Cg)([(0,H.EV)("IPathfinderComponent",void 0,"A component that pathfinds")],On),function(k){k.MovePlayer="Prodigy.Events.PlayerLocomotion.MOVE_PLAYER",k.StopPlayer="Prodigy.Events.PlayerLocomotion.STOP_PLAYER",k.GetTarget="Prodigy.Events.PlayerLocomotion.GET_TARGET"}(In||(In={}));let Dn=class extends Ii{constructor(){super(...arguments),this._deltaPos=new pt.I,this._targetNavMesh=null,this.speed=.25,this._onMoveStart=new Mt.H,this._onMoveEnd=new Mt.H,this._onPathComplete=new Mt.H}get deltaPos(){return this._deltaPos}get onMoveStart(){return this._onMoveStart}get onMoveEnd(){return this._onMoveEnd}get onPathComplete(){return this._onPathComplete}get targetNavMesh(){return null===this._targetNavMesh?V.W.instance.game.navMeshSystem.navMesh:this._targetNavMesh}set targetNavMesh(k){this._targetNavMesh=k}create(){super.create(),this._lastTarget=new pt.I,this._lastTarget.copyFrom(this.GameObject.transform.worldPosition),V.W.instance.game.stage.addListener(In.StopPlayer,this.stop.bind(this),this),V.W.instance.game.stage.addListener(In.GetTarget,this.onGetTarget.bind(this),this)}onDisable(){super.onDisable(),this.stop()}pathTo(k){if(this.Active){const B=this.GameObject.transform.worldPosition,U=this.targetNavMesh.findPath(new pt.I(B.x,B.y),k);if(U)return this.foundPath(U),!0}return!1}foundPath(k){this.currentPath=k,this.currentPathSegment=-1,this.currentPathSegmentLength=0,this.currentPathSegmentRemaining=0,this._onMoveStart.dispatch()}update(){if(super.update(),this.currentPath){let k=this.speed*V.W.instance.game.time.deltaMS,B=this.currentPath[this.currentPathSegment],U=this.currentPath[this.currentPathSegment+1];for(;k>=this.currentPathSegmentRemaining;){if(k-=this.currentPathSegmentRemaining,++this.currentPathSegment>=this.currentPath.length-1)return this.stop(),this._onPathComplete.dispatch(),void this.GameObject.transform.setPosition(U.x,U.y);B=U,U=this.currentPath[this.currentPathSegment+1],this.currentPathSegmentLength=this.currentPathSegmentRemaining=B.getDistance(U)}this.currentPathSegmentRemaining-=k;const F=this.currentPathSegmentRemaining/this.currentPathSegmentLength,G=new pt.I(ut.c.linear(U.x,B.x,F),ut.c.linear(U.y,B.y,F)),j=this.GameObject.transform.worldPosition;this._deltaPos.setTo(G.x-j.x,G.y-j.y),this.GameObject.transform.setPosition(G.x,G.y)}else this._deltaPos.copyFrom(pt.I.ZERO)}stop(){this.currentPath=null,this.currentPathSegment=-1,this.currentPathSegmentLength=0,this.currentPathSegmentRemaining=0,this._deltaPos.copyFrom(pt.I.ZERO),this._onMoveEnd.dispatch()}onGetTarget(k=!1){if(k){const k=this.GameObject.transform.worldPosition;return{x:k.x,y:k.y}}return{x:this._lastTarget.x,y:this._lastTarget.y}}destroy(){V.W.instance.game.stage.removeListener(In.StopPlayer),V.W.instance.game.stage.removeListener(In.GetTarget),this._onMoveStart.dispose(),this._onMoveEnd.dispose(),this._onPathComplete.dispose(),super.destroy()}};(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Dn.prototype,"_onMoveStart",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Dn.prototype,"_onMoveEnd",void 0),Dn=(0,j.Cg)([(0,H.EV)("NavMeshLocomotion",void 0,"Handles movement across a NavMesh")],Dn);let Rn=class extends On{findPath(k,B){var U;return null===(U=V.W.instance.game.navMeshSystem.navMesh)||void 0===U?void 0:U.findPath(k,B)}findPathAsync(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){return this.findPath(k,B)}))}};var Pn;Rn=(0,j.Cg)([(0,H.EV)("NavMeshPathfinder",H.YH.motion,"Hooks into the nav mesh and finds a path from the source to the target location")],Rn);let Mn=Pn=class extends $.u{constructor(){super(...arguments),this.deltaPos=new pt.I,this.speed=.25,this._autoScaleSpeed=!1,this.onPathStart=new Mt.H,this.onPathEnd=new Mt.H,this.onPathComplete=new Mt.H,this.onTargetSelected=new Mt.H}get currentPathSegment(){return this._currentPathSegment}get target(){var k,B;const U=null!==(B=null===(k=this._currentPath)||void 0===k?void 0:k[this._currentPath.length-1])&&void 0!==B?B:this.gameObject.transform.localPosition;return{x:U.x,y:U.y}}destroy(){this.onPathStart.dispose(),this.onPathEnd.dispose(),this.onPathComplete.dispose(),this.onTargetSelected.dispose(),super.destroy()}onDisable(){super.onDisable(),this.stop()}getPath(){return this._currentPath}setPath(k){this._currentPath=k,this._currentPathSegment=-1,this._currentPathSegmentLength=0,this._currentPathSegmentRemaining=0,this.onPathStart.dispatch(),this.onTargetSelected.dispatch(k[k.length-1])}update(){if(super.update(),this._currentPath){let k=this.speed;this._autoScaleSpeed&&(k*=this.gameObject.transform.worldScale.x);let B=k*Math.min(V.W.instance.game.time.deltaMS,Pn.MAX_ELAPSED_MS),U=this._currentPath[this._currentPathSegment],F=this._currentPath[this._currentPathSegment+1];for(;B>=this._currentPathSegmentRemaining;){if(B-=this._currentPathSegmentRemaining,++this._currentPathSegment>=this._currentPath.length-1)return this.stop(),this.onPathComplete.dispatch(),void(F&&this.updatePos(F));U=F,F=this._currentPath[this._currentPathSegment+1],this._currentPathSegmentLength=this._currentPathSegmentRemaining=Wt.C.getDistance(U,F)}this._currentPathSegmentRemaining-=B;const G=this._currentPathSegmentRemaining/this._currentPathSegmentLength,j=new pt.I(ut.c.linear(F.x,U.x,G),ut.c.linear(F.y,U.y,G));this.updatePos(j)}else this.deltaPos.copyFrom(pt.I.ZERO)}updatePos(k){const B=this.gameObject.transform;this.deltaPos.copyFrom(k),this.deltaPos.subtract(B.localPosition),B.worldPosition=k}stop(){this._currentPath&&(this._currentPath=null,this._currentPathSegment=-1,this._currentPathSegmentLength=0,this._currentPathSegmentRemaining=0,this.deltaPos.copyFrom(pt.I.ZERO),this.onPathEnd.dispatch())}};Mn.MAX_ELAPSED_MS=200,(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Mn.prototype,"speed",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Mn.prototype,"_autoScaleSpeed",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Mn.prototype,"onPathStart",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Mn.prototype,"onPathEnd",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Mn.prototype,"onPathComplete",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Mn.prototype,"onTargetSelected",void 0),Mn=Pn=(0,j.Cg)([(0,H.S1)(),(0,H.EV)("PathLocomotion",H.YH.motion,"Takes in a path of points and moves the GameObject transform along that given path")],Mn);var Nn=U(96352);class xn extends Nn.M{constructor(k){super(k);const B=this.compileProgram(xn.VERTEX_SRC,xn.FRAGMENT_SRC);this.useProgram(),this.uSamplerLocation=k.getUniformLocation(B,"uSampler"),this.uCameraMatrixLocation=k.getUniformLocation(B,"cameraMatrix"),this.aVertexPositionLocation=k.getAttribLocation(B,"aVertexPosition"),this.aTextureCoordPositionLocation=k.getAttribLocation(B,"aTextureCoord")}}xn.VERTEX_SRC="\n precision highp float;\n attribute vec2 aVertexPosition;\n attribute vec2 aTextureCoord;\n\n uniform mat3 cameraMatrix;\n\n varying vec2 vTextureCoord;\n\n void main(void) {\n gl_Position = vec4(cameraMatrix * vec3(aVertexPosition, 1.0), 1.0);\n vTextureCoord = aTextureCoord;\n }\n ",xn.FRAGMENT_SRC="\n precision highp float;\n varying vec2 vTextureCoord;\n\n uniform sampler2D uSampler;\n\n void main(void) {\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n }\n ";U(2136);var Ln=U(40008);U(94341);class kn extends Ks{constructor(){super(...arguments),this._navMeshPolygonID=null}postCreate(){super.postCreate(),this.addPolygon(),this.GameObject.transform.onWorldMatrixChanged.add(this.refreshPolygonData,this),this.OnActiveChanged.add(this.refreshPolygonData,this)}destroy(){this.GameObject.transform.onWorldMatrixChanged.remove(this.refreshPolygonData,this),this.OnActiveChanged.remove(this.refreshPolygonData,this),this.removePolygon(),super.destroy()}updatePolygonPoints(k){this.points=k,this.refreshPolygonData()}refreshPolygonData(){const k=V.W.instance.game.navMeshSystem;k.beginNavMeshUpdateQueue(),this.removePolygon(),this.addPolygon(),k.flushNavMeshUpdateQueue()}removePolygon(){null!==this._navMeshPolygonID&&(this.removePolygonFromNavMeshSystem(this._navMeshPolygonID),this._navMeshPolygonID=null)}addPolygon(){this.Active&&null===this._navMeshPolygonID&&(this._navMeshPolygonID=this.addPolygonToNavMeshSystem(this.getPointsInWorldSpace()))}getPointsInWorldSpace(){const k=this.GameObject.transform.worldMatrix.clone(),B=this.GameObject.transform.worldScale;return k.scale(1/B.x,1/B.y),this.points.map((B=>k.apply(B)))}}let Bn=class extends kn{removePolygonFromNavMeshSystem(k){V.W.instance.game.navMeshSystem.removePolygon(k)}addPolygonToNavMeshSystem(k){return V.W.instance.game.navMeshSystem.addWalkablePolygon(k)}};Bn=(0,j.Cg)([(0,H.EV)("NavMeshPolygonEla",H.YH.map,"A navigation mesh polygon that the player can walk on")],Bn);U(87945);let Un=class extends kn{removePolygonFromNavMeshSystem(k){V.W.instance.game.navMeshSystem.removePolygon(k)}addPolygonToNavMeshSystem(k){return V.W.instance.game.navMeshSystem.addNonWalkablePolygon(k)}};Un=(0,j.Cg)([(0,H.EV)("ColliderPolygonEla",H.YH.map,"A polygon defining a non-walkable area")],Un);U(66570),U(59004);const Fn=Object.create(null);Fn.open="0",Fn.close="1",Fn.ping="2",Fn.pong="3",Fn.message="4",Fn.upgrade="5",Fn.noop="6";const Gn=Object.create(null);Object.keys(Fn).forEach((k=>{Gn[Fn[k]]=k}));const jn={type:"error",data:"parser error"},$n="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),Hn="function"==typeof ArrayBuffer,Vn=k=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(k):k&&k.buffer instanceof ArrayBuffer,Wn=({type:k,data:B},U,F)=>$n&&B instanceof Blob?U?F(B):qn(B,F):Hn&&(B instanceof ArrayBuffer||Vn(B))?U?F(B):qn(new Blob([B]),F):F(Fn[k]+(B||"")),qn=(k,B)=>{const U=new FileReader;return U.onload=function(){const k=U.result.split(",")[1];B("b"+(k||""))},U.readAsDataURL(k)};function Kn(k){return k instanceof Uint8Array?k:k instanceof ArrayBuffer?new Uint8Array(k):new Uint8Array(k.buffer,k.byteOffset,k.byteLength)}let zn;const Yn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qn="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let Mo=0;Mo{if("string"!=typeof k)return{type:"message",data:ta(k,B)};const U=k.charAt(0);if("b"===U)return{type:"message",data:Jn(k.substring(1),B)};return Gn[U]?k.length>1?{type:Gn[U],data:k.substring(1)}:{type:Gn[U]}:jn},Jn=(k,B)=>{if(Xn){const U=(k=>{let B,U,F,G,j,$=.75*k.length,H=k.length,V=0;"="===k[k.length-1]&&($--,"="===k[k.length-2]&&$--);const W=new ArrayBuffer($),q=new Uint8Array(W);for(B=0;B>4,q[V++]=(15&F)<<4|G>>2,q[V++]=(3&G)<<6|63&j;return W})(k);return ta(U,B)}return{base64:!0,data:k}},ta=(k,B)=>{switch(B){case"blob":return k instanceof Blob?k:new Blob([k]);case"arraybuffer":default:return k instanceof ArrayBuffer?k:k.buffer}},ea=String.fromCharCode(30);function ia(){return new TransformStream({transform(k,B){!function(k,B){$n&&k.data instanceof Blob?k.data.arrayBuffer().then(Kn).then(B):Hn&&(k.data instanceof ArrayBuffer||Vn(k.data))?B(Kn(k.data)):Wn(k,!1,(k=>{zn||(zn=new TextEncoder),B(zn.encode(k))}))}(k,(U=>{const F=U.length;let G;if(F<126)G=new Uint8Array(1),new DataView(G.buffer).setUint8(0,F);else if(F<65536){G=new Uint8Array(3);const k=new DataView(G.buffer);k.setUint8(0,126),k.setUint16(1,F)}else{G=new Uint8Array(9);const k=new DataView(G.buffer);k.setUint8(0,127),k.setBigUint64(1,BigInt(F))}k.data&&"string"!=typeof k.data&&(G[0]|=128),B.enqueue(G),B.enqueue(U)}))}})}let sa;function na(k){return k.reduce(((k,B)=>k+B.length),0)}function aa(k,B){if(k[0].length===B)return k.shift();const U=new Uint8Array(B);let F=0;for(let G=0;GPromise.resolve().then(k):(k,B)=>B(k,0),ha="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function ca(k,...B){return B.reduce(((B,U)=>(k.hasOwnProperty(U)&&(B[U]=k[U]),B)),{})}const da=ha.setTimeout,la=ha.clearTimeout;function ua(k,B){B.useNativeTimers?(k.setTimeoutFn=da.bind(ha),k.clearTimeoutFn=la.bind(ha)):(k.setTimeoutFn=ha.setTimeout.bind(ha),k.clearTimeoutFn=ha.clearTimeout.bind(ha))}function fa(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class ba extends Error{constructor(k,B,U){super(k),this.description=B,this.context=U,this.type="TransportError"}}class pa extends ra{constructor(k){super(),this.writable=!1,ua(this,k),this.opts=k,this.query=k.query,this.socket=k.socket,this.supportsBinary=!k.forceBase64}onError(k,B,U){return super.emitReserved("error",new ba(k,B,U)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(k){"open"===this.readyState&&this.write(k)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(k){const B=Zn(k,this.socket.binaryType);this.onPacket(B)}onPacket(k){super.emitReserved("packet",k)}onClose(k){this.readyState="closed",super.emitReserved("close",k)}pause(k){}createUri(k,B={}){return k+"://"+this._hostname()+this._port()+this.opts.path+this._query(B)}_hostname(){const k=this.opts.hostname;return-1===k.indexOf(":")?k:"["+k+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(k){const B=function(k){let B="";for(let U in k)k.hasOwnProperty(U)&&(B.length&&(B+="&"),B+=encodeURIComponent(U)+"="+encodeURIComponent(k[U]));return B}(k);return B.length?"?"+B:""}}class va extends pa{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(k){this.readyState="pausing";const B=()=>{this.readyState="paused",k()};if(this._polling||!this.writable){let k=0;this._polling&&(k++,this.once("pollComplete",(function(){--k||B()}))),this.writable||(k++,this.once("drain",(function(){--k||B()})))}else B()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(k){((k,B)=>{const U=k.split(ea),F=[];for(let G=0;G{if("opening"===this.readyState&&"open"===k.type&&this.onOpen(),"close"===k.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(k)})),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const k=()=>{this.write([{type:"close"}])};"open"===this.readyState?k():this.once("open",k)}write(k){this.writable=!1,((k,B)=>{const U=k.length,F=new Array(U);let G=0;k.forEach(((k,j)=>{Wn(k,!1,(k=>{F[j]=k,++G===U&&B(F.join(ea))}))}))})(k,(k=>{this.doWrite(k,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const k=this.opts.secure?"https":"http",B=this.query||{};return!1!==this.opts.timestampRequests&&(B[this.opts.timestampParam]=fa()),this.supportsBinary||B.sid||(B.b64=1),this.createUri(k,B)}}let ga=!1;try{ga="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(Po){}const ma=ga;function ya(){}class _a extends va{constructor(k){if(super(k),"undefined"!=typeof location){const B="https:"===location.protocol;let U=location.port;U||(U=B?"443":"80"),this.xd="undefined"!=typeof location&&k.hostname!==location.hostname||U!==k.port}}doWrite(k,B){const U=this.request({method:"POST",data:k});U.on("success",B),U.on("error",((k,B)=>{this.onError("xhr post error",k,B)}))}doPoll(){const k=this.request();k.on("data",this.onData.bind(this)),k.on("error",((k,B)=>{this.onError("xhr poll error",k,B)})),this.pollXhr=k}}class Ea extends ra{constructor(k,B,U){super(),this.createRequest=k,ua(this,U),this._opts=U,this._method=U.method||"GET",this._uri=B,this._data=void 0!==U.data?U.data:null,this._create()}_create(){var k;const B=ca(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");B.xdomain=!!this._opts.xd;const U=this._xhr=this.createRequest(B);try{U.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){U.setDisableHeaderCheck&&U.setDisableHeaderCheck(!0);for(let k in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(k)&&U.setRequestHeader(k,this._opts.extraHeaders[k])}}catch(e){}if("POST"===this._method)try{U.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{U.setRequestHeader("Accept","*/*")}catch(e){}null===(k=this._opts.cookieJar)||void 0===k||k.addCookies(U),"withCredentials"in U&&(U.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(U.timeout=this._opts.requestTimeout),U.onreadystatechange=()=>{var k;3===U.readyState&&(null===(k=this._opts.cookieJar)||void 0===k||k.parseCookies(U.getResponseHeader("set-cookie"))),4===U.readyState&&(200===U.status||1223===U.status?this._onLoad():this.setTimeoutFn((()=>{this._onError("number"==typeof U.status?U.status:0)}),0))},U.send(this._data)}catch(e){return void this.setTimeoutFn((()=>{this._onError(e)}),0)}"undefined"!=typeof document&&(this._index=Ea.requestsCount++,Ea.requests[this._index]=this)}_onError(k){this.emitReserved("error",k,this._xhr),this._cleanup(!0)}_cleanup(k){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=ya,k)try{this._xhr.abort()}catch(e){}"undefined"!=typeof document&&delete Ea.requests[this._index],this._xhr=null}}_onLoad(){const k=this._xhr.responseText;null!==k&&(this.emitReserved("data",k),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(Ea.requestsCount=0,Ea.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",wa);else if("function"==typeof addEventListener){addEventListener("onpagehide"in ha?"pagehide":"unload",wa,!1)}function wa(){for(let k in Ea.requests)Ea.requests.hasOwnProperty(k)&&Ea.requests[k].abort()}const Ta=function(){const k=Sa({xdomain:!1});return k&&null!==k.responseType}();function Sa(k){const B=k.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!B||ma))return new XMLHttpRequest}catch(e){}if(!B)try{return new(ha[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}const Aa="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class Ca extends pa{get name(){return"websocket"}doOpen(){const k=this.uri(),B=this.opts.protocols,U=Aa?{}:ca(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(U.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(k,B,U)}catch(Po){return this.emitReserved("error",Po)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=k=>this.onClose({description:"websocket connection closed",context:k}),this.ws.onmessage=k=>this.onData(k.data),this.ws.onerror=k=>this.onError("websocket error",k)}write(k){this.writable=!1;for(let B=0;B{try{this.doWrite(U,k)}catch(e){}F&&oa((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const k=this.opts.secure?"wss":"ws",B=this.query||{};return this.opts.timestampRequests&&(B[this.opts.timestampParam]=fa()),this.supportsBinary||(B.b64=1),this.createUri(k,B)}}const Oa=ha.WebSocket||ha.MozWebSocket;const Ia={websocket:class extends Ca{createSocket(k,B,U){return Aa?new Oa(k,B,U):B?new Oa(k,B):new Oa(k)}doWrite(k,B){this.ws.send(B)}},webtransport:class extends pa{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(Po){return this.emitReserved("error",Po)}this._transport.closed.then((()=>{this.onClose()})).catch((k=>{this.onError("webtransport error",k)})),this._transport.ready.then((()=>{this._transport.createBidirectionalStream().then((k=>{const B=function(k,B){sa||(sa=new TextDecoder);const U=[];let F=0,G=-1,j=!1;return new TransformStream({transform($,H){for(U.push($);;){if(0===F){if(na(U)<1)break;const k=aa(U,1);j=128==(128&k[0]),G=127&k[0],F=G<126?3:126===G?1:2}else if(1===F){if(na(U)<2)break;const k=aa(U,2);G=new DataView(k.buffer,k.byteOffset,k.length).getUint16(0),F=3}else if(2===F){if(na(U)<8)break;const k=aa(U,8),B=new DataView(k.buffer,k.byteOffset,k.length),j=B.getUint32(0);if(j>Math.pow(2,21)-1){H.enqueue(jn);break}G=j*Math.pow(2,32)+B.getUint32(4),F=3}else{if(na(U)k){H.enqueue(jn);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),U=k.readable.pipeThrough(B).getReader(),F=ia();F.readable.pipeTo(k.writable),this._writer=F.writable.getWriter();const G=()=>{U.read().then((({done:k,value:B})=>{k||(this.onPacket(B),G())})).catch((k=>{}))};G();const j={type:"open"};this.query.sid&&(j.data=`{"sid":"${this.query.sid}"}`),this._writer.write(j).then((()=>this.onOpen()))}))}))}write(k){this.writable=!1;for(let B=0;B{F&&oa((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var k;null===(k=this._transport)||void 0===k||k.close()}},polling:class extends _a{constructor(k){super(k);const B=k&&k.forceBase64;this.supportsBinary=Ta&&!B}request(k={}){return Object.assign(k,{xd:this.xd},this.opts),new Ea(Sa,this.uri(),k)}}},Da=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Ra=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Pa(k){if(k.length>8e3)throw"URI too long";const B=k,U=k.indexOf("["),F=k.indexOf("]");-1!=U&&-1!=F&&(k=k.substring(0,U)+k.substring(U,F).replace(/:/g,";")+k.substring(F,k.length));let G=Da.exec(k||""),j={},$=14;for(;$--;)j[Ra[$]]=G[$]||"";return-1!=U&&-1!=F&&(j.source=B,j.host=j.host.substring(1,j.host.length-1).replace(/;/g,":"),j.authority=j.authority.replace("[","").replace("]","").replace(/;/g,":"),j.ipv6uri=!0),j.pathNames=function(k,B){const U=/\/{2,9}/g,F=B.replace(U,"/").split("/");"/"!=B.slice(0,1)&&0!==B.length||F.splice(0,1);"/"==B.slice(-1)&&F.splice(F.length-1,1);return F}(0,j.path),j.queryKey=function(k,B){const U={};return B.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(k,B,F){B&&(U[B]=F)})),U}(0,j.query),j}const Ma="function"==typeof addEventListener&&"function"==typeof removeEventListener,Na=[];Ma&&addEventListener("offline",(()=>{Na.forEach((k=>k()))}),!1);class xa extends ra{constructor(k,B){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,k&&"object"==typeof k&&(B=k,k=null),k){const U=Pa(k);B.hostname=U.host,B.secure="https"===U.protocol||"wss"===U.protocol,B.port=U.port,U.query&&(B.query=U.query)}else B.host&&(B.hostname=Pa(B.host).host);ua(this,B),this.secure=null!=B.secure?B.secure:"undefined"!=typeof location&&"https:"===location.protocol,B.hostname&&!B.port&&(B.port=this.secure?"443":"80"),this.hostname=B.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=B.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},B.transports.forEach((k=>{const B=k.prototype.name;this.transports.push(B),this._transportsByName[B]=k})),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},B),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(k){let B={},U=k.split("&");for(let F=0,G=U.length;F{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Na.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(k){const B=Object.assign({},this.opts.query);B.EIO=4,B.transport=k,this.id&&(B.sid=this.id);const U=Object.assign({},this.opts,{query:B,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[k]);return new this._transportsByName[k](U)}_open(){if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);const k=this.opts.rememberUpgrade&&xa.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const B=this.createTransport(k);B.open(),this.setTransport(B)}setTransport(k){this.transport&&this.transport.removeAllListeners(),this.transport=k,k.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",(k=>this._onClose("transport close",k)))}onOpen(){this.readyState="open",xa.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(k){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",k),this.emitReserved("heartbeat"),k.type){case"open":this.onHandshake(JSON.parse(k.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const B=new Error("server error");B.code=k.data,this._onError(B);break;case"message":this.emitReserved("data",k.data),this.emitReserved("message",k.data)}}onHandshake(k){this.emitReserved("handshake",k),this.id=k.sid,this.transport.query.sid=k.sid,this._pingInterval=k.pingInterval,this._pingTimeout=k.pingTimeout,this._maxPayload=k.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const k=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+k,this._pingTimeoutTimer=this.setTimeoutFn((()=>{this._onClose("ping timeout")}),k),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const k=this._getWritablePackets();this.transport.send(k),this._prevBufferLen=k.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let k=1;for(let U=0;U=57344?U+=3:(F++,U+=4);return U}(B):Math.ceil(1.33*(B.byteLength||B.size))),U>0&&k>this._maxPayload)return this.writeBuffer.slice(0,U);k+=2}var B;return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const k=Date.now()>this._pingTimeoutTime;return k&&(this._pingTimeoutTime=0,oa((()=>{this._onClose("ping timeout")}),this.setTimeoutFn)),k}write(k,B,U){return this._sendPacket("message",k,B,U),this}send(k,B,U){return this._sendPacket("message",k,B,U),this}_sendPacket(k,B,U,F){if("function"==typeof B&&(F=B,B=void 0),"function"==typeof U&&(F=U,U=null),"closing"===this.readyState||"closed"===this.readyState)return;(U=U||{}).compress=!1!==U.compress;const G={type:k,data:B,options:U};this.emitReserved("packetCreate",G),this.writeBuffer.push(G),F&&this.once("flush",F),this.flush()}close(){const k=()=>{this._onClose("forced close"),this.transport.close()},B=()=>{this.off("upgrade",B),this.off("upgradeError",B),k()},U=()=>{this.once("upgrade",B),this.once("upgradeError",B)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?U():k()})):this.upgrading?U():k()),this}_onError(k){if(xa.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",k),this._onClose("transport error",k)}_onClose(k,B){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Ma&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const k=Na.indexOf(this._offlineEventListener);-1!==k&&Na.splice(k,1)}this.readyState="closed",this.id=null,this.emitReserved("close",k,B),this.writeBuffer=[],this._prevBufferLen=0}}}xa.protocol=4;class La extends xa{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let k=0;k{U||(B.send([{type:"ping",data:"probe"}]),B.once("packet",(k=>{if(!U)if("pong"===k.type&&"probe"===k.data){if(this.upgrading=!0,this.emitReserved("upgrading",B),!B)return;xa.priorWebsocketSuccess="websocket"===B.name,this.transport.pause((()=>{U||"closed"!==this.readyState&&(W(),this.setTransport(B),B.send([{type:"upgrade"}]),this.emitReserved("upgrade",B),B=null,this.upgrading=!1,this.flush())}))}else{const k=new Error("probe error");k.transport=B.name,this.emitReserved("upgradeError",k)}})))};function G(){U||(U=!0,W(),B.close(),B=null)}const j=k=>{const U=new Error("probe error: "+k);U.transport=B.name,G(),this.emitReserved("upgradeError",U)};function $(){j("transport closed")}function H(){j("socket closed")}function V(k){B&&k.name!==B.name&&G()}const W=()=>{B.removeListener("open",F),B.removeListener("error",j),B.removeListener("close",$),this.off("close",H),this.off("upgrading",V)};B.once("open",F),B.once("error",j),B.once("close",$),this.once("close",H),this.once("upgrading",V),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==k?this.setTimeoutFn((()=>{U||B.open()}),200):B.open()}onHandshake(k){this._upgrades=this._filterUpgrades(k.upgrades),super.onHandshake(k)}_filterUpgrades(k){const B=[];for(let U=0;UIa[k])).filter((k=>!!k))),super(k,U)}}const Ba="function"==typeof ArrayBuffer,Ua=Object.prototype.toString,Fa="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Ua.call(Blob),Ga="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===Ua.call(File);function ja(k){return Ba&&(k instanceof ArrayBuffer||(k=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(k):k.buffer instanceof ArrayBuffer)(k))||Fa&&k instanceof Blob||Ga&&k instanceof File}function $a(k,B){if(!k||"object"!=typeof k)return!1;if(Array.isArray(k)){for(let B=0,U=k.length;B=0&&k.num{delete this.acks[k];for(let B=0;B{this.io.clearTimeoutFn(G),B.apply(this,k)};j.withError=!0,this.acks[k]=j}emitWithAck(k,...B){return new Promise(((U,F)=>{const G=(k,B)=>k?F(k):U(B);G.withError=!0,B.push(G),this.emit(k,...B)}))}_addToQueue(k){let B;"function"==typeof k[k.length-1]&&(B=k.pop());const U={id:this._queueSeq++,tryCount:0,pending:!1,args:k,flags:Object.assign({fromQueue:!0},this.flags)};k.push(((k,...F)=>{if(U!==this._queue[0])return;return null!==k?U.tryCount>this._opts.retries&&(this._queue.shift(),B&&B(k)):(this._queue.shift(),B&&B(null,...F)),U.pending=!1,this._drainQueue()})),this._queue.push(U),this._drainQueue()}_drainQueue(k=!1){if(!this.connected||0===this._queue.length)return;const B=this._queue[0];B.pending&&!k||(B.pending=!0,B.tryCount++,this.flags=B.flags,this.emit.apply(this,B.args))}packet(k){k.nsp=this.nsp,this.io._packet(k)}onopen(){"function"==typeof this.auth?this.auth((k=>{this._sendConnectPacket(k)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(k){this.packet({type:Ya.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},k):k})}onerror(k){this.connected||this.emitReserved("connect_error",k)}onclose(k,B){this.connected=!1,delete this.id,this.emitReserved("disconnect",k,B),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach((k=>{if(!this.sendBuffer.some((B=>String(B.id)===k))){const B=this.acks[k];delete this.acks[k],B.withError&&B.call(this,new Error("socket has been disconnected"))}}))}onpacket(k){if(k.nsp===this.nsp)switch(k.type){case Ya.CONNECT:k.data&&k.data.sid?this.onconnect(k.data.sid,k.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ya.EVENT:case Ya.BINARY_EVENT:this.onevent(k);break;case Ya.ACK:case Ya.BINARY_ACK:this.onack(k);break;case Ya.DISCONNECT:this.ondisconnect();break;case Ya.CONNECT_ERROR:this.destroy();const B=new Error(k.data.message);B.data=k.data.data,this.emitReserved("connect_error",B)}}onevent(k){const B=k.data||[];null!=k.id&&B.push(this.ack(k.id)),this.connected?this.emitEvent(B):this.receiveBuffer.push(Object.freeze(B))}emitEvent(k){if(this._anyListeners&&this._anyListeners.length){const B=this._anyListeners.slice();for(const U of B)U.apply(this,k)}super.emit.apply(this,k),this._pid&&k.length&&"string"==typeof k[k.length-1]&&(this._lastOffset=k[k.length-1])}ack(k){const B=this;let U=!1;return function(...F){U||(U=!0,B.packet({type:Ya.ACK,id:k,data:F}))}}onack(k){const B=this.acks[k.id];"function"==typeof B&&(delete this.acks[k.id],B.withError&&k.data.unshift(null),B.apply(this,k.data))}onconnect(k,B){this.id=k,this.recovered=B&&this._pid===B,this._pid=B,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((k=>this.emitEvent(k))),this.receiveBuffer=[],this.sendBuffer.forEach((k=>{this.notifyOutgoingListeners(k),this.packet(k)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((k=>k())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ya.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(k){return this.flags.compress=k,this}get volatile(){return this.flags.volatile=!0,this}timeout(k){return this.flags.timeout=k,this}onAny(k){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(k),this}prependAny(k){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(k),this}offAny(k){if(!this._anyListeners)return this;if(k){const B=this._anyListeners;for(let U=0;U0&&k.jitter<=1?k.jitter:0,this.attempts=0}sr.prototype.duration=function(){var k=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var B=Math.random(),U=Math.floor(B*this.jitter*k);k=0==(1&Math.floor(10*B))?k-U:k+U}return 0|Math.min(k,this.max)},sr.prototype.reset=function(){this.attempts=0},sr.prototype.setMin=function(k){this.ms=k},sr.prototype.setMax=function(k){this.max=k},sr.prototype.setJitter=function(k){this.jitter=k};class nr extends ra{constructor(k,B){var U;super(),this.nsps={},this.subs=[],k&&"object"==typeof k&&(B=k,k=void 0),(B=B||{}).path=B.path||"/socket.io",this.opts=B,ua(this,B),this.reconnection(!1!==B.reconnection),this.reconnectionAttempts(B.reconnectionAttempts||1/0),this.reconnectionDelay(B.reconnectionDelay||1e3),this.reconnectionDelayMax(B.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(U=B.randomizationFactor)&&void 0!==U?U:.5),this.backoff=new sr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==B.timeout?2e4:B.timeout),this._readyState="closed",this.uri=k;const G=B.parser||F;this.encoder=new G.Encoder,this.decoder=new G.Decoder,this._autoConnect=!1!==B.autoConnect,this._autoConnect&&this.open()}reconnection(k){return arguments.length?(this._reconnection=!!k,k||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(k){return void 0===k?this._reconnectionAttempts:(this._reconnectionAttempts=k,this)}reconnectionDelay(k){var B;return void 0===k?this._reconnectionDelay:(this._reconnectionDelay=k,null===(B=this.backoff)||void 0===B||B.setMin(k),this)}randomizationFactor(k){var B;return void 0===k?this._randomizationFactor:(this._randomizationFactor=k,null===(B=this.backoff)||void 0===B||B.setJitter(k),this)}reconnectionDelayMax(k){var B;return void 0===k?this._reconnectionDelayMax:(this._reconnectionDelayMax=k,null===(B=this.backoff)||void 0===B||B.setMax(k),this)}timeout(k){return arguments.length?(this._timeout=k,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(k){if(~this._readyState.indexOf("open"))return this;this.engine=new ka(this.uri,this.opts);const B=this.engine,U=this;this._readyState="opening",this.skipReconnect=!1;const F=tr(B,"open",(function(){U.onopen(),k&&k()})),G=B=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",B),k?k(B):this.maybeReconnectOnOpen()},j=tr(B,"error",G);if(!1!==this._timeout){const k=this._timeout,U=this.setTimeoutFn((()=>{F(),G(new Error("timeout")),B.close()}),k);this.opts.autoUnref&&U.unref(),this.subs.push((()=>{this.clearTimeoutFn(U)}))}return this.subs.push(F),this.subs.push(j),this}connect(k){return this.open(k)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const k=this.engine;this.subs.push(tr(k,"ping",this.onping.bind(this)),tr(k,"data",this.ondata.bind(this)),tr(k,"error",this.onerror.bind(this)),tr(k,"close",this.onclose.bind(this)),tr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(k){try{this.decoder.add(k)}catch(e){this.onclose("parse error",e)}}ondecoded(k){oa((()=>{this.emitReserved("packet",k)}),this.setTimeoutFn)}onerror(k){this.emitReserved("error",k)}socket(k,B){let U=this.nsps[k];return U?this._autoConnect&&!U.active&&U.connect():(U=new ir(this,k,B),this.nsps[k]=U),U}_destroy(k){const B=Object.keys(this.nsps);for(const U of B){if(this.nsps[U].active)return}this._close()}_packet(k){const B=this.encoder.encode(k);for(let U=0;Uk())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(k,B){var U;this.cleanup(),null===(U=this.engine)||void 0===U||U.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",k,B),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const k=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const B=this.backoff.duration();this._reconnecting=!0;const U=this.setTimeoutFn((()=>{k.skipReconnect||(this.emitReserved("reconnect_attempt",k.backoff.attempts),k.skipReconnect||k.open((B=>{B?(k._reconnecting=!1,k.reconnect(),this.emitReserved("reconnect_error",B)):k.onreconnect()})))}),B);this.opts.autoUnref&&U.unref(),this.subs.push((()=>{this.clearTimeoutFn(U)}))}}onreconnect(){const k=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",k)}}const ar={};function rr(k,B){"object"==typeof k&&(B=k,k=void 0);const U=function(k,B="",U){let F=k;U=U||"undefined"!=typeof location&&location,null==k&&(k=U.protocol+"//"+U.host),"string"==typeof k&&("/"===k.charAt(0)&&(k="/"===k.charAt(1)?U.protocol+k:U.host+k),/^(https?|wss?):\/\//.test(k)||(k=void 0!==U?U.protocol+"//"+k:"https://"+k),F=Pa(k)),F.port||(/^(http|ws)$/.test(F.protocol)?F.port="80":/^(http|ws)s$/.test(F.protocol)&&(F.port="443")),F.path=F.path||"/";const G=-1!==F.host.indexOf(":")?"["+F.host+"]":F.host;return F.id=F.protocol+"://"+G+":"+F.port+B,F.href=F.protocol+"://"+G+(U&&U.port===F.port?"":":"+F.port),F}(k,(B=B||{}).path||"/socket.io"),F=U.source,G=U.id,j=U.path,$=ar[G]&&j in ar[G].nsps;let H;return B.forceNew||B["force new connection"]||!1===B.multiplex||$?H=new nr(F,B):(ar[G]||(ar[G]=new nr(F,B)),H=ar[G]),U.query&&!B.query&&(B.query=U.queryKey),H.socket(U.path,B)}var or,hr;Object.assign(rr,{Manager:nr,Socket:ir,io:rr,connect:rr}),function(k){k.Disconnect="disconnect",k.Reconnecting="reconnecting",k.Reconnect="reconnect",k.Message="message",k.PlayerJoined="playerJoined",k.PlayerLeft="playerLeft",k.PlayerList="playerList",k.Connect="connect",k.ConnectFailed="connect_failed",k.Error="error",k.ConnectError="connect_error",k.ReconnectAttempt="reconnect_attempt",k.ReconnectError="reconnect_error",k.ReconnectFailed="reconnect_failed",k.AnalyticsInfo="INFO",k.AnalyticsError="ERROR",k.Matched="matched",k.WaitTimeExhausted="waitTimeExhausted"}(or||(or={}));let cr=hr=class{get id(){return this.socket?this.socket.id:null}connect(k,B=null,U={}){if(!it.A.isDefined(this.socket)){let F=k;null!==B&&(F=`${F}:${B}`),this.socket=rr(F,(0,tt.merge)({forceNew:!0,transports:["websocket","xhr-polling","jsonp-polling","htmlfile"]},U))}}disconnect(){it.A.isDefined(this.socket)&&(!this.socket.connected&&this.socket.disconnected||this.socket.disconnect(),this.socket=null)}addListener(k,B){if(it.A.isDefined(this.socket))if(-1!==hr.IO_EVENTS.indexOf(k)){const U=k;this.socket.io.on(U,B)}else this.socket.on(k,B)}removeListener(k,B){if(it.A.isDefined(this.socket))if(-1!==hr.IO_EVENTS.indexOf(k)){const U=k;this.socket.io.off(U,B)}else this.socket.off(k,B)}emitEvent(k,B){it.A.isDefined(this.socket)&&this.socket.emit(k,B)}setQuery(k){it.A.isDefined(this.socket)&&(this.socket.io.opts.query=k)}isConnected(){return it.A.isDefined(this.socket)&&this.socket.connected}};var dr;cr.IO_EVENTS=[or.Reconnect,or.ReconnectAttempt,or.ReconnectError,or.ReconnectFailed],cr=hr=(0,j.Cg)([(0,Ge.injectable)()],cr),function(k){k.Get="GET",k.Post="POST",k.Put="PUT",k.Patch="PATCH",k.Delete="DELETE",k.Head="HEAD"}(dr||(dr={}));class lr{constructor(){this._httpStatusCode=0,this._headers=new Map,this._body=null,this._data=null,this._errorMessage=null}setHttpStatusCode(k){return this._httpStatusCode=k,this}getHttpStatusCode(){return this._httpStatusCode}setHeader(k,B,U=!0){const F=k.toLowerCase();return!U&&this._headers.has(F)?Z.V.log(`Could not set response header ${k} because it was already set`,J.$.Warning):this._headers.set(F,B),this}getHeader(k){const B=k.toLowerCase();return this._headers.has(B)?this._headers.get(B):null}setBody(k){return this._body=k,this}getBody(){return this._body}setErrorMessage(k){return this._errorMessage=k,this}getErrorMessage(){return this._errorMessage}wasSuccessful(){return this._httpStatusCode>=200&&this._httpStatusCode<=299&&null===this._errorMessage}setData(k){return this._data=k,this}getData(){return this._data}}let ur=class{constructor(){this._baseURI=null,this._defaultHeaders=new Map,this._defaultResponseHandler=new Map}setDefaultHeader(k,B,U=!0){!U&&this._defaultHeaders.has(k)?Z.V.log(`Could not set header ${k} as it already has a value`,J.$.Warning):this._defaultHeaders.set(k,B)}getDefaultHeaders(){return this._defaultHeaders}setBaseURI(k){this._baseURI=k}getBaseURI(){return this._baseURI}setDefaultResponseHandler(k,B,U=null){const F=`${k}`;this._defaultResponseHandler.has(F)?Z.V.log(`Could not set default handler for ${F} responses as one already exists`,J.$.Warning):this._defaultResponseHandler.set(F,{context:U,func:B})}clearDefaultResponseHandler(k){const B=`${k}`;this._defaultResponseHandler.has(B)&&this._defaultResponseHandler.delete(B)}sendRequest(k){return(0,j.sH)(this,void 0,void 0,(function*(){k.getRequestInterceptors().forEach((B=>{B.func.call(B.context,k)})),k.getBaseURI()||k.setBaseURI(this._baseURI);const B=k.getHeaders();return this._defaultHeaders.forEach(((U,F)=>{B.has(F)||k.setHeader(F,U)})),new Promise((B=>{this.sendFetchRequest(k,this.getRequestInitData(k),B)}))}))}getRequestInitData(k){const B={method:k.getMethod(),headers:{}},U=k.getHeaders();U.size>0&&U.forEach(((k,U)=>{B.headers[U]=k}));k.shouldIncludeCredentials()&&(B.credentials="include");const F=k.getBody();return F&&(k.getMethod()!==dr.Get&&k.getMethod()!==dr.Head?(B.headers["Content-Type"]=F.getContentType(),B.body=F.getData()):Z.V.log(`Cannot send a body for ${k.getMethod()} ${k.getFullURI()}`,J.$.Warning)),B}sendFetchRequest(k,B,U){return(0,j.sH)(this,arguments,void 0,(function*(k,B,U,F=1){let G=!1;const j=window.setTimeout((()=>{G=!0,this.retryRequest(k,B,U,F)||U((new lr).setHttpStatusCode(408).setErrorMessage("The request has timed out."))}),k.getTimeout());let $=null;try{$=yield fetch(k.getFullURI(),B)}catch(e){this.retryRequest(k,B,U,F)||U((new lr).setHttpStatusCode(0).setErrorMessage(`Request could not be sent - ${e.message}`))}if(window.clearTimeout(j),$&&!G){const B=new lr;if(B.setHttpStatusCode($.status),$.headers.forEach(((k,U)=>{B.setHeader(U,k,!0)})),B.setBody(yield $.arrayBuffer()),k.getResponseInterceptors().forEach((k=>{k.func.call(k.context,B)})),k.shouldUseDefaultResponseHandlers()&&this._defaultResponseHandler.size>0){let k=B.getHttpStatusCode().toString();for(let U=k.length-1;U>=0;--U){if(this._defaultResponseHandler.has(k)){const U=this._defaultResponseHandler.get(k);U.func.call(U.context,B);break}k=`${k.substr(0,U)}*${k.substr(U+1)}`}}U(B)}}))}retryRequest(k,B,U,F){const G=()=>{this.sendFetchRequest(k,B,U,F+1)};return F<=k.getRetryCount()&&(k.retryDelayMS>0||k.retryIncrementMS>0?(window.setTimeout(G,k.retryDelayMS),k.retryDelayMS=Math.min(k.retryDelayMS+k.retryIncrementMS,k.retryMaxDelayMS)):G(),!0)}};ur=(0,j.Cg)([(0,Ge.injectable)()],ur);class fr{constructor(){}static convertToJson(k){const B=new Uint8Array(k.getBody());if(B.length>0){const U=it.A.bufferToUtf8String(B);try{k.setData(JSON.parse(U))}catch(e){Z.V.log(`Malformed JSON in response: ${U}`,J.$.Error),k.setErrorMessage("No JSON body due to malformed payload")}}}}class br{constructor(k=null){this._jsonObject=null,this.setJson(k)}setJson(k){this._jsonObject=k}getJson(){return this._jsonObject}getData(){return this._jsonObject?JSON.stringify(this._jsonObject):null}getContentType(){return"application/json"}}class pr{constructor(){this._baseURI=null,this._requestURI=null,this._method=dr.Get,this._headers=new Map,this._queryParameters=new Map,this._shouldUseDefaultResponseHandlers=!0,this._requestInterceptors=[],this._responseInterceptors=[],this._body=null,this._retryCount=0,this._includeCredentials=!1,this._retryDelayMS=1e3,this._retryIncrementMS=2e3,this._retryMaxDelayMS=15e3,this._timeout=1e4}get retryDelayMS(){return this._retryDelayMS}set retryDelayMS(k){this._retryDelayMS=k}get retryIncrementMS(){return this._retryIncrementMS}set retryIncrementMS(k){this._retryIncrementMS=k}get retryMaxDelayMS(){return this._retryMaxDelayMS}set retryMaxDelayMS(k){this._retryMaxDelayMS=k}setHeader(k,B,U=!0){return!U&&this._headers.has(k)?Z.V.log(`Could not set header ${k} because an existing value for it already exists.`,J.$.Warning):this._headers.set(k,B),this}getHeaders(){return this._headers}setUseDefaultResponseHandlers(k){return this._shouldUseDefaultResponseHandlers=k,this}shouldUseDefaultResponseHandlers(){return this._shouldUseDefaultResponseHandlers}setBaseURI(k){return this._baseURI=k,this}getBaseURI(){return this._baseURI}setRequestURI(k){return this._requestURI=k,this}getRequestURI(){return this._requestURI}setQueryParameter(k,B,U=!0){return!U&&this._queryParameters.has(k)?Z.V.log(`Could not set query parameter '${k}' as it already has a value`,J.$.Warning):this._queryParameters.set(k,B),this}getQueryParameters(){return this._queryParameters}getFullURI(){let k=null;if(it.A.isDefined(this._requestURI)?k=it.A.isDefined(this._baseURI)?`${this._baseURI}/${this._requestURI}`:this._requestURI:it.A.isDefined(this._baseURI)&&(k=this._baseURI),null!==k&&this._queryParameters.size>0){let B="";this._queryParameters.forEach(((k,U)=>{B+=`${encodeURIComponent(U)}=${encodeURIComponent(k)}&`})),k=`${k}?${B.substr(0,B.length-1)}`}return k}setMethod(k){return this._method=k,this}getMethod(){return this._method}addRequestInterceptor(k,B=null){return this._requestInterceptors.push({context:B,func:k}),this}removeRequestInterceptor(k,B=null){const U=this._requestInterceptors.findIndex((U=>U.func===k&&U.context===B));return U>-1&&this._requestInterceptors.splice(U,1),this}getRequestInterceptors(){return this._requestInterceptors}addResponseInterceptor(k,B=null){return this._responseInterceptors.push({func:k,context:B}),this}removeResponseInterceptor(k,B=null){const U=this._responseInterceptors.findIndex((U=>U.func===k&&U.context===B));return U>-1&&this._responseInterceptors.splice(U,1),this}getResponseInterceptors(){return this._responseInterceptors}setRetryCount(k){return this._retryCount=k,this}getRetryCount(){return this._retryCount}setTimeout(k){return this._timeout=k,this}getTimeout(){return this._timeout}setIncludeCredentials(k){return this._includeCredentials=k,this}shouldIncludeCredentials(){return this._includeCredentials}setBody(k){return this._body=k,this}getBody(){return this._body}}var vr;!function(k){k[k.Stepped=0]="Stepped",k[k.Random=1]="Random",k[k.PhasePerSample=2]="PhasePerSample",k[k.Fixed=3]="Fixed"}(vr||(vr={}));class gr{set type(k){k!==this._type&&(this._type=k,this._getValueFunction=gr.GET_VALUE_FUNCTIONS[k])}get type(){return this._type}constructor(k=vr.Random){this.min=0,this.max=1,this.step=.5,this.offset=0,this.onSetMinMax=new Mt.H,this._value=0,this._getValueFunction=this.getValueRandom,this._type=vr.Fixed,this._value=this.offset,this.type=k}setMinMax(k=0,B=1){this.min=k,this.max=B,this.onSetMinMax.dispatch()}getValue(){return this._getValueFunction()}getValueStepped(){return this._value+=this.step,this._value%=this.max-this.min,this._value+this.min}getValueRandom(){return Math.random()*(this.max-this.min)+this.min}getValuePhasePerSample(){return this._value+=this.step,this._value%=1,ut.c.linear(this.min,this.max,this._value)}getValueFixed(){return this.min}destroy(){this.onSetMinMax.dispose(),this.onSetMinMax=null}}gr.GET_VALUE_FUNCTIONS={[vr.Stepped]:gr.prototype.getValueStepped,[vr.Random]:gr.prototype.getValueRandom,[vr.PhasePerSample]:gr.prototype.getValuePhasePerSample,[vr.Fixed]:gr.prototype.getValueFixed};class mr{get life(){return this._life}set life(k){this._life=k,this._lifePercentage=this.life/this.startingLife}get lifePercentage(){return this._lifePercentage}constructor(){this._life=1,this.startingLife=1,this.color=Ot.y.WHITE,this.alpha=1,this.startingAlpha=1,this.velocity=new pt.I(0,0),this.position=new pt.I(0,0),this.initialWorldPosition=new pt.I(0,0),this.rotationalVelocity=0,this.rotation=0,this.scale=new pt.I(1,1),this.startingScale=new pt.I(1,1),this.reset()}reset(){this.life=1,this.color=Ot.y.WHITE,this.alpha=1,this.velocity.set(0,0),this.position.set(0,0),this.rotation=0,this.rotationalVelocity=0,this.scale.set(1,1)}}class yr{get next(){return this._next}set next(k){this._next&&(this._next._prev=null),this._next=k,k&&(k._prev=this)}get prev(){return this._prev}set prev(k){this._prev&&(this._prev._next=null),this._prev=k,k&&(k._next=this)}constructor(k){this.object=k}}class _r{addObjectToList(k){this.addToList(new yr(k))}addToList(k){k.next=this.head,k.prev=null,this.head=k}removeFirst(){if(!this.head)return null;const k=this.head;return this.head=k.next,k.next=null,k}removeFromList(k){return this.removeObjectFromList(k.object)}removeObjectFromList(k){if(!this.head)return null;let B=this.head;if(B.object===k)return this.head=this.head.next,B.next=B.prev=null,B;let U=this.head.next;for(;U;){if(U.object===k){const k=U.next;return U.next=U.prev=null,B.next=k,U}B=U,U=B.next}return null}getLength(){let k=0,B=this.head;for(;B;)k++,B=B.next;return k}forEach(k){let B=this.head;for(;B;)k(B.object),B=B.next}generateArray(){const k=[];let B=this.head;for(;B;)k.push(B.object),B=B.next;return k}}class Er{get autoRecycleOnDisable(){return this._autoRecycleOnDisable}set autoRecycleOnDisable(k){k!==this._autoRecycleOnDisable&&(k?(this.aliveList.forEach(this.addActiveChangeListener.bind(this)),this.deadList.forEach(this.addActiveChangeListener.bind(this))):(this.aliveList.forEach((k=>{k.onActiveChanged.removeAll(this)})),this.deadList.forEach((k=>{k.onActiveChanged.removeAll(this)}))),this._autoRecycleOnDisable=k)}constructor(k,B=null,U=null){this._autoRecycleOnDisable=!0,this.create=k,this.reset=B,this.die=U,this.deadList=new _r,this.aliveList=new _r}allocate(k){for(let B=0;B{k.active||this.recycleObject(k)}),this)}createNewObject(){const k=this.create();return this._autoRecycleOnDisable&&this.addActiveChangeListener(k),k.onDestroy.add((()=>{this.removeObject(k)}),this),this.aliveList.addObjectToList(k),k}recycleObject(k){const B=this.aliveList.removeObjectFromList(k);B?(this.deadList.addToList(B),this.die&&this.die(k)):this.log("recycleObject - Not recycling, object not found in alive stack!")}removeListeners(k){k.onActiveChanged.removeAll(this),k.onDestroy.removeAll(this)}removeObject(k){let B=this.deadList.removeObjectFromList(k);B||(B=this.aliveList.removeObjectFromList(k),B)?this.removeListeners(k):this.log("removeObject - Not removing, object not found in dead or alive stack!")}flush(k=!1){const B=[];for(;this.deadList.head;){const k=this.deadList.head.object;B.push(k),this.deadList.removeFirst(),this.removeListeners(k)}if(k)for(let U=0;Usuper.create}});return(0,j.sH)(this,void 0,void 0,(function*(){yield B.create.call(this,k),this.imageGuid&&(yield V.W.instance.loader.loadAssets([this.imageGuid]).catch(Ut.R.createHandler(`Failed to load image for ParticleInitializeImage - ${this.imageGuid}`)))}))}initialize(k){if(k.atlas=this.imageGuid,k.frame=this.frame,!k.renderComponent){const B=k.gameObject.addComponent(ge);B.smooth=!0,B.setAnchor(.5,.5),k.renderComponent=B}k.renderComponent.updateAsset(this.imageGuid,this.frame)}}class Pr extends Dr{constructor(){super(...arguments),this.life=new gr}initialize(k){k.life=this.life.getValue()}}class Mr extends Dr{constructor(){super(...arguments),this.point1=new pt.I,this.point2=new pt.I,this.lineLocation=new gr}initialize(k){const B=this.lineLocation.getValue();k.position.add(new pt.I(ut.c.linear(this.point1.x,this.point2.x,B),ut.c.linear(this.point1.y,this.point2.y,B)))}}class Nr extends Dr{constructor(){super(...arguments),this.xLocation=new gr,this.yLocation=new gr}initialize(k){k.position.add(new pt.I(this.xLocation.getValue(),this.yLocation.getValue()))}}class xr extends Dr{constructor(){super(...arguments),this.rotation=new gr}initialize(k){k.rotation+=this.rotation.getValue()}}class Lr extends Dr{constructor(){super(...arguments),this.speed=new gr}initialize(k){k.rotationalVelocity+=this.speed.getValue()}}class kr extends Dr{constructor(){super(...arguments),this.scale=new gr}initialize(k){const B=this.scale.getValue();k.scale.set(k.scale.x*B,k.scale.y*B)}}var Br,Ur,Fr,Gr=U(10673);!function(k){k.RGB="rgb",k.HSV="hsv",k.LCH="lch"}(Br||(Br={}));class jr extends Dr{constructor(){super(...arguments),this.angle=new gr,this.speed=new gr,this.followWorldTransform=!1}initialize(k){var B,U,F;const G=this.angle.getValue()*ut.c.DEG_TO_RAD,j=this.speed.getValue(),$=new pt.I(Math.sin(G)*j,Math.cos(G)*j);if(this.followWorldTransform){const G=null!==(F=null===(U=null===(B=k.gameObject.parent)||void 0===B?void 0:B.parent)||void 0===U?void 0:U.transform.worldScale)&&void 0!==F?F:new pt.I(1,1);k.velocity.add(new pt.I($.x*G.x,$.y*G.y))}else k.velocity.add($)}}class $r extends Dr{constructor(){super(...arguments),this.x=new gr,this.y=new gr,this.followWorldTransform=!1}initialize(k){var B,U,F;const G=this.x.getValue(),j=this.y.getValue();if(this.followWorldTransform){const $=null!==(F=null===(U=null===(B=k.gameObject.parent)||void 0===B?void 0:B.parent)||void 0===U?void 0:U.transform.worldScale)&&void 0!==F?F:new pt.I(1,1);k.velocity.add(new pt.I(G*$.x,j*$.y))}else k.velocity.add(new pt.I(G,j))}}!function(k){k.PositionRect="PositionRect",k.PositionLine="PositionLine",k.Image="Image",k.ImageList="ImageList",k.Alpha="Alpha",k.Life="Life",k.Rotation="Rotation",k.Scale="Scale",k.Velocity="Velocity",k.VelocityXY="VelocityXY",k.RotateWithVelocity="RotateWithVelocity",k.RotationalVelocity="RotationalVelocity",k.Spine="Spine",k.SpineRandomAnimation="SpineRandomAnimation",k.Tint="Tint"}(Ur||(Ur={})),function(k){k.Alpha="Alpha",k.AlphaMax="AlphaMax",k.Dampen="Dampen",k.Flipbook="Flipbook",k.LifeFromPosition="LifeFromPosition",k.RotateWithVelocity="RotateWithVelocity",k.Immortal="Immortal",k.Scale="Scale",k.Attract="Attract",k.Jitter="Jitter"}(Fr||(Fr={}));class Hr{static getInitializer(k){const B=Hr.InitializerConstructors.get(k)();return B.__type=k,B}static getBehaviour(k){const B=Hr.BehaviourConstructors.get(k)();return B.__type=k,B}static createInitializer(k,B){const U=new k;return U.__type=B,U}static createBehaviour(k,B){const U=new k;return U.__type=B,U}static getBehaviourNames(){return Array.from(Hr.BehaviourConstructors.keys())}static getInitializerNames(){return Array.from(Hr.InitializerConstructors.keys())}}Hr.InitializerConstructors=new Map([[Ur.Image,Hr.createInitializer.bind(Hr,Rr,Ur.Image)],[Ur.ImageList,Hr.createInitializer.bind(Hr,class extends Dr{constructor(){super(...arguments),this.imageGuids=["c108638e-c0db-414f-859f-bc33c6a4dbca"],this.randomize=!0,this._currentImageIndex=-1}create(k){const B=Object.create(null,{create:{get:()=>super.create}});return(0,j.sH)(this,void 0,void 0,(function*(){yield B.create.call(this,k),this.imageGuids&&(yield V.W.instance.loader.loadAssets(this.imageGuids).catch(Ut.R.createHandler(`Failed to load image for ParticleInitializeImage - ${this.imageGuids.join(", ")}`)))}))}initialize(k){if(this.randomize?this._currentImageIndex=Math.floor(Math.random()*this.imageGuids.length):this._currentImageIndex=(this._currentImageIndex+1)%this.imageGuids.length,k.atlas=this.imageGuids[this._currentImageIndex],!k.renderComponent){const B=k.gameObject.addComponent(ge);B.smooth=!0,B.setAnchor(.5,.5),k.renderComponent=B}k.renderComponent.updateAsset(k.atlas)}},Ur.ImageList)],[Ur.Rotation,Hr.createInitializer.bind(Hr,xr,Ur.Rotation)],[Ur.Scale,Hr.createInitializer.bind(Hr,kr,Ur.Scale)],[Ur.Life,Hr.createInitializer.bind(Hr,Pr,Ur.Life)],[Ur.Alpha,Hr.createInitializer.bind(Hr,class extends Dr{constructor(){super(...arguments),this.alpha=new gr}initialize(k){k.alpha=this.alpha.getValue()}},Ur.Alpha)],[Ur.Tint,Hr.createInitializer.bind(Hr,class extends Dr{constructor(){super(...arguments),this.colorA="#ffaaff",this.colorB="#ff00ff",this.mode=Br.RGB,this.mix=new gr}initialize(k){if(k.renderComponent){const B=Rt.stringToRgb(this.colorA),U=Rt.stringToRgb(this.colorB),F=this.mix.getValue();let G;switch(this.mode){case Br.HSV:G=Rt.hsvInterpolate(B,U,F);break;case Br.LCH:G=Rt.lchInterpolate(B,U,F);break;case Br.RGB:default:G=Rt.rgbInterpolate(B,U,F)}k.renderComponent.tint=dt.Color.shared.setValue([G.r,G.g,G.b]).toNumber()}}},Ur.Tint)],[Ur.Velocity,Hr.createInitializer.bind(Hr,jr,Ur.Velocity)],[Ur.VelocityXY,Hr.createInitializer.bind(Hr,$r,Ur.VelocityXY)],[Ur.RotateWithVelocity,Hr.createInitializer.bind(Hr,class extends Dr{initialize(k){const B=Math.atan2(k.velocity.y,k.velocity.x);k.rotation=B*ut.c.RAD_TO_DEG}},Ur.RotateWithVelocity)],[Ur.RotationalVelocity,Hr.createInitializer.bind(Hr,Lr,Ur.RotationalVelocity)],[Ur.PositionRect,Hr.createInitializer.bind(Hr,Nr,Ur.PositionRect)],[Ur.PositionLine,Hr.createInitializer.bind(Hr,Mr,Ur.PositionLine)],[Ur.Spine,Hr.createInitializer.bind(Hr,class extends Dr{constructor(){super(...arguments),this.asset="",this.animationName="",this.loopAnimation=!0}initialize(k){var B,U;if(!(null===(B=this.asset)||void 0===B?void 0:B.length))return;let F;k.renderComponent?F=k.renderComponent:(F=k.gameObject.addComponent(Gr.v),k.renderComponent=F),F.setAsset(this.asset),(null===(U=this.animationName)||void 0===U?void 0:U.length)&&F.setAnimationByName(0,this.animationName,this.loopAnimation)}},Ur.Spine)],[Ur.SpineRandomAnimation,Hr.createInitializer.bind(Hr,class extends Dr{constructor(){super(...arguments),this.loopAnimation=!0}initialize(k){const B=k.renderComponent;if(!B)return void Z.V.log("No Spine Found On Particle!!",J.$.Error);const U=B.getSpine().skeleton.data.animations,F=Math.floor(Math.random()*U.length);B.setAnimationByName(0,U[F].name,this.loopAnimation)}},Ur.SpineRandomAnimation)]]),Hr.BehaviourConstructors=new Map([[Fr.Alpha,Hr.createBehaviour.bind(Hr,Sr,Fr.Alpha)],[Fr.AlphaMax,Hr.createBehaviour.bind(Hr,Ar,Fr.AlphaMax)],[Fr.Scale,Hr.createBehaviour.bind(Hr,Ir,Fr.Scale)],[Fr.Dampen,Hr.createBehaviour.bind(Hr,class extends Tr{constructor(){super(...arguments),this.xDampen=.9,this.yDampen=.9,this.rotationalDampen=.9}update(k,B,U){k.rotationalVelocity*=Math.pow(this.rotationalDampen,U),k.velocity.x*=Math.pow(this.xDampen,U),k.velocity.y*=Math.pow(this.yDampen,U)}},Fr.Dampen)],[Fr.Flipbook,Hr.createBehaviour.bind(Hr,Cr,Fr.Flipbook)],[Fr.LifeFromPosition,Hr.createBehaviour.bind(Hr,Or,Fr.LifeFromPosition)],[Fr.Immortal,Hr.createBehaviour.bind(Hr,class extends Tr{constructor(){super(...arguments),this.minimumLife=1}update(k,B){k.life=Math.max(this.minimumLife,k.life)}},Fr.Immortal)],[Fr.Attract,Hr.createBehaviour.bind(Hr,class extends Tr{constructor(){super(...arguments),this.targetName="target",this.strength=.1,this.maxVelocity=20,this.velocityLerp=.1}create(k){var B;this._target=null===(B=k.GameObject.findChildByName(this.targetName))||void 0===B?void 0:B.findComponent(Ct.d)}update(k,B,U){if(!this._target)return;const F=this._target.localPosition,G=this._target.worldScale;F.x*=G.x,F.y*=G.y;const j=new pt.I((F.x-k.position.x)*this.strength,(F.y-k.position.y)*this.strength);j.getMagnitude()>this.maxVelocity&&(j.normalize(),j.multiply({x:this.maxVelocity,y:this.maxVelocity})),j.multiply({x:U,y:U});const $=this.velocityLerp*U;j.x=ut.c.linear(k.velocity.x,j.x,$),j.y=ut.c.linear(k.velocity.y,j.y,$),k.velocity=j}},Fr.Attract)],[Fr.Jitter,Hr.createBehaviour.bind(Hr,class extends Tr{constructor(){super(...arguments),this.strength=5}update(k,B){k.position.x+=ut.c.random(-this.strength,this.strength),k.position.y+=ut.c.random(-this.strength,this.strength)}},Fr.Jitter)],[Fr.RotateWithVelocity,Hr.createBehaviour.bind(Hr,class extends Tr{constructor(){super(...arguments),this.additionalRotation=0,this.smoothing=0}update(k,B,U){const F=Math.atan2(k.velocity.y,k.velocity.x)*ut.c.RAD_TO_DEG+this.additionalRotation;k.rotation=ut.c.linear(F,k.rotation,this.smoothing*U)}},Fr.RotateWithVelocity)]]);class Vr extends gt.${constructor(){super(...arguments),this.autoUpdateCache=!0,this.iteratedNumberKeys=["min","max","step","offset"],this.vectorKeys=["_x","_y"]}generate(k,B){this._initializerOptions||(this._initializerOptions=Hr.getInitializerNames()),this._behaviorOptions||(this._behaviorOptions=Hr.getBehaviourNames());const U=this.getSystem();if(!U)return yt.X.createVertical([he.b.create({id:"no-particle-system",message:"No Particle System found, try refreshing"}),Et.X.create({id:"refresh-button",buttonText:"Refresh",onClick:()=>{this._editorAPI.redrawCustomInspector()}})]);const F=[];return F.push(Et.X.create({id:"reset-all-button",buttonText:"Reset All",onClick:()=>{let k=this.getSystem().GameObject;for(;k.parent;)k=k.parent;const B=k.findComponentsInChildren(Wr);for(const U of B)U.reset()}})),F.push(Et.X.create({id:"reset-button",buttonText:"Reset",onClick:()=>{this.getSystem().reset()}})),F.push(Et.X.create({id:"emit-button",buttonText:"Emit 1",onClick:()=>{this.getSystem().emit()}})),this.autoUpdateCache||F.push(Et.X.create({id:"write-cache",buttonText:"Write Cache",onClick:()=>{this.updateCache(!0)}})),F.push(It.G.checkboxGroup({id:"autoUpdateCache",labelValue:"Auto Update Cache",inputValue:this.autoUpdateCache,onChange:(k,B)=>{this.autoUpdateCache=B,this._editorAPI.redrawCustomInspector()}})),F.push(It.G.checkboxGroup({id:"world-space",labelValue:"World Space",inputValue:U.worldSpace,onChange:(k,B)=>{this.getSystem().worldSpace=B,this.updateCache()}})),F.push(It.G.checkboxGroup({id:"spawn-in-back",labelValue:"Spawn In Back",inputValue:U.spawnInBack,onChange:(k,B)=>{this.getSystem().spawnInBack=B,this.updateCache()}})),F.push(It.G.checkboxGroup({id:"paused-system",labelValue:"Paused",inputValue:U.paused,onChange:(k,B)=>{this.getSystem().paused=B,this.updateCache()}})),F.push(It.G.checkboxGroup({id:"pause-emission",labelValue:"Pause Emission",inputValue:U.pauseEmission,onChange:(k,B)=>{this.getSystem().pauseEmission=B,this.updateCache()}})),F.push(It.G.numberGroup({id:"max-particles",labelValue:"Max Particles",inputValue:U.maxParticles,onChange:(k,B)=>{this.getSystem().maxParticles=B,this.updateCache()}})),F.push(It.G.numberGroup({id:"total-particles",labelValue:"Total Particles",inputValue:U.totalParticles,onChange:(k,B)=>{this.getSystem().totalParticles=B,this.updateCache()}})),F.push(this.getTopLevelIteratedNumberInspector(U.emitPerSecond,"emitPerSecond")),F.push(It.G.numberGroup({id:"prewarm",labelValue:"Prewarm (Seconds)",inputValue:U.prewarm,inputUpdateMode:Tt.JG.Confirm,onChange:(k,B)=>{this.getSystem().prewarm=B,this.updateCache()}})),F.push(Ce._.line()),F.push(this.createInitializersEditor(U.initializers)),F.push(It.G.dropdownGroup({labelValue:"Add Initializer",id:"add-end-initializers",selectValue:0,selectOptions:this._initializerOptions,onChange:k=>{this.getSystem().initializers.push(Hr.InitializerConstructors.get(k)()),this.updateCache()}})),F.push(Ce._.line()),F.push(this.createBehavioursEditor(U.behaviours)),F.push(It.G.dropdownGroup({labelValue:"Add Behaviour",id:"add-end-behaviours",selectValue:0,selectOptions:this._behaviorOptions,onChange:k=>{this.getSystem().behaviours.push(Hr.BehaviourConstructors.get(k)()),this.updateCache()}})),yt.X.createVertical(F)}getSystem(){return this._editorAPI.getComponent(this._componentGuid)}updateCache(k=!1){if(!this.autoUpdateCache&&!k)return void this._editorAPI.redrawCustomInspector();const B=this.getSystem();B.create();const U=B.initializers.map(this.serializeStep.bind(this)),F=B.behaviours.map(this.serializeStep.bind(this));this._editorAPI.modifyComponent(this._componentGuid,{initializers:U,behaviours:F,emitPerSecond:{type:B.emitPerSecond.type,min:B.emitPerSecond.min,max:B.emitPerSecond.max,step:B.emitPerSecond.step,offset:B.emitPerSecond.offset},spawnInBack:B.spawnInBack,maxParticles:B.maxParticles,worldSpace:B.worldSpace,totalParticles:B.totalParticles,pauseEmission:B.pauseEmission,paused:B.paused})}serializeStep(k){const B=Object.keys(k),U={};for(const F of B)if(!F.startsWith("_"))if("object"==typeof k[F]){const B=Object.keys(k[F]);this.iteratedNumberKeys.every((k=>B.includes(k)))?U[F]={type:k[F].type,min:k[F].min,max:k[F].max,step:k[F].step,offset:k[F].offset}:this.vectorKeys.every((k=>B.includes(k)))?U[F]={x:k[F].x,y:k[F].y}:Array.isArray(k[F])&&(U[F]=k[F])}else U[F]=k[F];return U.__type=k.__type,U}createInitializersEditor(k){const B=[];for(let U=0;U{const U=this.getSystem(),F=U[B][k-1];U[B][k-1]=U[B][k],U[B][k]=F,this.updateCache()}})),U.push(Et.X.create({id:`move-down-${B}-${k}`,buttonText:"⬇️",buttonDisabled:k===this.getSystem()[B].length-1,onClick:()=>{const U=this.getSystem(),F=U[B][k+1];U[B][k+1]=U[B][k],U[B][k]=F,this.updateCache()}})),U.push(wr._.create({id:`add-${B}-${k}`,selectValue:0,selectOptions:"behaviours"===B?this._behaviorOptions:this._initializerOptions,onChange:U=>{const F=this.getSystem();"behaviours"===B?F.behaviours.splice(k,0,Hr.BehaviourConstructors.get(U)()):F.initializers.splice(k,0,Hr.InitializerConstructors.get(U)()),this.updateCache()}})),U.push(ce.l.create({id:`break-${k}`,labelValue:" "})),U.push(Et.X.create({id:`delete-${B}-${k}`,buttonText:"❌",onClick:()=>{this.getSystem()[B].splice(k,1),this.updateCache()}})),yt.X.createHorizontal(U)}getParticleStepInspector(k,B,U){const F=[this.getParticleStepHeader(B,U)];return Object.keys(k).filter((k=>!k.startsWith("_"))).forEach((G=>{const j=(k,F)=>{this.getSystem()[U][B][G]=F,this.updateCache()},$={id:G+Math.random(),labelValue:G,inputUpdateMode:Tt.JG.Confirm};if("object"==typeof k[G]){const j=Object.keys(k[G]);if(this.iteratedNumberKeys.every((k=>j.includes(k))))F.push(this.getIteratedNumberInspector(k,G,B,U));else if(this.vectorKeys.every((k=>j.includes(k))))F.push(yt.X.createVertical([ce.l.create($),It.G.numberGroup(Object.assign(Object.assign({},$),{id:`x-${$.id}`,labelValue:"x",inputValue:k[G]._x,onChange:(F,j)=>{k[G]._x=j;this.getSystem()[U][B]=k,this.updateCache()}})),It.G.numberGroup(Object.assign(Object.assign({},$),{id:`y-${$.id}`,labelValue:"y",inputValue:k[G]._y,onChange:(F,j)=>{k[G]._y=j;this.getSystem()[U][B]=k,this.updateCache()}}))]));else if("imageGuids"===G)for(let H=0;H<8;H++){const j=k[G][H];F.push(It.G.imagePickerGroup(Object.assign(Object.assign({},$),{id:`image-guid-${$.id}-${H}`,labelValue:`Image ${H}`,guid:j,onChange:F=>{k[G][H]=F.length?F:void 0;this.getSystem()[U][B]=k,this.updateCache()}})))}else F.push(ce.l.create({id:Math.random().toString(),labelValue:`Unknown object ${G} - ${JSON.stringify(k[G])}. Please update ParticleSystemInspector`}))}else if("imageGuid"===G)F.push(It.G.imagePickerGroup(Object.assign(Object.assign({},$),{id:`image-guid-${$.id}`,labelValue:"Image",guid:k[G],onChange:F=>{k[G]=F;this.getSystem()[U][B]=k,this.updateCache()}})));else switch($.inputValue=k[G],$.onChange=j,typeof k[G]){case"string":F.push(It.G.textGroup($));break;case"boolean":F.push(It.G.checkboxGroup($));break;case"number":F.push(It.G.numberGroup($));break;case"function":break;default:F.push(ce.l.create({id:Math.random().toString(),labelValue:`Unknown parameter ${G} - ${typeof k[G]}. Please update ParticleSystemInspector`}))}})),yt.X.createVertical(F,{isCollapsible:!0,title:k.__type})}getIteratedNumberInspector(k,B,U,F){const G={id:B+Math.random(),labelValue:B,inputUpdateMode:Tt.JG.Confirm},j={title:`${B} - Iterated Number`,isContainer:!0},$=It.G.enumGroup(Object.assign(Object.assign({},G),{id:`type-${G.id}`,labelValue:"type",selectValue:k[B].type,onChange:G=>{k[B].type=G;this.getSystem()[F][U]=k,this.updateCache()}}),vr),H=It.G.numberGroup(Object.assign(Object.assign({},G),{id:`min-${G.id}`,labelValue:k[B].type===vr.Fixed?"value":"min",inputValue:k[B].min,onChange:(G,j)=>{k[B].min=j;this.getSystem()[F][U]=k,this.updateCache()}}));if(k[B].type===vr.Fixed)return yt.X.createVertical([$,H],j);const V=It.G.numberGroup(Object.assign(Object.assign({},G),{id:`max-${G.id}`,labelValue:"max",inputValue:k[B].max,onChange:(G,j)=>{k[B].max=j;this.getSystem()[F][U]=k,this.updateCache()}}));return k[B].type===vr.Random?yt.X.createVertical([$,H,V],j):yt.X.createVertical([$,H,V,It.G.numberGroup(Object.assign(Object.assign({},G),{id:`step-${G.id}`,labelValue:"step",inputValue:k[B].step,onChange:(G,j)=>{k[B].step=j;this.getSystem()[F][U]=k,this.updateCache()}})),It.G.numberGroup(Object.assign(Object.assign({},G),{id:`offset-${G.id}`,labelValue:"offset",inputValue:k[B].offset,onChange:(G,j)=>{k[B].offset=j;this.getSystem()[F][U]=k,this.updateCache()}}))],j)}getTopLevelIteratedNumberInspector(k,B){const U={id:B+Math.random(),labelValue:B,inputUpdateMode:Tt.JG.Confirm},F={title:`${B} - Iterated Number`,isContainer:!0},G=It.G.enumGroup(Object.assign(Object.assign({},U),{id:`type-${U.id}`,labelValue:"type",selectValue:k.type,onChange:U=>{k.type=U.valueOf();this.getSystem()[B]=k,this.updateCache()}}),vr),j=It.G.numberGroup(Object.assign(Object.assign({},U),{id:`min-${U.id}`,labelValue:k.type===vr.Fixed?"value":"min",inputValue:k.min,onChange:(U,F)=>{k.min=F;this.getSystem()[B]=k,this.updateCache()}}));if(k.type===vr.Fixed)return yt.X.createVertical([G,j],F);const $=It.G.numberGroup(Object.assign(Object.assign({},U),{id:`max-${U.id}`,labelValue:"max",inputValue:k.max,onChange:(U,F)=>{k.max=F;this.getSystem()[B]=k,this.updateCache()}}));return k.type===vr.Random?yt.X.createVertical([G,j,$],F):yt.X.createVertical([G,j,$,It.G.numberGroup(Object.assign(Object.assign({},U),{id:`step-${U.id}`,labelValue:"step",inputValue:k.step,onChange:(U,F)=>{k.step=F;this.getSystem()[B]=k,this.updateCache()}})),It.G.numberGroup(Object.assign(Object.assign({},U),{id:`offset-${U.id}`,labelValue:"offset",inputValue:k.offset,onChange:(U,F)=>{k.offset=F;this.getSystem()[B]=k,this.updateCache()}}))],F)}}let Wr=class extends $.u{constructor(){super(),this.initializers=[],this.behaviours=[],this.maxParticles=100,this.worldSpace=!0,this.worldSpaceScaling=!0,this.totalParticles=-1,this.emitPerSecond=new gr,this.pauseEmission=!1,this.paused=!1,this.spawnInBack=!0,this.prewarm=0,this.onAllParticlesDead=new Mt.H,this._nextBurstTime=0,this._emitCount=0,this._lastEmit=0,this._nextEmit=0,this._time=0,this._created=!1,this._particles=new Er(this.createParticle.bind(this),this.resetParticle.bind(this),this.killParticle.bind(this))}create(){if(this._created)return;this._created=!0,super.create();const k=new gr;k.max=this.emitPerSecond.max,k.min=this.emitPerSecond.min,k.step=this.emitPerSecond.step,k.offset=this.emitPerSecond.offset,k.type=this.emitPerSecond.type,this.emitPerSecond=k,this.emitPerSecond.onSetMinMax.add(this.onEmitPerSecondUpdate.bind(this));const B=[];this.initializers=this.initializers.map((k=>{const U=Hr.getInitializer(k.__type);return this.applySerializedObject(U,k),B.push(U.create(this)),U})),this.behaviours=this.behaviours.map((k=>{const B=Hr.getBehaviour(k.__type);return this.applySerializedObject(B,k),B.create(this),B})),this.prewarm>0&&Promise.all(B).then((()=>{this.runForward(this.prewarm)})).catch(Ut.R.createHandler("Failed to prewarm particle system"))}applySerializedObject(k,B){for(const U in B)if("object"==typeof B[U])this.applySerializedObject(k[U],B[U]);else{let F=U;"_"===U.charAt(0)&&(F=U.slice(1));const G=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(k),F);if((null==G?void 0:G.get)&&!(null==G?void 0:G.set))continue;k[F]=B[U]}}destroy(){var k;super.destroy(),this._particles.destroy(!0),null===(k=this.emitPerSecond)||void 0===k||k.destroy(),this.emitPerSecond=null,this.initializers=null,this.behaviours=null,this.onAllParticlesDead.dispatch(),this.onAllParticlesDead.dispose()}reset(){this._emitCount=0,this._lastEmit=0,this._time=0,this._nextEmit=1/this.emitPerSecond.getValue(),this._particles.flush(!0),this._particles.aliveList.forEach((k=>{k.active=!1}))}warmUp(k=this.maxParticles,B){if(B){const U=this.initializers;this.initializers=B,this.emit(k),this.initializers=U}else this.emit(k)}runForward(k){this._created||this.create();let B=k;for(;B>0;){const k=Math.min(B,ks.Z.DEFAULT_SPF);this.progressBurstTime(),this.pauseEmission||(this._time+=k,this._lastEmit+=k,(this.totalParticles<0||this.totalParticles>this._emitCount)&&this._particles.aliveList.getLength()=this._nextEmit&&(this._particles.getObject(),this._lastEmit-=this._nextEmit,this._nextEmit=1/this.emitPerSecond.getValue())),this.updateParticles(k),B-=k}}emit(k=1){for(let B=Math.min(k,this.maxParticles-this._particles.aliveList.getLength());B>0;--B)this._particles.getObject()}killParticle(k){const B=k.particle.renderComponent;B&&(B.destroy(),k.particle.renderComponent=void 0),0===this._particles.aliveList.getLength()&&this.onAllParticlesDead.dispatch()}createParticle(){const k=new Te._(this.gameObject);k.addComponent(Ct.d);const B=new mr;return B.gameObject=k,k.particle=B,this.initializeParticle(k.particle),k}resetParticle(k){k.particle.reset(),this.initializeParticle(k.particle)}initializeParticle(k){var B;k.initialWorldPosition.copyFrom(this.gameObject.transform.worldPosition),this.initializers.forEach((B=>{var U;null===(U=B.initialize)||void 0===U||U.call(B,k)})),k.startingLife=k.life,k.startingScale.copyFrom(k.scale),k.startingAlpha=k.alpha,this._emitCount++;const U=null===(B=k.renderComponent)||void 0===B?void 0:B.getRootContainer();U&&(this.spawnInBack?U.parent.setChildIndex(U,0):U.parent.setChildIndex(U,U.parent.children.length-1))}onEnable(){super.onEnable(),this._time=0,this._nextEmit=1/this.emitPerSecond.getValue(),this._emitCount=0,this.burstTime&&(this._nextBurstTime=this._time+this.burstTime.getValue()),this.gameObject.transform.onWorldMatrixChanged.add(this.updateTransform,this)}onDisable(){var k,B;null===(B=null===(k=this.gameObject)||void 0===k?void 0:k.transform)||void 0===B||B.onWorldMatrixChanged.removeAll(this),super.onDisable()}updateTransform(){var k;this.worldSpace&&this.worldSpaceScaling&&(null===(k=this.gameObject.parent)||void 0===k?void 0:k.transform)&&this.gameObject.transform.setScale(1/this.gameObject.parent.transform.worldScale.x,1/this.gameObject.parent.transform.worldScale.y)}onEmitPerSecondUpdate(){(this._nextEmitthis.emitPerSecond.max)&&(this._nextEmit=1/this.emitPerSecond.getValue())}update(){if(this._created||this.create(),super.update(),this.paused)return;const k=Math.min(.001*V.W.instance.game.time.deltaMS,ks.Z.DEFAULT_SPF);if(!this.pauseEmission&&(this._time+=k,this._lastEmit+=k,this.totalParticles<0||this.totalParticles>this._emitCount)){let k=0;for(;this._particles.aliveList.getLength()this._nextEmit;)if(this._particles.getObject(),this._lastEmit-=this._nextEmit,k+=this._nextEmit,this._nextEmit=1/this.emitPerSecond.getValue(),k>.034){this._lastEmit%=this._nextEmit;break}}this.updateParticles(k),this.progressBurstTime()}updateParticles(k){const B=k/ks.Z.DEFAULT_SPF,U=new pt.I,F=[];this._particles.aliveList.forEach((G=>{const j=G.particle;j.life-=k,j.life<0?F.push(G):(j.scale.copyFrom(j.startingScale),this.behaviours.forEach((k=>{const U=(j.lifePercentage-k.startAtLifePercentage)/(k.endAtLifePercentage-k.startAtLifePercentage);U>=0&&U<=1&&k.update&&k.update(j,U,B)})),U.setTo(j.velocity.x*k,j.velocity.y*k),j.position.add(U),j.rotation+=j.rotationalVelocity*k,G.transform.setScale(j.scale.x,j.scale.y),this.worldSpace?G.transform.localPosition=new pt.I(j.position.x+(j.initialWorldPosition.x-this.gameObject.transform.worldPosition.x),j.position.y+(j.initialWorldPosition.y-this.gameObject.transform.worldPosition.y)):G.transform.localPosition=j.position,G.transform.localRotation=j.rotation,j.renderComponent&&(j.renderComponent.getRootContainer().alpha=j.startingAlpha*j.alpha))}));for(let G=F.length-1;G>=0;--G){F[G].active=!1}}progressBurstTime(){this.burstTime&&this._time>this._nextBurstTime&&(this._nextBurstTime=this._time+this.burstTime.getValue(),this._emitCount=0)}};(0,j.Cg)([(0,q.np)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],Wr.prototype,"initializers",void 0),(0,j.Cg)([(0,q.np)(),(0,q.SZ)(),(0,j.Sn)("design:type",Array)],Wr.prototype,"behaviours",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Wr.prototype,"maxParticles",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Wr.prototype,"worldSpace",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Wr.prototype,"totalParticles",void 0),(0,j.Cg)([(0,q.np)(),(0,j.Sn)("design:type",gr)],Wr.prototype,"emitPerSecond",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Wr.prototype,"pauseEmission",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Wr.prototype,"paused",void 0),(0,j.Cg)([(0,q.np)(),(0,j.Sn)("design:type",gr)],Wr.prototype,"burstTime",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Wr.prototype,"spawnInBack",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Wr.prototype,"prewarm",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Wr.prototype,"onAllParticlesDead",void 0),Wr=(0,j.Cg)([(0,_t.W)(Vr),(0,H.EV)("ParticleSystem","Particle System","A particle system and controller"),(0,H.S1)(),(0,j.Sn)("design:paramtypes",[])],Wr);class qr extends Tr{update(k,B){this.callback(k,B)}}class Kr extends Dr{initialize(k){this.callback(k)}}class zr{constructor(k){this._dependencyData=null,this._dependencyData=k}getPrefabDependencyList(k,B){var U;if(!this._dependencyData)return new Set;const F=V.W.instance.game.cache,G=null!=B?B:new Set;if(G.has(k))return G;if(G.add(k),null===(U=this._dependencyData[k])||void 0===U?void 0:U.dependencies){const B=this._dependencyData[k].dependencies;for(let k=0;k{(()=>(0,j.sH)(this,void 0,void 0,(function*(){var j;const W=Zr.isPrefabTemplate(k)?new Qr:null,q=new Qr,K=U?this._frameWorkManager:void 0;if(this._dependencyMapper){const B=this._dependencyMapper.getPrefabDependencyList(null!=G?G:k.GUID);yield this._assetLoader.loadAssets(Array.from(B))}if(yield Gt.completeGeneratorAsync(this.instantiatePrefab(q,k,B,W),K),$.cancelled||!it.A.isDefined(q.Root))return void V("PrefabLoader.loadFromJSONWithDependencies: promise cancelled or root undefined at instantiatePrefab");const z=this.gatherInstantiatedComponents(q.Root),Y=this.convertInjectionDataToInjectionLinkData(null!==(j=k.Injections)&&void 0!==j?j:[],null!=F?F:[]);null!==Y?(yield Gt.completeGeneratorAsync(this.mapPrefab(q,k,q.Root,W,Y),K),$.cancelled?V("PrefabLoader.loadFromJSONWithDependencies: promise cancelled at mapPrefab"):(yield this.preloadAssets(q.Root),$.cancelled?V("PrefabLoader.loadFromJSONWithDependencies: promise cancelled at preloadAssets"):(yield Gt.completeGeneratorAsync(this.createPrefab(z),K),$.cancelled?V("PrefabLoader.loadFromJSONWithDependencies: promise cancelled at createPrefab"):(yield Gt.completeGeneratorAsync(this.postCreatePrefab(z),K),$.cancelled?V("PrefabLoader.loadFromJSONWithDependencies: promise cancelled at postCreatePrefab"):H(q.Root))))):V("PrefabLoader.loadFromJSONAsync: injectionLinkData is null")})))().catch((k=>{V(Ut.R.stringify(k))}))}));return $}preloadFromGUIDWithDependencies(k,B=!1,U){const F=this._prefabService.getPrefabFromGuid(k);return this.preloadFromJSONWithDependencies(F,B,U,k)}preloadFromJSONWithDependencies(k,B=!1,U,F){let G;const $=k=>{k.components.length=0;for(const B of k.children)$(B)},H=()=>{G&&($(G),G.destroy(),G=null)},V=new qt((($,W)=>{(()=>(0,j.sH)(this,void 0,void 0,(function*(){var j;const H=Zr.isPrefabTemplate(k)?new Qr:null,q=new Qr,K=B?this._frameWorkManager:void 0;if(this._dependencyMapper){const B=this._dependencyMapper.getPrefabDependencyList(null!=F?F:k.GUID);yield this._assetLoader.loadAssets(Array.from(B))}const z=new Te._;if(z.active=!1,G=yield Gt.completeGeneratorAsync(this.instantiatePrefab(q,k,z,H),K),V.cancelled||!it.A.isDefined(q.Root))return void W("PrefabLoader.preloadFromJSONWithDependencies: promise cancelled or root undefined at instantiatePrefab");const Y=this.convertInjectionDataToInjectionLinkData(null!==(j=k.Injections)&&void 0!==j?j:[],null!=U?U:[]);null!==Y?(yield Gt.completeGeneratorAsync(this.mapPrefab(q,k,q.Root,H,Y),K),V.cancelled?W("PrefabLoader.preloadFromJSONWithDependencies: promise cancelled at mapPrefab"):(yield this.preloadAssets(q.Root),$())):W("PrefabLoader.loadFromJSONAsync: injectionLinkData is null")})))().catch((k=>{W(Ut.R.stringify(k))})).finally(H)}));return V}loadFromJSONProject(k,B,U=!1,F){const G=new qt((($,H)=>{(()=>(0,j.sH)(this,void 0,void 0,(function*(){var j;const V=Zr.isPrefabTemplate(k)?new Qr:null,W=new Qr,q=U?this._frameWorkManager:void 0;if(yield Gt.completeGeneratorAsync(this.instantiatePrefab(W,k,B,V),q),!it.A.isDefined(W.Root))return void H("PrefabLoader.loadFromJSONProject: promise cancelled at instantiatePrefab");const K=this.gatherInstantiatedComponents(W.Root),z=this.convertInjectionDataToInjectionLinkData(null!==(j=k.Injections)&&void 0!==j?j:[],null!=F?F:[]);null!==z?(yield Gt.completeGeneratorAsync(this.mapPrefab(W,k,W.Root,V,z),q),G.cancelled?H("PrefabLoader.loadFromJSONProject: promise cancelled at mapPrefab"):(yield this.preloadAssetsProject(W.Root),G.cancelled?H("PrefabLoader.loadFromJSONProject: promise cancelled at preloadAssetsProject"):(yield Gt.completeGeneratorAsync(this.createPrefab(K),q),G.cancelled?H("PrefabLoader.loadFromJSONProject: promise cancelled at completeGeneratorAsync - createPrefab"):(yield Gt.completeGeneratorAsync(this.postCreatePrefab(K),q),G.cancelled?H("PrefabLoader.loadFromJSONProject: promise cancelled at completeGeneratorAsync - postCreatePrefab"):$(W.Root))))):H("PrefabLoader.loadFromJSONAsync: injectionLinkData is null")})))().catch((k=>{H(Ut.R.stringify(k))}))}));return G}getLastPrefabMap(){return this._lastPrefabMap}*instantiatePrefab(k,B,U,F){var G;const j=this.generateUniqueGUID(k,B.GUID);if(!it.A.isDefined(j))return Zr.logError(`Attempting to instantiate the same object twice: ${B.GUID}.`,J.$.Error),null;yield;let H=null,V=F,W=B.Name,q=!1;if(Zr.isPrefabTemplate(B)){V=new Qr;let F=null;if(F=B.templateKey?this._prefabService.getPrefabFromGuid(B.templateKey):this._prefabService.getPrefab(B.template),!it.A.isDefined(F))return Zr.logError(`Attempting to instantiate a template that does not exist: ${B.template}.`,J.$.Error),null;B.Layer&&(F.Layer=B.Layer),yield*this.instantiatePrefab(V,F,U,null),H=V.Root,B.templateKey?(k.TemplatesKeyed[B.templateKey]||(k.TemplatesKeyed[B.templateKey]=[]),k.TemplatesKeyed[B.templateKey].push(V)):(k.Templates[B.template]||(k.Templates[B.template]=[]),k.Templates[B.template].push(V))}else if(Zr.isPrefabOverride(B)){if(!V.Map.hasOwnProperty(B.TUID))return Zr.logError(`Attempting to map a templated prefab that does not exist: ${B.TUID}.`,J.$.Error),null;if(!(V.Map[B.TUID]instanceof Te._))return Zr.logError(`Attempting to map a templated prefab to a non-prefab: ${B.TUID}.`,J.$.Error),null;H=V.Map[B.TUID],it.A.isDefined(W)&&""!==W||(W=H.name)}else H=new Te._(U),q=!0;it.A.isDefined(B.Name)&&""!==B.Name&&(H.name=W),B.Layer&&(H.layer=B.Layer),it.A.isDefined(B.Active)&&(H.active=B.Active),k.Map[j]=H,it.A.isDefined(k.Root)||it.A.isDefined(k.GUID)||(k.Root=H,k.GUID=j),B.Components||(B.Components=[]);for(let K=0;K0&&U.Properties){F.preDeserialize(U.Properties);for(const B of X){const G=B.alias?B.alias:B.property;let $=U.Properties[G];const H=[];if(j.hasOwnProperty(G))if(B.type===Ht.b.Signal){let k=j[G];Array.isArray(k)||(k=[k]);for(const B of k)"function"==typeof B?H.push(B):Z.V.log(`Signal injection for ${G} of ${U.GUID} is not a function`,J.$.Error);H.length>0&&!$&&($=[])}else $=j[G];if(it.A.isDefined($)){const U=B.isRecord?F[B.property]:F,G=B.isRecord?$:{[B.property]:$};Object.keys(G).forEach((F=>{switch(B.type){case Ht.b.ComponentReference:case Ht.b.UnknownObject:case Ht.b.GameObjectReference:Zr.mapObjectReference(k.Map,U,F,B.isArray,G[F]);break;case Ht.b.SceneObjectReference:Zr.mapSceneObjectReference(U,F,B.isArray,G[F]);break;case Ht.b.Signal:Zr.mapSignal(k.Map,U,F,G[F],H);break;case Ht.b.PrefabConstructable:Zr.mapPrefabConstructable(U,F,B.isArray,B.isReorderableList,G[F]);break;default:Zr.mapField(U,F,G[F])}}))}}F.customDeserialize(U.Properties),F.postDeserialize()}}for(let $=0;${this._assetLoader.loadTypedAssets(this.generateTypeMap(k),B)}))}))}gatherInstantiatedComponents(k,B=[]){const U=k.components;for(let G=U.length-1;G>=0;--G)B.push(U[G]);const F=k.children;for(let G=0;G{for(const F of k.components){const k=W.ih.getAssetProperties(F);if(k)for(const[G,j]of k){const k=F[G];if(k)for(const F of Array.isArray(k)?k:[k]){const k=j&&F[j]?F[j]:F,G=B.getAtlasAlias(k);G?U.add(G.atlasGuid):U.add(k)}}}for(const B of k.children)F(B)};return F(k),this._assetLoader.loadAssets(Array.from(U))}))}getTemplate(k,B){const U=k.Templates[B.template],F=k.TemplatesKeyed[B.templateKey];let G=null;return(null==U?void 0:U.length)>0?(G=U.shift(),U.push(G)):(null==F?void 0:F.length)>0&&(G=F.shift()),G}getOverride(k,B){const U=k[B];return U instanceof Te._?U:null}*createPrefab(k){for(const U of k)if(yield,!U.isCreated&&U.GameObject)try{U.create()}catch(B){this.handleLoadException(B)}}*postCreatePrefab(k){for(const U of k)if(U.GameObject){yield;try{U.postCreate()}catch(B){this.handleLoadException(B)}}}generateUniqueGUID(k,B){let U=B;if(it.A.isDefined(U)&&""!==U)k.Map.hasOwnProperty(U)&&(U=null);else do{U=it.A.generateGUID()}while(k.Map.hasOwnProperty(U));return U}getSerializableProperties(k){if(this._cachedSerializableProperties.has(k.constructor))return this._cachedSerializableProperties.get(k.constructor);{let B=null;const U=Reflect.getMetadata(q.UW,k.constructor);return U&&U.length>0&&(B=U.map((B=>Reflect.getMetadata(q.fY,k.constructor,B))),B=tt.orderBy(B,["priority"],["desc"]),this._cachedSerializableProperties.set(k.constructor,B)),B}}handleLoadException(k){Z.V.log("Error when loading prefab:\n",J.$.Error),Z.V.log(k,J.$.Error),Z.V.log(null==k?void 0:k.stack,J.$.Error)}static mapObjectReference(k,B,U,F,G){if(Array.isArray(B[U])||F)if(Array.isArray(G)){B[U].length>0&&(B[U]=[]);const F=B[U];for(let B=0;BU.call(G,...k,...B)),G):$.add(((...B)=>U.call(G,k,...B)),G):$.add(U,G)}else Zr.logError(`Attempting to deserialize a Signal property with an undefined handler ${F.functionName}.`,J.$.Error)}else if(F.propertyName){const k=F.args;void 0!==k?B[U].add((()=>{G[F.propertyName]=k}),G):$.add((k=>{void 0!==k?G[F.propertyName]=k:Zr.logError(`Attempting to update a property ${F.propertyName} from a Signal with undefined dispatch params.`,J.$.Error)}))}}for(const V of G)$.add(V)}static mapField(k,B,U){if(U instanceof Object&&"function"!=typeof U){k[B]||(k[B]=Array.isArray(U)?[]:{});const F=k[B];for(const k in U)Zr.mapField(F,k,U[k])}else k[B]=U}static resolveRequiredComponents(k){const B=Vt.QW.getProperties(k);for(const U of B){const B=Vt.QW.getPropertyInfo(k,U).ctor,F=k.GameObject.findComponent(B);F?k[U]=F:Z.V.log(`Missing ${B.name} component required by ${k.constructor.name} component`,J.$.Error)}}static mapPrefabConstructable(k,B,U,F,G){const j=k=>{const B=Yr.l[k];return B?new B.ctor:(Zr.logError(`Attempting to construct instance of non-prefabConstructable class ${k}`,J.$.Error),null)};if(U||F){const U=[];for(const k of G){const B=j(k);B&&U.push(B)}k[B]=U}else k[B]=j(G)}static isPrefabTemplate(k){return k instanceof Vs}static isPrefabOverride(k){return k instanceof Hs}static isComponentOverride(k){return k instanceof js}static logError(k,B){0}};var to,eo;(0,j.Cg)([Ci(z.PrefabService),(0,j.Sn)("design:type",Xr)],Jr.prototype,"_prefabService",void 0),(0,j.Cg)([Ci(z.AssetLoader),(0,j.Sn)("design:type",Object)],Jr.prototype,"_assetLoader",void 0),(0,j.Cg)([Ci(z.FrameWorkManager),(0,j.Sn)("design:type",Ls.Y)],Jr.prototype,"_frameWorkManager",void 0),Jr=Zr=(0,j.Cg)([(0,Ge.injectable)()],Jr),function(k){k[k.Individual=0]="Individual",k[k.Combined=1]="Combined"}(to||(to={})),function(k){k[k.RejectPromise=0]="RejectPromise",k[k.DispatchSignal=1]="DispatchSignal"}(eo||(eo={}));class io{constructor(){this._loader=null,this._config=null,this._prefabDependencyData=null,this._loader=V.W.instance.game.load}loadProjectConfigData(k,B,U){return(0,j.sH)(this,void 0,void 0,(function*(){let F=new URL("projectConfig/assetPathConfig.json",window.location.origin),G=new URL("projectConfig/dependencyMap.json",window.location.origin);k&&(F="string"!=typeof k?k:new URL(k)),B&&(G="string"!=typeof B?B:new URL(B));const j=this.fetchConfig(F.href).then((k=>{this.loadServerAssetConfig(k,U)})),$=this.fetchConfig(G.href).then((k=>{this.loadPrefabDependencyJson(k)}));yield Promise.all([j,$]).catch((k=>{Ut.R.logError(k,"Error loading project configs")}))}))}loadServerAssetConfig(k,B){this._config=Object.assign(Object.assign({},JSON.parse(k)),B||{});const U=Object.keys(this._config.assetData);for(let F=0;F{const F=new XMLHttpRequest;F.onload=()=>{(null==F?void 0:F.responseText)?B(F.responseText):U(new Error(`No response text found for ${k}`))},F.onerror=B=>{U(new Error(`Error fetching config from ${k}`))},F.onabort=B=>{U(new Error(`Request aborted for ${k}`))},F.open("get",k,!0),F.send()}))}))}fetchPrefabData(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=this.getAssetData(k);if(B){if("prefab"===B.type)return new Promise(((k,U)=>{const F=new XMLHttpRequest;F.onload=()=>{F.response?k(F.response):U(null)},F.onerror=k=>{U(null)},F.onabort=k=>{U(null)},F.responseType="json";const G=it.A.appendPathToURL(B.path,this.getURL());F.open("get",G.href,!0),F.send()}));Z.V.log(`Asset at ${k} is type ${B.type} expected to be "prefab"`,J.$.Warning)}return null}))}preloadAssetsForPrefab(k){return(0,j.sH)(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}preloadAssetsForPrefabs(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=[];for(const U of k)B.push(this.preloadAssetsForPrefab(U));yield Promise.all(B)}))}loadTypedAssets(k,B){throw new Error("Method not implemented.")}isLoaded(k,B){throw new Error("Method not implemented.")}loadAssets(k){return(0,j.sH)(this,void 0,void 0,(function*(){throw new Error("use loadTypedAssets for projects")}))}getAsset(k,B){throw{name:"NotImplementedError",message:"Not yet implemented"}}assignAssetData(k,B){throw{name:"NotImplementedError",message:"Not yet implemented"}}getAssetData(k){var B;if(null===(B=this._config)||void 0===B?void 0:B.assetData){if(this._config.assetData[k])return this._config.assetData[k];Z.V.log(`Could not find ${k} in asset map`,J.$.Warning)}else this.logNotInstantiated();return null}logNotInstantiated(){Z.V.log("AssetLoader returned an empty URL as either no config was loaded or no server URL was found in the config.",J.$.Warning)}}let so=class extends io{constructor(){super(...arguments),this._prefabsPreloaded=!1,this.imageRatioFileSuffix="",this.onLoadFailed=new Mt.H,this._dependenciesByGuid=new Map,this._dependenciesBeingProcessed=new Set}fetchPrefabDataSync(k){return this.prefabLoadingBehaviour===to.Individual?JSON.parse(V.W.instance.game.cache.getJSON(k)):V.W.instance.game.cache.getJSON(k)}getUrlForAsset(k,B){const U=this.getAssetData(k);if(U){const k=it.A.appendPathToURL(U.path,this.getURL());if(B){let B;return k.href.endsWith(".png")?B=".png":k.href.endsWith(".json")&&(B=".json"),new URL(this.appendImageRatioSuffix(k.href,B))}return k}return null}appendImageRatioSuffix(k,B){return k.replace(B,`${this.imageRatioFileSuffix}${B}`)}loadTypedAssets(k,B){const U=[];Object.keys(k).forEach((B=>{U.push(...Array.from(k[B].values()).map((k=>this.checkForAtlasLink(k))))})),this.loadAssetsWithGUIDs(U).then((()=>{B()}))}preloadAssetsForPrefab(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=this.getPrefabDependencyList(k);return this.loadAssetsWithGUIDs(Array.from(B.values()))}))}loadAssetsWithGUIDs(k){return(0,j.sH)(this,arguments,void 0,(function*(k,B=!0){return this.prefabLoadingBehaviour===to.Combined&&B&&!this._prefabsPreloaded?new Promise(((B,U)=>{this.loadAssetsWithGUIDs(["prefabs"],!1).then((()=>{const U=V.W.instance.game.cache.getJSON("prefabs");Object.keys(U).forEach((k=>{V.W.instance.game.cache.addJSON(k,U[k])})),this._prefabsPreloaded=!0,this.loadAssetsWithGUIDs(k).then((()=>{B()}))})).catch((k=>{U(k)}))})):new Promise(((B,U)=>{const F=new Set,G=new Set,j=()=>{if(0===F.size){let k=!0;if(0===G.size)B();else switch(this.failureBehaviour){case eo.DispatchSignal:k=!1,this.onLoadFailed.dispatch(Array.from(G.values()));break;case eo.RejectPromise:default:U(new Error(`${G.size} assets failed to load`))}k&&this._loader.onFileLoadComplete.remove($)}},$=(k,B)=>{F.has(k)?(F.delete(k),B||G.add(k),j()):G.has(k)&&B&&(G.delete(k),j())};let H=!1;k.forEach((k=>{!this.isCached(k)&&this.resolveLoadSingle(k)&&(F.add(k),H=!0)})),H?(this._loader.onFileLoadComplete.add($),this._loader.start()):B()}))}))}checkForAtlasLink(k){var B,U;const F=this._config.assetData[k];return null!==(U=null===(B=null==F?void 0:F.atlasLink)||void 0===B?void 0:B.guid)&&void 0!==U?U:k}getPrefabDependencyList(k){var B;const U=new Set,F=this.checkForAtlasLink(k);if(this._config.assetData[F]&&U.add(F),!(null===(B=this._prefabDependencyData[F])||void 0===B?void 0:B.dependencies))return U;if(this._dependenciesByGuid.has(k))return this._dependenciesByGuid.get(k);if(this._dependenciesBeingProcessed.has(k))return U;this._dependenciesBeingProcessed.add(k);const G=this._prefabDependencyData[F].dependencies;for(let j=0;j0&&H>0,V,H);break;default:return Z.V.log(`DynamicAssetLoader cannot handle asset of type ${G}`,J.$.Warning),!1}return!0}return!1}isLoaded(k,B){const U=V.W.instance.game.cache;return B===Bi.Z.Prefab||B===Bi.Z.TiledMap||B===Bi.Z.StreamedMapEla||B===Bi.Z.Json?U.checkJSONKey(k):B===Bi.Z.Atlas?U.checkTextureAtlasKey(k):B===Bi.Z.Spine?U.checkSpineKey(k):"singleImage"===B||B===Bi.Z.SingleImage?U.checkImageKey(k):B===Bi.Z.Audio||B===Bi.Z.Sfx||B===Bi.Z.Bgm?U.checkSoundKey(k):B===Bi.Z.Tileset&&U.checkTextureAtlasKey(k)}};so=(0,j.Cg)([(0,Ge.injectable)()],so);let no=class extends io{fetchPrefabDataSync(k){return JSON.parse(V.W.instance.game.cache.getJSON(k))}loadTypedAssets(k,B){B&&this._loader.onLoadComplete.addOnce(B);const U=Object.keys(k);for(let F=0;F{this._loader.onLoadComplete.addOnce((()=>{B()}));this.getPrefabDependencyList(k).forEach((k=>{this.resolveLoadSingle(k)})),this._loader.start()}))}))}getPrefabDependencyList(k){var B,U,F;const G=new Set;if(this._config.assetData[k]&&G.add(k),null===(B=this._prefabDependencyData[k])||void 0===B?void 0:B.dependencies){const B=this._prefabDependencyData[k].dependencies;for(let k=0;k{var F;return{name:B,imageGuid:k.imageIDs[U],transform:null===(F=k.transforms)||void 0===F?void 0:F[U]}})),U}static toGearFile(k){const B=[],U=[],F=[];for(let j=0;j{if(null==k?void 0:k.length){const B=V.W.instance.game.cache.getJSON(k);if(!B)return;const U=ro.fromGearFile(B);U&&this.addGear(U,!1).catch(Ut.R.createHandler("Could not add gear in getFromGear"))}})),this.autoRefresh&&this.refresh().catch(Ut.R.createHandler(`Could not refresh ${this.gameObject.name} gear in getFromGear`))}addGear(k){return(0,j.sH)(this,arguments,void 0,(function*(k,B=!0){this.gearElements.push(k),B&&(yield this.refresh().catch(Ut.R.createHandler(`Could not refresh ${this.gameObject.name} gear in addGear`)))}))}setGearAt(k,B){return(0,j.sH)(this,arguments,void 0,(function*(k,B,U=!0){this.gearElements[k]=B;for(let F=0;F<=k;F++)void 0===this.gearElements[F]&&(this.gearElements[F]=null);U&&(yield this.refresh().catch(Ut.R.createHandler(`Could not refresh ${this.gameObject.name} gear in setGearAt`)))}))}removeGear(k,B=!0){const U=this.gearElements.indexOf(k);-1!==U&&(this.gearElements.splice(U,1),B&&this.refresh().catch(Ut.R.createHandler(`Could not refresh ${this.gameObject.name} gear in removeGear`)))}shouldRecolorSlot(k){return!this._slotsToNotRecolor.has(k)}refresh(){return(0,j.sH)(this,void 0,void 0,(function*(){var k;if(!this.spine&&(this.hookSpineComponent(),!this.spine))throw new Error(`Could not find SpineComponent on ${this.gameObject.name} in SpineManagerComponent`);const B=[];for(let U=this.gearElements.length-1;U>=0;U--){const k=this.gearElements[U];if(!it.A.isDefined(k))continue;const F=k.attachments.map((k=>k.imageGuid));this._allCurrentImageGuids.push(...F),B.push(this.loadImages(F))}B.length&&(yield Promise.all(B)),this._skin.clear(),this._hiddenSlots.clear(),this._slotsToNotRecolor.clear(),this.attachmentTextureIdMap.clear(),this._activeAttachments=[],this._allCurrentImageGuids=[];for(let U=this.gearElements.length-1;U>=0;U--){const B=this.gearElements[U];it.A.isDefined(B)&&(B.hiddenSlots.forEach((k=>{this.hideSlotBySlotName(k)})),B.slotsToNotRecolor.forEach((k=>{this._slotsToNotRecolor.add(k)})),null===(k=B.attachments)||void 0===k||k.forEach((k=>this.applyTextureByAttachment(k))))}this.updateHiddenSlots(),this.updateSkin(),this.onLoadComplete.dispatch()}))}updateSkin(){var k;this.spine.pixiSpine.skeleton.setSkin(this._skin),this.spine.pixiSpine.skeleton.setSlotsToSetupPose(),null===(k=this.spine.pixiSpine.animationState)||void 0===k||k.apply(this.spine.pixiSpine.skeleton)}applyTextureByAttachment(k){const B=V.W.instance.game.cache.getTexture(k.imageGuid);if(!(null==B?void 0:B.baseTexture))return void Z.V.log(`Could not find texture with guid ${k.imageGuid} for attachment ${k.name}`,J.$.Error);lo.q.setSmoothed(B,!0);this.getSlotNames(k.name).forEach((U=>{this.applyTextureToSlot(U,k,B)})),-1===this._activeAttachments.indexOf(k.name)&&this._activeAttachments.push(k.name),this.attachmentTextureIdMap.set(k.name,k.imageGuid)}applyTextureToSlot(k,B,U){var F;if(this._hiddenSlots.has(k))return;const G=this.spine.skeleton,j=G.findSlot(k);if(!j)return void Z.V.log(`Could not find slot ${k} for attachment ${B.name}`,J.$.Error);const $=j.data;if(!$)return void Z.V.log(`Could not find data for slot ${k} for attachment ${B.name}`,J.$.Error);const H=G.findSlotIndex(k),V=G.data.defaultSkin.getAttachment(H,B.name);if(V.type===oo.Region||V.type===oo.Mesh){const k=V.copy(),G=(0,tt.clone)(k.region);G.names=k.region.names,G.values=k.region.values,G.texture=U,G.size=this.getSizeForAttachment(V,U.orig),G.size=this.applyTransform(B.transform,null!==(F=G.size)&&void 0!==F?F:U.orig),k.region=G,V.type===oo.Region&&B.transform&&(k.x=B.transform.x,k.y=B.transform.y),this._skin.setAttachment($.index,B.name,k)}}applyTransform(k,B){if(!k)return B;const U=B.clone();return U.x+=k.x,U.y+=k.y,U.width*=k.scaleX,U.height*=k.scaleY,U}getSizeForAttachment(k,B){return B}hideSlotBySlotName(k){const B=this.spine.skeleton.findSlot(k);B?this._hiddenSlots.has(k)||this._hiddenSlots.set(k,B):Z.V.log(`Slot ${k} not found on spine ${this.spine.name}`,J.$.Warning)}updateHiddenSlots(){Array.from(this._hiddenSlots.values()).forEach((k=>{const B=this.getAttachmentName(k.data.name);B&&this._skin.setAttachment(k.data.index,B,uo.hiddenAttachment)}))}isHiddenSlot(k){return this._hiddenSlots.has(k)}destroy(){this.onLoadComplete.dispose(),super.destroy()}getAttachmentName(k){return this.slotToAttachmentMap.has(k)?this.slotToAttachmentMap.get(k):k}getSlotNames(k){return this.attachmentToSlotMap.has(k)?this.attachmentToSlotMap.get(k):[k]}}uo.defaultTextures=new Map,(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],uo.prototype,"autoRefresh",void 0),(0,j.Cg)([(0,q.SZ)(),(0,q.tW)("gear"),(0,j.Sn)("design:type",Array)],uo.prototype,"gear",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],uo.prototype,"onLoadComplete",void 0),(0,j.Cg)([(0,Le.G)(),(0,j.Sn)("design:type",Function),(0,j.Sn)("design:paramtypes",[]),(0,j.Sn)("design:returntype",void 0)],uo.prototype,"getFromGear",null);var fo,bo=U(64425);class po{}po.markups={pause:{apply:(k,B,U)=>(U.delay+=k.delay,U),dataDefault:{delay:1e3}},"scale-in":{apply:(k,B,U)=>{const F=V.W.instance.game.tweens.create(B.scale,B),G=k.ease.split(".");return F.from({x:0,y:0},k.time,Be.G[G[0]][G[1]],!0,U.delay+k.delay),F.start(),U.delay+=k.delay,U},dataDefault:{time:400,delay:25,ease:"Back.Out"}},shake:{apply:(k,B,U)=>{const F=B.position.clone(),G=V.W.instance.game.tweens.create(B.position,B);return G.onUpdate.add((()=>{B.position.set(F.x+Math.random()*k.strength-k.strength,F.y+Math.random()*k.strength-k.strength)})),G.from({},1e3),G.loop(!0),G.start(),U},dataDefault:{strength:5}},circular:{apply:(k,B,U)=>{const F=B.position.clone(),G={phase:0},j=(F.x+3*F.y)/B.style.fontSize*k.freq,$=V.W.instance.game.tweens.create(G,B);return $.onUpdate.add((()=>{B.position.set(F.x+Math.cos(G.phase+j)*k.yStrength,F.y+Math.sin(G.phase+j)*k.xStrength)})),$.from({phase:2*Math.PI},k.time),$.loop(!0),$.start(),U},dataDefault:{xStrength:5,yStrength:5,time:2e3,freq:.2}},wave:{apply:(k,B,U)=>{const F=B.position.clone(),G={phase:0},j=(F.x+3*F.y)/B.style.fontSize*k.freq,$=V.W.instance.game.tweens.create(G,B);return $.onUpdate.add((()=>{B.position.set(F.x,F.y+Math.sin(G.phase+j)*k.strength)})),$.from({phase:2*Math.PI},k.time),$.loop(!0),$.start(),U},dataDefault:{strength:5,time:2e3,freq:.2}},rock:{apply:(k,B,U)=>{const F={phase:0},G=(B.position.x+3*B.position.y)/B.style.fontSize*k.freq,j=V.W.instance.game.tweens.create(F,B);return j.onUpdate.add((()=>{B.rotation=Math.sin(F.phase+G)*k.strength})),j.from({phase:2*Math.PI},k.time),j.loop(!0),j.start(),U},dataDefault:{strength:.4,time:2e3,freq:.2}},b:{applyStyle:k=>(k.fontWeight="bold",k)},i:{applyStyle:k=>(k.fontStyle="italic",k.padding=5,k)},red:{applyStyle:k=>(k.fill=fo.red,k)},yellow:{applyStyle:k=>(k.fill=fo.yellow,k)},green:{applyStyle:k=>(k.fill=fo.green,k)},cyan:{applyStyle:k=>(k.fill=fo.cyan,k)},blue:{applyStyle:k=>(k.fill=fo.blue,k)},pink:{applyStyle:k=>(k.fill=fo.pink,k)},sunset:{applyStyle:k=>(k.fill=[0,8913083,11158528],k)}},function(k){k[k.red=11730944]="red",k[k.yellow=11580160]="yellow",k[k.green=45824]="green",k[k.cyan=46003]="cyan",k[k.blue=179]="blue",k[k.pink=11731123]="pink"}(fo||(fo={}));class vo{constructor(k,B,U){if(this._markup=po.markups[k],!this._markup)return Z.V.log(`Text markup ${k} does not exist, either add it or check your spelling`,J.$.Error),void(this.start=Number.POSITIVE_INFINITY);this.type=k,this.start=U,this.data=Object.assign({},this._markup.dataDefault);const F=Object.keys(B);for(let G=0;G, perhaps use `Text` instead?",J.$.Info),this._text=k,this.onFinish(null)):this._parser.parse(k)}onText(k){k.value&&(this._textIndex+=k.value.length,this._text+=k.value)}onFinish(k){this._callback&&this._callback()}onOpenTag(k){const B={};for(let F=0;F=0;B--){const U=this.markups[B];if(U.type===k.tagName&&void 0===U.end){U.start===this._textIndex?U.start=U.end=this._textIndex-1:U.end=this._textIndex;break}}}onError(k){Z.V.log(`Text markup error ${k.code} at ${k.pos}! ${k.message}`,J.$.Error)}}let mo=class extends re{constructor(){super(...arguments),this._texts=[]}set text(k){this.createTextObject(),this.Source instanceof xt?this.Source.setText(k):this.Source=new xt(k)}get text(){var k;return null===(k=this.Source)||void 0===k?void 0:k.getText()}set lineSpacing(k){Z.V.log(`Cannot set line spacing to ${k} on TextMoney, line spacing is not yet implemented.`,J.$.Warning)}get lineSpacing(){return Z.V.log("Cannot get line spacing from TextMoney, line spacing is not implemented.",J.$.Warning),0}set underline(k){Z.V.log("Underline not supported on TextMoney",J.$.Error)}create(){super.create(),this._parser||(this._parser=new go),this._parent.visible=this.Active,this.OnActiveChanged.add((()=>this._parent.visible=this.Active)),this.setRootContainer(this._parent),this._parent.position.y-=3,this.calculateBoundsAlign()}setRootContainer(k){k===this._parent&&super.setRootContainer(k)}createTextObject(){super.createTextObject(),this.textObject.visible=!1,this._parent||(this._parent=new dt.Container)}updateText(){if(null===this._parent||null===this.Source)Z.V.log("Trying to update the text on a Text component before the text object was created.",J.$.Warning);else{const k=this.Source.getText();this._parser||(this._parser=new go),this._parser.parse(k,this.onParserFinish.bind(this))}}onParserFinish(){this.resetForNextText();const k=this._parser.text.split(" ");let B=0,U=0,F=0,G=k.length;for(let j=0;jthis.wordWrapWidth&&(this.position.x=0,this.position.y+=this.getTextObjectStyle().fontSize)}getStyleIndex(k){for(;this._nextStyleIndex=k;B--)this._parent.removeChild(this._texts[B]),V.W.instance.game.tweens.removeAllFromOwner(this._texts[B]),this._texts[B].destroy(),this._texts.pop()}loopMarkups(k,B,U){var F;let G=0;const j=[];for(let $=this._parser.markups.length-1;$>=0;$--){const H=this._parser.markups[$];if(k>=H.start&&-1===j.indexOf(H.type)&&(k=0;B--)this._parent.removeChild(this._texts[B]),V.W.instance.game.tweens.removeAllFromOwner(this._texts[B]),this._texts[B].destroy(),this._texts.pop();this._parent&&this._parent.destroy(),this._parent=null,this._texts=[],super.destroy()}};(0,j.Cg)([(0,q.W_)(),(0,j.Sn)("design:type",String),(0,j.Sn)("design:paramtypes",[String])],mo.prototype,"text",null),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number),(0,j.Sn)("design:paramtypes",[Number])],mo.prototype,"lineSpacing",null),mo=(0,j.Cg)([(0,H.EV)("TextMoney",H.YH.ui,"Draws a web font on the screen as a child of the parent game object")],mo);let yo=class extends en{constructor(){super(...arguments),this._filled=!0,this._color="#393939",this._radius=50,this._alpha=1,this._strokeThickness=2,this._graphics=null,this._size=new bt.o}get filled(){return this._filled}set filled(k){this._filled=k,this.drawCircle()}get color(){return this._color}set color(k){this._color=k,this.drawCircle()}get radius(){return this._radius}set radius(k){this._radius=k;const B=2*k;this._size.setTo(B,B),this.drawCircle()}get alpha(){return this._alpha}set alpha(k){this._alpha=k,this.drawCircle()}get strokeThickness(){return this._strokeThickness}set strokeThickness(k){this._strokeThickness=k,this.drawCircle()}create(){super.create(),this._graphics=V.W.instance.game.add.graphics(0,0);const k=2*this._radius;this._size.setTo(k,k),this.setUpDisplayObject(this._graphics),this.drawCircle()}destroy(){var k;null===(k=this._graphics)||void 0===k||k.destroy(),this._graphics=null,super.destroy()}getDimensions(){return this._size}drawCircle(){if(!this._graphics)return;this._graphics.clear();const k=parseInt(this._color.substr(1),16);this._filled?this._graphics.beginFill(k,this._alpha):this._graphics.lineStyle(this._strokeThickness,k,this._alpha),this._graphics.drawCircle(this._radius,this._radius,this._radius),this._filled?this._graphics.endFill():this._graphics.lineStyle(0)}getGraphics(){return this._graphics}};(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],yo.prototype,"_filled",void 0),(0,j.Cg)([(0,q.iE)(),(0,j.Sn)("design:type",String)],yo.prototype,"_color",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],yo.prototype,"_radius",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],yo.prototype,"_alpha",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],yo.prototype,"_strokeThickness",void 0),yo=(0,j.Cg)([(0,H.EV)("CirclePrimitive",H.YH.primitive,"Draws a circle using the PIXI Graphics library")],yo);let _o=class extends Pt.y{constructor(){super(...arguments),this._dashLength=100,this._dashRadius=20,this._dashGapSize=20,this._dashColor="#FFFFFF",this._isVertical=!1}create(){super.create(),this._graphics=new dt.Graphics,this.setUpDisplayObject(this._graphics),this._rectTransform=this.GameObject.findComponent(ft.X),this._rectTransform?(this._rectTransform.onRecalculatedBounds.add(this.renderDashedLine,this),this.renderDashedLine()):Z.V.log("DashedLineComponent must be attached to a RectTransform!",J.$.Error)}destroy(){var k,B;null===(B=null===(k=this._rectTransform)||void 0===k?void 0:k.onRecalculatedBounds)||void 0===B||B.remove(this.renderDashedLine,this),this._graphics.destroy(),this._rectTransform=null,this._graphics=null,super.destroy()}getDimensions(){return this._rectTransform.rectTransformDimensions}renderDashedLine(){this._graphics.clear();const k=this._rectTransform.rectTransformDimensions;if(this._isVertical){const B=new dt.Matrix;B.rotate(ut.c.degreesToRadians(90)).translate(k.width,0),this._graphics.setMatrix(B)}this._graphics.beginFill(parseInt(this._dashColor.substring(1),16));const B=this._dashLength+this._dashGapSize,U=this._isVertical?k.height:k.width,F=this._isVertical?k.width:k.height,G=Math.max(Math.floor(U/B),this._dashLength<=U?1:0);let j=Math.floor(.5*(U-(B*G-this._dashGapSize)));for(let $=0;$k||G)&&(k=V.right),(V.leftU||G)&&(U=V.bottom),(V.top{this.GameObject.transform instanceof ft.X&&this.GameObject.transform.onRecalculatedBounds.remove(this.resizeToMatchRectTransform,this)}))}postCreate(){super.postCreate(),this.GameObject.transform instanceof ft.X&&this.GameObject.transform.onRecalculatedBounds.add(this.resizeToMatchRectTransform,this)}createAndPlaceImages(){const k=this.GameObject.legacyTransform;let B,U;if(k)B=k.width/k.scaleX,U=k.height/k.scaleY;else if(this.GameObject.transform instanceof ft.X){const k=this.GameObject.transform.rectTransformDimensions;B=k.width,U=k.height}else B=0,U=0,Z.V.log("Sliced Graphic is missing valid transform. Setting size to 0",J.$.Error);this.center?(this._tiling&&!this.is9Slice()?this.imgCenter=this.createAndInitializeMesh(this.center):(this.imgCenter=this.createAndInitializeSprite(this.center),this.imgCenter.anchor.x=.5,this.imgCenter.anchor.y=.5),this.is9Slice()?this.create9Slice(B,U):this.is3Slice()?this.create3Slice(B,U):Z.V.log("Invalid SlicedGraphic arrangement was attempted.",J.$.Error)):Z.V.log("SlicedGraphic has center undefined.",J.$.Error),this.updateSmooth()}is9Slice(){return!!(this.topLeft&&this.topRight&&this.bottomLeft&&this.bottomRight)}is3Slice(){return!(this.topLeft||this.topRight||this.bottomLeft||this.bottomRight)}isHorizontal3Slice(){return!(!this.leftCenter||!this.rightCenter||this.topCenter||this.bottomCenter)}isVertical3Slice(){return!(!this.topCenter||!this.bottomCenter||this.leftCenter||this.rightCenter)}adjustImgCenterPositionWithOffset(k,B){this.imgCenter.position.x+=k,this.imgCenter.position.y+=B}createAndInitializeSprite(k){const B=new dt.Sprite(V.W.instance.game.cache.getTexture(k.atlas,k.frame));return B.name=k.frame,this.setElementProperties(B,k),this.elementsGroup.addChild(B),B}createAndInitializeMesh(k){const B=V.W.instance.game.cache.getTexture(this.center.atlas,this.center.frame),U=new dt.SimpleMesh(B,void 0,void 0,void 0,dt.DRAW_MODES.TRIANGLE_STRIP);return U.visible=!1,this.setElementProperties(U,k),this.elementsGroup.addChild(U),U}performTilingInOneDirection(k,B,U,F){const G=k===zi.e.Horizontal;U.visible=!1;const j=U.texture.frame,$=G?j.width:j.height,H=G?j.height:j.width,V=B/$;if(V>0){const B=V%1>Co.EPSILON?V%1:0,G=B>0?Math.ceil(V):Math.floor(V),j=new Uint16Array(6*G-2),W=new Float32Array(4*G*2),q=new Float32Array(4*G*2);let K=-1;for(let k=0;k<4*G;k+=4)0!==k&&(j[++K]=k),j[++K]=k,j[++K]=k+1,j[++K]=k+2,j[++K]=k+3,k!==4*G-4&&(j[++K]=k+3);let z=F;const Y=$;if(k===zi.e.Horizontal)for(let k=0;k<4*G*2;k+=8)W[k]=z,W[k+1]=0,q[k]=0,q[k+1]=0,W[k+4]=z,W[k+5]=H,q[k+4]=0,q[k+5]=1,k===4*G*2-8&&B>0?(W[k+2]=z+$*B,W[k+3]=0,q[k+2]=B,q[k+3]=0,W[k+6]=z+$*B,W[k+7]=H,q[k+6]=B,q[k+7]=1):(W[k+2]=z+$,W[k+3]=0,q[k+2]=1,q[k+3]=0,W[k+6]=z+$,W[k+7]=H,q[k+6]=1,q[k+7]=1),z+=Y;else for(let k=0;k<4*G*2;k+=8)W[k]=0,W[k+1]=z,q[k]=0,q[k+1]=0,W[k+2]=H,W[k+3]=z,q[k+2]=1,q[k+3]=0,k===4*G*2-8&&B>0?(W[k+4]=0,W[k+5]=z+$*B,q[k+4]=0,q[k+5]=B,W[k+6]=H,W[k+7]=z+$*B,q[k+6]=1,q[k+7]=B):(W[k+4]=0,W[k+5]=z+$,q[k+4]=0,q[k+5]=1,W[k+6]=H,W[k+7]=z+$,q[k+6]=1,q[k+7]=1),z+=Y;U.geometry.getIndex().update(j),U.verticesBuffer.update(W),U.uvBuffer.update(q),U.visible=!0}}create3Slice(k,B){this.isHorizontal3Slice()?(this.imgLeftCenter=this.createAndInitializeSprite(this.leftCenter),this.imgRightCenter=this.createAndInitializeSprite(this.rightCenter),this.resize3Slice(k,B)):this.isVertical3Slice()?(this.imgTopCenter=this.createAndInitializeSprite(this.topCenter),this.imgBottomCenter=this.createAndInitializeSprite(this.bottomCenter),this.resize3Slice(k,B)):Z.V.log("Invalid SlicedGraphic arrangement was attempted.",J.$.Error)}resize3Slice(k,B){const U=this.imgCenter.texture.orig;if(this.isHorizontal3Slice()){const B=k-this.getHorizontalLength(this.imgLeftCenter,this.leftCenter)-this.getHorizontalLength(this.imgRightCenter,this.rightCenter);if(this._tiling&&this.imgCenter instanceof dt.SimpleMesh){this.performTilingInOneDirection(zi.e.Horizontal,B,this.imgCenter,this.getHorizontalLength(this.imgLeftCenter,this.leftCenter));const k=this.getHorizontalLength(this.imgLeftCenter,this.leftCenter)+.5*B,U=.5*this.imgCenter.texture.frame.height;this.imgLeftCenter.position.x=-.5*(B+this.getHorizontalLength(this.imgLeftCenter,this.leftCenter))+k,this.imgLeftCenter.position.y=U,this.imgRightCenter.position.x=.5*(B+this.getHorizontalLength(this.imgRightCenter,this.rightCenter))+k,this.imgRightCenter.position.y=U}else{this.imgCenter.width=B,this.imgCenter.height=U?U.height:this.imgCenter.texture.height;const k=this.getHorizontalLength(this.imgLeftCenter,this.leftCenter)+.5*this.imgCenter.width,F=.5*this.imgCenter.height;this.adjustImgCenterPositionWithOffset(k,F),this.imgLeftCenter.position.x=-.5*(this.imgCenter.width+this.getHorizontalLength(this.imgLeftCenter,this.leftCenter))+k,this.imgLeftCenter.position.y=F,this.imgRightCenter.position.x=.5*(this.imgCenter.width+this.getHorizontalLength(this.imgRightCenter,this.rightCenter))+k,this.imgRightCenter.position.y=F}}else if(this.isVertical3Slice()){const k=B-this.getVerticalLength(this.imgTopCenter,this.topCenter)-this.getVerticalLength(this.imgBottomCenter,this.bottomCenter);if(this._tiling&&this.imgCenter instanceof dt.SimpleMesh){this.performTilingInOneDirection(zi.e.Vertical,k,this.imgCenter,this.getVerticalLength(this.imgTopCenter,this.topCenter));const B=.5*this.imgCenter.texture.frame.width,U=this.getVerticalLength(this.imgTopCenter,this.topCenter)+.5*this.imgCenter.height;this.imgTopCenter.position.x=B,this.imgTopCenter.position.y=-.5*(this.imgCenter.height+this.getVerticalLength(this.imgTopCenter,this.topCenter))+U,this.imgBottomCenter.position.x=B,this.imgBottomCenter.position.y=.5*(this.imgCenter.height+this.getVerticalLength(this.imgBottomCenter,this.bottomCenter))+U}else{this.imgCenter.width=U?U.width:this.imgCenter.texture.width,this.imgCenter.height=k;const B=.5*this.imgCenter.width,F=this.getVerticalLength(this.imgTopCenter,this.topCenter)+.5*this.imgCenter.height;this.adjustImgCenterPositionWithOffset(B,F),this.imgTopCenter.position.x=B,this.imgTopCenter.position.y=-.5*(this.imgCenter.height+this.getVerticalLength(this.imgTopCenter,this.topCenter))+F,this.imgBottomCenter.position.x=B,this.imgBottomCenter.position.y=.5*(this.imgCenter.height+this.getVerticalLength(this.imgBottomCenter,this.bottomCenter))+F}}}create9Slice(k,B){this.imgTopLeft=this.createAndInitializeSprite(this.topLeft),this.imgTopRight=this.createAndInitializeSprite(this.topRight),this.imgBottomLeft=this.createAndInitializeSprite(this.bottomLeft),this.imgBottomRight=this.createAndInitializeSprite(this.bottomRight),this.topCenter&&this.bottomCenter&&this.leftCenter&&this.rightCenter?(this.imgTopCenter=this.createAndInitializeSprite(this.topCenter),this.imgBottomCenter=this.createAndInitializeSprite(this.bottomCenter),this.imgLeftCenter=this.createAndInitializeSprite(this.leftCenter),this.imgRightCenter=this.createAndInitializeSprite(this.rightCenter),this.resize9Slice(k,B)):Z.V.log("SlicedGraphic has sides undefined.",J.$.Error)}resize9Slice(k,B){this.imgCenter.width=k-this.getHorizontalLength(this.imgTopLeft,this.topLeft)-this.getHorizontalLength(this.imgTopRight,this.topRight),this.imgCenter.height=B-this.getVerticalLength(this.imgTopLeft,this.topLeft)-this.getVerticalLength(this.imgBottomLeft,this.bottomLeft);const U=this.getHorizontalLength(this.imgTopLeft,this.topLeft)+.5*this.imgCenter.width,F=this.getVerticalLength(this.imgTopLeft,this.topLeft)+.5*this.imgCenter.height;this.adjustImgCenterPositionWithOffset(U,F),this.imgTopLeft.position.x=-.5*(this.imgCenter.width+this.getHorizontalLength(this.imgTopLeft,this.topLeft))+U,this.imgTopLeft.position.y=-.5*(this.imgCenter.height+this.getVerticalLength(this.imgTopLeft,this.topLeft))+F,this.imgTopRight.position.x=.5*(this.imgCenter.width+this.getHorizontalLength(this.imgTopRight,this.topRight))+U,this.imgTopRight.position.y=-.5*(this.imgCenter.height+this.getVerticalLength(this.imgTopRight,this.topRight))+F,this.imgBottomLeft.position.x=-.5*(this.imgCenter.width+this.getHorizontalLength(this.imgBottomLeft,this.bottomLeft))+U,this.imgBottomLeft.position.y=.5*(this.imgCenter.height+this.getVerticalLength(this.imgBottomLeft,this.bottomLeft))+F,this.imgBottomRight.position.x=.5*(this.imgCenter.width+this.getHorizontalLength(this.imgBottomRight,this.bottomRight))+U,this.imgBottomRight.position.y=.5*(this.imgCenter.height+this.getVerticalLength(this.imgBottomRight,this.bottomRight))+F,this.topCenter&&this.bottomCenter&&this.leftCenter&&this.rightCenter?(this.imgTopCenter.position.x=U,this.imgTopCenter.position.y=-.5*(this.imgCenter.height+this.getVerticalLength(this.imgTopCenter,this.topCenter))+F,this.imgBottomCenter.position.x=U,this.imgBottomCenter.position.y=.5*(this.imgCenter.height+this.getVerticalLength(this.imgBottomCenter,this.bottomCenter))+F,this.imgLeftCenter.position.x=-.5*(this.imgCenter.width+this.getHorizontalLength(this.imgLeftCenter,this.leftCenter))+U,this.imgLeftCenter.position.y=F,this.imgRightCenter.position.x=.5*(this.imgCenter.width+this.getHorizontalLength(this.imgRightCenter,this.rightCenter))+U,this.imgRightCenter.position.y=F,this.isOrientationChanged(this.topCenter)?this.imgTopCenter.height=this.imgCenter.width:this.imgTopCenter.width=this.imgCenter.width,this.isOrientationChanged(this.bottomCenter)?this.imgBottomCenter.height=this.imgCenter.width:this.imgBottomCenter.width=this.imgCenter.width,this.isOrientationChanged(this.leftCenter)?this.imgLeftCenter.width=this.imgCenter.height:this.imgLeftCenter.height=this.imgCenter.height,this.isOrientationChanged(this.rightCenter)?this.imgRightCenter.width=this.imgCenter.height:this.imgRightCenter.height=this.imgCenter.height):Z.V.log("SlicedGraphic has sides undefined.",J.$.Error)}resizeToMatchRectTransform(){if(this.GameObject.transform instanceof ft.X){const k=this.GameObject.transform.rectTransformDimensions,B=k.width,U=k.height;if(!this.isCenterValid())return;this.imgCenter.position.set(0,0),this.is9Slice()?this.resize9Slice(B,U):this.is3Slice()&&this.resize3Slice(B,U)}}resetImages(){this.elementsGroup&&(this.elementsGroup.removeChildren(),this.imgTopLeft=null,this.imgTopRight=null,this.imgBottomLeft=null,this.imgBottomRight=null,this.imgTopCenter=null,this.imgBottomCenter=null,this.imgLeftCenter=null,this.imgRightCenter=null,this.imgCenter=null,this.createAndPlaceImages())}applyScalingToTransform(k,B,U){U.position.set(-k.rectTransformDimensions.width*k.pivot.x,-k.rectTransformDimensions.height*k.pivot.y)}applyToMatrix(k,B){B.append(k)}getDimensions(){return this._elementGroupSize}createPixiTransformOverride(){const k=super.createPixiTransformOverride();return k.setCustomRectTransformScaling(this),k}getHorizontalLength(k,B){return this.isOrientationChanged(B)?Math.abs(k.height):Math.abs(k.width)}getVerticalLength(k,B){return this.isOrientationChanged(B)?Math.abs(k.width):Math.abs(k.height)}isOrientationChanged(k){const B=Math.abs(k.rotation);return B===Oo.R90||B===Oo.R270}setElementProperties(k,B){k instanceof dt.Sprite&&(k.anchor.x=.5,k.anchor.y=.5),it.A.isDefined(B.rotation)&&(it.A.isDefined(this.dividePIBy180)||(this.dividePIBy180=Math.PI/180),k.rotation=Number(B.rotation)*this.dividePIBy180),it.A.isDefined(B.flipX)&&B.flipX&&(k.scale.x*=-1),it.A.isDefined(B.flipY)&&B.flipY&&(k.scale.y*=-1)}isCenterValid(){return!(!this.imgCenter||this.imgCenter.destroyed)&&(!(this.imgCenter instanceof dt.Sprite&&!this.imgCenter.texture)&&!(this.imgCenter instanceof dt.SimpleMesh&&!this.imgCenter.shader))}destroy(){var k,B;null===(k=this.elementsGroup)||void 0===k||k.destroy(),null===(B=this.rootGroup)||void 0===B||B.destroy(),this.topLeft=null,this.topRight=null,this.bottomLeft=null,this.bottomRight=null,this.topCenter=null,this.bottomCenter=null,this.leftCenter=null,this.rightCenter=null,this.center=null,this.imgTopLeft=null,this.imgTopRight=null,this.imgBottomLeft=null,this.imgBottomRight=null,this.imgTopCenter=null,this.imgBottomCenter=null,this.imgLeftCenter=null,this.imgRightCenter=null,this.imgCenter=null,this.elementsGroup=null,super.destroy()}};Io.EPSILON=.01,(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Io.prototype,"_alpha",void 0),(0,j.Cg)([(0,W.B)("atlas"),(0,q.vC)(),(0,j.Sn)("design:type",Object)],Io.prototype,"topLeft",void 0),(0,j.Cg)([(0,W.B)("atlas"),(0,q.vC)(),(0,j.Sn)("design:type",Object)],Io.prototype,"topRight",void 0),(0,j.Cg)([(0,W.B)("atlas"),(0,q.vC)(),(0,j.Sn)("design:type",Object)],Io.prototype,"bottomLeft",void 0),(0,j.Cg)([(0,W.B)("atlas"),(0,q.vC)(),(0,j.Sn)("design:type",Object)],Io.prototype,"bottomRight",void 0),(0,j.Cg)([(0,W.B)("atlas"),(0,q.vC)(),(0,j.Sn)("design:type",Object)],Io.prototype,"topCenter",void 0),(0,j.Cg)([(0,W.B)("atlas"),(0,q.vC)(),(0,j.Sn)("design:type",Object)],Io.prototype,"bottomCenter",void 0),(0,j.Cg)([(0,W.B)("atlas"),(0,q.vC)(),(0,j.Sn)("design:type",Object)],Io.prototype,"leftCenter",void 0),(0,j.Cg)([(0,W.B)("atlas"),(0,q.vC)(),(0,j.Sn)("design:type",Object)],Io.prototype,"rightCenter",void 0),(0,j.Cg)([(0,W.B)("atlas"),(0,q.vC)(),(0,j.Sn)("design:type",Object)],Io.prototype,"center",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Io.prototype,"_tiling",void 0),Io=Co=(0,j.Cg)([(0,H.EV)("SlicedGraphic",H.YH.ui,"9-slice and 3-slice graphic component
    ")],Io);U(51200),U(87987);var Do=U(17607);U(44770);let Ro=class extends $.u{constructor(){super(...arguments),this.onTriggerEnter=new Mt.H,this.onTriggerExit=new Mt.H,this.onTriggerHold=new Mt.H,this.isStatic=!0,this.tags=[],this.width=100,this.height=100,this._wasAddedToSystem=!1,this._cachedBounds=null}create(){super.create(),this.updateTrigger(),this.OnActiveChanged.add(this.updateTrigger,this),this.GameObject.onActiveInHierarchyChanged.add(this.updateTrigger,this)}destroy(){this.onTriggerEnter.dispose(),this.onTriggerExit.dispose(),this.onTriggerHold.dispose(),this.removeTriggerFromSystem(),this.OnActiveChanged.remove(this.updateTrigger,this),this.GameObject.onActiveInHierarchyChanged.remove(this.updateTrigger,this),super.destroy()}getBounds(){return this.isStatic&&null!==this._cachedBounds||this.updateCachedBounds(),this._cachedBounds}addTriggerToSystem(){this._wasAddedToSystem||(V.W.instance.game.triggerSystem.addTrigger(this),this._wasAddedToSystem=!0)}removeTriggerFromSystem(){this._wasAddedToSystem&&(V.W.instance.game.triggerSystem.removeTrigger(this),this._wasAddedToSystem=!1)}updateTrigger(){this.IsActiveInHierarchy?this.addTriggerToSystem():this.removeTriggerFromSystem()}updateCachedBounds(){const k=this.GameObject.transform,B=.5*this.width,U=.5*this.height,F=k.worldMatrix.clone(),G=k.worldScale;F.scale(1/G.x,1/G.y);const j=F.apply({x:-B,y:-U}),$=F.apply({x:B,y:U});this._cachedBounds||(this._cachedBounds={left:0,right:0,top:0,bottom:0}),this._cachedBounds.left=j.x,this._cachedBounds.top=j.y,this._cachedBounds.right=$.x,this._cachedBounds.bottom=$.y}};(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Ro.prototype,"onTriggerEnter",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Ro.prototype,"onTriggerExit",void 0),(0,j.Cg)([(0,q.bb)(),(0,j.Sn)("design:type",Mt.H)],Ro.prototype,"onTriggerHold",void 0),(0,j.Cg)([(0,q.vk)(),(0,j.Sn)("design:type",Boolean)],Ro.prototype,"isStatic",void 0),(0,j.Cg)([(0,q.SZ)(),(0,q.W_)(),(0,j.Sn)("design:type",Array)],Ro.prototype,"tags",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Ro.prototype,"width",void 0),(0,j.Cg)([(0,q.g1)(),(0,j.Sn)("design:type",Number)],Ro.prototype,"height",void 0),Ro=(0,j.Cg)([(0,H.EV)("AABBTrigger",H.YH.physics)],Ro);U(6686),U(80632),U(1788),U(15073)},18830:(k,B,U)=>{"use strict";U.d(B,{b:()=>nt});var F=U(8674),G=U(86787),j=U(40794),$=U(29658),H=U(32469),V=U(62481),W=U(26731),q=U(15887),K=U(74786),z=U(140),Y=U(56761),Q=U(5440);class X extends W.${initialize(k,B){var U,F;super.initialize(k,B);const G=null===(U=B.getComponentData)||void 0===U?void 0:U.call(B,k);this._injections=Object.entries(null!==(F=null==G?void 0:G.injections)&&void 0!==F?F:[]).map((([k,B])=>{var U;return{key:k,type:null!==(U=X.VAR_TYPE_TO_PROPERTY_TYPE[typeof B])&&void 0!==U?U:H.b.JSON,value:B}}))}generate(k){return q.X.createVertical([z.I.create({id:"installers",label:"Installers",arrayType:H.b.String,value:k.installers,isReorderable:!0}),z.I.create({id:"injections-record",label:"Injections",arrayType:H.b.GenericObject,value:this._injections,insertElementCallbacks:new Map([[H.b.String,()=>({key:"newString",type:H.b.String,value:""})],[H.b.Number,()=>({key:"newNumber",type:H.b.Number,value:0})],[H.b.Boolean,()=>({key:"newBoolean",type:H.b.Boolean,value:!1})],[H.b.JSON,()=>({key:"newJSON",type:H.b.JSON,value:{}})]]),getElementInspector:X.generateInjectionElementInspector,onChange:k=>{this._injections=k,this._editorAPI.modifyComponent(this._componentGuid,{injections:k.reduce(((k,B)=>{B.error=void 0;try{k[B.key]=B.type===H.b.JSON?X.parseJson(B.value):B.value}catch(e){V.R.logError(e,`Failed to parse JSON for key ${B.key}:`),B.error=e}return k}),{})})}})])}static generateInjectionElementInspector(k,B){var U;const F=[];switch(F.push(Y.f.create({id:`injection-key-${B}`,labelValue:"Key",inputType:"text",inputValue:k.key,propertyPath:[`${B}`,"key"]})),F.push(K._6.create({id:`injection-type-${B}`,selectOptions:X.INJECTION_TYPE_OPTIONS,selectValue:k.type,propertyPath:[`${B}`,"type"]})),k.type){case H.b.String:F.push(Y.f.create({id:`injection-value-${B}`,labelValue:"Value",inputType:"text",inputValue:k.value,propertyPath:[`${B}`,"value"]}));break;case H.b.Number:F.push(Y.f.create({id:`injection-value-${B}`,labelValue:"Value",inputType:"number",inputValue:k.value,propertyPath:[`${B}`,"value"]}));break;case H.b.Boolean:F.push(Y.f.create({id:`injection-value-${B}`,labelValue:"Value",inputType:"checkbox",inputValue:k.value,propertyPath:[`${B}`,"value"]}));break;case H.b.JSON:F.push(Y.f.create({id:`injection-value-${B}`,labelValue:"Value",inputType:"text",inputValue:X.stringifyJson(k.value),propertyPath:[`${B}`,"value"],inputUpdateMode:Q.JG.Confirm,style:{borderColor:k.error?"red":void 0}})),k.error&&F.push(K.ly.create({id:`injection-error-${B}`,labelTextWrap:Q.K3.Wrap,labelValue:null!==(U=k.error.message)&&void 0!==U?U:k.error.toString(),style:{color:"red",textWrap:"pretty"}}))}return q.X.createVertical(F)}static stringifyJson(k){return"string"==typeof k?k:JSON.stringify(k)}static parseJson(k){return"string"==typeof k?JSON.parse(k):k}}X.INJECTION_TYPE_OPTIONS=[{label:H.b.String,value:H.b.String},{label:H.b.Number,value:H.b.Number},{label:H.b.Boolean,value:H.b.Boolean},{label:H.b.JSON,value:H.b.JSON}],X.VAR_TYPE_TO_PROPERTY_TYPE={string:H.b.String,number:H.b.Number,boolean:H.b.Boolean};var Z,J=U(36361),tt=U(823),et=U(52751),it=U(78178),st=U(32154);let nt=Z=class extends j.u{constructor(){super(...arguments),this.container=new J.r(null),this.installers=[],this.injections={}}get ParentContainer(){var k,B,U;return null!==(U=null===(B=null===(k=this.GameObject)||void 0===k?void 0:k.parent)||void 0===B?void 0:B.findComponentInParent(Z))&&void 0!==U?U:null}get Container(){return this.container}get Installers(){return this.installers}create(){super.create(),this.hasRunInstallers||this.runInstallers(),this.bindInjectedValues(this.injections),this.attachParentContainer(),this.gameObject.onHierarchyChanged.add(this.attachParentContainer,this)}runInstallers(){this.hasRunInstallers=!0;for(let k=0;k{"use strict";U.d(B,{s:()=>j});class F{constructor(k){this.inversifyInterface=null,this.inversifyInterface=k}asSingleton(){this.inversifyInterface.inSingletonScope()}}var G=U(36361);class j{constructor(k){this.inversifyBindingTo=null,this.inversifyBindingTo=k}to(k){return new F(this.inversifyBindingTo.to(k))}toConstantValue(k){this.inversifyBindingTo.toConstantValue(k)}toDynamicValue(k){return new F(this.inversifyBindingTo.toDynamicValue((B=>k(G.r.wrapContainer(B.container)))))}}},36361:(k,B,U)=>{"use strict";U.d(B,{r:()=>$});var F=U(79687),G=U(61806),j=U(3004);class ${get sourceContainer(){return this._inversifyContainer}get parent(){return this._parentContainer}set parent(k){var B;this._parentContainer=k,this._inversifyContainer.parent=null!==(B=null==k?void 0:k._inversifyContainer)&&void 0!==B?B:null}constructor(k){var B,U;void 0===k&&(k=null!==(U=null===(B=G.W.instance)||void 0===B?void 0:B.game.rootContainer)&&void 0!==U?U:null),this._inversifyContainer=new F.Container,this.parent=k}bind(k){return new j.s(this._inversifyContainer.bind(k))}unbind(k){this.hasBinding(k,!1)&&this._inversifyContainer.unbind(k)}rebind(k){return this.unbind(k),this.bind(k)}get(k){return this.hasBinding(k)?this._inversifyContainer.get(k):null}hasBinding(k,B=!0){return B?this._inversifyContainer.isBound(k):this._inversifyContainer._bindingDictionary.hasKey(k)}resolve(k){return this._inversifyContainer.resolve(k)}unbindAll(){this._inversifyContainer.unbindAll()}static wrapContainer(k){const B=new $;return B._inversifyContainer=k,B}}},21979:(k,B,U)=>{"use strict";U.d(B,{P:()=>Q});var F,G=U(8674),j=U(95891),$=U.n(j),H=U(40794),V=U(29658),W=U(563),q=U(5191),K=U(80267),z=U(823),Y=U(22494);let Q=F=class extends H.u{constructor(){super(...arguments),this.autoUpdateLayout=!0,this.updateInactiveChildren=!1,this.roundPixels=!1,this._watchedChildren=[]}postCreate(){super.postCreate(),this.autoUpdateLayout?(this.gameObject.onChildAdded.add(this.watchChildren,this),this.gameObject.onChildRemoved.add(this.watchChildren,this),this.watchChildren()):this.updateAll(),this.gameObject.onDestroy.add(this.cleanUpListeners,this)}destroy(){this.cleanUpListeners(),super.destroy()}cleanUpListeners(){var k,B,U;this.gameObject.onChildAdded.removeAll(this),this.gameObject.onChildRemoved.removeAll(this);for(const F of this.gameObject.children)null===(k=F.onActiveChanged)||void 0===k||k.removeAll(this),null===(U=null===(B=F.transform)||void 0===B?void 0:B.onDimensionsChanged)||void 0===U||U.removeAll(this)}getLayoutPositionX(k){return K.V.log("Layout#getLayoutPositionX should be overridden",q.$.Warning),0}getLayoutPositionY(k){return K.V.log("Layout#getLayoutPositionY should be overridden",q.$.Warning),0}getLayoutAnchorX(k){return K.V.log("Layout#getLayoutAnchorX should be overridden",q.$.Warning),0}getLayoutAnchorY(k){return K.V.log("Layout#getLayoutAnchorY should be overridden",q.$.Warning),0}updateAll(k=!0){const B=this.getGameObjectList();for(let U=0;U=B.length)return void K.V.log(`Layout#updateByIndex called with out of bounds index ${k}. There are ${B.length} active children`,q.$.Error);const U=B[k],F=this.roundPixels?Math.round(this.getLayoutPositionX(k)):this.getLayoutPositionX(k),G=this.roundPixels?Math.round(this.getLayoutPositionY(k)):this.getLayoutPositionY(k);if(U.legacyTransform){const B=U.legacyTransform;B.x=F,B.y=G,B.anchorX=this.getLayoutAnchorX(k),B.anchorY=this.getLayoutAnchorY(k),B.update()}else{const B=U.transform;B instanceof W.X?(B.setAnchoredPivotOffset(F,G),B.setPivot(this.getLayoutAnchorX(k),this.getLayoutAnchorY(k))):B.setPosition(F,G)}}isFilled(){return!1}getGameObjectList(){return this.GameObject.children.filter((k=>k.active||this.updateInactiveChildren))}watchChildren(){var k,B,U;const F=[...this.gameObject.children],G=$().difference(this._watchedChildren,F),j=$().difference(F,this._watchedChildren);for(const $ of G)null===(k=$.onActiveChanged)||void 0===k||k.removeAll(this),null===(U=null===(B=$.transform)||void 0===B?void 0:B.onDimensionsChanged)||void 0===U||U.removeAll(this);for(const $ of j)$.onActiveChanged.add(this.updateAll,this),$.onComponentAdded.add(this.watchForChildTransform,this),this.watchForChildTransform($.transform);this._watchedChildren=F,this.updateAll()}watchForChildTransform(k){k instanceof W.X&&k.onDimensionsChanged.add(this.updateAll,this)}};(0,G.Cg)([(0,z.vk)(),(0,Y.x)("updateAll"),(0,G.Sn)("design:type",Boolean)],Q.prototype,"autoUpdateLayout",void 0),(0,G.Cg)([(0,z.vk)(),(0,Y.x)("updateAll"),(0,G.Sn)("design:type",Boolean)],Q.prototype,"updateInactiveChildren",void 0),(0,G.Cg)([(0,z.vk)(),(0,Y.x)("updateAll"),(0,G.Sn)("design:type",Boolean)],Q.prototype,"roundPixels",void 0),Q=F=(0,G.Cg)([(0,V.EV)("Layout (abstract)",void 0,"Layout component for UI")],Q)},5191:(k,B,U)=>{"use strict";var F;U.d(B,{$:()=>F}),function(k){k[k.Verbose=0]="Verbose",k[k.Info=1]="Info",k[k.Warning=2]="Warning",k[k.Error=3]="Error"}(F||(F={}))},80267:(k,B,U)=>{"use strict";U.d(B,{V:()=>F});class F{constructor(){}static addLogger(k){this._loggers.push(k)}static removeLogger(k){this._loggers=this._loggers.filter((B=>B!==k))}static log(k,B,...U){this._loggers.forEach((F=>{F.log(k,B,...U)}))}static table(k,B,U){this._loggers.forEach((F=>{F.table(k,B,U)}))}static setLogLevel(k){this._loggers.forEach((B=>{B.setLogLevel(k)}))}}F._loggers=[]},2136:(k,B,U)=>{"use strict";U.d(B,{b:()=>j});var F=U(8674),G=U(12915);class j{constructNavMesh(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){try{if(!B||B.length<=0)return{regions:[],inverted:!1};let F=G.segments(B[0]);const j=B.length;for(let k=1;k{"use strict";U.d(B,{N:()=>G});var F=U(27179);class G{constructor(k,B,U,G){this.start=new F.I(k,B),this.end=new F.I(U,G),this.left=Math.min(k,U),this.right=Math.max(k,U),this.top=Math.min(B,G),this.bottom=Math.max(B,G)}pointOnSegment(k,B){return k>=this.left&&k<=this.right&&B>=this.top&&B<=this.bottom&&this.pointOnLine(k,B)}pointOnLine(k,B){return Math.abs((k-this.left)*(this.bottom-this.top)-(this.right-this.left)*(B-this.top))=this.left-G.EPSILON&&B.x<=this.right+G.EPSILON&&B.y>=this.top-G.EPSILON&&B.y<=this.bottom+G.EPSILON?B:this.start.getDistanceSq(k.end){"use strict";U.d(B,{o:()=>G});var F=U(39002);class G{get width(){return this._width}set width(k){this._width=k,this._halfWidth=.5*k}get height(){return this._height}set height(k){this._height=k,this._halfHeight=.5*k}getHalfWidth(){return this._halfWidth}getHalfHeight(){return this._halfHeight}constructor(k=0,B=0){this._width=0,this._halfWidth=0,this._height=0,this._halfHeight=0,this.width=k,this.height=B}isNearlyEqual(k,B){return this.isNearlyEqualToValues(k.width,k.height,B)}isNearlyEqualToValues(k,B,U){return F.c.isNearlyEqual(this.width,k,U)&&F.c.isNearlyEqual(this.height,B,U)}setTo(k,B){this.width=k,this.height=B}copyFrom(k){this.width=k.width,this.height=k.height}}G.ZERO=new G(0,0)},27179:(k,B,U)=>{"use strict";U.d(B,{I:()=>H});var F=U(39002),G=U(80267),j=U(5191),$=U(32154);class H{static get ZERO(){return new H(0,0)}static get ONE(){return new H(1,1)}static get UP(){return new H(0,1)}static get DOWN(){return new H(0,-1)}static get RIGHT(){return new H(1,0)}static get LEFT(){return new H(-1,0)}get x(){return this._x}set x(k){this._x=k,this._recalculateMagnitudeSq=!0,this._recalculateMagnitude=!0}get y(){return this._y}set y(k){this._y=k,this._recalculateMagnitudeSq=!0,this._recalculateMagnitude=!0}getMagnitude(){return this.recalculateMagnitude(),this._magnitude}getMagnitudeSq(){return this.recalculateMagnitudeSq(),this._magnitudeSq}constructor(k=0,B=0){this._x=0,this._y=0,this._magnitude=0,this._magnitudeSq=0,this._recalculateMagnitude=!1,this._recalculateMagnitudeSq=!1,this.x=k,this.y=B}static fromPoint(k){return new H(k.x,k.y)}setTo(k,B){this.set(k,B)}set(k,B){this.x=k,this.y=B}setToPolar(k,B=1){this.set(Math.cos(k)*B,Math.sin(k)*B)}copyFrom(k){return this.set(k.x,k.y),this}copyTo(k){return k.set(this.x,this.y),k}equals(k){return this.isNearlyEqual(k)}isNearlyEqual(k,B){return this.isNearlyEqualToValues(k.x,k.y,B)}isNearlyEqualToValues(k,B,U){return F.c.isNearlyEqual(this.x,k,U)&&F.c.isNearlyEqual(this.y,B,U)}invert(){this.set(this._y,this._x)}perpendicular(k=!0){k?this.set(this._y,-this._x):this.set(-this._y,this._x)}normalRightHand(){this.set(-1*this._y,this._x)}floor(){this.set(Math.floor(this._x),Math.floor(this._y))}ceil(){this.set(Math.ceil(this._x),Math.ceil(this._y))}round(){this.set(Math.round(this._x),Math.round(this._y))}negate(){this.set(-this._x,-this._y)}add(k){this._x+=k.x,this._y+=k.y}subtract(k){this._x-=k.x,this._y-=k.y}multiply(k){this._x*=k.x,this._y*=k.y}divide(k){this._x/=k.x,this._y/=k.y}clamp(k,B,U){switch(U){case F._.X:this._x=F.c.clamp(this._x,k,B);break;case F._.Y:this._y=F.c.clamp(this._y,k,B);break;default:this._x=F.c.clamp(this._x,k,B),this._y=F.c.clamp(this._y,k,B)}}clip(k){const B=k.left,U=k.top,F=k.right,G=k.bottom;this._xF&&(this._x=F),this._yG&&(this._y=G)}rotate(k,B,U=null){if($.A.isDefined(U)){const F=B+Math.atan2(this._y-k.y,this._x-k.x);this._x=k.x+U*Math.cos(F),this._y=k.y+U*Math.sin(F)}else{this.subtract(k);const U=Math.sin(B),F=Math.cos(B);this._x=F*this._x-U*this._y+k.x,this._y=U*this._x+F*this._y+k.y}}normalize(){const k=this.getMagnitude();k>0&&(this._x/=k,this._y/=k,this._magnitude=1,this._magnitudeSq=1,this._recalculateMagnitude=!1,this._recalculateMagnitudeSq=!1)}interpolate(k,B){this.set(this._x+(k.x-this._x)*B,this._y+(k.y-this._y)*B)}project(k,B=!1){const U=this.dot(k)/(B?1:k.getMagnitudeSq());0!==U&&this.set(U*k.x,U*k.y)}trunc(){this.set(~~this._x,~~this._y)}isZero(){return this.isNearlyEqual(H.ZERO)}angle(k){return Math.atan2(k.y-this._y,k.x-this._x)}dot(k){return this._x*k.x+this._y*k.y}cross(k){return this._x*k.y-this._y*k.x}getDistanceSq(k){return Math.pow(this.x-k.x,2)+Math.pow(this.y-k.y,2)}getDistance(k){return Math.sqrt(this.getDistanceSq(k))}toString(){return`[{Vector }]`}print(k=j.$.Info){G.V.log(this.toString(),k)}recalculateMagnitudeSq(){this._recalculateMagnitudeSq&&(this._magnitudeSq=Math.pow(this._x,2)+Math.pow(this._y,2),this._recalculateMagnitudeSq=!1)}recalculateMagnitude(){this.recalculateMagnitudeSq(),this._recalculateMagnitude&&(this._magnitude=Math.sqrt(this._magnitudeSq),this._recalculateMagnitude=!1)}}},40008:(k,B,U)=>{"use strict";U.d(B,{E1:()=>j,or:()=>$.o,I9:()=>G.I});var F=U(39002),G=U(27179);class j{get tx(){return this._translation.x}set tx(k){this._translation.x=k}get ty(){return this._translation.y}set ty(k){this._translation.y=k}get translation(){return this._translation}constructor(k=1,B=0,U=0,F=1,j=0,$=0){this.a=0,this.b=0,this.c=0,this.d=0,this._translation=new G.I,this.setTo(k,B,U,F,j,$)}setTo(k,B,U,F,G,j){this.a=k,this.b=B,this.c=U,this.d=F,this.tx=G,this.ty=j}setToIdentity(){this.setTo(1,0,0,1,0,0)}isIdentityMatrix(){return 1===this.a&&0===this.b&&0===this.tx&&0===this.c&&1===this.d&&0===this.ty}isTranslateOnly(){return 1===this.a&&0===this.b&&0===this.c&&1===this.d}translate(k,B){this.tx+=k,this.ty+=B}rotate(k){const B=Math.sin(F.c.degreesToRadians(k)),U=Math.cos(F.c.degreesToRadians(k)),G=this.a,j=this.b,$=this.tx;this.a=G*U-this.c*B,this.b=j*U-this.d*B,this.c=G*B+this.c*U,this.d=j*B+this.d*U,this.tx=$*U-this.ty*B,this.ty=$*B+this.ty*U}scale(k,B=k){this.a*=k,this.b*=k,this.c*=B,this.d*=B,this.tx*=k,this.ty*=B}multiply(k){j.multiply(this,k,this)}premultiply(k){j.multiply(k,this,this)}isEqual(k,B){return F.c.isNearlyEqual(this.a,k.a,B)&&F.c.isNearlyEqual(this.b,k.b,B)&&F.c.isNearlyEqual(this.c,k.c,B)&&F.c.isNearlyEqual(this.d,k.d,B)&&F.c.isNearlyEqual(this.tx,k.tx,B)&&F.c.isNearlyEqual(this.ty,k.ty,B)}clone(k){this.a=k.a,this.b=k.b,this.c=k.c,this.d=k.d,this.tx=k.tx,this.ty=k.ty}transformVector(k){k.set(this.a*k.x+this.b*k.y+this.tx,this.c*k.x+this.d*k.y+this.ty)}transformXY(k,B){const U=new G.I(k,B);return this.transformVector(U),U}createTransformedVector(k){const B=new G.I(k.x,k.y);return this.transformVector(B),B}inverseTransformVector(k){const B=1/(this.a*this.d-this.b*this.c);k.set(this.d*B*k.x+-this.b*B*k.y+(this.ty*this.b-this.tx*this.d)*B,this.a*B*k.y+-this.c*B*k.x+(-this.ty*this.a+this.tx*this.c)*B)}createInverseTransformedVector(k){const B=new G.I(k.x,k.y);return this.inverseTransformVector(B),B}inverseTransformXY(k,B){const U=new G.I(k,B);return this.inverseTransformVector(U),U}fromArray(k){this.setTo(k[0],k[3],k[1],k[4],k[2],k[5])}toArray(k=!1,B=new Float32Array(9)){return k?(B[0]=this.a,B[1]=this.b,B[2]=0,B[3]=this.c,B[4]=this.d,B[5]=0,B[6]=this.tx,B[7]=this.ty,B[8]=1):(B[0]=this.a,B[1]=this.c,B[2]=this.tx,B[3]=this.b,B[4]=this.d,B[5]=this.ty,B[6]=0,B[7]=0,B[8]=1),B}static makeScale(k,B=k){return new j(k,0,0,B,0,0)}static makeTranslation(k,B){return new j(1,0,0,1,k,B)}static makeRotation(k){const B=Math.cos(F.c.degreesToRadians(k)),U=Math.sin(F.c.degreesToRadians(k));return new j(B,-U,U,B,0,0)}static multiply(k,B,U=new j){return U.setTo(k.a*B.a+k.b*B.c,k.a*B.b+k.b*B.d,k.c*B.a+k.d*B.c,k.c*B.b+k.d*B.d,k.a*B.tx+k.b*B.ty+k.tx,k.c*B.tx+k.d*B.ty+k.ty),U}}j.IDENTITY=new j(1,0,0,1,0,0);U(51088);var $=U(64527)},55787:(k,B,U)=>{"use strict";U.d(B,{q:()=>$});var F=U(3431),G=U(51088),j=U(27179);class ${constructor(k){this.nodes=k,this.init()}neighbors(k){return k.neighbours}navHeuristic(k,B){return k.entryPoint.getDistance($.targetPoint)}static getCost(k,B){const U=k.entryPoint,F=$.targetPoint,H=k.portals.find(((U,F)=>k.neighbours[F].id===B.id));return B.entryPoint=j.I.fromPoint(H.closestIntersection(new G.N(U.x,U.y,F.x,F.y))),U.getDistance(B.entryPoint)}destroy(){this.cleanDirty(),this.nodes=[]}init(){}cleanDirty(){}markDirty(){}}$.prototype.init=F.Graph.prototype.init,$.prototype.cleanDirty=F.Graph.prototype.cleanDirty,$.prototype.markDirty=F.Graph.prototype.markDirty},94341:(k,B,U)=>{"use strict";U.d(B,{L:()=>z});var F=U(3431),G=U(39002),j=U(51088);class ${constructor(k,B=!0){this.points=k,this.edges=[];for(let U=1;U0)){B.push(F),U=F,j=$,F=U,G=U,$=j,H=j,q=j;continue}G=K,H=q}if(V.triArea2(U,F,W)>=0){if(!(U.isNearlyEqual(F)||V.triArea2(U,G,W)<0)){B.push(G),U=G,j=H,F=U,G=U,$=j,H=j,q=j;continue}F=W,$=q}}return 0!==B.length&&B[B.length-1].isNearlyEqual(k[k.length-1].left)||B.push(k[k.length-1].left),B}}var q=U(55787),K=U(87945);class z{constructor(k,B=0,U=0){this._meshShrinkAmount=B,this._fromPolySearchRadius=U;const F=k.map((k=>{const B=k.map((k=>({x:k.x,y:k.y})));return new $(B)}));this._navPolygons=F.map(((k,B)=>new K.q(B,k))),this._nextId=this._navPolygons.length,this.calculateAllNeighbours(),this._graph=new q.q(this._navPolygons)}getPolygons(){return this._navPolygons}addPolygon(k){const B=new K.q(this._nextId++,new $(k));return this._navPolygons.push(B),this.calculatePolyNeighbours(B),B.id}removePolygon(k){for(let B=0;B0)for(const F of this._navPolygons)if(G=F.boundingRadius+Q,U=F.centroid.getDistance(z),U<=G){const{distance:k}=this.projectPointToPolygon(z,F);k<=Q&&k0)for(const F of this._navPolygons)if(G=F.boundingRadius+this._meshShrinkAmount,U=F.centroid.getDistance(Y),U<=G){const{distance:k}=this.projectPointToPolygon(Y,F);k<=this._meshShrinkAmount&&k0===B||!k.isNearlyEqual(J[B-1])))}calculateAllNeighbours(){for(let k=0;kk.boundingRadius+B.boundingRadius))for(const U of k.polygon.edges)for(const F of B.polygon.edges){if(!V.areCollinear(U,F))continue;const G=this.getSegmentOverlap(U,F);if(!G)continue;k.neighbours.push(B),B.neighbours.push(k);const[$,H]=G;let W=k.centroid.angle(U.start),q=k.centroid.angle(G[0]),K=k.centroid.angle(G[1]),z=V.angleDifference(W,q),Y=V.angleDifference(W,K);zk.point.xB.point.x?1:k.point.yB.point.y?1:0));const F=U[0].line===U[1].line,G=U[1].point.isNearlyEqual(U[2].point);return F||G?null:[U[1].point,U[2].point]}projectPointToPolygon(k,B){let U=null,F=Number.MAX_VALUE;for(const G of B.polygon.edges){const B=this.projectPointToEdge(k,G),j=k.getDistance(B);(null===U||j{"use strict";U.d(B,{q:()=>j});var F=U(27179),G=U(55787);class j{constructor(k,B){this.id=k,this.polygon=B,this.neighbours=[],this.portals=[],this.centroid=this.calculateCentroid(),this.boundingRadius=this.calculateRadius(),this.weight=1}getPoints(){return this.polygon.points}contains(k){return this.polygon.contains(k.x,k.y)||this.isPointOnEdge(k)}calculateCentroid(){const k=new F.I(0,0),B=this.polygon.points.length;return this.polygon.points.forEach((B=>{k.add(B)})),k.x/=B,k.y/=B,k}calculateRadius(){let k=0;for(const B of this.polygon.points){const U=Math.sqrt(this.centroid.getDistanceSq(B));U>k&&(k=U)}return k}isPointOnEdge({x:k,y:B}){for(const U of this.polygon.edges)if(U.pointOnSegment(k,B))return!0;return!1}destroy(){this.neighbours=[],this.portals=[]}toString(){return`NavPoly(id: ${this.id} at: ${this.centroid})`}isWall(){return 0===this.weight}centroidDistance(k){return Math.sqrt(this.centroid.getDistanceSq(k.centroid))}getCost(k){return G.q.getCost(k,this)}}},41444:(k,B,U)=>{"use strict";U.d(B,{B:()=>j,ih:()=>G});const F="custom:annotations:assetTagProperties";class G{static getAssetProperties(k){return Reflect.getMetadata(F,k.constructor)}static addAssetMetadata(k,B,U){const j=new Map(G.getAssetProperties(k));j.set(B,U),Reflect.defineMetadata(F,j,k.constructor)}}const j=k=>(B,U)=>{G.addAssetMetadata(B,U,k)}},87661:(k,B,U)=>{"use strict";var F;U.d(B,{Z:()=>F}),function(k){k.Image="image",k.Font="font",k.Spine="spine",k.Json="json",k.Csv="csv",k.Prefab="prefab",k.SingleImage="singleImage",k.Atlas="atlas",k.Audio="audio",k.Sfx="sfx",k.Bgm="bgm",k.TiledMap="tiledMap",k.Tileset="tileset",k.StreamedMap="streamedMap",k.StreamedMapEla="streamedMapEla"}(F||(F={}))},84097:(k,B,U)=>{"use strict";var F;U.d(B,{r:()=>F}),function(k){k[k.Save=0]="Save",k[k.Load=1]="Load"}(F||(F={}))},32469:(k,B,U)=>{"use strict";var F;U.d(B,{b:()=>F}),function(k){k.String="string",k.Number="number",k.JSON="json",k.JSONFile="jsonFile",k.Boolean="boolean",k.Color="color",k.Vector="vector",k.Size="size",k.ComponentReference="componentReference",k.GameObjectReference="gameObjectReference",k.SceneObjectReference="sceneObjectReference",k.PrefabConstructable="prefabConstructable",k.Signal="signal",k.EditorAssetReference="editorAssetReference",k.Enum="enum",k.Unknown="unknown",k.UnknownObject="unknownObject",k.GenericObject="GenericObject"}(F||(F={}))},823:(k,B,U)=>{"use strict";U.d(B,{E8:()=>pt,ER:()=>rt,Lr:()=>z,Mn:()=>dt,Om:()=>ot,SZ:()=>ht,UW:()=>$,VF:()=>lt,W_:()=>Z,YL:()=>q,_H:()=>nt,bb:()=>ft,dY:()=>W,e6:()=>vt,fY:()=>H,g1:()=>J,g8:()=>ut,gf:()=>bt,i0:()=>gt,iE:()=>st,lu:()=>Y,nK:()=>K,np:()=>ct,oB:()=>at,ok:()=>Q,tW:()=>it,tf:()=>X,vC:()=>et,vk:()=>tt});var F=U(47131),G=U(22494),j=U(32469);const $="custom:annotations:serializableProperties",H="custom:annotations:propertyInfo";function V(k,B){if(Reflect.hasOwnMetadata(H,k.constructor,B))return Reflect.getOwnMetadata(H,k.constructor,B);{G.Q.addProperty($,k.constructor,B);const U={property:B,type:j.b.Unknown,isArray:!1,isRecord:!1,isReorderableList:!1};return Reflect.defineMetadata(H,U,k.constructor,B),U}}class W{static addTypeMetadata(k,B,U,F){const G=V(k,B);if(G.type=U,!G.alias){let k=B;"_"===B[0]&&(k=B.substr(1),G.alias=k)}return G.priority||(G.priority=0),Object.assign(G,F),G}static addMetadata(k,B,U){const F=V(k,B);return Object.assign(F,U),F}static setTypeMetadataIsRecord(k,B,U){const F=V(k,B);return F.isRecord=U,F}}const q=k=>mt(((B,U)=>{W.addMetadata(B,U,{toolTip:k})})),K=k=>(B,U)=>{W.addMetadata(B,U,{alias:k})},z=k=>(B,U)=>{W.addMetadata(B,U,{priority:k})},Y=k=>mt(((B,U)=>{W.addMetadata(B,U,{inputUpdateMode:k})})),Q=k=>mt(((B,U)=>{W.addMetadata(B,U,{renderIf:k})})),X=k=>(B,U)=>{var F,G;const j=null!==(G=null===(F=Reflect.getOwnMetadata(H,B.constructor,U))||void 0===F?void 0:F.validateFunctions)&&void 0!==G?G:[];j.push(k),W.addMetadata(B,U,{validateFunctions:j})},Z=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.String,k)},J=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.Number,k)},tt=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.Boolean,k)},et=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.JSON,k)},it=(k,B)=>(U,F)=>{W.addTypeMetadata(U,F,j.b.JSONFile,B).assetExtension=k||"json"},st=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.Color,k)},nt=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.Vector,k)},at=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.Size,k)},rt=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.GameObjectReference,k)},ot=()=>(k,B)=>{W.setTypeMetadataIsRecord(k,B,!0)},ht=(k=!0,B)=>(U,F)=>{const G=V(U,F);G.insertElementCallbacks=B,k?G.isReorderableList=!0:G.isArray=!0},ct=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.GenericObject,k)},dt=(k,B)=>(U,F)=>{const G=W.addTypeMetadata(U,F,j.b.ComponentReference,B);"string"!=typeof k?G.componentCtor=k:G.typeName=k},lt=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.ComponentReference,k).componentCtor=F.d},ut=(k,B)=>(U,F)=>{W.addTypeMetadata(U,F,j.b.SceneObjectReference,B).componentCtor=k},ft=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.Signal,k)},bt=(k,B)=>(U,F)=>{W.addTypeMetadata(U,F,j.b.Enum,B).referenceType=k},pt=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.UnknownObject,k)},vt=(k,B)=>(U,F)=>{W.addTypeMetadata(U,F,j.b.PrefabConstructable,B).categoryFilter=k},gt=k=>(B,U)=>{W.addTypeMetadata(B,U,j.b.EditorAssetReference).assetType=k},mt=k=>()=>{}},6e4:(k,B,U)=>{"use strict";U.d(B,{Pq:()=>H,QW:()=>$});var F=U(22494);const G="custom:annotations:RequireComponentTagProperties",j="custom:annotations:requireComponentInfo";class ${static getProperties(k){return Reflect.getMetadata(G,k.constructor)||[]}static getPropertyInfo(k,B){return Reflect.getMetadata(j,k.constructor,B)}static addMetadata(k,B){F.Q.addProperty(G,k.constructor,B)}}const H=k=>(B,U)=>{$.addMetadata(B,U);const F={ctor:k};Reflect.defineMetadata(j,F,B.constructor,U)}},80473:(k,B,U)=>{"use strict";U.d(B,{Z$:()=>F.Z,bJ:()=>G.b,Lk:()=>$,nK:()=>j.nK,i0:()=>j.i0,lu:()=>j.lu,Lr:()=>j.Lr,ok:()=>j.ok,Pq:()=>H.Pq,SZ:()=>j.SZ,vk:()=>j.vk,iE:()=>j.iE,Mn:()=>j.Mn,gf:()=>j.gf,ER:()=>j.ER,np:()=>j.np,vC:()=>j.vC,tW:()=>j.tW,Mt:()=>q,g1:()=>j.g1,Om:()=>j.Om,g8:()=>j.g8,bb:()=>j.bb,W_:()=>j.W_,_H:()=>j._H,YL:()=>j.YL,tf:()=>j.tf});var F=U(87661),G=(U(84097),U(32469)),j=U(823);class ${static nonEmptyString(){return k=>{if(!(null==k?void 0:k.trim()))return"This field cannot be empty."}}static integer(){return k=>{if(!Number.isInteger(k))return"This field must be a whole number."}}static greaterThan(k){return B=>{if(B<=k)return`This field must be greater than ${k}.`}}static lessThan(k){return B=>{if(B>=k)return`This field must be less than ${k}.`}}static range(k,B){return U=>{if(UB)return`This field must be between ${k} and ${B}.`}}}var H=U(6e4),V=U(22494);const W="custom:annotations:UIDTagProperties";const q=()=>(k,B)=>{j.dY.addTypeMetadata(k,B,G.b.Number),class{static getUIDProperties(k){return Reflect.getMetadata(W,k.constructor)}static addUIDMetadata(k,B){V.Q.addProperty(W,k.constructor,B)}}.addUIDMetadata(k,B)}},51200:(k,B,U)=>{"use strict";U.d(B,{k:()=>H});var F=U(68910),G=U(563),j=U(64527);class ${applyScalingToTransform(k,B,U){const F=k.rectTransformDimensions,G=F.width/B.width,j=F.height/B.height,$=-B.width*k.pivot.x*G,H=-B.height*k.pivot.y*j;U.scale.set(G,j),U.position.set($,H)}applyToMatrix(k,B){B.append(k)}}class H extends F.Transform{constructor(k,B,U){super(),this._rectTransformScalingTransform=new F.Transform,this._previousRectTransformDimensions=new j.o,this._previousContainerDimensions=new j.o,this._rectTransformScaling=new $,this._applyRectTransformScaling=!1,this._transformIDs={0:0,1:0,2:0},this._attachedTransform=k,this._targetRenderable=B,this._getDimensionsFunc=U,this._applyRectTransformScaling=k instanceof G.X,this._worldID=B.getRootContainer().transform._worldID+1}updateLocalTransform(){if(!this._targetRenderable||!this._attachedTransform)return;const k=this._attachedTransform.pixiTransform,B=k._localID;B!==this._localID&&(this.localTransform.copyFrom(k.localTransform),this.position.copyFrom(k.position),this.scale.copyFrom(k.scale),this.rotation=k.rotation,this._localID=B)}updateTransform(){var k,B,U;if(!this._targetRenderable||!this._attachedTransform)return;if(this._applyRectTransformScaling){const k=this._attachedTransform,B=k.rectTransformDimensions,U=this._getDimensionsFunc(),F=!this._previousRectTransformDimensions.isNearlyEqual(B);F&&(this._transformIDs[2]=1),!F&&this._previousContainerDimensions.isNearlyEqual(U)||(this._rectTransformScaling.applyScalingToTransform(k,U,this._rectTransformScalingTransform),this._rectTransformScalingTransform.updateLocalTransform(),this._previousContainerDimensions.copyFrom(U),this._previousRectTransformDimensions.copyFrom(B),this._transformIDs[2]=1)}const G=this.hasCustomParent(),j=null!==(U=null===(B=null===(k=this._targetRenderable.getRootContainer())||void 0===k?void 0:k.parent)||void 0===B?void 0:B.transform)&&void 0!==U?U:F.Transform.IDENTITY,$=this._attachedTransform.pixiTransform,H=G?j._worldID:$._parentID,V=G?j._worldID:$._worldID,W=this._rectTransformScalingTransform._localID;H===this._parentID&&V===this._transformIDs[0]&&W===this._transformIDs[1]&&1!==this._transformIDs[2]||(G?this.worldTransform.copyFrom(j.worldTransform):(this.worldTransform.copyFrom($.worldTransform),this._applyRectTransformScaling&&this._rectTransformScaling.applyToMatrix(this._rectTransformScalingTransform.localTransform,this.worldTransform)),this._worldID++,this._parentID=H,this._transformIDs[0]=V,this._transformIDs[1]=W,this._transformIDs[2]=0)}setCustomRectTransformScaling(k){this._rectTransformScaling=k}hasCustomParent(){var k;return!!this._targetRenderable&&(null===(k=this._targetRenderable.getRootContainer())||void 0===k?void 0:k.parent)!==this._targetRenderable.getParentContainer()}destroy(){this._getDimensionsFunc=null,this._targetRenderable=null,this._attachedTransform=null,this._rectTransformScalingTransform=null}}},4697:(k,B,U)=>{"use strict";U.d(B,{y:()=>st});var F,G=U(8674),j=U(68910),$=U(40794),H=U(29658),V=U(15740),W=U(44716),q=U(43501),K=U(47131),z=U(80267),Y=U(5191),Q=U(64527),X=U(27179),Z=U(823),J=U(52751),tt=U(32154),et=U(71082),it=U(51200);let st=F=class extends $.u{constructor(){super(...arguments),this.onRootContainerParentRemoved=new V.H,this.onRootContainerParentSet=new V.H,this.onRootContainerSet=new V.H,this._filter=null,this._isCullable=!1,this._rootContainer=null,this._parentRenderComponent=null,this._overrideTransform=null,this._onCreateAction=new V.H}get isCullable(){return this._isCullable}set isCullable(k){this._isCullable=k,this.cullContainer(k)}get smooth(){return this._smooth}set smooth(k){this._smooth=k,this.updateSmooth()}create(){super.create(),this._onCreateAction.dispatch()}destroy(){this.clearParentRenderComponent(),this.clearListeners(),this._onCreateAction.dispose(),this.onRootContainerSet.dispose(),this.onRootContainerParentRemoved.dispose(),this.onRootContainerParentSet.dispose(),this.clearRootContainer(),this._overrideTransform&&this._overrideTransform.destroy(),this._previousTransform=null,this._overrideTransform=null,super.destroy()}onEnable(){super.onEnable(),this.updateVisibility()}onDisable(){super.onDisable(),this.updateVisibility()}getRootContainer(){return this._rootContainer}getDimensions(){return z.V.log(`Render component getDimensions not overridden in '${this.constructor.name}'. This is likely a mistake.`,Y.$.Warning),Q.o.ZERO}getCenterOffset(){return X.I.ZERO}getParentContainer(){var k;const B=null===(k=this._parentRenderComponent)||void 0===k?void 0:k.getRootContainer();return B&&this._parentRenderComponent.GameObject.layer===this.GameObject.layer?B:this.GameObject?J.w.getActiveScene().getLayer(this.GameObject.layer):null}setUpDisplayObject(k){this.setFilter(k),this.setRootContainer(k)}setFilter(k){this._filter?k.filters=[this._filter.createFilter()]:k.filters=null}setRootContainer(k){this.isCreated?this._rootContainer?z.V.log("Root container can only be set once",Y.$.Warning):k?(this._rootContainer=k,this.overrideRootContainerRender(),this.cullContainer(this._isCullable),this.updateVisibility(),this.GameObject.onActiveInHierarchyChanged.add(this.updateVisibility,this),this.GameObject.onHierarchyChanged.add(this.gameObjectHierarchyChanged,this),this.onRootContainerSet.dispatch(),this.attachRootContainer(),this.updateSmooth()):z.V.log("Root container must be a valid value",Y.$.Warning):this._onCreateAction.addOnce(this.setRootContainer,this,void 0,k)}cullContainer(k){this._rootContainer&&(this._rootContainer.cullable=k)}overrideRootContainerRender(){this._originalRootContainerRender||(this._originalRootContainerRender=this._rootContainer.render.bind(this._rootContainer),this._rootContainer.render=k=>{var B;this.canRootContainerRender()&&(this._rootContainer.cullable&&(this._rootContainer._mask||(null===(B=this._rootContainer.filters)||void 0===B?void 0:B.length))&&!this.doesRootContainerIntersectWithRenderer(k)||this._originalRootContainerRender(k))})}resetRootContainerRender(){this._rootContainer&&this._originalRootContainerRender&&(this._rootContainer.render=this._originalRootContainerRender),this._originalRootContainerRender=void 0}canRootContainerRender(){var k,B;if(!et.C.canContainerRender(this._rootContainer))return!1;const U=null!==(B=null===(k=this._overrideTransform)||void 0===k?void 0:k.worldTransform)&&void 0!==B?B:j.Matrix.IDENTITY;return!(0===U.a||0===U.d)}doesRootContainerIntersectWithRenderer(k){const B=k.renderTexture.sourceFrame;if(!(B.width>0&&B.height>0))return!1;let U,F;this._rootContainer.cullArea?(U=this._rootContainer.cullArea,F=this._rootContainer.worldTransform):U=this._rootContainer.getBounds(!0);const G=k.projection.transform;return G&&(F?F.prepend(G):F=G),U&&B.intersects(U,F)}getOverriddenTransform(){return this._overrideTransform}createPixiTransformOverride(){return new it.k(this.GameObject.transform,this,(()=>this.getDimensions()))}attachRootContainer(){if(this.GameObject.legacyTransform)this.addRootContainerToContainerObject(this.GameObject.legacyTransform.group),this.GameObject.legacyTransform.OnDestroy.add(this.onLegacyTransformDestroyed,this);else{this.GameObject.transform?this.overridePIXIUpdateFunction():this.GameObject.onComponentAdded.add(this.trackTransformAddingToOverride,this),this.GameObject.onComponentAddedToHierarchy.add(this.componentAddedToHierarchy,this);const k=this.GameObject.findComponentInParent(F,!1);k?(this._parentRenderComponent=k,this._parentRenderComponent.OnDestroy.add(this.onParentRenderComponentDestroyed,this),k.getRootContainer()?(this._parentRenderComponent.GameObject.onLayerChanged.add(this.attachRootToRenderComponentParent,this),this.GameObject.onLayerChanged.add(this.attachRootToRenderComponentParent,this)):(k.onRootContainerSet.add(this.onRenderComponentContainerWasSet,this),this.GameObject.onLayerChanged.add(this.attachRootToCurrentLayer,this)),this.attachRootToRenderComponentParent()):(this.attachRootToCurrentLayer(),this.GameObject.onLayerChanged.add(this.attachRootToCurrentLayer,this))}}gameObjectHierarchyChanged(){this.clearParentRenderComponent(),this.GameObject.onLayerChanged.remove(this.attachRootToCurrentLayer,this),this.attachRootContainer()}componentAddedToHierarchy(k,B){if(B instanceof F)if(null===this._parentRenderComponent)this.attachRootContainer();else{const k=this.GameObject.findComponentInParent(F,!1);this._parentRenderComponent!==k&&(this.clearParentRenderComponent(),this.attachRootContainer())}}clearParentRenderComponent(){var k,B;this._parentRenderComponent&&(this._parentRenderComponent.onRootContainerSet.removeAll(this),null===(k=this._parentRenderComponent.GameObject)||void 0===k||k.onLayerChanged.removeAll(this),this._parentRenderComponent.OnDestroy.removeAll(this),this.GameObject.onLayerChanged.removeAll(this),this.onRootContainerParentRemoved.dispatch(),null===(B=this._parentRenderComponent.getRootContainer())||void 0===B||B.removeChild(this._rootContainer),this._parentRenderComponent=null)}attachRootToRenderComponentParent(){var k;const B=null===(k=this._parentRenderComponent)||void 0===k?void 0:k.getRootContainer(),U=this.getParentContainer();if(U===B&&U.children.length>0){const k=this.findChildIndex(),B=U.children.indexOf(this._rootContainer);-1!==B&&B===k||U.addChildAt(this._rootContainer,k)}else this.addRootContainerToContainerObject(U);this.onRootContainerParentSet.dispatch()}findChildIndex(){const k=this.buildRenderComponentOrder(this._parentRenderComponent.GameObject),B=k.indexOf(this),U=this._parentRenderComponent._rootContainer.children,F=k.length;for(let G=B;G-1)return B}return U.length}buildRenderComponentOrder(k){const B=[],U=k.children.length;for(let G=0;G0?j:this.buildRenderComponentOrder(U))}return B}attachRootToCurrentLayer(){if(this.gameObject.isMarkedForDestruction||this.gameObject.isDestroyed)return;this._rootContainer.parent&&this.onRootContainerParentRemoved.dispatch();const k=J.w.getActiveScene().getLayer(this.GameObject.layer);this.addRootContainerToContainerObject(k),this.onRootContainerParentSet.dispatch()}addRootContainerToContainerObject(k){k&&-1===k.children.indexOf(this._rootContainer)&&this._rootContainer&&!this._rootContainer.destroyed&&k.addChild(this._rootContainer)}onRenderComponentContainerWasSet(){this._parentRenderComponent.onRootContainerSet.remove(this.onRenderComponentContainerWasSet,this),this._parentRenderComponent.GameObject.onLayerChanged.add(this.attachRootToRenderComponentParent,this),this.GameObject.onLayerChanged.remove(this.attachRootToCurrentLayer,this),this.GameObject.onLayerChanged.add(this.attachRootToRenderComponentParent,this),this.attachRootToRenderComponentParent()}updateVisibility(){var k;if(this._rootContainer&&!this._rootContainer.destroyed){const B=this.IsActiveInHierarchy;this._rootContainer.visible=B,this._rootContainer.exists=B,null===(k=this._overrideTransform)||void 0===k||k.updateTransform()}}updateSmooth(){this._rootContainer&&tt.A.isDefined(this._smooth)&&tt.A.toggleDisplayObjSmooth(this._rootContainer,this._smooth)}trackTransformAddingToOverride(k){k instanceof q.d?(this.overridePIXIUpdateFunction(),this.GameObject.onComponentAdded.remove(this.trackTransformAddingToOverride,this)):k instanceof W.K&&(this.attachRootContainer(),this.GameObject.onComponentAdded.remove(this.trackTransformAddingToOverride,this))}onOverrideTransformDestroyed(){this.resetPIXIUpdateFunction(),this.attachRootContainer(),this.GameObject.onComponentAdded.add(this.trackTransformAddingToOverride,this)}onLegacyTransformDestroyed(){this.attachRootContainer(),this.GameObject.onComponentAdded.add(this.trackTransformAddingToOverride,this)}onParentRenderComponentDestroyed(){this._parentRenderComponent.GameObject.onLayerChanged.removeAll(this),this.GameObject.onLayerChanged.removeAll(this),this.GameObject.onLayerChanged.add(this.attachRootToCurrentLayer,this),this.attachRootToCurrentLayer()}overridePIXIUpdateFunction(){this._overrideTransform||(this.GameObject.transform.OnDestroy.add(this.onOverrideTransformDestroyed,this),this._previousTransform=this._rootContainer.transform,this._overrideTransform=this.createPixiTransformOverride(),this._rootContainer.transform=this._overrideTransform)}resetPIXIUpdateFunction(){this._rootContainer.transform=this._previousTransform,this._previousTransform=null,this._overrideTransform=null}clearListeners(){this.GameObject&&(this.GameObject.onActiveInHierarchyChanged.removeAll(this),this.GameObject.onHierarchyChanged.removeAll(this),this.GameObject.onLayerChanged.removeAll(this),this.GameObject.onComponentAddedToHierarchy.removeAll(this),this.GameObject.onDestroy.removeAll(this),this.GameObject.onComponentAdded.removeAll(this),this.GameObject.legacyTransform?this.GameObject.legacyTransform.OnDestroy.removeAll(this):this.GameObject.transform&&this.GameObject.transform.OnDestroy.removeAll(this))}clearRootContainer(){this._rootContainer&&(this.resetRootContainerRender(),this._previousTransform&&(this._rootContainer.transform=this._previousTransform),this._rootContainer.removeFromParent(),this._rootContainer=null)}};(0,G.Cg)([(0,Z.VF)(),(0,G.Sn)("design:type",K.d)],st.prototype,"_filter",void 0),(0,G.Cg)([(0,Z.vk)(),(0,Z.YL)("Should the _rootContainer (including children) of this RenderComponent be culled?
    Useful when you expect to have objects that are off screen."),(0,G.Sn)("design:type",Boolean)],st.prototype,"_isCullable",void 0),(0,G.Cg)([(0,Z.vk)(),(0,Z.YL)("Should the _rootContainer (including children) of this RenderComponent be smoothed?"),(0,G.Sn)("design:type",Boolean)],st.prototype,"_smooth",void 0),st=F=(0,G.Cg)([(0,H.EV)("RenderComponent (abstract)",void 0,"Includes helpers for some of the core functionality required for
    injecting render components into the scene graph")],st)},59859:(k,B,U)=>{"use strict";U.d(B,{j:()=>z});var F=U(8674),G=U(85880),j=U(68910),$=U(29658),H=U(61806),V=U(300),W=U(40008),q=U(80473),K=U(4697);let z=class extends K.y{constructor(){super(...arguments),this.localBoundsOffset=W.I9.ZERO,this._updateRequired=!1,this._alpha=1,this._tintColor="0xFFFFFF",this._tintIntensity=0,this._tintBlendMode=V.Pz.Multiply,this._baseFilter=null}get alpha(){return this._alpha}set alpha(k){this._updateRequired||(this._updateRequired=this._alpha!==k),this._alpha=k}get tintColor(){return this._tintColor}set tintColor(k){this._updateRequired||(this._updateRequired=this._tintColor!==k),this._tintColor=k}get tintIntensity(){return this._tintIntensity}set tintIntensity(k){this._updateRequired||(this._updateRequired=this._tintIntensity!==k),this._tintIntensity=k}get tintBlendMode(){return this._tintBlendMode}set tintBlendMode(k){this._updateRequired||(this._updateRequired=this._tintIntensity!==k),this._tintBlendMode=k}get requireFilter(){return 1!==this._alpha||0!==this._tintIntensity}create(){var k,B;if(super.create(),!this._renderContainer){if(this._renderContainer=null===(B=null===(k=H.W.instance)||void 0===k?void 0:k.game)||void 0===B?void 0:B.add.container(),!this._renderContainer)return;this._renderContainer.name=this.GameObject.name,this.setRootContainer(this._renderContainer)}this.requireFilter&&(this._updateRequired=!0,this.updateFilter())}getCenterOffset(){return this.localBoundsOffset}updateFilter(){var k;if(this.requireFilter){if(this._updateRequired&&this.lookupBaseFilter()){const[k=255,B=255,U=255]=G.os.utils.splitColor(this._tintColor);this._baseFilter.alpha=this._alpha,this._baseFilter.tintIntensity=this._tintIntensity,this._baseFilter.tintColor=[k/255,B/255,U/255],this._baseFilter.blend=this._tintBlendMode,this._updateRequired=!1}}else(null===(k=this._renderContainer.filters)||void 0===k?void 0:k.includes(this._baseFilter))&&(this._renderContainer.filters=this._renderContainer.filters.filter((k=>k!==this._baseFilter)),this._baseFilter.destroy(),this._baseFilter=null,this._updateRequired=!1)}lookupBaseFilter(){var k;if(this._renderContainer)return this._renderContainer.filters||(this._renderContainer.filters=[]),this._baseFilter=(null===(k=this._renderContainer.filters)||void 0===k?void 0:k.find((k=>k instanceof V.oW)))||new V.oW,this._renderContainer.filters.includes(this._baseFilter)||this._renderContainer.filters.push(this._baseFilter),this._baseFilter}getDimensions(){var k,B,U,F,G,$,H,V;const q=null===(B=null===(k=this._renderContainer)||void 0===k?void 0:k._bounds)||void 0===B?void 0:B.getRectangle(),K=(null==q?void 0:q.width)>0?q:new j.Rectangle(0,0,100,100);return this.localBoundsOffset=new W.I9(K.x-(null===(G=null===(F=null===(U=this.gameObject)||void 0===U?void 0:U.transform)||void 0===F?void 0:F.localPosition)||void 0===G?void 0:G.x),K.y-(null===(V=null===(H=null===($=this.gameObject)||void 0===$?void 0:$.transform)||void 0===H?void 0:H.localPosition)||void 0===V?void 0:V.y)),new W.or(K.width,K.height)}destroy(){var k;null===(k=this._renderContainer)||void 0===k||k.destroy(),this._renderContainer=null,super.destroy()}canRootContainerRender(){var k;return 0!==(null===(k=this._baseFilter)||void 0===k?void 0:k.alpha)&&super.canRootContainerRender()}};(0,F.Cg)([(0,q.g1)(),(0,F.Sn)("design:type",Number)],z.prototype,"_alpha",void 0),(0,F.Cg)([(0,q.iE)(),(0,F.Sn)("design:type",String)],z.prototype,"_tintColor",void 0),(0,F.Cg)([(0,q.g1)(),(0,F.Sn)("design:type",Number)],z.prototype,"_tintIntensity",void 0),(0,F.Cg)([(0,q.gf)(V.Pz),(0,F.Sn)("design:type",Number)],z.prototype,"_tintBlendMode",void 0),z=(0,F.Cg)([(0,$.EV)("BaseRender",$.YH.render,"Creates a basic render component to allow for visual changes(alpha, tint, etc)")],z)},10673:(k,B,U)=>{"use strict";U.d(B,{v:()=>et});var F,G=U(8674),j=U(29658),$=U(15740),H=U(16649),V=U(61806),W=U(80267),q=U(5191),K=U(64527),z=U(27179),Y=U(41444),Q=U(87661),X=U(823),Z=U(548),J=U(32154),tt=U(4697);let et=F=class extends tt.y{get alpha(){return this.spine.alpha}set alpha(k){this.spine&&(this.spine.alpha=k)}set tint(k){this._tint=k,this.spine&&this.spine.setTint(k)}get paused(){return this.spine&&this.isLoaded?this.spine.paused:!!J.A.isDefined(this._pausedOnLoad)&&this._pausedOnLoad}set paused(k){this.spine&&this.isLoaded?this.spine.paused=k:this._pausedOnLoad=k}get updateMethod(){var k;return this.spine&&this.isLoaded?this.spine.updateMethod:null!==(k=this._updateMethodOnLoad)&&void 0!==k?k:H.b.Pixi}set updateMethod(k){this.spine&&this.isLoaded?this.spine.updateMethod=k:this._updateMethodOnLoad=k}get isLoaded(){return this._isLoaded}get OnLoaded(){return this.onLoaded}constructor(){super(),this.spine=null,this._spineKey=null,this._spineGUID=null,this._animationRemap=new Map,this._alphaOnLoad=1,this._tint=void 0,this._isLoaded=!1,this.onLoaded=new $.H,this._preCreateSetAsset=null,this.onEvent=new $.H,this._spineSize=new K.o,this._spineAnchor=new z.I,this._smooth=!0}create(){super.create(),this.onLoaded.addOnce((()=>{this.alpha=this._alphaOnLoad,J.A.isDefined(this._pausedOnLoad)&&(this.paused=this._pausedOnLoad),J.A.isDefined(this._updateMethodOnLoad)&&(this.updateMethod=this._updateMethodOnLoad)})),this._rootGroup=V.W.instance.game.add.container(void 0,this.GameObject.name),this._rootGroup.containsPoint=this.isPointInSpine.bind(this),this.setRootContainer(this._rootGroup),this._preCreateSetAsset?(this._preCreateSetAsset(),this._preCreateSetAsset=null):this._spineKey?this.setAsset(this._spineKey):this._spineGUID&&this.setAsset(this._spineGUID)}setAsset(k,B,U){var F;if(!this._rootGroup)return this._preCreateSetAsset=this.setAsset.bind(this,k,B,U),void(this._spineKey=k);this.destroySpine(),J.A.isDefined(k)&&0!==k.length?(this._isLoaded=!1,Z.E.isLoaded(k)?(this.updateSpineObject(k),J.A.isDefined(B)&&B()):U?U(k,B):W.V.log(`Spine asset ${k} was not found in cache and no load function was provided to SpineComponent on ${null===(F=this.gameObject)||void 0===F?void 0:F.name}`,q.$.Error)):J.A.isDefined(B)&&B()}destroy(){var k;this.destroySpine(),this._animationRemap.clear(),null===(k=this._rootGroup)||void 0===k||k.destroy(),this.onLoaded.dispose(),this.onEvent.dispose(),this._isLoaded=!1,this._preCreateSetAsset=null,super.destroy()}destroySpine(){this.spine&&(this.spine.onEvent&&this.spine.onEvent.removeAll(this.onEvent),this.spine.pendingDestroy=!0,this.spine=null)}getDimensions(){return this.spine?this._spineSize:K.o.ZERO}getCenterOffset(){return this.spine?this._spineAnchor:z.I.ZERO}getCurrentDimensions(){return this.spine?new K.o(this.spine.width,this.spine.height):K.o.ZERO}getSpine(){return this.spine}setAnimationMix(k,B,U){this.spine.setAnimationMix(this.getRemappedAnimation(k),this.getRemappedAnimation(B),U)}update(){var k;null===(k=this.spine)||void 0===k||k.updateFromComponent(),super.update()}updateSpineObject(k){if(this.destroySpine(),this.GameObject){this.spine=V.W.instance.game.add.spine(0,0,k),this._tint&&this.spine.setTint(this._tint),this.spine.updateMethod=H.b.Pixi,this._rootGroup.addChild(this.spine),this.updateSmooth(),this.setSlotVisibility(F.INPUT_HITBOX,!1),this.spine.onEvent.add(this.onEvent.dispatch,this.onEvent),this.spine.update();const B=this.spine.skeleton.data,U=B.width,G=B.height;this._spineSize.setTo(U,G);const j=B.x,$=B.y;this._spineAnchor.setTo(-U-j,-G-$),this._isLoaded=!0,this.onLoaded.dispatch()}}setSlotVisibility(k,B){const U=this.getSlot(k);if(U){const k=this.getSpine().getSlotContainer(U);k?k.visible=B:U.color.a=B?1:0}}getSlot(k){var B;return this.spine?this.spine.skeleton.findSlot(k):(W.V.log(`No Spine in SpineComponent on ${null===(B=this.gameObject)||void 0===B?void 0:B.name}`,q.$.Error),null)}getBone(k){var B;let U=null;return this.spine?(U=this.spine.skeleton.findBone(k),U||W.V.log(`Bone with name ${k} not found`,q.$.Error)):W.V.log(`No Spine in SpineComponent on ${null===(B=this.gameObject)||void 0===B?void 0:B.name}`,q.$.Error),U}setAnimationByName(k,B,U=!1){const F=this.getRemappedAnimation(B);this.spine.setAnimationByName(k,F,U)}addAnimationRemap(k,B){this._animationRemap.set(k,B)}removeAnimationRemap(k,B){B&&this._animationRemap.get(k)!==B||this._animationRemap.delete(k)}getRemappedAnimation(k){var B;return null!==(B=this._animationRemap.get(k))&&void 0!==B?B:k}isPointInSpine(k){if(!this.spine)return!1;const B=this.spine.getBounds();return k.x>=B.left&&k.x<=B.right&&k.y>=B.top&&k.y<=B.bottom}};et.INPUT_HITBOX="input_hitbox",(0,G.Cg)([(0,Y.B)(),(0,X.W_)(),(0,X.Lr)(0),(0,X.nK)("asset"),(0,G.Sn)("design:type",String)],et.prototype,"_spineKey",void 0),(0,G.Cg)([(0,Y.B)(),(0,X.i0)(Q.Z.Spine),(0,G.Sn)("design:type",String)],et.prototype,"_spineGUID",void 0),(0,G.Cg)([(0,X.g1)(),(0,X.Lr)(0),(0,X.nK)("alpha"),(0,G.Sn)("design:type",Number)],et.prototype,"_alphaOnLoad",void 0),(0,G.Cg)([(0,X.vk)(),(0,X.nK)("paused"),(0,G.Sn)("design:type",Boolean)],et.prototype,"_pausedOnLoad",void 0),(0,G.Cg)([(0,X.gf)(H.b),(0,X.nK)("updateMethod"),(0,G.Sn)("design:type",String)],et.prototype,"_updateMethodOnLoad",void 0),(0,G.Cg)([(0,X.bb)(),(0,G.Sn)("design:type",$.H)],et.prototype,"onLoaded",void 0),(0,G.Cg)([(0,X.bb)(),(0,G.Sn)("design:type",$.H)],et.prototype,"onEvent",void 0),et=F=(0,G.Cg)([(0,j.EV)("Spine",j.YH.animation,"Renders a spine asset"),(0,G.Sn)("design:paramtypes",[])],et)},87987:(k,B,U)=>{"use strict";U.d(B,{W:()=>W});var F=U(57530),G=U(80267),j=U(5191),$=U(21695),H=U(71392),V=U(17607);class W extends H.m{get sortFunctor(){return this._sortFunctor}set sortFunctor(k){this._sortFunctor=k}constructor(k,B,U){super(),this._sortFunctor=V.I.NONE,this.attachToCamera=U,this.interactiveChildren=!0,k.addChild(this),this.name=B}render(k){var B;!this.children.length||!this.visible||this.worldAlpha<=0||this.children.every((k=>!k.visible||k.worldAlpha<=0))||(null===(B=F.i.main)||void 0===B||B.setCameraActive(!this.attachToCamera,k),super.render(k))}addDisplayObject(k){if(this._sortFunctor){const B=this.children.length;for(let U=0;U-1?this.removeChild(k):G.V.log("Display object was not found",j.$.Warning)}update(){this._sortFunctor&&$.N.insertion(this.children,this._sortFunctor),super.update()}}W.DEFAULT_NAME="default",W.DEFAULT_DEPTH=0},17607:(k,B,U)=>{"use strict";U.d(B,{I:()=>F});const F={Y_SORT:(k,B)=>k.worldTransform.ty{"use strict";U.d(B,{Z:()=>W});var F=U(68910),G=U(61806),j=U(36361),$=U(80267),H=U(5191),V=U(87987);class W{constructor(){this._layers=new Map,this._gameObjects=[],this._container=new j.r,this.POST_UPDATE="postUpdate",this.onPostUpdate=new F.Runner(this.POST_UPDATE)}get gameObjects(){return this._gameObjects}get container(){return this._container}addGameObject(k){if(!k)return $.V.log("Cannot add null gameObject",H.$.Error),null;k.parent?$.V.log("Could not add game object to scene as it is parented to something already",H.$.Warning):this._gameObjects.push(k)}removeGameObject(k){const B=this._gameObjects.indexOf(k);B>-1?this._gameObjects.splice(B,1):$.V.log("Could not remove game object from the scene",H.$.Warning)}addLayer(k=V.W.DEFAULT_NAME,B=V.W.DEFAULT_DEPTH,U){return this._layers.has(k)?($.V.log(`A layer with the name '${k}' already exists. It will not be added.`,H.$.Warning),this._layers.get(k).layer):this.createLayer(k,B,U)}getLayer(k){return this._layers.has(k)?this._layers.get(k).layer:this.createLayer(k,V.W.DEFAULT_DEPTH)}hasLayer(k){return this._layers.has(k)}setLayerDepth(k,B){const U=this._layers.get(k);if(!U)return null;U.depth=B;const F=G.W.instance.game;return F.world.removeChild(U.layer),this.addContainerToWorld(F,U.layer,B),U.layer}setAllLayerVisibility(k,B){for(const U of this._layers.keys())(null==B?void 0:B.has(U))||(this._layers.get(U).layer.visible=k)}addContainerToWorld(k,B,U){const F=k.world.children,G=F.length;for(let j=0;j-1;--k)this._gameObjects[k].destroyDeferred();this._gameObjects=null;for(const k of this._layers.keys())this.destroyLayer(k);this._layers=null,this._container.unbindAll(),this.onPostUpdate.destroy(),this.onPostUpdate=null}findLayerDataForObject(k){const B=k.name;return B&&this._layers.has(B)?this._layers.get(B):null}createLayer(k,B,U=!1){const F=G.W.instance.game,j=new V.W(F.stage,k,U);return this.addContainerToWorld(G.W.instance.game,j,B),this._layers.set(k,{layer:j,depth:B}),j}}},52751:(k,B,U)=>{"use strict";U.d(B,{w:()=>G});var F=U(44770);class G{static getActiveScene(){return null===this._currentScene&&(this._currentScene=new F.Z),this._currentScene}static destroyActiveScene(){this._currentScene&&(this._currentScene.destroy(),this._currentScene=null)}}G._currentScene=null},6686:(k,B,U)=>{"use strict";U.d(B,{G:()=>$});var F=U(39002),G=U(49415),j=U(22300);class ${constructor(){this._quadTreeBounds={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY},this._staticTriggerQuadTree=new j.E({left:0,top:0,right:0,bottom:0},$.MAX_TREE_DEPTH,$.MAX_TRIGGERS_IN_LEAF),this._triggerRemoveCounter=0,this._dynamicTriggers=[]}addTrigger(k){k.isStatic?this.addStaticTrigger(k):this.addDynamicTrigger(k)}removeTrigger(k){k.isStatic?this.removeStaticTrigger(k):this.removeDynamicTrigger(k)}update(){const k=this._dynamicTriggers.length;for(let B=0;BF.c.doBoundsOverlap(U.bounds,k))).map((({value:k})=>k)));const j=G.length;for(let k=0;k-1===G.indexOf(k))).forEach((k=>{U.trigger.onTriggerExit.dispatch(k),k.onTriggerExit.dispatch(U.trigger)})),U.overlappingTriggers=G}this._dynamicTriggers.forEach((k=>{k.bounds=null}))}addStaticTrigger(k){const B=k.getBounds(),U=G.J.mergeBounds(Object.assign({},this._quadTreeBounds),B);G.J.areEqual(U,this._quadTreeBounds)||(this._staticTriggerQuadTree.updateBounds(U),this._quadTreeBounds=U),this._staticTriggerQuadTree.insert(B,k)}addDynamicTrigger(k){this._dynamicTriggers.push({trigger:k,bounds:null,overlappingTriggers:[]})}removeStaticTrigger(k){if(this._staticTriggerQuadTree.remove(k.getBounds(),k),++this._triggerRemoveCounter,this._triggerRemoveCounter>$.TRIGGER_REMOVAL_REBALANCE_COUNT){const k=this._staticTriggerQuadTree.getAllContents(),B={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY};k.forEach((({bounds:k})=>{G.J.mergeBounds(B,k)})),G.J.areEqual(B,this._quadTreeBounds)||(this._staticTriggerQuadTree.updateBounds(B),this._quadTreeBounds=B),this._triggerRemoveCounter=0}}removeDynamicTrigger(k){const B=this._dynamicTriggers.findIndex((({trigger:B})=>B===k));if(B>-1){this._dynamicTriggers.splice(B,1)[0].overlappingTriggers.forEach((B=>{B.onTriggerExit.dispatch(k),k.onTriggerExit.dispatch(B)}))}}}$.MAX_TRIGGERS_IN_LEAF=15,$.MAX_TREE_DEPTH=8,$.TRIGGER_REMOVAL_REBALANCE_COUNT=20},22070:(k,B,U)=>{"use strict";U.d(B,{o:()=>K});var F,G,j=U(46880),$=U(34711);!function(k){k.local="localStorage",k.session="sessionStorage"}(F||(F={})),function(k){k.iOS="iOS",k.Android="Android",k.iPadOS="iPadOS",k.FireOS="Fire OS",k.ChromebookOS="CrOS"}(G||(G={}));var H,V;!function(k){k.Amazon="Amazon",k.Google="Google"}(H||(H={})),function(k){k.iPhone="iPhone",k.iPad="iPad",k.iPod="iPod"}(V||(V={}));var W=U(32154);const q="Unknown";class K{static get bowserParsedData(){return this._bowserParsedData||(this._bowserParsedData=(0,j.parse)(window.navigator.userAgent)),this._bowserParsedData}static isMobile(){return this.bowserParsedData.platform.type===j.PLATFORMS_MAP.tablet||this.bowserParsedData.platform.type===j.PLATFORMS_MAP.mobile}static isDesktop(){return!K.isMobile()}static isChrome(){return this.bowserParsedData.browser.name===j.BROWSER_MAP.chrome}static isChromium(){return this.bowserParsedData.browser.name===j.BROWSER_MAP.chromium}static isFirefox(){return this.bowserParsedData.browser.name===j.BROWSER_MAP.firefox}static isEdge(){return this.bowserParsedData.browser.name===j.BROWSER_MAP.edge}static isOpera(){return this.bowserParsedData.browser.name===j.BROWSER_MAP.opera}static isSafari(){return this.bowserParsedData.browser.name===j.BROWSER_MAP.safari}static isIpadOS(){return K.getOsName()===G.iPadOS}static isIOS(){return this.bowserParsedData.os.name===G.iOS||!(K.isAndroid()||!W.A.isDefined(window.navigator.platform))&&(window.navigator.platform.indexOf(V.iPhone)>=0||window.navigator.platform.indexOf(V.iPad)>=0||window.navigator.platform.indexOf(V.iPod)>=0)}static isAndroid(){return this.bowserParsedData.os.name===G.Android}static isFireOS(){return K.getOsDistribution()===G.FireOS||K.getLocalStorageDeviceInfo().manufacturer===H.Amazon}static getBrowserType(){return this.bowserParsedData.browser.name}static getBrowserVersion(){var k;return null!==(k=this.bowserParsedData.browser.version)&&void 0!==k?k:"unknown"}static getIOSVersion(){if(/iP(hone|od|ad)/.test(navigator.platform)){const k=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);return parseInt(k[1],10)}return null}static getDeviceModel(){if(!K._deviceModel){const k=K.getLocalStorageDeviceInfo(),B=k.marketingName?`${k.manufacturer} ${k.marketingName}`.trimLeft():k.model;K._deviceModel=B||q}return K._deviceModel}static getLocalStorageDeviceInfo(){var k;if(K._detectedDeviceInfo)return K._detectedDeviceInfo;K._detectedDeviceInfo={osName:"",osVersion:"",osiOS:void 0,osAndroid:void 0,osDistribution:"",browserName:"",browserVersion:"",vendor:"",model:"",yearReleased:"",manufacturer:"",marketingName:"",mobileDevice:void 0,isTablet:void 0,primaryHardwareType:""};const B=null!==(k=window.deviceInformation)&&void 0!==k?k:JSON.parse(localStorage.getItem("device-information"));return B&&(K._detectedDeviceInfo=B),K._detectedDeviceInfo}static getDeviceHardwareType(){if(K._deviceHardwareType)return K._deviceHardwareType;const k=K.getLocalStorageDeviceInfo();return(null==k?void 0:k.primaryHardwareType)?(K._deviceHardwareType=k.primaryHardwareType,K._deviceHardwareType):q}static getOsDistribution(){const k=K.getLocalStorageDeviceInfo();return(null==k?void 0:k.osDistribution)?k.osDistribution:"unknown"}static getOsName(){const k=K.getLocalStorageDeviceInfo();return(null==k?void 0:k.osName)?k.osName:"unknown"}static isAndroidStockBrowser(){if(!K.isAndroid())return!1;return parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.appVersion)[1],10)<=534&&0===navigator.vendor.indexOf(H.Google)}static isWebAudio(){return!$.s3.useLegacy}static hasLocalStorageSupport(){return this.checkStorage(F.local)}static hasSessionStorageSupport(){return this.checkStorage(F.session)}static checkStorage(k){try{const B=window[k],U="dummy_key_for_testing_storage";return B.setItem(U,U),B.removeItem(U),!0}catch(B){return!1}}}},62481:(k,B,U)=>{"use strict";U.d(B,{R:()=>j});var F=U(5191),G=U(80267);class j{static createHandler(k){return B=>{this.logError(B,k)}}static logError(k,B){G.V.log(`${B}: ${j.stringify(k)}`,F.$.Error)}static stringify(k){var B;return k instanceof Error?null!==(B=k.stack)&&void 0!==B?B:k.message:JSON.stringify(k)}static getMessage(k){return k instanceof Error?k.message:"string"==typeof k?k:"An unknown error occurred"}}},78178:(k,B,U)=>{"use strict";U.d(B,{U:()=>j});var F=U(18830),G=U(52751);class j{static getInjectedValue(k,B){var U,j;return null!==(j=null===(U=null==k?void 0:k.findComponentInParent(F.b))||void 0===U?void 0:U.getInjectedValue(B))&&void 0!==j?j:G.w.getActiveScene().container.get(B)}static getParentContainer(k){var B,U;return null!==(U=null===(B=null==k?void 0:k.findComponentInParent(F.b))||void 0===B?void 0:B.Container)&&void 0!==U?U:G.w.getActiveScene().container}}},22494:(k,B,U)=>{"use strict";U.d(B,{Q:()=>G,x:()=>$});var F=U(40794);class G{static addProperty(k,B,U){const F=Reflect.getMetadata(k,B);Reflect.defineMetadata(k,F?[...F,U]:[U],B)}}let j=0;function $(k){return(B,U)=>{const G=Object.getOwnPropertyDescriptor(B,U);if(G&&(G.get||G.set||"function"==typeof G.value))throw new Error("Decorator can only be applied to member variables");if("function"!=typeof B[k])throw new Error("Update function must be a function");const $=`_updateFunction_${"string"==typeof U?U:j++}`;Object.defineProperty(B,U,{get(){return this[$]},set(B){this[$]=B,this instanceof F.u&&!this.isCreated||this[k]()}})}}},71082:(k,B,U)=>{"use strict";U.d(B,{C:()=>$});var F=U(68910),G=U(39002),j=U(61806);class ${static areMatricesEqual(k,B,U){return G.c.isNearlyEqual(k.tx,B.tx,U)&&G.c.isNearlyEqual(k.ty,B.ty,U)&&G.c.isNearlyEqual(k.a,B.a,U)&&G.c.isNearlyEqual(k.b,B.b,U)&&G.c.isNearlyEqual(k.c,B.c,U)&&G.c.isNearlyEqual(k.d,B.d,U)}static matrix3x3ToPixi(k,B){B.set(k.a,k.b,k.c,k.d,k.tx,k.ty)}static addPointData(k,B,U=k){U.x=k.x+B.x,U.y=k.y+B.y}static subtractPointData(k,B,U=k){U.x=k.x-B.x,U.y=k.y-B.y}static multiplyPointData(k,B,U=k){U.x=k.x*B.x,U.y=k.y*B.y}static dividePointData(k,B,U=k){U.x=k.x/B.x,U.y=k.y/B.y}static getDistanceSq(k,B){return Math.pow(k.x-B.x,2)+Math.pow(k.y-B.y,2)}static getDistance(k,B){return Math.sqrt(this.getDistanceSq(k,B))}static render(k,B,U=null,G=!1,$=!1){var H;const V={renderTexture:k,clear:G,transform:U,skipUpdateTransform:$};(null!==(H=j.W.instance.game.renderer)&&void 0!==H?H:F.autoDetectRenderer()).render(B,V)}static renderXY(k,B,U,G,j=!1){this.render(k,B,new F.Matrix(1,0,0,1,U,G),j,!1)}static renderRawXY(k,B,U,G,j){this.render(k,B,new F.Matrix(1,0,0,1,U,G),j,!0)}static clear(k){var B;const U=null!==(B=j.W.instance.game.renderer)&&void 0!==B?B:F.autoDetectRenderer();if(null==U?void 0:U.renderTexture){const B=U.renderTexture.current;if(U.renderTexture.bind(k),U.renderTexture.clear(),B!==k&&(null===B||(null==B?void 0:B.baseTexture))){const k=U.renderTexture.sourceFrame,F=U.renderTexture.destinationFrame;U.renderTexture.bind(B,k,F)}}}static removeAllChildren(k,B=!1){const U=k.removeChildren();if(B)for(const F of U)F.destroy()}static markTextureGarbageCollectionFrame(){var k;const B=(null!==(k=j.W.instance.game.renderer)&&void 0!==k?k:F.autoDetectRenderer()).textureGC;this._textureGcFrame=B.count}static garbageCollectTextures(){var k;const B=(null!==(k=j.W.instance.game.renderer)&&void 0!==k?k:F.autoDetectRenderer()).textureGC,U=B.maxIdle;B.maxIdle=B.count-this._textureGcFrame,B.run(),B.maxIdle=U}static destroyAllTextures(){this.markTextureGarbageCollectionFrame(),this.garbageCollectTextures()}static canContainerRender(k){var B;if(!(k&&!k.destroyed&&k.visible&&k.renderable&&k.worldAlpha>0))return!1;if(null===(B=k.filters)||void 0===B?void 0:B.length)for(const U of k.filters)if(U.uniforms&&(0===U.uniforms.alpha||0===U.uniforms.uAlpha))return!1;return!0}}$._textureGcFrame=0},93337:(k,B,U)=>{"use strict";U.d(B,{H:()=>F});const F=k=>!k.isPrimary&&(k.stopPropagation(),!0)},21695:(k,B,U)=>{"use strict";U.d(B,{N:()=>F});class F{static insertion(k,B){const U=k.length;for(let F=0;F0&&B(U,k[G-1]);)k[G]=k[G-1],--G;k[G]=U}}}},22300:(k,B,U)=>{"use strict";var F;U.d(B,{E:()=>G}),function(k){k[k.TopLeft=0]="TopLeft",k[k.TopRight=1]="TopRight",k[k.BottomLeft=2]="BottomLeft",k[k.BottomRight=3]="BottomRight"}(F||(F={}));class G{constructor(k,B,U){this._treeObjects=[],this._overlappingTreeObjects=[],this._level=1,this._nodes=[],this._bounds=k,this._maxDepth=B,this._maxObjects=U}updateBounds(k){this._bounds=k;const B=this.getAllContents();this.clear(),B.forEach((({bounds:k,value:B})=>{this.insert(k,B)}))}clear(){this._treeObjects.length=0,this._overlappingTreeObjects.length=0;const k=this._nodes.length;for(let B=0;B0){const U=this.findNodeIndex(k),F=this._nodes[U];return void(k.left>=F._bounds.left&&k.right<=F._bounds.right&&k.top>=F._bounds.top&&k.bottom<=F._bounds.bottom?this._nodes[U].insert(k,B):this._overlappingTreeObjects.push({bounds:k,value:B}))}this._treeObjects.push({bounds:k,value:B});const U=this._treeObjects.length;if(this._levelthis._maxObjects){this.split();for(let k=0;k0){const B=this._nodes.length;for(let U=0;U0){const U=this.findNodeIndex(k),G=this._nodes[U];k.left>=G._bounds.left&&k.right<=G._bounds.right&&k.top>=G._bounds.top&&k.bottom<=G._bounds.bottom?B.push.apply(B,G.retrieve(k)):(k.left<=this._nodes[F.TopRight]._bounds.left&&(k.top<=this._nodes[F.BottomLeft]._bounds.top&&B.push.apply(B,this._nodes[F.TopLeft].getAllContents()),k.bottom>this._nodes[F.BottomLeft]._bounds.top&&B.push.apply(B,this._nodes[F.BottomLeft].getAllContents())),k.right>this._nodes[F.TopRight]._bounds.left&&(k.top<=this._nodes[F.BottomRight]._bounds.top&&B.push.apply(B,this._nodes[F.TopRight].getAllContents()),k.bottom>this._nodes[F.BottomRight]._bounds.top&&B.push.apply(B,this._nodes[F.BottomRight].getAllContents())))}return B.push.apply(B,this._overlappingTreeObjects),B.push.apply(B,this._treeObjects),B}remove(k,B){const U=({value:k})=>B===k;let F=this._overlappingTreeObjects.findIndex(U);if(F>-1)this._overlappingTreeObjects.splice(F,1);else if(F=this._treeObjects.findIndex(U),F>-1)this._treeObjects.splice(F,1);else if(this._nodes.length>0){const U=this.findNodeIndex(k);this._nodes[U].remove(k,B)}}split(){const k=.5*(this._bounds.right-this._bounds.left),B=.5*(this._bounds.bottom-this._bounds.top),U=this._bounds.left,j=this._bounds.top;this._nodes[F.TopLeft]=new G({left:U,top:j,right:U+k,bottom:j+B},this._maxDepth,this._maxObjects),this._nodes[F.TopLeft]._level=this._level+1,this._nodes[F.TopRight]=new G({left:U+k,top:j,right:this._bounds.right,bottom:j+B},this._maxDepth,this._maxObjects),this._nodes[F.TopRight]._level=this._level+1,this._nodes[F.BottomLeft]=new G({left:U,top:j+B,right:U+k,bottom:this._bounds.bottom},this._maxDepth,this._maxObjects),this._nodes[F.BottomLeft]._level=this._level+1,this._nodes[F.BottomRight]=new G({left:U+k,top:j+B,right:this._bounds.right,bottom:this._bounds.bottom},this._maxDepth,this._maxObjects),this._nodes[F.BottomRight]._level=this._level+1}findNodeIndex(k){const B=this._bounds.left+.5*(this._bounds.right-this._bounds.left),U=this._bounds.top+.5*(this._bounds.bottom-this._bounds.top),G=k.top{"use strict";U.d(B,{E:()=>q});var F=U(95891),G=U(68910),j=U(16649),$=U(61806),H=U(80267),V=U(5191),W=U(62481);class q{static getAnimationEventTime(k,B,U){var j,$;const W=null!==($=null===(j=k.skeleton)||void 0===j?void 0:j.data.findAnimation(B))&&void 0!==$?$:null;let q=-1;if(W){if((null==W?void 0:W.timelines.length)>0){const k=W.timelines,j=k[k.length-1];if(j instanceof G.spine.EventTimeline){const k=F.find(j.events,(k=>k.data.name===U));k?q=1e3*k.time:H.V.log(`Missing event "${U}" on animation "${B}"`,V.$.Warning)}else H.V.log(`Missing event timeline for animation "${B}"`,V.$.Warning)}}else H.V.log(`Missing spine animation "${B}"`,V.$.Warning);return q}static getAudioList(k){let B=null;try{B=new j.y(k)}catch(G){return W.R.logError(G,`Could not load spine ${k}`),null}if(!B)return null;const U=[];for(let F=0;F0&&U.push(k)}return B.destroy(),U.map(F.trim)}static isLoaded(k){return $.W.instance.game.cache.checkSpineKey(k)}static getSpineEventByName(k,B){const U=$.W.instance.game.cache.getJSON(k);if(!U)return H.V.log(`Spine ${k} either unloaded or incorrect`,V.$.Warning),[];if(0===U.events.length)return[];const F=[];for(let j=0;jk===B.name));-1!==$&&(F.push(new G.spine.Event(-1,U.events[$])),U.animations.forEach((B=>{B.timelines.forEach((B=>{B instanceof G.spine.EventTimeline&&F.push(...B.events.filter((B=>B.data.name===k)))}))})))}return F}}},32154:(k,B,U)=>{"use strict";U.d(B,{A:()=>H});var F=U(68910),G=U(48368),j=U(5191),$=U(80267);class H{static isDefined(k){return null!=k}static generateGUID(){let k=Date.now();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(k+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(B=>{const U=(k+16*Math.random())%16|0;return k=Math.floor(k/16),("x"===B?U:3&U|8).toString(16)}))}static isGuid(k){if(!k)return!1;return/^[A-F\d]{8}-[A-F\d]{4}-4[A-F\d]{3}-[89AB][A-F\d]{3}-[A-F\d]{12}$/i.test(k)}static bufferToUtf8String(k){let B=0;const U=[];for(;B127)if(F>191&&F<224){if(B>=k.length)return $.V.log("JsonResponseInterceptor - Incomplete 2 byte sequence",j.$.Error),null;F=(31&F)<<6|63&k[B++]}else if(F>223&&F<240){if(B+1>=k.length)return $.V.log("JsonResponseInterceptor - Incomplete 3 byte sequence",j.$.Error),null;F=(15&F)<<12|(63&k[B++])<<6|63&k[B++]}else{if(!(F>239&&F<248))return $.V.log(`JsonResponseInterceptor - Invalid multi-byte start 0x${F.toString(16)}`,j.$.Error),null;if(B+2>=k.length&&B+1>=k.length)return $.V.log("JsonResponseInterceptor - Incomplete 4 byte sequence",j.$.Error),null;F=(7&F)<<18|(63&k[B++])<<12|(63&k[B++])<<6|63&k[B++]}if(F<=65535)U.push(String.fromCharCode(F));else{if(!(F<=1114111))return $.V.log(`JSON conversion code 0x${F.toString(16)} could not be decoded`,j.$.Error),null;F-=65536,U.push(String.fromCharCode(F>>10|55296)),U.push(String.fromCharCode(1023&F|56320))}}return U.join("")}static utf8StringToBuffer(k){let B=0;const U=new Uint8Array(4*k.length);for(let F=0;F!==k.length;++F){let G=k.charCodeAt(F);if(G<128)U[B++]=G;else{if(G<2048)U[B++]=G>>6|192;else{if(G>55295&&G<56320){if(++F>=k.length)return $.V.log("UTF-8 encode: incomplete surrogate pair",j.$.Error),null;const H=k.charCodeAt(F);if(H<56320||H>57343)return $.V.log(`UTF-8 encode: second surrogate character 0x${H.toString(16)} at index ${F} out of range`,j.$.Error),null;G=((1023&G)<<10)+(1023&H)+65536,U[B++]=G>>18|240,U[B++]=G>>12&63|128}else U[B++]=G>>12|224;U[B++]=G>>6&63|128}U[B++]=63&G|128}}return new Uint8Array(U.buffer.slice(0,B))}static toggleDisplayObjSmooth(k,B){if(k&&((k instanceof F.Sprite||k instanceof F.TilingSprite)&&G.q.setSmoothed(k.texture,B),k instanceof F.Container))for(let U=0;U=G.length)switch(F){case 1:G=new Array(B+1-G.length).join(U)+G;break;case 3:const F=Math.ceil((j=B-G.length)/2);G=new Array(j-F+1).join(U)+G+new Array(F+1).join(U);break;default:G=k+new Array(B+1-G.length).join(U)}return G}static getUrlVariable(k){const B={};return window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,((k,U,F)=>B[U]=F)),B[k]}static setOuterWidth(k,B){k.style.width=B-(k.style.paddingLeft?parseInt(k.style.paddingLeft):0)-(k.style.paddingRight?parseInt(k.style.paddingRight):0)-(k.style.borderLeftWidth?parseInt(k.style.borderLeftWidth):0)-(k.style.borderRightWidth?parseInt(k.style.borderRightWidth):0)+"px"}static setOuterHeight(k,B){k.style.height=B-(k.style.paddingTop?parseInt(k.style.paddingTop):0)-(k.style.paddingBottom?parseInt(k.style.paddingBottom):0)-(k.style.borderTopWidth?parseInt(k.style.borderTopWidth):0)-(k.style.borderBottomWidth?parseInt(k.style.borderBottomWidth):0)+"px"}static getCenteredXY(k,B,U,G,j,$){return new F.Point(U+.5*(j-k),G+.5*($-B))}static wrapArrayIndex(k,B){if(B<=0)return null;let U=k;for(;U<0;)U+=B;for(;U>=B;)U-=B;return U}static equalArrayContents(k,B){if(k===B)return!0;if(null===k||null===B)return!1;if(k.length!==B.length)return!1;const U=[...k];for(const F of B)if(!this.removeFromArray(F,U))return!1;return!(U.length>0)}static removeFromArray(k,B,U=((k,B)=>k===B)){for(let F=0;Fthis.removeFromArray(k,F,U))),F}static swapArrayIndex(k,B,U){const F=k[B];k[B]=k[U],k[U]=F}static getSequentialArrayValuesCount(k,B,U,F){const G=void 0!==F?U+F:k.length;let j=U;for(;j{"use strict";U.d(B,{b:()=>G});var F=U(8674);class G{get[Symbol.toStringTag](){return"ResolvablePromise"}constructor(){this.promise=new Promise(((k,B)=>{this.resolve=k,this.reject=B}))}then(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return this.promise.then(k,B)}))}catch(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.promise.catch(k)}))}finally(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.promise.finally(k)}))}}},1788:(k,B,U)=>{"use strict";U.d(B,{A:()=>nt});var F=U(8674);const G=Symbol("Comlink.proxy"),j=Symbol("Comlink.endpoint"),$=Symbol("Comlink.releaseProxy"),H=new WeakSet,V=new Map([["proxy",{canHandle:k=>k&&k[G],serialize(k){const{port1:B,port2:U}=new MessageChannel;return W(k,B),[U,[U]]},deserialize:k=>(k.start(),K(k))}],["throw",{canHandle:k=>H.has(k),serialize(k){const B=k instanceof Error;let U=k;return B&&(U={isError:B,message:k.message,stack:k.stack}),[U,[]]},deserialize(k){if(k.isError)throw Object.assign(new Error,k);throw k}}]]);function W(k,B=self){B.addEventListener("message",(function U(F){if(!F||!F.data)return;const{id:j,type:$,path:V}=Object.assign({path:[]},F.data),K=(F.data.argumentList||[]).map(J);let z;try{const B=V.slice(0,-1).reduce(((k,B)=>k[B]),k),U=V.reduce(((k,B)=>k[B]),k);switch($){case 0:z=U;break;case 1:B[V.slice(-1)[0]]=J(F.data.value),z=!0;break;case 2:z=U.apply(B,K);break;case 3:z=function(k){return Object.assign(k,{[G]:!0})}(new U(...K));break;case 4:{const{port1:B,port2:U}=new MessageChannel;W(k,U),z=function(k,B){return X.set(k,B),k}(B,[B])}break;case 5:z=void 0}}catch(e){z=e,H.add(e)}Promise.resolve(z).catch((k=>(H.add(k),k))).then((k=>{const[F,G]=Z(k);B.postMessage(Object.assign(Object.assign({},F),{id:j}),G),5===$&&(B.removeEventListener("message",U),q(B))}))})),B.start&&B.start()}function q(k){(function(k){return"MessagePort"===k.constructor.name})(k)&&k.close()}function K(k){return Y(k)}function z(k){if(k)throw new Error("Proxy has been released and is not useable")}function Y(k,B=[]){let U=!1;const F=new Proxy((function(){}),{get(G,j){if(z(U),j===$)return()=>tt(k,{type:5,path:B.map((k=>k.toString()))}).then((()=>{q(k),U=!0}));if("then"===j){if(0===B.length)return{then:()=>F};const U=tt(k,{type:0,path:B.map((k=>k.toString()))}).then(J);return U.then.bind(U)}return Y(k,[...B,j])},set(F,G,j){z(U);const[$,H]=Z(j);return tt(k,{type:1,path:[...B,G].map((k=>k.toString())),value:$},H).then(J)},apply(F,G,$){z(U);const H=B[B.length-1];if(H===j)return tt(k,{type:4}).then(J);if("bind"===H)return Y(k,B.slice(0,-1));const[V,W]=Q($);return tt(k,{type:2,path:B.map((k=>k.toString())),argumentList:V},W).then(J)},construct(F,G){z(U);const[j,$]=Q(G);return tt(k,{type:3,path:B.map((k=>k.toString())),argumentList:j},$).then(J)}});return F}function Q(k){const B=k.map(Z);return[B.map((k=>k[0])),(U=B.map((k=>k[1])),Array.prototype.concat.apply([],U))];var U}const X=new WeakMap;function Z(k){for(const[B,U]of V)if(U.canHandle(k)){const[F,G]=U.serialize(k);return[{type:3,name:B,value:F},G]}return[{type:0,value:k},X.get(k)||[]]}function J(k){switch(k.type){case 3:return V.get(k.name).deserialize(k.value);case 0:return k.value}}function tt(k,B,U){return new Promise((F=>{const G=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");k.addEventListener("message",(function B(U){U.data&&U.data.id&&U.data.id===G&&(k.removeEventListener("message",B),F(U.data))})),k.start&&k.start(),k.postMessage(Object.assign({id:G},B),U)}))}var et=U(80267),it=U(5191),st=U(32154);class nt{constructor(k){this.workerSpawner=null,this.workerInstance=null,this.workerInterface=null,this.workerSpawner=k}start(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.workerInstance){if(!this.workerInterface)return this.workerInterfacePromise}else this.workerInstance=this.workerSpawner(),this.workerInterfacePromise=new(K(this.workerInstance)),this.workerInterface=yield this.workerInterfacePromise;return Promise.resolve(this.workerInterface)}))}isReady(){return st.A.isDefined(this.workerInstance)&&st.A.isDefined(this.workerInterface)}getInterface(){return this.workerInterface}stop(){this.workerInterface?(this.workerInstance.terminate(),this.workerInstance=null,this.workerInterface=null):this.workerInterfacePromise?this.workerInterfacePromise.then((()=>{this.stop()})).catch():et.V.log("Worker has not been started",it.$.Error)}}},80632:(k,B,U)=>{"use strict";U.d(B,{m:()=>$});var F=U(8674),G=U(80267),j=U(5191);class ${constructor(k){this.workerInstance=null,this.workerCtor=null,this.workerCtor=k}start(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this.workerInstance){const k=this.workerCtor(),B=Object.keys(k),U=B.length;for(let G=0;G(0,F.sH)(this,void 0,void 0,(function*(){return Promise.resolve(B.call(k,U))}))}}this.workerInstance=k}return Promise.resolve(this.workerInstance)}))}isReady(){return null!==this.workerInstance}stop(){this.workerInstance?this.workerInstance=null:G.V.log("Worker has not been started",j.$.Error)}getInterface(){return this.workerInstance}}},15073:(k,B,U)=>{"use strict";U.d(B,{p:()=>V});var F=U(80267),G=U(5191),j=U(22070),$=U(1788),H=U(80632);class V{static createWorker(k,B){return 11===j.o.getIOSVersion()?new H.m((()=>new k)):new $.A((()=>{let k=null;try{k=new Worker(B)}catch(e){k=V.createBlobWorker([`importScripts('${B}');`])}return k}))}static createBlobWorker(k){var B,U,j;let $=null,H=null;try{const F="application/javascript";try{H=new Blob(k,{type:F})}catch(e){const j=new(null!==(U=null!==(B=window.BlobBuilder)&&void 0!==B?B:window.WebKitBlobBuilder)&&void 0!==U?U:window.MozBlobBuilder);j.append(k),H=j.getBlob(F)}const G=(null!==(j=window.URL)&&void 0!==j?j:window.webkitURL).createObjectURL(H);$=new Worker(G)}catch(V){F.V.log("Could not spawn a blob worker",G.$.Error)}return $}}},12915:(k,B,U)=>{var F,G=U(27652),j=U(77781),$=U(52769),H=U(48297),V=U(81370),W=U(80240),q=U(88904),K=U(38808),z=U(66570),Y=!1,Q=j();function X(k,B,U){var G=F.segments(k),j=F.segments(B),$=U(F.combine(G,j));return F.polygon($)}F={buildLog:function(k){return!0===k?Y=G():!1===k&&(Y=!1),!1!==Y&&Y.list},epsilon:function(k){return Q.epsilon(k)},segments:function(k){var B=$(!0,Q,Y);return k.regions.forEach(B.addRegion),{segments:B.calculate(k.inverted),inverted:k.inverted}},combine:function(k,B){return{combined:$(!1,Q,Y).calculate(k.segments,k.inverted,B.segments,B.inverted),inverted1:k.inverted,inverted2:B.inverted}},selectUnion:function(k){return{segments:V.union(k.combined,Y),inverted:k.inverted1||k.inverted2}},selectIntersect:function(k){return{segments:V.intersect(k.combined,Y),inverted:k.inverted1&&k.inverted2}},selectDifference:function(k){return{segments:V.difference(k.combined,Y),inverted:k.inverted1&&!k.inverted2}},selectDifferenceRev:function(k){return{segments:V.differenceRev(k.combined,Y),inverted:!k.inverted1&&k.inverted2}},selectXor:function(k){return{segments:V.xor(k.combined,Y),inverted:k.inverted1!==k.inverted2}},polygon:function(k){return{regions:H(k.segments,Q,Y),inverted:k.inverted}},polygonFromGeoJSON:function(k){return W.toPolygon(F,k)},polygonToGeoJSON:function(k){return W.fromPolygon(F,Q,k)},union:function(k,B){return X(k,B,F.selectUnion)},intersect:function(k,B){return X(k,B,F.selectIntersect)},difference:function(k,B){return X(k,B,F.selectDifference)},differenceRev:function(k,B){return X(k,B,F.selectDifferenceRev)},xor:function(k,B){return X(k,B,F.selectXor)},isConvex:function(k){return k.regions.every((function(k){return q.isConvex(k)}))},makeConvex:function(k){var B=[];return k.regions.forEach((function(k){var U=[];k.forEach((function(k){U.push(k[0]),U.push(k[1])}));for(var F=z(U),G=0;G{k.exports=function(){var k,B=0,U=!1;function F(B,U){return k.list.push({type:B,data:U?JSON.parse(JSON.stringify(U)):void 0}),k}return k={list:[],segmentId:function(){return B++},checkIntersection:function(k,B){return F("check",{seg1:k,seg2:B})},segmentChop:function(k,B){return F("div_seg",{seg:k,pt:B}),F("chop",{seg:k,pt:B})},statusRemove:function(k){return F("pop_seg",{seg:k})},segmentUpdate:function(k){return F("seg_update",{seg:k})},segmentNew:function(k,B){return F("new_seg",{seg:k,primary:B})},segmentRemove:function(k){return F("rem_seg",{seg:k})},tempStatus:function(k,B,U){return F("temp_status",{seg:k,above:B,below:U})},rewind:function(k){return F("rewind",{seg:k})},status:function(k,B,U){return F("status",{seg:k,above:B,below:U})},vert:function(B){return B===U?k:(U=B,F("vert",{x:B}))},log:function(k){return"string"!=typeof k&&(k=JSON.stringify(k,!1," ")),F("log",{txt:k})},reset:function(){return F("reset")},selected:function(k){return F("selected",{segs:k})},chainStart:function(k){return F("chain_start",{seg:k})},chainRemoveHead:function(k,B){return F("chain_rem_head",{index:k,pt:B})},chainRemoveTail:function(k,B){return F("chain_rem_tail",{index:k,pt:B})},chainNew:function(k,B){return F("chain_new",{pt1:k,pt2:B})},chainMatch:function(k){return F("chain_match",{index:k})},chainClose:function(k){return F("chain_close",{index:k})},chainAddHead:function(k,B){return F("chain_add_head",{index:k,pt:B})},chainAddTail:function(k,B){return F("chain_add_tail",{index:k,pt:B})},chainConnect:function(k,B){return F("chain_con",{index1:k,index2:B})},chainReverse:function(k){return F("chain_rev",{index:k})},chainJoin:function(k,B){return F("chain_join",{index1:k,index2:B})},done:function(){return F("done")}}}},88904:(k,B,U)=>{var F=U(58811),G=2*Math.PI,j=.5*Math.PI,$=function(k,B,U){for(var G=[],j=B;j!==U+1;++j)j=F.normalizeIndex(k,j),G.push(k[j]);return G},H=function(k,B,U){return[$(k,B,U),$(k,U,B)]},V=function(k){for(;k<=-Math.PI;)k+=G;for(;k>Math.PI;)k-=G;return k},W={isConvex:function(k){if(k.length<3)return!1;for(var B,U=k[k.length-2],F=k[k.length-1],j=U[0],$=U[1],H=F[0],W=F[1],q=Math.atan2(W-$,H-j),K=0,z=0;z0?1:-1}else if(B*X<0)return!1;K+=X}}return 1===Math.abs(Math.round(K/G))},makeConvex:function(k){if(k.length<3)return[];if(3===k.length)return[k];var B=function(k){if(k.length<3)return 0;for(var B=k[k.length-2],U=k[k.length-1],F=B[0],j=B[1],$=U[0],H=U[1],V=Math.atan2(H-j,$-F),W=0,q=0;qMath.PI;)Y-=G;W+=Y}}return Math.round(W/G)}(k);if(1!==Math.abs(B))throw"Convex.makeConvex does not support complex polygons. Poly given was: "+JSON.stringify(k);for(var U,$,W=k[k.length-2],q=k[k.length-1],K=W[0],z=W[1],Y=q[0],Q=q[1],X=Math.atan2(Q-z,Y-K),Z=!1,J=0,tt=0;tt-J=0&&(void 0===$||Math.abs(V(it-$)){k.exports=function(k){"number"!=typeof k&&(k=1e-10);var B={epsilon:function(B){return"number"==typeof B&&(k=B),k},pointAboveOrOnLine:function(B,U,F){var G=U[0],j=U[1],$=F[0],H=F[1],V=B[0];return($-G)*(B[1]-j)-(H-j)*(V-G)>=-k},pointBetween:function(B,U,F){var G=B[1]-U[1],j=F[0]-U[0],$=B[0]-U[0],H=F[1]-U[1],V=$*j+G*H;return!(V-k)},pointsSameX:function(B,U){return Math.abs(B[0]-U[0])k!=$-G>k&&(j-W)*(G-q)/($-q)+W-F>k&&(H=!H),j=W,$=q}return H}};return B}},80240:k=>{var B={toPolygon:function(k,B){function U(B){if(B.length<=0)return k.segments({inverted:!1,regions:[]});function U(B){var U=B.slice(0,B.length-1);return k.segments({inverted:!1,regions:[U]})}for(var F=U(B[0]),G=1;G{var F=U(64691);k.exports=function(k,B,U){function G(k,B,F){return{id:U?U.segmentId():-1,start:k,end:B,myFill:{above:F.myFill.above,below:F.myFill.below},otherFill:null}}var j=F.create();function $(k,U){j.insertBefore(k,(function(F){return function(k,U,F,G,j,$){var H=B.pointsCompare(U,j);return 0!==H?H:B.pointsSame(F,$)?0:k!==G?k?1:-1:B.pointAboveOrOnLine(F,G?j:$,G?$:j)?1:-1}(k.isStart,k.pt,U,F.isStart,F.pt,F.other.pt)<0}))}function H(k,B){var U=function(k,B){var U=F.node({isStart:!0,pt:k.start,seg:k,primary:B,other:null,status:null});return $(U,k.end),U}(k,B);return function(k,B,U){var G=F.node({isStart:!1,pt:B.end,seg:B,primary:U,other:k,status:null});k.other=G,$(G,k.pt)}(U,k,B),U}function V(k,B){var F=G(B,k.seg.end,k.seg);return function(k,B){U&&U.segmentChop(k.seg,B),k.other.remove(),k.seg.end=B,k.other.pt=B,$(k.other,k.pt)}(k,B),H(F,k.primary)}function W(G,$){var H=F.create();function W(k){return H.findTransition((function(U){var F,G,j,$,H,V;return(F=k,G=U.ev,j=F.seg.start,$=F.seg.end,H=G.seg.start,V=G.seg.end,B.pointsCollinear(j,H,V)?B.pointsCollinear($,H,V)||B.pointAboveOrOnLine($,H,V)?1:-1:B.pointAboveOrOnLine(j,H,V)?1:-1)>0}))}function q(k,F){var G=k.seg,j=F.seg,$=G.start,H=G.end,W=j.start,q=j.end;U&&U.checkIntersection(G,j);var K=B.linesIntersect($,H,W,q);if(!1===K){if(!B.pointsCollinear($,H,W))return!1;if(B.pointsSame($,q)||B.pointsSame(H,W))return!1;var z=B.pointsSame($,W),Y=B.pointsSame(H,q);if(z&&Y)return F;var Q=!z&&B.pointBetween($,W,q),X=!Y&&B.pointBetween(H,W,q);if(z)return X?V(F,H):V(k,q),F;Q&&(Y||(X?V(F,H):V(k,q)),V(F,$))}else 0===K.alongA&&(-1===K.alongB?V(k,W):0===K.alongB?V(k,K.pt):1===K.alongB&&V(k,q)),0===K.alongB&&(-1===K.alongA?V(F,$):0===K.alongA?V(F,K.pt):1===K.alongA&&V(F,H));return!1}for(var K=[];!j.isEmpty();){var z=j.getHead();if(U&&U.vert(z.pt[0]),z.isStart){U&&U.segmentNew(z.seg,z.primary);var Y=W(z),Q=Y.before?Y.before.ev:null,X=Y.after?Y.after.ev:null;function Z(){if(Q){var k=q(z,Q);if(k)return k}return!!X&&q(z,X)}U&&U.tempStatus(z.seg,!!Q&&Q.seg,!!X&&X.seg);var J,tt=Z();if(tt){var et;if(k)(et=null===z.seg.myFill.below||z.seg.myFill.above!==z.seg.myFill.below)&&(tt.seg.myFill.above=!tt.seg.myFill.above);else tt.seg.otherFill=z.seg.myFill;U&&U.segmentUpdate(tt.seg),z.other.remove(),z.remove()}if(j.getHead()!==z){U&&U.rewind(z.seg);continue}if(k)et=null===z.seg.myFill.below||z.seg.myFill.above!==z.seg.myFill.below,z.seg.myFill.below=X?X.seg.myFill.above:G,z.seg.myFill.above=et?!z.seg.myFill.below:z.seg.myFill.below;else if(null===z.seg.otherFill)J=X?z.primary===X.primary?X.seg.otherFill.above:X.seg.myFill.above:z.primary?$:G,z.seg.otherFill={above:J,below:J};U&&U.status(z.seg,!!Q&&Q.seg,!!X&&X.seg),z.other.status=Y.insert(F.node({ev:z}))}else{var it=z.status;if(null===it)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(H.exists(it.prev)&&H.exists(it.next)&&q(it.prev.ev,it.next.ev),U&&U.statusRemove(it.ev.seg),it.remove(),!z.primary){var st=z.seg.myFill;z.seg.myFill=z.seg.otherFill,z.seg.otherFill=st}K.push(z.seg)}j.getHead().remove()}return U&&U.done(),K}return k?{addRegion:function(k){for(var F,G,j,$=k[k.length-1],V=0;V{k.exports={create:function(){var k={root:{root:!0,next:null},exists:function(B){return null!==B&&B!==k.root},isEmpty:function(){return null===k.root.next},getHead:function(){return k.root.next},insertBefore:function(B,U){for(var F=k.root,G=k.root.next;null!==G;){if(U(G))return B.prev=G.prev,B.next=G,G.prev.next=B,void(G.prev=B);F=G,G=G.next}F.next=B,B.prev=F,B.next=null},findTransition:function(B){for(var U=k.root,F=k.root.next;null!==F&&!B(F);)U=F,F=F.next;return{before:U===k.root?null:U,after:F,insert:function(k){return k.prev=U,k.next=F,U.next=k,null!==F&&(F.prev=k),k}}}};return k},node:function(k){return k.prev=null,k.next=null,k.remove=function(){k.prev.next=k.next,k.next&&(k.next.prev=k.prev),k.prev=null,k.next=null},k}}},48297:k=>{k.exports=function(k,B,U){var F=[],G=[];return k.forEach((function(k){var j=k.start,$=k.end;if(B.pointsSame(j,$))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{U&&U.chainStart(k);for(var H={index:0,matches_head:!1,matches_pt1:!1},V={index:0,matches_head:!1,matches_pt1:!1},W=H,q=0;q{function B(k,B,U){var F=[];return k.forEach((function(k){var G=(k.myFill.above?8:0)+(k.myFill.below?4:0)+(k.otherFill&&k.otherFill.above?2:0)+(k.otherFill&&k.otherFill.below?1:0);0!==B[G]&&F.push({id:U?U.segmentId():-1,start:k.start,end:k.end,myFill:{above:1===B[G],below:2===B[G]},otherFill:null})})),U&&U.selected(F),F}var U={union:function(k,U){return B(k,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],U)},intersect:function(k,U){return B(k,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],U)},difference:function(k,U){return B(k,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],U)},differenceRev:function(k,U){return B(k,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],U)},xor:function(k,U){return B(k,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],U)}};k.exports=U},38808:(k,B,U)=>{var F=U(58811),G=function(k,B,U){var F=B[0]-k[0],G=B[1]-k[1],j=U[0]-k[0];return F*(U[1]-k[1])-G*j},j={regionContains:function(k,B){for(var U=0;U0!=j>0)return!1}return!0},carve:function(k,B){for(var U,j,$,H,V,W=k[k.length-1],q=1/0,K=0;K0===G(B[0],B[1],B[2])>0;for(K=0;K{k.exports={normalizeIndex:function(k,B){for(;B<0;)B+=k.length;for(;B>=k.length;)B-=k.length;return B}}},3332:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(43342);(0,F.__exportStar)(U(97860),B),(0,F.__exportStar)(U(14435),B)},97860:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.Multiplayer=void 0;var F=U(43342),G=U(14435),j=(0,F.__importDefault)(U(39454)),$=(0,F.__importStar)(U(78686)),H=function(){function k(k,B){this._maxAuthRetries=5,this._authRetries=0,this._wasDisconnected=!1,this._moveOnAreaPerChannel=!1,$.defaults.storage=sessionStorage,this._clientID=k,this._multiplayerURL=B;var U=new URL(this._multiplayerURL),F=U.hostname,G=U.port.length>0?parseInt(U.port,10):void 0,H=U.protocol.startsWith("https");this.cleanupOldToken(),this._client=j.default.create({hostname:F,path:"/prodigy-synapse/socketcluster/",port:G,secure:H,autoConnect:!1,authTokenName:"".concat(this._clientID,"-socketcluster.authToken"),autoReconnectOptions:{randomness:0,initialDelay:500,maxDelay:1e4}})}return k.prototype.connect=function(){this._client.connect(),this.onDeauthenticated()},k.prototype.getChannelName=function(k){return k.startsWith(this._clientID)?k:"".concat(this._clientID,"-").concat(k)},k.prototype.authenticate=function(k){return(0,F.__awaiter)(this,void 0,void 0,(function(){return(0,F.__generator)(this,(function(B){switch(B.label){case 0:return[4,Promise.all([this._client.invoke("login",{token:k}),this._client.listener("authenticate").once()])];case 1:return B.sent(),this._authRetries=0,[2]}}))}))},k.prototype.enableMoveOnAreaPerChannel=function(){this._moveOnAreaPerChannel=!0},k.prototype.subscribe=function(k,B){return(0,F.__awaiter)(this,void 0,void 0,(function(){var U,G,j,$;return(0,F.__generator)(this,(function(F){return U=this.getChannelName(k),G=this._client.subscribe(U).createConsumer(),j=this._client.receiver("messageHistory").createConsumer(),$=this._client.receiver("channelData").createConsumer(),this.processSubscriptionEvents(G,B),this.processSubscriptionEvents($,B),this.processHistoryEvents(j,B),[2]}))}))},k.prototype.processSubscriptionEvents=function(B,U){var G,j,$,H,V,W;return(0,F.__awaiter)(this,void 0,void 0,(function(){var q,K;return(0,F.__generator)(this,(function(z){switch(z.label){case 0:z.trys.push([0,5,6,11]),G=(0,F.__asyncValues)(B),z.label=1;case 1:return[4,G.next()];case 2:if((j=z.sent()).done)return[3,4];(q=j.value).type===k.BroadcastActionType&&null!==(null===(V=q)||void 0===V?void 0:V.messageID)&&this.setLatestBroadcastMessage(null!==(W=q.messageID)&&void 0!==W?W:0),U(q),z.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return K=z.sent(),$={error:K},[3,11];case 6:return z.trys.push([6,,9,10]),j&&!j.done&&(H=G.return)?[4,H.call(G)]:[3,8];case 7:z.sent(),z.label=8;case 8:return[3,10];case 9:if($)throw $.error;return[7];case 10:return[7];case 11:return[2]}}))}))},k.prototype.processHistoryEvents=function(k,B){var U,G,j,$;return(0,F.__awaiter)(this,void 0,void 0,(function(){var H,V,W,q,K,z,Y,Q;return(0,F.__generator)(this,(function(X){switch(X.label){case 0:X.trys.push([0,5,6,11]),U=(0,F.__asyncValues)(k),X.label=1;case 1:return[4,U.next()];case 2:if((G=X.sent()).done)return[3,4];if(void 0===(H=G.value).messageHistory||null===H.messageHistory)return[3,3];try{for(Y=void 0,V=(0,F.__values)(H.messageHistory),W=V.next();!W.done;W=V.next())(q=W.value).id>this.getLatestBroadcastMessage()&&(K={type:"broadcastAction",userID:H.userID,actionInfo:q.messageBody,messageID:q.id},this.setLatestBroadcastMessage(q.id),B(K))}catch(Z){Y={error:Z}}finally{try{W&&!W.done&&(Q=V.return)&&Q.call(V)}finally{if(Y)throw Y.error}}X.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return z=X.sent(),j={error:z},[3,11];case 6:return X.trys.push([6,,9,10]),G&&!G.done&&($=U.return)?[4,$.call(U)]:[3,8];case 7:X.sent(),X.label=8;case 8:return[3,10];case 9:if(j)throw j.error;return[7];case 10:return[7];case 11:return[2]}}))}))},k.prototype.userListReceiver=function(k){var B,U;return(0,F.__awaiter)(this,void 0,void 0,(function(){var G,j,$,H;return(0,F.__generator)(this,(function(V){switch(V.label){case 0:V.trys.push([0,5,6,11]),G=(0,F.__asyncValues)(this._client.receiver("userList")),V.label=1;case 1:return[4,G.next()];case 2:if((j=V.sent()).done)return[3,4];$=j.value,k($),V.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return H=V.sent(),B={error:H},[3,11];case 6:return V.trys.push([6,,9,10]),j&&!j.done&&(U=G.return)?[4,U.call(G)]:[3,8];case 7:V.sent(),V.label=8;case 8:return[3,10];case 9:if(B)throw B.error;return[7];case 10:return[7];case 11:return[2]}}))}))},k.prototype.subscribedReceiver=function(k){var B,U;return(0,F.__awaiter)(this,void 0,void 0,(function(){var G,j,$,H;return(0,F.__generator)(this,(function(V){switch(V.label){case 0:V.trys.push([0,5,6,11]),G=(0,F.__asyncValues)(this._client.receiver("subscribed")),V.label=1;case 1:return[4,G.next()];case 2:if((j=V.sent()).done)return[3,4];$=j.value,k($),V.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return H=V.sent(),B={error:H},[3,11];case 6:return V.trys.push([6,,9,10]),j&&!j.done&&(U=G.return)?[4,U.call(G)]:[3,8];case 7:V.sent(),V.label=8;case 8:return[3,10];case 9:if(B)throw B.error;return[7];case 10:return[7];case 11:return[2]}}))}))},k.prototype.generalError=function(k){var B,U;return(0,F.__awaiter)(this,void 0,void 0,(function(){var G,j,$,H;return(0,F.__generator)(this,(function(V){switch(V.label){case 0:V.trys.push([0,5,6,11]),G=(0,F.__asyncValues)(this._client.listener("error")),V.label=1;case 1:return[4,G.next()];case 2:if((j=V.sent()).done)return[3,4];if("Socket hung up"===($=j.value.error).message)return[3,3];k($),V.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return H=V.sent(),B={error:H},[3,11];case 6:return V.trys.push([6,,9,10]),j&&!j.done&&(U=G.return)?[4,U.call(G)]:[3,8];case 7:V.sent(),V.label=8;case 8:return[3,10];case 9:if(B)throw B.error;return[7];case 10:return[7];case 11:return[2]}}))}))},k.prototype.disconnectError=function(k){var B,U;return(0,F.__awaiter)(this,void 0,void 0,(function(){var G,j,$,H;return(0,F.__generator)(this,(function(V){switch(V.label){case 0:V.trys.push([0,5,6,11]),G=(0,F.__asyncValues)(this._client.listener("disconnect")),V.label=1;case 1:return[4,G.next()];case 2:if((j=V.sent()).done)return[3,4];$=j.value.reason,this._wasDisconnected=!0,k(new Error($)),V.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return H=V.sent(),B={error:H},[3,11];case 6:return V.trys.push([6,,9,10]),j&&!j.done&&(U=G.return)?[4,U.call(G)]:[3,8];case 7:V.sent(),V.label=8;case 8:return[3,10];case 9:if(B)throw B.error;return[7];case 10:return[7];case 11:return[2]}}))}))},k.prototype.subscribeFailError=function(k){var B,U;return(0,F.__awaiter)(this,void 0,void 0,(function(){var j,$,H,V,W,q,K,z,Y;return(0,F.__generator)(this,(function(Q){switch(Q.label){case 0:Q.trys.push([0,5,6,11]),j=(0,F.__asyncValues)(this._client.listener("subscribeFail")),Q.label=1;case 1:return[4,j.next()];case 2:if(($=Q.sent()).done)return[3,4];H=$.value,V=H.error,W=H.channel,G.ChannelValidator.isStatusChannelPatternMatch(W)&&(q=G.ChannelNameService.getUserIDFromStatusChannelName(W),K=V.message,z={userID:q,channel:W,message:"User ".concat(q," failed to subscribe to the status channel ").concat(W,"."),originalErrorMessage:K},V.message=JSON.stringify(z)),k(V,W),Q.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return Y=Q.sent(),B={error:Y},[3,11];case 6:return Q.trys.push([6,,9,10]),$&&!$.done&&(U=j.return)?[4,U.call(j)]:[3,8];case 7:Q.sent(),Q.label=8;case 8:return[3,10];case 9:if(B)throw B.error;return[7];case 10:return[7];case 11:return[2]}}))}))},k.prototype.onDeauthenticated=function(){var k,B;return(0,F.__awaiter)(this,void 0,void 0,(function(){var U,G,j,H;return(0,F.__generator)(this,(function(V){switch(V.label){case 0:V.trys.push([0,6,7,12]),U=(0,F.__asyncValues)(this._client.listener("deauthenticate")),V.label=1;case 1:return[4,U.next()];case 2:return(G=V.sent()).done?[3,5]:(G.value,j=$.get(),this._authRetries<=this._maxAuthRetries?(this._authRetries+=1,[4,this.authenticate(j)]):[3,4]);case 3:V.sent(),V.label=4;case 4:return[3,1];case 5:return[3,12];case 6:return H=V.sent(),k={error:H},[3,12];case 7:return V.trys.push([7,,10,11]),G&&!G.done&&(B=U.return)?[4,B.call(U)]:[3,9];case 8:V.sent(),V.label=9;case 9:return[3,11];case 10:if(k)throw k.error;return[7];case 11:return[7];case 12:return[2]}}))}))},k.prototype.onReconnect=function(k){var B,U;return(0,F.__awaiter)(this,void 0,void 0,(function(){var G,j,$,H;return(0,F.__generator)(this,(function(V){switch(V.label){case 0:V.trys.push([0,5,6,11]),G=(0,F.__asyncValues)(this._client.listener("connect")),V.label=1;case 1:return[4,G.next()];case 2:if((j=V.sent()).done)return[3,4];j.value,$=this._wasDisconnected,this._wasDisconnected=!1,$&&k(),V.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return H=V.sent(),B={error:H},[3,11];case 6:return V.trys.push([6,,9,10]),j&&!j.done&&(U=G.return)?[4,U.call(G)]:[3,8];case 7:V.sent(),V.label=8;case 8:return[3,10];case 9:if(B)throw B.error;return[7];case 10:return[7];case 11:return[2]}}))}))},k.prototype.unsubscribe=function(k){return(0,F.__awaiter)(this,void 0,void 0,(function(){var B;return(0,F.__generator)(this,(function(U){return B=this.getChannelName(k),this._client.closeChannel(B),[2,this._client.unsubscribe(B)]}))}))},k.prototype.moveOnArea=function(k,B){return(0,F.__awaiter)(this,void 0,void 0,(function(){var U;return(0,F.__generator)(this,(function(G){return U=this.getChannelName(k),this._moveOnAreaPerChannel?this._client.transmit("moveOnArea-".concat(k),(0,F.__assign)((0,F.__assign)({},B),{channel:U})):this._client.transmit("moveOnArea",(0,F.__assign)((0,F.__assign)({},B),{channel:U})),[2]}))}))},k.prototype.addNotificationListener=function(k){return(0,F.__awaiter)(this,void 0,void 0,(function(){var B,U;return(0,F.__generator)(this,(function(F){return(B=this.getNotificationChannelName())?(U=this._client.subscribe(B).createConsumer(),[2,this.processSubscriptionEvents(U,k)]):[2]}))}))},k.prototype.addStatusListener=function(k,B){return(0,F.__awaiter)(this,void 0,void 0,(function(){var U,j,$,H,V,W;return(0,F.__generator)(this,(function(q){try{for(U=(0,F.__values)(k),j=U.next();!j.done;j=U.next())$=j.value,H=G.ChannelNameService.getStatusChannelName(this._clientID,$),this.subscribe(H,B)}catch(K){V={error:K}}finally{try{j&&!j.done&&(W=U.return)&&W.call(U)}finally{if(V)throw V.error}}return[2]}))}))},k.prototype.getNotificationChannelName=function(){var k,B;return null===(B=null===(k=this._client)||void 0===k?void 0:k.authToken)||void 0===B?void 0:B.notificationChannelName},k.prototype.getLatestBroadcastMessage=function(){var k;return Number.parseInt(null!==(k=window.localStorage.getItem("latestHistoryMessage"))&&void 0!==k?k:"0")},k.prototype.setLatestBroadcastMessage=function(k){window.localStorage.setItem("latestHistoryMessage",k.toString())},k.prototype.cleanupOldToken=function(){window.localStorage.removeItem("".concat(this._clientID,"-socketcluster.authToken"))},k.prototype.addClientBroadcastListener=function(k){return(0,F.__awaiter)(this,void 0,void 0,(function(){var B,U;return(0,F.__generator)(this,(function(F){return B=G.ChannelNameService.getClientBroadcastChannelName(this._clientID),U=this._client.subscribe(B).createConsumer(),[2,this.processSubscriptionEvents(U,k)]}))}))},k.BroadcastActionType="broadcastAction",k}();B.Multiplayer=H},63384:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},37446:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.EClientID=void 0,function(k){k.MATH="1",k.ELA="ela-game"}(B.EClientID||(B.EClientID={}))},7107:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},4498:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},57094:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},88789:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.ChannelNameService=void 0;var U=function(){function k(){}return k.getStatusChannelName=function(k,B){return"".concat(k,"-").concat(B,"-status")},k.getUserIDFromStatusChannelName=function(k){var B=k.split("-");return B[B.length-2]},k.getClientBroadcastChannelName=function(k){return"".concat(k,"-client-broadcast")},k}();B.ChannelNameService=U},60286:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},48276:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.ChannelValidator=void 0;var F=U(37446),G=function(){function k(){}return k.isStatusChannel=function(k){if(!k)return!1;var B=k.channelName;return!!B&&(!!this.isStatusChannelPatternMatch(B)&&!(!k.isPrivate||!k.owner))},k.isStatusChannelPatternMatch=function(k){if(!k)return!1;var B=this.getGameClientIDsAsString(),U="^(".concat(B,")-(\\d*)-status$");return new RegExp(U).test(k)},k.getGameClientIDsAsString=function(){return Object.values(F.EClientID).join("|")},k}();B.ChannelValidator=G},14435:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(43342);(0,F.__exportStar)(U(63384),B),(0,F.__exportStar)(U(57094),B),(0,F.__exportStar)(U(7107),B),(0,F.__exportStar)(U(4498),B),(0,F.__exportStar)(U(60286),B),(0,F.__exportStar)(U(88789),B),(0,F.__exportStar)(U(48276),B),(0,F.__exportStar)(U(37446),B)},43342:(k,B,U)=>{"use strict";U.r(B),U.d(B,{__assign:()=>j,__asyncDelegator:()=>st,__asyncGenerator:()=>it,__asyncValues:()=>nt,__await:()=>et,__awaiter:()=>q,__classPrivateFieldGet:()=>ct,__classPrivateFieldSet:()=>dt,__createBinding:()=>z,__decorate:()=>H,__exportStar:()=>Y,__extends:()=>G,__generator:()=>K,__importDefault:()=>ht,__importStar:()=>ot,__makeTemplateObject:()=>at,__metadata:()=>W,__param:()=>V,__read:()=>X,__rest:()=>$,__spread:()=>Z,__spreadArray:()=>tt,__spreadArrays:()=>J,__values:()=>Q});var F=function(k,B){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,B){k.__proto__=B}||function(k,B){for(var U in B)Object.prototype.hasOwnProperty.call(B,U)&&(k[U]=B[U])})(k,B)};function G(k,B){if("function"!=typeof B&&null!==B)throw new TypeError("Class extends value "+String(B)+" is not a constructor or null");function U(){this.constructor=k}F(k,B),k.prototype=null===B?Object.create(B):(U.prototype=B.prototype,new U)}var j=function(){return(j=Object.assign||function(k){for(var B,U=1,F=arguments.length;U=0;H--)(G=k[H])&&($=(j<3?G($):j>3?G(B,U,$):G(B,U))||$);return j>3&&$&&Object.defineProperty(B,U,$),$}function V(k,B){return function(U,F){B(U,F,k)}}function W(k,B){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,B)}function q(k,B,U,F){return new(U||(U=Promise))((function(G,j){function $(k){try{V(F.next(k))}catch(e){j(e)}}function H(k){try{V(F.throw(k))}catch(e){j(e)}}function V(k){var B;k.done?G(k.value):(B=k.value,B instanceof U?B:new U((function(k){k(B)}))).then($,H)}V((F=F.apply(k,B||[])).next())}))}function K(k,B){var U,F,G,j,$={label:0,sent:function(){if(1&G[0])throw G[1];return G[1]},trys:[],ops:[]};return j={next:H(0),throw:H(1),return:H(2)},"function"==typeof Symbol&&(j[Symbol.iterator]=function(){return this}),j;function H(j){return function(H){return function(j){if(U)throw new TypeError("Generator is already executing.");for(;$;)try{if(U=1,F&&(G=2&j[0]?F.return:j[0]?F.throw||((G=F.return)&&G.call(F),0):F.next)&&!(G=G.call(F,j[1])).done)return G;switch(F=0,G&&(j=[2&j[0],G.value]),j[0]){case 0:case 1:G=j;break;case 4:return $.label++,{value:j[1],done:!1};case 5:$.label++,F=j[1],j=[0];continue;case 7:j=$.ops.pop(),$.trys.pop();continue;default:if(!(G=$.trys,(G=G.length>0&&G[G.length-1])||6!==j[0]&&2!==j[0])){$=0;continue}if(3===j[0]&&(!G||j[1]>G[0]&&j[1]=k.length&&(k=void 0),{value:k&&k[F++],done:!k}}};throw new TypeError(B?"Object is not iterable.":"Symbol.iterator is not defined.")}function X(k,B){var U="function"==typeof Symbol&&k[Symbol.iterator];if(!U)return k;var F,G,j=U.call(k),$=[];try{for(;(void 0===B||B-- >0)&&!(F=j.next()).done;)$.push(F.value)}catch(H){G={error:H}}finally{try{F&&!F.done&&(U=j.return)&&U.call(j)}finally{if(G)throw G.error}}return $}function Z(){for(var k=[],B=0;B1||H(k,B)}))})}function H(k,B){try{(U=G[k](B)).value instanceof et?Promise.resolve(U.value.v).then(V,W):q(j[0][2],U)}catch(e){q(j[0][3],e)}var U}function V(k){H("next",k)}function W(k){H("throw",k)}function q(k,B){k(B),j.shift(),j.length&&H(j[0][0],j[0][1])}}function st(k){var B,U;return B={},F("next"),F("throw",(function(k){throw k})),F("return"),B[Symbol.iterator]=function(){return this},B;function F(F,G){B[F]=k[F]?function(B){return(U=!U)?{value:et(k[F](B)),done:"return"===F}:G?G(B):B}:G}}function nt(k){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var B,U=k[Symbol.asyncIterator];return U?U.call(k):(k=Q(k),B={},F("next"),F("throw"),F("return"),B[Symbol.asyncIterator]=function(){return this},B);function F(U){B[U]=k[U]&&function(B){return new Promise((function(F,G){(function(k,B,U,F){Promise.resolve(F).then((function(B){k({value:B,done:U})}),B)})(F,G,(B=k[U](B)).done,B.value)}))}}}function at(k,B){return Object.defineProperty?Object.defineProperty(k,"raw",{value:B}):k.raw=B,k}var rt=Object.create?function(k,B){Object.defineProperty(k,"default",{enumerable:!0,value:B})}:function(k,B){k.default=B};function ot(k){if(k&&k.__esModule)return k;var B={};if(null!=k)for(var U in k)"default"!==U&&Object.prototype.hasOwnProperty.call(k,U)&&z(B,k,U);return rt(B,k),B}function ht(k){return k&&k.__esModule?k:{default:k}}function ct(k,B,U,F){if("a"===U&&!F)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof B?k!==B||!F:!B.has(k))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===U?F:"a"===U?F.call(k):F?F.value:B.get(k)}function dt(k,B,U,F,G){if("m"===F)throw new TypeError("Private method is not writable");if("a"===F&&!G)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof B?k!==B||!G:!B.has(k))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===F?G.call(k,U):G?G.value=U:B.set(k,U),U}},18045:k=>{"use strict";k.exports=function(k,B){var U=new Array(arguments.length-1),F=0,G=2,j=!0;for(;G{"use strict";var U=B;U.length=function(k){var B=k.length;if(!B)return 0;for(var U=0;--B%4>1&&"="===k.charAt(B);)++U;return Math.ceil(3*k.length)/4-U};for(var F=new Array(64),G=new Array(123),j=0;j<64;)G[F[j]=j<26?j+65:j<52?j+71:j<62?j-4:j-59|43]=j++;U.encode=function(k,B,U){for(var G,j=null,$=[],H=0,V=0;B>2],G=(3&W)<<4,V=1;break;case 1:$[H++]=F[G|W>>4],G=(15&W)<<2,V=2;break;case 2:$[H++]=F[G|W>>6],$[H++]=F[63&W],V=0}H>8191&&((j||(j=[])).push(String.fromCharCode.apply(String,$)),H=0)}return V&&($[H++]=F[G],$[H++]=61,1===V&&($[H++]=61)),j?(H&&j.push(String.fromCharCode.apply(String,$.slice(0,H))),j.join("")):String.fromCharCode.apply(String,$.slice(0,H))};var $="invalid encoding";U.decode=function(k,B,U){for(var F,j=U,H=0,V=0;V1)break;if(void 0===(W=G[W]))throw Error($);switch(H){case 0:F=W,H=1;break;case 1:B[U++]=F<<2|(48&W)>>4,F=W,H=2;break;case 2:B[U++]=(15&F)<<4|(60&W)>>2,F=W,H=3;break;case 3:B[U++]=(3&F)<<6|W,H=0}}if(1===H)throw Error($);return U-j},U.test=function(k){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(k)}},24358:k=>{"use strict";function B(){this._listeners={}}k.exports=B,B.prototype.on=function(k,B,U){return(this._listeners[k]||(this._listeners[k]=[])).push({fn:B,ctx:U||this}),this},B.prototype.off=function(k,B){if(void 0===k)this._listeners={};else if(void 0===B)this._listeners[k]=[];else for(var U=this._listeners[k],F=0;F{"use strict";function B(k){return"undefined"!=typeof Float32Array?function(){var B=new Float32Array([-0]),U=new Uint8Array(B.buffer),F=128===U[3];function G(k,F,G){B[0]=k,F[G]=U[0],F[G+1]=U[1],F[G+2]=U[2],F[G+3]=U[3]}function j(k,F,G){B[0]=k,F[G]=U[3],F[G+1]=U[2],F[G+2]=U[1],F[G+3]=U[0]}function $(k,F){return U[0]=k[F],U[1]=k[F+1],U[2]=k[F+2],U[3]=k[F+3],B[0]}function H(k,F){return U[3]=k[F],U[2]=k[F+1],U[1]=k[F+2],U[0]=k[F+3],B[0]}k.writeFloatLE=F?G:j,k.writeFloatBE=F?j:G,k.readFloatLE=F?$:H,k.readFloatBE=F?H:$}():function(){function B(k,B,U,F){var G=B<0?1:0;if(G&&(B=-B),0===B)k(1/B>0?0:2147483648,U,F);else if(isNaN(B))k(2143289344,U,F);else if(B>34028234663852886e22)k((G<<31|2139095040)>>>0,U,F);else if(B<11754943508222875e-54)k((G<<31|Math.round(B/1401298464324817e-60))>>>0,U,F);else{var j=Math.floor(Math.log(B)/Math.LN2);k((G<<31|j+127<<23|8388607&Math.round(B*Math.pow(2,-j)*8388608))>>>0,U,F)}}function $(k,B,U){var F=k(B,U),G=2*(F>>31)+1,j=F>>>23&255,$=8388607&F;return 255===j?$?NaN:G*(1/0):0===j?1401298464324817e-60*G*$:G*Math.pow(2,j-150)*($+8388608)}k.writeFloatLE=B.bind(null,U),k.writeFloatBE=B.bind(null,F),k.readFloatLE=$.bind(null,G),k.readFloatBE=$.bind(null,j)}(),"undefined"!=typeof Float64Array?function(){var B=new Float64Array([-0]),U=new Uint8Array(B.buffer),F=128===U[7];function G(k,F,G){B[0]=k,F[G]=U[0],F[G+1]=U[1],F[G+2]=U[2],F[G+3]=U[3],F[G+4]=U[4],F[G+5]=U[5],F[G+6]=U[6],F[G+7]=U[7]}function j(k,F,G){B[0]=k,F[G]=U[7],F[G+1]=U[6],F[G+2]=U[5],F[G+3]=U[4],F[G+4]=U[3],F[G+5]=U[2],F[G+6]=U[1],F[G+7]=U[0]}function $(k,F){return U[0]=k[F],U[1]=k[F+1],U[2]=k[F+2],U[3]=k[F+3],U[4]=k[F+4],U[5]=k[F+5],U[6]=k[F+6],U[7]=k[F+7],B[0]}function H(k,F){return U[7]=k[F],U[6]=k[F+1],U[5]=k[F+2],U[4]=k[F+3],U[3]=k[F+4],U[2]=k[F+5],U[1]=k[F+6],U[0]=k[F+7],B[0]}k.writeDoubleLE=F?G:j,k.writeDoubleBE=F?j:G,k.readDoubleLE=F?$:H,k.readDoubleBE=F?H:$}():function(){function B(k,B,U,F,G,j){var $=F<0?1:0;if($&&(F=-F),0===F)k(0,G,j+B),k(1/F>0?0:2147483648,G,j+U);else if(isNaN(F))k(0,G,j+B),k(2146959360,G,j+U);else if(F>17976931348623157e292)k(0,G,j+B),k(($<<31|2146435072)>>>0,G,j+U);else{var H;if(F<22250738585072014e-324)k((H=F/5e-324)>>>0,G,j+B),k(($<<31|H/4294967296)>>>0,G,j+U);else{var V=Math.floor(Math.log(F)/Math.LN2);1024===V&&(V=1023),k(4503599627370496*(H=F*Math.pow(2,-V))>>>0,G,j+B),k(($<<31|V+1023<<20|1048576*H&1048575)>>>0,G,j+U)}}}function $(k,B,U,F,G){var j=k(F,G+B),$=k(F,G+U),H=2*($>>31)+1,V=$>>>20&2047,W=4294967296*(1048575&$)+j;return 2047===V?W?NaN:H*(1/0):0===V?5e-324*H*W:H*Math.pow(2,V-1075)*(W+4503599627370496)}k.writeDoubleLE=B.bind(null,U,0,4),k.writeDoubleBE=B.bind(null,F,4,0),k.readDoubleLE=$.bind(null,G,0,4),k.readDoubleBE=$.bind(null,j,4,0)}(),k}function U(k,B,U){B[U]=255&k,B[U+1]=k>>>8&255,B[U+2]=k>>>16&255,B[U+3]=k>>>24}function F(k,B,U){B[U]=k>>>24,B[U+1]=k>>>16&255,B[U+2]=k>>>8&255,B[U+3]=255&k}function G(k,B){return(k[B]|k[B+1]<<8|k[B+2]<<16|k[B+3]<<24)>>>0}function j(k,B){return(k[B]<<24|k[B+1]<<16|k[B+2]<<8|k[B+3])>>>0}k.exports=B(B)},84153:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},99390:k=>{"use strict";k.exports=function(k,B,U){var F=U||8192,G=F>>>1,j=null,$=F;return function(U){if(U<1||U>G)return k(U);$+U>F&&(j=k(F),$=0);var H=B.call(j,$,$+=U);return 7&$&&($=1+(7|$)),H}}},81447:(k,B)=>{"use strict";var U=B;U.length=function(k){for(var B=0,U=0,F=0;F191&&F<224?j[$++]=(31&F)<<6|63&k[B++]:F>239&&F<365?(F=((7&F)<<18|(63&k[B++])<<12|(63&k[B++])<<6|63&k[B++])-65536,j[$++]=55296+(F>>10),j[$++]=56320+(1023&F)):j[$++]=(15&F)<<12|(63&k[B++])<<6|63&k[B++],$>8191&&((G||(G=[])).push(String.fromCharCode.apply(String,j)),$=0);return G?($&&G.push(String.fromCharCode.apply(String,j.slice(0,$))),G.join("")):String.fromCharCode.apply(String,j.slice(0,$))},U.write=function(k,B,U){for(var F,G,j=U,$=0;$>6|192,B[U++]=63&F|128):55296==(64512&F)&&56320==(64512&(G=k.charCodeAt($+1)))?(F=65536+((1023&F)<<10)+(1023&G),++$,B[U++]=F>>18|240,B[U++]=F>>12&63|128,B[U++]=F>>6&63|128,B[U++]=63&F|128):(B[U++]=F>>12|224,B[U++]=F>>6&63|128,B[U++]=63&F|128);return U-j}},89187:(k,B,U)=>{const F=U(72237);class G extends F{constructor(k,B,U,F){super(),this.PENDING=G.PENDING,this.SUBSCRIBED=G.SUBSCRIBED,this.UNSUBSCRIBED=G.UNSUBSCRIBED,this.name=k,this.client=B,this._eventDemux=U,this._dataStream=F.stream(this.name)}createConsumer(k){return this._dataStream.createConsumer(k)}listener(k){return this._eventDemux.stream(`${this.name}/${k}`)}close(){this.client.closeChannel(this.name)}kill(){this.client.killChannel(this.name)}killOutputConsumer(k){this.hasOutputConsumer(k)&&this.client.killChannelOutputConsumer(k)}killListenerConsumer(k){this.hasAnyListenerConsumer(k)&&this.client.killChannelListenerConsumer(k)}getOutputConsumerStats(k){if(this.hasOutputConsumer(k))return this.client.getChannelOutputConsumerStats(k)}getListenerConsumerStats(k){if(this.hasAnyListenerConsumer(k))return this.client.getChannelListenerConsumerStats(k)}getBackpressure(){return this.client.getChannelBackpressure(this.name)}getListenerConsumerBackpressure(k){return this.hasAnyListenerConsumer(k)?this.client.getChannelListenerConsumerBackpressure(k):0}getOutputConsumerBackpressure(k){return this.hasOutputConsumer(k)?this.client.getChannelOutputConsumerBackpressure(k):0}closeOutput(){this.client.channelCloseOutput(this.name)}closeListener(k){this.client.channelCloseListener(this.name,k)}closeAllListeners(){this.client.channelCloseAllListeners(this.name)}killOutput(){this.client.channelKillOutput(this.name)}killListener(k){this.client.channelKillListener(this.name,k)}killAllListeners(){this.client.channelKillAllListeners(this.name)}getOutputConsumerStatsList(){return this.client.channelGetOutputConsumerStatsList(this.name)}getListenerConsumerStatsList(k){return this.client.channelGetListenerConsumerStatsList(this.name,k)}getAllListenersConsumerStatsList(){return this.client.channelGetAllListenersConsumerStatsList(this.name)}getOutputBackpressure(){return this.client.channelGetOutputBackpressure(this.name)}getListenerBackpressure(k){return this.client.channelGetListenerBackpressure(this.name,k)}getAllListenersBackpressure(){return this.client.channelGetAllListenersBackpressure(this.name)}hasOutputConsumer(k){return this.client.channelHasOutputConsumer(this.name,k)}hasListenerConsumer(k,B){return this.client.channelHasListenerConsumer(this.name,k,B)}hasAnyListenerConsumer(k){return this.client.channelHasAnyListenerConsumer(this.name,k)}get state(){return this.client.getChannelState(this.name)}set state(k){throw new Error("Cannot directly set channel state")}get options(){return this.client.getChannelOptions(this.name)}set options(k){throw new Error("Cannot directly set channel options")}subscribe(k){this.client.subscribe(this.name,k)}unsubscribe(){this.client.unsubscribe(this.name)}isSubscribed(k){return this.client.isSubscribed(this.name,k)}transmitPublish(k){return this.client.transmitPublish(this.name,k)}invokePublish(k){return this.client.invokePublish(this.name,k)}}G.PENDING="pending",G.SUBSCRIBED="subscribed",G.UNSUBSCRIBED="unsubscribed",k.exports=G},27445:(k,B,U)=>{const F=U(97605),G=F.InvalidActionError;k.exports=function(k,B,U,j){this.socket=k,this.id=B,this.procedure=U,this.data=j,this.sent=!1,this._respond=(k,B)=>{if(this.sent)throw new G(`Response to request ${this.id} has already been sent`);this.sent=!0,this.socket.sendObject(k,B)},this.end=(k,B)=>{let U={rid:this.id};void 0!==k&&(U.data=k),this._respond(U,B)},this.error=(k,B)=>{let U={rid:this.id,error:F.dehydrateError(k)};this._respond(U,B)}}},72641:(k,B,U)=>{const F=U(47579);function G(k){this._listenerDemux=new F}G.prototype.emit=function(k,B){this._listenerDemux.write(k,B)},G.prototype.listener=function(k){return this._listenerDemux.stream(k)},G.prototype.closeListener=function(k){this._listenerDemux.close(k)},G.prototype.closeAllListeners=function(){this._listenerDemux.closeAll()},G.prototype.removeListener=function(k){this._listenerDemux.unstream(k)},G.prototype.getListenerConsumerStats=function(k){return this._listenerDemux.getConsumerStats(k)},G.prototype.getListenerConsumerStatsList=function(k){return this._listenerDemux.getConsumerStatsList(k)},G.prototype.getAllListenersConsumerStatsList=function(){return this._listenerDemux.getConsumerStatsListAll()},G.prototype.getListenerConsumerCount=function(k){return this._listenerDemux.getConsumerCount(k)},G.prototype.getAllListenersConsumerCount=function(){return this._listenerDemux.getConsumerCountAll()},G.prototype.killListener=function(k){this._listenerDemux.kill(k)},G.prototype.killAllListeners=function(){this._listenerDemux.killAll()},G.prototype.killListenerConsumer=function(k){this._listenerDemux.killConsumer(k)},G.prototype.getListenerBackpressure=function(k){return this._listenerDemux.getBackpressure(k)},G.prototype.getAllListenersBackpressure=function(){return this._listenerDemux.getBackpressureAll()},G.prototype.getListenerConsumerBackpressure=function(k){return this._listenerDemux.getConsumerBackpressure(k)},G.prototype.hasListenerConsumer=function(k,B){return this._listenerDemux.hasConsumer(k,B)},G.prototype.hasAnyListenerConsumer=function(k){return this._listenerDemux.hasConsumerAll(k)},k.exports=G},67526:(k,B)=>{"use strict";B.byteLength=function(k){var B=V(k),U=B[0],F=B[1];return 3*(U+F)/4-F},B.toByteArray=function(k){var B,U,j=V(k),$=j[0],H=j[1],W=new G(function(k,B,U){return 3*(B+U)/4-U}(0,$,H)),q=0,K=H>0?$-4:$;for(U=0;U>16&255,W[q++]=B>>8&255,W[q++]=255&B;2===H&&(B=F[k.charCodeAt(U)]<<2|F[k.charCodeAt(U+1)]>>4,W[q++]=255&B);1===H&&(B=F[k.charCodeAt(U)]<<10|F[k.charCodeAt(U+1)]<<4|F[k.charCodeAt(U+2)]>>2,W[q++]=B>>8&255,W[q++]=255&B);return W},B.fromByteArray=function(k){for(var B,F=k.length,G=F%3,j=[],$=16383,H=0,V=F-G;HV?V:H+$));1===G?(B=k[F-1],j.push(U[B>>2]+U[B<<4&63]+"==")):2===G&&(B=(k[F-2]<<8)+k[F-1],j.push(U[B>>10]+U[B>>4&63]+U[B<<2&63]+"="));return j.join("")};for(var U=[],F=[],G="undefined"!=typeof Uint8Array?Uint8Array:Array,j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$=0,H=j.length;$0)throw new Error("Invalid string. Length must be a multiple of 4");var U=k.indexOf("=");return-1===U&&(U=B),[U,U===B?0:4-U%4]}function W(k,B,F){for(var G,j,$=[],H=B;H>18&63]+U[j>>12&63]+U[j>>6&63]+U[63&j]);return $.join("")}F["-".charCodeAt(0)]=62,F["_".charCodeAt(0)]=63},46880:function(k){k.exports=function(k){var B={};function U(F){if(B[F])return B[F].exports;var G=B[F]={i:F,l:!1,exports:{}};return k[F].call(G.exports,G,G.exports,U),G.l=!0,G.exports}return U.m=k,U.c=B,U.d=function(k,B,F){U.o(k,B)||Object.defineProperty(k,B,{enumerable:!0,get:F})},U.r=function(k){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(k,"__esModule",{value:!0})},U.t=function(k,B){if(1&B&&(k=U(k)),8&B)return k;if(4&B&&"object"==typeof k&&k&&k.__esModule)return k;var F=Object.create(null);if(U.r(F),Object.defineProperty(F,"default",{enumerable:!0,value:k}),2&B&&"string"!=typeof k)for(var G in k)U.d(F,G,function(B){return k[B]}.bind(null,G));return F},U.n=function(k){var B=k&&k.__esModule?function(){return k.default}:function(){return k};return U.d(B,"a",B),B},U.o=function(k,B){return Object.prototype.hasOwnProperty.call(k,B)},U.p="",U(U.s=90)}({17:function(k,B,U){"use strict";B.__esModule=!0,B.default=void 0;var F=U(18),G=function(){function k(){}return k.getFirstMatch=function(k,B){var U=B.match(k);return U&&U.length>0&&U[1]||""},k.getSecondMatch=function(k,B){var U=B.match(k);return U&&U.length>1&&U[2]||""},k.matchAndReturnConst=function(k,B,U){if(k.test(B))return U},k.getWindowsVersionName=function(k){switch(k){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},k.getMacOSVersionName=function(k){var B=k.split(".").splice(0,2).map((function(k){return parseInt(k,10)||0}));if(B.push(0),10===B[0])switch(B[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},k.getAndroidVersionName=function(k){var B=k.split(".").splice(0,2).map((function(k){return parseInt(k,10)||0}));if(B.push(0),!(1===B[0]&&B[1]<5))return 1===B[0]&&B[1]<6?"Cupcake":1===B[0]&&B[1]>=6?"Donut":2===B[0]&&B[1]<2?"Eclair":2===B[0]&&2===B[1]?"Froyo":2===B[0]&&B[1]>2?"Gingerbread":3===B[0]?"Honeycomb":4===B[0]&&B[1]<1?"Ice Cream Sandwich":4===B[0]&&B[1]<4?"Jelly Bean":4===B[0]&&B[1]>=4?"KitKat":5===B[0]?"Lollipop":6===B[0]?"Marshmallow":7===B[0]?"Nougat":8===B[0]?"Oreo":9===B[0]?"Pie":void 0},k.getVersionPrecision=function(k){return k.split(".").length},k.compareVersions=function(B,U,F){void 0===F&&(F=!1);var G=k.getVersionPrecision(B),j=k.getVersionPrecision(U),$=Math.max(G,j),H=0,V=k.map([B,U],(function(B){var U=$-k.getVersionPrecision(B),F=B+new Array(U+1).join(".0");return k.map(F.split("."),(function(k){return new Array(20-k.length).join("0")+k})).reverse()}));for(F&&(H=$-Math.min(G,j)),$-=1;$>=H;){if(V[0][$]>V[1][$])return 1;if(V[0][$]===V[1][$]){if($===H)return 0;$-=1}else if(V[0][$]1?G-1:0),$=1;$0){var $=Object.keys(U),V=H.default.find($,(function(k){return B.isOS(k)}));if(V){var W=this.satisfies(U[V]);if(void 0!==W)return W}var q=H.default.find($,(function(k){return B.isPlatform(k)}));if(q){var K=this.satisfies(U[q]);if(void 0!==K)return K}}if(j>0){var z=Object.keys(G),Y=H.default.find(z,(function(k){return B.isBrowser(k,!0)}));if(void 0!==Y)return this.compareVersion(G[Y])}},B.isBrowser=function(k,B){void 0===B&&(B=!1);var U=this.getBrowserName().toLowerCase(),F=k.toLowerCase(),G=H.default.getBrowserTypeByAlias(F);return B&&G&&(F=G.toLowerCase()),F===U},B.compareVersion=function(k){var B=[0],U=k,F=!1,G=this.getBrowserVersion();if("string"==typeof G)return">"===k[0]||"<"===k[0]?(U=k.substr(1),"="===k[1]?(F=!0,U=k.substr(2)):B=[],">"===k[0]?B.push(1):B.push(-1)):"="===k[0]?U=k.substr(1):"~"===k[0]&&(F=!0,U=k.substr(1)),B.indexOf(H.default.compareVersions(G,U,F))>-1},B.isOS=function(k){return this.getOSName(!0)===String(k).toLowerCase()},B.isPlatform=function(k){return this.getPlatformType(!0)===String(k).toLowerCase()},B.isEngine=function(k){return this.getEngineName(!0)===String(k).toLowerCase()},B.is=function(k,B){return void 0===B&&(B=!1),this.isBrowser(k,B)||this.isOS(k)||this.isPlatform(k)},B.some=function(k){var B=this;return void 0===k&&(k=[]),k.some((function(k){return B.is(k)}))},k}();B.default=W,k.exports=B.default},92:function(k,B,U){"use strict";B.__esModule=!0,B.default=void 0;var F,G=(F=U(17))&&F.__esModule?F:{default:F},j=/version\/(\d+(\.?_?\d+)+)/i,$=[{test:[/googlebot/i],describe:function(k){var B={name:"Googlebot"},U=G.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/opera/i],describe:function(k){var B={name:"Opera"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/opr\/|opios/i],describe:function(k){var B={name:"Opera"},U=G.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/SamsungBrowser/i],describe:function(k){var B={name:"Samsung Internet for Android"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/Whale/i],describe:function(k){var B={name:"NAVER Whale Browser"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/MZBrowser/i],describe:function(k){var B={name:"MZ Browser"},U=G.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/focus/i],describe:function(k){var B={name:"Focus"},U=G.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/swing/i],describe:function(k){var B={name:"Swing"},U=G.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/coast/i],describe:function(k){var B={name:"Opera Coast"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(k){var B={name:"Opera Touch"},U=G.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/yabrowser/i],describe:function(k){var B={name:"Yandex Browser"},U=G.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/ucbrowser/i],describe:function(k){var B={name:"UC Browser"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/Maxthon|mxios/i],describe:function(k){var B={name:"Maxthon"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/epiphany/i],describe:function(k){var B={name:"Epiphany"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/puffin/i],describe:function(k){var B={name:"Puffin"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/sleipnir/i],describe:function(k){var B={name:"Sleipnir"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/k-meleon/i],describe:function(k){var B={name:"K-Meleon"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/micromessenger/i],describe:function(k){var B={name:"WeChat"},U=G.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/qqbrowser/i],describe:function(k){var B={name:/qqbrowserlite/i.test(k)?"QQ Browser Lite":"QQ Browser"},U=G.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/msie|trident/i],describe:function(k){var B={name:"Internet Explorer"},U=G.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/\sedg\//i],describe:function(k){var B={name:"Microsoft Edge"},U=G.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/edg([ea]|ios)/i],describe:function(k){var B={name:"Microsoft Edge"},U=G.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/vivaldi/i],describe:function(k){var B={name:"Vivaldi"},U=G.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/seamonkey/i],describe:function(k){var B={name:"SeaMonkey"},U=G.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/sailfish/i],describe:function(k){var B={name:"Sailfish"},U=G.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,k);return U&&(B.version=U),B}},{test:[/silk/i],describe:function(k){var B={name:"Amazon Silk"},U=G.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/phantom/i],describe:function(k){var B={name:"PhantomJS"},U=G.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/slimerjs/i],describe:function(k){var B={name:"SlimerJS"},U=G.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(k){var B={name:"BlackBerry"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/(web|hpw)[o0]s/i],describe:function(k){var B={name:"WebOS Browser"},U=G.default.getFirstMatch(j,k)||G.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/bada/i],describe:function(k){var B={name:"Bada"},U=G.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/tizen/i],describe:function(k){var B={name:"Tizen"},U=G.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/qupzilla/i],describe:function(k){var B={name:"QupZilla"},U=G.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/firefox|iceweasel|fxios/i],describe:function(k){var B={name:"Firefox"},U=G.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/electron/i],describe:function(k){var B={name:"Electron"},U=G.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/MiuiBrowser/i],describe:function(k){var B={name:"Miui"},U=G.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/chromium/i],describe:function(k){var B={name:"Chromium"},U=G.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,k)||G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/chrome|crios|crmo/i],describe:function(k){var B={name:"Chrome"},U=G.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/GSA/i],describe:function(k){var B={name:"Google Search"},U=G.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:function(k){var B=!k.test(/like android/i),U=k.test(/android/i);return B&&U},describe:function(k){var B={name:"Android Browser"},U=G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/playstation 4/i],describe:function(k){var B={name:"PlayStation 4"},U=G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/safari|applewebkit/i],describe:function(k){var B={name:"Safari"},U=G.default.getFirstMatch(j,k);return U&&(B.version=U),B}},{test:[/.*/i],describe:function(k){var B=-1!==k.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:G.default.getFirstMatch(B,k),version:G.default.getSecondMatch(B,k)}}}];B.default=$,k.exports=B.default},93:function(k,B,U){"use strict";B.__esModule=!0,B.default=void 0;var F,G=(F=U(17))&&F.__esModule?F:{default:F},j=U(18),$=[{test:[/Roku\/DVP/],describe:function(k){var B=G.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,k);return{name:j.OS_MAP.Roku,version:B}}},{test:[/windows phone/i],describe:function(k){var B=G.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,k);return{name:j.OS_MAP.WindowsPhone,version:B}}},{test:[/windows /i],describe:function(k){var B=G.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,k),U=G.default.getWindowsVersionName(B);return{name:j.OS_MAP.Windows,version:B,versionName:U}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(k){var B={name:j.OS_MAP.iOS},U=G.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,k);return U&&(B.version=U),B}},{test:[/macintosh/i],describe:function(k){var B=G.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,k).replace(/[_\s]/g,"."),U=G.default.getMacOSVersionName(B),F={name:j.OS_MAP.MacOS,version:B};return U&&(F.versionName=U),F}},{test:[/(ipod|iphone|ipad)/i],describe:function(k){var B=G.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,k).replace(/[_\s]/g,".");return{name:j.OS_MAP.iOS,version:B}}},{test:function(k){var B=!k.test(/like android/i),U=k.test(/android/i);return B&&U},describe:function(k){var B=G.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,k),U=G.default.getAndroidVersionName(B),F={name:j.OS_MAP.Android,version:B};return U&&(F.versionName=U),F}},{test:[/(web|hpw)[o0]s/i],describe:function(k){var B=G.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,k),U={name:j.OS_MAP.WebOS};return B&&B.length&&(U.version=B),U}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(k){var B=G.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,k)||G.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,k)||G.default.getFirstMatch(/\bbb(\d+)/i,k);return{name:j.OS_MAP.BlackBerry,version:B}}},{test:[/bada/i],describe:function(k){var B=G.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,k);return{name:j.OS_MAP.Bada,version:B}}},{test:[/tizen/i],describe:function(k){var B=G.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,k);return{name:j.OS_MAP.Tizen,version:B}}},{test:[/linux/i],describe:function(){return{name:j.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:j.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(k){var B=G.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,k);return{name:j.OS_MAP.PlayStation4,version:B}}}];B.default=$,k.exports=B.default},94:function(k,B,U){"use strict";B.__esModule=!0,B.default=void 0;var F,G=(F=U(17))&&F.__esModule?F:{default:F},j=U(18),$=[{test:[/googlebot/i],describe:function(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe:function(k){var B=G.default.getFirstMatch(/(can-l01)/i,k)&&"Nova",U={type:j.PLATFORMS_MAP.mobile,vendor:"Huawei"};return B&&(U.model=B),U}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:j.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:j.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:j.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:j.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:j.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:j.PLATFORMS_MAP.tablet}}},{test:function(k){var B=k.test(/ipod|iphone/i),U=k.test(/like (ipod|iphone)/i);return B&&!U},describe:function(k){var B=G.default.getFirstMatch(/(ipod|iphone)/i,k);return{type:j.PLATFORMS_MAP.mobile,vendor:"Apple",model:B}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:j.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe:function(){return{type:j.PLATFORMS_MAP.mobile}}},{test:function(k){return"blackberry"===k.getBrowserName(!0)},describe:function(){return{type:j.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(k){return"bada"===k.getBrowserName(!0)},describe:function(){return{type:j.PLATFORMS_MAP.mobile}}},{test:function(k){return"windows phone"===k.getBrowserName()},describe:function(){return{type:j.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(k){var B=Number(String(k.getOSVersion()).split(".")[0]);return"android"===k.getOSName(!0)&&B>=3},describe:function(){return{type:j.PLATFORMS_MAP.tablet}}},{test:function(k){return"android"===k.getOSName(!0)},describe:function(){return{type:j.PLATFORMS_MAP.mobile}}},{test:function(k){return"macos"===k.getOSName(!0)},describe:function(){return{type:j.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(k){return"windows"===k.getOSName(!0)},describe:function(){return{type:j.PLATFORMS_MAP.desktop}}},{test:function(k){return"linux"===k.getOSName(!0)},describe:function(){return{type:j.PLATFORMS_MAP.desktop}}},{test:function(k){return"playstation 4"===k.getOSName(!0)},describe:function(){return{type:j.PLATFORMS_MAP.tv}}},{test:function(k){return"roku"===k.getOSName(!0)},describe:function(){return{type:j.PLATFORMS_MAP.tv}}}];B.default=$,k.exports=B.default},95:function(k,B,U){"use strict";B.__esModule=!0,B.default=void 0;var F,G=(F=U(17))&&F.__esModule?F:{default:F},j=U(18),$=[{test:function(k){return"microsoft edge"===k.getBrowserName(!0)},describe:function(k){if(/\sedg\//i.test(k))return{name:j.ENGINE_MAP.Blink};var B=G.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,k);return{name:j.ENGINE_MAP.EdgeHTML,version:B}}},{test:[/trident/i],describe:function(k){var B={name:j.ENGINE_MAP.Trident},U=G.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:function(k){return k.test(/presto/i)},describe:function(k){var B={name:j.ENGINE_MAP.Presto},U=G.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:function(k){var B=k.test(/gecko/i),U=k.test(/like gecko/i);return B&&!U},describe:function(k){var B={name:j.ENGINE_MAP.Gecko},U=G.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:j.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(k){var B={name:j.ENGINE_MAP.WebKit},U=G.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,k);return U&&(B.version=U),B}}];B.default=$,k.exports=B.default}})},48287:(k,B,U)=>{"use strict";var F=U(67526),G=U(251),j="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;B.hp=V,B.IS=50;var $=2147483647;function H(k){if(k>$)throw new RangeError('The value "'+k+'" is invalid for option "size"');var B=new Uint8Array(k);return Object.setPrototypeOf(B,V.prototype),B}function V(k,B,U){if("number"==typeof k){if("string"==typeof B)throw new TypeError('The "string" argument must be of type string. Received type number');return K(k)}return W(k,B,U)}function W(k,B,U){if("string"==typeof k)return function(k,B){"string"==typeof B&&""!==B||(B="utf8");if(!V.isEncoding(B))throw new TypeError("Unknown encoding: "+B);var U=0|X(k,B),F=H(U),G=F.write(k,B);G!==U&&(F=F.slice(0,G));return F}(k,B);if(ArrayBuffer.isView(k))return function(k){if(Tt(k,Uint8Array)){var B=new Uint8Array(k);return Y(B.buffer,B.byteOffset,B.byteLength)}return z(k)}(k);if(null==k)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(Tt(k,ArrayBuffer)||k&&Tt(k.buffer,ArrayBuffer))return Y(k,B,U);if("undefined"!=typeof SharedArrayBuffer&&(Tt(k,SharedArrayBuffer)||k&&Tt(k.buffer,SharedArrayBuffer)))return Y(k,B,U);if("number"==typeof k)throw new TypeError('The "value" argument must not be of type number. Received type number');var F=k.valueOf&&k.valueOf();if(null!=F&&F!==k)return V.from(F,B,U);var G=function(k){if(V.isBuffer(k)){var B=0|Q(k.length),U=H(B);return 0===U.length||k.copy(U,0,0,B),U}if(void 0!==k.length)return"number"!=typeof k.length||St(k.length)?H(0):z(k);if("Buffer"===k.type&&Array.isArray(k.data))return z(k.data)}(k);if(G)return G;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof k[Symbol.toPrimitive])return V.from(k[Symbol.toPrimitive]("string"),B,U);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}function q(k){if("number"!=typeof k)throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function K(k){return q(k),H(k<0?0:0|Q(k))}function z(k){for(var B=k.length<0?0:0|Q(k.length),U=H(B),F=0;F=$)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+$.toString(16)+" bytes");return 0|k}function X(k,B){if(V.isBuffer(k))return k.length;if(ArrayBuffer.isView(k)||Tt(k,ArrayBuffer))return k.byteLength;if("string"!=typeof k)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);var U=k.length,F=arguments.length>2&&!0===arguments[2];if(!F&&0===U)return 0;for(var G=!1;;)switch(B){case"ascii":case"latin1":case"binary":return U;case"utf8":case"utf-8":return _t(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*U;case"hex":return U>>>1;case"base64":return Et(k).length;default:if(G)return F?-1:_t(k).length;B=(""+B).toLowerCase(),G=!0}}function Z(k,B,U){var F=!1;if((void 0===B||B<0)&&(B=0),B>this.length)return"";if((void 0===U||U>this.length)&&(U=this.length),U<=0)return"";if((U>>>=0)<=(B>>>=0))return"";for(k||(k="utf8");;)switch(k){case"hex":return ut(this,B,U);case"utf8":case"utf-8":return ht(this,B,U);case"ascii":return dt(this,B,U);case"latin1":case"binary":return lt(this,B,U);case"base64":return ot(this,B,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ft(this,B,U);default:if(F)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),F=!0}}function J(k,B,U){var F=k[B];k[B]=k[U],k[U]=F}function tt(k,B,U,F,G){if(0===k.length)return-1;if("string"==typeof U?(F=U,U=0):U>2147483647?U=2147483647:U<-2147483648&&(U=-2147483648),St(U=+U)&&(U=G?0:k.length-1),U<0&&(U=k.length+U),U>=k.length){if(G)return-1;U=k.length-1}else if(U<0){if(!G)return-1;U=0}if("string"==typeof B&&(B=V.from(B,F)),V.isBuffer(B))return 0===B.length?-1:et(k,B,U,F,G);if("number"==typeof B)return B&=255,"function"==typeof Uint8Array.prototype.indexOf?G?Uint8Array.prototype.indexOf.call(k,B,U):Uint8Array.prototype.lastIndexOf.call(k,B,U):et(k,[B],U,F,G);throw new TypeError("val must be string, number or Buffer")}function et(k,B,U,F,G){var j,$=1,H=k.length,V=B.length;if(void 0!==F&&("ucs2"===(F=String(F).toLowerCase())||"ucs-2"===F||"utf16le"===F||"utf-16le"===F)){if(k.length<2||B.length<2)return-1;$=2,H/=2,V/=2,U/=2}function W(k,B){return 1===$?k[B]:k.readUInt16BE(B*$)}if(G){var q=-1;for(j=U;jH&&(U=H-V),j=U;j>=0;j--){for(var K=!0,z=0;zG&&(F=G):F=G;var j=B.length;F>j/2&&(F=j/2);for(var $=0;$>8,G=U%256,j.push(G),j.push(F);return j}(B,k.length-U),k,U,F)}function ot(k,B,U){return 0===B&&U===k.length?F.fromByteArray(k):F.fromByteArray(k.slice(B,U))}function ht(k,B,U){U=Math.min(k.length,U);for(var F=[],G=B;G239?4:W>223?3:W>191?2:1;if(G+K<=U)switch(K){case 1:W<128&&(q=W);break;case 2:128==(192&(j=k[G+1]))&&(V=(31&W)<<6|63&j)>127&&(q=V);break;case 3:j=k[G+1],$=k[G+2],128==(192&j)&&128==(192&$)&&(V=(15&W)<<12|(63&j)<<6|63&$)>2047&&(V<55296||V>57343)&&(q=V);break;case 4:j=k[G+1],$=k[G+2],H=k[G+3],128==(192&j)&&128==(192&$)&&128==(192&H)&&(V=(15&W)<<18|(63&j)<<12|(63&$)<<6|63&H)>65535&&V<1114112&&(q=V)}null===q?(q=65533,K=1):q>65535&&(q-=65536,F.push(q>>>10&1023|55296),q=56320|1023&q),F.push(q),G+=K}return function(k){var B=k.length;if(B<=ct)return String.fromCharCode.apply(String,k);var U="",F=0;for(;FF.length?V.from(j).copy(F,G):Uint8Array.prototype.set.call(F,j,G);else{if(!V.isBuffer(j))throw new TypeError('"list" argument must be an Array of Buffers');j.copy(F,G)}G+=j.length}return F},V.byteLength=X,V.prototype._isBuffer=!0,V.prototype.swap16=function(){var k=this.length;if(k%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var B=0;BU&&(k+=" ... "),""},j&&(V.prototype[j]=V.prototype.inspect),V.prototype.compare=function(k,B,U,F,G){if(Tt(k,Uint8Array)&&(k=V.from(k,k.offset,k.byteLength)),!V.isBuffer(k))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof k);if(void 0===B&&(B=0),void 0===U&&(U=k?k.length:0),void 0===F&&(F=0),void 0===G&&(G=this.length),B<0||U>k.length||F<0||G>this.length)throw new RangeError("out of range index");if(F>=G&&B>=U)return 0;if(F>=G)return-1;if(B>=U)return 1;if(this===k)return 0;for(var j=(G>>>=0)-(F>>>=0),$=(U>>>=0)-(B>>>=0),H=Math.min(j,$),W=this.slice(F,G),q=k.slice(B,U),K=0;K>>=0,isFinite(U)?(U>>>=0,void 0===F&&(F="utf8")):(F=U,U=void 0)}var G=this.length-B;if((void 0===U||U>G)&&(U=G),k.length>0&&(U<0||B<0)||B>this.length)throw new RangeError("Attempt to write outside buffer bounds");F||(F="utf8");for(var j=!1;;)switch(F){case"hex":return it(this,k,B,U);case"utf8":case"utf-8":return st(this,k,B,U);case"ascii":case"latin1":case"binary":return nt(this,k,B,U);case"base64":return at(this,k,B,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rt(this,k,B,U);default:if(j)throw new TypeError("Unknown encoding: "+F);F=(""+F).toLowerCase(),j=!0}},V.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ct=4096;function dt(k,B,U){var F="";U=Math.min(k.length,U);for(var G=B;GF)&&(U=F);for(var G="",j=B;jU)throw new RangeError("Trying to access beyond buffer length")}function pt(k,B,U,F,G,j){if(!V.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(B>G||Bk.length)throw new RangeError("Index out of range")}function vt(k,B,U,F,G,j){if(U+F>k.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("Index out of range")}function gt(k,B,U,F,j){return B=+B,U>>>=0,j||vt(k,0,U,4),G.write(k,B,U,F,23,4),U+4}function mt(k,B,U,F,j){return B=+B,U>>>=0,j||vt(k,0,U,8),G.write(k,B,U,F,52,8),U+8}V.prototype.slice=function(k,B){var U=this.length;(k=~~k)<0?(k+=U)<0&&(k=0):k>U&&(k=U),(B=void 0===B?U:~~B)<0?(B+=U)<0&&(B=0):B>U&&(B=U),B>>=0,B>>>=0,U||bt(k,B,this.length);for(var F=this[k],G=1,j=0;++j>>=0,B>>>=0,U||bt(k,B,this.length);for(var F=this[k+--B],G=1;B>0&&(G*=256);)F+=this[k+--B]*G;return F},V.prototype.readUint8=V.prototype.readUInt8=function(k,B){return k>>>=0,B||bt(k,1,this.length),this[k]},V.prototype.readUint16LE=V.prototype.readUInt16LE=function(k,B){return k>>>=0,B||bt(k,2,this.length),this[k]|this[k+1]<<8},V.prototype.readUint16BE=V.prototype.readUInt16BE=function(k,B){return k>>>=0,B||bt(k,2,this.length),this[k]<<8|this[k+1]},V.prototype.readUint32LE=V.prototype.readUInt32LE=function(k,B){return k>>>=0,B||bt(k,4,this.length),(this[k]|this[k+1]<<8|this[k+2]<<16)+16777216*this[k+3]},V.prototype.readUint32BE=V.prototype.readUInt32BE=function(k,B){return k>>>=0,B||bt(k,4,this.length),16777216*this[k]+(this[k+1]<<16|this[k+2]<<8|this[k+3])},V.prototype.readIntLE=function(k,B,U){k>>>=0,B>>>=0,U||bt(k,B,this.length);for(var F=this[k],G=1,j=0;++j=(G*=128)&&(F-=Math.pow(2,8*B)),F},V.prototype.readIntBE=function(k,B,U){k>>>=0,B>>>=0,U||bt(k,B,this.length);for(var F=B,G=1,j=this[k+--F];F>0&&(G*=256);)j+=this[k+--F]*G;return j>=(G*=128)&&(j-=Math.pow(2,8*B)),j},V.prototype.readInt8=function(k,B){return k>>>=0,B||bt(k,1,this.length),128&this[k]?-1*(255-this[k]+1):this[k]},V.prototype.readInt16LE=function(k,B){k>>>=0,B||bt(k,2,this.length);var U=this[k]|this[k+1]<<8;return 32768&U?4294901760|U:U},V.prototype.readInt16BE=function(k,B){k>>>=0,B||bt(k,2,this.length);var U=this[k+1]|this[k]<<8;return 32768&U?4294901760|U:U},V.prototype.readInt32LE=function(k,B){return k>>>=0,B||bt(k,4,this.length),this[k]|this[k+1]<<8|this[k+2]<<16|this[k+3]<<24},V.prototype.readInt32BE=function(k,B){return k>>>=0,B||bt(k,4,this.length),this[k]<<24|this[k+1]<<16|this[k+2]<<8|this[k+3]},V.prototype.readFloatLE=function(k,B){return k>>>=0,B||bt(k,4,this.length),G.read(this,k,!0,23,4)},V.prototype.readFloatBE=function(k,B){return k>>>=0,B||bt(k,4,this.length),G.read(this,k,!1,23,4)},V.prototype.readDoubleLE=function(k,B){return k>>>=0,B||bt(k,8,this.length),G.read(this,k,!0,52,8)},V.prototype.readDoubleBE=function(k,B){return k>>>=0,B||bt(k,8,this.length),G.read(this,k,!1,52,8)},V.prototype.writeUintLE=V.prototype.writeUIntLE=function(k,B,U,F){(k=+k,B>>>=0,U>>>=0,F)||pt(this,k,B,U,Math.pow(2,8*U)-1,0);var G=1,j=0;for(this[B]=255&k;++j>>=0,U>>>=0,F)||pt(this,k,B,U,Math.pow(2,8*U)-1,0);var G=U-1,j=1;for(this[B+G]=255&k;--G>=0&&(j*=256);)this[B+G]=k/j&255;return B+U},V.prototype.writeUint8=V.prototype.writeUInt8=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,1,255,0),this[B]=255&k,B+1},V.prototype.writeUint16LE=V.prototype.writeUInt16LE=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,2,65535,0),this[B]=255&k,this[B+1]=k>>>8,B+2},V.prototype.writeUint16BE=V.prototype.writeUInt16BE=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,2,65535,0),this[B]=k>>>8,this[B+1]=255&k,B+2},V.prototype.writeUint32LE=V.prototype.writeUInt32LE=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,4,4294967295,0),this[B+3]=k>>>24,this[B+2]=k>>>16,this[B+1]=k>>>8,this[B]=255&k,B+4},V.prototype.writeUint32BE=V.prototype.writeUInt32BE=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,4,4294967295,0),this[B]=k>>>24,this[B+1]=k>>>16,this[B+2]=k>>>8,this[B+3]=255&k,B+4},V.prototype.writeIntLE=function(k,B,U,F){if(k=+k,B>>>=0,!F){var G=Math.pow(2,8*U-1);pt(this,k,B,U,G-1,-G)}var j=0,$=1,H=0;for(this[B]=255&k;++j>0)-H&255;return B+U},V.prototype.writeIntBE=function(k,B,U,F){if(k=+k,B>>>=0,!F){var G=Math.pow(2,8*U-1);pt(this,k,B,U,G-1,-G)}var j=U-1,$=1,H=0;for(this[B+j]=255&k;--j>=0&&($*=256);)k<0&&0===H&&0!==this[B+j+1]&&(H=1),this[B+j]=(k/$>>0)-H&255;return B+U},V.prototype.writeInt8=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,1,127,-128),k<0&&(k=255+k+1),this[B]=255&k,B+1},V.prototype.writeInt16LE=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,2,32767,-32768),this[B]=255&k,this[B+1]=k>>>8,B+2},V.prototype.writeInt16BE=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,2,32767,-32768),this[B]=k>>>8,this[B+1]=255&k,B+2},V.prototype.writeInt32LE=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,4,2147483647,-2147483648),this[B]=255&k,this[B+1]=k>>>8,this[B+2]=k>>>16,this[B+3]=k>>>24,B+4},V.prototype.writeInt32BE=function(k,B,U){return k=+k,B>>>=0,U||pt(this,k,B,4,2147483647,-2147483648),k<0&&(k=4294967295+k+1),this[B]=k>>>24,this[B+1]=k>>>16,this[B+2]=k>>>8,this[B+3]=255&k,B+4},V.prototype.writeFloatLE=function(k,B,U){return gt(this,k,B,!0,U)},V.prototype.writeFloatBE=function(k,B,U){return gt(this,k,B,!1,U)},V.prototype.writeDoubleLE=function(k,B,U){return mt(this,k,B,!0,U)},V.prototype.writeDoubleBE=function(k,B,U){return mt(this,k,B,!1,U)},V.prototype.copy=function(k,B,U,F){if(!V.isBuffer(k))throw new TypeError("argument should be a Buffer");if(U||(U=0),F||0===F||(F=this.length),B>=k.length&&(B=k.length),B||(B=0),F>0&&F=this.length)throw new RangeError("Index out of range");if(F<0)throw new RangeError("sourceEnd out of bounds");F>this.length&&(F=this.length),k.length-B>>=0,U=void 0===U?this.length:U>>>0,k||(k=0),"number"==typeof k)for(j=B;j55295&&U<57344){if(!G){if(U>56319){(B-=3)>-1&&j.push(239,191,189);continue}if($+1===F){(B-=3)>-1&&j.push(239,191,189);continue}G=U;continue}if(U<56320){(B-=3)>-1&&j.push(239,191,189),G=U;continue}U=65536+(G-55296<<10|U-56320)}else G&&(B-=3)>-1&&j.push(239,191,189);if(G=null,U<128){if((B-=1)<0)break;j.push(U)}else if(U<2048){if((B-=2)<0)break;j.push(U>>6|192,63&U|128)}else if(U<65536){if((B-=3)<0)break;j.push(U>>12|224,U>>6&63|128,63&U|128)}else{if(!(U<1114112))throw new Error("Invalid code point");if((B-=4)<0)break;j.push(U>>18|240,U>>12&63|128,U>>6&63|128,63&U|128)}}return j}function Et(k){return F.toByteArray(function(k){if((k=(k=k.split("=")[0]).trim().replace(yt,"")).length<2)return"";for(;k.length%4!=0;)k+="=";return k}(k))}function wt(k,B,U,F){for(var G=0;G=B.length||G>=k.length);++G)B[G+U]=k[G];return G}function Tt(k,B){return k instanceof B||null!=k&&null!=k.constructor&&null!=k.constructor.name&&k.constructor.name===B.name}function St(k){return k!=k}var At=function(){for(var k="0123456789abcdef",B=new Array(256),U=0;U<16;++U)for(var F=16*U,G=0;G<16;++G)B[F+G]=k[U]+k[G];return B}()},13144:(k,B,U)=>{"use strict";var F=U(66743),G=U(11002),j=U(10076),$=U(47119);k.exports=$||F.call(j,G)},12205:(k,B,U)=>{"use strict";var F=U(66743),G=U(11002),j=U(13144);k.exports=function(){return j(F,G,arguments)}},11002:k=>{"use strict";k.exports=Function.prototype.apply},10076:k=>{"use strict";k.exports=Function.prototype.call},73126:(k,B,U)=>{"use strict";var F=U(66743),G=U(69675),j=U(10076),$=U(13144);k.exports=function(k){if(k.length<1||"function"!=typeof k[0])throw new G("a function is required");return $(F,j,k)}},47119:k=>{"use strict";k.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},38075:(k,B,U)=>{"use strict";var F=U(70453),G=U(10487),j=G(F("String.prototype.indexOf"));k.exports=function(k,B){var U=F(k,!!B);return"function"==typeof U&&j(k,".prototype.")>-1?G(U):U}},10487:(k,B,U)=>{"use strict";var F=U(96897),G=U(30655),j=U(73126),$=U(12205);k.exports=function(k){var B=j(arguments),U=k.length-(arguments.length-1);return F(B,1+(U>0?U:0),!0)},G?G(k.exports,"apply",{value:$}):k.exports.apply=$},36556:(k,B,U)=>{"use strict";var F=U(70453),G=U(73126),j=G([F("%String.prototype.indexOf%")]);k.exports=function(k,B){var U=F(k,!!B);return"function"==typeof U&&j(k,".prototype.")>-1?G([U]):U}},8928:k=>{function B(k){this.input=k;for(var B,U=k.split("\n"),F=0,G=U.length,j=0,$={length:G};F=0&&"\n"!==B.charAt(U);U--);return k-U-1},indexAt:function(k){var B=k.line,U=k.column;return this.lineMap[B].start+U},charAt:function(k){var B=this.indexAt(k);return this.input.charAt(B)}},U.Indexer=B,k.exports=U},79155:(k,B,U)=>{"use strict";const F=U(84427),G=U(46221),j=U(51750);function $(k,B){switch(G(k)){case"object":return function(k,B){if("function"==typeof B)return B(k);if(B||j(k)){const U=new k.constructor;for(let F in k)U[F]=$(k[F],B);return U}return k}(k,B);case"array":return function(k,B){const U=new k.constructor(k.length);for(let F=0;F{"use strict";var F=U(13798);function G(k){return!0===F(k)&&"[object Object]"===Object.prototype.toString.call(k)}k.exports=function(k){var B,U;return!1!==G(k)&&("function"==typeof(B=k.constructor)&&(!1!==G(U=B.prototype)&&!1!==U.hasOwnProperty("isPrototypeOf")))}},46221:k=>{var B=Object.prototype.toString;function U(k){return"function"==typeof k.constructor?k.constructor.name:null}k.exports=function(k){if(void 0===k)return"undefined";if(null===k)return"null";var F=typeof k;if("boolean"===F)return"boolean";if("string"===F)return"string";if("number"===F)return"number";if("symbol"===F)return"symbol";if("function"===F)return"GeneratorFunction"===U(k)?"generatorfunction":"function";if(function(k){return Array.isArray?Array.isArray(k):k instanceof Array}(k))return"array";if(function(k){if(k.constructor&&"function"==typeof k.constructor.isBuffer)return k.constructor.isBuffer(k);return!1}(k))return"buffer";if(function(k){try{if("number"==typeof k.length&&"function"==typeof k.callee)return!0}catch(B){if(-1!==B.message.indexOf("callee"))return!0}return!1}(k))return"arguments";if(function(k){return k instanceof Date||"function"==typeof k.toDateString&&"function"==typeof k.getDate&&"function"==typeof k.setDate}(k))return"date";if(function(k){return k instanceof Error||"string"==typeof k.message&&k.constructor&&"number"==typeof k.constructor.stackTraceLimit}(k))return"error";if(function(k){return k instanceof RegExp||"string"==typeof k.flags&&"boolean"==typeof k.ignoreCase&&"boolean"==typeof k.multiline&&"boolean"==typeof k.global}(k))return"regexp";switch(U(k)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(k){return"function"==typeof k.throw&&"function"==typeof k.return&&"function"==typeof k.next}(k))return"generator";switch(F=B.call(k)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return F.slice(8,-1).toLowerCase().replace(/\s/g,"")}},40862:(k,B,U)=>{"use strict";var F=U(14263),G="undefined"!=typeof process&&"production",j=!G||"dev"===G||"development"===G,$="undefined"!=typeof process&&Boolean(process.env.SHOW_MODULE_COMPLAINS),H="undefined"!=typeof process&&Boolean(process.env.SHOW_NESTED_COMPLAINS),V="undefined"!=typeof console&&console.warn&&console,W="undefined"!=typeof process&&process.cwd&&process.cwd()+"/"||"",q="undefined"!=typeof process&&"win32"===process.platform?"\r\n":"\n",K=[].slice,z="[ignore]",Y={};function Q(){var k,B,U,F,G,j,H=arguments;if(!Q.silence){"object"==typeof H[H.length-1]?(k=H[H.length-1],H=K.call(H,0,-1)):k={},j=k.level||2,G=k.heading||(2==j?"WARNING!!":"NOTICE"),F=k.headingColor||(2==j?Q.colors.warning:Q.colors.notice),U=null==k.locationIndex?1:k.locationIndex,!1===k.location&&(U=0),B=k.location||Z(U);var V=Q.getModuleName(B);if(!V||$){if(B){if(Y[B]||B===z)return;Y[B]=!0}tt=X(G,F);for(var J=0;JU;j--)if(Y[G[j]])return z;B=G[U]}catch(e){}return B}function J(){}(Q=j?Q:J).method=j?function(k,B){var U=k[B],F=K.call(arguments,2);k[B]=function(){return Q.apply(null,F),U.apply(this,arguments)}}:J,Q.fn=j?function(k){var B=K.call(arguments,1);return function(){return Q.apply(null,B),k.apply(this,arguments)}}:function(k){return k},Q.log=function(k,B){var U=X(k,B);Q.stream?Q.stream.write(U+q):V&&V.warn(U)},Q.stream="undefined"!=typeof process&&process.stderr,Q.silence=!1,Q.color=Q.stream&&Q.stream.isTTY,Q.colors={warning:"",notice:"",message:!1,location:""},Q.getModuleName=function(k){for(var B=k.replace(W,"").split(/\/|\\/g),U=B.length-1;U>=0;U--)if("node_modules"===B[U]){var F=B[U+1];return"@"===F[0]?F+"/"+B[U+2]:F}},k.exports?k.exports=Q:"undefined"!=typeof window&&(window.complain=Q)},72237:k=>{class B{async next(k){let B=this.createConsumer(k),U=await B.next();return B.return(),U}async once(k){let B=await this.next(k);return B.done&&await new Promise((()=>{})),B.value}createConsumer(){throw new TypeError("Method must be overriden by subclass")}[Symbol.asyncIterator](){return this.createConsumer()}}k.exports=B},30454:k=>{"use strict";var B="%[a-f0-9]{2}",U=new RegExp("("+B+")|([^%]+?)","gi"),F=new RegExp("("+B+")+","gi");function G(k,B){try{return[decodeURIComponent(k.join(""))]}catch(j){}if(1===k.length)return k;B=B||1;var U=k.slice(0,B),F=k.slice(B);return Array.prototype.concat.call([],G(U),G(F))}function j(k){try{return decodeURIComponent(k)}catch(j){for(var B=k.match(U)||[],F=1;F{"use strict";var F=U(30655),G=U(58068),j=U(69675),$=U(75795);k.exports=function(k,B,U){if(!k||"object"!=typeof k&&"function"!=typeof k)throw new j("`obj` must be an object or a function`");if("string"!=typeof B&&"symbol"!=typeof B)throw new j("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new j("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new j("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new j("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new j("`loose`, if provided, must be a boolean");var H=arguments.length>3?arguments[3]:null,V=arguments.length>4?arguments[4]:null,W=arguments.length>5?arguments[5]:null,q=arguments.length>6&&arguments[6],K=!!$&&$(k,B);if(F)F(k,B,{configurable:null===W&&K?K.configurable:!W,enumerable:null===H&&K?K.enumerable:!H,value:U,writable:null===V&&K?K.writable:!V});else{if(!q&&(H||V||W))throw new G("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");k[B]=U}}},7176:(k,B,U)=>{"use strict";var F,G=U(73126),j=U(75795);try{F=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var $=!!F&&j&&j(Object.prototype,"__proto__"),H=Object,V=H.getPrototypeOf;k.exports=$&&"function"==typeof $.get?G([$.get]):"function"==typeof V&&function(k){return V(null==k?k:H(k))}},66570:k=>{"use strict";function B(k,B,j){j=j||2;var $,H,V,K,Y,Q,X,Z=B&&B.length,J=Z?B[0]*j:k.length,tt=U(k,0,J,j,!0),et=[];if(!tt||tt.next===tt.prev)return et;if(Z&&(tt=function(k,B,G,j){var $,H,V,K=[];for($=0,H=B.length;$80*j){$=V=k[0],H=K=k[1];for(var it=j;itV&&(V=Y),Q>K&&(K=Q);X=0!==(X=Math.max(V-$,K-H))?1/X:0}return G(tt,et,j,$,H,X),et}function U(k,B,U,F,G){var j,$;if(G===at(k,B,U,F)>0)for(j=B;j=B;j-=F)$=it(j,k[j],k[j+1],$);return $&&Z($,$.next)&&(st($),$=$.next),$}function F(k,B){if(!k)return k;B||(B=k);var U,F=k;do{if(U=!1,F.steiner||!Z(F,F.next)&&0!==X(F.prev,F,F.next))F=F.next;else{if(st(F),(F=B=F.prev)===F.next)break;U=!0}}while(U||F!==B);return B}function G(k,B,U,W,q,z,Y){if(k){!Y&&z&&function(k,B,U,F){var G=k;do{null===G.z&&(G.z=K(G.x,G.y,B,U,F)),G.prevZ=G.prev,G.nextZ=G.next,G=G.next}while(G!==k);G.prevZ.nextZ=null,G.prevZ=null,function(k){var B,U,F,G,j,$,H,V,W=1;do{for(U=k,k=null,j=null,$=0;U;){for($++,F=U,H=0,B=0;B0||V>0&&F;)0!==H&&(0===V||!F||U.z<=F.z)?(G=U,U=U.nextZ,H--):(G=F,F=F.nextZ,V--),j?j.nextZ=G:k=G,G.prevZ=j,j=G;U=F}j.nextZ=null,W*=2}while($>1)}(G)}(k,W,q,z);for(var Q,X,Z=k;k.prev!==k.next;)if(Q=k.prev,X=k.next,z?$(k,W,q,z):j(k))B.push(Q.i/U),B.push(k.i/U),B.push(X.i/U),st(k),k=X.next,Z=X.next;else if((k=X)===Z){Y?1===Y?G(k=H(k,B,U),B,U,W,q,z,2):2===Y&&V(k,B,U,W,q,z):G(F(k),B,U,W,q,z,1);break}}}function j(k){var B=k.prev,U=k,F=k.next;if(X(B,U,F)>=0)return!1;for(var G=k.next.next;G!==k.prev;){if(Y(B.x,B.y,U.x,U.y,F.x,F.y,G.x,G.y)&&X(G.prev,G,G.next)>=0)return!1;G=G.next}return!0}function $(k,B,U,F){var G=k.prev,j=k,$=k.next;if(X(G,j,$)>=0)return!1;for(var H=G.xj.x?G.x>$.x?G.x:$.x:j.x>$.x?j.x:$.x,q=G.y>j.y?G.y>$.y?G.y:$.y:j.y>$.y?j.y:$.y,z=K(H,V,B,U,F),Q=K(W,q,B,U,F),Z=k.prevZ,J=k.nextZ;Z&&Z.z>=z&&J&&J.z<=Q;){if(Z!==k.prev&&Z!==k.next&&Y(G.x,G.y,j.x,j.y,$.x,$.y,Z.x,Z.y)&&X(Z.prev,Z,Z.next)>=0)return!1;if(Z=Z.prevZ,J!==k.prev&&J!==k.next&&Y(G.x,G.y,j.x,j.y,$.x,$.y,J.x,J.y)&&X(J.prev,J,J.next)>=0)return!1;J=J.nextZ}for(;Z&&Z.z>=z;){if(Z!==k.prev&&Z!==k.next&&Y(G.x,G.y,j.x,j.y,$.x,$.y,Z.x,Z.y)&&X(Z.prev,Z,Z.next)>=0)return!1;Z=Z.prevZ}for(;J&&J.z<=Q;){if(J!==k.prev&&J!==k.next&&Y(G.x,G.y,j.x,j.y,$.x,$.y,J.x,J.y)&&X(J.prev,J,J.next)>=0)return!1;J=J.nextZ}return!0}function H(k,B,U){var F=k;do{var G=F.prev,j=F.next.next;!Z(G,j)&&J(G,F,F.next,j)&&tt(G,j)&&tt(j,G)&&(B.push(G.i/U),B.push(F.i/U),B.push(j.i/U),st(F),st(F.next),F=k=j),F=F.next}while(F!==k);return F}function V(k,B,U,j,$,H){var V=k;do{for(var W=V.next.next;W!==V.prev;){if(V.i!==W.i&&Q(V,W)){var q=et(V,W);return V=F(V,V.next),q=F(q,q.next),G(V,B,U,j,$,H),void G(q,B,U,j,$,H)}W=W.next}V=V.next}while(V!==k)}function W(k,B){return k.x-B.x}function q(k,B){if(B=function(k,B){var U,F=B,G=k.x,j=k.y,$=-1/0;do{if(j<=F.y&&j>=F.next.y&&F.next.y!==F.y){var H=F.x+(j-F.y)*(F.next.x-F.x)/(F.next.y-F.y);if(H<=G&&H>$){if($=H,H===G){if(j===F.y)return F;if(j===F.next.y)return F.next}U=F.x=F.x&&F.x>=q&&G!==F.x&&Y(jU.x)&&tt(F,k)&&(U=F,z=V),F=F.next;return U}(k,B)){var U=et(B,k);F(U,U.next)}}function K(k,B,U,F,G){return(k=1431655765&((k=858993459&((k=252645135&((k=16711935&((k=32767*(k-U)*G)|k<<8))|k<<4))|k<<2))|k<<1))|(B=1431655765&((B=858993459&((B=252645135&((B=16711935&((B=32767*(B-F)*G)|B<<8))|B<<4))|B<<2))|B<<1))<<1}function z(k){var B=k,U=k;do{(B.x=0&&(k-$)*(F-H)-(U-$)*(B-H)>=0&&(U-$)*(j-H)-(G-$)*(F-H)>=0}function Q(k,B){return k.next.i!==B.i&&k.prev.i!==B.i&&!function(k,B){var U=k;do{if(U.i!==k.i&&U.next.i!==k.i&&U.i!==B.i&&U.next.i!==B.i&&J(U,U.next,k,B))return!0;U=U.next}while(U!==k);return!1}(k,B)&&tt(k,B)&&tt(B,k)&&function(k,B){var U=k,F=!1,G=(k.x+B.x)/2,j=(k.y+B.y)/2;do{U.y>j!=U.next.y>j&&U.next.y!==U.y&&G<(U.next.x-U.x)*(j-U.y)/(U.next.y-U.y)+U.x&&(F=!F),U=U.next}while(U!==k);return F}(k,B)}function X(k,B,U){return(B.y-k.y)*(U.x-B.x)-(B.x-k.x)*(U.y-B.y)}function Z(k,B){return k.x===B.x&&k.y===B.y}function J(k,B,U,F){return!!(Z(k,B)&&Z(U,F)||Z(k,F)&&Z(U,B))||X(k,B,U)>0!=X(k,B,F)>0&&X(U,F,k)>0!=X(U,F,B)>0}function tt(k,B){return X(k.prev,k,k.next)<0?X(k,B,k.next)>=0&&X(k,k.prev,B)>=0:X(k,B,k.prev)<0||X(k,k.next,B)<0}function et(k,B){var U=new nt(k.i,k.x,k.y),F=new nt(B.i,B.x,B.y),G=k.next,j=B.prev;return k.next=B,B.prev=k,U.next=G,G.prev=U,F.next=U,U.prev=F,j.next=F,F.prev=j,F}function it(k,B,U,F){var G=new nt(k,B,U);return F?(G.next=F.next,G.prev=F,F.next.prev=G,F.next=G):(G.prev=G,G.next=G),G}function st(k){k.next.prev=k.prev,k.prev.next=k.next,k.prevZ&&(k.prevZ.nextZ=k.nextZ),k.nextZ&&(k.nextZ.prevZ=k.prevZ)}function nt(k,B,U){this.i=k,this.x=B,this.y=U,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function at(k,B,U,F){for(var G=0,j=B,$=U-F;j0&&(F+=k[G-1].length,U.holes.push(F))}return U}},14263:function(k,B,U){var F,G,j;!function($,H){"use strict";G=[U(40343)],void 0===(j="function"==typeof(F=function(k){var B=/(^|@)\S+:\d+/,U=/^\s*at .*(\S+:\d+|\(native\))/m,F=/^(eval@)?(\[native code])?$/;return{parse:function(k){if(void 0!==k.stacktrace||void 0!==k["opera#sourceloc"])return this.parseOpera(k);if(k.stack&&k.stack.match(U))return this.parseV8OrIE(k);if(k.stack)return this.parseFFOrSafari(k);throw new Error("Cannot parse given Error object")},extractLocation:function(k){if(-1===k.indexOf(":"))return[k];var B=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(k.replace(/[()]/g,""));return[B[1],B[2]||void 0,B[3]||void 0]},parseV8OrIE:function(B){return B.stack.split("\n").filter((function(k){return!!k.match(U)}),this).map((function(B){B.indexOf("(eval ")>-1&&(B=B.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var U=B.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),F=U.match(/ (\(.+\)$)/);U=F?U.replace(F[0],""):U;var G=this.extractLocation(F?F[1]:U),j=F&&U||void 0,$=["eval",""].indexOf(G[0])>-1?void 0:G[0];return new k({functionName:j,fileName:$,lineNumber:G[1],columnNumber:G[2],source:B})}),this)},parseFFOrSafari:function(B){return B.stack.split("\n").filter((function(k){return!k.match(F)}),this).map((function(B){if(B.indexOf(" > eval")>-1&&(B=B.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===B.indexOf("@")&&-1===B.indexOf(":"))return new k({functionName:B});var U=/((.*".+"[^@]*)?[^@]*)(?:@)/,F=B.match(U),G=F&&F[1]?F[1]:void 0,j=this.extractLocation(B.replace(U,""));return new k({functionName:G,fileName:j[0],lineNumber:j[1],columnNumber:j[2],source:B})}),this)},parseOpera:function(k){return!k.stacktrace||k.message.indexOf("\n")>-1&&k.message.split("\n").length>k.stacktrace.split("\n").length?this.parseOpera9(k):k.stack?this.parseOpera11(k):this.parseOpera10(k)},parseOpera9:function(B){for(var U=/Line (\d+).*script (?:in )?(\S+)/i,F=B.message.split("\n"),G=[],j=2,$=F.length;j<$;j+=2){var H=U.exec(F[j]);H&&G.push(new k({fileName:H[2],lineNumber:H[1],source:F[j]}))}return G},parseOpera10:function(B){for(var U=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,F=B.stacktrace.split("\n"),G=[],j=0,$=F.length;j<$;j+=2){var H=U.exec(F[j]);H&&G.push(new k({functionName:H[3]||void 0,fileName:H[2],lineNumber:H[1],source:F[j]}))}return G},parseOpera11:function(U){return U.stack.split("\n").filter((function(k){return!!k.match(B)&&!k.match(/^Error created at/)}),this).map((function(B){var U,F=B.split("@"),G=this.extractLocation(F.pop()),j=F.shift()||"",$=j.replace(//,"$2").replace(/\([^)]*\)/g,"")||void 0;j.match(/\(([^)]*)\)/)&&(U=j.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var H=void 0===U||"[arguments not available]"===U?void 0:U.split(",");return new k({functionName:$,args:H,fileName:G[0],lineNumber:G[1],columnNumber:G[2],source:B})}),this)}}})?F.apply(B,G):F)||(k.exports=j)}()},30655:k=>{"use strict";var B=Object.defineProperty||!1;if(B)try{B({},"a",{value:1})}catch(e){B=!1}k.exports=B},41237:k=>{"use strict";k.exports=EvalError},69383:k=>{"use strict";k.exports=Error},79290:k=>{"use strict";k.exports=RangeError},79538:k=>{"use strict";k.exports=ReferenceError},58068:k=>{"use strict";k.exports=SyntaxError},69675:k=>{"use strict";k.exports=TypeError},35345:k=>{"use strict";k.exports=URIError},79612:k=>{"use strict";k.exports=Object},30228:k=>{"use strict";var B=Object.prototype.hasOwnProperty,U="~";function F(){}function G(k,B,U){this.fn=k,this.context=B,this.once=U||!1}function j(k,B,F,j,$){if("function"!=typeof F)throw new TypeError("The listener must be a function");var H=new G(F,j||k,$),V=U?U+B:B;return k._events[V]?k._events[V].fn?k._events[V]=[k._events[V],H]:k._events[V].push(H):(k._events[V]=H,k._eventsCount++),k}function $(k,B){0==--k._eventsCount?k._events=new F:delete k._events[B]}function H(){this._events=new F,this._eventsCount=0}Object.create&&(F.prototype=Object.create(null),(new F).__proto__||(U=!1)),H.prototype.eventNames=function(){var k,F,G=[];if(0===this._eventsCount)return G;for(F in k=this._events)B.call(k,F)&&G.push(U?F.slice(1):F);return Object.getOwnPropertySymbols?G.concat(Object.getOwnPropertySymbols(k)):G},H.prototype.listeners=function(k){var B=U?U+k:k,F=this._events[B];if(!F)return[];if(F.fn)return[F.fn];for(var G=0,j=F.length,$=new Array(j);G{"use strict";var F=U(69600),G=Object.prototype.toString,j=Object.prototype.hasOwnProperty,$=function(k,B,U){for(var F=0,G=k.length;F=3&&(G=U),W(k)?$(k,B,G):"string"==typeof k?H(k,B,G):V(k,B,G)}},89353:k=>{"use strict";var B="Function.prototype.bind called on incompatible ",U=Object.prototype.toString,F=Math.max,G="[object Function]",j=function(k,B){for(var U=[],F=0;F{"use strict";var F=U(89353);k.exports=Function.prototype.bind||F},70453:(k,B,U)=>{"use strict";var F,G=U(79612),j=U(69383),$=U(41237),H=U(79290),V=U(79538),W=U(58068),q=U(69675),K=U(35345),z=U(71514),Y=U(58968),Q=U(6188),X=U(68002),Z=U(75880),J=U(70414),tt=U(73093),et=Function,it=function(k){try{return et('"use strict"; return ('+k+").constructor;")()}catch(e){}},st=U(75795),nt=U(30655),at=function(){throw new q},rt=st?function(){try{return at}catch(k){try{return st(arguments,"callee").get}catch(B){return at}}}():at,ot=U(64039)(),ht=U(93628),ct=U(71064),dt=U(48648),lt=U(11002),ut=U(10076),ft={},bt="undefined"!=typeof Uint8Array&&ht?ht(Uint8Array):F,pt={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?F:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?F:ArrayBuffer,"%ArrayIteratorPrototype%":ot&&ht?ht([][Symbol.iterator]()):F,"%AsyncFromSyncIteratorPrototype%":F,"%AsyncFunction%":ft,"%AsyncGenerator%":ft,"%AsyncGeneratorFunction%":ft,"%AsyncIteratorPrototype%":ft,"%Atomics%":"undefined"==typeof Atomics?F:Atomics,"%BigInt%":"undefined"==typeof BigInt?F:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?F:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?F:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?F:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":j,"%eval%":eval,"%EvalError%":$,"%Float16Array%":"undefined"==typeof Float16Array?F:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?F:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?F:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?F:FinalizationRegistry,"%Function%":et,"%GeneratorFunction%":ft,"%Int8Array%":"undefined"==typeof Int8Array?F:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?F:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?F:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ot&&ht?ht(ht([][Symbol.iterator]())):F,"%JSON%":"object"==typeof JSON?JSON:F,"%Map%":"undefined"==typeof Map?F:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&ot&&ht?ht((new Map)[Symbol.iterator]()):F,"%Math%":Math,"%Number%":Number,"%Object%":G,"%Object.getOwnPropertyDescriptor%":st,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?F:Promise,"%Proxy%":"undefined"==typeof Proxy?F:Proxy,"%RangeError%":H,"%ReferenceError%":V,"%Reflect%":"undefined"==typeof Reflect?F:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?F:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&ot&&ht?ht((new Set)[Symbol.iterator]()):F,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?F:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ot&&ht?ht(""[Symbol.iterator]()):F,"%Symbol%":ot?Symbol:F,"%SyntaxError%":W,"%ThrowTypeError%":rt,"%TypedArray%":bt,"%TypeError%":q,"%Uint8Array%":"undefined"==typeof Uint8Array?F:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?F:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?F:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?F:Uint32Array,"%URIError%":K,"%WeakMap%":"undefined"==typeof WeakMap?F:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?F:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?F:WeakSet,"%Function.prototype.call%":ut,"%Function.prototype.apply%":lt,"%Object.defineProperty%":nt,"%Object.getPrototypeOf%":ct,"%Math.abs%":z,"%Math.floor%":Y,"%Math.max%":Q,"%Math.min%":X,"%Math.pow%":Z,"%Math.round%":J,"%Math.sign%":tt,"%Reflect.getPrototypeOf%":dt};if(ht)try{null.error}catch(e){var vt=ht(ht(e));pt["%Error.prototype%"]=vt}var gt=function k(B){var U;if("%AsyncFunction%"===B)U=it("async function () {}");else if("%GeneratorFunction%"===B)U=it("function* () {}");else if("%AsyncGeneratorFunction%"===B)U=it("async function* () {}");else if("%AsyncGenerator%"===B){var F=k("%AsyncGeneratorFunction%");F&&(U=F.prototype)}else if("%AsyncIteratorPrototype%"===B){var G=k("%AsyncGenerator%");G&&ht&&(U=ht(G.prototype))}return pt[B]=U,U},mt={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},yt=U(66743),_t=U(9957),Et=yt.call(ut,Array.prototype.concat),wt=yt.call(lt,Array.prototype.splice),Tt=yt.call(ut,String.prototype.replace),St=yt.call(ut,String.prototype.slice),At=yt.call(ut,RegExp.prototype.exec),Ct=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ot=/\\(\\)?/g,It=function(k){var B=St(k,0,1),U=St(k,-1);if("%"===B&&"%"!==U)throw new W("invalid intrinsic syntax, expected closing `%`");if("%"===U&&"%"!==B)throw new W("invalid intrinsic syntax, expected opening `%`");var F=[];return Tt(k,Ct,(function(k,B,U,G){F[F.length]=U?Tt(G,Ot,"$1"):B||k})),F},Dt=function(k,B){var U,F=k;if(_t(mt,F)&&(F="%"+(U=mt[F])[0]+"%"),_t(pt,F)){var G=pt[F];if(G===ft&&(G=gt(F)),void 0===G&&!B)throw new q("intrinsic "+k+" exists, but is not available. Please file an issue!");return{alias:U,name:F,value:G}}throw new W("intrinsic "+k+" does not exist!")};k.exports=function(k,B){if("string"!=typeof k||0===k.length)throw new q("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof B)throw new q('"allowMissing" argument must be a boolean');if(null===At(/^%?[^%]*%?$/,k))throw new W("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var U=It(k),F=U.length>0?U[0]:"",G=Dt("%"+F+"%",B),j=G.name,$=G.value,H=!1,V=G.alias;V&&(F=V[0],wt(U,Et([0,1],V)));for(var K=1,z=!0;K=U.length){var Z=st($,Y);$=(z=!!Z)&&"get"in Z&&!("originalValue"in Z.get)?Z.get:$[Y]}else z=_t($,Y),$=$[Y];z&&!H&&(pt[j]=$)}}return $}},71064:(k,B,U)=>{"use strict";var F=U(79612);k.exports=F.getPrototypeOf||null},48648:k=>{"use strict";k.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},93628:(k,B,U)=>{"use strict";var F=U(48648),G=U(71064),j=U(7176);k.exports=F?function(k){return F(k)}:G?function(k){if(!k||"object"!=typeof k&&"function"!=typeof k)throw new TypeError("getProto: not an object");return G(k)}:j?function(k){return j(k)}:null},6549:k=>{"use strict";k.exports=Object.getOwnPropertyDescriptor},75795:(k,B,U)=>{"use strict";var F=U(6549);if(F)try{F([],"length")}catch(e){F=null}k.exports=F},85880:(k,B,U)=>{"use strict";function F(k){if(void 0===k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function G(k,B){k.prototype=Object.create(B.prototype),k.prototype.constructor=k,k.__proto__=B}U.d(B,{os:()=>Pn});var j,$,H,V,W,q,K,z,Y,Q,X,Z,J,tt,et,it={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},st={duration:.5,overwrite:!1,delay:0},nt=1e8,at=1e-8,rt=2*Math.PI,ot=rt/4,ht=0,ct=Math.sqrt,dt=Math.cos,lt=Math.sin,ut=function(k){return"string"==typeof k},ft=function(k){return"function"==typeof k},bt=function(k){return"number"==typeof k},pt=function(k){return void 0===k},vt=function(k){return"object"==typeof k},gt=function(k){return!1!==k},mt=function(){return"undefined"!=typeof window},yt=function(k){return ft(k)||ut(k)},_t="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},Et=Array.isArray,wt=/(?:-?\.?\d|\.)+/gi,Tt=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,St=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,At=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Ct=/[+-]=-?[.\d]+/,Ot=/[^,'"\[\]\s]+/gi,It=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Dt={},Rt={},Pt=function(k){return(Rt=re(k,Dt))&&hs},Mt=function(k,B){return console.warn("Invalid property",k,"set to",B,"Missing plugin? gsap.registerPlugin()")},Nt=function(k,B){return!B&&console.warn(k)},xt=function(k,B){return k&&(Dt[k]=B)&&Rt&&(Rt[k]=B)||Dt},Lt=function(){return 0},kt={suppressEvents:!0,isStart:!0,kill:!1},Bt={suppressEvents:!0,kill:!1},Ut={suppressEvents:!0},Ft={},Gt=[],jt={},$t={},Ht={},Vt=30,Wt=[],qt="",Kt=function(k){var B,U,F=k[0];if(vt(F)||ft(F)||(k=[k]),!(B=(F._gsap||{}).harness)){for(U=Wt.length;U--&&!Wt[U].targetTest(F););B=Wt[U]}for(U=k.length;U--;)k[U]&&(k[U]._gsap||(k[U]._gsap=new wi(k[U],B)))||k.splice(U,1);return k},zt=function(k){return k._gsap||Kt(Fe(k))[0]._gsap},Yt=function(k,B,U){return(U=k[B])&&ft(U)?k[B]():pt(U)&&k.getAttribute&&k.getAttribute(B)||U},Qt=function(k,B){return(k=k.split(",")).forEach(B)||k},Xt=function(k){return Math.round(1e5*k)/1e5||0},Zt=function(k){return Math.round(1e7*k)/1e7||0},Jt=function(k,B){var U=B.charAt(0),F=parseFloat(B.substr(2));return k=parseFloat(k),"+"===U?k+F:"-"===U?k-F:"*"===U?k*F:k/F},te=function(k,B){for(var U=B.length,F=0;k.indexOf(B[F])<0&&++Fj;)$=$._prev;return $?(B._next=$._next,$._next=B):(B._next=k[U],k[U]=B),B._next?B._next._prev=B:k[F]=B,B._prev=$,B.parent=B._dp=k,B},le=function(k,B,U,F){void 0===U&&(U="_first"),void 0===F&&(F="_last");var G=B._prev,j=B._next;G?G._next=j:k[U]===B&&(k[U]=j),j?j._prev=G:k[F]===B&&(k[F]=G),B._next=B._prev=B.parent=null},ue=function(k,B){k.parent&&(!B||k.parent.autoRemoveChildren)&&k.parent.remove&&k.parent.remove(k),k._act=0},fe=function(k,B){if(k&&(!B||B._end>k._dur||B._start<0))for(var U=k;U;)U._dirty=1,U=U.parent;return k},be=function(k){for(var B=k.parent;B&&B.parent;)B._dirty=1,B.totalDuration(),B=B.parent;return k},pe=function(k,B,U,F){return k._startAt&&($?k._startAt.revert(Bt):k.vars.immediateRender&&!k.vars.autoRevert||k._startAt.render(B,!0,F))},ve=function k(B){return!B||B._ts&&k(B.parent)},ge=function(k){return k._repeat?me(k._tTime,k=k.duration()+k._rDelay)*k:0},me=function(k,B){var U=Math.floor(k/=B);return k&&U===k?U-1:U},ye=function(k,B){return(k-B._start)*B._ts+(B._ts>=0?0:B._dirty?B.totalDuration():B._tDur)},_e=function(k){return k._end=Zt(k._start+(k._tDur/Math.abs(k._ts||k._rts||at)||0))},Ee=function(k,B){var U=k._dp;return U&&U.smoothChildTiming&&k._ts&&(k._start=Zt(U._time-(k._ts>0?B/k._ts:((k._dirty?k.totalDuration():k._tDur)-B)/-k._ts)),_e(k),U._dirty||fe(U,k)),k},we=function(k,B){var U;if((B._time||!B._dur&&B._initted||B._startat)&&B.render(U,!0)),fe(k,B)._dp&&k._initted&&k._time>=k._dur&&k._ts){if(k._dur=0&&U.totalTime(U._tTime),U=U._dp;k._zTime=-1e-8}},Te=function(k,B,U,F){return B.parent&&ue(B),B._start=Zt((bt(U)?U:U||k!==V?Pe(k,U,B):k._time)+B._delay),B._end=Zt(B._start+(B.totalDuration()/Math.abs(B.timeScale())||0)),de(k,B,"_first","_last",k._sort?"_start":0),Oe(B)||(k._recent=B),F||we(k,B),k._ts<0&&Ee(k,k._tTime),k},Se=function(k,B){return(Dt.ScrollTrigger||Mt("scrollTrigger",B))&&Dt.ScrollTrigger.create(B,k)},Ae=function(k,B,U,F,G){return Ri(k,B,G),k._initted?!U&&k._pt&&!$&&(k._dur&&!1!==k.vars.lazy||!k._dur&&k.vars.lazy)&&Y!==ci.frame?(Gt.push(k),k._lazy=[G,F],1):void 0:1},Ce=function k(B){var U=B.parent;return U&&U._ts&&U._initted&&!U._lock&&(U.rawTime()<0||k(U))},Oe=function(k){var B=k.data;return"isFromStart"===B||"isStart"===B},Ie=function(k,B,U,F){var G=k._repeat,j=Zt(B)||0,$=k._tTime/k._tDur;return $&&!F&&(k._time*=j/k._dur),k._dur=j,k._tDur=G?G<0?1e10:Zt(j*(G+1)+k._rDelay*G):j,$>0&&!F&&Ee(k,k._tTime=k._tDur*$),k.parent&&_e(k),U||fe(k.parent,k),k},De=function(k){return k instanceof Si?fe(k):Ie(k,k._dur)},Re={_start:0,endTime:Lt,totalDuration:Lt},Pe=function k(B,U,F){var G,j,$,H=B.labels,V=B._recent||Re,W=B.duration()>=nt?V.endTime(!1):B._dur;return ut(U)&&(isNaN(U)||U in H)?(j=U.charAt(0),$="%"===U.substr(-1),G=U.indexOf("="),"<"===j||">"===j?(G>=0&&(U=U.replace(/=/,"")),("<"===j?V._start:V.endTime(V._repeat>=0))+(parseFloat(U.substr(1))||0)*($?(G<0?V:F).totalDuration()/100:1)):G<0?(U in H||(H[U]=W),H[U]):(j=parseFloat(U.charAt(G-1)+U.substr(G+1)),$&&F&&(j=j/100*(Et(F)?F[0]:F).totalDuration()),G>1?k(B,U.substr(0,G-1),F)+j:W+j)):null==U?W:+U},Me=function(k,B,U){var F,G,j=bt(B[1]),$=(j?2:1)+(k<2?0:1),H=B[$];if(j&&(H.duration=B[1]),H.parent=U,k){for(F=H,G=U;G&&!("immediateRender"in F);)F=G.vars.defaults||{},G=gt(G.vars.inherit)&&G.parent;H.immediateRender=gt(F.immediateRender),k<2?H.runBackwards=1:H.startAt=B[$-1]}return new Li(B[0],H,B[$+1])},Ne=function(k,B){return k||0===k?B(k):B},xe=function(k,B,U){return UB?B:U},Le=function(k,B){return ut(k)&&(B=It.exec(k))?B[1]:""},ke=[].slice,Be=function(k,B){return k&&vt(k)&&"length"in k&&(!B&&!k.length||k.length-1 in k&&vt(k[0]))&&!k.nodeType&&k!==W},Ue=function(k,B,U){return void 0===U&&(U=[]),k.forEach((function(k){var F;return ut(k)&&!B||Be(k,1)?(F=U).push.apply(F,Fe(k)):U.push(k)}))||U},Fe=function(k,B,U){return H&&!B&&H.selector?H.selector(k):!ut(k)||U||!q&&di()?Et(k)?Ue(k,U):Be(k)?ke.call(k,0):k?[k]:[]:ke.call((B||K).querySelectorAll(k),0)},Ge=function(k){return k=Fe(k)[0]||Nt("Invalid scope")||{},function(B){var U=k.current||k.nativeElement||k;return Fe(B,U.querySelectorAll?U:U===k?Nt("Invalid scope")||K.createElement("div"):k)}},je=function(k){return k.sort((function(){return.5-Math.random()}))},$e=function(k){if(ft(k))return k;var B=vt(k)?k:{each:k},U=gi(B.ease),F=B.from||0,G=parseFloat(B.base)||0,j={},$=F>0&&F<1,H=isNaN(F)||$,V=B.axis,W=F,q=F;return ut(F)?W=q={center:.5,edges:.5,end:1}[F]||0:!$&&H&&(W=F[0],q=F[1]),function(k,$,K){var z,Y,Q,X,Z,J,tt,et,it,st=(K||B).length,at=j[st];if(!at){if(!(it="auto"===B.grid?0:(B.grid||[1,nt])[1])){for(tt=-nt;tt<(tt=K[it++].getBoundingClientRect().left)&&ittt&&(tt=Z),Zst?st-1:V?"y"===V?st/it:it:Math.max(it,st/it))||0)*("edges"===F?-1:1),at.b=st<0?G-st:G,at.u=Le(B.amount||B.each)||0,U=U&&st<0?pi(U):U}return st=(at[k]-at.min)/at.max||0,Zt(at.b+(U?U(st):st)*at.v)+at.u}},He=function(k){var B=Math.pow(10,((k+"").split(".")[1]||"").length);return function(U){var F=Zt(Math.round(parseFloat(U)/k)*k*B);return(F-F%1)/B+(bt(U)?0:Le(U))}},Ve=function(k,B){var U,F,G=Et(k);return!G&&vt(k)&&(U=G=k.radius||nt,k.values?(k=Fe(k.values),(F=!bt(k[0]))&&(U*=U)):k=He(k.increment)),Ne(B,G?ft(k)?function(B){return F=k(B),Math.abs(F-B)<=U?F:B}:function(B){for(var G,j,$=parseFloat(F?B.x:B),H=parseFloat(F?B.y:0),V=nt,W=0,q=k.length;q--;)(G=F?(G=k[q].x-$)*G+(j=k[q].y-H)*j:Math.abs(k[q]-$))(G=Math.abs(G))&&(j=F,H=G);return j},Qe=function(k,B,U){var F,G,j,$=k.vars,V=$[B],W=H,q=k._ctx;if(V)return F=$[B+"Params"],G=$.callbackScope||k,U&&Gt.length&&ee(),q&&(H=q),j=F?V.apply(G,F):V.call(G),H=W,j},Xe=function(k){return ue(k),k.scrollTrigger&&k.scrollTrigger.kill(!!$),k.progress()<1&&Qe(k,"onInterrupt"),k},Ze=[],Je=function(k){if(k)if(k=!k.name&&k.default||k,mt()||k.headless){var B=k.name,U=ft(k),F=B&&!U&&k.init?function(){this._props=[]}:k,G={init:Lt,render:Vi,add:Ii,kill:qi,modifier:Wi,rawVars:0},j={targetTest:0,get:0,getSetter:Gi,aliases:{},register:0};if(di(),k!==F){if($t[B])return;ae(F,ae(he(k,G),j)),re(F.prototype,re(G,he(k,j))),$t[F.prop=B]=F,k.targetTest&&(Wt.push(F),Ft[B]=1),B=("css"===B?"CSS":B.charAt(0).toUpperCase()+B.substr(1))+"Plugin"}xt(B,F),k.register&&k.register(hs,F,Yi)}else Ze.push(k)},ti=255,ei={aqua:[0,ti,ti],lime:[0,ti,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,ti],navy:[0,0,128],white:[ti,ti,ti],olive:[128,128,0],yellow:[ti,ti,0],orange:[ti,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[ti,0,0],pink:[ti,192,203],cyan:[0,ti,ti],transparent:[ti,ti,ti,0]},ii=function(k,B,U){return(6*(k+=k<0?1:k>1?-1:0)<1?B+(U-B)*k*6:k<.5?U:3*k<2?B+(U-B)*(2/3-k)*6:B)*ti+.5|0},si=function(k,B,U){var F,G,j,$,H,V,W,q,K,z,Y=k?bt(k)?[k>>16,k>>8&ti,k&ti]:0:ei.black;if(!Y){if(","===k.substr(-1)&&(k=k.substr(0,k.length-1)),ei[k])Y=ei[k];else if("#"===k.charAt(0)){if(k.length<6&&(F=k.charAt(1),G=k.charAt(2),j=k.charAt(3),k="#"+F+F+G+G+j+j+(5===k.length?k.charAt(4)+k.charAt(4):"")),9===k.length)return[(Y=parseInt(k.substr(1,6),16))>>16,Y>>8&ti,Y&ti,parseInt(k.substr(7),16)/255];Y=[(k=parseInt(k.substr(1),16))>>16,k>>8&ti,k&ti]}else if("hsl"===k.substr(0,3))if(Y=z=k.match(wt),B){if(~k.indexOf("="))return Y=k.match(Tt),U&&Y.length<4&&(Y[3]=1),Y}else $=+Y[0]%360/360,H=+Y[1]/100,F=2*(V=+Y[2]/100)-(G=V<=.5?V*(H+1):V+H-V*H),Y.length>3&&(Y[3]*=1),Y[0]=ii($+1/3,F,G),Y[1]=ii($,F,G),Y[2]=ii($-1/3,F,G);else Y=k.match(wt)||ei.transparent;Y=Y.map(Number)}return B&&!z&&(F=Y[0]/ti,G=Y[1]/ti,j=Y[2]/ti,V=((W=Math.max(F,G,j))+(q=Math.min(F,G,j)))/2,W===q?$=H=0:(K=W-q,H=V>.5?K/(2-W-q):K/(W+q),$=W===F?(G-j)/K+(GH||et<0)&&(Y+=et-V),((q=(z=(Q+=et)-Y)-J)>0||it)&&(X=++F.frame,G=z-1e3*F.time,F.time=z/=1e3,J+=q+(q>=Z?4:Z-q),K=1),it||(k=B(U)),K)for(j=0;j=B&&j--},_listeners:tt}}(),di=function(){return!X&&ci.wake()},li={},ui=/^[\d.\-M][\d.\-,\s]/,fi=/["']/g,bi=function(k){for(var B,U,F,G={},j=k.substr(1,k.length-3).split(":"),$=j[0],H=1,V=j.length;H1&&$.config?$.config.apply(null,~k.indexOf("{")?[bi(j[1])]:(B=k,U=B.indexOf("(")+1,F=B.indexOf(")"),G=B.indexOf("(",U),B.substring(U,~G&&G=1?U:1,j=(F||(B?.3:.45))/(U<1?U:1),$=j/rt*(Math.asin(1/G)||0),H=function(k){return 1===k?1:G*Math.pow(2,-10*k)*lt((k-$)*j)+1},V="out"===B?H:"in"===B?function(k){return 1-H(1-k)}:yi(H);return j=rt/j,V.config=function(U,F){return k(B,U,F)},V},Ei=function k(B,U){void 0===U&&(U=1.70158);var F=function(k){return k?--k*k*((U+1)*k+U)+1:0},G="out"===B?F:"in"===B?function(k){return 1-F(1-k)}:yi(F);return G.config=function(U){return k(B,U)},G};Qt("Linear,Quad,Cubic,Quart,Quint,Strong",(function(k,B){var U=B<5?B+1:B;mi(k+",Power"+(U-1),B?function(k){return Math.pow(k,U)}:function(k){return k},(function(k){return 1-Math.pow(1-k,U)}),(function(k){return k<.5?Math.pow(2*k,U)/2:1-Math.pow(2*(1-k),U)/2}))})),li.Linear.easeNone=li.none=li.Linear.easeIn,mi("Elastic",_i("in"),_i("out"),_i()),Z=7.5625,tt=1/(J=2.75),mi("Bounce",(function(k){return 1-et(1-k)}),et=function(k){return k0?k+(k+this._rDelay)*this._repeat:k):this.totalDuration()&&this._dur},B.totalDuration=function(k){return arguments.length?(this._dirty=0,Ie(this,this._repeat<0?k:(k-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},B.totalTime=function(k,B){if(di(),!arguments.length)return this._tTime;var U=this._dp;if(U&&U.smoothChildTiming&&this._ts){for(Ee(this,k),!U._dp||U.parent||we(U,this);U&&U.parent;)U.parent._time!==U._start+(U._ts>=0?U._tTime/U._ts:(U.totalDuration()-U._tTime)/-U._ts)&&U.totalTime(U._tTime,!0),U=U.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&k0||!this._tDur&&!k)&&Te(this._dp,this,this._start-this._delay)}return(this._tTime!==k||!this._dur&&!B||this._initted&&Math.abs(this._zTime)===at||!k&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=k),ie(this,k,B)),this},B.time=function(k,B){return arguments.length?this.totalTime(Math.min(this.totalDuration(),k+ge(this))%(this._dur+this._rDelay)||(k?this._dur:0),B):this._time},B.totalProgress=function(k,B){return arguments.length?this.totalTime(this.totalDuration()*k,B):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>0?1:0},B.progress=function(k,B){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?k:1-k)+ge(this),B):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},B.iteration=function(k,B){var U=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(k-1)*U,B):this._repeat?me(this._tTime,U)+1:1},B.timeScale=function(k,B){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===k)return this;var U=this.parent&&this._ts?ye(this.parent._time,this):this._tTime;return this._rts=+k||0,this._ts=this._ps||-1e-8===k?0:this._rts,this.totalTime(xe(-Math.abs(this._delay),this._tDur,U),!1!==B),_e(this),be(this)},B.paused=function(k){return arguments.length?(this._ps!==k&&(this._ps=k,k?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(di(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==at&&(this._tTime-=at)))),this):this._ps},B.startTime=function(k){if(arguments.length){this._start=k;var B=this.parent||this._dp;return B&&(B._sort||!this.parent)&&Te(B,this,k-this._delay),this}return this._start},B.endTime=function(k){return this._start+(gt(k)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},B.rawTime=function(k){var B=this.parent||this._dp;return B?k&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?ye(B.rawTime(k),this):this._tTime:this._tTime},B.revert=function(k){void 0===k&&(k=Ut);var B=$;return $=k,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(k),this.totalTime(-.01,k.suppressEvents)),"nested"!==this.data&&!1!==k.kill&&this.kill(),$=B,this},B.globalTime=function(k){for(var B=this,U=arguments.length?k:B.rawTime();B;)U=B._start+U/(Math.abs(B._ts)||1),B=B._dp;return!this.parent&&this._sat?this._sat.globalTime(k):U},B.repeat=function(k){return arguments.length?(this._repeat=k===1/0?-2:k,De(this)):-2===this._repeat?1/0:this._repeat},B.repeatDelay=function(k){if(arguments.length){var B=this._time;return this._rDelay=k,De(this),B?this.time(B):this}return this._rDelay},B.yoyo=function(k){return arguments.length?(this._yoyo=k,this):this._yoyo},B.seek=function(k,B){return this.totalTime(Pe(this,k),gt(B))},B.restart=function(k,B){return this.play().totalTime(k?-this._delay:0,gt(B))},B.play=function(k,B){return null!=k&&this.seek(k,B),this.reversed(!1).paused(!1)},B.reverse=function(k,B){return null!=k&&this.seek(k||this.totalDuration(),B),this.reversed(!0).paused(!1)},B.pause=function(k,B){return null!=k&&this.seek(k,B),this.paused(!0)},B.resume=function(){return this.paused(!1)},B.reversed=function(k){return arguments.length?(!!k!==this.reversed()&&this.timeScale(-this._rts||(k?-1e-8:0)),this):this._rts<0},B.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},B.isActive=function(){var k,B=this.parent||this._dp,U=this._start;return!(B&&!(this._ts&&this._initted&&B.isActive()&&(k=B.rawTime(!0))>=U&&k1?(B?(F[k]=B,U&&(F[k+"Params"]=U),"onUpdate"===k&&(this._onUpdate=B)):delete F[k],this):F[k]},B.then=function(k){var B=this;return new Promise((function(U){var F=ft(k)?k:ne,G=function(){var k=B.then;B.then=null,ft(F)&&(F=F(B))&&(F.then||F===B)&&(B.then=k),U(F),B.then=k};B._initted&&1===B.totalProgress()&&B._ts>=0||!B._tTime&&B._ts<0?G():B._prom=G}))},B.kill=function(){Xe(this)},k}();ae(Ti.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-1e-8,_prom:0,_ps:!1,_rts:1});var Si=function(k){function B(B,U){var G;return void 0===B&&(B={}),(G=k.call(this,B)||this).labels={},G.smoothChildTiming=!!B.smoothChildTiming,G.autoRemoveChildren=!!B.autoRemoveChildren,G._sort=gt(B.sortChildren),V&&Te(B.parent||V,F(G),U),B.reversed&&G.reverse(),B.paused&&G.paused(!0),B.scrollTrigger&&Se(F(G),B.scrollTrigger),G}G(B,k);var U=B.prototype;return U.to=function(k,B,U){return Me(0,arguments,this),this},U.from=function(k,B,U){return Me(1,arguments,this),this},U.fromTo=function(k,B,U,F){return Me(2,arguments,this),this},U.set=function(k,B,U){return B.duration=0,B.parent=this,ce(B).repeatDelay||(B.repeat=0),B.immediateRender=!!B.immediateRender,new Li(k,B,Pe(this,U),1),this},U.call=function(k,B,U){return Te(this,Li.delayedCall(0,k,B),U)},U.staggerTo=function(k,B,U,F,G,j,$){return U.duration=B,U.stagger=U.stagger||F,U.onComplete=j,U.onCompleteParams=$,U.parent=this,new Li(k,U,Pe(this,G)),this},U.staggerFrom=function(k,B,U,F,G,j,$){return U.runBackwards=1,ce(U).immediateRender=gt(U.immediateRender),this.staggerTo(k,B,U,F,G,j,$)},U.staggerFromTo=function(k,B,U,F,G,j,$,H){return F.startAt=U,ce(F).immediateRender=gt(F.immediateRender),this.staggerTo(k,B,F,G,j,$,H)},U.render=function(k,B,U){var F,G,j,H,W,q,K,z,Y,Q,X,Z,J=this._time,tt=this._dirty?this.totalDuration():this._tDur,et=this._dur,it=k<=0?0:Zt(k),st=this._zTime<0!=k<0&&(this._initted||!et);if(this!==V&&it>tt&&k>=0&&(it=tt),it!==this._tTime||U||st){if(J!==this._time&&et&&(it+=this._time-J,k+=this._time-J),F=it,Y=this._start,q=!(z=this._ts),st&&(et||(J=this._zTime),(k||!B)&&(this._zTime=k)),this._repeat){if(X=this._yoyo,W=et+this._rDelay,this._repeat<-1&&k<0)return this.totalTime(100*W+k,B,U);if(F=Zt(it%W),it===tt?(H=this._repeat,F=et):((H=~~(it/W))&&H===it/W&&(F=et,H--),F>et&&(F=et)),Q=me(this._tTime,W),!J&&this._tTime&&Q!==H&&this._tTime-Q*W-this._dur<=0&&(Q=H),X&&1&H&&(F=et-F,Z=1),H!==Q&&!this._lock){var nt=X&&1&Q,rt=nt===(X&&1&H);if(HB)for(F=k._first;F&&F._start<=U;){if("isPause"===F.data&&F._start>B)return F;F=F._next}else for(F=k._last;F&&F._start>=U;){if("isPause"===F.data&&F._start=J&&k>=0)for(G=this._first;G;){if(j=G._next,(G._act||F>=G._start)&&G._ts&&K!==G){if(G.parent!==this)return this.render(k,B,U);if(G.render(G._ts>0?(F-G._start)*G._ts:(G._dirty?G.totalDuration():G._tDur)+(F-G._start)*G._ts,B,U),F!==this._time||!this._ts&&!q){K=0,j&&(it+=this._zTime=-1e-8);break}}G=j}else{G=this._last;for(var ot=k<0?k:F;G;){if(j=G._prev,(G._act||ot<=G._end)&&G._ts&&K!==G){if(G.parent!==this)return this.render(k,B,U);if(G.render(G._ts>0?(ot-G._start)*G._ts:(G._dirty?G.totalDuration():G._tDur)+(ot-G._start)*G._ts,B,U||$&&(G._initted||G._startAt)),F!==this._time||!this._ts&&!q){K=0,j&&(it+=this._zTime=ot?-1e-8:at);break}}G=j}}if(K&&!B&&(this.pause(),K.render(F>=J?0:-1e-8)._zTime=F>=J?1:-1,this._ts))return this._start=Y,_e(this),this.render(k,B,U);this._onUpdate&&!B&&Qe(this,"onUpdate",!0),(it===tt&&this._tTime>=this.totalDuration()||!it&&J)&&(Y!==this._start&&Math.abs(z)===Math.abs(this._ts)||this._lock||((k||!et)&&(it===tt&&this._ts>0||!it&&this._ts<0)&&ue(this,1),B||k<0&&!J||!it&&!J&&tt||(Qe(this,it===tt&&k>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(it0)&&this._prom())))}return this},U.add=function(k,B){var U=this;if(bt(B)||(B=Pe(this,B,k)),!(k instanceof Ti)){if(Et(k))return k.forEach((function(k){return U.add(k,B)})),this;if(ut(k))return this.addLabel(k,B);if(!ft(k))return this;k=Li.delayedCall(0,k)}return this!==k?Te(this,k,B):this},U.getChildren=function(k,B,U,F){void 0===k&&(k=!0),void 0===B&&(B=!0),void 0===U&&(U=!0),void 0===F&&(F=-nt);for(var G=[],j=this._first;j;)j._start>=F&&(j instanceof Li?B&&G.push(j):(U&&G.push(j),k&&G.push.apply(G,j.getChildren(!0,B,U)))),j=j._next;return G},U.getById=function(k){for(var B=this.getChildren(1,1,1),U=B.length;U--;)if(B[U].vars.id===k)return B[U]},U.remove=function(k){return ut(k)?this.removeLabel(k):ft(k)?this.killTweensOf(k):(le(this,k),k===this._recent&&(this._recent=this._last),fe(this))},U.totalTime=function(B,U){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Zt(ci.time-(this._ts>0?B/this._ts:(this.totalDuration()-B)/-this._ts))),k.prototype.totalTime.call(this,B,U),this._forcing=0,this):this._tTime},U.addLabel=function(k,B){return this.labels[k]=Pe(this,B),this},U.removeLabel=function(k){return delete this.labels[k],this},U.addPause=function(k,B,U){var F=Li.delayedCall(0,B||Lt,U);return F.data="isPause",this._hasPause=1,Te(this,F,Pe(this,k))},U.removePause=function(k){var B=this._first;for(k=Pe(this,k);B;)B._start===k&&"isPause"===B.data&&ue(B),B=B._next},U.killTweensOf=function(k,B,U){for(var F=this.getTweensOf(k,U),G=F.length;G--;)Ai!==F[G]&&F[G].kill(k,B);return this},U.getTweensOf=function(k,B){for(var U,F=[],G=Fe(k),j=this._first,$=bt(B);j;)j instanceof Li?te(j._targets,G)&&($?(!Ai||j._initted&&j._ts)&&j.globalTime(0)<=B&&j.globalTime(j.totalDuration())>B:!B||j.isActive())&&F.push(j):(U=j.getTweensOf(G,B)).length&&F.push.apply(F,U),j=j._next;return F},U.tweenTo=function(k,B){B=B||{};var U,F=this,G=Pe(F,k),j=B,$=j.startAt,H=j.onStart,V=j.onStartParams,W=j.immediateRender,q=Li.to(F,ae({ease:B.ease||"none",lazy:!1,immediateRender:!1,time:G,overwrite:"auto",duration:B.duration||Math.abs((G-($&&"time"in $?$.time:F._time))/F.timeScale())||at,onStart:function(){if(F.pause(),!U){var k=B.duration||Math.abs((G-($&&"time"in $?$.time:F._time))/F.timeScale());q._dur!==k&&Ie(q,k,0,1).render(q._time,!0,!0),U=1}H&&H.apply(q,V||[])}},B));return W?q.render(0):q},U.tweenFromTo=function(k,B,U){return this.tweenTo(B,ae({startAt:{time:Pe(this,k)}},U))},U.recent=function(){return this._recent},U.nextLabel=function(k){return void 0===k&&(k=this._time),Ye(this,Pe(this,k))},U.previousLabel=function(k){return void 0===k&&(k=this._time),Ye(this,Pe(this,k),1)},U.currentLabel=function(k){return arguments.length?this.seek(k,!0):this.previousLabel(this._time+at)},U.shiftChildren=function(k,B,U){void 0===U&&(U=0);for(var F,G=this._first,j=this.labels;G;)G._start>=U&&(G._start+=k,G._end+=k),G=G._next;if(B)for(F in j)j[F]>=U&&(j[F]+=k);return fe(this)},U.invalidate=function(B){var U=this._first;for(this._lock=0;U;)U.invalidate(B),U=U._next;return k.prototype.invalidate.call(this,B)},U.clear=function(k){void 0===k&&(k=!0);for(var B,U=this._first;U;)B=U._next,this.remove(U),U=B;return this._dp&&(this._time=this._tTime=this._pTime=0),k&&(this.labels={}),fe(this)},U.totalDuration=function(k){var B,U,F,G=0,j=this,$=j._last,H=nt;if(arguments.length)return j.timeScale((j._repeat<0?j.duration():j.totalDuration())/(j.reversed()?-k:k));if(j._dirty){for(F=j.parent;$;)B=$._prev,$._dirty&&$.totalDuration(),(U=$._start)>H&&j._sort&&$._ts&&!j._lock?(j._lock=1,Te(j,$,U-$._delay,1)._lock=0):H=U,U<0&&$._ts&&(G-=U,(!F&&!j._dp||F&&F.smoothChildTiming)&&(j._start+=U/j._ts,j._time-=U,j._tTime-=U),j.shiftChildren(-U,!1,-Infinity),H=0),$._end>G&&$._ts&&(G=$._end),$=B;Ie(j,j===V&&j._time>G?j._time:G,1,1),j._dirty=0}return j._tDur},B.updateRoot=function(k){if(V._ts&&(ie(V,ye(k,V)),Y=ci.frame),ci.frame>=Vt){Vt+=it.autoSleep||120;var B=V._first;if((!B||!B._ts)&&it.autoSleep&&ci._listeners.length<2){for(;B&&!B._ts;)B=B._next;B||ci.sleep()}}},B}(Ti);ae(Si.prototype,{_lock:0,_hasPause:0,_forcing:0});var Ai,Ci,Oi=function(k,B,U,F,G,j,$){var H,V,W,q,K,z,Y,Q,X=new Yi(this._pt,k,B,0,1,Hi,null,G),Z=0,J=0;for(X.b=U,X.e=F,U+="",(Y=~(F+="").indexOf("random("))&&(F=Ke(F)),j&&(j(Q=[U,F],k,B),U=Q[0],F=Q[1]),V=U.match(At)||[];H=At.exec(F);)q=H[0],K=F.substring(Z,H.index),W?W=(W+1)%5:"rgba("===K.substr(-5)&&(W=1),q!==V[J++]&&(z=parseFloat(V[J-1])||0,X._pt={_next:X._pt,p:K||1===J?K:",",s:z,c:"="===q.charAt(1)?Jt(z,q)-z:parseFloat(q)-z,m:W&&W<4?Math.round:0},Z=At.lastIndex);return X.c=Z")})),W.duration();else{for(Y in K={},rt)"ease"===Y||"easeEach"===Y||Pi(Y,rt[Y],K,rt.easeEach);for(Y in K)for(ut=K[Y].sort((function(k,B){return k.t-B.t})),mt=0,q=0;qQ-at&&!Z?Q:kX&&(F=X)),(W=this._yoyo&&1&j)&&(z=this._yEase,F=X-F),V=me(this._tTime,H),F===Y&&!U&&this._initted&&j===V)return this._tTime=J,this;j!==V&&(K&&this._yEase&&vi(K,W),this.vars.repeatRefresh&&!W&&!this._lock&&this._time!==H&&this._initted&&(this._lock=U=1,this.render(Zt(H*j),!0).invalidate()._lock=0))}if(!this._initted){if(Ae(this,Z?k:F,U,B,J))return this._tTime=0,this;if(!(Y===this._time||U&&this.vars.repeatRefresh&&j!==V))return this;if(X!==this._dur)return this.render(k,B,U)}if(this._tTime=J,this._time=F,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=q=(z||this._ease)(F/X),this._from&&(this.ratio=q=1-q),F&&!Y&&!B&&!j&&(Qe(this,"onStart"),this._tTime!==J))return this;for(G=this._pt;G;)G.r(q,G.d),G=G._next;K&&K.render(k<0?k:K._dur*K._ease(F/this._dur),B,U)||this._startAt&&(this._zTime=k),this._onUpdate&&!B&&(Z&&pe(this,k,0,U),Qe(this,"onUpdate")),this._repeat&&j!==V&&this.vars.onRepeat&&!B&&this.parent&&Qe(this,"onRepeat"),J!==this._tDur&&J||this._tTime!==J||(Z&&!this._onUpdate&&pe(this,k,0,!0),(k||!X)&&(J===this._tDur&&this._ts>0||!J&&this._ts<0)&&ue(this,1),B||Z&&!Y||!(J||Y||W)||(Qe(this,J===Q?"onComplete":"onReverseComplete",!0),this._prom&&!(J0)&&this._prom()))}}else!function(k,B,U,F){var G,j,H,V=k.ratio,W=B<0||!B&&(!k._start&&Ce(k)&&(k._initted||!Oe(k))||(k._ts<0||k._dp._ts<0)&&!Oe(k))?0:1,q=k._rDelay,K=0;if(q&&k._repeat&&(K=xe(0,k._tDur,B),j=me(K,q),k._yoyo&&1&j&&(W=1-W),j!==me(k._tTime,q)&&(V=1-W,k.vars.repeatRefresh&&k._initted&&k.invalidate())),W!==V||$||F||k._zTime===at||!B&&k._zTime){if(!k._initted&&Ae(k,B,F,U,K))return;for(H=k._zTime,k._zTime=B||(U?at:0),U||(U=B&&!H),k.ratio=W,k._from&&(W=1-W),k._time=0,k._tTime=K,G=k._pt;G;)G.r(W,G.d),G=G._next;B<0&&pe(k,B,0,!0),k._onUpdate&&!U&&Qe(k,"onUpdate"),K&&k._repeat&&!U&&k.parent&&Qe(k,"onRepeat"),(B>=k._tDur||B<0)&&k.ratio===W&&(W&&ue(k,1),U||$||(Qe(k,W?"onComplete":"onReverseComplete",!0),k._prom&&k._prom()))}else k._zTime||(k._zTime=B)}(this,k,B,U);return this},U.targets=function(){return this._targets},U.invalidate=function(B){return(!B||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(B),k.prototype.invalidate.call(this,B)},U.resetTo=function(k,B,U,F,G){X||ci.wake(),this._ts||this.play();var j=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Ri(this,j),function(k,B,U,F,G,j,$,H){var V,W,q,K,z=(k._pt&&k._ptCache||(k._ptCache={}))[B];if(!z)for(z=k._ptCache[B]=[],q=k._ptLookup,K=k._targets.length;K--;){if((V=q[K][B])&&V.d&&V.d._pt)for(V=V.d._pt;V&&V.p!==B&&V.fp!==B;)V=V._next;if(!V)return Ci=1,k.vars[B]="+=0",Ri(k,$),Ci=0,H?Nt(B+" not eligible for reset"):1;z.push(V)}for(K=z.length;K--;)(V=(W=z[K])._pt||W).s=!F&&0!==F||G?V.s+(F||0)+j*V.c:F,V.c=U-V.s,W.e&&(W.e=Xt(U)+Le(W.e)),W.b&&(W.b=V.s+Le(W.b))}(this,k,B,U,F,this._ease(j/this._dur),j,G)?this.resetTo(k,B,U,F,1):(Ee(this,0),this.parent||de(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},U.kill=function(k,B){if(void 0===B&&(B="all"),!(k||B&&"all"!==B))return this._lazy=this._pt=0,this.parent?Xe(this):this;if(this.timeline){var U=this.timeline.totalDuration();return this.timeline.killTweensOf(k,B,Ai&&!0!==Ai.vars.overwrite)._first||Xe(this),this.parent&&U!==this.timeline.totalDuration()&&Ie(this,this._dur*this.timeline._tDur/U,0,1),this}var F,G,j,$,H,V,W,q=this._targets,K=k?Fe(k):q,z=this._ptLookup,Y=this._pt;if((!B||"all"===B)&&function(k,B){for(var U=k.length,F=U===B.length;F&&U--&&k[U]===B[U];);return U<0}(q,K))return"all"===B&&(this._pt=0),Xe(this);for(F=this._op=this._op||[],"all"!==B&&(ut(B)&&(H={},Qt(B,(function(k){return H[k]=1})),B=H),B=function(k,B){var U,F,G,j,$=k[0]?zt(k[0]).harness:0,H=$&&$.aliases;if(!H)return B;for(F in U=re({},B),H)if(F in U)for(G=(j=H[F].split(",")).length;G--;)U[j[G]]=U[F];return U}(q,B)),W=q.length;W--;)if(~K.indexOf(q[W]))for(H in G=z[W],"all"===B?(F[W]=B,$=G,j={}):(j=F[W]=F[W]||{},$=B),$)(V=G&&G[H])&&("kill"in V.d&&!0!==V.d.kill(H)||le(this,V,"_pt"),delete G[H]),"all"!==j&&(j[H]=1);return this._initted&&!this._pt&&Y&&Xe(this),this},B.to=function(k,U){return new B(k,U,arguments[2])},B.from=function(k,B){return Me(1,arguments)},B.delayedCall=function(k,U,F,G){return new B(U,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:k,onComplete:U,onReverseComplete:U,onCompleteParams:F,onReverseCompleteParams:F,callbackScope:G})},B.fromTo=function(k,B,U){return Me(2,arguments)},B.set=function(k,U){return U.duration=0,U.repeatDelay||(U.repeat=0),new B(k,U)},B.killTweensOf=function(k,B,U){return V.killTweensOf(k,B,U)},B}(Ti);ae(Li.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),Qt("staggerTo,staggerFrom,staggerFromTo",(function(k){Li[k]=function(){var B=new Si,U=ke.call(arguments,0);return U.splice("staggerFromTo"===k?5:4,0,0),B[k].apply(B,U)}}));var ki=function(k,B,U){return k[B]=U},Bi=function(k,B,U){return k[B](U)},Ui=function(k,B,U,F){return k[B](F.fp,U)},Fi=function(k,B,U){return k.setAttribute(B,U)},Gi=function(k,B){return ft(k[B])?Bi:pt(k[B])&&k.setAttribute?Fi:ki},ji=function(k,B){return B.set(B.t,B.p,Math.round(1e6*(B.s+B.c*k))/1e6,B)},$i=function(k,B){return B.set(B.t,B.p,!!(B.s+B.c*k),B)},Hi=function(k,B){var U=B._pt,F="";if(!k&&B.b)F=B.b;else if(1===k&&B.e)F=B.e;else{for(;U;)F=U.p+(U.m?U.m(U.s+U.c*k):Math.round(1e4*(U.s+U.c*k))/1e4)+F,U=U._next;F+=B.c}B.set(B.t,B.p,F,B)},Vi=function(k,B){for(var U=B._pt;U;)U.r(k,U.d),U=U._next},Wi=function(k,B,U,F){for(var G,j=this._pt;j;)G=j._next,j.p===F&&j.modifier(k,B,U),j=G},qi=function(k){for(var B,U,F=this._pt;F;)U=F._next,F.p===k&&!F.op||F.op===k?le(this,F,"_pt"):F.dep||(B=1),F=U;return!B},Ki=function(k,B,U,F){F.mSet(k,B,F.m.call(F.tween,U,F.mt),F)},zi=function(k){for(var B,U,F,G,j=k._pt;j;){for(B=j._next,U=F;U&&U.pr>j.pr;)U=U._next;(j._prev=U?U._prev:G)?j._prev._next=j:F=j,(j._next=U)?U._prev=j:G=j,j=B}k._pt=F},Yi=function(){function k(k,B,U,F,G,j,$,H,V){this.t=B,this.s=F,this.c=G,this.p=U,this.r=j||ji,this.d=$||this,this.set=H||ki,this.pr=V||0,this._next=k,k&&(k._prev=this)}return k.prototype.modifier=function(k,B,U){this.mSet=this.mSet||this.set,this.set=Ki,this.m=k,this.mt=U,this.tween=B},k}();Qt(qt+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",(function(k){return Ft[k]=1})),Dt.TweenMax=Dt.TweenLite=Li,Dt.TimelineLite=Dt.TimelineMax=Si,V=new Si({sortChildren:!1,defaults:st,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),it.stringFilter=hi;var Qi=[],Xi={},Zi=[],Ji=0,ts=0,es=function(k){return(Xi[k]||Zi).map((function(k){return k()}))},is=function(){var k=Date.now(),B=[];k-Ji>2&&(es("matchMediaInit"),Qi.forEach((function(k){var U,F,G,j,$=k.queries,H=k.conditions;for(F in $)(U=W.matchMedia($[F]).matches)&&(G=1),U!==H[F]&&(H[F]=U,j=1);j&&(k.revert(),G&&B.push(k))})),es("matchMediaRevert"),B.forEach((function(k){return k.onMatch(k,(function(B){return k.add(null,B)}))})),Ji=k,es("matchMedia"))},ss=function(){function k(k,B){this.selector=B&&Ge(B),this.data=[],this._r=[],this.isReverted=!1,this.id=ts++,k&&this.add(k)}var B=k.prototype;return B.add=function(k,B,U){ft(k)&&(U=B,B=k,k=ft);var F=this,G=function(){var k,G=H,j=F.selector;return G&&G!==F&&G.data.push(F),U&&(F.selector=Ge(U)),H=F,k=B.apply(F,arguments),ft(k)&&F._r.push(k),H=G,F.selector=j,F.isReverted=!1,k};return F.last=G,k===ft?G(F,(function(k){return F.add(null,k)})):k?F[k]=G:G},B.ignore=function(k){var B=H;H=null,k(this),H=B},B.getTweens=function(){var B=[];return this.data.forEach((function(U){return U instanceof k?B.push.apply(B,U.getTweens()):U instanceof Li&&!(U.parent&&"nested"===U.parent.data)&&B.push(U)})),B},B.clear=function(){this._r.length=this.data.length=0},B.kill=function(k,B){var U=this;if(k?function(){for(var B,F=U.getTweens(),G=U.data.length;G--;)"isFlip"===(B=U.data[G]).data&&(B.revert(),B.getChildren(!0,!0,!1).forEach((function(k){return F.splice(F.indexOf(k),1)})));for(F.map((function(k){return{g:k._dur||k._delay||k._sat&&!k._sat.vars.immediateRender?k.globalTime(0):-1/0,t:k}})).sort((function(k,B){return B.g-k.g||-1/0})).forEach((function(B){return B.t.revert(k)})),G=U.data.length;G--;)(B=U.data[G])instanceof Si?"nested"!==B.data&&(B.scrollTrigger&&B.scrollTrigger.revert(),B.kill()):!(B instanceof Li)&&B.revert&&B.revert(k);U._r.forEach((function(B){return B(k,U)})),U.isReverted=!0}():this.data.forEach((function(k){return k.kill&&k.kill()})),this.clear(),B)for(var F=Qi.length;F--;)Qi[F].id===this.id&&Qi.splice(F,1)},B.revert=function(k){this.kill(k||{})},k}(),ns=function(){function k(k){this.contexts=[],this.scope=k,H&&H.data.push(this)}var B=k.prototype;return B.add=function(k,B,U){vt(k)||(k={matches:k});var F,G,j,$=new ss(0,U||this.scope),V=$.conditions={};for(G in H&&!$.selector&&($.selector=H.selector),this.contexts.push($),B=$.add("onMatch",B),$.queries=k,k)"all"===G?j=1:(F=W.matchMedia(k[G]))&&(Qi.indexOf($)<0&&Qi.push($),(V[G]=F.matches)&&(j=1),F.addListener?F.addListener(is):F.addEventListener("change",is));return j&&B($,(function(k){return $.add(null,k)})),this},B.revert=function(k){this.kill(k||{})},B.kill=function(k){this.contexts.forEach((function(B){return B.kill(k,!0)}))},k}(),as={registerPlugin:function(){for(var k=arguments.length,B=new Array(k),U=0;U1){var F=k.map((function(k){return hs.quickSetter(k,B,U)})),G=F.length;return function(k){for(var B=G;B--;)F[B](k)}}k=k[0]||{};var j=$t[B],$=zt(k),H=$.harness&&($.harness.aliases||{})[B]||B,V=j?function(B){var F=new j;Q._pt=0,F.init(k,U?B+U:B,Q,0,[k]),F.render(1,F),Q._pt&&Vi(1,Q)}:$.set(k,H);return j?V:function(B){return V(k,H,U?B+U:B,$,1)}},quickTo:function(k,B,U){var F,G=hs.to(k,re(((F={})[B]="+=0.1",F.paused=!0,F),U||{})),j=function(k,U,F){return G.resetTo(B,k,U,F)};return j.tween=G,j},isTweening:function(k){return V.getTweensOf(k,!0).length>0},defaults:function(k){return k&&k.ease&&(k.ease=gi(k.ease,st.ease)),oe(st,k||{})},config:function(k){return oe(it,k||{})},registerEffect:function(k){var B=k.name,U=k.effect,F=k.plugins,G=k.defaults,j=k.extendTimeline;(F||"").split(",").forEach((function(k){return k&&!$t[k]&&!Dt[k]&&Nt(B+" effect requires "+k+" plugin.")})),Ht[B]=function(k,B,F){return U(Fe(k),ae(B||{},G),F)},j&&(Si.prototype[B]=function(k,U,F){return this.add(Ht[B](k,vt(U)?U:(F=U)&&{},this),F)})},registerEase:function(k,B){li[k]=gi(B)},parseEase:function(k,B){return arguments.length?gi(k,B):li},getById:function(k){return V.getById(k)},exportRoot:function(k,B){void 0===k&&(k={});var U,F,G=new Si(k);for(G.smoothChildTiming=gt(k.smoothChildTiming),V.remove(G),G._dp=0,G._time=G._tTime=V._time,U=V._first;U;)F=U._next,!B&&!U._dur&&U instanceof Li&&U.vars.onComplete===U._targets[0]||Te(G,U,U._start-U._delay),U=F;return Te(V,G,0),G},context:function(k,B){return k?new ss(k,B):H},matchMedia:function(k){return new ns(k)},matchMediaRefresh:function(){return Qi.forEach((function(k){var B,U,F=k.conditions;for(U in F)F[U]&&(F[U]=!1,B=1);B&&k.revert()}))||is()},addEventListener:function(k,B){var U=Xi[k]||(Xi[k]=[]);~U.indexOf(B)||U.push(B)},removeEventListener:function(k,B){var U=Xi[k],F=U&&U.indexOf(B);F>=0&&U.splice(F,1)},utils:{wrap:function k(B,U,F){var G=U-B;return Et(B)?qe(B,k(0,B.length),U):Ne(F,(function(k){return(G+(k-B)%G)%G+B}))},wrapYoyo:function k(B,U,F){var G=U-B,j=2*G;return Et(B)?qe(B,k(0,B.length-1),U):Ne(F,(function(k){return B+((k=(j+(k-B)%j)%j||0)>G?j-k:k)}))},distribute:$e,random:We,snap:Ve,normalize:function(k,B,U){return ze(k,B,0,1,U)},getUnit:Le,clamp:function(k,B,U){return Ne(U,(function(U){return xe(k,B,U)}))},splitColor:si,toArray:Fe,selector:Ge,mapRange:ze,pipe:function(){for(var k=arguments.length,B=new Array(k),U=0;U=0)return;$.svg&&(this.svgo=G.getAttribute("data-svg-origin"),this.props.push(Us,U,"")),B=Bs}(j||U)&&this.props.push(B,U,j[B])},Gs=function(k){k.translate&&(k.removeProperty("translate"),k.removeProperty("scale"),k.removeProperty("rotate"))},js=function(){var k,B,U=this.props,F=this.target,G=F.style,j=F._gsap;for(k=0;k=0?Ws[G]:"")+k},Ks=function(){"undefined"!=typeof window&&window.document&&(cs=window,ds=cs.document,ls=ds.documentElement,fs=Hs("div")||{style:{}},Hs("div"),Bs=qs(Bs),Us=Bs+"Origin",fs.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",vs=!!qs("perspective"),ps=hs.core.reverting,us=1)},zs=function k(B){var U,F=Hs("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),G=this.parentNode,j=this.nextSibling,$=this.style.cssText;if(ls.appendChild(F),F.appendChild(this),this.style.display="block",B)try{U=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=k}catch(e){}else this._gsapBBox&&(U=this._gsapBBox());return G&&(j?G.insertBefore(this,j):G.appendChild(this)),ls.removeChild(F),this.style.cssText=$,U},Ys=function(k,B){for(var U=B.length;U--;)if(k.hasAttribute(B[U]))return k.getAttribute(B[U])},Qs=function(k){var B;try{B=k.getBBox()}catch(U){B=zs.call(k,!0)}return B&&(B.width||B.height)||k.getBBox===zs||(B=zs.call(k,!0)),!B||B.width||B.x||B.y?B:{x:+Ys(k,["x","cx","x1"])||0,y:+Ys(k,["y","cy","y1"])||0,width:0,height:0}},Xs=function(k){return!(!k.getCTM||k.parentNode&&!k.ownerSVGElement||!Qs(k))},Zs=function(k,B){if(B){var U,F=k.style;B in gs&&B!==Us&&(B=Bs),F.removeProperty?("ms"!==(U=B.substr(0,2))&&"webkit"!==B.substr(0,6)||(B="-"+B),F.removeProperty("--"===U?B:B.replace(Es,"-$1").toLowerCase())):F.removeAttribute(B)}},Js=function(k,B,U,F,G,j){var $=new Yi(k._pt,B,U,0,1,j?Rs:Ds);return k._pt=$,$.b=F,$.e=G,k._props.push(U),$},tn={deg:1,rad:1,turn:1},en={grid:1,flex:1},sn=function k(B,U,F,G){var j,$,H,V,W=parseFloat(F)||0,q=(F+"").trim().substr((W+"").length)||"px",K=fs.style,z=ws.test(U),Y="svg"===B.tagName.toLowerCase(),Q=(Y?"client":"offset")+(z?"Width":"Height"),X=100,Z="px"===G,J="%"===G;if(G===q||!W||tn[G]||tn[q])return W;if("px"!==q&&!Z&&(W=k(B,U,F,"px")),V=B.getCTM&&Xs(B),(J||"%"===q)&&(gs[U]||~U.indexOf("adius")))return j=V?B.getBBox()[z?"width":"height"]:B[Q],Xt(J?W/j*X:W/100*j);if(K[z?"width":"height"]=X+(Z?q:G),$=~U.indexOf("adius")||"em"===G&&B.appendChild&&!Y?B:B.parentNode,V&&($=(B.ownerSVGElement||{}).parentNode),$&&$!==ds&&$.appendChild||($=ds.body),(H=$._gsap)&&J&&H.width&&z&&H.time===ci.time&&!H.uncache)return Xt(W/H.width*X);if(!J||"height"!==U&&"width"!==U)(J||"%"===q)&&!en[Vs($,"display")]&&(K.position=Vs(B,"position")),$===B&&(K.position="static"),$.appendChild(fs),j=fs[Q],$.removeChild(fs),K.position="absolute";else{var tt=B.style[U];B.style[U]=X+G,j=B[Q],tt?B.style[U]=tt:Zs(B,U)}return z&&J&&((H=zt($)).time=ci.time,H.width=$[Q]),Xt(Z?j*W/X:j&&W?X/j*W:0)},nn=function(k,B,U,F){var G;return us||Ks(),B in Ss&&"transform"!==B&&~(B=Ss[B]).indexOf(",")&&(B=B.split(",")[0]),gs[B]&&"transform"!==B?(G=pn(k,F),G="transformOrigin"!==B?G[B]:G.svg?G.origin:vn(Vs(k,Us))+" "+G.zOrigin+"px"):(!(G=k.style[B])||"auto"===G||F||~(G+"").indexOf("calc("))&&(G=hn[B]&&hn[B](k,B,U)||Vs(k,B)||Yt(k,B)||("opacity"===B?1:0)),U&&!~(G+"").trim().indexOf(" ")?sn(k,B,G,U)+U:G},an=function(k,B,U,F){if(!U||"none"===U){var G=qs(B,k,1),j=G&&Vs(k,G,1);j&&j!==U?(B=G,U=j):"borderColor"===B&&(U=Vs(k,"borderTopColor"))}var $,H,V,W,q,K,z,Y,Q,X,Z,J=new Yi(this._pt,k.style,B,0,1,Hi),tt=0,et=0;if(J.b=U,J.e=F,U+="","auto"===(F+="")&&(K=k.style[B],k.style[B]=F,F=Vs(k,B)||F,K?k.style[B]=K:Zs(k,B)),hi($=[U,F]),F=$[1],V=(U=$[0]).match(St)||[],(F.match(St)||[]).length){for(;H=St.exec(F);)z=H[0],Q=F.substring(tt,H.index),q?q=(q+1)%5:"rgba("!==Q.substr(-5)&&"hsla("!==Q.substr(-5)||(q=1),z!==(K=V[et++]||"")&&(W=parseFloat(K)||0,Z=K.substr((W+"").length),"="===z.charAt(1)&&(z=Jt(W,z)+Z),Y=parseFloat(z),X=z.substr((Y+"").length),tt=St.lastIndex-X.length,X||(X=X||it.units[B]||Z,tt===F.length&&(F+=X,J.e+=X)),Z!==X&&(W=sn(k,B,K,X)||0),J._pt={_next:J._pt,p:Q||1===et?Q:",",s:W,c:Y-W,m:q&&q<4||"zIndex"===B?Math.round:0});J.c=tt-1;)U=H[G],gs[U]&&(F=1,U="transformOrigin"===U?Us:Bs),Zs(j,U);F&&(Zs(j,Bs),V&&(V.svg&&j.removeAttribute("transform"),pn(j,1),V.uncache=1,Gs($)))}},hn={clearProps:function(k,B,U,F,G){if("isFromStart"!==G.data){var j=k._pt=new Yi(k._pt,B,U,0,0,on);return j.u=F,j.pr=-10,j.tween=G,k._props.push(U),1}}},cn=[1,0,0,1,0,0],dn={},ln=function(k){return"matrix(1, 0, 0, 1, 0, 0)"===k||"none"===k||!k},un=function(k){var B=Vs(k,Bs);return ln(B)?cn:B.substr(7).match(Tt).map(Xt)},fn=function(k,B){var U,F,G,j,$=k._gsap||zt(k),H=k.style,V=un(k);return $.svg&&k.getAttribute("transform")?"1,0,0,1,0,0"===(V=[(G=k.transform.baseVal.consolidate().matrix).a,G.b,G.c,G.d,G.e,G.f]).join(",")?cn:V:(V!==cn||k.offsetParent||k===ls||$.svg||(G=H.display,H.display="block",(U=k.parentNode)&&k.offsetParent||(j=1,F=k.nextElementSibling,ls.appendChild(k)),V=un(k),G?H.display=G:Zs(k,"display"),j&&(F?U.insertBefore(k,F):U?U.appendChild(k):ls.removeChild(k))),B&&V.length>6?[V[0],V[1],V[4],V[5],V[12],V[13]]:V)},bn=function(k,B,U,F,G,j){var $,H,V,W=k._gsap,q=G||fn(k,!0),K=W.xOrigin||0,z=W.yOrigin||0,Y=W.xOffset||0,Q=W.yOffset||0,X=q[0],Z=q[1],J=q[2],tt=q[3],et=q[4],it=q[5],st=B.split(" "),nt=parseFloat(st[0])||0,at=parseFloat(st[1])||0;U?q!==cn&&(H=X*tt-Z*J)&&(V=nt*(-Z/H)+at*(X/H)-(X*it-Z*et)/H,nt=nt*(tt/H)+at*(-J/H)+(J*it-tt*et)/H,at=V):(nt=($=Qs(k)).x+(~st[0].indexOf("%")?nt/100*$.width:nt),at=$.y+(~(st[1]||st[0]).indexOf("%")?at/100*$.height:at)),F||!1!==F&&W.smooth?(et=nt-K,it=at-z,W.xOffset=Y+(et*X+it*J)-et,W.yOffset=Q+(et*Z+it*tt)-it):W.xOffset=W.yOffset=0,W.xOrigin=nt,W.yOrigin=at,W.smooth=!!F,W.origin=B,W.originIsAbsolute=!!U,k.style[Us]="0px 0px",j&&(Js(j,W,"xOrigin",K,nt),Js(j,W,"yOrigin",z,at),Js(j,W,"xOffset",Y,W.xOffset),Js(j,W,"yOffset",Q,W.yOffset)),k.setAttribute("data-svg-origin",nt+" "+at)},pn=function(k,B){var U=k._gsap||new wi(k);if("x"in U&&!B&&!U.uncache)return U;var F,G,j,$,H,V,W,q,K,z,Y,Q,X,Z,J,tt,et,st,nt,at,rt,ot,ht,ct,dt,lt,ut,ft,bt,pt,vt,gt,mt=k.style,yt=U.scaleX<0,_t="px",Et="deg",wt=getComputedStyle(k),Tt=Vs(k,Us)||"0";return F=G=j=V=W=q=K=z=Y=0,$=H=1,U.svg=!(!k.getCTM||!Xs(k)),wt.translate&&("none"===wt.translate&&"none"===wt.scale&&"none"===wt.rotate||(mt[Bs]=("none"!==wt.translate?"translate3d("+(wt.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==wt.rotate?"rotate("+wt.rotate+") ":"")+("none"!==wt.scale?"scale("+wt.scale.split(" ").join(",")+") ":"")+("none"!==wt[Bs]?wt[Bs]:"")),mt.scale=mt.rotate=mt.translate="none"),Z=fn(k,U.svg),U.svg&&(U.uncache?(dt=k.getBBox(),Tt=U.xOrigin-dt.x+"px "+(U.yOrigin-dt.y)+"px",ct=""):ct=!B&&k.getAttribute("data-svg-origin"),bn(k,ct||Tt,!!ct||U.originIsAbsolute,!1!==U.smooth,Z)),Q=U.xOrigin||0,X=U.yOrigin||0,Z!==cn&&(st=Z[0],nt=Z[1],at=Z[2],rt=Z[3],F=ot=Z[4],G=ht=Z[5],6===Z.length?($=Math.sqrt(st*st+nt*nt),H=Math.sqrt(rt*rt+at*at),V=st||nt?_s(nt,st)*ms:0,(K=at||rt?_s(at,rt)*ms+V:0)&&(H*=Math.abs(Math.cos(K*ys))),U.svg&&(F-=Q-(Q*st+X*at),G-=X-(Q*nt+X*rt))):(gt=Z[6],pt=Z[7],ut=Z[8],ft=Z[9],bt=Z[10],vt=Z[11],F=Z[12],G=Z[13],j=Z[14],W=(J=_s(gt,bt))*ms,J&&(ct=ot*(tt=Math.cos(-J))+ut*(et=Math.sin(-J)),dt=ht*tt+ft*et,lt=gt*tt+bt*et,ut=ot*-et+ut*tt,ft=ht*-et+ft*tt,bt=gt*-et+bt*tt,vt=pt*-et+vt*tt,ot=ct,ht=dt,gt=lt),q=(J=_s(-at,bt))*ms,J&&(tt=Math.cos(-J),vt=rt*(et=Math.sin(-J))+vt*tt,st=ct=st*tt-ut*et,nt=dt=nt*tt-ft*et,at=lt=at*tt-bt*et),V=(J=_s(nt,st))*ms,J&&(ct=st*(tt=Math.cos(J))+nt*(et=Math.sin(J)),dt=ot*tt+ht*et,nt=nt*tt-st*et,ht=ht*tt-ot*et,st=ct,ot=dt),W&&Math.abs(W)+Math.abs(V)>359.9&&(W=V=0,q=180-q),$=Xt(Math.sqrt(st*st+nt*nt+at*at)),H=Xt(Math.sqrt(ht*ht+gt*gt)),J=_s(ot,ht),K=Math.abs(J)>2e-4?J*ms:0,Y=vt?1/(vt<0?-vt:vt):0),U.svg&&(ct=k.getAttribute("transform"),U.forceCSS=k.setAttribute("transform","")||!ln(Vs(k,Bs)),ct&&k.setAttribute("transform",ct))),Math.abs(K)>90&&Math.abs(K)<270&&(yt?($*=-1,K+=V<=0?180:-180,V+=V<=0?180:-180):(H*=-1,K+=K<=0?180:-180)),B=B||U.uncache,U.x=F-((U.xPercent=F&&(!B&&U.xPercent||(Math.round(k.offsetWidth/2)===Math.round(-F)?-50:0)))?k.offsetWidth*U.xPercent/100:0)+_t,U.y=G-((U.yPercent=G&&(!B&&U.yPercent||(Math.round(k.offsetHeight/2)===Math.round(-G)?-50:0)))?k.offsetHeight*U.yPercent/100:0)+_t,U.z=j+_t,U.scaleX=Xt($),U.scaleY=Xt(H),U.rotation=Xt(V)+Et,U.rotationX=Xt(W)+Et,U.rotationY=Xt(q)+Et,U.skewX=K+Et,U.skewY=z+Et,U.transformPerspective=Y+_t,(U.zOrigin=parseFloat(Tt.split(" ")[2])||!B&&U.zOrigin||0)&&(mt[Us]=vn(Tt)),U.xOffset=U.yOffset=0,U.force3D=it.force3D,U.renderTransform=U.svg?Tn:vs?wn:mn,U.uncache=0,U},vn=function(k){return(k=k.split(" "))[0]+" "+k[1]},gn=function(k,B,U){var F=Le(B);return Xt(parseFloat(B)+parseFloat(sn(k,"x",U+"px",F)))+F},mn=function(k,B){B.z="0px",B.rotationY=B.rotationX="0deg",B.force3D=0,wn(k,B)},yn="0deg",_n="0px",En=") ",wn=function(k,B){var U=B||this,F=U.xPercent,G=U.yPercent,j=U.x,$=U.y,H=U.z,V=U.rotation,W=U.rotationY,q=U.rotationX,K=U.skewX,z=U.skewY,Y=U.scaleX,Q=U.scaleY,X=U.transformPerspective,Z=U.force3D,J=U.target,tt=U.zOrigin,et="",it="auto"===Z&&k&&1!==k||!0===Z;if(tt&&(q!==yn||W!==yn)){var st,nt=parseFloat(W)*ys,at=Math.sin(nt),rt=Math.cos(nt);nt=parseFloat(q)*ys,st=Math.cos(nt),j=gn(J,j,at*st*-tt),$=gn(J,$,-Math.sin(nt)*-tt),H=gn(J,H,rt*st*-tt+tt)}X!==_n&&(et+="perspective("+X+En),(F||G)&&(et+="translate("+F+"%, "+G+"%) "),(it||j!==_n||$!==_n||H!==_n)&&(et+=H!==_n||it?"translate3d("+j+", "+$+", "+H+") ":"translate("+j+", "+$+En),V!==yn&&(et+="rotate("+V+En),W!==yn&&(et+="rotateY("+W+En),q!==yn&&(et+="rotateX("+q+En),K===yn&&z===yn||(et+="skew("+K+", "+z+En),1===Y&&1===Q||(et+="scale("+Y+", "+Q+En),J.style[Bs]=et||"translate(0, 0)"},Tn=function(k,B){var U,F,G,j,$,H=B||this,V=H.xPercent,W=H.yPercent,q=H.x,K=H.y,z=H.rotation,Y=H.skewX,Q=H.skewY,X=H.scaleX,Z=H.scaleY,J=H.target,tt=H.xOrigin,et=H.yOrigin,it=H.xOffset,st=H.yOffset,nt=H.forceCSS,at=parseFloat(q),rt=parseFloat(K);z=parseFloat(z),Y=parseFloat(Y),(Q=parseFloat(Q))&&(Y+=Q=parseFloat(Q),z+=Q),z||Y?(z*=ys,Y*=ys,U=Math.cos(z)*X,F=Math.sin(z)*X,G=Math.sin(z-Y)*-Z,j=Math.cos(z-Y)*Z,Y&&(Q*=ys,$=Math.tan(Y-Q),G*=$=Math.sqrt(1+$*$),j*=$,Q&&($=Math.tan(Q),U*=$=Math.sqrt(1+$*$),F*=$)),U=Xt(U),F=Xt(F),G=Xt(G),j=Xt(j)):(U=X,j=Z,F=G=0),(at&&!~(q+"").indexOf("px")||rt&&!~(K+"").indexOf("px"))&&(at=sn(J,"x",q,"px"),rt=sn(J,"y",K,"px")),(tt||et||it||st)&&(at=Xt(at+tt-(tt*U+et*G)+it),rt=Xt(rt+et-(tt*F+et*j)+st)),(V||W)&&($=J.getBBox(),at=Xt(at+V/100*$.width),rt=Xt(rt+W/100*$.height)),$="matrix("+U+","+F+","+G+","+j+","+at+","+rt+")",J.setAttribute("transform",$),nt&&(J.style[Bs]=$)},Sn=function(k,B,U,F,G){var j,$,H=360,V=ut(G),W=parseFloat(G)*(V&&~G.indexOf("rad")?ms:1)-F,q=F+W+"deg";return V&&("short"===(j=G.split("_")[1])&&(W%=H)!==W%180&&(W+=W<0?H:-360),"cw"===j&&W<0?W=(W+36e9)%H-~~(W/H)*H:"ccw"===j&&W>0&&(W=(W-36e9)%H-~~(W/H)*H)),k._pt=$=new Yi(k._pt,B,U,F,W,Cs),$.e=q,$.u="deg",k._props.push(U),$},An=function(k,B){for(var U in B)k[U]=B[U];return k},Cn=function(k,B,U){var F,G,j,$,H,V,W,q=An({},U._gsap),K=U.style;for(G in q.svg?(j=U.getAttribute("transform"),U.setAttribute("transform",""),K[Bs]=B,F=pn(U,1),Zs(U,Bs),U.setAttribute("transform",j)):(j=getComputedStyle(U)[Bs],K[Bs]=B,F=pn(U,1),K[Bs]=j),gs)(j=q[G])!==($=F[G])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(G)<0&&(H=Le(j)!==(W=Le($))?sn(U,G,j,W):parseFloat(j),V=parseFloat($),k._pt=new Yi(k._pt,F,G,H,V-H,As),k._pt.u=W||0,k._props.push(G));An(F,q)};Qt("padding,margin,Width,Radius",(function(k,B){var U="Top",F="Right",G="Bottom",j="Left",$=(B<3?[U,F,G,j]:[U+j,U+F,G+F,G+j]).map((function(U){return B<2?k+U:"border"+U+k}));hn[B>1?"border"+k:k]=function(k,B,U,F,G){var j,H;if(arguments.length<4)return j=$.map((function(B){return nn(k,B,U)})),5===(H=j.join(" ")).split(j[0]).length?j[0]:H;j=(F+"").split(" "),H={},$.forEach((function(k,B){return H[k]=j[B]=j[B]||j[(B-1)/2|0]})),k.init(B,H,G)}}));var On,In,Dn,Rn={name:"css",register:Ks,targetTest:function(k){return k.style&&k.nodeType},init:function(k,B,U,F,G){var j,$,H,V,W,q,K,z,Y,Q,X,Z,J,tt,et,st,nt,at,rt,ot,ht=this._props,ct=k.style,dt=U.vars.startAt;for(K in us||Ks(),this.styles=this.styles||$s(k),st=this.styles.props,this.tween=U,B)if("autoRound"!==K&&($=B[K],!$t[K]||!Di(K,B,U,F,k,G)))if(W=typeof $,q=hn[K],"function"===W&&(W=typeof($=$.call(U,F,k,G))),"string"===W&&~$.indexOf("random(")&&($=Ke($)),q)q(this,k,K,$,U)&&(et=1);else if("--"===K.substr(0,2))j=(getComputedStyle(k).getPropertyValue(K)+"").trim(),$+="",ri.lastIndex=0,ri.test(j)||(z=Le(j),Y=Le($)),Y?z!==Y&&(j=sn(k,K,j,Y)+Y):z&&($+=z),this.add(ct,"setProperty",j,$,F,G,0,0,K),ht.push(K),st.push(K,0,ct[K]);else if("undefined"!==W){if(dt&&K in dt?(j="function"==typeof dt[K]?dt[K].call(U,F,k,G):dt[K],ut(j)&&~j.indexOf("random(")&&(j=Ke(j)),Le(j+"")||"auto"===j||(j+=it.units[K]||Le(nn(k,K))||""),"="===(j+"").charAt(1)&&(j=nn(k,K))):j=nn(k,K),V=parseFloat(j),(Q="string"===W&&"="===$.charAt(1)&&$.substr(0,2))&&($=$.substr(2)),H=parseFloat($),K in Ss&&("autoAlpha"===K&&(1===V&&"hidden"===nn(k,"visibility")&&H&&(V=0),st.push("visibility",0,ct.visibility),Js(this,ct,"visibility",V?"inherit":"hidden",H?"inherit":"hidden",!H)),"scale"!==K&&"transform"!==K&&~(K=Ss[K]).indexOf(",")&&(K=K.split(",")[0])),X=K in gs)if(this.styles.save(K),Z||((J=k._gsap).renderTransform&&!B.parseTransform||pn(k,B.parseTransform),tt=!1!==B.smoothOrigin&&J.smooth,(Z=this._pt=new Yi(this._pt,ct,Bs,0,1,J.renderTransform,J,0,-1)).dep=1),"scale"===K)this._pt=new Yi(this._pt,J,"scaleY",J.scaleY,(Q?Jt(J.scaleY,Q+H):H)-J.scaleY||0,As),this._pt.u=0,ht.push("scaleY",K),K+="X";else{if("transformOrigin"===K){st.push(Us,0,ct[Us]),at=void 0,rt=void 0,ot=void 0,at=(nt=$).split(" "),rt=at[0],ot=at[1]||"50%","top"!==rt&&"bottom"!==rt&&"left"!==ot&&"right"!==ot||(nt=rt,rt=ot,ot=nt),at[0]=rn[rt]||rt,at[1]=rn[ot]||ot,$=at.join(" "),J.svg?bn(k,$,0,tt,0,this):((Y=parseFloat($.split(" ")[2])||0)!==J.zOrigin&&Js(this,J,"zOrigin",J.zOrigin,Y),Js(this,ct,K,vn(j),vn($)));continue}if("svgOrigin"===K){bn(k,$,1,tt,0,this);continue}if(K in dn){Sn(this,J,K,V,Q?Jt(V,Q+$):$);continue}if("smoothOrigin"===K){Js(this,J,"smooth",J.smooth,$);continue}if("force3D"===K){J[K]=$;continue}if("transform"===K){Cn(this,$,k);continue}}else K in ct||(K=qs(K)||K);if(X||(H||0===H)&&(V||0===V)&&!Ts.test($)&&K in ct)H||(H=0),(z=(j+"").substr((V+"").length))!==(Y=Le($)||(K in it.units?it.units[K]:z))&&(V=sn(k,K,j,Y)),this._pt=new Yi(this._pt,X?J:ct,K,V,(Q?Jt(V,Q+H):H)-V,X||"px"!==Y&&"zIndex"!==K||!1===B.autoRound?As:Is),this._pt.u=Y||0,z!==Y&&"%"!==Y&&(this._pt.b=j,this._pt.r=Os);else if(K in ct)an.call(this,k,K,j,Q?Q+$:$);else if(K in k)this.add(k,K,j||k[K],Q?Q+$:$,F,G);else if("parseTransform"!==K){Mt(K,$);continue}X||(K in ct?st.push(K,0,ct[K]):st.push(K,1,j||k[K])),ht.push(K)}et&&zi(this)},render:function(k,B){if(B.tween._time||!ps())for(var U=B._pt;U;)U.r(k,U.d),U=U._next;else B.styles.revert()},get:nn,aliases:Ss,getSetter:function(k,B,U){var F=Ss[B];return F&&F.indexOf(",")<0&&(B=F),B in gs&&B!==Us&&(k._gsap.x||nn(k,"x"))?U&&bs===U?"scale"===B?xs:Ns:(bs=U||{})&&("scale"===B?Ls:ks):k.style&&!pt(k.style[B])?Ps:~B.indexOf("-")?Ms:Gi(k,B)},core:{_removeProperty:Zs,_getMatrix:fn}};hs.utils.checkPrefix=qs,hs.core.getStyleSaver=$s,Dn=Qt((On="x,y,z,scale,scaleX,scaleY,xPercent,yPercent")+","+(In="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(k){gs[k]=1})),Qt(In,(function(k){it.units[k]="deg",dn[k]=1})),Ss[Dn[13]]=On+","+In,Qt("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(k){var B=k.split(":");Ss[B[1]]=Dn[B[0]]})),Qt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(k){it.units[k]="px"})),hs.registerPlugin(Rn);var Pn=hs.registerPlugin(Rn)||hs;Pn.core.Tween},30592:(k,B,U)=>{"use strict";var F=U(30655),G=function(){return!!F};G.hasArrayLengthDefineBug=function(){if(!F)return null;try{return 1!==F([],"length",{value:1}).length}catch(e){return!0}},k.exports=G},64039:(k,B,U)=>{"use strict";var F="undefined"!=typeof Symbol&&Symbol,G=U(41333);k.exports=function(){return"function"==typeof F&&("function"==typeof Symbol&&("symbol"==typeof F("foo")&&("symbol"==typeof Symbol("bar")&&G())))}},41333:k=>{"use strict";k.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var k={},B=Symbol("test"),U=Object(B);if("string"==typeof B)return!1;if("[object Symbol]"!==Object.prototype.toString.call(B))return!1;if("[object Symbol]"!==Object.prototype.toString.call(U))return!1;for(var F in k[B]=42,k)return!1;if("function"==typeof Object.keys&&0!==Object.keys(k).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(k).length)return!1;var G=Object.getOwnPropertySymbols(k);if(1!==G.length||G[0]!==B)return!1;if(!Object.prototype.propertyIsEnumerable.call(k,B))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var j=Object.getOwnPropertyDescriptor(k,B);if(42!==j.value||!0!==j.enumerable)return!1}return!0}},49092:(k,B,U)=>{"use strict";var F=U(41333);k.exports=function(){return F()&&!!Symbol.toStringTag}},9957:(k,B,U)=>{"use strict";var F=Function.prototype.call,G=Object.prototype.hasOwnProperty,j=U(66743);k.exports=j.call(F,G)},25335:k=>{"use strict";k.exports=class{static createState(k){return k}constructor(k){this.reset()}reset(){this.pos=-1,this.maxPos=-1,this.state=null,this.data=this.src=null,this.filename=null}setInitialState(k){this.initialState=k}enterState(k){if(this.state===k)throw new Error("Re-entering the current state is illegal - "+k.name);var B;(B=this.state)&&B.leave&&B.leave.call(this,k),this.state=k,k.enter&&k.enter.call(this,B)}lookAheadFor(k,B){null==B&&(B=this.pos+1);var U=B+k.length;if(!(U>this.maxPos+1))return this.data.substring(B,U)===k?k:void 0}lookAtCharAhead(k,B){return null==B&&(B=this.pos),this.data.charAt(B+k)}lookAtCharCodeAhead(k,B){return null==B&&(B=this.pos),this.data.charCodeAt(B+k)}rewind(k){this.pos-=k}skip(k){this.pos+=k}end(){this.pos=this.maxPos+1}substring(k,B){return this.data.substring(k,B)}parse(k,B){if(null==k)return;if(this.reset(),Array.isArray(k)&&(k=k.join("")),this.src=k,this.filename=B,this.data=k,this.maxPos=k.length-1,this.initialState&&this.enterState(this.initialState),this.pos=65279===k.charCodeAt(0)?1:0,!this.state)return;for(var U;(U=this.pos)<=this.maxPos;){let B=k[U],F=B.charCodeAt(0),G=this.state;if(10!==F){if(13===F){let B=U+1;if(B{"use strict";var F=U(25335),G=U(70456),j=U(64101),$=U(40862),H=U(8928);function V(k){return k<=32}var W=/^[\-\+]?\d*(?:\.\d+)?(?:e[\-\+]?\d+)?$/;function q(k){var B=k.length;if(B)return k[B-1]}const K=92,z=47,Y=60,Q=62,X=93,Z=40,J=41,tt=123,et=125,it=42,st=45,nt=36,at=124,rt=[],ot=U(21052);class ht extends F{constructor(k,B){super(B);var U=this;function ct(k){var B=H(U.src),F=B.lineAt(U.pos),G=B.columnAt(U.pos),j=U.filename;$(k,{location:(j||"(unknown file)")+":"+F+":"+G})}var dt=j.createNotifiers(U,k);this.notifiers=dt;var lt,ut,ft,bt,pt,vt,gt,mt,yt,_t,Et,wt,Tt,St,At,Ct,Ot,It,Dt=B&&!1===B.concise?1:2,Rt=B&&B.isOpenTagOnly,Pt=B&&B.ignorePlaceholders,Mt=B&&B.ignoreNonstandardStringPlaceholders,Nt=!0===B.legacyCompatibility,xt="html";function Lt(k){0===arguments.length&&(k=vt),dt.notifyText(k,xt),vt=""}function kt(){wt&&!lt.withinAttrGroup&&te()}function Bt(k){At=Et,St=k;var B=q(mt);if(mt.push({type:"html",delimiter:k,indent:Et}),!B||!B.body)return U.enterState(Me);if(1===B.body)U.enterState(Be);else{if(2!==B.body)throw new Error("Illegal value for parent.body: "+B.body);U.enterState(ke)}}function Ut(){vt&&(Tt||St)&&(vt=vt.replace(/(\r\n|\n)$/,"")),Lt();for(let B=mt.length-1;B>=0;B--){var k=mt[B];if("html"===k.type){mt.pop();break}return void Qt(k.pos,"MISSING_END_TAG",'Missing ending "'+k.tagName+'" tag')}At=null,St=null,Tt=!1,U.state!==Ne&&U.enterState(Ne)}function Ft(){for(Lt();mt.length;){var k=q(mt);if("tag"===k.type){if(!k.concise)return void Qt(k.pos,"MISSING_END_TAG",'Missing ending "'+k.tagName+'" tag');ee(k.expectedCloseTagName)}else{if("html"!==k.type)throw new Error("Illegal state. There should not be any non-concise tags on the stack when in concise mode");mt.pop()}}}function Gt(){if(wt){if(lt.withinAttrGroup)return void Qt(lt.pos,"MALFORMED_OPEN_TAG",'EOF reached while within an attribute group (e.g. "[ ... ]").');te(),Ft()}else Qt(lt.pos,"MALFORMED_OPEN_TAG","EOF reached while parsing open tag")}this.reset=function(){F.prototype.reset.call(this),vt="",lt=void 0,ut=void 0,ft=void 0,bt=void 0,pt=void 0,gt=!1,mt=[],yt=[],_t=void 0,Et="",wt=2===Dt,Tt=!1,St=null,At=null,Ct=!1,Ot=!1,It=0},this.reset();var jt=dt.notifyCDATA,$t=dt.notifyComment,Ht=dt.notifyOpenTag,Vt=dt.notifyOpenTagName,Wt=dt.notifyCloseTag,qt=dt.notifyDocumentType,Kt=dt.notifyDeclaration,zt=dt.notifyPlaceholder,Yt=dt.notifyScriptlet;function Qt(k,B,F){U.end(),dt.notifyError(k,B,F)}function Xt(){return ut={},lt.attributes===rt?lt.attributes=[ut]:lt.attributes.push(ut),U.enterState(We),ut}function Zt(){ut=null,U.state!==Ve&&U.enterState(Ve)}function Jt(){Lt();var k={type:"tag",tagName:"",tagNameParts:null,attributes:[],argument:void 0,params:void 0,pos:U.pos,indent:Et,nestedIndent:null,concise:wt};return gt=!0,Ct&&(k.beginMixedMode=!0,Ct=!1),mt.push(k),lt=k,U.enterState(Ue),lt}function te(k){var B=lt.tagName,F=lt.attributes,G=lt.parseOptions;if(G&&!0===G.ignoreAttributes)F.length=0;else{if(lt.requiresCommas&&F.length>1)for(let k=0;k1)for(let k=0;k")||U.lookAheadFor("/"+q(mt).tagName+">")||U.lookAheadFor("/"+pt+">");return!!k&&(U.state===ei&&be(),Lt(),ee(pt,U.pos,U.pos+1+k.length),U.skip(k.length),U.enterState(Me),!0)}function Re(){return!!U.lookAheadFor("![CDATA[")&&(function(){Lt();var k=ie();k.value="",U.enterState($e)}(),U.skip(8),!0)}function Pe(k){let B=At+St;if(U.lookAheadFor(B,U.pos+k.length))return U.skip(At.length),U.skip(St.length),U.enterState(Ne),void ve(ye);U.lookAheadFor(At,U.pos+k.length)?U.skip(At.length):At&&!Oe()&&Ut()}var Me=ht.createState({name:"STATE_HTML_CONTENT",placeholder(k){},eol(k){vt+=k,Ct?(Ct=!1,Ut()):Ot?(Ot=!1,Ut()):Tt?Ut():St&&Pe(k)},eof:Ft,enter(){xt="html",wt=!1},char(k,B){if(B===Y){if(Re())return;var F=U.lookAtCharCodeAhead(1);37===F?(he(),U.skip(1)):U.lookAheadFor("!--")?(pe(),U.skip(3)):33===F?(!function(){Lt();var k=ie();k.value="",U.enterState(ii)}(),U.skip(1)):63===F?(!function(){Lt();var k=ie();k.value="",U.enterState(si)}(),U.skip(1)):F===z?(bt=U.pos,ft=null,U.skip(1),Lt(),U.enterState(He)):F===Q||F===Y||V(F)?vt+="<":(Jt(),lt.tagNameStart=U.pos+1)}else!Pt&&Ae(0,B)?(vt+="\\",U.skip(1)):!Pt&&Se(0,B)?(vt+="$",U.skip(1)):!Pt&&Te(0,B)?Lt():!Nt&&B===nt&&V(U.lookAtCharCodeAhead(1))&&(G=U.substring(0,U.pos).split("\n"),j=G[G.length-1],/^\s*$/.test(j))?(U.skip(1),ce()):vt+=k;var G,j}}),Ne=ht.createState({name:"STATE_CONCISE_HTML_CONTENT",eol(k){vt+=k,Et=""},eof:Ft,enter(){wt=!0,Et=""},comment(k){var B=k.value;B=B.trim(),$t({value:B,pos:k.pos,endPos:k.endPos}),"block"===k.type&&ve(me)},endTrailingWhitespace(k){Ut(),k&&Ft()},char(k,B){if(V(B))Et+=k;else{for(;;){let k=mt.length;if(!k){if(Et)return void Qt(U.pos,"BAD_INDENTATION","Line has extra indentation at the beginning");break}{let B=mt[k-1];if(!(B.indent.length>=Et.length))break;ee(B.expectedCloseTagName)}}var F,G=mt.length&&mt[mt.length-1];if(G){if(F=G.body,G.openTagOnly)return void Qt(U.pos,"INVALID_BODY",'The "'+G.tagName+'" tag does not allow nested body content');if(G.nestedIndent){if(G.nestedIndent.length!==Et.length)return void Qt(U.pos,"BAD_INDENTATION","Line indentation does match indentation of previous line")}else G.nestedIndent=Et}if(F&&B!==st)return void Qt(U.pos,"ILLEGAL_LINE_START",'A line within a tag that only allows text content must begin with a "-" character');if(B===Y||Nt&&B===nt)return B===nt&&ct('Handling of a placeholder (i.e. "${...}") at the start of a concise line will be changing.\nA placeholder at the start of a concise line will now be handled as a tag name placeholder instead of a body text placeholder.\nSwitch to using "-- ${...}" to avoid breakage.\nSee: https://github.com/marko-js/htmljs-parser/issues/48'),Ct=!0,U.rewind(1),void Bt();if(!Nt&&B===nt&&V(U.lookAtCharCodeAhead(1)))return U.skip(1),void ce();if(B===st){if(U.lookAtCharCodeAhead(1)!==st){if(!Nt)return void Qt(U.pos,"ILLEGAL_LINE_START",'A line in concise mode cannot start with a single hyphen. Use "--" instead. See: https://github.com/marko-js/htmljs-parser/issues/43');ct('The usage of a single hyphen at the start of a concise line is now deprecated. Use "--" instead.\nSee: https://github.com/marko-js/htmljs-parser/issues/43')}return St=k,U.enterState(xe)}if(B===z){var j=U.lookAtCharCodeAhead(1);return j===z?(ue(),void U.skip(1)):j===it?(fe(),void U.skip(1)):void Qt(U.pos,"ILLEGAL_LINE_START",'A line in concise mode cannot start with "/" unless it starts a "//" or "/*" comment')}Jt(),lt.tagNameStart=U.pos,U.rewind(1)}}}),xe=ht.createState({name:"STATE_BEGIN_DELIMITED_HTML_BLOCK",eol:function(k){Bt(St),Pe(k)},eof:Ft,char(k,B){B===st?St+=k:Oe()||(Tt=!0,Bt())}}),Le=ht.createState({name:"STATE_CHECK_TRAILING_WHITESPACE",eol:function(){ge(null,!1)},eof:function(){ge(null,!0)},char(k,B){V(B)||ge({ch:k})}}),ke=ht.createState({name:"STATE_STATIC_TEXT_CONTENT",enter(){xt="static-text"},eol(k){vt+=k,Tt?Ut():St&&Pe(k)},eof:Ft,char(k,B){!wt&&B===Y&&De()||(vt+=k)}}),Be=ht.createState({name:"STATE_PARSED_TEXT_CONTENT",enter(){xt="parsed-text"},placeholder:Me.placeholder,comment(k){vt+=k.rawValue,St&&k.eol&&Pe(k.eol)},templateString(k){vt+=k.value},eol(k){vt+=k,Tt?Ut():St&&Pe(k)},eof:Ft,char(k,B){if(!wt&&B===Y){if(De())return;if(Re())return;if(37===U.lookAtCharCodeAhead(1))return he(),void U.skip(1)}if(B===z){if(U.lookAtCharCodeAhead(1)===it)return fe(),void U.skip(1);if(U.lookAtCharCodeAhead(1)===z)return ue(),void U.skip(1)}if(96!==B){if(!Pt&&Ae(0,B))U.skip(1);else{if(!Pt&&Se(0,B))return vt+="$",void U.skip(1);if(!Pt&&Te(0,B))return void Lt()}vt+=k}else oe()}}),Ue=ht.createState({name:"STATE_TAG_NAME",eol:kt,eof:Gt,expression(k){lt.tagNameEnd=k.endPos,k.value&&(lt.tagName+=k.value,lt.tagNameParts&<.tagNameParts.push(JSON.stringify(k.value)))},placeholder(k){lt.tagNameParts||(lt.tagNameParts=[],lt.tagName&<.tagNameParts.push(JSON.stringify(lt.tagName))),lt.tagName+=U.substring(k.pos,k.endPos),lt.tagNameParts.push("("+k.value+")"),lt.tagNameEnd=k.endPos,U.lookAtCharCodeAhead(1)===Z&&(ae(),U.enterState(Fe))},enter(k){k!==Ke&&ne()},char(k,B){throw new Error("Illegal state")}}),Fe=ht.createState({name:"STATE_TAG_ARGS",eol:kt,eof:Gt,expression(k){var B=k.value;if(B.charCodeAt(B.length-1)!==J)throw new Error("Invalid argument");k.value=B.slice(1,B.length-1),k.pos+=1,k.endPos-=1,lt.argument=k,U.lookAtCharCodeAhead(1)===at?U.enterState(Ge):U.enterState(Ve)},enter(k){k!==Ke&&ne()},char(k,B){throw new Error("Illegal state")}}),Ge=ht.createState({name:"STATE_TAG_PARAMS",eol:kt,eof:Gt,expression(k){var B=k.value;k.value=B.slice(1),k.pos+=1,lt.params=k,U.enterState(Ve)},enter(k){k!==Ke&&ne()},char(k,B){throw new Error("Illegal state")}}),je=ht.createState({name:"STATE_TAG_VAR",eol:kt,eof:Gt,expression(k){var B=k.value;k.value=B.slice(1),k.pos+=1,lt.var=k,U.lookAtCharCodeAhead(1)===at?U.enterState(Ge):U.lookAtCharCodeAhead(1)===Z?U.enterState(Fe):U.enterState(Ve)},enter(k){k!==Ke&&ne()},char(k,B){throw new Error("Illegal state")}}),$e=ht.createState({name:"STATE_CDATA",enter(){xt="cdata"},eof(){Qt(_t.pos,"MALFORMED_CDATA","EOF reached while parsing CDATA")},char(k,B){if(B===X){var F=U.lookAheadFor("]>");if(F)return G=se(),jt(G.value,G.pos,U.pos+3),void U.skip(F.length)}var G;_t.value+=k}}),He=ht.createState({name:"STATE_CLOSE_TAG",eof(){Qt(ee.pos,"MALFORMED_CLOSE_TAG","EOF reached while parsing closing tag")},enter(){ft=""},char(k,B){B===Q?(ft.length>0?ee(ft,bt,U.pos+1):ee(pt,bt,U.pos+1),U.enterState(Me)):ft+=k}}),Ve=ht.createState({name:"STATE_WITHIN_OPEN_TAG",eol:kt,eof:Gt,enter(){lt.notifiedOpenTagName||(lt.notifiedOpenTagName=!0,lt.tagNameEndPos=U.pos,Vt(lt))},expression(k){var B=we(k);if(B)if(0===lt.attributes.length){if(null!=lt.argument)return void Qt(k.endPos,"ILLEGAL_TAG_ARGUMENT","A tag can only have one argument");lt.argument=B}else{let U=ut||q(lt.attributes);if(null!=U.argument)return void Qt(k.endPos,"ILLEGAL_ATTRIBUTE_ARGUMENT","An attribute can only have one argument");U.argument=B}},placeholder(k){Xt().value=k.value,Zt(),U.enterState(Ye)},comment(k){},char(k,B){if(wt){if(B===st){if(U.lookAtCharCodeAhead(1)!==st){if(!Nt)return void Qt(lt.pos,"MALFORMED_OPEN_TAG",'"-" not allowed as first character of attribute name');ct('The usage of a single hyphen in a concise line is now deprecated. Use "--" instead.\nSee: https://github.com/marko-js/htmljs-parser/issues/43')}if(lt.withinAttrGroup)return void Qt(U.pos,"MALFORMED_OPEN_TAG","Attribute group was not properly ended");te(),St=k;var F=function(){var k=/[^\n]*\n(\s+)/.exec(U.substring(U.pos));if(k){var B=k[1].split(/\n/g);return B[B.length-1]}}();return F>Et&&(Et=F),void U.enterState(xe)}if(91===B)return lt.withinAttrGroup?void Qt(U.pos,"MALFORMED_OPEN_TAG",'Unexpected "[" character within open tag.'):void(lt.withinAttrGroup=!0);if(B===X)return lt.withinAttrGroup?void(lt.withinAttrGroup=!1):void Qt(U.pos,"MALFORMED_OPEN_TAG",'Unexpected "]" character within open tag.')}else{if(B===Q)return void te();if(B===z){if(U.lookAtCharCodeAhead(1)===Q)return te(!0),void U.skip(1)}}if(Ae(0,B)){return Xt().name="\\",void U.skip(1)}if(Se(0,B)){return Xt().name="$",void U.skip(1)}if(!Te(0,B))return B===Y?Qt(U.pos,"ILLEGAL_ATTRIBUTE_NAME",'Invalid attribute name. Attribute name cannot begin with the "<" character.'):B===z&&U.lookAtCharCodeAhead(1)===it?(fe(),void U.skip(1)):void(V(B)||(B===Z?(U.rewind(1),ne()):(U.rewind(1),Xt())))}}),We=ht.createState({name:"STATE_ATTRIBUTE_NAME",eol:kt,eof:Gt,expression(k){var B=we(k);B&&(ut.argument=B),k.endedWithComma?(Ie(),lt.requiresCommas=!0,ut.endedWithComma=!0):Ce("=",0)||(lt.lastAttrNoComma=!0),ut.name=ut.name?ut.name+k.value:k.value,ut.pos=k.pos,ut.endPos=k.endPos,ut.name||(ut.name="default",ut.default=!0)},enter(k){if(lt.requiresCommas&<.lastAttrNoComma){var B=lt.parseOptions;if(!B||!0!==B.relaxRequireCommas)return Qt(U.pos,"COMMAS_REQUIRED","if commas are used, they must be used to separate all attributes for a tag")}k!==Ke&&ne()},char(k,B){throw new Error("Illegal state")}}),qe=ht.createState({name:"STATE_ATTRIBUTE_VALUE",expression(k){var B=k.value;if(""===B)return Qt(k.pos,"ILLEGAL_ATTRIBUTE_VALUE",'No attribute value found after "="');k.endedWithComma?(Ie(),lt.requiresCommas=!0,ut.endedWithComma=!0):lt.lastAttrNoComma=!0,k.hasUnenclosedWhitespace&&(lt.hasUnenclosedWhitespace=!0),ut.value=B,ut.pos=k.pos,ut.endPos=k.endPos,k.isStringLiteral?ut.literalValue=function(k,B,U){"'"===k.charAt(0)&&(k='"'+(k=(k=k.substring(1,k.length-1)).replace(/\\\\|\\[']|\\["]|["]/g,(function(k){return"\\'"===k?"'":'"'===k?'\\"':k})))+'"');try{return JSON.parse(k)}catch(e){U(B,"INVALID_STRING","Invalid string ("+k+"): "+e)}}(B,k.pos,Qt):"true"===B?ut.literalValue=!0:"false"===B?ut.literalValue=!1:"null"===B?ut.literalValue=null:"undefined"===B?ut.literalValue=void 0:W.test(B)&&(ut.literalValue=Number(B)),Zt()},eol:kt,eof:Gt,enter(k){k!==Ke&&ne()},char(k,B){throw new Error("Illegal state")}}),Ke=ht.createState({name:"STATE_EXPRESSION",eol(k){if(0===_t.groupStack.length){if(_t.parentState===We||_t.parentState===qe)return _t.endPos=U.pos,ae(),Zt(),void(wt&&kt());if(_t.parentState===Ue)return _t.endPos=U.pos,ae(),U.state!==Ve&&U.enterState(Ve),void(wt&&kt())}_t.value+=k},eof(){if(!wt||0!==_t.groupStack.length){let k=_t.parentState;return k===We?Qt(_t.pos,"MALFORMED_OPEN_TAG",'EOF reached while parsing attribute name for the "'+lt.tagName+'" tag'):k===qe?Qt(_t.pos,"MALFORMED_OPEN_TAG",'EOF reached while parsing attribute value for the "'+ut.name+'" attribute'):k===Ue?Qt(_t.pos,"MALFORMED_OPEN_TAG","EOF reached while parsing tag name"):k===Qe?Qt(_t.pos,"MALFORMED_PLACEHOLDER","EOF reached while parsing placeholder"):Qt(_t.pos,"INVALID_EXPRESSION","EOF reached while parsing expression")}_t.endPos=U.pos,ae(),Gt()},string(k){""===_t.value?_t.isStringLiteral=!0===k.isStringLiteral:_t.isStringLiteral=!1,_t.value+=k.value},comment(k){_t.isStringLiteral=!1,_t.value+=k.rawValue},templateString(k){_t.isStringLiteral=!1,_t.value+=k.value},regularExpression(k){_t.isStringLiteral=!1,_t.value+=k.value},char(k,B){let F=_t.groupStack.length,j=_t.parentState;if(39===B)return re("'",39);if(34===B)return re('"',34);if(96===B)return oe();if(B===z){var $=U.lookAtCharCodeAhead(1);if($===z)return ue(),void U.skip(1);if($===it)return fe(),void U.skip(1);if(0===F&&!wt&&$===Q)return _t.endPos=U.pos,ae(),U.rewind(1),void(U.state!==Ve&&U.enterState(Ve));if(!/[\]})A-Z0-9.<%]/i.test(function(k){for(var B=null==k?-1:k;V(U.lookAtCharCodeAhead(B));)B--;return U.lookAtCharAhead(B)}()))return ie().value="/",void U.enterState(Je)}else if(B===at&&j===Ge){if(0===F)return _t.groupStack.push(B),_t.isStringLiteral=!1,void(_t.value+=k);if(1===F)return void ae()}else{if(B===Z||91===B||B===tt)return 0===F&&B===Z&&(_t.lastLeftParenPos=_t.value.length),_t.groupStack.push(B),_t.isStringLiteral=!1,void(_t.value+=k);if(B===J||B===X||B===et){if(0===F){if(B!==X)return Qt(_t.pos,"INVALID_EXPRESSION",'Mismatched group. A closing "'+k+'" character was found but it is not matched with a corresponding opening character.');if(lt.withinAttrGroup)return _t.endPos=U.pos+1,ae(),U.rewind(1),void(U.state!==Ve&&U.enterState(Ve))}let G=_t.groupStack.pop();if(B===J&&G!==Z||B===X&&91!==G||B===et&&G!==tt)return Qt(_t.pos,"INVALID_EXPRESSION",'Mismatched group. A "'+k+'" character was found when "'+String.fromCharCode(G)+'" was expected.');if(_t.value+=k,0===_t.groupStack.length)if(B===J&&(_t.lastRightParenPos=_t.value.length-1),B===et&&j===Qe||B===J&&j===Fe)return _t.endPos=U.pos+1,void ae();return}}var H,W,q;if(0===F){if(!wt&&B===Q&&(j===Ue||j===We||j===qe||j===Ve))return _t.endPos=U.pos,ae(),Zt(),U.rewind(1),void(U.state!==Ve&&U.enterState(Ve));if(59===B)return ae(),Zt(),void(wt&&(te(),ve((function(k){if(k){var B=k.ch.charCodeAt(0);if(B===z){if(U.lookAheadFor("/"))return ue(),void U.skip(1);if(U.lookAheadFor("*"))return fe(),void U.skip(1)}else if(B===Y&&U.lookAheadFor("!--"))return pe(),void U.skip(3);Qt(U.pos,"INVALID_CODE_AFTER_SEMICOLON","A semicolon indicates the end of a line. Only comments may follow it.")}}))));if(44===B||V(B)){if(44===B||Ce(","))44!==B&&(Ie(),U.skip(1)),_t.endedWithComma=!0;else{if(_t.parentState===We&&Ce("="))return void Ie();if(j!==Ue){var K=(W=U.data.substring(U.pos),!!(q=/^\s+typeof\s+/.exec(W))&&q[0]);if(K)return _t.value+=K,_t.isStringLiteral=!1,_t.hasUnenclosedWhitespace=!0,void U.skip(K.length-1);var st=function(){var k=U.data.substring(U.pos),B=G.patternNext.exec(k);if(B){var F=B[0],j=B[1];if(Nt&&"-"===j)return!1;if(!(wt?F.includes("["):F.includes(">")))return U.skip(F.length-1),F}else{var $=U.substring(U.pos-G.longest,U.pos);if(G.patternPrev.exec($))return U.rewind(1),Ie()}return!1}();if(st)return _t.isStringLiteral=!1,_t.hasUnenclosedWhitespace=!0,void(_t.value+=st)}}return _t.endPos=U.pos,ae(),Zt(),void(U.state!==Ve&&U.enterState(Ve))}if(61===B&&j===We)return _t.endPos=U.pos,ae(),U.enterState(qe),void Ie();if(""===_t.value){let k=function(){var k=U.data.substring(U.pos),B=/^typeof\s+/.exec(k);return!!B&&B[0]}();if(k)return _t.value+=k,_t.isStringLiteral=!1,_t.hasUnenclosedWhitespace=!0,void U.skip(k.length-1)}if(_t.parentState===Ge&&B===at)return ae(),U.rewind(1),void U.enterState(Ge);if(_t.parentState===je&&(61===B||B===Q))return ae(),U.rewind(1),void(U.state!==Ve&&U.enterState(Ve));if(_t.parentState===Ue){if(Ae(0,B))return _t.value+="\\",void U.skip(1);if(Se(0,B))return _t.value+="$",void U.skip(1);if(B===nt&&U.lookAtCharCodeAhead(1)===tt)return _t.endPos=U.pos,ae(),void _e(!0,!0);if(46===B||35===B)return ae(),U.rewind(1),(H=ie()).currentPart=null,H.hasId=!1,H.beginPart=function(k){H.currentPart={type:k,stringParts:[],rawParts:[],text:"",_endText(){var k=this.text;k&&(this.stringParts.push(JSON.stringify(k)),this.rawParts.push({text:k,pos:U.pos-k.length,endPos:U.pos})),this.text=""},addPlaceholder(k){var B=k.pos+(k.escape?2:3),F=k.endPos-1;this._endText(),this.stringParts.push("("+k.value+")"),this.rawParts.push({expression:U.src.slice(B,F),pos:B,endPos:F})},end(){this._endText();var B=this.stringParts.join("+");"id"===k?lt.shorthandId={value:B,rawParts:this.rawParts}:"class"===k&&(lt.shorthandClassNames||(lt.shorthandClassNames=[]),lt.shorthandClassNames.push({value:B,rawParts:this.rawParts}))}}},void U.enterState(ze);if(B===z)return ae(),U.rewind(1),void U.enterState(je)}if(_t.parentState===Ue||_t.parentState===je){if(B===at)return ae(),U.rewind(1),void U.enterState(Ge);if(61===B)return ae(),U.rewind(1),void U.enterState(Ve);if(U.lookAtCharCodeAhead(1)===Z&&_t.value)return _t.value+=k,ae(),void U.enterState(Fe)}}_t.isStringLiteral=!1,_t.value+=k}}),ze=ht.createState({name:"STATE_TAG_NAME_SHORTHAND",placeholder(k){_t.currentPart.addPlaceholder(k)},eol(k){lt.tagNameEnd=U.pos,Ee(),U.state!==Ve&&U.enterState(Ve),wt&&kt()},eof(){if(Ee(),!wt)return Qt(_t.pos,"INVALID_TAG_SHORTHAND","EOF reached will parsing id/class shorthand in tag name");Gt()},char(k,B){var F=_t;if(!wt&&(B===Q||B===z))return lt.tagNameEnd=U.pos,Ee(),void U.rewind(1);if(V(B))return Ee(),lt.tagNameEnd=U.pos,void(U.state!==Ve&&U.enterState(Ve));if(46===B)F.currentPart&&F.currentPart.end(),F.beginPart("class");else if(35===B){if(F.hasId)return Qt(_t.pos,"INVALID_TAG_SHORTHAND","Multiple shorthand ID parts are not allowed on the same tag");F.hasId=!0,F.currentPart&&F.currentPart.end(),F.beginPart("id")}else!Pt&&Ae(0,B)?(F.currentPart.text+="\\",U.skip(1)):!Pt&&Se(0,B)?(F.currentPart.text+="$",U.skip(1)):!Pt&&Te(0,B)||(B===Z?(Ee(),U.rewind(1),U.enterState(Fe)):B===at?(Ee(),U.rewind(1),U.enterState(Ge)):F.currentPart.text+=k)}}),Ye=ht.createState({name:"STATE_AFTER_PLACEHOLDER_WITHIN_TAG",eol:kt,eof:Gt,char(k,B){if(!wt){if(B===Q)return void te();if(B===z){if(U.lookAtCharCodeAhead(1)===Q)return te(!0),void U.skip(1)}}V(B)?U.enterState(Ve):Qt(U.pos,"UNEXPECTED_TEXT_AFTER_PLACEHOLDER_IN_TAG",`An unexpected "${k}" character was found after a placeoholder within the open tag.`)}}),Qe=ht.createState({name:"STATE_PLACEHOLDER",expression(k){_t.value=k.value.slice(1,-1),_t.endPos=k.endPos,function(){var k=se();if(It--,!k.withinTemplateString){var B=zt(k);k.value=B}k.parentState.placeholder(k)}()},eol(k){throw new Error("Illegal state. EOL not expected")},eof(){throw new Error("Illegal state. EOF not expected")},enter(k){k!==Ke&&ne()}}),Xe=ht.createState({name:"STATE_STRING",placeholder(k){_t.currentText&&(_t.stringParts.push(_t.currentText),_t.currentText=""),_t.isStringLiteral=!1,_t.stringParts.push(k)},eol(k){2===k.length?_t.currentText+="\\r\\n":_t.currentText+="\\n"},eof(){Qt(U.pos,"INVALID_STRING",It>0?"EOF reached while parsing string expression found inside placeholder":"EOF reached while parsing string expression")},char(k,B){var F,G,j=_t.stringParts,$=_t.quoteCharCode;if(B===K)Ae(0,B)?_t.currentText+=Pt?"\\\\\\\\":"\\":Se(0,B)?_t.currentText+=Pt?"\\\\$":"$":(F=U.lookAtCharAhead(1),_t.currentText+=k+F),U.skip(1);else if(B===$){_t.currentText&&j.push(_t.currentText);let k="",B=_t.quoteChar;if(j.length)for(let U=0;U1&&(k="("+k+")"),_t.value=k,(G=se()).value=dt.notifyString(G),G.parentState.string(G)}else Pt||Mt||!Te(0,B)?_t.currentText+=k:(_t.currentText&&j.push(_t.currentText),_t.currentText="",_t.isStringLiteral=!1)}}),Ze=ht.createState({name:"STATE_TEMPLATE_STRING",placeholder:function(k){_t.value+="${"+k.value+"}"},eol(k){_t.value+=k},eof(){Qt(U.pos,"INVALID_TEMPLATE_STRING","EOF reached while parsing template string expression")},char(k,B){var F,G;B===nt&&U.lookAtCharCodeAhead(1)===tt?_e(!1):(_t.value+=k,B===K?(F=U.lookAtCharAhead(1),U.skip(1),_t.value+=F):96===B&&(G=se()).parentState.templateString(G))}}),Je=ht.createState({name:"STATE_REGULAR_EXPRESSION",eol(){Qt(U.pos,"INVALID_REGULAR_EXPRESSION","EOL reached while parsing regular expression")},eof(){Qt(U.pos,"INVALID_REGULAR_EXPRESSION","EOF reached while parsing regular expression")},char(k,B){var F,G;_t.value+=k,B===K?(F=U.lookAtCharAhead(1),U.skip(1),_t.value+=F):91===B&&_t.inCharacterSet?_t.inCharacterSet=!0:B===X&&_t.inCharacterSet?_t.inCharacterSet=!1:B!==z||_t.inCharacterSet||(G=se()).parentState.regularExpression(G)}}),ti=ht.createState({name:"STATE_JS_COMMENT_BLOCK",eol(k){_t.value+=k},eof(){Qt(_t.pos,"MALFORMED_COMMENT","EOF reached while parsing multi-line JavaScript comment")},char(k,B){if(B===it&&U.lookAtCharCodeAhead(1)===z)return _t.endPos=U.pos+2,be(),void U.skip(1);_t.value+=k}}),ei=ht.createState({name:"STATE_JS_COMMENT_LINE",eol(k){U.rewind(k.length),_t.endPos=U.pos,be()},eof(){_t.endPos=U.pos,be()},char(k,B){_t.parentState===Be&&!wt&&B===Y&&De()||(_t.value+=k)}}),ii=ht.createState({name:"STATE_DTD",eol(k){_t.value+=k},eof(){Qt(_t.pos,"MALFORMED_DOCUMENT_TYPE","EOF reached while parsing document type")},char(k,B){var F;B===Q?(_t.endPos=U.pos+1,F=se(),qt(F)):_t.value+=k}}),si=ht.createState({name:"STATE_DECLARATION",eol(k){_t.value+=k},eof(){Qt(_t.pos,"MALFORMED_DECLARATION","EOF reached while parsing declaration")},char(k,B){63===B?U.lookAtCharCodeAhead(1)===Q&&(_t.endPos=U.pos+2,le(),U.skip(1)):B===Q?(_t.endPos=U.pos+1,le()):_t.value+=k}}),ni=ht.createState({name:"STATE_HTML_COMMENT",eol(k){_t.value+=k},eof(){Qt(_t.pos,"MALFORMED_COMMENT","EOF reached while parsing comment")},char(k,B){if(45===B){var F=U.lookAheadFor("->");F?(_t.endPos=U.pos+3,(G=se()).endPos=U.pos+3,$t(G),U.skip(F.length)):_t.value+=k}else _t.value+=k;var G}}),ai=ht.createState({name:"STATE_SCRIPTLET",eol(k){_t.value+=k},eof(){Qt(_t.pos,"MALFORMED_SCRIPTLET","EOF reached while parsing scriptlet")},comment(k){_t.value+=k.rawValue},char(k,B){if(_t.quoteCharCode)return _t.value+=k,void(B===K?(_t.value+=U.lookAtCharAhead(1),U.skip(1)):B===_t.quoteCharCode&&(_t.quoteCharCode=null));if(B===z){if(U.lookAtCharCodeAhead(1)===it)return fe(),void U.skip(1)}else if(39===B||34===B)_t.quoteCharCode=B;else if(37===B&&U.lookAtCharCodeAhead(1)===Q)return F=U.pos+2,(G=se()).endPos=F,Yt(G),void U.skip(1);var F,G;_t.value+=k}}),ri=ht.createState({name:"STATE_INLINE_SCRIPT",eol(k){_t.endMatch||96===_t.stringType?_t.value+=k:(U.rewind(k.length),de(U.pos))},eof(){_t.endMatch||_t.stringType?Qt(_t.pos,"MALFORMED_SCRIPTLET","EOF reached while parsing scriptet"):de(U.pos)},comment(k){_t.value+=k.rawValue},char(k,B){if(B===K)return _t.value+=k+U.lookAtCharAhead(1),void U.skip(1);if(_t.stringType)return B===_t.stringType&&(_t.stringType=null),void(_t.value+=k);if(B===z){var F=U.lookAtCharCodeAhead(1);if(F===z)return ue(),void U.skip(1);if(F===it)return fe(),void U.skip(1)}if(_t.value+=k,B!==_t.endMatch)if(39!==B&&34!==B&&96!==B){var G=null;B===Z?G=J:B===tt?G=et:91===B&&(G=X),G&&(_t.endMatch&&_t.endMatches.push(_t.endMatch),_t.endMatch=G)}else _t.stringType=B;else _t.endMatch=_t.endMatches.pop()}});U.enterHtmlContentState=function(){U.state!==Me&&U.enterState(Me)},U.enterConciseHtmlContentState=function(){U.state!==Ne&&U.enterState(Ne)},U.enterParsedTextContentState=function(){var k=mt.length&&mt[mt.length-1];if(!k||!k.tagName)throw new Error('The "parsed text content" parser state is only allowed within a tag');wt?(k.body=1,U.enterState(Ne)):U.enterState(Be)},U.enterJsContentState=U.enterParsedTextContentState,U.enterCssContentState=U.enterParsedTextContentState,U.enterStaticTextContentState=function(){var k=mt.length&&mt[mt.length-1];if(!k||!k.tagName)throw new Error('The "static text content" parser state is only allowed within a tag');wt?(k.body=2,U.enterState(Ne)):U.enterState(ke)},2===Dt?(U.setInitialState(Ne),U.enterDefaultState=function(){U.enterState(Ne)}):(U.setInitialState(Me),U.enterDefaultState=function(){U.enterState(Me)})}parse(k,B){super.parse(k,B),this.notifiers.notifyFinish()}}k.exports=ht},21052:(k,B)=>{var U={};["base","br","col","hr","embed","img","input","keygen","link","meta","param","source","track","wbr"].forEach((function(k){U[k]=!0})),B.isOpenTagOnly=function(k){return U.hasOwnProperty(k)}},64425:(k,B,U)=>{var F=U(3366);B.C=function(k,B){return new F(k,B||{})}},64101:(k,B)=>{B.createNotifiers=function(k,B){var U=!1;return{notifyText(F,G){if(!U){var j=B.onText;j&&F.length>0&&j.call(k,{type:"text",value:F,parseMode:G},k)}},notifyCDATA(F,G,j){if(!U){var $=B.onCDATA;$&&F&&$.call(k,{type:"cdata",value:F,pos:G,endPos:j},k)}},notifyError(F,G,j){if(!U){U=!0;var $=B.onError;$&&$.call(k,{type:"error",code:G,message:j,pos:F,endPos:k.pos},k)}},notifyOpenTagName(F){if(!U){var G=B.onOpenTagName;if(G){var j={type:"openTagName",tagName:F.tagName,tagNameExpression:F.tagNameExpression,emptyTagName:F.emptyTagName,pos:F.pos,endPos:F.tagNameEndPos,concise:F.concise};F.shorthandId&&(j.shorthandId=F.shorthandId),F.shorthandClassNames&&(j.shorthandClassNames=F.shorthandClassNames),j.setParseOptions=function(k){k&&(F.parseOptions=k)},G.call(k,j,k)}}},notifyOpenTag(F){if(!U){var G=B.onOpenTag;if(G){var j={type:"openTag",tagName:F.tagName,tagNameExpression:F.tagNameExpression,emptyTagName:F.emptyTagName,var:F.var,argument:F.argument,params:F.params,pos:F.pos,endPos:F.endPos,tagNameEndPos:F.tagNameEndPos,openTagOnly:F.openTagOnly,selfClosed:F.selfClosed,concise:F.concise};F.shorthandId&&(j.shorthandId=F.shorthandId),F.shorthandClassNames&&(j.shorthandClassNames=F.shorthandClassNames),j.attributes=F.attributes.map((k=>{var B={default:k.default,name:k.name,value:k.value,pos:k.pos,endPos:k.endPos,argument:k.argument};return k.hasOwnProperty("literalValue")&&(B.literalValue=k.literalValue),B})),j.setParseOptions=function(B){if(B){var U=B.state;U&&("parsed-text"===U?k.enterParsedTextContentState():"static-text"===U&&k.enterStaticTextContentState()),F.parseOptions=B}},G.call(k,j,k)}}},notifyCloseTag(F,G,j){if(!U){var $=B.onCloseTag;if($){var H={type:"closeTag",tagName:F,pos:G,endPos:j};$.call(k,H,k)}}},notifyDocumentType(F){if(!U){var G=B.onDocumentType;G&&G.call(this,{type:"documentType",value:F.value,pos:F.pos,endPos:F.endPos},k)}},notifyDeclaration(F){if(!U){var G=B.onDeclaration;G&&G.call(k,{type:"declaration",value:F.value,pos:F.pos,endPos:F.endPos},k)}},notifyComment(F){if(!U){var G=B.onComment;G&&F.value&&G.call(k,{type:"comment",value:F.value,pos:F.pos,endPos:F.endPos},k)}},notifyScriptlet(F){if(!U){var G=B.onScriptlet;G&&F.value&&G.call(k,{type:"scriptlet",tag:F.tag,line:F.line,block:F.block,value:F.value,pos:F.pos,endPos:F.endPos},k)}},notifyPlaceholder(F){if(!U){var G=B.onPlaceholder;if(G){var j={type:"placeholder",value:F.value,pos:F.pos,endPos:F.endPos,escape:!1!==F.escape,withinBody:!0===F.withinBody,withinAttribute:!0===F.withinAttribute,withinString:!0===F.withinString,withinOpenTag:!0===F.withinOpenTag,withinTagName:!0===F.withinTagName};return G.call(k,j,k),j.value}return F.value}},notifyString(F){if(!U){var G=B.onString;if(G){var j={type:"string",value:F.value,pos:F.pos,endPos:F.endPos,stringParts:F.stringParts,isStringLiteral:F.isStringLiteral};return G.call(k,j,k),j.value}return F.value}},notifyFinish(){B.onfinish&&B.onfinish.call(k,{},k)}}}},70456:(k,B)=>{var U=B.operators=["*","/","%","+","-","<<",">>",">>>","<","<=",">",">=","instanceof","in","==","!=","===","!==","&","^","|","&&","||","?",":","["];function F(k){return/^[A-Z]+$/i.test(k)?"\\b"+G(k)+"\\b":"/"===k?"\\/(?:\\b|\\s)":G(k)}function G(k){return k.replace(/([^\w\d])/g,"\\$1")}U.sort((function(k,B){return B.length-k.length})),B.longest=U.sort(((k,B)=>B.length-k.length))[0].length+1,B.patternNext=new RegExp("^\\s*("+U.map(F).join("|")+")\\s*(?!-)"),B.patternPrev=new RegExp("[^-+](?:"+U.concat(["typeof","new","void"]).map(F).join("|")+")(\\s*)$")},251:(k,B)=>{B.read=function(k,B,U,F,G){var j,$,H=8*G-F-1,V=(1<>1,q=-7,K=U?G-1:0,z=U?-1:1,Y=k[B+K];for(K+=z,j=Y&(1<<-q)-1,Y>>=-q,q+=H;q>0;j=256*j+k[B+K],K+=z,q-=8);for($=j&(1<<-q)-1,j>>=-q,q+=F;q>0;$=256*$+k[B+K],K+=z,q-=8);if(0===j)j=1-W;else{if(j===V)return $?NaN:1/0*(Y?-1:1);$+=Math.pow(2,F),j-=W}return(Y?-1:1)*$*Math.pow(2,j-F)},B.write=function(k,B,U,F,G,j){var $,H,V,W=8*j-G-1,q=(1<>1,z=23===G?Math.pow(2,-24)-Math.pow(2,-77):0,Y=F?0:j-1,Q=F?1:-1,X=B<0||0===B&&1/B<0?1:0;for(B=Math.abs(B),isNaN(B)||B===1/0?(H=isNaN(B)?1:0,$=q):($=Math.floor(Math.log(B)/Math.LN2),B*(V=Math.pow(2,-$))<1&&($--,V*=2),(B+=$+K>=1?z/V:z*Math.pow(2,1-K))*V>=2&&($++,V/=2),$+K>=q?(H=0,$=q):$+K>=1?(H=(B*V-1)*Math.pow(2,G),$+=K):(H=B*Math.pow(2,K-1)*Math.pow(2,G),$=0));G>=8;k[U+Y]=255&H,Y+=Q,H/=256,G-=8);for($=$<0;k[U+Y]=255&$,Y+=Q,$/=256,W-=8);k[U+Y-Q]|=128*X}},56698:k=>{"function"==typeof Object.create?k.exports=function(k,B){B&&(k.super_=B,k.prototype=Object.create(B.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}))}:k.exports=function(k,B){if(B){k.super_=B;var U=function(){};U.prototype=B.prototype,k.prototype=new U,k.prototype.constructor=k}}},47244:(k,B,U)=>{"use strict";var F=U(49092)(),G=U(38075)("Object.prototype.toString"),j=function(k){return!(F&&k&&"object"==typeof k&&Symbol.toStringTag in k)&&"[object Arguments]"===G(k)},$=function(k){return!!j(k)||null!==k&&"object"==typeof k&&"number"==typeof k.length&&k.length>=0&&"[object Array]"!==G(k)&&"[object Function]"===G(k.callee)},H=function(){return j(arguments)}();j.isLegacyArguments=$,k.exports=H?j:$},69600:k=>{"use strict";var B,U,F=Function.prototype.toString,G="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof G&&"function"==typeof Object.defineProperty)try{B=Object.defineProperty({},"length",{get:function(){throw U}}),U={},G((function(){throw 42}),null,B)}catch(Y){Y!==U&&(G=null)}else G=null;var j=/^\s*class\b/,$=function(k){try{var B=F.call(k);return j.test(B)}catch(e){return!1}},H=function(k){try{return!$(k)&&(F.call(k),!0)}catch(e){return!1}},V=Object.prototype.toString,W="function"==typeof Symbol&&!!Symbol.toStringTag,q=!(0 in[,]),K=function(){return!1};if("object"==typeof document){var z=document.all;V.call(z)===V.call(document.all)&&(K=function(k){if((q||!k)&&(void 0===k||"object"==typeof k))try{var B=V.call(k);return("[object HTMLAllCollection]"===B||"[object HTML document.all class]"===B||"[object HTMLCollection]"===B||"[object Object]"===B)&&null==k("")}catch(e){}return!1})}k.exports=G?function(k){if(K(k))return!0;if(!k)return!1;if("function"!=typeof k&&"object"!=typeof k)return!1;try{G(k,null,B)}catch(e){if(e!==U)return!1}return!$(k)&&H(k)}:function(k){if(K(k))return!0;if(!k)return!1;if("function"!=typeof k&&"object"!=typeof k)return!1;if(W)return H(k);if($(k))return!1;var B=V.call(k);return!("[object Function]"!==B&&"[object GeneratorFunction]"!==B&&!/^\[object HTML/.test(B))&&H(k)}},48184:(k,B,U)=>{"use strict";var F,G=U(36556),j=U(99721)(/^\s*(?:function)?\*/),$=U(49092)(),H=U(93628),V=G("Object.prototype.toString"),W=G("Function.prototype.toString");k.exports=function(k){if("function"!=typeof k)return!1;if(j(W(k)))return!0;if(!$)return"[object GeneratorFunction]"===V(k);if(!H)return!1;if(void 0===F){var B=function(){if(!$)return!1;try{return Function("return function*() {}")()}catch(e){}}();F=!!B&&H(B)}return H(k)===F}},14035:(k,B,U)=>{"use strict";var F,G=U(36556),j=U(49092)(),$=U(9957),H=U(75795);if(j){var V=G("RegExp.prototype.exec"),W={},q=function(){throw W},K={toString:q,valueOf:q};"symbol"==typeof Symbol.toPrimitive&&(K[Symbol.toPrimitive]=q),F=function(k){if(!k||"object"!=typeof k)return!1;var B=H(k,"lastIndex");if(!(B&&$(B,"value")))return!1;try{V(k,K)}catch(e){return e===W}}}else{var z=G("Object.prototype.toString");F=function(k){return!(!k||"object"!=typeof k&&"function"!=typeof k)&&"[object RegExp]"===z(k)}}k.exports=F},35680:(k,B,U)=>{"use strict";var F=U(25767);k.exports=function(k){return!!F(k)}},13798:k=>{"use strict";k.exports=function(k){return null!=k&&"object"==typeof k&&!1===Array.isArray(k)}},3431:(k,B)=>{var U,F,G,j;j=function(){function k(k){for(var B=k,U=[];B.parent;)U.unshift(B),B=B.parent;return U}var B={search:function(U,F,j,$){U.cleanDirty();var H=($=$||{}).heuristic||B.heuristics.manhattan,V=$.closest||!1,W=new G((function(k){return k.f})),q=F;for(F.h=H(F,j),W.push(F);W.size()>0;){var K=W.pop();if(K===j)return k(K);K.closed=!0;for(var z=U.neighbors(K),Y=0,Q=z.length;Y0&&(this.content[0]=B,this.bubbleUp(0)),k},remove:function(k){var B=this.content.indexOf(k),U=this.content.pop();B!==this.content.length-1&&(this.content[B]=U,this.scoreFunction(U)0;){var U=(k+1>>1)-1,F=this.content[U];if(!(this.scoreFunction(B){k.exports=U(33251)(window)},33251:function(k){k.exports=function(k){var B={};function U(k){return"string"==typeof k||k&&"object"==typeof k&&"[object String]"==Object.prototype.toString.call(k)||!1}function F(k,F){return k&&!U(k)&&(F=k,k=void 0),{key:k||B.defaults.key,storage:F||B.defaults.storage}}return B.defaults={key:"JWT_TOKEN",tokenPrefix:"Bearer ",storage:k.localStorage,padding:!1},B.encode64=function(U){var F=k.btoa(k.unescape(k.encodeURIComponent(U)));return B.defaults.padding?F:F.replace(/=+$/,"")},B.decode64=function(B){return k.decodeURIComponent(k.escape(k.atob(B)))},B.write=function(k){return B.defaults.tokenPrefix+B.encode64(JSON.stringify(k.header))+"."+B.encode64(JSON.stringify(k.claim))+"."+(k.signature||"")},B.read=function(k){0===k.indexOf(B.defaults.tokenPrefix)&&(k=k.substring(B.defaults.tokenPrefix.length));var U=k.split(".");return{header:JSON.parse(B.decode64(U[0])),claim:JSON.parse(B.decode64(U[1])),signature:U[2]||""}},B.validateClaim=function(k,B,U){var F=Date.now()/1e3;return k&&(!k.exp||k.exp>F)&&(!k.nbf||k.nbf{"use strict";k.exports=$,$.Item=V;var B=$.prototype,U=V.prototype,F=W.prototype,G="undefined"==typeof Symbol?void 0:Symbol.iterator;B.tail=B.head=null,$.of=function(){return H(new this,arguments)},$.from=function(k){return H(new this,k)},B.toArray=function(){var k=this.head,B=[];for(;k;)B.push(k),k=k.next;return B},B.prepend=function(k){var B=this,U=B.head;if(!k)return!1;if(!k.append||!k.prepend||!k.detach)throw new Error(j+"#prepend`.");if(U)return U.prepend(k);return k.detach(),k.list=B,B.head=k,B.size++,k},B.append=function(k){if(!k)return!1;if(!k.append||!k.prepend||!k.detach)throw new Error(j+"#append`.");var B=this,U=B.head,F=B.tail;if(F)return F.append(k);if(U)return U.append(k);return k.detach(),k.list=B,B.head=k,B.size++,k},void 0!==G&&(B[G]=function(){return new W(this.head)}),U.next=U.prev=U.list=null,U.prepend=function(k){if(!(k&&k.append&&k.prepend&&k.detach))throw new Error(j+"Item#prepend`.");var B=this,U=B.list,F=B.prev;if(!U)return!1;k.detach(),F&&(k.prev=F,F.next=k);k.next=B,k.list=U,B.prev=k,B===U.head&&(U.head=k);U.tail||(U.tail=B);return U.size++,k},U.append=function(k){if(!(k&&k.append&&k.prepend&&k.detach))throw new Error(j+"Item#append`.");var B=this,U=B.list,F=B.next;if(!U)return!1;k.detach(),F&&(k.next=F,F.prev=k);k.prev=B,k.list=U,B.next=k,B!==U.tail&&U.tail||(U.tail=k);return U.size++,k},U.detach=function(){var k=this,B=k.list,U=k.prev,F=k.next;if(!B)return k;B.tail===k&&(B.tail=U);B.head===k&&(B.head=F);B.tail===B.head&&(B.tail=null);U&&(U.next=F);F&&(F.prev=U);return k.prev=k.next=k.list=null,B.size--,k},F.next=function(){var k=this.item;return this.value=k,this.done=!k,this.item=k?k.next:void 0,this};var j="An argument without append, prepend, or detach methods was given to `List";function $(){this.size=0,0!==arguments.length&&H(this,arguments)}function H(k,B){var U,F,j,$;if(!B)return k;if(void 0!==G&&B[G])for($=B[G](),j={};!j.done;)j=$.next(),k.append(j&&j.value);else for(U=B.length,F=-1;++F{"use strict";k.exports=Math.abs},58968:k=>{"use strict";k.exports=Math.floor},94459:k=>{"use strict";k.exports=Number.isNaN||function(k){return k!=k}},6188:k=>{"use strict";k.exports=Math.max},68002:k=>{"use strict";k.exports=Math.min},75880:k=>{"use strict";k.exports=Math.pow},70414:k=>{"use strict";k.exports=Math.round},73093:(k,B,U)=>{"use strict";var F=U(94459);k.exports=function(k){return F(k)||0===k?k:k<0?-1:1}},45228:k=>{"use strict";var B=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;function G(k){if(null==k)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(k)}k.exports=function(){try{if(!Object.assign)return!1;var k=new String("abc");if(k[5]="de","5"===Object.getOwnPropertyNames(k)[0])return!1;for(var B={},U=0;U<10;U++)B["_"+String.fromCharCode(U)]=U;if("0123456789"!==Object.getOwnPropertyNames(B).map((function(k){return B[k]})).join(""))return!1;var F={};return"abcdefghijklmnopqrst".split("").forEach((function(k){F[k]=k})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},F)).join("")}catch(G){return!1}}()?Object.assign:function(k,j){for(var $,H,V=G(k),W=1;W{var F="function"==typeof Map&&Map.prototype,G=Object.getOwnPropertyDescriptor&&F?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,j=F&&G&&"function"==typeof G.get?G.get:null,$=F&&Map.prototype.forEach,H="function"==typeof Set&&Set.prototype,V=Object.getOwnPropertyDescriptor&&H?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,W=H&&V&&"function"==typeof V.get?V.get:null,q=H&&Set.prototype.forEach,K="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,z="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,Q=Boolean.prototype.valueOf,X=Object.prototype.toString,Z=Function.prototype.toString,J=String.prototype.match,tt=String.prototype.slice,et=String.prototype.replace,it=String.prototype.toUpperCase,st=String.prototype.toLowerCase,nt=RegExp.prototype.test,at=Array.prototype.concat,rt=Array.prototype.join,ot=Array.prototype.slice,ht=Math.floor,ct="function"==typeof BigInt?BigInt.prototype.valueOf:null,dt=Object.getOwnPropertySymbols,lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,ut="function"==typeof Symbol&&"object"==typeof Symbol.iterator,ft="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ut||"symbol")?Symbol.toStringTag:null,bt=Object.prototype.propertyIsEnumerable,pt=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(k){return k.__proto__}:null);function vt(k,B){if(k===1/0||k===-1/0||k!=k||k&&k>-1e3&&k<1e3||nt.call(/e/,B))return B;var U=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof k){var F=k<0?-ht(-k):ht(k);if(F!==k){var G=String(F),j=tt.call(B,G.length+1);return et.call(G,U,"$&_")+"."+et.call(et.call(j,/([0-9]{3})/g,"$&_"),/_$/,"")}}return et.call(B,U,"$&_")}var gt=U(42634),mt=gt.custom,yt=Ot(mt)?mt:null,_t={__proto__:null,double:'"',single:"'"},Et={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function wt(k,B,U){var F=U.quoteStyle||B,G=_t[F];return G+k+G}function Tt(k){return et.call(String(k),/"/g,""")}function St(k){return!ft||!("object"==typeof k&&(ft in k||void 0!==k[ft]))}function At(k){return"[object Array]"===Rt(k)&&St(k)}function Ct(k){return"[object RegExp]"===Rt(k)&&St(k)}function Ot(k){if(ut)return k&&"object"==typeof k&&k instanceof Symbol;if("symbol"==typeof k)return!0;if(!k||"object"!=typeof k||!lt)return!1;try{return lt.call(k),!0}catch(e){}return!1}k.exports=function k(B,F,G,H){var V=F||{};if(Dt(V,"quoteStyle")&&!Dt(_t,V.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Dt(V,"maxStringLength")&&("number"==typeof V.maxStringLength?V.maxStringLength<0&&V.maxStringLength!==1/0:null!==V.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var X=!Dt(V,"customInspect")||V.customInspect;if("boolean"!=typeof X&&"symbol"!==X)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Dt(V,"indent")&&null!==V.indent&&"\t"!==V.indent&&!(parseInt(V.indent,10)===V.indent&&V.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Dt(V,"numericSeparator")&&"boolean"!=typeof V.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var it=V.numericSeparator;if(void 0===B)return"undefined";if(null===B)return"null";if("boolean"==typeof B)return B?"true":"false";if("string"==typeof B)return Mt(B,V);if("number"==typeof B){if(0===B)return 1/0/B>0?"0":"-0";var nt=String(B);return it?vt(B,nt):nt}if("bigint"==typeof B){var ht=String(B)+"n";return it?vt(B,ht):ht}var dt=void 0===V.depth?5:V.depth;if(void 0===G&&(G=0),G>=dt&&dt>0&&"object"==typeof B)return At(B)?"[Array]":"[Object]";var mt=function(k,B){var U;if("\t"===k.indent)U="\t";else{if(!("number"==typeof k.indent&&k.indent>0))return null;U=rt.call(Array(k.indent+1)," ")}return{base:U,prev:rt.call(Array(B+1),U)}}(V,G);if(void 0===H)H=[];else if(Pt(H,B)>=0)return"[Circular]";function Et(B,U,F){if(U&&(H=ot.call(H)).push(U),F){var j={depth:V.depth};return Dt(V,"quoteStyle")&&(j.quoteStyle=V.quoteStyle),k(B,j,G+1,H)}return k(B,V,G+1,H)}if("function"==typeof B&&!Ct(B)){var It=function(k){if(k.name)return k.name;var B=J.call(Z.call(k),/^function\s*([\w$]+)/);if(B)return B[1];return null}(B),Nt=Ut(B,Et);return"[Function"+(It?": "+It:" (anonymous)")+"]"+(Nt.length>0?" { "+rt.call(Nt,", ")+" }":"")}if(Ot(B)){var Ft=ut?et.call(String(B),/^(Symbol\(.*\))_[^)]*$/,"$1"):lt.call(B);return"object"!=typeof B||ut?Ft:xt(Ft)}if(function(k){if(!k||"object"!=typeof k)return!1;if("undefined"!=typeof HTMLElement&&k instanceof HTMLElement)return!0;return"string"==typeof k.nodeName&&"function"==typeof k.getAttribute}(B)){for(var Gt="<"+st.call(String(B.nodeName)),jt=B.attributes||[],$t=0;$t"}if(At(B)){if(0===B.length)return"[]";var Ht=Ut(B,Et);return mt&&!function(k){for(var B=0;B=0)return!1;return!0}(Ht)?"["+Bt(Ht,mt)+"]":"[ "+rt.call(Ht,", ")+" ]"}if(function(k){return"[object Error]"===Rt(k)&&St(k)}(B)){var Vt=Ut(B,Et);return"cause"in Error.prototype||!("cause"in B)||bt.call(B,"cause")?0===Vt.length?"["+String(B)+"]":"{ ["+String(B)+"] "+rt.call(Vt,", ")+" }":"{ ["+String(B)+"] "+rt.call(at.call("[cause]: "+Et(B.cause),Vt),", ")+" }"}if("object"==typeof B&&X){if(yt&&"function"==typeof B[yt]&>)return gt(B,{depth:dt-G});if("symbol"!==X&&"function"==typeof B.inspect)return B.inspect()}if(function(k){if(!j||!k||"object"!=typeof k)return!1;try{j.call(k);try{W.call(k)}catch(Gt){return!0}return k instanceof Map}catch(e){}return!1}(B)){var Wt=[];return $&&$.call(B,(function(k,U){Wt.push(Et(U,B,!0)+" => "+Et(k,B))})),kt("Map",j.call(B),Wt,mt)}if(function(k){if(!W||!k||"object"!=typeof k)return!1;try{W.call(k);try{j.call(k)}catch(B){return!0}return k instanceof Set}catch(e){}return!1}(B)){var qt=[];return q&&q.call(B,(function(k){qt.push(Et(k,B))})),kt("Set",W.call(B),qt,mt)}if(function(k){if(!K||!k||"object"!=typeof k)return!1;try{K.call(k,K);try{z.call(k,z)}catch(Gt){return!0}return k instanceof WeakMap}catch(e){}return!1}(B))return Lt("WeakMap");if(function(k){if(!z||!k||"object"!=typeof k)return!1;try{z.call(k,z);try{K.call(k,K)}catch(Gt){return!0}return k instanceof WeakSet}catch(e){}return!1}(B))return Lt("WeakSet");if(function(k){if(!Y||!k||"object"!=typeof k)return!1;try{return Y.call(k),!0}catch(e){}return!1}(B))return Lt("WeakRef");if(function(k){return"[object Number]"===Rt(k)&&St(k)}(B))return xt(Et(Number(B)));if(function(k){if(!k||"object"!=typeof k||!ct)return!1;try{return ct.call(k),!0}catch(e){}return!1}(B))return xt(Et(ct.call(B)));if(function(k){return"[object Boolean]"===Rt(k)&&St(k)}(B))return xt(Q.call(B));if(function(k){return"[object String]"===Rt(k)&&St(k)}(B))return xt(Et(String(B)));if("undefined"!=typeof window&&B===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&B===globalThis||void 0!==U.g&&B===U.g)return"{ [object globalThis] }";if(!function(k){return"[object Date]"===Rt(k)&&St(k)}(B)&&!Ct(B)){var Kt=Ut(B,Et),zt=pt?pt(B)===Object.prototype:B instanceof Object||B.constructor===Object,Yt=B instanceof Object?"":"null prototype",Qt=!zt&&ft&&Object(B)===B&&ft in B?tt.call(Rt(B),8,-1):Yt?"Object":"",Xt=(zt||"function"!=typeof B.constructor?"":B.constructor.name?B.constructor.name+" ":"")+(Qt||Yt?"["+rt.call(at.call([],Qt||[],Yt||[]),": ")+"] ":"");return 0===Kt.length?Xt+"{}":mt?Xt+"{"+Bt(Kt,mt)+"}":Xt+"{ "+rt.call(Kt,", ")+" }"}return String(B)};var It=Object.prototype.hasOwnProperty||function(k){return k in this};function Dt(k,B){return It.call(k,B)}function Rt(k){return X.call(k)}function Pt(k,B){if(k.indexOf)return k.indexOf(B);for(var U=0,F=k.length;UB.maxStringLength){var U=k.length-B.maxStringLength,F="... "+U+" more character"+(U>1?"s":"");return Mt(tt.call(k,0,B.maxStringLength),B)+F}var G=Et[B.quoteStyle||"single"];return G.lastIndex=0,wt(et.call(et.call(k,G,"\\$1"),/[\x00-\x1f]/g,Nt),"single",B)}function Nt(k){var B=k.charCodeAt(0),U={8:"b",9:"t",10:"n",12:"f",13:"r"}[B];return U?"\\"+U:"\\x"+(B<16?"0":"")+it.call(B.toString(16))}function xt(k){return"Object("+k+")"}function Lt(k){return k+" { ? }"}function kt(k,B,U,F){return k+" ("+B+") {"+(F?Bt(U,F):rt.call(U,", "))+"}"}function Bt(k,B){if(0===k.length)return"";var U="\n"+B.prev+B.base;return U+rt.call(k,","+U)+"\n"+B.prev}function Ut(k,B){var U=At(k),F=[];if(U){F.length=k.length;for(var G=0;G{"use strict";function B(k){if("string"!=typeof k)throw new TypeError("Path must be a string. Received "+JSON.stringify(k))}function U(k,B){for(var U,F="",G=0,j=-1,$=0,H=0;H<=k.length;++H){if(H2){var V=F.lastIndexOf("/");if(V!==F.length-1){-1===V?(F="",G=0):G=(F=F.slice(0,V)).length-1-F.lastIndexOf("/"),j=H,$=0;continue}}else if(2===F.length||1===F.length){F="",G=0,j=H,$=0;continue}B&&(F.length>0?F+="/..":F="..",G=2)}else F.length>0?F+="/"+k.slice(j+1,H):F=k.slice(j+1,H),G=H-j-1;j=H,$=0}else 46===U&&-1!==$?++$:$=-1}return F}var F={resolve:function(){for(var k,F="",G=!1,j=arguments.length-1;j>=-1&&!G;j--){var $;j>=0?$=arguments[j]:(void 0===k&&(k=process.cwd()),$=k),B($),0!==$.length&&(F=$+"/"+F,G=47===$.charCodeAt(0))}return F=U(F,!G),G?F.length>0?"/"+F:"/":F.length>0?F:"."},normalize:function(k){if(B(k),0===k.length)return".";var F=47===k.charCodeAt(0),G=47===k.charCodeAt(k.length-1);return 0!==(k=U(k,!F)).length||F||(k="."),k.length>0&&G&&(k+="/"),F?"/"+k:k},isAbsolute:function(k){return B(k),k.length>0&&47===k.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var k,U=0;U0&&(void 0===k?k=G:k+="/"+G)}return void 0===k?".":F.normalize(k)},relative:function(k,U){if(B(k),B(U),k===U)return"";if((k=F.resolve(k))===(U=F.resolve(U)))return"";for(var G=1;GW){if(47===U.charCodeAt(H+K))return U.slice(H+K+1);if(0===K)return U.slice(H+K)}else $>W&&(47===k.charCodeAt(G+K)?q=K:0===K&&(q=0));break}var z=k.charCodeAt(G+K);if(z!==U.charCodeAt(H+K))break;47===z&&(q=K)}var Y="";for(K=G+q+1;K<=j;++K)K!==j&&47!==k.charCodeAt(K)||(0===Y.length?Y+="..":Y+="/..");return Y.length>0?Y+U.slice(H+q):(H+=q,47===U.charCodeAt(H)&&++H,U.slice(H))},_makeLong:function(k){return k},dirname:function(k){if(B(k),0===k.length)return".";for(var U=k.charCodeAt(0),F=47===U,G=-1,j=!0,$=k.length-1;$>=1;--$)if(47===(U=k.charCodeAt($))){if(!j){G=$;break}}else j=!1;return-1===G?F?"/":".":F&&1===G?"//":k.slice(0,G)},basename:function(k,U){if(void 0!==U&&"string"!=typeof U)throw new TypeError('"ext" argument must be a string');B(k);var F,G=0,j=-1,$=!0;if(void 0!==U&&U.length>0&&U.length<=k.length){if(U.length===k.length&&U===k)return"";var H=U.length-1,V=-1;for(F=k.length-1;F>=0;--F){var W=k.charCodeAt(F);if(47===W){if(!$){G=F+1;break}}else-1===V&&($=!1,V=F+1),H>=0&&(W===U.charCodeAt(H)?-1==--H&&(j=F):(H=-1,j=V))}return G===j?j=V:-1===j&&(j=k.length),k.slice(G,j)}for(F=k.length-1;F>=0;--F)if(47===k.charCodeAt(F)){if(!$){G=F+1;break}}else-1===j&&($=!1,j=F+1);return-1===j?"":k.slice(G,j)},extname:function(k){B(k);for(var U=-1,F=0,G=-1,j=!0,$=0,H=k.length-1;H>=0;--H){var V=k.charCodeAt(H);if(47!==V)-1===G&&(j=!1,G=H+1),46===V?-1===U?U=H:1!==$&&($=1):-1!==U&&($=-1);else if(!j){F=H+1;break}}return-1===U||-1===G||0===$||1===$&&U===G-1&&U===F+1?"":k.slice(U,G)},format:function(k){if(null===k||"object"!=typeof k)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof k);return function(k,B){var U=B.dir||B.root,F=B.base||(B.name||"")+(B.ext||"");return U?U===B.root?U+F:U+k+F:F}("/",k)},parse:function(k){B(k);var U={root:"",dir:"",base:"",ext:"",name:""};if(0===k.length)return U;var F,G=k.charCodeAt(0),j=47===G;j?(U.root="/",F=1):F=0;for(var $=-1,H=0,V=-1,W=!0,q=k.length-1,K=0;q>=F;--q)if(47!==(G=k.charCodeAt(q)))-1===V&&(W=!1,V=q+1),46===G?-1===$?$=q:1!==K&&(K=1):-1!==$&&(K=-1);else if(!W){H=q+1;break}return-1===$||-1===V||0===K||1===K&&$===V-1&&$===H+1?-1!==V&&(U.base=U.name=0===H&&j?k.slice(1,V):k.slice(H,V)):(0===H&&j?(U.name=k.slice(1,$),U.base=k.slice(1,V)):(U.name=k.slice(H,$),U.base=k.slice(H,V)),U.ext=k.slice($,V)),H>0?U.dir=k.slice(0,H-1):j&&(U.dir="/"),U},sep:"/",delimiter:":",win32:null,posix:null};F.posix=F,k.exports=F},59004:function(k){k.exports=function(){"use strict";function k(k,B){if(!(k instanceof B))throw new TypeError("Cannot call a class as a function")}function B(k,B){for(var U=0;UB?1:k0))break;if(null===B.right)break;if(U(k,B.right.key)>0&&(V=B.right,B.right=V.left,V.left=B,null===(B=V).right))break;j.right=B,j=B,B=B.right}}return j.right=B.left,$.left=B.right,B.left=G.right,B.right=G.left,B}function $(k,B,U,G){var $=new F(k,B);if(null===U)return $.left=$.right=null,$;var H=G(k,(U=j(k,U,G)).key);return H<0?($.left=U.left,$.right=U,U.left=null):H>=0&&($.right=U.right,$.left=U,U.right=null),$}function H(k,B,U){var F=null,G=null;if(B){var $=U((B=j(k,B,U)).key,k);0===$?(F=B.left,G=B.right):$<0?(G=B.right,B.right=null,F=B):(F=B.left,B.left=null,G=B)}return{left:F,right:G}}function V(k,B,U){return null===B?k:(null===k||((B=j(k.key,B,U)).left=k),B)}function W(k,B,U,F,G){if(k){F(B+(U?"└── ":"├── ")+G(k)+"\n");var j=B+(U?" ":"│ ");k.left&&W(k.left,j,!1,F,G),k.right&&W(k.right,j,!0,F,G)}}var q=function(){function k(k){void 0===k&&(k=G),this._root=null,this._size=0,this._comparator=k}return k.prototype.insert=function(k,B){return this._size++,this._root=$(k,B,this._root,this._comparator)},k.prototype.add=function(k,B){var U=new F(k,B);null===this._root&&(U.left=U.right=null,this._size++,this._root=U);var G=this._comparator,$=j(k,this._root,G),H=G(k,$.key);return 0===H?this._root=$:(H<0?(U.left=$.left,U.right=$,$.left=null):H>0&&(U.right=$.right,U.left=$,$.right=null),this._size++,this._root=U),this._root},k.prototype.remove=function(k){this._root=this._remove(k,this._root,this._comparator)},k.prototype._remove=function(k,B,U){var F;return null===B?null:0===U(k,(B=j(k,B,U)).key)?(null===B.left?F=B.right:(F=j(k,B.left,U)).right=B.right,this._size--,F):B},k.prototype.pop=function(){var k=this._root;if(k){for(;k.left;)k=k.left;return this._root=j(k.key,this._root,this._comparator),this._root=this._remove(k.key,this._root,this._comparator),{key:k.key,data:k.data}}return null},k.prototype.findStatic=function(k){for(var B=this._root,U=this._comparator;B;){var F=U(k,B.key);if(0===F)return B;B=F<0?B.left:B.right}return null},k.prototype.find=function(k){return this._root&&(this._root=j(k,this._root,this._comparator),0!==this._comparator(k,this._root.key))?null:this._root},k.prototype.contains=function(k){for(var B=this._root,U=this._comparator;B;){var F=U(k,B.key);if(0===F)return!0;B=F<0?B.left:B.right}return!1},k.prototype.forEach=function(k,B){for(var U=this._root,F=[],G=!1;!G;)null!==U?(F.push(U),U=U.left):0!==F.length?(U=F.pop(),k.call(B,U),U=U.right):G=!0;return this},k.prototype.range=function(k,B,U,F){for(var G=[],j=this._comparator,$=this._root;0!==G.length||$;)if($)G.push($),$=$.left;else{if(j(($=G.pop()).key,B)>0)break;if(j($.key,k)>=0&&U.call(F,$))return this;$=$.right}return this},k.prototype.keys=function(){var k=[];return this.forEach((function(B){var U=B.key;return k.push(U)})),k},k.prototype.values=function(){var k=[];return this.forEach((function(B){var U=B.data;return k.push(U)})),k},k.prototype.min=function(){return this._root?this.minNode(this._root).key:null},k.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},k.prototype.minNode=function(k){if(void 0===k&&(k=this._root),k)for(;k.left;)k=k.left;return k},k.prototype.maxNode=function(k){if(void 0===k&&(k=this._root),k)for(;k.right;)k=k.right;return k},k.prototype.at=function(k){for(var B=this._root,U=!1,F=0,G=[];!U;)if(B)G.push(B),B=B.left;else if(G.length>0){if(B=G.pop(),F===k)return B;F++,B=B.right}else U=!0;return null},k.prototype.next=function(k){var B=this._root,U=null;if(k.right){for(U=k.right;U.left;)U=U.left;return U}for(var F=this._comparator;B;){var G=F(k.key,B.key);if(0===G)break;G<0?(U=B,B=B.left):B=B.right}return U},k.prototype.prev=function(k){var B=this._root,U=null;if(null!==k.left){for(U=k.left;U.right;)U=U.right;return U}for(var F=this._comparator;B;){var G=F(k.key,B.key);if(0===G)break;G<0?B=B.left:(U=B,B=B.right)}return U},k.prototype.clear=function(){return this._root=null,this._size=0,this},k.prototype.toList=function(){return Y(this._root)},k.prototype.load=function(k,B,U){void 0===B&&(B=[]),void 0===U&&(U=!1);var F=k.length,G=this._comparator;if(U&&Z(k,B,0,F-1,G),null===this._root)this._root=K(k,B,0,F),this._size=F;else{var j=X(this.toList(),z(k,B),G);F=this._size+F,this._root=Q({head:j},0,F)}return this},k.prototype.isEmpty=function(){return null===this._root},Object.defineProperty(k.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(k.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),k.prototype.toString=function(k){void 0===k&&(k=function(k){return String(k.key)});var B=[];return W(this._root,"",!0,(function(k){return B.push(k)}),k),B.join("")},k.prototype.update=function(k,B,U){var F=this._comparator,G=H(k,this._root,F),j=G.left,W=G.right;F(k,B)<0?W=$(B,U,W,F):j=$(B,U,j,F),this._root=V(j,W,F)},k.prototype.split=function(k){return H(k,this._root,this._comparator)},k}();function K(k,B,U,G){var j=G-U;if(j>0){var $=U+Math.floor(j/2),H=k[$],V=B[$],W=new F(H,V);return W.left=K(k,B,U,$),W.right=K(k,B,$+1,G),W}return null}function z(k,B){for(var U=new F(null,null),G=U,j=0;j0?B=(B=$=$.next=U.pop()).right:G=!0;return $.next=null,j.next}function Q(k,B,U){var F=U-B;if(F>0){var G=B+Math.floor(F/2),j=Q(k,B,G),$=k.head;return $.left=j,k.head=k.head.next,$.right=Q(k,G+1,U),$}return null}function X(k,B,U){for(var G=new F(null,null),j=G,$=k,H=B;null!==$&&null!==H;)U($.key,H.key)<0?(j.next=$,$=$.next):(j.next=H,H=H.next),j=j.next;return null!==$?j.next=$:null!==H&&(j.next=H),G.next}function Z(k,B,U,F,G){if(!(U>=F)){for(var j=k[U+F>>1],$=U-1,H=F+1;;){do{$++}while(G(k[$],j)<0);do{H--}while(G(k[H],j)>0);if($>=H)break;var V=k[$];k[$]=k[H],k[H]=V,V=B[$],B[$]=B[H],B[H]=V}Z(k,B,U,H,G),Z(k,B,H+1,F,G)}}var J=function(k,B){return k.ll.x<=B.x&&B.x<=k.ur.x&&k.ll.y<=B.y&&B.y<=k.ur.y},tt=function(k,B){if(B.ur.xB.x?1:k.yB.y?1:0}}]),U(B,[{key:"link",value:function(k){if(k.point===this.point)throw new Error("Tried to link already linked events");for(var B=k.point.events,U=0,F=B.length;U=0&&V>=0?$W?-1:0:j<0&&V<0?$W?1:0:Vj?1:0}}}]),B}(),gt=0,mt=function(){function B(U,F,G,j){k(this,B),this.id=++gt,this.leftSE=U,U.segment=this,U.otherSE=F,this.rightSE=F,F.segment=this,F.otherSE=U,this.rings=G,this.windings=j}return U(B,null,[{key:"compare",value:function(k,B){var U=k.leftSE.point.x,F=B.leftSE.point.x,G=k.rightSE.point.x,j=B.rightSE.point.x;if(j$&&H>V)return-1;var q=k.comparePoint(B.leftSE.point);if(q<0)return 1;if(q>0)return-1;var K=B.comparePoint(k.rightSE.point);return 0!==K?K:-1}if(U>F){if($H&&$>W)return 1;var z=B.comparePoint(k.leftSE.point);if(0!==z)return z;var Y=k.comparePoint(B.rightSE.point);return Y<0?1:Y>0?-1:1}if($H)return 1;if(Gj){var X=k.comparePoint(B.rightSE.point);if(X<0)return 1;if(X>0)return-1}if(G!==j){var Z=V-$,J=G-U,tt=W-H,et=j-F;if(Z>J&&ttet)return-1}return G>j?1:GW?1:k.idB.id?1:0}}]),U(B,[{key:"replaceRightSE",value:function(k){this.rightSE=k,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var k=this.leftSE.point.y,B=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:kB?k:B}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(k){return k.x===this.leftSE.point.x&&k.y===this.leftSE.point.y||k.x===this.rightSE.point.x&&k.y===this.rightSE.point.y}},{key:"comparePoint",value:function(k){if(this.isAnEndpoint(k))return 0;var B=this.leftSE.point,U=this.rightSE.point,F=this.vector();if(B.x===U.x)return k.x===B.x?0:k.x0&&H.swapEvents(),vt.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),F&&(G.checkForConsuming(),j.checkForConsuming()),U}},{key:"swapEvents",value:function(){var k=this.rightSE;this.rightSE=this.leftSE,this.leftSE=k,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var B=0,U=this.windings.length;B0){var j=U;U=F,F=j}if(U.prev===F){var $=U;U=F,F=$}for(var H=0,V=F.rings.length;H0))throw new Error("Tried to create degenerate segment at [".concat(k.x,", ").concat(k.y,"]"));G=U,j=k,$=-1}return new B(new vt(G,!0),new vt(j,!1),[F],[$])}}]),B}(),yt=function(){function B(U,F,G){if(k(this,B),!Array.isArray(U)||0===U.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=F,this.isExterior=G,this.segments=[],"number"!=typeof U[0][0]||"number"!=typeof U[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var j=rt.round(U[0][0],U[0][1]);this.bbox={ll:{x:j.x,y:j.y},ur:{x:j.x,y:j.y}};for(var $=j,H=1,V=U.length;Hthis.bbox.ur.x&&(this.bbox.ur.x=W.x),W.y>this.bbox.ur.y&&(this.bbox.ur.y=W.y),$=W)}j.x===$.x&&j.y===$.y||this.segments.push(mt.fromRing($,j,this))}return U(B,[{key:"getSweepEvents",value:function(){for(var k=[],B=0,U=this.segments.length;Bthis.bbox.ur.x&&(this.bbox.ur.x=$.bbox.ur.x),$.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=$.bbox.ur.y),this.interiorRings.push($)}this.multiPoly=F}return U(B,[{key:"getSweepEvents",value:function(){for(var k=this.exteriorRing.getSweepEvents(),B=0,U=this.interiorRings.length;Bthis.bbox.ur.x&&(this.bbox.ur.x=$.bbox.ur.x),$.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=$.bbox.ur.y),this.polys.push($)}this.isSubject=F}return U(B,[{key:"getSweepEvents",value:function(){for(var k=[],B=0,U=this.polys.length;B0&&(k=F)}for(var G=k.segment.prevInResult(),j=G?G.prevInResult():null;;){if(!G)return null;if(!j)return G.ringOut;if(j.ringOut!==G.ringOut)return j.ringOut.enclosingRing()!==G.ringOut?G.ringOut:G.ringOut.enclosingRing();G=j.prevInResult(),j=G?G.prevInResult():null}}}]),B}(),Tt=function(){function B(U){k(this,B),this.exteriorRing=U,U.poly=this,this.interiorRings=[]}return U(B,[{key:"addInterior",value:function(k){this.interiorRings.push(k),k.poly=this}},{key:"getGeom",value:function(){var k=[this.exteriorRing.getGeom()];if(null===k[0])return null;for(var B=0,U=this.interiorRings.length;B1&&void 0!==arguments[1]?arguments[1]:mt.compare;k(this,B),this.queue=U,this.tree=new q(F),this.segments=[]}return U(B,[{key:"process",value:function(k){var B=k.segment,U=[];if(k.consumedBy)return k.isLeft?this.queue.remove(k.otherSE):this.tree.remove(B),U;var F=k.isLeft?this.tree.insert(B):this.tree.find(B);if(!F)throw new Error("Unable to find segment #".concat(B.id," ")+"[".concat(B.leftSE.point.x,", ").concat(B.leftSE.point.y,"] -> ")+"[".concat(B.rightSE.point.x,", ").concat(B.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var G=F,j=F,$=void 0,H=void 0;void 0===$;)null===(G=this.tree.prev(G))?$=null:void 0===G.key.consumedBy&&($=G.key);for(;void 0===H;)null===(j=this.tree.next(j))?H=null:void 0===j.key.consumedBy&&(H=j.key);if(k.isLeft){var V=null;if($){var W=$.getIntersection(B);if(null!==W&&(B.isAnEndpoint(W)||(V=W),!$.isAnEndpoint(W)))for(var q=this._splitSafely($,W),K=0,z=q.length;K0?(this.tree.remove(B),U.push(k)):(this.segments.push(B),B.prev=$)}else{if($&&H){var nt=$.getIntersection(H);if(null!==nt){if(!$.isAnEndpoint(nt))for(var at=this._splitSafely($,nt),rt=0,ot=at.length;rtCt)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var st=new At(Q),nt=Q.size,at=Q.pop();at;){var ot=at.key;if(Q.size===nt){var ht=ot.segment;throw new Error("Unable to pop() ".concat(ot.isLeft?"left":"right"," SweepEvent ")+"[".concat(ot.point.x,", ").concat(ot.point.y,"] from segment #").concat(ht.id," ")+"[".concat(ht.leftSE.point.x,", ").concat(ht.leftSE.point.y,"] -> ")+"[".concat(ht.rightSE.point.x,", ").concat(ht.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(Q.size>Ct)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(st.segments.length>Ot)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var ct=st.process(ot),dt=0,lt=ct.length;dt1?B-1:0),F=1;F1?B-1:0),F=1;F1?B-1:0),F=1;F1?B-1:0),F=1;F{"use strict";k.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},26946:(k,B,U)=>{"use strict";k.exports=U(24394)},24394:(k,B,U)=>{"use strict";var F=B;function G(){F.util._configure(),F.Writer._configure(F.BufferWriter),F.Reader._configure(F.BufferReader)}F.build="minimal",F.Writer=U(63449),F.BufferWriter=U(60818),F.Reader=U(16237),F.BufferReader=U(33158),F.util=U(93610),F.rpc=U(95047),F.roots=U(64529),F.configure=G,G()},16237:(k,B,U)=>{"use strict";k.exports=V;var F,G=U(93610),j=G.LongBits,$=G.utf8;function H(k,B){return RangeError("index out of range: "+k.pos+" + "+(B||1)+" > "+k.len)}function V(k){this.buf=k,this.pos=0,this.len=k.length}var W,q="undefined"!=typeof Uint8Array?function(k){if(k instanceof Uint8Array||Array.isArray(k))return new V(k);throw Error("illegal buffer")}:function(k){if(Array.isArray(k))return new V(k);throw Error("illegal buffer")},K=function(){return G.Buffer?function(k){return(V.create=function(k){return G.Buffer.isBuffer(k)?new F(k):q(k)})(k)}:q};function z(){var k=new j(0,0),B=0;if(!(this.len-this.pos>4)){for(;B<3;++B){if(this.pos>=this.len)throw H(this);if(k.lo=(k.lo|(127&this.buf[this.pos])<<7*B)>>>0,this.buf[this.pos++]<128)return k}return k.lo=(k.lo|(127&this.buf[this.pos++])<<7*B)>>>0,k}for(;B<4;++B)if(k.lo=(k.lo|(127&this.buf[this.pos])<<7*B)>>>0,this.buf[this.pos++]<128)return k;if(k.lo=(k.lo|(127&this.buf[this.pos])<<28)>>>0,k.hi=(k.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return k;if(B=0,this.len-this.pos>4){for(;B<5;++B)if(k.hi=(k.hi|(127&this.buf[this.pos])<<7*B+3)>>>0,this.buf[this.pos++]<128)return k}else for(;B<5;++B){if(this.pos>=this.len)throw H(this);if(k.hi=(k.hi|(127&this.buf[this.pos])<<7*B+3)>>>0,this.buf[this.pos++]<128)return k}throw Error("invalid varint encoding")}function Y(k,B){return(k[B-4]|k[B-3]<<8|k[B-2]<<16|k[B-1]<<24)>>>0}function Q(){if(this.pos+8>this.len)throw H(this,8);return new j(Y(this.buf,this.pos+=4),Y(this.buf,this.pos+=4))}V.create=K(),V.prototype._slice=G.Array.prototype.subarray||G.Array.prototype.slice,V.prototype.uint32=(W=4294967295,function(){if(W=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return W;if(W=(W|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return W;if(W=(W|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return W;if(W=(W|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return W;if(W=(W|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return W;if((this.pos+=5)>this.len)throw this.pos=this.len,H(this,10);return W}),V.prototype.int32=function(){return 0|this.uint32()},V.prototype.sint32=function(){var k=this.uint32();return k>>>1^-(1&k)|0},V.prototype.bool=function(){return 0!==this.uint32()},V.prototype.fixed32=function(){if(this.pos+4>this.len)throw H(this,4);return Y(this.buf,this.pos+=4)},V.prototype.sfixed32=function(){if(this.pos+4>this.len)throw H(this,4);return 0|Y(this.buf,this.pos+=4)},V.prototype.float=function(){if(this.pos+4>this.len)throw H(this,4);var k=G.float.readFloatLE(this.buf,this.pos);return this.pos+=4,k},V.prototype.double=function(){if(this.pos+8>this.len)throw H(this,4);var k=G.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,k},V.prototype.bytes=function(){var k=this.uint32(),B=this.pos,U=this.pos+k;if(U>this.len)throw H(this,k);return this.pos+=k,Array.isArray(this.buf)?this.buf.slice(B,U):B===U?new this.buf.constructor(0):this._slice.call(this.buf,B,U)},V.prototype.string=function(){var k=this.bytes();return $.read(k,0,k.length)},V.prototype.skip=function(k){if("number"==typeof k){if(this.pos+k>this.len)throw H(this,k);this.pos+=k}else do{if(this.pos>=this.len)throw H(this)}while(128&this.buf[this.pos++]);return this},V.prototype.skipType=function(k){switch(k){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(k=7&this.uint32());)this.skipType(k);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+k+" at offset "+this.pos)}return this},V._configure=function(k){F=k,V.create=K(),F._configure();var B=G.Long?"toLong":"toNumber";G.merge(V.prototype,{int64:function(){return z.call(this)[B](!1)},uint64:function(){return z.call(this)[B](!0)},sint64:function(){return z.call(this).zzDecode()[B](!1)},fixed64:function(){return Q.call(this)[B](!0)},sfixed64:function(){return Q.call(this)[B](!1)}})}},33158:(k,B,U)=>{"use strict";k.exports=j;var F=U(16237);(j.prototype=Object.create(F.prototype)).constructor=j;var G=U(93610);function j(k){F.call(this,k)}j._configure=function(){G.Buffer&&(j.prototype._slice=G.Buffer.prototype.slice)},j.prototype.string=function(){var k=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+k,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+k,this.len))},j._configure()},64529:k=>{"use strict";k.exports={}},95047:(k,B,U)=>{"use strict";B.Service=U(27595)},27595:(k,B,U)=>{"use strict";k.exports=G;var F=U(93610);function G(k,B,U){if("function"!=typeof k)throw TypeError("rpcImpl must be a function");F.EventEmitter.call(this),this.rpcImpl=k,this.requestDelimited=Boolean(B),this.responseDelimited=Boolean(U)}(G.prototype=Object.create(F.EventEmitter.prototype)).constructor=G,G.prototype.rpcCall=function k(B,U,G,j,$){if(!j)throw TypeError("request must be specified");var H=this;if(!$)return F.asPromise(k,H,B,U,G,j);if(H.rpcImpl)try{return H.rpcImpl(B,U[H.requestDelimited?"encodeDelimited":"encode"](j).finish(),(function(k,U){if(k)return H.emit("error",k,B),$(k);if(null!==U){if(!(U instanceof G))try{U=G[H.responseDelimited?"decodeDelimited":"decode"](U)}catch(k){return H.emit("error",k,B),$(k)}return H.emit("data",U,B),$(null,U)}H.end(!0)}))}catch(V){return H.emit("error",V,B),void setTimeout((function(){$(V)}),0)}else setTimeout((function(){$(Error("already ended"))}),0)},G.prototype.end=function(k){return this.rpcImpl&&(k||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},32239:(k,B,U)=>{"use strict";k.exports=G;var F=U(93610);function G(k,B){this.lo=k>>>0,this.hi=B>>>0}var j=G.zero=new G(0,0);j.toNumber=function(){return 0},j.zzEncode=j.zzDecode=function(){return this},j.length=function(){return 1};var $=G.zeroHash="\0\0\0\0\0\0\0\0";G.fromNumber=function(k){if(0===k)return j;var B=k<0;B&&(k=-k);var U=k>>>0,F=(k-U)/4294967296>>>0;return B&&(F=~F>>>0,U=~U>>>0,++U>4294967295&&(U=0,++F>4294967295&&(F=0))),new G(U,F)},G.from=function(k){if("number"==typeof k)return G.fromNumber(k);if(F.isString(k)){if(!F.Long)return G.fromNumber(parseInt(k,10));k=F.Long.fromString(k)}return k.low||k.high?new G(k.low>>>0,k.high>>>0):j},G.prototype.toNumber=function(k){if(!k&&this.hi>>>31){var B=1+~this.lo>>>0,U=~this.hi>>>0;return B||(U=U+1>>>0),-(B+4294967296*U)}return this.lo+4294967296*this.hi},G.prototype.toLong=function(k){return F.Long?new F.Long(0|this.lo,0|this.hi,Boolean(k)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(k)}};var H=String.prototype.charCodeAt;G.fromHash=function(k){return k===$?j:new G((H.call(k,0)|H.call(k,1)<<8|H.call(k,2)<<16|H.call(k,3)<<24)>>>0,(H.call(k,4)|H.call(k,5)<<8|H.call(k,6)<<16|H.call(k,7)<<24)>>>0)},G.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},G.prototype.zzEncode=function(){var k=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^k)>>>0,this.lo=(this.lo<<1^k)>>>0,this},G.prototype.zzDecode=function(){var k=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^k)>>>0,this.hi=(this.hi>>>1^k)>>>0,this},G.prototype.length=function(){var k=this.lo,B=(this.lo>>>28|this.hi<<4)>>>0,U=this.hi>>>24;return 0===U?0===B?k<16384?k<128?1:2:k<2097152?3:4:B<16384?B<128?5:6:B<2097152?7:8:U<128?9:10}},93610:function(k,B,U){"use strict";var F=B;function G(k,B,U){for(var F=Object.keys(B),G=0;G0)},F.Buffer=function(){try{var k=F.inquire("buffer").Buffer;return k.prototype.utf8Write?k:null}catch(e){return null}}(),F._Buffer_from=null,F._Buffer_allocUnsafe=null,F.newBuffer=function(k){return"number"==typeof k?F.Buffer?F._Buffer_allocUnsafe(k):new F.Array(k):F.Buffer?F._Buffer_from(k):"undefined"==typeof Uint8Array?k:new Uint8Array(k)},F.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,F.Long=F.global.dcodeIO&&F.global.dcodeIO.Long||F.global.Long||F.inquire("long"),F.key2Re=/^true|false|0|1$/,F.key32Re=/^-?(?:0|[1-9][0-9]*)$/,F.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,F.longToHash=function(k){return k?F.LongBits.from(k).toHash():F.LongBits.zeroHash},F.longFromHash=function(k,B){var U=F.LongBits.fromHash(k);return F.Long?F.Long.fromBits(U.lo,U.hi,B):U.toNumber(Boolean(B))},F.merge=G,F.lcFirst=function(k){return k.charAt(0).toLowerCase()+k.substring(1)},F.newError=j,F.ProtocolError=j("ProtocolError"),F.oneOfGetter=function(k){for(var B={},U=0;U-1;--U)if(1===B[k[U]]&&void 0!==this[k[U]]&&null!==this[k[U]])return k[U]}},F.oneOfSetter=function(k){return function(B){for(var U=0;U{"use strict";k.exports=K;var F,G=U(93610),j=G.LongBits,$=G.base64,H=G.utf8;function V(k,B,U){this.fn=k,this.len=B,this.next=void 0,this.val=U}function W(){}function q(k){this.head=k.head,this.tail=k.tail,this.len=k.len,this.next=k.states}function K(){this.len=0,this.head=new V(W,0,0),this.tail=this.head,this.states=null}var z=function(){return G.Buffer?function(){return(K.create=function(){return new F})()}:function(){return new K}};function Y(k,B,U){B[U]=255&k}function Q(k,B){this.len=k,this.next=void 0,this.val=B}function X(k,B,U){for(;k.hi;)B[U++]=127&k.lo|128,k.lo=(k.lo>>>7|k.hi<<25)>>>0,k.hi>>>=7;for(;k.lo>127;)B[U++]=127&k.lo|128,k.lo=k.lo>>>7;B[U++]=k.lo}function Z(k,B,U){B[U]=255&k,B[U+1]=k>>>8&255,B[U+2]=k>>>16&255,B[U+3]=k>>>24}K.create=z(),K.alloc=function(k){return new G.Array(k)},G.Array!==Array&&(K.alloc=G.pool(K.alloc,G.Array.prototype.subarray)),K.prototype._push=function(k,B,U){return this.tail=this.tail.next=new V(k,B,U),this.len+=B,this},Q.prototype=Object.create(V.prototype),Q.prototype.fn=function(k,B,U){for(;k>127;)B[U++]=127&k|128,k>>>=7;B[U]=k},K.prototype.uint32=function(k){return this.len+=(this.tail=this.tail.next=new Q((k>>>=0)<128?1:k<16384?2:k<2097152?3:k<268435456?4:5,k)).len,this},K.prototype.int32=function(k){return k<0?this._push(X,10,j.fromNumber(k)):this.uint32(k)},K.prototype.sint32=function(k){return this.uint32((k<<1^k>>31)>>>0)},K.prototype.uint64=function(k){var B=j.from(k);return this._push(X,B.length(),B)},K.prototype.int64=K.prototype.uint64,K.prototype.sint64=function(k){var B=j.from(k).zzEncode();return this._push(X,B.length(),B)},K.prototype.bool=function(k){return this._push(Y,1,k?1:0)},K.prototype.fixed32=function(k){return this._push(Z,4,k>>>0)},K.prototype.sfixed32=K.prototype.fixed32,K.prototype.fixed64=function(k){var B=j.from(k);return this._push(Z,4,B.lo)._push(Z,4,B.hi)},K.prototype.sfixed64=K.prototype.fixed64,K.prototype.float=function(k){return this._push(G.float.writeFloatLE,4,k)},K.prototype.double=function(k){return this._push(G.float.writeDoubleLE,8,k)};var J=G.Array.prototype.set?function(k,B,U){B.set(k,U)}:function(k,B,U){for(var F=0;F>>0;if(!B)return this._push(Y,1,0);if(G.isString(k)){var U=K.alloc(B=$.length(k));$.decode(k,U,0),k=U}return this.uint32(B)._push(J,B,k)},K.prototype.string=function(k){var B=H.length(k);return B?this.uint32(B)._push(H.write,B,k):this._push(Y,1,0)},K.prototype.fork=function(){return this.states=new q(this),this.head=this.tail=new V(W,0,0),this.len=0,this},K.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new V(W,0,0),this.len=0),this},K.prototype.ldelim=function(){var k=this.head,B=this.tail,U=this.len;return this.reset().uint32(U),U&&(this.tail.next=k.next,this.tail=B,this.len+=U),this},K.prototype.finish=function(){for(var k=this.head.next,B=this.constructor.alloc(this.len),U=0;k;)k.fn(k.val,B,U),U+=k.len,k=k.next;return B},K._configure=function(k){F=k,K.create=z(),F._configure()}},60818:(k,B,U)=>{"use strict";k.exports=j;var F=U(63449);(j.prototype=Object.create(F.prototype)).constructor=j;var G=U(93610);function j(){F.call(this)}function $(k,B,U){k.length<40?G.utf8.write(k,B,U):B.utf8Write?B.utf8Write(k,U):B.write(k,U)}j._configure=function(){j.alloc=G._Buffer_allocUnsafe,j.writeBytesBuffer=G.Buffer&&G.Buffer.prototype instanceof Uint8Array&&"set"===G.Buffer.prototype.set.name?function(k,B,U){B.set(k,U)}:function(k,B,U){if(k.copy)k.copy(B,U,0,k.length);else for(var F=0;F>>0;return this.uint32(B),B&&this._push(j.writeBytesBuffer,B,k),this},j.prototype.string=function(k){var B=G.Buffer.byteLength(k);return this.uint32(B),B&&this._push($,B,k),this},j._configure()},9655:function(k,B,U){var F;k=U.nmd(k),function(G){B&&B.nodeType,k&&k.nodeType;var j="object"==typeof U.g&&U.g;j.global!==j&&j.window!==j&&j.self;var $,H=2147483647,V=36,W=/^xn--/,q=/[^\x20-\x7E]/,K=/[\x2E\u3002\uFF0E\uFF61]/g,z={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Y=Math.floor,Q=String.fromCharCode;function X(k){throw new RangeError(z[k])}function Z(k,B){for(var U=k.length,F=[];U--;)F[U]=B(k[U]);return F}function J(k,B){var U=k.split("@"),F="";return U.length>1&&(F=U[0]+"@",k=U[1]),F+Z((k=k.replace(K,".")).split("."),B).join(".")}function tt(k){for(var B,U,F=[],G=0,j=k.length;G=55296&&B<=56319&&G65535&&(B+=Q((k-=65536)>>>10&1023|55296),k=56320|1023&k),B+=Q(k)})).join("")}function it(k,B){return k+22+75*(k<26)-((0!=B)<<5)}function st(k,B,U){var F=0;for(k=U?Y(k/700):k>>1,k+=Y(k/B);k>455;F+=V)k=Y(k/35);return Y(F+36*k/(k+38))}function nt(k){var B,U,F,G,j,$,W,q,K,z,Q,Z=[],J=k.length,tt=0,it=128,nt=72;for((U=k.lastIndexOf("-"))<0&&(U=0),F=0;F=128&&X("not-basic"),Z.push(k.charCodeAt(F));for(G=U>0?U+1:0;G=J&&X("invalid-input"),((q=(Q=k.charCodeAt(G++))-48<10?Q-22:Q-65<26?Q-65:Q-97<26?Q-97:V)>=V||q>Y((H-tt)/$))&&X("overflow"),tt+=q*$,!(q<(K=W<=nt?1:W>=nt+26?26:W-nt));W+=V)$>Y(H/(z=V-K))&&X("overflow"),$*=z;nt=st(tt-j,B=Z.length+1,0==j),Y(tt/B)>H-it&&X("overflow"),it+=Y(tt/B),tt%=B,Z.splice(tt++,0,it)}return et(Z)}function at(k){var B,U,F,G,j,$,W,q,K,z,Z,J,et,nt,at,rt=[];for(J=(k=tt(k)).length,B=128,U=0,j=72,$=0;$=B&&ZY((H-U)/(et=F+1))&&X("overflow"),U+=(W-B)*et,B=W,$=0;$H&&X("overflow"),Z==B){for(q=U,K=V;!(q<(z=K<=j?1:K>=j+26?26:K-j));K+=V)at=q-z,nt=V-z,rt.push(Q(it(z+at%nt,0))),q=Y(at/nt);rt.push(Q(it(q,0))),j=st(U,et,F==G),U=0,++F}++U,++B}return rt.join("")}$={version:"1.4.1",ucs2:{decode:tt,encode:et},decode:nt,encode:at,toASCII:function(k){return J(k,(function(k){return q.test(k)?"xn--"+at(k):k}))},toUnicode:function(k){return J(k,(function(k){return W.test(k)?nt(k.slice(4).toLowerCase()):k}))}},void 0===(F=function(){return $}.call(B,U,B,k))||(k.exports=F)}()},97283:k=>{self,k.exports=(()=>{var k={192:(k,B)=>{var U,F,G=function(){var k=function(k,B){var U=k,F=$[B],G=null,j=0,V=null,Z=[],J={},et=function(k,B){G=function(k){for(var B=new Array(k),U=0;U=7&&at(k),null==V&&(V=ht(U,F,Z)),ot(V,B)},it=function(k,B){for(var U=-1;U<=7;U+=1)if(!(k+U<=-1||j<=k+U))for(var F=-1;F<=7;F+=1)B+F<=-1||j<=B+F||(G[k+U][B+F]=0<=U&&U<=6&&(0==F||6==F)||0<=F&&F<=6&&(0==U||6==U)||2<=U&&U<=4&&2<=F&&F<=4)},st=function(){for(var k=8;k>F&1);G[Math.floor(F/3)][F%3+j-8-3]=$}for(F=0;F<18;F+=1)$=!k&&1==(B>>F&1),G[F%3+j-8-3][Math.floor(F/3)]=$},rt=function(k,B){for(var U=F<<3|B,$=H.getBCHTypeInfo(U),V=0;V<15;V+=1){var W=!k&&1==($>>V&1);V<6?G[V][8]=W:V<8?G[V+1][8]=W:G[j-15+V][8]=W}for(V=0;V<15;V+=1)W=!k&&1==($>>V&1),V<8?G[8][j-V-1]=W:V<9?G[8][15-V-1+1]=W:G[8][15-V-1]=W;G[j-8][8]=!k},ot=function(k,B){for(var U=-1,F=j-1,$=7,V=0,W=H.getMaskFunction(B),q=j-1;q>0;q-=2)for(6==q&&(q-=1);;){for(var K=0;K<2;K+=1)if(null==G[F][q-K]){var z=!1;V>>$&1)),W(F,q-K)&&(z=!z),G[F][q-K]=z,-1==($-=1)&&(V+=1,$=7)}if((F+=U)<0||j<=F){F-=U,U=-U;break}}},ht=function(k,B,U){for(var F=q.getRSBlocks(k,B),G=K(),j=0;j8*V)throw"code length overflow. ("+G.getLengthInBits()+">"+8*V+")";for(G.getLengthInBits()+4<=8*V&&G.put(0,4);G.getLengthInBits()%8!=0;)G.putBit(!1);for(;!(G.getLengthInBits()>=8*V||(G.put(236,8),G.getLengthInBits()>=8*V));)G.put(17,8);return function(k,B){for(var U=0,F=0,G=0,j=new Array(B.length),$=new Array(B.length),V=0;V=0?Q.getAt(X):0}}var Z=0;for(z=0;zF)&&(k=F,B=U)}return B}())},J.createTableTag=function(k,B){k=k||2;var U="";U+='',U+="";for(var F=0;F";for(var G=0;G';U+=""}return(U+="")+"
    "},J.createSvgTag=function(k,B,U,F){var G={};"object"==typeof arguments[0]&&(k=(G=arguments[0]).cellSize,B=G.margin,U=G.alt,F=G.title),k=k||2,B=void 0===B?4*k:B,(U="string"==typeof U?{text:U}:U||{}).text=U.text||null,U.id=U.text?U.id||"qrcode-description":null,(F="string"==typeof F?{text:F}:F||{}).text=F.text||null,F.id=F.text?F.id||"qrcode-title":null;var j,$,H,V,W=J.getModuleCount()*k+2*B,q="";for(V="l"+k+",0 0,"+k+" -"+k+",0 0,-"+k+"z ",q+=''+ct(F.text)+"":"",q+=U.text?''+ct(U.text)+"":"",q+='',q+='"},J.createDataURL=function(k,B){k=k||2,B=void 0===B?4*k:B;var U=J.getModuleCount()*k+2*B,F=B,G=U-B;return tt(U,U,(function(B,U){if(F<=B&&B"};var ct=function(k){for(var B="",U=0;U":B+=">";break;case"&":B+="&";break;case'"':B+=""";break;default:B+=F}}return B};return J.createASCII=function(k,B){if((k=k||1)<2)return function(k){k=void 0===k?2:k;var B,U,F,G,j,$=1*J.getModuleCount()+2*k,H=k,V=$-k,W={"██":"█","█ ":"▀"," █":"▄"," ":" "},q={"██":"▀","█ ":"▀"," █":" "," ":" "},K="";for(B=0;B<$;B+=2){for(F=Math.floor((B-H)/1),G=Math.floor((B+1-H)/1),U=0;U<$;U+=1)j="█",H<=U&&U=V?q[j]:W[j];K+="\n"}return $%2&&k>0?K.substring(0,K.length-$-1)+Array($+1).join("▀"):K.substring(0,K.length-1)}(B);k-=1,B=void 0===B?2*k:B;var U,F,G,j,$=J.getModuleCount()*k+2*B,H=B,V=$-B,W=Array(k+1).join("██"),q=Array(k+1).join(" "),K="",z="";for(U=0;U<$;U+=1){for(G=Math.floor((U-H)/k),z="",F=0;F<$;F+=1)j=1,H<=F&&F>>8),B.push(255&$)):B.push(F)}}return B}};var B,U,F,G,j,$={L:1,M:0,Q:3,H:2},H=(B=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],U=1335,F=7973,j=function(k){for(var B=0;0!=k;)B+=1,k>>>=1;return B},(G={}).getBCHTypeInfo=function(k){for(var B=k<<10;j(B)-j(U)>=0;)B^=U<=0;)B^=F<5&&(U+=3+j-5)}for(F=0;F=256;)B-=255;return k[B]}}}();function W(k,B){if(void 0===k.length)throw k.length+"/"+B;var U=function(){for(var U=0;U>>7-B%8&1)},put:function(k,B){for(var F=0;F>>B-F-1&1))},getLengthInBits:function(){return B},putBit:function(U){var F=Math.floor(B/8);k.length<=F&&k.push(0),U&&(k[F]|=128>>>B%8),B+=1}};return U},z=function(k){var B=k,U={getMode:function(){return 1},getLength:function(k){return B.length},write:function(k){for(var U=B,G=0;G+2>>8&255)+(255&G),k.put(G,13),U+=2}if(U>>8)},writeBytes:function(k,U,F){U=U||0,F=F||k.length;for(var G=0;G0&&(B+=","),B+=k[U];return B+"]"}};return B},J=function(k){var B=k,U=0,F=0,G=0,j={read:function(){for(;G<8;){if(U>=B.length){if(0==G)return-1;throw"unexpected end of file./"+G}var k=B.charAt(U);if(U+=1,"="==k)return G=0,-1;k.match(/^\s$/)||(F=F<<6|$(k.charCodeAt(0)),G+=6)}var j=F>>>G-8&255;return G-=8,j}},$=function(k){if(65<=k&&k<=90)return k-65;if(97<=k&&k<=122)return k-97+26;if(48<=k&&k<=57)return k-48+52;if(43==k)return 62;if(47==k)return 63;throw"c:"+k};return j},tt=function(k,B,U){for(var F=function(k,B){var U=k,F=B,G=new Array(k*B),j={setPixel:function(k,B,F){G[B*U+k]=F},write:function(k){k.writeString("GIF87a"),k.writeShort(U),k.writeShort(F),k.writeByte(128),k.writeByte(0),k.writeByte(0),k.writeByte(0),k.writeByte(0),k.writeByte(0),k.writeByte(255),k.writeByte(255),k.writeByte(255),k.writeString(","),k.writeShort(0),k.writeShort(0),k.writeShort(U),k.writeShort(F),k.writeByte(0);var B=$(2);k.writeByte(2);for(var G=0;B.length-G>255;)k.writeByte(255),k.writeBytes(B,G,255),G+=255;k.writeByte(B.length-G),k.writeBytes(B,G,B.length-G),k.writeByte(0),k.writeString(";")}},$=function(k){for(var B=1<>>B!=0)throw"length over";for(;W+B>=8;)V.writeByte(255&(k<>>=8-W,q=0,W=0;q|=k<0&&V.writeByte(q)}});z.write(B,F);var Y=0,Q=String.fromCharCode(G[Y]);for(Y+=1;Y=6;)j(k>>>B-6),B-=6},G.flush=function(){if(B>0&&(j(k<<6-B),k=0,B=0),U%3!=0)for(var G=3-U%3,$=0;$>6,128|63&F):F<55296||F>=57344?B.push(224|F>>12,128|F>>6&63,128|63&F):(U++,F=65536+((1023&F)<<10|1023&k.charCodeAt(U)),B.push(240|F>>18,128|F>>12&63,128|F>>6&63,128|63&F))}return B}(k)},void 0===(F="function"==typeof(U=function(){return G})?U.apply(B,[]):U)||(k.exports=F)},796:(k,B,U)=>{"use strict";U.d(B,{default:()=>Pt});var F=function(){return(F=Object.assign||function(k){for(var B,U=1,F=arguments.length;UF||G&&G<$.y)&&(G&&G<$.y?($.y=G,$.y%2==0&&$.x--):$.y-=2,H.y=$.y*j,$.x=1+2*Math.ceil(($.y/V-1)/2),H.x=Math.round(H.y/V)),{height:H.y,width:H.x,hideYDots:$.y,hideXDots:$.x}}const W={L:.07,M:.15,Q:.25,H:.3},q="dots",K="rounded",z="classy",Y="classy-rounded",Q="square",X="extra-rounded";var Z=function(){return(Z=Object.assign||function(k){for(var B,U=1,F=arguments.length;U2||$&&H||V&&W)this._basicSquare({x:B,y:U,size:F,context:G,rotation:0});else{if(2===q){var K=0;return $&&V?K=Math.PI/2:V&&H?K=Math.PI:H&&W&&(K=-Math.PI/2),void this._basicCornerRounded({x:B,y:U,size:F,context:G,rotation:K})}if(1===q)return K=0,V?K=Math.PI/2:H?K=Math.PI:W&&(K=-Math.PI/2),void this._basicSideRounded({x:B,y:U,size:F,context:G,rotation:K})}else this._basicDot({x:B,y:U,size:F,context:G,rotation:0})},k.prototype._drawExtraRounded=function(k){var B=k.x,U=k.y,F=k.size,G=k.context,j=k.getNeighbor,$=j?+j(-1,0):0,H=j?+j(1,0):0,V=j?+j(0,-1):0,W=j?+j(0,1):0,q=$+H+V+W;if(0!==q)if(q>2||$&&H||V&&W)this._basicSquare({x:B,y:U,size:F,context:G,rotation:0});else{if(2===q){var K=0;return $&&V?K=Math.PI/2:V&&H?K=Math.PI:H&&W&&(K=-Math.PI/2),void this._basicCornerExtraRounded({x:B,y:U,size:F,context:G,rotation:K})}if(1===q)return K=0,V?K=Math.PI/2:H?K=Math.PI:W&&(K=-Math.PI/2),void this._basicSideRounded({x:B,y:U,size:F,context:G,rotation:K})}else this._basicDot({x:B,y:U,size:F,context:G,rotation:0})},k.prototype._drawClassy=function(k){var B=k.x,U=k.y,F=k.size,G=k.context,j=k.getNeighbor,$=j?+j(-1,0):0,H=j?+j(1,0):0,V=j?+j(0,-1):0,W=j?+j(0,1):0;0!==$+H+V+W?$||V?H||W?this._basicSquare({x:B,y:U,size:F,context:G,rotation:0}):this._basicCornerRounded({x:B,y:U,size:F,context:G,rotation:Math.PI/2}):this._basicCornerRounded({x:B,y:U,size:F,context:G,rotation:-Math.PI/2}):this._basicCornersRounded({x:B,y:U,size:F,context:G,rotation:Math.PI/2})},k.prototype._drawClassyRounded=function(k){var B=k.x,U=k.y,F=k.size,G=k.context,j=k.getNeighbor,$=j?+j(-1,0):0,H=j?+j(1,0):0,V=j?+j(0,-1):0,W=j?+j(0,1):0;0!==$+H+V+W?$||V?H||W?this._basicSquare({x:B,y:U,size:F,context:G,rotation:0}):this._basicCornerExtraRounded({x:B,y:U,size:F,context:G,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:B,y:U,size:F,context:G,rotation:-Math.PI/2}):this._basicCornersRounded({x:B,y:U,size:F,context:G,rotation:Math.PI/2})},k}(),tt="square",et="extra-rounded";var it=function(){return(it=Object.assign||function(k){for(var B,U=1,F=arguments.length;U0&&G[G.length-1])||6!==j[0]&&2!==j[0])){$=0;continue}if(3===j[0]&&(!G||j[1]>G[0]&&j[1]=(B-G.hideXDots)/2&&k<(B+G.hideXDots)/2&&U>=(B-G.hideYDots)/2&&U<(B+G.hideYDots)/2||(null===(F=ht[k])||void 0===F?void 0:F[U])||(null===(j=ht[k-B+7])||void 0===j?void 0:j[U])||(null===($=ht[k])||void 0===$?void 0:$[U-B+7])||(null===(H=ct[k])||void 0===H?void 0:H[U])||(null===(V=ct[k-B+7])||void 0===V?void 0:V[U])||(null===(W=ct[k])||void 0===W?void 0:W[U-B+7]))})),this.drawCorners(),this._options.image&&this.drawImage({width:G.width,height:G.height,count:B,dotSize:F}),[2]}}))},new((F=void 0)||(F=Promise))((function(k,j){function $(k){try{V(G.next(k))}catch(k){j(k)}}function H(k){try{V(G.throw(k))}catch(k){j(k)}}function V(B){var U;B.done?k(B.value):(U=B.value,U instanceof F?U:new F((function(k){k(U)}))).then($,H)}V((G=G.apply(B,U||[])).next())}));var B,U,F,G},k.prototype.drawBackground=function(){var k=this.context,B=this._options;if(k){if(B.backgroundOptions.gradient){var U=B.backgroundOptions.gradient,F=this._createGradient({context:k,options:U,additionalRotation:0,x:0,y:0,size:this._canvas.width>this._canvas.height?this._canvas.width:this._canvas.height});U.colorStops.forEach((function(k){var B=k.offset,U=k.color;F.addColorStop(B,U)})),k.fillStyle=F}else B.backgroundOptions.color&&(k.fillStyle=B.backgroundOptions.color);k.fillRect(0,0,this._canvas.width,this._canvas.height)}},k.prototype.drawDots=function(k){var B=this;if(!this._qr)throw"QR code is not defined";var U=this.context;if(!U)throw"QR code is not defined";var F=this._options,G=this._qr.getModuleCount();if(G>F.width||G>F.height)throw"The canvas is too small.";var j=Math.min(F.width,F.height)-2*F.margin,$=Math.floor(j/G),H=Math.floor((F.width-G*$)/2),V=Math.floor((F.height-G*$)/2),W=new J({context:U,type:F.dotsOptions.type});U.beginPath();for(var q=function(U){for(var F=function(F){return k&&!k(U,F)?"continue":K._qr.isDark(U,F)?void W.draw(H+U*$,V+F*$,$,(function(j,$){return!(U+j<0||F+$<0||U+j>=G||F+$>=G)&&!(k&&!k(U+j,F+$))&&!!B._qr&&B._qr.isDark(U+j,F+$)})):"continue"},j=0;j=0&&W<=.25*Math.PI||W>1.75*Math.PI&&W<=2*Math.PI?(q-=H/2,K-=H/2*Math.tan(V),z+=H/2,Y+=H/2*Math.tan(V)):W>.25*Math.PI&&W<=.75*Math.PI?(K-=H/2,q-=H/2/Math.tan(V),Y+=H/2,z+=H/2/Math.tan(V)):W>.75*Math.PI&&W<=1.25*Math.PI?(q+=H/2,K+=H/2*Math.tan(V),z-=H/2,Y-=H/2*Math.tan(V)):W>1.25*Math.PI&&W<=1.75*Math.PI&&(K+=H/2,q+=H/2/Math.tan(V),Y-=H/2,z-=H/2/Math.tan(V)),B=U.createLinearGradient(Math.round(q),Math.round(K),Math.round(z),Math.round(Y))}return B},k}();var lt=function(){return(lt=Object.assign||function(k){for(var B,U=1,F=arguments.length;U2||j&&$||H&&V)this._basicSquare({x:B,y:U,size:F,rotation:0});else{if(2===W){var q=0;return j&&H?q=Math.PI/2:H&&$?q=Math.PI:$&&V&&(q=-Math.PI/2),void this._basicCornerRounded({x:B,y:U,size:F,rotation:q})}if(1===W)return q=0,H?q=Math.PI/2:$?q=Math.PI:V&&(q=-Math.PI/2),void this._basicSideRounded({x:B,y:U,size:F,rotation:q})}else this._basicDot({x:B,y:U,size:F,rotation:0})},k.prototype._drawExtraRounded=function(k){var B=k.x,U=k.y,F=k.size,G=k.getNeighbor,j=G?+G(-1,0):0,$=G?+G(1,0):0,H=G?+G(0,-1):0,V=G?+G(0,1):0,W=j+$+H+V;if(0!==W)if(W>2||j&&$||H&&V)this._basicSquare({x:B,y:U,size:F,rotation:0});else{if(2===W){var q=0;return j&&H?q=Math.PI/2:H&&$?q=Math.PI:$&&V&&(q=-Math.PI/2),void this._basicCornerExtraRounded({x:B,y:U,size:F,rotation:q})}if(1===W)return q=0,H?q=Math.PI/2:$?q=Math.PI:V&&(q=-Math.PI/2),void this._basicSideRounded({x:B,y:U,size:F,rotation:q})}else this._basicDot({x:B,y:U,size:F,rotation:0})},k.prototype._drawClassy=function(k){var B=k.x,U=k.y,F=k.size,G=k.getNeighbor,j=G?+G(-1,0):0,$=G?+G(1,0):0,H=G?+G(0,-1):0,V=G?+G(0,1):0;0!==j+$+H+V?j||H?$||V?this._basicSquare({x:B,y:U,size:F,rotation:0}):this._basicCornerRounded({x:B,y:U,size:F,rotation:Math.PI/2}):this._basicCornerRounded({x:B,y:U,size:F,rotation:-Math.PI/2}):this._basicCornersRounded({x:B,y:U,size:F,rotation:Math.PI/2})},k.prototype._drawClassyRounded=function(k){var B=k.x,U=k.y,F=k.size,G=k.getNeighbor,j=G?+G(-1,0):0,$=G?+G(1,0):0,H=G?+G(0,-1):0,V=G?+G(0,1):0;0!==j+$+H+V?j||H?$||V?this._basicSquare({x:B,y:U,size:F,rotation:0}):this._basicCornerExtraRounded({x:B,y:U,size:F,rotation:Math.PI/2}):this._basicCornerExtraRounded({x:B,y:U,size:F,rotation:-Math.PI/2}):this._basicCornersRounded({x:B,y:U,size:F,rotation:Math.PI/2})},k}();var ft=function(){return(ft=Object.assign||function(k){for(var B,U=1,F=arguments.length;U0&&G[G.length-1])||6!==j[0]&&2!==j[0])){$=0;continue}if(3===j[0]&&(!G||j[1]>G[0]&&j[1]=(B-G.hideXDots)/2&&k<(B+G.hideXDots)/2&&U>=(B-G.hideYDots)/2&&U<(B+G.hideYDots)/2||(null===(F=gt[k])||void 0===F?void 0:F[U])||(null===(j=gt[k-B+7])||void 0===j?void 0:j[U])||(null===($=gt[k])||void 0===$?void 0:$[U-B+7])||(null===(H=mt[k])||void 0===H?void 0:H[U])||(null===(V=mt[k-B+7])||void 0===V?void 0:V[U])||(null===(W=mt[k])||void 0===W?void 0:W[U-B+7]))})),this.drawCorners(),this._options.image&&this.drawImage({width:G.width,height:G.height,count:B,dotSize:F}),[2]}}))},new((F=void 0)||(F=Promise))((function(k,j){function $(k){try{V(G.next(k))}catch(k){j(k)}}function H(k){try{V(G.throw(k))}catch(k){j(k)}}function V(B){var U;B.done?k(B.value):(U=B.value,U instanceof F?U:new F((function(k){k(U)}))).then($,H)}V((G=G.apply(B,U||[])).next())}));var B,U,F,G},k.prototype.drawBackground=function(){var k,B,U=this._element,F=this._options;if(U){var G=null===(k=F.backgroundOptions)||void 0===k?void 0:k.gradient,j=null===(B=F.backgroundOptions)||void 0===B?void 0:B.color;(G||j)&&this._createColor({options:G,color:j,additionalRotation:0,x:0,y:0,height:F.height,width:F.width,name:"background-color"})}},k.prototype.drawDots=function(k){var B,U,F=this;if(!this._qr)throw"QR code is not defined";var G=this._options,j=this._qr.getModuleCount();if(j>G.width||j>G.height)throw"The canvas is too small.";var $=Math.min(G.width,G.height)-2*G.margin,H=Math.floor($/j),V=Math.floor((G.width-j*H)/2),W=Math.floor((G.height-j*H)/2),q=new ut({svg:this._element,type:G.dotsOptions.type});this._dotsClipPath=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),this._dotsClipPath.setAttribute("id","clip-path-dot-color"),this._defs.appendChild(this._dotsClipPath),this._createColor({options:null===(B=G.dotsOptions)||void 0===B?void 0:B.gradient,color:G.dotsOptions.color,additionalRotation:0,x:V,y:W,height:j*H,width:j*H,name:"dot-color"});for(var K=function(B){for(var G=function(G){return k&&!k(B,G)?"continue":(null===(U=z._qr)||void 0===U?void 0:U.isDark(B,G))?(q.draw(V+B*H,W+G*H,H,(function(U,$){return!(B+U<0||G+$<0||B+U>=j||G+$>=j)&&!(k&&!k(B+U,G+$))&&!!F._qr&&F._qr.isDark(B+U,G+$)})),void(q._element&&z._dotsClipPath&&z._dotsClipPath.appendChild(q._element))):"continue"},$=0;$$?H:$,q=document.createElementNS("http://www.w3.org/2000/svg","rect");if(q.setAttribute("x",String(G)),q.setAttribute("y",String(j)),q.setAttribute("height",String($)),q.setAttribute("width",String(H)),q.setAttribute("clip-path","url('#clip-path-"+V+"')"),B){var K;if(B.type===ot)(K=document.createElementNS("http://www.w3.org/2000/svg","radialGradient")).setAttribute("id",V),K.setAttribute("gradientUnits","userSpaceOnUse"),K.setAttribute("fx",String(G+H/2)),K.setAttribute("fy",String(j+$/2)),K.setAttribute("cx",String(G+H/2)),K.setAttribute("cy",String(j+$/2)),K.setAttribute("r",String(W/2));else{var z=((B.rotation||0)+F)%(2*Math.PI),Y=(z+2*Math.PI)%(2*Math.PI),Q=G+H/2,X=j+$/2,Z=G+H/2,J=j+$/2;Y>=0&&Y<=.25*Math.PI||Y>1.75*Math.PI&&Y<=2*Math.PI?(Q-=H/2,X-=$/2*Math.tan(z),Z+=H/2,J+=$/2*Math.tan(z)):Y>.25*Math.PI&&Y<=.75*Math.PI?(X-=$/2,Q-=H/2/Math.tan(z),J+=$/2,Z+=H/2/Math.tan(z)):Y>.75*Math.PI&&Y<=1.25*Math.PI?(Q+=H/2,X+=$/2*Math.tan(z),Z-=H/2,J-=$/2*Math.tan(z)):Y>1.25*Math.PI&&Y<=1.75*Math.PI&&(X+=$/2,Q+=H/2/Math.tan(z),J-=$/2,Z-=H/2/Math.tan(z)),(K=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")).setAttribute("id",V),K.setAttribute("gradientUnits","userSpaceOnUse"),K.setAttribute("x1",String(Math.round(Q))),K.setAttribute("y1",String(Math.round(X))),K.setAttribute("x2",String(Math.round(Z))),K.setAttribute("y2",String(Math.round(J)))}B.colorStops.forEach((function(k){var B=k.offset,U=k.color,F=document.createElementNS("http://www.w3.org/2000/svg","stop");F.setAttribute("offset",100*B+"%"),F.setAttribute("stop-color",U),K.appendChild(F)})),q.setAttribute("fill","url('#"+V+"')"),this._defs.appendChild(K)}else U&&q.setAttribute("fill",U);this._element.appendChild(q)},k}(),_t="canvas";for(var Et={},wt=0;wt<=40;wt++)Et[wt]=wt;const Tt={type:_t,width:300,height:300,data:"",margin:0,qrOptions:{typeNumber:Et[0],mode:void 0,errorCorrectionLevel:"Q"},imageOptions:{hideBackgroundDots:!0,imageSize:.4,crossOrigin:void 0,margin:0},dotsOptions:{type:"square",color:"#000"},backgroundOptions:{color:"#fff"}};var St=function(){return(St=Object.assign||function(k){for(var B,U=1,F=arguments.length;UMath.min(B.width,B.height)&&(B.margin=Math.min(B.width,B.height)),B.dotsOptions=St({},B.dotsOptions),B.dotsOptions.gradient&&(B.dotsOptions.gradient=At(B.dotsOptions.gradient)),B.cornersSquareOptions&&(B.cornersSquareOptions=St({},B.cornersSquareOptions),B.cornersSquareOptions.gradient&&(B.cornersSquareOptions.gradient=At(B.cornersSquareOptions.gradient))),B.cornersDotOptions&&(B.cornersDotOptions=St({},B.cornersDotOptions),B.cornersDotOptions.gradient&&(B.cornersDotOptions.gradient=At(B.cornersDotOptions.gradient))),B.backgroundOptions&&(B.backgroundOptions=St({},B.backgroundOptions),B.backgroundOptions.gradient&&(B.backgroundOptions.gradient=At(B.backgroundOptions.gradient))),B}var Ot=U(192),It=U.n(Ot),Dt=function(k,B,U,F){return new(U||(U=Promise))((function(G,j){function $(k){try{V(F.next(k))}catch(k){j(k)}}function H(k){try{V(F.throw(k))}catch(k){j(k)}}function V(k){var B;k.done?G(k.value):(B=k.value,B instanceof U?B:new U((function(k){k(B)}))).then($,H)}V((F=F.apply(k,B||[])).next())}))},Rt=function(k,B){var U,F,G,j,$={label:0,sent:function(){if(1&G[0])throw G[1];return G[1]},trys:[],ops:[]};return j={next:H(0),throw:H(1),return:H(2)},"function"==typeof Symbol&&(j[Symbol.iterator]=function(){return this}),j;function H(j){return function(H){return function(j){if(U)throw new TypeError("Generator is already executing.");for(;$;)try{if(U=1,F&&(G=2&j[0]?F.return:j[0]?F.throw||((G=F.return)&&G.call(F),0):F.next)&&!(G=G.call(F,j[1])).done)return G;switch(F=0,G&&(j=[2&j[0],G.value]),j[0]){case 0:case 1:G=j;break;case 4:return $.label++,{value:j[1],done:!1};case 5:$.label++,F=j[1],j=[0];continue;case 7:j=$.ops.pop(),$.trys.pop();continue;default:if(!((G=(G=$.trys).length>0&&G[G.length-1])||6!==j[0]&&2!==j[0])){$=0;continue}if(3===j[0]&&(!G||j[1]>G[0]&&j[1]\r\n'+F],{type:"image/svg+xml"})]):[2,new Promise((function(U){return B.getCanvas().toBlob(U,"image/"+k,1)}))]}}))}))},k.prototype.download=function(k){return Dt(this,void 0,void 0,(function(){var B,U,F,G,j;return Rt(this,(function($){switch($.label){case 0:if(!this._qr)throw"QR code is empty";return B="png",U="qr","string"==typeof k?(B=k,console.warn("Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument")):"object"==typeof k&&null!==k&&(k.name&&(U=k.name),k.extension&&(B=k.extension)),[4,this._getQRStylingElement(B)];case 1:return F=$.sent(),"svg"===B.toLowerCase()?(G=new XMLSerializer,j='\r\n'+(j=G.serializeToString(F.getElement())),H("data:image/svg+xml;charset=utf-8,"+encodeURIComponent(j),U+".svg")):H(F.getCanvas().toDataURL("image/"+B),U+"."+B),[2]}}))}))},k}()}},B={};function U(F){if(B[F])return B[F].exports;var G=B[F]={exports:{}};return k[F](G,G.exports,U),G.exports}return U.n=k=>{var B=k&&k.__esModule?()=>k.default:()=>k;return U.d(B,{a:B}),B},U.d=(k,B)=>{for(var F in B)U.o(B,F)&&!U.o(k,F)&&Object.defineProperty(k,F,{enumerable:!0,get:B[F]})},U.o=(k,B)=>Object.prototype.hasOwnProperty.call(k,B),U(796)})().default},74765:k=>{"use strict";var B=String.prototype.replace,U=/%20/g,F="RFC1738",G="RFC3986";k.exports={default:G,formatters:{RFC1738:function(k){return B.call(k,U,"+")},RFC3986:function(k){return String(k)}},RFC1738:F,RFC3986:G}},55373:(k,B,U)=>{"use strict";var F=U(98636),G=U(62642),j=U(74765);k.exports={formats:j,parse:G,stringify:F}},62642:(k,B,U)=>{"use strict";var F=U(37720),G=Object.prototype.hasOwnProperty,j=Array.isArray,$={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:F.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},H=function(k){return k.replace(/&#(\d+);/g,(function(k,B){return String.fromCharCode(parseInt(B,10))}))},V=function(k,B){return k&&"string"==typeof k&&B.comma&&k.indexOf(",")>-1?k.split(","):k},W=function(k,B,U,F){if(k){var j=U.allowDots?k.replace(/\.([^.[]+)/g,"[$1]"):k,$=/(\[[^[\]]*])/g,H=U.depth>0&&/(\[[^[\]]*])/.exec(j),W=H?j.slice(0,H.index):j,q=[];if(W){if(!U.plainObjects&&G.call(Object.prototype,W)&&!U.allowPrototypes)return;q.push(W)}for(var K=0;U.depth>0&&null!==(H=$.exec(j))&&K=0;--j){var $,H=k[j];if("[]"===H&&U.parseArrays)$=U.allowEmptyArrays&&(""===G||U.strictNullHandling&&null===G)?[]:[].concat(G);else{$=U.plainObjects?Object.create(null):{};var W="["===H.charAt(0)&&"]"===H.charAt(H.length-1)?H.slice(1,-1):H,q=U.decodeDotInKeys?W.replace(/%2E/g,"."):W,K=parseInt(q,10);U.parseArrays||""!==q?!isNaN(K)&&H!==q&&String(K)===q&&K>=0&&U.parseArrays&&K<=U.arrayLimit?($=[])[K]=G:"__proto__"!==q&&($[q]=G):$={0:G}}G=$}return G}(q,B,U,F)}};k.exports=function(k,B){var U=function(k){if(!k)return $;if(void 0!==k.allowEmptyArrays&&"boolean"!=typeof k.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==k.decodeDotInKeys&&"boolean"!=typeof k.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==k.decoder&&void 0!==k.decoder&&"function"!=typeof k.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==k.charset&&"utf-8"!==k.charset&&"iso-8859-1"!==k.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var B=void 0===k.charset?$.charset:k.charset,U=void 0===k.duplicates?$.duplicates:k.duplicates;if("combine"!==U&&"first"!==U&&"last"!==U)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===k.allowDots?!0===k.decodeDotInKeys||$.allowDots:!!k.allowDots,allowEmptyArrays:"boolean"==typeof k.allowEmptyArrays?!!k.allowEmptyArrays:$.allowEmptyArrays,allowPrototypes:"boolean"==typeof k.allowPrototypes?k.allowPrototypes:$.allowPrototypes,allowSparse:"boolean"==typeof k.allowSparse?k.allowSparse:$.allowSparse,arrayLimit:"number"==typeof k.arrayLimit?k.arrayLimit:$.arrayLimit,charset:B,charsetSentinel:"boolean"==typeof k.charsetSentinel?k.charsetSentinel:$.charsetSentinel,comma:"boolean"==typeof k.comma?k.comma:$.comma,decodeDotInKeys:"boolean"==typeof k.decodeDotInKeys?k.decodeDotInKeys:$.decodeDotInKeys,decoder:"function"==typeof k.decoder?k.decoder:$.decoder,delimiter:"string"==typeof k.delimiter||F.isRegExp(k.delimiter)?k.delimiter:$.delimiter,depth:"number"==typeof k.depth||!1===k.depth?+k.depth:$.depth,duplicates:U,ignoreQueryPrefix:!0===k.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof k.interpretNumericEntities?k.interpretNumericEntities:$.interpretNumericEntities,parameterLimit:"number"==typeof k.parameterLimit?k.parameterLimit:$.parameterLimit,parseArrays:!1!==k.parseArrays,plainObjects:"boolean"==typeof k.plainObjects?k.plainObjects:$.plainObjects,strictDepth:"boolean"==typeof k.strictDepth?!!k.strictDepth:$.strictDepth,strictNullHandling:"boolean"==typeof k.strictNullHandling?k.strictNullHandling:$.strictNullHandling}}(B);if(""===k||null==k)return U.plainObjects?Object.create(null):{};for(var q="string"==typeof k?function(k,B){var U={__proto__:null},W=B.ignoreQueryPrefix?k.replace(/^\?/,""):k;W=W.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var q,K=B.parameterLimit===1/0?void 0:B.parameterLimit,z=W.split(B.delimiter,K),Y=-1,Q=B.charset;if(B.charsetSentinel)for(q=0;q-1&&(Z=j(Z)?[Z]:Z);var it=G.call(U,X);it&&"combine"===B.duplicates?U[X]=F.combine(U[X],Z):it&&"last"!==B.duplicates||(U[X]=Z)}return U}(k,U):k,K=U.plainObjects?Object.create(null):{},z=Object.keys(q),Y=0;Y{"use strict";var F=U(920),G=U(37720),j=U(74765),$=Object.prototype.hasOwnProperty,H={brackets:function(k){return k+"[]"},comma:"comma",indices:function(k,B){return k+"["+B+"]"},repeat:function(k){return k}},V=Array.isArray,W=Array.prototype.push,q=function(k,B){W.apply(k,V(B)?B:[B])},K=Date.prototype.toISOString,z=j.default,Y={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:G.encode,encodeValuesOnly:!1,format:z,formatter:j.formatters[z],indices:!1,serializeDate:function(k){return K.call(k)},skipNulls:!1,strictNullHandling:!1},Q={},X=function k(B,U,j,$,H,W,K,z,X,Z,J,tt,et,it,st,nt,at,rt){for(var ot,ht=B,ct=rt,dt=0,lt=!1;void 0!==(ct=ct.get(Q))&&!lt;){var ut=ct.get(B);if(dt+=1,void 0!==ut){if(ut===dt)throw new RangeError("Cyclic object value");lt=!0}void 0===ct.get(Q)&&(dt=0)}if("function"==typeof Z?ht=Z(U,ht):ht instanceof Date?ht=et(ht):"comma"===j&&V(ht)&&(ht=G.maybeMap(ht,(function(k){return k instanceof Date?et(k):k}))),null===ht){if(W)return X&&!nt?X(U,Y.encoder,at,"key",it):U;ht=""}if("string"==typeof(ot=ht)||"number"==typeof ot||"boolean"==typeof ot||"symbol"==typeof ot||"bigint"==typeof ot||G.isBuffer(ht))return X?[st(nt?U:X(U,Y.encoder,at,"key",it))+"="+st(X(ht,Y.encoder,at,"value",it))]:[st(U)+"="+st(String(ht))];var ft,bt=[];if(void 0===ht)return bt;if("comma"===j&&V(ht))nt&&X&&(ht=G.maybeMap(ht,X)),ft=[{value:ht.length>0?ht.join(",")||null:void 0}];else if(V(Z))ft=Z;else{var pt=Object.keys(ht);ft=J?pt.sort(J):pt}var vt=z?U.replace(/\./g,"%2E"):U,gt=$&&V(ht)&&1===ht.length?vt+"[]":vt;if(H&&V(ht)&&0===ht.length)return gt+"[]";for(var mt=0;mt0?it+et:""}},37720:(k,B,U)=>{"use strict";var F=U(74765),G=Object.prototype.hasOwnProperty,j=Array.isArray,$=function(){for(var k=[],B=0;B<256;++B)k.push("%"+((B<16?"0":"")+B.toString(16)).toUpperCase());return k}(),H=function(k,B){for(var U=B&&B.plainObjects?Object.create(null):{},F=0;F1;){var B=k.pop(),U=B.obj[B.prop];if(j(U)){for(var F=[],G=0;G=V?H.slice(q,q+V):H,z=[],Y=0;Y=48&&Q<=57||Q>=65&&Q<=90||Q>=97&&Q<=122||j===F.RFC1738&&(40===Q||41===Q)?z[z.length]=K.charAt(Y):Q<128?z[z.length]=$[Q]:Q<2048?z[z.length]=$[192|Q>>6]+$[128|63&Q]:Q<55296||Q>=57344?z[z.length]=$[224|Q>>12]+$[128|Q>>6&63]+$[128|63&Q]:(Y+=1,Q=65536+((1023&Q)<<10|1023&K.charCodeAt(Y)),z[z.length]=$[240|Q>>18]+$[128|Q>>12&63]+$[128|Q>>6&63]+$[128|63&Q])}W+=z.join("")}return W},isBuffer:function(k){return!(!k||"object"!=typeof k)&&!!(k.constructor&&k.constructor.isBuffer&&k.constructor.isBuffer(k))},isRegExp:function(k){return"[object RegExp]"===Object.prototype.toString.call(k)},maybeMap:function(k,B){if(j(k)){for(var U=[],F=0;F{"use strict";var F=U(24280),G=U(45228),j=U(30454);function $(k,B){return B.encode?B.strict?F(k):encodeURIComponent(k):k}function H(k){return Array.isArray(k)?k.sort():"object"==typeof k?H(Object.keys(k)).sort((function(k,B){return Number(k)-Number(B)})).map((function(B){return k[B]})):k}B.qg=function(k,B){var U=function(k){var B;switch(k.arrayFormat){case"index":return function(k,U,F){B=/\[(\d*)\]$/.exec(k),k=k.replace(/\[\d*\]$/,""),B?(void 0===F[k]&&(F[k]={}),F[k][B[1]]=U):F[k]=U};case"bracket":return function(k,U,F){B=/(\[\])$/.exec(k),k=k.replace(/\[\]$/,""),B?void 0!==F[k]?F[k]=[].concat(F[k],U):F[k]=[U]:F[k]=U};default:return function(k,B,U){void 0!==U[k]?U[k]=[].concat(U[k],B):U[k]=B}}}(B=G({arrayFormat:"none"},B)),F=Object.create(null);return"string"!=typeof k?F:(k=k.trim().replace(/^(\?|#|&)/,""))?(k.split("&").forEach((function(k){var B=k.replace(/\+/g," ").split("="),G=B.shift(),$=B.length>0?B.join("="):void 0;$=void 0===$?null:j($),U(j(G),$,F)})),Object.keys(F).sort().reduce((function(k,B){var U=F[B];return Boolean(U)&&"object"==typeof U&&!Array.isArray(U)?k[B]=H(U):k[B]=U,k}),Object.create(null))):F}},99721:(k,B,U)=>{"use strict";var F=U(36556),G=U(14035),j=F("RegExp.prototype.exec"),$=U(69675);k.exports=function(k){if(!G(k))throw new $("`regex` must be a RegExp");return function(B){return null!==j(k,B)}}},87566:k=>{k.exports=function(k){var B=[],U=[];return function k(F,G){var j,$,H;if(!("object"!=typeof F||null===F||F instanceof Boolean||F instanceof Date||F instanceof Number||F instanceof RegExp||F instanceof String)){for(j=0;j{const F=U(87566),G=function(){return!this}();function j(k,B){this.name="AuthTokenExpiredError",this.message=k,this.expiry=B,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function $(k){this.name="AuthTokenInvalidError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function H(k,B){this.name="AuthTokenNotBeforeError",this.message=k,this.date=B,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function V(k){this.name="AuthTokenError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function W(k){this.name="AuthError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function q(k,B){this.name="SilentMiddlewareBlockedError",this.message=k,this.type=B,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function K(k){this.name="InvalidActionError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function z(k){this.name="InvalidArgumentsError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function Y(k){this.name="InvalidOptionsError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function Q(k){this.name="InvalidMessageError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function X(k,B){this.name="SocketProtocolError",this.message=k,this.code=B,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function Z(k){this.name="ServerProtocolError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function J(k){this.name="HTTPServerError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function tt(k){this.name="ResourceLimitError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function et(k){this.name="TimeoutError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function it(k,B,U,F){this.name="BadConnectionError",this.message=k,this.type=B,this.code=U||1001,this.reason=F||ot[this.code]||"",Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function st(k){this.name="BrokerError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function nt(k,B){this.name="ProcessExitError",this.message=k,this.code=B,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}function at(k){this.name="UnknownError",this.message=k,Error.captureStackTrace&&!G?Error.captureStackTrace(this,arguments.callee):this.stack=(new Error).stack}j.prototype=Object.create(Error.prototype),$.prototype=Object.create(Error.prototype),H.prototype=Object.create(Error.prototype),V.prototype=Object.create(Error.prototype),W.prototype=Object.create(Error.prototype),q.prototype=Object.create(Error.prototype),K.prototype=Object.create(Error.prototype),z.prototype=Object.create(Error.prototype),Y.prototype=Object.create(Error.prototype),Q.prototype=Object.create(Error.prototype),X.prototype=Object.create(Error.prototype),Z.prototype=Object.create(Error.prototype),J.prototype=Object.create(Error.prototype),tt.prototype=Object.create(Error.prototype),et.prototype=Object.create(Error.prototype),it.prototype=Object.create(Error.prototype),st.prototype=Object.create(Error.prototype),nt.prototype=Object.create(Error.prototype),at.prototype=Object.create(Error.prototype),k.exports={AuthTokenExpiredError:j,AuthTokenInvalidError:$,AuthTokenNotBeforeError:H,AuthTokenError:V,AuthError:W,SilentMiddlewareBlockedError:q,InvalidActionError:K,InvalidArgumentsError:z,InvalidOptionsError:Y,InvalidMessageError:Q,SocketProtocolError:X,ServerProtocolError:Z,HTTPServerError:J,ResourceLimitError:tt,TimeoutError:et,BadConnectionError:it,BrokerError:st,ProcessExitError:nt,UnknownError:at};const rt={1001:"Socket was disconnected",1002:"A WebSocket protocol error was encountered",1003:"Server terminated socket because it received invalid data",1005:"Socket closed without status code",1006:"Socket hung up",1007:"Message format was incorrect",1008:"Encountered a policy violation",1009:"Message was too big to process",1010:"Client ended the connection because the server did not comply with extension requirements",1011:"Server encountered an unexpected fatal condition",4e3:"Server ping timed out",4001:"Client pong timed out",4002:"Server failed to sign auth token",4003:"Failed to complete handshake",4004:"Client failed to save auth token",4005:"Did not receive #handshake from client before timeout",4006:"Failed to bind socket to message broker",4007:"Client connection establishment timed out",4008:"Server rejected handshake from client",4009:"Server received a message before the client handshake"},ot={1e3:"Socket closed normally",1001:rt[1001]};k.exports.socketProtocolErrorStatuses=rt,k.exports.socketProtocolIgnoreStatuses=ot,k.exports.dehydrateError=function(k){let B;if(k&&"object"==typeof k){B={message:k.message};for(let U of Object.keys(k))B[U]=k[U]}else B="function"==typeof k?"[function "+("string"==typeof k.name?k.name:"anonymous")+"]":k;return F(B)},k.exports.hydrateError=function(k){let B=null;if(null!=k)if("object"==typeof k){B=new Error("string"==typeof k.message?k.message:"Invalid error message format"),"string"==typeof k.name&&(B.name=k.name);for(let U of Object.keys(k))void 0===B[U]&&(B[U]=k[U])}else B=k;return B},k.exports.decycle=F},87916:k=>{const B="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",U=/^[ \n\r\t]*[{\[]/;let F=function(k){let U=new Uint8Array(k),F=U.length,G="";for(let j=0;j>2],G+=B[(3&U[j])<<4|U[j+1]>>4],G+=B[(15&U[j+1])<<2|U[j+2]>>6],G+=B[63&U[j+2]];return F%3==2?G=G.substring(0,G.length-1)+"=":F%3==1&&(G=G.substring(0,G.length-2)+"=="),G},G=function(k,B){if("undefined"!=typeof ArrayBuffer&&B instanceof ArrayBuffer)return{base64:!0,data:F(B)};if("undefined"!=typeof Buffer){if(B instanceof Buffer)return{base64:!0,data:B.toString("base64")};if(B&&"Buffer"===B.type&&Array.isArray(B.data)){let k;return k=Buffer.from?Buffer.from(B.data):new Buffer(B.data),{base64:!0,data:k.toString("base64")}}}return B};k.exports.decode=function(k){if(null==k)return null;if("#1"===k||"#2"===k)return k;let B=k.toString();if(!U.test(B))return B;try{return JSON.parse(B)}catch(F){}return B},k.exports.encode=function(k){return"#1"===k||"#2"===k?k:JSON.stringify(k,G)}},43924:(k,B,U)=>{"use strict";var F=256,G=[],j=void 0===U.g?window:U.g,$=Math.pow(F,6),H=Math.pow(2,52),V=2*H,W=255,q=Math.random;function K(k){var B,U=k.length,G=this,j=0,$=G.i=G.j=0,H=G.S=[];for(U||(k=[U++]);j=V;)k/=2,B/=2,U>>>=1;return(k+U)/B}},k.exports.resetGlobal=function(){Math.random=q},Y(Math.random(),G)},96897:(k,B,U)=>{"use strict";var F=U(70453),G=U(30041),j=U(30592)(),$=U(75795),H=U(69675),V=F("%Math.floor%");k.exports=function(k,B){if("function"!=typeof k)throw new H("`fn` is not a function");if("number"!=typeof B||B<0||B>4294967295||V(B)!==B)throw new H("`length` must be a positive 32-bit integer");var U=arguments.length>2&&!!arguments[2],F=!0,W=!0;if("length"in k&&$){var q=$(k,"length");q&&!q.configurable&&(F=!1),q&&!q.writable&&(W=!1)}return(F||W||!U)&&(j?G(k,"length",B,!0,!0):G(k,"length",B)),k}},84427:(k,B,U)=>{"use strict";const F=Symbol.prototype.valueOf,G=U(2149);k.exports=function(k,B){switch(G(k)){case"array":return k.slice();case"object":return Object.assign({},k);case"date":return new k.constructor(Number(k));case"map":return new Map(k);case"set":return new Set(k);case"buffer":return function(k){const B=k.length,U=Buffer.allocUnsafe?Buffer.allocUnsafe(B):Buffer.from(B);return k.copy(U),U}(k);case"symbol":return function(k){return F?Object(F.call(k)):{}}(k);case"arraybuffer":return function(k){const B=new k.constructor(k.byteLength);return new Uint8Array(B).set(new Uint8Array(k)),B}(k);case"float32array":case"float64array":case"int16array":case"int32array":case"int8array":case"uint16array":case"uint32array":case"uint8clampedarray":case"uint8array":return function(k,B){return new k.constructor(k.buffer,k.byteOffset,k.length)}(k);case"regexp":return function(k){const B=void 0!==k.flags?k.flags:/\w+$/.exec(k)||void 0,U=new k.constructor(k.source,B);return U.lastIndex=k.lastIndex,U}(k);case"error":return Object.create(k);default:return k}}},2149:k=>{var B=Object.prototype.toString;function U(k){return"function"==typeof k.constructor?k.constructor.name:null}k.exports=function(k){if(void 0===k)return"undefined";if(null===k)return"null";var F=typeof k;if("boolean"===F)return"boolean";if("string"===F)return"string";if("number"===F)return"number";if("symbol"===F)return"symbol";if("function"===F)return"GeneratorFunction"===U(k)?"generatorfunction":"function";if(function(k){return Array.isArray?Array.isArray(k):k instanceof Array}(k))return"array";if(function(k){if(k.constructor&&"function"==typeof k.constructor.isBuffer)return k.constructor.isBuffer(k);return!1}(k))return"buffer";if(function(k){try{if("number"==typeof k.length&&"function"==typeof k.callee)return!0}catch(B){if(-1!==B.message.indexOf("callee"))return!0}return!1}(k))return"arguments";if(function(k){return k instanceof Date||"function"==typeof k.toDateString&&"function"==typeof k.getDate&&"function"==typeof k.setDate}(k))return"date";if(function(k){return k instanceof Error||"string"==typeof k.message&&k.constructor&&"number"==typeof k.constructor.stackTraceLimit}(k))return"error";if(function(k){return k instanceof RegExp||"string"==typeof k.flags&&"boolean"==typeof k.ignoreCase&&"boolean"==typeof k.multiline&&"boolean"==typeof k.global}(k))return"regexp";switch(U(k)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(k){return"function"==typeof k.throw&&"function"==typeof k.return&&"function"==typeof k.next}(k))return"generator";switch(F=B.call(k)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return F.slice(8,-1).toLowerCase().replace(/\s/g,"")}},14803:(k,B,U)=>{"use strict";var F=U(58859),G=U(69675),j=function(k,B,U){for(var F,G=k;null!=(F=G.next);G=F)if(F.key===B)return G.next=F.next,U||(F.next=k.next,k.next=F),F};k.exports=function(){var k,B={assert:function(k){if(!B.has(k))throw new G("Side channel does not contain "+F(k))},delete:function(B){var U=k&&k.next,F=function(k,B){if(k)return j(k,B,!0)}(k,B);return F&&U&&U===F&&(k=void 0),!!F},get:function(B){return function(k,B){if(k){var U=j(k,B);return U&&U.value}}(k,B)},has:function(B){return function(k,B){return!!k&&!!j(k,B)}(k,B)},set:function(B,U){k||(k={next:void 0}),function(k,B,U){var F=j(k,B);F?F.value=U:k.next={key:B,next:k.next,value:U}}(k,B,U)}};return B}},80507:(k,B,U)=>{"use strict";var F=U(70453),G=U(36556),j=U(58859),$=U(69675),H=F("%Map%",!0),V=G("Map.prototype.get",!0),W=G("Map.prototype.set",!0),q=G("Map.prototype.has",!0),K=G("Map.prototype.delete",!0),z=G("Map.prototype.size",!0);k.exports=!!H&&function(){var k,B={assert:function(k){if(!B.has(k))throw new $("Side channel does not contain "+j(k))},delete:function(B){if(k){var U=K(k,B);return 0===z(k)&&(k=void 0),U}return!1},get:function(B){if(k)return V(k,B)},has:function(B){return!!k&&q(k,B)},set:function(B,U){k||(k=new H),W(k,B,U)}};return B}},72271:(k,B,U)=>{"use strict";var F=U(70453),G=U(36556),j=U(58859),$=U(80507),H=U(69675),V=F("%WeakMap%",!0),W=G("WeakMap.prototype.get",!0),q=G("WeakMap.prototype.set",!0),K=G("WeakMap.prototype.has",!0),z=G("WeakMap.prototype.delete",!0);k.exports=V?function(){var k,B,U={assert:function(k){if(!U.has(k))throw new H("Side channel does not contain "+j(k))},delete:function(U){if(V&&U&&("object"==typeof U||"function"==typeof U)){if(k)return z(k,U)}else if($&&B)return B.delete(U);return!1},get:function(U){return V&&U&&("object"==typeof U||"function"==typeof U)&&k?W(k,U):B&&B.get(U)},has:function(U){return V&&U&&("object"==typeof U||"function"==typeof U)&&k?K(k,U):!!B&&B.has(U)},set:function(U,F){V&&U&&("object"==typeof U||"function"==typeof U)?(k||(k=new V),q(k,U,F)):$&&(B||(B=$()),B.set(U,F))}};return U}:$},920:(k,B,U)=>{"use strict";var F=U(69675),G=U(58859),j=U(14803),$=U(80507),H=U(72271)||$||j;k.exports=function(){var k,B={assert:function(k){if(!B.has(k))throw new F("Side channel does not contain "+G(k))},delete:function(B){return!!k&&k.delete(B)},get:function(B){return k&&k.get(B)},has:function(B){return!!k&&k.has(B)},set:function(B,U){k||(k=H()),k.set(B,U)}};return B}},39454:(k,B,U)=>{const F=U(8334),G=U(33820),j="19.1.2";k.exports.factory=G,k.exports.AGClientSocket=F,k.exports.create=function(k){return G.create({...k,version:j})},k.exports.version=j},4142:k=>{function B(){this._internalStorage={},this.isLocalStorageEnabled=this._checkLocalStorageEnabled()}B.prototype._checkLocalStorageEnabled=function(){let k;try{localStorage.setItem("__scLocalStorageTest",1),localStorage.removeItem("__scLocalStorageTest")}catch(e){k=e}return!k},B.prototype.saveToken=function(k,B,U){return this.isLocalStorageEnabled?localStorage.setItem(k,B):this._internalStorage[k]=B,Promise.resolve(B)},B.prototype.removeToken=function(k){let B=this.loadToken(k);return this.isLocalStorageEnabled?localStorage.removeItem(k):delete this._internalStorage[k],B},B.prototype.loadToken=function(k){let B;return B=this.isLocalStorageEnabled?localStorage.getItem(k):this._internalStorage[k]||null,Promise.resolve(B)},k.exports=B},8334:(k,B,U)=>{const F=U(47579),G=U(72641),j=U(89187),$=U(4142),H=U(87916),V=U(89839),W=U(51883),q=U(79155),K=U(48287).hp,z=U(17549),Y=U(97605),Q=Y.InvalidArgumentsError,X=Y.InvalidMessageError,Z=Y.SocketProtocolError,J=Y.TimeoutError,tt=Y.BadConnectionError;function et(k){G.call(this);let B=Object.assign({path:"/socketcluster/",secure:!1,protocolScheme:null,socketPath:null,autoConnect:!0,autoReconnect:!0,autoSubscribeOnConnect:!0,connectTimeout:2e4,ackTimeout:1e4,timestampRequests:!1,timestampParam:"t",binaryType:"arraybuffer",batchOnHandshake:!1,batchOnHandshakeDuration:100,batchInterval:50,protocolVersion:2,wsOptions:{},cloneData:!1},k);null==B.authTokenName&&(B.authTokenName=this._generateAuthTokenNameFromURI(B)),this.id=null,this.version=B.version||null,this.protocolVersion=B.protocolVersion,this.state=this.CLOSED,this.authState=this.UNAUTHENTICATED,this.signedAuthToken=null,this.authToken=null,this.pendingReconnect=!1,this.pendingReconnectTimeout=null,this.preparingPendingSubscriptions=!1,this.clientId=B.clientId,this.wsOptions=B.wsOptions,this.connectTimeout=B.connectTimeout,this.ackTimeout=B.ackTimeout,this.channelPrefix=B.channelPrefix||null,this.authTokenName=B.authTokenName,B.pingTimeout=B.connectTimeout,this.pingTimeout=B.pingTimeout,this.pingTimeoutDisabled=!!B.pingTimeoutDisabled;let U=Math.pow(2,31)-1,j=k=>{if(this[k]>U)throw new Q(`The ${k} value provided exceeded the maximum amount allowed`)};if(j("connectTimeout"),j("ackTimeout"),j("pingTimeout"),this.connectAttempts=0,this.isBatching=!1,this.batchOnHandshake=B.batchOnHandshake,this.batchOnHandshakeDuration=B.batchOnHandshakeDuration,this._batchingIntervalId=null,this._outboundBuffer=new W,this._channelMap={},this._channelEventDemux=new F,this._channelDataDemux=new F,this._receiverDemux=new F,this._procedureDemux=new F,this.options=B,this._cid=1,this.options.callIdGenerator=()=>this._cid++,this.options.autoReconnect){null==this.options.autoReconnectOptions&&(this.options.autoReconnectOptions={});let k=this.options.autoReconnectOptions;null==k.initialDelay&&(k.initialDelay=1e4),null==k.randomness&&(k.randomness=1e4),null==k.multiplier&&(k.multiplier=1.5),null==k.maxDelay&&(k.maxDelay=6e4)}if(null==this.options.subscriptionRetryOptions&&(this.options.subscriptionRetryOptions={}),this.options.authEngine?this.auth=this.options.authEngine:this.auth=new $,this.options.codecEngine?this.codec=this.options.codecEngine:this.codec=H,this.options.protocol){let k=new Q("The protocol option does not affect socketcluster-client - If you want to utilize SSL/TLS, use the secure option instead");this._onError(k)}if(this.options.query=B.query||{},"string"==typeof this.options.query){let k=new URLSearchParams(this.options.query),B={};for(let[U,F]of k.entries()){let k=B[U];null==k?B[U]=F:(Array.isArray(k)||(B[U]=[k]),B[U].push(F))}this.options.query=B}this.options.autoConnect&&this.connect()}et.prototype=Object.create(G.prototype),et.CONNECTING=et.prototype.CONNECTING=V.prototype.CONNECTING,et.OPEN=et.prototype.OPEN=V.prototype.OPEN,et.CLOSED=et.prototype.CLOSED=V.prototype.CLOSED,et.AUTHENTICATED=et.prototype.AUTHENTICATED="authenticated",et.UNAUTHENTICATED=et.prototype.UNAUTHENTICATED="unauthenticated",et.SUBSCRIBED=et.prototype.SUBSCRIBED=j.SUBSCRIBED,et.PENDING=et.prototype.PENDING=j.PENDING,et.UNSUBSCRIBED=et.prototype.UNSUBSCRIBED=j.UNSUBSCRIBED,et.ignoreStatuses=Y.socketProtocolIgnoreStatuses,et.errorStatuses=Y.socketProtocolErrorStatuses,Object.defineProperty(et.prototype,"isBufferingBatch",{get:function(){return this.transport.isBufferingBatch}}),et.prototype.uri=function(){return V.computeURI(this.options)},et.prototype.getBackpressure=function(){return Math.max(this.getAllListenersBackpressure(),this.getAllReceiversBackpressure(),this.getAllProceduresBackpressure(),this.getAllChannelsBackpressure())},et.prototype._generateAuthTokenNameFromURI=function(k){return`socketcluster.authToken${k.host?`.${k.host}`:`.${k.hostname||"localhost"}${k.port?`:${k.port}`:""}`}`},et.prototype._setAuthToken=function(k){this._changeToAuthenticatedState(k.token),(async()=>{try{await this.auth.saveToken(this.authTokenName,k.token,{})}catch(B){this._onError(B)}})()},et.prototype._removeAuthToken=function(k){(async()=>{let k;try{k=await this.auth.removeToken(this.authTokenName)}catch(B){return void this._onError(B)}this.emit("removeAuthToken",{oldAuthToken:k})})(),this._changeToUnauthenticatedStateAndClearTokens()},et.prototype._privateDataHandlerMap={"#publish":function(k){if("string"!=typeof k.channel)return;let B=this._undecorateChannelName(k.channel);this.isSubscribed(B,!0)&&this._channelDataDemux.write(B,k.data)},"#kickOut":function(k){if("string"!=typeof k.channel)return;let B=this._undecorateChannelName(k.channel),U=this._channelMap[B];U&&(this.emit("kickOut",{channel:B,message:k.message}),this._channelEventDemux.write(`${B}/kickOut`,{message:k.message}),this._triggerChannelUnsubscribe(U))},"#setAuthToken":function(k){k&&this._setAuthToken(k)},"#removeAuthToken":function(k){this._removeAuthToken(k)}},et.prototype._privateRPCHandlerMap={"#setAuthToken":function(k,B){if(k)this._setAuthToken(k),B.end();else{let k=new X("No token data provided by #setAuthToken event");delete k.stack,B.error(k)}},"#removeAuthToken":function(k,B){this._removeAuthToken(k),B.end()}},et.prototype.getState=function(){return this.state},et.prototype.getBytesReceived=function(){return this.transport.getBytesReceived()},et.prototype.deauthenticate=async function(){(async()=>{let k;try{k=await this.auth.removeToken(this.authTokenName)}catch(B){return void this._onError(B)}this.emit("removeAuthToken",{oldAuthToken:k})})(),this.state!==this.CLOSED&&this.transmit("#removeAuthToken"),this._changeToUnauthenticatedStateAndClearTokens(),await z(0)},et.prototype.connect=function(k){if(k&&(this.state!==this.CLOSED&&this.disconnect(1e3,"Socket was disconnected by the client to initiate a new connection"),this.options={...this.options,...k},null==this.options.authTokenName&&(this.options.authTokenName=this._generateAuthTokenNameFromURI(this.options))),this.state===this.CLOSED){this.pendingReconnect=!1,this.pendingReconnectTimeout=null,clearTimeout(this._reconnectTimeoutRef),this.state=this.CONNECTING,this.emit("connecting",{}),this.transport&&this.transport.clearAllListeners();let k={onOpen:k=>{this.state=this.OPEN,this._onOpen(k)},onOpenAbort:k=>{this.state!==this.CLOSED&&(this.state=this.CLOSED,this._destroy(k.code,k.reason,!0))},onClose:k=>{this.state!==this.CLOSED&&(this.state=this.CLOSED,this._destroy(k.code,k.reason))},onEvent:k=>{this.emit(k.event,k.data)},onError:k=>{this._onError(k.error)},onInboundInvoke:k=>{this._onInboundInvoke(k)},onInboundTransmit:k=>{this._onInboundTransmit(k.event,k.data)}};this.transport=new V(this.auth,this.codec,this.options,this.wsOptions,k)}},et.prototype.reconnect=function(k,B){this.disconnect(k,B),this.connect()},et.prototype.disconnect=function(k,B){if("number"!=typeof(k=k||1e3))throw new Q("If specified, the code argument must be a number");let U=this.state===this.CONNECTING;U||this.state===this.OPEN?(this.state=this.CLOSED,this._destroy(k,B,U),this.transport.close(k,B)):(this.pendingReconnect=!1,this.pendingReconnectTimeout=null,clearTimeout(this._reconnectTimeoutRef))},et.prototype._changeToUnauthenticatedStateAndClearTokens=function(){if(this.authState!==this.UNAUTHENTICATED){let k=this.authState,B=this.authToken,U=this.signedAuthToken;this.authState=this.UNAUTHENTICATED,this.signedAuthToken=null,this.authToken=null;let F={oldAuthState:k,newAuthState:this.authState};this.emit("authStateChange",F),this.emit("deauthenticate",{oldSignedAuthToken:U,oldAuthToken:B})}},et.prototype._changeToAuthenticatedState=function(k){if(this.signedAuthToken=k,this.authToken=this._extractAuthTokenData(k),this.authState!==this.AUTHENTICATED){let B=this.authState;this.authState=this.AUTHENTICATED;let U={oldAuthState:B,newAuthState:this.authState,signedAuthToken:k,authToken:this.authToken};this.preparingPendingSubscriptions||this.processPendingSubscriptions(),this.emit("authStateChange",U)}this.emit("authenticate",{signedAuthToken:k,authToken:this.authToken})},et.prototype.decodeBase64=function(k){return K.from(k,"base64").toString("utf8")},et.prototype.encodeBase64=function(k){return K.from(k,"utf8").toString("base64")},et.prototype._extractAuthTokenData=function(k){if("string"!=typeof k)return null;let B=k.split(".")[1];if(null!=B){let k=B;try{return k=this.decodeBase64(k),JSON.parse(k)}catch(e){return k}}return null},et.prototype.getAuthToken=function(){return this.authToken},et.prototype.getSignedAuthToken=function(){return this.signedAuthToken},et.prototype.authenticate=async function(k){let B;try{B=await this.invoke("#authenticate",k)}catch(U){throw"BadConnectionError"!==U.name&&"TimeoutError"!==U.name&&this._changeToUnauthenticatedStateAndClearTokens(),await z(0),U}return B&&null!=B.isAuthenticated?B.authError&&(B.authError=Y.hydrateError(B.authError)):B={isAuthenticated:this.authState,authError:null},B.isAuthenticated?this._changeToAuthenticatedState(k):this._changeToUnauthenticatedStateAndClearTokens(),(async()=>{try{await this.auth.saveToken(this.authTokenName,k,{})}catch(U){this._onError(U)}})(),await z(0),B},et.prototype._tryReconnect=function(k){let B,U=this.connectAttempts++,F=this.options.autoReconnectOptions;if(null==k||U>0){let k=Math.round(F.initialDelay+(F.randomness||0)*Math.random());B=Math.round(k*Math.pow(F.multiplier,U))}else B=k;B>F.maxDelay&&(B=F.maxDelay),clearTimeout(this._reconnectTimeoutRef),this.pendingReconnect=!0,this.pendingReconnectTimeout=B,this._reconnectTimeoutRef=setTimeout((()=>{this.connect()}),B)},et.prototype._onOpen=function(k){this.isBatching?this._startBatching():this.batchOnHandshake&&(this._startBatching(),setTimeout((()=>{this.isBatching||this._stopBatching()}),this.batchOnHandshakeDuration)),this.preparingPendingSubscriptions=!0,k?(this.id=k.id,this.pingTimeout=k.pingTimeout,k.isAuthenticated?this._changeToAuthenticatedState(k.authToken):this._changeToUnauthenticatedStateAndClearTokens()):this._changeToUnauthenticatedStateAndClearTokens(),this.connectAttempts=0,this.options.autoSubscribeOnConnect&&this.processPendingSubscriptions(),this.emit("connect",{...k,processPendingSubscriptions:()=>{this.processPendingSubscriptions()}}),this.state===this.OPEN&&this._flushOutboundBuffer()},et.prototype._onError=function(k){this.emit("error",{error:k})},et.prototype._suspendSubscriptions=function(){Object.keys(this._channelMap).forEach((k=>{let B=this._channelMap[k];this._triggerChannelUnsubscribe(B,!0)}))},et.prototype._abortAllPendingEventsDueToBadConnection=function(k,B,U){let F,G=this._outboundBuffer.head;for(;G;){F=G.next;let j=G.data;clearTimeout(j.timeout),delete j.timeout,G.detach(),G=F;let $=j.callback;if($){delete j.callback;let F=`Event ${j.event} was aborted due to a bad connection`,G=new tt(F,k,B,U);$.call(j,G,j)}j.cid&&this.transport.cancelPendingResponse(j.cid)}},et.prototype._destroy=function(k,B,U){if(this.id=null,this._cancelBatching(),this.transport&&this.transport.clearAllListeners(),this.pendingReconnect=!1,this.pendingReconnectTimeout=null,clearTimeout(this._reconnectTimeoutRef),this._suspendSubscriptions(),U?this.emit("connectAbort",{code:k,reason:B}):this.emit("disconnect",{code:k,reason:B}),this.emit("close",{code:k,reason:B}),!et.ignoreStatuses[k]){let U;U="string"==typeof B?"Socket connection closed with status code "+k+" and reason: "+B:"Socket connection closed with status code "+k;let F=new Z(et.errorStatuses[k]||U,k);this._onError(F)}this._abortAllPendingEventsDueToBadConnection(U?"connectAbort":"disconnect",k,B),this.options.autoReconnect&&(4e3===k||4001===k||1005===k?this._tryReconnect(0):1e3!==k&&k<4500&&this._tryReconnect())},et.prototype._onInboundTransmit=function(k,B){let U=this._privateDataHandlerMap[k];U?U.call(this,B||{}):this._receiverDemux.write(k,B)},et.prototype._onInboundInvoke=function(k){let{procedure:B,data:U}=k,F=this._privateRPCHandlerMap[B];F?F.call(this,U,k):this._procedureDemux.write(B,k)},et.prototype.decode=function(k){return this.transport.decode(k)},et.prototype.encode=function(k){return this.transport.encode(k)},et.prototype._flushOutboundBuffer=function(){let k,B=this._outboundBuffer.head;for(;B;){k=B.next;let U=B.data;B.detach(),this.transport.transmitObject(U),B=k}},et.prototype._handleEventAckTimeout=function(k,B){B&&B.detach(),delete k.timeout;let U=k.callback;if(U){delete k.callback;let B=new J(`Event response for ${k.event} event timed out`);U.call(k,B,k)}k.cid&&this.transport.cancelPendingResponse(k.cid)},et.prototype._processOutboundEvent=function(k,B,U,F){U=U||{},this.state===this.CLOSED&&this.connect();let G,j={event:k};G=F?new Promise(((k,B)=>{j.callback=(U,F)=>{U?B(U):k(F)}})):Promise.resolve();let $=new W.Item;this.options.cloneData?j.data=q(B):j.data=B,$.data=j;let H=null==U.ackTimeout?this.ackTimeout:U.ackTimeout;return j.timeout=setTimeout((()=>{this._handleEventAckTimeout(j,$)}),H),this._outboundBuffer.append($),this.state===this.OPEN&&this._flushOutboundBuffer(),G},et.prototype.send=function(k){this.transport.send(k)},et.prototype.transmit=function(k,B,U){return this._processOutboundEvent(k,B,U)},et.prototype.invoke=function(k,B,U){return this._processOutboundEvent(k,B,U,!0)},et.prototype.transmitPublish=function(k,B){let U={channel:this._decorateChannelName(k),data:B};return this.transmit("#publish",U)},et.prototype.invokePublish=function(k,B){let U={channel:this._decorateChannelName(k),data:B};return this.invoke("#publish",U)},et.prototype._triggerChannelSubscribe=function(k,B){let U=k.name;if(k.state!==j.SUBSCRIBED){let F=k.state;k.state=j.SUBSCRIBED;let G={oldChannelState:F,newChannelState:k.state,subscriptionOptions:B};this._channelEventDemux.write(`${U}/subscribeStateChange`,G),this._channelEventDemux.write(`${U}/subscribe`,{subscriptionOptions:B}),this.emit("subscribeStateChange",{channel:U,...G}),this.emit("subscribe",{channel:U,subscriptionOptions:B})}},et.prototype._triggerChannelSubscribeFail=function(k,B,U){let F=B.name,G=!B.options.waitForAuth||this.authState===this.AUTHENTICATED;!!this._channelMap[F]&&G&&(delete this._channelMap[F],this._channelEventDemux.write(`${F}/subscribeFail`,{error:k,subscriptionOptions:U}),this.emit("subscribeFail",{error:k,channel:F,subscriptionOptions:U}))},et.prototype._cancelPendingSubscribeCallback=function(k){null!=k._pendingSubscriptionCid&&(this.transport.cancelPendingResponse(k._pendingSubscriptionCid),delete k._pendingSubscriptionCid)},et.prototype._decorateChannelName=function(k){return this.channelPrefix&&(k=this.channelPrefix+k),k},et.prototype._undecorateChannelName=function(k){return this.channelPrefix&&0===k.indexOf(this.channelPrefix)?k.replace(this.channelPrefix,""):k},et.prototype.startBatch=function(){this.transport.startBatch()},et.prototype.flushBatch=function(){this.transport.flushBatch()},et.prototype.cancelBatch=function(){this.transport.cancelBatch()},et.prototype._startBatching=function(){null==this._batchingIntervalId&&(this.startBatch(),this._batchingIntervalId=setInterval((()=>{this.flushBatch(),this.startBatch()}),this.options.batchInterval))},et.prototype.startBatching=function(){this.isBatching=!0,this._startBatching()},et.prototype._stopBatching=function(){null!=this._batchingIntervalId&&clearInterval(this._batchingIntervalId),this._batchingIntervalId=null,this.flushBatch()},et.prototype.stopBatching=function(){this.isBatching=!1,this._stopBatching()},et.prototype._cancelBatching=function(){null!=this._batchingIntervalId&&clearInterval(this._batchingIntervalId),this._batchingIntervalId=null,this.cancelBatch()},et.prototype.cancelBatching=function(){this.isBatching=!1,this._cancelBatching()},et.prototype._trySubscribe=function(k){let B=!k.options.waitForAuth||this.authState===this.AUTHENTICATED;if(this.state===this.OPEN&&!this.preparingPendingSubscriptions&&null==k._pendingSubscriptionCid&&B){let B={noTimeout:!0},U={};k.options.waitForAuth&&(B.waitForAuth=!0,U.waitForAuth=B.waitForAuth),k.options.data&&(U.data=k.options.data),k._pendingSubscriptionCid=this.transport.invokeRaw("#subscribe",{channel:this._decorateChannelName(k.name),...U},B,(B=>{if(B){if("BadConnectionError"===B.name)return;delete k._pendingSubscriptionCid,this._triggerChannelSubscribeFail(B,k,U)}else delete k._pendingSubscriptionCid,this._triggerChannelSubscribe(k,U)})),this.emit("subscribeRequest",{channel:k.name,subscriptionOptions:U})}},et.prototype.subscribe=function(k,B){B=B||{};let U=this._channelMap[k],F={waitForAuth:!!B.waitForAuth};return null!=B.priority&&(F.priority=B.priority),void 0!==B.data&&(F.data=B.data),U?B&&(U.options=F):(U={name:k,state:j.PENDING,options:F},this._channelMap[k]=U,this._trySubscribe(U)),new j(k,this,this._channelEventDemux,this._channelDataDemux)},et.prototype._triggerChannelUnsubscribe=function(k,B){let U=k.name;if(this._cancelPendingSubscribeCallback(k),k.state===j.SUBSCRIBED){let F={oldChannelState:k.state,newChannelState:B?j.PENDING:j.UNSUBSCRIBED};this._channelEventDemux.write(`${U}/subscribeStateChange`,F),this._channelEventDemux.write(`${U}/unsubscribe`,{}),this.emit("subscribeStateChange",{channel:U,...F}),this.emit("unsubscribe",{channel:U})}B?k.state=j.PENDING:delete this._channelMap[U]},et.prototype._tryUnsubscribe=function(k){if(this.state===this.OPEN){let B={noTimeout:!0};this._cancelPendingSubscribeCallback(k);let U=this._decorateChannelName(k.name);this.transport.transmit("#unsubscribe",U,B)}},et.prototype.unsubscribe=function(k){let B=this._channelMap[k];B&&(this._triggerChannelUnsubscribe(B),this._tryUnsubscribe(B))},et.prototype.receiver=function(k){return this._receiverDemux.stream(k)},et.prototype.closeReceiver=function(k){this._receiverDemux.close(k)},et.prototype.closeAllReceivers=function(){this._receiverDemux.closeAll()},et.prototype.killReceiver=function(k){this._receiverDemux.kill(k)},et.prototype.killAllReceivers=function(){this._receiverDemux.killAll()},et.prototype.killReceiverConsumer=function(k){this._receiverDemux.killConsumer(k)},et.prototype.getReceiverConsumerStats=function(k){return this._receiverDemux.getConsumerStats(k)},et.prototype.getReceiverConsumerStatsList=function(k){return this._receiverDemux.getConsumerStatsList(k)},et.prototype.getAllReceiversConsumerStatsList=function(){return this._receiverDemux.getConsumerStatsListAll()},et.prototype.getReceiverBackpressure=function(k){return this._receiverDemux.getBackpressure(k)},et.prototype.getAllReceiversBackpressure=function(){return this._receiverDemux.getBackpressureAll()},et.prototype.getReceiverConsumerBackpressure=function(k){return this._receiverDemux.getConsumerBackpressure(k)},et.prototype.hasReceiverConsumer=function(k,B){return this._receiverDemux.hasConsumer(k,B)},et.prototype.hasAnyReceiverConsumer=function(k){return this._receiverDemux.hasConsumerAll(k)},et.prototype.procedure=function(k){return this._procedureDemux.stream(k)},et.prototype.closeProcedure=function(k){this._procedureDemux.close(k)},et.prototype.closeAllProcedures=function(){this._procedureDemux.closeAll()},et.prototype.killProcedure=function(k){this._procedureDemux.kill(k)},et.prototype.killAllProcedures=function(){this._procedureDemux.killAll()},et.prototype.killProcedureConsumer=function(k){this._procedureDemux.killConsumer(k)},et.prototype.getProcedureConsumerStats=function(k){return this._procedureDemux.getConsumerStats(k)},et.prototype.getProcedureConsumerStatsList=function(k){return this._procedureDemux.getConsumerStatsList(k)},et.prototype.getAllProceduresConsumerStatsList=function(){return this._procedureDemux.getConsumerStatsListAll()},et.prototype.getProcedureBackpressure=function(k){return this._procedureDemux.getBackpressure(k)},et.prototype.getAllProceduresBackpressure=function(){return this._procedureDemux.getBackpressureAll()},et.prototype.getProcedureConsumerBackpressure=function(k){return this._procedureDemux.getConsumerBackpressure(k)},et.prototype.hasProcedureConsumer=function(k,B){return this._procedureDemux.hasConsumer(k,B)},et.prototype.hasAnyProcedureConsumer=function(k){return this._procedureDemux.hasConsumerAll(k)},et.prototype.channel=function(k){this._channelMap[k];return new j(k,this,this._channelEventDemux,this._channelDataDemux)},et.prototype.closeChannel=function(k){this.channelCloseOutput(k),this.channelCloseAllListeners(k)},et.prototype.closeAllChannelOutputs=function(){this._channelDataDemux.closeAll()},et.prototype.closeAllChannelListeners=function(){this._channelEventDemux.closeAll()},et.prototype.closeAllChannels=function(){this.closeAllChannelOutputs(),this.closeAllChannelListeners()},et.prototype.killChannel=function(k){this.channelKillOutput(k),this.channelKillAllListeners(k)},et.prototype.killAllChannelOutputs=function(){this._channelDataDemux.killAll()},et.prototype.killAllChannelListeners=function(){this._channelEventDemux.killAll()},et.prototype.killAllChannels=function(){this.killAllChannelOutputs(),this.killAllChannelListeners()},et.prototype.killChannelOutputConsumer=function(k){this._channelDataDemux.killConsumer(k)},et.prototype.killChannelListenerConsumer=function(k){this._channelEventDemux.killConsumer(k)},et.prototype.getChannelOutputConsumerStats=function(k){return this._channelDataDemux.getConsumerStats(k)},et.prototype.getChannelListenerConsumerStats=function(k){return this._channelEventDemux.getConsumerStats(k)},et.prototype.getAllChannelOutputsConsumerStatsList=function(){return this._channelDataDemux.getConsumerStatsListAll()},et.prototype.getAllChannelListenersConsumerStatsList=function(){return this._channelEventDemux.getConsumerStatsListAll()},et.prototype.getChannelBackpressure=function(k){return Math.max(this.channelGetOutputBackpressure(k),this.channelGetAllListenersBackpressure(k))},et.prototype.getAllChannelOutputsBackpressure=function(){return this._channelDataDemux.getBackpressureAll()},et.prototype.getAllChannelListenersBackpressure=function(){return this._channelEventDemux.getBackpressureAll()},et.prototype.getAllChannelsBackpressure=function(){return Math.max(this.getAllChannelOutputsBackpressure(),this.getAllChannelListenersBackpressure())},et.prototype.getChannelListenerConsumerBackpressure=function(k){return this._channelEventDemux.getConsumerBackpressure(k)},et.prototype.getChannelOutputConsumerBackpressure=function(k){return this._channelDataDemux.getConsumerBackpressure(k)},et.prototype.hasAnyChannelOutputConsumer=function(k){return this._channelDataDemux.hasConsumerAll(k)},et.prototype.hasAnyChannelListenerConsumer=function(k){return this._channelEventDemux.hasConsumerAll(k)},et.prototype.getChannelState=function(k){let B=this._channelMap[k];return B?B.state:j.UNSUBSCRIBED},et.prototype.getChannelOptions=function(k){let B=this._channelMap[k];return B?{...B.options}:{}},et.prototype._getAllChannelStreamNames=function(k){let B=this._channelEventDemux.getConsumerStatsListAll().filter((B=>0===B.stream.indexOf(`${k}/`))).reduce(((k,B)=>(k[B.stream]=!0,k)),{});return Object.keys(B)},et.prototype.channelCloseOutput=function(k){this._channelDataDemux.close(k)},et.prototype.channelCloseListener=function(k,B){this._channelEventDemux.close(`${k}/${B}`)},et.prototype.channelCloseAllListeners=function(k){this._getAllChannelStreamNames(k).forEach((k=>{this._channelEventDemux.close(k)}))},et.prototype.channelKillOutput=function(k){this._channelDataDemux.kill(k)},et.prototype.channelKillListener=function(k,B){this._channelEventDemux.kill(`${k}/${B}`)},et.prototype.channelKillAllListeners=function(k){this._getAllChannelStreamNames(k).forEach((k=>{this._channelEventDemux.kill(k)}))},et.prototype.channelGetOutputConsumerStatsList=function(k){return this._channelDataDemux.getConsumerStatsList(k)},et.prototype.channelGetListenerConsumerStatsList=function(k,B){return this._channelEventDemux.getConsumerStatsList(`${k}/${B}`)},et.prototype.channelGetAllListenersConsumerStatsList=function(k){return this._getAllChannelStreamNames(k).map((k=>this._channelEventDemux.getConsumerStatsList(k))).reduce(((k,B)=>(B.forEach((B=>{k.push(B)})),k)),[])},et.prototype.channelGetOutputBackpressure=function(k){return this._channelDataDemux.getBackpressure(k)},et.prototype.channelGetListenerBackpressure=function(k,B){return this._channelEventDemux.getBackpressure(`${k}/${B}`)},et.prototype.channelGetAllListenersBackpressure=function(k){let B=this._getAllChannelStreamNames(k).map((k=>this._channelEventDemux.getBackpressure(k)));return Math.max(...B.concat(0))},et.prototype.channelHasOutputConsumer=function(k,B){return this._channelDataDemux.hasConsumer(k,B)},et.prototype.channelHasListenerConsumer=function(k,B,U){return this._channelEventDemux.hasConsumer(`${k}/${B}`,U)},et.prototype.channelHasAnyListenerConsumer=function(k,B){return this._getAllChannelStreamNames(k).some((k=>this._channelEventDemux.hasConsumer(k,B)))},et.prototype.subscriptions=function(k){let B=[];return Object.keys(this._channelMap).forEach((U=>{(k||this._channelMap[U].state===j.SUBSCRIBED)&&B.push(U)})),B},et.prototype.isSubscribed=function(k,B){let U=this._channelMap[k];return B?!!U:!!U&&U.state===j.SUBSCRIBED},et.prototype.processPendingSubscriptions=function(){this.preparingPendingSubscriptions=!1;let k=[];Object.keys(this._channelMap).forEach((B=>{let U=this._channelMap[B];U.state===j.PENDING&&k.push(U)})),k.sort(((k,B)=>{let U=k.options.priority||0,F=B.options.priority||0;return U>F?-1:U{this._trySubscribe(k)}))},k.exports=et},33820:(k,B,U)=>{const F=U(8334),G=U(69824),j=U(97605).InvalidArgumentsError;function $(k,B){let U=null==k.secure?B:k.secure;return k.port||("undefined"!=typeof location&&location.port?location.port:U?443:80)}k.exports={create:function(k){if((k=k||{}).host&&!k.host.match(/[^:]+:\d{2,5}/))throw new j("The host option should include both the hostname and the port number in the hostname:port format");if(k.host&&k.hostname)throw new j("The host option should already include the hostname and the port number in the hostname:port format - Because of this, you should never use host and hostname options together");if(k.host&&k.port)throw new j("The host option should already include the hostname and the port number in the hostname:port format - Because of this, you should never use host and port options together");let B="undefined"!=typeof location&&"https:"===location.protocol,U={clientId:G.v4(),port:$(k,B),hostname:"undefined"!=typeof location&&location.hostname||"localhost",secure:B};return Object.assign(U,k),new F(U)}}},89839:(k,B,U)=>{const F=U(27445);let G;if("undefined"!=typeof WebSocket)G=function(k,B){return new WebSocket(k)};else{let k=U(18495);G=function(B,U){return new k(B,[],U)}}const j=U(97605),$=j.TimeoutError,H=j.BadConnectionError;function V(k,B,U,F,j){this.state=this.CLOSED,this.auth=k,this.codec=B,this.options=U,this.wsOptions=F,this.protocolVersion=U.protocolVersion,this.connectTimeout=U.connectTimeout,this.pingTimeout=U.pingTimeout,this.pingTimeoutDisabled=!!U.pingTimeoutDisabled,this.callIdGenerator=U.callIdGenerator,this.authTokenName=U.authTokenName,this.isBufferingBatch=!1,this._pingTimeoutTicker=null,this._callbackMap={},this._batchBuffer=[],j||(j={}),this._onOpenHandler=j.onOpen||function(){},this._onOpenAbortHandler=j.onOpenAbort||function(){},this._onCloseHandler=j.onClose||function(){},this._onEventHandler=j.onEvent||function(){},this._onErrorHandler=j.onError||function(){},this._onInboundInvokeHandler=j.onInboundInvoke||function(){},this._onInboundTransmitHandler=j.onInboundTransmit||function(){},this.state=this.CONNECTING;let $=this.uri(),H=G($,F);H.binaryType=this.options.binaryType,this.socket=H,H.onopen=()=>{this._onOpen()},H.onclose=async k=>{let B;B=null==k.code?1005:k.code,this._destroy(B,k.reason)},H.onmessage=(k,B)=>{this._onMessage(k.data)},H.onerror=k=>{this.state===this.CONNECTING&&this._destroy(1006)},this._connectTimeoutRef=setTimeout((()=>{this._destroy(4007),this.socket.close(4007)}),this.connectTimeout),1===this.protocolVersion?this._handlePing=k=>"#1"===k&&(this._resetPingTimeout(),this.socket.readyState===this.socket.OPEN&&this.send("#2"),!0):this._handlePing=k=>""===k&&(this._resetPingTimeout(),this.socket.readyState===this.socket.OPEN&&this.send(""),!0)}V.CONNECTING=V.prototype.CONNECTING="connecting",V.OPEN=V.prototype.OPEN="open",V.CLOSED=V.prototype.CLOSED="closed",V.computeURI=function(k){let B,U=k.query||{};B=null==k.protocolScheme?k.secure?"wss":"ws":k.protocolScheme,k.timestampRequests&&(U[k.timestampParam]=(new Date).getTime());let F,G,j=new URLSearchParams;for(let[$,H]of Object.entries(U))if(Array.isArray(H))for(let k of H)j.append($,k);else j.set($,H);if(U=j.toString(),U.length&&(U="?"+U),null==k.socketPath){if(k.host)F=k.host;else{let U="";k.port&&("wss"===B&&443!==k.port||"ws"===B&&80!==k.port)&&(U=":"+k.port),F=k.hostname+U}G=k.path}else F=k.socketPath,G=`:${k.path}`;return B+"://"+F+G+U},V.prototype.uri=function(){return V.computeURI(this.options)},V.prototype._onOpen=async function(){let k;clearTimeout(this._connectTimeoutRef),this._resetPingTimeout();try{k=await this._handshake()}catch(B){return null==B.statusCode&&(B.statusCode=4003),this._onError(B),this._destroy(B.statusCode,B.toString()),void this.socket.close(B.statusCode)}this.state=this.OPEN,k&&(this.pingTimeout=k.pingTimeout),this._resetPingTimeout(),this._onOpenHandler(k)},V.prototype._handshake=async function(){let k=await this.auth.loadToken(this.authTokenName),B=await this.invoke("#handshake",{authToken:k},{force:!0});return B&&(B.authToken=k,B.authError&&(B.authError=j.hydrateError(B.authError))),B},V.prototype._abortAllPendingEventsDueToBadConnection=function(k,B,U){Object.keys(this._callbackMap||{}).forEach((F=>{let G=this._callbackMap[F];delete this._callbackMap[F],clearTimeout(G.timeout),delete G.timeout;let j=`Event ${G.event} was aborted due to a bad connection`,$=new H(j,k,B,U),V=G.callback;V&&(delete G.callback,V.call(G,$,G))}))},V.prototype._destroy=function(k,B){j.socketProtocolErrorStatuses[k];!B&&j.socketProtocolErrorStatuses[k]&&(B=j.socketProtocolErrorStatuses[k]),delete this.socket.onopen,delete this.socket.onclose,delete this.socket.onmessage,delete this.socket.onerror,clearTimeout(this._connectTimeoutRef),clearTimeout(this._pingTimeoutTicker),this.state===this.OPEN?(this.state=this.CLOSED,this._abortAllPendingEventsDueToBadConnection("disconnect",k,B),this._onCloseHandler({code:k,reason:B})):this.state===this.CONNECTING?(this.state=this.CLOSED,this._abortAllPendingEventsDueToBadConnection("connectAbort",k,B),this._onOpenAbortHandler({code:k,reason:B})):this.state===this.CLOSED&&this._abortAllPendingEventsDueToBadConnection("connectAbort",k,B)},V.prototype._processInboundPacket=function(k,B){if(k&&"string"==typeof k.event)if("number"==typeof k.cid){let B=new F(this,k.cid,k.event,k.data);this._onInboundInvokeHandler(B)}else this._onInboundTransmitHandler({...k});else if(k&&"number"==typeof k.rid){let B=this._callbackMap[k.rid];if(B&&(clearTimeout(B.timeout),delete B.timeout,delete this._callbackMap[k.rid],B.callback)){let U=j.hydrateError(k.error);B.callback(U,k.data)}}else this._onEventHandler({event:"raw",data:{message:B}})},V.prototype._onMessage=function(k){if(this._onEventHandler({event:"message",data:{message:k}}),this._handlePing(k))return;let B=this.decode(k);if(Array.isArray(B)){let U=B.length;for(let F=0;F{this._destroy(4e3),this.socket.close(4e3)}),this.pingTimeout)},V.prototype.clearAllListeners=function(){this._onOpenHandler=function(){},this._onOpenAbortHandler=function(){},this._onCloseHandler=function(){},this._onEventHandler=function(){},this._onErrorHandler=function(){},this._onInboundInvokeHandler=function(){},this._onInboundTransmitHandler=function(){}},V.prototype.startBatch=function(){this.isBufferingBatch=!0,this._batchBuffer=[]},V.prototype.flushBatch=function(){if(this.isBufferingBatch=!1,!this._batchBuffer.length)return;let k=this.serializeObject(this._batchBuffer);this._batchBuffer=[],this.send(k)},V.prototype.cancelBatch=function(){this.isBufferingBatch=!1,this._batchBuffer=[]},V.prototype.getBytesReceived=function(){return this.socket.bytesReceived},V.prototype.close=function(k,B){this.state!==this.OPEN&&this.state!==this.CONNECTING||(k=k||1e3,this._destroy(k,B),this.socket.close(k,B))},V.prototype.transmitObject=function(k){let B={event:k.event,data:k.data};return k.callback&&(B.cid=k.cid=this.callIdGenerator(),this._callbackMap[k.cid]=k),this.sendObject(B),k.cid||null},V.prototype._handleEventAckTimeout=function(k){k.cid&&delete this._callbackMap[k.cid],delete k.timeout;let B=k.callback;if(B){delete k.callback;let U=new $(`Event response for ${k.event} event timed out`);B.call(k,U,k)}},V.prototype.transmit=function(k,B,U){let F={event:k,data:B};return(this.state===this.OPEN||U.force)&&this.transmitObject(F),Promise.resolve()},V.prototype.invokeRaw=function(k,B,U,F){let G={event:k,data:B,callback:F};U.noTimeout||(G.timeout=setTimeout((()=>{this._handleEventAckTimeout(G)}),this.options.ackTimeout));let j=null;return(this.state===this.OPEN||U.force)&&(j=this.transmitObject(G)),j},V.prototype.invoke=function(k,B,U){return new Promise(((F,G)=>{this.invokeRaw(k,B,U,((k,B)=>{k?G(k):F(B)}))}))},V.prototype.cancelPendingResponse=function(k){delete this._callbackMap[k]},V.prototype.decode=function(k){return this.codec.decode(k)},V.prototype.encode=function(k){return this.codec.encode(k)},V.prototype.send=function(k){this.socket.readyState!==this.socket.OPEN?this._destroy(1005):this.socket.send(k)},V.prototype.serializeObject=function(k){let B;try{B=this.encode(k)}catch(U){return this._onError(U),null}return B},V.prototype.sendObject=function(k){if(this.isBufferingBatch)return void this._batchBuffer.push(k);let B=this.serializeObject(k);null!=B&&this.send(B)},k.exports=V},17549:k=>{k.exports=function(k){return new Promise((B=>{setTimeout((()=>{B()}),k)}))}},18495:k=>{let B;B="undefined"!=typeof WorkerGlobalScope?self:"undefined"!=typeof window&&window||function(){return this}();const U=B.WebSocket||B.MozWebSocket;function F(k,B,F){let G;return G=B?new U(k,B):new U(k),G}U&&(F.prototype=U.prototype),k.exports=U?F:null},69824:(k,B,U)=>{"use strict";var F;U.r(B),U.d(B,{NIL:()=>ut,parse:()=>Z,stringify:()=>q,v1:()=>X,v3:()=>ot,v4:()=>ht,v5:()=>lt,validate:()=>H,version:()=>ft});var G=new Uint8Array(16);function j(){if(!F&&!(F="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return F(G)}const $=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const H=function(k){return"string"==typeof k&&$.test(k)};for(var V=[],W=0;W<256;++W)V.push((W+256).toString(16).substr(1));const q=function(k){var B=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,U=(V[k[B+0]]+V[k[B+1]]+V[k[B+2]]+V[k[B+3]]+"-"+V[k[B+4]]+V[k[B+5]]+"-"+V[k[B+6]]+V[k[B+7]]+"-"+V[k[B+8]]+V[k[B+9]]+"-"+V[k[B+10]]+V[k[B+11]]+V[k[B+12]]+V[k[B+13]]+V[k[B+14]]+V[k[B+15]]).toLowerCase();if(!H(U))throw TypeError("Stringified UUID is invalid");return U};var K,z,Y=0,Q=0;const X=function(k,B,U){var F=B&&U||0,G=B||new Array(16),$=(k=k||{}).node||K,H=void 0!==k.clockseq?k.clockseq:z;if(null==$||null==H){var V=k.random||(k.rng||j)();null==$&&($=K=[1|V[0],V[1],V[2],V[3],V[4],V[5]]),null==H&&(H=z=16383&(V[6]<<8|V[7]))}var W=void 0!==k.msecs?k.msecs:Date.now(),X=void 0!==k.nsecs?k.nsecs:Q+1,Z=W-Y+(X-Q)/1e4;if(Z<0&&void 0===k.clockseq&&(H=H+1&16383),(Z<0||W>Y)&&void 0===k.nsecs&&(X=0),X>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Y=W,Q=X,z=H;var J=(1e4*(268435455&(W+=122192928e5))+X)%4294967296;G[F++]=J>>>24&255,G[F++]=J>>>16&255,G[F++]=J>>>8&255,G[F++]=255&J;var tt=W/4294967296*1e4&268435455;G[F++]=tt>>>8&255,G[F++]=255&tt,G[F++]=tt>>>24&15|16,G[F++]=tt>>>16&255,G[F++]=H>>>8|128,G[F++]=255&H;for(var et=0;et<6;++et)G[F+et]=$[et];return B||q(G)};const Z=function(k){if(!H(k))throw TypeError("Invalid UUID");var B,U=new Uint8Array(16);return U[0]=(B=parseInt(k.slice(0,8),16))>>>24,U[1]=B>>>16&255,U[2]=B>>>8&255,U[3]=255&B,U[4]=(B=parseInt(k.slice(9,13),16))>>>8,U[5]=255&B,U[6]=(B=parseInt(k.slice(14,18),16))>>>8,U[7]=255&B,U[8]=(B=parseInt(k.slice(19,23),16))>>>8,U[9]=255&B,U[10]=(B=parseInt(k.slice(24,36),16))/1099511627776&255,U[11]=B/4294967296&255,U[12]=B>>>24&255,U[13]=B>>>16&255,U[14]=B>>>8&255,U[15]=255&B,U};function J(k,B,U){function F(k,F,G,j){if("string"==typeof k&&(k=function(k){k=unescape(encodeURIComponent(k));for(var B=[],U=0;U>>9<<4)+1}function et(k,B){var U=(65535&k)+(65535&B);return(k>>16)+(B>>16)+(U>>16)<<16|65535&U}function it(k,B,U,F,G,j){return et(($=et(et(B,k),et(F,j)))<<(H=G)|$>>>32-H,U);var $,H}function st(k,B,U,F,G,j,$){return it(B&U|~B&F,k,B,G,j,$)}function nt(k,B,U,F,G,j,$){return it(B&F|U&~F,k,B,G,j,$)}function at(k,B,U,F,G,j,$){return it(B^U^F,k,B,G,j,$)}function rt(k,B,U,F,G,j,$){return it(U^(B|~F),k,B,G,j,$)}const ot=J("v3",48,(function(k){if("string"==typeof k){var B=unescape(encodeURIComponent(k));k=new Uint8Array(B.length);for(var U=0;U>5]>>>G%32&255,$=parseInt(F.charAt(j>>>4&15)+F.charAt(15&j),16);B.push($)}return B}(function(k,B){k[B>>5]|=128<>5]|=(255&k[F/8])<>>32-B}const lt=J("v5",80,(function(k){var B=[1518500249,1859775393,2400959708,3395469782],U=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof k){var F=unescape(encodeURIComponent(k));k=[];for(var G=0;G>>0;et=tt,tt=J,J=dt(Z,30)>>>0,Z=X,X=nt}U[0]=U[0]+X>>>0,U[1]=U[1]+Z>>>0,U[2]=U[2]+J>>>0,U[3]=U[3]+tt>>>0,U[4]=U[4]+et>>>0}return[U[0]>>24&255,U[0]>>16&255,U[0]>>8&255,255&U[0],U[1]>>24&255,U[1]>>16&255,U[1]>>8&255,255&U[1],U[2]>>24&255,U[2]>>16&255,U[2]>>8&255,255&U[2],U[3]>>24&255,U[3]>>16&255,U[3]>>8&255,255&U[3],U[4]>>24&255,U[4]>>16&255,U[4]>>8&255,255&U[4]]})),ut="00000000-0000-0000-0000-000000000000";const ft=function(k){if(!H(k))throw TypeError("Invalid UUID");return parseInt(k.substr(14,1),16)}},40343:function(k,B){var U,F,G;!function(j,$){"use strict";F=[],void 0===(G="function"==typeof(U=function(){function k(k){return!isNaN(parseFloat(k))&&isFinite(k)}function B(k){return k.charAt(0).toUpperCase()+k.substring(1)}function U(k){return function(){return this[k]}}var F=["isConstructor","isEval","isNative","isToplevel"],G=["columnNumber","lineNumber"],j=["fileName","functionName","source"],$=["args"],H=["evalOrigin"],V=F.concat(G,j,$,H);function W(k){if(k)for(var U=0;U$+1e3&&(V.update(1e3*H/(k-$),100),$=k,H=0,q)){var B=performance.memory;q.update(B.usedJSHeapSize/1048576,B.jsHeapSizeLimit/1048576)}return k},update:function(){j=this.end()},domElement:G,setMode:U}}).Panel=function(k,B,U){var F=1/0,G=0,j=Math.round,$=j(window.devicePixelRatio||1),H=80*$,V=48*$,W=3*$,q=2*$,K=3*$,z=15*$,Y=74*$,Q=30*$,X=document.createElement("canvas");X.width=H,X.height=V,X.style.cssText="width:80px;height:48px";var Z=X.getContext("2d");return Z.font="bold "+9*$+"px Helvetica,Arial,sans-serif",Z.textBaseline="top",Z.fillStyle=U,Z.fillRect(0,0,H,V),Z.fillStyle=B,Z.fillText(k,W,q),Z.fillRect(K,z,Y,Q),Z.fillStyle=U,Z.globalAlpha=.9,Z.fillRect(K,z,Y,Q),{dom:X,update:function(V,J){F=Math.min(F,V),G=Math.max(G,V),Z.fillStyle=U,Z.globalAlpha=1,Z.fillRect(0,0,H,z),Z.fillStyle=B,Z.fillText(j(V)+" "+k+" ("+j(F)+"-"+j(G)+")",W,q),Z.drawImage(X,K+$,z,Y-$,Q,K,z,Y-$,Q),Z.fillRect(K+Y-$,z,$,Q),Z.fillStyle=U,Z.globalAlpha=.9,Z.fillRect(K+Y-$,z,$,j((1-V/J)*Q))}}},B)},7682:(k,B,U)=>{const F=U(11607);k.exports=class extends F{constructor(k,B){super(),this._streamDemux=k,this.name=B}createConsumer(k){return this._streamDemux.createConsumer(this.name,k)}}},47579:(k,B,U)=>{const F=U(44658),G=U(7682);k.exports=class{constructor(){this.streams={},this._nextConsumerId=1,this.generateConsumerId=()=>this._nextConsumerId++}write(k,B){this.streams[k]&&this.streams[k].write(B)}close(k,B){this.streams[k]&&this.streams[k].close(B)}closeAll(k){for(let B of Object.values(this.streams))B.close(k)}writeToConsumer(k,B){for(let U of Object.values(this.streams))if(U.hasConsumer(k))return U.writeToConsumer(k,B)}closeConsumer(k,B){for(let U of Object.values(this.streams))if(U.hasConsumer(k))return U.closeConsumer(k,B)}getConsumerStats(k){for(let[B,U]of Object.entries(this.streams))if(U.hasConsumer(k))return{...U.getConsumerStats(k),stream:B}}getConsumerStatsList(k){return this.streams[k]?this.streams[k].getConsumerStatsList().map((B=>({...B,stream:k}))):[]}getConsumerStatsListAll(){let k=[];for(let B of Object.keys(this.streams)){let U=this.getConsumerStatsList(B);for(let B of U)k.push(B)}return k}kill(k,B){this.streams[k]&&this.streams[k].kill(B)}killAll(k){for(let B of Object.values(this.streams))B.kill(k)}killConsumer(k,B){for(let U of Object.values(this.streams))if(U.hasConsumer(k))return U.killConsumer(k,B)}getBackpressure(k){return this.streams[k]?this.streams[k].getBackpressure():0}getBackpressureAll(){return Object.values(this.streams).reduce(((k,B)=>Math.max(k,B.getBackpressure())),0)}getConsumerBackpressure(k){for(let B of Object.values(this.streams))if(B.hasConsumer(k))return B.getConsumerBackpressure(k);return 0}hasConsumer(k,B){return!!this.streams[k]&&this.streams[k].hasConsumer(B)}hasConsumerAll(k){return Object.values(this.streams).some((B=>B.hasConsumer(k)))}getConsumerCount(k){return this.streams[k]?this.streams[k].getConsumerCount():0}getConsumerCountAll(){return Object.values(this.streams).reduce(((k,B)=>k+B.getConsumerCount()),0)}createConsumer(k,B){return this.streams[k]||(this.streams[k]=new F({generateConsumerId:this.generateConsumerId,removeConsumerCallback:()=>{this.getConsumerCount(k)||delete this.streams[k]}})),this.streams[k].createConsumer(B)}stream(k){return new G(this,k)}unstream(k){delete this.streams[k]}}},11607:k=>{class B{async next(k){let B=this.createConsumer(k),U=await B.next();return B.return(),U}async once(k){let B=await this.next(k);if(B.done){if(null!=k){let k=new Error("Stream consumer operation timed out early because stream ended");throw k.name="TimeoutError",k}await new Promise((()=>{}))}return B.value}createConsumer(){throw new TypeError("Method must be overriden by subclass")}[Symbol.asyncIterator](){return this.createConsumer()}}k.exports=B},24280:k=>{"use strict";k.exports=function(k){return encodeURIComponent(k).replace(/[!'()*]/g,(function(k){return"%"+k.charCodeAt(0).toString(16).toUpperCase()}))}},78465:function(k){k.exports=function(){"use strict";function k(B){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(k){return typeof k}:function(k){return k&&"function"==typeof Symbol&&k.constructor===Symbol&&k!==Symbol.prototype?"symbol":typeof k})(B)}function B(k,B){if(!(k instanceof B))throw new TypeError("Cannot call a class as a function")}function U(k,B){for(var U=0;U(B=parseInt(B.getAttribute("tabindex")))?1:k1&&void 0!==arguments[1]?arguments[1]:"flex";k.style.display=B},re=function(k){k.style.display="none"},oe=function(k,B,U,F){var G=k.querySelector(B);G&&(G.style[U]=F)},he=function(k,B,U){B?ae(k,U):re(k)},ce=function(k){return!(!k||!(k.offsetWidth||k.offsetHeight||k.getClientRects().length))},de=function(){return!ce(Pt())&&!ce(Mt())&&!ce(Lt())},le=function(k){return!!(k.scrollHeight>k.clientHeight)},ue=function(k){var B=window.getComputedStyle(k),U=parseFloat(B.getPropertyValue("animation-duration")||"0"),F=parseFloat(B.getPropertyValue("transition-duration")||"0");return U>0||F>0},fe=function(k,B){if("function"==typeof k.contains)return k.contains(B)},be=function(k){var B=arguments.length>1&&void 0!==arguments[1]&&arguments[1],U=Ft();ce(U)&&(B&&(U.style.transition="none",U.style.width="100%"),setTimeout((function(){U.style.transition="width ".concat(k/1e3,"s linear"),U.style.width="0%"}),10))},pe=function(){var k=Ft(),B=parseInt(window.getComputedStyle(k).width);k.style.removeProperty("transition"),k.style.width="100%";var U=parseInt(window.getComputedStyle(k).width),F=parseInt(B/U*100);k.style.removeProperty("transition"),k.style.width="".concat(F,"%")},ve=function(){return"undefined"==typeof window||"undefined"==typeof document},ge='\n
    \n
    \n
      \n
      \n
      \n
      \n
      \n
      \n \n

      \n \n
      \n
      \n
      \n \n \n
      \n \n \n
      \n \n
      \n \n \n
      \n
      \n
      \n
      \n \n \n \n
      \n
      \n
      \n
      \n
      \n
      \n').replace(/(^|\n)\s*/g,""),me=function(){var k=yt();return!!k&&(k.parentNode.removeChild(k),ie([document.documentElement,document.body],[gt["no-backdrop"],gt["toast-shown"],gt["has-column"]]),!0)},ye=function(k){Xn.isVisible()&&Zt!==k.target.value&&Xn.resetValidationMessage(),Zt=k.target.value},_e=function(){var k=Ct(),B=se(k,gt.input),U=se(k,gt.file),F=k.querySelector(".".concat(gt.range," input")),G=k.querySelector(".".concat(gt.range," output")),j=se(k,gt.select),$=k.querySelector(".".concat(gt.checkbox," input")),H=se(k,gt.textarea);B.oninput=ye,U.onchange=ye,j.onchange=ye,$.onchange=ye,H.oninput=ye,F.oninput=function(k){ye(k),G.value=F.value},F.onchange=function(k){ye(k),F.nextSibling.value=F.value}},Ee=function(k){return"string"==typeof k?document.querySelector(k):k},we=function(k){var B=wt();B.setAttribute("role",k.toast?"alert":"dialog"),B.setAttribute("aria-live",k.toast?"polite":"assertive"),k.toast||B.setAttribute("aria-modal","true")},Te=function(k){"rtl"===window.getComputedStyle(k).direction&&ee(yt(),gt.rtl)},Se=function(k){var B=me();if(ve())st("SweetAlert2 requires document to initialize");else{var U=document.createElement("div");U.className=gt.container,B&&ee(U,gt["no-transition"]),Kt(U,ge);var F=Ee(k.target);F.appendChild(U),we(k),Te(F),_e()}},Ae=function(B,U){B instanceof HTMLElement?U.appendChild(B):"object"===k(B)?Ce(B,U):B&&Kt(U,B)},Ce=function(k,B){k.jquery?Oe(B,k):Kt(B,k.toString())},Oe=function(k,B){if(k.textContent="",0 in B)for(var U=0;U in B;U++)k.appendChild(B[U].cloneNode(!0));else k.appendChild(B.cloneNode(!0))},Ie=function(){if(ve())return!1;var k=document.createElement("div"),B={WebkitAnimation:"webkitAnimationEnd",OAnimation:"oAnimationEnd oanimationend",animation:"animationend"};for(var U in B)if(Object.prototype.hasOwnProperty.call(B,U)&&void 0!==k.style[U])return B[U];return!1}(),De=function(){var k=document.createElement("div");k.className=gt["scrollbar-measure"],document.body.appendChild(k);var B=k.getBoundingClientRect().width-k.clientWidth;return document.body.removeChild(k),B},Re=function(k,B){var U=kt(),F=xt(),G=Pt(),j=Mt(),$=Lt();B.showConfirmButton||B.showDenyButton||B.showCancelButton||re(U),Qt(U,B,"actions"),Me(G,"confirm",B),Me(j,"deny",B),Me($,"cancel",B),Pe(G,j,$,B),B.reverseButtons&&(U.insertBefore($,F),U.insertBefore(j,F),U.insertBefore(G,F)),Kt(F,B.loaderHtml),Qt(F,B,"loader")};function Pe(k,B,U,F){if(!F.buttonsStyling)return ie([k,B,U],gt.styled);ee([k,B,U],gt.styled),F.confirmButtonColor&&(k.style.backgroundColor=F.confirmButtonColor),F.denyButtonColor&&(B.style.backgroundColor=F.denyButtonColor),F.cancelButtonColor&&(U.style.backgroundColor=F.cancelButtonColor)}function Me(k,B,U){he(k,U["show".concat(J(B),"Button")],"inline-block"),Kt(k,U["".concat(B,"ButtonText")]),k.setAttribute("aria-label",U["".concat(B,"ButtonAriaLabel")]),k.className=gt[B],Qt(k,U,"".concat(B,"Button")),ee(k,U["".concat(B,"ButtonClass")])}function Ne(k,B){"string"==typeof B?k.style.background=B:B||ee([document.documentElement,document.body],gt["no-backdrop"])}function xe(k,B){B in gt?ee(k,gt[B]):(it('The "position" parameter is not valid, defaulting to "center"'),ee(k,gt.center))}function Le(k,B){if(B&&"string"==typeof B){var U="grow-".concat(B);U in gt&&ee(k,gt[U])}}var ke=function(k,B){var U=yt();if(U){Ne(U,B.backdrop),!B.backdrop&&B.allowOutsideClick&&it('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),xe(U,B.position),Le(U,B.grow),Qt(U,B,"container");var F=document.body.getAttribute("data-swal2-queue-step");F&&(U.setAttribute("data-queue-step",F),document.body.removeAttribute("data-swal2-queue-step"))}},Be={promise:new WeakMap,innerParams:new WeakMap,domCache:new WeakMap},Ue=["input","file","range","select","radio","checkbox","textarea"],Fe=function(k,B){var U=Ct(),F=Be.innerParams.get(k),G=!F||B.input!==F.input;Ue.forEach((function(k){var F=gt[k],j=se(U,F);$e(k,B.inputAttributes),j.className=F,G&&re(j)})),B.input&&(G&&Ge(B),He(B))},Ge=function(k){if(!Ke[k.input])return st('Unexpected type of input! Expected "text", "email", "password", "number", "tel", "select", "radio", "checkbox", "textarea", "file" or "url", got "'.concat(k.input,'"'));var B=qe(k.input),U=Ke[k.input](B,k);ae(U),setTimeout((function(){Jt(U)}))},je=function(k){for(var B=0;BF?"".concat(B,"px"):null})).observe(k,{attributes:!0,attributeFilter:["style"]})}return k};var ze=function(k,B){var U=Ct().querySelector("#".concat(gt.content));B.html?(Ae(B.html,U),ae(U,"block")):B.text?(U.textContent=B.text,ae(U,"block")):re(U),Fe(k,B),Qt(Ct(),B,"content")},Ye=function(k,B){var U=Ut();he(U,B.footer),B.footer&&Ae(B.footer,U),Qt(U,B,"footer")},Qe=function(k,B){var U=Gt();Kt(U,B.closeButtonHtml),Qt(U,B,"closeButton"),he(U,B.showCloseButton),U.setAttribute("aria-label",B.closeButtonAriaLabel)},Xe=function(k,B){var U=Be.innerParams.get(k);if(U&&B.icon===U.icon&&St())Je(St(),B);else if(Ze(),B.icon)if(-1!==Object.keys(mt).indexOf(B.icon)){var F=_t(".".concat(gt.icon,".").concat(mt[B.icon]));ae(F),ei(F,B),Je(F,B),ee(F,B.showClass.icon)}else st('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(B.icon,'"'))},Ze=function(){for(var k=Tt(),B=0;B\n \n
      \n
      \n '):"error"===B.icon?Kt(k,'\n \n \n \n \n '):Kt(k,si({question:"?",warning:"!",info:"i"}[B.icon]))},ii=function(k,B){if(B.iconColor){k.style.color=B.iconColor,k.style.borderColor=B.iconColor;for(var U=0,F=[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"];U').concat(k,"")},ni=function(k,B){var U=It();if(!B.imageUrl)return re(U);ae(U,""),U.setAttribute("src",B.imageUrl),U.setAttribute("alt",B.imageAlt),ne(U,"width",B.imageWidth),ne(U,"height",B.imageHeight),U.className=gt.image,Qt(U,B,"image")},ai=[],ri=function(k){var B=this;ai=k;var U=function(k,B){ai=[],k(B)},F=[];return new Promise((function(k){!function G(j,$){j=B.progressSteps.length&&it("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),B.progressSteps.forEach((function(k,G){var j=di(k);if(U.appendChild(j),G===F&&ee(j,gt["active-progress-step"]),G!==B.progressSteps.length-1){var $=li(B);U.appendChild($)}}))},fi=function(k,B){var U=At();he(U,B.title||B.titleText),B.title&&Ae(B.title,U),B.titleText&&(U.innerText=B.titleText),Qt(U,B,"title")},bi=function(k,B){var U=Bt();Qt(U,B,"header"),ui(k,B),Xe(k,B),ni(k,B),fi(k,B),Qe(k,B)},pi=function(k,B){var U=wt();ne(U,"width",B.width),ne(U,"padding",B.padding),B.background&&(U.style.background=B.background),vi(U,B)},vi=function(k,B){k.className="".concat(gt.popup," ").concat(ce(k)?B.showClass.popup:""),B.toast?(ee([document.documentElement,document.body],gt["toast-shown"]),ee(k,gt.toast)):ee(k,gt.modal),Qt(k,B,"popup"),"string"==typeof B.customClass&&ee(k,B.customClass),B.icon&&ee(k,gt["icon-".concat(B.icon)])},gi=function(k,B){pi(k,B),ke(k,B),bi(k,B),ze(k,B),Re(k,B),Ye(k,B),"function"==typeof B.didRender?B.didRender(wt()):"function"==typeof B.onRender&&B.onRender(wt())},mi=function(){return ce(wt())},yi=function(){return Pt()&&Pt().click()},_i=function(){return Mt()&&Mt().click()},Ei=function(){return Lt()&&Lt().click()};function wi(){for(var k=this,B=arguments.length,U=new Array(B),F=0;F0&&void 0!==arguments[0]?arguments[0]:"data-swal-template"]=this,Li||(document.body.addEventListener("click",Ui),Li=!0)}var Ui=function(k){for(var B=k.target;B&&B!==document;B=B.parentNode)for(var U in ki){var F=B.getAttribute(U);if(F)return void ki[U].fire({template:F})}},Fi={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,animation:!0,showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,onBeforeOpen:void 0,onOpen:void 0,willOpen:void 0,didOpen:void 0,onRender:void 0,didRender:void 0,onClose:void 0,onAfterClose:void 0,willClose:void 0,didClose:void 0,onDestroy:void 0,didDestroy:void 0,scrollbarPadding:!0},Gi=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","footer","hideClass","html","icon","iconColor","imageAlt","imageHeight","imageUrl","imageWidth","onAfterClose","onClose","onDestroy","progressSteps","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","willClose"],ji={animation:'showClass" and "hideClass',onBeforeOpen:"willOpen",onOpen:"didOpen",onRender:"didRender",onClose:"willClose",onAfterClose:"didClose",onDestroy:"didDestroy"},$i=["allowOutsideClick","allowEnterKey","backdrop","focusConfirm","focusDeny","focusCancel","heightAuto","keydownListenerCapture"],Hi=function(k){return Object.prototype.hasOwnProperty.call(Fi,k)},Vi=function(k){return-1!==Gi.indexOf(k)},Wi=function(k){return ji[k]},qi=function(k){Hi(k)||it('Unknown parameter "'.concat(k,'"'))},Ki=function(k){-1!==$i.indexOf(k)&&it('The parameter "'.concat(k,'" is incompatible with toasts'))},zi=function(k){Wi(k)&&rt(k,Wi(k))},Yi=function(k){for(var B in k)qi(B),k.toast&&Ki(B),zi(B)},Qi=Object.freeze({isValidParameter:Hi,isUpdatableParameter:Vi,isDeprecatedParameter:Wi,argsToParams:bt,isVisible:mi,clickConfirm:yi,clickDeny:_i,clickCancel:Ei,getContainer:yt,getPopup:wt,getTitle:At,getContent:Ct,getHtmlContainer:Ot,getImage:It,getIcon:St,getIcons:Tt,getInputLabel:Nt,getCloseButton:Gt,getActions:kt,getConfirmButton:Pt,getDenyButton:Mt,getCancelButton:Lt,getLoader:xt,getHeader:Bt,getFooter:Ut,getTimerProgressBar:Ft,getFocusableElements:$t,getValidationMessage:Rt,isLoading:Wt,fire:wi,mixin:Ti,queue:ri,getQueueStep:oi,insertQueueStep:hi,deleteQueueStep:ci,showLoading:Si,enableLoading:Si,getTimerLeft:Di,stopTimer:Ri,resumeTimer:Pi,toggleTimer:Mi,increaseTimer:Ni,isTimerRunning:xi,bindClickHandler:Bi});function Xi(){if(Be.innerParams.get(this)){var k=Be.domCache.get(this);re(k.loader);var B=k.popup.getElementsByClassName(k.loader.getAttribute("data-button-to-replace"));B.length?ae(B[0],"inline-block"):de()&&re(k.actions),ie([k.popup,k.actions],gt.loading),k.popup.removeAttribute("aria-busy"),k.popup.removeAttribute("data-loading"),k.confirmButton.disabled=!1,k.denyButton.disabled=!1,k.cancelButton.disabled=!1}}function Zi(k){var B=Be.innerParams.get(k||this),U=Be.domCache.get(k||this);return U?Xt(U.content,B.input):null}var Ji=function(){null===qt.previousBodyPadding&&document.body.scrollHeight>window.innerHeight&&(qt.previousBodyPadding=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(qt.previousBodyPadding+De(),"px"))},ts=function(){null!==qt.previousBodyPadding&&(document.body.style.paddingRight="".concat(qt.previousBodyPadding,"px"),qt.previousBodyPadding=null)},es=function(){if((/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1)&&!zt(document.body,gt.iosfix)){var k=document.body.scrollTop;document.body.style.top="".concat(-1*k,"px"),ee(document.body,gt.iosfix),ss(),is()}},is=function(){if(!navigator.userAgent.match(/(CriOS|FxiOS|EdgiOS|YaBrowser|UCBrowser)/i)){var k=44;wt().scrollHeight>window.innerHeight-k&&(yt().style.paddingBottom="".concat(k,"px"))}},ss=function(){var k,B=yt();B.ontouchstart=function(B){k=ns(B)},B.ontouchmove=function(B){k&&(B.preventDefault(),B.stopPropagation())}},ns=function(k){var B=k.target,U=yt();return!(as(k)||rs(k)||B!==U&&(le(U)||"INPUT"===B.tagName||le(Ct())&&Ct().contains(B)))},as=function(k){return k.touches&&k.touches.length&&"stylus"===k.touches[0].touchType},rs=function(k){return k.touches&&k.touches.length>1},os=function(){if(zt(document.body,gt.iosfix)){var k=parseInt(document.body.style.top,10);ie(document.body,gt.iosfix),document.body.style.top="",document.body.scrollTop=-1*k}},hs=function(){return!!window.MSInputMethodContext&&!!document.documentMode},cs=function(){var k=yt(),B=wt();k.style.removeProperty("align-items"),B.offsetTop<0&&(k.style.alignItems="flex-start")},ds=function(){"undefined"!=typeof window&&hs()&&(cs(),window.addEventListener("resize",cs))},ls=function(){"undefined"!=typeof window&&hs()&&window.removeEventListener("resize",cs)},us=function(){et(document.body.children).forEach((function(k){k===yt()||fe(k,yt())||(k.hasAttribute("aria-hidden")&&k.setAttribute("data-previous-aria-hidden",k.getAttribute("aria-hidden")),k.setAttribute("aria-hidden","true"))}))},fs=function(){et(document.body.children).forEach((function(k){k.hasAttribute("data-previous-aria-hidden")?(k.setAttribute("aria-hidden",k.getAttribute("data-previous-aria-hidden")),k.removeAttribute("data-previous-aria-hidden")):k.removeAttribute("aria-hidden")}))},bs={swalPromiseResolve:new WeakMap};function ps(k,B,U,F){U?ws(k,F):(Ii().then((function(){return ws(k,F)})),Ci.keydownTarget.removeEventListener("keydown",Ci.keydownHandler,{capture:Ci.keydownListenerCapture}),Ci.keydownHandlerAdded=!1),B.parentNode&&!document.body.getAttribute("data-swal2-queue-step")&&B.parentNode.removeChild(B),Ht()&&(ts(),os(),ls(),fs()),vs()}function vs(){ie([document.documentElement,document.body],[gt.shown,gt["height-auto"],gt["no-backdrop"],gt["toast-shown"],gt["toast-column"]])}function gs(k){var B=wt();if(B){k=ms(k);var U=Be.innerParams.get(this);if(U&&!zt(B,U.hideClass.popup)){var F=bs.swalPromiseResolve.get(this);ie(B,U.showClass.popup),ee(B,U.hideClass.popup);var G=yt();ie(G,U.showClass.backdrop),ee(G,U.hideClass.backdrop),ys(this,B,U),F(k)}}}var ms=function(k){return void 0===k?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:G({isConfirmed:!1,isDenied:!1,isDismissed:!1},k)},ys=function(k,B,U){var F=yt(),G=Ie&&ue(B),j=U.onClose,$=U.onAfterClose,H=U.willClose,V=U.didClose;_s(B,H,j),G?Es(k,B,F,V||$):ps(k,F,Vt(),V||$)},_s=function(k,B,U){null!==B&&"function"==typeof B?B(k):null!==U&&"function"==typeof U&&U(k)},Es=function(k,B,U,F){Ci.swalCloseEventFinishedCallback=ps.bind(null,k,U,Vt(),F),B.addEventListener(Ie,(function(k){k.target===B&&(Ci.swalCloseEventFinishedCallback(),delete Ci.swalCloseEventFinishedCallback)}))},ws=function(k,B){setTimeout((function(){"function"==typeof B&&B(),k._destroy()}))};function Ts(k,B,U){var F=Be.domCache.get(k);B.forEach((function(k){F[k].disabled=U}))}function Ss(k,B){if(!k)return!1;if("radio"===k.type)for(var U=k.parentNode.parentNode.querySelectorAll("input"),F=0;F")),Se(k)}var Bs=["swal-title","swal-html","swal-footer"],Us=function(k){var B="string"==typeof k.template?document.querySelector(k.template):k.template;if(!B)return{};var U=B.content||B;return Ws(U),G(Fs(U),Gs(U),js(U),$s(U),Hs(U),Vs(U,Bs))},Fs=function(B){var U={};return et(B.querySelectorAll("swal-param")).forEach((function(B){qs(B,["name","value"]);var F=B.getAttribute("name"),G=B.getAttribute("value");"boolean"==typeof Fi[F]&&"false"===G&&(G=!1),"object"===k(Fi[F])&&(G=JSON.parse(G)),U[F]=G})),U},Gs=function(k){var B={};return et(k.querySelectorAll("swal-button")).forEach((function(k){qs(k,["type","color","aria-label"]);var U=k.getAttribute("type");B["".concat(U,"ButtonText")]=k.innerHTML,B["show".concat(J(U),"Button")]=!0,k.hasAttribute("color")&&(B["".concat(U,"ButtonColor")]=k.getAttribute("color")),k.hasAttribute("aria-label")&&(B["".concat(U,"ButtonAriaLabel")]=k.getAttribute("aria-label"))})),B},js=function(k){var B={},U=k.querySelector("swal-image");return U&&(qs(U,["src","width","height","alt"]),U.hasAttribute("src")&&(B.imageUrl=U.getAttribute("src")),U.hasAttribute("width")&&(B.imageWidth=U.getAttribute("width")),U.hasAttribute("height")&&(B.imageHeight=U.getAttribute("height")),U.hasAttribute("alt")&&(B.imageAlt=U.getAttribute("alt"))),B},$s=function(k){var B={},U=k.querySelector("swal-icon");return U&&(qs(U,["type","color"]),U.hasAttribute("type")&&(B.icon=U.getAttribute("type")),U.hasAttribute("color")&&(B.iconColor=U.getAttribute("color")),B.iconHtml=U.innerHTML),B},Hs=function(k){var B={},U=k.querySelector("swal-input");U&&(qs(U,["type","label","placeholder","value"]),B.input=U.getAttribute("type")||"text",U.hasAttribute("label")&&(B.inputLabel=U.getAttribute("label")),U.hasAttribute("placeholder")&&(B.inputPlaceholder=U.getAttribute("placeholder")),U.hasAttribute("value")&&(B.inputValue=U.getAttribute("value")));var F=k.querySelectorAll("swal-input-option");return F.length&&(B.inputOptions={},et(F).forEach((function(k){qs(k,["value"]);var U=k.getAttribute("value"),F=k.innerHTML;B.inputOptions[U]=F}))),B},Vs=function(k,B){var U={};for(var F in B){var G=B[F],j=k.querySelector(G);j&&(qs(j,[]),U[G.replace(/^swal-/,"")]=j.innerHTML)}return U},Ws=function(k){var B=Bs.concat(["swal-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);et(k.querySelectorAll("*")).forEach((function(k){var U=k.tagName.toLowerCase();-1===B.indexOf(U)&&it("Unrecognized element <".concat(U,">"))}))},qs=function(k,B){et(k.attributes).forEach((function(U){-1===B.indexOf(U.name)&&it(['Unrecognized attribute "'.concat(U.name,'" on <').concat(k.tagName.toLowerCase(),">."),"".concat(B.length?"Allowed attributes are: ".concat(B.join(", ")):"To set the value, use HTML within the element.")])}))},Ks=10,zs=function(k){var B=yt(),U=wt();"function"==typeof k.willOpen?k.willOpen(U):"function"==typeof k.onBeforeOpen&&k.onBeforeOpen(U);var F=window.getComputedStyle(document.body).overflowY;Js(B,U,k),setTimeout((function(){Xs(B,U)}),Ks),Ht()&&(Zs(B,k.scrollbarPadding,F),us()),Vt()||Ci.previousActiveElement||(Ci.previousActiveElement=document.activeElement),Ys(U,k),ie(B,gt["no-transition"])},Ys=function(k,B){"function"==typeof B.didOpen?setTimeout((function(){return B.didOpen(k)})):"function"==typeof B.onOpen&&setTimeout((function(){return B.onOpen(k)}))},Qs=function k(B){var U=wt();if(B.target===U){var F=yt();U.removeEventListener(Ie,k),F.style.overflowY="auto"}},Xs=function(k,B){Ie&&ue(B)?(k.style.overflowY="hidden",B.addEventListener(Ie,Qs)):k.style.overflowY="auto"},Zs=function(k,B,U){es(),ds(),B&&"hidden"!==U&&Ji(),setTimeout((function(){k.scrollTop=0}))},Js=function(k,B,U){ee(k,U.showClass.backdrop),B.style.setProperty("opacity","0","important"),ae(B),setTimeout((function(){ee(B,U.showClass.popup),B.style.removeProperty("opacity")}),Ks),ee([document.documentElement,document.body],gt.shown),U.heightAuto&&U.backdrop&&!U.toast&&ee([document.documentElement,document.body],gt["height-auto"])},tn=function(k,B){"select"===B.input||"radio"===B.input?rn(k,B):-1!==["text","email","number","tel","textarea"].indexOf(B.input)&&(ht(B.inputValue)||dt(B.inputValue))&&on(k,B)},en=function(k,B){var U=k.getInput();if(!U)return null;switch(B.input){case"checkbox":return sn(U);case"radio":return nn(U);case"file":return an(U);default:return B.inputAutoTrim?U.value.trim():U.value}},sn=function(k){return k.checked?1:0},nn=function(k){return k.checked?k.value:null},an=function(k){return k.files.length?null!==k.getAttribute("multiple")?k.files:k.files[0]:null},rn=function(B,U){var F=Ct(),G=function(k){return hn[U.input](F,cn(k),U)};ht(U.inputOptions)||dt(U.inputOptions)?(Si(),ct(U.inputOptions).then((function(k){B.hideLoading(),G(k)}))):"object"===k(U.inputOptions)?G(U.inputOptions):st("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(k(U.inputOptions)))},on=function(k,B){var U=k.getInput();re(U),ct(B.inputValue).then((function(F){U.value="number"===B.input?parseFloat(F)||0:"".concat(F),ae(U),U.focus(),k.hideLoading()})).catch((function(B){st("Error in inputValue promise: ".concat(B)),U.value="",ae(U),U.focus(),k.hideLoading()}))},hn={select:function(k,B,U){var F=se(k,gt.select),G=function(k,B,F){var G=document.createElement("option");G.value=F,Kt(G,B),G.selected=dn(F,U.inputValue),k.appendChild(G)};B.forEach((function(k){var B=k[0],U=k[1];if(Array.isArray(U)){var j=document.createElement("optgroup");j.label=B,j.disabled=!1,F.appendChild(j),U.forEach((function(k){return G(j,k[1],k[0])}))}else G(F,U,B)})),F.focus()},radio:function(k,B,U){var F=se(k,gt.radio);B.forEach((function(k){var B=k[0],G=k[1],j=document.createElement("input"),$=document.createElement("label");j.type="radio",j.name=gt.radio,j.value=B,dn(B,U.inputValue)&&(j.checked=!0);var H=document.createElement("span");Kt(H,G),H.className=gt.label,$.appendChild(j),$.appendChild(H),F.appendChild($)}));var G=F.querySelectorAll("input");G.length&&G[0].focus()}},cn=function B(U){var F=[];return"undefined"!=typeof Map&&U instanceof Map?U.forEach((function(U,G){var j=U;"object"===k(j)&&(j=B(j)),F.push([G,j])})):Object.keys(U).forEach((function(G){var j=U[G];"object"===k(j)&&(j=B(j)),F.push([G,j])})),F},dn=function(k,B){return B&&B.toString()===k.toString()},ln=function(k,B){k.disableButtons(),B.input?bn(k,B,"confirm"):mn(k,B,!0)},un=function(k,B){k.disableButtons(),B.returnInputValueOnDeny?bn(k,B,"deny"):vn(k,B,!1)},fn=function(k,B){k.disableButtons(),B(lt.cancel)},bn=function(k,B,U){var F=en(k,B);B.inputValidator?pn(k,B,F):k.getInput().checkValidity()?"deny"===U?vn(k,B,F):mn(k,B,F):(k.enableButtons(),k.showValidationMessage(B.validationMessage))},pn=function(k,B,U){k.disableInput(),Promise.resolve().then((function(){return ct(B.inputValidator(U,B.validationMessage))})).then((function(F){k.enableButtons(),k.enableInput(),F?k.showValidationMessage(F):mn(k,B,U)}))},vn=function(k,B,U){B.preDeny?Promise.resolve().then((function(){return ct(B.preDeny(U,B.validationMessage))})).then((function(B){!1===B?k.hideLoading():k.closePopup({isDenied:!0,value:void 0===B?U:B})})):k.closePopup({isDenied:!0,value:U})},gn=function(k,B){k.closePopup({isConfirmed:!0,value:B})},mn=function(k,B,U){B.showLoaderOnConfirm&&Si(),B.preConfirm?(k.resetValidationMessage(),Promise.resolve().then((function(){return ct(B.preConfirm(U,B.validationMessage))})).then((function(B){ce(Rt())||!1===B?k.hideLoading():gn(k,void 0===B?U:B)}))):gn(k,U)},yn=function(k,B,U,F){B.keydownTarget&&B.keydownHandlerAdded&&(B.keydownTarget.removeEventListener("keydown",B.keydownHandler,{capture:B.keydownListenerCapture}),B.keydownHandlerAdded=!1),U.toast||(B.keydownHandler=function(B){return Sn(k,B,F)},B.keydownTarget=U.keydownListenerCapture?window:wt(),B.keydownListenerCapture=U.keydownListenerCapture,B.keydownTarget.addEventListener("keydown",B.keydownHandler,{capture:B.keydownListenerCapture}),B.keydownHandlerAdded=!0)},_n=function(k,B,U){var F=$t();if(F.length)return(B+=U)===F.length?B=0:-1===B&&(B=F.length-1),F[B].focus();wt().focus()},En=["ArrowRight","ArrowDown","Right","Down"],wn=["ArrowLeft","ArrowUp","Left","Up"],Tn=["Escape","Esc"],Sn=function(k,B,U){var F=Be.innerParams.get(k);F.stopKeydownPropagation&&B.stopPropagation(),"Enter"===B.key?An(k,B,F):"Tab"===B.key?Cn(B,F):-1!==[].concat(En,wn).indexOf(B.key)?On(B.key):-1!==Tn.indexOf(B.key)&&In(B,F,U)},An=function(k,B,U){if(!B.isComposing&&B.target&&k.getInput()&&B.target.outerHTML===k.getInput().outerHTML){if(-1!==["textarea","file"].indexOf(U.input))return;yi(),B.preventDefault()}},Cn=function(k,B){for(var U=k.target,F=$t(),G=-1,j=0;j1&&void 0!==arguments[1]?arguments[1]:{};Yi(G({},B,k)),Ci.currentInstance&&Ci.currentInstance._destroy(),Ci.currentInstance=this;var U=kn(k,B);ks(U),Object.freeze(U),Ci.timeout&&(Ci.timeout.stop(),delete Ci.timeout),clearTimeout(Ci.restoreFocusTimeout);var F=Un(this);return gi(this,U),Be.innerParams.set(this,U),Bn(this,F,U)}var kn=function(k,B){var U=Us(k),F=G({},Fi.showClass,B.showClass,U.showClass,k.showClass),j=G({},Fi.hideClass,B.hideClass,U.hideClass,k.hideClass),$=G({},Fi,B,U,k);return $.showClass=F,$.hideClass=j,!1===k.animation&&($.showClass={popup:"swal2-noanimation",backdrop:"swal2-noanimation"},$.hideClass={}),$},Bn=function(k,B,U){return new Promise((function(F){var G=function(B){k.closePopup({isDismissed:!0,dismiss:B})};bs.swalPromiseResolve.set(k,F),B.confirmButton.onclick=function(){return ln(k,U)},B.denyButton.onclick=function(){return un(k,U)},B.cancelButton.onclick=function(){return fn(k,G)},B.closeButton.onclick=function(){return G(lt.close)},Dn(k,B,G),yn(k,Ci,U,G),U.toast&&(U.input||U.footer||U.showCloseButton)?ee(document.body,gt["toast-column"]):ie(document.body,gt["toast-column"]),tn(k,U),zs(U),Fn(Ci,U,G),Gn(B,U),setTimeout((function(){B.container.scrollTop=0}))}))},Un=function(k){var B={popup:wt(),container:yt(),content:Ct(),actions:kt(),confirmButton:Pt(),denyButton:Mt(),cancelButton:Lt(),loader:xt(),closeButton:Gt(),validationMessage:Rt(),progressSteps:Dt()};return Be.domCache.set(k,B),B},Fn=function(k,B,U){var F=Ft();re(F),B.timer&&(k.timeout=new Ms((function(){U("timer"),delete k.timeout}),B.timer),B.timerProgressBar&&(ae(F),setTimeout((function(){k.timeout&&k.timeout.running&&be(B.timer)}))))},Gn=function(k,B){if(!B.toast)return ot(B.allowEnterKey)?void(jn(k,B)||_n(B,-1,1)):$n()},jn=function(k,B){return B.focusDeny&&ce(k.denyButton)?(k.denyButton.focus(),!0):B.focusCancel&&ce(k.cancelButton)?(k.cancelButton.focus(),!0):!(!B.focusConfirm||!ce(k.confirmButton)||(k.confirmButton.focus(),0))},$n=function(){document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};function Hn(k){var B=wt(),U=Be.innerParams.get(this);if(!B||zt(B,U.hideClass.popup))return it("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");var F={};Object.keys(k).forEach((function(B){Xn.isUpdatableParameter(B)?F[B]=k[B]:it('Invalid parameter to update: "'.concat(B,'". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js\n\nIf you think this parameter should be updatable, request it here: https://github.com/sweetalert2/sweetalert2/issues/new?template=02_feature_request.md'))}));var j=G({},U,F);gi(this,j),Be.innerParams.set(this,j),Object.defineProperties(this,{params:{value:G({},this.params,k),writable:!1,enumerable:!0}})}function Vn(){var k=Be.domCache.get(this),B=Be.innerParams.get(this);B&&(k.popup&&Ci.swalCloseEventFinishedCallback&&(Ci.swalCloseEventFinishedCallback(),delete Ci.swalCloseEventFinishedCallback),Ci.deferDisposalTimer&&(clearTimeout(Ci.deferDisposalTimer),delete Ci.deferDisposalTimer),qn(B),Kn(this))}var Wn,qn=function(k){"function"==typeof k.didDestroy?k.didDestroy():"function"==typeof k.onDestroy&&k.onDestroy()},Kn=function(k){delete k.params,delete Ci.keydownHandler,delete Ci.keydownTarget,zn(Be),zn(bs)},zn=function(k){for(var B in k)k[B]=new WeakMap},Yn=Object.freeze({hideLoading:Xi,disableLoading:Xi,getInput:Zi,close:gs,closePopup:gs,closeModal:gs,closeToast:gs,enableButtons:As,disableButtons:Cs,enableInput:Os,disableInput:Is,showValidationMessage:Ds,resetValidationMessage:Rs,getProgressSteps:Ps,_main:Ln,update:Hn,_destroy:Vn}),Qn=function(){function k(){if(B(this,k),"undefined"!=typeof window){"undefined"==typeof Promise&&st("This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)"),Wn=this;for(var U=arguments.length,F=new Array(U),G=0;G:first-child,.swal2-container.swal2-bottom-left>:first-child,.swal2-container.swal2-bottom-right>:first-child,.swal2-container.swal2-bottom-start>:first-child,.swal2-container.swal2-bottom>:first-child{margin-top:auto}.swal2-container.swal2-grow-fullscreen>.swal2-modal{display:flex!important;flex:1;align-self:stretch;justify-content:center}.swal2-container.swal2-grow-row>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-grow-column{flex:1;flex-direction:column}.swal2-container.swal2-grow-column.swal2-bottom,.swal2-container.swal2-grow-column.swal2-center,.swal2-container.swal2-grow-column.swal2-top{align-items:center}.swal2-container.swal2-grow-column.swal2-bottom-left,.swal2-container.swal2-grow-column.swal2-bottom-start,.swal2-container.swal2-grow-column.swal2-center-left,.swal2-container.swal2-grow-column.swal2-center-start,.swal2-container.swal2-grow-column.swal2-top-left,.swal2-container.swal2-grow-column.swal2-top-start{align-items:flex-start}.swal2-container.swal2-grow-column.swal2-bottom-end,.swal2-container.swal2-grow-column.swal2-bottom-right,.swal2-container.swal2-grow-column.swal2-center-end,.swal2-container.swal2-grow-column.swal2-center-right,.swal2-container.swal2-grow-column.swal2-top-end,.swal2-container.swal2-grow-column.swal2-top-right{align-items:flex-end}.swal2-container.swal2-grow-column>.swal2-modal{display:flex!important;flex:1;align-content:center;justify-content:center}.swal2-container.swal2-no-transition{transition:none!important}.swal2-container:not(.swal2-top):not(.swal2-top-start):not(.swal2-top-end):not(.swal2-top-left):not(.swal2-top-right):not(.swal2-center-start):not(.swal2-center-end):not(.swal2-center-left):not(.swal2-center-right):not(.swal2-bottom):not(.swal2-bottom-start):not(.swal2-bottom-end):not(.swal2-bottom-left):not(.swal2-bottom-right):not(.swal2-grow-fullscreen)>.swal2-modal{margin:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-container .swal2-modal{margin:0!important}}.swal2-popup{display:none;position:relative;box-sizing:border-box;flex-direction:column;justify-content:center;width:32em;max-width:100%;padding:1.25em;border:none;border-radius:5px;background:#fff;font-family:inherit;font-size:1rem}.swal2-popup:focus{outline:0}.swal2-popup.swal2-loading{overflow-y:hidden}.swal2-header{display:flex;flex-direction:column;align-items:center;padding:0 1.8em}.swal2-title{position:relative;max-width:100%;margin:0 0 .4em;padding:0;color:#595959;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}.swal2-actions{display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;margin:1.25em auto 0;padding:0 1.6em}.swal2-actions:not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}.swal2-actions:not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0,0,0,.1),rgba(0,0,0,.1))}.swal2-actions:not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0,0,0,.2),rgba(0,0,0,.2))}.swal2-loader{display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;-webkit-animation:swal2-rotate-loading 1.5s linear 0s infinite normal;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 transparent #2778c4 transparent}.swal2-styled{margin:.3125em;padding:.625em 1.1em;box-shadow:none;font-weight:500}.swal2-styled:not([disabled]){cursor:pointer}.swal2-styled.swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#2778c4;color:#fff;font-size:1.0625em}.swal2-styled.swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#d14529;color:#fff;font-size:1.0625em}.swal2-styled.swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#757575;color:#fff;font-size:1.0625em}.swal2-styled:focus{outline:0;box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-styled::-moz-focus-inner{border:0}.swal2-footer{justify-content:center;margin:1.25em 0 0;padding:1em 0 0;border-top:1px solid #eee;color:#545454;font-size:1em}.swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;height:.25em;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}.swal2-timer-progress-bar{width:100%;height:.25em;background:rgba(0,0,0,.2)}.swal2-image{max-width:100%;margin:1.25em auto}.swal2-close{position:absolute;z-index:2;top:0;right:0;align-items:center;justify-content:center;width:1.2em;height:1.2em;padding:0;overflow:hidden;transition:color .1s ease-out;border:none;border-radius:5px;background:0 0;color:#ccc;font-family:serif;font-size:2.5em;line-height:1.2;cursor:pointer}.swal2-close:hover{transform:none;background:0 0;color:#f27474}.swal2-close:focus{outline:0;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}.swal2-close::-moz-focus-inner{border:0}.swal2-content{z-index:1;justify-content:center;margin:0;padding:0 1.6em;color:#545454;font-size:1.125em;font-weight:400;line-height:normal;text-align:center;word-wrap:break-word}.swal2-checkbox,.swal2-file,.swal2-input,.swal2-radio,.swal2-select,.swal2-textarea{margin:1em auto}.swal2-file,.swal2-input,.swal2-textarea{box-sizing:border-box;width:100%;transition:border-color .3s,box-shadow .3s;border:1px solid #d9d9d9;border-radius:.1875em;background:inherit;box-shadow:inset 0 1px 1px rgba(0,0,0,.06);color:inherit;font-size:1.125em}.swal2-file.swal2-inputerror,.swal2-input.swal2-inputerror,.swal2-textarea.swal2-inputerror{border-color:#f27474!important;box-shadow:0 0 2px #f27474!important}.swal2-file:focus,.swal2-input:focus,.swal2-textarea:focus{border:1px solid #b4dbed;outline:0;box-shadow:0 0 0 3px rgba(100,150,200,.5)}.swal2-file::-moz-placeholder,.swal2-input::-moz-placeholder,.swal2-textarea::-moz-placeholder{color:#ccc}.swal2-file:-ms-input-placeholder,.swal2-input:-ms-input-placeholder,.swal2-textarea:-ms-input-placeholder{color:#ccc}.swal2-file::placeholder,.swal2-input::placeholder,.swal2-textarea::placeholder{color:#ccc}.swal2-range{margin:1em auto;background:#fff}.swal2-range input{width:80%}.swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}.swal2-range input,.swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}.swal2-input{height:2.625em;padding:0 .75em}.swal2-input[type=number]{max-width:10em}.swal2-file{background:inherit;font-size:1.125em}.swal2-textarea{height:6.75em;padding:.75em}.swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:inherit;color:inherit;font-size:1.125em}.swal2-checkbox,.swal2-radio{align-items:center;justify-content:center;background:#fff;color:inherit}.swal2-checkbox label,.swal2-radio label{margin:0 .6em;font-size:1.125em}.swal2-checkbox input,.swal2-radio input{margin:0 .4em}.swal2-input-label{display:flex;justify-content:center;margin:1em auto}.swal2-validation-message{display:none;align-items:center;justify-content:center;margin:0 -2.7em;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}.swal2-validation-message::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}.swal2-icon{position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:1.25em auto 1.875em;border:.25em solid transparent;border-radius:50%;font-family:inherit;line-height:5em;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}.swal2-icon.swal2-error{border-color:#f27474;color:#f27474}.swal2-icon.swal2-error .swal2-x-mark{position:relative;flex-grow:1}.swal2-icon.swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}.swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}.swal2-icon.swal2-error.swal2-icon-show{-webkit-animation:swal2-animate-error-icon .5s;animation:swal2-animate-error-icon .5s}.swal2-icon.swal2-error.swal2-icon-show .swal2-x-mark{-webkit-animation:swal2-animate-error-x-mark .5s;animation:swal2-animate-error-x-mark .5s}.swal2-icon.swal2-warning{border-color:#facea8;color:#f8bb86}.swal2-icon.swal2-info{border-color:#9de0f6;color:#3fc3ee}.swal2-icon.swal2-question{border-color:#c9dae1;color:#87adbd}.swal2-icon.swal2-success{border-color:#a5dc86;color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;transform:rotate(45deg);border-radius:50%}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=left]{top:-.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}.swal2-icon.swal2-success [class^=swal2-success-circular-line][class$=right]{top:-.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}.swal2-icon.swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-.25em;left:-.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}.swal2-icon.swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}.swal2-icon.swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}.swal2-icon.swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}.swal2-icon.swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-tip{-webkit-animation:swal2-animate-success-line-tip .75s;animation:swal2-animate-success-line-tip .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-line-long{-webkit-animation:swal2-animate-success-line-long .75s;animation:swal2-animate-success-line-long .75s}.swal2-icon.swal2-success.swal2-icon-show .swal2-success-circular-line-right{-webkit-animation:swal2-rotate-success-circular-line 4.25s ease-in;animation:swal2-rotate-success-circular-line 4.25s ease-in}.swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:0 0 1.25em;padding:0;background:inherit;font-weight:600}.swal2-progress-steps li{display:inline-block;position:relative}.swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}.swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}.swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}[class^=swal2]{-webkit-tap-highlight-color:transparent}.swal2-show{-webkit-animation:swal2-show .3s;animation:swal2-show .3s}.swal2-hide{-webkit-animation:swal2-hide .15s forwards;animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{right:auto;left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@supports (-ms-accelerator:true){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.swal2-range input{width:100%!important}.swal2-range output{display:none}}@-webkit-keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@keyframes swal2-toast-show{0%{transform:translateY(-.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0)}}@-webkit-keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@-webkit-keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@-webkit-keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@-webkit-keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@keyframes swal2-show{0%{transform:scale(.7)}45%{transform:scale(1.05)}80%{transform:scale(.95)}100%{transform:scale(1)}}@-webkit-keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(.5);opacity:0}}@-webkit-keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@-webkit-keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@-webkit-keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@-webkit-keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(.4);opacity:0}50%{margin-top:1.625em;transform:scale(.4);opacity:0}80%{margin-top:-.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@-webkit-keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0);opacity:1}}@-webkit-keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes swal2-rotate-loading{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto!important}body.swal2-no-backdrop .swal2-container{top:auto;right:auto;bottom:auto;left:auto;max-width:calc(100% - .625em * 2);background-color:transparent!important}body.swal2-no-backdrop .swal2-container>.swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}body.swal2-no-backdrop .swal2-container.swal2-top{top:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-top-left,body.swal2-no-backdrop .swal2-container.swal2-top-start{top:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-top-end,body.swal2-no-backdrop .swal2-container.swal2-top-right{top:0;right:0}body.swal2-no-backdrop .swal2-container.swal2-center{top:50%;left:50%;transform:translate(-50%,-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-left,body.swal2-no-backdrop .swal2-container.swal2-center-start{top:50%;left:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-center-end,body.swal2-no-backdrop .swal2-container.swal2-center-right{top:50%;right:0;transform:translateY(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom{bottom:0;left:50%;transform:translateX(-50%)}body.swal2-no-backdrop .swal2-container.swal2-bottom-left,body.swal2-no-backdrop .swal2-container.swal2-bottom-start{bottom:0;left:0}body.swal2-no-backdrop .swal2-container.swal2-bottom-end,body.swal2-no-backdrop .swal2-container.swal2-bottom-right{right:0;bottom:0}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll!important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static!important}}body.swal2-toast-shown .swal2-container{background-color:transparent}body.swal2-toast-shown .swal2-container.swal2-top{top:0;right:auto;bottom:auto;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{top:0;right:0;bottom:auto;left:auto}body.swal2-toast-shown .swal2-container.swal2-top-left,body.swal2-toast-shown .swal2-container.swal2-top-start{top:0;right:auto;bottom:auto;left:0}body.swal2-toast-shown .swal2-container.swal2-center-left,body.swal2-toast-shown .swal2-container.swal2-center-start{top:50%;right:auto;bottom:auto;left:0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{top:50%;right:auto;bottom:auto;left:50%;transform:translate(-50%,-50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{top:50%;right:0;bottom:auto;left:auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-left,body.swal2-toast-shown .swal2-container.swal2-bottom-start{top:auto;right:auto;bottom:0;left:0}body.swal2-toast-shown .swal2-container.swal2-bottom{top:auto;right:auto;bottom:0;left:50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{top:auto;right:0;bottom:0;left:auto}body.swal2-toast-column .swal2-toast{flex-direction:column;align-items:stretch}body.swal2-toast-column .swal2-toast .swal2-actions{flex:1;align-self:stretch;height:2.2em;margin-top:.3125em}body.swal2-toast-column .swal2-toast .swal2-loading{justify-content:center}body.swal2-toast-column .swal2-toast .swal2-input{height:2em;margin:.3125em auto;font-size:1em}body.swal2-toast-column .swal2-toast .swal2-validation-message{font-size:1em}')},62248:(k,B,U)=>{"use strict";U.d(B,{l6:()=>F});var F,G,j=U(92661);!function(k){k.Rescue="rescue",k.Evolution="evolution",k.LostPet="lostPetCost",k.Merge="merge"}(F||(F={})),function(k){k.Rescue="rescue",k.Evolution="evolution",k.LostPet="lostPetCost"}(G||(G={}));const $=j.g1P(j.k5n(G),j.aig().min(0)),H=j.g1P(j.YjP(),$),V=j.g1P(j.YjP(),H),W=j.g1P(j.YjP(),V),q=j.Ikc({level:j.YOg(j.aig().int().min(1))});j.Ikc({name:j.YjP(),variants:j.g1P(j.YjP(),W),levelCapsEvolutionVariant:j.g1P(j.YjP(),q)})},95359:(k,B,U)=>{"use strict";U.d(B,{IE:()=>G});var F,G,j=U(92661);!function(k){k.StatsCommon="statsCom",k.StatsUncommon="statsUnc",k.StatsRare="statsRar",k.StatsHeroic="statsHer",k.StatsLegendary="statsLeg",k.Default="default",k.Wizard="wizard",k.PuppetMaster="puppetMaster",k.Boss="boss",k.Miniboss="miniboss",k.IllusionBoss="illusionBoss",k.DragonBoss="dragonBoss",k.HoodedWizard="hoodedWizard",k.Pippet="pippet"}(F||(F={})),function(k){k.Power="power",k.Defence="defence",k.Speed="speed",k.Hp="hp"}(G||(G={}));j.g1P(j.k5n(F),j.YOg(j.Whr()))},76572:(k,B,U)=>{"use strict";U.d(B,{_:()=>F});class F{constructor(k=null){this._message=null,null!==k&&this.setErrorMessage(k)}setErrorMessage(k){this._message=k}getErrorMessage(){return this._message}}},30334:(k,B,U)=>{"use strict";U.d(B,{z:()=>F});const F=5},113:(k,B,U)=>{"use strict";var F;U.d(B,{O:()=>F}),function(k){k.Firefly="forest",k.Shiverchill="shiverchill",k.Skywatch="skywatch",k.Bonfire="bonfire",k.Shipwreck="shipwreck",k.TowerTown="towertown"}(F||(F={}))},26077:(k,B,U)=>{"use strict";U.d(B,{$N:()=>G,gW:()=>$,mX:()=>j});var F=U(17446);const G={[F.E.Common]:"common",[F.E.Uncommon]:"uncommon",[F.E.Rare]:"rare",[F.E.Heroic]:"heroic",[F.E.Legendary]:"legendary"},j={common:F.E.Common,uncommon:F.E.Uncommon,rare:F.E.Rare,heroic:F.E.Heroic,legendary:F.E.Legendary},$={Shiny:"_shiny"}},88022:(k,B,U)=>{"use strict";var F;U.d(B,{_:()=>F}),function(k){k.Academy_tower_cr_stools_json="60831677-d459-4006-b97b-321a443e09e0",k.Academy_tower_progress_ui_json="b315cf38-adc5-4ea0-bbbd-99f07fcc55d6",k.Academy_towers_name_banner_json="10311b80-4c09-4b54-b083-716e468c29a7",k.Boss_aspen_extras_json="1057de44-bd55-402c-9b9b-3d267c2bb1df",k.Boss_bonfire_json="6d821273-7cd7-4606-9930-4bcd492003a3",k.Boss_gerald_json="c38cef60-fc17-4628-85f4-f1ed7873d9ba",k.Boss_gerald_shadow_json="d0b270a9-222d-4ac9-b96f-1227b94e1b9d",k.Boss_skywatch_json="923c301b-5f07-4471-978d-92696c52c468",k.Boss_titan_barrier_break_json="9b4f9957-c4c4-412f-995d-fffcd5d74c3a",k.Boss_titan_barrier_json="74921264-90f3-4c07-8930-4c8d720db79d",k.Boss_titan_json="c5025568-47f7-4303-8be4-0544b422ee64",k.Boss_titan_spark_json="b2b8887a-5bfd-42a3-be4e-3bd1cd85b1c1",k.Daily_login_calendar_json="f1652f03-1fde-46d1-9c82-613d85d2c2c6",k.Duels_matchmaking_json="d1bae84f-a96a-4222-881b-70c1e0883620",k.Event_daily_login_bonus_json="bd03a84a-cc64-4c9d-a58b-92c1f2ac814f",k.Event_moonlightfest_json="a34cf420-9dcb-491b-925d-c1cc316c7fbf",k.Event_october_json="b083cb98-ade8-47e7-9bf2-3fdb4387478c",k.Event_pumpkinfest_json="8881b8c9-9f10-4a59-a091-4ac2a46ac45f",k.Event_starlight_festival_json="3aba1b12-409e-408f-820b-a1885cd7237d",k.Event_summerfest_json="800bd696-72ce-4b35-b35e-aad290b78e58",k.Event_winterfest_json="dbe9b147-c96e-4a9f-bad2-4ec1cd7a401d",k.Floatling_fling_json="bbffa1b6-79e3-4b8a-ace2-7796565cf015",k.Font_battle_json="9b54d364-ec74-4a2e-9243-2b671483d4d6",k.Font_black_json="8a50a2dc-f9fc-4b6e-8163-af4a680d838c",k.Font_button_json="c494006d-6fa2-4553-a7d6-8fe6614f304a",k.Font_general_json="05c2c8d0-b6b2-4e4a-ae81-c217ad7d94b8",k.Font_microtransactions_json="6598b520-06b1-4105-bc0a-4de6a3466dd6",k.Font_shadow_json="96fc3ba0-27ef-4c7c-8ad4-8a84a3b9b8de",k.Font_ui_json="7a182121-0b1a-405c-9817-d6b99e054f5b",k.Game_dancedance_json="b2c4d03f-f1ad-49b6-9820-a81a96eaf61d",k.Game_dinodig_json="33cb1fa0-9c1c-4993-a05f-5b6d9c5467ff",k.General_attacks_json="5f06769f-7269-4807-ba66-be1724860507",k.General_battle_json="81521922-a876-4f7f-940a-ce9644c08f98",k.General_chat_hud_json="d45aa48d-e364-4ba6-9a7e-750d1c844e89",k.General_core_2_json="59c467aa-1adc-4bbf-b606-2428f41951a1",k.General_core_json="37fd2547-8939-4c13-8d91-a91f6ef2b82b",k.General_icons_hud_json="45f1d6ab-c455-4b28-ad0d-ef053fa9d2d4",k.General_icons_json="c4d59570-c1cb-4065-a35d-7135af6fa51a",k.General_login_json="b495cec9-b305-405c-bbf7-ec3643cdece0",k.General_map_json="a966f131-7d30-4c69-9a0a-b380775f79e9",k.General_pets_json="9a91d86e-34ec-4cd6-98b9-195c4716bea0",k.Icon_topic_pixel_json="3f38b8e3-ae48-4db2-a101-495c7ae9154e",k.Icons_house_buying_json="ae662eab-b93c-48d4-98e5-ebb534bb2288",k.Icons_house_json="970feac8-062e-4ed4-87ba-f793dd3323cc",k.Icons_menu_json="ef63444d-f511-4327-b9de-257197813f80",k.Npc_face_arena_master_json="692b081b-198e-4f2c-afc1-60b603570baf",k.Npc_face_aspen_json="1de12143-69cc-4942-a0d4-ca5c153ca68f",k.Npc_face_astraldragon_json="333cdeff-3307-4aca-9c79-a968b5070953",k.Npc_face_athena_json="41d37a49-933f-4bd1-93e2-d82005e14d99",k.Npc_face_bargo_bunny_json="643f0ce1-969a-42d1-8c30-82715a7fb308",k.Npc_face_benni_json="2f8caf7a-0a31-43ef-9944-e11d4acf82e1",k.Npc_face_bok_json="00bc919e-62cf-413d-bbbc-1b2cc5724468",k.Npc_face_boombox_json="598c699e-e706-4ec1-b352-cf591a6da7f1",k.Npc_face_broccolina_json="332e3dad-e456-4dbf-a558-ae249e53ccbe",k.Npc_face_cebollini_json="3d77fb75-e7ca-4411-81cf-dbfeeebf126e",k.Npc_face_clankboot_json="ddf6db07-2615-4905-8f8e-91c47704a79d",k.Npc_face_cloakedwizard_json="78887024-6a01-4ef6-af87-233e0d0392e9",k.Npc_face_cumulo_json="dcd879ec-b168-4478-a953-9e3a47b62614",k.Npc_face_don_zorro_json="211b4ec2-8f41-42f6-a66b-56b5b7deea28",k.Npc_face_eugene_json="b6fa766e-ec12-439e-af3c-239f26561ab8",k.Npc_face_eve_json="36f05e7f-b2f8-4f4b-9b09-7fd961a91fc7",k.Npc_face_firedragon_json="bcdd337d-4483-47a4-a931-06f36c251fc8",k.Npc_face_fishthing_json="900782b3-43f3-49ff-9fe5-71f8f2b32962",k.Npc_face_floatling_merchant_json="e8cc9a63-954e-4264-b021-23812e071ba9",k.Npc_face_flora_json="58e3fb0a-04ff-4c24-8e3d-b64834b1b9df",k.Npc_face_florian_json="c2f2096b-54f4-40eb-a9fe-ac2c4b1b2d33",k.Npc_face_gale_json="4f5aedc5-2e46-4c24-8bc0-4fd20b187fe8",k.Npc_face_generic_student_raster_json="38108157-8886-4909-96cf-18c9bbdb129b",k.Npc_face_gerald_raster_json="0786b5ed-ed86-4624-a045-291b02a486fd",k.Npc_face_guard_json="6afae7a7-5683-4711-8b8d-ef8982df0587",k.Npc_face_harriet_json="b59b2795-6e6b-4c5e-b5f2-12e772d7e0a1",k.Npc_face_harvey_json="ad0d5bdc-e76c-48f3-9d85-f1e1f81cccdf",k.Npc_face_hollowjack_json="76b71b3f-b4a7-413f-80a2-76fdeb808b30",k.Npc_face_howard_cornelius_json="98c17c79-2d43-4b59-b9ed-b6784b89d633",k.Npc_face_ice_tower_warden_json="7dc19742-a5d1-4856-a552-52c488ee716e",k.Npc_face_icedragon_json="c50e6c71-66b1-4b8f-a13b-babf2ac1cca8",k.Npc_face_jim_json="08d207df-490e-48df-88e2-1b8fab31f33f",k.Npc_face_julia_ghoulia_json="7b1b4ee2-e04f-4c5c-8d07-74c9b61ee1f9",k.Npc_face_kandi_json="76211f0c-4685-4a40-ac4d-5c72a0467b1c",k.Npc_face_koi_json="19699732-0d39-45ab-ba17-cca14a251f99",k.Npc_face_mamastar_json="b7d2eb7f-ded2-4dc3-b71b-55deed490352",k.Npc_face_merchant_json="2a787301-0520-4579-adb6-ff99d81f98f3",k.Npc_face_mira_json="e50a94db-152e-4fa2-bcf5-74f5e8a88829",k.Npc_face_mist_json="bed0a62a-ec52-402c-9e5f-25ef58a6de82",k.Npc_face_mizu_json="386add32-c825-4a96-9c85-2594da830a38",k.Npc_face_morris_json="0c644e4d-2bab-4754-a803-6405ddab8d8e",k.Npc_face_mozza_ella_json="a2601500-ede3-4e05-b5c6-6f4342c3cec1",k.Npc_face_mugs_json="7e467d11-02b3-4368-bb8b-6844f3b584a9",k.Npc_face_noot_json="6c29cbd0-645e-4a11-b0b6-935cb78a4020",k.Npc_face_physicaldragon_json="bdbf3969-125d-49f7-8e7f-369058f26f84",k.Npc_face_pippet_json="4989b1a1-4519-41fb-b4eb-c44ab799ce11",k.Npc_face_poppet_json="fff0d68f-77ad-4a99-b2ef-c242b3e68252",k.Npc_face_potion_json="37fb9995-2cc7-43f6-87db-db6b317d6fcf",k.Npc_face_puppetmaster_hourglass_json="94c3d409-7138-480f-a3b8-0316c959fdd1",k.Npc_face_puppetmaster_json="9b3c6d3a-8814-49ae-b4a1-8343097ad6a8",k.Npc_face_puppetmaster_raster_json="f55db1eb-8dec-406b-934b-4c67d023bd39",k.Npc_face_puppetmaster_reborn_json="c05255ce-4e33-4cf0-b76d-1adf6703c374",k.Npc_face_scoog_json="d7a1db06-c9bc-43d5-beb0-7e445f9f7c2a",k.Npc_face_selena_json="7221890b-7284-4f57-b324-2ebde1aaf75e",k.Npc_face_shadowdragon_json="3c71f275-bf08-42db-b74a-7e9a65c3f1e3",k.Npc_face_sir_vey_json="c9fb711e-d687-469f-b8af-5376627e6cba",k.Npc_face_slime_guard_hank_json="372f71c0-ebc9-4899-8bec-e23b4133fddd",k.Npc_face_slime_guard_json="a5a4d6ae-684e-4c4d-8f29-d0a8ebd96d5c",k.Npc_face_slime_guard_mike_json="64482cd2-ca5b-42ce-b88d-f211a94d0028",k.Npc_face_slime_queen_json="613ddde7-b5ad-4c11-a2e0-7a5f7bbb1594",k.Npc_face_slime_worker_json="8caee26c-32fc-45e5-9cf3-4b4adeacc4e4",k.Npc_face_slurpy_json="48beef1f-196d-4577-924a-4bf1cf5fac41",k.Npc_face_stache_json="b8da0f5b-e078-4bcd-acb7-ecdd37551ff8",k.Npc_face_starlightboss_json="8730d2e1-f2b8-478f-a1f3-3feec362d201",k.Npc_face_stubborn_shadow_json="b7b920dd-464d-477d-8da1-b894cd774ea3",k.Npc_face_swoopy_json="4ed260ec-b7cf-4b8f-9a82-90f0c5f4399c",k.Npc_face_toy_json="d2dbd340-5919-44d2-b3e3-e62bb1729774",k.Npc_face_ulla_json="24d32e95-2dc8-40f2-9240-1fde8623da9a",k.Npc_face_verna_json="7b7e4fc8-387b-4f24-8dfa-3841fd07f8f7",k.Npc_face_windsail_json="52464276-f52d-474d-9e70-87fd8903a59c",k.Npc_face_winston_json="339cbbf7-9e98-4d30-83de-e5721e7e7edc",k.Npc_face_wizard_json="e5cbfefc-aa3e-4aaa-b018-77e63fc7c888",k.Npc_face_wyrms_json="a7f444ac-f419-490e-80c9-bcc5554e18f0",k.Npc_sprite_benni_json="f4507fe5-199c-4607-b9e1-ba310b6673b9",k.Npc_sprite_bok_json="79b14f32-c35c-46c7-8d0a-c84153387fd0",k.Npc_sprite_boombox_json="74de39e1-8bf8-4310-a497-bb2eff3feb33",k.Npc_sprite_broccolina_json="1e9da7ca-42a2-47ed-861a-5862c58591b6",k.Npc_sprite_cebollini_json="b02826c8-28b5-4493-8552-5de3f3ed906f",k.Npc_sprite_clankboot_json="0b12b3a2-543b-4918-8f09-00aef980bb2d",k.Npc_sprite_cumulo_json="834cec01-cc74-4014-9b8a-9fc0b74915f2",k.Npc_sprite_eugene_json="ef57d234-f4eb-458d-9b1a-a46d32715105",k.Npc_sprite_eve_json="760038bd-3483-4655-bf03-666e97612bb3",k.Npc_sprite_fishthing_json="558eec74-c9bc-48f4-9fd1-fabd3b5fef0e",k.Npc_sprite_flora_json="67b23f8a-6d1a-4314-8af4-515f3c3c283d",k.Npc_sprite_gnome_json="54c4cf3f-2670-4d4b-b178-64640803c9a2",k.Npc_sprite_guard_json="a09ba130-7636-4cfc-8323-b3e09cc9bd6a",k.Npc_sprite_howard_cornelius_json="c8014dd7-bda9-41f9-aab7-fbb76653db5b",k.Npc_sprite_jim_json="1779a78b-bdd6-4207-a991-59ac86801975",k.Npc_sprite_julia_ghoulia_json="f639e264-5017-4b1d-82de-e1832f1f4d8d",k.Npc_sprite_mama_star_json="ab2459ca-2812-4fa0-8085-96f507da7220",k.Npc_sprite_merchant_json="4e768d76-3013-4e30-a853-90b7b1672dc4",k.Npc_sprite_mira_json="3889e9b9-ce45-4c10-a293-5e0d09b5f10a",k.Npc_sprite_morris_json="e84e7829-e176-4864-9bee-628489934f95",k.Npc_sprite_mozza_ella_json="2e837bcc-e92c-4e55-936f-3badcc16f386",k.Npc_sprite_mugs_json="d8c2d16f-974e-4460-a70a-2549175bad28",k.Npc_sprite_noot_json="5d5cf855-33d5-40a1-92de-9c1020879849",k.Npc_sprite_pippet_json="3fa76099-5b94-4c16-88e5-4d176e56b621",k.Npc_sprite_potion_json="6fc659ba-ee43-4f51-a53a-dafa7ca5a7c6",k.Npc_sprite_scoog_json="8e20f328-047c-4594-96b6-1619836519c7",k.Npc_sprite_slime_guard_json="e7fa232d-e4c7-48b5-882e-5b6e914fdc9b",k.Npc_sprite_slime_queen_json="28c25359-76da-4096-8578-1c08080ddace",k.Npc_sprite_slime_worker_json="11725d43-791d-4d4b-835d-4dec1b4b1883",k.Npc_sprite_slurpy_json="79f61a3b-04d0-43e1-8330-896ce5d1e304",k.Npc_sprite_stache_json="c871c5a5-2248-4d00-af22-937f79b13a25",k.Npc_sprite_swoopy_json="0d52af66-3868-4c43-84b8-403b9a3e455f",k.Npc_sprite_toy_json="9a5c5acb-2ad0-4faf-b276-42ba25b0db91",k.Npc_sprite_windsail_json="54d58b21-c65c-4395-a84a-61a55a3fde5b",k.Npc_sprite_wizard_json="a6c7e4a2-b306-437a-94ac-0261fe2224b5",k.Particles_json="59f3e3cd-c27b-4a60-8d33-2fd8a7542fce",k.Particles_mount_11_json="bed01fa6-a177-45a2-89b8-b92d8b3030d3",k.Particles_mount_5_json="c108cd09-3f02-4f28-9e2d-cd927425128c",k.Particles_mount_6_json="4d002d20-55be-4fee-bf0e-8ea9e5bc9fdf",k.Particles_mount_8_json="ea7dc11f-eb15-4dea-8367-5c938c9fe301",k.Particles_mount_9_json="19ea189a-6eab-48b8-8a16-5541b31502d2",k.Pet_merge_ftue_slides_json="61b48f36-9d17-42ad-8e57-e54d2fd6a367",k.Pet_xp_boost_json="919e8d1e-7f64-47d2-bb13-3990076ee2c4",k.Popup_after_hours_json="e77002e1-61df-4228-bee3-a611b71c1c9a",k.Popup_gohome_json="fb6e5eb3-8bea-4e80-bf51-64f2da4d0df4",k.Popup_member2_json="09807618-2328-4831-9080-47055a663863",k.Popup_member_json="8d4e0617-e51e-45da-9531-220fa6759a90",k.Popup_member_modular_json="f85e62f1-05d4-4bb6-8a9c-ce164a4fe619",k.Popup_member_success_json="e4fa0728-1053-42c3-8333-b297414be3aa",k.Popup_parent_link_json="abda2313-18a2-45d3-a295-71c7e790f071",k.Popup_star_jar_json="1b44ff51-1d60-4e70-89d3-aa040ac0d764",k.Popup_travel_grayscale_json="d2882548-5869-4324-86b9-10b846ab184d",k.Popup_travel_json="be7f13f1-c44c-45a1-b794-1f035682a107",k.Popup_ui_roulette_json="89d4783e-4891-45cc-8354-d1a676351714",k.Random_wizards_json="1c455c4a-22b2-4151-9dbb-299031a7a429",k.Rift_run_shadow_dragon_battle_map_1_json="37c6b810-1de6-4591-b848-b7c65b653780",k.Rift_run_shadow_dragon_battle_map_2_json="e2941089-be34-4491-af3d-f77b4a66c157",k.Rift_run_shadow_dragon_battle_map_3_json="22bdd379-3fb1-412f-ae9d-4d48394d3ca5",k.Scene_intro_json="558f1248-c5f2-40cc-80b5-1a515323ef5a",k.Shiverchill_snow_particle_json="0c9f3c09-dacb-45a1-beec-3af66822a0d7",k.Skin_underwater_json="de739f08-7f8d-4d88-90e0-c4752bd87220",k.State_challenge_background_json="dfad7f8b-4604-4c92-98db-bfc8b7c49c64",k.State_challenges_json="ff065970-102d-4fcf-bd86-fed58684b9cc",k.Store_cloud_json="8cde933c-4610-4e1d-bed2-ac0a6695c644",k.Store_dorm_json="4cb89769-bf79-43f2-8e3f-e2a4cc960484",k.Store_forest_json="a7c8041c-ec4c-4c03-8c70-85b411e7254b",k.Store_mountain_json="ba9a7067-0457-45b7-8a93-f19cc25b8ff7",k.Store_pirate_json="a6000028-6971-41eb-87df-28eb77e7a0d6",k.Store_stylist_json="146f5e4e-aafe-4897-b25a-ba1504f54753",k.Store_tech_json="c7483a53-4163-49c0-b9f8-976792d01079",k.Store_volcano_json="dfb7e342-8b34-4f14-a3c5-40960bef10f3",k.Tabs_left_json="09ce7cb9-fe18-46cc-a9c7-80500957cdc9",k.Tiled_sprites_json="0ebdf8e9-a833-4add-b5f3-580f3dafae54",k.Tileset_core_json="b910aea8-b655-4883-b512-271b0b958791",k.Towertown_frames_store_json="e8afc045-6894-410f-bd8a-b013df34b96e",k.Towertown_interiors_store_json="21e7389b-6ca0-4ac4-ac39-bf85089f71d5",k.Towertown_interiors_ui_json="25b4432e-6f9d-4850-9f73-52e24f57359a",k.Ui_after_school_json="9e9c9ea2-6f3e-4dfb-9e5e-3ee5a7610842",k.Ui_bam_json="0d007a9c-f08c-4029-a924-60f64d317ebc",k.Ui_battle_arena_json="43e29f53-cad1-47df-b9ab-6da5a1e6c00b",k.Ui_battle_pass_json="7e9e32a3-5c8c-4a85-9901-528d8ebe9753",k.Ui_battle_pass_ultimate_json="478cd1f5-ee15-4b1b-b5ba-34464dd73601",k.Ui_battle_revamp_json="7f153f7f-8470-4c8c-bfed-9bbf38fd4740",k.Ui_battle_revamp_legacy_json="2decd275-885b-43c7-8f0a-2f1dfa06a9d5",k.Ui_breadcrumbs_json="4835c50f-fcda-4de7-91f0-72ddecb6a8e4",k.Ui_buttons_json="22cb767c-d4b4-4a19-9011-cc7f5261356b",k.Ui_card_json="109e12f6-3f67-42ce-8cb5-3e50ae75b5ef",k.Ui_cc_adventure_map_json="a88dec95-785e-422d-a3f2-7a41dc517053",k.Ui_cc_boss_icons_json="1d2f1f0d-d4e8-492c-8509-d7e78235dbb2",k.Ui_cc_dungeon_complete_json="5a3a2697-40d6-426a-a8e8-2384923b2e17",k.Ui_charged_levels_json="51b25aab-bd7e-4377-bcb1-3553cbe978e9",k.Ui_class_code_json="c398bb25-88fe-401a-bb89-1a008447a239",k.Ui_common_neutral_json="1be98e6b-fa30-49ed-89b0-2845ef01c75c",k.Ui_contextual_offers_json="913df195-976e-49ec-9465-2ebc4ebdfd7d",k.Ui_coop_json="1c81065d-abd2-4f35-941d-8cd7b023da10",k.Ui_daily_question_json="2e8adbbd-52d0-43e7-a12e-8ca3e2fb70bb",k.Ui_dialogues_json="826a14ed-4ee6-4dd6-9244-5ae972d7cdd7",k.Ui_difficulty_selector_json="ccf4a666-1643-4029-8ec1-fad5e23894c3",k.Ui_dual_currency_backing_json="6ea5b40c-b520-4396-9375-57944d8d8836",k.Ui_duels_loading_screen_json="a4a5c1ac-736d-455d-93c7-e5d185a88404",k.Ui_duels_matchmaking_leagues_json="b56de104-0245-433c-963c-1f32b52072fe",k.Ui_duels_stadium_rooms_json="4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",k.Ui_education_badges_json="e8564da8-4cf9-4350-b7e4-a6799a604c6d",k.Ui_eg_bountyrun_json="6b2722ea-1ebf-4579-9cf5-db9734394f89",k.Ui_evolution_screen_json="7a26fabf-9dc4-495b-9b72-b8eb697395a2",k.Ui_featured_pet_json="298ffe1f-af76-4410-b66b-26f684f0293f",k.Ui_forest_progress_json="77e12afe-3f39-4102-8a3a-65659947cc66",k.Ui_ftue_player_goals_json="1acf7d49-330c-4f33-bee6-b3d3971f5e75",k.Ui_guide_hands_json="b1df28f3-8164-4f95-a26e-4195e89e6cc6",k.Ui_hard_currency_json="c1f34747-4e84-43c4-8f37-4d81eed275ed",k.Ui_home_school_server_json="fd77fe10-306d-4ecf-aefd-b78efd752d49",k.Ui_icons_json="ae62c4d3-ba14-4de0-8054-03581ca389b8",k.Ui_library_json="8d28ece7-51e5-4bb2-b57f-19d77ea9ba14",k.Ui_login_credentials_json="689bcf78-3c74-49ab-9e18-159fd83ec460",k.Ui_loot_dash_json="87ffbede-e592-47e6-b837-99a1524d71f6",k.Ui_loot_dash_lobby_json="44c81f16-42ae-488e-b61b-e8844bcc5397",k.Ui_magicoin_upsell_json="96913c15-3ee6-4f41-a28a-7d1f16f63953",k.Ui_member_jar_json="becee9ee-8884-4572-878d-9134b4bc63fc",k.Ui_member_tiers_json="96f934ce-db64-4159-9c2f-d93f679ed4ff",k.Ui_moonlight_fest_json="022ddcad-5938-4f72-9755-b3739e9513b0",k.Ui_panels_json="e770ddd9-eb12-4d7e-9774-7657d342f1f4",k.Ui_parent_goal_json="b9402d51-9f2c-41bf-b582-a8c67ba7b073",k.Ui_pet_capture_json="4f1022a8-0406-4adf-9e5a-0684b4aa8efb",k.Ui_pet_gear_json="444a50b3-d294-47f9-8f51-65fece4b4359",k.Ui_pet_menu_json="389ef624-a601-45e2-ae6c-030305e40354",k.Ui_pet_merge_json="b30f9cb9-2b8d-4c36-b765-821e0c06f22b",k.Ui_pet_rarity_indicator_json="229edeef-fc22-44e8-b34c-558441e4fa38",k.Ui_petslots_json="61345a9c-2788-4667-a6b3-6eebbb4bde0d",k.Ui_postbattle_json="8d93f015-2812-48c3-a412-1a75ed4c88ec",k.Ui_prebattle_json="eca8ff43-14c2-4c24-bf22-416f394d46bd",k.Ui_pumpkinfest_json="87c35c43-465f-4a96-9676-ba8275a2ad87",k.Ui_pvp_seasons_json="5797ca36-83e6-4f76-a6cc-0e1ed9f98a82",k.Ui_raster_bars_json="b5ec5318-c940-4a25-b22f-36d97c912f2a",k.Ui_raster_epicsv2_hero_poses_json="4c2e0ca5-a224-426e-8a68-6b4dd47994db",k.Ui_raster_epicsv2_json="05eedff0-8230-4705-b857-e310c2e69556",k.Ui_raster_icons_json="c6753144-cb9b-48a3-94ba-525459416b6a",k.Ui_raster_panels_json="ee3b9351-524b-40de-a452-c34f060df0e0",k.Ui_raster_pet_card_json="82f66941-d492-42d1-adc4-5131c802d27a",k.Ui_raster_pet_zone_menu_json="ba0c40a3-5622-4006-8eb5-66eed4142357",k.Ui_raster_pets_menu_json="1ffde150-1833-416f-82d2-32a2b4444a6c",k.Ui_registration_json="3619736d-741f-4342-91b5-f3d276039020",k.Ui_replay_campaign_json="1188c794-4cfd-435e-9c4f-81da56601c60",k.Ui_revamp_pet_info_json="d60e23d5-a249-4a68-a0ea-f70bc9533d99",k.Ui_rifts_json="e0aec679-5627-49e6-bb0c-59a4e504ba51",k.Ui_segmented_offer_json="a60c3a09-98c3-4125-9f3a-7cba66121953",k.Ui_seven_level_membership_json="85480cf4-5370-4a58-97b5-8b237163165f",k.Ui_shared_json="2974fbc2-b097-42cc-ace4-19cd3a63ff7e",k.Ui_shared_revamp_json="9e213e98-76ad-4295-9699-d5d38685cbd5",k.Ui_shipwreck_progress_json="faa4ac5e-9a0a-4b0f-aaa6-00c94c0d1f1d",k.Ui_shiverchill_progress_json="13887a36-e295-48d8-94f3-5f5d3015787a",k.Ui_social_feed_json="5ea30e07-e362-4ac2-a0e0-0a9e3dbdfed9",k.Ui_social_menu_json="f28ac625-fa22-4c32-a6dd-9afb5cca5895",k.Ui_spell_effect_icons_json="a25b6cda-c1a2-4734-b7bd-15c3b49402d9",k.Ui_springfest_json="15eded9b-03d5-4e70-bc3d-7c1360654cb6",k.Ui_starlight_fest_json="f99c7956-c3bc-411d-a480-e98eba73a0f7",k.Ui_store_json="93a21019-836a-4433-b6ae-fdc7515725b7",k.Ui_summerfest_json="2b362a5e-4928-4547-bf01-f4c3e2753b18",k.Ui_timer_json="ae3788cd-2574-4eab-bccd-7284018ac7fa",k.Ui_titan_json="8a31f137-bb95-4e66-9b12-308458e3d6d0",k.Ui_towertown_flags_json="cc9fe7a1-c344-46fe-a86d-518d9d6c8622",k.Ui_towertown_json="b50091d7-fcd3-48e4-b051-61d8cd11e140",k.Ui_towertown_misc_json="99c68201-9a18-4f93-9eed-7d87cf2107b1",k.Ui_towertown_samples_json="64095efd-5cf4-48ec-81a0-806f58fe0285",k.Ui_unified_store_json="741fd381-0be6-4ce6-b12e-e46648b69d93",k.Ui_weekly_challenge_json="48df0747-c750-417d-a892-ba2f3e145757",k.Ui_widget_icon_json="48f64ca9-a763-45ba-a31c-a73dca7d66a6",k.Ui_widget_modal_json="c431f466-ad95-46a3-ad55-70200dbbfaa0",k.Ui_winterfest_json="5707ba74-0199-4cf2-98d9-fccf6cde1323",k.Ui_wizard_bank_json="ef304ad8-293c-4537-95ab-bac9747d2f55",k.Ui_wizard_costumes_json="570d4d78-5031-4a11-82c2-fbf60ea20373",k.Ui_world_zone_locked_unlocked_json="474793c4-15b4-4fad-8576-6dc4a373148a",k.Zone_arena_json="7ef7273d-b157-465c-a980-c38f5680c3b7",k.Zone_bonfire_json="118a10bd-96bc-4aa9-985e-34ee681482be",k.Zone_cloud_json="e644ec28-68e4-471d-a86b-0384c4f71f89",k.Zone_dino_json="a9a42dce-f8e2-4ddf-887f-28fb5ffdd1c9",k.Zone_elemental_guardian_json="293b3825-8f12-407a-bc06-b906e15e1d01",k.Zone_forest_json="75bdbbe1-aa77-4a93-9fef-b437f1ca70c2",k.Zone_lamplight_json="2715318f-943d-46a1-a600-78b6f3bc762a",k.Zone_museum_json="36532f64-1e40-4ecd-a575-7f6733a0d59f",k.Zone_pirate_json="3e356110-1011-4184-b6ea-1e137a640f67",k.Zone_plains_json="6177d87f-72e9-4033-aaf4-4e6fc5be96ee",k.Zone_shipwreck_json="84729031-a641-4fb8-adc5-ef4b67746061",k.Zone_shiverchill_json="d4ed607c-ed6e-4304-96b3-50445b0d9e69",k.Zone_skywatch_json="9b201c34-c88b-45a4-83c0-b7371c45538d",k.Zone_tech_json="62a82805-2446-40e9-959e-e769a8f65942",k.Zone_tower_json="de3489ec-caff-40bc-9fa1-3fbe38313f5c",k.Zone_towerbase_json="8c2da818-0326-433a-89f9-358d5c3e3342",k.Zone_volcano_json="e69bf988-1083-43a0-8736-10410299e0ef"}(F||(F={}))},19631:(k,B,U)=>{"use strict";var F;U.d(B,{B:()=>F}),function(k){k.Attack="a1c943d4-650b-48e3-a72b-6af3fbf657db",k.Battle="84eda37b-8c5a-455f-b5cd-08745edf1fa0",k.Build="d2cfc25b-bc7e-4e7e-9c6e-8d3249f78422",k.Check="da89546d-68dd-48bf-827d-848a078614a6",k.Chevron_down="a0ba6651-4fe9-4d48-889a-2a46eda6bda0",k.Chevron_up="546c237d-8aa9-417d-83b1-bab6b5e7af1e",k.Circle_checkmark="77febc0d-9d23-4cad-83f3-3debb82386d0",k.Circle_warning="4c3663fa-1e1a-4ed3-ae87-29d7767a873e",k.Clean="c7391fb8-3a30-485a-99ce-316fbecce06a",k.Close="08405a8f-4f87-465e-b694-f9b71b598885",k.Delete="3b551a31-d4bc-4215-b00d-00e26a91f515",k.Down="45a7df0f-869f-4672-8abe-6180103cbd71",k.Edit="5c7b9aa4-3413-4233-9a0e-21d404d07d76",k.Emerald_medium_active="19e554ae-1e0c-4ae3-9656-07f87ca73d14",k.Emerald_medium_default="38096a59-f92d-4cfe-919b-66a61fc26e88",k.Emerald_medium_hover="4c807809-4796-4bfe-b7dd-a89a59fc8e51",k.Expand="0480e4de-4331-47ef-a708-7366081bbc25",k.Gift="03ec12b6-9c85-4a76-ad79-a5f0aca5cf63",k.Info="b401a7d3-a8f0-42e9-b9fb-e5d74089fc75",k.Left="e7a24859-a18a-4889-b3db-ca33a12ab7f7",k.Lock="2d10927a-1bd3-4524-b34a-96ed4af97a35",k.Marble_medium_active="3b0905cc-92c6-450b-a6bc-21fdd41374ec",k.Marble_medium_default="076b37ab-055f-4198-aea9-a5eb024c8a20",k.Marble_medium_hover="2cc809a1-4591-4883-9ed6-d88fa9821c4f",k.Minus="679ea543-fc5a-45f1-8b6d-9b7f55c9108c",k.Move="66be330c-d375-4210-a79b-c1b18e2bcab9",k.Music="14cbd6b3-652d-49d8-8105-df23faf62d98",k.Notification_badge="a4584ae3-d562-4b56-be28-289f8d64038a",k.Paper="fc5623a4-88cf-41ea-9c53-40370bc8b6d9",k.Paper_small="4608462d-d1e7-4187-99cc-e6ab0dbf13c1",k.Paper_small_arrow="a5bfeba3-254f-4747-8a75-d8d9443984a8",k.Pause="f69469cd-13e8-4359-935b-22175e89dc0b",k.Play="651cd102-a21e-4490-82e2-64a9046b1090",k.Plus="e524f1eb-1246-4c6b-9d83-2bdb42399fc7",k.Progress_bar_medium_inner="bfb9cc0e-f464-4b6e-a442-ef3ad5024df2",k.Progress_bar_medium_outer="df4a56a7-82c1-414e-9aa7-00db86f2ff26",k.Question="05723c11-96e7-4d22-b757-f40d7a6e436c",k.Right="d1a40282-cd64-4b27-9b77-859f19e213a0",k.Ruby_medium_active="194de295-67b4-45f7-9deb-5b1a685bb129",k.Ruby_medium_default="5a234c6b-cde5-4d66-a649-a4ada4f930ee",k.Ruby_medium_hover="6766da3c-6f86-498b-b8a8-630215706018",k.Sapphire_medium_active="d2d9d739-d22c-45c6-9c26-a0ce202eea70",k.Sapphire_medium_default="47dd9b87-6f11-4c78-8784-e1a065f292ae",k.Sapphire_medium_hover="c9ad9712-c6cf-4859-b455-8a6caab6d7dc",k.Settings="e7f32586-8bd9-4456-ba94-f628b126c8a8",k.Shop="5c7c6983-e0e0-4f12-aeae-d8cb9e694d05",k.Sparkle="0dae1bfa-9168-4c81-8296-ac0e5f496a09",k.Spin="6bf889f5-a846-49be-aefc-53de7d916fde",k.Stone_medium_disabled="47842fb5-d14e-487d-8311-f735190d27e0",k.Tooltip_arrow="b53183c0-bf22-4fd4-9c87-a09be3ae393c",k.Tooltip_background="cd9f7600-6633-4717-b4ac-9d785f2c43e9",k.Trash="b73b691c-1fad-41ad-bd21-d504cc66f5f5",k.Universal_scroll_bar_slider="c43d0835-7cb7-47eb-bc5a-301b578fa0b6",k.Universal_scroll_bar_thin_fill="28395da7-146d-4313-b563-44ce3cf23ca0",k.Universal_scroll_bar_thin_slide="fee8a769-8dcb-4f36-b848-aa0e6e6f9b78",k.Universal_scroll_bar_thin_track="bf4eb3b1-c21c-4117-ba70-c879037d7d63",k.Universal_scroll_bar_track="0964859c-7adc-4888-b781-88bafd182013",k.Universal_scroll_bar_track_fill="15125dcb-acfe-42c9-a31b-8119822deb5c",k.Universal_scroll_bar_wide_fill="ab6d7fff-3bcb-401f-b4a2-8fe67cacbeee",k.Universal_scroll_bar_wide_slide="ad6f3e06-68e6-4002-b278-2d27b47423ad",k.Universal_scroll_bar_wide_track="ecee181e-28b8-4167-9eb4-be10150e55a5",k.Unlock="81914f8b-7dc3-42b0-9bcf-6545ae1eaca3",k.Up="dbe1f3a8-3e0a-4860-8dd4-4fb6fdf8b730",k.Volume="2135385c-c6cd-482a-9d00-534c0bd4dc8f",k.Wood_small="8b35cd44-ded6-48ec-a5fd-6c1ea7af198d",k.Wood_small_hover="23d7b67d-3213-4cc1-8953-485b4c2c9a0c"}(F||(F={}))},79998:(k,B,U)=>{"use strict";var F;U.d(B,{u:()=>F}),function(k){k.Card_gear_mini="9451a72b-35b5-4520-a19f-ebdbd4e9b79a",k.Card_gear_mini_empty="1b5d874d-000b-482e-a04d-85ef0d899a3d",k.Card_outline="41806707-f982-4e02-b50e-5756b7f11f74",k.Card_overlay="495f94ac-4030-4421-8888-dbde5b08a8ae",k.Change_icon="b82a0a51-e67d-479e-a01e-6ac1c8ae0161",k.Empty_slot="ba33cde8-a277-46a6-adac-a0ef7d3b96a4",k.Gear_bg_small_common="6e0849d3-8851-4e18-b3b9-d9e642604ef1",k.Gear_bg_small_heroic="d6f08696-b35b-486a-9ea6-a2110beddc4d",k.Gear_bg_small_legendary="3f9463e8-7550-4c95-9231-c838c1fd24ef",k.Gear_bg_small_rare="668a63e2-ddef-4c5a-81bf-b92ebc36acbb",k.Gear_bg_small_uncommon="5dacc18c-04ed-4790-b05c-790cdc7d36db",k.Gear_slot_small="0d03daba-91a0-4f0e-87b1-2acd557060b6",k.Icon_gear_boots="0b178835-e2fc-432a-9728-b6fbfea6091e",k.Icon_gear_buddy="82322c96-1611-479f-abb5-9bf8e7d3b65e",k.Icon_gear_hat="138d6852-a1e1-42c5-9457-bdef12678314",k.Icon_gear_mount="09344c5c-9c34-421b-842c-ad3d02861879",k.Icon_gear_outfit="adfa2804-c0df-4158-8ea8-bf69d1715b6d",k.Icon_gear_pet_hat="8adc1ca8-607e-43fe-98a3-e2d0a6137e3c",k.Icon_gear_pet_relic="b8caf254-84cc-4c09-8e19-6064377ca580",k.Icon_gear_relic="c6a5ccbb-7c55-49ba-bf5c-eeec195008d9",k.Icon_gear_wand="948ea863-fc01-4492-bba4-6c4c918bf334",k.Icon_plus="6a0b4863-7c0d-4bf7-97b3-03e1f40fcf2b",k.Info_btn="3fe118cc-6c7a-4249-821b-626d945f18f5",k.Label_bg="6bdd2cff-d715-46b5-b8d2-de684585089e",k.Merge_bar_full="66a66541-5dde-4603-8151-5b6c8958eb60",k.Merge_bar_max="8a4fe42c-eafe-489e-8936-55496e7bff0c",k.Merge_bar_progress="b1b3a5e4-ef78-4a17-a233-6c2cab9de11a",k.Merge_progress_bg="ebccd12d-be8d-4565-9728-ca7055e6d4e4",k.Pet_card_bg_bw="1a6d89c8-d9d6-42e5-b191-5eb5283695c8",k.Pet_card_bg_common="a1f245e2-07ed-4b09-8447-9776abb66a90",k.Pet_card_bg_empty="2a7fbe24-901e-4dc2-85ca-fae23a5fcb59",k.Pet_card_bg_heroic="422491a4-1c89-4a7e-ae1f-e19eb48441ac",k.Pet_card_bg_legendary="a388eda8-e6eb-4311-bd17-d258c157c0f2",k.Pet_card_bg_rare="6fd5faf3-67ca-43bd-959a-ee2c00ce451e",k.Pet_card_bg_uncommon="7c6a358d-e248-4316-9f30-a87afb1223ea",k.Rarity_bg="e3be89b5-2232-4de8-9a1d-44530d67e041",k.Separator="4dd74269-2a5d-44f2-b404-7a4de6bb8675",k.Swap_bg="97c369fb-924e-40d2-8ce4-9ddff0f6a009",k.Transparent_overlay="4c1b2629-e435-4b95-9a13-602f4768ce3f",k.Transparent_overlay_white="a4a1037a-88b6-4eb0-865e-5d863c3047b3",k.Treasure_track_icon_small="96ea0f9e-c9de-485d-aa4e-f38de08b9bbf"}(F||(F={}))},82351:(k,B,U)=>{"use strict";var F;U.d(B,{B:()=>F}),function(k){k.After_school_widget_ftue="1b6e6c51-d240-492e-a925-f8410959cdc4",k.Battle_pass_auto_collect="7f36b3c7-6170-4c2e-ac4e-462c31d7a654",k.Battle_pass_quest_claimed="ca291626-09ef-4ee3-8296-91d7fcd1aab9",k.Battle_pass_reward_claimed="53b62d77-706b-4fd7-9722-c4887d85643e",k.Bg_bossbattle_firefly="06a98d53-59c7-432c-b83d-29338229c5f0",k.Bgm_battle_astral_dragon="44f370ee-ca77-44d4-8b09-12309448fdc6",k.Bgm_battle_physical_dragon="39410388-e2fa-4b84-b658-65414051ac8a",k.Bgm_battle_puppet_master="1ab522b3-ab89-4565-8598-a0fd2dc67aff",k.Bgm_battle_shadow_dragon="a8d72c5d-5447-4cde-ad75-be94f8a34945",k.Bgm_puppet_master_ambient_loop="583f384f-cd89-4528-8d99-b8008750dff3",k.Bgm_puppet_master_victory_loop="3d1444c4-0ef5-4544-b0c9-8b0df20da045",k.ChargeRemoval_Noot_001="879e0501-e3a7-4402-a80d-88290f8c73e5",k.ChargeRemoval_Noot_002="824202f6-a7da-4554-a4aa-6723f7bccb67",k.ChargeUp_clean="5ce26997-a727-4d2d-8da4-20c0e8ee1e24",k.Dragon_1_battle_intro="b4c12a81-7e0a-4c5b-9779-51b16c1a337b",k.Dragon_isle_reveal="b082b1c8-fe70-4de9-8dcf-15af44a86875",k.Dreamy_drop_2="f433dcb0-2ff6-46bf-8b52-f2ee9f0b86c7",k.First_dragon_defeated="13b9ea19-28e8-4e7c-9491-f2aac1ffd62f",k.First_dragon_orb="cc629e5d-6ea2-48e9-853e-5950d143aa03",k.First_dragon_rift="41210811-ce8b-455d-a403-633bd4485b48",k.Loot_dash_background_music="ed985314-6121-4076-9585-0c925ed4f9ae",k.Loot_dash_endgame_match_completed="89cd123e-b1a3-4cf9-b998-cb6e21fa7847",k.Loot_dash_endgame_placing_screen="24f133f9-f1c9-4ac2-9b72-2aa823bb62aa",k.Loot_dash_loot_bag_added="4062114e-dff0-4732-b2e0-dbac0dfb530e",k.Loot_dash_matchboard_done="56b7d72c-acbd-49ff-9cca-48adc0eb5293",k.Loot_dash_matchboard_move="4335687a-b815-4d58-9deb-d7b73592a1f6",k.Loot_dash_math_streak_complete="391128ae-1c31-40c2-b2b7-fb4a18cda1b1",k.Loot_dash_math_streak_increased="a2f987b1-6e57-4430-91c2-ceef0d2095da",k.Loot_dash_math_streak_reset="e57f8d5d-16a8-45a2-a268-7c3db3fc68dc",k.Loot_dash_revive="4b65b7b8-e5a8-4f76-9c89-46e8a89bb601",k.Loot_dash_stage_intro="f297f3d4-0f68-4799-b663-9fe18c12bb4c",k.MainVOFire_BTS2023_Voice_Pippet_PuppetMasterAppearance_Bonfire_100="b6e84fe3-10b4-4aa3-94f5-b49cc5e79b92",k.Post_first_rift="0a9cdf59-00cb-4176-9151-d035c21bc19a",k.Post_first_rift_key="2b3d515d-35cc-4926-8da9-970cfd6b6272",k.Post_pm_visit="fd42e4c9-4f1a-4828-bee0-cf32e114072b",k.Pre_pm_visit="ba3139f7-3550-4fb8-935d-e1811dd65159",k.Sfx_CloudCoverAnimation_V2="48856d82-dde5-498b-978f-5246c31464c5",k.Sfx_Cutscene_PortalClose_V4="d9a46c98-a80b-41b3-b741-426627f4c36d",k.Sfx_Cutscene_PortalOpen_V4="c74e9088-d3cd-46c1-a89f-13cf2857fb39",k.Sfx_Cutscene_PortalStuck_V4="d721028f-f1ab-4b0b-8ff6-d475b98b89b4",k.Sfx_Cutscene_TimeTwisterLost_V4="92457ef1-9ed2-4869-ad11-0f39cc4dd987",k.Sfx_Dodge="365b8bdd-3b43-4502-bf1a-159adc784baa",k.Sfx_Wyrm_Roar_Double="acdd5caf-1295-4f4d-bb5a-574f494ad397",k.Sfx_Wyrm_Roar_Double_IceMagic="e0243032-93c6-4312-ac9f-1b3f4e278004",k.Sfx_Wyrm_Roar_Single="6308374c-9301-4ed1-b57f-a94ef062b0fa",k.Sfx_Wyrm_Roar_Single_IceMagic="e0d9554e-4e57-4791-be3d-c8e3ba6d0be9",k.Sfx_academy_keystone_activation_sheen="8b991c45-f7d5-4b47-97ce-88ab425f6a6a",k.Sfx_achievement_fanfare="aa25a8d4-1b8a-4378-b0c1-7795f66a73c9",k.Sfx_astral_dragon_spell="b7f0e183-db81-4203-b99f-022cfbbd166d",k.Sfx_bomb_astral_v02="eb514caa-dafe-4e7a-a7f5-a169f43a32f6",k.Sfx_bomb_fire_v02="ad5a26b8-cceb-48ac-bc8b-fdb110511a15",k.Sfx_bomb_ice_v02="4882da74-146f-42a9-a04c-1561c0b91015",k.Sfx_bomb_plant_v02="c7b13264-f4b3-42e2-81f0-a3533720f90e",k.Sfx_bomb_shadow_v02="7ec1c6a2-c9f9-416e-a544-35ef7f427ded",k.Sfx_bomb_speedup="1832ee30-bd24-4d00-8520-fb88fb1a57eb",k.Sfx_bomb_speedupx2="80598706-7901-49b9-99db-98c2be8713af",k.Sfx_bomb_storm_v02="d54fc353-78d8-47b7-aa20-7e51f27c0487",k.Sfx_bomb_throw="52506ff0-ff39-4c7b-a62f-d1f9f230794e",k.Sfx_bomb_water_v02="e6c56493-053c-41c7-a37e-d23bfa99d722",k.Sfx_buff_defencedown_v02="671ff6e0-7d79-460c-896d-7c718c0812e8",k.Sfx_buff_defenceup_v02="21ef83ae-84e9-4fdd-bb4a-466f82667ec6",k.Sfx_buff_powerdown_v02="7ed6a8e0-5b40-49eb-b454-cbef1d52b286",k.Sfx_buff_powerup_v02="8eb1d383-d71b-490b-917f-798ecaa0a01e",k.Sfx_buff_regenerate_v02="4d6b4b51-1ecc-4b6a-9dd4-ed2bcc4ef31a",k.Sfx_charge_lost="13d45a54-8ac2-4aa3-9fcc-7f83e3541850",k.Sfx_charge_up="087084e0-572c-4b67-8c6d-90c78a5304cb",k.Sfx_chargedLevelUnlockSequence="58325603-6ed2-46a5-9f41-eb306825c4e3",k.Sfx_charged_levels="a78f8de2-ff90-42f2-868f-e6b40a222132",k.Sfx_charged_levels_unlocked="4423df87-50fb-46d5-ae8d-add3b4f59d9a",k.Sfx_critial_hit="29a72e9b-f3fe-4531-b8cc-1239245fab0b",k.Sfx_daily_login_calendar_reward_collect="34a282a1-0b03-45eb-a73e-5966cc7c08cf",k.Sfx_daily_login_calendar_reward_state_change="2afc773f-4784-4562-82d9-edc813bac5f6",k.Sfx_damage_astral="963fb6c1-a50d-4bb1-989f-ca68eeb472a8",k.Sfx_damage_fire="325a747b-0d8d-4071-9a95-a65fdc3dee99",k.Sfx_damage_ice="e36bab4f-3803-4c49-9cd7-57f0b1bb9966",k.Sfx_damage_plant="3b7bb3bb-1a90-4626-b568-f8678cd90b0b",k.Sfx_damage_shadow="83dcc56b-b8d2-4681-a296-2553343f803e",k.Sfx_damage_storm="47db30c9-34d7-44c4-a3d2-b0171561521b",k.Sfx_damage_water="201be481-09c4-4d55-b7d9-b1af3f30fb46",k.Sfx_dragon_isle_celebration="02d35327-173c-49fb-9d1f-9f4add37c15c",k.Sfx_dragonisle_dragon_defeat="b4fd7861-9fab-4172-a0cd-4765aeb8d07b",k.Sfx_dragonisle_dragon_roar_attack="a6a77f79-e8ab-46cc-bcd1-697cd0c970bf",k.Sfx_duels_personal_best_win_streak="5f5a2f31-0b34-4ef5-bbd6-593f776ce21e",k.Sfx_duels_win_streak_badge="bc7df9fc-679e-4db4-9941-3bcf642671f1",k.Sfx_empty_mp="03ee47ea-8e0a-4983-ba38-5043f221c990",k.Sfx_fire_boost_screen_overlay="42758484-a8ec-4c7a-a750-71b4a5955fe4",k.Sfx_fireworks_celebration="495eeb5b-45e5-4cdb-ae0d-36e831486c09",k.Sfx_fumble_poof="a900850d-09fa-477d-900f-7119614e7030",k.Sfx_gift_astral="a0d89704-27dc-44d0-ac35-19fdfdccbd6e",k.Sfx_gift_dark="c3af7530-f6ce-4ef9-8e36-b891d8b41d72",k.Sfx_gift_fire="2ed350c2-eb51-49e4-b796-dc5d78b291d4",k.Sfx_gift_ice="a15674b6-9f63-40b4-97f5-1dad04b31824",k.Sfx_gift_plant="c8ad9187-7e97-4883-a3ff-12573ab6fda7",k.Sfx_gift_storm="9d1e1bb3-2f1d-41b9-a78d-92a4b12b4648",k.Sfx_gift_water="542eabbe-f80c-45b7-a1fd-024c391e92b2",k.Sfx_heal="2ec522b6-315d-4402-9b8e-3f38e7ef2aeb",k.Sfx_hud_icon_notification="113196a8-911a-40e3-9ecf-193b9fea0318",k.Sfx_ice_boost_screen_overlay="3246ae9b-7fe9-4792-ad92-58f133b26e8b",k.Sfx_large_explosion_with_glass="11c9caa1-e418-4e28-a1b1-0558e8e5bf5e",k.Sfx_long_explosion_with_rubble_A="bca8ac0f-1eb0-4210-92e6-ebd062a0a0ed",k.Sfx_long_explosion_with_rubble_B="0e1ad5d7-d229-45be-b59c-1cd343209089",k.Sfx_magic_poof_story_unlock="bff7dfe6-2e8f-4273-a4ce-1b6c41a3b4e6",k.Sfx_medium_explosion_with_rubble_A="9ea87f5b-b10b-416b-b98a-c422a5b5ba4c",k.Sfx_medium_explosion_with_rubble_B="b768cf01-0dd3-4bc9-8f8d-2bd1712ee649",k.Sfx_mp_refilled="fe8a74ff-944d-4f15-9c75-2dc352c02e97",k.Sfx_pbf_levelup_barfill="a2e4be60-1a60-4265-be70-7e5119977e19",k.Sfx_pbf_levelup_dance="45c78a1f-8d12-4227-b52b-14e907c538a1",k.Sfx_pet_merge_badge_transformation="96e8c480-6aea-4278-8177-3254c3770b1d",k.Sfx_pet_merge_beam_effect="8631acb7-a542-4d74-aaa7-0463b19af746",k.Sfx_pet_merge_card_transformation="769d8854-5b71-4d08-98be-ae5ef9857dce",k.Sfx_pet_merge_stat_transformation="56b28d58-b2ae-4115-827c-2c3b1897b0a9",k.Sfx_physical_boost_screen_overlay="d9e85b3f-9e4a-4e4e-9091-e82b9ba6cd0e",k.Sfx_physical_dragon_spell="4482ed8c-c9bc-4dbd-9466-3596c2d4169c",k.Sfx_plant_boost_screen_overlay="da50ef8c-aa86-446f-af8c-a99df761f76e",k.Sfx_powerful_hit="9bd1e922-875d-49e9-a953-ab048518bee2",k.Sfx_puppet_master_battle_ground_rumble="f923d7e3-5a96-4cc1-b512-a3ec70d4bf90",k.Sfx_puppet_master_battle_heavenly_harmonic="261670ed-eb91-4641-87a7-4f719d7568e8",k.Sfx_puppet_master_battle_keystone_flash="e0bffeef-947e-4f5e-b176-039645c683e4",k.Sfx_puppet_master_defeat_animation="442ee09b-b2a6-47de-8c6a-e6fa56aa030a",k.Sfx_puppet_master_spell_beam_impact="6223c671-ba33-4238-a059-ffd20483453b",k.Sfx_puppet_master_spell_beam_travel="75162d65-4342-477c-8ee5-74a4eeb774da",k.Sfx_puppet_master_spell_cast="d8e81f70-40ed-4a83-a8d2-ccf24d793bfc",k.Sfx_puppet_master_spell_downpour="60c46051-2bd3-4974-8188-bec5e549d230",k.Sfx_puppet_master_spell_map_transition="323a3664-0bae-442a-92d5-9e169eea37db",k.Sfx_puppet_master_spell_mp_drain="795b305d-83b4-4b7b-b617-134aaf96b36b",k.Sfx_puppet_master_spell_pet_steal_travel="e6b95d05-880c-4c10-9bc7-8cd52b503e59",k.Sfx_puppet_master_spell_volcano="5e2781fe-35f0-4a4b-9d19-5c6f665b7100",k.Sfx_resist_hit="1f6ebb67-5ed6-44bd-b887-13a5e9ff647d",k.Sfx_segmented_offers_last_chance="64ff2326-f2f3-47c2-bb71-9552946c44ee",k.Sfx_segmented_offers_open="a0ebb0f6-5cd7-4a88-8754-d4c628944750",k.Sfx_segmented_offers_sustained_bgm="d7fb4948-40d9-4d3d-846c-5c41a440ddd2",k.Sfx_shadow_dragon_spell="7711492f-0390-4557-aff7-356d89c0926a",k.Sfx_short_explosion_with_rubble_A="88ba375a-8de1-4320-933f-bd0198106e81",k.Sfx_short_explosion_with_rubble_B="35a4b330-7714-44ac-851e-acf5ac5f9d2d",k.Sfx_spell_card_hover="2e797110-6b72-4361-99f3-f3ee49bee730",k.Sfx_spell_card_select="3f6ec21b-74bd-4e28-9505-6b1811345595",k.Sfx_starter_pet_charfoal="1e5794eb-7343-4042-b9da-ce24fedbb105",k.Sfx_starter_pet_interaction="c30b9ef8-4c17-4742-8f8e-5032dc62cebd",k.Sfx_starter_pet_mermina="0475b18e-7be4-4543-8551-52d2d48d2a2f",k.Sfx_starter_pet_snowfluff="ece27950-944d-42fd-b0ad-2820c3289de0",k.Sfx_starter_pet_sproot="955f3300-aa46-4d00-8717-f36619a6f090",k.Sfx_starter_pet_wott="4a67772e-0b06-46ca-91ca-278853bb8964",k.Sfx_storm_boost_screen_overlay="f1c2b6ca-e50a-498f-a29f-6f136869c711",k.Sfx_teleport_defeat="6dbbcaa4-b8bd-40e3-b0c0-3e0b557eb328",k.Sfx_teleport_rescue="be56192c-8cc6-42de-9cec-84e4b7ea86fa",k.Sfx_unit_buff_positive="cb678bc1-f52d-4a26-9bc9-4f449eb4480c",k.Sfx_unit_select="e8aa3107-ae70-4d1b-b9d4-ac615430d795",k.Sfx_unlock="5ad36ecb-b0c4-4449-a7fa-df9ffce57c6e",k.Sfx_upgrade="c246fce8-2d7c-4174-9d34-78f7d53ae91b",k.Sfx_vs_animation="58a44645-a223-4668-b9d8-69a387302642",k.Sfx_water_boost_screen_overlay="af8393c7-1de9-4257-ad65-6b8546047fda",k.Sfx_wizard_team_teleport="5ae1ad0a-4a08-4213-8dd3-c935db30c85f",k.Spiritual_power_up_2="acc367b5-f20e-49fb-9805-5c14db2a3080",k.Voice_10_103_magic_refilled="e449016c-7be5-4910-a36c-0773c6394a01",k.Voice_10_104_powerful_hit="441e8cf1-2fbd-4ddd-a479-58674dfd9f39",k.Voice_10_105_rescue_charfoal="0530f6b8-c6bf-4289-94c6-5393be396579",k.Voice_10_106_rescue_mermina="3fd24e11-6833-488d-a423-4eb8e49366b7",k.Voice_10_107_rescue_snowfluff="cc7f5ea6-91e5-4271-a208-5f2ea4f9b14a",k.Voice_10_108_rescue_sproot="31cfe69d-f8be-496f-85d8-798752eb02a1",k.Voice_10_109_rescue_wott="022bf41a-42d0-499b-876e-edefe5d1085d",k.Voice_10_110_rescue_now="84c8c24a-dcdc-4225-8aca-83b2bf883558",k.Voice_10_111="5fed2359-c9c4-47ea-bea5-48e6e6d13b2f",k.Voice_10_112="225a54dc-3ddf-4750-9abc-a164927fc2e9",k.Voice_10_113="c33299df-0666-4979-9161-bf3f24be6b29",k.Voice_10_114="027cb958-1982-4c7f-b95d-dc8ac6d8ddcc",k.Voice_10_115="8671bfab-9f89-4fd4-9e05-0d543cf1f15d",k.Voice_10_116="6ad06bed-0669-466a-b4e4-e31543f53f3f",k.Voice_10_117="e907829b-e167-4a74-a007-43560ed75270",k.Voice_10_118="800500cb-684b-419e-b760-3509c1005d58",k.Voice_10_119="69dac330-b34c-4377-bd30-8c3b058dabb2",k.Voice_10_120="16a006ef-3ff4-4a99-a5e8-3233d9b04edf",k.Voice_10_121="1c56f26c-41ae-4a0a-9f57-8161113d3f8f",k.Voice_10_122="a970da72-55ac-4b05-94ff-40c692780aa8",k.Voice_10_123="e561eadf-4ac2-4d7d-9001-1907d72005bc",k.Voice_10_124="e56685ec-c7d1-4b9d-938f-7975971903ac",k.Voice_10_125="cdeebc0f-82bf-4429-857d-3eb0be818de2",k.Voice_10_126="44e890f4-0feb-4663-8e49-ac5e6891620a",k.Voice_10_127="7634c6d6-ce66-4e1c-bdaa-da2be3dcd637",k.Voice_10_128="1125c828-9049-4abf-85cd-fbac58c430b7",k.Voice_10_129="baff6336-5765-49f3-a298-b8fa332d3a00",k.Voice_10_130="2e19de25-d150-4699-a07c-63c36834e475",k.Voice_10_131="57e45b36-f1a0-47ae-9212-191bc05c35a8",k.Voice_10_132="e88afa2d-6067-47f0-a04c-5f738f0d56b8",k.Voice_10_133="3c827543-fe8a-4b85-a5a0-34061e3ce529",k.Voice_12_19_broccolina="c1f7586d-1f6d-4ca5-8829-b759c59c02b7",k.Voice_12_20_broccolina="bf1a7246-85f7-4665-b70d-23a9729d7053",k.Voice_12_21_benni="9b0bcfd8-a1a8-4f71-956e-9aa87ce9b1ec",k.Voice_12_22_benni="d508018a-3cf4-4cbd-a3d1-7d129ff1eb28",k.Voice_12_23_benni="afbce6a6-3e75-4de8-880d-a7b8253527be",k.Voice_15_19="6816e7a6-63a4-41a1-9637-4863dcba0782",k.Voice_15_20="a5718ce4-583c-4356-bfb2-19a888ddf885",k.Voice_19_2="ac48a4ad-7d5b-46f2-bece-b2a8a701f6f5",k.Voice_19_3="1a151de2-c971-4d84-9272-d3ed4fc5cad5",k.Voice_1_16="c7180562-df7b-4414-8362-d9d82f060009",k.Voice_1_17="451ae0cd-e14a-48d1-8679-fcca6e9e80ce",k.Voice_20_10="38298832-8279-4404-a76b-0bb59d676cde",k.Voice_20_11="fc235967-d1ff-480b-8072-4902cc25b382",k.Voice_20_12="cc1a64e9-f71b-47e2-86f1-c0e5a2b3ff11",k.Voice_20_13="ed73f7e4-c246-4da8-93d3-f5206093928a",k.Voice_20_14="c5a57936-e233-45a2-b80a-c588997862ad",k.Voice_20_15="7fb5ce1b-a671-47ef-868c-b248bbe84c40",k.Voice_20_16="02934b65-8bf1-4feb-8ced-d49dc0bd1c2a",k.Voice_20_17="4b165a5a-078d-40f8-a678-3f659d2be68d",k.Voice_20_18="11a271ae-4ebe-456a-9665-f9c7920009fd",k.Voice_20_19="8af4d3e7-1d06-41df-aae9-fe71d06faba0",k.Voice_20_20="f60fc029-a665-42f4-ba5d-0eefceade421",k.Voice_20_21="dbea3392-a31d-44e0-984e-f6d8d92c846b",k.Voice_20_22="b8a58514-f95a-4768-9e2d-ee3c074184e1",k.Voice_20_23="a88d369d-69cd-4ca0-92f3-30c44d4fbc9e",k.Voice_20_24="430695cf-627c-4a38-b7a9-75fdbd363937",k.Voice_20_25="7c77fa42-16f0-4a2f-acad-10961affde94",k.Voice_20_26="1125cc46-c607-4241-b61f-499a1e841509",k.Voice_20_27="6fba3843-ecc2-45a3-9743-205954ded9c0",k.Voice_20_28="db847682-da08-4e78-af4d-2894ffb7d666",k.Voice_20_29="a24232f5-9e20-4295-890f-170c40ad297c",k.Voice_20_3="f6180419-bb0b-4d87-aa26-6e533747efad",k.Voice_20_4="2698951e-dd19-4ec9-a316-0202db6e69f3",k.Voice_20_5="2d476014-9e22-48b9-bbcd-413f8b606ffa",k.Voice_20_6="faf3b96b-0bd5-415c-b3b1-661b1da4e805",k.Voice_20_7="29e29cee-18d6-4e16-a66b-01d4242a207a",k.Voice_20_8="cabcbd43-7b4c-45f9-a487-1b9ab2b3cfd4",k.Voice_20_9="6e83295b-417e-4cc6-b18c-5bedf73e64a7",k.Voice_27_2="3b163ad9-c7e7-4b09-b115-845f83beb625",k.Voice_27_3="20833965-09a1-4026-bc2f-c681b9024682",k.Voice_27_4="4cac7a05-e830-4f8f-a609-d9f77dc251ce",k.Voice_42_1="1418aa4c-db9a-446a-881e-51eaa1dc8d26",k.Voice_8_15="24a87b64-fc3b-4e20-9306-d84470080516",k.Voice_8_16="fe0c6952-0282-41ba-9951-e6ffa70f6be1",k.Voice_Act1_HardModeQuest_Noot_first_entry_1="e62edb53-2c5d-407e-9985-55c428d4eb39",k.Voice_Act1_HardModeQuest_Noot_first_entry_2="576df7bf-84f2-4c2e-9599-6af05ba5dbfb",k.Voice_Act1_HardModeQuest_Noot_intro_1_no_charge="fb3c6abb-6d48-4f31-8dca-1e0a0b5fbdd3",k.Voice_Act1_HardModeQuest_Noot_intro_1_with_charge="78be9a03-5bb2-4364-8af9-1bd49ab78cb0",k.Voice_Act1_HardModeQuest_Noot_intro_2="177f1fe3-096e-4b20-b3a0-65351bcdcef8",k.Voice_Act1_HardModeQuest_Noot_intro_3="d7e0275d-2149-4432-b91d-438c4c7fc8d0",k.Voice_Act1_HardModeQuest_Noot_intro_4="07b3c465-da2f-4472-81f9-557ed0cd4c63",k.Voice_Act1_HardModeQuest_PuppetMaster_01="ea58d380-a099-4251-bd38-a3bcce81186d",k.Voice_Act1_HardModeQuest_PuppetMaster_02="10ce55c6-de14-4f2b-a969-dd7aaf370d76",k.Voice_Act1_HardModeQuest_PuppetMaster_03="86e9e2c3-9d47-4225-8a95-b764e0e74166",k.Voice_Act1_HardModeQuest_PuppetMaster_04="723d9b13-2eda-46b0-92cb-c124847498de",k.Voice_Act1_HardModeQuest_PuppetMaster_05="b6e7e6fd-2c88-4812-a1cf-18c7814b952a",k.Voice_Act1_HardModeQuest_PuppetMaster_06="d6e16f3c-dcc5-4313-a8fb-f0629edb2080",k.Voice_Act1_HardModeQuest_PuppetMaster_07="9c0ce2a8-9856-41c0-aba6-9833ef04319a",k.Voice_Act2_ExpertModeQuest_Noot_02="1464f501-f524-4d97-a2b5-3ca172a330e7",k.Voice_Act2_ExpertModeQuest_Noot_07="1c2fdd4c-ca72-43c3-8806-4edd4441d64e",k.Voice_Act2_ExpertModeQuest_Noot_08="dfd40f36-ca09-4b8b-92a2-be932c1e29b4",k.Voice_Act2_ExpertModeQuest_PuppetMaster_01="dfbf4390-bc6f-4f58-9a2a-d75520a4c0fd",k.Voice_Act2_ExpertModeQuest_PuppetMaster_03="1d0a5003-5b19-4b02-9597-4b213c087c9c",k.Voice_Act2_ExpertModeQuest_PuppetMaster_04="9ef120c5-8620-4bf4-bdf8-dbf54ab25403",k.Voice_Act2_ExpertModeQuest_PuppetMaster_06="4ef1f1f4-6438-4342-8400-a83c97eaf22f",k.Voice_Act2_ExpertModeQuest_PuppetMaster_07="dd688549-7017-421a-968e-fdd28fcb5a6a",k.Voice_Act3_ExpertModeCompleted_Noot_02="d8018e08-f36c-47fc-8d11-5c4cf2cb0c72",k.Voice_Act3_ExpertModeCompleted_Noot_04="4797db7b-d780-4db3-b7a4-8faeaddb82f3",k.Voice_Act3_ExpertModeCompleted_Noot_05="9d6d26d4-3dce-4f9c-a595-26505d92810f",k.Voice_Act3_ExpertModeCompleted_Noot_06="5f445c9c-a7a4-40d4-9f8f-6906746bcba1",k.Voice_Act3_ExpertModeCompleted_PuppetMaster_03="408711d0-2a2f-4c2a-925c-8c3be3806310",k.Voice_Bok_FireflyQuest12_ShiverchillQ1_1="d1f784c6-5422-4fbd-866c-690a631a60f9",k.Voice_Bok_FireflyQuest12_ShiverchillQ1_2="85836055-5277-459b-81dd-a684a4f3a420",k.Voice_Bok_FireflyQuest12_ShiverchillQ1_3="0a9ed340-d709-498c-981d-d5c8c2790e58",k.Voice_Bok_FireflyQuest4_1="67efb88a-2f59-4f0f-9217-87e798dd8de6",k.Voice_Bok_FireflyQuest4_2="a80cfd70-ffa5-4f64-9d4b-766417b0d008",k.Voice_Bok_FireflyQuest4_3="c7082eba-d2ed-4243-aecc-02fbf61caec8",k.Voice_Bok_FireflyQuest4_4="a6f14ba6-d293-4ff4-b9f1-1dfce99f64f2",k.Voice_Bok_FireflyQuest4_5="a9dfdc42-414f-4e42-a5dd-8d977d3f057e",k.Voice_CostumesFTUE_01="3a23f3e5-556f-42c3-a19b-8c3a3745b12e",k.Voice_CostumesFTUE_02="20597ced-6a00-438c-b21d-e4b39b776a9f",k.Voice_CostumesFTUE_03="3d4a27a7-1692-4a18-869f-145e1d81755c",k.Voice_CostumesFTUE_04="a38c63b3-ba7f-4818-9325-12d05aea3c18",k.Voice_CostumesFTUE_05="4d6c6866-edeb-4748-88ec-dd1739394e99",k.Voice_CostumesFTUE_06="314060b9-e2b7-4f41-8e19-20f788a469f7",k.Voice_FTUE_Noot_01="6201ebba-eb44-4569-a4bb-5b186e293738",k.Voice_FTUE_Noot_02="a56e7520-366f-419e-9a8d-bfbc47bb8dbd",k.Voice_FTUE_Noot_03A="e3743c63-16f8-4a1f-8d4c-1ddb2ad00ad4",k.Voice_FTUE_Noot_03B="e27b0f9e-0766-41cf-ac21-e228bc4ad061",k.Voice_FTUE_Noot_04A="a3ba8c47-055c-4752-a2e0-28fb2b57650e",k.Voice_FTUE_Noot_04B="d0098fd3-c274-4a49-ae0d-3c58e86973d5",k.Voice_Flora_FireflyForestquest3_LoseScenario_47="23120c01-a43e-4f5a-8a8f-4a9b7b0f0c67",k.Voice_Flora_Fireflyquest12_75="4634ac41-5afa-4396-b3e9-6904e98b7c04",k.Voice_Flora_Fireflyquest12_76="e2944bf5-448d-41a0-bad9-089508bca0a9",k.Voice_Flora_Fireflyquest12_77="6d21749a-2c84-4c9d-ac67-20242e2b2fa8",k.Voice_Flora_Fireflyquest12_78="e6b32beb-8766-4d54-9bcd-85eeb95e1233",k.Voice_Flora_Fireflyquest12_79="44dce9a8-0f31-4549-b1ef-a4214de0c669",k.Voice_Flora_Fireflyquest12_80="4d1a1a03-5f8a-474f-a0fa-e7cc67c09ad3",k.Voice_Flora_Fireflyquest2_27="f9bba913-6305-4918-94e1-2b159ca6a6f0",k.Voice_Flora_Fireflyquest2_28="60c02f7e-e53e-471d-820d-ec463eef5042",k.Voice_Flora_Fireflyquest2_29="934cec15-ca77-4b0e-83d0-bf1ed0e14ae9",k.Voice_Flora_Fireflyquest2_30="d7b89d1b-8b1f-40c2-a13c-4551aa820e23",k.Voice_Flora_Fireflyquest2_31="87ca920d-a097-4e07-b0d0-7414a6d8624b",k.Voice_Flora_Fireflyquest2_32="7b1a9932-8b1e-43e8-9a3d-c3522907aa35",k.Voice_Flora_Fireflyquest2_33="b0dd6c68-667b-4773-8441-d20d010b1921",k.Voice_Flora_Fireflyquest2_34="8c20049a-f2c1-4b11-994f-d5ecf3286254",k.Voice_Flora_Fireflyquest2_35="0aa1c7f4-0c0b-4543-af41-21520af2e207",k.Voice_Flora_Fireflyquest2_36="99ad2411-ef2a-44c4-80fe-91a1c6e73d10",k.Voice_Flora_Fireflyquest2_37="e777b487-2ad8-413d-a29b-f91a56ebcf5e",k.Voice_Flora_Fireflyquest2_38="771cc166-fdfe-411b-83bc-428e694eca12",k.Voice_Flora_Fireflyquest2_hard_31="cfbb5286-7db3-4ce0-ba4d-034cff1b33d3",k.Voice_Flora_Fireflyquest3_39="0c09dafe-a083-4450-bea9-98b907d9cec3",k.Voice_Flora_Fireflyquest3_40="a09ea086-132d-4204-8962-989dcc8f4ca2",k.Voice_Flora_Fireflyquest3_41="6e715615-8c75-406f-bf16-1c4a0615fbcc",k.Voice_Flora_Fireflyquest3_42="fd89cdd8-3185-40b7-8a6a-3b852a3a2e7e",k.Voice_Flora_Fireflyquest3_43="ef8438e2-4fd3-46ad-bd04-265dfe419c04",k.Voice_Flora_Fireflyquest3_44="22f427e7-be06-4677-954f-1d2f9666d966",k.Voice_Flora_Fireflyquest3_hard_42="53dac275-1015-4b75-9644-641ddcdc8fb5",k.Voice_Flora_Fireflyquest4_45="dd26c56a-6b2c-4ba2-b9be-aa9c8e4ab083",k.Voice_Flora_Fireflyquest4_46="8134104a-2474-4ebf-90ef-b121663a3881",k.Voice_Flora_Fireflyquest4_48="6d87a34a-590a-47b6-9d95-4eec4e553d7e",k.Voice_Flora_Fireflyquest4_49="9fe03d0f-1c9c-42d3-b23f-a57e0c349a22",k.Voice_Flora_Fireflyquest4_50="c83ea4a3-f619-4ee2-bc75-e2ca76cb3297",k.Voice_Flora_Fireflyquest4_51="edb05f79-5894-435e-98e0-a3240b8a2760",k.Voice_Flora_Fireflyquest4_52="b4b2d963-fadc-47fe-aea9-d522163febbb",k.Voice_Flora_Fireflyquest4_53="c3c5660d-7d12-44de-9fdd-c8cb88295613",k.Voice_Flora_Fireflyquest4_54="7d001523-b12c-4d5e-86f6-ca816251727e",k.Voice_Flora_Fireflyquest4_55="a296b98e-74a2-4ea4-b949-ab2047000312",k.Voice_Flora_Fireflyquest4_56="9ab70530-50dd-4a1e-b49e-a9b764f42053",k.Voice_Flora_Fireflyquest4_57="46749d6c-a7b7-4013-b8ea-f19b8e00af80",k.Voice_Flora_ReturnToFirefly_AfterCompleted_81="e4c81876-f7bc-43fd-a1d8-8a41e89eacef",k.Voice_Flora_ReturnToFirefly_AfterCompleted_82="58bfc0ca-8300-4295-b540-c5a61f5827ae",k.Voice_Flora_ReturnToFirefly_AfterCompleted_83="4d5d87ed-8178-4809-909d-ace0d8ddc8b4",k.Voice_Flora_ReturnToFirefly_AfterCompleted_84="03be6a85-dcd7-4ba9-af1b-ed285b02d7d2",k.Voice_Flora_ReturnToFirefly_AfterCompleted_85="2a925ee8-851f-411c-99a7-de6254256aa8",k.Voice_Flora_oldFireflyquest10_71="4d71da00-96f4-4636-ab81-56dbd071d477",k.Voice_Flora_oldFireflyquest11_72="5e25645d-79f5-441d-9b16-08b66a6e5f86",k.Voice_Flora_oldFireflyquest11_73="20f03f5d-8c65-42a6-b046-ae6008b7b6d2",k.Voice_Flora_oldFireflyquest11_74="bc5c2411-a541-4ada-bb82-005329aee60e",k.Voice_Flora_oldFireflyquest6_58="ccacc6c8-b49e-4e4f-9584-b777757b35fc",k.Voice_Flora_oldFireflyquest6_59="fe1d5e7b-2ff9-469c-b197-9ad90b9fc730",k.Voice_Flora_oldFireflyquest7_60="50c9b7ce-acfd-4ee9-b902-8329fea6d1b3",k.Voice_Flora_oldFireflyquest7_61="f8084421-aaf0-44a2-b5d0-4e6faf33fce5",k.Voice_Flora_oldFireflyquest7_62="2e711397-b298-4f2f-837d-74445d0ac913",k.Voice_Flora_oldFireflyquest8_63="a7850f38-3fb6-4863-9940-6745765fe352",k.Voice_Flora_oldFireflyquest8_64="768bdadf-b2ed-4ebd-9715-8d82585b6c7f",k.Voice_Flora_oldFireflyquest8_65="8ab42f40-8443-4627-b831-5c6bc3ab3775",k.Voice_Flora_oldFireflyquest9_66="37832249-2e54-4281-b7d6-6eea7c2055a4",k.Voice_Flora_oldFireflyquest9_67="306ca9f2-635f-443f-83d6-b4925e3998a8",k.Voice_Flora_oldFireflyquest9_68="0d6b079f-68a4-454c-8418-9ff00d9216b5",k.Voice_Flora_oldFireflyquest9_69="4b0e7a3e-17d2-466a-9080-601813713e3a",k.Voice_Flora_oldFireflyquest9_70="a627c458-b67e-4663-84db-36114935e6f7",k.Voice_Florian_Fireflyquest4_125="793109a0-3767-4bf0-8d76-6cc0a1f75725",k.Voice_Florian_Fireflyquest4_126="0e565471-70ae-4c5e-b708-6f82d2b73ded",k.Voice_Florian_Fireflyquest4_127="5b5249df-0644-4167-864a-5becb343e607",k.Voice_Florian_Fireflyquest4_86="f975045d-ce42-449e-acd4-8d13c71420f1",k.Voice_Florian_Fireflyquest4_87="ca408999-53e3-40fd-be14-fd0b416c3f43",k.Voice_Florian_Fireflyquest4_88="bced7d1c-e488-494a-8ab7-5deefdfbe247",k.Voice_Florian_Fireflyquest4_89="8f10ca92-c408-43e0-bc74-0cbd759f2e31",k.Voice_Florian_Fireflyquest4_90="ca90fd85-69d1-495a-a3fd-e9af9a420db4",k.Voice_Florian_Fireflyquest4_91="366d4d57-6ca1-4919-b5bf-aab9218979b0",k.Voice_Gerald_FireflyQuest12_1="4aeebe34-600b-4a64-9ceb-fc062ba26c65",k.Voice_Gerald_FireflyQuest12_2="92228d81-143b-487f-bcaa-100036cd1092",k.Voice_Gerald_FireflyQuest12_3="6a696e73-b4d4-409b-b853-d7c8df346fe8",k.Voice_Gerald_FireflyQuest12_4="a6664e8c-38b1-4ca8-8941-156ce28b7648",k.Voice_Gerald_FireflyQuest12_5="9df59475-b723-499c-894d-0b0e2ef593cd",k.Voice_Gerald_FireflyQuest12_6="ff4a9d75-a212-41eb-a5f1-015a0dcf26a6",k.Voice_Merchant_Fireflyquest5_128="3641ab5b-c143-40a4-a536-41d0bfa82d42",k.Voice_MoonlightFest_Act01_Pippet_01="265a6280-a954-439c-b47c-822e4ed9c586",k.Voice_MoonlightFest_Act01_Pippet_02="0f255991-396e-4d42-80a3-e3a10f613c52",k.Voice_MoonlightFest_Act01_Poppet_01="21431f24-2e66-49a3-ad6c-52480dc70192",k.Voice_MoonlightFest_Act01_Poppet_02="a55b9d82-2a2c-46b7-b291-594750b50dd3",k.Voice_MoonlightFest_Act01_Poppet_03="0ef59fd1-e11a-417f-bfc4-c4dbd629d5d5",k.Voice_MoonlightFest_Act02_Flora_01="e75a6f1a-20f2-4e91-83ad-76ed7dbc7ce1",k.Voice_MoonlightFest_Act02_Poppet_01="7e378243-c2c3-41b5-89d2-f03666c23bb2",k.Voice_MoonlightFest_Act03_Bok_01="09d0236d-379f-4de8-af2b-6a71b0f3f6b2",k.Voice_MoonlightFest_Act03_Poppet_01="6fed54f5-deb7-4b9f-8d6b-b6f8db9a83ce",k.Voice_MoonlightFest_Act04_Harriet_01="8246268a-f175-40d7-b2ab-e407295c303a",k.Voice_MoonlightFest_Act04_Poppet_01="5a33d8d6-c12b-4152-a393-7238b5665b12",k.Voice_MoonlightFest_Ending_Poppet_01="1a7f02f6-c143-4d89-8885-4194bec22bba",k.Voice_MoonlightFest_Ending_Poppet_02="5ae5d1fd-5014-4806-a444-e32e89a008f0",k.Voice_MoonlightFest_Ending_Poppet_03="93457007-5f7d-43b9-9e54-0618bb180747",k.Voice_MoonlightFest_FinalEnding_Pippet_01="a93a38aa-3ad5-46e5-8747-7dd5d1af29af",k.Voice_MoonlightFest_FinalEnding_Poppet_01="348a715d-a622-425a-a391-ce1ef9701956",k.Voice_MoonlightFest_FinalEnding_Poppet_02="be3e7c5e-7f50-4dc1-9ce7-0d2fcad27f2a",k.Voice_MoonlightFest_FinalEnding_PuppetMaster_01="ae757e3a-4e7b-4449-aacd-08fb8bf6d56b",k.Voice_MoonlightFest_FinalEnding_PuppetMaster_02="5652b920-6cc6-41ca-9faf-8f160c2f62d4",k.Voice_MoonlightFest_FinalEnding_PuppetMaster_03="aef91411-cba5-4b85-a596-a73ae607e092",k.Voice_MoonlightFest_FinalEnding_PuppetMaster_04="a3cfcf58-0725-407d-861a-c043764e3092",k.Voice_MoonlightFest_Selena_01="980b39bf-d60a-45ad-8101-be954bbf3ff2",k.Voice_MoonlightFest_Selena_02="2bda7850-97d9-4ab6-9e6f-528e718afc5d",k.Voice_MoonlightFest_Selena_03="2a67c308-af6e-4f9c-b3f9-d7941a2e77e9",k.Voice_MoonlightFest_Selena_04="fbc2d440-91ea-4380-a810-a5c7c48c33bf",k.Voice_MoonlightFest_Selena_05="b9bf1aae-813f-425f-8971-f18a39455cd7",k.Voice_MoonlightFest_Selena_06="03fd45db-c715-498a-9d7f-aed1405f97fb",k.Voice_MoonlightFest_Selena_07="909efcb8-0498-408f-8059-608d1356970d",k.Voice_MoonlightFest_Selena_09="4a58d57c-baf6-4895-a656-488345b3e2bb",k.Voice_MoonlightFest_Selena_10="3827d54f-b91b-48ec-bf50-f097c866e235",k.Voice_MoonlightFest_Selena_11="35c7c4c9-ea84-4c6a-b9f2-9b171cf50777",k.Voice_MoonlightFest_Selena_12="c9941e15-1bc2-4834-bd73-0e8555fe422a",k.Voice_MoonlightFest_Selena_13="9c57aa9d-72b9-4ff9-b691-315c9d3d8170",k.Voice_MoonlightFest_Selena_14="555a82e8-5123-4e08-a022-2fde0dedfc75",k.Voice_MoonlightFest_Selena_15="fe8cd84d-221f-448e-9af7-8d3a707a3c4f",k.Voice_MoonlightFest_Selena_16="11ff0bdd-4071-4064-9089-a74730a41a8c",k.Voice_MoonlightFest_Selena_17="6a843c26-26d3-4be1-9c1b-40689337f670",k.Voice_MoonlightFest_Selena_18="fb9aa5d0-5b29-411c-829b-378d3aa6362d",k.Voice_MoonlightFest_Selena_19="c28875fd-0a0c-4982-9d32-22e187bc9694",k.Voice_MoonlightFest_Selena_20="583489f7-fa75-4bc4-8b59-5109858178c0",k.Voice_MoonlightFest_Selena_21="821ae69e-c376-4ac8-8851-c299b4400270",k.Voice_MoonlightFest_Selena_22="6ca41204-8317-4375-ad56-4303e5365cee",k.Voice_MoonlightFest_Selena_23="5cf4d4ce-388d-459d-ada5-c5e956f67c21",k.Voice_MoonlightFest_Selena_24="554811c0-5364-417c-852b-085f80b78492",k.Voice_MoonlightFest_Selena_25="31d77714-2054-464c-83f6-7454d05447ba",k.Voice_MoonlightFest_Selena_26="7db19657-8fd0-4b7d-aae8-b1eee6458903",k.Voice_MoonlightFest_Selena_27="22f311e4-e526-4529-a25b-766d96b04c4b",k.Voice_MoonlightFest_Selena_28="893c0de0-e9a6-48c5-86d7-146d019cb040",k.Voice_MoonlightFest_Selena_29="98268d80-52cd-408a-aebb-e22ffe543334",k.Voice_MoonlightFest_Selena_30="13a75a5a-9c59-4146-a429-3a8565e67f03",k.Voice_MoonlightFest_Selena_31="04203ee6-62ca-4b5a-ac44-2ead8755a0d2",k.Voice_MoonlightFest_Selena_32="ad1ed02a-648b-482c-8ace-bc6a406038cb",k.Voice_MoonlightFest_Selena_33="1caee07e-af5b-47c3-88b8-d07ac09332a4",k.Voice_MoonlightFest_Selena_34="fdf5a5f0-a9f5-44bd-b0ac-30cafca66c20",k.Voice_MoonlightFest_Selena_35="acc914bb-f681-4138-a9a0-a84ec6ca51e8",k.Voice_MoonlightFest_Selena_36="e8129d96-63c5-4ce3-9cad-c615cf1eba6f",k.Voice_MoonlightFest_Selena_37="62a6da41-99a3-4a48-ad9f-0898968e0fad",k.Voice_MoonlightFest_Selena_38="3eb13f9f-cfdf-4d3a-91a1-22ca77099b70",k.Voice_MoonlightFest_Selena_39="12e3a8ed-0fdf-4854-aa90-51474004c3c0",k.Voice_MoonlightFest_Selena_40="99f4d524-d6d7-4558-97a7-35d3b4f3d039",k.Voice_MoonlightFest_Selena_41="cb5e756a-f79f-42be-ab4f-c33b4950de1c",k.Voice_Narrator_BonfireEntry1_135="b8a8478b-d4ce-4c96-957f-42f1adfdc933",k.Voice_Narrator_BonfireEntry2_136="f14b1412-d2c3-4fc8-8cdc-0bf51ecbf50a",k.Voice_Narrator_BonfireEntry3_137="40441b03-1d8c-45fe-bcc7-70ce2a9d9a04",k.Voice_Narrator_FireflyEntry1_129="97a15639-7941-4e82-ad92-9ee01dbd891c",k.Voice_Narrator_FireflyEntry2_130="f0116f3d-e88a-4254-bece-4c7801b29415",k.Voice_Narrator_FireflyEntry3_131="b70ec6f7-da19-4ce3-b725-5cb5d60571a2",k.Voice_Narrator_ShipWreckEntry1_141="7ec9e690-2207-4500-bd8e-d268184a2f06",k.Voice_Narrator_ShipWreckEntry2_142="4698946c-d0b2-48d2-b137-bf51fc281e0c",k.Voice_Narrator_ShipWreckEntry3_143="035ce9cf-74af-40f4-b3ca-064e9c2d95e3",k.Voice_Narrator_ShiverchillEntry1_132="e5bf7d7b-4970-46a6-ae42-1111a3349e5c",k.Voice_Narrator_ShiverchillEntry2_133="e0a792e7-242b-498a-8f25-fe9f8b057620",k.Voice_Narrator_ShiverchillEntry3_134="05fe1185-a23a-49a9-abf0-c3883dbd0e81",k.Voice_Narrator_SkywatchEntry1_138="a1dac258-7596-449e-8850-0802ee1d30ce",k.Voice_Narrator_SkywatchEntry2_139="158bc99f-5a0a-4007-827c-8c2ef8a0493b",k.Voice_Narrator_SkywatchEntry3_140="0f0f3ac8-29bd-4939-98c1-ca8ee438f243",k.Voice_Noot_OldFireflyQuest6_21="7b82f4bc-9d19-4f82-a3ea-e3ffceb78ed1",k.Voice_Noot_OldFireflyQuest6_22="3a444a25-8d35-41f7-a730-9c48aa3eeb81",k.Voice_Noot_OldFireflyQuest8_23="a3548e8a-c9ae-47fc-9b80-d59d38851a2a",k.Voice_Noot_PuppetMasterAppearance_Shipwreck_20="3e223f80-43e3-479e-bf76-dd4179418657",k.Voice_Noot_PuppetMasterLockingZones_Worldmap_18="b498d56a-b9d2-415a-8cae-0b3518c27cf6",k.Voice_Noot_PuppetMasterLockingZones_Worldmap_19="528e8ac8-cf7e-4ad9-88b6-3298f8597759",k.Voice_Noot_SkywatchQuest4="c5534d86-7693-4de8-8e14-38a629f9f3f5",k.Voice_Pippet_FireflyQuest4_92="a55805b6-608b-48ae-babd-27b74649e2a1",k.Voice_Pippet_FireflyQuest4_93="41435b6f-dcee-4327-b73e-45af372163ff",k.Voice_Pippet_FireflyQuest4_94="ff73cc98-7df8-42fa-a09a-630e88907eff",k.Voice_Pippet_FireflyQuest4_95="9158e059-efc9-4f60-9f71-b588752eaed7",k.Voice_Pippet_FireflyQuest4_96="64206efe-36f6-4da0-b916-e7d836988837",k.Voice_Pippet_PuppetMasterAppearance_Shiverchill_98="4b7afdb9-dacc-4a41-9780-74db34339d14",k.Voice_Pippet_PuppetMasterAppearance_Shiverchill_99="f3547370-61ea-41cd-a65d-d6a4608bdc69",k.Voice_Pippet_PuppetMasterAppearance_Skywatch_101="07061ffa-305d-4ae5-853b-5cfac9b27b7b",k.Voice_Pippet_PuppetMasterAppearance_Skywatch_102="3e605d9a-a08e-43db-aadf-a109e85dde6b",k.Voice_Pippet_PuppetMasterAppearance_Skywatch_103="75369c88-1194-48a5-8a1e-38fb086fde4b",k.Voice_Pippet_PuppetMasterLockingZones_Worldmap_97="3a59a038-38ba-4be6-9728-838067b83aea",k.Voice_PostBattle_LossFlow_Noot_01_merge="f34a942d-12e2-43ce-82eb-4da484a55505",k.Voice_PostBattle_LossFlow_Noot_02_evolve="7d4bdf7c-2b7a-454e-a41e-0c879329fbdf",k.Voice_PostBattle_LossFlow_Noot_03_plant="2ab557fe-d14b-4121-bb47-b7bc38ed67b2",k.Voice_PostBattle_LossFlow_Noot_04_fire="b5f81d13-5afa-4bd6-9c68-5ed32ec57802",k.Voice_PostBattle_LossFlow_Noot_05_water="91854eb3-98df-4e30-9584-258aae24b7d5",k.Voice_PostBattle_LossFlow_Noot_06_storm="177e18b9-5058-410f-8035-11ba77f32eae",k.Voice_PostBattle_LossFlow_Noot_07_astral="ff3fba4d-ee4a-45e1-8bd4-a3bfe412774d",k.Voice_PostBattle_LossFlow_Noot_08_shadow="4343353b-2dd1-4c3a-969b-6051aba94b8f",k.Voice_PostBattle_LossFlow_Noot_09_earn_stars="12d43163-0394-49a9-99ba-d271277aa296",k.Voice_PostBattle_LossFlow_Noot_10_pet_gear="c6eace4a-8cb9-4a6e-9b7a-22481a46ef45",k.Voice_PostBattle_LossFlow_Noot_11_wizard_gear="dd7acffd-3ff8-4cf5-97b8-26ce95c5ef88",k.Voice_PostBattle_LossFlow_Noot_12_weakness="16619cd3-de73-4d34-a387-2babda7b37dc",k.Voice_PostBattle_LossFlow_Noot_13_strength="af22ff86-e950-40bb-a458-c6be61c854d7",k.Voice_PumpkinFest_Extras_KandiKorn_01="793e6cac-e2c0-4670-b05d-774e5a39c6f0",k.Voice_PumpkinFest_Extras_KandiKorn_02="3cd9d71e-807b-4637-b044-c08aee1b485f",k.Voice_PumpkinFest_HollowJack_01_V02="bbbf5487-1c7c-4a1a-84cf-c1acdc2b6278",k.Voice_PumpkinFest_HollowJack_02_V02="26310b07-f8d3-4ef5-984f-28e365b2139f",k.Voice_PumpkinFest_HollowJack_03_V02="7f472a43-3495-4857-9b25-d7101223570b",k.Voice_PumpkinFest_HollowJack_04_V02="262e799c-f8af-46b8-8b98-f742bb49a5a2",k.Voice_PumpkinFest_HollowJack_05_V02="eaf995e1-097b-4f7a-afdc-54c9512ee85e",k.Voice_PumpkinFest_Intro_KandiKorn_01="4dd31d9e-9a36-4939-9049-05c4aef77738",k.Voice_PumpkinFest_Intro_KandiKorn_02="c1294e83-09ed-4974-bd5c-eea9a553ce2f",k.Voice_PumpkinFest_Intro_KandiKorn_03="d30fa6f4-81c6-48b4-8f8f-3ab0a5758cd4",k.Voice_PumpkinFest_Intro_KandiKorn_04="04b7e74c-aafc-4e08-8dd2-cf9ae6d99344",k.Voice_PumpkinFest_Story_Week1_KandiKorn_01="8d94b22c-82a9-4cc8-b69a-ed417069e77c",k.Voice_PumpkinFest_Story_Week1_KandiKorn_02="06811388-a6a2-48b7-9eb4-25a0b8cff3a5",k.Voice_PumpkinFest_Story_Week1_KandiKorn_03="e521afdc-afad-4ba8-8a78-c3a119dfe185",k.Voice_PumpkinFest_Story_Week2_KandiKorn_01="9e19d42e-57b2-4951-b1bc-28d03b5d645d",k.Voice_PumpkinFest_Story_Week2_KandiKorn_02="4e758915-8828-49c4-822b-55f81ffc7ed0",k.Voice_PumpkinFest_Story_Week2_KandiKorn_03="259550eb-2a62-4a87-befa-a5fe9a9c01b8",k.Voice_PumpkinFest_Story_Week3_KandiKorn_01="24ffc523-2a22-41ae-bdd9-1b3f75032ec0",k.Voice_PumpkinFest_Story_Week3_KandiKorn_02="790391ac-f0e5-47cc-97d2-65932fe029b4",k.Voice_PuppetMasterSept25_Scene08_PuppetMaster_01="218f8754-de85-4eb0-b792-cc91a6b2393f",k.Voice_PuppetMasterSept25_Scene08_PuppetMaster_02="db88bb61-7711-4fbf-ae5a-df93a1ba4b9c",k.Voice_PuppetMasterSept25_Scene08_PuppetMaster_03="0e437670-69d3-48f0-ac86-803faaf61720",k.Voice_PuppetMasterSept25_Scene08_PuppetMaster_04="5172c8fd-41da-4bfd-9c46-3712e9fc8ae8",k.Voice_PuppetMaster_FireflyQuest4_118="2dae6372-0603-42ad-9a55-9e71b2eb3401",k.Voice_PuppetMaster_FireflyQuest4_119="bd6da4e1-02ff-47d5-98a1-763b5854dbfc",k.Voice_PuppetMaster_LockingZones_Worldmap_120="c7fb185e-3536-4df4-aff3-b2403f712447",k.Voice_PuppetMaster_LockingZones_Worldmap_121="aecf39a7-af64-4d55-b06e-e478aef5c3f9",k.Voice_PuppetMaster_LockingZones_Worldmap_122="b28049f0-06ab-4423-b93e-183f89fdd022",k.Voice_PuppetMaster_LockingZones_Worldmap_123="12321149-9589-4b0d-bd95-5e141cdeb5b7",k.Voice_PuppetMaster_PuppetMasterAppearance_Bonfire_108="7971c3c2-0a42-4a9f-b52c-6ab9e060fb8e",k.Voice_PuppetMaster_PuppetMasterAppearance_Bonfire_109="c0cdfd80-6091-4987-ab46-dc04e3a1e498",k.Voice_PuppetMaster_PuppetMasterAppearance_Bonfire_110="76cea0da-0bd2-4bb6-b0ca-e7ef382117c8",k.Voice_PuppetMaster_PuppetMasterAppearance_Shipwreck_111="3ae2d573-8cc9-4fc3-a4ed-a2a3cec63740",k.Voice_PuppetMaster_PuppetMasterAppearance_Shipwreck_112="593bbdc8-6ea8-4dac-a1ee-8d6ea85fd40f",k.Voice_PuppetMaster_PuppetMasterAppearance_Shipwreck_113="c86e1829-5619-4004-b02d-22feacfc2995",k.Voice_PuppetMaster_PuppetMasterAppearance_Shipwreck_114="593104e7-7f0b-4b9c-80df-994fe42ef243",k.Voice_PuppetMaster_PuppetMasterAppearance_Shiverchill_104="eeb4a381-6d0e-4e93-adf6-9adfc17a8811",k.Voice_PuppetMaster_PuppetMasterAppearance_Shiverchill_105="4d6b5c5a-c283-4281-b14c-21c929e3fb1f",k.Voice_PuppetMaster_PuppetMasterAppearance_Shiverchill_106="58e4d015-12ce-48bf-8563-8572f66e208e",k.Voice_PuppetMaster_PuppetMasterAppearance_Shiverchill_107="3afc2c07-ef58-49e0-8c0d-47ea535c8dc9",k.Voice_PuppetMaster_PuppetMasterAppearance_Skywatch_115="80530300-e336-43ac-ad3d-d7a0fc83c3e4",k.Voice_PuppetMaster_PuppetMasterAppearance_Skywatch_116="e5013a18-09df-4676-a0fe-ccbef339757f",k.Voice_PuppetMaster_PuppetMasterAppearance_Skywatch_117="c2ff57de-b3ad-4508-a3ac-f831a0ffec62",k.Voice_Rifts_Barks_Phase1_Lose_FireDragon_01="92f9526a-eb50-4902-8835-5f5b1caef3f7",k.Voice_Rifts_Barks_Phase1_Start_FireDragon_01="0038c10f-9599-41d2-bdd0-547ead604f5b",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_01="83130011-7070-4d3f-a381-f2a95c376109",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_02="87cf2132-0060-4d33-b2db-6b86968a843e",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_03="78574eb1-d435-401d-83c0-8c8a8382f97d",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_04="8da447ef-873b-4a98-83ef-167f49818738",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_05="bc522af4-8477-47fd-a516-6cf25bc58ea7",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_06="5fd61bd2-8c0f-4216-850a-1924dc87671d",k.Voice_Rifts_Barks_Phase1_Win_FireDragon_01="a261103d-a93a-4816-aeae-5004d53b6151",k.Voice_Rifts_Barks_Phase2_Lose_FireDragon_01="e7b284cf-9e17-41ae-a210-c951194f3f93",k.Voice_Rifts_Barks_Phase2_Start_FireDragon_01="9570b27d-5ef4-4ea8-8071-c8da1d1f673a",k.Voice_Rifts_Barks_Phase2_Start_FireDragon_02="0057458a-0825-4166-8741-127fcac61c04",k.Voice_Rifts_Barks_Phase2_Start_FireDragon_03="622798b6-cfb6-4e7f-86dd-c1e03c825c63",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_01="cf4a466d-8d29-4de7-be3e-a3992e2d1d77",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_02="a763f34d-f221-4ffc-8f31-0a7509665734",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_03="d391fb03-7729-4457-b23a-cac711165efb",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_04="ee8e1481-26b3-4f0e-8651-8bbceb9bfee9",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_05="5fbc95a1-46e6-4b1f-b219-640e79cf7c55",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_06="94c47f9e-4808-4138-b99b-af622c8b6c19",k.Voice_Rifts_Barks_Phase2_Win_FireDragon_01="48a41a66-e1d0-4e67-9430-9a8a275fb5d8",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_01="12f78484-3661-4da5-a7b2-f9a6279288a9",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_02="42e7c4c0-fb85-451c-9b17-b9e17c187126",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_03="3a90fd78-837d-422b-af6c-ae5ff36c165f",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_04="3c30cf21-a317-405d-a103-19c1e7196d97",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_05="8969d173-f209-466e-9337-bb4a697bbf48",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_06="ae4facf1-e2f8-4a30-8308-70542462de9a",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_01="586ad1fd-f572-4f84-b1e4-4d88d0271676",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_02="ca264450-1239-49e3-ac90-be1856e74513",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_03="36725538-31f5-45ab-91e0-0e85d78bf200",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_04="3a4d1976-03c7-4d5b-8fb0-0da3cf70daf5",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_05="bc4f68f4-a8da-4416-b628-347b491e4d92",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_06="15fcd342-af9e-4186-8dd4-27f7183b59bd",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_01="d3458d9f-241b-411a-8766-5f395438425e",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_02="6a7e711b-829c-44f1-87d8-11af0fbacfd1",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_03="946a17ee-cd11-42f1-880a-4c8009e567e9",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_04="d15a6d42-a15f-471e-8be3-ac0f485db0c9",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_05="d54c716a-497b-4109-a55e-6131a7b460cf",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_06="65a92b5f-5053-47c2-a5e0-9d59b2475d38",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_07="4e23b7da-9896-4055-8133-1e148f54ac8c",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_08="d5df1466-c37c-4ab4-95ed-50601d41f233",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_09="1d7336ec-d068-4b68-aaef-485a83a33385",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_10="f770f346-96fe-4a0e-b3d8-058ec0daccf5",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_11="f5fab027-e7c5-480f-b884-cb1e7ab37987",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_12="5a4374ce-d36e-402e-bef6-eee7de5f6ee5",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_01="28b99bef-d2a3-4a3c-98b0-377ec1048eef",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_02="64b04240-cae6-476b-bb07-124cc607e068",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_03="4570c0b5-c090-4cb7-8a67-81d1b154c16f",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_04="4a1a1362-5e17-4fae-97f0-2145e4ed9bae",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_05="4d7e3d3c-2464-47ab-bd92-ae71f8f9cf48",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_06="79423224-7d81-4853-a7f5-5d2c04ae331d",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_01="95b7d67e-e2b7-49be-9e73-bc9e962840ae",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_02="98643009-885f-411e-baa0-de2620f1ee58",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_03="cf289168-1eaa-4416-9f74-3f1a6a419ba2",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_04="6b36c34a-b2e6-4b19-95a3-4dbef0608d05",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_05="fb88d55e-1a71-42c4-bea0-939b86f135b1",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_06="1e437fea-0072-4a52-8527-165760917029",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_01="27e5029e-b986-4e48-92c4-dfbf59eba53c",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_02="980f81fb-8ce6-42a8-b49d-ecda3bb0e0b3",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_03="f44177d9-06c0-484a-9801-94ed2a3396b7",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_04="7d9a680e-3c98-4cae-8fd9-869123b55d65",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_05="8b900146-ddb3-41a2-8d8f-3eb5ac9dd1fe",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_06="14327e06-f043-409f-a62c-ebc7b0349196",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_01="b42a33eb-bb74-4528-b3f5-922d2e12fb1b",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_02="f8bb0237-3238-416a-9031-59b6948a5ca9",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_03="0cdc2a59-c39e-4e63-be1d-897552dbc3ee",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_04="faa77dd0-4ac3-4742-8815-a15c05db1b01",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_05="08068dd0-5988-4fb1-9cb6-881763261938",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_06="c9c96576-779a-40cc-9aa4-af8bd0e783ed",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_07="fd6901b0-3f74-4bd2-8328-bbe8542b7649",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_08="4d8ebfec-a049-4b0b-a836-95272ef96467",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_09="cd2709c3-63e8-49e3-836f-f8e175ae3e60",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_10="30d4d564-00f0-4c2c-a9fb-c1c5dcdbd73f",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_11="113b8cb3-633a-42c2-a9d7-aa8ae56de61a",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_12="1e8bb3f6-917a-480b-b808-82b323ce458e",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_01="817a1602-435e-4adb-a963-64b80702add7",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_02="1c8e0b50-ff77-400e-b797-28b2577b4a42",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_03="145b81cf-67ba-4637-984b-b295326325da",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_04="c6f61bbb-37c7-4e4a-923d-428da1c4a6d6",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_05="ac970c72-5b06-47cc-8f17-017a105e9c0d",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_06="dd473903-5535-482b-a841-4ba674a311ec",k.Voice_Rifts_Barks_Phase5_Lose_FireDragon_01="26a42e1f-1a96-4048-87c5-f22a30fa1a6a",k.Voice_Rifts_Barks_Phase5_Lose_FireDragon_02="462e7142-e8ee-4378-a700-1cb40001f16f",k.Voice_Rifts_Barks_Phase5_Lose_FireDragon_03="56c088b3-5b60-4a08-8b92-3ddad4b9f6a0",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_01="6255ca4f-965a-4658-b424-d5e91d4ec1ad",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_02="437c4fe2-ce8a-417a-a868-3871f7f70c5f",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_03="898e5c4a-82fd-4b77-9260-d599cfe89bd9",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_04="6d28b564-2589-4aab-98e3-41a78740b86b",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_05="19fa33e4-075f-43d7-b263-e3dbc1b03755",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_06="a9e1f6ba-f0c8-4112-9e54-f89b32e92cd9",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_01="f676b584-7dfe-4943-8835-5ba16de30b32",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_02="22b3a5f0-8405-4863-9fcb-246c14048e6c",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_03="7fbd275e-d007-481a-a4c8-6f5fa661b7ad",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_04="cc531426-4730-44b5-9aaf-d0198796b305",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_05="048970a6-5ecb-47d4-bff8-2f187600657a",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_06="995829a8-759f-4d43-b538-418102e09ea5",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_07="9ea3ae2d-56fc-4a4f-9c48-24f342d97455",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_08="e4265381-25a4-49f4-96cf-65d4cad60733",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_09="a9656998-a668-4fa2-93c7-81b88b55de2a",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_10="5d388b12-d032-4873-956e-f275cff7000e",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_11="e9a757e0-337e-4d5b-b46b-2b4da3a40d78",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_12="9a50cf7e-7e5e-4bf5-9da0-bcdc866a0bf7",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_01="df8765ed-40ab-4421-b468-ba288bdb4d30",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_02="e0a7f270-a9d0-452d-bdb1-c5cdc8dde7fa",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_03="9602fddd-d217-4c9a-b4eb-18608c1e8269",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_04="7d2bc0c8-a497-41fe-ac47-e47961460217",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_05="b0f343d1-76f3-419b-924c-4ce3b3af79bd",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_06="7d2643ee-a714-4345-829f-6f708e7b2ce9",k.Voice_Spingfest2026_Bargo_01="1fd8fade-4576-4c7e-aba6-413eb4cdfe5a",k.Voice_Spingfest2026_Bargo_02="83ff686d-d671-43cd-a5d7-ff65f51fb49b",k.Voice_Spingfest2026_Bargo_03="f36484d0-df11-46db-a6fb-22aaf96a7264",k.Voice_Spingfest2026_Bargo_04="e9201965-4cb2-4d58-a744-882018ee59a3",k.Voice_Spingfest2026_Bargo_05="7b4e2917-fe21-4fdc-8434-1c29ed1ab260",k.Voice_Spingfest2026_BunnyWizard_01="7bc5faf1-a37c-4df2-b405-1e0e7cc48214",k.Voice_Spingfest2026_BunnyWizard_02="aae5025e-65d4-4255-895b-1e0e607aad7c",k.Voice_Spingfest2026_DonZorro_01="5b1f1e2d-9f39-4872-8181-d79ac5e04ae6",k.Voice_Spingfest2026_DonZorro_02="b8027096-b8c4-4b51-9683-4c9802368731",k.Voice_Spingfest2026_DonZorro_03="af963f44-8cf4-4e06-bfca-2320b08af3aa",k.Voice_Spingfest2026_DonZorro_04="2c3fbe7e-1cdd-45ba-8ecd-23397d977042",k.Voice_Spingfest2026_DonZorro_05="adb356df-b4a8-4533-ba19-e57bb07efd0b",k.Voice_Spingfest2026_DonZorro_06="680987b1-382c-4841-b8ed-ae1248c59a9a",k.Voice_Spingfest2026_DonZorro_07="a7dba811-b982-4a57-9737-8796f86f4fbf",k.Voice_Spingfest2026_DonZorro_08="a259d488-8eda-4c44-a787-ce588239fc5a",k.Voice_Spingfest2026_DonZorro_09="f36b961f-e8c8-4da8-8c57-9414899923c4",k.Voice_Spingfest2026_DonZorro_10="54d51e49-5530-4630-ad34-39b220c972c6",k.Voice_Spingfest2026_DonZorro_11="0c7e90ab-4ee9-4739-8d95-1f758fd29bc3",k.Voice_Spingfest2026_DonZorro_12="d7ea0e42-843d-4b77-8385-dac686d6ac8b",k.Voice_Spingfest2026_DonZorro_13="cfcf9ffa-0376-49a8-bcb8-edc73afdee13",k.Voice_Spingfest2026_DonZorro_14="5da97319-40d7-492e-a43d-05630fd2e0b3",k.Voice_Spingfest2026_DonZorro_15="aebb6223-2174-42ac-9f24-0feb458aa47d",k.Voice_Spingfest2026_DonZorro_16="cb4cc9f0-9b9e-457c-b2d5-349e3073551d",k.Voice_Spingfest2026_DonZorro_17="0b0346cd-1312-4f07-bf2c-6599325845a7",k.Voice_Spingfest2026_DonZorro_18="8a349921-fc7b-4762-8c88-473661b30399",k.Voice_Spingfest2026_FoxWizard_01="c4b79595-c4b4-4bf7-902f-186c274a0605",k.Voice_Spingfest2026_FoxWizard_02="d236a67d-814e-463d-bbfc-137764d89b5d",k.Voice_Spingfest2026_HarrietHood_01="dc69fbd5-33e9-4830-9c3d-c60e2bbee7bc",k.Voice_Spingfest2026_HarrietHood_02="ff7cd0eb-970f-41f9-b81f-a1a4046420ad",k.Voice_Spingfest2026_HarrietHood_03="a37c35c4-75fa-4544-bd24-d8d01488265e",k.Voice_Spingfest2026_HarrietHood_04="aea03dc1-b42c-4fa2-8783-f0d321ad6072",k.Voice_Spingfest2026_HarrietHood_05="4c8c72cc-5347-4edb-9ade-16ad80a603d7",k.Voice_Spingfest2026_HarrietHood_06="ff477c42-03d2-4666-b782-ceb619a6ab5d",k.Voice_Spingfest2026_HarrietHood_07="fbc095e1-a8ef-49c1-ab40-15e475257b25",k.Voice_Spingfest2026_HarrietHood_08="efc580cb-da14-46a8-a8d8-9e345d94a643",k.Voice_Spingfest2026_HarrietHood_09="4e2a17c8-daf3-43e1-8820-10839902aebe",k.Voice_Spingfest2026_HarrietHood_10="8febc700-a624-4106-98c4-43033a6afb1e",k.Voice_Spingfest2026_HarrietHood_11="22c55298-721c-4d1c-916b-5ac45bd1c6b4",k.Voice_Spingfest2026_HarrietHood_12="c5bce580-d55f-4b2b-acd0-664748a1f649",k.Voice_Spingfest2026_HarrietHood_13="f5ff002e-7d0b-4f56-965e-4437d10e6ae4",k.Voice_Spingfest2026_HarrietHood_14="a21eae98-64b6-4e4d-97b8-b21c03d5eada",k.Voice_Spingfest2026_HarrietHood_15="c0a6415a-a77f-4e57-b5f6-de9b865f2366",k.Voice_Spingfest2026_HarrietHood_16="df15219b-7bfc-4c0f-acbe-c484622368bb",k.Voice_Spingfest2026_Verna_01="eca97a55-a065-418b-adef-f478c076e3eb",k.Voice_Spingfest2026_Verna_02="25588c46-835c-4aa1-9243-7492c6d0542e",k.Voice_Spingfest2026_Verna_03="60dd4050-b8e7-44c1-bf3e-f01cf1fedb66",k.Voice_Spingfest2026_Verna_04="3e74a12b-e4d0-403c-bce2-c25a7b8c6296",k.Voice_StarlightFestival2025_Act1_SirConstello_01="e61b41ae-653f-4e42-982b-131a449dfc39",k.Voice_StarlightFestival2025_Act1_SirConstello_02="353f5eeb-661b-4b76-ad12-25ecc59927f8",k.Voice_StarlightFestival2025_Act1_SirConstello_03="d7d6f580-32f8-4878-9b68-3006d973fb00",k.Voice_StarlightFestival2025_Act2_SirConstello_01="734415c8-1c11-489e-a56e-5ef094e4c5ce",k.Voice_StarlightFestival2025_Act2_SirConstello_02="6f9a0025-ac09-47ad-8f5e-41462ab4a6c7",k.Voice_StarlightFestival2025_Act2_SirConstello_03="05b4d235-e72b-4cb9-bde3-8d65c0460d1d",k.Voice_StarlightFestival2025_Act3_SirConstello_01="334879f8-f78f-4904-a993-831ee94b89e6",k.Voice_StarlightFestival2025_Act3_SirConstello_02="e59f920c-aa0a-40f1-b356-67fdb737df04",k.Voice_StarlightFestival2025_Act3_SirConstello_03="e430c39b-31e3-402d-8e3b-b19760ac7d1a",k.Voice_StarlightFestival2025_Act3_SirConstello_04="08504d8a-d0a6-42fb-823e-ed83ceb3b21f",k.Voice_StarlightFestival2025_Act4_PuppetMaster_01="c4c30d2b-bfc0-429f-8d8e-21f95805ab94",k.Voice_StarlightFestival2025_Act4_PuppetMaster_02="a04fb70a-485c-4c4f-bae3-5396bb2faea2",k.Voice_StarlightFestival2025_Scene1_Imani_01="3215533c-f280-41c5-ae51-88248af23238",k.Voice_StarlightFestival2025_Scene1_Imani_02="6922f234-c7c0-45d6-baaa-0d61a9e0a5e1",k.Voice_StarlightFestival2025_Scene1_Imani_03="e0feaee3-a19e-4f23-a086-2e6f78dfcf1f",k.Voice_StarlightFestival2025_Scene1_Imani_04="7eb94d46-e8b1-4fab-9364-60316257ff6a",k.Voice_StarlightFestival2025_Scene1_Imani_05="532928c3-4482-4207-8bc2-facbb21345f3",k.Voice_StarlightFestival2025_Scene1_Imani_06="18f94da5-96d0-4053-9d50-5161e5b36269",k.Voice_StarlightFestival2025_Scene2_Imani_01="b607ed24-454e-43d6-90e1-f09f9b5f660a",k.Voice_StarlightFestival2025_Scene2_Imani_02="acc7e16e-0294-4842-ae99-a783a2c2b59f",k.Voice_StarlightFestival2025_Scene2_Imani_03="f084658a-9358-40ca-b035-19c3ebe1b05a",k.Voice_StarlightFestival2025_Scene3_Imani_01="962f6225-1ba7-4024-b187-7f0461e0ac40",k.Voice_StarlightFestival2025_Scene3_Imani_02="3de77efc-0d7d-495d-938c-a740a1aa6b66",k.Voice_StarlightFestival2025_Scene4_Imani_01="275d57f9-93e3-44b8-9376-9a584c76005b",k.Voice_StarlightFestival2025_Scene4_Imani_02="49043ab6-ef4b-41f1-bf1c-19e2e92787e7",k.Voice_StarlightFestival2025_Scene5_III_Imani_01="9f85d703-7bec-4ba8-a345-f53ae65e0fdf",k.Voice_StarlightFestival2025_Scene5_III_Imani_02="f8ad7325-54a4-4e28-ba45-7ba06f4af46e",k.Voice_StarlightFestival2025_Scene5_III_Imani_03="b4b2da92-e710-424b-a350-a6e768ef16a2",k.Voice_StarlightFestival2025_Scene5_II_Imani_01="a895dcc0-f681-4f7d-ac06-cf3120989449",k.Voice_StarlightFestival2025_Scene5_I_Imani_01="8524d96f-7621-497f-b39c-727d1091e519",k.Voice_StarlightFestival2025_ShopDialogue_Imani_01="fc82be12-27d2-4813-a09c-95d88f614efb",k.Voice_Winterfest_Act1_HowardCornelius_01="f7ce1403-7b74-4d65-bc57-f4f6bd4d5423",k.Voice_Winterfest_Act1_HowardCornelius_02="fc3fffb3-05f4-4370-a23e-0a2efbdd02f7",k.Voice_Winterfest_Act1_HowardCornelius_03="f8e90484-d723-41c0-bdaa-2902a447d1ac",k.Voice_Winterfest_Act1_HowardCornelius_04="4f6050c9-9387-4ef1-9009-2a72db089754",k.Voice_Winterfest_Act2_HowardCornelius_01="6bdf71b5-39f6-4bf2-a848-6044fc507a92",k.Voice_Winterfest_Act2_HowardCornelius_02="be1c5454-1d86-4471-88fc-0eea94c8c325",k.Voice_Winterfest_Act3_Pippet_01="14ccf911-d9c6-42d0-91f9-dd706fc612bf",k.Voice_Winterfest_Act3_Pippet_02="fd7c7789-3d06-4f34-988a-9178d252f17b",k.Voice_Winterfest_Finale_HowardCornelius_01="67de2248-a7ba-4f90-bc48-f5be1ade65c4",k.Voice_Winterfest_Finale_HowardCornelius_02="fb1b2e45-cce4-48b4-95c8-52fa79a3e075",k.Voice_Winterfest_Finale_Pippet_01="97b2e447-ae3c-4c9e-8c50-c5c2060cc575",k.Voice_Winterfest_PuppetMaster_01="d15990c4-8665-4c43-b14b-7fee3e19e2b3",k.Voice_Winterfest_PuppetMaster_02="61bb05e2-a2e7-46b5-85ca-03b5436c39d2",k.Voice_Winterfest_PuppetMaster_03="df487868-7136-414b-b1fa-7e1dbe4aa4d6",k.Voice_astraldragon_barks_another_round="c0b23cb3-289a-4297-9bed-f548d2800ee5",k.Voice_astraldragon_barks_banish_any_shadow="0bda7f89-99c7-48b6-8fe5-59259afa378c",k.Voice_astraldragon_barks_better_but_not_enough="baa46a07-f1e7-4c2b-80c5-de02673ec417",k.Voice_astraldragon_barks_bright_enough="efa05b5e-435d-4b53-978a-90dea30dfe97",k.Voice_astraldragon_barks_brilliance_unmatched="95779b6e-0463-474e-82a4-4d7f47fec7fa",k.Voice_astraldragon_barks_brilliant_work="24019069-373c-4a07-b4e0-bf85c0a45d08",k.Voice_astraldragon_barks_brilliant_young_wizard="4a03c1a1-5d99-4b52-bd03-1f4e8c3ca46f",k.Voice_astraldragon_barks_cannot_defeat_me="a15cead6-5e9e-40ce-b37d-be9be3011113",k.Voice_astraldragon_barks_combine_our_light="c8f045df-ab61-4993-95f3-3141ec1ab0af",k.Voice_astraldragon_barks_coming_shadow="35bc3180-103c-41eb-bd2f-efad1e797d07",k.Voice_astraldragon_barks_couldnt_defeat_me="0ac0bfda-8b28-4c25-a391-75c785bedcbf",k.Voice_astraldragon_barks_grow_stronger="7abb4acf-5201-4597-b627-52eee750e799",k.Voice_astraldragon_barks_growth_takes_time="c68623db-a0d1-423e-9eef-e608b8c75ced",k.Voice_astraldragon_barks_hard_work_and_practice="a1c0e840-1758-4323-9f0e-ea7490e2812c",k.Voice_astraldragon_barks_have_patience="cc4cab5b-f97b-47a6-8557-47b6856482c6",k.Voice_astraldragon_barks_i_see_youve_returned="f366fb3d-a652-47e6-9f29-316ffdd6c306",k.Voice_astraldragon_barks_keep_hearing_about="d5928ecb-1a59-4506-af54-4c8ee12331fd",k.Voice_astraldragon_barks_keep_practicing="7b5d0500-eef7-4c73-b098-7643a7bba8a9",k.Voice_astraldragon_barks_light_defeats_darkness="e6596485-0535-434a-8a45-a6eb1892a50b",k.Voice_astraldragon_barks_my_brilliant_light_reveals="f10cfbda-629f-4ccf-8300-cb3c433fc994",k.Voice_astraldragon_barks_no_pan_flash="2847e3c0-d26f-491a-99c9-b6d8862ef580",k.Voice_astraldragon_barks_only_light="70b39ecb-2808-407a-85e8-a6ed43a95057",k.Voice_astraldragon_barks_patience_rewarded="ff2b0281-9e58-43ae-97c7-482c6a3a0e1d",k.Voice_astraldragon_barks_patience_young_wizard="d7bc8327-3739-43ef-8120-8a6d3d9866ad",k.Voice_astraldragon_barks_pm_growing_stronger="42534711-b799-4eed-ae23-63342ce0be8c",k.Voice_astraldragon_barks_pm_shadow_grows_darker="14580731-a63f-432d-876e-6be789511572",k.Voice_astraldragon_barks_practice_makes_perfect="f4105e43-1490-4e6b-a2a9-cfdcf4751139",k.Voice_astraldragon_barks_return_soon="1bb4eb04-7c32-4b3e-bd27-ad71fd376579",k.Voice_astraldragon_barks_shadows_in_my_light="2ff5b053-704b-40cc-8d01-9bb001443b5a",k.Voice_astraldragon_barks_shine_as_brightly="2f4508c2-e623-4491-8c5e-5fd7e310309a",k.Voice_astraldragon_barks_show_brilliance="3a9fcc01-1b80-4e79-8fcc-b408c8af80d0",k.Voice_astraldragon_barks_show_me_your_best="44c7cbf0-63da-4b3f-aa15-4ca7745c508f",k.Voice_astraldragon_barks_strength_grows="ad7498fe-2f20-4d60-8462-1dc6a42bd7bf",k.Voice_astraldragon_barks_wont_outshine_me="92cda661-7015-4c82-9e4a-6f110511f28c",k.Voice_astraldragon_barks_you_have_grown="76c5bc67-6548-450f-bb8c-1cf1f559cf65",k.Voice_astraldragon_barks_you_must_do_better="e97dc055-d8db-4c00-8fbb-2f7f019c114a",k.Voice_astraldragon_barks_youve_returned="6f14a2e2-8035-4007-8eff-40a654d4a11a",k.Voice_bonfireQ7="84775988-fbee-4dc1-98ab-4148261ffeaf",k.Voice_costumes_tutorial="b7a2a519-1334-40c8-b238-1917c0cb4bad",k.Voice_endgame_post_puppet_master_9_dragon_isle="b86a1b08-66f4-4b10-89fb-8e9ac02f10c6",k.Voice_forestQ10="9448d6e5-5212-47d9-9138-40643f137531",k.Voice_forestQ11="407cd4a8-c70e-4e67-882b-fc3f0a4a7dec",k.Voice_forestQ12_flora="b2c27420-1927-4082-a896-c51baad604d6",k.Voice_forestQ12_florian="c5a28bce-e616-4544-8f4e-dea46bfd4877",k.Voice_forestQ12_gerald="de65df15-d7cf-4a45-a34d-d922db1d244b",k.Voice_forestQ2="f718c977-b0be-47a5-b32a-f7c85123e5c7",k.Voice_forestQ3="bed2b67a-c3cf-4004-9775-87bb05956b52",k.Voice_forestQ4_bok="039e1365-4dab-4172-84a3-2e60b137d94f",k.Voice_forestQ4_flora="b60decd1-c74f-41c3-ad7d-0e020699d59a",k.Voice_forestQ4_florian="e1b742a7-16e7-405f-ad28-4ba97c9ec35a",k.Voice_forestQ4_pippet_pm="718c3eda-5abd-4eee-8b14-c4af1a3f08ef",k.Voice_forestQ6="752334fc-2b56-4b86-9ec8-b987b45c4ed8",k.Voice_forestQ7="4eeb621d-ef32-4a7a-81fa-77012dbc8d00",k.Voice_forestQ8="f448bea6-cc75-43be-bcd5-082c6e54f0ac",k.Voice_forestQ9="15579768-b744-4f6a-800e-2e16d6d8ae22",k.Voice_login_credentials_reminder="c42cbe2b-6ec4-4aef-bf6d-831a23501d7f",k.Voice_noot_bundle="ee7f8ba7-057b-4ec1-b286-33577826de25",k.Voice_noot_ftue_battle_1="87731b6c-02bc-45cf-b254-94603c497f88",k.Voice_noot_ftue_battle_2="0cd2217b-262f-45cc-9690-24754190b0fe",k.Voice_noot_ftue_battle_3="906dd7fa-4222-41d2-9aec-a479c7aea2ec",k.Voice_noot_ftue_character_creation="1aebe87a-fd47-48e3-8d1f-bd5d37da1319",k.Voice_noot_ftue_choose_spell="a5900a44-87a4-4a2d-b74f-6802bd75dcf4",k.Voice_noot_ftue_choose_target="fd6eff8f-3b0d-4e77-bc21-9076fcc659fd",k.Voice_noot_ftue_encounter_1="1391f7d3-713a-4c9f-89c0-6942b7c68d2c",k.Voice_noot_ftue_encounter_2="0ecba55f-c642-4bed-8732-b24d9a5a175e",k.Voice_noot_ftue_great_hall_2_1="6cc08048-03a3-4662-8531-ca5f30b253c9",k.Voice_noot_ftue_great_hall_2_2="bca7007e-cc1c-4d07-865e-1641146cd66e",k.Voice_noot_ftue_great_hall_2_3="f0105409-9ae2-4f90-bc8d-4efd284890ea",k.Voice_noot_ftue_great_hall_4="77ee831b-1c87-4e05-affa-3363b73dca51",k.Voice_noot_ftue_intro_1="25112f49-9657-42d0-b808-66200974a770",k.Voice_noot_ftue_intro_2="a4d985a0-e832-42bd-8eaa-174f9ac0b826",k.Voice_noot_ftue_magic_1="5deb5b21-d7e7-4550-86d2-7177952d64de",k.Voice_noot_ftue_magic_2="c34b7f8a-3374-4ff1-9e84-fc2d0f0de744",k.Voice_noot_ftue_pet_rescue="f7da42d7-5b1d-442f-b0f6-f5cacb810958",k.Voice_noot_ftue_pet_select="f5fd2631-1019-4c6f-8012-21d807d0ae96",k.Voice_noot_ftue_secret="151a9e02-cca3-42aa-b4e5-2b8860ed8c3d",k.Voice_noot_merge_button="3ed05219-8bd9-4fad-a451-f7987998de68",k.Voice_noot_merge_new_merge_your_pets="5303bef8-f9e5-4d8d-a431-f9a0011d5d74",k.Voice_noot_merge_open_pet_roster="08d4d3d1-a2e7-4f9c-9833-fd02b74c1765",k.Voice_noot_merge_pets_at_bottom="8615b753-4e50-41c7-a7d0-f124c3096844",k.Voice_noot_merge_ready_to_merge="45669959-a78c-4131-83ee-909c01d86cbd",k.Voice_noot_merge_see_that_pet="48d66fbc-5a49-4ed8-a8b6-f0d97b082032",k.Voice_noot_parentAttach="98f688f9-39d5-48d3-8a90-b7ea1206bb67",k.Voice_noot_petgear_tutorial_1="48b20bce-9549-4a47-8fb3-8f1bea0b02da",k.Voice_noot_petgear_tutorial_2="40c0c01b-212e-488f-9ef2-d61a56324009",k.Voice_parental_consent_explanation="e0783d65-b4a8-42bb-ada0-e48de8fb88c5",k.Voice_physicaldragon_barks_are_you_any_better="d7b49452-506e-4d6c-b298-9b4d13181b82",k.Voice_physicaldragon_barks_at_our_best="3b882497-68e1-4f0a-99af-c4a5946efe1b",k.Voice_physicaldragon_barks_bested_me="ba1b3f47-fc6a-4efb-a659-66c1b51b3e5e",k.Voice_physicaldragon_barks_capture_me="42bb8e86-f329-4be7-8514-2c8abacdc1b5",k.Voice_physicaldragon_barks_come_on_wizard="675027ea-32cf-4060-b6d9-7b57d10a759b",k.Voice_physicaldragon_barks_common_enemy="ec7b77b2-5938-4798-afeb-7cc05546f754",k.Voice_physicaldragon_barks_couldnt_beat_you="426d5033-12b0-4f9d-9249-e61b14d9e9cf",k.Voice_physicaldragon_barks_crush="78b13812-5de4-4be3-9143-f11666cb14a1",k.Voice_physicaldragon_barks_defeat="4c96ab3b-8464-4dd8-938d-cd277c58908c",k.Voice_physicaldragon_barks_didnt_let_last="4f98dd5d-615c-4da2-83fd-631200ede10c",k.Voice_physicaldragon_barks_discouraged="32ff5fe3-3dac-4e96-b2d7-28837b8787c8",k.Voice_physicaldragon_barks_focus_on="b16d4e28-5bd7-4621-8f8c-0bd3ac2af870",k.Voice_physicaldragon_barks_goals="6a0a0e39-d085-4d48-a6ed-57d232c92f37";k.Voice_physicaldragon_barks_good_fight="cce6e142-394e-4bee-a481-0887436c51ed",k.Voice_physicaldragon_barks_great_work="bdae3354-3ce1-4252-adb5-cee8b60a320e",k.Voice_physicaldragon_barks_grow_strong="10383451-d7f9-438c-9654-88aaa40b0500",k.Voice_physicaldragon_barks_hit_the_gym="b2b3cb19-e232-4a5a-900a-20e114b31b6a",k.Voice_physicaldragon_barks_i_am_stronger="1798181f-df7c-4cae-8a95-343853541952",k.Voice_physicaldragon_barks_i_hope_youve_been="36b6807c-a16c-48c0-b037-b3df3bfbbc59",k.Voice_physicaldragon_barks_impressive="8f0e21cd-152b-49ab-b1da-01872560a49c",k.Voice_physicaldragon_barks_incredible="c3af7589-0928-41c0-984e-c6f6923cd2ca",k.Voice_physicaldragon_barks_intense_workout="59d78525-13a2-4eee-9fb3-d79e1a6a6775",k.Voice_physicaldragon_barks_magic_muscle="1e5a891c-5b0c-4dc3-a218-e94d5e78e64b",k.Voice_physicaldragon_barks_must_be_ready="56791c11-af4d-45fb-9678-2ce107288c1b",k.Voice_physicaldragon_barks_need_to_prepare="bfa3e0a2-8b33-425e-bb38-7f4d4c137043",k.Voice_physicaldragon_barks_paying_off="f03ff598-796e-42b0-b1ff-9c316c6e3884",k.Voice_physicaldragon_barks_prove_it="bbbc37f1-ed8f-4df3-9a4e-fcb87d163c85",k.Voice_physicaldragon_barks_puny_puppet_master="9ac41e5b-e02e-49c1-ae6e-ea5be6f98d3b",k.Voice_physicaldragon_barks_push_our_limits="9c730d52-fe17-4235-8694-115e71f501a8",k.Voice_physicaldragon_barks_push_yourself="4b9cd045-caf9-4e7d-b3a2-21389c779aa3",k.Voice_physicaldragon_barks_real_challenge="856c2983-53e1-4da8-9f0e-f6bd71bac6d3",k.Voice_physicaldragon_barks_skills_are_improving="652b0fb4-4ab1-488e-adc4-9709bf0251ea",k.Voice_physicaldragon_barks_spells_weak="6c2b3a74-9478-4fbe-beda-bc0b27e11e23",k.Voice_physicaldragon_barks_stand_a_chance="829fd4f3-2e74-41f8-a02b-ac17ad740a3a",k.Voice_physicaldragon_barks_true_strength="76211c06-3cea-407a-abcf-910da0dac394",k.Voice_physicaldragon_barks_unscathed="9701c840-a9e7-4bbb-b390-ee09e7b8c014",k.Voice_physicaldragon_barks_unstoppable="945f6b48-dc48-47c9-b43c-cd7a229eda28",k.Voice_physicaldragon_barks_vow_to_defeat="4efb5001-dd9e-4720-b277-c35f5bb011b7",k.Voice_physicaldragon_barks_who_is_this_puppetmaster="b2c842c3-55c8-429e-bcf8-91ad1135256c",k.Voice_physicaldragon_barks_will_fall="c162a5ec-0e1d-4f1c-8d2a-0c8de5d5f7e3",k.Voice_physicaldragon_barks_you_wizards_all_same="9879fe0a-e14b-41b5-bde8-49e8c749d8fb",k.Voice_physicaldragon_barks_youre_stronger="9e74046c-9959-47df-b50a-8e921e1d3b61",k.Voice_puppet_master_ftue_encounter_3="751dbd19-2ba9-4793-a915-b545bec0ae8d",k.Voice_puppet_master_ftue_locking_zones="b4b0ffd5-51b3-42f4-8df9-5f7c84ba2726",k.Voice_restriction_tutorial="139933de-56c2-47e4-b217-ed2b90204e37",k.Voice_restrictionsFTUE_Noot_01="0070a683-6d11-40d9-9ba7-48d50ec54e65",k.Voice_restrictionsFTUE_Noot_02="18025f8e-d6dc-44e8-bc88-71ee014a4d22",k.Voice_restrictionsFTUE_Noot_03="779c891e-db4c-4d31-9264-75c03344b5e1",k.Voice_restrictionsFTUE_Noot_04="1ea06190-02e0-4c25-a98c-f041728c498d",k.Voice_restrictionsFTUE_Noot_05="174b182a-657c-4e1e-9a1d-5ba6932d864d",k.Voice_restrictionsFTUE_Noot_06="a555c536-fa6b-4329-94ba-c8f6f4fe40cb",k.Voice_restrictionsFTUE_Noot_07="3a18911c-338d-4496-931c-a8037a4540b6",k.Voice_restrictionsFTUE_Noot_08="19fa6f83-509f-49ff-b33f-3c22653da81c",k.Voice_returnToFireflyForest="1fbc5b10-e687-46d3-8a43-04a67663828b",k.Voice_rifts_barks_phase5_lose_firedragon_04="5797299f-334f-4b1e-ac95-b62271b47655",k.Voice_rifts_barks_phase5_lose_firedragon_05="2430c05a-abd5-4d68-a224-433ffdafc3f6",k.Voice_rifts_barks_phase5_lose_firedragon_06="b03a0453-dbdc-4314-afec-e11e64ec92ff",k.Voice_shadowdragon_barks_a_bit_stronger="47586556-3026-4af6-a56e-68a0ce7724b9",k.Voice_shadowdragon_barks_another_challenge="e3615fac-06f9-4883-ba69-55ca7dc55fdb",k.Voice_shadowdragon_barks_another_shadow_creature="be601471-67ea-4d2b-906a-238e1833dd3d",k.Voice_shadowdragon_barks_aww="841a9d6b-676c-45f4-8e78-f2346e855029",k.Voice_shadowdragon_barks_aww_im_tired="a2fd8f30-022d-4d7c-aa20-19d22b082cd3",k.Voice_shadowdragon_barks_be_friends="4f5f5b8f-a880-457b-8464-78a58a6ff6af",k.Voice_shadowdragon_barks_better_than_this="06090c46-a437-4504-af24-e3224107e350",k.Voice_shadowdragon_barks_come_back="f431049c-60b9-4aac-9802-97bf6bef7771",k.Voice_shadowdragon_barks_come_on="1e9a2384-ac63-4378-a359-9ae8ff9054b1",k.Voice_shadowdragon_barks_darkness="a23e3f92-87ac-4b6b-b6df-fb6c14f21d8b",k.Voice_shadowdragon_barks_did_you_know="80afbf53-16fc-43c4-a074-b0abc9d27230",k.Voice_shadowdragon_barks_different="086200ec-5cf0-40ea-be5f-d4a8e6b64db3",k.Voice_shadowdragon_barks_do_you_know_why="3fad0075-d72e-426d-a2dc-fafa3584b51a",k.Voice_shadowdragon_barks_dont_be_afraid="0c64d0b7-ca5f-4738-89e4-602656e323c1",k.Voice_shadowdragon_barks_dont_give_up="27506445-59ea-4948-94eb-5f5b573580cc",k.Voice_shadowdragon_barks_dont_hold_back="6e116961-b271-4555-88ab-367f55bf4b6d",k.Voice_shadowdragon_barks_dont_worry="fcd3c137-9162-45b7-a387-b3343164d037",k.Voice_shadowdragon_barks_end_well="abab1a73-96d5-4a35-b732-07d95ffe50f4",k.Voice_shadowdragon_barks_face_your_fears="7722b937-f52c-469e-9a62-2dce36108ac3",k.Voice_shadowdragon_barks_first_real_friend="ef3dbc87-238c-48db-82cc-3b2d7b9f0149",k.Voice_shadowdragon_barks_friends_yet="6d1c9fe1-9fb1-4b93-b6a5-381e03d3ffdd",k.Voice_shadowdragon_barks_get_stronger="39e22e54-5cbe-49f7-985d-cb57f145929c",k.Voice_shadowdragon_barks_give_up_too_easily="d031c2ef-dba7-4530-83b9-e93fa17a51bb",k.Voice_shadowdragon_barks_good_challenge="d9572171-1a4a-4035-ab0a-c62c3ac14da2",k.Voice_shadowdragon_barks_handle_my_shadows="536c4ca2-ac0c-4c2b-8062-3c13c575fc12",k.Voice_shadowdragon_barks_hasnt_come_back="8a44a303-3543-4a7b-a6c6-344d9aeb759c",k.Voice_shadowdragon_barks_help_you_get_ready="5bfbb582-520a-47ea-942c-813e0bfa4d1f",k.Voice_shadowdragon_barks_help_you_get_stronger="6a60c4bc-8518-4b63-97e6-c7326cfa7de7",k.Voice_shadowdragon_barks_here_again="6d348128-b855-4ef5-9a07-47e5de681b55",k.Voice_shadowdragon_barks_i_believe="0660a731-011d-4a50-ab91-abb2efd9691b",k.Voice_shadowdragon_barks_i_can_beat_both="43c93a9e-0748-4aa9-9a6a-07df381004d5",k.Voice_shadowdragon_barks_i_can_trust_you="d9ef0f7a-435d-43b8-8f54-df585e51396a",k.Voice_shadowdragon_barks_i_guess="c4503ad1-909f-45eb-8924-a1d14b6dc930",k.Voice_shadowdragon_barks_i_knew="9e86e248-58cf-48a5-8a79-386362e889d9",k.Voice_shadowdragon_barks_i_wont_be_defeated="d56e83d1-dfb4-44d4-9227-99b392000502",k.Voice_shadowdragon_barks_ill_be_here="ee418f32-e3d0-4535-bd7b-d37bb627610f",k.Voice_shadowdragon_barks_im_glad="6db4512b-ea23-49c2-a777-1ed847ce06a0",k.Voice_shadowdragon_barks_keep_fighting="6e37cc0a-2df0-48fc-aa87-b681fcdd5d08",k.Voice_shadowdragon_barks_keep_up="1d64f1e8-c430-4323-9694-00520a2911d6",k.Voice_shadowdragon_barks_let_you_escape="369d1694-bebd-4d29-89c9-f603c1bb606b",k.Voice_shadowdragon_barks_little_shadow="df9bfddb-b596-4287-8e18-bce1551fb774",k.Voice_shadowdragon_barks_look_so_scared="afba3c41-8388-4a7e-bdce-7644071ef16c",k.Voice_shadowdragon_barks_lost_again="114b09b8-34fa-419b-9e02-7aae7c64d53a",k.Voice_shadowdragon_barks_maybe_not_like="ca7c8501-c9eb-475e-bf2f-328a66a520b0",k.Voice_shadowdragon_barks_miss_me="6d825909-963f-4f64-a7a5-56242539a144",k.Voice_shadowdragon_barks_most_run="60f026a8-1343-47a5-bc66-9715e88adc49",k.Voice_shadowdragon_barks_need_a_friend="d9ffaa94-2345-45d5-a3d7-2a8c222092cb",k.Voice_shadowdragon_barks_need_to_train_harder="b15e9e10-a99a-4f55-be24-3c991f064552",k.Voice_shadowdragon_barks_new_friend="2194329f-fec8-42a1-8e98-3aceb370fce7",k.Voice_shadowdragon_barks_not_like_other_dragons="2ed4e11c-cc2b-45cb-a003-0a425eb74969",k.Voice_shadowdragon_barks_not_like_the_other_dragons="5b90f22e-922c-45b8-86fe-e60838afbb40",k.Voice_shadowdragon_barks_not_like_the_others="35e3e01d-aa1d-496f-9285-9c9c43eccb60",k.Voice_shadowdragon_barks_not_scared="d960476c-a628-4961-b550-a98e1d00f6fe",k.Voice_shadowdragon_barks_oooh_which="d1d313e1-6a36-4375-8996-92f72b319033",k.Voice_shadowdragon_barks_penumbra="16d54f67-a510-4171-adae-d0ac567bd595",k.Voice_shadowdragon_barks_penumbra_is_my_home="dfba1dc3-30f5-4bc7-98a8-41ab98c5412e",k.Voice_shadowdragon_barks_play_rough="11100f80-1fe6-4ce4-b2da-6dedd889e5bf",k.Voice_shadowdragon_barks_play_so_rough="e7cdaff6-0d0e-48c5-b455-2b7473b9f1bf",k.Voice_shadowdragon_barks_promise="b6b1413d-0dc4-493a-b1c0-0b5b8b033a7f",k.Voice_shadowdragon_barks_puppet_master_found_me="f8224e9e-7465-497c-9197-66b9746d7ac1",k.Voice_shadowdragon_barks_puppet_master_play_too="eb2495cb-b65f-42d8-a181-831ebb9c675a",k.Voice_shadowdragon_barks_ran_away="2dccaee6-47d8-4167-81c5-0cdd262c4ff2",k.Voice_shadowdragon_barks_ready_next_time="df1d50e8-24b0-4160-9d0f-2074c6899147",k.Voice_shadowdragon_barks_run_away="209101f5-9d8d-45b5-921e-52c521e626c2",k.Voice_shadowdragon_barks_run_away_from_me="f151c74e-1091-46fe-be18-b35fe491b830",k.Voice_shadowdragon_barks_runs_away="cf4d0c1e-de58-4e0d-817e-d6f35253a83d",k.Voice_shadowdragon_barks_scared_of_the_dark="448383f1-6956-4861-b6c3-971743f60d99",k.Voice_shadowdragon_barks_scared_yet="a496e4ed-9be2-451a-aa2e-59f8421bf0d6",k.Voice_shadowdragon_barks_shadows_gather="7ac3d64c-3790-4c73-8968-a477702ead49",k.Voice_shadowdragon_barks_show_puppet_master="79ea3125-e676-4c67-9cb2-0baff194a29d",k.Voice_shadowdragon_barks_so_easily="8873f717-e2ef-4b61-922f-54f3b976c836",k.Voice_shadowdragon_barks_spirit="413aa94d-d7b6-4eb5-b592-53405722730a",k.Voice_shadowdragon_barks_stronger_now="19c4998b-ecdf-4809-8ba8-d476d2a550d2",k.Voice_shadowdragon_barks_surprised_me="6a6f0469-3444-4db3-91d3-d291189a1b69",k.Voice_shadowdragon_barks_thanks="05d8e6f5-084c-44c7-9c7b-1bf576ba5981",k.Voice_shadowdragon_barks_that_was_fun="6e4d44ff-4b6f-4620-9339-641170272dc8",k.Voice_shadowdragon_barks_the_other_dragons="6832c74a-8e22-49ce-a820-b15b1a01b847",k.Voice_shadowdragon_barks_this_will_be_fun="9fd9d424-28a0-4c15-99b2-6b942775f7e7",k.Voice_shadowdragon_barks_training="dfc05d25-580f-449e-adbc-c3bee26c0226",k.Voice_shadowdragon_barks_training_hard="0f53b8cb-6cb4-4f9b-a08c-b7ab62f0752e",k.Voice_shadowdragon_barks_tried_to_catch_me="ce029a0a-31d8-4b72-803f-1512bbd257a2",k.Voice_shadowdragon_barks_understand_the_world="25f4aa2f-74d9-4512-a028-1e81f0fbd1cd",k.Voice_shadowdragon_barks_very_brave="491d51d7-f92d-47bb-81fa-9ea0afefb99f",k.Voice_shadowdragon_barks_want_to_understand="05d6fbc9-9c0a-4f57-b987-5d4120f4e198",k.Voice_shadowdragon_barks_we_can_be_friends="97dd64ea-1acb-454b-9581-ce3b915d4abd",k.Voice_shadowdragon_barks_were_both="8959790b-f840-4814-b30d-a22224c726b3",k.Voice_shadowdragon_barks_win_this_time="151025aa-15e5-4beb-8e84-2a637407ef96",k.Voice_shadowdragon_barks_woah="7eb84b41-7942-40eb-b327-e1d59128e694",k.Voice_shadowdragon_barks_wondering="a95066e3-697d-4bd8-8b65-85570e30bc88",k.Voice_shadowdragon_barks_wont_bite="eab1886d-b2be-4f00-a483-932f7d875a3f",k.Voice_shadowdragon_barks_wont_go_easy="751fca3e-ea17-435a-ba45-356cc5270736",k.Voice_shadowdragon_barks_worthy_opponent="79a34676-3b3a-4d65-85d4-26cdf38239a2",k.Voice_shadowdragon_barks_wow="cd5540b1-7763-47ef-af13-8c5b271e0f91",k.Voice_shadowdragon_barks_you_actually_beat_me="01df7a4f-fd26-46f6-a2ce-5e3e24c0a792",k.Voice_shadowdragon_barks_you_lost="2ad5a136-5bcd-47b0-b00f-0bbea4293ea7",k.Voice_shadowdragon_barks_you_won_this_one="d6363d52-3fb7-4f5f-ad72-7593e5027acd",k.Voice_shadowdragon_barks_you_wont_beat_me="8078c6aa-420d-4da7-909a-f6258b6df951",k.Voice_shadowdragon_barks_youre_back="9144cc7d-7852-42c5-954c-6e4d89150a40",k.Voice_shadowdragon_barks_youre_different="aae521ee-43f0-46a8-8398-793088d0b9bb",k.Voice_shipwreck_shoreQ5="538c134f-7892-4b58-8ff1-7aa0bc80bccd",k.Voice_shiverchillQ1="e81783f4-742e-47a9-b678-e835f5511729",k.Voice_shiverchillQ8="2d4cf644-4954-451d-9074-472f8f3867c2",k.Voice_skywatchQ6="e0a70bed-40d0-4dd1-8c74-094465363f63",k.Voice_theo_ftue_battle_1="b898c3a9-37ff-49fa-b3ed-50b69b562bff",k.Voice_theo_ftue_great_hall_1="2c61e59f-9268-447f-b74a-ca671cab5e8a",k.Voice_theo_ftue_great_hall_2="b968c2b9-2482-4579-8c22-1b9ba0c5f156",k.Voice_theo_ftue_great_hall_3="583fd3f3-0524-4029-b572-1dce7f0044e3",k.Voice_theo_ftue_status_effect_academy_1="e84f4a71-67cd-43b4-abf4-95a51a2b6998",k.Voice_theo_ftue_status_effect_academy_2="0ccbad51-4ecf-49e3-86a2-8319cc079a86",k.Voice_theo_ftue_status_effect_academy_3="173ef992-3667-4df8-8961-b25a1a81dc93",k.Voice_theo_ftue_status_effect_academy_4="2360f0d6-daa7-41a0-bd56-97737a18bc4b",k.Voice_theo_ftue_status_effect_battle_1="2ae12b93-aab3-4860-9093-3ef5f016eb9b",k.Voice_theo_ftue_status_effect_battle_2="1cf0ff98-caab-4e6e-ac85-2e62d5ac35d7",k.Voice_theo_ftue_status_effect_battle_3="436bede8-752f-44f7-8b27-c68f348ee867",k.Voice_theo_ftue_status_effect_battle_4="e5bcb33e-5b1d-4426-8b63-2c3eb5f5dcde",k.Voice_theo_ftue_status_effect_battle_5="44416e68-e18b-4656-870b-613fd5cc460f",k.Voice_theo_ftue_status_effect_battle_6="1405942d-a77b-4169-bd56-8f88c5a015df",k.Voice_theo_ftue_status_effect_intro_1="c52ed43b-5079-4bfc-829a-eb93524974b3",k.Voice_theo_ftue_status_effect_intro_1B="2e99ec10-5627-4241-90d9-fd45ca0f731f",k.Voice_theo_ftue_status_effect_intro_2="e58f1db4-5b14-4514-9b7c-114e35cdf531",k.Voice_worldmapZoneLockCutscene="de25b378-9651-474b-ad75-c18eb6ba1212"}(F||(F={}))},85855:(k,B,U)=>{"use strict";var F;U.d(B,{V:()=>F}),function(k){k.Bgm_academy_greathall="e79dc398-f0eb-456a-af9d-1759d9c32fb2",k.Bgm_ancient_battle="0ef7576d-f3c1-4191-85b7-d769782cd8ee",k.Bgm_ancient_hub="0d3050e4-dd5e-4502-bf75-b1af732717dd",k.Bgm_ancient_map="543a6fcc-3ea6-4c27-9b9e-31994ec6d4f5",k.Bgm_ancient_rune_run="b15669da-9a8d-411e-98f2-099a4985c744",k.Bgm_archives="0fcec453-ff3f-4a64-bffd-2abe3120d115",k.Bgm_arena_challenger="2d354a8a-5184-4e0e-aa91-c6f9ecab09ec",k.Bgm_arena_leaderboard="3406f114-73e0-4973-b5d3-6c7edce3613d",k.Bgm_arena_league_battles="db9a057e-1131-4177-a82b-32943cfa53ef",k.Bgm_arena_lobby="19802a7f-5458-434c-9571-f10fcc45dd7f",k.Bgm_arena_progression="25d8dbb6-7775-4306-92d4-5fe36054dbf0",k.Bgm_arena_progression_cheering="d36870e0-ca0b-47be-991f-922b9d2949b3",k.Bgm_battle="4d69c3cd-c3c3-4978-9faa-7a0d711c6a65",k.Bgm_bonfire_spire="56b79d1d-250a-44ae-9364-7e8659020992",k.Bgm_dance1="299f19fd-c6c2-4356-b7fe-5948fc87495c",k.Bgm_dance2="401a961f-d196-40d1-9414-581512ec1077",k.Bgm_dinosweeper="2e553538-13dc-4a08-8ca8-3abd84b5a280",k.Bgm_earthtower_bamboo_forest="7a82929c-5511-495e-b434-a9aa27d7b8a3",k.Bgm_earthtower_dmv_secret_path="debd0200-6fee-4cc3-9297-4aa544e1ba0a",k.Bgm_earthtower_tropical_rain="db8ebe45-6749-4aa8-89bd-270dd20adff9",k.Bgm_firefly_forest="7ab9248d-63bb-4b18-a49e-32e95db8926e",k.Bgm_floatlingfling="7a5ef731-9314-4758-af3a-bbb6897767f7",k.Bgm_fun="91474aa9-9e54-4e4c-a1e7-07a4786f2130",k.Bgm_game="305dcdfe-5032-4fcd-a67c-f79ef3ff27f7",k.Bgm_icedungeon_boss="b64946bb-416e-4770-ae88-f1e6b6c066ce",k.Bgm_icedungeon_inside="2c468736-584e-49dc-8661-36ad146f9698",k.Bgm_icedungeon_outside="c7e05de2-5172-4960-86af-efa13ad94360",k.Bgm_icetower_main="681e4d18-87de-480f-bca3-33f85ef17407",k.Bgm_icetower_postrescue="163aa033-7921-4c72-8922-4c771493f689",k.Bgm_intro="a5fb84ed-9ca3-4f74-b745-1d3090c54fed",k.Bgm_intro_1="79c8287b-4a2c-4ed1-82ab-90bb619abf63",k.Bgm_lamplight="d42586bd-91f8-4578-996a-fdc0d17237d0",k.Bgm_moonlight_fest="592d8b21-1913-4da6-89ba-13b21e28d0f3",k.Bgm_pumpkinfest="d6e99986-35da-4899-90bb-b4e291288e48",k.Bgm_puppetmaster="d276bd04-abc5-46dc-b343-8bc6156a4be2",k.Bgm_shipwreck_shore="dd76fa12-7677-49cf-9fc8-e2a1fd14052e",k.Bgm_shiverchill_mountain="b48326bd-3a03-4770-bfdd-882ac9e0cf35",k.Bgm_skywatch="2f6b8966-8f6e-4936-b45e-23489f9fb33d",k.Bgm_space="04bd8ce1-1834-463b-8d83-ef04365b6676",k.Bgm_spring_fest="9dcfb88c-e09d-44eb-8812-6e2305ddb7f8",k.Bgm_starlight_festival="d0754bb7-8e21-4efc-bf38-5de2220f92be",k.Bgm_summerfest="623499b8-4e36-4e36-98c9-6e9503e3b6bd",k.Bgm_towertown="ea3c00a3-0fdf-4775-8b3b-2bcac93220ac",k.Bgm_tutorial="e402e5e8-273a-49be-92aa-f7be3a2b8366",k.Bgm_victory="b86b6bd3-89e2-4fba-926c-3484be60c994",k.Bgm_victory_short="b86b3ce2-99b0-47bf-9117-17dbb5a46826",k.Bgm_winterfest="82ed0747-6d7a-4906-85ab-116ac792df86"}(F||(F={}))},25308:(k,B,U)=>{"use strict";var F;U.d(B,{e:()=>F}),function(k){k.Academy_endgame_encounter="0071cba8-e2e2-422c-b8cd-4f3ad8563458",k.Bonfire_spire_c3_encounter="19ac6101-24f1-4cf0-bb10-73690aba013e",k.Bonfire_spire_hard_quests_encounter="73670a90-6da7-4fab-9ff2-953b83c58103",k.Bonfire_spire_quests_encounter="faafed48-8d48-47ea-9d96-5a0830a63293",k.Ftue_revamp_normal_special_encounter="14ab8d41-0c4c-4c75-b659-b4a346c4b373",k.Hard_boss_encounter="8d0e2b18-2366-4333-99f1-ec74bb352975",k.Hard_first_encounter="c933b784-759d-4f0a-a3f3-665da315df86",k.Hard_random_encounter="e6813f4f-48b6-41b9-81d4-19e0309e1f93",k.Hard_special_encounter="c8d839ee-a16d-492d-b333-1e66f8f5e81b",k.Normal_boss_encounter="4958320f-36a0-411a-bf69-dad1c44d76c6",k.Normal_first_encounter="99f8b1e3-1e2f-43f3-92b2-05c0dc31891a",k.Normal_random_encounter="22d3b88c-cbee-49af-9169-54cf0bbb5534",k.Normal_special_encounter="0e58412d-c80f-4886-aacc-9757c8f5f2e3",k.Shipwreck_c9_encounter="57f3493e-c9c4-4874-9a83-5dd72b9ac86a",k.Shipwreck_hard_quests_encounter="f1878d64-5eb7-4001-9947-b046216fc651",k.Shipwreck_quests_encounter="93c88d25-382d-499b-a395-8de32ffa9f4d",k.Shiverchill_b6_encounter="a990c753-2d35-447c-afbd-f9a80c7f5e99",k.Shiverchill_hard_quests_encounter="b955f0d2-b24a-4bd4-a5e7-3151157e998f",k.Shiverchill_quests_encounter="2c37a6e7-1987-41cd-8538-2820b48545b7",k.Skywatch_c3_encounter="6a9f55dd-d6f2-4b04-ba0d-532689e4a1c0",k.Skywatch_hard_quests_encounter="aeefc86b-099d-4502-bd39-490cebcb5fb1",k.Skywatch_quests_encounter="bc205792-bff1-4d0a-a807-ccd123214f6f",k.Test_encounters_encounter="7c1a528d-3836-4472-b50b-25d627e19280",k.Tutorial_quests_encounter="2bf2e1df-52bf-4895-bfb5-2037d634ac1e"}(F||(F={}))},24521:(k,B,U)=>{"use strict";var F;U.d(B,{r:()=>F}),function(k){k.After_school_widget_ftue_json="6969a2ef-da8a-4ccf-863e-461b58a98be9",k.BackpackConfiguration_json="5f644853-2216-475b-b14c-76274465edf8",k.BattleRevampConstants_json="c56d5e8f-8ae7-4fe2-9771-58bd051834ca",k.BossBarks_json="545f26e5-613e-4a3c-8fdf-6f344a460e41",k.CombatFormulaScalingConfigs_json="6482e360-92af-498d-ae82-789a13031cd5",k.ContextualPrompt_ChargedLevelUltraUpsell_json="128abe36-af3e-41be-9583-e861fd21229a",k.ContextualPrompt_MemberJarDualPackage_json="f774fbe7-97a4-4ee3-9c90-b427884b7a35",k.ContextualPrompt_MemberJarUltraFocused_json="018f747d-3a21-4bca-a1a0-dab3a4cac180",k.ContextualPrompt_PetEvolution_UltraFocus_json="efd93c6d-90f3-4c86-87ce-c5b36ee21027",k.ContextualPrompt_PetEvolution_json="b6f8a3f6-2e77-44fa-9943-42f2ebe922d4",k.ContextualPrompt_PetRescue_DualPackage_json="94933ceb-337b-49c9-9c06-68359f524560",k.ContextualPrompt_PetRescue_UltraFocused_json="0d85d143-1359-41cd-8da8-3dfd2fea4974",k.ContextualPrompt_PlayAfterSchoolAd_json="6baed730-3fc3-4955-87dc-7b6bb91df8c5",k.ContextualPrompt_SegmentedOffersDualPackage_json="13db027d-8766-43eb-88c6-b58d15505985",k.ContextualPrompt_SegmentedOffersUltraFocused_json="88b12f43-3da5-40ad-95c2-c5d76f7de2f2",k.Dragon_isle_reveal_data_json="5065775f-d3a2-4209-8479-19ae49ed68d7",k.DynamicParentPromptRuleset_json="8ec01565-e4ac-45d1-a2fb-a7395c4783f3",k.DynamicPromptConfig_json="df500fe0-f798-40b0-9461-2c383a2fa8c8",k.DynamicPromptRulesUnifiedFlows_json="b3826cf8-dd1d-41a5-a50d-f298d0c80853",k.DynamicPromptRuleset_json="9aa328f2-2089-4aeb-983f-4cdc8b00cf0d",k.DynamicPromptTest_CatchMorePetsShortTitle_json="955b59ff-9f54-43e4-b456-9938041bcba5",k.DynamicPromptTest_EndofBattleMemberChestShortTitle_json="93a1d4fb-c9da-43f6-a87d-48cb167768b4",k.DynamicPromptTest_NonMemberStarJarShortTitle_json="97259080-624f-4a5e-82aa-14fd7a5ee20b",k.DynamicPromptTreasureTrackUltimate_json="cf67faf2-aa94-4b74-9661-c1d6b040739b",k.DynamicPromptTreasureTrackUltraOffSeason_json="01065eed-02f8-4203-913d-d5fcfc0d487d",k.DynamicPromptTreasureTrackUltra_json="dc7fc8c3-3327-4498-81b6-7f14683b8a18",k.DynamicPromptUltraUpsellInternational_json="ea57623f-18fe-420d-9e5a-a19b30b686b7",k.DynamicPromptUpsellMagicoinInstandReward_json="d8b140e5-84b3-40eb-becf-65bf7135dd39",k.DynamicPrompt_BattlePassMobileUpsell_json="515f4c90-5ca4-49b0-9483-57e1909161aa",k.DynamicPrompt_CatchPetsValentines_json="b4b848fa-0c9d-4305-afd8-7b5dc83a4d2f",k.DynamicPrompt_DualOTPUpsell_json="e0536b94-973b-49db-a7a1-110c8ba3c538",k.DynamicPrompt_EvolvePetsShortTitle_json="4f955752-39c7-4f2e-8d01-907c572a1e0b",k.DynamicPrompt_Getmoregear_json="9ef3fb60-208e-48e7-9c9f-e138cb50ae1b",k.DynamicPrompt_MagicoinOTPOffseasonUpsell_json="d6ee0487-11ee-41fc-b4fa-992290c1c984",k.DynamicPrompt_MagicoinOTPUpsell_json="c2fda55e-ff25-4aae-b5cb-6c3469d25a54",k.DynamicPrompt_MemberJarAd_json="422f9260-af01-4be7-89a9-cb033c46704e",k.DynamicPrompt_MembersgetSevenLevels_json="627c09b0-2e80-46af-9d01-cd07c99e1093",k.DynamicPrompt_MembershipForMagicoin_json="cae370bf-f848-42b2-a667-8fad5b623458",k.DynamicPrompt_MobileMagicoinUpsellOffseason_json="c77ebacb-d171-4e78-b36a-7cb1cb4524d1",k.DynamicPrompt_MobileMagicoinUpsell_json="6dd2e248-5b64-4a67-82ea-2ae2b7e7ac03",k.DynamicPrompt_MobileMembershipUpsellOffseason_json="c28a8d45-0b2f-4138-a84e-3b7609c1926b",k.DynamicPrompt_MobileMembershipUpsell_json="9661c8f1-1e7c-4792-9458-002687716187",k.DynamicPrompt_OpenJarButton_json="a75b1e1b-b5f8-4ea0-9ae8-23763dcf5622",k.DynamicPrompt_PetGear_json="a509c42c-d4c2-4168-a696-82f6f374b62b",k.DynamicPrompt_PurchasePetSlotsGift_json="5218578b-aac1-4f5d-b8a2-852fb2970f5d",k.DynamicPrompt_PurchasePetSlotsLimit_json="e3165125-c079-4726-be78-7ba60a0913ea",k.DynamicPrompt_PurchasePetSlots_json="fb30b74e-3ff8-4b05-bd6b-9621a2ee3611",k.First_dragon_defeated_data_json="0a6642b9-0aed-40c5-9b46-b58f52b09538",k.First_dragon_orb_data_json="46d21f09-4aaf-4b8f-a1e7-33dba96a5004",k.First_dragon_rift_data_json="68d4183a-5551-4080-8076-f176fb4d60fc",k.LevelBasedPromptsRuleset_json="65e6f811-e988-4198-a4fe-370f5fb28821",k.MemberJarData_json="ac37cca1-0981-4fc6-b6ef-9904e7991f19",k.MembershipStep1Config_Buy_EquipMemberItem_School_json="2d213a07-b981-40fe-92b0-6808bc0b8ac3",k.MembershipStep1Config_Buy_EquipMemberItem_json="290091be-a590-4969-b62a-5483b45680fd",k.MembershipStep1Config_CatchMorePets_School_json="0a124599-a016-48aa-939f-35a3462f62ab",k.MembershipStep1Config_CatchMorePets_json="cad74b0a-09d1-485d-a861-25c4f3747c74",k.MembershipStep1Config_EvolvePet_json="0a06384a-d7c9-4394-a4c1-4607bc552fb9",k.MembershipStep1Config_NonMemberStarJar_School_json="bc21cfcd-9f66-4e48-b92d-33756651e143",k.MembershipStep1Config_NonMemberStarJar_json="87219a5a-55bd-4642-a21f-34167572c946",k.MembershipStep1Config_OpenMemberChestBattle_School_json="8dfae2c6-a015-4d22-aa7b-a6062ccab10a",k.MembershipStep1Config_OpenMemberChestBattle_json="bd389f39-2eaa-4077-9ead-62b903e1c1ab",k.ParentPromptConfig01_MemberJar_json="8636b574-483a-4894-adad-0cd49ea7070d",k.ParentPromptConfig01_json="490111de-8144-48ca-82c8-729e55b49adc",k.PetBenchVariationConfig_json="dcef6a62-180e-40c5-912b-4c87b654cf75",k.PetEvolutionandRescueCosts_json="07a10eba-c03a-41eb-9131-9a1c37becf85",k.PetMergeCosts_json="2fdf3d4d-cbfb-476e-b2b9-e3a96615f8e9",k.PetOwnershipRestrictions_json="280e0d39-ee59-4276-b4ce-3ff056903cd7",k.PetXPBoostData_json="4367ab33-751f-4600-8d2c-6886bd8f45a8",k.PlayerStorageMaxCount_json="1686c319-a09d-4522-baba-db85287da661",k.Post_first_rift_data_json="084fdb6e-6a11-43eb-ad7b-6a255cc4d64a",k.Post_first_rift_key_data_json="a43cf21c-bb27-491b-8fb7-ca11db110817",k.Post_pm_visit_data_json="1df305b4-93c3-4e2a-bc10-3df0a618d177",k.Pre_pm_visit_data_json="62f6f8af-d1d3-4876-9365-25a9bf3be9e4",k.RiftRunKey_1_json="3bf8a670-5afc-4113-8d51-eec627555d6a",k.RiftRunKey_2_json="38f2fe53-fe57-4046-b642-cbf34807ddfb",k.RiftRunKey_3_json="478eefb5-a10f-41c1-abb2-7b4a38d17193",k.ShadowBattleBackgroundConfig_json="20742cd9-a066-4292-8988-5a3a707cb618",k.SpellLevelBonusConfigs_json="23aeefbc-e0f6-40aa-b311-f058cefd6ec3",k.SvSLeaderboardRewards_json="00a0e127-2a9d-45f6-ada9-1f1fce3828b2",k.TotalUnitStatsGrowthCurves_json="2d946b19-14fe-4267-917e-3696b8360504",k.UltimatesPetLocationConfig_json="c63ad7c2-0ba0-42c2-8bdc-308a4e91945d",k.UnifiedConversionFlowRuleset_json="24912fe8-527f-4631-8e77-ad52043ba316",k.UnifiedRewardScalingConfig_json="20f8d71f-5e79-4f3c-9624-42229eb09587",k.Voice_Rifts_Barks_Phase1_Lose_FireDragon_01_json="3d2bc486-3508-43a4-96ed-a3431ec5a093",k.Voice_Rifts_Barks_Phase1_Start_FireDragon_01_json="d555f6d2-01e2-4171-a1a1-989b93450d11",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_01_json="0761b82b-0690-40fb-84e1-8e10b2aac836",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_02_json="d8c018a7-598b-4424-ba6d-e1ad554fcb42",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_03_json="a150ea6d-e102-4d4c-a00b-f8da8aec2116",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_04_json="e6933f58-42c0-4f6e-8712-40ffca4674d2",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_05_json="858390b6-787e-428a-a3da-01347ea4b991",k.Voice_Rifts_Barks_Phase1_Taunt_FireDragon_06_json="f6c8ba5a-124c-4b3f-af49-ca8ca414946e",k.Voice_Rifts_Barks_Phase1_Win_FireDragon_01_json="bd09159e-9c37-4fb6-adc1-f0c07367fc58",k.Voice_Rifts_Barks_Phase2_Lose_FireDragon_01_json="8226543d-87dd-4a60-b4d2-d04bd158e29f",k.Voice_Rifts_Barks_Phase2_Start_FireDragon_01_json="1ce2d62d-8236-4215-a17c-b93c9247990e",k.Voice_Rifts_Barks_Phase2_Start_FireDragon_02_json="b8007e12-2382-43b3-b945-284572e6b431",k.Voice_Rifts_Barks_Phase2_Start_FireDragon_03_json="b8dad1de-dcba-4ed2-ac2e-ccf4c622ea02",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_01_json="da79692a-5c2a-40d9-a4b8-b7acbab71c8d",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_02_json="1468c2b2-f2f7-41e5-95bb-f8e9448b47fb",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_03_json="b4a22af1-e2d6-4be3-aeba-11f3806295ea",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_04_json="b23fcb9a-0739-4b63-b0b0-05cd90580943",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_05_json="c9d04c5c-ad6a-4821-87c9-2b3d7b2d4863",k.Voice_Rifts_Barks_Phase2_Taunt_FireDragon_06_json="dacb35a2-c36f-4478-a9d5-71bd5e1c30d7",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_01_json="4f234272-8d10-4b0e-a550-df19b085d8a3",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_02_json="a7149d01-d0ea-4e53-902c-1d3383230e1c",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_03_json="9d7debca-1260-4d6e-838f-cdf5c0856913",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_04_json="7bcbec87-66cf-4f29-b4ce-4070f3c3bd3c",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_05_json="14538950-bd4c-4ec7-a1bb-5b4f6fd33c8b",k.Voice_Rifts_Barks_Phase3_Lose_FireDragon_06_json="6ef3802b-821f-42eb-91b4-379ebcfccfec",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_01_json="05c20b4a-8e33-4e3d-bc86-c4fca2e2b803",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_02_json="d83a5148-10d9-4dcb-be61-038b2e811059",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_03_json="dfd0e080-c489-4bac-9bc2-2b6558fc3499",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_04_json="05b2a151-522e-4fd9-8790-69512be50856",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_05_json="4ceb8f37-9cc4-4204-b5f3-8eab63dea0df",k.Voice_Rifts_Barks_Phase3_Start_FireDragon_06_json="817fe756-3fa1-4a92-b218-cd8799224e18",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_01_json="ca29fdf1-e90a-4874-8a8a-c1939fdf8a3b",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_02_json="f1851e4a-96f4-43d4-bbaa-f7860a9c7184",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_03_json="c7a0d0a9-1222-45a0-bb59-a8c99f8fc20c",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_04_json="27f03455-fa1e-4ef7-87f3-f935b37bd3eb",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_05_json="71677675-4b5e-4d74-862d-7c85e7f7b5ba",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_06_json="d7e87223-a19f-47f2-8ebb-df26381f1d2a",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_07_json="c65b0fbf-ec36-4cbc-aeb8-1b025c5b4c3b",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_08_json="aa269dfc-0bf9-4105-9e67-f7ffb519402b",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_09_json="8ed017fd-4e13-485b-98b3-438f2e416e1f",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_10_json="003686f2-282b-41f3-9f0d-b153b1f215c9",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_11_json="98cb63d5-bb0a-47b1-9acb-20c9ea82af5c",k.Voice_Rifts_Barks_Phase3_Taunt_FireDragon_12_json="6b8bcb51-7383-42d0-8d11-686d4833cb36",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_01_json="034533b9-01c1-4945-b122-6e922dc1a1ab",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_02_json="cf3ec4e9-c554-415d-9b2f-ffe4d9c88289",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_03_json="399dc8c0-cfd0-427e-a3b6-e19556558f8d",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_04_json="85990ec6-6791-4806-ab2d-3afe941bc69f",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_05_json="3c359379-e855-4711-8843-902db42658df",k.Voice_Rifts_Barks_Phase3_Win_FireDragon_06_json="64252fa5-fee7-4e29-9ef7-0d2afab8e0dc",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_01_json="50761680-6e9b-4df5-8525-ea250158b177",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_02_json="da9ad08a-f27b-4167-aeb3-1d808f96a929",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_03_json="465faa98-ec02-44a7-9297-62adb2429d14",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_04_json="0ad92380-f495-4255-a695-651251246818",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_05_json="0bb96250-9ec4-40db-8001-7606d03541b0",k.Voice_Rifts_Barks_Phase4_Lose_FireDragon_06_json="6332a42e-1c8b-4a5f-96f5-ef5143e5a5e3",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_01_json="eeac3572-5200-4ca2-b4eb-05ebdebfcf8e",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_02_json="f482bd8e-d44d-41f6-a339-1af621c391b1",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_03_json="130b26c7-9191-4def-852a-3a73527abc0f",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_04_json="3117db2b-31b8-49a3-839b-5e47552e89e4",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_05_json="860589cf-1630-4b3f-b1b0-5213c9639e93",k.Voice_Rifts_Barks_Phase4_Start_FireDragon_06_json="fb7479ba-0f76-4935-9361-56cd9aa45de1",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_01_json="3e712a05-a415-49f3-bae0-f65defe9faa3",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_02_json="411ea9b5-ba39-4ccd-8f80-a4c540b775f6",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_03_json="407b6b6c-0c14-4fe6-b742-cbf6afae595a",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_04_json="fd18c7d6-02bb-46d1-8023-391211b34908",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_05_json="45ace84c-bcbf-4035-af43-9ea1c42a78e9",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_06_json="5c026a93-c9a4-4e82-8bd1-f39920b14196",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_07_json="e214ad3b-e5dc-4c78-8995-e2e6aa21885f",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_08_json="f2c68593-4c77-4541-bb8d-9a8b24bbe835",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_09_json="bb340aac-f566-4a7d-8e3e-c304a09a6a5b",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_10_json="dbad6214-bb00-4103-80cc-5f95dd5fea55",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_11_json="cf793052-09ba-42e6-b75a-b2ea91857419",k.Voice_Rifts_Barks_Phase4_Taunt_FireDragon_12_json="702e373b-a974-45cb-b48e-11fac633b015",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_01_json="001d0528-caa9-4b23-b59f-0407a43feb52",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_02_json="ecddff12-3bd6-4b17-ab81-88fe4cb67b4f",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_03_json="559476eb-677d-431b-b1fb-76091044ceba",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_04_json="90546ad1-c77a-46bc-b8c2-90abac944941",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_05_json="bb133039-c862-406a-bda2-3c88dc5e844f",k.Voice_Rifts_Barks_Phase4_Win_FireDragon_06_json="f49234a0-2415-49ec-9901-8cc9161fc2dc",k.Voice_Rifts_Barks_Phase5_Lose_FireDragon_01_json="ea1f4a8c-8ef3-41f4-beb6-d5482eefc012",k.Voice_Rifts_Barks_Phase5_Lose_FireDragon_02_json="4e4511e9-2bad-429a-8eb7-01f84d2cb216",k.Voice_Rifts_Barks_Phase5_Lose_FireDragon_03_json="7bab4dde-6b43-4c35-8173-f09e2c0118f6",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_01_json="681abc3d-6d19-4b8b-b953-57ca1b747be2",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_02_json="dbea9b4a-9a39-47e7-9736-9176249a66fb",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_03_json="09bb0755-a44f-4c05-81dd-4ce67f49d1ed",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_04_json="d3877042-9aac-4a11-b58a-b9be4dd2918a",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_05_json="929baa59-c68b-41fe-97a6-5792bc91a1e3",k.Voice_Rifts_Barks_Phase5_Start_FireDragon_06_json="4461cf9f-9009-4147-936b-2ff3f1282343",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_01_json="f5ee754f-a984-4342-9891-5dbecdb6b482",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_02_json="f0d0cfb9-dd2d-4b48-bdaa-1e3634ae4d97",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_03_json="445360f6-52bf-4aca-a8ee-22d9ea19e297",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_04_json="010e9f52-2c20-4b40-986d-aaa730d14a07",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_05_json="411e62d6-d2f3-4aba-8244-7568d88b73ff",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_06_json="7859f25b-2d09-40cf-92d6-084de8ec2d90",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_07_json="a1c6f3d0-6526-4724-bccc-e37ea0ad0b0c",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_08_json="0f861975-5cb4-41a2-bf4a-ff6507a1fae3",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_09_json="1bc9218f-add8-41c8-91af-00b092afe0c4",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_10_json="51dd2076-d0d2-4bb5-8afd-d9d4abb68cc7",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_11_json="8426fbcb-61f8-4462-bea3-48c1d218a87e",k.Voice_Rifts_Barks_Phase5_Taunt_FireDragon_12_json="4da11a89-7188-439a-a738-5e22f1670fd9",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_01_json="02ae6917-788c-41cd-86f6-0c61ddb69a34",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_02_json="7e83eb50-8fd1-4350-8d6e-44fbc46e1766",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_03_json="ee13ba68-a812-4aa8-8e0a-1f40a4d95234",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_04_json="35553890-6c40-4c06-90df-a607413dee1a",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_05_json="0b9eeebd-5a3c-46c6-a584-03f0f8a950bb",k.Voice_Rifts_Barks_Phase5_Win_FireDragon_06_json="9cabed87-e325-42cd-867e-bcc9b8d96d52",k.Voice_bonfireQ7_data_json="07332468-8c1e-4ea8-abb6-0ffa8392b786",k.Voice_costumes_tutorial_json="34500f57-86af-489d-8f89-2a0e31249467",k.Voice_forestQ10_data_json="d8446ca3-a597-4522-9d80-924412c26295",k.Voice_forestQ11_data_json="0752384c-7cf2-49d0-a42a-6fc3c9950cd0",k.Voice_forestQ12_flora_data_json="62906b71-0a22-4933-b9bc-785f474744a5",k.Voice_forestQ12_florian_data_json="ed45ce7c-59e3-4057-ade5-6ce647857b7c",k.Voice_forestQ12_gerald_data_json="36274711-9d79-439c-8873-89dd8990d306",k.Voice_forestQ2_data_json="0547cdab-8c06-4a11-a603-85683987600a",k.Voice_forestQ3_data_json="c21c0bda-e668-4de1-8f05-2a4634fddb95",k.Voice_forestQ4_bok_data_json="b549ec5d-7e48-4bcf-ae40-83b8222bb35c",k.Voice_forestQ4_flora_data_json="0aed1353-5207-4690-a82c-397f482f6d55",k.Voice_forestQ4_florian_data_json="d6febcf5-6531-496c-94b2-abf20468765f",k.Voice_forestQ4_pippet_pm_data_json="0c2de341-f1c1-4134-9728-8d17b4669e5c",k.Voice_forestQ6_data_json="24b751dc-2f26-4c2a-a0a3-6ff6f7c72a83",k.Voice_forestQ7_data_json="bf32aa19-b9b3-4385-945e-6ff03f0e21fd",k.Voice_forestQ8_data_json="6e14fc5e-7108-41db-9b6f-d11ee27e1205",k.Voice_forestQ9_data_json="4c2cd83f-997b-492b-b787-348eb69b4c86",k.Voice_restriction_tutorial_data_json="deff6948-1134-4992-aae5-c8a8e3760c98",k.Voice_returnToFireflyForest_data_json="db83a12c-4016-4ebd-bc12-21f6dd88846d",k.Voice_rifts_barks_phase5_lose_firedragon_04_json="df1e9872-44fa-4de8-90d7-c401ee816f9a",k.Voice_rifts_barks_phase5_lose_firedragon_05_json="911bd81f-3c04-4904-a307-86a999665f37",k.Voice_rifts_barks_phase5_lose_firedragon_06_json="cf50c7c5-b9d2-435f-b762-f59476eff5c0",k.Voice_shipwreck_shoreQ5_data_json="c7a25137-e7cc-4002-96af-0d865320ba5e",k.Voice_shiverchillQ1_data_json="fc922bfd-0be5-4b17-bcbb-8f06d1481836",k.Voice_shiverchillQ8_data_json="94da2fc1-24cf-464a-9b40-4ca1e0b96b0a",k.Voice_skywatchQ6_data_json="5a5e2901-8e98-4a3c-a948-4eafe834777a",k.Voice_worldmapZoneLockCutscene_data_json="f9327d4c-b42b-46f4-ac3d-63f75a5afc36",k.WorldInteractablesConfig_json="d3e01c63-1336-46fc-8435-99caffde49f6",k.ZoneRewardsBonfireSpire_json="cacd7360-f3e1-41d1-9c2b-5a8b66bc2493",k.ZoneRewardsFireflyForest_json="c13f55ed-30f7-49cc-a26a-0a9053bae1f5",k.ZoneRewardsShipwreckShore_json="f5b107f0-c1c8-4b41-ad9d-58b18e992f52",k.ZoneRewardsShiverchill_json="d6525574-f8c6-4c2e-8d2a-e169f2cdb179",k.ZoneRewardsSkywatch_json="1de7d516-ac0e-4930-ba9a-2ec742d7b49a"}(F||(F={}))},99625:(k,B,U)=>{"use strict";var F;U.d(B,{l:()=>F}),function(k){k.AcademyCR1="909f60d3-2177-4338-a6ba-756d0de8a138",k.AcademyCR1Hard="cab4dbbc-6f5d-428d-89ad-fff309a2e3c2",k.AcademyCR2="14412c15-d98c-4e34-b15e-78ade05ef979",k.AcademyCR2Hard="5f8d5c73-eda3-4019-9d45-f66432c3b683",k.AcademyCommonRoomSignage="699fc753-98db-4284-992a-f7fa5943fffe",k.AcademyEndgamePostPippet="c150b774-5d89-4d37-9911-12dcfc234283",k.AcademyEndgamePreCebolliniBattle="ccdea3bd-4748-4af8-a7c7-01ce751a47be",k.AcademyEndgamePreGeraldBattle="57227567-fe21-4c95-ae34-c4fabb1f94bf",k.AcademyEndgamePreGuardianBattleBase="6537bffb-d2a5-4532-a037-732b80fa8082",k.AcademyEndgamePreIceWyrmBattle="59c6f80a-eede-453d-9031-74e70c175102",k.AcademyEndgamePreNastyCloudBattle="1993d472-62cb-4744-a48a-8db278fb10aa",k.AcademyEndgamePreOldOneBattle="45bae272-5a88-48a6-8e4e-bb82185e433c",k.AcademyEndgamePrePippet="751fba71-3794-4b18-b1cc-56b11c5fba13",k.AcademyEndgamePrePuppetMasterBattle="236e5c7e-a1d3-4310-9177-1b23c299542c",k.AcademyGH1="20feb7c4-b30e-484f-98aa-c3ac49a238b9",k.AcademyGH1Hard="32a111c0-2f48-44ac-9e69-4c3bed882f25",k.AcademyGH2="f5adc319-7e45-489a-9576-37a081d04f9e",k.AcademyGH2Hard="4f3aeb3c-fe3a-4518-8a49-fd166671b564",k.AcademyGH3="586a3378-09dd-40f6-a821-9d908017ea9d",k.AcademyGH3Hard="6c08c115-3474-4808-8ece-065df3e89d0d",k.AcademyStatusEffects1Cutscene="13251014-3eec-4359-8d03-9ebdee5cb019",k.AcademyStatusEffects2Cutscene="0a77d72d-108b-4fd2-b88f-d80fbf6eb883",k.AcademyTowerExitPopup="81b1f0c0-a916-418d-819e-503b6cf2e1db",k.AcademyTowerExitSign="f510a78c-c78e-4925-aa9a-f39e27e598d7",k.AcademyTowerGotoNextFloorPopup="ce934a91-04c7-426f-8f15-e0e7cf286b95",k.AcademyTowerProgressHUD="69653e47-a7bd-4d50-9d61-5e472da55d51",k.AcademyWalkableScreen="158317fa-8f47-4c13-a985-ab1bdcf2b70c",k.AccountInfoSettings="dc4c4aef-b649-471f-8517-475e85de9a57",k.AchievementCard="f027a0e2-6d68-4e54-93ec-8e98fe5c2fe9",k.AchievementCardWithReward="4ce8d681-6a12-4845-b10f-ebf42407afde",k.AchievementScrollview="7aa91b45-f736-468b-a230-f701e4e5d537",k.ActiveTeamDisplay="cef217d3-c312-4e45-af45-a1a6a9a876ea",k.AdAutoCurrencyEvent="89fa7581-e485-4b95-ae5c-6f4921b20e10",k.AdAutoTitanEvent="65d4dc62-feb5-4865-8639-ee7a45f9e2eb",k.AdAutoXPStarEvent="bfb47856-78c9-40b3-a61a-bea081f80625",k.AdBacking="545d11fe-d959-46f7-a5ec-fd87b7b99485",k.AdBattlePass="06e3d970-1a71-48e9-bfb8-3f3bfa060895",k.AdBattlePassVideo="53a70a22-cbac-435c-b1d8-1077e370148e",k.AdDuelsMatchmakingHighlight="2ccd1460-a520-466f-8b03-0b9e19f5fe1a",k.AdDynamicStoreGoNow="7794ceff-b178-4e26-aa35-942a03130038",k.AdFestivalGoNow="921e3d92-d2c8-45d2-94b5-1e8cf03e1e64",k.AdGoNowNonTeleportTemplate="a6304dd0-4bb6-4529-806f-70b81a946c3f",k.AdGoNowTemplate="deb4a8a1-51f0-426b-b93e-e10124aac6f5",k.AdImageTemplate="e614e66d-6b42-47f9-8cfa-08ed393f42a7",k.AdLootDashGoNow="0c6af7a8-c6f9-4261-bfe2-b478eb2f23d4",k.AdLootDashVideoandGoNow="3f09bdbb-f8fa-4a97-b65b-ff22d89e69ee",k.AdMailer="59100cbc-f17c-4ddc-a5a7-6e4ad28fe5ca",k.AdOpenVideoBase="4ab7d0d5-5304-4c57-9a27-db2268af61ec",k.AdParentAttach="f01830d4-655b-4d55-b3dc-1cda1319c816",k.AdPetGearRelease="fe779b2d-b190-439d-8099-0a042996fbd4",k.AdTeleportBase="cb7c9d1e-812d-4ba7-9033-c8b90d9d9fe2",k.AdUltimatesImageTemplate="8760e766-0703-4cfb-900f-e57d5ff417d7",k.AdUltimatesTemplate="4789d69d-6af5-4935-96bf-2bce636323c1",k.AdVideoAndGoNowTemplate="6f1b9955-bab3-41ad-b547-25edaeb5ede9",k.AdVideoTemplate="7f569c4c-25b8-4b44-8177-526b8ab8157b",k.AddFloor="18ef3003-27e5-46fc-b71a-e59165184d9a",k.AdventureMap_BossBases="34022fb5-3e06-4f9e-9e7d-afc2d3a5d223",k.AdventureMap_BossRewards="cdd7bfe7-ebda-4a1c-80b1-e023608200b3",k.AdventureMap_ItemSlot="39470ffd-5db7-49e5-9b0b-3365f386c002",k.AdventureMap_RowCurrent="137f95a6-1efe-40bb-b5e3-5d73da563226",k.AdventureMap_RowDone="f74b757b-499d-4d7e-82bc-44870a73d7ec",k.AdventureMap_RowUnrevealed="50342091-df38-4d10-86d5-4b62ab768233",k.AdventureMap_ScrollViewLarge="0cbeb534-cf83-4788-97c4-bb7bceed8e84",k.AdventureMap_ScrollViewSmall="9da76592-c6fd-4435-873e-df5681edb1b9",k.AdventureMap_Template="1de822c9-13b3-4b99-aded-e340240c382c",k.Adventure_Chest="5997e7d2-1e39-4dcd-923e-d9596703a358",k.Adventure_Crate="d17939e1-10d6-4fae-8695-1a70059c7564",k.Adventure_CrateItem="02c62104-a3c5-44ad-acbc-d02398349e1f",k.Adventure_CrateMonster="7e90ec3c-2d07-4fe5-b988-71712f531108",k.Adventure_EmptyCrate="2d9e07e9-e5c9-4328-ad3d-7b76921e093f",k.Adventure_GolemEncounter="b3424a57-d677-4d5e-9094-046c94cb3365",k.Adventure_MakaluEncounter="20f58865-7c92-4b2c-9e8b-e44b024fa102",k.Adventure_MemberChest="695f8d56-8dee-413f-acb7-d8d1d269286b",k.Adventure_Monster="4ba5ecb4-f37b-4222-a1f0-723ca2ed5cfa",k.Adventure_SnowPileItem="9db71127-4b69-474b-a14f-2f8e14492157",k.Adventure_SnowPileMonster="75c94731-e067-4b07-ae7d-53520eff2dd8",k.Adventure_SnowPileTemplate="8334b8dd-a9a3-45c7-918d-38deaa562c04",k.Adventure_Teleporter="f640ee73-5520-4062-be29-72bae4e60e6e",k.Adventure_YetiEncounter="3261fd98-0e15-4334-9f66-7ccd7991ee92",k.AfterSchoolWidgetRewardsScreen="0e05d108-0c04-4113-a8ed-4a121d951cad",k.AfterSchoolWidgetSparkles="277c1df5-33f9-4d25-a53c-b45fad0c308e",k.AfterSchoolWidgetStampSpine="5b3feb51-8b48-4089-be0f-5a5e41e1b4e4",k.AllKeystonesCelebration="5e014182-552d-4cad-a90b-142831bd7aee",k.AllShopsMenu="86dccc9b-b6b4-4ba2-8d3b-732bd8c6fa97",k.AnimatedSpineCreature="1c053f80-afa4-4de7-83a9-7bd8658b01cb",k.AnimatedSpritesheetCreature="3af064db-2afc-493c-930a-0b5591be4729",k.ArenaModalDialogBackgroundBase="a67c78cd-5248-4c80-be20-c1628ba91b03",k.AssetIconGrid="7c497e0e-01d9-4557-a9d1-0afd59417b2a",k.AssetIconGridElement="0554201c-99e6-4a85-b11a-c1f47bbb43f1",k.AthenaNPC="b7a81280-dc21-495d-afea-a59bd3924c87",k.AthenaShopNPC="c77cab86-f654-4a74-92ae-e9bc53535d5e",k.Badge_burst="5b57b694-72b4-4b5f-99d4-95cfb062ecf5",k.Badge_particles_loop="027d012c-5320-407a-8a56-718698bde75b",k.BallofGoo="4dba6e64-98db-43a0-a2ff-ecfe492d1929",k.BannerDialogBody="fe2b6457-7aa9-42b9-bcc9-c47ef41b8eb6",k.BannerDialogFooter="9e0a7aab-93ac-4980-946e-25035091b8b2",k.BannerDialogHyperlink="76ac585a-4bec-4c1b-958c-76d19b28dd8e",k.BannerMedium="208f8660-3080-44fe-a92c-7c2485d23051",k.BannerWidget="60d693ed-483f-4af3-a685-331808679474",k.BargoNPC="c99dbcdc-f7fd-44ca-947c-6e7515b610b2",k.BaseHUDWidget="f95072cb-b136-4983-ade0-ca9c4ea51aab",k.BattleCastSpell="e8281bf1-1e28-4240-9568-9d6669265283",k.BattleEnergyOrb="5f0eacd7-0dcd-4326-9856-4a20f3601365",k.BattleOverlayText="ae5bdf4f-d891-4452-ab71-647090e19bbe",k.BattlePassComplexFtueModal="7a80665c-33c6-4a6a-a392-5a00d98fb659",k.BattlePassCountdownTimer="c39c582c-48fe-40c2-acfd-e8b2abf2d784",k.BattlePassHomeScreen="9fbde66a-d17f-424d-9155-6fe4914bf46c",k.BattlePassInfiniteTier="b57e8f5c-554d-4ada-9dfc-1244260838e9",k.BattlePassItemCard="a2916f0a-cb57-4cf9-b9ca-3dbbfad65380",k.BattlePassLargeItemCard="8e5087e3-1a54-4ac8-afeb-5e82d67f242a",k.BattlePassMembershipModal="a7d600cb-c477-47fa-8938-bfcd87ee75c7",k.BattlePassMenuBar="22dc0f9a-11b7-421c-a1e5-e8cbcb4ee93b",k.BattlePassMenuLeftPanel="7cfe1c53-bcec-499e-ae8a-170249c29d20",k.BattlePassMobileUltraUpsell="a2b2e4c1-3e6b-471d-9e93-c373dd830b91",k.BattlePassOffSeasonDialog="d290c15f-e28a-4874-a345-6e6677aa91fb",k.BattlePassQuest="1e509021-6ab6-495b-ab79-a369cb0661fc",k.BattlePassQuestRewardTracker="f8aa45ed-1cd5-4e83-b840-81ca74f5060e",k.BattlePassQuestsComingSoonBanner="656a16bb-2caf-40ad-895c-0e7c30dfb8b9",k.BattlePassQuestsScreen="a6a07acd-0326-4a3c-b053-3a70f1945dfc",k.BattlePassRewardsScreen="4e85d710-0e72-4075-976f-e2bd7b33a0c2",k.BattlePassRewardsScreenItemCard="9795de05-e284-454b-a4be-3631f006bd17",k.BattlePassRewardsScreenItemCardWithLock="aa77dbdc-d02e-4f81-b6ea-9db5d80441e2",k.BattlePassSimpleFtueModal="3394fc35-c2d8-4b87-b1d0-6a0abbf51216",k.BattlePassSimpleFtueModalWithoutClose="efbf94d5-da8e-4a4b-b22c-e04baf1ea423",k.BattlePassThreeTier="0e05abc1-9ea2-4cbd-baff-be5142a39075",k.BattlePassThreeTierInfiniteTier="6699174c-7a92-429a-abd7-e3b3d9067ac9",k.BattlePassThreeTierRewardsScreen="fa38e4bd-4cfe-43af-a6af-805a2e24f53f",k.BattlePassTier="a34748e8-747a-451e-a872-511869c72990",k.BattlePassToaster="7c74b3fb-1c90-4dcf-8e22-86ffe70a5e51",k.BattlePassToasterWithParticles="afc69c08-c6ec-4967-aa36-710617997ebb",k.BattlePassTopBar="dd5dfe37-250f-4da9-b7fc-5c50a8a94220",k.BattlePassUltimateMemberUpsell="2f0f0649-e6a9-4cbb-aea9-d378dbf5e16d",k.BattlePassUltraUpsell="d2c4df87-794b-4878-aefb-26fa172404fd",k.BattlePassUltraUpsellOffSeason="db962882-0dab-48bb-8c4b-ffcb0f7e6275",k.BattleRestrictionsPopup="3d1fa41b-2981-4cbc-928f-5b5b99dd450a",k.BattleResult="5c305e63-28e3-4cca-8be4-5910196c4d5f",k.BattleScene="1ac4dce7-c3a2-4341-ac23-02a5a4f6615e",k.BattleTeamHUD="7c097985-7087-4043-abc7-985918c9c5d4",k.Battywork="a405b70f-e6de-4ae6-8f3f-beed6d9ff4c2",k.Beam_particles="6232b4ff-2fb9-4b4e-a0dd-a0d362d808e8",k.BlockingEnemySpawnPoint="6a37f4d6-911f-427c-87e4-b76006ca7ed3",k.BlueLargeButtonTextAndIconRight_RectTransform="988176d0-042d-48e6-89a1-4e74ea299ed9",k.BlueLargeButtonText_RectTransform="956e86c9-3164-409d-9601-4ee7a68f22ff",k.BlueMediumButtonTextAndIconLeft_RectTransform="12a01b2f-9bdc-4562-9fe9-5b385632cd61",k.BlueMediumButtonTextAndIconRight_RectTransform="4872669c-77d5-4f02-96ac-dca4174fc076",k.BlueMediumButtonText_RectTransform="2040e562-f68c-4c50-a6fe-1261dd1a266c",k.BlueSmallButtonTextAndIconLeft_RectTransform="cbfdca48-c3aa-438f-a67f-4d26d317e74d",k.BlueSmallButtonTextAndIconRight_RectTransform="fd84b30d-b484-4f4d-9b46-e9f3976001cb",k.BlueSmallButtonText_RectTransform="f70cce4d-e26c-4b8d-8ec4-13d249d99897",k.BodyMultipleTrophies="c2a0bc7a-2fee-4e7b-a32c-62e32f4f90c5",k.BokNPC="de379179-512a-477f-9f52-5ad2e72d642c",k.BonfireHardQ13BattleCutscene="0e11e5d5-8533-4bad-8b5b-7a46477863cc",k.BonfireHardQ14Cutscene="88315ca9-6772-4f9d-ba08-bb5849bf1a66",k.BonfireMerchantNPC="737de3f7-fb08-410a-961c-b632be0c8a90",k.BonfireQ10Cutscene="11aadc6d-4fec-4fc7-a079-a8e4e8e7040e",k.BonfireQ11Cutscene="9387060c-d7e9-40af-8be7-22ac926fbc03",k.BonfireQ11HardCutscene="c3da7b0c-5c55-41e3-a0cc-f643cc1a0ff8",k.BonfireQ13BattleCutscene="c032630a-0200-472f-8eb5-2eb4db17feab",k.BonfireQ13Post_battleCutscene="6f3fcf10-90e6-458b-96d4-378493e39ef2",k.BonfireQ14Cutscene="8cfc207e-f7a1-4a2d-98bd-b10e1a0c6608",k.BonfireQ6Cutscene="9141f4be-8410-4ffb-b518-49954409e000",k.BonfireQ8Cutscene="a08b2cc5-bc50-4486-ba3d-d7754b16b2cb",k.BonfireSpireA1="f7feb9c6-6053-44d2-aa4b-d44c93c1effb",k.BonfireSpireA1Hard="f4ed8f38-9a7d-4f99-b059-2e39aa0f0604",k.BonfireSpireA4="67f250a7-6982-42f8-9a65-f0e5ae795635",k.BonfireSpireA4Hard="139fbdcd-1ab1-4124-bb7a-0e8d8ccd3186",k.BonfireSpireB1="b61bfeb5-9898-4413-83d9-1f0c4898d8f2",k.BonfireSpireB1Hard="cced6cd4-6ff2-4ef0-aee3-70ecd77e0cca",k.BonfireSpireB2="e90f010e-8122-49a3-bdd8-5a7b2ea42e1e",k.BonfireSpireB2Hard="e610730b-94bf-40fa-a237-0d8ff712dc22",k.BonfireSpireB4="8366eaeb-240d-454c-945a-452cf4081ee8",k.BonfireSpireB4Hard="d5739b61-a98e-4206-a751-04dcb7bfb397",k.BonfireSpireB5="b5c9a3ee-0e60-4bf4-9589-d5632dcd8f93",k.BonfireSpireB5Hard="ff9c0910-f68a-4d15-a03e-9f165cd06b37",k.BonfireSpireC1="ffe87899-8e47-4ac5-a6b5-dd398a52aa98",k.BonfireSpireC1Hard="da5c82d1-e643-4e80-b644-f0d4d0879bf9",k.BonfireSpireC2="ab844cf2-3902-4ea0-9958-6e9bb437fc54",k.BonfireSpireC2Hard="1c875238-d0a2-4829-bae9-b120a55297be",k.BonfireSpireC3="c4ac200c-042a-46b2-b517-961dcceb1f7d",k.BonfireSpireC3Hard="62d023fc-f383-4791-9d27-517525b9dd69",k.BonfireSpireC4="4dc9b482-3db4-4766-880d-17caf4c9ae12",k.BonfireSpireC4Hard="edb017fb-8c7b-4392-ae87-5948835c9b55",k.BonfireSpireC6="c4790ef3-fa14-44fc-9b1b-b6ae2c0cf21d",k.BonfireSpireC6Hard="4a670087-960c-4528-a1ff-9ae72e772657",k.BonfireSpireD1="a91821c0-38e6-4000-848c-5da16c674f6e",k.BonfireSpireD1Hard="bfa0be82-c0da-4b52-966c-0dc89ec06439",k.BonfireSpireD2="a56a97b8-28d0-4f50-b326-774103bd252b",k.BonfireSpireD2Hard="ccc0d95e-9ce3-48ff-8dd8-5975190b9c96",k.BonfireSpireD3="7af56eea-559f-4cb2-8857-f23f43570b18",k.BonfireSpireD3Hard="0d3d565b-dd7b-402f-8347-fdda3f4d8c95",k.BonfireSpireD4="bacbf8ae-d808-4aa1-a9d3-bdf09b67c234",k.BonfireSpireD4Hard="0f05fe2c-447f-4ee3-ba00-fa59f138af19",k.BonfireSpireD5="bcfdb02d-3a77-410e-a5c6-046ccaf15c55",k.BonfireSpireD5Hard="1bf7fe6d-5864-4e36-94aa-cb347a927dd5",k.BonfireSpireD6="f05943ad-fe1d-4690-9361-b7490db1482e",k.BonfireSpireD6Hard="1a9f35ba-5737-4c3a-a4e1-3c2eb223cdcb",k.BonfireSpireE5="6ecd54f9-1622-4af0-bdeb-e0d1a1a0af7c",k.BonfireSpireE5Hard="41274568-49ea-4d95-be50-8c7609f2f58f",k.BonfireSpireE6="d640c5ec-71db-4bae-b24c-43e7d43f0697",k.BonfireSpireE6Hard="7aa80a57-758c-49c9-bacd-453fe06940b9",k.BonfireSpireWalkableScreen="538a9242-41a4-458f-a04a-bcbae84c1050",k.BorderlessVideoPlayer="0b7c3353-6edc-4c40-992a-8a23cae62ee3",k.BossBattleModal="a9ff4ee9-edd8-44d7-95b0-1532559a2887",k.BossChest="2142f025-9e21-4f6b-a964-6cfef5d1bc6d",k.BossDifficultyIndicatorIcon="774061bb-20d4-45a2-b15c-1e60c914ba55",k.BossDifficultyIndicatorSpotlight="765c868b-6efd-498c-9d9e-b7c021c72904",k.BossKeyPosewithWeakness="a5b3c169-6c50-4ccd-9fce-9c2f88bd0581",k.BossRewardUI="384bdfdf-ce86-4f1c-9f7b-be95d344b250",k.BossRewardUIwithcurrencyrespin="cf9bdc47-0cff-417d-8ade-3f093b073a94",k.BossRewardUIwithnorespin="9543889d-b837-41b2-a170-f6d53eb5441a",k.BossRiftScreen="c0217105-992a-4dd9-a1db-00876d6e1156",k.Boss_icon_slot="d0dcb964-e294-44c8-b39d-65aae4346034",k.Boss_icons_row="7564f48e-bfa9-4b94-96ae-e628e30d3b7b",k.Boss_reward_missed="b451c4b0-180b-402d-840b-26f383d0edfc",k.Boss_reward_revealed="14284996-79c0-44c2-a36b-9cffece19bc4",k.Boss_reward_unrevealed="dd3d3de4-5a08-42e2-92df-510a9ec718e6",k.Bubble="3b84616b-b2af-43e4-8b2f-c3ca1d6ad931",k.BuddyParticleDefence="15dccb40-e75e-4162-9bb4-665951019a5e",k.BuddyParticleHp="2a98be0d-518e-4c1d-a406-4d6e5d54641c",k.BuddyParticlePower="52e112fd-571d-466f-a5c7-2ce1f7678e48",k.BuddyParticleSpeed="75f1847d-9c5c-4004-9bb9-b233adb6f2f5",k.BundleExtraReward="0732f378-aed5-403b-ba11-db87c35c1b19",k.Burgerworks="a1ff93a5-6595-4277-8421-2d51390507b3",k.BurnVinesVFX="8b476774-94dd-42ec-9103-791a655bc418",k.ButtonBaseMediumBlue="4e3cf812-02d1-4a90-8611-bc2783f08f82",k.ButtonBaseMediumGreenA="2762f59d-5aa4-4257-ad69-76cc508bf31d",k.ButtonBaseMediumGreenB="ddcc451d-87d8-43eb-85de-d5583367adfa",k.ButtonBaseMediumRed="0d57eaa5-96d9-4270-aacc-917e8957dcae",k.ButtonBaseMediumWhite="b9e3faf7-de48-4a5f-85dd-bad1dbae21e9",k.ButtonBlueMediumTextAndIconRight="34247c91-a5c8-43d6-a462-2f24c20a0c50",k.ButtonGreenMediumTextAndIconLeft="ed74cc80-3253-4820-9368-488434b7a019",k.ButtonGreenMediumTextCenter3States="ed80cdbb-c6a6-4560-b28d-548a6f586f61",k.ButtonGreenMediumTextCenter4States="0f5e554e-6640-4f35-aa08-5d9103c77231",k.ButtonGreenMedium_LargeTextCenter3States="71a7c42f-f624-4ac1-882d-256ae0566f2c",k.ButtonRedMediumTextAndIconRight="e3bccf0e-2afd-4f08-a113-0e653b79a2d7",k.ButtonRedSmallTextandIcon_RectTransform="6f2053ec-0878-4085-a82c-82a175a34a24",k.ButtonWhiteLargeIconOnly_RectTransform="b6eead11-6a94-4926-b209-a48c833fb284",k.ButtonWhiteLargeTextAndIconLeft="5d45505f-721b-4c3c-b81f-7c862c3a172f",k.ButtonWhiteLargeTextCenter3States="78543d0f-99f7-4779-85a0-fd5b4f1d8658",k.ButtonWhiteMediumIconOnly_RectTransform="37b4be5c-46be-4db7-8830-a427be35944f",k.ButtonWhiteMediumTextAndIconLeft="65207ca3-d40d-4e8f-a241-cc7f33ca9bdb",k.ButtonWhiteMediumTextCenter3States="05bee47c-6bee-4961-b90b-9e47dbcbf6d7",k.ButtonWhiteSmallIconOnly_RectTransform="d35485e1-ba06-4762-a8eb-8309202d1bbd",k.CTR3SpringfestAd="ac514889-4da6-48d5-87aa-466390fc728f",k.CTR3VideoMenu="445d5673-7b53-43d1-b8c5-4be32170061f",k.CameraControlHUD="ee399d49-98ac-4e40-a608-ddb51f4c0e87",k.CampaignReplayHardModeFTUEDialogueController="452a807d-a6d2-4261-a076-8a9947dae9df",k.CampaignReplayNarrativeCatchupCutscene="ae583e4d-f49c-43e7-8fd8-0da14c823d0b",k.CampaignReplayNarrativeIntroCutscene="17518765-3a2b-4628-9a4b-58f091118617",k.CardDailyLoginCalendar="292c13a3-bfc4-4be9-a0d0-f9fcc1b79620",k.CebolliniNPC="b5d61bde-ae3f-491a-bbed-1f91cefff3b6",k.CebolliniPatrol="8027b8a7-f0cd-4868-adad-f46fdaa427ad",k.CharSelectScreen="7d7904ff-40f5-4cfe-92b4-2fcffcd911bd",k.CharacterClassCode="e41c8cf0-9933-42ce-b0cd-67a630a4db72",k.CharacterCreateScreen="715890b6-5312-4892-97eb-8a3f8b457d66",k.CharacterDialogGeneralButton="504d0d3f-da75-43dd-92ba-fe5a30187a98",k.CharacterDialogue="fc803f64-b097-4a02-9ccd-065a52f64d9f",k.CharacterPaletteButton="36036887-6c56-4c0f-9b26-8415a3070e54",k.CharacterPaletteSelector="570b7031-b46c-48fb-bf62-0c3d96622ccf",k.CharacterScreenFooter="9f085f2d-06ad-42f7-83f7-c8830ed9dab9",k.ChargedLevelsDecayImmunityModal="3882006e-9310-43e4-9527-73d2b58c3283",k.ChargedLevelsIncreasedMailer="d12ecfa7-4e92-4881-8eb3-42a182f7145c",k.Charged_level_effect_bottom="8168db41-f708-413f-99b4-cfa123d61aee",k.Charged_level_effect_top="7c283ce6-333d-49b8-8bfe-e0e0cfd1b529",k.Charged_level_retention="612b62f9-f19b-48e2-83ec-cb12a402cc06",k.Charged_level_timer="756ae86a-92e3-4722-a00b-c00a43912458",k.Charged_levels_tutorial="ce22db97-2fa4-42b2-af24-4f2b1ce625a0",k.ChaseItemDisplay="cfea767c-df8e-429f-9563-10c30e3f69e8",k.ChatBubble="f477d5dc-2d62-4263-8aca-74f6d0390b70",k.ChestContainer="358d439c-9469-437f-a4d2-f0141aee13b5",k.ChestRewardPopupFactory="2900f01c-02af-4819-92ab-5b8f5cb70b4c",k.ChooseFloorLook="9bedbfff-f5e9-47aa-bc9b-22ccfb0904d1",k.ClassCodePopup="1c988778-d55c-4e71-bd6a-9f44ed2d24c2",k.ClassCodeSection="79470531-f247-41ab-9eae-7fe353f669e2",k.ClickHereGuideHand="df712ed3-75b5-4797-ab0a-8f1ba3e929e9",k.CloseButton="5207b7a8-d8f8-47e0-9db3-4998301c1df8",k.CloseButtonSmall="b942553b-a06a-4c8c-b0a0-160effb3ec7f",k.CloseButtonSmall_RectTransform="c83f5774-380a-4bcd-9704-37b75eb535ac",k.CloseButton_RectTransform="70aec33c-5de3-4f24-a309-fcca4a5a74b2",k.CloseButton_WithText="e27ce6d3-3fe7-4765-aec1-7c8fbeab1ad7",k.ClosedRedRectangleMessage="0be93aaf-2599-432b-8319-d25b7d3e4023",k.ClosedTag="24ec6c09-a2d4-4872-8d10-f8fdf8951a10",k.Cloverworks="7b491953-54e4-4d71-8c26-508aca2bfb19",k.Coffee="b7a4af27-45c8-44c1-8e2d-c13e60c914dd",k.Collectable="fbdf5181-e2d3-484b-a26d-9f20917d7b80",k.CollectableSpawner="c8126793-f301-4bd1-b1a9-c7e45fdbfe33",k.CompletedParentSection="82acc4ed-cae0-4424-9bbe-27456d90adab",k.Confetti="55dd2d85-d0ef-4e64-9941-a1bdf15510cb",k.ConfirmationDialogBody="68cb0ab3-f4df-48b6-97e3-b51008bec534",k.ConfirmationDialogFooter="4c912ea4-5042-49b0-ac2f-137cca73c26f",k.ConfirmationDialogFooterWideButtons="0d366e67-7073-4a92-86ba-f92b9782ad83",k.ConfirmationDialogHeader="30e7a29b-11ba-43b2-bd47-44bd53e31c69",k.ContextualPanelTemplate="4e9e129a-f359-4080-896e-e8233c94a974",k.ContextualPromptDualPackage_Template="1d204d23-b61e-4968-9a50-55e42c797c43",k.ContextualPromptMemberJarDualPackage="da897525-ada9-4b72-ac50-8b849000ee70",k.ContextualPromptMemberJarUltraFocused="ba82d3b4-82a3-40cd-8704-5f1b5e51166f",k.ContextualPromptPetFocusedDualPackage="d9b71a6a-280b-413d-9008-29530167196a",k.ContextualPromptPetFocusedUltraFocused="8f1d19a0-1afc-4aca-813a-5db6dea77cf7",k.ContextualPromptPetMergeDualPackage="478535b5-e14c-4082-803c-720b6e89f100",k.ContextualPromptPetMergeUltraFocused="32421374-4c16-4af6-8d8e-769fecd5f706",k.ContextualPromptSegmentedOffersDualPackage="b85f1e10-76de-45d7-99aa-7ed55f2ef57a",k.ContextualPromptSegmentedOffersUltraFocused="804129e8-2647-42ba-a81c-208c73ae0e10",k.ContextualPromptUltraFocused_Template="83041159-c503-4c03-84ef-74f27ede09eb",k.ContextualPrompt_ChargedLevelsUltraUpsell="7d4331f2-5930-4bea-8f91-d0ede612d1ae",k.CornerQuit="e5ecea46-b0a0-47ea-a0d6-fce83e3ea403",k.Cosmicworks="3b3ada7c-845b-403a-b292-07d6058fef32",k.CostumesHeader="995ebab4-37e3-4608-ac78-ff6c05b31461",k.Crystal="462e4ce6-39fd-459e-9aa2-b851af58c72e",k.CrystalCafeStore="9e6845cb-93e4-4780-8567-058bf635f143",k.CrystalCaverns1Streaming="1dd59d6e-6bbc-44e8-b50f-80b60ed4abb0",k.CrystalCaverns_FixTracksTutorial="4ebfee10-3b01-429e-a815-a5a2afdad49c",k.CrystalCaverns_GlaciasEncounter="4d35970b-6c0d-4a82-a0ea-b49acdeece27",k.CrystalCaverns_MinecartTutorial="2acaaf48-000f-48b0-8160-d7116868ee2e",k.CrystalCaverns_Phase1="d0886b67-9670-4eef-b452-0cd4f0a42d19",k.CrystalCaverns_Phase1Blocker="c60bce9b-9f18-46f0-a29f-dcb64da8fbaa",k.CrystalCaverns_Phase2="c6982a43-eb94-41bd-8684-777ab5bd19c7",k.CrystalCaverns_Phase3="5f41427d-83e6-4de4-ac63-f14d0fc3447e",k.CrystalCaverns_SceneBase="1579afec-dff4-41a0-936f-4111f4f96cb3",k.CrystalCaverns_WinstonVonLootEncounter="c211f913-5ab3-4244-8fb5-1ef606760b42",k.CrystalCaverns_WinstonVonLootPost_Battle="b611fcac-649e-4993-b135-3a29c49b870f",k.CtaTipBodyEvolvePet="00d0d17d-4379-494c-95cb-c94c8a22d9fc",k.CtaTipBodyLevelPet="0f2485c4-2398-4e35-beb3-c390eb07ab2b",k.CtaTipBodyMergePet="055accaf-4ef9-4bb2-b203-538deb058483",k.CurrencyButton="fbdfd03b-e749-4b32-a7c0-36befcf6f6b8",k.CurrencyChangeNotifier="7b4072e0-6183-47d6-afb3-3eeac00cdcd5",k.CurrencyConversionPurchaseButtons="8dc96b0d-7129-449c-a8aa-3c9f96bbb20a",k.CurrencyCostDisplay="f8951ba1-a529-4297-ade4-a04e61e9c51e",k.CurrencyCounter="c62f8482-a816-4872-aae8-0c53769ac81a",k.CurrencyDisplay="205c5bdd-5921-408c-be92-218d37935584",k.CurrencyDrainWarningModal="6e211bc8-5150-4066-8414-dc49c205bdb3",k.CurrencyEarnParticles="4c3a5dbc-747e-47d9-86c7-b6dceab5a55e",k.CurrencyHeader="8be71acf-9767-47d6-b0e4-a32bfe92abc4",k.CurrentStateChallengeView="90626149-a806-412f-80a7-2925cc702940",k.CurrentWorldInfo="21aa57b4-ef6a-4cfa-9446-e1b1ef1895f9",k.CustomKeyboardLetter="93877c15-e507-46d5-9534-31fba16886bd",k.CutsceneHUDController="9d9eb449-93bd-4d01-bc1d-90d2db24d724",k.CutsceneInputOverlay="652dac85-414b-45b6-b996-a65e26b669fb",k.DailyCollectableSpawner="2df80544-a31e-430e-9edf-f139bbdd2908",k.DailyLoginCalendarHUDButton="4591ac22-90c2-427e-b9c2-8ce24ba1fcb7",k.DebugBattleUnitClickArea="e28766d2-895e-443d-8206-6bf3781effb9",k.DebugCutsceneStatus="d009f1ca-ff4e-4615-8317-0334666dd6b6",k.DebugMenu="8008fca2-1b22-4e30-b745-50ab3b15c297",k.DebugMenuCategory="c2404aeb-7cd3-4cf9-af7d-8c8fc4f448bb",k.DebugMenuCategoryTab="ec38aa4d-bc0d-4627-922d-5d63ad82035d",k.DebugMenuCommand="a3d07eec-1abd-41c2-b3d5-1091f91362c2",k.DebugMenuInputField="dedf0b7d-5a28-478a-80e1-2b194fe07ad7",k.DebugMenuToggle="f20ee92d-0887-4ce9-b519-0840b5340bbb",k.DebugStatusEffectMenuItem="59ebf52b-e334-46d7-a9a1-a18acdffe1e3",k.DebugStatusEffectsMenu="4f26967e-dc37-425a-9bbb-2eda4e3b8453",k.DefaultBody="01eb52e2-1dc9-4f65-99b7-157604cc777b",k.DefaultFooter="c8062699-3d21-4fbd-9e5d-af23e8a9f969",k.DefaultHeader="a9e11847-274a-406c-8599-93e017f4bc61",k.DefeatedPetsBattleIcon="76cbc1ab-8d41-4628-9909-7f44921b267d",k.DefeatedPetsRarityLabel="90467007-ea9c-4758-aace-dd9ff9739d74",k.DialogBanner="d17a542f-7dd9-43cb-ba9d-9fa34eb31e22",k.DialogMedium="69bad6cf-14b6-412e-a50c-292cc979727a",k.Dialoglarge="e19ecfda-8a24-4a40-92bd-035c7c7e79f2",k.Dialogsmall="223de309-a870-4aed-adaa-5cbe162c5659",k.DiamondArgyleBackground="9bae72c1-64e4-484e-917b-f684f9b9d11c",k.DiamondArgyleBackgroundWoodHeader="7d214f60-767f-439c-923c-94d2cf85b9ac",k.DiamondArgyleBackgroundWoodHeaderWithTimer="b4e8fbc2-b38d-470a-a0ca-d659ca2f1081",k.DifficultySelectorConfirmationModal="1175d3cd-6a04-4fdd-aa49-1538807cf0a4",k.DifficultySelectorPanel="7093d479-a2b6-47f8-8946-84fb6f964529",k.DifficultySelectorScreen="fc444dea-9f82-49eb-8c78-0cce54920080",k.DifficultyUnlockedModal="ab0063c1-9150-4027-9a20-e5db1f864ffb",k.DonZorroNPC="b48df925-28af-45f6-96c3-252f64ec1fe4",k.Dragonworks="cea13c56-c95c-458c-8fb2-e238c66d3266",k.DuelInviteNotification="282745d4-ca7d-4456-9cff-a69d67b5992b",k.DuelMatchmakingOpponent="b301d2e0-e203-4e1f-b3ff-b4e3577619b1",k.DuelTurnTimer="d6ac1a3f-be11-4483-b249-43dd7ee3f4a4",k.DuelWaitingMessage="590d5748-ded1-46ba-9e7a-fbffdad23f28",k.DuelsFindMatchButton="e2fd5b68-0a61-40d5-90cf-0756d500dd8c",k.DuelsLoadingScreen="38b1277a-7325-45c0-ac36-b39f459baf4d",k.DuelsMatchmakingScreen="e13e76b2-69ad-4c37-bc6b-d238c8c75d9e",k.DuelsStadiumDailyUsage="cc9f36be-386c-430a-9c21-ebf449f873b4",k.DuelsStadiumMenu="e4dfc5af-955c-4e3a-9bdf-cc4b32d1eebb",k.DuelsStadiumMenuHeader="6a836ff3-7a26-45f3-a94d-e90dbb29a74f",k.DuelsStadiumRoomCard="2605656e-2882-488c-bc1c-1e9945d0b52a",k.DuelsStadiumRoomsBrowser="6de8f19b-2e94-40af-b02f-f97788eb1bf6",k.DuelsWinStreakBadges="978675db-88e4-4080-ae2e-facc7e265741",k.DungeonCompleted="43a6e25e-06ba-402e-98b6-633e2c9018b7",k.DungeonHealstone="28bc7b7d-291a-429d-a618-5dfa0b0ed829",k.DungeonLoadingScreen="2c1a7a79-398b-4c1e-acec-e877db67468e",k.DungeonMinerNPC="64d59196-1650-40cf-ba3d-0e1ba89f5063",k.DungeonPlayer="c4f5f284-e29c-489b-bc3d-3d093f71ba11",k.DynamicAppearance="d52e1378-ee03-46d7-94a4-eabe3a7726ab",k.DynamicMembershipParent="55e8171c-4fc9-4921-b69e-7127d2f8a658",k.DynamicProgressBar="9b53da2f-8af0-4c29-801e-5572b4069455",k.DynamicPrompt_DualOTPUpsell="091e868f-c990-4098-a379-e819f2a6623d",k.DynamicPrompt_MagicoinOTPUpsell="88cd7563-c1ca-4ef0-aba1-a0e82024ca0d",k.DynamicPrompt_MagicoinOffseasonOTPUpsell="993329b0-8b3d-4e57-8a75-55a4f02cb71e",k.DynamicPrompt_MagicoinUpsell="47a7868a-652b-4c33-8fdb-e0706802aabe",k.DynamicPrompt_Memberjar="323cbcd5-7625-4d67-8c64-436d54578837",k.DynamicPrompt_MembersGetSevenLevels="ab987c70-1283-42dc-bc33-b89e22882408",k.DynamicPrompt_MembershipInfo="47fe382c-a79f-4dd9-8414-ac85ba006125",k.DynamicPrompt_MembershipInfoV2="001e334d-bc5f-4f54-80bd-690d73fe5299",k.DynamicPrompt_MembershipforMagicoin="324afd89-4ef8-430e-bdae-72d3d1d0fc64",k.DynamicPrompt_MobileMagicoinUpsell="200032ea-f61f-4622-8e9f-6bd7a43dbb9e",k.DynamicPrompt_MobileMagicoinUpsellOffseason="01eb2259-22a3-4149-8229-3c67655d3fe0",k.DynamicPrompt_PetSlotsAtLimit="b811077a-71f1-4d47-b0ac-ae72218f7a22",k.DynamicPrompt_PetSlotsBase="ddf2e26e-782e-4264-a2a3-2fcb5a496b68",k.DynamicPrompt_UltraUpsellTemplate="d1d157dc-5cce-4a4a-8de7-ec95d661f780",k.DynamicPrompt_UpsellMobileTemplate="4a32acef-d2c3-418b-9319-5396d676a8d6",k.DynamicSpinePet="7baf54d3-a94f-4217-a02c-de7a432d6473",k.DynamicSpritesheetPet="f98eb440-a797-4315-96fa-58c36a040b47",k.DynamicStore="ec99a1be-645d-4847-89b5-8bccb24896bc",k.DynamicStoreBundlesPanel="70c2add6-a9c9-4e26-aaa1-2de6a5ae8494",k.DynamicStoreEmptySection="66e7ba19-6a0a-472c-b930-dd1a5786146c",k.DynamicStoreFeaturedPetBundlePanel="a82ebae8-4ee8-4712-b736-4021aa100205",k.DynamicStoreItemScroll="f8dfde7b-4719-406f-880e-42a17a2c8a9c",k.DynamicStoreLeftPanel="0b9098bf-f747-4e25-b1ca-ecbae0efa3ea",k.DynamicStoreLeftPanelTab="00790afb-0bb7-42dd-910f-75c0e2237ba8",k.DynamicStoreModal="d2709b02-8f1e-4689-a442-113a47e95e12",k.DynamicStorePetOffersIcon="04bb9c29-0674-4626-b959-d8d3541ed47a",k.DynamicStoreSectionHeader="2d06e685-1ac5-4e8e-8e6b-b734df75a974",k.DynamicStoreSegmentedOffersPanel="0f31446e-cb70-42f9-9b14-4c1c385761a4",k.DynamicallySizedNotificationBadge="ecf56d28-6b95-4e39-add2-2527fae268b4",k.ElementalBoostDisplay="1c889aa8-7827-4a48-b1c2-eaca23098701",k.ElementalBoostPopupText="8b0da69a-0b2e-403e-9407-99f17cb08066",k.ElementalWeaknessChartPopup="102039d3-1726-4cfb-a69f-39aa63096698",k.EndGameNavigationGuideHand="9499f1c6-1cd6-48df-976e-d9bed26aa640",k.EndgameConfettiInitializer="ea5ba159-a621-403c-930f-0713eecb964a",k.EndgameIllustrationPuppetMasterDefeat="3c7d236f-a3d2-4c0d-a532-b24c608bd33e",k.EndgamePedestalClickHandler="3d76179d-a0ef-4ddb-a5f7-85500939eec7",k.EndgamePostPuppetMasterCutscene="77ddbb9e-904a-4394-88e3-999747f4dff0",k.EpicCounterWidget="5eda22ae-ae59-4268-9e41-616b984885da",k.ErrorDialogContentRefresh="a407adcf-e270-4c84-a40f-9ba0bd93d3b4",k.ErrorDialogFooter="fc95e252-4c38-4cb9-bfe9-38839c054e00",k.ErrorDialogHeader="20afb102-02db-45e7-b3d6-5c0985965a1a",k.EveNPC="771f8838-90f4-4e8f-9298-b5b63e49e53d",k.EvolutionScreen="7a383058-6eaf-477d-9e32-7dd56a80329e",k.EvolvedPet_InsufficientResources="02bb09aa-6b0a-4054-b19c-42ebed3bf434",k.FeaturedPetModal="110c9891-99b5-4bd8-ac76-fa2ef27a4b36",k.FeaturedPetWidget="c876d2cd-ca45-4c58-bb34-745b30931cd1",k.FeaturedSpawnPoint="5fe00b2a-ba56-4c67-8ac8-c728450d4412",k.FeaturedSpawnTimer="3573877c-79a2-40aa-ac72-32bc275a6969",k.FestivalAboutMenu="6c068d49-4027-452a-9f41-0248014f8f40",k.FestivalChest="03fdba93-89f0-47e8-b3f6-13be42993cd9",k.FestivalChestRewardUI="3cc6eeed-fe9b-4e71-8540-e750e6ba801c",k.FestivalCoopTier="4b8069a2-3d7e-4782-8df5-8612ceea28c0",k.FestivalDateDisplay="1166fc69-1512-4569-8c2d-67ebeb3192b2",k.FestivalPortalVideoPopup="d6f168d3-ad5e-4377-b8a9-4a3ff4d40a09",k.FestivalPrizeWheel="c9ef701f-0538-4757-a079-63ff435b0ee8",k.FestivalProgressMenu="47070187-ba72-4128-a873-cba32f6c48a4",k.FestivalProgressStoryTier="55642e5f-1f1c-466a-ba92-aab91fef04c5",k.FestivalProgressTier="3087ecc6-97e0-4ca0-bc4e-5070828671eb",k.FestivalToaster="c78b5b1b-173e-4ec0-8d48-cb17b179e094",k.FestivalTravelModal="323053cf-7d32-4478-b898-2c6a92317b56",k.FilledTeamCardInjectionConfigured="634a3c1f-c77f-4884-9480-adb2d2566014",k.FilledTeamCardInjectionConfiguredMergeRank="4f8abb19-447f-416c-8ed4-f07a59e73050",k.FireflyForestWalkableScreen="2ad90480-6788-45fa-a19f-276d153958b0",k.FireflyHardQ12CutscenePost_battle="356e1856-146e-4704-8471-5b1d973195b4",k.FireflyHardQ12IntroCutscene="517a4351-96e6-4c82-952b-8c1b5797ab54",k.FireflyHardQ2MinibossEncounter="6b4fc0b7-10d5-43f2-a0f1-255374490c9a",k.FireflyMerchantNPC="a8d1e441-a759-4e94-8541-7236da9334c9",k.FireflyQ12CutscenePost_battle="a6f047ce-0958-4b38-a580-7dc47b9b1c2a",k.FireflyQ12IntroCutscene="0e7cc4c3-9f0b-4ab3-a680-8120053b0b1f",k.FireflyQ2MidBattleTutorial="f8bf9bc2-b3af-4e86-9bca-ba632e6889ca",k.FireflyQ2MinibossEncounter="afad8dfb-544d-4246-9ff8-3025ab25d8f7",k.FireflyQ3MinibossEncounter="412c6156-5cc0-4196-b79d-eb889596639e",k.FireflyQ4FlorianNPC="f106b51c-cf1c-446b-8714-30516a53d5a6",k.FireflyQ6Cutscene="7892d170-60b2-42f7-ac54-c772c6d15c3b",k.FireflyQ6CutscenePost_battle="c7c62796-d65b-4ae6-b3c2-e4c031eb343b",k.FireflyQ8GeraldNPC="84b16e5c-3dd3-4297-ba79-b9a3854adce8",k.FireflyQuestMerchantNPC="25915477-156a-429c-a3e2-3cb68a054944",k.Firework="cf900e63-412d-4e36-a708-1808d347e79f",k.FirstNameCellPrefab="af3d0a70-f46e-4bdc-90a8-78b13e9e75d6",k.FirstNameSelector="0591ca90-f9c8-43af-a85b-5629e9c71bf6",k.FirstNameSelectorScrollBar="cc209739-9ca6-4781-8b81-d2369dab2477",k.FlagTintableBanner="963cb371-05e6-422b-be5a-82e80dfe0c3d",k.FloatlingFlingResearchPointPanel="48ee416d-121b-45d2-83ed-37f0c5f2ffe7",k.FloorDecorationPlacer="c7179c8b-30a9-409a-8eb3-d132b660c0ac",k.FloorListLargeItem="423af034-ebdf-406b-9ebb-18421ed7caa8",k.FloorListSmallItem="c955c422-dd5f-42ce-bf12-bf7b04e17ab1",k.FloorLook="8e2aed7d-ab4e-4424-814a-b2b169891551",k.FloraNPC="24878142-e2d1-4106-b6b4-559c6fc99693",k.FlorianNPC="a88ada8c-baec-4ce2-857a-41a16f2a0a11",k.FlorianNPCLegacyMaps="ca50f899-f9d2-4f2d-8a02-e671f4a5c2a4",k.FlowerParticles="0e168a59-a5ff-4897-9b2a-aefb43d9d7cd",k.Flowerworks="d221d05a-07ab-4cb1-a9c1-0fb21cb144d7",k.Flutterworks="d73125fd-91ba-44fb-ab2d-3bbd0320fdb1",k.FocusOverlay="66c052fa-7a57-42fe-9279-94ee566de6a7",k.ForestA3="51eb274f-00c1-4a21-83a1-0995c0d2970d",k.ForestA3Hard="4725b648-10e5-496b-a0ad-7fe89056521e",k.ForestA4="ce5df2e9-d864-40c3-82fc-95652b69c562",k.ForestA4Hard="bb69e366-e6bf-4326-8774-70c103d0633f",k.ForestA5="4a6e0fb2-96cc-41e3-bffb-e84c5117f264",k.ForestA5Hard="d53a4816-4aa2-4bf8-9bc5-6c6c0d5df690",k.ForestB5="d0ccb64c-bc88-41ff-bac6-04101f887a3f",k.ForestB5Hard="0ff00aff-3da4-41e4-91c5-2f8338aaf0cf",k.ForestB6="e63350da-8e8f-4523-a286-d4c4d2ff73fe",k.ForestB6Hard="21689966-9ec6-4e5e-83bc-f9b4bb78ecac",k.ForestB7="6aa00bfe-fbcc-4101-9f3d-fad479d805a0",k.ForestB7Hard="06153eb6-fa17-4ba7-9397-c67a639c2785",k.ForestB8="7bc951f1-da51-49de-bf88-f40b05691f4c",k.ForestB8Hard="b565b7f6-132b-441c-911f-e75467207074",k.ForestC4="b4b4b8db-df37-4e11-9af9-eece973f79f6",k.ForestC4Hard="d8fa1d4b-536d-49a6-b5ba-fb0b0a7bee44",k.ForestC7="b39f6138-6a52-4c49-9ee0-e7219f457686",k.ForestC7Hard="c011566d-96be-4a7b-a0ed-baf3010e5f5c",k.ForestC8="e9d74135-75ed-4f86-a5cc-7b1c5682f90f",k.ForestC8Hard="19e486a3-8cb3-4579-8a96-f27d46bc00ba",k.ForestD3="17cffc83-9b3a-413e-b497-c42592d82093",k.ForestD3Hard="45cefde8-1300-4d1b-8deb-f7c467f2182f",k.FtueHouseExteriorChooseName="11052834-088b-4448-bc82-b5dbde861376",k.FtueHouseExteriorWorldMap="fccca0e8-dc37-4e6e-92d8-dc0080d0ce92",k.FtueIntroCutscene="303ab378-1819-4fb7-bdc1-74254d74edd8",k.FtueKeystonesCutsceneGH1="e9c7a1f6-df14-4db7-a9aa-7066f785accb",k.FtueKeystonesCutsceneGH2="3aa87410-33c1-45e1-aeba-0b737fe8584f",k.FtuePetInteractCutscene="1c0480f6-539b-41f2-ba74-c7aa46d501f0",k.FtuePlayerGoal="52ee2681-2fe6-436c-a671-5e179734ef20",k.FtuePlayerGoalRewardIcon="8e251779-a900-4342-a8e9-194e26e0ac95",k.FtuePlayerGoals="7841e096-0775-4836-a036-a699e97aeb53",k.FtuePlayerGoalsHudIcon="8cf2c78c-ebe4-4284-a57d-358bbe548f7a",k.FtuePuppetMasterEncounterCutscene="d6aa13bc-feed-4e74-9bcc-bf915a4171f7",k.FullScreenIFrameModal="7595de17-5dd2-4292-993f-1f282b93d433",k.FullScreenSpinner="ace6a730-c3d8-485d-8e18-5d3206bf8d32",k.FullUnitInfo="7f57bd48-8f2b-422c-9361-dc678d8ba725",k.GlowHighlightAnimation="61da80fc-7729-4e5f-8580-64e938ba1b53",k.GoingToArcadiaModal="0644faba-8b95-448b-a228-89e2222ba86d",k.GraphicCurrencyDisplay="bc62dfe4-19d8-427d-8a16-70effdeee79d",k.GreatHallPart1Cutscene="ce204c50-beb9-4184-9738-b54204f91c8e",k.GreatHallPart2Cutscene_StarterPet="12197814-f61f-4619-901d-23a8127140a3",k.GreenLargeButtonTextAndIconLeft_RectTransform="4143b4b9-7cc5-4088-9e07-edd2eb9409cc",k.GreenLargeButtonTextAndIconRight_RectTransform="826fde9e-0f3a-4ae2-b50d-13940715f87f",k.GreenLargeButtonText_RectTransform="43705ebf-a99d-4052-ba1f-db23639584e5",k.GreenMediumButtonTextAndIconLeft_RectTransform="3909edca-f54d-4cad-90d7-6af556567289",k.GreenMediumButtonTextAndIconRight_RectTransform="3528ffb5-8832-4313-a612-c502cd69d9c4",k.GreenMediumButtonText_RectTransform="529faa7d-c2b9-4093-be2c-e846a7108135",k.GreenSmallButtonTextAndIconLeft_RectTransform="8e9027db-2ad9-484f-8cf8-bcde815666ad",k.GreenSmallButtonTextAndIconRight_RectTransform="579ffa03-9580-492c-ad39-52b5e4c1ab41",k.GreenSmallButtonText_RectTransform="29f4b7f5-e3ba-446e-8cfc-72b5989ea676",k.GrottoPortal="aa21a6c0-07a8-46a8-8be7-00d34a62e460",k.GrottoSelectModal="9508619c-64e3-4822-b007-f53201bdc6d9",k.GuardSlimeHank="d4333a63-7258-474b-ad91-709611e2c89a",k.GuardSlimeMike="9d2ee8a5-b130-4113-b567-6263d37ec7e2",k.GuardSlimeNPC="66a3cbef-efc6-4e26-8fb1-e9e7a08a5a3f",k.GuardianBattleFog="af5e7e4a-66b5-42b9-924d-459ab4e0f888",k.GuidanceBanner="9bd83a0d-9b97-4cb2-9a91-306f910ed792",k.GuideHand="171721fb-5707-4ca6-a63a-720ceb050943",k.GuideHandSortingAnchor="f0850757-a0bb-4050-8283-6a994d040f99",k.HTMLVideoPlayer="80d09647-8a5f-4451-aaa1-f12927d62d4b",k.HUDGlowAnimations="5952ad79-cb4c-478d-ab4e-67819ab0aaad",k.HUDLoader="9e3ca3b9-fa71-4f6d-b6ee-1fef78965022",k.HUDMenuBar="bfea05f6-bb3d-472d-ad13-2601f2f565e1",k.HUDMenuBar2025="02e11067-c9c1-47ad-8cfa-33dcf1bf0021",k.HUDMenuBar_House="3e8bba0f-fc57-4411-8180-ac8948aa48ed",k.HUD_WIP="01ee32e0-e237-4d21-889b-ce9419d476e0",k.HarrietNPC="37934600-7ebb-4371-84b3-b36ba0623fa4",k.HatStoreAdvertisement="65b1cc51-052b-4ee9-8c52-4b808d009a57",k.Header="16b63ae7-4b58-4211-843f-056c92ea59dd",k.HeaderNavigationTab="44bc682e-7ade-4b27-8be1-47102c0b96d0",k.HeaderNavigationTabs="7e4b9038-600b-44b5-b790-4d7eeb6c2592",k.HeaderTitleSubClose="c778624c-abce-49cf-8363-426fee511af0",k.HeartTaskProgressMeter="9ea1ea71-c867-486b-846c-3cef97e21199",k.HopWalkCreature="e3df5753-c17c-4b08-9627-11d136a75347",k.HorizontalFixableMinecartTracks="25901cbc-1f86-46bf-9b6b-494de314da2f",k.HorizontalMinecartTracks="e647a8e2-fa3c-4aa2-94f8-c1a652a734af",k.HowardCorneliusNPC="b1516b4b-9698-497d-8062-039140edecad",k.HudAttentionManagerHandler="73c6ffc7-0b2d-4d9e-b089-6e400385804c",k.HudButtonRevamp="4737abf7-0ba1-43ea-9ed3-b77f50a618aa",k.HudButtonSubnav="334fcd8b-53d1-4d2c-87bb-545098a51c16",k.HudContextMenu="8a2b8faa-a3c6-4503-8c8f-72925bdfaf72",k.HudLiveopsManager="6f96f32b-9560-4f8f-9b8a-b2dd86b19f61",k.HudRevampLiveopsButton="6c261527-f4a7-4f4f-b98a-27376e1891ed",k.HudTutorialOverlays="69366510-cac2-4fef-8d90-91ff0775cb15",k.Hud_badge_animations="15521bb7-2d35-44f8-8c11-2114219f2a51",k.Hud_menu_bar_icon_animations="f1c65a51-2d48-437c-b117-bc57e9b92e7c",k.IFrameModal="fa05caef-e8b7-4b78-9304-e68c4cc9a178",k.IceBlockParticle="3513afea-41ff-4161-a4bf-aa7c70b294e2",k.IceTowerBetaPopup="6681990d-e0bb-405f-96d5-959779ec0ca8",k.IceWyrmSequence="9b5195b5-2a24-49e1-9aba-a0b7bacdea2d",k.IconTimer="9ec9bcec-80b3-44c1-87df-33a8e2cfa115",k.Icyworks="fed14908-e145-4d1a-ae31-7fe23cc1fccd",k.InfinityTowerTopRightContainer="f80b20e9-24ce-4f0c-852f-09efd8903b32",k.InfoButton="9b8a0f90-d3ea-4c36-aefb-2e06de02d0a7",k.InfoButtonBig="40222400-e474-4b3f-b841-abb1ab612c71",k.InfoRemoveTooltip="2e5f0801-8ba0-4135-a913-7e7cd41fb16b",k.InfoSection="d2cdc4f1-9e27-4b36-ad39-9b9c6d9d8558",k.InformationDialogGraphicBody="514acf6d-258c-4830-bc54-7acda35afa20",k.InjectionTest="2e47b691-4d8b-4c9c-84b1-72e580a1f351",k.InputBlocker="af9e4dcc-0247-49ff-acc4-577d9167e108",k.InteractableSparkles="cb02d3b3-66a3-428a-86eb-9ce6ff58f707",k.Interactable_BonfireCrate="2521f763-4cda-4591-a900-a22b2165e0a6",k.Interactable_BonfireFlower="6a8dfea7-4502-4076-bd16-b836a8c26dd8",k.Interactable_FireflyFlower="8b5b7081-710b-4561-95b6-8962e2647505",k.Interactable_FireflyTrapBox="9f91a551-bd15-4b87-a372-609aeb7f32c1",k.Interactable_Generic="7f5a53bf-f28c-48e7-b1cb-d7c71940a95d",k.Interactable_MinibossReward="b2c02e7b-a5f6-4633-89d3-8995e017e3a0",k.Interactable_MoonFlower="ba9d1007-2341-4cd6-9f96-61e321679563",k.Interactable_MoonValve="0b08738a-1d41-4426-bb0a-0614c7a1916f",k.Interactable_ShipwreckChest="071a9314-cf6e-4f72-96e3-1178184c8740",k.Interactable_ShipwreckSandPile="d7f0d300-5a11-402c-8e3f-19799012508b",k.Interactable_ShiverchillCrate="a0d3dd32-5238-43b2-b475-603291ec6c92",k.Interactable_ShiverchillSnowpile1="9e3ab9de-9b8a-4f21-8b6f-29edc0a1ba40",k.Interactable_ShiverchillSnowpile2="699b2e8b-3fa0-41d7-a611-5afa37d8a5db",k.Interactable_ShiverchillSnowpile3="edb041a3-1ca6-4227-aad1-375d9f64152f",k.Interactable_SkywatchBalloon="fcae3fa5-7f32-4534-a4f5-b681d2703bdb",k.Interactable_SkywatchValve="58577cd9-84d6-4ed6-aecb-a29fb9caaee4",k.ItemCard="9d8e1a8f-5201-4137-8249-fed3cb0c1f60",k.ItemCardCounter="20fa959f-be28-4d22-9733-b8405c3d9f25",k.ItemCardHeader="d29600f0-dbff-44ee-9ca8-d126881e7f9c",k.ItemCardLockedBackground="e3dc2984-f573-42cf-baf0-f1378b58701e",k.ItemCardRarityCommon="bde236b5-b4e9-487e-98bb-260b68e1d508",k.ItemCardRarityCommonNoShadow="c9340a5c-d410-4835-bcd7-3e5f27a61e5c",k.ItemCardRarityHeroic="1d3b76f4-fb53-4c1d-82c2-3ab22372b314",k.ItemCardRarityHeroicNoShadow="7dda15a9-d786-486c-9699-214c9d303c15",k.ItemCardRarityLegendary="af47e456-af04-48ad-b12c-0c798e11f16f",k.ItemCardRarityLegendaryNoShadow="b5d1f28e-d15d-4144-92b1-4597be72a854",k.ItemCardRarityRare="89946068-4db0-4ddb-bccb-16d2581aa2c4",k.ItemCardRarityRareNoShadow="f44accf3-0868-4fee-9903-4a6a31cb7d17",k.ItemCardRaritySmall="fd6d706f-314b-45d5-abed-6d820ddd60e1",k.ItemCardRarityUncommon="33921ba4-9f23-4b2f-b2b0-e2353ab80abc",k.ItemCardRarityUncommonNoShadow="08f72fe4-cf27-44e9-9b22-eca718b4c84b",k.ItemCard_EquippedGear="74ed0089-2688-4118-8317-7337d818b839",k.ItemDetailsModal="3aeccccd-d017-4ec1-a075-715c039b0d5f",k.ItemIcon="2521a48e-7f55-4879-ac68-dd74bd1487a2",k.ItemRarityBanner="98c91ffb-8ddd-4d5e-bf82-f4a78726a2db",k.JellyJimNPC="3d33edbb-e187-42fb-92ef-466c2948d38b",k.KeystonePedestalMenu="928d051f-74ff-4c5e-b7d0-2fd53b353d18",k.KeystonePedestalMenuItem="6f937ac7-f7d2-43ff-89b5-75e533e626c3",k.KeystonePlacement="1530e7a8-3689-4bcc-be71-8dad3f851359",k.Lagoonworks="edcc94b9-3e15-4e83-b815-90d2a2135146",k.LamplightC3="d72ccb06-0673-40a9-9d92-d94b632f1fb8",k.LamplightLockedPopup="096c42b7-328f-4c0a-96c5-b73a6d5ae0a3",k.LamplightWalkableScreen="88217bc7-d73b-47a9-b3a9-1868a47c356b",k.LargeButtonTextAndIconLeftBase_RectTransform="f45d1d33-8e2f-4c9c-a47e-4cf1db19a1ca",k.LargeButtonTextAndIconRightBase_RectTransform="7f9a4ec0-0d90-4b0f-a4f9-025a93bca33e",k.LargeButtonTextBase_RectTransform="6f82f043-fad8-4549-b8ee-777661f42659",k.LavaLeverInteraction="b0867de3-3240-4016-8d7e-54e8e941a7a8",k.LavaLeverQuestInteraction="197d5bb4-61d2-4ad8-9f83-008e054b52bd",k.LeaderboardClassCodeView="8611011c-5483-4262-9e0c-fd1443acce90",k.LeaderboardCountdownWindow="8370d704-ea6d-4efc-8b89-5f6587753a81",k.LeaderboardNotification="aa959ca2-8754-4df8-95d6-ca16935697fe",k.LeaderboardRankingPanel="17b7a6d9-3b5c-4190-b20b-75ce7a4dc589",k.LeaderboardResults="84ae29ee-a4c9-4c70-86be-7740d8087b58",k.LeaderboardScrollableView="db401529-cded-4df0-9669-47df6861f35d",k.LeaderboardSvSRankingPanel="2ecc0dbf-8d91-49e5-bf99-3342e40a4fbe",k.LeaderboardSvSView="7dded6db-0f1b-49b3-8a6b-4bf2cdff9f81",k.LeaderboardView="a97ca31a-1eaf-42d1-92bc-4670819f0cd1",k.LearnMoreBody="4213f26e-6502-4e1c-a0ab-155a252792fa",k.LeaveLamplightConfirmation="decb2378-402e-4aa8-8c3c-60d53a3eb645",k.LegacyBattleNewIndicator="1f087df3-8054-49d5-9146-e745fe16d006",k.LegacyDungeonPlayer="42e01b40-8bd6-4555-9a15-5dcfd6ce8f6f",k.LegacyEpicsChoiceCard="c7db91ad-cca1-4b93-9d2e-7405e26fab5d",k.LegacyEpicsChoicePopup="62f060d8-fe93-442f-8ee8-8fd134c62dc0",k.LegacyFollow_BabyReindeer="12c7cd6a-8528-4f37-9db3-2c37422cfdad",k.LegacyFollow_BabySnowman="81140ff9-5019-4538-909e-ecd0f4a96508",k.LegacyFollow_BarnOwl="7858415c-b99f-4f6d-bff3-d9bf5e66f8dc",k.LegacyFollow_Beagle="d9b2b923-1cef-4701-bb6b-66cf4fb18a7f",k.LegacyFollow_BlueParrot="5673ba5e-d1a8-40b2-8cfd-2d91fdca9977",k.LegacyFollow_BrownHamster="817a489d-a299-4873-8889-d37f96a20879",k.LegacyFollow_CalicoCat="223a0cdc-8788-46dd-8654-96526508df14",k.LegacyFollow_Chameleon="56e2cb99-bcff-4bc1-ab86-1631fc1c82c8",k.LegacyFollow_CloudSheep="35f406ed-3d0e-41d7-b9c6-a5286ba584dc",k.LegacyFollow_Cockatiel="e64ef4fa-2ae2-46f2-bfd8-ae4dab232e46",k.LegacyFollow_CuddlyCactus="91e32f85-b86e-4024-874e-c0d6352fc92d",k.LegacyFollow_FlameSalamander="8f9744b7-1e48-4b25-af31-e983dad3cfe1",k.LegacyFollow_FlowerTurtle="4cb02221-b4fe-46b8-ad53-3ac666ae9d81",k.LegacyFollow_Gecko="5e758c86-4462-4abd-9a4e-fa1b0fbcf0f7",k.LegacyFollow_GreyCat="ff3837c0-5acb-4f1d-9581-b42634a9a5f4",k.LegacyFollow_GreyParrot="8089f5bf-ad38-42e8-ae5b-6c77b9d60e2e",k.LegacyFollow_HornedOwl="84b152d0-8202-420c-89bc-22a129ede8bf",k.LegacyFollow_Husky="64f957f0-95ab-49a4-a8f1-8fb2d412962f",k.LegacyFollow_LeopardGecko="c74886af-7e0d-41b1-b347-cf2b5ced4885",k.LegacyFollow_Penguin="5072a2e8-93eb-478c-900a-80b8a6649496",k.LegacyFollow_PurpleOwl="62292d8d-279f-406b-93ff-cfaf076b58aa",k.LegacyFollow_RainbowPanda="80b17525-4e04-44a3-9c71-27b895a4e024",k.LegacyFollow_RedParrot="cf0cfdeb-04d0-4218-8fb6-be4c31a186f8",k.LegacyFollow_Saber_ToothCat="df4c4416-f741-4a2d-8f3a-a4417fc592c6",k.LegacyFollow_Shepherd="4d7789ce-6b07-459b-9580-67fdd9f0ad4e",k.LegacyFollow_ShibaInu="f3ec331d-35b8-421e-90a7-314ef44f0887",k.LegacyFollow_SiameseCat="ac2837f7-5ccb-4059-8a74-ee2267b28eae",k.LegacyFollow_SparkleHamster="8be164c6-81de-425c-84ea-7f0f5101ca4c",k.LegacyFollow_SparkleKitty="1e2a857c-8213-4425-8264-bccffe30bf18",k.LegacyFollow_SparklePuppy="903f80d7-8550-4469-a299-291251fe5cdf",k.LegacyFollow_SpottedHamster="da4c7159-fbb2-4b7c-9f96-1b88e91b7c88",k.LegacyFollow_Steam_PoweredRobotBird9001="f42ddee5-4e78-44bd-bd3d-d9cbdb586bea",k.LegacyFollow_TabbyCat="0b599ffd-5823-4b6b-930a-af1d4411f111",k.LegacyFollow_Turtle="cfa2a157-1044-46cc-b7f7-fedc7f1a9efd",k.LegacyFollow_TuxedoCat="aba7150b-4e2b-41db-8f88-9833a7905e5e",k.LegacyFollow_WhiteCat="49a3cb34-0e8e-44fa-9087-da28f6ac3262",k.LegacyMapSpawnPoint="733fbbc6-b09d-4c9d-a6be-580cdc4d175e",k.LegacyMapWizardEncounter="e81a8ce0-80c3-45a6-8e6f-1e33050a6252",k.LegacyPlayerHead="9e1081ce-6b5b-44b0-a3bb-17f03b746d32",k.LegacySeasonRewards="aef5d065-6408-4e5e-a6f5-bdc395ce578e",k.LegacySeasonRewardsCard="419e1bcb-9354-4eae-8ab3-a650c4188540",k.LevelUpBanner="f85818f1-debb-425f-b2d8-8416ea1c6752",k.LoadingOverlay="04e0b298-53ac-452c-9f4f-477ee891cee2",k.LoadingSpinner="5ac9c3cc-e070-4487-998e-4f2824d1304f",k.LoginCredentialsQuizPopup="30a023e9-f0e5-4c36-a264-6ac51f8c3ad3",k.LoginPage="dde06240-581b-4a49-ac08-1a678b4670f5",k.LootDashBattleUI="2de5d40d-fce3-45d6-b76c-45567735af2b",k.LootDashDetailedSelectionScreen="15f95dd5-8f08-411a-a239-cb408607330e",k.LootDashFeaturedItemCard="de39eb7c-8b84-4842-9760-9a09b7d90731",k.LootDashFeaturedItemConfirmationModal="cc653363-763b-43eb-a6fa-1344d5720d6c",k.LootDashFindAMatch="83d4290f-4b2f-4d09-9dc6-1aa8450918c0",k.LootDashLobby="07604842-aaa8-4d95-b7cc-15b24e3ffefa",k.LootDashMatchFinishedMenu="bb225026-647c-4d2f-be0f-0f123d1d9113",k.LootDashMenu="cd941df6-4613-4a91-aba6-d82b18b74af5",k.LootDashNoMoreRevivesModal="30980f91-8064-415e-bb68-da9f2607724f",k.LootDashOpponent="3cb8108f-75a7-4428-8446-37970141cf00",k.LootDashStage="48a50b40-f903-427b-ae8b-8f8a627659a6",k.LootDashStageOverlay="0172bc63-5e2a-4c0a-8f49-9cff11d5c9d9",k.LootDashTransportModal="6e5f12aa-96e0-4825-bc2b-375f0f01ad8b",k.LootDashWaitingRoom="bf8a4461-7dc3-4bac-a2c1-585f1a03141d",k.LootDashYourTeam="e743f3d6-1bd6-433f-b08a-afa676402880",k.LootItemCard="336e0c9c-cd1c-4301-b52a-b98e5fa5d9ba",k.LootItemCardwithQuantity="bd404e85-187e-4418-a4c8-8138c889808a",k.LostFlowCtaBase="6a171cde-a4d7-4fdf-b231-dc09a2f1caed",k.LostPetModal="b26c3933-6f46-4ebc-810e-04546801eaa4",k.MagicoinRewardsDisplay="127fd899-ba5f-4ff0-a705-8355e2242a07",k.MagicoinValueText="f397d5b4-0158-4bbc-a24b-11fd01438e78",k.MainDungeonPlayer="34dc3421-4b81-4317-ba07-c49c197a17ed",k.MainHudBar="d57f7b9a-76c8-46ca-9add-8646c0aa697b",k.MainPlayer="4d671c0a-9eab-4ebf-a4b6-7735316c7974",k.MainPlayerDisplay="cdd4b79c-67bf-4018-b069-4ce23dc647fb",k.MainPlayerIcon="a4364b84-a6c2-472d-9119-4cf6e6c3e6fd",k.MapLocationDialog="bb95e49c-7053-4edb-9bb2-2d22a1a4d8fd",k.MaskedPlayerIcon="3508c69a-337e-47fb-b694-9bd81bcf0200",k.MathTowerFloor="096be956-d921-4b01-94cf-5296b2ad9dee",k.MathTowerShroudLock="a1bd4731-a40a-4891-8cfd-6556e741c10d",k.MaxRiftCardTeaser="0ea1cf17-73c7-47e2-bc40-359a463796a9",k.MaxRiftTierCompletePopup="2edf9ed8-edf2-40ca-9cfa-8413cbd4b271",k.MediumButtonTextAndIconLeftBase_RectTransform="174e9865-8ac6-459f-abed-f6049c437d8a",k.MediumButtonTextAndIconRightBase_RectTransform="c9d3b0f0-1385-4b5f-b73b-f755384c6d06",k.MediumButtonTextBase_RectTransform="dc93dfc6-5aa8-4521-b827-d85cc1ccb7a7",k.MemberChest="baf20088-5ecc-4def-941a-b0a57a0b74a1",k.MemberJarContextualPanel="e543abbc-eab8-44d6-b6f8-30845c0ac41f",k.MemberJarInfoWidget="ee74b4ae-0f3e-4c73-be8d-1ae019d75c07",k.MemberJarRewardsDisplay="6f2c597e-e1e2-45b5-a5e2-a314694bae08",k.MemberLockedGoldRiftModal="89771efd-0e52-4d6d-8483-8bceccc17eb1",k.MemberRewardCard="06aa63f4-5918-4303-b58f-e2f7763d47af",k.MemberSuccessVideoPopup="fb7e84ef-e017-4834-a0ce-4cc11dffc8d2",k.Member_LockedRiftsVideoPopup="5afebb38-08b5-4007-adb1-ce53a6059073",k.MembershipButton="386ac2b6-c46e-4cf9-8a23-e7db6cb87ba1",k.MembershipParent="ffb23bc7-99e7-43d0-8d7c-959368fbab0d",k.MembershipSchoolAd="c54ba39e-3ccc-4235-9dfc-fe3d032187fc",k.MembershipSuccess="18482125-378d-45d6-8e32-0bf4637f90a0",k.MembershipSuppressionTooltip="eb5a918a-3042-44ba-ae91-40445f35e8fc",k.MembershipSuppressionTooltipMenu="8898a24e-c4c6-450b-b682-005af5b15d6b",k.MembershipVideoAd="a77d89fb-0220-4cc8-b50d-d84720b2dfd5",k.MembershipYouTubeAd="c37e0a92-7388-453a-9b3e-da705f84c1f9",k.Memberworks="97cab445-cdcd-4fde-9769-8d45547bf11a",k.MergeBar="017bc79d-de8c-4554-ae26-e137e790e5b2",k.MergeIngredient="d7008c76-d93e-4503-a704-edf566f93c0e",k.MergeIngredientWidget="ac5d1a07-f7c6-48b2-a02f-a3bb3dbda3e2",k.MergeRankBadgeLarge="1676d3fc-cf3f-4321-95f9-050a0a917674",k.MergeRankBadgesmall="6d5e96d6-39bc-4eb8-8add-18bad3f11e4f",k.MergeSuccessBadgeVFX="a328816e-5e07-4d20-9808-349ab5f3f2df",k.MergeSuccessNumberVFX="0076fbeb-5385-4043-9d37-0b1ff0198da4",k.MessageBox="a1d0fd8f-e51e-4276-b8f9-89e5ee92e5f7",k.MinecartSuppliesPile="80fe2449-99e6-4f0d-bdd6-8179802906cd",k.MinecartTrackBoard="c36b4076-771b-4e60-abaf-ddf0d4c86930",k.MinecartTrackRail="94e1fe77-0dbe-4bbf-95e5-ea707007ed5c",k.MobileUpsellModalOffseason="3c5cd356-47ba-440d-9f7d-ccb691b8570a",k.ModalCloseAnimation="e41f3893-9306-47fa-92e9-4e038067db28",k.ModalDialogBackgroundBanner="cba8f9c9-b62c-4873-a571-57e29977ae5c",k.ModalDialogBackgroundBase="2a318f65-0bae-4e36-b551-84f93be3eede",k.ModalDialogBackgroundBaseSortingAnchor="e20cc2b2-962d-4556-94a4-4e9eb6ed6597",k.ModalDialogBackgroundLarge="51511cac-c7c9-4d10-bb33-a78c42f5ec68",k.ModalDialogBackgroundMedium="8aa8df9a-e2ed-4751-9188-d0527e41fbab",k.ModalDialogBackgroundSmall="cb5675f1-a15c-4e61-9a93-feceb823d6e1",k.ModalDialogBackgroundX_Large="54d80c70-5534-4a9b-86b2-208d52e07772",k.ModifierBar="5fc3725f-d8dd-4602-8871-448c5130128b",k.ModifierIcon="c72feaaf-8a1a-434a-a96d-a59453339dd7",k.ModifierIcon_WithTooltip="26684bd6-470b-4e88-9238-f6bc52867f12",k.MoonA1="aacfa1fe-370d-460f-977a-228505774cd0",k.MoonB1="d080cf08-ffcc-4c83-abbe-da789aff9331",k.MoonC1="a42ee972-b18e-4615-870b-21d18d793e88",k.MoonD1="6b93840a-b98d-490e-bbfb-9e1fb977aac5",k.MoonPortal="03d4d8a7-1ed0-4288-abec-1852236cf0cb",k.MoonWalkableScreen="24fed0ce-6dab-4a77-b8e7-59f7f60efb1e",k.Moonlight2025MoonArrival="d4c6d02c-a66d-4280-ae4c-156ed97ed926",k.Moonlight2026FinaleCutscene0="90101948-166b-4336-97a8-8594116b924e",k.Moonlight2026FinaleCutscene1="40455b32-6202-4ff8-ae50-2e11292d90b1",k.Moonlight2026FinaleCutscene2="59994356-ad20-4816-a7b3-66092049bd53",k.Moonlight2026FinaleCutscene3="d575e79d-7c56-4b41-980a-fbaab29e33c1",k.Moonlight2026FinaleCutscene4="a4f336f5-5394-48ec-b2e7-306158986468",k.Moonlight2026IntroCutscene="a390ee52-de3c-416b-9ef4-649dd9688810",k.Moonlight2026IntroCutscene2="571b56cb-d04b-455f-a96b-e6661f0c4f72",k.Moonlight2026Story1_3="73fc2346-e6ca-4339-a7d8-bf0960c592ed",k.Moonlight2026Story2_1="339d7ea0-7622-422c-94ac-68d079bc09d1",k.Moonlight2026Story2_2="c81cb16a-6032-46b5-a69d-e9b539282ace",k.Moonlight2026Story2_3="b22345cc-cfe6-4047-8db1-e4471691af57",k.Moonlight2026Story3_1="cd7fd03f-88be-45c6-a91b-bf31c48f4de1",k.Moonlight2026Story3_2="10e1c548-e870-4b58-b11a-bb56f7454431",k.Moonlight2026Story4_1="a8380002-480c-4b21-83d2-f3ca767e9f5b",k.Moonlight2026Story4_2="f86c7095-e1f0-481e-85fa-d9f83efa6706",k.Moonlight2026Story4_3="bb7f56ee-e500-482d-a675-bf7dd0511e02",k.Moonlight2026Story5_1="32da834a-8008-4ebe-b280-f5194d745bfa",k.Moonlight2026Story5_2="2fd5f087-7ef7-4739-853e-298bbc8fce6d",k.MoonlightBossStatue="fdfcb576-13e3-4b66-8e6d-2c64f083e8e5",k.MoreItemsCounterCard="f7fc5047-8e53-498f-9b88-a54b4f719a84",k.MoreMagicAtHomePopup="02cd1957-6f99-4862-be67-4a6fb1319aa7",k.MorphMarbleButton="e94d0dbb-d754-4384-be03-3bf4405d05e0",k.MorphMarbleIconSpine="37a4238b-4bcf-4da7-9853-d249281c53fc",k.MorphedLegacyFollow="99b8c066-153f-4b64-8f31-f013999bd6e8",k.MorphedSingleImageDorm="7f4c0349-a4c2-471e-849e-418bc6f30b9a",k.MorphedSpineFollow="67a7bd11-9c7a-42e4-a18d-3ee7e70ca835";k.MountPreviewTool="cfa08d0c-26c4-4d0d-93c4-99a3908fa452",k.MoveFloor="c16c8fac-546e-4a8f-9699-96afe7d42bf2",k.MovingImageTween="76892994-f7dd-4bcf-a46d-b54dcd910245",k.MultiCurrencyWallet="c9624751-c2c9-482a-96b9-77ff25ac944a",k.MythicalEpicsCarousel="4a494381-5e03-41e0-ba43-007be9819e9c",k.NPCAcademyMerchant="da9f045e-f7d3-4b2d-9bce-c566869d013d",k.NPCAspenFrost="fd48539b-0b8e-4e4b-9e3e-ada16d096a68",k.NPCBenni="a6477340-d0ec-467f-8215-8233ac847d74",k.NPCBenniandBroccolina="84e11a0a-480f-41af-95be-dad7c5bf0298",k.NPCBossStatue="6605a0ab-355d-41bd-b8c7-52ee317591b8",k.NPCBroccolina="82a09006-0152-4f46-953e-92c747850df4",k.NPCEugene="43ecf99f-48bd-4e9b-b613-5eff88f8a6e6",k.NPCGale="3386158a-44c0-4d6e-b9a5-45f1669a6a38",k.NPCGnomeSpinner="5410643e-1f60-4fbe-9543-381f5845b87a",k.NPCGnomeStylist="9e3ad609-86f4-47e5-b88f-120ad9be8983",k.NPCGnomeWheeler="fd0edd4d-6f74-4c4c-87ca-e15749814858",k.NPCIndicator="982b5f6c-e362-46df-95c3-6405f0a99286",k.NPCNoot="1e3594ac-0daa-473a-ba58-00d9555b5b09",k.NPCTheoAddiwise="e59a37e5-242d-41de-b6bb-4857ea3770fd",k.NPCWizardBase="01697576-347d-46e1-a054-f4f32a5778f6",k.NavigationGuideHand="7ac0c322-6503-4a19-8d9d-2f31c0a98492",k.NewTownPopup="6026dfea-1840-4632-a262-e0fefbfb2d37",k.Nicknamer="c3ac7fb9-b56f-4f2e-ae20-da8fb9c552b8",k.NoShadowAnimatedSpineCreature="45da9634-1d20-4249-9c7e-397e5f3f3e70",k.NootBattleTip="3b21f27f-e737-4d30-b085-bd74777cacdc",k.NootSpeechTooltip="cb09ab46-f605-439e-84c8-26572f2207fa",k.Npc_imani_star="bcb070db-74e6-45a1-864c-544cf428b708",k.Npc_kandi_kart="70e51761-df90-4e60-be26-1dcac6b72b4b",k.Npc_kandi_korn="b4abfa7e-97d4-4d44-b342-75a6bc828896",k.Npc_milkyway="9a32bf0d-748b-4188-aead-75df2b9be79a",k.Npc_poppet="097e536f-b637-40b2-9138-71203b14e2f2",k.OTPCelebrationCoin="ffa021d4-135b-41b7-b044-75fa78558444",k.OTPCelebrationModal="3412d343-6304-4140-9e42-57a5035060c4",k.OpenPWAInstallMenu="e741c190-7589-4ab2-9a85-8668b3c4210a",k.OptionsMenu="da0068bc-3803-4b05-8bda-f76f96a91a8b",k.Orb_burst="c3a867b2-1947-46e2-a472-febcadd7bf5a",k.Orb_burst_2="2fe2168b-1e64-4a80-a175-45c0e32aa410",k.Orb_particles_fall="2c87b6a5-94df-49d0-99ee-c3b7f3d25334",k.Overlay_difficulty_expert="5ef74941-73f6-4083-9b13-97923cca6659",k.Overlay_difficulty_expert_particles="f5dff32e-b002-4b1c-9502-c4a2f7e120d4",k.Overlay_difficulty_hard="74f020ae-f283-4799-9b67-f6dcab484fb2",k.Overlay_difficulty_hard_particles="7edaa81c-30d0-4dbe-b824-d354d6022cc0",k.Overlay_moonlight="217578d0-5547-47ed-b9fe-5d6bc96cc977",k.OwnedPetCardInjectionConfigured="364911fa-c99f-407e-8af6-0157cacba222",k.OwnedPetCardInjectionConfiguredMergeRank="dd4156ac-d6ec-4500-846a-103052e4f971",k.PVPArenaGate="f5f8abfe-6766-4981-ad51-edc544561bf8",k.PVPArenaNPCArenaMaster="dd4dc09f-9d51-40b5-8846-6393951c2bdd",k.PVPArenaOutsideTrophyCase="da6bd42e-06e0-4dc5-b976-caf20800ba67",k.PVPArenaSignpost="34a7a6af-968e-460b-8f8e-802b9ba7440c",k.PVPArenaTrophyCase="b388ddef-c031-4e98-ae1c-e32975e7fb00",k.PVPArenaTrophyCount="c248c8b1-4fae-42ed-8ef5-800be0d43eb3",k.PWAEntryInitialization="a898481f-808d-48dd-91db-cb9441348489",k.PWAErrorPopup="505ae35e-457c-4dfb-a633-170572a4cdd7",k.PWAInstallMenuBase="2df094ca-b6bd-4ca1-aeb3-be207554ddba",k.PWAInstallMenuBaseSmall="757fd180-0ff6-45e1-97c2-aa98f96f555b",k.PWAInstallMenuNoIncentive="eb5cd5c8-25dd-4f7f-a72b-441a22e0f741",k.PaintBalloon="e93677d9-c599-40f5-a1e0-29f8e18703ff",k.PaperDialogInjectionConfigured="35687420-dd30-4411-89e1-20aaab8521fc",k.ParentAttach3="212a3c6e-0113-4c17-a647-f0362a5203c9",k.ParentAttachModal="07326396-e362-4272-989c-0f853701ab6f",k.ParentGoalParentAttachModal="a0afb3c5-2747-4fe1-a693-80f9a222fe1a",k.ParentGoalStatusDialogBase="4ad7fd94-17ac-42ca-80c9-a9b7da1422fb",k.ParentGoalStatusDialogComplete="edc6419f-02a7-4db8-be70-3c78dbc86546",k.ParentGoalStatusDialogInProgress="43f733cd-9f6e-4124-ad9f-c7494513b536",k.ParentGoalStatusDialogNoGoal="90cef2ce-9eb8-4466-8cd5-cc9234bf3d96",k.ParentGoalTracker="d9ac6f78-bb11-4a5e-976a-bd39faa63d2b",k.ParentSection="819901b9-7cf0-4541-b1fb-e873f8c2dc3b",k.ParentalConsentBanner="9dd203ff-6a15-4b0b-8d33-a049e2d40c81",k.ParentalConsentModal="9f59a705-5589-4573-a782-afde8c8164b0",k.Particle_astral_burst_1="929beba6-b5e0-4818-b9e7-1cd6869537f3",k.Particle_astral_burst_2="e09994aa-3f0f-4d92-8490-998a5cc833ee",k.Particle_astral_burst_3_rune="aba7824e-24f7-4365-bef2-b05c7813eb71",k.Particle_astral_burst_directional_1="9d20a3b5-f830-40cc-ba6b-4ff47af674fe",k.Particle_astral_burst_directional_2="155035d6-10a5-4ef3-8219-9581f5600bff",k.Particle_astral_burst_directional_3="141d33ff-dc17-43dc-9ddb-f5eb34b3cd83",k.Particle_astral_impact_dust_1="41e855bb-0ea2-4f0b-9637-38fb1974351a",k.Particle_astral_impact_dust_2="41b9c17d-e34c-4cb9-bb3b-2ed8986c8eea",k.Particle_astral_impact_dust_3="5c28487e-5f07-4572-84c4-40ea0c4bc962",k.Particle_bomb_fire_exit_test="bc8c5270-18b0-4839-8967-47988e190770",k.Particle_bubbles_rising="148ac653-174d-436c-9f6b-6a0b721514f3",k.Particle_confetti_moonlightfestival="0c97d8f3-1fe9-483c-9caa-da2cc6144fb6",k.Particle_fire_burst_directional_1="af207485-37cf-4b3e-8479-3abff7c103d5",k.Particle_fire_burst_directional_2="6b2a1288-3347-4717-937e-ac51b7fe06fa",k.Particle_fire_impact_dust_1="a8959c08-a826-4566-a12e-74da46542081",k.Particle_fog_pumpkinfest="f37d9e65-763d-4f96-ac86-17210c600b8c",k.Particle_ice_burst_directional_1="90ab2afa-eec7-495a-9d30-95dbeaaf5795",k.Particle_ice_burst_directional_2="d8fb76df-27f3-4912-9d96-984debdda0eb",k.Particle_ice_impact_dust_1="311586cc-250e-4eb4-8093-e025abc1eb18",k.Particle_icon_glow="b2c6dda3-24c9-4e26-888f-fdb816945f22",k.Particle_icon_sparkles="036d32c9-fbe9-4c2a-bf3c-67adb1801265",k.Particle_ink_explosion="766784c1-0181-4c4f-8c0c-07fc5216cafc",k.Particle_ink_idle="1a15a63e-2a9c-4372-81f9-ee23fae620d1",k.Particle_ink_idle_small="b4b6a781-5244-4882-a080-b6cf441a7c2a",k.Particle_lost_charge_stream="af2682ba-690e-42de-b431-992eeb38d59d",k.Particle_pet_to_store_A="103e2891-36b3-4b58-a2f4-4e115451d1a9",k.Particle_pet_to_store_B="5f8cb304-30db-486b-9a93-1ea71324215f",k.Particle_pet_to_store_C="ef314fb0-7b30-436f-9a1f-804553f22fe6",k.Particle_pet_to_store_D="a93de2a5-e926-4a80-80c5-662293c53849",k.Particle_physical_burst_directional_1="9b4f196a-6902-4318-a68e-e7a798fb5a5f",k.Particle_physical_burst_directional_2="7c878019-1af6-487d-8bbf-295a04137a15",k.Particle_physical_impact_dust_1="38e59f12-ff67-4999-922b-3bd0e3a77dc9",k.Particle_plant_burst_directional_1="7e8921b0-b9af-4ff5-b61e-9c1032c72e0c",k.Particle_plant_burst_directional_2="b441fb95-6ad7-4619-bb26-87b3d7eaccde",k.Particle_plant_impact_dust_1="b23e920e-baa4-401c-8473-ca582af4ecff",k.Particle_sand_rise="b5374eac-bbc7-4388-ac96-14af32ea107a",k.Particle_screen_dim="0b3a250b-7ba7-4d25-91a3-9d1980343a59",k.Particle_screen_dim_long="9cff7a2f-028b-4445-af96-2b1f2b3471f9",k.Particle_shadow_boom="41cff766-5076-4cc5-bfd4-f25eb4767bea",k.Particle_shadow_burst_directional_1="69ff659f-9768-45df-944b-ea0e16e60c74",k.Particle_shadow_burst_directional_2="ceb09c38-6ba0-4acf-b284-0f5393c969f6",k.Particle_shadow_impact_dust_1="8e0bfb35-6e75-479d-a60e-f0745e078b2e",k.Particle_shadow_trail="9438ea3b-f8b4-4048-9db3-090b4f9cd737",k.Particle_smoke_morphmarble="65255952-3ac5-4612-be23-e37e30ec7afb",k.Particle_smoke_smokestack="60a800de-a83a-4f6c-b19c-f35ba3feaa9e",k.Particle_smoke_white="c2327db8-1b44-409f-8387-c7633127c082",k.Particle_snow_1="eed660c1-3d30-479d-8003-e488e7209442",k.Particle_sparkle_trail_1="46bdef16-21b4-42c6-9625-f8857980651a",k.Particle_spotlight="b0edc171-e9af-4012-8b34-001c2118f994",k.Particle_storm_burst_directional_1="8adb36cb-6227-42fd-a22c-530fec3695a1",k.Particle_storm_burst_directional_2="6fd55f97-c86a-4608-907e-f226df4f4b35",k.Particle_storm_impact_dust_1="b5d79c7f-911b-4f9b-8651-17159f4d55c0",k.Particle_treasuretrack_trail_1="1b2b6d78-2d8c-466c-b138-a6acda67a3ef",k.Particle_water_burst_directional_1="c2520b98-8db7-4272-8f94-517bee0e2556",k.Particle_water_burst_directional_2="2b71ce7d-b7e7-4344-b225-fbffeb4c6d96",k.Particle_water_impact_dust_1="7b2a4845-d93d-431f-bf43-92cd3f6eb7b1",k.PathingStar="9518748a-13e3-4f2e-852b-4e42bd85ca02",k.PetAboutInfoCard="76bfd317-9e3d-4aaf-ac97-6feec08665a4",k.PetBookGearSlot="2d106c5e-e9be-4583-8a2f-f76ce406a55e",k.PetBookMenu="e4fa3c64-2bf3-482d-8d25-89c7c3b02c5a",k.PetBookTeamSelection="d21adf52-3dcb-4522-bf40-27d1492756a4",k.PetBook_PetCard="dd35869b-0d2b-42c8-abd7-bc4cdef2b59e",k.PetCaptureHighlightSmallTooltip="ac1a9380-65ed-4aaf-a305-ea77057df8b1",k.PetCardRarity="3b64692b-fc74-4572-9d8f-7ddb8a079bd2",k.PetCardRarityBackground="282d3611-3a24-419e-a26f-899e4547135c",k.PetCountRestrictionHelperContent="16a3cedd-79e7-499b-8cef-42cd144cb4d2",k.PetDetailsScreen="04ca63b1-d490-4440-8943-58d3d36ce258",k.PetDifficultyIndicatorIcon="fd1b8fba-3e56-4d55-9e73-229a0eb61a2f",k.PetEvolutionDisplay="4f7f09f0-0fb5-426b-b9c5-d127f0d91564",k.PetEvolutionLine="c7be8c8a-b01c-401e-a022-75e786473a6c",k.PetEvolutionMagicoinModal="0cc7d11e-eb16-4332-8810-10e05075f37d",k.PetEvolutionPanel="aad8dee1-2f6d-4a5c-9089-7a43f94b25af",k.PetEvolutionSequence="7149027e-4544-4c4d-bc36-cf4311018916",k.PetEvolutionWidget="4b06d0d6-3091-4c2a-afa2-f35828e63ba9",k.PetFocusContextualPanelContent="d8a01778-a189-44d3-bcdf-41c1ca70ad84",k.PetGearDescription="fdf102bb-e0ba-4960-9f93-ffe1e3ee734d",k.PetGearFtueOverlay="7a06d692-db44-48c5-84ed-e2970b03e1e8",k.PetGearItemCard="57394207-7650-4365-b68c-63f72f8b5308",k.PetGearTooltip="8192e149-fd81-4938-9d8d-f3c5ecd79245",k.PetGearWidget="f9f25c01-180f-4203-837b-11ff09b47fab",k.PetInfoLoreTab="a7aea094-4ed6-4280-ac89-1224df5601db",k.PetInfoScreenCard="33a1192b-a968-46c7-acb0-3806346b3800",k.PetInfoStat="dc7e4985-c6fe-4de5-8e24-e22ea376b0d4",k.PetInfoStatsTab="e932f227-df58-43ca-91cd-dab5f2081133",k.PetInfoTab="d0df30b9-8102-4da6-8090-6e6add1686a9",k.PetInfoWidget="7f9ce78e-7514-43bb-8757-c8d56c519604",k.PetInventoryScroll="fee6bb72-95f3-4665-8ad8-eec81141049b",k.PetLevelWidget="1519bc39-5f2d-464b-b5eb-a8610c78d3a4",k.PetMerge2Modal="01b373c1-e724-4a3d-bf07-04036bbc3ac9",k.PetMergeConsumedIngredient="f31191a8-d3d1-4903-b78a-ad0fcbfe5e55",k.PetMergeContextualPanelContent="44e974cf-2abc-4b1d-8a42-e3875a09e514",k.PetMergeFTUE="6f0f90b8-de17-4be6-89dc-1c47c7ea4fa8",k.PetMergeModal="5e53903f-6c5c-45ba-a35e-5b389d9e7e35",k.PetMergePetFanfare="4b24e560-8aa7-4101-a1b0-196111930f5a",k.PetMergeRestrictionHelperContent="204ff384-6360-4274-bcbb-86b0ea60acc4",k.PetMergeWidget="e66f6a25-046e-4f26-b001-f054a1c2829f",k.PetNameWidget="a4a7bbc8-ba1d-47f7-9133-6f6ebe24df8a",k.PetPlatformWidget="ba1d8c0c-b2c5-4d34-aa05-3470e02fdcd7",k.PetPostEvolutionCard="b9a0f728-7828-476a-8a56-ea12dedaf1b5",k.PetPreEvolutionCard="bab37c3f-8aec-41f7-9aaf-3d1af2444d26",k.PetProgressTabController="a58ac210-1436-439d-a342-8cc77c590d88",k.PetQuestInfo="b8f1822d-03b5-4810-bae3-26ba898324c1",k.PetRescueCard="f9fe1d73-b28a-46aa-8b46-8fe5117e94b4",k.PetRescueCardSequence="8bafaeb9-1983-41e6-9d27-b02c5f04852f",k.PetRescueExperiment="5f1fc64c-f981-461c-967d-de22ba1c1500",k.PetRescueStampSpineLocalized="7b87eebf-38b3-4807-b28a-f05d9feea67e",k.PetSelectionDrawer="7c992288-c7f1-4a22-a6e1-b820a6501b94",k.PetSlots_PurchaseModalSidecar="8cf594e3-618f-4c0c-8f7f-e6992b3f46c4",k.PetSpellWidgetCard="03ec51be-c419-417e-9121-dcece7d8c20b",k.PetSpellsWidget="68232e17-b553-4372-936b-325b8b79b5e8",k.PetStandView="11c2342c-ad09-4021-8d3f-04dbf4421ad8",k.PetStatsInfoCard="bb0e4fe9-0e05-42b9-a1c6-8661eb5af225",k.PetTamingTaskProgressCard="a49b5e5a-be60-4e4d-bd7d-d17997631f50",k.PetTamingTaskProgressCardV2="f29e0afa-c262-4cd6-b47e-875597b55fb8",k.PetTamingTaskStatus="c73d11f1-e4b7-41d6-bf14-a7b77d9c479d",k.PetTamingView="af15c3bd-ba60-44ff-a3a6-b92fd7809ad6",k.PetTasksTab="be90c9bf-2ec5-4056-93a1-e110fb943698",k.PetTasksTabV2="7de8c6e8-3ee0-4536-9bc3-1de0eee8f9bf",k.PetTeamCard="337e778d-d9b4-4fb7-9105-0a7dd73c7bae",k.PetXPBoostFTUEPopup="ff0b8d68-96a0-43f1-ae16-43d04f32bcf3",k.Pet_Merge_FTUE_Popup="23c2e24e-9bd6-4d0a-a14f-f487c2ddc60f",k.Pets_AddPetSlotsWithoutConversion="cc7da06f-4329-4e52-a48f-71211e4a6fe0",k.Pets_Background="deaf21f9-e416-437b-a348-38cf09bf8023",k.Pets_BackgroundPetBook="366bbcde-0f91-4f9b-ba36-11537a853b13",k.Pets_BackgroundYourTeam="1a816b0b-02b3-47ce-9d20-9a7728707697",k.Pets_ButtonTooltipOwnedPanel="89bc34ad-a329-4d95-9d0a-81345dd3842b",k.Pets_ButtonTooltipTeamPanel="dece6029-923b-43a5-b114-dce4e3c77c93",k.Pets_CarouselCreaturePreview="510f2023-d98b-4671-be05-143e5accc46a",k.Pets_CustomDialogFooter="c50c7501-139f-4d4d-a18c-8d07dfd8fa50",k.Pets_EmptySlotCard="e636f7cb-6684-445b-aa66-5965e1fc7b34",k.Pets_EmptyTeamCard="fab69025-5aaa-4f86-b4c4-eea77d7b3734",k.Pets_FilledTeamCard="7b25559d-d6f2-4a16-9d0c-24d2b9fe1118",k.Pets_LeftSideYourPetPanel="ad005f96-ace1-427f-b7eb-a84d0fe6264a",k.Pets_MenuHeader="603e642d-43f7-435d-adf8-111edc412559",k.Pets_OwnedPetCard="83b0a5fd-afac-4336-b35c-d56592e8b7c6",k.Pets_OwnedPetCardwithmergerank="a0b0695d-29cb-4d56-8ce5-f9c7de728dba",k.Pets_OwnedPetsScrollviewPanel="6a8bfe5b-80a8-4f8f-96ba-8355ca13383b",k.Pets_OwnedPetsScrollviewPanel_PetSlotsLayoutVariant="4f1c2d2e-6636-4d3f-a201-d011de3b8a41",k.Pets_PetBookCard="48479669-ed5a-4848-b260-343ab900084d",k.Pets_PetBookGridandUI="fd5f0b3c-4985-4063-8578-592845359f4e",k.Pets_PetBookMenu="d43edf90-57c6-44c0-b4df-01ea8fc2921b",k.Pets_PetEvolutionInfoPanel="5a328e09-a4ef-4738-9aa9-1cb8d760826d",k.Pets_PetInfoMenu="08027796-5d46-4e0a-b0aa-c428f0cf56f9",k.Pets_PurchaseSlotsButtonAssembly="f2182f11-312f-44c9-9eea-83604fbd43f2",k.Pets_RevampButtonTooltipOwnedPanel="6f13cc8b-e3e2-446d-ad39-4e7656ef66a5",k.Pets_RevampButtonTooltipTeamPanel="8ed6b5ab-9a1b-433c-a23b-047f7e65ba3a",k.Pets_RightSideStatsPanel="02b7bd8b-fea0-467c-aa98-5ab25670607c",k.Pets_RightSideYourPetPanel="e905bf3a-c9f6-49e7-9f61-0bd2169c0268",k.Pets_SlotsOwned="e6152207-b552-4e73-895c-f037998a0045",k.Pets_TeamPanel="4b2943f7-f0a7-4a6b-a86a-18b49719e0c2",k.Pets_TeamSwapUI="3bdc600b-52e8-4267-b091-6c86ad4fd630",k.Pets_YourPetGearMenu="ba9d7b40-eeea-4800-98dd-0b9723caa629",k.Pets_YourPetMenu="bf29d664-f591-431c-af02-dfa8ec0c6b57",k.Pets_YourPetMenuHeader="0022e374-367c-4e89-a227-bafb355f2290",k.Pets_YourTeamMenu="ad167b80-ec13-4619-95fe-198a3dcf76c5",k.Pets_ZoneUI="101dab12-99de-4b54-badc-91fc37492b13",k.Pets_ZoneUIButton="46e7832e-5a9e-4607-a1e7-68b966859a61",k.Pets_ZoneUIGridElement="72888420-674b-4888-a0d6-a34f92a5a17e",k.PetwithNameandWeakness="ef8552f1-7f82-4657-95a5-2c33ce3dcab5",k.PippetNPCLegacyMaps="1ca6e8d0-356f-404b-8d0e-03f368a3de63",k.PippetQuestEncounterCutscene="6b7b227a-3d32-48ec-9787-2658a8ebc793",k.PlayerHubMenu="42704dc2-180c-4df6-98a6-057a6438f03d",k.PlayerLoginInfo="717340e4-7bf0-4812-b2bd-3e1ca2ebeaad",k.PlayerSummary="7885b29f-39fc-4577-8145-63dfbceff6e5",k.PlayerTeamCard="a9de0f52-d320-4b9e-b072-a2c7eafb573d",k.PlayerwithNameandWeakness="6b920814-f927-4654-a614-2073175738ce",k.PlayerwithNameandWeaknessandStars="d5ceca5e-d20f-4d54-8c6e-1eacc22bf536",k.PopupPriorityHandler="fe121dac-1cfb-4918-8dc7-04db1a562ce4",k.PopupText="a53be86a-925b-452d-9f99-637095bcb933",k.Portal1ShopNPC="bea5701b-7e9a-459f-8ca6-cf85309d4f07",k.Portal2ShopNPC="c129011b-6b3c-4856-b064-daeac99d2e5c",k.Portal3ShopNPC="c677ecb3-57d2-4cd0-9cf5-371bbb7a40d7",k.PostBattleFlowBase="b3b44488-c061-4cd9-b6e1-47cae010a1f5",k.PostBattleMembershipVideoMenu="98caf7c9-e241-4035-8036-854b79a103ec",k.PostLossFlowScreen="db0e96dd-9ff3-4a7b-a9e6-8995c4a1c916",k.PostLossFlowTeamPetContainer="ef04440a-2a2d-40b6-96ee-a12df115fa37",k.Post_fx_particles="58ce1f99-df0a-4506-b0c7-25413e90b270",k.PrebattlePopup="8015128c-de82-426d-bbbc-fa97c4d94bc3",k.PrefabAdTest="f7e5db39-39fb-4bea-8b2a-1515077d59d6",k.PrizeIconDailyLoginCalendar="b3d3d083-910a-4564-a8cb-875381b4ef4e",k.ProgressBanner="5426b858-2196-4ce4-bbf0-fa5adcd626fd",k.ProgressBar="026d935c-bcf3-4a4d-85fa-c757e464b020",k.ProgressMenuBase="77a246b8-5f31-49c0-bc5a-ceccb805e439",k.ProgressStep="d2589ef6-1125-4df6-8d57-75ea4a5ac8d8",k.ProgressTrack="6f13a3f9-7119-49ab-9749-400eefa0dfa4",k.Pumpki_poof="503b6560-6454-44ce-897f-fb674c4de2a7",k.Pumpkinfest2025CutsceneCrowd="3b1d641b-eca5-4819-baf6-330e73062d73",k.Pumpkinfest2025IntroCutscene="c60ca394-8213-484b-b123-897d5337ebf0",k.Pumpkinfest2025Quest1Cutscene="72abcf7b-6be2-4348-85f4-62a9e322aa85",k.Pumpkinfest2025Quest2Cutscene="92df56fb-2fa2-4ad2-81e3-92c821373ec2",k.Pumpkinfest2025Quest3Cutscene="862f25d9-0f49-44e8-a9e0-0a0a4c6f6b63",k.Pumpkinfest2025Quest4Cutscene="6d4bb4e1-1945-4fcf-a919-ec878eeed7c4",k.PumpkinfestBossStatue="be66f894-0a3c-4653-af4a-3d6a79aee2da",k.PuppetMasterBattleEnvironmentFX="ea9544ac-0823-4dde-b14e-d699baad872d",k.PuppetMastersDragonOrb="9b9e0dfa-84b2-4a3a-8317-92e23d6489b1",k.PuppetmasterNPCLegacyMaps="429138e3-47ff-4910-bffc-0a229529cd10",k.PushNotificationEntry="ddedf67f-0469-4b11-8f66-3828490f114f",k.PushNotificationPermission="fab56b18-1d84-42e2-8c8d-5aa69726d7ef",k.QRCode="fcea2758-df48-49c2-84cd-9d90cea18234",k.QueenGoo_liaNPC="ec3f54f4-46de-4907-aea0-7186106c5666",k.QuestGuideBanner="b1065462-2b72-4c20-b4ed-31972907c3ce",k.QuickRenovationComponent="be607cec-dcbd-4d1c-8f61-40ff7286279f",k.Rainbowworks="af62580e-21e5-492c-95fd-1f9269b8dce4",k.RandomPlayerAppearanceLegacy="b6fa975a-3c68-4fbd-8dbf-7b310fbb0ea5",k.RarityBanner="8c79234d-dd1c-4f00-85a7-e051ab20a0a9",k.RealLegacyFollow="34b23e5f-0dff-43b8-bfff-90d1bf005095",k.RedMediumButtonTextAndIconRight_RectTransform="81a31dc9-e710-409f-abe0-575f12761e94",k.RegistrationCell="2e7d24a5-a7aa-45b5-9269-8cd3f972f4b4",k.RegistrationChooseCountry="48eb9712-a0ad-4a6d-93f4-f0c9c7dbbd23",k.RegistrationChooseGrade="5b26adea-cd56-478d-b787-f979e78cc136",k.RegistrationChooseName="fd4a87c7-bd55-4dd1-9811-7be2859b9e20",k.RegistrationChoosePassword="1a445a03-4696-4255-863b-ce63cbb0753c",k.RegistrationChooseSub="71356bbf-7525-4350-be62-6a28d6efce72",k.RegistrationClassCode="f8fad4de-39bd-4ae8-8e72-e0a9b1ee7c06",k.RegistrationCountryButton="e0eb302d-d4cf-4162-a1a8-fa14b2e1ad01",k.RegistrationGradeButton="6dfe4559-a044-40e8-850b-8b2496516e27",k.RegistrationHeader="9282f708-e29e-4427-b9b6-450b710542ad",k.RegistrationHomeorSchool="6ea9f2e8-3440-4c31-a895-d4d00b218d5a",k.RegistrationScrollBar="f6dbd550-f849-4254-8c96-490327804add",k.RegistrationScrollView="c3f4f422-e0a6-48ed-92ae-5b98281ee2bd",k.RegistrationSection="7c530624-38bd-4e98-b6a9-4023db5660bf",k.RegistrationSignupSchool="521eb027-0b88-479c-aa01-70f6b9598d70",k.RegistrationSuccess="9349868c-3a29-47fe-8e77-ee003c8252e5",k.RemoteDungeonPlayer="534113f9-fd78-4330-96cb-60ae8bd5e6bf",k.RemotePlayer="ec88031e-0010-45b9-93d9-3696d7ace879",k.RepeatingUnidirectionalBackground="e5726196-a9be-4175-a304-fcb1e431f44d",k.ReportPlayerPopup="ea6aaff6-8dbc-4a64-8e11-819a603da40a",k.RerollEnemiesPanel="2ae9f1bc-5129-4802-aad8-061b80159e5c",k.RescuablePet="aada0a1d-3366-444a-9fac-4bb3cb58a383",k.RescueAvailableSequence="f2718256-8357-4e2c-bd1b-345dc18488b9",k.RescuePet="924f3c70-cb9b-4c54-bdf9-e327e30276db",k.RescuePetPrompt="63bc22d8-bce0-4e82-824d-5437f51107ef",k.RescueScreen="0ed56e71-2074-41d9-bbca-e428ec8167a2",k.RescueTooltip="bd5ab2ae-2a32-476b-a6b4-10d62d42f41b",k.Rescue_AtHardCapTooltip="97ab9a2f-e2aa-4b85-9b87-1f418254f247",k.ResizableTooltip_RectTransform="f046b64b-037e-4739-b9f5-577d1a784cfa",k.RestartDungeon="dfdd5ce8-8445-43a0-aaf0-3ab6d5b7d8d1",k.RestrictionHelperBaseScreen="72545f44-2abc-4651-a9fe-d053fb822841",k.ResultsSkipInteractable="9df8feaf-d5fa-4eb1-b5fb-9e8d49104c19",k.RevampActionMenu="8648ce6d-d05f-405b-940b-9bfece7cafe2",k.RevampActionMenuIcon="0b4a1bb5-2231-4428-8e38-9a41951cffe7",k.RevampBattleLowHealthBorder="4b28c28b-d4ae-46e5-828f-92dc3963dc04",k.RevampBattleMultiTargetObject="96262dae-b10b-4440-ad5f-00a6d5898cd9",k.RevampBattleNewIndicator="48992009-9050-443a-a43b-976e54620793",k.RevampBattleScene="edff9ba9-cd7b-4369-8e30-455c3cae40a6",k.RevampBattleTargetContainer="08d84cb1-94fd-4447-9e8f-f4ed4bac3bc3",k.RevampBattleTargetObject="83386d1e-c184-419b-bc24-26d3522fac10",k.RevampBattleUnitHome="8e03b300-95f4-4805-ad6b-2d2a38bee819",k.RevampBattleUnitOpponent="2c161c32-80b9-4cc5-b2dd-aefc60e17e24",k.RevampSpellCard="c8071de7-491a-46ea-86c3-3954f0f745be",k.RevampSpellHitInfo="81110ebb-a918-4b7c-80ca-295dedd5c096",k.RevampSpellTooltip="eeafa512-3f71-4922-b3a7-13e36f10b41f",k.RevampTitanContainer="a30c8100-6fef-414c-86ec-25946d7432a7",k.RevampTutorialBattleScene="7e11dc11-a480-4b0e-bbfd-56bb7f7d172f",k.RevampTutorialInputBlockingOverlay="d7e01b6a-03b3-4c96-8d92-d1ee0ef2f6df",k.RevampTutorialNootDialogue="60cbd447-d908-42e4-9194-abd8fa123bec",k.RewardCard="a6a9c6a7-5b3e-4a17-bd96-30453699edd5",k.RewardsDisplay="fb31030d-fb0e-4ea1-a9cf-77bad3c8adb5",k.RewardsFirstBattlePassMenuBar="506cd023-ae7f-40a4-8ad6-84da90386c22",k.RideableMinecart="7a3692c0-8cef-4962-a759-bcdd049a3184",k.RiftKeyInventory="aa4b5512-9f0c-4057-9ef8-aad7bcf5d5f4",k.RiftRunMenuBackground="ff749b3b-f4ab-4933-91c3-309fe089be8a",k.RiftRunModifierCard="30f5989c-4441-47b9-b9e0-4c0619ec984f",k.RiftRunModifierIcon_WithFlourish="d4fca01e-6cbb-45b8-9d30-ba4e16772268",k.RiftRunModifierPopup="857b1fcf-ab03-4f6f-afa7-b89880b6d186",k.RiftRunOpponentCard="ea4bcbb4-dd0a-4855-998e-a3366fb04789",k.RiftRunOpponentSelection="ca4b7dce-dcb6-4987-9231-75e8b7b9be3f",k.RiftRunPetTeam="fbdbb730-661a-4241-a23e-1c6a1e269659",k.RiftRunPortal="b62a4821-d886-4db2-a0f7-596d5950dd0a",k.RiftRunReusePetModal="400fe33b-cef9-4336-9d7e-c82e3b847d15",k.RiftRunRiftCard="0a2fa984-14fd-4fde-930e-c5e45bad2deb",k.RiftRunTeamSelection="6dfac5f9-53db-4780-97cd-80d33aa13251",k.RiftsCycleModal="76c596cb-953c-4f77-91ff-b790648bd135",k.RiftsRestrictionBadge="b76e8681-cb83-4474-87ce-1ac04c0e4d6b",k.RiftsSelectionMenu="e82b930e-59c6-4f91-ace6-86c8836238b5",k.RightSideHUDManager="b5240209-033e-4227-a4d7-fa95a3ec3330",k.RooftopMastery="60197ca4-edac-4623-a47c-0d949ddff287",k.RoomInfoStoreSideBar="a4ce522d-ec9a-4f59-9875-15041ffdb810",k.RulesToBattleWidget="305f52a5-493c-4578-96fb-791b09fcc64b",k.Save_trigger="4d8a543d-f259-4399-8bd9-95984910a158",k.ScalablePet="7b044fbe-f1f8-4d2f-a2cc-6c1d957deac8",k.SceneBackgroundCarousel="0bb538b5-8d0a-4a31-b251-eee3cc0c7285",k.ScreenDailyLoginCalendar="854400e1-7a6d-4f14-983d-a7b620f7fe51",k.ScreenSizeSection="6181e9e3-bd5d-4e4c-827a-714e370e960e",k.ScrollView="c6d00799-e5cd-49bb-bfb3-91bfbe7a47ef",k.ScrollViewDailyLoginCalendar="00c3f0ad-fc1c-49d1-a35a-9855007440ba",k.SecondaryHudBar="a8c6218f-a6cd-46b6-9e8b-1bbfed20dc9a",k.SecureBattleUnit="811ff008-78cc-4ed3-bc80-3275890ff601",k.SecureBattleWaitingMessage="c32fbece-26d7-43b7-bcad-698cd540b465",k.SegmentedOfferContextualPanel="53eb5321-c0ed-43aa-988c-2a0881a2b183",k.SegmentedOffersAccessPoint="e6420321-b325-4cc2-8998-69c383296406",k.SegmentedOffersCloseAnimation="c50ec24c-76a2-46cb-b013-2d2f4ea44482",k.SegmentedOffersModal="db998b22-8437-47bd-af92-e18d5afbdf5b",k.SegmentedOffersPanel="4e55d813-03ed-45da-91f6-a93cc35481dc",k.SelenaNPC="fb4c82a9-cd41-4dd2-8530-8e990c87f225",k.SettingSlider="49dae7be-a679-452f-b7d1-ce515f50bb8a",k.SettingsMenu="82f4f89c-70b8-4186-973a-be80bb937b0c",k.Shadowball="4c5c32b4-80dc-4bc5-9062-1bb717b8943a",k.Shadowworks="50b27e96-5ff9-4640-9cc9-1742fe0a1592",k.ShipwreckMerchantNPC="c13b5f5c-7fc2-462f-b8a2-86ca9a9b2384",k.ShipwreckShoreA1="2fbda416-04f6-4a0d-9282-ab0871eefc10",k.ShipwreckShoreA1Hard="1f7f577c-0eb8-44f4-90ac-e32331fd9f18",k.ShipwreckShoreA2="b88bb99a-547b-4c8e-aa8d-ad1c13b93ea1",k.ShipwreckShoreA2Hard="1452def4-0130-4057-928c-4b7dce192f62",k.ShipwreckShoreA3="26fc9f18-0577-4df2-bbad-49ff5d330955",k.ShipwreckShoreA3Hard="1e419b38-254a-4529-a9de-962282a807f2",k.ShipwreckShoreA4="deb7b3f8-4b82-4df0-8a3f-5f21a2178aa1",k.ShipwreckShoreA4Hard="80de1fce-ade5-452f-bcc3-fbc4522891c2",k.ShipwreckShoreA5="c965a714-8690-4ea3-b821-627f7ae22d09",k.ShipwreckShoreA5Hard="7669445c-370c-4920-b3b5-bfacfaac01c5",k.ShipwreckShoreA7="9f7b00e9-8c3c-41d8-bafb-a9f86e95839d",k.ShipwreckShoreA7Hard="4c38b6b1-63ef-442d-b035-02c3bbaa178b",k.ShipwreckShoreB10="e742ef39-c26b-4be1-8c6b-9fb0bb3e398a",k.ShipwreckShoreB10Hard="66a0d9de-9885-4072-9d6d-be30563c9c97",k.ShipwreckShoreB11="bd674223-8650-4b78-88aa-b0946660f689",k.ShipwreckShoreB11Hard="380bdf7a-9db0-4975-a54b-e26235f294c4",k.ShipwreckShoreB12="ff7acbec-9135-49cc-a0b3-164cace439f4",k.ShipwreckShoreB12Hard="040fa585-5325-4300-bba6-5f11ed10c530",k.ShipwreckShoreB13="ed8a33f1-40a4-4aac-a7f1-0f16d899669d",k.ShipwreckShoreB13Hard="4026f96a-9a34-4453-9500-bb03cbdf757a",k.ShipwreckShoreB2="83d8bcab-b3a8-449f-9b2a-a32468e37aef",k.ShipwreckShoreB2Hard="143e0111-86ba-4f29-b379-db7e537ac6ba",k.ShipwreckShoreB4="d895187a-0c84-44f8-8610-cb2272a3eb26",k.ShipwreckShoreB4Hard="b5dc4108-77b3-4064-9b54-4522930a57ce",k.ShipwreckShoreB5="cb16738c-3625-4955-b81d-054aff8d714e",k.ShipwreckShoreB5Hard="38e6f403-2f6f-45a2-b85a-b82ff3a09a9e",k.ShipwreckShoreB6="f3a5caa9-fc27-4c71-b088-9565b3819b08",k.ShipwreckShoreB6Hard="d970e1fd-6040-4664-be9e-5eabee9efef4",k.ShipwreckShoreB7="23cb5018-7989-4146-a64b-07260540f25a",k.ShipwreckShoreB7Hard="765f65fa-3bf4-4b63-81c0-ecde1c919c79",k.ShipwreckShoreB8="fb605e83-87c3-4e0f-bb1c-9d9674af248c",k.ShipwreckShoreB8Hard="88a2a391-93ff-4184-a122-2a3fd969b264",k.ShipwreckShoreC10="9d92fbce-33a2-47c7-8732-17e966a4e7e4",k.ShipwreckShoreC10Hard="e5107d4e-1bf7-4502-a830-d9c39cd33b35",k.ShipwreckShoreC11="4d9be4ea-4d5d-49d9-8a02-e690e37e301b",k.ShipwreckShoreC11Hard="349d3e9a-3580-4c48-88cf-1b72c04eaad3",k.ShipwreckShoreC12="d880ca04-841f-478e-aacb-b5ae997b5625",k.ShipwreckShoreC12Hard="77102aa1-6dd9-46d4-be44-d1b9b19708e8",k.ShipwreckShoreC6="94b7cd79-e587-444a-bec2-39c09f8787a6",k.ShipwreckShoreC6Hard="12eae675-01ed-477d-badc-25e096aba256",k.ShipwreckShoreC7="c7800785-4aa6-41cf-bdda-89d1ce309216",k.ShipwreckShoreC7Hard="4dc5e1b8-d864-4308-8760-7294e61c7be3",k.ShipwreckShoreC8="a757576c-1c34-48cb-b3a6-b465712eabe7",k.ShipwreckShoreC8Hard="38dfec5a-5e57-4870-ba1c-deb9d0ae955c",k.ShipwreckShoreC9="945d4a06-bcfa-494a-9237-ab4ae11d1d86",k.ShipwreckShoreC9Hard="0c225e23-b3d8-412b-9969-abeed54a9855",k.ShipwreckWalkableScreen="4641aade-2d84-4df9-bd9a-31ab328004fb",k.ShiverchillA10="de3f5fb2-d53f-4e38-ac0e-4a61eaf7e686",k.ShiverchillA10Hard="1c039bad-45b9-4126-9c24-f51ca8d7bb9c",k.ShiverchillA11="ef30a0d1-38d7-4597-b231-5cf195231ed0",k.ShiverchillA11Hard="e86f41e6-fbac-4126-83f7-31ec6b999c1d",k.ShiverchillA2="43994993-a816-4539-b40b-ad6158806d94",k.ShiverchillA2Hard="93ba6dcb-8e51-4031-b962-99196111fbee",k.ShiverchillA3="5611fea1-4579-458d-aa96-0224f4fa78c6",k.ShiverchillA3Hard="0fe0bfa3-4df1-49d8-8b59-d5b9902f820a",k.ShiverchillA4="b01e0250-9797-4482-bd15-3d87d1c5ddfa",k.ShiverchillA4Hard="e56b2904-94da-42a8-a7c6-c8912c7c469d",k.ShiverchillA5="ca9824b2-373a-42a0-9842-2ba45db8bb9a",k.ShiverchillA5Hard="197c21da-ccf0-4f08-abc7-7527bda05b87",k.ShiverchillA6="08365893-0077-4329-b67c-86665d44b155",k.ShiverchillA6Hard="ed93e641-fd09-4111-9a6a-6aa09a2ef55c",k.ShiverchillA7="97855079-10c2-4622-bc83-3cc553ec8dd5",k.ShiverchillA7Hard="e54929bc-b538-48a1-8e9a-5b21677a81fe",k.ShiverchillA9="5b3f2fa1-7315-4295-84f8-463ad3616cfc",k.ShiverchillA9Hard="261f3fb0-c231-4dc8-9ed1-406ef7471eab",k.ShiverchillB1="83e03166-d998-4303-82bd-733f72288ece",k.ShiverchillB10="f17696c9-8384-4a32-8c45-ccb1522dba52",k.ShiverchillB10Hard="dcdf07e4-4dc5-41ab-a241-d481bf87bfc9",k.ShiverchillB1Hard="a5322202-1c60-4cf7-bf0a-c33bd885fab5",k.ShiverchillB2="76e01d03-0271-4ae3-96d6-598c0d32f756",k.ShiverchillB2Hard="2074ba4c-7253-4c53-b15f-9b428f4c26fb",k.ShiverchillB3="d469e9fa-4e16-4692-9415-6f3fc699b66d",k.ShiverchillB3Hard="f132ad5c-54d5-4a77-859e-461f9e329db8",k.ShiverchillB6="4bc577a6-c951-410c-b2c0-a4fb1f247e6a",k.ShiverchillB6Hard="a4975e10-da8c-4836-9d2e-dbd6832faa3b",k.ShiverchillB7="6f8ef663-f5fc-4af5-987b-275ed305962b",k.ShiverchillB7Hard="5dc17fa3-bc41-4333-8dcd-7129f6b43a41",k.ShiverchillB8="dd168142-b794-430f-b92e-909be6b8a7ee",k.ShiverchillB8Hard="637486a7-6a6c-429c-a846-dd1d39265803",k.ShiverchillB9="b38e18f2-cab1-4a5b-be4e-842140fd472a",k.ShiverchillB9Hard="02eab0cb-3a80-40df-aead-e69b41e61bc9",k.ShiverchillFurnace="d7883806-8dc6-44b7-b4b0-94753d4f5555",k.ShiverchillMerchantNPC="ff41d02a-254c-45c6-bf31-e502146d750e",k.ShiverchillMinerNPC="9f78d5f0-99e8-402d-bc71-c10a12177c2e",k.ShiverchillWalkableScreen="ed548110-12bc-49b6-b82c-3de29ae4a199",k.ShopButton="7dbf8994-d05e-43db-a3c3-f71d4f70d175",k.SimpleCountdownTimer="19b7279f-c2d4-411c-9cb3-34d8a97b4855",k.SimplePetCard_NoName="f1ebb75c-00b8-4908-87e7-923434d08769",k.SkywatchA0="16587a3b-5080-48f5-bc49-195b3cdc8cd1",k.SkywatchA0Hard="5b3b2818-65fa-4dca-b4eb-594ad5e3addd",k.SkywatchA1="3b31e13f-a691-456f-8e33-30881bbe87b9",k.SkywatchA1Hard="3bf56ec2-465d-4ba4-9e87-a2bd9e5cdfa0",k.SkywatchB1="d762a8c4-21cb-40e7-ba5f-d79eb2fdbc48",k.SkywatchB1Hard="6c7dc959-4726-409e-a0dd-756b3ff3296d",k.SkywatchB2="eefb46b5-d85b-4716-bbdd-ded12625ca8b",k.SkywatchB2Hard="275cb99f-53a8-44f6-b3d0-905ecf1951de",k.SkywatchB3="495bcd45-3175-4f17-8418-71169c1a9d5f",k.SkywatchB3Hard="4de74f84-038d-4d66-8f8b-eb73d89414f8",k.SkywatchC1="dda0b304-a412-4d67-a8fa-0989f3318cc5",k.SkywatchC1Hard="a284d709-ddc1-4bcc-bab3-af97745721dc",k.SkywatchC2="edd6c271-2582-4099-9499-beedc4873168",k.SkywatchC2Hard="2e212cb1-92d4-4e91-8eec-28223fa521f4",k.SkywatchC3="05d79784-4a06-4d9b-aaeb-6c14ed6bb78f",k.SkywatchC3Hard="31a9fe12-eb1c-4fd1-9e48-e41a4869f45d",k.SkywatchC4="bb263563-81c0-4f7f-868b-cc34cc926329",k.SkywatchC4Hard="3a98ca0a-c947-49e3-859e-0a5361c29a2d",k.SkywatchCloudBoss="915a095c-0fb0-432d-a3a4-aa25b6fae2cd",k.SkywatchCloudMiniboss="a71994c5-fc05-4872-aefd-ead47e04626e",k.SkywatchD1="e7b52256-a265-4a5c-b550-7648f00ad77b",k.SkywatchD1Hard="e294ee7e-4b2d-42b3-9b34-520bfe05120d",k.SkywatchD2="24542690-a364-453c-9679-21199a81dafb",k.SkywatchD2Hard="1dd115d3-c1fb-4b9f-b956-3dea3ca11154",k.SkywatchD3="29ccedcd-9358-4e3b-9576-70b79280bf93",k.SkywatchD3Hard="033e3fd5-3fce-4986-ad1c-7bb5669d3a56",k.SkywatchE1="8c774fd3-202a-4736-b7aa-ae8e4867671a",k.SkywatchE1Hard="b4c3d186-dd2e-4345-9952-a55ab55684e9",k.SkywatchE2="b072e1c2-7b43-4e29-b51f-4ec0fdc1ff33",k.SkywatchE2Hard="c5347af2-1a7d-4d7b-b803-189f35ae069f",k.SkywatchE3="d9b98e4f-8d70-43b0-b358-89e3a18859e4",k.SkywatchE3Hard="e36914a5-05d8-434a-983d-d0df13ae587d",k.SkywatchE4="7d62be40-1c60-4703-bc56-b8768070012f",k.SkywatchE4Hard="a372d76a-9959-47bf-8eb5-49f29f101316",k.SkywatchE5="6c7eb89d-4055-4dde-b8de-35566e9faad8",k.SkywatchE5Hard="a594f9df-b1b2-4655-8907-a6d89101d305",k.SkywatchElevatorDoors="1dd04539-f5fd-4745-9c96-b433ca099fc7",k.SkywatchHardQ2_1Cutscene="282a981f-4572-4c53-950a-fa125dea48c5",k.SkywatchHardQ2_2ThiefChaseMiniScene="9a71a58e-f7be-43f5-a33b-11f665570678",k.SkywatchHardQ2_3ThiefChaseMiniScene="73b6ccc9-4f3a-4f6a-8591-fa8d98f899ee",k.SkywatchHardQ2_4ThiefChaseFinalScene="4756bf96-de9e-488f-871b-e5dfc05c2222",k.SkywatchMerchantNPC="6908883b-c608-4f11-b59e-fcd7c1489cd8",k.SkywatchQ11Battle="b5008efe-ad58-4650-a506-a020adf6da44",k.SkywatchQ11HardBattle="5c0bc813-3353-4a23-bb19-c1bdc77e7b47",k.SkywatchQ13Battle="579d4f5e-bba1-4ea3-ad1b-f8ba95027e43",k.SkywatchQ13BattleHard="96db842e-69e2-437e-be3d-f260b400bef9",k.SkywatchQ2_1Cutscene="3b1a23f1-b7a1-4182-8cd8-62a858d68462",k.SkywatchQ2_2ThiefChaseMiniScene="e468f825-b91d-43d0-8111-e5deb6b299da",k.SkywatchQ2_3ThiefChaseMiniScene="731bbe35-f5aa-4e1c-a18a-955a1982725f",k.SkywatchQ2_4ThiefChaseFinalScene="477c3a7c-329c-4705-bbea-c4be4879fe4b",k.SkywatchQ4CloudVinesCutscene="35ae4d34-344e-434a-a7e9-344e9d28c28a",k.SkywatchRightVerticalTrolley="f0df1742-1a1a-4a4c-9437-5385e3cac173",k.SkywatchTrolley="a805e489-8e4e-4b60-beac-f434bd915218",k.SkywatchWalkableScreen="3c90207b-f8dd-4111-8b5b-a20b707fea69",k.SlurpyNPC="e1610a1d-e9fb-40d7-8cc7-b81c8da73b71",k.SmallWarningMessage="34767edb-4b03-48c6-b2eb-c150132d4b97",k.SmokeCloud="6658ac4f-8942-4f2a-9694-49a5942f0e9a",k.SmokeCloudLarge="e1a4a3dc-4a83-4db1-8120-a8f1e4e0a71d",k.Snowball="e604ea87-d9c3-4fd2-b572-bdbaf660949a",k.SocialMenuHeader="03984d40-a468-4930-91eb-0efb9e5aee0b",k.SocialMenuHeaderButton="bac9c286-b493-4349-8d45-3173bbaaca1f",k.SpawnPoint="8f92d9e7-968b-457a-9320-8cf51e79fa91",k.SpawnableTooltip_RectTransform="7837ebb1-1256-4a35-a32c-60eaf9e2f922",k.SpeechBubble="22c5392d-7342-40aa-a40e-2ed4d599fc20",k.SpellContainer="e939ac35-f063-4f97-817e-dd66b4c8a77d",k.SpellLearnedPopupMessage="e5a682ca-0da2-42ef-aa46-2a55bf1ac9c2",k.SpellStatusEffectInfo="7456a914-b457-47e2-9bfd-4c600a1930d6",k.SpellsWidget="46c8ba4d-8e40-4bfa-a999-6da0d33b52b2",k.SpineFollow="1e5c1c74-9b7e-4484-b118-d4023d624ac2",k.SpinePet="606e07d8-e4dc-46fe-bd18-20fd59e29dc1",k.SpinePetFollow="e776d8a6-115a-46fa-b2e8-00ce0241d654",k.SpinePetLegacyTransform="9c4a6d1e-1b25-4ca4-abd3-f46ee924b73b",k.SpinePet_Injectable="47a739a0-8d7c-42c2-82ad-668e0eea3859",k.SpinePreviewTool="68be7fa5-cfc5-4ef0-90b4-465c05372e56",k.SpringfestGrottoA3="197985bd-2674-4212-9bd3-ee7407b68361",k.SpringfestGrottoA9="facc9d95-e9a3-4e49-893c-62da7a86c276",k.SpringfestGrottoB2="c1afea61-4cf8-42e6-aaf4-e0d981f55c39",k.SpringfestGrottoB7="a67c9db6-9a03-4d79-b3f7-7991062e47a7",k.SpringfestGrottoBunnyA3="088eb1b1-397f-42f0-b239-a080e705c16c",k.SpringfestGrottoBunnyA9="7e523cd6-11fa-4012-a9d7-45c5443fed02",k.SpringfestGrottoBunnyB2="dcd360c4-a2cb-4879-9bda-8c33bcafe872",k.SpringfestGrottoBunnyB7="2e062f05-002f-41a0-b5b5-b51d17360672",k.SpringfestGrottoFoxA3="a28c1c45-68ec-47f6-b326-f96db7ae2120",k.SpringfestGrottoFoxA9="82f39295-e545-4766-837f-247872975ba7",k.SpringfestGrottoFoxB2="08054625-9e7b-4ceb-a136-5dc3eecc7e07",k.SpringfestGrottoFoxB7="242a5c11-18ee-4eae-8fd7-16ad0a1fd235",k.SpringfestGrottoWalkableScreen="0b772c3c-74c8-4edb-bfde-d7d187f3433c",k.SpringfestIntroCutscene="157cc96e-b77d-448c-baba-b264dd6975f8",k.SpritesheetPet="770d667d-f843-4269-95d6-3e1496233792",k.SpritesheetPetFollow="4c780a71-5340-4cd3-84f0-a188391b8edb",k.SqueakNPC="09d7d532-10e2-4a31-9cd3-c39eb15c0c16",k.StandardButton="aa0ffd57-fbf1-4e26-91e4-f9b96d5fe423",k.StandardModal="5078ccbf-50aa-427a-b422-e8ab36bb856f",k.StandardSlider="6bd05200-026c-477a-a035-b53226a01f02",k.StandardTooltip="63943ada-7e4e-4cb6-bdf9-a03e91640e53",k.StarfallController="fabb48fe-e49a-4b9d-b2bc-75b19e0dffb9",k.Starfall_1="0dae27c9-dad6-49b1-b2ee-e9d07f2c783b",k.Starfall_2="2f9bc898-fca8-4ee1-bfff-40b54f5074ca",k.Starfall_3="f520a2c6-7573-4b1d-a505-dfa780140ca6",k.Starfall_4="0beea666-5165-47be-8838-63a69bdeeffe",k.Starfall_5="86dee1da-62d3-46c6-8a80-4932b9cd5bd2",k.Starlight2025Q1_0Cutscene="a0840788-b2ca-4347-9728-e283799d863a",k.Starlight2025Q1_1Cutscene="4f9a673a-93ef-44c6-8d1b-31b54ae37263",k.Starlight2025Q1_2Cutscene="223b7588-d3c2-4323-9a45-48fbaa7a5444",k.Starlight2025Q2_0Cutscene="56177f06-8d9f-471b-8f6f-1dd0d9d89f49",k.Starlight2025Q3_0Cutscene="7f39bcb5-1b85-4fd4-87fe-d5c6c9bd096b",k.Starlight2025Q4_0Cutscene="aed1c394-2607-442a-9fbb-9bee0333018b",k.Starlight2025Q5_0Cutscene="0a83f887-958c-4842-a34b-e9afed0c2e12",k.Starlight2025Q6_0Cutscene="eebffa5e-cf09-481c-a765-e4ec2d7d2a3a",k.Starlight2025Q7_0Cutscene="69a18efc-e127-4714-908b-fb691cf939bf",k.Starlight2025Q7_1Cutscene="5b6b760c-047c-447a-ba91-d8db45788f18",k.StarlightBossNPC="12936db9-36e9-4f0d-8738-89a64c17ddd2",k.StarlightFestivalAd="070c7f92-2031-4aaa-b70b-a941bb3e1ca1",k.StarterPetSelection="32fde58c-43c1-4c3b-af23-241e56f79332",k.StarterPetSelection_ToggleButton="2c99fe08-f647-4ab5-9c09-bcae47da8803",k.StatIconDisplay="277aa6d1-33ba-4457-97b8-1d4db09a4eaf",k.StatPopupMessage="20d6614f-f2a4-4953-96fe-d2cdf803d11c",k.StateChallengeGoalsCard="fed54a8b-5149-41fd-bab8-fa6dba2fd5e0",k.StateChallengeGoalsMenu="b59bac96-9209-4ef9-9587-2b33fc3a82ed",k.StateChallengeGoalsWidget="279d8520-b7cd-4874-83f0-a80a332bb6f3",k.StateChallengeMilestoneRewardCollect="64ac441c-a303-49d1-b53d-d30521b78401",k.StateChallengeMilestoneRewardReady="f0384a5d-62c7-48b5-859a-3e3ed94b117e",k.StateChallengesBG="502e95a9-218f-45ca-93fe-550ba3955102",k.StateChallengesConfetti="d36796fd-26e5-4e62-9eb8-ee02c9bb9940",k.StateChallengesDistantPetPortrait="ddc21f17-1cc1-43a6-b3df-2e72487e2df6",k.StateChallengesDownTimeState="abd6041b-d7cb-49a3-83ae-793bc9bd9a35",k.StateChallengesFootracePet="a854ce49-1184-4ea6-9d62-b53fb803808a",k.StateChallengesFootracerInfoPanel="be46a94d-b232-4d6d-ba83-66158b8584ff",k.StateChallengesHUDButton="edfa3064-ae8f-40dd-99e6-b9242995c29d",k.StateChallengesIntroAnimationState="9fc64e3c-7dde-49c3-bd0a-8ee5ed2fbdc8",k.StateChallengesMenu="3b686c7e-aee8-4f6d-a263-f432d0dcd67c",k.StateChallengesNoClassState="eefa96f0-9165-4d51-831f-199b3f278b47",k.StateChallengesNoDataState="20514db1-57bc-4a38-9a83-37b5629b50a4",k.StateChallengesPetSpawner="7b251546-9136-47a6-857d-9c8f57234db0",k.StateChallengesPointsBanner="86027c14-eb0d-4fa8-8f2f-5d1ad34f6917",k.StateChallengesPostChallengeView="2574f4e7-61bc-49ab-9517-d73a9e517949",k.StateChallengesRectangleGlow="fdc5a594-2100-4c66-9ff7-ddfd9f211a65",k.StaticAd="02fdb444-8d07-4d29-a6e0-d838bd055fd2",k.StaticAdCarousel="8b7f72a0-943f-4951-a48a-5de7bd90e771",k.StaticAd_BuyMemberItem="8bdb5229-1ce5-4792-9c95-7548c915ffb9",k.StaticAd_EvolvePets="cd7aebb2-b11c-4d0a-b42b-6375df078236",k.StaticAd_LevelUpFaster="84d242fd-9351-49af-b7bc-80c63b642562",k.StaticAd_MemberBoxes="6caba0df-9b6b-492c-afeb-b99819731377",k.StaticAd_MemberChests="21b3713a-c1fc-400e-93fd-5549bff7bbbc",k.StaticAd_SoMuchMore="77d7d87e-aee7-4586-88fb-b32c02aba256",k.StaticUltimatesTamingMeter="006002b6-7b3c-4d69-8532-7f14bdcb4b00",k.StatusEffect="21dd5d53-3b65-493c-a799-f191603d7059",k.StatusEffectIndicator="4ab50008-6778-4344-b149-7723ceceb989",k.StatusEffectIndicatorList="636f07b4-46e6-44ec-9943-ba94a4b2aeae",k.StatusEffectsList="a9704f83-5cff-4843-85f9-81d354c1cc40",k.StatusEffectsTutorialBattleScene="1f920125-5af1-4ca9-b3ea-88f498ade36f",k.Status_effect_DOT_astral="8e8e53b1-2649-4027-8097-c508982850e4",k.Status_effect_DOT_fire="223f7e41-f2c3-477a-84c3-d04112f000f6",k.Status_effect_DOT_ice="20a3833c-06c5-4946-b89d-c72f32835167",k.Status_effect_DOT_plant="779eab2f-db94-4f90-a647-b08f3dfadc86",k.Status_effect_DOT_shadow="b7398e69-540d-4fa6-adc3-10d0e45d91e0",k.Status_effect_DOT_storm="2bc80471-42a7-41fc-b517-8f2883f3ed15",k.Status_effect_DOT_water="04b975eb-45ee-4c18-ae53-f3bb04972494",k.Status_effect_bomb_astral="ac9e7d5e-6376-42d9-b6d1-3a9c8ff50edd",k.Status_effect_bomb_fire="a1dec98c-7e25-4bb4-98d3-78c49426b4b1",k.Status_effect_bomb_ice="f2d1bf00-621c-40af-99c4-87c5008ffdb1",k.Status_effect_bomb_plant="f5cfb330-ac30-4d56-8f61-b97a866e83c3",k.Status_effect_bomb_shadow="636c11c7-4d20-4e5c-913c-156c45c7fc32",k.Status_effect_bomb_storm="87f25050-7d50-4f5f-996a-6f1ea3bc3db3",k.Status_effect_bomb_water="3a9f950c-9f0c-4e19-9273-4d87a5fb9230",k.Status_effect_buff_defense_up="8ca4b1fa-8ad8-4df0-84c0-4de0ad7252e0",k.Status_effect_buff_dodge_up="042c237a-71be-4d08-b130-2adfcc6fe383",k.Status_effect_buff_power_up="98ee9f42-f99e-42dd-9491-de0829cadef5",k.Status_effect_buff_regen="851ba533-4c69-4708-8a07-b8c312f2955e",k.Status_effect_debuff_defense_down="182d1985-c358-4029-87a1-9cbdcbfbc9fa",k.Status_effect_debuff_dodge_down="90d885bb-a055-47ce-975d-107201598679",k.Status_effect_debuff_power_down="ff87e639-f7f3-4db2-9579-b77e64c265d5",k.Status_effect_gift_astral="d60bb89f-3b0f-422e-aa9a-e1a2bfc19198",k.Status_effect_gift_fire="3e49df13-cddb-4e04-8b69-cd17f48dca47",k.Status_effect_gift_ice="47f98aa6-a841-480e-bb91-5114478163f3",k.Status_effect_gift_plant="5f48bd6c-8a9e-481c-a1b4-e41770b402a1",k.Status_effect_gift_shadow="f72d08fb-2c73-4c46-a9e0-c82c298495e6",k.Status_effect_gift_storm="b1258367-7ef9-4067-b356-02f5ffab21f2",k.Status_effect_gift_water="69104062-2a1c-4dc7-841e-16b7d998b644",k.StayLeaveModalDialog="b22652bb-f0ef-4d81-be04-655b16e3a779",k.Store="cb8a15b2-266f-4c7f-8d76-4df2e6128ea3",k.StoreBundlePopup="97eda0df-98d7-4ae7-8c3f-670cd574f99e",k.StoreCurrencyDisplay="7af16fc7-f946-4cd4-ab28-757ed79fb395",k.StoreGearStatsDisplay="9c354d8c-dc92-4ee4-a828-deaf35990e4c",k.StoreItemCard="3c5fc766-a784-48e9-b076-d45a0cfd1b1c",k.StoreItemCardSimple="352d96fd-87a0-42c6-86ba-f5f5f2fbd199",k.StoreItemCardSmall="af395fc1-e3bb-4378-9f34-2132b16d5bd3",k.StoreRightPanel="1a6c4a6b-6b28-4bd7-87c9-d6b85bd5214e",k.StoreTooltipAuto="4a389156-2c69-4e74-8790-d55d464823f3",k.StoreTooltipManual="36e72540-094c-4907-8f7f-e80dd07cc418",k.SubspaceMythicNotification="b75dac05-c121-4cc7-b533-b5ddfd760082",k.SubtitleTitleHeader="69c4ab16-bd61-4b1c-a899-9591324cb922",k.Sunworks="1b97aa7d-c4e9-42f0-a6c6-8ce5fe375c47",k.SupportDialogBody="f098c29c-b502-49e6-a6ff-be7b70e95fb2",k.SupportDialogFooter="4188e5ff-c5e3-48ab-8ed6-6447c2ac7665",k.SurveyAnswerPrefab="65d81152-57d7-4976-a35d-866f93ae5815",k.SurveyOpenEndedAnswerPrefab="16b34b84-6ca3-4641-9353-aac17071c28a",k.SurveyPrefab="a82ab69c-02a3-40c8-a834-8385a80aebf1",k.TeamCardBase="15f5edb9-3e96-47f2-b39e-e96556fb34b8",k.TeleportTrigger="a1c5e4d2-ffbf-4365-a065-63c7d4d726a7",k.TestPromptContent="2f779a06-c607-4250-8039-d43a0dd341d0",k.TextPopupMessage="444587d6-5a80-4fcb-8e87-b3fac29eac8a",k.ThreeStateCloseButton="51050525-d8bb-4fcc-8db6-6a5bfa19a9e6",k.TidusAdVideo="70c0a518-8be9-4213-880a-9e969145fbb8",k.TimeRemainingFooter="4172afd5-e2cc-496c-b915-8d4c0523e91f",k.TintableBanner="924ac7e2-049c-4c98-8d9d-d59683000f3e",k.TitanDeadPopup="940aa9a9-d8ba-40fe-8460-c2fd906a0187",k.TitanTeleportAd="2326a266-af06-471d-91ac-2922aa209e6e",k.ToasterNotification="490551b5-11af-485c-9a2f-4a6dc2d5a99a",k.ToggleImageButton="1a6b96e1-7505-4786-935e-cc99b5903dfa",k.ToolTip="02ad1891-5703-477d-9de8-14148e9aff74",k.TooltipSpeech="04b2dca3-c52e-4fef-afd3-171d8e1ee624",k.Tooltip_RectTransform="fc775cb1-3fc9-4ca9-a6c4-44e09fb241bd",k.Tooltip_test="93e56ab0-c16d-42f8-bc17-85d396dd476d",k.TopHeavyBody="50d655d4-5e85-46c8-8e46-c33a449ca975",k.TopHeavyHeader="23cb292f-e6e2-4f3c-88a5-fcaf8bdf179c",k.TowerTownHUD="f0279fc2-fd10-44ee-b6d9-15c1635f42bb",k.TowerTownInProgressPrefab="14227a70-675e-4dda-90ec-13013d75df46",k.TowerTownMallInterface="632ea709-d268-4aa0-8792-4c0957c1829c",k.TowerTownMallScrollBar="905106d0-0376-4006-8dbf-5852c553ee6a",k.TowerTownMallShopComponent="91e08ac0-7aa4-4a2b-853d-b1850d86c32e",k.TowerTownShopScrollView="ac3e6cab-d35e-4a46-bcc7-f3603b0186a8",k.TowerTownUpdate="57697f5a-34d8-4d25-85e3-0770f71f4b3e",k.TowerTownUpdateCard="4ef72dff-a973-467c-8f7d-35883c5ec2a5",k.TowerTownUpdateInterface="72fcf275-814c-406d-a7fd-a38cd3abaf51",k.TransformRelayFanfare="7a9d0bf7-8454-4ec2-a98c-0d2bddf7f7d7",k.TransformRelayObject="44cb5816-7653-4c8b-941f-27905efa541b",k.TransformRelayTitanFanfare="864476a6-ef2d-4318-907e-993311b4c168",k.TrimVinesSequence="feb8924b-1c5e-4960-bcde-954a258d8b4d",k.TriptropTrioEncounter="ea914f41-e452-4812-b208-365bf7a91a74",k.TutorialTag="e691781a-5ef1-43fc-b1c4-1113ea9ad0da",k.UIDemo="93a43c09-d04c-4e4c-9830-a3bb1dc55f95",k.UltimatePet="a83cc8be-012b-4407-90b7-50c4f8d16238",k.UltimateProgressCard="9c4f6c89-7f71-445e-8471-2a3ea3c9629c",k.UltimateTaskUI="aba58103-a05e-47e6-90fb-8dcf6f46756b",k.UltimateTrail="ca953f32-108c-4330-b4f7-7cf333d21598",k.UltimatesBannerSpotlight="48d461aa-0e71-4813-ad2f-b7d30db15917",k.UltimatesBattleHealthBar="07a17daa-a30a-41e8-8a5c-341c2141910d",k.UltimatesCarouselCard="df5e003e-f26c-43f1-be0c-b060f1aed96d",k.UltimatesInventoryCard="5c30e061-478b-4eb3-aa29-cb10ee3c1ffa",k.UltimatesItemTradeCard="b1c32946-40e5-4300-a9e1-ffebeca08c8d",k.UltimatesItemTradePopup="e60eb95d-edd6-4059-aa5f-277638962bf4",k.UltimatesMembershipUpsellScroll="53040e67-7fd4-4c57-8487-4b481b136848",k.UltimatesMembershipUpsellScrollV2="647c6e04-2b47-4df0-a8be-603687f877c3",k.UltimatesPanelDailyLoginCalendar="02d79aa8-3244-49a5-ada4-c23804dde900",k.UltimatesPlinth="daa42dbd-2f77-4659-be6f-0f5c6422a99f",k.UltimatesTaskTooltip="47738785-da61-4792-91cc-0995fc41df51",k.UltimatesTrialPostBattlePopup="94ea5ff7-4ff7-485c-b768-b460294fea5e",k.UltimatesWanderingNPC="0ca8c9f6-2491-4de5-9bbd-5bd7f11c4279",k.UltimatesWanderingNPCBeginTrackingPopup="ec57fae7-32d4-47e6-8d8d-7e29facca662",k.UltraMembershipWidget="77061205-702f-4eef-950f-205d8b15a966",k.UnifiedConversionFlow_BuyMagicoinOTP="f6c1dffc-cec7-4bb4-a267-a0d815f12e95",k.UnifiedConversionFlow_CoreMemberPanel="ff7fa13b-f43d-482e-9876-2f17541cb83e",k.UnifiedConversionFlow_DualOTPModal="0954745b-5504-4d43-b041-6fbad05e0763",k.UnifiedConversionFlow_MobilePlusMemberPanel="96f1d68b-1a84-4a6f-a7f3-43db078a1d97",k.UnifiedConversionFlow_PlusMemberPanel="dc84a0b6-55af-4421-a87f-49f8c35f5fec",k.UnifiedConversionFlow_TitleInputOverlay="aebddb9b-eeb1-45ea-b3a7-ab72a5b81b51",k.UnifiedConversionFlow_UltraMemberPanel="0542066c-eca1-4fce-ac39-95e9a77ad07d",k.UnifiedStoreBase="ebce620f-d5bf-4f9c-9278-9d046d6e97b0",k.UnifiedStoreButton="9d6c4831-210e-437d-983a-238745caf22b",k.UniversalTeamSelectionMenu="daa62438-f0da-4a82-b406-bd793daebe98",k.UniversalTeamSelectionPetDrawer="dc61077c-1a1b-4c64-9884-fc4629dd5d2a",k.UniversalTeamSelectionPetSlot="10c3c58e-af8c-43f8-a820-aba39c7740f0",k.VernaNPC="69c547be-405d-46e8-b3a1-b9c0119573f6",k.VerticalFixableMinecartTracks="2dc4e86e-6667-4d39-9938-48539933a198",k.VerticalMinecartTracks="48c32834-70fd-494c-bd4b-5d685c06eee1",k.VictoryBanner="3fddc715-d281-4116-81cf-cf14f768be0b",k.VideoPopupDialog="2f9ad04e-f86f-434e-beb3-482c05a3e99e",k.VisibleAffixIcon="76a0733d-731c-4e14-8790-d8c5c94f10d1",k.WalkableScreen="17aa475e-c95e-4bd9-a7b2-83cecf793707",k.WanderingNPCTrail="0b472392-029d-4f18-b03a-30585867d61c",k.WarningToaster="373deb18-fae0-43b0-a1c7-825c9d239a3e",k.WaterBalloon="6c13c725-e537-4bb4-8692-f60ed2d0a86a",k.WaterBalloonInstructionPanel="8527f4be-1522-4ceb-8161-c45c61d9b553",k.WaterTornado="e340c70c-951d-4b8d-93e4-e41222f0a2af",k.WeaktoDisplay="08a53290-d9bc-4699-9d89-5db29bcb11d1",k.WeeklyChallengeDialog="9b5ae8cd-bfba-40e0-bbc7-32784e6165e6",k.WeeklyChallengeMain="54affc1b-d1b7-42b3-a6ad-cd14f5bccce5",k.WeeklyChallengeRewardDialog="15e898ca-b84f-4012-bb0b-686247d7c475",k.WeeklyChallengeUI="7cb490b2-199c-4b0e-a699-fdd6dd60bdd8",k.Whirlpool="843e4693-4171-46a7-81b4-6dae59041d6b",k.WhiteLargeButtonTextAndIconLeft_RectTransform="c63d2ffd-78e9-4e0b-af32-9cb9729ee579",k.WhiteMediumButtonTextAndIconLeft_RectTransform="5d2d8057-1d1a-4fdb-86db-163c94d7d7cd",k.WhiteSmallButtonTextAndIconLeft_RectTransform="8d7d1956-7cae-43f6-ae50-5e6c864b27c5",k.WhiteSmallButtonTextAndIconRight_RectTransform="4e95401f-26d8-4579-95aa-92c2e0848e17",k.WhiteSmallButtonText_RectTransform="298d257a-cfc4-410f-b88f-7490a5919f60",k.WidgetIconUI="edb51970-e30c-4ce7-b7b6-24188eaffeea",k.WidgetOpenAnimation="0469f57b-a9c8-41c1-89e2-cfdd83c23fbf",k.WinstonVonLoot="db7991d2-4bb6-4849-a9d2-43f3df2a45fb",k.Winterfest2025FinaleCutscene0="b46f3c34-89d9-459f-9557-e66019f1b4e4",k.Winterfest2025FinaleCutscene1="e20857fb-946a-4dcb-8530-e4d2f7749305",k.Winterfest2025FinaleCutscene2="bd894056-1ecb-4b45-aa76-546a589c42b0",k.Winterfest2025FinaleCutscene3="c1945747-7949-4b08-8d13-30df2adeba56",k.Winterfest2025IntroCutscene="3a609017-9205-4abd-a335-0997ccd1ee81",k.WinterfestBossStatue="a216443b-ec2e-421c-9ecd-99a4eb544347",k.WizardBankChest="e77bbd3d-9deb-4169-a9bd-026e9dac9bed",k.WizardBankChestGold="fdb971ef-554f-4a7e-aac3-ce2ce7b419a7",k.WizardBankChestGroup="83f5af0d-b128-4276-8046-db73d903502d",k.WizardBankChestUltra="cc6b8750-b4f2-4476-b6a6-9455f0d3b126",k.WizardBankCollectPanel="3bac15b8-458c-412a-884e-98ad46a9fb60",k.WizardBankGoldWidget="20278935-3754-4a14-9429-dc69265d9ab9",k.WizardBankMenuModal="0b5fe5e3-61e3-444d-b3a2-50b9483ec2b0",k.WizardBankNonMember="22504267-a9f6-42c6-93f7-0d6c2439126e",k.WizardBankPlusChest="f44f2c7f-d0d9-4bc7-85ca-2da863961552",k.WizardCostumesFTUEOverlay="80656be6-a50f-464c-8ba2-8c997f40b35a",k.WizardCostumesFTUEPopup="ec9c8b88-10fd-467f-85b5-160e9c1a1c25",k.WizardCostumesHUDButton="38e1d8f8-23bf-41e4-aed7-cd4213ea80e6",k.WizardCostumesMenu="64f054d9-0094-456f-b49a-984c2cf2e37f",k.WizardCostumesVideoMenu="47b876bc-47f3-439a-a1ef-f127e7492503",k.WizardHeadAppearance="012158f8-2e88-4289-bc27-8ca0af20ae33",k.WizardInjectionConfigured="eb60a57f-2423-43eb-bac4-69dbedab5321",k.WizardNameObject="3123994a-1477-447c-8c63-6015ab50065d",k.WizardNameSelector="847f69fd-cca6-40af-878c-84aba7177752",k.WoodPanelHeader="93c13bf1-df26-4488-8644-a3b885b302a2",k.WorkerSlimeSoupNPC="c65aaec6-bed6-4347-bdd6-e3272de54299",k.WorkerSlimeTurnipNPC="1fcb98dd-0702-4584-88e0-681670370acb",k.WorldInfoCard="f78090fc-5f1e-48dc-8215-2825d4eec7fb",k.WorldInfoSection="81ac35d7-d7c5-45a8-b30c-3e0ed97297ff",k.WorldMap="711f7aaf-c73a-45dc-a38c-8fce87d3a4ee",k.WorldMapZoneUnlock="7622b78f-367c-467d-83fa-75330170f86e",k.XPBar="d9f264ef-2959-48a8-be07-848d7a990658",k.YourPetHeader="98ae374b-5bd7-45fe-9eb9-c51be9a491f4",k.YourPetMenuPetGearSlots="46778c6e-027c-4370-bc6f-5dc785fb8eec",k.ZoneChest_Transform="83b3474a-3cc3-4e7d-93f0-ade9859c7a3d",k.ZoneComingSoonPopup="0a113b81-d025-403b-8e6c-9646b7e650af",k.ZoneEntryIllustrationBase="29025f58-628d-4969-9c67-a0146cc23c16",k.ZoneEntryIllustrationBonfire="6a89aaf0-22f5-42b6-ad2a-d92660362748",k.ZoneEntryIllustrationFirefly="4a92d202-5703-4cd0-87a0-554589feda20",k.ZoneEntryIllustrationShipwreck="17ca166d-1803-43ba-a623-6aaacf767424",k.ZoneEntryIllustrationShiverchill="b3da778c-9f60-4db0-b44c-9d72d8a0f967",k.ZoneEntryIllustrationSkywatch="d2b46236-1e6c-43fa-98c9-1125a89abf14",k.ZoneGoalsInfoPanel="19014058-f949-495a-a843-c7fc972200b3",k.ZoneGoalsMain="c4e33399-223e-4156-a111-546a61f7f47a",k.ZoneLockedPopup="47d77023-9571-4329-8368-94dfca784941",k.ZoneLockedSequence="00cbf719-4d52-4b0d-8dd7-9428e1236db1",k.ZoneUnlockedPopup="a6f78822-378f-4773-a838-e4071d10c238",k._spell="d9eb45f1-20b8-446d-a36b-afcd8ce9c6bd"}(F||(F={}))},51742:(k,B,U)=>{"use strict";var F;U.d(B,{c:()=>F}),function(k){k.Sfx_academy_portal_close="138f0ebf-d540-48e6-9701-839743659a86",k.Sfx_academy_portal_open="c8c9213d-694c-4d30-a62e-c7b00b9bd69c",k.Sfx_academy_rumble="567f8f43-caee-4adb-9a67-f1bb054e6a7d",k.Sfx_adding_pet_to_team="d726df53-9001-4603-a518-c052eea1212e",k.Sfx_ancient_blast="be9b0f3a-b7e0-4dee-a9bd-1283055cb8fb",k.Sfx_ancient_bush_rustle="855a7223-8333-4553-b83c-934a387ce140",k.Sfx_ancient_bush_spring="72e9d19a-025f-4fcf-ab17-27f780b9c95d",k.Sfx_ancient_crystal="86ecbe47-70d9-44c1-bb7e-0a4f8a18528a",k.Sfx_ancient_exit="c1b6774c-bf14-4298-85b1-1ea60ccc694c",k.Sfx_ancient_forge_crystal_drop="d296b828-e1ad-41fc-abdd-bca50112a2f7",k.Sfx_ancient_leaf_pile="8cb41b2a-2094-48b0-af0d-cf456a498297",k.Sfx_ancient_lightning="cba9da50-eb22-45d4-9cfc-e7f314be065f",k.Sfx_ancient_loadout_action="1a6c571b-24d8-4a3f-aaba-a3d3a31409e6",k.Sfx_ancient_magical_plant="39bdef53-f0a4-4c45-935a-3ddd5b489643",k.Sfx_ancient_portal="fd70679f-9ac9-4dc5-9414-2dbc4e7d2952",k.Sfx_ancient_portal_short="b2956662-4789-489b-ad72-168b6c8d2754",k.Sfx_ancient_powerup="355a51a9-a097-45c2-aded-3977d372671d",k.Sfx_ancient_relic_forge="e86ef6d4-eb4c-49fd-bcfe-64e1df1e0542",k.Sfx_ancient_rocks="41e58ca4-caec-4ea8-a213-b3d03b5d6de2",k.Sfx_ancient_seal_destroy="d7233d2d-7149-4796-b7af-a54e09bc78ad",k.Sfx_ancient_seal_overload="74dcc0df-2605-45c7-b81a-9787461129b1",k.Sfx_ancient_teleport="ae53c99d-378c-4e81-a2fb-113751e8e816",k.Sfx_ancient_teleport_appear="41dffc4b-b10a-4d7d-a644-23a5d684880f",k.Sfx_ancient_teleport_hum="7dacface-ffb6-4d9a-9d95-401a804e3e9d",k.Sfx_ancient_torch="25a1f18d-0474-4868-bc92-ab26e681d5a3",k.Sfx_ancient_transform="ccff86d9-504a-46d7-af5e-024d5765fdda",k.Sfx_ancient_twinkle="e910bcd8-7fb6-410f-8fbe-a01cbf559929",k.Sfx_arena_battle_begin="3f844b1e-0009-4c77-b1bc-478b5da5739b",k.Sfx_arena_battle_fire="1c68c41f-0a5c-4512-be65-b8e9300dbd5b",k.Sfx_arena_changing_battle_screens="caf097c4-67fb-478a-ae77-5e3f7e90e5fc",k.Sfx_arena_division_chests="b04b79e1-4663-444f-8b16-f35972308b67",k.Sfx_arena_equipping_runes="e37b676f-cefd-4387-ba89-a0c3a770a1bb",k.Sfx_arena_gain_trophy_points="0a347906-be58-4fe2-bbff-580c95611a24",k.Sfx_arena_gate_close="0a57f293-6f24-49b1-8bf4-dadab1a7902d",k.Sfx_arena_gate_open="2d9cd04f-a5d7-4966-a014-03615577ffe5",k.Sfx_arena_going_up_leader_boards="21ea1e7e-7779-4a16-949c-1bdbb2e4dc82",k.Sfx_arena_level_20_milestone="fdaeec2e-8b92-40ad-a84c-93e2e483f41e",k.Sfx_arena_loading_between_battles="6bcb88f7-2b72-4171-827c-a6f9beed12ff",k.Sfx_arena_locked_chest="2819da5e-8ebb-4b4a-ae83-feef207bb186",k.Sfx_arena_losing_trophy_points="f00d727a-ccbb-4121-9f73-268d4401ee36",k.Sfx_arena_member_chests="5de57442-dd46-48d4-9255-35f61dced8c1",k.Sfx_arena_open_and_close_rune_boards="0848777b-7c66-4d4d-a38e-9e33fdad4109",k.Sfx_arena_rank_up_different_tier="c5c02250-6e6e-4e52-b6f0-2a4d23507602",k.Sfx_arena_rank_up_same_tier="d8d27255-2c7d-4e69-8d21-e5d773094eae",k.Sfx_arena_season_begins="42589ee8-e6d7-4b3d-baf1-01481a6eadcb",k.Sfx_arena_season_ends="ddc03e6c-8cbb-4ad8-a583-6930f1d1b647",k.Sfx_arena_season_rewards="905a3bac-d9f8-4081-ac17-32cacb88c044",k.Sfx_arena_selecting_a_challenger="59182f1e-714f-4d1b-890a-f94a76f0c9fd",k.Sfx_arena_viewing_your_season_progress="2f439ea3-dd47-4d7c-a861-163ff0672c04",k.Sfx_arena_you_lost="723c4ba1-6c47-46e3-830f-e0889cd91ac7",k.Sfx_arena_you_won="319bc4e2-105f-4986-b84a-45b75968cc47",k.Sfx_arena_you_won_banner="1cb1513a-0626-49ac-85bb-4a9a3a22240a",k.Sfx_attack_forest_fury="46fd92ee-efd9-422f-80dc-d24ebbd9ece7",k.Sfx_attack_frigid_blast="66645c27-ea00-4705-b610-f4934965a4ad",k.Sfx_attack_hot_snow="7d5a0bd5-34ed-415b-8cf2-4350fc41cef2",k.Sfx_attack_royal_roar="607ae283-7ac1-4b5d-bbdf-0f4b2536077d",k.Sfx_attack_storm_wrath="88c8f045-6a28-48c9-9f1a-03f3158564a1",k.Sfx_attack_tidal_twister="5ef568c3-2271-432c-b43f-9b3ac304f314",k.Sfx_bar_fill="e18d2ce3-f058-45a1-9a49-899714181e00",k.Sfx_battle="03af8793-f0d2-4df6-b7d9-3d981cb30c1a",k.Sfx_bonfire_spire_q5="41689399-dde7-4145-bb6b-de399e77c0f3",k.Sfx_bonfire_spire_q6_and_q14="dce641f5-8c4f-463d-952e-ed88b2495325",k.Sfx_book_close="b7ab7e4e-6cdb-4319-bbe6-d7582b691e08",k.Sfx_book_open="8cf28c92-e390-4862-9352-a8a2661d43d7",k.Sfx_bubble_pop="5ec1266b-16a6-4e35-b89a-8f0ab1594058",k.Sfx_button_disabled_state="14b31c3a-8fd4-4ce6-bc21-3ba668ab2971",k.Sfx_button_sparkle="d7cec272-b8d4-4424-a6bf-06551945cae0",k.Sfx_chest_locked="9f0b33c5-25bd-4396-a717-8cb688931a34",k.Sfx_chest_open="393f147c-ee28-4182-b425-3d25e2eec028",k.Sfx_chest_open_member="a621bff0-56ed-4372-8126-3979174102e7",k.Sfx_chest_open_non_member="4027a9fc-aafe-45b5-b22b-c61473ff6828",k.Sfx_crate="f84bff26-95f7-459e-8085-7fce398f8f53",k.Sfx_crystalbreak="cc21e19d-bf9a-4844-a329-53a1aa99110c",k.Sfx_crystalclumpdestroy="93e1e797-f6a9-43d4-9aa2-590732aeefb7",k.Sfx_dance_dance="36997279-b2d4-478b-acc3-0a6a63341a8c",k.Sfx_dino_dig="5afb830a-729e-4889-af35-5f7b51b093dd",k.Sfx_epic_egg_hatch="a9c0f4d0-d413-41df-b38a-79349d2511c7",k.Sfx_floatling_fling="2c0b1365-212c-4436-a22e-8de59312615c",k.Sfx_house_intro="a5fcdcf2-cf78-4afd-bf13-a7c807a97baa",k.Sfx_item_appear="19bc6ece-02a0-4fb1-815b-341476892b7f",k.Sfx_item_fill="b80a560c-6db7-43b9-973d-101045219b51",k.Sfx_item_hit="9541607d-02f3-4553-a5a9-de70d2f5e752",k.Sfx_item_whoosh="c49f9bf1-7651-40d9-a231-ead15e9a9e19",k.Sfx_jar_appear="bbc20fbf-48dc-4fde-9180-cbf9201cea4f",k.Sfx_jar_fill_ancient_game_gift_bundle_positive_open="6028a83c-baae-4c8e-8c6e-4226f564a77e",k.Sfx_jar_open_ancient_game_magic_bubble_open="78c4c917-727d-4a86-add7-7e0007555d9f",k.Sfx_keystone_appear="151a96bc-1e90-46d5-8a56-5eecded631f3",k.Sfx_keystone_disappear="7f8858ac-0174-4e6a-b300-5981ce3409bb",k.Sfx_lamplight="d4bf6a95-75a4-4414-91be-05a45cb3b846",k.Sfx_lamplight_pets="0e0cf8bb-0774-4ec7-bf59-60389b604666",k.Sfx_level_up="f599cb5b-38a3-433b-b752-5a70e159d378",k.Sfx_lockbreak="60431b90-7381-4a49-ad0e-0ad0660d4a5c",k.Sfx_main="556ac285-ca78-4e22-b47f-802c01fa7343",k.Sfx_minecart="8fe39e6f-f474-4c7d-8193-ee6cf37085b5",k.Sfx_minecartstop="1967797a-bf9e-4ba5-9cff-bb68c5629cfa",k.Sfx_moving_pet_position="41a6d297-9401-4592-97e9-c668df44e4f6",k.Sfx_open_petinfo_yourpet="addb4b04-11b5-4b09-88a6-33606054187a",k.Sfx_paper_tab="9dd81853-67f3-4168-b476-a5884cc5084f",k.Sfx_petbook_pagination="fea6d560-bf0c-409d-8635-19d5b2d85402",k.Sfx_pets_button_disabled_state="a507f085-7c4c-4f2f-a240-9e86509a3db4",k.Sfx_petsui_rescued="7133e7d7-527e-4ad6-a480-fe58247547bf",k.Sfx_puppetmaster_blast="71d1a201-a433-4a2b-8e27-afdeb07d6583",k.Sfx_pvp="49b61a63-8c88-42db-85dc-ad757780585f",k.Sfx_qi_button_default="5a365fe0-a201-47b4-987c-bce32bebbb0c",k.Sfx_qi_button_disabled="c7ab65ff-f34d-4dd6-a816-4b0bd2034991",k.Sfx_qi_negative_action="c27696e8-c89a-453e-a4e6-131f15b836f7",k.Sfx_qi_positive_action="adb8b97f-9956-47bb-94e7-72606ae3c6cb",k.Sfx_registration="54cf02bd-1b50-4940-b59a-c2a1ea18eb2a",k.Sfx_results_screen="8d0b360d-48ff-4450-84de-13df33dcb2b6",k.Sfx_sharelikeaction="c0f35ab7-46de-4e38-b4ef-ff336e859e75",k.Sfx_shipwreck_shore="30e09f59-4c2e-4a77-8711-c673d8d1456e",k.Sfx_skywatch="9ea8fadd-a299-4c3c-958d-f019fdae0f2d",k.Sfx_snowball="be83d5f8-2829-431e-8edc-cab9a6c8660e",k.Sfx_snowpile="11923d10-063d-4ee2-85f3-2238669a8c82",k.Sfx_spell_learned="9a651525-3dcd-45d6-8142-e5c6368c80ba",k.Sfx_star_appear_ancient_game_star_glitter="e9f8ca80-57af-4e7c-9e7f-6e2606ac9682",k.Sfx_star_explode_ancient_game_magic_achievement_1="b57b24ff-7d46-4d96-9b45-3354e7e40492",k.Sfx_star_jar="9e4c94fc-be4a-43fb-b5d1-00f630a64100",k.Sfx_star_jar_redeem="8d6718d7-22c3-4c27-a6a2-bc95c9e30597",k.Sfx_stat_increase="1d2476f6-a81d-4f4b-b071-9914ed707ae4",k.Sfx_store_equip="718123da-a810-4bf2-9190-f8ee55d2d131",k.Sfx_store_purchase="e1f6473b-8108-40ef-89d3-c6cd5f980380",k.Sfx_tab_click="09ee2803-e13c-40db-bcee-effdd658dcdd",k.Sfx_titan="cc4f40e3-bb3f-4531-85a9-fc4b9be341b2",k.Sfx_titan_catapult_hit="bee4d71a-a89b-46e5-a8f5-6335900e4c64",k.Sfx_titan_catapult_launch="d7727e1c-3e83-4a22-b83c-ac6f6129b46e",k.Sfx_toaster_close="d448e932-697c-475f-a45e-dbfd14148001",k.Sfx_toaster_open="c57228d3-ce21-47a4-bcaf-7de85e87ff5d",k.Sfx_tower_town="5bbd4f05-dd4b-4b39-b82f-10aa55b48d24",k.Sfx_ui="a5ecab87-fcb5-4f02-b98f-51faa950e8be",k.Sfx_water_balloon="a16dfa00-116a-41c8-bc36-a65b925581cb",k.Sfx_world="60b3a3e5-7221-4177-b75b-d93e731ec2fc",k.Sfx_wyrmroar="9d3aa970-b3c3-43c9-ab89-9e7efa7835f2",k.Sfx_xp_gain="69aa346a-9242-424c-9b30-2d43b14c2773",k.Sfx_xp_gain_member="7839c36e-2c83-4b00-b823-989da7f03c94",k.Sfx_yetiroar="a6219a8d-89ae-41f4-8806-3849d1869ae0",k.Voice_0="b8983c32-8fc2-472a-b251-695234ed54c7",k.Voice_10_1="8374fe01-22e1-418a-8add-d449afd2adf8",k.Voice_10_10="d15da664-0a6b-441f-bf1a-6e6ae693d17a",k.Voice_10_100="dd7ce4c7-b5e5-4f0b-a603-05271c89b8e3",k.Voice_10_101="dacd86f7-7e17-4960-b457-f4a18e15fd50",k.Voice_10_11="ff4c63da-c0c7-43d9-9736-c9b616c5ddf4",k.Voice_10_12="e74964d0-2bea-4a02-afae-1b65fc129139",k.Voice_10_13="630733b7-5d28-497d-a7a5-1d2019ef00a5",k.Voice_10_14="fb2597b1-cd14-4a7c-9fcc-1587dcf7f56f",k.Voice_10_15="8c82ebee-76a2-40fa-b31d-82fad226ef2d",k.Voice_10_16="a84be1c2-e6c9-47cd-ad89-dab895785db1",k.Voice_10_17="f429c8e5-da4b-4f35-ad72-542952d6aff5",k.Voice_10_18="f56a207e-2100-4161-b2d6-a76110086845",k.Voice_10_19="e5caeaef-3eef-48b4-ac6c-d992d8c557a9",k.Voice_10_2="25ac99ac-4d79-4988-917f-372f82e49220",k.Voice_10_20="39b6a2aa-27c3-44f1-bbd9-652eaaf7b4e9",k.Voice_10_21="68c557cc-ce02-4ff3-98a6-195f46f15f5e",k.Voice_10_22="4454bba7-9bd8-4975-a1ea-9a9ec42b1064",k.Voice_10_23="603fb6b7-caff-4cb7-bfff-4f0778c8219f",k.Voice_10_24="dc97131d-7de7-42c7-979a-cc5baa305acc",k.Voice_10_25="bbfcc683-1b76-497b-bb93-17ad11bbcda6",k.Voice_10_26="f4accfe1-9a4d-49d6-bc8d-726a53524025",k.Voice_10_27="9d6e793b-931b-4a5c-beac-a21b1c26f54e",k.Voice_10_28="4594100a-65b5-46e4-b051-9143b897461e",k.Voice_10_29="03a85e9d-2f22-4dc5-86ab-acb2a756665b",k.Voice_10_3="89a5dca1-52e1-473a-a000-5580d4804c56",k.Voice_10_30="903363bf-e7b9-4f76-95da-838cf92aac2d",k.Voice_10_31="2f90b0e0-7335-417b-b452-127f7de3fa62",k.Voice_10_32="27c286d4-f665-4ae1-bc49-d9d382cf155c",k.Voice_10_33="1a12de45-eaad-45fe-9a09-6980d8540613",k.Voice_10_34="0efb77ba-b0d6-4e33-90d2-035abfd2c033",k.Voice_10_35="3600b850-001f-4947-a582-ec4c84b5a139",k.Voice_10_36="a65753f2-f7c9-40a6-a45b-b893111a81b2",k.Voice_10_37="3b624ea2-dde9-4d53-92e6-a579690a35e8",k.Voice_10_38="b36cb4f3-f17a-4859-b5e4-1f5355289b69",k.Voice_10_39="5633a65b-a9da-4e63-89c2-d52f5d815b4e",k.Voice_10_4="18b617f3-c270-417d-abcf-78c0ddbfa1b5",k.Voice_10_40="7ca2fa2d-6e46-48ff-99ad-a09dca7cb890",k.Voice_10_41="3fb75a60-af33-4cef-8c5e-66e28969d623",k.Voice_10_42="ccb47779-50dd-4b13-b45c-d028cc4475a0",k.Voice_10_43="0d947cf3-31f1-4df1-8fc5-419d6e5d54a3",k.Voice_10_44="d17dc780-a622-441b-a156-ee7b15d5ce05",k.Voice_10_45="aa42e5fd-a27b-45a1-a14d-42a41059bd43",k.Voice_10_46="ca327091-4ddb-4579-a04c-dba4651a09a3",k.Voice_10_47="b05fbee3-0759-4dee-81ab-cbc2c6e4b651",k.Voice_10_48="aa16aa0a-6fbf-4277-b465-fae598b15a05",k.Voice_10_49="90127057-b483-4f20-a986-fc6a722a2bde",k.Voice_10_5="a7af0dd5-03c7-4215-9644-3ed32871e3b8",k.Voice_10_50="620242d7-dc6c-48b6-8233-548a3f369644",k.Voice_10_51="f5efaba7-0376-4eb1-a3d6-8f4a362cb81e",k.Voice_10_52="405e0fdc-25ed-4a53-b817-6743c9d1f2c6",k.Voice_10_53="8c4216b9-b62e-4e18-a6d0-8440e409aa06",k.Voice_10_54="232d9520-354c-41d8-b54c-676505429a15",k.Voice_10_55="8957cb08-2cff-47ae-a4d8-cf3ec020e729",k.Voice_10_56="0383fc16-321a-4a24-8e46-920aa4483044",k.Voice_10_57="80059479-0418-46f9-8c51-57a5137fca69",k.Voice_10_58="c7e9a18a-314c-42ba-900b-39711a5739c3",k.Voice_10_59="7324cb3e-3516-4c68-b3e9-21591918a039",k.Voice_10_6="7f417572-24ac-4079-a85f-a70ed43e9022",k.Voice_10_60="db932e86-48d3-4805-a193-28fb9c046beb",k.Voice_10_61="158d05df-fa47-4ab0-bd3e-76c3e4efd752",k.Voice_10_62="bf6f99af-e72c-4651-a206-a10bb08d9b99",k.Voice_10_63="5d2664f3-b7b7-4814-b089-ce33b657cf81",k.Voice_10_64="08161f8e-94ca-485c-84fb-311482a2f0cb",k.Voice_10_65="96012c1a-f0c7-4b26-8022-5f67227342f4",k.Voice_10_66="a63ce015-5fdb-4b7f-87b4-45ec4503cf8d",k.Voice_10_67="fe4ade9a-24a5-4c94-b69c-1f6ac6edc3ac",k.Voice_10_68="991122d3-4996-4e2e-a952-fa06c08aaf27",k.Voice_10_69="25793c57-a685-46ec-970f-64d7afe0d6d4",k.Voice_10_7="6c5d8cf8-fedd-4028-9059-b53dfe26eef2",k.Voice_10_70="a51bf05e-ffba-496f-80f3-f730e1b0f975",k.Voice_10_71="936d43e4-742e-4d20-b70b-fbe3a0514f76",k.Voice_10_72="dadcd5a3-7823-4925-858b-d9b46c22de5d",k.Voice_10_73="2ceb19df-3c2d-468d-a521-9e934c755d3b",k.Voice_10_74="8f2dba92-32f1-4ec9-820d-1d224913d467",k.Voice_10_75="c4d5d6d5-7f25-4068-99f7-7d3385879fe1",k.Voice_10_76="51838690-17b3-4efa-a5c7-dece38f3da0e",k.Voice_10_77="36eccea7-891a-453f-8acc-3231ad4f4275",k.Voice_10_78="07a42466-62a6-4f68-84bc-f63e73a8e52f",k.Voice_10_79="189d4bae-b293-4134-9caa-827727111a89",k.Voice_10_8="b08eb38b-4385-4f64-bd0a-77d9d4dab1bd",k.Voice_10_80="0df89a78-3e01-4c33-8a0c-ab935c70bc2d",k.Voice_10_81="a8536bf9-702d-4e96-bba4-f614b91e8698",k.Voice_10_82="144ac2da-f141-4182-993b-955929ce0f57",k.Voice_10_83="00e8d026-90c6-4296-97db-cc69c7527980",k.Voice_10_84="567a21e0-1e5f-491a-a6a4-b3b2242d57f2",k.Voice_10_85="fcd808e7-1bfb-433b-b2f8-05e31cb45dc7",k.Voice_10_86="8dbdaec9-f94d-4572-a855-01ba3187d1a9",k.Voice_10_87="2acc6399-b867-4362-978e-bed6f19f5d99",k.Voice_10_88="08289a6f-fc73-476a-bab4-667ad155bba8",k.Voice_10_89="6820cd0b-7c8f-4026-87e3-59320b82b82b",k.Voice_10_9="4d1f5225-2bab-463d-8b01-4ffcc853306e",k.Voice_10_90="54f5ae0a-b6ec-49b7-87c6-984bb0b7ce04",k.Voice_10_91="58a85340-45da-404d-9608-9d14fc69b176",k.Voice_10_92="711f1dce-efc1-4858-8395-d95e8dc7c4c1",k.Voice_10_93="db010365-a2eb-4d56-809c-fc5d8a70ab8f",k.Voice_10_94="b3463275-de36-4831-bce1-c13c130f2b54",k.Voice_10_95="df0af4f7-6f1e-4086-b874-ca2499224134",k.Voice_10_96="4a0d25a2-b634-4df1-820e-309939839f87",k.Voice_10_97="abb370c4-5fc4-4cfa-b607-57e9adc61317",k.Voice_10_98="55328b35-268f-4d0a-ac10-d5dfce78819c",k.Voice_10_99="5b2e4bfc-c777-451c-ac64-63b0556d1d43",k.Voice_11="fbdc34da-94a8-44c8-8746-4881c2a57c45",k.Voice_11_1="33870292-9f42-4aeb-846a-32523c1e6339",k.Voice_11_2="645bc547-787d-4fcb-9e01-cc0428eab3ee",k.Voice_11_3="a50441d3-5413-492d-8ade-7d96cea8608f",k.Voice_12_1="f0629883-d0d7-477c-9d80-683149efc47d",k.Voice_12_10="1ac27643-bc73-4747-952c-cc68fed72954",k.Voice_12_11="3fb7995c-1cd4-4854-8257-d0f2fdbf804e",k.Voice_12_12="9efb4a74-41dd-4e3e-8d0c-e07816416480",k.Voice_12_13="9b8c2daa-9134-4728-aa67-ee48ed86d49c",k.Voice_12_14="f5d1916c-5ded-43cd-91b7-620f4381558d",k.Voice_12_15="4c219ef8-6694-4874-b984-7c195c7af5b7",k.Voice_12_16="4664ca14-b1c9-4fb0-a764-5d3cda6b637f",k.Voice_12_17="ddb5622b-b67a-4cf8-9e72-30d04b5aba95",k.Voice_12_18="a3bdeeb8-ce5b-4f39-ab0b-547f635f301b",k.Voice_12_2="475d98f6-92de-4dad-a201-324bd296eea2",k.Voice_12_3="f4770274-326a-497e-9904-b8b01659af4e",k.Voice_12_4="50f57a4f-52b9-46a7-bd4f-17e6331b5778",k.Voice_12_5="33bad2e5-ae92-4699-84ce-ee99f14f8fba",k.Voice_12_6="363637a0-0d33-4c58-b9f0-151b22a0c1c1",k.Voice_12_7="e9ed5001-d592-48ca-b918-efd46aee33de",k.Voice_12_8="333d5063-fddd-41bf-a95c-eb82d7767847",k.Voice_12_9="5dd95371-d5f4-4b3c-95d9-fdc3c8841cb7",k.Voice_13_1="f906dab9-56a4-4639-acf6-b0fe7be73b29",k.Voice_14_1="0f6848e1-bd85-4c8d-ae85-ac5ff8298234",k.Voice_14_2="0b25866d-33b3-4616-af2f-a25b6c4e0c17",k.Voice_15_1="fcf5a301-ef27-4589-b0f2-99be5abcc6e5",k.Voice_15_10="30dd76dd-cc4d-4b70-b4fa-79d3c0a14df8",k.Voice_15_11="02cd8f2f-3a9d-4ad6-92ab-6da9225c895e",k.Voice_15_12="08aeffa8-187e-49f1-a326-b91b85334532",k.Voice_15_13="eb243657-a7df-43e8-98e5-3fd68dfdb6d9",k.Voice_15_14="d3b6c2dc-42f9-49db-ad1b-a27a12ee0b2d",k.Voice_15_15="dc3fd45a-30b4-4883-98a0-5929fbc09ee2",k.Voice_15_16="ce9d5f95-089c-4a9b-8bcc-c123267d9aa0",k.Voice_15_17="f0cc43c3-9e3f-410d-a9a9-5c39c24d8273",k.Voice_15_18="a019226e-7975-446e-bf75-d1d496b832f9",k.Voice_15_2="e04f3f64-efe4-4feb-aabf-7b76b5ce19d6",k.Voice_15_3="90998594-7818-446e-87c0-f3bcfb53d05a",k.Voice_15_4="42b9aaec-5111-48b5-880a-fa06129abad4",k.Voice_15_5="e0da217d-7a8e-4bda-8945-30d7a51342a5",k.Voice_15_6="d4ec40f0-aa49-4620-917b-c86706401865",k.Voice_15_7="cad25c19-056f-4f04-a891-150e9e151894",k.Voice_15_8="36dbeab1-0102-4e8e-8a9a-b17e06649ec7",k.Voice_15_9="d5caf9ba-4a6d-4834-b2d8-2acf209edf51",k.Voice_16_1="d4ff6e15-07ff-407b-8267-b9e63b19b5ed",k.Voice_16_2="5e754842-534e-4ecf-905b-e1edad589c46",k.Voice_16_3="a549ec6b-de5c-478d-bb61-38d7a6f230ba",k.Voice_17_1="9dc63892-5b87-4617-97cd-aecd0b1ca0ba",k.Voice_17_2="4667104b-71f9-47fe-89b6-3188959c725e",k.Voice_17_3="7504ea16-fed9-40ac-95ef-1ed71f4ceee0",k.Voice_17_4="2e352a3f-79e0-4420-b4ef-21db33a271cc",k.Voice_18_1="52b16126-6452-422f-b926-caa25c7e92a8",k.Voice_18_2="8d3141f7-7fdf-468b-8f43-2fc7767b0a21",k.Voice_18_3="918bd95b-b98e-4ea7-a2c0-e46fdddaa823",k.Voice_18_4="5d809ec8-9620-4049-ac4a-cabfe765dcbd",k.Voice_18_5="8f5583ae-04db-419c-9b18-e1cd64475797",k.Voice_19_1="84a75a47-f8fa-48cc-8044-92e91a0c87b7",k.Voice_1_1="7901d207-e514-4ff4-a2a5-ed0312a2d640",k.Voice_1_10="6f4c05e7-15d1-4d1b-be88-564b421fceae",k.Voice_1_11="48c1d522-de68-4fbb-904b-6baa84013fda",k.Voice_1_12="a9b92570-9111-4e8a-aa37-b420e6859034",k.Voice_1_13="d2c5ce34-e31b-41a8-ac2c-28d124c7c5ba",k.Voice_1_14="9ddcc862-33eb-4668-b35b-5ec0ca108e61",k.Voice_1_15="131c2c36-8b5f-4eaf-bc43-19ae307bd9a9",k.Voice_1_2="bcca6880-e652-484e-848d-074c90119aaa",k.Voice_1_3="db819f9e-1687-46b7-a889-bee08b4b9fe5",k.Voice_1_4="163f1b05-df94-4d34-a4f0-a97c7d4a2056",k.Voice_1_5="8b3233e3-2d3a-4cce-b002-0a0a429cee83",k.Voice_1_6="b964e341-8564-4383-b0ef-58f638968677",k.Voice_1_7="a6fdb043-578b-4f03-a667-d71ce87ea05d",k.Voice_1_8="e5076a83-9296-4595-9ebc-bc4c32df228e",k.Voice_1_9="9f920d31-c2e9-412d-9b56-4184ee6a5129",k.Voice_2="c87a7825-b899-49c1-9604-604486f3a276",k.Voice_20_1="00902e19-6596-495d-b0ca-cd98aafba128",k.Voice_20_2="8e731a39-2a57-48d5-b5d5-38f6871cf134",k.Voice_21_1="c2e464bb-bf60-489d-ade0-3b824071b8f9",k.Voice_21_2="21b23b69-c804-4312-b420-6159d2efdf24",k.Voice_22_1="87a222fb-8469-4eba-bef7-a59995c317cd",k.Voice_22_2="1e07e93b-2e35-4d98-9134-b3d6509bbbe7",k.Voice_23_1="1dbdc658-fc61-4083-86ad-f4a975e9b4a5",k.Voice_23_2="410c4498-c8d3-48a9-9577-a0b1eea19b58",k.Voice_23_3="4925fb6b-9720-4c03-b8d1-cc01e82fad1c",k.Voice_24_1="5c8be06f-0e96-428f-9ca2-76701a0d74f1",k.Voice_25_1="81ebcc5b-8a69-479f-9fd1-effbb3825ed6",k.Voice_26_1="0c6b84e5-f4a4-4e4d-9a53-efcac80bbde5",k.Voice_27_1="9cbc27db-a65b-405e-9af6-09991dc3901b",k.Voice_28_1="41e1f7d9-7313-4f72-803e-750b2beacb12",k.Voice_29_1="449b0569-bcc7-45ba-8896-f48784a4c9ba",k.Voice_3="b0f7e2bf-bf73-4912-8983-ddf5c33cfc2f",k.Voice_30_1="e5e3b754-560b-4a18-8c2c-65bea92b145c",k.Voice_31_1="81c38a0a-3596-433f-9f50-3f1ad4545831",k.Voice_31_10="560bda7b-cf4a-4cc3-a385-87a675ae6eb6",k.Voice_31_11="1fe92a88-0ffc-43ba-af06-706f323b1fef",k.Voice_31_2="1384c200-e18c-480f-a678-184c6fa0cd1c",k.Voice_31_3="60b6b173-12ca-4768-b6fa-18fc73b5c4a2",k.Voice_31_4="8f61c317-72b0-4f5d-930a-3222842461a3",k.Voice_31_5="322f6541-efd1-42ab-a22e-29d6082c297b",k.Voice_31_6="651c25f2-5092-4f7a-a814-41ac2d6118b1",k.Voice_31_7="9e60859b-9da4-4e80-bbde-36ba9189fb24",k.Voice_31_8="dc8672b0-9893-4478-bd72-7ca1134f36ca",k.Voice_31_9="c6d04f55-adc6-4518-8942-8eb8581072e4",k.Voice_32_1="254ec798-db74-4600-8b14-b44e2f4f1fee",k.Voice_33_1="5c6d4f2a-306d-4562-a4fb-68c105c5d411",k.Voice_34_1="02ff5e25-b1fe-433a-a3fb-8b9ee2b5ca52",k.Voice_35_1="d64e0332-d3a1-4697-8f4c-26b77895b5bb",k.Voice_36_1="79db4bf1-b54e-45af-a2f3-4eeef0de9479",k.Voice_37_1="782be050-14d8-46d7-a3c6-025dcf0ccae9",k.Voice_38_1="e1e98afb-68d7-49ff-bf24-f6e8beaa4bfe",k.Voice_39_1="b7567b10-b8ca-4ea8-b040-c07351cb1559",k.Voice_39_2="ab6667cb-8f3c-43b8-ac98-c5979f41a493",k.Voice_39_3="857caa3f-e35a-442b-924e-914aa44c3948",k.Voice_39_4="3e2a5634-37ee-45b5-8769-c6fac7983c25",k.Voice_39_5="af7eec7e-169d-4f29-8658-82176f96ca8c",k.Voice_39_6="5dcef2df-b9c3-4605-b077-60601dbbb80c",k.Voice_4="b107ceb3-3f2a-4eff-9920-083c64d1825b",k.Voice_40_1="ef0c0e07-6a19-4010-a1eb-5d3ead249daf",k.Voice_41_1="6b65e388-71ce-4897-a651-e96a66446c1a",k.Voice_5="7dbb3a28-6630-416e-816a-9d2235356a07",k.Voice_6="c4040765-4656-4ad5-a147-53b85acc1e77",k.Voice_7="1be1bb65-5bb5-4ef2-86cb-2b634614e76a",k.Voice_8_1="17090933-1d74-4556-88f8-6936c1416cf6",k.Voice_8_10="9e9ee52a-6416-42f6-b2a2-b202653c4b14",k.Voice_8_11="d7e72894-b7d9-4b49-b00a-a49c06658fd8",k.Voice_8_12="32820842-6f0e-4c3c-b634-1333b6088561",k.Voice_8_13="4de4f67a-c7a1-41f1-98f1-1aeb08c57a3d",k.Voice_8_14="c5097d7b-7eaa-4737-b7bd-b0141ff69473",k.Voice_8_2="d268246c-7a9c-453a-9c36-d44d49ed05a5",k.Voice_8_3="68713acd-7415-4a68-b7c4-a778d1564a71",k.Voice_8_4="ec28035b-edf1-459b-a72f-008c23ebbf9e",k.Voice_8_5="22b1e4b4-d6aa-4c42-8e67-c95aa62b58de",k.Voice_8_6="4c2281f0-84ee-4f1b-a7d0-6c81a9ea390a",k.Voice_8_7="97f8654d-82c4-4f0e-b796-21e6765fae10",k.Voice_8_8="06f7112b-3a1c-495f-a592-322c2ec8e2af",k.Voice_8_9="113d9a21-b131-4eee-a7e2-bcbd22627ab1",k.Voice_9="b8ad14cc-bc8f-452f-a8a2-46df02fefafa"}(F||(F={}))},36648:(k,B,U)=>{"use strict";var F;U.d(B,{q:()=>F}),function(k){k.About_ArtistsAlley_MayJune="6a93df6c-0e28-4a2f-a31c-bdbdab1c07c4",k.About_FF_DecJan="cde70f26-33a1-4b3c-9491-e91caef3a078",k.About_HotCold_AugSept="27807234-1d15-41b9-8446-219b7e15457e",k.About_JurassicBBQ_JuneJuly="d854de9c-85bd-452b-87f3-7fb9d522b71d",k.About_Magicoin_OctNov="770fe68d-439b-4431-9ca2-e0899d607d3a",k.About_MoonlightDance_AprilMay="26f3957f-a74f-4f10-bca0-eea06b1c85f4",k.About_SG_FebMarch="cfffffd0-252a-4d03-b6e9-8eb3c8d6e783",k.About_SunkenSecrets_Oct="fbf2103d-5f12-4a26-a87c-33510dae0153",k.About_starryknight_AugSept="778400b9-fde2-403d-9226-b2f3cb03ed50",k.Accent_banner_pbf_magicoin_free="d91c9c9a-919a-4313-a0a1-4c5d265120c2",k.Accent_banner_pbf_magicoin_member="3d44b1a7-d40b-4466-b563-d2137d54fa60",k.Ad_app_download="17ee12c4-6d52-46f5-bed8-cccf13a09900",k.Ad_challenge_large="232666ac-597b-4465-86cb-44871595eae8",k.Ad_challenge_small="9015ffcd-e810-4836-927a-42f4c225d8b2",k.All_shops_button_basic="c2245984-24bd-4d1f-ab4f-8a1ba90688d3",k.All_shops_button_hover="2dc169c3-65ee-4385-be45-585c667872a7",k.Alpha_gradient="b12df35b-db7d-42bd-89e8-2fe725626e89",k.Alpha_gradient_large="d7d4292d-694e-4751-ae88-f9d74dfad4bf",k.April_2024_teacher_gift="ac5e998d-a0c8-4afd-a2a2-941eb00d0180",k.April_2025_teacher_gift="945b0ef4-6a59-4209-8976-7a1f91818da7",k.April_2025_tt_home_screen_background="37d6ad0a-b38c-4214-b940-01006e43c687",k.April_2026_teacher_gift="3e2438da-30e6-4697-b3b5-5cf6a4160cc2",k.ArchiveWheelBig="190a8f4a-ee88-4565-9c80-590673e13eec",k.ArchiveWheelFrame="7fb923e3-cb90-41e0-91db-2c954e2b1c35",k.ArchiveWheelPointer="3cb1b4b2-eefe-451f-bd80-2ae657b187db",k.Archives_season_s1_r1="6c720489-8c28-4b35-9070-58aa2731ea9e",k.Arrow_green="d9d395d1-ad6b-496d-938e-b6c6f0e8d5f1",k.Aug_2025_tt_home_screen_background="da88abfc-9ea1-4dd4-8bb2-dbfa4d71b36a",k.August_2024_teacher_gift="99146844-af5c-4908-9f73-dd47fa68514d",k.August_2025_teacher_gift="727289c5-2ace-4678-a95d-7fe0eb97b8cd",k.BTS_GearUpdate_mailer="d7597f0f-f3b8-48d3-8241-0f528290a749",k.Background="a9d8a799-09b6-4688-b5c0-6d8af305eea1",k.Background_arena="d4c07814-4cce-404d-90dd-f0236af8b3ae",k.Background_boss_rift_ice="20873d43-4230-41d6-9dd9-282f61178cfd",k.Background_boss_rift_sky="d51faf6a-819d-4fd5-bbb6-a7a7d156d7c2",k.Background_class_code="8b4aa02a-0030-4e24-88d6-cefc61776746",k.Background_moonlight="2ac28cea-f8f0-4057-abf1-38d29cd35325",k.Background_pumpkin="7744caca-6df9-4e11-a219-bc0f54877f5e",k.Background_starlight="7e9090f0-e343-4de0-b4a5-ac00be823cd9",k.Background_winterfest="12b5ea74-ae25-4cdf-936d-5138ba9979c6",k.Backing_1_cream="ed3d8628-cd54-43f1-be7b-662544f575cd",k.Backing_2_beige="4c4adfbb-5d2a-463f-9c89-4c144952e7f8",k.Backing_3_dark_beige="7615aa8e-d1f8-4704-b7b1-2a69fb0396eb",k.Backing_4_secondary_beige="352a5f6d-93a4-445c-a712-46cdc95f5754",k.Backing_battlelog="6add84e5-fe82-4c44-98e6-5a719c901095",k.Backing_bonus_reward="935b3ba4-6488-4c72-aff0-5c95be06ffab",k.Backing_dim="906d5416-484c-4f70-8282-de03ccc57aa1",k.Backing_pattern_sparkles="96245e39-235b-44f4-9bfa-ecd046276e6d",k.Backing_wood="85feead2-7940-4fca-94bb-f9b038fd90d4",k.Backing_wood_notch="3f035693-9114-40ed-80e2-1967a5ceb6f9",k.Backing_wood_small="19094bc6-e28e-4220-9e35-795ae0aada01",k.Badge_backing_empty="282d23b8-d120-49c3-bdaf-2acc8ec9d7cd",k.Banner_festivals_tinteable_grad="cb8e9ef3-e61b-443f-af6c-67a56dd27d0a",k.Banner_small_pink="357fdc8f-f15d-40ad-aca4-0940ae8e9549",k.Banner_small_purple="c4dcb310-5dc2-4c70-93f1-9e73ebb9e28c",k.BattleLowHealthBorder="59d77743-50a6-445d-9832-6c26604e4c43",k.Battle_Pass_FTUE_Screen_1="4bf4dec7-dad0-4c4a-8b05-51b4065f86cd",k.Battle_Pass_FTUE_Screen_2="abe43935-9df7-43bd-b449-3c1674905f48",k.Battle_Pass_FTUE_Screen_3="36dbfe97-8a73-44c7-af33-05bdc26f752f",k.Battle_Pass_FTUE_Screen_4="f27c16c2-5a1e-465b-b894-fd4dd6515ca7",k.Battle_Pass_FTUE_Screen_4_2024_Dec="476a975f-1687-4ebe-a8a7-0de0f9eaef57",k.Battle_Pass_FTUE_Screen_4_2025_April="42749ab2-a725-481e-8ad5-141f1107b270",k.Battle_Pass_FTUE_Screen_4_2025_Aug="eae2dfa6-87ac-4e92-8168-8d3de4f27713",k.Battle_Pass_FTUE_Screen_4_2025_Feb="b260dec4-eb94-4325-bcb1-53e1b1658b0d",k.Battle_Pass_FTUE_Screen_4_2025_June="c12d8c88-196b-4509-a973-d16dfb54ac79",k.Battle_Pass_FTUE_Screen_4_2025_November="aaeed6e2-85c9-4141-9b0c-72ccad0c9bfe",k.Battle_Pass_FTUE_Screen_4_2025_October="e8060736-a9de-44e8-8671-00e0289892eb",k.Battle_academy_gh_pedestal_bg="b437f002-af00-49b8-a2d7-25b67b5685a7",k.Battle_academy_gh_pedestal_fg="c09002e3-6695-4efd-be21-8f413e6a7e20",k.Battle_academy_gh_stairs_bg="8c3bf69a-1282-416d-90c1-57efca053c5f",k.Battle_academy_gh_stairs_fg="ca4194f4-8626-4ff4-b1f1-4d84fa0f823b",k.Battle_academy_stairs="cb20f004-bf10-45d7-ada9-9a3ba66b913f",k.Battle_archives="ffde07db-e1bb-4b0c-b724-8faae4a14d26",k.Battle_archives_bg="41f23d64-af23-4ad2-8c33-0f3ccfeaf3b4",k.Battle_archives_fg="88182fd5-723a-4ac5-9c21-ae0de5cb8b1c",k.Battle_bonfire_inside_bg="6ba91a53-b9f0-4e76-a99a-133121d1f163",k.Battle_bonfire_inside_fg="b292329a-50c6-46e7-92fb-e3b6b4fb0694",k.Battle_bonfire_lava="89f1914a-4308-4131-bc14-33507fee4851",k.Battle_bonfire_lava_bg="49f70191-39bb-4f25-832e-84f6c2b1149b",k.Battle_bonfire_lava_fg="b95d2b2d-cd94-4e1f-beac-149c9f023809",k.Battle_bonfire_lava_old="340e7581-a41d-46bb-a11a-631921f42118",k.Battle_bonfire_outside_bg="16b4a938-d5bc-41ea-9089-c308b24b7237",k.Battle_bonfire_outside_fg="ace7fd1a-3c7c-42fc-8b11-471d19098b40",k.Battle_coliseum_outside_bg="1b6e94b0-9dab-4b77-b216-93f791658f20",k.Battle_coliseum_outside_fg="09666b04-39e5-45b5-9e49-111f91ebedd7",k.Battle_forest_generic="77eedb27-a584-46f3-87a6-40e84902c429",k.Battle_forest_generic_bg="351db49c-f8f5-4076-b713-a6175f9c1c0e",k.Battle_forest_generic_fg="f5e3e053-a0f4-471d-88e9-c10404d8da07",k.Battle_forest_generic_old="76a18a73-ff12-4518-8fe4-8d1212f914a4",k.Battle_forest_outside="19a67601-ce54-40ea-ac70-8c6b3b1cbb83",k.Battle_forest_outside_bg="325a0230-611d-4d79-8c9e-784703b77721",k.Battle_forest_outside_fg="c376bd6d-ef20-4c13-a396-4085486ef68c",k.Battle_forest_outside_old="84230353-9e18-4cf6-aecf-3c68ffaad60a",k.Battle_grotto="e8526641-5073-4a97-bb4c-a8edd8550c63",k.Battle_grotto_bg="e3602904-def2-4b94-ba3f-1f2e5ae65d83",k.Battle_grotto_fg="211ad4ee-1450-4931-b4e4-4964e9e4199e",k.Battle_interstitial_bg="cfc94123-817c-4e1f-8bf3-6e1eeec93ced",k.Battle_lamplight_moonfest_bg="6b62b005-097a-4580-9701-061386e71920",k.Battle_lamplight_moonfest_fg="dddabadb-b443-4499-a8e0-a896944e727f",k.Battle_lamplight_outside="289f3ef1-58c1-4257-a739-7a73b495164c",k.Battle_lamplight_outside_bg="33d861e0-8416-4366-b640-75bd58a76419",k.Battle_lamplight_outside_fg="8088a9e2-278a-48cc-a429-be02d472fbbc",k.Battle_lamplight_outside_springfest="99ba4ee3-0bc2-42b3-a76c-505aa6956e9a",k.Battle_lamplight_outside_summerfest="c50db463-cdfa-4f28-a1f2-b2c46e8e8990",k.Battle_lamplight_outside_winterfest="87c9b456-c737-4c8c-8d85-ae07ff87daac",k.Battle_lamplight_pumpkinfest_bg="83af8521-a111-4086-8412-90998096923b",k.Battle_lamplight_pumpkinfest_fg="e96058b9-7536-4dfd-9c4f-b89a9a6f312d",k.Battle_lamplight_pumpkinfest_night="a0876a5b-71eb-49da-aaf0-0470d7e0b8b5",k.Battle_lamplight_pumpkinfest_night_bg="ebf28489-f1ca-4961-9c9a-b4833bfb8b5a",k.Battle_lamplight_pumpkinfest_night_fg="6f160c28-ca59-4b62-b5b8-ea9f0e5e9fe0",k.Battle_lamplight_springfest_bg="99a5fe98-a71a-4c17-a9b4-c85809f08d82",k.Battle_lamplight_springfest_fg="e636c55e-fde2-4c8d-870c-b7d8035fce92",k.Battle_lamplight_starlight="2ee80068-aad0-4187-aa81-84f3ea701f0c",k.Battle_lamplight_starlight_bg="e666e7f9-6294-41e6-8a7a-45fdbc61a69b",k.Battle_lamplight_starlight_fg="654aa629-489e-4cb6-bf46-fed109a439ce",k.Battle_lamplight_summerfest_bg="dc9e3505-30bd-4e74-9fc5-bc9147af52ce",k.Battle_lamplight_summerfest_fg="25f0b480-cadc-43c3-835b-ffd6e60115ad",k.Battle_lamplight_winterfest_bg="a24b5f19-0b31-47ae-ab9e-2be6854dfc5f",k.Battle_lamplight_winterfest_fg="d133013e-92a7-467e-875b-c599d5fffff5",k.Battle_map="1d2ef160-a67d-4b3e-b62f-068f0b116328",k.Battle_moon="294aa34d-24f9-4826-a309-1ff7fbb92c52",k.Battle_moon_bg="bd6ba53d-dd8a-4a7f-a68c-26161c17f5df",k.Battle_moon_fg="aa0f953d-a092-4ba4-9ea6-3e017d4f8e77",k.Battle_puppet_master_bg="fd200b15-bd62-46c1-a177-0d0c46628444",k.Battle_revamp_splash="6e202c5f-e986-4a2e-b9b7-11eff12943c3",k.Battle_shipwreck_inside="ecec9348-3818-407e-aef7-b2ec15c241a5",k.Battle_shipwreck_inside_bg="510850d9-61d9-49ed-a600-4ba7f2b7f397",k.Battle_shipwreck_inside_fg="c547d4ff-e235-4bd4-be23-b503cb6cad72",k.Battle_shipwreck_outside="8c146682-ab2a-4680-a5e3-b9910dd27507",k.Battle_shipwreck_outside_bg="d502cd37-ef8c-46d6-81e8-7c548b66dc0d",k.Battle_shipwreck_outside_fg="bc6618a6-f008-446e-8ead-5391c4cce57d",k.Battle_shipwreck_underwater="6c77836a-db22-49c8-8168-ebe566764b6a",k.Battle_shipwreck_underwater_bg="9e53b099-9941-466f-8ea8-e6e7d0126049",k.Battle_shipwreck_underwater_fg="c883bf41-56ea-4415-bd75-1157fa748a67",k.Battle_shiverchill_inside="027df5e9-b930-4700-8a6e-f234fb0989de",k.Battle_shiverchill_inside_bg="b7555e19-a333-47c4-ab5c-7eb5dc06893e",k.Battle_shiverchill_inside_fg="a5a80e5b-5680-4b3e-a53f-6155540dcc9c",k.Battle_shiverchill_outside_bg="0d6c6911-c576-4200-8a99-7be16d46e7e8",k.Battle_shiverchill_outside_fg="c14e6f6f-83dd-48ac-970a-4d9cd6d30f59",k.Battle_shiverchill_outside_old="1f4c3639-355f-4762-afa5-ffe42862d02b",k.Battle_skywatch_inside_bg="bec82905-9385-4c6d-a27a-2027d27d9f0f",k.Battle_skywatch_inside_fg="d87f5a6b-64e8-4afd-ac23-a9905ca5e2a0",k.Battle_skywatch_outside="84b91294-49d6-4481-b3e8-48a22b30e9e8",k.Battle_skywatch_outside_bg="29189a36-c263-472b-9375-6340c7e5486a",k.Battle_skywatch_outside_fg="858eb9e5-97cd-4d79-bd4a-66347b53f294",k.Battle_tower_inside_bg="6689ef4f-ed14-4a10-b50b-7c51aeb172ef",k.Battle_tower_inside_fg="d21d9862-1f9a-42e6-988b-efcd34f5f397",k.Battle_wizarddash_bg="fb925c0b-5939-4eb1-ba5c-aa77182f39b1",k.Battle_wizarddash_fg="55daa75b-ee5b-4a1c-bec7-e7695bdb2905",k.Battle_wizarddash_fg2="a97e897b-2fe9-4de2-8042-f7a6bd05e08e",k.Battle_wizarddash_outside="56567ff6-79b0-4eac-a5cf-b8d03ef8c284",k.Bg_battle_academy="22a20bf3-dd2b-4f89-8086-907733a339b0",k.Bg_battle_arena="d5810e2c-5d94-4cd1-87b1-2608a1e3c726",k.Bg_battle_cloud="d249015c-59d2-45f5-a977-282fb639bb5b",k.Bg_battle_dino="fbc909f5-5f70-462f-9a3f-1d432d8af2a3",k.Bg_battle_forest="f7dbf566-f2f1-4d47-9b02-29bb4fbc0956",k.Bg_battle_mountain="bff86add-432b-4ee1-bcd9-68c9ea56f6e6",k.Bg_battle_pirate="1c8be200-2d6b-4157-8506-edefa20a7bcc",k.Bg_battle_shipwreck_beach="a45e070f-5279-4946-afce-ce1f467179d9",k.Bg_battle_shipwreck_underwater="43b05a79-5dcf-4d9d-be5c-45b47c7200fa",k.Bg_battle_tech="55ca142f-fe61-47a5-829b-5dd789c6fb3c",k.Bg_battle_tower="707c27c0-5389-49c9-a677-aaa5c046a1b5",k.Bg_battle_volcano="6742be04-500b-40cc-bbab-df0be52ded1b",k.Bg_calendar="0e6e8c32-47de-4bac-8e54-c8496a33347d",k.Bg_calendar_v2="d80afbed-3612-46ff-929f-4d01e989b2a1",k.Bg_floatling_fling="96623e14-59c3-465c-a190-c9b29a7f5c1e",k.Bg_generic_outdoor="feef9cf3-47aa-4728-a7b9-fc80d1900cb7",k.Bg_postbattle="875f9adf-8992-488b-9e64-417488fb3bf0",k.Bg_postbattle_magicoin="8fcd40c5-f035-42dc-a08e-30c685365ed5",k.Bg_pumpkinfest_ui="19a2abd8-5739-4cc1-9d9e-da6fdb8ff7bf",k.Bg_springfest_ui="d3604e95-e752-49b4-bba0-632c119e909e",k.Bg_springfest_ui_02="6158e3e0-7ef6-41d6-9ba9-89ece91e5077",k.Bg_summerfest_ui_01="235b8ffe-f623-4de4-ba57-2698b848a46f",k.Bg_titan_ui_02="79ae07c7-c11a-431f-814a-4622ebe99939",k.Bg_winterfest_ui_01="1f7e4012-8c2e-4d7a-8ab0-9e4838c6c049",k.Bg_winterfest_ui_02="7b5e5ca2-54d8-4978-9ae1-f308adcafdf4",k.BigthingstrailerYTthumbnail="d0205c4e-53e8-41bf-86ae-1a97437205d3",k.Blur_tier1_tier2_back_small="3c3699b1-eb41-44ed-8cd4-c35ff848386f",k.Blur_tier1_tier2_front_small="6ede1bcd-bba2-42cc-9457-e62029780d1a",k.Blur_tier2_tier3_back_small="e664aa7f-1fbf-44f0-bc36-30c0f9cc60c9",k.Blur_tier2_tier3_front_small="a5b990b7-ce0c-4d85-8013-7be26f8b719f",k.Bonfire_intro_1="06b07398-3193-452c-b8b5-882454335eeb",k.Bonfire_intro_2="864be244-dcea-4a0c-9915-d25b29b75e27",k.Bonfire_intro_3="f56f0b6e-3416-464f-aa29-414ab05907ed",k.Bonfire_intro_v2_1="cd3e2167-8a7c-416a-9515-9b1afb077194",k.Bonfire_intro_v2_2="9ce4e043-242e-4cf9-80be-770650ebdae1",k.Bonfire_intro_v2_3="5f59b8ec-7357-4d66-9114-6a4c9be5e7c4",k.Book_ui="1f5c6ea6-1f87-4f2b-92bb-90393bd5935a",k.Boss_shadow_cebollini="89346d11-3e0e-4ce6-aa24-b1f72ab6c360",k.Boss_shadow_gerald="731255e7-c9e3-4430-b81b-dfae29642ce5",k.Boss_shadow_ice_wyrm="30e15ae5-abfa-4305-bc06-0bd187d78854",k.Boss_shadow_nasty_cloud="dc8a4c4a-9b01-4739-8023-e0f7d899a9ba",k.Boss_shadow_old_one="cf00167e-f118-4c73-8a5e-8857dac762a3",k.Btn_dyno_blue="36ace350-a4f0-4922-a539-411812418d14",k.Btn_dyno_magenta="93e025cd-0c9d-4f7f-beb7-b98ab3658a20",k.Btn_lamplight_pumpkinfest="5aa590de-b3a3-4dd6-aa0c-ade9aa39e2b8",k.Btn_lamplight_springfest="035f70fb-d91d-41a9-bbf9-0e0bede11d65",k.Btn_lamplight_starlight="c3dd173f-e91c-4291-801a-05f5df983bad",k.Btn_tower_blue="1476b951-1ef3-44fc-a08a-080b95f225f3",k.Btn_tower_magenta="d8e14379-1f40-4852-9151-35aafff3e89d",k.Btn_towertown_blue="2e7ec46b-1f9f-4135-aa3c-2cd00d9a16a3",k.Btn_towertown_magenta="b6aa202f-f6ac-4f60-afa5-ea4da7dfbaac",k.Btn_town_moonlight="59f97607-89ee-4b20-b62d-2584f9c17760",k.Btn_town_winterfest="91a7fc3e-0d31-4e18-8124-9cd012a95bdf",k.Bucket0="a50c59dd-44d7-4d6b-b410-006fd7678f2c",k.Bucket1="6a330d2a-d315-41fb-8497-ce421b5999f5",k.Bucket2="4fe18160-7312-44e8-93f4-6db53de1c5ae",k.Bucket3="6eb98eda-e918-4e9b-b968-c7187a80fbca",k.Bundle_gold_frame="41c15819-baf5-464b-b25a-ea2592d63e0c",k.Bundle_storefront_decor="122b210b-6320-4041-bbd6-19f9dd1827ac",k.Button_emerald_medium="23a47cdd-8a75-42dd-b07e-666c2927f8a9",k.Button_marble_medium="ba54762a-7e30-4934-ad6d-c071d3103e6d",k.Button_ruby_medium="ce6ad281-108e-47b7-b7bd-83343c66b470",k.Button_saphire_medium="c64eca7b-2b6d-4aef-b2a7-44bd54e70a18",k.Button_stone_medium="e2326f53-b7cd-4244-a6ac-ff55bec6286e",k.Camera_map="37174f1d-2e40-422b-9703-4b0d85d69db7",k.Candy_Corn_Promo="ab5fed41-516f-4eb9-a12e-e1ea65b8f340",k.Cannon_ball="992b9327-1e78-48b0-a583-966f67a97668",k.Card_reveal_130x130="febc75d1-5ae6-4c8a-9890-f6778fde9866",k.Card_reveal_yellow_130x130="c55e348e-df17-41b7-861f-9f2b6a424575",k.Cc_shadowWyrm_mound="752efa09-3484-4baa-9838-6d4f6f345e8b",k.Character_1_long="a95aabe6-7b4f-4de6-b635-a7d6634f0036",k.Character_1_short="ef85f824-8fa3-4438-aef2-ee4272fba962",k.Character_2_long="a22645b2-4518-430a-ac7d-1f35ee22d2eb",k.Character_2_short="1e58496f-1bcc-403e-9b4d-895be3612fc4",k.Character_3_long="07f4c036-893c-4a78-87fa-c3b11aff7a3f",k.Character_3_short="99dab1ca-685b-49b1-8d7f-ceaf18a52afe",k.Charged_levels_mailer="22662a50-0c47-48f8-af1f-ac066ecf7b19",k.Charged_levels_mailer_ultra="d8918507-82b9-4e92-ad17-fb88b60766d1",k.Chart_elements="5641e94b-03e1-43fb-9299-e53334131ec4",k.Chest_gold_closed="a709d3bd-4a5e-41d4-90e2-0034dd469e65",k.Chest_gold_disabled="b44aaabf-614b-4c6e-ae63-e2fff70ab5b2",k.Chest_gold_open="c121599e-8d8b-44c4-b541-1c693bdd534e",k.Chest_plus_closed="dcfc52ce-9724-44c7-8582-2e170c5fabb8",k.Chest_plus_disabled="2bcac690-df88-462f-8009-0ecfb0acadf3",k.Chest_plus_open="cc444397-19cb-4496-a491-8fc3f0378dbe",k.Chest_ultra_closed="a6d1e967-40ac-4f91-860d-cdfc16767927",k.Chest_ultra_disabled="9b9fce35-6142-4d5a-8114-bb49d64b8b02",k.Chest_ultra_open="889607e1-297d-42cb-89ef-31d2ae820e6d",k.Classroom_reward="c626cee9-7f05-436b-a347-ca86f023d109",k.Cloud_1="13a29059-c116-4faa-ae11-9bfc57dc53d3",k.Cloud_2="02fb27fd-29c9-41a7-b771-5537c8a1507a",k.Cloud_3="bb8c549c-36dd-4819-b047-fa0a2943b835",k.Cloud_5="1a3ee237-60be-44c8-99d8-bd29abe1dcdc",k.Coffee="10d2a756-3bb3-4101-be68-3c2a4a0881d6",k.Collect_badge="9d1795bf-a6b5-4a3b-b165-13d806461703",k.Connector="1f40fc06-4ee3-41cb-af13-47465cded3bc",k.Connector_arrow="23b4ad0d-6ad1-4ab0-b24c-339888fad809",k.Container_dual_buttons_clipped_corner_small="57043f8c-4166-4df0-8a82-bc88ff0f3282",k.Corner_title_card_base="a3e4a924-6c77-4825-926a-9efb414fed2d",k.Corner_title_card_calendar="65f00391-55ce-4ee7-b856-123a4d63917c",k.Corner_title_card_member="fcfd2bb5-ec6e-4f07-beb6-1b25f2c772ec",k.Corner_title_card_tintable="6f06438a-2184-4bae-8a81-6f0480762f60",k.Create_parent_account="2157060c-5361-4a13-a564-cf3c0be73f89",k.CurrencyWeekend_gold_coin="3c45cfa8-a35c-4a5e-bbd4-fc01a6f73d27",k.Dance1icon="1669f0b8-e58a-43ac-80fa-5eaff641031a",k.Db_hammer="3319f075-0acf-4d03-bcfe-abad5590da2e",k.Db_moonwalk="00e1c093-cc0f-4a40-b902-7d2feaac099f",k.Db_runningman="2f3ac52c-27a4-474d-8ebb-5f07a2fc8f2c",k.December_2023_teachers_gift_snow_fox="b42f12ec-e31f-40bd-a381-48f64d58600b",k.December_2024_teacher_gift="0e193b10-328e-40ad-9ce6-38a250efab6e",k.December_2025_teacher_gift="ce1ec2e9-389c-455e-84bc-3987b42b6312",k.December_tt_home_screen_background="f9787e55-62e5-40a3-b98f-ba899560a4ef",k.Default_loading_screen="0f010710-289d-41ff-9861-519b1b4f0a21",k.Dialog_backing="bf67e08f-de01-4ade-bb63-3594bbc3567a",k.DragonOrb_1="0cc2bfa1-9b87-4572-9ac1-b832daff107b",k.DragonOrb_2="f79d74cc-3069-4587-a6ff-72b8ebb03593",k.DragonOrb_3="7a710425-cad8-4020-8f18-ca316963027f",k.DragonOrb_4="9541cc6a-b4e8-4e11-a65b-de6fde686d24",k.Dragon_rift_coming_soon="bbd676b7-72c0-48a7-8b02-9c47f3bea020",k.Dragon_statue_glow="4f32bdc3-5929-4ea6-ac3c-d32dcc0f88d9",k.Dragon_statue_glow_night="c4d787d2-0041-464a-854d-8e588ec2478f",k.EarthWheelBig="0f3c01eb-cf3f-4536-8e96-e0710b771426",k.EarthWheelFrame="267307e9-9389-4d72-a736-e6994ad30bf5",k.EarthWheelPointer="2163b7b2-1eca-4d2a-9ac5-41a5736c515d",k.Effect_accuracy_buff_1_mini="c53d079f-9ab4-4724-840c-7fd3d8cfa41a",k.Effect_accuracy_buff_1_small="449b187a-0212-411e-8aaa-c76281dbf442",k.Effect_accuracy_debuff_1_mini="af6552f5-5727-4eb8-a9a3-7a92ac9c932e",k.Effect_accuracy_debuff_1_small="45b06dee-3da7-481a-8ec0-064dbb877abb",k.Effect_anti_magic_shield_mini="6da1035e-e826-4a32-9a4c-4bde2076031c",k.Effect_anti_magic_shield_small="246f25a8-fcf9-4a64-8008-aa5adaba95b7",k.Effect_astral_absorb_mini="667a5d98-7703-476a-af24-7791ebe81265",k.Effect_astral_absorb_small="59ffa032-4c5c-4924-b8a3-0ab7d388f5d4",k.Effect_astral_buff_1_mini="3243b5f3-6aff-44a9-9458-7b97c1ef7b5e",k.Effect_astral_buff_1_small="d18b5275-3b84-441e-beba-6376088a5664",k.Effect_astral_buff_2_small="3f06d3d6-9a8b-4bf2-84e0-00b5e2bdb3e9",k.Effect_astral_debuff_1_mini="7608919d-9cbd-4464-add9-85a4f57df64e",k.Effect_astral_debuff_1_small="c7839228-7e81-4fae-a35a-2c69a90bb1dc",k.Effect_astral_reflect_mini="1e03b19c-2855-4c1f-a3fc-e13c6305bc3c",k.Effect_astral_reflect_small="79451739-a2da-466d-b7c3-c48199c3eb4c",k.Effect_astral_shield_mini="afbe4e0a-a0d6-45ba-838f-53d966c58266",k.Effect_astral_shield_small="b17d5a37-044e-4621-b4cb-9b054da93f2d",k.Effect_crit_buff_1_mini="fe14460e-0b3f-4ad7-a430-9cce574dfaf3",k.Effect_crit_buff_1_small="924c672a-63ed-4f4b-8cd9-1e9ba6853db2",k.Effect_crit_buff_2_mini="ae4c2715-48b7-409d-8ec2-f5530e75b3e5",k.Effect_crit_buff_2_small="25ea9f42-a8d2-4db4-91c4-6c83857239e8",k.Effect_crit_debuff_1_mini="25eec472-fa3a-4b35-80a1-6aecf6566fbc",k.Effect_crit_debuff_1_small="23eeed3f-bca8-4b16-aa62-7fda81fcce20",k.Effect_crit_never_mini="164cbcda-9720-4c16-ba19-6f26e90a709f",k.Effect_crit_never_small="a9352b7f-cc7a-4944-b139-a469ee9cc25c",k.Effect_defence_buff_1_mini="67bcf47e-cf2c-409a-bdea-57cf8e12297c",k.Effect_defence_buff_1_small="5efb35be-639e-48c7-8af8-8a4a941c1929",k.Effect_defence_debuff_1_mini="44c76791-10d2-4f6c-a13e-276fa346a254",k.Effect_defence_debuff_1_small="0ba5f3dd-6f80-4877-9629-67eda18fd966",k.Effect_equipment_no_mini="3ca1227e-8b7a-426c-8575-ba6d9d1ee8d9",k.Effect_equipment_no_small="c3e3c27c-1897-4f26-8995-ce30d8d3aec4",k.Effect_fire_absorb_mini="eb3331ff-384d-4afa-b129-c727ba410f26",k.Effect_fire_absorb_small="49eab690-f21a-4450-8310-b637b90a7ab4",k.Effect_fire_buff_1_mini="8a9f291f-b7a7-4305-81d8-2deaf9b53d0d",k.Effect_fire_buff_1_small="512ef00f-7c44-46e0-bbce-18c25621b40f",k.Effect_fire_buff_2_small="c1780461-7692-46f5-ab6c-f023991d32c4",k.Effect_fire_debuff_1_mini="daab793b-6e29-45ec-b571-7d3a04d5820b",k.Effect_fire_debuff_1_small="ec686c29-f9a1-4291-ba18-509feaa14eb8",k.Effect_fire_reflect_mini="7d82a9fe-7ff3-4f6f-b069-76a9a8b6f71f",k.Effect_fire_reflect_small="5a72b9dc-0497-491b-ad4d-c711f2eed8d6",k.Effect_health_buff_1_mini="335a2890-8e36-49d8-bfe2-edddc55bf324",k.Effect_health_buff_1_small="e468dcf8-7acd-4cd6-af04-8df2ac183495",k.Effect_health_debuff_1_mini="8a40ea6a-9ef6-4f29-bda7-f66602fd709d",k.Effect_health_debuff_1_small="82ba9a52-a23c-475b-94b4-9aeb963fadb4",k.Effect_health_degenerate_mini="10a06bf8-8cea-4db4-a59d-da27b10f2223",k.Effect_health_degenerate_small="4be9b677-8f83-4e15-8214-0b59ac43a666",k.Effect_health_regenerate_mini="4de04183-3766-4e8d-ac83-f2b1b3f64b70",k.Effect_health_regenerate_small="d5d59df0-297a-4344-9aff-19594b2fc780",k.Effect_health_survive_mini="13e9897a-b6c3-42c6-99f8-69290f37eed6",k.Effect_health_survive_small="d738435e-1279-46f9-a1e7-f94e05ce6d56",k.Effect_ice_absorb_mini="c48afad1-92cb-40ab-b0b0-be746802358a",k.Effect_ice_absorb_small="ec4764f7-5bdb-4f06-b992-6bb5a0980548",k.Effect_ice_buff_1_mini="da3bcb2b-04d8-42c2-b155-e0cae1b74d09",k.Effect_ice_buff_1_small="4b1156cd-68c4-4560-98d0-7478d732abd9",k.Effect_ice_buff_2_small="46e8d016-56e4-424b-adad-7bff139002b4",k.Effect_ice_debuff_1_mini="9280c470-1271-494d-b2e4-135ae962a643",k.Effect_ice_debuff_1_small="b4b86645-a853-4415-b891-2cb825878e05",k.Effect_ice_reflect_mini="b8ba88e1-e814-4d25-978d-0a9972d8c7b2",k.Effect_ice_reflect_small="a001975b-e6e0-40b9-aa9c-12775f2c8f09",k.Effect_pets_no_1_mini="2b6a451d-33a8-4b30-92c8-26274c6f80a3",k.Effect_pets_no_1_small="744f972c-69fe-48ef-85b8-d095f541d751",k.Effect_pets_no_2_mini="e06f607f-042e-43f3-a54b-8599e17f4a2b",k.Effect_pets_no_2_small="492402a3-64ac-4da4-8c11-27629178e7ba",k.Effect_pets_no_3_mini="ea8dd1ca-867c-41cb-a066-271ed53aae9a",k.Effect_pets_no_3_small="a6872be5-bb08-4e28-aac5-82e3bccdd1d2",k.Effect_pets_no_4_mini="3e5b7454-86ff-4f28-b8e0-e7c05cff3c96",k.Effect_pets_no_4_small="888364b0-bec9-4f4c-841f-0c68b5355c41",k.Effect_pets_no_5_mini="8bd894e2-a875-4c90-86df-dff8f8ae65c2",k.Effect_pets_no_5_small="fe0720aa-f362-4c36-ab49-5937a45194e7",k.Effect_pets_no_astral_mini="b8d7e991-f4e3-4c2a-9ef4-6b3c111e957c",k.Effect_pets_no_astral_small="9bad211f-56ab-4460-8ce1-39e0e48f60c6",k.Effect_pets_no_fire_mini="6c1e288c-de01-422b-820f-eb6eafb23875",k.Effect_pets_no_fire_small="75d13b06-2726-42d7-ae0f-5f05398bc767",k.Effect_pets_no_ice_mini="66832e72-dc7d-444d-930d-58d99cd121a2",k.Effect_pets_no_ice_small="cf0ab767-caa4-45f7-a977-09332f459b1c",k.Effect_pets_no_physical_mini="3f27ff6e-8ce4-4f5b-a9d7-e95b9212809a",k.Effect_pets_no_physical_small="b95780f0-fa45-4613-83f2-970c6fb388c2",k.Effect_pets_no_plant_mini="eebf8ceb-32f6-4a26-a427-ee7473e297e3",k.Effect_pets_no_plant_small="946d8a2f-d32b-401e-ace6-c338a2ab71aa",k.Effect_pets_no_shadow_mini="773a68cb-b248-4004-acc9-eaf0787f130b",k.Effect_pets_no_shadow_small="da618446-c36f-4634-9d29-261b3258a94f",k.Effect_pets_no_storm_mini="57dcc553-b727-4220-a4c3-475a5c97f914",k.Effect_pets_no_storm_small="4b79c153-3900-4901-a51c-d80240545d99",k.Effect_pets_no_water_mini="fa093e33-93ae-4ca7-9d7d-8b96266abbea",k.Effect_pets_no_water_small="e701688e-5044-4e8e-89e6-29f8345ff7f4",k.Effect_physical_absorb_mini="9d821334-90c9-4199-8e9f-327aa11a1915",k.Effect_physical_absorb_small="bc367d86-1e82-4faf-b7f7-cacf9a7a44d9",k.Effect_physical_buff_1_mini="ff510a5a-6610-474a-9f48-1dfa7339c7a2",k.Effect_physical_buff_1_small="25f74665-0058-472a-b074-3e6bc23000b2",k.Effect_physical_buff_2_small="303251c3-cb6f-407c-bd67-84949dc761c3",k.Effect_physical_debuff_1_mini="57870911-4e5b-436d-b7c8-ed9c480fc6eb",k.Effect_physical_debuff_1_small="0d4a7fc6-69ce-48d9-b924-d17a1eb5c6df",k.Effect_physical_reflect_mini="b3e2befa-048e-498a-9a39-a6715a54574b",k.Effect_physical_reflect_small="d14992f3-fd4a-48a8-b9cc-3a1e2e193e23",k.Effect_plant_absorb_mini="aad5a902-dcb7-4b67-89ff-19daf9c80be0",k.Effect_plant_absorb_small="2618205c-25ac-47c9-a9df-bb04328f4a48",k.Effect_plant_buff_1_mini="5f4bc1e9-cf78-4e2e-a566-267afc5c5521",k.Effect_plant_buff_1_small="283883af-634b-4fb2-872f-fb07cad16bbe",k.Effect_plant_buff_2_small="a8f38ef9-1b3f-4707-b9ae-388e9ceadcb6",k.Effect_plant_debuff_1_mini="d115b170-16ae-4a94-8304-7aac57959e8b",k.Effect_plant_debuff_1_small="920aab75-b9ba-4dfb-935a-be0b9ea4d9f3",k.Effect_plant_reflect_mini="8bde27bb-528f-438c-b9c5-b09528d89489",k.Effect_plant_reflect_small="2fd5f267-63e6-48ae-9540-6c6ce4e00c7c",k.Effect_power_buff_1_mini="dbbe190a-c51b-470f-a453-87796b32c8fe",k.Effect_power_buff_1_small="abf367ee-f194-42ec-a887-df3bf3740655",k.Effect_power_debuff_1_mini="7edf25d1-28bc-47dd-a90f-f7927f6c4c05",k.Effect_power_debuff_1_small="8702f2ed-2777-4aef-b278-bc0e11ef30e2",k.Effect_revive_mini="cb8c7dc3-3dbd-4fec-bf43-11b108e7c944",k.Effect_revive_small="03f5add4-5118-4eef-ac48-ef73c31391fd",k.Effect_shadow_absorb_mini="912f056a-5e46-43d9-a189-1daef2de1f64",k.Effect_shadow_absorb_small="396a63ba-aba5-4765-941b-bcdb30c6e8fd",k.Effect_shadow_buff_1_mini="49b8d6f4-6d53-474b-94b8-f7b3201d216f",k.Effect_shadow_buff_1_small="1192b17f-67aa-4de5-904b-e12ed3fe8304",k.Effect_shadow_buff_2_small="c24fdeee-0f0c-4a17-a4fc-b839cc59f65b",k.Effect_shadow_debuff_1_mini="f6a8f99b-561c-4fbe-8409-a3b0429f63cb",k.Effect_shadow_debuff_1_small="e81e6cb0-c295-4355-a21c-c0cdc7f4a1fb",k.Effect_shadow_form_mini="bea672fe-1ba8-4a84-94f2-de64976aa334",k.Effect_shadow_form_small="5a3d5b03-05d1-4999-8bed-962d79906be9",k.Effect_shadow_reflect_mini="a788e431-662b-4548-8010-3dcea6355c50",k.Effect_shadow_reflect_small="99e8824f-b915-456f-9dd2-d9fbb42801ab",k.Effect_speed_buff_1_mini="59eafd49-5656-4e8c-935a-26ea04fdbb04",k.Effect_speed_buff_1_small="050a7873-f865-4db1-a745-5dcbd5dab36a",k.Effect_speed_debuff_1_mini="218d7e46-522e-4a2b-8051-a82f4eca63bd",k.Effect_speed_debuff_1_small="79eafb60-318e-4d81-b614-f79466695593",k.Effect_spell_cooldown_debuff_mini="133e978f-64f0-4342-ae8c-01ce773b277b",k.Effect_spell_cooldown_debuff_small="86515e2c-11fa-40a4-891d-a543ea7b263f",k.Effect_spell_random_mini="482f8804-212a-42e8-8955-68b71c104c90",k.Effect_spell_random_small="6d4f9612-61ff-4f01-ac94-00941970e39e",k.Effect_storm_absorb_mini="7a9dfe5a-ee43-4a62-9eb7-bb9c8d9426c2",k.Effect_storm_absorb_small="3d19dcb8-cb05-4663-ad44-a75d78bda149",k.Effect_storm_buff_1_mini="f56a5c25-f448-4a98-9d7e-52c11b554bc2",k.Effect_storm_buff_1_small="32777f2e-81fa-4551-a3ee-fe44332d11dc",k.Effect_storm_buff_2_small="dbf20643-8add-4574-b2e6-e153258850b6",k.Effect_storm_debuff_1_mini="40b63572-2591-4a12-a186-efb8f48d0b22",k.Effect_storm_debuff_1_small="4a3d2242-0fa3-453b-835b-6319d30ff983",k.Effect_storm_reflect_mini="27e959e2-b76f-436e-aa1b-e06ae086fac7",k.Effect_storm_reflect_small="80d4f71b-a85b-4688-b67d-271dffe1d37e",k.Effect_timed_mini="ab1d47c8-d0a3-4f50-b17e-65ba0ec55590",k.Effect_timed_small="de182b75-1187-4348-a601-ec0531730882",k.Effect_water_absorb_mini="416094e3-28ad-41a8-923f-88e09b96fe3c",k.Effect_water_absorb_small="54f24470-6e5f-4a58-b9a6-ed94eb6caa3e",k.Effect_water_buff_1_mini="0ffce8d4-5d0e-49f4-be40-92ceb5a80338",k.Effect_water_buff_1_small="e02da00e-f978-4097-a458-d6fea0e335a9",k.Effect_water_buff_2_small="be8423c7-473c-432b-b775-880224d0e479",k.Effect_water_debuff_1_mini="372eb1a1-142e-4048-b585-fd25c5070957",k.Effect_water_debuff_1_small="b4c992dd-f982-4ac5-9238-83b667e63e0c",k.Effect_water_reflect_mini="779eb6a1-cb2b-42b3-8a2d-18339eba194a",k.Effect_water_reflect_small="c41ec3dd-f4f0-416a-af98-40ad7782d669",k.Emerald_large_active="dc1229e3-08b9-4a29-a526-16cf1552b437",k.Emerald_large_default="77908517-e6df-4550-8752-ca90c32b9c3d",k.Emerald_large_hover="131e66f0-006d-4255-bd73-12b7b8b30bb1",k.End_frame_icon_home="eb03215d-a106-4485-bc46-21ecae5cb755",k.End_frame_icon_membership="34ee8b41-175c-4d77-adcb-f225acf7b65b",k.Existing_member_tooltip="246f75c0-6b11-44fc-a1c4-4a2dff131122",k.Face_01="c27e881a-b3d8-4e27-a5e6-56d5ba600104",k.Face_02="818ecd67-d4cf-4e6a-a7ff-53c347c1792e",k.FeaturedPet_HUD_BG_Astral="ac9256b8-93d7-4fe6-930b-a6c7f0f64f38",k.FeaturedPet_HUD_BG_Fire="afcec615-03f3-4d71-80b4-3595e1c37550",k.FeaturedPet_HUD_BG_Ice="a3cb7c55-b6f3-4a38-aa58-5eac35042ad9",k.FeaturedPet_HUD_BG_Physical="1489e248-ba17-4c57-8f8c-33aee57ad041",k.FeaturedPet_HUD_BG_Plant="f9b8b02d-9c39-46e8-b464-93f108194001",k.FeaturedPet_HUD_BG_Shadow="d179156d-d4bd-4ade-8dc7-bbb6649c217a",k.FeaturedPet_HUD_BG_Storm="ba735928-07e4-4e52-8d9b-8a2e1a3ddb8e",k.FeaturedPet_HUD_BG_Water="bf392a71-9c02-4fc2-bc8c-c46c8a07741b",k.FeaturedPet_HUD_FG="54355e9a-386d-4ae9-a2a2-89d489c334ae",k.February_2024_teacher_gift="d4bc3b8e-7873-46a3-b38f-88c8b8f7895d",k.February_2025_teacher_gift="54482e83-53a0-4cbd-83a7-2d4647f9f392",k.February_2025_tt_home_screen_background="569b7cf2-43af-4276-85a5-581109336e0d",k.February_2026_teacher_gift="7640b268-6bb3-44ec-8f59-9b2e3499ce25",k.Fill_bundle_gold="bb2b22e7-a7ff-450f-b8bd-1a2fd0773201",k.Fill_plusmember_background="d6c921b0-3112-4393-95e4-17572113f067",k.Fill_ultramember_background_full="7d2073ee-6e20-4f16-9303-812a08ecc240",k.Firefly_intro_1="0d7e5e8d-7c55-4167-9efc-4c7e508afc60",k.Firefly_intro_2="56acca89-eab7-4917-a4c9-4a5593c5b7bc",k.Firefly_intro_3="acee2efb-6c0f-4069-95dd-56084cc7681f",k.Floatling_limiter_popup="98e3961f-fe37-4adb-9f27-40fe8ecd8215",k.Fog_1="bda15c51-89f7-4b8a-b3e4-4c7c1d71a92a",k.Frame_difficulty_expert="ad53b50a-7f5d-425a-81f2-c5e5c518dbe0",k.Frame_difficulty_hard="038ff741-5825-4a15-9be5-104a502f09ed",k.Game_Splash_Page="52edeca5-8047-4647-ac11-36e1c34c0bc4",k.Game_island_launch_modal="27b9ed9f-1e62-451b-aa6e-54b903635867",k.Game_mode_confirmation="c816d079-8b34-4db6-9907-e5cea39cf735",k.Gate_moon_open="82615ece-6f17-4723-b4c1-d383c450c2e8",k.Gift_reward="181ac118-48c3-43f0-84fd-43cfaf4758be",k.Giftbox_state_challenges_shadow="b45a2261-334e-434b-b80e-237fe4e4e7de",k.Gold_medium_active="25bf927e-7a6f-49bd-9b41-be0f6d72a9a4",k.Gold_medium_default="6c525afe-f80f-4dda-a684-1cef6ae685bf",k.Gold_medium_hover="4fd0c163-5042-420e-93ab-e5b6f5a98ead",k.Golden_page="fd4e0676-1293-4c0f-941b-695089d257e6",k.HUD_backing_no_shadow="3fdc0762-9b3c-4d2d-b3e6-c0fda25b4d8d",k.Highlight_burst="56307e29-713e-4415-b6e4-e039c1acf9e2",k.Holiday_challenge_2024_reward="8d02ab5d-2787-4eeb-a006-f45046130bf7",k.Horizontal_dorm_1="944ea85e-01d0-4782-9e7f-7efd51156471",k.Horizontal_dorm_10="934f58fd-ecea-4eaa-8f75-8c578e51a018",k.Horizontal_dorm_100="13214aa8-db57-41be-ad68-c4c430dabcc8",k.Horizontal_dorm_101="00231d99-199b-4b00-9b8e-c0b306025550",k.Horizontal_dorm_102="3183d829-000c-4326-b8e5-dde2f01a0762",k.Horizontal_dorm_108="97204e47-138b-4aa5-a6ec-3c99b2288b3a",k.Horizontal_dorm_109="16f2337d-632e-432d-ac79-ca61dd783df7",k.Horizontal_dorm_11="b4caa685-6889-40a0-b890-a52afd706616",k.Horizontal_dorm_113="1ae19a5c-355a-4a23-a9de-c7d191a45c4a",k.Horizontal_dorm_114="5c1bbc2d-ed08-4aef-8b71-d2cfd964d9ff",k.Horizontal_dorm_115="279dd049-faf7-4b1f-b52c-d1e9572fd1d5",k.Horizontal_dorm_117="d6739fa7-277a-4b15-83e4-4971cb86ee0e",k.Horizontal_dorm_118="5cf29244-2091-42ac-90c2-a16fc72a1773",k.Horizontal_dorm_12="087ea007-4dcd-4feb-9668-a907ef082878",k.Horizontal_dorm_120="6f162c6f-0177-4fd6-8869-04d59d6a5020",k.Horizontal_dorm_123="0c67b5bd-7494-471b-a1d1-4555fcc8aa23",k.Horizontal_dorm_124="c5062637-15f6-4eab-b6db-b1b859ebc5a5",k.Horizontal_dorm_126="4f117952-3559-444a-a0b7-43909fa99e3a",k.Horizontal_dorm_127="bb9d52f8-bf29-48cd-85c7-3f3725b15b0c",k.Horizontal_dorm_128="cf5aad1a-94f4-4216-a9eb-c3299f7e33f7",k.Horizontal_dorm_129="9113044a-7be4-4c17-80dc-c081da64ffd1",k.Horizontal_dorm_13="489961a2-8ec7-454f-81ff-ce1f3cdcaa55",k.Horizontal_dorm_130="0303923d-c6b3-4304-a117-fd52d02a0b5c",k.Horizontal_dorm_131="a1c16019-5bb1-42b2-9cfc-86874fd9ea1c",k.Horizontal_dorm_133="8f323636-a90d-42f2-86f7-462cb8411c33",k.Horizontal_dorm_138="e57c5d6f-3697-44c3-85ea-51affa96d9e3",k.Horizontal_dorm_139="441002e5-da3d-4939-8839-998588cf5f35",k.Horizontal_dorm_141="821d0133-8229-4376-8296-a97f406bb2b2",k.Horizontal_dorm_143="86e1db6e-117f-4f1b-8a73-80d5fee478f0",k.Horizontal_dorm_144="778eff4e-bd22-443e-a8c9-a0855ea8f7ad",k.Horizontal_dorm_147="09cad8d8-e2ea-445a-b926-1db919b41e2f",k.Horizontal_dorm_15="ec7d1f1f-cc37-4614-ac10-a4be1becb17b",k.Horizontal_dorm_153="728537f6-3144-4802-a32b-8b2859f0b845",k.Horizontal_dorm_154="2d9148d0-cc63-4758-bff1-a466957ed1e3",k.Horizontal_dorm_156="ed7a9ab7-e2d4-4316-9494-2e2cb83da6fb",k.Horizontal_dorm_157="568baed3-a421-48f5-9af8-5cbc0bc0d085",k.Horizontal_dorm_16="9c1c8578-a3c2-46a6-8369-6e657c8feb02",k.Horizontal_dorm_160="95a84f46-d06d-4dca-93a9-d5171021c844",k.Horizontal_dorm_162="2cdbd242-739f-4f4d-a368-70a304dc3102",k.Horizontal_dorm_165="a9e93063-564b-431e-81f5-970b7b402b2c",k.Horizontal_dorm_166="1b403a36-c008-4ed0-badc-e03df6046609",k.Horizontal_dorm_167="590f0388-a280-4de3-a5dd-ba2e545c4c91",k.Horizontal_dorm_17="50975b45-8108-4ae0-bcee-04e74acc749d",k.Horizontal_dorm_170="bc985b1e-941e-4c60-9a2c-1ce882279e20",k.Horizontal_dorm_173="17f15edb-c73f-4d3a-b4e2-a9eb4d80b995",k.Horizontal_dorm_174="d90c5cb5-c895-41a0-adeb-a57041f8e5c1",k.Horizontal_dorm_175="a4ad755a-baf2-41c5-82a1-59c900ef0c16",k.Horizontal_dorm_177="0f4f1b7c-6197-4de2-99f1-2fbeb7fad0f5",k.Horizontal_dorm_178="16c29e39-c86e-49b4-828f-29417336ceb3",k.Horizontal_dorm_179="8cf2dfae-8c5a-4691-bfa3-5bbcd551c068",k.Horizontal_dorm_180="48837a0c-281d-49c5-9340-1bc8660ae63a",k.Horizontal_dorm_181="f8dd5ea4-7302-48cd-8222-e184041319f2",k.Horizontal_dorm_182="b3c7380d-cc12-43fe-88e6-4c36ec8c9dcc",k.Horizontal_dorm_183="7e0d082e-aea1-487a-936a-5403e0240779",k.Horizontal_dorm_186="b833cd8a-03f7-4603-9c01-fa3b7762b381",k.Horizontal_dorm_188="a88ba7dd-17f3-4b78-82fd-50600fd4d0b4",k.Horizontal_dorm_189="37ee7b89-f1bd-40d0-865a-f0aeb2c84897",k.Horizontal_dorm_191="1affe23a-eebc-4f68-8f47-3241bf12d490",k.Horizontal_dorm_192="5dbc2f3b-8250-4817-8597-a453c2a2ae81",k.Horizontal_dorm_193="c4e9a75d-074d-4bf9-84c2-4493672e6eb1",k.Horizontal_dorm_194="1ddaef82-9ad6-443c-ac72-dbbed5b1fd9f",k.Horizontal_dorm_195="c8402663-2860-427c-888f-fc2a138a7205",k.Horizontal_dorm_196="1ed01e83-4c6a-49e2-8b1b-a3f39d0db73d",k.Horizontal_dorm_197="effbed23-1d41-4acc-8e2a-75700bb24930",k.Horizontal_dorm_198="dc1a5c62-ac5b-4c77-800e-8581b4f015b9",k.Horizontal_dorm_199="0e8fea37-5d40-4835-b138-ee790d9465ea",k.Horizontal_dorm_2="d1f7b044-ea8b-4859-af5e-da2329ab5eb2",k.Horizontal_dorm_20="f02deb11-bfe5-488d-8cde-9828a1eedb8b",k.Horizontal_dorm_203="f555e0be-73f7-42af-8d39-58865a7810e2",k.Horizontal_dorm_205="842c7b98-0d03-4e26-82c5-54c44330e1b5",k.Horizontal_dorm_206="61539ddd-58cc-4663-a9d4-69d37f1d68ba",k.Horizontal_dorm_207="e3038562-2a32-4424-8268-f8d3f84f4f41",k.Horizontal_dorm_208="c64cf382-b3ca-4d68-955f-103fd8f9e937",k.Horizontal_dorm_209="977a5441-6a35-4913-a140-b8338b6df4fa",k.Horizontal_dorm_210="60282ccd-b943-4108-97cc-f19ba5feee0b",k.Horizontal_dorm_211="63dc1d35-36df-47b4-bae6-e0dd41b0a760",k.Horizontal_dorm_214="17a528be-5f8a-45c3-9ead-7f584c1fc2f4",k.Horizontal_dorm_215="5d3c4b87-f573-4023-a2f8-1692805c2fa8",k.Horizontal_dorm_216="0b993753-fc57-45ef-b41f-30c2deaa28f3",k.Horizontal_dorm_218="f5515d36-a21f-448b-8a21-41c921f0f676",k.Horizontal_dorm_219="571e3268-1227-4b59-8720-97fef0d1ad3a",k.Horizontal_dorm_220="267d2673-3107-4199-a7dd-6b7e0c681e65",k.Horizontal_dorm_221="cb2d8ced-a752-415a-aaf3-cb807e4b3ca6",k.Horizontal_dorm_222="c2c794bb-cf87-4c7d-923a-07d34c92e24e",k.Horizontal_dorm_223="3439b58e-80d0-4a9c-9caf-afe293cdc062",k.Horizontal_dorm_224="bd80dae5-2695-49ba-acbe-c373ff5b2d8c",k.Horizontal_dorm_225="b0999e4b-822f-41d6-8557-6a14dc738c5c",k.Horizontal_dorm_226="7eafd8b9-3d8b-40c4-9df6-2168fe232755",k.Horizontal_dorm_227="f11e73b2-d3ed-4eb7-a615-f0609c835a0e",k.Horizontal_dorm_229="47f220d6-ff63-463d-ab50-5f856ef968d4",k.Horizontal_dorm_23="b605d0c0-a9ad-4777-b635-1be2376dbd99",k.Horizontal_dorm_230="3d4e1303-eb6b-4aa6-a05d-40c4797e190b",k.Horizontal_dorm_231="7ed8c998-5c40-41b2-a9ae-847b47df7b54",k.Horizontal_dorm_232="7066f56c-4d98-40fb-8620-e6e2793c28de",k.Horizontal_dorm_234="54270e2b-ab1d-4ac7-ad93-5c339259a99f",k.Horizontal_dorm_238="b1331636-a97d-47b6-8e45-5764565dbe73",k.Horizontal_dorm_239="904146fa-0e25-4848-9a50-c5daff7e5cfe",k.Horizontal_dorm_240="ad438726-5981-48f1-bd9e-305063233309",k.Horizontal_dorm_242="1f05e7c7-054b-4fd9-b46a-ff5306a1b1cc",k.Horizontal_dorm_243="4e45d50b-92f5-4604-a831-d3cd82e387e9",k.Horizontal_dorm_244="6a8b651b-159c-4b98-ba35-8bac72db5ad2",k.Horizontal_dorm_245="d3e6af8d-9133-47c4-bd32-5237b5cd97f3",k.Horizontal_dorm_252="bac168a3-ef63-4f15-88be-c8e8ed388e3e",k.Horizontal_dorm_255="80cb7765-911b-4064-a635-a523683a0b82",k.Horizontal_dorm_256="716f3a4e-3d77-4fe8-b0cf-2664ae9ee7ef",k.Horizontal_dorm_257="1a9d46c4-bfd1-416f-aa44-28e13a2a178c",k.Horizontal_dorm_258="89f7cbc2-31e9-4cb0-909a-7e0c6808f007",k.Horizontal_dorm_259="9b77088a-717f-4bd0-a1df-36827e473d7e",k.Horizontal_dorm_260="b407056a-e1e6-4233-a30a-eff3cc3fd4a2",k.Horizontal_dorm_261="d6011a9e-447b-4762-9724-d6ef10ebb60e",k.Horizontal_dorm_262="5b3fbd74-6a86-4b8e-add3-c434b7d83a5e",k.Horizontal_dorm_263="91ac273b-3f2b-444b-9540-acad56257d7f",k.Horizontal_dorm_264="d1743bfd-b68a-4f8c-9d9b-4085e57085cb",k.Horizontal_dorm_265="da29f400-1431-4652-b973-d31145eeabe2",k.Horizontal_dorm_266="758339ba-dae0-4bfa-8386-eb9810e2a43e",k.Horizontal_dorm_267="c887bac4-d4ee-4a63-9e9d-207c3f2c8420",k.Horizontal_dorm_268="a55cf486-c143-4406-a132-59386d3d03b6",k.Horizontal_dorm_27="fe46f106-e06e-4e56-97aa-1c64fbcc1e8b",k.Horizontal_dorm_274="02de4e51-c626-4a4f-80e5-402331b19d58",k.Horizontal_dorm_277="9801e032-9d91-4f3b-8d3f-54e1373c81c2",k.Horizontal_dorm_278="68f5bca2-3ee7-41c3-aaad-937e300394c7",k.Horizontal_dorm_279="6964b497-630b-44ba-b93e-7a4c20818638",k.Horizontal_dorm_28="7f8ea2fe-63a0-4c2c-bd9a-742bd79e4b90",k.Horizontal_dorm_280="47f05fcd-8413-4a88-9d00-6e04912ccd21",k.Horizontal_dorm_281="175cb876-a722-4934-8f97-525a271f4c62",k.Horizontal_dorm_282="fd64a898-6c3b-493f-a70a-a618395e29f8",k.Horizontal_dorm_283="fcf1cb80-65ef-413c-8ae5-075a1e55c537",k.Horizontal_dorm_285="2082c827-b38f-4846-8190-d5011b828475",k.Horizontal_dorm_286="8afe42c4-00c4-4fba-962e-cdcaf27eb59b",k.Horizontal_dorm_290="41207e4a-ca39-4757-b224-08c12f9a7e8b",k.Horizontal_dorm_297="d8b9f48d-b7f2-48fb-8c4b-30d4884fb6e3",k.Horizontal_dorm_298="1a2a626b-3b5c-4fdf-ab2d-ab3f1b096c42",k.Horizontal_dorm_299="55898a86-4dcd-4a89-88d6-bc2901658c40",k.Horizontal_dorm_3="f4f80d4f-804e-4b51-9e73-91aa7b83165f",k.Horizontal_dorm_34="be9419d4-490f-4adb-b377-b277ddc90b96",k.Horizontal_dorm_40="2567e0b5-d3ad-4ee4-a083-a02d58bec384",k.Horizontal_dorm_45="5fa04498-0fe4-4cb8-9a03-a53e831c75ba",k.Horizontal_dorm_49="a495ee8d-8151-49d8-a835-3ab3cdf9fcd4",k.Horizontal_dorm_50="779991d4-6f3c-4f98-9a91-eb13789c8cf1",k.Horizontal_dorm_51="b0114f95-dc4e-4239-8434-a36f540e0fde",k.Horizontal_dorm_52="440391d5-d582-4568-8464-0793db60a236",k.Horizontal_dorm_54="3beb9f5f-909b-4830-9be1-31540c50d1c2",k.Horizontal_dorm_56="e2671f34-2ad8-4d2e-9a22-79544205d4bc",k.Horizontal_dorm_61="1d87cba7-b31b-47ab-90bb-f74b6ab5c913",k.Horizontal_dorm_62="7df441e2-706f-4afb-831a-35d8f6410dce",k.Horizontal_dorm_64="9c8ce85f-83f4-43f9-87c7-a6a93393953a",k.Horizontal_dorm_65="ab805745-7bb4-44af-b8a2-bdef3e153d90",k.Horizontal_dorm_66="9a8bcb6a-178f-49b8-b27a-0a3f4fba909d",k.Horizontal_dorm_67="8f5390b9-10fd-42c6-af7d-e50c888a521f",k.Horizontal_dorm_68="efd4f13c-982a-4f03-be5e-ba1ecbd74e02",k.Horizontal_dorm_69="e41f9160-40e6-4eae-a318-53cf14ef0b0e",k.Horizontal_dorm_70="c495bba3-56de-401f-a312-58563252f2be",k.Horizontal_dorm_71="af9e4ba7-92b6-4e9f-9c4e-8370a322db6d",k.Horizontal_dorm_72="cf5f0af7-1e03-432b-9e73-8e96e131725a",k.Horizontal_dorm_74="208ea701-8c1e-4b22-b6c9-60891bd25f57",k.Horizontal_dorm_75="40c4de48-b4d8-496b-bc4f-fc62d9cc809b",k.Horizontal_dorm_76="93832f84-b7a7-4e67-b403-d87f142b9c60",k.Horizontal_dorm_77="bb74bc98-ec9a-4173-a1f7-e538726b5cd5",k.Horizontal_dorm_78="244011d8-4ade-4f78-a091-f4f3e1bc3595",k.Horizontal_dorm_80="bfdd0168-a940-442f-8f1f-2586e6d48c0c",k.Horizontal_dorm_81="7b568b02-986d-4158-8947-450e69fbbe63",k.Horizontal_dorm_82="632d2b88-c4b7-4f15-a194-b0943df580eb",k.Horizontal_dorm_83="c10bcdb5-e7d0-42e7-962a-884e69c0750d",k.Horizontal_dorm_85="79effc72-97c8-48c7-9ad8-403e3bd69c28",k.Horizontal_dorm_87="efaf9d94-f0c4-4d36-a5f9-653085b1fe64",k.Horizontal_dorm_89="0f76710c-ad30-42b0-bb43-7c61c6779d8f",k.Horizontal_dorm_92="53a8041b-81be-4771-9df3-9db31e4ca038",k.Horizontal_dorm_95="53d78e92-2d61-4948-81dc-6a7cbd9d8b82",k.Horizontal_dorm_97="b9176e85-e6ec-4bc0-870f-24f140d30b0b",k.Horizontal_dorm_98="332e3c65-ef94-427a-bb7d-a2e76b93f7bc",k.Horizontal_dorm_99="ac74b874-b0ca-462e-bae6-902307dba629",k.House_all="8329a62a-f931-4c62-9068-ae0949d552fe",k.House_design="68ea7a1b-a783-4704-804c-b35aa009a2c7",k.House_lock="a555c608-92c6-4390-a63c-424c44b859b8",k.House_unlock="461db3e8-ab08-4a4f-8694-66a698c8b683",k.Howard_cornelius_portrait="2117cdc5-e324-43f9-8795-64f08208fbcd",k.Hud_after_school="a4b76834-dd0e-49df-984a-d33fe014f383",k.Hud_after_school_circle="9f3fcd8e-abc8-4138-a48d-94ccf0680f29",k.Hud_backpack="932d246b-c406-4781-81dc-f4761ceb97b9",k.Hud_burger="b074e226-1fa6-4f14-bbf2-8668776b21ac",k.Hud_button_basic="c409ff1b-2724-42dc-b3c2-8ce863462b8d",k.Hud_button_basic_noshadow="cdb6a1b3-13c0-49e5-8188-26b3fae2b1e6",k.Hud_button_basic_noshadow_pointer="b49e34ad-5d58-4572-8a3f-0bb160196023",k.Hud_button_disabled="5bb8ae7d-2f3f-410a-a0cf-23e4a692595b",k.Hud_button_hover="213c588e-235e-4ab4-801a-f3a892edeb24",k.Hud_button_pressed="c64ce51a-2d0c-42a3-be18-964cd82f900b",k.Hud_calendar="a62096ab-ae16-4cc4-bf92-2dfeaad9e1f6",k.Hud_chat="097bf81a-9354-4837-a7fd-5d07463e8809",k.Hud_core_membership="5c233329-4c2d-4589-a7b5-be79087e7e16",k.Hud_daily_goals="b5db5845-13c6-4ec1-92cb-e81cd3b1e8ad",k.Hud_duels="c67d47dd-322d-45eb-b3dd-175bf71e53ef",k.Hud_free_membership="66eec2c1-e4df-409c-8a68-7c581ce2bb05",k.Hud_friends="ab57214a-ee29-4af9-bff7-a9b5c133e730",k.Hud_gift_no_shadow="a1af25aa-ab1d-47c6-8840-66d1e860013d",k.Hud_house_edit="a088c398-06c5-4899-87d0-a72bbd2f454d",k.Hud_house_exit="2949c8c6-3d9c-4bef-b434-d9d75dfab75b",k.Hud_house_info="decfb13a-a7ee-4d42-82aa-b3a41cd29741",k.Hud_house_locked="ea98ef3c-7d8d-4a99-8edc-47bcabd72052",k.Hud_house_unlocked="23550ac0-65c3-423c-b94f-5b24175b436e",k.Hud_leaderboard="123a9839-b689-4fa8-bf6c-4cb850c18ec6",k.Hud_mail="371de630-5798-45cf-a7c4-50a713c7f1a3",k.Hud_map="6b825a7e-fe52-4bb5-82f0-cd1b448b4eb0",k.Hud_moonlightfest="d8688b4f-a712-4edf-b481-b1f4cf93cad7",k.Hud_parent_gifts="eb9a2046-45c3-4f78-a6ae-71df128c85ce",k.Hud_parent_gifts_circle="922ac122-1c06-45c0-89e8-452b7474ca3a",k.Hud_pet_center="df157576-5715-4af1-8f6c-b30a3388bd76",k.Hud_pet_list="81e04a02-9792-4886-b513-0ae5307e6642",k.Hud_pets="2bd3e716-979f-4018-8407-d959230736fb",k.Hud_plus_membership="5a68a494-0005-4063-b9ac-826a6b005dad",k.Hud_pumpkinfest="21dc2c6c-5441-4b1d-8e7a-a4541a3234a4",k.Hud_rifts="7c85a67b-dd5f-441d-a988-63a9fc186f58",k.Hud_secondary_button_hover="56d1d4aa-6021-49d6-be58-eeb90e6469b5",k.Hud_secondary_chat="5bf2c427-cd0e-4cac-a5e9-4eaf4603f593",k.Hud_secondary_mail="3b07065d-6123-412d-b793-a6d8897342e9",k.Hud_secondary_settings="650f430d-db07-434a-9513-5234e64adc00",k.Hud_secondary_social="b24f9c77-752a-413d-b0c0-b1695eea6de3",k.Hud_secondary_wizard_watch="ad99cc89-6912-4fb7-949b-f5a3f09bfc26",k.Hud_settings="234ca838-35f1-49fe-82f2-bf382624537d",k.Hud_shop="d4dc7070-8a0c-47ba-a2ad-36de33ab6531",k.Hud_speechbubble="7259de72-0aeb-422d-b16c-6c55b8eed073",k.Hud_speechbubble_wooden_tail="39eee527-fbeb-4e21-ab17-5170bc41414d",k.Hud_springfest="430decbd-3bdc-45d0-b918-4bddfa51f3d9",k.Hud_starlight="3127572c-d12d-489c-ba30-e9c11c14043c",k.Hud_starter_pack="790b98f1-8863-4765-b87d-0dda2c364772",k.Hud_state_challenge="7c572625-7025-47a3-9b4f-e7cf6093556f",k.Hud_state_challenges="60c5cf92-41a2-41d9-bbff-93803d411c63",k.Hud_summerfest="b39f5edc-ad0d-424a-ac87-83a220db0354",k.Hud_treasure_track="5164fbfe-17ee-4def-9157-678de69a623a",k.Hud_treasure_track_big="aa6673a2-b225-4046-be6e-df593a578be9",k.Hud_ultra_membership="5991c63f-4d9b-459a-9cb6-317bff008268",k.Hud_winterfest="20b8c197-2f21-43d6-a4a1-cec9e216bfed",k.Hud_wizard_dash="db3fe015-bc76-4737-8550-68bce8ec631c",k.Hud_wizard_watch="dea91059-3077-4589-9dcc-47b227862a7a",k.Hype_ww_thumbnail_1="9b375c1d-12b2-4f01-aed6-fa3a8f9f9284",k.Hype_ww_thumbnail_2="17d8d73e-e2d7-444e-8794-840ad8559293",k.Hype_ww_thumbnail_3="ab7683bb-1cd9-407d-84ac-cb3a5355dd4f",k.Ice_tower_beta="476a3de5-cb74-47c3-be89-43b8505bf84d",k.Icon_badge_value="5cb18513-069c-4570-9360-87269b91700e",k.Icon_boots_1="3331d7af-ef8f-4056-b85f-60624648b810",k.Icon_boots_10="2c0e8a9a-a67c-40ec-bb14-6810faf3b324",k.Icon_boots_102="6d35ac85-e458-4a8a-81bb-8c0c75304f40",k.Icon_boots_105="71194da5-18c8-4bdd-b4bd-1d1ba8e52771",k.Icon_boots_107="803b8e04-fbad-42b7-9760-aec7916f56a9",k.Icon_boots_108="77add4b7-da51-4bae-b81c-1736865fbe82",k.Icon_boots_109="635106c2-09c7-4778-8887-932be294392e",k.Icon_boots_11="bfec3231-b023-4841-ae59-09c3887e7c32",k.Icon_boots_111="79007e87-8669-4c8f-8386-e97d6ebd62c1",k.Icon_boots_112="dfb3733e-604a-450e-856f-acd34e5e2ddd",k.Icon_boots_113="83cdd5d7-ef62-43cb-ab96-162cdcdb145f",k.Icon_boots_115="b111173b-9cba-4bf0-a17b-decc32adc383",k.Icon_boots_116="187350d1-2c6d-447b-bcb5-84ff3c392dd2",k.Icon_boots_117="8c245114-dd00-4e20-a9d6-266d8655e3cb",k.Icon_boots_118="c28e8d76-4342-44e4-af9c-a8458e096024",k.Icon_boots_119="002390fa-9bb8-4ca0-a252-a6815458ae62",k.Icon_boots_12="5d5f3ab8-e39c-47fa-9e09-e70b9815c007",k.Icon_boots_120="bbc9aeb5-a361-410a-91c7-2c37f3836dda",k.Icon_boots_121="6b084311-9b91-45d3-a71c-5f6442ceb78b",k.Icon_boots_122="a3309afb-8b2d-4b32-b556-2e92a81295c8",k.Icon_boots_123="876237d7-45ad-4890-b985-939c6b757bf1",k.Icon_boots_124="fc85da64-a320-4a03-adeb-df10682f461e",k.Icon_boots_125="1b90ea12-5066-4cdd-a4a7-d0e6ce4094b2",k.Icon_boots_13="b1ca330c-ab05-4d60-ba2b-acdf207c4bb7",k.Icon_boots_130="fc65f973-c1ae-42a0-aa2b-461edfa08564",k.Icon_boots_131="3690b1ef-ead2-49a0-99d5-0544a3c4d31d",k.Icon_boots_132="6c07474c-2c4d-452f-9ef0-b530467bc95f",k.Icon_boots_133="5ef972d2-9eba-4e34-8659-43abacd5403e",k.Icon_boots_134="02f0af6c-85f4-4a66-b40e-c48d498512db",k.Icon_boots_136="af191e9d-fa49-4dae-8ab1-16c8253690bb",k.Icon_boots_139="f2974935-1c33-42cf-ba01-c0d1c3b2b7a7",k.Icon_boots_14="f6fbf4b8-3066-4cf9-bc13-1cad0a6e21fe",k.Icon_boots_140="03cebcd6-79c5-4333-9f2d-437b7ae754d8",k.Icon_boots_141="94f2816b-188c-4c0f-b066-d7175d9511cc",k.Icon_boots_142="2895fa5c-9f67-4e6f-9f67-7ae8345c60a4",k.Icon_boots_143="98e7fd5f-93be-4d0e-8f5f-2db7eb9e9219",k.Icon_boots_144="c88002bc-212b-43e7-8253-e4984bac1987",k.Icon_boots_145="76be5c56-c049-4177-a0d5-40e9dbfc43a6",k.Icon_boots_146="8b530038-126a-4eea-af27-e3ec59428edb",k.Icon_boots_147="45f3d5ad-adf1-4645-adf7-fb247f6dc0cf",k.Icon_boots_148="94ea8a8d-ceeb-405e-b71b-b7e727bc79cf",k.Icon_boots_149="a372ae5d-795d-47ce-bc08-93f45ffcb007",k.Icon_boots_15="cd47f348-6e2b-486b-8b73-0bd625d948ad",k.Icon_boots_150="5a8d2396-e548-48da-ad90-d75fcd85b593",k.Icon_boots_151="ad9c5ba0-b239-44bc-82ce-5bf584eafe72",k.Icon_boots_152="52f35c99-58de-4189-ac88-3966efc8ddd7",k.Icon_boots_153="d7ed7904-fbc6-424b-9301-d8457439ab71",k.Icon_boots_154="b63e8c56-bd36-4e39-b4a1-e9cdb878dc78",k.Icon_boots_155="018dbe24-1326-4b69-bd6b-53d8db388e1f",k.Icon_boots_156="af35230d-14e9-4a8a-abfa-73c589dcff39",k.Icon_boots_157="bca71d2a-1cc3-4358-ad8f-77d6e8388191",k.Icon_boots_158="ae2ac911-7a9e-4128-ac5b-4f15ace418e8",k.Icon_boots_159="2fc4ce7a-2844-4ccd-92da-09d1605d3064",k.Icon_boots_16="59a422c2-8a7e-4a86-ae0e-a497d523d7aa",k.Icon_boots_160="ecf40250-b27b-46d8-af49-cb3f2d53fcd9",k.Icon_boots_161="6441df81-db9b-49c6-96f7-d5987faf3347",k.Icon_boots_162="40bf870f-9947-4b9c-b680-62fd94d403f0",k.Icon_boots_163="3b9f65b9-122f-4aa4-8435-eacd13b1cb51",k.Icon_boots_164="61e37abc-12bc-4c98-9446-d398103fbe76",k.Icon_boots_165="ff319f1a-53fd-4f98-a554-0df2e34301bf",k.Icon_boots_166="3c68378f-833d-413d-a662-d0d19f1112db",k.Icon_boots_167="76b99dc0-504e-44fa-8c9f-8836a5613055",k.Icon_boots_168="065c690f-7c21-41c1-8173-6451a971b688",k.Icon_boots_169="1a319090-f183-484f-9067-bc9d4c8b6304",k.Icon_boots_17="024bde04-5c3b-41e9-a4c1-016aca03a59d",k.Icon_boots_170="34dc2a90-83cf-449c-95d7-91eab81fa1d0",k.Icon_boots_171="a3a644c8-c3e7-4ca2-a168-f5ffaf68111a",k.Icon_boots_172="83f8e869-7715-4606-a3b3-be24bbd4b529",k.Icon_boots_173="e53ccc98-1fc0-4328-9ee0-d30232c00ace",k.Icon_boots_174="f37611fd-6603-4cf0-a810-503266a9a369",k.Icon_boots_175="8192f725-c5c2-418b-ba10-569f01c84d62",k.Icon_boots_176="abc15823-16a4-448d-b9b4-c3cd5ecb61d2",k.Icon_boots_177="e316a826-8167-4994-9503-84169582a169",k.Icon_boots_178="40d0ecd6-9351-416b-831f-f2bfec93b6d6",k.Icon_boots_179="fc96e021-cf53-47e9-8e70-398372358254",k.Icon_boots_18="df371911-785f-43c4-80a6-dc127e1ea9c3",k.Icon_boots_19="90d2c27f-e8a3-4da1-b293-9ed6db10b34d",k.Icon_boots_2="c7a3c52e-70cf-40dc-8d0a-6d56e930b9a2",k.Icon_boots_20="95af6f39-6b74-45f8-acdf-a2f90dcadb16",k.Icon_boots_21="fffe727b-2413-4812-b172-938112687bfb",k.Icon_boots_22="c55dff47-86ad-4e8e-a426-317a9ffa71ea",k.Icon_boots_23="6a751d69-2606-4104-8f4d-7b63b2bc2b6b",k.Icon_boots_24="9d0fa279-4d87-4fad-bbea-d19251748950",k.Icon_boots_25="4003e3c2-471b-4106-8de8-f541bb0c4f11",k.Icon_boots_26="64a26737-11d2-4289-9173-b84b24e389a1",k.Icon_boots_27="959a8678-e3e5-4220-b385-d5854d4eca53",k.Icon_boots_28="5efb2ea1-59a7-4c4c-bf31-63d7488bc497",k.Icon_boots_29="6af3f4bf-d8a8-4739-a399-9c769907ad22",k.Icon_boots_3="00fd52ff-82f8-4ed6-9b8e-c9fe1aaf964e",k.Icon_boots_30="8b30c1a4-fff0-446b-b131-5f31844f2ac2",k.Icon_boots_31="b720e976-4a36-4a1e-9eae-ab5a5b3f7976",k.Icon_boots_32="8e274f61-12b6-4d19-9c68-fb4567d08bec",k.Icon_boots_33="58c24e2e-e8af-4d52-bb1c-cbf45bee31c7",k.Icon_boots_34="70422a49-fdf2-4223-80ac-b7d7f95b746c",k.Icon_boots_35="ce5bcdfc-913a-40b7-ad71-61a3d736c2a9";k.Icon_boots_36="690abc6d-3f4f-42b1-87de-66043eaa1fba",k.Icon_boots_37="f6f9aa25-e066-47b3-a910-75e6b11a6365",k.Icon_boots_38="9706b890-f8f3-4066-bad3-a5f5007633b0",k.Icon_boots_4="a288b678-4c29-41aa-9a5c-ab1ec74236ef",k.Icon_boots_40="eb064543-2ea4-4f07-9af1-75063171c0b0",k.Icon_boots_41="b91e00b0-cd0f-4269-8ee6-7868030d9361",k.Icon_boots_42="7b490110-7508-412d-9155-0b5e00e6a288",k.Icon_boots_43="75de5ed5-c372-4d45-815a-4b2c63f917ed",k.Icon_boots_44="1d247ea6-d0f1-4dc6-8576-eab09e6d5c91",k.Icon_boots_45="a83e679b-14ef-4225-9d2d-bbf4ab508e4b",k.Icon_boots_46="f410179a-d1dd-49ee-9908-f71ad7b9204c",k.Icon_boots_47="3c3d1514-2cec-43f1-828c-0263f0e431f5",k.Icon_boots_48="6e5f9b89-780c-4047-bc6c-b2bada430c1c",k.Icon_boots_49="501c1a9c-ccc1-46c8-80fb-95e80eb91003",k.Icon_boots_5="78871012-9e2c-430c-a9e1-e75e9ce8c63c",k.Icon_boots_50="5ce308cb-7e67-4be9-a207-ee7586bbb19c",k.Icon_boots_51="a33c4714-65b6-486e-ba23-a59aec9c0313",k.Icon_boots_52="83084b5e-1525-4574-8f2b-b7441edd763b",k.Icon_boots_53="132c448a-843a-49fc-a4c1-488be92ded26",k.Icon_boots_54="6118308d-34ac-496d-985d-53d9a79965c2",k.Icon_boots_55="851bbb97-e251-4753-87b5-6428798bf7cd",k.Icon_boots_57="76d31f6f-d47e-4a75-bd12-18b729dca44f",k.Icon_boots_58="2b0a3982-dda5-401f-8d95-cdcb8aaaced8",k.Icon_boots_59="84136ee4-54af-4561-b513-cb1dc0d0899d",k.Icon_boots_6="0340ccdb-9a19-4095-80e0-05501fa8d8e8",k.Icon_boots_61="f56939af-d7a3-4a29-b274-6b87e6ce0721",k.Icon_boots_69="7df5bdca-5dfa-4614-8384-7ff48d921c0b",k.Icon_boots_7="d66c9761-427b-4291-9953-f305ffab02ad",k.Icon_boots_79="45dff960-7d87-45d8-ac2d-75970825db68",k.Icon_boots_8="ade2a175-4d80-4405-8c49-fb1a4a0b0f3d",k.Icon_boots_80="a81e3796-44f4-4091-beb2-76b5102d28ad",k.Icon_boots_81="316f8bd5-b4da-470c-a641-1fba8354eb69",k.Icon_boots_82="51ac1905-eb17-4220-bdb3-39ebf14ff1b4",k.Icon_boots_83="54796d93-ebb3-40ad-b7a1-45232da59f2d",k.Icon_boots_84="093432ac-820a-427e-8cbd-daf8c32a7596",k.Icon_boots_85="22efd162-d646-410d-8409-741862fddb65",k.Icon_boots_86="3f74d53c-99be-4280-9700-9dabd2cda01b",k.Icon_boots_87="0196f999-1745-4035-8371-9ec4d34cd7df",k.Icon_boots_88="91f07df3-9d0d-46b9-a36d-bb8c413f87d1",k.Icon_boots_89="9f8ff43b-38ef-4c79-b301-2899dc69f411",k.Icon_boots_9="41330ee6-d85f-4fae-aa8d-18cc3f59cb03",k.Icon_boots_90="14d94e35-aaff-418f-89af-682ba82f685a",k.Icon_boots_91="a878936d-b447-4b04-a539-0a79941cc778",k.Icon_boots_92="78244a46-49d7-4dc0-b531-2c88682e8bfc",k.Icon_boots_93="f7e06c5c-4b27-4382-a65d-51dd3f6a2d35",k.Icon_boots_94="1ef3d001-b67c-4bfc-a18f-37287bb3db05",k.Icon_boss_buff_critChance="04d10245-5625-4599-9d5b-6b8f59d85e75",k.Icon_boss_buff_critDamage="a1c2e832-e430-4852-aad9-8280d0dff660",k.Icon_boss_buff_crit_damage="ce614c5b-f4d8-4f1c-ae53-e4fb19124b59",k.Icon_boss_buff_damage="6eb9f539-0ecb-47d7-a30e-bb27d839917a",k.Icon_boss_buff_damage_reduction="2df6b18f-0d0f-4f9c-a9e0-57e7ce439d71",k.Icon_boss_buff_elemental_bonus="480ea338-5fbf-43fe-9ce7-58f7eabcbb8a",k.Icon_boss_buff_health="3c95b279-86d0-4758-a7b3-b3ea5241731d",k.Icon_boss_indicator_rits_locked_tier_1="1b0fa381-13a1-4272-9e30-94a01d5ea91f",k.Icon_boss_indicator_rits_locked_tier_2="83bea1d6-a746-4dd0-9a35-f2c60e39a7e2",k.Icon_boss_indicator_rits_locked_tier_3="a9669bf5-561d-400a-a899-53503a1287bb",k.Icon_boss_indicator_rits_tier_1="09ee7887-6840-4326-8ee9-e2d6cb8fbe4b",k.Icon_boss_indicator_rits_tier_2="336815fe-e678-4e41-8507-4b1ac8549487",k.Icon_boss_indicator_rits_tier_3="c1a47291-6763-4092-bd32-f63c0d66fd3f",k.Icon_boss_indicator_tier_1="595dee07-d43d-4d4c-943f-1e53e6e2521a",k.Icon_boss_indicator_tier_2="74fa2647-be61-4d47-828f-1be165f8ff8b",k.Icon_boss_indicator_tier_3="71516abb-1a27-4c0f-afe4-d8574b0b61d2",k.Icon_bulb_filled="851184f4-62b1-4a37-8921-a1703f432131",k.Icon_bundle_5="3f9f728f-864e-4ee7-9279-456da392f0d3",k.Icon_bundle_6="e443501b-d645-4638-a2b9-1d78330ebc80",k.Icon_bundle_7="26581c16-cb1f-4350-a1f5-968fea4653d0",k.Icon_bundle_8="bd9b4e12-cf8e-4a0b-85f2-4c9df6661011",k.Icon_bundle_9="24510618-6221-46a0-899c-ea9ab5447af9",k.Icon_celebration_pack="4d6c19d5-149b-4033-bd49-57a3ba3d943e",k.Icon_charged_levels="90c2a5f6-58d6-455e-b92b-7b03d3928e97",k.Icon_coop_quest="6effb0c2-e1ce-4742-a77f-a9e1b6b39b71",k.Icon_currency_1="009e0aee-98b6-4baf-af34-68036b15ac4e",k.Icon_currency_10="cf72b35f-ea03-43b6-8ae7-a87a9ccbed04",k.Icon_currency_11="489b9378-928e-4693-99f3-c2ab011a3f3b",k.Icon_currency_12="2bf687f7-1309-467e-8207-8be4b5d76b75",k.Icon_currency_12_store="c1606ebd-d321-47d2-b13d-6be7c8239592",k.Icon_currency_13="9d238336-2b74-434b-9d18-ddf5152bd0d6",k.Icon_currency_13_store="5b9315bf-1b28-4807-b354-7c47f7d94646",k.Icon_currency_14="2fec2133-84a2-4c44-b484-f1c444472c93",k.Icon_currency_14_store="a4eb2352-8a0c-4561-89ca-a20fb11f2c51",k.Icon_currency_15="c253b0d8-1991-4333-84d3-cdba9ec361e3",k.Icon_currency_15_store="6af3fbe9-bc5a-4292-9d9d-53757587b82b",k.Icon_currency_16="4d6ae2bb-53fe-4f38-b65e-e22911758401",k.Icon_currency_16_store="e60473b8-2c84-4caa-8995-8977199f1ee8",k.Icon_currency_17="7ddd6ca1-888e-4b5e-bd36-c6c63ae769ff",k.Icon_currency_18="99839edd-7a0f-4e2a-a461-1e1b066f6252",k.Icon_currency_19="687dda2a-4afe-4aa3-bf75-b2b6e2f4d0d2",k.Icon_currency_1_pile_small="1d53f730-a8a6-4730-a450-a230f0584730",k.Icon_currency_1_store="519749d7-1737-4e2c-b86a-f8f40fec6d93",k.Icon_currency_2="585415e7-27f7-4cbf-aee2-b004a2bf082f",k.Icon_currency_20="452cff58-333b-4551-91b6-077628cf606e",k.Icon_currency_21="dd01fd90-3e73-41df-bab5-08e5bac466f5",k.Icon_currency_22="cce27a2d-ecf0-412b-b15d-f96c98bc8ac7",k.Icon_currency_23="f842a4cb-f901-462b-bba3-95a0da64f940",k.Icon_currency_24="0dc3e45c-43ad-4757-9580-ae5faecc3642",k.Icon_currency_25="55572369-4374-463a-b50a-13fa8b3c7641",k.Icon_currency_27="ff14ee8e-111c-48e3-ae1a-faef2cfcb5bb",k.Icon_currency_27_pile_small="4e6b380e-a9d5-4636-a695-a977ba965ca7",k.Icon_currency_27_store="c7210eac-b11e-4e6a-9b2b-ed1973bae72d",k.Icon_currency_28="afe4aa69-e318-4353-8069-e35a24f2bd0e",k.Icon_currency_28_store="97641576-f84d-4096-bce6-a182d9995be8",k.Icon_currency_29="c5ee3a7e-7d15-4806-b40d-ab1e8dbed519",k.Icon_currency_29_store="0549ee32-8eeb-4f34-b75a-de2b09f2f28d",k.Icon_currency_3="c69fa292-71f2-48c4-be31-3b4982d386c9",k.Icon_currency_30="830f0d8d-045c-46c8-bf65-9f5ec278f378",k.Icon_currency_30_store="b0f115fb-fc1a-411b-ae9c-89855affbf7c",k.Icon_currency_31="d5e8bec6-1a3b-42fe-be20-e42bf74700ec",k.Icon_currency_4="f8619d29-748c-40a2-80e8-a3e7b0a6fc5b",k.Icon_currency_5="dc0a80b0-c181-4729-859e-9499b8c5cd3f",k.Icon_currency_6="cb24a771-24b3-41a4-8acd-6966d43cfa95",k.Icon_currency_7="1005d9aa-064f-46c2-ab7b-a20816dd890f",k.Icon_currency_8="083cfa85-15e5-4db9-b5dd-f736094332ed",k.Icon_currency_9="7c8369f4-8cb5-4637-a4cc-4ce00d37004e",k.Icon_cutscene="94334d22-2e66-4e4f-a73e-a9a34067068a",k.Icon_dance_1="e269ddff-67cc-44f5-9462-4feddaee73c1",k.Icon_dance_2="485aedd2-fbb2-4202-b122-fa446ccf49ff",k.Icon_dance_3="9666d73d-5c6e-4b56-aabb-86903a9c91d8",k.Icon_dance_4="a4ace528-0a82-4f63-a03e-12f5f733c925",k.Icon_dance_5="aa681ddc-f01a-4dd6-8f19-b5971bfa88c7",k.Icon_dorm_1="aa7f4ee9-28b4-4d8a-83fe-f73feca2e864",k.Icon_dorm_10="566cfe77-6392-4531-b10b-7010fb2f10ad",k.Icon_dorm_100="7b0cb93b-be6a-4510-8ec1-594cbd9bd027",k.Icon_dorm_101="7757e6df-ef07-4bcb-a68f-1a1605b8fcc4",k.Icon_dorm_102="2890f1ef-41de-43f3-9c88-9e3facd5eeab",k.Icon_dorm_103="1095d888-4043-4041-9757-69b0b21d7211",k.Icon_dorm_104="22c925e1-39fd-499f-8809-3ea8d3d36555",k.Icon_dorm_105="758c89dd-1f72-497e-ae89-528217f1a664",k.Icon_dorm_106="278c74d4-1d31-47ea-b815-23d4e45f1597",k.Icon_dorm_107="382c0a59-2a95-4904-bd82-422d40be061f",k.Icon_dorm_108="9ae1ea1d-8285-407b-9981-82d042182dc4",k.Icon_dorm_109="20e3ae3b-7535-4ba7-8f32-e399d266ff04",k.Icon_dorm_11="826ae11c-21b8-474c-8e04-49663f4b80a6",k.Icon_dorm_110="e052cae5-b676-4148-9b43-23b01efdbcde",k.Icon_dorm_111="1b1a36d5-d960-4d60-a90e-c3d4d72f0503",k.Icon_dorm_112="9562cdc2-85b8-4065-a801-7c6d57a67cf2",k.Icon_dorm_113="8da8e586-01ca-49d9-a5a3-c927a67c9972",k.Icon_dorm_114="485372bf-2070-41d3-8fa6-4472a898c296",k.Icon_dorm_115="35d663f7-e95a-435c-8cb3-b954096396b9",k.Icon_dorm_116="d758321e-d3bb-4484-82b7-d7eee17917e2",k.Icon_dorm_117="1792379b-7fa7-4d6d-a7c3-65197a86d789",k.Icon_dorm_118="939cb1d6-b48b-4dd1-9b1a-d016d95dfb73",k.Icon_dorm_119="2a5a6d50-87d5-4d56-b8e0-23aba9b67967",k.Icon_dorm_12="fa9dd6a7-5d86-4095-afe7-d20def63d772",k.Icon_dorm_120="ec2ab317-123f-443b-874d-acdc064322a5",k.Icon_dorm_121="0b7b6db2-577f-4b31-99ea-593e3565d3be",k.Icon_dorm_122="35949641-2a4c-4032-ad03-b98f55fdcc76",k.Icon_dorm_123="ff03838d-7a7c-4f86-beea-ba3d7eb37330",k.Icon_dorm_124="8952ab41-aec8-43b8-831f-a854dbe741cf",k.Icon_dorm_125="cac953fb-635c-4f4d-996a-697659542e6c",k.Icon_dorm_126="dbf5c182-f24c-4d71-9f55-2aaec0dc0f79",k.Icon_dorm_127="76314649-a055-44fd-bb59-88c293cef230",k.Icon_dorm_128="88235b33-821a-4f85-9103-8ed4b24e8728",k.Icon_dorm_129="11202ea7-b4e9-4ea4-a8bf-e386083cb32a",k.Icon_dorm_13="a69be307-85df-47b6-806b-b0e334af4866",k.Icon_dorm_130="ef91101f-6f01-4050-9aee-300b8aa43b2a",k.Icon_dorm_131="fcdd2727-adc7-4619-a59e-44da4fed7a22",k.Icon_dorm_132="2f2ed32c-7d44-42f6-9130-bfda57cd3310",k.Icon_dorm_133="95deb4a3-7d2a-49ca-8429-10e122010c10",k.Icon_dorm_134="3097178d-ce76-48c6-9038-562958c0190b",k.Icon_dorm_135="caf0d18b-fd77-44ab-9ab9-5571c3004592",k.Icon_dorm_136="354a4caf-0c65-4bf9-9851-cf638f51b5ba",k.Icon_dorm_137="e1300a0d-d09f-4ae1-9c79-3ba932b4fa2c",k.Icon_dorm_138="a9e72600-9f75-4a6f-8b37-8ca116c0bd5e",k.Icon_dorm_139="dac98d78-8142-4ad2-b74b-e1f7c45adfa4",k.Icon_dorm_14="c75209e2-78fc-42ac-9586-637735cba027",k.Icon_dorm_140="89919009-4113-4cfe-8135-fceb4c70c27e",k.Icon_dorm_141="ecadaaae-6571-41ba-a3b8-90fd7cc2150b",k.Icon_dorm_142="c2c1807b-05e1-4cb7-9ac1-94adbd3ce872",k.Icon_dorm_143="ededcda0-c5d6-4ca4-84c2-acc44fc1d66f",k.Icon_dorm_144="74ea9a6d-a6c8-436e-b7bf-9802c80bbad6",k.Icon_dorm_145="89f12281-2db3-45dd-8c1d-d87e9c65f30a",k.Icon_dorm_146="760c8386-b0c3-4dd8-95fe-5ad8f2ede76c",k.Icon_dorm_147="4aa7c2a2-35f1-4a16-b096-4188ad74b082",k.Icon_dorm_149="f5a774e2-0977-4b6b-8844-b045a5077f30",k.Icon_dorm_15="42755ace-3575-4b1a-8316-f11da02a7722",k.Icon_dorm_150="3b8f6fad-d717-4552-98ad-59190fab336e",k.Icon_dorm_151="e63ae07e-f881-4b1d-9631-53a5ad744c40",k.Icon_dorm_152="20838d8f-e8e6-430f-8a77-f34f21c0634c",k.Icon_dorm_153="75d2bc65-2d14-424a-a6c0-e2f936e6389a",k.Icon_dorm_154="ecc70da6-8ecc-4662-9a22-1fc9e3f4bd04",k.Icon_dorm_156="16a97f29-6acd-4772-b101-ee69014ab19b",k.Icon_dorm_157="0cb603a5-1c4c-48fb-a58a-6700c7a2281d",k.Icon_dorm_159="bfa136a8-b40a-451e-bf54-33e69cefa601",k.Icon_dorm_16="a2868ae9-d139-4776-af73-33ea7326c237",k.Icon_dorm_160="f0ed6ef7-e78d-4314-9054-c4a6493a837a",k.Icon_dorm_161="a0ff0705-652d-4eb1-95e0-d418fdabbe00",k.Icon_dorm_162="0b6252f4-de5c-4289-bde3-dfd4a7babdb6",k.Icon_dorm_164="befc6570-1d28-4a10-9930-8872ff3064d4",k.Icon_dorm_165="eea7db40-c9a0-42a9-b73a-d5a7050adaaf",k.Icon_dorm_166="1c2f7110-3bf6-4710-8bb7-6bebe1753d0f",k.Icon_dorm_167="56918c80-2dc6-4d9b-a91d-e883431901a8",k.Icon_dorm_168="a104a092-3741-42ac-a032-3c1eae7fff15",k.Icon_dorm_169="d85b6ca8-2870-435a-a033-4350050a187b",k.Icon_dorm_17="bd513839-8be9-495d-ad61-4e28b69bea34",k.Icon_dorm_170="aca2f7e3-44c9-4007-8750-ac05e9a15e50",k.Icon_dorm_171="bf6b2d89-d7cd-45eb-a64f-d8072fa75e3e",k.Icon_dorm_172="1cdc5c8d-a245-4b42-ab3a-c3c0b0dacb4d",k.Icon_dorm_173="4b46ccc6-528b-4e47-b81b-65f9ba28bdb3",k.Icon_dorm_174="a2135da1-9169-4a60-8c32-ffa4827c36fa",k.Icon_dorm_175="8f41b335-6b4c-479f-8984-eb071fac9eab",k.Icon_dorm_176="b1d3b659-d544-4298-9010-968aa90d1f70",k.Icon_dorm_177="faadbf55-48fb-41be-98be-4b61e7e1463a",k.Icon_dorm_178="8e927752-0bbf-40e3-8c9d-6c355d4cea3c",k.Icon_dorm_179="74212f78-a276-4692-b67a-0aacac0ef3ca",k.Icon_dorm_18="d77fa9bb-db19-48a9-89e5-cf1e30e68458",k.Icon_dorm_180="af5ed18b-39b9-4797-a85f-02dd9a4928fb",k.Icon_dorm_181="2a976d5d-ccf1-4080-8a6c-9f8413a17602",k.Icon_dorm_182="85fad99a-3bef-4753-bd76-e785a5d7e7a9",k.Icon_dorm_183="3ae81581-eeb4-499d-b6f1-50a9886da1af",k.Icon_dorm_184="d8b7a2b3-eac0-4a6b-8d86-580de332a4ab",k.Icon_dorm_185="2581e0f2-0615-499d-bed1-20da460fa707",k.Icon_dorm_186="ef7f4809-7a66-4b16-b6d1-2e745b713f61",k.Icon_dorm_187="ea21b475-a452-4a5a-8c84-abe486e7724a",k.Icon_dorm_188="734f0d23-8588-496f-9058-008a5aeabf43",k.Icon_dorm_189="67be66d8-caf2-4803-95bf-0f664e227aa6",k.Icon_dorm_19="ce8cf06e-03ea-4f57-8f93-ea21bbd57a3d",k.Icon_dorm_191="0e36e68b-1817-4800-8a36-04d4438cac5b",k.Icon_dorm_192="38822fef-77c9-49f6-ba82-c72ac8095734",k.Icon_dorm_193="f7cf3c38-37ba-4c85-a417-2f3176c5fe5e",k.Icon_dorm_194="52f1876e-9b6a-4761-8d3f-d8171c9b6a62",k.Icon_dorm_195="e73a2520-c3f8-4d1e-9b9b-03fad263a947",k.Icon_dorm_196="cc6d1ce5-5474-462c-bc41-e28e4183b25d",k.Icon_dorm_197="cc0e2f3a-8e43-4085-a628-84bccc05fd64",k.Icon_dorm_198="92fea460-c3bc-4131-a671-2eb7217de4de",k.Icon_dorm_199="ddc55501-b8aa-4315-a14a-71f7d203be35",k.Icon_dorm_2="33d87d88-e274-4613-af34-6263a1ffb8bd",k.Icon_dorm_20="98983e44-74ca-4bfd-b36c-f8f945abae3c",k.Icon_dorm_202="09f73f45-8ce0-4399-b6a9-f07ac7767d17",k.Icon_dorm_203="5cc2068a-4cde-490e-8c94-5bbf8e933387",k.Icon_dorm_204="e819247e-12e0-4c31-b6d5-604af1ac4c24",k.Icon_dorm_205="ad88a984-5658-4066-ba5b-06ad6a506eb4",k.Icon_dorm_206="7c87e059-6cb0-4e3e-b20e-fc57681b0e3f",k.Icon_dorm_207="00f1fc81-9404-4ffc-8eb0-8e93a2c37064",k.Icon_dorm_208="4938553e-955b-4c7a-8b9c-041572832639",k.Icon_dorm_209="be71ba9b-8713-45a1-b3fc-d91a2b7dcd23",k.Icon_dorm_21="d05d41db-d874-4b9d-adf4-93efa8ae8051",k.Icon_dorm_210="97ec5e35-4898-4273-a9dc-9977da8968d2",k.Icon_dorm_211="2dbf2ae2-ecc8-48ca-857a-cc02cc538dc0",k.Icon_dorm_212="82e0bf70-3a07-42b2-b4f9-9bffaf2412e0",k.Icon_dorm_213="b1ef07ec-eff6-4422-9e4f-587da966f337",k.Icon_dorm_214="0eb14dee-4279-48f0-93ca-ebd8ff13df03",k.Icon_dorm_215="ef439b1a-01d3-4547-b961-560fdf2cc00c",k.Icon_dorm_216="0d2d976c-7aad-47aa-8bb6-3e49787725aa",k.Icon_dorm_218="0be13e16-6549-4b2c-821a-05bb64cf3193",k.Icon_dorm_219="23ae865f-fdd9-48c8-ac77-0c1d472957a5",k.Icon_dorm_22="d37ce8c9-ccb0-4366-aac0-586a58944ba8",k.Icon_dorm_220="6b9a9d01-3273-48a7-bdba-2116a3f33f06",k.Icon_dorm_221="024834d6-14e2-4296-8189-04703eec27e0",k.Icon_dorm_222="2707558d-7843-4d2f-9b09-0f40a9506c09",k.Icon_dorm_223="76e88987-a6fc-4c6f-ab55-1c57c270982e",k.Icon_dorm_224="9f7a1514-a344-43df-89da-1815980a4379",k.Icon_dorm_225="6f5970bc-8cdd-41ed-8424-9c23add556fb",k.Icon_dorm_226="2352ac36-e0ae-42a6-9fa4-5e7521a6e496",k.Icon_dorm_227="be64c154-91d1-4c3a-a299-305fe1cfb4e5",k.Icon_dorm_228="c0f84d99-f988-46e4-adcf-41a1621ab756",k.Icon_dorm_229="a2595b9d-f886-4f7c-96a3-9ab6fc40d057",k.Icon_dorm_23="60717c2d-9134-4fcc-badc-a9efeffee090",k.Icon_dorm_230="a44a0a71-9141-4359-b745-f0da21e23adc",k.Icon_dorm_231="20dc8c2a-6f3a-40e9-b65a-03016645943b",k.Icon_dorm_232="51534cb6-4e3b-4f02-8ee4-935279c2f83d",k.Icon_dorm_234="b0e0faf2-32da-47eb-bd72-b8357994370a",k.Icon_dorm_235="b0033c7b-db5e-4728-94c5-938e482784e7",k.Icon_dorm_236="ae1554cb-6c93-441a-9b90-e3056339a9a8",k.Icon_dorm_237="4cc84229-fbdb-4bbc-8695-5609194c169f",k.Icon_dorm_238="91f45467-cfcf-4e7d-bd25-9dcbbe7be08a",k.Icon_dorm_239="10c51d1f-1ee3-4a30-a5b4-83a23cbfc78e",k.Icon_dorm_24="866ed0c4-373e-40cc-bb5a-a49adf7fe277",k.Icon_dorm_240="7cc296b2-cb50-4460-8d89-4c2fd8484097",k.Icon_dorm_241="b2af2c3e-2086-4cd6-ba70-6ad67f71a0af",k.Icon_dorm_242="f4419033-07ee-4e97-acf3-73ada790509c",k.Icon_dorm_243="0a319f96-9d6d-4bf2-81c6-b8a58d66f3e8",k.Icon_dorm_244="d44addaf-d69f-47b2-9245-b0c44dbb8117",k.Icon_dorm_245="32f75fab-d85c-4153-ad84-c3c393f3d8a0",k.Icon_dorm_247="cf356f86-8001-4336-8ff3-6b755e9da836",k.Icon_dorm_248="9f36cfda-65dc-429f-96ba-b29995a9de5c",k.Icon_dorm_249="db8f8044-e66b-481c-ac71-5f365e281b78",k.Icon_dorm_25="355fe7a6-b7f8-4215-81c5-0154ec89ae89",k.Icon_dorm_250="7803336f-3742-44ef-83e6-d1461f2731d1",k.Icon_dorm_251="dc3d45b0-19e1-4c7a-9a8e-d80af155030b",k.Icon_dorm_252="f7363b82-328a-4c91-acaf-29da233eef66",k.Icon_dorm_253="0253600a-c953-45e6-82f5-07f12fafb927",k.Icon_dorm_254="e5be6660-8fd3-4af2-a090-a972fd28dfd1",k.Icon_dorm_255="2d0d6a3a-b132-4aa8-af63-ae0e9ae03569",k.Icon_dorm_256="252dc8cb-2be7-4876-9330-709aa6c310e1",k.Icon_dorm_257="3faa373a-5fdd-4385-91a4-71ccd4960f6b",k.Icon_dorm_258="d877d120-1026-4e3a-930c-c3b2ef6c60e1",k.Icon_dorm_259="89725cf1-f8a6-45fa-9f26-cde21c3f00aa",k.Icon_dorm_26="09f250ac-169e-4e25-aede-82df9748d708",k.Icon_dorm_260="6a70bfd4-403c-43c6-a25c-a516344d688c",k.Icon_dorm_261="5a154161-7a95-44ac-b7af-764e36534138",k.Icon_dorm_262="d770713f-59d1-4829-be9c-e0accc79cd77",k.Icon_dorm_263="de4456a8-dc91-4b9c-b3db-86b188ad7bfc",k.Icon_dorm_264="986edbb7-cb2e-4ad7-a04e-d637107517dd",k.Icon_dorm_265="0d262300-ccc0-4d01-b4b6-ff6d2996d0b9",k.Icon_dorm_266="928ebb25-fa5c-4e17-babe-0f131d84fef8",k.Icon_dorm_267="70e71ff4-6236-4015-9f17-d782b1e9a22c",k.Icon_dorm_268="c616f520-b235-45ef-8bc7-bc1afcaaaefb",k.Icon_dorm_27="ccb870c6-04a3-41a9-9b23-eba642da9b69",k.Icon_dorm_273="25847bff-c240-4c40-ae2e-3c14a304a278",k.Icon_dorm_274="e4acd5b3-6f59-47c7-9a95-9467299eec84",k.Icon_dorm_275="b8fb9c75-6a1e-4733-98c2-dce864a3e1fa",k.Icon_dorm_276="35ba65db-97cd-4dd1-86ed-1e5f33d34ac7",k.Icon_dorm_277="32dd0c62-e3c4-4d11-b648-3d365745c06c",k.Icon_dorm_278="d8329420-b0bb-4181-bd80-b8a957442e42",k.Icon_dorm_279="7fa57898-450e-47bc-854b-b14593878635",k.Icon_dorm_28="86d68f76-ab73-4d24-9375-aeb419389742",k.Icon_dorm_280="e4b9c694-b19b-44fb-a230-43334882dc19",k.Icon_dorm_281="61056f2a-9c49-4e61-941a-b261b7d16fcc",k.Icon_dorm_282="16bcc296-5d57-4028-b7bd-f0f909ba0158",k.Icon_dorm_283="d9db1e2e-de1b-44b8-89ba-7bc9acb1b345",k.Icon_dorm_284="85ce801e-7cbf-4d36-b006-6411f5175238",k.Icon_dorm_285="f5c61ea3-d0b9-4a85-a568-953e07c95f07",k.Icon_dorm_286="1d1c5a1d-3dc4-4eed-99ce-53eeea6ac64d",k.Icon_dorm_287="b64e36d3-9687-49ec-85d7-08bfb607a528",k.Icon_dorm_288="413b9027-20f9-4865-b331-8eef4b737c34",k.Icon_dorm_289="0810ce1b-b6a4-476f-96c0-f4b07efbd041",k.Icon_dorm_29="269b3609-918d-454f-943d-f967cb2957de",k.Icon_dorm_290="5a962860-cbc5-49c4-a0e3-a6e01bf21047",k.Icon_dorm_291="226d9a34-423f-472c-bd73-f85f1c0e7d82",k.Icon_dorm_292="9a0a9ce7-ea3b-4b4e-a63b-a8c2c7601c19",k.Icon_dorm_293="a55bcd55-283a-43e4-a492-a8d7930d56a5",k.Icon_dorm_295="7b7191d9-db69-4f3d-b927-ac180a8c1e84",k.Icon_dorm_296="50502673-b839-496f-b810-67333a93617f",k.Icon_dorm_297="b9e8f861-bd9b-4121-acde-a4a36cf69772",k.Icon_dorm_298="b0480787-4926-4b17-a69d-26ca5e27de74",k.Icon_dorm_299="5cc5b544-2c33-488c-a9c3-4ac617b5465a",k.Icon_dorm_3="5f488c19-d5cb-43b0-b1b6-e50eded3d1cc",k.Icon_dorm_30="1245aab1-c95c-4f0b-9521-3025e97036b8",k.Icon_dorm_31="82618859-e064-4398-9f14-7de9d1f22e7f",k.Icon_dorm_32="f70a9bf6-7dd1-44b7-9829-b2466945bb1c",k.Icon_dorm_33="cd4ea517-4f38-47a9-89b1-0432babaae8d",k.Icon_dorm_34="3d35b880-5b72-4911-8cb6-65fa49716594",k.Icon_dorm_35="272c8de0-5c23-451d-9f35-19a1a0e39b04",k.Icon_dorm_36="e1eda36d-6d21-410d-8cd4-998dbbda523d",k.Icon_dorm_37="6cc808eb-edb4-43f1-a8f4-ea9cb37a0a8f",k.Icon_dorm_38="aa804e51-d7fc-44f3-9f90-82f7138f5697",k.Icon_dorm_39="6c74e182-f8c2-4939-afaf-848879990c88",k.Icon_dorm_4="aeb36876-4d34-47e2-9d48-7de03a480f6b",k.Icon_dorm_40="3e2d3033-8bca-4962-b2ec-eb9d06e5df1e",k.Icon_dorm_41="588ff24a-fee3-49a1-86f2-9dc0720afbe3",k.Icon_dorm_42="4bdca643-bb02-4f90-bbac-abbbb6cba38a",k.Icon_dorm_43="7dd7f78d-aca0-4a67-aed1-caa4ee401748",k.Icon_dorm_44="63afdf66-5cde-4a25-96aa-db3062aed753",k.Icon_dorm_45="0e7edff5-1dcb-4866-b5f8-5ed8557a7486",k.Icon_dorm_46="338d8a5a-8c14-4256-9acc-693713eb04dc",k.Icon_dorm_47="6261038c-7c85-46e2-a675-4fdc8aa08ea4",k.Icon_dorm_48="39ba2982-31ae-43f8-a31b-1ce2508f66ea",k.Icon_dorm_49="90fed777-8e53-4d3e-859b-2f43015a6348",k.Icon_dorm_5="c27079c6-7e3c-4194-96a5-7f2075c2c0e8",k.Icon_dorm_50="6c0d6bf4-aae6-461c-8045-fa6324fc7bac",k.Icon_dorm_51="a0891e6e-0bca-4c91-9390-58f223df509b",k.Icon_dorm_52="11b68a89-43f5-417d-a920-725230769a88",k.Icon_dorm_53="5d12c2f2-5a43-4f56-aa98-a2d45d6e4741",k.Icon_dorm_54="6fe1e5f9-b41e-418b-b857-56452982bc6a",k.Icon_dorm_55="5ed886a1-ec5a-440c-a953-35170ec05422",k.Icon_dorm_56="a5c7c2ad-5f3b-487f-8ebe-b2c28060f48d",k.Icon_dorm_57="6600bc60-5f0f-456a-b5b8-5674391b5d6f",k.Icon_dorm_58="e718a3aa-3b38-4888-9491-2a2cd83ead42",k.Icon_dorm_59="5343910a-49ec-4bc9-afee-63fc98962d10",k.Icon_dorm_6="f01d3536-8f27-45a1-bd0f-a45cba516496",k.Icon_dorm_60="40c61b99-bb12-4920-ae48-ce53dcab0684",k.Icon_dorm_61="7858f335-1e41-4ef4-b5ca-3437b5c82485",k.Icon_dorm_62="bade824c-cf8a-478d-8d45-7f386e4e9192",k.Icon_dorm_63="db9b901b-ea7e-46c0-be3f-dc9f80f335ce",k.Icon_dorm_64="ee8292d3-b72e-4d55-8072-4dca3cf7fdc1",k.Icon_dorm_65="4d5270a6-8f9a-451d-85a9-2f5ae902b274",k.Icon_dorm_66="6304dfcb-e138-4875-a3f1-9e7052bbd37b",k.Icon_dorm_67="f9a546a3-9989-4e92-a09e-bc49d8d63a6c",k.Icon_dorm_68="7ab2caab-5bb3-4f9f-9f8c-4c941c3bce59",k.Icon_dorm_69="94bca265-b04e-4d70-9bb4-b5d2239c8347",k.Icon_dorm_7="135bdbcd-a51c-492d-a7ab-aa42d22c02da",k.Icon_dorm_70="f94283c6-7645-4cb0-a114-6d087704f373",k.Icon_dorm_71="e92e3148-bd07-41dc-8e81-2a774d334183",k.Icon_dorm_72="6bf1dc49-b856-48c8-bafc-5349bdc75010",k.Icon_dorm_73="6570a040-b633-4311-8e2e-2794783f2cf2",k.Icon_dorm_74="ff054d63-bc61-4cda-ad8a-90553031f8fc",k.Icon_dorm_75="74f5c8e0-079a-41c4-a295-49dffa441f24",k.Icon_dorm_76="5d8ad48e-7932-4526-a608-e3c81caaf6a3",k.Icon_dorm_77="da4a989a-e32d-4e3b-aa9f-6ab61f80988f",k.Icon_dorm_78="6171588c-7a75-4552-ad40-e72c721b8ae3",k.Icon_dorm_79="30004485-b35c-420c-b2a2-9d62c5a8367a",k.Icon_dorm_8="432d0371-a089-4f26-b2d0-38f1c7d3baaa",k.Icon_dorm_80="bd61fa75-1496-4a2f-bc65-6bf6e4e9482d",k.Icon_dorm_81="21e7bce5-a6cc-4907-a2d1-392f2d834e4a",k.Icon_dorm_82="532f169b-7149-4519-aa92-8dfec4fa6e1f",k.Icon_dorm_83="d8a47720-358a-4d63-b7e5-6402cad78528",k.Icon_dorm_84="012a6009-3974-4437-8e9d-183c2ebc9752",k.Icon_dorm_85="6fc1872c-eb83-4ae8-ad86-dbce00bc95f9",k.Icon_dorm_86="9e984eb9-38e2-4d44-b3f4-7bac3d149f16",k.Icon_dorm_87="e540c205-b512-4dd1-8c3d-f642c93ab5fa",k.Icon_dorm_88="4202c1ca-1dbb-4a91-984c-6812c7e8cbc5",k.Icon_dorm_89="ad48df8b-3ed8-4518-b9da-3f88473de1e7",k.Icon_dorm_9="39b41cb4-4655-448e-a15f-b14f1c89a5b2",k.Icon_dorm_90="abe262dc-5d4b-445e-a866-cdfdd0938646",k.Icon_dorm_91="b87acf6a-db18-4fc3-8f94-3ccc2a3d4574",k.Icon_dorm_92="3db85022-12ec-4feb-ad2a-98724991822b",k.Icon_dorm_93="de1bcd80-18d9-46ba-92e4-b9f6033ab14f",k.Icon_dorm_94="670ed547-fec5-407c-acb2-aaf428b2830a",k.Icon_dorm_95="73e0a3af-e97e-4eba-98b6-61e402b79c06",k.Icon_dorm_96="dbbd8786-7e64-4aca-9a56-ab05fee0f1a7",k.Icon_dorm_97="63a295f1-6629-4cb1-9097-4fd876bc5cb7",k.Icon_dorm_98="abae7c87-3e6c-4865-b959-d935d540cc26",k.Icon_dorm_99="51cbe9eb-cd5f-4c1a-9506-295d36e42b08",k.Icon_dormbg_1="ecefdaea-e30e-41ed-af81-bbac0b85c567",k.Icon_dormbg_10="5ee22bae-f02c-4faa-b3b8-bc6fed190f32",k.Icon_dormbg_11="518de818-c9ca-4b17-ac62-7d6f301cb4d7",k.Icon_dormbg_12="321d329b-8cc3-461b-a694-b3e468fbf475",k.Icon_dormbg_13="d2bc8539-e09f-4132-a350-9a5dc60e911c",k.Icon_dormbg_14="ec5bdc8d-9f3f-4eb3-b25b-b2ae36d507d7",k.Icon_dormbg_15="50118a28-5769-4e32-afb4-5c0c6dc630d8",k.Icon_dormbg_16="84f03c0a-0767-44a2-86ff-de5630c63314",k.Icon_dormbg_17="68c65783-706e-45af-9f25-e71a08dba0e0",k.Icon_dormbg_18="934c2670-51fe-4b14-9043-ae00afaf1431",k.Icon_dormbg_19="44397d0d-351f-4fc9-b469-62b956ff00a3",k.Icon_dormbg_2="0d97ae00-efee-4da8-9bed-047658cd372d",k.Icon_dormbg_3="a58823f3-9aad-455c-98a5-7728dc272a2f",k.Icon_dormbg_4="625d8873-01ce-4eb1-8c3b-16ae18915836",k.Icon_dormbg_5="305a0a12-9a0f-40a3-b930-c22456620af6",k.Icon_dormbg_6="fa88c99f-db50-4466-af64-4c0571e54796",k.Icon_dormbg_7="8c8d6605-ed70-4710-8739-742c97d58381",k.Icon_dormbg_8="39b55eac-75a3-4ed0-ad60-cc6944fb41cf",k.Icon_dormbg_9="eba52da5-e59c-443c-a029-29545994f12d",k.Icon_dragon_orb_astral="9d9c6a2b-806b-4ccc-8250-002bdebadaf6",k.Icon_dragon_orb_astral_huge="3d8fc46d-d672-48aa-a165-8baa0e69348e",k.Icon_dragon_orb_fire="8c75f560-0778-4290-ac52-5000290abb5e",k.Icon_dragon_orb_fire_huge="474f438c-1429-490e-9343-2cd5965bafcc",k.Icon_dragon_orb_ice="8e2afc0d-7580-44e4-bad7-c190b7ae71c7",k.Icon_dragon_orb_ice_huge="23c8b451-e341-4058-8e20-11912e3c184b",k.Icon_dragon_orb_physical="5a262caf-2a6a-4b51-8a89-a791da193fc8",k.Icon_dragon_orb_physical_huge="141c3a8d-51f9-438c-a6c1-7f89b268f274",k.Icon_dragon_orb_physical_huge_silhouette="8ebe8d03-6f90-4ffb-aae4-791af35ca44a",k.Icon_dragon_orb_plant="f10c3bdb-89aa-4e3e-a726-20b169027f55",k.Icon_dragon_orb_plant_huge="5edfa0c3-0e54-4c57-a4b2-34a329c39704",k.Icon_dragon_orb_shadow="b3ba5b67-7984-4613-80e2-81580637c1a2",k.Icon_dragon_orb_shadow_huge="c41c0a7b-a157-48f0-8ce1-13f074cf0849",k.Icon_dragon_orb_storm="80fc4e9a-fb62-4a54-aabb-e10766210182",k.Icon_dragon_orb_storm_huge="2f512880-9e18-4eee-b761-bb3c33d6927e",k.Icon_dragon_orb_water="0ba7c6ab-bd03-4db5-ba5b-03f1f6be01ba",k.Icon_dragon_orb_water_huge="50664486-ddb4-48c2-adda-ac4fe0cff62e",k.Icon_elements_chart="c387c574-a039-429b-844d-7270fdd2380c",k.Icon_emote_1="87bc3760-04ba-4aba-a13e-f32a4b184e90",k.Icon_emote_10="0a7c0150-1593-4f28-83a8-8db058a56f6f",k.Icon_emote_11="14c2cd40-929a-4228-a7a6-baa2e2e3bcd1",k.Icon_emote_12="420f9ab7-a292-4d81-b65b-6e56a2a4d47a",k.Icon_emote_13="f23b610f-dca4-416a-9d8c-11920ee091ca",k.Icon_emote_14="3d27405b-f9d1-44f8-b64a-66bb7111bab8",k.Icon_emote_15="8b4461fa-abab-4ab0-9fc0-6c6f83b2c61a",k.Icon_emote_16="26dfdc8b-2bc5-4fb0-bc1e-2d30fa50b241",k.Icon_emote_17="4e597cba-671f-4de9-8ef6-f000c7f28312",k.Icon_emote_18="a1eabf6a-41a7-4d81-93e9-3ce784a6eeac",k.Icon_emote_19="a2049def-b490-42ab-b3f2-48911445f808",k.Icon_emote_2="6c7f9552-4698-4731-873b-85bf33cbcc1a",k.Icon_emote_20="88a8d493-cea7-420c-85f7-cd2cbbb0dc8b",k.Icon_emote_21="9fc7b325-1740-4fb0-9623-8bb42b877e80",k.Icon_emote_22="e6bb1dde-6bb5-4a04-b2b0-982cfd8c811a",k.Icon_emote_23="c56cb871-84b7-43c9-98b8-c004219a3a00",k.Icon_emote_24="3bbede39-61ad-4823-b68e-00e68047ab98",k.Icon_emote_25="bbe79c0e-dc39-4975-8286-e7d6aed353bc",k.Icon_emote_26="cd58cb40-d7d1-4cc5-b372-9cf9214e8ffc",k.Icon_emote_28="7193f883-c1ea-4c64-8a3b-4fcbd01c2230",k.Icon_emote_3="c34a02c1-0174-4fda-8018-d5026be950ca",k.Icon_emote_4="0cdb8714-44ae-4322-a344-65a1f38ec1fb",k.Icon_emote_5="5a3069ac-2fab-4e96-b894-f5699af7aec3",k.Icon_emote_6="5eae56d9-611c-4535-9304-7c886b9f38b5",k.Icon_emote_7="0ac82307-6196-46a3-ade0-b8a24cf68ea2",k.Icon_emote_8="6f372668-c590-4c53-a66d-b89fdb3ea4a2",k.Icon_emote_9="e7b9474f-16b6-4c90-a58d-81f425cc2791",k.Icon_face_1="15be89c2-ad05-43be-85dc-af03ddecc9e3",k.Icon_face_10="db9d7259-a653-4f91-9983-f4ba8edb2d01",k.Icon_face_11="adebf976-0988-424c-b18e-fe08472f8e11",k.Icon_face_12="61725f9b-2320-4105-a12a-2f4db323fc37",k.Icon_face_13="408e3589-8d10-41bb-8d16-a060d785f60c",k.Icon_face_14="27e7238f-51f9-4b22-a27a-bc8a235d3e0c",k.Icon_face_15="be507ad4-2c9d-4a78-9489-a4b1445576a3",k.Icon_face_16="8eb2826d-3931-4778-9eeb-64774be9df71",k.Icon_face_17="d01d3059-0c24-49a3-b5e4-c0388b68582d",k.Icon_face_18="ef963721-e1ab-4596-baa3-48ad9c3b379f",k.Icon_face_19="b2c170bb-4eac-481b-aac8-0c0370bb9983",k.Icon_face_2="77845cf0-a961-4656-8cbc-3d73889b44d9",k.Icon_face_20="742ad13b-6277-4048-9d6e-d5d8b3dd09ed",k.Icon_face_3="a3bb7eff-e110-4f85-ad0c-9eb6b5d83837",k.Icon_face_4="40bfbe23-2637-472e-b5c8-fb3bdb601809",k.Icon_face_5="b87eeee9-3bc3-42b2-b037-00018010ffbd",k.Icon_face_6="9d914fe0-2eb0-4876-b3d9-d760c99198ad",k.Icon_face_7="1654c7bc-6a58-4726-b024-0bb2adfc1c3e",k.Icon_face_8="c4dc436b-abb4-4e7c-9c5a-62561c549a0f",k.Icon_face_9="dde26748-6111-4817-b4b3-4838e747e7b4",k.Icon_follow_1="5331593c-fbcd-46fa-95d3-c4bdf789e753",k.Icon_follow_10="e3c1a4f4-6610-4164-98f2-31aa6f02149f",k.Icon_follow_11="43641748-60af-4013-916c-0f02b8bc10aa",k.Icon_follow_12="301ceb1b-6eb6-475a-b182-2acee66b22dc",k.Icon_follow_125="399de882-1ccf-4556-8289-0243f7025d79",k.Icon_follow_126="da12e96d-c895-4abd-9ff2-c768db28d96d",k.Icon_follow_127="559a4486-e138-4655-a4e1-716fad3bae0b",k.Icon_follow_128="0682ecb5-29cc-498a-bf0a-3d2c78b701f5",k.Icon_follow_129="53c8c465-1a3e-4b96-9b6c-f40f69a28b40",k.Icon_follow_13="501824e4-36f7-4a77-9ab9-ba1f37ac1cd7",k.Icon_follow_130="b74a2f3d-aad6-4d33-9dcf-692560d651fc",k.Icon_follow_131="2da63051-0237-48f2-aa1c-88a9149a737f",k.Icon_follow_132="69ca5e4f-b796-4c77-ac26-4e84f2053599",k.Icon_follow_133="32ec5a96-3a8a-42e8-bf1c-7996ca78c738",k.Icon_follow_134="b1ca9337-3281-4ada-bd03-71c01cdc3e1a",k.Icon_follow_135="9a6671b9-7f03-4b1c-bce5-4ae924388712",k.Icon_follow_136="5ecbdee7-8d01-4bec-8b7d-b0664ea8b8f1",k.Icon_follow_137="e6a4f6e6-fa35-450c-85a9-2ff37f32532b",k.Icon_follow_138="46dd4a51-66bf-4952-8875-667c6b0904f4",k.Icon_follow_139="ac697412-1a63-4fc1-92fd-417eb5a112be",k.Icon_follow_14="d246ff46-ed64-4097-9eef-67ee415d85c3",k.Icon_follow_140="146b1068-42ce-4828-8a79-a8ce2746e367",k.Icon_follow_141="9f278441-d8c6-436a-9db4-3881b963686d",k.Icon_follow_142="287d1e95-24ed-4830-8bbd-7b97b3d7d0e1",k.Icon_follow_143="609d3724-b42a-435a-aeb5-f1f35a971a48",k.Icon_follow_144="6daa3c5d-4052-4250-8b29-db87387550d2",k.Icon_follow_145="b515023b-f8d9-4b0d-a3c5-58fb7ea7027f",k.Icon_follow_146="77cdb5e1-7b25-42a7-a9fc-2ac1d7cb7054",k.Icon_follow_147="f1b2fb7e-8f6a-4beb-9ee3-9674172fcdcf",k.Icon_follow_148="c22004cb-8cd9-4094-94bc-90bdf6124658",k.Icon_follow_149="5248feb6-963d-4334-b20b-5d88a90c9dab",k.Icon_follow_15="b99597ce-7193-4e5f-bca3-73ae669aa17e",k.Icon_follow_150="4cb61c2a-c4a2-4145-8677-4ad4be1f0478",k.Icon_follow_151="b4705a42-bf3d-4ae3-96da-1be8e2863bbf",k.Icon_follow_152="bdba4913-716c-4b24-b4c4-c2df39568da9",k.Icon_follow_153="7ee0472f-d8fb-400f-a90b-1055cecb8e4d",k.Icon_follow_154="428b9072-d4a6-4faf-bc4f-34cd81ebee5f",k.Icon_follow_155="aee71ae7-d14b-4263-a589-8044e830c8e7",k.Icon_follow_156="291191f3-c3a1-4615-b2c8-ce2355abc19a",k.Icon_follow_157="90d0e8ba-7d51-45cb-af9a-25f3d3480b6e",k.Icon_follow_158="a89d23fc-579c-46c2-ad22-0fdcb5cdf794",k.Icon_follow_16="c86c0c3d-ca54-4cee-8107-45a111e58922",k.Icon_follow_161="92b78a23-91c0-410e-87ca-baaf358344fe",k.Icon_follow_162="69e1ee26-a81f-4520-91cc-662803b488cb",k.Icon_follow_163="f977a05c-d8b5-46d3-9426-774a06cc8b3f",k.Icon_follow_164="2044b8bd-05b1-4adb-81df-fa4a41e760a1",k.Icon_follow_165="3c715731-9738-4076-b457-88082a22aee0",k.Icon_follow_166="dc5ebad0-3edd-4d5f-b507-86db574fbed4",k.Icon_follow_167="2fd04b87-4d43-4a3e-9032-bb140e60ceb5",k.Icon_follow_168="57aa3f19-9166-4b8a-88f0-02cc3f46cf74",k.Icon_follow_169="f728dab0-7c81-4583-a4e9-accc8e9c1947",k.Icon_follow_17="0318cf98-5981-48c4-96ea-43387f7b8631",k.Icon_follow_170="11c557f1-96a9-4733-90f0-a06a81dcfbe3",k.Icon_follow_171="93626a85-9d2e-4c51-aa71-9f430bdde436",k.Icon_follow_172="bcd68e0d-f3d1-41fd-90fc-ad822a17e92c",k.Icon_follow_173="2d93be8a-03c5-4362-8704-dffc4c5a5a74",k.Icon_follow_174="78b77ba6-e366-45bb-912d-5a05d8a9a446",k.Icon_follow_175="b333b46e-3ce5-4800-93fd-617d1c8b8e48",k.Icon_follow_176="040ef63f-7502-4eaf-a148-41fe5d2a4b4f",k.Icon_follow_177="71ba011f-cb77-4aa2-adff-bb5554f7a54b",k.Icon_follow_178="4c40ec3d-58fb-4863-bd20-f1652d8fadf3",k.Icon_follow_179="ebbb4674-1a9d-4fd4-8e03-ac8a54deacb1",k.Icon_follow_18="52749525-fcc8-4a6f-81d6-387c8283ddc2",k.Icon_follow_181="4642a690-b5fe-43a0-9616-781908db599c",k.Icon_follow_182="5be61588-e1ba-487b-93c8-713dfe9faac2",k.Icon_follow_183="4afddbe1-64e3-4cc4-9a01-a4898a21c650",k.Icon_follow_184="869785ab-c91e-4d7c-9057-ce650bda193b",k.Icon_follow_185="1348d422-c381-4b0c-9a3a-175eaf527da1",k.Icon_follow_186="752b85f4-06cb-48ea-9c1b-88bf1a3ac8fa",k.Icon_follow_187="a5c4e783-c03f-4668-ae99-d8520144f4e9",k.Icon_follow_188="4dbcefc6-f8e0-461b-80ad-8794565e3d4e",k.Icon_follow_189="62fada21-0922-434f-be1d-97e1136a3a89",k.Icon_follow_19="d7e5acb6-a3b2-450e-89c1-99aba818b848",k.Icon_follow_190="4e404c29-605e-4faa-a5c5-32073c7e722e",k.Icon_follow_191="9c8f5103-91aa-4ef0-8c78-44d33c7dbce1",k.Icon_follow_192="83f85dcb-7c0c-4894-be36-5e196453c6ec",k.Icon_follow_193="8cd5ccb3-a237-414f-b513-3177fb7bfa6a",k.Icon_follow_194="2e585d80-e968-4adc-8025-643859f3bd22",k.Icon_follow_195="51ee9639-f1a2-428d-87cc-d166c52f9e23",k.Icon_follow_196="905e38d5-be2d-481b-88cb-3b3fefcd93c9",k.Icon_follow_197="8de8ee24-835c-4829-a8e0-b74936c7c799",k.Icon_follow_198="9b438f6c-e2ee-4648-b076-f2a2e7addb88",k.Icon_follow_199="ba5e13c9-e2c6-4ada-86a5-26786210836a",k.Icon_follow_2="9b72f134-1db1-43db-90a4-5ec82d253511",k.Icon_follow_20="3f416ec1-8302-4e05-8165-698b25ff9a2f",k.Icon_follow_200="aa3a2e9b-5ffd-4d1e-99da-bf2401e41eda",k.Icon_follow_201="8c00fedc-4802-482e-abbc-176906f7f066",k.Icon_follow_202="37f79ca2-9004-4e5b-9524-d196ad8537a7",k.Icon_follow_203="21c55979-b4c2-4d80-92b5-d58155aca08d",k.Icon_follow_204="6ea8e508-3af4-4938-be4f-10d8e285db03",k.Icon_follow_205="8db46035-7a71-42b7-8d7d-cafaee2fd8fd",k.Icon_follow_206="2fe321f0-f195-46b2-9e25-70f0be0c61b4",k.Icon_follow_207="3943bdb4-d4ed-4674-845b-89f8703499b2",k.Icon_follow_208="2531c6b6-3867-46e7-ab05-3c4fc74672ec",k.Icon_follow_209="803313d4-0743-473c-a38c-13aeac8ada42",k.Icon_follow_21="88f15e3e-129e-4f30-a6bb-ed99d41e75ea",k.Icon_follow_210="c5d776a4-0433-47b4-ad85-3d63cb9e4480",k.Icon_follow_211="facca6ec-00e6-4f3a-bba3-097f7f45e5e5",k.Icon_follow_212="bae4753a-45bd-4520-b50b-11ffdf5a6c4e",k.Icon_follow_213="f5eff3b3-faba-40b7-ac1a-dfd4d3562836",k.Icon_follow_214="71ed34eb-0acc-4386-96a1-0ece9082184f",k.Icon_follow_215="a1540006-9fc9-4756-98e3-ceeab9cdb713",k.Icon_follow_216="853140fc-162a-4bef-b117-ed1b71c81e8f",k.Icon_follow_217="61ea7ca4-5731-40c9-ab35-f64cd835d7d4",k.Icon_follow_218="51329004-50b5-41ee-afcc-5f009e15e459",k.Icon_follow_219="cf5f3832-439f-4c74-935e-43dc1659c5b0",k.Icon_follow_22="89a2f542-9b39-41ee-806d-2f8fa0e54e9f",k.Icon_follow_221="5a95cada-b42e-44dd-a18a-89446f7b10ad",k.Icon_follow_223="0865eb45-950d-4309-b2c9-1f524d684494",k.Icon_follow_224="5421cbaa-aeb4-4af8-b4ab-295a86a3df28",k.Icon_follow_225="a169b415-819d-4962-b421-24b673851b54",k.Icon_follow_226="c1d74ef6-acbc-4171-bf4f-16c28b561b96",k.Icon_follow_227="6f096a7f-799a-4b11-870e-11d855f88946",k.Icon_follow_228="ed8052f8-69dd-42f0-b9c3-d076a3fcd4ca",k.Icon_follow_229="26ab6ddc-b3c3-456a-b3e4-e5e37387d74b",k.Icon_follow_23="c2483cc3-ed11-479e-a41c-9e4df652ca82",k.Icon_follow_230="1bcbbeb3-abf2-4e32-a0a7-f3a913c896b7",k.Icon_follow_231="e14665c7-e85f-4054-8458-d482665b49d9",k.Icon_follow_232="fb6b946f-4d17-47d0-bb7c-e13629018863",k.Icon_follow_233="51d8cf44-629d-4676-bd0e-417602000ab8",k.Icon_follow_234="08849952-15ae-49af-9c23-9d32fc65bc78",k.Icon_follow_235="17a81173-4c48-4f1d-baa6-881b1c45d179",k.Icon_follow_236="51edabd5-b29b-4758-9fed-c67ebdcb5d40",k.Icon_follow_237="431591b5-6fd1-463b-8b13-8279e9a62bca",k.Icon_follow_238="bf44ef68-3291-45b5-89b8-f66ab85ef752",k.Icon_follow_239="88fa68c4-1cc8-4421-b476-630d9e214d28",k.Icon_follow_24="e7342d06-8ee7-44ea-a914-63a7a243d0a4",k.Icon_follow_240="108ddb3f-a226-4b2d-911f-9bd6cd265a32",k.Icon_follow_241="2146cc68-6d97-42c9-a8a9-c50b3d8f1575",k.Icon_follow_243="e7fb7b61-0cb0-4982-a091-ee1773ac3b10",k.Icon_follow_244="9d58c222-6149-4acc-9ae0-175511cfab99",k.Icon_follow_245="f5a1047c-62f4-4233-90fc-9e9acde6cff2",k.Icon_follow_246="f4b20432-5448-4758-a7b2-ed3e5649b0d0",k.Icon_follow_247="e6f46bbe-0214-4ddd-a4df-f89e3aa5f45b",k.Icon_follow_248="57ece1f5-9af5-4d4c-b3d6-f348c8f1a6a3",k.Icon_follow_249="00cb3764-4854-444f-8f3d-e55df6ca073c",k.Icon_follow_25="316119a7-1f83-4f12-9726-9f8de9a3b8df",k.Icon_follow_250="fab51d5e-e41d-4476-ae5c-d3d96f6ba541",k.Icon_follow_251="f11bc26f-503b-45af-a017-0aeeb7b9b805",k.Icon_follow_252="fabeed26-d6e5-43c1-859c-14ad5c54f330",k.Icon_follow_253="1053a8e1-baf8-43db-af32-2806c4eb1add",k.Icon_follow_254="8e8f7ed6-a354-4f8b-9305-20a080ffbce2",k.Icon_follow_255="5bd143ab-8706-42ea-88da-e04702f2aa81",k.Icon_follow_256="4f545091-490f-4d39-8963-1fa5f6e4d076",k.Icon_follow_257="13082536-a1cf-4d1d-9715-2469a1987b28",k.Icon_follow_258="90dc7a95-6ae3-4ad9-9eaf-8c48d2327c6a",k.Icon_follow_259="e335186d-ff6e-45f9-ad2b-db01283d54ae",k.Icon_follow_26="bcb61a90-eb84-4d8b-86ba-338386ea24ab",k.Icon_follow_260="7db42e80-a40e-40d3-bc2f-d3d292b43270",k.Icon_follow_261="b9e785f3-2efc-497e-a76e-f89d41e25ec1",k.Icon_follow_262="b6c567b0-e51a-4fd0-b3ca-ce1eaad485f8",k.Icon_follow_263="3c02fd94-79c3-43d3-9b37-2bb3a5e19ead",k.Icon_follow_264="0d037285-881a-4601-a056-9401c68c4152",k.Icon_follow_265="b9dd0c2d-fe2f-4ec1-8b50-528a9ce4d64c",k.Icon_follow_266="85602694-00cd-49e9-a25b-a066e7d0c62e",k.Icon_follow_267="3f90bb61-b8f5-49cb-9860-9e90d7c5b85e",k.Icon_follow_268="e37ac522-c8ac-4aaa-94bd-17a6ece67464",k.Icon_follow_269="ff5501b3-68bd-4fb2-92b7-f04d2c1dd683",k.Icon_follow_27="6ef8aaa8-24ce-45a2-b9aa-fae2aa3bcb91",k.Icon_follow_270="727f159b-a37b-4783-b438-d34f09c88fa5",k.Icon_follow_271="55fd187a-0e19-4abe-88cd-295c6e842e75",k.Icon_follow_272="14354a18-516b-4167-8556-16f91346735f",k.Icon_follow_273="1ab1177e-73e6-43f6-9040-7d684da7fb53",k.Icon_follow_274="cfef7a1a-c44b-495c-a1e3-387ef1306619",k.Icon_follow_275="25d469f0-e1c3-4e25-a713-c84eb199af11",k.Icon_follow_277="598ef031-d213-475a-b662-17c034d0bcfc",k.Icon_follow_278="ac2467f4-c12b-4471-b18c-c42aa6d1b50d",k.Icon_follow_279="827b7fac-e325-447e-956b-61f8b3f97010",k.Icon_follow_28="106af062-00ce-4e59-8190-5cf55e1bdded",k.Icon_follow_280="2d30d250-9d4e-476c-a00a-c27de98e8bf3",k.Icon_follow_282="b3c9f9ae-9282-4235-b8e4-f40fd61fd1fa",k.Icon_follow_283="2f3fd239-fc25-413c-8e72-7f063474eb17",k.Icon_follow_284="262d812e-ac2b-48cb-bca2-c9d4fe958763",k.Icon_follow_285="214c8c98-8e98-45a1-9e07-ea214ffe7147",k.Icon_follow_286="736d2b9c-e9d0-423f-bfc8-e93323ba3920",k.Icon_follow_287="465e0d33-dce3-4140-8d63-ed32f77b852d",k.Icon_follow_288="fabbe4a8-9b87-4002-ac1d-01cf9186e6c1",k.Icon_follow_289="549577a8-65aa-48aa-9d59-f9932d3c90dc",k.Icon_follow_29="260f73d3-644f-45a9-8c1a-3899c6ea56cb",k.Icon_follow_290="45a09fba-2070-4868-985e-86dc711cc556",k.Icon_follow_291="53698d82-60b7-4283-94d7-050d1d1dcd2b",k.Icon_follow_292="698e0a52-4975-414e-b6a1-5fde43233750",k.Icon_follow_293="7cb193c5-e502-4f0d-94f4-b7ff49c427b1",k.Icon_follow_294="b60ddae7-eb2b-42fe-a076-0c6b9e118ae2",k.Icon_follow_295="3e195195-e452-43a8-aae7-ec237187482f",k.Icon_follow_296="7a6b59ef-6f3a-40bd-87c0-c8e3d2e7a748",k.Icon_follow_297="89369230-6620-4c3d-bde8-f6c5db892010",k.Icon_follow_298="63e33511-a2fb-495c-8068-fa3e950cecb0",k.Icon_follow_299="66b5de1f-ffaa-4d15-94ae-be3668dccd07",k.Icon_follow_3="79ef68b7-3657-4d3f-b84e-764767466cac",k.Icon_follow_30="0b0d3716-07ee-4943-a41a-58e7c165107e",k.Icon_follow_300="6c0a4132-801a-4966-ac95-a7fc87eeb411",k.Icon_follow_301="e0abbebb-6b36-44f3-9a8a-01c5b38c3028",k.Icon_follow_302="55d38799-e72c-4b23-9ce8-4d66dbda5098",k.Icon_follow_303="8206fd1a-7679-4be7-9fe9-7f286e50f469",k.Icon_follow_304="858ca73c-4e52-424c-a1d5-5938c388c4f5",k.Icon_follow_305="9bc90d9e-f0f2-47cb-989e-2932d3d800fe",k.Icon_follow_306="4f32701f-150b-44b0-a355-adc2e2aab288",k.Icon_follow_307="b4ac688a-c5a4-4e74-b286-9aafefe6c8a8",k.Icon_follow_308="fea975b1-db33-4573-8adb-f90b6c2e1469",k.Icon_follow_309="ac8e1806-509f-4dc8-9190-6758929026bb",k.Icon_follow_31="1bf5b050-7d54-4915-8033-28b2ba50c62e",k.Icon_follow_310="4790f0db-66bd-4148-a84d-abdac5894e8b",k.Icon_follow_311="21cecf6e-075a-463d-8f25-e1198c512979",k.Icon_follow_312="202e93bd-f850-4e36-8e35-61def6b7544a",k.Icon_follow_313="3e344c7c-b3a8-49a8-9755-c19aa308a96b",k.Icon_follow_314="5fa07e18-34df-4964-8155-69a1183669cf",k.Icon_follow_315="1d1248af-dd84-4fdb-a95d-8678bce72b35",k.Icon_follow_316="7d687582-8fd7-473a-9fcf-8650fa8ee065",k.Icon_follow_317="394935ce-1d8a-4910-9515-00f42b8de8b1",k.Icon_follow_318="c1502532-f818-4ac5-9b19-5da2cf16cd1c",k.Icon_follow_319="2267a524-8f0d-4527-a76c-657702634e24",k.Icon_follow_32="403a9a8d-9b89-4e0a-8c88-b7ec5748d2a9",k.Icon_follow_320="12168a1e-4b67-463e-b768-5798aa5d7416",k.Icon_follow_321="aed10ae6-a550-4e1a-98a3-460784b38696",k.Icon_follow_322="2b57dbba-c25c-42f2-a0e9-e3d187a2a35f",k.Icon_follow_323="c26dd27f-12d5-4d9f-9d79-f1e61a86b596",k.Icon_follow_324="10aa0965-527f-4fd9-a9ab-3727df9697d1",k.Icon_follow_325="339c1878-ecca-4753-87ac-c41b7c361ef5",k.Icon_follow_326="aea16c69-9cc6-4174-9a1c-5d8459564d86",k.Icon_follow_327="c9ec51e8-0af1-49bc-ae6f-65e18aaa0ccb",k.Icon_follow_328="d187c36f-fb00-44f6-ad9f-68031cc115b8",k.Icon_follow_329="56e44362-9443-4880-9f03-87a8654e9797",k.Icon_follow_33="a3bda44c-4160-41bf-9636-819252425230",k.Icon_follow_330="42975065-939f-4270-b503-8a95cebea8ce",k.Icon_follow_331="6735e1bd-4b33-4f20-bc61-496f6fa572dd",k.Icon_follow_336="125fb686-be2f-4266-b67f-5b5e2fb579f7",k.Icon_follow_337="8a82df07-6501-470a-a053-97cb4cd8a0a2",k.Icon_follow_338="9d658f38-bae3-4edf-ac42-693424514877",k.Icon_follow_339="63bb4fe7-7877-4d48-9d7a-48370725c6ee",k.Icon_follow_34="b5aa47bf-a72d-49af-a82c-42b77f39c9de",k.Icon_follow_340="bde7c8a1-bd26-4daf-b3b8-59abb925f418",k.Icon_follow_341="343a1de5-7fab-48e8-86a4-43ce8db9f904",k.Icon_follow_342="f9708f05-cb45-40d5-8c3a-8e6d7c7af727",k.Icon_follow_35="7a5f6c6b-dd19-45d0-bb57-231044bf6072",k.Icon_follow_36="c9df5789-a5b6-4dcc-97fe-e38b130e3155",k.Icon_follow_37="1c2e03f9-060e-4996-8f1a-56a8ff085a09",k.Icon_follow_4="83ce3b90-9e92-4f79-b991-6d0c640023cc",k.Icon_follow_5="24aa0dfb-6d7e-449e-aae5-fc7a84670681",k.Icon_follow_6="614f5649-f4f2-4d43-859d-3f5d0655bacb",k.Icon_follow_7="96aa5480-c88d-40be-8db6-b171c4c04fcd",k.Icon_follow_8="6c57383f-6676-4532-9d45-06634fd6dea6",k.Icon_follow_9="e6f7e9bd-e5f9-4797-97d2-3e06839ce134",k.Icon_fossil_1="b70fbb76-5cc9-4a04-b6f3-aa406a1677e7",k.Icon_fossil_10="fd30c231-318a-49fb-bda8-1f2bfbc7e2e1",k.Icon_fossil_11="09f110ff-7313-4ebc-b43e-d6015eb939e8",k.Icon_fossil_12="f0673c90-9009-4d57-8ca4-16e43ab38250",k.Icon_fossil_13="fa068613-e4b4-48c4-a0ee-17ae8650bf86",k.Icon_fossil_14="abc815d6-1653-4e66-8a35-2a878653ccc5",k.Icon_fossil_15="84131a61-473a-4591-ba62-15965feb275f",k.Icon_fossil_16="24db8398-d31d-4848-b127-e38143db94d5",k.Icon_fossil_17="b0f22083-8473-4148-9dcd-ea3a91e26ff1",k.Icon_fossil_18="408b2328-9bd6-4d5b-ad88-5fe26b848ae5",k.Icon_fossil_19="b0b2ad0c-74b7-4cc9-9b46-458067c60389",k.Icon_fossil_2="cb62c437-2e48-4de0-afee-f75546372fcc",k.Icon_fossil_20="32842687-5da9-4047-bdcc-c06715cdba5a",k.Icon_fossil_21="89e0cb13-89f0-4925-8603-5b239f9c7648",k.Icon_fossil_22="e809d2c9-e9b4-4378-9995-e07fe136281d",k.Icon_fossil_23="325302cb-f15e-4303-b765-d0c16500951c",k.Icon_fossil_24="e0ec93d8-b469-4f61-99b6-21fff61d3557",k.Icon_fossil_3="addc9dde-0c32-4f42-932e-61ecfd002979",k.Icon_fossil_4="1abe5fbf-a1ff-4e94-9c8c-a10d936a7981",k.Icon_fossil_5="d9674bca-8727-401f-8376-b5f08d7fc846",k.Icon_fossil_6="f47b51c9-5494-4806-ba81-627d7a9ea716",k.Icon_fossil_7="f60a28c8-267c-4641-b464-3a4c64676bc2",k.Icon_fossil_8="5271d685-fc72-4e97-9457-c52c0d0f94ea",k.Icon_fossil_9="6d706465-6ec7-44c6-9fec-7ca9b40c6cdf",k.Icon_gender_1="b75d3a12-2b7d-420d-af3a-02dedbdfb7f5",k.Icon_gender_2="46eea9f2-8e75-4014-b014-0f152c79a0ff",k.Icon_giftBox_1="e05d75c3-33d6-4809-847d-15f4e0ee3960",k.Icon_hairColor_1="aea5f953-343b-46cf-be85-2a063d86ffcb",k.Icon_hairColor_10="9374acdd-febc-41d7-80d4-e2bb004d57a0",k.Icon_hairColor_11="b9ec336c-514e-4436-aa57-6934dd036d82",k.Icon_hairColor_12="ffdd53b5-0806-40a0-8c86-0313a1d2c5cc",k.Icon_hairColor_13="a06178f9-afa5-4ba7-82f0-e166282ef25a",k.Icon_hairColor_14="7975a528-4147-45a6-9116-b7e022bd14bc",k.Icon_hairColor_15="61281058-ab22-48cf-96a3-f390985a0c60",k.Icon_hairColor_16="903ce3f3-2d4c-42f1-a1bb-36390e47e330",k.Icon_hairColor_17="b224d601-e579-438c-a56b-92417a3b7deb",k.Icon_hairColor_18="0ee47cb6-24f7-45c0-8595-652e928890d5",k.Icon_hairColor_19="386a93cc-a979-43f7-b56c-0ef1d443032e",k.Icon_hairColor_2="1bba717a-10f7-4c98-8a40-ec19538ef32f",k.Icon_hairColor_20="b454f03d-e03d-44a8-9ee3-de6d0395dfe0",k.Icon_hairColor_21="ff11049e-0416-4ccf-8e2a-c64bdaa68059",k.Icon_hairColor_22="99e7cb43-e3de-4e0e-9cf4-79a921b216d1",k.Icon_hairColor_23="07f03731-a851-4093-8fb3-df3d0f96f6d4",k.Icon_hairColor_24="744e1228-cf3a-4264-a9e8-9e5f19d7aaa1",k.Icon_hairColor_25="0fbc476e-a81a-4315-bee2-0ea6e1e97eed",k.Icon_hairColor_26="7a4a4b7a-062a-4a17-9dee-b1f30adc91c1",k.Icon_hairColor_27="656df49e-d770-4f3a-8b6d-b98ff6794864",k.Icon_hairColor_28="60fb96ad-b32b-43c5-a2eb-e1df004f6164",k.Icon_hairColor_29="90798e46-1000-4693-93e3-25045c8440c5",k.Icon_hairColor_3="e92e6605-cd81-40e8-a044-6b064347db95",k.Icon_hairColor_30="a6951141-db33-4c4c-9065-67ff7f17b91e",k.Icon_hairColor_31="784689e0-1f16-4b06-8a22-9f6708eae845",k.Icon_hairColor_32="f0a0daeb-0e5c-487c-ad54-ac46dc318c4e",k.Icon_hairColor_33="6953b59d-14d5-4bf6-a0b0-e25adabcde6e",k.Icon_hairColor_34="4ad225bb-74ae-41fc-a424-e884a6a8f541",k.Icon_hairColor_35="4d1e2229-b4d3-4b63-9cbe-26558656cd1c",k.Icon_hairColor_36="9b93c20a-1937-43ce-b454-87a1e3536852",k.Icon_hairColor_37="9b346fd3-51b1-4f7c-9d0b-2e4cfd3138ec",k.Icon_hairColor_38="ba537540-2ae4-47ee-9024-33f678e78cf4",k.Icon_hairColor_39="fe784858-e7df-445a-bbcf-5f7a42d3ebac",k.Icon_hairColor_4="3e70d556-f75f-450e-aa30-d4efd1a5d885",k.Icon_hairColor_40="6f4d8fe7-f795-441b-a3c2-0773014acc29",k.Icon_hairColor_41="5c1bcdcc-2248-4e05-a7b3-0e82dd1ff4b2",k.Icon_hairColor_42="d69f87c9-f055-487d-b890-9d1dbc092fdd",k.Icon_hairColor_43="e90c5cf3-caf8-4bc6-a556-ad063d6adfc7",k.Icon_hairColor_44="4f36cffc-f8dd-49a5-baa3-0071298002c3",k.Icon_hairColor_5="5e22c25a-8ef3-480f-991e-30d07b82b39a",k.Icon_hairColor_6="ab08ae25-b316-4b45-82bb-eb5cc786e530",k.Icon_hairColor_7="5c1ebe60-5b29-48b9-8b5a-7e79b85607d4",k.Icon_hairColor_8="ff073fce-778a-43fa-8fa1-e1d05140ba9f";k.Icon_hairColor_9="897fd708-60a9-4188-aa3d-538816b3d611",k.Icon_hair_1="2807c0bb-bffc-4673-bc26-366c3fa1137a",k.Icon_hair_10="48f5cc9c-39f4-4548-8f99-e4515d8cee0f",k.Icon_hair_11="83108906-9fd4-47c4-8ee7-316cce1dce08",k.Icon_hair_12="d1b7fc90-7063-4a03-ac50-720581ef0704",k.Icon_hair_13="57cf7f6f-9340-46aa-8bc2-5eef1cfbf033",k.Icon_hair_14="034e0504-7870-4b5d-9d18-02f24ed70cb7",k.Icon_hair_15="feb79385-3505-49e2-b044-51f28c625f4b",k.Icon_hair_16="41edfe80-d36c-42c2-9e33-e3c9954db520",k.Icon_hair_17="093dda22-0397-4bad-a404-0953826c3bab",k.Icon_hair_18="ba379495-5a77-4580-b467-628cc9a83af9",k.Icon_hair_19="95791ed8-5d0e-41fc-b345-94996b7f3be7",k.Icon_hair_2="4b28281f-18a6-4a2c-bb47-20b7d9bd24b1",k.Icon_hair_20="31761abe-9b6b-4de8-852b-571a371be744",k.Icon_hair_21="0d016813-5172-4970-9870-c12ef748837c",k.Icon_hair_22="da2b7830-6db7-49de-a745-33c854180a44",k.Icon_hair_23="dfa8aad0-c719-481f-9819-1300071fdd9f",k.Icon_hair_24="48c40ba5-ea21-460b-bca3-c0a694770640",k.Icon_hair_25="33cec843-face-4b86-ac84-d65d92836deb",k.Icon_hair_26="e478b901-c6f2-4728-949c-1f3c3c9a4790",k.Icon_hair_27="b62c622e-236b-4820-89c8-1a55ff2bb026",k.Icon_hair_28="9df96bd5-b56f-4d50-96c2-03a42c2cce08",k.Icon_hair_29="56ec1b4c-d791-44e4-bb0d-d00c80dd1da9",k.Icon_hair_3="3f1983c7-ed98-46fe-abfd-6e6f7fc3d72e",k.Icon_hair_30="f9b35a76-83d3-4de7-a16a-aa081b4946e6",k.Icon_hair_31="cb71c0e3-b26a-417e-a4a3-a35f7ec33d00",k.Icon_hair_32="226e4cd9-4e20-4610-b070-dcd32842eba4",k.Icon_hair_33="b3dd7d99-4b9a-48fb-a659-c4f41722ac58",k.Icon_hair_34="e54bc531-d1d4-45e9-b82b-aef55f6d9e98",k.Icon_hair_35="611816e8-aa37-4987-991c-c499907dc4ef",k.Icon_hair_36="c5ce29b9-11a1-4cd3-8b09-943e5d5e7c87",k.Icon_hair_37="d37bc752-7955-414d-a944-82e8b72c5556",k.Icon_hair_38="71407641-e329-44d8-9aba-3255a2d2de56",k.Icon_hair_39="60831207-dae8-49d0-a4c4-6214a409923e",k.Icon_hair_4="57bbccec-0b21-4565-89fd-aafac39bd677",k.Icon_hair_40="54027259-964e-4440-ada6-3ab4bfe1bb87",k.Icon_hair_41="7b38e0e4-b756-4c2d-af82-c6b6abe832af",k.Icon_hair_42="8e41baf6-f35a-40a9-9fbb-3eef5bf439c1",k.Icon_hair_43="63529f14-18da-45a3-8b8e-34851d4f79d0",k.Icon_hair_44="44e7ed38-b04c-4c08-b149-b748bcadfb6d",k.Icon_hair_45="984bcce6-4a50-4c22-95e3-f78937767f89",k.Icon_hair_46="4e8644cd-6697-4526-a06e-9f37206bf0d3",k.Icon_hair_47="42bc1ccd-9676-4137-9db2-8f8f4dbb8d7f",k.Icon_hair_48="114a8bfa-3942-4b22-9d40-35bedcf5535e",k.Icon_hair_49="2e3186e7-7da2-44ad-979b-4469e2020a7d",k.Icon_hair_5="4db33606-9eb6-4244-ba28-306747e8d883",k.Icon_hair_50="b6b065d0-a144-4ceb-9aac-ab0d655c51e8",k.Icon_hair_51="c12f0e6f-c0d5-421a-b660-86aaf66e8204",k.Icon_hair_52="fe5d5c8c-c84a-4594-954d-33b08fcb408e",k.Icon_hair_53="8b35978d-46a2-4513-ad6b-b1a4b6c2a632",k.Icon_hair_54="1c444035-c494-4016-a43e-e158f91158c3",k.Icon_hair_55="cb2af9aa-f7a6-4964-87be-5b05d650d40e",k.Icon_hair_56="c2bffc4b-0a66-40eb-9605-e4d02ac9c5bd",k.Icon_hair_57="a4d500ba-6b81-4ace-88e0-590b12fb4a68",k.Icon_hair_58="4e2b275b-649f-413e-94f8-93dc46f51fa9",k.Icon_hair_59="5d94a50a-e00b-4476-8d14-912b4431aec6",k.Icon_hair_6="4e9e8092-2fac-47de-a70e-826771e56104",k.Icon_hair_7="38f4787c-2299-4d8b-9ebb-83c0d7da5ca4",k.Icon_hair_8="686fe7aa-e815-4398-9ae4-feb864c45bb2",k.Icon_hair_9="37d48da5-7981-4bf2-bc89-6d9a6e0c97d9",k.Icon_hat_1="83c3c738-d4a6-4124-8c24-adb6ca9461db",k.Icon_hat_10="b738e945-0d8f-4e34-ae3f-c6104413660b",k.Icon_hat_100="5bf8e5b2-4fad-4857-a91e-dfd37f64ede9",k.Icon_hat_101="841464b4-880a-4fa5-a0bf-2fdb5e640c6c",k.Icon_hat_102="5874d231-8e1d-40d9-9439-1bc7564a5bd6",k.Icon_hat_103="1c8b90d5-33c8-4135-923f-2db9241412cf",k.Icon_hat_104="4a05753f-ab15-4f5f-bdc2-4587049d5cda",k.Icon_hat_105="6a823427-b822-4afd-8516-aa10263f0a23",k.Icon_hat_106="b5d446f5-ef83-4cbe-aeec-d6bcc5f9e878",k.Icon_hat_107="da7bc4f5-d913-4d04-8f9c-2db156f2d0ba",k.Icon_hat_108="5de06206-799e-42cf-98e3-d41e8e5d849a",k.Icon_hat_109="55a17c14-2ec8-4868-b2bb-8db582237076",k.Icon_hat_11="1e5f339e-81d9-4a1f-baf9-3daa5d9733f0",k.Icon_hat_110="7cf646d4-9b14-446d-b5d1-9f78a889f6fe",k.Icon_hat_111="c839d016-d8ac-4271-9909-d1513718ad60",k.Icon_hat_112="4480926d-4ad8-4375-b737-15504a85ce1f",k.Icon_hat_113="c798cf5f-3686-4d96-ad08-33c6e8de2e9a",k.Icon_hat_114="80c627e6-0aeb-449d-a945-1bb00833e8bb",k.Icon_hat_115="93d44f92-3dbc-4b36-90c1-73d60aec1fa6",k.Icon_hat_116="2bd842b7-5b3e-4bd2-aaf1-1f37f1f2ac22",k.Icon_hat_117="e6f80732-f34d-4c4f-82a4-ae6a5f19872f",k.Icon_hat_118="48f36fbe-56f6-4b2c-9d42-d22f1963bf63",k.Icon_hat_119="f5437035-7618-45c5-a24f-9ee3f0f40252",k.Icon_hat_12="937dd47d-20d8-447c-91f3-0b2da91f7f37",k.Icon_hat_120="9fefe71c-7006-4abf-b571-a6a52be1e790",k.Icon_hat_121="e8d58dd1-aa04-43dc-9042-4db39dc74304",k.Icon_hat_122="8b05c2bc-720f-4eee-96a4-e5bd3a2d6ecb",k.Icon_hat_123="8ea12d95-4c11-4da9-804c-b2fa7de7e9c1",k.Icon_hat_124="af541447-2225-44a7-ad4c-dce519240cb9",k.Icon_hat_125="21444c38-6db6-4879-a998-956392e28024",k.Icon_hat_126="ab616468-d06f-4407-90d1-166bc3d7d41e",k.Icon_hat_127="bf8255dd-f2e7-4f76-80d2-1cc63f2c3694",k.Icon_hat_128="b5e872a9-43a4-4c23-83e4-ca81d185521b",k.Icon_hat_129="7efc0d93-00db-41ef-aaff-fad7976a48f3",k.Icon_hat_13="8230c60d-cc87-46c6-be44-77b99dcf8d0f",k.Icon_hat_130="17df02aa-c574-425d-8226-b77246c60a0d",k.Icon_hat_131="6e51c563-8806-4030-849a-700145ebdb64",k.Icon_hat_132="6575fbe6-14c7-4969-b128-108f40dea7cf",k.Icon_hat_133="8d097384-4bfa-4ae4-bef1-76a15823b2d2",k.Icon_hat_134="d5e4652f-e6d2-4561-8d19-66baf20c932a",k.Icon_hat_135="c00fb227-eb72-4e6d-ad0d-a5f401e806fc",k.Icon_hat_136="f891b2d5-ac3d-4413-b981-a692d808bf27",k.Icon_hat_137="23788ae3-2b83-42f6-b70d-78c417e7a356",k.Icon_hat_138="ae8bf3c8-0441-417f-a398-a33d924027a9",k.Icon_hat_139="fd78743c-741c-4cf7-bd23-6c4369fc1d0d",k.Icon_hat_14="7127c1ec-99c6-45ee-88c9-0aaef6485a93",k.Icon_hat_140="bad1d8a2-c9b1-4514-a80b-98a007e4e75d",k.Icon_hat_141="164d2de5-3ce4-44b4-86d4-cba0e3d06b4a",k.Icon_hat_142="0d00f58c-3527-4a00-a1a1-52452220a05c",k.Icon_hat_143="b2f82118-ba27-438d-957d-1c6266edf7fa",k.Icon_hat_144="5f580659-c835-45ce-9148-c316e6b9c9d4",k.Icon_hat_145="ca0b8956-3168-45a0-96d9-d14fe068c755",k.Icon_hat_146="b1cf7976-f3ca-4376-8077-9b505b33c54b",k.Icon_hat_147="280f453f-81a3-41d1-b85f-d6ba6b7f4907",k.Icon_hat_148="7789a31c-6339-4fbe-9e5f-0e724a536272",k.Icon_hat_149="6a1478d2-effb-4e78-a799-ffa7dd6bf915",k.Icon_hat_15="6009981e-b2b9-495f-aa9a-fc270b63fd86",k.Icon_hat_150="692472c0-e70f-4e21-b4b5-5161e5ad3ee6",k.Icon_hat_152="0ec17d79-a477-428a-92a2-9bd40cf0de12",k.Icon_hat_153="5de443af-4c13-4c6f-bc98-87a9d4a9d8f9",k.Icon_hat_154="0ac38bdb-f1a7-4ebe-9165-957c96497633",k.Icon_hat_155="e5793aaf-398a-4f43-b3fe-d137578a5927",k.Icon_hat_156="3c3d5fdd-b045-4b20-b85e-4afc1972011a",k.Icon_hat_157="e05567f3-ae59-4a1a-a530-4bf13554ee20",k.Icon_hat_158="b24c6790-33ef-4aee-93f5-2dc7110c43e6",k.Icon_hat_159="587fc5f9-7b45-406f-ae3c-7cfa1528dc75",k.Icon_hat_16="91fdbe11-0033-428c-9231-0f0fe7e2c5de",k.Icon_hat_161="765d5483-3428-4f55-ba61-417cb902fc81",k.Icon_hat_162="50aa34ee-67fc-440c-b3ed-080823c2b69e",k.Icon_hat_163="374d1be7-a3af-4607-bc0d-71907111f53b",k.Icon_hat_164="996167a0-fceb-4ab9-90f6-74ebb80f10ef",k.Icon_hat_165="9ca0d273-763a-4356-9495-08b128a88427",k.Icon_hat_166="e84b8a66-3172-49a7-a8e7-02dd2f1e3fef",k.Icon_hat_17="728d0d86-107b-4e62-816d-11c5dd111827",k.Icon_hat_171="313734c5-563c-4b9b-b039-2064c4689efa",k.Icon_hat_172="6fbfa08b-26c2-4450-a577-93f1d086124c",k.Icon_hat_173="2795079a-7e2c-430d-802e-c3ff8f248f06",k.Icon_hat_174="8acf9e27-6bcc-43fb-94f1-64b47df75cf4",k.Icon_hat_175="f8d03fcc-61a1-479f-9d9a-c3406fabb319",k.Icon_hat_176="946ccabc-5e76-4ea9-8d84-ceafdc31dd14",k.Icon_hat_177="920a8f1a-f406-47db-921e-e356d3d0ce16",k.Icon_hat_178="7dc7e0ba-76dd-41cc-90b3-3fc8a983dba9",k.Icon_hat_18="fc43b4d6-ca6e-44e9-928b-7037380acf78",k.Icon_hat_180="42188e74-b6e8-40f4-909d-b82e13dcf8f4",k.Icon_hat_181="0a401ed1-d560-4a44-8cc4-6316a2bb5827",k.Icon_hat_184="884806b0-4a79-4d4a-8488-c4f7935d7e58",k.Icon_hat_185="4de1b292-9748-43d4-8d31-4ec399a93412",k.Icon_hat_186="2c857407-d904-431a-ab52-d2ef3213e33a",k.Icon_hat_187="1f0b035f-6497-402f-b894-a107e1a58a30",k.Icon_hat_188="48e2c3ba-73d3-413f-b6ed-935ffde3b6de",k.Icon_hat_189="eae8b398-1166-4d26-bf35-84c74606476f",k.Icon_hat_19="cc2b13c1-32da-46af-bc77-528ffd4c5593",k.Icon_hat_190="9831227d-7a0e-465b-a48c-3e08d5598377",k.Icon_hat_191="9309524e-d3d5-40e7-b053-246de6a296fd",k.Icon_hat_192="21692d37-26f1-4367-bd34-c354abbe680b",k.Icon_hat_193="79659fea-ff13-4576-8dfb-b0f00e41a0e7",k.Icon_hat_194="4c58b4ad-519d-4b2d-9277-a98e6b254589",k.Icon_hat_195="e6581c40-6184-47e2-b5c0-21ac43e427c9",k.Icon_hat_196="e6f1ad1d-63b3-4de6-adef-fa1afb301217",k.Icon_hat_197="92928596-ca59-4fcb-bab0-db15786ef56a",k.Icon_hat_198="31ca4dc7-0b1b-40ff-828e-02d90aab1126",k.Icon_hat_199="399b2c57-e02e-4b06-bf74-40024f4a5d90",k.Icon_hat_2="12cdea03-a475-448c-b9fe-45a8a4d365ff",k.Icon_hat_20="4eff8574-5bc9-44c4-a2fa-b31d13d38837",k.Icon_hat_200="3474469d-d525-4d36-ab70-6991dacfd6e3",k.Icon_hat_201="e7d47a1d-a3fa-4e43-989e-b5614b38b10a",k.Icon_hat_202="20404a4c-1ede-4648-846a-ee0388013917",k.Icon_hat_203="f170eced-8197-4dde-979a-e97ae355d52f",k.Icon_hat_204="b5896c1d-abfe-4be4-91d4-8158a9f592ec",k.Icon_hat_205="e2f21a82-d7c1-4b62-b2a1-6d256e3665c7",k.Icon_hat_206="8f3832de-042d-4199-9250-181628e5a9a7",k.Icon_hat_207="1906df17-6efe-41dd-906f-c829b44b5de7",k.Icon_hat_208="2a0ed41e-da55-41e3-b455-3258ba8a897b",k.Icon_hat_209="7c71662d-1261-4e41-9250-6b927ae8b605",k.Icon_hat_21="8b353b41-2e50-442f-8949-df7cd98f7de2",k.Icon_hat_210="d0735b75-fdad-4403-92a3-2c103235c3f1",k.Icon_hat_211="ce8a9dca-2e0d-4196-bfc9-6e9c541f2567",k.Icon_hat_212="bbeec574-0c47-4973-8898-a5a54e6ffdae",k.Icon_hat_213="f1e361fd-684b-47c2-a9ab-d9ed8dc82f2c",k.Icon_hat_214="f83ec842-c1eb-4486-b09c-1f9c24bc8d43",k.Icon_hat_215="725467bc-fa0b-4a68-8673-4a605a3cf0e0",k.Icon_hat_216="f4d98661-50ed-4937-882e-ce7b6011622a",k.Icon_hat_217="45f5aa78-a6b1-4d5f-b967-b7f7ef41205c",k.Icon_hat_218="3dcbe2eb-f0b5-4367-b269-818609c3bcf0",k.Icon_hat_219="00b2f5c6-fe08-4b90-b0ea-4d3d32edcb44",k.Icon_hat_22="4f2720d6-d83d-4cd6-a44f-1c2842ece537",k.Icon_hat_220="ed760e0b-3e4f-4f3b-af74-bb4413841dcc",k.Icon_hat_221="97d20079-6ac1-4911-b9ea-98d6024510b5",k.Icon_hat_222="f64e3022-6f02-49e3-a6c7-c5d489ac267b",k.Icon_hat_223="d8164238-b80c-4221-bbff-5e6c112f82e1",k.Icon_hat_224="1a06e85f-5fc0-4db5-bbb1-a3ffa542c6d9",k.Icon_hat_226="55ff03c9-cb33-448a-aa3b-9d39ae0296f8",k.Icon_hat_227="896852fb-f6ed-40ab-ad50-2525f2330bf1",k.Icon_hat_228="f4891cb9-d329-44ff-83fb-b3af641b6e76",k.Icon_hat_229="a2123ac4-d643-4261-b796-236410f04d1a",k.Icon_hat_23="777f79e1-f83b-4368-83e2-36d70ae2c9a9",k.Icon_hat_230="63d1d0fa-efa2-47b0-8c28-c4ad60b85073",k.Icon_hat_231="b0e85db9-4eab-44f6-a821-7a2da256e2c7",k.Icon_hat_232="9b9ab676-907f-4fe0-ac8b-f7540cd768f0",k.Icon_hat_233="2d0e744e-551a-4194-b44f-d298a24fc15b",k.Icon_hat_234="a804a4a7-a3c3-405a-926a-5c5502adbad2",k.Icon_hat_235="0df8611f-81c5-4b0d-ad61-24b948e1a35c",k.Icon_hat_236="239e0927-a61f-4fd7-b6e8-da003b34fadd",k.Icon_hat_237="9bf538b3-1cd9-48e6-9a2e-5b490e3c98d5",k.Icon_hat_238="18f92cd1-3667-4b67-8ea6-c5e8290cc861",k.Icon_hat_239="32a28fc8-79d2-49d5-af32-007d1a76ef98",k.Icon_hat_24="911af0bb-71de-429d-8595-7a524b7270ec",k.Icon_hat_240="dd60d86e-cf5d-448d-94e6-c3159a9fa560",k.Icon_hat_242="a0517f1c-16d6-4dad-b42c-34395af3897a",k.Icon_hat_243="f11c8f2e-986e-4598-a1e0-b14f2acdeba7",k.Icon_hat_244="163b1bf1-b5b3-4ddc-92d8-c045ccf8c570",k.Icon_hat_245="068be377-06bb-4611-8ed8-11e44af86f61",k.Icon_hat_246="816d6ef8-f7bc-4510-afda-615237a85819",k.Icon_hat_247="826570af-65f5-4007-87a6-b6c3844ae5dc",k.Icon_hat_25="eafd6a6b-04a4-4514-9112-5f76ca923c0b",k.Icon_hat_256="a7b20dac-0e40-419e-8568-ab4ee971279d",k.Icon_hat_257="8bac1f24-945d-4f4e-967d-c0ae076d6475",k.Icon_hat_258="05ec0401-3428-460e-b339-766b7c792c54",k.Icon_hat_259="44451a60-e342-4737-b808-c08f91abeb5d",k.Icon_hat_26="1c1e526e-077e-48f1-92b2-e4a4fcde77c5",k.Icon_hat_260="78e7a333-23dc-444d-bfa6-f93d4b09ef27",k.Icon_hat_261="9d170116-b9f9-44fb-88ac-ec01efeb2e59",k.Icon_hat_262="18ffcbbc-c65b-4162-b17d-4933ad89d8e8",k.Icon_hat_263="09426a56-3405-45a7-92f1-1a243c2939b6",k.Icon_hat_264="3927e5bd-4b65-4023-9ae6-883013b2b0a5",k.Icon_hat_265="5da080c9-8b23-4ace-af7c-ed7a099c1ee5",k.Icon_hat_266="df81704b-0007-4228-8e51-79abf5fc3145",k.Icon_hat_267="22af38c0-1acd-49ed-b16c-d3fb16f10ca1",k.Icon_hat_268="c1520ad5-5ab7-4511-9f57-4de63e99b0b7",k.Icon_hat_269="7008f7df-e6a9-4ea8-a7dc-3dc8960c899e",k.Icon_hat_27="24c5ec58-7647-469a-b6e1-dee3be16b8c5",k.Icon_hat_270="0c05ece1-5b61-4c1a-9287-70998f811c89",k.Icon_hat_271="fe2877ff-1549-404e-882c-3caa5267999b",k.Icon_hat_272="bd59620f-aafb-41e6-ae19-21f4119581fe",k.Icon_hat_273="1caa5b01-fcff-41f1-9e71-81f1a0f2407d",k.Icon_hat_274="d7acd8d8-ce1d-42e2-a69d-5b9cf6a5ae21",k.Icon_hat_275="aa65a3c2-d5d4-4606-a3e0-02add5ecf9e5",k.Icon_hat_277="e370be3a-58cd-4374-a891-12e39c958f24",k.Icon_hat_278="9b3299fa-4c90-4fe2-a6c9-66bcd751184a",k.Icon_hat_279="ff4ed695-e2c3-4b83-a31e-3f7786d96758",k.Icon_hat_28="5db0ffe7-e8bd-4486-bfaf-6cc883ea6f37",k.Icon_hat_280="ecbcb6a0-666e-4b6a-845b-84188d45a74e",k.Icon_hat_281="da178f68-c6d9-48ec-96bf-3a5e98be580f",k.Icon_hat_282="5e8e7057-eb8d-4a38-bfa2-d51de3581d1c",k.Icon_hat_283="c031da89-5676-457b-879b-ce734d08ff51",k.Icon_hat_284="a639a955-ab23-475f-808d-1664c85db909",k.Icon_hat_285="01c96c3b-6201-43a9-bba6-47092307faf4",k.Icon_hat_29="2b3e409e-d912-4c29-ad3f-2a4da158a1cd",k.Icon_hat_3="b0272671-f7f0-4133-83c8-208bcd39c8da",k.Icon_hat_30="4b80292c-3245-4521-b10b-f9e515d33d7e",k.Icon_hat_31="86b45eec-156d-4181-bc0b-82b9df8c2a41",k.Icon_hat_32="f7273d6c-a803-413f-8d91-cc920f4108b1",k.Icon_hat_33="1e9e9336-22ad-4afd-bee1-cf8107a991f8",k.Icon_hat_34="f3fcf77d-72bb-4980-8e05-23e59facedbc",k.Icon_hat_35="0e62e3cd-58eb-4201-a15f-df7d9de27177",k.Icon_hat_36="2ce1efa9-9be9-4f8d-a632-2b3c64285a02",k.Icon_hat_37="1c8caf25-083d-4304-95fe-845780e84c8c",k.Icon_hat_38="972528dc-649c-4287-a62e-547c558b9d1d",k.Icon_hat_39="156b8d2a-d497-425e-97d3-7400843e8fd5",k.Icon_hat_4="66958209-f349-450a-9466-7c23bfd5ac13",k.Icon_hat_40="139fcf81-8a77-43b8-885b-d4ee14446d1b",k.Icon_hat_41="143df9f3-417a-418b-9e0a-bebb68dc4217",k.Icon_hat_42="5e5df52d-3228-41aa-8f6f-04f1cfa6a838",k.Icon_hat_43="8abea8e9-fff5-417a-a372-41332724f273",k.Icon_hat_44="d66eac26-d008-42df-ba9b-c038e994a70c",k.Icon_hat_45="e3d72c8a-9b34-4fb1-85b0-59fe16e68b79",k.Icon_hat_46="8dcce013-9234-4dd9-be1f-d78c1f49b964",k.Icon_hat_47="be8701f0-1b7d-47fb-8914-0504c787bb8d",k.Icon_hat_48="715a72b7-c9c8-422e-a708-8360259a9014",k.Icon_hat_49="6823fc1e-74e2-4e3d-9f2c-b9a70a1c37c1",k.Icon_hat_5="d8f1150c-8217-4048-bc66-ce7a29547f2b",k.Icon_hat_50="0fe80fc9-28be-4b02-871d-b2e43bf3a8a2",k.Icon_hat_51="446744cb-c21e-4b21-8edc-69eda4224b11",k.Icon_hat_52="99d6488d-79d0-4919-b2ed-65536940d2e3",k.Icon_hat_53="9fd53aac-8e0d-4c4b-ad9b-a830336f8bf4",k.Icon_hat_54="02a708b2-b01b-4f05-b0f3-808d7b030d2b",k.Icon_hat_55="f9a15dac-2319-4285-bc14-9a6c2d0424b1",k.Icon_hat_56="0e5bfed4-caf9-4006-8da5-64ee9461acf9",k.Icon_hat_57="27b2642b-12d7-464b-819e-c9b9d730d125",k.Icon_hat_58="31a9c26b-fd51-4296-a612-0cd19aad07dc",k.Icon_hat_59="56e517df-edb3-4722-8b56-8f4b2069bbb7",k.Icon_hat_6="5430ec51-f011-41a9-bcfe-82e3c5c1580b",k.Icon_hat_60="4fdcfe0c-857b-4ada-90e0-970b006ef492",k.Icon_hat_61="045775ae-72d9-4e56-96f6-422efcebdd1c",k.Icon_hat_62="09d01b1f-bfc8-48b7-bbab-70c6536c6e81",k.Icon_hat_63="9228d628-d84a-4805-ab9a-c24db7756d66",k.Icon_hat_64="77906366-aeaf-474b-ac74-c7ff1806ac42",k.Icon_hat_65="b317b135-5916-430b-9524-48f999c880e7",k.Icon_hat_66="ee68ce1d-325e-4510-a863-1b5eaf945c65",k.Icon_hat_67="2fe9941a-17df-44bf-a28d-e87cf7c98470",k.Icon_hat_68="cf4b1b97-e13c-4c73-a796-979962b4e9f9",k.Icon_hat_69="bc89e9dd-b440-42d6-a30d-15dfafe26436",k.Icon_hat_7="cdbd516b-257a-4d5c-a498-1da04ae4c169",k.Icon_hat_70="eb5dc320-7181-4499-822a-d9036a22f8d1",k.Icon_hat_71="c4d823a6-6740-4322-8b00-01113ee5dae6",k.Icon_hat_72="19031c29-b029-4189-848b-34ed9a093ca2",k.Icon_hat_73="acf565a3-7eb5-4a3c-9c29-098043263e6f",k.Icon_hat_74="e8fe082c-d5a3-4bbf-98f8-e12bde1c238f",k.Icon_hat_75="66562b33-cf91-409b-9368-9dbe6a7387b1",k.Icon_hat_76="e2d9cc50-fc23-4627-a8cf-3ac5ed295c2e",k.Icon_hat_77="0a711dca-c2de-48f3-89d3-38a2d00f58a3",k.Icon_hat_78="6da03329-f032-498c-b319-cb7fc107af5d",k.Icon_hat_79="d1b096c7-6a6f-440e-8058-cfb5de5f94d7",k.Icon_hat_8="dbda516f-5531-48f9-80a3-e342c00d7375",k.Icon_hat_80="d9a0c9e3-ea8d-431d-b78e-f8c712827400",k.Icon_hat_81="658c5918-2457-4018-a0f1-93b890f73459",k.Icon_hat_82="c91b41de-315f-49e9-98a2-e3457a3c6e41",k.Icon_hat_83="12ad06fc-90f3-4729-a5c2-eefeefb0d074",k.Icon_hat_84="3e863d42-348d-48bb-b729-b638a58372ea",k.Icon_hat_85="80eeb6ac-29fb-48b4-9661-756526c71c50",k.Icon_hat_86="85018531-0088-44a3-b29f-71418d5fa404",k.Icon_hat_87="8b73260b-e106-407f-a02c-d107428d66c5",k.Icon_hat_88="1c08179c-8b16-4bcf-956f-2bb394c79b34",k.Icon_hat_89="90375232-0003-4418-9ba3-fbca2d953851",k.Icon_hat_9="ba07e775-e0cb-4286-a589-01b3bbcb9f85",k.Icon_hat_90="bbb0445c-c542-4e80-93f4-d16627424ba4",k.Icon_hat_92="e4433a56-21a4-46db-8f64-c47dee3c66a5",k.Icon_hat_93="70d89f07-d4b9-4456-9b92-8191a09663c8",k.Icon_hat_94="4f939f9e-c59a-4afd-8556-0174e5dd839c",k.Icon_hat_95="45f1a49d-7c4c-4043-918f-c965f123f348",k.Icon_hat_96="aac92fcd-9d4b-464f-a7fb-2172c0decc61",k.Icon_hat_97="db8bd1fa-31d5-45f3-a5fe-ecdc4bab0a51",k.Icon_hat_98="3ea7869e-3c5d-4e88-a690-6c2bbbc89555",k.Icon_hat_99="f84e95c7-1f07-41af-936c-4b52500dbb79",k.Icon_item_1="c28bc24c-108e-47b1-9278-629243bb35b5",k.Icon_item_10="3581e864-dfc6-40c2-b4ad-782affa08a27",k.Icon_item_100="464ee508-cd46-4a1f-8a4c-42f7c61bc20c",k.Icon_item_101="17533e2b-cbac-4db2-a53e-3112a9ae915b",k.Icon_item_102="d2f4db06-9626-4619-afff-b3c218c4fcb0",k.Icon_item_103="f1413a28-eb78-409b-b921-6eeca411e2b5",k.Icon_item_104="70b45db1-1db9-4659-b800-17578c23f444",k.Icon_item_105="4ad06f0b-e22a-4da9-96a0-0cf37b4ef4a4",k.Icon_item_106="c2885800-9790-4d03-ad48-22012497109b",k.Icon_item_107="04439b1c-a6dd-4be4-ae72-c405bd1fa55e",k.Icon_item_108="95896e68-8382-4df0-93cc-aa9743a9df48",k.Icon_item_109="0459a50a-2b37-4d60-b702-520b03ce42f6",k.Icon_item_11="88007b8e-9c2a-4105-8527-4e2e57540072",k.Icon_item_110="1500f15d-f97e-4406-aab5-48b5ec2d0158",k.Icon_item_111="e348b650-f6fc-4329-91a4-5a1a16359bd3",k.Icon_item_112="5c020f94-9a7e-44c1-8264-8e85d15742e1",k.Icon_item_113="b7bf7131-2724-4113-8961-42becf87ed84",k.Icon_item_114="4b1424d1-840b-469d-9a77-b2a25ef457f6",k.Icon_item_115="d6a601ce-f3c0-4fac-939b-578ab28fc3a9",k.Icon_item_116="f4e3d488-2161-4d71-967a-a834cc32ef15",k.Icon_item_12="e796109c-bbda-4cee-b13a-2eba6e9f14af",k.Icon_item_13="332ebbea-1702-4776-8cb7-24ad2dd18c94",k.Icon_item_130="08413081-560a-40e4-be9e-911ba6953598",k.Icon_item_131="8237c26a-c49d-4c55-b24a-b14ada972540",k.Icon_item_133="4dc0dd9a-1079-40df-8ff5-0496e140333c",k.Icon_item_134="0fe74c15-6eee-4d1f-b342-cfaf6e2de05c",k.Icon_item_137="fce0a30e-1f79-4309-b26a-d556414faab1",k.Icon_item_138="befda432-e5e6-4ad8-b0e6-29edb5289c50",k.Icon_item_139="b5bf7042-d52d-49b9-ac53-120e87f71c33",k.Icon_item_14="e5482b18-ac73-409c-8201-2d7ea07c6a4d",k.Icon_item_140="86b39da8-86d7-4998-aa26-dfd19f84e25c",k.Icon_item_141="0cde3128-800f-4382-8a69-ab5b4dc2ae16",k.Icon_item_142="0aacc431-326d-4972-a415-893551290a8f",k.Icon_item_143="a245611e-35d0-40c8-905c-435c43f5d44e",k.Icon_item_144="6120a2ce-ae25-4981-9e63-2c9b3d61db12",k.Icon_item_145="deaf34fa-36d2-4500-8a13-ebbe8c3f4827",k.Icon_item_146="a982a91c-f90a-4ad0-8743-ca5177dc23d9",k.Icon_item_147="6f9d2377-5691-4434-b7e0-21dce49cdaff",k.Icon_item_148="c4532fbf-bcd8-468e-8d60-1d61c4e8e5e5",k.Icon_item_149="6ddd3fb2-fcf7-4025-83e5-5d84965ef1f2",k.Icon_item_15="1d6fd091-2bba-4dd6-b041-cca42b3d064e",k.Icon_item_150="1bbee42f-f224-4c23-9e34-fe44012e300f",k.Icon_item_151="e4e1f7c1-0215-4830-a820-d774a1537d1a",k.Icon_item_152="dc028e49-dd04-4c7d-81ef-73b0218132c0",k.Icon_item_153="1c9dea12-2b0d-4972-acf9-0d2498912f92",k.Icon_item_154="8b394816-1976-4ee3-b340-05d54be4bd27",k.Icon_item_158="5cba536a-4f26-4b4e-8160-14035a6ad213",k.Icon_item_16="21b10fe8-1553-413e-8f61-49ecf09a9331",k.Icon_item_160="a27cb228-52a6-40ff-94a1-f1763162c07a",k.Icon_item_161="2cc48a2f-afb1-4292-873a-a61ec973c2e0",k.Icon_item_162="c23d9fc6-b0e2-48e0-a66e-64bef6e49b2c",k.Icon_item_163="0e16c841-107d-4908-b657-3a3fbbe87731",k.Icon_item_165="399aa688-facf-49e9-be1d-3c080ec23b21",k.Icon_item_166="719e274a-f21f-4bb4-9a05-738244ed963b",k.Icon_item_168="707db873-6d6e-400d-af6b-3459239d3bbf",k.Icon_item_169="1fabbd26-cba0-446a-ba0d-c0634f9dfd18",k.Icon_item_17="ae439b5a-abbd-4a2a-9fa0-b34a0b0c0f4d",k.Icon_item_171="aedc669f-417b-4ab2-9bf6-d853df6eed4b",k.Icon_item_174="c6faa7d9-0e63-4274-9e91-68f4da9e92d3",k.Icon_item_177="35406c80-f8b1-4fbf-b56b-a5aedde671f2",k.Icon_item_178="49ba774b-3e31-40e6-8297-632b37a22f44",k.Icon_item_179="0685b7f8-d3ac-4bf3-a847-58fd93423472",k.Icon_item_18="5d3ec490-6c56-4fa3-b89b-1fb6576789a3",k.Icon_item_182="113b6498-3407-4fa8-b344-b56499d889fc",k.Icon_item_183="0f61441b-f215-4d11-8785-780a4b5fd00c",k.Icon_item_184="aab22ac8-70a5-4835-9aa0-3ef577604c59",k.Icon_item_185="e861f2f2-9cea-4236-941b-bea1ab32cd27",k.Icon_item_186="c640c920-ec00-4116-86f0-1d6ccd4aa589",k.Icon_item_187="4426b7fd-f0ae-4da3-baed-6c8c69aafab5",k.Icon_item_188="17792ef6-9f1c-4d3d-8add-84c3caac5aee",k.Icon_item_19="708c2eb2-2359-44e3-b26c-912853462131",k.Icon_item_190="4fa078b2-c6bc-4df9-be4c-25b576127d24",k.Icon_item_195="b1812d67-6d69-49d1-b1f7-4eac202bb261",k.Icon_item_2="ab67f0c9-5e81-46ae-95ad-5bf4cad5f462",k.Icon_item_20="3aba0d8e-8e26-46a0-a22a-1452d851c8b3",k.Icon_item_21="c1f16145-eeeb-4474-9679-4c2ec309cba1",k.Icon_item_22="d7ccb7b2-e8e5-4f96-af92-f31c60bf4d95",k.Icon_item_226="89175a2e-84df-48e7-9981-93129ad8dd7c",k.Icon_item_227="e422d591-b0ae-4f18-8cec-f9ffedd3fd58",k.Icon_item_23="31f3d781-a8da-4547-9ea3-18debcb82e66",k.Icon_item_24="356cc58c-93a7-4092-b227-dac51f716774",k.Icon_item_25="9dd2e323-89be-4f01-a02f-aae5bd4b0175",k.Icon_item_252="1bb43780-816c-46f7-a001-27584082c3b3",k.Icon_item_26="9b72687c-a3e2-463e-b138-1cb8931a28f4",k.Icon_item_27="5fb5ea15-8def-49ff-a6a7-3c1284f604fa",k.Icon_item_28="d2517577-8403-4097-ba6c-a2b9c067b7f3",k.Icon_item_29="83de7363-febc-4fa3-b880-e79173908d35",k.Icon_item_3="a0673e27-1302-43a6-b3bb-acbd0805c48e",k.Icon_item_30="d0597519-82c6-4344-a540-7f835db55d3b",k.Icon_item_31="34e79978-69af-42d5-a9ce-147b602a85e3",k.Icon_item_32="5b558436-c9e4-49e4-ae77-1fa5a9fe59e9",k.Icon_item_33="ba902f85-597f-46b1-ae32-571078a25bad",k.Icon_item_34="5e33f139-02b2-4bcc-8a8a-bef849130ab4",k.Icon_item_35="368079b9-3fa8-4e23-b8df-46b47f8d2a3e",k.Icon_item_36="846d615d-f9a3-48a1-b76a-28e4b3ad4d41",k.Icon_item_37="e5b588cd-1985-4c12-ad11-d760a2c2c950",k.Icon_item_38="5543109d-8c39-4fb0-b453-79b69c84b078",k.Icon_item_39="2c87d736-b041-4243-9d13-b251de4a8b76",k.Icon_item_4="225f24bb-9327-4b18-819a-d6d5cb1afe57",k.Icon_item_40="ef098807-3fcf-4699-8ae0-e0982c33dda9",k.Icon_item_41="160e9d85-6d85-4655-8cd2-5558ef188c33",k.Icon_item_42="a0e58984-d569-478c-bf58-d458d46f0263",k.Icon_item_43="85b12f73-564f-42eb-b5be-03403483421d",k.Icon_item_44="ba018f6e-e190-425e-aa57-f390824c6d54",k.Icon_item_45="64eb9ace-d4d9-4747-b280-fbef48d74c31",k.Icon_item_46="8e30cc93-3388-45e2-9f84-8b153cba7dd5",k.Icon_item_47="acf3d3f8-2f14-4f34-bfdf-1b05f5ea19e7",k.Icon_item_48="9b2d4fdd-fae8-499a-8bff-1cd021bf6b5b",k.Icon_item_49="85f34492-45ba-46e3-bb74-8f887d995378",k.Icon_item_5="2f28ff99-44db-4bad-90f5-3aa73c698d38",k.Icon_item_50="d33bf401-31ad-499b-aed4-ee90ebadf63e",k.Icon_item_51="b38d1b17-93dc-4a37-95d7-76372437a8e0",k.Icon_item_52="3ef1ec34-3f35-4b7d-8b4e-ec157de0adca",k.Icon_item_53="da0a679f-bccf-495d-8269-4c4c7b4595f1",k.Icon_item_54="9d63a785-eb12-4265-a95e-379d1d63ac89",k.Icon_item_55="2a3ed742-553b-4282-9e88-5611dd9043a0",k.Icon_item_56="153ff0fe-bf2e-4727-aacb-dfe9ef540d56",k.Icon_item_57="9f22852b-9b86-431b-8fd6-2144171c6d2c",k.Icon_item_58="7ec25aa5-7019-4472-adfb-8d58879c4ff4",k.Icon_item_59="35a0e7de-f7a2-40d3-a923-409c35ccd09b",k.Icon_item_6="81147664-6554-4bc3-a976-b70d6b5b26c6",k.Icon_item_60="55de3768-feb1-4326-a04c-e92ebb2f20db",k.Icon_item_61="b27315de-6121-4902-8e87-6ff4ccb560a1",k.Icon_item_62="0983b4f2-003a-42f6-aa6e-b2ea122601fc",k.Icon_item_63="58c95df5-ea60-4890-b058-03f166f374a2",k.Icon_item_64="61e18135-501c-4017-9c28-0221d93b39f0",k.Icon_item_65="ad5ae2f5-2507-41f9-a006-453820736d68",k.Icon_item_66="f2b27f2e-1a29-4ea0-b264-aa19eb71c7f1",k.Icon_item_67="ed5ab73d-40e2-433c-a16e-f838ee44bc56",k.Icon_item_68="4fc89434-f906-4d08-8120-12bcb7255412",k.Icon_item_69="9931d8f9-229c-4304-ba70-af341808fc14",k.Icon_item_7="126f2504-85dc-42c2-8704-59ff4014fd8e",k.Icon_item_70="395c60e8-087a-49d1-9c72-64f29bc3a132",k.Icon_item_71="37c130c8-5b46-497c-8862-136b638a1602",k.Icon_item_72="c468205a-8e22-4a96-9037-65762556bcce",k.Icon_item_73="b18e4901-c05e-4017-bf3d-584aeba7ed8b",k.Icon_item_74="cf615e92-36a5-426e-8ee9-2d1af77fbd72",k.Icon_item_75="fbd15ee0-a644-4851-b291-224588c61a7a",k.Icon_item_76="2528288a-931b-4462-bf0e-5bfdce0a86c2",k.Icon_item_77="19142273-1e8d-42bf-990b-7dfed0193d36",k.Icon_item_78="05fca2b0-fa33-4e24-9ee5-97e34dc97f46",k.Icon_item_79="e9b2e092-b406-46a9-84f8-f862ba9885b4",k.Icon_item_8="b9af1e9b-4e28-4fb8-8b1b-cf2fb12e3a01",k.Icon_item_80="3ae2e916-872d-418a-acca-c471461e3c40",k.Icon_item_81="82080e3b-2d3a-4afb-8041-20023b0796b7",k.Icon_item_82="90b17988-d18f-4311-9088-b5ceb8b54fc7",k.Icon_item_83="8cd1ea08-d7cf-48e6-bfd8-b121c7ad492b",k.Icon_item_84="c90d52ba-da0b-4c43-9741-798d077d3c0c",k.Icon_item_85="4789af0b-2bea-4ccd-8395-47ee19a9470d",k.Icon_item_86="d5be95fe-a705-4f8c-9e60-ee551ba9053a",k.Icon_item_87="dbdd175c-a7d9-47ea-a21a-a1c764e9a012",k.Icon_item_88="172d4cf3-d2c6-4616-bd98-833c35575ea6",k.Icon_item_89="3b9c0484-479f-47b3-9cac-d95e62d98e5a",k.Icon_item_9="17479d1a-6021-4ca7-b09c-9040febbfc29",k.Icon_item_90="1b3d6612-f49f-44be-bee6-71e8871f4fd3",k.Icon_item_91="0a8d1006-5a53-4532-a24b-0a9a1a4293a5",k.Icon_item_92="507c32e4-171d-41f8-a883-42f4a83af551",k.Icon_item_93="0a3121be-d920-438f-9566-5c35c9787849",k.Icon_item_94="4b160cf5-234d-4b1c-8877-f56dd810fa3b",k.Icon_item_95="f3c85530-2323-4ce0-93cd-372e6067cd54",k.Icon_item_96="aea041f0-9ac7-44f8-9d9a-abe37de7f062",k.Icon_item_97="f267db02-d23a-46d6-a9dc-f817209301de",k.Icon_item_98="39b6f144-7eae-4e99-a54f-db3e6caf2a05",k.Icon_item_99="06da5113-13b4-41a3-a9cc-b849fc746f01",k.Icon_item_crystal_blue="5856c054-1828-4319-a9d3-7a58e4d47e23",k.Icon_item_crystal_green="20e18e00-9b8f-4bde-96a6-30151026efb3",k.Icon_key_1="fc983d21-d667-49df-958d-8265c9c07820",k.Icon_key_10="0b425050-d879-473b-a1ca-86535e134227",k.Icon_key_11="845fbcb9-2df6-40d7-a43a-a738efe4cf8b",k.Icon_key_12="51ddfb3f-d561-4a98-b296-9c88b21d6624",k.Icon_key_13="6144f87b-994e-4477-a1c3-0c0a62216233",k.Icon_key_14="ef6ff44a-d309-458e-a232-5a706a6f1464",k.Icon_key_15="38f8016a-3103-4ba5-b50e-8e9a00a7aaee",k.Icon_key_16="282ecd81-12f5-40f2-bc33-394aa7bf3790",k.Icon_key_17="ccc64bfd-b7ba-43c7-9ea7-eeebe7b96c31",k.Icon_key_1_2="dac330cc-48f2-4197-a8e2-72c52e840719",k.Icon_key_1_3="5c7d10e0-1532-41f9-9407-1e0f88035644",k.Icon_key_2="d76ff4c0-f26c-4a37-8698-10db647afeb5",k.Icon_key_22="952c3956-ab1d-4a99-b8e4-d3b95a0787db",k.Icon_key_23="cb6de1f8-39b0-4f64-993b-cfcc52035490",k.Icon_key_24="c6990768-f6dd-4b44-ab11-be38e644fcf1",k.Icon_key_25="9c34de61-db9c-488d-b33b-9b5e997318f9",k.Icon_key_26="7396221d-93f7-4c33-8e1f-cd61fc6619ef",k.Icon_key_27="990377e8-367e-4c12-9385-96104e9a326b",k.Icon_key_28="00352b7d-1fee-4d09-a78c-3ff46377a4ce",k.Icon_key_3="e8fb53de-7f1d-4b47-b660-0a7d4779f879",k.Icon_key_4="62de2c82-7c2c-4de1-b06e-7a19481a9523",k.Icon_key_5="d94c6ccb-1f87-41e8-a12c-c6ac1596e1ab",k.Icon_key_6="528f162b-d9d0-4822-affa-0ff145db1391",k.Icon_key_7="ed5550e8-bff6-4ea8-9a9c-213934dc25c9",k.Icon_key_8="d8fe6ba8-87c6-4e78-8b75-cfc7b53379f0",k.Icon_key_9="a817653f-15f3-46b7-8131-60734727bcc7",k.Icon_level_star_med="899ba6bf-8c79-4ffa-9004-947be85c72ac",k.Icon_lock_mini_extra="d5ffddd6-74a0-48c9-9cd9-44725e94e2ff",k.Icon_member_plus_gold="b19a24c3-02a9-458c-a7a2-3adf8bacec7d",k.Icon_memberjar_stamp_red="156ff938-4e19-48c2-b1f7-943945c8a2ca",k.Icon_memerjar_stamp_red="772c9283-d5ce-46b0-9bfd-a88108b4ca44",k.Icon_mini_member="387a3f2e-81fb-42e3-b6cd-052bd7ea68a6",k.Icon_mini_member_b="f93e6aac-d71a-4d34-bc29-0fd8a548f2e1",k.Icon_mount_1="633cfe11-aa5d-4480-93d2-144deb98ad44",k.Icon_mount_10="db240479-96ba-4a5f-a199-342ed8c40066",k.Icon_mount_11="d4341d56-6f40-449f-9be1-b8783899bcb5",k.Icon_mount_12="4c779907-7789-451d-8fef-b663ad3eb716",k.Icon_mount_13="1d59ef02-b12b-4495-b8ff-2c592dff45a5",k.Icon_mount_14="5532f9fa-5208-428f-a105-257bc92a8b73",k.Icon_mount_15="cfaa348a-4051-4517-83b8-2ff3d45f1b53",k.Icon_mount_16="8d1b0ad7-9e67-4142-bd8a-75b3adf83f89",k.Icon_mount_17="14e9594f-5556-485f-8a15-bd39a18bf99e",k.Icon_mount_18="bd96d5de-2d3d-41f8-810a-3b7bb4d0aa3f",k.Icon_mount_19="88044a65-7915-47ac-a186-bfb68f15c166",k.Icon_mount_20="9cd067ac-f807-4352-a55b-7e107a647994",k.Icon_mount_21="d92c70fc-ae40-432b-88c4-f94cff3f1015",k.Icon_mount_22="9a67f631-3db4-400c-8f16-65cc5b44c545",k.Icon_mount_23="093b0f99-62ce-472d-90f6-5838138159b7",k.Icon_mount_24="6a45cf82-184f-435e-8e68-07b4711d9a7d",k.Icon_mount_25="d65bd238-1839-4d71-8af2-e866d11ae68f",k.Icon_mount_26="fd92671e-e04d-4da0-93d1-2af13f65a2c2",k.Icon_mount_27="79cd0342-d69a-47d4-8e3c-4cfbaf52a444",k.Icon_mount_28="0520053c-96d2-45fe-baf6-95e1da280965",k.Icon_mount_29="4817d1cf-3e4d-460c-9ea7-a5b90f98b9e6",k.Icon_mount_3="0753cba0-6e78-4612-9097-10b6d9c06629",k.Icon_mount_30="b3e17d18-8782-40ab-ab9c-f028cb129b27",k.Icon_mount_31="f8034b2f-20c2-4598-a885-b7ed45e199d1",k.Icon_mount_32="22544978-73c2-47b4-be88-5b961ca7d6c7",k.Icon_mount_33="ed5c74eb-db42-48a7-8346-5e318a170c41",k.Icon_mount_34="1c04756f-106e-4bd1-941a-1aca57145bc5",k.Icon_mount_35="c8b0cdfc-6831-4b64-aae4-9d6cfe5b282a",k.Icon_mount_36="1779a9c8-17b5-44f4-a57d-2bdc071284f6",k.Icon_mount_37="d2b823c7-c89c-4d78-8fca-e7356d821d8b",k.Icon_mount_38="e8b0100e-4d52-4260-b1a8-c38711b2ad39",k.Icon_mount_39="22c7c724-fa68-4f85-b611-9ca70582190c",k.Icon_mount_40="4b5e64fa-4d7c-47dc-8785-2637a3a128a3",k.Icon_mount_41="bc5e4d24-4694-4f45-bbf3-8c38408a2cf9",k.Icon_mount_42="286e449b-9499-4e2e-8283-e7d4b964120c",k.Icon_mount_43="8599ec95-d6f1-4300-bdd5-1d5876197732",k.Icon_mount_44="de0db092-6c47-4506-98c1-0d51c45463f2",k.Icon_mount_45="afba3547-b390-4d7e-969f-a9cac7ba14c9",k.Icon_mount_46="149ef81c-0f34-405f-bf8c-6350070fbe2e",k.Icon_mount_47="8155f91b-4ccd-41f6-aef3-0b0c698438bb",k.Icon_mount_48="8d0160e5-d774-4056-a029-97d7a2703329",k.Icon_mount_49="f0b21dd3-06f4-4c12-abc6-f5a71f0a28ef",k.Icon_mount_5="f6e2b0da-c466-4984-9a24-c11d46198639",k.Icon_mount_6="9c837b10-d0d9-44a3-b429-2e0f1a4ffe48",k.Icon_mount_8="f2d220bf-d036-44e0-af6d-9fdf340b4731",k.Icon_mount_9="f7dceac7-1b9e-46e8-b359-6d374d9a52a3",k.Icon_orb="74169e1e-fbd4-471b-bce9-378a06315b80",k.Icon_orb_1="7c6a477c-5de3-44b0-8abd-6fa0e505f9aa",k.Icon_orb_10="2771fc5e-953c-4856-9f11-f89112595e64",k.Icon_orb_11="aa0d0952-e1dd-4eee-8fc2-6d4583ee80ab",k.Icon_orb_12="42b722c7-fe7e-42a6-aa19-c32f1b75cc36",k.Icon_orb_13="f40e00e0-a079-4486-8906-27ce8246b4cb",k.Icon_orb_14="418de606-efb4-45ad-a658-c99ca88c3dbc",k.Icon_orb_15="18a53650-4d25-458b-aa59-e6c769897391",k.Icon_orb_16="661bc769-9b9e-4441-8f0b-e5fce6205594",k.Icon_orb_17="e7893e74-9042-4d0e-9246-bc2d34a97e97",k.Icon_orb_18="15ac473c-2b15-4f22-a64f-8eb62f3e8151",k.Icon_orb_19="1c113cbf-5e75-4622-a889-099892fd6b59",k.Icon_orb_2="d6fcaf4c-7b54-49a8-a560-28f3f4e7adfb",k.Icon_orb_20="b1c07f8e-43cd-49ba-b6e8-1dc3fbfac1ed",k.Icon_orb_21="1dde2b9c-a8b0-4576-857d-c5d4096d684b",k.Icon_orb_22="868cba1e-b67f-450a-9bc6-fb1eefd2a67e",k.Icon_orb_23="069eac6d-b4a9-446e-9d59-96032c4a01d7",k.Icon_orb_24="086362d9-e365-4eab-b4b8-a734eecb57d3",k.Icon_orb_25="c4497226-579c-4e0a-b103-15e8b7854c86",k.Icon_orb_26="9c4601ef-9872-42a6-9eac-c04edfc9e3eb",k.Icon_orb_27="152749de-4faa-4e4e-9097-678c7229f47f",k.Icon_orb_28="b0d4d333-e284-4782-ad44-1c3ed816d94f",k.Icon_orb_29="0503505e-6dc3-481a-b77a-80a3d2ba728f",k.Icon_orb_3="bf6cc21c-344c-44d9-9fdb-10e9526ebcdc",k.Icon_orb_30="aed5261b-1695-45c8-9f13-e5513bb9f64d",k.Icon_orb_31="9045fd6d-4282-4feb-87a4-64ef2be5fb5a",k.Icon_orb_32="7b8e338f-c490-41eb-b5ad-48e2889e094b",k.Icon_orb_33="fe4c421a-a834-4019-8350-902f737e9a1f",k.Icon_orb_34="0adeead5-504a-49d5-af34-df3d5706f45a",k.Icon_orb_35="d5774fd1-dc6f-4b8b-9971-0b8fdd838b4c",k.Icon_orb_36="fdca4e79-3475-4dfa-98a8-0171a9738bbd",k.Icon_orb_37="f9cbadfd-fd77-40f3-a0ac-fc3cb1303d2a",k.Icon_orb_4="7b500c3c-07c7-44d0-94dd-1d30e5337424",k.Icon_orb_5="96344b1a-21d3-470d-afa1-e7f7cf5270bf",k.Icon_orb_6="426678bc-f87e-43d6-aa47-8e8c5e46e343",k.Icon_orb_7="9e4b8ee0-6e1f-4ba3-ba92-b13fb711404f",k.Icon_orb_8="16f5bb0c-9fe3-4376-b529-c5ca0143c2a7",k.Icon_orb_9="d7a726de-9efc-41c9-b970-bde00d604c85",k.Icon_orb_bg="ab1a9324-c7c8-45ae-b90f-fd28ee66c54a",k.Icon_orb_no_tile="8bf05375-25bc-4146-9d0c-40b6510f6e5d",k.Icon_outfit_1="aa5408e4-3990-489c-8461-7c885d1ab04d",k.Icon_outfit_10="a8916acc-46ef-4128-ad82-fc02d27833b5",k.Icon_outfit_101="b759e17b-2221-400f-8ad1-68a49a20fb26",k.Icon_outfit_102="efaf3efa-157c-475c-bc31-bed2f3400dae",k.Icon_outfit_103="76ac2f4a-0209-44a8-8320-557b628c7ba4",k.Icon_outfit_104="54bfd668-282f-4f4f-88f3-3766719e3009",k.Icon_outfit_105="f5ddcca1-f853-4174-a2c5-050333a18a57",k.Icon_outfit_106="cc274cd1-87b7-46db-b787-1d24a4fb40cc",k.Icon_outfit_107="a53834af-ca26-425f-b4fd-9fa1d57a749c",k.Icon_outfit_108="35746488-a0e0-4539-8372-78f6802812d3",k.Icon_outfit_109="1152a304-c4f7-4298-838c-27d517242059",k.Icon_outfit_11="9aa82624-c056-453b-a905-89c191ac72d5",k.Icon_outfit_110="22464ac7-bbca-4cc8-889a-85772fc3ad4e",k.Icon_outfit_111="58f1590c-f52b-4154-b735-f6bd4915e767",k.Icon_outfit_112="cbfb82b4-4956-423f-a5f7-b560e66db773",k.Icon_outfit_113="5835bba2-3d5e-4c3f-9977-ce193f53387f",k.Icon_outfit_114="c7ee99b2-64d1-41c6-8c84-c3b9fcd9a09b",k.Icon_outfit_115="7fa982e5-6ea5-41b3-8fa5-f52bf6c7a724",k.Icon_outfit_116="ed557460-37dd-4db4-97f5-f3ce5c013880",k.Icon_outfit_117="920dc5a0-0c67-4629-9629-c14cf7a8aed1",k.Icon_outfit_12="86256a61-131b-458e-9929-20d98d75c78a",k.Icon_outfit_122="905ab1cc-7d75-4c26-bd46-4d528bc8e7da",k.Icon_outfit_123="eb345c75-5abc-480c-8c5e-caf8a7c406fa",k.Icon_outfit_124="093fef08-760b-42a4-af97-64778facfd73",k.Icon_outfit_125="dd209a4e-edb6-4906-bc9d-90725b1d30ed",k.Icon_outfit_126="29b77b02-7794-4c21-b127-8cca2f6bf50f",k.Icon_outfit_128="16835c33-0004-4e2c-ad84-a0b944d05c99",k.Icon_outfit_129="c4bedd01-6ec8-42bf-889f-07ef57aa8575",k.Icon_outfit_13="76640a12-0567-421b-ac71-7be05fe862a6",k.Icon_outfit_130="f67dce87-a994-4e33-ae36-b041d6cc2c4a",k.Icon_outfit_131="d7a9ae55-f9a7-4348-8c16-81251058c13b",k.Icon_outfit_132="d2735256-7f08-4e64-864e-b669bd6ab5d6",k.Icon_outfit_136="795f9757-9632-45a6-b7f6-be14b2494b35",k.Icon_outfit_137="89fd11ac-094e-412d-9f46-25d36cc1d36b",k.Icon_outfit_138="d48eedec-c0ff-4416-9b44-e30d4efdd6d6",k.Icon_outfit_139="295cde4b-f58a-4a56-8257-25d0b8bd66d3",k.Icon_outfit_14="5a37b019-1a80-47c6-9756-abb0fec87d2f",k.Icon_outfit_140="e6608195-4524-467a-accc-913d318ac287",k.Icon_outfit_141="5101ec39-b07e-4a48-bd4a-39b1db8b6a9a",k.Icon_outfit_142="cf7ca92f-b304-4db3-9ef0-c83875218092",k.Icon_outfit_143="c886e733-48bd-4cff-8f1e-47122d828fa3",k.Icon_outfit_144="c7bded28-4ccf-40ba-bf93-264baf8bb4bf",k.Icon_outfit_145="0602140b-32a6-4281-a0c1-32a1ded5e4bd",k.Icon_outfit_146="55004863-a237-4c45-9a6e-27edf0e0598d",k.Icon_outfit_147="af803fd8-75e3-43da-bf6e-ea1a05ecc7ae",k.Icon_outfit_148="baaf85c3-17c4-4327-9b5e-43938dd81251",k.Icon_outfit_149="3d61cad8-0b10-412a-a333-8f939c7b8923",k.Icon_outfit_15="b59f9b10-9585-45db-a58e-776906c963f0",k.Icon_outfit_150="21f86240-aacf-4b1e-a1a2-26c2e44c3831",k.Icon_outfit_151="6a8db283-e809-4e27-b4fc-d7ca80c184af",k.Icon_outfit_152="08950e3d-e6e9-4274-ab39-0bce7b1e6726",k.Icon_outfit_153="11ef4cd9-f531-4c58-b6cd-cbb74e75c426",k.Icon_outfit_154="28505ce5-ccd0-44f2-83e1-75d4398205a2",k.Icon_outfit_155="64b488ac-7d93-4bac-85d2-b8171db65896",k.Icon_outfit_156="4e3072ef-b976-4730-a37f-3ca230cfa669",k.Icon_outfit_157="620de052-0dcf-4b40-aded-bc2bf7ac0906",k.Icon_outfit_158="a45f24eb-bb71-4373-9e7e-010d00c98049",k.Icon_outfit_159="34cd719d-5e38-4e9f-9cd1-bd01030b4a57",k.Icon_outfit_16="87ec4602-7587-4745-bd56-7aaa5eab6f9b",k.Icon_outfit_160="0103a98a-7f7a-4c16-8764-6f9b3670092c",k.Icon_outfit_161="9fa40654-9389-4545-85b1-52667f6b58bb",k.Icon_outfit_162="d3ad9b3e-2aa5-4e9c-a97a-6600272d8b2b",k.Icon_outfit_163="06baad8e-47f5-4551-ade5-36aa54255bef",k.Icon_outfit_164="ca09c2fa-ee28-4f69-a3db-c547337a3e38",k.Icon_outfit_165="5e7dd042-a6e8-4d69-a129-7b69b5ad661b",k.Icon_outfit_166="fd8a6dda-69e4-48be-b140-ef87b19bb4db",k.Icon_outfit_167="951491b8-5548-4002-97f4-894f53710dab",k.Icon_outfit_168="a538ca6c-87c4-416d-90a7-f2f11318e36a",k.Icon_outfit_169="b60a9265-ccfd-41bf-9fd2-481dfbb34cb2",k.Icon_outfit_17="62dea1c7-89f1-41e7-bfc7-953e00f44d80",k.Icon_outfit_170="76efc3df-0991-4f69-82f3-69615ace972a",k.Icon_outfit_171="761f197c-68d3-43ff-9a9a-9675385f1766",k.Icon_outfit_172="a61f3ab3-d141-44ce-9e30-040c8db206eb",k.Icon_outfit_173="60133606-0d70-422a-8d22-4317ccb58398",k.Icon_outfit_174="01be9473-06d9-469c-baf3-6e4df4a1e286",k.Icon_outfit_175="d0c5659a-cdf6-4b81-bd3a-5165054be178",k.Icon_outfit_176="51bbc560-e49b-4bce-aec3-cc4e53561264",k.Icon_outfit_177="b81be64d-2f5a-4f1b-9fbc-acc0dc4f7952",k.Icon_outfit_178="e9b32f52-97d4-4963-b4a0-786c1ab426c1",k.Icon_outfit_179="dc8619bb-7e3f-4ed8-aea4-8db28121f53c",k.Icon_outfit_18="f09f5929-865c-45d0-bcaf-01ce4a35bebb",k.Icon_outfit_180="e3cdee93-c363-4dc5-9f06-64e28595e4cd",k.Icon_outfit_182="993f756d-b0da-428a-a125-298f956e32e4",k.Icon_outfit_183="8f8b99e5-5d54-428c-8d8b-47efb42349f1",k.Icon_outfit_184="c2a3ea43-54c3-43e5-a56f-98ae4c3c39fb",k.Icon_outfit_185="43da0402-8e47-4b0f-8bc4-9fd0ee2523e0",k.Icon_outfit_186="1b142c67-e2ce-4701-91e6-2b95f1072dd1",k.Icon_outfit_187="45a20650-1e8f-4eca-b48a-4ce69c05e173",k.Icon_outfit_19="e12498a1-689b-4e83-9b3f-3ad66e76818f",k.Icon_outfit_196="4b87b751-e2ff-4b8d-988c-6f3b9f19773e",k.Icon_outfit_197="d5977d02-cde8-487c-aa4c-711830fa88b5",k.Icon_outfit_198="b43cd532-e787-46ab-85b2-1948b625209d",k.Icon_outfit_2="3eef128c-ed80-413f-b3b8-3ffc1c5bd0ff",k.Icon_outfit_20="794d1937-a7ef-4ebf-8d4d-9e2b90685938",k.Icon_outfit_21="1171af5c-9d62-4ef2-820b-213d52a2eb74",k.Icon_outfit_22="5a5c8aea-0923-4eb9-8810-fe6dbf9e22bc",k.Icon_outfit_23="e327e577-3bcf-4c33-97c7-c8fef05e9da2",k.Icon_outfit_24="58e429b1-f783-421f-8935-c80e6ee3ab08",k.Icon_outfit_25="e6911d1e-70a2-41a9-8070-9724697641eb",k.Icon_outfit_252="72f3ae4b-4333-4244-ab40-333e3fecc405",k.Icon_outfit_253="ca07c5b0-55a6-4b0d-a871-2f24dcac0627",k.Icon_outfit_254="dc153bd5-2466-40c5-861a-ca6eb25f1b14",k.Icon_outfit_255="0626fd18-c549-4eb5-990a-1ceeab207bed",k.Icon_outfit_256="71621e07-74dd-476d-a4d8-164f706682e6",k.Icon_outfit_257="dda100dd-286e-44e4-8d3a-18a87e25448c",k.Icon_outfit_258="21d3fa7a-3b9e-41a4-bab4-8fa9ff0a528b",k.Icon_outfit_259="cfdf520d-8578-480b-9022-7fe0feb34012",k.Icon_outfit_26="c832aa1e-1b47-418a-8da8-b259f2a8f7aa",k.Icon_outfit_260="a91e2ab3-d417-465b-9cc5-86dca032876a",k.Icon_outfit_261="a6f4f4fe-abd4-45ac-bbc6-239557868e85",k.Icon_outfit_262="68b59abf-9821-496e-8b42-64be6d68c262",k.Icon_outfit_263="286e55c7-c17f-4f0f-bb42-340d7221addb",k.Icon_outfit_264="e33c46e9-4786-4bc0-93ed-18cecdede270",k.Icon_outfit_265="83ebe5e2-8225-489f-b01d-fa56aaeabe25",k.Icon_outfit_266="c5213bd2-b3fe-4e08-82b5-7046a0ace24f",k.Icon_outfit_267="ee3f92af-31ea-4c8c-a148-6fa2f0b592be",k.Icon_outfit_268="6b797545-ffb7-46bb-98bb-6d6ff645b385",k.Icon_outfit_269="fd75deba-0994-4e56-a481-06ea7d78bf00",k.Icon_outfit_27="e252deb5-77f0-4da0-b486-8db84721af7a",k.Icon_outfit_270="45aaff6c-6dfd-4bde-b8da-f2408394a6cf",k.Icon_outfit_271="91c8a4e0-2ff2-432f-ac42-78960808515f",k.Icon_outfit_272="4036d126-5382-4772-b77c-14e3344296f7",k.Icon_outfit_273="feea2a6e-7c12-44af-811f-10624a113103",k.Icon_outfit_274="f77bf6cd-46bc-4d7c-bc03-b97ab4f8057e",k.Icon_outfit_275="acfc8193-3459-48d3-b535-483427b0af40",k.Icon_outfit_276="3aeaab19-0f64-48a4-9a58-72be41c29668",k.Icon_outfit_277="d90fbdbc-d713-49f3-b0dd-3ffb36e8ad9e",k.Icon_outfit_278="550ed400-7c06-4d99-8d16-238f3a3a815f",k.Icon_outfit_279="e17304e1-54f2-42f3-8ae9-ed02f9bec30a",k.Icon_outfit_28="8b15dec3-1122-4c42-bd95-0e9e4f5e2fff",k.Icon_outfit_280="6835d9fb-1f22-4d7b-a6be-c4c48091880a",k.Icon_outfit_281="76e9130c-3e08-41b2-a090-b1b524353fbc",k.Icon_outfit_282="1651f77d-95ff-4206-98c7-fcad2b9dfa8b",k.Icon_outfit_283="09061397-4624-446d-87e2-975e51079586",k.Icon_outfit_284="24e5058b-5c7e-4310-b42a-635ba8377658",k.Icon_outfit_285="c16ed889-9699-4fd3-85a4-d353505326dd",k.Icon_outfit_286="30218f7e-1d21-494a-a68d-cb5bfaecd6dd",k.Icon_outfit_287="26a7ae61-acb4-4984-aebd-5f4ae6352de2",k.Icon_outfit_29="b03276c7-02ad-4e0d-b395-ebd08f7a0285",k.Icon_outfit_3="55cba21f-1883-46cc-a2e3-af2fdd2a9521",k.Icon_outfit_30="ee71f3d9-235c-494f-9e74-f79165af7734",k.Icon_outfit_31="8dc481ec-9ee7-40a8-b1d5-85eb36427034",k.Icon_outfit_32="6a14eb65-d317-43cc-9dca-9873aa0b58c0",k.Icon_outfit_33="a5f42159-f4ae-4469-b28f-8cc0b5d4be26",k.Icon_outfit_34="c14bc2ba-48f1-461d-b22b-572f30637f95",k.Icon_outfit_35="93b51503-7ce2-40fd-9de5-c4d7b21cbe85",k.Icon_outfit_36="4685b0ab-b6b1-4813-b800-0a4d0519c700",k.Icon_outfit_37="68bec49d-72bc-400c-a6ff-3a639dba34f1",k.Icon_outfit_38="16b48b87-89ba-4522-9778-0e6bae5c2045",k.Icon_outfit_39="3ddd8ea7-d686-42fc-a7d4-7bf71bd67b43",k.Icon_outfit_4="ba2ed472-ec02-4906-b827-a67ad2685035",k.Icon_outfit_40="9b31bbca-abff-405a-9a3a-21dbf6ec515d",k.Icon_outfit_41="22071a8d-7e41-4def-8b63-4958accca4d4",k.Icon_outfit_42="b289c462-cbb4-4566-9eec-16d345f20730",k.Icon_outfit_43="057d294a-8bc7-45b7-9e72-92eaefe03a57",k.Icon_outfit_44="e2a0bc00-f9e3-4cb9-9e57-e0fd600c125c",k.Icon_outfit_45="20c1bc76-82d9-4717-8488-ef1f1e7bd8e0",k.Icon_outfit_46="d94b5994-a3d4-4589-b18f-eafeab79f2c4",k.Icon_outfit_47="48bfe01b-1275-4d87-b548-109c30992aba",k.Icon_outfit_48="232ed203-5f3e-4e31-a82a-1e9ec4814d54",k.Icon_outfit_49="2cddf712-57a5-4332-951e-bd10fbdd6e1b",k.Icon_outfit_5="483485d3-f34f-43a3-b4ca-c614c5b4d56e",k.Icon_outfit_50="a96bb1a8-6bb0-48ea-b659-d1a411e3fea2",k.Icon_outfit_51="2d7ed46a-8b26-4579-bbee-6b526261e812",k.Icon_outfit_52="66cf33ea-5b3a-4bfc-aaa5-9f5e59acb5c0",k.Icon_outfit_53="efca60f9-ea7a-4477-9470-53fce1ee0d9c",k.Icon_outfit_54="9bd8824e-0374-48a4-b0c8-7c60443bc345",k.Icon_outfit_55="45c2e020-b277-41cf-b80a-f636e8107bd3",k.Icon_outfit_56="a205aaf2-f338-4c86-9092-a7014b651fe1",k.Icon_outfit_57="618442c6-2f9e-4e49-ab0b-c25f0c93fcab",k.Icon_outfit_58="38cfb2d9-0530-4837-9543-1bdc5401be11",k.Icon_outfit_59="d9d61971-1c14-4469-a8be-c2ec2406aa34",k.Icon_outfit_6="148af7f3-85ee-472a-a48b-e58299e578fe",k.Icon_outfit_60="99050f03-081d-432c-99d8-58e3e9c60023",k.Icon_outfit_61="4a58c7d5-e8dd-4633-9fe0-d5a2b5d1a54e",k.Icon_outfit_62="5ce34366-e687-415e-98d1-807f160ad4da",k.Icon_outfit_63="3b1fba68-bdec-41dc-8004-bf6d044765c8",k.Icon_outfit_64="96d9b39c-3192-4578-ade1-24f6636cf7ab",k.Icon_outfit_65="80eb4b19-f82c-48f9-91b9-b408dd30bf35",k.Icon_outfit_66="f68b0068-9322-477e-863d-5836b73d71ad",k.Icon_outfit_67="b3e64fcf-5386-43b7-a125-27f3010046cf",k.Icon_outfit_68="e90686f5-6c86-43ff-b302-c02915e8e908",k.Icon_outfit_7="83ef1da2-2dc7-4924-aabd-db53728a6fed",k.Icon_outfit_72="1e4d20e8-6f06-4ae3-bf91-a25f72a5e7c3",k.Icon_outfit_73="5cdcfeff-883b-4d07-8a65-bd92c498dc4d",k.Icon_outfit_74="7ddb1455-d95e-4c1a-81d6-e4b29c40339e",k.Icon_outfit_75="59856327-c047-4f66-a778-19ddb23431fd",k.Icon_outfit_76="725178ff-091a-4a55-9566-38485d1f3d8a",k.Icon_outfit_78="305ae860-01b8-4c51-8c93-40d34876986b",k.Icon_outfit_79="7c8f23a8-7b8a-42d5-9948-c3467b06a307",k.Icon_outfit_8="f5f2978e-525b-468d-a253-c36b28dea63e";k.Icon_outfit_80="6f4cca09-0ed1-4206-9b96-34592356fbf1",k.Icon_outfit_81="2bb53433-465c-4eff-b34f-6e10bea3df72",k.Icon_outfit_82="f6bb62e2-2903-4eb5-97fb-11d1cbcffdd2",k.Icon_outfit_83="df536a68-ff86-40f4-aa1c-552402ae5e8b",k.Icon_outfit_84="a3572ad5-476b-4674-8448-0896f1694b69",k.Icon_outfit_85="3e02e558-d780-4121-8e45-d962e055088a",k.Icon_outfit_86="ea65057d-a429-44d8-a260-4a9161782640",k.Icon_outfit_87="853e1dd5-0b83-4a37-ba47-24382ddc3b07",k.Icon_outfit_88="03fe7356-17ba-4b57-a5bd-3ee70e80425d",k.Icon_outfit_89="9ceba7f5-12e0-4413-8746-867189873f7f",k.Icon_outfit_9="649b26fa-b945-437e-9dc0-dfdd8a8901c8",k.Icon_outfit_90="8edbe036-d91b-4353-843a-7529d058ed86",k.Icon_outfit_91="009d6c9a-73e4-4168-a8b5-9ba2bf15389b",k.Icon_outfit_92="3db8800e-d9cd-4b7b-a5b4-d45243743cb8",k.Icon_outfit_93="e7de6c98-2f6d-4367-96c8-65250bd819ad",k.Icon_outfit_94="af78ec3c-2c75-40e5-81bf-dcdf6b1274b6",k.Icon_outfit_95="3e0f23e6-641d-40ae-93df-114edf2c9ceb",k.Icon_outfit_96="5655cb46-7ada-457d-9c17-0cd8803d418a",k.Icon_outfit_97="2593328a-82fb-473f-84f4-cbca828b8245",k.Icon_outfit_98="e0decf91-a6d8-4640-b3b8-56d00ccec493",k.Icon_outfit_99="74a09c73-d07a-4939-bc5e-3302c6658f85",k.Icon_parentgoal_reward="ede0b6d4-5d1c-4a0f-bc8b-043227065ecd",k.Icon_petHat_1="dbf56fe0-8f46-4498-a918-d18fe6d9a719",k.Icon_petHat_10="bcb74128-4244-48b5-bbda-0d63cc64feb3",k.Icon_petHat_100="7ad16a1d-a8ae-4678-affb-b7b7cf05c159",k.Icon_petHat_101="10e60bd5-520b-46ea-89e0-5480cc42bf55",k.Icon_petHat_102="8b564637-2fb1-4eec-909b-81286148eeb3",k.Icon_petHat_103="35287bc2-245c-490b-832e-4e02f1cff234",k.Icon_petHat_104="8537dc8c-8fb0-4399-b50f-d957eca4b744",k.Icon_petHat_105="80a8fa27-53a4-4ad2-872a-b48176a2da0c",k.Icon_petHat_106="b79a848a-c2fa-49e3-b8a0-8239c0e8c76f",k.Icon_petHat_107="0d20306b-8476-4d13-8c04-76abe38eff37",k.Icon_petHat_108="0ff4a508-d5c5-4ad5-a4dc-ea30f7d1aa39",k.Icon_petHat_109="4c37ba7a-3b72-4cdb-bf63-053b1531a0cd",k.Icon_petHat_11="bd0baba5-bcef-4d61-9f2a-9563aacd16a5",k.Icon_petHat_110="e21b0dec-8ade-4627-9466-88f3b040c362",k.Icon_petHat_111="81e0d6bc-f686-4eab-a634-2b3c94dfd78f",k.Icon_petHat_112="ea8d2068-7039-4530-9ad5-e512b958e49c",k.Icon_petHat_113="b9a1c66b-c7b6-41cc-8c9a-732c9cdaa7c3",k.Icon_petHat_114="d1571ed0-a803-4e16-a0ee-55540c6cf1eb",k.Icon_petHat_115="3cfef047-f091-40ba-adb3-9a25779af833",k.Icon_petHat_116="ffad8a4a-b8ab-4630-8326-1069a3921a0b",k.Icon_petHat_117="f992c5b2-80ee-47b4-8548-1f262c31883d",k.Icon_petHat_118="d561bebd-5523-43fd-9a6f-117e3d8db07c",k.Icon_petHat_119="eb89bb51-c5e2-4990-93b8-8fd073a3acca",k.Icon_petHat_12="ebaa6edd-dab2-4e50-8a5b-fca1c01e4e51",k.Icon_petHat_120="41a1f4da-326c-458b-a8cf-db8499803dff",k.Icon_petHat_121="cd3f9afc-6c00-417a-9e22-d083c131bdab",k.Icon_petHat_122="40a04336-824c-4902-a88c-4daf6dcbcb73",k.Icon_petHat_123="883ed28b-0f13-48fb-b56b-04928386bd0f",k.Icon_petHat_124="2876f462-bc98-45bd-af9d-4dc58e0db001",k.Icon_petHat_125="474bfb8c-0edc-4a45-b353-3ca56dccd0b2",k.Icon_petHat_126="05a16380-df72-425f-82dd-005d9d3f5596",k.Icon_petHat_127="0878ed19-48a9-40d1-9924-c6ddfaf189ff",k.Icon_petHat_128="8d67a164-680a-4c4a-ba23-9de8c8193180",k.Icon_petHat_129="6f450a5a-c60d-44b8-b8f3-20de300d6d14",k.Icon_petHat_13="21fe6a8e-191a-40fa-8b4f-b26d6afde6c6",k.Icon_petHat_130="66ecf655-edf2-47a2-9032-4eaa7a66a1db",k.Icon_petHat_131="4be0110b-7ab7-444d-b0ac-7dca522e4509",k.Icon_petHat_132="ce0b0d63-dfe0-4298-8218-efa1abe38e2e",k.Icon_petHat_133="de2c2c50-5e4d-4071-b9c3-2254c8dac526",k.Icon_petHat_134="de2e951b-ee99-4832-a955-60111219fe54",k.Icon_petHat_135="59226fa6-676d-48ea-960b-401e82df8acd",k.Icon_petHat_136="32752682-e22c-4b84-ba1b-9bab6c702162",k.Icon_petHat_137="6c3be92c-6636-4c83-94ed-afdc1b06f1a3",k.Icon_petHat_138="265f34e3-d191-44a1-b58a-11856ea056eb",k.Icon_petHat_139="0188f96f-298a-4abf-939f-9756eb651227",k.Icon_petHat_14="de4a3817-7a9e-431e-a69d-39462eb4d68a",k.Icon_petHat_140="1313d81d-51aa-4ab3-895e-b0459a3764a3",k.Icon_petHat_141="b08138b4-1ff4-4307-a8a1-18c2af8cfb9b",k.Icon_petHat_142="b5a19330-b41e-4420-a576-6db19a4602cd",k.Icon_petHat_143="04c0181b-a436-474e-8c61-997f8b59d79b",k.Icon_petHat_144="71d3c987-3a08-4588-a9df-227800b33037",k.Icon_petHat_15="990e7c7a-b431-4b65-a054-e9a2cbb10efa",k.Icon_petHat_16="8540d0aa-3dc2-4ffe-896d-53743afa7d94",k.Icon_petHat_17="50343689-7af3-47cd-878f-09210787b7ce",k.Icon_petHat_18="4590c43b-cffe-49fe-b9b0-5ea0893e0dd9",k.Icon_petHat_19="570e21e5-126a-49bd-b94b-ced79b81a091",k.Icon_petHat_2="602dcbe5-8e6a-40cd-bd88-a0a12ff079bc",k.Icon_petHat_20="2ca46ac5-cb80-4a40-983c-11bd8b43a770",k.Icon_petHat_21="9bbafe4e-df6d-40d6-84c4-8baf6ee93fb2",k.Icon_petHat_22="a085108f-bee0-4f0c-a6f5-976094cac23b",k.Icon_petHat_23="3aaca455-234a-4229-9b28-a52a352e917d",k.Icon_petHat_24="f601b0f0-1198-4180-9cc0-462222dd5e39",k.Icon_petHat_25="64592ed6-7a43-4789-8b6e-7f4581d805e5",k.Icon_petHat_26="cc43c8cf-f29e-4d35-9141-e00d99cd9c6e",k.Icon_petHat_27="0b7873db-2549-442e-921f-a5514a5c8b4a",k.Icon_petHat_28="fe4e797b-516e-48fe-9177-43e09ced9c6f",k.Icon_petHat_29="fdcaad02-2a19-4513-82d8-abb550e14a88",k.Icon_petHat_3="b06508a9-2c50-4e95-9b4e-dd60d26af9e3",k.Icon_petHat_30="8c222361-eead-49f0-b874-cc6131477450",k.Icon_petHat_31="9ea94d04-55c1-4bb7-b814-d30c11c02e20",k.Icon_petHat_32="06285508-5ab4-40e4-b08d-f5d9e59c261d",k.Icon_petHat_33="ec4a1612-b0ab-4b8a-a03f-88655ad6790c",k.Icon_petHat_34="6ae8bd8f-8cf9-46e6-90d0-1637849e7d34",k.Icon_petHat_35="8ed8ee8f-44bb-485d-84e3-ea28bcf4e530",k.Icon_petHat_36="88bcb349-7aea-4e4d-89c8-af557b5e2a69",k.Icon_petHat_37="be50c101-a1a5-4c39-b3d2-363fe194d2d1",k.Icon_petHat_38="deea4ecc-4b64-4bd6-844d-fe12d8855de5",k.Icon_petHat_39="e940fa05-b195-4d1f-952c-d3b131aeb7bb",k.Icon_petHat_4="a7149b1e-7327-4749-a0ed-604e6ebd24da",k.Icon_petHat_40="9bb5ed3a-be3d-432c-b1c1-ab637783d848",k.Icon_petHat_41="8eb64d2f-1ac0-4814-8744-0a91fcf04d04",k.Icon_petHat_42="d8296099-b3af-4892-a4e0-0d64a4572e95",k.Icon_petHat_43="2c266ed4-981f-4c94-88a9-b116ea70ca63",k.Icon_petHat_44="5fdee887-b915-4b3b-94cd-a5af2bf3fb44",k.Icon_petHat_45="6bc99eb3-3182-463f-98a1-d850462c6c3f",k.Icon_petHat_46="e96360a2-d57c-418e-beaa-b8d0502cd0ab",k.Icon_petHat_47="7709b7f7-a765-410c-b88e-1fe57db4409e",k.Icon_petHat_48="7d5daabe-35df-4801-9943-ac04277a3dba",k.Icon_petHat_49="0dba21de-b61d-4ed9-8292-bd1ec2878563",k.Icon_petHat_5="93da1fad-95d5-4c19-924d-5d99a91dcbc2",k.Icon_petHat_50="8e5d3a8d-b2a4-4171-97f5-36d31b40cf70",k.Icon_petHat_51="f8ce9124-ff4b-4f5f-b242-810b90b170bd",k.Icon_petHat_52="e4fc9154-9c31-4c7f-b5c6-ee44438e452b",k.Icon_petHat_53="af7f955e-ef58-4d51-bfc2-c673f233f5e0",k.Icon_petHat_54="148d55f1-9085-4779-9cb3-25d5d2b62139",k.Icon_petHat_55="64d7e433-7062-4fac-8902-3c56cd312b7c",k.Icon_petHat_56="e0616501-3be0-42b3-958d-922d6d74dcc1",k.Icon_petHat_57="872c7c0c-32ef-4cd0-a90e-0e4456a25731",k.Icon_petHat_58="c015d54c-f761-4563-941b-4071266d4f42",k.Icon_petHat_59="2038f9ad-0564-4eae-bb1a-0377303a8f10",k.Icon_petHat_6="bba112df-094a-4717-bd45-837b69b64bff",k.Icon_petHat_60="0aed10a3-8040-4b12-b21b-0c1bfe28808b",k.Icon_petHat_61="f7705761-25d8-4859-97a8-4afcd0309b83",k.Icon_petHat_62="019e7a30-a9f3-4046-99bd-4d94ca13cbbc",k.Icon_petHat_63="08c25ac1-5378-49a6-8668-2c077f1fd068",k.Icon_petHat_64="c3a81362-8ad2-4495-8b48-f7e5210ba768",k.Icon_petHat_65="45aed6e0-5d8b-4b4c-8305-bf7e2ec135a1",k.Icon_petHat_66="25157ea2-0382-4e47-9c81-34145ce135a3",k.Icon_petHat_67="89e3cad4-ff0c-4c50-be5e-e4413eb1fd70",k.Icon_petHat_68="ec3428c4-a6a3-4043-bffb-00d355c53dd8",k.Icon_petHat_69="ef3b77ec-e8c7-4698-a33b-a68387a58072",k.Icon_petHat_7="93f05827-1692-46bf-b7ee-6100eeebab3c",k.Icon_petHat_70="78e4293f-058c-4222-a934-6b719f2bf2a2",k.Icon_petHat_71="41036d01-db09-4f73-896b-2c7ee587a209",k.Icon_petHat_72="7bf4bbe8-5762-4be0-a1fc-b2c51e2b2e75",k.Icon_petHat_73="e34a8a1d-52ee-4316-bd98-5c788f5ea62b",k.Icon_petHat_74="aa97e551-dfd4-40e4-a94c-1ff76823116c",k.Icon_petHat_75="0f6fc3ea-de8e-43d8-9d3e-998e7453d25c",k.Icon_petHat_76="5269c359-72ce-40ba-a4ba-ca2276b799d2",k.Icon_petHat_77="fcfdeb97-66dd-4411-a1d7-ba2f0030ee6e",k.Icon_petHat_78="b658eaf1-d02a-4fa3-bdc1-8656eeb35849",k.Icon_petHat_79="1fcbebdc-91b9-4c92-9104-a77f5af22d89",k.Icon_petHat_8="2f6f2798-11d7-4fb8-95ed-6531f8694ee4",k.Icon_petHat_80="ee2295c4-5ac7-47c3-971f-282f9896cc33",k.Icon_petHat_81="642a302d-8d63-433e-8575-b7abc87fc64e",k.Icon_petHat_82="f3b93b22-e60a-4330-a3ea-0e1a2b3046df",k.Icon_petHat_83="4d2e7f5e-9e40-42d5-92b9-6e8687e713a2",k.Icon_petHat_84="33cdde68-4ebc-4e97-af85-f7e48e4f450b",k.Icon_petHat_85="34b7b8bc-cdb2-4d76-a7e0-e423de87d74f",k.Icon_petHat_86="80a36cb6-7739-4926-8813-4f0cc89eebc8",k.Icon_petHat_87="0dae63cd-04bd-49b5-9367-0a6e0ae1a163",k.Icon_petHat_88="69f89fc8-6442-4a69-8ddd-ff730cb08023",k.Icon_petHat_89="3663df5b-d260-490d-b7eb-7b7c35c88550",k.Icon_petHat_9="2ff73755-6221-4190-b47f-34ef609337bf",k.Icon_petHat_90="5a716845-1a91-4ea7-814d-69900fe6adc8",k.Icon_petHat_91="dcbe943d-a633-49a7-b733-420267d4c600",k.Icon_petHat_92="2ee01a4a-b6b6-4a14-8d90-c606ccd7a20b",k.Icon_petHat_93="7e938a27-5c7a-474a-ba31-8af87b589f11",k.Icon_petHat_94="5834a1dc-5bb4-4690-89fc-066137bcd396",k.Icon_petHat_95="11364d64-536e-402a-bc19-ce95e9062f16",k.Icon_petHat_96="2206bb5c-25e1-4c2f-9af2-4fecd629725f",k.Icon_petHat_97="7a460713-f483-49ae-a1d5-14613dae627f",k.Icon_petHat_98="8cdf2a43-2f1d-45c6-b19b-570db2066f1d",k.Icon_petHat_99="bbba5770-dc85-4583-ab88-d2f0ca22453f",k.Icon_petRelic_1="c3a08117-fc95-4d4d-8ec3-dd4c8562db8d",k.Icon_petRelic_10="f4c54acf-0289-404d-b723-6bb3cf019e6e",k.Icon_petRelic_100="f6df55ab-c24b-4fd1-94a6-abee23e2a6d7",k.Icon_petRelic_101="c346ab32-bde5-45b7-9881-a01e66eef3e8",k.Icon_petRelic_102="bca98c08-08f3-40fc-82e6-bda848fc81f0",k.Icon_petRelic_103="72ac5371-6808-49be-a37f-bc40908c74f0",k.Icon_petRelic_104="8f55161d-bc09-4af1-a8ba-17c43df89b89",k.Icon_petRelic_105="4e8c85a9-e19e-4bc1-96aa-8d66fefecc06",k.Icon_petRelic_106="175291e3-416f-4388-b5ce-4164f3ce5e36",k.Icon_petRelic_107="ac9b23f2-8cf0-4773-985b-2b67dbe3e7ee",k.Icon_petRelic_108="df6d98a1-991f-433e-ad6d-9a88c3bec43b",k.Icon_petRelic_109="a4d121ab-e632-4444-9a00-ec1fc933081c",k.Icon_petRelic_11="08132305-5d72-472e-a0b0-ac14b5af6ca9",k.Icon_petRelic_110="4169e9ee-f130-4500-904d-6fbda206ddb2",k.Icon_petRelic_111="e5ef3e17-4853-429e-ae16-a068cbae8e76",k.Icon_petRelic_112="7de451ed-fa87-49a1-9583-7d598fe22a6a",k.Icon_petRelic_113="06f418c4-e8a1-4962-8228-0c76bb359c8f",k.Icon_petRelic_114="a1d8bff6-56ff-4f5b-8a07-8a1f2d4a6c73",k.Icon_petRelic_115="9d568039-060e-4e4d-9744-bb22aae1c0a1",k.Icon_petRelic_116="1ace1825-a24d-4cd1-9497-16e11cc66b74",k.Icon_petRelic_117="1c8cb244-b1ef-431d-ab7c-aab40bde57a9",k.Icon_petRelic_118="f4cd7278-df70-4f9d-9d07-d3c1abcf4e1e",k.Icon_petRelic_119="1ca5245f-a73e-46c6-97b7-35c0de098644",k.Icon_petRelic_12="bdd30943-fd9e-4fbc-8b96-ae1b913f5705",k.Icon_petRelic_120="9f001c7c-2575-40ab-8d7f-de89c2bacdbc",k.Icon_petRelic_121="67a21fc3-5ee4-48c0-97c5-6a43c3a46e20",k.Icon_petRelic_122="90d481f2-8aa0-42a0-9a05-f901d10ecdc3",k.Icon_petRelic_123="e7330510-18ec-46bb-a53f-88d0461fcac9",k.Icon_petRelic_124="d18d48d3-1937-4dcd-aa84-0723c4af11a8",k.Icon_petRelic_125="f2249b45-dc91-4fc5-ac44-ba7af80ef7a7",k.Icon_petRelic_126="845c3722-ba83-4df8-b17c-141a4ab78b7b",k.Icon_petRelic_127="b4fe7de2-5dae-46df-8edf-195b3dfe1bc0",k.Icon_petRelic_128="f80b6ce3-33b9-47b6-af79-55ba7acf5a19",k.Icon_petRelic_129="04cb79ae-6754-47f3-9947-10ec723e09c6",k.Icon_petRelic_13="10457efe-9c66-413a-ba32-17df933a379a",k.Icon_petRelic_130="9d849481-e5bb-40af-bb60-142151750e51",k.Icon_petRelic_131="f7155b81-17f8-4d3e-bafa-7b45e3c4b30a",k.Icon_petRelic_132="286cb6c3-a682-4171-86a4-cbcea961636a",k.Icon_petRelic_133="2bc878f2-7173-414a-8b1f-1224259cfaec",k.Icon_petRelic_134="bbd27bef-6f3c-43bf-8ab7-a21d15a374bd",k.Icon_petRelic_135="a5f5df2c-81bd-45bf-b9ae-c112d26757df",k.Icon_petRelic_136="f8182546-9183-49c6-a9b2-d519292176c0",k.Icon_petRelic_137="c7407a6f-6603-4211-b2cd-5b746411fb85",k.Icon_petRelic_138="a9c245d8-e9a8-4acc-ad21-b8b6e545eb74",k.Icon_petRelic_139="5e169702-04a1-48fe-9e20-44bec6369cf6",k.Icon_petRelic_14="ee445a38-a93c-4b2c-ac59-387b52b26ebe",k.Icon_petRelic_140="1c270c04-9bde-4cc0-a9f1-e332296984ab",k.Icon_petRelic_141="de310b40-a29d-4788-9965-7de4f08cc3d6",k.Icon_petRelic_142="e727e5de-8e09-4a17-a0db-37e54562b069",k.Icon_petRelic_143="31cbfbad-0926-4760-ae9a-5e3238213c05",k.Icon_petRelic_144="d0d84a1a-3211-4de5-ab70-986e5c58ddaf",k.Icon_petRelic_145="0c58c073-07c2-48a2-8214-75feea7b089c",k.Icon_petRelic_146="e1a1880e-d966-4c88-a1cd-b849825668be",k.Icon_petRelic_147="d9bf4a00-14e1-4b54-8187-8827ad9d28e6",k.Icon_petRelic_15="cad35ff9-8c70-4dcb-94bf-e4afff550d19",k.Icon_petRelic_16="1f1d579e-f57e-4932-9203-db0adbe5fb14",k.Icon_petRelic_17="02ba7d2a-cdcd-408f-8263-6a15d299ad4f",k.Icon_petRelic_18="0149596f-0c48-41d5-a9a4-6404a3a41285",k.Icon_petRelic_19="1b5d5f56-e7d9-4a07-a401-6bd20e21eeb5",k.Icon_petRelic_2="41c8aa30-0a4a-4793-916a-a540626b8e07",k.Icon_petRelic_20="be9ce795-52cd-46bd-b02e-961b9cc19178",k.Icon_petRelic_21="61c03a4b-0f38-4afb-9e2c-042d9258c32b",k.Icon_petRelic_22="848fcda3-e8b5-42a1-9aa4-6e6181a37d2a",k.Icon_petRelic_23="ea122246-3a1c-441b-bc82-675db3827d4a",k.Icon_petRelic_24="8a6cdd76-a5a6-4375-a590-5f448769cb4d",k.Icon_petRelic_25="57760143-8375-4d73-8d3a-516b02ade43a",k.Icon_petRelic_26="725572b0-3470-491a-846b-e1c63c3776ae",k.Icon_petRelic_27="5736932a-4253-4970-a0ca-a2efcd26410e",k.Icon_petRelic_28="51572a65-a20a-4c9d-94c8-a3d16b4c83e5",k.Icon_petRelic_29="2a104474-50bd-4be3-afc0-91e9d046d2fc",k.Icon_petRelic_3="6a39c91c-424d-4cce-847e-733e63f20ab1",k.Icon_petRelic_30="591aab16-6046-4e70-a593-8ef178dcb96e",k.Icon_petRelic_31="6f0a2924-c9b8-4bb4-b0ef-a00e1363bb36",k.Icon_petRelic_32="d557c740-d924-4074-b99b-63e9ed454c83",k.Icon_petRelic_33="a01ee398-8648-48f9-9634-dae4295a2280",k.Icon_petRelic_34="f6c7f147-f5a9-496b-ba66-66632ea5c066",k.Icon_petRelic_35="5cbabe40-9466-4d39-9a53-2026f85563b4",k.Icon_petRelic_36="675bb651-1506-405d-b55f-148a799b336d",k.Icon_petRelic_37="20dc92c3-8f3b-42fd-9ffa-e6245c0028a6",k.Icon_petRelic_38="66596efd-8767-4348-87ec-e59255c18393",k.Icon_petRelic_39="fc348140-b207-4aab-8cc7-1fa54017faaa",k.Icon_petRelic_4="b08f7644-65f1-4f60-b0aa-c4d3ad8df440",k.Icon_petRelic_40="215669ff-4973-477e-b359-0c59dc54b3ca",k.Icon_petRelic_41="5c03f1da-1de4-468b-bf4a-17924a1d70cd",k.Icon_petRelic_42="b89d53b2-13a8-46d8-b034-29e481c4bc35",k.Icon_petRelic_43="74a46063-9799-4deb-88e1-13ebdf1bbd39",k.Icon_petRelic_44="259e3445-b76e-4749-a015-2e438aab086a",k.Icon_petRelic_45="b53982c6-658d-416c-a8a5-78c63256268a",k.Icon_petRelic_46="d31d1cac-811f-495a-8d71-cb62a4712ff6",k.Icon_petRelic_47="6c62fb1f-841e-4772-bba6-76f93346078b",k.Icon_petRelic_48="de8afe0d-140c-4810-949f-dd9080dbddcd",k.Icon_petRelic_49="7108bf88-9f44-4c05-af24-acf5b0e52205",k.Icon_petRelic_5="e5114c98-0437-41ee-9f97-b8ada3409fc4",k.Icon_petRelic_50="866245f1-2b24-4585-b407-cbd2e5be08e6",k.Icon_petRelic_51="d4002efe-0620-40ab-a6e7-0e93f48b66a8",k.Icon_petRelic_52="41ebbc79-2d50-4c58-b70f-5bbdb455065b",k.Icon_petRelic_53="233c734a-815b-4110-86f5-0af4b01d1a50",k.Icon_petRelic_54="980506b1-94ef-4545-aac2-5e0fc8cc6158",k.Icon_petRelic_55="cd7d2d34-577c-4211-96c0-fd0f0dfb552d",k.Icon_petRelic_56="5a380da3-46ee-4a7c-b085-f326ab323855",k.Icon_petRelic_57="9748eeaa-f90b-4831-9b6c-a774ce3cbe1c",k.Icon_petRelic_58="853f3535-4237-4dc2-ace5-3eedde739082",k.Icon_petRelic_59="78be87a9-9657-42ba-bfbb-59a144dfbaa1",k.Icon_petRelic_6="50506009-c7d5-4e7c-b437-a766c1b3825d",k.Icon_petRelic_60="a50379c5-d958-499b-bacf-f62f071a77aa",k.Icon_petRelic_61="2b6e7374-c07c-4d33-8f19-bfe620069f66",k.Icon_petRelic_62="8d72d4cc-6d6c-4610-a1a4-03dd6a935405",k.Icon_petRelic_63="1f8cf454-eeb1-4197-8a1c-c802d1e69fd6",k.Icon_petRelic_64="573a1790-7f23-48cd-b150-1a1b5a19b03b",k.Icon_petRelic_65="6ce024bf-58ae-4f21-a5fb-b5ce75d21aec",k.Icon_petRelic_66="51ed6f4e-d957-4eb6-bb75-0d71d882aee2",k.Icon_petRelic_67="f14267be-beb7-49f1-a46e-7e3b664abebf",k.Icon_petRelic_68="669419c0-dbaa-4c9e-922f-1c4c43f1cd3c",k.Icon_petRelic_69="efd65e10-7688-4aa9-9a80-00daa882f438",k.Icon_petRelic_7="0c25533d-f3a3-4462-a8ef-3f66ec73d9f2",k.Icon_petRelic_70="80cceb23-a19e-4420-87c5-7fb2b8acb32b",k.Icon_petRelic_71="5476f54e-9d10-4bb5-b75e-0bd10e3dcebf",k.Icon_petRelic_72="748de582-19cd-4d11-87f0-3dcc5e63120d",k.Icon_petRelic_73="737d89c8-1a1c-4b91-a242-8da0de7156d8",k.Icon_petRelic_74="8875dbde-d134-432e-879b-f97168b95a75",k.Icon_petRelic_75="d111c58b-6ce4-40d1-bf1e-f916a1791d6e",k.Icon_petRelic_76="3b20e2c1-7b2a-4659-8722-905236e1b3d4",k.Icon_petRelic_77="14d801e7-7bf6-466a-af4a-438da037a09d",k.Icon_petRelic_78="dba76b56-476f-4e26-8343-a398faf190cf",k.Icon_petRelic_79="77654186-50f5-4fe9-9244-eccdb006ed76",k.Icon_petRelic_8="66a79f17-4a48-4004-9fd2-3555a8ee2877",k.Icon_petRelic_80="1143256b-7fed-4ba5-bd60-14559a5cddd1",k.Icon_petRelic_81="925df444-2dba-471c-96ec-7038c2f1aa06",k.Icon_petRelic_82="643b5935-63ba-4685-8ec9-ef78d67d7eb2",k.Icon_petRelic_83="d129d11b-e095-43be-bfdc-e28792d391c0",k.Icon_petRelic_85="502d9842-aefc-4b27-ba86-8f885ba6071a",k.Icon_petRelic_86="cee2f1da-37e6-4826-94aa-c17d0d643bbd",k.Icon_petRelic_87="322b3a6e-aa5e-4df4-8e1f-d25206790d4d",k.Icon_petRelic_88="0bf7a542-b039-477b-803a-8ae062633790",k.Icon_petRelic_89="7b21effc-df2b-42ae-a1d1-27b8c399e20f",k.Icon_petRelic_9="1d3e41ca-c271-4e9b-afc4-a89b54e1cb08",k.Icon_petRelic_90="444ff143-949c-4ca5-8aef-194777e64acc",k.Icon_petRelic_91="0cdc1f83-1376-4957-9dde-61d5707dcdc7",k.Icon_petRelic_92="2c61b82c-7d66-4eb0-b0ef-21874c6fb31d",k.Icon_petRelic_93="b3999076-9b45-4f92-be38-27d8dc540930",k.Icon_petRelic_94="4de5dfa5-47e8-4e0d-89ca-28e132b9be47",k.Icon_petRelic_95="0c2b291b-df2c-40b1-ac61-5f685d8272d2",k.Icon_petRelic_96="cc6bc210-72d9-4771-8e85-501b4d938159",k.Icon_petRelic_97="e142389c-5173-47b1-8ead-8f16ce07a1f2",k.Icon_petRelic_98="cee0d115-00b8-486b-9c94-9a807dd9f549",k.Icon_petRelic_99="377730c6-c7af-4eae-963d-6d7bccd36c80",k.Icon_pet_1="89f2e5b5-4e68-426a-8996-0b2ff92ba33b",k.Icon_pet_10="3a84f536-f036-4eb4-9093-e76030ab2977",k.Icon_pet_100="178232ae-a644-479f-9033-f289fb36bb65",k.Icon_pet_101="755ebfcb-d8bb-43f2-9187-61f8d530c934",k.Icon_pet_102="e1000778-a6d8-4094-9859-525587e97e9b",k.Icon_pet_103="e1f9ca2d-3c35-4e79-acef-4d85d3e38e3d",k.Icon_pet_104="9e0854b8-38a2-40df-82b9-4a663ef38c89",k.Icon_pet_105="886a2920-5cf3-414e-8412-a0e82650d8f7",k.Icon_pet_106="a5f2f648-97ad-4e58-8ea9-0d053f97d10d",k.Icon_pet_107="f57236f7-cc41-445e-8fa4-7e4f4145aa07",k.Icon_pet_108="5a47eb03-3317-4460-9b9f-f6fa57bf6d4f",k.Icon_pet_109="398e8c39-34f5-414c-972a-e170dd2e94bc",k.Icon_pet_11="2c57f6e8-db7e-480c-b2a6-b5b9bb068fb8",k.Icon_pet_110="1442557f-044b-432f-b371-9ded98f8072d",k.Icon_pet_111="e2280efa-a2f5-41e6-9732-e33c17e8a9fd",k.Icon_pet_112="ea9ae3e0-9d22-4b2b-944f-2e907027a4c6",k.Icon_pet_113="612737a8-8c9b-49e4-8260-9ccb31c75d15",k.Icon_pet_114="ab92bb93-c0ac-456e-9c42-7d41e552eaf4",k.Icon_pet_115="3865777f-31e6-449d-967c-5b4f3270ec4d",k.Icon_pet_116="9896b846-2710-4d0e-9cc8-7d18cb151302",k.Icon_pet_117="99f095da-6cda-4bde-bdee-6a1b2bdacad2",k.Icon_pet_118="550d5658-ba12-4c1b-a159-b885f74845ca",k.Icon_pet_119="30081f17-e2a1-494f-ab02-ceb9523fdb08",k.Icon_pet_12="4bd51dab-4877-4b62-846d-ee64299be26c",k.Icon_pet_120="69cd1958-4506-41c6-b93f-dc4eda84731c",k.Icon_pet_121="bc2589f7-2a42-4ffe-820e-9e2c6eb993b2",k.Icon_pet_122="85aed590-d0ed-449f-8fe9-925f60b0df78",k.Icon_pet_123="aeb6d5e2-91d0-4550-a292-851279207f9c",k.Icon_pet_124="724a89c1-31b0-415f-94d7-637c03fb907e",k.Icon_pet_125="9bb148fe-bd7e-4c4b-a255-63ccca05f6fb",k.Icon_pet_126="283c5b3a-3a93-4dad-b47e-310b915a5391",k.Icon_pet_127="cd814ed5-b62b-4660-bf62-a6087fa4f66f",k.Icon_pet_128="8c030e54-e0e7-4cad-9327-a7f1caa7734c",k.Icon_pet_129="be297e96-812f-4610-b2d2-e6cb14f16b0e",k.Icon_pet_13="de026c00-5de9-4f91-9c9e-54c51f0327e4",k.Icon_pet_130="d4784480-f887-4e86-b4b6-9d34eb523030",k.Icon_pet_131="ad4bd5b9-eb01-4f14-9556-fbad7cf76cc4",k.Icon_pet_132="76edf52f-f3be-4996-9bdc-0fcea40e51cf",k.Icon_pet_133="df1543a6-1f8b-44c3-b4d6-3c380d706741",k.Icon_pet_134="fa5ccf4c-b38e-44e6-9972-c8f5c4b2c1ba",k.Icon_pet_135="f4d33b2e-3445-41c1-b60b-2c7c04867826",k.Icon_pet_136="d93e539e-53f6-4d48-b647-f4f2168b2d42",k.Icon_pet_137="56d66edf-a5b6-4e32-8c58-c68e3d74beb8",k.Icon_pet_138="ac100325-42a9-453d-a316-346590090791",k.Icon_pet_139="fc2bcfe5-9983-4201-b7f9-5d05f833c23f",k.Icon_pet_14="18b0c5ed-d58f-47e7-9b50-ba4124576f7c",k.Icon_pet_140="0d5d0284-4928-4424-8c3f-393b90560831",k.Icon_pet_141="20ca3bea-a5f9-4b66-98b8-416c8f3cde06",k.Icon_pet_142="60e043e4-41f8-4434-aa78-0be512b42017",k.Icon_pet_143="0cfee9da-5e01-4d14-a8bf-5418857749d5",k.Icon_pet_144="f091ae0f-ad90-49a0-b6ac-cb8fc041bc14",k.Icon_pet_145="fa3329bd-b8b5-46e7-a879-1dc06b7204a4",k.Icon_pet_146="397a8e25-3eb7-4d77-b121-87aff0782261",k.Icon_pet_147="d8ee6b11-2b7e-44e3-bcd6-d150714fec49",k.Icon_pet_148="1b71aee5-6076-4037-873e-0c6c697598a1",k.Icon_pet_149="5593d322-ade9-4c42-965b-1106db1fcd0e",k.Icon_pet_15="9312899d-6fc8-4737-92d4-2a6d31a3d7e3",k.Icon_pet_150="7dd9ac81-3ab3-4b83-89f6-2500bd71c3a8",k.Icon_pet_151="1411c933-c030-43d2-9707-735c990b6d0b",k.Icon_pet_155="e7ff6310-d342-4f5d-928c-d345572a7078",k.Icon_pet_156="5195096f-3085-4c3d-811c-adc4c845fba1",k.Icon_pet_157="8e1a4b6e-d9a9-4969-b09d-fbd3b2ed9859",k.Icon_pet_158="e56c2c41-fdb0-468c-b414-629e0e48b8f3",k.Icon_pet_16="666e1051-1265-49f5-9ab2-b86ea6d0f65c",k.Icon_pet_160="fc8915a8-0b61-4bf3-b6b2-0ddc2fafebef",k.Icon_pet_164="a6a6f305-a82c-4d72-8d60-1e288707e543",k.Icon_pet_165="2d93ee17-7da9-4fc3-ad7e-0a64cb99a600",k.Icon_pet_166="1e24f199-eef3-48fc-b752-b826323bf0ce",k.Icon_pet_167="023bb769-81c0-4f32-ba60-79c95dba45b2",k.Icon_pet_168="025e056e-d1bb-4156-8f15-a4b5da194f9b",k.Icon_pet_169="ac6c3a54-4274-4784-9622-fd9277005eef",k.Icon_pet_17="21f5f7e4-b1d9-4c3d-bfce-53d1b81b7476",k.Icon_pet_170="e9c9debb-8701-490b-b5e0-81a603cb424a",k.Icon_pet_171="10cc44f1-784a-4df9-a2e5-9af7e96376c6",k.Icon_pet_172="4c617661-def9-444a-81a5-e8915d32a27f",k.Icon_pet_173="f09ba7ce-d0f8-4b49-9fe2-8b6589eb7cb8",k.Icon_pet_174="6a1e3b7c-f7f7-466c-8720-929359429ffb",k.Icon_pet_175="657bd45a-e448-4a78-a625-9f276cafac22",k.Icon_pet_176="13942a09-4e19-46f0-95cb-3fcabc24148d",k.Icon_pet_177="5701d0e1-246c-48bd-b340-d6b9d362b88d",k.Icon_pet_178="10f4a886-7072-4582-aacb-e76a43373aad",k.Icon_pet_179="5559dac5-1368-469f-abda-4d5469185d04",k.Icon_pet_18="29626503-8d51-436b-a6ca-416e2e7de44d",k.Icon_pet_182="4e16e067-7e49-453b-ad91-8eae3c381a33",k.Icon_pet_183="3083f308-5469-4591-884d-bba9e4d17b45",k.Icon_pet_184="8254e112-885a-4c05-b0be-e64f697d198c",k.Icon_pet_185="dfae124a-f667-4e29-8229-fdbcc6416cfa",k.Icon_pet_186="d18fe0b2-f6aa-47cd-aa4b-9139be29419e",k.Icon_pet_187="ac5b141e-5d75-4a3d-96dc-46103fb056e3",k.Icon_pet_188="0f3cde49-b199-4e45-b44b-fde91328cf5a",k.Icon_pet_189="b09d6787-0051-4ca5-a6bf-6349d14615b1",k.Icon_pet_19="85d2512a-2003-4317-ada0-bdf023901234",k.Icon_pet_190="14780ab9-6393-4f5b-9eea-46990881a658",k.Icon_pet_191="f1862bc7-6afd-4687-a02c-99f6410bb77d",k.Icon_pet_192="296829ea-a604-4ff6-a9de-33ee1f39dcdc",k.Icon_pet_193="85c4d139-3376-4a1e-bc6c-47dabf4552d8",k.Icon_pet_194="f57e3db1-91bb-45d3-9cb0-24aa3ef2a984",k.Icon_pet_195="77c97bf0-fb39-4eb1-bc50-e49bb09675d0",k.Icon_pet_196="cd42b406-54f6-4bef-a836-6578ee474b31",k.Icon_pet_197="8ba93898-9f08-405a-aac7-58f5ace0aa82",k.Icon_pet_198="04d00093-3034-4b02-b93b-d138b2debf8e",k.Icon_pet_199="370220b5-d64c-4501-a43e-4ffcd92aa237",k.Icon_pet_2="f07b3983-ff1f-4a41-99fe-29aebbcd8b4f",k.Icon_pet_20="3d19cb2a-75eb-4410-affc-d9e848a138d8",k.Icon_pet_200="9ba9e56d-e375-4b7c-8e37-3e9a6b8cb1f7",k.Icon_pet_201="c7e0bc0b-c7dc-4fb2-8a99-d4d7eb9877fa",k.Icon_pet_202="83aab5cc-e40f-4390-88d7-69ef504014ab",k.Icon_pet_203="2c094c0d-81e4-4072-9c9e-f5eb39ab241e",k.Icon_pet_204="7a1c44ef-cd69-499a-8529-250f0a03a8f3",k.Icon_pet_205="e33e5c24-3d45-44c0-a6bf-e3a364c7de9c",k.Icon_pet_206="3e22f406-213a-43a4-bcb7-b03a028c5704",k.Icon_pet_207="e2875874-66da-4e49-9617-51f1d6c58a31",k.Icon_pet_208="57d9e165-eab7-4c75-a83f-2e44c1c66a32",k.Icon_pet_209="81af4662-0a2f-4b7f-89b2-e07fc1980d11",k.Icon_pet_21="37087ceb-6ef6-455f-98b9-c2b6006a7ce8",k.Icon_pet_210="973dd33d-34eb-4f68-bd48-b26303a8c4bf",k.Icon_pet_211="a29086de-6b7a-4083-a210-e75fbeda4a09",k.Icon_pet_213="bae4db67-690f-4199-8c23-bf0a310d45d1",k.Icon_pet_215="65e5236e-2d4e-4c9a-85d9-686cebb4349b",k.Icon_pet_216="f476c3fe-89cd-4f71-83d2-0ecf7c910444",k.Icon_pet_217="9cd7fd61-6408-4048-a039-e4924f43200c",k.Icon_pet_218="cd0f17cf-8146-4bc3-bb26-29f4250c6f20",k.Icon_pet_219="8dc0fe4f-01ef-4334-9dc0-ebb45ba26ccf",k.Icon_pet_22="f5ebc351-9ee4-436a-8342-378e794eb29e",k.Icon_pet_220="d9a2ef1a-698c-467b-aae2-1a62a384ecaa",k.Icon_pet_221="160978c5-fc42-4bd9-8c00-a90510893cc9",k.Icon_pet_222="5ab938ec-869e-403a-80a3-e0b59621d728",k.Icon_pet_224="41a7615e-5165-4de0-9b7b-b665f49c60df",k.Icon_pet_225="6212aaae-ebac-4784-8f3c-0c232a67b316",k.Icon_pet_226="ac63d8c0-a73e-44e6-bf9d-636290b56fb0",k.Icon_pet_227="d8944eff-9933-4e1e-90f4-e015bbfa2554",k.Icon_pet_228="a99ab8d2-a922-4465-bddd-8c7e217fba12",k.Icon_pet_229="cbc6bfbb-61d3-44d9-80e6-7a033ea4019f",k.Icon_pet_23="1e8635c5-6d93-4b35-897b-f3b4393bfc62",k.Icon_pet_230="bd15ebf3-20f5-44b9-a507-b286e75cc0a3",k.Icon_pet_231="c0a594d3-8f2c-47db-a280-4b096976c700",k.Icon_pet_232="045def76-c438-46bc-bc0a-ff8dea880686",k.Icon_pet_233="7bf7a652-7929-498b-baef-b658ca256b8e",k.Icon_pet_234="9cadec5b-a111-4e33-8e1a-290e3da018d1",k.Icon_pet_235="0e030649-36d6-4dd5-a75e-32b4290f0da8",k.Icon_pet_236="eb3bfd0c-9208-4ff8-bfb5-da5e917d927d",k.Icon_pet_238="eacc45a2-11cb-4801-aace-8495b1bf8ace",k.Icon_pet_239="ce8da52c-bce3-485b-9c64-cd0e53ef6b84",k.Icon_pet_24="de365346-e268-430c-8b07-3adefcf029c7",k.Icon_pet_240="449c81bf-3a9a-4edb-aaec-443dc2d5fae8",k.Icon_pet_243="f4aad299-f785-4deb-82f4-9c3398d79f44",k.Icon_pet_244="1ad2fb11-ee53-4bed-ab50-7f5124d4c8b7",k.Icon_pet_245="583fdb3d-23be-400e-8fe9-3a1282802d76",k.Icon_pet_247="5f9e9ff7-b1d0-4de5-bffb-0f6b081fae15",k.Icon_pet_248="5d5a0b69-6c7b-49e1-a259-afa44da8bad3",k.Icon_pet_249="3290fd9d-fa96-4db0-be39-ad1f0fa295e7",k.Icon_pet_25="6bc3d8dd-14c1-4abc-9211-6515b8e26628",k.Icon_pet_250="cc7a59e6-e759-44d0-9d05-3ae3cd4f49fc",k.Icon_pet_251="b12364c3-0cd2-4b62-a94b-c529512b2ffc",k.Icon_pet_252="79ae5896-3793-4594-b5f9-41a0c9dee2a2",k.Icon_pet_253="17bb74c5-0d27-4597-a3f3-b0a15d1733ac",k.Icon_pet_254="e4c9189b-cd3b-41f4-a528-b123c3f9cadd",k.Icon_pet_255="922a7db0-a56d-4a15-950f-ce91b11a1b89",k.Icon_pet_256="f31194dd-aa7d-4137-b22c-02f3e36e8047",k.Icon_pet_257="ef2ef063-3e58-4cb6-afe1-ec825543efb8",k.Icon_pet_258="005f6690-ca54-478e-8413-82fa609e2c6d",k.Icon_pet_26="8af7a915-8b78-4fd2-b398-aefe4556826a",k.Icon_pet_261="91fcc552-a6a2-49b1-86da-6a5612740eb1",k.Icon_pet_262="ed3dfe29-bd43-4b79-9a57-c5c37fe74c87",k.Icon_pet_264="d24f4c29-b5dc-4641-8c11-105897452a41",k.Icon_pet_265="52ede517-55db-4aec-a294-fc05b2729ff5",k.Icon_pet_266="f0b9a992-140e-4ef2-8705-470f0a99a368",k.Icon_pet_267="0a26ae8e-8c8b-4f7f-bf4a-01a42c8da6e0",k.Icon_pet_268="5eab656b-6de6-4e63-9625-6658eb8cd03c",k.Icon_pet_269="54414c83-77b2-43ab-a43d-9c4cfe98e761",k.Icon_pet_27="8dcae2e1-fbea-466f-87a0-31e7fbc4abae",k.Icon_pet_270="95be3061-0efd-452a-a868-c22174180eab",k.Icon_pet_271="e3b29347-65ff-402f-87a3-eb88f63562d7",k.Icon_pet_272="0e6ce499-96de-412f-b732-87ea3262d8d9",k.Icon_pet_273="238a9aa0-e874-4d1d-a358-b76f812ca1e7",k.Icon_pet_274="78bdf9a5-03b9-4f79-b8fa-6b07b82a3c14",k.Icon_pet_275="c6fefca4-dd71-4a1b-80e3-9a3ba1d95f87",k.Icon_pet_276="7552d19f-39d5-4fa6-8a14-3e2bee20f87e",k.Icon_pet_277="79e9285d-53a2-4fa3-9081-1d55c8fb3ce9",k.Icon_pet_278="f7ed8361-ed57-43b9-a284-ac3becb76c4b",k.Icon_pet_28="0d801036-f429-4d6e-a67f-60822c38bf76",k.Icon_pet_280="7869cda3-c5c1-493d-8b23-29fd4c219591",k.Icon_pet_285="4cab4bf5-4d14-45b6-8362-9dd19485038a",k.Icon_pet_286="abb466be-5764-4d94-8fb1-4b45976b39ae",k.Icon_pet_287="3c018061-8715-4d73-83b5-3474c03c0e7a",k.Icon_pet_288="6b8531d1-16aa-4478-9051-e2f6fc107f23",k.Icon_pet_289="19ba2513-96ca-4754-b1aa-8d0e0105984b",k.Icon_pet_29="d801a040-efe1-4834-8524-4f9cabffbf13",k.Icon_pet_290="acf70736-1e76-4b3d-b772-6bde3c4776f3",k.Icon_pet_291="28c4952a-8687-4123-a844-f49ea77c38ef",k.Icon_pet_292="6e80a34c-820e-45d9-afb8-f5b0bc688c7f",k.Icon_pet_293="a1bacec3-cc9b-4062-aac4-aef3a9de5a38",k.Icon_pet_294="753d880a-c490-407e-a56a-d2cc1bfce60d",k.Icon_pet_295="4c70f7c1-d037-4061-a418-556892e0894e",k.Icon_pet_296="1cf78eb4-7655-4822-a9f5-7dd744549a72",k.Icon_pet_297="0bf4889b-34b0-4d68-807b-30618c8784f2",k.Icon_pet_298="a9fe9c9c-3eef-4637-82fe-3c6ba599e819",k.Icon_pet_299="e18e90cb-d99a-499d-8c51-23ac46c2b82a",k.Icon_pet_3="136395ac-e6e8-4fc2-bb71-c86a67af4e78",k.Icon_pet_30="7eb8ee10-6faf-41fe-8807-eb7c0cb118e2",k.Icon_pet_300="9451ce37-8073-4024-9ba9-93523316df5d",k.Icon_pet_301="d590e4b4-b716-42c4-8202-30f9fe958ffa",k.Icon_pet_302="c862ce44-3875-4216-a112-1ce3eb7b34cb",k.Icon_pet_303="730a4328-c805-4922-9bcf-1aa12072b4e9",k.Icon_pet_304="149041c1-9caf-40ad-b017-6a1adfcf082a",k.Icon_pet_305="62c443c5-3e1b-43ee-a562-bcc7d2e5eef9",k.Icon_pet_306="15022e22-40ef-4079-a2e4-0873c6cd0c61",k.Icon_pet_307="20af6d66-b6d9-4cc8-9dd3-bc5258f48eae",k.Icon_pet_308="a474471f-1b15-44c7-ab82-7b7577389f7f",k.Icon_pet_309="693b741c-5ed8-4ab6-b64f-a99c8b8b3edd",k.Icon_pet_31="b29210da-c114-484f-85ee-9ac76041f576",k.Icon_pet_310="f17479be-7249-4472-b41b-a7871cb55a38",k.Icon_pet_317="4aa7d9ad-b6bd-4ad6-80c3-d048cfd6bba6",k.Icon_pet_318="69bfe033-d1e3-41e9-9e9a-5e78e3fb85ab",k.Icon_pet_319="d8d298a6-0ddd-4fb2-aedd-fb39fdd5fd54",k.Icon_pet_32="8655234a-babc-435c-853e-2bc82ea5b426",k.Icon_pet_320="e5f28e3d-44b9-445a-9ce1-b194d37e075a",k.Icon_pet_321="b8525ffa-2634-4915-9aa2-18949ca8bb3f",k.Icon_pet_322="33e0bd71-cded-4882-8c9c-9754ca0481c0",k.Icon_pet_323="d43b134b-8188-4842-9fbf-a5be2ad21a9d",k.Icon_pet_324="4aa9306e-1594-412e-a06c-b5083e0d9ec4",k.Icon_pet_325="ee058695-0797-43b7-b0d8-9c5aea490c6b",k.Icon_pet_326="5e0aa66f-8ef5-4c60-b850-57c1aaea2d83",k.Icon_pet_33="767d389d-2e21-4cd1-ab55-650862a61f7e",k.Icon_pet_335="e5b2d1ee-54ad-44da-8592-bee1859379f3",k.Icon_pet_336="9c419ecf-0bc6-4dac-9fb1-bf5ace95f91a",k.Icon_pet_337="ecac6dfb-109d-4ac5-bcbf-949727d4fe6c",k.Icon_pet_338="86fd9af0-8d45-4984-a412-d9c4d8056ade",k.Icon_pet_339="2d3fc3af-d440-4b41-9c23-ec55b3c589f7",k.Icon_pet_34="7ace47f3-88f9-42f0-b9b1-c10a0d1c16d7",k.Icon_pet_341="56165844-cdb1-4e52-98b3-31294a9ef59f",k.Icon_pet_342="bee9ae00-3069-4077-a529-5e599901ad4e",k.Icon_pet_344="04150b83-5d0f-4b99-aa63-ec5970a4c364",k.Icon_pet_346="bcf79a1d-c21b-412f-9e89-715110ecca33",k.Icon_pet_35="56dc52b4-ae15-4934-ae0b-7b9d80e90f84",k.Icon_pet_354="a6df914e-5188-473b-affd-1d5a5f0546df",k.Icon_pet_36="bb730c4a-1905-4abd-a0fc-92929029e445",k.Icon_pet_362="d1d9fdbb-851a-4684-8c80-b456de84a9d9",k.Icon_pet_363="f33ddf07-5132-4ec3-840f-179ae983ed98",k.Icon_pet_37="0fd3c25e-70d5-42be-a3d9-2c7e2e124b47",k.Icon_pet_376="41dd8ef8-b9dc-4aaa-8c39-0529e9394e45",k.Icon_pet_377="14b21375-f272-48b0-9fa2-57a06b8948bd",k.Icon_pet_38="e98f11bb-cb58-4181-bb5e-689b055f47e5",k.Icon_pet_385="0631357e-3fe3-4b7a-9848-aa96834d5b98",k.Icon_pet_386="52b1a34b-8b90-46bf-9e4a-599ff7953aab",k.Icon_pet_387="b29900a2-095e-4435-bb03-8e859542143d",k.Icon_pet_388="43eb47c6-d595-4c3c-a1aa-95d1c13a46e4",k.Icon_pet_39="5049949d-62b8-4c51-a847-b7d6cee35e25",k.Icon_pet_4="4b64f407-477e-47e4-a43a-331976c31c1d",k.Icon_pet_40="20510f0c-9f3c-4064-94c9-32b45e0c4acf",k.Icon_pet_41="eb27277c-229a-4870-a54f-0a643981beb3",k.Icon_pet_42="2674603b-cdb6-4dbc-b5b9-36b52b8ec688",k.Icon_pet_43="256a07ef-5fb7-4780-89d3-0629304ce672",k.Icon_pet_44="00a3e682-5c8f-4e57-80fd-183cabb647d0",k.Icon_pet_45="d729c4f1-dda8-4931-9b4d-7001e40e1039",k.Icon_pet_46="171c5a0f-fe0c-46a6-b2bd-adfee77bc7a2",k.Icon_pet_47="e4377cb9-78da-4c04-b6d5-c752fd151193",k.Icon_pet_48="fce2f75f-df5f-44ea-916a-28cdb2d190f4",k.Icon_pet_49="f69d6215-0325-41a4-8951-20475a5ab663",k.Icon_pet_5="bee9e786-13f5-49fc-9f87-ea287dd1cebe",k.Icon_pet_50="ca5de630-ce98-4826-a615-9cd84b8d6713",k.Icon_pet_51="b2743af3-0385-4bbf-981b-7355a17ec413",k.Icon_pet_52="023c0c17-76a5-4819-8970-8150ecfafa67",k.Icon_pet_53="d6d7becb-6c68-4b0f-8996-66a5006674a2",k.Icon_pet_54="ee8be7a9-d7f1-49f8-ba1b-54d517309419",k.Icon_pet_55="5cd49ecb-2bd2-4e33-afc9-847ae0824c1c",k.Icon_pet_56="c623fc25-a339-4868-9a83-0a54ca3b11fd",k.Icon_pet_57="627ef6f8-ae3a-4ad0-8f08-b5708f46edce",k.Icon_pet_58="d64241df-b154-4769-b2b6-11aaaeae2d43",k.Icon_pet_59="3790705f-8f0d-4ef9-985c-d8373ebf38f3",k.Icon_pet_6="ff0264ac-c226-4a41-906c-7c471ab34626",k.Icon_pet_60="39831cab-8e13-497a-8622-642fa7b89b06",k.Icon_pet_61="15052c6a-9bbb-4b0f-a5fb-10da40993bc7",k.Icon_pet_62="7abdce2d-125e-4308-b5e6-078a05bf807d",k.Icon_pet_63="382a6ddc-e030-458a-845b-28ed632217fb",k.Icon_pet_64="c1efe18c-b370-4fbb-93bc-d5ef2150c116",k.Icon_pet_65="0a82d008-d073-4cda-b343-11750203bf29",k.Icon_pet_66="28681a85-11e3-40b6-92f6-97279248445e",k.Icon_pet_67="c14aeb8a-262d-42b8-b427-3cf5719301c0",k.Icon_pet_68="cfec73ea-0041-41e1-84eb-1e2eb0e116ff",k.Icon_pet_69="fd54b60e-e748-4c43-b838-9e6b5a5f5998",k.Icon_pet_7="17ef1360-064a-49d5-a900-f0e1ac2b9e6a",k.Icon_pet_70="260787f1-7d79-41a8-9a64-a94fbdf915ba",k.Icon_pet_71="858d4414-0eb0-42df-bcae-9133df1a28fb",k.Icon_pet_72="1feab39e-1f3d-450f-ba45-7e5ee80b439c",k.Icon_pet_73="14f34a3f-e2df-4fd3-909e-c42e7dc15efa",k.Icon_pet_74="35036827-1d54-4436-908d-8a895e3b846b",k.Icon_pet_75="830e1cb0-f186-487e-b8d8-9d4aabd717bd",k.Icon_pet_76="dd175def-4b40-49f4-895f-074810edddde",k.Icon_pet_77="81ab6e61-2caa-4960-8df8-4ffd923cd6d1",k.Icon_pet_78="0e280f1d-f336-43d0-8dfc-b08adcbe298b",k.Icon_pet_79="5de29130-ab78-435f-8386-f0ca03ffd633",k.Icon_pet_8="0de9a823-1f4f-4b33-9ea2-e86653550033",k.Icon_pet_80="e6ee9a05-0acb-4f6f-a8fc-138675ef3173",k.Icon_pet_81="b91145af-b859-4143-bff7-25af01224c8c",k.Icon_pet_82="24a93254-1b69-4c0a-8ea9-184e73fea27f",k.Icon_pet_83="7ec4ebfa-0dd0-4f1c-a597-a39e37d61818",k.Icon_pet_84="c0f4c22e-de7c-4143-aac1-d7e34ac53537",k.Icon_pet_85="83bb2c89-6abd-418a-b9cf-5a8e99380bff",k.Icon_pet_86="8545603c-6323-41a3-ac40-239811ce4ba4",k.Icon_pet_87="8365782e-e854-4d77-ae03-a46cb14fa24c",k.Icon_pet_88="ac845260-34db-4d17-bea6-89093ae6b425",k.Icon_pet_89="d2101bb2-7778-4d1b-a5a5-d2790ddd2a57",k.Icon_pet_9="93386d4d-18b5-4c6b-b8cf-954794cb1f33",k.Icon_pet_90="ee454e4b-4df3-4eb7-8a7e-602900460196",k.Icon_pet_91="47d3016e-a1b5-4a64-a359-d0e87e28b83c",k.Icon_pet_92="791ac06e-beb0-4ff4-98e8-c34e5988862a",k.Icon_pet_93="196658bc-f5b6-4d61-b7f6-447346e35825",k.Icon_pet_94="964c71d1-2123-4f41-82fc-b80256c15dec",k.Icon_pet_95="d85eab5d-0ee2-4462-b0ba-595c4222d31c",k.Icon_pet_96="9103b2ba-a9b1-49fb-a930-26a7146d646f",k.Icon_pet_97="478fce77-ab3b-4136-a2d9-69e9e4a539c6",k.Icon_pet_98="48e8753e-9c12-45e5-bff1-3511b814cc61",k.Icon_pet_99="b160be6b-69f8-44dc-ac75-45f09e050e97",k.Icon_petbook="ca22ad66-a188-4ccc-ad4f-97246ba1198f",k.Icon_petevolution_indicator_arrows="75e13af6-4197-4e28-a97b-796dc52248ef",k.Icon_playbutton_default="b1372680-b831-4362-b110-36d2d5d78bf7",k.Icon_playbutton_hover="0ad145b7-0b3c-45b1-a038-c0d58199bbd0",k.Icon_plus_bonus_reward="84e9759f-d023-453c-a59c-c39b6fa484fe",k.Icon_plus_teal="13df7598-587e-4da4-8615-fec2403e6046",k.Icon_prodigy_points="df496067-fbfa-4688-98db-7063119aa2f5",k.Icon_prodigy_points_mini="9d568b0c-e62d-49b5-81a8-da177b3694a5",k.Icon_relic_1="5d15829e-771e-4e47-8701-c46a25a118d0",k.Icon_relic_10="b671f9b0-2838-4fd6-a501-6b9949b9d6d3",k.Icon_relic_11="ec4af452-4e98-47c7-817e-edff539a4b0c",k.Icon_relic_12="6e1b22eb-8b7d-4a79-9b40-b8506db62cc9",k.Icon_relic_13="42c1b3cb-7126-473a-8ada-66a2cfc881cd",k.Icon_relic_14="3029e7f4-8635-4855-88e4-c51cca0c0dda",k.Icon_relic_15="6dcfc0af-60c5-4ff4-b5d4-671c63c922f3",k.Icon_relic_16="1990291a-2d26-40d1-a0bb-b545d0541369",k.Icon_relic_17="aab38410-4959-4c4d-9f90-9ca215540393",k.Icon_relic_18="8c98ac0b-7498-4ca2-8a19-99f0b447ad16",k.Icon_relic_19="4bfe853c-7155-46a6-9b26-74cb85f95cdd",k.Icon_relic_2="87a32d98-1f7e-43af-88dc-bb19fdff9eaf",k.Icon_relic_20="9122670a-d415-4582-9d28-8a049062067e",k.Icon_relic_21="7a0dec3b-3f62-4e04-b0d4-e71b03edb296",k.Icon_relic_22="463e7ded-4742-4be5-8765-42d53da9dbc9",k.Icon_relic_23="b5d96e9e-ca88-474a-9daa-b6def00deb25",k.Icon_relic_24="9c3bbbb9-e19d-42a0-b1e8-035e974b082a",k.Icon_relic_25="0c2966b5-2aa8-41a1-9579-ab20e37004d6",k.Icon_relic_26="bf3feeb9-dd65-44ba-b25c-f80792b1794f",k.Icon_relic_27="31cb6d80-eed4-4dce-8a4f-11798ba8ac1f",k.Icon_relic_28="eca26b49-978a-4286-8251-dceda83d2a56",k.Icon_relic_29="bfa96adb-aa5c-4da3-be06-e59c754e7756",k.Icon_relic_3="6e5d7f7a-c3d9-4fbf-b051-f8be53dc3195",k.Icon_relic_30="79a7fdb9-ebf4-4149-9904-6155d5385f92",k.Icon_relic_31="d13a7e38-4d63-4a11-a9b4-c387000bfad8",k.Icon_relic_32="3f1e5d9f-43bf-41e0-948b-8bee96cfa260",k.Icon_relic_33="85fd49c8-e334-4dee-88dd-c87a1e755a20",k.Icon_relic_34="b26c2dde-3103-4aa0-b524-2f50ee703685",k.Icon_relic_4="98768dc1-8805-4914-ae39-0e176741a3e9",k.Icon_relic_5="174a9cd0-a127-4cdd-ac8d-31d0fd2446b2",k.Icon_relic_6="a21c273f-7927-45d9-a6f4-3f524c327b96",k.Icon_relic_7="b9f2988c-6d30-46d5-aa45-ed5f5075621b",k.Icon_relic_8="c40a2aec-7b5e-48e2-af31-1042320cce16",k.Icon_relic_9="6e7adb03-7a7c-4fd2-81f6-487916425630",k.Icon_reward_gold_1="993d5bed-f0c9-4410-b08f-daaf92e63a05",k.Icon_reward_gold_2="6e8ace8d-054c-4e00-96a8-7c6982b5e0cd",k.Icon_reward_gold_3="19d4ff6e-90d9-44ee-85fb-5b320fc1dabb",k.Icon_reward_gold_4="f932c0df-14af-4473-8db9-d0dbc847b8dc",k.Icon_rift_difficulty_easy="5ae88fcf-337a-46a2-838a-671998965300",k.Icon_rift_difficulty_hard="afce3001-db80-4211-9660-069a24052fd1",k.Icon_rift_difficulty_normal="bfed4ff9-5347-440b-a0c0-91e0430260ae",k.Icon_spellRelic_1="a0a954b6-4858-4310-8ccc-046480c3e947",k.Icon_spellRelic_10="9b42653a-1063-46ad-8f42-a9dc083f16a5",k.Icon_spellRelic_100="b98ce930-e980-4197-a24b-ea783839c63c",k.Icon_spellRelic_101="89d9a4fd-ee5b-4d65-8abe-78bf1fdc968a",k.Icon_spellRelic_102="75979a30-fee2-4f5c-a1ed-72a17401aa2e",k.Icon_spellRelic_106="b51034cc-cdd9-483d-817e-52551070555f",k.Icon_spellRelic_107="8a70e135-545c-4317-b281-4c0e50f77915",k.Icon_spellRelic_108="909a4ed4-5b47-4bcd-9bef-b6ef56b82071",k.Icon_spellRelic_109="4093e152-feb8-47b0-91aa-ed27b8e1098f",k.Icon_spellRelic_11="700295f8-6727-4978-85a9-a76a1f5ca583",k.Icon_spellRelic_110="a3368198-69be-4319-8eec-4d931d10e8ca",k.Icon_spellRelic_111="e133bdf3-867a-4b43-ba28-e22830eeb9ac",k.Icon_spellRelic_112="a46b0338-82e9-4c54-bdb9-897a106dbbcc",k.Icon_spellRelic_113="f28888c6-bfb0-4ffa-aa5a-5f37a9a13251",k.Icon_spellRelic_114="c7d2a61c-fe6c-4957-b219-fe8d6f493ca6",k.Icon_spellRelic_115="dd0b574d-c5f1-4f93-b9c8-27084ab4ec48",k.Icon_spellRelic_116="fffd79a1-8551-4556-90da-57333420b8e4",k.Icon_spellRelic_117="9f0e732f-daa6-404c-8a99-2e0b3fe39de3",k.Icon_spellRelic_118="9268c53f-06da-4d3c-9ab6-a4c63ebafaec",k.Icon_spellRelic_12="8f3c8ab6-c77a-4843-965a-1a6200d4223f",k.Icon_spellRelic_13="fa15885b-d97b-4afe-b924-9d9ee1f90dcc",k.Icon_spellRelic_14="63b7746a-9c69-4624-a410-2938b180944a",k.Icon_spellRelic_15="7455d8f1-9af5-4c63-9eb0-43102634dccc",k.Icon_spellRelic_16="bf6811f1-0c80-40db-8d2d-2be4272553b3",k.Icon_spellRelic_17="2d28c675-f5d8-403e-9191-f629933bf13b",k.Icon_spellRelic_18="e94ef064-a0fa-4528-bba5-ead5b120de0b",k.Icon_spellRelic_19="8774d904-5ed6-4cc0-a02b-a8803d450fb0",k.Icon_spellRelic_2="bb7e9989-5b4d-4c83-842d-03a15c1ebfd9",k.Icon_spellRelic_20="43dbb5f6-3915-4985-8fd2-8867c8dc0ade",k.Icon_spellRelic_21="8e75d907-c550-4266-8afc-5a31b33e8c8c",k.Icon_spellRelic_22="24c187c5-16ce-4324-a2a1-06ca7b6b7802",k.Icon_spellRelic_3="f1c31937-fdb7-4bcc-a7d5-c28949af6c42",k.Icon_spellRelic_30="e875a70d-7a93-4e30-bbbe-15f4844ef0f8",k.Icon_spellRelic_31="4a592caf-a0f5-4429-b86c-ece79b77689d",k.Icon_spellRelic_32="e5a84d53-1364-4dbd-bfc0-822a85108e6d",k.Icon_spellRelic_33="76373d2d-01ca-49a8-b34d-34d0ba9f34cd",k.Icon_spellRelic_34="1df7de6f-e7cd-43be-ac17-1255e8d13d74",k.Icon_spellRelic_35="7ac46f51-86b6-4727-bf36-fb2caf221ed7",k.Icon_spellRelic_36="f491441f-f48c-46ea-b031-55c7302c6157",k.Icon_spellRelic_37="a947cd4f-dd20-4cbe-925f-10dd39afc4c5",k.Icon_spellRelic_38="161ffc6a-ee27-45d7-bd37-76968eea8d94",k.Icon_spellRelic_39="aa78231f-671b-4ecd-b2da-f14a8a6d25bf",k.Icon_spellRelic_4="9a518476-9fd9-4ffc-8fb7-332794a83300",k.Icon_spellRelic_40="6b4f3f5f-82e3-4981-b1f7-81657fa7ebcc",k.Icon_spellRelic_41="8030d33e-bb39-4343-b9a9-a54c75699376",k.Icon_spellRelic_42="caf79519-c723-466d-b1b8-f630b7f46deb",k.Icon_spellRelic_43="6f0681ef-346c-4273-b9a4-13e56ea365cd",k.Icon_spellRelic_44="8a929109-4547-421e-8474-6896c955773e",k.Icon_spellRelic_45="78298265-218b-49c3-8467-cb1a22ce4116",k.Icon_spellRelic_46="8a40d35e-7cf5-4bed-bdeb-ef840c652df1",k.Icon_spellRelic_48="cacf0608-2dbc-4f2d-b684-1737488f0d14",k.Icon_spellRelic_49="f21cb5de-889f-4960-946a-2654c8516446",k.Icon_spellRelic_5="69f48725-5743-4a01-9289-0a517c383e08",k.Icon_spellRelic_50="74760a95-b13d-4476-bf53-27a1424c6146",k.Icon_spellRelic_51="c92b55b8-1485-41b5-a37d-58e1b2f4e8fb",k.Icon_spellRelic_52="18196be6-7258-4834-bdc8-1d8f77402e5c",k.Icon_spellRelic_53="3aab00cb-1f5d-4135-8faa-2f1e627f9b9d",k.Icon_spellRelic_54="33c8691e-5cbd-4d09-b037-74f793f08216",k.Icon_spellRelic_55="751399b9-d090-4e21-9777-5f666dfec514",k.Icon_spellRelic_56="84a53238-975a-48c1-ae1c-96d61830128e",k.Icon_spellRelic_57="ea29d93e-e9bc-43b2-a40b-743663bc574e",k.Icon_spellRelic_58="fe393076-02b3-4bde-9317-33ccac1f8cf6",k.Icon_spellRelic_59="c7c6ea4f-6bc5-4bd4-bdd7-992fe9a71e27",k.Icon_spellRelic_6="6032f62c-a4b0-4c75-8072-7acca8ca2ffb",k.Icon_spellRelic_60="7cfa68a9-2e73-4864-8ff9-509b0ea7b44d",k.Icon_spellRelic_61="377e8a82-2f24-4e1b-9094-e26cd692c183",k.Icon_spellRelic_62="81345eaf-dbd8-41cc-8e75-9b21762348aa",k.Icon_spellRelic_63="c05e6cbf-0899-4e56-b8ea-9a0d93c0c808",k.Icon_spellRelic_64="02f11eda-4120-44b2-81a0-75260229809a",k.Icon_spellRelic_65="ac1a1952-bd68-477e-befb-b672d5ba165a",k.Icon_spellRelic_66="a46f92f7-24e0-4b51-874a-98081a52e781",k.Icon_spellRelic_67="3d937d73-a4da-4d7f-bd48-3b091b964cf8",k.Icon_spellRelic_68="bbbeddcf-e094-4802-bed6-0a61a4b29ebe",k.Icon_spellRelic_69="e3527ca7-a578-410b-ad61-a9272cba01c8",k.Icon_spellRelic_7="21453b90-fc16-4b78-86a4-6399a0f287a1",k.Icon_spellRelic_70="d9ca5ed5-3f8e-4c16-a732-295f348a1cf0",k.Icon_spellRelic_71="09a6c1c3-bacb-415b-9c6e-0b97a03fb09c",k.Icon_spellRelic_72="82fde356-ede1-4053-9bf6-09cef927f1d4",k.Icon_spellRelic_73="249291c2-0228-496e-86e2-0867d57287c6",k.Icon_spellRelic_74="dd0de0b9-c087-49ea-8abe-67b1e05d401f",k.Icon_spellRelic_75="f2d2114f-d703-4971-a35c-071fbe954f8f",k.Icon_spellRelic_76="19bbc32e-449d-4431-bc8f-232663c6728e",k.Icon_spellRelic_77="61d413ea-da9a-4a97-b0ac-de7e2c4dbb1e",k.Icon_spellRelic_78="081c88e5-4b47-43c0-b876-21c21d647d0c",k.Icon_spellRelic_79="0a001fe4-913e-4c81-9080-8a1b28c55ce3",k.Icon_spellRelic_8="f12852e2-bcbe-498f-b85e-90f8ffe53803",k.Icon_spellRelic_80="e9706d6d-ce32-4c2d-9229-29b0fe99c138",k.Icon_spellRelic_81="7fb0b91b-2769-46eb-b954-7cd25a924a7e",k.Icon_spellRelic_82="2a91ebeb-9a7d-4cac-b742-9a65056a6c25",k.Icon_spellRelic_83="023ec071-2abf-4c41-9c87-012bd5f50244",k.Icon_spellRelic_84="cef02f17-579e-4043-b398-7e592bbc72c6",k.Icon_spellRelic_85="c12e0384-20e0-4938-9474-822177fc1605",k.Icon_spellRelic_86="ca198060-9e77-419b-8f13-e9c5340858ff",k.Icon_spellRelic_87="8b70576f-ed9c-4b64-8b79-bd7573b24fd8",k.Icon_spellRelic_88="b9276e72-13e8-4f7f-b2ab-06aed6dbfd9c",k.Icon_spellRelic_89="9fdb558c-76dc-4261-b099-77d958133266",k.Icon_spellRelic_9="9f81998c-060b-479d-b6f5-944b7aee7b4f",k.Icon_spellRelic_90="499e06a9-cbb5-4d74-ae96-0c9250a0dccd",k.Icon_spellRelic_91="5be1874e-7bf4-4353-bb20-d936d93d3363",k.Icon_spellRelic_92="e6b4c10e-ae56-4694-8c49-db4fe7b95fb8",k.Icon_spellRelic_93="691cf97f-7438-4eed-a16e-6881349528b4",k.Icon_spellRelic_94="9e7a6563-bb21-4598-acce-c1d03d1016e2",k.Icon_spellRelic_95="99d14153-a213-4656-a46a-e983d0c89272",k.Icon_spellRelic_96="4f5c110b-af36-453e-b0c5-29caea429712",k.Icon_spellRelic_97="248ec55d-5ad4-4703-9b35-4372b8aa7be4",k.Icon_spellRelic_98="4187befc-025b-464c-9af6-3620f69d2c32",k.Icon_spellRelic_99="254d02ad-f71b-4049-a66d-5d0077fe2478",k.Icon_storeTab_1="4d8e895b-e783-4c64-9b9a-82216bdad1b0",k.Icon_storeTab_10="a9d6bd78-1370-4023-8d9d-a9df10388c10",k.Icon_storeTab_100="c5c165db-28d2-4d54-aeca-6f92d5421fe4",k.Icon_storeTab_101="8f66a5be-0a2f-46bd-9b0b-0a213365e3b2",k.Icon_storeTab_102="6c669496-f9c1-42ec-ae43-9676184a9a24",k.Icon_storeTab_11="ec5942cf-2a12-45a9-ba69-59903e3cdd83",k.Icon_storeTab_110="ecc86e84-5173-4df9-a95d-e2d8118a2cbc",k.Icon_storeTab_111="645f1293-f0b9-47e7-b09c-af3a34253a36",k.Icon_storeTab_112="c73a8164-a161-4ff2-bf39-14e7ac65d75f",k.Icon_storeTab_113="99ac5c67-e442-4d95-a21a-0175e141c100",k.Icon_storeTab_114="d2c6dcf0-aafc-46c0-96ae-60e49db9ba73",k.Icon_storeTab_115="1b00d209-e0b2-4cbc-bef4-a07dff7838ce",k.Icon_storeTab_12="9d95ac1d-3570-4a75-8107-8ffb246ff8d5",k.Icon_storeTab_13="011ea7e2-a883-4c9e-a3f6-ebe091967366",k.Icon_storeTab_14="7e659d44-3a22-4278-a7a0-02cc57f88e84",k.Icon_storeTab_15="17967c14-fbcd-47c7-85cc-f0648a3961ad",k.Icon_storeTab_16="204242a5-f1f1-4d3b-aaa7-057f0041e67f",k.Icon_storeTab_17="646d2a46-81fa-4955-a01d-5b04c2e54c27";k.Icon_storeTab_18="a2f44e3e-3fb8-430b-9cce-3c477920850b",k.Icon_storeTab_19="dafa927e-9bd0-4b5a-bd7a-3f74a422704d",k.Icon_storeTab_2="7d68eda5-6943-4823-a0f8-78d01d004388",k.Icon_storeTab_20="e5d9f6b2-6970-4352-956a-327ffa73954a",k.Icon_storeTab_21="cb78d6c8-ea2b-4c2d-9952-c6f8043b016f",k.Icon_storeTab_22="de45f882-d3d3-48b3-8fcb-b836bea17d02",k.Icon_storeTab_23="12ffdb6e-7db7-43b6-880f-6954242adfbe",k.Icon_storeTab_24="57a4dc2d-5de7-4e2c-8179-85d6e2930775",k.Icon_storeTab_25="981575fa-2860-4509-a67b-a58aaf6eb3e4",k.Icon_storeTab_26="2752d131-ddbe-4872-a4c3-fef647675137",k.Icon_storeTab_27="47be8cf2-4fa5-4188-829f-d283beca9a40",k.Icon_storeTab_28="6e55e86d-7179-4920-bf15-1f951b70b221",k.Icon_storeTab_29="6a0e7ede-6af0-43a6-b60f-167cfc385189",k.Icon_storeTab_3="70b70a19-1c65-492f-99df-9ebc2de1bbc0",k.Icon_storeTab_30="99b5ef05-6c8d-462a-922c-13a0b0437d52",k.Icon_storeTab_31="b48e029c-5629-4839-9082-7145c7746fb8",k.Icon_storeTab_32="9c6d3695-0af0-4c5b-924b-321dd9260796",k.Icon_storeTab_33="b89f3729-de04-49c0-8535-1b2cdc16ae54",k.Icon_storeTab_34="ade6f637-b7ae-4a1d-97fa-6c9b6a08c0a8",k.Icon_storeTab_35="a891f05f-7ffa-4593-aa4f-9fba7de3eeae",k.Icon_storeTab_36="1ab1146b-6165-4611-a405-837e7ced833e",k.Icon_storeTab_37="297c52c4-5db3-445d-bc5d-116285fafa44",k.Icon_storeTab_38="b97f0df1-77e9-4034-be8c-ea826d5c4cec",k.Icon_storeTab_39="42f7d2bb-2d7e-4b5e-8cc8-61f54558ce12",k.Icon_storeTab_4="4eae6dd5-0eb8-45f3-bb92-6338b690b594",k.Icon_storeTab_40="b4b492ec-3dcd-4b4b-b3ac-4a5e2a1f44b2",k.Icon_storeTab_41="05a54efe-04b2-49ee-aa78-be8f3371c982",k.Icon_storeTab_42="f4141bae-6f30-4d89-8b81-253cc1fce9af",k.Icon_storeTab_43="48676cd9-f2d4-47b6-9a5f-4e146a662308",k.Icon_storeTab_44="ec5c76d8-01dd-4d66-92d9-51266f2fa44c",k.Icon_storeTab_45="f6dbf0b8-0b24-4aa0-a54b-0b336e004d16",k.Icon_storeTab_46="a1603a3c-0bc0-4c63-9ec4-6bcbba64fa45",k.Icon_storeTab_47="9a1babca-7b9f-4341-bf27-3f00bcdfe561",k.Icon_storeTab_48="ebfb9688-2259-4aea-a566-713b869dc1db",k.Icon_storeTab_49="657f1248-8c0e-41fd-9be8-3fbca24f1b58",k.Icon_storeTab_5="4407be08-5408-4702-8da2-423254850b8c",k.Icon_storeTab_50="621712cf-f525-4969-925c-c2ce7d7fcac8",k.Icon_storeTab_51="b226af1a-9947-411f-8b87-b6803ad22faa",k.Icon_storeTab_52="81f06512-b845-4dfa-ab04-5a7fc2e66447",k.Icon_storeTab_53="06c8f1f4-fdd7-441d-8bed-0ffbd2fc2536",k.Icon_storeTab_54="ef4a2b28-a03a-4a6d-af65-657c4a8c5324",k.Icon_storeTab_55="309877a3-6008-4476-81e3-35973289c05b",k.Icon_storeTab_56="27732539-2183-4cca-bfe0-2b814218e8f9",k.Icon_storeTab_57="e4fba5cb-f5f4-4a55-bd3f-3d7e7b6897a2",k.Icon_storeTab_58="8718936e-8f78-438c-b9a1-146209a9f786",k.Icon_storeTab_59="773ee63c-38aa-4d1b-bd94-c821235c70e1",k.Icon_storeTab_6="761a043a-a855-4be0-a8fe-7a5f0f363ef4",k.Icon_storeTab_60="0e1fb603-edd4-4af1-b406-c720942aaa89",k.Icon_storeTab_61="6cda439c-7d12-48cc-a419-6b5a9767735c",k.Icon_storeTab_62="3a41fbe2-4aca-474d-a9aa-a4ab51559349",k.Icon_storeTab_63="1b331a95-eb65-4842-90b7-f58b3528e2b8",k.Icon_storeTab_64="d92e249d-c26a-440d-8327-92a0aa19e5ea",k.Icon_storeTab_65="4f3718c1-b84c-437e-9603-89b2d781b16c",k.Icon_storeTab_66="559471c6-36fb-42cc-8b94-8c2d837e93e8",k.Icon_storeTab_67="235070cd-fedf-435f-b455-6abadf3aa2aa",k.Icon_storeTab_68="5d01dcae-8940-4f76-b8f1-5bc7bfeae14b",k.Icon_storeTab_69="0bc6561a-5e97-4265-94b8-ef1dd7d91cc7",k.Icon_storeTab_7="820c6107-ff7a-4086-bca7-5f9a3df09ff8",k.Icon_storeTab_70="55d307d5-9f3b-404d-8dd5-e22ad61d6687",k.Icon_storeTab_71="4d20d785-01bf-480f-aaa3-e837b3101ba5",k.Icon_storeTab_72="38c6b43a-f097-444d-91ce-02589c9f3275",k.Icon_storeTab_73="08fbeca0-e2ca-4240-b4b4-73ab9ea0fe99",k.Icon_storeTab_74="307c6cd5-ff22-45cc-86e2-3b4cf5cd23df",k.Icon_storeTab_75="27fc4ee5-e7af-4449-a8b7-73e86bc8ca1d",k.Icon_storeTab_76="fc90ab2c-77df-45a3-83dd-b2860de4a371",k.Icon_storeTab_77="afd3b212-bca1-4fa5-ad4e-cb60391214a4",k.Icon_storeTab_78="0bfa19f0-3975-44f7-9806-dbc3b0e76ec9",k.Icon_storeTab_79="b83700d7-552b-4755-bdb2-3c5afc68cfa6",k.Icon_storeTab_8="c84b992b-b2a3-493f-91ba-3af7dcb43712",k.Icon_storeTab_80="e998d7d5-70e7-40ca-9572-76fbe71d0d7f",k.Icon_storeTab_81="11a1815e-f0c3-43bf-a5bf-f76011d42b2f",k.Icon_storeTab_82="04d44ee2-3a49-4611-87c5-d9b672b91678",k.Icon_storeTab_83="acbf2cea-a0eb-4264-99dc-db6471e90160",k.Icon_storeTab_84="03399a52-b97c-4c71-adee-18fe0cd71d67",k.Icon_storeTab_85="5d4183a2-de15-42a3-be3d-8bfc668d7e3a",k.Icon_storeTab_86="d965a854-4e38-4e2f-b399-052e48c12417",k.Icon_storeTab_87="314fa89a-ebc5-499e-9488-d5295a50d162",k.Icon_storeTab_88="8a1ece84-d79d-4a7b-8510-6b3445945af1",k.Icon_storeTab_9="dde6a5a9-aa04-473c-bcd3-93a164e5ff67",k.Icon_storeTab_95="8996c6cf-2263-4304-ba25-7251ace7d254",k.Icon_storeTab_96="08a32903-a4ea-4492-9c6b-e2aaaa2125e1",k.Icon_storeTab_97="8f429176-597e-4c5e-b7c8-6de81c1fdc81",k.Icon_storeTab_98="0d9a9b11-35cb-4b46-a2c9-e1a4533d3fd9",k.Icon_storeTab_99="e02882fe-dc5b-4f0a-b768-7e83dd6dd543",k.Icon_store_astral="9f2a8cbb-6a9a-4378-abc0-19831d79f088",k.Icon_store_boots="d7eaa268-b518-45ba-92dc-a90df71f5be8",k.Icon_store_buddies="d436cf52-5f5c-4f5d-8c79-b87e211346a3",k.Icon_store_bunny="ac0b971d-f398-4e1b-86a5-f434808868a5",k.Icon_store_clover="dd8f59ea-7a41-4651-8c6a-7ed49ae2374b",k.Icon_store_fireworks="e2089834-9c34-4350-bda2-48d85137a9aa",k.Icon_store_for_you="815d8c11-60cd-485b-a975-0fbd5e544d3d",k.Icon_store_fox="01476af6-3e52-4c53-8d29-3cf900a87b51",k.Icon_store_furniture="5879ae6e-07dc-424f-a6ee-bfbb2671d4f5",k.Icon_store_hair="41ec55c6-dcaa-4c0a-9dfa-01e06cbc67f7",k.Icon_store_hair_colour="0b030a1d-a52c-48ff-b5f3-b5fdbb7da1dd",k.Icon_store_hats="481698cf-87e8-46cf-9265-cd90cbf802f9",k.Icon_store_jester_hat="270d5643-2b5d-4563-9a1a-070def8a2ca5",k.Icon_store_lost_pets="b87ff195-b509-4be5-9572-897dd7353241",k.Icon_store_magicoin="d65f8aa3-2f5a-4414-96d0-1d48d06b537f",k.Icon_store_membership="269c40d7-038e-4f60-b7a6-675234be2d05",k.Icon_store_mounts="325b0adc-2789-406b-bbee-9c313e69d265",k.Icon_store_mythics="a1339101-2e39-44d0-a5ff-9a2650c8ca73",k.Icon_store_outfits="f6038462-221f-4b8c-9d07-79d6a1504570",k.Icon_store_pet_deals="4383caf4-327e-45d3-b347-eef47b194267",k.Icon_store_pet_hats="2fbc59cb-4283-48e9-a797-2dc92472b42c",k.Icon_store_pet_relics="ea2ebc88-cf94-4c6d-96cb-2e4548e98132",k.Icon_store_region_bonfire="d06eefec-28dc-4b2b-8e0a-04358fc60ebc",k.Icon_store_region_firefly="3b395fcd-860a-4f7f-a2de-f1ccaa083ed1",k.Icon_store_region_shipwreck="84e01325-4dac-4749-bcfc-4e76d4071b9e",k.Icon_store_region_shiverchill="8d533b3e-49ce-4d93-a0e5-d9efaf47d48f",k.Icon_store_region_skywatch="d25a41d9-826c-49f2-ac38-4d740bcb268b",k.Icon_store_relics="12aefbd7-4223-4b96-9f9b-5646beb493ba",k.Icon_store_shadow="9376badc-2432-40ad-a146-c0cc3eae7919",k.Icon_store_special_offer="96c72097-94f8-4e48-9053-ca647dcf08c4",k.Icon_store_starter_pack="9aab6bba-7102-4964-960c-9690e8d75ac2",k.Icon_store_wands="23dfc3bc-421a-4a72-9c2a-e6c6875afdc2",k.Icon_store_wizard_gear="b4c36fba-0122-4884-ba09-e45d114db2a7",k.Icon_summerfest="eb43f74d-6a51-406f-a67a-d152d6f9e23c",k.Icon_tab_member_selected="e24c89a7-3bdc-429b-8f34-e420f9aee5b3",k.Icon_trophy_1st="e5f36540-54c0-470d-9743-54bdcadab2be",k.Icon_trophy_1st_mini="f09643c7-78bf-4c97-a78e-2683a554c025",k.Icon_trophy_2nd="413da68d-90f1-48e5-a560-bdbc6c4ddee9",k.Icon_trophy_2nd_mini="ebe82f86-9299-4c01-a09b-6ce546eec8e1",k.Icon_trophy_3rd="96d99d39-bd06-45da-ad41-a72dd5c6c26e",k.Icon_trophy_3rd_mini="b23555ff-492d-4f60-95cd-e70c442bb75c",k.Icon_ultimatesQuestItem_1="9aada09b-1ca4-4610-a474-8d518abe280d",k.Icon_ultimatesQuestItem_10="1f15d500-e9e4-45a2-b694-fa8e4f2eda9f",k.Icon_ultimatesQuestItem_11="af877da5-21cc-44ff-857a-726307fea1cc",k.Icon_ultimatesQuestItem_12="4c4fa211-e802-4a01-b03c-06983069cc43",k.Icon_ultimatesQuestItem_13="7b5f11ca-7413-4993-a34c-d44b8b9663e9",k.Icon_ultimatesQuestItem_14="d4c2bb63-9f55-4664-8afa-67d5e0d4bc72",k.Icon_ultimatesQuestItem_15="190eb85c-68e4-4274-8d43-5f090404e2f3",k.Icon_ultimatesQuestItem_16="13e69e03-6cac-4414-8beb-91de1efa262d",k.Icon_ultimatesQuestItem_17="314ad0d9-ae24-46a9-9570-e20c1088dc73",k.Icon_ultimatesQuestItem_18="e15310a1-78e5-4879-9c4d-88e533f4cbfe",k.Icon_ultimatesQuestItem_19="9a830507-5883-4d2c-84e2-f149558ce7d4",k.Icon_ultimatesQuestItem_2="6c1b68aa-d634-4e7d-8294-a2b4a272565d",k.Icon_ultimatesQuestItem_20="aa7a8670-1664-42d6-a007-bbf5b0468605",k.Icon_ultimatesQuestItem_21="1be5c48e-0bd0-4535-92ca-dc7ab7239d5d",k.Icon_ultimatesQuestItem_22="58c45141-2b7d-4d2d-8047-63b5c6db4db7",k.Icon_ultimatesQuestItem_23="c7006d02-8cef-4a16-bbd5-272cfdc0afa3",k.Icon_ultimatesQuestItem_24="93c317b9-cc27-49bd-9696-04b1ec21bbfa",k.Icon_ultimatesQuestItem_25="73136a31-ac38-4343-b349-e0b2ee32a224",k.Icon_ultimatesQuestItem_26="a6d9ba3c-5a43-4aff-9985-1cdd70d2f4ee",k.Icon_ultimatesQuestItem_27="32a6c61b-73b7-419e-9087-cb72bd04a6f8",k.Icon_ultimatesQuestItem_28="be3251f5-20ab-471b-b526-9735a74b1702",k.Icon_ultimatesQuestItem_29="98509963-18a6-4151-aa5d-77dea059324a",k.Icon_ultimatesQuestItem_3="f8ad8f7a-79d1-41a7-9515-777e71e1ed89",k.Icon_ultimatesQuestItem_30="911a0c98-8b40-49b7-b2a1-596c1fb72e30",k.Icon_ultimatesQuestItem_31="8940fb16-6dc1-4204-8fbb-a584780c7d9a",k.Icon_ultimatesQuestItem_32="341aed9a-4848-4641-ae73-5f9bdce7a209",k.Icon_ultimatesQuestItem_33="bb083ab5-0c2f-4a25-ba4f-385f9392ada5",k.Icon_ultimatesQuestItem_34="87fe18c1-0e6b-49d8-9562-2638e15b4b54",k.Icon_ultimatesQuestItem_35="031a422f-6f3d-4e6b-9cac-1f09cb39b2fb",k.Icon_ultimatesQuestItem_36="eca660bb-74e5-49cc-9e17-ac5a7e58b234",k.Icon_ultimatesQuestItem_37="57fb23a8-2235-4ae4-8d49-3700cb918875",k.Icon_ultimatesQuestItem_38="56f02a2a-bf52-423c-bb39-b8385da5a879",k.Icon_ultimatesQuestItem_39="146badfa-32cd-428c-ada7-1a5f899c3282",k.Icon_ultimatesQuestItem_4="4798eb5f-21bd-4405-89d6-5d21eddf7c9d",k.Icon_ultimatesQuestItem_40="960135be-b476-4958-8ff5-44fab5446c18",k.Icon_ultimatesQuestItem_41="683abfce-9c16-4634-81e4-638444a7f93a",k.Icon_ultimatesQuestItem_42="f9551326-fa38-4b55-9613-5e5b441426cb",k.Icon_ultimatesQuestItem_43="eb4ece7a-a6e4-4469-a0ae-348098a1ef83",k.Icon_ultimatesQuestItem_44="6b48616c-6879-4ebe-a9f4-96d1033399c7",k.Icon_ultimatesQuestItem_45="e5739a7b-d6d9-4f18-8c9e-148720ee4e98",k.Icon_ultimatesQuestItem_46="f792a942-9e10-4e45-93df-030873509c56",k.Icon_ultimatesQuestItem_47="51e7dd12-6df7-4086-a59e-a7bb9b3ed65f",k.Icon_ultimatesQuestItem_48="093aa9ab-c94e-415e-8e00-deac494af7cb",k.Icon_ultimatesQuestItem_49="977fd3c2-7bc9-4d1c-b9a6-b6b828807596",k.Icon_ultimatesQuestItem_5="c7c336f3-56e0-4691-9b3e-5620b848a56d",k.Icon_ultimatesQuestItem_50="13ed04e7-f35b-473f-9cb9-b80dbbfcef3c",k.Icon_ultimatesQuestItem_51="4b55dff2-f30a-47ee-ad66-dc0e847cb5a8",k.Icon_ultimatesQuestItem_52="2b3ccfda-1aca-40d9-afac-08b5bea1e240",k.Icon_ultimatesQuestItem_53="beb7971c-7b3d-477f-9fa1-0d652bb1894e",k.Icon_ultimatesQuestItem_54="d8111eb2-67df-4337-894c-104765a5a281",k.Icon_ultimatesQuestItem_55="3eb401c3-d037-4774-bfc7-881ef4fe364b",k.Icon_ultimatesQuestItem_56="abb64af6-17d9-4276-afb6-c0351258bfcb",k.Icon_ultimatesQuestItem_57="5510e076-4fc5-471e-b62e-67be890fa323",k.Icon_ultimatesQuestItem_6="becb85b6-988c-435d-a15a-eb38fa6b7f37",k.Icon_ultimatesQuestItem_64="c4596ad7-69de-4654-8fff-b90751fa78a9",k.Icon_ultimatesQuestItem_65="f31b9845-9afb-4cb8-a9a7-82478de9fbf8",k.Icon_ultimatesQuestItem_66="3b29450a-9ac0-417e-b234-a437e266d649",k.Icon_ultimatesQuestItem_67="6af17156-dde5-4a99-a2d2-8b96de93f8cd",k.Icon_ultimatesQuestItem_68="7bfa9748-d26c-40eb-b632-5464470658ff",k.Icon_ultimatesQuestItem_69="26f93936-e56e-4e30-8237-eec91cdaf52f",k.Icon_ultimatesQuestItem_7="6ebf1b18-fa58-465a-9abe-f8e94492e96b",k.Icon_ultimatesQuestItem_70="ef3e2f00-cc4d-4610-8fab-7549129e4087",k.Icon_ultimatesQuestItem_71="ab72becd-425c-480f-b318-cdd7472de534",k.Icon_ultimatesQuestItem_72="a7909739-423f-4454-ad03-9153c3cee839",k.Icon_ultimatesQuestItem_76="7c46a4ed-fe0a-4a6a-b93f-8d4d31f3a902",k.Icon_ultimatesQuestItem_77="cb116baa-f588-4b45-af57-8034c16f313c",k.Icon_ultimatesQuestItem_78="1ed0dc02-a0de-4313-9211-79f938bba453",k.Icon_ultimatesQuestItem_79="6e101486-6619-4cc7-a74c-ee96098a52a4",k.Icon_ultimatesQuestItem_8="92f9531b-a767-44a9-ae06-dbce12337a0b",k.Icon_ultimatesQuestItem_80="7f269cc2-dfb5-4f93-bade-27f3067006c5",k.Icon_ultimatesQuestItem_81="e4d382d6-c595-489e-b351-bfb18ec396c6",k.Icon_ultimatesQuestItem_9="ae09e273-7a3d-4f59-a022-83a019f03eaa",k.Icon_weapon_1="19af2479-cd93-42bb-b383-11525dffc468",k.Icon_weapon_10="ab931ee3-d3a1-43de-89f4-5a90156b1149",k.Icon_weapon_100="65e632f3-8c18-4b8a-9a11-d64e59b78375",k.Icon_weapon_101="ebcea9ef-1a17-42df-a635-76efd014a995",k.Icon_weapon_102="ae0e55db-5557-4d24-bb41-213f32bbc41b",k.Icon_weapon_103="4687a590-8845-4bd6-a94e-38be57347fcd",k.Icon_weapon_104="520f9036-52f8-4077-827b-f058fd9cbb98",k.Icon_weapon_105="3fb104da-36c5-4dd5-aafd-9e9610564558",k.Icon_weapon_106="25e6ad61-5237-4fe3-a5c8-a504dd74c95f",k.Icon_weapon_107="bc79c65e-0a3d-4ce3-95bd-1ff90da74113",k.Icon_weapon_108="9d43c1ca-ce94-43a5-895e-40b782f4c695",k.Icon_weapon_109="0e4714ac-f057-4d30-b71b-43649c908496",k.Icon_weapon_11="b9b4d413-3ca7-4063-8c61-cab96c1e5890",k.Icon_weapon_111="11e408e0-1d36-4400-8df3-bafc90f0ac44",k.Icon_weapon_112="5e3306e0-a2c2-4774-911b-9884c80bf8d0",k.Icon_weapon_113="4613dec6-be01-4aa3-8bfb-bff4b8aa2563",k.Icon_weapon_114="4e3b181a-48c2-49c5-8f79-4e7d29039d78",k.Icon_weapon_115="57859a5b-5af6-40cf-9100-59fea8bab79c",k.Icon_weapon_116="ff887d65-969f-4a22-8a2f-c1ae327f1844",k.Icon_weapon_118="60ac027b-e729-468e-b53f-07f42a924184",k.Icon_weapon_119="da1ba6c2-35af-4323-b06f-6aacb72a7180",k.Icon_weapon_12="48a03d75-5917-4c31-ac70-a64514c237a0",k.Icon_weapon_120="484f87af-30ee-40f4-babc-fcaae5fe9d3f",k.Icon_weapon_121="6fab474e-abc7-40c9-867d-4c568b583f8b",k.Icon_weapon_122="1b31761d-c0c0-4dd6-8f77-33e5a3d7a602",k.Icon_weapon_123="5aa602d8-e8fa-4a42-bf7d-b3274faaf1bd",k.Icon_weapon_124="f20d1158-af10-49a0-867b-d344c4b23496",k.Icon_weapon_125="cf2a7b9d-74c8-43cd-aff2-0ef376d6bea1",k.Icon_weapon_126="517ed277-45de-4529-839d-2c127519bebd",k.Icon_weapon_127="1539a83c-4136-489b-ab2d-0ab01cb88cc5",k.Icon_weapon_128="4bdb1945-82cc-43a2-a4ac-3c742ed69a2f",k.Icon_weapon_129="68ffcd2d-74a8-4285-9095-72d6465e0a99",k.Icon_weapon_13="6a48f0b5-4670-4faa-8f36-4177aa169027",k.Icon_weapon_130="7822ff8a-5b8e-4642-93c2-96418e1e6f45",k.Icon_weapon_131="2bcd48a7-2824-40f6-add4-d99375ecd2a7",k.Icon_weapon_132="bf12cc0b-e504-43c7-b16a-72d1cf5211cf",k.Icon_weapon_133="bde33e37-85ae-45e1-a12c-934a2106b384",k.Icon_weapon_134="3952a09a-ffb2-409a-95a8-8af9e445faf1",k.Icon_weapon_135="12ace860-8ecb-4db9-8b4a-032db25eb4ae",k.Icon_weapon_136="b8729e63-0541-4c18-8c63-e34e3f094c03",k.Icon_weapon_138="a0f07669-c048-43ed-b9d7-4b0b8a57bb02",k.Icon_weapon_139="8cff5b66-e2fa-4774-aeb5-9ab195ec4c86",k.Icon_weapon_14="b943d9f2-d645-4334-8e33-ba21a6eb47cf",k.Icon_weapon_140="5c8abf11-9579-4723-953d-acbfa4dcd56a",k.Icon_weapon_141="53789982-6738-4a3e-9831-32a225d95abf",k.Icon_weapon_142="240f8b59-e243-437e-8bb8-0d438e525c4a",k.Icon_weapon_143="0b817208-07cc-4a18-b21b-549953269129",k.Icon_weapon_144="66e4b65d-4ae6-44ca-bfe7-04fe4a9267c8",k.Icon_weapon_148="164cb888-5846-4de0-8ad6-76fb8ae045ee",k.Icon_weapon_15="788cf8be-e0dc-4d4a-ac29-c99df2ad2adb",k.Icon_weapon_150="bedd6ba7-2ebf-46ce-9015-961660b38e4b",k.Icon_weapon_151="179135d7-235d-4d03-9ed3-868572813520",k.Icon_weapon_152="12062beb-94d0-4c05-ad33-6295e9715d9b",k.Icon_weapon_153="d4a92aaf-9b19-4db8-97e6-a5da44b2d7fc",k.Icon_weapon_154="9c17f80b-e828-4aa4-81a4-0df706d27b15",k.Icon_weapon_155="2815a227-b150-476e-8515-de9882255d29",k.Icon_weapon_156="b551683f-0648-4d79-895d-f7627ca7431b",k.Icon_weapon_157="e4e9009c-472f-43d0-8470-87341d3c7b86",k.Icon_weapon_158="99d61e00-d468-4f75-82f1-7e972b0641e3",k.Icon_weapon_159="c019a623-316f-47a7-8b44-6a0966da5837",k.Icon_weapon_16="213fc75d-b06b-48e2-a5cc-05e5353bf8e7",k.Icon_weapon_160="964d09d6-e8ef-4601-ac50-57ffe17a93b8",k.Icon_weapon_161="7d55e319-71d3-4e3a-8351-9cbf82a3c277",k.Icon_weapon_162="bd96bd2e-90be-46e8-9df8-c7440e51d5ad",k.Icon_weapon_163="96e44ea5-1b50-4a49-afca-00f40898b619",k.Icon_weapon_164="d98aa525-d0a6-4d64-afb0-0477679e2111",k.Icon_weapon_165="3751ecc5-aed4-4216-959b-92590af325bd",k.Icon_weapon_169="be0e790b-5d6c-4199-a418-04a1b69ba4a5",k.Icon_weapon_17="a4938d86-3165-4f48-adff-87dbff8289ca",k.Icon_weapon_170="42214cb3-5bb3-4753-8ae8-f683368845d0",k.Icon_weapon_171="e63e98cf-3292-443b-bde9-c88d15dfc88f",k.Icon_weapon_172="baabee0c-cff8-4bd5-b638-e0e03489b756",k.Icon_weapon_173="774429ca-862e-496c-b5f8-434dc500de3d",k.Icon_weapon_174="6a1c0e6e-18d7-4015-8494-41b1c31157bf",k.Icon_weapon_175="39f4dbd2-c089-4dd0-8fb0-7f5918b576d2",k.Icon_weapon_176="5bdf89d4-2602-4f0d-b445-ff16d55a1d1a",k.Icon_weapon_177="dbb649e7-8a9a-4d12-af05-96bf7fe04401",k.Icon_weapon_178="6449667c-ff65-4ea1-a3e9-520d4ab2c13f",k.Icon_weapon_179="2dd20738-8078-4caf-a46b-5fc1a9befd98",k.Icon_weapon_18="6aa68829-683f-45d5-96b6-d7e961425232",k.Icon_weapon_180="a567da0e-d048-4f6a-a07e-eff11fe5c455",k.Icon_weapon_181="bdf13a80-b824-4ff2-9dc4-e3cbc2c5b885",k.Icon_weapon_182="313e8a5b-e08b-4f06-98f4-b68162610dce",k.Icon_weapon_183="db398233-a784-464a-be8d-d6abad7a2c1c",k.Icon_weapon_184="48ebf300-e14e-4554-84bd-bcf817ca8085",k.Icon_weapon_185="edf9d264-ca62-4fc0-9fd0-ab8cebcb9775",k.Icon_weapon_187="25e35b8a-639c-4534-a5e9-c4c0ca5129d8",k.Icon_weapon_188="ab960e45-538e-4eb7-b3d3-fce2ae61823e",k.Icon_weapon_189="b2c1c8ca-7bfb-4403-826a-53bf5765f725",k.Icon_weapon_19="0b1badd2-3714-4749-b010-bd18dbde0968",k.Icon_weapon_190="5bcdca5c-b5aa-4d85-b1d0-67f3bb9886f7",k.Icon_weapon_191="eeb4f0df-94df-48c9-9360-61502e999395",k.Icon_weapon_192="92fa6e29-1276-4f5a-905d-f95bb437800a",k.Icon_weapon_193="18906af9-7734-4a8c-a48c-935192de8183",k.Icon_weapon_194="9cb36604-3b58-43ea-a561-5c96906eafbd",k.Icon_weapon_195="561a31fe-4de1-4575-89f9-bb878364fb39",k.Icon_weapon_196="5d498564-b791-4609-8848-d2d61bfcde47",k.Icon_weapon_197="d03b0a74-a882-401e-b380-5c84bfe7ff6d",k.Icon_weapon_198="27026328-bc23-447b-b995-ad2ae6827b4a",k.Icon_weapon_199="4c487465-65d4-4e30-bdad-59fbd29dcd0b",k.Icon_weapon_2="ec8d3cf8-6092-4714-81ef-801631a328c8",k.Icon_weapon_20="e85627f3-0e7e-4f94-a091-49269c8f2d56",k.Icon_weapon_200="ef892446-20ad-48a0-ab96-ff09f1b1365a",k.Icon_weapon_201="1fbc86e7-23d6-4855-8755-e07bbe7199be",k.Icon_weapon_202="81dfba10-8996-4406-92c3-9b985c5ba0cf",k.Icon_weapon_203="29a16c74-e704-4bb4-91de-543bb1fca4c3",k.Icon_weapon_204="529a816e-8d0b-44d5-850c-94ec0fd6a8eb",k.Icon_weapon_205="e14aee46-cc5b-420c-8f68-da2bd0ec7589",k.Icon_weapon_206="5f15088d-dbb0-4db3-8947-a9a0e3d58053",k.Icon_weapon_207="2027a4af-6dc7-4b14-aaf4-38bdcdb542d4",k.Icon_weapon_208="e1ef6b0b-2128-4c6f-88d7-cd849c12d62c",k.Icon_weapon_209="98cedccf-f640-413a-9142-2944999e21ce",k.Icon_weapon_21="b8b765da-e046-4346-8f93-1f25a883616b",k.Icon_weapon_210="e1e0a38d-5031-4c51-8b00-57951dbc5611",k.Icon_weapon_211="6ec0b929-8add-47c9-a38e-a7aec9af68ac",k.Icon_weapon_212="3cd0c527-6413-4657-8e51-745e7de139ee",k.Icon_weapon_213="789f6a84-bae6-401a-84ad-a13ad974a78b",k.Icon_weapon_214="5f299d5f-5a05-463d-8b19-1526090bd2df",k.Icon_weapon_215="74ae44b1-4449-4887-9496-a3c3a4b9bf7f",k.Icon_weapon_216="272880a3-5569-4b83-ab53-a25ca6c2bbce",k.Icon_weapon_217="62d1d525-146d-449c-ac8d-ab743e4d21cf",k.Icon_weapon_218="180a1a08-500c-4776-8edc-6a7fa6ce14db",k.Icon_weapon_219="87a9c730-b482-44da-a227-c0e01b0d3da3",k.Icon_weapon_22="f9742a5a-7e8d-4219-bcad-ecdffac88e5a",k.Icon_weapon_221="244bd57c-979c-4866-8479-47c7f0db12f5",k.Icon_weapon_222="e33aee0c-eceb-4f05-863e-ee350b6877fa",k.Icon_weapon_223="1eac4900-dc88-45e8-a57a-f9a08cf29be0",k.Icon_weapon_224="104d62b8-834c-4334-ac5a-8c3d4bc6399c",k.Icon_weapon_226="074b311d-6106-4cfd-8337-0ba77c4d5159",k.Icon_weapon_227="79bd498c-bc64-4d57-8966-9289faf82fad",k.Icon_weapon_228="0a71dcfa-5d91-4c22-b69c-458fa51dfd54",k.Icon_weapon_229="43ce1bd8-761c-46c5-866c-858ce905fe31",k.Icon_weapon_23="b5a4e813-c7e9-4262-933b-c3e99ad97c8a",k.Icon_weapon_230="2c35b723-a616-487b-b51f-f7fe750a3aa4",k.Icon_weapon_231="946ae8dd-4a05-4cef-b6ef-e5d9d681a04e",k.Icon_weapon_233="d8c044dd-a32f-42b9-9afc-6faea033f980",k.Icon_weapon_234="352a0681-7465-4522-8c57-57483704a1bf",k.Icon_weapon_235="9aff6b63-41ab-45ea-8a8a-e8e357be6a25",k.Icon_weapon_236="98177813-3793-4ec6-9818-2ec77ab0fc25",k.Icon_weapon_237="379c53e4-0a66-41a7-981c-1b8d38125516",k.Icon_weapon_238="121d2034-faae-43fc-84ac-7d71f60796b7",k.Icon_weapon_239="6f103f1d-a8a0-4dfb-968d-a9b67d2e044e",k.Icon_weapon_24="1369436a-6f4e-4beb-83da-0e0870372f54",k.Icon_weapon_240="ec8ff3af-8eb5-4b7d-8608-54b23405cf8c",k.Icon_weapon_241="34a4cb8a-fa32-4f32-a23f-7eca6b555029",k.Icon_weapon_242="7c290dc2-d71a-45ba-8267-c537e77b2180",k.Icon_weapon_243="b1ef6031-484e-46a8-b14f-33c22acb1a7f",k.Icon_weapon_244="835ca3bb-a529-4afe-a39e-8444c4b1fc92",k.Icon_weapon_245="296c36b6-5a76-4e0e-b361-30d7318d41d8",k.Icon_weapon_246="fc26ece1-8df9-4f4d-8b01-8f70f358eeac",k.Icon_weapon_247="150c4fa8-5292-44b9-b2f7-d2a073ef1edd",k.Icon_weapon_248="2823dcd0-8482-4a67-b07e-40917b7f9e19",k.Icon_weapon_25="ae021c72-3618-4e25-b25f-2e146be2571e",k.Icon_weapon_250="026a2f13-114f-4e5b-a88e-93f79486703f",k.Icon_weapon_251="60c1b2b5-d9cd-4f6d-a755-b953117916d5",k.Icon_weapon_253="a74cd3ce-7e1a-4b5e-9281-2b04de8c97c3",k.Icon_weapon_254="fac6f2d6-3ba0-4b4f-b8f9-9f9a1c247042",k.Icon_weapon_255="2eb57751-a8a9-4dde-8ece-797588178cf0",k.Icon_weapon_256="d602eeb6-f953-4916-8c6e-dbdf265af166",k.Icon_weapon_257="906b215e-cd35-4ffd-af64-2b86edb50313",k.Icon_weapon_258="a07cbf01-677a-44af-8280-7d61321c160e",k.Icon_weapon_259="84ffcab2-b811-4f13-b4ca-431e9aa008ff",k.Icon_weapon_26="6e27a1ba-b90e-4f24-a20f-2c29e547c38e",k.Icon_weapon_260="888a9995-29cd-46ac-8541-f4685c67ec2d",k.Icon_weapon_261="00510f5a-f1e6-44fc-916b-6754cc5e69c1",k.Icon_weapon_262="c9d07fb0-3dde-4901-ab5d-58ca28923adb",k.Icon_weapon_263="e24665d6-a843-4577-a5e7-02760ed53b4d",k.Icon_weapon_264="d5c123cb-9718-42d0-af7a-e890e0b7a102",k.Icon_weapon_265="6d189e6e-9380-433a-873e-693ef2ca2ba9",k.Icon_weapon_266="f5758f12-07f1-4f2a-903e-fa2f458169e7",k.Icon_weapon_267="9a8881cf-7364-46f2-9d94-cc3083086060",k.Icon_weapon_268="6c32c6f7-5114-47c6-8f13-840f8cf72ca0",k.Icon_weapon_269="b79dac5c-8956-4a83-a1af-344bdd0ae123",k.Icon_weapon_27="180074aa-8a19-4ade-bb9c-fe21d0128fd6",k.Icon_weapon_270="f3ca0cd5-ee59-4acd-8b5f-7c95ed565e6d",k.Icon_weapon_271="416939bd-a391-4069-90ef-96f283eb81f7",k.Icon_weapon_272="f4c2317d-d0d2-45b5-b2b1-cfb74be00074",k.Icon_weapon_273="2adba2f7-ec1d-43cf-8ff8-db4df7832d98",k.Icon_weapon_28="a864872a-6498-4060-b590-37556be3b75f",k.Icon_weapon_282="5019f445-1aa5-437e-9c7e-a3587b4bef71",k.Icon_weapon_283="9b866487-a85a-438f-9e52-fcd857b1eef7",k.Icon_weapon_284="e9d2356b-8fda-4c4d-8518-cfa4d3787b92",k.Icon_weapon_285="8c7e8672-f317-4eb6-971b-b8a9853b2e5a",k.Icon_weapon_286="1708c339-99fb-4573-b853-0ea34d417d4b",k.Icon_weapon_287="3c5faf06-ce5b-44b3-b048-c013d6cc4825",k.Icon_weapon_288="ecc7b9d0-ba3b-4101-b375-6114d6a21a73",k.Icon_weapon_289="277f134a-cd58-4fb5-b856-2baac1bcc5f7",k.Icon_weapon_29="75380bc6-5f94-4ff6-9600-ce2f7ee594e7",k.Icon_weapon_290="a13dee6e-8caf-4297-827c-88ef4325408d",k.Icon_weapon_291="cf3a9825-e0e6-4bd2-bac5-aac66187332a",k.Icon_weapon_292="692ad003-08e5-4d2e-8f70-a0a925383643",k.Icon_weapon_293="a644cad0-90b1-4672-b660-73f639eea6d9",k.Icon_weapon_294="f5a2fc7a-cb82-4181-93b4-9b88c8ec9fc7",k.Icon_weapon_295="6c09a3b0-2ee4-4e5b-b1e8-78b0926afa05",k.Icon_weapon_296="20bf51f4-b8fd-4ea9-a2a6-c4682cf78d4c",k.Icon_weapon_297="b6fc5b3a-5934-4767-a653-f38f7c7a407c",k.Icon_weapon_298="07c51dbb-c39b-4f7e-9f8c-7edcbfc86431",k.Icon_weapon_299="0903133f-c7a1-47a6-bcdd-89c961222556",k.Icon_weapon_3="e780af93-fa6d-48d8-bcdc-ccb1dc78959a",k.Icon_weapon_30="e23ddb43-8f62-48e1-9dbf-135328ceaafc",k.Icon_weapon_300="3fae96d2-6738-48bc-8a1d-c9079f6b9b6a",k.Icon_weapon_301="e25fdfb6-c369-4379-afb0-f0cadb9082e3",k.Icon_weapon_302="34937a31-101b-4999-8fcc-979d75b5e057",k.Icon_weapon_303="86c884f6-f9b3-411f-94f5-0a12eed9adf2",k.Icon_weapon_304="0e582865-45b8-4bbc-aaf8-ff7c8bc25924",k.Icon_weapon_305="96fdc10b-12ca-4f88-ba63-67f98c1174e8",k.Icon_weapon_306="d2c8f8c2-f287-41d8-90ab-0cba7db98b16",k.Icon_weapon_307="958c492e-ebbf-46e7-8d64-7539af6f76a0",k.Icon_weapon_308="16937b30-950a-4b43-98df-69d57fefdbf8",k.Icon_weapon_309="1052d510-6499-4f26-8f5f-052127de3172",k.Icon_weapon_31="9cbb1e02-0c3b-469d-ae05-62683cec96bb",k.Icon_weapon_310="db5a9f64-a7a1-402a-9706-59197ba6a1d0",k.Icon_weapon_314="241be73a-400d-471a-b02e-f20b6bb947b4",k.Icon_weapon_315="38d9f8fc-e69d-48fc-ab34-df753bf41719",k.Icon_weapon_316="cffb730f-f541-42b2-9aa7-4a3926818643",k.Icon_weapon_317="38c7ba14-f446-4f39-9721-1884a9fac6c8",k.Icon_weapon_318="3d373318-1ec3-43c7-879d-f2a027d94474",k.Icon_weapon_319="3d6b0dbb-5508-43a6-8ab3-7541eae6336d",k.Icon_weapon_32="582978bb-e3f0-4754-a733-01246e067c22",k.Icon_weapon_320="49489fe0-1dce-4d4e-aa93-8e412b76f9cb",k.Icon_weapon_321="9904038d-43b1-4920-b8b5-1ac1b96b5388",k.Icon_weapon_322="31a2ba8a-a4d3-4942-b7cd-725f3e62b147",k.Icon_weapon_323="545facbf-5ac8-4348-9b54-9c1c516c0b75",k.Icon_weapon_33="c183f343-7d2e-4406-a572-2b9583feb76e",k.Icon_weapon_34="daabb528-16f2-4a02-8137-c1c4eac38230",k.Icon_weapon_35="f8ddbc68-4124-4aa1-8f7f-d531994e13d8",k.Icon_weapon_36="a60dfc45-89c3-4800-ae8f-759d12696218",k.Icon_weapon_37="942994cf-5320-467b-87f6-3ddc343b8bc0",k.Icon_weapon_38="679504ca-edd3-4008-becd-f8b388a8cd70",k.Icon_weapon_39="956b1253-25af-4beb-b2ba-bc30d143c392",k.Icon_weapon_4="11574e5e-e2af-4e1c-89d6-b12fa92bebcd",k.Icon_weapon_40="097900f1-0dac-4172-82d3-39b2bebd16fa",k.Icon_weapon_41="34f68c8c-74d2-415f-8978-d5bd3ed3bcb0",k.Icon_weapon_42="0456b091-52ac-4cb9-b98c-ef7074263128",k.Icon_weapon_43="e8bf3772-14d2-4319-a031-56c2a4720a1c",k.Icon_weapon_44="a11ec914-9d11-4539-a647-b32bc3e24102",k.Icon_weapon_45="dd6d6066-deb8-4f77-9c16-b5eb1aa358c9",k.Icon_weapon_46="b30743f7-bd8e-4ab7-ae63-2b132a214775",k.Icon_weapon_47="c5b6aac0-e707-4852-92d8-849c7b8cb39b",k.Icon_weapon_48="6fa2f6bc-fb22-4862-844a-718729f24de8",k.Icon_weapon_49="5dddbbe9-ba0c-4dff-9aa2-0495cc04893e",k.Icon_weapon_5="3c419e52-4ffb-4e9f-9117-1c2ec37f4b9c",k.Icon_weapon_50="40afa905-3192-4ab0-a1f9-02dc26fa4a4a",k.Icon_weapon_51="ba5ad703-781c-4f71-9903-6fe42af54fb7",k.Icon_weapon_52="461bb9ca-7608-477d-bac5-b5cec37cc67a",k.Icon_weapon_53="d41c0688-a89c-43ef-a8a8-1d643aa2e0e6",k.Icon_weapon_54="caa8f5d7-868d-4b94-af04-a751a78bb7c1",k.Icon_weapon_55="659b3c30-0784-49b1-9acd-30c9652e2f2f",k.Icon_weapon_56="35ace9af-5b86-4d29-91c3-c6869b07813d",k.Icon_weapon_57="2a2de320-a79b-4ac3-87a6-5dbd5e4792a2",k.Icon_weapon_58="ba6b98f5-8f6f-4c76-9066-1e96769e11dc",k.Icon_weapon_59="6286e5e4-da27-4214-bcbe-61a9d8655f1b",k.Icon_weapon_6="7d7f5646-54d9-4087-ab29-df74ea7f0eff",k.Icon_weapon_60="dfc699c8-0b1c-44e2-90ad-4b94c15e6641",k.Icon_weapon_61="88b25f8a-70a6-4177-bf21-cd2ff2c15dd8",k.Icon_weapon_62="565a5939-c82e-4d54-a6d9-d2cb0d9ad34b",k.Icon_weapon_63="2997e965-a666-4a8d-9404-c4ef6e0388e3",k.Icon_weapon_64="b73938a0-b939-40fd-a97d-6c7f3cab2dd3",k.Icon_weapon_65="959eb0de-d7a8-4610-928e-281272389fc3",k.Icon_weapon_66="6eba519f-02f9-4193-82bf-ce2413038924",k.Icon_weapon_67="a72823db-3ddc-4cca-a60b-823c015829c9",k.Icon_weapon_68="35be0741-42fd-456a-812c-57c6a89c8919",k.Icon_weapon_69="d448c554-2082-4f24-820d-4dbbf6b07c77",k.Icon_weapon_7="9976a37f-1258-4c74-8d37-ef4f2499dfa0",k.Icon_weapon_70="3ca23504-9663-4133-a3ed-203b810436be",k.Icon_weapon_71="6d08eef2-ca75-4144-bb99-e85d4332e10a",k.Icon_weapon_72="f191bca9-af38-4000-a8ce-b43f57cf634f",k.Icon_weapon_73="908add0f-1a15-471a-a4dc-8fc70ccc403c",k.Icon_weapon_74="b64d02a1-6448-496c-b88d-22011810f6a4",k.Icon_weapon_75="8af14e35-dea3-42da-81bd-042fa20d849d",k.Icon_weapon_76="583e025b-b8aa-45bd-845d-53a490221143",k.Icon_weapon_77="78f9eb1c-e763-4f7e-bb6d-90642ce1abad",k.Icon_weapon_78="e65cd0fe-3960-4932-bc74-287d62c54bf7",k.Icon_weapon_79="f41abb7e-61cf-4c35-860c-09076af30dd9",k.Icon_weapon_8="33e90953-4dfc-4f02-a5f1-0a8437463d66",k.Icon_weapon_80="2c3fa3e5-ab75-44ae-904f-4756f1933027",k.Icon_weapon_81="67c90fa9-8f4c-44cd-ad38-2a2f9a5ee966",k.Icon_weapon_82="55f91252-faa5-49f7-84c0-84b1239d5826",k.Icon_weapon_83="aa066562-bb6d-44c2-8eed-1192acef1107",k.Icon_weapon_84="e5b8f63b-4698-471c-a408-d662fc90ce3f",k.Icon_weapon_85="4465f6c9-30ec-48ec-98c4-f1e3c015bded",k.Icon_weapon_86="54bdb2f1-f3a5-4df7-ba7b-0c1a40c25cdc",k.Icon_weapon_87="787a3250-1336-4b73-bdda-f70f21373932",k.Icon_weapon_88="58edf0ca-f951-47ac-a107-507fe47194c6",k.Icon_weapon_89="d579d4f8-7ebc-4712-9d9e-bc7c6bbd479f",k.Icon_weapon_9="bace1907-1080-4812-a685-8ce79320ac53",k.Icon_weapon_90="15ebe361-5962-41fb-8377-8313960b33dd",k.Icon_weapon_91="afba2971-db5d-48a4-8ce8-d509eb302c97",k.Icon_weapon_92="ef1f2b79-bbaa-42e9-8f33-fb3399791c7d",k.Icon_weapon_93="cead2f52-8557-4350-b719-6ddfbb4df451",k.Icon_weapon_94="2df69434-e901-44c2-83d0-6d4b49765508",k.Icon_weapon_95="2b7a7d04-3cda-41e2-bd49-32b06ca43dfd",k.Icon_weapon_96="d346da67-2a9a-47f4-8a8e-9dfabee943bf",k.Icon_weapon_97="f985b3d0-29bd-4176-b87c-f40a159df615",k.Icon_weapon_98="a8b9959d-1b5f-4bbc-9e9e-dd976864cd0d",k.Icon_weapon_99="4e9949a8-92d0-4935-b5b4-9e1811ecea65",k.Icon_xp="d4567fad-c437-4fb0-abb5-6ac5b71da560",k.Infinitytower_closed="a18a20f1-c854-439d-9af0-692a80efa18b",k.Infinitytower_floorbarricade="70f73256-1807-4b33-8cdb-457f64d1da57",k.Infinitytower_open="f9119200-ed8c-4ec8-9efc-2e80132e1e88",k.Info_rewards_cycle_2="5fcc63ed-8399-4208-9c24-82e08d0a6cd2",k.Ink_ball="efc7da2d-a795-4058-abe5-807bf72077e1",k.Ink_blob_1="b9905e7b-0b08-442a-8ac5-37c7f1d17496",k.Ink_blob_2="dd3bfb2b-247a-4ce0-bf0d-0d1ccf83eb23",k.Introducing_Wizard_Dash_Home="9dd5416b-14c3-4be7-97fe-fe705c7432ea",k.Introducing_Wizard_Dash_School="eca6ecea-e2bd-44e5-aed9-1b6ece8d7042",k.Item_details_modal_background="bd6c2bef-a799-4df5-87c5-67dce9b16acb",k.Item_details_modal_background_ultra="938b2dda-3619-4cd9-8234-7fa68ad0a9a0",k.January_2024_teacher_gift="3041f213-1c32-4dd0-b5d3-e79a78f9e526",k.January_2025_teacher_gift="5f41f130-ca52-4218-a203-debbbc9bdcd4",k.July_tt_home_screen_background="d31577ac-ad74-46c9-bb14-14bf4bbe8039",k.June_2025_tt_home_screen_background="2894dff0-0ba5-4f57-94e9-6fa237d0ba2d",k.K_state_1_100px="83f303a7-d96a-4093-b419-13ee9a8424d5",k.K_state_1_150px="6809d5bc-6302-4bff-8f57-f9efb0f8abc9",k.K_state_1_225px="e872d8bf-c10c-4b64-be88-7bd4fc5c5ed7",k.K_state_2_100px="79ae76d1-1de7-44fe-92cf-a5df6d3f3003",k.K_state_2_150px="a87240ee-875b-41ab-8fa1-c65034893e85",k.K_state_2_225px="7f196f43-03b4-4c97-a6ae-7e6db18bdef5",k.K_state_3_100px="f8d052fe-4eae-477e-8953-91bfbac248e1",k.K_state_3_150px="51e5c2ab-7c5b-4b0d-a084-af12a961762c",k.K_state_3_225px="5102f9d2-8a08-41f1-853a-43f1e407bb37",k.K_state_4_100px="a29573af-c63e-4cfb-9754-51e6b002ae1c",k.K_state_4_150px="f126421a-d0e1-4b6c-95ee-fc122a6628fd",k.K_state_4_225px="dea5a709-e010-4b3c-9e11-d13356843653",k.K_state_5_100px="712b8ebd-1c29-46c1-a482-b949e9da2b80",k.K_state_5_150px="65872e15-f25e-4701-af8c-ad0a740843db",k.K_state_5_225px="84876ff7-fa59-47cf-92ed-e71f58dc5578",k.Kandi_Korn_Tooltip="bfee774f-8225-4d2f-b56b-dd7cb4d7bd76",k.Key_pose_dragon_astral="24d34652-594d-43a3-bd2f-71ad22b8c015",k.Key_pose_dragon_fire="8c670b7f-47f6-451e-9e6c-386bbd4b6416",k.Key_pose_dragon_ice="25f65336-b177-4c0f-9adf-38cb0e7baf02",k.Key_pose_dragon_physical="0d281863-90b8-490b-a830-a9bf5e913613",k.Key_pose_dragon_physical_smaller_silhouette="654fa615-e1c2-49ef-873d-344c4f3dd616",k.Key_pose_dragon_plant="929d83a9-fa13-410a-b2c0-71a10063701a",k.Key_pose_dragon_shadow="3763af09-7994-492d-abd9-d8fb6a992802",k.Key_pose_dragon_storm="b3a6ecb9-0d27-482a-86b4-d53cec889e1c",k.Key_pose_dragon_water="ec4b139d-b476-4ceb-a6c7-e21c75a4847c",k.Label_full="e7908d67-1d90-435f-b277-3206893d404f",k.Leaderboard_class_code_backing_splash="ddc6e534-0bbe-4474-af3a-5f386ecbbec4",k.Letter_DungeonsWizardWatch="52f514c4-1bc8-437f-93a5-2ed88fbba129",k.Letter_RuneRun_Launch="c8393d0b-0923-46d4-ad57-4961a27e1187",k.Letter_RuneRun_Prepare_ad="1e32ee54-df98-498c-8a37-1c8f4dc5310c",k.Letter_RuneRun_teaser_ad="219ebdad-76a4-416f-bbd7-c8278695cb99",k.Letter_crystal_caverns_ad="39aaf8ba-948a-4b0f-bf78-6e166647270b",k.Letter_crystal_caverns_teaser2="8ae37d20-92a1-4ce4-9b4f-36a864b40048",k.Letter_mail_open_image="34ccbabd-faa8-4f9e-87d8-dcf8e1501208",k.Letter_member_reward_feb="9c27e6ec-1d65-476f-92da-0203e7e9bdae",k.Letter_member_reward_march_2019="ab7ae1ad-9239-46c2-846b-5fc5146b50f4",k.Letter_memberbox_to_treasuretrack_mailer="42896a0d-634f-4bf1-8e18-5744ab0c6728",k.Letter_memberbox_ultra_april2023_mailer="4e84e868-8752-46a9-91e1-3196a2c35c13",k.Letter_petbook_ad="aad7b2bd-f844-4d44-9fa0-707713502631",k.Letter_pumpkinfest="ea42cb6f-d575-4bb2-b822-a3ce0fda0933",k.Letter_red_bubble_ad="a0bafb18-2d85-42cb-a3cb-597f9954d542",k.Letter_runerun="35f773db-2739-474c-bd8a-35ea36c6db7f",k.Letter_season_end_rewards_bronze="efa3bf7d-313e-412a-872b-0c18f7a6faa3",k.Letter_skywatchtitan_ad="93f0faba-17db-4bbb-bb63-9beec8efa422",k.Letter_springfest_ad="dc3a3969-4130-4991-8902-15b06c012ed1",k.Letter_springfest_start="dcfc7694-bbe6-4fd8-97c1-062ea4d90e04",k.Letter_star_bonus_teaser="63f76560-95f2-4b20-870f-67e06d35b23f",k.Letter_starlight_teaser="1577d212-4eb5-440e-a066-261e84ed0ec9",k.Letter_summerquest_ad="fcb6228f-304e-436b-8b66-7ffb90065cff",k.Letter_titan_co_op="6db6af2f-ee16-4dcd-9707-d5c8bd04f8c9",k.Letter_titan_gearset_ice="5d731e3c-5f4d-4dad-aea6-f30207bdcaec",k.Letter_titan_gearset_ice1="d6761a8c-986a-4ce0-9b52-bab7e905ad23",k.Letter_titan_shard_teaser="6fc701bd-a6e8-4895-879d-7f3e51128fbf",k.Letter_ultrabox_april2024_mailer="979fd69e-04fd-414b-b643-7853ca8f47b2",k.Letter_ultrabox_december_mailer="b450d9ae-d581-47a2-a26b-654625b2d507",k.Letter_ultrabox_january_2024_mailer="08c5e1ce-99bc-479e-b6db-41e8bf0c1a15",k.Letter_ultrabox_july_mailer="00e6a61d-1a9d-4317-978a-0efce796f740",k.Letter_ultrabox_october2022_mailer="845760f5-83a7-4c2a-80fc-662cfef41f50",k.Letter_ultrabox_october2023_mailer="e454efd6-31aa-45c7-87fd-03625b344f68",k.Letter_ultrabox_to_treasuretrack_mailer="2160a0a7-468d-454c-b426-c5c2bab6f7cf",k.Letter_winterfest_2020="dad19ad3-42cc-43b8-b692-e045450fd7a9",k.Lock_glow_blue="b0e4eb75-ba02-4c4d-ad60-dfbc314c0c9e",k.Lock_glow_magenta="3fb36e25-1402-4d44-bf55-7f1e42384ff3",k.Lock_glow_purple="24c81c23-4157-42a7-86de-80509c9aace2",k.Login_bg_1="30dec100-0244-4b59-8a38-33cbd8cd6faa",k.Login_bg_10="c4708286-1749-4338-b26f-c4c7ff78f654",k.Login_bg_11="508f5c50-36a0-4f0a-863b-7511b03e1bfc",k.Login_bg_13="48f61fbe-215e-42a0-94ad-81bd491da4ca",k.Login_bg_2="a61377d3-2379-4a60-a22a-32fa18f40a26",k.Login_bg_4="e4118670-c092-40f7-87b8-4069cb27efce",k.Login_bg_5="092e5971-6164-4803-b1be-967c09c433b5",k.Login_bg_7="9d64b0e5-9530-4744-8e7a-f35808d61475",k.Login_bg_8="fb63adb4-78ab-4e13-922c-799c8f21331f",k.Login_google_signin="e3717a41-fa27-447a-a6fd-ee20ca7d4a5a",k.Loot_bag_modal="9ac9796f-3361-4503-b9c0-7bfb3e0c8c61",k.Loot_dash_background_lobby="b9d3c36a-1556-4fa5-be20-a172fcbfad5c",k.Loot_dash_lobby_cover="f6de9afc-10c1-464b-876c-ae629a2db04e",k.Loot_dash_logo="62e073cf-2f99-4804-b7eb-9da1cb430a8d",k.Loot_dash_transport_modal="7ee205b5-e2db-4928-9482-eab245f28125",k.MB_Treasure_track_May_2024="65b8b2db-e056-4969-8908-58d7ad5123b3",k.MP_Intro_Modal="1e429705-e210-4be8-9b24-c0dc8d71b6bb",k.Magicoin_pile_core_no_glow="f431c3ad-ccb0-4d30-8975-82ea4a280570",k.Magicoin_pile_core_small="2bd05195-60b4-4734-b661-bd53b22ce7fd",k.Magicoin_pile_single_image="2566ba35-b257-411f-8ab3-6429c68d2cc1",k.Mama_Star_Tooltip="7e31bd48-f72c-4c62-8a8d-ffbb8819bdbd",k.Map_icon_moonlightfest="5d058aa4-a824-45ba-9b1d-cfacb990fe21",k.Map_icon_pumpkinfest="4aa9f4a2-1fa2-4f1a-bf9a-bc669c68931d",k.Map_icon_starlight="7067d4dd-7d0a-4073-aa44-7e299f6cd0fe",k.Marble_large_active="d10ec19a-5675-4176-b604-2682fd5a46c4",k.Marble_large_default="d97071f6-18c9-4ca7-8c21-c9af9751af39",k.Marble_large_hover="39aeccae-f28c-4520-9135-27c855b39566",k.March_2024_teacher_gift="f7d0b888-137e-483c-bb3b-ce1d59499552",k.March_2025_teacher_gift="9f6b9ce8-0322-46bc-9e8e-a7ebd692cf52",k.March_2026_teacher_gift="7ec2eef0-f56e-4f92-a718-45cb38f87a9f",k.Matchboard_player_rifts="9f8a328a-6794-466b-a155-983c7934c5c8",k.May_2024_teacher_gift="08c7d742-b372-4593-841b-4dafef6f21ba",k.May_2025_teacher_gift="29626c58-0cc4-4673-99f7-6e1f7f1f7598",k.Mcoin_pattern_celebration="f0b20b12-e885-40c4-bbb8-da09abff6462",k.Member_frame="28eaa4b0-5039-495c-a806-f1081fb89d72",k.Member_jar_empty="dee4a641-4c79-410e-bf21-96c2e30eb41d",k.Member_jar_full="9979d576-b03b-493e-80e3-a8965c1049c7",k.Member_jar_half="a5957dc3-8a04-4c50-a8af-beb626d85d6f",k.Member_jar_little="a3fd68dd-926c-462f-a554-1e3d6e5040d7",k.Memberbox_mailer_june_2024="36058cca-b83d-4023-8f7f-6ce1175eed9e",k.Memberbox_preview_mailer_image_December_2023="5ff35ac2-b754-42fc-8566-f0f8f9a392c1",k.Memberbox_preview_mailer_image_May_2023="075aed6f-065a-4228-ba28-2d4c88023a4c",k.Memberbox_preview_mailer_image_October_2023="14aa1ede-d22c-48d9-9920-a84c941b94cd",k.Memberbox_preview_mailer_image_September_2023="aae9840c-3953-4c9e-aec1-094e397736de",k.Memberbox_preview_mailer_image_april_2024="55d648df-d8ae-4066-bdd2-7c1c7f52ed94",k.Memberbox_preview_mailer_image_aug_2023="49b8015e-5747-412b-a5eb-4387a614608b",k.Memberbox_preview_mailer_image_february_2024="d1b28dcb-b711-4548-9eec-803172773bd2",k.Memberbox_preview_mailer_image_january_2024="8855f77c-e520-4085-818f-270d22199c58",k.Memberbox_preview_mailer_image_march_2024="39a186ee-778c-4401-9cab-a0a6f36002dc",k.Memberbox_preview_mailer_image_may_2024="473b62ab-8afb-4fe0-9fe9-124c80ae0122",k.Memberbox_treasure_track_mailer_June_2024="8204f4ef-8675-4932-ac23-75b00543a84a",k.Memberpet_icon="d512556b-5825-46cb-9d63-c7cba6cd4465",k.Membership_Modal="d73e3da6-71c7-4335-818f-21713bf66716",k.Merge_rank_badge_small="66ace882-bea9-44a5-b7b1-24d212933b3e",k.Mini_member_icon="54c86c56-d5a7-4306-b3c0-c6fdc9797f5a",k.Mini_member_icon_b="b0d5ee17-3749-4be6-85dd-a4abe432d9da",k.Missing_asset="d2d5dd32-08e1-4c39-9ae2-771ba5d49ee3",k.Mlp_arrow="9b2914d7-34c7-4ed9-9817-cc229e9b49de",k.Modal_banner_blue="4acf024d-76d5-4cf3-90fe-a5b32e85f713",k.Modal_banner_green="551b0540-f04c-47bc-8fbc-e463090e8745",k.Modal_banner_purple="504115e9-eb66-4eb4-9f3d-643706d0b11e",k.Modal_banner_red="1f970558-2087-4ffc-8054-6749c4fc0d29",k.Moongems_promo="3beeb7f2-1f91-49a8-bfe8-e2847b939b30",k.Moonlight_loading_screen="8106c7ed-f79b-40c0-a74e-9e69c0daac88",k.Moonlight_statue_boss="3615bcf2-580b-4b11-8a24-db5c08880dd3",k.Moonlight_story_1="e9da43f1-71ea-415e-8c4e-25e910d2a4d3",k.Moonlight_story_1_intro="18364aaf-4329-445c-97b8-01c27ab72152",k.Moonlight_story_2="ddd1fddb-d0ec-44ea-b74c-aefde9540503",k.Moonlight_story_3="66153fae-8dc2-4464-904f-bc11d18fab5b",k.Moonlight_story_4="2575bfcd-9563-4b6a-888c-6683d053b5c1",k.Moonlight_story_5="585b8917-6c2b-4720-af8c-c414c2f19d2a",k.Moonlight_story_6="3fb66fc6-d2ba-4fff-8949-2d49cc43c35c",k.Moonlight_story_7="694f9302-5008-4833-95a7-fbacc609b86b",k.Moonlightfest_wizard_watch="8d1b38d5-4290-4340-9f9b-4ad48a7b540c",k.Mount_above_1="3f7065b4-66eb-45e0-8f8c-fd47f33ad983",k.Mount_above_3="4f4f93b5-70b4-420f-9f6b-eab2d696f788",k.Mount_above_5="09d4b806-3dee-4c61-9b79-8ca8e9afc7ed",k.Mount_below_1="afd8ee62-bad2-44fd-8914-eb9e8311267e",k.Mount_below_3="caf0954e-3f50-42c9-8b25-5fdcb0ccbe38",k.Mount_below_5="1f0dc981-0d0c-48b8-b271-b3394d8c205e",k.Mp_boost_popup_image="1459209a-12cf-49a9-80f2-4b650f61a7eb",k.Mythic_Aquadile_Hero_Pose="5c3b2a6a-5c80-4de8-b1e1-662397000e21",k.Mythic_Arcturion_Hero_Pose="994e3475-3401-46c0-8fb8-745dec04a779",k.Mythic_Barkbarian_Hero_Pose="3ce8eca7-bbfb-4777-b07b-74e56344ba2b",k.Mythic_Blast_Star_Hero_Pose="eb449254-d605-447b-b7bf-62e27729ac08",k.Mythic_Buzzra_Hero_Pose="aed197d5-117c-4e18-9911-a9e23930059c",k.Mythic_Cerenox_Pose="c67a26ab-8d6f-4ffe-8aa4-28989531f4e0",k.Mythic_Cryospike_Hero_Pose="fadfc104-7135-44d3-bc2a-3faae84e1b4f",k.Mythic_Drenchor_Hero_Pose="77b0b732-6891-49d4-aa92-3a5db19041de",k.Mythic_Eclipse_Hero_Pose="7cd47d89-158b-47a9-a62c-bfa04bfc48ce",k.Mythic_Frozzra_Hero_Pose="d2161848-a95c-4fa1-b484-a9aa2f24333e",k.Mythic_Glimmerwing_Hero_pose="c3d73260-0603-4997-a07d-f9fe43943bc9",k.Mythic_Gryphroom_Hero_Pose="70895dfc-0ece-4914-aa42-ba1ad3fceae2",k.Mythic_Gryphtopus_Hero_Pose="52b4c776-810c-4d74-a180-9003acddc911",k.Mythic_Hydroid_Hero_Pose="567de9a3-9c98-4a2f-911c-980528e76609",k.Mythic_Intitalk_Hero_Pose="18ac7050-4625-41d7-aa2d-9549fd069de0",k.Mythic_Llavama_Hero_Pose="01bd195a-d706-430b-b8f6-03e25ca7265a",k.Mythic_Luma_Hero_Pose="6112d42b-f6ab-458c-9a66-6a9c84d9777d",k.Mythic_Luna_Hero_Pose="57922fd9-f372-4777-832a-ff22fc6a5902",k.Mythic_Magmayhem_Hero_Pose="c35706fb-f12d-4596-b602-e374cefbeab4",k.Mythic_Merahawk_Hero_Pose="8b84fd0b-9533-4cd8-ad30-d65b40478c35",k.Mythic_Nine_Tailed_Fox_Hero_Pose="e8f7084a-de99-4a99-b388-84b2c4755f6e",k.Mythic_Polartide_Hero_Pose="43d66525-973a-4094-9d13-f1b094ff8f96",k.Mythic_Pyrodile_Hero_Pose="be78f521-b9b8-4ed4-a996-04fa3d6bd839",k.Mythic_Serasoar_Hero_Pose="5130e997-e2d9-4654-8517-a24ba25d2020",k.Mythic_Shimmerstorm_Hero_Pose="8a68da24-e357-4777-bb9f-7c78711bca9e",k.Mythic_Shiver_And_Scorch_Hero_Pose="01a58c05-f7fd-42df-99ee-97feaa3750c8",k.Mythic_Solar_Hero_Pose="07f8e16d-dfbf-442e-acaf-71268c370f58",k.Mythic_Splash_And_Spark_Hero_Pose="05575a36-5e6d-4133-86f6-e934e612ac2c",k.Mythic_Thunderclaw_Hero_Pose="19c921b2-a615-4d05-980e-7d9eb847f787",k.Mythic_Tidus_Hero_Pose="51cac9a4-c1eb-4a91-9325-be98321d382a",k.Mythic_Vegabloom_Hero_Pose="69f5c30c-d1f6-4556-a1c7-89a1fa93a9aa",k.Mythic_Verdama_Hero_Pose="bb9fd3a9-b9e1-4303-b310-f0b9c1a55be0",k.Mythic_tab_bg="af2481a9-617b-4df5-a7cc-c8e818e064c2",k.MythicalEpic_WW_Aquadile="43c28104-403e-4b93-a565-dac539815667",k.MythicalEpic_WW_Arcturion="4257bcef-de30-4258-8557-2c3d552eb9f0",k.MythicalEpic_WW_Barkbarian="6aeb941c-f9e1-455f-a358-372f7e1a205c",k.MythicalEpic_WW_Blast_Star="2161440a-1a68-4df3-907e-dd2d66753f29",k.MythicalEpic_WW_BluefuryMagmayhem="83640d16-f8d6-4f5c-b41a-5177b5839221",k.MythicalEpic_WW_Buzzra="df713468-6c5f-4b13-a733-b8160f4e377f",k.MythicalEpic_WW_ChillnChar="1ca6bbac-2120-4a7f-9254-83f7f2b52af4",k.MythicalEpic_WW_Glimmerwing="1205771f-76b1-4e85-8aa6-d167b9fcb61a",k.MythicalEpic_WW_Gryphtopus="c29f3680-9580-4a9a-984f-7c50aa672ad3",k.MythicalEpic_WW_Hydroid="81a44379-9ac2-42b7-ab01-2acb73c2f297",k.MythicalEpic_WW_Lumanight="22116dd5-d3a3-4bd3-8f06-c5da9957a634",k.MythicalEpic_WW_Luna="66690b5e-08fe-439e-a955-b675ba48548c",k.MythicalEpic_WW_Magmayhem="69e7b184-cd7d-4af3-a803-677dfe279ba1",k.MythicalEpic_WW_Nebula="34a025e5-80e0-49c8-a8eb-d7f4c2443424",k.MythicalEpic_WW_Pyrodile="ad3d00d2-af5b-4bb9-aad4-9eccea17fc58",k.MythicalEpic_WW_Shimmerstorm="eccd283d-9829-4142-8096-5e6e587c1309",k.MythicalEpic_WW_SnowyRiptide="1fe4b8db-9d30-47c3-a308-e3cb6fd5b882",k.MythicalEpic_WW_Solar="a763d26e-f1b8-4123-9422-66d304ae7ea1",k.MythicalEpic_WW_SplashSpark="23f8582b-879e-421a-bd39-447978dd4243",k.MythicalEpic_WW_Tidus="185d4b16-0fe4-44cf-a906-d494c15a2f05",k.MythicalEpic_WW_Vegabloom="2e80ce74-2893-452a-a4f6-e8665a5c6687",k.New_member_tooltip="99e45e46-4388-4829-97e5-c557a728d9bd",k.Nicknamer_pedestal="e2b8bbae-f585-4b59-aa89-549b9c2c82ef",k.Noot_prompt="65a1e456-b9ee-46ea-969b-8846a5952359",k.November_2023_teachers_gift="3df6a108-c4b7-48c9-bdd8-c85bc1ee250a",k.November_2024_teacher_gift="02f544b2-70e8-4d30-b374-d01499d0fc26",k.November_2025_teacher_gift="1b5ccced-4a8c-47f1-807e-e0cc9fcb9eea",k.October_2024_teacher_gift="6d4dd436-b605-4e10-a47d-1a8ed25ac142",k.October_2025_teacher_gift="67ef29bb-0ed5-4148-bc68-7181781ebd02",k.October_2025_tt_home_screen_background="c57e8901-7703-42af-9b5a-636d83de53ce",k.October_tt_home_screen_background="20fe6e9f-7184-4560-8eaf-92580a5fa41a",k.One_million_question_reward="7db9c933-d74f-4c33-95fc-53ff443564bc",k.Otp_background_tiling_pattern="2b0f34e4-af12-48ab-923e-ea4f8b1d1aa1",k.Page="c355f557-d0fe-43d2-bcbb-191e47cc2dc1",k.Panel_star_small="db35c76f-546e-4f79-a31f-779c458811d5",k.Paper_section="d7076e68-3f9c-42cb-a997-94740a3fb268",k.Parallax_tier1_back_small="ce253584-d2eb-42e4-8d17-16a8bd9275a7",k.Parallax_tier1_front_small="b1e29a81-834d-4697-9df0-222e574c9d4d",k.Parallax_tier2_back_small="316fa102-aed2-4889-9c94-96627c9d155e",k.Parallax_tier2_front_small="c6ec31f6-57a0-40d6-b15c-123e413071b8",k.Parallax_tier3_back_small="20e7a3ed-224d-4314-ab1d-83f7a4a020c7",k.Parallax_tier3_front_small="309d7511-5399-4507-a40d-aff668bf187e",k.Parent_account_signup="5af11e88-29aa-4cba-aad9-aaa3e3dfc794",k.Parent_attach_video_image="e9ea9155-a841-4c20-b9f7-a983f3414491",k.Parent_image="de6541d6-e770-443d-a351-9be8b41210ba",k.Parent_panel="86748226-3d3c-40f8-a867-e0208ecf7b6a",k.Parent_rewards="0a77af6f-413d-46e7-9f2b-771b3647c6ec",k.Parent_rewards_1="e6a054b1-7c54-4be2-8f28-0271f6da209d",k.Parent_rewards_2="4ca8bd98-ac6a-4ae0-bfb7-5382208b9c25",k.Parent_rewards_sparkle_pup="d947477b-3d58-48e8-a3fa-d21592776c01",k.Particle_astral_ball_1="e7ceb024-bb47-48f0-a5f4-2ee343898a73",k.Particle_astral_ball_2="32324fc0-0b71-4673-8ba5-f6522fda7932",k.Particle_astral_dust_blue="00be5a73-4d6b-4b06-a238-bcd1ad98ff58",k.Particle_astral_dust_blue_soft="52c61443-0b5d-4300-885b-846efe4909f1",k.Particle_astral_dust_star="dd1ddceb-1072-4b4d-b137-2bc922d01ed4",k.Particle_astral_dust_yellow="8ffcb05f-8597-457b-8ff8-fbdcce474442",k.Particle_astral_dust_yellow_soft="f92674f4-d0a3-4df2-8422-a17e0d4611b8",k.Particle_astral_glyph="822eef05-a960-41b6-81b8-46f5cabfab2e",k.Particle_astral_petals="a1d69150-eec8-4d3c-8c70-2a416340b739",k.Particle_astral_sparkle_blue="32ee4d09-3aff-493c-8d82-006bee5c6c00",k.Particle_astral_sparkle_yellow="19f18918-d3fa-4d40-b26d-346a38b21609",k.Particle_astral_star_large_yellow="32c9b107-08d1-48eb-be05-7d6da3676bf1",k.Particle_astral_star_small_blue="809339f2-2d66-49d5-8b07-138b8a302455",k.Particle_astral_star_small_pink="e46f5915-acdd-4c6c-a6d3-06e6216786fc",k.Particle_astral_star_small_yellow="9dd15a97-e337-4272-b5d9-9e6638f5988c",k.Particle_astral_wave="126d2f4a-055a-462a-b0c1-77d3b6bfae93",k.Particle_basic_1="8b98758e-f41d-4f3f-92a9-d3b4f641e94c",k.Particle_bubble_shipwreck="02983da0-2672-4043-983b-0d6550810229",k.Particle_circle_icon_glow="01a64028-4a08-4f3b-8710-cd68af2d3ad2",k.Particle_confetti1="4a5cf85e-9065-441d-b600-89448b1437f5",k.Particle_confetti2="6deed511-8f75-42d1-930d-6abc5d799575",k.Particle_confetti3="0bb60ba7-7fa1-452b-aa30-db0ae78b9573",k.Particle_confetti4="a122e368-e4b3-4389-b26b-3ed3ce1582a5",k.Particle_confetti5="c0000d36-1328-4321-9858-d620aca97753",k.Particle_confetti6="54ef243a-624b-490e-bb3a-ec591d067f30",k.Particle_confetti7="1dbc4d29-1301-4bf7-9470-bd0fd6f68925",k.Particle_confetti8="006cf741-4712-4bbb-9fbb-0ca79ba5b309",k.Particle_confetti9="e12a01af-1699-4ed8-b778-b5162a873bfd",k.Particle_fire_dust="76538aca-620a-4480-b169-63c31a2b5ffa",k.Particle_fire_fireball="3d925935-5e5f-4ff3-ad8f-9d2cae086c62",k.Particle_fire_flame_1="166e6c0a-553d-4e28-998c-d7ebc7982b3e",k.Particle_fire_flame_2="36482bb5-10e3-491c-9731-a169e5e777d0",k.Particle_fire_flame_burst="0e26e98d-8fb3-49df-ae87-beef2c0aad3f",k.Particle_fire_lava_ball="95ba21fb-e6d7-4a46-b92e-2e7be62848f8",k.Particle_fire_red_ball_soft="62db4975-f0f6-4970-ae62-b8edad9e93c4",k.Particle_firefly_expert_magenta="da7a3673-b9e2-4a2b-8c46-9eb323ad94fd",k.Particle_firefly_hard_blue="7b8fa28c-ae42-4437-9d49-d2ee99563e91",k.Particle_ice_shard_1="5ad16175-74c3-40ce-9a5c-6e4730fc0e83",k.Particle_ice_shard_2="62f90932-6ea4-4923-bbae-b8b55bba9d41",k.Particle_ice_shard_3="bd71f620-31b8-4093-8900-a46c1af72cde",k.Particle_ice_shard_4="aa0a2cd3-78c7-45b3-9c57-8fec7b36647c",k.Particle_ice_shard_5="1fbd2f2e-76b4-442e-870c-c95614b3e9a1",k.Particle_ice_shard_6="98d63c06-0142-4439-9cdc-8305b6c673f7",k.Particle_ice_shard_7="ac32311a-2a97-4b2f-a646-36971cc5733e",k.Particle_ice_snow_flake="82d050c7-f1ea-43af-b27f-5dd5f867bfb4",k.Particle_orb_pale="255174d7-67fb-473e-8691-fbea7f3a586c",k.Particle_petstore_1="b2f422f3-c00a-48b1-b6ad-f8fa6385fe80",k.Particle_petstore_2="3a576d53-d95d-4a12-beb6-950201120052",k.Particle_petstore_orb_1="f24ca185-eda1-4a1c-b5dd-21a0376e51c5",k.Particle_physical_ball_1="e036d562-6605-479e-bfd7-42a72f53e6eb",k.Particle_physical_burst_1="372c863f-b1ab-4be8-88b6-635e3759b783",k.Particle_physical_burst_2="4389c6d3-8621-44ce-8674-1d686afde153",k.Particle_physical_dust="80049b7d-55c1-400f-ad34-6a24df7e522a",k.Particle_physical_spear_1="5f6e4a7e-2d22-4f7e-b510-7844b7b02055",k.Particle_physical_spear_2="c17b93a2-beb6-4e5d-a103-335fccc4a5de",k.Particle_physical_star_yellow="97b056ca-21de-4924-9ee9-e0e839194d9e",k.Particle_plant_dust="aaaea424-aee1-43c3-977d-865f6893e293",k.Particle_plant_leaf_1="6e33d7b9-ac04-4668-a8ab-a61c61919a9b",k.Particle_plant_leaf_2="8eff52cf-a098-4005-b8fa-5f5a4127f244",k.Particle_plant_leaf_3="95bc75da-809c-4902-b1ae-536d9eba77bd",k.Particle_plant_leaf_4="51683980-a483-4123-a1a1-840f4eedaa43",k.Particle_plant_venom="e4eed321-8f28-4f91-9cb5-5d1b27223f03",k.Particle_plant_wave_1="8b4f567d-d641-4d00-8e92-6add1911b606";k.Particle_shadow_ball_1="16f0d3c3-725a-4a35-8e6d-902f5341e2f3",k.Particle_shadow_ball_2="4d408085-bd8a-4ee9-84a1-0c4c24daff62",k.Particle_shadow_ball_soft="61bfbd86-339d-4e3c-8721-2dae436b9073",k.Particle_shadow_dust_dark="23b7ce78-ad78-4a94-90f9-3f0f856cb5a2",k.Particle_shadow_dust_purple="e094999f-361a-4822-9697-13930ed491eb",k.Particle_shadow_fire_ball="f5bc36d7-2211-465e-996f-78670d1d9b02",k.Particle_shadow_portal="71db7306-a3ee-47e0-a9b7-9cc613e9f12e",k.Particle_shadow_ring="fcf63589-ff24-49d2-97ac-a4ab57718cfc",k.Particle_sparkle_white="161cb905-922b-4431-93e0-996c795d9ce4",k.Particle_storm_ball_1="9fac7f4a-a233-4f3c-8163-3f73c65b9ca7",k.Particle_storm_bolt_1="947c2857-bab1-4822-a3e6-187a214b1d9a",k.Particle_storm_bolt_2="a3b1a537-28b6-4221-a3e6-1b55a5247e4d",k.Particle_storm_bolt_3="dac88ca7-8cfc-474d-ae78-dcae37ea40e3",k.Particle_storm_bolt_4="daaa617d-d8ec-4d72-b8c7-8930619865c1",k.Particle_storm_dust="79f0588d-3840-4b6b-9495-5fc7200c0755",k.Particle_storm_lightning_circle="52870001-4b11-42b5-b7eb-87c0e0ff9e8e",k.Particle_storm_lightning_circle_2="a86bea4c-f778-4c73-87b4-5f18bc1d3b9f",k.Particle_storm_wave_1="8503f5d4-d40a-48a0-a4e4-0cd83afceb53",k.Particle_water_ball_1="d89f6c2b-35be-4ce0-b536-17fbde9aaaab",k.Particle_water_ball_2="8bc4e1eb-ddde-4678-8b54-c43d903315a7",k.Particle_water_dust="fcd29adc-d7c4-40b6-94f8-09df22bec3a1",k.Pet_Lore_Charfoal_banner="605f945e-5b9b-40fc-82c1-948094259914",k.Pet_Lore_Mermina_banner="df7f2040-53ea-4326-9157-5dbbc8bd098c",k.Pet_Lore_Snowfluff_banner="2c6b4623-7671-4ef2-9e8c-b215a8b00339",k.Pet_Lore_Sproot_banner="73fac858-ac00-4c0b-b180-211e4e1ba34a",k.Pet_Lore_Wott_banner="54f674f6-cfc1-470f-a00d-4998d559f746",k.Pet_Merge_FTUE_New_Menu_slide1="d24a9a06-9e07-4197-a11a-071f19ee7b00",k.Pet_Merge_FTUE_New_Menu_slide2="ebd57b51-079a-4dce-8754-56866960bd8b",k.Pet_Merge_FTUE_New_Menu_slide2merge2="0ffc0fb5-7e9b-4dfc-9557-83573ca5399b",k.Pet_Merge_FTUE_New_Menu_slide3="78a41e9f-1177-4bd5-8e30-943bc55f4a7e",k.Pet_Merge_FTUE_New_Menu_slide4="dd0e75d5-0b7d-4320-8e9c-33087d8b08d1",k.Pet_Merge_FTUE_New_Menu_slide5="38b51a6e-aec5-4201-9d4d-1101259a9600",k.Pet_Merge_FTUE_New_Menu_slide5merge2="9bf515da-7b5b-46bb-8772-2e231e9769cf",k.Pet_adventures_trailer="d419aa99-b7ba-4337-8186-2ef14b6280a4",k.Pet_difficulty_indicator="6272d06b-907a-4d58-80fc-30e28e0ef441",k.Pet_menu_team_bg="a9ad0d82-6913-4429-ac1e-b9a45f5bb969",k.Play_button_64px="cc6eb105-68bb-4d4f-82c2-807d58005ed9",k.Plus_member_modal_full="d32f78cd-1f58-48eb-988b-330ff490780a",k.Plus_white="82ca61d7-0804-4edf-927e-e42ba2edb078",k.Pm_post_battle_1="244143b9-d182-4073-91bf-fda516720a60",k.Pm_post_battle_2="454af535-0e05-4853-af40-979b1754c4a2",k.Pm_post_battle_3="ab48346b-77c0-4883-a0c5-cad8c3a8ba88",k.Podium_decorated="2d96e9b1-4147-4451-8bc1-847f756ab6ff",k.Podium_plain="51184526-ed50-4c34-ac7e-89e008581eca",k.Popup_play_at_home_reminder="3adcebde-1dcd-437d-b74c-cb99adc587dd",k.Postbattle_highlight_chest="90efc070-cc41-44e8-8962-2ac9c87e9d1d",k.Postbattle_magicoin_member_title="6a48b7d6-6de4-48e5-8bf0-c27db052f87b",k.Prodigy_logo="001660e3-bbb8-48e4-9a75-fe0ddd138bd8",k.Promo_memberbox_may="cb453abf-7f31-41d9-bf12-b8765ea1274e",k.Prompts_catchmorepets="546b627e-071f-4add-857a-0d36e7ec769e",k.Prompts_catchmorepets_0="9395d630-8822-4dd4-ac95-11f659607cf9",k.Prompts_catchmorepets_list_0="f08fc684-9378-48be-9174-b77aa23483ca",k.Prompts_chest="b8c73e89-97c9-4c5c-87ef-7b1e9b9f4ad9",k.Prompts_chest_0="7eafde13-b75f-49ed-b79b-f6cf37121c8f",k.Prompts_evolvepets="aaf0f2f8-458e-479e-ad37-ff6e94c29072",k.Prompts_evolvepets_0="d06296c7-36d0-4780-97f8-24c9eef630bc",k.Prompts_evolvepets_list_0="7fb9039c-0480-440b-af4d-c862e2004121",k.Prompts_generic_1="53939fa2-3ef5-4e45-b1e5-b08a0b4b382c",k.Prompts_generic_1_0="0acb4b4f-d8c3-4b56-ac7e-b8684685a07e",k.Prompts_member_gear="8abf4af3-aab3-40e3-97c9-48cbe54b8885",k.Prompts_member_gear_0="eb64ac2a-867c-4952-91b9-207c77c7a498",k.Prompts_memberjar="b6c4647d-b11e-4cd1-b0df-de738fdb961a",k.Prompts_petgear="fd2ff5a6-98bd-47e2-9048-11d50647488c",k.Prompts_petslot_churn="dab27a1d-5c66-48ce-a699-cb0bb0a27f37",k.Prompts_petslot_newmember="63b931ab-459f-47ea-b2f1-0bdfcf98fe7f",k.Prompts_starjar="7b65adea-8ba1-4f34-9344-a15f1618bc0f",k.Prompts_starjar_0="ac4cc8ae-f0ec-4f71-8e58-6c87a63b5c8a",k.Prompts_valentines="d2d7b68d-cf2c-443a-83eb-f29b2e0b8ff4",k.Pumpkin_coop_story_0="a14d0f45-f279-428d-93c0-f05066556ba8",k.Pumpkin_coop_story_1="b73a40d0-4158-452d-89d4-a9defa27e16a",k.Pumpkin_coop_story_2="5fc4189f-f407-4b67-9ebe-21f00299f27d",k.Pumpkin_coop_story_3="56b84f54-4784-4bd2-bbea-0ed382fc1f24",k.Pumpkin_icon="0b64fbc3-998a-403c-8f2f-9e2d4af52186",k.Pumpkinfest_boss_2023_wizard_watch="1f60bc3a-1c83-41fb-aec1-956347ba1dfb",k.Pumpkinfest_loading_screen="2eba08ba-f9d0-4fea-a9c3-dd29eb2fabe3",k.Pumpkinfest_modal="5ca70fc8-314a-42d8-8bb4-48475bba3883",k.Pumpkinfest_npc_1="09f61562-c720-4062-ba0d-881f5c3883ee",k.Pumpkinfest_npc_2="b0802ba8-4434-48bf-859c-455909cc0b50",k.Pumpkinfest_npc_3="9ed8df8d-5e24-44ef-aa16-3e6f1ea4a2ce",k.Pumpkinfest_splash="2747718f-7086-4ff1-853c-4d85460d84ee",k.Pumpkinfest_statue_boss="cb6bd48f-eb5a-4576-be87-73845ecc76a7",k.Pumpkinfest_wizard_watch="ed93d10a-5639-486b-beb0-4ed34b436a4a",k.Pumpkinfest_ww_rewards2022="2d10017c-9d6c-4c9a-9922-acadd0b5b518",k.Puppet_master_portrait="1c1c883f-86bf-4cd2-86d8-1df2a9d8baed",k.Puppet_master_returns_splash="bda343af-0bd9-4ac2-b8a5-13d14a57536c",k.Puppet_master_splash_modal="01e67204-26eb-42cb-bf5f-8b8039c02223",k.Pvp_seasons_prize_sign="137c9e4a-bd64-4f5b-82be-e0fda675cd41",k.Quests_ArtistsAlley_MayJune="7f5582f8-3849-4081-af1b-2b1807db77e7",k.Quests_FF_December_2024="719e3f20-b02a-4ab3-9e63-1cbe14ca4670",k.Quests_HotCold_AugSept_2024="45375410-e3a6-4b2a-92dc-94f2860256bd",k.Quests_JBBQ_June_2025="5a86096d-fe11-4979-9a06-e8a6def1a65f",k.Quests_Magicoin_October_2024="00f350e8-79b4-4ace-9eda-dd4558130120",k.Quests_MoonlightDance_April_2025="f18b785c-5eda-4680-b556-54405ccf80c6",k.Quests_Pirates_March_2024="17003ff9-19da-4dbb-a717-766d0ccc4eee",k.Quests_SG_February_2025="ac308138-630c-4d31-8c4d-d1d0e5a9b747",k.Quests_SS_October_2025="ad5ff85c-61b8-4ad9-910e-5a59d9ebb1c1",k.Quests_starry_aug_2025="5fdacd87-05e9-42ec-8aca-43b4ba7098eb",k.Replay_unlock_gerald="35a6c6df-2007-44ac-8161-fbf58f71fafb",k.Replaycampaign_loading_screen="e9dd52e4-26c7-4819-8f82-598f230d5a35",k.Restriction_Card_BG_Green="cd571770-dfd1-487d-8444-666850b052b0",k.Restriction_Card_BG_Red="30b9db45-8ea2-48e3-9060-215e534978fe",k.Restriction_banner_BG_academy="ee8a76bb-8edc-46fa-a5a5-e423545602b4",k.Restriction_banner_BG_bonfire="76cc922b-0ff0-436f-ade5-5db13bfa61ed",k.Restriction_banner_BG_firefly="39559ecc-021c-4fd6-baed-0c97ad8c67b2",k.Restriction_banner_BG_puppetmaster="70d7fb05-7b65-452f-828c-f6f24847e1de",k.Restriction_banner_BG_shipwreck="bfec1718-b37b-4c8c-9812-8d99469f9c35",k.Restriction_banner_BG_shiverchill="b0192a39-6675-42e8-b9eb-79f64c44ee2e",k.Restriction_banner_BG_skywatch="cee1b226-0bc3-4e12-9e5c-43d155c4142c",k.Restriction_banner_cebollini="4d9fa613-ccec-46a6-bacb-92660b69c397",k.Restriction_banner_cloaked="a18c7b77-1d0c-4b19-8413-b8718a2a5a2a",k.Restriction_banner_cloakedfire="a2226624-5220-42c7-b1bf-557441744a3b",k.Restriction_banner_cloakedice="51d4f58c-057b-415d-b9c5-9a3fde6a3754",k.Restriction_banner_cloakedplant="1f6e40d3-42be-4c14-b7ff-9381007b0890",k.Restriction_banner_cloakedshadow="1acbba7e-43c0-4ffd-b27b-5e70e3d1fc9f",k.Restriction_banner_cloakedstorm="2632fe2f-b439-45cb-b6d7-693f5f423d30",k.Restriction_banner_cloakedwater="578b8815-fc2b-4c03-b2bf-66c3b5dbb4da",k.Restriction_banner_gerald="d949cf78-987b-494d-b9a0-4e97c588641e",k.Restriction_banner_hardmode="3311cf49-d68a-4c02-99ab-e68ff3997854",k.Restriction_banner_icewyrm="d8446233-78f7-499b-b711-c12f85765fa1",k.Restriction_banner_nastycloud="e0fb6bea-753b-4642-9ade-34f7bf1962f5",k.Restriction_banner_oldone="68396481-b137-440e-b987-20810c24805e",k.Restriction_banner_pippet_endgame="040482a9-ed2b-41da-a3a8-e4ec428227c8",k.Restriction_banner_puppetmaster="a2ccd2a6-f484-4924-a2ec-bf8209b0893c",k.Restriction_banner_puppetmaster_endgame="957eea92-99a6-42c7-9cd4-15c637fc5567",k.Restriction_banner_puppetmaster_illusion_endgame="cb82579b-6f70-4dc5-8af8-b168171e82af",k.Restriction_banner_title_cebollini="8a50dc3c-5507-4345-b0ac-7364d5ee5af7",k.Restriction_banner_title_cloakedwizard="b1c1b8ca-4b4b-487f-844f-691d5d0f6e30",k.Restriction_banner_title_gerald="6457e30a-28c9-402d-9145-e6bf87b5534c",k.Restriction_banner_title_harmode="b58202ba-d988-48be-8954-9af2f7d7cbf4",k.Restriction_banner_title_icewyrm="dbfc58de-2985-4ccf-9281-75a4dbdae43a",k.Restriction_banner_title_nastycloud="af08a882-71a5-4de4-8ed6-2d07b9b126a1",k.Restriction_banner_title_oldone="cfee59f7-dceb-430b-8175-1e7594357640",k.Restriction_banner_title_pippet="ebc4f820-7eec-43bb-81e5-335fcb94ebc9",k.Restriction_banner_title_puppetmaster="f2020e7e-99e7-40f3-96aa-369676aadcb6",k.Restriction_banner_wave_bonfire="cd7890d5-7cd8-4993-a881-09ea8f765afa",k.Restriction_banner_wave_firefly="27df4960-c576-4db8-841e-227d6baa01e5",k.Restriction_banner_wave_hardmode="cadaed92-ef51-427d-812a-32f050696b36",k.Restriction_banner_wave_puppetmaster="86f08038-cd8a-46e8-9336-cab629383ad2",k.Restriction_banner_wave_shipwreck="4eaeef0b-f54b-401e-a4e7-98839cabd40f",k.Restriction_banner_wave_shiverchill="59bde7f6-f279-4689-a081-36be8c7205da",k.Restriction_banner_wave_skywatch="9cada148-898b-4d05-a16b-cf178c4d3881",k.Restriction_free_merge="355e5432-87ef-4208-8cda-f063b6675656",k.Restriction_free_rescue="c254cdcc-540e-498a-ace4-1ffc0ce9632b",k.Restrictions_extreme_background="8662e647-0b64-41f0-a647-7fd0edf1fefc",k.Restrictions_extreme_rewards="2b8297d8-e469-48d5-b1eb-64b2e8a9c047",k.Restrictions_hard_background="a6930f38-193a-4ad8-85e4-3731a0776bc3",k.Restrictions_hard_rewards="98e858b1-c69b-4087-bccd-c93bbf8a3f08",k.Revamp_star_frame="b9f3d4d2-e858-49ed-8e34-2946f8ea7ff5",k.Revamp_wooden_frame_store="2a1a001d-be02-4e2c-b302-76ebbbad3e50",k.RiftRunKey_1="d356ddb2-7802-4be8-9d38-a6f83f62621b",k.RiftRunKey_2="765f1557-dc57-47e3-b53a-360d3383fb69",k.RiftRunKey_3="fa2ac725-959d-427a-b50f-ef5e43f8b9c8",k.Rift_base_active="24d11b9b-954e-4730-b19d-0ed869d6385d",k.Rift_base_active_dragon_large="bb48466b-2312-479d-8a50-42d6c1910fca",k.Rift_base_active_miniboss="a98920db-59fe-4585-a882-753d734ca881",k.Rift_base_active_miniboss_large="bb636f9f-6357-4a48-8076-0596a84bb441",k.Rift_base_done="843e39e5-8793-4aff-8bdb-de50d04302d8",k.Rift_base_done_large="e0224bb5-d043-4bbc-bb70-76fe4c1dfd31",k.Rift_base_locked="c2bdd83a-ce9b-40bb-a5a2-67f06c19993b",k.Rift_base_locked_large="8d51988b-bdc3-45b8-8198-d0279cad28cd",k.Rift_base_prize="771150a0-80cd-417d-b879-a64b6e76903f",k.Rift_cycles_fr_1="1ba81c1b-6cad-4e07-97f5-2c2b3e6c97a4",k.Rift_cycles_fr_2="0c7529b8-2c95-4e90-adb4-2accfff2fbde",k.Rift_cycles_fr_3="cc55c76e-2d0a-4055-921b-441526238f84",k.Rift_golden_cycles_fr_1="37a77ac6-2afa-4ac9-8aa4-6e24e24a65ca",k.Rift_isle_base_large="0c9fd0f1-c48b-4b75-a569-bbe4d53493f6",k.Rift_isle_base_medium="54c616ea-1bb5-4b6f-b502-8fe443459d59",k.Rift_isle_base_small="5942823c-6a8c-4886-a096-c8e9e300d803",k.Rift_isle_top_large="abef3841-3b3c-405c-ac34-50fa0c6583b8",k.Rift_isle_top_medium="432cd616-0e54-4bf8-8a05-423d03499a2a",k.Rift_isle_top_small="3372bbb5-6beb-49de-a8c4-1095ca8ff902",k.Rifts_currency_astral="8b1bf7b7-2602-49b1-9935-ed2d86275530",k.Rifts_currency_astral_store="bf6143bf-5203-486e-aef2-4c60b50d7289",k.Rifts_currency_default="f5440d65-689b-4102-b532-105e5f5814f7",k.Rifts_currency_default_store="7d7892a7-1fa3-48ab-93f1-83094331a2cf",k.Rifts_currency_fire="a723b6ee-ac02-4f60-8453-a35a96735d4d",k.Rifts_currency_fire_store="d52bd2ac-b414-4d03-8894-9f51bd1ae087",k.Rifts_currency_gold="75ae6dd2-755d-4fd3-8d01-3bf8f1d42b4d",k.Rifts_currency_gold_store="168022d6-85ac-4831-9178-0e0f37569c88",k.Rifts_currency_ice="de1d1d90-1822-42c4-b4b2-2ff2567c7374",k.Rifts_currency_ice_store="0db027e7-3220-4fe6-8934-92f0e9ef3e9f",k.Rifts_currency_physical="3e40c032-3d78-40d6-91e5-8ce700420a80",k.Rifts_currency_physical_store="c4868c4e-3c60-41e2-b084-211a61a50770",k.Rifts_currency_plant="d148a810-b062-4f43-a084-37e0f825f0d9",k.Rifts_currency_plant_store="a705abc2-4d0d-41d4-9009-1e5d7e195cc1",k.Rifts_currency_shadow="8969e2f7-d310-4d7d-897e-f5e5c787b474",k.Rifts_currency_shadow_store="71cef4e0-012b-4322-953d-91080d340dc4",k.Rifts_currency_storm="167a71d6-e8e2-4d38-86dd-c52c278e7b40",k.Rifts_currency_storm_store="d72ca282-6d18-473c-bef9-68dfcdb9e432",k.Rifts_currency_water="e9ab45e1-5ff4-433d-9c48-9e092fb12519",k.Rifts_currency_water_store="3dc963b7-7531-4b20-b951-f8e0415c1c5d",k.Ruby_large_active="cc8ce92d-74c1-4675-94c2-dfd20584fb4e",k.Ruby_large_default="8127f8a0-201a-4b2b-8aa7-344aaee79996",k.Ruby_large_hover="0db96a33-3dd2-430a-a0bb-948b00ebfc7b",k.Sand_shortcut="5e51ca47-9e7a-4a52-a9b7-c208a70e410f",k.Sapphire_large_active="84357009-fb16-4001-ade7-0e956a7081fd",k.Sapphire_large_default="a398b0e0-4e41-412a-89c8-b1c2f376d1bf",k.Sapphire_large_hover="39648aa3-ee1f-4223-8b58-dd9918434e53",k.Scene_intro_bg1="06a4af0a-8dd7-4aa1-8780-daf7f7493be5",k.Scene_intro_bg2="a696e107-30b5-4d21-98cc-0583c6f28991",k.Scene_intro_bg3="3d8fbe36-511e-447e-995b-a71593d88d36",k.Scrollbar_thumb="b1e8b0a2-3df8-474f-a6e0-df70bfe58e53",k.Scrollbar_track="37d989bf-ccf4-46ad-bdfd-f5f3e226267c",k.September_2024_teacher_gift="35f67264-a0a3-470d-94f2-e5f454afe3d6",k.September_2025_teacher_gift="0928749f-59d6-43f5-92f2-9b4efb326bde",k.Shards_promo="1dca823c-f657-4ce5-988c-b456506d9bef",k.Sheets_dorm_17="91f2a7fa-6c42-4dae-ace1-8c9e8b144370",k.Shipwreck_1="488d78c7-7b2e-49b2-b4c7-ea0afb16749f",k.Shipwreck_2="9210c638-aec9-4890-bff1-bbe61168f3c2",k.Shipwreck_3="9e8a8ea0-5815-4b96-a909-3a2074b71350",k.Shipwreck_intro_v2_1="22da049e-0da7-4bf4-97d6-1ad4c5208087",k.Shipwreck_intro_v2_2="d37433f9-6fb0-48ea-a209-936c31bd55bf",k.Shipwreck_intro_v2_3="93a14828-ad61-46ec-9a28-26367ff9c205",k.Shiverchill_intro_1="5faec87b-7bbd-43bd-a373-b360cd097785",k.Shiverchill_intro_2="ae423479-e853-4f16-9c60-8c7aff258de9",k.Shiverchill_intro_3="89245504-555f-4c55-9c78-06d582f84b2b",k.Shiverchill_intro_v2_1="c328d909-cf1a-483b-bc44-ee084089ce3b",k.Shiverchill_intro_v2_2="32c7e585-4311-4ba7-882d-f0bfbbf02bb3",k.Shiverchill_intro_v2_3="9aac98a2-7754-4910-b9b4-010bbf395141",k.Shooting_star_blue="c0f7027b-1940-4231-a048-019c3ba044ef",k.Shooting_star_yellow="ccd30491-defd-4f5e-983b-429d2648b367",k.Showcase_box_sliced="4a97a9c1-2c19-4ddb-b247-3afcf1b2eee5",k.Skywatch_intro_1="f3bc2be9-26c1-4ce1-9159-b0d6e2f376b0",k.Skywatch_intro_2="c27e7094-9ad8-4007-8746-9ab52170cf6b",k.Skywatch_intro_3="44a8ba6f-a25f-475c-881f-8da9a4299e82",k.Skywatch_intro_v2_1="2d7b9acc-93e2-4d39-a933-b7e63d5adfde",k.Skywatch_intro_v2_2="5a37f448-7337-4261-bcc2-0360b765f6f9",k.Skywatch_intro_v2_3="0c773c9d-99fd-4fff-8c48-110fe158f896",k.Sleeping_floatlings_pop_up="a961cb24-d71b-4205-9435-f44adafcee01",k.Slice_big_notification="c3578718-0a82-48d3-845b-9b867d01fb6f",k.Slice_hud_bar_backing="ca727288-6294-47ac-ac21-d7425fa7191b",k.Slice_hud_bar_fill="0d336ef0-05d2-442b-9494-efe154771428",k.Slice_hud_label="b55739a0-de09-48e7-8252-f974d813659f",k.Slice_hud_label_hotbar="a68d0849-69d1-4663-8a28-59f48fea1142",k.Slice_input_big="b65d16b6-0cc4-421e-bd10-48385cdedf24",k.Slice_input_big_hud="e6c41608-7853-4baa-b844-d9452076072e",k.Slice_input_small="6514a0df-f16e-46cc-894f-6e234a74b15d",k.Slice_rifts_bg="d2a62bec-9590-46a2-9349-c5e7f3437a1c",k.Slice_rifts_bg_highlight="74d76c99-e9e0-408a-87e9-a204550e1d7c",k.Small_pet_124="928d7267-09b6-4efb-aaa9-96b99a441788",k.Small_pet_65="18493c98-6d7d-4690-a5ab-b8544c2780d9",k.Small_pet_68="c36c8132-f0a5-47a7-bf5e-1baf4d986f67",k.Small_pet_71="f53924a2-6d63-46e0-b1b1-1b22a62b7b35",k.Small_pet_74="5ddc18c7-b747-4ceb-8e50-ce85729646d7",k.Smart_block="17ce5182-90be-41f1-8f04-7476f9e83cc3",k.Snowball_pile="914e3890-92a0-45f1-9918-713d7cb317fa",k.Snowflake_1="d9a53df9-5a2f-4546-9268-8230b9c56200",k.Sparkle="c108638e-c0db-414f-859f-bc33c6a4dbca",k.Sparkles_set_hud_membership="345a7dfc-8739-485c-897f-5dd5c8a41154",k.Spell_3_0_wizard_watch="da87732a-ed78-46a6-a0db-ee1007e2cb6e",k.Spell_astral_starbitblast_aoe="981c22df-b12d-45fd-a344-4114cba18b77",k.Spell_astral_starbitblast_aoe_cooldown="8245fc9d-a7c4-40ca-b96d-32950f67d423",k.Spell_astral_starbitblast_giant="6d2505f0-c2d2-4f83-a620-cfca49e5ad93",k.Spell_astral_starbitblast_giant_cooldown="707dc677-38bd-4410-aeef-1fc5b0bfeea1",k.Spell_astral_starbitblast_multi="7df980be-4601-41a7-b961-2daa0636265e",k.Spell_astral_starbitblast_multi_cooldown="820f37e9-fb24-46ba-b6b6-8f3d5776f888",k.Spell_astral_starbitblast_multi_random="223daa84-819b-4052-9974-11ab81678bcc",k.Spell_astral_starbitblast_multi_random_cooldown="78caa901-cdde-448f-b25d-3451914b2c31",k.Spell_astral_starbitblast_multiaoe="43ef43c9-c397-40c3-b1ed-a0a800b0b377",k.Spell_astral_starbitblast_multiaoe_cooldown="60be6888-62d1-435a-8264-39b2a00028dd",k.Spell_astral_starbitblast_random="0e7a543a-8f90-4468-9855-cdd724c8e3ba",k.Spell_astral_starbitblast_random_cooldown="49b90ed2-e9ce-42e0-8c7b-4c319cb201c9",k.Spell_astral_starbitblast_single="4eb536e7-1d76-4e7b-89cb-fbab9982e26d",k.Spell_astral_starbitblast_single_cooldown="9100be81-4435-4033-86b1-34a9cfdbfd55",k.Spell_fire_fireball_aoe="ecfc01f9-8ae4-4d4c-95bc-988e9b413187",k.Spell_fire_fireball_aoe_cooldown="7e52eba4-ade3-48b5-93f2-dc50d836c4f9",k.Spell_fire_fireball_giant="2ac08f56-cbd6-427b-88db-f260a4b5eabb",k.Spell_fire_fireball_giant_cooldown="1b451077-4e38-4b20-949e-8716abdfd8a9",k.Spell_fire_fireball_multi="6f116fa7-e9a4-46e5-84b8-91d5ac6c82f5",k.Spell_fire_fireball_multi_cooldown="95ee1862-933b-4705-8b48-13f28cf2afaf",k.Spell_fire_fireball_multi_random="503e2144-b0e6-4b44-bd66-fa24edbdb5fe",k.Spell_fire_fireball_multi_random_cooldown="07b8b893-1f3e-4901-ab95-f973c9fb95f6",k.Spell_fire_fireball_multiaoe="f7bdaaaa-b529-471e-9680-5071dfcf69e8",k.Spell_fire_fireball_multiaoe_cooldown="9c058587-7121-4593-866c-83d44dca6cab",k.Spell_fire_fireball_random="779558ce-d4d4-46a2-bb99-e32ab7647ada",k.Spell_fire_fireball_random_cooldown="071d4ec8-853a-4290-acb0-3f8e3111565a",k.Spell_fire_fireball_single="dba93de1-f0b1-412a-9ed2-e41433721b14",k.Spell_fire_fireball_single_cooldown="eebb87c0-dca6-41ad-a789-4b80760d86f0",k.Spell_fire_volcannon_aoe="b82b8567-2463-426d-97f4-6865363250df",k.Spell_fire_volcannon_aoe_cooldown="88644385-8a8d-461d-b660-2ab327aae95c",k.Spell_fire_volcannon_random="9f6635ba-2923-4702-bdbb-b676c5096018",k.Spell_fire_volcannon_random_cooldown="aebdcdd2-9913-43cf-896f-983965f1b157",k.Spell_fire_volcannon_single="8117fe9b-3c3d-484c-8b4e-ea5b1e74d44d",k.Spell_fire_volcannon_single_cooldown="7666e913-0bcd-4363-b77d-b28a9cdd7624",k.Spell_ice_chillout_aoe="ee696e58-492b-4c0c-8404-2a48f9c4a707",k.Spell_ice_chillout_aoe_cooldown="79857cd6-0fa3-4a23-947f-4d58b35b9d7d",k.Spell_ice_chillout_random="b8cb8d4a-1b6a-4df4-a999-3a78765a43a3",k.Spell_ice_chillout_random_cooldown="229b8e1d-6ddd-4535-8f49-c404692bb144",k.Spell_ice_chillout_single="5fce9f8f-3bd1-45a5-8712-0ea42781d7c0",k.Spell_ice_chillout_single_cooldown="e6e8e769-865a-4710-9e3d-065cb2de7ca5",k.Spell_ice_icicleshard_aoe="cf3699bd-d9f5-4fef-b8d2-f39bfd189e5d",k.Spell_ice_icicleshard_aoe_cooldown="8c9e9fef-8817-4353-9ec8-7f09331a63cd",k.Spell_ice_icicleshard_giant="35a5f236-23d7-45af-9311-03511b652049",k.Spell_ice_icicleshard_giant_cooldown="c6777865-efca-41c3-a9fe-0a582f263c27",k.Spell_ice_icicleshard_multi="c02ca92c-9539-44d8-ba32-959d33718cd4",k.Spell_ice_icicleshard_multi_cooldown="35a9215f-fade-433a-a6d2-a65bf40dc156",k.Spell_ice_icicleshard_multi_random="9c5c06d2-decb-4454-8388-f478c904adf8",k.Spell_ice_icicleshard_multi_random_cooldown="4e37fdf7-3ae8-40aa-ac55-c4ec74a881a8",k.Spell_ice_icicleshard_multiaoe="c55fa393-6e00-4d55-ba76-c95897dff077",k.Spell_ice_icicleshard_multiaoe_cooldown="9c8cf0c6-79bc-455a-ad38-bc7c385c8f95",k.Spell_ice_icicleshard_random="89c3fbd0-ef9c-4b23-959d-5974f6186b9b",k.Spell_ice_icicleshard_random_cooldown="00fca5a9-3e51-4862-a08b-1bd7aee82392",k.Spell_ice_icicleshard_single="86a0c3e6-5a88-4dae-af37-2267f6f28367",k.Spell_ice_icicleshard_single_cooldown="1aafdaf6-8ccc-4837-b48c-05ad0f25812a",k.Spell_ice_snowlingball_aoe="7779e3ea-d12a-4119-be0b-7eb5a002d6ba",k.Spell_ice_snowlingball_aoe_cooldown="119fc80e-3046-4421-b435-7a502febfbb9",k.Spell_ice_snowlingball_giant="3f15be4f-00c8-4f24-87b2-d15084842bf3",k.Spell_ice_snowlingball_giant_cooldown="f04dbe03-1d45-4d00-9017-7853194bc358",k.Spell_ice_snowlingball_multi="569a6b59-eb30-4199-aa9f-531fdd8b6698",k.Spell_ice_snowlingball_multi_cooldown="780254ee-ef6d-4820-807c-727865440b93",k.Spell_ice_snowlingball_multi_random="8cb1ab37-63a3-4a78-8187-f4f7d2c2f5ee",k.Spell_ice_snowlingball_multi_random_cooldown="ddccfd93-655c-4a81-95df-f889e03497ff",k.Spell_ice_snowlingball_multiaoe="52d1b8fc-04de-4038-b477-1045944c5372",k.Spell_ice_snowlingball_multiaoe_cooldown="6e5950cc-92d7-43f6-b5bb-7fe5d0c3c30d",k.Spell_ice_snowlingball_random="2859ad3e-e607-4cb8-af07-411b27087398",k.Spell_ice_snowlingball_random_cooldown="b58e189e-0a30-40a4-8baa-88543e10651c",k.Spell_ice_snowlingball_single="28f75698-ed30-4121-9b77-84cf31ff2ff0",k.Spell_ice_snowlingball_single_cooldown="02950102-7a4a-498e-b9a9-fb582873fcf9",k.Spell_neutral_aoa_aoe="375abf63-0f3f-43a6-b636-9b467e182cdd",k.Spell_neutral_aoa_aoe_cooldown="e824ebfa-6690-4511-a838-04c84700016b",k.Spell_neutral_heal_aoe="3cb09195-f903-4c39-b208-5171ae0b634f",k.Spell_neutral_heal_aoe_cooldown="35f87455-c4c2-4123-8d2d-eed8a8fd758e",k.Spell_neutral_heal_self="705dd5f8-5e05-4d3e-9fe0-425620ab6e92",k.Spell_neutral_heal_self_cooldown="a4efcfb8-5a4a-4e84-9144-a00a65f957d8",k.Spell_neutral_heal_single="31cbc0d9-6a5f-41dc-894d-3391a894f153",k.Spell_neutral_heal_single_cooldown="ea805326-39a2-4272-967a-25efb7142baa",k.Spell_neutral_heal_single_random="0db31ffe-7ed2-4900-b8e4-ad1d00650fe1",k.Spell_neutral_heal_single_random_cooldown="3915e1da-8cde-46e5-8432-94293ec7377e",k.Spell_physical_blunt_aoe="5aa3c789-4c3c-4eb9-840e-fa6e4b9795a1",k.Spell_physical_blunt_aoe_cooldown="194d94c5-ee26-466a-ad0a-a471c608c51c",k.Spell_physical_blunt_giant="83dae56c-b690-47b4-8ab6-37fe27a34b33",k.Spell_physical_blunt_giant_cooldown="987c26f7-243c-461a-9453-e48164ac7484",k.Spell_physical_blunt_multi="853421aa-0c22-4005-bb4a-68f8c6bbdf1e",k.Spell_physical_blunt_multi_cooldown="b84caa43-c384-4ed7-81f7-61b876d96adf",k.Spell_physical_blunt_multi_random="63fdd768-56a6-49ef-9c45-bc333e2bc2d1",k.Spell_physical_blunt_multi_random_cooldown="a0170a57-e502-4a64-819d-4ca30a4e302a",k.Spell_physical_blunt_multiaoe="e6758316-ac61-4f87-8071-0302fe65df95",k.Spell_physical_blunt_multiaoe_cooldown="8a298751-8b30-41bb-af50-181b86ff47d1",k.Spell_physical_blunt_random="a734d19e-3512-4110-84f6-0f81caa1a3a4",k.Spell_physical_blunt_random_cooldown="da283e74-8720-43c4-923e-7494607b76c9",k.Spell_physical_blunt_single="e968859b-7552-4d9a-aef5-9da452c89477",k.Spell_physical_blunt_single_cooldown="49b0e079-d698-4779-bd10-c9d3aa8ba689",k.Spell_physical_pierce_aoe="edfe447e-31c4-4b12-b408-0bdd31df34c2",k.Spell_physical_pierce_aoe_cooldown="4a41e755-16ca-4227-8e82-4fd3721dcf39",k.Spell_physical_pierce_giant="b07f2e0b-b1cb-4d50-8d03-87d65da9c0b2",k.Spell_physical_pierce_giant_cooldown="cf5de1d4-772e-4112-a78a-371f9f4f115b",k.Spell_physical_pierce_multi="3a999e5e-e1f8-48c0-9ad4-961d9c4b28de",k.Spell_physical_pierce_multi_cooldown="98490791-fd79-415f-980c-33625a582319",k.Spell_physical_pierce_multi_random="9ac290b1-69cf-431a-a394-e87698191826",k.Spell_physical_pierce_multi_random_cooldown="c5854a17-6127-4217-87ab-9487abaf6066",k.Spell_physical_pierce_multiaoe="95576fd8-e1be-4854-8691-93bbf3f5d618",k.Spell_physical_pierce_multiaoe_cooldown="9515e430-a090-4eed-bb8c-8f6ad26d24ae",k.Spell_physical_pierce_random="d09c5ff2-0929-4d45-948e-311b8927ee14",k.Spell_physical_pierce_random_cooldown="9d2dc89f-b88e-4ba6-b031-1240eeb793f4",k.Spell_physical_pierce_single="3e0db036-8ef5-497e-b599-39f5820cc3eb",k.Spell_physical_pierce_single_cooldown="e540864f-b88e-4109-b5a5-caf909892c6b",k.Spell_physical_slash_aoe="f26699c1-fb58-4ab0-9e22-98f7d724e08a",k.Spell_physical_slash_aoe_cooldown="23249f46-506b-4796-bdea-37497556328e",k.Spell_physical_slash_giant="8ef7afd7-c00d-4c74-87d6-caa327b30f2a",k.Spell_physical_slash_giant_cooldown="67e66d6e-1a83-4834-96e1-6eedff384b5e",k.Spell_physical_slash_multi="caeeb971-182f-4b53-916d-e42bd7ce7cb3",k.Spell_physical_slash_multi_cooldown="d91e544c-020a-4ac9-a4da-491cf8a38811",k.Spell_physical_slash_multi_random="e7958847-36cd-4d8b-a5c5-e98ac9b1c9b6",k.Spell_physical_slash_multi_random_cooldown="2c5c455f-c929-4400-863a-1428a12a263b",k.Spell_physical_slash_multiaoe="182417ee-ba54-4e3a-ac0f-c28c4e869930",k.Spell_physical_slash_multiaoe_cooldown="519d924b-db7e-4bc5-a93e-c8e0937b0a86",k.Spell_physical_slash_random="3c1c219e-9407-4e7d-b01e-ad4aaee81a03",k.Spell_physical_slash_random_cooldown="1e7c7ef3-a4b1-4c8d-8c27-9228d463f860",k.Spell_physical_slash_single="a7e83eb9-6c25-4b47-b5da-c07a1d794f88",k.Spell_physical_slash_single_cooldown="8cc67bc3-c8b6-49f3-8047-31969d86adce",k.Spell_plant_forestshurricane_aoe="28ebd156-cbe3-4d6e-be5d-eaa987052667",k.Spell_plant_forestshurricane_aoe_cooldown="3777b573-6401-4ab2-b087-ea547604c154",k.Spell_plant_forestshurricane_random="a7e99491-e989-4436-81bf-8c70f47db588",k.Spell_plant_forestshurricane_random_cooldown="7792f68e-3d9b-453b-ad5d-eeb75cf58040",k.Spell_plant_forestshurricane_single="3fa491a5-8e7f-4ac2-90b7-6855b7b5241c",k.Spell_plant_forestshurricane_single_cooldown="d1a01f47-c39c-4734-a49b-712704692f93",k.Spell_plant_leafswarm_aoe="0a84edd0-e9e5-4c23-984e-24798355b38b",k.Spell_plant_leafswarm_aoe_cooldown="cef41288-67d2-4b2c-870b-2bd8e3806cfe",k.Spell_plant_leafswarm_giant="45d3e2ee-ffcb-4799-90bc-64e385a6a085",k.Spell_plant_leafswarm_giant_cooldown="d49205d9-9e5c-43f7-8dda-04686a179a71",k.Spell_plant_leafswarm_multi="d5679207-9daa-47d7-983e-9bed43ca023d",k.Spell_plant_leafswarm_multi_cooldown="bb8063f0-4f56-4e4b-b09a-77545adeb143",k.Spell_plant_leafswarm_multi_random="c34dc780-295a-4d92-8da5-7f80d1aa6c74",k.Spell_plant_leafswarm_multi_random_cooldown="b5152a59-adf3-4b77-b68b-2b7ca5ef4c0e",k.Spell_plant_leafswarm_multiaoe="99a23d3e-dae6-4670-b523-89a4c8f921e1",k.Spell_plant_leafswarm_multiaoe_cooldown="9aa5a33c-4303-4749-b9cc-f52e9c158e20",k.Spell_plant_leafswarm_random="4db5f73b-f6e9-43e1-85ac-a301cefa6dd7",k.Spell_plant_leafswarm_random_cooldown="27a96b69-32d5-42c6-9b62-d7aab2054ba3",k.Spell_plant_leafswarm_single="beebac37-f1d3-4267-a6b0-053ef85f0285",k.Spell_plant_leafswarm_single_cooldown="7c31ef0c-9e50-4927-b448-ea7b47c64318",k.Spell_shadow_shadowshock_aoe="d8b9cc0b-728f-4bce-882e-da9fc5a7a398",k.Spell_shadow_shadowshock_aoe_cooldown="08f09a3f-1234-4844-87c0-a056d37466a3",k.Spell_shadow_shadowshock_giant="2640aff5-8ae2-41ef-ab45-787a92293a83",k.Spell_shadow_shadowshock_giant_cooldown="11b957b3-6144-42ba-a3ec-ca71335e97ed",k.Spell_shadow_shadowshock_multi="fc604b6d-33a7-4ebf-abdc-4ea8f614fb34",k.Spell_shadow_shadowshock_multi_cooldown="1ff86001-92d0-4a6c-b224-aec06e759191",k.Spell_shadow_shadowshock_multi_random="59ec806a-c2cf-41bf-ae9e-1881ab032380",k.Spell_shadow_shadowshock_multi_random_cooldown="6efd9fc8-4a6d-4987-b60f-b0f1bb77c9b4",k.Spell_shadow_shadowshock_multiaoe="bcea6d99-d01c-4363-95a8-cbc5ab407ba5",k.Spell_shadow_shadowshock_multiaoe_cooldown="8444ad29-ede4-4305-aa98-667d7bf7b38d",k.Spell_shadow_shadowshock_random="71d754ab-0bbd-42e5-8c23-f30b241d8489",k.Spell_shadow_shadowshock_random_cooldown="e41d8e3e-575c-4a11-9bd6-0c8d05c279f3",k.Spell_shadow_shadowshock_single="8f9324d7-3e6d-46a0-8ba6-a5ca2e6c7bc4",k.Spell_shadow_shadowshock_single_cooldown="b7c180d0-32a4-49c7-8abb-865da9701db3",k.Spell_storm_ioncannon_aoe="3739d7f3-ee3b-46b7-9a68-4479372c898b",k.Spell_storm_ioncannon_aoe_cooldown="23483c24-f56a-4b5a-98a5-20f46661ceac",k.Spell_storm_ioncannon_random="6b8c5277-8b40-4448-9bd1-18a05a7824ae",k.Spell_storm_ioncannon_random_cooldown="8c7df9f4-22f2-41cc-bc3c-6ffcbb085318",k.Spell_storm_ioncannon_single="7ae60d5a-7c72-48fe-a916-5dd4b574d5a6",k.Spell_storm_ioncannon_single_cooldown="62fd4638-e4a4-4296-a7d2-19fdc6216231",k.Spell_storm_sparksphere_aoe="ce7d0c71-70e4-478e-81ca-12ad935ac0c8",k.Spell_storm_sparksphere_aoe_cooldown="e322def6-acc9-495f-8dac-59b5c0dc9d2e",k.Spell_storm_sparksphere_giant="bb8e871d-042c-4780-abab-1f6c603e61da",k.Spell_storm_sparksphere_giant_cooldown="8c1551c5-8d7b-47a1-b771-709351b29d1c",k.Spell_storm_sparksphere_multi="fa00cceb-938d-4559-94b1-d97e18de5de8",k.Spell_storm_sparksphere_multi_cooldown="bd9cb342-c9df-4721-9870-7d2258351f28",k.Spell_storm_sparksphere_multi_random="5353471b-47de-4189-a11c-9aeb16969dad",k.Spell_storm_sparksphere_multi_random_cooldown="bdb75561-a2ed-47c5-8e79-0bab1fced03a",k.Spell_storm_sparksphere_multiaoe="3bdd0870-27d7-4267-b536-54acce8d3363",k.Spell_storm_sparksphere_multiaoe_cooldown="f55f996d-ec96-4780-ba7f-c0c5ec81558a",k.Spell_storm_sparksphere_random="452f3251-a7d3-4f89-b78e-370d7da41731",k.Spell_storm_sparksphere_random_cooldown="74f61c73-0650-4103-ac89-80057768165d",k.Spell_storm_sparksphere_single="b99070c5-49ac-4b27-8042-e3aeb75c6a63",k.Spell_storm_sparksphere_single_cooldown="fbc4ba18-0f4e-4537-bcc6-1cfcc0600058",k.Spell_water_aquaspear_aoe="f8ab15df-eed5-4bb5-8509-2a50a0fc1df6",k.Spell_water_aquaspear_aoe_cooldown="1cfbb430-3bb5-4b9e-a3db-aa2d3c9307e2",k.Spell_water_aquaspear_giant="c992c7ec-c6ca-4450-a200-3c4102566f60",k.Spell_water_aquaspear_giant_cooldown="f6facf62-39a8-4255-9652-a7e8badc8069",k.Spell_water_aquaspear_multi="11dabab1-3401-4d77-8bd3-7e784615e82d",k.Spell_water_aquaspear_multi_cooldown="d6abce4a-27cd-46b1-95ab-0d7f90d4cabc",k.Spell_water_aquaspear_multi_random="492c986d-8c8b-48d8-bcfa-837af5cc53f9",k.Spell_water_aquaspear_multi_random_cooldown="1f52d2d0-42be-47c8-902d-f529f8f7181a",k.Spell_water_aquaspear_multiaoe="4cc990c3-caeb-4c87-9b3a-639bf087042b",k.Spell_water_aquaspear_multiaoe_cooldown="7f00844c-eca3-48f6-bc7d-bba3bd8b3b79",k.Spell_water_aquaspear_random="2715a10a-7fa6-410d-b752-a33c0bcbdcb7",k.Spell_water_aquaspear_random_cooldown="1bc4118a-9887-4e4c-8446-8a1da5591e02",k.Spell_water_aquaspear_single="447f7ee0-991e-4d80-b259-35a58645d623",k.Spell_water_aquaspear_single_cooldown="01051ed3-84c9-488b-b343-b6b686ab7c72",k.Spell_water_downpourtal_aoe="a5f28dbe-91ab-496a-a1ee-5cc64303e12a",k.Spell_water_downpourtal_aoe_cooldown="9bfea01a-5989-4105-a9f5-ed28d651ba55",k.Spell_water_downpourtal_random="e05c9ad5-4176-43a8-9616-f8d67f6610f0",k.Spell_water_downpourtal_random_cooldown="9577bcce-fc11-45ba-89ec-87a1d9d9d79d",k.Spell_water_downpourtal_single="3bf6e39c-42f7-4a21-aaba-5ca5a6092ca7",k.Spell_water_downpourtal_single_cooldown="6b8b59f7-3a5a-454b-92e8-3ded35ada29e",k.Spell_water_waterburst_aoe="b7eab3fd-18b0-4a28-96e4-7c3e288bd66f",k.Spell_water_waterburst_aoe_cooldown="f64fa96c-ae20-4ded-926d-1f3787371de6",k.Spell_water_waterburst_giant="a73da2e8-5e06-42e1-b9cc-8a5dd0eed316",k.Spell_water_waterburst_giant_cooldown="2084feda-a24d-46ad-82a6-c58d296ce7f6",k.Spell_water_waterburst_multi="195b9a26-1084-450b-bef9-621be7df6054",k.Spell_water_waterburst_multi_cooldown="d3d2d4b4-f85d-4c21-8915-6b1c42c41c57",k.Spell_water_waterburst_multi_random="38169736-51ad-4dba-bc4f-0e7946fbff93",k.Spell_water_waterburst_multi_random_cooldown="11118a27-20a5-47cc-994f-d8cd5b2a5b36",k.Spell_water_waterburst_multiaoe="304ae25e-ec04-429a-a8ca-5a7a051ae2f6",k.Spell_water_waterburst_multiaoe_cooldown="99b2e718-2e81-4727-913e-6733afc436f7",k.Spell_water_waterburst_random="ee58f390-a8b5-4096-9347-b2fa76c2ee3a",k.Spell_water_waterburst_random_cooldown="8178be55-c216-4c45-b737-c925e44d90b7",k.Spell_water_waterburst_single="7a7e07f9-19ba-4e08-b364-ad49074fa3af",k.Spell_water_waterburst_single_cooldown="05050656-9735-4d82-bc3c-fce381eb20bd",k.Spine_chest_gold_coins="99ce8365-dab4-4a7a-ad58-2b09a897f9fd",k.Spine_chest_plus_coins="a8dcc2e9-aea8-4a1f-b6d6-293e4995d040",k.Spine_chest_ultra_coins="485753d9-8c01-48d9-a0b1-318a90867c19",k.Spot_hats="81e8c625-a514-41bb-bc5a-02f285655d98",k.Spot_samples="175dc8ce-b1ab-4e7c-bb81-2138a34e9778",k.Spotlight="3266c6a7-a2e0-4346-b9fe-efbba5463b55",k.Spotlight_floor="e19bcbaf-2004-45b3-b14e-46c91cd0fbb1",k.Springfest_1="f2ff1c31-a3d4-4d13-9bb6-e57a03cbaa2d",k.Springfest_3="3fa13df8-a37c-4cd3-bdc2-6b37b443e6e1",k.Springfest_Mask_Bunny="353de5a5-d0cd-40be-8088-975f03565c33",k.Springfest_Mask_Fox="9355c77e-a924-4518-b8bf-bfe5ed586c69",k.Springfest_background="7a2b6b25-4109-4d23-8751-a815a42571d7",k.Springfest_rewards_dorm_cycle_1="681e6b9d-485c-441d-8d7f-b754abbacea5",k.Springfest_rewards_dorm_cycle_2="4f65b8b7-f1b0-42c3-a722-5eb57568cd6b",k.Springfest_rewards_follow_cycle_1="5a699d14-42b1-4240-8822-2b74acb338eb",k.Springfest_rewards_follow_cycle_2="e7a76ff2-a32f-4720-b9d4-569c91381368",k.Springfest_rewards_item="2cb8690c-cb33-4d43-bb64-edcd760127c4",k.Springfest_rewards_pet_cycle_1="07235641-fddd-4c59-9cf6-22f7fe7a914a",k.Springfest_rewards_pet_cycle_2="60ff374e-8f29-4d8b-b0bb-add8176a4fde",k.Springfest_wizard_watch="744564f1-d791-401f-9fbb-c8908a17cf0a",k.Star_fivepoint_bright="cbb7b804-fc6e-4f13-9389-8ac32046a87c",k.Star_fivepoint_bright_1="d1bc8575-14f8-4d68-acfc-c97b5c67ac4e",k.Star_fivepoint_bright_blue="973bd603-7ec1-4573-a244-41d83d63aeee",k.Star_fivepoint_bright_purple="58273f60-c5e5-4f4c-b39a-71662643ca97",k.Starlight_splash="97940f51-b803-4ad6-a62e-9ba94cba45b3",k.Starlight_statue_boss="e64bb95a-63d7-4ea5-a9ff-5dbf72deb73a",k.Starlight_statue_boss_eye_glow="5ccaf71f-fbc8-4463-9f9f-3f4c3044261c",k.Starlight_story_daily_battles="60f55ef9-a565-4081-88f9-ee612eb8fe39",k.Starlight_story_finale_1="ad66083e-f475-421c-a3d4-451c3c6f8313",k.Starlight_story_finale_2="77257aa0-e5b5-4164-aa31-33c30486b248",k.Starlight_story_finale_3="b6e0f472-3032-4e35-9b12-d3450b8c67b2",k.Starlight_story_shop="7bcf633a-c2ba-4df4-abb6-319b0a8dc096",k.Starlight_story_stylist="d87f5728-a431-465d-b6fd-d2cd0622a9e5",k.Starlight_story_wheel="5f8c8bac-69b9-4107-86b6-841fecba2860",k.State_challenge_mailer_small="b8cd1c13-a027-4786-a4fc-eb133d0b5d75",k.State_challenge_podium="d3faafe7-39e4-4417-9fa3-d8894d041d8e",k.Statechallenge_loading_screen="fb2fe979-3151-4eb1-a96c-cd052bffab44",k.Static_member_ad_base_memberchest="f4600114-00be-4b52-b38c-b5e6ec5788f8",k.Static_member_ad_buy_member_items="29a72b6b-a8e1-46c2-b4bc-3752a1ab1fef",k.Static_member_ad_evolve_pets="8baae029-c647-4c97-b33e-94bb09de5392",k.Static_member_ad_level_up_faster="aa110d0f-eaa1-447f-9fa3-56299435ff82",k.Static_member_ad_monthly_membership_boxes="829d2a93-2114-455f-8e5c-ee52215f9df3",k.Static_member_ad_so_much_more="233daa6f-4167-475a-99b6-2d36b4bc63ad",k.Statue_boss_winterfest="190c6eda-0a54-4f53-8ae6-deb40ce8acab",k.Stone_large_disabled="6d5b86f3-7e04-43e3-ba99-9ec8e19178b9",k.Story_book_map="5c8fb725-f8e6-4896-820c-e42fd9f7f530",k.Subtitle_banner_blue="cb996d5e-4169-473a-9810-fc7e6ea1140a",k.Subtitle_banner_brown="1b25a1a9-47a6-48d4-a683-2f01cecd7dd5",k.Subtitle_banner_cyan="98cf8496-528f-46d5-ac0d-a3ad5cf7710f",k.Subtitle_banner_green="b8157fd2-7e56-43a3-8a28-a4cdc0164571",k.Subtitle_banner_grey="f23c8918-427b-4743-8506-9a6103878398",k.Subtitle_banner_lavander="52a79a62-492a-471e-b172-704ea166ba54",k.Subtitle_banner_pink="d216c69a-299e-438e-8554-fdbae5812323",k.Subtitle_banner_salmon="c48f802c-0ee0-41ab-9389-f44132057611",k.Summerfest2025_wizard_watch="524b495d-8bfa-470f-a249-788e919b8ab5",k.Summerfest_background="aad6a38c-07ce-402e-b5ae-a0ea26ea98d5",k.Summerfest_icon_dorm_cycle_2="5a8dca90-8ec0-45ec-a4ab-00f52df9639d",k.Summerfest_icon_follow_cycle_2="32b5f24d-2393-415f-b2cc-bc684aa6dd96",k.Summerfest_icon_pet_cycle_2="2c358622-62ca-4dac-9a5b-c70c5afa86b3",k.Summerfest_loading_screen="35b1f0e8-2821-4ac0-b7d9-eb1503ed3013",k.Summerfest_rewards_dorm_cycle_1="97a30e3e-616a-4332-9ff2-cf31db5cd1a8",k.Summerfest_rewards_follow_cycle_1="f243003e-8517-4c71-9bf7-dabf67c392d4",k.Summerfest_rewards_item="f7d9336c-3b97-4c11-ba80-94fb99ce0503",k.Summerfest_rewards_pet_cycle_1="2b98d136-97bc-46cf-b225-9d2e12705ac4",k.Summerfest_teaser="53263a15-1f96-417f-ba9a-73e8732da1cf",k.Summerfest_wizard_watch="1204293f-59e6-406c-9299-ec95f8cb4d19",k.SunWheelBig="ab39ce98-2154-4c09-b7ca-ed41ab4676ef",k.SunWheelFrame="03d55f5d-ae00-43bc-b97b-b96f1685ffa8",k.SunWheelPointer="05f4076e-2220-4e52-a6e3-602328ba62df",k.TT_Intro_Modal_Wire_May="2d12a52b-314a-4a0c-84ac-715eaa4dbefc",k.Teacher_gift_blaze="ea1308b2-6d7c-476d-bd59-285bc54b58d8",k.Teacher_gift_monster_plant="d247fe51-001d-4ba1-808d-4cdc76fb6ff4",k.Teacher_gift_singenewt="66862439-5164-4504-9ce2-908e712039f2",k.Teacher_gift_slimy="6dd1b1dd-6d61-41ca-b93b-8d56720f6320",k.Tier_lock="c96d7417-54f5-45ce-a145-8fa5381202b2",k.Tileset_water_new_underwater="4651bce9-97f3-4bc5-8568-9d5cd4a4cc74",k.Timer="35d9716e-1d0a-462f-a717-5092e9c90125",k.Tintable_backing_divider_sparkles="25ebc5bd-c56d-439d-a176-f4145ff91248",k.Tintable_blur_10px="877588a3-4ada-4eec-a0d6-fbe1e44c10f4",k.Tintable_rectangle_10px_corner="4431239c-5b0c-4b76-afb6-734d8d2cfd99",k.Tintable_rectangle_12px_corner="06d922e2-baf8-42e0-bc0e-149590b741c3",k.Tipbubble="456ce066-4d35-488f-b9ba-8dcd80bd7f16",k.Tipbubble_tail="1f013188-1cd7-4bbe-b329-31f746c32ed3",k.Title_plate_purple="559deb2e-274d-4675-947c-c039461085e2",k.Topbar_button_basic_color_1="db6cc2c2-ef55-468f-9414-4fecee6ad4b1",k.Topbar_button_basic_color_2="cab0340f-d03a-4177-bda3-d14863de8512",k.Topbar_button_basic_color_3="97cf491b-65c4-4f0b-8e7b-7581bbc5aeeb",k.Topbar_button_basic_color_4="3954bb7c-34f0-41ca-b1f5-eb87489f788b",k.Topbar_button_hover_color_1="59966bde-2d2c-4717-bedb-174c145a0f9f",k.Topbar_button_hover_color_2="e4f9783f-5798-43d6-8a42-dbd2ef0dfd5c",k.Topbar_button_hover_color_3="1759bae0-8493-4716-91d0-6a391838254f",k.Topbar_button_hover_color_4="80de62b3-1347-455b-8ddd-d5fdd3b1514d",k.Topbar_button_pressed="810c3144-3e79-43d6-9252-deb95f826b20",k.Topbar_plain_color_1="f6055c5f-66a7-408b-bda4-f93b7f91780d",k.Topbar_plain_color_2="b69fef13-1044-4089-a2e2-b3bb806f1f26",k.Topbar_plain_color_3="de1a0db8-32d9-4a79-bda5-43ad88822cc3",k.Topbar_plain_color_4="bf749c86-d44b-4752-af3a-ce1a015477f2",k.Towertown_open="4bbdcfc4-a78c-4ae3-a906-d546905fc022",k.Towertown_watch_adv="cc1c6bab-95c1-4705-8cf5-32821da251a3",k.Treasure_tablet="3b2b830c-7013-4778-ab6f-7b0b807670d7",k.Treasure_track_artists_alley_splash="6056f152-daf1-47a3-87fa-ecb45dff652c",k.Treasure_track_splash="e82ae0a6-c8e2-4fd8-afd9-407576b89ceb",k.Treasure_track_xp_80x80="c9ff6682-fc5f-4907-ad2a-b53530adb2eb",k.Trophy_bronze_small_state_challenges="4e431e59-7b9e-44fe-b0e9-ffb858232d99",k.Trophy_bronze_small_state_challenges_4="aeb6a727-c9a7-4276-a7ec-d9e9ff73f9ac",k.Trophy_bronze_small_state_challenges_5="736d11c0-7300-476a-8a77-fdd4be393480",k.Trophy_bronze_state_challenges="fdbc28f6-1837-494b-97f7-ce78708ec892",k.Trophy_case_top="5056f385-166f-4c9a-987c-daa7acf6d816",k.Trophy_exterior_00="2cfb17fc-c308-4f54-84e2-3e6c5b2220ed",k.Trophy_exterior_00_night="39cb0814-8862-4ded-9101-0ced2f91d389",k.Trophy_exterior_01="db2af1d6-64f5-4bda-bb00-b3587b5480a0",k.Trophy_exterior_02="833f2a7e-957b-4665-804e-5f0646ae004b",k.Trophy_exterior_03="b86ac0be-f3c7-465f-b9d5-9eac025342dc",k.Trophy_exterior_04="a47ba1d3-2294-436c-afe4-54e8f110f82b",k.Trophy_exterior_05="578665ea-d9f8-4815-8268-e55de3600f53",k.Trophy_golden_small_state_challenges="a5a193d6-75a6-41f5-8486-89f35e6f1cb4",k.Trophy_golden_state_challenges="6028be92-21dc-48d0-bc57-64ddff6621a7",k.Trophy_lobby_01="00564610-412d-446c-a76d-9bfb3a2d11f3",k.Trophy_lobby_02="a3932060-cbf0-465b-b245-e0128f1ee2e3",k.Trophy_lobby_03="40af937e-454a-4ae2-bf48-98f90951b710",k.Trophy_lobby_04="3c0000ad-1216-482f-8adc-be6f68d40297",k.Trophy_lobby_05="e4f055df-7a17-4371-8ca1-35159194d3bb",k.Trophy_silver_small_state_challenges="ec54ed34-2e12-462e-96c8-f0b5216b7630",k.Trophy_silver_state_challenges="c92c3f32-0c7b-446d-a107-d6aeb2215b7e",k.Tt_deco_ammonitefossil="98bf8744-4b5e-4e11-9b30-1f45a1917fb6",k.Tt_deco_ammonitefossil_icon="4d5094c1-4242-4cdc-8425-18e0d089731e",k.Tt_deco_babygargoyle="380abc55-1e8f-4e6e-a820-c1f049797d72",k.Tt_deco_babygargoyle_icon="c9b58d99-547b-431c-a1f4-ac2f18b6495d",k.Tt_deco_bigredbow="c5604178-54b5-4ee4-9231-a220621d02fe",k.Tt_deco_bigredbow_icon="35d9f6af-5c30-4e48-8931-608300c7959a",k.Tt_deco_birdbath="79bf82e8-a4b2-488f-9b34-4249de135e93",k.Tt_deco_birdbath_icon="0f0be8fe-b66b-48ae-97df-e68553b00673",k.Tt_deco_bp_ammonitefossil="fce30c85-ef9b-4825-89a0-587b7503c2f9",k.Tt_deco_bp_babygargoyle="018be468-1402-4404-b8f0-008a1a2c8ca7",k.Tt_deco_bp_bigredbow="5dd3522a-580d-458b-a5c7-9e307e40ed37",k.Tt_deco_bp_birdbath="8d2deb44-15b2-4da1-a466-75f833f5157a",k.Tt_deco_bp_clamshell="5f0bcb26-a6b6-4080-817e-95c8fd5b5b2b",k.Tt_deco_bp_conflictedmask="7f44a802-cf09-488f-8b89-f0add094d6ef",k.Tt_deco_bp_crystalflake="ea645198-2780-4261-a71f-734be3e4c31d",k.Tt_deco_bp_gingerbreadman="d7e6de87-4fa4-412b-825b-44536d1a293b",k.Tt_deco_bp_grapes="30c4841b-cc25-4dc6-9942-9fc0c7dae508",k.Tt_deco_bp_happyflowercoconut="9e954b30-b6d4-4664-8873-fd65d47cdf24",k.Tt_deco_bp_happystar="6bcf3b30-4863-456c-a9e1-d7bf3c4e6e5f",k.Tt_deco_bp_happysun="7b3125e6-4ac5-4a21-a830-6f4fc07f7fd4",k.Tt_deco_bp_hummingfeeder="0534d2f5-a4ca-4c9b-9bdd-506a7508e1f2",k.Tt_deco_bp_lantern="0b5062be-836a-4192-a423-4c4d66299607",k.Tt_deco_bp_lifesaver="041a7f54-41bd-442c-a515-01d0b0826f42",k.Tt_deco_bp_orangeflower="f0bb5855-2be8-463f-ba14-6473bbc6adf6",k.Tt_deco_bp_pinkflowerbasket="e237eca4-fe75-45cb-9579-5377e8d913d8",k.Tt_deco_bp_pinklotus="84741432-9996-4aa5-b7cf-43326e8a49ec",k.Tt_deco_bp_piratewheel="7b14361c-e34b-4d6d-a0ec-2debf06b86cd",k.Tt_deco_bp_planet="19a7a513-44b9-4941-a2b2-98bd6f6a59b0",k.Tt_deco_bp_puffyskates="2f5cdb8f-f345-425a-9a83-66205b5a3436",k.Tt_deco_bp_redgrassmushroom="d19662ea-ca8b-478b-a461-54d55ac94333",k.Tt_deco_bp_starswithcrescentmoon="a0603c67-59da-458f-ad0d-4e6f75efb3d8",k.Tt_deco_bp_steellantern="9a607e0e-84d1-410b-9f05-e108ec5d916d",k.Tt_deco_bp_stuffedfish="5da7c51e-5f7b-48a7-b5f2-b250207ab13b",k.Tt_deco_bp_teengargoyle="27a4cc87-2fc4-4df2-a248-0839aecc1907",k.Tt_deco_bp_toyeggnest="5a2f2707-bbc5-42f1-8221-7af0a859410a",k.Tt_deco_bp_windowsillcoolingpie="185fc191-fcf4-45aa-a985-6561a695ab61",k.Tt_deco_bp_woodenclock="b4c45bac-fd3e-406d-b86a-ada2102a03be",k.Tt_deco_bp_woodenoctopus="bbf58b26-1bab-4d2b-9763-eb6fc8481caf",k.Tt_deco_clamshell="fdf8715f-11f2-4c55-bbb0-cafb328c2c97",k.Tt_deco_clamshell_icon="dbf12805-f8ad-4da9-9c7d-df28040f5168",k.Tt_deco_conflictedmask="a5410bf9-e01c-452b-b19d-c67ad916ba37",k.Tt_deco_conflictedmask_icon="e1ca5a40-7b9c-42ec-8c7c-c1056c81beda",k.Tt_deco_crystalflake="0cf5a585-73bc-4c3f-b7a2-1696c1cfcaf2",k.Tt_deco_crystalflake_icon="bf555c8a-f9df-4e69-a5d1-f4ff42df30c9",k.Tt_deco_gingerbreadman="50dc8d86-7283-4eea-bcdf-99deac8544cf",k.Tt_deco_gingerbreadman_icon="284780e9-9b66-41b5-91bb-ef17077c1f73",k.Tt_deco_grapes="f1c4f238-4968-4223-8bdd-b8b86493a1d8",k.Tt_deco_grapes_icon="47ecd891-f539-4f3b-914e-4aa4c9aef15e",k.Tt_deco_happyflowercoconut="a10272e9-f176-4490-abad-22cf16d1605a",k.Tt_deco_happyflowercoconut_icon="200c6e49-3d20-4be7-b133-faf6f5e7af30",k.Tt_deco_happystar="7a75c80c-89c5-4e6c-bd7f-0a1418e0b593",k.Tt_deco_happystar_icon="ad5963a4-a7a2-469c-8a4f-602cb7265121",k.Tt_deco_happysun="376ecc1b-9e3f-487e-b330-08f0a41a072b",k.Tt_deco_happysun_icon="0b135c11-efd4-4055-b8c6-addc71701b68",k.Tt_deco_hummingfeeder="77840809-c991-40e6-86e7-bcfa1cc64353",k.Tt_deco_hummingfeeder_icon="0d622501-9155-48b8-b7b8-7bc8dd57b526",k.Tt_deco_lantern="66ef08bb-b271-42e3-a6bf-e60f60f48260",k.Tt_deco_lantern_icon="ae19f1ca-c38e-4d2b-8acf-6c2d68a8ee35",k.Tt_deco_lifesaver="640d8ac1-0452-4af1-bff8-c8e9eab5929b",k.Tt_deco_lifesaver_icon="e9b38757-f0eb-4d0b-9c31-63269534e0bd",k.Tt_deco_orangeflower="be857fda-6001-42e0-92a7-bc017be1eab9",k.Tt_deco_orangeflower_icon="2fe5e140-f8d9-49be-9a13-7be9c4114c67",k.Tt_deco_ph="5ac3cf37-e35b-49d4-853d-bd55c1ddaf0d",k.Tt_deco_pinkflowerbasket="340cbe8f-c2b3-420c-94be-4936df86427e",k.Tt_deco_pinkflowerbasket_icon="7f707cfd-7fea-4ff4-acb8-0745899dd90c",k.Tt_deco_pinklotus="85277284-10c8-4607-9973-ffbcb20196b6",k.Tt_deco_pinklotus_icon="b48c4d7c-0391-44f0-93e9-41a9a79632ba",k.Tt_deco_piratewheel="34b03b72-e45c-4c13-9f17-a0f91103e689",k.Tt_deco_piratewheel_icon="f40ef9c2-d34b-4121-b91a-50a54ba99e0d",k.Tt_deco_planet="70daed12-608f-4e43-9056-aa68173fccd7",k.Tt_deco_planet_icon="bcbecc40-f2b1-411e-aa81-02eb439ae609",k.Tt_deco_puffyskates="92330445-45f8-4d82-8f1b-93381c509b90",k.Tt_deco_puffyskates_icon="e8c4e4f7-9284-4ec1-982b-ee970b3331ca",k.Tt_deco_redgrassmushroom="8c77d9c5-9ae2-44b4-a48e-0bab12e1497e",k.Tt_deco_redgrassmushroom_icon="3da43433-f4f6-4c5f-a66c-59f4b162000d",k.Tt_deco_starswithcrescentmoon="b1bd6977-3ee6-406b-8480-0c391de6c0aa",k.Tt_deco_starswithcrescentmoon_icon="5fd18966-9297-42ff-8834-af8c19019104",k.Tt_deco_steellantern="fc331545-ffdb-4b6f-aafb-55b1b2be29fe",k.Tt_deco_steellantern_icon="b62b3723-8785-4968-9158-bb4e160a4b8c",k.Tt_deco_stuffedfish="6dd274ef-85a8-4e6a-ab39-c0fb297f1cd4",k.Tt_deco_stuffedfish_icon="863f5ab1-d7f6-44b1-a4f5-ea6403a36ce4",k.Tt_deco_teengargoyle="8b5a06e0-9096-43a4-a029-512482a67752",k.Tt_deco_teengargoyle_icon="6ae9949c-1206-46f6-92b2-2f7877837aa7",k.Tt_deco_toyeggnest="2b90adb7-029c-4b74-afa2-f92032a9c289",k.Tt_deco_toyeggnest_icon="f9d66f9a-a2ca-4cdd-b28d-5cf50f80938e",k.Tt_deco_windowsillcoolingpie="9df4bbab-492f-4211-9b0a-7fcf940d7c97",k.Tt_deco_windowsillcoolingpie_icon="37602f1d-a6d7-41f9-ad56-05c0f6b7a80f",k.Tt_deco_woodenclock="5ab0fdf6-26a3-4ed7-9d17-64a4e04ae159",k.Tt_deco_woodenclock_icon="49624b28-f9b9-4088-a128-98f56447c08b",k.Tt_deco_woodenoctopus="d148638b-2138-42e0-92a3-b1d1a945ec1e",k.Tt_deco_woodenoctopus_icon="9a0aca29-f83a-4c11-b637-c1fbbb7b6a1d",k.Tt_frame_bp_fire_1="e3bb9891-0d94-4710-b0bf-7a658a897ecf",k.Tt_frame_bp_fire_2="5e6437b4-f0e6-411d-b017-068cb298989a",k.Tt_frame_bp_fire_3="1270fe1a-1343-4ad5-b402-2a9b01e87117",k.Tt_frame_bp_fire_4="4329dbff-147a-454c-a7d2-4de069ae7081",k.Tt_frame_bp_fire_5="0bf182c9-d86e-4187-8dd5-f197ebdac5cc",k.Tt_frame_bp_fire_6="443b30dc-e9dd-4878-8f61-87eee5778b39",k.Tt_frame_bp_ice_1="3299d38d-60a7-4cb4-8673-8faad34f7e2e",k.Tt_frame_bp_ice_2="8537252a-2df9-45ab-8d91-a39245ebf242",k.Tt_frame_bp_ice_3="475a7abf-9aca-4fe7-aba0-7d42a12c4c3a",k.Tt_frame_bp_ice_4="6d6da880-a0b3-4890-a2a5-563da06a3e1a",k.Tt_frame_bp_ice_5="32ccd383-abd3-4c82-9149-588cc2bd75eb",k.Tt_frame_bp_ice_6="5ce657a6-86ce-4d46-bcdb-662e77c918b0",k.Tt_frame_bp_plant_1="bd91c3ed-846f-4dc1-8aa2-a6cc08b9030e",k.Tt_frame_bp_plant_2="50df3deb-f1cd-4a6b-840b-4a6d54482021",k.Tt_frame_bp_plant_3="90531f5d-2ee8-4343-9442-cca88ed5201a",k.Tt_frame_bp_plant_4="c4b29660-ef9e-4cab-9bc3-1d0e5adb73fe",k.Tt_frame_bp_plant_5="83374789-ce38-4daf-b311-bd40951efe9f",k.Tt_frame_bp_plant_6="088ebaf8-9248-481d-b35f-d576e6e4befd",k.Tt_frame_bp_storm_1="c0d2613c-8953-4a0f-86fd-05abe84b5868",k.Tt_frame_bp_storm_2="2d353e46-ab0c-4307-9d62-83bba831a90d",k.Tt_frame_bp_storm_3="e106853b-d3d8-4cf9-8602-8c818acb35b9",k.Tt_frame_bp_storm_4="9eacd7df-ba5a-4066-ae4d-5e5ea92bf5b9",k.Tt_frame_bp_storm_5="3c298e45-78b3-4e35-a7b7-ca73833a19e1",k.Tt_frame_bp_storm_6="4a3d125a-1c4e-4bf8-ba25-b81be5f6a001",k.Tt_frame_bp_water_1="afe55c6e-0225-4e18-961d-a05ff38bb836",k.Tt_frame_bp_water_2="ae743243-7f11-483c-8c85-61dab2c1ee70",k.Tt_frame_bp_water_3="2d825d74-7924-4d38-8c67-a43c8e1fb8d5",k.Tt_frame_bp_water_4="6b1c0d07-6cc3-4fcb-843a-ae8fe853fb8c",k.Tt_frame_bp_water_5="c2ce1daf-cb34-4269-a08e-5c3af052d64b",k.Tt_frame_bp_water_6="e93026d0-9c96-4bac-b429-f64f04b70515",k.Tt_frame_fire_1="724620be-09d0-4a22-9ec4-82c0c5545549",k.Tt_frame_fire_2="96ed4c11-5af2-4968-8079-02a6b1dcd3e5",k.Tt_frame_fire_3="0ac7096d-5a5a-41ee-898b-a88c5f59ebe6",k.Tt_frame_fire_4="9afdd9d7-2024-42ab-b402-54095a60f530",k.Tt_frame_fire_5="bf54d6f3-acde-4761-a335-e3f42d145892",k.Tt_frame_fire_6="586b8c02-4057-4db5-a5a0-c95c517819d5",k.Tt_frame_ice_1="77b9ce41-7947-4772-a93b-cd6ef8c4c264",k.Tt_frame_ice_2="5859c787-9f92-4b03-8a7a-cab44cb8a8d8",k.Tt_frame_ice_3="b9e09b67-d11a-4288-89cb-50830314edfc",k.Tt_frame_ice_4="76618ee8-4811-4df7-ad8e-ebbdba704bc8",k.Tt_frame_ice_5="998a2a2e-543a-471a-b4f0-0c3a917240f3",k.Tt_frame_ice_6="0e95d74a-26dc-4130-b476-7bbf270d04fd",k.Tt_frame_ph="fe5038c2-1e83-453b-9b8e-8d4c388392f4",k.Tt_frame_plant_1="123dd58c-e4ed-4d7d-b295-e2fbd2371401",k.Tt_frame_plant_2="f511b723-5748-4ddf-bb01-132ae1a7d9b1",k.Tt_frame_plant_3="771757fb-eb93-48bf-892f-4a183daf9e85",k.Tt_frame_plant_4="fde30427-6871-4d1e-9d92-a6df7bd26843",k.Tt_frame_plant_5="b975919a-cd48-4793-8f43-3e543cc2e70b",k.Tt_frame_plant_6="211932bc-9d15-4149-a5c4-86c3d3a31b9b",k.Tt_frame_storm_1="368622ba-1ef8-4c7e-9fbe-91535b5a98bd",k.Tt_frame_storm_2="de6b6efa-10cc-4fcc-b81d-8b23f56c5903",k.Tt_frame_storm_3="180338e5-bcfe-41fd-8ade-9844b4dcd594",k.Tt_frame_storm_4="8cb72f8c-0118-4c52-bbf4-62ba6420f868",k.Tt_frame_storm_5="e77f40e2-db00-4669-af50-2cc659445979",k.Tt_frame_storm_6="ea8dc9ad-4562-452c-a35b-48bdd76e3a62",k.Tt_frame_water_1="2a2109d5-76d4-404a-9bbc-0eac2b5dffa4",k.Tt_frame_water_2="07a9b8ef-68c7-40f5-9db6-bda1a321bdc8",k.Tt_frame_water_3="3e441ad5-878b-4b8c-b49e-b9c6aa45d81f",k.Tt_frame_water_4="02d84c7d-1fbe-42be-bb9e-a013fdd7fa19",k.Tt_frame_water_5="b8a82e80-8f1f-416f-acc9-5506de7972bc",k.Tt_frame_water_6="9d1ecaa9-5c62-48c8-8627-a4fcff95f3ff",k.Tt_int_ph="5d4d4873-a4ce-44e2-89e7-85fb582da46f",k.Tt_interior_bp_fire_1="ab4b7495-5b6c-44e1-91cc-8b20e3d591cd",k.Tt_interior_bp_fire_2="32b9b825-2a7d-4a66-803c-811175c2acc3",k.Tt_interior_bp_fire_3="c27548cc-d564-44b1-b383-5c85be7fac1d",k.Tt_interior_bp_fire_4="98bf3075-2b4e-4571-9dc9-79785109de23",k.Tt_interior_bp_fire_5="baf70955-2754-4eee-a6d8-5f57249e8ccc",k.Tt_interior_bp_fire_6="1a32e62e-404b-46dd-8a44-24cf9aab7770",k.Tt_interior_bp_ice_1="fcadc8e5-3025-4eaf-91a6-4920279944a6",k.Tt_interior_bp_ice_2="5447f88e-4ad1-45d1-8c7a-c6eaa917ebcb",k.Tt_interior_bp_ice_3="a59de311-8fb0-4f78-b187-25b652f2eb3d",k.Tt_interior_bp_ice_4="6e6fba1d-0a85-477f-9165-ece2fdeaba14",k.Tt_interior_bp_ice_5="5d8771ec-88dd-4aa6-9ffe-75563d349a66",k.Tt_interior_bp_ice_6="1ce79b4d-22df-46ad-9204-30cd06d433dc",k.Tt_interior_bp_plant_1="cfcdac71-0aaf-4c61-9175-2063a558fba9",k.Tt_interior_bp_plant_2="6f4f7e65-40ee-4c24-bd7b-9895bbf3573f",k.Tt_interior_bp_plant_3="0028d0c1-c998-4566-a0ec-f3c11155b9e4",k.Tt_interior_bp_plant_4="83a48057-8825-4cb9-8c7d-811de9c038a6",k.Tt_interior_bp_plant_5="fcfc747a-071a-4bc9-b5e8-cb08c03ff214",k.Tt_interior_bp_plant_6="c7ff2d6b-b28f-40b3-b3ed-66490a1c6439",k.Tt_interior_bp_storm_1="caef0401-1865-42e3-8350-a35abd451418",k.Tt_interior_bp_storm_2="ccd5e840-f260-4a5b-8603-3ff567f78a78",k.Tt_interior_bp_storm_3="e3170739-c616-4927-b070-c3a867e1dec5",k.Tt_interior_bp_storm_4="1967b439-eb0c-4dd3-8f4c-04d89dd227df",k.Tt_interior_bp_storm_5="bb4365b6-4445-435a-b6ff-c16cfa160590",k.Tt_interior_bp_storm_6="0c6256ea-3716-45ec-babe-0c74d4e6ec45",k.Tt_interior_bp_water_1="70fbb9e6-6fb6-4304-a52d-09aec2afd235",k.Tt_interior_bp_water_2="5a22dd34-d216-496d-ba5a-9a2dd24a4481",k.Tt_interior_bp_water_3="2f1d4452-1300-4e79-961a-f7c1e7583ebb",k.Tt_interior_bp_water_4="26eb1461-956c-4b7b-a2d2-d106160e7afc",k.Tt_interior_bp_water_5="19970c62-a9c8-469c-92b9-0b3ce2dde87d",k.Tt_interior_bp_water_6="2252c25c-54a5-42bf-a25c-357094099029",k.Tt_interior_fire_1="c2a28b5c-2ffd-4cd6-8630-3c2208ccaf74",k.Tt_interior_fire_2="7b4419cb-9abf-451d-b4f3-95bd3cba9a1d",k.Tt_interior_fire_3="5fc5e4ca-6e48-4755-9b7e-5c331bfffa59",k.Tt_interior_fire_4="fde40b18-d611-4414-85e9-eb86a7d3e9cd",k.Tt_interior_fire_5="6dc70ca4-496d-4b23-b227-cb035c16d863",k.Tt_interior_fire_6="7dbccda0-2a2b-44af-ad71-5b4d2f082d77",k.Tt_interior_ice_1="0fbaf01c-bc33-44fb-9b0e-d4f7aea9931b",k.Tt_interior_ice_2="ce785ad7-3be6-4036-ab4d-874bc5208d8a",k.Tt_interior_ice_3="9863d48b-fdbd-4284-9861-8b2dd6d94b4e",k.Tt_interior_ice_4="1dd60917-584b-45c3-8e80-85ab9f5d1103",k.Tt_interior_ice_5="d8c92be9-a327-4c8a-81e3-155888c4dd97",k.Tt_interior_ice_6="c8843328-0073-4d77-8914-271c58150c64",k.Tt_interior_plant_1="2609e420-488b-487f-82db-7033509ad435",k.Tt_interior_plant_2="9e7344b9-f5a3-466f-a015-e5249d837b57",k.Tt_interior_plant_3="7ffdfbdf-6be8-4ad8-85cb-48091b75d86f",k.Tt_interior_plant_4="c609310d-e764-4f81-8b83-5c27e6b2b53e",k.Tt_interior_plant_5="0d226f6d-c586-4676-95a0-421a5967b2d0",k.Tt_interior_plant_6="0ea565f1-ef8e-4ebf-84c2-d788186064ac",k.Tt_interior_storm_1="bffb6e2a-6096-4c80-b8ea-2af4e9e85a62",k.Tt_interior_storm_2="e467bc8d-1849-4d25-bb57-9f59736a25d1",k.Tt_interior_storm_3="f6f10267-1650-424b-b7b5-f32f557a49ba",k.Tt_interior_storm_4="97baae73-1a31-4446-badb-5cbf19c21b1a",k.Tt_interior_storm_5="84b0a122-4515-4813-bcfd-9e03ff012115",k.Tt_interior_storm_6="7d4610eb-6dfe-4353-9ee4-fd2ed9822f11",k.Tt_interior_water_1="dcd376aa-6b22-46e8-a091-a8c485c8eff5",k.Tt_interior_water_2="13df2b8b-124e-40bb-9fd6-4fd1be1baa9b",k.Tt_interior_water_3="af7bbfad-b382-4483-a863-11acac7b4007",k.Tt_interior_water_4="8cd48d7b-fb90-4334-b598-6aa5260e3a3b",k.Tt_interior_water_5="b2aedede-366e-4cf2-b9e5-2f8f0daa1ae2",k.Tt_interior_water_6="179832bd-08fb-4911-b71d-b13f4d5fd2e3",k.Twilight_wheel="e53556f7-d1df-4e5d-a457-fa99e83e05b9",k.Twilight_wheel_off="234407f9-1f33-49b8-8a7b-4a4bf504cab4",k.Ui_coop_bucket="e233cc3c-fcd8-4142-87c7-33c34570007b",k.Ui_pet_xp_boost_graphic="8da014e1-1078-45e4-a5e9-06a36aca15fb",k.Ui_pet_xp_sunburst_white="8c6d94e8-24f1-47d7-a9ab-cb65dd1c866c";k.Universal_scroll_bar_slider_basic="db95a2c0-abe8-4710-8ab9-902cf65e8809",k.Universal_scroll_bar_slider_hover="08551e9e-d5a8-4830-814c-aaad30f76c97",k.Universal_scroll_bar_track="a365d6ce-345f-4404-8d2b-b389bc6716fa",k.Vertical_dorm_1="4ad58123-ea85-4242-869b-d2bda088d557",k.Vertical_dorm_10="77f018d4-566d-4238-943f-73ecef33542a",k.Vertical_dorm_100="46daf03d-9175-4d3c-b9b2-fee25d9a7caa",k.Vertical_dorm_101="ea817ccd-3733-48d9-b5bd-5b5ff786751e",k.Vertical_dorm_102="121049e6-54e5-4863-a8b4-cc68ef39a945",k.Vertical_dorm_103="c6373e45-7fec-4695-8842-e952d9bcfb2a",k.Vertical_dorm_104="02b867b4-1002-4e64-a27a-ed721a1f9053",k.Vertical_dorm_105="2896771b-4f47-4d4c-9ca3-98b1346fda93",k.Vertical_dorm_106="25f56ef1-95cc-4cd6-8723-e932e0407b71",k.Vertical_dorm_107="acf1ab4f-7f66-43e8-9f8e-38c4d40aa071",k.Vertical_dorm_108="c18983be-4074-472b-9c1f-23fa166b6288",k.Vertical_dorm_109="116a4406-7663-4401-9cdd-164f1d2571b1",k.Vertical_dorm_11="73f521b3-c357-425d-b867-4caaa034914b",k.Vertical_dorm_110="96d8ab22-8f7d-4c11-9929-7914ceff4742",k.Vertical_dorm_111="304acc4f-013a-4385-8862-5cd828e962e2",k.Vertical_dorm_112="891e8319-ec08-4dad-bda1-0f196fb34001",k.Vertical_dorm_113="a3f3622b-caec-4228-8deb-2ce3afae8bc8",k.Vertical_dorm_114="5ae172a1-73d5-4a1b-b272-4b1e11012d1a",k.Vertical_dorm_115="3a0c6a18-986a-4ef3-8867-d53d3745fbc5",k.Vertical_dorm_116="de4470db-7d8f-4805-8fe7-82b242980c95",k.Vertical_dorm_117="3dee9d55-bcdb-482a-b058-e19d4c08a68c",k.Vertical_dorm_118="be2ca8e8-3dac-443a-b65f-5ae7e8e6cb9c",k.Vertical_dorm_119="c355abe3-269b-42ec-b7b6-ee730008a592",k.Vertical_dorm_12="b6eba5bb-65b1-4669-bf13-637202be6482",k.Vertical_dorm_120="cb5af5ba-e272-478f-a826-333c87853db4",k.Vertical_dorm_121="48a7a1ce-4ac4-4235-a522-9915ef6f4636",k.Vertical_dorm_122="d03a9445-2b10-40c4-ba8e-6ff0c120d623",k.Vertical_dorm_123="af9130e0-99e6-4dae-9121-b95b154b0756",k.Vertical_dorm_124="da4b5c3c-770e-4327-ac01-92bf2fcaf7b2",k.Vertical_dorm_125="6d9fe51b-5482-4c91-acbb-ee87363987aa",k.Vertical_dorm_126="0547038f-5510-4833-863f-14ea9a205840",k.Vertical_dorm_127="b47d66d7-ab54-4f49-8ac3-363df8cc18f5",k.Vertical_dorm_128="61751a5a-1c48-4a9b-a042-ad7e29802ff5",k.Vertical_dorm_129="9e60cc4b-fcad-4f96-8fd5-77523299669f",k.Vertical_dorm_13="d814b3c3-5efd-40fa-90c2-2efa648c75d7",k.Vertical_dorm_130="632d7aec-aa0c-425b-a16f-1964f84ea0b8",k.Vertical_dorm_131="1977a218-0ebc-4149-a78a-c512468aa4d7",k.Vertical_dorm_132="3ab4754e-885d-4d16-bc60-2cccba483e76",k.Vertical_dorm_133="29cb3648-3ae9-47df-9ba5-9c977ed2fdf4",k.Vertical_dorm_134="9eec7380-9a71-48ad-bc05-ab195a1d2ca8",k.Vertical_dorm_135="65f51264-d8c8-4505-a0ba-2467c71ebe83",k.Vertical_dorm_136="461ea4cd-02c5-419c-9e00-313b2885ad8c",k.Vertical_dorm_137="181f42cd-5a64-4c16-b919-0252a0e6e2cd",k.Vertical_dorm_138="6b3fbc75-0b79-4330-9c24-5a893ea6e7d9",k.Vertical_dorm_139="86dea814-2908-4b65-b3a5-d37fd3973c00",k.Vertical_dorm_14="e1cf4f8f-c5a8-4e13-9f7c-11dd6e9fc6fd",k.Vertical_dorm_140="aa8b79d7-9d60-429d-ab3d-98ba531b9f91",k.Vertical_dorm_141="157c6a83-8c2f-4c22-96ca-70e658a1731a",k.Vertical_dorm_142="f1339be0-7362-4be4-9133-850cfe01239d",k.Vertical_dorm_143="4f69f346-493a-4563-81a1-3e20baa5703a",k.Vertical_dorm_144="f6c8fb46-f7f8-4769-ba5b-49eb9ca1ea08",k.Vertical_dorm_145="a908c059-52fb-4193-b2a4-c6082b9a1c62",k.Vertical_dorm_146="ac3aa61b-ae3e-42c5-9e65-5222cde16a67",k.Vertical_dorm_147="9d9d45c4-19e5-4ea0-afb0-0b709f96942c",k.Vertical_dorm_15="be6f339a-8cfd-4d95-af27-22f55c0b541d",k.Vertical_dorm_152="eb4f600e-15f9-4d96-8f83-05c224f78deb",k.Vertical_dorm_153="786c8f3a-d93f-4990-9b96-5dfcdfb2b14b",k.Vertical_dorm_154="13a7419f-24c2-487e-9427-466fe2b27715",k.Vertical_dorm_156="d3a809b6-b38d-40c5-a79f-9b53afe7090f",k.Vertical_dorm_157="cc33c0b4-55e1-4f32-ba8a-bcf1807c3e23",k.Vertical_dorm_159="d69be3e8-a2b2-4191-bfdd-1bb4917ca18b",k.Vertical_dorm_16="14bee117-1627-4ba5-a7fb-05c7d1f21c6f",k.Vertical_dorm_160="4c5f93a5-e3f0-4f49-8c14-ccd31cf826ac",k.Vertical_dorm_161="16e2f3e7-ec4c-4a1d-8801-13c90a035b08",k.Vertical_dorm_162="61bd7028-7489-457c-8ba3-e10dc10fabb3",k.Vertical_dorm_165="ec8ebbf7-211d-4e66-9054-63acacb62fe5",k.Vertical_dorm_166="597af58c-12d3-4cad-a2f6-f9c576ae467c",k.Vertical_dorm_167="9a664ec2-81ae-4761-8f19-04769633fe11",k.Vertical_dorm_168="9fa610e8-a404-4970-ad24-8f9ae440ec8c",k.Vertical_dorm_17="b9e85a13-ae87-4319-a53b-f8cb36b2743e",k.Vertical_dorm_170="7e70aa9d-934d-4101-aad2-a6132f9eba93",k.Vertical_dorm_172="285b0d23-0a04-4808-bf6e-9bce7cb3d108",k.Vertical_dorm_173="524b931e-8fae-4940-aaf6-e26cc8e19cbd",k.Vertical_dorm_174="71fb2cd8-8def-4b2a-b29f-9fae5d527983",k.Vertical_dorm_175="39f226e2-9795-495a-af71-261eca208b2d",k.Vertical_dorm_176="a4f33b37-ad76-458f-83b7-11a5205b8163",k.Vertical_dorm_177="e34fbd43-8c7b-4e3d-92eb-42c6ba8319a7",k.Vertical_dorm_178="2ee126a4-ff03-48ed-b131-210780a1f930",k.Vertical_dorm_179="6f340796-e992-4f71-a2a5-13b2692bea73",k.Vertical_dorm_18="719ee94b-0e05-4336-99cd-215b51b4b5ea",k.Vertical_dorm_180="3e29437b-f895-4fed-80b8-ebc2b8f3f96c",k.Vertical_dorm_181="2501177f-4111-48c4-868c-af60619f6f7f",k.Vertical_dorm_183="4128a834-34ff-406f-920a-be02ce4cde91",k.Vertical_dorm_184="19ccddc6-a115-4283-b836-5933d8a535e4",k.Vertical_dorm_185="c715f6cf-2f68-459d-ba0c-6c91823c54be",k.Vertical_dorm_186="30992f5b-8c7b-4763-a667-b220e5fb1f96",k.Vertical_dorm_187="e8aa633c-2a6c-4791-a834-6d9061820fb3",k.Vertical_dorm_188="208c911d-4565-408a-a0e8-2a42aa54ce8a",k.Vertical_dorm_189="5c033a33-935c-4df0-91d3-b01672ae514a",k.Vertical_dorm_19="f5e1bcdf-8f7a-438d-9b76-ff09328943dd",k.Vertical_dorm_191="12b15048-b0da-4b87-82fe-5301473d1015",k.Vertical_dorm_192="b1b9aba5-8c16-4307-95c3-1bd2cfb7a5ae",k.Vertical_dorm_193="cbd78246-97a8-4f91-af1d-f166f06de41d",k.Vertical_dorm_194="fe52e6c9-e394-4f87-97d6-23c7565e3dcc",k.Vertical_dorm_195="a5802ac7-b883-4685-876b-9e74e4e2d12f",k.Vertical_dorm_196="22983af1-8b06-4ddf-93f4-6f7629d4da82",k.Vertical_dorm_197="d16fe0df-4856-4c10-9014-7f5f8f3c9e16",k.Vertical_dorm_198="5a2cb3d2-f60b-436a-ad4e-8d7d83c867ea",k.Vertical_dorm_199="a15bb8d9-3972-4e4c-8a0b-2d2ab0c75e77",k.Vertical_dorm_2="668ed1e7-0cd7-4f71-af03-b715d875443a",k.Vertical_dorm_20="e87012bc-6ded-48dd-a59b-d0cc872cbdc4",k.Vertical_dorm_203="3d2748b9-4c49-4707-8dc4-e200cc8dcf7a",k.Vertical_dorm_205="fcd38cca-b804-46b6-8f8c-6694e2854e4f",k.Vertical_dorm_206="c7b50da8-810c-41ff-a3a9-6e1f44784e0e",k.Vertical_dorm_207="eb0d8310-3448-4f8c-957a-f964ade86c86",k.Vertical_dorm_208="21c9bdc2-b46b-4324-9048-22162737caaa",k.Vertical_dorm_209="bc3393b3-bda6-4ebb-9b81-1840bf6a7364",k.Vertical_dorm_21="fe915b04-0cb8-4575-9570-e31c17740cd8",k.Vertical_dorm_210="4b08c230-6f65-4fa4-81c2-d5477dc38634",k.Vertical_dorm_211="8834fb38-ec5e-435b-bd28-0c9e8cfb4ca7",k.Vertical_dorm_212="8b7bd883-3081-4fd4-9e95-1f7c2c785955",k.Vertical_dorm_214="ecbe380e-ffd3-452c-b97a-b478fd9d7cb7",k.Vertical_dorm_215="ad9baa0b-5980-4b47-8d84-d98cdaea5e5b",k.Vertical_dorm_216="1842d300-ab4c-4376-8d69-c895bfaa3ebe",k.Vertical_dorm_218="55aafa5b-2d36-444f-a0fb-3630b2bc8e4d",k.Vertical_dorm_219="59c1c23d-535c-4563-83e3-a74588e6d6de",k.Vertical_dorm_22="e4be1a58-d9af-4747-bde6-c728d562b7db",k.Vertical_dorm_220="41194cfc-40de-4a6d-9e86-1c0db943c8c1",k.Vertical_dorm_221="eeffc5a8-fe58-4a2e-b502-689f744233e4",k.Vertical_dorm_222="3f865840-c2d7-4253-9c4d-47d92616595d",k.Vertical_dorm_223="8294171e-46a2-4e0f-848b-870011366c53",k.Vertical_dorm_224="97349e61-dee7-4735-8a13-54a23c41997c",k.Vertical_dorm_225="8ea3c86a-3926-4ce7-abd3-715295c4a9f9",k.Vertical_dorm_226="0a3a309a-383f-4b49-a170-b172318a9429",k.Vertical_dorm_227="b8b59b7c-399f-4de4-b67f-81ff5157a4fa",k.Vertical_dorm_229="b5c73340-46f5-43b6-9c17-1477b0c08cfd",k.Vertical_dorm_23="fea36508-fd22-49cd-a9c1-77e66ee50282",k.Vertical_dorm_230="0e1bab9e-7c53-4ce7-befa-3951aea02b26",k.Vertical_dorm_231="c0c56a5e-8aaf-450b-a702-79d6621a5833",k.Vertical_dorm_232="a74d9e81-ead0-4781-8bd6-9071241e79e8",k.Vertical_dorm_234="9415d381-beb5-4539-8bbf-3b20d8ec9c97",k.Vertical_dorm_237="5b584940-97e2-4ccb-84c3-d59335997698",k.Vertical_dorm_238="be69ed67-53e4-43b8-adf1-1851450922da",k.Vertical_dorm_239="b1b2ad1b-5531-49fe-91a3-d7f605806039",k.Vertical_dorm_24="1736c17d-d4a9-45f3-a4c3-b75c7f0fe74a",k.Vertical_dorm_240="49ed535a-5634-4a06-a420-108aea365f6c",k.Vertical_dorm_241="7068344e-92a3-4981-a163-91785608dddc",k.Vertical_dorm_243="faace1a3-9bf0-45ca-b6d3-cf9eaf95448c",k.Vertical_dorm_244="a56b5129-556d-4e82-b100-bb26bce1203d",k.Vertical_dorm_245="b3af069d-0864-4b0d-8457-1fd0d14a7720",k.Vertical_dorm_25="33416572-0b6d-4c80-82b2-877e55204337",k.Vertical_dorm_252="d0904dbc-2c72-4c66-9f57-a0c1b73bd807",k.Vertical_dorm_253="4fa26da1-a0d0-45d3-8ab1-bd8c12d6c7cd",k.Vertical_dorm_255="2a238fbe-26c4-43c9-b968-91436dc22ec8",k.Vertical_dorm_256="3a34c0fd-c8d8-4f60-bc78-df650e7d8e2b",k.Vertical_dorm_258="727b4ee4-6231-4c09-9ffb-7dfb10813fbb",k.Vertical_dorm_259="86f27d75-c913-490f-a1af-67188f2f6571",k.Vertical_dorm_26="2030fb5c-1b40-44d1-a88c-e39f45d0646d",k.Vertical_dorm_260="92bda2d8-b28c-4c67-acb6-1e01132edd0e",k.Vertical_dorm_261="e83897ca-deda-4439-a42d-cb33fd323fc2",k.Vertical_dorm_262="13ae8b71-39c3-4482-97ea-072b70fe2332",k.Vertical_dorm_263="42e770a9-cae0-401b-be5c-3df412779644",k.Vertical_dorm_264="0d01ea41-014b-480a-a352-b8332b4695d4",k.Vertical_dorm_265="5794cf9d-5edf-4dfc-9d7f-086d703cb770",k.Vertical_dorm_266="5135c6b2-df4a-460b-b812-5f645666ad1e",k.Vertical_dorm_267="91857c61-0902-4b8b-9018-22c42dcbafda",k.Vertical_dorm_268="3f9771fb-1fb6-4339-b1d3-58c3e392e3b0",k.Vertical_dorm_27="eb914dfd-24b3-4b83-9645-e294daee9c70",k.Vertical_dorm_274="45d5a797-f9b4-4cf9-a32b-70928fe072dd",k.Vertical_dorm_275="0d0c4d44-6294-4ff7-aa9e-9347d6e6e385",k.Vertical_dorm_277="7a2db271-c722-4a81-a427-625677e90847",k.Vertical_dorm_278="30756eb0-2728-41af-806b-1ad8bce77d5e",k.Vertical_dorm_279="e16d4e0b-80f7-4931-8fbf-28edb51c7622",k.Vertical_dorm_28="4ae704da-a08e-4a47-aab5-7a1195e72f22",k.Vertical_dorm_280="ac95d496-521e-43fc-9ee5-5cb1c8d96fd4",k.Vertical_dorm_281="66cbb8a4-4189-4e76-a763-f80e028889fa",k.Vertical_dorm_282="bf72de50-6886-437d-a1d3-cbc64acc9095",k.Vertical_dorm_283="3a368014-8053-4247-a0a1-8985c68bac88",k.Vertical_dorm_285="bd9a2c82-2962-4e9e-bf71-299d41ed8e28",k.Vertical_dorm_286="c430e7cf-7fc9-4e71-af19-e7deec2c67e9",k.Vertical_dorm_288="c0445e84-df8c-449c-932f-d2b7fb299d5e",k.Vertical_dorm_289="79fe6544-9492-4865-8a49-949dafb41ef7",k.Vertical_dorm_29="ee0f916f-006b-44ca-9cd0-2cc54d04b3e2",k.Vertical_dorm_290="6c699154-8d65-4d18-ab7d-dbaa00f30d7d",k.Vertical_dorm_291="9cbda97e-930a-4ea5-b2db-b92d101dc7c7",k.Vertical_dorm_292="a897c25c-09ce-4856-9ffd-cbb1090c95da",k.Vertical_dorm_293="02e57672-5e18-4693-8f78-b3ce663b5087",k.Vertical_dorm_295="a619c211-28be-40e0-965e-2ef65e68f7d7",k.Vertical_dorm_296="800a8da1-3823-4711-bef4-b5acfaab9ad4",k.Vertical_dorm_297="9bd484ca-4114-498e-ab1a-8806d098c790",k.Vertical_dorm_298="1a4ba5d8-7ff5-4120-b775-513b1a2dbde1",k.Vertical_dorm_299="82c348f8-beb7-43a5-9919-e39fbaff8a83",k.Vertical_dorm_3="7eca12b2-033c-4658-a87d-f116f8889b39",k.Vertical_dorm_30="e189e0d2-b18f-48a9-b004-b09c7493d60a",k.Vertical_dorm_31="b1c809ce-737e-43e2-866a-849718ae4c51",k.Vertical_dorm_32="2676b6a8-b797-4054-9397-296c39ae8e61",k.Vertical_dorm_33="b2fac3b7-f326-46a6-bf3a-64707b6720ed",k.Vertical_dorm_34="541ec6b9-05fa-41e2-9fd9-b39754669894",k.Vertical_dorm_35="1cbd45d0-4b23-4683-b6f7-1407297b9279",k.Vertical_dorm_36="b2025480-bcc2-4c05-9e3e-880dd9b6e314",k.Vertical_dorm_37="2fae27fa-914a-4bc7-9920-62a474816969",k.Vertical_dorm_38="f847a7a3-36a3-4a48-8313-86c67f1bc927",k.Vertical_dorm_39="d08d4545-0927-4ebe-8fce-d5d9149d53d8",k.Vertical_dorm_4="ca84ec42-30d1-4c95-8820-989624814e88",k.Vertical_dorm_40="19d5c281-8278-476b-b0d9-d4836647e7d0",k.Vertical_dorm_41="1fba8776-b618-4bf0-aa9a-c70667628f89",k.Vertical_dorm_42="78e0323b-ab21-4a3d-a141-c68bc8c6be5b",k.Vertical_dorm_43="62740c4d-b407-4d9f-bd50-a83476a7c69f",k.Vertical_dorm_44="e82f984a-79dd-4636-9467-956c38d55407",k.Vertical_dorm_45="3bd66757-34ad-4991-841a-6fd0bf1f9a7a",k.Vertical_dorm_46="d98253c2-05f0-4b38-8d7c-a53f83da3de3",k.Vertical_dorm_47="af44d296-51c5-49c4-9195-5a86ab7d94a3",k.Vertical_dorm_48="8bdf8a5e-d93c-478b-aef3-63fb2561bed9",k.Vertical_dorm_49="afef7edf-a7dc-4d55-ae2c-a8e650a0f7e9",k.Vertical_dorm_5="fc19aa6e-ca14-4736-9fa4-8f465441f459",k.Vertical_dorm_50="515e97e8-ea7f-4a14-9610-725aa0e0be73",k.Vertical_dorm_51="a31d1198-05aa-4b24-9acf-0758f2a4bc26",k.Vertical_dorm_52="76ac8e43-b968-4c4c-821c-615e46606765",k.Vertical_dorm_53="7c34002f-f68a-4963-a1e6-d80d0a06531c",k.Vertical_dorm_54="47db2634-c74c-463e-b37d-b9333898221f",k.Vertical_dorm_55="0e5f6357-9bb1-4c77-85f9-d3984aa21a79",k.Vertical_dorm_56="47667c6d-88eb-4bfe-86c8-7eea4191021f",k.Vertical_dorm_57="e93b12be-be1f-49c6-b0d1-c5832d935aa8",k.Vertical_dorm_58="baf1e07a-2eaf-44c6-836b-d11c7460ac32",k.Vertical_dorm_59="2f334580-76f3-4f8f-a9b4-9b67e94fa974",k.Vertical_dorm_6="8f9c2b70-1ed3-4e62-9179-e545b4799015",k.Vertical_dorm_60="cd6e0ada-123f-4856-bb18-f477c01dd418",k.Vertical_dorm_61="ad193da2-a05c-4081-8644-a12e68c62fe7",k.Vertical_dorm_62="f1c777a6-5815-46e8-803f-363fe7ac047b",k.Vertical_dorm_63="b5df5c96-ae43-404e-bd5a-0cdbc84aab86",k.Vertical_dorm_64="f6177ac0-4acb-417b-926b-ca6030c310a2",k.Vertical_dorm_65="8fb6005a-2442-4122-8b05-c90445cc7d9b",k.Vertical_dorm_66="6f9e9fb8-10f0-4d5b-8c59-52bcad41d023",k.Vertical_dorm_67="48b30297-b9b6-4bd8-819f-e125c30ce575",k.Vertical_dorm_68="c78dbe0e-05c1-4f89-841c-e9ef7be6ec5f",k.Vertical_dorm_69="27c71aa2-f460-4a39-9f52-9559e81aace7",k.Vertical_dorm_7="5205d87f-40bb-48af-9dbf-0479f2c6d1c5",k.Vertical_dorm_70="4c76ef66-ca2e-4f60-9dbe-0a25ff8fad72",k.Vertical_dorm_71="3951dd02-64fa-4789-8abf-ee803ebe3bba",k.Vertical_dorm_72="46a401ab-bae1-4df0-a416-7c594b40cde9",k.Vertical_dorm_73="80fc8684-4583-4d1e-9a84-95f340b5208c",k.Vertical_dorm_74="394a8b69-88a8-480c-9421-bd21b4070da8",k.Vertical_dorm_75="48097014-4415-4aeb-9854-17f15ea74c7a",k.Vertical_dorm_76="65b21868-e2f2-4dbf-ac20-8f7aab78f750",k.Vertical_dorm_77="83c72f0f-d8c5-44fc-a9d6-5a8e4a59ea64",k.Vertical_dorm_78="6fdc2255-d5b8-4928-8d41-c47328e0ea3f",k.Vertical_dorm_79="cccf6ac1-5ac5-4862-afca-7546232cbbdc",k.Vertical_dorm_8="6b84a66c-ab63-4be5-92b3-acbf25c0b8a9",k.Vertical_dorm_80="fe15accb-af3a-4d2b-a928-9c324e678157",k.Vertical_dorm_81="1af11a7c-2dcf-4a85-ac6f-b359993cc4dd",k.Vertical_dorm_82="d2b77216-50ce-4fc9-935c-19e9694ee7b6",k.Vertical_dorm_83="82f59d5d-3331-42d8-a411-5114f43ac0be",k.Vertical_dorm_84="a9a97ecc-2fd8-4ed6-897a-3851061b6ed8",k.Vertical_dorm_85="136b8391-3dfe-4b05-8d48-62a87f64a5c9",k.Vertical_dorm_86="cc32b316-e90a-43b2-8215-d99b45d217cb",k.Vertical_dorm_87="d200b0f1-8694-4911-9450-3bfadb1dc8b8",k.Vertical_dorm_88="60d027ec-b25b-48c0-825b-0bc1e23fa0dd",k.Vertical_dorm_89="1bf21cef-729a-4230-941a-49a3dfd2a7fe",k.Vertical_dorm_9="691d5bab-d369-4b09-a194-caef2b804f81",k.Vertical_dorm_90="202ff271-e4d2-4e53-a6b0-5dd86e2d0813",k.Vertical_dorm_91="f83b44e4-36df-42cf-b739-bb9b49cff800",k.Vertical_dorm_92="79399f78-4159-40f6-afda-fcaaff81c4b8",k.Vertical_dorm_93="45002a87-483a-4bcc-a1cd-88de4ee2dd97",k.Vertical_dorm_94="6142be54-cd55-4519-a14d-165f4dc6a3ea",k.Vertical_dorm_95="3d289d92-d9d9-439e-9e25-7e7ecd42c756",k.Vertical_dorm_96="5f4c3d9d-3a0a-49c1-9949-449c2e10d0e0",k.Vertical_dorm_97="81c4f5f4-f81d-4430-82c6-6ae746d27092",k.Vertical_dorm_98="387b91e7-9902-429d-842d-c9f068c8b38c",k.Vertical_dorm_99="0832752f-fa01-4c3b-8cf7-164fe0f8c435",k.Video_image_costumes="919a0133-db5c-44eb-8e8e-114d62ed3ce3",k.Video_image_home="acfde347-b861-4145-a49d-e88c36feda03",k.Video_image_member="9dad2fb4-1a18-4f2c-a6ff-b07367e38520",k.Video_image_rifts_back="352c528a-ef80-49ee-b629-f0ff97542b2c",k.Video_image_rifts_icon_keys="b6a8cd5a-b26f-48fe-b92b-e77ab4100d72",k.Video_play="c1825d00-0ced-49a9-abf1-c873d4a5e9dd",k.Vignette_general_map_expert="43b45520-fc4e-4531-aa40-e0ee68c57d61",k.Vignette_general_map_hard="82f5c9f5-b43c-4249-a1ec-f3721e889e60",k.WW_StateChallenge_Game="bfb9a1f9-6d66-4d69-9c00-41f7f8a766e5",k.WW_april_fools_2025_thumbnail="8e971ea0-6889-4242-a582-11d3b30600f5",k.Weekly_challenge_1="34c58806-2ce5-4f2e-aa9b-2e53d6e0b36f",k.Weekly_challenge_2="fdf890a3-057a-49b5-9256-de3269e47ad5",k.Weekly_challenge_shine_backing="7f338ae8-c043-4734-be42-1f7ecf16d250",k.Weekly_challenge_shine_backing_member="6778d26b-1231-4832-9be4-8eefde04a1d8",k.Wheel_of_wonder="4b31ad29-c418-4625-9d57-7b06b3cbaf76",k.Wheel_twilight_icon="bb01e396-cbf0-4078-b212-445c893ed864",k.Wheel_twilight_large="02464262-44a8-42e0-bbbf-ef26b3f6a709",k.Wheel_wonder_icon="13dfd8b0-e3ca-4cc4-a66e-a8b3ced3ebd6",k.Widget_gold_back="51c72f62-a752-4a56-b038-98e079f4f71b",k.Widget_gold_back_bricks="f76742e7-bd29-4c79-a76a-7bba552477c6",k.Widget_gold_divider="d777af4b-db68-4669-aeb0-063c7f848c3a",k.Widget_gold_pile_prize="013f6874-f71f-4b11-a60b-6999804f4bc7",k.Widget_gold_price="86765b15-0362-4c47-add1-a42124bcc1b8",k.Widget_gold_price_left="79ac84dd-a3b2-4db4-8d9e-2c6d95fa96f4",k.Widget_gold_price_mid="5b517dd7-b973-45c0-ac96-a65e50d2b0f0",k.Widget_gold_price_right="b82d4600-62cb-41b1-817f-1df6c5cf8be2",k.Winterfest_launch_modal="842fafd7-c60f-43af-bd39-d49ae395aa9d",k.Winterfest_rewards_01="af9a1f7b-021b-483b-8e6c-7de6fd50a3ea",k.Winterfest_rewards_02="46602525-9c07-49b7-9c19-efea962fc3f3",k.Winterfest_rewards_03="8447b388-b147-4353-a17f-16692152adf5",k.Winterfest_rewards_04="b0f6da2c-46d4-4e0e-9e08-6a531500f4d0",k.Winterfest_rewards_05="56e66928-d290-4ce9-85ac-b9ff8d79df17",k.Winterfest_wizard_watch="09a80e11-4db7-4e52-a37f-de83041ad656",k.Wiz_bank_title="340045b4-cdc3-487d-aaa0-96deebabe71c",k.Wizard_watch_bts2024_teaser="faac7228-8936-4d29-97e3-64d2e96a7a55",k.Wooden_background="545a93c1-285f-4950-a832-63ca191215a6",k.Ww_StateChallenge_5="3c286c9c-1ab5-4439-8e70-03afa6ab71e8",k.Ww_accolades_trailer="887bea12-bc52-494a-a399-bf81c5d80938",k.Ww_bts_dragonisland_2024="913762a9-42b4-4d18-bd4d-20fcb62b465c",k.Ww_cake_set_may_2025="e94f19b1-84d4-464e-aabe-49ec0fa1b82a",k.Ww_charged_levels_200="93fe2f00-9a6a-4634-8534-941aca50707b",k.Ww_content_creator_august_2024="d00b1772-a934-4d4e-a3e7-8e2dc281b302",k.Ww_content_creator_nov_2024="5b943a5e-7753-4c56-8de8-4585741120d8",k.Ww_content_creator_oct_2024="a2e4644c-ee92-45d2-b0c6-e601ab8274ac",k.Ww_content_creator_sept_2024="7a86cd31-b2ad-4e9a-91b7-947240416b6c",k.Ww_crystal_caverns_removal="b6092d6f-1268-4dd2-a297-8c721a2ad57f",k.Ww_dragon_isle_launch="47dcf2b5-2100-49d8-8b0c-2a5456c48149",k.Ww_duck_outfit="b5d934d2-96e1-4d5c-a032-79133d3ffcf4",k.Ww_holiday_challenge_2024="acc77611-a4d8-4664-91c1-719c08ad67ef",k.Ww_liveops_rifts_astral="65e9d0f3-8a0a-43e1-b0f1-13ad30f2ac09",k.Ww_liveops_rifts_ice="a554242f-8367-470e-9821-938c3706d375",k.Ww_liveops_rifts_launch="31143655-2560-4d09-b4c9-32af56271797",k.Ww_liveops_rifts_plant="fc309643-bce9-40ad-ba95-31a82ba0f51b",k.Ww_liveops_rifts_shadow="f1b5b25d-d3a2-4bbe-a687-24ffb3c455d0",k.Ww_liveops_rifts_storm="9d1ff203-b71e-4a6f-a607-47885c3a0b6f",k.Ww_liveops_rifts_water="9aa88ab2-7440-463d-920d-5b76b54cb1a7",k.Ww_new_rifts_sketches1C="a8c898e2-9da7-4876-8d4a-990839b736e3",k.Ww_pet_merge_trailer="072c2ad1-157e-4bf7-ba7d-904ed8c8d6be",k.Ww_pet_merge_trailer_thumbnail="fbc0b60f-e674-4ffd-917b-35212c11a38f",k.Ww_petgear="b0a6ed75-2840-49c4-9738-b2fc31f41c54",k.Ww_pumpkin_end_of_festival_currency="a7338b3f-e1cf-4c8c-b01d-d0bb683240c5",k.Ww_pumpkin_end_of_festival_mailer="e097150c-9efe-42be-b933-ffe1faa631ef",k.Ww_starlight_end_of_festival_currency="323f474a-a01d-4818-94d4-2da1f037d040",k.Ww_starlight_end_of_festival_mailer="696a79a9-f4d9-4e06-8704-7ffce5da3ea1",k.Ww_summerfest_2023="c1640824-bad1-4143-aef5-ca06fbb9df7b",k.Ww_teacher_gift_april_2025="c09b77ec-9549-499e-977d-26a26b832069",k.Ww_teacher_gift_august_2025="969c9b05-fbff-460a-ba54-eb36296fea6f",k.Ww_teacher_gift_december_2024="32ffc932-684d-4c56-9df2-826c5c709f5b",k.Ww_teacher_gift_december_2025="5d4fb53b-451e-47f6-9006-626c37f84ea8",k.Ww_teacher_gift_february_2025="31299ac9-6b3b-45ba-aba0-0c3cf7fdd8d1",k.Ww_teacher_gift_january_2025="20a59f79-bcf8-4435-8c28-e22be9d33ce8",k.Ww_teacher_gift_march_2025="628d0fc6-00cc-4ee2-9671-09acd6d0f896",k.Ww_teacher_gift_may_2025="5295c7ee-f93e-4aa1-ac46-bef119faa252",k.Ww_teacher_gift_november_2024="4408638c-32a3-4479-bc69-f73b5f4ac872",k.Ww_teacher_gift_november_2025="32131d0f-9a2c-4a6c-93d1-36dbd0623155",k.Ww_teacher_gift_october_2024="67cab5ac-de5a-4bef-9faf-a4db2dc02338",k.Ww_teacher_gift_october_2025="985f1997-58ba-48f9-bff4-6b19b4624f34",k.Ww_teacher_gift_september_2025="bb59a890-f3fa-4c47-ab7b-658ea7a9024b",k.Ww_teachers_gift_october_ww="d7996e56-aa66-48c2-96e6-880bd101c8d3",k.Ww_thumbnail_yt="ad3cbafc-69ca-482a-a59f-6abfb9f548ed",k.Ww_thumnail_lucky_outfit="29f649cd-8f02-46a1-90a6-b1a29f8a9c0e",k.Ww_treasure_track_MoonlightDance_2025="9e1ff95d-fc4d-40fb-ba8f-a0686d801ed9",k.Ww_treasure_track_SunkenSecrets_2025="7d2efa5c-e260-4e56-b1a0-aadeb9a3ebc7",k.Ww_treasure_track_frozenfairytale_2024="6ceaac4d-0074-4936-b42d-8e82051cb414",k.Ww_treasure_track_jurassicbbq_2025="bc7ce956-36dc-45b7-bbbc-fdbc6e5ad5dc",k.Ww_treasure_track_magicoin_ultra_member_oct_2024="41778e01-c761-4051-b3dc-1031becfc7d0",k.Ww_treasure_track_skywatchgarden_2025="67a3c12c-90ac-4c91-bb64-d129df4c2137",k.Ww_treasure_track_starry_2025="da1b7617-0d9e-476a-8dad-6ece6cd845f8",k.Ww_tt_frozenfairytale_launch="36d9dd8c-9f51-4ea7-bf9f-494f5a648ff4",k.Ww_wiztober_2024_launch="20be5f3a-f57f-4304-b9ce-f9e5df1ba235",k.Xp_stardust="30b137dc-a6aa-418f-962e-364e0a9a1e8f",k._2xAeros_CurrencyWeekend="ae0ee6e8-2546-477b-b15b-51a69203320d",k._2xAll_CurrencyWeekend="594c2395-310d-4705-91de-8ba86b8eb11b",k._2xFlorians_CurrencyWeekend="aa591044-2139-4287-aa87-818bc00e1b3b",k._2xHotHots_CurrencyWeekend="414d8714-0f19-450d-b5eb-64e4c203ee54",k._2xShivers_CurrencyWeekend="49aa8220-6446-4933-947a-4d289af0add4",k._2xYars_CurrencyWeekend="8500d1f6-4fff-485e-b81d-ea7f071bf6fd"}(F||(F={}))},40671:(k,B,U)=>{"use strict";var F;U.d(B,{z:()=>F}),function(k){k.Elemental_boost_fire_spell="5bbcc44c-5720-41e1-ba71-2effa464effa",k.Elemental_boost_ice_spell="da3aaa9a-6dfa-4ae7-8954-6ce61f25f90c",k.Elemental_boost_physical_spell="afa961f8-0910-4203-98b3-3e69de77af8e",k.Elemental_boost_plant_spell="561fefa3-e6f4-47fb-a2a8-8b0c92a5ac6f",k.Elemental_boost_storm_spell="74449f65-2638-4670-9bc4-b6f1c02fa1df",k.Elemental_boost_water_spell="d36ed671-3746-4244-bb83-2a82f36350e8",k.Spell_astral_roar_single_spell="e192dd7b-1ae1-4b91-bc70-43a6f583a9e4",k.Spell_astral_starbeam_aoe_centered_spell="885d144c-b538-4f2f-a585-3d20a385d5d8",k.Spell_astral_starbitblast_aoe_individual_spell="d87c22d9-bf05-4968-aab8-6f99413caffb",k.Spell_astral_starbitblast_giant_spell="f154e6d5-c162-43de-93a9-c2534a092ced",k.Spell_astral_starbitblast_single_spell="1fafdd06-8c59-4283-b94e-910b61c330e5",k.Spell_fire_charclone_aoe_centered_spell="a6a69fa6-9f56-4b51-8fa9-8e3053a4d67b",k.Spell_fire_fireball_aoe_individual_spell="a1909588-fa2e-4699-9a6b-cfcfea077bb1",k.Spell_fire_fireball_giant_spell="3058d0d3-95d2-4563-8a47-915ca83a622b",k.Spell_fire_fireball_single_spell="0d5c7b56-b0e2-410f-ac84-5dd9079046ec",k.Spell_fire_roar_single_spell="450b5ea8-63db-4dde-83ca-b573fb43da5e",k.Spell_fire_slurpysnack_aoe_spell="667bb5d8-48f5-414e-9731-eecdfc22e623",k.Spell_fire_volcannon_aoe_centered_spell="6d460931-7303-4959-9679-8c63619e70ef",k.Spell_fire_volcannon_aoe_individual_spell="976c7414-85b7-48b6-afde-2ccb52bfabda",k.Spell_fire_volcannon_giant_spell="665df55f-0004-4a23-a970-403b81d67f69",k.Spell_fire_volcannon_single_spell="f7b09db8-0430-42de-a944-71ff3a0abce6",k.Spell_fumble_spell="a50a9f99-eb44-4912-b9e8-8a5ef9386b35",k.Spell_ice_bokcrack_aoe_spell="b8a0da8e-85e4-4a45-90b9-601a47d14fad",k.Spell_ice_chillout_aoe_centered_spell="ae3bcdf6-59e2-4495-860f-501c9400432e",k.Spell_ice_chillout_aoe_individual_spell="ba185370-1a63-43bf-af3e-3d256c24c102",k.Spell_ice_chillout_single_spell="b8326cef-6972-43eb-a555-33e18e3a5777",k.Spell_ice_icicleshard_aoe_individual_spell="dc028f7d-75f8-4906-b078-6b5c81add333",k.Spell_ice_icicleshard_giant_spell="6d5c5c54-5d57-42ff-82aa-09447e6745a4",k.Spell_ice_icicleshard_single_spell="9fc69df0-0fad-4f87-9e66-a2dd6ab45dfd",k.Spell_ice_roar_single_spell="8b313158-2a1f-4072-b61d-2ae8f96ff650",k.Spell_neutral_aoa_aoe_spell="c0f8af45-63da-4aba-bb5e-bc405a366090",k.Spell_neutral_heal_aoe_individual_spell="83ea47bf-5033-4f39-8b87-1c717e96585f",k.Spell_neutral_heal_single_spell="b798d1ac-68a8-42e0-ae9b-0b7d6e0779f5",k.Spell_neutral_nootrevive_aoe_spell="501d41e5-2efb-4576-af3f-0a9cdc9c8bd5",k.Spell_neutral_rescue_single_spell="dd50c820-a96b-4725-8e0d-78723d179d1c",k.Spell_physical_blunt_aoe_individual_spell="794416ec-b96c-4528-8078-a5f8d8859526",k.Spell_physical_blunt_giant_spell="9396e920-5ab2-494b-9aa2-7d088b3ae8a3",k.Spell_physical_blunt_single_spell="7d19ab90-8c76-4753-8973-e7dc6570e7d7",k.Spell_physical_pierce_aoe_individual_spell="866f0251-188a-4d98-a12f-59bd09cf18de",k.Spell_physical_pierce_giant_spell="e052dbf0-ff21-4879-8401-b4c7a3801839",k.Spell_physical_pierce_single_spell="4e349303-34c7-467a-91fe-7e2fe9b0d6f1",k.Spell_physical_piercingvolley_aoe_centered_spell="96f0094b-c481-4d93-b41e-7cc5adedb770",k.Spell_physical_roar_single_spell="b99c3b17-7c4b-4acc-b5ad-80f231bedb90",k.Spell_physical_slash_aoe_individual_spell="a41733ba-6531-491b-88bf-15dfcd94e0f9",k.Spell_physical_slash_giant_spell="44dc8d16-17b3-4f25-b0f3-9433e7526275",k.Spell_physical_slash_single_spell="2f81ed22-7176-4393-94a6-5826ebff84bc",k.Spell_plant_florasfury_aoe_spell="0ba749c1-0c1c-4e0f-ae85-94661f0b075a",k.Spell_plant_forestshurricane_aoe_centered_spell="da58c5a2-c69f-4003-8d1b-e4a4f351ab1d",k.Spell_plant_forestshurricane_aoe_individual_spell="946494ca-87bf-4905-9007-9e13f456cf97",k.Spell_plant_forestshurricane_single_spell="15aa963e-6abb-49ad-b9fd-e0bd3a32e032",k.Spell_plant_leafswarm_aoe_individual_spell="d88176c5-816e-429a-8895-4bd488d020b4",k.Spell_plant_leafswarm_giant_spell="1bbadb3b-529f-43ed-bc4e-86b305cfa459",k.Spell_plant_leafswarm_single_spell="fc8b7c65-774b-4038-9a8a-ec75d00f4064",k.Spell_plant_roar_single_spell="08ee90b7-baa1-4d77-a637-36593e9dbfef",k.Spell_shadow_crystalcrash_aoe_spell="19569d20-bfaa-45c3-86fe-e39432153271",k.Spell_shadow_darkpourtal_aoe_centered_spell="093d2ca6-b00a-42d1-aacb-e0cb3c805498",k.Spell_shadow_darkpourtal_aoe_individual_spell="1ef54c51-57e1-44bd-8e03-88157a47cbae",k.Spell_shadow_darkpourtal_single_spell="6bf09377-4569-4c6e-b2af-5fef84fdde13",k.Spell_shadow_darktwister_aoe_individual_spell="30cb3c5e-7141-48a0-b384-75cab3504c25",k.Spell_shadow_darktwister_single_spell="7ae5cfa7-8700-4bf7-b5e5-08a862b3ecfb",k.Spell_shadow_grimburst_aoe_individual_spell="2c29d85f-ca51-42f5-b586-c69b23aa0a10",k.Spell_shadow_grimburst_single_spell="91b9be57-da56-45e4-8115-3ae3ff62432a",k.Spell_shadow_kidnap_single_spell="420e2ffe-9c85-453d-bdf3-c6b27e3483d7",k.Spell_shadow_nova_aoe_spell="4f36fae1-545d-4d31-894b-c91d5c719af9",k.Spell_shadow_phantomscall_single_spell="373f9feb-480b-473d-a04b-3104f5827c3c",k.Spell_shadow_roar_single_spell="bcd82f80-62cd-460d-891b-995b6108f6c2",k.Spell_shadow_shadowdrain_single_spell="d78f44a5-78f9-4a52-a040-83b48cbb7193",k.Spell_shadow_shadowshock_aoe_individual_spell="1ac4463d-0aef-4bc2-820e-723d6b2d9ec2",k.Spell_shadow_shadowshock_giant_spell="c136c280-f165-4942-acb5-e83fb88fe2d5",k.Spell_shadow_shadowshock_single_spell="b497caa5-6b0b-42ba-8cf3-6b5992d7e275",k.Spell_shadow_shadowsurge_aoe_centered_spell="dba024eb-70a2-4468-828d-21daf700731e",k.Spell_shadow_spikestrike_single_spell="bf8025f2-af70-4162-8376-642649aac4e6",k.Spell_shadow_yetismash_aoe_individual_spell="7644193c-9553-465b-a44c-c1a7d15337dc",k.Spell_storm_bennicrack_aoe_spell="6b052295-b165-4dbc-adc1-1b4c7bdecee7",k.Spell_storm_broccocrack_aoe_spell="1f2d228f-d7c4-434b-824c-8b362c98c567",k.Spell_storm_ioncannon_aoe_centered_spell="5b050ee8-65b8-4801-8478-a2cd4c66b6de",k.Spell_storm_ioncannon_aoe_individual_spell="c1236b7a-c630-4586-8ee1-45a6c5cf2b99",k.Spell_storm_ioncannon_single_spell="94ce657f-08af-4844-99f1-63a0b7682a9a",k.Spell_storm_roar_single_spell="9cd9a22b-84a3-4966-9041-899d850ed39a",k.Spell_storm_sparksphere_aoe_individual_spell="da961641-11cb-47f8-b5b4-4963a91a48d8",k.Spell_storm_sparksphere_giant_spell="8553e321-4a07-42d2-888b-d8cbfa7efd0b",k.Spell_storm_sparksphere_single_spell="6174afe9-1236-458a-b5cc-561c062e58b5",k.Spell_water_bubblesmackdown_aoe_individual_spell="58e6955b-d927-4a51-8af7-08cfdaffa839",k.Spell_water_bubblesmackdown_single_spell="8921c962-3415-4a45-8e5b-c2438c8fff1e",k.Spell_water_downpourtal_aoe_centered_spell="15085252-9b5a-4db2-80c5-f68f6d727978",k.Spell_water_downpourtal_aoe_individual_spell="f3a9466e-a8ad-4339-a0cb-11a4b52bef22",k.Spell_water_downpourtal_single_spell="a1d41abc-7e22-4c81-a24b-0ec71e54ead4",k.Spell_water_evereinvigorate_aoe_spell="a4740f29-a5ba-4ab5-a9f5-7399afd53f35",k.Spell_water_roar_single_spell="90b18ab9-e197-4992-8d92-9b84a1afee9a",k.Spell_water_waterburst_aoe_individual_spell="7079bb4d-cf8b-463a-a81a-641cf4562197",k.Spell_water_waterburst_giant_spell="d35b5322-ee84-4db4-ac36-82451d84b486",k.Spell_water_waterburst_single_spell="bb3d88ab-3512-4666-ab09-71a7d9c5c0e2",k.Status_effect_DOT_astral_apply_spell="540bfa68-ec34-486f-9c80-390ae7253445",k.Status_effect_DOT_fire_apply_spell="0128a7c9-5524-4c5c-8758-62e82196f6a7",k.Status_effect_DOT_ice_apply_spell="96234675-d098-4839-a60e-5f5c623c83d1",k.Status_effect_DOT_plant_apply_spell="45e779d0-9d0e-4309-b37f-ed8b1a4cd590",k.Status_effect_DOT_shadow_apply_spell="c3bc95db-5945-4b24-af2f-508817e3d54f",k.Status_effect_DOT_storm_apply_spell="ce99bf0a-41fb-4223-902b-b6c72749c93b",k.Status_effect_DOT_water_apply_spell="cc8d7e93-10db-403f-86d0-1edd088f9f22",k.Status_effect_bomb_astral_apply_spell="0efb1a0c-9662-4bc7-99a9-68b66a2c1ea9",k.Status_effect_bomb_astral_trigger_spell="8128fc7e-a127-4f59-b774-18be39f63ea4",k.Status_effect_bomb_fire_apply_spell="87dc5f6f-f04a-44f2-ba16-bb55ca7399a5",k.Status_effect_bomb_fire_trigger_spell="8408d92f-6aef-4e9e-99c6-4f336ee3904a",k.Status_effect_bomb_ice_apply_spell="a714fd55-c211-48a2-baa2-4f1a1c373d86",k.Status_effect_bomb_ice_trigger_spell="4887dcc2-4fe7-4686-b317-f530c2d3772f",k.Status_effect_bomb_plant_apply_spell="13672321-ceaf-4c38-adfe-b914add31039",k.Status_effect_bomb_plant_trigger_spell="e2e14ff7-f2fd-45f3-a731-f2e4bed2a332",k.Status_effect_bomb_shadow_apply_spell="5a369764-6a13-441d-8822-d5f7185e265d",k.Status_effect_bomb_shadow_trigger_spell="3e5392ad-f878-414c-b72e-b0e72313d23a",k.Status_effect_bomb_storm_apply_spell="91d02d77-d48e-4989-80b4-57ff1975c090",k.Status_effect_bomb_storm_trigger_spell="7bf3ef8f-db0b-4218-b76e-055ef4963c65",k.Status_effect_bomb_water_apply_spell="19016b3b-ad8d-4bf6-aa2c-d418629eb39d",k.Status_effect_bomb_water_trigger_spell="a9f74422-8857-4118-ade5-b48718332004",k.Status_effect_buff_apply_spell="da139c19-1214-4176-b393-f8c889390a9d",k.Status_effect_buff_defense_up_apply_spell="29f02217-46ab-4e0b-b0fd-4a13fcd69913",k.Status_effect_buff_dodge_up_apply_spell="eeaa22c1-8bda-4b9f-8c41-bcdfa562f2b3",k.Status_effect_buff_power_up_apply_spell="cde4f01e-1760-44b4-874c-6a4ad9b6b597",k.Status_effect_buff_regen_apply_spell="ea4493fe-e19e-442c-b9d6-7e078727f2b8",k.Status_effect_buff_sustain_spell="5f052ed7-0516-4f76-bfe0-7721ad2869b8",k.Status_effect_burn_apply_spell="6e958385-90a2-4988-b43d-dfe90229d433",k.Status_effect_burn_sustain_spell="1bcc50f9-922c-4fe8-ab2b-64dcc627c18f",k.Status_effect_cleanse_apply_large_spell="2320ccbe-4abc-471f-8aaf-190a7208699d",k.Status_effect_cleanse_apply_spell="7bfa3569-e780-4e7b-bd1b-1a267263459b",k.Status_effect_confuse_apply_spell="386d7dbb-acfa-4da2-9bb9-c053ed6e5ec0",k.Status_effect_confuse_sustain_spell="2a89835d-109f-45d6-80cb-a6a22ededbab",k.Status_effect_debuff_apply_spell="99796020-0b23-4b15-a0f4-3fa0ce40c112",k.Status_effect_debuff_defense_down_apply_spell="e83c14bf-01ae-4e5f-84ac-83331b07a3cc",k.Status_effect_debuff_dodge_down_apply_spell="8bc75313-e76a-4040-b180-c9b132047c66",k.Status_effect_debuff_power_down_apply_spell="b1ce7a8a-249a-4922-9eae-ccfc033488c7",k.Status_effect_debuff_sustain_spell="04bc4eb4-e53a-417a-921f-fafc7efbc0e8",k.Status_effect_drain_crit_damage_apply_spell="27f0571f-0e01-4766-8213-559b7f7a6cda",k.Status_effect_drain_defence_apply_spell="f0d4841b-4f22-4f71-9593-ae320fb3c204",k.Status_effect_drain_dodge_apply_spell="ba92fa55-bf9c-4837-b885-eeb5ee482e9f",k.Status_effect_drain_luck_apply_spell="88aaccb2-564d-446b-b835-76a9a42a97aa",k.Status_effect_drain_power_apply_spell="d359a6e8-e906-43e9-8476-7a2374209cc5",k.Status_effect_frozen_apply_spell="632a1acc-3df5-4acd-97f0-66d5289c1491",k.Status_effect_frozen_release_spell="c05cc4aa-4dc0-411d-8386-c3e39aaccf59",k.Status_effect_gift_astral_apply_spell="271e3524-d3b4-4377-999f-70e2bfa9138a",k.Status_effect_gift_fire_apply_spell="5747a15b-7a86-4bf8-bd95-7eaedcea34c4",k.Status_effect_gift_ice_apply_spell="236f62c1-cb68-45ce-91d1-a908b2ded738",k.Status_effect_gift_plant_apply_spell="893c52b1-e1ff-4054-948d-5e87c6cfb1be",k.Status_effect_gift_shadow_apply_spell="4db64d03-12b2-42bd-9dcf-67a4dbeaedac",k.Status_effect_gift_storm_apply_spell="d284483c-90cb-491a-954d-9a391757ef66",k.Status_effect_gift_water_apply_spell="a224e219-c81e-484f-9fe5-c138b7535b0e",k.Status_effect_heal_apply_large_spell="e076407f-9a40-4c71-9989-334e249cc285",k.Status_effect_heal_apply_spell="9c810416-2d76-4e26-8eb6-7e07fa84847c",k.Status_effect_heal_sustain_spell="d0dd8443-2fe5-464b-8ef7-7d16ee639a20",k.Status_effect_shock_apply_spell="65c7292e-f03a-46c3-a06d-cfeb2fadd668",k.Status_effect_shock_sustain_spell="080bb8e4-e5c6-44d5-9ae9-dcb7f6862173",k.Status_effect_taunt_apply_spell="485218f6-73c4-4a28-ab99-b3ef0a47c9a9",k.Status_effect_taunt_sustain_spell="dc96dcba-aa6c-451b-bf5d-27ad138590b8"}(F||(F={}))},56942:(k,B,U)=>{"use strict";var F;U.d(B,{Q:()=>F}),function(k){k.Bomb_effect_astral_json="f79e6354-4a0d-40ac-afc2-1a8509dc275d",k.Bomb_effect_fire_json="83b8c22c-b2f1-4832-9cd8-74872cc894da",k.Bomb_effect_ice_json="a191cb15-90d0-4790-8fe9-d4cb97eda293",k.Bomb_effect_plant_json="ed1c4e0a-7541-487f-92ba-290f39ba2d54",k.Bomb_effect_shadow_json="bcb857b0-6aae-46d7-abc0-3a6f99fd48bd",k.Bomb_effect_storm_json="03e13363-9c6c-475e-91b0-c6b7367b809d",k.Bomb_effect_water_json="c58222ab-9543-4aed-b61a-474f44e71480",k.Complete_badge_bounce_json="9883fa9b-a115-4a44-b51a-8cac39021661",k.Default_boss_01_json="6641bd0d-4885-4e85-9a20-e6cafadd4883",k.Default_boss_02_json="1966e939-2cbd-41eb-abe8-42c4ce4f9cc4",k.Default_boss_12_json="81158eaf-bf57-495d-a0c3-6678804b8a56",k.Default_boss_13_json="d97dc42a-26ff-490f-9b46-7f74a7424db0",k.Default_boss_15_json="c63e5eed-61aa-49a9-9db3-b4aefa07ff9d",k.Default_boss_16_json="ba559492-71ec-487b-b495-0379e36d8d08",k.Default_boss_17_json="8aa6d5d5-e39c-40ae-9c38-dca8d7e955e7",k.Default_boss_18_json="9f0d7322-6d15-41a3-b225-858fa0f8a4bd",k.Default_boss_19_json="e3fc8115-b84f-4181-9eb1-b2270b4c7902",k.Default_boss_20_json="7d5ce573-9c2d-4f0e-aa4b-073769e18fac",k.Default_boss_29_json="10983823-f156-40c9-a4d3-4d2619e2b0c8",k.Default_boss_30_json="444b3bf8-0dc6-47a5-92bc-7bd1daf1b53d",k.Default_follow_10_json="9d6a6657-4aec-4d2d-993f-ddde651fce44",k.Default_follow_11_json="685e27aa-3ef9-4429-afe1-5ab401ab0aae",k.Default_follow_130_json="d77761c5-8c40-47b1-be3a-64d836bcf819",k.Default_follow_131_json="faadfb50-8060-4942-ad8e-a55a2eea9149",k.Default_follow_132_json="ab970d4e-8c8d-4aa8-88bd-1c9ed7ca824f",k.Default_follow_133_json="319921ec-a111-4ff4-92fe-93b3973284df",k.Default_follow_138_json="0f372293-26b7-4ca2-9a92-16d22614542b",k.Default_follow_139_json="fe775569-5be5-4c3b-897e-4713849ac493",k.Default_follow_140_json="6b894787-24da-47b9-b5a9-c4e64e2dd276",k.Default_follow_141_json="a0ca8055-8dae-42a7-b32a-35e73dce0cbf",k.Default_follow_142_json="6ee0e017-8b33-40ff-8b1f-8fd6f4c2b7b4",k.Default_follow_143_json="c715d2c3-553d-467b-8276-88d3a2bbbea8",k.Default_follow_144_json="c5f13da1-4d4c-4ef2-873e-b3aa0d4c3bbe",k.Default_follow_145_json="a88476bb-f551-4d26-ae10-fcf1b21f1547",k.Default_follow_146_json="8013c9f2-fe15-4bb6-bb5a-5e8aa4295117",k.Default_follow_147_json="5def7c69-2437-44fa-b23b-a57e6eb9655b",k.Default_follow_148_json="74d49feb-5622-4a4c-88a2-f75edeaf3976",k.Default_follow_149_json="e2c44f6a-0829-4453-b992-58db361ad4a8",k.Default_follow_150_json="3803d2a3-7eac-4a04-b1bd-a61ee0cf3140",k.Default_follow_151_json="6f416453-ab40-479e-b342-9b33a58ca354",k.Default_follow_152_json="ebe14e48-a974-4374-aa9c-19a07bc069f8",k.Default_follow_153_json="956b991e-a9df-42fa-937a-f08a29cab226",k.Default_follow_154_json="ef3ba4ef-0c18-472b-bc27-0c582f590f2e",k.Default_follow_155_json="3395c09d-6352-46d9-ae1b-43e0cc81f776",k.Default_follow_156_json="bf055f0c-95be-481a-b2cd-59ad54cbb6ac",k.Default_follow_157_json="7fd800f7-765f-4cf8-8ec6-2f6a3062416a",k.Default_follow_158_json="2c74f8b2-9b10-4bdd-bb81-287a0193b086",k.Default_follow_161_json="67dc9c14-e923-49d8-9efc-ccdbd863ed1c",k.Default_follow_162_json="821d412b-bc15-4469-9127-771c7b5eb00b",k.Default_follow_163_json="82e7a172-e029-4092-b56f-06084fb75643",k.Default_follow_164_json="a8911d7d-dc04-47f5-80a6-57f7e2fe9346",k.Default_follow_165_json="5cef885a-b3e9-41cc-92df-fd0ae8033fe8",k.Default_follow_166_json="2264bd98-1d90-4406-9848-7437bba96d96",k.Default_follow_167_json="9c9e2e48-a449-4646-8af1-b20b32d157e5",k.Default_follow_168_json="da0dd9d6-623d-407b-8893-b2bd0817279a",k.Default_follow_169_json="d50fa489-e4ae-4d54-bba7-0420468b8ee2",k.Default_follow_170_json="436e517a-b278-429d-aadc-0919845fcd82",k.Default_follow_171_json="b3316f24-27c4-4619-b7e0-7924a6bc9c74",k.Default_follow_172_json="81c8c12d-7e43-4469-b187-8476140a9010",k.Default_follow_173_json="facb1a11-7204-4899-a020-421f9f993102",k.Default_follow_174_json="6d5f7fac-666e-4b1d-9064-12d8687d3dbe",k.Default_follow_175_json="05d716a4-bfe6-4d86-a03f-49358962fff2",k.Default_follow_179_json="f5a13809-8934-4285-989f-56371fd6b8e9",k.Default_follow_181_json="1a888673-3f09-4493-893f-f9c81fa7ed4c",k.Default_follow_182_json="31516f8b-fd55-4f91-8184-c76f33689723",k.Default_follow_183_json="73d9fce6-26bf-444d-8791-b48c60dd80c5",k.Default_follow_184_json="3986d3c2-288c-414f-bda6-1b0319db6964",k.Default_follow_185_json="2617660a-a46b-4586-961c-354b2219cb36",k.Default_follow_186_json="0b5c3792-f709-4d1e-b118-9747585d15ad",k.Default_follow_187_json="d4f6ec08-e352-4d8d-a07a-8b2c3caaf30e",k.Default_follow_188_json="089993f6-17e0-4b18-a3b7-46c3a6c916c8",k.Default_follow_189_json="e7c7a049-427e-41b8-a2af-89b059494b6f",k.Default_follow_190_json="3f92de11-eebd-4f0d-a85e-2ca259384c2e",k.Default_follow_191_json="c63e0d92-5e24-4465-bd34-a8f539cb2d2d",k.Default_follow_192_json="5b24afc6-d3b3-41c5-aeac-7ffbc4ff0068",k.Default_follow_193_json="21fee41e-1718-4c2f-9e89-e68f38be2671",k.Default_follow_194_json="cf86409c-50ca-46d1-b2af-0f120ad4ccde",k.Default_follow_195_json="7e65c08f-0b67-4c63-a396-3a78d9411268",k.Default_follow_196_json="5a3c9b69-f34c-4225-b5ba-bb3a27f4ceb0",k.Default_follow_197_json="a9e5982c-d0a9-49ed-923d-eb145d994a88",k.Default_follow_198_json="14dd21e6-ff12-46e2-8050-374b2e476d8a",k.Default_follow_199_json="eb867431-4414-4729-9f01-0d731bd8f0c6",k.Default_follow_200_json="2409e805-8189-4323-9612-b602bd7327c5",k.Default_follow_201_json="4375dcfa-5852-4528-b7ce-d9fb129899ef",k.Default_follow_202_json="4ba163f1-16a1-4e26-b467-0cd9b7493c81",k.Default_follow_203_json="ce7eaea6-6275-48e2-a4b3-7563e9acd9fb",k.Default_follow_204_json="1055dbf9-ad80-41f2-abaa-5b24dc442fb6",k.Default_follow_205_json="14b043d1-bd31-414a-897f-f128052b83d5",k.Default_follow_206_json="012acfb8-9d0c-45f8-ab16-6d4d1c595ad6",k.Default_follow_207_json="13cb1dc2-0094-4abe-81dd-30ce177b0885",k.Default_follow_208_json="58f3bae9-d3de-4265-bcdc-7a4ee5053f0e",k.Default_follow_209_json="e9d75a8d-f2c5-4cf2-8017-e867d8d825c4",k.Default_follow_210_json="bf7b2a12-52fc-48dc-897a-58ffad5aae8e",k.Default_follow_212_json="7a710b0a-a905-4e41-a1bc-79b851e57725",k.Default_follow_213_json="dbf6b502-980c-4339-9fd8-a6b55aa8bde4",k.Default_follow_214_json="a931f88d-bd54-4532-bab9-c2f2444ef93c",k.Default_follow_215_json="bb56d5f6-c19b-4613-917f-c73885cca1d5",k.Default_follow_216_json="21c935c4-9233-4187-b83e-c268b9fd1369",k.Default_follow_218_json="d2c1c116-c13a-46f1-b124-bbf1430512f2",k.Default_follow_219_json="16b551d1-36f0-4146-9bb9-3d6730113ab8",k.Default_follow_221_json="505287e3-06b5-4643-b52a-916979ae051c",k.Default_follow_223_json="1da43ad8-ea99-4303-a0e1-1b43bb8ef634",k.Default_follow_224_json="ab7402cc-8307-4cb5-be3f-3eab246b01c5",k.Default_follow_225_json="200daa22-f9fd-4e78-8b1a-5d7cba4bbfe7",k.Default_follow_226_json="c5e2fd13-bea2-4e5b-808a-f94c864d24a9",k.Default_follow_227_json="f11aca4f-e74a-488b-a19e-562e0d84c4cf",k.Default_follow_228_json="a3fa03e0-ee78-46a2-abe0-994aa2d1f623",k.Default_follow_229_json="0a76db91-4e9f-4341-b6c5-20d8f41ebce8",k.Default_follow_231_json="0c4a84e7-4dd0-47db-8848-589a01604aca",k.Default_follow_232_json="ba45ec16-7b46-49ce-84b3-7e562e828cca",k.Default_follow_234_json="17cda462-6245-4f82-91ca-361a62b6466d",k.Default_follow_235_json="314f51de-af45-4902-a0ca-dd8a95ca7bbe",k.Default_follow_236_json="5aa88ad6-3c10-427e-aacb-03816a2b3a37",k.Default_follow_237_json="0d011df6-0779-4a49-b224-62c94b682722",k.Default_follow_238_json="3f64e268-1912-4f74-acc7-d28deca57963",k.Default_follow_239_json="edfe5ed4-2527-4300-ae8e-312ac4275b23",k.Default_follow_23_json="431b6872-b460-490f-9760-c15e5971c9ea",k.Default_follow_240_json="1165bc40-4f57-473b-8a07-707fb1575022",k.Default_follow_243_json="9947a713-76c0-41e2-a13f-a9bb08012d41",k.Default_follow_244_json="f080c9fe-7c93-4db3-b93f-13775f3238f4",k.Default_follow_245_json="04f8fd38-8e5d-44cd-9446-5b9f343ecdab",k.Default_follow_246_json="614a2593-e427-4cb7-b311-e960fd417495",k.Default_follow_248_json="f431cb42-f275-4791-ab44-647f3169cef0",k.Default_follow_249_json="f4f17e9c-3372-4377-bb53-02ee226f7e9c",k.Default_follow_24_json="15ccda48-b8a7-438c-a814-72e98b38133e",k.Default_follow_250_json="14775416-3e8c-4207-a847-adce48793504",k.Default_follow_255_json="2d7202a7-935f-428a-8d6d-4b58113f411b",k.Default_follow_256_json="46831a0f-f62e-41a7-b363-c0c5bc004bb3",k.Default_follow_25_json="6d373933-fc6c-4806-a668-03bdc99f5ba9",k.Default_follow_261_json="37082550-6911-49a4-9486-6d5ae03a72ae",k.Default_follow_267_json="46bc2852-e0af-42fe-9392-ac4464d3ae90",k.Default_follow_268_json="acd9b994-2b73-41e4-bfef-09f8874654fd",k.Default_follow_26_json="8b217448-7a21-4c29-9703-642552108f10",k.Default_follow_272_json="bebdc381-2608-468d-a6fb-07f587b1fc8f",k.Default_follow_273_json="3ebe19ba-923c-485d-99df-384aed74b967",k.Default_follow_274_json="6e67a026-e550-44b4-8f87-341579cd6f2e",k.Default_follow_275_json="df7b8352-b38b-4518-a511-e403b0e96d65",k.Default_follow_280_json="87adb678-8e05-4546-8c61-483c1a035850",k.Default_follow_282_json="28d5d2dc-17c6-4ace-b973-016c90f7dc15",k.Default_follow_283_json="1933923f-3578-486d-880c-91a8e3068357",k.Default_follow_284_json="1d7d2e6d-b4f4-4f6f-8f94-6026494c2d5e",k.Default_follow_285_json="a7c1e7bc-4001-4946-a862-7ebfa5d96c50",k.Default_follow_286_json="1c55e6d2-ced1-4b3e-8f88-f0c3183795ba",k.Default_follow_287_json="4e52f4d2-8620-4293-902b-304a1e387ac2",k.Default_follow_288_json="9bde4d09-c8f8-4d27-acc0-25e4b7ed2c63",k.Default_follow_289_json="7068fcb5-453d-4d6e-961e-ac17c629d3e2",k.Default_follow_28_json="38412256-86af-47e9-83f7-1442c56f9e27",k.Default_follow_290_json="c1e9c559-9138-484a-b736-a0c575835c42",k.Default_follow_292_json="f395611d-7b71-42a2-99ba-576b06127f59",k.Default_follow_293_json="074ec936-d950-4c1f-a2b5-c0ebde422aea",k.Default_follow_294_json="8f0df3d6-e8bb-4ccf-afbe-fec513ca3504",k.Default_follow_295_json="ed3334fd-be0b-450c-936b-a9b6f6540c4e",k.Default_follow_296_json="20f86486-8f52-4adb-a1a4-365e60bff751",k.Default_follow_297_json="4ca6f7db-520e-4e9d-8cbb-6bc5d4997886",k.Default_follow_298_json="73951032-2b84-42f0-991f-541ed1787b3f",k.Default_follow_299_json="807f9a65-4c96-45dc-a9f5-50d04f4efe32",k.Default_follow_29_json="e5cddbca-9b79-4237-a7ec-ec975f9a8000",k.Default_follow_2_json="6ec07a84-5b46-4281-b4b2-155085069b6c",k.Default_follow_300_json="f348efbc-24e3-4695-9dc6-e470cfd31aca",k.Default_follow_301_json="d9a72147-70a1-4d52-835a-e128c400dcb8",k.Default_follow_302_json="989b5d8a-69b1-4c5a-b829-99e1607ce4c6",k.Default_follow_303_json="7d33f083-6426-4dd9-a1f6-ba8e436088d9",k.Default_follow_304_json="bd1cc115-16a1-4198-a44c-486238ea8f2d",k.Default_follow_305_json="a0dcf86c-89d8-4ef7-b98b-55a60430218a",k.Default_follow_306_json="e171eb5f-4a1b-46ec-bb3f-66ae0f782370",k.Default_follow_307_json="832ab3a5-c4a7-4c85-8bcf-9d77791f8b53",k.Default_follow_308_json="7e6e73a5-8562-4c68-a7f2-304c9aae3bdc",k.Default_follow_30_json="89791950-954d-4e88-8150-c17deec21b09",k.Default_follow_310_json="fbb2f47d-1c4a-4c79-9ba5-7ba2e4e7052d",k.Default_follow_311_json="c7d830e2-c253-4d37-bbdb-5959553a8441",k.Default_follow_312_json="210b80b4-6636-47c8-87b6-4771e823cf88",k.Default_follow_313_json="b08d0e7d-fc93-477a-8d71-e218bed5a0d7",k.Default_follow_314_json="183beb26-f44f-4ce7-a570-9b201d7590b0",k.Default_follow_316_json="ad9de204-0da8-48a5-8ac0-1e98951ef2c2",k.Default_follow_317_json="610c138c-2d09-4cd7-b52c-397e73eefd11",k.Default_follow_318_json="910d63f8-70b1-4c77-8957-c4cefaa0e1d4",k.Default_follow_319_json="861d8331-0467-4eef-98f8-f3aa0f2a09ba",k.Default_follow_31_json="b6066e74-f44c-42b3-9478-26c713d6ae32",k.Default_follow_320_json="fc165dc2-13e5-42af-8c7d-7962272f66e3",k.Default_follow_321_json="b212ec78-d66f-46fe-880a-71c3a866f6a7",k.Default_follow_322_json="b8ec147e-0a2c-4126-9389-7d8335adeafd",k.Default_follow_323_json="6aeadad1-6845-411a-b212-20bcbe5415dd",k.Default_follow_324_json="458a95be-ca8e-4c13-a0b8-0b10934e8f72",k.Default_follow_325_json="506353d7-fa18-4dbd-aaf7-5a068ec0886f",k.Default_follow_326_json="9b026670-bba1-4612-b52e-cd7a6ea59e79",k.Default_follow_327_json="dad931e7-d377-4d1d-ba3d-d2282f36622f",k.Default_follow_32_json="c027dd0e-1ab0-461e-b7cd-2e5f14fe0b43",k.Default_follow_336_json="4d5f4828-3fad-4f78-ad67-0f24a57aa0f4",k.Default_follow_337_json="70be8da4-70a6-4b73-84e7-222be432314b",k.Default_follow_338_json="6e186191-6729-4603-ae53-9bec9884c076",k.Default_follow_339_json="cb763b15-fa09-4689-9cd9-7730bc995472",k.Default_follow_33_json="697bd7a2-fe0c-445f-97c9-b52de1934d29",k.Default_follow_340_json="41c958ed-d23f-4be0-b0b2-643a9c28680a",k.Default_follow_341_json="5a574a22-e44a-414d-91f7-d6757b6c6011",k.Default_follow_342_json="a759c57d-b4be-4543-85bf-02768e7d101c",k.Default_follow_34_json="fb106cc6-ab99-4bfe-867c-77c6ce615920",k.Default_follow_36_json="e0490254-4ef2-4bf5-97c7-73ab24943bdc",k.Default_follow_37_json="f67eddf2-2372-45b7-988e-55c6e85b8ef8",k.Default_follow_3_json="742cc114-f459-43ab-8c36-8bdda3b935c0",k.Default_follow_4_json="bd3499c4-24e3-4b79-a23b-2ddca680e41b",k.Default_follow_5_json="7ac79e67-c6d5-48dc-b146-1747da08f306",k.Default_follow_6_json="e2af56e2-4226-40c5-abd5-43bafac28471",k.Default_follow_7_json="4353a799-36b7-454d-9682-f1f85e3fe650",k.Default_follow_8_json="e8ac9e3e-9c60-4fe7-a47c-3dc23681f65f",k.Default_follow_9_json="547ccda6-f17b-419e-8e97-c35dd163e658",k.Default_titan_2_json="470f7170-7cec-4362-9820-c385249f1b79",k.Default_titan_3_json="01e799f0-3426-4e26-ae5d-ac4fc550a298",k.Default_titan_5_json="7a9abdee-235e-4828-9446-62121596a965",k.Default_titan_6_json="f7a51671-f150-4600-a315-c524aaed246a",k.Default_titan_8_json="9dccef03-69f1-4d43-bf59-1ed4c5fe5dcc",k.Defense_down_json="c12e6d1c-c193-445a-a821-0e3fddfa2ee6",k.Defense_up_json="3c7157c2-50a7-4ae6-b0b0-6cafada14417",k.Dodge_down_json="ca8c56c3-480a-4d49-8750-31be7aa73e27",k.Dodge_up_json="fe9e9444-2d4e-4281-8d4d-6a8d1d760a64",k.Fire_boss_18_json="788fbdea-721d-4aac-be6a-d47912e3c9df",k.Horizontal_dorm_151_json="66c741e4-4cfb-4507-af4d-0f393872ae63",k.Horizontal_dorm_164_json="d4a629c7-3fe8-4659-af60-942df2b114e3",k.Horizontal_dorm_202_json="03bcbc59-6c2e-469a-a794-21b28f957289",k.Horizontal_dorm_204_json="ee8efad4-5a1c-4e23-9c1c-773c2be4906c",k.Horizontal_dorm_206_json="6bbf21af-6add-428e-ba23-686abcad4ab7",k.Horizontal_dorm_242_json="c1f8b0ea-6f57-4de2-8250-560d8100f37f",k.Horizontal_dorm_251_json="b9bf90f7-8031-43e0-a0b6-f06ec7eddb1c",k.Horizontal_dorm_254_json="f8153816-dc7e-43b8-a293-b087e6411e68",k.Ice_boss_18_json="06bb221f-7d00-491c-99fc-db5407a5ccb7",k.Lootbag_widget_json="93245de8-14b4-4d6b-9d52-089b46beeb8c",k.Math_streak_widget_json="88fa5114-4166-4103-8554-6f662a502199",k.Merge_01_json="b498bc36-e523-4621-a534-7a3443d6b033",k.Merge_badge_shine_one_json="dbccfac6-8342-41fd-bc24-b846bd124977",k.Merge_fx_json="26b93228-86bc-4931-b4e2-f97e6cb3e77a",k.Merge_green_energy_json="bb1a0a7e-a275-44c4-86da-85c12864bd63",k.Micro_cube_json="97854ff8-5a10-4480-aed2-b94755a45c66",k.Mythics_tab_portrait_bloom_json="eaf3000a-003a-42ab-8552-450f350e8777",k.Npc_harvey_json="00208e38-f979-4e35-83fe-7ca795108a8f",k.Npc_sir_vey_json="b1819a81-3ba2-4adf-a793-59f54a6c0c06",k.Parent_attach_membership_ad_json="b65de452-7367-445b-936f-20f3ac2b5776",k.Parent_attach_ticket_json="b961a979-b87a-4f69-b178-985c6b409122",k.Pet_glow_rescue_json="fb561fa1-93f5-437b-8dd1-4aeccef988ef",k.Plant_boss_18_json="3636c520-643b-404c-84f6-8dd2b48ea0d4",k.Player_raster_json="50aadd37-b1e0-4efc-978f-e57467c9123d",k.Player_raster_upscaled_json="37715ae1-b2eb-45bb-83b7-8df8abee1e79",k.Power_down_json="0a434d30-526a-4e4f-ba33-ca3b41199b8f",k.Power_up_json="c5d053bd-a84e-45c7-8780-6bc749d80e11",k.Rarity_level_fx_json="ecd48633-08bf-49e8-b84f-2b055b7d05c8",k.Read_to_Merge_1="473a0ddc-73b3-44d8-83c5-4a6b85eb9b50",k.Regen_json="ad7f7576-3d6e-447a-ad98-699f37e62598",k.Spine_DOT_burn_json="18a2e9ec-aa7f-49f3-8dd2-900a890542f7",k.Spine_DOT_drench_json="71e02717-99bd-46e4-91db-c0127908cede",k.Spine_DOT_frostbite_json="d334cad5-04a7-481b-b677-d143718186d7",k.Spine_DOT_gloom_json="3e7e4125-8708-4776-8f90-e5694be74227",k.Spine_DOT_shock_json="4601c446-6660-4279-b928-ce19016fb79f",k.Spine_DOT_smite_json="d7fcf746-76bf-48d4-9a03-da592405d34d",k.Spine_DOT_venom_json="691e44c3-9d79-4965-baf1-3550e012ec85",k.Spine_FTUE_bloom_json="bba8c652-581b-45d2-b8f4-279e68f2dd40",k.Spine_HUD_glows_json="e36629a3-dcdd-4cff-b5c9-8ac6415a01be",k.Spine_academy_landingdoors_json="f3c81778-432a-489d-a145-5dc718e503b4",k.Spine_academy_tower_progress_ui_json="2c9eac95-b2df-4867-8ca2-d3b28f4552af",k.Spine_academy_unlock_json="df4dc2af-964d-4e81-a85c-bcdf684a9236",k.Spine_academy_window_glow_horizontal_json="a4666f61-7010-4dd2-b525-9418156a3c13",k.Spine_academy_window_glow_vertical_json="9bda4a88-8211-47e9-8cb2-888154d39739",k.Spine_academy_window_light_horizontal_json="ee247462-91b1-452c-96bf-53c9e8b758dd",k.Spine_academy_window_light_vertical_json="292b4836-8013-4608-b2f1-bdc84b6daefe",k.Spine_academygh_addkeystone_json="1f458501-f219-4bc9-b89a-d132bd1dc94f",k.Spine_academygh_centre_json="d2048b6e-53f8-49c8-ab5d-daf5bd671048",k.Spine_academylanternglow_json="46058c99-e242-462a-8ea1-421601708905",k.Spine_academystairlight_json="32803951-ad63-456b-b23c-3fb3d5f92f62",k.Spine_add_modifier_fx_json="7a2907a2-9728-492c-bccf-4f7eb21ed25d",k.Spine_adventure_boss_chest_json="c6cfb1be-76fc-42df-976f-1a046c132123",k.Spine_after_school_widget_sparkles_json="9981495d-ab66-4402-8a9e-1c9852aeb04f",k.Spine_after_school_widget_stamp_json="f03fa9f3-7416-46c3-af03-27a43ee64822",k.Spine_aoa_multi1_json="d8535e44-8377-42bf-908e-a40aa68061fa",k.Spine_aoa_multi1_teal_json="5b646e33-356f-49b3-b225-9c53244da7f4",k.Spine_archive_door_glow_json="eb9d33b0-e2d7-4e0d-a517-755b891a109f",k.Spine_archive_lantern_glow_json="f7015f7d-e28d-4b43-a2b7-96b979bad64a",k.Spine_arena_centrepiece_json="15e52cad-58d0-4aab-9aee-20e3fa1621e5",k.Spine_arena_emerald_button_fx_json="2068abad-0deb-4256-bbd6-6dcc2b10110f",k.Spine_arena_fountain_parallax_json="c65de5c2-712b-4c4a-9db7-1fe07bf340e2",k.Spine_arena_gate_json="1baf2106-968a-4525-92da-63867a64ed36",k.Spine_arena_icon_chest_fx_json="ce1f289c-8680-4f35-b327-bad23b7ad263",k.Spine_arena_marble_button_fx_json="078b2fb8-7f93-422a-b434-9ef8bb87c8a4",k.Spine_arena_progressbar_json="bf096a86-a0de-4b7b-9426-b3a67fae01c3",k.Spine_arena_shield_bronze1_json="29145c85-e5f3-434d-8263-9d44adc2f429",k.Spine_arena_shield_bronze1_small_json="35cd4743-91a5-4a09-bcef-2bff5f1ea241",k.Spine_arena_shield_bronze2_json="b4364cab-e9c4-4597-88f6-02ce3d2ef423",k.Spine_arena_shield_bronze2_small_json="f944d568-2f18-4fea-bf15-2ffbb87c7186",k.Spine_arena_shield_bronze3_json="cd48c308-f566-4052-835c-86d269d10b48",k.Spine_arena_shield_bronze3_small_json="bdada53c-6d5a-4f85-94ef-9406e2e57af9",k.Spine_arena_shield_gold1_json="f8344c71-53f7-4a2c-9549-85d18f8e66df",k.Spine_arena_shield_gold1_small_json="7a5c7388-9e5e-49ef-99cd-d4c30e3c53e6",k.Spine_arena_shield_gold2_json="8133b67b-8d57-4b3a-ac84-d90d2cffc012",k.Spine_arena_shield_gold2_small_json="6e8fe35f-892f-498e-b124-726d1b3a05cf",k.Spine_arena_shield_gold3_json="02e5cbf8-a25d-4657-afdc-00ebab9aa2b7",k.Spine_arena_shield_gold3_small_json="6a8dac74-fd32-4db6-9d9e-596296e74f76",k.Spine_arena_shield_silver1_json="21a7fbd0-230a-4849-940c-8b38fbb8376c",k.Spine_arena_shield_silver1_small_json="db481e15-e638-4b6b-b5ca-5ca54a48bfed",k.Spine_arena_shield_silver2_json="6aec1caf-fad7-49f0-90a6-b77fc6ad953b",k.Spine_arena_shield_silver2_small_json="d7f268b4-d914-4a75-8231-cf45b47a7d16",k.Spine_arena_shield_silver3_json="9558908c-e73f-4e91-875c-55b571cf3696",k.Spine_arena_shield_silver3_small_json="7ab4a118-2ee7-462e-90ed-b190fd92761d",k.Spine_arena_sign_json="37c6a5ae-040f-493f-b4c8-7d2cf092dee9",k.Spine_arena_torch_bronze_json="a6db17be-465d-4f90-842a-499c1b5f540c",k.Spine_arena_torch_brown_json="d3f0cb3c-cc33-482b-9b49-77f804565469",k.Spine_arena_torch_gold_json="eca7da27-8afa-477a-b08c-8b3fa58504d3",k.Spine_arena_torch_red_json="5008ac6e-3433-4b88-ba21-0692f0faa4dc",k.Spine_arena_torch_silver_json="8827f855-a3b7-4908-95b9-06ddd283ae4e",k.Spine_arena_torch_t3_json="80541a50-f2a0-4659-924e-272258d25f03",k.Spine_arena_trophy_case_json="a63b6b98-fcfc-410c-bdfa-d21a07499ac1",k.Spine_arena_vs_json="19e6ca2c-88db-4426-94d9-545bc8e6fd0c",k.Spine_arena_vs_small_json="a46bc7bf-6e7f-40cd-a682-75f183e5a253",k.Spine_arena_waterfall_json="e2a152ce-25fa-43a3-bfc2-38312a4b1404",k.Spine_arena_waterfeature_json="657a2ab2-3b07-4798-8972-70ce3ffbdce0",k.Spine_astral_eg_single_json="aeabcc46-5b7b-4d2e-818d-d964b5e144f2",k.Spine_astral_multi1_json="a700963c-1877-4710-a6ba-fa604a2ddafa",k.Spine_astral_multi2_json="c664d4bc-5c15-49aa-a0b8-e598e68d91a7",k.Spine_astral_multi3_json="9c3c31a0-0fc0-44b5-aca8-dbf05a636d1c",k.Spine_astral_multi_create_01_json="d24cf569-5fa7-48fa-9931-5e39432984db",k.Spine_astral_multi_impact_01_json="d5518ce5-c0ca-4f67-a9f3-30444433925c",k.Spine_astral_multi_travel_01_json="defa73d2-d0e5-4b8b-a9c3-670af1750ab4",k.Spine_astral_single1_json="eb371c42-131e-4938-b335-2de7e762ccc1",k.Spine_astral_single2_json="3c5cc7f7-2696-4b0c-b977-b7d374f228aa",k.Spine_astral_single3_json="da7e8a6f-7a9e-44c4-88f9-f87476c22685",k.Spine_astral_single_create_01_json="29b14c1c-aca4-492e-9f9d-e1e98fc63056",k.Spine_astral_single_impact_01_json="15e96d72-1133-4711-8bbf-b39de128a6fc",k.Spine_astral_single_trail_01_json="6362f973-c62b-46a7-88b6-b1cc51b0845f",k.Spine_astral_single_travel_01_json="15631df4-9dd3-4f1b-9d3e-c31a2c8cb05d",k.Spine_balloon_skywatch_json="d7a047ef-fb83-49f3-8bdc-c4abcefaf87a",k.Spine_bam_aoa_button_json="ec9679ec-949f-45dc-8709-2725455473de",k.Spine_battle_academygh_keystone_json="d2607e94-ddfc-4856-a185-d9201f48565d",k.Spine_battle_fire_boost_json="a53da5bb-8128-472c-90fb-d992038795ef",k.Spine_battle_ftue_pointer_json="faa1ab60-74ea-4e2c-912e-369050ac7570",k.Spine_battle_ice_boost_json="032866b7-fe80-455b-a7ca-c20b1625b8f1",k.Spine_battle_map_smoke_json="653e1193-56ef-4740-a1d5-318ae2751f9a",k.Spine_battle_mini_magic_pip_json="a4ab289d-6736-45ab-8839-e52cbf4a8347",k.Spine_battle_mp_drain_json="e06d2a18-8c01-42b0-aa17-b9cd08fb9be4",k.Spine_battle_mp_refill_json="1d09dd2e-d6db-439d-98c1-b1a75b244fe8",k.Spine_battle_physical_boost_json="f1dd085f-cfb0-4d60-9189-5b6aabeaa813",k.Spine_battle_plant_boost_json="f999143d-e03b-4688-ad0d-1826d8a754e0",k.Spine_battle_storm_boost_json="a3890edc-f6de-44a9-a0e5-7e4b9d990d1e",k.Spine_battle_targeting_arrow_json="525d0de7-2eed-43c2-a38d-35418c21e4d4",k.Spine_battle_tint_fx_json="c4ed4156-fa5f-400e-8e83-b22f0ed28809",k.Spine_battle_transport_boss_purple_json="643b3999-96dd-4c55-a1cf-f494dac832b0",k.Spine_battle_transport_json="db957a7a-c2b0-4b41-9cc0-1a83a23da13c",k.Spine_battle_transport_purple_json="5eea6f2e-cca7-4c00-a6ba-7ae1f0513418",k.Spine_battle_water_boost_json="a4dd6b84-cffc-43b7-8d13-5f200873a06c",k.Spine_battyworks_json="4855051d-3fef-44e6-a4e2-3e83f6244049",k.Spine_best_streak_fx_json="c158061e-497d-4afd-a18c-6e690d1b9eca",k.Spine_bloom_rescuebtn_json="157feffe-9d49-4646-905c-c8816b81a76b",k.Spine_bonfire_unlock_json="55c08ab4-5c23-4b5a-ac6a-6d83998db983",k.Spine_boss_cebollini_shadow_json="e7b7fd9a-7619-4e5c-b77a-a61d01cd7b74",k.Spine_boss_gerald_json="d6d19e0f-bbb8-4044-bda9-bfaad9f616bd",k.Spine_boss_gerald_shadow_json="8c8384c2-8a31-4d8e-9308-570cfdb43d8f",k.Spine_boss_marionette_json="0baf166f-a8d6-455a-9233-15ce0259a566",k.Spine_boss_oldone_shadow_json="d48c87b6-26b3-4fba-9b5d-f8d72399328f",k.Spine_boss_poppet_json="f5f1a17c-04cc-4db8-a8e2-9402d1bae77e",k.Spine_boss_shadow_effect_back_json="e1d07d66-c314-4bc3-8e83-103adcd2f621",k.Spine_boss_shadow_effect_front_json="37ebd369-13db-42d0-bdfa-ebb0bacda46f",k.Spine_boss_shadow_effect_json="b0f341b8-549a-462b-b2e0-0dc14f25a0df",k.Spine_boss_starlight_json="1ad0e0fa-9684-447a-9aa5-de6ecb01f566",k.Spine_boss_stormystorm_shadow_json="b97554a3-6348-46e1-a4e2-b564a13d5674",k.Spine_box_skywatch_json="802f3edd-dfeb-4d52-ae9d-2b16563a93d9",k.Spine_casteffect_json="a0f5e0f4-1552-402d-8e53-a14f086d0e96",k.Spine_casteffect_teal_json="4f18ae8f-a3c2-468d-9975-7d8923b544ad",k.Spine_catapult_impact_json="db9ae837-8164-4132-a2d9-d45e47662d89",k.Spine_catapult_json="dad8c8f0-06df-46a8-9670-b025d8d540f8",k.Spine_character_shine_json="7ed698dd-5282-4025-a0c0-cf6f49fb32e9",k.Spine_charged_inbattle_visual_json="883aa852-f5d9-4202-ac1e-1762be5b8525",k.Spine_charged_level_bar_json="1241b3ca-0e36-4dd1-abeb-459de56d4803",k.Spine_charged_level_petbook_json="288bf660-d6cc-457a-a969-76c8b2080190",k.Spine_charged_visual_json="2ffa56ce-b58d-46a9-bd5a-a6531ce817d1",k.Spine_chest_bunny_json="fce7c866-75ae-4121-93fb-97ee5e69571e",k.Spine_chest_fox_json="919ea28d-f3d1-47c0-b09c-6cd76d7d6d2c",k.Spine_chest_mcoins_sparkles_json="8d0be954-a1ea-4bf9-a10d-ea5278bc010a",k.Spine_chest_member_json="9b579137-3dfc-4552-80b5-359cae5e3a32",k.Spine_chest_moon_json="bce82458-c803-4722-84d2-b70c2ce5283a",k.Spine_chest_nonmember_json="14ddc430-c87c-48de-9080-db40a85f24f2",k.Spine_chest_shipwreck_json="a6b92dd4-fbf1-4298-8eea-335e641982ee",k.Spine_circle_bloom_1_json="2f964bc8-ff47-4b08-9395-6f2398254222",k.Spine_claim_TT_json="8d600dae-bf52-459c-bb0c-cdac5fb7ecef",k.Spine_claim_currency_json="b94f8151-0014-4980-aa3c-6ba242c3b91b",k.Spine_claim_rarity_json="5b92e8ff-2f71-45a9-98e1-97a0a8dcdfd6",k.Spine_coins_trail_json="4fa76c24-8f49-475a-94f7-6de47d89996c",k.Spine_coop_crystal_json="ebebb548-49f8-494e-b9f0-422a829bad65",k.Spine_coop_multi1_json="971bba7b-ae0b-4776-96ce-4a94bf70a282",k.Spine_coop_single1_json="77f91e9f-e2ea-4f5f-ac67-f05b04be1740",k.Spine_crate_bonfire_json="fedc0f75-1e86-4f19-9a1e-9073d15c70cf",k.Spine_crate_firefly_json="ca0e226b-9979-4e54-ba27-4441b429539e",k.Spine_crate_json="8095e819-5bbe-4ee1-bcbc-47536422c051",k.Spine_crate_shiverchill_json="7fa1ff40-1ed0-4a67-90e1-4d0bf74fed3a",k.Spine_crystal_clumps_json="5643d965-7eca-4818-a693-cf580d19bf4a",k.Spine_crystal_multi1_json="7a04c78e-5d27-4162-8257-ef4e3e3122f5",k.Spine_crystal_multi2_json="fccc291c-15d8-400e-878c-fe44e503925a",k.Spine_crystal_multi_aoa_json="dd49e8c6-6c14-49ed-9275-eba7f9d233f1",k.Spine_crystal_multi_travel_01_json="40cc5c90-b72e-42c5-97ab-91412ca4d193",k.Spine_crystal_single1_json="34c44ff2-93ee-42be-9b3e-04de56b69d63",k.Spine_crystal_single_create_01_json="77ba1c7a-cf35-43b2-ba9b-56f15dd4bfda",k.Spine_crystal_single_impact_01_json="f827f9ae-7613-496b-90e4-7c07cd2499ee",k.Spine_crystal_single_travel_01_json="1e4491db-6bff-49f8-af1a-2b94dcbc9e2e",k.Spine_dailylogin_notification_json="4bb3d541-b80c-4db6-b12d-9eafecf0fd52",k.Spine_damageindicator_json="12778d46-418a-4503-be81-dc8a94fabc04",k.Spine_difficulty_indicator_json="adf97fec-2865-449d-b258-27df258199d7",k.Spine_dragon_astral_json="d87e8e31-351b-44bd-8f01-5f535d986817",k.Spine_dragon_fire_json="c678da05-c3a8-4f96-9c02-54eedfb190bb",k.Spine_dragon_ice_json="926845eb-544d-426e-8bd9-a8f96fad5661",k.Spine_dragon_isle_unlock_json="d7d5bbe6-91ec-4a09-ab7c-eea3278ab298",k.Spine_dragon_isle_whirlpool_json="a613c676-b272-4ad9-9974-f649a7dcdb3c",k.Spine_dragon_physical_json="87f757ca-7b88-4d01-b7df-368c3f26ad4b",k.Spine_dragon_shadow_json="46f7e2fb-c6e0-40d2-abbf-45c499753873",k.Spine_duels_matchmaking_fire_boost_json="0d4646d0-ae39-436f-949f-1382eee518f9",k.Spine_duels_matchmaking_ice_boost_json="79cfd236-5261-459d-b260-25f1acd4e259",k.Spine_duels_matchmaking_physical_boost_json="617adb0b-848c-45b5-ab04-9a11ce98fdc9",k.Spine_duels_matchmaking_plant_boost_json="c876aeea-1864-4d9a-a5b9-6be4e06c2e13",k.Spine_duels_matchmaking_storm_boost_json="a9390d7b-bbe3-4c74-97f5-2b2d3b89ad21",k.Spine_duels_matchmaking_unlock_json="4141c7b3-b11f-4032-9b54-fb38ac7ca5f0",k.Spine_duels_matchmaking_water_boost_json="028aa30a-edc5-44cf-b3ff-db39034cd9f1",k.Spine_dungeon_board_json="327e691b-fa54-4e73-9ae7-7920fd36bc12",k.Spine_dungeon_rail_json="adb29b58-3f8b-47de-b390-42a10a5ae547",k.Spine_dyno_unlock_json="847ca164-dd6b-4d8c-b8e1-7f8a0c903c99",k.Spine_elemental_boost_buff_json="38d8ea2d-dbb9-4895-b674-5627eef2aa00",k.Spine_elemental_boost_icon_fx_json="965dfcf8-8cc9-447f-9b0f-11d8f3c9d9ef",k.Spine_elemental_boost_spellcard_fx_json="7e8a3e98-066d-4400-8edb-3528b552ae5d",k.Spine_epic_egg_json="59f78c92-f9a6-4bd9-8d21-b2ade1af6d3d",k.Spine_epictamed_json="3f18090d-3a31-4e89-8252-a15385cbc884",k.Spine_event_celebrate_json="d4fb2e0a-7a40-4e57-8a73-198039d59739",k.Spine_event_celebrate_titan_json="da7946e8-7ca7-4b27-b415-1c10b0dfe3ce",k.Spine_event_sign_summerfest_json="13e1f775-42c9-4adf-a695-636d2dd0ce66",k.Spine_event_zone_celebrate_json="0ac41cc4-a820-49a3-bfd1-8fe75d0218f9",k.Spine_evo_fullscreen_json="e6b647ae-64cc-48e2-9443-39d3bace38f4",k.Spine_evo_gift_arrow_json="54eba1cd-b22e-4c3c-95ac-41768fae87ad",k.Spine_evo_gift_button_glow_above_json="81803b57-6814-4dbf-9115-8a5fde3e0b40",k.Spine_evo_gift_button_glow_below_json="6bcbb167-b4aa-4f41-98d6-645be0f5fec8",k.Spine_evo_gift_ui_circle_json="e08e8607-6efe-420f-9b40-0c7d9da351e3",k.Spine_evolution_indicator_json="7b86517d-c05d-4568-808c-727c848d25f6",k.Spine_evolve_mask_json="d1430358-23dd-4bbd-bc8f-7e8373304dcd",k.Spine_final_battle_environment_damage_json="c10b430a-2f9d-40d8-8b69-f67968b9f9cc",k.Spine_fire_aoe_center_impact_01_json="f30e99b4-59fc-48af-91e8-6a876b09be8c",k.Spine_fire_eg_single_json="be16dcaf-3d2e-4678-99d0-efad50e33f0d",k.Spine_fire_multi1_json="bd16e66b-1cc4-4bea-95d3-f4a9bfe6e461",k.Spine_fire_multi2_json="bdcf9859-a34d-49d0-9021-1295c42644ec",k.Spine_fire_multi3_json="8b61d47b-5aa1-450b-a885-1a787949288f",k.Spine_fire_single1_json="72e80f7b-7ab6-4a3b-9824-0a5d024afe9c",k.Spine_fire_single2_json="c4fdf118-f9d3-4a61-b1c7-c34955d79060",k.Spine_fire_single3_json="e8d1c156-5b4d-4aab-b20e-312247f6e05c",k.Spine_fire_single_create_01_json="053db46c-4a45-4c3d-ba09-82e6c53e0be7",k.Spine_fire_single_create_02_json="d7076169-a0f9-4f9f-98f0-942a90b980ef",k.Spine_fire_single_create_03_json="da097c25-22d2-45b9-9974-837523163d26",k.Spine_fire_single_impact_01_json="7f92cbaa-418a-40f9-a7dc-0656f092c07b",k.Spine_fire_single_impact_02_json="129226d2-40b1-4bbd-8890-4c9618002585",k.Spine_fire_single_impact_03_json="60e601a3-9501-43a7-83d6-117901794dd8",k.Spine_fire_single_impact_04_json="b33c30da-6d51-4172-97ad-ead89fc47a89",k.Spine_fire_single_trail_01_json="677a3bb2-d44a-478f-aa8a-b0242317d2c5",k.Spine_fire_single_travel_01_json="b3ee47f6-f482-4e5c-9221-7dd24e81f08c",k.Spine_firework_burgerworks_json="5c0b3b51-805d-4310-8932-1085ddd14b25",k.Spine_firework_cloverworks_json="513c2eae-490e-48a7-b836-aecb63726ca8",k.Spine_firework_cosmicworks_json="8f1ef3bb-9f19-4bdf-9572-40475bc58885",k.Spine_firework_dragonworks_json="88fdad23-7321-4b02-98d8-791c7760ccb5",k.Spine_firework_flutterworks_json="c4488e8a-2bcf-4284-932c-7065f6afb16a",k.Spine_firework_lagoonworks_json="0c0d2016-b2a9-4fc2-8d0d-4e719f6eaa49",k.Spine_firework_memberworks_json="d376e8ce-fcc1-4c13-9f2c-d76e88105ce4",k.Spine_firework_shadowworks_json="1828228e-073d-47bb-9e72-b97c684f4fbf",k.Spine_firework_springworks_json="a56d7d8d-ef44-458b-b052-5e52af450dc7",k.Spine_firework_sunworks_json="5c79a518-5b43-460a-b4a9-bbb3a68dfa80",k.Spine_flash_json="4f5414fd-f0f1-41b2-ae13-6a038a273c51",k.Spine_floatlingfling_zoneshimmer_json="a5c84582-fc49-462a-bcc8-a932d90091db",k.Spine_flower_bonfire_json="8efa0493-95ba-43fa-bd8b-ec2ef031b59f",k.Spine_flower_firefly_json="029a9af9-2e04-484d-b84e-5a197ce2eb66",k.Spine_focus_multi1_json="3aab50e2-40b1-442a-b338-dc034cd24cfa",k.Spine_follow_176_json="4cef956b-7390-466e-8fb9-1a8f828c3032",k.Spine_follow_177_json="c2bd3677-b7b0-4de5-ab25-355d1d66c654",k.Spine_follow_178_json="18e4a8f3-3c42-416e-9eba-3e2e1ad4a954",k.Spine_follow_269_json="3f013291-d36f-4acd-b2cf-fc662c32ed98",k.Spine_follow_277_json="65a354a1-37a2-4620-aa75-1d2c54582ee4",k.Spine_follow_278_json="1c40c2da-121e-4831-8ea9-8cb57a6cfb85",k.Spine_friendshipmeter_json="766ea634-4745-44dc-bacb-6e893c222eda",k.Spine_friendshipmeter_update_json="b0e0b28e-0b49-4c1e-8441-4d2f3b279031",k.Spine_fx_moonlight_starburst_json="444edfc0-5ec3-4dfa-a5b8-4dd203588a60",k.Spine_game_island_json="e9dacc45-9f44-4dbc-8ce3-da5167f17169",k.Spine_gift_astral_json="7e805287-a791-4022-aaff-28d7f57d902a",k.Spine_gift_fire_json="2454efbf-741a-47b3-a109-276bdcffb350",k.Spine_gift_ice_json="abd75b0d-f93b-440f-94ca-278b0a23e7bd",k.Spine_gift_plant_json="c2f17f87-7331-49ee-9cb6-27a836b0f734",k.Spine_gift_shadow_json="10543ab8-3145-4cff-97e9-bb8fb607b87c",k.Spine_gift_storm_json="b3855dae-7fcf-40a7-97b2-fa3435f505b8",k.Spine_gift_water_json="0e6429b9-6f5d-4f6d-99cc-00c0d0c416e4",k.Spine_hardmode_mapsmoke_json="8788c811-7909-497e-b859-d3d5136bdfd5",k.Spine_hardmode_portal_json="87a6c1d2-8fdb-4744-8f09-a69b080fa794",k.Spine_healstone_json="96b0612f-7e50-4d72-b1d9-f7cb78b79b83",k.Spine_heart_fx_json="523d30d7-e929-4e60-8e55-400b2d23b9a4",k.Spine_house_unlock_json="bad7baae-0533-4c9e-8d2f-06e039eaa9ea",k.Spine_huduiglow_json="96e14408-621c-49d6-87ce-25121b62d5bd",k.Spine_ice_eg_single_json="3d82eff6-9b52-4cfd-aa8b-09349761d0a2",k.Spine_ice_multi1_json="a0172658-cd5d-4195-a9f4-f3200b47b979",k.Spine_ice_multi2_json="cb5c6315-7b4c-4c8d-a864-428cb5e96d2e",k.Spine_ice_multi3_json="27e33f7a-e01e-4741-8034-debbb215b762",k.Spine_ice_single1_json="60870b48-1575-4f30-a30f-2ce3c75e0ae0",k.Spine_ice_single2_json="db1db805-47f4-400a-a9a9-0a4821869c25",k.Spine_ice_single3_json="920978fe-4b61-4033-b085-7ef1e3777eb7",k.Spine_ice_single_create_01_json="abba864b-9f11-4b2c-8d54-532833239571",k.Spine_ice_single_impact_01_json="7984be9d-ae87-429b-8ca1-a8af4867d550",k.Spine_ice_single_impact_02_json="a7ffc1bb-c323-442f-9007-9ef1ced87f17",k.Spine_ice_single_trail_01_json="0171b64e-1623-462b-a51e-ad6f0bfaca31",k.Spine_ice_single_travel_01_json="0f72178f-7962-4d3e-af04-f110649f2e6b",k.Spine_indicator_playerandtarget_json="6f08ef56-d99f-4b5e-af03-13ce3c112b2d",k.Spine_infinitytower_floorbarricade_json="4c8ed577-a603-4337-891e-8854cd493228",k.Spine_ink_single1_json="9207827c-3123-4587-bf4e-370bd01c3914",k.Spine_interact_moondoor_json="621f24b6-68a7-43b5-8348-bb24f0841b66",k.Spine_interact_sparkles_json="14f3d293-e2a5-4f21-bbe1-0329ce2fa275",k.Spine_itemcard_vfx_json="6eced39c-be90-42fd-bcd3-841362ec4c03",k.Spine_levelbar_glow_json="0254d9d6-44f3-46f5-b4ff-d0a18148f883",k.Spine_levelbar_json="f6523fa5-4145-4b7d-819b-76630e701574",k.Spine_levelstar_json="80671da1-95dc-4686-b2b0-f5cbdbb917a8",k.Spine_levelup_json="c3bb2352-226a-4897-8393-143ce872d3c9",k.Spine_lucky_loot_glow_json="c3f323d5-0822-4fc4-a4db-032a57543c40",k.Spine_lumintree_json="98e1a47c-1557-4a2a-8110-49e5d821f472",k.Spine_match_finish_json="40e67911-0601-46b0-9f92-72e303d9c555",k.Spine_mcoin_postbattle_json="bae41625-2bfb-4a7b-b19d-ffa22874bc98",k.Spine_mcoin_trails_json="04c0d21a-85c8-468c-aa0b-0f6188d5bcd6",k.Spine_mcoin_wallet_json="5fd65d1f-c664-459c-b8ad-b3befe010d57",k.Spine_member_reward_json="43df00b2-1c56-4bd6-aa35-2ae721b472c0",k.Spine_member_star_explode_json="780b41d4-d0c7-479e-b0ec-d60831421916",k.Spine_memberjar_json="1d6c72b2-7a07-4d20-8084-9add04f63cb0",k.Spine_memberpet_icon_json="2cea2b7f-1176-4d9d-9584-7bd4fffb0ee7",k.Spine_minecart_json="85271fa9-55bd-496c-b473-d1c2861b2b7f",k.Spine_miniboss_reward_json="73c901bb-ee3f-44e7-a6bd-3182afc004f8",k.Spine_mlp_chest_json="86a8d6db-9a5b-42d8-95bc-48f5b8e0a5ad",k.Spine_mlp_epic_pets_json="f518e0ce-48e1-40e4-9d1a-8c6cdde3c8ce",k.Spine_mlp_hero_pose_json="3e963b2d-c06b-48e9-9cdd-16d5706815f8",k.Spine_mlp_memberstar_json="0af66670-9c84-4ab0-b894-b72e23824aea",k.Spine_mlp_more_pets_json="f8d4822d-30fc-4223-bf1b-d1dabbf0c48c",k.Spine_mlp_pet_upgrades_json="26e45485-062b-40b8-9418-f727697b5b0d",k.Spine_mlp_sheen_json="ef3d77b3-f5df-4ed0-b320-a2122012cdcc",k.Spine_mlp_sparkles_json="3dd61cbe-f63f-4376-9684-0a09755ef950",k.Spine_mlp_stamp_25off_json="c86bb500-bc3d-4442-9a29-549f4f033a5c",k.Spine_mlp_stamp_json="dfee40c8-dac3-4632-9d87-5b117243e42a",k.Spine_modal_sparkle_json="3ae9a86f-2eab-415d-a333-934e023eb75b",k.Spine_morph_marble_icon_json="83b903ed-b3bf-4bd3-b5fe-e4e4f271bae4",k.Spine_morph_marble_timer_json="498aaaab-477b-4f05-bb30-e1facc73e3c7",k.Spine_mount_10_json="3c721d45-1431-487c-b9ff-0bc8b6ceacb4",k.Spine_mount_11_json="10859370-4929-4095-b06d-678c98fc6831",k.Spine_mount_12_json="2f5619ba-6453-4fea-bde3-92a2bef77731",k.Spine_mount_13_json="fad46bff-e617-406f-be02-5dc0f6d43472",k.Spine_mount_14_json="04912ee8-93c5-49cf-b83c-3c3561be286f",k.Spine_mount_15_json="a5028399-a693-4e34-9809-553dfc1de01a",k.Spine_mount_16_json="e2bc4806-0002-43ac-820e-fcc8eeb93417",k.Spine_mount_17_json="b20d8a27-702b-47d4-ae70-a06c0d99eb02",k.Spine_mount_18_json="65def7ac-1a0d-4955-b8f2-f64f4c2c5684",k.Spine_mount_19_json="4ff4f670-6dff-4be8-b2e4-3b1a85283f92",k.Spine_mount_1_json="b833f467-83d9-4168-b5c8-497dee6fd06a",k.Spine_mount_20_json="87410876-d340-4819-82a4-d8d8ac795dcb",k.Spine_mount_21_json="524dfce9-2af7-4463-a76c-27269be139ce",k.Spine_mount_22_json="74f71202-5891-4112-b4b3-9bd5ce1f7788",k.Spine_mount_23_json="bd051b5b-ba80-49f5-b5a6-1e8d56ee352f",k.Spine_mount_24_json="95417d2c-d040-41c6-822a-49cef14d6919",k.Spine_mount_25_json="d5ea96ac-c2dc-46af-8684-9205551ccfb7",k.Spine_mount_26_json="3210e698-c4cf-4f07-a989-ad34da581e40",k.Spine_mount_27_json="cf3adb9b-838b-4827-8d1d-277629239311",k.Spine_mount_28_json="54ce0afc-0f7d-497f-af13-961447c16f7e",k.Spine_mount_29_json="f8a12670-a54f-43b8-9f86-1f3e3464c7ea",k.Spine_mount_30_json="a6918307-90d3-4f58-b046-e7a9c031ddff",k.Spine_mount_31_json="c70d7356-02e5-43e3-a343-cfa667a6f652",k.Spine_mount_32_json="44adfbbb-d834-45ec-a7dd-8aca03147879",k.Spine_mount_33_json="41c7fdd6-2423-45b0-9fd5-b9824abe3163",k.Spine_mount_34_json="b17c3e08-e787-4e70-be98-97682fa1810e",k.Spine_mount_35_json="21d07917-c028-480c-994a-23122c2064c6",k.Spine_mount_36_json="5612a560-6bbc-4fc0-8f56-01295b535b05",k.Spine_mount_37_json="de45e292-6014-4b88-9e9b-37fbb5cad480",k.Spine_mount_38_json="ea86bef6-63ba-4e6e-b98b-3ffe3360a2c5",k.Spine_mount_39_json="7d493d78-431b-4cf9-9c58-9c4133de40c3",k.Spine_mount_3_json="82bcfa9e-da02-4efd-90cf-d58461e9e9fe",k.Spine_mount_40_json="20c4c318-6fb8-437c-816b-75b502d131c2",k.Spine_mount_41_json="b48bf963-0dc3-4020-8743-bd23ff74f13d",k.Spine_mount_42_json="711c3479-2b70-4737-9a39-48a843c7c89f",k.Spine_mount_43_json="1a428665-e2fd-44b9-9386-e2c3081e6f3f",k.Spine_mount_44_json="c38220f6-864a-42fa-bcfb-1433b020b9f2",k.Spine_mount_45_json="ebe2f5af-31a3-430d-80ce-bed170385f20",k.Spine_mount_46_json="4d6b2d01-5ed6-4db5-b659-4c1a79a3f8b8",k.Spine_mount_47_json="b59f1433-3e1e-44a3-a92a-964f96866b30",k.Spine_mount_48_json="4e18ce24-26e0-44a9-8dde-024103c2d6a9",k.Spine_mount_49_json="961dc9fa-e398-4ac4-9c9d-2f2a5aac0e63",k.Spine_mount_5_json="214ec825-564e-4b9d-a809-9057563a5aa1",k.Spine_mount_6_json="5d30646a-003b-49ee-89a7-d3e45280c03d",k.Spine_mount_8_json="efb79f9d-173a-49c5-b4a6-898f8d1eb8c5",k.Spine_mount_9_json="53940db3-697a-449f-935f-2ce6b379b512",k.Spine_mount_test2_json="438b476e-16fa-465b-aabc-8715195e7b42",k.Spine_mount_test_json="cfc64d82-4d64-4523-9f44-7c0b16f967ed",k.Spine_music_note_1_json="358c04bf-88c9-4f63-a795-11bdcd0c502f",k.Spine_music_note_2_json="6b2c2b4b-3c29-4713-9598-3b3744e9ae92",k.Spine_music_note_3_json="c063942b-3cdf-4a23-8090-d90fbeff5b7c",k.Spine_music_note_4_json="19fedcd0-0775-458e-bd04-026ff9db14de",k.Spine_music_note_5_json="71cf73db-9885-43a3-980e-c5e77abc9443",k.Spine_music_note_6_json="fa283bd0-8e86-4fb7-aa30-f2bb95c5a7b7",k.Spine_music_notes_json="474b2707-0cbd-4433-ae90-9bd863134dfc",k.Spine_mythic_button_fx_json="74e2be2d-1f59-49ea-a2ad-9741a5f32dcd",k.Spine_mythic_ending_timer_json="c35ed14a-287f-420d-8f0e-6b512a51ed17",k.Spine_mythic_takedown_badge_json="9ea6e19a-93f5-4b24-84ab-9bf77c458160",k.Spine_npc_ada_json="9fa8c8d3-0abb-49f3-84e8-ded5e01cb01a",k.Spine_npc_arenamaster_json="f7b2c99e-e5be-4c9c-9d77-ae0eba250966",k.Spine_npc_aspen_json="27a72f63-89d5-44a3-aa85-a41ca50c7607",k.Spine_npc_athena_json="8ef41540-c49e-4bed-8076-0af95d9bd989",k.Spine_npc_benni_json="197b82a5-0282-4dab-94a3-1733de20a1ee",k.Spine_npc_bok_json="4b901ba0-5e29-451f-ad46-4c3e2bb86613",k.Spine_npc_broccolina_json="9af7dce6-99c8-4255-9bd1-ede1ad13677b",k.Spine_npc_bunny_bouncer_json="3380e07c-deb6-486a-8564-7a6f3afe6d74",k.Spine_npc_cauldron_slimeworker_json="1067a438-89b2-4a9c-b961-e05f41a08748",k.Spine_npc_cebollini_json="f5822754-1119-4a8c-ac36-4a489638178c",k.Spine_npc_don_zorro_json="ce50d082-0424-4b1a-a87e-e963222735ad",k.Spine_npc_eugene_json="95cf771e-d792-4f61-9240-f56d91b50310",k.Spine_npc_eve_json="e8d355c1-ce60-47dc-89e6-e153b1847a9a",k.Spine_npc_firefly_json="f278d370-add0-4744-b9d2-b71aa74ee88f",k.Spine_npc_floatling_fire1_json="176ec55e-6e54-49bc-ac89-62219861f87b",k.Spine_npc_floatling_fire2_json="976e2b41-cd86-4eb5-bf12-0efc5d5d6241",k.Spine_npc_floatling_fire3_json="a096f0c0-6dd0-4ac2-b4f1-87c2ed236503",k.Spine_npc_floatling_fire4_json="6f1fb5e2-cebe-4e04-a9b0-12bfa60611d2",k.Spine_npc_floatling_fire5_json="a705ef12-8e6d-42c6-b9d0-4d3466d5e2f5",k.Spine_npc_floatling_ice1_json="40da6ba2-1b87-470a-95d8-0057d41ea8ab",k.Spine_npc_floatling_ice2_json="fa2f90c0-c912-4c2d-a0d1-fbd6ee86d4d4",k.Spine_npc_floatling_ice3_json="8f8968df-9733-49ba-89fe-e851c26b6fa8",k.Spine_npc_floatling_ice4_json="9fe68383-b914-4f92-b734-6f67aaf64596",k.Spine_npc_floatling_ice5_json="443a58c4-3036-4648-a741-d1f452dd9b08",k.Spine_npc_floatling_plant1_json="fa4a9a67-eed1-46b5-ad44-b72d29876538",k.Spine_npc_floatling_plant2_json="8cdf1350-70f6-41a1-983b-d742ba205b02",k.Spine_npc_floatling_plant3_json="0ea4ccc4-2120-4978-9bd2-dd493acab2b1",k.Spine_npc_floatling_plant4_json="37d251a9-9f86-47ea-865d-e7b27637c753",k.Spine_npc_floatling_plant5_json="1bb9d729-4c41-47b9-b2bb-4501fb397c5f",k.Spine_npc_floatling_storm1_json="74498d70-93f0-4bb5-8de9-269a8063629a",k.Spine_npc_floatling_storm2_json="f7f2d713-b99b-4b60-b0b3-a458bd41a69c",k.Spine_npc_floatling_storm3_json="b4d72146-bea4-4eea-9474-691c396aa7ea",k.Spine_npc_floatling_storm4_json="b122376b-ab8e-422d-89e9-97aaba2a50d6",k.Spine_npc_floatling_storm5_json="17987336-8147-4ab4-971e-a0af1b3a2d36",k.Spine_npc_floatling_water1_json="a1cd6654-9bd6-4bd6-a3f7-7d7301fbb03a",k.Spine_npc_floatling_water2_json="0ab24669-46ba-464c-96ba-91d01579c843",k.Spine_npc_floatling_water3_json="14158013-194c-496b-851e-c82e2e715546",k.Spine_npc_floatling_water4_json="191e0473-3107-450e-a2f2-77ed1cb6a449",k.Spine_npc_floatling_water5_json="e12e9c26-c9ef-437a-b052-1d21b4b78738",k.Spine_npc_floatlingmerchant_json="3cd66caf-76f6-454d-adda-97c6e8f0ae1b",k.Spine_npc_flora_json="f79c22c7-4d21-4585-9506-adcbc96be9d5",k.Spine_npc_florian_json="9b98777f-78b5-4508-94cd-ea5179393981",k.Spine_npc_foreman_json="415a2f55-28a2-4899-83ef-bc43cb706151",k.Spine_npc_gale_json="1d1859fa-e8d5-4811-9d48-420f92328f4d",k.Spine_npc_gerald_json="11570038-1097-4d08-9973-735793f49ce5",k.Spine_npc_gerald_shadow_json="ada1bcee-51bc-4f39-8610-e9362f849b8b",k.Spine_npc_gnome_boardy_json="45755707-da8e-42a6-a4bf-e878496c6e3d",k.Spine_npc_gnome_crystal_cavern_json="b72913b9-5a4e-4855-b0a3-8527a31f7d3b",k.Spine_npc_gnome_firefly_collector_json="4944ab45-b1d6-4997-a1b2-99dff780dacb",k.Spine_npc_gnome_miner_json="244342ae-5070-4429-bb49-5c578f863337",k.Spine_npc_gnome_rift_json="92d204cb-a234-40b6-b219-c48bf20bfb7d",k.Spine_npc_gnome_shop_bonfire_json="7b4dd4f8-b1be-43a4-be2d-ec160ce9af54",k.Spine_npc_gnome_shop_firefly_json="79d2f9ac-307d-4e7e-b873-56dbeacd6258",k.Spine_npc_gnome_shop_shipwreck_json="b2ee59f9-5a2c-44c8-9055-eab4aa36e437",k.Spine_npc_gnome_shop_shiverchill_json="f5ef7feb-04fc-4f6d-818e-fb29d899dc25",k.Spine_npc_gnome_shop_skywatch_json="33718387-584c-4a53-97a6-0581bda73a31",k.Spine_npc_gnome_spinner_json="52537250-d00f-46a0-8905-3d18cd7d3368",k.Spine_npc_gnome_stylist_json="cafc68b5-634d-4eae-aab1-8247e2d830f7",k.Spine_npc_gnome_traveller_json="608f0737-8e04-46e2-b783-d2c91b4a0237",k.Spine_npc_gnome_wheeler_json="73dab9f8-f39f-4e4b-80af-37997e6a9b8a",k.Spine_npc_harriet_json="2561b5ce-cc0f-459f-b2db-c443c07fbf53",k.Spine_npc_howard_json="f644301a-5c3c-4935-af4e-de914b863469",k.Spine_npc_imani_star_json="e1f341b9-ab7e-4816-b2af-ab9ad2ffa6ed",k.Spine_npc_jelly_jim_json="0677cf1a-591d-4d7f-921a-55c04d6ddb14",k.Spine_npc_julia_json="c273d20b-3a5f-4a68-97ff-9eebdf374119",k.Spine_npc_kandi_json="0b7d7314-5d76-4428-b46b-10f39d9cf529",k.Spine_npc_koi_json="d1e29513-e3dc-4138-b547-2a60cc05c7f1",k.Spine_npc_maomao_popup_json="e2cfde8c-3012-4ac1-92ea-dd7b1b2394ce",k.Spine_npc_milkyway_json="8d349571-f42c-4189-80e5-e58927aafda5",k.Spine_npc_mist_json="408d71a0-f24d-4cad-ad0e-3013b72c39f1",k.Spine_npc_mizu_json="482b8b6b-68f7-4827-a5e9-9892f914f4e3",k.Spine_npc_ninja_1_json="26dc9e59-bf55-42ae-ac70-8d2f1fbb793b",k.Spine_npc_ninja_2_json="db785ed3-04ef-4b9c-af38-aee48d179725",k.Spine_npc_ninja_3_json="6dce012f-993b-4895-9a3e-523e4398cbe2",k.Spine_npc_ninja_4_json="f73ecf6f-0b38-4d2b-a543-0698121fee57",k.Spine_npc_ninja_5_json="706593eb-a432-4005-8b26-ef3b48e0daac",k.Spine_npc_noot_json="f13056a1-c618-45cb-8009-0f18fb9092b2",k.Spine_npc_pippet_json="8e2484bc-004a-4866-a4b4-52b5ad789dad",k.Spine_npc_puppetmaster_alt_json="8d8c98f7-1b8f-4508-823d-330cce8a82de",k.Spine_npc_puppetmaster_hardmode_json="b4e874d4-a5a5-4d61-ae95-5aa7d12a2921",k.Spine_npc_puppetmaster_json="f72d225f-bfa7-4701-9af6-80798608ea5c",k.Spine_npc_selena_json="20b960c4-c4ce-47ed-b843-a71e7201ddab",k.Spine_npc_slimeguard_hank_json="8b552edf-2a99-4e0e-8da6-491f2105b805",k.Spine_npc_slimeguard_json="8e4fec6a-49f4-469f-8f45-634280fdf4f7",k.Spine_npc_slimeguard_mike_json="7b788c4a-850b-4fae-9961-a50799707119",k.Spine_npc_slimequeen_json="15f310a3-bf47-48fa-9e22-289c650d0344",k.Spine_npc_slimerella_json="13ee4ddf-6e96-4e01-af22-56e029c62297",k.Spine_npc_slimeworker_json="8f80680f-c098-4e7b-aabc-84643be8fe29",k.Spine_npc_slurpy_json="bca2d166-d2b7-4295-85df-a0cca5084aed",k.Spine_npc_swoopy_json="5fd76115-b040-4d02-b99a-b6a2d015b785",k.Spine_npc_ulla_json="0cefdc92-d8ea-4310-b670-21d644e5f73c",k.Spine_npc_verna_json="20f5c6a5-3599-4b76-9c76-0e3b2a2ef4ac",k.Spine_otp_celebration_json="4e16990f-1d6a-4b31-b386-60dfff304e37",k.Spine_padlock_json="615639df-cbd1-4af9-9c6f-4b5c5b8d5d92",k.Spine_paint_balloon_splash_json="b0bc1552-56eb-47cb-9b4a-650fd9a46845",k.Spine_parent_reward_json="53a4ddbe-de7b-4f9b-9b4d-c8028420f9b6",k.Spine_parentgoals_icon_json="36234fcb-be88-4e31-9092-ab7df4e84c97",k.Spine_pbf_magicoin_sparkles_json="9424c87f-e8df-416f-9ab1-5643ffbb7c9b",k.Spine_pet_100_json="6002cf71-b592-4639-be65-b63eba6d9a88",k.Spine_pet_101_json="ac61b90a-ee5c-43ec-a456-316657a4f2bd",k.Spine_pet_102_json="6f1371a9-4074-4e49-ac53-e390827cce1d",k.Spine_pet_103_json="39f08c6c-7220-4c50-af9e-4a7f69390896",k.Spine_pet_104_json="5970beaf-f638-40c6-afe3-97a3fc64f8b3",k.Spine_pet_105_json="22d9543c-6c9a-4ac1-99e1-2c9abec03137",k.Spine_pet_106_json="ad425b3e-8cd2-4f1c-a5ff-7ba7b4e40c7e",k.Spine_pet_107_json="6270505a-bb90-4949-bd7d-f6ae68b62ae9",k.Spine_pet_108_json="f2808c76-d9e1-475f-864a-7178d2c0b506",k.Spine_pet_109_json="7eaf6c1d-f150-46bd-89e7-bcce6b8876a1",k.Spine_pet_10_json="98fe0850-8a25-4ab8-b5c4-18db9682c495",k.Spine_pet_110_json="4ca45404-f00f-4f80-96fd-c18ad504a3ae",k.Spine_pet_111_json="3a3cd4f3-49d3-46ad-8f4a-e9224129b7ec",k.Spine_pet_112_json="4f8aa3b1-2344-429e-b4c3-a50e82662f6b",k.Spine_pet_113_json="ab0acfec-8638-4f37-a779-dae72f455845",k.Spine_pet_114_json="0721e2df-66af-429b-b326-ccbc94ba468b",k.Spine_pet_115_json="10ea5937-81de-4141-97f3-d236d42f778a",k.Spine_pet_116_json="b927fea1-1e65-4aa1-b9eb-bee99391a575",k.Spine_pet_117_json="100fd339-373d-4675-9f09-9fba36cc6abb",k.Spine_pet_118_json="de1919f9-9ad8-45a4-ad01-fe1c8897dfa3",k.Spine_pet_119_json="c3e9cf8d-0201-46d0-ad61-0c690c78fee4",k.Spine_pet_11_json="9a4a641e-672f-4789-be5d-d6df1eb5e321",k.Spine_pet_120_json="d349443b-08a1-49d9-8e91-2d63bda8b1cf",k.Spine_pet_121_json="8f452b06-b3b4-4c25-a5dd-33343b4fcfcc",k.Spine_pet_122_json="093fc1f8-c513-4ef9-af11-04509fda30ff",k.Spine_pet_123_json="890f9005-1816-4900-9677-24983bfb18ba",k.Spine_pet_124_json="9491da83-2f61-47fe-8073-4f3cde42a96b",k.Spine_pet_125_json="cb8f3fdb-c96b-46cc-a51c-d93eabe54769",k.Spine_pet_126_json="c8d13f99-0653-403c-9d2b-95ab2e3a4a37",k.Spine_pet_127_json="6337501d-43b8-47e8-8ace-84cff3d6a914",k.Spine_pet_128_json="3a800661-c3bb-40c8-ad7b-fba27e47426c",k.Spine_pet_129_json="6febcd26-98c0-41b1-adff-ca6dbc1a6bb6",k.Spine_pet_12_json="8e922a4e-5b3a-423a-b258-e759df420999",k.Spine_pet_130_json="4e6fff9c-f9dd-4f49-bd46-557077e02975",k.Spine_pet_131_json="12137997-8e00-4042-87f3-220f865e243a",k.Spine_pet_132_json="71c81df8-0693-4041-b69f-8ff29340e4bc",k.Spine_pet_133_json="9345ae86-9025-4841-9251-9bbecff3a63d",k.Spine_pet_134_json="5424908a-8755-4db6-8bcb-d315b219a3bd",k.Spine_pet_135_json="66491ebb-7336-489e-9f15-4c76a112c3e6",k.Spine_pet_136_FTUE_json="03a9fa79-a2bc-4497-b3f3-0bba1c7e9095",k.Spine_pet_136_json="6432dfaa-2140-43ae-8e0d-543de6b9baec",k.Spine_pet_137_json="68759a87-ccfd-45fd-b8a2-04877e565a7e",k.Spine_pet_138_json="805fb198-405b-45cf-be4b-c943eb5780ee",k.Spine_pet_139_FTUE_json="44fa3bd0-0b18-458d-a473-b0b0b02b39f2",k.Spine_pet_139_json="1a5cbb8a-3476-4810-abcf-8ae17286475e",k.Spine_pet_13_json="1768152c-d25e-4d67-86c5-53aaa0309574",k.Spine_pet_140_json="a429fc74-f76e-4dca-8d29-128b13f2b7ee",k.Spine_pet_141_json="58dc4c03-0048-4d08-926c-cb3fc20f1272",k.Spine_pet_142_FTUE_json="b218106d-6990-4403-996d-14a1d8e15403",k.Spine_pet_142_json="3f5d4535-31b8-4185-975b-1051af0486b8",k.Spine_pet_143_json="5224af77-c1f9-4490-a741-620311bedd1f",k.Spine_pet_144_json="aeb244e3-3cf7-4fc8-8a6c-de62dce15e8d",k.Spine_pet_145_FTUE_json="0e54d6e2-daa6-4bf6-af6f-3b3b82b65f94",k.Spine_pet_145_json="d2e69249-a4fc-4442-a6b5-e2b6918dcdd7",k.Spine_pet_146_json="231daa2b-f325-43dd-acdf-27ac37cef765",k.Spine_pet_147_json="3532fbfd-8494-46fa-90bf-997961d7b19f",k.Spine_pet_148_FTUE_json="6bd224ba-15cc-4d04-9698-7bd1d9fdd28d",k.Spine_pet_148_json="d3cf7559-4250-40d5-816d-de41f4fa7910",k.Spine_pet_149_json="efd2efa8-8d9f-46d5-abb0-1aee05daa690",k.Spine_pet_14_json="78f956f7-5c94-4c1e-9afa-9960294c2c3c",k.Spine_pet_150_json="95efc14d-2c4d-4f5e-bd59-b42e0f4ff1dc",k.Spine_pet_151_json="34e6744e-f005-4d66-8536-a5566c1b0531",k.Spine_pet_152_json="23a4a864-d46d-4e0f-8b44-f84287c33332",k.Spine_pet_153_json="7d961810-6e8a-4ccd-b7da-0cd9ee2fbae3",k.Spine_pet_154_json="e8192a81-df51-4959-a2ba-1c900d4fecf0",k.Spine_pet_155_json="fc459a41-a24a-46df-905f-cfae11925227",k.Spine_pet_156_json="a04f0ad0-480f-45fb-9011-a5ea28070721",k.Spine_pet_157_json="23ef5f67-30fe-46a8-8b77-74996e8959c6",k.Spine_pet_158_json="431d9192-15a0-493e-b0db-be18d13e8a2c",k.Spine_pet_15_json="bf6af2be-1031-44f2-80f7-3325cd450c3f",k.Spine_pet_160_json="38a815df-cf94-41ca-b0a3-314d6a37054b",k.Spine_pet_161_json="1f6eafd2-9a55-42f8-8a7c-ada2f226c4a7",k.Spine_pet_162_json="a604d393-5e4b-41c4-8fd5-6d22231ead31",k.Spine_pet_163_json="3783f1c7-c26e-4f8b-89fa-932891bac5a5",k.Spine_pet_164_json="bc56b2e2-aa2a-4298-a09b-7101c4c4761b",k.Spine_pet_165_json="ca6a7ff3-1366-4342-8293-cedb2f1ecbaf",k.Spine_pet_166_json="0c3437af-6a72-4fe7-8415-edc1b0adba8c",k.Spine_pet_167_json="17b087eb-0dd3-4b82-803a-df796adc7c95",k.Spine_pet_168_json="cab654b2-625b-47e5-94a5-838c70aa9b69",k.Spine_pet_169_json="59e79c21-ef18-4ece-8130-32a056c62be2",k.Spine_pet_16_json="d28c9abc-866f-49d9-bc38-c767dce417d5",k.Spine_pet_170_json="727a84f4-70ee-4873-a2e1-ad8e5d4e0b19",k.Spine_pet_171_json="feab09f0-ebbf-40a5-9b78-9a8d53d4fb69",k.Spine_pet_172_json="666cc997-22f0-44c8-8162-55e11f4d494c",k.Spine_pet_173_json="2d8ca273-ae0c-4164-87df-f2fb03f6beca",k.Spine_pet_174_json="e5467dbb-9880-4f6b-9a09-aa9e73e80f27",k.Spine_pet_175_json="89a3a1dc-235c-4c0a-bae8-eea45bdd9bd0",k.Spine_pet_176_json="61e5ae0e-569e-4457-ba3e-827aa54f776c",k.Spine_pet_177_json="b8f3d505-604c-4410-8bbc-612b8e529d7d",k.Spine_pet_178_json="6ca18784-8114-4c7d-b3e9-23a0a3216b50",k.Spine_pet_179_json="3d90e9e9-a790-46c6-84f0-54e2fa516a5f",k.Spine_pet_17_json="3e80feb0-016c-4eb5-a392-245527011497",k.Spine_pet_182_json="19e16315-8cd3-49c1-ab35-b7e9495fcd5d",k.Spine_pet_183_json="891d64b0-848c-4544-b8fb-c9e6c652c089",k.Spine_pet_184_json="2ffddcdc-596d-42dd-b9ec-6d8ca7a7ffa4",k.Spine_pet_185_json="1940308d-c215-4ebd-ab11-9fb92316cce2",k.Spine_pet_186_json="85850236-7db4-4ef5-8647-5ffd3fedec95",k.Spine_pet_187_json="cfb920dc-c59e-4f90-893a-921caa50826a",k.Spine_pet_188_json="0764d625-5fd7-4a38-a3ea-cc4d64231dad",k.Spine_pet_189_json="555b795b-0391-45d5-a4c1-ec098206d375",k.Spine_pet_18_json="be25a2d3-acfa-4957-ac28-143415c7ea27",k.Spine_pet_190_json="34dfd6be-3f13-4225-9444-e28a31c0dda9",k.Spine_pet_191_json="00866b77-4bfd-49b3-b11a-7486efb1d091",k.Spine_pet_192_json="3b0c2788-776d-4ccd-8440-64dc69c84d45",k.Spine_pet_193_json="a605e8e1-0c36-4a95-9048-e987ca50d146",k.Spine_pet_194_json="901faac0-682e-404a-92b7-d29a738c8bed",k.Spine_pet_195_json="b3a8ecc7-db50-4c8a-9ea4-dcdb00b8af3f",k.Spine_pet_196_json="56c5b1c3-dfba-4ed0-be14-7c83f82b6e34",k.Spine_pet_197_json="037ed58a-b79d-4d38-bb0f-97a91011cf5c";k.Spine_pet_198_json="111d835d-d4ce-484e-a846-8354595f8bfd",k.Spine_pet_199_json="976916f1-8e0e-467c-8c51-1afe64a1765d",k.Spine_pet_19_json="382ab68b-7b4a-4543-8e81-85052c5d27a5",k.Spine_pet_1_json="624c21bd-63c2-4558-9365-78673fd6f9e5",k.Spine_pet_200_json="7103891a-2033-4a6f-bae3-fd9f78641559",k.Spine_pet_201_json="509a084a-968f-4926-83a0-22668c872064",k.Spine_pet_202_json="dad14c94-e845-4ecb-99e4-f300ca4573a7",k.Spine_pet_203_json="3711e0f9-ec0c-43f5-9759-4e95015f0e6f",k.Spine_pet_204_json="8ada4ec2-ca4e-4952-b9ce-4637c622e4b5",k.Spine_pet_205_json="a134b428-42e2-4aab-9c02-044dd2c1b260",k.Spine_pet_206_json="847eeb11-1f93-4dd7-8597-1b2ad6ff9b0b",k.Spine_pet_207_json="1ecaf902-a910-4dde-86e4-11e92aa0a6ee",k.Spine_pet_208_json="558f635e-4b4c-4680-884d-8de50612c34b",k.Spine_pet_209_json="6fa916fb-2522-4918-be93-748d700d668d",k.Spine_pet_20_json="3a58bbbb-315e-416f-ba3a-7a1c93834d7c",k.Spine_pet_210_json="9fc267e6-940f-41ce-8708-a81c186f5c75",k.Spine_pet_211_json="1dff47e6-cb50-4dbe-9f52-91050bbfd9e1",k.Spine_pet_213_json="1758538e-511d-452a-856f-0e521825ab65",k.Spine_pet_214_json="b8b3843e-e25a-451b-8226-d2ad64772b88",k.Spine_pet_215_json="e5b07215-0e47-4f2f-9252-f2e1d44a88ed",k.Spine_pet_216_json="4f92313e-21ac-489a-afcd-b38b8259b2e8",k.Spine_pet_217_json="d894ae4a-6b9b-4075-9af3-db2cafa002d1",k.Spine_pet_218_json="acd354f3-ed71-436f-829a-95fe9ab3daf3",k.Spine_pet_219_json="2960dfb4-85c1-48b2-a9e5-de4eb31d8a7f",k.Spine_pet_21_json="f7831e07-1e86-42fe-a0b2-005052911c36",k.Spine_pet_220_json="fbdd29fd-c5fa-4949-961e-08524beaf189",k.Spine_pet_221_json="eeefe934-73d8-4b04-bfa4-25ea21d1b96a",k.Spine_pet_222_json="e42fefe9-d7e3-4518-97df-20d11ce344bb",k.Spine_pet_224_json="b5b7225e-44a0-43f8-b092-d30b071ebc6c",k.Spine_pet_225_json="a841031e-2017-41cc-9271-98835518d7d0",k.Spine_pet_226_json="2fcbad8c-3410-487d-8b7f-89c1b709fbe9",k.Spine_pet_227_json="69c48023-e155-484e-822e-7b4ce30c63df",k.Spine_pet_228_json="c253cd80-1651-4441-8e04-def66208ef5c",k.Spine_pet_229_json="9631263d-2fd7-451d-aaca-4c7271bae129",k.Spine_pet_22_json="bc690cb9-907e-4255-9606-805af4ff16cb",k.Spine_pet_230_json="66a98dc3-eafa-4be2-9724-7daeffba75ef",k.Spine_pet_231_json="43587964-526f-40e2-8b51-952410eb393f",k.Spine_pet_232_json="7766769d-7919-444c-a4dc-10ce15aa4ac8",k.Spine_pet_233_json="55276168-e54c-4065-b8d1-09eaf5c0b34a",k.Spine_pet_234_json="11a9ae5b-26c6-45d5-8233-7fb589ba78c0",k.Spine_pet_235_json="a1ce3ac6-b098-476f-bab0-70df98711449",k.Spine_pet_236_json="2d92d144-fd7b-4212-85bd-287bb23161a8",k.Spine_pet_238_json="32104c62-3a28-4aea-8727-c99dc0e37c29",k.Spine_pet_239_json="8b139e78-aa76-46e4-bf69-1a2ba7fca8bf",k.Spine_pet_23_json="d2e3243f-aadf-45cc-9856-1bff37ea440e",k.Spine_pet_240_json="0229ddba-6bba-4b33-aab0-6f2be21af9cd",k.Spine_pet_243_json="05940bd4-7451-402d-85cf-8eabe4bfbe43",k.Spine_pet_244_json="fa63e4d7-a8af-407c-a972-f3477145ef0f",k.Spine_pet_245_json="ff5d0f8b-6e97-44cf-8774-82e68302450f",k.Spine_pet_247_json="d7793e14-4bc3-46f5-a877-bca5ff632831",k.Spine_pet_248_json="d11ce5f5-168d-4424-9aa6-b7f541ab783a",k.Spine_pet_249_json="f7ba7eff-7d9a-46f0-a5c7-5c7b6fc95bd5",k.Spine_pet_24_json="7db566a4-e033-4140-8ca6-0e8f84f96007",k.Spine_pet_250_json="3d3b68f2-2928-4d35-a2d5-0dd896fc8545",k.Spine_pet_251_json="ef0b0f50-c5c6-459e-845f-39227d6bea18",k.Spine_pet_252_json="e6dc8e02-d087-4462-8f36-57806bc5c8a0",k.Spine_pet_253_json="8d867ce0-a7b3-48f3-bea7-50e382b85180",k.Spine_pet_254_json="957b90a2-657d-47c6-8847-05093918c888",k.Spine_pet_255_json="ee57412d-84e3-4a45-8789-ebd1e2d994c3",k.Spine_pet_256_json="6fa72251-886a-4540-8d9f-d77fc614f254",k.Spine_pet_257_json="96eac8eb-c97a-423d-bbcf-6877d336dcbf",k.Spine_pet_258_json="cd0478e3-e9cf-4371-a2a3-8eb0254cd1ca",k.Spine_pet_25_json="1a8ccd0a-92a4-49a7-828c-bac18babd4dd",k.Spine_pet_261_json="5be5c351-5502-4e9b-a35e-727dbb5fd9e9",k.Spine_pet_262_json="aa5fe41e-574e-460d-b18c-9e5c3b786e85",k.Spine_pet_264_json="50152b35-9a0a-4317-92ac-01123b09a10f",k.Spine_pet_265_json="0d9f8d9c-18b6-4cee-b750-e6a0101ecd70",k.Spine_pet_266_json="df256134-c79a-4db9-93a9-3e6de26629f5",k.Spine_pet_267_json="33155d59-dec0-413d-a1cc-74c21b14c2ab",k.Spine_pet_268_json="7a850e9c-b1ff-4ed4-b501-b88c419bf797",k.Spine_pet_269_json="342b398f-c420-41e2-8759-57913a4356eb",k.Spine_pet_26_json="882acee2-395b-484d-adba-d27ddfa34ef2",k.Spine_pet_270_json="bdcabbc7-3633-4693-b798-c218f63c4e77",k.Spine_pet_271_json="502b4b3a-3119-481a-8192-e899a589dd5e",k.Spine_pet_272_json="353d3983-fb29-491b-9134-c964256c38b7",k.Spine_pet_273_json="41259d80-9a58-4bdb-b221-6dedc017792e",k.Spine_pet_274_json="4a49f3a4-7f18-42f0-a874-3535b53a5fc7",k.Spine_pet_275_json="29f42e24-80b1-481b-a04e-301d2245565b",k.Spine_pet_276_json="ff581b3d-3778-4402-bd50-7cf3599f45a1",k.Spine_pet_277_json="c69b275a-40c6-4b93-ae51-0b2dded1c8e5",k.Spine_pet_278_json="7423f59e-4d39-42dc-9c4d-f4a813e48694",k.Spine_pet_27_json="65c417ea-720d-40a9-b015-4fa8c66ecf57",k.Spine_pet_280_json="986c1f1a-0e12-437f-970b-54a0f4efb39b",k.Spine_pet_285_json="6d9f1fc9-faeb-4fd9-b292-e6f774f8a1d1",k.Spine_pet_286_json="c66770a4-89ce-4c36-86ee-ed90654fb90b",k.Spine_pet_287_json="82e89e29-19f1-47fc-b7b8-10aff316ddab",k.Spine_pet_288_json="6ca9649b-45c4-43f4-b321-5f39a94b9242",k.Spine_pet_289_json="3b59c88a-22ac-4b65-9520-b9c0e3f8efb8",k.Spine_pet_28_json="f85f25fc-cdad-4243-8cde-fb3a56ae72b0",k.Spine_pet_290_json="1d2505fc-146e-440f-bbbc-d8279c87f78e",k.Spine_pet_291_json="67517386-d9ee-4a5b-a4e8-5da2670ef4ba",k.Spine_pet_292_json="cf060dc7-41ee-42c1-b676-45e04eb36c7f",k.Spine_pet_293_json="b44e9ed6-4046-4ee5-a2f6-12e8c746a56c",k.Spine_pet_294_json="372d8329-44b4-4e49-bacd-2541d10aa4e5",k.Spine_pet_295_json="f03f6c33-0e08-4f0b-bfbf-2b99773e073a",k.Spine_pet_296_json="9eb7d7d2-7586-4456-94f0-bc87a23509c4",k.Spine_pet_297_json="dc59553c-4ff0-485c-bd4c-0e42fed0033d",k.Spine_pet_298_json="48d90db6-aff2-4434-b934-0c1f4c829f8b",k.Spine_pet_299_json="4e02f21a-4cf1-42c1-be9a-0cdc934189f2",k.Spine_pet_29_json="28c2da62-b05d-44e0-80a1-f74159bec7df",k.Spine_pet_2_json="ab9cd362-d049-4e74-9a67-9482af6a7903",k.Spine_pet_300_json="ac351eaf-f55f-438a-8170-6d8543cf6dab",k.Spine_pet_301_json="44b7ba23-1183-4fab-9777-c530163105c7",k.Spine_pet_302_json="b4e52c57-0245-4cdf-b7e8-d52ecf84b555",k.Spine_pet_303_json="31304e70-0c28-460a-91cf-d929a421ffaa",k.Spine_pet_304_json="0191a00d-1584-4286-8e12-63eaff14b4c8",k.Spine_pet_305_json="c18a8f49-d8f0-4bd1-93b8-e17798d0d506",k.Spine_pet_306_json="2e66a49d-c080-43f8-a6a8-7136f83516ed",k.Spine_pet_307_json="615a2cf0-2b16-443a-ae3d-fe44b1723974",k.Spine_pet_308_json="574f0155-cdc8-4ba2-95f2-01307c333374",k.Spine_pet_309_json="0b3bf0e8-4e2e-453e-bf1a-81aee55e3517",k.Spine_pet_30_json="6fdd6406-3a29-415f-9299-454cfbd59fbb",k.Spine_pet_310_json="a23985ea-fe07-4cc9-80a7-7ee5c455587f",k.Spine_pet_317_json="81dd9c8a-879a-4408-bcda-dea02d851f45",k.Spine_pet_318_json="b6debca7-71da-4674-84f2-7b48b9c60875",k.Spine_pet_319_json="3d3f8335-31fa-44d2-8428-855d1898cb29",k.Spine_pet_31_json="2ff5eefd-f16a-441f-b3ee-5a79461867c5",k.Spine_pet_320_json="a98b82e7-c029-4372-86a6-72908d434618",k.Spine_pet_321_json="678819be-6cc8-4d67-ba18-37c55e25dc6b",k.Spine_pet_322_json="70188b8c-725c-46aa-9fda-9f63c882a082",k.Spine_pet_323_json="5122bd83-a8ac-43d6-8e15-16fe61c529b8",k.Spine_pet_324_json="6129e698-ecd5-41e6-b7a0-bffc325a1fd9",k.Spine_pet_325_json="afe00374-3511-43e3-bb0d-bc349402d3a3",k.Spine_pet_326_json="4c8fd072-150b-4607-8e38-e89e07a6277c",k.Spine_pet_32_json="09b0fec9-42ff-4e1e-aba9-4941a919b149",k.Spine_pet_335_json="6b72ded7-6fd7-41d4-9908-5a2c6572b35e",k.Spine_pet_336_json="e7fa44f4-f95e-4855-a2ae-6193b2aa49d5",k.Spine_pet_337_json="076cb088-caba-4a9d-8b23-9e7f31534716",k.Spine_pet_338_json="24675028-08e2-4ebc-8566-29a30919770b",k.Spine_pet_339_json="5b19e6c4-c3eb-484d-a4d0-7a9355e85a71",k.Spine_pet_33_json="d17ab0d6-c4b2-44f6-95d2-83c5d862a250",k.Spine_pet_341_json="02c2d721-534e-40fa-ac13-790ffeb54128",k.Spine_pet_342_json="c08de98c-3ee8-4025-a9a6-cadda2233cb1",k.Spine_pet_344_json="17185171-c1de-4e71-af7d-762c1b0ec687",k.Spine_pet_346_json="500dab9d-4237-49f5-9a60-6e69ff6fe084",k.Spine_pet_34_json="cdde707d-9c5d-4b52-bbff-74d8e9df8862",k.Spine_pet_354_json="c143df10-6513-4a24-8060-237ac3dec711",k.Spine_pet_35_json="feba4f30-cd85-4876-8c4a-041d9dfc4e6e",k.Spine_pet_362_json="c2154690-b043-44ae-b433-23c0b9dd8b05",k.Spine_pet_363_json="7ecfe1c4-f20a-47f2-a923-d5f58afbab46",k.Spine_pet_36_json="734edf64-405c-4bb6-90cd-999235524419",k.Spine_pet_376_json="593aeeb7-8331-46b3-80f6-9e951a93cde0",k.Spine_pet_377_json="937880b8-f92b-461b-880f-9be65b1819e7",k.Spine_pet_37_json="d0acb997-ecbd-4a98-9f7e-f90b833dcf77",k.Spine_pet_385_json="de170494-00f2-424b-973b-3968270c17e2",k.Spine_pet_386_json="84819714-205d-4d02-a451-fced28fd1c1f",k.Spine_pet_387_json="0bc3c4e3-7026-46d3-8aa0-f3265f94f3dc",k.Spine_pet_388_json="9035e4f1-aede-4714-91e4-c1dc12bb5477",k.Spine_pet_38_json="d30943f7-dc35-470a-9b3b-ffd1a5ea9fb0",k.Spine_pet_39_json="1509e1f8-d714-4f2f-8507-d6f3c0845004",k.Spine_pet_3_json="add03fa1-e749-4028-9f5f-2006ca8ec61c",k.Spine_pet_40_json="12f8fff2-2d78-4921-80bb-2c4633017a30",k.Spine_pet_41_json="8a951385-592e-4866-a45d-4cb8b098dae1",k.Spine_pet_42_json="90dc5e5e-27bf-4b97-a99a-d09422e0a7b4",k.Spine_pet_43_json="408c81ec-ad18-4bea-8f0f-dda95dfe6e89",k.Spine_pet_44_json="a1d89955-0c4e-4b51-8810-f4cb3815f475",k.Spine_pet_45_json="619bedfe-f98f-4704-b64b-c9542c8a86c9",k.Spine_pet_46_json="79f7b288-f2a0-4552-9572-b304de66143c",k.Spine_pet_47_json="c9e962b1-b84c-44f0-b3a6-8030fdde7da9",k.Spine_pet_48_json="f758bfe7-5685-49fa-8b3a-18d93f2b7908",k.Spine_pet_49_json="bbc51b00-f855-4e47-9eba-2a762f68277d",k.Spine_pet_4_json="32d65bff-0a01-4411-8745-c048727140c2",k.Spine_pet_50_json="e9e6bb32-dff9-4b8d-acb3-3219e2683a0b",k.Spine_pet_51_json="9a8a8949-a4ff-4425-9fd1-b73774e62ebe",k.Spine_pet_52_json="08dbac2b-a7e5-4f96-ba2b-80f0b40d0788",k.Spine_pet_53_json="d381c981-16e7-44ac-ab10-6fc3dbeb085e",k.Spine_pet_54_json="cba7ed04-3099-4318-850b-f94e9ab0a89b",k.Spine_pet_55_json="e65aed4b-98a6-42c4-8d18-cb7b80df56a1",k.Spine_pet_56_json="221d7b8c-8774-4619-8bf8-199d6b3b971a",k.Spine_pet_57_json="3a8b8144-a3e1-4f37-9f79-3d85328b161b",k.Spine_pet_58_json="d401fedd-1dce-4a05-91f9-fe76b5e637e7",k.Spine_pet_59_json="38fc3b6d-36ec-468c-97fc-b394cb4fe357",k.Spine_pet_5_json="8fb4d9f5-1e7c-4a8c-9271-73f0d6fb646d",k.Spine_pet_60_json="65cf58a8-1abb-4dfa-9780-61371f97e9d3",k.Spine_pet_61_json="411b40ee-b5a9-4f55-931a-8e6ec3939387",k.Spine_pet_62_json="3874a12f-fbba-4c08-ab33-74e6ba093f91",k.Spine_pet_63_json="bd1ce8fc-2f5b-41d3-b7e0-d50d201102b1",k.Spine_pet_64_json="52117a24-42aa-458e-85ba-01c568bf342b",k.Spine_pet_65_json="23110903-a73e-4861-a011-9f532b7113ce",k.Spine_pet_66_json="57749f9b-cc40-41f1-958a-d093374231e9",k.Spine_pet_67_json="f9eafd46-3238-465c-8568-6f2ac5856ca9",k.Spine_pet_68_json="9cdd62a1-8a47-4009-af6f-ded41154f153",k.Spine_pet_69_json="1d203682-b718-4692-845c-bae34b4c26a7",k.Spine_pet_6_json="c44c9ea1-7825-4615-b226-dc0e5643b703",k.Spine_pet_70_json="8f922a86-a9fb-4c3b-876d-40fb86cc4b02",k.Spine_pet_71_json="483c041f-4cc8-4eac-b8d1-ba8bf5547479",k.Spine_pet_72_json="9adc54cf-5cfa-43c9-8308-acc108bca6ab",k.Spine_pet_73_json="5c66afeb-b3b2-411a-9ff5-85592376f267",k.Spine_pet_74_json="fafea933-9e0c-418b-9e5a-fe86f2fcc346",k.Spine_pet_75_json="0054f56f-d3aa-4d99-98fb-7593fb5f8e22",k.Spine_pet_76_json="b23cc2a4-201b-46e5-8871-8e3acc355543",k.Spine_pet_77_json="eefd8726-0799-47c6-badb-f3f82008ff3e",k.Spine_pet_78_json="28cddc60-1e65-4dec-951c-a9b243e0e7d2",k.Spine_pet_79_json="7316756f-343e-4eac-b1a5-3c3102a8fde6",k.Spine_pet_7_json="d4f40b3a-db9e-4227-975c-1c2fbc412cc0",k.Spine_pet_80_json="4ecbbb30-2198-4f9b-8e36-811a3a2f5851",k.Spine_pet_81_json="545d4399-1be1-4b1f-8c8b-8768f17f5e7c",k.Spine_pet_82_json="154eb84b-0008-45fe-b1af-4324c2b2072b",k.Spine_pet_83_json="95d85b7d-f6eb-481d-97a3-555af4d96ebd",k.Spine_pet_84_json="ee979a66-45d4-4cb5-bdfa-c5a760dddcde",k.Spine_pet_85_json="17197284-ffdf-47ef-bc06-adadde125d38",k.Spine_pet_86_json="9374647d-3952-463d-ac92-74ea856595ad",k.Spine_pet_87_json="125184d9-b7a3-48aa-96cf-55f2c717abf7",k.Spine_pet_88_json="7a74f3d7-91b0-478d-a978-59c4bc831c98",k.Spine_pet_89_json="6a64d518-11be-47f0-bfb7-3bb7efd302d7",k.Spine_pet_8_json="76b98aa0-b8f5-4558-85aa-d99b07aa9e91",k.Spine_pet_90_json="8280245b-4c0d-41a4-a3ee-61c1b15fda11",k.Spine_pet_91_json="8dfffb36-1565-4847-840e-8ffb6853c490",k.Spine_pet_92_json="fbbfa853-93e2-4b08-b58f-fb472af20e00",k.Spine_pet_93_json="6db5f3f4-62f0-4ca1-8260-ff78d42fac2a",k.Spine_pet_94_json="dd15ead8-2dd8-4cf7-821c-5daa86b6da6c",k.Spine_pet_95_json="ba7e2558-286c-4b2b-8d5d-a73ee1d8d3bc",k.Spine_pet_96_json="723f981e-5a16-43d6-811c-90bca1ce7a58",k.Spine_pet_97_json="001c63b3-b912-4cc4-a267-6b6ba46f9dbe",k.Spine_pet_98_json="53a00330-ee9f-40bb-a41f-2cea2f578e2d",k.Spine_pet_99_json="763ef1d6-8adb-44ad-b8c4-0f6452323862",k.Spine_pet_9_json="ac66a86d-2212-45e6-8075-35f05ae3d06f",k.Spine_pet_battle_rescue_back_json="1618279c-80fc-44f9-8351-ab0a792c8e53",k.Spine_pet_battle_rescue_front_json="a27f0b05-9ef5-4060-a06e-43557b7c7a2b",k.Spine_pet_battle_rescue_json="079ab5ab-0f58-4289-8c41-154d936f797b",k.Spine_pet_card_shine_json="443300f2-c3ad-4059-af40-d6f31e4e3001",k.Spine_pet_empty_state_json="12bb11bf-3ac8-4fc7-9f63-fbf4aa535984",k.Spine_pet_rescue_card_json="d1d15cbe-544c-4793-afcf-0ebfc4aae1f1",k.Spine_pet_rescue_json="8e94ea91-a3ba-4cb1-a821-34a6713565a2",k.Spine_pet_shadow_effect_back_json="a68a9e63-4d4d-403e-a7d6-89338db8e4f1",k.Spine_pet_shadow_effect_front_json="1cb949f7-e03d-414e-9306-4068ac1a1d15",k.Spine_pet_shadow_effect_json="9fceb8cc-f22d-4732-b03b-cbacc58d5aac",k.Spine_petbook_stamp_json="59792db7-52fb-4bc3-be12-555563f4b3df",k.Spine_petslot_unlock_json="74dd84ba-64a2-4f90-b9a9-b7d8d9a0be69",k.Spine_physical_blunt_json="70b97c74-dc3e-4bca-a869-4d5b2374df8d",k.Spine_physical_impact_02_json="002cafd0-673f-44d3-96c3-0a97f1092f77",k.Spine_physical_impact_json="fc0bcea0-f460-44f6-91b4-8cae6afcf9ac",k.Spine_physical_multi_impact_01_json="37ab6fd3-1d5e-4050-ad95-a1d572954472",k.Spine_physical_multi_travel_01_json="840cf48c-6ea6-4c0b-94e8-4d6e13faef1b",k.Spine_physical_pierce_json="9cb32bd0-be63-44e1-80fc-8dc73f5579eb",k.Spine_physical_slash_json="b7a6d581-0f46-4a29-9a71-fc6f116353bc",k.Spine_plant_eg_single_json="86d0078c-b0d7-40be-98de-17003291d9cf",k.Spine_plant_gryphroom_json="78c1f487-d6a0-430f-96c6-e27fb99485b0",k.Spine_plant_multi1_json="14670d48-47fb-4dc6-aa3b-35f7472ddaa5",k.Spine_plant_multi2_json="37bf9991-56b6-4689-88e5-d3f5c0d2d4a5",k.Spine_plant_multi3_json="68ea87b1-dc1f-40f4-8e81-014b99115eb7",k.Spine_plant_single1_json="01ec85a7-e4ec-4565-a0bd-0db6ba14b5f5",k.Spine_plant_single2_json="2dca9468-59a5-4b9f-8d45-70d000f596eb",k.Spine_plant_single3_json="a5d233a0-0fc9-4ca9-a15b-c19184f6f4a0",k.Spine_plant_single_create_02_json="27800f7d-7858-4543-acfb-cff0e7c4b445",k.Spine_plant_single_impact_02_json="712f6dfc-f5e1-4fc9-8096-00330d2957c8",k.Spine_plant_single_travel_02_json="5e65fa82-626d-4320-a184-e745b8235196",k.Spine_plant_single_travel_03_json="c7b19b50-253f-437a-9d4e-3d2b16958612",k.Spine_plinth_carousel_dark_json="63bc53ba-296b-4f42-930a-9d8a1d75c8b1",k.Spine_plinth_carousel_json="69ad4fa3-a8fa-49b5-87aa-112a38df01df",k.Spine_plinth_pet_158_json="1c86e40d-4138-41dd-b9d2-bdbe9bc04929",k.Spine_pmlock_elevator_json="08fdd21d-60d2-49d0-b509-db16c81a5ed2",k.Spine_pmlocks_basic_json="f3022233-9983-4236-a894-40f488343ce2",k.Spine_podium_flame_json="c30192a9-fc3a-445c-85d5-49fcd38e6c9e",k.Spine_pumpki_poof_json="2244d003-f8cd-472a-9483-5e202342aae0",k.Spine_puppetmaster_map_smoke_json="25209d4b-5f25-470a-8ce5-b76a4b82a926",k.Spine_puppetmaster_smoke_json="86320697-486a-402f-a619-d1cfc7cc2567",k.Spine_questionsanswered_confetti_json="682130c5-ae92-4565-8446-0c0bb0a09400",k.Spine_rainbow_works_json="ab1d4710-471a-4cf8-a7e8-18fb0bee27e3",k.Spine_rank_bar_json="3d79db6d-b5ac-48f0-a741-5f9500feb79c",k.Spine_rasterreveal_json="57bf17e8-b38a-4983-9ed4-293c4f43c822",k.Spine_rays_celebration_json="a47ccfc5-2b81-42f5-83a4-ed255d9864b8",k.Spine_restrictions_card_flip_json="8b960170-692b-4232-a8db-3fccc166aa8d",k.Spine_revive_json="0ff4db7b-40fa-47ed-9949-30508dbb142c",k.Spine_rift_modifier_reroll_json="cc41d68e-4734-4909-b890-bf3ea0479346",k.Spine_rift_pet_revive_OL_json="edb88c3b-65e2-4dda-9c64-b9a2f610bc37",k.Spine_rift_pet_revive_UL_json="bebd20f0-619b-4680-ac9c-a6b16218751b",k.Spine_rift_portal_astral_json="7f1c4560-6aea-43d5-9403-3d1173f6fea2",k.Spine_rift_portal_basic_json="bc72e20c-385e-4b2b-b0b2-67e34edf064c",k.Spine_rift_portal_fire_json="e88735cc-1554-4368-a604-bcd4e1fe7ec9",k.Spine_rift_portal_gold_json="4f33945f-59bb-4f19-881f-410173a12ee4",k.Spine_rift_portal_ice_json="3a6ec369-8f9c-4f09-a45d-076f05062ce3",k.Spine_rift_portal_physical_json="cb982d3e-538f-4cb3-a5ec-5477c16a6bff",k.Spine_rift_portal_plant_json="8548f003-2fdd-4cf3-ae38-e7b712f5f7ee",k.Spine_rift_portal_shadow_json="518eab39-88a6-4bee-adb2-d9179d743a34",k.Spine_rift_portal_storm_json="11230246-6f5b-4581-9d59-1dfd62bb7dd2",k.Spine_rift_portal_water_json="350d8b01-a273-4fa8-849f-1d7e552bf1bf",k.Spine_roar_impact_01_json="c982cef5-79ff-42b6-8e05-a6c389f9fa2d",k.Spine_roar_single_travel_01_json="50817345-eff4-45f6-8b8f-baf97d43a569",k.Spine_rune_equip_json="51abe61f-a912-4358-970c-8165c781472c",k.Spine_rustling_bush_json="30c554f5-f314-4466-8c4d-132d4d8c5929",k.Spine_sandpile_shipwreck_json="ab416c70-bd78-4ad7-b9ad-c3344613ad30",k.Spine_screendebris_json="ddf266b4-90c7-49d7-8dc6-c31f6c234329",k.Spine_segmented_offers_rewardclaim_json="d140a5dc-144b-49d0-8f0f-4c3279687b61",k.Spine_segmented_offers_stamp_json="eecd178b-33fb-46ee-a9be-1991375ede0d",k.Spine_shadow_boss_shield_json="20ffe378-58cb-4b1f-a3a7-5f13c00ad68b",k.Spine_shadow_fire_create_03_json="7c90bafb-2e8a-47d0-addc-4e9e3b840023",k.Spine_shadow_fire_single_impact_02_json="14747ca0-0266-4a44-988a-84bd8f34fd09",k.Spine_shadow_fire_single_impact_03_json="dba630a0-7d92-43b8-adcc-5f217636e551",k.Spine_shadow_multi1_json="8d00a6c2-3d71-44f3-b6db-7784d2a2fe54",k.Spine_shadow_multi_create_01_json="f823ad07-28b3-4761-a22d-6d0378d5745f",k.Spine_shadow_multi_create_02_json="5a58af70-04c8-45f9-a927-bba840c0afa9",k.Spine_shadow_multi_impact_01_json="55ae8376-fff4-47df-bd21-50b9368965c9",k.Spine_shadow_multi_impact_02_json="67334c48-3a25-4ec1-b9ca-2345e3687f9b",k.Spine_shadow_multi_travel_01_json="e13582f2-f864-47b7-a388-8061b6a5155f",k.Spine_shadow_plant_single_impact_02_json="b4de27b9-7f94-4705-aed2-5be14038084e",k.Spine_shadow_plant_single_travel_03_json="714db27a-6577-4004-be01-48d70b173be4",k.Spine_shadow_single1_json="e1ae5dea-ecb6-4d0b-b0fc-a8d7d7b15e22",k.Spine_shadow_single_create_01_json="f52dc182-b35a-4650-8418-d9086019b460",k.Spine_shadow_single_create_02_json="d51983d3-59fb-4485-87c7-3ddde2123cbe",k.Spine_shadow_single_impact_01_json="dd8ccc18-07a8-4a6b-b708-6e2c6f5481a7",k.Spine_shadow_single_impact_02_json="ab1afb1c-e0c2-4553-a574-cfc8ee1dd823",k.Spine_shadow_single_trail_01_json="823987b7-5991-4899-8ebb-156a95e42f53",k.Spine_shadow_single_travel_01_json="fd59918f-8d2f-4c74-8138-3749b54aceaa",k.Spine_shadow_single_travel_02_json="9868be2c-c7af-47a7-be1b-6f5c2460423d",k.Spine_shadow_summon_json="1f3c05a1-3613-49d6-ae59-b174e8b26ffe",k.Spine_shadow_water_multi_create_01_json="af192621-930a-4419-876d-a90674b58205",k.Spine_shadow_water_multi_impact_03_json="d7dfd04f-c368-458c-9bf0-d31150e55591",k.Spine_shadow_water_single_create_01_json="4b4215a9-8b31-46c1-b28a-395bf5c533ec",k.Spine_shadowclash_json="ddfdd75d-777b-4e3f-a72e-cf41a1c53709",k.Spine_shadowportal_json="f3ab5ae5-8c4c-4a06-bce6-d634f02fe8d7",k.Spine_shipwreck_bubble_json="0e05fb87-ca6e-4c9a-8694-acc6b0deb1bf",k.Spine_shipwreck_squeak_json="c8942f5a-21f3-4bbf-91c9-79dfa82319a6",k.Spine_shipwreck_tornado_json="44e7a15d-85c6-47cc-950d-6298e9ccb855",k.Spine_shipwreck_unlock_json="e337846c-b83a-41d7-a49e-97d5651c2180",k.Spine_shipwreck_whirlpool_json="8cce319b-1a79-4fc6-8fa8-d67d47014b5c",k.Spine_shiverchill_unlock_json="c951c214-d5c5-44b1-af9c-c18039cd82b8",k.Spine_shop_cardglow_json="14d063ae-f7ab-4555-acc3-413975d82146",k.Spine_shroud_json="411a3889-759f-424e-87a0-2093ab698334",k.Spine_skywatch_elevator_json="388253ab-685a-4791-8d2e-516eec48870e",k.Spine_skywatch_unlock_json="8a39400a-d58c-4d8f-bb15-4bbb89557019",k.Spine_smartblock_vfx_json="ab0445de-9cb2-4527-8224-9a8004bba0f6",k.Spine_smoke_1_json="56de05e0-5658-41a6-8972-2e27f5047c47",k.Spine_smoke_2_json="f6f6fc75-071a-4e0c-90f8-e1a713dfbb80",k.Spine_smoke_flagmask_json="857120d1-0edb-46f5-bc0d-bcf03d61b23a",k.Spine_snowpile_1_json="34cd3817-0a0c-45fa-a304-04c8b53a9cac",k.Spine_snowpile_2_json="6f814fe8-3d8f-45f3-9dfe-ff5087a02521",k.Spine_snowpile_3_json="dcb8ea90-3766-41a1-a01a-d811c56ced40",k.Spine_snowpile_shiverchill_1_json="457740d1-6c48-43cb-b787-8cc9a527b939",k.Spine_snowpile_shiverchill_2_json="d85ca9fd-1360-49e2-bfd7-bef3cbe07af7",k.Spine_snowpile_shiverchill_3_json="d8282472-29c6-46c4-8040-9ce4f2c36332",k.Spine_snowworks_json="72a5b25a-bb3e-464b-b023-9330b7cc8ffe",k.Spine_socialfeed_poof_json="e0748643-78ff-4577-a1f3-567965b360f2",k.Spine_sparkle_2_json="65e4176f-66aa-40e1-9e1b-cc491956556f",k.Spine_sparkle_button_json="d5b86d51-51e9-40c8-b11e-69b9cb25c51e",k.Spine_sparkle_button_petrescue_json="810fc55f-5b83-4ef3-94a8-f3b22bc0f5ee",k.Spine_sparkle_pbf_json="301f36f5-f242-4752-bb5c-9dc7b588e3bb",k.Spine_sparkle_worldmap_json="52970e19-53c9-4ee9-bb9c-cac5d85c68c3",k.Spine_spell_astral_impact_json="fc83527c-99a6-45de-9802-66fd576ef070",k.Spine_spell_beebee_aoe_impact_json="e0a42f0d-4274-4503-bff2-2649906be057",k.Spine_spell_bok_aoe_impact_json="a51d7221-d8fd-4346-846a-8be149b4fd16",k.Spine_spell_eve_aoe_impact_json="159c2116-0233-4c22-b246-6ca356c12dfd",k.Spine_spell_fire_impact_json="159c75ee-03f2-416d-9f7f-10526aa59cdf",k.Spine_spell_flora_aoe_impact_json="dda92d38-179c-46e9-8596-3e62a22b10b7",k.Spine_spell_fumble_json="8935cf27-c92a-4603-a3ee-0e44f3c862e8",k.Spine_spell_ice_impact_json="bf28a438-8785-4f91-aa8e-d566f6f4799d",k.Spine_spell_noot_aoe_impact_json="ad317a02-5edb-4132-b5a9-3d2a557554b3",k.Spine_spell_plant_impact_json="cb6cb725-01ad-4a04-af1c-b07e7feb1a7b",k.Spine_spell_shadow_impact_json="108f9f97-b729-43e7-89ea-0f77faf2043b",k.Spine_spell_slurpy_aoe_impact_json="e1c30b47-0f01-42b1-93c5-0eb71f8b350e",k.Spine_spell_storm_impact_json="b12ee3be-96cf-4bc2-9e4f-bfd1d354d2a4",k.Spine_spell_water_impact_json="959fcd45-0c45-4dc7-9ad4-c7574416988d",k.Spine_stage_intros_json="314c0ca6-0c20-43e8-899c-5787c3a4f30e",k.Spine_stair_lock_json="3b3faa30-1c94-4eff-8445-0e615b782494",k.Spine_starjar_json="25f0a9cd-a4ac-4780-9799-750eaad56346",k.Spine_stateChallenges_milestoneReward_json="a3638eb1-108b-45e3-ad43-0e45d2a34898",k.Spine_stateChallenges_rectangleGlow_json="a184d13b-e427-42a7-ba18-2c1ae7ac1dc1",k.Spine_statuseffect_buff_json="0984e03a-4c96-44cb-87e8-7a725c161594",k.Spine_statuseffect_burn_json="95f3e5f4-cabb-4acc-9bcb-e6c74ef4c9ee",k.Spine_statuseffect_cleanse_json="f7c7e44e-89e3-40e3-9f13-1555dc61f1ed",k.Spine_statuseffect_confuse_json="54d6b02d-e05d-4a30-b3ff-a63ae14ec788",k.Spine_statuseffect_debuff_json="aa56d6b8-2880-4900-84ae-c77452b01629",k.Spine_statuseffect_frozen_json="ee5461bd-c4a2-4cd7-861d-f2b432436f63",k.Spine_statuseffect_heal_json="afcaeb58-c01a-408e-a11b-7e73fd56c8fe",k.Spine_statuseffect_shock_json="5fca11d5-698c-4b36-9c50-09f8beb229a9",k.Spine_statuseffect_taunt_json="3b33f7bc-9213-474d-b548-27e1451875bf",k.Spine_storm_eg_single_json="ac67a755-3c46-4547-8eb8-d43a47ef34a3",k.Spine_storm_multi1_json="5ef5090e-da69-435c-8c04-465a5622ae11",k.Spine_storm_multi2_json="cf9d4964-a1eb-4798-a0e4-917c850a25f0",k.Spine_storm_multi3_json="f64da219-29ea-4e48-a795-093126882066",k.Spine_storm_single1_json="bfe8d7cb-f773-482f-820a-25b89f788cdb",k.Spine_storm_single2_json="f4d2eb09-a4f4-4a8c-a88b-3046a7f3a6dc",k.Spine_storm_single3_json="06fe4cad-96f6-432c-b1f5-d4a333239e88",k.Spine_storm_single_create_01_json="27806031-20d0-4201-881a-0f857d43e9e0",k.Spine_storm_single_impact_01_json="49aa8f66-6395-462d-aa7b-e8d3467ac3ce",k.Spine_storm_single_impact_03_json="9399362d-177f-4369-a9f6-0b490799218a",k.Spine_storm_single_trail_01_json="1cf136e9-585b-4a43-aedf-07d915303153",k.Spine_storm_single_travel_01_json="cd0f9883-d35e-496b-bfb8-f0d5a6eedda1",k.Spine_stubbornshadow_json="669693a9-f63b-4488-ab35-78c8bc49dfa6",k.Spine_teleport_fog_json="4b9872cd-ad65-44fa-ab94-a3771b4ec2b0",k.Spine_throw_gift_json="2bfdd297-bb17-4af4-91d3-86bba1f63942",k.Spine_throw_gooball_json="58c4d590-862d-4ce4-afc8-56db823b208c",k.Spine_throw_pudding_json="95fa71c8-429b-431b-8872-5884e9f22cb0",k.Spine_throw_shadowball_json="0c8864e6-7a01-4d4f-9634-0d79bbc54664",k.Spine_throw_snowball_json="6d4e13ef-839b-4027-9fad-260ec3e8319d",k.Spine_throw_staticball_json="0fdc3d0b-cf4e-47c6-ade6-2658a8c504cf",k.Spine_throw_tomato_json="c5412998-f03c-4d18-ad86-7ef12f50147f",k.Spine_tower_elevator_ice_json="af751d21-0f20-4943-8120-c470a2efb8fc",k.Spine_tower_elevator_json="03de5d63-326d-43b5-a8d0-57cf7394e64d",k.Spine_tower_unlock_json="47c8154d-4060-4faf-b9ee-90172f5b12bb",k.Spine_towertown_unlock_json="1b212ea9-d472-45b9-8391-0c00c919cf1f",k.Spine_town_unlock_json="0768d5dd-0448-4244-b3eb-f174c1c1eb8c",k.Spine_trap_door_glow_json="9a7d122c-1b21-460c-be96-a2ef2acaebe2",k.Spine_ui_roulette_json="ea743ba8-af6d-443c-97ef-0693b7ebc86b",k.Spine_ui_unlock_json="f8d80054-fd59-4027-8727-59c78ef168a3",k.Spine_ultra_chest_coins_json="b1df00b2-8582-42d6-b0bb-30ab19a1820a",k.Spine_ultra_chest_json="a2f331e3-ba0a-4c1a-8f79-c7134b1230a6",k.Spine_ultra_chest_sparkles_json="0b8d92ba-b29a-4fc5-b28b-f4c055df4ca7",k.Spine_ultra_modal_json="0a076053-adef-4912-b73a-8dca45c7ba6b",k.Spine_upgrade_radial_json="49dec81e-74df-45f1-af3d-d2eb3e37580e",k.Spine_vegabloom_button_fx_json="553151eb-91d2-453a-bd95-dccceaf88125",k.Spine_warden_bubble_container_json="87dcc185-20cc-4181-bb29-7b9aa3be4767",k.Spine_water_balloon_splash_json="9c38c71b-7b50-48d8-b5b1-dd0d13633536",k.Spine_water_eg_single_json="a5d83ac5-9a39-4f4d-971e-2a22d32d3437",k.Spine_water_multi1_json="911ec137-99b0-42a5-8b71-7dfaab36d5bb",k.Spine_water_multi2_json="24ad5a52-cb70-461e-b571-b8bc7650ec04",k.Spine_water_multi3_json="b1a6c68b-0fc3-4d4d-b621-905076602db7",k.Spine_water_multi_create_01_json="ddd9b47c-713d-4654-9782-daa66a20cda5",k.Spine_water_multi_impact_01_json="28c9205e-6b34-43f0-809f-afef80091df3",k.Spine_water_multi_impact_02_json="f203683d-ffae-4b6c-9a60-980f9d5fe962",k.Spine_water_multi_impact_03_json="ebc02f04-132a-4c72-a4ac-1e835bdd28a8",k.Spine_water_single1_json="f9b045b8-6845-419b-b619-500a4c4012af",k.Spine_water_single2_json="4ed9e0af-ae89-46fd-a151-c8cd6baa66b2",k.Spine_water_single3_json="1736e1ff-7720-49dc-bbee-da12815746ff",k.Spine_water_single_create_01_json="eb06f3ec-53fb-4e70-acf0-f70045c49533",k.Spine_water_single_create_02_json="9f4d7a2a-765a-45fd-9293-e38d12a4e90b",k.Spine_water_single_create_04_json="cee1c753-c9e1-45b3-8530-41b64d7ddf0e",k.Spine_water_single_impact_01_json="dabf6d5d-3084-461d-b401-010eada3c3e5",k.Spine_water_single_impact_02_json="64be31ab-6e40-4842-b420-098f8cef03bd",k.Spine_water_single_impact_04_json="7677528f-dd6c-4c96-ae41-3442616a9ad0",k.Spine_water_single_trail_01_json="ef3d04df-f8aa-4820-99ed-3bd8af1814a8",k.Spine_water_single_travel_01_json="29611ca2-2d5e-485e-85ae-6ca0f710cbee",k.Spine_water_single_travel_02_json="5624c1c1-9170-47dd-a0e9-9977f4e4349c",k.Spine_water_single_travel_04_json="cf2a3e86-1024-4f28-9afa-065437351bbc",k.Spine_weekly_challenge_bar_shine_json="22b27b76-f5b7-43e7-ac7c-d684bbd81aa9",k.Spine_weekly_challenge_bar_shine_narrow_json="b1ce8878-85ae-4de7-b78a-9e93cfbfae20",k.Spine_weekly_challenge_gear_splash_json="4b33100d-2eac-4626-8739-b6ccf65f51c9",k.Spine_widget_gold_back_glow_json="3c590432-e93a-4ded-9bbc-5df1b74e5ee5",k.Spine_widget_gold_curtains_json="52b4cc0c-3e71-4b94-a675-b5eb78da1836",k.Spine_win_streak_fx_json="08147bc7-1137-4834-b244-3747f2b272f0",k.Spine_wizbank_highlight_arrows_json="240127a1-6f6c-4bf5-b0d0-f8d3a7340dac",k.Spine_xp_stardust_json="feb77d5a-6b1e-4f2c-93ba-ef42bfe1d9d3",k.Spine_xpbar_json="35e6c8de-6c84-4070-81dd-d107aaf2449c",k.Starlight_wheel_ui_explosion_json="ae42147f-2626-452b-82ff-1b1c724ca2da",k.Storm_boss_18_json="1284e8c2-1f64-491d-80f9-c2d2a3b7152a",k.Ui_exclamation_point_json="adfb6f59-917d-4556-9dd1-6bc6e6592497",k.Vertical_dorm_149_json="c8fcb677-58c3-44c5-9a88-8b969dd7a3c9",k.Vertical_dorm_150_json="376f0dd1-3a79-4e5b-a130-a253df4f3d3e",k.Vertical_dorm_151_json="e97ff833-c9a5-482e-96b0-193f18994045",k.Vertical_dorm_164_json="c40bbcb5-e068-4918-a307-7f999a54b9b1",k.Vertical_dorm_169_json="45a1b43b-82de-4e5b-8b40-9c2f38dc1e38",k.Vertical_dorm_171_json="508f8f69-39f9-43d6-a967-3e95f4a30827",k.Vertical_dorm_182_json="bfba625d-606f-4074-ad3f-8227d6a90971",k.Vertical_dorm_187_json="b6a644fb-8606-4395-9578-34323b130f77",k.Vertical_dorm_202_json="194ad7e5-6c52-4b09-84a5-ad5cdcba126f",k.Vertical_dorm_204_json="84269f57-8130-4033-8cea-50f632ed0c7b",k.Vertical_dorm_206_json="fb457271-af4b-493a-8b86-bdef84f904bb",k.Vertical_dorm_213_json="ad58cb4e-07ef-45d3-8c02-ef18b226f58c",k.Vertical_dorm_228_json="94abe624-b7ed-4cb5-a5bf-88b4f055c84c",k.Vertical_dorm_235_json="be957dd8-1be1-4772-ad73-0ec86879d017",k.Vertical_dorm_236_json="d306b289-6418-4e4b-ac5a-384f6c7c9504",k.Vertical_dorm_242_json="eefb91d3-c32a-425c-bf2f-82b735f26a59",k.Vertical_dorm_247_json="de966ddc-43ee-44e6-b6eb-ddfb5f0007d5",k.Vertical_dorm_248_json="8aa786bd-7f9a-4286-ae9e-8d6c9095ef67",k.Vertical_dorm_249_json="02c10e9f-a3fc-412b-bdec-8e5d778ec0dc",k.Vertical_dorm_250_json="f397dec3-d99d-4cb8-b3f0-fa9e51117c4c",k.Vertical_dorm_251_json="408f9fec-2fc7-42ae-b3dc-51d363b3f2f3",k.Vertical_dorm_257_json="cd7d1d94-1384-4b64-814f-5568d8962fef",k.Vertical_dorm_273_json="d4ef92b6-8374-4840-8b41-6ff901a35dd6",k.Vertical_dorm_276_json="f3278cda-37b6-4158-91d9-9d816927dc65",k.Vertical_dorm_284_json="f987b2c7-8fce-4dd1-9aa5-852fe12ad2f7",k.Vertical_dorm_287_json="f935c283-a64b-40e7-b163-69912f5fb8d5",k.Water_boss_18_json="83754d21-6ea8-4c2c-8a01-a15317a5e90f",k.Wishie_mlp_json="68a39dbd-05d6-4964-935a-453b82aa1a02"}(F||(F={}))},47101:(k,B,U)=>{"use strict";var F;U.d(B,{N:()=>F}),function(k){k.Battle_academy_classroom_icetower_json="7d49da25-cd3e-454d-91ef-0a3b093d6797",k.Battle_academy_classroom_json="9fef2c8a-2ff5-4670-9588-7204f3c70691",k.Battle_academy_gh_stairs_json="1f3b1af5-5868-4801-b68b-5338e46c0014",k.Battle_academy_office_icetower_json="56774bcb-6165-4235-829e-d5558d1a231b",k.Battle_academy_office_json="7ce67cd8-aa5a-4efe-af8c-2fd128061016",k.Battle_archives_json="5d4d4526-8264-4db6-bd65-8d8be4868e2e",k.Battle_bonfire_inside_json="4f9b4c38-36d4-4dcc-83c3-aa39e345fd6c",k.Battle_bonfire_lava_json="545efb2b-e4e2-4797-927d-f5f0fadc1672",k.Battle_bonfire_outside_json="4908067d-bf10-48bd-9341-81ae43b755de",k.Battle_coliseum_outside_json="be143d35-4108-4619-9333-ef105a97d25e",k.Battle_forest_generic_json="29f4ad28-df74-4133-958f-12bbde4cc27f",k.Battle_forest_outside_json="62ae1ab1-881c-472f-bc99-7eb63564e017",k.Battle_lamplight_outside_json="f369358a-fdea-43c7-83e6-c1a5b1f3e467",k.Battle_lamplight_outside_pumpkinfest_json="087fd393-236a-4749-bdd7-dca2b7708960",k.Battle_lamplight_outside_starlight_json="9d7b7d41-fa35-41a7-af78-87398d3eeff1",k.Battle_lamplight_outside_winterfest_json="e30f311b-73b7-409c-8850-46f8ae854b3c",k.Battle_shipwreck_outside_json="19cbd9ec-281e-4fe3-80fc-72edfd2289ba",k.Battle_shipwreck_underwater_json="ef6a2f9a-5d14-4afd-8767-e34ca09db5ee",k.Battle_shiverchill_inside_json="9ee1391b-9efb-4898-ac14-7d0168d82825",k.Battle_shiverchill_outside_json="d0e470ef-38cc-4dc7-8259-ab85abd2cf5a",k.Battle_skywatch_inside_json="9b95d790-0d89-48dc-a95d-add23a4d3885",k.Battle_skywatch_outside_json="19a67124-2042-4cb6-a4b9-4a39c0d02002",k.Battle_tower_inside_json="0a2117f2-2b4e-463b-b22d-00e4b9404e03",k.Crystal_caverns_hub_json="67ec1606-d695-41ec-88ba-6876f7fe0d00",k.Crystal_caverns_phase_1_background_json="a1c2a605-dc9c-4f76-b363-bbeca6debfe9",k.Crystal_caverns_phase_1_foreground_json="364efa34-077f-4d8b-a3bc-0d7d2a6777c1",k.Crystal_caverns_phase_1_parallax_json="2e392de6-e42b-4458-ae71-287de0e58182",k.Crystal_caverns_phase_2_background_json="0759b3af-02fa-4370-ae7a-15d22f098faf",k.Crystal_caverns_phase_2_foreground_json="639a8a61-d3d5-4688-ae08-93a6c603ac7d",k.Crystal_caverns_phase_3_background_json="2bf362ab-3412-4271-acfa-d3910b5ad7fb",k.Crystal_caverns_phase_3_foreground_json="fa8fe6cf-9119-4e64-807e-de26623989d8",k.Map_academy_gh1_json="e368d1be-87e5-4430-b111-4c572c5bf5d2",k.Map_academy_gh2_json="7fac7cc0-b2ea-40ec-ab7a-8d7881a7ad85",k.Map_academy_gh3_json="66955673-b9fd-41c0-8f6e-5f6968635b0f",k.Map_academy_gh_landing1_json="8776e2d9-a129-4c22-91a9-a07641113f07",k.Map_academy_gh_landing2_json="18d3ebfe-6368-49df-8378-6209646ae4d9",k.Map_activity_zone_a1_json="6cf5e606-bc7f-4fc3-9ad0-00cda2115950",k.Map_activity_zone_a2_json="a24eb7dd-550c-4340-9958-4244e2591441",k.Map_activity_zone_b1_json="ceb89fa1-b2b5-4da6-a492-9404e3ae7b27",k.Map_activity_zone_b2_json="03655c7f-c72b-463b-93f3-d109d2ec4a04",k.Map_activity_zone_b3_json="77ec3144-7a26-4956-b9f7-fbe3410ec253",k.Map_activity_zone_c1_json="8bb9bd9f-8113-4fb7-966c-073a341a14ce",k.Map_activity_zone_c2_json="3ff46e9d-7cf2-4b06-a6da-1c45d91129a9",k.Map_archives_1_json="311dbf4a-b04a-48fe-a2a9-267e63beb953",k.Map_archives_2_json="44d9ddfa-22ce-4183-97db-501a18887620",k.Map_archives_3_json="89d5a130-6fa5-498e-8257-d33f6ed6b934",k.Map_archives_4_json="275353a0-87c9-4583-a276-072fdc6c1284",k.Map_archives_5_json="f3ae2e17-8f05-459f-8b62-91c0fa16427d",k.Map_archives_6_json="eeb51aca-74d2-40d0-81d6-204bcb6280ef",k.Map_archives_end_json="01a9311b-7cf6-4026-b028-730510f2007b",k.Map_archives_m1_json="d691783e-9b59-468b-9050-bbd2aa9d8cef",k.Map_archives_m2_json="6937feb7-cc3b-4336-bd43-1ae115460f8a",k.Map_archives_m3_json="ff2ad1f6-6321-429a-8e82-f16213a52f02",k.Map_archives_m4_json="77edf0e1-c08e-43ae-ad45-c4dc03ff139d",k.Map_archives_m5_json="89092716-a398-4cc1-a8d0-f0e842bf0f7b",k.Map_archives_m6_json="215616cc-65f2-4da3-98fe-9cca6386a647",k.Map_archives_m7_json="6585633a-8266-4743-a734-03646f2c4ccd",k.Map_archives_m8_json="736ec08d-5930-4a04-abe5-11a7cecc365e",k.Map_archives_m9_json="fdc1d768-c5c5-4b7f-8149-7e6764b0edc6",k.Map_bonfire_spire_a1_json="d12078ba-8fe3-4f4e-bc02-cb46fc26f3f2",k.Map_bonfire_spire_a4_json="cbdb465d-d4cc-43db-97b0-be7f202772d9",k.Map_bonfire_spire_b1_json="bc8ae623-0245-4eab-826c-04761cdb9c16",k.Map_bonfire_spire_b2_json="c2649e06-fb82-4bc8-9f73-8d7cc5db8b96",k.Map_bonfire_spire_b4_json="39599574-6a7b-4390-9ef6-083d7143ce62",k.Map_bonfire_spire_b5_json="dd594a6a-df51-4086-9bd6-9c70d508926c",k.Map_bonfire_spire_c1_json="a11d5293-ffc0-4f17-a0cc-8dce070aef82",k.Map_bonfire_spire_c2_json="302edc0c-4538-4427-8f9b-5ef8a1aaaf2a",k.Map_bonfire_spire_c3_json="fe6824a0-4108-473f-a655-b9e85784624d",k.Map_bonfire_spire_c4_json="83fcaf30-6470-474e-accb-104f49c3a992",k.Map_bonfire_spire_c6_json="a90760f6-6eae-47f6-88f8-bfc6d32aff74",k.Map_bonfire_spire_d1_json="e1f45bcc-ea11-40d5-bd64-92305402a869",k.Map_bonfire_spire_d2_json="96c0b5b5-592d-4315-b34e-476423793798",k.Map_bonfire_spire_d3_json="d0b6c992-94fa-49d9-8d6c-6529f1a8aaf6",k.Map_bonfire_spire_d4_json="8a16f2a1-7916-4a47-879a-eeca5bd69d31",k.Map_bonfire_spire_d5_json="9e34ab11-3be2-444c-8631-e84f650d25bb",k.Map_bonfire_spire_d6_json="419bca8c-c873-4695-ae4f-6b487dbfa996",k.Map_bonfire_spire_e5_json="503b5480-e931-4c57-8171-e06673329d8c",k.Map_bonfire_spire_e6_json="5cd6758d-d72f-4065-b431-06abc3436967",k.Map_bonfire_spire_titan_json="4ed1c250-e13a-42f9-9b49-040c5ff7c63d",k.Map_cloudzone_a0_json="13a81610-b279-4204-96be-89f52ada9289",k.Map_cloudzone_a1_json="ddabfca2-b147-40d0-a8c7-25f2a40da099",k.Map_cloudzone_b1_json="cc657f0a-5691-42a0-a80e-b147917d46b4",k.Map_cloudzone_b2_json="dd38895f-209a-4342-958f-33aa31e97c7a",k.Map_cloudzone_b3_json="fa0bd594-795c-42dc-a3ce-e60e2002e0b4",k.Map_cloudzone_c1_json="3531dedf-e8f2-452f-9c6a-21399d191fba",k.Map_cloudzone_c2_json="41d055f3-c052-4880-a9f5-221ca7e75285",k.Map_cloudzone_c3_json="fed3034d-73e3-435f-bb0f-270b1b31bfb3",k.Map_cloudzone_c4_json="79161e15-a752-4c37-b965-90847cdd4b92",k.Map_cloudzone_c5_json="e9ce0e15-6b4e-45b6-9301-d9beb0528fab",k.Map_cloudzone_d1_json="0b7cec16-769b-4309-8b8e-9a9f9a2da4be",k.Map_cloudzone_d2_json="78f761e9-8505-4df6-bf1b-36ffcdc1504d",k.Map_cloudzone_d3_json="ef7e35b2-7aa4-4324-9907-490f3a2c2637",k.Map_cloudzone_e1_json="5ab29754-ccf3-49b2-b579-ba3462ebc75d",k.Map_cloudzone_e2_json="de12de37-184f-4ca6-b594-6f5647fb50d3",k.Map_cloudzone_e3_json="26210f2e-5b07-4eb0-b3a1-cac5873c0a9e",k.Map_cloudzone_e4_json="7411bffa-00c9-412d-b5b8-bb9bfa31be9a",k.Map_cloudzone_e5_json="5e195979-4a63-46ec-a5f5-9f7a9ab64d8c",k.Map_darktower_a1_json="a62c4de0-5300-4317-a0a9-9598ac39b041",k.Map_darktower_a2_json="51efddc1-b4ab-4dcd-8ef1-3a661d2dc3d0",k.Map_darktower_a3_json="e12566fa-dc26-42dd-bda5-908c50dd36a6",k.Map_dragon_isle_a1_json="efb34781-2be6-4238-a552-c2d8b85f303d",k.Map_dyno_a0_json="d5ec0a21-90ec-445b-af1a-124353adc44e",k.Map_earth_tower_10_json="f6fb0da4-a3b1-47cb-ac4f-a2b915b65d5f",k.Map_earth_tower_11_json="65c450f0-d029-49ae-9144-b65e13a49af4",k.Map_earth_tower_12_json="d44fedf4-0696-4c30-a818-97f7454fe2fc",k.Map_earth_tower_13_json="f73470dc-4b50-4f69-9227-ee7efaaf8f95",k.Map_earth_tower_14_json="c6375e14-8644-43d2-9e2a-5f37a5cbb505",k.Map_earth_tower_15_json="e6f9f23c-0f15-4adf-bd9e-f1e17559100d",k.Map_earth_tower_1_json="cc77f431-ba69-4af1-b89c-dfc8f597daf6",k.Map_earth_tower_2_json="8e029ac4-4654-4c97-a05c-f0d1b6e72108",k.Map_earth_tower_3_json="3d275749-b660-4c6d-8a0a-4bf5be7b26b6",k.Map_earth_tower_4_json="e60ab106-eb77-4f9e-9976-438a70c53cda",k.Map_earth_tower_5_json="b5ff2b72-30da-4ce6-8087-70d19126d756",k.Map_earth_tower_6_json="f6861c24-801f-4fb9-aeca-0eca0525c4fa",k.Map_earth_tower_7_json="4122e07a-797a-4298-bc53-252533379922",k.Map_earth_tower_8_json="15d8bf9d-c300-48a9-b8d3-008c9bf1d454",k.Map_earth_tower_9_json="3ed1d40e-fcae-4bd4-bb5c-c4b5b42c732d",k.Map_earthtower_common_json="dccefce9-1c05-4c1f-bce6-257dd3d489da",k.Map_earthtower_entrance_exit_json="e78f6b6b-01f6-49c7-8709-bdafc999fdff",k.Map_earthtower_warden_json="1ab3cd34-4a81-4311-8921-9bdb508b5eb7",k.Map_forest_a3_json="0f9613a0-15b1-453c-ac95-caf71a6d2106",k.Map_forest_a4_json="be652e02-f73a-44e2-b7e8-80b4a004e81a",k.Map_forest_a5_json="ec3831e2-6820-4412-8909-258f218b086b",k.Map_forest_b5_json="df61688f-eb72-491b-bfb7-86ae6673f87a",k.Map_forest_b6_json="e73e186b-692e-4288-9266-b105a9243712",k.Map_forest_b7_json="ffde6bdc-56b3-494d-adde-3e4e68904377",k.Map_forest_b8_json="de33d472-2a90-42c6-8a92-18836f608563",k.Map_forest_c4_json="0636c558-1841-4a0c-a707-a3bc3e32b981",k.Map_forest_c7_json="237c6716-58e2-46b4-97da-4b1cbd134c0b",k.Map_forest_c8_json="91f4e20a-54e5-443c-9260-5a288944ef8c",k.Map_forest_d3_json="2d235c44-f3c0-47fa-88b2-e3ef17da226a",k.Map_forest_titan_json="5aaa3b75-0bdb-46bb-bff5-e9cc1939b8e9",k.Map_house_cool_cave_json="8aee8a68-806e-4485-a73b-159a6371f362",k.Map_house_cool_cave_unique_1_json="e4a32a1a-931b-4f81-a3e5-0c981726fd7b",k.Map_house_cool_cave_unique_2_json="030b5f0a-1d95-421c-9c39-8f101371016c",k.Map_house_exit_json="6e3821b0-137e-4c98-9f4c-cea9fb05ddae",k.Map_house_exterior_json="eb11b8eb-9559-49c9-9e21-61b775ecf3cd",k.Map_house_fire_pit_2_json="40a1b488-056a-4847-99f6-537261e90d23",k.Map_house_fire_pit_3_json="2e008042-f44b-4d68-a0dc-5fe07a3182e0",k.Map_house_fire_pit_json="dd47c602-abca-4135-be16-69fd063d8191",k.Map_house_forest_json="8994dae5-6ede-4258-9358-d2ca0fb42f92",k.Map_house_house_large_3_json="17971061-851a-46d8-8d66-1094b2cd1fa0",k.Map_house_house_large_4_json="6e77fe17-29f8-4fba-a8ff-5da649e54c34",k.Map_house_icecaves_json="5d34d393-6660-4837-81fc-8deeb1cbb61f",k.Map_house_large_0_json="963bb4e4-648d-4b80-b5b6-79b89bc0808f",k.Map_house_large_1_json="86b4384c-766e-4011-9ea8-cb09a81cd504",k.Map_house_medium_0_json="4e81e52c-8c63-4b04-bd7a-e598e2d97a4a",k.Map_house_medium_1_json="c779f818-7705-401e-b4a0-f5065262cd51",k.Map_house_small_0_json="69382cb8-511c-4e94-bfc1-bb7333f381b7",k.Map_house_small_1_json="9971dab3-54f1-4e26-bd7f-800d014441fc",k.Map_house_suburbs_json="99db977c-0fc5-474d-b6f1-dc139ee593ff",k.Map_house_treehouse_json="a92f25ef-1cef-4417-88fa-113ed219da5b",k.Map_house_treehouse_unique_1_json="a3628526-3c9a-44f7-8902-75c3640cd3b8",k.Map_house_treehouse_unique_2_json="3b796247-bec2-459e-ad29-a1b82cc28949",k.Map_ice_tower_10_json="98b3debe-07cd-4301-8ebe-742211db6c2d",k.Map_ice_tower_11_json="65da3846-69c9-4b19-9529-24498a76f894",k.Map_ice_tower_12_json="5724d45e-43c7-4d8f-90c0-0af2314e5340",k.Map_ice_tower_13_json="2adbc0ca-84c8-48c9-a5d0-7bcf669748ea",k.Map_ice_tower_14_json="45c49aea-da29-4da8-badd-f61893fa9679",k.Map_ice_tower_15_json="926ccfb4-3761-4c80-87d8-8c8699e0c9f7",k.Map_ice_tower_1_json="0e2f5edf-6efe-4b45-9dac-dea34ad33b48",k.Map_ice_tower_2_json="aeb695ff-0b35-4528-b17c-60276398c5fa",k.Map_ice_tower_3_json="f772bbae-e686-45fe-bf07-1a6cdb8d959c",k.Map_ice_tower_4_json="0bd5ab5f-010d-485a-a22a-ed7489ecf054",k.Map_ice_tower_5_json="c981753b-ba79-4216-aed3-7bb5842ddcde",k.Map_ice_tower_6_json="0e2bd8df-9e94-416f-9a7d-cfad65c00b5d",k.Map_ice_tower_7_json="247a9027-68d3-4ea1-88a3-706a5a5ed79d",k.Map_ice_tower_8_json="7abc5a4b-73b5-439a-98d5-3ae7fefbc875",k.Map_ice_tower_9_json="af8d4bf3-209b-41ae-96d2-d24038c7387a",k.Map_icetower_common_json="786d4027-d807-4f39-b094-c0896dd2567d",k.Map_icetower_entrance_exit_json="8006d32b-c9e8-4b23-8378-ea5892db1275",k.Map_icetower_warden_json="61372b71-e108-4ed4-b486-6b9425066a96",k.Map_lamplight_a1_springfest_json="6e6343a5-4b78-4cf8-93d3-26fd6fb76443",k.Map_lamplight_a2_json="dce42698-5575-4976-b648-569a3b948712",k.Map_lamplight_a2_pumpkinfest_json="82dabf44-94be-4058-a564-beec1d7e1ef4",k.Map_lamplight_a2_springfest_json="a0eafff5-da33-4ed4-b7e4-09b80b7637e3",k.Map_lamplight_a2_starlight_festival_json="a961eaa2-dfd4-4a2a-bb08-da9231bb36ad",k.Map_lamplight_a2_summerfest_json="99954158-5410-4018-aedf-e7597be0580e",k.Map_lamplight_a2_winterfest_json="4babc52a-18e5-4191-a3cc-81fa0f454f5e",k.Map_lamplight_a3_json="bfd9c837-cc31-426b-a1e3-edf0e3144e2a",k.Map_lamplight_a3_pumpkinfest_json="a1945e8f-3f41-4a83-acd2-7556768b797c",k.Map_lamplight_a3_springfest_json="afa5814c-1507-477d-afe5-6243e9e1ba29",k.Map_lamplight_a3_starlight_festival_json="68c65c8b-7a64-4a89-8304-6cf169034903",k.Map_lamplight_a3_summerfest_json="4b83b20b-6d90-495c-9577-ac8aec49e251",k.Map_lamplight_a3_winterfest_json="d2c65f0e-eaf2-40e6-84cd-d2ae29529455",k.Map_lamplight_a4_json="61263e6e-bfc9-4668-b2e8-881b76def550",k.Map_lamplight_a4_pumpkinfest_json="38153cdb-7771-43d9-acd7-c938b0b9aa6a",k.Map_lamplight_a4_starlight_festival_json="d02008b2-0110-44fb-8da6-60012bb63dba",k.Map_lamplight_a4_summerfest_json="40bd8b6e-7cf2-4164-84d2-956cc6aefd28",k.Map_lamplight_a4_winterfest_json="352ce646-9ee4-41c2-b181-6eadee3bbfd4",k.Map_lamplight_arena_lobby_json="b5624cc9-0c76-452b-bd1a-97138c13c80e",k.Map_lamplight_b0_json="32f78086-cb1c-4127-9978-6055559fd2b8",k.Map_lamplight_b0_pumpkinfest_json="dae98119-e6f6-4c07-8a93-1798a108bef5",k.Map_lamplight_b0_starlight_festival_json="d78de4de-8ef7-48c7-8528-9691447d68eb",k.Map_lamplight_b0_summerfest_json="c93f58ab-f9be-42ad-a958-7cc25328cabf",k.Map_lamplight_b0_winterfest_json="fb9f2c09-b2a3-4045-aade-77d4a1e0ce58",k.Map_lamplight_b1_json="8e811293-d379-41de-8720-c0049fa46362",k.Map_lamplight_b1_pumpkinfest_json="41c54c3b-e186-4fc5-bca7-76ded96fde5e",k.Map_lamplight_b1_starlight_festival_json="4279fa93-7996-4769-8079-5d14794c86b5",k.Map_lamplight_b1_summerfest_json="bccbf96b-2e1c-4832-9ee5-e85bee48f881",k.Map_lamplight_b1_winterfest_json="de3f41c5-5e8d-44b9-8049-991713e53204",k.Map_lamplight_b2_json="ceb45405-70a7-4f5f-8f5c-2a89cc10798e",k.Map_lamplight_b2_pumpkinfest_json="34e060a2-9a81-46c8-8b39-700b41b80bf2",k.Map_lamplight_b2_springfest_json="04b68c4b-3989-429e-9188-9c92a00d7956",k.Map_lamplight_b2_starlight_festival_json="be9cf36e-87e9-4f5a-9870-f0573e74cac0",k.Map_lamplight_b2_summerfest_json="f1d33a4f-d3fb-4f63-bdb8-90875ed157d5",k.Map_lamplight_b2_winterfest_json="9dacdf6b-b677-4847-9209-1e3edb965630",k.Map_lamplight_b3_json="7a915a22-7467-44fe-b0a5-68040ae1dc82",k.Map_lamplight_b3_pumpkinfest_json="f9856954-5342-48e7-b0a1-151c3c27bb9d",k.Map_lamplight_b3_springfest_json="a9f9cde3-4e9e-4bd3-8008-fd32ad23360c",k.Map_lamplight_b3_starlight_festival_json="19e6656b-2a3d-4daf-9777-44ffe76b6c71",k.Map_lamplight_b3_summerfest_json="ca0f361f-ba47-4361-bf6d-9143f42c98ed",k.Map_lamplight_b3_winterfest_json="b945731b-7547-4256-b2da-c85818458c7d",k.Map_lamplight_b4_json="d8e18060-6beb-45df-b1a8-118f67475439",k.Map_lamplight_b4_pumpkinfest_json="df1968b8-c265-4707-b8e9-dae14edea36d",k.Map_lamplight_b4_springfest_json="b4080056-1d32-4c8d-a560-37e551fff5f8",k.Map_lamplight_b4_starlight_festival_json="56441d64-8ac6-433b-af84-3a78de66a668",k.Map_lamplight_b4_summerfest_json="f1f14e7d-b33d-4d6b-b52a-f217303dcc7a",k.Map_lamplight_b4_winterfest_json="b7a1d9d4-7b88-4ece-83a8-54bba771225d",k.Map_lamplight_b5_json="647188fe-8c93-4c61-bf53-23240caa0e2d",k.Map_lamplight_b5_pumpkinfest_json="96ae4ae5-4e35-4a24-8410-5b7b8472683a",k.Map_lamplight_b5_starlight_festival_json="9729a2ed-918b-4933-98c5-6dd472fdb980",k.Map_lamplight_b5_summerfest_json="0ad330f9-7108-4994-82fb-039b5ed82fab",k.Map_lamplight_b5_winterfest_json="b7aad8f1-01e8-4c22-8f02-0231fdfc50e5",k.Map_lamplight_c1_json="0580bd3c-2fa0-4fa1-bbea-823f0bbeb306",k.Map_lamplight_c2_json="cd85ee5b-1eb5-47db-9287-8037e5b74973",k.Map_lamplight_c2_pumpkinfest_json="ed9156f1-593e-457f-854a-a749b4bdae61",k.Map_lamplight_c2_springfest_json="3ba57b9e-dc6b-40ba-92bc-73161b629fa3",k.Map_lamplight_c2_starlight_festival_json="637b3d70-59ee-4de5-ac4f-b59c2de065bf",k.Map_lamplight_c2_summerfest_json="1dc6d0ac-e716-4b98-bd23-aaa1e487f73c",k.Map_lamplight_c2_winterfest_json="9f155a71-5df6-4b50-bf5d-ba0fb3ac8f8e",k.Map_lamplight_c3_arena_json="64471176-0054-4f42-8987-9a1562770093",k.Map_lamplight_c3_json="e385a4f0-8957-457b-8221-7764dd7bfff1",k.Map_lamplight_c3_pumpkinfest_json="193f3dc3-263b-4d19-abdc-efdef4530e9f",k.Map_lamplight_c3_springfest_json="f2f105f7-fce2-4ade-b12f-f15dbfe1d62f",k.Map_lamplight_c3_starlight_festival_json="215ad692-55ab-4ea3-9ce3-9e44dd15df1e",k.Map_lamplight_c3_summerfest_json="2445d1e5-c0f8-4918-ae71-9d6827e9f52f",k.Map_lamplight_c3_winterfest_json="e5812a74-8a81-4872-817b-8173876d3fe8",k.Map_lamplight_c4_json="1e589d19-1816-4c5f-b13c-fd2cb2750cb7",k.Map_lamplight_c4_pumpkinfest_json="9f521645-64b3-4258-a067-e861246b6794",k.Map_lamplight_c4_springfest_json="2c4819b0-d497-4d28-8d4a-31cf492ca4eb",k.Map_lamplight_c4_starlight_festival_json="77581531-9f9c-4811-aa99-bb7bd8c770ab",k.Map_lamplight_c4_summerfest_json="4d80ca6c-00ac-4421-b946-d7f80b85f8ac",k.Map_lamplight_c4_winterfest_json="b808a71b-fcfc-4f8e-9366-6035296c128f",k.Map_lamplight_coliseum_json="295c36f9-d284-409c-9f9f-1340f09b9c0f",k.Map_lamplight_d3_springfest_json="9d93ce95-7824-437a-a474-f7cbe156f9e7",k.Map_moon_a1_json="98c8873f-cbf3-471e-b7b3-5f07b72597d1",k.Map_moon_b1_json="717ffcfc-1186-465e-adaa-88b4ca207a94",k.Map_moon_c1_json="e7cdd83d-76b0-416d-b037-58a1e0c3bba9",k.Map_moon_d1_json="37773050-b869-4531-95f3-f8119583b672",k.Map_moonlight_a2_json="4b411022-9f2f-41ed-a6ce-bd3aaf229d0c",k.Map_moonlight_a3_json="52173e05-da54-4526-ba44-5e2913387fdf",k.Map_moonlight_a4_json="2171b9c4-6217-4012-bc90-72988f023e8d",k.Map_moonlight_b0_json="60b92e5f-3e1f-41f9-bd61-6dbbf291dd98",k.Map_moonlight_b1_json="5a2ca7a2-6667-4533-9029-87c0a762d64b",k.Map_moonlight_b2_json="bd7320db-bfd1-4f65-a87d-cab576787cc6",k.Map_moonlight_b3_json="6c3a5c2e-2f1b-4e66-ad58-29c2db3ee6cb",k.Map_moonlight_b4_json="8006fb7b-645b-4fd9-8380-bd10760ddd2e",k.Map_moonlight_b5_json="a78feb3c-019f-44c6-ad34-1160574bd21b",k.Map_moonlight_c1_json="39ff980a-55bb-4f88-947d-2a19aeebf6e8",k.Map_moonlight_c2_json="3d046ff2-39fd-41a5-9fa9-4ada9be70ffe",k.Map_moonlight_c3_json="42d4fcf6-fee5-48d7-9147-ba9a6aafe728",k.Map_moonlight_c4_json="fc87db94-e007-4050-b725-7a6e3601b026",k.Map_pathing_json="ad74b143-ef72-4083-ab46-d26a78c635ae",k.Map_shipwreck_shore_a1_json="bec0fc58-9498-41d0-8ada-45d417b75ec3",k.Map_shipwreck_shore_a2_json="7828b92d-12f3-4cce-95d9-adfaae779b39",k.Map_shipwreck_shore_a3_json="74c29f00-0b9f-4d8b-b2ca-d5eb7202b2c9",k.Map_shipwreck_shore_a4_json="e8b71722-1d60-4151-a0ba-91d39c463c7e",k.Map_shipwreck_shore_a5_json="7ce77ade-9350-4373-94a1-4d4ed5699bb1",k.Map_shipwreck_shore_a7_json="3fa802db-97ff-4dbb-b2b4-c76feda8da48",k.Map_shipwreck_shore_b10_json="1a935356-f241-4326-9ac9-74e173f45aff",k.Map_shipwreck_shore_b11_json="fe0144bb-89f7-4eca-96b2-68c497aa8054",k.Map_shipwreck_shore_b12_json="4aebd662-3bca-4d9a-b924-400ac15b7900",k.Map_shipwreck_shore_b13_json="f1459839-5d3e-4aaa-a0d5-bd0d37ba51c5",k.Map_shipwreck_shore_b2_json="fbd11b50-3a91-4724-b61e-894346ef61a5",k.Map_shipwreck_shore_b4_json="b0458fc9-6b21-40b6-81b6-912a11da6728",k.Map_shipwreck_shore_b5_json="f5029804-c0c0-4e9f-9627-c4df9304c396",k.Map_shipwreck_shore_b6_json="ac6a0b84-a791-4344-9057-b92cdccf4e0d",k.Map_shipwreck_shore_b7_json="2b185475-f2cd-4ffc-9b7d-6ad5fe0af712",k.Map_shipwreck_shore_b8_json="b32775d2-a9d4-481f-840d-5e479aff59a6",k.Map_shipwreck_shore_c10_json="2ff7db73-56df-41e1-a209-4cce4a069c77",k.Map_shipwreck_shore_c11_json="4f2a8777-504e-4dee-b0fe-4e6799e220bc",k.Map_shipwreck_shore_c12_json="5efd7fe7-f0b8-42e4-8f87-4a938009f84c",k.Map_shipwreck_shore_c6_json="4aed6f9b-7835-40e5-bb0f-8a82c8deee1d",k.Map_shipwreck_shore_c7_json="ae454cb2-5374-4eb5-b6df-35d19ec2ce8a",k.Map_shipwreck_shore_c8_json="ef0bbe73-7fdb-49dd-b30c-520f6434cfb5",k.Map_shipwreck_shore_c9_json="98b2032d-5b74-4f77-b656-5f9c690ab3f9",k.Map_shipwreck_shore_titan_json="1c37b8a2-452e-4b05-81b7-807f328e6695",k.Map_shiverchill_a10_json="cdabef39-c9bb-47e9-bcbf-f00277b3dfc9",k.Map_shiverchill_a11_json="1a34be63-f9c1-4d96-b3b5-6889e832832b",k.Map_shiverchill_a2_json="edba1fdc-0d0e-45ce-850b-ff83541d9b55",k.Map_shiverchill_a3_json="bfd5c27c-e0c8-4c8d-a412-b778aa233071",k.Map_shiverchill_a4_json="1c6760f4-0e81-4fc9-9a6b-73cb45da0071",k.Map_shiverchill_a5_json="c5df7827-ecf4-49bb-8747-2e8752a6ce92",k.Map_shiverchill_a6_json="f2d082d1-52b2-4946-adab-df924380347a",k.Map_shiverchill_a7_json="4b29995f-c861-48da-9dab-745e7587c12d",k.Map_shiverchill_a9_json="30a852bc-98dd-459f-836a-b95fd7d0bb74",k.Map_shiverchill_b10_json="5c7ca665-e511-4484-8efd-ab57c80a7335",k.Map_shiverchill_b1_json="151a0cab-965f-4c29-b2a9-67f72ad02ae4",k.Map_shiverchill_b2_json="54da27d7-cfea-4113-ac75-5890faf8c4f2",k.Map_shiverchill_b3_json="19ac3604-1bbb-4b61-93de-e87836cfe63d",k.Map_shiverchill_b6_json="486e7b36-c4d7-417a-b7f1-58aa3148538c",k.Map_shiverchill_b7_json="adeb5b70-e9bb-45ca-8cf6-aa34867555d1",k.Map_shiverchill_b8_json="275892c1-37f0-4c5a-bb7e-105be4dc9401",k.Map_shiverchill_b9_json="cbfc5029-bebc-4836-a62c-1dda4e79ec38",k.Map_shiverchill_titan_json="464e035a-5fc1-4d89-ad75-de065061ad48",k.Map_skywatch_titan_json="bf21572c-1080-4e3e-9390-0d5ba3770888",k.Map_springfest_grotto_a3_json="b9752a87-c7dc-4342-b0e8-4fa103714f82",k.Map_springfest_grotto_a9_json="ad4769f4-ebb5-4dab-a52b-ccc13a72184f",k.Map_springfest_grotto_b2_json="82fde97e-35f9-4355-bf9c-bc4da0f82a0c",k.Map_springfest_grotto_b7_json="66b3b0ef-b029-4507-91e5-8e1185dcddf1",k.Revamp_battle_academy_classroom_icetower_json="bf36ed9d-a1bd-4bc6-8e07-dc2e9deb9bc2",k.Revamp_battle_academy_classroom_json="c2efc300-2e72-48d8-b646-e7c14b85fd63",k.Revamp_battle_academy_gh_json="b9aed696-a108-4316-8077-3defba917de6",k.Revamp_battle_academy_gh_stairs_json="4123602a-6dd1-4725-b802-58d05ff2d347",k.Revamp_battle_academy_office_icetower_json="5e70d317-5751-462f-98b7-e9f30afbe201",k.Revamp_battle_academy_office_json="dd1bdac4-6044-465f-8fbf-7daf26e2fe1e",k.Revamp_battle_archives_json="e15c44a9-c33f-40bc-a642-ca66f95d60e2",k.Revamp_battle_bonfire_inside_json="e3c28dc8-7dcb-44ff-a608-fd590f3fa845",k.Revamp_battle_bonfire_lava_json="a647e914-8b32-4922-b9e5-ae978a730206",k.Revamp_battle_bonfire_outside_json="dec06b03-e1bf-436d-9851-9146a4704995",k.Revamp_battle_forest_generic_json="33bc6173-8b90-4551-a073-f1d151435556",k.Revamp_battle_forest_outside_json="fefa5d15-5bc4-4f9a-bebb-3b73f2790130",k.Revamp_battle_lamplight_outside_json="a24c0a86-53dd-4cd6-b9fd-2b63e0339ea0",k.Revamp_battle_lamplight_outside_pumpkinfest_json="f6ce851b-7496-489d-a349-8ae89e8c69bc",k.Revamp_battle_lamplight_outside_starlight_json="d3ca4b14-fc38-4bbb-a796-c49304887694",k.Revamp_battle_lamplight_outside_winterfest_json="bc3d2d9d-7241-4312-9d00-8db6707b88ea",k.Revamp_battle_shipwreck_outside_json="db312186-2056-428a-9b55-2d9c06600ceb",k.Revamp_battle_shipwreck_underwater_json="0f426554-dd99-4c93-9aab-a72c55a6e247",k.Revamp_battle_shiverchill_inside_json="0c099d65-b1ce-4f12-bfb1-12af03b99690",k.Revamp_battle_shiverchill_outside_json="8ecc5bfc-7caa-4619-a85c-ba4f784beafa",k.Revamp_battle_skywatch_inside_json="52e7e267-cba9-49e0-a2ae-10ebdc9c2205",k.Revamp_battle_skywatch_outside_json="c9aba10f-0723-480e-9ed3-ff4806b70b50",k.Towertown_1up_json="821c2dcb-30c5-41d9-9dce-6c7757a133e3",k.Towertown_1up_tut_sub_json="ea1e712e-d900-4498-8f4b-d51e9cf30b4e",k.Towertown_2up_json="4ae09d06-ba26-4c60-b877-974b2d7692bc"}(F||(F={}))},84317:(k,B,U)=>{"use strict";var F;U.d(B,{t:()=>F}),function(k){k.Tileset_UI_png="1397a747-efdf-46cb-b219-ab7afea40a64",k.Tileset_academy_png="dfaca806-4f30-447f-9296-3d4c0ddca7f5",k.Tileset_academy_sup_png="359de525-b71b-4a5f-8387-ecf876420d68",k.Tileset_ancient_ruins_png="7a290c41-fbcc-41c2-bdc1-b080be93ed84",k.Tileset_archives_png="ef9f43ac-08db-418b-b39c-84757b9cc69c",k.Tileset_arena_bronze_png="c623c8b8-5f9d-448c-91f6-97d00947da9a",k.Tileset_arena_gold_night_png="49b0f7e9-9aed-4abd-9460-fbd621cadde1",k.Tileset_arena_gold_png="982ff829-3774-46a7-98ba-e8b9b356331e",k.Tileset_arena_silver_png="3604dbbb-bd44-4eee-84ec-e9da7985f562",k.Tileset_bonfire_png="5ffb004d-4278-48a0-bd1f-fd460b5dacbc",k.Tileset_classroom_firefly_png="ca2c3487-f094-4d19-b44f-147dd646bad7",k.Tileset_classroom_ice_png="0f1daa1c-7f98-4df8-b7e5-730ba9188b17",k.Tileset_classroom_png="e04c76f6-98fc-4267-ac72-387848f1c20b",k.Tileset_classroom_shiverchill_png="178d5c50-efa6-4590-8507-3b0bca7c7dda",k.Tileset_cloud_new_png="68e18d2c-a3dd-45c0-92ab-8ad9770eee88",k.Tileset_cloud_no_collisions_png="4f357cd9-056b-417b-baa6-344636e4651a",k.Tileset_cloud_png="833af31b-c3b3-4424-af2e-c96f3fdc407f",k.Tileset_collisions_png="246f9a54-ba28-4575-bb5d-03612f6bf81c",k.Tileset_darktower_png="8d229484-b7d6-485b-ac37-b0bcc1173ef0",k.Tileset_dragonisland_exterior_png="71bb74dc-4e4b-4bae-a055-aee3d7e356dc",k.Tileset_dragonisland_waterfall_png="64ba2351-501c-4744-98bf-ba40933da056",k.Tileset_exterior_general_png="fb19d855-764a-44af-a08a-d29b2f08b4db",k.Tileset_firefly_new_night_png="2d99c5d6-c502-48cf-b0ba-380e656d7cbb",k.Tileset_firefly_new_png="cea33c56-b89a-49dd-ac3c-b4998ca49d82",k.Tileset_firepit_png="c7f4d0f3-c856-4e4f-8335-6ac29489f19c",k.Tileset_forest_new_night_png="72f6597c-10a9-47e8-95fd-1bbc6901e780",k.Tileset_forest_new_png="0e5daa52-24ac-4045-9425-db4ab20b6e96",k.Tileset_forest_png="032440a2-9e11-4118-a258-52b541096fbc",k.Tileset_generic_moonfest_night_png="3d5fa3d6-a84c-4925-a6ae-18aeca404e07",k.Tileset_generic_new_night_png="ec108c59-99ac-4184-af87-8a602f1cc96e",k.Tileset_generic_new_png="7c6386ba-52c0-44ad-9a0d-54da3fccbb9c",k.Tileset_generic_png="16918ba8-4539-42cf-956f-09c71d6ac905",k.Tileset_generic_snow_png="abd6f8ab-d0b9-4d7e-86a2-8c6f65d8944e",k.Tileset_grotto_springfest_png="cdab57ce-0b92-434f-bb35-ddf1dc2dc413",k.Tileset_icecave_new_png="039df322-0618-4e4f-9233-745da57fc9da",k.Tileset_icecave_png="a8ae4050-c105-4e35-a3a8-97af719cedd0",k.Tileset_iceruins_png="d497a024-d0a2-45aa-a0b4-4c48952e875c",k.Tileset_infinity_tower_construction_png="f2ab6689-c522-4253-8f87-059e10397131",k.Tileset_interior_general_png="94d1d1f4-30eb-47ad-a6f8-8992714591b2",k.Tileset_interior_icecave_png="13e4bab5-eb18-49b8-b670-5f977e37628c",k.Tileset_interior_png="d4546866-fd36-415c-9785-a87bad977a68",k.Tileset_interior_treehouse_png="686754cd-f8ad-4a66-a2c1-7ea301652456",k.Tileset_minecarts_png="ef4ee67f-ab2d-438b-9058-a0eb075de0c6",k.Tileset_moon_exterior_png="b26d6483-0403-428f-8e9f-13813d233932",k.Tileset_moon_interior_png="43eb8a78-2f00-47d2-b463-79e9c5aa457f",k.Tileset_moonlight_extras_night_png="6829c578-7def-4abd-82a3-ac4c2fe4613f",k.Tileset_outside_png="ddf7610e-e83f-41ad-a642-680298802ed0",k.Tileset_outsidesnow_png="d3806833-c510-49c7-941c-8fdedba8bb1b",k.Tileset_railruins_png="280da4e9-2d2d-4ba8-b40c-1c4359e8fb28",k.Tileset_ship_exterior_png="09ae8073-3334-4fec-b84e-dafb09668420",k.Tileset_ship_interior_png="e6183cf5-c5d9-4982-bbd2-dad8a54a0901",k.Tileset_shiverchill_exterior_png="a1ba7f57-e537-46e5-8160-2ba8910ba7de",k.Tileset_shiverchill_footsteppath_png="168e2732-ab26-4e6a-89c6-cfcaa9e4e62a",k.Tileset_shiverchill_interior_png="ec6c712b-8866-4370-bda6-dc7cad31a703",k.Tileset_shiverchill_png="81d9ae1f-f2dc-4ff6-b866-6e773e730305",k.Tileset_shiverchill_rails_png="b5848154-d97f-4b12-9f5f-c1a0d8933aaa",k.Tileset_skies_new_png="e1aa8afc-3dd9-4749-ba63-7aa327005900",k.Tileset_skywatch_buildings_png="c7455906-0e6e-4a8c-a15b-c7362ca93501",k.Tileset_skywatch_factory_png="6415e23e-c4ed-4852-8279-ff810b39a4f3",k.Tileset_skywatch_png="46b3694d-d219-4163-9e99-29770533ac29",k.Tileset_space_background_png="f9792203-daf6-4792-ac81-a4d55b633aa4",k.Tileset_springfest_png="161ae087-1633-44e7-98c0-8171818bc692",k.Tileset_towertown_basic_png="541c640e-7ac1-4e4f-a4fd-e27a08bff5e2",k.Tileset_town_december_png="7fa641db-d014-401c-8f59-a6eb8cef8ff2",k.Tileset_town_moonfest_night_png="9a11b628-4b4a-469d-9a7d-463ddbce4579",k.Tileset_town_new_night_png="2232dd58-c29b-4b41-b506-015cec056bae",k.Tileset_town_new_png="0e1d3b5e-c4b8-49b1-9314-577a1bc53370",k.Tileset_town_november_night_png="68066241-dc49-4a6b-9b64-5191cde677f0",k.Tileset_town_november_png="ed7b770b-f3cd-424d-bf0d-a0bb70a26008",k.Tileset_town_october_night_png="74b5c47c-4a8d-494e-990c-4ce099d209a9",k.Tileset_town_october_png="4b7bf187-1e50-497b-8211-23eccefa19e4",k.Tileset_town_png="4697235d-97c6-49d7-a3fe-a9a8409a8d93",k.Tileset_town_summerfest_png="ac55de45-af6a-4fde-b362-ff3eb7977c3e",k.Tileset_tutorial_subspace_png="0a34ab36-b86c-4521-aa95-13cb44c7156d",k.Tileset_twilight_arcade_png="700dde1a-1d41-47c0-9484-e9324b56118b",k.Tileset_volcano_new_png="ae2f7959-e7cb-479c-ad53-92401bf4ac2c",k.Tileset_volcano_png="83448b36-2ce8-4062-99db-e12b35fe6e68",k.Tileset_wall_collisions_png="a6ff3c98-bb92-480f-8a2b-d9c0efe00730",k.Tileset_water_new_png="4adfca05-a4e7-4c5d-8f17-b448377bbdbe"}(F||(F={}))},54300:(k,B,U)=>{"use strict";var F;U.d(B,{p:()=>F}),function(k){k["dragonOrb-1"]="0cc2bfa1-9b87-4572-9ac1-b832daff107b",k["dragonOrb-2"]="f79d74cc-3069-4587-a6ff-72b8ebb03593",k["dragonOrb-3"]="7a710425-cad8-4020-8f18-ca316963027f",k["dragonOrb-4"]="9541cc6a-b4e8-4e11-a65b-de6fde686d24",k["riftRunKey-1"]="d356ddb2-7802-4be8-9d38-a6f83f62621b",k["riftRunKey-2"]="765f1557-dc57-47e3-b53a-360d3383fb69",k["riftRunKey-3"]="fa2ac725-959d-427a-b50f-ef5e43f8b9c8"}(F||(F={}))},88818:(k,B,U)=>{"use strict";var F,G,j,$;U.d(B,{$6:()=>V,Cj:()=>j,Q2:()=>F,VE:()=>$,e9:()=>H,yG:()=>W}),function(k){k.Attack="attack",k.Attack2="attack2",k.DanceDab="dance-dab",k.DanceMoonwalk="dance-moonwalk",k.DanceRunningman="dance-runningman",k.Dig="dig",k.Idle="idle",k.IdleHeavy="idle-heavy",k.IdlePose="idle-pose",k.IdleToPetInteract="idle-to-pet-interact",k.PetInteract="pet-interact",k.Static="static",k.Walk="walk"}(F||(F={})),function(k){k.Cast="cast"}(G||(G={})),function(k){k.Shadow="shadow",k.HairLPigtails="hair-L-pigtails",k.HatBack="hat-back",k.HairBun="hair-bun",k.HairBackLong="hair-back-long",k.HairBack="hair-back",k.Cape="cape",k.SleeveLSkin="sleeve-L-skin",k.SleeveL="sleeve-L",k.GloveLHandSkin="glove-L-hand-skin",k.GloveLHand="glove-L-hand",k.HairBehind="hair-behind",k.Weapon="weapon",k.Tail="tail",k.Back="back",k.GloveLFingersSkin="glove-L-fingers-skin",k.GloveLFingers="glove-L-fingers",k.LegLSkin="leg-L-skin",k.LegL="leg-L",k.BootLSkin="boot-L-skin",k.BootL="boot-L",k.Hip="hip",k.LegRSkin="leg-R-skin",k.LegR="leg-R",k.BootRSkin="boot-R-skin",k.BootR="boot-R",k.PauldronL="pauldron-L",k.HatMiddle="hat-middle",k.Neck="neck",k.Torso="torso",k.Belt="belt",k.Chest="chest",k.SleeveRSkin="sleeve-R-skin",k.SleeveR="sleeve-R",k.Collar="collar",k.GloveRSkin="glove-R-skin",k.GloveRWrist="glove-R-wrist",k.GloveRHand="glove-R-hand",k.Necklace="necklace",k.FaceLower="face-lower",k.FaceUpper="face-upper",k.EyeLWhite="eye-L-white",k.EyeLIris="eye-L-iris",k.EyeLOutline="eye-L-outline",k.EyeLBlink="eye-L-blink",k.EyeRWhite="eye-R-white",k.EyeRIris="eye-R-iris",k.EyeROutline="eye-R-outline",k.EyeRBlink="eye-R-blink",k.Mouth="mouth",k.Nose="nose",k.EyebrowR="eyebrow-R",k.EyebrowL="eyebrow-L",k.ExpressionFace="expression-face",k.HairInfront="hair-infront",k.HairShort="hair-short",k.HatFace="hat-face",k.HairRPigtails="hair-R-pigtails",k.PauldronR="pauldron-R",k.HatFront="hat-front",k.ExpressionUpper="expression-upper"}(j||(j={})),function(k){k.Back="back",k.Belt="belt",k.BootL="boot-L",k.BootLSkin="boot-L-skin",k.BootR="boot-R",k.BootRSkin="boot-R-skin",k.Cape="cape",k.Chest="chest",k.Collar="collar",k.ExpressionFace="expression-face",k.ExpressionUpper="expression-upper",k.EyeLBlink="eye-L-blink",k.EyeLIris="eye-L-iris",k.EyeLOutline="eye-L-outline",k.EyeLWhite="eye-L-white",k.EyeRBlink="eye-R-blink",k.EyeRIris="eye-R-iris",k.EyeROutline="eye-R-outline",k.EyeRWhite="eye-R-white",k.EyebrowL="eyebrow-L",k.EyebrowR="eyebrow-R",k.FaceLower="face-lower",k.FaceUpper="face-upper",k.GloveLFingers="glove-L-fingers",k.GloveLFingersSkin="glove-L-fingers-skin",k.GloveLHand="glove-L-hand",k.GloveLHandSkin="glove-L-hand-skin",k.GloveRHand="glove-R-hand",k.GloveRSkin="glove-R-skin",k.GloveRWrist="glove-R-wrist",k.HairBack="hair-back",k.HairBackLong="hair-back-long",k.HairBehind="hair-behind",k.HairBun="hair-bun",k.HairInfront="hair-infront",k.HairLPigtails="hair-L-pigtails",k.HairRPigtails="hair-R-pigtails",k.HairShort="hair-short",k.HatBack="hat-back",k.HatFace="hat-face",k.HatFront="hat-front",k.HatMiddle="hat-middle",k.Hip="hip",k.LegL="leg-L",k.LegLSkin="leg-L-skin",k.LegR="leg-R",k.LegRSkin="leg-R-skin",k.MouthA="mouth-A",k.MouthClose="mouth-Close",k.MouthSmile="mouth-smile",k.MouthYeah="mouth-yeah",k.Neck="neck",k.Necklace="necklace",k.Nose="nose",k.PauldronL="pauldron-L",k.PauldronR="pauldron-R",k.Shadow="shadow",k.SleeveL="sleeve-L",k.SleeveLSkin="sleeve-L-skin",k.SleeveR="sleeve-R",k.SleeveRSkin="sleeve-R-skin",k.Tail="tail",k.Torso="torso",k.Weapon="weapon"}($||($={}));const H=[["mouth-A",["mouth"]],["mouth-Close",["mouth"]],["mouth-smile",["mouth"]],["mouth-yeah",["mouth"]]],V=[["mouth","mouth-Close"]],W=new Map([["back",[1157,0,118,104]],["belt",[1310,2,78,22]],["boot-L",[1694,217,37,38]],["boot-L-skin",[1690,76,38,38]],["boot-R",[1694,178,37,38]],["boot-R-skin",[1692,37,38,38]],["cape",[969,8,81,92]],["chest",[1436,8,41,40]],["collar",[1729,83,91,35]],["expression-face",[1055,105,133,150]],["expression-upper",[1189,105,133,150]],["eye-L-blink",[681,2,19,9]],["eye-L-iris",[1694,119,20,20]],["eye-L-outline",[108,4,23,30]],["eye-L-white",[167,5,19,29]],["eye-R-blink",[658,1,22,10]],["eye-R-iris",[1715,119,20,20]],["eye-R-outline",[72,4,35,30]],["eye-R-white",[132,5,34,29]],["eyebrow-L",[1651,7,27,25]],["eyebrow-R",[1276,1,33,23]],["face-lower",[1051,15,105,85]],["face-upper",[572,8,85,63]],["glove-L-fingers",[36,1,35,33]],["glove-L-fingers-skin",[0,1,35,33]],["glove-L-hand",[1610,19,40,40]],["glove-L-hand-skin",[1705,0,38,36]],["glove-R-hand",[1649,74,40,40]],["glove-R-skin",[1651,33,40,40]],["glove-R-wrist",[1694,140,38,37]],["hair-L-pigtails",[0,35,92,220]],["hair-R-pigtails",[93,35,92,220]],["hair-back",[1603,115,90,140]],["hair-back-long",[734,89,144,166]],["hair-behind",[879,101,175,154]],["hair-bun",[1457,107,72,148]],["hair-infront",[1490,1,119,105]],["hair-short",[772,1,117,87]],["hat-back",[186,72,200,183]],["hat-face",[1323,105,133,150]],["hat-front",[387,72,200,183]],["hat-middle",[588,72,145,183]],["hip",[1389,3,46,45]],["leg-L",[1610,60,38,54]],["leg-L-skin",[1451,50,38,54]],["leg-R",[1412,49,38,55]],["leg-R-skin",[1373,49,38,55]],["mouth-A",[722,2,21,12]],["mouth-Close",[701,3,18,8]],["mouth-smile",[214,27,15,7]],["mouth-yeah",[734,72,19,16]],["neck",[187,6,26,28]],["necklace",[186,35,43,36]],["nose",[1679,7,25,25]],["pauldron-L",[722,15,49,56]],["pauldron-R",[658,12,63,59]],["shadow",[272,5,177,66]],["sleeve-L",[230,4,41,67]],["sleeve-L-skin",[450,5,41,66]],["sleeve-R",[532,7,39,64]],["sleeve-R-skin",[492,7,39,64]],["tail",[1276,25,96,79]],["torso",[890,4,78,96]],["weapon",[1530,110,72,145]]])},10471:(k,B,U)=>{"use strict";U.d(B,{B:()=>G,h:()=>F});const F=[27],G=F.concat([28,29,30])},46791:(k,B,U)=>{"use strict";U.d(B,{a:()=>F});const F=(0,U(77601).gb)({key:"members-get-7-levels",default:{enabled:!1}})},96703:(k,B,U)=>{"use strict";U.d(B,{K:()=>F});const F=(0,U(77601).gb)({key:"after-school-widget",activateAssociatedExperiments:1,default:{enabled:!1}})},44751:(k,B,U)=>{"use strict";U.d(B,{m:()=>F});const F=(0,U(77601).gb)({key:"arcadia-zone-in-math-rpg",activateAssociatedExperiments:0,default:{enabled:!1},evaluate:(k,B)=>({enabled:k.enabled&&!B.onMobileApp})})},59685:(k,B,U)=>{"use strict";var F,G;U.d(B,{D:()=>G,E:()=>F}),function(k){k.Dumb="dumb",k.Ok="ok",k.Smart="smart",k.Tricky="tricky",k.Reversed="reversed"}(F||(F={})),function(k){k.Elementalist="elementalist",k.Assassin="assassin",k.Turtle="turtle"}(G||(G={}))},88541:(k,B,U)=>{"use strict";var F;U.d(B,{Ct:()=>j,GM:()=>G,d6:()=>F}),function(k){k.Free="free",k.FreeUsed="freeUsed",k.Member="member",k.MemberUsed="memberUsed"}(F||(F={}));const G={enabled:!0,cooldownTimeUtcMinutes:240,rooms:[{id:"free-play",active:!0,name:"Free Play",nameKey:"DUELS_STADIUM_ROOM_NAME_FREE_PLAY",freeBattles:1,memberBattles:1,usesElementalBoosts:!0,forceBots:!0,minBotDifficulty:-2,maxBotDifficulty:4,prize:{type:"gold",amount:50},prizeIcon:{atlas:"f28ac625-fa22-4c32-a6dd-9afb5cca5895",frame:"currency-gold-2-large"},matchmakingBucket:1,style:{backingColor:"#99d8f2",headerImage:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-blue-sky"},headerImageDisabled:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-blue-sky-disabled"},headerTextColor:"#2266aa",lockBarColor:"#2f76be",borderColor:"#2f76be",contentBackingColor:"#f3ffff",contentBorderColor:"#349fe3",costBackingColor:"#a3ddf9"}},{id:"moonlit-clash",active:!0,name:"Moonlit Clash",nameKey:"DUELS_STADIUM_ROOM_NAME_MOONLIT_CLASH",levelLock:15,timeOfDayLock:"home",freeBattles:2,memberBattles:1,usesElementalBoosts:!0,forceBots:!1,minBotDifficulty:1,maxBotDifficulty:8,entryCost:{type:"gold",amount:100},prize:{type:"gold",amount:250},prizeIcon:{atlas:"f28ac625-fa22-4c32-a6dd-9afb5cca5895",frame:"currency-gold-3-large"},matchmakingBucket:1,style:{backingColor:"#6296cc",headerImage:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-moon"},headerImageDisabled:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-moon-disabled"},headerTextColor:"#4c4892",lockBarColor:"#4c4892",borderColor:"#4c4892",contentBackingColor:"#effaff",contentBorderColor:"#349fe3",costBackingColor:"#a1d0ef"}},{id:"spell-masters",active:!0,name:"Spell Masters",nameKey:"DUELS_STADIUM_ROOM_NAME_SPELL_MASTERS",levelLock:40,freeBattles:1,memberBattles:2,usesElementalBoosts:!0,forceBots:!1,minBotDifficulty:-2,maxBotDifficulty:8,entryCost:{type:"gold",amount:250},prize:{type:"gold",amount:500},prizeIcon:{atlas:"f28ac625-fa22-4c32-a6dd-9afb5cca5895",frame:"currency-gold-4-large"},matchmakingBucket:1,style:{backingColor:"#ffcd91",headerImage:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-stairs"},headerImageDisabled:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-stairs-disabled"},headerTextColor:"#ae2d00",lockBarColor:"#aa331c",borderColor:"#aa331c",contentBackingColor:"#fffaeb",contentBorderColor:"#f89e80",costBackingColor:"#f8ce99"}},{id:"boss-hunters",active:!0,name:"Boss Hunters",nameKey:"DUELS_STADIUM_ROOM_NAME_BOSS_HUNTERS",levelLock:90,freeBattles:0,memberBattles:1,usesElementalBoosts:!0,forceBots:!1,minBotDifficulty:3,maxBotDifficulty:8,entryCost:{type:"gold",amount:400},prize:{type:"gold",amount:1e3},prizeIcon:{atlas:"f28ac625-fa22-4c32-a6dd-9afb5cca5895",frame:"currency-gold-5-large"},matchmakingBucket:1,style:{backingColor:"#d17dcd",headerImage:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-tower"},headerImageDisabled:{atlas:"4167cf14-91bc-4b03-b9bb-9058f5b1bd7c",frame:"backing-title-tower-disabled"},headerTextColor:"#754274",lockBarColor:"#592b4a",borderColor:"#592b4a",contentBackingColor:"#ffe4fe",contentBorderColor:"#734988",costBackingColor:"#f1b5ee"}}]},j={backingColor:"#bab5c2",borderColor:"#655664",contentBackingColor:"#f2f2f0",contentBorderColor:"#655664",costBackingColor:"#d2ced8"}},4845:(k,B,U)=>{"use strict";var F;U.d(B,{P:()=>G,R:()=>F}),function(k){k.LevelLocked="levelLock",k.TimeOfDayLocked="timeOfDayLock",k.NoBattlesAvailable="noBattlesAvailable",k.NoMembership="noMembership",k.NoEntryCost="noEntryCost",k.Fallback="unknownIneligibilityReason"}(F||(F={}));class G{constructor(k){this._levelLockedKeys={tooltip:{title:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_LEVEL_LOCK_KEY},body:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_LEVEL_LOCK_KEY}},card:{top:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_CARD_TOP_MESSAGE_LEVEL_LOCK_KEY}}},this._timeOfDayLockedKeys={tooltip:{title:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_TIME_OF_DAY_LOCK_KEY},body:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_TIME_OF_DAY_LOCK_KEY}},card:{top:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_CARD_TOP_MESSAGE_TIME_OF_DAY_LOCK_KEY},bottom:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_CARD_BOTTOM_MESSAGE_TIME_OF_DAY_LOCK_KEY}}},this._noTicketsKeys={tooltip:{title:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_NO_TICKETS_KEY},body:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_NO_TICKETS_KEY}},card:{bottom:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_CARD_BOTTOM_MESSAGE_NO_TICKETS_KEY}}},this._noMembershipKeys={tooltip:{title:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_MEMBERSHIP_KEY},body:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_MEMBERSHIP_KEY}}},this._fallbackKeys={tooltip:{title:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_FALLBACK_KEY},body:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_FALLBACK_KEY}}},this._noEntryCostKeys={tooltip:{title:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_ENTRY_COST_KEY},body:{key:G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_ENTRY_COST_KEY}}},this.CHECK_TO_INELIGIBLE_REASON_KEYS_MAP=new Map([[F.NoMembership,this._noMembershipKeys],[F.LevelLocked,this._levelLockedKeys],[F.TimeOfDayLocked,this._timeOfDayLockedKeys],[F.NoBattlesAvailable,this._noTicketsKeys],[F.NoEntryCost,this._noEntryCostKeys],[F.Fallback,this._fallbackKeys]]),k&&(this._localizer=k)}validate(k,B){const U=[()=>this.meetsLevelRequirement(k.room,k.playerLevel),()=>this.meetsAvailableBattlesRequirement(k.room,k.isMember,k.numBattlesUsed),()=>this.meetsTimeOfDayRequirement(k.room,k.inSchoolHours)];B&&U.push(...B);let F={eligible:!0};for(const G of U)if(F=G(),!F.eligible)break;return F}meetsAvailableBattlesRequirement(k,B,U){const G=-1===k.freeBattles,j=-1===k.memberBattles,$=k.freeBattles+k.memberBattles,H=k.freeBattles>0&&U0&&U>=k.freeBattles&&U<$;return G||B&&j||H||B&&V?{eligible:!0}:!B&&V?this.getEligibilityObject(!1,F.NoMembership):this.getEligibilityObject(!1,F.NoBattlesAvailable)}meetsLevelRequirement(k,B){var U,G;if(!k.levelLock)return{eligible:!0};const j=B>=k.levelLock;return(null===(U=this._levelLockedKeys.card)||void 0===U?void 0:U.top)&&(this._levelLockedKeys.card.top.args=[k.levelLock]),(null===(G=this._levelLockedKeys.card)||void 0===G?void 0:G.bottom)&&(this._levelLockedKeys.card.bottom.args=[k.levelLock]),this._levelLockedKeys.tooltip.body.args=[k.levelLock],this.getEligibilityObject(j,F.LevelLocked)}meetsTimeOfDayRequirement(k,B){var U,G;if(!k.timeOfDayLock||"none"===k.timeOfDayLock)return{eligible:!0};const j="home"===k.timeOfDayLock&&!B||"school"===k.timeOfDayLock&&B,$="school"===k.timeOfDayLock?["8:00am","4:00pm"]:["4:00pm","8:00am"];return this._timeOfDayLockedKeys.tooltip.body.args=$,(null===(U=this._timeOfDayLockedKeys.card)||void 0===U?void 0:U.top)&&(this._timeOfDayLockedKeys.card.top.args=$),(null===(G=this._timeOfDayLockedKeys.card)||void 0===G?void 0:G.bottom)&&(this._timeOfDayLockedKeys.card.bottom.args=$),this.getEligibilityObject(j,F.TimeOfDayLocked)}getEligibilityObject(k,B){var U,F,G,j,$,H,V,W,q,K,z;if(k)return{eligible:k};const Y={eligible:k,ineligibleReason:{type:B,tooltip:{title:"",body:""}}};if(this._localizer&&Y.ineligibleReason){const k=null!==(U=this.CHECK_TO_INELIGIBLE_REASON_KEYS_MAP.get(B))&&void 0!==U?U:this._fallbackKeys,Q=null!==(F=k.tooltip.title.args)&&void 0!==F?F:[],X=null!==(G=k.tooltip.body.args)&&void 0!==G?G:[],Z=null!==(H=null===($=null===(j=k.card)||void 0===j?void 0:j.top)||void 0===$?void 0:$.args)&&void 0!==H?H:[],J=null!==(q=null===(W=null===(V=k.card)||void 0===V?void 0:V.bottom)||void 0===W?void 0:W.args)&&void 0!==q?q:[];Y.ineligibleReason.tooltip={title:this._localizer.getText(k.tooltip.title.key,...Q),body:this._localizer.getText(k.tooltip.body.key,...X)},Y.ineligibleReason.card={topMessage:(null===(K=k.card)||void 0===K?void 0:K.top)?this._localizer.getText(k.card.top.key,...Z):void 0,bottomMessage:(null===(z=k.card)||void 0===z?void 0:z.bottom)?this._localizer.getText(k.card.bottom.key,...J):void 0}}return Y}}G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_LEVEL_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_TITLE_LEVEL_LOCK",G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_LEVEL_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_BODY_LEVEL_LOCK",G.STADIUM_ROOM_INELIGIBLE_REASON_CARD_TOP_MESSAGE_LEVEL_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_CARD_MESSAGE_LEVEL_LOCK",G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_TIME_OF_DAY_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_TITLE_TIME_OF_DAY_LOCK",G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_TIME_OF_DAY_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_BODY_TIME_OF_DAY_LOCK",G.STADIUM_ROOM_INELIGIBLE_REASON_CARD_TOP_MESSAGE_TIME_OF_DAY_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_CARD_MESSAGE_TIME_OF_DAY_LOCK",G.STADIUM_ROOM_INELIGIBLE_REASON_CARD_BOTTOM_MESSAGE_TIME_OF_DAY_LOCK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_CARD_BOTTOM_MESSAGE_TIME_OF_DAY_LOCK",G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_NO_TICKETS_KEY="STADIUM_ROOM_INELIGIBLE_REASON_TITLE_NO_TICKETS",G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_NO_TICKETS_KEY="STADIUM_ROOM_INELIGIBLE_REASON_BODY_NO_TICKETS",G.STADIUM_ROOM_INELIGIBLE_REASON_CARD_BOTTOM_MESSAGE_NO_TICKETS_KEY="STADIUM_ROOM_INELIGIBLE_REASON_CARD_BOTTOM_MESSAGE_NO_TICKETS",G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_MEMBERSHIP_KEY="STADIUM_ROOM_INELIGIBLE_REASON_TITLE_MEMBERSHIP",G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_MEMBERSHIP_KEY="STADIUM_ROOM_INELIGIBLE_REASON_BODY_MEMBERSHIP",G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_FALLBACK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_TITLE_FALLBACK",G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_FALLBACK_KEY="STADIUM_ROOM_INELIGIBLE_REASON_BODY_FALLBACK",G.STADIUM_ROOM_INELIGIBLE_REASON_TITLE_ENTRY_COST_KEY="STADIUM_ROOM_INELIGIBLE_REASON_TITLE_ENTRY_COST",G.STADIUM_ROOM_INELIGIBLE_REASON_BODY_ENTRY_COST_KEY="STADIUM_ROOM_INELIGIBLE_REASON_BODY_ENTRY_COST"},60035:(k,B,U)=>{"use strict";var F;U.d(B,{z:()=>F}),function(k){k.ElementalBoost="elementalBoost",k.OutgoingDamageMultiplier="outgoingDamage",k.IncomingDamageMultiplier="incomingDamage",k.OutgoingHealingMultiplier="outgoingHealing",k.IncomingHealingMultiplier="incomingHealing",k.StatChange="statChange",k.DodgeChance="dodgeChance",k.RoundStartSpell="roundStartSpell",k.RoundStartAffix="roundStartAffix",k.Survivor="survivor",k.NoGear="noGear",k.Revive="revive",k.Reflect="reflect",k.RandomizeTarget="randomizeTarget",k.RemovePetsByElement="removePetsByElement",k.RemovePetsByRarity="removePetsByRarity",k.CooldownMin="cooldownMin",k.TurnTimer="turnTimer"}(F||(F={}))},28628:(k,B,U)=>{"use strict";var F;U.d(B,{GJ:()=>W,Ie:()=>q,JT:()=>z,Mb:()=>G,OT:()=>K,XK:()=>j,gu:()=>F,uj:()=>H,w0:()=>V,x_:()=>Q,xn:()=>Y,zJ:()=>$}),function(k){k.Basic="basic",k.QuestPippet="quest-pippet",k.QuestPippetDefeatable="quest-pippet-defeatable",k.Ultimates="ultimates",k.Tutorial1="tutorial1",k.Tutorial2="tutorial2",k.Tutorial3="tutorial3",k.Tutorial1Revised="tutorial1revised",k.Tutorial2Revised="tutorial2revised",k.StatusEffectsTutorial="status-effects-tutorial",k.FireflyQ2Miniboss="firefly-Q2-miniboss",k.FireflyQ3Miniboss="firefly-Q3-miniboss",k.FireflyQ8TriptropTrio="firefly-Q8-triptrop-trio",k.FireflyQ12Gerald="firefly-Q12-gerald",k.SkywatchCloudMiniboss="skywatch-cloud-miniboss",k.SkywatchCloudBoss="skywatch-cloud-boss",k.SkywatchQ11Bitbots="skywatch-Q11-bitbots",k.SkywatchQ6Swarm="skywatch-Q6-swarm",k.ShiverchillQ6Ghosts="shiverchill-Q6-ghosts",k.ShiverchillQ7IceWyrm="shiverchill-Q7-ice-wyrm",k.ShiverchillQ13IceWyrm="shiverchill-Q13-ice-wyrm",k.BonfireQ12Guardian="bonfire-Q12-guardian",k.BonfireQ13Cebollini="bonfire-Q13-cebollini",k.ShipwreckQ11OldOne="shipwreck-Q11-old-one",k.Duel="duel",k.MatchmakingDuel="matchmaking-duel",k.MatchmakingBotDuel="matchmaking-bot-duel",k.Titan="titan",k.CrystalCavernsGrumpyYeti="cc-grumpy-yeti",k.CrystalCavernsCrystalThief="cc-crystal-thief",k.CrystalCavernsGlacias="cc-glacias",k.CrystalCavernsMakalu="cc-makalu",k.CrystalCavernsCrystalGolem="cc-crystal-golem",k.DarkTower="darktower",k.EndgamePippet="endgame-pippet",k.EndGameGuardianFirefly="endgame-guardian-firefly",k.EndGameGuardianShiverchill="endgame-guardian-shiverchill",k.EndGameGuardianSkywatch="endgame-guardian-skywatch",k.EndGameGuardianBonfire="endgame-guardian-bonfire",k.EndGameGuardianShipwreck="endgame-guardian-shipwreck",k.EndGamePuppetMaster="endgame-puppetmaster",k.ZoneMiniboss="zone-miniboss",k.PumpkinfestBoss="pumpkinfest-boss",k.NormalRiftRun="normal-rift-run",k.BossRiftRun="boss-rift-run",k.LootDash="loot-dash",k.FestivalDailyBoss="festival-daily-boss",k.FestivalDailyBattle="festival-daily-battle",k.FeaturedSpawn="featured-spawn"}(F||(F={}));const G=[F.NormalRiftRun];var j;!function(k){k.Victory="victory",k.Defeat="defeat",k.Escape="escape"}(j||(j={}));const $=k=>{if(!("opponents"in k))throw new Error("No opponents have been configured")};var H,V,W,q;!function(k){k.Wizard="wizard",k.Pet="pet",k.Boss="boss",k.Titan="titan",k.Object="object",k.Miniboss="miniboss"}(H||(H={})),function(k){k.Pet="Pet",k.Summon="Summon",k.Titan="Titan",k.Player="Player",k.Boss="Boss"}(V||(V={})),function(k){k.DungeonBoss="Dungeon Boss",k.TowerBoss="Tower Boss",k.ZoneBoss="Zone Boss",k.EventBoss="Event",k.FinalBoss="Final Boss",k.Wizard="Wizard",k.Mythic="Mythic",k.Enemy="Enemy"}(W||(W={})),function(k){k.FrontTop="frontTop",k.FrontMiddle="frontMiddle",k.FrontBottom="frontBottom",k.BackMiddle="backMiddle",k.Middle="middle",k.HugeUnit="hugeUnit"}(q||(q={}));const K=59,z=37,Y=k=>[W.DungeonBoss,W.TowerBoss].includes(k),Q=k=>[W.ZoneBoss,W.EventBoss].includes(k)},26738:(k,B,U)=>{"use strict";var F,G;U.d(B,{m:()=>F,x:()=>G}),function(k){k.GOAL="goal",k.PREMIUM_GATE="premiumGate",k.PREMIUM_REWARD_CLAIM="premiumRewardClaim",k.FREE_REWARD_CLAIM="freeRewardClaim",k.INFINITE_ACTIVE="infiniteActive",k.INFINITE_GOAL="infiniteGoal",k.INFINITE_CLAIM="infiniteClaim"}(F||(F={})),function(k){k.GOAL="goal",k.CLAIM="claim"}(G||(G={}))},68834:(k,B,U)=>{"use strict";var F,G;U.d(B,{H2:()=>H,IC:()=>j,Nz:()=>$,UA:()=>F,bm:()=>G}),function(k){k.BecomeAMember="Become a Member"}(F||(F={})),function(k){k.All="All",k.Daily="Daily",k.Weekly="Weekly",k.Monthly="Monthly",k.Season="Season",k.Bonus="Bonus"}(G||(G={}));const j={[G.All]:"BATTLE_PASS_QUEST_TYPE_ALL",[G.Daily]:"BATTLE_PASS_QUEST_TYPE_DAILY",[G.Weekly]:"BATTLE_PASS_QUEST_TYPE_WEEKLY",[G.Monthly]:"BATTLE_PASS_QUEST_TYPE_MONTHLY",[G.Season]:"BATTLE_PASS_QUEST_TYPE_SEASON",[G.Bonus]:"BATTLE_PASS_QUEST_TYPE_BONUS"};var $,H;!function(k){k.BecomeAMember="BecomeAMember",k.EvolvePet="EvolvePet"}($||($={})),function(k){k.Home="home",k.Rewards="rewards",k.Quests="quests"}(H||(H={}))},47708:(k,B,U)=>{"use strict";U.d(B,{Al:()=>G,K_:()=>j,q6:()=>$});var F=U(97495);const G={[F.i.Regular]:!0,[F.i.Hard]:!1,[F.i.Expert]:!1};var j,$;!function(k){k.Regular="EASY_MODE",k.Hard="HARD_MODE",k.Expert="EXPERT_MODE"}(j||(j={})),function(k){k[k.NotStarted=0]="NotStarted",k[k.HardModeIntroduced=1]="HardModeIntroduced",k[k.HardModeStarted=2]="HardModeStarted",k[k.ExpertModeIntroduced=3]="ExpertModeIntroduced",k[k.ExpertModeStarted=4]="ExpertModeStarted"}($||($={}));$.HardModeIntroduced},97495:(k,B,U)=>{"use strict";var F;U.d(B,{i:()=>F}),function(k){k.Regular="regular",k.Hard="hard",k.Expert="expert"}(F||(F={}))},2090:(k,B,U)=>{"use strict";U.d(B,{u:()=>F});const F=(0,U(77601).gb)({key:"keep-players-in-hard-mode",activateAssociatedExperiments:1,default:{enabled:!1}})},34656:(k,B,U)=>{"use strict";U.d(B,{j:()=>H});var F=U(29891),G=U(64270),j=U(15821),$=U(87490);class H{static specialOfferSectionHasContent(k,B){if(k.id!==G.Xx.SpecialOffer)return!1;const U=!!k.emptySectionInfo&&k.emptySectionInfo.title.length>0&&k.emptySectionInfo.subtitle.length>0;return!!B||U}static calculateFinalCost(k,B,U,F){var H,W,q,K;let z;const Y=this.getItemRewards(k);if(!k.metadata.ignorePriceTable&&(null==U?void 0:U.featureEnabled)&&1===Y.length){const V=Y[0],K=B(V.type,V.ID),Q=null!==(H=k.metadata.currency)&&void 0!==H?H:null===(W=null==K?void 0:K.dynamicStoreBaseCost)||void 0===W?void 0:W.currencyId;if(void 0!==Q){const k=class{static computePowerLevel(k){let B=0;for(const[U,F]of Object.entries(k))j.A.isDefined(F)&&(U===$.EStat.Hp?B+=.5*F:B+=F);return B}static findMatchingScale(k,B,U){return Object.values(k.scales).find((k=>k.enabled&&k.currencies.includes(B)&&k.items.includes(U)))}static computePriceFromScale(k,B,U){const F=[...k.keys].sort(((k,B)=>k.value-B.value));return this.computePriceFromSortedKeys(F,k.type,B,U,k.roundTo)}static resolveCost(k,B){return j.A.isDefined(B)&&j.A.isDefined(k.costByRarity[B])?k.costByRarity[B]:k.baseCost}static computePriceFromSortedKeys(k,B,U,F,j){var $;if(0===k.length)return;const H=k[0],V=k[k.length-1];switch(B){case G.zS.Floor:{const B=k.reduce(((k,B)=>B.value<=U?B:k),H);return this.resolveCost(B,F)}case G.zS.Ceiling:{const B=k.find((k=>k.value>=U));return this.resolveCost(null!=B?B:V,F)}case G.zS.Linear:{const B=k.find((k=>k.value===U));if(void 0!==B)return this.resolveCost(B,F);if(UV.value)return this.resolveCost(V,F);const G=k.reduce(((k,B)=>B.valuek.value>U)))&&void 0!==$?$:V,q=(U-G.value)/(W.value-G.value),K=this.resolveCost(G,F)+q*(this.resolveCost(W,F)-this.resolveCost(G,F)),z=null!=j?j:1,Y=z>0?z:1;return Math.round(K/Y)*Y}}}static lookupPrice(k,B,U,F,j,$,H){let V,W,q;if(H){const F=`${B}:${U}`;if(!H.has(F)){const G=this.findMatchingScale(k,B,U);H.set(F,G?{scale:G,sortedKeys:[...G.keys].sort(((k,B)=>k.value-B.value))}:null)}const G=H.get(F);if(!G)return;V=G.scale,W=G.sortedKeys}else{if(V=this.findMatchingScale(k,B,U),!V)return;W=[...V.keys].sort(((k,B)=>k.value-B.value))}switch(V.keyType){case G.NR.Power:if(!j)return;q=this.computePowerLevel(j);break;case G.NR.LevelLock:q=null!=$?$:0}return this.computePriceFromSortedKeys(W,V.type,q,F,V.roundTo)}}.lookupPrice(U,Q,V.type,null==K?void 0:K.rarity,null==K?void 0:K.stats,null==K?void 0:K.lockLevel,F);void 0!==k&&(z={type:"currency",currency:Q,value:k*(null!==(q=V.N)&&void 0!==q?q:1)})}}if(z||null==k.metadata.currency||null==k.metadata.cost||(z={type:"currency",currency:V(k.metadata.currency),value:V(k.metadata.cost)}),!z)for(const G of Y){const k=B(G.type,G.ID);if(!(null==k?void 0:k.dynamicStoreBaseCost))continue;const{currencyId:U,amount:F}=k.dynamicStoreBaseCost;z={type:"currency",currency:U,value:F*(null!==(K=G.N)&&void 0!==K?K:1)}}if(!z)throw new Error(`No cost found for offer ${k.id}`);if(k.metadata.percentageDiscount){const B=1-k.metadata.percentageDiscount/100;z.value=Math.ceil(z.value*B)}return z}static getItemRewards(k){var B;const U=[];for(const{type:G,data:j}of null!==(B=k.onComplete)&&void 0!==B?B:[])switch(G){case F.s.GOT_PET:U.push({type:"pet",ID:j.id,N:1});break;case F.s.GOT_ITEM:U.push(...j.itemDrops)}return U}}function V(k){return"string"==typeof k?parseInt(k,10):k}},49569:(k,B,U)=>{"use strict";U.d(B,{Y:()=>F});const F=(0,U(77601).gb)({key:"unified-store",activateAssociatedExperiments:1,default:{enabled:!1}})},64270:(k,B,U)=>{"use strict";var F,G,j,$,H,V,W;U.d(B,{GA:()=>G,IF:()=>H,NR:()=>K,Xx:()=>F,g0:()=>j,qO:()=>$,zS:()=>q}),function(k){k.SpecialOffer="SpecialOffer",k.DefeatedPets="DefeatedPets",k.Bundle="Bundle",k.RestrictionOffer="RestrictionOffer"}(F||(F={})),function(k){k.PetShop="pet-store",k.TitanShop="titan-shop",k.WizardCenter="wizard-center",k.SpecialOffers="special-offers",k.FestivalShop="festival-shop",k.RegionShop="region-shop",k.AcademyShop="academy-shop",k.RiftsPortal1Shop="rifts-p1-shop",k.RiftsPortal2Shop="rifts-p2-shop",k.RiftsPortal3Shop="rifts-p3-shop",k.StarlightShop="starlight-fest-store",k.PumpkinfestShop="pumpkinfest-store",k.WinterfestShop="winterfest-store",k.MoonlightShop="moonlight-fest-store",k.OfferPopup="offer-popup",k.SpringfestShop="spring-fest-store",k.SummerfestShop="summerfest-store"}(G||(G={})),function(k){k.AllShops="#all-shops"}(j||(j={})),function(k){k.DynamicStore="DynamicStore"}($||($={})),function(k){k.StoreKeyNotFound="store-key-not-found",k.BadStoreConfig="bad-store-config",k.UnknownError="unknown-error"}(H||(H={})),function(k){k.BadStoreConfig="bad-store-config"}(V||(V={})),function(k){k.Rifts="rifts"}(W||(W={}));var q,K;!function(k){k.Floor="floor",k.Ceiling="ceiling",k.Linear="linear"}(q||(q={})),function(k){k.Power="power",k.LevelLock="levelLock"}(K||(K={}))},40295:(k,B,U)=>{"use strict";var F;U.d(B,{B:()=>F}),function(k){k.NotStarted="NotStarted",k.LastKeystoneCutsceneViewed="LastKeystoneCutsceneViewed",k.PippetDefeated="PippetDefeated",k.Guardian1Defeated="Guardian1Defeated",k.Guardian2Defeated="Guardian2Defeated",k.Guardian3Defeated="Guardian3Defeated",k.Guardian4Defeated="Guardian4Defeated",k.Guardian5Defeated="Guardian5Defeated",k.PuppetMasterDefeated="PuppetMasterDefeated"}(F||(F={}))},71698:(k,B,U)=>{"use strict";U.d(B,{o:()=>F});const F=(0,U(77601).gb)({key:"festivals",activateAssociatedExperiments:0,default:{enabled:!0,startDates:{},endDates:{},variant:0}})},57797:(k,B,U)=>{"use strict";var F,G,j,$;U.d(B,{je:()=>j,k$:()=>$,wD:()=>G,xK:()=>F}),function(k){k.Story="Story",k.Season="Season",k.Rifts="Rifts",k.Member="Member",k.Coop="Coop"}(F||(F={})),function(k){k.GOAL="goal",k.CLAIM="claim",k.STORY="story",k.COOP="coop"}(G||(G={})),function(k){k.Normal="normal",k.Boss="boss"}(j||(j={})),function(k){k.Any="any",k.Normal="normal",k.Boss="boss"}($||($={}))},46902:(k,B,U)=>{"use strict";var F,G;U.d(B,{Q:()=>F}),function(k){k.AllZones="all_zones",k.Global="global",k.AllInstances="all_instances"}(F||(F={})),function(k){k.Xp="Xp",k.Currency="Currency",k.TitanShard="TitanShard",k.Springfest="Springfest",k.Summerfest="Summerfest",k.Pumpkinfest="Pumpkinfest",k.Winterfest="Winterfest",k.StarlightFestival="Starlight"}(G||(G={}))},10727:(k,B,U)=>{"use strict";U.d(B,{d3:()=>$,tZ:()=>j});var F=U(25308),G=U(77601);const j={[F.e.Normal_special_encounter]:F.e.Ftue_revamp_normal_special_encounter},$=(0,G.gb)({key:"ftue-revamp-phase-1",activateAssociatedExperiments:0,default:{enabled:!1}})},28344:(k,B,U)=>{"use strict";U.d(B,{y:()=>F});const F=(0,U(77601).gb)({key:"ftue-revamp-phase-2",activateAssociatedExperiments:0,default:{enabled:!1}})},39324:(k,B,U)=>{"use strict";var F,G,j,$;U.d(B,{$P:()=>j,fK:()=>$}),function(k){k.Current="Current",k.Scheduled="Scheduled"}(F||(F={})),function(k){k.None="None",k.Hourly="Hourly",k.Daily="Daily",k.Weekly="Weekly"}(G||(G={})),function(k){k.AppStart="APP_START",k.EnterGameWorld="ENTER_GAME_WORLD"}(j||(j={})),function(k){k.ShopVisitNotification="shop_visit_notification"}($||($={}))},58347:(k,B,U)=>{"use strict";U.d(B,{F:()=>F});const F=(0,U(77601).gb)({key:"magicoin-softlock-flow-changes",activateAssociatedExperiments:0,default:!1})},89067:(k,B,U)=>{"use strict";U.d(B,{Cy:()=>$,Jr:()=>K,Kr:()=>V,Uk:()=>q,qe:()=>j,ts:()=>F,uR:()=>H,yR:()=>G});var F,G,j,$,H,V,W=U(66582);!function(k){k.AfterSchoolWidget="AfterSchoolWidget",k.Backpack="Backpack",k.Chat="Chat",k.Challenges="Challenges",k.CoreMember="CoreMember",k.Duels="Duels",k.Festival="Festival",k.FriendsList="Friends List",k.Hamburger="Hamburger",k.HouseEdit="HouseEdit",k.HouseLocked="HouseLocked",k.HouseReport="HouseReport",k.HouseUnlocked="HouseUnlocked",k.HouseUpgrade="HouseUpgrade",k.LoginRewards="Login Rewards",k.Map="Map",k.NonMember="NonMember",k.Pets="Pets",k.PlusMember="PlusMember",k.Rifts="Rifts",k.Settings="Settings",k.Shop="Shop",k.StateChallenges="StateChallenges",k.TreasureTrack="TreasureTrack",k.UltraMember="UltraMember",k.WizardCostumes="WizardCostumes",k.WizardDash="WizardDash",k.WizardWatch="Wizard Watch",k.YourGoals="Your Goals",k.YourMail="Your Mail"}(F||(F={})),function(k){k[k.Standard=0]="Standard",k[k.Liveops=1]="Liveops",k[k.Secondary=2]="Secondary",k[k.PlayerHub=3]="PlayerHub"}(G||(G={})),function(k){k[k.Always=0]="Always",k[k.AtHome=1]="AtHome",k[k.AtAnotherHome=2]="AtAnotherHome",k[k.NotHome=3]="NotHome",k[k.HomeVisitsAllowed=4]="HomeVisitsAllowed",k[k.HomeVisitsNotAllowed=5]="HomeVisitsNotAllowed",k[k.NonMember=6]="NonMember",k[k.CoreMember=7]="CoreMember",k[k.PlusMember=8]="PlusMember",k[k.UltraMember=9]="UltraMember",k[k.FestivalActive=10]="FestivalActive",k[k.ValidStateChallenge=11]="ValidStateChallenge",k[k.StateChallengeActiveOrCanCollectRewards=12]="StateChallengeActiveOrCanCollectRewards",k[k.AfterSchoolWidgetEnabled=13]="AfterSchoolWidgetEnabled",k[k.DailyLoginCalendarEnabled=14]="DailyLoginCalendarEnabled",k[k.DailyLoginCalendarUnlocked=15]="DailyLoginCalendarUnlocked",k[k.WizardWatchUnlocked=16]="WizardWatchUnlocked",k[k.PlayerGoalsEnabled=17]="PlayerGoalsEnabled",k[k.TreasureTrackUnlocked=18]="TreasureTrackUnlocked",k[k.FestivalUnlocked=19]="FestivalUnlocked",k[k.EnglishOnly=20]="EnglishOnly"}(j||(j={})),function(k){k[k.Small=64]="Small",k[k.Normal=87]="Normal",k[k.Large=98]="Large",k[k.ExtraLarge=120]="ExtraLarge"}($||($={})),function(k){k.HudGameObject="HudGameObject",k.HudRevampReusableStandardTooltip="HudRevampReusableStandardTooltip"}(H||(H={})),function(k){k.HudButtonEnabled="HudButtonEnabled",k.HudAttentionRequested="HudAttentionRequested"}(V||(V={}));const q={[W._$.NonMember]:F.NonMember,[W._$.MemberCore]:F.CoreMember,[W._$.MemberLevelUp]:F.CoreMember,[W._$.MemberPlus]:F.PlusMember,[W._$.MemberUltimateMath]:F.PlusMember,[W._$.MemberUltra]:F.UltraMember,[W._$.MemberUltimateBundle]:F.UltraMember},K={[F.NonMember]:"MEMBERSHIP_STATUS_FREE",[F.CoreMember]:"MEMBERSHIP_STATUS_CORE",[F.PlusMember]:"MEMBERSHIP_STATUS_PLUS",[F.UltraMember]:"MEMBERSHIP_STATUS_ULTRA"}},6452:(k,B,U)=>{"use strict";U.d(B,{D:()=>H});var F=U(95891),G=U.n(F),j=U(28628);const $=JSON.parse('{"cumulativeXp":[0,14,28,42,57,73,89,106,123,141,160,180,200,221,243,266,290,315,341,368,396,425,455,486,519,553,588,625,663,703,744,787,832,878,927,977,1029,1084,1140,1199,1260,1324,1390,1459,1530,1605,1682,1762,1846,1933,2024,2118,2216,2318,2423,2534,2648,2767,2891,3020,3154,3293,3438,3589,3746,3909,4078,4255,4438,4629,4827,5033,5248,5471,5703,5944,6195,6456,6728,7010,7304,7609,7927,8257,8601,8958,9329,9716,10118,10535,10970,11422,11892,12381,12889,13418,13968,14540,15135,15753,15982,16218,16461,16711,16968,17233,17505,17785,18073,18369,18673,18985,19306,19635,19973,20320,20676,21041,21415,21799,22193,22597,23011,23435,23869,24314,24769,25235,25712,26200,26700,27211,27734,28269,28816,29375,29946,30530,31127,31737,32360,32996,33646,34310,34987,35679,36385,37105,37840,38590,39355,40135,40931,41743,42571,43415,44275,45152,46045,46955,47882,48827,49789,50769,51767,52784,53819,54873,55946,57038,58149,59280,60431,61602,62793,64005,65237,66490,67765,69061,70379,71719,73081,74465,75872,77302,78755,80232,81732,83256,84804,86377,87975,89598,91246,92919,94618,96343,98094,99872]}');class H{static getXpRewardForBattleUnit(k,B,U){switch(k.type||j.uj.Object){case j.uj.Pet:return B.type===j.w0.Summon?U.mythic:U.base;case j.uj.Titan:return U.titan;case j.uj.Boss:return B.category?(0,j.xn)(B.category)?U.repeatableBoss:(0,j.x_)(B.category)?U.singularBoss:B.category===j.GJ.FinalBoss?k.asset.id===j.OT?U.finalBoss:U.illusionBoss:B.category===j.GJ.Wizard?k.asset.id===j.JT?U.pippet:U.cloakedWizard:U.base:U.base;case j.uj.Wizard:return U.cloakedWizard;case j.uj.Miniboss:return U.miniBoss;default:return U.base}}static getXpRequiredForLevel(k,B,U){return B[k-U]}static getLevelCurve(){return $}static getLevelFromCumulativeXp(k,B,U){return k<0?U:k>=B[B.length-1]?B.length-1+U:B.findIndex((B=>B>k))-1+U}static doesCumulativeXpMatchLevelCurve(k,B,U,F){return k===H.getLevelFromCumulativeXp(B,U,F)}static getRelativeXpGainedForCurrentLevel(k,B,U,F){const G=B-U[k-F];return Math.max(0,G)}static getRelativeXpRequiredForLevel(k,B,U){const F=k-U;return 0===F?B[F]:F>B.length-1?0:Math.max(0,B[F]-B[F-1])}static getCurrentLevelProgressPercent(k,B,U,F){const j=k-F;if(j<0)return 0;if(j>=U.length||B>=U[U.length-1])return 1;const $=H.getRelativeXpGainedForCurrentLevel(k,B,U,F),V=H.getRelativeXpRequiredForLevel(k+1,U,F);return V<=0?0:G().clamp($/V,0,1)}static getXpFromNextLevelProgressPercent(k,B,U,F){const j=H.getRelativeXpRequiredForLevel(k+1,U,F)*G().clamp(B,0,1);return Math.round(H.getXpRequiredForLevel(k,U,F)+j)}}},52551:(k,B,U)=>{"use strict";U.d(B,{w:()=>V});var F=U(28085),G=U(78746);const j=JSON.parse('{"xpPerOpponentDefeatedMultiplier":0.5,"revive":{"healthPercent":0.5,"revivesPerReviveLevel":{"Level0":1,"Level1":2,"Level2":3},"initialRevives":{"NonMember":"Level0","MemberLevelUp":"Level1","MemberUltimateMath":"Level2","MemberUltimateBundle":"Level2","MemberCore":"Level1","MemberPlus":"Level2","MemberUltra":"Level2"}},"matchSetup":{"maximumPlayers":8,"matchmakingTimeMs":30000,"finalCountdownMs":3000,"finalWaitTimeMs":2000},"battleSetup":{"stagesPerZone":5,"wavesPerBattleStage":{"1":[1],"2":[1],"3":[1],"4":[1,1],"5":[1,1],"6":[1,1],"7":[1,1],"8":[1,1,1],"9":[1,1,1],"10":[1,1,1],"11":[1,1,2],"12":[1,1,2],"default":[1,1,2,2,3]},"numberOfZones":1,"minEnemyLevel":2,"enemyLevelVariance":3,"treasureStagesEnabled":false,"minTreasureStageInZone":4,"maxMpPerPet":2},"postBattle":{"lootBags":{"lootBagsPerPlace":[7,5,3],"default":1},"baseLootBagItemConfig":{"goldTable":182,"currencyTable":184,"itemsTable":180,"itemChance":0.2},"memberLootBagItemConfig":{"goldTable":183,"currencyTable":185,"itemsTable":181,"itemChance":0.8}},"matchboard":{"batchUpdatesAtPlayerCount":0,"opponentBatchUpdateIntervalMs":500}}'),$=JSON.parse('{"matchSetup":{"maximumTimeBetweenBotJoinsMs":6000,"maximumMatchSearchTimeMs":1500,"minimumMatchSearchTimeMs":3000},"opponentConfigs":{"slow":{"waveTime":{"min":90,"max":150},"questionTime":{"min":50,"max":70}},"average":{"waveTime":{"min":55,"max":90},"questionTime":{"min":30,"max":50}},"fast":{"waveTime":{"min":35,"max":55},"questionTime":{"min":15,"max":30}},"gradeMultiplier":4,"botDistributions":[{"streak":-2,"difficulty":"Easy","fastCount":0,"averageCount":3,"slowCount":4},{"streak":-5,"difficulty":"Super easy","fastCount":0,"averageCount":1,"slowCount":6},{"streak":2,"difficulty":"Hard","fastCount":2,"averageCount":3,"slowCount":2},{"streak":5,"difficulty":"Super hard","fastCount":3,"averageCount":4,"slowCount":0},{"streak":0,"difficulty":"Normal","fastCount":1,"averageCount":3,"slowCount":3}]}}'),H=JSON.parse('{"revive":{"revivesPerReviveLevel":{"Level0":"infinite","Level1":"infinite","Level2":"infinite"}},"matchSetup":{"maximumPlayers":100,"finalCountdownMs":0,"finalWaitTimeMs":3000},"battleSetup":{"maxMpPerPet":1},"quickQuizConfigs":{"transportModalDurationMs":5000,"miniumMatchmakingTimeMs":3000,"quickQuizCancelledTimeoutMs":5000},"matchboard":{"batchUpdatesAtPlayerCount":20,"opponentBatchUpdateIntervalMs":2000}}');class V{static getConfig(k){return V.configs[k]}}V.configs={[G.B1.Home]:(0,F.ES)(j,$),[G.B1.QuickQuiz]:(0,F.ES)(j,H)}},70156:(k,B,U)=>{"use strict";U.d(B,{eA:()=>F,yB:()=>G});const F="infinite";var G,j;!function(k){k.Level0="Level0",k.Level1="Level1",k.Level2="Level2"}(G||(G={})),function(k){k.SuperEasy="Super easy",k.Easy="Easy",k.Normal="Normal",k.Hard="Hard",k.SuperHard="Super hard"}(j||(j={}));j.Normal},78746:(k,B,U)=>{"use strict";var F;U.d(B,{B1:()=>j,Cr:()=>K,Kn:()=>Q,Mh:()=>z,Ns:()=>q,Os:()=>H,gK:()=>$,kL:()=>G,mz:()=>V,s9:()=>Y,zM:()=>F}),function(k){k[k.None=0]="None",k[k.LobbyDefault=1]="LobbyDefault",k[k.SelectPets=2]="SelectPets",k[k.SelectFollows=3]="SelectFollows",k[k.SelectMounts=4]="SelectMounts",k[k.FindingAMatch=5]="FindingAMatch",k[k.WaitingForPlayers=6]="WaitingForPlayers",k[k.MatchmakingComplete=7]="MatchmakingComplete",k[k.MatchStartingSoon=8]="MatchStartingSoon",k[k.MatchStartingNow=9]="MatchStartingNow",k[k.MatchEndedByServer=10]="MatchEndedByServer"}(F||(F={}));const G=[F.SelectPets,F.SelectFollows,F.SelectMounts];var j,$,H,V,W,q,K;!function(k){k.QuickQuiz="QuickQuiz",k.Home="Home"}(j||(j={})),function(k){k.Bots="Bots",k.Multiplayer="Multiplayer"}($||($={})),function(k){k.Battle="Battle",k.Treasure="Treasure"}(H||(H={})),function(k){k.Lobby="lobby",k.DetailedSelection="detailedSelection"}(V||(V={})),function(k){k[k.YourTeam=0]="YourTeam",k[k.WaitingRoom=1]="WaitingRoom",k[k.FindAMatch=2]="FindAMatch"}(W||(W={})),function(k){k.LootDash="Wizard Dash",k.ChooseAPet="Choose a Pet",k.ChooseABuddy="Choose a Buddy",k.ChooseAMount="Choose a Mount"}(q||(q={})),function(k){k.Unfinished="Unfinished",k.Win="Win",k.Loss="Loss",k.Quit="Quit"}(K||(K={}));const z=["pet","follow","mount"],Y=5,Q=1},12022:(k,B,U)=>{"use strict";U.d(B,{G:()=>H});var F=U(66582),G=U(61468),j=U(70156),$=U(78746);class H{static getNumberOfRevivesFromMemberTier(k,B){var U;const G=F.rH[k];if(void 0!==(null===(U=B.revive)||void 0===U?void 0:U.initialRevives[G])){const k=B.revive.initialRevives[G];return this.getNumberOfRevivesFromReviveLevel(k,B)}throw new Error(`Member tier "${G}" does not have an initial revive value in the passed in config. ${JSON.stringify(B)}`)}static getNumberOfRevivesFromReviveLevel(k,B){var U,F,G;if(void 0!==(null===(U=B.revive)||void 0===U?void 0:U.revivesPerReviveLevel[k]))return null!==(G=null===(F=B.revive)||void 0===F?void 0:F.revivesPerReviveLevel[k])&&void 0!==G?G:$.Kn;throw new Error(`Revive level "${k}" does not have a value in the passed in config. ${JSON.stringify(B)}`)}static hasRevivesRemaining(k){return k===j.eA||k>0}static getCurrentPlace(k,B,U){const F=G.l.countUniqueItems(B.map((k=>k.playerId))),j=new Array(F).fill(0);for(const G of B)G.time<=U&&(j[G.playerId]=Math.max(j[G.playerId],G.stageIndex+1));return j.filter((B=>0!==B&&B>=k)).length+1}static getMatchCompletionState(k,B,U){return k?B||U?B?$.Cr.Quit:$.Cr.Loss:$.Cr.Win:$.Cr.Unfinished}static getLootBagsCount(k,B){return(null!=B?B:Object.keys(k)).reduce(((B,U)=>B+k[U]),0)}static hasMetMinimumVictoryRequirement(k){return this.getLootBagsCount(k,["fromStreak","fromWaveComplete"])>0}}},88059:(k,B,U)=>{"use strict";U.d(B,{s:()=>F});const F=(0,U(77601).gb)({key:"magicoin-battle-rewards",default:{enabled:!1}})},75172:(k,B,U)=>{"use strict";U.d(B,{T:()=>F,h:()=>G});var F,G;U(48417);!function(k){k.FeatureUnlocked="feature_unlocked",k.EligibleBattleStarted="eligible_battle_started",k.IntroModalShown="intro_modal_shown",k.FirstDropReceived="first_drop_received"}(F||(F={})),function(k){k[k.FeatureUnlocked=0]="FeatureUnlocked",k[k.EligibleBattleStarted=1]="EligibleBattleStarted",k[k.IntroModalShown=2]="IntroModalShown",k[k.FirstDropReceived=3]="FirstDropReceived"}(G||(G={}))},83798:(k,B,U)=>{"use strict";U.d(B,{G:()=>F});const F=(0,U(77601).gb)({key:"hide-member-jar-for-new-players",default:{enabled:!1,unlockLevel:12}})},39596:(k,B,U)=>{"use strict";U.d(B,{g:()=>F});const F=(0,U(77601).gb)({key:"fab-member-jar-at-school",activateAssociatedExperiments:1,default:!1})},95525:(k,B,U)=>{"use strict";U.d(B,{w:()=>F});const F=(0,U(77601).gb)({key:"rox-three-tier-membership-stratification",activateAssociatedExperiments:0,evaluate:k=>Object.assign(Object.assign({},k),{variant:k.enabled&&k.variant?k.variant:0}),default:{enabled:!0,variant:0}})},223:(k,B,U)=>{"use strict";U.d(B,{l:()=>$});var F=U(8674),G=U(77601);const j=(0,G.gb)({key:"otp-non-member",activateAssociatedExperiments:1,default:{enabled:!1},evaluate:({enabled:k})=>k}),$=(0,G.gb)({key:"otp",activateAssociatedExperiments:0,evaluate:(k,B)=>{var{enabled:U,enabledOnMobile:G}=k,$=(0,F.Tt)(k,["enabled","enabledOnMobile"]);return Object.assign(Object.assign({},$),{enabled:U&&(B.isMember||B.evaluate(j))&&(!B.onMobileApp||G)})},default:{enabled:!1,enabledOnMobile:!1,cooldown:0,storeName:void 0,spendCap:{resetTime:3,dailyLimit:void 0,monthlyLimit:void 0}}})},58182:(k,B,U)=>{"use strict";U.d(B,{N:()=>F});const F=(0,U(77601).gb)({key:"fab-pet-merge-2-evolution-add-new-pet",activateAssociatedExperiments:0,default:!1})},93893:(k,B,U)=>{"use strict";U.d(B,{v:()=>F});const F=(0,U(77601).gb)({key:"fab-secure-evolution",default:!1})},50508:(k,B,U)=>{"use strict";U.d(B,{p:()=>F});const F=["petHat","petRelic"]},21574:(k,B,U)=>{"use strict";U.d(B,{g:()=>W});var F=U(26077),G=U(15821);const j=JSON.parse('{"minimumPlayerLevel":20,"statScalers":{"1":{"hp":1.1,"power":1.1,"defence":1.1,"speed":1.1},"2":{"hp":1.2,"power":1.2,"defence":1.2,"speed":1.2},"3":{"hp":1.3,"power":1.3,"defence":1.3,"speed":1.3},"4":{"hp":1.4,"power":1.4,"defence":1.4,"speed":1.4},"5":{"hp":1.5,"power":1.5,"defence":1.5,"speed":1.5},"6":{"hp":1.6,"power":1.6,"defence":1.6,"speed":1.6}},"recipesPerProgressionType":{"OneEvolutionFamilyTier":{"0":{"ingredientCount":1,"evolutionTier":1},"1":{"ingredientCount":1,"evolutionTier":1},"2":{"ingredientCount":1,"evolutionTier":1},"3":{"ingredientCount":1,"evolutionTier":1},"4":{"ingredientCount":2,"evolutionTier":1},"5":{"ingredientCount":2,"evolutionTier":1}},"TwoEvolutionFamilyTier":{"0":{"ingredientCount":2,"evolutionTier":1},"1":{"ingredientCount":2,"evolutionTier":1},"2":{"ingredientCount":2,"evolutionTier":2},"3":{"ingredientCount":2,"evolutionTier":2},"4":{"ingredientCount":2,"evolutionTier":2},"5":{"ingredientCount":2,"evolutionTier":2}},"ThreeEvolutionFamilyTier":{"0":{"ingredientCount":2,"evolutionTier":1},"1":{"ingredientCount":2,"evolutionTier":1},"2":{"ingredientCount":3,"evolutionTier":2},"3":{"ingredientCount":3,"evolutionTier":2},"4":{"ingredientCount":3,"evolutionTier":3},"5":{"ingredientCount":3,"evolutionTier":3}},"FourEvolutionFamilyTier":{"0":{"ingredientCount":2,"evolutionTier":1},"1":{"ingredientCount":2,"evolutionTier":2},"2":{"ingredientCount":2,"evolutionTier":2},"3":{"ingredientCount":2,"evolutionTier":2},"4":{"ingredientCount":2,"evolutionTier":3},"5":{"ingredientCount":2,"evolutionTier":4}}}}'),$=JSON.parse('{"defaultRecipesByRarity":{"common":{"0":{"ingredientCount":1,"levelCap":20,"requiredLevel":20,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"1":{"ingredientCount":3,"levelCap":40,"requiredLevel":40,"cost":[{"type":"currency","id":27,"amount":5}],"alternateCost":null},"2":{"ingredientCount":4,"levelCap":60,"requiredLevel":60,"cost":[{"type":"currency","id":27,"amount":5}],"alternateCost":null},"3":{"ingredientCount":6,"levelCap":80,"requiredLevel":80,"cost":[{"type":"currency","id":27,"amount":10}],"alternateCost":null},"4":{"ingredientCount":8,"levelCap":100,"requiredLevel":100,"cost":[{"type":"currency","id":27,"amount":10}],"alternateCost":null},"5":{"ingredientCount":12,"levelCap":120,"requiredLevel":120,"cost":[{"type":"currency","id":27,"amount":15}],"alternateCost":null}},"uncommon":{"0":{"ingredientCount":0,"levelCap":40,"requiredLevel":0,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"1":{"ingredientCount":2,"levelCap":40,"requiredLevel":40,"cost":[{"type":"currency","id":27,"amount":10}],"alternateCost":null},"2":{"ingredientCount":3,"levelCap":60,"requiredLevel":60,"cost":[{"type":"currency","id":27,"amount":10}],"alternateCost":null},"3":{"ingredientCount":4,"levelCap":80,"requiredLevel":80,"cost":[{"type":"currency","id":27,"amount":20}],"alternateCost":null},"4":{"ingredientCount":4,"levelCap":100,"requiredLevel":100,"cost":[{"type":"currency","id":27,"amount":20}],"alternateCost":null},"5":{"ingredientCount":5,"levelCap":120,"requiredLevel":120,"cost":[{"type":"currency","id":27,"amount":30}],"alternateCost":null}},"rare":{"0":{"ingredientCount":0,"levelCap":40,"requiredLevel":0,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"1":{"ingredientCount":2,"levelCap":40,"requiredLevel":40,"cost":[{"type":"currency","id":27,"amount":15}],"alternateCost":null},"2":{"ingredientCount":2,"levelCap":60,"requiredLevel":60,"cost":[{"type":"currency","id":27,"amount":15}],"alternateCost":null},"3":{"ingredientCount":3,"levelCap":80,"requiredLevel":80,"cost":[{"type":"currency","id":27,"amount":30}],"alternateCost":null},"4":{"ingredientCount":4,"levelCap":100,"requiredLevel":100,"cost":[{"type":"currency","id":27,"amount":30}],"alternateCost":null},"5":{"ingredientCount":4,"levelCap":120,"requiredLevel":120,"cost":[{"type":"currency","id":27,"amount":45}],"alternateCost":null}},"heroic":{"0":{"ingredientCount":0,"levelCap":60,"requiredLevel":0,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"1":{"ingredientCount":0,"levelCap":60,"requiredLevel":0,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"2":{"ingredientCount":2,"levelCap":60,"requiredLevel":60,"cost":[{"type":"currency","id":27,"amount":25}],"alternateCost":null},"3":{"ingredientCount":2,"levelCap":80,"requiredLevel":80,"cost":[{"type":"currency","id":27,"amount":50}],"alternateCost":null},"4":{"ingredientCount":3,"levelCap":100,"requiredLevel":100,"cost":[{"type":"currency","id":27,"amount":50}],"alternateCost":null},"5":{"ingredientCount":3,"levelCap":120,"requiredLevel":120,"cost":[{"type":"currency","id":27,"amount":75}],"alternateCost":null}},"legendary":{"0":{"ingredientCount":0,"levelCap":60,"requiredLevel":0,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"1":{"ingredientCount":0,"levelCap":60,"requiredLevel":0,"cost":[{"type":"currency","id":27,"amount":0}],"alternateCost":null},"2":{"ingredientCount":1,"levelCap":60,"requiredLevel":60,"cost":[{"type":"currency","id":27,"amount":50}],"alternateCost":null},"3":{"ingredientCount":2,"levelCap":80,"requiredLevel":80,"cost":[{"type":"currency","id":27,"amount":100}],"alternateCost":null},"4":{"ingredientCount":2,"levelCap":100,"requiredLevel":100,"cost":[{"type":"currency","id":27,"amount":100}],"alternateCost":null},"5":{"ingredientCount":3,"levelCap":120,"requiredLevel":120,"cost":[{"type":"currency","id":27,"amount":150}],"alternateCost":null}}}}'),H=JSON.parse('{"recipesByPetId":{}}');var V=U(37016);class W{static get config(){return this._config}static get merge2RecipesByRarity(){return this._merge2RecipesByRarity}static get merge2RecipesByPetId(){return this._merge2RecipesByPetId}static minimumRankForRarity(k,B){if(B){const B=this._merge2RecipesByRarity.defaultRecipesByRarity[k];for(let k=V.qd.MIN;k<=V.qd.MAX;++k){const U=k;if(G.A.isDefined(null==B?void 0:B[U])&&B[U].ingredientCount>0)return U}}return V.qd.MIN}static parseMerge2RecipesByRarityConfig(k){const B={defaultRecipesByRarity:{}};for(const[U,j]of Object.entries(k.defaultRecipesByRarity)){const k=F.mX[U.toLowerCase()];if(G.A.isDefined(k)){const U={};for(const[k,B]of Object.entries(j)){const F=parseInt(k,10);!isNaN(F)&&F<6&&(U[F]={ingredientCount:B.ingredientCount,levelCap:B.levelCap,requiredLevel:B.requiredLevel,cost:B.cost,alternateCost:B.alternateCost})}B.defaultRecipesByRarity[k]=U}}return B}static parseMerge2RecipesByPetIdConfig(k){const B={recipesByPetId:{}};for(const[U,F]of Object.entries(k.recipesByPetId)){const k={};for(const[B,U]of Object.entries(F)){const F=parseInt(B,10);!isNaN(F)&&F<6&&(k[F]={ingredientCount:U.ingredientCount,levelCap:U.levelCap,requiredLevel:U.requiredLevel,cost:U.cost,alternateCost:U.alternateCost})}B.recipesByPetId[U]=k}return B}}W._config=Object.assign({},j),W._merge2RecipesByRarity=W.parseMerge2RecipesByRarityConfig($),W._merge2RecipesByPetId=W.parseMerge2RecipesByPetIdConfig(H)},50788:(k,B,U)=>{"use strict";U.d(B,{F:()=>j,J:()=>G});var F=U(77601);const G=(0,F.gb)({key:"fab-pet-merge-2-feature",default:!1}),j=(0,F.gb)({key:"fab-pet-merge-2-evolution-disabled",default:!1})},37016:(k,B,U)=>{"use strict";U.d(B,{J1:()=>$,_T:()=>H,o5:()=>F,qd:()=>j,zb:()=>G});var F,G;U(87490),U(48417);!function(k){k.OneEvolutionFamilyTier="OneEvolutionFamilyTier",k.TwoEvolutionFamilyTier="TwoEvolutionFamilyTier",k.ThreeEvolutionFamilyTier="ThreeEvolutionFamilyTier",k.FourEvolutionFamilyTier="FourEvolutionFamilyTier"}(F||(F={})),function(k){k.Success="Success",k.NotEnoughIngredients="NotEnoughIngredients",k.IncompatibleIngredients="IncompatibleIngredients",k.AlreadyMaxRank="AlreadyMaxRank",k.PetNotOwned="PetNotOwned",k.PetCannotBeMerged="PetNotMergeable",k.LevelTooLow="LevelTooLow",k.UnableToGiveFreeMerge="UnableToGiveFreeMerge"}(G||(G={}));const j={MIN:0,MAX:6};var $;!function(k){k.Pet="Pet",k.MembershipReward="MembershipReward",k.MagicoinPet="MagicoinPet",k.FTUEMerge="FTUEMerge"}($||($={}));const H={defaultPetCostTableVariantKey:"mergeCosts",overridePetCostTableVariantKey:"petCosts"}},96989:(k,B,U)=>{"use strict";U.d(B,{Y:()=>$});var F=U(15821),G=U(21574),j=U(37016);class ${static getRecipeForPet(k,B){var U;const F=null!==(U=this.PROGRESSION_TYPES_PER_EVOS[k])&&void 0!==U?U:j.o5.OneEvolutionFamilyTier;return G.g.config.recipesPerProgressionType[F][B]}static getMerge2RecipeForPet(k,B,U){const F=G.g.merge2RecipesByPetId.recipesByPetId[+k];if(F)return F[U];const j=G.g.merge2RecipesByRarity.defaultRecipesByRarity[B];return null==j?void 0:j[U]}static isCompatibleIngredient(k,B,U,G,$){let H=!1;switch(G.type){case j.J1.Pet:const V=B(G.uniqueId);if(this.isMerge1Recipe($)){const B=k(U.ID);if(V&&V.uniqueID!==U.uniqueID){const U=k(V.ID);U.data.evolution.tier===$.evolutionTier&&(H=this.isSameEvolutionLine(k,U,B))}}else H=F.A.isDefined(V)&&U.ID===V.ID&&V.uniqueID!==U.uniqueID;break;case j.J1.MembershipReward:case j.J1.MagicoinPet:H=!0}return H}static isSameEvolutionLine(k,B,U){if(B.ID===U.ID)return!0;if(B.data.evolution.tier>U.data.evolution.tier)return this.isSameEvolutionLine(k,U,B);const F=B.data.curve.find((k=>k.evolveID));if(!(null==F?void 0:F.evolveID))return!1;if(F.evolveID===U.ID)return!0;const G=k(F.evolveID);return this.isSameEvolutionLine(k,G,U)}static canRankUp(k){return kk.uniqueID!==U.uniqueID)).forEach((B=>{var U;let H=1;const V=k(B.uniqueID);for(let k=0;k0&&(j[B.uniqueID]=H)})),j}static selectOptimalIngredients(k,B){const U=Object.entries(k).sort(((k,B)=>k[1]-B[1])),F=U.length;let G=null;for(let j=1;j<1<=B&&(!G||k{"use strict";U.d(B,{m:()=>G,y:()=>j});var F=U(77601);const G=(0,F.gb)({key:"show-pet-details-screen-update",activateAssociatedExperiments:1,default:!1}),j=(0,F.gb)({key:"pet-details-screen-use-alternate-layout",activateAssociatedExperiments:1,default:!1})},13027:(k,B,U)=>{"use strict";var F;U.d(B,{k:()=>F}),function(k){k[k.StartQuest=1]="StartQuest",k[k.BattleOne=2]="BattleOne",k[k.BattleOneGotItem=3]="BattleOneGotItem",k.BattleOneB="2b-first-battle-post-tutorial",k.BattleOneGotItemB="3b-first-battle-post-tutorial-reward",k[k.BattleTwo=4]="BattleTwo",k[k.BattleTwoGotItem=5]="BattleTwoGotItem",k.BattleTwoB="4b-second-battle-post-tutorial",k.BattleTwoGotItemB="5b-second-battle-post-tutorial-reward",k.ClassCode="10-class-code-attach",k.ClassCodeGotItem="11-class-code-attach-reward",k[k.PlayAfterHours=8]="PlayAfterHours",k[k.PlayAfterHoursGotItem=9]="PlayAfterHoursGotItem",k.ProfileQuiz="12-login-credentials-quiz",k.ProfileQuizGotItem="13-login-credentials-quiz-reward",k[k.ParentAttach=6]="ParentAttach",k[k.ParentAttachGotItem=7]="ParentAttachGotItem",k.ParentAttachB="6b-parent-attach-post-ftue",k.ParentAttachGotItemB="7b-parent-attach-post-ftue-reward"}(F||(F={}))},49754:(k,B,U)=>{"use strict";U.d(B,{H:()=>F});const F=(0,U(77601).gb)({key:"fab-post-battle-rescue-screen-variants",default:{enabled:!1,magicoinCost:0}})},92240:(k,B,U)=>{"use strict";U.d(B,{h:()=>$});var F=U(8674),G=U(6670),j=U(58776);class ${static calculateState(k,B,U){var F;let G;const $=B.find((B=>B.name===k));if($){G=$.defaultState;for(let k=0;k<(null===(F=$.stateOverrides)||void 0===F?void 0:F.length);k++){if(!$.stateOverrides[k].stateTaskIds.every((k=>{var B;return(null===(B=U.find((B=>B.id===k)))||void 0===B?void 0:B.status)===j.t.COMPLETE}))){G=$.stateOverrides[k];break}}return G}}static calculateStateWithPreconditions(k,B,U,$){return(0,F.sH)(this,void 0,void 0,(function*(){var F;let H;const V=B.find((B=>B.name===k));if(!V)return;let W=yield G.f.meetsPreconditions($,V.preconditions);if(W){H=V.defaultState;for(let k=0;k<(null===(F=V.stateOverrides)||void 0===F?void 0:F.length);k++){if(W=yield G.f.meetsPreconditions($,V.stateOverrides[k].preconditions),!W)continue;if(!V.stateOverrides[k].stateTaskIds.every((k=>{var B;return(null===(B=U.find((B=>B.id===k)))||void 0===B?void 0:B.status)===j.t.COMPLETE}))){H=V.stateOverrides[k];break}}return H}}))}}},70472:(k,B,U)=>{"use strict";U.d(B,{A:()=>Z});var F=U(7247),G=U(96684),j=U(70760),$=U(60157),H=U(28869);class V extends H.g{isReady(k,B){return!(!B||!(0,$.M6)(B))&&(!(k.shopIDs&&!k.shopIDs.some((k=>k===B.shopID)))&&(!(k.shopNames&&!k.shopNames.some((k=>k===B.shopName)))&&!(k.shopCategories&&!k.shopCategories.some((k=>k===B.shopCategory)))))}getCacheKey(k){var B,U,F;return`ShopRestriction\n ID${null===(B=k.shopIDs)||void 0===B?void 0:B.join("|")}\n Name${null===(U=k.shopNames)||void 0===U?void 0:U.join("|")}\n Category${null===(F=k.shopCategories)||void 0===F?void 0:F.map((k=>k.toString())).join("|")}`}}class W extends H.g{isReady(k,B){return!(!B||!(0,$.An)(B))&&(!(k.unitTypes&&!k.unitTypes.some((k=>k===B.unitType)))&&(!(k.unitIds&&!k.unitIds.some((k=>k===B.id)))&&(!(k.unitNames&&!k.unitNames.some((k=>k===B.name)))&&(!(k.unitNicknames&&!k.unitNicknames.some((k=>k===B.nickname)))&&!(k.unitTeams&&!k.unitTeams.some((k=>k===B.team)))))))}getCacheKey(k){var B,U,F,G,j;return`UnitRestriction\n Type${null===(B=k.unitTypes)||void 0===B?void 0:B.map((k=>k.toString())).join("|")}\n ID${null===(U=k.unitIds)||void 0===U?void 0:U.join("|")}\n Name${null===(F=k.unitNames)||void 0===F?void 0:F.join("|")}\n Nickname${null===(G=k.unitNicknames)||void 0===G?void 0:G.join("|")}\n Team${null===(j=k.unitTeams)||void 0===j?void 0:j.map((k=>k.toString())).join("|")}`}}class q extends H.g{isReady(k,B){return!(!B||!(0,$.Rf)(B))&&this.checkRestrictions(k,B)}checkRestrictions(k,B){return!(k.ids&&!k.ids.some((k=>k===B.uniqueId)))}getCacheKey(k){return`UniqueEncounterRestriction${this.getCacheKeyFromData(k)}`}getCacheKeyFromData(k){var B;return`ID${null===(B=k.ids)||void 0===B?void 0:B.map((k=>k.toString())).join("|")}`}}const K={[F.i.ITEM_RESTRICTIONS]:G.x,[F.i.SHOP_RESTRICTIONS]:V,[F.i.PET_RESTRICTIONS]:j.F,[F.i.UNIT_RESTRICTIONS]:W,[F.i.UNIQUE_ENCOUNTER_RESTRICTIONS]:q};class z extends class{constructor(){this.reset()}doCheck(k,B,U){let F=k.getCacheKey(B);if(F&&!0===(null==B?void 0:B.negateResult)&&(F=`${F}-negate`),F&&F in this._resultsCache)return this._resultsCache[F];let G=k.isReady(B,U);return!0===(null==B?void 0:B.negateResult)&&(G=!G),F&&(this._resultsCache[F]=G),G}reset(){this._resultsCache={},this._cache={}}}{constructor(k){super(),this._taskParams=k}check(k,B){const U=K[k];if(void 0===U)throw new Error(`No condition handler found for type: ${k}`);const F=new U;return this.doCheck(F,B,this._taskParams)}}var Y=U(58776),Q=U(62886),X=U(24522);class Z{get questID(){return this._questID}get taskID(){return this._taskDefinition.id}get type(){return this._taskDefinition.completionRequirements.type}get taskDefinition(){return this._taskDefinition}get taskProgress(){return this._taskProgress}get onSetupTasks(){var k;return null!==(k=this._taskDefinition.onSetup)&&void 0!==k?k:[]}constructor(k,B,U){this._questID=k,this._taskDefinition=B,this._taskProgress=U}incrementProgressInTask(k=1){var B,U;return this.setProgressInTask((null!==(U=null===(B=this._taskProgress.data)||void 0===B?void 0:B.progress)&&void 0!==U?U:0)+k)}resetProgressInTask(){return this.setProgressInTask(0)}setProgressInTask(k){var B,U,F,G,j,$,H,V,W,q;const K=Math.max(null!==(B=this._taskDefinition.completionRequirements.data.target)&&void 0!==B?B:1,1);let z=0,Q=k;if(Q>=K&&!this._taskDefinition.repeatable&&(this._taskProgress.status=Y.t.COMPLETE,z=1),this._taskDefinition.repeatable){z=null===(U=this._taskDefinition.allowProgressOverflow)||void 0===U||U?Math.floor(k/K):Math.min(1,Math.floor(k/K));const B=(null!==(G=null===(F=this._taskProgress.data)||void 0===F?void 0:F.timesCompleted)&&void 0!==G?G:0)+z;"number"==typeof this._taskDefinition.repeatable&&B>=this._taskDefinition.repeatable&&(this._taskProgress.status=Y.t.COMPLETE,z=Math.max(0,this._taskDefinition.repeatable-(null!==($=null===(j=this._taskProgress.data)||void 0===j?void 0:j.timesCompleted)&&void 0!==$?$:0))),Q=k%K,null!==(H=(W=this._taskProgress).data)&&void 0!==H||(W.data={progress:Q,timesCompleted:0}),this._taskProgress.data.timesCompleted=B}else null!==(V=(q=this._taskProgress).data)&&void 0!==V||(q.data={progress:Q});return this._taskProgress.data.progress=Q,this._taskProgress.status===Y.t.COMPLETE&&delete this.taskProgress.data,z}setResults(k){var B,U;null!==(B=(U=this._taskProgress).results)&&void 0!==B||(U.results=[]),this._taskProgress.results.push(...k)}eventMatchesTask(k,B){switch(this.type){case Q.T.PURCHASE_FROM_STORE:return this.type===k&&B.id===this._taskDefinition.id;case Q.T.NONE:return this.type===k}return this.taskMeetsRequirements(k,B,this.taskDefinition.completionRequirements)}taskShouldReset(k,B){return this.taskMeetsRequirements(k,B,this.taskDefinition.resetRequirements)}shouldSendEvent(k,B){return this.eventMatchesTask(k,B)||this.taskShouldReset(k,B)}taskMeetsRequirements(k,B,U){var F,G,j,$;if(!U)return!1;if(!Object.values(Q.T).includes(k))return!1;if(U.type!==k)return!1;if((null===(F=U.data)||void 0===F?void 0:F.id)&&(null===(G=U.data)||void 0===G?void 0:G.id)!==B.id)return!1;if((null===(j=U.data)||void 0===j?void 0:j.type)&&(null===($=U.data)||void 0===$?void 0:$.type)!==B.type)return!1;if(U.conditions){let k=!0;const F=new z(B.params);for(const B of U.conditions||[])if(k=F.check(B.type,B.data),!k)break;if(!k)return!1}return!0}getTimeUntilUnlock(){var k,B;const U=null===(B=null===(k=this._taskDefinition)||void 0===k?void 0:k.preconditions)||void 0===B?void 0:B.find((k=>k.type===X.n.DATE_AFTER));return U?new Date(U.data.date).getTime()-Date.now():0}getTimeUntilExpiry(){var k;const B=null===(k=this._taskDefinition.preconditions)||void 0===k?void 0:k.find((k=>k.type===X.n.DATE_BEFORE));return B?new Date(B.data.date).getTime()-Date.now():0}getPrerequisites(){return this._taskDefinition.prerequisites.filter((k=>"root"!==k))}}},6670:(k,B,U)=>{"use strict";U.d(B,{f:()=>V});var F=U(8674),G=U(15821),j=U(70472),$=U(58776),H=U(29891);class V{static getTasksInProgress(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){var F;if(B.status===$.t.COMPLETE)return[];if(k.id!==B.id)throw new Error(`Quest definition (${k.id}) and player progress (${B.id}) are for different quests.`);const G=[],H=[],V=new Map,W=[];null===(F=B.tasks)||void 0===F||F.forEach((B=>{var U;if(B)if(B.status===$.t.COMPLETE){G.push(B.id);const F=k.tasks.find((k=>k.id===B.id));(null===(U=null==F?void 0:F.metadata)||void 0===U?void 0:U.isExperimentGate)&&W.push(B.id)}else B.status===$.t.STOPPED?H.push(B.id):V.set(B.id,B)})),U.reset();const q=[];for(const B of k.tasks){if(H.includes(B.id))continue;if(!B.prerequisites.filter((U=>this.isPrerequisiteValid(U,k,W,B))).every((k=>G.includes(k))))continue;if(!(yield this.meetsPreconditions(U,B.preconditions)))continue;const F=V.get(B.id);F&&q.push(new j.A(k.id,B,F))}return q}))}static isPrerequisiteValid(k,B,U,F){var G,j;if(!F.checkPrerequisiteValidity)return!0;const $=B.tasks.find((B=>B.id===k));return!!$&&!((null===(G=$.metadata)||void 0===G?void 0:G.experimentTaskId)&&!U.includes(null===(j=$.metadata)||void 0===j?void 0:j.experimentTaskId))}static preprocessQuestProgress(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){var F,G,j,H;if(B&&k.id!==B.id)throw new Error(`Quest definition (${k.id}) and player progress (${B.id}) are for different quests.`);(null==B?void 0:B.uuid)&&B.uuid!==k.metadata.uuid&&(B.tasks=[]);const W={id:k.id,status:(null==B?void 0:B.status)||$.t.IN_PROGRESS,tasks:[]};let q=!1;for(const K of k.tasks){let k=null===(F=null==B?void 0:B.tasks)||void 0===F?void 0:F.find((k=>k.id===K.id));const z=void 0!==k;if(k||(k=V.generateTaskProgress(K.id)),(null==B?void 0:B.status)===$.t.COMPLETE?null===(G=W.tasks)||void 0===G||G.push({id:k.id,status:$.t.COMPLETE,results:null==k?void 0:k.results}):null===(j=W.tasks)||void 0===j||j.push({id:k.id,status:k.status,data:k.data,results:null==k?void 0:k.results}),B&&U&&k.status===$.t.IN_PROGRESS){let F=!1;for(const k of K.stopConditions||[])if(F=yield U.check(k.type,k.data),F)break;F&&(k.status=$.t.STOPPED,q=!0,z||null===(H=B.tasks)||void 0===H||H.push(k))}}return{changesMade:q,fullProgress:W}}))}static filterTasksByPreconditions(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield Promise.all(k.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){var U;return(yield Promise.all((null!==(U=k.taskDefinition.preconditions)&&void 0!==U?U:[]).map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return B.check(k.type,k.data)})))))).every((k=>k))?k:void 0})))))).filter((k=>void 0!==k))}))}static filterTaskSchemasByPreconditions(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield Promise.all(k.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){var U;return(yield Promise.all((null!==(U=k.preconditions)&&void 0!==U?U:[]).map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return B.check(k.type,k.data)})))))).every((k=>k))?k:void 0})))))).filter(G.A.isDefined)}))}static generateTaskProgress(k){return{id:k,status:$.t.IN_PROGRESS,data:{progress:0}}}static getTasksOfType(k,B){return k.tasks.filter((k=>k.completionRequirements.type===B))}static getTasksOfStatus(k,B){if(!k)return[];const U=[];for(const F of k)F.status===B&&U.push(F.id);return U}static shouldProcessOnCompleteHandlers(k){var B,U;return!(null===(U=null===(B=k.results)||void 0===B?void 0:B.find((k=>k.type===H.s.MARK_TASK_COMPLETE)))||void 0===U?void 0:U.result)}static doesTaskGrantItems(k){var B,U;return null!==(U=null===(B=k.onComplete)||void 0===B?void 0:B.some((k=>k.type===H.s.GOT_ITEM||k.type===H.s.GOT_PET)))&&void 0!==U&&U}static meetsPreconditions(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){let U=!0;for(const F of null!=B?B:[])if(U=yield k.check(F.type,F.data),!U)return!1;return!0}))}}},28869:(k,B,U)=>{"use strict";U.d(B,{g:()=>F});class F{getCacheKey(k){return null}}},96684:(k,B,U)=>{"use strict";U.d(B,{x:()=>j});var F=U(60157),G=U(28869);class j extends G.g{isReady(k,B){return!(!B||!(0,F.hr)(B))&&this.checkRestrictions(k,B)}checkRestrictions(k,B){return!(k.rarities&&!k.rarities.some((k=>k===B.rarity)))&&(!(k.types&&!k.types.some((k=>k===B.itemType)))&&(!(k.sources&&!k.sources.some((k=>k===B.source)))&&!(k.ids&&!k.ids.some((k=>k.toString()===B.id.toString())))))}getCacheKey(k){return`ItemRestriction${this.getCacheKeyFromData(k)}`}getCacheKeyFromData(k){var B,U,F,G;return`Rarity${null===(B=k.rarities)||void 0===B?void 0:B.map((k=>k.toString())).join("|")}\n Type${null===(U=k.types)||void 0===U?void 0:U.map((k=>k.toString())).join("|")}\n Source${null===(F=k.sources)||void 0===F?void 0:F.map((k=>k.toString())).join("|")}\n ID${null===(G=k.ids)||void 0===G?void 0:G.map((k=>k.toString())).join("|")}`}}},70760:(k,B,U)=>{"use strict";U.d(B,{F:()=>j});var F=U(60157),G=U(96684);class j extends G.x{isReady(k,B){return!(!B||!(0,F.NT)(B))&&(!!super.checkRestrictions(k,B)&&(!(k.elements&&!k.elements.some((k=>k===B.element)))&&(!(k.levelMin&&B.level&&B.levelk.levelMax))))}getCacheKey(k){var B;return`PetRestriction${super.getCacheKeyFromData(k)}\n Elements${null===(B=k.ids)||void 0===B?void 0:B.map((k=>k.toString())).join("|")}\n LevelMin${k.levelMin}LevelMax${k.levelMax}`}}},94310:(k,B,U)=>{"use strict";var F;U.d(B,{L:()=>F}),function(k){k.ImaniStar="Imani Star",k.MilkyWay="Milky Way",k.Starfall_1="Starfall 1",k.Starfall_2="Starfall 2",k.Starfall_3="Starfall 3",k.Starfall_4="Starfall 4",k.Starfall_5="Starfall 5",k.FestivalPrizeWheel="FestivalPrizeWheel",k.Snips="NPC Gnome Stylist",k.DragonStatue="NPC Dragon Statue",k.CurrencyDrainModal="Currency Drain Modal",k.CutsceneReplayButton="Cutscene Replay Button",k.KandiKorn="Kandi Korn",k.MoonPortal="Moon Portal",k.GrottoPortal="Grotto Portal",k.Selena="Selena",k.Verna="Verna",k.Bargo="Bargo",k.Harriet="Harriet",k.DonZorro="Don Zorro",k.HowardCornelius="Howard Cornelius",k.Athena="Athena",k.BossStatue="Boss Statue",k.MainObjective="Main Objective",k.CurrencyDrainHudOverride="Currency Drain HUD Override",k.CurrencyDrainPopup="Currency Drain Popup",k.MapOverride="Map Override",k.DailyBattles="Daily Battles",k.DailyBossBattles="Daily Boss Battles",k.InitialCutsceneSpawn="Initial Cutscene Spawn",k.FinalCutsceneSpawn="Final Cutscene Spawn"}(F||(F={}))},98938:(k,B,U)=>{"use strict";var F;U.d(B,{t:()=>F}),function(k){k.BattlePass="battle-pass",k.DailyLoginCalendar="daily-login-calendar",k.Ultimates="ultimates",k.ZoneQuests="zone-quests",k.LocalZoneQuests="local-zone-quests",k.PlayerGoals="ftue-player-goal-quests",k.DynamicStore="dynamic-store",k.Festival="festival",k.StateChallenge="state-challenge",k.NationalCup="national-cup",k.FireflyForest="firefly-forest",k.Shiverchill="shiverchill",k.BonfireSpire="bonfire-spire",k.Skywatch="skywatch",k.ShipwreckShore="shipwreck-shore",k.AcademyEndgame="academy-endgame",k.FireflyForestHard="firefly-forest-hard",k.ShiverchillHard="shiverchill-hard",k.BonfireSpireHard="bonfire-spire-hard",k.SkywatchHard="skywatch-hard",k.ShipwreckShoreHard="shipwreck-shore-hard",k.AcademyEndgameHard="academy-endgame-hard"}(F||(F={}))},58776:(k,B,U)=>{"use strict";var F;U.d(B,{t:()=>F}),function(k){k.IN_PROGRESS="in-progress",k.COMPLETE="complete",k.STOPPED="stopped"}(F||(F={}))},62886:(k,B,U)=>{"use strict";var F;U.d(B,{T:()=>F}),function(k){k.ANSWER_QUESTION_CORRECTLY="AnswerQuestionCorrectly",k.ANSWER_QUESTION_INCORRECTLY="AnswerQuestionIncorrectly",k.ATTACH_CLASS_CODE="AttachClassCode",k.ATTACH_PARENT="AttachParent",k.BUTTON_CLICK="ButtonClick",k.CAST_ASTRAL_SPELL="CastAstralSpell",k.CAST_FIRE_SPELL="CastFireSpell",k.CAST_ICE_SPELL="CastIceSpell",k.CAST_NEUTRAL_SPELL="CastNeutralSpell",k.CAST_PHYSICAL_SPELL="CastPhysicalSpell",k.CAST_PLANT_SPELL="CastPlantSpell",k.CAST_SHADOW_SPELL="CastShadowSpell",k.CAST_SPELL="CastSpell",k.CAST_STORM_SPELL="CastStormSpell",k.CAST_WATER_SPELL="CastWaterSpell",k.COLLECT_ITEM="CollectItem",k.COMPLETE_CUTSCENE="CompleteCutscene",k.COMPLETE_LOOT_DASH="CompleteLootDash",k.COMPLETE_PROFILE_QUIZ="CompleteProfileQuiz",k.DEFEAT_ENCOUNTER="DefeatEncounter",k.DEFEAT_QUEST_ENCOUNTER="DefeatQuestEncounter",k.DEFEAT_UNIT="DefeatUnit",k.ENTER_MAP="EnterMap",k.EQUIP_ITEM="EquipItem",k.EVOLVE_PET="EvolvePet",k.FSM_COMPLETE_SEQUENCE="FsmCompleteSequence",k.GAIN_PET_XP="GainPetXp",k.LET_UNIT_ESCAPE="LetUnitEscape",k.LOSE_ANY_BATTLE="LoseAnyBattle",k.MAKE_TASK_PROGRESS="MakeTaskProgress",k.MERGE_PET="MergePet",k.NONE="None",k.OPEN_CHEST="OpenChest",k.PLAY_AFTER_HOURS="PlayAfterHours",k.PLAY_ANY_BATTLE="PlayAnyBattle",k.PLAY_MINUTES="PlayMinutes",k.PURCHASE_FROM_STORE="PurchaseFromStore",k.PURCHASE_ITEM="PurchaseItem",k.PURCHASE_PET_LEVEL="PurchasePetLevel",k.QUEST_OBJECT_STATE_EVALUATED="QuestObjectStateEvaluated",k.RECEIVE_ITEM="ReceiveItem",k.RECEIVE_MULTIPLE_ITEM="ReceiveMultipleItem",k.REMOVE_ITEM="RemoveItem",k.REMOVE_MULTIPLE_ITEM="RemoveMultipleItem",k.RESCUE_PET="RescuePet",k.SPIN_WHEEL="SpinWheel",k.START_QUEST="StartQuest",k.SPEAK_WITH_NPC="SpeakWithNPC",k.TRADE_WITH_ULLA="TradeWithUlla",k.USE_ITEM="UseItem",k.WIN_TUTORIAL_BATTLE="WinTutorialBattle",k.WIN_BATTLE="WinBattle",k.WIN_ANY_BATTLE="WinAnyBattle",k.WIN_LOOT_DASH="WinLootDash"}(F||(F={}))},29891:(k,B,U)=>{"use strict";var F;U.d(B,{s:()=>F}),function(k){k.ACTIVATE_INFINITE_TIER="ActivateInfiniteTier",k.COMPLETE_TUTORIAL="CompleteTutorial",k.GOT_ITEM="GotItem",k.ENSURE_ITEM="EnsureItem",k.GOT_PET="GotPet",k.MEMBER_JAR_GOT_ITEM="MemberJarGotItem",k.GIVE_BATTLE_PASS_XP="GiveBattlePassXp",k.GIVE_ULTIMATE="GiveUltimate",k.LOAD_PREFAB="LoadPrefab",k.ENABLE_INPUT="EnableInput",k.SHOW_COLLECTED_ITEM="ShowCollectedItem",k.SEND_QUEST_SEGMENT_EVENT="SendQuestSegmentEvent",k.SEND_PLAYER_GOALS_SEGMENT_EVENT="SendPlayerGoalsSegmentEvent",k.SUBTRACT_INFINITE_BATTLE_PASS_XP="SubtractInfiniteBattlePassXp",k.MAKE_TASK_PROGRESS="MakeTaskProgress",k.MARK_QUEST_COMPLETE="MarkQuestComplete",k.MARK_TASK_COMPLETE="MarkTaskComplete",k.PLAY_DIALOGUE="PlayDialogue",k.OFFER_TELEPORT="OfferTeleport",k.SEND_CUSTOM_SEGMENT_EVENT="SendCustomSegmentEvent",k.SEND_TOASTER_NOTIFICATION="SendToasterNotification",k.SET_DAILY_LOGIN_CALENDER_TIMESTAMP="SetDailyLoginCalendarTimestamp",k.REMOVE_UNSECURE_ITEM="RemoveUnsecureItem",k.TELEPORT_TO_MAP="TeleportToMap",k.TRIGGER_STORE_OFFER="TriggerStoreOffer",k.SEND_QUEST_EVENT_VIA_HUB="SendQuestEventViaHub",k.BROADCAST="Broadcast"}(F||(F={}))},7247:(k,B,U)=>{"use strict";var F;U.d(B,{i:()=>F}),function(k){k.ITEM_RESTRICTIONS="ItemRestrictions",k.SHOP_RESTRICTIONS="ShopRestrictions",k.PET_RESTRICTIONS="PetRestrictions",k.UNIT_RESTRICTIONS="UnitRestrictions",k.UNIQUE_ENCOUNTER_RESTRICTIONS="UniqueEncounterRestrictions"}(F||(F={}))},24522:(k,B,U)=>{"use strict";var F;U.d(B,{n:()=>F}),function(k){k.DATE_BEFORE="DateIsBefore",k.DATE_AFTER="DateIsAfter",k.HAS_EXPERIMENT_FEATURE="HasExperimentFeature",k.HAS_MEMBER_FEATURE="HasMemberFeature",k.HAS_TOTAL_BATTLE_PASS_XP="HasTotalBattlePassXp",k.HAS_QUEST_SYSTEM="HasGameQuestSystem",k.DAILY_LOGIN_CALENDAR_CHECK_DATE="DailyLoginCalendarCheckDate",k.IS_DURING_SCHOOL_HOURS="IsDuringSchoolHours",k.IS_MEMBER="IsMember",k.HAS_PET_ON_TEAM_WITH_ELEMENT="HasPetOnTeamWithElement",k.ALL_PETS_ON_TEAM_HAVE_ELEMENT="AllPetsOnTeamHaveElement",k.IN_BATTLE_OF_TYPE="InBattleOfType",k.REMAINING_HEALTH="RemainingHealth",k.IS_DURING_WEEKEND="IsDuringWeekend",k.HAS_MET_STATE_CHALLENGE_GOAL="HasMetStateChallengeGoal",k.IS_IN_ZONE="IsInZone",k.IS_WEARING_GEAR="IsWearingGear",k.HAS_APPEARANCE="HasAppearance",k.MEETS_CAMPAIGN_REPLAY_NARRATIVE_REQUIREMENT="MeetsCampaignReplayNarrativeRequirement",k.IS_QUEST_TASK_COMPLETE="IsQuestTaskComplete",k.IS_LEVEL="IsLevel",k.HAS_LOCALE="HasLocale",k.MEETS_FEATURE_REQUIREMENT="MeetsFeatureRequirement",k.BATTLE_HAS_ENEMY="BattleHasEnemy"}(F||(F={}))},60157:(k,B,U)=>{"use strict";var F;function G(k){return k.taskEventType===F.Battle}function j(k){return k.taskEventType===F.Encounter}function $(k){return k.taskEventType===F.Item}function H(k){return k.taskEventType===F.Shop}function V(k){return k.taskEventType===F.Pet}function W(k){return k.taskEventType===F.Unit}U.d(B,{An:()=>W,M6:()=>H,NT:()=>V,Q9:()=>G,Rf:()=>j,Z7:()=>F,hr:()=>$}),function(k){k.Battle="Battle",k.Encounter="Encounter",k.Item="Item",k.Shop="Shop",k.Pet="Pet",k.StateChallenge="StateChallenge",k.Unit="Unit"}(F||(F={}))},65741:(k,B,U)=>{"use strict";var F,G;U.d(B,{d:()=>F,k:()=>G}),function(k){k.ACTIVE="active",k.INACTIVE="inactive"}(F||(F={})),function(k){k.COMPLETED="completed",k.IN_PROGRESS="in-progress",k.NOT_STARTED="not-started"}(G||(G={}))},94428:(k,B,U)=>{"use strict";U.d(B,{H9:()=>G,oW:()=>F});var F,G;!function(k){k.WizardDash="wizardDash"}(F||(F={})),function(k){k.PlayerProgressUpdated="playerProgressUpdated",k.QuizEnded="quizEnded"}(G||(G={}))},24227:(k,B,U)=>{"use strict";U.d(B,{j:()=>j});var F=U(87490),G=U(24652);class j{static getBossElementFromBossType(k){let B;switch(k){case G.ts.AstralDragon:B=F.EElementType.Astral;break;case G.ts.FireDragon:B=F.EElementType.Fire;break;case G.ts.PhysicalDragon:B=F.EElementType.Physical;break;case G.ts.ShadowDragon:B=F.EElementType.Shadow;break;case G.ts.IceWyrm:case G.ts.IceDragon:B=F.EElementType.Ice}return null!=B?B:F.EElementType.Astral}static getRiftsPetReuseCost(k,B,U){var F,G,j,$,H;let V=0;if(void 0!==B.petCooldownMs&&null!==B.petCooldownMs){const $=Math.max(0,k.timestamp+(null!==(F=B.petCooldownMs)&&void 0!==F?F:0)-U);V=Math.ceil($/1e3)*(null!==(G=B.reuseCostPerSecond)&&void 0!==G?G:0)*Math.max((null!==(j=B.costMultiplierPerUse)&&void 0!==j?j:0)*k.reuseCount,1)}else V=(null!==($=B.flatCost)&&void 0!==$?$:0)*(1+(null!==(H=B.costMultiplierPerUse)&&void 0!==H?H:0)*k.reuseCount);return Math.ceil(V)}}},24652:(k,B,U)=>{"use strict";U.d(B,{Hz:()=>W,Y1:()=>F,cn:()=>G,rI:()=>V,ts:()=>j,vA:()=>q});var F,G,j,$=U(88022),H=U(36648);!function(k){k.KeystonesUnlocked="keystonesUnlocked",k.LevelLock="levelLock",k.OwnPetsOfElement="ownPetsOfElement",k.OwnPetsOfRarity="ownPetsOfRarity",k.PuppetMasterDefeated="puppetMasterDefeated"}(F||(F={})),function(k){k.Normal="normal",k.Boss="boss"}(G||(G={})),function(k){k.AstralDragon="astralDragon",k.FireDragon="fireDragon",k.PhysicalDragon="physicalDragon",k.ShadowDragon="shadowDragon",k.IceWyrm="iceWyrm",k.IceDragon="iceDragon"}(j||(j={}));const V={[j.AstralDragon]:[H.q.Key_pose_dragon_astral],[j.FireDragon]:[H.q.Key_pose_dragon_fire],[j.PhysicalDragon]:[H.q.Key_pose_dragon_physical],[j.ShadowDragon]:[H.q.Key_pose_dragon_shadow],[j.IceWyrm]:[$._.Ui_prebattle_json,"boss-ice-wyrm"],[j.IceDragon]:[H.q.Key_pose_dragon_ice]},W={[j.AstralDragon]:H.q.Background_boss_rift_sky,[j.FireDragon]:H.q.Background_boss_rift_sky,[j.PhysicalDragon]:H.q.Background_boss_rift_sky,[j.ShadowDragon]:H.q.Background_boss_rift_sky,[j.IceWyrm]:H.q.Background_boss_rift_ice,[j.IceDragon]:H.q.Background_boss_rift_ice},q={[j.AstralDragon]:"NPC_NAME_DRAGON_ASTRAL",[j.FireDragon]:"NPC_NAME_DRAGON_FIRE",[j.PhysicalDragon]:"NPC_NAME_DRAGON_PHYSICAL",[j.ShadowDragon]:"NPC_NAME_DRAGON_SHADOW",[j.IceWyrm]:"NPC_NAME_ICE_WORM",[j.IceDragon]:"NPC_NAME_DRAGON_ICE"}},42448:(k,B,U)=>{"use strict";U.d(B,{BN:()=>H,Bs:()=>rt,CN:()=>Q,JG:()=>at,N3:()=>Z,Qm:()=>ct,R7:()=>et,T7:()=>ht,Ty:()=>nt,VS:()=>Y,X5:()=>W,_u:()=>ot,a6:()=>q,aK:()=>K,d:()=>st,fW:()=>it,h5:()=>z,ni:()=>X,vP:()=>$,wJ:()=>V});var F=U(99625),G=U(64270),j=U(87490);const $=3;j.EElementType.Astral,j.EElementType.Physical,j.EElementType.Shadow,j.EElementType.Fire;var H,V,W;!function(k){k[k.PortalOneKey=1]="PortalOneKey",k[k.PortalTwoKey=2]="PortalTwoKey",k[k.PortalThreeKey=3]="PortalThreeKey"}(H||(H={})),function(k){k.RewardDetermined="rewardDetermined"}(V||(V={})),function(k){k.Astral="astral",k.Default="default",k.Fire="fire",k.Ice="ice",k.Physical="physical",k.Plant="plant",k.Shadow="shadow",k.Storm="storm",k.Water="water"}(W||(W={}));const q={[W.Astral]:"#A4F1EE",[W.Default]:"#DDB2A5",[W.Fire]:"#FDA97B",[W.Ice]:"#B1F4F5",[W.Physical]:"#C6BCB7",[W.Plant]:"#A6FCA3",[W.Shadow]:"#C8ADFA",[W.Storm]:"#B7B0F0",[W.Water]:"#79BCFD"},K={[W.Astral]:14348986,[W.Default]:14529189,[W.Fire]:16765601,[W.Ice]:15138815,[W.Physical]:15587521,[W.Plant]:14744759,[W.Shadow]:15976433,[W.Storm]:12509680,[W.Water]:9890047},z={[W.Astral]:"#94E8FD",[W.Default]:"#FFFFFF",[W.Fire]:"#FF9C6D",[W.Ice]:"#91DFF8",[W.Physical]:"#BBB2AD",[W.Plant]:"#9CF19D",[W.Shadow]:"#B9A5F1",[W.Storm]:"#ABA8E6",[W.Water]:"#7FCDFF"},Y={[W.Astral]:1,[W.Default]:.15,[W.Fire]:1,[W.Ice]:1,[W.Physical]:1,[W.Plant]:1,[W.Shadow]:1,[W.Storm]:1,[W.Water]:1};var Q,X;!function(k){k.NoPetsOfElement="noPetsOfElement",k.NoPetsOfRarity="noPetsOfRarity",k.OnlyPetsOfElement="onlyPetsOfElement",k.OnlyPetsOfRarity="onlyPetsOfRarity"}(Q||(Q={})),function(k){k.Portal1="portal1",k.Portal2="portal2",k.Portal3="portal3"}(X||(X={}));const Z={id:X.Portal1,location:{x:640,y:140},shopNpcPrefab:F.l.Portal1ShopNPC,shopNpcLocation:{x:540,y:340}},J={id:X.Portal2,location:{x:280,y:200},shopNpcPrefab:F.l.Portal2ShopNPC,shopNpcLocation:{x:180,y:400}},tt={id:X.Portal3,location:{x:1e3,y:200},shopNpcPrefab:F.l.Portal3ShopNPC,shopNpcLocation:{x:900,y:400}},et={[X.Portal1]:Z,[X.Portal2]:J,[X.Portal3]:tt},it={[X.Portal1]:H.PortalOneKey,[X.Portal2]:H.PortalTwoKey,[X.Portal3]:H.PortalThreeKey},st={[X.Portal1]:G.GA.RiftsPortal1Shop,[X.Portal2]:G.GA.RiftsPortal2Shop,[X.Portal3]:G.GA.RiftsPortal3Shop},nt={[X.Portal1]:28,[X.Portal2]:29,[X.Portal3]:30},at={28:X.Portal1,29:X.Portal2,30:X.Portal3};var rt;!function(k){k.DynamicStoreModalHeaderText="RIFTS_DYNAMIC_STORE_MODAL_HEADER_TEXT",k.DynamicStoreModalBodyText="RIFTS_DYNAMIC_STORE_MODAL_BODY_TEXT"}(rt||(rt={}));const ot=["currency","gold","item","pet"],ht=[28,29,30];var ct;!function(k){k.TemporaryMemberModal="TemporaryMemberModal"}(ct||(ct={}))},43516:(k,B,U)=>{"use strict";U.d(B,{v:()=>F});var F;U(48417);!function(k){k.OFFER_ACTIVE="Offer active",k.NO_ACTIVE_OFFER="No active offer",k.OFFER_ENDING_SOON="Offer ending soon",k.OFFER_IN_GRACE_PERIOD="Offer in grace period"}(F||(F={}))},86913:(k,B,U)=>{"use strict";var F;U.d(B,{u:()=>F}),function(k){k.Main="main",k.Side="side",k.FeaturedSpawn="featuredSpawn",k.AfterSchool="afterSchool"}(F||(F={}))},24030:(k,B,U)=>{"use strict";U.d(B,{$:()=>$});var F,G=U(98938);!function(k){k.StateChallenge="StateChallengeQuests",k.NationalCup="NationalCupQuests"}(F||(F={}));var j=U(8820);const $=k=>{var B;return null===(B=(k=>{switch(k){case j.a.StateChallenge:return{questId:F.StateChallenge,tag:G.t.StateChallenge};case j.a.NationalCup:return{questId:F.NationalCup,tag:G.t.NationalCup};default:return}})(k))||void 0===B?void 0:B.questId}},8820:(k,B,U)=>{"use strict";var F;U.d(B,{a:()=>F}),function(k){k.StateChallenge="STATE_CHALLENGE",k.NationalCup="NATIONAL_CUP",k.SparkCup="SPARK_CUP",k.None="NONE"}(F||(F={}))},43523:(k,B,U)=>{"use strict";U.d(B,{P:()=>F});const F=(0,U(77601).gb)({key:"status-effects",activateAssociatedExperiments:1,default:!1})},46701:(k,B,U)=>{"use strict";U.d(B,{Q:()=>F});const F=(0,U(77601).gb)({key:"universal-team-selection",activateAssociatedExperiments:1,default:{enabled:!1}})},76253:(k,B,U)=>{"use strict";var F;U.d(B,{B:()=>F}),function(k){k.None="",k.FestivalPortal="Festival-Portal",k.MemberLockedRifts="Member-Locked-Rifts",k.MemberLockedRiftsPlay="Member-Locked-Rifts-Play",k.PostBattleFlow="Post-Battle-Flow",k.WizardBank="Wizard-Bank",k.WizardCostumes="Wizard-Costumes"}(F||(F={}))},4903:(k,B,U)=>{"use strict";var F,G;U.d(B,{W:()=>G,s:()=>F}),function(k){k.MemberLockedRiftsMemberIntro="member-locked-rifts-member-intro",k.MemberLockedRiftsNonMemberHome="member-locked-rifts-nonmember-home",k.MemberLockedRiftsNonMemberSchool="member-locked-rifts-nonmember-school",k.PostBattleFlowHome="post-battle-flow-home",k.PostBattleFlowSchool="post-battle-flow-school",k.ArcadiaLink="arcadia-link",k.WizardBank="wizard-bank",k.WizardCostumesTutorial="wizard-costumes-tutorial"}(F||(F={})),function(k){k.SD="480",k.HD="720",k.FullHD="1080"}(G||(G={}))},80003:(k,B,U)=>{"use strict";U.d(B,{D:()=>F,d:()=>$});var F,G=U(77601),j=U(63011);!function(k){k.NonMember="non_member",k.Core="core",k.Plus="plus",k.Ultra="ultra"}(F||(F={}));const $=(0,G.gb)({key:"wizard-bank",activateAssociatedExperiments:1,default:{enabled:!1,allowances:{}},evaluate:k=>k.enabled?k:Object.assign(Object.assign({},k),{allowances:{[F.Ultra]:{requireAnyMemberFeature:[j.D.ULTRA_BONUS_COINS],reward:{currency:27,value:880},recurrence:"monthly.every.1"}}})})},32389:(k,B,U)=>{"use strict";U.d(B,{q:()=>F});const F=(0,U(77601).gb)({key:"wizard-costumes",default:{enabled:!1}})},50654:(k,B,U)=>{"use strict";var F;U.d(B,{V:()=>F}),function(k){k.Food="food",k.Potion="potion"}(F||(F={}))},95066:(k,B,U)=>{"use strict";var F;U.d(B,{d:()=>F}),function(k){k.Increment="increment",k.Decrement="decrement",k.Timing="timing"}(F||(F={}))},36525:(k,B,U)=>{"use strict";U.d(B,{i:()=>F});class F{constructor(){this.key=null,this.value=null}setKey(k){this.key=k}getKey(){return this.key}setValue(k){this.value=k}getValue(){return this.value}isValid(){return this.validateKey()&&this.validateValue()}serialize(){if(this.isValid())return{key:this.key,value:this.value};throw new Error("Invalid stats data.")}deserialize(k){this.setKey(k.key),this.setValue(k.value)}validateKey(){return"string"==typeof this.key&&this.key.length>0&&(k=>{const B=k.toLowerCase().match(/^([a-z.\-_0-9])+/g);return!!B&&(void 0!==(null==B?void 0:B[0])&&B[0].length===k.length)})(this.key)}validateValue(){return Number.isInteger(this.value)}}},84959:(k,B,U)=>{"use strict";U.d(B,{x:()=>z});var F=U(8674),G=U(79687),j=U(2872),$=U(85933),H=U(96051);class V extends H.B{constructor(){super(...arguments),this.name=null}setName(k){this.name=k}getName(){return this.name}isValid(){return this.name&&this.name.isValid()}}var W=U(55110);class q extends H.B{constructor(){super(...arguments),this.appearance=null}setAppearance(k){this.appearance=k}getAppearance(){return this.appearance}isValid(){return this.appearance&&this.appearance.isValid()}}class K extends $.z{deserialize(k){if(k&&1===k.version){const B=new q;return B.setAppearance(new V),B.getAppearance().setName(new W.S),null!==k.appearance.name&&void 0!==k.appearance.name&&(B.getAppearance().getName().setFirstName(k.appearance.name.first),B.getAppearance().getName().setMiddleName(k.appearance.name.middle),B.getAppearance().getName().setLastName(k.appearance.name.last),B.getAppearance().getName().setNickname(k.appearance.name.nick)),void 0===B.getAppearance().getName().getNickname()&&B.getAppearance().getName().setNickname(null),B.isValid()?B:null}return null}serialize(k){return k.isValid()?{version:1,appearance:{name:{first:k.getAppearance().getName().getFirstName(),middle:k.getAppearance().getName().getMiddleName(),last:k.getAppearance().getName().getLastName(),nick:k.getAppearance().getName().getNickname()}}}:null}}let z=class extends j.k{constructor(){super(),this.factoriesContainer=null,this.factoriesContainer=new G.Container,this.factoriesContainer.bind("v1").to(K)}getPlayer(k){if(this.factoriesContainer.isBound(`v${k.version}`)){return this.factoriesContainer.get(`v${k.version}`).deserialize(k)}return console.log("Unable to deserialize player"),null}getAppearance(k){const B=this.factoriesContainer.get("v1").deserialize({appearance:k,version:1});return B?B.getAppearance():(console.log("Unable to deserialize appearance"),null)}};z=(0,F.Cg)([(0,G.injectable)(),(0,F.Sn)("design:paramtypes",[])],z)},55110:(k,B,U)=>{"use strict";U.d(B,{S:()=>G});var F=U(96051);class G extends F.B{constructor(){super(...arguments),this.firstName=null,this.middleName=null,this.lastName=null,this.nickname=null}setFirstName(k){this.firstName=k}getFirstName(){return this.firstName}setMiddleName(k){this.middleName=k}getMiddleName(){return this.middleName}setLastName(k){this.lastName=k}getLastName(){return this.lastName}setNickname(k){this.nickname=k}getNickname(){return this.nickname}isValid(){const k=null===this.firstName||void 0===this.firstName||this.firstName>0,B=null===this.middleName||void 0===this.middleName||this.middleName>0,U=null===this.lastName||void 0===this.lastName||this.lastName>0,F=null===this.nickname||void 0===this.nickname||this.nickname>0;return k||console.log(`NameData firstName invalid: ${this.firstName}`),B||console.log(`NameData middleName invalid: ${this.middleName}`),U||console.log(`NameData lastName invalid: ${this.lastName}`),F||console.log(`NameData nickname invalid: ${this.nickname}`),k&&B&&U&&F}}},12049:(k,B,U)=>{"use strict";U.d(B,{J:()=>j});var F=U(95891),G=U(96051);class j extends G.B{constructor(){super(...arguments),this.type=null,this.ID=-1,this.cost=[]}getType(){return this.type}setType(k){this.type=k}getID(){return this.ID}setID(k){this.ID=k}getCost(){return this.cost}setCost(k){this.cost=k}isValid(){return null!==this.cost&&this.cost.length>0&&(0,F.every)(this.cost,(k=>k.isValid()))&&null!==this.type&&this.type.length>0&&this.ID>0}}},96051:(k,B,U)=>{"use strict";U.d(B,{B:()=>F});class F{}},85933:(k,B,U)=>{"use strict";U.d(B,{z:()=>$});var F,G=U(8674),j=U(79687);let $=F=class{deserializeCollection(k){return F.deserializeCollection(k,this.deserialize)}serializeCollection(k){return F.serializeCollection(k,this.serialize)}static deserializeCollection(k,B){const U=[];for(let F=0;F{"use strict";U.d(B,{k:()=>j});var F=U(8674),G=U(79687);let j=class{};j=(0,F.Cg)([(0,G.injectable)()],j)},90661:(k,B,U)=>{"use strict";U.d(B,{O:()=>F});class F{static areBitsSet(k,B){return(k&B)===B}static isBitSet(k,B){return F.areBitsSet(k,1<{"use strict";var F;U.d(B,{B:()=>F}),function(k){k.FEATURE_HOUSE_MOVING="FEATURE_HOUSE_MOVING",k.FEATURE_HOUSE_VISITING="FEATURE_HOUSE_VISITING",k.FEATURE_STYLIST="FEATURE_STYLIST",k.FEATURE_CLOUD_MOUNT="FEATURE_CLOUD_MOUNT",k.FEATURE_SOCIAL_FEED="FEATURE_SOCIAL_FEED",k.FEATURE_BADGES="FEATURE_BADGES",k.FEATURE_BATTLE_TUTORIAL="FEATURE_BATTLE_TUTORIAL",k.FEATURE_ACADEMY="FEATURE_ACADEMY",k.FEATURE_ACADEMY_TOWERS="FEATURE_ACADEMY_TOWERS",k.FEATURE_TOWERS_PROMPT="FEATURE_TOWERS_PROMPT",k.FEATURE_SUMMERFEST_CUTSCENES="FEATURE_SUMMERFEST_CUTSCENES",k.FEATURE_SPRINGFEST_CUTSCENES="FEATURE_SPRINGFEST_CUTSCENES",k.FEATURE_STARLIGHT_CUTSCENES="FEATURE_STARLIGHT_CUTSCENES",k.FEATURE_PUMPKINFEST_CUTSCENES="FEATURE_PUMPKINFEST_CUTSCENES",k.FEATURE_WINTERFEST_CUTSCENES="FEATURE_WINTERFEST_CUTSCENES",k.FEATURE_TOWERTOWN="FEATURE_TOWERTOWN",k.BREADCRUMB_CLICKED_WORLD_MAP_BUTTON="BREADCRUMB_CLICKED_WORLD_MAP_BUTTON",k.BREADCRUMB_CLICKED_WORLD_MAP_HOUSE="BREADCRUMB_CLICKED_WORLD_MAP_HOUSE",k.BREADCRUMB_CLICKED_HOUSE_LOCK_BUTTON="BREADCRUMB_CLICKED_HOUSE_LOCK_BUTTON",k.BREADCRUMB_CLICKED_HOUSE_MOVE_BUTTON="BREADCRUMB_CLICKED_HOUSE_MOVE_BUTTON",k.BREADCRUMB_CLICKED_CARD_VISIT_BUTTON="BREADCRUMB_CLICKED_CARD_VISIT_BUTTON",k.BREADCRUMB_CLICKED_CARD_STYLIST_BUTTON="BREADCRUMB_CLICKED_CARD_STYLIST_BUTTON",k.BREADCRUMB_CLICKED_DAB="BREADCRUMB_CLICKED_DAB",k.BREADCRUMB_CLICKED_DAB_EMOTE_BUTTON="BREADCRUMB_CLICKED_DAB_EMOTE_BUTTON",k.BREADCRUMB_CLICKED_DAB_DANCE_BUTTON="BREADCRUMB_CLICKED_DAB_DANCE_BUTTON",k.BREADCRUMB_CLICKED_DAB_DAB_BUTTON="BREADCRUMB_CLICKED_DAB_DAB_BUTTON",k.FEATURE_TUTORIAL="FEATURE_TUTORIAL",k.BREADCRUMB_TUTORIAL_COMPLETE="BREADCRUMB_TUTORIAL_COMPLETE",k.BREADCRUMB_TITAN_INTRO="BREADCRUMB_TITAN_INTRO",k.BREADCRUMB_TITAN_WATCHED_INTRO="BREADCRUMB_TITAN_WATCHED_INTRO",k.BREADCRUMB_TITAN_HARVEY_TALKED="BREADCRUMB_TITAN_HARVEY_TALKED",k.FEATURE_TITAN_UNLOCKED="BREADCRUMB_TITAN_UNLOCKED_HUD_BUTTON",k.BREADCRUMB_TITAN_UNLOCKED_HUD_BUTTON="BREADCRUMB_TITAN_UNLOCKED_HUD_BUTTON",k.BREADCRUMB_TITAN_UNLOCKED_DIALOGUE="BREADCRUMB_TITAN_UNLOCKED_DIALOGUE",k.BREADCRUMB_TITAN_UNLOCKED_BUTTONS="BREADCRUMB_TITAN_UNLOCKED_BUTTONS",k.BREADCRUMB_CLOUD_MOUNT_TOGGLED="BREADCRUMB_CLOUD_MOUNT_TOGGLED",k.BREADCRUMB_SOCIAL_FEED_OPENED="BREADCRUMB_SOCIAL_FEED_OPENED",k.BREADCRUMB_CLICKED_SOCIAL_BUTTON="BREADCRUMB_CLICKED_SOCIAL_BUTTON",k.BREADCRUMB_CLICKED_BADGES_BUTTON="BREADCRUMB_CLICKED_BADGES_BUTTON",k.BREADCRUMB_UNLOCK_ACADEMY="BREADCRUMB_UNLOCK_ACADEMY",k.BREADCRUMB_UNLOCK_ACADEMY_NOOT_DIALOGUE="BREADCRUMB_UNLOCK_ACADEMY_NOOT_DIALOGUE",k.BREADCRUMB_FIRST_BATTLE_STARTED="BREADCRUMB_FIRST_BATTLE_STARTED",k.BREADCRUMB_FIRST_BATTLE_FINISHED="BREADCRUMB_FIRST_BATTLE_FINISHED",k.BREADCRUMB_FIRST_NEAR_DEFEAT="BREADCRUMB_FIRST_NEAR_DEFEAT",k.BREADCRUMB_FIRST_ENEMY_HURT="BREADCRUMB_FIRST_ENEMY_HURT",k.BREADCRUMB_FIRST_NFACTOR_BONUS="BREADCRUMB_FIRST_NFACTOR_BONUS",k.BREADCRUMB_FIRST_ENERGY_GAINED="BREADCRUMB_FIRST_ENERGY_GAINED",k.BREADCRUMB_FIRST_AOE_READY="BREADCRUMB_FIRST_AOE_READY",k.BREADCRUMB_FIRST_AOA_CHARGED="BREADCRUMB_FIRST_AOA_CHARGED",k.BREADCRUMB_FIRST_AOA_USED="BREADCRUMB_FIRST_AOA_USED",k.BREADCRUMB_AUTO_ATTACK_TUTORIAL="BREADCRUMB_AUTO_ATTACK_TUTORIAL",k.BREADCRUMB_FIRST_PET_RESCUABLE="BREADCRUMB_FIRST_PET_RESCUABLE",k.BREADCRUMB_FIRST_PET_RESCUED="BREADCRUMB_FIRST_PET_RESCUED",k.BREADCRUMB_FREE_RESCUE="BREADCRUMB_FREE_RESCUE",k.BREADCRUMB_EARTH_TOWER="BREADCRUMB_EARTH_TOWER",k.BREADCRUMB_FIRE_TOWER="BREADCRUMB_FIRE_TOWER",k.BREADCRUMB_ICE_TOWER="BREADCRUMB_ICE_TOWER",k.BREADCRUMB_WATER_TOWER="BREADCRUMB_WATER_TOWER",k.BREADCRUMB_STORM_TOWER="BREADCRUMB_STORM_TOWER",k.BREADCRUMB_ACADEMY_SECOND_FLOOR="BREADCRUMB_ACADEMY_SECOND_FLOOR",k.BREADCRUMB_ACADEMY_UNPLACED_KEYSTONES="BREADCRUMB_ACADEMY_UNPLACED_KEYSTONES",k.BREADCRUMB_ACADEMY_NO_KEYSTONES="BREADCRUMB_ACADEMY_NO_KEYSTONES",k.BREADCRUMB_ACADEMY_VISITED="BREADCRUMB_ACADEMY_VISITED",k.BREADCRUMB_COMPLETED_ELEVATOR="BREADCRUMB_COMPLETED_ELEVATOR",k.BREADCRUMB_ACADEMY_VISITED_AFTER_RECIEVING_KEYSTONE="BREADCRUMB_ACADEMY_VISITED_AFTER_RECIEVING_KEYSTONE",k.BREADCRUMB_ACADEMY_PEDESTAL_ROOM_VISITED_AFTER_RECIEVING_KEYSTONE="BREADCRUMB_ACADEMY_PEDESTAL_ROOM_VISITED_AFTER_RECIEVING_KEYSTONE",k.BREADCRUMB_ACADEMY_TOWER_LOBBY_VISITED_AFTER_PLACING_KEYSTONE="BREADCRUMB_ACADEMY_TOWER_LOBBY_VISITED_AFTER_PLACING_KEYSTONE",k.FIRST_TIME_PROMPT="FIRST_TIME_PROMPT",k.NOOT_TOWER_PROMPT="NOOT_TOWER_PROMPT",k.FEATURE_COOP_BATTLE="FEATURE_COOP_BATTLE",k.BREADCRUMB_COOP_BATTLE_START="BREADCRUMB_COOP_BATTLE_START",k.BREADCRUMB_COOP_PARTY_SELECT="BREADCRUMB_COOP_PARTY_SELECT",k.BREADCRUMB_COOP_CRYSTAL_INTRO="BREADCRUMB_COOP_CRYSTAL_INTRO",k.BREADCRUMB_SUMMERFEST_INTRO="BREADCRUMB_SUMMERFEST_INTRO",k.BREADCRUMB_FIRST_SUMMERFEST_WHEEL_CLICK="BREADCRUMB_FIRST_SUMMERFEST_WHEEL_CLICK",k.BREADCRUMB_FIRST_SUMMERFEST_STYLIST_CLICK="BREADCRUMB_FIRST_SUMMERFEST_STYLIST_CLICK",k.BREADCRUMB_FIRST_SUMMERFEST_NICKNAMER_CLICK="BREADCRUMB_FIRST_SUMMERFEST_NICKNAMER_CLICK",k.BREADCRUMB_STARLIGHT_INTRO="BREADCRUMB_STARLIGHT_INTRO",k.BREADCRUMB_PUMPKINFEST_INTRO="BREADCRUMB_PUMPKINFEST_INTRO",k.BREADCRUMB_WINTERFEST_INTRO="BREADCRUMB_WINTERFEST_INTRO",k.BREADCRUMB_SPRINGFEST_INTRO="BREADCRUMB_SPRINGFEST_INTRO",k.BREADCRUMB_FIRST_SPRINGFEST_DON_ZORRO_CLICK="BREADCRUMB_FIRST_SPRINGFEST_DON_ZORRO_CLICK",k.BREADCRUMB_FIRST_SPRINGFEST_HARRIET_HOOD_CLICK="BREADCRUMB_FIRST_SPRINGFEST_HARRIET_HOOD_CLICK",k.FEATURE_DUNGEONS="BREADCRUMB_FEATURE_DUNGEONS",k.BREADCRUMB_STARTED_CRYSTAL_CAVERNS="BREADCRUMB_STARTED_CRYSTAL_CAVERNS",k.FEATURE_ULTIMATES="FEATURE_ULTIMATES",k.BREADCRUMB_ULTIMATES_FTUE="BREADCRUMB_ULTIMATES_FTUE",k.BREADCRUMB_ULTIMATES_SUBSPACE_NOTIFICATION="BREADCRUMB_ULTIMATES_SUBSPACE_NOTIFICATION",k.FEATURE_ANTI_CHURN_2="BREADCRUMB_FEATURE_ANTI_CHURN_2",k.BREADCRUMB_NEW_MEMBER="BREADCRUMB_NEW_MEMBER",k.BREADCRUMB_SEEN_NEW_MEMBER_AD="BREADCRUMB_SEEN_NEW_MEMBER_AD",k.FEATURE_QUEST_GOALS="FEATURE_QUEST_GOALS",k.BREADCRUMB_NEXT_GOAL_INTRO="BREADCRUMB_NEXT_GOAL_INTRO",k.FEATURE_WEEKLY_CHALLENGE="FEATURE_WEEKLY_CHALLENGE",k.BREADCRUMB_FIRST_CHALLENGE_COMPLETE="BREADCRUMB_FIRST_CHALLENGE_COMPLETE",k.FEATURE_PET_EVOLUTION="FEATURE_PET_EVOLUTION",k.BREADCRUMB_NONMEMBER_FIRST_PET_EVOLUTION="BREADCRUMB_NONMEMBER_FIRST_PET_EVOLUTION",k.FEATURE_PET_UPGRADE_FTUE="FEATURE_PET_UPGRADE_FTUE",k.BREADCRUMB_LEVELLED_UP_PET_FIRST_TIME="BREADCRUMB_LEVELLED_UP_PET_FIRST_TIME",k.BREADCRUMB_SEEN_YOUR_TEAM_MENU="BREADCRUMB_SEEN_YOUR_TEAM_MENU",k.FEATURE_PET_GEAR="FEATURE_PET_GEAR",k.BREADCRUMB_EQUIP_PET_GEAR_FTUE="BREADCRUMB_EQUIP_PET_GEAR_FTUE",k.BREADCRUMB_RECEIVE_PET_GEAR_AD_GIFT="BREADCRUMB_RECEIVE_PET_GEAR_AD_GIFT",k.BREADCRUMB_PET_GEAR_FTUE_STEP_START="BREADCRUMB_PET_GEAR_FTUE_STEP_START",k.FEATURE_PETS_IN_ZONES="FEATURE_PETS_IN_ZONES",k.BREADCRUMB_PETS_IN_ZONES_BUTTON_FTUE="BREADCRUMB_PETS_IN_ZONES_BUTTON_FTUE",k.FEATURE_ZONE_ENTRY_ILLUSTRATION="FEATURE_ZONE_ENTRY_ILLUSTRATION",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_LAMPLIGHT="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_LAMPLIGHT",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FOREST="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FOREST",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILL="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILL",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCH="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCH",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIRE="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIRE",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECK="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECK",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FORESTHARD="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FORESTHARD",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILLHARD="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILLHARD",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCHHARD="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCHHARD",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIREHARD="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIREHARD",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECKHARD="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECKHARD",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FORESTEXPERT="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FORESTEXPERT",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILLEXPERT="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILLEXPERT",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCHEXPERT="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCHEXPERT",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIREEXPERT="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIREEXPERT",k.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECKEXPERT="BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECKEXPERT",k.FEATURE_ZONE_LOCK_CUTSCENE="FEATURE_ZONE_LOCK_CUTSCENE",k.BREADCRUMB_PUPPETMASTER_WORLD_MAP_SEQUENCE="BREADCRUMB_PUPPETMASTER_WORLD_MAP_CUTSCENE",k.FEATURE_FIREFLY_QUEST_REVISIONS="FEATURE_FIREFLY_QUEST_REVISIONS",k.BREADCRUMB_SHIVERCHILL_UNLOCKED="BREADCRUMB_SHIVERCHILL_UNLOCKED",k.FEATURE_ZONE_UNLOCKED_POPUP="FEATURE_ZONE_UNLOCKED_POPUP",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL="BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE="BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK="BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH="BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIVERCHILL="BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIVERCHILL",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_BONFIRE="BREADCRUMB_ZONE_UNLOCKED_ANIM_BONFIRE",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIPWRECK="BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIPWRECK",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_SKYWATCH="BREADCRUMB_ZONE_UNLOCKED_ANIM_SKYWATCH",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_ACADEMY="BREADCRUMB_ZONE_UNLOCKED_ANIM_ACADEMY",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER="BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DYNO="BREADCRUMB_ZONE_UNLOCKED_ANIM_DYNO",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_HOUSE="BREADCRUMB_ZONE_UNLOCKED_ANIM_HOUSE",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_TOWERTOWN="BREADCRUMB_ZONE_UNLOCKED_ANIM_TOWERTOWN",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_LAMPLIGHT="BREADCRUMB_ZONE_UNLOCKED_ANIM_LAMPLIGHT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM="BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE="BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE",k.FEATURE_ZONE_UNLOCKED_POPUP_HARD="FEATURE_ZONE_UNLOCKED_POPUP_HARD",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL_HARD="BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL_HARD",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE_HARD="BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE_HARD",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK_HARD="BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK_HARD",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH_HARD="BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIVERCHILL_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIVERCHILL_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_BONFIRE_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_BONFIRE_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIPWRECK_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIPWRECK_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_SKYWATCH_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_SKYWATCH_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_ACADEMY_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_ACADEMY_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DYNO_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_DYNO_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_HOUSE_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_HOUSE_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_TOWERTOWN_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_TOWERTOWN_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_LAMPLIGHT_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_LAMPLIGHT_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM_HARD",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE_HARD="BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE_HARD",k.FEATURE_ZONE_UNLOCKED_POPUP_EXPERT="FEATURE_ZONE_UNLOCKED_POPUP_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL_EXPERT="BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE_EXPERT="BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK_EXPERT="BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH_EXPERT="BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIVERCHILL_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIVERCHILL_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_BONFIRE_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_BONFIRE_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIPWRECK_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_SHIPWRECK_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_SKYWATCH_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_SKYWATCH_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_ACADEMY_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_ACADEMY_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DYNO_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_DYNO_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_HOUSE_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_HOUSE_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_TOWERTOWN_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_TOWERTOWN_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_LAMPLIGHT_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_LAMPLIGHT_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM_EXPERT",k.BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE_EXPERT="BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE_EXPERT",k.FEATURE_ENDGAME_QUEST="FEATURE_ENDGAME_QUEST",k.BREADCRUMB_ENDGAME_QUEST_SAW_WORLD_MAP_DIALOGUE="BREADCRUMB_ENDGAME_QUEST_SAW_WORLD_MAP_DIALOGUE",k.BREADCRUMB_ENDGAME_QUEST_SAW_KEYSTONE_DIALOGUE="BREADCRUMB_ENDGAME_QUEST_SAW_KEYSTONE_DIALOGUE",k.BREADCRUMB_ENDGAME_QUEST_SAW_NOOT_ACADEMY_DIALOGUE="BREADCRUMB_ENDGAME_QUEST_SAW_NOOT_ACADEMY_DIALOGUE",k.BREADCRUMB_ENDGAME_QUEST_FIRST_ACADEMY_VISIT_WITH_ALL_GEMS="BREADCRUMB_ENDGAME_QUEST_FIRST_ACADEMY_VISIT_WITH_ALL_GEMS",k.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PIPPET="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PIPPET",k.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_FIREFLY="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_FIREFLY",k.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIVERCHILL="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIVERCHILL",k.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_BONFIRE="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_BONFIRE",k.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIPWRECK="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIPWRECK",k.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SKYWATCH="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SKYWATCH",k.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PUPPET_MASTER="BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PUPPET_MASTER",k.BREADCRUMB_ENDGAME_QUEST_FIRST_CLICK_POST_PUPPET_MASTER_PEDESTAL="BREADCRUMB_ENDGAME_QUEST_FIRST_CLICK_POST_PUPPET_MASTER_PEDESTAL",k.BREADCRUMB_ENDGAME_QUEST_WALK_SEQUENCE_SEEN="BREADCRUMB_ENDGAME_QUEST_WALK_SEQUENCE_SEEN",k.FEATURE_LEADERBOARD="FEATURE_LEADERBOARD",k.BREADCRUMB_LEADERBOARD_INTRO_VIEWED="BREADCRUMB_LEADERBOARD_INTRO_VIEWED",k.BREADCRUMB_LEADERBOARD_NOTIFICATION_VIEWED="BREADCRUMB_LEADERBOARD_NOTIFICATION_VIEWED",k.BREADCRUMB_STUDENT_LEADERBOARD_PRIZE_CLAIMED="BREADCRUMB_STUDENT_LEADERBOARD_PRIZE_CLAIMED",k.FEATURE_BATTLE_PASS="FEATURE_BATTLE_PASS",k.BREADCRUMB_BATTLE_PASS_COMPLEX_FTUE_VIEWED="BREADCRUMB_BATTLE_PASS_COMPLEX_FTUE_VIEWED",k.BREADCRUMB_STUDENT_LEADERBOARD_NOTIFICATION_VIEWED="BREADCRUMB_STUDENT_LEADERBOARD_NOTIFICATION_VIEWED",k.FEATURE_CHARGED_LEVELS="FEATURE_CHARGED_LEVELS",k.BREADCRUMB_TUTORIAL_REMINDER_MAIL_SENT="BREADCRUMB_TUTORIAL_REMINDER_MAIL_SENT",k.BREADCRUMB_DECAY_IMMUNITY_MODAL_SEEN="BREADCRUMB_DECAY_IMMUNITY_MODAL_SEEN",k.BREADCRUMB_CHARGED_LEVELS_CLEARED="BREADCRUMB_CHARGED_LEVELS_CLEARED",k.FEATURE_PROGRESSION_EVENTS="FEATURE_PROGRESSION_EVENTS",k.FIRST_POST_TUTORIAL_BATTLE_STARTED="FIRST_POST_TUTORIAL_BATTLE_STARTED",k.FIRST_POST_TUTORIAL_BATTLE_WON="FIRST_POST_TUTORIAL_BATTLE_WON",k.BREADCRUMB_REACHED_LEVEL_2="BREADCRUMB_REACHED_LEVEL_2",k.BREADCRUMB_REACHED_LEVEL_3="BREADCRUMB_REACHED_LEVEL_3",k.BREADCRUMB_REACHED_LEVEL_4="BREADCRUMB_REACHED_LEVEL_4",k.BREADCRUMB_REACHED_LEVEL_5="BREADCRUMB_REACHED_LEVEL_5",k.FEATURE_RIFTS="FEATURE_RIFTS",k.BREADCRUMB_RIFTS_AFTER_FIRST_CUTSCENE_SEEN="BREADCRUMB_RIFTS_AFTER_FIRST_CUTSCENE_SEEN",k.BREADCRUMB_RIFTS_FIRST_VISIT_PRE_PM_DEFEAT_CUTSCENE_SEEN="BREADCRUMB_RIFTS_FIRST_VISIT_PRE_PM_DEFEAT_CUTSCENE_SEEN",k.BREADCRUMB_RIFTS_FIRST_VISIT_POST_PM_DEFEAT_CUTSCENE_SEEN="BREADCRUMB_RIFTS_FIRST_VISIT_POST_PM_DEFEAT_CUTSCENE_SEEN",k.BREADCRUMB_FIRST_RIFT_KEY_OBTAINED="BREADCRUMB_FIRST_RIFT_KEY_OBTAINED",k.BREADCRUMB_RIFTS_GOT_FIRST_DRAGON_ORB="BREADCRUMB_RIFTS_GOT_FIRST_DRAGON_ORB",k.BREADCRUMB_RIFTS_FIRST_DRAGON_ORB_CUTSCENE_SEEN="BREADCRUMB_RIFTS_FIRST_DRAGON_ORB_CUTSCENE_SEEN",k.BREADCRUMB_RIFTS_FIRST_PHYSICAL_BATTLE_CUTSCENE_SEEN="BREADCRUMB_RIFTS_FIRST_PHYSICAL_BATTLE_CUTSCENE_SEEN",k.BREADCRUMB_RIFTS_STARTED_FIRST_BOSS_RIFT="BREADCRUMB_RIFTS_STARTED_FIRST_DRAGON_RIFT",k.BREADCRUMB_RIFTS_DEFEATED_FIRST_BOSS="BREADCRUMB_RIFTS_DEFEATED_FIRST_DRAGON",k.BREADCRUMB_RIFTS_OPENED_RIFT_SELECTION_MENU_FIRST_TIME="BREADCRUMB_RIFTS_OPENED_RIFT_SELECTION_MENU_FIRST_TIME",k.BREADCRUMB_RIFTS_STARTED_FIRST_RIFT_RUN="BREADCRUMB_RIFTS_STARTED_FIRST_RIFT_RUN",k.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_ROUND="BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_ROUND",k.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN_OR_LOSE="BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN_OR_LOSE",k.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN="BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN",k.BREADCRUMB_RIFTS_COMPLETED_FIRST_MAX_TIER_RIFT_RUN="BREADCRUMB_RIFTS_COMPLETED_FIRST_MAX_TIER_RIFT_RUN",k.FEATURE_SEGMENTED_OFFERS="FEATURE_SEGMENTED_OFFERS",k.BREADCRUMB_SEGMENTED_OFFERS_OFFER_AVAILABLE="BREADCRUMB_SEGMENTED_OFFERS_OFFER_AVAILABLE",k.BREADCRUMB_SEGMENTED_OFFERS_FIRST_OFFER_SEEN="BREADCRUMB_SEGMENTED_OFFERS_FIRST_OFFER_SEEN",k.BREADCRUMB_SEGMENTED_OFFERS_FIRST_BATTLE_LOST="BREADCRUMB_SEGMENTED_OFFERS_FIRST_BATTLE_LOST",k.BREADCRUMB_SEGMENTED_OFFERS_SUPPRESS_LAST_CHANCE="BREADCRUMB_SEGMENTED_OFFERS_SUPPRESS_LAST_CHANCE",k.FEATURE_PET_MERGE="FEATURE_PET_MERGE",k.BREADCRUMB_PET_MERGE_FTUE_STARTED="BREADCRUMB_PET_MERGE_FTUE_STARTED",k.BREADCRUMB_PET_MERGE_FTUE_INGREDIENTS_GIVEN="BREADCRUMB_PET_MERGE_FTUE_INGREDIENTS_GIVEN",k.BREADCRUMB_PET_MERGE_FTUE_COMPLETED="BREADCRUMB_PET_MERGE_FTUE_COMPLETED",k.FEATURE_CAMPAIGN_REPLAY="FEATURE_CAMPAIGN_REPLAY",k.BREADCRUMB_HARD_MODE_UNLOCKED_POPUP_SEEN="BREADCRUMB_HARD_MODE_UNLOCKED_POPUP_SEEN",k.BREADCRUMB_EXPERT_MODE_UNLOCKED_POPUP_SEEN="BREADCRUMB_EXPERT_MODE_UNLOCKED_POPUP_SEEN",k.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_HARD_MODE="BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_HARD_MODE",k.BREADCRUMB_CAMPAIGN_REPLAY_CATCHUP_SEEN="BREADCRUMB_CAMPAIGN_REPLAY_CATCHUP_SEEN",k.BREADCRUMB_CAMPAIGN_REPLAY_HARD_INTRO_SEEN="BREADCRUMB_CAMPAIGN_REPLAY_HARD_INTRO_SEEN",k.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FTUE_COMPLETED="BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FTUE_COMPLETED",k.BREADCRUMB_CAMPAIGN_REPLAY_HARD_SHIVERCHILL_UNLOCKED="BREADCRUMB_CAMPAIGN_REPLAY_HARD_SHIVERCHILL_UNLOCKED",k.BREADCRUMB_CAMPAIGN_REPLAY_EXPERT_SHIVERCHILL_UNLOCKED="BREADCRUMB_CAMPAIGN_REPLAY_EXPERT_SHIVERCHILL_UNLOCKED",k.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_EXPERT_MODE="BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_EXPERT_MODE",k.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE="BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE",k.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE_STARTED="BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE_STARTED",k.FEATURE_UNIQUE_PETS="FEATURE_UNIQUE_PETS",k.BREADCRUMB_UNIQUE_PETS_INTRO_SEQUENCE="BREADCRUMB_UNIQUE_PETS_INTRO_SEQUENCE",k.FEATURE_RESTRICTIONS="FEATURE_RESTRICTIONS",k.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_MET_FTUE="BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_MET",k.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_PRE_FTUE="BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_PRE",k.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_POST_FTUE="BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_POST",k.BREADCRUMB_WHITE_GLOVE_RESCUE_FTUE="BREADCRUMB_WHITE_GLOVE_RESCUE_FTUE",k.BREADCRUMB_WHITE_GLOVE_MERGE_FTUE="BREADCRUMB_WHITE_GLOVE_MERGE_FTUE",k.BREADCRUMB_WHITE_GLOVE_ELEMENT_FTUE="BREADCRUMB_WHITE_GLOVE_ELEMENT_FTUE",k.BREADCRUMB_WHITE_GLOVE_RARITY_FTUE="BREADCRUMB_WHITE_GLOVE_RARITY_FTUE",k.BREADCRUMB_WHITE_GLOVE_LEVEL_FTUE="BREADCRUMB_WHITE_GLOVE_PET_LEVEL_FTUE",k.FEATURE_AFTER_SCHOOL_WIDGET="FEATURE_AFTER_SCHOOL_WIDGET",k.BREADCRUMB_AFTER_SCHOOL_WIDGET_FTUE_COMPLETED="BREADCRUMB_AFTER_SCHOOL_WIDGET_FTUE_COMPLETED",k.FEATURE_STATUS_EFFECTS="FEATURE_STATUS_EFFECTS",k.BREADCRUMB_STATUS_EFFECTS_FTUE_COMPLETED="BREADCRUMB_STATUS_EFFECTS_FTUE_COMPLETED",k.BREADCRUMB_STATUS_EFFECT_CAST_IN_BATTLE="BREADCRUMB_STATUS_EFFECT_CAST_IN_BATTLE"}(F||(F={}))},7408:(k,B,U)=>{"use strict";U.d(B,{C:()=>$});var F=U(15821);class G{constructor(k){this.name="",this.breadcrumbs={},this.name=k}addBreadcrumb(k,B,U){return B>=0&&B<32?this.breadcrumbs[k]={index:B,completes:U}:console.log(`addBreadcrumb - Breadcrumb was not added. index must be between [0, 32], provided index was ${B}`),this}getBreadcrumbMask(k){return F.A.isDefined(this.breadcrumbs[k])?1<{"use strict";U.d(B,{V:()=>j});const F=JSON.parse('{"currency-27":{"currency-1":{"from":[1,20,40,190,340,860,1600,5600],"to":[1,45,100,525,1060,2850,5670,20000],"roundToNearest":1},"currency-13":{"from":[1,2,18,162,1445,12790],"to":[10,100,1000,10000,100000,1000000],"roundToNearest":1},"currency-15":{"from":[1,2,18,162,1445,12790],"to":[10,100,1000,10000,100000,1000000],"roundToNearest":1},"currency-12":{"from":[1,2,18,162,1445,12790],"to":[10,100,1000,10000,100000,1000000],"roundToNearest":1},"currency-14":{"from":[1,2,18,162,1445,12790],"to":[10,100,1000,10000,100000,1000000],"roundToNearest":1},"currency-16":{"from":[1,2,18,162,1445,12790],"to":[10,100,1000,10000,100000,1000000],"roundToNearest":1},"currency-11":{"from":[1,25,100,200,500,1000,10000],"to":[1,5,18,146,1170,5266,13458],"roundToNearest":1},"currency-3":{"from":[1,25,100,200,500,1000,10000],"to":[1,5,18,146,1170,5266,13458],"roundToNearest":1},"currency-19":{"from":[1,25,100,200,500,1000,10000],"to":[1,5,18,146,1170,5266,13458],"roundToNearest":1}}}');var G=U.t(F,2);class j{static setOverrideRates(k){Object.keys(k).forEach((B=>{j.EXCHANGE_DATA[B]=Object.assign(Object.assign({},j.EXCHANGE_DATA[B]),k[B])}))}static from(k){return{to:j.getExchangeRate.bind(j,k)}}static applyExchangeRate(k,B){var U,F;if(k<=0)return 0;if(j.isLinearExchangeRate(B))return j.roundToNearest(k*B,1);if(0===B.from.length||0===B.to.length||B.from.length!==B.to.length)return k;if(1===B.to.length)return j.roundToNearest(k*(B.to[0]/B.from[0]),null!==(U=B.roundToNearest)&&void 0!==U?U:1);const G=B.from.findIndex((B=>B>k)),$=-1===G?B.from.length-2:0===G?0:G-1,H=B.from[$],V=B.from[$+1],W=B.to[$],q=B.to[$+1],K=k-H;return j.roundToNearest(W+K*(q-W)/(V-H),null!==(F=B.roundToNearest)&&void 0!==F?F:1)}static roundToNearest(k,B){return Math.ceil(k/B)*B}static getExchangeRate(k,B){var U,F,G,$;const H=`currency-${k}`,V=`currency-${B}`;if(null===(U=j.EXCHANGE_DATA[H])||void 0===U?void 0:U[V])return null===(F=j.EXCHANGE_DATA[H])||void 0===F?void 0:F[V];if(null===(G=j.EXCHANGE_DATA[V])||void 0===G?void 0:G[H]){const k=null===($=j.EXCHANGE_DATA[V])||void 0===$?void 0:$[H];return j.isLinearExchangeRate(k)?1/k:{from:k.to,to:k.from}}return 1}static isLinearExchangeRate(k){return"number"==typeof k}}j.EXCHANGE_DATA=Object.assign({},G)},77601:(k,B,U)=>{"use strict";U.d(B,{gb:()=>$,mq:()=>V,y8:()=>H});var F=U(8674);const G=Symbol(),j={};function $({key:k,activateAssociatedExperiments:B=0,evaluate:U,default:$}){const H="object"==typeof B?B.when:B,V="object"==typeof B?B.canActivate:()=>(0,F.sH)(this,void 0,void 0,(function*(){return!0})),W=(k,B)=>{V(k,B).then((k=>{k&&B.ensureExperimentActivated()}))},q=()=>{};let K=q,z=q;switch(H){case 0:K=W;break;case 1:z=W}return j[k]={key:k,onSetup:K,onPostEvaluate:z,evaluate:null!=U?U:k=>k,default:$},{[G]:void 0,key:k,toString:()=>`Feature(${k})`}}function H(){return Object.keys(j)}class V{constructor(k){this._featureContexts={},this._activatedExperiments={};const B=Object.create(k.contextBase);B.evaluate=k=>this.evaluate(k),this._sharedContext=B,this._innerGetFeature=k.get,this._activateExperimentForFeature=B=>{var U;if(!k.activate)return;const F=this._innerGetFeature(B);if(!(null===(U=F.experimentResult)||void 0===U?void 0:U.inExperiment)||!F.experiment)return;const G=F.experiment.key;this._activatedExperiments[G]||(k.activate(F),this._activatedExperiments[G]=!0)}}setup(){for(const k of Object.keys(j)){const B=this.getOrCreateFeatureContext(k);B[G].onSetup(this.evaluateSilent(B),B)}}evaluate(k){const B=this.getOrCreateFeatureContext(k);if(!B)return this._innerGetFeature(W(k)).value;const U=this.evaluateSilent(B);return B[G].onPostEvaluate(U,B),U}evaluateSilent(k){var B;const U=k[G],F=null!==(B=this._innerGetFeature(U.key).value)&&void 0!==B?B:U.default;return U.evaluate(F,k)}getOrCreateFeatureContext(k){const B=j[W(k)];if(!B)return;if(B.key in this._featureContexts)return this._featureContexts[B.key];const U=Object.create(this._sharedContext);return U[G]=B,U.ensureExperimentActivated=()=>this._activateExperimentForFeature(B.key),this._featureContexts[B.key]=U,U}static irreversibleClearGlobalState(){for(const k of Object.keys(j))delete j[k]}}function W(k){return"string"==typeof k?k:k.key}},1717:(k,B,U)=>{"use strict";var F,G;U.d(B,{$:()=>G,u:()=>F}),function(k){k.RequireAny="RequireAny",k.RequireAll="RequireAll",k.RequireNone="RequireNone"}(F||(F={})),function(k){k.Rescue="rescue",k.EvolutionTier="evolution",k.Element="element",k.Level="level",k.MergeRank="mergeRank",k.Rarity="rarity"}(G||(G={}))},8394:(k,B,U)=>{"use strict";U.d(B,{p:()=>H,u:()=>V});var F=U(10471),G=U(50508);const j=[].concat(["pet"]).concat(["riftRunKey"]).concat(["costume"]).concat(G.p),$={currency:F.B};function H(k,B){var U;return j.includes(k)||(null===(U=$[k])||void 0===U?void 0:U.includes(B))}function V(k,B){return 1===arguments.length?B=>V(k,B):!!B&&B.type===k}},12596:(k,B,U)=>{"use strict";U.d(B,{R:()=>F});class F{static parseDateToTimestamp(k){if(null==k)return;if("number"==typeof k)return k;if(""===k)return;const B=new Date(k).getTime();return isNaN(B)?void 0:B}}},48417:(k,B,U)=>{"use strict";U.d(B,{D:()=>F});const F={AfterSchoolWidget:{GetRewardsStatus:"afterSchoolWidget.getRewardStatus",ClaimReward:"afterSchoolWidget.claimReward",ResetState:"afterSchoolWidget.resetState"},Battle:{Start:"battle.start",Action:"battle.action",Resume:"battle.resume",Escape:"battle.escape",Debug:{KillGore:"battle.debug.killGore",PreventDefeat:"battle.debug.preventDefeat",ForceBattleResult:"battle.debug.forceBattleResult",OverrideHomeTeamAffixes:"battle.debug.overrideHomeTeamAffixes",OverrideAwayTeamAffixes:"battle.debug.overrideAwayTeamAffixes",AddStatusEffectToUnits:"battle.debug.addStatusEffectToUnits",RemoveStatusEffectsFromUnit:"battle.debug.removeStatusEffectsFromUnit",OverrideUnitDodgeChance:"battle.debug.overrideUnitDodgeChance",SetUnitHealth:"battle.debug.setUnitHealth",SimulateBattle:"battle.debug.simulateBattle.start",SimulateStatusEffectCalculations:"battle.debug.simulateStatusEffectCalculations"},Duel:{CancelInvite:"battle.duel.cancelInvite",CreateChannel:"battle.duel.createChannel",Join:"battle.duel.join",RejectInvite:"battle.duel.rejectInvite",SendInvite:"battle.duel.sendInvite",WaitPing:"battle.duel.waitPing",OpponentDisconnect:"battle.duel.opponentDisconnect"},ClearBattleState:"battle.clearBattleState"},BattlePass:{GetPastUnclaimedRewards:"battlePass.getPastUnclaimedRewards",ClaimPastRewards:"battlePass.claimPastRewards",CompleteExpiredClaimTasks:"battlePass.completeExpiredClaimTasks",GetBattlePassXpData:"battlePass.getBattlePassXpData",Debug:"battlePass.debug",UpdateActiveQuests:"battlePass.updateActiveQuests"},BattleStats:{RecordEnd:"battleStats.recordEnd",GetBattleStats:"battleStats.getBattleStats",Debug:{OverrideMatchmakingBattleStreak:"battleStats.debug.overrideMatchmakingBattleStreak"}},CampaignReplay:{SetFeatureProgress:"campaignReplay.setFeatureProgressFromClient",GetCampaignReplayData:"campaignReplay.getCampaignReplayData",UnlockDifficultyMode:"campaignReplay.unlockDifficultyMode",SetCurrentDifficulty:"campaignReplay.setCurrentDifficulty",Debug:{ForceUnlockDifficultyMode:"campaignReplay.debugForceUnlockDifficultyMode",ResetData:"campaignReplay.debugResetData"}},Character:{CheckItems:"character.checkItems",Update:"character.update",ToolsUpdate:"character.toolsUpdate",GetFields:"character.getFields",GetFieldsOnInitialLogin:"character.getFieldsOnInitialLogin",GetMultiple:"character.getMultiple",GetPlayerAppearance:"getPlayerAppearance",UpdateCachedAppearance:"updateCachedAppearance"},ChargedLevels:{AbandonChargedLevelLosses:"chargedLevels.AbandonChargedLevelLosses",RecuperateChargedLevelLosses:"chargedLevels.RecuperateChargedLevelLosses",GetChargedLevelProgressData:"chargedLevels.GetChargedLevelProgressData",SendTutorialReminderMailer:"chargedLevels.sendTutorialReminderMailer",AwardMemberOnlyChargedLevelXp:"chargedLevels.awardMemberOnlyChargedLevelXp",UpdateDecayImmunity:"chargedLevels.updateDecayImmunity",ClearChargedLevelData:"chargedLevels.clearChargedLevelData",Debug:{SetChargedLevel:"chargedLevels.debug.setChargedLevel"}},Cooldowns:{SetCooldownFromNow:"setCooldownFromNow",SetCooldownFromCategory:"setCooldownFromCategory",Debug:{SetCooldownTimestamp:"cooldowns.debug.setCooldownTimestamp",ClearCooldown:"cooldowns.debug.clearCooldown",ClearAllCooldowns:"cooldowns.debug.clearAllCooldowns"}},CustomerSupport:{AfterCharacterChanged:"customerSupport.afterCharacterChanged"},DailyLoginCalendar:{UpdateActiveQuests:"dailyLoginCalendar.updateActiveQuests"},Debug:{ResetPlayer:"debug.resetPlayer",RemoveAllPets:"debug.removeAllPets",ForceCompleteFtueQuest:"debug.forceCompleteFtueQuest"},DuelsStadium:{GetAllDailyDuelsUsed:"duelsStadium.getAllDailyDuelsUsed"},DynamicStore:{Debug:{AddDefeatedPet:"store.debug.addDefeatedPet",RemoveDefeatedPet:"store.debug.removeDefeatedPet",ListDefeatedPets:"store.debug.listDefeatedPets",ClearDefeatedPets:"store.debug.clearDefeatedPets",ResetStoreProgress:"store.debug.resetStoreProgress"},PurchaseItem:"store.purchaseItem",GetStore:"store.getStore",GetStoreConfiguration:"store.getStoreConfiguration",GetNextSectionExpiry:"store.getNextSectionExpiry",GetHudWidgetItems:"store.getHudWidgetItems"},Education:{ReloadEducationData:"education.reloadEducationData"},ElementalBoosts:{GetCurrentElementalBoost:"elementalBoosts.GetCurrentElementalBoost",UpdateElementalBoosts:"elementalBoosts.UpdateElementalBoosts"},Endgame:{Debug:{SetProgress:"endgame.debug.setProgress"},GetProgress:"endgame.getProgress",SetProgress:"endgame.setProgress"},Events:{EnterWorld:"events.enterWorld"},Experiment:{LoadOverrides:"experiment.loadOverrides"},Festival:{GetChestData:"festival.getChestData",SetChestDate:"festival.setChestDate",SetChestSpins:"festival.setChestSpins",GetSeenCompletedTaskData:"festival.getSeenCompletedTaskData",SetCompletedTasksSeen:"festival.setCompletedTasksSeen"},FeaturedSpawn:{GetConfig:"featuredSpawn.getConfig"},GameStore:{GetStore:"gameStore.getStore"},HardCurrency:{Spend:"hardCurrency.spend",GrantCaptureTutorialMagicoin:"hardCurrency.grantCaptureTutorialMagicoin",ClaimMonthlyAllowance:"hardCurrency.claimMagicoinAllowance",ClaimAllowances:"hardCurrency.claimAllowances",GetAllowanceClaimData:"hardCurrency.getAllowanceClaimData"},Hud:{GetHudData:"Hud.getHudData"},Interactables:{OpenInteractable:"interactables.openInteractable",GetInteractableDropRate:"interactables.getInteractableDropRate",GetCooldowns:"interactables.getCooldowns",SetCooldown:"interactables.setCooldown"},LegacySpawn:{GetLegacySpawnData:"legacySpawn.getLegacySpawnData"},LootDash:{CompleteLootDashMatch:"lootDash.completeLootDashMatch",Debug:"lootDash.debug",SavePreviousMatchData:"lootDash.savePreviousMatchData",StartLootDashMatch:"lootDash.startLootDashMatch"},MagicoinBattleRewards:{ClaimMemberRewards:"magicoinBattleRewards.claimMemberRewards"},MemberJar:{GetMemberJarData:"memberJar.getMemberJarData",UpdateMemberJarRewards:"memberJar.updateMemberJarRewards",ResetMemberJarData:"memberJar.resetMemberJarData"},MembershipUpgradeReward:{CheckMemberUpgradeReward:"membershipUpgradeReward.checkMemberUpgradeReward",GetCollectedRewardsData:"membershipUpgradeReward.getCollectedRewardsData",CollectMemberUpgradeReward:"membershipUpgradeReward.collectMemberUpgradeReward"},Mail:{DeleteMail:"mail.deleteMail",DebugMail:"mail.debugMail",ReadMail:"mail.readMail",CollectMailRewards:"mail.collectMailRewards"},MultiplayerMessage:{SendMessage:"MultiplayerMessage.sendMessage"},StateChallenge:{StateChallengeRewards:"StateChallenge.sendMailRewards",NationalCupRewards:"StateChallenge.sendNationalCupMailRewards",GetStateChallengeGoalsData:"StateChallenge.getStateChallengeGoalsData",ClaimStateChallengeGoalsRewards:"StateChallenge.claimStateChallengeGoalsRewards",ClaimPreviousStateChallengeGoalsRewards:"StateChallenge.claimPreviousStateChallengeGoalsRewards",HasUnclaimedPreviousStateChallengeGoalsRewards:"StateChallenge.hasUnclaimedPreviousStateChallengeGoalsRewards",GetMilestonesRewardDataForEducation:"StateChallenge.getMilestonesRewardDataForEducation",GetEndOfChallengeRewards:"StateChallenge.getEndOfChallengeRewards",GetRewardsGrantingPeriodEndDate:"StateChallenge.getRewardsGrantingPeriodEndDate",GetProdigyCupConfigData:"StateChallenge.getProdigyCupConfigData"},OTP:{FetchOptions:"otp.fetchOptions",CollectPurchasedItems:"otp.collectPurchasedItems",UpdatePurchaseHistory:"otp.updatePurchaseHistory"},PetInventory:{GetPetInventoryData:"petInventory.getPetInventoryData",UpdateSlots:"petInventory.updateSlots",SetSlots:"petInventory.setSlots"},PetGearInventory:{CreateItem:"petGearInventory.createItem",SeenItem:"petGearInventory.seenItem",ListItem:"petGearInventory.listItem",ClearItems:"petGearInventory.clearItems",DeleteItems:"petGearInventory.deleteItem",ReceiveAdGift:"petGearInventory.receiveAdGift"},PetMerge:{Debug:{BulkUpdatePetMergeRank:"petMerge.debug.bulkUpdatePetMergeRank"},PerformMergeAction:"petMerge.performMergeAction"},Quests:{GetQuestData:"quests.getQuestData",GetQuestProgress:"quests.getQuestProgress",SendQuestEvent:"quests.sendQuestEvent",SetQuestTaskProgressTimestamp:"quests.setQuestTaskProgressTimestamp"},QuickQuiz:{Debug:"quickQuiz.debug",End:"quickQuiz.end",Start:"quickQuiz.start"},Restrictions:{GetRestrictionOffers:"restrictions.getRestrictionOffers",MarkFreeRestrictionOfferClaimed:"restrictions.markFreeRestrictionOfferClaimed"},Rifts:{AttemptSecureUnlockNextRiftTier:"rifts.attemptSecureUnlockNextRiftTier",Debug:{AddRiftsKeys:"rifts.debug.addRiftsKeys",AddRiftsStoreCurrency:"rifts.debug.addRiftsStoreCurrency",SetRiftRunDebug:"rifts.debug.setRiftRunDebug"},ExpireRiftPetCooldown:"rifts.expireRiftPetCooldown",GetTierData:"rifts.getTierData",GetConfig:"rifts.getConfig",GetFirstTimeRewardsData:"rifts.getFirstTimeRewardsData",GetInventory:"rifts.getInventory",GetSelectedPortal:"rifts.getSelectedPortal",RerollRiftBuffModifier:"rifts.rerollRiftBuffModifier",RerollRiftOpponents:"rifts.rerollRiftOpponents",ResetRiftRun:"rifts.resetRiftRun",ReuseRiftPet:"rifts.reuseRiftPet",UpdateRiftsConfigVersion:"rifts.updateRiftsConfigVersion",StartRiftRun:"rifts.startRiftRun",StartBossRift:"rifts.startBossRift",UpdateSelectedPortal:"rifts.updateSelectedPortal",UpdateTierUnlockProgress:"rifts.updateTierUnlockProgress"},SecureInventory:{DebugGiveSecureItems:"secureInventory.debugGiveSecureItems",RemoveAllSecureItemsByType:"secureInventory.removeAllSecureItemsByType"},SegmentedOffers:{RedeemOffer:"segmentedOffers.redeemOffer",GetOffers:"segmentedOffers.getOffers"},Social:{GetFriendsStatuses:"social.getFriendsStatuses",SetStatus:"social.setStatus"},Time:{GetPlayerTimezoneOffset:"time.getPlayerTimezoneOffset",GetPlayerTimezoneEntity:"time.getPlayerTimezoneEntity",SetPlayerDebugTime:"time.setPlayerDebugTime"},Ultimates:{GetQuestData:"ultimates.getQuestData",GetQuestProgress:"ultimates.getQuestProgress",SendQuestEvent:"ultimates.sendQuestEvent",GetQuestBattleData:"ultimates.getQuestBattleData",UpdateActiveQuests:"ultimates.updateActiveQuests"},Kennel:{UnsecureAdd:"kennel.unsecureAdd",Update:"kennel.update",Remove:"kennel.remove",Evolve:"kennel.evolve",MemberUpgradeEvolve:"kennel.memberUpgradeEvolve",Migrate:"kennel.migrate",Claim:"kennel.claim"},Videos:{GetConfig:"videos.getConfig"},WeekendEvents:{UpdateActiveQuests:"weekendEvents.updateActiveQuests",GetCurrentEventsData:"weekendEvents.getCurrentEventsData",GetFestivalConfigData:"weekendEvents.getFestivalConfigData",CompletePastFestivals:"weekendEvents.completePastFestivals"},WizardCostumes:{Debug:"wizardCostumes.debug",MarkCostumesSeen:"wizardCostumes.markCostumesSeen"},WizardWatch:{GetWizardWatchData:"wizardWatch.getWizardWatchData"},WeeklyChallenge:{GetWeeklyChallengeData:"weeklyChallenge.getWeeklyChallengeData"},World:{CreateChannel:"world.createChannel",GetWorldList:"world.getWorldList"},ZoneMap:{CreateChannel:"zonemap.createChannel"},UniversalTeamSelect:{GetUtsConfig:"universalTeamSelect.getUtsConfig"},AssetExperiments:{getAllExperimentsWithCustomData:"assetExperiments.getAllExperimentsWithCustomData",getAssetsForExperimentsVariations:"assetExperiments.getAssetsForExperimentsVariations"},WizardName:{GetWizardNames:"wizardName.getWizardNames"}}},5491:(k,B,U)=>{"use strict";var F;U.d(B,{V:()=>F}),function(k){k.Pet="pet",k.Dorm="dorm",k.Follow="follow",k.Player="player"}(F||(F={}))},17446:(k,B,U)=>{"use strict";var F;U.d(B,{E:()=>F}),function(k){k[k.Common=0]="Common",k[k.Uncommon=1]="Uncommon",k[k.Rare=2]="Rare",k[k.Heroic=3]="Heroic",k[k.Legendary=4]="Legendary"}(F||(F={}))},65240:(k,B,U)=>{"use strict";var F;U.d(B,{C:()=>F}),function(k){k.Achievement="Achievement",k.AfterSchoolWidget="after_school_widget",k.BattleChest="battle-chest",k.BattlePass="treasure-track",k.Shop="game_shop",k.Container="container",k.DailyLoginCalendar="daily_login_calendar_reward",k.UnifiedStore="unified_store",k.Interactable="Interactable",k.LevelUp="level-up",k.WorldChest="world-chest",k.WorldMemberChest="world-member-chest",k.QuestChest="quest-chest",k.QuestReward="quest-reward",k.Festival="festival",k.FestivalPrizeWheel="festival-prize-wheel",k.FestivalBossLootWheel="festival-boss-loot-wheel",k.MiniGame="mini-game",k.PrizeWheel="prize-wheel",k.Battle="battle",k.Npc="npc",k.Leaderboard="leaderboard",k.ParentGoals="parent-goal",k.ConversionJar="conversion-jar",k.ConversionOffer="conversion-offer",k.PetSlots="pet-slots",k.PetEvolution="pet-evolution",k.PetMerge="pet_merge",k.PetRescue="pet-rescue",k.PostBattle="post-battle",k.StateChallengeMilestone="state_challenge_milestone",k.StateChallengeOnboarding="state_challenge_onboarding",k.StateChallengePodium="state_challenge_podium",k.Tutorial="tutorial",k.PetRoster="pet-roster",k.WizardDashLootBag="wizard_dash_loot_bag",k.InitialMemberBonus="initial-member-bonus",k.ChargedLevelRenewal="charged-level-renewal",k.DynamicStore="DynamicStore",k.RemoveUnsecureItem="remove-unsecure-item",k.FestivalDailyRespawnBossBattle="festival-daily-respawn-boss-battle",k.FestivalCurrencyReset="festival-currency-reset",k.FestivalCurrencyConversion="festival-currency-conversion",k.Otp="otp",k.WhiteGloveService="white-glove-service",k.WizardBank="wb_modal"}(F||(F={}))},63011:(k,B,U)=>{"use strict";var F;U.d(B,{D:()=>F}),function(k){k.BATTLE_PASS_PREMIUM="battlepass_premium",k.DAILY_LOGIN_CALENDAR_ULTIMATE_REWARD="daily_login_calendar_ultimate_reward",k.DAILY_LOGIN_CALENDAR_THRESHOLD_REWARD="daily_login_calendar_threshold_reward",k.LEGACY_EPICS="epics_v1",k.WIZARD_DASH_LEVEL_1_REVIVES="wizard_dash_level_1_revives",k.WIZARD_DASH_LEVEL_2_REVIVES="wizard_dash_level_2_revives",k.MYTHICAL_EPICS="epics_v2",k.ULTIMATE_MEMBERBOX="ultimate_memberbox",k.CORE_COINS="coins_350",k.PLUS_AND_ULTRA_COINS="coins_720",k.ULTRA_BONUS_COINS="bonus_coins_880",k.ULTIMATE_BONUS_COINS="bonus_coins_ultimate_bundle_880",k.CHARGED_LEVELS_DECAY_IMMUNITY="charged_levels_decay_immunity",k.MEMBERSHIP_UPGRADE_REWARD_SMALL="membership_upgrade_reward_small",k.MEMBERSHIP_UPGRADE_REWARD_MEDIUM="membership_upgrade_reward_medium",k.MEMBERSHIP_UPGRADE_REWARD_LARGE="membership_upgrade_reward_large",k.PET_MERGE_UPSELL_REPEATABLE="pet_merge_upsell_repeatable",k.PET_EVOLUTION_UPSELL_REPEATABLE="pet_evolution_upsell_repeatable",k.MEMBER_LEVEL_BOOST="member_level_boost"}(F||(F={}))},66582:(k,B,U)=>{"use strict";var F;U.d(B,{_$:()=>F,kG:()=>j,rH:()=>G}),function(k){k[k.NonMember=0]="NonMember",k[k.MemberLevelUp=1]="MemberLevelUp",k[k.MemberUltimateMath=2]="MemberUltimateMath",k[k.MemberUltimateBundle=3]="MemberUltimateBundle",k[k.MemberCore=101]="MemberCore",k[k.MemberPlus=102]="MemberPlus",k[k.MemberUltra=103]="MemberUltra"}(F||(F={}));const G={[F.NonMember]:"NonMember",[F.MemberLevelUp]:"MemberLevelUp",[F.MemberUltimateMath]:"MemberUltimateMath",[F.MemberUltimateBundle]:"MemberUltimateBundle",[F.MemberCore]:"MemberCore",[F.MemberPlus]:"MemberPlus",[F.MemberUltra]:"MemberUltra"},j=[F.MemberUltra,F.MemberUltimateBundle,F.MemberUltimateMath]},2952:(k,B,U)=>{"use strict";var F;U.d(B,{P:()=>F}),function(k){k.FX="fx",k.Move="move",k.HostTeam="create_co_op_team",k.TeamDisbanded="co_op_team_disbanded",k.TeamUpdated="co_op_team_updated",k.HostHeartbeat="co_op_host_heartbeat",k.SyncHealth="co_op_health_sync",k.PlayerAttacked="player_attacked",k.PlayersDefeated="players_defeated",k.TitanAttacked="titan_attacked",k.TitanDefeated="titan_defeated",k.Chat="chat",k.Catapult="catapult",k.Transform="transform",k.Change="change",k.Info="info",k.CoopTeam="coopTeam"}(F||(F={}))},17516:(k,B,U)=>{"use strict";var F;U.d(B,{m:()=>F}),function(k){k.DuelInvite="DuelInvite",k.DuelInviteRejection="DuelInviteRejection",k.DuelInviteCancellation="DuelInviteCancellation",k.RequestJoinTeam="request_co_op_team_join",k.JoinTeam="join_co_op_team",k.JoinTeamFailed="join_co_op_team_failed",k.ReloadEducationData="reload_education_data",k.StartCoOpTitanMatch="start_co_op_titan",k.QuestionAnswered="question_answered",k.PlayerLeftTeam="co_op_player_left_team",k.PlayerRejoinTeam="co_op_player_rejoin_team",k.PlayerJoined="player_joined",k.QuickQuizJoinRequest="quick_quiz_join_request"}(F||(F={}))},92579:(k,B,U)=>{"use strict";var F;U.d(B,{a:()=>F}),function(k){k.offline="offline",k.available="available",k.unavailable="unavailable"}(F||(F={}))},73678:(k,B,U)=>{"use strict";var F;U.d(B,{A_:()=>F,D3:()=>G,s0:()=>j}),function(k){k.FOREST="forest",k.SHIVERCHILL="shiverchill",k.SKYWATCH="skywatch",k.BONFIRE="bonfire_spire",k.SHIPWRECK="shipwreck_shore",k.ACADEMY="academy",k.FORESTHARD="forest_hard",k.SHIVERCHILLHARD="shiverchill_hard",k.SKYWATCHHARD="skywatch_hard",k.BONFIREHARD="bonfire_spire_hard",k.SHIPWRECKHARD="shipwreck_shore_hard",k.ACADEMYHARD="academy_hard",k.FORESTEXPERT="forest_expert",k.SHIVERCHILLEXPERT="shiverchill_expert",k.SKYWATCHEXPERT="skywatch_expert",k.BONFIREEXPERT="bonfire_spire_expert",k.SHIPWRECKEXPERT="shipwreck_shore_expert",k.ACADEMYEXPERT="academy_expert",k.LAMPLIGHT="lamplight",k.DYNO="dyno",k.HOUSE="house",k.DARKTOWER="darktower",k.ARCHIVES="archives",k.EARTHTOWER="earthtower",k.ICETOWER="icetower",k.STORMTOWER="stormtower",k.FIRETOWER="firetower",k.WATERTOWER="watertower",k.ASTRALTOWER="astraltower",k.TOWERTOWN="tower_town",k.CRYSTALCAVERNS="crystal_caverns",k.DRAGONISLE="dragon_isle",k.MOON="moon",k.SPRINGFESTGROTTO_BUNNY="springfest_grotto_bunny",k.SPRINGFESTGROTTO_FOX="springfest_grotto_fox"}(F||(F={}));const G=[F.BONFIRE,F.FOREST,F.SHIPWRECK,F.SHIVERCHILL,F.SKYWATCH],j=[...[F.FOREST,F.SHIVERCHILL,F.BONFIRE,F.SHIPWRECK,F.SKYWATCH],...[F.FORESTHARD,F.SHIVERCHILLHARD,F.BONFIREHARD,F.SHIPWRECKHARD,F.SKYWATCHHARD]]},10044:(k,B,U)=>{"use strict";var F;U.d(B,{y:()=>F}),function(k){k[k.Left=1]="Left",k[k.Right=-1]="Right"}(F||(F={}))},61468:(k,B,U)=>{"use strict";U.d(B,{l:()=>$});var F=U(95891),G=U.n(F),j=U(15821);class ${static getRandomItem(k,B=0,U=0){let F=U;if(!k)return null;U<1&&(F=k.length);const G=B+Math.floor(Math.random()*F);return void 0===k[G]?null:k[G]}static getAddedItems(k,B){return B.filter((B=>!k.includes(B)))}static countUniqueItems(k){return new Set(k).size}static rightPad(k,B,U){return k.length>=B?k.slice():k.concat(Array(B-k.length).fill(U))}static leftPad(k,B,U){return k.length>=B?k.slice():Array(B-k.length).fill(U).concat(k)}static pad(k,B,U,F=!1){return F?$.leftPad(k,B,U):$.rightPad(k,B,U)}static guaranteeArray(k){return j.A.isDefined(k)?Array.isArray(k)?k:[k]:[]}static arraysHaveSameElements(k,B){return G().isEmpty(G().xor(k,B))}}},59287:(k,B,U)=>{"use strict";U.d(B,{K:()=>G});var F=U(95891);class G{static sanitizeName(k){return F.replace(k,/ /g,"_").toLowerCase()}static getWorldChannelName(k){return G.sanitizeName(`world-${k}`)}static getZoneMapChannelName(k,B){return G.sanitizeName(`map-${k}-${B}`)}}},38170:(k,B,U)=>{"use strict";U.d(B,{r:()=>F});class F{static toDateObject(k){return k instanceof Date?k:new Date(k)}static toDateUtcMs(k){return F.toDateObject(k).getTime()}static toDateIsoString(k){return F.toDateObject(k).toISOString()}static isDateWithinRange(k,B,U){const G=F.toDateUtcMs(k),j=F.toDateUtcMs(B),$=F.toDateUtcMs(U);return G>=j&&G<=$}static millisecondsBetween(k,B){return Math.abs(B.getTime()-k.getTime())}static daysBetween(k,B){return Math.floor(F.millisecondsBetween(k,B)/864e5)}static monthsBetween(k,B){const U=B.getMonth()-k.getMonth()+12*(B.getFullYear()-k.getFullYear());return B.getDate()>=k.getDate()?U:U-1}}},28085:(k,B,U)=>{"use strict";U.d(B,{ES:()=>j,Um:()=>H,mg:()=>$});var F=U(95891),G=U.n(F);function j(k,B){const U=(k,B)=>{if(Array.isArray(k)){if(Array.isArray(B))return B;for(const F in B){const j=parseInt(F);isNaN(j)||(G().isNil(k[j])?k[j]=B[F]:G().mergeWith(k[j],B[F],U))}}},F=G().cloneDeep(k),j=G().cloneDeep(B);return G().mergeWith(F,j,U),F}function $(k){return G().cloneDeep(k)}function H(k,B){return Object.values(B).includes(k)}},30628:(k,B,U)=>{"use strict";U.d(B,{B:()=>F});class F{static toArray(k,B){const U=k.encode(B).finish();return Array.prototype.slice.apply(U)}static fromArray(k,B){const U=new Uint8Array(B);return k.decode(U)}}},88131:(k,B,U)=>{"use strict";var F;U.d(B,{Q:()=>G}),function(k){k.ObjectNotUnwrappedResult="object-not-unwrapped-result"}(F||(F={}));class G{static success(k){return new this(!0,k)}static error(k){return new this(!1,k)}static fromJSON(k){var B;const U="string"==typeof k?JSON.parse(k):k;return"value"in U==!1?this.error(null!==(B=U.error)&&void 0!==B?B:F.ObjectNotUnwrappedResult):this.success(U.value)}constructor(k,B){k?this._value=B:(this.error=B,this._throwable=new Error(null==B?void 0:B.toString()))}get(){return this._value}isSuccess(){return!this._throwable}expect(k){var B;if(this.isSuccess())return this.get();throw new Error(null!==(B=null!=k?k:this._throwable.message)&&void 0!==B?B:"Expected success but got failure",{cause:this._throwable})}toJSON(){return this.isSuccess()?{value:Object.assign({},this.get())}:{error:this.error}}}},25531:(k,B,U)=>{"use strict";U.d(B,{w:()=>F});class F{static format(k,...B){return F.replaceMultiple(k,B.map(((k,B)=>`{${B}}`)),...B)}static replaceMultiple(k,B,...U){if(F.isNullOrEmpty(k))throw new Error("Unsupported string value");if(""===k.trim())return k;if(B.length!==U.length)throw new Error("Search values and replace values args must have the same length.");let G=k;for(let F=0;F{"use strict";U.d(B,{A:()=>F});class F{static isDefined(k){return null!=k}static traverseIfObject(k,B){return B&&k&&"object"==typeof k?k[B]:k}static isDeepEqualOrNullishAcyclic(k,B){if(!F.isDefined(k)&&!F.isDefined(B))return!0;if(typeof k!=typeof B)return!1;if("object"!=typeof k)return k===B;const U=k,G=B,j=new Set;for(const F of Object.keys(U))j.add(F);for(const F of Object.keys(G))j.add(F);let $=!0;return j.forEach((k=>{$&&($=F.isDeepEqualOrNullishAcyclic(U[k],G[k]))})),$}}},35120:(k,B,U)=>{"use strict";U.d(B,{q:()=>F});class F{static get instance(){return this._instance}get game(){return this._game}get prodigy(){return this._prodigy}set prodigy(k){this._prodigy||(this._prodigy=k)}constructor(k){F._instance||(F._instance=this),window.__PNP__=this,this._game=k}destroy(){F._instance=null,this._game=null,this._prodigy=null}}},95925:(k,B,U)=>{"use strict";var F;U.d(B,{i:()=>F}),function(k){k[k.JSON=0]="JSON",k[k.Image=1]="Image",k[k.Atlas=2]="Atlas",k[k.Music=3]="Music",k[k.Sound=4]="Sound",k[k.Spine=5]="Spine"}(F||(F={}))},66572:(k,B,U)=>{"use strict";U.d(B,{a:()=>Q});var F,G=U(8674),j=U(62459),$=U(79687),H=U(91207),V=U(34829),W=U(23034),q=U(17425),K=U(30405),z=U(35120),Y=U(51477);let Q=F=class{get assetsArray(){return this._assetsArray}get loader(){return this._loader}set flagProvider(k){this._flagProvider=k}constructor(k){this.game=null,this._assetsArray=[],this._loader=null,this._fileDownloadTimes={},this.game=k;for(let B=1;B<=7;++B)q.K.commonAssetsCached[H.E.getIconForType("emote",B)]=!0;for(let B=1;B<=5;++B)q.K.commonAssetsCached[H.E.getIconForType("dance",B)]=!0;this.addLegacyAssetCommonCacheGuids(),this.game.load.onReset.add(this.reset.bind(this)),this.setLoader(),this._loader.onLoadComplete.add(this.loadComplete.bind(this),this),this._loader.onFileStart.add(this.fileWasStarted,this),this._loader.onFileComplete.add(this.fileWasCompleted,this)}setLoader(){this._loader=this.game.load,this._loader.crossOrigin="anonymous",this._loader.baseURL=V.s.get("GameConstants.Build.ASSETS_LOCATION")}assets(k,B,U=!0){if("string"==typeof k){for(let U=0;U{this.assets(k,((k,B)=>{B?U():F()}),B)}))}))}reset(k=!1){if(k)for(let B=this._assetsArray.length-1;B>=0;B--){const k=this._assetsArray[B];k.isCancellable&&(k.callbacks=[],this._assetsArray.splice(B,1))}this.setLoader()}loadComplete(k){k&&j.VyI.log("Loader completed with errors.",j.$bb.Error);for(let B=this._assetsArray.length-1;B>=0;B--){const k=this._assetsArray[B];let U=!1;if(!k.isLoading)continue;k.isLoading=!1;let F=!1;for(let B=0;B=0;k--){const B=this._assetsArray[k];if(!B.isLoading)continue;let U=!0;for(let k=0;k{const G=F.getHeader("Content-Length");j.Aq$.isDefined(G)?(k.size=parseInt(G,10)+U,this.sendDownloadMetric(B.key)):j.VyI.log(`Missing Content-Length header for ${B.key}`,j.$bb.Error)}))}else j.VyI.log("Unable to log file metrics because file has no data.",j.$bb.Warning);break;case"audio":{const U=new j.u1k;U.setBaseURI(B.requestUrl).setMethod(j.iXQ.Head),z.q.instance.prodigy.gameContainer.get("30b-3020").sendRequest(U).then((U=>{const F=U.getHeader("Content-Length");j.Aq$.isDefined(F)?(k.size=parseInt(F,10),this.sendDownloadMetric(B.key)):j.VyI.log(`Missing Content-Length header for ${B.key}`,j.$bb.Error)}));break}case"script":break;default:j.VyI.log(`Loading metric could not handle file type of: ${B.type}`,j.$bb.Error)}this.sendDownloadMetric(B.key)}}}sendDownloadMetric(k){const B=this._fileDownloadTimes[k];if(B&&j.Aq$.isDefined(B.size)){z.q.instance.prodigy.gameContainer.get("2a1-fed9").assetDownloaded(B.size,(B.end-B.start)/1e3)}}addLegacyAssetCommonCacheGuids(){const k=Object.keys(q.K.commonAssetsCached);for(let B=0;B{"use strict";U.d(B,{A:()=>W});var F=U(8674),G=U(62459),j=U(79687),$=U(23034),H=U(95925),V=U(66572);let W=class{constructor(k,B,U){this.assetLoader=null,this.cache=null,this.assetDictionary=null,this.assetLoader=k,this.cache=B,this.assetDictionary=U}loadAssets(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=(null==B?void 0:B.tag)?k.map((k=>`${k}_${B.tag}`)):k;return new Promise((k=>{this.assetLoader.assets(U,k)}))}))}loadAssetsNotCancellable(k){return(0,F.sH)(this,void 0,void 0,(function*(){return new Promise((B=>{this.assetLoader.assets(k,B,!1)}))}))}isLoaded(k,B){switch(B){case H.i.JSON:return this.cache.checkJSONKey(k);case H.i.Image:return this.cache.checkImageKey(k);case H.i.Music:case H.i.Sound:return this.cache.checkSoundKey(k);case H.i.Spine:return this.cache.checkJSONKey(k)&&this.cache.checkImageKey(`${k}.png`)&&this.cache.checkTextKey(`${k}Atlas`)}return!1}getAsset(k,B){switch(B){case H.i.JSON:return this.cache.getJSON(k);case H.i.Image:return this.cache.getImage(k);case H.i.Atlas:return this.cache.getFrameData(k)}return null}assignAssetData(k,B){this.assetDictionary.assignAssets({[k]:B})}loadSingleAsset(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return yield this.loadAssets([k]),this.getAsset(k,B)}))}};W=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("aa9-c54b")),(0,F.Qj)(1,(0,j.inject)("05c-8928")),(0,F.Qj)(2,(0,j.inject)("c9c-9511")),(0,F.Sn)("design:paramtypes",[V.a,G.l2R,$.s])],W)},51477:(k,B,U)=>{"use strict";U.d(B,{n:()=>nt});var F=U(62459),G=(U(96571),U(34829)),j=U(88225);class ${constructor(k){this.callbacks={},this.listeners={},this.broadcastIdCount=0,this.game=k}clear(){let k;for(const B in this.callbacks)for(const U in this.callbacks[B]){for(k=0;this.callbacks[B][U].length>k;)this.callbacks[B][U].persistent?k++:this.callbacks[B][U].pop();0===k&&(this.callbacks[B][U]=void 0,delete this.callbacks[B][U])}for(const B in this.listeners)for(const U in this.listeners[B]){for(k=0;this.listeners[B][U].length>k;)this.listeners[B][U].persistent?k++:this.listeners[B][U].pop();0===k&&(this.listeners[B][U]=void 0,delete this.listeners[B][U])}}addAppListener(k,B,U,G,$=null){let H=F.Aq$.isDefined(G)?G:this.game;F.Aq$.isDefined(k)&&F.Aq$.isDefined(B)&&F.Aq$.isDefined(U)||F.VyI.log("addAppListener - Invalid arguments",F.$bb.Error),H=this.hashContext(H),void 0===this.callbacks[H]&&(this.callbacks[H]={}),void 0===this.listeners[H]&&(this.listeners[H]={}),void 0===this.callbacks[H][k]&&(this.callbacks[H][k]=[]),void 0===this.listeners[H][k]&&(this.listeners[H][k]=[]),this.callbacks[H][k].push(B),this.listeners[H][k].push(U);const V=this.callbacks[H][k].persistent;F.Aq$.isDefined(V)&&$!==V&&j.captureException(new Error(`ROX-1681: Adding a listener to broadcast event ${k}, which previously had a listener with a persistent flag of ${V}, but has been overridden with ${$}. There might be missed callbacks for this event!`)),this.callbacks[H][k].persistent=F.Aq$.isDefined($),this.listeners[H][k].persistent=F.Aq$.isDefined($)}removeAppListener(k,B,U){let G=F.Aq$.isDefined(U)?U:this.game;if(F.Aq$.isDefined(k)){if(G=this.hashContext(G),void 0!==this.callbacks[G]&&void 0!==this.callbacks[G][k]&&void 0!==this.listeners[G]&&void 0!==this.listeners[G][k]){for(let U=0;U=this._prevTime+1e3&&(this.record&&(this._framerate=1e3*this._frames/(k-this._prevTime),this._rollingCount++,this._rollingSum+=this._framerate,this._fpsRecordsSinceLastPing.push(Math.round(this._framerate))),this._prevTime=k,this._frames=0),k>=this._timeAtLastPing+this._pingPeriodMs){const B=Math.round(F.cj9.average(...this._fpsRecordsSinceLastPing));let U=0,G=0;for(let k=0;k{"use strict";U.d(B,{y:()=>V});var F=U(8674),G=U(62459);class j{constructor(){this.x=0,this.y=0}get width(){if(G.o5U.isDesktop())return G.DX_.width;{const k=G.DX_.width,B=window.innerWidth;return k{this.onDeviceReady()}))}getOffset(k,B=new G.I9Y){const U=k.getBoundingClientRect(),F=this.scrollY,j=this.scrollX,$=document.documentElement.clientTop,H=document.documentElement.clientLeft;return B.x=U.left+j-H,B.y=U.top+F-$,B}getScreenOrientation(){return window.innerHeight>window.innerWidth?"portrait":"landscape"}onDeviceReady(){this.scrollX=window.pageXOffset,this.scrollY=window.pageYOffset}}class V{get boundingParent(){var k;return this.parentIsWindow||this.isFullScreen&&!this._createdFullScreenTarget?null:null===(k=this._game.canvas)||void 0===k?void 0:k.parentNode}get isFullScreen(){return G.DX_.isFullScreen()}get currentScaleMode(){return this.isFullScreen?this.fullScreenScaleMode:this.scaleMode}get isPortrait(){return"portrait"===this.screenOrientation}get isLandscape(){return"landscape"===this.screenOrientation}constructor(k,B=0,U=0){this._forceLandscape=!1,this._forcePortrait=!1,this._incorrectOrientation=!1,this.pageAlignHorizontally=!1,this.pageAlignVertically=!1,this.onOrientationChange=new G.HN0,this.enterIncorrectOrientation=new G.HN0,this.leaveIncorrectOrientation=new G.HN0,this.onFullScreenInit=new G.HN0,this.onFullScreenChange=new G.HN0,this.onFullScreenError=new G.HN0,this.scaleFactor=new G.I9Y(1,1),this._scaleFactorInverted=new G.I9Y(1,1),this.margin={left:0,top:0,right:0,bottom:0,x:0,y:0},this.bounds=new G.M_G,this.aspectRatio=0,this.sourceAspectRatio=0,this.canvasOffset=new G.I9Y(0,0),this.windowConstraints={right:"layout",bottom:""},this.scaleMode=V.NO_SCALE,this.fullScreenScaleMode=V.NO_SCALE,this.parentIsWindow=!1,this.parentNode=null,this.parentScaleFactor=new G.I9Y(1,1),this.trackParentInterval=2e3,this.onSizeChange=new G.HN0,this._onResizeContext=null,this._pendingScaleMode=null,this._gameSize=new G.M_G,this._lastUpdate=0,this._updateThrottle=0,this._updateThrottleReset=100,this._parentBounds=new G.M_G,this._tempBounds=new G.M_G,this._lastReportedCanvasSize=new G.M_G,this._lastReportedGameSize=new G.M_G,this._booted=!1,this._dom=new H(k.device),this._game=k,this.width=B,this.height=U,this.screenOrientation=this._dom.getScreenOrientation(),window.recalculateCanvasOffset=()=>{this.recalculateCanvasOffset()},k.config&&this.parseConfig(k.config),this.setupScale(B,U)}boot(){this._orientationChange=k=>{this.orientationChange(k)},this._windowResize=k=>{this.windowResize(k)},window.addEventListener("orientationchange",this._orientationChange,!1),window.addEventListener("resize",this._windowResize,!1),this._fullScreenChange=k=>{this.fullScreenChange(k)},this._fullScreenError=k=>{this.fullScreenError(k)},document.addEventListener("webkitfullscreenchange",this._fullScreenChange,!1),document.addEventListener("mozfullscreenchange",this._fullScreenChange,!1),document.addEventListener("MSFullscreenChange",this._fullScreenChange,!1),document.addEventListener("fullscreenchange",this._fullScreenChange,!1),document.addEventListener("webkitfullscreenerror",this._fullScreenError,!1),document.addEventListener("mozfullscreenerror",this._fullScreenError,!1),document.addEventListener("MSFullscreenError",this._fullScreenError,!1),document.addEventListener("fullscreenerror",this._fullScreenError,!1),this._game.onResume.add(this._gameResumed,this),this.recalculateCanvasOffset(),this.bounds.setTo(this.canvasOffset.x,this.canvasOffset.y,this.width,this.height),this.setGameSize(this._game.width,this._game.height),this.screenOrientation=this._dom.getScreenOrientation(),this._booted=!0,null!==this._pendingScaleMode&&(this.scaleMode=this._pendingScaleMode,this._pendingScaleMode=null)}parseConfig(k){void 0!==k.scaleMode&&(this._booted?this.scaleMode=k.scaleMode:this._pendingScaleMode=k.scaleMode),void 0!==k.fullScreenScaleMode&&(this.fullScreenScaleMode=k.fullScreenScaleMode),k.fullScreenTarget&&(this.fullScreenTarget=k.fullScreenTarget),this.pageAlignHorizontally=k.alignH||!1,this.pageAlignVertically=k.alignV||!1}setupScale(k,B){let U;const F=new G.M_G;let j,$;this._game.parent&&("string"==typeof this._game.parent?U=document.getElementById(this._game.parent):this._game.parent&&1===this._game.parent.nodeType&&(U=this._game.parent)),U?(this.parentNode=U,this.parentIsWindow=!1,this.getParentBounds(this._parentBounds),F.width=this._parentBounds.width,F.height=this._parentBounds.height):(this.parentNode=null,this.parentIsWindow=!0,F.width=this._dom.visualBounds.width,F.height=this._dom.visualBounds.height),"number"==typeof k?j=k:(this.parentScaleFactor.x=parseInt(k,10)/100,j=F.width*this.parentScaleFactor.x),"number"==typeof B?$=B:(this.parentScaleFactor.y=parseInt(B,10)/100,$=F.height*this.parentScaleFactor.y),j=Math.floor(j),$=Math.floor($),this._gameSize.setTo(0,0,j,$),this.updateDimensions(j,$,!1)}setGameSize(k,B){this._gameSize.setTo(0,0,k,B),this.currentScaleMode!==V.RESIZE&&this.updateDimensions(k,B,!0),this.queueUpdate(!0)}_gameResumed(){this.queueUpdate(!0)}queueUpdate(k){k&&(this._parentBounds.width=0,this._parentBounds.height=0),this._updateThrottle=this._updateThrottleReset}updateDimensions(k,B,U){this.width=k*this.parentScaleFactor.x,this.height=B*this.parentScaleFactor.y,this._game.width=this.width,this._game.height=this.height,this.sourceAspectRatio=this.width/this.height,this.updateScalingAndBounds(),U&&(this.currentScaleMode===V.RESIZE&&this._game.renderer.autoDensity||this._game.renderer.resize(this.width,this.height))}updateScalingAndBounds(){this.scaleFactor.x=this._game.width/this.width,this.scaleFactor.y=this._game.height/this.height,this._scaleFactorInverted.x=this.width/this._game.width,this._scaleFactorInverted.y=this.height/this._game.height,this.aspectRatio=this.width/this.height,this._game.canvas&&this.recalculateCanvasOffset(),this.bounds.setTo(this.canvasOffset.x,this.canvasOffset.y,this.width,this.height),this._game.input&&this._game.input.scale&&this._game.input.scale.setTo(this.scaleFactor.x,this.scaleFactor.y)}getParentBounds(k=new G.M_G,B){const U=B||this.boundingParent,F=this._dom.visualBounds,j=this._dom.layoutBounds;if(U){const B=U.getBoundingClientRect(),G=U.offsetParent?U.offsetParent.getBoundingClientRect():U.getBoundingClientRect();k.setTo(B.left-G.left,B.top-G.top,B.width,B.height);const $=this.windowConstraints;let H;$.right&&(H="layout"===$.right?j:F,k.x=Math.min(k.right,H.width)-k.width),$.bottom&&(H="layout"===$.bottom?j:F,k.y=Math.min(k.bottom,H.height)-k.height)}else k.setTo(0,0,F.width,F.height);return k.setTo(Math.round(k.x),Math.round(k.y),Math.round(k.width),Math.round(k.height)),k}setResizeCallback(k,B){this._onResize=k,this._onResizeContext=B}signalSizeChange(){if(!G.M_G.sameDimensions(this.bounds,this._lastReportedCanvasSize)||!G.M_G.sameDimensions(new G.M_G(0,0,this._game.width,this._game.height),this._lastReportedGameSize)){const k=this.width,B=this.height;this._lastReportedCanvasSize.setTo(0,0,k,B),this._lastReportedGameSize.setTo(0,0,this._game.width,this._game.height),this.onSizeChange.dispatch(this,k,B)}}setMinMax(k,B,U,F){this.minWidth=k,this.minHeight=B,void 0!==U&&(this.maxWidth=U),void 0!==F&&(this.maxHeight=F)}preUpdate(){if(this._game.time.timeMS=400?0:100,this.recalculateCanvasOffset();const B=this._parentBounds.width,U=this._parentBounds.height,F=this.getParentBounds(this._parentBounds,this.parentNode),j=F.width!==B||F.height!==U,$=this.updateOrientationState();(j||$)&&(this._onResize&&this._onResize.call(this._onResizeContext,this,F),this.updateLayout(),this.signalSizeChange());let H=2*this._updateThrottle;this._updateThrottle0&&(this.width=Math.min(this.width,this.maxWidth)),this.maxHeight>0&&(this.height=Math.min(this.height,this.maxHeight)))}createFullScreenTarget(){const k=document.createElement("div");return k.style.margin="0",k.style.padding="0",k.style.background="#000",k}cleanupCreatedTarget(){const k=this._createdFullScreenTarget;if(k&&k.parentNode){const B=k.parentNode;B.insertBefore(this._game.canvas,k),B.removeChild(k)}this._createdFullScreenTarget=null}prepScreenMode(k){const B=!!this._createdFullScreenTarget,U=this._createdFullScreenTarget||this.fullScreenTarget;k?(B||this.fullScreenScaleMode===V.EXACT_FIT)&&U!==this._game.canvas&&(this._fullScreenRestore={targetWidth:U.style.width,targetHeight:U.style.height},U.style.width="100%",U.style.height="100%"):(this._fullScreenRestore&&(U.style.width=this._fullScreenRestore.targetWidth,U.style.height=this._fullScreenRestore.targetHeight,this._fullScreenRestore=null),this.updateDimensions(this._gameSize.width,this._gameSize.height,!0),this.resetCanvas())}fullScreenChange(k){this.event=k,this.isFullScreen?(this.prepScreenMode(!0),this.updateLayout(),this.queueUpdate(!0)):(this.prepScreenMode(!1),this.cleanupCreatedTarget(),this.updateLayout(),this.queueUpdate(!0)),this.onFullScreenChange.dispatch(this,this.width,this.height)}fullScreenError(k){this.event=k,this.cleanupCreatedTarget(),this.onFullScreenError.dispatch(this)}destroy(){this._game.onResume.remove(this._gameResumed,this),window.removeEventListener("orientationchange",this._orientationChange,!1),window.removeEventListener("resize",this._windowResize,!1),document.removeEventListener("webkitfullscreenchange",this._fullScreenChange,!1),document.removeEventListener("mozfullscreenchange",this._fullScreenChange,!1),document.removeEventListener("MSFullscreenChange",this._fullScreenChange,!1),document.removeEventListener("fullscreenchange",this._fullScreenChange,!1),document.removeEventListener("webkitfullscreenerror",this._fullScreenError,!1),document.removeEventListener("mozfullscreenerror",this._fullScreenError,!1),document.removeEventListener("MSFullscreenError",this._fullScreenError,!1),document.removeEventListener("fullscreenerror",this._fullScreenError,!1),this.onOrientationChange.dispose(),this.enterIncorrectOrientation.dispose(),this.leaveIncorrectOrientation.dispose(),this.onFullScreenInit.dispose(),this.onFullScreenChange.dispose(),this.onFullScreenError.dispose(),this.onSizeChange.dispose()}startFullScreen(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.isFullScreen)return!1;try{let k=this.fullScreenTarget;k||(this.cleanupCreatedTarget(),this._createdFullScreenTarget=this.createFullScreenTarget(),k=this._createdFullScreenTarget);const B={targetElement:k};if(this.onFullScreenInit.dispatch(this,B),this._createdFullScreenTarget){const B=this._game.canvas;B.parentNode.insertBefore(k,B),k.appendChild(B)}const U=k,F=U.requestFullscreen||U.mozRequestFullscreen||U.msRequestFullscreen||U.requestFullScreen||U.mozRequestFullScreen||U.msRequestFullScreen;F?yield F.call(k):U.webkitRequestFullscreen?yield U.webkitRequestFullscreen(k.ALLOW_KEYBOARD_INPUT):U.webkitRequestFullScreen?yield U.webkitRequestFullScreen(k.ALLOW_KEYBOARD_INPUT):G.VyI.log("Platform doesn't support fullscreen API.",G.$bb.Warning)}catch(e){return G.RQr.logError(e,"Unable to go full screen."),setTimeout((()=>this.fullScreenError()),10),!1}return!0}))}stopFullScreen(){if(!this.isFullScreen)return!1;const k=document,B=k.cancelFullScreen||k.exitFullscreen||k.webkitCancelFullScreen||k.webkitExitFullscreen||k.msCancelFullScreen||k.msExitFullscreen||k.mozCancelFullScreen||k.mozExitFullscreen;return B?(B.call(k),!0):(G.VyI.log("Unable to leave full screen.",G.$bb.Error),!1)}recalculateCanvasOffset(){this._dom.getOffset(this._game.canvas,this.canvasOffset)}}V.EXACT_FIT=0,V.NO_SCALE=1,V.SHOW_ALL=2,V.RESIZE=3},10778:(k,B,U)=>{"use strict";U.d(B,{i:()=>V});var F=U(8674),G=U(62459),j=U(35120);class ${static validateAnimationFile(k){if(!editorAPI)return G.VyI.log("Not in editor mode",G.$bb.Error),null;if(!k)return G.VyI.log("no path",G.$bb.Warning),null;if(!editorAPI.readFileSync(k))return G.VyI.log("Path not valid / can`t read contents",G.$bb.Warning),null;const B=editorAPI.readFileSync(k).toString();if(!B)return G.VyI.log("Not a Valid File",G.$bb.Warning),null;const U=JSON.parse(B);if(!U)return G.VyI.log("Not a Valid Json",G.$bb.Warning),null;const F=U;return F?F.tweens?F:(G.VyI.log("Timeline has no tweens!",G.$bb.Warning),null):(G.VyI.log("Not a valid animation file",G.$bb.Warning),null)}static processNewTimelineFromGUID(k,B,U){const F=new G.Kfn,j=new Map;return U.forEach(((k,U)=>{B[U]&&j.set(k,[...j.get(k)||[],B[U]])})),k.tweens.forEach(((k,B)=>{const U=j.get(B);if(!U)return;const G=F.addGameObjects(U);k.from&&k.to?F.fromTo(G,k.how.duration,k.from,k.to,k.ease,k.how.delay):k.to?F.to(G,k.how.duration,k.to,k.ease,k.how.delay):k.from&&F.from(G,k.how.duration,k.from,k.ease,k.how.delay)})),F}static loadTimelineFromGUID(k){return(0,F.sH)(this,void 0,void 0,(function*(){return new Promise((B=>{j.q.instance.prodigy.load.assets([k],(()=>{const U=j.q.instance.game.cache.getJSON(k);B(U)}))}))}))}}class H extends G.$KW{constructor(){super(...arguments),this.tweenInfoNodes=[],this.firstFocus=!0,this.processedTweens=[],this.tweenLinks=[]}checkAndProcessAnimationPath(k){this.validationTimeline=$.validateAnimationFile(k),this.validationTimeline&&(this.processedTweens=[],this.validationTimeline.tweens.forEach((k=>{const B=k;B&&0!==B.GameObjectLinks.length&&this.processedTweens.push(B)})))}generate(k,B){return this.currentState=k,this.firstFocus&&(this.firstFocus=!1,k.playMode||this.checkAndProcessAnimationPath(k.animationPath)),k.playMode?this._editorAPI.switchFocusToPlayMode():this._editorAPI.switchFocusToEditMode(),G.XRp.createVertical(this.regenerateUI())}regenerateUI(){const k=[];let B;if(B=this.currentState.playMode?G.X9M.create({buttonText:"STOP",id:"Stop-animation",buttonIcon:G.a2l.Stop,onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{playMode:!1})}}):G.X9M.create({buttonText:"PLAY",id:"play-animation",buttonIcon:G.a2l.Play,onClick:()=>{this.currentState.animationPath?0!==this.currentState.gameObjects.length?this._editorAPI.modifyComponent(this._componentGuid,{playMode:!0}):this._editorAPI.showPopup("You haven`t assigned any objects :(","Nothing to animate"):this._editorAPI.showPopup("Please pick a valid .animation file first!","Uh oh")}}),k.push(G._Lw.line()),k.push(G.XRp.createHorizontal([G._Lw.line(),B,G._Lw.line()])),k.push(G._Lw.blankLine()),this.currentState.playMode)return k;const U=G.Hnb.create({allowedExtensions:["animation"],id:"animation",path:this.currentState.animationPath,onChange:k=>{this.clearAnimationData(),this.checkAndProcessAnimationPath(k);const B=`${k}.meta`,U=JSON.parse(this._editorAPI.readFileSync(B).toString());this._editorAPI.modifyComponent(this._componentGuid,{cachedAnimationGUID:U.guid,animationPath:k})}});return k.push(G.XRp.createVerticalContainer([G._Lw.halfBlankLine(),G.XRp.createHorizontal([G._Lw.line(),U,G._Lw.line()]),G._Lw.halfBlankLine()],{title:"Pick Animation File",isCollapsible:!1})),k.push(G._Lw.halfBlankLine()),this.validationTimeline&&k.push(G.XRp.createVerticalContainer(this.generateGameObjectNodes(),{isCollapsible:!1,title:"Game Objects"})),k}clearAnimationData(){this.validationTimeline=null,this._editorAPI.modifyComponent(this._componentGuid,{animationPath:null,gameObjects:[],gameObjectPositionList:[]})}generateIndexedPositionsForGameObjects(){const k=[];for(let B=0;B{this.generateIndexedPositionsForGameObjects()}}))}}let V=class extends G.uAl{constructor(){super(...arguments),this.playMode=!1,this.gameObjects=[],this.gameObjectPositionList=[]}create(){if(super.create(),!this.gameObject)return this.animationMode(!1),void G.VyI.log("Game Object not loaded or ready for animation",G.$bb.Warning);this.animationMode(this.playMode&&this.gameObject.activeInHierarchy)}playAnimation(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=yield $.loadTimelineFromGUID(this.cachedAnimationGUID);B?(null===(k=this._animationWrapper)||void 0===k||k.destroyTimeline(),this._animationWrapper=$.processNewTimelineFromGUID(B,this.gameObjects,this.gameObjectPositionList),this._animationWrapper.restart()):G.VyI.log("animation File not found / Not a valid JSON",G.$bb.Error)}))}animationMode(k){k&&this.playAnimation().catch((k=>{G.VyI.log(`Timeline processing failed: ${G.RQr.stringify(k)}`,G.$bb.Error)}))}destroy(){var k;null===(k=this._animationWrapper)||void 0===k||k.destroyTimeline(),super.destroy()}};(0,F.Cg)([(0,G.tW2)("animation"),(0,F.Sn)("design:type",String)],V.prototype,"animationPath",void 0),(0,F.Cg)([(0,G.tW2)(),(0,F.Sn)("design:type",String)],V.prototype,"cachedAnimationGUID",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"playMode",void 0),(0,F.Cg)([(0,G.ERr)(),(0,G.SZi)(),(0,F.Sn)("design:type",Array)],V.prototype,"gameObjects",void 0),(0,F.Cg)([(0,G.g11)(),(0,G.SZi)(),(0,F.Sn)("design:type",Array)],V.prototype,"gameObjectPositionList",void 0),V=(0,F.Cg)([(0,G.EVk)("AnimationPreview",G.YH6.animation),(0,G.WR4)(H)],V)},15521:(k,B,U)=>{"use strict";U.d(B,{Z:()=>G});var F=U(57308);class G{static bringToTop(k){return k.parent?(k.parent.setChildIndex(k,k.parent.children.length-1),k):k}static sendToBack(k){return k.parent?(k.parent.setChildIndex(k,0),k):k}static moveUp(k){if(!k.parent)return k;if(k.parent instanceof F.Y)k.parent.moveUp(k);else{const B=k.parent.getChildIndex(k);B0&&k.parent.setChildIndex(k,B-1)}return k}}},74560:(k,B,U)=>{"use strict";U.d(B,{m:()=>G});var F=U(59231);class G{static setInputHandler(k,B){k.input=B}static setInputEnabled(k,B,U){B?k.input?k.input&&!k.input.enabled&&k.input.start():(G.setInputHandler(k,new F.l(U)),k.input.start()):k.input&&k.input.enabled&&k.input.stop()}static isInputEnabled(k){var B;return!!(null===(B=k.input)||void 0===B?void 0:B.enabled)}}},29569:(k,B,U)=>{"use strict";U.d(B,{U:()=>H});var F=U(8674),G=U(62459),j=U(15016),$=U(35120);class H extends G.mk0{get input(){return $.q.instance.game.input}shutdown(){G.wa5.destroyActiveScene(),$.q.instance.prodigy.notifications.resumeAll(),super.shutdown()}getParentalConsentBanner(){return(0,F.sH)(this,void 0,void 0,(function*(){return H._parentalConsentUiHandler.getBannerGameObject()}))}showParentalConsentBanner(k){this._parentalConsentLoadPromise=H._parentalConsentUiHandler.showBanner(k)}hideParentalConsentBanner(){var k;null===(k=this._parentalConsentLoadPromise)||void 0===k||k.cancel(),H._parentalConsentUiHandler.hideBanner()}}H._parentalConsentUiHandler=new j.R},93690:(k,B,U)=>{"use strict";U.d(B,{p:()=>nt});var F=U(62459),G=U(68910),j=U(98252),$=U(74560),H=U(18741),V=U(82366),W=U(35120);class q{get justDown(){const k=this._justDown;return this._justDown=!1,k}get justUp(){const k=this._justUp;return this._justUp=!1,k}get enabled(){return this._enabled}set enabled(k){const B=!!k;B!==this._enabled&&(B||this.reset(!1),this._enabled=B)}get game(){return W.q.instance.game}constructor(k){this._enabled=!0,this.event=null,this.isDown=!1,this.isUp=!0,this.altKey=!1,this.ctrlKey=!1,this.shiftKey=!1,this.timeDown=0,this.duration=0,this.timeUp=-2500,this.durationUp=-2500,this.repeats=0,this.onDown=new F.HN0,this.onHoldContext=null,this.onUp=new F.HN0,this._justDown=!1,this._justUp=!1,this.keyCode=k}update(){this._enabled&&(this.isDown?(this.duration=this.game.time.timeMS-this.timeDown,this.repeats++,this.onHoldCallback&&this.onHoldCallback.call(this.onHoldContext,this)):this.durationUp=this.game.time.timeMS-this.timeUp)}processKeyDown(k){this._enabled&&(this.event=k,this.isDown||(this.altKey=k.altKey,this.ctrlKey=k.ctrlKey,this.shiftKey=k.shiftKey,this.isDown=!0,this.isUp=!1,this.timeDown=this.game.time.timeMS,this.duration=0,this.durationUp=this.game.time.timeMS-this.timeUp,this.repeats=0,this._justDown=!0,this.onDown.dispatch(this)))}processKeyUp(k){this._enabled&&(this.event=k,this.isUp||(this.isDown=!1,this.isUp=!0,this.timeUp=this.game.time.timeMS,this.duration=this.game.time.timeMS-this.timeDown,this.durationUp=0,this._justUp=!0,this.onUp.dispatch(this)))}reset(k=!0){this.isDown=!1,this.isUp=!0,this.timeUp=this.game.time.timeMS,this.duration=0,this.durationUp=-2500,this._enabled=!0,this._justDown=!1,this._justUp=!1,k&&(this.onDown.removeAll(),this.onUp.removeAll(),this.onHoldCallback=null,this.onHoldContext=null)}downDuration(k=50){return this.isDown&&this.duration{this.processKeyDown(k)},this._onKeyUp=k=>{this.processKeyUp(k)},this._onKeyPress=k=>{this.processKeyPress(k)},window.addEventListener("keydown",this._onKeyDown,!1),window.addEventListener("keyup",this._onKeyUp,!1),window.addEventListener("keypress",this._onKeyPress,!1),this.active=!0,this.enabled=!0,!0)}stop(){window.removeEventListener("keydown",this._onKeyDown),window.removeEventListener("keyup",this._onKeyUp),window.removeEventListener("keypress",this._onKeyPress),this._onKeyDown=null,this._onKeyUp=null,this._onKeyPress=null,this.active=!1}destroy(){this.stop(),this.clearCaptures();for(let k=0;k0;)this._keys[this._i]&&this._keys[this._i].update()}processKeyDown(k){if(this.event=k,!this.game.input.enabled||!this.enabled)return;const B=k.keyCode;this._capture[B]&&k.preventDefault(),this._keys[B]||(this._keys[B]=new q(B)),this._keys[B].processKeyDown(k),this._k=B,this.onDownCallback&&this.onDownCallback.call(this.callbackContext,k)}processKeyPress(k){this.pressEvent=k,this.game.input.enabled&&this.enabled&&this.onPressCallback&&this.onPressCallback.call(this.callbackContext,String.fromCharCode(k.charCode),k)}processKeyUp(k){if(this.event=k,!this.game.input.enabled||!this.enabled)return;const B=k.keyCode;this._capture[B]&&k.preventDefault(),this._keys[B]||(this._keys[B]=new q(B)),this._keys[B].processKeyUp(k),this.onUpCallback&&this.onUpCallback.call(this.callbackContext,k)}reset(k=!0){this.event=null;let B=this._keys.length;for(;B-- >0;)this._keys[B]&&this._keys[B].reset(k)}downDuration(k,B=50){return this._keys[k]?this._keys[k].downDuration(B):null}upDuration(k,B=50){return this._keys[k]?this._keys[k].upDuration(B):null}justPressed(k){return this._keys[k]?this._keys[k].justPressed():null}justReleased(k){return this._keys[k]?this._keys[k].justReleased():null}isDown(k){return this._keys[k]?this._keys[k].isDown:null}}class Y{addMouseWheelCallback(k){return this.input.mouseWheel.callbacks.push(k)}removeMouseWheelCallback(k){const B=this.input.mouseWheel.callbacks.indexOf(k,0);B>-1&&this.input.mouseWheel.callbacks.splice(B,1)}get wheelDelta(){return this.input.mouseWheel.delta}get game(){return F.W$e.instance.game}get input(){return W.q.instance.game.input}constructor(){this.capture=!1,this.stopOnGameOut=!1,this.callbackContext=this.game}start(){if(F.o5U.isAndroidStockBrowser()&&this.input.touch.active)return!1;if(void 0!==this._onMouseDown)return!1;this._onMouseDown=k=>{this.onMouseDown(k)},this._onMouseMove=k=>{this.onMouseMove(k)},this._onMouseUp=k=>{this.onMouseUp(k)},this._onMouseUpGlobal=k=>{this.onMouseUpGlobal(k)},this._onMouseOutGlobal=k=>{this.onMouseOutGlobal(k)},this._onMouseOut=k=>{this.onMouseOut(k)},this._onMouseOver=k=>{this.onMouseOver(k)};const k=this.game.renderer.events.domElement;return k.addEventListener("mousedown",this._onMouseDown,!0),k.addEventListener("mousemove",this._onMouseMove,!0),k.addEventListener("mouseup",this._onMouseUp,!0),window.addEventListener("mouseup",this._onMouseUpGlobal,!0),window.addEventListener("mouseout",this._onMouseOutGlobal,!0),k.addEventListener("mouseover",this._onMouseOver,!0),k.addEventListener("mouseout",this._onMouseOut,!0),this.active=!0,this.enabled=!0,!0}onMouseDown(k){this.event=k,this.capture&&k.preventDefault(),this.mouseDownCallback&&this.mouseDownCallback.call(this.callbackContext,k),this.input.enabled&&this.enabled&&(k.identifier=0,this.input.mousePointer.start(k))}onMouseMove(k){this.event=k,this.capture&&k.preventDefault(),this.mouseMoveCallback&&this.mouseMoveCallback.call(this.callbackContext,k),this.input.enabled&&this.enabled&&(k.identifier=0,this.input.mousePointer.move(k))}onMouseUp(k){this.event=k,this.capture&&k.preventDefault(),this.mouseUpCallback&&this.mouseUpCallback.call(this.callbackContext,k),this.input.enabled&&this.enabled&&(k.identifier=0,this.input.mousePointer.stop(k))}onMouseUpGlobal(k){this.input.mousePointer.withinGame||(this.mouseUpCallback&&this.mouseUpCallback.call(this.callbackContext,k),k.identifier=0,this.input.mousePointer.stop(k))}onMouseOutGlobal(k){this.event=k,this.capture&&k.preventDefault(),this.input.mousePointer.withinGame=!1,this.input.enabled&&this.enabled&&(this.input.mousePointer.stop(k),this.input.mousePointer.resetButtons())}onMouseOut(k){this.event=k,this.capture&&k.preventDefault(),this.input.mousePointer.withinGame=!1,this.mouseOutCallback&&this.mouseOutCallback.call(this.callbackContext,k),this.input.enabled&&this.enabled&&this.stopOnGameOut&&(k.identifier=0,this.input.mousePointer.stop(k))}onMouseOver(k){this.event=k,this.capture&&k.preventDefault(),this.input.mousePointer.withinGame=!0,this.mouseOverCallback&&this.mouseOverCallback.call(this.callbackContext,k)}stop(){const k=this.game.canvas;k.removeEventListener("mousedown",this._onMouseDown,!0),k.removeEventListener("mousemove",this._onMouseMove,!0),k.removeEventListener("mouseup",this._onMouseUp,!0),k.removeEventListener("mouseover",this._onMouseOver,!0),k.removeEventListener("mouseout",this._onMouseOut,!0),window.removeEventListener("mouseup",this._onMouseUpGlobal,!0),window.removeEventListener("mouseout",this._onMouseOutGlobal,!0),this.active=!1}}class Q{get game(){return F.W$e.instance.game}constructor(){this.active=!1,this.callbacks=[],this.delta=0,this.preventDefault=!0,this.element=this.game.canvas,this.callbackContext=this.game,this.wheelEventName=j.pF.getWheelEventName(),this.boundOnWheelHandler=this.onWheelHandler.bind(this)}start(){return!(!this.wheelEventName||this.active)&&(this.element.addEventListener(this.wheelEventName,this.boundOnWheelHandler,!0),this.active=!0,!0)}stop(){this.active&&(this.element.removeEventListener(this.wheelEventName,this.boundOnWheelHandler,!0),this.active=!1)}onWheelHandler(k){this.preventDefault&&k.preventDefault(),this.delta=F.cj9.clamp(-k.deltaY,-1,1);for(let B=0;B{this.onPointerDown(k)},this._onMSPointerMove=k=>{this.onPointerMove(k)},this._onMSPointerUp=k=>{this.onPointerUp(k)},this._onMSPointerUpGlobal=k=>{this.onPointerUpGlobal(k)},this._onMSPointerOut=k=>{this.onPointerOut(k)},this._onMSPointerOver=k=>{this.onPointerOver(k)};const k=this.game.canvas;return k.addEventListener("MSPointerDown",this._onMSPointerDown,!1),k.addEventListener("MSPointerMove",this._onMSPointerMove,!1),k.addEventListener("MSPointerUp",this._onMSPointerUp,!1),k.addEventListener("pointerdown",this._onMSPointerDown,!1),k.addEventListener("pointermove",this._onMSPointerMove,!1),k.addEventListener("pointerup",this._onMSPointerUp,!1),k.style["-ms-content-zooming"]="none",k.style["-ms-touch-action"]="none",window.addEventListener("MSPointerUp",this._onMSPointerUpGlobal,!0),k.addEventListener("MSPointerOver",this._onMSPointerOver,!0),k.addEventListener("MSPointerOut",this._onMSPointerOut,!0),window.addEventListener("pointerup",this._onMSPointerUpGlobal,!0),k.addEventListener("pointerover",this._onMSPointerOver,!0),k.addEventListener("pointerout",this._onMSPointerOut,!0),this.active=!0,!0}onPointerDown(k){this.input.executeTouchLockCallbacks(!1,k),this.event=k,this.capture&&k.preventDefault(),this.pointerDownCallback&&this.pointerDownCallback.call(this.callbackContext,k),this.input.enabled&&this.enabled&&(k.identifier=k.pointerId,"mouse"===k.pointerType||k.pointerType===X.POINTER_TYPE?this.input.mousePointer.start(k):this.input.startPointer(k))}onPointerMove(k){this.event=k,this.capture&&k.preventDefault(),this.pointerMoveCallback&&this.pointerMoveCallback.call(this.callbackContext,k),this.input.enabled&&this.enabled&&(k.identifier=k.pointerId,"mouse"===k.pointerType||k.pointerType===X.POINTER_TYPE?this.input.mousePointer.move(k):this.input.updatePointer(k))}onPointerUp(k){this.input.executeTouchLockCallbacks(!0,k),this.event=k,this.capture&&k.preventDefault(),this.pointerUpCallback&&this.pointerUpCallback.call(this.callbackContext,k),k.identifier=k.pointerId,"mouse"===k.pointerType||k.pointerType===X.POINTER_TYPE?this.input.mousePointer.stop(k,!this.input.enabled||!this.enabled):this.input.stopPointer(k,!this.input.enabled||!this.enabled)}onPointerUpGlobal(k){if("mouse"!==k.pointerType&&k.pointerType!==X.POINTER_TYPE||this.input.mousePointer.withinGame){const B=this.input.getPointerFromIdentifier(k.identifier);B&&B.withinGame&&this.onPointerUp(k)}else this.onPointerUp(k)}onPointerOut(k){var B;let U;this.event=k,this.capture&&k.preventDefault(),"mouse"===k.pointerType||k.pointerType===X.POINTER_TYPE?this.input.mousePointer.withinGame=!1:(U=this.input.getPointerFromIdentifier(k.identifier),U&&(U.withinGame=!1)),null===(B=this.input.mouse.mouseOutCallback)||void 0===B||B.call(this.input.mouse.callbackContext,k),this.input.enabled&&this.enabled&&this.input.mouse.stopOnGameOut&&(k.identifier=0,U?U.stop(k):this.input.mousePointer.stop(k))}onPointerOver(k){if(this.event=k,this.capture&&k.preventDefault(),"mouse"===k.pointerType||k.pointerType===X.POINTER_TYPE)this.input.mousePointer.withinGame=!0;else{const B=this.input.getPointerFromIdentifier(k.identifier);B&&(B.withinGame=!0)}this.input.mouse.mouseOverCallback&&this.input.mouse.mouseOverCallback.call(this.input.mouse.callbackContext,k)}stop(){const k=this.game.canvas;k.removeEventListener("MSPointerDown",this._onMSPointerDown,!1),k.removeEventListener("MSPointerMove",this._onMSPointerMove,!1),k.removeEventListener("MSPointerUp",this._onMSPointerUp,!1),k.removeEventListener("pointerdown",this._onMSPointerDown,!1),k.removeEventListener("pointermove",this._onMSPointerMove,!1),k.removeEventListener("pointerup",this._onMSPointerUp,!1),window.removeEventListener("MSPointerUp",this._onMSPointerUpGlobal,!0),k.removeEventListener("MSPointerOver",this._onMSPointerOver,!0),k.removeEventListener("MSPointerOut",this._onMSPointerOut,!0),window.removeEventListener("pointerup",this._onMSPointerUpGlobal,!0),k.removeEventListener("pointerover",this._onMSPointerOver,!0),k.removeEventListener("pointerout",this._onMSPointerOut,!0),this.active=!1}}X.POINTER_TYPE=4;class Z{get time(){return W.q.instance.game.time}constructor(k,B){this.event=null,this.isDown=!1,this.isUp=!0,this.timeDown=0,this.timeUp=0,this.altKey=!1,this.shiftKey=!1,this.ctrlKey=!1,this.value=0,this.onDown=new F.HN0,this.onUp=new F.HN0,this.parent=k,this.buttonCode=B}start(k,B){this.isDown||(this.isDown=!0,this.isUp=!1,this.timeDown=this.time.timeMS,this.event=k,this.value=B,k&&(this.altKey=k.altKey,this.shiftKey=k.shiftKey,this.ctrlKey=k.ctrlKey),this.onDown.dispatch(this,B))}stop(k,B){this.isUp||(this.isDown=!1,this.isUp=!0,this.timeUp=this.time.timeMS,this.event=k,this.value=B,k&&(this.altKey=k.altKey,this.shiftKey=k.shiftKey,this.ctrlKey=k.ctrlKey),this.onUp.dispatch(this,B))}startStop(k,B,U){k?this.start(B,U):this.stop(B,U)}justPressed(k=250){return this.isDown&&this.timeDown+k>this.time.timeMS}justReleased(k=250){return this.isUp&&this.timeUp+k>this.time.timeMS}reset(){this.isDown=!1,this.isUp=!0,this.timeDown=this.time.timeMS,this.altKey=!1,this.shiftKey=!1,this.ctrlKey=!1}destroy(){this.onDown.dispose(),this.onUp.dispose(),this.parent=null}get duration(){return this.isUp?-1:this.time.timeMS-this.timeDown}}var J,tt=U(59231);!function(k){k[k.CURSOR=1]="CURSOR",k[k.CONTACT=2]="CONTACT"}(J||(J={}));J.CURSOR,J.CONTACT;class et{get duration(){return this.isUp?-1:this.game.time.timeMS-this.timeDown}get game(){return W.q.instance.game}constructor(k,B){this.exists=!0,this.identifier=0,this._holdSent=!1,this._history=[],this._nextDrop=0,this._stateReset=!1,this.withinGame=!1,this.clientX=-1,this.clientY=-1,this.pageX=-1,this.pageY=-1,this.screenX=-1,this.screenY=-1,this.rawMovementX=0,this.rawMovementY=0,this.movementX=0,this.movementY=0,this.x=-1,this.y=-1,this.isDown=!1,this.isUp=!0,this.timeDown=0,this.timeUp=0,this.previousTapTime=0,this.totalTouches=0,this.msSinceLastClick=Number.MAX_VALUE,this.targetObject=null,this.interactiveCandidates=[],this.active=!1,this.dirty=!1,this.position=new F.I9Y,this.positionDown=new F.I9Y,this.positionUp=new F.I9Y,this.downObject=null,this.circle=new F.jlt(0,0,44),this.worldPosition={x:0,y:0},this.id=k,this.isMouse=0===k,this.pointerMode=F.Aq$.isDefined(B)?B:J.CURSOR|J.CONTACT,this.leftButton=new Z(this,1),this.middleButton=new Z(this,4),this.rightButton=new Z(this,2),this.backButton=new Z(this,8),this.forwardButton=new Z(this,16),this.eraserButton=new Z(this,32)}resetButtons(){this.isDown=!1,this.isUp=!0,this.isMouse&&(this.leftButton.reset(),this.middleButton.reset(),this.rightButton.reset(),this.backButton.reset(),this.forwardButton.reset(),this.eraserButton.reset())}processButtonsDown(k,B){switch(k){case 0:this.leftButton.start(B);break;case 2:this.rightButton.start(B);break;case 1:this.middleButton.start(B);break;case 3:this.backButton.start(B);break;case 4:this.forwardButton.start(B)}}processButtonsUp(k,B){switch(k){case 0:this.leftButton.stop(B);break;case 2:this.rightButton.stop(B);break;case 1:this.middleButton.stop(B);break;case 3:this.backButton.stop(B);break;case 4:this.forwardButton.stop(B)}}processButtonsUpDown(k,B){const U=B.type.toLowerCase().substr(-4),F="down"===U,G="move"===U;void 0!==k?(F&&1===k&&B.ctrlKey&&(k=2),this.leftButton.startStop(Boolean(1&k),B),this.rightButton.startStop(Boolean(2&k),B),this.middleButton.startStop(Boolean(4&k),B),this.backButton.startStop(Boolean(8&k),B),this.forwardButton.startStop(Boolean(16&k),B),this.eraserButton.startStop(Boolean(32&k),B)):void 0!==B.button?F&&B.ctrlKey&&0===B.button?this.rightButton.start(B):F?this.processButtonsDown(B.button,B):G||this.processButtonsUp(B.button,B):F?B.ctrlKey?this.rightButton.start(B):this.leftButton.start(B):(this.leftButton.stop(B),this.rightButton.stop(B))}updateButtons(k){this.button=k.button,this.processButtonsUpDown(k.buttons,k),this.isUp=!0,this.isDown=!1,(this.leftButton.isDown||this.rightButton.isDown||this.middleButton.isDown||this.backButton.isDown||this.forwardButton.isDown||this.eraserButton.isDown)&&(this.isUp=!1,this.isDown=!0)}start(k){const B=this.game.input;return F.Aq$.isDefined(k.pointerId)&&(this.pointerId=k.pointerId),this.identifier=k.identifier,this.target=k.target,this.isMouse?this.updateButtons(k):(this.isDown=!0,this.isUp=!1),this.active=!0,this.withinGame=!0,this.dirty=!1,this._history=[],this.msSinceLastClick=this.game.time.timeMS-this.timeDown,this.timeDown=this.game.time.timeMS,this._holdSent=!1,this.move(k,!0),this.positionDown.set(this.x,this.y),(0===B.multiInputOverride||1===B.multiInputOverride||2===B.multiInputOverride&&0===B.totalActivePointers)&&(B.x=this.x,B.y=this.y,B.position.setTo(this.x,this.y),B.onDown.dispatch(this,k),B.resetSpeed(this.x,this.y)),this._stateReset=!1,this.totalTouches++,null!==this.targetObject&&(this.targetObject._touchedHandler(this),this.downObject=this.targetObject),this}update(){const k=this.game.input;this.active&&(this.updateWorldPosition(),this.dirty&&(this.dirty=!1),!1===this._holdSent&&this.duration>=k.holdRate&&((0===k.multiInputOverride||1===k.multiInputOverride||2===k.multiInputOverride&&0===k.totalActivePointers)&&k.onHold.dispatch(this),this._holdSent=!0),k.recordPointerHistory&&this.game.time.timeMS>=this._nextDrop&&(this._nextDrop=this.game.time.timeMS+k.recordRate,this._history.push({x:this.position.x,y:this.position.y}),this._history.length>k.recordLimit&&this._history.shift()))}updateWorldPosition(){this.worldPosition.x=this.x,this.worldPosition.y=this.y;const k=F.i7d.main;if(k){const B=k.GameObject.transform.worldPosition;this.worldPosition.x=this.x+B.x-k.viewportSize.getHalfWidth(),this.worldPosition.y=this.y+B.y-k.viewportSize.getHalfHeight()}}move(k,B=!1){const U=this.game.input;return U.pollLocked?null:(void 0!==k.button&&(this.button=k.button),this.isMouse&&this.updateButtons(k),this.clientX=k.clientX,this.clientY=k.clientY,this.pageX=k.pageX,this.pageY=k.pageY,this.screenX=k.screenX,this.screenY=k.screenY,this.isMouse&&U.pointerLock.locked&&!B&&(this.rawMovementX=F.Aq$.isDefined(k.movementX)?k.movementX:F.Aq$.isDefined(k.mozMovementX)?k.mozMovementX:F.Aq$.isDefined(k.webkitMovementX)?k.webkitMovementX:0,this.rawMovementY=F.Aq$.isDefined(k.movementY)?k.movementY:F.Aq$.isDefined(k.mozMovementY)?k.mozMovementY:F.Aq$.isDefined(k.webkitMovementY)?k.webkitMovementY:0,this.movementX+=this.rawMovementX,this.movementY+=this.rawMovementY),this.x=(this.pageX-this.game.scale.canvasOffset.x)*U.scale.x,this.y=(this.pageY-this.game.scale.canvasOffset.y)*U.scale.y,this.updateWorldPosition(),this.position.set(this.x,this.y),this.circle.x=this.x,this.circle.y=this.y,(0===U.multiInputOverride||1===U.multiInputOverride||2===U.multiInputOverride&&0===U.totalActivePointers)&&(U.activePointer=this,U.x=this.x,U.y=this.y,U.position.setTo(U.x,U.y),U.circle.x=U.x,U.circle.y=U.y),this.withinGame=this.game.scale.bounds.contains(this.pageX,this.pageY),U.onPointerMove.dispatch(this,this.x,this.y,B,k),null===this.targetObject||this.game.paused||!0!==this.targetObject.isDragged?this.processInteractiveObjects(B):!1===this.targetObject.update(this)&&(this.targetObject=null),this)}processInteractiveObjects(k=!1){var B,U;let F=-1,G=null;const j=[];this.interactiveCandidates=[],this.game.renderer.events.rootBoundary.rootTarget||(this.game.renderer.events.rootBoundary.rootTarget=this.game.stage);const $=this.game.renderer.events.rootBoundary.hitTest(this.x,this.y);let H=null==$?void 0:$.input;if(void 0===H&&(H=null),Math.round(this.x)!==Math.round(this.worldPosition.x)||Math.round(this.y)!==Math.round(this.worldPosition.y)){const k=this.game.renderer.events.rootBoundary.hitTest(this.worldPosition.x,this.worldPosition.y),U=null!==(B=null==k?void 0:k.input)&&void 0!==B?B:null;j.push(U)}j.push(H);for(let V=0;V=0&&this.duration<=$.tapRate))){const B=this.timeUp-this.previousTapTime<$.doubleTapRate;$.onTap.dispatch(this,B,k),this.previousTapTime=this.timeUp}const H="mouseout"===(null===(U=k.type)||void 0===U?void 0:U.toLowerCase());return this.isMouse&&!H?this.updateButtons(k):(this.isDown=!1,this.isUp=!0),this.id>0&&(this.active=!1),this.withinGame=this.game.scale.bounds.contains(k.pageX,k.pageY),this.pointerId=null,this.identifier=null,this.positionUp.set(this.x,this.y),B||(null===(F=this.targetObject)||void 0===F||F._releasedHandler(this),null===(G=this.downObject)||void 0===G||G._releasedHandler(this),null===(j=this.downObject)||void 0===j||j._pointerOutHandler(this)),this.targetObject=null,this.downObject=null,this}justPressed(k){return!0===this.isDown&&this.timeDown+(F.Aq$.isDefined(k)?k:this.game.input.justPressedRate)>this.game.time.timeMS}justReleased(k){return this.isUp&&this.timeUp+(F.Aq$.isDefined(k)?k:this.game.input.justReleasedRate)>this.game.time.timeMS}reset(){!1===this.isMouse&&(this.active=!1),this.pointerId=null,this.identifier=null,this.dirty=!1,this.totalTouches=0,this._holdSent=!1,this._history.length=0,this._stateReset=!0,this.resetButtons(),this.targetObject&&this.targetObject._releasedHandler(this),this.targetObject=null}resetMovement(){this.movementX=0,this.movementY=0}}class it{get game(){return F.W$e.instance.game}constructor(){this.active=!1,this.locked=!1,this.onChange=new F.HN0,this.onError=new F.HN0;const k=this.game.device;this.element=this.game.canvas,this.boundOnChangeHandler=this.onChangeHandler.bind(this),this.boundOnErrorHandler=this.onErrorHandler.bind(this),this.pointerLockElement=k.pointerLockElement,this.pointerlockchange=k.pointerlockchange,this.pointerlockerror=k.pointerlockerror}start(){return!(!j.pF.hasPointerLockSupport()||this.active)&&(this.element.requestPointerLock||(this.element.requestPointerLock=this.element.mozRequestPointerLock||this.element.webkitRequestPointerLock),document.exitPointerLock||(document.exitPointerLock=document.mozExitPointerLock||document.webkitExitPointerLock),document.addEventListener(this.pointerlockchange,this.boundOnChangeHandler,!0),document.addEventListener(this.pointerlockerror,this.boundOnErrorHandler,!0),this.active=!0,!0)}stop(){this.active&&(document.removeEventListener(this.pointerlockchange,this.boundOnChangeHandler,!0),document.removeEventListener(this.pointerlockerror,this.boundOnErrorHandler,!0),this.active=!1)}request(){this.active&&!this.locked&&this.element.requestPointerLock()}exit(){document.exitPointerLock()}onChangeHandler(k){this.locked=document[this.pointerLockElement]===this.element,this.onChange.dispatch(this.locked,k)}onErrorHandler(k){this.onError.dispatch(k)}cleanUp(){this.onChange.dispose(),this.onError.dispose()}}class st{get game(){return F.W$e.instance.game}constructor(){this.active=!1,this.enabled=!0,this.callbackContext=this.game}start(){return!!j.pF.hasTouchSupport()&&(void 0===this._onTouchStart&&(this._onTouchStart=this.onTouchStart.bind(this),this._onTouchMove=this.onTouchMove.bind(this),this._onTouchEnd=this.onTouchEnd.bind(this),this._onTouchEnter=this.onTouchEnter.bind(this),this._onTouchLeave=this.onTouchLeave.bind(this),this._onTouchCancel=this.onTouchCancel.bind(this),this.game.canvas.addEventListener("touchstart",this._onTouchStart,!1),this.game.canvas.addEventListener("touchmove",this._onTouchMove,!1),this.game.canvas.addEventListener("touchend",this._onTouchEnd,!1),this.game.canvas.addEventListener("touchcancel",this._onTouchCancel,!1),this.game.canvas.addEventListener("touchenter",this._onTouchEnter,!1),this.game.canvas.addEventListener("touchleave",this._onTouchLeave,!1),this.active=!0,!0))}consumeDocumentTouches(){this._documentTouchMove=k=>{k.preventDefault()},document.addEventListener("touchmove",this._documentTouchMove,!1)}onTouchStart(k){if(this.game.input.executeTouchLockCallbacks(!1,k),this.event=k,this.game.input.enabled&&this.enabled){this.touchStartCallback&&this.touchStartCallback.call(this.callbackContext,k),this.preventDefault&&k.preventDefault();for(let B=0;B0&&this._pollCounter=nt.MAX_POINTERS)return null;const k=this.pointers.length+1,B=new et(k,J.CONTACT);return this.pointers.push(B),this[`pointer${k}`]=B,B}update(){if(this.keyboard&&this.keyboard.update(),this.pollLocked)this._pollCounter++;else{this.speed.x=this.position.x-this._oldPosition.x,this.speed.y=this.position.y-this._oldPosition.y,this._oldPosition.copyFrom(this.position),this.mousePointer.update();for(let k=0;k=0&&this.countActivePointers(this.maxPointers)>=this.maxPointers)return null;if(!this.pointer1.active)return this.pointer1.start(k);if(!this.pointer2.active)return this.pointer2.start(k);for(let U=2;U0;F++)B=this.pointers[F],B.active&&U--;return k-U}getPointer(k=!1){let B;for(let U=0;U$.m.isInputEnabled(U),set:k=>{$.m.setInputEnabled(U,k,U),U.cursor=k?"pointer":"auto"},configurable:!0}),U.inputEnabled=B}}nt.MAX_POINTERS=10},59231:(k,B,U)=>{"use strict";U.d(B,{l:()=>W,q:()=>F});var F,G=U(62459),j=U(88225),$=U(68910),H=U(35120),V=U(15521);!function(k){k[k.Default=0]="Default",k[k.Shape=1]="Shape",k[k.Passthrough=2]="Passthrough"}(F||(F={}));class W{get game(){return H.q.instance.game}constructor(k){this.enabled=!1,this.checked=!1,this.priorityID=0,this.attachToCamera=!0,this.useHandCursor=!1,this._setHandCursor=!1,this.isDragged=!1,this.allowHorizontalDrag=!0,this.allowVerticalDrag=!0,this.bringToTop=!1,this.snapOffset=null,this.snapOnDrag=!1,this.snapOnRelease=!1,this.snapX=0,this.snapY=0,this.snapOffsetX=0,this.snapOffsetY=0,this.draggable=!1,this.boundsRect=null,this.boundsSprite=null,this.dragOffset=new G.I9Y,this.dragFromCenter=!1,this.dragStopBlocksInputUp=!1,this.dragStartPoint=new G.I9Y,this.dragDistanceThreshold=0,this.dragTimeThreshold=0,this.downPoint=new G.I9Y,this.snapPoint=new G.I9Y,this._dragPoint=new G.I9Y,this._dragPhase=!1,this._pendingDrag=!1,this._dragTimePass=!1,this._dragDistancePass=!1,this._wasEnabled=!1,this._pointerData=[],this.sprite=k,this._pointerData.push({id:0,x:0,y:0,camX:0,camY:0,isDown:!1,isUp:!1,isOver:!1,isOut:!1,timeOver:0,timeOut:0,timeDown:0,timeUp:0,downDuration:0,isDragged:!1}),this._pointerData.push({id:0,x:0,y:0,camX:0,camY:0,isDown:!1,isUp:!1,isOver:!1,isOut:!1,timeOver:0,timeOut:0,timeDown:0,timeUp:0,downDuration:0,isDragged:!1})}getHandlerType(){return F.Default}start(k=0,B=!1){if(!1===this.enabled){this.useHandCursor=B,this.priorityID=k;for(let k=0;k<10;k++)this._pointerData[k]={id:k,x:0,y:0,isDown:!1,isUp:!1,isOver:!1,isOut:!1,timeOver:0,timeOut:0,timeDown:0,timeUp:0,downDuration:0,isDragged:!1};this.snapOffset=new G.I9Y,this.enabled=!0,this.sprite.eventMode="static",this._wasEnabled=!0}return this.sprite.events.onAddedToGroup.add(this.addedToGroup,this),this.sprite.events.onRemovedFromGroup.add(this.removedFromGroup,this),this.sprite}addedToGroup(){this._dragPhase||this._wasEnabled&&!this.enabled&&this.start()}removedFromGroup(){this._dragPhase||(this.enabled?(this._wasEnabled=!0,this.stop()):this._wasEnabled=!1)}reset(){this.enabled=!1,this.sprite.eventMode="none";for(let k=0;k<10;k++)this._pointerData[k]={id:k,x:0,y:0,isDown:!1,isUp:!1,isOver:!1,isOut:!1,timeOver:0,timeOut:0,timeDown:0,timeUp:0,downDuration:0,isDragged:!1}}stop(){!1!==this.enabled&&(this.enabled=!1,this.sprite.eventMode="none")}destroy(){this.enabled=!1,this.sprite&&(this._setHandCursor&&(this.game.canvas.style.cursor="",this._setHandCursor=!1),this.sprite.eventMode="none",this._pointerData.length=0,this.boundsRect=null,this.boundsSprite=null,this.sprite=null)}validForInput(k){var B,U;return!(!(this.enabled&&this.sprite&&this.sprite.transform&&0!==(null===(B=this.sprite.worldScale)||void 0===B?void 0:B.x)&&0!==(null===(U=this.sprite.worldScale)||void 0===U?void 0:U.y))||this.priorityID=k}pointerX(k=0){return this._pointerData[k].x}pointerY(k=0){return this._pointerData[k].y}pointerDown(k=0){var B,U;return null!==(U=null===(B=this._pointerData[k])||void 0===B?void 0:B.isDown)&&void 0!==U&&U}pointerUp(k=0){var B,U;return null!==(U=null===(B=this._pointerData[k])||void 0===B?void 0:B.isUp)&&void 0!==U&&U}pointerTimeDown(k=0){return this._pointerData[k].timeDown}pointerTimeUp(k=0){return this._pointerData[k].timeUp}pointerOver(k=0){var B,U,F;if(!this.enabled)return!1;if(void 0===k){for(let k=0;k<10;k++)if(null===(B=this._pointerData[k])||void 0===B?void 0:B.isOver)return!0;return!1}return null!==(F=null===(U=this._pointerData[k])||void 0===U?void 0:U.isOver)&&void 0!==F&&F}pointerOut(k=0){if(!this.enabled)return!1;if(void 0!==k)return this._pointerData[k].isOut;for(let B=0;B<10;B++)if(this._pointerData[B].isOut)return!0}pointerTimeOver(k=0){return this._pointerData[k].timeOver}pointerTimeOut(k=0){return this._pointerData[k].timeOut}pointerDragged(k=0){return this._pointerData[k].isDragged}checkPointerDown(k){var B,U,F;if(!(k&&k.isDown&&this.enabled&&(null===(B=this.sprite)||void 0===B?void 0:B.parent)&&this.sprite.visible&&this.sprite.parent.visible&&0!==(null===(U=this.sprite.worldScale)||void 0===U?void 0:U.x)&&0!==(null===(F=this.sprite.worldScale)||void 0===F?void 0:F.y)))return!1;const G=this.attachToCamera?k.position:k.worldPosition;return this.game.input.hitTest(this.sprite,G)}checkPointerOver(k){var B,U,F;if(!(this.enabled&&(null===(B=this.sprite)||void 0===B?void 0:B.parent)&&this.sprite.visible&&this.sprite.parent.visible&&0!==(null===(U=this.sprite.worldScale)||void 0===U?void 0:U.x)&&0!==(null===(F=this.sprite.worldScale)||void 0===F?void 0:F.y)))return!1;const G=this.attachToCamera?k.position:k.worldPosition;return this.game.input.hitTest(this.sprite,G)}update(k){var B,U;return!!(null===(B=this.sprite)||void 0===B?void 0:B.parent)&&(this.enabled&&this.sprite.visible&&this.sprite.parent.visible?this._pendingDrag?(this._dragDistancePass||(this._dragDistancePass=G.cj9.distance(k.x,k.y,this.downPoint.x,this.downPoint.y)>=this.dragDistanceThreshold),this._dragDistancePass&&this._dragTimePass&&this.startDrag(k),!0):this.draggable&&this._draggedPointerID===k.id?this.updateDrag(k,!1):!!(null===(U=this._pointerData[k.id])||void 0===U?void 0:U.isOver)&&(this.checkPointerOver(k)?(this._pointerData[k.id].x=k.x-this.sprite.x,this._pointerData[k.id].y=k.y-this.sprite.y,!0):(this._pointerOutHandler(k),!1)):(this._pointerOutHandler(k),!1))}_pointerOverHandler(k,B=!1){var U,F,G,j,$;if(null===this.sprite)return;const H=this._pointerData[k.id];if(H&&(!1===H.isOver||k.dirty)){const V=!1===H.isOver;H.isOver=!0,H.isOut=!1,H.timeOver=this.game.time.timeMS,H.x=k.x-this.sprite.x,H.y=k.y-this.sprite.y,this.useHandCursor&&!1===H.isDragged&&(this.game.canvas.style.cursor="pointer",this._setHandCursor=!0),!B&&V&&this.sprite&&(null===(U=this.sprite.events)||void 0===U||U.onInputOver.dispatch(this.sprite,k),null===($=null===(j=null===(G=null===(F=this.sprite)||void 0===F?void 0:F._events)||void 0===G?void 0:G.pointerover)||void 0===j?void 0:j.fn)||void 0===$||$.call(j,this.getMouseEvent(k))),this.sprite.parent&&this.sprite.parent.onChildInputOver&&this.sprite.parent.onChildInputOver.dispatch(this.sprite,k)}}getMouseEvent(k){return{data:{isPrimary:0===k.button||1===k.id,global:{x:k.x,y:k.y}},stopPropagation:()=>{}}}_pointerOutHandler(k,B=!1){var U,F,G,j,$;if(null===this.sprite)return;const H=this._pointerData[k.id];H&&(H.isOver=!1,H.isOut=!0,H.timeOut=this.game.time.timeMS,this.useHandCursor&&!1===H.isDragged&&(this.game.canvas.style.cursor="",this._setHandCursor=!1),!B&&this.sprite&&(null===(U=this.sprite.events)||void 0===U||U.onInputOut.dispatch(this.sprite,k),null===($=null===(j=null===(G=null===(F=this.sprite)||void 0===F?void 0:F._events)||void 0===G?void 0:G.pointerout)||void 0===j?void 0:j.fn)||void 0===$||$.call(j,this.getMouseEvent(k)),this.sprite&&this.sprite.parent&&this.sprite.parent.onChildInputOut&&this.sprite.parent.onChildInputOut.dispatch(this.sprite,k)))}_touchedHandler(k){var B,U,F,G,$;if(null===this.sprite)return;const H=this._pointerData[k.id];if(H&&!H.isDown&&H.isOver){if(H.isDown=!0,H.isUp=!1,H.timeDown=this.game.time.timeMS,this.downPoint.set(k.x,k.y),k.dirty=!0,this.sprite){{const k=[];let B=this.sprite.parent;for(;B;)k.unshift(B.name),B=B.parent;j.addBreadcrumb({category:"ui.click",message:k.join(" > ")})}if(null===(B=this.sprite.events)||void 0===B||B.onInputDown.dispatch(this.sprite,k),null===($=null===(G=null===(F=null===(U=this.sprite)||void 0===U?void 0:U._events)||void 0===F?void 0:F.pointerdown)||void 0===G?void 0:G.fn)||void 0===$||$.call(G,this.getMouseEvent(k)),this.sprite&&this.sprite.parent&&this.sprite.parent.onChildInputDown&&this.sprite.parent.onChildInputDown.dispatch(this.sprite,k),null===this.sprite)return}this.draggable&&!1===this.isDragged&&(0===this.dragTimeThreshold&&0===this.dragDistanceThreshold?this.startDrag(k):(this._pendingDrag=!0,this._dragDistancePass=0===this.dragDistanceThreshold,this.dragTimeThreshold>0?(this._dragTimePass=!1,this.game.time.events.addTimer(this.dragTimeThreshold,this.dragTimeElapsed,this,k)):this._dragTimePass=!0)),this.bringToTop&&V.Z.bringToTop(this.sprite)}}dragTimeElapsed(k){this._dragTimePass=!0,this._pendingDrag&&this.sprite&&this._dragDistancePass&&this.startDrag(k)}_releasedHandler(k){var B,U,F,j,$,H,V,W,q;if(null===this.sprite)return;const K=this._pointerData[k.id];if(K&&K.isDown&&k.isUp){K.isDown=!1,K.isUp=!0,K.timeUp=this.game.time.timeMS,K.downDuration=K.timeUp-K.timeDown;let z=this.checkPointerOver(k);this.sprite&&(this.dragStopBlocksInputUp&&(!this.dragStopBlocksInputUp||this.draggable&&this.isDragged&&this._draggedPointerID===k.id)||null===(B=this.sprite.events)||void 0===B||B.onInputUp.dispatch(this.sprite,k,z),null===($=null===(j=null===(F=null===(U=this.sprite)||void 0===U?void 0:U._events)||void 0===F?void 0:F.pointerup)||void 0===j?void 0:j.fn)||void 0===$||$.call(j,this.getMouseEvent(k)),G.o5U.isMobile()&&(null===(q=null===(W=null===(V=null===(H=this.sprite)||void 0===H?void 0:H._events)||void 0===V?void 0:V.pointerout)||void 0===W?void 0:W.fn)||void 0===q||q.call(W,this.getMouseEvent(k))),this.sprite&&this.sprite.parent&&this.sprite.parent.onChildInputUp&&this.sprite.parent.onChildInputUp.dispatch(this.sprite,k,z),z&&(z=this.checkPointerOver(k))),K.isOver=z,!z&&this.useHandCursor&&(this.game.canvas.style.cursor="default",this._setHandCursor=!1),k.dirty=!0,this._pendingDrag=!1,this.draggable&&this.isDragged&&this._draggedPointerID===k.id&&this.stopDrag(k)}}updateDrag(k,B=!1){var U,F,j,H;const V=this.dragOffset,W=this._dragPoint,q=this._pointerData[k.id],K=this.snapPoint,z=this.sprite,Y=z instanceof $.Graphics;if(!("texture"in z)&&!Y)return G.VyI.log("Error: Sprite does not implement IImage",G.$bb.Error),!1;if(k.isUp)return this.stopDrag(k),!1;const Q=this.globalToLocal(k),X=Q.x+W.x+V.x,Z=Q.y+W.y+V.y;let J,tt;if(z.fixedToCamera){const k=z.cameraOffset,B=k.x,j=k.y,$=null!==(F=null===(U=this.game.stage.camera)||void 0===U?void 0:U.GameObject.transform.worldPosition)&&void 0!==F?F:G.I9Y.ZERO;this.allowHorizontalDrag&&(k.x=X-$.x),this.allowVerticalDrag&&(k.y=Z-$.y),this.boundsRect&&this.checkBoundsRect(),this.boundsSprite&&this.checkBoundsSprite(),this.snapOnDrag&&(k.x=Math.round((k.x-this.snapOffsetX%this.snapX)/this.snapX)*this.snapX+this.snapOffsetX%this.snapX,k.y=Math.round((k.y-this.snapOffsetY%this.snapY)/this.snapY)*this.snapY+this.snapOffsetY%this.snapY,K.setTo(k.x,k.y)),J=k.x-B,tt=k.y-j}else{const k=null!==(H=null===(j=this.game.stage.camera)||void 0===j?void 0:j.GameObject.transform.worldPosition)&&void 0!==H?H:G.I9Y.ZERO,B=k.x-q.camX,U=k.y-q.camY,F=z.x,$=z.y;this.allowHorizontalDrag&&(z.x=X+B),this.allowVerticalDrag&&(z.y=Z+U),this.boundsRect&&this.checkBoundsRect(),this.boundsSprite&&this.checkBoundsSprite(),this.snapOnDrag&&(z.x=Math.round((z.x-this.snapOffsetX%this.snapX)/this.snapX)*this.snapX+this.snapOffsetX%this.snapX,z.y=Math.round((z.y-this.snapOffsetY%this.snapY)/this.snapY)*this.snapY+this.snapOffsetY%this.snapY,K.setTo(z.x,z.y)),J=z.x-F,tt=z.y-$}return this.sprite.events.onDragUpdate.dispatch(z,k,X,Z,K,B,J,tt),!0}justOver(k=0,B=500){return!!this._pointerData[k]&&(this._pointerData[k].isOver&&this.overDuration(k)this.boundsRect.right&&(this.sprite.cameraOffset.x=this.boundsRect.right-this.sprite.width),this.sprite.cameraOffset.ythis.boundsRect.bottom&&(this.sprite.cameraOffset.y=this.boundsRect.bottom-this.sprite.height);else{const k=this.sprite.getBounds();k.leftthis.boundsRect.right&&(this.sprite.x=this.boundsRect.right-(this.sprite.width-this.sprite.getOffsetX())),k.topthis.boundsRect.bottom&&(this.sprite.y=this.boundsRect.bottom-(this.sprite.height-this.sprite.getOffsetY()))}}checkBoundsSprite(){if(this.sprite.fixedToCamera&&this.boundsSprite.fixedToCamera)this.sprite.cameraOffset.xthis.boundsSprite.cameraOffset.x+this.boundsSprite.width&&(this.sprite.cameraOffset.x=this.boundsSprite.cameraOffset.x+this.boundsSprite.width-this.sprite.width),this.sprite.cameraOffset.ythis.boundsSprite.cameraOffset.y+this.boundsSprite.height&&(this.sprite.cameraOffset.y=this.boundsSprite.cameraOffset.y+this.boundsSprite.height-this.sprite.height);else{const k=this.sprite.getBounds();k.leftthis.boundsSprite.right&&(this.sprite.x=this.boundsSprite.right-(this.sprite.width-this.sprite.getOffsetX())),k.topthis.boundsSprite.bottom&&(this.sprite.y=this.boundsSprite.bottom-(this.sprite.height-this.sprite.getOffsetY()))}}}},60881:(k,B,U)=>{"use strict";U.d(B,{D:()=>F});class F{}F.A="A".charCodeAt(0),F.B="B".charCodeAt(0),F.C="C".charCodeAt(0),F.D="D".charCodeAt(0),F.E="E".charCodeAt(0),F.F="F".charCodeAt(0),F.G="G".charCodeAt(0),F.H="H".charCodeAt(0),F.I="I".charCodeAt(0),F.J="J".charCodeAt(0),F.K="K".charCodeAt(0),F.L="L".charCodeAt(0),F.M="M".charCodeAt(0),F.N="N".charCodeAt(0),F.O="O".charCodeAt(0),F.P="P".charCodeAt(0),F.Q="Q".charCodeAt(0),F.R="R".charCodeAt(0),F.S="S".charCodeAt(0),F.T="T".charCodeAt(0),F.U="U".charCodeAt(0),F.V="V".charCodeAt(0),F.W="W".charCodeAt(0),F.X="X".charCodeAt(0),F.Y="Y".charCodeAt(0),F.Z="Z".charCodeAt(0),F.ZERO="0".charCodeAt(0),F.ONE="1".charCodeAt(0),F.TWO="2".charCodeAt(0),F.THREE="3".charCodeAt(0),F.FOUR="4".charCodeAt(0),F.FIVE="5".charCodeAt(0),F.SIX="6".charCodeAt(0),F.SEVEN="7".charCodeAt(0),F.EIGHT="8".charCodeAt(0),F.NINE="9".charCodeAt(0),F.NUMPAD_0=96,F.NUMPAD_1=97,F.NUMPAD_2=98,F.NUMPAD_3=99,F.NUMPAD_4=100,F.NUMPAD_5=101,F.NUMPAD_6=102,F.NUMPAD_7=103,F.NUMPAD_8=104,F.NUMPAD_9=105,F.NUMPAD_MULTIPLY=106,F.NUMPAD_ADD=107,F.NUMPAD_ENTER=108,F.NUMPAD_SUBTRACT=109,F.NUMPAD_DECIMAL=110,F.NUMPAD_DIVIDE=111,F.F1=112,F.F2=113,F.F3=114,F.F4=115,F.F5=116,F.F6=117,F.F7=118,F.F8=119,F.F9=120,F.F10=121,F.F11=122,F.F12=123,F.F13=124,F.F14=125,F.F15=126,F.COLON=186,F.EQUALS=187,F.COMMA=188,F.UNDERSCORE=189,F.PERIOD=190,F.QUESTION_MARK=191,F.TILDE=192,F.OPEN_BRACKET=219,F.BACKWARD_SLASH=220,F.CLOSED_BRACKET=221,F.QUOTES=222,F.BACKSPACE=8,F.TAB=9,F.CLEAR=12,F.ENTER=13,F.SHIFT=16,F.CONTROL=17,F.ALT=18,F.CAPS_LOCK=20,F.ESC=27,F.SPACEBAR=32,F.PAGE_UP=33,F.PAGE_DOWN=34,F.END=35,F.HOME=36,F.LEFT=37,F.UP=38,F.RIGHT=39,F.DOWN=40,F.PLUS=43,F.MINUS=44,F.INSERT=45,F.DELETE=46,F.HELP=47,F.NUM_LOCK=144,F.BACK_QUOTE=192},49237:(k,B,U)=>{"use strict";U.d(B,{$:()=>H});var F=U(8674),G=U(62459),j=U(12808),$=U(76974);let H=class extends j.u{constructor(){super(...arguments),this.onClick=new G.HN0,this.onEnabledClick=new G.HN0,this.onDisabledClick=new G.HN0}onUp(k,B,U){if(!this.shouldDebounce()){if(this._lastClickTime=Date.now(),this.currentState===$.K.Down&&U){const k=[];k.push(this.onClick.dispatchAsync()),this.getButtonState()===$.K.Down?k.push(this.onEnabledClick.dispatchAsync()):this.getButtonState()===$.K.Disabled&&k.push(this.onDisabledClick.dispatchAsync()),this.awaitingListeners=!0,Promise.all(k).catch(G.RQr.createHandler("Rejected promise in Button.onUp")).finally((()=>{var k,B;null===(B=null===(k=this.gameObject)||void 0===k?void 0:k.isDestroyed)||void 0===B||B||(this.awaitingListeners=!1)}))}super.onUp(k,B,U)}}onDown(k,B){this.shouldDebounce()||super.onDown(k,B)}destroy(){this.onClick.dispose(),this.onEnabledClick.dispose(),this.onDisabledClick.dispose(),super.destroy()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onClick",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onEnabledClick",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onDisabledClick",void 0),H=(0,F.Cg)([(0,G.EVk)("Button",G.YH6.ui)],H)},12808:(k,B,U)=>{"use strict";U.d(B,{u:()=>V});var F=U(8674),G=U(62459),j=U(76974),$=U(56163),H=U(13930);class V extends $.t{constructor(){super(...arguments),this._transition=null,this._currentState=V.DEFAULT_STATE,this._isTransitionLocked=!1,this._awaitingListeners=!1,this._lastClickTime=0}get transition(){return this._transition}set awaitingListeners(k){this._awaitingListeners=k,this.applyCurrentState()}get currentState(){return this._currentState}set currentState(k){const B=this._currentState;this._currentState=k,this.onStateChanged(this._currentState,B)}postCreate(){super.postCreate(),this.applyCurrentState(),G.Aq$.isDefined(this._initialLockedState)&&this.lockState(this._initialLockedState)}update(){super.update(),this._delayedLockState&&(this.lockState(this._delayedLockState),this._delayedLockState=null)}shouldDebounce(){return this.debounceTimeMs>0&&Date.now(){"use strict";var F;U.d(B,{K:()=>F}),function(k){k[k.Over=0]="Over",k[k.Down=1]="Down",k[k.Up=2]="Up",k[k.Disabled=3]="Disabled"}(F||(F={}))},24519:(k,B,U)=>{"use strict";U.d(B,{v:()=>V});var F,G=U(8674),j=U(62459),$=U(76974),H=U(13930);let V=F=class extends H.e{constructor(){super(...arguments),this._upStateObject=null,this._downStateObject=null,this._overStateObject=null,this._disabledStateObject=null,this.currentStateObject=null,this.avoidEmptyStates=!1}postCreate(){super.postCreate(),this._upStateObject&&(this._upStateObject.active=!1),this._downStateObject&&(this._downStateObject.active=!1),this._overStateObject&&(this._overStateObject.active=!1),this._disabledStateObject&&(this._disabledStateObject.active=!1),this.currentStateObject&&(this.currentStateObject.active=!0)}update(){var k;super.update(),!(null===(k=this.currentStateObject)||void 0===k?void 0:k.activeInHierarchy)&&this.avoidEmptyStates&&(this.currentStateObject=this.getStateObject(F.DEFAULT_STATE),this.currentStateObject&&this.gameObject.onActiveInHierarchyChanged.dispatch())}setState(k){this.currentStateObject&&(this.currentStateObject.active=!1),this.currentStateObject=this.getStateObject(k),this.currentStateObject?this.currentStateObject.active=!0:this.avoidEmptyStates&&(this.currentStateObject=this.getStateObject(F.DEFAULT_STATE),this.currentStateObject&&(this.currentStateObject.active=!0))}getStateObject(k){switch(k){case $.K.Up:return this._upStateObject;case $.K.Down:return this._downStateObject;case $.K.Over:return this._overStateObject;case $.K.Disabled:return this._disabledStateObject;default:return null}}};V.DEFAULT_STATE=$.K.Up,(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],V.prototype,"_upStateObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],V.prototype,"_downStateObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],V.prototype,"_overStateObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],V.prototype,"_disabledStateObject",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],V.prototype,"avoidEmptyStates",void 0),V=F=(0,G.Cg)([(0,j.EVk)("GameObjectTransition",j.YH6.transition)],V)},56163:(k,B,U)=>{"use strict";U.d(B,{t:()=>$});var F=U(8674),G=U(62459),j=U(35120);let $=class extends G.y4o{constructor(){super(...arguments),this._collisionBox=null,this._root=null,this._interactableStartupValues={events:new G.sVA(null)},this._size=new G.or0}get inputEnabled(){return!!this._collisionBox&&this._collisionBox.inputEnabled}set inputEnabled(k){this._collisionBox?(this._collisionBox.inputEnabled=k,this.applyUseHandCursorSetting(this._collisionBox,this.useHandCursor)):this._interactableStartupValues.inputEnable=k}get useHandCursor(){return!(!this._collisionBox||!this._collisionBox.input)&&this._collisionBox.input.useHandCursor}set useHandCursor(k){this._collisionBox?this.applyUseHandCursorSetting(this._collisionBox,k):this._interactableStartupValues.useHandCursor=k}get onInputDown(){return this.getCurrentEvents().onInputDown}get onInputUp(){return this.getCurrentEvents().onInputUp}get onInputOver(){return this.getCurrentEvents().onInputOver}get onInputOut(){return this.getCurrentEvents().onInputOut}getCurrentEvents(){return this._collisionBox?this._collisionBox.events:this._interactableStartupValues.events}create(){super.create();const k=this.getCollisionBox().events;k.onInputDown.add(this.onDown,this),k.onInputUp.add(this.onUp,this),k.onInputOver.add(this.onOver,this),k.onInputOut.add(this.onOut,this),G.Aq$.isDefined(this._interactableStartupValues.inputEnable)&&(this.inputEnabled=this._interactableStartupValues.inputEnable),G.Aq$.isDefined(this._interactableStartupValues.useHandCursor)&&this.applyUseHandCursorSetting(this._collisionBox,this._interactableStartupValues.useHandCursor),this.updateCollisionBox(),this.destroyStartupValues()}setInputPriority(k){const B=this.getCollisionBox();B&&(B.input.priorityID=k)}isInputTarget(k){var B;return(null===(B=k.interactiveCandidates)||void 0===B?void 0:B.length)>0&&k.interactiveCandidates[k.interactiveCandidates.length-1].sprite===this.getCollisionBox()}destroy(){var k;if(this._collisionBox){const k=this._collisionBox.events;k&&(k.onInputDown.removeAll(this),k.onInputUp.removeAll(this),k.onInputOver.removeAll(this),k.onInputOut.removeAll(this)),this._collisionBox.destroy&&this._collisionBox.destroy()}this._collisionBox=null,this.destroyStartupValues(),null===(k=this._root)||void 0===k||k.destroy(),super.destroy()}destroyStartupValues(){this._interactableStartupValues&&(this._interactableStartupValues.events&&this._interactableStartupValues.events.destroy(),this._interactableStartupValues.events=null,this._interactableStartupValues=null)}getDimensions(){const k=this._collisionBox&&!this._collisionBox._destroyed,B=k?this._collisionBox.width:0,U=k?this._collisionBox.height:0;return this._size.setTo(B,U),this._size}getCollisionBox(k=!0){return k&&!this._collisionBox&&this.createInternalCollisionBox(),this._collisionBox}onDown(k,B){}onUp(k,B,U){}onOver(k,B){}onOut(k,B){}applyUseHandCursorSetting(k,B){(null==k?void 0:k.input)&&(k.input.useHandCursor=B)}createInternalCollisionBox(){var k;this._root=j.q.instance.game.add.group(void 0,null===(k=this.gameObject)||void 0===k?void 0:k.name),this.setRootContainer(this._root),this._collisionBox=j.q.instance.game.add.sprite(0,0,"","",this._root);const B=this._collisionBox.events;this._interactableStartupValues.events.parent=this._collisionBox.events.parent,this._collisionBox.events=this._interactableStartupValues.events,this._interactableStartupValues.events=B,this._collisionBox.width=10,this._collisionBox.height=10,this._collisionBox.alpha=0,this._collisionBox.inputEnabled=!0}updateCollisionBox(){const k=this.getCollisionBox();if(this.GameObject.legacyTransform){const B=this.GameObject.legacyTransform;k.width=B.width,k.height=B.height}k.inputEnabled=this.inputEnabled,this.applyUseHandCursorSetting(k,this.useHandCursor)}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean),(0,F.Sn)("design:paramtypes",[Boolean])],$.prototype,"inputEnabled",null),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean),(0,F.Sn)("design:paramtypes",[Boolean])],$.prototype,"useHandCursor",null),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0),(0,F.Sn)("design:paramtypes",[])],$.prototype,"onInputDown",null),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0),(0,F.Sn)("design:paramtypes",[])],$.prototype,"onInputUp",null),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0),(0,F.Sn)("design:paramtypes",[])],$.prototype,"onInputOver",null),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0),(0,F.Sn)("design:paramtypes",[])],$.prototype,"onInputOut",null),$=(0,F.Cg)([(0,G.EVk)("Interactable",G.YH6.input)],$)},54422:(k,B,U)=>{"use strict";U.d(B,{E:()=>$});var F=U(8674),G=U(62459),j=U(35120);let $=class extends G.uAl{constructor(){super(...arguments),this._enableContinuousPress=!1,this._onKeyDown=new G.HN0,this._isEnabled=!0}get onKeyDown(){return this._onKeyDown}create(){super.create(),G.Aq$.isDefined(this._keyCode)&&this.initialize(this._keyCode,null,this._enableContinuousPress)}initialize(k,B=null,U=!1){this._keyCode=k,B&&this._onKeyDown.add(B),this._onKeyHandler=()=>{this._isEnabled&&this.GameObject.active&&this._onKeyDown.dispatch()},this._key=j.q.instance.game.input.keyboard.addKey(this._keyCode),this._key.onDown.add(this._onKeyHandler,this),this._enableContinuousPress=U,this._enableContinuousPress&&(this.update=()=>{this._key.isDown&&this._onKeyHandler()})}setEnabled(k){this._isEnabled=k}destroy(){this._key&&(this._key.onDown.remove(this._onKeyHandler,this),this._onKeyHandler=null,this._onKeyDown.dispose()),super.destroy()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],$.prototype,"_keyCode",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_enableContinuousPress",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"_onKeyDown",void 0),$=(0,F.Cg)([(0,G.EVk)("KeyListener",G.YH6.input)],$)},83133:(k,B,U)=>{"use strict";U.d(B,{l:()=>V});var F=U(8674),G=U(62459),j=U(11647),$=U(12808),H=U(76974);let V=class extends((0,j.o)($.u)){constructor(){super(...arguments),this._autoAddToParentGroup=!1,this.onSelected=this.createTidySignal(),this.onSelectedStatusChanged=this.createTidySignal(),this.onUnselected=this.createTidySignal(),this.onLockedClick=this.createTidySignal(),this.onSelectedLockedClick=this.createTidySignal(),this._selected=!1,this._isSelectionLocked=!1}get isSelectionLocked(){return this._isSelectionLocked}set isSelectionLocked(k){this._isSelectionLocked=k}setSelected(k){this._selected=k,this.onSelectedStatusChanged.dispatch(k),this.applyCurrentState()}isSelected(){return this._selected}onUp(k,B,U){this.shouldDebounce()||(this._lastClickTime=Date.now(),this.currentState===H.K.Down&&U&&(this._isSelectionLocked?this.onSelectedLockedClick.dispatch():(this.isStateLocked()&&this.onLockedClick.dispatch(),this.isStateLocked()&&this.getLockedState()===H.K.Disabled||(this.dispatchFromReverseState(),this.setSelected(!this.isSelected())))),super.onUp(k,B,U))}dispatchFromCurrentState(){this._isSelectionLocked?this.onSelectedLockedClick.dispatch():this._selected?this.onSelected.dispatch():this.onUnselected.dispatch()}dispatchFromReverseState(){this._selected?this.onUnselected.dispatch():this.onSelected.dispatch()}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_autoAddToParentGroup",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onSelected",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onSelectedStatusChanged",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onUnselected",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onLockedClick",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onSelectedLockedClick",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_selected",void 0),V=(0,F.Cg)([(0,G.EVk)("Toggle",G.YH6.ui)],V)},94566:(k,B,U)=>{"use strict";U.d(B,{O:()=>H});var F=U(8674),G=U(62459),j=U(11647),$=U(83133);let H=class extends((0,j.o)(G.uAl)){constructor(){super(...arguments),this.autoAddChildren=!1,this.allowMultiSelect=!1,this.allowNoSelection=!1,this.toggleObjects=[],this.defaultIndex=[],this.onSelectedLockedClick=this.createTidySignal(),this.onSelectedChangedByClick=this.createTidySignal()}postCreate(){super.postCreate(),this.autoAddChildren&&this.addListenerToSignal(this.gameObject.onChildAdded,(k=>this.onChildAdded(k)));const k=0===this.defaultIndex.length||this.defaultIndex[0]>this.toggleObjects.length-1;for(let B=0;Bthis.listenToItem(k)))}onChildAdded(k){const B=k.findComponentInChildren($.l,!0);B&&this.addSelectable(B)}listenToItem(k){this.addListenerToSignal(k.onSelected,(()=>this.clicked(k))),this.addListenerToSignal(k.onSelectedLockedClick,(()=>this.clickLocked(k)))}clicked(k){if(!this.allowMultiSelect)for(let B=0;Bthis.toggleObjects[k])))}setSelected(...k){k.length>1&&!this.allowMultiSelect&&k.splice(1);for(const B of this.toggleObjects){const U=k.includes(B);U?B.isSelectionLocked=!0:this.setItemSelected(B,U)}}getToggles(){return this.toggleObjects}setDefaultSelectionIndex(...k){k.length>1&&!this.allowMultiSelect&&k.splice(1),this.defaultIndex=k}removeSelectable(k){const B=this.toggleObjects.indexOf(k);-1!==B&&(k.onSelected.remove(this.clicked,this),k.onSelectedLockedClick.remove(this.clickLocked,this),this.toggleObjects.splice(B,1))}clearSelectables(){this.toggleObjects.forEach((k=>this.removeSelectable(k)))}setItemSelected(k,B){k.setSelected(B),k.isSelectionLocked=!this.allowMultiSelect&&B}setItemSelectedByIndex(k,B){this.setItemSelected(this.toggleObjects[k],B)}destroy(){super.destroy()}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"autoAddChildren",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"allowMultiSelect",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"allowNoSelection",void 0),(0,F.Cg)([(0,G.MnK)($.l),(0,G.SZi)(),(0,F.Sn)("design:type",Array)],H.prototype,"toggleObjects",void 0),(0,F.Cg)([(0,G.g11)(),(0,G.SZi)(),(0,F.Sn)("design:type",Array)],H.prototype,"defaultIndex",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onSelectedLockedClick",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onSelectedChangedByClick",void 0),H=(0,F.Cg)([(0,G.EVk)("ToggleGroup",G.YH6.ui)],H)},13930:(k,B,U)=>{"use strict";U.d(B,{e:()=>j});var F=U(8674),G=U(62459);let j=class extends G.uAl{setState(k){}};j=(0,F.Cg)([(0,G.EVk)("Transition (abstract)")],j)},47716:(k,B,U)=>{"use strict";U.d(B,{H:()=>$});var F=U(8674),G=U(62459),j=U(11472);let $=class extends j.B{constructor(){super(...arguments),this._dataSource=null,this._createSection=()=>{const k=new G._mx;return k.addComponent(G.K16),k},this._createCell=()=>{const k=new G._mx;return k.addComponent(G.K16),k},this._numColumns=2,this._columnBuffer=15,this._sectionBuffer=15,this._rowHeight=115,this._sectionHeight=50}get dataSource(){return this._dataSource}set dataSource(k){this._dataSource=k}set createSection(k){this._createSection=k}set createCell(k){this._createCell=k}set numColumns(k){this._numColumns=k}get numColumns(){return this._numColumns}set columnBuffer(k){this._columnBuffer=k}get columnBuffer(){return this._columnBuffer}set sectionBuffer(k){this._sectionBuffer=k}get sectionBuffer(){return this._sectionBuffer}set rowHeight(k){this._rowHeight=k}get rowHeight(){return this._rowHeight}set sectionHeight(k){this._sectionHeight=k}get sectionHeight(){return this._sectionHeight}populateContentView(){super.populateContentView();let k=-(this._sectionHeight+this._sectionBuffer);for(let B=0;B{"use strict";U.d(B,{$:()=>W});var F,G=U(8674),j=U(62459),$=U(35120),H=U(5269),V=U(56163);let W=F=class extends V.t{constructor(){super(...arguments),this._pressed=!1,this._direction=H.H.Vertical,this._nib=null,this.resizingEnabled=!1,this.minNibSize=F.DEFAULT_NIB_SIZE,this.maxNibSize=F.DEFAULT_NIB_SIZE,this._scrollView=null}set direction(k){this._direction=k}get direction(){return this._direction}set horizontal(k){k&&(this._direction=H.H.Horizontal)}create(){super.create(),$.q.instance.game.input.addMoveCallback(this.moveNib,this)}initialize(k,B){this._nib=k||this._nib,this._scrollView=B||this._scrollView}onDown(k,B){this._pressed=!0,this.moveNib(B,B.x,B.y)}onUp(k,B,U){this._pressed=!1,this._scrollView.scrollReleaseListener.dispatch(this.getPercent())}moveNib(k,B,U){this._pressed&&(this.direction===H.H.Vertical?this._nib.legacyTransform.y=U-this.getCollisionBox().worldTransform.ty-this._nib.legacyTransform.height/2:this._nib.legacyTransform.x=B-this.getCollisionBox().worldTransform.tx-this._nib.legacyTransform.width/2,this.limitMovement(),this._scrollView.scrollBarListener.dispatch(this.getPercent(),this._direction))}limitMovement(){this.direction===H.H.Vertical?this._nib.legacyTransform.ythis.maxNibY()&&(this._nib.legacyTransform.y=this.maxNibY()):this._nib.legacyTransform.xthis.maxNibX()&&(this._nib.legacyTransform.x=this.maxNibX())}scrollToPercent(k){this.direction===H.H.Vertical?this._nib.legacyTransform.y=-this.maxNibY()*k:this._nib.legacyTransform.x=this.maxNibX()*k,this.limitMovement()}getPercent(){return this.direction===H.H.Vertical?this._nib.legacyTransform.y/(this.getCollisionBox().height-this._nib.legacyTransform.height):this._nib.legacyTransform.x/(this.getCollisionBox().width-this._nib.legacyTransform.width)}setNibSize(k){if(!this.resizingEnabled)return;const B=this._nib.legacyTransform.scaleX,U=this._nib.legacyTransform.scaleY,F=j.cj9.clamp((this.maxNibSize-this.minNibSize)*k+this.minNibSize,this.minNibSize,this.maxNibSize);this.direction===H.H.Vertical?this._nib.legacyTransform.height=F:this._nib.legacyTransform.width=F,this.limitMovement(),this._nib.findComponent(j.V09).resetImages(),this._nib.legacyTransform.scaleX=B,this._nib.legacyTransform.scaleY=U}maxNibY(){return this.getCollisionBox().height+this.getCollisionBox().y-this._nib.legacyTransform.height}maxNibX(){return this.getCollisionBox().width+this.getCollisionBox().x-this._nib.legacyTransform.width}destroy(){$.q.instance.game.input.deleteMoveCallback(this.moveNib,this),super.destroy()}};W.DEFAULT_NIB_SIZE=87,(0,G.Cg)([(0,j.vkK)(),(0,j.nKb)("isHorizontal"),(0,G.Sn)("design:type",Boolean),(0,G.Sn)("design:paramtypes",[Boolean])],W.prototype,"horizontal",null),(0,G.Cg)([(0,j.x4W)("nib"),(0,G.Sn)("design:type",j._mx)],W.prototype,"_nib",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W.prototype,"resizingEnabled",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],W.prototype,"minNibSize",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],W.prototype,"maxNibSize",void 0),(0,G.Cg)([(0,j.x4W)("scrollView"),(0,G.Sn)("design:type",Function)],W.prototype,"_scrollView",void 0),W=F=(0,G.Cg)([(0,j.EVk)("ScrollBar",j.YH6.ui)],W)},11472:(k,B,U)=>{"use strict";U.d(B,{B:()=>Y});var F,G=U(8674),j=U(62459),$=U(95891),H=U(68910),V=U(35120),W=U(5269),q=U(56163),K=U(12420),z=U(89400);let Y=F=class extends q.t{get direction(){return this._direction}set vertical(k){this._direction=k?this._direction|W.H.Vertical:this._direction&W.H.Vertical}set horizontal(k){this._direction=k?this._direction|W.H.Horizontal:this._direction&W.H.Horizontal}constructor(){super(),this._direction=W.H.None,this.isKinematic=!0,this.verticalScrollBar=null,this.horizontalScrollBar=null,this.contentView=null,this.wheelStep=40,this.wheelOnOver=!0,this.allowMouseWheel=!0,this.allowTouch=!0,this._readyForInput=!1,this.scrollBarListener=new j.HN0,this.scrollReleaseListener=new j.HN0,this._pressedDown=!1,this._timestamp=0,this._startX=0,this._startY=0,this._velocityX=0,this._velocityY=0,this._velocityWheel=0,this._mouseWheelCallback=null,this._verticalScrollingEnabled=!0,this._horizontalScrollingEnabled=!0,this._mouseOverCell=null,this._mouseDownCell=null,this._mouseDragCell=null,this._previousContentViewWidth=0,this._previousContentViewHeight=0,this._lastSimulateTime=0,this._lastSimulatePoint=new H.Point,this._shouldSimulateInUpdate=!1,this.scrollBarListener.add(this.scrollToPercent.bind(this),this)}create(){super.create();const k=V.q.instance.game.add.graphics(0,0,this.GameObject.legacyTransform.group);k.beginFill(0),k.drawRect(0,0,this.GameObject.legacyTransform.width,this.GameObject.legacyTransform.height),k.inputEnabled=!1,this.GameObject.legacyTransform.group.mask=k,this.updateScrollEnabled(W.H.Horizontal),this.updateScrollEnabled(W.H.Vertical),this._shouldSimulateInUpdate=j.o5U.isDesktop()}populateContentView(){this.contentView||(this.contentView=new j._mx(this.GameObject),this.contentView.addComponent(j.K16))}firstUpdate(){super.firstUpdate(),V.q.instance.game.input.addMoveCallback(this.onMoveListener,this),this._mouseWheelCallback=this.mouseWheelListener.bind(this),V.q.instance.game.input.mouse.addMouseWheelCallback(this._mouseWheelCallback),this._readyForInput=!0}onMoveListener(k,B,U){this._readyForInput&&this.allowTouch&&this.moveCanvas(k,B,U)}mouseWheelListener(k){this._readyForInput&&this.allowMouseWheel&&this.mouseWheel(k)}update(){if(super.update(),this.isKinematic&&(this._direction&W.H.Vertical)===W.H.Vertical&&Math.abs(this._velocityWheel)>F.velocityThreshold&&(this.contentView.legacyTransform.y+=this._velocityWheel,this.limitMovement(),this._velocityWheel*=F.deceleration),this._shouldSimulateInUpdate){const k=V.q.instance.game.input.activePointer;Date.now()-this._lastSimulateTime>F.SIMULATE_DELAY_MS&&(this._lastSimulatePoint.x!==k.x||this._lastSimulatePoint.y!==k.y)&&this.simulateMouseHover(k)}this.horizontalScrollBar&&this._previousContentViewWidth!==this.contentView.legacyTransform.width&&(this._previousContentViewWidth=this.contentView.legacyTransform.width,this.horizontalScrollBar.setNibSize(this.getCollisionBox().width/this._previousContentViewWidth),this.updateScrollEnabled(W.H.Horizontal)),this.verticalScrollBar&&this._previousContentViewHeight!==this.contentView.legacyTransform.height&&(this._previousContentViewHeight=this.contentView.legacyTransform.height,this.verticalScrollBar.setNibSize(this.getCollisionBox().height/this._previousContentViewHeight),this.updateScrollEnabled(W.H.Vertical))}simulateMouseHover(k,B){var U,F;if(this._lastSimulateTime=Date.now(),this._lastSimulatePoint.x=k.x,this._lastSimulatePoint.y=k.y,!this.isInputTarget(k))return null===(U=this._mouseOverCell)||void 0===U||U.onOut.dispatch(k),this._mouseOverCell=null,void(this._mouseDownCell=null);for(const G of B||this.contentView.findComponentsInChildren(z.B)){if(!G.GameObject.active){G===this._mouseOverCell&&(this._mouseOverCell=null,this._mouseDownCell=null);continue}const B=this.isPointerOverCell(k,G);if(B&&this._mouseOverCell===G)return;if(B&&this._mouseOverCell!==G)return null===(F=this._mouseOverCell)||void 0===F||F.onOut.dispatch(k),this._mouseOverCell=G,void G.onOver.dispatch(k);B||this._mouseOverCell!==G||(G.onOut.dispatch(k),this._mouseOverCell=null,this._mouseDownCell=null)}}onDown(k,B){var U;this._startX=B.x,this._startY=B.y,this._pressedDown=!0,this._velocityWheel=0,this._timestamp=Date.now(),this._velocityY=this._velocityX=0,(null===(U=this._mouseOverCell)||void 0===U?void 0:U.GameObject)&&this.isPointerOverCell(B,this._mouseOverCell)||this.simulateMouseHover(B),this._mouseOverCell&&(this._mouseOverCell.onDown.dispatch(B),this._mouseDownCell=this._mouseOverCell)}onUp(k,B,U){var F;if(this._pressedDown=!1,this._mouseDownCell)return this._mouseDownCell.onClick.dispatch(),void(this._mouseDownCell=null);this._mouseDragCell&&(this._mouseDragCell.onUp.dispatch(B),this._mouseDragCell=null),this.scrollReleaseListener.dispatch(this.getPercent(this.direction)),null===(F=this._mouseOverCell)||void 0===F||F.onOver.dispatch(B)}moveCanvas(k,B,U){var G;if(this._pressedDown&&this._mouseDownCell&&(this._mouseDragCell=this._mouseDownCell),this.shouldScroll(this.direction)&&this._pressedDown){const j=Date.now(),$=j-this._timestamp;this._timestamp=j;let H=0;(this._direction&W.H.Horizontal)===W.H.Horizontal&&(H=B-this._startX,this._startX=B,this._velocityX=H*F.displacement/($+1)*F.initialAcceleration+this._velocityX*F.finalAcceleration,this.contentView.legacyTransform.x+=H,this.limitMovement()),(this._direction&W.H.Vertical)===W.H.Vertical&&(H=U-this._startY,this._startY=U,this._velocityY=H*F.displacement/($+1)*F.initialAcceleration+this._velocityY*F.finalAcceleration,this.contentView.legacyTransform.y+=H,this.limitMovement()),this._mouseDownCell&&!this.withinTapThreshold(k,this.direction)&&this.shouldScroll(this.direction)&&(null===(G=this._mouseOverCell)||void 0===G||G.onOver.dispatch(k),this._mouseDownCell=null)}}withinTapThreshold(k,B){return B===W.H.Horizontal?Math.abs(k.x-k.positionDown.x)<=F.tapThreshold:Math.abs(k.y-k.positionDown.y)<=F.tapThreshold}mouseWheel(k){if(k.preventDefault(),!this.shouldScroll(this.direction))return;const B=this.isInputTarget(V.q.instance.game.input.activePointer),U=this.horizontalScrollBar&&this.horizontalScrollBar.isInputTarget(V.q.instance.game.input.activePointer)||this.verticalScrollBar&&this.verticalScrollBar.isInputTarget(V.q.instance.game.input.activePointer);if(this.wheelOnOver&&!B&&!U)return;const F=120*V.q.instance.game.input.mouse.wheelDelta/this.wheelStep;this.isKinematic?this._velocityWheel+=F:(this.contentView.legacyTransform.y+=F,this.limitMovement())}limitMovement(){const k=this.getCollisionBox();if((this._direction&W.H.Vertical)===W.H.Vertical){let B=this.contentView.legacyTransform.y;const U=this.contentView.legacyTransform.height,F=$.last(this.contentView.children),G=F?j.Htv.getHeight(F):0;B>k.y&&(B=k.y),B<-(U-k.height-k.y+G)&&(B=U>k.height?-(U-k.height-k.y+G):k.y),this.contentView.legacyTransform.y=B,this.verticalScrollBar&&this.verticalScrollBar.scrollToPercent(B/(U-k.height-k.y+G))}if((this._direction&W.H.Horizontal)===W.H.Horizontal){let B=this.contentView.legacyTransform.x;const U=this.contentView.legacyTransform.width,F=$.last(this.contentView.children),G=F?j.Htv.getWidth(F):0;B>k.x&&(B=k.x),B<-(U-k.width-k.x+G)&&(B=U>k.width?-(U-k.width-k.x+G):k.x),this.contentView.legacyTransform.x=B,this.horizontalScrollBar&&this.horizontalScrollBar.scrollToPercent(B/(U-k.width-k.x+G))}}getPercent(k){return k===W.H.Horizontal&&this.horizontalScrollBar?this.horizontalScrollBar.getPercent():k===W.H.Vertical&&this.verticalScrollBar?this.verticalScrollBar.getPercent():0}scrollToPercent(k,B){if(!this.shouldScroll(B))return;const U=this.getCollisionBox(),F=$.last(this.contentView.children),G=(k,B,U,F,G)=>-G*(k-B-U+F);B===W.H.Vertical?(this.contentView.legacyTransform.y=G(this.contentView.legacyTransform.height,U.height,U.y,F?j.Htv.getHeight(F):0,k),this._velocityWheel=0):this.contentView.legacyTransform.x=G(this.contentView.legacyTransform.width,U.width,U.x,F?j.Htv.getWidth(F):0,k),this.limitMovement()}scrollToPercentTween(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this.shouldScroll(B))return;this.tweenCleanup();const F=this.getPercent(B);if(0===k-F)return;const G={value:F};this._scrollTween=V.q.instance.game.tweens.create(G,this),this._scrollTween.onUpdate.add((()=>this.scrollToPercent(G.value,B)));const $=B===W.H.Vertical?this.contentView.legacyTransform.height:this.contentView.legacyTransform.width,H=1e3*U/(1e3*U/$)*k;this._scrollTween.to({value:k},H,j.GS3.Quadratic.Out).start(),yield this._scrollTween.onTweenComplete.asPromise().catch((()=>j.RQr.createHandler("[ScrollView.scrollToPercentTween] Error scrolling to percent"))),this.tweenCleanup()}))}scrollByPixels(k,B){this.shouldScroll(B)&&(B===W.H.Vertical?this.contentView.legacyTransform.y+=k:this.contentView.legacyTransform.x+=k,this.limitMovement())}updateScrollEnabled(k){this.contentView&&(k===W.H.Vertical&&(this._verticalScrollingEnabled=this.contentView.legacyTransform.height>this.getCollisionBox().height,this.verticalScrollBar&&(this.verticalScrollBar.GameObject.legacyTransform.group.visible=this._verticalScrollingEnabled),this._verticalScrollingEnabled||(this._velocityWheel=0)),k===W.H.Horizontal&&(this._horizontalScrollingEnabled=this.contentView.legacyTransform.width>this.getCollisionBox().width,this.horizontalScrollBar&&(this.horizontalScrollBar.GameObject.legacyTransform.group.visible=this._horizontalScrollingEnabled)))}shouldScroll(k){return k===W.H.Vertical?this._verticalScrollingEnabled:k===W.H.Horizontal?this._horizontalScrollingEnabled:void 0}isPointerOverCell(k,B){const U=B.GameObject.legacyTransform;return j.M_G.containsRaw(U.group.getGlobalPosition().x,U.group.getGlobalPosition().y,U.width,U.height,k.x,k.y)}destroy(){this.tweenCleanup(),this.scrollBarListener.dispose(),this.scrollReleaseListener.dispose(),this.GameObject.legacyTransform.group.mask instanceof H.Container&&this.GameObject.legacyTransform.group.mask.destroy(),this.GameObject.legacyTransform.group.mask=null,V.q.instance.game.input.deleteMoveCallback(this.onMoveListener,this),V.q.instance.game.input.mouse.removeMouseWheelCallback(this._mouseWheelCallback),this._mouseWheelCallback=null,super.destroy()}tweenCleanup(){j.Aq$.isDefined(this._scrollTween)&&(this._scrollTween.destroy(),this._scrollTween=null)}};Y.deceleration=.95,Y.velocityThreshold=.1,Y.tapThreshold=5,Y.initialAcceleration=.8,Y.finalAcceleration=.8,Y.displacement=1e3,Y.SIMULATE_DELAY_MS=100,(0,G.Cg)([(0,j.vkK)(),(0,j.Lr6)(0),(0,j.nKb)("verticalScrolling"),(0,G.Sn)("design:type",Boolean),(0,G.Sn)("design:paramtypes",[Boolean])],Y.prototype,"vertical",null),(0,G.Cg)([(0,j.vkK)(),(0,j.Lr6)(0),(0,j.nKb)("horizontalScrolling"),(0,G.Sn)("design:type",Boolean),(0,G.Sn)("design:paramtypes",[Boolean])],Y.prototype,"horizontal",null),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Y.prototype,"isKinematic",void 0),(0,G.Cg)([(0,j.MnK)(K.$),(0,G.Sn)("design:type",K.$)],Y.prototype,"verticalScrollBar",void 0),(0,G.Cg)([(0,j.MnK)(K.$),(0,G.Sn)("design:type",K.$)],Y.prototype,"horizontalScrollBar",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Y.prototype,"contentView",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Y.prototype,"wheelStep",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Y.prototype,"wheelOnOver",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Y.prototype,"allowMouseWheel",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Y.prototype,"allowTouch",void 0),Y=F=(0,G.Cg)([(0,j.EVk)("ScrollView",j.YH6.ui),(0,G.Sn)("design:paramtypes",[])],Y)},53153:(k,B,U)=>{"use strict";U.d(B,{y:()=>$});var F=U(62459),G=U(76974),j=U(89400);class $ extends j.B{constructor(){super(...arguments),this._base=null}postCreate(){super.postCreate(),this.setState(this._base.currentState),this.onOver.add((()=>{this.setState(G.K.Over)})),this.onOut.add((()=>{this.setState(G.K.Up)})),this.onDown.add((()=>{this.setState(G.K.Down)}))}setState(k,B=!1){!B&&this.isDisabled()||(this._base.unlockState(),this._base.lockState(k))}setDisabled(k){this.setState(k?G.K.Disabled:G.K.Up,!0)}isDisabled(){return this._base.getButtonState()===G.K.Disabled}updateContentView(k){this.onClick.add((()=>{k.callback()}))}setText(k){this._base.GameObject.findComponentsInChildren(F.EYj).forEach((B=>B.text=k))}}},89400:(k,B,U)=>{"use strict";U.d(B,{B:()=>j});var F=U(8674),G=U(62459);class j extends G.uAl{constructor(){super(...arguments),this._contentView=null,this.onClick=new G.HN0,this.onOver=new G.HN0,this.onOut=new G.HN0,this.onDown=new G.HN0,this.onUp=new G.HN0}destroy(){this.onClick.dispose(),this.onOver.dispose(),this.onOut.dispose(),this.onDown.dispose(),this.onUp.dispose(),super.destroy()}}(0,F.Cg)([(0,G.x4W)("contentView"),(0,F.Sn)("design:type",G._mx)],j.prototype,"_contentView",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"onClick",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"onOver",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"onOut",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"onDown",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"onUp",void 0)},76501:(k,B,U)=>{"use strict";U.d(B,{W:()=>j});var F=U(89400),G=U(33961);class j{get data(){return this._data}set data(k){this._data=k}constructor(k=[]){this._data=[],this._data=k}numberOfItemsInSection(k){return this._data[k]?this._data[k].cells.length:0}titleForSection(k){return this._data[k]?this._data[k].title:""}updateSection(k,B){const U=B.findComponentInChildren(G.C);return U&&U.updateContentView(this._data[k]),B}updateCellAt(k,B,U){const G=U.findComponentInChildren(F.B);return G&&G.updateContentView(this._data[k].cells[B]),U}}},33961:(k,B,U)=>{"use strict";U.d(B,{C:()=>j});var F=U(8674),G=U(62459);class j extends G.uAl{constructor(){super(...arguments),this._contentView=null}}(0,F.Cg)([(0,G.x4W)("contentView"),(0,F.Sn)("design:type",G._mx)],j.prototype,"_contentView",void 0)},25456:(k,B,U)=>{"use strict";U.d(B,{l:()=>H});var F=U(8674),G=U(62459),j=U(83133),$=U(53153);let H=class extends $.y{constructor(){super(...arguments),this._toggle=null}postDeserialize(){super.postDeserialize(),this._base=this._toggle}create(){super.create(),this.onClick.add((()=>{this.isDisabled()||this.doToggle()}))}setSelected(k){this._toggle.isSelectionLocked||(this._toggle.setSelected(k),this.setState(this._toggle.currentState))}lockToggle(k){this._toggle.isSelectionLocked=k}isSelected(){return this._toggle.isSelected()}doToggle(){this.setSelected(!this.isSelected())}};(0,F.Cg)([(0,G.MnK)(j.l),(0,F.Sn)("design:type",j.l)],H.prototype,"_toggle",void 0),H=(0,F.Cg)([(0,G.EVk)("ScrollViewToggle")],H)},77801:(k,B,U)=>{"use strict";U.d(B,{f:()=>H});var F=U(8674),G=U(62459),j=U(73797),$=U(35120);let H=class extends G.uAl{constructor(){super(...arguments),this._touching=!1,this.onStartTouching=new G.HN0,this.onTouching=new G.HN0,this.onStopTouching=new G.HN0}create(){super.create();const k=$.q.instance.game.broadcaster;k.addAppListener(j.pm.MovePlayer,this.pathTo.bind(this),this),k.addAppListener(j.pm.StopPlayer,this.stopMovement.bind(this),this),k.addAppListener(j.pm.GetTarget,this.getPosition.bind(this),this)}destroy(){const k=$.q.instance.game.broadcaster;k.removeAppListener(j.pm.MovePlayer,this),k.removeAppListener(j.pm.StopPlayer,this),k.removeAppListener(j.pm.GetTarget,this),this.onStartTouching.dispose(),this.onStopTouching.dispose(),this.onTouching.dispose(),super.destroy()}update(){if(super.update(),this._touching){const k=$.q.instance.game.input.activePointer;if(k.isDown){const B={x:k.x,y:k.y},U=G.i7d.main;if(U){const k=U.viewportSize,F=U.GameObject.transform.worldPosition;B.x+=F.x-k.getHalfWidth(),B.y+=F.y-k.getHalfHeight()}B.x=Math.round(B.x),B.y=Math.round(B.y);const F=this.pathTo(B.x,B.y);F&&this._touchStarted?this.onTouching.dispatch(B):F&&!this._touchStarted&&(this._touchStarted=!0,this.onStartTouching.dispatch())}else this.stopTouching()}}startMovement(k){return this._touching=!0,!!this.pathTo(k.x,k.y)&&(this._touchStarted=!0,this.onStartTouching.dispatch(),!0)}pathTo(k,B){const U=this._pathfinder.findPath(this._pathLocomotion.GameObject.transform.worldPosition,{x:k,y:B});return!!U&&(this._pathLocomotion.setPath(U),!0)}stopMovement(){this._pathLocomotion.stop(),this.stopTouching()}stopTouching(){this._touching=!1,this._touchStarted&&(this.onStopTouching.dispatch(),this._touchStarted=!1)}getPosition(){return this._pathLocomotion.GameObject.transform.worldPosition}};(0,F.Cg)([(0,G.MnK)(G.KhP),(0,F.Sn)("design:type",G.KhP)],H.prototype,"_pathLocomotion",void 0),(0,F.Cg)([(0,G.Cdj)("Pathfinder"),(0,F.Sn)("design:type",G.wGs)],H.prototype,"_pathfinder",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onStartTouching",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onTouching",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onStopTouching",void 0),H=(0,F.Cg)([(0,G.S1F)(),(0,G.EVk)("ClickAndHoldPathfinder",G.YH6.input)],H)},18741:(k,B,U)=>{"use strict";U.d(B,{f:()=>F});class F{static setCanvasPool(k){this.canvasPool=k}static create(k,B,U){return this.canvasPool.create(k,B,U)}static getFirst(){return this.canvasPool.getFirst()}static remove(k){this.canvasPool.remove(k)}static removeByCanvas(k){this.canvasPool.removeByCanvas(k)}static getTotal(){return this.canvasPool.getTotal()}static getFree(){return this.canvasPool.getFree()}static log(){console.log("CanvasPool: %s used, %s free, %s total",this.getTotal(),this.getFree(),this.canvasPool.length)}}F.setCanvasPool(new class{constructor(){this.pool=[]}get length(){return this.pool.length}create(k,B=1,U=1){const F=this.getFirst();let G;return-1===F?(G=document.createElement("canvas"),this.pool.push({parent:k,canvas:G})):(this.pool[F].parent=k,G=this.pool[F].canvas),G.height=U,G.width=B,G}remove(k){this.pool.forEach((B=>{B.parent===k&&(B.parent=null,B.canvas.width=1,B.canvas.height=1)}))}removeByCanvas(k){this.pool.forEach((B=>{B.canvas===k&&(B.parent=null,B.canvas.width=1,B.canvas.height=1)}))}getTotal(){return this.pool.filter((k=>k.parent)).length}getFree(){return this.pool.filter((k=>!k.parent)).length}getFirst(){const k=this.pool;for(let B=0;B{"use strict";U.d(B,{N:()=>j});var F=U(68910),G=U(35120);class j extends F.Container{get stage(){return G.q.instance.game.stage}get worldPosition(){return this.getGlobalPosition()}get worldScale(){return this.transform.scale}set worldScale(k){this.transform.scale.set(k.x,k.y)}get worldRotation(){return this.transform.rotation}set worldRotation(k){this.transform.rotation=k}constructor(){super()}bringChildToTop(k){this.setChildIndex(k,this.children.length-1)}sendChildToBack(k){this.setChildIndex(k,0)}static bringChildToTop(k,B){k.setChildIndex(B,k.children.length-1)}static sendChildToBack(k,B){k.setChildIndex(B,0)}destroy(k={children:!0}){super.destroy(k)}}},82366:(k,B,U)=>{"use strict";U.d(B,{A:()=>V});var F=U(62459),G=U(68910),j=U(35120),$=U(74560),H=U(64835);class V extends G.Graphics{get inputEnabled(){return $.m.isInputEnabled(this)}set inputEnabled(k){$.m.setInputEnabled(this,k,this)}get left(){return F.J6z.getLeft(this)}set left(k){F.J6z.setLeft(this,k)}getOffsetX(){return F.J6z.getOffsetX(this.getBounds())}getOffsetY(){return F.J6z.getOffsetY(this.getBounds())}get right(){return F.J6z.getRight(this)}set right(k){F.J6z.setRight(this,k)}get offsetX(){return F.J6z.getOffsetX(this)}set offsetX(k){F.VyI.log("Cannot set offset of x.",F.$bb.Warning)}get offsetY(){return F.J6z.getOffsetY(this)}set offsetY(k){F.VyI.log("Cannot set offset of y.",F.$bb.Warning)}get top(){return F.J6z.getTop(this)}set top(k){F.J6z.setTop(this,k)}get bottom(){return F.J6z.getBottom(this)}set bottom(k){F.J6z.setBottom(this,k)}get centerX(){return F.J6z.getCenterX(this)}set centerX(k){F.J6z.setCenterX(this,k)}get centerY(){return F.J6z.getCenterY(this)}set centerY(k){F.J6z.setCenterY(this,k)}get z(){return this.zIndex}set z(k){this.zIndex=k}destroy(k){this._destroyed||(this.clear(),this.events&&this.events.onDestroy.dispatch(this),this.input&&this.input.destroy(),this.events&&this.events.destroy(),j.q.instance.game.tweens.removeFrom(this,!1),this.filters=null,this.mask=null,this.exists=!1,this.visible=!1,this.renderable=!1,super.destroy(k))}bringChildToTop(k){H.N.bringChildToTop(this,k)}sendChildToBack(k){H.N.sendChildToBack(this,k)}get worldPosition(){return this.getGlobalPosition()}get worldScale(){return this.transform.scale}set worldScale(k){this.transform.scale.set(k.x,k.y)}get worldRotation(){return this.transform.rotation}set worldRotation(k){this.transform.rotation=k}get stage(){return j.q.instance.game.stage}constructor(k,B=0,U=0){super(),this.exists=!0,this.anchor=new G.Point,this.renderable=!0,this.tint=16777215,this.blendMode=G.BLEND_MODES.NORMAL,this.currentPath=null,this.isMask=!1,this.position.set(B,U),this.previousPosition=new G.Point(B,U),this.events=new F.sVA(this)}drawTriangle(k){const B=new G.Polygon(k);this.drawPolygon(B)}}},57308:(k,B,U)=>{"use strict";U.d(B,{W:()=>F,Y:()=>V});var F,G=U(62459),j=U(68910),$=U(35120),H=U(64835);!function(k){k[k.SORT_ASCENDING=0]="SORT_ASCENDING",k[k.SORT_DESCENDING=1]="SORT_DESCENDING"}(F||(F={}));class V extends H.N{get world(){return new j.Point(this.worldTransform.tx,this.worldTransform.ty)}get worldGamePosition(){return new j.Point(this.worldPosition.x/window.innerWidth*this._game.width,this.worldPosition.y/window.innerHeight*this._game.height)}get z(){return this.zIndex}set z(k){this.zIndex=k}get bounds(){let k;return k=this._bounds.getRectangle(k),k}set bounds(k){this._bounds.minX=k.x,this._bounds.maxX=k.x+k.width,this._bounds.minY=k.y,this._bounds.maxY=k.y+k.height}destroy(k={children:!0}){var B;this.pendingDestroy=!1,this.onDestroy&&(this.onDestroy.dispatch(this,k.children,!k.texture),null===(B=this.onDestroy)||void 0===B||B.dispose()),this.events&&(this.events.onDestroy.dispatch(this),this.events.destroy()),this.removeFromParent(),this._game=null,this.filters=null,this.mask=null,this.onDestroy=null,this.exists=!1,this.visible=!1,this.renderable=!1,super.destroy(k)}get left(){return G.J6z.getLeft(this)}set left(k){G.J6z.setLeft(this,k)}get right(){return G.J6z.getRight(this)}set right(k){G.J6z.setRight(this,k)}get offsetX(){return G.J6z.getOffsetX(this)}set offsetX(k){G.VyI.log("Cannot set offset of x.",G.$bb.Warning)}get offsetY(){return G.J6z.getOffsetY(this)}set offsetY(k){G.VyI.log("Cannot set offset of y.",G.$bb.Warning)}get top(){return G.J6z.getTop(this)}set top(k){G.J6z.setTop(this,k)}get bottom(){return G.J6z.getBottom(this)}set bottom(k){G.J6z.setBottom(this,k)}get centerX(){return G.J6z.getCenterX(this)}set centerX(k){G.J6z.setCenterX(this,k)}get centerY(){return G.J6z.getCenterY(this)}set centerY(k){G.J6z.setCenterY(this,k)}get anchor(){return new j.Point(0,0)}constructor(k,B=k.stage,U="group",F=!1){super(),this.onDestroy=new G.HN0,this.exists=!0,this.pendingDestroy=!1,this._sortProperty="z",this.fixedToCamera=!1,this._game=k,this.name=U,this.events=new G.sVA(this),F?($.q.instance.game.stage.addChild(this),this.z=$.q.instance.game.stage.children.length):B&&(B.addChild(this),this.z=B.children.length)}add(k,B=-1){const U=G.Aq$.isDefined(B)?B:this.length;return B>-1&&B0){const B=this.getIndex(k),U=this.getAt(B-1);U&&this.swap(k,U)}return k}swap(k,B){this.swapChildren(k,B),this.updateZ()}updateZ(){let k=this.children.length;for(;k-- >0;)this.children[k].zIndex=k}getIndex(k){return this.children.indexOf(k)}getAt(k){return k<0||k>=this.children.length?null:this.getChildAt(k)}callAll(k,B,...U){if(!G.Aq$.isDefined(k))return;const F=k.split(".");let j,$,H=B;if(G.Aq$.isDefined(H)&&""!==H?"string"==typeof H&&(j=H.split(".")):H=null,U.length>0){$=[];for(let k=0;kB.name===k))}update(){for(let k=this.children.length;k>=0;--k){const B=this.children[k];B&&!B._destroyed&&!1!==B.exists&&"function"==typeof B.update&&B.update($.q.instance.game.time.deltaMS)}}remove(k,B=!1){const U=null!==this.removeChild(k);return B&&k.destroy(),U&&this.updateZ(),U}removeBetween(k,B=this.children.length-1,U=!1,F=!1){if(0===this.children.length)return;if(k>B||k<0||B>=this.children.length)return void G.VyI.log(`Unable to remove between because index was out of bounds startIndex: ${k} endIndex: ${B} children length: ${this.children.length}`,G.$bb.Error);let j=B;for(;j>=k;){const k=this.children[j];F||void 0===k.events||k.events.onRemovedFromGroup.dispatch(k,this);const B=this.removeChild(k);U&&B&&B.destroy(),j--}this.updateZ()}}},92150:(k,B,U)=>{"use strict";U.d(B,{_:()=>q});var F=U(62459),G=U(68910);class j{get paused(){return this.isPaused}set paused(k){this.isPaused=k,k?this.pauseStartTime=F.W$e.instance.game.time.timeMS:this.isPlaying&&(this.timeNextFrame=F.W$e.instance.game.time.timeMS+this.delay)}get reversed(){return this.isReversed}set reversed(k){this.isReversed=k}get frameTotal(){return this.frames.length}get frame(){return null!==this.currentFrame?this.currentFrame.index:this.frameIndex}set frame(k){this.currentFrame=this.frameData.getFrame(this.frames[k]),null!==this.currentFrame&&(this.frameIndex=k,this.parent.setFrame(this.currentFrame),this.onUpdate&&this.onUpdate.dispatch(this,this.currentFrame))}get speed(){return 1e3/this.delay}set speed(k){k>0&&(this.delay=1e3/k)}get enableUpdate(){return null!==this.onUpdate}set enableUpdate(k){k&&null===this.onUpdate?this.onUpdate=new F.HN0:k||null===this.onUpdate||(this.onUpdate.dispose(),this.onUpdate=null)}constructor(k,B,U,G,j=60,$=!1){this.frames=[],this.frameIndex=0,this.frameDiff=0,this.frameSkip=1,this.timeLastFrame=0,this.timeNextFrame=0,this.pauseStartTime=0,this.isReversed=!1,this.loopCount=0,this.isFinished=!1,this.isPlaying=!1,this.isPaused=!1,this.onStart=new F.HN0,this.onUpdate=null,this.onComplete=new F.HN0,this.onLoop=new F.HN0,this.parent=k,this.name=B,this.frames=G,this.delay=1e3/j,this.loop=$,this.frameData=U,this.currentFrame=this.frameData.getFrame(this.frames[this.frameIndex]),this.frameIndex=0,F.W$e.instance.game.onPause.add(this.onPause,this),F.W$e.instance.game.onResume.add(this.onResume,this)}play(k,B){return F.Aq$.isDefined(k)&&!isNaN(k)&&(this.delay=1e3/k),F.Aq$.isDefined(B)&&(this.loop=B),this.isPlaying=!0,this.isFinished=!1,this.paused=!1,this.loopCount=0,this.timeLastFrame=F.W$e.instance.game.time.timeMS,this.timeNextFrame=F.W$e.instance.game.time.timeMS+this.delay,this.frameIndex=this.isReversed?this.frames.length-1:0,this.updateCurrentFrame(!1,!0),this.parent.events.onAnimationStart.dispatch(this.parent,this),this.onStart.dispatch(this.parent,this),this.parent.animations.currentAnim=this,this.parent.animations.currentFrame=this.currentFrame,this}restart(){this.isPlaying=!0,this.isFinished=!1,this.paused=!1,this.loopCount=0,this.timeLastFrame=F.W$e.instance.game.time.timeMS,this.timeNextFrame=F.W$e.instance.game.time.timeMS+this.delay,this.frameIndex=0,this.currentFrame=this.frameData.getFrame(this.frames[this.frameIndex]),this.parent.updateFrame(this.frameIndex),this.parent.animations.currentAnim=this,this.parent.animations.currentFrame=this.currentFrame,this.onStart.dispatch(this.parent,this)}reverse(){return this.reversed=!this.reversed,this}reverseOnce(){return this.onComplete.addOnce(this.reverse,this),this.reverse()}setFrame(k,B=!1){let U=null;if("string"==typeof k){for(let G=0;G=this.timeNextFrame)&&(this.frameSkip=1,this.frameDiff=F.W$e.instance.game.time.timeMS-this.timeNextFrame,this.timeLastFrame=F.W$e.instance.game.time.timeMS,this.frameDiff>this.delay?(this.frameSkip=Math.floor(this.frameDiff/this.delay),this.frameDiff-=this.frameSkip*this.delay):this.frameDiff=0,this.timeNextFrame=F.W$e.instance.game.time.timeMS+(this.delay-this.frameDiff),this.isReversed?this.frameIndex-=this.frameSkip:this.frameIndex+=this.frameSkip,!this.isReversed&&this.frameIndex>=this.frames.length||this.isReversed&&this.frameIndex<=-1?this.loop?(this.frameIndex=Math.abs(this.frameIndex)%this.frames.length,this.currentFrame=this.frameData.getFrame(this.frames[this.frameIndex]),this.parent.updateFrame(this.frames[this.frameIndex]),this.loopCount++,this.parent.events.onAnimationLoop.dispatch(this.parent,this),this.onLoop.dispatch(this.parent,this),!this.onUpdate||(this.onUpdate.dispatch(this,this.currentFrame),!!this.frameData)):(this.complete(),!1):this.updateCurrentFrame(!0)))}updateCurrentFrame(k,B=!1){if(!this.frameData)return!1;const U=this.currentFrame?this.currentFrame.index:-1;return this.currentFrame=this.frameData.getFrame(this.frames[this.frameIndex]),this.currentFrame&&(B||U!==this.currentFrame.index)&&this.parent.updateFrame(this.frames[this.frameIndex]),!this.onUpdate||!k||(this.onUpdate.dispatch(this,this.currentFrame),!!this.frameData)}next(k=1){let B=this.frameIndex+k;B>=this.frames.length&&(this.loop?B%=this.frames.length:B=this.frames.length-1),B!==this.frameIndex&&(this.frameIndex=B,this.updateCurrentFrame(!0))}previous(k=1){let B=this.frameIndex-k;B<0&&(this.loop?B=this.frames.length+B:B++),B!==this.frameIndex&&(this.frameIndex=B,this.updateCurrentFrame(!0))}updateFrameData(k){this.frameData=k,this.currentFrame=this.frameData?this.frameData.getFrame(this.frames[this.frameIndex%this.frames.length]):null}destroy(){this.frameData&&(F.W$e.instance.game.onPause.remove(this.onPause,this),F.W$e.instance.game.onResume.remove(this.onResume,this),this.parent=null,this.frames=null,this.frameData=null,this.currentFrame=null,this.isPlaying=!1,this.onStart.dispose(),this.onLoop.dispose(),this.onComplete.dispose(),this.onUpdate&&this.onUpdate.dispose())}complete(){this.frameIndex=this.frames.length-1,this.currentFrame=this.frameData.getFrame(this.frames[this.frameIndex]),this.updateCurrentFrame(!1),this.isPlaying=!1,this.isFinished=!0,this.paused=!1,this.parent.events.onAnimationComplete.dispatch(this.parent,this),this.onComplete.dispatch(this.parent,this)}static generateFrameNames(k,B,U,G="",j=0){const $=[];let H="";if(B=U;V--)H=F.Aq$.pad(V.toString(),j,"0",1),H=k+H+G,$.push(H);return $}}class ${get onLoaded(){return this._onLoaded}get frameData(){return this._frameData}get frameTotal(){return this._frameData.total}get paused(){return this.currentAnim.isPaused}set paused(k){this.currentAnim.paused=k}get name(){return this.currentAnim?this.currentAnim.name:(F.VyI.log("Current animation not defined",F.$bb.Warning),null)}get frame(){return this.currentFrame?this.currentFrame.index:(F.VyI.log("Current frame not defined",F.$bb.Warning),null)}set frame(k){if(!this.isLoaded)return this._frameLoadedListener&&this.onLoaded.remove(this._frameLoadedListener),this._frameLoadedListener=this.onFrameLoaded.bind(this,k),void this.onLoaded.addOnce(this._frameLoadedListener);if(this._frameLoadedListener=null,this.sprite.setTexture(F.W$e.instance.game.cache.getTexture(this.sprite.key,k)),this._frameData){const B=this._frameData.getFrame(k);this.currentFrame=B||this.currentFrame}else F.VyI.log(`Cannot set frame index: ${k}`,F.$bb.Error)}onFrameLoaded(k){this.frame=k}get frameName(){return this.currentFrame?this.currentFrame.name:(F.VyI.log("Current frame name not defined",F.$bb.Warning),null)}set frameName(k){F.Aq$.isDefined(k)||(F.VyI.log("Animation Manager frame name set with no name.",F.$bb.Error),console.trace()),this.sprite.setTexture(F.W$e.instance.game.cache.getTexture(this.sprite.key,k));const B=this._frameData.getFrameByName(k);B?this.currentFrame=B:F.VyI.log(`Cannot set frameName: ${k} for sprite with key: ${this.sprite.key} and frameData total: ${this.frameData.total}`,F.$bb.Error)}constructor(k){this.updateIfVisible=!0,this.isLoaded=!1,this._onLoaded=new F.HN0,this._animations=new Map,this.sprite=k}destroy(){this._animations&&this._animations.clear(),this._onLoaded.dispose(),this._animationLoadedListener=null,this._frameLoadedListener=null,this._animations=null,this._frameData=null,this.currentAnim=null,this.currentFrame=null,this.sprite=null}loadFrameData(k,B=0){return!!k&&(this.isLoaded&&this._animations.forEach((B=>{B.updateFrameData(k)})),this._frameData=k,"string"==typeof B?this.frameName=B:this.frame=B,this.isLoaded=!0,this._onLoaded.dispatch(),!0)}copyFrameData(k,B=0){return!!k&&(this._frameData=k.clone(),this.isLoaded&&this._animations.forEach((k=>{k.updateFrameData(this._frameData)})),"string"==typeof B?this.frameName=B:this.frame=B,this.isLoaded=!0,this._onLoaded.dispatch(),!0)}add(k,B,U=60,G=!1,$=!1){let H=[];if(B)H=B;else{const B=this._frameData.getFrames();for(let U=0;Uthis._frameData.total)return!1}else if(!1===this._frameData.checkFrameName(k[U]))return!1;return!0}play(k,B,U){var F;return this.isLoaded?(this._animationLoadedListener=null,this._animations.has(k)?this.currentAnim===this._animations.get(k)?!1===this.currentAnim.isPlaying?(this.currentAnim.paused=!1,this.currentAnim.play(B,U)):this.currentAnim:((null===(F=this.currentAnim)||void 0===F?void 0:F.isPlaying)&&this.currentAnim.stop(),this.currentAnim=this._animations.get(k),this.currentAnim.paused=!1,this.currentFrame=this.currentAnim.currentFrame,this.currentAnim.play(B,U)):void 0):(this._animationLoadedListener&&this.onLoaded.remove(this._animationLoadedListener),this._animationLoadedListener=this.play.bind(this,k,B,U),this.onLoaded.addOnce(this._animationLoadedListener),this.currentAnim)}stop(k=null,B=!1){!this.currentAnim||k&&k!==this.currentAnim.name||this.currentAnim.stop(B)}update(){return!(this.updateIfVisible&&!this.sprite.visible)&&(!(!this.currentAnim||!this.currentAnim.update())&&(this.currentFrame=this.currentAnim.currentFrame,!0))}next(k=1){this.currentAnim&&(this.currentAnim.next(k),this.currentFrame=this.currentAnim.currentFrame)}previous(k=1){this.currentAnim&&(this.currentAnim.previous(k),this.currentFrame=this.currentAnim.currentFrame)}getAnimation(k){return this._animations.has(k)?this._animations.get(k):null}}var H=U(35120),V=U(74560),W=U(64835);class q extends G.Sprite{get inputEnabled(){return V.m.isInputEnabled(this)}set inputEnabled(k){V.m.setInputEnabled(this,k,this)}get smoothed(){return F.qFr.getSmoothed(this.texture)}set smoothed(k){F.qFr.setSmoothed(this.texture,k)}get left(){return F.J6z.getLeft(this)}set left(k){F.J6z.setLeft(this,k)}get right(){return F.J6z.getRight(this)}set right(k){F.J6z.setRight(this,k)}getOffsetX(){return F.J6z.getOffsetX(this.getBounds())}getOffsetY(){return F.J6z.getOffsetY(this.getBounds())}get top(){return F.J6z.getTop(this)}set top(k){F.J6z.setTop(this,k)}get bottom(){return F.J6z.getBottom(this)}set bottom(k){F.J6z.setBottom(this,k)}get centerX(){return F.J6z.getCenterX(this)}set centerX(k){F.J6z.setCenterX(this,k)}get centerY(){return F.J6z.getCenterY(this)}set centerY(k){F.J6z.setCenterY(this,k)}get frame(){return this._frame}set frame(k){this._frame=k,this.setTexture(this.game.cache.getTexture(this.key,k))}get frameName(){return this.animations.frameName}set frameName(k){k&&this.updateFrame(k)}setTexture(k,B=!1){B&&this.texture.baseTexture.destroy(),this.texture=k}updateTransform(){super.updateTransform(),this.transformCallback.dispatch(this.worldTransform,this.parent.worldTransform)}get world(){return new G.Point(this.worldTransform.tx,this.worldTransform.ty)}get z(){return this.zIndex}set z(k){this.zIndex=k}get bounds(){let k;return k=this._bounds.getRectangle(k),k}set bounds(k){this._bounds.minX=k.x,this._bounds.maxX=k.x+k.width,this._bounds.minY=k.y,this._bounds.maxY=k.y+k.height}setFrame(k){const B=this.texture;this.texture.frame=k,B.frame.x=k.x,B.frame.y=k.y,B.frame.width=k.width,B.frame.height=k.height,k instanceof F.wIr&&k.trimmed?(B.trim?(B.trim.x=k.spriteSourceSizeX,B.trim.y=k.spriteSourceSizeY,B.trim.width=k.sourceSizeW,B.trim.height=k.sourceSizeH):B.trim=new G.Rectangle(k.spriteSourceSizeX,k.spriteSourceSizeY,k.sourceSizeW,k.sourceSizeH),B.frame.width=k.sourceSizeW,B.frame.height=k.sourceSizeH):k instanceof F.wIr&&!k.trimmed&&B.trim&&(B.trim=null),k instanceof F.wIr&&k.rotated&&(B.rotated=!0),B.requiresReTint=!0,B.updateUvs()}destroy(k){this.pendingDestroy=!1,this.events&&this.events.onDestroy.dispatch(this),this.input&&this.input.destroy(),this.animations&&this.animations.destroy(),this.events&&this.events.destroy(),this.transformCallback.dispose(),F.W$e.instance.game.tweens.removeFrom(this,!1),this.filters=null,this.mask=null,this.exists=!1,this.visible=!1,this.renderable=!1,this.texture&&"function"==typeof this.texture.off||(this.texture=G.Texture.EMPTY),super.destroy(k)}bringChildToTop(k){W.N.bringChildToTop(this,k)}sendChildToBack(k){W.N.sendChildToBack(this,k)}get worldPosition(){return this.getGlobalPosition()}get worldScale(){return this.transform.scale}set worldScale(k){this.transform.scale=k}get worldRotation(){return this.transform.rotation}set worldRotation(k){this.transform.rotation=k}get stage(){return F.W$e.instance.game.stage}get name(){var k;return null!==(k=this._customName)&&void 0!==k?k:this._autoGeneratedName}set name(k){this._customName=k}constructor(k,B=0,U=0,j,H,V){super(V||(j?k.cache.getTexture(j,H):null)),this.fixedToCamera=!1,this.scaleMin=null,this.scaleMax=null,this.transformCallbackContext=null,this.transformCallback=new F.HN0,this.pendingDestroy=!1,this.exists=!0,this.game=k,this.key=j,this.position.set(B,U),this.previousPosition=new G.Point(B,U),this.events=new F.sVA(this),this.bounds=new G.Rectangle,this.animations=new $(this),this.updateTexture(H),this.cameraOffset=new G.Point(B,U)}loadTexture(k,B){const U=F.Aq$.isDefined(B)?B:0;this.setTexture(F.W$e.instance.game.cache.getTexture(k,U)),this.key=k,this.updateTexture(U)}updateFrame(k){this.setTexture(F.W$e.instance.game.cache.getTexture(this.key,k)),this.refreshAutoGeneratedName()}update(){this.animations&&this.animations.currentAnim&&this.animations.update();for(let k=this.children.length-1;k>-1;--k){const B=this.children[k];B&&!B._destroyed&&!1!==B.exists&&"function"==typeof B.update&&B.update()}}updateTexture(k){const B=F.Aq$.isDefined(k)?k:0,U=this.texture.baseTexture.scaleMode===G.SCALE_MODES.LINEAR;if(F.Aq$.isDefined(this.key)){this.animations.stop();this.animations.loadFrameData(this.game.cache.getFrameData(this.key),B)||(this.animations.currentFrame=null)}U||(this.texture.baseTexture.scaleMode=1),this.refreshAutoGeneratedName()}refreshAutoGeneratedName(){var k,B,U;if(this._autoGeneratedName="",this.key){const F=null!==(U=null===(B=null===(k=H.q.instance.prodigy.assets.getAsset(this.key))||void 0===k?void 0:k.data)||void 0===B?void 0:B.filename)&&void 0!==U?U:this.key;this._autoGeneratedName=this.frameName?`${F}/${this.frameName}`:F}}}},52080:(k,B,U)=>{"use strict";U.d(B,{Y:()=>$});var F=U(62459),G=U(68910),j=U(35120);class $ extends G.RenderTexture{get rotated(){return 0!==this.rotate}set rotated(k){F.VyI.log("Deprecated. Please set rotate instead",F.$bb.Warning)}setFrame(k){this.frame=k}get crop(){return this.orig}set crop(k){this.orig=k}constructor(k,B){super(k,B),this._renderer=j.q.instance.game.renderer?j.q.instance.game.renderer:G.autoDetectRenderer()}clear(){const k=this._renderer;if(k.renderTexture){const B=k.renderTexture.current;if(k.renderTexture.bind(this),k.renderTexture.clear(),B!==this&&(null===B||(null==B?void 0:B.baseTexture))){const U=k.renderTexture.sourceFrame,F=k.renderTexture.destinationFrame;k.renderTexture.bind(B,U,F)}}}render(k,B=null,U=!1,F=!1){const G={renderTexture:this,clear:U,transform:B,skipUpdateTransform:F};this._renderer.render(k,G)}renderXY(k,B,U,F=!1){this.render(k,new G.Matrix(1,0,0,1,B,U),F,!1)}renderRawXY(k,B,U,F){this.render(k,new G.Matrix(1,0,0,1,B,U),F,!0)}destroy(k){this._renderer=null,super.destroy(k)}}},30442:(k,B,U)=>{"use strict";U.d(B,{k:()=>$});var F=U(62459),G=U(68910),j=U(74560);class $ extends G.Sprite{get inputEnabled(){return j.m.isInputEnabled(this)}set inputEnabled(k){j.m.setInputEnabled(this,k,this)}get smoothed(){return F.qFr.getSmoothed(this.texture)}set smoothed(k){F.qFr.setSmoothed(this.texture,k)}updateTransform(){super.updateTransform(),this.transformCallback.dispatch(this.worldTransform,this.parent.worldTransform)}get worldScale(){return new G.Point(this.worldTransform.a,this.worldTransform.d)}get z(){return this.zIndex}set z(k){this.zIndex=k}constructor(k,B=0,U=0,j,$,H){super(H||(j?k.cache.getTexture(j,$):G.Texture.EMPTY)),this.fixedToCamera=!1,this.transformCallback=new F.HN0,this.game=k,this.events=new F.sVA(this),this.key=j,this.position.set(B,U),this.previousPosition=new G.Point(B,U),this.cameraOffset=new G.Point(B,U)}destroy(k){var B;this._destroyed||(this.events&&(this.events.onDestroy.dispatch(this),this.events.destroy()),null===(B=this.input)||void 0===B||B.destroy(),this.transformCallback.dispose(),this.game.tweens.removeFrom(this,!1),this.texture&&"function"==typeof this.texture.off||(this.texture=G.Texture.EMPTY),super.destroy(k))}getOffsetX(){return F.J6z.getOffsetX(this.getBounds())}getOffsetY(){return F.J6z.getOffsetY(this.getBounds())}setTexture(k,B){k!==this.key&&(this.key=k);const U=this.game.cache.getTexture(this.key,B);U!==this.texture?this.texture=U:F.VyI.log(`Redundant set texture call in object ${this.name}`,F.$bb.Warning)}}},24190:(k,B,U)=>{"use strict";U.d(B,{C:()=>V});var F=U(62459),G=U(68910),j=U(35120),$=U(74560),H=U(64835);class V extends G.TilingSprite{get inputEnabled(){return $.m.isInputEnabled(this)}set inputEnabled(k){$.m.setInputEnabled(this,k,this)}get smoothed(){return F.qFr.getSmoothed(this.texture)}set smoothed(k){F.qFr.setSmoothed(this.texture,k)}getOffsetX(){return F.J6z.getOffsetX(this.getBounds())}getOffsetY(){return F.J6z.getOffsetY(this.getBounds())}get left(){return F.J6z.getLeft(this)}set left(k){F.J6z.setLeft(this,k)}get right(){return F.J6z.getRight(this)}set right(k){F.J6z.setRight(this,k)}get offsetX(){return F.J6z.getOffsetX(this)}set offsetX(k){F.VyI.log("Cannot set offset of x.",F.$bb.Warning)}get offsetY(){return F.J6z.getOffsetY(this)}set offsetY(k){F.VyI.log("Cannot set offset of y.",F.$bb.Warning)}get top(){return F.J6z.getTop(this)}set top(k){F.J6z.setTop(this,k)}get bottom(){return F.J6z.getBottom(this)}set bottom(k){F.J6z.setBottom(this,k)}get centerX(){return F.J6z.getCenterX(this)}set centerX(k){F.J6z.setCenterX(this,k)}get centerY(){return F.J6z.getCenterY(this)}set centerY(k){F.J6z.setCenterY(this,k)}get frame(){return this._frame}set frame(k){this._frame=k,this.setTexture(this.game.cache.getTexture(this.key,k))}setTexture(k,B=!1){B&&this.texture.baseTexture.destroy(),this.texture=k}setFrame(k){const B=this.texture;this.texture.frame=k,B.frame.x=k.x,B.frame.y=k.y,B.frame.width=k.width,B.frame.height=k.height,k instanceof F.wIr&&k.trimmed?(B.trim?(B.trim.x=k.spriteSourceSizeX,B.trim.y=k.spriteSourceSizeY,B.trim.width=k.sourceSizeW,B.trim.height=k.sourceSizeH):B.trim=new G.Rectangle(k.spriteSourceSizeX,k.spriteSourceSizeY,k.sourceSizeW,k.sourceSizeH),B.frame.width=k.sourceSizeW,B.frame.height=k.sourceSizeH):k instanceof F.wIr&&!k.trimmed&&B.trim&&(B.trim=null),k instanceof F.wIr&&k.rotated&&(B.rotated=!0),B.updateUvs()}updateTransform(){super.updateTransform(),this.transformCallback&&this.transformCallback.call(this.transformCallbackContext,this.worldTransform,this.parent.worldTransform)}get world(){return new G.Point(this.worldTransform.tx,this.worldTransform.ty)}get z(){return this.zIndex}set z(k){this.zIndex=k}get bounds(){let k;return k=this._bounds.getRectangle(k),k}set bounds(k){this._bounds.minX=k.x,this._bounds.maxX=k.x+k.width,this._bounds.minY=k.y,this._bounds.maxY=k.y+k.height}destroy(k){this.pendingDestroy=!1,this.events&&this.events.onDestroy.dispatch(this),this.input&&this.input.destroy(),this.events&&this.events.destroy(),j.q.instance.game.tweens.removeFrom(this,!1),this.filters=null,this.mask=null,this.exists=!1,this.visible=!1,this.renderable=!1,this.texture&&"function"==typeof this.texture.off||(F.VyI.log("TileSprite had no texture assigned, which causes a stack trace in PIXI JS.",F.$bb.Warning),this.texture=G.Texture.EMPTY),super.destroy(k)}bringChildToTop(k){H.N.bringChildToTop(this,k)}sendChildToBack(k){H.N.sendChildToBack(this,k)}get worldPosition(){return this.getGlobalPosition()}get worldScale(){return this.transform.scale}set worldScale(k){this.transform.scale=k}get worldRotation(){return this.transform.rotation}set worldRotation(k){this.transform.rotation=k}get stage(){return j.q.instance.game.stage}constructor(k,B=0,U=0,j=256,$=256,H=null,W){super(V.getTexture(H),j,$),this.fixedToCamera=!1,this.scaleMin=null,this.scaleMax=null,this.transformCallbackContext=null,this.pendingDestroy=!1,this.exists=!0,this.game=k,this.tileScale=new G.ObservablePoint(null,null,1,1),this.tilePosition=new G.ObservablePoint(null,null),this.frameWidth=0,this.frameHeight=0,this.texture.frame.width=this.frameWidth,this.texture.frame.height=this.frameHeight,this.width=j,this.height=$,this.key=H,this.position.set(B,U),this.previousPosition=new G.Point(B,U),this.events=new F.sVA(this),this.bounds=new G.Rectangle,this.loadTexture(this.key,W),this.cameraOffset=new G.Point(B,U)}static getTexture(k,B){return k?j.q.instance.game.cache.getTexture(k,B):new G.Texture(new G.BaseTexture)}loadTexture(k,B){const U=F.Aq$.isDefined(B)?B:0;this.setTexture(j.q.instance.game.cache.getTexture(k,U)),this.key=k,this.updateTexture(U)}updateFrame(k){this.setTexture(j.q.instance.game.cache.getTexture(this.key,k))}updateTexture(k){F.Aq$.isDefined(k);this.texture.baseTexture.scaleMode===G.SCALE_MODES.LINEAR||(this.texture.baseTexture.scaleMode=1)}}},9591:(k,B,U)=>{"use strict";U.d(B,{w:()=>q});var F=U(68910);class G extends F.BaseTexture{get source(){return this.resource.source}set source(k){this.resource&&(this.resource.source=k)}constructor(k,B=F.SCALE_MODES.LINEAR,U=1){super(k,{scaleMode:B,resolution:U})}static fromCanvas(k,B,U=1){return 0===k.width&&(k.width=1),0===k.height&&(k.height=1),new G(k,B,U)}}class j extends F.utils.CanvasRenderTarget{clear(k,B,U,F){const G=void 0===k?0:k,j=void 0===k?0:B,$=void 0===U?this.canvas.width:U,H=void 0===F?this.canvas.height:F;this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(G,j,$,H)}}var $=U(57308),H=U(52080),V=U(62459);class W extends F.Texture{get rotated(){return 0!==this.rotate}set rotated(k){V.VyI.log("Deprecated. Please set rotate instead",V.$bb.Warning)}constructor(k,B,U,F){super(k,B,U,F),this.isTiling=!1,this.requiresReTint=!1}setFrame(k){this.frame=k}static fromCanvas(k,B=F.SCALE_MODES.LINEAR){const U=G.fromCanvas(k,B);return new W(U)}}class q extends H.Y{get canvas(){return this._renderTarget.canvas}get renderTarget(){return this._renderTarget}constructor(k,B,U=256,G=256){super(new F.BaseRenderTexture({width:U,height:G}),new F.Rectangle(0,0,U,G)),this._renderTarget=new j(U,G),this._game=k}clear(k,B,U,F){this.renderTarget.clear(k,B,U,F)}destroy(k){this._renderTarget.destroy(),this._renderTarget=null,super.destroy(k)}draw(k){const B=k.texture.baseTexture.scaleMode;k.texture.baseTexture.setStyle(F.SCALE_MODES.NEAREST),this.render(k);const U=this.renderTarget.context;return U.save(),U.drawImage(k.texture.baseTexture.resource.source,k.texture.frame.x,k.texture.frame.y,k.texture.frame.width,k.texture.frame.height,k.x,k.y,k.width,k.height),U.restore(),k.texture.baseTexture.setStyle(B),this}drawGroup(k){const B=k=>{k instanceof F.Sprite||k instanceof F.AnimatedSprite?this.draw(k):k instanceof $.Y&&this.drawGroup(k)},U=k.children.length;for(let F=0;F{const F=new W(new G($,j));this._game.cache.addImage(k,F),B.call(U||null,F),$.onload=null}),$.src=this.canvas.toDataURL("image/png"),!B){const B=new W(new G($,j));return this._game.cache.addImage(k,B),B}return null}processPixelRGB(k,B,U,F,G,j){const $=void 0!==U?U:0,H=void 0!==F?F:0,V=void 0!==G?G:this._renderTarget.width,W=void 0!==j?j:this._renderTarget.height,q=$+V,K=H+W,z=this._renderer.extract.pixels(this);let Y;const Q={r:0,g:0,b:0,a:0,h:0,s:0,v:0,l:0,color:0,color32:0,rgba:"rgba(0, 0, 0, 0)"};let X,Z,J,tt,et;for(let it=H;it{"use strict";U.d(B,{d:()=>H});var F=U(62459),G=U(95891),j=U(77938),$=U(35120);class H{static createParticleEmitter(k,B,U,G,j){const $=new F._mx(k),V=$.addComponent(F.dLy);U&&V.setPosition(U.x,U.y);const W=$.addComponent(F.okU);return H.applyLegacyParticleSystem(W,B,G,j),W}static applyLegacyParticleSystem(k,B,U,H){G.defaults(U,{x1:0,y1:0,x2:0,y2:0});const V=j.t.getItem("particleEffect",B).data;if($.q.instance.prodigy.load.isFileLoaded(V.particle.image)||$.q.instance.prodigy.load.assets(V.particle.image),k.totalParticles=V.emitter.repeat,V.emitter.frequency.min?k.emitPerSecond.setMinMax(1e3/V.emitter.frequency.min,1e3/V.emitter.frequency.max):k.emitPerSecond.setMinMax(1e3/V.emitter.frequency,1e3/V.emitter.frequency),V.emitter.burstFrequency&&(k.burstTime=new F.AA4,k.burstTime.setMinMax(.001*V.emitter.burstFrequency.min,.001*V.emitter.burstFrequency.max)),V.particle.lifespan){const B=new F.ZxM;V.particle.lifespan.min?B.life.setMinMax(.001*V.particle.lifespan.min,.001*V.particle.lifespan.max):B.life.setMinMax(.001*V.particle.lifespan,.001*V.particle.lifespan),k.initializers.push(B)}const W=new F.Qgu;if(W.imageGuid=V.particle.image,W.frame=V.particle.frame,k.initializers.push(W),V.particle.animations){const B=new F.ibt;B.frames=V.particle.animations.clouds.frames,B.fps=V.particle.animations.clouds.frameRate,B.loop=V.particle.animations.clouds.loop,k.behaviours.push(B)}if(U&&"LINE_ZONE"===U.type){const B=new F.mYY;B.lineLocation.type=F.UvC.Random,B.point1.setTo(U.x1,U.y1),B.point2.setTo(U.x2,U.y2),k.initializers.push(B)}if(V.particle.vx&&V.particle.vy){G.defaults(V.particle,{vx:{min:0,max:0},vy:{min:0,max:0}});const B=new F.l_K;B.x.type=B.y.type=F.UvC.Random,B.x.setMinMax(30*V.particle.vx.min,30*V.particle.vx.max),B.y.setMinMax(30*V.particle.vy.min,30*V.particle.vy.max),k.initializers.push(B)}if(V.particle.rotation){const B=new F.Lzo;B.speed.setMinMax(V.particle.rotation.delta.min,V.particle.rotation.delta.max),k.initializers.push(B);const U=new F.f84;U.rotation.setMinMax(V.particle.rotation.initial.min,V.particle.rotation.initial.max),k.initializers.push(U)}if(V.particle.alpha)for(let G=0;G{k.behaviours.push(B)})),k}}},98013:(k,B,U)=>{"use strict";U.d(B,{l:()=>H});var F=U(64835),G=U(57308),j=U(30442),$=U(24190);class H{static toggleDisplayObjSettings(k,B){if(k&&(k.visible=B,k.renderable=B,k instanceof j.k||k instanceof $.C?(k.exists=B,!B&&k.inputEnabled&&(k.inputEnabled=!1)):k instanceof G.Y&&(k.exists=B,!B&&k.interactiveChildren&&(k.interactiveChildren=!1)),k instanceof F.N))for(let U=0;Uk[B]U[B]?1:k.zIndexk[B]U[B]?-1:0)),H.updateZ(k))}static updateZ(k){let B=k.children.length;for(;B-- >0;)k.children[B].zIndex=B}static removeAll(k,B=!1){const U=k.removeChildren();if(B)for(let F=0;F{"use strict";var F;U.d(B,{H:()=>F}),function(k){k[k.None=0]="None",k[k.Vertical=1]="Vertical",k[k.Horizontal=2]="Horizontal"}(F||(F={}))},88701:(k,B,U)=>{"use strict";U.d(B,{C:()=>$});var F=U(24521),G=U(35120),j=U(23029);class ${getMaxCount(k){var B;const U=j.R.loadData(F.r.PlayerStorageMaxCount_json);return null!==(B=U.itemMaxCount[k])&&void 0!==B?B:U.itemMaxCount.default}getOwnedCount(k,B){const U=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return"dorm"===k?U.house.getOwned(B):"pet"===k?U.kennel.amountOfPet(B):U.backpack.hasItem(k,B)}}},91207:(k,B,U)=>{"use strict";U.d(B,{E:()=>q,P:()=>W});var F=U(62459),G=U(36648),j=U(40671),$=U(56942),H=U(35120),V=U(44094);const W={};class q{static getAssetDependencies(k){const B=k.slice();return k.forEach((k=>{var U;const F=null===(U=q.dependencyMapper)||void 0===U?void 0:U.getPrefabDependencyList(k);null==F||F.forEach((k=>{B.includes(k)||B.push(k)}))})),B}static removeAssetsFromCache(k){k.forEach((k=>{const B=H.q.instance.prodigy.assets.getAsset(k);switch(B.type){case"spine":H.q.instance.prodigy.load.removeSpine(k);break;case"json":case"streamed-map":case"tiledMap":case"streamedMap":H.q.instance.game.cache.removeJSON(k);break;case"sprite":case"spritesheet":case"single-image":case"singleImage":case"atlas":H.q.instance.game.cache.removeImage(k);break;case"audio":case"sfx":case"bgm":H.q.instance.game.cache.removeSound(k);break;default:F.VyI.log(`Attempted to remove an asset of type ${B.type}, but a matching case was not found`,F.$bb.Warning)}}))}static getGameImageGuidByName(k){const B=G.q[k];return B||(F.VyI.log(`No asset named ${k} found in ESingleimageGameAssets enum. Try \`npm run generate:localAssetEnums\``,F.$bb.Warning),console.error(`No asset named ${k} found in ESingleimageGameAssets enum.`),q.MISSING_ASSET_GUID)}static getGameSpineGuidByName(k){const B=$.Q[k];return B||(F.VyI.log(`No asset named ${k} found in ESpineGameAssets enum. Try \`npm run generate:localAssetEnums\``,F.$bb.Warning),console.error(`No asset named ${k} found in ESpineGameAssets enum.`),q.MISSING_ASSET_GUID)}static getIconForType(k,B,U){let F;F="gold"===k?"Icon_currency_1":`Icon_${k}_${B}`,U&&(F+=U);const G=W[F];return G||this.getGameImageGuidByName(F)}static getDormImage(k,B){const U=`${V.$.capitalizeFirstLetter(k)}_dorm_${B}`;return this.getGameImageGuidByName(U)}static getDormItem(k,B){const U=`${V.$.capitalizeFirstLetter(k)}_dorm_${B}_json`;if($.Q[U])return $.Q[U];const j=`${V.$.capitalizeFirstLetter(k)}_dorm_${B}`;return G.q[j]?G.q[j]:(F.VyI.log(`No asset named ${j} found in either ESingleimageGameAssets or ESpineGameAssets. Try \`npm run generate:localAssetEnums\``,F.$bb.Warning),console.error(`No asset named ${j} found in either ESingleimageGameAssets or ESpineGameAssets.`),q.MISSING_ASSET_GUID)}static getTitanSpine(k){const B=`Default_titan_${k}_json`;return this.getGameSpineGuidByName(B)}static getTowerTownImage(k){const B=V.$.capitalizeFirstLetter(V.$.replaceAll(k,"-","_"));return this.getGameImageGuidByName(B)}static getTowerTownIcon(k){const B=`${V.$.capitalizeFirstLetter(V.$.replaceAll(k,"-","_"))}_icon`;return this.getGameImageGuidByName(B)}static getSpellGuids(k){var B,U,G,$;const H=[];for(const W of k){const k=null===(G=null===(U=null===(B=null==W?void 0:W.metadata)||void 0===B?void 0:B.assets)||void 0===U?void 0:U.default)||void 0===G?void 0:G.assetKey,q=`${V.$.capitalizeFirstLetter(k)}_spell`,K=null!==($=F.Aq$.isDefined(k)?j.z[q]:void 0)&&void 0!==$?$:j.z.Spell_storm_ioncannon_single_spell;H.push(K)}return H}static getImageGuidsFromGearGuids(k){const B=[];for(const G of k){const k=H.q.instance.game.cache.getJSON(G);if(k)try{B.push(...k.imageIDs)}catch(U){F.RQr.logError(U,`Failed to parse gear JSON for ${G}`)}}return B}static resolveSingleImageAssetSource(k,B){return B?`singleImage-${B}`:k}}q.MISSING_ASSET_GUID=G.q.Missing_asset},46808:(k,B,U)=>{"use strict";U.d(B,{T:()=>F});const F={1:"fc803f64-b097-4a02-9ccd-065a52f64d9f",2:"504d0d3f-da75-43dd-92ba-fe5a30187a98",3:"cb8a15b2-266f-4c7f-8d76-4df2e6128ea3",4:"3c5fc766-a784-48e9-b076-d45a0cfd1b1c",5:"bde236b5-b4e9-487e-98bb-260b68e1d508",6:"33921ba4-9f23-4b2f-b2b0-e2353ab80abc",7:"89946068-4db0-4ddb-bccb-16d2581aa2c4",8:"1d3b76f4-fb53-4c1d-82c2-3ab22372b314",9:"af47e456-af04-48ad-b12c-0c798e11f16f",10:"4a389156-2c69-4e74-8790-d55d464823f3",11:"36e72540-094c-4907-8f7f-e80dd07cc418",12:"8527f4be-1522-4ceb-8161-c45c61d9b553",13:"711f7aaf-c73a-45dc-a38c-8fce87d3a4ee",14:"212a3c6e-0113-4c17-a647-f0362a5203c9",15:"5207b7a8-d8f8-47e0-9db3-4998301c1df8",16:"223de309-a870-4aed-adaa-5cbe162c5659",17:"a9e11847-274a-406c-8599-93e017f4bc61",18:"01eb52e2-1dc9-4f65-99b7-157604cc777b",19:"c8062699-3d21-4fbd-9e5d-af23e8a9f969",20:"69bad6cf-14b6-412e-a50c-292cc979727a",21:"f0279fc2-fd10-44ee-b6d9-15c1635f42bb",22:"72fcf275-814c-406d-a7fd-a38cd3abaf51",23:"4ef72dff-a973-467c-8f7d-35883c5ec2a5",24:"14227a70-675e-4dda-90ec-13013d75df46",26:"096be956-d921-4b01-94cf-5296b2ad9dee",27:"30e7a29b-11ba-43b2-bd47-44bd53e31c69",28:"4c912ea4-5042-49b0-ac2f-137cca73c26f",29:"423af034-ebdf-406b-9ebb-18421ed7caa8",30:"9bedbfff-f5e9-47aa-bc9b-22ccfb0904d1",31:"02ad1891-5703-477d-9de8-14148e9aff74",32:"68cb0ab3-f4df-48b6-97e3-b51008bec534",33:"18ef3003-27e5-46fc-b71a-e59165184d9a",34:"ee399d49-98ac-4e40-a608-ddb51f4c0e87",35:"b4abfa7e-97d4-4d44-b342-75a6bc828896",36:"c955c422-dd5f-42ce-bf12-bf7b04e17ab1",37:"48ee416d-121b-45d2-83ed-37f0c5f2ffe7",38:"8e2aed7d-ab4e-4424-814a-b2b169891551",39:"c7179c8b-30a9-409a-8eb3-d132b660c0ac",40:"a1bd4731-a40a-4891-8cfd-6556e741c10d",41:"e5ecea46-b0a0-47ea-a0d6-fce83e3ea403",42:"514acf6d-258c-4830-bc54-7acda35afa20",43:"2762f59d-5aa4-4257-ad69-76cc508bf31d",44:"ddcc451d-87d8-43eb-85de-d5583367adfa",45:"0d57eaa5-96d9-4270-aacc-917e8957dcae",46:"4e3cf812-02d1-4a90-8611-bc2783f08f82",47:"b9e3faf7-de48-4a5f-85dd-bad1dbae21e9",48:"ed80cdbb-c6a6-4560-b28d-548a6f586f61",49:"0f5e554e-6640-4f35-aa08-5d9103c77231",50:"ed74cc80-3253-4820-9368-488434b7a019",51:"34247c91-a5c8-43d6-a462-2f24c20a0c50",52:"65207ca3-d40d-4e8f-a241-cc7f33ca9bdb",53:"5d45505f-721b-4c3c-b81f-7c862c3a172f",54:"e3bccf0e-2afd-4f08-a113-0e653b79a2d7",55:"71a7c42f-f624-4ac1-882d-256ae0566f2c",56:"05bee47c-6bee-4961-b90b-9e47dbcbf6d7",57:"9282f708-e29e-4427-b9b6-450b710542ad",58:"521eb027-0b88-479c-aa01-70f6b9598d70",59:"9349868c-3a29-47fe-8e77-ee003c8252e5",60:"f8fad4de-39bd-4ae8-8e72-e0a9b1ee7c06",61:"fd4a87c7-bd55-4dd1-9811-7be2859b9e20",62:"1a445a03-4696-4255-863b-ce63cbb0753c",63:"6ea9f2e8-3440-4c31-a895-d4d00b218d5a",64:"5b26adea-cd56-478d-b787-f979e78cc136",65:"6dfe4559-a044-40e8-850b-8b2496516e27",66:"e0eb302d-d4cf-4162-a1a8-fa14b2e1ad01",67:"48eb9712-a0ad-4a6d-93f4-f0c9c7dbbd23",68:"71356bbf-7525-4350-be62-6a28d6efce72",69:"7c530624-38bd-4e98-b6a9-4023db5660bf",70:"2e7d24a5-a7aa-45b5-9269-8cd3f972f4b4",71:"c3f4f422-e0a6-48ed-92ae-5b98281ee2bd",72:"f6dbd550-f849-4254-8c96-490327804add",73:"dde06240-581b-4a49-ac08-1a678b4670f5",74:"20afb102-02db-45e7-b3d6-5c0985965a1a",75:"fc95e252-4c38-4cb9-bfe9-38839c054e00",76:"f098c29c-b502-49e6-a6ff-be7b70e95fb2",77:"4188e5ff-c5e3-48ab-8ed6-6447c2ac7665",78:"e691781a-5ef1-43fc-b1c4-1113ea9ad0da",79:"632ea709-d268-4aa0-8792-4c0957c1829c",80:"91e08ac0-7aa4-4a2b-853d-b1850d86c32e",81:"60197ca4-edac-4623-a47c-0d949ddff287",82:"ac3e6cab-d35e-4a46-bcc7-f3603b0186a8",84:"905106d0-0376-4006-8dbf-5852c553ee6a",85:"d17939e1-10d6-4fae-8695-1a70059c7564",87:"51050525-d8bb-4fcc-8db6-6a5bfa19a9e6",88:"65b1cc51-052b-4ee9-8c52-4b808d009a57",89:"a4ce522d-ec9a-4f59-9875-15041ffdb810",90:"57697f5a-34d8-4d25-85e3-0770f71f4b3e",91:"c16c8fac-546e-4a8f-9699-96afe7d42bf2",92:"40a830be-16fe-4c13-99ed-24cf2d2acfaf",93:"e19ecfda-8a24-4a40-92bd-035c7c7e79f2",94:"b942553b-a06a-4c8c-b0a0-160effb3ec7f",95:"d17a542f-7dd9-43cb-ba9d-9fa34eb31e22",96:"a77d89fb-0220-4cc8-b50d-d84720b2dfd5",97:"5f1fc64c-f981-461c-967d-de22ba1c1500",98:"fe2b6457-7aa9-42b9-bcc9-c47ef41b8eb6",99:"9e0a7aab-93ac-4980-946e-25035091b8b2",100:"76ac585a-4bec-4c1b-958c-76d19b28dd8e",101:"24ec6c09-a2d4-4872-8d10-f8fdf8951a10",103:"f80b20e9-24ce-4f0c-852f-09efd8903b32",104:"0be93aaf-2599-432b-8319-d25b7d3e4023",105:"34767edb-4b03-48c6-b2eb-c150132d4b97",106:"56cd1746-83d6-43a6-b809-b1600abbcda4",107:"1f0be7f9-b5b9-4c2a-a34a-33db79e712d6",108:"04b2dca3-c52e-4fef-afd3-171d8e1ee624",109:"02c62104-a3c5-44ad-acbc-d02398349e1f",110:"7e90ec3c-2d07-4fe5-b988-71712f531108",111:"be607cec-dcbd-4d1c-8f61-40ff7286279f",121:"2f9ad04e-f86f-434e-beb3-482c05a3e99e",122:"eb5a918a-3042-44ba-ae91-40445f35e8fc",123:"8898a24e-c4c6-450b-b682-005af5b15d6b",125:"e604ea87-d9c3-4fd2-b572-bdbaf660949a",128:"4ba5ecb4-f37b-4222-a1f0-723ca2ed5cfa",131:"78543d0f-99f7-4779-85a0-fd5b4f1d8658",134:"c37e0a92-7388-453a-9b3e-da705f84c1f9",136:"69c4ab16-bd61-4b1c-a899-9591324cb922",137:"4213f26e-6502-4e1c-a0ab-155a252792fa",138:"1dd59d6e-6bbc-44e8-b50f-80b60ed4abb0",139:"5997e7d2-1e39-4dcd-923e-d9596703a358",140:"695f8d56-8dee-413f-acb7-d8d1d269286b",141:"28bc7b7d-291a-429d-a618-5dfa0b0ed829",142:"8334b8dd-a9a3-45c7-918d-38deaa562c04",143:"9db71127-4b69-474b-a14f-2f8e14492157",144:"75c94731-e067-4b07-ae7d-53520eff2dd8",145:"64d59196-1650-40cf-ba3d-0e1ba89f5063",146:"3261fd98-0e15-4334-9f66-7ccd7991ee92",147:"2c1a7a79-398b-4c1e-acec-e877db67468e",149:"c4f5f284-e29c-489b-bc3d-3d093f71ba11",150:"fd48539b-0b8e-4e4b-9e3e-ada16d096a68",151:"c9340a5c-d410-4835-bcd7-3e5f27a61e5c",152:"08f72fe4-cf27-44e9-9b22-eca718b4c84b",153:"f44accf3-0868-4fee-9903-4a6a31cb7d17",154:"7dda15a9-d786-486c-9699-214c9d303c15",155:"b5d1f28e-d15d-4144-92b1-4597be72a854",156:"352d96fd-87a0-42c6-86ba-f5f5f2fbd199",158:"6026dfea-1840-4632-a262-e0fefbfb2d37",159:"dd3d3de4-5a08-42e2-92df-510a9ec718e6",160:"b451c4b0-180b-402d-840b-26f383d0edfc",161:"14284996-79c0-44c2-a36b-9cffece19bc4",162:"4d8a543d-f259-4399-8bd9-95984910a158",163:"23cb292f-e6e2-4f3c-88a5-fcaf8bdf179c",164:"d0dcb964-e294-44c8-b39d-65aae4346034",165:"7564f48e-bfa9-4b94-96ae-e628e30d3b7b",166:"384bdfdf-ce86-4f1c-9f7b-be95d344b250",167:"50d655d4-5e85-46c8-8e46-c33a449ca975",168:"cb02d3b3-66a3-428a-86eb-9ce6ff58f707",169:"1de822c9-13b3-4b99-aded-e340240c382c",170:"cdd7bfe7-ebda-4a1c-80b1-e023608200b3",171:"34022fb5-3e06-4f9e-9e7d-afc2d3a5d223",172:"2142f025-9e21-4f6b-a964-6cfef5d1bc6d",173:"336e0c9c-cd1c-4301-b52a-b98e5fa5d9ba",174:"9518748a-13e3-4f2e-852b-4e42bd85ca02",175:"9e6845cb-93e4-4780-8567-058bf635f143",176:"c36b4076-771b-4e60-abaf-ddf0d4c86930",177:"94e1fe77-0dbe-4bbf-95e5-ea707007ed5c",178:"43a6e25e-06ba-402e-98b6-633e2c9018b7",179:"dfdd5ce8-8445-43a0-aaf0-3ab6d5b7d8d1",180:"80fe2449-99e6-4f0d-bdd6-8179802906cd",181:"d0886b67-9670-4eef-b452-0cd4f0a42d19",182:"1579afec-dff4-41a0-936f-4111f4f96cb3",183:"c6982a43-eb94-41bd-8684-777ab5bd19c7",184:"5f41427d-83e6-4de4-ac63-f14d0fc3447e",185:"48c32834-70fd-494c-bd4b-5d685c06eee1",186:"e647a8e2-fa3c-4aa2-94f8-c1a652a734af",187:"25901cbc-1f86-46bf-9b6b-494de314da2f",188:"6658ac4f-8942-4f2a-9694-49a5942f0e9a",189:"2dc4e86e-6667-4d39-9938-48539933a198",190:"7a3692c0-8cef-4962-a759-bcdd049a3184",191:"4d35970b-6c0d-4a82-a0ea-b49acdeece27",192:"9da76592-c6fd-4435-873e-df5681edb1b9",193:"0cbeb534-cf83-4788-97c4-bb7bceed8e84",194:"db7991d2-4bb6-4849-a9d2-43f3df2a45fb",195:"20f58865-7c92-4b2c-9e8b-e44b024fa102",196:"b3424a57-d677-4d5e-9094-046c94cb3365",197:"c211f913-5ab3-4244-8fb5-1ef606760b42",198:"b611fcac-649e-4993-b135-3a29c49b870f",199:"c60bce9b-9f18-46f0-a29f-dcb64da8fbaa",200:"2acaaf48-000f-48b0-8160-d7116868ee2e",201:"39470ffd-5db7-49e5-9b0b-3365f386c002",202:"4ebfee10-3b01-429e-a815-a5a2afdad49c",203:"f640ee73-5520-4062-be29-72bae4e60e6e",204:"9e1081ce-6b5b-44b0-a3bb-17f03b746d32",205:"50342091-df38-4d10-86d5-4b62ab768233",206:"137f95a6-1efe-40bb-b5e3-5d73da563226",207:"f74b757b-499d-4d7e-82bc-44870a73d7ec",208:"2d9e07e9-e5c9-4328-ad3d-7b76921e093f",211:"1c053f80-afa4-4de7-83a9-7bd8658b01cb",212:"3af064db-2afc-493c-930a-0b5591be4729",213:"606e07d8-e4dc-46fe-bd18-20fd59e29dc1",214:"770d667d-f843-4269-95d6-3e1496233792",215:"d52e1378-ee03-46d7-94a4-eabe3a7726ab",216:"7baf54d3-a94f-4217-a02c-de7a432d6473",217:"f98eb440-a797-4315-96fa-58c36a040b47",218:"e3df5753-c17c-4b08-9627-11d136a75347",219:"7f4c0349-a4c2-471e-849e-418bc6f30b9a",220:"1e5c1c74-9b7e-4484-b118-d4023d624ac2",222:"99b8c066-153f-4b64-8f31-f013999bd6e8",223:"817a489d-a299-4873-8889-d37f96a20879",224:"34b23e5f-0dff-43b8-bfff-90d1bf005095",225:"603e642d-43f7-435d-adf8-111edc412559",226:"ad167b80-ec13-4619-95fe-198a3dcf76c5",227:"d43edf90-57c6-44c0-b4df-01ea8fc2921b",228:"bf29d664-f591-431c-af02-dfa8ec0c6b57",229:"08027796-5d46-4e0a-b0aa-c428f0cf56f9",230:"deaf21f9-e416-437b-a348-38cf09bf8023",231:"1a816b0b-02b3-47ce-9d20-9a7728707697",232:"366bbcde-0f91-4f9b-ba36-11537a853b13",233:"6a8bfe5b-80a8-4f8f-96ba-8355ca13383b",234:"89bc34ad-a329-4d95-9d0a-81345dd3842b",235:"dece6029-923b-43a5-b114-dce4e3c77c93",236:"4b2943f7-f0a7-4a6b-a86a-18b49719e0c2",237:"83b0a5fd-afac-4336-b35c-d56592e8b7c6",238:"7b25559d-d6f2-4a16-9d0c-24d2b9fe1118",239:"3bdc600b-52e8-4267-b091-6c86ad4fd630",240:"fab69025-5aaa-4f86-b4c4-eea77d7b3734",241:"02b7bd8b-fea0-467c-aa98-5ab25670607c",242:"ad005f96-ace1-427f-b7eb-a84d0fe6264a",243:"c50c7501-139f-4d4d-a18c-8d07dfd8fa50",244:"48479669-ed5a-4848-b260-343ab900084d",245:"fd5f0b3c-4985-4063-8578-592845359f4e",246:"5a328e09-a4ef-4738-9aa9-1cb8d760826d",247:"510f2023-d98b-4671-be05-143e5accc46a",248:"49a3cb34-0e8e-44fa-9087-da28f6ac3262",249:"aba7150b-4e2b-41db-8f88-9833a7905e5e",250:"223a0cdc-8788-46dd-8654-96526508df14",251:"ff3837c0-5acb-4f1d-9581-b42634a9a5f4",252:"0b599ffd-5823-4b6b-930a-af1d4411f111",253:"ac2837f7-5ccb-4059-8a74-ee2267b28eae",254:"432cc4d2-be65-4a34-b1af-bd6415121788",255:"4d7789ce-6b07-459b-9580-67fdd9f0ad4e",256:"64f957f0-95ab-49a4-a8f1-8fb2d412962f",257:"d9b2b923-1cef-4701-bb6b-66cf4fb18a7f",258:"f3ec331d-35b8-421e-90a7-314ef44f0887",259:"da4c7159-fbb2-4b7c-9f96-1b88e91b7c88",260:"7858415c-b99f-4f6d-bff3-d9bf5e66f8dc",261:"5673ba5e-d1a8-40b2-8cfd-2d91fdca9977",262:"e64ef4fa-2ae2-46f2-bfd8-ae4dab232e46",263:"8089f5bf-ad38-42e8-ae5b-6c77b9d60e2e",264:"84b152d0-8202-420c-89bc-22a129ede8bf",265:"cf0cfdeb-04d0-4218-8fb6-be4c31a186f8",266:"56e2cb99-bcff-4bc1-ab86-1631fc1c82c8",267:"5e758c86-4462-4abd-9a4e-fa1b0fbcf0f7",268:"c74886af-7e0d-41b1-b347-cf2b5ced4885",269:"cfa2a157-1044-46cc-b7f7-fedc7f1a9efd",270:"12c7cd6a-8528-4f37-9db3-2c37422cfdad",271:"5072a2e8-93eb-478c-900a-80b8a6649496",272:"81140ff9-5019-4538-909e-ecd0f4a96508",273:"df4c4416-f741-4a2d-8f3a-a4417fc592c6",274:"62292d8d-279f-406b-93ff-cfaf076b58aa",275:"f42ddee5-4e78-44bd-bd3d-d9cbdb586bea",276:"4cb02221-b4fe-46b8-ad53-3ac666ae9d81",277:"80b17525-4e04-44a3-9c71-27b895a4e024",278:"35f406ed-3d0e-41d7-b9c6-a5286ba584dc",279:"91e32f85-b86e-4024-874e-c0d6352fc92d",280:"8f9744b7-1e48-4b25-af31-e983dad3cfe1",281:"31fe7b8f-b748-437b-9069-dee8587d8014",282:"8be164c6-81de-425c-84ea-7f0f5101ca4c",283:"1e2a857c-8213-4425-8264-bccffe30bf18",284:"903f80d7-8550-4469-a299-291251fe5cdf",285:"4c780a71-5340-4cd3-84f0-a188391b8edb",286:"e776d8a6-115a-46fa-b2e8-00ce0241d654",287:"a82ab69c-02a3-40c8-a834-8385a80aebf1",289:"65d81152-57d7-4976-a35d-866f93ae5815",291:"e3dc2984-f573-42cf-baf0-f1378b58701e",292:"fb7e84ef-e017-4834-a0ce-4cc11dffc8d2",293:"1913f297-e6b6-4361-9eb6-080f71921f87",294:"bd404e85-187e-4418-a4c8-8138c889808a",295:"d6e4a580-1b94-4c5d-b77b-f390863f8ba4",296:"aedb7485-8e26-498c-8b7d-e717987c08f7",297:"bcf28ad1-373b-4fd7-bc43-1e159725341d",298:"ec303811-f85f-413f-9634-8caabfd06d2f",299:"0b7c3353-6edc-4c40-992a-8a23cae62ee3",300:"f3c0de9d-4197-41ce-8506-9b9b3ee59a86",301:"37e9abcd-f9e8-4759-a14d-a69c44d42833",302:"354ee9b9-050b-4c02-962e-57dce14347c9",303:"0526a8bd-8dff-4ecb-a9af-7deecbabd66b",304:"1ac4dce7-c3a2-4341-ac23-02a5a4f6615e",305:"30f45757-15fb-4e3d-84e0-5d0e7c24f5a4",306:"bc4f37ea-dd54-4a7c-97d5-9f64e3a9b2c8",307:"a3d578cd-085b-4c7d-8d5c-5ac2728b517a",308:"21ab0b7c-d369-4ba6-9787-24d385447f1d",309:"3bba2a66-fa68-432e-875a-7f24223ff0d0",310:"e1442215-f547-4d1e-8b20-bd9952bb9b2c",311:"ae5bdf4f-d891-4452-ab71-647090e19bbe",312:"cc2a740d-91ad-4148-af3f-ba8565d5a2b9",313:"811ff008-78cc-4ed3-bc80-3275890ff601",314:"7c097985-7087-4043-abc7-985918c9c5d4",315:"dbe28384-132d-4ba1-9597-f5693a5c2e47",316:"e8281bf1-1e28-4240-9568-9d6669265283",317:"92fe4952-eb5c-47bb-8bf3-0fc019d6c49a",318:"5b6e5f17-5c5e-432b-a31b-2e8d726b7e0c",319:"920cf589-b733-4530-a515-0cb2cf52197d",320:"5c305e63-28e3-4cca-8be4-5910196c4d5f",321:"2d92dc5a-4bf9-40e9-9e8d-e3927b0b006c",322:"4e547add-25b8-4120-8c3f-abd47ad321fd",323:"74a944e6-b977-4ab1-8676-62f6b3fa0852",325:"012158f8-2e88-4289-bc27-8ca0af20ae33",326:"3a8f6b3a-fdb4-40e2-bb2f-f510c8dc7970",327:"99756734-c409-4a1c-9e2b-fb184385abfb",328:"63644092-6e0c-4008-b9bf-56e052e13bda",329:"c83f5774-380a-4bcd-9704-37b75eb535ac",330:"914cb856-6ae8-4492-bd57-195b4727dfe0",331:"b4933d6f-4730-445d-b4d9-d80153ea1e38",332:"37b4be5c-46be-4db7-8830-a427be35944f",333:"b6eead11-6a94-4926-b209-a48c833fb284",334:"d35485e1-ba06-4762-a8eb-8309202d1bbd",335:"e260bc51-a481-463f-b2a8-d371934176e6",336:"2100645f-a74d-432b-9cbb-240600dbd60c",337:"5d2d8057-1d1a-4fdb-86db-163c94d7d7cd",338:"c63d2ffd-78e9-4e0b-af32-9cb9729ee579",339:"f45d1d33-8e2f-4c9c-a47e-4cf1db19a1ca",340:"174e9865-8ac6-459f-abed-f6049c437d8a",341:"5b15b8d1-d9b9-4d50-90bc-e2420a380a8b",343:"7f9a4ec0-0d90-4b0f-a4f9-025a93bca33e",344:"c9d3b0f0-1385-4b5f-b73b-f755384c6d06",345:"826fde9e-0f3a-4ae2-b50d-13940715f87f",346:"3528ffb5-8832-4313-a612-c502cd69d9c4",348:"156dbee9-e95d-4694-93c6-03b7aa8e98c5",349:"503b6560-6454-44ce-897f-fb674c4de2a7",350:"a405b70f-e6de-4ae6-8f3f-beed6d9ff4c2",351:"34d38842-b451-4a6d-9c0c-bb815b376e79",352:"71f54c3a-e70f-475b-be02-ac446e464434",353:"8c28dd05-f858-4a22-b49f-44e0508da235",354:"1a6b96e1-7505-4786-935e-cc99b5903dfa",357:"988176d0-042d-48e6-89a1-4e74ea299ed9",358:"4872669c-77d5-4f02-96ac-dca4174fc076",359:"4143b4b9-7cc5-4088-9e07-edd2eb9409cc",360:"3909edca-f54d-4cad-90d7-6af556567289",361:"dc93dfc6-5aa8-4521-b827-d85cc1ccb7a7",362:"6f82f043-fad8-4549-b8ee-777661f42659",363:"529faa7d-c2b9-4093-be2c-e846a7108135",364:"43705ebf-a99d-4052-ba1f-db23639584e5",365:"847f69fd-cca6-40af-878c-84aba7177752",366:"027d61cb-8ec9-48f2-9ae6-5d202b1afac9",367:"cbfbce18-4263-4f68-b6ad-ccd75b3fc45f",368:"ce8b1180-02b5-4ce7-8e0d-f64739a1300b",369:"1c1e6d7f-cf57-456b-bb6e-7002dfd06b9e",370:"cbe930d4-390b-479c-adc3-45983a21357c",371:"9107925c-10db-48c5-8be3-c79442878f50",372:"3123994a-1477-447c-8c63-6015ab50065d",373:"9c798ef5-555b-4c03-b7c3-213652d21fa3",374:"6b3964e2-d7e7-4b09-9269-0fd0510607e6",375:"00d18425-5436-453f-aabb-2507cbfb8886",376:"8950987c-6f03-4f45-a161-a2fdcb48d11b",377:"d31a96eb-8190-4bc0-8a2c-93df4ce837d8",378:"f0105505-d0d4-41de-882b-db53c4cf184c",379:"e71144dd-f093-4a36-b40b-79330b2c402f",380:"77758c5c-fc35-42f3-af54-b2afd2c62bae",381:"22b45ec9-fe31-4cd5-a1f0-39aafecf1a89",382:"87a018f2-463a-4df5-8282-a1baf5d2abe0",383:"dc392e6f-3bb5-4c22-ab64-1ece78d4b720",384:"079367aa-95f4-4a69-b611-0d8f5cadd88d",385:"563a4fcf-fd69-48f7-a33f-3aeb9cbbab12",386:"f2d8e404-9426-4bc3-997b-20ee9614787b",387:"b8fe6772-4e70-45db-ac94-03807d2c29cf",388:"12dc2816-1bc7-4c91-8ec2-49f9e71fc56c",389:"dc9fe622-a67a-4b88-bdf3-f91931f84ac2",390:"0591ca90-f9c8-43af-a85b-5629e9c71bf6",392:"93877c15-e507-46d5-9534-31fba16886bd",394:"fc775cb1-3fc9-4ca9-a6c4-44e09fb241bd",395:"cc209739-9ca6-4781-8b81-d2369dab2477",396:"cba4e27b-007a-421b-ae3d-ca80bb7725f7",397:"c32fbece-26d7-43b7-bcad-698cd540b465",398:"04e0b298-53ac-452c-9f4f-477ee891cee2",399:"bb95e49c-7053-4edb-9bb2-2d22a1a4d8fd",400:"af3d0a70-f46e-4bdc-90a8-78b13e9e75d6",401:"9048c6aa-ce8d-425d-9c14-efeb73cb3055",402:"9d21ed51-3879-4e7c-a998-a2403b193965",403:"aa2a8aa2-2eae-4e74-bebe-cc95eb57c917",404:"a6b0b5e6-04f5-4156-a113-77d6f0ed461c",405:"2148f49b-9ee4-4e60-ae71-60637575caa3",406:"84f91d37-1a29-423a-8869-7d6df2d58411",407:"4f4ca7b6-9e03-44d4-a7f5-f254372fe451",408:"f4b85b2b-0865-4e0f-8bc2-92a42f9a9297",409:"16a826f9-8d6d-4e6d-92bb-2c67fb5aa5a8",410:"c913c045-2053-469f-aae9-64cabf3e22f8",411:"53fe1e6b-3e89-4750-9a82-80ef6b7a3da7",412:"14c030c3-e163-4167-a472-d57062c278a9",413:"fed14908-e145-4d1a-ae31-7fe23cc1fccd",415:"147e34f5-e1a4-4186-8d71-b1760e105081",417:"ecf56d28-6b95-4e39-add2-2527fae268b4",418:"3824fd5e-d75f-4db5-9ef7-4bdaf8e25b77",419:"da0068bc-3803-4b05-8bda-f76f96a91a8b",420:"5591e0ad-ecc6-494a-9121-4f4f9171fee2",421:"0704badf-9000-44e0-af63-42de090cfe62",422:"79470531-f247-41ab-9eae-7fe353f669e2",423:"819901b9-7cf0-4541-b1fb-e873f8c2dc3b",424:"d2cdc4f1-9e27-4b36-ad39-9b9c6d9d8558",426:"c778624c-abce-49cf-8363-426fee511af0",427:"c2a0bc7a-2fee-4e7b-a32c-62e32f4f90c5",428:"6181e9e3-bd5d-4e4c-827a-714e370e960e",429:"3e59e756-697c-46e5-9d68-6d6f024bfc5f",430:"73d018c9-176b-4f9a-ad9f-bb62d5fc4aae",431:"078a5b4a-0019-46e7-a078-df1d9ffa46ab",432:"1c141553-8b65-4dd6-9398-3e4e458f8ddb",433:"419e1bcb-9354-4eae-8ab3-a650c4188540",434:"cb5675f1-a15c-4e61-9a93-feceb823d6e1",435:"8aa8df9a-e2ed-4751-9188-d0527e41fbab",438:"51511cac-c7c9-4d10-bb33-a78c42f5ec68",439:"cba8f9c9-b62c-4873-a571-57e29977ae5c",440:"54d80c70-5534-4a9b-86b2-208d52e07772",441:"97c8db6d-57ea-4be2-aff8-aba319fed26f",442:"2a318f65-0bae-4e36-b551-84f93be3eede",444:"7885b29f-39fc-4577-8145-63dfbceff6e5",445:"48eaae11-08d6-4d6a-861a-d307655ad48e",446:"82acc4ed-cae0-4424-9bbe-27456d90adab",447:"aef5d065-6408-4e5e-a6f5-bdc395ce578e",448:"e84b5762-b3d5-448b-9cb3-3d0985fcd04d",449:"612a1513-1a3b-4595-897a-86520dd1085f",450:"2521a48e-7f55-4879-ac68-dd74bd1487a2",453:"70c0a518-8be9-4213-880a-9e969145fbb8",455:"81ac35d7-d7c5-45a8-b30c-3e0ed97297ff",456:"f78090fc-5f1e-48dc-8215-2825d4eec7fb",457:"026d935c-bcf3-4a4d-85fa-c757e464b020",458:"86c8c8fe-6fb5-47a5-81b8-00b9f9c91810",459:"3508c69a-337e-47fb-b694-9bd81bcf0200",460:"f7e5db39-39fb-4bea-8b2a-1515077d59d6",461:"b55a5daa-5286-4981-bca3-65a1fbeadfb0",463:"44cb5816-7653-4c8b-941f-27905efa541b",465:"373cceb4-7f45-4036-8a49-7de1c3ac67d6",466:"0d366e67-7073-4a92-86ba-f92b9782ad83",467:"af453859-a3bb-45f4-8137-ec59b3843a52",468:"ec371e9c-5108-48dc-91dc-f90e204868ad",469:"358d439c-9469-437f-a4d2-f0141aee13b5",470:"82920f4f-16e2-49d0-b138-0e3189f59769",471:"4202a0d0-28c6-42e9-a685-23e8452513ff",472:"0d729724-f289-4e92-af91-33c01bc80ec2",473:"5933364b-663b-40bb-84ac-ad2865a29a99",474:"0ab532ea-6c66-409f-8869-f030fbca04c6",475:"baf20088-5ecc-4def-941a-b0a57a0b74a1",479:"04c98e28-ed1f-416c-81d3-4fc0784cf51a",480:"12a01b2f-9bdc-4562-9fe9-5b385632cd61",481:"043bdba6-97c8-45ce-9ecc-1752efb7065c",482:"bda88deb-aca1-423c-bf56-6ed7f614a5d9",483:"b7b5dd59-f0bb-44b8-bae6-29ed6e99fbd4",485:"8f7c6c8a-9d45-4e7f-8f7c-ab52017dca0c",486:"3c7dd26d-b97a-47f4-bd2f-78c59d1c51aa",487:"e91873dd-cf4a-43bb-893f-31102f45108f",488:"f23663c4-440a-4c4f-8d47-d91ee72e5b15",489:"bcf8417b-6359-43e7-9785-2210028b6d20",490:"afc9e698-77b8-4aae-af6d-31898c9f4faa",491:"dbbab5c9-3c7c-47ab-a896-3a757191aa1b",492:"2900f01c-02af-4819-92ab-5b8f5cb70b4c",493:"b6fa975a-3c68-4fbd-8dbf-7b310fbb0ea5",494:"b89030af-5691-4493-b95b-6c55914a363d",495:"5b7fa77c-e106-49d1-8a50-fd30d6add7d0",496:"2d7788b8-e481-4f5d-aa39-b8c52ac29170",497:"666f2649-ace0-4696-9780-d034685220e2",498:"16b34b84-6ca3-4641-9353-aac17071c28a",499:"070c7f92-2031-4aaa-b70b-a941bb3e1ca1",501:"6f1b9955-bab3-41ad-b547-25edaeb5ede9",502:"7f569c4c-25b8-4b44-8177-526b8ab8157b",503:"deb4a8a1-51f0-426b-b93e-e10124aac6f5",504:"0779b9be-f064-41cc-86d0-1880bb1fd21b",505:"dfeb3c65-9c38-451b-84a2-30695868d579",506:"534113f9-fd78-4330-96cb-60ae8bd5e6bf",507:"171721fb-5707-4ca6-a63a-720ceb050943",508:"e614e66d-6b42-47f9-8cfa-08ed393f42a7",509:"b18a2200-71d6-4b84-8953-bc2b2fb1d2cc",510:"f249ac19-1c03-424b-9cec-71ef1ca0bc0c",511:"0124ca74-995c-4ac0-94cd-5882208a64ff",512:"34dc3421-4b81-4317-ba07-c49c197a17ed",513:"c2b1f0d2-b105-4e84-a25e-4767eb5d891d",514:"fa5bf8a3-11a4-40cc-a01b-741011b0cb0c",515:"f6c73014-0236-41e8-a800-3377f3445a6f",516:"7b7e6f0d-4f5b-4fcf-981d-6e0bfdf041c1",517:"44c2887e-33bb-4079-b86d-eb6c51355254",518:"67a7bd11-9c7a-42e4-a18d-3ee7e70ca835",519:"81a31dc9-e710-409f-abe0-575f12761e94",520:"b22652bb-f0ef-4d81-be04-655b16e3a779",521:"c248c8b1-4fae-42ed-8ef5-800be0d43eb3",522:"6c13c725-e537-4bb4-8692-f60ed2d0a86a",523:"cc44b924-9b89-45a1-93c3-d957262ad0c2",524:"545d11fe-d959-46f7-a5ec-fd87b7b99485",525:"cb7c9d1e-812d-4ba7-9033-c8b90d9d9fe2",526:"4ab7d0d5-5304-4c57-9a27-db2268af61ec",527:"cf900e63-412d-4e36-a708-1808d347e79f",528:"55dd2d85-d0ef-4e64-9941-a1bdf15510cb",529:"9d679a90-8501-4940-9516-82850969e803",530:"3419ced9-d7aa-41bd-9e5a-d6be9d8beb29",531:"8950c958-8bca-4c31-a8d6-fbd0720ca4e1",532:"b609e72a-928c-48d6-ab30-829f4fe7a705",533:"dd4dc09f-9d51-40b5-8846-6393951c2bdd",534:"ac514889-4da6-48d5-87aa-466390fc728f",535:"445d5673-7b53-43d1-b8c5-4be32170061f",536:"f5f8abfe-6766-4981-ad51-edc544561bf8",537:"b388ddef-c031-4e98-ae1c-e32975e7fb00",539:"34a7a6af-968e-460b-8f8e-802b9ba7440c",540:"da6bd42e-06e0-4dc5-b976-caf20800ba67",541:"5c4a143c-6103-4499-b9d5-354947fc4ca8",542:"096c42b7-328f-4c0a-96c5-b73a6d5ae0a3",543:"04d027a6-0c1f-44ca-8533-0b4cdbf1625d",544:"2ec4f959-a938-42d8-9dc4-c81d2aa10ee6",545:"36cb2e5d-2f22-478a-ba0e-ab457e71cae3",546:"a67c78cd-5248-4c80-be20-c1628ba91b03",547:"4f8ef35e-4f88-4a91-8504-50aa4c0b818c",548:"1363552b-404e-4934-8a63-e3722ac40985",549:"e93677d9-c599-40f5-a1e0-29f8e18703ff",550:"af62580e-21e5-492c-95fd-1f9269b8dce4",551:"940aa9a9-d8ba-40fe-8460-c2fd906a0187",552:"2326a266-af06-471d-91ac-2922aa209e6e",554:"dff034f0-d1e4-4863-aa9f-9fc92e92467f",555:"ff0b8d68-96a0-43f1-ae16-43d04f32bcf3",560:"e741c190-7589-4ab2-9a85-8668b3c4210a",561:"2df094ca-b6bd-4ca1-aeb3-be207554ddba",562:"a36349f7-a54a-47e2-9847-3400811999f7",563:"757fd180-0ff6-45e1-97c2-aa98f96f555b",564:"eb5cd5c8-25dd-4f7f-a72b-441a22e0f741",565:"505ae35e-457c-4dfb-a633-170572a4cdd7",566:"6681990d-e0bb-405f-96d5-959779ec0ca8",567:"9c4f6c89-7f71-445e-8471-2a3ea3c9629c",568:"5f381732-e54c-4979-b8fd-aca5397c8c6b",569:"2561442e-2c52-47f9-9a7e-2a20636e4498",570:"9e3ab9de-9b8a-4f21-8b6f-29edc0a1ba40",571:"a0d3dd32-5238-43b2-b475-603291ec6c92",572:"f70cce4d-e26c-4b8d-8ec4-13d249d99897",573:"2040e562-f68c-4c50-a6fe-1261dd1a266c",576:"cbfdca48-c3aa-438f-a67f-4d26d317e74d",577:"fd84b30d-b484-4f4d-9b46-e9f3976001cb",578:"f027a0e2-6d68-4e54-93ec-8e98fe5c2fe9",579:"4ce8d681-6a12-4845-b10f-ebf42407afde",580:"0ca8c9f6-2491-4de5-9bbd-5bd7f11c4279",581:"5c30e061-478b-4eb3-aa29-cb10ee3c1ffa",582:"29f4b7f5-e3ba-446e-8cfc-72b5989ea676",583:"8e9027db-2ad9-484f-8cf8-bcde815666ad",584:"579ffa03-9580-492c-ad39-52b5e4c1ab41",585:"298d257a-cfc4-410f-b88f-7490a5919f60",586:"8d7d1956-7cae-43f6-ae50-5e6c864b27c5",587:"4e95401f-26d8-4579-95aa-92c2e0848e17",588:"07a17daa-a30a-41e8-8a5c-341c2141910d",589:"bfea05f6-bb3d-472d-ad13-2601f2f565e1",590:"7aa91b45-f736-468b-a230-f701e4e5d537",591:"a898481f-808d-48dd-91db-cb9441348489",592:"6f2053ec-0878-4085-a82c-82a175a34a24",594:"699b2e8b-3fa0-41d7-a611-5afa37d8a5db",595:"edb041a3-1ca6-4227-aad1-375d9f64152f",596:"76bfd317-9e3d-4aaf-ac97-6feec08665a4",597:"bb0e4fe9-0e05-42b9-a1c6-8661eb5af225",598:"239994b5-7083-45e2-a3ad-e50ca244de35",601:"3e8bba0f-fc57-4411-8180-ac8948aa48ed",602:"cb5e8924-3786-4bf9-bba2-093015746764",604:"6aa5e0b9-7545-4667-94a1-ae40a3a30948",605:"decb2378-402e-4aa8-8c3c-60d53a3eb645",606:"81b1f0c0-a916-418d-819e-503b6cf2e1db",607:"ce934a91-04c7-426f-8f15-e0e7cf286b95",609:"1a6c4a6b-6b28-4bd7-87c9-d6b85bd5214e",610:"2521f763-4cda-4591-a900-a22b2165e0a6",611:"6a8dfea7-4502-4076-bd16-b836a8c26dd8",612:"f510a78c-c78e-4925-aa9a-f39e27e598d7",613:"af15c3bd-ba60-44ff-a3a6-b92fd7809ad6",614:"62f060d8-fe93-442f-8ee8-8fd134c62dc0",615:"c7db91ad-cca1-4b93-9d2e-7405e26fab5d",616:"3cf83603-330a-4678-b0d4-2168d2f2eaee",617:"b8f1822d-03b5-4810-bae3-26ba898324c1",618:"c73d11f1-e4b7-41d6-bf14-a7b77d9c479d",619:"a49b5e5a-be60-4e4d-bd7d-d17997631f50",620:"be90c9bf-2ec5-4056-93a1-e110fb943698",622:"ec57fae7-32d4-47e6-8d8d-7e29facca662",623:"02fdb444-8d07-4d29-a6e0-d838bd055fd2",624:"e60eb95d-edd6-4059-aa5f-277638962bf4",625:"b1c32946-40e5-4300-a9e1-ffebeca08c8d",626:"071a9314-cf6e-4f72-96e3-1178184c8740",627:"d7f0d300-5a11-402c-8e3f-19799012508b",628:"58577cd9-84d6-4ed6-aecb-a29fb9caaee4",629:"fcae3fa5-7f32-4534-a4f5-b681d2703bdb",630:"6caba0df-9b6b-492c-afeb-b99819731377",631:"21b3713a-c1fc-400e-93fd-5549bff7bbbc",632:"84d242fd-9351-49af-b7bc-80c63b642562",633:"cd7aebb2-b11c-4d0a-b42b-6375df078236",634:"77d7d87e-aee7-4586-88fb-b32c02aba256",635:"9b53da2f-8af0-4c29-801e-5572b4069455",636:"533091ab-295a-4cfe-8125-bb510b2f2642",638:"ecf56d28-6b95-4e39-add2-2527fae268b4",639:"956e86c9-3164-409d-9601-4ee7a68f22ff",640:"5f0eacd7-0dcd-4326-9856-4a20f3601365",641:"0b472392-029d-4f18-b03a-30585867d61c",642:"69653e47-a7bd-4d50-9d61-5e472da55d51",643:"6c070d30-d2d9-4f65-ba99-0e0c593e0374",644:"c9d43dce-e6fe-4893-be1a-57c7bd5d199c",645:"aba58103-a05e-47e6-90fb-8dcf6f46756b",647:"37a4238b-4bcf-4da7-9853-d249281c53fc"}},29738:(k,B,U)=>{"use strict";U.d(B,{s:()=>H,O:()=>K});var F=U(8674),G=U(62459),j=U(86663);const $=(0,U(77601).gb)({key:"rpg-game-locale-control",activateAssociatedExperiments:0,default:{enabled:!1}});var H,V=U(35120),W=U(76277),q=U(19850);!function(k){k.EnUs="en-us",k.Es="es",k.PtBr="pt-BR",k.DeDe="de",k.FrFr="fr",k.JaJp="ja"}(H||(H={}));class K{static get localeCode(){return this._localeCode}static determineLocale(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=j.qg(window.location.search);if(K.setLocaleCodeByString(null!==(k=B.locale)&&void 0!==k?k:B.lang))return;const U=yield this.getLocaleFromGraphQL();K.setLocaleCodeByString(U)}))}static setHTMLLangAttribute(k){document.documentElement.lang=k}static setLocaleCodeByString(k){var B;const U=null!==(B=null==k?void 0:k.toLowerCase())&&void 0!==B?B:"";if(this.isValidLocale(U))return this._localeCode=U,this.setHTMLLangAttribute(this._localeCode),!0;const F=`${U.split("-")[0]}-`;for(const G of Object.values(H))if(G.startsWith(F))return this._localeCode=G,this.setHTMLLangAttribute(this._localeCode),!0;return!1}static isEnglishLocale(){return this._localeCode===H.EnUs}static isValidLocale(k){return Object.values(H).includes(k)}static getLocaleFromGraphQL(){return(0,F.sH)(this,void 0,void 0,(function*(){try{const k=V.q.instance.prodigy.gameContainer.get("40f-f847");yield k.loginPromise;const B=V.q.instance.prodigy.gameContainer.get("8bb-7057");return(yield B.sendRequest("query PlayerLocale { viewer { languageTag } }")).data.viewer.languageTag}catch(e){return void G.RQr.logError(e,"Error fetching locale from GraphQL")}}))}static tryApplyLocaleOverrideFromFeatureProvider(){const k=(0,W.G)($);if(k.enabled&&G.Aq$.isDefined(k.overrideLocale)){if(K.setLocaleCodeByString(k.overrideLocale)){const k=new q.K(K.localeCode);V.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).setDataSource(k)}}}}K._localeCode=H.EnUs},34829:(k,B,U)=>{"use strict";U.d(B,{A:()=>j,s:()=>G});var F=U(62459);class G{static get(k){return this.constants[k]}static set(k,B){this.constants[k]=B}static setLogLevel(k){if("number"==typeof k)F.VyI.setLogLevel(k);else switch(k){case"dev":case"verbose":case"all":F.VyI.setLogLevel(F.$bb.Verbose);break;case"warn":F.VyI.setLogLevel(F.$bb.Warning);break;case"error":default:F.VyI.setLogLevel(F.$bb.Error)}}static setDrops(k,B){0}static setSpawnRandomization(k){0}static getSpawnRandomization(){return!1}static setGameConstant(k,B){this.constants[k]=B}static addExperimentConstant(k){0}static setNFactor(k){0}static setCrit(k){0}static setEscapeChance(k){0}static setBench(k){0}static scaleEncounterDistance(k){0}static setRespawnTime(k=120){0}static getGameSpeed(){0}static setGameSpeed(k){0}static setFeedLimit(k){0}static overrideUserRank(k){0}static overrideUserPoints(k){0}static setUnlimitedWheelSpins(k){0}static setWheelSpinDuration(k){0}static setMonsterRadiusVisible(k){0}static setMonsterSpawnDebugLogging(k=!0){0}static setMaintainAspectRatio(k){0}static overrideLastLogin(k){0}static overrideDateToday(k){0}static resetMaxPlayerLimit(){return!!G.isMaxOnScreenOrigSet&&(this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_MOBILE"]=G.maxOnScreenPlayersMobileOrig,this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_PC"]=G.maxOnScreenPlayersPCOrig,!0)}static setMaxPlayerLimit(k){G.isMaxOnScreenOrigSet||(G.isMaxOnScreenOrigSet=!0,G.maxOnScreenPlayersMobileOrig=this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_MOBILE"],G.maxOnScreenPlayersPCOrig=this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_PC"]),F.o5U.isMobile()?this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_MOBILE"]=k:this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_PC"]=k}static getMaxPlayerLimit(){return F.o5U.isMobile()?this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_MOBILE"]:this.constants["GameConstants.Build.MAX_ON_SCREEN_PLAYERS_PC"]}static setKillGore(k){0}static setForceCast(k){this.constants["GameConstants.Battle.FORCE_CAST"]=k}static setForceOpponentCast(k){0}static setMorphDuration(k){0}static setCharacterCreationDate(k,B,U,F=0,G=0){0}static setSplitTestLane(k){this.constants["GameConstants.Features.SplitTests.DEBUG_LANE"]=k}static setHardCodedItemTablesAwardAll(k){0}static getHardCodedItemTablesAwardAll(){return!1}static setFreeBattleRewards(k){0}static setMemberBattleRewards(k){0}static getFreeBattleRewards(){return null}static getMemberBattleRewards(){return null}}G.constants=window.__PNP_CONSTANTS_RAW__={"GameConstants.Build.VERSION":"2026.25.0","GameConstants.Build.SHOW_FPS":!1,"GameConstants.Build.SHOW_DEBUG_VALUES":[],"GameConstants.Build.MUTE_BGM":!1,"GameConstants.Build.FRAMEWORK_LOG_LEVEL":2,"GameConstants.Build.ASSETS_LOCATION":"https://cdn.prodigygame.com/game/assets/","GameConstants.Build.ASSETS_FOLDER":"v1_cache","GameConstants.Build.TELEPORT":"","GameConstants.Build.QUEST":[],"GameConstants.Build.ITEM_TYPE":[],"GameConstants.Build.KILL_GORE":!1,"GameConstants.Build.EASY_MODE":!1,"GameConstants.Build.MEMBERSHIP":!1,"GameConstants.Build.SCALE_MODE":0,"GameConstants.Build.ADD_PLAYER_FPS_THRESHOLD_LIMIT":20,"GameConstants.Build.ADD_PLAYER_FPS_THRESHOLD_RENABLE":25,"GameConstants.Build.MAX_ON_SCREEN_PLAYERS_PC":30,"GameConstants.Build.MAX_ON_SCREEN_PLAYERS_MOBILE":20,"GameConstants.Build.MAX_ON_SCREEN_FPS_LIMITED":5,"GameConstants.Build.MIN_ON_SCREEN_PLAYERS":5,"GameConstants.Build.SKIN_FOREGROUND_FPS_THRESHOLD_LIMIT":25,"GameConstants.Build.ENABLE_FRAMERATE_METRICS":!0,"GameConstants.Build.ENABLE_LOADING_METRICS":!0,"GameConstants.Build.ENABLE_ADVANCED_METRICS":!0,"GameConstants.Build.DRAW_TRIGGERS":!1,"GameConstants.Tower.MAX_FREE_MEMBER_FLOOR":5,"GameConstants.Debug.AUTOSAVE_ENABLED":!0,"GameConstants.Debug.POPUPS_ENABLED":!0,"GameConstants.Debug.PLAYER_CARDS_ENABLED":!0,"GameConstants.Debug.ENABLE_MAP":!1,"GameConstants.Debug.BYPASS_ENTRY_SCREENS":!1,"GameConstants.Debug.GET_PET":[],"GameConstants.Debug.SET_LEVEL":0,"GameConstants.Debug.DISABLE_ACHIEVEMENTS":!1,"GameConstants.Debug.GET_GOLD":0,"GameConstants.Debug.GET_SPELL":0,"GameConstants.Debug.COMPLETE_TUTORIAL":!1,"GameConstants.Debug.FORCE_DROPS":[],"GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE":1,"GameConstants.Debug.MONSTER_RESPAWN_TIME":120,"GameConstants.Debug.WIZARDS_ENABLED":!0,"GameConstants.Debug.AUTO_RESOLVE_BATTLES_ENABLED":!1,"GameConstants.Debug.GAME_SPEED":1,"GameConstants.Debug.FAST_GAME_SPEED":0,"GameConstants.Debug.FSM_LOGGING":!1,"GameConstants.Debug.DEBUG_LOCALIZATION":!1,"GameConstants.Debug.VERBOSE_LOCALIZATION":!1,"GameConstants.Debug.AUTO_RESOLVE_TOWER_BATTLES_ENABLED":!1,"GameConstants.Debug.EDUCATION_ENABLED":!0,"GameConstants.Debug.EDUCATION_LOGGING_ENABLED":!1,"GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT":1,"GameConstants.Debug.UNLIMITED_WHEEL_SPINS":!1,"GameConstants.Debug.SKIP_MEMBERSHIP_WEBSITE":!1,"GameConstants.Debug.GIVES_MEMBERSHIP_AFTER_SKIP_WEBSITE":!1,"GameConstants.Debug.MONSTER_RADIUS_VISIBLE":!1,"GameConstants.Debug.MONSTER_SPAWN_LOGGING_ENABLED":!1,"GameConstants.Debug.CLOSE_BATTLE_RESULTS_SCREEN":!1,"GameConstants.Debug.ADD_FAKE_PLAYERS_TO_SCREEN":0,"GameConstants.Debug.WINNER_EVERY_TIME":!1,"GameConstants.Debug.DEBUG_TEST_SCREEN":!1,"GameConstants.Debug.NEXT_SKILL_ID":void 0,"GameConstants.Debug.PA_COOLDOWN_EXPIRED":void 0,"GameConstants.Debug.DEPRECATED_IOS":!1,"GameConstants.Debug.SCHOOL_START_HOUR":8,"GameConstants.Debug.SCHOOL_END_HOUR":16,"GameConstants.Debug.USER_DATA_PLATFORM":void 0,"GameConstants.Mailer.TEST_MAIL":!1,"GameConstants.FriendsList.TEST_FRIENDS_LIST":!1,"GameConstants.Debug.ENV_URL":"","GameConstants.Features.ENABLE_HOUSE_MOVING":!0,"GameConstants.Features.Wheel.COOLDOWN":5,"GameConstants.Features.Wheel.DEFAULT_SPINS":1,"GameConstants.Features.Wheel.MEMBER_SPINS":2,"GameConstants.Features.Wheel.SPIN_TIME":15e3,"GameConstants.Features.SplitTests.PLAY_AT_HOME":!0,"GameConstants.Features.SplitTests.CHARACTER_CREATION_TIME":0,"GameConstants.Features.LevelLock.ACADEMY":15,"GameConstants.Features.ParentLink.TIMEOUT":864e5,"GameConstants.Features.DailyQuestions.NOTIFICATION_TIMEOUT":9e5,"GameConstants.Features.ENABLE_MONSTER_SPAWNING":!0,"GameConstants.Battle.VALID_PARENT_EMAIL_STARS_PERCENTAGE":.05,"GameConstants.Battle.MEMBER_STARS_PERCENTAGE":.5,"GameConstants.Battle.MAX_NUM_PETS":1,"GameConstants.Battle.ATTACK_DAMAGE_OVERRIDE":null,"GameConstants.Battle.ESCAPE_CHANCE":.75,"GameConstants.Battle.CATCH_COST":50,"GameConstants.Battle.CATCH_COST_GOLD":500,"GameConstants.Battle.ALWAYS_SWITCH":!1,"GameConstants.Battle.FORCE_CAST":-1,"GameConstants.Battle.FORCE_OPPONENT_CAST":-1,"GameConstants.Battle.ENEMY_ACCURACY_OVERRIDE":-1,"GameConstants.Battle.SET_BENCH":null,"GameConstants.Battle.FORCE_TARGETING_ENABLED":!1,"GameConstants.Battle.AUTOMATION_ACTIONS":[],"GameConstants.Battle.AUTO_ATTACK_ENABLED":!1,"GameConstants.Battle.AUTO_ATTACK_PAUSE":!1,"GameConstants.Battle.AUTO_ATTACK_TARGET":0,"GameConstants.Battle.SKIP_ENEMY_TURN":!1,"GameConstants.Battle.SKIP_PLAYER_TURN":!1,"GameConstants.Battle.HIDE_TEMP_HEALTHBAR":!1,"GameConstants.Battle.SHOW_HITBOXES":!1,"GameConstants.Mira.MAX_HP":1e5,"GameConstants.Mira.DIFFICULTY":10,"GameConstants.Grandoff.MAX_HP":12e3,"GameConstants.Grandoff.DIFFICULTY":3,"GameConstants.Pippet.MAX_HP":null,"GameConstants.Pippet.DIFFICULTY":3,"GameConstants.Cebollini.MAX_HP":null,"GameConstants.Cebollini.DIFFICULTY":8,"GameConstants.ShadowGerald.MAX_HP":null,"GameConstants.ShadowGerald.DIFFICULTY":7,"GameConstants.Gerald.MAX_HP":null,"GameConstants.Gerald.DIFFICULTY":8,"GameConstants.OldOne.MAX_HP":null,"GameConstants.OldOne.DIFFICULTY":8,"GameConstants.IceWyrm1.MAX_HP":null,"GameConstants.IceWyrm1.DIFFICULTY":8,"GameConstants.IceWyrm2.MAX_HP":null,"GameConstants.IceWyrm2.DIFFICULTY":8,"GameConstants.FrostyStorm.MAX_HP":null,"GameConstants.FrostyStorm.DIFFICULTY":8,"GameConstants.StormyStorm.MAX_HP":null,"GameConstants.StormyStorm.DIFFICULTY":8,"GameConstants.RainyStorm.MAX_HP":null,"GameConstants.RainyStorm.DIFFICULTY":8,"GameConstants.SandyStorm.MAX_HP":null,"GameConstants.SandyStorm.DIFFICULTY":8,"GameConstants.Inactivity.DIALOG_TIMER_SECONDS":1500,"GameConstants.Inactivity.LOG_OUT_TIMER_SECONDS":300,"GameConstants.Inactivity.CANNOT_CONNECT_TIMER_SECONDS":120,"GameConstants.Inactivity.NETWORK_BOOT_TIMER_SECONDS":6e4,"GameConstants.Audio.DEFAULT_SOUND_VOLUME":.5,"GameConstants.Audio.DEFAULT_MUSIC_VOLUME":.25,"GameConstants.Audio.DEFAULT_VOICE_VOLUME":.5,"GameConstants.LocationSelection.NONE":"none","GameConstants.LocationSelection.HOME":"home","GameConstants.LocationSelection.SCHOOL":"school","GameConstants.PVP.INVITE_TIMEOUT":6e4,"GameConstants.PVP.OVERRIDE_USER_RANK":null,"GameConstants.PVP.OVERRIDE_USER_POINTS":null,"GameConstants.PVP.OVERRIDE_USER_LEADERBOARD":null,"GameConstants.PVP.BOT_TEAM":null,"GameConstants.PVP.TIMER_ENABLED":!0,"GameConstants.PVP.STARS_PER_QUESTION":10,"GameConstants.TITAN.HP_MULTIPLIER":1.5,"GameConstants.CO_OP_TITAN.TITAN_HP":10,"GameConstants.CO_OP_TITAN.CRYSTAL_HP":5,"GameConstants.CO_OP_TITAN.ATTACK_FREQUENCY":2,"GameConstants.CO_OP_TITAN.TITAN_DIFFICULTY":5,"GameConstants.CO_OP_TITAN.TITAN_BOUNTY":10,"GameConstants.CO_OP_TITAN.HOST_HEARTBEAT_TIME":5e3,"GameConstants.CO_OP_TITAN.CLIENT_HEARTBEAT_TIMEOUT":2e4,"GameConstants.DailyQuestions.OVERRIDE_LAST_LOGIN":-1,"GameConstants.DailyQuestions.OVERRIDE_DATE_TODAY":-1,"GameConstants.MorphMarbles.MORPH_DURATION_OVERRIDE":null,"GameConstants.Network.CORTEX_ROOT":void 0},G.isMaxOnScreenOrigSet=!1,G.DAY_IN_MS=864e5,G.HOURS_IN_MS=36e5,G.MINUTES_IN_MS=6e4,G.SECONDS_IN_MS=1e3,G.MAX_SAFE_INTEGER=9007199254740991,G.TOWER_COMMON_ROOM_SHORTFORM="CR",G.TOWER_WARDEN_ROOM_SHORTFORM="WR",G.TARGET_FPS_40_MS=25,G.SECONDS_TO_MILLISECONDS_MULTIPLIER=1e3;const j=G},84643:(k,B,U)=>{"use strict";U.d(B,{h:()=>$});var F=U(8674),G=U(79687),j=U(13956);let $=class{debugSetConstant(k,B){0}get spawnCooldownDurationSeconds(){return this._encounterConstantsProvider.constants.spawnCooldownDuration}get weightedEncounterLevelProbabilities(){const k=this._encounterConstantsProvider.constants;return{same:k.spawnLevelChanceSame,lower:k.spawnLevelChanceLower,higher:k.spawnLevelChanceHigher}}get weightedBenchLevelProbabilities(){const k=this._encounterConstantsProvider.constants;return{same:k.benchLevelChanceSame,lower:k.benchLevelChanceLower,lowest:k.benchLevelChanceLowest}}get threatIndicatorLevel(){return this._encounterConstantsProvider.constants.threatIndicatorLevel}get encounterRatesPerDifficultyModeAndRarity(){return this._encounterConstantsProvider.constants.encounterRatesPerRarity}get encounterRatesPerDifficultyModeAndEvolutionTier(){return this._encounterConstantsProvider.constants.encounterRatesPerEvolutionTier}};(0,F.Cg)([(0,j.b)("cd4-b78f"),(0,F.Sn)("design:type",Object)],$.prototype,"_encounterConstantsProvider",void 0),$=(0,F.Cg)([(0,G.injectable)()],$)},19850:(k,B,U)=>{"use strict";U.d(B,{K:()=>$});var F,G=U(62459);!function(k){k.LocalizedText_csv="fc0987d5-cf10-4938-851b-164d261a026a"}(F||(F={}));var j=U(23029);class ${constructor(k){this.dataLoadPromise=new G.bnh,j.R.loadExternalData(F.LocalizedText_csv,{tag:k,isCancellable:!1}).then((k=>{this._languageData=k,this.dataLoadPromise.resolve()})).catch((k=>{G.RQr.logError(k,"Failed to load local localization data"),this.dataLoadPromise.reject(k)}))}getValue(k){return this._languageData?this._languageData[k]:(G.VyI.log(`Language data not yet available. Failed to fetch key ${k}`,G.$bb.Warning),null)}}},23029:(k,B,U)=>{"use strict";U.d(B,{R:()=>V});var F=U(8674),G=U(62459);const j=JSON.parse('{"c56d5e8f-8ae7-4fe2-9771-58bd051834ca":{"battleConstants":{"baseLevelMinimum":1,"baseLevelMaximum":100,"baseLevelMaximumConfig":{"regular":100,"hard":150,"expert":200},"aoaSpellId":"1100","rescueSpellId":"1101","fumbleSpellId":"1103","multipliers":{"physical":1,"stabElement":0,"criticalHit":0.5,"finalDamage":1,"mythicDamage":1,"mythicHealth":2.5,"enemyNerf":{"min":0.72,"bonus":0.28},"hitChanceScaling":{"chanceHitOffset":0.780214333333333,"chanceHitCoefSquared":0.00000372024,"chanceHitCoefPrime":0.0013244}},"minimumHitChance":0.55,"maximumHitChance":1,"primaryStatModifier":{"tier1":0.25,"tier2":0.4},"secondaryStatModifier":{"tier1":0.15,"tier2":0.25},"equipmentModifierBaseValues":{"health":500,"power":200},"divisors":{"level":25,"aoa":3,"physical":4,"magical":2,"speedCrit":13650,"enemyNerf":34,"mergeRank":10},"damageRange":{"aoa":{"min":100,"max":9999},"spell":{"min":1,"max":9999}},"elementalMultiplier":[{"name":"physical","weakness":"neutral","resistance":"neutral","data":{"astral":1,"fire":1,"ice":1,"physical":1,"plant":1,"shadow":1,"storm":1,"water":1,"neutral":1}},{"name":"fire","weakness":"water","resistance":"ice","data":{"astral":1,"fire":1,"ice":1.75,"physical":1,"plant":1,"shadow":1,"storm":1,"water":0.571428571,"neutral":1}},{"name":"ice","weakness":"fire","resistance":"plant","data":{"astral":1,"fire":0.571428571,"ice":1,"physical":1,"plant":1.75,"shadow":1,"storm":1,"water":1,"neutral":1}},{"name":"plant","weakness":"ice","resistance":"storm","data":{"astral":1,"fire":1,"ice":0.571428571,"physical":1,"plant":1,"shadow":1,"storm":1.75,"water":1,"neutral":1}},{"name":"storm","weakness":"plant","resistance":"water","data":{"astral":1,"fire":1,"ice":1,"physical":1,"plant":0.571428571,"shadow":1,"storm":1,"water":1.75,"neutral":1}},{"name":"water","weakness":"storm","resistance":"fire","data":{"astral":1,"fire":1.75,"ice":1,"physical":1,"plant":1,"shadow":1,"storm":0.571428571,"water":1,"neutral":1}},{"name":"shadow","weakness":"astral","resistance":"astral","data":{"astral":1.45,"fire":1,"ice":1,"physical":1,"plant":1,"shadow":1,"storm":1,"water":1,"neutral":1}},{"name":"astral","weakness":"shadow","resistance":"shadow","data":{"astral":1,"fire":1,"ice":1,"physical":1,"plant":1,"shadow":1.45,"storm":1,"water":1,"neutral":1}},{"name":"neutral","data":{"astral":1,"fire":1,"ice":1,"physical":1,"plant":1,"shadow":1,"storm":1,"water":1,"neutral":1}}],"rescue":{"damageThreshold":0.5},"minPlayerHeartsOnEndBattle":20,"ai":{"accuracyPenalty":{"max":0.3,"levelCap":30},"fumbleChanceIncrease":0.05},"difficultyStreak":{"min":-3,"max":2},"difficultyStreakBench":{"min":-1,"max":5},"difficultyStreakLoseStep":0.05,"difficultyStreakWinStep":0.025,"xp":{"base":10,"miniBoss":25,"singularBoss":100,"repeatableBoss":75,"illusionBoss":333,"finalBoss":1000,"cloakedWizard":20,"pippet":25,"mythic":30,"titan":30},"spawns":{"spawnLevelChanceSame":0.5,"spawnLevelChanceHigher":0.2,"spawnLevelChanceLower":0.3,"benchLevelChanceSame":0.45,"benchLevelChanceLower":0.35,"benchLevelChanceLowest":0.25,"spawnCooldownDuration":660,"threatIndicatorLevel":2,"encounterRatesPerRarity":{"regular":{"0":0.45,"1":0.35,"2":0.1,"3":0.07,"4":0.03},"hard":{"0":0.1,"1":0.2,"2":0.5,"3":0.15,"4":0.05},"expert":{"0":0.06,"1":0.12,"2":0.42,"3":0.25,"4":0.15}},"encounterRatesPerEvolutionTier":{"regular":{"1":1.5,"2":1.25,"3":1,"4":0},"hard":{"1":1,"2":1.25,"3":1,"4":0},"expert":{"1":1,"2":1.15,"3":1.5,"4":0}}},"unitStatDefaults":{"initiative":5}}},"3bf8a670-5afc-4113-8d51-eec627555d6a":{"ID":1,"name":"Rift Key 1","data":{"rarity":2}},"38f2fe53-fe57-4046-b642-cbf34807ddfb":{"ID":2,"name":"Rift Key 2","data":{"rarity":2}},"478eefb5-a10f-41c1-abb2-7b4a38d17193":{"ID":3,"name":"Rift Key 3","data":{"rarity":2}}}');var $=U(35120),H=U(95925);class V{static get _assetLoader(){var k;return null!==(k=this._cachedAssetLoader)&&void 0!==k?k:this._cachedAssetLoader=$.q.instance.prodigy.gameContainer.get(G.t5G.AssetLoader)}static get dataBundleLoadPromise(){return this._dataBundleLoadPromise}static initialize(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this._assetLoader.loadAssets([this.BUNDLE_ASSET_ID]),this._dataBundle=this._assetLoader.getAsset(this.BUNDLE_ASSET_ID,H.i.JSON),this._dataBundleLoadPromise.resolve()}))}static loadData(k){var B;return null!==(B=j[k])&&void 0!==B?B:this._dataBundle[k]}static loadExternalData(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U;const F=B.tag?`${k}_${B.tag}`:k;return null===(U=B.isCancellable)||void 0===U||U?yield this._assetLoader.loadAssets([F]):yield this._assetLoader.loadAssetsNotCancellable([F]),this._assetLoader.getAsset(F,H.i.JSON)}))}}V.BUNDLE_ASSET_ID="clientBundledData",V._dataBundleLoadPromise=new G.bnh},43846:(k,B,U)=>{"use strict";U.d(B,{k:()=>$});var F=U(62459),G=U(35120);let j;function $(k,...B){return null!=j||(j=G.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService)),j.getText(k,...B)}},1195:(k,B,U)=>{"use strict";U.d(B,{E:()=>Z});var F=U(8674),G=U(62459),j=U(79687),$=U(35120),H=U(70215),V=U(48235),W=U(73797),q=U(48813),K=U(88225),z=U(13956),Y=U(80403);class Q{get areAvailable(){return""!==this.password&&""!==this.username}get username(){var k;return null!==(k=this._username)&&void 0!==k?k:""}get password(){var k;return null!==(k=this._password)&&void 0!==k?k:""}constructor(){this.fetchLoginCredentials()}fetchLoginCredentials(){this.ready||(this.ready=new Promise(((k,B)=>{this._gqlRequestSender.sendRequest("query PlayerLoginDetails { viewer { username password } }",void 0,void 0,{retryCount:3}).then((B=>{var U,F;if(!(null===(F=null===(U=null==B?void 0:B.data)||void 0===U?void 0:U.viewer)||void 0===F?void 0:F.password))throw new Error("[Fetch Login Credentials] Login details not found in response.");this._username=B.data.viewer.username,this._password=B.data.viewer.password,k()})).catch((k=>{K.captureException(k),G.RQr.logError(k,"Failed to get player login details"),B(new Error("Failed to get player login details."))}))})))}}(0,F.Cg)([(0,z.b)("8bb-7057"),(0,F.Sn)("design:type",Y.K)],Q.prototype,"_gqlRequestSender",void 0);var X=U(82209);let Z=class extends X.z{constructor(){super(...arguments),this._activeMemberships=[],this.onStatChanged=new G.HN0}get player(){return this._player}get loginCredentials(){return this._loginCredentials}get activeMemberships(){return this._activeMemberships}initialize(k){this._player=k,$.q.instance.game.broadcaster.addAppListener(W.H3.MembershipResponseReceived,this.refreshMembershipData,this,void 0,!0)}initLoginCredentials(){var k;this._loginCredentials=null!==(k=this._loginCredentials)&&void 0!==k?k:new Q,Promise.all([this._loginCredentials.ready,q.T.ready]).then((()=>{V.W.checkMemberUpgradeReward().catch(G.RQr.createHandler("Failed to check member upgrade reward")),this._player.name.setFallbackName(this._loginCredentials.username)})).catch(G.RQr.createHandler("Failed to set fallback name for logged-in player"))}logout(){this._player&&(this._player.saveEnabled=!1,this._player=null,$.q.instance.game.broadcaster.removeAppListener(W.H3.MembershipResponseReceived,this.refreshMembershipData,this)),this.onStatChanged.dispose()}addStars(k){const B=this._player.data.stars,U=this.getLevel(),F=this.getBaseHearts();this._player.addStars(k),this.dispatchStatChange(H.$.Stars,this._player.data.stars,B);const G=this.getLevel();if(G>U){this.dispatchStatChange(H.$.Level,G,U),this.dispatchStatChange(H.$.MaxHearts,this.getBaseHearts(),F);const k=this._player.getBamSpells(U),B=this._player.getBamSpells(G);for(let U=0;U{"use strict";U.d(B,{z:()=>H});var F=U(8674),G=U(79687),j=U(95891),$=U.n(j);let H=class{constructor(){this._player=null}get player(){return this._player}initialize(k){this._player=k}getFirstName(){return this._player.appearance.name.getFirstName()}getMiddleName(){return this._player.appearance.name.getMiddleName()}getLastName(){return this._player.appearance.name.getLastName()}getNickname(){return this._player.appearance.name.getNickname()}getAppearance(){const k=this._player.appearance,B=this._player.equipment;return{face:k.getFace(),hair:{style:k.getHair().style,color:k.getHair().color},hat:B.getHat(),skin:k.getSkinColor(),eyeColor:k.getEyeColor(),outfit:B.getOutfit(),boot:B.getBoots(),weapon:B.getWeapon(),costume:B.getCostume()}}getStars(){return this._player.getPlayerData().stars}getUserID(){return this._player.userID}getLevel(){return this._player.getLevel()}getChargedLevel(){return this._player.getChargedLevel()}getChargedLevelCap(){return this._player.getChargedLevelCap()}getChargedLevelData(){return $().clone(this._player.data.chargedLevelData)}getBaseHearts(){return this._player.getBaseMaxHearts(this.getLevel())}isMember(){return this._player.hasMembership()}isActivePlayer(){return!1}};H=(0,F.Cg)([(0,G.injectable)()],H)},47008:(k,B,U)=>{"use strict";U.d(B,{W:()=>$});var F=U(8674),G=U(79687),j=U(325);let $=class{constructor(){this._subject=j.Q.Math}initialize(k){switch(k){case"ELA":this._subject=j.Q.ELA;break;case"SCIENCE":this._subject=j.Q.Science;break;case"MATH":default:this._subject=j.Q.Math}}getSubject(){return this._subject}};$=(0,F.Cg)([(0,G.injectable)()],$)},16571:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";var tslib__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(8674),_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(62459),_misc_components_EComponentPath__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(28152),_IDataProviderComponent__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(44317);let DataEvalComponent=class DataEvalComponent extends _prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.uAl{constructor(){super(...arguments),this.dataProviders=[],this.condition="{0} === {1}",this.evaluateOnCreate=!0,this.onTrue=new _prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.HN0,this.onFalse=new _prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.HN0,this.onResult=new _prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.HN0}create(){super.create(),this.evaluateOnCreate&&this.evaluate()}destroy(){this.onTrue.dispose(),this.onFalse.dispose(),this.onResult.dispose(),super.destroy()}evaluate(){const values=this.dataProviders.map((k=>k.getData())),windowVars={Utils:_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.Aq$},oldWindowValues={};for(const k in windowVars)oldWindowValues[k]=window[k],window[k]=windowVars[k];const finalCondition=this.condition.replace(/{(\d+)}/g,((k,B)=>`values[${B}]`)),result=eval(finalCondition);return Object.assign(window,oldWindowValues),result?this.onTrue.dispatch():this.onFalse.dispatch(),this.onResult.dispatch(result),result}};(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.SZi)(),(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.MnK)(_IDataProviderComponent__WEBPACK_IMPORTED_MODULE_2__._),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Sn)("design:type",Array)],DataEvalComponent.prototype,"dataProviders",void 0),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.W_S)(),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Sn)("design:type",String)],DataEvalComponent.prototype,"condition",void 0),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.vkK)(),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Sn)("design:type",Boolean)],DataEvalComponent.prototype,"evaluateOnCreate",void 0),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.bbQ)(),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Sn)("design:type",_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.HN0)],DataEvalComponent.prototype,"onTrue",void 0),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.bbQ)(),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Sn)("design:type",_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.HN0)],DataEvalComponent.prototype,"onFalse",void 0),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.bbQ)(),(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Sn)("design:type",_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.HN0)],DataEvalComponent.prototype,"onResult",void 0),DataEvalComponent=(0,tslib__WEBPACK_IMPORTED_MODULE_3__.Cg)([(0,_prodigy_game_framework__WEBPACK_IMPORTED_MODULE_0__.EVk)("DataEval",_misc_components_EComponentPath__WEBPACK_IMPORTED_MODULE_1__.Y.data,"Evaluates conditions from data providers")],DataEvalComponent)},44317:(k,B,U)=>{"use strict";U.d(B,{_:()=>j});var F=U(8674),G=U(62459);let j=class extends G.uAl{constructor(){super(...arguments),this._onDataRelay=new G.HN0,this._relayedDataIsSpreadArray=!1}getData(){throw new Error("Method not implemented.")}relayData(){const k=this.getData();Array.isArray(k)&&this._relayedDataIsSpreadArray?this._onDataRelay.dispatch(...k):this._onDataRelay.dispatch(k)}destroy(){this._onDataRelay.dispose(),super.destroy()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"_onDataRelay",void 0),(0,F.Cg)([(0,G.vkK)({toolTip:"Is the relayed data an array that should be spread when dispatched? Useful when the listener function requires multiple parameters."}),(0,F.Sn)("design:type",Boolean)],j.prototype,"_relayedDataIsSpreadArray",void 0),j=(0,F.Cg)([(0,G.EVk)("IDataProviderComponent")],j)},35757:(k,B,U)=>{"use strict";U.d(B,{u:()=>$});var F=U(62459),G=U(77938),j=U(88022);class ${constructor(){this.legacyData=null,this.legacyData=U(7640)}get(k){const B=G.t.getItem("dialogue",k);let U=null;return B?(U=B.data,""===U.avatar.frameName&&(U.avatar.frameName="face_0")):F.VyI.log(`Failed to find dialogue item with id: ${k}`,F.$bb.Error),U}getLegacy(k,B){let U=null;if(F.Aq$.isDefined(this.legacyData[k])){const G=this.legacyData[k][B];F.Aq$.isDefined(G)?(U=$.createDefaultData(),U.nameKey=$.LEGACY_ATLAS_IDS[k].name,U.avatar.atlas=$.LEGACY_ATLAS_IDS[k].atlas,F.Aq$.isDefined(G.face)&&(U.avatar.frameName=`face_${G.face}`),F.Aq$.isDefined(G.anim)&&(U.avatar.animationMod=`${G.anim}`),F.Aq$.isDefined(G.textKey)&&(U.textKey=G.textKey),F.Aq$.isDefined(G.audio)&&(U.audio.tag=G.audio.tag,U.audio.s=G.audio.s,U.audio.d=G.audio.d),F.Aq$.isDefined(G.dimmed)&&(U.avatar.dimmed=G.dimmed)):F.VyI.log(`Failed to find legacy dialogue index: ${B} for key: ${k}`,F.$bb.Error)}else F.VyI.log(`Failed to find legacy dialogue key: ${k}`,F.$bb.Error);return U}static createDefaultData(){return{nameKey:"",textKey:"",avatar:{atlas:"",frameName:"",animationMod:"",spineAttachment:""},audio:{tag:"",s:0,d:1}}}}$.LEGACY_ATLAS_IDS={benni:{atlas:j._.Npc_face_benni_json,name:"NPC_NAME_BENNI"},bok:{atlas:j._.Npc_face_bok_json,name:"SHIVERCHILL_GUARDIAN"},boombox:{atlas:j._.Npc_face_boombox_json,name:"NPC_NAME_BOOMBOX"},broccolina:{atlas:j._.Npc_face_broccolina_json,name:"NPC_NAME_BROCCOLINA"},cebollini:{atlas:j._.Npc_face_cebollini_json,name:"NPC_NAME_CEBOLLINI"},clankboot:{atlas:j._.Npc_face_clankboot_json,name:"NPC_NAME_CLANKBOOT"},cumulo:{atlas:j._.Npc_face_cumulo_json,name:"NPC_NAME_CUMULO"},eugene:{atlas:j._.Npc_face_eugene_json,name:"NPC_NAME_EUGENE"},eve:{atlas:j._.Npc_face_eve_json},flora:{atlas:j._.Npc_face_flora_json,name:"NPC_NAME_FLORA"},florian:{atlas:j._.Npc_face_florian_json,name:"NPC_NAME_FLORIAN"},gale:{atlas:j._.Npc_face_gale_json,name:"NPC_NAME_GALE"},guard:{atlas:j._.Npc_face_guard_json,name:"NPC_NAME_GUARD"},harvey:{atlas:j._.Npc_face_harvey_json,name:"NPC_NAME_HARVEY"},howard_cornelius:{atlas:j._.Npc_face_howard_cornelius_json,name:"NPC_NAME_HOWARD_CORNELIUS"},julia_ghoulia:{atlas:j._.Npc_face_julia_ghoulia_json,name:"NPC_NAME_JULIA_GHOULIA"},mama_star:{atlas:j._.Npc_face_mamastar_json,name:"NPC_NAME_MAMA_STAR"},merchant:{atlas:j._.Npc_face_merchant_json,name:"NPC_NAME_MERCHANT"},mira:{atlas:j._.Npc_face_mira_json,name:"NPC_NAME_MIRA_SHADE"},morris:{atlas:j._.Npc_face_morris_json,name:"NPC_NAME_MORRIS"},"mozza-ella":{atlas:j._.Npc_face_mozza_ella_json,name:"NPC_NAME_MOZZA_ELLE"},mugs:{atlas:j._.Npc_face_mugs_json,name:"NPC_NAME_MUGS"},noot:{atlas:j._.Npc_face_noot_json,name:"NPC_NAME_NOOT"},pippet:{atlas:j._.Npc_face_pippet_json,name:"NPC_NAME_PIPPET"},puppetmaster:{atlas:j._.Npc_face_puppetmaster_raster_json,name:"NPC_NAME_PUPPETMASTER"},scoog:{atlas:j._.Npc_face_scoog_json,name:"NPC_NAME_PROFESSOR_SCOOG"},slime_guard:{atlas:j._.Npc_face_slime_guard_json,name:"NPC_NAME_GUARD_SLIME"},slime_queen:{atlas:j._.Npc_face_slime_queen_json,name:"NPC_NAME_QUEEN_GOO_LIA"},slime_worker:{atlas:j._.Npc_face_slime_worker_json,name:"NPC_NAME_WORKER_SLIME"},slurpy:{atlas:j._.Npc_face_slurpy_json,name:"NPC_NAME_SLURPY"},stache:{atlas:j._.Npc_face_stache_json,name:"NPC_NAME_STACHE"},toy:{atlas:j._.Npc_face_toy_json,name:"NPC_NAME_TOY_MERCHANT"},wizard:{atlas:j._.Npc_face_wizard_json,name:"NPC_NAME_WIZARD"},"bargo-bunny":{atlas:j._.Npc_face_bargo_bunny_json,name:"NPC_NAME_BARGO"},"don-zorro":{atlas:j._.Npc_face_don_zorro_json,name:"NPC_NAME_DON_ZORRO"},verna:{atlas:j._.Npc_face_verna_json,name:"NPC_NAME_VERNA"},harriet:{atlas:j._.Npc_face_harriet_json,name:"NPC_NAME_HARRIET_HOOD"},"sir-vey":{atlas:j._.Npc_face_sir_vey_json,name:"NPC_NAME_SIR_VEY"},potion:{atlas:j._.Npc_face_potion_json,name:"NPC_NAME_SCIENTIST_SLIME"},windsail:{atlas:j._.Npc_face_windsail_json,name:"NPC_NAME_EVE"},swoopy:{atlas:j._.Npc_face_swoopy_json,name:"NPC_NAME_SWOOPY"},jim:{atlas:j._.Npc_face_jim_json,name:"NPC_NAME_JELLY_JIM"},fishthing:{atlas:j._.Npc_face_fishthing_json,name:"NPC_NAME_MERCHANT"}}},23034:(k,B,U)=>{"use strict";U.d(B,{s:()=>Y});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U(64794),V=U(52498),W=U(44094),q=U(21314),K=U(34829),z=U(77938);let Y=class{constructor(k,B){this.assets=null,this.assets={},k.getCurrentEnvironment()!==V.h.QABox&&(this.assets["feature-flag-data"]={type:"json",fullURL:`${B.getCDNRootUrl()}/flags/${k.getEnvironmentString()}/prodigy-game.json`})}getAsset(k){const B=this.findAsset(k);if(B)return B;let U=null,F=null;const j=0===k.indexOf("horizontal-dorm")||0===k.indexOf("vertical-dorm")||0===k.indexOf("sheets-dorm"),V=0===k.indexOf("default-pet-")||0===k.indexOf("reduced-pet-")||0===k.indexOf("small-pet-"),q=0===k.indexOf("male-outfit-")||0===k.indexOf("female-outfit-"),K=0===k.indexOf("above-mount-")||0===k.indexOf("below-mount-"),Y=k.indexOf("tt-deco")>-1;if(0===k.indexOf("icon-")){if(U=k.split("-"),U.length>2)if("storeTab"===U[1]){const B=this.getAsset(`singleImage-${parseInt(U[2])+22}`);this.assets[k]={type:"singleImage",v:$.get(B,"metadata.v",1),key:k}}else F=z.t.getItemMetadata(U[1],parseInt(U[2])),this.assets[k]={type:"singleImage",v:$.get(F,"vIcon",1)}}else if(j||V||q||K||0===k.indexOf("default-boss-")||0===k.indexOf("default-follow-")||0===k.indexOf("default-titan-"))U=k.split("-"),U.length>2&&(F=z.t.getItemMetadata(U[1],parseInt(U[2])),G.Aq$.isDefined(F)&&(this.assets[k]=F.assets[U[0]]));else if(0===k.indexOf("default-emote-"))U=k.split("-"),U.length>2&&(F=z.t.getItemMetadata(U[1],parseInt(U[2])).assets[U[0]],G.Aq$.isDefined(F)&&(this.assets[k]={type:F.type,v:G.Aq$.isDefined(F)&&G.Aq$.isDefined(F.v)?F.v:1}));else if(Y){const B=k.substring(0,k.length-5),U=z.t.getItemsWithFilter(H.D.ASSET_TYPE_DECORATION,(k=>k.data.tag===B));1===U.length&&(this.assets[k]={type:"singleImage",v:$.get(U[0].metadata,"vIcon",1)})}else W.$.containsURL(k)?(U=k.split("-"),U.length>1&&(this.assets[k]={type:U[0],fullURL:U.slice(1).join("-")})):this.assets[k]={};return this.assets[k]}findAsset(k){var B,U,F,j,$,H,V,W,q,K,z;let Y=this.assets[k];if(!Y){const Q=null===(B=window.legacyAssetMappings)||void 0===B?void 0:B[k];Q&&(Y=this.assets[Q]),Y?(Y.guidMapping=Q,"tileset"===Y.type&&(Y.w||(Y.w=null!==(j=null===(F=null===(U=null==Y?void 0:Y.data)||void 0===U?void 0:U.data)||void 0===F?void 0:F.w)&&void 0!==j?j:null!==(H=null===($=null==Y?void 0:Y.data)||void 0===$?void 0:$.w)&&void 0!==H?H:40),Y.h||(Y.h=null!==(q=null===(W=null===(V=null==Y?void 0:Y.data)||void 0===V?void 0:V.data)||void 0===W?void 0:W.h)&&void 0!==q?q:Y.h=null!==(z=null===(K=null==Y?void 0:Y.data)||void 0===K?void 0:K.h)&&void 0!==z?z:40))):G.VyI.log(`No legacy asset mapping found for ${k}`,G.$bb.Warning)}return Y}getImageBounds(k){const B=this.getAsset(k);return G.Aq$.isDefined(B)?[B.x,B.y,B.w,B.h]:[0,0,0,0]}getImagePivots(k){const B=this.getAsset(k);if(G.Aq$.isDefined(B)){return[G.Aq$.isDefined(B.pivotX)?B.pivotX:null,G.Aq$.isDefined(B.pivotY)?B.pivotY:null]}return[null,null]}assignAssets(k){for(const B in k)G.Aq$.isDefined(B)&&0!==B.length&&"undefined"!==B&&(this.assets[B]=k[B])}};Y.ASSET_FOLDER=K.s.get("GameConstants.Build.ASSETS_FOLDER"),Y.VERBOSE_LOGGING=!1,Y=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("6a1-4b92")),(0,F.Qj)(1,(0,j.inject)("be9-3278")),(0,F.Sn)("design:paramtypes",[Object,q.p])],Y)},40549:(k,B,U)=>{"use strict";U.d(B,{r:()=>G});var F=U(50654);class G{static isPotionConsumable(k){return k.type===F.V.Potion}static isFoodConsumable(k){return k.type===F.V.Food}}},34992:(k,B,U)=>{"use strict";U.d(B,{g:()=>ht});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U(20748),V=U(99625),W=U(51151),q=U(65240),K=U(65050),z=U(35120),Y=U(51477),Q=U(73797),X=U(23891),Z=U(57324),J=U(95057),tt=U(98252),et=U(53452),it=U(47255),st=U(10312),nt=U(4631),at=U(88701),rt=U(77938);function ot(k,B){k[B].functionName=B}let ht=class{constructor(k,B){this.game=null,this.localizer=null,this.membershipParentOpen=!1,this.game=k,this.localizer=B}runFunction(k,B,U,F,j){this.doesFunctionExist(k)?this[k].apply(this,[B,U,F,j]):G.VyI.log(`Error ${k} not found in MailerMethods`,G.$bb.Verbose)}doesFunctionExist(k){return G.Aq$.isDefined(this[k])}openStore(k){z.q.instance.prodigy.open.store(parseInt(k[0]))}singleUseGotItem(k,B,U,F){const G=B=>{const G=F&&F.length>0?F[0]:null;z.q.instance.prodigy.open.gotItem(B,G,void 0,void 0,void 0,void 0,this.getCustomItemReceivedSegmentData(k,U)),this.game.broadcaster.broadcast(Q.zr.GiftBoxOpened,Q.HG.Mailer,[]),this.game.broadcaster.broadcast(Q.zr.MarkAsRead,Q.HG.MailView,[void 0,U])};if(et.b.isDebugMailData(U))G(B);else{z.q.instance.prodigy.gameContainer.get("535-27b9").collectMailRewards(U).then((k=>{G(et.b.mergeSecureUnsecure(k.rewards,k.unsecuredRewards))})).catch((k=>{z.q.instance.prodigy.open.message(this.localizer.getText("ERROR_DIALOG_BODY"))}))}}openGiftBox(k,B,U){if(this.game.broadcaster.broadcast(Q.zr.GiftBoxOpened,Q.HG.Mailer,[]),et.b.isDebugMailData(U))z.q.instance.prodigy.open.reward(U,B);else{z.q.instance.prodigy.gameContainer.get("535-27b9").collectMailRewards(U).then((k=>{z.q.instance.prodigy.open.reward(U,et.b.mergeSecureUnsecure(k.rewards,k.unsecuredRewards))})).catch((k=>{z.q.instance.prodigy.open.message(this.localizer.getText("ERROR_DIALOG_BODY"))}))}}openMembershipSignUp(){const k=z.q.instance.prodigy.gameContainer;if(k.get("c47-20b6").purchase.sendFunnelStart({type:"Click-Member-Box-Mail",category:"Mailbox",contentId:void 0,adType:J.R.Alternative}),!this.membershipParentOpen){this.membershipParentOpen=!0;z.q.instance.prodigy.open.membershipParent(void 0,{conversionFunnelName:it.o.FunnelClickMemberBoxMail,conversionStaticOrVideo:J.R.Alternative}).onClose=()=>{this.membershipParentOpen=!1,k.get("c47-20b6").purchase.sendFunnelQuit("Purchase-Handoff","Close-Clicked")}}}openWizardNameSelector(k,B,U,F){const G=F.pop(),j=F.pop();z.q.instance.prodigy.open.wizardNameSelector(!0,j,G)}openPromoPetEgg(k,B,U,F){z.q.instance.prodigy.gameContainer.get("c47-20b6").yourMail.sendOpenEpicSelectorEvent(U.id);const G=F&&F.length>0?F[0]:null,j=z.q.instance.prodigy.open.prefabMenu(V.l.LegacyEpicsChoicePopup);j.onPrefabLoaded.addOnce((k=>{const F=new at.C,[H,V]=$.partition(B,(k=>F.getOwnedCount(k.type,k.ID)>0)),W=V.concat(H).slice(0,3).map((k=>k));k.findComponentInChildren(Z.m).setItems(W);const q=k.findComponentInChildren(X.f);q.onItemAwarded.addOnce(((k,B,F)=>{this.game.broadcaster.broadcast(Q.zr.GiftBoxOpened,Q.HG.Mailer,[]),this.game.broadcaster.broadcast(Q.zr.MarkAsRead,Q.HG.MailView,[void 0,U]),z.q.instance.prodigy.gameContainer.get("c47-20b6").yourMail.sendClosedEpicSelectorEvent(W.map((k=>k.ID)),B)})),q.onComplete.addOnce((()=>{j.close(),null==G||G()}))}))}openLink(k,B,U,F){const j=F&&F.length>0?F[0]:null;tt.pF.isNativeApp()||G.o5U.isMobile()?z.q.instance.prodigy.open.message(this.localizer.getText("OPEN_URL_IN_APP")):G.Aq$.isDefined(k[0])?z.q.instance.prodigy.open.messageBox(this.localizer.getText("NOW_LEAVING_PRODIGY"),(()=>{j&&j(),st.I.openWebsite(k[0])})):G.VyI.log("ERROR: Not a valid link!",G.$bb.Verbose)}openLinkAtHome(k,B,U,F){z.q.instance.prodigy.classModeController.isClassMode()?z.q.instance.prodigy.open.message(this.localizer.getText("OPEN_URL_AT_HOME")):this.openLink(k,B,U,F)}teleport(k){const B=k[0].split("-");z.q.instance.prodigy.classModeController.isLockedZone(B[0])?z.q.instance.prodigy.classModeController.onClassMode(B[0]):this.handleLeaving((()=>{z.q.instance.prodigy.world.it.call(z.q.instance.prodigy.world,...k)}))}openChargedLevelsTutorial(k,B,U,F){const j=F.shift();G.VyI.log("[openChargedLevelsTutorial] called",G.$bb.Verbose),j()}goToTitanMap(){z.q.instance.prodigy.titansNetworkHandler.titan?z.q.instance.prodigy.titansNetworkHandler.isTitanAlive()?this.gotTitan(z.q.instance.prodigy.titansNetworkHandler.titan):this.showTitanErrorMessage():(this.game.broadcaster.addAppListener(Q.RZ.GotTitans,this.gotTitan.bind(this),this,"Titan"),z.q.instance.prodigy.titansNetworkHandler.getTitans())}gotTitan(k){if(this.game.broadcaster.removeAppListener(Q.RZ.GotTitans,this,"Titan"),k){const B=rt.t.getItem("titan",k.assetID);G.Aq$.isDefined(B)&&this.handleLeaving((()=>{z.q.instance.prodigy.world.it(`${B.data.zone}-Titan`)}))}else this.showTitanErrorMessage()}showTitanErrorMessage(){z.q.instance.prodigy.open.messageBoxOkay(this.localizer.getText("TITAN_INACTIVE"))}handleLeaving(k){const B=z.q.instance.prodigy.world.getCurrentZone();z.q.instance.prodigy.world.getZone(B).handleLeaving(nt.j.teleport,k)}goToTreasureTrack(){var k,B;null===(k=z.q.instance)||void 0===k||k.prodigy.open.menuCloseAll(),null===(B=z.q.instance)||void 0===B||B.prodigy.open.battlePassMenu()}getCustomItemReceivedSegmentData(k,B){if(null==k?void 0:k.includes(q.C.FestivalCurrencyConversion))return{source_type:q.C.FestivalCurrencyConversion,source_id:z.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.getFestivalInstanceName(),instance_id:B.id.toString(),instance_type:K.N.UI}}};(0,F.Cg)([(0,H.sg)(2e3),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Array,Array,W.MailData,Array]),(0,F.Sn)("design:returntype",void 0)],ht.prototype,"singleUseGotItem",null),(0,F.Cg)([ot,(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Array,Array,W.MailData]),(0,F.Sn)("design:returntype",void 0)],ht.prototype,"openGiftBox",null),(0,F.Cg)([ot,(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],ht.prototype,"openMembershipSignUp",null),ht=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("51c-03a0")),(0,F.Qj)(1,(0,j.inject)(G.$Bt.LocalizationService)),(0,F.Sn)("design:paramtypes",[Y.n,G.dTp])],ht)},36545:(k,B,U)=>{"use strict";U.d(B,{R:()=>F});class F{static getRandomHint(k){return F.data[k][Math.floor(Math.random()*F.data[k].length)]}}F.data={none:[{textKey:"HINT_0"},{textKey:"HINT_1"},{textKey:"HINT_3"},{textKey:"HINT_4"},{textKey:"HINT_5"},{textKey:"HINT_6"},{textKey:"HINT_7"},{textKey:"HINT_8"},{textKey:"HINT_9"},{textKey:"HINT_10"},{textKey:"HINT_11"},{textKey:"HINT_12"},{textKey:"HINT_13"},{textKey:"HINT_14"},{textKey:"HINT_15"},{textKey:"HINT_16"},{textKey:"HINT_17"},{textKey:"HINT_18"},{textKey:"HINT_19"},{textKey:"HINT_20"},{textKey:"HINT_21"},{textKey:"HINT_22"},{textKey:"HINT_23"},{textKey:"HINT_24"},{textKey:"HINT_25"},{textKey:"HINT_26"}]}},47315:(k,B,U)=>{"use strict";var F,G;U.d(B,{X:()=>F}),function(k){k.Single="single",k.AOE="aoe",k.None="none"}(F||(F={})),function(k){k.Team="team",k.Unit="unit"}(G||(G={}))},77938:(k,B,U)=>{"use strict";U.d(B,{t:()=>q});var F,G=U(8674),j=U(62459);!function(k){k["costume-1"]="d5be4cfb-ba49-4031-9c32-c01b2c368e18",k["costume-2"]="039d6295-85f4-4501-b6c7-d52c9a1d458f",k["costume-3"]="46da74b2-31c5-415d-adf6-a0d22bdb57d9",k["costume-4"]="07ebed37-6651-4f94-bc0a-e9bf9a429119",k["costume-5"]="42fee354-cab4-4300-b07b-ce4955b5a4bb",k["costume-6"]="02521cc1-60aa-4428-9a88-7a1bd5842552",k["costume-7"]="650a7499-8ee8-494d-818e-417a81c5f7dc",k["riftRunKey-1"]="3bf8a670-5afc-4113-8d51-eec627555d6a",k["riftRunKey-2"]="38f2fe53-fe57-4046-b642-cbf34807ddfb",k["riftRunKey-3"]="478eefb5-a10f-41c1-abb2-7b4a38d17193"}(F||(F={}));var $=U(88022),H=U(35120),V=U(91207),W=(U(34829),U(23029));class q{static mergeData(k){k&&(q.data?q.data=Object.assign(Object.assign({},q.data),k):q.data=k,this.processItems(k))}static parseData(k){q.data=k,this.processItems(k)}static processItems(k){var B,U,F;const G={outfit:4e-4,weapon:5e-4,hat:.001,boots:.001,item:.025,currency:1},$=[1,.75,.5,.25,.1];for(const H in k)if(k.hasOwnProperty(H)){const U=k[H];for(let k=0;k0){let k=0;G.hasOwnProperty(H)&&(k=G[H]);let B=1;j.Aq$.isDefined(F.data.rarity)&&F.data.rarity<$.length&&(B=$[F.data.rarity]);const U=k*B*F.data.drop;if(U>0){const k={type:H,ID:F.ID,R:U};q.drops.push(k)}}}}this._prefabDataProvider||(this._prefabDataProvider=H.q.instance.prodigy.gameContainer.get(j.t5G.PrefabDataProvider)),null===(F=null===(U=this._prefabDataProvider)||void 0===U?void 0:U.rebuildPrefabGuidMap)||void 0===F||F.call(U)}static getItem(k,B){if("gold"===k)return this.getItem("currency",1);if("firework"===k||"projectile"===k)return this.getItem("item",B);const U=q.itemMap[`${k}-${B}`];return j.Aq$.isDefined(U)?U:null}static secureGetItem(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=this.getItem(k,B);if(U)return U;if(F[`${k}-${B}`])try{let U=W.R.loadData(F[`${k}-${B}`]);return U||(U=yield W.R.loadExternalData(F[`${k}-${B}`],{})),Object.assign({type:k,ID:B},U)}catch(e){j.RQr.logError(e,`Failed to load item ${k}-${B}`)}return null}))}static doesExist(k,B){return null!==q.getItem(k,B)}static getRandomItem(k){const B=q.data[k];return j.Aq$.isDefined(B)&&B.length>0?B[Math.floor(B.length*Math.random())]:null}static getItemDrops(k){let B=q.drops.slice();j.Aq$.isDefined(k)&&(B=B.concat(k));const U=[];for(let F=0;Fj.Aq$.isDefined(k.data.drop)&&k.data.drop>0&&j.Aq$.isDefined(k.data.rarity)&&k.data.rarity===B))}static getRawItems(k,B){return j.Aq$.isDefined(B)?q.getItemsWithFilter(k,(k=>j.Aq$.isDefined(k.data.rarity)&&k.data.rarity===B)):q.data.hasOwnProperty(k)?q.data[k]:[]}static getRandomizedDropsFromCreatures(k,B,U){const F=[],G=[];if(j.Aq$.isDefined(k)){let B;for(let U=0;U0&&F.push(G[0]),F}static getRangeByAmount(k,B,U){const F=[];for(let G=B;G<=B+U-1;G++){const B=q.data[k][G];j.Aq$.isDefined(B)&&F.push(B)}return F}static getItemCount(k){return j.Aq$.isDefined(q.data[k])?q.data[k].length:0}}q.itemMap={},q.drops=[]},5898:(k,B,U)=>{"use strict";U.d(B,{f:()=>F,l:()=>$});var F,G=U(62459),j=U(95891);!function(k){k[k.Kills=0]="Kills",k[k.QuestionsCorrect=1]="QuestionsCorrect",k[k.GoldEarned=2]="GoldEarned",k[k.GoldSpent=3]="GoldSpent",k[k.ArchivesRuns=4]="ArchivesRuns",k[k.GoldenPagesEarned=5]="GoldenPagesEarned",k[k.ArchiveEnemiesDefeated=6]="ArchiveEnemiesDefeated",k[k.AcademyPagesEarned=7]="AcademyPagesEarned"}(F||(F={}));class ${constructor(){this.updated=!1,this.data={progress:{}}}init(k){j.isEmpty(k)||(this.data=k)}getDataAndClear(){return this.updated=!1,this.data}setTag(k,B){this.data[k]=B,this.updated=!0}getTag(k){var B;return null!==(B=this.data[k])&&void 0!==B?B:0}increment(k,B){this.setTag(k,this.getTag(k)+B)}getProgress(k){var B;return null!==(B=this.data.progress[k])&&void 0!==B?B:0}setProgress(k,B){this.data.progress[k]=B}complete(k){G.Aq$.isDefined(this.data.progress)||(this.data.progress={}),G.Aq$.isDefined(this.data.progress[k])?this.data.progress[k]++:this.data.progress[k]=1,this.updated=!0}}},96535:(k,B,U)=>{"use strict";U.d(B,{W:()=>ce});var F=U(8674),G=U(62459),j=U(88225),$=U(95891),H=U.n($),V=U(44329),W=U(47708),q=U(97495),K=U(2090);const z=(0,U(77601).gb)({key:"username-in-game-display",activateAssociatedExperiments:1,default:{enabled:!1}});var Y=U(58776),Q=U(7247),X=U(4903),Z=U(95066),J=U(36525),tt=U(55110),et=U(90633),it=U(8394),st=U(5491),nt=U(65240),at=U(66582),rt=U(73678),ot=U(66207),ht=U(80105),ct=U(13956),dt=U(35120),lt=U(50503),ut=U(2212),ft=U(48235),bt=U(55122),pt=U(64794),vt=U(41340),gt=U(59510),mt=U(24473),yt=U(45918),_t=U(80434),Et=U(52191),wt=U(73797),Tt=U(77981),St=U(23891),At=U(23082);class Ct{static updateEducationData(k,B){var U,F;return Ct.processHomework(null!==(U=null==k?void 0:k.homework)&&void 0!==U?U:[],null!==(F=null==B?void 0:B.homework)&&void 0!==F?F:[]),Object.assign(Object.assign({},k),B)}static processHomework(k,B){const U=dt.q.instance.prodigy.gameContainer.get("c47-20b6").educationData;for(const F of B){k.find((k=>k.homeworkID===F.homeworkID))||U.handleNewClassAssignment(F)}for(const F of k){B.find((k=>k.homeworkID===F.homeworkID))||U.handleRemovedClassAssignment(F)}}}var Ot=U(76599),It=U(48813),Dt=U(76277),Rt=U(40392),Pt=U(98252),Mt=U(34612),Nt=U(22023),xt=U(23748);class Lt{static convertLegacyStarsToModern(k,B){if(!G.Aq$.isDefined(k))return 0;const U=this.legacyLevelFromStars(k),F=this.legacyStarsToLevel(U-1),j=(k-F)/(this.legacyStarsToLevel(U)-F),$=bt.s.xpRequiredForLevel(U,B),H=bt.s.xpRequiredForLevel(U+1,B);return Math.floor(xt.z.clampedLerp($,H,j))}static legacyStarsToLevel(k){if(k<1)return 0;let B=0;for(let U=1;U<=k;U++)B+=this.legacyEnemiesPerLevel(U);return 100*B}static legacyLevelFromStars(k){for(let B=1;B<=100;B++)if(k=F)k.stars=H.cumulativeXp[W-1],k.nextLevelProgressPercent=1;else{const F=qt.D.getCurrentLevelProgressPercent(W,V,U.cumulativeXp,1),G=bt.s.xpRequiredForLevel(W,B),j=bt.s.xpRequiredForLevel(W+1,B)-G;k.stars=G+Math.round(j*F),k.nextLevelProgressPercent=qt.D.getCurrentLevelProgressPercent(W,k.stars,H.cumulativeXp,1)}G.VyI.log(`[Level curve migration] stars translated: ${V} -> ${k.stars}`,G.$bb.Info),G.VyI.log(`[Level curve migration] Percent to next level: ${100*k.nextLevelProgressPercent}%`,G.$bb.Info)}}var zt=U(77938),Yt=U(21492),Qt=U(5898),Xt=U(51894),Zt=U(27293),Jt=U(39984),te=U(48208),ee=U(37465);class ie{get newRescuedPets(){return this._newRescuedPets}init(k){this._newRescuedPets=null!=k?k:{}}getDataAndClear(){return this.updated=!1,this._newRescuedPets}getNumberOfNewRescues(k){var B,U;return null!==(U=null===(B=this._newRescuedPets[k])||void 0===B?void 0:B.length)&&void 0!==U?U:0}addNewRescue(k,B){const U=H().uniq(H().flatMap(this._newRescuedPets)).length;dt.q.instance.prodigy.gameContainer.get("fa6-b1fc").getZonesForPetId(k).then((F=>{F.forEach((B=>{this._newRescuedPets[B]?this._newRescuedPets[B].includes(k)||(this._newRescuedPets[B].push(k),this.updated=!0):(this._newRescuedPets[B]=[k],this.updated=!0)}));const G=H().uniq(H().flatMap(this._newRescuedPets)).length;U!==G&&this.sendBadgeUpdatedEvent(B,G,U)})).catch(G.RQr.createHandler("Error adding a new rescue"))}clearNewRescues(){this._newRescuedPets={},this.updated=!0}clearRescuesForZone(k){this._newRescuedPets[k]=[],this.updated=!0}clearNewestRescuesByAmount(k,B){var U;null===(U=this._newRescuedPets[B])||void 0===U||U.splice(0,k),this.updated=!0}sendBadgeUpdatedEvent(k,B,U){dt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendBadgeUpdatedEvent({button_name:`pet_menu_${k}`,badge_value:B,previous_badge_value:U})}}var se=U(129),ne=U(57797);class ae{constructor(){this._updated=!1,this._dailyBattleLimit=1,this._dailyBattleCount=0,this._dailyBossBattleRematchCount=0,this._isDailyBattleComplete=new Map,this._dailyBattleRefreshInterval=Wt.s.DAY_IN_MS,this._lastStarted=new Date(0),this._dailyPlacementMap=new Map,this._dailyEncounterMap=new Map,this._festivalProgress={instanceID:0,viewedProgressMenu:!1},this._isFestivalDailyBattle=!1,this._currentWheelID=0,this.isNewFestivalWheel=!1,this.inPostBattleFlow=!1}get updated(){return this._updated}get dailyBattleLimit(){return this._dailyBattleLimit}get dailyBattleCount(){return this._dailyBattleCount}get dailyBossBattleRematchCount(){return this._dailyBossBattleRematchCount}set dailyBossBattleRematchCount(k){this._dailyBossBattleRematchCount=k}isDailyBattleComplete(k){var B;return null!==(B=this._isDailyBattleComplete.get(k))&&void 0!==B&&B}get dailyBattleRefreshInterval(){return this._dailyBattleRefreshInterval}get festivalType(){return this._festivalType}get lastStarted(){return this._lastStarted}getDailyBattlePlacement(k){return this._dailyPlacementMap.get(k)}getDailyBattleEncounter(k){return this._dailyEncounterMap.get(k)}setDailyBattleEncounter(k,B){this._dailyEncounterMap.set(k,B)}get viewedProgressMenu(){return this._festivalProgress.viewedProgressMenu}set viewedProgressMenu(k){this._festivalProgress.viewedProgressMenu=k}get isFestivalDailyBattle(){return this._isFestivalDailyBattle}set isFestivalDailyBattle(k){this._isFestivalDailyBattle=k}get currentWheelID(){return this._currentWheelID}set currentWheelID(k){this._currentWheelID!==k&&(this._currentWheelID=k,this.isNewFestivalWheel=!0)}get currentWheelEndDate(){return this._currentWheelEndDate}set currentWheelEndDate(k){this._currentWheelEndDate=k}init(k){var B,U,F;k&&(this._festivalType=k.festivalType,this._dailyBattleCount=null!==(B=k.currentDailyBattleCount)&&void 0!==B?B:0,this._dailyBossBattleRematchCount=null!==(U=k.currentDailyBossBattleRematchCount)&&void 0!==U?U:0,G.Aq$.isDefined(k.lastStarted)?k.lastStarted>Date.now()?(G.VyI.log(`Last daily start time ${k.lastStarted.toString()} is in the future. Resetting.}`,G.$bb.Error),this._lastStarted=new Date(0)):this._lastStarted=new Date(k.lastStarted):this._lastStarted=new Date(0),this._dailyPlacementMap=Array.isArray(k.placementMap)?new Map(k.placementMap):new Map,this._dailyEncounterMap=Array.isArray(k.encounterMap)?new Map(k.encounterMap):new Map,this._isDailyBattleComplete=Array.isArray(k.isDailyBattleComplete)?new Map(k.isDailyBattleComplete):new Map,this._festivalProgress={instanceID:k.festivalID,viewedProgressMenu:null!==(F=k.viewedProgressMenu)&&void 0!==F&&F})}reset(){this.init({festivalType:"",currentDailyBattleCount:0,currentDailyBossBattleRematchCount:0,lastStarted:0,isDailyBattleComplete:new Map,placementMap:new Map,encounterMap:new Map,festivalID:0,viewedProgressMenu:!1})}start(k,B,U,F,G){this._festivalType=k,this._dailyPlacementMap=U,this._dailyEncounterMap=F,this._dailyBattleLimit=B,G&&(this._dailyBattleRefreshInterval=G*Wt.s.HOURS_IN_MS),this.isExpired(k)&&(this._lastStarted=Bt.R.getNow(),this._dailyBattleCount=0,this._dailyBossBattleRematchCount=0,this._dailyBattleRefreshInterval%Wt.s.DAY_IN_MS==0&&this._lastStarted.setHours(0,0,0,0),this._isDailyBattleComplete=new Map),this._updated=!0}playedBattle(k){if(this._updated=!0,!0!==this._isDailyBattleComplete.get(k))return k===ne.je.Normal?(this._dailyBattleCount++,void(this._dailyBattleCount>=this._dailyBattleLimit&&this._isDailyBattleComplete.set(ne.je.Normal,!0))):void this._isDailyBattleComplete.set(k,!0)}isExpired(k){return this._festivalType!==k||Date.now()>this._lastStarted.getTime()+this._dailyBattleRefreshInterval}setFestival(k){this._festivalProgress.instanceID!==k&&(this._festivalProgress={instanceID:k,viewedProgressMenu:!1}),this._updated=!0}getFestivalInstanceName(){return`${dt.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestivalName()}-${(new Date).getFullYear()}`}getFestivalProgress(){G.VyI.log("getFestivalProgress can only be used in debug builds",G.$bb.Error)}getData(){var k;return{festivalType:this._festivalType,currentDailyBattleCount:this._dailyBattleCount,currentDailyBossBattleRematchCount:this._dailyBossBattleRematchCount,lastStarted:G.Aq$.isDefined(this._lastStarted)?this._lastStarted.getTime():0,isDailyBattleComplete:this._isDailyBattleComplete,placementMap:this._dailyPlacementMap,encounterMap:this._dailyEncounterMap,festivalID:this._festivalProgress.instanceID,viewedProgressMenu:null!==(k=this._festivalProgress.viewedProgressMenu)&&void 0!==k&&k}}getDataAndClear(){return this._updated=!1,this.getData()}}var re=U(3032),oe=U(10592),he=U(84938);class ce extends se.a{get saveEnabled(){return this._saveEnabled}set saveEnabled(k){this._saveEnabled=k}get memberStartDate(){return dt.q.instance.prodigy.gameContainer.get("3a0-8003").memberStartDate}get memberEndDate(){return dt.q.instance.prodigy.gameContainer.get("3a0-8003").memberEndDate}get difficultyUnlocks(){var k;return null===(k=this.data)||void 0===k?void 0:k.difficultyUnlocks}get currentDifficulty(){var k;return null===(k=this.data)||void 0===k?void 0:k.currentDifficulty}get highestDifficultyUnlocked(){var k;return null!==(k=[q.i.Expert,q.i.Hard,q.i.Regular].find((k=>{var B;return null===(B=this.difficultyUnlocks)||void 0===B?void 0:B[k]})))&&void 0!==k?k:q.i.Regular}get locationSelectionType(){switch(this._locationSelectionType){case"home":case"school":case"none":return this._locationSelectionType;default:return this._locationSelectionType="home",this._locationSelectionType}}get isInBattle(){return dt.q.instance.game.state.current===At.G.SecureBattleRevamp}get lastVisitedDate(){return this._lastVisitedDate}get ultimateQuestId(){return this._ultimateQuestId}get ultimateTaskId(){return this._ultimateTaskId}setUltimateSessionStatus(k,B="",U=0,F=!1){if(k===oe.n.None||k===oe.n.Transition?(this._ultimateQuestId="",this._ultimateTaskId=0):(this._ultimateQuestId=B,this._ultimateTaskId=U),this._ultimateSessionStatus!==k&&!this._ultimateSessionStatusLocked){const B=this._ultimateSessionStatus;this._ultimateSessionStatus=k,this._ultimateSessionStatusLocked=F,this.onSessionStatusChange.dispatch(this._ultimateSessionStatus,B)}}get ultimateSessionStatus(){return this._ultimateSessionStatus}get educationData(){return this._educationData}get goalId(){return this._goalId}get hasGrade(){return this._educationData.chosenGrade>0}get userDataPlatform(){return this._userDataPlatform}set userDataPlatform(k){this._userDataPlatform=k}constructor(k){super(k),this._saveEnabled=!1,this.curriculumTreeID=null,this.parentEmail=null,this.registerDate=null,this.owners=[],this.classIDs=null,this.playerParents=[],this.playerTeachers=[],this.onEquipmentChange=new G.HN0,this.onSessionStatusChange=new G.HN0,this.membershipUpsell={tier:null,interval:null,upgradeOptions:[]},this.memberPrompt=!1,this.seenMapTransitionPromptThisSession=!1,this._locationSelectionType="none",this.username=null,this.grade=null,this.world=null,this.earlyBirdLastChance=!1,this.answerStreak=0,this.battleStreak=0,this.parentalLink=!1,this.isClassCodeAttached=!1,this.updated=!1,this.lastVisited=null,this.memberShareDate=null,this.tutorialCompletedThisSession=!1,this.hasUsedTicket=!1,this.onFaintData=null,this._ultimateSessionStatus=oe.n.None,this._ultimateSessionStatusLocked=!1,this._ultimateQuestId="",this._ultimateTaskId=0,this.dailyQuestions=null,this.daily=null,this._educationData=null,this._goalId=null,this._userDataPlatform="prodigy",this.battleResumeData=void 0,this.inProgressRestrictionsSeen=[],this.completedRestrictionProgressBarsSeen=[],this.completedRestrictionUnlockAnimationsSeen=[],this.coOpTeamHandler=null,this._unknownItemNameForAnalytics="Unknown Item",this._playerContainer=null,this.emotes=null,this.dailyQuestions=new te.V,this.daily=new ae,this.newPetRescueData=new ie,this._remoteLogger=dt.q.instance.prodigy.gameContainer.get("e59-eea6"),dt.q.instance.game.broadcaster.addAppListener(wt.Y1.ClosePetsMenu,this.clearTransitionSessionStatus,this,void 0,!0),dt.q.instance.game.state.onStateChange.add(((k,B)=>{B===At.G.TileScreen&&this.clearTransitionSessionStatus()}))}hasMembership(){return dt.q.instance.prodigy.gameContainer.get("3a0-8003").isMember}hasLegacyMembership(){const k=this.hasMembership(),B=dt.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirementsDeprecated(15);return k&&!B}hasMembershipFeatureAccess(k){return dt.q.instance.prodigy.gameContainer.get("3a0-8003").hasFeatureAccess(k)}getActiveMembershipId(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this.hasMembership())return;const k=yield this.sendMembershipQueryRequest(),B=this.filterForMathMemberships(k.data.viewer.activeMemberships);return 0!==B.length?B[0].id:void 0}))}getAllActiveMemberships(){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.sendMembershipQueryRequest()).data.viewer.activeMemberships}))}getActiveMathMembership(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this.hasMembership())return;const k=yield this.sendMembershipQueryRequest(),B=this.filterForMathMemberships(k.data.viewer.activeMemberships);return 0!==B.length?B[0]:void 0}))}getMembershipUpsellData(){return(0,F.sH)(this,arguments,void 0,(function*(k=!1){return!k&&G.Aq$.isDefined(this._membershipUpsellFetchPromise)?this._membershipUpsellFetchPromise:(this._membershipUpsellFetchPromise=null,this.fetchMembershipUpsell())}))}fetchMembershipUpsell(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this.hasMembership())return this.membershipUpsell.tier=at._$.NonMember,this.membershipUpsell.upgradeOptions=[],this._membershipUpsellFetchPromise=Promise.resolve(this.membershipUpsell),this.membershipUpsell;const k=yield this.sendMembershipQueryRequest();return this._membershipUpsellFetchPromise=Promise.resolve(this.processMembershipUpgradeOptions(k)),this.membershipUpsell=yield this._membershipUpsellFetchPromise,this.membershipUpsell}))}processMembershipUpgradeOptions(k){var B;const U=this.filterForMathMemberships(k.data.viewer.activeMemberships);if(0===U.length)return;const F=U[0].currentPackage.tier,G=null===(B=U[0].plan)||void 0===B?void 0:B.interval;return this.membershipUpsell.upgradeOptions=U[0].upgradeOptions,1===F?this.membershipUpsell.tier=at._$.MemberLevelUp:2===F&&(this.membershipUpsell.tier=U[0].upgradeOptions.length>0?at._$.MemberUltimateMath:at._$.MemberUltimateBundle),this.membershipUpsell.interval=G,this.membershipUpsell.ownerIsPartialUser=U[0].ownerIsPartialUser,this.membershipUpsell.ownerHasSSOCredentials=U[0].ownerHasSSOCredentials,this.membershipUpsell}filterForMathMemberships(k){return(null!=k?k:[]).filter((k=>k.categories.includes(Tt.r.Math)))}getDailyQuestions(){return this.dailyQuestions}getUpdatedData(k=!1,B=!0){const U={},F=[{data:this.equipment,name:"equipment"},{data:this.tutorial,name:"tutorial"},{data:this.appearance,name:"appearance"},{data:this.kennel,name:"pets"},{data:this.encounters,name:"encounters"},{data:this.quests,name:"quests"},{data:this.house,name:rt.A_.HOUSE},{data:this,name:"data"},{data:this.backpack,name:"inventory"},{data:this.state,name:"state"},{data:this.achievements,name:"achievements"}];this.validateLevel();for(let j=0;j-1?new Date(F):new Date(U.getServerTimeMs()),$=Wt.s.get("GameConstants.DailyQuestions.OVERRIDE_LAST_LOGIN"),H=$>-1?new Date($):new Date(this.lastVisited),V=k.data,K=G.Aq$.isDefined(V),z=K?V.dailyQuestions:null;this.dailyQuestions.init(z,4,j,H,(()=>{this.updated=!0}));const Y=K?V.daily:null;return this.daily.init(Y),this.newPetRescueData.init(K?V.newPetRescueData:{}),V&&!V.playerTitanData&&(V.playerTitanData={titanBattleProgress:0,seenTitanBattleProgress:0,titanID:0}),V&&!V.lastStoreVisitLevels&&(V.lastStoreVisitLevels={}),V&&!V.unifiedStore&&(V.unifiedStore={viewMoreStoresButtonClicks:0,viewMoreStoresButtonViews:0}),V&&!V.difficultyUnlocks&&(V.difficultyUnlocks=W.Al),Rt.i.DIFFICULTY_MODE=null!==(B=V.currentDifficulty)&&void 0!==B?B:q.i.Regular,mt.S.updateRewardedState().catch(G.RQr.createHandler("[ActivePlayer] Error updating seven levels reward state")),mt.S.calculateFeatureEligibility(),dt.q.instance.prodigy.gameContainer.get("8f8-d5bc").updateRiftsConfigVersion().catch(G.RQr.createHandler("[ActivePlayer] Error updating rifts config to latest version")),It.T.ready.then((()=>{this.validateLevel(),this.updated=!0,bt.s.validatePlayerAndPetXp(),this.updateChargedLevelsData().catch(G.RQr.createHandler("[ActivePlayer] Error updating charged level data")),this.fetchMembershipUpsell().catch(G.RQr.createHandler("[ActivePlayer] Error fetching membership upsell"))})).catch(G.RQr.createHandler("[ActivePlayer] Error awaiting the experiment manager")),ut.J.featureDataHealthCheck(),V.settings||(V.settings={}),Object.values(he._).forEach((k=>{var B;const U=he.B[k];if(!(null===(B=null==U?void 0:U.data)||void 0===B?void 0:B.storedKey))return;const F=U.data.storedKey;G.Aq$.isDefined(V.settings[F])||(V.settings[F]=U.data.defaultValue,this.updated=!0),U.setStoredValue(V.settings[F]),U.onStoredValueChanged.add((k=>{this.getPlayerData().settings[F]=k,this.updated=!0}))})),!0}return!1}transformPlayer(k,B,U,F){super.transformPlayer(k,B,U,F),this.updated=!0}getLatestClassIDLegacy(){return G.Aq$.isDefined(this.classIDs)&&this.classIDs.length>0?this.classIDs[this.classIDs.length-1]:0}getEnergy(){return G.Aq$.isDefined(this.data.energy)?this.data.energy:0}setEnergy(k){super.setEnergy(k),this.updated=!0}set team(k){this.data.team=k,this.updated=!0}get team(){return this.data.team}getRegisterDate(){return G.Aq$.isDefined(this.registerDate)&&"string"==typeof this.registerDate&&(this.registerDate=G.Aq$.isDefined(this.registerDate)?new Date(this.registerDate):null),this.registerDate}setParentEmail(k){this.parentEmail=k,this.updated=!0}hasValidatedParentEmail(){return G.Aq$.isDefined(this.playerParents)&&this.playerParents.length>0}hasValidatedTeacherEmail(){return G.Aq$.isDefined(this.playerTeachers)&&this.playerTeachers.length>0}getAnswerStreak(){return this.answerStreak}heal(){this.changeCurrentHearts(Wt.s.MAX_SAFE_INTEGER);const k=this.kennel.getPets();for(let B=0;Bk+B.questions.length),0)===G.skills.reduce(((k,B)=>k+B.correct+B.incorrect),0)&&dt.q.instance.prodigy.gameContainer.get("c47-20b6").educationData.handleClassAssignmentCompleted(G)}}getPlayerClass(){return G.Aq$.isDefined(this.data)?this.data.defaultClass:""}setPlayerClass(k){this.data.defaultClass=k}addSpell(k){G.Aq$.isDefined(this.data.spells)||(this.data.spells=[]),Ft.J.inArray(this.data.spells,k)||(this.data.spells.push(k),G.Aq$.isDefined(this.data.spellbook)&&!Ft.J.inArray(this.data.spellbook,k)&&this.data.spellbook.length<6&&this.data.spellbook.push(k)),this.updated=!0}unlockMemberItems(){this.hasMembership()&&(this.memberPrompt=!1,this.updated=!0,G.Aq$.isDefined(this.getPlayerData().nm)?this.getPlayerData().nm=2:(G.Aq$.isDefined(this.getPlayerData().startDate)&&this.getPlayerData().startDate<(new Date).getTime()&&(this.getPlayerData().daysToConvert=((new Date).getTime()-this.getPlayerData().startDate)/864e5),this.getPlayerData().nm=1),this.backpack.unlockAllItems())}setZone(k,B){var U,F,$;if(G.Aq$.isDefined(B)&&B.indexOf("scene")>-1)return;dt.q.instance.prodigy.world.getZone(k);const H=(0,Dt.G)(K.u).enabled&&ut.J.isZoneMapDifficultyModeAgnostic(B)?Rt.i.DIFFICULTY_MODE:null!==(F=null===(U=Rt.i.getZoneData(k))||void 0===U?void 0:U.difficultyMode)&&void 0!==F?F:q.i.Regular;H!==this.currentDifficulty&&(dt.q.instance.prodigy.gameContainer.get("ba4-af03").setCurrentDifficulty(H),Rt.i.setDifficultyMode(H));const V=this.getPlayerData();V.zone=B,Ut.w.isTitanMap(B)||(null!==($=V.lastVisitedMapForZone)&&void 0!==$||(V.lastVisitedMapForZone={}),V.lastVisitedMapForZone[k]=B),this.updated=!0,j.setTag("zone",B)}getLastVisitedMapForZone(k){var B;return null===(B=this.getPlayerData().lastVisitedMapForZone)||void 0===B?void 0:B[k]}changeGold(k){k>0?(this.achievements.increment(Qt.f.GoldEarned,k),dt.q.instance.game.broadcaster.broadcast(wt.ib.ItemReceived,void 0,[{ID:1,type:"gold",N:k,balance:this.getGold()+k}])):k<0&&(this.achievements.increment(Qt.f.GoldSpent,Math.min(Math.max(this.getPlayerData().gold,0),Math.abs(k))),dt.q.instance.game.broadcaster.broadcast(wt.ib.ItemConsumed,void 0,[{ID:1,type:"gold",N:k,balance:this.getGold()+k}])),this.getPlayerData().gold=this.getGold()+k,this.getPlayerData().gold<0&&delete this.getPlayerData().gold,this.getPlayerData().gold>Wt.s.MAX_SAFE_INTEGER&&(this.getPlayerData().gold=1e9),this.updated=!0}getInteractionIdForEquipAnalytics(k){var B;const U=dt.q.instance.prodigy.gameContainer.get("c47-20b6");return k&&null!==(B=U.featureCommon.getCurrentButtonID(k))&&void 0!==B?B:kt.$.generateUID()}equip(k,B){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U=!1,F){var j;const $=yield zt.t.secureGetItem(B,k);if(1===(null===(j=null==$?void 0:$.data)||void 0===j?void 0:j.member)&&!this.hasMembership())return U&&dt.q.instance.prodigy.open.membershipInfo(void 0,{conversionFunnelName:jt.o.FunnelUseMemberLockedItem,conversionFunnelMetadata:`${B}-${k}`}),!1;const H=this.equipment.getData()[B];switch(B){case"follow":this.equipment.setFollow(k);break;case"hat":this.equipment.setHat(k);break;case"outfit":this.equipment.setOutfit(k);break;case"weapon":this.equipment.setWeapon(k);break;case"spellRelic":this.equipment.setSpellRelic(k);break;case"boots":this.equipment.setBoots(k);break;case"mount":this.equipment.setMount(k);break;case"costume":this.equipment.setCostume(k);break;default:return G.VyI.log(`Unrecognized equipment type ${B}.`,G.$bb.Warning),!1}const V=dt.q.instance.prodigy.gameContainer.get("c47-20b6"),W=this.getInteractionIdForEquipAnalytics(F);if(V.item.sendItemEquippedEvent({item_name:$?Ft.J.getItemName($):this._unknownItemNameForAnalytics,item_type:B,item_id:k},W),G.Aq$.isDefined(H)){const k=yield zt.t.secureGetItem(B,H);V.item.sendItemUnequippedEvent({item_name:k?Ft.J.getItemName(k):this._unknownItemNameForAnalytics,item_type:B,item_id:H},W)}return"costume"===B&&$&&this.sendWizardCostumesAnalytics($,F),this.onEquipmentChange.dispatch(B,!0),!0}))}unEquip(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=yield zt.t.secureGetItem(B,k);switch(B){case"follow":this.equipment.setFollow(null);break;case"hat":this.equipment.setHat(null);break;case"outfit":this.equipment.setOutfit(null);break;case"weapon":this.equipment.setWeapon(null);break;case"spellRelic":this.equipment.setSpellRelic(null);break;case"boots":this.equipment.setBoots(null);break;case"mount":this.equipment.setMount(null);break;case"costume":this.equipment.setCostume(null);break;default:return G.VyI.log(`Unrecognized equipment type ${B}.`,G.$bb.Warning),!1}return dt.q.instance.prodigy.gameContainer.get("c47-20b6").item.sendItemUnequippedEvent({item_name:F?Ft.J.getItemName(F):this._unknownItemNameForAnalytics,item_type:B,item_id:k},this.getInteractionIdForEquipAnalytics(U)),"costume"===B&&F&&this.sendWizardCostumesAnalytics(F,U),this.onEquipmentChange.dispatch(B,!1),!0}))}sendWizardCostumesAnalytics(k,B){const U=dt.q.instance.prodigy.gameContainer.get("c47-20b6");U.playerIdentityAvatar.sendPlayerAvatarUpdatedEvent("costume",Ft.J.getItemName(k),{transaction_id:B?U.featureCommon.getCurrentButtonID(B):void 0})}updateMembershipVideoAdData(k){const B=dt.q.instance.prodigy.gameContainer.get("a03-308f").getServerTimeMs();this.data.membershipVideoTimeStamp=B,this.updated=!0}completeDaily(k,B){this.getPlayerData()[k].isComplete=B,this.updated=!0}setSpinDate(k){this.getPlayerData()[`spinDate${k}`]=Bt.R.getDateTime(),this.updated=!0}spinWheel(k){this.getPlayerData()[`numSpins${k}`]++,this.updated=!0}canSpin(k){return[3].indexOf(k)>=0?0===this.getPlayerData()[`numSpins${k}`]||1===this.getPlayerData()[`numSpins${k}`]&&this.hasMembership()||Wt.s.get("GameConstants.Debug.UNLIMITED_WHEEL_SPINS"):G.Aq$.isDefined(this.getPlayerData()[`numSpins${k}`])?this.getPlayerData()[`spinDate${k}`]!==Bt.R.getDateTime()?(this.setSpinDate(k),this.getPlayerData()[`numSpins${k}`]=0,!0):0===this.getPlayerData()[`numSpins${k}`]||1===this.getPlayerData()[`numSpins${k}`]&&this.hasMembership()||Wt.s.get("GameConstants.Debug.UNLIMITED_WHEEL_SPINS"):(this.setSpinDate(k),this.getPlayerData()[`numSpins${k}`]=0,!0)}canPurchaseSpin(k,B){var U;if(!B.purchaseSpinDialogueID)return!1;const F=null!==(U=B.purchaseSpinCount)&&void 0!==U?U:1,G=this.hasMembership()?2+F:1+F;return this.getPlayerData()[`numSpins${k}`]k+(B&&!B.isKnockedOut()?B.getCurrentHearts():0)),0)}addBattle(){this.getPlayerData().battleCounter=this.getBattles()+1,this.updated=!0}addWin(){this.getPlayerData().win=this.getWins()+1,this.updateStreak(!0),this.updateWinLossRatio(),this.updated=!0}addLoss(){this.getPlayerData().loss=this.getLosses()+1,this.updateStreak(!1),this.updateWinLossRatio(),this.updated=!0}updateStreak(k=!1){let B=this.getBattleStreak();B=k?B<0?1:B+=1:B>0?-1:B-=1,this.getPlayerData().battleStreak=$.clamp(B,-ce.PLAYER_BATTLE_STREAK_CAP,ce.PLAYER_BATTLE_STREAK_CAP)}updateWinLossRatio(){this.getPlayerData().winLossRatio=$.round(this.getWins()/(this.getWins()+this.getLosses()),2)}processDeserter(){return!!G.Aq$.isDefined(this.getPlayerData().deserter)&&(delete this.getPlayerData().deserter,this.updated=!0,!0)}completeTower(k){k>this.getTowerProgress()&&(this.getPlayerData().tower=k),this.updated=!0}isBlockedByDarkTowerMemberGate(){const k=this.getTowerProgress();return!this.hasMembership()&&k<100&&k>=Wt.s.get("GameConstants.Tower.MAX_FREE_MEMBER_FLOOR")}swapSpells(k,B){if(G.Aq$.isDefined(k)&&G.Aq$.isDefined(B)){G.Aq$.isDefined(this.getPlayerData().spellbook)||(this.getPlayerData().spellbook=this.getAllAttacks().slice(0,6));for(let U=0;U0}hasCompletedTutorial(){const k=$.get(dt.q.instance.prodigy.world.zones,rt.A_.HOUSE,null);return G.Aq$.isDefined(k)&&$.get(k.getQuestState(),"ID",0)>1}hasCompletedTowerTownTutorial(){const k=new vt.Y(this.game);return k.init(),k.isBreadcrumbComplete(gt.M.TutorialCompleted)}setAllowsHouseVisitors(k){super.setAllowsHouseVisitors(k),this.updated=!0}hasUnclaimedMembershipRewards(){return this.shouldRewardCloudMount()||this.shouldRewardFromSegmentedOffer()||ft.W.hasRewardAvailable}shouldRewardCloudMount(){return this.hasMembership()&&0===this.backpack.hasItem("mount",1)}shouldRewardFromSegmentedOffer(){const k=dt.q.instance.prodigy.gameContainer.get("a02-c2b2");return!(!k.userHasOfferAvailable()||!k.meetsMembershipRequirement)&&k.rewardsForCurrentUserSegment.length>0}rewardMembershipPrizes(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B={type:"mount",ID:1},U=dt.q.instance.prodigy.gameContainer.get("a02-c2b2"),{meetsMembershipRequirement:F,rewardsForCurrentUserSegment:j}=U,$=[...F&&U.userHasOfferAvailable()?j:[],...this.shouldRewardCloudMount()?[B]:[],...ft.W.hasRewardAvailable?yield ft.W.collectMemberUpgradeReward():[]];if(this.hasMembership()&&$.length>0){this.shouldRewardCloudMount()&&Ft.J.bagItem(B,this.game,"got-item",void 0),j.length>0&&U.redeemActiveOffer();const F=new G._mx,H=F.addComponent(St.f);return H.addItems($,!0),H.onComplete.addOnce((()=>{null==k||k(),dt.q.instance.prodigy.game.broadcaster.broadcast(wt.H3.MembershipRewardsFlowComplete),F.destroy()})),H.showPetsInPetCardFormat=!0,H.sourceType=nt.C.ConversionOffer,dt.q.instance.prodigy.open.rewardCloudMountMenu((()=>H.awardItem())),!0}return null==k||k(),!1}))}isItemOwned(k){let B=this.backpack.hasItem(k.type,k.ID)>0;if("dorm"===k.type)B=this.house.getOwned(k.ID)>=9;else if("dormbg"===k.type){const U=zt.t.getItem("dormbg",k.ID).data;B=G.Aq$.isDefined(U)&&U.tag===this.house.getCurrentHouseTag()}else"pet"===k.type?B=this.kennel.hasPet(k.ID):"item"===k.type?B=this.backpack.hasItem(k.type,k.ID)>=99:"hair"===k.type?B=this.appearance.getHair().style===k.ID:"eyeColor"===k.type?B=this.appearance.getEyeColor()===k.ID:"skinColor"===k.type?B=this.appearance.getSkinColor()===k.ID:"hairColor"===k.type?B=this.appearance.getHair().color===k.ID:"face"===k.type?B=this.appearance.getFace()===k.ID:"mathTownInterior"===k.type?B=this.backpack.hasItem(k.type,k.ID)>0:"mathTownFrame"!==k.type&&"mathTownDecor"!==k.type||(B=this.backpack.hasItem(k.type,k.ID)>=99);return B}getItemCount(k,B){if((0,it.p)(k,B))return this._secureInventory.getCount({type:k,id:B});switch(k){case"dorm":return this.house.getOwned(B);case"pet":return this.kennel.amountOfPet(B);case"currency":return 1===B?this.getGold():this.backpack.hasItem(k,B);case"gold":return this.getGold()}return this.backpack.hasItem(k,B)}hasHouseItem(k){return"dorm"===k.type&&this.house.getOwned(k.ID)>0}anyPetsAboveLevel(k){const B=this.kennel.getPets();for(let U=0;Uk)return!0;return!1}getDrops(){return super.getDrops().concat({type:"gold",N:100},zt.t.getItemDrops())}checkVersion(){var k,B,U,F,j,H,W,K,z,Y,Q,Z,J;const it=G.Aq$.isDefined(this.getPlayerData().versionID)?this.getPlayerData().versionID:0;if(it<1&&(G.Aq$.isDefined(this.state.data.zone)&&G.Aq$.isDefined(this.state.data.zone.lamplight)&&delete this.state.data.zone.lamplight,G.Aq$.isDefined(this.state.data.zone)&&G.Aq$.isDefined(this.state.data.zone.house)&&delete this.state.data.zone.house,this.state.updated=!0),it<2&&this.kennel.hasPet(125)&&this.backpack.add("follow",125),it<3){let k=this.state.get("zone-forest-quest-ID");G.Aq$.isDefined(k)&&k>=12&&this.state.set("zone-forest-quest",{ID:13}),k=this.state.get("zone-shiverchill-quest-ID"),G.Aq$.isDefined(k)&&k>=15&&this.state.set("zone-shiverchill-quest",{ID:16}),k=this.state.get("zone-skywatch-quest-ID"),G.Aq$.isDefined(k)&&k>=13&&this.state.set("zone-skywatch-quest",{ID:14}),k=this.state.get("zone-bonfire_spire-quest-ID"),G.Aq$.isDefined(k)&&k>=14&&this.state.set("zone-bonfire_spire-quest",{ID:15})}if(it<4){G.Aq$.isDefined(this.getPlayerData().stars)||(this.getPlayerData().stars=0),this.getPlayerData().stars=10*this.getPlayerData().stars,this.changeCurrentHearts(Wt.s.MAX_SAFE_INTEGER);const k=this.kennel.getPets();for(let B=0;B0&&this.backpack.consume("weapon",1e3,1),1e3===this.equipment.getWeapon()&&this.equipment.setWeapon(0)),it<9){let k=this.backpack.hasItem("weapon",1e3);k>0&&this.backpack.consume("weapon",1e3,k),1e3===this.equipment.getWeapon()&&this.equipment.setWeapon(0),k=this.backpack.hasItem("weapon",96),k>0&&this.backpack.consume("weapon",96,k),96===this.equipment.getWeapon()&&this.equipment.setWeapon(0)}if(it<10||it<14){const k=G.Aq$.isDefined(Number.MAX_SAFE_INTEGER)?Number.MAX_SAFE_INTEGER:9007199254740991;if(G.Aq$.isDefined(this.getPlayerData().playerTransformation)&&(G.Aq$.isDefined(this.getPlayerData().playerTransformation.maxTime)&&this.getPlayerData().playerTransformation.maxTime===k||G.Aq$.isDefined(this.getPlayerData().playerTransformation.timeRemaining)&&this.getPlayerData().playerTransformation.timeRemaining===k)){const k=this.getMaxTimeForCurrentMorphMarbleEffect();this.getPlayerData().playerTransformation.maxTime=k,this.getPlayerData().playerTransformation.timeRemaining=k}}if(it<11&&G.Aq$.isDefined(this.getPlayerData().playerTransformation)&&G.Aq$.isDefined(this.getPlayerData().playerTransformation.transformID)&&this.getPlayerData().playerTransformation.transformID>-1&&!G.Aq$.isDefined(this.getPlayerData().playerTransformation.timeRemaining)){const k=this.getMaxTimeForCurrentMorphMarbleEffect();this.getPlayerData().playerTransformation.maxTime=k,this.getPlayerData().playerTransformation.timeRemaining=k}if(it<12){const k=dt.q.instance.prodigy.world.getZone(rt.A_.HOUSE);k.getState("hasClickedPlayerCardVisit")&&dt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(et.B.FEATURE_HOUSE_VISITING,et.B.BREADCRUMB_CLICKED_CARD_VISIT_BUTTON),k.getState("hasClickedWorldMap")&&dt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(et.B.FEATURE_HOUSE_VISITING,et.B.BREADCRUMB_CLICKED_WORLD_MAP_BUTTON),k.getState("hasClickedLockButton")&&dt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(et.B.FEATURE_HOUSE_VISITING,et.B.BREADCRUMB_CLICKED_HOUSE_LOCK_BUTTON);const B=k.getState("houseMovingBreadcrumbs");G.Aq$.isDefined(B)&&(B>=0&&dt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(et.B.FEATURE_HOUSE_MOVING,et.B.BREADCRUMB_CLICKED_WORLD_MAP_BUTTON),B>=1&&dt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(et.B.FEATURE_HOUSE_MOVING,et.B.BREADCRUMB_CLICKED_WORLD_MAP_HOUSE),B>=2&&dt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(et.B.FEATURE_HOUSE_MOVING,et.B.BREADCRUMB_CLICKED_HOUSE_MOVE_BUTTON)),Ft.J.safeDeleteObjectProperty(this.getPlayerData(),"arenaRank"),Ft.J.safeDeleteObjectProperty(this.getPlayerData(),"arenaScore"),G.Aq$.isDefined(this.achievements)&&delete this.achievements.data.progress[13]}if(it<13&&Ft.J.safeDeleteObjectProperty(this.getPlayerData(),"reward"),it<15&&G.Aq$.isDefined(this.kennel.data)){const B=[],U=[...this.kennel.data];for(let F=0;F{var B;return j.name===(null===(B=null==k?void 0:k.data)||void 0===B?void 0:B.name)})))||void 0===k?void 0:k.ID;if(!G.Aq$.isDefined($)||$<=0)continue;let H=!0;for(const k of B)if($===k){U.splice(F,1),F--,H=!1;break}H&&(B.push($),U[F]={ID:$,stars:0,level:1}),this.kennel.updated=!0}this.kennel.populateKennel(U)}if(it<16&&(delete this.state.data.useOldTutorialPath,!this.hasCompletedTutorial())){delete this.getPlayerData().zone,delete this.state.data.zone.house,delete this.state.data.zone.lamplight;const k=[1,4,7,10],B=this.kennel.data.filter((B=>!$.includes(k,B.ID)));this.kennel.populateKennel(B)}if(it<17&&dt.q.instance.prodigy.world.getZone(rt.A_.LAMPLIGHT).isOnSequence(1,3)&&(this.getPlayerData().zone="lamplight-B0"),it<18&&(delete this.getPlayerData().spinDate,delete this.getPlayerData().numSpins),it<19&&this.hasCompletedTutorial()&&(null===this.appearance.getName()&&this.appearance.setName(new tt.S),G.Aq$.isDefined(this.appearance.getName().getFirstName())||(this.appearance.getName().setFirstName(Yt.C.getRandomFirstName()),this.appearance.updated=!0),G.Aq$.isDefined(this.appearance.getName().getMiddleName())&&G.Aq$.isDefined(this.appearance.getName().getLastName())||(this.appearance.getName().setMiddleName(Yt.C.getRandomMiddleName()),this.appearance.getName().setLastName(Yt.C.getRandomLastName()),this.appearance.updated=!0)),it<20){let k=this.state.get("zone-lamplight");$.get(this.data,"isNewTutorial",!1)&&(k=this.state.get("zone-house")),$.get(k,"quest.ID",0)>=2&&G.Aq$.isDefined(this.backpack)&&this.backpack.hasItem("key",13)>0||(this.state.data.tutorial={},this.state.data.zone={},this.state.data.world={},this.state.data.breadcrumbs={},this.state.updated=!0,this.backpack.data.key=[],this.backpack.updated=!0),delete this.data.isNewTutorial}if(it<21){const k={bonfire_spire:[{questID:5,relicID:1},{questID:11,relicID:2},{questID:14,relicID:3}],shiverchill:[{questID:3,relicID:4},{questID:10,relicID:5},{questID:14,relicID:6}],skywatch:[{questID:4,relicID:7},{questID:10,relicID:8},{questID:13,relicID:9}],shipwreck_shore:[{questID:3,relicID:10},{questID:7,relicID:11},{questID:11,relicID:12}],forest:[{questID:4,relicID:13},{questID:8,relicID:14},{questID:12,relicID:15}]};Object.keys(k).forEach((B=>{for(let U=0;U{if(k.timesRescued>0){const U=zt.t.getItem("pet",k.ID);let F=Nt.P8.findPreviousEvolution(U,B);for(;F;)F&&this.encounters.getPetTimesRescued(F.ID)<1&&this.encounters.addToPetTimesRescued(F.ID,k.timesRescued),F=Nt.P8.findPreviousEvolution(F,B)}};k.pets.forEach(U)}if(it<34){const k=this.encounters.getDataAndClear();$.remove(k.pets,(k=>Nt.P8.isPetACrystalMonster(k.ID))),$t.h.STARTER_PETS.forEach((B=>{const U=k.pets.find((k=>k.ID===B));(!U||U.timesRescued<1)&&this.encounters.addToPetTimesBattled(B,1)}))}if(34===it){const k=this.encounters.getDataAndClear(),B=zt.t.getCategoryItems("pet"),U=dt.q.instance.prodigy.gameContainer.get("a03-308f").getServerTimeMs();for(let G=0;G{if(k.timesRescued>0){const U=zt.t.getItem("pet",k.ID);let F=Nt.P8.findPreviousEvolution(U,B);for(;F;)this.encounters.getPetTimesRescued(F.ID)<1&&this.encounters.addToPetTimesRescued(F.ID,k.timesRescued),F=Nt.P8.findPreviousEvolution(F,B)}};k.pets.forEach(F)}if(it<35&&0===this.backpack.hasItem("mount",1)&&this.equipment.setMount(null),it<38&&this.state.data.breadcrumbs&&Ft.J.safeDeleteObjectProperty(this.state.data.breadcrumbs,"BREADCRUMB_FEATURE_ANTI_CHURN_2"),it<39&&(this.achievements.setTag(Qt.f.Kills,this.achievements.data.kills),delete this.achievements.data.kills,this.achievements.setTag(Qt.f.QuestionsCorrect,this.achievements.data.qC),delete this.achievements.data.qC,this.achievements.setTag(Qt.f.GoldEarned,this.achievements.data.gE),delete this.achievements.data.gE,this.achievements.setTag(Qt.f.GoldSpent,this.achievements.data.gS),delete this.achievements.data.gS),it<41&&this.kennel.data.filter((k=>G.Aq$.isDefined(k.catchDate))).sort(((k,B)=>k.catchDate-B.catchDate)).forEach((k=>{this.encounters.setPetFirstRescuedDate(k.ID,k.catchDate)})),it<42){const k=new Date("2022-10-01").getTime();this.encounters.getDataAndClear().pets.filter((k=>k.timesRescued>0&&!G.Aq$.isDefined(k.firstRescuedDate))).forEach((B=>this.encounters.setPetFirstRescuedDate(B.ID,k)))}if(it<43&&0===this.appearance.getFace()&&this.appearance.setFace(Zt.q.DEFAULT_FACE),it<44){for(const k of this.kennel.data)k.uniqueID=(0,V.Ak)();this.kennel.updated=!0}if(it<45&&It.T.ready.then((()=>{var k;const B=dt.q.instance.prodigy.world.getZone(rt.A_.SHIVERCHILL);6===(null===(k=B.getState("quest"))||void 0===k?void 0:k.ID)&&!G.Aq$.isDefined(B.getState("furnace"))&&(this.state.data.zone[rt.A_.SHIVERCHILL]={})})).catch(G.RQr.createHandler("ActivePlayer.ts: Could not find experiment manager ")),it<47&&It.T.ready.then((()=>{var k,B,U,F,j;if(this.hasCompletedTutorial()){const H=dt.q.instance.prodigy.world.getZone(rt.A_.FOREST),V=(null===(k=this.data)||void 0===k?void 0:k.questSystem)===re.p.Legacy,W=!G.Aq$.isDefined(null===(B=this.data)||void 0===B?void 0:B.questSystem),q=!$.isEqual(null===(U=H.getQuestState())||void 0===U?void 0:U.req,null===(F=H.getCurrentQuest())||void 0===F?void 0:F.req),K=H.getCurrentQuestID()>5&&this.encounters.getPetTimesRescued(Ht.c.PET_AWARD_ID)<1;if(V||W&&(q||K)){H.migrateQuestProgress();const k=dt.q.instance.prodigy.world.getZone(rt.A_.SHIVERCHILL).questHub;this.data.lastVisitedMapForZone[rt.A_.SHIVERCHILL]=k,(null===(j=this.data)||void 0===j?void 0:j.zone.includes(rt.A_.SHIVERCHILL))&&(this.data.zone=k)}}})).catch(G.RQr.createHandler("ActivePlayer.ts: Could not find experiment manager ")),it<48&&this.appearance.gender&&delete this.appearance.gender,it<49&&(G.Aq$.isDefined(this.data.questSystem)&&"object"!=typeof this.data.questSystem&&delete this.data.questSystem,this.setQuestSystem(rt.A_.FOREST,re.p.Revised)),it<50){const k=1===this.equipment.getOutfit(),B=this.backpack.hasItem("outfit",1)>0;k&&!B&&this.equipment.setOutfit(null)}if(it<51&&!G.Aq$.isDefined(this.data.nextLevelProgressPercent)&&It.T.ready.then((()=>{Kt.legacyMigrateCreatureToLevelCurve(this.getPlayerData(),st.V.Player),this.forceSaveCharacter()})).catch(G.RQr.createHandler("[ActivePlayer] Error awaiting the experiment manager")),it<52&&It.T.ready.then((()=>{for(const k of this.kennel.data)Kt.legacyMigrateCreatureToLevelCurve(k,st.V.Player);this.kennel.updated=!0,this.forceSaveCharacter()})).catch(G.RQr.createHandler("[ActivePlayer] Error awaiting the experiment manager")),it<53&&G.Aq$.isDefined(this.data.rate)&&delete this.data.rate,it<54&&(G.Aq$.isDefined(this.getQuestSystem("ftue"))?this.getQuestSystem("ftue")===re.p.RevisedWithPlayerGoals?this.setQuestSystem("playerGoals",re.p.PlayerGoalsFtue):this.setQuestSystem("playerGoals",re.p.PlayerGoalsPostFtue):this.hasStartedTutorial()?this.setQuestSystem("playerGoals",re.p.PlayerGoalsPostFtue):this.setQuestSystem("playerGoals",re.p.PlayerGoalsFtue),this.forceSaveCharacter()),it<55&&this.kennel.hasPet(245)){const k=zt.t.getItem("pet",245),B=null==k?void 0:k.data.unlockFollow;G.Aq$.isDefined(B)&&this.backpack.hasItem("follow",B)<1&&this.backpack.add("follow",B)}if(it<56&&delete this.data.battleSystem,it<57&&Array.isArray(this.data.lastStoreVisit)){const k={};this.data.lastStoreVisit.forEach((B=>k[B[0]]=B[1])),delete this.data.lastStoreVisit,this.data.lastStoreVisitLevels=k}if(it<58&&!1===(null===(j=this.difficultyUnlocks)||void 0===j?void 0:j.hard)){dt.q.instance.prodigy.world.getZone(rt.A_.FORESTHARD).setState("quest",{})}if(it<59&&(G.Aq$.isDefined(this.data.bountyScore)&&delete this.data.bountyScore,this.backpack.consume("key",5,100),this.backpack.consume("key",6,100),this.backpack.consume("key",7,100),this.backpack.consume("item",84,100),this.backpack.consume("item",85,100),this.backpack.consume("item",86,100),this.state.set("world-bounties",void 0)),it<60){const k=dt.q.instance.prodigy.world.getZone(rt.A_.SHIVERCHILL).getState("quest");if(12===(null==k?void 0:k.ID)&&0===k.seq){const B=this.backpack.hasItem("item",74);if(3===B||4===B?k.seq=1:5===B&&(k.seq=2),k.state)for(let U=1;U<=5;U++)k.state[U.toString()]=U<=B?1:0;this.state.data.zone[rt.A_.SHIVERCHILL].quest.seq=k.seq,this.state.data.zone[rt.A_.SHIVERCHILL].quest.state=k.state,this.state.updated=!0}}if(it<61&&(null===(H=this.state.data.zone[rt.A_.SHIVERCHILLHARD])||void 0===H||delete H.uniqueEncounters,this.state.updated=!0),it<62){const k=new Map([["C12-shipwreck_shore_C12_R1_boss",{assetType:"hat",assetID:270}],["C9-shipwreck_shore_C9_R1_boss",{assetType:"weapon",assetID:271}],["B6-shipwreck_shore_B6_R1_boss",{assetType:"boots",assetID:145}],["B2-shipwreck_shore_B2_R1_boss",{assetType:"outfit",assetID:262}]]),B=dt.q.instance.prodigy.world.getZone(rt.A_.SHIPWRECKHARD);for(const[G,j]of k)B.getState(`uniqueEncounters-${G}`)&&!this.backpack.hasItem(j.assetType,j.assetID)&&this.backpack.add(j.assetType,j.assetID);const U=B.getState("quest");(null==U?void 0:U.ID)&&U.ID>11&&(this.backpack.hasItem("spellRelic",59)||this.backpack.add("spellRelic",59));const F=dt.q.instance.prodigy.world.getZone(rt.A_.SHIVERCHILLHARD).getState("quest");(null==F?void 0:F.ID)&&F.ID>13&&(this.backpack.hasItem("spellRelic",57)||this.backpack.add("spellRelic",57)),this.state.updated=!0}if(it<63){const k=dt.q.instance.prodigy.world.getZone(rt.A_.SHIVERCHILLHARD).getState("quest"),B=this.state.data.zone[rt.A_.SHIVERCHILLHARD];if(1===(null==k?void 0:k.ID)&&2===(null==k?void 0:k.seq)){const k=["shiverchill_B10_S1_special","shiverchill_B10_S2_special","shiverchill_B10_S3_special"];for(const U of k)G.Aq$.isDefined(null===(K=null===(W=null==B?void 0:B.uniqueEncounters)||void 0===W?void 0:W.B10)||void 0===K?void 0:K[U])&&delete B.uniqueEncounters.B10[U]}if(8===(null==k?void 0:k.ID)&&1===(null==k?void 0:k.seq)){const k=["shiverchill_B7_S1_special","shiverchill_B7_S2_special"],U=["shiverchill_B6_S1_special","shiverchill_B6_S2_special"];for(const F of k)G.Aq$.isDefined(null===(Y=null===(z=null==B?void 0:B.uniqueEncounters)||void 0===z?void 0:z.B7)||void 0===Y?void 0:Y[F])&&delete B.uniqueEncounters.B7[F];for(const F of U)G.Aq$.isDefined(null===(Z=null===(Q=null==B?void 0:B.uniqueEncounters)||void 0===Q?void 0:Q.B6)||void 0===Z?void 0:Z[F])&&delete B.uniqueEncounters.B6[F]}this.state.updated=!0}if(it<64&&(null===(J=this.data.questSystem)||void 0===J||delete J.zoneUnlockType,this.state.updated=!0),it<65){const k=this.getPlayerData(),B=k.postBattleMemberVideo;B&&(k.featureInteractionTimestamps=Object.assign(Object.assign(Object.assign({},k.featureInteractionTimestamps),B.lastWatchedTimestamp&&{[X.s.PostBattleFlowHome]:{timestamp:B.lastWatchedTimestamp,videoId:B.lastWatchedVideoId}}),B.lastWatchedSchoolTimestamp&&{[X.s.PostBattleFlowSchool]:{timestamp:B.lastWatchedSchoolTimestamp,videoId:B.lastWatchedSchoolVideoId}}),delete k.postBattleMemberVideo)}if(it<66){const k=dt.q.instance.prodigy.world.getZone(rt.A_.BONFIREHARD),B=k.getState("quest"),U=this.backpack.hasItem("key",12,q.i.Hard)>0,F=this.hasFoundKeystone(rt.A_.BONFIREHARD);void 0!==(null==B?void 0:B.ID)&&B.ID>=1&&(!F&&U&&B.ID<=12?(B.ID=13,B.seq=0,k.setState("lever1",1),k.setState("lever2",1),k.setState("lever3",1)):F&&U&&B.ID<=14&&(B.ID=15,B.seq=0,k.setState("lever1",1),k.setState("lever2",1),k.setState("lever3",1)))}it<66&&(this.getPlayerData().versionID=66,this.updated=!0)}validateTutorialState(){const k=this.hasCompletedTutorial(),B=this.hasStartedTutorial(),U=dt.q.instance.prodigy.gameContainer.get("f91-8211"),$="ftue",H=this.getQuestSystem($)===re.p.Legacy,V=!G.Aq$.isDefined(this.data.zone);if(V&&!this.hasQuestSystemProperty($))return this.setQuestSystem($,re.p.RevisedWithPlayerGoals),void this.setQuestSystem("playerGoals",re.p.PlayerGoalsFtue);V||k||U.getQuestStatus(yt.M.FTUE).then((k=>(0,F.sH)(this,void 0,void 0,(function*(){var F,V,W,q,K;const z=k===Y.t.COMPLETE,Q=k===Y.t.IN_PROGRESS;if(z){new Et.G("",0).markTutorialComplete(),dt.q.instance.prodigy.world.it("forest-C8");const k=new Error("[User State Error] Tutorial completion flag does not match tutorial quest progress. See ActivePlayer.validateTutorialState()");j.captureException(k),G.RQr.logError(k,"")}if(Q){const k=this.data.zone,B=yield U.getTasksInProgress(void 0,[yt.M.FTUE]),$=null===(K=null===(q=null===(W=null===(V=null===(F=null==B?void 0:B[0])||void 0===F?void 0:F.onSetupTasks)||void 0===V?void 0:V[0])||void 0===W?void 0:W.featureRequirements)||void 0===q?void 0:q.requirements)||void 0===K?void 0:K[0].currentMap;if(G.Aq$.isDefined($)&&$!==k){dt.q.instance.prodigy.world.it($);const k=new Error("[User State Error] User is on the wrong map for their current tutorial step. See ActivePlayer.validateTutorialState()");j.captureException(k),G.RQr.logError(k,"")}}if(H)this.setQuestSystem($,re.p.RevisedWithPlayerGoals),this.setQuestSystem("playerGoals",re.p.PlayerGoalsFtue),this.resetAccount();else if(B){const B="ftue";switch(k){case Y.t.IN_PROGRESS:G.Aq$.isDefined(this.getQuestSystem(B))||(this.setQuestSystem(B,re.p.Revised),delete this.state.data.zone.academy.quest,this.state.updated=!0);break;case Y.t.COMPLETE:new Et.G("",0).markTutorialComplete();break;default:throw new Error("[ActivePlayer] QuestTaskStatus unknown")}}})))).catch(G.RQr.createHandler("[ActivePlayer] Error when checking a player state with data from legacy and revamped tutorial"))}validateQuestState(){const k=dt.q.instance.prodigy.gameContainer.get("a25-68f4"),B=this.highestDifficultyUnlocked,U=Gt.N.getCoreZonesInOrder(B).map((k=>({zoneInfo:k,keyAsset:Vt.b.ZONE_KEYSTONES[k.zone],questManagerMapEntry:_t.n[k.zone],hasFoundKeyStone:this.hasFoundKeystone(k.zone)})));k.managerSetupPromise.then((()=>{U.forEach((({keyAsset:U,questManagerMapEntry:F,hasFoundKeyStone:j})=>{if(!G.Aq$.isDefined(U)||!G.Aq$.isDefined(F))return;const{questTag:$,questId:H}=F,V=k.questManagerMap.get($);null==V||V.getQuestStatus(H).then((k=>{j||k!==Y.t.COMPLETE||Ft.J.bagItem({type:"key",ID:U,N:1,data:{seed:0,difficultyMode:B}},dt.q.instance.prodigy.game,"unknown",void 0,{source_type:nt.C.QuestReward})})).catch(G.RQr.createHandler("[ActivePlayer] Error getting quest task status in validateQuestState"))})),U.forEach((({zoneInfo:B,questManagerMapEntry:U})=>{const{questTag:F}=U,j=k.questManagerMap.get(F);null==j||j.getTasksInProgress().then((k=>k.forEach((k=>this.validateUniqueEncounterTaskState(B.zone,k))))).catch(G.RQr.createHandler("[ActivePlayer] Error getting tasks in progress in validateQuestState"))}));const F=B===q.i.Hard?dt.q.instance.prodigy.world.getZone(rt.A_.SHIVERCHILLHARD):dt.q.instance.prodigy.world.getZone(rt.A_.SHIVERCHILL),j=F.getState("quest");12===(null==j?void 0:j.ID)&&0===j.seq?this.validateCollectItemQuest(F,74,["quest-state-1","quest-state-2","quest-state-3"]):12===(null==j?void 0:j.ID)&&1===j.seq&&this.validateCollectItemQuest(F,74,["quest-state-1","quest-state-2","quest-state-3","quest-state-4","quest-state-5"]);const $=B===q.i.Hard?dt.q.instance.prodigy.world.getZone(rt.A_.SKYWATCHHARD):dt.q.instance.prodigy.world.getZone(rt.A_.SKYWATCH),H=$.getState("quest");12===(null==H?void 0:H.ID)&&0===H.seq&&this.validateCollectItemQuest($,82,["quest-state-0","quest-state-1"]),Mt.F.validateZoneProgressionType()})).catch(G.RQr.createHandler("[ActivePlayer] Error awaiting quest manager hub in validateQuestState"))}validateUniqueEncounterTaskState(k,B){var U,F,G,j,$,H;const V=dt.q.instance.prodigy.world.getZone(k),W=null===(U=B.taskDefinition.completionRequirements.conditions)||void 0===U?void 0:U.find((k=>k.type===Q.i.UNIQUE_ENCOUNTER_RESTRICTIONS));if(!W)return;const q=null!==(j=null===(G=null===(F=V.getQuestState())||void 0===F?void 0:F.req)||void 0===G?void 0:G.N)&&void 0!==j?j:0,K=null!==(H=null===($=W.data)||void 0===$?void 0:$.ids)&&void 0!==H?H:[],z=K.filter((k=>this.state.get(k)));z.slice(0,Math.max(0,q-(K.length-z.length))).forEach((k=>{this.state.set(k,void 0)}))}validateCollectItemQuest(k,B,U){const F=this.backpack.hasItem("item",B,k.difficultyMode),G=U.reduce(((B,U)=>B+(k.getState(U)?1:0)),0),j=G-F;if(j>=0)for(let $=j;$-1)for(let k=117;k<=122;k++){const B=zt.t.getItem("item",k).data;if(G.Aq$.isDefined(B.effect)&&G.Aq$.isDefined(B.effect.transform)&&B.effect.transform===this.getPlayerData().playerTransformation.transformType&&G.Aq$.isDefined(B.effect.ID)&&B.effect.ID===this.getPlayerData().playerTransformation.transformID)return G.Aq$.isDefined(B.effect.time)?B.effect.time:0}return 0}addAssets(k){for(let B=0;B{this.forceSaveCharacter(k,!1)}));const F=this.saveEnabled;this.saveEnabled=!0,this.updated=!0,U.onPlayerSaved.addOnce((()=>{k&&k()})),U.updateCharacter(),this.saveEnabled=F}resetAccount(){G.VyI.log("Resetting account!",G.$bb.Verbose),this.data.level=bt.s.minLevel,this.data.stars=0,this.data.storedMemberStars=0,this.updated=!0,this.tutorial.setData({zones:{},menus:{}}),this.tutorial.updated=!0,this.backpack=new Xt.H;const k=$.filter(this.kennel.data,(k=>k.ID<=133&&k.ID>=125));let B;if(this.kennel.populateKennel(k),$.forEach(this.kennel.data,(k=>{this.backpack.add("follow",zt.t.getItem("pet",k.ID).data.unlockFollow)})),this.backpack.updated=!0,this.kennel.updated=!0,this.data.lastStoreVisitLevels={},this.appearance.setName(new tt.S),this.name.init(this.appearance.getName()),this.equipment.clearData(),this.encounters.setData(null),this.encounters.updated=!0,this.state.data.breadcrumbs[pt.D.FEATURE_NAME]&&(B=this.state.data.breadcrumbs[pt.D.FEATURE_NAME]),this.state.data.tutorial={},G.Aq$.isDefined(this.state.data.zone))for(const U in this.state.data.zone){const k=ce.ACCOUNT_RESET_ZONE_KEEPERS.indexOf(U)>-1;this.state.data.zone.hasOwnProperty(U)&&!k&&(this.state.data.zone[U]=void 0)}else this.state.data.zone={};this.state.data.world={},this.state.data.breadcrumbs={},B&&(this.state.data.breadcrumbs[pt.D.FEATURE_NAME]=B),this.state.data.keystones=null,this.state.updated=!0}validateLevel(){const k=bt.s.minLevel,B=bt.s.activePlayerLevelCap;if(!G.Aq$.isDefined(this.data.level)){const B=new J.i;B.setKey("prodigy_game.APIClient.InvalidLvlValidate"),B.setValue(1),this._remoteLogger.logStat(B,Z.d.Increment),G.VyI.log("Invalid level found, so setting to level 1.",G.$bb.Error),this.data.level=k,this.data.stars=bt.s.xpRequiredForLevel(k,st.V.Player)}this.currentMaxLevel=B}setChargedLevelsData(k){var B,U,F;const j=null===(B=this.data.chargedLevelData)||void 0===B?void 0:B.chargedLevel,$=null==k?void 0:k.chargedLevel;this.data.chargedLevelData=k,null!==(U=(F=this.data).unsecureChargedLevelData)&&void 0!==U||(F.unsecureChargedLevelData={});const H=new Date(this.data.chargedLevelData.decayImmunityExpiryDate),V=new Date;if(G.Aq$.isDefined(j)&&G.Aq$.isDefined($)&&j!==$){this.data.chargedLevelData.hasJustReachedConversionMilestone||(this.data.chargedLevelData.hasJustReachedConversionMilestone=ce.CHARGED_LEVELS_CONVERSION_MILESTONES.some((k=>k>j&&k<=$))||$===this.data.chargedLevelData.chargedLevelCap);dt.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendPlayerProgressionAdvancedEvent({progressionType:"Charged Level",progressionNewValue:(this.getLevel()+$).toString(),progressionPreviousValue:(this.getLevel()+j).toString(),creatureName:"Player"},{pointType:"stars",pointCount:this.getStars()+this.data.chargedLevelData.chargedLevelCumulativeXp},{decay_is_frozen:G.Aq$.isDefined(this.data.chargedLevelData.decayImmunityExpiryDate)&&H>V})}}updateChargedLevelsData(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U,F;const G=dt.q.instance.prodigy.gameContainer.get("639-22b8"),j=dt.q.instance.prodigy.breadcrumbManager;if(!j.isBreadcrumbComplete(et.B.FEATURE_CHARGED_LEVELS,et.B.BREADCRUMB_CHARGED_LEVELS_CLEARED)&&ut.J.shouldClearChargedLevels)return yield G.clearChargedLevelData(),void j.completeBreadcrumb(et.B.FEATURE_CHARGED_LEVELS,et.B.BREADCRUMB_CHARGED_LEVELS_CLEARED);const $=yield G.GetChargedLevelProgressData(),H=null!==(B=null===(k=this.data.chargedLevelData)||void 0===k?void 0:k.hasReceivedFreeChargedLevel)&&void 0!==B&&B;$.hasJustReachedConversionMilestone=null!==(F=null===(U=this.data.chargedLevelData)||void 0===U?void 0:U.hasJustReachedConversionMilestone)&&void 0!==F&&F,this.setChargedLevelsData($),this.data.chargedLevelData&&(this.data.chargedLevelData.hasJustReceivedFreeChargedLevel=!H&&$.hasReceivedFreeChargedLevel)}))}setSegmentedOfferState(k){this.data.segmentedOfferState=k,this.forceSaveCharacter()}clearSegmentedOfferState(){this.data.segmentedOfferState=void 0,this.forceSaveCharacter()}onEducationLoaded(k){this._educationData=Ct.updateEducationData(this._educationData,k)}setEducation(k,B){this._educationData.chosenGrade=k,this._educationData.grade=k,this._educationData.curriculumTreeID=B}initEducation(){dt.q.instance.prodigy.education.initialize($.cloneDeep(this._educationData)),Wt.s.get("GameConstants.Debug.EDUCATION_LOGGING_ENABLED")?dt.q.instance.prodigy.education.enableLogging():dt.q.instance.prodigy.education.disableLogging()}isPlayingAtSchool(){return"school"===this.locationSelectionType}setLocation(k){"school"===k&&dt.q.instance.prodigy.classModeController.setClassMode(),this._locationSelectionType=k}get playerContainer(){return this._playerContainer}set playerContainer(k){this._playerContainer=k}get isZoneQuestEnabled(){return this.ultimateSessionStatus===oe.n.None||this.ultimateSessionStatus===oe.n.CollectingItems}get isTrackingQuestEnabled(){return this.ultimateSessionStatus===oe.n.TrackingNPC||this.ultimateSessionStatus===oe.n.TamingUltimate}getUltimatePetId(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=dt.q.instance.prodigy.gameContainer.get("e50-b09b"),B=yield k.getQuestMetaData(this.ultimateQuestId);return null==B?void 0:B.petID}))}clearTransitionSessionStatus(){this._ultimateSessionStatus===oe.n.Transition&&this.setUltimateSessionStatus(oe.n.None)}unlockSessionStatus(){this._ultimateSessionStatusLocked=!1}setQuestSystem(k,B){var U,F;null!==(U=(F=this.data).questSystem)&&void 0!==U||(F.questSystem={}),this.data.questSystem[k]=B,this.updated=!0}getQuestSystem(k){var B,U;return null!==(B=(U=this.data).questSystem)&&void 0!==B||(U.questSystem={}),this.data.questSystem[k]}hasQuestSystemProperty(k){var B;return null===(B=this.data.questSystem)||void 0===B?void 0:B.hasOwnProperty(k)}isOnRevisedQuestline(k){var B;switch(null===(B=this.data.questSystem)||void 0===B?void 0:B[k]){case re.p.Revised:case re.p.RevisedWithPlayerGoals:return!0}return!1}getMemberTier(){return dt.q.instance.prodigy.gameContainer.get("3a0-8003").memberTier}isAtMaxMembershipTier(){const k=this.getMemberTier(),B=k===at._$.MemberPlus||k===at._$.MemberUltimateMath,U=k===at._$.MemberUltra||k===at._$.MemberUltimateBundle;return Pt.pF.eligibleForMembershipPurchaseForMultipleTiers()?U:B}setDefeatedPetsData(k){this.data.defeatedPets=k,this.updated=!0}getDefeatedPetsData(){var k,B;null!==(k=(B=this.data).defeatedPets)&&void 0!==k||(B.defeatedPets={featureFunnelId:kt.$.generateUID(),lastFunnelDate:new Date(Date.now()),funnelStepsSeen:{}});const U=dt.q.instance.prodigy.gameContainer.get("7a1-ff33").getResetTime();return this.data.defeatedPets.lastFunnelDate>=U&&this.setDefeatedPetsData(Object.assign(Object.assign({},this.data.defeatedPets),{funnelStepsSeen:{},featureFunnelId:kt.$.generateUID(),lastFunnelDate:new Date(Date.now())})),this.data.defeatedPets}sendMembershipQueryRequest(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=dt.q.instance.prodigy.gameContainer.get("8bb-7057");return ot.D.isFeatureEnabled()?k.sendRequest("\nquery upgradeOptions ($source: UpgradeOptionSource!) {\n viewer{\n id\n username\n name\n activeMemberships {\n id\n startDate\n categories\n ownerIsPartialUser\n ownerHasSSOCredentials\n plan {\n id\n amount\n currency\n name\n interval\n }\n upgradeOptions(input: { source: $source }) {\n membershipPlans {\n id\n amount\n currency\n name\n }\n package {\n id\n name\n tier\n }\n }\n currentPackage {\n name\n tier\n id\n }\n }\n isParent\n }\n}",{source:Pt.pF.getDeviceSource()}):k.sendRequest("\nquery upgradeOptions {\n viewer{\n id\n username\n name\n activeMemberships {\n id\n startDate\n categories\n ownerIsPartialUser\n ownerHasSSOCredentials\n plan {\n id\n amount\n currency\n name\n interval\n }\n upgradeOptions {\n membershipPlans {\n id\n amount\n currency\n name\n }\n package {\n id\n name\n tier\n }\n }\n currentPackage {\n name\n tier\n id\n }\n }\n isParent\n }\n}")}))}isUsernameInGameDisplayEnabled(){var k,B,U,F;const j=(0,Dt.G)(z);if(!(null==j?void 0:j.enabled))return!1;if(G.Aq$.isDefined(null===(k=this.data)||void 0===k?void 0:k.lastLoginAtHome)&&G.Aq$.isDefined(null===(B=this.data)||void 0===B?void 0:B.lastLoginAtSchool))return!1;if(G.Aq$.isDefined(j.numberSessionsToShowUsername)){return(null!==(F=null===(U=this.data)||void 0===U?void 0:U.sessionCount)&&void 0!==F?F:0)<=j.numberSessionsToShowUsername}return!0}shouldShowUsernameAbovePlayer(){return this.isUsernameInGameDisplayEnabled()}shouldShowWizardNameAbovePlayer(){return!this.isUsernameInGameDisplayEnabled()||!!(0,Dt.G)(z).showBothNames}hasMembershipUpgradeOptions(){var k,B;return((null===(B=null===(k=this.membershipUpsell)||void 0===k?void 0:k.upgradeOptions)||void 0===B?void 0:B.length)||0)>0}canPurchaseMembershipInGame(){return!this.hasMembership()||!1===this.membershipUpsell.ownerIsPartialUser&&!1===this.membershipUpsell.ownerHasSSOCredentials&&this.hasMembershipUpgradeOptions()}addExperimentToEligiblilityList(k){var B,U;null!==(B=(U=this.data).experimentEligibilityList)&&void 0!==B||(U.experimentEligibilityList=[]),G.Aq$.isDefined(k)&&!this.data.experimentEligibilityList.includes(k)&&(this.data.experimentEligibilityList.push(k),this.updated=!0)}removeExperimentFromEligibilityList(k){if(!G.Aq$.isDefined(this.data.experimentEligibilityList))return;const B=this.data.experimentEligibilityList.indexOf(k);-1!==B&&(this.data.experimentEligibilityList.splice(B,1),this.updated=!0)}doMembershipLapsedCheck(){const k=dt.q.instance.prodigy.gameContainer.get("3a0-8003").memberTier!==at._$.NonMember;!k&&this.data.wasMemberLastSession&&dt.q.instance.prodigy.game.broadcaster.broadcast(wt.H3.MembershipLapsedBetweenSessions),this.data.wasMemberLastSession=k}}ce.ACCOUNT_RESET_ZONE_KEEPERS=[rt.A_.TOWERTOWN],ce.PLAYER_BATTLE_STREAK_CAP=3,ce.CHARGED_LEVELS_CONVERSION_MILESTONES=[2,10,20],(0,F.Cg)([(0,ct.b)("61f-37d6"),(0,F.Sn)("design:type",ht.U)],ce.prototype,"_secureInventory",void 0)},51894:(k,B,U)=>{"use strict";U.d(B,{H:()=>Y});var F,G=U(62459),j=U(95359),$=U(97495);!function(k){k.Unit="unit",k.Team="team"}(F||(F={}));var H=U(35120),V=U(73797),W=U(30226),q=U(40549),K=U(77938),z=U(5898);class Y{constructor(){this.data=null,this.updated=!1,this.onKeyAddedToBackpack=new G.HN0,this.data={hat:[],boots:[],weapon:[],outfit:[],item:[],fossil:[],key:[],relic:[],currency:[],follow:[],mount:[],spellRelic:[],costume:[]}}static sortBackpackGearByStats(k){k.sort(((k,B)=>{var U,F,G,j,$,H,V,W;const q=null!==(j=null!==(G=null!==(F=null!==(U=k.hp)&&void 0!==U?U:0+k.power)&&void 0!==F?F:0+k.defence)&&void 0!==G?G:0+k.speed)&&void 0!==j?j:0,K=null!==(W=null!==(V=null!==(H=null!==($=B.hp)&&void 0!==$?$:0+B.power)&&void 0!==H?H:0+B.defence)&&void 0!==V?V:0+B.speed)&&void 0!==W?W:0;return q===K?B.ID-k.ID:K-q}))}getDataAndClear(){return this.updated=!1,this.data}unlockAllItems(){for(const k in this.data){const B=this.data[k];for(let k=0;k{switch(k){case"weapon":this.data.weapon.forEach((k=>{var B,U;const F=K.t.getItem("weapon",k.ID);k.power=null===(U=null===(B=F.data)||void 0===B?void 0:B.stats)||void 0===U?void 0:U.power}));break;case"hat":this.data.hat.forEach((k=>{var B,U;const F=K.t.getItem("hat",k.ID);k.hp=null===(U=null===(B=F.data)||void 0===B?void 0:B.stats)||void 0===U?void 0:U.hp}));break;case"outfit":this.data.outfit.forEach((k=>{var B,U;const F=K.t.getItem("outfit",k.ID);k.defence=null===(U=null===(B=F.data)||void 0===B?void 0:B.stats)||void 0===U?void 0:U.defence}));break;case"boots":this.data.boots.forEach((k=>{var B,U;const F=K.t.getItem("boots",k.ID);k.speed=null===(U=null===(B=null==F?void 0:F.data)||void 0===B?void 0:B.stats)||void 0===U?void 0:U.speed}))}}))}setItemDifficulties(){var k,B;null===(k=this.data.key)||void 0===k||k.forEach((k=>{var B;return null!==(B=k.difficulty)&&void 0!==B?B:k.difficulty=$.i.Regular})),null===(B=this.data.item)||void 0===B||B.forEach((k=>{var B,U;const F=K.t.getItem(k.type,k.ID);(null===(B=null==F?void 0:F.data)||void 0===B?void 0:B.quest)&&(null!==(U=k.difficulty)&&void 0!==U||(k.difficulty=$.i.Regular))}))}getTotalUnique(){let k=0;for(const B in this.data)k+=this.data[B].length;return k}setKeyItemData(k,B,U){if(G.Aq$.isDefined(this.data.key)){for(let F=0;Fk.ID===B))}hasItem(k,B,U=null){var F;if("gold"===k||"currency"===k&&1===B)return 0;const G=this.getItem(k,B,U);return G?null!==(F=G.N)&&void 0!==F?F:1:0}hasItems(k){let B=0;for(let U=0;U0&&B++}return B}hasItemsOfType(k){return this.getBackpackItemsByType(k).length>0}hasMaxQuantityOfItem(k,B){return"currency"!==k&&this.hasItem(k,B)>=99}addKeyItem(k,B,U){var F,j,V;G.Aq$.isDefined(this.data.key)||(this.data.key=[]);const W=this.data.key,q=null!==(V=null!==(F=null==U?void 0:U.difficultyMode)&&void 0!==F?F:null===(j=H.q.instance.prodigy.world.getCurrentZoneObject())||void 0===j?void 0:j.difficultyMode)&&void 0!==V?V:$.i.Regular;for(let G=0;G99&&"currency"!==k&&(tt.N=99),H.q.instance.game.broadcaster.broadcast(V.ib.ItemReceived,void 0,[{ID:B,type:k,N:F,balance:tt.N}]),void(this.updated=!0);const it={ID:B,type:k};J>1&&(it.N=J),U&&(it.L=1);const st=null===(Z=K.t.getItem(k,B))||void 0===Z?void 0:Z.data;st&&(Object.keys(j.IE).map((k=>j.IE[k])).forEach((k=>{var B,U;it[k]=null!==(U=null===(B=st.stats)||void 0===B?void 0:B[k])&&void 0!==U?U:0})),(null==st?void 0:st.quest)&&(it.difficulty=et)),this.data[k].push(it),H.q.instance.game.broadcaster.broadcast(V.ib.ItemReceived,void 0,[{ID:B,type:k,N:F}]),this.updated=!0}consume(k,B,U=1){let F=U;if(isNaN(F)&&(G.VyI.log(`Trying to consume item type: ${k} ID: ${B} with quantity NaN. Defaulting to 1.`,G.$bb.Error),F=1),G.Aq$.isDefined(k)){const j=this.getItem(k,B);if(G.Aq$.isDefined(j)){const $=this.data[k];if(j.ID===B)return G.Aq$.isDefined(j.N)?(j.N-=F,1===j.N?delete j.N:j.N<=0&&$.splice($.indexOf(j),1)):$.splice($.indexOf(j),1),H.q.instance.game.broadcaster.broadcast(V.ib.ItemConsumed,void 0,[{ID:B,type:k,N:U,balance:j.N}]),void(this.updated=!0)}}}getBackpackItemsByType(k,B=null){var U,F;const j=this.data[k],V=null!==(F=null!=B?B:null===(U=H.q.instance.prodigy.world.getCurrentZoneObject())||void 0===U?void 0:U.difficultyMode)&&void 0!==F?F:$.i.Regular;return G.Aq$.isDefined(j)?j.filter((B=>!(Y.invalidItems.some((U=>U.ID===B.ID&&U.type===k))||B.difficulty&&B.difficulty!==V))):[]}getItemCount(k){let B=0;for(let U=0;U{"use strict";U.d(B,{s:()=>F});const F=["boots","hat","outfit","weapon","mount","follow"]},38487:(k,B,U)=>{"use strict";U.d(B,{s:()=>$});var F=U(62459),G=U(67462),j=U(39984);class $ extends j.e{constructor(k,B){super(k),this.showHealthBar=!1,this.data.level=B.level,this.data.nickname=B.nickname,this.source=B}getAttacks(k){return this.source.attacks||[]}getMaxHearts(){return this.source.maxHP}getName(){return this.source.name}getElement(){return this.source.element}getID(){return this.source.ID}getStarReward(){return F.Aq$.isDefined(this.source.starBonus)?this.source.starBonus:super.getStarReward()}chooseAction(k,B,U,F,G,j){return!1}getBamSpells(k){const B=this.getAttacks(),U=[];for(let F=0;F0?[`default-boss-${k}`]:[]}}},37639:(k,B,U)=>{"use strict";U.d(B,{K:()=>K});var F=U(62459),G=U(5491),j=U(50503),$=U(67462),H=U(77938),V=U(27293),W=U(56463),q=U(39984);class K extends q.e{constructor(k){super(k),this.creatureType=G.V.Player,this.appearance=null,this.equipment=null,this.appearance=new V.q,this.equipment=new W.C}init(k){return!!super.init(k)&&(F.Aq$.isDefined(k.appearance)&&this.appearance.init(k.appearance),F.Aq$.isDefined(k.equipment)&&this.equipment.init(k.equipment),F.Aq$.isDefined(k.data)&&F.Aq$.isDefined(k.data.level)&&(this.data.level=k.data.level),!0)}createDataClone(){const k=super.createDataClone();return k.equipment=this.equipment,k}getBamSpells(k=this.getLevel()){const B=[],U=[],F=[this.getNativeSpell(U,$.U.Native),this.getNativeSpell(B,$.U.Native)];return this.getEquipmentSpell($.U.Weapon).ID>0&&F.push(this.getEquipmentSpell($.U.Weapon)),this.getEquipmentSpell($.U.SpellRelic).ID>0&&F.push(this.getEquipmentSpell($.U.SpellRelic)),F}getStatPower(){return 5}getStatHealth(){return 5}getHeartBonus(){return this.equipment.getHeartBonuses()}getDamageBonus(){return this.equipment.getDamageBonuses()}getMaxHearts(k=null){const B=F.Aq$.isDefined(k)?k:this.getLevel(),U=Math.min(Math.floor(j.A.getCreatureHP(this,B)*this.getHeartBonus()),q.e.MAX_HEARTS);return Math.round(U*this.modifiers.maxHearts)}getEquipmentSpell(k){const B=this.equipment.getEquipment(k);if(F.Aq$.isDefined(B)&&B>0){const U=H.t.getItem(k,B);if(F.Aq$.isDefined(U)&&F.Aq$.isDefined(U.data)&&F.Aq$.isDefined(U.data.spellID))return{ID:U.data.spellID,type:k,locked:!1}}return $.x.getLockedEquipmentBamSpell(k)}getNativeSpell(k,B){const U=this.getLevel();for(let G=k.length-1;G>0;G--){const F=k[G];if(U>=F.level)return{ID:F.spellID,locked:!1,type:B,unlockLevel:F.level}}const F=k[0];return{ID:F.spellID,locked:F.level>U,type:B,unlockLevel:F.level}}}},27293:(k,B,U)=>{"use strict";U.d(B,{q:()=>$});var F=U(62459),G=U(95891),j=U(77938);class ${constructor(){this.hairColor=null,this.hairStyle=null,this.skinColor=null,this.eyeColor=null,this.face=null}init(k){F.Aq$.isDefined(k.hair)&&F.Aq$.isDefined(k.hair.style)||(k.hair={style:this.getRandomDefaultHair(),color:1},F.Aq$.isDefined(k.hairStyle)&&(k.hair.style=k.hairStyle),F.Aq$.isDefined(k.hairColor)&&(k.hair.color=k.hairColor)),this.hairColor=G.get(k,"hair.color",1),this.hairStyle=G.get(k,"hair.style",this.getRandomDefaultHair()),this.skinColor=k.skinColor,this.eyeColor=k.eyeColor,this.face=k.face}getRandomDefaultHair(){return Math.random()<.5?1:16}getHair(){return j.t.doesExist("hair",this.hairStyle)&&j.t.doesExist("hairColor",this.hairColor)?{style:this.hairStyle,color:this.hairColor}:{style:this.getRandomDefaultHair(),color:1}}setHair(k,B){this.getHair(),F.Aq$.isDefined(k)&&j.t.doesExist("hair",k)&&k!==this.hairStyle&&(this.hairStyle=k),F.Aq$.isDefined(B)&&j.t.doesExist("hairColor",B)&&B!==this.hairColor&&(this.hairColor=B)}getFace(){return F.Aq$.isDefined(this.face)&&j.t.doesExist("face",this.face)||(this.face=$.DEFAULT_FACE),this.face}setFace(k){j.t.doesExist("face",k)&&this.face!==k&&(this.face=k)}getEyeColor(){return j.t.doesExist("eyeColor",this.eyeColor)?this.eyeColor:1}setEyeColor(k){j.t.doesExist("eyeColor",k)&&(this.eyeColor=k)}getSkinColor(){return j.t.doesExist("skinColor",this.skinColor)?this.skinColor:1}setSkinColor(k){j.t.doesExist("skinColor",k)&&(this.skinColor=k)}}$.DEFAULT_FACE=20},56463:(k,B,U)=>{"use strict";U.d(B,{C:()=>j});var F=U(62459),G=U(77938);class j{constructor(){this.follow=null,this.hat=null,this.outfit=null,this.weapon=null,this.spellRelic=null,this.boots=null,this.mount=null}init(k){this.follow=k.follow,this.hat=k.hat,this.outfit=k.outfit,this.weapon=k.weapon,this.spellRelic=k.spellRelic,this.boots=k.boots,this.mount=k.mount,this.costume=k.costume}getFollow(){return this.follow}setFollow(k){this.follow=k}getHat(){return this.hat}setHat(k){this.hat=k}getOutfit(){return this.outfit}setOutfit(k){this.outfit=k}getWeapon(){return this.weapon}setWeapon(k){this.weapon=k}getSpellRelic(){return this.spellRelic}setSpellRelic(k){this.spellRelic=k}getBoots(){return this.boots}setBoots(k){this.boots=k}setMount(k){this.mount=k}getMount(){return this.mount}setCostume(k){this.costume=k}getCostume(){return this.costume}getHeartBonuses(){return this.calculateAffixBonus("hearts")}getDamageBonuses(){return this.calculateAffixBonus("damage")}calculateAffixBonus(k){const B="hearts"===k||"damage"===k;let U=B?1:0;const j=this.getAllAffixes();for(let $=0;$0)return k}return[]}getEquipment(k){let B=0;switch(k){case"follow":B=this.follow;break;case"hat":B=this.hat;break;case"outfit":B=this.outfit;break;case"weapon":B=this.weapon;break;case"spellRelic":B=this.spellRelic;break;case"boots":B=this.boots;break;case"mount":B=this.mount;break;case"costume":B=this.costume}return F.Aq$.isDefined(B)&&B>0?B:null}getData(){return{follow:this.follow,hat:this.hat,outfit:this.outfit,weapon:this.weapon,spellRelic:this.spellRelic,boots:this.boots,mount:this.mount,costume:this.costume}}}},34574:(k,B,U)=>{"use strict";U.d(B,{T:()=>F,d:()=>j});var F,G=U(62459);!function(k){k.NotHostingTeam="NOT_HOSTING_TEAM",k.TeamFull="TEAM_FULL",k.AlreadyJoined="ALREADY_JOINED",k.Timeout="TIMEOUT"}(F||(F={}));class j{constructor(){this.hostID=null,this.streak=0,this.teamMembers=[],this.readyMembers=[],this.maxTeamSize=3,this.onTeamMemberJoined=new G.HN0,this.onTeamMemberLeft=new G.HN0,this.onTeamMemberReady=new G.HN0}get HostID(){return this.hostID}set HostID(k){this.hostID=k}get Streak(){return this.streak}set Streak(k){this.streak=k}get TeamMembers(){return this.teamMembers}set TeamMembers(k){this.teamMembers=k}get ReadyMembers(){return this.readyMembers}set ReadyMembers(k){this.readyMembers=k}get MaxTeamSize(){return this.maxTeamSize}set MaxTeamSize(k){this.maxTeamSize=k}get OnTeamMemberJoined(){return this.onTeamMemberJoined}get OnTeamMemberLeft(){return this.onTeamMemberLeft}get OnTeamMemberReady(){return this.onTeamMemberReady}addPlayer(k,B=null){return this.teamMembers.indexOf(k)>-1?(null!==B&&(B.reason=F.AlreadyJoined),!1):this.teamMembers.length>=this.maxTeamSize?(null!==B&&(B.reason=F.TeamFull),!1):(this.teamMembers.push(k),this.readyMembers.push(k),this.streak=0,this.onTeamMemberReady.dispatch(k),this.onTeamMemberJoined.dispatch(k),!0)}removePlayer(k){const B=this.teamMembers.indexOf(k);if(B>-1){this.teamMembers.splice(B,1);this.readyMembers.indexOf(k)>-1&&this.readyMembers.splice(B,1),this.streak=0,this.onTeamMemberLeft.dispatch(k)}else G.VyI.log("User was not found in team while removing",G.$bb.Warning)}readyUpPlayer(k){if(this.teamMembers.indexOf(k)>-1){-1===this.readyMembers.indexOf(k)?(this.readyMembers.push(k),this.onTeamMemberReady.dispatch(k)):G.VyI.log("User is already ready",G.$bb.Warning)}else G.VyI.log("User was not found in team to ready-up",G.$bb.Warning)}destroy(){this.hostID=null,this.readyMembers=[],this.teamMembers=[],this.onTeamMemberJoined.dispose(),this.onTeamMemberReady.dispose(),this.onTeamMemberLeft.dispose()}}},39984:(k,B,U)=>{"use strict";U.d(B,{e:()=>st});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(95359),V=U(24521),W=U(87490);var q=U(6452),K=U(5491),z=U(35120),Y=U(50503),Q=U(55122),X=U(73797),Z=U(68152),J=U(23748),tt=U(22023),et=U(23029),it=U(77938);class st{get currentMaxLevel(){var k;return null!==(k=this._currentMaxLevel)&&void 0!==k?k:Q.s.maxLevelConfig.regular}set currentMaxLevel(k){this._currentMaxLevel=Math.trunc(k)}set team(k){this.data.team=k}get team(){return this.data.team}removeTeam(){delete this.data.team}get bench(){return tt.P8.getPetBench(this.data.ID)}constructor(k){this.justLeveled=!1,this.starsEarned=0,this.data={},this.modifiers=null,this.type="B",this.creatureType=K.V.Pet,this._currentMaxLevel=Q.s.maxLevelConfig.regular,this.source=null,this.game=null,this.inPVP=!1,this.catchAttempt=0,this.starsToProcess=0,this.starsRewardBase=100,this.starsReward=100,this.pvpHP=0,this.isOpponent=!1,this.showHealthBar=!0,this.onHPChange=new G.HN0,this.aoaTier=1,this.game=k,this.resetModifiers()}init(k){return G.Aq$.isDefined(k)}createDataClone(){const k=new this.constructor(this.game);return k.setData(j.cloneDeep(this.data)),k}setData(k){this.data=k}static getHeartsFromCurve(k,B,U){const F=st.HP_BONUS[k];return 20*(Math.floor((F+20)*U/100)-Math.floor((F+20)*(B-1)/100))}static getLevelPercent(k,B,U){const F=st.levelFromStars(k,B,U);if(F>=U)return 1;const G=st.starsToLevel(F+1,B),j=st.starsToLevel(F,B);return(k-j)/(G-j)}static getAttacksFromCurve(k,B,U){const F=[];for(let j=0;j=B&&$.lvl<=U&&G.Aq$.isDefined($.a)&&F.push($.a)}return F}static getEvolutionsFromCurve(k,B,U){const F=[];let j=!1;for(let $=0;$=B&&H.lvl<=U&&G.Aq$.isDefined(V)&&F.push(H)}if(j){let k=F.length;for(;k-- >0;)G.Aq$.isDefined(F[k].e)&&F[k].e>0&&F.splice(k,1)}return F}static getAttacksOfType(k,B=null){const U=[];for(let F=0;F(G.Aq$.isDefined(U)&&(F>=B.length||U!==B[F])&&k.push({oldId:B[F],newId:U,newlyUnlocked:!G.Aq$.isDefined(B[F])}),k)),[])}getAvailableEvolutions(k=this.getLevel()){const B=st.getEvolutionsFromCurve(this.getLevelingCurve(k),1,k),U=this.getID();let F=[];B.sort(((k,B)=>k.lvl-B.lvl));let G=j.findIndex(B,(k=>k.evolveID===U));G<=-1&&(G=j.findIndex(B,(k=>k.e===U)));const $=G+1;return $>=0&&$this.getMaxHearts()&&(this.data.hp=this.getMaxHearts()),k=this.data.hp):k=this.getMaxHearts(),J.z.validateInt(k,this.getMaxHearts())}getMaxHearts(k){const B=G.Aq$.isDefined(k)?k:this.getLevel();return Math.min(Math.floor(Y.A.getCreatureHP(this,B)),st.MAX_HEARTS)}getBaseMaxHearts(k){return this.getMaxHearts(k)}updateModifier(k,B){"potion"===k?this.modifiers.potion=B:"barrier"===k?this.modifiers.barrier=B:G.Aq$.isDefined(this.modifiers[k])&&(this.modifiers[k]+=B,this.modifiers[k]<=0&&(this.modifiers[k]=.01))}registerIncomingAttack(k,B,U,F){}changeCurrentHeartsPercent(k){const B=Math.round(this.getMaxHearts()*k);this.changeCurrentHearts(B)}changeCurrentHearts(k,B=0){const U=this.getCurrentHearts();this.setCurrentHearts(U+k,B)}setCurrentHearts(k,B=0){const U=this.getCurrentHearts(),F=G.cj9.clamp(k,B,this.getMaxHearts());this.inPVP?this.pvpHP=Math.round(F):this.data.hp=Math.round(F),this.onHPChange.dispatch(this,F-U)}processStars(){this.starsToProcess>0?this.addStars(this.starsToProcess):this.game.broadcaster.broadcast(X.ig.AnimationDone,this)}addStars(k,B=!1,U=!1){if(B)return!1;if(this.isOpponent)return!1;const F=Math.round(k);let j=!1;this.starsToProcess=0;const $=this.getLevel(),H=z.q.instance.prodigy.gameContainer.get("c47-20b6"),V=it.t.getItem("pet",this.getID());if(this.game.broadcaster.broadcast(X.ig.StarsAdded,this,null),$>=this.currentMaxLevel)return G.Aq$.isDefined(V)&&H.playerProgression.sendPlayerProgressionRestrictedEvent({progressionType:"Pet Level",progressionAction:"level_capped",progressionValue:this.getLevel().toString(),creatureName:V.data.name},{pointType:"stars",pointCount:this.getStars()}),!1;if(G.Aq$.isDefined(this.data.stars)?this.data.stars+=F:this.data.stars=F,U||(this.starsEarned+=F),this.data.level=st.levelFromStars(this.data.stars,this.creatureType,this.currentMaxLevel),this.data.nextLevelProgressPercent=st.getLevelPercent(this.getStars(),this.creatureType,this.currentMaxLevel),$!==this.data.level){const k=this.data.level-$;if(k>0){const k=z.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let B;this.data===k.data&&this.data.ID===k.data.ID?B={progressionType:"Player Level",creatureName:"Player"}:G.Aq$.isDefined(V)&&(B={progressionType:"Pet Level",creatureName:V.data.name}),H.playerProgression.sendPlayerProgressionAdvancedEvent(Object.assign(Object.assign({},B),{progressionNewValue:this.getLevel().toString(),progressionPreviousValue:$.toString()}),{pointType:"stars",pointCount:this.getStars()})}this.justLeveled=!0,j=!0,this.game.broadcaster.broadcast(X.ig.LevelUp,this,[k]),this.game.broadcaster.broadcast(X.ig.AnyLevelUp,null,[k]),this.game.broadcaster.broadcast(X.ig.AnyLevelUp,X.HG.WeekendEventsLevelUp,[k])}return j}getStarsToLevel(){const k=this.getStars(),B=this.getLevel()>=this.currentMaxLevel?this.getLevel():this.getLevel()+1,U=st.starsToLevel(B,this.creatureType);return Math.max(0,U-k)}getStarsToMaxLevel(){const k=this.getStars(),B=st.starsToLevel(this.currentMaxLevel,this.creatureType);return Math.max(0,B-k)}getPercentToLevel(){if(this.getLevel()>=100)return 1;const k=st.levelFromStars(this.getStars(),this.creatureType,this.currentMaxLevel),B=st.starsToLevel(k,this.creatureType),U=st.starsToLevel(k+1,this.creatureType);return(this.getStars()-B)/(U-B)}getStars(){var k;return G.Aq$.isDefined(this.data.stars)||(this.data.stars=0),J.z.validateInt(null===(k=this.data)||void 0===k?void 0:k.stars,0)}getStarRewardByDamage(k){const B=this.getMaxHearts(this.getLevel()),U=this.getCurrentHearts();let F=0,G=k;return G>=U?(G=U,F=Math.floor(this.starsRewardBase*(G/B)),Fit.t.getItem("spell",k.ID).metadata.assets))}getAvailableSpells(k=this.getLevel()){const B=this.getBattleAssetSpecifier(),U=it.t.getItem(B.type,B.id).data.spells.filter((B=>B.level<=k)),F=j.groupBy(U,(k=>k.slot));return Object.values(F).reduce(((k,B)=>(k[B[0].slot-1]=j.maxBy(B,(k=>k.level)).id,k)),[])}getBattleAssetSpecifier(){return{type:"pet",id:this.getID()}}}st.MAX_HEARTS=5e4,st.HP_BONUS={"A+":4,A:3,"A-":2,"B+":1,B:0,"B-":-1,"C+":-2,C:-3,"C-":-4}},48208:(k,B,U)=>{"use strict";U.d(B,{V:()=>W});var F=U(62459),G=U(35120),j=U(19586),$=U(34829),H=U(90661),V=U(77938);class W{constructor(){this.data=W.getDefaultData(),this.previousData=null,this.currentDay=0,this.rewards=null,this.onDataUpdated=new F.HN0}static isNewWeek(k,B,U=1){let F=(7-B.getDay()+U)%7;0===F&&(F=7);const G=B.getTime()+864e5*F,j=new Date(G);return j.setHours(0),j.setSeconds(0),j.setMilliseconds(0),k.getTime()>=j.getTime()}static isNewDay(k,B){const U=new Date(k.getFullYear(),k.getMonth(),k.getDate()),F=new Date(B.getFullYear(),B.getMonth(),B.getDate());return U.getTime()>F.getTime()}static hasDayPassed(k,B,U=1){let F=k-U;F<0&&(F+=7);let G=B-U;return G<0&&(G+=7),Gk.original.ID===G.ID&&k.original.type===G.type&&k.replacements.length>0));if(k>=0){const B=F[k].replacements;for(let k=0;k=this.getNumRequired(this.currentDay)&&(this.setDayComplete(this.currentDay,!0),this.giveReward(this.currentDay,B,U,F))}clearPreviousData(){this.previousData=null}hasPreviousData(){return F.Aq$.isDefined(this.previousData)}giveReward(k,B,U,F=null){const G=this.getRewards(k,F);for(let j=0;j{"use strict";U.d(B,{F:()=>K});var F=U(8674),G=U(62459),j=U(79687),$=U(51151),H=U(63011),V=U(66582),W=U(37251),q=U(13956);let K=class{get data(){return this._data}get isMember(){var k,B;return!(null===(B=null===(k=this._data)||void 0===k?void 0:k.active)||void 0===B||!B)}get memberTier(){return this.hasFeatureAccess(H.D.BATTLE_PASS_PREMIUM)?this.hasFeatureAccess(H.D.ULTIMATE_MEMBERBOX)?this.hasFeatureAccess(H.D.ULTIMATE_BONUS_COINS)||this.hasFeatureAccess(H.D.ULTRA_BONUS_COINS)?V._$.MemberUltra:V._$.MemberPlus:V._$.MemberCore:V._$.NonMember}get memberStartDate(){return this._memberStartDate}get memberEndDate(){return this._memberEndDate}hasFeatureAccess(k){var B,U,F;return null!==(F=null===(U=null===(B=this._data)||void 0===B?void 0:B.features)||void 0===U?void 0:U.includes(k))&&void 0!==F&&F}updateFeatureAccess(){return(0,F.sH)(this,void 0,void 0,(function*(){try{const k=yield this._catalyst.featureAccess.update();return this._data=this.convertFeatureAccessResponseToMembership(k),this.updateMembershipDates(),this._data}catch(k){throw k}}))}refreshMembership(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._data)return null;const k=yield this._catalyst.featureAccess.update(),B=this.convertFeatureAccessResponseToMembership(k);return B&&(this._data=B,this.updateMembershipDates()),this._data}))}convertFeatureAccessResponseToMembership(k){return $.Membership.create(k.data)}updateMembershipDates(){var k;(null===(k=this._data)||void 0===k?void 0:k.active)&&(G.Aq$.isDefined(this._data.membershipStartTs)?this._memberStartDate=new Date(this._data.membershipStartTs).toISOString():this._memberStartDate=(new Date).toISOString(),G.Aq$.isDefined(this._data.membershipEndTs)?this._memberEndDate=new Date(this._data.membershipEndTs).toISOString():this._memberEndDate=null)}debugSetMembership(k=!0,B=(new Date).toISOString(),U){}};(0,F.Cg)([(0,q.b)("00d-b27e"),(0,F.Sn)("design:type",W.X)],K.prototype,"_catalyst",void 0),K=(0,F.Cg)([(0,j.injectable)()],K)},13729:(k,B,U)=>{"use strict";U.d(B,{W:()=>F,f:()=>G});const F=["hat","weapon","outfit","boots","follow","spellRelic","mount","costume"],G=["hair","eyeColor","skinColor","hairColor","face"]},73722:(k,B,U)=>{"use strict";U.d(B,{V:()=>G});var F=U(62459);class G{static get instance(){var k;return null!==(k=this._instance)&&void 0!==k?k:this._instance=new G}get selectedLocation(){return this._selectedLocation}set selectedLocation(k){this._initComplete?F.VyI.log("Selected location is already set through identity.",F.$bb.Warning):this._selectedLocation=k}constructor(){if(this._initComplete=!1,!G._instance){G._instance=this;const k=window.SW.Load.userInfo?JSON.parse(window.SW.Load.userInfo()):null;(null==k?void 0:k.premises)&&(this._selectedLocation=k.premises,this._initComplete=!0)}}isInitComplete(){return this._initComplete}}},37465:(k,B,U)=>{"use strict";U.d(B,{o:()=>dt,u:()=>ct});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(44329),V=U(24521);const W=(0,U(77601).gb)({key:"fab-no-pet-inventory-limit",default:!1});var q=U(90633),K=U(65240),z=U(76277),Y=U(35120),Q=U(72772),X=U(25834),Z=U(73797),J=U(13956),tt=U(22023),et=U(44094),it=U(69698),st=U(6413),nt=U(34829),at=U(23029),rt=U(77938),ot=U(55734),ht=U(63834);function ct(k,B){const U=[],F=new Set;G.Aq$.isDefined(k.data.team)&&0===k.data.team?k.data.team>=st.h.MAX_TEAM_SIZE&&(k.team=k.data.team=st.h.MAX_TEAM_SIZE-1):(k.team=k.data.team=0,k.kennel.updated=!0);for(const j of B)G.Aq$.isDefined(j.team)&&(U[j.team]||j.team===k.data.team||j.team>=st.h.MAX_TEAM_SIZE?(delete j.team,F.add(j)):U[j.team]=j),G.Aq$.isDefined(j.temporaryTeamPosition)&&(delete j.temporaryTeamPosition,F.add(j)),G.Aq$.isDefined(j.uniqueID)||(j.uniqueID=(0,H.Ak)(),F.add(j));return F.size>0&&(k.kennel.updated=!0),U}class dt{get data(){return this._petData}get petTeam(){return this._petTeam}constructor(k,B){this._petData=[],this._petTeam=new Array(st.h.MAX_TEAM_SIZE).fill(null),this.onPetRemoved=new G.HN0,this.updated=!1,this.player=k,this._encounterInfo=B}getDataAndClear(){return this._bridge.saveUpdatedPets(...this._petData),this.updated=!1,this._petData}populateKennel(k){this._petData=k,this._petTeam.fill(null);ct(this.player,this._petData).forEach((k=>{this._petTeam[k.team]=this.createNewPet(k)})),this._petTeam[this.player.data.team]=this.player}refreshPetTeamData(){this.refreshPetInTeamPosition(1),this.refreshPetInTeamPosition(2)}refreshPetInTeamPosition(k){const B=this.petTeam[k];null!==B&&this.setTeamPosition(B.data,k)}getPets(k=!1){return k?this._petData.filter((k=>!G.Aq$.isDefined(k.team))):this._petData}getPrimaryPets(k=!1){let B=this.getPets(k);return tt.P8.showUniquePetsFeature()&&k&&(B=B.filter((k=>!this.getPetTeamIDs().includes(k.ID)))),tt.P8.filterPrimaryPets(B)}getPrimaryPetById(k){return tt.P8.getPrimaryPet(k,this.getPets())}getPetByID(k){var B;return null!==(B=this._petData.find((B=>B.ID===k)))&&void 0!==B?B:null}getAllPetsByID(k){return this._petData.filter((B=>B.ID===k))}getPetByUniqueID(k){var B;return null!==(B=this._petData.find((B=>B.uniqueID===k)))&&void 0!==B?B:null}petCanEquipGearType(k,B){var U;const F=rt.t.getItem("pet",k);return null===(U=null==F?void 0:F.data.gearEquipSlots)||void 0===U?void 0:U.includes(B)}equipGearForPet(k,B){var U;const F=this.getPetByUniqueID(k),j=Q.I.getPetWithEquippedGearByUniqueId(B.uuid),{type:$,id:H}=B.data.asset;if(!F)return this.sendItemEquipFailedEvent(F,B,"Pet does not exist"),void G.VyI.log(`Cannot equip ${B.itemID}, pet with ID ${k} does not exist!`,G.$bb.Warning);if(!this.petCanEquipGearType(F.ID,$))return this.sendItemEquipFailedEvent(F,B,"Pet does not support this gear type"),void G.VyI.log(`Cannot equip ${B.itemID}, pet ${null==F?void 0:F.ID} does not have the gear slot ${$}`,G.$bb.Warning);let V=null;j&&(null!=V||(V=et.$.generateUID()),this.unequipGearForPet(j.uniqueID,$,V)),null!==(U=F.gear)&&void 0!==U||(F.gear={}),G.Aq$.isDefined(F.gear[$])&&(null!=V||(V=et.$.generateUID()),this.unequipGearForPet(F.uniqueID,$,V)),F.gear[$]=B.uuid,Y.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(q.B.FEATURE_PET_GEAR,q.B.BREADCRUMB_EQUIP_PET_GEAR_FTUE)||(Y.q.instance.game.broadcaster.broadcast(Z.bI.FtueCompleted),Y.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(q.B.FEATURE_PET_GEAR,q.B.BREADCRUMB_EQUIP_PET_GEAR_FTUE),Q.I.updateCachedPetGearTutorialFlag().catch((k=>G.RQr.logError(k,"Error updating cached pet gear tutorial flag")))),this.sendItemEquipEvent(F,B,V),this.updated=!0}unequipGearForPet(k,B,U){var F;const j=this.getPetByUniqueID(k);j?(null!==(F=j.gear)&&void 0!==F||(j.gear={}),G.Aq$.isDefined(j.gear[B])&&this.sendItemUnequipEvent(j,B,U),j.gear[B]=null,this.updated=!0):G.VyI.log(`Cannot unequip pet with ID ${k}, it does not exist!`,G.$bb.Warning)}sendItemEquipEvent(k,B,U){const{type:F,id:G}=B.data.asset,j=rt.t.getItem(F,G);Y.q.instance.prodigy.game.broadcaster.broadcast(Z.ig.GearUpdate,null,[k]),this._segment.item.sendItemEquippedEvent({pet_id:k.ID,item_name:j.data.name,item_type:F,item_id:G},U)}sendItemEquipFailedEvent(k,B,U){const{type:F,id:G}=B.data.asset,j=rt.t.getItem(F,G);this._segment.item.sendItemEquipFailedEvent({fail_reason:U,pet_id:k.ID,item_name:j.data.name,item_type:F,item_id:G})}sendItemUnequipEvent(k,B,U){Y.q.instance.prodigy.gameContainer.get("d69-defe").getPetGearByUniqueId(k.gear[B]).then((B=>{const{type:F,id:G}=B.data.asset,j=rt.t.getItem(F,G);Y.q.instance.prodigy.game.broadcaster.broadcast(Z.ig.GearUpdate,null,[k]),this._segment.item.sendItemUnequippedEvent({pet_id:k.ID,item_name:j.data.name,item_type:F,item_id:G},U)})).catch(G.RQr.createHandler(`Error sending item_unequipped event, gear with uuid ${k.gear[B]} not found`))}createNewPet(k){return new ht.r(this.player.game,k)}setTeamPosition(k,B,U=!0){const F=this.getTeamPosition(B);if(!this.isCreatureCurrentPlayer(F)){if(F)F.removeTeam(),F.setData(k),F.team=B;else{const U=this.createNewPet(k);U.team=B,this._petTeam[B]=U}U&&(this.updated=!0)}}getTeamPosition(k){return this._petTeam[k]}removeAtTeamPosition(k,B=!0){const U=this.getTeamPosition(k);this.isCreatureCurrentPlayer(U)||U&&(U.removeTeam(),this._petTeam[k]=null,B&&(this.updated=!0))}swapTeamPositions(k,B){if(!this.canSwapPositions(k,B))return;const U=this.getTeamPosition(k),F=this.getTeamPosition(B);U&&(U.team=B),F&&(F.team=k),this._petTeam[k]=F,this._petTeam[B]=U,this.updated=!0}setTemporaryTeamPosition(k,B){const U=this.getPetByID(k);G.Aq$.isDefined(U)&&(U.temporaryTeamPosition=B,this.updated=!0)}addPet(k,B,U,F,G){const j={ID:k,hp:null!=B?B:nt.s.MAX_SAFE_INTEGER,stars:null!=U?U:0,level:null!=F?F:1,nickname:G,levelCaught:F,catchDate:this._timeManager.getServerTimeMs(),uniqueID:(0,H.Ak)()};this.addPetFromData(j)&&this._bridge.add(j)}addPetFromData(k){if(!G.Aq$.isDefined(k.ID))return G.VyI.log("Malformed pet data.",G.$bb.Error),!1;if(!k.uniqueID||this._petData.find((B=>B.uniqueID===k.uniqueID)))return G.VyI.log("Invalid uniqueID",G.$bb.Error,k.uniqueID),!1;const B=new ot.R(this.player.game,k);this._petData.push(k),this.updated=!0;const U=this.findEmptyTeamIndex();if(-1!==U){const B=this.getAllPetsByID(k.ID);tt.P8.showUniquePetsFeature()&&B.length>1?this.replaceDuplicateOnTeam(k.ID):this.setTeamPosition(k,U)}if(this._encounterInfo.addToPetTimesRescued(k.ID),1===this._encounterInfo.getPetTimesRescued(k.ID)&&this.player.newPetRescueData.addNewRescue(k.ID,Y.q.instance.prodigy.world.getCurrentZone()),tt.P8.canPetEvolve(B,B.getLevel())){Y.q.instance.prodigy.gameContainer.get("5c7-e02d").refreshAffordableEvolutionsCache()}return!0}removePet(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this._segment.item.beginSecureItemTransaction();this.removePetData(k),k.uniqueID&&(yield this._bridge.remove(k.uniqueID)),B.flush({sink_type:K.C.PetRoster,sink_id:k.ID,transaction_id:et.$.generateUID()})}))}removePetData(k){G.Aq$.isDefined(k.team)&&this.removeAtTeamPosition(k.team),$().remove(this._petData,k),this.updated=!0,this.player.forceSaveCharacter();Y.q.instance.prodigy.gameContainer.get("5c7-e02d").refreshAffordableEvolutionsCache(),this.onPetRemoved.dispatch(k)}findEmptyTeamIndex(){return this.petTeam.findIndex((k=>!k))}findFirstFilledIndex(){return this.petTeam.findIndex((k=>k))}hasPet(k){const B=this.getPets(!1).find((B=>B.ID===k));return G.Aq$.isDefined(B)}amountOfPet(k){return this.getPets(!1).filter((B=>B.ID===k)).length}getNumPets(k=!1){return this.getPets(k).length}getNumUniquePets(){return new Set(this.getPets().map((k=>k.ID))).size}getTotalUniquePets(){return rt.t.getItemCount("pet")-this.getOwnershipRestrictedPetCount()}getMaxKennelSize(){let k;if((0,z.G)(W))k=nt.s.MAX_SAFE_INTEGER;else{const B=this.getOwnershipRestrictedPetCount();k=(rt.t.getItemCount("pet")-B)*st.h.MAX_KENNEL_SIZE_MULTIPLIER}const B=Y.q.instance.prodigy.gameContainer.get("8b9-bad1").petInventoryData.permanentSlots;return Math.max(B,k)}getOwnershipRestrictedPetCount(){var k;const B=at.R.loadData(V.r.PetOwnershipRestrictions_json);return null!==(k=null==B?void 0:B.noOwnership.length)&&void 0!==k?k:0}isFull(){return this.getNumPets(!1)>=this.getMaxKennelSize()}canSwapPositions(k,B,U=0){const F=this.getTeamPosition(k),G=this.getTeamPosition(B);return!(k===U&&null===G||B===U&&null===F)}isCreatureCurrentPlayer(k){return k===this.player}getPetTeamIDs(){return this.getPetTeam(!1).map((k=>k.getID()))}getPetTeam(k){return k?this.petTeam.filter((k=>!this.isCreatureCurrentPlayer(k))):this.petTeam.filter((k=>k&&!this.isCreatureCurrentPlayer(k)))}isPetOnTeam(k){var B,U;return null!==(U=null===(B=this.petTeam)||void 0===B?void 0:B.some((B=>(null==B?void 0:B.getID())===k)))&&void 0!==U&&U}setPlayerToFrontPosition(){this.petTeam.findIndex((k=>k===this.player))>0&&(this.petTeam.splice(this.petTeam.indexOf(this.player),1),this.petTeam.unshift(this.player))}setPetToTopPosition(){1===this.findEmptyTeamIndex()&&this.petTeam[2]&&this.swapTeamPositions(2,1)}isPrimaryPet(k){if(!k.ID)return G.VyI.log("Cannot check if pet is primary, pet ID is not defined",G.$bb.Warning),!1;const B=this.getPrimaryPetById(k.ID);return(null==B?void 0:B.uniqueID)===k.uniqueID}replaceDuplicateOnTeam(k){const B=this.getPetTeam(!1).find((B=>B.getID()===k)),U=this.getPrimaryPetById(k);if(U&&B&&U.uniqueID!==B.data.uniqueID){this.unequipGearForPet(B.data.uniqueID,"petHat"),this.unequipGearForPet(B.data.uniqueID,"petRelic");const k=B.team;this.removeAtTeamPosition(B.team),this.setTeamPosition(U,k)}}destroy(){this.onPetRemoved.dispose()}}(0,F.Cg)([(0,J.b)("a03-308f"),(0,F.Sn)("design:type",it.V)],dt.prototype,"_timeManager",void 0),(0,F.Cg)([(0,J.b)("c47-20b6"),(0,F.Sn)("design:type",Function)],dt.prototype,"_segment",void 0),(0,F.Cg)([(0,J.b)(X.T),(0,F.Sn)("design:type",X.T)],dt.prototype,"_bridge",void 0)},86051:(k,B,U)=>{"use strict";var F;U.d(B,{K:()=>G}),function(k){k[k.BAM=3]="BAM",k[k.BOOST_SELECT=4]="BOOST_SELECT",k[k.COLISEUM=8]="COLISEUM",k[k.SERVER=11]="SERVER",k[k.SERVER_SELECT=12]="SERVER_SELECT",k[k.WORLD_MAP=14]="WORLD_MAP",k[k.NICKNAMER=18]="NICKNAMER",k[k.STYLIST=21]="STYLIST",k[k.BESTIARY=23]="BESTIARY"}(F||(F={}));class G{}G.BAM={INTRO:{menu:F.BAM,ID:0}},G.BOOST_SELECT={INTRO:{menu:F.BOOST_SELECT,ID:0}},G.COLISEUM={INTRO:{menu:F.COLISEUM,ID:0}},G.SERVER={INTRO:{menu:F.SERVER,ID:0}},G.SERVER_SELECT={INTRO:{menu:F.SERVER_SELECT,ID:0}},G.WORLD_MAP={INTRO:{menu:F.WORLD_MAP,ID:0}},G.NICKNAMER={INTRO:{menu:F.NICKNAMER,ID:0}},G.STYLIST={INTRO:{menu:F.STYLIST,ID:0}},G.BESTIARY={INTRO:{menu:F.BESTIARY,ID:0}}},55734:(k,B,U)=>{"use strict";U.d(B,{R:()=>J});var F=U(8674),G=U(62459),j=U(93893),$=U(58182),H=U(35120),V=U(50503),W=U(55122),q=U(73797),K=U(76277),z=U(67462),Y=U(30226),Q=U(77938),X=U(47315),Z=U(39984);class J extends Z.e{constructor(k,B,U=null){super(k),this.nickname=null,this.setData(B),this.currentMaxLevel=null!=U?U:W.s.maxLevelConfig.regular}setData(k){if(super.setData(k),!G.Aq$.isDefined(this.data))return;this.data.ID=k.ID,G.Aq$.isDefined(this.data.ID)||"number"!=typeof k.gameID||(this.data.ID=k.gameID),this.nickname=this.data.nickname,delete this.data.R;const B=Q.t.getItem("pet",this.data.ID);this.source=B.data,G.Aq$.isDefined(B.metadata.assets.default)&&(this.source.assetType=B.metadata.assets.default.type,this.source.defaultScale=B.metadata.assets.default.defaultScale),this.type=this.source.life}getAttacks(k=null){const B=[],U=this.getBamSpells();for(let F=0;Fk.level)),F[0]+=U[k]):F=G.singleShot.map((k=>k.level));for(let j=1;j0)throw new Error("Cannot evolve a pet that has evolved before");this.data.evolutionCount=B+1,W.kennel.addPet(k)}else this.data.ID=k,this.source=Q.t.getItem("pet",this.data.ID).data,this.type=this.source.life;W.encounters.addToPetTimesRescued(k),this.game.broadcaster.broadcast(q.ig.Evolved,null,[this]),W.kennel.updated=!0,W.kennel.refreshPetTeamData()}))}getID(){return this.data.ID}getName(){return G.Aq$.isDefined(this.nickname)?this.nickname:this.source.name}getFirstName(){return this.source.name}getElement(){return this.source.element}generate(k,B){const U=Math.max(1,k-B);this.data.stars=Z.e.starsToLevel(U,this.creatureType),this.data.level=U}getLevelingCurve(k){const B=[],U=[],F=Q.t.getItem("pet",this.getID()).data.curve;for(let j=0;j{"use strict";U.d(B,{s:()=>W});var F=U(62459),G=U(35120),j=U(62901),$=U(87337),H=U(12676),V=U(39984);class W extends V.e{init(k){return!!super.init(k)&&(this.name=G.q.instance.prodigy.gameContainer.resolve(j.r),this.name.init(k.npc_name),this.npcType=k.npc_type,this.sendNpcDiscoveredEvent(k),!0)}sendNpcDiscoveredEvent(k){var B;const U=G.q.instance.prodigy.gameContainer,j=U.get(F.$Bt.LocalizationService);if(!k)return;const V=k.npc_type===$.ac.Merchant?H.N.Merchant:H.N.Noot,W=null!==(B=k.npc_id)&&void 0!==B?B:V;U.get("c47-20b6").gameWorld.sendNpcDiscoveredEvent({npc_name:k.npc_name?j.getText(k.npc_name):V,npc_type:k.npc_type,npc_id:W,x_coord:k.x_coord,y_coord:k.y_coord,npc_animation_id:k.npc_animation_id})}getBamSpells(k){return[]}getStatPower(){return 5}getStatHealth(){return 5}getNpcType(){var k;return null!==(k=this.npcType)&&void 0!==k?k:$.ac.Merchant}}},129:(k,B,U)=>{"use strict";U.d(B,{a:()=>St});var F=U(87490),G=U(62459),j=U(95359),$=U(113),H=U(10471),V=U(97495),W=U(5491),q=U(73678),K=U(35120),z=U(55122),Y=U(23748),Q=U(22023),X=U(30226),Z=U(87820),J=U(34829),tt=U(77938),et=U(21492),it=U(5898),st=U(51894),nt=U(56997),at=U(37639),rt=U(27293),ot=U(39984);class ht{constructor(k){this._data={},this.updated=!1,this._timeManager=k}getDataAndClear(){return this.updated=!1,this._data}setData(k){var B,U,F;this._data.ads=null!==(B=null==k?void 0:k.ads)&&void 0!==B?B:[],this._data.pets=null!==(U=null==k?void 0:k.pets)&&void 0!==U?U:[],this._data.offers=null!==(F=null==k?void 0:k.offers)&&void 0!==F?F:[]}hasResolvedOffer(k){return this._data.offers.includes(k)}getResolvedOffers(){var k;return null!==(k=this._data.offers)&&void 0!==k?k:[]}setOfferResolved(k,B=!0){const U=this._data.offers.indexOf(k);B&&-1===U?(this._data.offers.push(k),this.updated=!0):B||-1===U||(this._data.offers.splice(U,1),this.updated=!0)}debugClearResolvedOffers(){0}hasSeenAd(k){return this._data.ads.includes(k)}getSeenAds(){return this._data.ads}setSeenAds(k){this._data.ads=[...k],this.updated=!0}hasPetBeenEncountered(k){return this.isPetOwned(k)||G.Aq$.isDefined(this.getPetEncounterByID(k))}getPetEncounterByID(k){return this._data.pets.find((B=>B.ID===k))}createNewPetEncounter(k){this.updated=!0,this._data.pets.push({ID:k,firstSeenDate:this._timeManager.getServerTimeMs(),timesBattled:0,timesRescued:0,rescueAttempts:0})}onPetEncountered(k){!this.getPetEncounterByID(k)&&Q.P8.hasValidOrdinal(tt.t.getItem("pet",k))&&(this.createNewPetEncounter(k),this.updated=!0)}addToPetTimesBattled(k,B=1){if(B<1)return void G.VyI.log("quantityToAdd in addToPetTimesBattled can not be less than 1",G.$bb.Warning);if(!Q.P8.hasValidOrdinal(tt.t.getItem("pet",k)))return;this.updated=!0,this.onPetEncountered(k);this.getPetEncounterByID(k).timesBattled+=B}addToPetTimesRescued(k,B=1){if(B<1)return void G.VyI.log("quantityToAdd in addToPetTimesRescued can not be less than 1",G.$bb.Warning);if(!Q.P8.hasValidOrdinal(tt.t.getItem("pet",k)))return;this.updated=!0,this.onPetEncountered(k);this.getPetEncounterByID(k).timesRescued+=B,this.setPetFirstRescuedDate(k)}addToPetRescueAttempts(k,B=1){if(B<1)return void G.VyI.log("quantityToAdd in addToPetTimesRescuable can not be less than 1",G.$bb.Warning);if(!Q.P8.hasValidOrdinal(tt.t.getItem("pet",k)))return;this.updated=!0,this.onPetEncountered(k);const U=this.getPetEncounterByID(k);U.rescueAttempts||(U.rescueAttempts=0),U.rescueAttempts+=B}setPetFirstRescuedDate(k,B){if(!Q.P8.hasValidOrdinal(tt.t.getItem("pet",k)))return;this.onPetEncountered(k);const U=this.getPetEncounterByID(k);G.Aq$.isDefined(U.firstRescuedDate)||(U.firstRescuedDate=null!=B?B:this._timeManager.getServerTimeMs())}getPetTimesBattled(k){const B=this.getPetEncounterByID(k);return B?B.timesBattled:0}getPetTimesRescued(k){const B=this.getPetEncounterByID(k);return G.Aq$.isDefined(B)&&B.timesRescued>0?B.timesRescued:this.isPetOwned(k)?1:0}getPetFirstRescuedDate(k){var B;return null===(B=this.getPetEncounterByID(k))||void 0===B?void 0:B.firstRescuedDate}isPetOwned(k){return K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.amountOfPet(k)>0}getPetRescueAttempts(k){const B=this.getPetEncounterByID(k);return(null==B?void 0:B.rescueAttempts)?B.rescueAttempts:0}getAllTotalPetsRescued(){return this._data.pets.filter((k=>k.timesRescued>0)).length}}var ct=U(95891),dt=U(96282);class lt{constructor(){this.data={bg:{active:1,own:[1]},items:{},currentHouseTag:"suburbs"},this.updated=!1}getDataAndClear(){return this.updated=!1,this.data}getItems(){return this.data.items}hasItems(k){return ct.sumBy(k,(k=>"dorm"===k.type&&this.data.items[k.ID]?1:0))}setItems(k){G.Aq$.isDefined(k)&&(G.Aq$.isDefined(k.items)||(k.items=this.data.items),G.Aq$.isDefined(k.bg)||(k.bg=this.data.bg),G.Aq$.isDefined(k.currentHouseTag)||(k.currentHouseTag=this.data.currentHouseTag),this.data=k,G.Aq$.isDefined(this.data.active)||(this.add(17),this.add(3),this.add(18),this.add(18),this.add(14),this.add(1),this.add(13),this.data.active=[],this.setActive(17,480,160,1,0,0,0,0),this.setActive(3,400,160,1,0,0,0,0),this.setActive(18,440,100,1,0,0,0,0),this.setActive(18,840,100,1,0,0,0,0),this.setActive(14,880,240,1,0,0,0,0),this.setActive(1,880,140,1,0,0,0,0),this.setActive(13,640,80,1,0,0,0,0)))}add(k){let B=this.data.items[k];G.Aq$.isDefined(B)||(B=this.data.items[k]={N:0,A:[]}),B.N<9&&B.N++,this.updated=!0}getSortedActive(){const k=[];if(!G.Aq$.isDefined(this.data.active))return k;for(const B in this.data.items)for(let U=0;Uk.z-B.z)),k}snapDormItems(){var k,B;const U=dt.G.HOUSE_ITEM_GRID_SNAP_INTERVAL;null===(B=null===(k=this.data)||void 0===k?void 0:k.active)||void 0===B||B.forEach((k=>{k.x%U!=0&&(k.x=G.cj9.snapToCeil(k.x,U),this.updated=!0),k.y%U!=0&&(k.y=G.cj9.snapToFloor(k.y,U),this.updated=!0)}))}setAllInactive(){this.data.active=[],this.updated=!0}setActive(k,B,U,F,j,$,H,V){const W=this.data.items[k];if(G.Aq$.isDefined(W)&&W.N>this.getActive(k)){const G={ID:k,x:B,y:U,dx:j,dy:$,z:F,anchorY:H,r:V,stack:[]};return this.data.active.push(G),this.updated=!0,G}return null}updateActive(k,B,U,F,G,j,$,H,V){for(let W=0;W=9}getActive(k){let B=0;if(G.Aq$.isDefined(this.data.active))for(let U=0;U=0&&G.Aq$.isDefined(F[H])&&F[H]>0&&$++}return $}getDungeonState(k,B){let U=this._dungeonStates[B];if(!U){U=K.q.instance.prodigy.gameContainer.resolve(k),this._dungeonStates[B]=U;let F=this.getDungeonSchema(B);F?U.setData(F):(F=U.getInitializationData(),this.data.dungeons[B]=F,U.setData(F,!0))}return U}getDungeonSchema(k){return this.data.dungeons||(this.data.dungeons={},this._updated=!0),this.data.dungeons[k]}}class Tt{constructor(){this.data={zones:{},menus:{}},this.updated=!1}getDataAndClear(){return this.updated=!1,this.data}setData(k){G.Aq$.isDefined(k.zones)||(k.zones={}),G.Aq$.isDefined(k.menus)||(k.menus={}),this.data=k}getMenuValue(k){return this.getValue("menus",k.menu,k.ID)}setMenuValue(k,B){this.setValue("menus",k.menu,k.ID,B)}setValue(k,B,U=0,F=1){G.Aq$.isDefined(this.data[k][B])||(this.data[k][B]=[]),this.data[k][B][U]!==F&&(this.data[k][B][U]=F,this.updated=!0)}getValue(k,B,U=0){if(!G.Aq$.isDefined(this.data[k][B]))return 0;const F=this.data[k][B];return G.Aq$.isDefined(F[U])?F[U]:0}}class St extends at.K{get isFocusModeEnabled(){return this._isFocusModeEnabled}static fromCharacter(k,B){var U,F,G,j,$;const H=null===(U=B.appearance)||void 0===U?void 0:U.name,V=new St(k);V.appearance.init({name:{first:null!==(F=null==H?void 0:H.getFirstName())&&void 0!==F?F:1,middle:null!==(G=null==H?void 0:H.getMiddleName())&&void 0!==G?G:1,last:null!==(j=null==H?void 0:H.getLastName())&&void 0!==j?j:1,nick:null!==($=null==H?void 0:H.getNickname())&&void 0!==$?$:null},hair:B.appearance.getHair(),skinColor:B.appearance.getSkinColor(),eyeColor:B.appearance.getEyeColor(),face:B.appearance.getFace()}),V.equipment.setHat(B.equipment.getHat()),V.equipment.setWeapon(B.equipment.getWeapon()),V.equipment.setOutfit(B.equipment.getOutfit()),V.equipment.setBoots(B.equipment.getBoots());const W=B.equipment.getCostume();return W&&V.equipment.setCostume(W),V.backpack=new st.H,V.data=Object.assign({},B.data),V}constructor(k){super(k),this.tutorial=null,this.kennel=null,this.encounters=null,this.quests=null,this.house=null,this.backpack=null,this.achievements=null,this.state=null,this.et=!1,this.userID=0,this.appearanceChanged=!1,this.chatID=null,this.emoteID=null,this.danceID=null,this.grade=null,this.world=null,this.coOpTeam=null,this.earlyBirdLastChance=!1,this.transformID=null,this.currentVideoSkillId=null,this._isFocusModeEnabled=!1,this.appearance=new mt(K.q.instance.prodigy.gameContainer.get("1f0-d3d9")),this.equipment=new _t,this.backpack=new st.H,this.achievements=new it.l,this.encounters=new ht(K.q.instance.prodigy.gameContainer.get("a03-308f")),this.kennel=new ut.o(this,this.encounters),this.quests=new Et,this.state=new wt,this.house=new lt,this.house.setItems(this.house.data),this.tutorial=new Tt}createRandom(){this.equipment.setHat(tt.t.getRandomItem("hat").ID),this.equipment.setWeapon(tt.t.getRandomItem("weapon").ID),this.equipment.setOutfit(tt.t.getRandomItem("outfit").ID)}getRevampHealth(){const k=this.getLevel()+this.getChargedLevel(),B=tt.t.getItem("boss",32);return Q.P8.getBattleStats(B,k,null)[F.EStat.Hp]+this.getGearBattleStats().total[F.EStat.Hp]}canCatch(){return!1}getID(){return this.userID}init(k){var B;return!!super.init(k)&&(G.Aq$.isDefined(k.userID)?this.userID=k.userID:G.Aq$.isDefined(k.id)&&(this.userID=parseInt(k.id)),G.Aq$.isDefined(k.data)&&(this.data=X.J.getObject(k.data),this.currentMaxLevel=z.s.getPlayerLevelCap(this)),G.Aq$.isDefined(k.pets)&&this.kennel.populateKennel(X.J.getObject(k.pets)),G.Aq$.isDefined(k.tutorial)&&this.tutorial.setData(X.J.getObject(k.tutorial)),G.Aq$.isDefined(k.state)&&this.state.setData(X.J.getObject(k.state)),this.house.setItems(G.Aq$.isDefined(k.house)?X.J.getObject(k.house):this.house.data),G.Aq$.isDefined(k.inventory)&&this.backpack.setItems(X.J.getObject(k.inventory)),G.Aq$.isDefined(k.quests)&&this.quests.setQuests(X.J.getObject(k.quests)),G.Aq$.isDefined(k.achievements)&&this.achievements.init(X.J.getObject(k.achievements)),G.Aq$.isDefined(k.isMember)&&(this.et=1===k.isMember),(null===(B=k.appearance)||void 0===B?void 0:B.morph)&&(this.getPlayerData().playerTransformation={transformType:k.appearance.morph.type,transformID:k.appearance.morph.ID}),this.encounters.setData(k.encounters),k.isTowerTownEnabled&&(this._isFocusModeEnabled=!0),this.name=K.q.instance.prodigy.gameContainer.resolve(et.C),this.name.init(this.appearance.getName()),!0)}initFromProtobuf(k){let B=null,U=null;k.appearance&&(B={hair:{style:k.appearance.hair.styleID,color:k.appearance.hair.colorID},eyeColor:k.appearance.eyeColorID,skinColor:k.appearance.skinColorID,face:k.appearance.faceID},k.appearance.morph&&(U={transformType:""!==k.appearance.morph.type?k.appearance.morph.type:null,transformID:k.appearance.morph.ID>0?k.appearance.morph.ID:null}));let F=null;k.equipment&&(F={boots:k.equipment.bootsID>0?k.equipment.bootsID:null,hat:k.equipment.hatID>0?k.equipment.hatID:null,weapon:k.equipment.weaponID>0?k.equipment.weaponID:null,outfit:k.equipment.outfitID>0?k.equipment.outfitID:null});let G=null;k.name&&(G={first:k.name.first>0?k.name.first:null,middle:k.name.middle>0?k.name.middle:null,last:k.name.last>0?k.name.last:null,nick:k.name.nick>0?k.name.nick:null},B?B.name=G:B={name:G}),this.init({appearance:B,equipment:F,data:{level:k.level,team:k.team,playerTransformation:U},isMember:k.member,userID:k.userID})}hasMembership(){return this.et}setMembership(k){G.Aq$.isDefined(k)?this.et=1===k.isMember:this.et=!0}transformPlayer(k,B,U,F){var G,j,$;if(k===W.V.Player)this.getPlayerData().playerTransformation=null;else{const H=J.s.get("GameConstants.MorphMarbles.MORPH_DURATION_OVERRIDE");this.getPlayerData().playerTransformation={transformType:k,transformID:B,maxTime:null!==(G=null!=H?H:U)&&void 0!==G?G:0,timeRemaining:Math.max(null!==($=null!==(j=null!=H?H:F)&&void 0!==j?j:U)&&void 0!==$?$:0,0)}}}isPlayerTransformed(){return!!this.getPlayerData().playerTransformation}getAttacks(k=null){return G.Aq$.isDefined(this.getPlayerData().spellbook)?this.getPlayerData().spellbook.length<6&&(this.getPlayerData().spellbook=this.getAllAttacks().splice(0,6)):this.getPlayerData().spellbook=this.getAllAttacks().splice(0,6),G.Aq$.isDefined(k)?ot.e.getAttacksOfType(this.getPlayerData().spellbook,k):this.getPlayerData().spellbook}getAllAttacks(){const k=ot.e.getAttacksFromCurve(St.LEVEL_CURVE,1,this.getLevel());if(G.Aq$.isDefined(this.getPlayerData().spells))for(let B=0;B-1?this.backpack.hasMaxQuantityOfItem(k,B):"dorm"===k&&this.house.hasMaxQuantityOfItem(B)}hasFoundKeystone(k){let B;switch(k){case q.A_.BONFIRE:B=$.O.Bonfire;break;case q.A_.FOREST:B=$.O.Firefly;break;case q.A_.SHIPWRECK:B=$.O.Shipwreck;break;case q.A_.SHIVERCHILL:B=$.O.Shiverchill;break;case q.A_.SKYWATCH:B=$.O.Skywatch;break;case q.A_.BONFIREHARD:B=`${$.O.Bonfire}_${V.i.Hard}`;break;case q.A_.FORESTHARD:B=`${$.O.Firefly}_${V.i.Hard}`;break;case q.A_.SHIPWRECKHARD:B=`${$.O.Shipwreck}_${V.i.Hard}`;break;case q.A_.SHIVERCHILLHARD:B=`${$.O.Shiverchill}_${V.i.Hard}`;break;case q.A_.SKYWATCHHARD:B=`${$.O.Skywatch}_${V.i.Hard}`;break;case q.A_.FORESTEXPERT:case q.A_.SHIVERCHILLEXPERT:case q.A_.BONFIREEXPERT:case q.A_.SHIPWRECKEXPERT:case q.A_.SKYWATCHEXPERT:return!1}const U=Z.b.ZONE_KEYSTONES[k],F=K.q.instance.prodigy.world.getZone(k).difficultyMode;return this.backpack.hasItem("key",U,F)>0||this.state.get(`keystones-${B}`)>0}hasFoundAllKeystones(){return q.D3.every((k=>this.hasFoundKeystone(k)))}getNumKeystones(){return q.D3.reduce(((k,B)=>k+(this.hasFoundKeystone(B)?1:0)),0)}getBattleAssetSpecifier(){return{type:"boss",id:32}}getGearBattleStats(){var k,B;const U={boots:{},follow:{},hat:{},mount:{},outfit:{},weapon:{},total:{power:0,defence:0,speed:0,hp:0}};for(const F of nt.s){const G=tt.t.getItem(F,this.equipment.getEquipment(F));for(const $ of Object.values(j.IE)){const j=null===(B=null===(k=null==G?void 0:G.data)||void 0===k?void 0:k.stats)||void 0===B?void 0:B[$];j&&(U[F][$]=j,U.total[$]+=j)}}return U}getGrowthBattleStats(k){const B=tt.t.getItem("pet",k.ID),U=Q.P8.isPetOnTeam(k)?k.level+this.getChargedLevel():k.level;return Q.P8.getBattleStats(B,U,k.uniqueID)}}St.LEVEL_CURVE=[{lvl:1,a:31},{lvl:5,a:32},{lvl:12,a:33},{lvl:22,a:34},{lvl:38,a:35},{lvl:52,a:36}]},3032:(k,B,U)=>{"use strict";var F,G;U.d(B,{p:()=>F}),function(k){k.Legacy="legacy",k.Revised="revised",k.RevisedWithPlayerGoals="revised-with-player-goals",k.PlayerGoalsFtue="player-goals-ftue",k.PlayerGoalsPostFtue="player-goals-post-ftue",k.ZoneUnlockedByLevel="zone-unlocked-by-level",k.ZoneUnlockedLinearCampaign="zone-unlocked-linear-campaign"}(F||(F={})),function(k){k.LastWatchedVideoId="lastWatchedVideoId",k.LastWatchedTimestamp="lastWatchedTimestamp",k.LastWatchedSchoolVideoId="lastWatchedSchoolVideoId",k.LastWatchedSchoolTimestamp="lastWatchedSchoolTimestamp"}(G||(G={}))},63834:(k,B,U)=>{"use strict";U.d(B,{r:()=>H});var F=U(37016),G=U(35120),j=U(22023),$=U(55734);class H extends $.R{get currentMaxLevel(){var k,B,U;return this._currentMaxLevel=j.P8.getMaxOwnableLevel(null===(k=this.data)||void 0===k?void 0:k.ID,null!==(U=null===(B=this.data)||void 0===B?void 0:B.mergeRank)&&void 0!==U?U:F.qd.MIN),super.currentMaxLevel}set currentMaxLevel(k){super.currentMaxLevel=k}constructor(k,B){super(k,B)}createDataClone(){const k=super.createDataClone();return k.currentMaxLevel=this.currentMaxLevel,k}addStars(k,B,U){const F=super.addStars(k,B,U);return G.q.instance.prodigy.gameContainer.get("306-5359").kennel.updated=!0,F}}},10592:(k,B,U)=>{"use strict";var F;U.d(B,{n:()=>F}),function(k){k[k.None=0]="None",k[k.CollectingItems=1]="CollectingItems",k[k.TrackingNPC=2]="TrackingNPC",k[k.TamingUltimate=3]="TamingUltimate",k[k.Transition=4]="Transition"}(F||(F={}))},80974:(k,B,U)=>{"use strict";U.d(B,{H:()=>H});var F=U(62459),G=U(35120),j=U(30226),$=U(73722);class H{constructor(k,B,U,F){this.serverList=null!=k?k:null,this.onServerSelectedCallback=null!=B?B:null,this.onSchoolCallback=U,this.onHomeCallback=F}onServerSelected(k,B){var U;null===(U=this.onServerSelectedCallback)||void 0===U||U.call(this,k,B)}applyServerSelectMode(){"school"===$.V.instance.selectedLocation?this.onSchoolSelected():"home"===$.V.instance.selectedLocation?this.onHomeSelected():F.VyI.log("Location is not valid.",F.$bb.Warning)}onSchoolSelected(){var k,B;null===(k=this.onSchoolCallback)||void 0===k||k.call(this);const U=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;U.setLocation("school"),U.data.lastLoginAtSchool=Date.now(),U.data.sessionCount=(null!==(B=U.data.sessionCount)&&void 0!==B?B:0)+1,G.q.instance.prodigy.open.server(this.serverList,this.onServerSelected.bind(this),!0)}onHomeSelected(){var k,B;null===(k=this.onHomeCallback)||void 0===k||k.call(this);const U=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;U.setLocation("home"),j.J.isDateWithinSchoolDayAndHours()?U.data.lastLoginAtSchool=Date.now():U.data.lastLoginAtHome=Date.now(),U.data.sessionCount=(null!==(B=U.data.sessionCount)&&void 0!==B?B:0)+1,G.q.instance.prodigy.open.server(this.serverList,this.onServerSelected.bind(this),!1)}}},84938:(k,B,U)=>{"use strict";U.d(B,{_:()=>G,B:()=>W});var F,G,j=U(8674),$=U(62459);class H{constructor(k,B=0){this.priority=B,this.apply=k}}class V{constructor(k,B=[]){this.baseValue=k,this.lenses=B}addLens(k){return this.lenses.push(k),{remove:()=>{this.lenses=this.lenses.filter((B=>B!==k))}}}getValue(){return this.lenses.sort(((k,B)=>B.priority-k.priority)).reduce(((k,B)=>B.apply(k)),this.baseValue)}}!function(k){k.MusicVolume="musicVolume",k.EffectVolume="effectVolume",k.VoiceVolume="voiceVolume",k.ScreenShake="screenShake"}(G||(G={}));let W=F=class{get value(){return this._lensedValue.getValue()}constructor(k){this.onChanged=new $.HN0,this.onStoredValueChanged=new $.HN0,this._tweens=new Set,this.data=k,this._lensedValue=new V(k.defaultValue),this.dispatchValue=this.dispatchValue.bind(this)}destroy(){this.onChanged.dispose(),this.onStoredValueChanged.dispose(),this._tweens.forEach((k=>{k.stop(!0),k.destroy()})),this._tweens.clear(),this._lensedValue.lenses=[]}setStoredValue(k){this._lensedValue.baseValue=k,this.onChanged.dispatch(this.value),this.onStoredValueChanged.dispatch(k)}addLens(k){const B=this._lensedValue.addLens(k);return this.onChanged.dispatch(this.value),{remove:()=>{B.remove(),this.onChanged.dispatch(this.value)}}}addSmoothedLensMultiplier(k,B=.5,U=1,F=$.GS3.Cubic.InOut){const G={mult:1},j=new H((k=>k*G.mult));let V=this.addLens(j),W=$.W$e.instance.game.add.tween(G,this,!1).to({mult:k},1e3*B,F);W.onUpdate.add(this.dispatchValue,this),this._tweens.add(W),W.start();const q=()=>{this.onChanged.dispatch(this.value),W&&(W.destroy(),this._tweens.delete(W),W=void 0)};return W.onTweenComplete.add(q),{remove:()=>{W&&W.stop(!0),W=$.W$e.instance.game.add.tween(G,this,!1).to({mult:1},1e3*U,F),W.onUpdate.add(this.dispatchValue,this),this._tweens.add(W),W.start(),W.onTweenComplete.add((()=>{q(),null==V||V.remove(),V=void 0})),window.setTimeout((()=>{null==V||V.remove()}),1e3*U+100)}}}dispatchValue(){this.onChanged.dispatch(this.value)}};W.musicVolume=new F({name:"SETTINGS_MUSIC_VOLUME",description:"The volume of the music",defaultValue:.5,minValue:0,maxValue:1,storedKey:"bgmVolume"}),W.effectVolume=new F({name:"SETTINGS_EFFECT_VOLUME",description:"The volume of the sound effects",defaultValue:.5,minValue:0,maxValue:1,storedKey:"sfxVolume"}),W.voiceVolume=new F({name:"SETTINGS_VOICE_VOLUME",description:"The volume of the voice",defaultValue:.5,minValue:0,maxValue:1,storedKey:"voiceVolume"}),W.screenShake=new F({name:"SETTINGS_SCREEN_SHAKE",description:"The intensity of the screen shake",defaultValue:1,minValue:0,maxValue:1,storedKey:"screenShake"}),W=F=(0,j.Cg)([(0,$.V84)(),(0,j.Sn)("design:paramtypes",[Object])],W)},89360:(k,B,U)=>{"use strict";U.d(B,{h:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(71586);class H{static get instance(){var k;return null!==(k=this._instance)&&void 0!==k?k:this._instance=new H}get autoSurfaceSessionInterval(){return this._autoSurfaceSessionInterval}constructor(){this._data=null,this._updatePending=null,this._autoSurfaceSessionInterval=0,H._instance||(H._instance=this)}getData(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;if(this._data||this.updateData(!1),G.Aq$.isDefined(this._updatePending)&&(yield this._updatePending),null===(k=this._data)||void 0===k?void 0:k.weeklyChallengeData){const k={isTransition:this._data.isTransition,weeklyChallengeData:this._data.weeklyChallengeData};return this._data.isTransition=!1,k}return Promise.reject()}))}updateData(k=!0){if(G.Aq$.isDefined(this._updatePending))return;const B=j.q.instance.prodigy.gameContainer.get("7d7-b2cc");B&&(this._updatePending=new G.bnh,B.getPlayerWeeklyChallengeData(this._goalMidPointValue,this._multiplierValue,this._goalMinValue,this._goalMaxValue).then((B=>{this._data={isTransition:!0,weeklyChallengeData:B},k&&this.sendToSegment(B),this._updatePending.resolve(),this._updatePending=null})).catch((k=>{this._updatePending.reject(),this._updatePending=null,G.VyI.log(`WeeklyChallengeData update failed: ${G.RQr.stringify(k)}`,G.$bb.Warning)})))}sendToSegment(k){if(null==k?void 0:k.currentChallenge){let B=-1;k.timeRemaining>0&&(B=Math.round(2.7777777777777776e-7*k.timeRemaining));const U=Date.now(),F=`${$.R.getISOYearNumber(U)}w${$.R.getISOWeekNumber(U)}`;k.currentChallenge.progressCount{"use strict";U.d(B,{s:()=>W});var F=U(62459),G=U(35120),j=U(62901),$=U(37639),H=U(27293);class V extends H.q{init(k){super.init(k),this.name=k.name}getName(){return this.name}setName(k){this.name=k}}class W extends $.K{constructor(k){super(k),this.appearance=new V}init(k){var B;return!!super.init(k)&&(F.Aq$.isDefined(null===(B=k.data)||void 0===B?void 0:B.ID)&&(this.data.ID=k.data.ID),this.name=G.q.instance.prodigy.gameContainer.resolve(j.r),this.name.init(this.appearance.getName()),!0)}getID(){var k;return null!==(k=this.data.ID)&&void 0!==k?k:0}}},86896:(k,B,U)=>{"use strict";U.d(B,{B:()=>G});var F=U(38487);class G extends F.s{constructor(k,B){super(k,B)}}},70570:(k,B,U)=>{"use strict";U.d(B,{l:()=>tt});var F=U(8674),G=U(62459),j=U(95891),$=U(88022),H=U(56942),V=U(35120),W=U(50503),q=U(60250),K=U(18633),z=U(43531),Y=U(96216),Q=U(67462),X=U(38487),Z=U(77938);var J=U(78673);class tt extends X.s{static createTeam(k,B){const U=new tt(k,B);return[U,new J.y(k,U,q.G.left),new J.y(k,U,q.G.right)]}constructor(k,B){super(k,B),this.onBracerBreak=new G.HN0,this._aspenFrostContainer=null,this._config=null,this.aoaTier=2,this.showHealthBar=!0,this.modifiers.takenDamageMultiplier=0,this.modifiers.barrier={offset:{x:0,y:-110},scale:{x:1,y:1}},this._config=(()=>{const k=V.q.instance.prodigy.gameContainer.get("80c-6fa4"),B=Z.t.getItem("boss",19).data;return j.merge({},B,k.getValue("aspenFrostConfigOverrides"))})(),this.source.maxHP=W.A.getCreatureHP(this)}setBossContainer(k){this._aspenFrostContainer=k}getConfig(){return this._config}getStatHealth(){return this._config.battle.hpStat}getAssets(){return j.concat(super.getAssets(),"voice-36-1",$._.Npc_face_aspen_json,$._.Boss_aspen_extras_json,H.Q.Spine_npc_aspen_json,this._config.battle.yetiAttacks.map((k=>`spell-${k}`)),this._config.battle.spiderAttacks.map((k=>`spell-${k}`)))}getBamSpells(k){return this._config.battle.yetiAttacks.map((k=>({ID:k,locked:!1,type:Q.U.Native})))}chooseAction(k,B,U,F,G,j){if(this._aspenFrostContainer.bracerCount>0){G(B,F,j,this._aspenFrostContainer.bracerCount>1?94:93,W.A.rollMissChance(k,B.getSource().modifiers.miss))}else this.runYetiExitSequence(j);return!0}runYetiExitSequence(k){return(0,F.sH)(this,void 0,void 0,(function*(){let B;const U=()=>(B=new G.bnh).resolve,F=this.game.state.get("Battle"),W=(k,B)=>{Y.M.radialCloud(this.game,this._aspenFrostContainer.parent,k.x,k.y,B,$._.Boss_aspen_extras_json,"purple-cloud")};for(let k=7;k>0;--k)W({x:this._aspenFrostContainer.position.x+tt.YETI_SMOKE_OFFSET.x,y:this._aspenFrostContainer.position.y+tt.YETI_SMOKE_OFFSET.y},tt.SAND_CLOUD_RADIUS_YETI),k>1&&(yield G.Egh.timeout(200));this._aspenFrostContainer.visible=!1;const q=this.game.add.spine(0,0,H.Q.Spine_npc_aspen_json);q.x=this._aspenFrostContainer.x,q.y=this._aspenFrostContainer.y,q.setAnimationByName(0,"idle",!0),this._aspenFrostContainer.parent.addChildAt(q,0),F.rightStatusUI.moveOffScreen();const Q=new z.rD(this.game),X=Q.dataProvider;Q.addEvents([{dialogueData:X.get(983),blockInput:!0}]),Q.start(!0,U()),yield B,this.game.add.tween(q,this).to({alpha:0},1e3,void 0,!0).onTweenComplete.addOnce(U());for(const k of F.teams[1].team.filter((k=>k instanceof K.Z)))this.game.add.tween(k,this).to({alpha:0},1e3,void 0,!0);yield B,yield G.Egh.timeout(2e3);const Z=V.q.instance.prodigy.battle,J=yield Z.replaceOpponentTeam(j.merge(this._config.spiderBattle,{starOverride:F.mods.starOverride,disableHealing:F.mods.disableHealing}),!1);for(const k of J.team)k.visible=!1;yield G.Egh.timeout(1e3);const et=[{x:q.x+tt.LEFT_PILE_OFFSET.x,y:q.y+tt.LEFT_PILE_OFFSET.y},{x:q.x+tt.RIGHT_PILE_OFFSET.x,y:q.y+tt.RIGHT_PILE_OFFSET.y}];for(let k=2;k>0;--k)W(et[0],tt.SAND_CLOUD_RADIUS_SPIDER),W(et[1],tt.SAND_CLOUD_RADIUS_SPIDER),k>1&&(yield G.Egh.timeout(200));const it=J.team.map(((k,B)=>{const U={x:k.x,y:k.y};return k.position.set(et[B].x+tt.SPIDER_SPAWN_OFFSET.x,et[B].y+tt.SPIDER_SPAWN_OFFSET.y),k.parent.setChildIndex(k,0),k.visible=!0,U}));this._aspenFrostContainer.hideBracerPiles(),yield G.Egh.timeout(3e3),J.team.forEach(((k,B)=>{k.walk(),this.game.add.tween(k,this).to({x:it[B].x,y:it[B].y},1e3,void 0,!0).onTweenComplete.addOnce((()=>{k.stand(),k.flip()}))})),F.rightStatusUI.moveOnScreen(),yield G.Egh.timeout(1500),k()}))}}tt.YETI_SMOKE_OFFSET={x:0,y:-100},tt.LEFT_PILE_OFFSET={x:-98,y:0},tt.RIGHT_PILE_OFFSET={x:68,y:0},tt.SPIDER_SPAWN_OFFSET={x:0,y:50},tt.SAND_CLOUD_RADIUS_SPIDER=100,tt.SAND_CLOUD_RADIUS_YETI=500},78673:(k,B,U)=>{"use strict";U.d(B,{y:()=>$});var F=U(95891),G=U(50503),j=U(38487);class $ extends j.s{get boss(){return this._aspenFrostBoss}constructor(k,B,U){super(k,F.merge(Object.assign({},B.source),B.getConfig().tree.creature)),this._aspenFrostBoss=null,this.aoaTier=2,this._aspenFrostBoss=B,this.source.maxHP=G.A.getCreatureHP(this),this.onHPChange.add((()=>{this.getCurrentHearts()<=0&&this._aspenFrostBoss.onBracerBreak.dispatch(U)}))}chooseAction(k,B,U,F,G,j){return this._aspenFrostBoss.chooseAction(k,B,U,F,G,j)}getName(){return this._aspenFrostBoss.getName()}getStatHealth(){return this._aspenFrostBoss.getConfig().tree.hpStat}}},7914:(k,B,U)=>{"use strict";U.d(B,{b:()=>H});var F=U(62459),G=U(35120),j=U(50503),$=U(38487);class H extends $.s{chooseAction(k,B,U,$,H,V){const W=B,q=k/j.A.MAX_DIFFICULTY,K=W.source.getCurrentHearts(){"use strict";U.d(B,{t:()=>H});var F=U(62459),G=U(50503),j=U(77938),$=U(38487);class H extends $.s{chooseAction(k,B,U,$,H,V){const W=B;if(W.miniBoss)return!1;const q=k/G.A.MAX_DIFFICULTY;W.updateClouds();const K={fire:0,ice:0,water:0,plant:0,storm:0,astral:0},z=$.getCurrentSource().getCurrentBamSpells();for(let F=0;FQ&&(Y=F,Q=z[F]);if("fire"===Y)W.waterMode();else if("ice"===Y){const k=Math.random();k<.34?W.earthMode():k<.67?W.iceMode():W.waterMode()}else if("plant"===Y){const k=Math.random();k<.34?W.earthMode():k<.67?W.iceMode():W.stormMode()}else if("storm"===Y)W.iceMode();else if("water"===Y)Math.random()<.5?W.earthMode():W.stormMode();else{const k=Math.random();k<.25?W.earthMode():k<.5?W.iceMode():k<.75?W.waterMode():W.stormMode()}const X=W.attacks;if(X.length<=0)return V(),!0;const Z=G.A.getBestAttack(X,this,$.getCurrentSource(),1-q);return F.Aq$.isDefined(Z)?(H(B,$,V,Z,Math.random()<.25-.25*q),!0):(V(),!0)}}},75915:(k,B,U)=>{"use strict";U.d(B,{u:()=>J});var F=U(8674),G=U(62459),j=U(95891),$=U(88022),H=U(56942),V=U(50503),W=U(95946),q=U(52239),K=U(29949),z=U(67462),Y=U(38487),Q=U(35120),X=U(77938);var Z;!function(k){k[k.shadow=0]="shadow",k[k.element1=1]="element1",k[k.element2=2]="element2",k[k.element3=3]="element3",k[k.element4=4]="element4",k[k.stunned=5]="stunned"}(Z||(Z={}));class J extends Y.s{static createTeam(k,B){return[new J(k,B)]}constructor(k,B){super(k,B),this._bossContainer=null,this._bossContainerGameObject=null,this._config=null,this._currentElement=W.a.Shadow,this._currentEnergy=0,this._currentState=Z.shadow,this.aoaTier=2,this.showHealthBar=!0,this._config=(()=>{const k=Q.q.instance.prodigy.gameContainer.get("80c-6fa4"),B=X.t.getItem("boss",18).data;return j.merge({},B,k.getValue("crystalGolemConfigOverrides"))})(),this.source.maxHP=V.A.getCreatureHP(this),j.merge(this.modifiers,this._config.creatureModifiers)}getAssets(){return j.concat(super.getAssets(),H.Q.Default_boss_18_json,$._.Boss_aspen_extras_json,H.Q.Spine_flash_json,j.flatMap(j.values(this._config.battle.attacks)).map((k=>`spell-${k}`)))}getBamSpells(k){return j.flattenDeep(j.values(this._config.battle.attacks).map((k=>k.map((k=>({ID:k,locked:!1,type:z.U.Native}))))))}setBossContainer(k){this._bossContainer=k,this._bossContainerGameObject=new G._mx,this._bossContainerGameObject.addComponent(G.K16),this._bossContainer.add(this._bossContainerGameObject.legacyTransform.group),this._bossContainer.castDelay=this._config.battle.castDelay}setTeam(k){this._team=k,this._team.hasManagedEnergy=!0}getConfig(){return this._config}getStatHealth(){return this._config.battle.hpStat}chooseAction(k,B,U,F,G,$){var H;U.setEnergy(this._currentEnergy);let W=$,q=0;switch(this._currentState){case Z.element4:q=j.sample(this._config.battle.attacks[this._currentElement].filter((k=>!new K.I(k).isSingleShot()))),U.setEnergy(this._currentEnergy=0),W=()=>{this.stun().then((()=>{$()}))};break;case Z.stunned:return $(),!0;default:q=j.sample(this._config.battle.attacks[this._currentElement].filter((k=>new K.I(k).isSingleShot())))}return(null!==(H=this._animationPromise)&&void 0!==H?H:Promise.resolve()).then((()=>{this._animationPromise=null,G(B,F,W,q,V.A.rollMissChance(k,B.getSource().modifiers.miss))})),!0}registerIncomingAttack(k,B,U,F){if(this._currentState!==Z.stunned&&F.damage>=this.getCurrentHearts())return void this.stun();const G=new K.I(B);switch(this._currentState){case Z.shadow:if(!U){const k=G.getElement();let B=W.a.Shadow;B=j.includes(J.SWAP_ELEMENTS,k)?k:j.sample(J.SWAP_ELEMENTS),this.switchElement(B),++this._currentState}break;case Z.stunned:if(!U&&!G.isSingleShot()){G.getValue("animationType")===q.i.aoa?F.damage=Math.floor(1.25*F.damage):F.damage*=3;const k=this._bossContainer.displayDamage;this._bossContainer.displayDamage=(B,U,G)=>{this._bossContainer.showAoeDamage(F,G),this._bossContainer.displayDamage=k}}(U||F.damage{"use strict";U.d(B,{e:()=>z});var F=U(62459),G=U(95891),j=U(35120),$=U(50503),H=U(77938),V=U(47315),W=U(38487),q=U(55734),K=U(47223);class z extends W.s{get bossCharacter(){return this._bossCharacter}static createTeam(k,B){const U={ID:117,level:B.level},F=new z(k,B),G=k=>(k.actionChooser=F,k.aoaTier=2,k);return[G(new q.R(k,Object.assign({},U))),G(new q.R(k,U)),F]}constructor(k,B){super(k,B),this._bossContainer=null,this._bossContainerGameObject=null,this._config=null,this.showHealthBar=!0,this._config=(()=>{const k=j.q.instance.prodigy.gameContainer.get("80c-6fa4"),B=H.t.getItem("boss",21).data;return G.merge({},B,k.getValue("crystalThiefConfigOverrides"))})(),this._config.wizard.data=B,"string"==typeof B.nameKey&&(this._config.wizard.appearance.name=B.nameKey),this._bossCharacter=new K.s(k);const U=Object.assign({},this._config.wizard);U.data.hp=this.source.maxHP=$.A.getCreatureHP(this),this._bossCharacter.aoaTier=2,this._bossCharacter.init(U),this._bossCharacter.actionChooser=this,G.merge(this.modifiers,this._config.creatureModifiers),this._bossCharacter.modifiers=Object.assign({},this.modifiers)}setBossContainer(k){this._bossContainer=k,this._bossContainerGameObject=new F._mx,this._bossContainerGameObject.addComponent(F.K16),this._bossContainer.add(this._bossContainerGameObject.legacyTransform.group),this._bossContainer.battleShy=this._config.battle.battleShy,this._bossContainer.forceWeaponVisual=!0}getConfig(){return this._config}getStatHealth(){return this._config.battle.hpStat}getAssets(){return G.concat(super.getAssets(),this._bossCharacter.getSpellAssets())}getBamSpells(k){return this._bossCharacter.getCurrentBamSpells()}chooseAction(k,B,U,G,W,q){if(B===this._bossContainer){const j=B.source.getCurrentBamSpells(),K=[],z=[];for(let k=0;k=3&&z.length>0&&(U.changeEnergy(-3),Y=z[F.cj9.between(0,z.length-1)]),!F.Aq$.isDefined(Y))return F.VyI.log("Invalid attack, skipping turn",F.$bb.Warning),q(),!0;W(B,G,q,Y,$.A.rollMissChance(k,B.getSource().modifiers.miss))}else j.q.instance.prodigy.battle.chooseAction(k,!1,B,G.getCurrent(),U,G,W,null,q);return!0}}},66726:(k,B,U)=>{"use strict";U.d(B,{x:()=>G});var F=U(38487);class G extends F.s{}},84705:(k,B,U)=>{"use strict";U.d(B,{Y:()=>K});var F=U(62459),G=U(95891),j=U(50503),$=U(67462),H=U(56942),V=U(38487),W=U(35120),q=U(77938);class K extends V.s{static createTeam(k,B){return[new K(k,B)]}constructor(k,B){super(k,B),this._bossContainer=null,this._bossContainerGameObject=null,this._config=null,this._nextSpellIndex=0,this.aoaTier=2,this.showHealthBar=!0,this._config=(()=>{const k=W.q.instance.prodigy.gameContainer.get("80c-6fa4"),B=q.t.getItem("boss",20).data;return G.merge({},B,k.getValue("glaciasConfigOverrides"))})(),this.source.maxHP=j.A.getCreatureHP(this),G.merge(this.modifiers,this._config.creatureModifiers)}setBossContainer(k){this._bossContainer=k,this._bossContainerGameObject=new F._mx,this._bossContainerGameObject.addComponent(F.K16),this._bossContainer.add(this._bossContainerGameObject.legacyTransform.group),this._bossContainer.castDelay=this._config.battle.castDelay}getConfig(){return this._config}getStatHealth(){return this._config.battle.hpStat}getAssets(){return G.concat(super.getAssets(),H.Q.Default_boss_20_json,this._config.battle.attacks.map((k=>`spell-${k}`)))}getBamSpells(k){return this._config.battle.attacks.map((k=>({ID:k,locked:!1,type:$.U.Native})))}chooseAction(k,B,U,F,G,$){const H=this._config.battle.attacks[this._nextSpellIndex];if(++this._nextSpellIndex>=this._config.battle.attacks.length){this._nextSpellIndex=0;this.game.state.getCurrentState().teams[1].changeEnergy(-3)}return G(B,F,$,H,j.A.rollMissChance(k,B.getSource().modifiers.miss)),!0}}},8811:(k,B,U)=>{"use strict";U.d(B,{C:()=>G});var F=U(38487);class G extends F.s{}},30424:(k,B,U)=>{"use strict";U.d(B,{d:()=>j});var F=U(50503),G=U(38487);class j extends G.s{chooseAction(k,B,U,G,j,$){const H=k/F.A.MAX_DIFFICULTY,V=B.source.source.attacks;if(V.length<=0)return $(),!0;const W=F.A.getBestAttack(V,this,G.getCurrentSource(),1-H),q=.25-.25*k;return j(B,G,$,W,Math.random(){"use strict";U.d(B,{K:()=>H});var F=U(62459),G=U(50503),j=U(77938),$=U(38487);class H extends $.s{chooseAction(k,B,U,j,$,H){const V=k/G.A.MAX_DIFFICULTY,W=B.source.source.attacks,q=G.A.getBestAttack(W,B.getSource(),j.getCurrentSource(),1-V);return F.Aq$.isDefined(q)?($(B,j,H,q,Math.random()<.25-.25*k),!0):(H(),!0)}getDrops(){return super.getDrops().concat({type:"gold",N:100},j.t.getItemDrops())}}},20786:(k,B,U)=>{"use strict";U.d(B,{i:()=>nt,F:()=>at});var F=U(62459),G=U(95891),j=U(35120),$=U(51742),H=U(36648),V=U(56942),W=U(50503),q=U(74452),K=U(1434),z=U(8674),Y=U(79687);let Q=class{constructor(k,B){this._fsmID=null,this._fsmVariables={},this._sharedFSMVariables={},this._instancedFSMVariableQueue=[],this._currentInstanceVariables={onComplete:null,variables:{}},this._fsmService=null,this._fsmController=null,this._fsmController=B,this._fsmService=k,this._instancedFSMVariableQueue.push(this._currentInstanceVariables)}setID(k){return this._fsmID=k,this}setSharedVariables(k){return this._sharedFSMVariables=Object.assign({},k),this}setSharedVariableValue(k,B){return this._sharedFSMVariables[k]=B,this}setInstanceVariables(k){return this._currentInstanceVariables.variables=Object.assign({},k),this}setInstanceVariableValue(k,B){return this._currentInstanceVariables.variables[k]=B,this}getVariableValue(k){return this._fsmVariables[k]}setChainedFSM(k){return this.setOnCompleteCallback(k.execute.bind(k)),this}setOnCompleteCallback(k){return this._currentInstanceVariables.onComplete=k,this}execute(){let k=this._currentInstanceVariables;this._instancedFSMVariableQueue.length>1&&(k=this._instancedFSMVariableQueue.shift()),this._fsmVariables=Object.assign(Object.assign({},this._sharedFSMVariables),k.variables),this._fsmController.execute(this._fsmService.getStateMachine(this._fsmID),this._fsmVariables,k.onComplete)}queueVariablesInstance(){return this._currentInstanceVariables={onComplete:null,variables:{}},this._instancedFSMVariableQueue.push(this._currentInstanceVariables),this}getInstancedVariablesQueue(){return this._instancedFSMVariableQueue}};Q=(0,z.Cg)([(0,Y.injectable)(),(0,z.Qj)(0,(0,Y.inject)(F.$Bt.FSMService)),(0,z.Qj)(1,(0,Y.inject)(F.$Bt.IFSMController)),(0,z.Sn)("design:paramtypes",[F.CQn,Object])],Q);const X=(...k)=>{const B=[...k],U=[];let F=null,G=null;for(;B.length>0;){const k=B.findIndex((k=>k instanceof Q)),j=k>-1?B[k]:null;let $=null;if(j?($=k>0?Z.bind(null,[...B.splice(0,k),j.execute.bind(j)]):j.execute.bind(j),B.shift()):$=Z.bind(null,B.splice(0)),F){if(G){let k=U.find((k=>k.chainedFSM===G));k||(k={chainedFSM:G,count:0}),U.push(k);G.getInstancedVariablesQueue()[k.count].onComplete=$,++k.count}}else F=$;j&&(G=j)}return F};function Z(k){const B=k.length;for(let U=0;U({ID:k,locked:!1,type:tt.U.Native})))}}var nt;!function(k){k.Wyrm="Above Ground",k.Burying="Burying Underground",k.Underground="Underground",k.Emerging="Emerging",k.Taunting="Taunting",k.Shuffling="Rocks Shuffling",k.Stunned="Stunned",k.ReturningToMiddle="Returning To Middle",k.Roaring="Roaring"}(nt||(nt={}));class at extends et.s{get currentState(){return this._currentState}get teamPosition(){return this._currentTeamPosition}static createTeam(k,B){return[new at(k,B)]}constructor(k,B){super(k,B),this._currentState=nt.Wyrm,this._wyrmContainer=null,this._rocksContainers=[],this._config=null,this._currentTeamPosition=q.I.Middle,this._wyrmSpells=null,this._rocksSpells=null,this._chainedFSMCache={},this._previousHearts=0,this._phaseHPThreshold=0,this._previousRockCount=0,this._destroyedRockForm=!1,this._previousMissedSpellCount=0,this.aoaTier=2,this.showHealthBar=!0,this._config=(()=>{const k=j.q.instance.prodigy.gameContainer.get("80c-6fa4"),B=it.t.getItem("boss",17).data;return G.merge({},B,k.getValue("shadowWyrmConfigOverrides"))})(),this._wyrmSpells=this.buildSpellsList(this._config.battle.wyrmAttacks),this._rocksSpells=this.buildSpellsList(this._config.battle.rockAttacks),G.merge(this.modifiers,this._config.creatureModifiers);const U=j.q.instance.prodigy.gameContainer;this._chainedFSMCache[nt.Burying]=U.resolve(Q).setID(117).setSharedVariables({shadowWyrmBoss:this}),this._chainedFSMCache[nt.Stunned]=U.resolve(Q).setID(120).setSharedVariables({fsmController:U.get(F.$Bt.IFSMController),fsmService:U.get(F.$Bt.FSMService),game:this.game,shadowWyrmBoss:this}),this._chainedFSMCache[nt.Shuffling]=U.resolve(Q).setID(118).setSharedVariables({gameObjectFactory:this.game.add,positions:at.WYRM_POSITIONS}),this._chainedFSMCache[nt.Emerging]=U.resolve(Q).setID(119).setSharedVariables({shadowWyrmBoss:this,emergeAnimation:"emerge"}),this._chainedFSMCache[nt.Taunting]=U.resolve(Q).setID(122).setSharedVariables({shadowWyrmBoss:this}),this._chainedFSMCache[nt.Roaring]=U.resolve(Q).setID(123).setSharedVariables({shadowWyrmBoss:this,game:this.game}),this.source.maxHP=W.A.getCreatureHP(this)*this._config.battle.hpModifier,this._previousHearts=this.getCurrentHearts(),this._phaseHPThreshold=this.getMaxHearts()*this._config.battle.phaseHPThresholdPercentage,this._previousRockCount=this.getActiveRockCount(),this._previousMissedSpellCount=j.q.instance.prodigy.battle.battleStats.spellsFailed}changeCurrentHearts(k,B){super.changeCurrentHearts(k,B),this._currentState===nt.Underground&&(this._destroyedRockForm=!0),this._currentTeamPosition!==q.I.Middle&&this.getBossTeam().onCurrentMemberHPChange.dispatch(this,k)}setBossContainer(k){this._wyrmContainer=k,this._wyrmContainer.OnLoad.addOnce((()=>{this.setSharedVariableValueForStates("shadowWyrmSpine",this._wyrmContainer.spine,[nt.Burying,nt.Stunned,nt.Roaring,nt.Taunting,nt.Emerging])})),this.setSharedVariableValueForStates("shadowWyrmContainer",this._wyrmContainer,[nt.Emerging,nt.Stunned]);for(let B=0;B<2;++B){const k=at.WYRM_POSITIONS[B+1],U=new K.K(this.game,null,new st(this.game,this),k.x,k.y);U.flip(),U.startLoad(),this._rocksContainers.push(U),this.parentContainerToBattleLayer(U,this._rocksContainers.length)}this._chainedFSMCache[nt.Shuffling].setSharedVariableValue("rocks",[this._wyrmContainer,...this._rocksContainers])}getConfig(){return this._config}getStatHealth(){return this._config.battle.hpStat}isKnockedOut(){return this._currentState===nt.Wyrm&&super.isKnockedOut()}getAssets(){return G.concat(super.getAssets(),H.q.Cc_shadowWyrm_mound,V.Q.Default_boss_17_json,$.c.Sfx_wyrmroar,this._config.battle.rockAttacks.map((k=>`spell-${k}`)),this._config.battle.wyrmAttacks.map((k=>`spell-${k}`)))}getCurrentBamSpells(){return this._currentState===nt.Underground?this._rocksSpells:this._wyrmSpells}chooseAction(k,B,U,$,H,V){const W=this.getCurrentHearts(),K=this.getActiveRockCount(),z=this._previousHearts!==W,Y=this._previousRockCount!==K,Q=j.q.instance.prodigy.battle.battleStats.spellsFailed,Z=this._previousMissedSpellCount!==Q;if(this._previousHearts=W,this._previousRockCount=K,this._previousMissedSpellCount=Q,this._currentState===nt.Wyrm&&(this.getCurrentHearts()>this.getPhaseHPThreshold()||!z)){const k=j.q.instance.prodigy.battle,U=this.game.state.getCurrentState();k.chooseAction(this._config.battle.difficulty,!1,B,$.getCurrent(),U.teams[1],$,((k,B,U,F,G,j)=>{H(k,B,U,F,G)}),null,V)}else{if(this.getCurrentHearts()<=0){const k=[];return this._currentState===nt.Underground&&k.push(this._chainedFSMCache[nt.Emerging].queueVariablesInstance()),this._currentTeamPosition!==q.I.Middle?k.push(...this.getReturnToMiddleFSMChain()):k.push((()=>{this.setHiddenUnderground(!1),this.getBossTeam().resetOverriddenPositions(),this.setState(nt.Wyrm)})),X(...k)(),!0}switch(this._currentState){case nt.Wyrm:X(this._chainedFSMCache[nt.Burying].queueVariablesInstance(),(()=>{this.setHiddenUnderground(!0),this.getBossTeam().resetOverriddenPositions()}),this.getAttackAndShuffleFSMChain(H,B,$,V))();break;case nt.Underground:{const k=this.getActiveRockCount();if(this._destroyedRockForm)this._destroyedRockForm=!1,2===k?X((()=>{this.setHiddenUnderground(!1);const k=this.getBossTeam();this._rocksContainers.forEach((B=>{k.resetContainerOverriddenPosition(B)}))}),this._chainedFSMCache[nt.Stunned].queueVariablesInstance(),V)():X(...this.getRevealFSMChain(),this.bindAttackCallback(H,B,$,V,G.sample(this._config.battle.wyrmAttacks)))();else if(k>0)if(Y)X(this._chainedFSMCache[nt.Emerging].queueVariablesInstance(),this._chainedFSMCache[nt.Taunting].queueVariablesInstance(),this._chainedFSMCache[nt.Burying].queueVariablesInstance(),this.getAttackAndShuffleFSMChain(H,B,$,V))();else{const k=X(this._chainedFSMCache[nt.Emerging].queueVariablesInstance(),this._chainedFSMCache[nt.Burying].queueVariablesInstance(),this.getAttackAndShuffleFSMChain(H,B,$,V));Z?this.game.time.events.addTimer(1e3,k,this):k()}else X(...this.getTauntAndReturnToMiddleFSMChain(),this.bindAttackCallback(H,B,$,V,73))();break}case nt.Stunned:{const k=X(...this.getClearStunFSMChain(),this.bindAttackCallback(H,B,$,V,G.sample(this._config.battle.wyrmAttacks)));Z?this.game.time.events.addTimer(1e3,k,this):k();break}default:F.VyI.log("Shadow Wyrm is choosing action in unhandled state!!!!!",F.$bb.Error)}}return!0}getShuffleFSMChain(k){const B=this._chainedFSMCache[nt.Shuffling],U=this._config.rockShuffle[this.getActiveRockCount()+1];return[B.setInstanceVariableValue("shuffleCount",k).setInstanceVariableValue("startRockTimeElapsed",U.timeElapsed.start).setInstanceVariableValue("endRockTimeElapsed",U.timeElapsed.end).setInstanceVariableValue("startRockDelay",U.delay.start).setInstanceVariableValue("endRockDelay",U.delay.end).queueVariablesInstance(),()=>{const k=B.getVariableValue("updatedRockPositions"),U=Object.keys(k).find((B=>k[B]===this._currentTeamPosition));this.setWyrmLocation(parseInt(U,10));const G=this.getBossTeam(),j=this._rocksContainers.length;for(let B=0;BF.cj9.fuzzyEqual(B.x,k.x)&&F.cj9.fuzzyEqual(B.y,k.y)));G.overrideTeamPositionForContainer(k,U),this.parentContainerToBattleLayer(k,U)}}]}getAttackAndShuffleFSMChain(k,B,U,F){return this.bindAttackCallback(k,B,U,(()=>{if(this.game.state.getCurrentState().teams[0].isDefeated())F();else{const k=this._config.rockShuffle[this.getActiveRockCount()+1].shuffleCount;X(...this.getShuffleFSMChain(J.o.integerInRange(k.min,k.max)),F)()}}),G.sample(this._config.battle.rockAttacks))}getRevealFSMChain(){const k=[this._chainedFSMCache[nt.Emerging].queueVariablesInstance()];return this._currentTeamPosition!==q.I.Middle&&(k.push(this._chainedFSMCache[nt.Roaring].queueVariablesInstance()),k.push(...this.getReturnToMiddleFSMChain())),k.push((()=>{this.setHiddenUnderground(!1),this.getBossTeam().resetOverriddenPositions()})),k}getTauntAndReturnToMiddleFSMChain(){const k=[this._chainedFSMCache[nt.Emerging].queueVariablesInstance(),this._chainedFSMCache[nt.Taunting].queueVariablesInstance()];return this._currentTeamPosition!==q.I.Middle?k.push(...this.getReturnToMiddleFSMChain()):k.push((()=>{this.setHiddenUnderground(!1),this.getBossTeam().resetOverriddenPositions()})),k}getClearStunFSMChain(){return this._currentTeamPosition!==q.I.Middle?[this._chainedFSMCache[nt.Roaring].queueVariablesInstance(),...this.getReturnToMiddleFSMChain()]:[()=>{this._wyrmContainer.idle(),this.getBossTeam().resetOverriddenPositions(),this.setState(nt.Wyrm)}]}getReturnToMiddleFSMChain(){return[this._chainedFSMCache[nt.Burying].queueVariablesInstance(),()=>{this.swapWyrmToMiddle(),this.setHiddenUnderground(!1),this.getBossTeam().resetOverriddenPositions()},this._chainedFSMCache[nt.Emerging].queueVariablesInstance()]}swapWyrmToMiddle(){const k=at.WYRM_POSITIONS[q.I.Middle],B=this._rocksContainers.find((B=>F.cj9.fuzzyEqual(B.x,k.x)&&F.cj9.fuzzyEqual(B.y,k.y))),U=this._currentTeamPosition;this.setContainerLocation(B,this._currentTeamPosition),this.setWyrmLocation(q.I.Middle),B.position.copyFrom(at.WYRM_POSITIONS[U]),this._wyrmContainer.position.copyFrom(k)}getActiveRockCount(){return this._currentState===nt.Wyrm?this._rocksContainers.length:this._rocksContainers.filter((k=>k.source.getCurrentHearts()>0)).length}setState(k){this._currentState=k,this._currentState===nt.Underground?this.modifiers.takenDamageMultiplier=this._config.battle.undergroundDamageMultiplier:this.modifiers.takenDamageMultiplier=1}setWyrmLocation(k){this._currentTeamPosition=k,this.setContainerLocation(this._wyrmContainer,k)}setContainerLocation(k,B){this.getBossTeam().overrideTeamPositionForContainer(k,B),this.parentContainerToBattleLayer(k,B)}buildSpellsList(k){return k.map((k=>({ID:k,locked:!1,type:tt.U.Native})))}setSharedVariableValueForStates(k,B,U){const F=U.length;for(let G=0;G{B.setTargetable(k),B.source.data.hp=k?1:0,B.ran=!1}));const B=this.getBossTeam();B.team=k?[this._wyrmContainer,...this._rocksContainers]:[this._wyrmContainer]}getPhaseHPThreshold(){return this._phaseHPThreshold}bindAttackCallback(k,B,U,F,G){return k.bind(null,this._wyrmContainer,U,F,G,W.A.rollMissChance(this._config.battle.difficulty),{dmgMod:this._config.battle.damageModifier})}}at.WYRM_POSITIONS=[new F.I9Y(935,500),new F.I9Y(1065,390),new F.I9Y(1065,610)]},10655:(k,B,U)=>{"use strict";U.d(B,{A:()=>G});var F=U(38487);class G extends F.s{constructor(k,B){super(k,B),this.showHealthBar=!0}}},83668:(k,B,U)=>{"use strict";U.d(B,{o:()=>$});var F,G=U(62459),j=U(50751);!function(k){k[k.Seen=0]="Seen",k[k.Defeated=1]="Defeated",k[k.StatusCount=2]="StatusCount"}(F||(F={}));class $ extends j.I{setBossSeen(k,B=!0){const U=this.getPersistentBossesStatus(),j=this.getBitIndexForBossStatus(k,F.Seen);this.setPersistentBossesStatus(B?G.OQO.setBit(U,j):G.OQO.clearBit(U,j))}isBossSeen(k){return G.OQO.isBitSet(this.getPersistentBossesStatus(),this.getBitIndexForBossStatus(k,F.Seen))}setBossDefeated(k,B=!0){this.setBossDefeatedAllTime(k,B),this.setBossDefeatedCurrentRun(k,B)}setBossDefeatedAllTime(k,B=!0){const U=this.getPersistentBossesStatus(),j=this.getBitIndexForBossStatus(k,F.Defeated);this.setPersistentBossesStatus(B?G.OQO.setBit(U,j):G.OQO.clearBit(U,j))}setBossDefeatedCurrentRun(k,B=!0){const U=this.getRunBossesStatus();this.setRunBossesStatus(B?G.OQO.setBit(U,k):G.OQO.clearBit(U,k))}isBossDefeatedAllTime(k){return G.OQO.isBitSet(this.getPersistentBossesStatus(),this.getBitIndexForBossStatus(k,F.Defeated))}isBossDefeatedCurrentRun(k){return G.OQO.isBitSet(this.getRunBossesStatus(),k)}isMakaluSeen(){return this.isBossSeen(1)}setMakaluSeen(){this.setBossSeen(1)}isGrumpyYetiSeen(){return this.isBossSeen(0)}setGrumpyYetiSeen(){this.setBossSeen(0)}isCrystalGolemSeen(){return this.isBossSeen(2)}setCrystalGolemSeen(){this.setBossSeen(2)}isGlaciasSeen(){return this.isBossSeen(3)}setGlaciasSeen(){this.setBossSeen(3)}isWinstonVonLootSeen(){return this.isBossSeen(4)}setWinstonVonLootSeen(){this.setBossSeen(4)}isMakaluDefeatedAllTime(){return this.isBossDefeatedAllTime(1)}isMakaluDefeatedCurrentRun(){return this.isBossDefeatedCurrentRun(1)}setMakaluDefeated(){this.setBossDefeated(1)}isGrumpyYetiDefeatedAllTime(){return this.isBossDefeatedAllTime(0)}isGrumpyYetiDefeatedCurrentRun(){return this.isBossDefeatedCurrentRun(0)}setGrumpyYetiDefeated(){this.setBossDefeated(0)}isCrystalGolemDefeatedAllTime(){return this.isBossDefeatedAllTime(2)}isCrystalGolemDefeatedCurrentRun(){return this.isBossDefeatedCurrentRun(2)}setCrystalGolemDefeated(){this.setBossDefeated(2)}isGlaciasDefeatedAllTime(){return this.isBossDefeatedAllTime(3)}isGlaciasDefeatedCurrentRun(){return this.isBossDefeatedCurrentRun(3)}setGlaciasDefeated(){this.setBossDefeated(3)}isWinstonVonLootDefeatedAllTime(){return this.isBossDefeatedAllTime(4)}isWinstonVonLootDefeatedCurrentRun(){return this.isBossDefeatedCurrentRun(4)}setWinstonVonLootDefeated(){this.setBossDefeated(4)}getBitIndexForBossStatus(k,B){return k*F.StatusCount+B}}},50751:(k,B,U)=>{"use strict";U.d(B,{I:()=>V});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U(10044);let V=class{get updated(){return this._updated}constructor(k){this._updated=!1,this._data=null,this._currentPlayer=null,this._currentPlayer=k}getInitializationData(){return{persistentData:{bossesStatus:0}}}getDataAndClear(){return this._updated=!1,this._data}setData(k,B=!1){k&&(this._data=k,this._updated=this._updated||B)}getCurrentMap(){var k;return null!==(k=this.getRunSchema().currentMap)&&void 0!==k?k:null}setCurrentMap(k){this.getRunSchema().currentMap=k,this._updated=!0}getLevel(){var k;return null!==(k=this.getRunSchema().level)&&void 0!==k?k:1}isRunStarted(){return!($.isEmpty(this.getRunSchema())&&$.isEmpty(this.getPhaseSchema()))}setCheckpoint(k,B,U){this.getPhaseSchema().checkpoint={index:k,location:{x:B.x,y:B.y},facingDirection:U},this._updated=!0}getCheckpointIndex(){var k,B;return null!==(B=null===(k=this.getPhaseSchema().checkpoint)||void 0===k?void 0:k.index)&&void 0!==B?B:-1}getCheckpointLocation(){var k,B;return null!==(B=null===(k=this.getPhaseSchema().checkpoint)||void 0===k?void 0:k.location)&&void 0!==B?B:null}getFacingDirection(){var k,B;return null!==(B=null===(k=this.getPhaseSchema().checkpoint)||void 0===k?void 0:k.facingDirection)&&void 0!==B?B:H.y.Left}getCompletedRuns(){var k;return null!==(k=this.getPersistentSchema().completedRuns)&&void 0!==k?k:0}setCompletedRuns(k){this.getPersistentSchema().completedRuns=k,this._updated=!0}setPersistentBossesStatus(k){this.getPersistentSchema().bossesStatus=k,this._updated=!0}getPersistentBossesStatus(){var k;return null!==(k=this.getPersistentSchema().bossesStatus)&&void 0!==k?k:0}setRunBossesStatus(k){this.getRunSchema().bossesStatus=k,this._updated=!0}getRunBossesStatus(){var k;return null!==(k=this.getRunSchema().bossesStatus)&&void 0!==k?k:0}getSeed(){var k;return null!==(k=this.getRunSchema().seed)&&void 0!==k?k:0}setMapObjectCompleted(k,B){const U=this.getMapObjectsID(k),F=this.getPhaseSchema();let j=F.mapObjectStatus;j||(j={},F.mapObjectStatus=j),j[U.objectsIndex]=B?G.OQO.setBit(j[U.objectsIndex],U.bit):G.OQO.clearBit(j[U.objectsIndex],U.bit),this._updated=!0}isMapObjectCompleted(k){const B=this.getPhaseSchema().mapObjectStatus;if(B){const U=this.getMapObjectsID(k),F=B[U.objectsIndex];return!!G.Aq$.isDefined(F)&&G.OQO.isBitSet(F,U.bit)}return!1}setConditionActive(k,B){const U=this.getPhaseSchema();U.conditionStatus||(U.conditionStatus={}),U.conditionStatus[k]=B}isConditionActive(k){const B=this.getPhaseSchema();return!!B.conditionStatus&&B.conditionStatus[k]}getActiveConditions(){const k=this.getPhaseSchema();return k.conditionStatus?Object.keys(k.conditionStatus).filter((B=>k.conditionStatus[B])):[]}startDungeonRun(){const k=this.getRunSchema();k.bossesStatus=0,k.currentMap=null,k.level=this._currentPlayer.getLevel(),k.seed=Date.now(),this.resetPhaseData()}resetPhaseData(){this._data?(this._data.phaseData={},this._updated=!0):G.VyI.log("Dungeon was reset without having data initialized",G.$bb.Warning)}resetRunData(){this._data?(this._data.runData={},this.resetPhaseData(),this._updated=!0):G.VyI.log("Dungeon was reset without having data initialized",G.$bb.Warning)}resetAllData(){this._data?(this._data.persistentData={},this.resetPhaseData(),this.resetRunData(),this._updated=!0):G.VyI.log("Dungeon was reset without having data initialized",G.$bb.Warning)}isValid(){const k=this.getRunSchema();return G.Aq$.isDefined(k.seed)&&G.Aq$.isDefined(k.currentMap)}getMapObjectsID(k){const B=Math.floor(k/32);return{objectsIndex:B,bit:k-32*B}}getPersistentSchema(){return this._data.persistentData||(this._data.persistentData={}),this._data.persistentData}getRunSchema(){return this._data.runData||(this._data.runData={}),this._data.runData}getPhaseSchema(){return this._data.phaseData||(this._data.phaseData={}),this._data.phaseData}};V=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("e20-0fb0")),(0,F.Sn)("design:paramtypes",[Object])],V)},21492:(k,B,U)=>{"use strict";U.d(B,{C:()=>K});var F,G=U(8674),j=U(62459),$=U(79687),H=U(95891),V=U(55110),W=U(87392),q=U(77938);let K=F=class{constructor(k){this.data=null,this.localizer=null,this.localizer=k}init(k){this.data=k}initFromProtobuf(k){this.data=new V.S,this.data.setFirstName(k.first>0?k.first:null),this.data.setMiddleName(k.middle>0?k.middle:null),this.data.setLastName(k.last>0?k.last:null),this.data.setNickname(k.nick>0?k.nick:null)}getName(){return this.validateNameData(),null===this.data.getNickname()?this.getFullName():q.t.getItem("nickname",this.data.getNickname()).data.value.replace("{first}",q.t.getItem("name",this.data.getFirstName()).data.value).replace("{middle}",q.t.getItem("name",this.data.getMiddleName()).data.value).replace("{last}",q.t.getItem("name",this.data.getLastName()).data.value)}getNameWithoutNickname(){return this.validateNameData(),this.getFullName()}getFirstName(){this.validateNameData();const k=this.data.getFirstName();return k>0?q.t.getItem("name",k).data.value:this.getFallbackName()}generateRandomName(){this.data=new V.S,this.data.setFirstName(F.getRandomFirstName()),this.data.setMiddleName(F.getRandomMiddleName()),this.data.setLastName(F.getRandomLastName())}getFullName(){if(j.Aq$.isDefined(this.data.getFirstName())){const k=q.t.getItem("name",this.data.getFirstName()).data.value;if(j.Aq$.isDefined(this.data.getMiddleName())&&j.Aq$.isDefined(null===this.data.getLastName())){const B=`${q.t.getItem("name",this.data.getMiddleName()).data.value}${q.t.getItem("name",this.data.getLastName()).data.value}`;return`${k} ${H.capitalize(B)}`}return k}return this.getFallbackName()}validateNameData(){if(this.data&&this.data.isValid()){j.Aq$.isDefined(this.data.getFirstName())&&0===q.t.getItemsWithFilter("name",(k=>0===k.data.type&&k.ID===this.data.getFirstName())).length&&this.data.setFirstName(F.getRandomFirstName());const k=this.data.getMiddleName(),B=this.data.getLastName(),U=this.data.getNickname();j.Aq$.isDefined(k)&&j.Aq$.isDefined(B)?(0===q.t.getItemsWithFilter("name",(k=>0===k.data.type&&k.ID===this.data.getFirstName())).length&&this.data.setFirstName(F.getRandomFirstName()),0===q.t.getItemsWithFilter("name",(B=>1===B.data.type&&B.ID===k)).length&&this.data.setMiddleName(F.getRandomMiddleName()),0===q.t.getItemsWithFilter("name",(k=>2===k.data.type&&k.ID===B)).length&&this.data.setLastName(F.getRandomLastName()),j.Aq$.isDefined(U)&&0===q.t.getItemsWithFilter("nickname",(k=>k.ID===U)).length&&this.data.setNickname(null)):(this.data.setMiddleName(null),this.data.setLastName(null),this.data.setNickname(null))}else this.generateRandomName()}static getRandomFirstName(){return H.sample(W.f.getFilteredFirstNames()).ID}static getRandomMiddleName(){return H.sample(W.f.getFilteredMiddleNames()).ID}static getRandomLastName(){return H.sample(W.f.getFilteredLastNames()).ID}getData(){return this.data}getFallbackName(){var k;return null!==(k=this._fallbackName)&&void 0!==k?k:this.localizer.getText("FALLBACK_NAME_WIZARD")}setFallbackName(k){this._fallbackName=k}};K=F=(0,G.Cg)([(0,$.injectable)(),(0,G.Qj)(0,(0,$.inject)(j.$Bt.LocalizationService)),(0,G.Sn)("design:paramtypes",[j.dTp])],K)},62901:(k,B,U)=>{"use strict";U.d(B,{r:()=>$});var F=U(8674),G=U(62459),j=U(79687);let $=class{constructor(k){this.first=null,this.last=null,this.nick=null,this.localizer=null,this.localizer=k}init(k,B=null,U=null){this.first=k,this.last=B,this.nick=U}getName(){return G.Aq$.isDefined(this.nick)?this.localizer.getText(this.nick).replace("{first}",this.localizer.getText(this.first)).replace("{last}",this.localizer.getText(this.last)):G.Aq$.isDefined(this.last)?this.getNameWithoutNickname():this.getFirstName()}getNameWithoutNickname(){return`${this.localizer.getText(this.first)} ${this.localizer.getText(this.last)}`}getFirstName(){return G.Aq$.isDefined(this.first)?this.localizer.getText(this.first):""}generateRandomName(){}};$=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)(G.$Bt.LocalizationService)),(0,F.Sn)("design:paramtypes",[G.dTp])],$)},30705:(k,B,U)=>{"use strict";U.d(B,{b:()=>F});class F{static debugGUI(k,B,U,F){}static removeDebugGUI(k){}static setPropertyValue(k,B,U){}}},45373:(k,B,U)=>{"use strict";U(8674),U(79600),U(62459),U(35120),U(34829),U(23748),U(20404),U(44094)},54950:(k,B,U)=>{"use strict";U.d(B,{S:()=>at});var F=U(8674),G=U(62459),j=U(79687),$=U(99625),H=U(5491),V=U(35120),W=U(38443),q=U(77938),K=U(85697),z=U(55800),Y=U(80573),Q=U(52156),X=U(62430),Z=U(9831),J=U(68152),tt=U(80060),et=U(37773),it=U(97317),st=U(65732),nt=U(88022);let at=class{constructor(k){this._prefabLoader=null,this._prefabLoader=k}loadFollowPrefab(k,B,U=null){var F,j;(0,J.v)(B>0,`Invalid follow ID was provided: ${B}`);let H=null;if("legacy"===k)H=this._prefabLoader.loadFromGUID($.l.RealLegacyFollow,U),H.findComponentInChildren(z.a).setFollowID(B);else if("pet"===k){const G=q.t.getItem("pet",B);(0,J.v)(!!G,`Pet with ID '${B}' could not be found`);const j=null!==(F=G.metadata.assets.default)&&void 0!==F?F:G.metadata.assets.reduced;(0,J.v)(!!j,`Pet with ID '${B}' has no default asset defined`),j.type===Z.V.spriteSheet?(H=this._prefabLoader.loadFromGUID($.l.SpritesheetPetFollow,U),H.findComponentInChildren(Q.X).setAsset(B)):(H=this._prefabLoader.loadFromGUID($.l.SpinePetFollow,U),H.findComponentInChildren(X.N).setAssetID(B));const W=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player,K="pet"===k&&!W.kennel.isPetOnTeam(B);tt.d.updateInjectedValues(H,{[st.E.ChargedCreatureEffectTier]:et.e.getActivePlayerChargedLevelTier(),[st.E.ChargedCreatureEffectDisplayType]:et.e.activePlayerHasChargedLevels&&!K?it.X$.IDLE:it.X$.HIDDEN})}else"spine"===k&&(H=this._prefabLoader.loadFromGUID($.l.SpineFollow,U),H.findComponentInChildren(X.N).setAssetID(B));if(!G.o5U.isMobile()){const U="pet"===k?"pet":"follow",F=q.t.getItem(U,B),$=null===(j=null==F?void 0:F.data)||void 0===j?void 0:j.particleEffects;G.Aq$.isDefined($)&&V.q.instance.prodigy.load.assets([nt._.Particles_json],(()=>{for(let k=0;k<$.length;++k)W.d.createParticleEmitter(H,$[k].ID,new G.I9Y($[k].x,$[k].y)).GameObject.sendToBack()}))}return H}loadHitboxAppearancePrefab(k,B,U){(0,J.v)([H.V.Pet,H.V.Dorm,H.V.Follow].indexOf(k)>-1,"Unsupported hitbox appearance type");const F=q.t.getItem(k,B);let G;if(k===H.V.Pet){"spine"===F.metadata.assets.default.type?(G=this._prefabLoader.loadFromGUID($.l.DynamicSpinePet,U),G.findComponentInChildren(X.N).setAssetID(F.ID)):(G=this._prefabLoader.loadFromGUID($.l.DynamicSpritesheetPet,U),G.findComponentInChildren(Q.X).setAsset(F.ID))}else k===H.V.Dorm?(G=this._prefabLoader.loadFromGUID($.l.MorphedSingleImageDorm,U),G.findComponentInChildren(K.o).setDormItemID(F.ID,"vertical")):k===H.V.Follow&&((0,J.v)("legacy"===F.metadata.type||"spine"===F.metadata.type,"Unsupported follower type"),"legacy"===F.metadata.type?(G=this._prefabLoader.loadFromGUID($.l.MorphedLegacyFollow,U),G.findComponentInChildren(z.a).setFollowID(F.ID)):"spine"===F.metadata.type&&(G=this._prefabLoader.loadFromGUID($.l.MorphedSpineFollow,U),G.findComponentInChildren(X.N).setAssetID(F.ID)));return G.findComponentInChildren(Y.n).setData(k,B),G}loadAppearancePrefab(k,B,U){(0,J.v)("pet"===k,"Unsupported appearance type");const F=q.t.getItem(k,B);let G;const j=F.metadata.assets.default;if(j)"spine"===j.type?(G=this._prefabLoader.loadFromGUID($.l.SpinePet,U),G.findComponentInChildren(X.N).setAssetID(F.ID)):(G=this._prefabLoader.loadFromGUID($.l.SpritesheetPet,U),G.findComponentInChildren(Q.X).setAsset(F.ID));else{F.metadata.assets.reduced&&(G=this._prefabLoader.loadFromGUID($.l.SpritesheetPet,U),G.findComponentInChildren(Q.X).setAsset(F.ID,"pet","reduced"))}return G}};at=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("d0e-64fd")),(0,F.Sn)("design:paramtypes",[G.wNP])],at)},52491:(k,B,U)=>{"use strict";U.d(B,{A:()=>V});var F,G=U(8674),j=U(62459),$=U(35120),H=U(28152);let V=F=class extends j.uAl{constructor(){super(...arguments),this._depth=0,this._destroyLayerOnDestroy=!0}create(){super.create();const k=j.wa5.getActiveScene().addLayer(F.LEGACY_MENU_LAYER_NAME,this._depth,!0),B=$.q.instance.prodigy.open;this._previousMenuLayer=B.menuLayer,this._previousMenusGameObject=B.menusGameObject,B.menuLayer=k,this._addedMenuLayer=k,B.menusGameObject=null}destroy(){var k;const B=$.q.instance.prodigy.open,U=B.menuLayer===this._addedMenuLayer;U&&(B.menuLayer=this._previousMenuLayer,B.menusGameObject=this._previousMenusGameObject),this._destroyLayerOnDestroy&&(U?j.wa5.getActiveScene().destroyLayer(F.LEGACY_MENU_LAYER_NAME):null===(k=this._addedMenuLayer)||void 0===k||k.destroy(),delete this._addedMenuLayer),super.destroy()}};V.LEGACY_MENU_LAYER_NAME="legacyMenuLayer",(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],V.prototype,"_depth",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],V.prototype,"_destroyLayerOnDestroy",void 0),V=F=(0,G.Cg)([(0,j.EVk)("BindLegacyMenuLayer",H.Y.ui)],V)},5885:(k,B,U)=>{"use strict";U.d(B,{E:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this.onOpenComplete=new G.HN0}create(){super.create(),this.chestAnimator.OnAnimationComplete.addOnce((()=>{this.chestAnimator.playAnimation("idle",!0),this.inputObject.active=!0,this.guideHandAnimator.GameObject.active=!0,this.guideHandAnimator.play()}),this)}destroy(){this.onOpenComplete.dispose(),this.chestAnimator.OnAnimationComplete.removeAll(this),super.destroy()}open(){this.guideHandAnimator.GameObject.active=!1,this.chestAnimator.playAnimation("open",!1),this.chestAnimator.OnAnimationComplete.addOnce((()=>{this.onOpenComplete.dispatch()}),this)}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onOpenComplete",void 0),(0,F.Cg)([(0,G.MnK)(G.uAl),(0,F.Sn)("design:type",Object)],$.prototype,"chestAnimator",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],$.prototype,"inputObject",void 0),(0,F.Cg)([(0,G.MnK)(G.uAl),(0,F.Sn)("design:type",Object)],$.prototype,"guideHandAnimator",void 0),$=(0,F.Cg)([(0,G.EVk)("BossChest",j.Y.object)],$)},9531:(k,B,U)=>{"use strict";U.d(B,{K:()=>Y});var F=U(8674),G=U(62459),j=U(51742),$=U(35120),H=U(28152),V=U(27812),W=U(31029),q=U(92591),K=U(79825),z=U(30488);let Y=class extends W.u{constructor(){super(...arguments),this.alertSFX=j.c.Sfx_world,this.animationController=null,this._circleTrigger=null,this._waitingForAnimationController=!1,this._skipWalkAnimationOnDelayedRun=!1}update(){super.update(),this._waitingForAnimationController&&this.animationController&&(this.run(this._skipWalkAnimationOnDelayedRun),this._waitingForAnimationController=!1)}run(k=!1){if(!this.animationController)return G.VyI.log("PlayMonsterAlertFSMComponent: Animation controller not ready, waiting for it to be initialized before running.",G.$bb.Warning),this._waitingForAnimationController=!0,void(this._skipWalkAnimationOnDelayedRun=k);const B=!0===k?215:115;this.execute(B,{game:$.q.instance.game,playerLocomotion:this._playerLocomotion,circleTrigger:this._circleTrigger,monsterTransform:this.animationController.GameObject.transform,chatBubble:this._chatBubble,animationController:this.animationController,monsterWalkAnimator:this.monsterWalk,monsterWalkPosition:this._mainPlayer.transform.worldPosition,sfxVolumeType:K.h.BgmSfx})}};(0,F.Cg)([(0,G.Bak)(),(0,F.Sn)("design:type",String)],Y.prototype,"alertSFX",void 0),(0,F.Cg)([(0,G.Cdj)("PlayerLocomotion"),(0,F.Sn)("design:type",G.KhP)],Y.prototype,"_playerLocomotion",void 0),(0,F.Cg)([(0,G.Cdj)("MainPlayerGameObject"),(0,F.Sn)("design:type",G._mx)],Y.prototype,"_mainPlayer",void 0),(0,F.Cg)([(0,G.MnK)(q.K),(0,F.Sn)("design:type",q.K)],Y.prototype,"animationController",void 0),(0,F.Cg)([(0,G.MnK)(z.E),(0,F.Sn)("design:type",z.E)],Y.prototype,"_circleTrigger",void 0),(0,F.Cg)([(0,G.MnK)(V.I),(0,F.Sn)("design:type",V.I)],Y.prototype,"monsterWalk",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Y.prototype,"_chatBubble",void 0),Y=(0,F.Cg)([(0,G.EVk)("PlayMonsterAlertFSM",H.Y.animation)],Y)},72055:(k,B,U)=>{"use strict";U.d(B,{Q:()=>G});var F=U(62459);class G extends F.y4o{constructor(){super(...arguments),this._groupContainer=null}create(){super.create(),this._groupContainer=F.W$e.instance.game.add.container(F.W$e.instance.game.stage),this._groupContainer.name=this.GameObject.name,this.setRootContainer(this._groupContainer)}getDimensions(){return this.GameObject.transform instanceof F.XVE?this.GameObject.transform.rectTransformDimensions:new F.or0(this._groupContainer.width,this._groupContainer.height)}destroy(){this.clearRootContainer(),this._groupContainer&&this._groupContainer.destroy(),this._groupContainer=null,super.destroy()}}},63860:(k,B,U)=>{"use strict";U.d(B,{e:()=>ft});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U.n($),V=U(99625),W=U(96703);var q;U(48417);!function(k){k.School="School",k.Home="Home"}(q||(q={}));var K,z,Y=U(89067),Q=U(90633),X=U(35120),Z=U(73797),J=U(46784),tt=U(41674),et=U(76277),it=U(13956),st=U(40579),nt=U(83634),at=U(30226),rt=U(67665),ot=U(65240),ht=U(96810),ct=U(44094),dt=U(71586);!function(k){k.AfterSchoolWidgetFtueAdvanceCallback="AFTER_SCHOOL_WIDGET_FTUE_ADVANCE_CALLBACK",k.AfterSchoolWidgetFtueCompleteCallback="AFTER_SCHOOL_WIDGET_FTUE_COMPLETE_CALLBACK",k.AfterSchoolWidgetFtueStep="AFTER_SCHOOL_WIDGET_FTUE_STEP"}(K||(K={})),function(k){k.NOT_STARTED="NOT_STARTED",k.STEP_1_WIDGET_INTRO_DIALOGUE="STEP_1_WIDGET_INTRO_DIALOGUE",k.STEP_2_CLICK_ON_GOLD_REWARD="STEP_2_CLICK_ON_GOLD_REWARD",k.STEP_3_COLLECT_GOLD_REWARD="STEP_3_COLLECT_GOLD_REWARD",k.STEP_4_MAGICOIN_REWARD_DIALOGUE="STEP_4_MAGICOIN_REWARD_DIALOGUE",k.STEP_5_CLICK_ON_MAGICOIN_REWARD="STEP_5_CLICK_ON_MAGICOIN_REWARD",k.STEP_6A_DIALOGUE_PLAY_AT_HOME="STEP_6A_DIALOGUE_PLAY_AT_HOME",k.STEP_7A_WAIT_FOR_CLOSE="STEP_7A_WAIT_FOR_CLOSE",k.STEP_8A_COMPLETE="STEP_8A_COMPLETE",k.STEP_6B_COLLECT_MAGICOIN_REWARD="STEP_6B_COLLECT_MAGICOIN_REWARD",k.STEP_7B_DIALOGUE_PLAY_EVERY_DAY="STEP_7B_DIALOGUE_PLAY_EVERY_DAY",k.STEP_8B_COMPLETE="STEP_8B_COMPLETE"}(z||(z={}));class lt{constructor(){this._funnelId=null}static get initialized(){return G.Aq$.isDefined(this._instance)}static get instance(){var k;return null!==(k=this._instance)&&void 0!==k?k:this._instance=new lt}begin(){this._currentStep=0;const k=dt.R.getNowWithServerTimezoneOffset(),B=at.J.isDateWithinSchoolDayAndHours(k);this._stepPath=B?lt.AFTER_SCHOOL_WIDGET_FTUE_STEPS_SCHOOL_HOURS:lt.AFTER_SCHOOL_WIDGET_FTUE_STEPS_HOME_HOURS,this._funnelName=B?"after_school_widget_school_ftue":"after_school_widget_home_ftue",X.q.instance.prodigy.gameContainer.rebind(K.AfterSchoolWidgetFtueAdvanceCallback).toConstantValue(this.advanceFtueStep.bind(this)),X.q.instance.prodigy.gameContainer.rebind(K.AfterSchoolWidgetFtueCompleteCallback).toConstantValue(this.completeFtue.bind(this)),X.q.instance.game.broadcaster.addAppListener(Z.vy.FtueFunnelProgressionStepComplete,this.handFtueFunnelProgressionStepComplete,this,void 0),this.advanceFtueStep(),this.sendFtueFunnelStep(1)}handFtueFunnelProgressionStepComplete(k){this.sendFtueFunnelStep(k)}advanceFtueStep(){this._currentStep++,this._currentStep>=this._stepPath.length?G.VyI.log("AfterSchoolWidgetFtueTracker: FTUE session reached the end of the path",G.$bb.Info):(X.q.instance.prodigy.gameContainer.rebind(K.AfterSchoolWidgetFtueStep).toConstantValue(this._stepPath[this._currentStep]),X.q.instance.game.broadcaster.broadcast(Z.vy.FtueStepAdvanced,void 0,[this._stepPath[this._currentStep]]),G.VyI.log(`Advancing FTUE step: ${this._stepPath[this._currentStep]}`,G.$bb.Info))}completeFtue(){G.VyI.log("AfterSchoolWidgetFtueTracker: FTUE session completed",G.$bb.Info),X.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(Q.B.FEATURE_AFTER_SCHOOL_WIDGET,Q.B.BREADCRUMB_AFTER_SCHOOL_WIDGET_FTUE_COMPLETED),this.destroy()}sendFtueFunnelStep(k){const B="after_school_widget_school_ftue"===this._funnelName?lt.FUNNEL_STEPS_SCHOOL_HOURS:lt.FUNNEL_STEPS_HOME_HOURS;if(k<1||k>B.length)return void G.VyI.log(`AfterSchoolWidgetFtueTracker: Invalid funnel step index ${k}`,G.$bb.Warning);G.Aq$.isDefined(this._funnelId)||(k>1&&G.VyI.log(`AfterSchoolWidgetFtueTracker: Funnel step ${k} send without starting funnel`,G.$bb.Warning),this._funnelId=ct.$.generateUID());const U=X.q.instance.prodigy.gameContainer.get("c47-20b6"),F={funnelType:"tutorial",funnelName:this._funnelName,funnelId:this._funnelId,stepName:B[k-1],stepIndex:k};U.playerProgression.sendAfterSchoolWidgetFunnelAdvancedEvent(F)}destroy(){this._funnelId=null,X.q.instance.game.broadcaster.removeAppListener(Z.vy.FtueFunnelProgressionStepComplete,this,void 0),X.q.instance.prodigy.gameContainer.unbind(K.AfterSchoolWidgetFtueAdvanceCallback),X.q.instance.prodigy.gameContainer.unbind(K.AfterSchoolWidgetFtueStep),lt._instance=null}}lt.AFTER_SCHOOL_WIDGET_FTUE_STEPS_SCHOOL_HOURS=[z.NOT_STARTED,z.STEP_1_WIDGET_INTRO_DIALOGUE,z.STEP_2_CLICK_ON_GOLD_REWARD,z.STEP_3_COLLECT_GOLD_REWARD,z.STEP_4_MAGICOIN_REWARD_DIALOGUE,z.STEP_5_CLICK_ON_MAGICOIN_REWARD,z.STEP_6A_DIALOGUE_PLAY_AT_HOME,z.STEP_7A_WAIT_FOR_CLOSE,z.STEP_8A_COMPLETE],lt.AFTER_SCHOOL_WIDGET_FTUE_STEPS_HOME_HOURS=[z.NOT_STARTED,z.STEP_1_WIDGET_INTRO_DIALOGUE,z.STEP_2_CLICK_ON_GOLD_REWARD,z.STEP_3_COLLECT_GOLD_REWARD,z.STEP_4_MAGICOIN_REWARD_DIALOGUE,z.STEP_5_CLICK_ON_MAGICOIN_REWARD,z.STEP_6B_COLLECT_MAGICOIN_REWARD,z.STEP_7B_DIALOGUE_PLAY_EVERY_DAY,z.STEP_8B_COMPLETE],lt.FUNNEL_STEPS_SCHOOL_HOURS=[ht.h.AfterSchoolWidgetHUDButtonHighlighted,ht.h.AfterSchoolWidgetHUDButtonClicked,ht.h.AfterSchoolWidgetNootExplainsDailyGift,ht.h.AfterSchoolWidgetPlayerAdvancesToRewardScreen,ht.h.AfterSchoolWidgetPlayerCollectsSchoolReward,ht.h.AfterSchoolWidgetNootExplainsHowToGetMagicoin,ht.h.AfterSchoolWidgetPlayerReturnsToRewardScreen,ht.h.AfterSchoolWidgetPlayerClicksCollectAtHomeButton,ht.h.AfterSchoolWidgetNootOopsDialog,ht.h.AfterSchoolWidgetCollectMagicoinTooltipShown,ht.h.AfterSchoolWidgetNootRemindsPlayersToReturnAfterSchool,ht.h.AfterSchoolWidgetTutorialComplete],lt.FUNNEL_STEPS_HOME_HOURS=[ht.h.AfterSchoolWidgetHUDButtonHighlighted,ht.h.AfterSchoolWidgetHUDButtonClicked,ht.h.AfterSchoolWidgetNootExplainsDailyGift,ht.h.AfterSchoolWidgetPlayerAdvancesToRewardScreen,ht.h.AfterSchoolWidgetPlayerCollectsSchoolReward,ht.h.AfterSchoolWidgetNootExplainsHowToGetMagicoin,ht.h.AfterSchoolWidgetPlayerReturnsToRewardScreen,ht.h.AfterSchoolWidgetPlayerCollectsHomeReward,ht.h.AfterSchoolWidgetNootRemindsPlayersToReturnDaily,ht.h.AfterSchoolWidgetCollectMagicoinTooltipShownAtHome,ht.h.AfterSchoolWidgetTutorialComplete];var ut=U(85985);let ft=class{constructor(){this.onSchoolRewardStateSet=new G.HN0,this.onHomeRewardStateSet=new G.HN0,this.onDataSet=new G.HN0,X.q.instance.game.state.onStateChange.add(this.updateHudButton.bind(this)),X.q.instance.game.broadcaster.addAppListener(Z.Y1.HUDRevampButtonAttentionGranted,this.handleHudRevampButtonAttentionGranted.bind(this),this,void 0,!0)}handleHudRevampButtonAttentionGranted(k){var B;k===Y.ts.AfterSchoolWidget&&this.isFtueAvailable()&&(lt.initialized&&(null===(B=lt.instance)||void 0===B||B.destroy()),lt.instance.begin())}openAfterSchoolWidgetRewardsScreenFromHud(){lt.initialized&<.instance.sendFtueFunnelStep(2),X.q.instance.prodigy.open.prefabMenu(V.l.AfterSchoolWidgetRewardsScreen,void 0,void 0,void 0,void 0,void 0,{interfaceName:J.B.AfterSchoolWidget,interfaceType:tt.Wm.Modal,instanceType:"reward",originType:tt.$N.ButtonClick,custom:{item_list:{home_reward:JSON.stringify(this._cachedRewardStatus.homeReward),school_reward:JSON.stringify(this._cachedRewardStatus.schoolReward)}}},!0)}isFtueAvailable(){return!!G.Aq$.isDefined(this._cachedRewardStatus)&&((0,et.G)(W.K).enabled&&"Available"===ut.J.calculateSchoolState()&&"Collected"!==ut.J.calculateHomeState()&&!X.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Q.B.FEATURE_AFTER_SCHOOL_WIDGET,Q.B.BREADCRUMB_AFTER_SCHOOL_WIDGET_FTUE_COMPLETED))}setData(k){this._cachedRewardStatus=k,this.refreshDataOnExpiration(),this.setHomeState(),this.setSchoolState(),this.updateHudButton(),this.onDataSet.dispatch(k)}getData(){return H().cloneDeep(this._cachedRewardStatus)}setHomeState(k=ut.J.calculateHomeState()){const B=this.getData(),U=Date.now();let F=0;switch(k){case"Locked":F=B.homeRewardWindow.start;break;case"Collected":F=B.homeRewardWindow.lockedStart}if(F>U){const k=F-U;this._homeRewardTimeout&&clearTimeout(this._homeRewardTimeout),this._homeRewardTimeout=setTimeout((()=>this.setHomeState()),k)}this.homeRewardState!==k&&(this.homeRewardState=k,this.onHomeRewardStateSet.dispatch(k))}setSchoolState(k=ut.J.calculateSchoolState()){this.schoolRewardState!==k&&(this.schoolRewardState=k,this.onSchoolRewardStateSet.dispatch(k))}refreshDataOnExpiration(){var k,B;const{homeRewardWindow:U,schoolRewardWindow:F}=this.getData(),j=Date.now(),$=Math.max(null!==(k=U.end)&&void 0!==k?k:0,null!==(B=F.end)&&void 0!==B?B:0)-j;$>0&&(this._dataExpirationTimeout&&clearTimeout(this._dataExpirationTimeout),this._dataExpirationTimeout=setTimeout((()=>{this.refreshData().catch((k=>{G.VyI.log(`AfterSchoolWidgetService: Caught Error - ${G.RQr.stringify(k)}`,G.$bb.Verbose)}))}),$))}refreshData(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this._afterSchoolWidgetNetworkHandler.getRewardStatus();this.setData(k)}))}updateHudButton(){var k,B;if(!(0,et.G)(W.K).enabled)return;if(!G.Aq$.isDefined(this._cachedRewardStatus))return void G.VyI.log("AfterSchoolWidgetService: Reward status not yet fetched",G.$bb.Error);if(!G.Aq$.isDefined(this._hudService))return void G.VyI.log("AfterSchoolWidgetService: HUD service not initialized",G.$bb.Error);const U=this._cachedRewardStatus.homeRewardWindow,F=this._cachedRewardStatus.schoolRewardWindow,j=Math.min(null!==(k=F.start)&&void 0!==k?k:1/0,null!==(B=U.start)&&void 0!==B?B:1/0)-Date.now();j<=0?this.showCollectableRewardLabel():this._hudService.updateCachedLabelData(Y.ts.AfterSchoolWidget,{labelValue:j,pillColour:"#DB1E75"}),this._hudButtonTimeout&&clearTimeout(this._hudButtonTimeout),this._hudButtonTimeout=setTimeout(this.showCollectableRewardLabel.bind(this),j)}showCollectableRewardLabel(){const k=X.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);this._hudService.updateCachedLabelData(Y.ts.AfterSchoolWidget,{labelValue:k.getText("PLUS_ULTRA_BONUS_COLLECT"),pillColour:"#098E00"})}claimSchoolReward(){return(0,F.sH)(this,void 0,void 0,(function*(){this.setSchoolState("Collected");try{const k=yield this._afterSchoolWidgetNetworkHandler.claimReward(q.School);if(k.amount){const B={ID:k.ID,type:k.type,N:k.amount};at.J.bagItem(B,X.q.instance.game,"got-item",void 0,{source_type:ot.C.AfterSchoolWidget,sink_type:ot.C.AfterSchoolWidget})}return yield this.refreshData(),!0}catch(k){return G.VyI.log(`AfterSchoolWidgetRewardsComponent: Caught Error - ${G.RQr.stringify(k)}`,G.$bb.Verbose),!1}}))}claimHomeReward(){return(0,F.sH)(this,void 0,void 0,(function*(){this.setHomeState("Collected");try{const k=this._segment.item.beginSecureItemTransaction();return yield this._afterSchoolWidgetNetworkHandler.claimReward(q.Home),k.flush({transaction_id:"AfterSchoolWidget",source_type:ot.C.AfterSchoolWidget,sink_type:ot.C.AfterSchoolWidget}),yield this.refreshData(),!0}catch(k){return G.VyI.log(`AfterSchoolWidgetRewardsComponent: Caught Error - ${G.RQr.stringify(k)}`,G.$bb.Verbose),!1}}))}};(0,F.Cg)([(0,it.b)("2a3-4b97"),(0,F.Sn)("design:type",nt.Z)],ft.prototype,"_afterSchoolWidgetNetworkHandler",void 0),(0,F.Cg)([(0,it.b)("c47-20b6"),(0,F.Sn)("design:type",rt.Y)],ft.prototype,"_segment",void 0),(0,F.Cg)([(0,it.b)("cc9-a3f0"),(0,F.Sn)("design:type",st.W)],ft.prototype,"_hudService",void 0),ft=(0,F.Cg)([(0,j.injectable)(),(0,F.Sn)("design:paramtypes",[])],ft)},85985:(k,B,U)=>{"use strict";U.d(B,{J:()=>V});var F=U(8674),G=U(79687),j=U(35120),$=U(96703),H=U(76277);let V=class{static calculateSchoolState(){const k=j.q.instance.prodigy.gameContainer.get("e94-c727").getData();return Date.now()>=k.schoolRewardWindow.start?"Available":"Collected"}static calculateHomeState(){const k=j.q.instance.prodigy.gameContainer.get("e94-c727").getData(),B=Date.now();return B>=k.homeRewardWindow.start?"Available":B>=k.homeRewardWindow.lockedStart?"Locked":"Collected"}static showDailyLoginCalendar(){const k=(0,H.G)($.K);return!((null==k?void 0:k.enabled)&&(null==k?void 0:k.replaceLoginCalendar))}};V=(0,F.Cg)([(0,G.injectable)()],V)},52743:(k,B,U)=>{"use strict";U.d(B,{Z:()=>V});var F=U(8674),G=U(62459),j=U(79687),$=U(15821),H=U(35120);let V=class{constructor(){this.onBannerQueueUpdated=new G.HN0,this._nextBannerId=0,this._bannerRegistry=new Map,this._bannerStack=[],this._bannersToDelete=[]}processBannerDelete(){if(this._bannersToDelete.length>0){this._bannerStack=this._bannerStack.filter((k=>!this._bannersToDelete.includes(k.id)));for(const k of this._bannersToDelete)this._bannerRegistry.delete(k);this._bannersToDelete=[],this.onBannerQueueUpdated.dispatch(this._bannerStack)}}postBanner(k){const B=this._nextBannerId,U=Object.assign({id:B},k);return this._bannerRegistry.has(B)||this._bannerStack.push(U),this._bannerRegistry.set(B,U),this.onBannerQueueUpdated.dispatch(this._bannerStack),this._nextBannerId++,B}deleteBanner(k){this._bannersToDelete.includes(k)||(0===this._bannersToDelete.length&&H.q.instance.game.app.ticker.addOnce(this.processBannerDelete.bind(this)),this._bannersToDelete.push(k))}updateBanner(k,B){const U=this._bannerRegistry.get(k);$.A.isDefined(U)&&(Object.entries(B).forEach((([k,B])=>{U[k]=B})),this.onBannerQueueUpdated.dispatch(this._bannerStack))}getStack(){return[...this._bannerStack]}};V=(0,F.Cg)([(0,j.injectable)()],V)},71543:(k,B,U)=>{"use strict";U.d(B,{p:()=>z});var F=U(8674),G=U(62459),j=U(28628),$=U(24652),H=U(35120),V=U(23082),W=U(13956),q=U(14117);const K=[33,34,35,36,38,39,40,41,42,43,44,45,46,47];class z{static resumeBattle(){var k,B,U,F,W;if(!z.canResumeBattle())return!1;const q=this._activePlayer.battleResumeData;if(!G.Aq$.isDefined(q)){return!!(null===(k=z._riftsSyncedDataStore.cache)||void 0===k?void 0:k.currentRiftRunProgress)&&(H.q.instance.game.state.get(V.G.Rifts).resumeRiftRun(!1),this._activePlayer.battleResumeData=void 0,!0)}if(!G.Aq$.isDefined(q.battleType)||!j.Mb.includes(q.battleType))return!1;if(q.nextBattleIsResume=!0,q.battleType===j.gu.NormalRiftRun){const k=null===(B=z._riftsSyncedDataStore.cache)||void 0===B?void 0:B.currentRiftRunProgress;return k?k.type!==$.cn.Normal?(q.nextBattleIsResume=!1,!1):(H.q.instance.game.state.get(V.G.Rifts).resumeRiftRun(G.Aq$.isDefined(k.chosenOpponentTeamIndex)),!0):(q.nextBattleIsResume=!1,!1)}if(void 0!==(null===(U=q.data)||void 0===U?void 0:U.battleTriggerData))return H.q.instance.prodigy.game.input.enabled=!1,H.q.instance.prodigy.world.it(q.data.battleTriggerData.encounterMap,null===(F=q.data.battleTriggerData)||void 0===F?void 0:F.encounterPosition.x,null===(W=q.data.battleTriggerData)||void 0===W?void 0:W.encounterPosition.y),!0;const K={},Y=k=>{H.q.instance.prodigy.world.it(H.q.instance.prodigy.world.getCurrentMap(),void 0,void 0,{battleResult:k})};return H.q.instance.prodigy.battle.start(K,(()=>Y(j.XK.Escape)),(()=>Y(j.XK.Victory)),(()=>Y(j.XK.Defeat)),K.onFaint),!0}static canResumeBattle(){return!!this._activePlayer.hasCompletedTutorial()}static shouldStoreTriggerDataWithBattle(k){var B;if(!0===k.isQuestEncounter)return!0;if(G.Aq$.isDefined(k.boss))return!0;if("QuestBattle"===H.q.instance.prodigy.battle.battleStats.type)return!0;return!!(null!==(B=k.opponent)&&void 0!==B?B:[]).some((k=>{var B,U;return K.includes(null!==(U=null===(B=k.data)||void 0===B?void 0:B.ID)&&void 0!==U?U:-1)}))}}(0,F.Cg)([(0,W.b)("306-5359"),(0,F.Sn)("design:type",Function)],z,"_activePlayer",void 0),(0,F.Cg)([(0,W.b)("9ac-9677"),(0,F.Sn)("design:type",q.M)],z,"_riftsSyncedDataStore",void 0)},50503:(k,B,U)=>{"use strict";U.d(B,{A:()=>Y});var F,G=U(62459);!function(k){k.DamageBonus="damage",k.BonusCriticalHitChance="critChance",k.HealthBonus="health",k.DamageReduction="damageReduction",k.ElementalDamageResistance="elementalResistance"}(F||(F={}));class j{static isElementalPotionAffix(k){return j.ELEMENTAL_POTION_AFFIXES.indexOf(k.type)>-1}static isOffensivePotion(k){return j.OFFENSIVE_POTION_TYPES.indexOf(k.affix.type)>-1}static isDefensivePotion(k){return j.DEFENSIVE_POTION_TYPES.indexOf(k.affix.type)>-1}}j.ELEMENTAL_POTION_AFFIXES=[F.ElementalDamageResistance],j.OFFENSIVE_POTION_TYPES=[F.DamageBonus,F.BonusCriticalHitChance],j.DEFENSIVE_POTION_TYPES=[F.DamageReduction,F.ElementalDamageResistance];var $=U(35120),H=U(34829),V=U(40549),W=U(77938),q=U(23748),K=U(55122),z=U(94393);class Y{static getStrengths(k){return this.weakList[k]}static getWeaknesses(k){return this.strongList[k]}static getElementsStrongAgainst(k){const B=[];for(const U in this.strongList)this.strongList[U].indexOf(k)>-1&&B.push(U);return B}static isWeakAgainst(k,B){return!!G.Aq$.isDefined(Y.weakList[k])&&Y.weakList[k].indexOf(B)>-1}static isStrongAgainst(k,B){return!!G.Aq$.isDefined(Y.strongList[k])&&Y.strongList[k].indexOf(B)>-1}static rollMissChance(k,B=0){const U=H.A.get("GameConstants.Battle.ENEMY_ACCURACY_OVERRIDE");if(G.Aq$.isDefined(U)&&U>=0)return Math.random()>=U;const F=q.z.clampedLerp(this.missDifficultyRange[0],this.missDifficultyRange[1],k/Y.MAX_DIFFICULTY);return Math.random()0,elementAdvantage:K.elementAdvantage,nFactor:1,miss:!1};G.Aq$.isDefined(K.nFactor)&&(Z.nFactor=K.nFactor);const J=H.A.get("GameConstants.Battle.ATTACK_DAMAGE_OVERRIDE");if(G.Aq$.isDefined(J))return Z.damage=J,Z;const tt=G.Aq$.isDefined(U.modifiers.takenDamageMultiplier)?U.modifiers.takenDamageMultiplier:1;return Z.damage=K.damage*(K.elementAdvantage+X+z+Q+this.nFactorMap[K.nFactor]+K.damageModifiers+1)*tt,Z.damage=Math.round(Z.damage),Z}static getLevel1Hp(k){return this.hpMidValue/this.hpStatRange*Math.pow(Math.pow(this.hpStatRange,.25),k-1)}static getHpInc(k){return this.hpMidIncrement/this.hpStatRange*Math.pow(Math.pow(this.hpStatRange,.25),k-1)}static calculateSpellDamage(k,B,U){var F;const G=k.getStatPower(),j=k.getLevel(),$=null!==(F=W.t.getItem("spell",U).data.tier)&&void 0!==F?F:1,H=this.getLevel1Hp(G),V=this.getHpInc(G),q=1/this.hitsPerKillLevel1*H;return(q+q/(99/((H+99*V)/this.hitsPerKillLevel100/this.spellTierMultipliers[2]/q-1))*(j-1))*this.spellTierMultipliers[$-1]}static getTypeAdvantage(k,B){return Y.isStrongAgainst(k.element,B.getElement())?.2:Y.isWeakAgainst(k.element,B.getElement())?-.2:0}static applyModifiers(k,B,U,$){var H,q,K,z;const Y=U.modifiers,Q=$.modifiers;if(G.Aq$.isDefined(Y)){if(G.Aq$.isDefined(Y.potion)&&0!==Y.potion){const B=W.t.getItem("item",Y.potion).data;if(V.r.isPotionConsumable(B)){const U=B.affix,G=U.type;G===F.BonusCriticalHitChance?k.criticalChance=U.amount:G===F.DamageBonus&&(k.damageModifiers+=U.amount)}}G.Aq$.isDefined(Y.damage)&&(k.damageModifiers+=Y.damage-1),k.elementAdvantage*=null!==(q=null===(H=Y.elementalAdvantageMultipliers)||void 0===H?void 0:H.outgoing)&&void 0!==q?q:1}if(G.Aq$.isDefined(Q)){if(G.Aq$.isDefined(Q.potion)&&0!==Q.potion){const B=W.t.getItem("item",Q.potion).data;if(V.r.isPotionConsumable(B)){const U=B.affix,G=U.type;j.isElementalPotionAffix(U)&&G===F.ElementalDamageResistance?U.elements.indexOf(k.attackElementType)>-1&&(k.elementAdvantage-=U.amount):G===F.DamageReduction&&(k.damageModifiers-=U.amount)}}G.Aq$.isDefined(Q.ignoreElement)&&Q.ignoreElement>0&&(k.elementAdvantage=Math.min(k.elementAdvantage,0)),k.elementAdvantage*=null!==(z=null===(K=Q.elementalAdvantageMultipliers)||void 0===K?void 0:K.incoming)&&void 0!==z?z:1}return G.Aq$.isDefined(B)&&(G.Aq$.isDefined(B.dmgMod)&&(k.damageModifiers+=B.dmgMod),G.Aq$.isDefined(B.nFactor)&&(k.nFactor=B.nFactor)),k}static getBestAttack(k,B,U,F){if(k.length<=0)return null;const G=[];for(let $=0;$B.dmg-k.dmg));let j=G[G.length-1].ID;for(let $=0;$F){j=G[$].ID;break}return j}static getEnemyLevel(k,B){return G.cj9.clamp(Math.round(((this.hpMidValue+this.hpMidIncrement*(k-1))/this.difficultyHitsToKill[B]*3-this.hpMidValue)/this.hpMidIncrement)+1,K.s.minLevel,K.s.activePlayerLevelCap)}static getAllOutAttackDamage(k,B,U){let F=1;return F=U?Y.allOutAttackBossDamage[B.aoaTier][k.getLiving().length]:Y.allOutAttackDamage[B.aoaTier][k.getLiving().length],G.Aq$.isDefined(B.modifiers.takenDamageMultiplier)&&(F*=B.modifiers.takenDamageMultiplier),{damage:B.getMaxHearts()*F,critical:!1,elementAdvantage:0,nFactor:1,miss:!1}}static calculateXP(k,B){const U=k*($.q.instance.prodigy.gameContainer.get("12b-405a").getMultiplier(B,z.R.Xp)-1),F=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasValidatedParentEmail()?k*H.A.get("GameConstants.Battle.VALID_PARENT_EMAIL_STARS_PERCENTAGE"):0,G=k*H.A.get("GameConstants.Battle.MEMBER_STARS_PERCENTAGE"),j=k+U+F;return{baseXp:Math.ceil(k),memberXp:Math.ceil(G),totalNonMemberXp:Math.ceil(j)}}}Y.ALL_OUT_ATTACK_ENERGY_COST=10,Y.MAX_DIFFICULTY=10,Y.AI_SWITCH_COOLDOWN=1,Y.criticalChance=.05,Y.criticalBonus=.15,Y.randomBaseRange=[-.01,.01],Y.nFactorMap=[-1,0,0,.15,.3,.5,1,1.5,1.5,1.5,1.5],Y.hitsPerKillLevel1=3,Y.hitsPerKillLevel100=3,Y.spellTierMultipliers=[1,1.2,1.4],Y.missDifficultyRange=[.35,.25],Y.difficultyHitsToKill={0:4,1:3.6,2:3.5,3:3.4,4:3.3,5:3.2,6:3.1,7:3,8:3,9:3,10:3},Y.xpConstant=1.042,Y.hpMidValue=500,Y.hpMidIncrement=100,Y.hpStatRange=1.25,Y.hpMaxStat=9,Y.strongList={fire:["ice","earth","plant","ice & fire"],water:["fire","ice & fire"],earth:["water"],plant:["water"],storm:["water"],mech:["water"],ice:["storm","mech"],shadow:["fire","water","earth","plant","storm","mech","ice"],wizard:["shadow"],astral:["shadow"]},Y.weakList={fire:["water","fire","shadow"],water:["earth","plant","storm","mech","water","shadow"],earth:["fire","ice & fire","earth","plant","shadow"],plant:["fire","ice & fire","plant","earth","shadow"],storm:["ice","ice & fire","storm","mech","shadow"],mech:["ice","ice & fire","mech","storm","shadow"],ice:["fire","ice & fire","ice","shadow"],shadow:["wizard","astral"],wizard:[],astral:[]},Y.allOutAttackDamage={1:{1:.34,2:.67,3:1},2:{1:.2,2:.3,3:.4}},Y.allOutAttackBossDamage={1:{1:.2,2:.3,3:.5},2:{1:.2,2:.3,3:.4}}},8693:(k,B,U)=>{"use strict";var F;U.d(B,{J:()=>F}),function(k){k.Miss="miss",k.Hit="normal-hit",k.CriticalHit="critical-hit",k.Cast="cast"}(F||(F={}))},50084:(k,B,U)=>{"use strict";U.d(B,{n:()=>Et,a:()=>wt});var F,G=U(8674),j=U(62459),$=U(95891),H=U.n($),V=U(62248),W=U(99625),q=U(56942);!function(k){k[k.AddNewPet=0]="AddNewPet",k[k.RemovePet=1]="RemovePet",k[k.PurchaseStandardBundle=2]="PurchaseStandardBundle"}(F||(F={}));var K=U(223),z=U(62886),Y=U(60157),Q=U(90633),X=U(5491),Z=U(65240),J=U(35120),tt=U(43846),et=U(77938),it=U(73797),st=U(75017),nt=U(51972),at=U(76277),rt=U(10670),ot=U(96810),ht=U(41674),ct=U(64353),dt=U(95057),lt=U(53661),ut=U(22023),ft=U(30226),bt=U(47255),pt=U(55122),vt=U(70760),gt=U(7247),mt=U(86283),yt=U(87490);const _t=Symbol();var Et;!function(k){k[k.CannotAfford=0]="CannotAfford"}(Et||(Et={}));class wt{constructor(k,B){this.onQuestionOpen=new j.HN0,this.onQuestionClose=new j.HN0,this.onRescueContinue=new j.HN0,this.onRescueDismissed=new j.HN0,this.onRescueFailed=new j.HN0,this.game=k,B&&(this._unitComponent=B,this._unitContainer=B.creature,this.creatureAssetID=B.creature.id),this.localizer=J.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService)}start(){const k=et.t.getItem("pet",this.creatureAssetID),B=J.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=J.q.instance.prodigy.gameContainer.get("5c7-e02d"),F=U.petAcquisitionCost(k.ID,V.l6.Rescue),G=U.canAfford(F),j=J.q.instance.prodigy.gameContainer.get("c47-20b6");j.playerProgression.sendPetHardCurrencyFunnelAdvancedEventIfApplicable(V.l6.Rescue,ot.l.PetHardCurrencyIntention,k.ID),mt.D.isFree(J.q.instance.prodigy.breadcrumbManager)?this.continueToRescueConfirmation():mt.D.isKennelFull(B)?B.hasMembership()?this.kennelFullPopup():this.catchMorePetsPopup():G?this.continueToRescueConfirmation():(j.item.sendInsufficientCurrencyEvent(F,{sink_type:Z.C.PetRescue,sink_id:k.ID}),(0,at.G)(K.l).enabled||(B.hasMembership()?this.onRescueFailed.dispatch(Et.CannotAfford):this.showInsufficientResourcePopup(k,this._unitContainer)))}catchMemberPetPopup(k=!1){const B={conversionFunnelName:k?bt.o.FunnelCatchEvolvedPet:bt.o.FunnelCatchMemberLockedPet,conversionFunnelMetadata:this.creatureAssetID},U=ft.J.showYouTubeMembershipAd(this.game,!0)?dt.R.Video:dt.R.Static;J.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:k?"Catch-Evolved-Pet":"Catch-Member-Locked-Pet",category:"Pet",contentId:`pet-${this.creatureAssetID}`,adType:U}),this.showMemberAd(B,st.p.MEMBER_PETS)}showMemberAd(k,B){var U;const F=J.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(ft.J.shouldSuppressAd(F,void 0)){const k={bodyText:null,xPosition:1340,yPosition:720,arrowXRelPos:1.1,arrowDirection:nt.i.DOWN};J.q.instance.prodigy.open.memberAdSuppressionToolTip(k,!1,!1).onDismissalClick.add((()=>{this.onRescueDismissed.dispatch()}))}else{const B=null===(U=et.t.getItem("pet",this.creatureAssetID))||void 0===U?void 0:U.data;let F=null;j.Aq$.isDefined(B)&&(F=J.q.instance.prodigy.open.unifiedConversionFlow((()=>{J.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelQuit("Click-Membership","Close-Clicked"),this.recheckCriteria()}),k,void 0,{CONTEXTUAL_CHASE_PET_SPINE_GUID:q.Q[`Spine_pet_${this.creatureAssetID}_json`],CONTEXTUAL_CHASE_PET_NAME:B.name})),j.Aq$.isDefined(F)||J.q.instance.prodigy.open.membershipInfo((()=>{this.recheckCriteria()}),k)}this.sendPetCapturedFailedSegmentEvent("Member Locked")}catchMorePetsPopup(){const k={conversionFunnelName:bt.o.FunnelCatchMorePets,conversionFunnelMetadata:this.creatureAssetID},B=ft.J.showYouTubeMembershipAd(this.game,!0)?dt.R.Video:dt.R.Static;J.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:"Pet-Limit",category:"Pet",contentId:`pet-${this.creatureAssetID}`,adType:B}),this.showMemberAd(k,st.p.MEMBER_PETS)}recheckCriteria(){J.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasMembership()?this.start():this.onRescueDismissed.dispatch()}kennelFullPopup(){J.q.instance.prodigy.open.messageBoxPrefab({title:"MESSAGE_TITLE_UH_OH",text:"TOO_MANY_PETS",confirmCallback:()=>{this.onRescueDismissed.dispatch()}}),this.sendPetCapturedFailedSegmentEvent("Full Kennel")}showPetSlotsFullPopup(){J.q.instance.prodigy.open.prefabMenu(W.l.Rescue_AtHardCapTooltip,(()=>{this.onRescueDismissed.dispatch()}),void 0,!1).skipRenderTransparencyLayer=!0}showUpsellPopup(k,B=0){const U=J.q.instance.prodigy.gameContainer.get("c47-20b6");U.purchase.sendFunnelStart({type:"Pet-Hard-Currency-Insufficient-Resources-Rescue",category:"Pet",adType:dt.R.UnifiedConversionFlow,contentId:`${k.type}-${k.ID}`,adVersion:ct.P.getAdVersion(bt.o.FunnelNotEnoughCurrency)});const F=this.getMembershipConversionAwareModalResultHandler(this._unitContainer,(()=>{U.purchase.sendFunnelQuit("Click-Membership","Close-Clicked")}));J.q.instance.prodigy.open.unifiedConversionFlow(F,{conversionFunnelName:bt.o.FunnelNotEnoughCurrency},{type:ht.$N.Battle,id:U.battle.currentBattleID},{[lt.FK.OtpMissingMagicoin]:B})}continueToRescueConfirmation(){const k=wt.getTaskEventData(this.creatureAssetID);wt.sendQuestRescueEvent(k),wt.setCooldownsOnRescue(k),this.onRescueContinue.dispatch()}static getTaskEventData(k){var B;const U=null===(B=et.t.getItem("pet",k))||void 0===B?void 0:B.data;return{params:{taskEventType:Y.Z7.Pet,rarity:U.rarity,itemType:"pet",source:Z.C.PetRescue,id:k,element:U.affinity,level:U.level}}}static sendQuestRescueEvent(k){J.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(z.T.RESCUE_PET,k).catch(j.RQr.createHandler("Error sending a quest event for rescuing a pet"))}static rescuePet(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){const G=ut.P8.showUniquePetsFeature()?this.RESCUED_PET_LEVEL:Math.min(B.level,ut.P8.getMaxOwnableLevel(B.id)),$={type:"pet",ID:B.id,N:1,data:{level:G,stars:pt.s.xpRequiredForLevel(G,X.V.Pet),nickname:B.nickname}},H=()=>{ft.J.bagItem($,J.q.instance.game,"on-catch-pet",void 0,{source_type:Z.C.PostBattle,sink_type:Z.C.PetRescue,transaction_id:U})};if(k)H();else{const k=J.q.instance.prodigy.gameContainer.get("5c7-e02d"),G=k.petAcquisitionCost($.ID,V.l6.Rescue);try{yield k.spend(null!=G?G:F,{sink_type:Z.C.PetRescue,sink_id:B.id,transaction_id:U})}catch(q){return void j.RQr.logError(q,"Post battle: Not enough Magicoin to rescue pet")}H()}wt.grantUnlockFollow($.ID,U,Z.C.PostBattle),G0||ft.J.bagItem({type:"follow",ID:$},J.q.instance.game,"on-catch-pet",void 0,{source_type:U,transaction_id:B})}static setCooldownsOnRescue(k){const B=j.wa5.getActiveScene().container.get("BattleController");if(!j.Aq$.isDefined(B.battleCooldownConfig))return;if(!B.battleCooldownConfig.onAction.includes(yt.EBattleAction.RescuePet))return;if(j.Aq$.isDefined(B.battleCooldownConfig.actionRestrictions[yt.EBattleAction.RescuePet])&&B.battleCooldownConfig.actionRestrictions[yt.EBattleAction.RescuePet].type===gt.i.PET_RESTRICTIONS){const U=new vt.F;if(j.Aq$.isDefined(k.params)&&!U.isReady(B.battleCooldownConfig.actionRestrictions[yt.EBattleAction.RescuePet].data,k.params))return}const U=J.q.instance.prodigy.gameContainer.get("e67-6525");"number"==typeof B.battleCooldownConfig.duration?U.setCooldownFromNow(B.battleCooldownConfig.id,B.battleCooldownConfig.duration).catch(j.RQr.createHandler("Error setting cooldown via number after rescue")):U.setCooldownFromCategory(B.battleCooldownConfig.id,B.battleCooldownConfig.duration).catch(j.RQr.createHandler("Error setting cooldown via category after rescue"))}static receivePet(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=J.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=ut.P8.showUniquePetsFeature()?this.RESCUED_PET_LEVEL:Math.min(k.level,ut.P8.getMaxOwnableLevel(k.id)),$={type:"pet",ID:k.id,N:1,data:{level:G,stars:pt.s.xpRequiredForLevel(G,X.V.Pet),nickname:k.nickname}};if(k[_t]){const k=J.q.instance.prodigy.gameContainer.get("8b9-bad1");yield k.fetchPetInventoryData(),U.kennel.isFull()&&(yield k.updateSlots(F.AddNewPet,B))}else{const U=J.q.instance.prodigy.gameContainer.get("5c7-e02d");yield U.spend(U.petAcquisitionCost($.ID,V.l6.Rescue),{sink_type:Z.C.PetRescue,sink_id:k.id,transaction_id:B})}ft.J.bagItem($,J.q.instance.game,"on-catch-pet",void 0,{source_type:Z.C.Battle,transaction_id:B}),wt.grantUnlockFollow($.ID,B,Z.C.Battle),J.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(Q.B.FEATURE_BATTLE_TUTORIAL,Q.B.BREADCRUMB_FIRST_PET_RESCUED)||J.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(Q.B.FEATURE_BATTLE_TUTORIAL,Q.B.BREADCRUMB_FIRST_PET_RESCUED),U.hasCompletedTutorial()&&U.forceSaveCharacter(),G{J.q.instance.prodigy.open.prefabMenu(W.l.PetRescueCardSequence,B,void 0,void 0,void 0,{PET_RESCUE_CREATURE_DATA:{ID:k.id,level:G,name:k.name,nickname:k.nickname}})}));j.wa5.getActiveScene().container.get("BattleController").onRescueCompleted(),J.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendPetHardCurrencyFunnelAdvancedEventIfApplicable(V.l6.Rescue,ot.l.PetHardCurrencyTransactionComplete,$.ID)}))}sendPetCapturedFailedSegmentEvent(k){var B,U,F;const G=null===(B=et.t.getItem("pet",this.creatureAssetID))||void 0===B?void 0:B.data,j=J.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel;J.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendBattlePetCaptureFailedEvent({petName:null!==(U=this._unitContainer.nickname)&&void 0!==U?U:null==G?void 0:G.name,petLevel:this._unitContainer.level,petElement:null==G?void 0:G.element,petType:ut.P8.getPetEvolutionType(this.creatureAssetID),petRarity:null==G?void 0:G.rarity,petRank:null!==(F=this._unitComponent.data.mergeRank)&&void 0!==F?F:0,failReason:k,previousPetCopies:j.amountOfPet(G.ID),captureSource:rt.z2.InBattle})}showInsufficientResourcePopup(k,B){var U,F;J.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:"Pet-Hard-Currency-Insufficient-Resources-Rescue",category:"Pet",contentId:`pet-${this.creatureAssetID}`,adType:dt.R.Static});const G=(0,tt.k)("MAGICOIN"),j=this.getMembershipConversionAwareModalResultHandler(B,(()=>{this.sendPetCapturedFailedSegmentEvent("Insufficient Magicoin")})),$={PET_RESCUE_ID:null==k?void 0:k.ID,PET_RESCUE_NAME:null===(U=null==k?void 0:k.data)||void 0===U?void 0:U.name,PET_RESCUE_RARITY:null===(F=null==k?void 0:k.data)||void 0===F?void 0:F.rarity,PET_RESCUE_LEVEL:B.level.toString(),[lt.n7.InsufficientResource]:G};if(!J.q.instance.prodigy.open.unifiedConversionFlow(j,{conversionFunnelName:"Pet-Hard-Currency-Insufficient-Resources-Rescue"},void 0,$)){J.q.instance.prodigy.open.prefabMenu(W.l.EvolvedPet_InsufficientResources,void 0,void 0,void 0,void 0,$).onDestroy.addOnce(j)}}getMembershipConversionAwareModalResultHandler(k,B=H().noop){let U=()=>{B(),this.onRescueDismissed.dispatch()};return J.q.instance.game.broadcaster.addAppListener(it.H3.MembershipResponseReceived,(B=>{"success"===B&&(U=()=>{k[_t]=!0,this.continueToRescueConfirmation()})}),this),()=>{U()}}destroy(){J.q.instance.game.broadcaster.removeAppListener(it.H3.MembershipResponseReceived,this),this.onQuestionOpen.dispose(),this.onQuestionClose.dispose(),this.onRescueContinue.dispose(),this.onRescueDismissed.dispose(),this.onRescueFailed.dispose()}}wt.RESCUED_PET_LEVEL=1},86283:(k,B,U)=>{"use strict";U.d(B,{D:()=>q});var F=U(62459),G=U(90633),j=U(5491),$=U(35120),H=U(77938),V=U(39984),W=U(22023);class q{static clearNewlyRescuableUnitsSeen(){q._seenIds.clear()}static filterForNewlyRescuable(k){const B=k.filter((k=>!this._seenIds.has(k.data.unitId)));return B.forEach((k=>this._seenIds.add(k.data.unitId))),B}static isFree(k){return!k.isBreadcrumbComplete(G.B.FEATURE_BATTLE_TUTORIAL,G.B.BREADCRUMB_FREE_RESCUE)}static isAtPetLimit(k){return k.kennel.getPets().filter((k=>!W.P8.isPetEpic(k.ID))).length>=k.kennel.getMaxKennelSize()}static isMemberPet(k){return F.Aq$.isDefined(H.t.getItem("pet",k).data.member)}static hasRemainingRescueAttempts(k,B){const U=k.hasMembership()?2:1;return B.catchAttempt0}static isKennelFull(k){return k.kennel.isFull()}static sendPetLevelRestrictedSegmentEvent(k,B,U){$.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendPlayerProgressionRestrictedEvent({progressionType:"Pet Level",progressionAction:"level_reset",progressionValue:B.toString(),creatureName:k},{pointType:"stars",pointCount:V.e.starsToLevel(B,j.V.Pet)},{transaction_id:U})}static getPetRescueEventData(k,B){return{is_rescuable:B.isARescuableUnit(),is_new_pet:!q.hasBeenRescuedPreviously(k,B.creature.id),number_owned:k.kennel.getPets(!1).reduce(((k,U)=>U.ID===B.creature.id?k+1:k),0),times_battled:k.encounters.getPetTimesBattled(B.creature.id),times_rescued:k.encounters.getPetTimesRescued(B.creature.id)}}static sendPetRescueAvailableEvent(k){const B=$.q.instance.prodigy.gameContainer.get("306-5359");$.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendBattlePetRescueAvailableEvent({pet_name:k.name,pet_element:k.data.element,pet_rarity:k.data.rarity,pet_level:k.level,pet_type:W.P8.getPetEvolutionType(k.creature.id),is_new_pet:!q.hasBeenRescuedPreviously(B,k.creature.id),number_owned:B.kennel.getPets(!1).reduce(((B,U)=>U.ID===k.creature.id?B+1:B),0),times_battled:B.encounters.getPetTimesBattled(k.creature.id),times_rescued:B.encounters.getPetTimesRescued(k.creature.id)})}}q._seenIds=new Set},87239:(k,B,U)=>{"use strict";U.d(B,{x:()=>q});var F=U(62459),G=U(35120),j=U(36648),$=U(77938),H=U(44094),V=U(30226),W=U(95946);class q{static getUnlockedSpellDisplayInformation(k){const B=$.t.getItem("spellV2",k.oldId),U=$.t.getItem("spellV2",k.newId),F=V.J.convertLegacyElements(U.data.element);return{spellIcon:[j.q[H.$.capitalizeFirstLetter(U.metadata.assets.icon.assetKey)],void 0],newSpellName:U.data.name,oldSpellName:null==B?void 0:B.data.name,elementType:F}}static getElementDisplayName(k){var B;const U=null!==(B=this._elementLocalizationMap[k])&&void 0!==B?B:"";return G.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText(U)}}q._elementLocalizationMap={[W.a.Fire]:"ELEMENT_FIRE",[W.a.Plant]:"ELEMENT_PLANT",[W.a.Water]:"ELEMENT_WATER",[W.a.Ice]:"ELEMENT_ICE",[W.a.Storm]:"ELEMENT_STORM",[W.a.Astral]:"ELEMENT_ASTRAL",[W.a.Shadow]:"ELEMENT_SHADOW",[W.a.Physical]:"ELEMENT_PHYSICAL"}},74452:(k,B,U)=>{"use strict";U.d(B,{I:()=>Nt,u:()=>Gt});var F=U(8674),G=U(62459),j=U(95891),$=U(68910),H=U(56942),V=U(35120),W=U(57308),q=U(98013),K=U(34829),z=U(77938),Y=U(38487),Q=U(86896),X=U(70570),Z=U(78673),J=U(7914),tt=U(25048),et=U(75915),it=U(79484),st=U(66726),nt=U(84705),at=U(8811),rt=U(30424),ot=U(82329),ht=U(20786),ct=U(10655),dt=U(37639),lt=U(55734),ut=U(129),ft=U(73797),bt=U(93709),pt=U(59968);class vt extends bt.H{constructor(k,B,U,F,G,j){super(k,B,U,F,G),this._spineKey=j}setup(){const k=V.q.instance.prodigy.create.element(this.sprites,0,0);this._spine=this.game.add.spine(0,0,this._spineKey),this.idle(),k.add(this._spine),this.complete=!0,this.loading=!1,this._onLoad.dispatch(),this.setHitbox(z.t.getItem("boss",this.source.getID()).metadata.assets.default.hitbox)}idle(){this._spine.setAnimationByName(0,"idle",!0),this._spine.setToSetupPose()}attack(){pt.R.prototype.attack.call(this),this._spine.setAnimationByName(0,"attack",!1),this._spine.addAnimationByName(0,"idle",!0),this._spine.setToSetupPose()}}var gt=U(18633),mt=U(95946),yt=U(23082),_t=U(96216),Et=U(44661),wt=U(88022);class Tt extends bt.H{constructor(k,B,U,F,G){super(k,B,U,F,G),this._currentElement=mt.a.Shadow,this._aoeDamageDisplayContainers=[]}setup(){this.cacheBoss(),this._sprite=V.q.instance.prodigy.create.element(this.sprites,0,0),this._spine=this.game.add.spine(0,0,Tt.SPINE_TAGS[mt.a.Shadow]),this.idle(),this._sprite.add(this._spine),this.complete=!0,this._onLoad.dispatch(),this._flashSpine=this.game.add.spine(0,0,H.Q.Spine_flash_json);this.game.state.get(yt.G.Battle).groupFarFront.addChild(this._flashSpine),this.setHitbox(z.t.getItem("boss",this.source.getID()).metadata.assets.default.hitbox);for(let k=0;k<3;++k)this._aoeDamageDisplayContainers[k]=new Et.V(this.game,this);this._aoeDamageDisplayContainers[1].offset={x:Gt.HORIZONTAL_TEAM_OFFSET,y:-Gt.VERTICAL_TEAM_OFFSET},this._aoeDamageDisplayContainers[2].offset={x:Gt.HORIZONTAL_TEAM_OFFSET,y:Gt.VERTICAL_TEAM_OFFSET}}switchElement(k,B){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U=!0){if(k!==this._currentElement){const F=this.game.state.get(yt.G.Battle),j=Tt.SPINE_TAGS[this._currentElement];this._currentElement=k,B&&(yield this.fadeOut());const $=this._spine;if(U&&(this._sprite.remove(this._spine,!0),V.q.instance.prodigy.load.removeSpine(j)),yield Promise.all([new Promise((B=>{V.q.instance.prodigy.load.assets(Tt.SPINE_TAGS[k],B)})),G.Egh.timeout(500)]),this._spine=this.game.add.spine(0,0,Tt.SPINE_TAGS[k]),this._sprite.add(this._spine),U||(this._sprite.remove($,!0),V.q.instance.prodigy.load.removeSpine(j)),F.rightStatusUI.setElement(k),B)return this.fadeIn()}}))}idle(){this._spine.setAnimationByName(0,"idle",!0)}attack(){pt.R.prototype.attack.call(this),this._spine.setAnimationByName(0,"attack",!1),this._spine.addAnimationByName(0,"idle",!0),this._spine.setToSetupPose()}fadeOut(){return(0,F.sH)(this,void 0,void 0,(function*(){this._spine.setAnimationByName(0,"changeOut",!1),this._flashSpine.x=this.x+Tt.FLASH_OFFSET.x,this._flashSpine.y=this.y+Tt.FLASH_OFFSET.y,this._flashSpine.setToSetupPose(!0),this._flashSpine.setAnimationByName(0,"changeOut",!1),this._flashSpine.visible=!0,yield Promise.all([new Promise((k=>{this._spine.onComplete.addOnce(k)})),new Promise((k=>{this._flashSpine.onComplete.addOnce(k)}))])}))}fadeIn(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._spine.setAnimationByName(0,"changeIn",!1),this._spine.addAnimationByName(0,"idle",!0),this._spine.setToSetupPose(),this._flashSpine.setToSetupPose(!0),this._flashSpine.setAnimationByName(0,"changeIn",!1),this._flashSpine.onComplete.addOnce((()=>{this._flashSpine.visible=!1})),new Promise((k=>{this._spine.onComplete.addOnce(k)}))}))}die(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._spine.setAnimationByName(0,"death",!1),new Promise((k=>{this._spine.onComplete.addOnce(k)}))}))}resurrect(){return(0,F.sH)(this,void 0,void 0,(function*(){yield new Promise((k=>{V.q.instance.prodigy.load.assets(Tt.SPINE_TAGS[mt.a.Shadow],k)}));const k=()=>{_t.M.radialCloud(this.game,this,Tt.SAND_CLOUD_OFFSET.x,Tt.SAND_CLOUD_OFFSET.y,Tt.SAND_CLOUD_RADIUS,wt._.Boss_aspen_extras_json,"purple-cloud"),_t.M.radialCloud(this.game,this,Tt.SAND_CLOUD_OFFSET.x,Tt.SAND_CLOUD_OFFSET.y,Tt.SAND_CLOUD_RADIUS,wt._.Boss_aspen_extras_json,"purple-cloud")};let B=!1;for(let U=Tt.SAND_CLOUD_COUNT;U>0||!B;--U)k(),U===Tt.SAND_CLOUD_COUNT-Tt.SAND_CLOUD_BOSS_SPAWN&&this.switchElement(mt.a.Shadow,!1,!1).then((()=>{B=!0})),yield G.Egh.timeout(Tt.SAND_CLOUD_INTERVAL);return this._spine.setAnimationByName(0,"reveal",!1),new Promise((k=>{this._spine.onComplete.addOnce((()=>{this._spine.setAnimationByName(0,"idle",!0),k()}))}))}))}showAoeDamage(k,B){const U=k.damage,F=Math.floor(U/3),G=U-2*F;for(let $=0;$<3;++$)this._aoeDamageDisplayContainers[$].showDamage(j.merge({},k,{damage:2!==$?F:G}),!1,0===$?B:void 0)}}Tt.SAND_CLOUD_RADIUS=900,Tt.SAND_CLOUD_COUNT=40,Tt.SAND_CLOUD_BOSS_SPAWN=30,Tt.SAND_CLOUD_OFFSET={x:50,y:-100},Tt.SAND_CLOUD_INTERVAL=50,Tt.FLASH_OFFSET={x:0,y:-150},Tt.SPINE_TAGS={shadow:H.Q.Default_boss_18_json,fire:H.Q.Fire_boss_18_json,water:H.Q.Water_boss_18_json,plant:H.Q.Plant_boss_18_json,ice:H.Q.Ice_boss_18_json,storm:H.Q.Storm_boss_18_json};var St=U(37946);class At extends St.v{setup(){super.setup(),this.setHitbox(z.t.getItem("boss",21).metadata.assets.default.hitbox)}}var Ct=U(99687);class Ot extends bt.H{constructor(k,B,U,F,G){super(k,B,U,F,G)}setup(){this.cacheBoss();const k=V.q.instance.prodigy.create.element(this.sprites,0,0);this._spine=this.game.add.spine(0,0,Ot.BOSS_GLACIAS_ASSET),this.idle(),k.add(this._spine),this.complete=!0,this._onLoad.dispatch(),this.setHitbox(z.t.getItem("boss",this.source.getID()).metadata.assets.default.hitbox)}getListOfAssets(){const k=bt.H.getAssets(this.source);return k.push(Ot.BOSS_GLACIAS_ASSET),k}idle(){this._spine.setAnimationByName(0,"idle",!0),this._spine.setToSetupPose()}attack(){pt.R.prototype.attack.call(this),this._spine.setAnimationByName(0,"attack",!1),this._spine.addAnimationByName(0,"idle",!0),this._spine.setToSetupPose()}}Ot.BOSS_GLACIAS_ASSET=H.Q.Default_boss_20_json;class It extends bt.H{constructor(k,B,U,F,G){super(k,B,U,F,G)}setup(){this.cacheBoss();const k=V.q.instance.prodigy.create.element(this.sprites,0,0);this.spine=this.game.add.spine(0,0,It.BOSS_OLD_ONE_ASSET),this.idle(),k.add(this.spine),this.showName("Old One"),this.nameText.GameObject.legacyTransform.y=-430,this.nameText.GameObject.legacyTransform.x-=10,this.visible=!0}getListOfAssets(){const k=bt.H.getAssets(this.source);return k.push(It.BOSS_OLD_ONE_ASSET),k}idle(){this.spine.setAnimationByName(0,"idle",!0),this.spine.setToSetupPose()}attack(){pt.R.prototype.attack.call(this),this.spine.setAnimationByName(0,"attack",!1),this.spine.addAnimationByName(0,"idle",!0),this.spine.setToSetupPose()}}It.BOSS_OLD_ONE_ASSET=H.Q.Default_boss_15_json;class Dt extends bt.H{constructor(k,B,U,F,G){super(k,B,U,F,G)}startLoad(){this.outOfDate=!1,this.loading=!0,V.q.instance.prodigy.load.assets(["spine-15"],this.setup.bind(this))}setup(){this.cacheBoss();const k=V.q.instance.prodigy.create.element(this.sprites,0,0);this.spine=this.game.add.spine(0,0,"spine-15"),this.visible=!0,this.idle(),k.add(this.spine),this.complete=!0,this.loading=!1}idle(){this.spine.setAnimationByName(0,"idle",!0),this.spine.setToSetupPose()}attack(){pt.R.prototype.attack.call(this),this.spine.setAnimationByName(0,"attack",!1),this.spine.addAnimationByName(0,"idle",!0),this.spine.setToSetupPose()}}var Rt=U(91207),Pt=U(51742);class Mt extends bt.H{constructor(k,B,U,F,G){U.modifiers.barrier={offset:{x:60,y:-160},scale:{x:2.33,y:2.33}},super(k,B,U,F,G)}setup(){this.cacheBoss(),V.q.instance.prodigy.load.assets(Pt.c.Sfx_attack_royal_roar);const k=V.q.instance.prodigy.create.element(this.sprites,0,0);this.spine=this.game.add.spine(100,-100,Rt.E.getTitanSpine(this.source.source.ID)),this.idle(),k.add(this.spine),k.scale.x=1.75,k.scale.y=1.75,this.setHitbox(z.t.getItem("titan",this.source.getID()).metadata.assets.default.hitbox),this.complete=!0,this.loading=!1,this._onLoad.dispatch()}idle(){this.spine.setAnimationByName(0,"idle",!0),this.spine.setToSetupPose()}attack(){pt.R.prototype.attack.call(this),this.spine.setAnimationByName(0,"attack",!1),this.spine.addAnimationByName(0,"idle",!0),this.spine.setToSetupPose()}retreat(){this.spine.setAnimationByName(0,"knockout",!1)}getListOfAssets(){return[Rt.E.getTitanSpine(this.source.source.ID)]}}var Nt,xt,Lt=U(32740),kt=U(63693),Bt=U(27625),Ut=U(50664),Ft=U(30226);!function(k){k[k.Middle=0]="Middle",k[k.Back=1]="Back",k[k.Front=2]="Front"}(Nt||(Nt={})),function(k){k.Front="pet-rescue-front",k.Back="pet-rescue-behind"}(xt||(xt={}));class Gt{set hasManagedEnergy(k){this._hasManagedEnergy=k}get hasManagedEnergy(){return this._hasManagedEnergy}constructor(k,B,U,F,$,H,V,W){this.team=[],this.enableComboAnimations=!0,this.bossTeam=!1,this.offScreenX=0,this.offScreenY=0,this.onScreenX=0,this.onScreenY=0,this.y=0,this.currentEnergy=0,this.maxEnergy=10,this._hasManagedEnergy=!1,this.playerEnergySource=null,this.onEnergyChangeStart=new G.HN0,this.onCurrentMemberSwitch=new G.HN0,this.onCurrentMemberHPChange=new G.HN0,this.onMoveCreatureOut=new G.HN0,this.onMoveCreatureIn=new G.HN0,this.onCreatureRanAway=new G.HN0,this._creatureContainerPosition=[],this.game=k,this.presortTeam(U),this.playerControlled=F,this.offScreenX=$,this.offScreenY=H,this.onScreenX=V,this.onScreenY=W;for(let G=0;G=Gt.MAX_TEAM_COUNT);G++)this.team.push(this.makeContainer(G,U[G],this.offScreenX));this.playerEnergySource=Gt.findFirstPlayer(this.team),this.registerSignals(),this.playerControlled&&j.forEach(this.team,(k=>{k instanceof Lt.M&&k.cacheAssets()})),K.A.get("GameConstants.Battle.SHOW_HITBOXES")&&this.team.forEach(((k,B)=>{k.loading?k.OnLoad.addOnce((()=>{this.drawBounds(B)})):this.drawBounds(B)}))}makeContainer(k,B,U){let F,$;const H=this.game.state.getCurrentState();let W;if(1===k?($=this.offScreenY-Gt.VERTICAL_TEAM_OFFSET,F=H.groupBack):2===k?($=this.offScreenY+Gt.VERTICAL_TEAM_OFFSET,F=H.groupFront):($=this.offScreenY,F=H.groupMiddle),B instanceof ut.a){const k=V.q.instance.prodigy.create.player(F,B,1,U,$,this.playerControlled);k.forceWeaponVisual=!0,k.loadedCallback=()=>{k.hideName(),k.createHealthBar().getOverlay().scale.x=this.playerControlled?1:-1},W=k}else if(B instanceof dt.K){const k=V.q.instance.prodigy.create.character(F,B,1,U,$,!1);k.forceWeaponVisual=!0,k.loadedCallback=()=>{k.hideName(),k.createHealthBar().getOverlay().scale.x=this.playerControlled?1:-1},W=k}else if(B instanceof lt.R){const k=V.q.instance.prodigy.create.monster(F,B,2,U,$,!1);if(!this.playerControlled){V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.encounters.addToPetTimesBattled(B.data.ID)}k.loadedCallback=k=>{j.includes([130,131,132,133],k.source.data.ID)&&(k.battleScale=1),k.sprites.scale.x=k.battleScale,k.sprites.scale.y=k.battleScale,k.width=Math.round(k.width),k.height=Math.round(k.height),k.hideName(),k.createHealthBar().getOverlay().scale.x=this.playerControlled?1:-1},W=k}else if(B instanceof tt.t)W=V.q.instance.prodigy.create.cloudBoss(F,B,U,$,B.source.element),this.bossTeam=!0;else if(B instanceof J.b){const k=V.q.instance.prodigy.create.bonfireBoss(F,B,U,$);this.bossTeam=!0,k.scale.x=.75,k.scale.y=.75,W=k}else if(B instanceof rt.d){const k=new It(this.game,F,B,U-400,$);this.bossTeam=!0,W=k}else if(B instanceof ot.K){const k=new Dt(this.game,F,B,U-400,$);this.bossTeam=!0,W=k}else if(B instanceof st.x)W=V.q.instance.prodigy.create.forestBoss(F,B,U,$),this.bossTeam=!0;else if(B instanceof ct.A){const k=new Mt(this.game,F,B,U,$);k.flip(),this.bossTeam=!0,W=k}else if(B instanceof at.C)W=V.q.instance.prodigy.create.shiverchillBoss(F,B,U-350,$),W.flip(),this.bossTeam=!0;else if(B instanceof X.l){const k=V.q.instance.prodigy.create.aspenFrostBoss(F,B,U,$);W=k,B.setBossContainer(k),this.bossTeam=!0}else if(B instanceof Z.y)W=new gt.Z(this.game,F,B,U,$);else if(B instanceof nt.Y){const k=new Ot(this.game,F,B,U,$);W=k,B.setBossContainer(k),this.bossTeam=!0}else if(B instanceof it.e){const k=new At(this.game,F,ut.a.fromCharacter(this.game,B.bossCharacter),1,U,$,!1,{hideMount:!0});k.createHealthBar().getOverlay().scale.x=-1,W=k,B.setBossContainer(k)}else if(B instanceof ht.F)W=V.q.instance.prodigy.create.shadowWyrmBoss(F,B,U-350,$),W.flip(),B.setBossContainer(W),this.bossTeam=!0;else if(B instanceof et.u){const k=new Tt(this.game,F,B,U,$);W=k,B.setBossContainer(k),B.setTeam(this),this.bossTeam=!0}else if(B instanceof Q.B){if(52===B.source.ID)B.source.useShadowAssets=!0,W=V.q.instance.prodigy.create.forestBoss(F,B,U,$);else{const k=new vt(this.game,F,B,U,$,B.source.spineKey);k.flip(),W=k}this.bossTeam=!0}else if(B instanceof Y.s){const k=V.q.instance.prodigy.create.boss(F,B,U,$);this.bossTeam=!0,G.Aq$.isDefined(B.source.spriteOffsetY)&&(k.sprites.y+=B.source.spriteOffsetY),G.Aq$.isDefined(B.source.spriteOffsetX)&&(k.sprites.x+=B.source.spriteOffsetX),G.Aq$.isDefined(B.source.battleScale)&&(k.sprites.scale.x=B.source.battleScale,k.sprites.scale.y=B.source.battleScale),W=k}return W.startLoad(),W.flip(),W.pairs=[],W.visible=!1,W.getSource().isOpponent=!this.playerControlled,W.getSource().starsEarned=0,this.bossTeam&&W.createHealthBar(),W}static findFirstPlayer(k){const B=k.find((k=>k instanceof St.v&&k.isMainPlayer));return G.Aq$.isDefined(B)?B.source:null}getCurrentEnergy(){return this.currentEnergy}getMaxEnergy(){return this.maxEnergy}changeEnergy(k){this.currentEnergy=Math.min(this.currentEnergy+k,this.maxEnergy),this.currentEnergy<0&&(G.VyI.log(`Energy at ${this.currentEnergy} below 0. Clamping.`,G.$bb.Error),this.currentEnergy=0),this.playerControlled&&k<0&&(V.q.instance.prodigy.battle.battleStats.energyCost-=k),this.onEnergyChangeStart.dispatch(this.currentEnergy),this.updatePlayerEnergy()}setEnergy(k){this.currentEnergy=Math.min(k,this.maxEnergy),this.onEnergyChangeStart.dispatch(this.currentEnergy),this.updatePlayerEnergy()}updatePlayerEnergy(){G.Aq$.isDefined(this.playerEnergySource)&&this.playerEnergySource.setEnergy(this.getCurrentEnergy())}registerSignals(){for(let k=0;k=0;--U)for(;!this.team[U].complete;)yield G.Egh.timeout(10);const k=this.onRightSide()?Gt.HORIZONTAL_TEAM_OFFSET:-Gt.HORIZONTAL_TEAM_OFFSET,B=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;for(let U=0;U=Gt.MAX_TEAM_COUNT);U++){if(this.team[U].getSource().isKnockedOut())continue;const F=this.team[U];F.visible=!0;const G=this.onScreenX+(U===Nt.Middle?0:k);F.walkIntoBattle?F.speed=10:F.x=G,this.team[U].setPath([{x:G,y:F.y}],(()=>{F===B.playerContainer&&B.playerContainer.stopHeavy()}))}this.enableComboAnimations&&(this.game.broadcaster.broadcast(ft.J3.PvpComboMeterMoveIn,this,[]),this.enableComboAnimations=!1),this.onCurrentMemberSwitch.dispatch(this.getCurrent().source)}))}onRightSide(){return this.offScreenX>=this.game.width}movePlayerIn(k,B){G.Aq$.isDefined(B)&&(B.complete?(this.team[0]=B,this.getCurrent().visible=!0,this.getCurrent().speed=10,this.onCurrentMemberSwitch.dispatch(this.getCurrent().source),this.enableComboAnimations&&(this.game.broadcaster.broadcast(ft.J3.PvpComboMeterMoveIn,this,[]),this.enableComboAnimations=!1),this.getCurrent().walkIntoBattle?(this.getCurrent().speed=10,this.getCurrent().setPath([{x:this.onScreenX,y:this.getCurrent().y}],k)):(this.getCurrent().x=this.onScreenX,this.getCurrent().y=this.onScreenY,this.getCurrent().setPath([{x:this.onScreenX,y:this.getCurrent().y}],k)),this.onMoveCreatureIn.dispatch()):this.game.time.events.addTimer(10,this.movePlayerIn.bind(this,k,B),this))}movePlayerOut(k,B,U=!1){B.speed=30,B.setPath([{x:this.offScreenX+(this.offScreenX<0?-40:40),y:B.y}],(()=>{U&&(B.alpha=0),null==k||k()}),4),B===this.getCurrent()&&this.onMoveCreatureOut.dispatch()}swapPlayerIn(k,B){const U=this.team[k];this.jumpAnimation(U,this.onScreenX,this.onScreenY,B),this.swapCurrent(k),this.onCurrentMemberSwitch.dispatch(this.getCurrent().source)}swapPlayerOut(k,B){this.jumpAnimation(this.getCurrent(),k,B)}swapCurrent(k){const B=this.getCurrent();this.team[0]=this.team[k],this.team[k]=B}jumpAnimation(k,B,U,F){const j=Math.min(k.y,U)-75;this.game.add.tween(k,this).to({x:B},500,G.GS3.Linear.None,!0);const $=this.game.add.tween(k,this).to({y:U},250,G.GS3.Quadratic.In,!1);$.onTweenComplete.add((()=>{q.l.sortChildren(k.parent,"y",W.W.SORT_ASCENDING)})),G.Aq$.isDefined(F)&&$.onTweenComplete.add(F),this.game.add.tween(k,this).to({y:j},250,G.GS3.Quadratic.Out,!0).chain($)}fakeSwap(k,B,U){this.jumpAnimation(k,B.x,B.y),this.jumpAnimation(B,k.x,k.y,U)}swapPlayersHop(k,B){const U=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=this.team[B];if(this.getCurrent()&&!this.getCurrent().isDefeated()){const U=F.parent;this.getCurrent().parent.addChild(F),U.addChild(this.getCurrent()),this.swapPlayerOut(F.x,F.y),this.swapPlayerIn(B,k)}else{const U=this.game.state.getCurrentState();U.groupMiddle&&U.groupMiddle.addChild(F),this.swapPlayerIn(B,k)}const G=this.team[B];V.q.instance.prodigy.gameContainer.get("c47-20b6").battle.sendBattlePositionChangedEvent({team:this.playerControlled?kt.B1.Player:kt.B1.Opponent,name:F.getSource().getName()===U.getName()?"Player":F.getSource().getName(),health:F.getSource().getCurrentHearts(),character_2_name:G.getSource().getName()===U.getName()?"Player":G.getSource().getName(),character_2_health:G.getSource().getCurrentHearts(),position_new:kt.Io.Front,position_old:Object.values(kt.Io)[B],automatic:!this.playerControlled}),this.onCurrentMemberSwitch.dispatch(this.getCurrent().source)}failRun(k){const B=(k,B)=>{for(let U=0;U=Gt.MAX_TEAM_COUNT);U++){const k=this.team[U];k.speed=10,0===U?k.setPath([{x:k.x+200,y:null}],B):k.setPath([{x:k.x+200,y:null}])}};V.q.instance.prodigy.audio.playSFX(8,"run"),this.getCurrent().speed=40;for(let U=0;U=Gt.MAX_TEAM_COUNT);U++)0===U?this.team[U].setPath([{x:this.team[U].x-200,y:null}],B.bind(this,this.team[U],k),4):this.team[U].setPath([{x:this.team[U].x-200,y:null}],B.bind(this,this.team[U],void 0),4)}runAway(k=this.getCurrent(),B){if(k.captured)return;k.ran=!0;const U=()=>{B&&B()};if(this.onCreatureRanAway.dispatch(k.source),k.shouldPlayRetreatOnDefeat())k.retreat(U);else if(this.bossTeam){const B=this.game.add.tween(k,this).to({alpha:0},500,G.GS3.Linear.None);B.onTweenComplete.add(U),B.start()}else V.q.instance.prodigy.audio.playSFX(8,"run"),k.speed=40,k.flip(),k.moonwalk(),this.game.time.events.addTimer(500,this.movePlayerOut.bind(this,U,k,!0),this)}rescue(k){this.getCurrent().captured=!0,this.rescueCelebrationAnimation(k)}rescueCelebrationAnimation(k){const B=this.getCurrent(),U=this.getCurrent().parent,F=new G.oWr({color:Number.parseInt("FFFFFF",16),tintIntensity:0,blend:G.PzZ.Lighten});B.sprites.filters=[F];const j=this.game.add.tween(F,this).to({tintIntensity:1},900,G.GS3.Quadratic.In,!1,1300),$=this.game.add.tween(F,this).to({tintIntensity:0},300,G.GS3.Quadratic.In,!1,900);j.chain($),j.start();const V=new Bt.I(this.game,U);V.position.set(B.x,B.y),U.swapChildren(B,V),V.populate({spineKey:H.Q.Spine_pet_battle_rescue_json}),V.playAnimation(xt.Back,!1);const W=new Bt.I(this.game,B);W.populate({spineKey:H.Q.Spine_pet_battle_rescue_json}),W.playAnimation(xt.Front,!1,(()=>{this.game.time.events.addTimer(0,(()=>{this.game.state.get(yt.G.Battle).groupFront.addChild(B),this.game.add.tween(B.sprites,this).to({alpha:0},800,G.GS3.Quadratic.In,!0);const U=new Bt.I(this.game,B);U.populate({spineKey:H.Q.Spine_battle_transport_json}),U.playAnimation("exit",!1,k)}),this)}))}doPetRescueAnimation(k){this.game.state.get(yt.G.Battle).groupFront.addChild(this.getCurrent()),V.q.instance.prodigy.audio.playSFX(8,"run"),this.getCurrent().speed=40,this.getCurrent().moonwalk(),this.game.add.tween(this.getCurrent(),this).to({x:this.getCurrent().x+20},1500,G.GS3.Linear.None,!0).onTweenComplete.add((()=>{this.getCurrent().speed=30,this.getCurrent().setPath([{x:-100,y:this.onScreenY+Gt.VERTICAL_TEAM_OFFSET+this.getCurrent().height/4},{x:380,y:this.onScreenY+Gt.VERTICAL_TEAM_OFFSET+this.getCurrent().height/4}],k,4)}),this)}runAwayTeam(k){if(!G.Aq$.isDefined(this.getCurrent().captured))if(this.bossTeam)this.game.add.tween(this.getCurrent(),this).to({alpha:0},500,G.GS3.Linear.None).start();else{V.q.instance.prodigy.audio.playSFX(8,"run");for(let k=0;k=Gt.MAX_TEAM_COUNT);k++)this.team[k].speed=40,this.team[k].flip(),this.team[k].moonwalk(),this.team[k].ran=!0,this.game.time.events.addTimer(500,this.movePlayerOut.bind(this,null,this.team[k]),this);G.Aq$.isDefined(k)&&this.game.time.events.addTimer(500,k,this)}}runAwayDefeated(k){const B=this.getUnRun();let U=!1;for(let F=0;FU)&&(B=F,U=$)}}return B}getDrops(){let k=[];for(let U=0;Uk.getSource().isKnockedOut()&&!k.captured&&!k.ran))}getCurrent(){var k;return null!==(k=this.getContainerAtOverriddenPosition(Nt.Middle))&&void 0!==k?k:this.team[0]}getCurrentSource(){return this.getCurrent().source}getCreatures(k=!1){const B=[];for(const U of this.team)U.captured&&!k||B.push(U.source);return B}getLiving(){const k=[],B=this.getTeamSize();for(let U=0;U{F.sprites.scale.x=-Math.abs(F.sprites.scale.x)}),2e3),F.visible=!0,this.team[k]=F}drawBounds(k){let B=16711680;k===Nt.Back?B=65280:k===Nt.Front&&(B=255);const U=this.team[k],F=new $.Rectangle(U.getHitboxLeft(),U.getHitboxTop(),U.getHitboxWidth(),U.getHitboxHeight());Ut.F.drawBounds(this.game,U.sprites,F,B)}destroy(){this.unregisterAllSignals(),this.game=null,this.playerEnergySource=null,j.forEach(this.team,(k=>{k.destroy()})),this.team=[]}getTeamPositionForContainer(k){const B=this.getOverriddenPositionForContainer(k);return B?B.position:this.team.indexOf(k)}overrideTeamPositionForContainer(k,B){const U=this.getOverriddenPositionForContainer(k);U?U.position=B:this._creatureContainerPosition.push({container:k,position:B})}getContainerAtOverriddenPosition(k){var B;return null===(B=this._creatureContainerPosition.find((B=>B.position===k)))||void 0===B?void 0:B.container}resetContainerOverriddenPosition(k){const B=this._creatureContainerPosition.findIndex((B=>B.container===k));B>-1&&this._creatureContainerPosition.splice(B,1)}resetOverriddenPositions(){this._creatureContainerPosition=[]}getOverriddenPositionForContainer(k){return this._creatureContainerPosition.find((B=>B.container===k))}}Gt.MAX_TEAM_COUNT=3,Gt.HORIZONTAL_TEAM_OFFSET=130,Gt.VERTICAL_TEAM_OFFSET=110},94393:(k,B,U)=>{"use strict";U.d(B,{R:()=>G,n:()=>ct});var F,G,j=U(8674),$=U(62459),H=U(79687),V=U(95891),W=U.n(V),q=U(99625),K=U(36648),z=U(57797),Y=U(73678),Q=U(35120),X=U(53880),Z=U(65050),J=U(41674),tt=U(46784),et=U(21738),it=U(30065),st=U(76277),nt=U(71698),at=U(46902),rt=U(13956),ot=U(51540),ht=U(73797);!function(k){k.Xp="Xp",k.Currency="Currency",k.TitanShard="TitanShard",k.Springfest="Springfest",k.Summerfest="Summerfest",k.Pumpkinfest="Pumpkinfest",k.Winterfest="Winterfest",k.StarlightFestival="Starlight",k.MoonlightFestival="Moonlight",k.GenericFestival="Generic"}(G||(G={}));let ct=F=class{constructor(){this._festivalConfigs=[],this.ELEMENTAL_ZONES=[Y.A_.BONFIRE,Y.A_.FOREST,Y.A_.SHIPWRECK,Y.A_.SHIVERCHILL,Y.A_.SKYWATCH],this.INSTANCE_ZONES=[Y.A_.ARCHIVES,Y.A_.ASTRALTOWER,Y.A_.CRYSTALCAVERNS,Y.A_.DARKTOWER,Y.A_.EARTHTOWER,Y.A_.FIRETOWER,Y.A_.ICETOWER,Y.A_.LAMPLIGHT,Y.A_.STORMTOWER,Y.A_.WATERTOWER],this.lastFetchTime=0,this._eventMap={},this._meetsFeatureRequirement=!1,this._listeningForLevelUp=!1}awaitLoad(){return(0,j.sH)(this,void 0,void 0,(function*(){return Date.now()>this.lastFetchTime+18e5&&(this.lastFetchTime=Date.now(),this._fetchPromise=this.fetchData()),yield this._fetchPromise,this}))}fetchData(){return(0,j.sH)(this,void 0,void 0,(function*(){const{gameContainer:k}=Q.q.instance.prodigy,B=Q.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let U=(yield this.getEventDataRequest()).weeks;this._festivalConfigs=(yield this.getFestivalConfigRequest()).festivals,U=U.filter((({internal:k,accountIds:U})=>!k||U.split(",").some((k=>+k.trim()===B.userID)))),this._eventMap=W().groupBy(U,(({type:k})=>k));const G=F.FESTIVALS.findIndex((k=>this._eventMap[k])),j=k.get("e20-0fb0").player.daily,H=(0,st.G)(nt.o),V=k.get("db5-fb6e");if(this._meetsFeatureRequirement=yield V.meetsRequirements(69),G>=0&&H.enabled){const k=this._eventMap[F.FESTIVALS[G]];if(!k)return void $.VyI.log(`WeekendEvents.fetchData - No festival events found for ${F.FESTIVALS[G]}`,$.$bb.Error);const B=k[0];this._activeFestival={type:G,startDate:B.startDate,endDate:B.endDate,aboutScreen:B.aboutScreen,entityId:B.entityId,zone:B.zone},j.setFestival(B.id),this._eventMap=W().omit(this._eventMap,F.FESTIVALS)}else this._activeFestival=void 0,this._meetsFeatureRequirement=!1,j.setFestival(0);this._listeningForLevelUp||(this._listeningForLevelUp=!0,Q.q.instance.game.broadcaster.addAppListener(ht.ig.AnyLevelUp,this.onPlayerLevelUp,this,ht.HG.WeekendEventsLevelUp,!0))}))}onPlayerLevelUp(){return(0,j.sH)(this,void 0,void 0,(function*(){if(!this._activeFestival||this._meetsFeatureRequirement)return;const{gameContainer:k}=Q.q.instance.prodigy,B=k.get("db5-fb6e");if(this._meetsFeatureRequirement=yield B.meetsRequirements(69),!this._meetsFeatureRequirement)return;k.get("99d-5e9e").completeRootTask().catch($.RQr.createHandler("Error completing festival root task and NONE events on level up")),Q.q.instance.prodigy.skin.applyFestival().then((()=>{Q.q.instance.game.broadcaster.broadcast(ht.Y1.HUDRevampButtonVisibilityRefreshRequested),Q.q.instance.game.broadcaster.broadcast(ht.Y1.CheckForHUDAttention)})).catch($.RQr.createHandler("Error initializing festival on level up"))}))}getActiveFestivalName(){var k;const B=null===(k=this.getActiveFestival())||void 0===k?void 0:k.type;return void 0!==B?F.FESTIVALS[B].toLowerCase():""}getFestivalConfig(){if(this._activeFestival&&this._activeFestival.type>=0){const k=this._activeFestival.type;return W().findLast(this._festivalConfigs,(B=>B.name===F.FESTIVALS[k]))}}handleFestivalProgressPopup(k,B){var U,F,G,j,H,V,W,Y,it;if(!this.getActiveFestival())return void(null==k||k());const st=Q.q.instance.prodigy.open.menus;let nt=st.length;window.setTimeout((()=>{nt=st.length}));const at=()=>{if(st.length<=nt)null==k||k();else{const B=st[st.length-1];if(B instanceof et.y){const k=B.onClose;B.onClose=()=>{at(),null==k||k()}}else null==k||k()}},rt=Q.q.instance.prodigy.gameContainer.get("99d-5e9e").getAllProgressTaskCounts(),ot=this.getFestivalConfig(),ht=Q.q.instance.prodigy.gameContainer.get($.$Bt.LocalizationService),ct=ht.getText("X_REWARDS",(null===(U=null==ot?void 0:ot.tintableBanner)||void 0===U?void 0:U.titleText)?ht.getText(null===(F=null==ot?void 0:ot.tintableBanner)||void 0===F?void 0:F.titleText):ht.getText("FESTIVAL")),dt=Q.q.instance.prodigy.open.prefabMenu(q.l.FestivalProgressMenu,at,!0,!0,!0,{[X.d.StoryTabActive]:(null!==(G=rt[z.xK.Story])&&void 0!==G?G:0)>0,[X.d.CoopTabActive]:(null!==(j=rt[z.xK.Coop])&&void 0!==j?j:0)>0,[X.d.SeasonTabActive]:(null!==(H=rt[z.xK.Season])&&void 0!==H?H:0)>0,[X.d.RiftsTabActive]:(null!==(V=rt[z.xK.Rifts])&&void 0!==V?V:0)>0,[X.d.MemberTabActive]:(null!==(W=rt[z.xK.Member])&&void 0!==W?W:0)>0,[X.d.BackgroundImageGuid]:null!==(Y=null==ot?void 0:ot.backgroundImageGuid)&&void 0!==Y?Y:K.q.Background_starlight,[X.d.TitleText]:ct,[X.d.BannerFillColor]:null===(it=null==ot?void 0:ot.tintableBanner)||void 0===it?void 0:it.bannerFillColor},Object.assign({interfaceName:tt.B.FestivalProgressionWindow,interfaceType:J.Wm.Modal,originType:J.$N.AutoSurfaced,originID:"festival",instanceType:Z.N.Interface},B),!0,!1,void 0,!1,!0);return dt.createContainer=!1,dt}isMultiZone(k){return k===at.Q.Global||k===at.Q.AllZones||k===at.Q.AllInstances}getZoneDisplayName(k){const B=Q.q.instance.prodigy.gameContainer.get($.$Bt.LocalizationService);return k===at.Q.AllInstances?B.getText("ALL_NON_ELEMENTAL_ZONES"):k===at.Q.AllZones?B.getText("ALL_ELEMENTAL_ZONES"):k===at.Q.Global?B.getText("PARENT_ATTACH_WORLDS"):Q.q.instance.prodigy.world.getZone(k).name}getRandomZoneID(k){const B=this.ELEMENTAL_ZONES,U=this.INSTANCE_ZONES;return k===at.Q.AllZones?$.lv2.getRandomItem(B):k===at.Q.AllInstances?$.lv2.getRandomItem(U):$.lv2.getRandomItem(B.concat(U))}getTitanShardMultiplier(){var k,B;return null!==(B=null===(k=this._eventMap[G.TitanShard])||void 0===k?void 0:k[0].bonusMultiplier)&&void 0!==B?B:1}getActiveFestival(){return this._meetsFeatureRequirement?this._activeFestival:void 0}getActiveFestivalWithoutRestrictions(){return this._activeFestival}getEvents(k){var B;return null!==(B=this._eventMap[k])&&void 0!==B?B:[]}getMultiplier(k,B){var U,F,G;const j=this.ELEMENTAL_ZONES.includes(k);return null!==(G=null===(F=null===(U=this._eventMap[B])||void 0===U?void 0:U.find((({zone:B})=>B===k||B===at.Q.Global||B===at.Q.AllZones&&j||B===at.Q.AllInstances&&!j)))||void 0===F?void 0:F.bonusMultiplier)&&void 0!==G?G:1}getEventDataRequest(){return(0,j.sH)(this,void 0,void 0,(function*(){const k=yield this._networkHandler.getCurrentEventsData();return k||($.RQr.createHandler("Error loading the weekend events entity"),{weeks:[]})}))}getFestivalConfigRequest(){return(0,j.sH)(this,void 0,void 0,(function*(){const k=yield this._networkHandler.getFestivalConfigData();return k||($.RQr.createHandler("Error loading the festival config entity"),{festivals:[]})}))}getFestivalIcon(){const k=this.getFestivalConfig();switch(null==k?void 0:k.name){case F.FESTIVALS[it.Q.Springfest]:return K.q.Hud_springfest;case F.FESTIVALS[it.Q.Pumpkinfest]:return K.q.Hud_pumpkinfest;case F.FESTIVALS[it.Q.StarlightFestival]:return K.q.Hud_starlight;case F.FESTIVALS[it.Q.Summerfest]:return K.q.Hud_summerfest;case F.FESTIVALS[it.Q.Winterfest]:return K.q.Hud_winterfest;case F.FESTIVALS[it.Q.MoonlightFestival]:return K.q.Hud_moonlightfest;case F.FESTIVALS[it.Q.GenericFestival]:default:return $.VyI.log("No valid active festival found when fetching HUD icon",$.$bb.Warning),""}}};ct.REQUEST_TIMEOUT_DURATION_MS=1e4,ct.REQUEST_RETRY_COUNT=5,ct.FESTIVALS=[G.Springfest,G.Summerfest,G.Pumpkinfest,G.Winterfest,G.StarlightFestival,G.MoonlightFestival,G.GenericFestival],(0,j.Cg)([(0,rt.b)("4fd-fef7"),(0,j.Sn)("design:type",ot.v)],ct.prototype,"_networkHandler",void 0),ct=F=(0,j.Cg)([(0,H.injectable)()],ct)},95946:(k,B,U)=>{"use strict";var F;U.d(B,{a:()=>F}),function(k){k.Astral="astral",k.Fire="fire",k.Ice="ice",k.Physical="physical",k.Plant="plant",k.Shadow="shadow",k.Storm="storm",k.Water="water",k.Neutral="neutral",k.Earth="earth",k.Wizard="wizard",k.Mech="mech"}(F||(F={}))},52239:(k,B,U)=>{"use strict";var F;U.d(B,{i:()=>F}),function(k){k.beam="beam",k.projectile="projectile",k.aoe="aoe",k.aoa="aoa"}(F||(F={}))},29949:(k,B,U)=>{"use strict";U.d(B,{I:()=>H});var F=U(62459),G=U(95891),j=U(77938),$=U(52239);class H{constructor(k){this.spellData=j.t.getItem("spell",k)}getEasing(k){if(F.Aq$.isDefined(this.spellData.metadata.animationData[k])){const B=this.spellData.metadata.animationData[k].split(".");return F.GS3[B[0]][B[1]]}return F.GS3.Linear.None}getName(){return this.spellData.data.name}getInt(k){return F.Aq$.isDefined(this.spellData.metadata.animationData[k])?parseInt(this.spellData.metadata.animationData[k]):0}getValue(k){return this.spellData.metadata.animationData[k]}isSingleShot(){return!G.includes([$.i.aoe,$.i.aoa],this.spellData.metadata.animationData.animationType)}getElement(){return this.spellData.data.element}}},2221:(k,B,U)=>{"use strict";U.d(B,{f:()=>H});var F=U(8674),G=U(62459),j=U(95891),$=U(35120);class H extends G.s3P{getShardCount(){const k=j.find(this.battleTeams,(k=>1===k.ID)).IsDefeated()?this.winningTiers:this.losingTiers,B=$.q.instance.prodigy.gameContainer.get("12b-405a").getTitanShardMultiplier();for(let U=0;U=k[U].questionsCorrect)return Math.floor(k[U].shards*B);return 0}}(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],H.prototype,"battleTeams",void 0),(0,F.Cg)([(0,G.fFd)("LosingPrizeTiers"),(0,F.Sn)("design:type",Array)],H.prototype,"losingTiers",void 0),(0,F.Cg)([(0,G.fFd)("WinningPrizeTiers"),(0,F.Sn)("design:type",Array)],H.prototype,"winningTiers",void 0),(0,F.Cg)([(0,G.fFd)("BattleStats"),(0,F.Sn)("design:type",Object)],H.prototype,"stats",void 0)},70215:(k,B,U)=>{"use strict";var F;U.d(B,{$:()=>F}),function(k){k[k.MaxHearts=0]="MaxHearts",k[k.Level=1]="Level",k[k.Spell=2]="Spell",k[k.Stars=3]="Stars"}(F||(F={}))},35997:(k,B,U)=>{"use strict";U.d(B,{k:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this.mods={},this.onBattleStart=new G.HN0,this.onEscape=new G.HN0,this.onVictory=new G.HN0,this.onDefeat=new G.HN0}startBattle(){this.onBattleStart.dispatch();const k=j.q.instance.prodigy.world.getCurrentZone(),B=j.q.instance.prodigy.world.getZone(k).getBattleMods(),U=Object.assign(Object.assign(Object.assign({},this.mods),{pets:this.mods.pets?[...this.mods.pets]:void 0}),B);j.q.instance.prodigy.battle.start(U,(()=>this.onEscapeCallback()),(()=>this.onVictoryCallback()),(()=>this.onDefeatCallback()),U.onFaint)}setMods(k){this.mods=k}onEscapeCallback(){this.onEscape.dispatch(),this.disposeSignals(),this.onEscapeTeleport&&this.teleport(this.onEscapeTeleport)}onVictoryCallback(){this.onVictory.dispatch(),this.disposeSignals(),this.onVictoryTeleport&&this.teleport(this.onVictoryTeleport)}onDefeatCallback(){this.onDefeat.dispatch(),this.disposeSignals(),this.onDefeatTeleport&&this.teleport(this.onDefeatTeleport)}disposeSignals(){this.onEscape.dispose(),this.onVictory.dispose(),this.onDefeat.dispose()}teleport(k){var B,U;j.q.instance.prodigy.world.it(k.mapKey,null===(B=k.coordinates)||void 0===B?void 0:B.x,null===(U=k.coordinates)||void 0===U?void 0:U.y)}destroy(){this.onBattleStart.dispose(),super.destroy()}};(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],H.prototype,"mods",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onBattleStart",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onEscape",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onVictory",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onDefeat",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],H.prototype,"onEscapeTeleport",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],H.prototype,"onVictoryTeleport",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],H.prototype,"onDefeatTeleport",void 0),H=(0,F.Cg)([(0,G.EVk)("StartBattle",$.Y.battle)],H)},76007:(k,B,U)=>{"use strict";U.d(B,{k:()=>$});var F=U(8674),G=U(48417),j=U(76546);class $ extends j.D{constructor(){super(...arguments),this._getXpPromises={}}getPastUnclaimedRewards(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(G.D.BattlePass.GetPastUnclaimedRewards,{})}))}claimPastUnclaimedReward(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(G.D.BattlePass.ClaimPastRewards,{})}))}completeExpiredClaimQuests(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(G.D.BattlePass.CompleteExpiredClaimTasks,{questId:k,claimableTaskIds:B})}))}getBattlePassXpData(k){return(0,F.sH)(this,void 0,void 0,(function*(){return void 0===this._getXpPromises[k]&&(this._getXpPromises[k]=this.makeCloudscriptRequest(G.D.BattlePass.GetBattlePassXpData,{questId:k}),this._getXpPromises[k].finally((()=>this._getXpPromises[k]=void 0))),this._getXpPromises[k]}))}callDebugRoute(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return Promise.resolve()}))}callBattlePassSchedulerRouteDebug(){return(0,F.sH)(this,void 0,void 0,(function*(){return Promise.resolve()}))}}},9475:(k,B,U)=>{"use strict";U.d(B,{S:()=>it});var F=U(8674),G=U(62459),j=U(88022),$=U(26738),H=U(68834),V=U(58776),W=U(62886),q=U(29891),K=U(24522),z=U(66582),Y=U(15821),Q=U(13956),X=U(68152),Z=U(56567),J=U(38156),tt=U(1959),et=U(91207);class it{constructor(k,B,U,F){this._experimentFeatureTaskIds=[],this._mythicalEpicPetIds=[],this._questId=k,this._metaData=B,this._tasks=U,this.dataVersion=F}parseTaskData(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F={};let G=1;const j={},H=new Z.f;for(const K of k)if(!K.taskDefinition.metadata.experimentTaskId||this._experimentFeatureTaskIds.includes(K.taskDefinition.metadata.experimentTaskId)){if(K.taskDefinition.metadata.tier){const k=this.handleTierTask(K,B,F);(null==k?void 0:k.isCompleted)&&(G=Math.max(G,k.tier))}K.taskDefinition.metadata.questGoalTaskType&&(yield this.handleQuestGoalTask(K,B,j,H)),!this._ftueTaskData&&K.taskDefinition.metadata.isFtue&&(this._ftueTaskData={buttonId:K.taskDefinition.completionRequirements.data.id,isCompleted:K.taskProgress.status===V.t.COMPLETE}),K.taskDefinition.metadata.tierTaskType!==$.m.INFINITE_GOAL&&K.taskDefinition.metadata.tierTaskType!==$.m.INFINITE_CLAIM||this.handleInfiniteTierTask(K,U),K.taskProgress.status===V.t.COMPLETE&&K.taskDefinition.metadata.isExperimentGate&&this._experimentFeatureTaskIds.push(K.taskID)}this._infiniteTierData&&(this._infiniteTierData.tier=Object.keys(F).length+1,this._infiniteTierData.battlePassXpRequired=F[this._infiniteTierData.tier-1].battlePassXpRequired,F[this._infiniteTierData.tier]=this._infiniteTierData),F[Math.min(G+1,Object.keys(F).length)].isCurrentTier=!0,this._tiers=F,this._questGoals=Object.values(j);let W=U.total,q=0;for(const k of Object.values(this._tiers))k.isInfiniteTier||(k.targetProgress=k.battlePassXpRequired-q,k.currentProgress=Math.min(k.targetProgress,W),q+=k.targetProgress,W-=k.currentProgress)}))}handleTierTask(k,B,U){var F,j,H,W;const q=k.taskDefinition.metadata.tier,z=k.taskDefinition.metadata.tierTaskType;if(!q||!z)return G.VyI.log(`Missing tier metadata for task ${k.taskID} in quest ${k.questID}`,G.$bb.Error),null;U[q]||(U[q]={tier:q,isCurrentTier:!1,isCompleted:!1,targetProgress:0,currentProgress:0,topPremiumReward:null,bottomPremiumReward:null,freeReward:null,battlePassXpRequired:0,isInfiniteTier:!1});const Q=U[q];switch(z){case $.m.GOAL:Q.isCompleted=k.taskProgress.status===V.t.COMPLETE;const U=null===(F=k.taskDefinition.preconditions)||void 0===F?void 0:F.find((k=>k.type===K.n.HAS_TOTAL_BATTLE_PASS_XP));Q.battlePassXpRequired=null!==(H=null===(j=null==U?void 0:U.data)||void 0===j?void 0:j.battlePassXpRequired)&&void 0!==H?H:0;const q=null===(W=null==U?void 0:U.data)||void 0===W?void 0:W.battlePassXpId;q&&!this._battlePassXpId&&(this._battlePassXpId=q);break;case $.m.PREMIUM_REWARD_CLAIM:Q.bottomPremiumReward?(Q.topPremiumReward=this.parseRewardData(k,B),(0,X.v)(Y.A.isDefined(Q.topPremiumReward.itemDrop),`Reward is missing item drop data. ${k.taskID}`)):(Q.bottomPremiumReward=this.parseRewardData(k,B),(0,X.v)(Y.A.isDefined(Q.bottomPremiumReward.itemDrop),`Reward is missing item drop data. ${k.taskID}`));break;case $.m.FREE_REWARD_CLAIM:Q.freeReward=this.parseRewardData(k,B),(0,X.v)(Y.A.isDefined(Q.freeReward.itemDrop),`Reward is missing item drop data. ${k.taskID}`);break;case $.m.PREMIUM_GATE:break;default:G.VyI.log(`BattlePassQuestData: Unknown tier task type: ${z}. QuestID: ${k.questID}. TaskID: ${k.taskID}`,G.$bb.Warning)}return Q}handleInfiniteTierTask(k,B){var U,F,G,j,H;switch(this._infiniteTierData||(this._infiniteTierData={tier:0,isCurrentTier:Y.A.isDefined(B.currentInfinite),isCompleted:!1,targetProgress:0,currentProgress:0,timesCompleted:void 0,timesClaimed:void 0,battlePassXpRequired:0,isInfiniteTier:!0,freeReward:{rewardId:"",itemDrop:this._metaData.infiniteTier.reward,isMystery:!1,claimed:!1,claimable:!1,membershipTier:z._$.NonMember}}),k.taskDefinition.metadata.tierTaskType){case $.m.INFINITE_GOAL:this._infiniteTierData.targetProgress=k.taskDefinition.preconditions[0].data.infiniteXpRequired,this._infiniteTierData.currentProgress=null!==(U=B.currentInfinite)&&void 0!==U?U:0,this._infiniteTierData.timesCompleted=null!==(G=null===(F=k.taskProgress.data)||void 0===F?void 0:F.timesCompleted)&&void 0!==G?G:0;break;case $.m.INFINITE_CLAIM:this._infiniteTierData.timesClaimed=null!==(H=null===(j=k.taskProgress.data)||void 0===j?void 0:j.progress)&&void 0!==H?H:0,this._infiniteTierData.freeReward.rewardId=k.taskDefinition.completionRequirements.data.id}Y.A.isDefined(this._infiniteTierData.timesCompleted)&&Y.A.isDefined(this._infiniteTierData.timesClaimed)&&(this._infiniteTierData.freeReward.claimable=this._infiniteTierData.timesCompleted>this._infiniteTierData.timesClaimed)}handleQuestGoalTask(k,B,U,j){return(0,F.sH)(this,void 0,void 0,(function*(){var F,V,W,q,z;const Q=k.taskDefinition.metadata.questGoalTaskType;if(!Q)return G.VyI.log(`Missing quest goal task type for task ${k.taskID} in quest ${k.questID}`,G.$bb.Error),null;let Z;Q===$.x.GOAL?Z=k.taskID:Q===$.x.CLAIM&&(Z=k.taskDefinition.prerequisites[0],(0,X.v)(Y.A.isDefined(Z),`Claim task is missing a prerequisite. ${k.taskID}`)),U[Z]||(U[Z]={goalTaskId:Z,claimTaskId:"",questType:"",questDescription:"",questGoalType:null,targetProgress:0,currentProgress:0,reward:null,hasStarted:!1,isExpired:!1,comingSoonDate:null,sortPriority:k.taskDefinition.metadata.sortPriority});const tt=U[Z];switch(Q){case $.x.GOAL:tt.goalTaskId=k.taskID,tt.questType=k.taskDefinition.metadata.questGoalType,tt.questGoalType=k.taskDefinition.completionRequirements.type,tt.targetProgress=k.taskDefinition.completionRequirements.data.target,tt.currentProgress=null!==(V=null===(F=k.taskProgress.data)||void 0===F?void 0:F.progress)&&void 0!==V?V:0,tt.questDescription=J.n.getQuestDescriptionFromDefinition(k.taskDefinition);const U=null!==(W=k.taskDefinition.metadata.questGoalName)&&void 0!==W?W:null;tt.questGoButtonAction=U?this.getGoButtonActionByName(U):this.getGoButtonActionByType(tt.questGoalType),tt.isMemberQuest=!1,tt.hasStarted=!0,tt.isExpired=!1;for(const B of k.taskDefinition.preconditions||[])B.type===K.n.DATE_AFTER&&(tt.hasStarted=yield j.check(K.n.DATE_AFTER,B.data)),B.type===K.n.DATE_BEFORE&&(tt.isExpired=!(yield j.check(K.n.DATE_BEFORE,B.data))),B.type===K.n.IS_MEMBER&&(tt.isMemberQuest=!0);const G=tt.questType===H.bm.Bonus&&!tt.hasStarted;tt.comingSoonDate=G?new Date(null===(z=null===(q=k.taskDefinition.preconditions)||void 0===q?void 0:q.find((k=>k.type===K.n.DATE_AFTER)))||void 0===z?void 0:z.data.date):null;break;case $.x.CLAIM:tt.claimTaskId=k.taskID,tt.reward=this.parseRewardData(k,B)}return tt}))}getGoButtonActionByName(k){let B;switch(k){case H.UA.BecomeAMember:B=H.Nz.BecomeAMember}return B}getGoButtonActionByType(k){let B;switch(k){case W.T.EVOLVE_PET:B=H.Nz.EvolvePet}return B}parseRewardData(k,B){var U,F;if(!k)return null;let G,j;const H=null!==(U=k.taskDefinition.onComplete)&&void 0!==U?U:[];for(const $ of H)$.type!==q.s.GOT_ITEM?$.type!==q.s.GIVE_ULTIMATE?$.type!==q.s.GIVE_BATTLE_PASS_XP||(G=$.data.xpToGive):(j={ID:$.data.id,type:"pet",N:1},this._mythicalEpicPetIds.push($.data.id)):j=$.data.itemDrops[0];(0,X.v)(Y.A.isDefined(j)||Y.A.isDefined(G),`Reward has no item drop or battle pass xp data. ${k.taskID}`);let W=z._$.NonMember;k.taskDefinition.metadata.tierTaskType===$.m.PREMIUM_REWARD_CLAIM&&(W=k.taskDefinition.metadata.isUltimate?z._$.MemberUltimateMath:z._$.MemberLevelUp);const K={rewardId:k.taskDefinition.completionRequirements.data.id,claimable:B.includes(k.taskDefinition.id),claimed:k.taskProgress.status===V.t.COMPLETE,isMystery:null!==(F=k.taskDefinition.metadata.isMystery)&&void 0!==F&&F,membershipTier:W};return j&&(K.itemDrop=j),G&&(K.battlePassXp=G),K}addQuantityToChaseItemData(k,B,U){var F;const G=U?1:null!==(F=k.N)&&void 0!==F?F:1,j=U?this.getMiniChaseItemsUltimate().find((k=>182===k.id&&"item"===k.type)):this.getMiniChaseItemsUltimate().find((B=>B.id===k.ID&&B.type===k.type));if(j&&(Y.A.isDefined(j.quantity)?j.quantity+=G:j.quantity=G),!B){const B=U?this.getMiniChaseItemsLevelUp().find((k=>182===k.id&&"item"===k.type)):this.getMiniChaseItemsLevelUp().find((B=>B.id===k.ID&&B.type===k.type));B&&(Y.A.isDefined(B.quantity)?B.quantity+=G:B.quantity=G)}}getStartDate(){return new Date(this._metaData.startDate).getTime()}getEndDate(){return new Date(this._metaData.endDate).getTime()}getQuestID(){return this._questId}getTasks(){return this._tasks}getNumTiers(){return Object.values(this._tiers).filter((k=>!k.isInfiniteTier)).length}getCurrentTierData(){var k;return null!==(k=Object.values(this._tiers).find((k=>k.isCurrentTier)))&&void 0!==k?k:this._tiers[0]}getCurrentTier(){var k;return this.hasInfiniteTier()&&(null===(k=this.getInfiniteTierData())||void 0===k?void 0:k.isCurrentTier)?this.getNumTiers()+1:this.getCurrentTierData().tier}getAllTierData(){return Object.values(this._tiers)}getTierData(k){return this._tiers[k]}getTiersWithReward(k,B){return Object.values(this._tiers).filter((U=>[U.freeReward,U.bottomPremiumReward,U.topPremiumReward].some((U=>{var F,G;return(null===(F=null==U?void 0:U.itemDrop)||void 0===F?void 0:F.ID)===k&&(null===(G=null==U?void 0:U.itemDrop)||void 0===G?void 0:G.type)===B})))).map((k=>k.tier)).sort(((k,B)=>k-B))}getUnclaimedRewards(){var k,B,U,F,G,j;const $=[];for(const H of this.getAllTierData())H.isInfiniteTier||((null===(k=H.freeReward)||void 0===k?void 0:k.claimable)&&!(null===(B=H.freeReward)||void 0===B?void 0:B.claimed)&&$.push(H.freeReward.itemDrop),(null===(U=H.topPremiumReward)||void 0===U?void 0:U.claimable)&&!(null===(F=H.topPremiumReward)||void 0===F?void 0:F.claimed)&&$.push(H.topPremiumReward.itemDrop),(null===(G=H.bottomPremiumReward)||void 0===G?void 0:G.claimable)&&!(null===(j=H.bottomPremiumReward)||void 0===j?void 0:j.claimed)&&$.push(H.bottomPremiumReward.itemDrop));if(this.hasInfiniteTier()){const k=this.getInfiniteTierData();let B=k.timesCompleted-k.timesClaimed;for(;B>0;)$.push(k.freeReward.itemDrop),B--}return $}hasInfiniteTier(){var k;const B=null===(k=this._metaData.infiniteTier)||void 0===k?void 0:k.enabled;return(!0===B||void 0===B)&&Y.A.isDefined(this.getInfiniteTierData())}getInfiniteTierData(){return this._infiniteTierData}getNumUnclaimedRewards(){return this.getUnclaimedRewards().length}getTitle(){return this._metaData.title}getSeasonName(){return this._metaData.seasonName}getCurrentTierProgress(){return this.getCurrentTierData().currentProgress}getCurrentTierProgressTarget(){return this.getCurrentTierData().targetProgress}getPremiumTrackName(){return this._metaData.premiumTrackName}getPremiumTrackIconAtlasGuid(){return j._.Ui_battle_pass_json}getPremiumTrackIconFrameName(){return this._metaData.premiumTrackIconFrame}getHomeScreenPromoImageGuid(){return this._metaData.homeScreenPromoImageGuid}getHomeScreenPromoImageURL(){return this._metaData.homeScreenPromoImageURL}getQuestsScreenPanelImageGuid(){return this._metaData.questsScreenPanelImageGuid}getQuestsScreenPanelImageURL(){return this._metaData.questsScreenPanelImageURL}getRewardsScreenPanelImageGuid(){var k;return null===(k=this._metaData.rewardsScreenLeftPanelData)||void 0===k?void 0:k.rewardsScreenPanelImageGuid}getRewardsScreenPanelImageURL(){var k;return null===(k=this._metaData.rewardsScreenLeftPanelData)||void 0===k?void 0:k.rewardsScreenPanelImageURL}getUltimateActivatedTextColour(){var k;return null===(k=this._metaData.rewardsScreenLeftPanelData)||void 0===k?void 0:k.ultimateActivatedTextColour}getChasePrizes(){var k;return null!==(k=this._metaData.chasePrizes.chasePrizes)&&void 0!==k?k:[]}getChaseHeroPoseImageGuid(){return et.E.resolveSingleImageAssetSource(this._metaData.mythicalEpicHeroPoseImageGuid,this._metaData.mythicalEpicHeroPoseImageURL)}getMythicalEpicPetIds(){return this._mythicalEpicPetIds}getChasePetsLevelUp(){return this._metaData.chasePrizes.chasePrizesLevelupMember?this._metaData.chasePrizes.chasePrizesLevelupMember.filter((k=>"pet"===k.type)):[]}getChasePetsUltimate(){return this._metaData.chasePrizes.chasePrizesUltimateMember?this._metaData.chasePrizes.chasePrizesUltimateMember.filter((k=>"pet"===k.type)):[]}getMiniChaseItemsLevelUp(){return this._metaData.chasePrizes.chasePrizesLevelupMember?this._metaData.chasePrizes.chasePrizesLevelupMember.filter((k=>{if(k.experiment){return Y.A.traverseIfObject(this._featureProvider.getFeatureValue(k.experiment.feature),k.experiment.variable)===k.experiment.value===k.experiment.result}return!0})):[]}getMiniChaseItemsUltimate(){return this._metaData.chasePrizes.chasePrizesUltimateMember?this._metaData.chasePrizes.chasePrizesUltimateMember.filter((k=>{if(k.experiment){return Y.A.traverseIfObject(this._featureProvider.getFeatureValue(k.experiment.feature),k.experiment.variable)===k.experiment.value===k.experiment.result}return!0})):[]}hasMadeQuestProgress(){return this._tasks.some((k=>{var B;return k.taskDefinition.metadata.questGoalTaskType===$.x.GOAL&&(k.taskProgress.status===V.t.COMPLETE||(null===(B=k.taskProgress.data)||void 0===B?void 0:B.progress)>0)}))}getQuestTypes(){return this._metaData.questTypes.map((k=>k.name))}getQuests(k){return k?this._questGoals.filter((B=>B.questType===k||k===H.bm.All)):this._questGoals}getQuestsToShow(k){return this.getQuests(k).filter((k=>k.hasStarted&&!k.isExpired||k.comingSoonDate))}getCompletedUnclaimedQuests(){return this.getQuests().filter((k=>k.reward.claimable&&!k.reward.claimed))}getQuestComingSoonDate(k){let B=null;for(let U=0;U{var B,U;return(null===(B=k.reward)||void 0===B?void 0:B.claimable)&&!(null===(U=k.reward)||void 0===U?void 0:U.claimed)})).length}getQuestById(k){return this._questGoals.find((B=>B.goalTaskId===k))}getFtueTask(){return this._ftueTaskData}getFtueFrames(){return this._metaData.ftueFrames}getXpId(){return this._battlePassXpId}getThreeTierCoreChaseItems(){var k;return null===(k=this._metaData.threeTierChasePrizes)||void 0===k?void 0:k.chasePrizes.coreChaseItems}getThreeTierPlusChaseItems(){var k;return null===(k=this._metaData.threeTierChasePrizes)||void 0===k?void 0:k.chasePrizes.plusChaseItems}getThreeTierUltraChaseItems(){var k;return null===(k=this._metaData.threeTierChasePrizes)||void 0===k?void 0:k.chasePrizes.ultraChaseItems}getThreeTierCoreLabels(){var k,B,U;return null!==(U=null===(B=null===(k=this._metaData.threeTierChasePrizes)||void 0===k?void 0:k.chasePrizeGroupLocalizationKeys)||void 0===B?void 0:B.coreLocalizationKeys.map((k=>this._localizer.getText(k))))&&void 0!==U?U:tt.A.CHASE_PRIZE_GROUP_LOC_KEYS.coreLocalizationKeys.map((k=>this._localizer.getText(k)))}getThreeTierPlusLabels(){var k,B,U;return null!==(U=null===(B=null===(k=this._metaData.threeTierChasePrizes)||void 0===k?void 0:k.chasePrizeGroupLocalizationKeys)||void 0===B?void 0:B.plusLocalizationKeys.map((k=>this._localizer.getText(k))))&&void 0!==U?U:tt.A.CHASE_PRIZE_GROUP_LOC_KEYS.plusLocalizationKeys.map((k=>this._localizer.getText(k)))}getThreeTierUltraLabels(){var k,B,U;return null!==(U=null===(B=null===(k=this._metaData.threeTierChasePrizes)||void 0===k?void 0:k.chasePrizeGroupLocalizationKeys)||void 0===B?void 0:B.ultraLocalizationKeys.map((k=>this._localizer.getText(k))))&&void 0!==U?U:tt.A.CHASE_PRIZE_GROUP_LOC_KEYS.ultraLocalizationKeys.map((k=>this._localizer.getText(k)))}getThreeTierCoreAnimatedPets(){var k;return null===(k=this._metaData.threeTierChasePrizes)||void 0===k?void 0:k.chasePrizeAnimatedPets.corePets}getThreeTierPlusAnimatedPets(){var k;return null===(k=this._metaData.threeTierChasePrizes)||void 0===k?void 0:k.chasePrizeAnimatedPets.plusPets}getThreeTierUltraAnimatedPets(){var k;return null===(k=this._metaData.threeTierChasePrizes)||void 0===k?void 0:k.chasePrizeAnimatedPets.ultraPets}getBattlePassChasePets(){const k=new Set,B=B=>{null==B||B.forEach((B=>{"pet"===B.type&&k.add(B.id)}))};return B(this.getChasePrizes()),B(this.getChasePetsLevelUp()),B(this.getChasePetsUltimate()),k}}it.DEFAULT_MAGICOIN_AMOUNT=1600,(0,F.Cg)([(0,Q.b)("073-6f3b"),(0,F.Sn)("design:type",Object)],it.prototype,"_featureProvider",void 0),(0,F.Cg)([(0,Q.b)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],it.prototype,"_localizer",void 0)},38156:(k,B,U)=>{"use strict";U.d(B,{n:()=>K});var F=U(8674),G=U(62459),j=U(28344),$=U(63011),H=U(66582),V=U(35120),W=U(76277),q=U(44094);class K{static hasBattlePassAccess(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("db5-fb6e"),B=(0,W.G)(j.y).enabled,U=yield k.meetsRequirements(70);return!B||U}))}static getQuestDescriptionFromDefinition(k){var B,U;return this.getQuestDescription(null!==(U=null===(B=k.metadata)||void 0===B?void 0:B.questGoalName)&&void 0!==U?U:k.completionRequirements.type,k.completionRequirements.data.target,k.localizationKey)}static getQuestDescription(k,B,U){const F=null!=U?U:`BATTLE_PASS_QUEST_${k.replace(/ /g,"").toUpperCase()}`,j=V.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);let $;return $=(null==j?void 0:j.hasText(F))?j.getText(F,B):`${q.$.toTitleCase(k)} x${B}`,$.trim().replace(/ +/g," ")}static playerMembershipMeetsRewardMembership(k){const B=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=B.hasMembership(),F=B.hasMembershipFeatureAccess($.D.ULTIMATE_MEMBERBOX);return!(!U||!F)||(U&&!F?!(k===H._$.MemberUltimateMath||k===H._$.MemberUltimateBundle):k===H._$.NonMember)}}},1959:(k,B,U)=>{"use strict";U.d(B,{A:()=>F});class F{}F.CHASE_PRIZES={coreChaseItems:[{id:11,type:"currency"},{id:139,type:"follow"},{id:181,type:"follow"},{id:27,type:"currency"}],plusChaseItems:[{id:171,type:"pet"},{id:139,type:"follow"},{id:181,type:"follow"},{id:300,type:"follow"},{id:39,type:"petHat"},{id:41,type:"petHat"},{id:27,type:"currency"},{id:27,type:"currency"}],ultraChaseItems:[{id:171,type:"pet"},{id:243,type:"pet"},{id:39,type:"petHat"},{id:41,type:"petHat"},{id:139,type:"follow"},{id:181,type:"follow"},{id:300,type:"follow"},{id:13,type:"mount"},{id:1,type:"currency"},{id:1,type:"currency"},{id:11,type:"currency"},{id:11,type:"currency"}]},F.CHASE_PRIZE_GROUP_LOC_KEYS={coreLocalizationKeys:["CORE_SHARDS","TT_CHASE_PRIZE_CORE_BUDDIES","350"],plusLocalizationKeys:["TT_CHASE_PRIZE_PLUS_MYTHICS!","TT_CHASE_PRIZE_PLUS_BUDDIES!","TT_CHASE_PRIZE_PLUS_PET_GEAR","720"],ultraLocalizationKeys:["TT_CHASE_PRIZE_ULTRA_NEW_MYTHICS","TT_CHASE_PRIZE_ULTRA_PET_GEAR","TT_CHASE_PRIZE_ULTRA_MORE_BUDDIES","TT_CHASE_PRIZE_ULTRA_MOUNT","TT_CHASE_PRIZE_ULTRA_EVEN_MORE"]},F.MAGICOIN_COUNT_TO_DISPLAY=1600},90817:(k,B,U)=>{"use strict";U.d(B,{cM:()=>G,gz:()=>z});var F,G,j=U(8674),$=U(62459),H=U(35120),V=U(73797),W=U(96810),q=U(90633),K=U(44094);!function(k){k.FtueAdvanceCallback="CAMPAIGN_REPLAY_FTUE_ADVANCE_CALLBACK",k.HardModeFtueStep="CAMPAIGN_REPLAY_HARD_MODE_FTUE_STEP"}(F||(F={})),function(k){k.NOT_STARTED="NOT_STARTED",k.STEP_1_NOOT_DIALOGUE_INTRO="STEP_1_NOOT_DIALOGUE_INTRO",k.STEP_2_CLICK_ON_DIFFICULTY_SELECTOR="STEP_2_CLICK_ON_DIFFICULTY_SELECTOR",k.STEP_3_CLICK_ON_HARD_MODE_UNLOCK="STEP_3_CLICK_ON_HARD_MODE_UNLOCK",k.STEP_4A_REQUIREMENTS_NOT_MET_CLICK_CLOSE="STEP_4A_REQUIREMENTS_NOT_MET_CLICK_CLOSE",k.STEP_5A_CLOSE_DIFFICULTY_SELECTOR="STEP_5A_CLOSE_DIFFICULTY_SELECTOR",k.STEP_6A_RESUME_WORLD_MAP_NORMAL="STEP_6A_RESUME_WORLD_MAP_NORMAL",k.STEP_4B_REQUIREMENTS_MET_CLICK_CLOSE="STEP_4B_REQUIREMENTS_MET_CLICK_CLOSE",k.STEP_5B_ENTER_HARD_MODE="STEP_5B_ENTER_HARD_MODE",k.STEP_6B_CONFIRM_ENTER_HARD_MODE="STEP_6B_CONFIRM_ENTER_HARD_MODE",k.STEP_7B_NOOT_HARD_MODE_INTRO="STEP_7B_NOOT_HARD_MODE_INTRO",k.STEP_8B_ENTER_FIREFLY_HARD_MODE="STEP_8B_ENTER_FIREFLY_HARD_MODE"}(G||(G={}));class z{constructor(){this.onFtueResolved=new $.HN0,this._funnelId=K.$.generateUID()}static get initialized(){return $.Aq$.isDefined(this._instance)}static get instance(){var k;return null!==(k=this._instance)&&void 0!==k?k:this._instance=new z}beginHardModeFtue(){return(0,j.sH)(this,void 0,void 0,(function*(){yield H.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirements(59);this._currentStep=0,this._stepPath=z.HARD_MODE_FTUE_STEPS,H.q.instance.prodigy.gameContainer.rebind(F.FtueAdvanceCallback).toConstantValue(this.advanceFtueStep.bind(this)),this.advanceFtueStep()}))}beginHardModeFirstEntryExperience(){this._currentStep=0,this._stepPath=z.HARD_MODE_FTUE_STEPS_ENTRY_ONLY,H.q.instance.prodigy.gameContainer.rebind(F.FtueAdvanceCallback).toConstantValue(this.advanceFtueStep.bind(this)),H.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(q.B.FEATURE_CAMPAIGN_REPLAY,q.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE_STARTED),this.advanceFtueStep()}advanceFtueStep(){this._currentStep++,this._currentStep>=this._stepPath.length?$.VyI.log("CampaignReplayFtueSessionTracker: FTUE session reached the end of the path",$.$bb.Info):(H.q.instance.prodigy.gameContainer.rebind(F.HardModeFtueStep).toConstantValue(this._stepPath[this._currentStep]),H.q.instance.game.broadcaster.broadcast(V.sn.HardModeFtueStepAdvanced,void 0,[this._stepPath[this._currentStep]]),this.handleFtueStepAnalytics(this._stepPath[this._currentStep]),$.VyI.log(`Advancing FTUE step: ${this._stepPath[this._currentStep]}`,$.$bb.Info))}cancelSession(){$.VyI.log("CampaignReplayFtueSessionTracker: FTUE session canceled",$.$bb.Info),H.q.instance.game.broadcaster.broadcast(V.sn.HardModeFtueCanceled),this.onFtueResolved.dispatch(),this.destroy()}completeFtue(k){$.VyI.log("CampaignReplayFtueSessionTracker: FTUE session completed",$.$bb.Info),H.q.instance.game.broadcaster.broadcast(V.sn.HardModeFtueCompleted),H.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(q.B.FEATURE_CAMPAIGN_REPLAY,q.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FTUE_COMPLETED),this.onFtueResolved.dispatch(),this.sendAnalyticsStepEvent(W.l.CampaignReplayFtueEnterHardMode,7),k&&H.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(q.B.FEATURE_CAMPAIGN_REPLAY,q.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE),this.destroy()}handleFtueStepAnalytics(k){switch(k){case G.STEP_1_NOOT_DIALOGUE_INTRO:this.sendAnalyticsStepEvent(W.l.CampaignReplayFtueMapScreenOpened,3);break;case G.STEP_3_CLICK_ON_HARD_MODE_UNLOCK:this.sendAnalyticsStepEvent(W.l.CampaignReplayFtueModal,4);break;case G.STEP_4B_REQUIREMENTS_MET_CLICK_CLOSE:this.sendAnalyticsStepEvent(W.l.CampaignReplayFtueRestrictions,5),this.sendAnalyticsStepEvent(W.l.CampaignReplayFtueQualifyForHardMode,6)}}sendAnalyticsStepEvent(k,B){const U=H.q.instance.prodigy.gameContainer.get("c47-20b6"),F={funnelName:"campaign_replay_ftue",funnelType:"tutorial",funnelId:this._funnelId,stepName:k},G={step_index:B};U.playerProgression.sendFunnelAdvancedEvent(F,G)}destroy(){this.onFtueResolved.dispose(),H.q.instance.prodigy.gameContainer.unbind(F.FtueAdvanceCallback),H.q.instance.prodigy.gameContainer.unbind(F.HardModeFtueStep),this._funnelId=null,z._instance=null}}z.HARD_MODE_FTUE_STEPS=[G.NOT_STARTED,G.STEP_1_NOOT_DIALOGUE_INTRO,G.STEP_2_CLICK_ON_DIFFICULTY_SELECTOR,G.STEP_5B_ENTER_HARD_MODE,G.STEP_6B_CONFIRM_ENTER_HARD_MODE,G.STEP_7B_NOOT_HARD_MODE_INTRO,G.STEP_8B_ENTER_FIREFLY_HARD_MODE],z.HARD_MODE_FTUE_STEPS_ENTRY_ONLY=[G.STEP_6B_CONFIRM_ENTER_HARD_MODE,G.STEP_7B_NOOT_HARD_MODE_INTRO,G.STEP_8B_ENTER_FIREFLY_HARD_MODE]},90975:(k,B,U)=>{"use strict";U.d(B,{Y:()=>V});var F=U(90633),G=U(93867),j=U(84399),$=U(35120),H=U(40295);class V{static meetsNarrativeIntroRequirements(){return j.R.isFeatureEnabled()&&G.U.isStepComplete(H.B.PuppetMasterDefeated)&&!$.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(F.B.FEATURE_CAMPAIGN_REPLAY,F.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_INTRO_SEEN)}static meetsNarrativeCatchupRequirements(){const k=$.q.instance.prodigy.gameContainer.get("306-5359");return j.R.isFeatureEnabled()&&k.getChargedLevel()>0&&!G.U.isStepComplete(H.B.PuppetMasterDefeated)&&!$.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(F.B.FEATURE_CAMPAIGN_REPLAY,F.B.BREADCRUMB_CAMPAIGN_REPLAY_CATCHUP_SEEN)}static meetsEitherCutsceneRequirement(){return V.meetsNarrativeIntroRequirements()||V.meetsNarrativeCatchupRequirements()}}},2212:(k,B,U)=>{"use strict";U.d(B,{J:()=>tt});var F=U(62459),G=U(99625),j=U(47708),$=U(97495),H=U(40295),V=U(90633),W=U(73678),q=U(35120),K=U(40392),z=U(13021),Y=U(30226),Q=U(93867),X=U(84399),Z=U(55122),J=U(90975);class tt{static shouldShowHardModeUnlockedPopup(){const k=q.q.instance.prodigy.breadcrumbManager,B=q.q.instance.prodigy.gameContainer.get("db5-fb6e");return X.R.isFeatureEnabled()&&!k.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_HARD_MODE_UNLOCKED_POPUP_SEEN)&&!k.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_HARD_MODE)&&B.meetsRequirementsDeprecated(59)}static shouldShowExpertModeUnlockedPopup(){const k=q.q.instance.prodigy.breadcrumbManager,B=q.q.instance.prodigy.gameContainer.get("db5-fb6e");return X.R.isFeatureEnabled()&&!k.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_EXPERT_MODE_UNLOCKED_POPUP_SEEN)&&!k.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_EXPERT_MODE)&&B.meetsRequirementsDeprecated(60)}static showDifficultyUnlockedPopup(k,B=(()=>null)){if(k===$.i.Regular)return F.VyI.log("There is no difficulty unlocked popup for regular difficulty",F.$bb.Warning),void B();const U=q.q.instance.prodigy.breadcrumbManager;q.q.instance.prodigy.open.prefabMenu(G.l.DifficultyUnlockedModal,B,!0,!0,!1,{DifficultyMode:k});const j=k===$.i.Hard?V.B.BREADCRUMB_HARD_MODE_UNLOCKED_POPUP_SEEN:V.B.BREADCRUMB_EXPERT_MODE_UNLOCKED_POPUP_SEEN;U.completeBreadcrumb(V.B.FEATURE_CAMPAIGN_REPLAY,j),tt.sendDifficultyUnlockedEvent(k)}static sendFeatureUnlockedEvent(k,B,U){const F={feature_name:k,feature_type:B,lock_type:U};q.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFeatureUnlockedEvent(F)}static sendDifficultyUnlockedEvent(k){this.sendFeatureUnlockedEvent(`${k}-mode`,"difficulty-mode","player-level")}static get meetsNarrativeIntroRequirements(){return J.Y.meetsNarrativeIntroRequirements()}static get meetsNarrativeCatchupRequirements(){return J.Y.meetsNarrativeCatchupRequirements()}static get shouldClearChargedLevels(){if(J.Y.meetsEitherCutsceneRequirement())return!1;return q.q.instance.prodigy.gameContainer.get("306-5359").hasChargedLevelsEnabled()}static canShowNarrativeIntro(k){if(!k)return!1;const B=k.split("-")[0];return(Y.J.isCoreZone(B)||B===W.A_.HOUSE||B===W.A_.LAMPLIGHT)&&"lamplight-B3"!==k&&(this.meetsNarrativeIntroRequirements||this.meetsNarrativeCatchupRequirements)}static shouldShowWorldMapHardModeFtue(){return q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_INTRO_SEEN)&&!q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FTUE_COMPLETED)}static shouldShowWorldMapHardModeFirstEntryDialogue(){const k=K.i.DIFFICULTY_MODE===$.i.Hard,B=q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FTUE_COMPLETED),U=!q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE);return k&&B&&U}static hasStartedHardModeFirstEntryDialogueButNeverCompleted(){const k=q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FTUE_COMPLETED),B=!q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE),U=q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_MODE_FIRST_ENTRY_DIALOGUE_STARTED);return k&&B&&U}static getHighestUnlockedDifficulty(){const k=q.q.instance.prodigy.gameContainer.get("db5-fb6e");return k.meetsRequirementsDeprecated(60)?$.i.Expert:k.meetsRequirementsDeprecated(59)?$.i.Hard:$.i.Regular}static featureDataHealthCheck(){const k=q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_CAMPAIGN_REPLAY,V.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_INTRO_SEEN),B=q.q.instance.prodigy.gameContainer.get("306-5359").data.campaignReplayProgressStep;if(k&&B===j.q6.NotStarted){q.q.instance.prodigy.gameContainer.get("ba4-af03").setProgress({step:j.q6.HardModeIntroduced})}}static shouldShowHardModePbfBannerWarning(){var k;const B=q.q.instance.prodigy.gameContainer.get("306-5359");return X.R.isFeatureEnabled()&&!Q.U.isStepComplete(H.B.PuppetMasterDefeated)&&!1===(null===(k=B.difficultyUnlocks)||void 0===k?void 0:k.hard)&&B.getLevel()===Z.s.maxLevelConfig.regular}static isZoneMapDifficultyModeAgnostic(k){const B=k.split("-")[0],U=q.q.instance.prodigy.world.getZone(B);return!0===(null==U?void 0:U.difficultyModeAgnostic)||z.w.isTitanMap(k)}}},72379:(k,B,U)=>{"use strict";U.d(B,{g:()=>et});var F=U(8674),G=U(62459),j=U(79687),$=U(99625),H=U(63011),V=U(38170),W=U(35120),q=U(1195),K=U(19586),z=U(96494),Y=U(90633),Q=U(13956),X=U(84642),Z=U(35571),J=U(84399),tt=U(55122);let et=class{get chargedLevelsProgressData(){return this._chargedLevelsProgressData}get showedThisSession(){return this._showedThisSession}get hasAccessToChargedLevels(){return this._loggedInPlayer.player.getLevel()>=tt.s.activePlayerLevelCap&&!this.isAboutToStartHardMode}get isPlayerInGoodStanding(){return this._chargedLevelsProgressData.chargedLevel>0}get isLosingLevels(){var k;return(null===(k=this._chargedLevelsProgressData)||void 0===k?void 0:k.recuperableXp)>0}get isAboutToStartHardMode(){return J.R.isFeatureEnabled()&&this._featureRequirements.meetsRequirementsDeprecated(66)}get shouldShowRetention(){return X.x.arePopupsEnabled&&this.hasAccessToChargedLevels&&!this._showedThisSession&&this.isLosingLevels}get shouldShowConversionModal(){var k,B;const U=this.hasAccessToChargedLevels&&!this._loggedInPlayer.player.hasMembershipFeatureAccess(H.D.CHARGED_LEVELS_DECAY_IMMUNITY)&&null!==(B=null===(k=this._loggedInPlayer.player.data.chargedLevelData)||void 0===k?void 0:k.hasJustReachedConversionMilestone)&&void 0!==B&&B;return this._loggedInPlayer.player.data.chargedLevelData.hasJustReachedConversionMilestone=!1,U}get shouldShowDecayImmunityModal(){var k;const B=this._loggedInPlayer.player.hasMembershipFeatureAccess(H.D.CHARGED_LEVELS_DECAY_IMMUNITY),U=this.hasAccessToChargedLevels&&B&&G.Aq$.isDefined(null===(k=this._loggedInPlayer.player.data.chargedLevelData)||void 0===k?void 0:k.decayImmunityExpiryDate)&&!this._breadcrumbManager.isBreadcrumbComplete(Y.B.FEATURE_CHARGED_LEVELS,Y.B.BREADCRUMB_DECAY_IMMUNITY_MODAL_SEEN);return!B&&this._breadcrumbManager.isBreadcrumbComplete(Y.B.FEATURE_CHARGED_LEVELS,Y.B.BREADCRUMB_DECAY_IMMUNITY_MODAL_SEEN)&&this._breadcrumbManager.resetBreadcrumb(Y.B.FEATURE_CHARGED_LEVELS,Y.B.BREADCRUMB_DECAY_IMMUNITY_MODAL_SEEN),U}get shouldShowDecayImmunityNotification(){var k,B,U;const F=new Date,G=new Date(null===(k=this.chargedLevelsProgressData)||void 0===k?void 0:k.decayImmunityExpiryDate),j=V.r.daysBetween(F,G);if(F.getTime()>=G.getTime()||isNaN(j)||j<=0)return!1;return this._loggedInPlayer.player.hasMembershipFeatureAccess(H.D.CHARGED_LEVELS_DECAY_IMMUNITY)&&(null!==(U=null===(B=this._loggedInPlayer.player.data.unsecureChargedLevelData)||void 0===B?void 0:B.decayImmunityNotificationDays)&&void 0!==U?U:0)!==j&&!this.shouldShowDecayImmunityModal}init(k){this._chargedLevelsProgressData=k,this._loggedInPlayer.player.setChargedLevelsData(k)}abandonChargedLevelLosses(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._loggedInPlayer.player,B=k.getStars(),{chargedLevel:U,chargedLevelCumulativeXp:F}=k.data.chargedLevelData,G=yield this._chargedLevelsNetworkHandler.abandonChargedLevelLosses();k.setChargedLevelsData(G);W.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendPlayerProgressionRestrictedEvent({progressionType:"Charged Level",progressionAction:"charge_reset",progressionValue:`${U}`,creatureName:"Player"},{pointType:"stars",pointCount:B+F})}))}recuperateChargedLevelLosses(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=this._loggedInPlayer.player,F=U.getStars(),{chargedLevel:G,chargedLevelXpForCurrentLevel:j}=U.data.chargedLevelData,$=yield this._chargedLevelsNetworkHandler.recuperateChargedLevelLosses();this._loggedInPlayer.player.setChargedLevelsData($);W.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendPlayerProgressionRestrictedEvent({progressionType:"Charged Level",progressionAction:"charge_renewed",progressionValue:`${G}`,creatureName:"Player",currencyType:k,currencyAmount:B},{pointType:"stars",pointCount:j+F})}))}showChargedLevelsRetentionModal(k){if(!this.shouldShowRetention)return void k();this._showedThisSession=!0;const B=this._loggedInPlayer.player.playerContainer;(null==B?void 0:B.isFacingLeft())&&B.flip(),this.showModal($.l.Charged_level_retention,k)}showChargedLevelsConversionModal(k){this.showModal($.l.ContextualPrompt_ChargedLevelsUltraUpsell,k)}showChargedLevelsDecayImmunityModal(k){this.showModal($.l.ChargedLevelsDecayImmunityModal,k)}showChargedLevelsDecayImmunityNotification(){var k;const B=new Date,U=new Date(null===(k=this.chargedLevelsProgressData)||void 0===k?void 0:k.decayImmunityExpiryDate),F=V.r.daysBetween(B,U);if(B.getTime()>=U.getTime()||isNaN(F)||F<=0)return;const j=W.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),$=j.getText("CHARGED_LEVEL_DECAY_IMMUNITY_NOTIFICATION_TITLE"),H=j.getText("CHARGED_LEVEL_DECAY_IMMUNITY_NOTIFICATION_BODY",F,1===F?"":"s");W.q.instance.prodigy.notifications.initGenericNotification(K._.CHARGEDLEVELFREEZECOUNTDOWN,{modal:{action:"",title:$,body:H}}),this._loggedInPlayer.player.data.unsecureChargedLevelData.decayImmunityNotificationDays=F,this._loggedInPlayer.player.forceSaveCharacter()}showModal(k,B){W.q.instance.prodigy.open.prefabMenu(k,B).createContainer=!1}};(0,F.Cg)([(0,Q.b)("639-22b8"),(0,F.Sn)("design:type",Z.e)],et.prototype,"_chargedLevelsNetworkHandler",void 0),(0,F.Cg)([(0,Q.b)("e20-0fb0"),(0,F.Sn)("design:type",q.E)],et.prototype,"_loggedInPlayer",void 0),(0,F.Cg)([(0,Q.b)("12f-4e29"),(0,F.Sn)("design:type",z.F)],et.prototype,"_breadcrumbManager",void 0),(0,F.Cg)([(0,Q.b)("db5-fb6e"),(0,F.Sn)("design:type",Object)],et.prototype,"_featureRequirements",void 0),et=(0,F.Cg)([(0,j.injectable)()],et)},37773:(k,B,U)=>{"use strict";U.d(B,{e:()=>$});var F=U(35120),G=U(55122),j=U(97317);class ${static getActivePlayerChargedLevelTier(){const k=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return this.getPlayerChargedLevelTier(k)}static get activePlayerHasChargedLevels(){return F.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getChargedLevel()>0}static getPlayerChargedLevelTier(k){return this.getChargedLevelTierFromLevel(k.getChargedLevel())}static getChargedLevelTierFromLevel(k){return k>=j.QT.MAX_NONMEMBER_CHARGED_LEVEL?j.Bv.MAX_CHARGE:k>=1?j.Bv.CHARGED:j.Bv.NO_CHARGE}static formatDuelOpponentChargedLevel(k){const B=G.s.maxLevelConfig.regular;if(k.data.level>B){const U=k.data.level-B;k.data.chargedLevelData={chargedLevel:U,chargedLevelCap:U},k.data.level=B}}}},34578:(k,B,U)=>{"use strict";var F;U.d(B,{m:()=>F}),function(k){k.ChargedLevelAnimationTier="CHARGED_LEVEL_ANIMATION_TIER",k.ShowChargedLevels="SHOW_CHARGED_LEVELS",k.Retention="CHARGED_LEVELS_RETENTION"}(F||(F={}))},97317:(k,B,U)=>{"use strict";var F,G,j;U.d(B,{Bv:()=>F,QT:()=>j,Vh:()=>$,X$:()=>G}),function(k){k.NO_CHARGE="NO_CHARGE",k.CHARGED="CHARGED",k.MAX_CHARGE="MAX_CHARGE"}(F||(F={})),function(k){k.HIDDEN="HIDDEN",k.IDLE="IDLE",k.REVEAL_TO_IDLE="REVEAL_TO_IDLE",k.CHARGE_LOST="CHARGE_LOST",k.CHARGE_KEPT="CHARGE_KEPT"}(G||(G={})),function(k){k[k.MAX_NONMEMBER_CHARGED_LEVEL=25]="MAX_NONMEMBER_CHARGED_LEVEL",k[k.MAX_MEMBER_CHARGED_LEVEL=50]="MAX_MEMBER_CHARGED_LEVEL"}(j||(j={}));const $="#068200"},65732:(k,B,U)=>{"use strict";var F;U.d(B,{E:()=>F}),function(k){k.PlayerChargedLevel="PLAYER_CHARGED_LEVEL",k.PlayerChargedLevelCap="PLAYER_CHARGED_LEVEL_CAP",k.ChargedCreatureEffectTier="CHARGED_CREATURE_EFFECT_TIER",k.ChargedCreatureEffectDisplayType="CHARGED_CREATURE_EFFECT_DISPLAY_TYPE",k.ChargeRevealEffectEnabled="CHARGE_REVEAL_EFFECT_ENABLED",k.MemberRetentionGroup="MEMBER_RETENTION_GROUP",k.ShowXpBar="CHARGED_LEVELS_SHOW_XP_BAR",k.ShowTierUp="CHARGED_LEVELS_SHOW_TIER_UP",k.LevelTierIdleAnimation="CHARGED_LEVELS_TIER_IDLE_ANIMATION",k.LevelTierUpgradeAnimation="CHARGED_LEVELS_TIER_UPGRADE_ANIMATION"}(F||(F={}))},47969:(k,B,U)=>{"use strict";U.d(B,{m:()=>z});var F=U(8674),G=U(62459),j=U(79687),$=U(35537),H=U(95891),V=U.n(H);let W=class{constructor(){this._cooldowns=Promise.resolve({})}get cache(){return this._cooldowns.then((k=>V().clone(k)))}isCooldownActive(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.getCooldownTimestamp(k);if(void 0===B)return!1;return B>(yield this.getTimeNow())}))}isCooldownExpired(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.getCooldownTimestamp(k);if(void 0===B)return!1;return B<=(yield this.getTimeNow())}))}getCooldownRemainingTime(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.getCooldownTimestamp(k);if(void 0===B)return 0;const U=yield this.getTimeNow();return Math.max(0,B-U)}))}getCooldownTimestamp(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.isValidCooldownKey(k))return(yield this._cooldowns)[k]}))}isValidCooldownKey(k){return V().isString(k)?!V().isEmpty(k)||(this.logError("[BaseCooldownDataProvider] Invalid cooldown key: Cooldown key cannot be an empty string."),!1):(this.logError("[BaseCooldownDataProvider] Invalid cooldown key: Cooldown key must be a string. Got: "+typeof k),!1)}};W=(0,F.Cg)([(0,j.injectable)()],W);var q,K=U(69698);let z=class extends W{constructor(){super(...arguments),this._cooldownRecord={},this[q]="cooldownChanges"}getTimeNow(){return this._timeManager.getServerTimeMs()}[(q=$.sE,$.JN)](k){return(0,F.sH)(this,void 0,void 0,(function*(){G.Aq$.isDefined(k.cooldowns)&&this.setCooldowns(k.cooldowns)}))}setCooldowns(k){this._cooldowns=Promise.resolve(k),this._cooldownRecord=k}logError(k){G.VyI.log(`[CooldownsDataStore] ${k}`,G.$bb.Error)}isCachedCooldownActive(k){const B=this._cooldownRecord[k];return void 0!==B&&B>Date.now()}};(0,F.Cg)([(0,j.inject)("a03-308f"),(0,F.Sn)("design:type",K.V)],z.prototype,"_timeManager",void 0),z=(0,F.Cg)([(0,j.injectable)()],z)},29638:(k,B,U)=>{"use strict";U.d(B,{S:()=>H});var F=U(8674),G=U(62459),j=U(99625),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this.hideStartButton=!1}run(){this.hideStartButton?(this.startButton.active=!1,this._prefabLoader.loadWithDependenciesFromGUID(j.l.AdventureMap_ScrollViewLarge,this.gameObject).catch(G.RQr.createHandler("Failed to load AdventureMapScrollBox"))):this._prefabLoader.loadWithDependenciesFromGUID(j.l.AdventureMap_ScrollViewSmall,this.gameObject).catch(G.RQr.createHandler("Failed to load AdventureMapScrollBox"))}};(0,F.Cg)([(0,G.Cdj)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],H.prototype,"_prefabLoader",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"hideStartButton",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],H.prototype,"startButton",void 0),H=(0,F.Cg)([(0,G.EVk)("InitAdventureMapScrollBox",$.Y.adventureUi)],H)},48235:(k,B,U)=>{"use strict";U.d(B,{W:()=>K});var F=U(8674),G=U(62459),j=U(65240),$=U(35120),H=U(73797),V=U(48417),W=U(76546);class q extends W.D{checkMemberUpgradeReward(){return(0,F.sH)(this,arguments,void 0,(function*(k={}){return this.makeCloudscriptRequest(V.D.MembershipUpgradeReward.CheckMemberUpgradeReward,k,!1)}))}getCollectedRewardsData(){return(0,F.sH)(this,arguments,void 0,(function*(k={}){return this.makeCloudscriptRequest(V.D.MembershipUpgradeReward.GetCollectedRewardsData,k,!1)}))}collectMemberUpgradeReward(){return(0,F.sH)(this,arguments,void 0,(function*(k={}){return this.makeCloudscriptRequest(V.D.MembershipUpgradeReward.CollectMemberUpgradeReward,k,!1)}))}}class K{static get hasRewardAvailable(){var k;return null!==(k=this._hasRewardAvailable)&&void 0!==k&&k}static getCollectedRewardsData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.networkHandler.getCollectedRewardsData()}))}static checkMemberUpgradeReward(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.networkHandler.checkMemberUpgradeReward();return this._hasRewardAvailable=null==k?void 0:k.hasRewardAvailable,this.hasRewardAvailable}))}static collectMemberUpgradeReward(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=$.q.instance.prodigy.gameContainer.get("c47-20b6").item.beginSecureItemTransaction(),B=yield this.networkHandler.collectMemberUpgradeReward();if(!G.Aq$.isDefined(B))return G.VyI.log("Member Upgrade Reward is empty",G.$bb.Error),k.flush({}),[];const U=B.map((k=>{const{type:B,id:U,quantity:F}=k;if(!(F<=0))return{ID:U,type:B,N:F}})).filter(G.Aq$.isDefined);if(U.length>0){let k=!1;for(const B of U)if("currency"===B.type&&27===B.ID){k=!0;break}k&&$.q.instance.game.broadcaster.broadcast(H.Lk.HardCurrencyPurchased)}return k.flush({source_type:j.C.ConversionOffer}),U}))}}K.networkHandler=new q},45024:(k,B,U)=>{"use strict";U.d(B,{e:()=>$});var F=U(35120),G=U(62459),j=U(30226);class $ extends class{constructor(k,B,U,F,G,j){this.game=null,this.player=null,this.stateName=null,this.questId=0,this.defaultValue=null,this.completeValue=null,this.game=k,this.player=B,this.stateName=U,this.questId=F,this.defaultValue=G,this.completeValue=j}isInitialized(){return G.Aq$.isDefined(this.player.state.get(this.stateName))}init(){this.player.state.set(this.stateName,{questId:this.questId,dateId:j.J.getDateId(),questState:this.defaultValue})}isComplete(){return this.player.state.get(`${this.stateName}-questState`)===this.completeValue}complete(){this.player.state.set(`${this.stateName}-questState`,this.completeValue)}hasDateIdChanged(){return j.J.getDateId()!==this.player.state.get(`${this.stateName}-dateId`)}}{constructor(k,B){super(k,B,$.data.stateName,$.data.questId,$.data.defaultValue,$.data.completeDialogue)}getSpawn(){const k=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=(new Date).getDate()+k.getLatestClassIDLegacy();return this.game.seededRandom.pick($.data.spawns,B)}}$.data={stateName:"world-dailyQuests-0",questId:0,defaultValue:0,completeValue:1,completeDialogue:8,bonusStars:10,spawns:[{location:"forest-B7",dialogue:3},{location:"skywatch-A0",dialogue:5},{location:"bonfire_spire-A1",dialogue:6},{location:"shipwreck_shore-C12",dialogue:7},{location:"shiverchill-A11",dialogue:7}]}},43518:(k,B,U)=>{"use strict";U.d(B,{M:()=>z});var F=U(8674),G=U(28344),j=U(58776),$=U(34829),H=U(96535),V=U(76277),W=U(13956),q=U(69698),K=U(85985);class z{static hasDailyLoginCalendarAccess(){return(0,F.sH)(this,void 0,void 0,(function*(){return!(0,V.G)(G.y).enabled||this._featureRequirements.meetsRequirements(71)}))}static canAutoSurfaceDailyLoginCalendar(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._activePlayer.hasCompletedTutorial())return!1;if(!(yield z.hasDailyLoginCalendarAccess()))return!1;if(!K.J.showDailyLoginCalendar())return!1;if(this._activePlayer.data.dailyLoginCalendarSuppress)return!1;const[k,B,U]=yield Promise.all([z.isTaskReadyToCollect(),z.hasStandardTrackEnded(),z.hasUltimateTrackEnded()]);return k&&!B&&!U}))}static isTaskReadyToCollect(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this._timeManager.getServerTimeMs(),U=(yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata()).endDate,F=yield this.getProgressOfTaskInProgress(k);return Math.min(null!=F?F:U,U)<=B}))}static getProgressOfTaskInProgress(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;const F=this._timeManager.getServerTimeMs(),G=yield this._dailyLoginCalendarQuestManager.getActiveStandardTrack(),H=null!=k?k:G.find((k=>k.taskProgress.status===j.t.IN_PROGRESS)),V=null!==(U=null===(B=null==H?void 0:H.taskProgress.data)||void 0===B?void 0:B.progress)&&void 0!==U?U:0;return V-F>=2*$.A.DAY_IN_MS?0:V}))}static hasUltimateTrackEnded(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._timeManager.getServerTimeMs();return(yield this._dailyLoginCalendarQuestManager.getActiveUltimateTrackMetadata()).endDate<=k}))}static hasStandardTrackEnded(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._timeManager.getServerTimeMs();return(yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata()).endDate<=k}))}}(0,F.Cg)([(0,W.b)("306-5359"),(0,F.Sn)("design:type",H.W)],z,"_activePlayer",void 0),(0,F.Cg)([(0,W.b)("a03-308f"),(0,F.Sn)("design:type",q.V)],z,"_timeManager",void 0),(0,F.Cg)([(0,W.b)("a71-dfcf"),(0,F.Sn)("design:type",Function)],z,"_dailyLoginCalendarQuestManager",void 0),(0,F.Cg)([(0,W.b)("db5-fb6e"),(0,F.Sn)("design:type",Object)],z,"_featureRequirements",void 0)},10730:(k,B,U)=>{"use strict";U.d(B,{v:()=>j});var F=U(35120),G=U(88022);class j{constructor(k){this._dungeonStartRoomExitAreaEvent=null,this.id=k}setup(k){this._map=k;const B=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(0===this.id){k.toggleDynamicLayer(k.game,1,!0,0),this._dungeonStartRoomExitAreaEvent=k.addAreaEvent(k.game,k.screen,{x:640,y:180,w:120,h:120,canReTrigger:!0},null,null,null,(()=>{const U=B.backpack.hasItem("currency",18);F.q.instance.prodigy.open.dungeonExitMenu(k.zone.ID,5,U,!1,null,(()=>{this.moveOffDungeonStartRoomExit()}))}));const U=F.q.instance.prodigy.create.sprite(640,180,G._.General_core_json,"empty",{x:.5,y:.5},null,200,200);U.events.onInputUp.add((()=>{k.walkToDoorway(640,220,null)})),U.alpha=0,U.inputEnabled=!0,k.screen.content.addChild(U)}else 1===this.id&&k.addAreaEvent(k.game,k.screen,{x:640,y:400,w:150,h:150,canReTrigger:!0},null,null,null,(()=>{const U=B.backpack.hasItem("currency",18);U<5?F.q.instance.prodigy.open.dungeonExitMenu(k.zone.ID,5,U):k.zone.openWheel(k.screen,k.zone.prizeWheelId)}))}moveOffDungeonStartRoomExit(){if(!this._dungeonStartRoomExitAreaEvent)return;const k=this._map.screen.user;k.setValidPath(this._map.screen.path,this._dungeonStartRoomExitAreaEvent.x,k.y+k.height/2)}}},28930:(k,B,U)=>{"use strict";var F;U.d(B,{O:()=>F}),function(k){k[k.North=0]="North",k[k.East=1]="East",k[k.South=2]="South",k[k.West=3]="West"}(F||(F={}))},63343:(k,B,U)=>{"use strict";U.d(B,{E:()=>$});var F=U(62459),G=U(35120),j=U(96810);class ${static sendFunnelAdvancedEvent(k,B){const U=G.q.instance.prodigy.gameContainer.get("c47-20b6"),F=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;U.playerProgression.sendFunnelAdvancedEvent({funnelName:"Defeated Pets",funnelType:"dynamic_store",stepName:k,funnelId:F.getDefeatedPetsData().featureFunnelId},{step_index:B},!0)}static recordDefeatedPetsFunnelStep(k){const B=G.q.instance.prodigy.gameContainer.get("306-5359"),U=B.getDefeatedPetsData(),j=this.STEP_NAME_TO_INDEX[k];return!(!F.Aq$.isDefined(j)||U.funnelStepsSeen[j])&&(U.funnelStepsSeen[j]=!0,B.setDefeatedPetsData(U),this.sendFunnelAdvancedEvent(k,j),!0)}}$.STEP_NAME_TO_INDEX={[j.l.DynamicStoreDefeatedPet]:1,[j.l.DynamicStoreLostPetsMain]:2,[j.l.DynamicStoreLostPetsTab]:3,[j.l.DynamicStoreLostPetViewed]:4,[j.l.DynamicStoreLostPetPurchased]:5}},71391:(k,B,U)=>{"use strict";U.d(B,{D:()=>W});var F=U(8674),G=U(62459),j=U(17446),$=U(8770),H=U(80060),V=U(30226);let W=class extends G.uAl{constructor(){super(...arguments),this.expectingMultipleAdditions=!1,this._isVisible=!1,this._index=0}create(){super.create();for(const k of this._labelsParent.children)k.active=!1}show(){return(0,F.sH)(this,void 0,void 0,(function*(){this._index=0,this._isVisible=!0,this._runningAddition=Promise.resolve(),this._show.playAnimation()}))}addPet(k){this._runningAddition=this._runningAddition.then((()=>(0,F.sH)(this,void 0,void 0,(function*(){return this.addAnimationSequence(k)})))).catch(G.RQr.createHandler("Failed to animate added pet"))}hide(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this._isVisible){this._hide.playAnimation(),this._isVisible=!1;for(const k of this._labelsParent.children)k.active=!1}}))}addAnimationSequence(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B;0===this._index&&this._firstIncrementDecoration.playAnimation(),this._increment.playAnimation();const U=G.Egh.timeout(this.findEventMillis(this._increment,"next"));if(this._index++,yield G.Egh.timeout(this.findEventMillis(this._increment,"incrementCounter")),this._index<=this._labelsParent.children.length){const U=null!==(B=k.rarity)&&void 0!==B?B:j.E.Common,F=this._labelsParent.children[this._index-1];F.active=!0,H.d.updateInjectedValues(F,{LABEL_TEXT:`${V.J.convertRarityToText(U)}!`,LABEL_FILL:G.TZp.decimalToHex($.TZ.lerpRgb($.Hh[U],G.yQ0.WHITE,this._labelFillWhiteMix)),LABEL_STROKE:G.TZp.decimalToHex($.TZ.lerpRgb($.Hh[U],G.yQ0.BLACK,this._labelStrokeBlackMix)),LABEL_USE_FAST_IN:this.expectingMultipleAdditions})}else G.VyI.log("Attempted to display way too many defeated pet rarities",G.$bb.Warning);yield U}))}findEventMillis(k,B){var U;const F=k.timeline.tweens.find((k=>{var U;return(null===(U=k.customData)||void 0===U?void 0:U.eventName)===B}));return F?1e3*(null!==(U=F.how.delay)&&void 0!==U?U:0):0}};(0,F.Cg)([(0,G.MnK)(G.bTj),(0,G.YLv)("Animation to display the icon, played before any additions start"),(0,F.Sn)("design:type",G.bTj)],W.prototype,"_show",void 0),(0,F.Cg)([(0,G.MnK)(G.bTj),(0,G.YLv)("Animation to hide the icon, played after all additions end"),(0,F.Sn)("design:type",G.bTj)],W.prototype,"_hide",void 0),(0,F.Cg)([(0,G.MnK)(G.bTj),(0,G.YLv)("Played alongside the first addition after showing"),(0,F.Sn)("design:type",G.bTj)],W.prototype,"_firstIncrementDecoration",void 0),(0,F.Cg)([(0,G.MnK)(G.bTj),(0,G.YLv)("Played on each addition, in sequence. \nThe timeline should have two steps with a customData.eventName of: \nnext: Moment when the next addition should start\nincrementCounter: Moment when the counter text should update"),(0,F.Sn)("design:type",G.bTj)],W.prototype,"_increment",void 0),(0,F.Cg)([(0,G.ERr)(),(0,G.YLv)("Object containing a bunch of labels, which will be enabled in sequence as the counter updates"),(0,F.Sn)("design:type",G._mx)],W.prototype,"_labelsParent",void 0),(0,F.Cg)([(0,G.g11)(),(0,G.YLv)("Portion of white to mix with the rarity color for the label text fill"),(0,F.Sn)("design:type",Number)],W.prototype,"_labelFillWhiteMix",void 0),(0,F.Cg)([(0,G.g11)(),(0,G.YLv)("Portion of black to mix with the rarity color for the label text stroke/outline"),(0,F.Sn)("design:type",Number)],W.prototype,"_labelStrokeBlackMix",void 0),W=(0,F.Cg)([(0,G.EVk)("DefeatedPetsBattleIcon")],W)},76016:(k,B,U)=>{"use strict";U.d(B,{P:()=>F});var F,G=U(8674),j=U(62459),$=U(64270),H=U(15821),V=U(26932),W=U(13956),q=U(64868);!function(k){k.Available="DYNAMIC_STORE_ACCESS_POINT_AVAILABLE",k.HasNotification="DYNAMIC_STORE_ACCESS_POINT_HAS_NOTIFICATION",k.WantsAttention="DYNAMIC_STORE_ACCESS_POINT_WANTS_ATTENTION",k.MillisecondsRemaining="DYNAMIC_STORE_ACCESS_POINT_MILLISECONDS_REMAINING",k.StoreClosedCallback="DYNAMIC_STORE_ACCESS_POINT_STORE_CLOSED",k.JustSeenSegmentedOfferPopup="DYNAMIC_STORE_ACCESS_POINT_JUST_SEEN_SEGMENTED_OFFER_POPUP"}(F||(F={}));let K=class extends V.z{bindContext(){const k=q._.hasDefeatedPetStore();this.updateValue(F.Available,k),k&&(this.updateValue(F.HasNotification,!1),this.updateValue(F.StoreClosedCallback,(()=>{this.refresh().catch(j.RQr.createHandler("Failed to update dynamic store access point"))})),this.refresh().catch(j.RQr.createHandler("Failed to initialize dynamic store access point")))}unbindContext(){this.updateValue(F.Available,!1),this.updateValue(F.WantsAttention,!1),this.updateValue(F.HasNotification,!1),this.updateValue(F.MillisecondsRemaining,null),this.updateValue(F.StoreClosedCallback,null)}refresh(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U;const{store:G,offerReadById:j}=(yield this._dynamicStore.getDynamicStoreUIData({storeKey:$.GA.PetShop})).expect("failed to get store data"),V=Object.values(j).some((k=>!k));this.updateValue(F.HasNotification,V);const W=G.sections.find((k=>k.id===$.Xx.DefeatedPets));if(H.A.isDefined(W)&&(null!==(B=null===(k=W.offers)||void 0===k?void 0:k.length)&&void 0!==B?B:0)>0){const k=(null!==(U=W.expiresAt)&&void 0!==U?U:0)-Date.now();k>0&&this.updateValue(F.MillisecondsRemaining,k)}}))}};(0,G.Cg)([(0,W.b)("84d-05d4"),(0,G.Sn)("design:type",Object)],K.prototype,"_dynamicStore",void 0),K=(0,G.Cg)([(0,j.EVk)("DynamicStoreAccessPoint")],K)},77992:(k,B,U)=>{"use strict";U.d(B,{W:()=>Ot});var F,G=U(8674),j=U(62459),$=U(88022),H=U(99625),V=U(34656),W=U(64270),q=U(39324),K=U(58776),z=U(8394),Y=U(66582),Q=U(88131),X=U(15821),Z=U(35120),J=U(83133),tt=U(94566),et=U(77938),it=U(28047),st=U(85540),nt=U(43858),at=U(46784),rt=U(65050),ot=U(41674),ht=U(90744),ct=U(13956),dt=U(642),lt=U(95057),ut=U(16847),ft=U(21097),bt=U(79424),pt=U(89192),vt=U(53661),gt=U(88217),mt=U(77713),yt=U(11191),_t=U(10711),Et=U(6719),wt=U(80060),Tt=U(86283),St=U(64868),At=U(55080),Ct=U(96797);let Ot=F=class extends it.v{constructor(){super(...arguments),this.onPurchaseStarted=this.createTidySignal(),this.onPurchaseFinished=this.createTidySignal(),this.onPurchaseFailed=this.createTidySignal(),this.onTabSelected=this.createTidySignal(),this.onItemSelected=this.createTidySignal(),this.onWalletsLoaded=this.createTidySignal(),this.onStoreLoaded=this.createTidySignal(),this.onStoreSelected=this.createTidySignal(),this._selectedCardData=null,this._walletsLoading=!1}create(){super.create(),this._walletsLoading=!0}postCreate(){super.postCreate(),this.addListenerToSignal(this._tabSpawner.onPrefabSpawned,(k=>this.onTabLoaded(k))),this._gameNativeAppNotificationProvider.triggerNotification({id:q.fK.ShopVisitNotification})}initialize(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G,$,q,K,z,Y,Q,tt,et;if(!X.A.isDefined(k))return void j.VyI.log("Dynamic Store: Error initializing store: no valid data",j.$bb.Error);this._shelfScrollLink.scrollToTop(),this._data=k;const{store:it,offerReadById:st,specialOffer:at,storeKey:rt}=k,{sections:ot}=it;null===(B=this.headerNavigation)||void 0===B||B.setSelectedTabForKey(null!=rt?rt:"");const ht=[],ct=[];for(const k of ot){const{offers:B}=k;!V.j.specialOfferSectionHasContent(k,at)&&(0,_t.ty)(k)||(ht.push(this.createInjectedTabData(k,B.every((k=>st[k.task.id])))),k.id===W.Xx.SpecialOffer&&at?ct.push(...this.addSpecialOfferShelf(at,k)):ct.push(...this.addItemsSection(k,B,st)))}this._tabSpawner.destroySpawnedPrefabs();const dt=ht.map((k=>k.DYNAMIC_STORE_TAB_ICON[0]));if(yield Z.q.instance.prodigy.load.assetsAsPromise(dt),null===(F=null===(U=this.gameObject)||void 0===U?void 0:U.isDestroyed)||void 0===F||F)return;const[lt]=yield Promise.all([this._shelfSpawner.spawnPrefabsWithData(ct),this._tabSpawner.spawnDefaultPrefabsFromDataArray(ht)]);if(null===($=null===(G=this.gameObject)||void 0===G?void 0:G.isDestroyed)||void 0===$||$)return;for(const k of lt){const{config:B,attachedObject:U}=k,F=null==k?void 0:k.GameObject;if(!X.A.isDefined(F))break;switch(null==B?void 0:B.prefabGuid){case H.l.DynamicStoreSectionHeader:const G=null!==(q=F.findComponent(bt.D))&&void 0!==q?q:F.addComponent(bt.D);G.stateId=this._shelfScrollLink.contextId,G.isTab=!1,G.register(null==B?void 0:B.data.DYNAMIC_STORE_SHELF_CATEGORY),F.hasComponent(gt.B)||F.addComponent(gt.B),null===(z=null===(K=F.parent)||void 0===K?void 0:K.findComponent(yt.N))||void 0===z||z.triggerSort(),k.keepAlive=!0;break;case H.l.StoreItemCard:const j=null==U?void 0:U.findComponent(J.l);if(X.A.isDefined(j)&&(this._itemCardToggleGroup.addSelectable(j),this._selectedCardData)){const k=null===(Y=this._selectedCardData.dynamicStoreData)||void 0===Y?void 0:Y.offers,B=null==U?void 0:U.findComponent(nt.j).getItemData();k&&(null===(Q=null==B?void 0:B.dynamicStoreData)||void 0===Q?void 0:Q.offers)&&k[0].task.id===B.dynamicStoreData.offers[0].task.id&&j.setSelected(!0)}case H.l.DynamicStoreBundlesPanel:default:F.findComponents(gt.B).map((k=>k.destroy())),null===(et=null===(tt=F.parent)||void 0===tt?void 0:tt.findComponent(yt.N))||void 0===et||et.triggerSort(),k.keepAlive=!1}}this.setupWallets();const ut=this.getInjectedValue("DYNAMIC_STORE_SCROLL_TO");X.A.isDefined(ut)&&ht.find((k=>k.DYNAMIC_STORE_SHELF_CATEGORY===ut))&&this._shelfScrollLink.scrollToGroup(ut),this.onStoreLoaded.dispatch()}))}refreshStoreContents(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.initialize(this._data)}))}notifyWalletsLoaded(){this._walletsLoading=!1,this.onWalletsLoaded.dispatch()}setupWallets(){var k;this._walletMap=new Map,null===(k=this._walletContainer)||void 0===k||k.findComponentsInChildren(ut.n).forEach((k=>{this._walletMap.set(k.currencyID,{display:k,tooltipX:k.GameObject.transform.worldPosition.x,tooltipY:k.GameObject.transform.worldPosition.y})}))}createSectionShelfData(k,B,U){var F,G;if(0===B.length)return[{prefabGuid:H.l.DynamicStoreEmptySection,data:{DYNAMIC_STORE_SHELF_EMPTY_TITLE:null===(F=k.emptySectionInfo)||void 0===F?void 0:F.title,DYNAMIC_STORE_SHELF_EMPTY_SUBTITLE:null===(G=k.emptySectionInfo)||void 0===G?void 0:G.subtitle}}];const $=(0,_t.K8)(B,U),W=[],q=St._.areBundlesEnabled(),[Q,J]=$.reduce((([k,B],U)=>{var F,G;return null!==(G=null===(F=U.additionalItems)||void 0===F?void 0:F.length)&&void 0!==G&&G?q&&!(0,st.w)(U)&&k.push(U):B.push(U),[k,B]}),[[],[]]),tt=Q.map((B=>{var U;const F=B.dynamicStoreData.isNew,G=B.additionalItems.map((k=>({[vt.AP.ItemCardData]:{item:et.t.getItem(k.type,k.ID),quantity:k.N},[vt.AP.ItemCardIsNew]:F})));let $;const H=null===(U=B.dynamicStoreData)||void 0===U?void 0:U.offers.find((k=>k.progress.status!==K.t.COMPLETE));X.A.isDefined(null==H?void 0:H.expiresAt)&&($=H.expiresAt-Z.q.instance.prodigy.timeManager.getLocalTimeMs());const W=(0,z.p)("currency",B.currencyID)&&this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(B.currencyAmount),q=H?V.j.getItemRewards(H.task):[],Q=(0,_t.H9)(q)&&this._player.getMemberTier()===Y._$.NonMember,J=(0,_t.$U)(q,this._player.getLevel()),tt=q.reduce(((k,B)=>{var U,F,G;return Math.max(k,null!==(G=null===(F=null===(U=et.t.getItem(B.type,B.ID))||void 0===U?void 0:U.data)||void 0===F?void 0:F.lockLevel)&&void 0!==G?G:0)}),0),it=X.A.isDefined(B.item.ID)&&!Tt.D.hasBeenRescuedPreviously(this._player,B.item.ID);return{prefabGuid:this.getBundlePrefab(k),data:{DYNAMIC_STORE_BUNDLE_OFFER_TITLE:B.dynamicStoreData.title,DYNAMIC_STORE_BUNDLE_OFFER_SUBTITLE:B.dynamicStoreData.subtitle,DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_DATA:[{PET_ID:B.item.ID}],DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_NAME:B.item.data.name,DYNAMIC_STORE_BUNDLE_ADDITIONAL_OFFERS:G,DYNAMIC_STORE_BUNDLE_PURCHASE_BUTTON_CALLBACK:()=>{this._segment.featureCommon.sendButtonEvent({buttonName:`bundle_${B.dynamicStoreData.offers[0].task.id}`,interfaceType:ot.Wm.Shop,interfaceName:at.B.DynamicStoreBundle}),Q?Z.q.instance.prodigy.open.membershipInfo(void 0):this.buyBundle(B).catch(j.RQr.createHandler("Error purchasing bundle"))},DYNAMIC_STORE_BUNDLE_PRICE_AMOUNT:B.currencyAmount,DYNAMIC_STORE_BUNDLE_PRICE_CURRENCY:B.currencyID,DYNAMIC_STORE_BUNDLE_IS_NEW:F,DYNAMIC_STORE_BUNDLE_PET_IS_NEW:it,DYNAMIC_STORE_BUNDLE_HARD_CURRENCY_LOCKED:W,DYNAMIC_STORE_BUNDLE_MEMBER_LOCKED:Q,DYNAMIC_STORE_BUNDLE_LEVEL_LOCKED:J&&!Q,DYNAMIC_STORE_BUNDLE_LEVEL_NEEDED:this._localizer.getText("ITEMCARD_LEVEL",tt),DYNAMIC_STORE_BUNDLE_LEVEL_MESSAGE:this._localizer.getText("STORE_TOOLTIP_MESSAGE_7",tt,this._player.getLevel()),DYNAMIC_STORE_BUNDLE_TIME_REMAINING:$}}})),it=J.map((B=>({prefabGuid:H.l.StoreItemCard,data:{DYNAMIC_STORE_ITEM_DATA:B,DYNAMIC_STORE_SHELF_SELECT_CARD:this.onItemCardSelected.bind(this,k.label.toLocaleLowerCase())}})));return W.push(...tt,...it),W}getBundlePrefab(k){const B=k.prefabGUID;return B&&Object.values(H.l).includes(B)?B:H.l.DynamicStoreBundlesPanel}addSpecialOfferShelf(k,B){const U=!!X.A.isDefined(B.expiresAt)&&B.expiresAt-Z.q.instance.prodigy.timeManager.getLocalTimeMs();return[{prefabGuid:H.l.DynamicStoreSectionHeader,data:{DYNAMIC_STORE_SHELF_CATEGORY:B.id.toString(),DYNAMIC_STORE_SHELF_LABEL:B.label,DYNAMIC_STORE_SHELF_MILLISECONDS_REMAINING:U,DYNAMIC_STORE_SHELF_CURRENCIES:{},DYNAMIC_STORE_SHELF_HEADER_COLOUR:B.colour}},{prefabGuid:H.l.DynamicStoreSegmentedOffersPanel,data:Object.assign({},Ct.P.getFullOfferInjectableProperties(k))}]}addItemsSection(k,B,U){if(0===B.length&&!k.emptySectionInfo)return[];const F=!!X.A.isDefined(k.expiresAt)&&k.expiresAt-Z.q.instance.prodigy.timeManager.getLocalTimeMs(),G={};return B.forEach((k=>{var B;const{currency:U}=k.task.metadata;if(X.A.isDefined(U)){const k=null!==(B=G[U])&&void 0!==B?B:0;G[U]=k+1}})),[{prefabGuid:H.l.DynamicStoreSectionHeader,data:{DYNAMIC_STORE_SHELF_CATEGORY:k.id.toString(),DYNAMIC_STORE_SHELF_LABEL:k.label,DYNAMIC_STORE_SHELF_MILLISECONDS_REMAINING:F,DYNAMIC_STORE_SHELF_CURRENCIES:G,DYNAMIC_STORE_SHELF_HEADER_COLOUR:k.colour}},...this.createSectionShelfData(k,B,U)]}createInjectedTabData(k,B){var U,F;const G=k.id.toString();return Object.assign(Object.assign({DYNAMIC_STORE_SHELF_CATEGORY:G,DYNAMIC_STORE_TAB_TEXT:k.label,DYNAMIC_STORE_TAB_ICON:Et.y.toInjectionParams(k.icon),DYNAMIC_STORE_TAB_UNREAD:!B},X.A.isDefined(k.config.segmentData)?{DYNAMIC_STORE_TAB_SEGMENT_NAME:null===(U=k.config.segmentData)||void 0===U?void 0:U.tabName,DYNAMIC_STORE_TAB_SEGMENT_INTERFACE_TYPE:null===(F=k.config.segmentData)||void 0===F?void 0:F.interfaceType,DYNAMIC_STORE_TAB_SHOP_TAB_NAME:{shop_tab_name:this._data.store.label.toLowerCase().replace(/\W/g,"-")}}:void 0),{DYNAMIC_STORE_TAB_ON_SELECTED:()=>{this.onTabSelected.dispatch(G)}})}onItemCardSelected(k,B){var U,G,j,$;const H=B.getItemData();if(!H.dynamicStoreData)throw new Error("Item card does not have dynamicStoreData");const W=H.dynamicStoreData.offers[0],q=V.j.getItemRewards(W.task)[0],z=H.dynamicStoreData.offers.reduce(((k,B)=>k+(B.progress.status===K.t.COMPLETE?1:0)),0),Y=(0,_t.uA)(W,((k,B)=>{var U;return null===(U=et.t.getItem(k,B))||void 0===U?void 0:U.data})),Q=this._walletMap.get(H.currencyID);Q&&(this._itemPreview.overrideCurrencyTooltipPosition.x=Q.tooltipX,this._itemPreview.overrideCurrencyTooltipPosition.y=Q.tooltipY+F.CURRENCY_TOOLTIP_Y_OFFSET),this.renderItemPreview(H),this._selectedCardData=H;for(const F of H.dynamicStoreData.offers)null===(G=(U=this._data).onOfferSeen)||void 0===G||G.call(U,F.task.id);B.setNewBadge(!1),this.onItemSelected.dispatch(k,H),this._segment.shop.sendDynamicStoreItemViewedEvent({storeKey:this._data.storeKey,itemType:null!==(j=H.item.type)&&void 0!==j?j:"",itemId:null!==($=H.item.ID)&&void 0!==$?$:0,cost:Y,category:k,categoryId:k,isOwned:this._player.isItemOwned({type:q.type,ID:q.ID}),itemStack:H.dynamicStoreData.itemQuantity-z,instanceId:this._segment.featureCommon.getCurrentInterfaceID(at.B.UnifiedStore)})}renderItemPreview(k){this._itemPreview.renderSelectedItem(k,(k=>(0,G.sH)(this,void 0,void 0,(function*(){return this.buyStoreItem(k)})))),this._itemPreview.onPurchaseFailure.removeAll(this),this._itemPreview.onPurchaseFailure.add(this.handlePurchaseFailure,this)}handlePurchaseFailure(k,B){var U,F,G,H,V;if(X.A.isDefined(k)){let j=null===(U=k.dynamicStoreData)||void 0===U?void 0:U.offers[0].task,$=k;if(j||(j=null===(G=null===(F=this._selectedCardData)||void 0===F?void 0:F.dynamicStoreData)||void 0===G?void 0:G.offers[0].task,$=this._selectedCardData),j){const k=(null!==(V=null===(H=$.additionalItems)||void 0===H?void 0:H.length)&&void 0!==V?V:0)>0;this.sendPurchaseFailedEvent(j,Object.assign(Object.assign({},$.item),{type:k?"bundle":$.item.type,id:k?+j.id:$.item.ID,cost:{type:"currency",ID:$.currencyID,N:$.currencyAmount}}),B,k?{bundleName:j.metadata.displayName}:void 0)}}const W=Z.q.instance.prodigy,q=W.gameContainer.get(j.$Bt.LocalizationService);switch(B){case ft.WE.OfferExpired:W.open.confirmationDialogWideButtons(new dt.k(q.getText("DYNAMIC_STORE_LEAVE"),(()=>{this.gameObject.destroyDeferred()}),q.getText("DIALOG_STAY"),void 0,{atlas:$._.Ui_store_json,name:"icon-large-exclamation"},void 0,550,q.getText("MESSAGE_TITLE_OOPS"),q.getText("DYNAMIC_STORE_ERROR_OFFER_EXPIRED_BODY")));break;case ft.WE.NotEnoughCurrency:case ft.WE.MemberLocked:case ft.WE.LevelLocked:break;default:j.RQr.logError(B,"Error confirming store purchase"),W.open.message(q.getText("NETWORK_ERROR"))}}buyStoreItem(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G,j,$,H;if(!k.dynamicStoreData)return Q.Q.error(ft.WE.NoData);const W=k.dynamicStoreData.offers.find((k=>k.progress.status!==K.t.COMPLETE));if(!W)return Q.Q.error(ft.WE.AllPurchased);if((null!==(B=W.expiresAt)&&void 0!==B?B:1/0)<=Z.q.instance.prodigy.timeManager.getLocalTimeMs())return Q.Q.error(ft.WE.OfferExpired);if((null!==(F=null===(U=k.item.data)||void 0===U?void 0:U.member)&&void 0!==F?F:0)>0&&this._player.getMemberTier()===Y._$.NonMember)return Q.Q.error(ft.WE.MemberLocked);try{const k=V.j.getItemRewards(W.task)[0];this.onPurchaseStarted.dispatch();const B=this._data.store.sections.find((k=>k.id===W.task.metadata.category)),U=yield this._dynamicStoreQuestManager.purchaseItem({offer:W,storeKey:this._data.storeKey,storeCategory:null!==(G=null==B?void 0:B.label.toLowerCase())&&void 0!==G?G:"Unknown",categoryId:null==B?void 0:B.id.toString(),itemSegmentData:{instance_type:rt.N.Interface,instance_id:this._segment.featureCommon.getCurrentInterfaceID(at.B.UnifiedStore),sink_type:k.type,sink_id:k.ID}});this.completeItemPurchase(W);const F=this._itemCardToggleGroup.getToggles();for(const G of F){const k=null===(j=G.GameObject)||void 0===j?void 0:j.findComponentInParent(nt.j);if(X.A.isDefined(k)){const B=null!==(H=null===($=k.getItemData().dynamicStoreData)||void 0===$?void 0:$.offers)&&void 0!==H?H:[];for(const U of B)U.task.id===W.task.id&&k.updateTask(W)}}return Q.Q.success(U)}catch(e){return this.onPurchaseFailed.dispatch(),Q.Q.error(e)}}))}buyBundle(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G;if(!this._paymentManager.canAfford({currency:k.currencyID,value:k.currencyAmount}))return this.handlePurchaseFailure(k,ft.WE.NotEnoughCurrency),this._segment.purchase.sendFunnelStart({type:"Dynamic-Store-Hard-Currency-Insufficient-Resources-Bundle",category:"Dynamic-Store-Hard-Currency-Insufficient-Resources-Store",contentId:k.dynamicStoreData.offers[0].task.id.toString(),adType:lt.R.UnifiedConversionFlow}),yield Z.q.instance.prodigy.open.battlePassUltimateMemberUpsellModal(),void(yield this.refreshStoreContents());const j=yield this.buyStoreItem(k);if(j.isSuccess()){for(const j of null!==(U=null===(B=k.dynamicStoreData)||void 0===B?void 0:B.offers)&&void 0!==U?U:[])null===(G=(F=this._data).onOfferSeen)||void 0===G||G.call(F,j.task.id),this._data.offerReadById[j.task.id]=!0;yield this.refreshStoreContents()}else this.handlePurchaseFailure(k,j.error)}))}sendPurchaseFailedEvent(k,B,U,F){var G,j;const $=this._data.store.sections.find((B=>B.id===k.metadata.category));this._segment.shop.sendDynamicStorePurchaseFailedEvent({storeKey:this._data.storeKey,itemType:B.type,itemId:B.id,cost:{type:B.cost.type,currency:B.cost.ID,value:B.cost.N},category:null!==(G=null==$?void 0:$.label.toLowerCase())&&void 0!==G?G:k.metadata.category,categoryId:null!==(j=null==$?void 0:$.id.toString())&&void 0!==j?j:k.metadata.category,failReason:U,funnelId:this._segment.purchase.getFunnelID(),instanceId:this._segment.featureCommon.getCurrentInterfaceID(at.B.UnifiedStore),bundleData:F})}completeItemPurchase(k){var B;this.onPurchaseFinished.dispatch(k.task.metadata.category);const U=Z.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=(0,_t.uA)(k,((k,B)=>{var U;return null===(U=et.t.getItem(k,B))||void 0===U?void 0:U.data}));this.onCurrencySpent(F.currency,U.getCurrencyAmount(F.currency,F.type));const G=k.progress.data,j=(0,_t.Nx)(k);X.A.isDefined(G)?(G.timesCompleted=(null!==(B=G.timesCompleted)&&void 0!==B?B:0)+1,G.timesCompleted>=j&&(k.progress.status=K.t.COMPLETE)):1===j?k.progress.status=K.t.COMPLETE:k.progress.data={progress:0,timesCompleted:1}}onCurrencySpent(k,B){const U=this._walletMap.get(k);U&&U.display.playSpendEffect(B)}onTabLoaded(k){const B=k.findComponent(J.l);this._tabToggleGroup.addSelectable(B)}onGroupChanged(k,B){var U,F;const{onOfferSeen:G,store:j}=this._data;if(G){const B=null!==(F=null===(U=j.sections.find((B=>B.id===k)))||void 0===U?void 0:U.offers)&&void 0!==F?F:[];for(const k of B)G(k.task.id)}wt.d.updateInjectedValues(B.GameObject,{DYNAMIC_STORE_TAB_UNREAD:!1})}onPooledObjectEnter(k,B){var U,F;switch(B.prefabGuid){case H.l.StoreItemCard:const B=k.findComponentInChildren(J.l);if(this._itemCardToggleGroup.addSelectable(B),this._selectedCardData){const G=null===(U=this._selectedCardData.dynamicStoreData)||void 0===U?void 0:U.offers,j=k.findComponent(nt.j).getItemData();G&&(null===(F=null==j?void 0:j.dynamicStoreData)||void 0===F?void 0:F.offers)&&G[0].task.id===j.dynamicStoreData.offers[0].task.id&&B.setSelected(!0)}break;case H.l.DynamicStoreSectionHeader:}}onPooledObjectExit(k,B){switch(B.prefabGuid){case H.l.StoreItemCard:const B=k.findComponentInChildren(J.l);(null==B?void 0:B.isSelected())&&B.setSelected(!1),this._itemCardToggleGroup.removeSelectable(B);break;case H.l.DynamicStoreBundlesPanel:case H.l.DynamicStoreSectionHeader:}}handleNavigationTabSelection(k){this._itemCardToggleGroup.setSelected(),this._selectedCardData=null,this.selectStoreWithKey(k.key)}selectStoreWithKey(k){if(X.A.isDefined(k)){if(k===W.g0.AllShops)return void(X.A.isDefined(this.allShopsMenuContainer)&&(this.allShopsMenuContainer.active=!0));X.A.isDefined(this.allShopsMenuContainer)&&(this.allShopsMenuContainer.active=!1),this.onStoreSelected.dispatch(k)}}handleDataLoadOrError(k){var B,U,F;if(!k.isSuccess())switch(j.VyI.log(null!==(U=null===(B=k.error)||void 0===B?void 0:B.message)&&void 0!==U?U:"There was an error loading store data",j.$bb.Error),null===(F=k.error)||void 0===F?void 0:F.message){case W.IF.StoreKeyNotFound:return this.allShopsMenuContainer.active=!0,void this.onStoreLoaded.dispatch();default:return void Z.q.instance.prodigy.open.networkError((()=>this.gameObject.destroyDeferred()))}const G=k.get();if("string"==typeof G.DYNAMIC_STORE_DATA)return this.selectStoreWithKey(G.DYNAMIC_STORE_DATA),void this.onStoreLoaded.dispatch();wt.d.updateInjectedValues(this.gameObject,G)}};Ot.CURRENCY_TOOLTIP_Y_OFFSET=20,(0,G.Cg)([(0,ct.b)("7a1-ff33"),(0,G.Sn)("design:type",At.s)],Ot.prototype,"_dynamicStoreQuestManager",void 0),(0,G.Cg)([(0,ct.b)("743-fd51"),(0,G.Sn)("design:type",ht.E)],Ot.prototype,"_paymentManager",void 0),(0,G.Cg)([(0,ct.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Ot.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ot.prototype,"onPurchaseStarted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ot.prototype,"onPurchaseFinished",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ot.prototype,"onPurchaseFailed",void 0),(0,G.Cg)([(0,j.MnK)(pt.V),(0,G.Sn)("design:type",pt.V)],Ot.prototype,"_shelfScrollLink",void 0),(0,G.Cg)([(0,j.MnK)(tt.O),(0,G.Sn)("design:type",tt.O)],Ot.prototype,"_tabToggleGroup",void 0),(0,G.Cg)([(0,j.MnK)(mt.h),(0,G.Sn)("design:type",mt.h)],Ot.prototype,"_tabSpawner",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ot.prototype,"onTabSelected",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ot.prototype,"onItemSelected",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ot.prototype,"onWalletsLoaded",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ot.prototype,"onStoreLoaded",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ot.prototype,"onStoreSelected",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ot.prototype,"_walletContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ot.prototype,"allShopsMenuContainer",void 0),Ot=F=(0,G.Cg)([(0,j.EVk)("DynamicStore")],Ot)},282:(k,B,U)=>{"use strict";U.d(B,{Cv:()=>j});var F,G,j;U(53661);!function(k){k.Shelf="shelf",k.Header="header",k.SpecialOffer="special-offer",k.EmptyShelf="empty-shelf",k.Bundle="bundle"}(F||(F={})),function(k){k.DYNAMIC_STORE_BUNDLE_TITLE="DYNAMIC_STORE_BUNDLE_OFFER_TITLE",k.DYNAMIC_STORE_BUNDLE_SUBTITLE="DYNAMIC_STORE_BUNDLE_OFFER_SUBTITLE",k.DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_ID="DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_ID",k.DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_NAME="DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_NAME",k.DYNAMIC_STORE_BUNDLE_ADDITIONAL_OFFERS="DYNAMIC_STORE_BUNDLE_ADDITIONAL_OFFERS",k.DYNAMIC_STORE_BUNDLE_PURCHASE_BUTTON_CALLBACK="DYNAMIC_STORE_BUNDLE_PURCHASE_BUTTON_CALLBACK",k.DYNAMIC_STORE_BUNDLE_PRICE_AMOUNT="DYNAMIC_STORE_BUNDLE_PRICE_AMOUNT",k.DYNAMIC_STORE_BUNDLE_PRICE_CURRENCY="DYNAMIC_STORE_BUNDLE_PRICE_CURRENCY",k.DYNAMIC_STORE_BUNDLE_IS_NEW="DYNAMIC_STORE_BUNDLE_IS_NEW",k.DYNAMIC_STORE_BUNDLE_HARD_CURRENCY_LOCKED="DYNAMIC_STORE_BUNDLE_HARD_CURRENCY_LOCKED",k.DYNAMIC_STORE_BUNDLE_MEMBER_LOCKED="DYNAMIC_STORE_BUNDLE_MEMBER_LOCKED",k.DYNAMIC_STORE_BUNDLE_LEVEL_LOCKED="DYNAMIC_STORE_BUNDLE_LEVEL_LOCKED",k.DYNAMIC_STORE_BUNDLE_LEVEL_NEEDED="DYNAMIC_STORE_BUNDLE_LEVEL_NEEDED",k.DYNAMIC_STORE_BUNDLE_LEVEL_MESSAGE="DYNAMIC_STORE_BUNDLE_LEVEL_MESSAGE"}(G||(G={})),function(k){k.CouldNotGetOffers="could-not-get-store-offers"}(j||(j={}))},37816:(k,B,U)=>{"use strict";U.d(B,{q:()=>V});var F=U(8674),G=U(62459),j=U(69811),$=U(83133),H=U(11647);let V=class extends((0,H.o)(G.uAl)){constructor(){super(...arguments),this.onTabSelected=this.createTidySignal(),this._graphicsSwappers=[]}get data(){return this._data}get toggle(){return this._toggle}init(k){this.toggle.setSelected(!0),this.toggle.inputEnabled=!0,this._data=k,this.addListenerToSignal(this.toggle.onSelected,(()=>this.onTabSelected.dispatch(this._data))),G.Aq$.isDefined(this.labelComponent)&&(this.labelComponent.text=k.label),this._graphicsSwappers=this.gameObject.findComponentsInChildren(j.y)}swapGraphic(k){this._graphicsSwappers.forEach((B=>B.selectGraphicAtIndex(k)))}};(0,F.Cg)([(0,G.Pqz)($.l),(0,F.Sn)("design:type",$.l)],V.prototype,"_toggle",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],V.prototype,"labelComponent",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onTabSelected",void 0),V=(0,F.Cg)([(0,G.EVk)("HeaderNavigationTab")],V)},50379:(k,B,U)=>{"use strict";U.d(B,{c:()=>F});const F={label:"All Shops",key:U(64270).g0.AllShops}},24595:(k,B,U)=>{"use strict";U.d(B,{V:()=>K});var F=U(8674),G=U(62459),j=U(64270),$=U(94566),H=U(69811),V=U(11647),W=U(37816),q=U(50379);let K=class extends((0,V.o)(G.uAl)){constructor(){super(...arguments),this.onTabDataLoaded=this.createTidySignal(),this.onTabSelected=this.createTidySignal(),this.includeAllShopsTab=!1,this._selectedTabKey="",this._storeTabsObjects=[],this._didSetup=!1}postCreate(){var k;this._toggleGroup=null===(k=this.tabsContainerObject)||void 0===k?void 0:k.findComponent($.O)}setup(k){const B=Object.entries(k).map((([k,B])=>{var U;return{key:k,label:G.Aq$.isDefined(B.nameLocalizationKey)&&""!==B.nameLocalizationKey&&null!==(U=this._baseLocalizer.getText(B.nameLocalizationKey))&&void 0!==U?U:B.label,metadata:Object.assign({},B)}}));this._storeTabsData=[...B],this.includeAllShopsTab&&this._storeTabsData.unshift(q.c),this.setTabsData(this._storeTabsData),this._didSetup=!0}updateHeader(k){if(!G.Aq$.isDefined(k.metadata))return;const B=k.metadata.cover;this.backgroundGraphicSwapper.selectGraphicAtIndex(B),this._storeTabsObjects.forEach((k=>k.GameObject.active=!1));const U=this._storeTabsObjects.map(((k,U)=>(0,F.sH)(this,void 0,void 0,(function*(){return this.updateTab(U,B)}))));Promise.all(U).catch(G.RQr.createHandler("HeaderNavigationTabsControllerComponent: Could not update tabs."))}updateTab(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U,F;if(this._storeTabsObjects[k].swapGraphic(B),this._storeTabsData[k].key===j.g0.AllShops)return void(this._storeTabsObjects[k].GameObject.active=this.includeAllShopsTab);if(!G.Aq$.isDefined(this._storeTabsData[k].metadata))return void(this._storeTabsObjects[k].GameObject.active=!1);const $=null===(F=null===(U=this._storeTabsData[k])||void 0===U?void 0:U.metadata)||void 0===F?void 0:F.cover;this._storeTabsObjects[k].GameObject.active=$===B}))}setSelectedTabForKey(k){var B,U,F;if(this._selectedTabKey=k,!this._didSetup)return void this.addOneTimeListenerToSignal(this.onTabDataLoaded,(()=>this.setSelectedTabForKey(k)));const G=this.tabsContainerObject.children.findIndex((k=>{var B;return this._selectedTabKey===(null===(B=k.findComponent(W.q))||void 0===B?void 0:B.data.key)}));G>=0?(null===(B=this._toggleGroup)||void 0===B||B.setItemSelectedByIndex(G,!0),null===(U=this._toggleGroup)||void 0===U||U.setSelectedIndex(G),this.updateHeader(this._storeTabsData[G])):null===(F=this._toggleGroup)||void 0===F||F.setSelected()}setTabsData(k,B=0){var U;G.Aq$.isDefined(this.tabsContainerObject)&&(null===(U=this._toggleGroup)||void 0===U||U.clearSelectables(),this.tabsContainerObject.children.forEach((k=>k.destroyDeferred())),Promise.all(k.map(((k,B)=>(0,F.sH)(this,void 0,void 0,(function*(){return[yield this._prefabLoader.loadWithDependenciesFromGUID(this.tabPrefab,this.tabsContainerObject),k,B]}))))).then((k=>{var U;k.forEach((([k,B,U])=>{var F;const j=k.findComponent(W.q);this.tabsContainerObject.addChildAt(k,U),G.Aq$.isDefined(j)&&(this._storeTabsObjects.push(j),null===(F=this._toggleGroup)||void 0===F||F.addSelectable(j.toggle),this.addListenerToSignal(j.onTabSelected,this.setSelectedTab.bind(this)),j.init(B))})),this._selectedTabKey?this.setSelectedTabForKey(this._selectedTabKey):null===(U=this._toggleGroup)||void 0===U||U.setSelectedIndex(B),this.onTabDataLoaded.dispatch()})).catch((k=>{var B,U;G.VyI.log("There was an error creating the tabs",G.$bb.Error),G.VyI.log(null===(U=(B=k).toString)||void 0===U?void 0:U.call(B),G.$bb.Error)})))}setSelectedTab(k){this.onTabSelected.dispatch(k),this.updateHeader(k)}};(0,F.Cg)([(0,G.Cdj)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],K.prototype,"_baseLocalizer",void 0),(0,F.Cg)([(0,G.i0J)(G.Z$z.Prefab),(0,F.Sn)("design:type",String)],K.prototype,"tabPrefab",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],K.prototype,"tabsContainerObject",void 0),(0,F.Cg)([(0,G.MnK)(H.y),(0,F.Sn)("design:type",H.y)],K.prototype,"backgroundGraphicSwapper",void 0),(0,F.Cg)([(0,G.Cdj)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],K.prototype,"_prefabLoader",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],K.prototype,"onTabDataLoaded",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],K.prototype,"onTabSelected",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],K.prototype,"includeAllShopsTab",void 0),K=(0,F.Cg)([(0,G.EVk)("HeaderNavigationTabsController")],K)},55301:(k,B,U)=>{"use strict";U.d(B,{X:()=>G,o:()=>j});var F=U(64270);const G={1:[F.GA.PetShop],2:[F.GA.WizardCenter,"ab9ae0de-23f9-41de-8a36-ef5fdd96dd51"],4:[F.GA.SpecialOffers],5:[F.GA.RegionShop,"ea1443ff-9180-46ed-98f2-4b3299e272b2"],6:[F.GA.RegionShop,"c3755249-2988-4b00-ad85-c26fa7469a2e"],7:[F.GA.RegionShop,"13bececf-ea11-49ac-b3e6-b14d83a0d246"],8:[F.GA.RegionShop,"f9d01a0c-c701-4f49-8358-96ba8823c26b"],13:[F.GA.StarlightShop],14:[F.GA.PumpkinfestShop],15:[F.GA.WinterfestShop],37:[F.GA.SummerfestShop],71:[F.GA.MoonlightShop],70:[F.GA.FestivalShop],72:[F.GA.SpringfestShop],25:[F.GA.SpringfestShop,"6dc8149e-bb87-4976-8c24-170becc12b77"],24:[F.GA.SpringfestShop,"d5803109-5aeb-498f-8bda-5e59fba845fc"],19:[F.GA.RegionShop,"08e2e778-6192-46d8-a153-63f179000734"],21:[F.GA.TitanShop],22:[F.GA.TitanShop],35:[F.GA.AcademyShop],36:[F.GA.AcademyShop],46:[F.GA.WizardCenter]},j=[40,41,42,43,44,23,9,11,12,47,66,68,69]},42959:(k,B,U)=>{"use strict";U.d(B,{I:()=>Z});var F,G=U(8674),j=U(62459),$=U(79687),H=U(34656),V=U(64270),W=U(88131),q=U(96535),K=U(55080),z=U(282),Y=U(34829),Q=U(15821),X=U(55328);let Z=F=class{constructor(){this._cachedWidgetItems=void 0,this._lastWidgetItemFetchTime=0}getDynamicStoreUIData(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F;null!==(B=k.storeSegmentIdentifier)&&void 0!==B||(k.storeSegmentIdentifier=V.qO.DynamicStore);const G=yield this._dynamicStoreQuestManager.getStoreOffers(k.storeKey);if(!G.isSuccess())return j.VyI.log(`${G.error}`,j.$bb.Error),W.Q.error(null!==(U=G.error)&&void 0!==U?U:z.Cv.CouldNotGetOffers);const $=G.get(),q=this.getPlayerData(),K=this._segmentedOffers.userCanReceiveSegmentedOffers()?this._segmentedOffers.activeOffer:void 0,Y={},Q=Object.assign(Object.assign({},$),{sections:$.sections.filter((k=>k.id===V.Xx.SpecialOffer?H.j.specialOfferSectionHasContent(k,K):k.offers.length>0||!!k.emptySectionInfo))});for(const k of Q.sections)for(const B of null!==(F=k.offers)&&void 0!==F?F:[])Y[B.task.id]=B.task.id in q.seenOffers;return this.cleanupUnusedPlayerData(q,Y),W.Q.success({store:Q,offerReadById:Y,specialOffer:K,onOfferSeen:k=>this.markOfferRead(k),storeKey:k.storeKey})}))}markOfferRead(k){this.getPlayerData().seenOffers[k]=Date.now(),this._player.updated=!0,this._dynamicStoreQuestManager.sendHudButtonData().catch(j.RQr.createHandler("DynamicStoreDataProvider: Could not update HUD buttons."))}getPlayerData(){var k,B;return null!==(k=(B=this._player.data).dynamicStore)&&void 0!==k||(B.dynamicStore={seenOffers:{}}),this._player.data.dynamicStore}cleanupUnusedPlayerData(k,B){const U=Date.now(),F=U-2592e6;for(const[G,j]of Object.entries(k.seenOffers))B[G]?k.seenOffers[G]=U:(!0===j||j=this._lastWidgetItemFetchTime+F.WIDGET_ITEM_FETCH_COOLDOWN)&&(this._cachedWidgetItems=(yield this._networkHandler.getHudWidgetItems()).hudWidgetitems,this._lastWidgetItemFetchTime=Date.now()),this._cachedWidgetItems}))}};Z.WIDGET_ITEM_FETCH_COOLDOWN=Y.s.HOURS_IN_MS,(0,G.Cg)([(0,$.inject)("306-5359"),(0,G.Sn)("design:type",q.W)],Z.prototype,"_player",void 0),(0,G.Cg)([(0,$.inject)("a02-c2b2"),(0,G.Sn)("design:type",Function)],Z.prototype,"_segmentedOffers",void 0),(0,G.Cg)([(0,$.inject)("7a1-ff33"),(0,G.Sn)("design:type",K.s)],Z.prototype,"_dynamicStoreQuestManager",void 0),(0,G.Cg)([(0,$.inject)("9ea-3f44"),(0,G.Sn)("design:type",X.v)],Z.prototype,"_networkHandler",void 0),Z=F=(0,G.Cg)([(0,$.injectable)()],Z)},64007:(k,B,U)=>{"use strict";U.d(B,{_:()=>G});var F=U(87490);class G{}G.ELEMENT_BOOST_TEXT_CONFIG={[F.EElementType.Fire]:{localizationKey:"ELEMENTAL_BOOST_POPUP_FIRE",descriptionLocalizationKey:"ELEMENTAL_BOOST_DESC_FIRE",textColor:"#ffdd00",textStrokeColor:"#aa133d"},[F.EElementType.Ice]:{localizationKey:"ELEMENTAL_BOOST_POPUP_ICE",descriptionLocalizationKey:"ELEMENTAL_BOOST_DESC_ICE",textColor:"#a8fbff",textStrokeColor:"#375db0"},[F.EElementType.Physical]:{localizationKey:"ELEMENTAL_BOOST_POPUP_PHYSICAL",descriptionLocalizationKey:"ELEMENTAL_BOOST_DESC_PHYSICAL",textColor:"#d6eff0",textStrokeColor:"#4a4d76"},[F.EElementType.Plant]:{localizationKey:"ELEMENTAL_BOOST_POPUP_PLANT",descriptionLocalizationKey:"ELEMENTAL_BOOST_DESC_PLANT",textColor:"#bcd442",textStrokeColor:"#2b561f"},[F.EElementType.Storm]:{localizationKey:"ELEMENTAL_BOOST_POPUP_STORM",descriptionLocalizationKey:"ELEMENTAL_BOOST_DESC_STORM",textColor:"#fdf051",textStrokeColor:"#744274"},[F.EElementType.Water]:{localizationKey:"ELEMENTAL_BOOST_POPUP_WATER",descriptionLocalizationKey:"ELEMENTAL_BOOST_DESC_WATER",textColor:"#5cd0fd",textStrokeColor:"#0f4a8f"}}},99842:(k,B,U)=>{"use strict";U.d(B,{s:()=>$});var F=U(8674),G=U(95891),j=U(56567);class ${static sampleRandomEncounter(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U,H;const V=yield Promise.all(Object.values(k.encounters).map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return[yield $.meetsPreconditions(null!=B?B:new j.f,k.preconditions),k]}))))),W=[];let q=0;for(const[k,B]of V)k&&(W.push(B),q+=null!==(U=B.weight)&&void 0!==U?U:0);let K=Math.random()*q;for(const k of W)if(K-=null!==(H=k.weight)&&void 0!==H?H:0,K<=0)return k;return G.sample(W)}))}static meetsPreconditions(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){let U=!0;for(const F of null!=B?B:[])if(U=yield k.check(F.type,F.data),!U)break;return!!U}))}}},15571:(k,B,U)=>{"use strict";U.d(B,{p:()=>Z});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U.n($),V=U(35120),W=U(1195),q=U(77938),K=U(65068),z=U(3001),Y=U(80434),Q=U(5708),X=U(78889);let Z=class{constructor(){this.objectiveTypes=[K.q.RestrictedEncounter,K.q.RestrictedEncounterBlocking]}getObjectives(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=this.getActiveRestrictedEncounters(),U=V.q.instance.prodigy.world.getCurrentZone(),j=null===(k=Y.n[U])||void 0===k?void 0:k.questTag;if(!G.Aq$.isDefined(j))return[];const $=yield this._questManagerHub.getTasksInProgress([j]),W=yield Promise.all(B.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,H,V,W,z,Y,Q;const{requirementsId:Z}=k,J=null===(B=yield this.getRestrictionsForRequirements(Z))||void 0===B?void 0:B.data;if(!G.Aq$.isDefined(J))return[];const{requirements:tt}=null!==(U=this._featureRequirements.getProgressForRequirements(J))&&void 0!==U?U:{requirements:[]},et=[],{overrideQuestIds:it}=k,st=null!==(H=null===(F=$.get(j))||void 0===F?void 0:F.some((k=>{const{questID:B,taskID:U}=k;return null==it?void 0:it.some((k=>k===`${B}.${U}`))})))&&void 0!==H&&H?K.q.RestrictedEncounterBlocking:K.q.RestrictedEncounter;if(tt.every((k=>Object.values(k).every((({progress:k})=>{const[B,U]=k;return B>=U}))))){const B=q.t.getItem(null!==(V=k.assetType)&&void 0!==V?V:"boss",k.assetId);return et.push({id:`${Z}-${J.name}-*`,text:this._localizer.getText("DEFEAT_ENEMY",null!==(Q=null!==(z=null===(W=null==B?void 0:B.data)||void 0===W?void 0:W.nickname)&&void 0!==z?z:null===(Y=null==B?void 0:B.data)||void 0===Y?void 0:Y.name)&&void 0!==Q?Q:"the enemy"),progress:{current:0,target:1},type:st}),et}return X.yd({requirements:tt,objectiveIdPrefix:`${Z}-${J.name}`,type:st})})))));return H().flatten(W)}))}startEncounter(k,B,U){var F,j,$,V;if(!G.Aq$.isDefined(k))return;const{data:W}=this._playerDataProvider.player,q=null!==(F=W.restrictedEncounters)&&void 0!==F?F:{},K=null!==(j=q[W.zone])&&void 0!==j?j:[],z=null!==($=X.Lj(B))&&void 0!==$?$:0,Y=null!==(V=B.uniqueId)&&void 0!==V?V:z,Q=X.Wo(B),Z={requirementsId:k,encounterUniqueId:Y,assetType:Q,assetId:z,overrideQuestIds:U},J=K.findIndex((k=>k.encounterUniqueId===Y));if(-1!==J){if(H().isEqual(K[J],Z))return;K[J]=Z}else K.push(Z);q[W.zone]=K,this._playerDataProvider.player.data.restrictedEncounters=q,this._playerDataProvider.player.updated=!0,this._playerDataProvider.player.forceSaveCharacter()}getActiveRestrictedEncounters(k){var B,U;const{data:F,state:j}=this._playerDataProvider.player,{restrictedEncounters:$}=F;if(!G.Aq$.isDefined($))return[];const V=[];G.Aq$.isDefined(k)?V.push(...null!==(B=null==$?void 0:$[k])&&void 0!==B?B:[]):V.push(...H().flatten(Object.values($)));const W=[];for(const G of V){const{encounterUniqueId:k}=G;null!==(U=j.get(k.toString()))&&void 0!==U&&U?this.stopEncounter(G):W.push(G)}return W}stopEncounter(k){if(!this._playerDataProvider)return;const{data:B}=this._playerDataProvider.player,{restrictedEncounters:U}=B;if(G.Aq$.isDefined(U))for(const[F,G]of Object.entries(U)){const B=null==G?void 0:G.filter((B=>B.encounterUniqueId!==k.encounterUniqueId));if((null==B?void 0:B.length)!==(null==G?void 0:G.length))return this._playerDataProvider.player.data.restrictedEncounters[F]=B,void(this._playerDataProvider.player.updated=!0)}}getRestrictionsForRequirements(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this._restrictionsProvider.getRestrictionById(k)}))}};(0,F.Cg)([(0,j.inject)("b73-c131"),(0,F.Sn)("design:type",Q.X)],Z.prototype,"_restrictionsProvider",void 0),(0,F.Cg)([(0,j.inject)("e20-0fb0"),(0,F.Sn)("design:type",W.E)],Z.prototype,"_playerDataProvider",void 0),(0,F.Cg)([(0,j.inject)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],Z.prototype,"_localizer",void 0),(0,F.Cg)([(0,j.inject)("a25-68f4"),(0,F.Sn)("design:type",z.n)],Z.prototype,"_questManagerHub",void 0),(0,F.Cg)([(0,j.inject)("db5-fb6e"),(0,F.Sn)("design:type",Object)],Z.prototype,"_featureRequirements",void 0),Z=(0,F.Cg)([(0,j.injectable)()],Z)},46571:(k,B,U)=>{"use strict";U.d(B,{p:()=>H});var F=U(8674),G=U(79687),j=U(62459),$=U(45895);let H=class{constructor(){this._eventEncounterDataProviders=[]}getProviders(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){const $=yield Promise.all(this._eventEncounterDataProviders.filter((k=>j.Aq$.isDefined(k)&&B&&k.isEnabledByDefault?!U.includes(k.tag):G.includes(k.tag))).map((B=>(0,F.sH)(this,void 0,void 0,(function*(){return[yield B.getPriority(k),B]})))));return $.sort((([k],[B])=>k-B)),$}))}};(0,F.Cg)([(0,G.multiInject)($.A),(0,F.Sn)("design:type",Array)],H.prototype,"_eventEncounterDataProviders",void 0),H=(0,F.Cg)([(0,G.injectable)()],H)},24800:(k,B,U)=>{"use strict";U.d(B,{p:()=>z});var F,G=U(8674),j=U(79687),$=U(62459),H=U(50996),V=U(94393),W=U(99842),q=U(35120),K=U(73678);let z=F=class{constructor(){this.tag=H.I.FestivalEncounterDataProvider,this.isEnabledByDefault=!0}isActive(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;const U=null===(B=this._weekendEvents.getActiveFestival())||void 0===B?void 0:B.type,F=this._weekendEvents.getFestivalConfig(),G=q.q.instance.prodigy.world.getCurrentZone();if(!$.Aq$.isDefined(F)||!$.Aq$.isDefined(U))return!1;if(!(null==F?void 0:F.festivalDailyData.allowInCoreZones)&&K.s0.includes(G))return!1;for(const j of F.festivalDailyData.zoneEncounterEntities){if(yield W.s.meetsPreconditions(k.preconditionChecker,j.preconditions))return this._selectedEncounterEntity=j,!0}return!1}))}getPriority(k){return(0,G.sH)(this,void 0,void 0,(function*(){return H.X[this.tag]}))}getEncounterData(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(!k.isOnCooldown&&$.Aq$.isDefined(this._selectedEncounterEntity)){const B=F.encounterCache[k.spawnId];if(!!$.Aq$.isDefined(B)&&(yield W.s.meetsPreconditions(k.preconditionChecker,B.preconditions)))return Object.assign(Object.assign({},B),{bench:this._selectedEncounterEntity.bench});const U=yield W.s.sampleRandomEncounter(this._selectedEncounterEntity,k.preconditionChecker);return $.Aq$.isDefined(U)?(F.encounterCache[k.spawnId]=U,Object.assign(Object.assign({},F.encounterCache[k.spawnId]),{bench:this._selectedEncounterEntity.bench})):void 0}}))}static clearCachedEncounters(){F.encounterCache={}}};z.encounterCache={},(0,G.Cg)([(0,j.inject)("12b-405a"),(0,G.Sn)("design:type",V.n)],z.prototype,"_weekendEvents",void 0),z=F=(0,G.Cg)([(0,j.injectable)()],z)},45895:(k,B,U)=>{"use strict";U.d(B,{A:()=>F});const F=Symbol.for("EVENT_ENCOUNTER_DATA_PROVIDER")},50996:(k,B,U)=>{"use strict";var F;U.d(B,{I:()=>F,X:()=>G}),function(k){k.FestivalEncounterDataProvider="FestivalEncounterDataProvider",k.FeaturedSpawnEncounterDataProvider="FeaturedSpawnEncounterDataProvider"}(F||(F={}));const G={[F.FestivalEncounterDataProvider]:0,[F.FeaturedSpawnEncounterDataProvider]:1}},7170:(k,B,U)=>{"use strict";var F;U.d(B,{E:()=>F}),function(k){k.Disabled="disabled"}(F||(F={}))},78889:(k,B,U)=>{"use strict";U.d(B,{$Q:()=>J,BQ:()=>rt,LT:()=>et,Lj:()=>q,OI:()=>Z,Ue:()=>Y,W0:()=>X,Wo:()=>K,Yu:()=>at,bU:()=>Q,cB:()=>z,h9:()=>it,o_:()=>st,sK:()=>tt,wd:()=>nt,yd:()=>ot});var F=U(62459),G=U(28628),j=U(15821),$=U(35120),H=U(77938),V=U(129),W=U(7170);function q(k){var B,U,G;return et(k)?null!==(B=k.boss.ID)&&void 0!==B?B:0:it(k)?32:J(k)?null!==(U=k.encounter[0].ID)&&void 0!==U?U:0:tt(k)?null!==(G=k.pets[0].ID)&&void 0!==G?G:0:void F.VyI.log("EncounterDataUtils.getEncounterAssetId: unable to find a valid asset ID for encounter data",F.$bb.Warning)}function K(k){return Q(k)||!j.A.isDefined(k)?null:J(k)?"pet":et(k)||it(k)?"boss":tt(k)?"pet":null}function z(k){const B=K(k);if(null===B)return null;const U=q(k);return H.t.getItem(B,U)}function Y(k){return j.A.isDefined(k)&&!Q(k)}function Q(k){return"string"==typeof k&&Object.values(W.E).includes(k)}function X(k){var B,U,F,G,$,H;return!!j.A.isDefined(k)&&(!!Q(k)||(j.A.isDefined(k.boss)||(null!==(U=null===(B=k.pets)||void 0===B?void 0:B.length)&&void 0!==U?U:0)>0||(null!==(G=null===(F=k.opponent)||void 0===F?void 0:F.length)&&void 0!==G?G:0)>0||(null!==(H=null===($=k.encounter)||void 0===$?void 0:$.length)&&void 0!==H?H:0)>0))}function Z(k){const{player:B}=$.q.instance.game.rootContainer.get("e20-0fb0");B.encounters.onPetEncountered(k)}function J(k){var B,U;return(null!==(U=null===(B=k.encounter)||void 0===B?void 0:B.length)&&void 0!==U?U:0)>0}function tt(k){var B;return j.A.isDefined(null===(B=k.pets)||void 0===B?void 0:B[0])}function et(k){var B;return j.A.isDefined(null===(B=k.boss)||void 0===B?void 0:B.ID)}function it(k){return j.A.isDefined(k.opponent)}function st(k){var B;if(!J(k)||!j.A.isDefined(k.encounter[0].ID))return!1;const{player:U}=$.q.instance.game.rootContainer.get("e20-0fb0");return null!==(B=k.showNewIndicator)&&void 0!==B?B:!nt(k)&&!at(k)&&U.hasCompletedTutorial()&&U.encounters.getPetTimesBattled(k.encounter[0].ID)<1}function nt(k){return k.revampBattleType===G.gu.ZoneMiniboss}function at(k){const{player:B}=$.q.instance.game.rootContainer.get("e20-0fb0"),{threatIndicatorLevel:U}=$.q.instance.game.rootContainer.get("d1f-4da3");return j.A.isDefined(k.minLevel)&&!nt(k)&&!j.A.isDefined(k.showGuideHand)&&k.minLevel-B.getLevel()>U}function rt(k){const B=[248,253,252,254,251,250,249,255],U=[188,193,192,194,191,190,189,195],F=new V.a($.q.instance.prodigy.game);return F.init(k),k.useMetadataGear||(B.includes(F.equipment.getHat())||F.equipment.setHat(248),U.includes(F.equipment.getOutfit())||F.equipment.setOutfit(188),F.appearance.setHair(53)),F}function ot(k){const{requirements:B,objectiveIdPrefix:U,type:F,includeComplete:G}=k,$=[];for(const[H,V]of B.entries()){const k=Object.entries(V);for(const[B,{text:V,progress:W}]of k)if(j.A.isDefined(V)){const[k,j]=W;if(k>=j&&!G)continue;$.push({id:`${U}-${B}-${H}`,text:V,progress:{current:k,target:j},type:"function"==typeof F?F(B):F})}}return $}},28029:(k,B,U)=>{"use strict";U.d(B,{E:()=>H});var F=U(62459),G=U(95891),j=U(68910),$=U(35120);class H{static addConfetti(k){const B=$.q.instance.game,U=new F._mx(k);U.name="Confetti",U.addComponent(F.dLy);const V=new F.CIs;V.xLocation.setMinMax(-8,B.width+8),V.yLocation.setMinMax(-8,B.height+8);const W=new F.mYY;W.point1.set(-8,-8),W.point2.set(B.width+8,-8);const{width:q,height:K}=j.Texture.WHITE,z=new F.Ayx;z.callback=k=>{if(k.life=1,k.motionOffset=G.random(2*Math.PI),k.velocity.set(G.random(3,40,!0),80),k.angularVelocities=[G.random(-10,10,!0),G.random(5,12,!0),G.random(-5,7,!0)],!k.graphic){const B=new F._mx(k.gameObject);B.addComponent(F.dLy),k.graphic=B.addComponent(F.vYh),k.graphic.setTexture(j.Texture.WHITE)}k.tint=G.sample(H.CONFETTO_COLORS),this.applyParticleTint(k)};const Y=new F.nbL;Y.callback=(k,U)=>{const F=.001*B.time.timeMS;k.life=k.position.y{"use strict";U.d(B,{U:()=>et});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(28628),V=U(40295),W=U(90633),q=U(35120),K=U(77938),z=U(96535),Y=U(10670),Q=U(13956),X=U(73678),Z=U(50503),J=U(64653),tt=U(90804);class et{static fetchProgress(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.progressData=yield this._networkHandler.getProgress(),this.progressData}))}static pushProgress(k){return(0,F.sH)(this,void 0,void 0,(function*(){this.progressData=$().clone(k),yield this._networkHandler.setProgress(k)}))}static isStepComplete(k){const B=Object.keys(V.B);return B.indexOf(k)<=B.indexOf(this.progressData.step)}static getCurrentStep(){return this.progressData.step}static getNextStep(){const k=Object.values(V.B);return k[k.indexOf(this.progressData.step)+1]}static isEndgameQuestActive(){return![V.B.NotStarted,V.B.PuppetMasterDefeated].includes(this.progressData.step)}static hasDefeatedPippet(){return this.isStepComplete(V.B.PippetDefeated)}static locallyAdvanceQuest(){const k=Object.values(V.B),B=k.indexOf(this.progressData.step);this.progressData.step=k[B+1];let U=null,F=null;switch(this.progressData.step){case V.B.PippetDefeated:U=4,F=Y.jT.PippetBattleWon;break;case V.B.Guardian1Defeated:U=6,F=Y.jT.IllusionBoss1BattleWon;break;case V.B.Guardian2Defeated:U=8,F=Y.jT.IllusionBoss2BattleWon;break;case V.B.Guardian3Defeated:U=10,F=Y.jT.IllusionBoss3BattleWon;break;case V.B.Guardian4Defeated:U=12,F=Y.jT.IllusionBoss4BattleWon;break;case V.B.Guardian5Defeated:U=14,F=Y.jT.IllusionBoss5BattleWon}F&&q.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(U,F)}static shouldShowEndgameQuestBanner(k){return!!this.isEndgameQuestActive()&&(![X.A_.ACADEMY,X.A_.ARCHIVES,X.A_.DRAGONISLE,X.A_.TOWERTOWN].includes(k)&&(k!==X.A_.LAMPLIGHT||!G.Aq$.isDefined(q.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival())))}static shouldShowEndgameNootWorldMapDialogue(){return et.progressData.step===V.B.LastKeystoneCutsceneViewed&&!q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(W.B.FEATURE_ENDGAME_QUEST,W.B.BREADCRUMB_ENDGAME_QUEST_SAW_WORLD_MAP_DIALOGUE)}static getCurrentGuardianIndex(){const k=Object.values(V.B),B=k.indexOf(this.progressData.step)-k.indexOf(V.B.PippetDefeated);return B>=0&&B<5?B:-1}static shouldShowPuppetMasterDefeatCelebration(){const k=Date.now()-this._activePlayer.data.puppetMasterDefeatDate;return k{q.q.instance.game.broadcaster.broadcast("Prodigy.Events.Endgame.MISSED_PUPPET_MASTER_GEAR_AWARDED")}),!0)}}et.CELEBRATION_MIN_TIME_MS=864e5,et.CELEBRATION_MAX_TIME_MS=18144e5,et.CELEBRATION_MAX_VIEWS=3,(0,F.Cg)([(0,Q.b)("306-5359"),(0,F.Sn)("design:type",z.W)],et,"_activePlayer",void 0),(0,F.Cg)([(0,Q.b)("23e-f53d"),(0,F.Sn)("design:type",J.C)],et,"_networkHandler",void 0)},64653:(k,B,U)=>{"use strict";U.d(B,{C:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(76546);let H=class extends $.D{getProgress(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Endgame.GetProgress,{},!1)}))}setProgress(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(j.D.Endgame.SetProgress,k,!1)}))}debugSetProgress(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(j.D.Endgame.Debug.SetProgress,k,!1)}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},75781:(k,B,U)=>{"use strict";U.d(B,{E:()=>Y});var F=U(62459),G=U(99625),j=U(40295),$=U(90633),H=U(35120),V=U(43846),W=U(43531),q=U(10670),K=U(73678),z=U(93867);class Y{static runCollectedLastKeystoneSequence(){H.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(1,q.jT.AllGemsCollected,$.B.BREADCRUMB_ENDGAME_QUEST_SAW_NOOT_ACADEMY_DIALOGUE),this.runKeystoneSequence([1408],!0)}static runAllKeystonesSequenceOnMapSetup(k){H.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(1,q.jT.AllGemsCollected,$.B.BREADCRUMB_ENDGAME_QUEST_SAW_NOOT_ACADEMY_DIALOGUE),H.q.instance.prodigy.world.getCurrentZone()===K.A_.ACADEMY?this.runKeystoneSequence([1474,1476],!1,k):this.runKeystoneSequence([1474],!0,k)}static runKeystoneSequence(k,B,U){z.U.pushProgress({step:j.B.LastKeystoneCutsceneViewed}).catch(F.RQr.createHandler("Error setting endgame quest progress"));const $=new W.rD,q=$.dataProvider,K=H.q.instance.prodigy.gameContainer.get("d0e-64fd");let Y;const Q=()=>{Y.then((k=>k.destroy())).catch(F.RQr.createHandler("Error destroying keystone dialog"))},X=k.map((k=>({dialogueData:q.get(k),blockInput:!0})));X.splice(X.length-1,0,{callback:()=>Y=K.loadWithDependenciesFromGUID(G.l.AllKeystonesCelebration)}),B?X.push({dialogueData:q.get(1409),yesButtonText:(0,V.k)("GO_NOW"),noButtonText:(0,V.k)("NOT_NOW"),yes:()=>{H.q.instance.prodigy.open.map({onClose:()=>{null==U||U().catch(F.RQr.createHandler("GotAllKeystonesSequence closeCallback notNowCallback Error"))}}),Q()},no:()=>{Q(),null==U||U().catch(F.RQr.createHandler("GotAllKeystonesSequence closeCallback notNowCallback Error"))},blockInput:!0}):X.push({callback:()=>{Q(),null==U||U().catch(F.RQr.createHandler("GotAllKeystonesSequence closeCallback notNowCallback Error"))}}),$.addEvents(X),$.start(!0)}}},90804:(k,B,U)=>{"use strict";U.d(B,{p:()=>F});class F{}F.PUPPET_MASTER_GEAR_DROPS=[{type:"hat",ID:240,N:1},{type:"outfit",ID:180,N:1},{type:"boots",ID:125,N:1},{type:"weapon",ID:251,N:1}]},87539:(k,B,U)=>{"use strict";U.d(B,{m:()=>F});class F{static getGuardianData(k){return U(56351)[k]}}},68607:(k,B,U)=>{"use strict";U.d(B,{n:()=>K});var F,G=U(8674),j=U(62459),$=U(35120),H=U(82351),V=U(28152),W=U(29834),q=U(80110);let K=F=class extends j.uAl{constructor(){super(...arguments),this._centerFX=[],this._centerThresholds=[],this._centerAnimationNames=[],this._centerSounds=[],this._centerSpellIDs=[],this._leftFX=[],this._leftThresholds=[],this._leftAnimationNames=[],this._leftSounds=[],this._rightFX=[],this._rightThresholds=[],this._rightAnimationNames=[],this._rightSounds=[],this._centerIndex=0,this._leftIndex=0,this._rightIndex=0}setDamage(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const G={fx:B?this._leftFX:this._rightFX,index:B?this._leftIndex:this._rightIndex,thresholds:B?this._leftThresholds:this._rightThresholds,animations:B?this._leftAnimationNames:this._rightAnimationNames,soundFX:B?this._leftSounds:this._rightSounds},$=this._centerSpellIDs.includes(U);if(!$&&!this.sideThresholdMet(k,G))return;this.startScreenShake(),yield j.Egh.timeout(F.ANIMATION_DELAY_MS),$&&(this._centerIndex=this.setDamagePercentage(1,{fx:this._centerFX,index:this._centerIndex,thresholds:this._centerThresholds,animations:this._centerAnimationNames,soundFX:this._centerSounds}));const H=this.setDamagePercentage(k,G);B?this._leftIndex=H:this._rightIndex=H,yield j.Egh.timeout(F.END_DELAY_MS)}))}getAnimators(){return[...this._leftFX,...this._centerFX,...this._rightFX]}startScreenShake(){return(0,G.sH)(this,void 0,void 0,(function*(){yield j.Egh.timeout(F.SHAKE_DELAY_MS),this._screenShake.run()}))}sideThresholdMet(k,B){return!(B.index>=B.fx.length)&&k>=B.thresholds[B.index]}setDamagePercentage(k,B){if(B.index>=B.fx.length)return B.index;let U=B.thresholds[B.index];const G=[];for(;k>=U&&(B.fx[B.index].playAnimation(B.animations[B.index],!1),G.push(B.soundFX[B.index]),B.index+=1,!(B.index>=B.fx.length));)U=B.thresholds[B.index];return 1===G.length?$.q.instance.prodigy.audio.playSFXFromGUID(G[0]):G.length>1&&(G.includes(H.B.Sfx_large_explosion_with_glass)?$.q.instance.prodigy.audio.playSFXFromGUID(H.B.Sfx_large_explosion_with_glass):$.q.instance.prodigy.audio.playSFXFromGUID(F.DEFAULT_EXPLOSION_SOUND_FOR_MANY)),B.index}};K.SHAKE_DELAY_MS=200,K.ANIMATION_DELAY_MS=400,K.END_DELAY_MS=300,K.DEFAULT_EXPLOSION_SOUND_FOR_MANY=H.B.Sfx_long_explosion_with_rubble_A,(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(W.j),(0,G.Sn)("design:type",Array)],K.prototype,"_centerFX",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.g11)(),(0,G.Sn)("design:type",Array)],K.prototype,"_centerThresholds",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],K.prototype,"_centerAnimationNames",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.gfw)(H.B),(0,G.Sn)("design:type",Array)],K.prototype,"_centerSounds",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],K.prototype,"_centerSpellIDs",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(W.j),(0,G.Sn)("design:type",Array)],K.prototype,"_leftFX",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.g11)(),(0,G.Sn)("design:type",Array)],K.prototype,"_leftThresholds",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],K.prototype,"_leftAnimationNames",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.gfw)(H.B),(0,G.Sn)("design:type",Array)],K.prototype,"_leftSounds",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(W.j),(0,G.Sn)("design:type",Array)],K.prototype,"_rightFX",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.g11)(),(0,G.Sn)("design:type",Array)],K.prototype,"_rightThresholds",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],K.prototype,"_rightAnimationNames",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.gfw)(H.B),(0,G.Sn)("design:type",Array)],K.prototype,"_rightSounds",void 0),(0,G.Cg)([(0,j.MnK)(q.g),(0,G.Sn)("design:type",q.g)],K.prototype,"_screenShake",void 0),K=F=(0,G.Cg)([(0,j.EVk)("DynamicBattleBackgroundFX",V.Y.effect)],K)},44367:(k,B,U)=>{"use strict";U.d(B,{z:()=>V});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(13956);class V extends G.s3P{static getFeatureVariables(){var k;return $().cloneDeep(null===(k=this._featureProvider)||void 0===k?void 0:k.getFeatureValue(this._featureName))}static isFeatureEnabled(){var k;return null===(k=this._featureProvider)||void 0===k?void 0:k.isOn(this._featureName)}}(0,F.Cg)([(0,H.b)("073-6f3b"),(0,F.Sn)("design:type",Object)],V,"_featureProvider",void 0)},82885:(k,B,U)=>{"use strict";U.d(B,{J:()=>H});var F=U(95891),G=U.n(F),j=U(28085),$=U(44367);class H extends $.z{static isFeatureEnabled(){var k,B;return super.isFeatureEnabled()&&null!==(B=null===(k=this.getVariables())||void 0===k?void 0:k.enabled)&&void 0!==B&&B}static getVariables(){return this.getDefaultConfigCloneWithOverrides()}static getDefaultConfigCloneWithOverrides(){const k=this.getFeatureVariables();return k?(0,j.ES)(this._defaultConfig,k):G().cloneDeep(this._defaultConfig)}}},84399:(k,B,U)=>{"use strict";U.d(B,{R:()=>W});var F=U(8674),G=U(99625),j=U(29887),$=U(13956),H=U(73678),V=U(82885);class W extends V.J{static isFeatureEnabled(){return this._featureRequirements.meetsRequirementsDeprecated(66)&&super.isFeatureEnabled()}static isZoneAvailable(k){var B;return null===(B=this._defaultConfig.zones)||void 0===B?void 0:B.includes(k)}static sendActivationEvent(){this._featureRequirements.meetsRequirementsDeprecated(66)&&this._segmentExperimentTracker.track("campaign-replay")}}W._featureName="campaign-replay",W._defaultConfig={enabled:!1,maps:{"forest_hard-A3":G.l.ForestA3Hard,"forest_hard-A4":G.l.ForestA4Hard,"forest_hard-A5":G.l.ForestA5Hard,"forest_hard-B5":G.l.ForestB5Hard,"forest_hard-B6":G.l.ForestB6Hard,"forest_hard-B7":G.l.ForestB7Hard,"forest_hard-B8":G.l.ForestB8Hard,"forest_hard-C4":G.l.ForestC4Hard,"forest_hard-C7":G.l.ForestC7Hard,"forest_hard-C8":G.l.ForestC8Hard,"forest_hard-D3":G.l.ForestD3Hard,"shiverchill_hard-A2":G.l.ShiverchillA2Hard,"shiverchill_hard-A3":G.l.ShiverchillA3Hard,"shiverchill_hard-A4":G.l.ShiverchillA4Hard,"shiverchill_hard-A5":G.l.ShiverchillA5Hard,"shiverchill_hard-A6":G.l.ShiverchillA6Hard,"shiverchill_hard-A7":G.l.ShiverchillA7Hard,"shiverchill_hard-A9":G.l.ShiverchillA9Hard,"shiverchill_hard-A10":G.l.ShiverchillA10Hard,"shiverchill_hard-A11":G.l.ShiverchillA11Hard,"shiverchill_hard-B1":G.l.ShiverchillB1Hard,"shiverchill_hard-B2":G.l.ShiverchillB2Hard,"shiverchill_hard-B3":G.l.ShiverchillB3Hard,"shiverchill_hard-B6":G.l.ShiverchillB6Hard,"shiverchill_hard-B7":G.l.ShiverchillB7Hard,"shiverchill_hard-B8":G.l.ShiverchillB8Hard,"shiverchill_hard-B9":G.l.ShiverchillB9Hard,"shiverchill_hard-B10":G.l.ShiverchillB10Hard,"skywatch_hard-A0":G.l.SkywatchA0Hard,"skywatch_hard-A1":G.l.SkywatchA1Hard,"skywatch_hard-B1":G.l.SkywatchB1Hard,"skywatch_hard-B2":G.l.SkywatchB2Hard,"skywatch_hard-B3":G.l.SkywatchB3Hard,"skywatch_hard-C1":G.l.SkywatchC1Hard,"skywatch_hard-C2":G.l.SkywatchC2Hard,"skywatch_hard-C3":G.l.SkywatchC3Hard,"skywatch_hard-C4":G.l.SkywatchC4Hard,"skywatch_hard-D1":G.l.SkywatchD1Hard,"skywatch_hard-D2":G.l.SkywatchD2Hard,"skywatch_hard-D3":G.l.SkywatchD3Hard,"skywatch_hard-E1":G.l.SkywatchE1Hard,"skywatch_hard-E2":G.l.SkywatchE2Hard,"skywatch_hard-E3":G.l.SkywatchE3Hard,"skywatch_hard-E4":G.l.SkywatchE4Hard,"skywatch_hard-E5":G.l.SkywatchE5Hard,"bonfire_spire_hard-A1":G.l.BonfireSpireA1Hard,"bonfire_spire_hard-A4":G.l.BonfireSpireA4Hard,"bonfire_spire_hard-B1":G.l.BonfireSpireB1Hard,"bonfire_spire_hard-B2":G.l.BonfireSpireB2Hard,"bonfire_spire_hard-B4":G.l.BonfireSpireB4Hard,"bonfire_spire_hard-B5":G.l.BonfireSpireB5Hard,"bonfire_spire_hard-C1":G.l.BonfireSpireC1Hard,"bonfire_spire_hard-C2":G.l.BonfireSpireC2Hard,"bonfire_spire_hard-C3":G.l.BonfireSpireC3Hard,"bonfire_spire_hard-C4":G.l.BonfireSpireC4Hard,"bonfire_spire_hard-C6":G.l.BonfireSpireC6Hard,"bonfire_spire_hard-D1":G.l.BonfireSpireD1Hard,"bonfire_spire_hard-D2":G.l.BonfireSpireD2Hard,"bonfire_spire_hard-D3":G.l.BonfireSpireD3Hard,"bonfire_spire_hard-D4":G.l.BonfireSpireD4Hard,"bonfire_spire_hard-D5":G.l.BonfireSpireD5Hard,"bonfire_spire_hard-D6":G.l.BonfireSpireD6Hard,"bonfire_spire_hard-E5":G.l.BonfireSpireE5Hard,"bonfire_spire_hard-E6":G.l.BonfireSpireE6Hard,"shipwreck_shore_hard-A1":G.l.ShipwreckShoreA1Hard,"shipwreck_shore_hard-A2":G.l.ShipwreckShoreA2Hard,"shipwreck_shore_hard-A3":G.l.ShipwreckShoreA3Hard,"shipwreck_shore_hard-A4":G.l.ShipwreckShoreA4Hard,"shipwreck_shore_hard-A5":G.l.ShipwreckShoreA5Hard,"shipwreck_shore_hard-A7":G.l.ShipwreckShoreA7Hard,"shipwreck_shore_hard-B2":G.l.ShipwreckShoreB2Hard,"shipwreck_shore_hard-B4":G.l.ShipwreckShoreB4Hard,"shipwreck_shore_hard-B5":G.l.ShipwreckShoreB5Hard,"shipwreck_shore_hard-B6":G.l.ShipwreckShoreB6Hard,"shipwreck_shore_hard-B7":G.l.ShipwreckShoreB7Hard,"shipwreck_shore_hard-B8":G.l.ShipwreckShoreB8Hard,"shipwreck_shore_hard-B10":G.l.ShipwreckShoreB10Hard,"shipwreck_shore_hard-B11":G.l.ShipwreckShoreB11Hard,"shipwreck_shore_hard-B12":G.l.ShipwreckShoreB12Hard,"shipwreck_shore_hard-B13":G.l.ShipwreckShoreB13Hard,"shipwreck_shore_hard-C6":G.l.ShipwreckShoreC6Hard,"shipwreck_shore_hard-C7":G.l.ShipwreckShoreC7Hard,"shipwreck_shore_hard-C8":G.l.ShipwreckShoreC8Hard,"shipwreck_shore_hard-C9":G.l.ShipwreckShoreC9Hard,"shipwreck_shore_hard-C10":G.l.ShipwreckShoreC10Hard,"shipwreck_shore_hard-C11":G.l.ShipwreckShoreC11Hard,"shipwreck_shore_hard-C12":G.l.ShipwreckShoreC12Hard},zones:[H.A_.FOREST,H.A_.FORESTHARD,H.A_.SHIVERCHILLHARD,H.A_.BONFIRE,H.A_.BONFIREHARD,H.A_.SKYWATCH,H.A_.SKYWATCHHARD,H.A_.SHIPWRECKHARD]},(0,F.Cg)([(0,$.b)("47f-ab6a"),(0,F.Sn)("design:type",j.p)],W,"_segmentExperimentTracker",void 0),(0,F.Cg)([(0,$.b)("db5-fb6e"),(0,F.Sn)("design:type",Object)],W,"_featureRequirements",void 0)},15218:(k,B,U)=>{"use strict";U.d(B,{A:()=>$});var F=U(8674),G=U(62459),j=U(13956);class $ extends G.s3P{static get featureVariables(){var k;return this._featureVariables||(this._featureVariables=null===(k=$._featureProvider)||void 0===k?void 0:k.getFeatureValue("difficulty-progression")),this._featureVariables}static get useRevisedDifficulty(){var k,B;return null!==(B=null===(k=this.featureVariables)||void 0===k?void 0:k.useRevisedDifficulty)&&void 0!==B&&B}static get experimentSpawnVariation(){var k;return null===(k=this.featureVariables)||void 0===k?void 0:k.spawnVariationKey}}(0,F.Cg)([(0,j.b)("073-6f3b"),(0,F.Sn)("design:type",Object)],$,"_featureProvider",void 0)},71796:(k,B,U)=>{"use strict";U.d(B,{k:()=>$});var F=U(8674),G=U(62459),j=U(13956);class $ extends G.s3P{static get useRevisedDifficulty(){return this._featureProvider.isOn("difficulty-scaling")}}(0,F.Cg)([(0,j.b)("073-6f3b"),(0,F.Sn)("design:type",Object)],$,"_featureProvider",void 0)},81137:(k,B,U)=>{"use strict";U.d(B,{x:()=>G});var F=U(82885);class G extends F.J{}G._featureName="hud-revamp-2025",G._defaultConfig={enabled:!1}},34616:(k,B,U)=>{"use strict";U.d(B,{N:()=>j});const F={enableMemberJar:!0,maximumSavedBattleCount:10};var G=U(44367);class j extends G.z{static get maximumSavedBattleCount(){return this.featureVariables.maximumSavedBattleCount}static get featureVariables(){var k;return null!==(k=this.getFeatureVariables())&&void 0!==k?k:F}}j._featureName="member-jar"},17148:(k,B,U)=>{"use strict";U.d(B,{k:()=>$});var F=U(62459),G=U(50788),j=U(76277);class ${static get cachedDisabledEvolutionFeature(){return F.Aq$.isDefined(this._cachedDisabledEvolutionFeature)||(this._cachedDisabledEvolutionFeature=(0,j.G)(G.F)),this._cachedDisabledEvolutionFeature}}$._cachedDisabledEvolutionFeature=void 0},46725:(k,B,U)=>{"use strict";U.d(B,{D:()=>$});var F=U(99625),G=U(73678),j=U(82885);class $ extends j.J{static isPrefabZoneAvailable(k){const B=this.getVariables();return this.isFeatureEnabled()&&B.zones.includes(k)||B.generallyAvailableZones.includes(k)}static getAvailablePrefabMap(k){const B=this.getVariables();return this.isFeatureEnabled()&&B.maps[k]||B.generallyAvailableMaps[k]}}$._featureName="prefab-scenes",$._defaultConfig={enabled:!1,zones:[],maps:{},generallyAvailableZones:[G.A_.FOREST,G.A_.SHIVERCHILL,G.A_.BONFIRE,G.A_.SKYWATCH,G.A_.SHIPWRECK,G.A_.MOON],generallyAvailableMaps:{"forest-A3":F.l.ForestA3,"forest-A4":F.l.ForestA4,"forest-A5":F.l.ForestA5,"forest-B5":F.l.ForestB5,"forest-B6":F.l.ForestB6,"forest-B7":F.l.ForestB7,"forest-B8":F.l.ForestB8,"forest-C4":F.l.ForestC4,"forest-C7":F.l.ForestC7,"forest-C8":F.l.ForestC8,"forest-D3":F.l.ForestD3,"shiverchill-A10":F.l.ShiverchillA10,"shiverchill-A11":F.l.ShiverchillA11,"shiverchill-A2":F.l.ShiverchillA2,"shiverchill-A3":F.l.ShiverchillA3,"shiverchill-A4":F.l.ShiverchillA4,"shiverchill-A5":F.l.ShiverchillA5,"shiverchill-A6":F.l.ShiverchillA6,"shiverchill-A7":F.l.ShiverchillA7,"shiverchill-A9":F.l.ShiverchillA9,"shiverchill-B1":F.l.ShiverchillB1,"shiverchill-B10":F.l.ShiverchillB10,"shiverchill-B2":F.l.ShiverchillB2,"shiverchill-B3":F.l.ShiverchillB3,"shiverchill-B6":F.l.ShiverchillB6,"shiverchill-B7":F.l.ShiverchillB7,"shiverchill-B8":F.l.ShiverchillB8,"shiverchill-B9":F.l.ShiverchillB9,"bonfire_spire-A1":F.l.BonfireSpireA1,"bonfire_spire-A4":F.l.BonfireSpireA4,"bonfire_spire-B1":F.l.BonfireSpireB1,"bonfire_spire-B2":F.l.BonfireSpireB2,"bonfire_spire-B4":F.l.BonfireSpireB4,"bonfire_spire-B5":F.l.BonfireSpireB5,"bonfire_spire-C1":F.l.BonfireSpireC1,"bonfire_spire-C2":F.l.BonfireSpireC2,"bonfire_spire-C3":F.l.BonfireSpireC3,"bonfire_spire-C4":F.l.BonfireSpireC4,"bonfire_spire-C6":F.l.BonfireSpireC6,"bonfire_spire-D1":F.l.BonfireSpireD1,"bonfire_spire-D2":F.l.BonfireSpireD2,"bonfire_spire-D3":F.l.BonfireSpireD3,"bonfire_spire-D4":F.l.BonfireSpireD4,"bonfire_spire-D5":F.l.BonfireSpireD5,"bonfire_spire-D6":F.l.BonfireSpireD6,"bonfire_spire-E5":F.l.BonfireSpireE5,"bonfire_spire-E6":F.l.BonfireSpireE6,"shipwreck_shore-A1":F.l.ShipwreckShoreA1,"shipwreck_shore-A2":F.l.ShipwreckShoreA2,"shipwreck_shore-A3":F.l.ShipwreckShoreA3,"shipwreck_shore-A4":F.l.ShipwreckShoreA4,"shipwreck_shore-A5":F.l.ShipwreckShoreA5,"shipwreck_shore-A7":F.l.ShipwreckShoreA7,"shipwreck_shore-B10":F.l.ShipwreckShoreB10,"shipwreck_shore-B11":F.l.ShipwreckShoreB11,"shipwreck_shore-B12":F.l.ShipwreckShoreB12,"shipwreck_shore-B13":F.l.ShipwreckShoreB13,"shipwreck_shore-B2":F.l.ShipwreckShoreB2,"shipwreck_shore-B4":F.l.ShipwreckShoreB4,"shipwreck_shore-B5":F.l.ShipwreckShoreB5,"shipwreck_shore-B6":F.l.ShipwreckShoreB6,"shipwreck_shore-B7":F.l.ShipwreckShoreB7,"shipwreck_shore-B8":F.l.ShipwreckShoreB8,"shipwreck_shore-C10":F.l.ShipwreckShoreC10,"shipwreck_shore-C11":F.l.ShipwreckShoreC11,"shipwreck_shore-C12":F.l.ShipwreckShoreC12,"shipwreck_shore-C6":F.l.ShipwreckShoreC6,"shipwreck_shore-C7":F.l.ShipwreckShoreC7,"shipwreck_shore-C8":F.l.ShipwreckShoreC8,"shipwreck_shore-C9":F.l.ShipwreckShoreC9,"skywatch-A0":F.l.SkywatchA0,"skywatch-A1":F.l.SkywatchA1,"skywatch-B1":F.l.SkywatchB1,"skywatch-B2":F.l.SkywatchB2,"skywatch-B3":F.l.SkywatchB3,"skywatch-C1":F.l.SkywatchC1,"skywatch-C2":F.l.SkywatchC2,"skywatch-C3":F.l.SkywatchC3,"skywatch-C4":F.l.SkywatchC4,"skywatch-D1":F.l.SkywatchD1,"skywatch-D2":F.l.SkywatchD2,"skywatch-D3":F.l.SkywatchD3,"skywatch-E1":F.l.SkywatchE1,"skywatch-E2":F.l.SkywatchE2,"skywatch-E3":F.l.SkywatchE3,"skywatch-E4":F.l.SkywatchE4,"skywatch-E5":F.l.SkywatchE5,"moon-A1":F.l.MoonA1,"moon-B1":F.l.MoonB1,"moon-C1":F.l.MoonC1,"moon-D1":F.l.MoonD1,"academy-CR1":F.l.AcademyCR1,"academy-CR2":F.l.AcademyCR2,"academy-GH1":F.l.AcademyGH1,"academy-GH2":F.l.AcademyGH2,"academy-GH3":F.l.AcademyGH3,"lamplight-C3":F.l.LamplightC3,"springfest_grotto_bunny-A3":F.l.SpringfestGrottoBunnyA3,"springfest_grotto_fox-A3":F.l.SpringfestGrottoFoxA3,"springfest_grotto_bunny-A9":F.l.SpringfestGrottoBunnyA9,"springfest_grotto_fox-A9":F.l.SpringfestGrottoFoxA9,"springfest_grotto_bunny-B2":F.l.SpringfestGrottoBunnyB2,"springfest_grotto_fox-B2":F.l.SpringfestGrottoFoxB2,"springfest_grotto_bunny-B7":F.l.SpringfestGrottoBunnyB7,"springfest_grotto_fox-B7":F.l.SpringfestGrottoFoxB7}}},66207:(k,B,U)=>{"use strict";U.d(B,{D:()=>j});var F=U(95525),G=U(44367);class j extends G.z{static getVariables(){return super.getFeatureVariables()}static isFeatureEnabled(){var k;return super.isFeatureEnabled()&&(null===(k=this.getVariables())||void 0===k?void 0:k.enabled)}static getVariant(){const k=this.getVariables();return this.isFeatureEnabled()&&(null==k?void 0:k.variant)?k.variant:0}static getVariantForUpgrading(){if(this.isFeatureEnabled()){let k=this.getVariant();return 0===k&&(k=2),k}return 0}}j._featureName=F.w.key},36233:(k,B,U)=>{"use strict";U.d(B,{p:()=>W});var F=U(8674),G=U(38170),j=U(29887),$=U(13956),H=U(96797),V=U(44367);class W extends V.z{static isFeatureEnabled(){var k;return super.isFeatureEnabled()&&(null===(k=this.getFeatureVariables())||void 0===k?void 0:k.enabled)}static getVariables(){return super.getFeatureVariables()}static sendActivationEvent(){const k=this.getVariables();k&&(G.r.isDateWithinRange(Date.now(),k.startDate,k.endDate)||k.enabled&&H.P.isOfferInGracePeriod(k))&&this._segmentExperimentTracker.track("segmented-offers")}}W._featureName="segmented-offers",(0,F.Cg)([(0,$.b)("47f-ab6a"),(0,F.Sn)("design:type",j.p)],W,"_segmentExperimentTracker",void 0)},64868:(k,B,U)=>{"use strict";U.d(B,{_:()=>G});var F=U(82885);class G extends F.J{static hasDefeatedPetStore(){const k=this.getVariables();return this.isFeatureEnabled()&&!!(null==k?void 0:k.defeatedPetStore)}static getPetCostTableVariantKey(){var k;const B=this.getVariables();return this.isFeatureEnabled()&&null!==(k=null==B?void 0:B.petCostTableVariantKey)&&void 0!==k?k:""}static getExcludedCategoriesFromLegacyStore(){var k;if(!this.isFeatureEnabled())return[];const B=this.getVariables();return null!==(k=null==B?void 0:B.excludedCategoriesFromLegacyStore)&&void 0!==k?k:[]}static hasUnifiedStore(){var k;const B=this.getVariables();return this.isFeatureEnabled()&&null!==(k=null==B?void 0:B.hasUnifiedStore)&&void 0!==k&&k}static areBundlesEnabled(){var k;const B=this.getVariables();return this.isFeatureEnabled()&&null!==(k=null==B?void 0:B.enableBundles)&&void 0!==k&&k}static isFeatureEnabled(){var k,B;return super.isFeatureEnabled()&&null!==(B=null===(k=this.getVariables())||void 0===k?void 0:k.enabled)&&void 0!==B&&B}}G._featureName="store-revamp",G._defaultConfig={enabled:!1,defeatedPetStore:{expireAtLocalHour:4,battlesToPrompt:3},hasUnifiedStore:!1,petCostTableVariantKey:"",excludedCategoriesFromLegacyStore:["Pets"],enableBundles:!1}},53151:(k,B,U)=>{"use strict";U.d(B,{h:()=>G});var F=U(44367);class G extends F.z{static getVariables(){return super.getFeatureVariables()}static get autoPopTreasureTrack(){var k;const B=this.getVariables();return this.isFeatureEnabled()&&null!==(k=null==B?void 0:B.autoPopTreasureTrack)&&void 0!==k&&k}static isFeatureEnabled(){var k;return super.isFeatureEnabled()&&(null===(k=this.getVariables())||void 0===k?void 0:k.enabled)}}G._featureName="treasure-track-ux"},35488:(k,B,U)=>{"use strict";U.d(B,{J:()=>z});var F=U(8674),G=U(79687),j=U(62459),$=U(13956),H=U(7001);const V=(0,U(77601).gb)({key:"featured-spawn",activateAssociatedExperiments:0,default:{enabled:!0}});var W=U(76277),q=U(47969),K=U(12596);let z=class{constructor(){this.FEATURED_SPAWN_ID="featured-spawn"}loadData(){return(0,F.sH)(this,void 0,void 0,(function*(){try{const k=yield this._networkHandler.getFeaturedSpawnData();this._cachedData=k}catch(k){this._cachedData=void 0,j.VyI.log(`Error loading Featured Spawn Data: ${k}`,j.$bb.Error)}}))}cacheData(k){return(0,F.sH)(this,void 0,void 0,(function*(){k?this._cachedData=k:yield this.loadData()}))}getCachedData(){return this._cachedData}getTimeUntilExpiry(){var k;const B=K.R.parseDateToTimestamp(null===(k=this._cachedData)||void 0===k?void 0:k.endDate);return void 0!==B?Math.max(0,B-Date.now()):0}shouldShowMapPin(k,B){return this._featureRequirements.meetsRequirementsDeprecated(72)&&this.isActive()&&this.isZoneValid(k,B)&&!this.isOnCooldown()}isActive(){if(!this._cachedData)return!1;if(!(0,W.G)(V).enabled)return!1;const k=Date.now(),B=K.R.parseDateToTimestamp(this._cachedData.startDate),U=K.R.parseDateToTimestamp(this._cachedData.endDate);return!(void 0!==B&&B>k)&&(!(void 0!==U&&U{"use strict";U.d(B,{t:()=>F});const F=(0,U(77601).gb)({key:"festival-launch-modal",default:!1,activateAssociatedExperiments:0})},51540:(k,B,U)=>{"use strict";U.d(B,{v:()=>$});var F=U(8674),G=U(48417),j=U(67238);class $ extends j.D{completePastFestivals(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(G.D.WeekendEvents.CompletePastFestivals,{},!0)}))}callFestivalSchedulerRouteDebug(){return(0,F.sH)(this,void 0,void 0,(function*(){return Promise.resolve()}))}getCurrentEventsData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(G.D.WeekendEvents.GetCurrentEventsData,{},!1)}))}getFestivalConfigData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(G.D.WeekendEvents.GetFestivalConfigData,{},!1)}))}getChestData(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.call(G.D.Festival.GetChestData,{chestID:k},!0)}))}setChestDate(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.call(G.D.Festival.SetChestDate,{chestID:k,newDateMs:B},!0)}))}setChestSpins(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.call(G.D.Festival.SetChestSpins,{chestID:k,newSpins:B},!0)}))}getSeenCompletedTaskData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.call(G.D.Festival.GetSeenCompletedTaskData,{},!0)}))}setCompletedTasksSeen(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.call(G.D.Festival.SetCompletedTasksSeen,{festivalQuestId:k,taskIds:B},!0)}))}}},43754:(k,B,U)=>{"use strict";U.d(B,{W:()=>gt});var F=U(8674),G=U(62459),j=U(79687),$=U(62248),H=U(26077),V=U(24521),W=U(10471),q=U(77601);const K=(0,q.gb)({key:"allow-spending-earned-magicoin",activateAssociatedExperiments:1,default:!1}),z=(0,q.gb)({key:"force-mem",activateAssociatedExperiments:1,default:!1});var Y,Q=U(37016),X=U(80003),Z=U(65240),J=U(35120),tt=U(23029),et=U(1195),it=U(77938);!function(k){k.Rescue="rescue",k.Evolution="evolution",k.LostPet="lostPetCost"}(Y||(Y={}));var st=U(82885);class nt extends st.J{static get petCostTableVariationKey(){var k;return null===(k=this.getVariables())||void 0===k?void 0:k.petCostTableVariantKey}}nt._featureName="pet-capture-and-evo-costs",nt._defaultConfig={enabled:!1,petCostTableVariantKey:"evoCostRarityBaseV2"};var at,rt=U(73797),ot=U(46784),ht=U(65050),ct=U(76277),dt=U(68152),lt=U(22023),ut=U(71586),ft=U(30226),bt=U(47968),pt=U(80105),vt=U(44094);let gt=at=class{constructor(k,B,U){this.onBalanceChanged=new G.HN0,this.onAffordableCacheChanged=new G.HN0,this._cachedAffordablePetsAmount=-1,this._cachedPetCosts=new Map,this._previousBalances=new Map,this._secureInventory=k,this._secureInventory.onChange.add((k=>{"currency"===k.type&&W.B.includes(k.id)&&(this._cachedAffordablePetsAmount=-1,this.onBalanceChanged.dispatch({currency:k.id,value:k.quantity}),this._previousBalances.set(k.id,k.quantity))}),this),J.q.instance.game.broadcaster.addAppListener(rt.ig.AnyLevelUp,(()=>{this._cachedAffordablePetsAmount=-1}),this,null,!0),W.B.forEach((k=>{this._previousBalances.set(k,this.getBalance(k))})),B.getActiveMembershipId().catch((()=>null)).then((k=>{G.Aq$.isDefined(k)&&this.onBalanceChanged.add((F=>{var G,j,$,H;const V=B.player;null!==(G=(H=V.data).seenHardCurrencyIds)&&void 0!==G||(H.seenHardCurrencyIds=[]),V.data.seenHardCurrencyIds.includes(F.currency)||(V.updated=!0,V.data.seenHardCurrencyIds.push(F.currency),U.item.sendItemReceivedEvent(F.currency,null===($=null===(j=it.t.getItem("currency",F.currency))||void 0===j?void 0:j.data)||void 0===$?void 0:$.name,"currency",F.value,{transaction_id:k,source_type:Z.C.InitialMemberBonus}))}),this)}),G.RQr.createHandler("Unable to track initial hard currency balance"))}destroy(){this.onBalanceChanged.dispose(),this.onAffordableCacheChanged.dispose(),this._secureInventory.onChange.removeAll(this),J.q.instance.game.broadcaster.removeAppListener(rt.ig.AnyLevelUp,this)}getBalance(k){var B,U;return null!==(U=null===(B=this._secureInventory.get({type:"currency",id:k}))||void 0===B?void 0:B.quantity)&&void 0!==U?U:0}getPreviousBalance(k){var B;return null!==(B=this._previousBalances.get(k))&&void 0!==B?B:0}canAfford(k){return!G.Aq$.isDefined(k)||(!this.isHardCurrencyMemberLocked(k.value)||!W.h.includes(k.currency))&&k.value<=this.getBalance(k.currency)}isHardCurrencyMemberLocked(k=0){const B=this.getBalance(27);return!((0,ct.G)(K)&&k<=B)&&(!!(0,ct.G)(z)&&!J.q.instance.prodigy.gameContainer.get("306-5359").hasMembership())}spend(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){if(!G.Aq$.isDefined(k))return;const U=this._segment.item.beginSecureItemTransaction();yield this._networkHandler.spend(k,B.transaction_id),U.flush(B)}))}grantCaptureTutorialMagicoin(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this._segment.item.beginSecureItemTransaction(),U="Tutorial";yield this._networkHandler.grantCaptureTutorialMagicoin(U),B.flush(Object.assign({transaction_id:U,source_type:Z.C.Tutorial},k))}))}claimAllowances(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this._segment.item.beginSecureItemTransaction(),{backpackRewards:U}=yield this._networkHandler.claimAllowances(k),F={};if(F.transaction_id=vt.$.generateUID(),(0,ct.G)(X.d).enabled)F.source_type=Z.C.WizardBank,F.source_id=Z.C.WizardBank,F.source_name=Z.C.WizardBank,F.instance_type=ht.N.ShopVisit,F.instance_id=this._segment.featureCommon.getCurrentInterfaceID(ot.B.WizardBank);else{const k=yield J.q.instance.prodigy.gameContainer.get("8dc-04eb").getCurrentBattlePassData().catch((k=>(G.RQr.logError(k,"Error fetching battle pass for analytics"),null)));k&&(F.source_type=Z.C.BattlePass,F.source_id=`${k.getQuestID()}-ultra-bonus-${ut.R.getCurrentMonthName()}`,F.source_name="Ultra Bonus",F.instance_type=ht.N.BattlePass,F.instance_id=k.getQuestID())}for(const k of U)ft.J.bagItem(k,J.q.instance.game,"got-item",void 0,F);B.flush(F)}))}getAllowanceClaimData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._networkHandler.getAllowanceClaimData()}))}petAcquisitionCost(k,B){var U;const F=+k,j=this._cachedPetCosts.get(F);if(null==j?void 0:j.has(B))return{currency:27,value:j.get(B)};if(!(B===$.l6.Evolution||B===$.l6.Rescue))return;const V=it.t.getItem("pet",k);if(!(null==V?void 0:V.data))return void G.VyI.log(`petAcquisitionCost: Pet data does not exist for pet: ${k}`,G.$bb.Error);const W=this.getTables().variants[nt.petCostTableVariationKey],q=H.$N[V.data.rarity]+(null!==(U=H.gW[V.data.category])&&void 0!==U?U:""),K=lt.P8.GetEvolutionaryLine(V),z=K.length,Y=1+K.indexOf(F);try{const k=W[q][z][Y][B];if(G.VyI.log(`The pet acquisition cost for pet ${V.ID} (${V.name}) is ${k}`,G.$bb.Info,{variation:nt.petCostTableVariationKey,kind:q,totalEvolutionLevels:z,evolutionLevel:Y,source:B,evolutionId:F}),0===k)return;return this._cachedPetCosts.has(F)||this._cachedPetCosts.set(F,new Map),this._cachedPetCosts.get(F).set(B,k),{currency:27,value:k}}catch(Q){throw G.VyI.log("Pet evolution does not fit cost tables",G.$bb.Error,{kind:q,totalEvolutionLevels:z,evolutionLevel:Y,source:B,evolutionId:F}),Q}}petMergeIngredientCost(k){var B,U,F,j,W,q;const K=+k,z=it.t.getItem("pet",K);(0,dt.v)(null==z?void 0:z.data,`Pet data does not exist for pet: ${k}`);const Y=tt.R.loadData(V.r.PetMergeCosts_json),X=Q._T,Z=Y.mergeCostDefaults.variants[X.defaultPetCostTableVariantKey],J=Y.mergeCostOverrides.variants[X.overridePetCostTableVariantKey],et=H.$N[z.data.rarity]+(null!==(B=H.gW[z.data.category])&&void 0!==B?B:""),st=null!==(F=null===(U=z.data.evolution)||void 0===U?void 0:U.totalEvos)&&void 0!==F?F:0,nt=null!==(W=null===(j=z.data.evolution)||void 0===j?void 0:j.tier)&&void 0!==W?W:0;(0,dt.v)(st>0&&nt>0,`Evolution data does not exist for pet: ${k}`);try{return{currency:27,value:G.Aq$.isDefined(J)&&G.Aq$.isDefined(null===(q=J[K])||void 0===q?void 0:q.mergeBaseCost)?J[K].mergeBaseCost:Z[et][st][nt][$.l6.Merge]}}catch(at){throw G.VyI.log("Pet is not found in merge cost tables",G.$bb.Error,{kind:et,totalEvolutionLevels:st,evolutionLevel:nt,petId:K}),at}}postProcessPets(){var k;const B=this.getTables().levelCapsEvolutionVariant[at.CONSTANTS_DEFAULT.evolutionLevelCapVariantKey],U=it.t.getCategoryItems("pet"),F=this.collectPetEvolutionsByDestinationPetId(U);for(const G of U){const U=F.get(G.ID);if(!U)continue;let j=-2;for(let B=G.ID;B;B=null===(k=F.get(B))||void 0===k?void 0:k.evolvedFrom)j++;U.curve.lvl=B.level[j]}}collectPetEvolutionsByDestinationPetId(k){const B=new Map;for(const U of k)for(const k of U.data.curve)G.Aq$.isDefined(k.evolveID)&&B.set(k.evolveID,{evolvedFrom:U.ID,curve:k});return B}getAmountOfAffordableEvolutions(){if(-1!==this._cachedAffordablePetsAmount)return this._cachedAffordablePetsAmount;const k=J.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return this._cachedAffordablePetsAmount=k.kennel.getPets().filter((B=>this.canAfford(this.petAcquisitionCost(B.ID,$.l6.Evolution))&<.P8.canPetEvolve(k.kennel.createNewPet(B),B.level))).length,this.onAffordableCacheChanged.dispatch(),this._cachedAffordablePetsAmount}refreshAffordableEvolutionsCache(){this._cachedAffordablePetsAmount=-1,this._cachedAffordablePetsAmount=this.getAmountOfAffordableEvolutions()}getTables(){return tt.R.loadData(V.r.PetEvolutionandRescueCosts_json)}};gt.CONSTANTS_DEFAULT={captureTutorialCurrencyAmount:5,evolutionTutorialCurrencyAmount:15,initialCurrencyCountExistingMember:1540,petCostTableVariantKey:"evoCostRarityBaseV2",evolutionLevelCapVariantKey:"evoLvlCapV1",goToRegularPets:!1,petEvolutionAutoPrompt:{skipIfSchool:!0,skipIfExpensive:!1}},(0,F.Cg)([(0,j.inject)("231-9111"),(0,F.Sn)("design:type",bt.b)],gt.prototype,"_networkHandler",void 0),(0,F.Cg)([(0,j.inject)("c47-20b6"),(0,F.Sn)("design:type",Function)],gt.prototype,"_segment",void 0),gt=at=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("61f-37d6")),(0,F.Qj)(1,(0,j.inject)("e20-0fb0")),(0,F.Qj)(2,(0,j.inject)("c47-20b6")),(0,F.Sn)("design:paramtypes",[pt.U,et.E,Function])],gt)},88038:(k,B,U)=>{"use strict";U.d(B,{_:()=>W});var F=U(8674),G=U(62248),j=U(1195),$=U(13956),H=U(30226),V=U(43754);class W{static shouldAutomaticallyPromptEvolution(k,B){var U,F,j,$,W;const q=null!==(F=null===(U=V.W.CONSTANTS_DEFAULT)||void 0===U?void 0:U.petEvolutionAutoPrompt)&&void 0!==F?F:{};if((null===(j=q.skipIfSchool)||void 0===j||j)&&(H.J.isSchoolHours()||this._player.player.isPlayingAtSchool()))return!1;if(this._automaticEvolutionPromptImpressions>=(null!==($=q.maxAutomaticImpressionsPerSession)&&void 0!==$?$:1/0))return!1;if(this._battlesUntilNextPrompt>0)return!1;if(null===(W=q.skipIfExpensive)||void 0===W||W){const U=k.petAcquisitionCost(B,G.l6.Evolution);if(!k.canAfford(U))return!1}return!0}static automaticEvolutionPromptShown(){this._automaticEvolutionPromptImpressions++}static anyEvolutionPromptShown(){var k,B,U;this._evolutionPromptImpressions++,this._battlesUntilNextPrompt=null!==(U=null===(B=null===(k=V.W.CONSTANTS_DEFAULT)||void 0===k?void 0:k.petEvolutionAutoPrompt)||void 0===B?void 0:B.battlesBetweenPrompts)&&void 0!==U?U:0}static postBattleFlowShown(){this._battlesUntilNextPrompt--}static reset(){this._automaticEvolutionPromptImpressions=0,this._evolutionPromptImpressions=0,this._battlesUntilNextPrompt=0}}(0,F.Cg)([(0,$.b)("e20-0fb0"),(0,F.Sn)("design:type",j.E)],W,"_player",void 0),W.reset()},55839:(k,B,U)=>{"use strict";U.d(B,{x:()=>Y});var F,G=U(8674),j=U(62459),$=U(79687),H=U(95891),V=U.n(H),W=U(35120),q=U(68231),K=U(80403);class z{}z.CLASS_VS_CLASS_QUERY="\n query cvcQuery {\n viewer {\n currentClassroom {\n node {\n currentClassroomCup {\n classroomVersusClassroomLeaderboard {\n cycle {\n startsAt\n endsAt\n }\n entry {\n node {\n classroomId\n rank\n displayName\n totalAnswersCorrect\n }\n }\n entries {\n nodes {\n classroomId\n rank\n displayName\n totalAnswersCorrect\n }\n }\n }\n }\n classroomCups(filterBy: {status: COMPLETED}) {\n nodes {\n classroomVersusClassroomLeaderboard {\n entry {\n node {\n rank\n }\n }\n }\n }\n }\n }\n }\n }\n }\n ",z.STUDENT_VS_STUDENT_QUERY="\n query svsQuery ($studentId: ID!, $first: Int!) {\n viewer {\n currentClassroom {\n node {\n currentClassroomCup {\n studentVersusStudentLeaderboard {\n cycle {\n startsAt\n endsAt\n }\n entry (studentId: $studentId) {\n node {\n studentId\n rank\n totalAnswersCorrect\n }\n }\n entries (first: $first) {\n nodes {\n studentId\n rank\n totalAnswersCorrect\n }\n }\n }\n }\n classroomCups(filterBy: {status: COMPLETED}) {\n nodes {\n studentVersusStudentLeaderboard {\n entry (studentId: $studentId) {\n node {\n rank\n totalAnswersCorrect\n }\n }\n entries (first: $first) {\n nodes {\n studentId\n rank\n totalAnswersCorrect\n }\n }\n }\n }\n }\n }\n }\n }\n }\n ",z.STUDENT_VS_STUDENT_PREVIOUS_RANK_QUERY="\n query svsQuery ($studentId: ID!) {\n viewer {\n currentClassroom {\n node {\n classroomCups(filterBy: {status: COMPLETED}) {\n nodes {\n studentVersusStudentLeaderboard {\n entry (studentId: $studentId) {\n node {\n rank\n totalAnswersCorrect\n }\n }\n }\n }\n }\n }\n }\n }\n }\n ";let Y=F=class{constructor(k){this._isThrottleClassVersusClassEnabled=!1,this._isThrottleStudentVersusStudentEnabled=!1,this._graphQl=k}sendRequestClassVersusClass(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U;try{const G=yield this._graphQl.sendRequest(z.CLASS_VS_CLASS_QUERY),j=null===(U=null===(B=null===(k=null==G?void 0:G.data)||void 0===k?void 0:k.viewer)||void 0===B?void 0:B.currentClassroom)||void 0===U?void 0:U.node;return(null==j?void 0:j.currentClassroomCup)?(this._isThrottleClassVersusClassEnabled||(this.sendRequestClassVersusClass=V().throttle(this.sendRequestClassVersusClass,F.REQUEST_THROTTLE_TIME_MS,{trailing:!1}),this._isThrottleClassVersusClassEnabled=!0),j):null}catch(e){return j.VyI.log(`Error sending request: ${j.RQr.stringify(e)}`,j.$bb.Error),null}}))}sendRequestStudentVersusStudent(){return(0,G.sH)(this,arguments,void 0,(function*(k=100){var B,U,G;const $=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;try{const j=yield this._graphQl.sendRequest(z.STUDENT_VS_STUDENT_QUERY,{studentId:$.userID,first:k}),H=null===(G=null===(U=null===(B=null==j?void 0:j.data)||void 0===B?void 0:B.viewer)||void 0===U?void 0:U.currentClassroom)||void 0===G?void 0:G.node;return(null==H?void 0:H.currentClassroomCup)?(this._isThrottleStudentVersusStudentEnabled||(this.sendRequestStudentVersusStudent=V().throttle(this.sendRequestStudentVersusStudent,F.REQUEST_THROTTLE_TIME_MS,{trailing:!1}),this._isThrottleStudentVersusStudentEnabled=!0),H):null}catch(e){return j.VyI.log(`Error sending request: ${j.RQr.stringify(e)}`,j.$bb.Error),null}}))}fetchSvSPreviousRank(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,$,H;const V=W.q.instance.prodigy.gameContainer.get("306-5359");try{const j=yield this._graphQl.sendRequest(z.STUDENT_VS_STUDENT_PREVIOUS_RANK_QUERY,{studentId:V.userID}),W=null===(H=null===($=null===(G=null===(F=null===(U=null===(B=null===(k=null==j?void 0:j.data.viewer.currentClassroom)||void 0===k?void 0:k.node)||void 0===B?void 0:B.classroomCups)||void 0===U?void 0:U.nodes)||void 0===F?void 0:F[0])||void 0===G?void 0:G.studentVersusStudentLeaderboard)||void 0===$?void 0:$.entry)||void 0===H?void 0:H.node;return W||null}catch(e){return j.VyI.log(`Error sending request: ${j.RQr.stringify(e)}`,j.$bb.Error),null}}))}};Y.REQUEST_THROTTLE_TIME_MS=.8*q.Z.REFRESH_TIMEOUT_MS,Y=F=(0,G.Cg)([(0,$.injectable)(),(0,G.Qj)(0,(0,$.inject)("8bb-7057")),(0,G.Sn)("design:paramtypes",[K.K])],Y)},42113:(k,B,U)=>{"use strict";U.d(B,{n:()=>at,O:()=>ot});var F=U(8674),G=U(62459),j=U(96535),$=U(28152),H=U(96494),V=U(90633),W=U(13956),q=U(80060),K=U(44094);class z{constructor(k){this._data=k}get hasClassroom(){return G.Aq$.isDefined(this._data)}}class Y extends z{constructor(k){super(k)}get cycle(){var k,B;return null===(B=null===(k=this._data)||void 0===k?void 0:k.currentClassroomCup)||void 0===B?void 0:B.classroomVersusClassroomLeaderboard.cycle}get entries(){var k,B,U;return null===(U=null===(B=null===(k=this._data)||void 0===k?void 0:k.currentClassroomCup)||void 0===B?void 0:B.classroomVersusClassroomLeaderboard.entries)||void 0===U?void 0:U.nodes.map(Y.convertClassroomToEntry)}get currentUserEntry(){var k,B,U;return Y.convertClassroomToEntry(null===(U=null===(B=null===(k=this._data)||void 0===k?void 0:k.currentClassroomCup)||void 0===B?void 0:B.classroomVersusClassroomLeaderboard.entry)||void 0===U?void 0:U.node)}get previousUserEntry(){var k,B,U,F,G,j;return Y.convertClassroomToEntry(null===(j=null===(G=null===(F=null===(U=null===(B=null===(k=this._data)||void 0===k?void 0:k.classroomCups)||void 0===B?void 0:B.nodes)||void 0===U?void 0:U[0])||void 0===F?void 0:F.classroomVersusClassroomLeaderboard)||void 0===G?void 0:G.entry)||void 0===j?void 0:j.node)}get previousRank(){var k;return null===(k=this.previousUserEntry)||void 0===k?void 0:k.rank}get previousCyclePrize(){}static convertClassroomToEntry(k){if(k)return{id:k.classroomId,displayName:k.displayName,rank:k.rank,totalAnswersCorrect:k.totalAnswersCorrect}}}var Q,X=U(24521),Z=U(28085),J=U(35120),tt=U(23029),et=U(21492);!function(k){k[k.First=0]="First",k[k.Second=1]="Second",k[k.Third=2]="Third",k[k.TopHalf=3]="TopHalf",k[k.BottomHalf=4]="BottomHalf"}(Q||(Q={}));class it extends z{constructor(k){var B,U,F;super(k),this._entries=null===(F=null===(U=null===(B=this._data)||void 0===B?void 0:B.currentClassroomCup)||void 0===U?void 0:U.studentVersusStudentLeaderboard.entries)||void 0===F?void 0:F.nodes.map(it.convertStudentToEntry.bind(it,this.currentStudentId)),this._entries&&it.addSvsPrizeData(this._entries)}get cycle(){var k,B;return null===(B=null===(k=this._data)||void 0===k?void 0:k.currentClassroomCup)||void 0===B?void 0:B.studentVersusStudentLeaderboard.cycle}get entries(){return this._entries}get currentUserEntry(){var k;const B=this.currentStudentId;if(B)return null===(k=this._entries)||void 0===k?void 0:k.find((k=>k.id===B))}get previousUserEntry(){var k,B,U,F,G;return it.convertStudentToEntry(this.currentStudentId,null===(G=null===(F=null===(U=null===(B=null===(k=this._data.classroomCups)||void 0===k?void 0:k.nodes)||void 0===B?void 0:B[0])||void 0===U?void 0:U.studentVersusStudentLeaderboard)||void 0===F?void 0:F.entry)||void 0===G?void 0:G.node)}get previousRank(){var k;return null===(k=this.previousUserEntry)||void 0===k?void 0:k.rank}get previousCyclePrize(){var k,B,U,F,G,j,$;const H=this.currentStudentId;if(!H)return;const V=null===(j=null===(G=null===(F=null===(U=null===(B=null===(k=this._data)||void 0===k?void 0:k.classroomCups)||void 0===B?void 0:B.nodes)||void 0===U?void 0:U[0])||void 0===F?void 0:F.studentVersusStudentLeaderboard)||void 0===G?void 0:G.entries)||void 0===j?void 0:j.nodes.map(it.convertStudentToEntry.bind(it,H));return it.addSvsPrizeData(V),null===($=null==V?void 0:V.find((k=>k.id===H)))||void 0===$?void 0:$.prize}get currentStudentId(){var k,B,U;return null===(U=null===(B=null===(k=this._data)||void 0===k?void 0:k.currentClassroomCup)||void 0===B?void 0:B.studentVersusStudentLeaderboard.entry)||void 0===U?void 0:U.node.studentId}static convertStudentToEntry(k,B){var U,F;if(!B)return;let G="";if(B.studentId===k){G=J.q.instance.prodigy.gameContainer.get("306-5359").name.getName()}else{const k=null===(F=null===(U=J.q.instance.prodigy.friendsListNetworkHandler.classList.find((k=>`${k.userID}`===B.studentId)))||void 0===U?void 0:U.appearance)||void 0===F?void 0:F.name;if(k){const B=J.q.instance.prodigy.gameContainer.resolve(et.C);B.initFromProtobuf(k),G=B.getName()}}return{id:B.studentId,displayName:G,rank:B.rank,totalAnswersCorrect:B.totalAnswersCorrect}}static addSvsPrizeData(k){var B;const U=tt.R.loadData(X.r.SvSLeaderboardRewards_json),F=U.topSpots.length,G=k.filter((B=>B.rank>0&&B.rank<=k.length&&B.totalAnswersCorrect>0)),j=null===(B=G[G.length-1])||void 0===B?void 0:B.rank;for(const $ of G)$.rank<=F?($.prize=(0,Z.mg)(U.topSpots[$.rank-1]),$.prizeIcon=$.rank-1):$.rank<=F+Math.ceil((j-F)/2)?($.prize=(0,Z.mg)(U.remainingTop),$.prizeIcon=Q.TopHalf):($.prize=(0,Z.mg)(U.remainingBottom),$.prizeIcon=Q.BottomHalf)}}var st,nt,at,rt=U(55839);!function(k){k.CurrentClassroomDisplayName="LEADERBOARD_CURRENT_CLASSROOM_DISPLAY_NAME",k.CurrentClassroomPreviousRank="LEADERBOARD_CURRENT_CLASSROOM_PREVIOUS_RANK",k.ShowNonQualifiedWindow="LEADERBOARD_SHOW_NON_QUALIFIED_WINDOW",k.CurrentLeaderboardType="LEADERBOARD_CURRENT_LEADERBOARD_TYPE"}(nt||(nt={})),function(k){k.ClassLeaderboard="classLeaderboard",k.StudentLeaderboard="studentLeaderboard"}(at||(at={}));let ot=st=class extends G.uAl{constructor(){super(...arguments),this.onCvCDataUpdate=new G.HN0,this.onSvSDataUpdate=new G.HN0,this.onLeaderboardResults=new G.HN0,this.onLeaderboardPrize=new G.HN0,this.onMsTimeRemainingUpdate=new G.HN0,this.onInvalidClassCode=new G.HN0,this.onDataUpdateStart=new G.HN0,this._updateOnCreate=!0,this.currentMenuType=at.ClassLeaderboard,this._initialized=!1}static get cachedCycleEndDate(){return st._cachedCycleEndDate}create(){super.create(),this._updateOnCreate&&this.updateLeaderboardData()}updateLeaderboardData(k){this.onDataUpdateStart.dispatch(),this.currentMenuType=null!=k?k:this.currentMenuType;const B=this.currentMenuType===at.ClassLeaderboard;(()=>(0,F.sH)(this,void 0,void 0,(function*(){return B?new Y(yield this._leaderboardService.sendRequestClassVersusClass()):new it(yield this._leaderboardService.sendRequestStudentVersusStudent())})))().then((k=>{var U,F,j,$;if(null==k?void 0:k.hasClassroom){const H=k.currentUserEntry,V=null==H?void 0:H.id,W={};W[nt.CurrentLeaderboardType]=this.currentMenuType,W[nt.ShowNonQualifiedWindow]=!H&&B;let z=k.previousRank;if(!B&&(null===(U=k.previousUserEntry)||void 0===U?void 0:U.totalAnswersCorrect)<=0&&(z=null),W[nt.CurrentClassroomPreviousRank]=null!==(F=K.$.addOrdinalSuffix(z))&&void 0!==F?F:this._localizer.getText("LEADERBOARDS_PREVIOUS_UNRANKED"),!this._initialized||!st._cachedCycleEndDate||Date.now()>st._cachedCycleEndDate){this._initialized=!0;let B="";(null==H?void 0:H.displayName)&&(B=K.$.truncate(H.displayName,st.DISPLAY_NAME_MAX,!0)),W[nt.CurrentClassroomDisplayName]=B;const U=k.cycle;U&&(st._cachedCycleEndDate=new Date(U.endsAt).getTime())}if(q.d.updateInjectedValues(this.GameObject,W),st._cachedCycleEndDate){const U=st._cachedCycleEndDate-Date.now();this.onMsTimeRemainingUpdate.dispatch(U);const F=this.currentMenuType===at.ClassLeaderboard?this._player.data.lastActiveLeaderboardDate:this._player.data.lastActiveStudentLeaderboardDate,W=B?G.Aq$.isDefined(k.previousRank):(null===(j=k.previousUserEntry)||void 0===j?void 0:j.totalAnswersCorrect)>0;if(G.Aq$.isDefined(F)&&F!==st._cachedCycleEndDate&&W){if(this.onLeaderboardResults.dispatch(),(null===($=k.previousCyclePrize)||void 0===$?void 0:$.length)>0){const B=k.previousCyclePrize[0];this.onLeaderboardPrize.dispatch(B.type,B.ID,B.N)}}else{this.updateSavedCurrentCycle();const U=k.entries;if(U){const k=U.findIndex((k=>k.id===V));(B?this.onCvCDataUpdate:this.onSvSDataUpdate).dispatch(U,V,H,k)}}}}else this.onInvalidClassCode.dispatch()})).catch(G.RQr.createHandler("Error sending Leaderboard request"))}updateSavedCurrentCycle(){switch(this.currentMenuType){case at.ClassLeaderboard:this._player.data.lastActiveLeaderboardDate!==st._cachedCycleEndDate&&(this._player.data.lastActiveLeaderboardDate=st._cachedCycleEndDate,this._breadcrumbManager.resetBreadcrumb(V.B.FEATURE_LEADERBOARD,V.B.BREADCRUMB_LEADERBOARD_NOTIFICATION_VIEWED));break;case at.StudentLeaderboard:this._player.data.lastActiveStudentLeaderboardDate!==st._cachedCycleEndDate&&(this._player.data.lastActiveStudentLeaderboardDate=st._cachedCycleEndDate,this._breadcrumbManager.resetBreadcrumb(V.B.FEATURE_LEADERBOARD,V.B.BREADCRUMB_STUDENT_LEADERBOARD_NOTIFICATION_VIEWED),this._breadcrumbManager.resetBreadcrumb(V.B.FEATURE_LEADERBOARD,V.B.BREADCRUMB_STUDENT_LEADERBOARD_PRIZE_CLAIMED))}}retrievePreviousSvSRankData(){return(0,F.sH)(this,void 0,void 0,(function*(){return st._hasFetchedPreviousCycleSvs||(st._previousCycleSvs=yield this._leaderboardService.fetchSvSPreviousRank(),st._hasFetchedPreviousCycleSvs=!0),st._previousCycleSvs}))}destroy(){this.onCvCDataUpdate.dispose(),this.onSvSDataUpdate.dispose(),this.onLeaderboardResults.dispose(),this.onLeaderboardPrize.dispose(),this.onMsTimeRemainingUpdate.dispose(),this.onInvalidClassCode.dispose(),this.onDataUpdateStart.dispose(),super.destroy()}};ot.DISPLAY_NAME_MAX=70,ot._previousCycleSvs=null,ot._hasFetchedPreviousCycleSvs=!1,(0,F.Cg)([(0,W.b)("b1f-9a70"),(0,F.Sn)("design:type",rt.x)],ot.prototype,"_leaderboardService",void 0),(0,F.Cg)([(0,W.b)("306-5359"),(0,F.Sn)("design:type",j.W)],ot.prototype,"_player",void 0),(0,F.Cg)([(0,G.Cdj)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],ot.prototype,"_localizer",void 0),(0,F.Cg)([(0,G.Cdj)("12f-4e29"),(0,F.Sn)("design:type",H.F)],ot.prototype,"_breadcrumbManager",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],ot.prototype,"onCvCDataUpdate",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],ot.prototype,"onSvSDataUpdate",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],ot.prototype,"onLeaderboardResults",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],ot.prototype,"onLeaderboardPrize",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],ot.prototype,"onMsTimeRemainingUpdate",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],ot.prototype,"onInvalidClassCode",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],ot.prototype,"onDataUpdateStart",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],ot.prototype,"_updateOnCreate",void 0),ot=st=(0,F.Cg)([(0,G.EVk)("LeaderboardDataProvider",$.Y.leaderboard)],ot)},2072:(k,B,U)=>{"use strict";U.d(B,{e:()=>K});var F=U(8674),G=U(62459),j=U(79687),$=U(35120),H=U(15218),V=U(79600),W=U(48417);class q{static getLegacySpawnData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeLegacySpawnRequest(W.D.LegacySpawn.GetLegacySpawnData)}))}static makeLegacySpawnRequest(k){return(0,F.sH)(this,arguments,void 0,(function*(k,B={}){try{const U=$.q.instance.prodigy.gameContainer.get("00d-b27e"),F=yield U.cloudScript.timeoutMS(q.NETWORK_TIMEOUT_DURATION_MS).setRetryOption({retryCount:q.NETWORK_RETRY_COUNT}).execute(k,B);if(!F.isOK())throw new V.CatalystSdkError(V.EErrorCode.Unknown,"Unknown Catalyst SDK Error",`${F.status}: ${JSON.stringify(F.data)}`);return F.data}catch(U){throw new Error(`Error calling Cloudscript ${k}. ${U}`)}}))}}q.NETWORK_TIMEOUT_DURATION_MS=1e4,q.NETWORK_RETRY_COUNT=2;let K=class{constructor(){this.assetLoader=$.q.instance.prodigy.gameContainer.get(G.t5G.AssetLoader),this._getDataDirty=!1}loadDataSchemaFromJson(k){return(0,F.sH)(this,void 0,void 0,(function*(){return yield this.assetLoader.loadAssets([k]),$.q.instance.game.cache.getJSON(k)}))}getMaximumSpawnsForMap(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,G;const j=(yield this.fetchLegacySpawnData()).get(k);return H.A.useRevisedDifficulty?null!==(F=null!==(U=null===(B=null==j?void 0:j.variations)||void 0===B?void 0:B.maxSpawnCount)&&void 0!==U?U:null==j?void 0:j.default.length)&&void 0!==F?F:0:null!==(G=null==j?void 0:j.default.length)&&void 0!==G?G:0}))}getSpawnDataForMap(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=(yield this.fetchLegacySpawnData()).get(k);return B?this.getVariation(B):[]}))}getAllSpawnDataInZone(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=[],U=yield this.fetchLegacySpawnData();return Array.from(U.keys()).forEach((F=>{if(F.startsWith(k)){const k=this.getVariation(U.get(F));B.push(...k)}})),B}))}getVariation(k){var B,U,F;return H.A.useRevisedDifficulty?null!==(U=null!==(B=k.variations[H.A.experimentSpawnVariation])&&void 0!==B?B:k.default)&&void 0!==U?U:[]:null!==(F=k.default)&&void 0!==F?F:[]}fetchLegacySpawnData(){return(0,F.sH)(this,void 0,void 0,(function*(){return!this._getDataDirty&&G.Aq$.isDefined(this._getSpawnsPromise)||(this._getSpawnsPromise=new Promise(((k,B)=>{q.getLegacySpawnData().then((B=>{this._getDataDirty=!1;const U=new Map;B.spawns.forEach((k=>{U.set(k.mapId,k)})),k(U)})).catch((k=>{this._getDataDirty=!0,B(new Error(k))}))}))),this._getSpawnsPromise}))}};K=(0,F.Cg)([(0,j.injectable)()],K)},55122:(k,B,U)=>{"use strict";U.d(B,{s:()=>V});var F=U(62459),G=U(6452),j=U(5491),$=U(35120),H=U(71790);class V{static get minLevel(){return this.battleConstants.constants.baseLevelMinimum}static get maxLevelConfig(){return this.battleConstants.constants.baseLevelMaximumConfig}static getPlayerLevelCap(k){var B,U;const G=k.getPlayerData();return F.Aq$.isDefined(null==G?void 0:G.difficultyUnlocks)?(null===(B=G.difficultyUnlocks)||void 0===B?void 0:B.expert)?this.battleConstants.constants.baseLevelMaximumConfig.expert:(null===(U=G.difficultyUnlocks)||void 0===U?void 0:U.hard)?this.battleConstants.constants.baseLevelMaximumConfig.hard:this.battleConstants.constants.baseLevelMaximumConfig.regular:(F.VyI.log("Player difficulty unlock data is undefined",F.$bb.Warning),this.battleConstants.constants.baseLevelMaximum)}static get activePlayerLevelCap(){const k=$.q.instance.prodigy.gameContainer.get("306-5359");return this.getPlayerLevelCap(k)}static get baseLevelRequiredForChargedLevels(){var k,B;const U=$.q.instance.prodigy.gameContainer.get("306-5359");return(null===(k=U.difficultyUnlocks)||void 0===k?void 0:k.expert)||(null===(B=U.difficultyUnlocks)||void 0===B?void 0:B.hard)?this.battleConstants.constants.baseLevelMaximumConfig.expert:this.battleConstants.constants.baseLevelMaximum}static calculatePlayerOverflowXp(k){const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=this.xpRequiredForLevel(this.activePlayerLevelCap,j.V.Player),F=Math.min(U,B.getStars())-U+k;return Math.max(0,F)}static validatePlayerAndPetXp(){const k=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player;V.validateCreatureXp(k.data,j.V.Player,V.activePlayerLevelCap),k.kennel.data.forEach((k=>{V.validateCreatureXp(k,j.V.Pet,V.activePlayerLevelCap)})),k.updated=!0,k.kennel.updated=!0}static xpRequiredForLevel(k,B){const U=G.D.getLevelCurve(),j=G.D.getXpRequiredForLevel(k,U.cumulativeXp,1);return null===j?(F.VyI.log(`Level curve for ${B} is missing required data for level ${k}`,F.$bb.Error),G.D.getXpRequiredForLevel(U.cumulativeXp.length-1,U.cumulativeXp,1)):j}static validateCreatureXp(k,B,U){const j=G.D.getLevelCurve().cumulativeXp;if(F.Aq$.isDefined(k.nextLevelProgressPercent)||(k.nextLevelProgressPercent=G.D.getCurrentLevelProgressPercent(k.level,k.stars,j,1)),k.level>=U&&(k.nextLevelProgressPercent=1),!F.Aq$.isDefined(k.stars)||1===k.nextLevelProgressPercent||0===k.nextLevelProgressPercent)return void(k.stars=V.xpRequiredForLevel(k.level,B));const $=G.D.getCurrentLevelProgressPercent(k.level,k.stars,j,1);if(!(Math.abs(k.nextLevelProgressPercent-$)<.001)){const U=k.stars;k.stars=G.D.getXpFromNextLevelProgressPercent(k.level,k.nextLevelProgressPercent,j,1),F.VyI.log(`${B} xp adjusted to new level curve ${k.level} at ${k.stars} stars\n Old xp: ${U} -> New xp: ${k.stars}`,F.$bb.Info)}}}V.battleConstants=new H.T},18332:(k,B,U)=>{"use strict";U.d(B,{I:()=>ct});var F=U(8674),G=U(62459),j=U(85880),$=U(95891),H=U.n($),V=U(68910),W=U(88022),q=U(82351),K=U(99625),z=U(56942),Y=U(70156),Q=U(78746),X=U(35120),Z=U(49237),J=U(28152),tt=U(34603),et=U(67665),it=U(24110),st=U(53661),nt=U(80060),at=U(54174),rt=U(66397);const ot={[Q.Os.Battle]:"wave-battle",[Q.Os.Treasure]:"treasure-rush"},ht={[Q.Os.Battle]:{actionTitle:"Waves",largeIconFrame:"info-stage-wave",smallIconFrame:"stage-battle"},[Q.Os.Treasure]:{actionTitle:"Attacks",largeIconFrame:"info-stage-chest",smallIconFrame:"stage-treasure"}};let ct=class extends G.uAl{constructor(){super(...arguments),this._stageIntroSpine=z.Q.Spine_stage_intros_json,this._stagePositions=[],this._opponentPlayerPieces={},this._numberOfPiecesSetup=0,this._matchboardElementTweens=[],this._reviveCountTextProperties=new V.TextStyle({fontSize:56,fill:G.yQ0.WHITE,strokeThickness:12,stroke:G.yQ0.ORANGE,fontFamily:G.dBt.PaytoneOne,lineJoin:"round",trim:!0}),this._lootBagWidgetTextProperties=new V.TextStyle({fontSize:72,fill:G.yQ0.WHITE,strokeThickness:20,stroke:G.Q1f.hexToColor("#363636").color,fontFamily:G.dBt.PaytoneOne,lineJoin:"round",trim:!0})}get fullScreenCardRoot(){return this._fullScreenCardRoot}create(){super.create(),this._infoWidgetsOnScreenPos={x:this._infoWidgetsRoot.transform.localPosition.x,y:this._infoWidgetsRoot.transform.localPosition.y},this._infoWidgetsOffScreenPos={x:1280,y:this._infoWidgetsOnScreenPos.y},this._matchboardOnScreenPos={x:this._matchboardRectTransform.anchoredPivotOffset.x,y:this._matchboardRectTransform.anchoredPivotOffset.y},this._matchboardOffScreenPos={x:this._matchboardOnScreenPos.x,y:-this._matchboardOnScreenPos.y},this._stageGridLayoutOffset=this._stageGridLayout.GameObject.transform.sizeDelta.width/2,this._matchboardOffset=this._matchboardRectTransform.sizeDelta.width/2,this.setupMatchboardZones(),this._exitButton.GameObject.active=!this._lootDashManager.matchController.isQuickQuiz,this._fullScreenCardRoot.active=!1,this._lootDashManager.matchController.onOpponentAdvanced.add(this.handleOpponentStageUpdate,this),this._lootDashManager.matchController.onOpponentJoined.add((k=>{const B=k-this._numberOfPiecesSetup;this.setupOpponents(this._lootDashManager.matchController.opponents.slice(-B))})),this._lootDashPlayerPinTransform.GameObject.active=!1,this._highPlatformYPos=this._lootDashPlayerPinTransform.anchoredPivotOffset.y,this._lowPlatformYPos=this._highPlatformYPos+12,this.setupOpponents(this._lootDashManager.matchController.opponents),this.setupPlayerPiece()}postCreate(){super.postCreate(),this._stageInfoWidgetOnScreenPos={x:this._stageInfoWidgetRoot.transform.localPosition.x,y:this._stageInfoWidgetRoot.transform.localPosition.y},this._stageInfoWidgetOffScreenPos={x:this._stageInfoWidgetOnScreenPos.x,y:-(this._stageInfoWidgetSortingAnchor.getRootContainer().getBounds().height+10)},this.setupMathStreakWidget(),this.setupLootBagWidget(),this.updateStageInfoWidget(!1).catch(G.RQr.createHandler("Error setting up stage info widget")),this._lootBagWaveCompleteIcon.active=!1,this._lootBagWaveCompleteText.GameObject.active=!1}setupMatchboardZones(){const k=this._lootDashManager.matchController.getCurrentZoneStages(),B=this._lootDashManager.matchController.currentStageIndex,U=[],F=[];for(let G=0;GB,[st.eV.StageType]:j.stageType})),F.push(nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,K.l.LootDashStageOverlay,{[st.eV.StageHasMultiplePlayers]:0===G}))}Promise.all(U).then((k=>{for(const B of k)this._stageGridLayout.GameObject.addChild(B),this._stagePositions.push(B.transform.anchoredPivotOffset);this._lootDashPlayerPinTransform.setAnchoredPivotOffset(this._stagePositions[0].x,this._highPlatformYPos),this._lootDashPlayerPinTransform.GameObject.active=!0,this.cacheMatchboardAsBitmap(),this._lootDashManager.matchController.onBattleDataChanged.add((()=>{this.handleBattleDataChanged().catch(G.RQr.createHandler("LootDashBattleUIComponent: Error handling battle data changed"))}),this),this.handleBattleDataChanged().catch(G.RQr.createHandler("LootDashBattleUIComponent: Error handling initial battle data change"))})).catch(G.RQr.createHandler("LootDashBattleUIComponent: Error initializing battle UI")),Promise.all(F).then((k=>{for(const B of k)this._stageOverlayGridLayout.GameObject.addChild(B)})).catch(G.RQr.createHandler("LootDashBattleUIComponent: Error initializing stage overlays"))}setupOpponents(k){this._numberOfPiecesSetup+=k.length;const B=[];for(let U=0;U{B.forEach(((B,U)=>{const F=k[U],j=F.currentStageIndex;this._stagePositions[j]?(B.active=!1,B.transform.setPosition(this._stagePositions[j].x,this._highPlatformYPos),this._lootDashManager.matchController.getPlayerHeadSprite(F.playerId).then((k=>{this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!1,nt.d.updateInjectedValues(B,{[st.eV.MatchBoardPieceName]:`Loot Dash Opponent ${F.playerId}`,[st.eV.MatchBoardPieceHeadTexture]:k.texture}),this.cacheMatchboardAsBitmap()})).catch(G.RQr.createHandler("LootDashBattleUIComponent: Error loading opponent head sprite")),this._opponentPlayerPieces[F.playerId]=B,j!==this._lootDashManager.matchController.currentStageIndex&&this.handleOpponentStageUpdate(F.playerId,j)):B.destroy()}))})).catch(G.RQr.createHandler("LootDashBattleUIComponent: Error loading opponent prefab"))}setupPlayerPiece(){this._numberOfPiecesSetup++;const k=X.q.instance.prodigy.gameContainer.get("e20-0fb0").getUserID();this._lootDashManager.matchController.getPlayerHeadSprite(k).then((k=>{this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!1,nt.d.updateInjectedValues(this._lootDashPlayerPinTransform.GameObject,{[st.eV.MatchBoardPieceName]:"Main player piece",[st.eV.MatchBoardPieceHeadTexture]:k.texture}),this.cacheMatchboardAsBitmap()})).catch(G.RQr.createHandler("LootDashBattleUIComponent: Error loading player head sprite"))}handleBattleDataChanged(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U,F,j;const $=H().cloneDeep(this._lootDashManager.matchController.lootDashMatchData),V=this._lootDashMatchData;if(void 0===V)return this._mathStreakWidgetSpine.setAnimationByName(0,at.h2[`PipFill${null!==(k=$.currentMathStreak)&&void 0!==k?k:0}`],!1),this._lootBagCountText.text=Object.values($.lootBagData).reduce(((k,B)=>k+B),0).toString(),yield Promise.all([this.updateStageInfoWidget(!1),this.advancePlayerToStage(this._lootDashManager.matchController.currentStageIndex,!0)]),void(this._lootDashMatchData=$);const W=this._lootDashManager.matchController.getCurrentZoneStages().length,q=this._lootDashManager.matchController.currentStageIndex,K=null!==(U=null===(B=null==V?void 0:V.currentStage)||void 0===B?void 0:B.stageIndex)&&void 0!==U?U:-1;if(this.updateStageInfoWidget(q!==K).catch(G.RQr.createHandler("Error updating stage info widget")),q(null!==(F=null==V?void 0:V.lootBagData.fromStreak)&&void 0!==F?F:0)?Q.s9:$.currentMathStreak,B=null!==(j=null==V?void 0:V.currentMathStreak)&&void 0!==j?j:0;this.handleMathStreakChange(B,k)}this._lootDashMatchData=$}))}getStagePosition(k){return k>=this._stagePositions.length?this._matchboardTrackEndIcon.GameObject.transform.localPosition:this._stagePositions[k]}advancePlayerToStage(k){return(0,F.sH)(this,arguments,void 0,(function*(k,B=!1){if(this._lootDashManager.matchController.currentStageIndex<1)return;const U=B?1:at.I1.DEFAULT_TWEEN_DURATION,G=this._stageGridLayout.GameObject.children[k-1].transform.localPosition.x;yield this.adjustMatchboardElementSize(this._completedTrackTransform,{width:Math.abs(G+this._stageGridLayoutOffset),height:this._completedTrackTransform.sizeDelta.height},U),this.updateStage(k-1);for(const F of this._lootDashManager.matchController.opponents)F.currentStageIndex===k-1&&this.updateOpponentPiece(F.playerId),B||this.playSfx(q.B.Loot_dash_matchboard_move);const j=this._stagePositions[k].x;yield Promise.all([this.moveMatchboardElement(this._lootDashPlayerPinTransform.GameObject,{x:j,y:this._highPlatformYPos},U).then((()=>(0,F.sH)(this,void 0,void 0,(function*(){return null!=B?B:this.rotatePlayerPinEnd()})))),this.adjustMatchboardElementSize(this._inProgressTrackTransform,{width:Math.abs(j+this._stageGridLayoutOffset),height:this._inProgressTrackTransform.sizeDelta.height},U),null!=B?B:this.rotatePlayerPinStart()]);for(const F of this._lootDashManager.matchController.opponents)F.currentStageIndex===k&&this.updateOpponentPiece(F.playerId);this.updateStage(k)}))}rotatePlayerPinStart(){return(0,F.sH)(this,void 0,void 0,(function*(){this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!1;const k=this.tweenGameObjectRotation(this._lootDashPlayerPinTransform.GameObject,at.I1.PLAYER_PIN_ROTATE_START_AMOUNT,at.I1.PLAYER_PIN_ROTATE_START_TWEEN_DURATION);this._matchboardElementTweens.push(k),yield k.onTweenComplete.asPromise(),this._matchboardElementTweens.splice(this._matchboardElementTweens.indexOf(k),1),this.cacheMatchboardAsBitmap()}))}rotatePlayerPinEnd(){return(0,F.sH)(this,void 0,void 0,(function*(){this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!1;const k=this.tweenGameObjectRotation(this._lootDashPlayerPinTransform.GameObject,0,at.I1.PLAYER_PIN_ROTATE_END_TWEEN_DURATION,G.GS3.generateCustomElasticEase(at.I1.PLAYER_PIN_ROTATE_ELASTIC_STRENGTH,at.I1.PLAYER_PIN_ROTATE_ELASTICITY,!1,!0));this._matchboardElementTweens.push(k),yield k.onTweenComplete.asPromise(),this._matchboardElementTweens.splice(this._matchboardElementTweens.indexOf(k),1),this.cacheMatchboardAsBitmap()}))}movePlayerPinToEndOfMatchboard(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._stagePositions[this._stagePositions.length-1].x,B=Math.round(this._stageGridLayout.GameObject.transform.sizeDelta.width/2);yield this.adjustMatchboardElementSize(this._completedTrackTransform,{width:k+B,height:this._inProgressTrackTransform.sizeDelta.height},at.I1.DEFAULT_TWEEN_DURATION),this.updateStage(this._stagePositions.length-1);for(const F of this._lootDashManager.matchController.opponents)F.currentStageIndex===this._stagePositions.length-1&&this.updateOpponentPiece(F.playerId);this.playSfx(q.B.Loot_dash_matchboard_move);const U=this._matchboardTrackEndIcon.GameObject.transform.anchoredPivotOffset.x;yield Promise.all([this.moveMatchboardElement(this._lootDashPlayerPinTransform.GameObject,{x:U,y:this._highPlatformYPos},at.I1.DEFAULT_TWEEN_DURATION),this.adjustMatchboardElementSize(this._inProgressTrackTransform,{width:U+this._matchboardOffset,height:this._inProgressTrackTransform.sizeDelta.height},at.I1.DEFAULT_TWEEN_DURATION)])}))}moveMatchboardElement(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!1;const F=this.tweenGameObjectPosition(k,{x:B.x,y:B.y},U);this._matchboardElementTweens.push(F),yield F.onTweenComplete.asPromise(),this._matchboardElementTweens.splice(this._matchboardElementTweens.indexOf(F),1),this.cacheMatchboardAsBitmap()}))}adjustMatchboardElementSize(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!1;const F=this.tweenRectTransformSize(k,{width:B.width,height:B.height},U);this._matchboardElementTweens.push(F),yield F.onTweenComplete.asPromise(),this._matchboardElementTweens.splice(this._matchboardElementTweens.indexOf(F),1),this.cacheMatchboardAsBitmap()}))}hideAll(){return(0,F.sH)(this,void 0,void 0,(function*(){yield Promise.all([this.setInfoWidgetsVisibility(!1),this.hideMatchboard()])}))}showAll(){return(0,F.sH)(this,void 0,void 0,(function*(){yield Promise.all([this.setInfoWidgetsVisibility(!0),this.showMatchboard()])}))}setInfoWidgetsVisibility(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=k?this._infoWidgetsOnScreenPos:this._infoWidgetsOffScreenPos;this.isGameObjectAtWorldPosition(this._infoWidgetsRoot,B)||(yield this.tweenGameObjectPosition(this._infoWidgetsRoot,B).onTweenComplete.asPromise())}))}isGameObjectAtWorldPosition(k,B){return k.transform.worldPosition.x===B.x&&k.transform.worldPosition.y===B.y}showMatchboard(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.moveMatchboardElement(this._matchboardRectTransform.GameObject,this._matchboardOnScreenPos,at.I1.DEFAULT_TWEEN_DURATION)}))}hideMatchboard(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.moveMatchboardElement(this._matchboardRectTransform.GameObject,this._matchboardOffScreenPos,at.I1.DEFAULT_TWEEN_DURATION)}))}hideStageInfoWidget(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.tweenGameObjectPosition(this._stageInfoWidgetRoot,this._stageInfoWidgetOffScreenPos).onTweenComplete.asPromise()}))}showStageInfoWidget(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.tweenGameObjectPosition(this._stageInfoWidgetRoot,this._stageInfoWidgetOnScreenPos).onTweenComplete.asPromise()}))}tweenGameObjectPosition(k,B,U=at.I1.DEFAULT_TWEEN_DURATION){const F={x:k.transform.localPosition.x,y:k.transform.localPosition.y},G=X.q.instance.game.add.tween(F,this);return G.to(B,U),G.onUpdate.add((()=>{k.transform.setPosition(F.x,F.y)})),G.start(),G}tweenGameObjectRotation(k,B,U=at.I1.DEFAULT_TWEEN_DURATION,F){const G=X.q.instance.game.add.tween(k.transform,this);return G.to({localRotation:B},U,F),G.start(),G}handleOpponentStageUpdate(k,B){const U=this._lootDashManager.matchController.currentStageIndex===B,F=this.getStagePosition(B).x,j=U?this._highPlatformYPos:this._lowPlatformYPos;this._opponentPlayerPieces[k].active=!0;const $=at.I1.DEFAULT_TWEEN_DURATION,H=window.setTimeout((()=>{this._opponentPiecesRoot.addChildAt(this._opponentPlayerPieces[k],this._opponentPiecesRoot.children.length-1)}),$/3);this.moveMatchboardElement(this._opponentPlayerPieces[k],{x:F,y:j},$).then((()=>{this.updateOpponentPiece(k),this.updateStage(B)})).catch((k=>{clearTimeout(H),G.RQr.logError(k,"LootDashBattleUIComponent: Error moving opponent player piece after update")})),this.updateStage(B-1)}updateOpponentPiece(k){const B=this._lootDashManager.matchController.currentStageIndex,U=this._lootDashManager.matchController.getOpponentData(k).currentStageIndex,F=B===U,G=this._opponentPlayerPieces[k];G.transform.localPosition.x!==this.getStagePosition(U).x||(G.active=!F,G.transform.setPositionY(F?this._highPlatformYPos:this._lowPlatformYPos))}updateStage(k){if(k<0||k>=this._stagePositions.length)return;let B=this._lootDashManager.matchController.opponents.filter((B=>B.currentStageIndex===k)).length;this._lootDashManager.matchController.currentStageIndex===k&&B++,nt.d.updateInjectedValues(this._stageGridLayout.GameObject.children[k],{[st.eV.StageCurrent]:k===this._lootDashManager.matchController.currentStageIndex,[st.eV.StageCompleted]:kthis._lootDashManager.matchController.currentStageIndex,[st.eV.ShowStageIcon]:0===B}),nt.d.updateInjectedValues(this._stageOverlayGridLayout.GameObject.children[k],{[st.eV.StageHasMultiplePlayers]:B>1})}tweenRectTransformSize(k,B,U=at.I1.DEFAULT_TWEEN_DURATION){const F={width:k.sizeDelta.width,height:k.sizeDelta.height},G=X.q.instance.game.add.tween(F,this);return G.to(B,U),G.onUpdate.add((()=>{k.setSizeDelta(F.width,F.height)})),G.start(),G}showReviveSequence(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield X.q.instance.prodigy.load.assetsAsPromise([z.Q.Spine_revive_json]),this._fullScreenCardSpine.setAsset(z.Q.Spine_revive_json);const B=k===Y.eA?"∞":(k+1).toString(),U=new V.Text(B,this._reviveCountTextProperties);U.scale.set(1,-1),U.anchor.set(.5,.5),U.position._x-=2;const F=this._fullScreenCardSpine.getSlot(at.I1.REVIVE_ANIMATION_SLOT_NAME).data.index;this._fullScreenCardSpine.getSpine().getSlotContainerByIndex(F).addChild(U),this._fullScreenCardSpine.getSpine().onEvent.addOnce(((B,F)=>{F.data.name===at.I1.REVIVE_UPDATE_EVENT_NAME&&(U.text=k===Y.eA?"∞":k.toString())})),this.playSfx(q.B.Loot_dash_revive),this._fullScreenCardRoot.active=!0,this._fullScreenCardSpine.setAnimationByName(0,at.I1.REVIVE_ANIMATION_NAME,!0),yield this._fullScreenCardSpine.getSpine().onComplete.asPromise(),this._fullScreenCardRoot.active=!1}))}showLootBagReceivedSequence(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this._lootBagWidgetSpine.getRootContainer();B.cacheAsBitmap=!1;const U=this._lootDashManager.matchController.lootDashMatchData,F=Object.values(U.lootBagData).reduce(((k,B)=>k+B),0);this.playSfx(q.B.Loot_dash_loot_bag_added),this._lootBagWidgetRoot.active=!0,this._lootBagWidgetSpine.setAnimationByName(0,at.Fi.Receive,!1),yield this._lootBagWidgetSpine.getSpine().onComplete.asPromise();for(let G=0;Gk[at.I1.MATH_STREAK_LOOT_BAG_ATTACHMENT_NAME])))||void 0===k?void 0:k[at.I1.MATH_STREAK_LOOT_BAG_ATTACHMENT_NAME],U=null==B?void 0:B.region.texture;U&&this._mathStreakIconGraphic.setTexture(U)}setupLootBagWidget(){this._lootBagWidgetRoot.active=!0;X.q.instance.prodigy.load.assetsAsPromise([z.Q.Lootbag_widget_json]).then((()=>{this._lootBagWidgetSpine.getRootContainer().cacheAsBitmap=!0})).catch(G.RQr.createHandler("LootDashBattleUiComponent: Failed to load loot bag widget spine")),this._lootBagWidgetSpine.setAsset(z.Q.Lootbag_widget_json),this._lootBagCountText=new V.Text((0).toString(),this._lootBagWidgetTextProperties),this._lootBagCountText.scale.set(1,-1),this._lootBagCountText.anchor.set(.5,.5);const k=this._lootBagWidgetSpine.getSlot(at.I1.LOOT_BAG_ANIMATION_SLOT_NAME).data.index;this._lootBagWidgetSpine.getSpine().getSlotContainerByIndex(k).addChild(this._lootBagCountText);const B=this._lootBagWidgetRoot.transform.worldPosition;this._lootBagIconTargetPosition={x:B.x-21,y:B.y-21}}updateStageInfoWidget(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this._lootDashManager.matchController.lootDashMatchData,U=B.currentStage;if(!U)return void this._stageInfoWidgetRoot.transform.setPosition(this._stageInfoWidgetOffScreenPos.x,this._stageInfoWidgetOffScreenPos.y);const F=ht[U.stageType],j=X.q.instance.game.cache.getTexture(W._.Ui_loot_dash_json,F.largeIconFrame);let $;switch(U.stageType){case Q.Os.Battle:$=`${B.currentWaveIndex+1} / ${U.waves.length}`;break;case Q.Os.Treasure:$=`${B.currentWaveIndex}`}const H=B.stageData[B.currentStage.stageIndex+1];let V;H&&(V=X.q.instance.game.cache.getTexture(W._.Ui_loot_dash_json,ht[H.stageType].smallIconFrame)),this._stageInfoWidgetSortingAnchor.getRootContainer().cacheAsBitmap=!1,k&&(yield this.hideStageInfoWidget(),yield G.Egh.timeout(at.I1.STAGE_INFO_WIDGET_UPDATE_DELAY_MS)),nt.d.updateInjectedValues(this.GameObject,{[st.eV.StageInfoWidgetActionTitle]:F.actionTitle,[st.eV.StageInfoWidgetActionProgress]:$,[st.eV.StageInfoWidgetCurrentStageIcon]:j,[st.eV.StageInfoWidgetNextStageIcon]:V,[st.eV.StageInfoWidgetShowFinishLine]:void 0===H}),yield this.showStageInfoWidget(),this._stageInfoWidgetSortingAnchor.getRootContainer().cacheAsBitmap=!0}))}handleMathStreakChange(k,B){let U;if(B<=0?(U=k<=0?at.h2.EmptyStateStar:at.h2[`PipLoss${k}`],k!==B&&(this.playSfx(q.B.Loot_dash_math_streak_reset),this._segment.lootDash.sendMathStreakResetEvent(k))):(U=at.h2[`PipFill${B}`],k!==B&&(this.playSfx(q.B.Loot_dash_math_streak_increased),this._segment.lootDash.sendMathStreakContinuedEvent(B))),U){const k=this._mathStreakWidgetSpine;k.getRootContainer().cacheAsBitmap=!1,k.setAnimationByName(0,U,!1),k.getSpine().onComplete.addOnce((()=>{U===at.h2.PipFill5?this.playStreakCompleteSequence().catch(G.RQr.createHandler("Failed to play math streak complete sequence")):k.getRootContainer().cacheAsBitmap=!0}))}}playStreakCompleteSequence(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._mathStreakWidgetSpine,B=this._lootBagMathStreakIcon;k.getRootContainer().cacheAsBitmap=!1,this.playSfx(q.B.Loot_dash_math_streak_complete),k.setAnimationByName(0,at.h2.PipFillFull,!1),yield k.getSpine().onComplete.asPromise(),B.active=!0,k.setAnimationByName(0,at.h2.FullStateNoIcon,!1),yield k.getSpine().onComplete.asPromise();const U=B.transform.worldPosition,F=G.GS3.Quadratic.InOut,j=G.GS3.generateCustomBackEase(-250,!0,!1);yield this.animateLootBagIcon(B,U,F,j),B.active=!1,B.transform.worldPosition={x:U.x,y:U.y},yield this.showLootBagReceivedSequence(1),k.setAnimationByName(0,at.h2.PipFillEmpties,!1),yield k.getSpine().onComplete.asPromise(),k.setAnimationByName(0,at.h2.EmptyStateStar,!1),k.getRootContainer().cacheAsBitmap=!0}))}animateLootBagIcon(k,B,U,$){return(0,F.sH)(this,void 0,void 0,(function*(){const F=this._lootBagIconTargetPosition,H={value:0},V=j.os.parseEase(U.value),W=j.os.parseEase($.value),q=X.q.instance.game.add.tween(H,this);q.to({value:1},at.I1.LOOT_BAG_TWEEN_TIME_MS,G.GS3.Quadratic.Out,!0),q.onUpdate.add((()=>{k.transform.worldPosition={x:V(H.value)*(F.x-B.x)+B.x,y:W(H.value)*(F.y-B.y)+B.y}})),yield q.onTweenComplete.asPromise()}))}animateWaveEndLootBagScale(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._lootBagWaveCompleteParent.transform.worldScale,B=j.os.parseEase(G.GS3.generateCustomBackEase(-7,!0,!1).value),U={value:0},F=X.q.instance.game.add.tween(U,this);F.to({value:1},at.I1.LOOT_BAG_WAVE_COMPLETE_ICON_SCALE_TIME,G.GS3.Quadratic.Out,!0),F.onUpdate.add((()=>{this._lootBagWaveCompleteParent.transform.setScale(B(U.value)*k.x)})),F.start(),yield F.onTweenComplete.asPromise()}))}cacheMatchboardAsBitmap(){this._matchboardElementTweens.length<=0&&(this._matchboardSortingAnchor.getRootContainer().cacheAsBitmap=!0)}playSfx(k){X.q.instance.prodigy.audio.playSFXFromGUID(k)}destroy(){var k,B,U,F;X.q.instance.game.tweens.removeAllFromOwner(this),null===(B=null===(k=this._lootDashManager.matchController)||void 0===k?void 0:k.onBattleDataChanged)||void 0===B||B.removeAll(this),null===(F=null===(U=this._lootDashManager.matchController)||void 0===U?void 0:U.onOpponentAdvanced)||void 0===F||F.remove(this.handleOpponentStageUpdate,this),super.destroy()}};(0,F.Cg)([(0,G.Bak)(),(0,F.Sn)("design:type",String)],ct.prototype,"_stageIntroSpine",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],ct.prototype,"_infoWidgetsRoot",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],ct.prototype,"_stageInfoWidgetRoot",void 0),(0,F.Cg)([(0,G.MnK)(it.B),(0,F.Sn)("design:type",it.B)],ct.prototype,"_stageInfoWidgetSortingAnchor",void 0),(0,F.Cg)([(0,G.MnK)(G.v2j),(0,F.Sn)("design:type",G.v2j)],ct.prototype,"_mathStreakWidgetSpine",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],ct.prototype,"_lootBagMathStreakIcon",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],ct.prototype,"_mathStreakIconGraphic",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],ct.prototype,"_lootBagWidgetRoot",void 0),(0,F.Cg)([(0,G.MnK)(G.v2j),(0,F.Sn)("design:type",G.v2j)],ct.prototype,"_lootBagWidgetSpine",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],ct.prototype,"_lootBagWaveCompleteParent",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],ct.prototype,"_lootBagWaveCompleteIcon",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],ct.prototype,"_lootBagWaveCompleteText",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],ct.prototype,"_fullScreenCardRoot",void 0),(0,F.Cg)([(0,G.MnK)(G.v2j),(0,F.Sn)("design:type",G.v2j)],ct.prototype,"_fullScreenCardSpine",void 0),(0,F.Cg)([(0,G.MnK)(Z.$),(0,F.Sn)("design:type",Z.$)],ct.prototype,"_exitButton",void 0),(0,F.Cg)([(0,G.MnK)(it.B),(0,F.Sn)("design:type",it.B)],ct.prototype,"_matchboardSortingAnchor",void 0),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],ct.prototype,"_matchboardRectTransform",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],ct.prototype,"_opponentPiecesRoot",void 0),(0,F.Cg)([(0,G.MnK)(G.Sz7),(0,F.Sn)("design:type",G.Sz7)],ct.prototype,"_stageGridLayout",void 0),(0,F.Cg)([(0,G.MnK)(G.Sz7),(0,F.Sn)("design:type",G.Sz7)],ct.prototype,"_stageOverlayGridLayout",void 0),(0,F.Cg)([(0,G.MnK)(tt._),(0,F.Sn)("design:type",tt._)],ct.prototype,"_matchboardTrackStartIcon",void 0),(0,F.Cg)([(0,G.MnK)(tt._),(0,F.Sn)("design:type",tt._)],ct.prototype,"_matchboardTrackEndIcon",void 0),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],ct.prototype,"_lootDashPlayerPinTransform",void 0),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],ct.prototype,"_completedTrackTransform",void 0),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],ct.prototype,"_inProgressTrackTransform",void 0),(0,F.Cg)([(0,G.Cdj)("cfe-9c2c"),(0,F.Sn)("design:type",rt.K)],ct.prototype,"_lootDashManager",void 0),(0,F.Cg)([(0,G.Cdj)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],ct.prototype,"_prefabLoader",void 0),(0,F.Cg)([(0,G.Cdj)("c47-20b6"),(0,F.Sn)("design:type",et.Y)],ct.prototype,"_segment",void 0),ct=(0,F.Cg)([(0,G.EVk)("LootDashBattleUI",J.Y.lootDash)],ct)},54174:(k,B,U)=>{"use strict";var F,G,j;U.d(B,{Fi:()=>G,I1:()=>$,_c:()=>j,h2:()=>F}),function(k){k.EmptyStateStar="empty-state-star",k.FullStateLootbag="full-state-lootbag",k.FullStateNoIcon="full-state-no-icon",k.PipFill0="empty-state-star",k.PipFill1="pip-fill-1",k.PipFill2="pip-fill-2",k.PipFill3="pip-fill-3",k.PipFill4="pip-fill-4",k.PipFill5="pip-fill-5",k.PipFillEmpties="pip-fill-empties",k.PipFillFull="pip-fill-full",k.PipLoss1="pip-loss-1",k.PipLoss2="pip-loss-2",k.PipLoss3="pip-loss-3",k.PipLoss4="pip-loss-4"}(F||(F={})),function(k){k.Idle="idle",k.Receive="lootbag-recieve",k.Fill="lootbag-fill",k.Finish="lootbag-finish"}(G||(G={})),function(k){k.None="none",k.Fireworks="fireworks",k.FireworksLess="fireworks-less",k.FireworksSingle="fireworks-single"}(j||(j={}));class ${}$.REVIVE_ANIMATION_NAME="revive-idle",$.REVIVE_UPDATE_EVENT_NAME="tick-down",$.REVIVE_ANIMATION_SLOT_NAME="numbers",$.LOOT_BAG_ANIMATION_SLOT_NAME="numbers",$.StageIntroAnimationName="stage-idle",$.MATH_STREAK_LOOT_BAG_ATTACHMENT_NAME="lootbag",$.DEFAULT_TWEEN_DURATION=500,$.LOOT_BAG_TWEEN_TIME_MS=1e3,$.LOOT_BAG_WAVE_COMPLETE_TEXT_TWEEN_TIME_MS=1e3,$.LOOT_BAG_WAVE_COMPLETE_DELAY_TIME_MS=1e3,$.LOOT_BAG_WAVE_COMPLETE_ICON_SCALE_TIME=300,$.STAGE_INFO_WIDGET_UPDATE_DELAY_MS=500,$.PLAYER_PIN_ROTATE_START_TWEEN_DURATION=1e3,$.PLAYER_PIN_ROTATE_START_AMOUNT=-17,$.PLAYER_PIN_ROTATE_END_TWEEN_DURATION=600,$.PLAYER_PIN_ROTATE_ELASTIC_STRENGTH=2.6,$.PLAYER_PIN_ROTATE_ELASTICITY=.5},61895:(k,B,U)=>{"use strict";U.d(B,{B:()=>it});var F=U(8674),G=U(62459),j=U(56942),$=U(52551),H=U(78746),V=U(12022),W=U(66582),q=U(35120),K=U(91207),z=U(77938),Y=U(23082),Q=U(53661),X=U(87331),Z=U(22023),J=U(80060),tt=U(66207);const et=[W._$.NonMember,W._$.MemberCore,W._$.MemberLevelUp];class it{static getInjectedValuesForNoMoreRevivesModal(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=q.q.instance.prodigy.gameContainer.get("e20-0fb0"),j=yield F.fetchMembershipUpsell();if(!et.includes(null!=U?U:j.tier))return;const $=null!=B?B:tt.D.isFeatureEnabled(),H=q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),K=V.G.getNumberOfRevivesFromMemberTier(W._$.MemberCore,k),z=V.G.getNumberOfRevivesFromMemberTier(W._$.MemberUltra,k),Y=V.G.getNumberOfRevivesFromMemberTier(W._$.MemberLevelUp,k),X=V.G.getNumberOfRevivesFromMemberTier(W._$.MemberUltimateMath,k),Z=H.getText("NO_MORE_REVIVES");let J="",it="",st="",nt="",at="",rt="",ot=!1,ht=!1,ct=!1,dt=!1;switch(null!=U?U:j.tier){case W._$.NonMember:$?(J=H.getText("BE_ULTRA_READY_AND_GET_MORE"),it=H.getText("MEMBERSHIP_TIER_NAME_CORE"),nt=H.getText("PLUS_AND_ULTRA"),at=`x${K}`,rt=`x${z}`,ht=!0):(J=H.getText("MEMBERS_GET_MORE_REVIVES"),it=H.getText("LEVEL_UP_MEMBER"),st=H.getText("ULTIMATE_MEMBER"),at=`x${Y}`,rt=`x${X}`,ot=!0);break;case W._$.MemberCore:case W._$.MemberLevelUp:$?(J=H.getText("BE_ULTRA_READY_AND_GET_MORE"),nt=H.getText("PLUS_AND_ULTRA"),rt=`x${z}`,dt=!0):(J=H.getText("ULTIMATE_MEMBERS_GET_MORE_REVIVES"),st=H.getText("ULTIMATE_MEMBER"),rt=`x${X}`,ct=!0)}return{[Q.eV.NoMoreRevivesBannerTextCore]:it,[Q.eV.NoMoreRevivesBannerTextPlus]:st,[Q.eV.NoMoreRevivesBannerTextUltra]:nt,[Q.eV.NoMoreRevivesLineOneText]:Z,[Q.eV.NoMoreRevivesLineTwoText]:J,[Q.eV.NoMoreRevivesReviveAmountTextCore]:at,[Q.eV.NoMoreRevivesReviveAmountTextPlusAndUltra]:rt,[Q.eV.NoMoreRevivesShowCoreAndPlus]:ot,[Q.eV.NoMoreRevivesShowCoreAndUltra]:ht,[Q.eV.NoMoreRevivesShowPlusOnly]:ct,[Q.eV.NoMoreRevivesShowUltraOnly]:dt}}))}static getInjectedValuesForOwnedPetCardPet(k,B=!1){var U,F;const G=z.t.getItem("pet",k.ID);return{PET_ID:k.ID,PET_DATA:k,PET:k,NAME:null!==(F=null!==(U=k.nickname)&&void 0!==U?U:k.name)&&void 0!==F?F:G.data.name,LEVEL:k.level,MERGE_RANK:Z.P8.getPetDisplayMergeRank(k.ID,k.uniqueID),SHOW_MERGE_RANK_BADGE:Z.P8.canPetAccessMergeRanks(k.ID),INPUT_ENABLED:!0,SELECTED:!1,ICON:K.E.getIconForType("pet",k.ID),SHOW_ON_TEAM:B,SHOW_EVOLVE:!1,SHOW_UPGRADE:!1,SHOW_GUIDE_HAND:!1,SHOW_ELEMENT_ICON:!0,SHOW_MEMBERLOCK_ICON:!1,SHOW_STAT_ICON:!1,SHOW_LEVEL_ICON:!0,SHOW_PET_GEAR:!0}}static getInjectedValuesForOwnedPetCardBackpackItem(k,B){var U;const F=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G="follow"===B?F.equipment.getFollow()===k:F.equipment.getMount()===k,j=z.t.getItem(B,k);return{NAME:null===(U=null==j?void 0:j.data)||void 0===U?void 0:U.name,INPUT_ENABLED:!0,ICON:K.E.getIconForType(B,k),SHOW_ON_TEAM:G,SHOW_EVOLVE:!1,SHOW_UPGRADE:!1,SHOW_GUIDE_HAND:!1,SHOW_ELEMENT_ICON:!1,SHOW_STAT_ICON:!0,SHOW_LEVEL_ICON:!1,SHOW_PET_GEAR:!1,SHOW_MEMBERLOCK_ICON:X.G.shouldShowMemberLockIcon(j,F),SHOW_MERGE_RANK_BADGE:!1,STAT_ICON_DISPLAY_ITEM_ID:k,STAT_ICON_DISPLAY_ITEM_TYPE:B,ITEM_CARD_DATA:j,MERGE_RANK:0}}static getInjectedValuesForFilledTeamCardPet(k){var B,U;const F=z.t.getItem("pet",k.data.ID);return{PET_ID:k.data.ID,PET_DATA:k.data,NAME:null!==(U=null!==(B=k.data.nickname)&&void 0!==B?B:k.data.name)&&void 0!==U?U:F.data.name,LEVEL:k.data.level,MERGE_RANK:Z.P8.getPetDisplayMergeRank(k.data.ID,k.data.uniqueID),SHOW_MERGE_RANK_BADGE:Z.P8.canPetAccessMergeRanks(k.data.ID),INPUT_ENABLED:!0,SPINE_GUID:j.Q[`Spine_pet_${k.data.ID}_json`],SHOW_SPINE:!0,SHOW_EMPTY_STATE:!1,SHOW_MEMBERLOCK_ICON:!1,SHOW_LEVEL:!0,SHOW_REPLACE_TOOLTIP:!1}}static setupPrefabWithRetainedContext(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){const F=q.q.instance.prodigy.gameContainer.get("d0e-64fd"),j=yield J.d.loadWithInjectedValuesAndDependenciesFromGUID(F,k,B),$=j.transform;return $.setPivot(.5,.5),$.setAnchorMin(0,0),$.setAnchorMax(0,0),j.name=U,it.moveObjectContextToGameObject(j,B),G&&(j.parent=G),j.setLayer(void 0,!0),j}))}static moveObjectContextToGameObject(k,B){const U=k.addComponent(G.bE_);for(const G in B)U.Container.bind(G).toConstantValue(B[G]);const F=k.parent;k.parent=null,F.destroy()}static cancelQuickQuiz(){var k,B,U;const F=q.q.instance.prodigy.gameContainer.get("cfe-9c2c"),j=q.q.instance.prodigy.gameContainer.get("fc2-cb0a"),$=q.q.instance.game.state.current,V=void 0!==j.currentQuickQuizId&&!G.Aq$.isDefined(F.matchController)&&$!==Y.G.LootDashTransport;if($===Y.G.LootDashTransport||V)return null===(k=F.transportModalTimer)||void 0===k||k.onTimerCompleted.removeAll(),F.transportModalTimer=void 0,j.leaveQuickQuiz(),q.q.instance.prodigy.open.menuCloseAll(),void it.openQuickQuizCancelledPopup((()=>{j.handleQuizExitFlowComplete()}));if(!(null===(B=F.matchController)||void 0===B?void 0:B.matchType)||!(null===(U=F.matchController)||void 0===U?void 0:U.isQuickQuiz))return;[H.zM.FindingAMatch,H.zM.WaitingForPlayers].includes(F.lootDashState)&&(F.cancelMatchmaking(),it.openQuickQuizCancelledPopup((()=>F.setState(H.zM.MatchEndedByServer))))}static openQuickQuizCancelledPopup(k,B=!0){const U=$.w.getConfig(H.B1.QuickQuiz),F=q.q.instance.prodigy.open.message(q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("LOOT_DASH_QUICK_QUIZ_CANCELLED"));if(B){const B=window.setTimeout((()=>{F.close()}),U.quickQuizConfigs.quickQuizCancelledTimeoutMs);F.onClose=()=>{window.clearTimeout(B),k()}}else F.onClose=()=>{k()}}}},66397:(k,B,U)=>{"use strict";U.d(B,{K:()=>yt});var F=U(8674),G=U(62459),j=U(79687),$=U(30334),H=U(82351),V=U(36648),W=U(28628),q=U(52551),K=U(70156),z=U(78746),Y=U(12022),Q=U(63011),X=U(35120),Z=U(129),J=U(23082),tt=U(68152),et=U(4764),it=U(83267),st=U(62886),nt=U(91207),at=U(571),rt=U(36164);class ot{get isQuickQuiz(){return this.matchType===z.B1.QuickQuiz}get isHomeMatch(){return this.matchType===z.B1.Home}get numCurrentPlayers(){return this._numBotOpponents+this._numLiveOpponents+1}get numBotOpponents(){return this._numBotOpponents}get numLiveOpponents(){return this._numLiveOpponents}get totalStages(){var k,B;return null!==(B=null===(k=this._lootDashMatchData.stageData)||void 0===k?void 0:k.length)&&void 0!==B?B:0}get opponents(){return this._opponents}get lootDashMatchData(){return this._lootDashMatchData}constructor(k,B,U){this.onMatchJoined=new G.HN0,this.onOpponentJoined=new G.HN0,this.onOpponentAdvanced=new G.HN0,this.onBattleDataChanged=new G.HN0,this._numBotOpponents=0,this._numLiveOpponents=0,this._isCleanedUp=!1,this._opponents=[],this._playerHeadSprites={},this._networkHandler=k,this._playerProvider=B,this.config=U}get currentWaveIndex(){return this._lootDashMatchData.currentWaveIndex}get numWavesInCurrentStage(){var k,B;return null!==(B=null===(k=this._lootDashMatchData.currentStage)||void 0===k?void 0:k.waves.length)&&void 0!==B?B:0}get currentStageIndex(){var k,B;return null!==(B=null===(k=this._lootDashMatchData.currentStage)||void 0===k?void 0:k.stageIndex)&&void 0!==B?B:0}set revivesRemaining(k){this._revivesRemaining=k,this.onBattleDataChanged.dispatch()}get revivesRemaining(){return this._revivesRemaining}setStageData(k){this._lootDashMatchData.stageData=k}setCurrentStageData(k){var B;(null===(B=this._lootDashMatchData.currentStage)||void 0===B?void 0:B.stageIndex)!==k.stageIndex&&(this._lootDashMatchData.currentStage=k,this._lootDashMatchData.currentWaveIndex=0,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredThisStage=0,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisStage=0,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredThisWave=0,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisWave=0,this.onBattleDataChanged.dispatch())}getCurrentZoneStages(){const k=this._lootDashMatchData.stageData.filter((k=>{var B,U;return k.zoneIndex===(null!==(U=null===(B=this._lootDashMatchData.currentStage)||void 0===B?void 0:B.zoneIndex)&&void 0!==U?U:0)}));return k.sort(((k,B)=>k.stageIndex-B.stageIndex)),k}setCurrentWaveIndex(k){this._lootDashMatchData.currentWaveIndex!==k&&(this._lootDashMatchData.currentWaveIndex=k,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredThisWave=0,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisWave=0,this.onBattleDataChanged.dispatch())}setCurrentMathStreak(k,B){B&&(this._lootDashMatchData.lootBagData=B),this._lootDashMatchData.currentMathStreak=k,this.onBattleDataChanged.dispatch()}setLootBagData(k){this._lootDashMatchData.lootBagData=k,this.onBattleDataChanged.dispatch()}getOpponentData(k){return this._opponents.find((B=>B.playerId===k))}getPlayerHeadSprite(k){return(0,F.sH)(this,void 0,void 0,(function*(){return G.Aq$.isDefined(this._playerHeadSprites[k])||(this._playerHeadSprites[k]=at.z.createHeadFromAppearanceData(k===this._playerProvider.getUserID()?this._playerProvider.getAppearance():this.getOpponentData(k).appearanceData,{trimTransparentPixels:!1})),this._playerHeadSprites[k]}))}getLootBagRewards(){var k,B;return(null!==(B=null===(k=this._lootDashMatchData.matchRewards)||void 0===k?void 0:k.rewards)&&void 0!==B?B:[]).map((k=>k.itemData))}getMemberLootBagRewards(){var k,B;return(null!==(B=null===(k=this._lootDashMatchData.matchRewards)||void 0===k?void 0:k.memberRewards)&&void 0!==B?B:[]).map((k=>k.itemData))}joinMatch(){this._lootDashMatchData={currentWaveIndex:0,currentMathStreak:0,matchCompletionState:z.Cr.Unfinished,lootBagData:{fromStreak:0,fromTreasureRush:0,fromFeaturedItems:0,fromMemberBonus:0,fromPlacement:0,fromWaveComplete:0},questionsAnsweredData:{totalQuestionsAnswered:0,totalQuestionsAnsweredCorrectly:0,questionsAnsweredThisStage:0,questionsAnsweredCorrectlyThisStage:0,questionsAnsweredThisWave:0,questionsAnsweredCorrectlyThisWave:0}},X.q.instance.prodigy.gameContainer.get("c47-20b6").lootDash.sendMatchmakingStartedEvent(),X.q.instance.prodigy.education.onQuestionAnswered.add(this.updateQuestionsAnsweredData,this)}updateQuestionsAnsweredData(k){this._lootDashMatchData.questionsAnsweredData.totalQuestionsAnswered++,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredThisStage++,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredThisWave++,k&&(this._lootDashMatchData.questionsAnsweredData.totalQuestionsAnsweredCorrectly++,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisStage++,this._lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisWave++)}stageIntroComplete(){0===this._lootDashMatchData.currentStage.zoneIndex&&0===this._lootDashMatchData.currentStage.stageIndex&&this._networkHandler.startMatch({matchType:this.matchType}).then((k=>{this.handleStartMatchResponse(k)})).catch(G.RQr.createHandler("Error calling to start match"))}handleStartMatchResponse(k){this._startTime=Date.now(),this._lootDashMatchData.currentStreak=k.playerStreak,this.cleanUpOpponentAssets()}completeMatch(k){this._endTime=Date.now(),this._networkHandler.completeMatch({}).then((k=>{this.handleCompleteMatchResponse(k)})).catch(G.RQr.createHandler("Error completing Loot Dash match"))}handleCompleteMatchResponse(k){this.lootDashMatchData.matchCompletionState=Y.G.getMatchCompletionState(!0,k.exitedEarly,k.ranOutOfRevives),this.lootDashMatchData.placement=k.finishPlace,this.lootDashMatchData.lootBagData=k.lootBags,this.lootDashMatchData.currentStreak=k.playerStreak,k.ranOutOfRevives&&X.q.instance.prodigy.gameContainer.get("c47-20b6").lootDash.sendNoMoreRevivesEvent(),this.lootDashMatchData.matchRewards={rewards:k.rewards,memberRewards:k.memberRewards},this.onBattleDataChanged.dispatch(),1===k.finishPlace&&X.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(st.T.WIN_LOOT_DASH,{}).catch(G.RQr.createHandler("Error sending WinLootDash event")),k.finishPlace>=1&&X.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(st.T.COMPLETE_LOOT_DASH,{}).catch(G.RQr.createHandler("Error sending CompleteLootDash event"))}cleanUpOpponentAssets(){var k,B,U,F,j,$,H,V,W;const q={hat:{},hair:{},face:{},skin:{},eyeColor:{},outfit:{},weapon:{},boot:{},costume:{}},K=[...this._opponents.map((k=>k.appearanceData)),this._playerProvider.getAppearance()];for(const G of K)q.hat[G.hat]=(null!==(k=q.hat[G.hat])&&void 0!==k?k:0)+1,q.hair[G.hair.style]=(null!==(B=q.hair[G.hair.style])&&void 0!==B?B:0)+1,q.face[G.face]=(null!==(U=q.face[G.face])&&void 0!==U?U:0)+1,q.skin[G.skin]=(null!==(F=q.skin[G.skin])&&void 0!==F?F:0)+1,q.eyeColor[G.eyeColor]=(null!==(j=q.eyeColor[G.eyeColor])&&void 0!==j?j:0)+1,q.outfit[G.outfit]=(null!==($=q.outfit[G.outfit])&&void 0!==$?$:0)+1,q.weapon[G.weapon]=(null!==(H=q.weapon[G.weapon])&&void 0!==H?H:0)+1,q.boot[G.boot]=(null!==(V=q.boot[G.boot])&&void 0!==V?V:0)+1,q.costume[G.costume]=(null!==(W=q.costume[G.costume])&&void 0!==W?W:0)+1;for(const z of this._opponents)this.getPlayerHeadSprite(z.playerId).then((()=>{var k;const B=[];for(const U of Object.keys(q)){const F="hair"===U?null===(k=z.appearanceData.hair)||void 0===k?void 0:k.style:z.appearanceData[U];if(F&&--q[U][F]<=0){const k=rt.R[`${U}Map`];k&&B.push(k[F])}}B.length>0&&(nt.E.getImageGuidsFromGearGuids(B).forEach((k=>X.q.instance.game.cache.removeImage(k))),B.forEach((k=>X.q.instance.game.cache.removeJSON(k))))})).catch(G.RQr.createHandler(`Error getting player head sprite for ${z.playerId}`))}cleanup(){this._isCleanedUp=!0,this.onMatchJoined.dispose(),this.onOpponentJoined.dispose(),this.onOpponentAdvanced.dispose(),this.onBattleDataChanged.dispose(),X.q.instance.prodigy.education.onQuestionAnswered.remove(this.updateQuestionsAnsweredData,this)}}var ht=U(32389),ct=U(94428),dt=U(76277),lt=U(13956),ut=U(32073);class ft extends ot{constructor(k,B,U){super(k,B,U),this.matchType=z.B1.QuickQuiz,this.matchmakingType=z.gK.Multiplayer,this.opponentUpdatesToProcess=[],this._opponentAdvancedDelayMs=1e4,this._opponentAdvancedDelayTimeouts={};for(const F of this._quickQuizManager._allMessages)this.handleMultiplayerMessage(F);this._quickQuizManager.onQuickQuizMessageReceived.add(this.handleMultiplayerMessage,this)}joinMatch(){super.joinMatch(),window.setImmediate((()=>{this.onMatchJoined.dispatch(),this.onOpponentJoined.dispatch(this.numCurrentPlayers,this.numCurrentPlayers===this.config.matchSetup.maximumPlayers)}))}handleMultiplayerMessage(k){switch(k.type){case"channelData":this.handleCustomChannelDataMessage(k.channelData);break;case"userList":this.handleUserListMessage(k.userList);break;case"playerJoined":this.handlePlayerJoined(k.playerInfo);break;case"playerLeft":break;case"broadcastAction":const B=k.actionInfo;if(!B)return;switch(B.type){case ct.H9.QuizEnded:this.beginForcedEndQuickQuiz();break;case ct.H9.PlayerProgressUpdated:const k=B.data;k.playerId!==this._playerProvider.getUserID()&&this.handleOpponentUpdate(k)}}}beginForcedEndQuickQuiz(){if(this._lootDashMatchData.matchCompletionState!==z.Cr.Unfinished)return;const k=G.wa5.getActiveScene().container.get("BattleController");k&&k.type===W.gu.LootDash&&k.endLootDashQuickQuiz()}handleUserListMessage(k){for(const B of k)this.handlePlayerJoined(B)}handleCustomChannelDataMessage(k){const B=void 0!==this._channelData;this._channelData=k;for(const U of this._opponents){const k=U.currentStageIndex;U.currentStageIndex=this.getPlayerStageIndex(U.playerId),B&&U.currentStageIndex!==k&&this.handleOpponentUpdate({playerId:U.playerId,stageIndex:U.currentStageIndex-1,time:0})}}handlePlayerJoined(k){if(this._playerProvider.getUserID().toString()===k.userID)return;if(this._opponents.some((B=>B.playerId.toString()===k.userID)))return;this._numLiveOpponents++,this._opponents.push({playerId:Number.parseInt(k.userID),currentStageIndex:this.getPlayerStageIndex(Number.parseInt(k.userID)),appearanceData:{face:k.appearance.appearance.face,hair:{color:k.appearance.appearance.hair.color,style:k.appearance.appearance.hair.style},hat:k.appearance.equipment.hat,skin:k.appearance.appearance.skinColor,eyeColor:k.appearance.appearance.eyeColor,outfit:k.appearance.equipment.outfit,weapon:k.appearance.equipment.weapon,boot:k.appearance.equipment.boots,costume:(0,dt.G)(ht.q).enabled?k.appearance.equipment.costume:void 0}}),this.onOpponentJoined.dispatch(this.numCurrentPlayers,this.numCurrentPlayers===this.config.matchSetup.maximumPlayers);let B=this.config.matchboard.batchUpdatesAtPlayerCount;!G.Aq$.isDefined(this.batchUpdateInterval)&&this.numCurrentPlayers>=this.getPlayerCountToBatchUpdatesAt()&&(this.batchUpdateInterval=window.setInterval(this.handleBatchedOpponentUpdates.bind(this),B))}getPlayerStageIndex(k){var B;let U=0;(null===(B=this._channelData)||void 0===B?void 0:B[`playerProgress-${k}`])&&(U=this._channelData[`playerProgress-${k}`].stageTime.stageIndex+1);let F=0;const G=this.getOpponentData(k);return G&&(F=G.currentStageIndex),Math.max(U,F)}handleOpponentUpdate(k){this.numCurrentPlayers>=this.getPlayerCountToBatchUpdatesAt()?this.opponentUpdatesToProcess.push(k):this.advanceOpponent(k)}advanceOpponent(k){this.getOpponentData(k.playerId).currentStageIndex=k.stageIndex+1,this._opponentAdvancedDelayTimeouts[k.playerId]=window.setTimeout((()=>{this.onOpponentAdvanced.dispatch(k.playerId,k.stageIndex+1),this._opponentAdvancedDelayTimeouts[k.playerId]=void 0}),this._opponentAdvancedDelayMs)}handleBatchedOpponentUpdates(){this.opponentUpdatesToProcess.forEach((k=>this.advanceOpponent(k))),this.opponentUpdatesToProcess.length=0}getPlayerCountToBatchUpdatesAt(){return this.config.matchboard.batchUpdatesAtPlayerCount}completeMatch(k){if(super.completeMatch(k),k){const k=this._quickQuizManager.currentAssignmentId;G.Aq$.isDefined(k)&&k>-1&&ut.v.markAssignmentAsCompleted(k)}ut.v.addCompletedQuickQuizId(this._quickQuizManager.currentQuickQuizId),this._quickQuizManager.leaveQuickQuizChannel()}cleanup(){this._quickQuizManager.onQuickQuizMessageReceived.remove(this.handleMultiplayerMessage,this),window.clearInterval(this.batchUpdateInterval);for(const k of Object.values(this._opponentAdvancedDelayTimeouts))window.clearTimeout(k);super.cleanup()}}(0,F.Cg)([(0,lt.b)("fc2-cb0a"),(0,F.Sn)("design:type",et.w)],ft.prototype,"_quickQuizManager",void 0);class bt{static getMatchController(k,B,U,F){if(!k||!bt.matchControllerMap[k])throw new Error(`No match controller found for match type: ${k}`);return new bt.matchControllerMap[k](B,U,F)}}bt.matchControllerMap={[z.B1.Home]:class extends ot{constructor(){super(...arguments),this.matchType=z.B1.Home,this.matchmakingType=z.gK.Bots,this._matchmakingTimeouts=[],this._opponentsPaused=!1}set opponentsPaused(k){this._opponentsPaused=k}joinMatch(){super.joinMatch();const k=this.config.matchSetup.maximumPlayers;this._numBotOpponents=Math.floor(Math.random()*k),this._numLiveOpponents=0;for(let U=0;U{this._isCleanedUp||(this.onMatchJoined.dispatch(),this.beginMatchmaking())})).catch(G.RQr.createHandler("Error joining match"))}beginMatchmaking(){const k=this.config.matchSetup.maximumTimeBetweenBotJoinsMs,B=this.config.matchSetup.maximumPlayers,U=this.numCurrentPlayers>=B;this.onOpponentJoined.dispatch(this.numCurrentPlayers,U);const F=B-this.numCurrentPlayers;for(let j=0;j{this._numBotOpponents++,this.onOpponentJoined.dispatch(this.numCurrentPlayers,this.numCurrentPlayers===B)}),G.cj9.random(0,k)))}handleStartMatchResponse(k){super.handleStartMatchResponse(k),X.q.instance.prodigy.gameContainer.get("c47-20b6").lootDash.sendBotDataRetrievedEvent(k.botDistribution),this._stageTimes=k.stageTimes.map((k=>Object.assign(Object.assign({},k),{playerId:this.opponents[k.playerId].playerId}))),this.startOpponents()}startOpponents(){this._remainingStageTimes=this._stageTimes.slice(),this._opponentInterval=window.setInterval((()=>{if(this._opponentsPaused)return;const k=Date.now()-this._startTime;for(;this._remainingStageTimes.length>0&&this._remainingStageTimes[0].time!(k instanceof Z.a)));U.featuredFollowEquipped=F.featuredFollows.includes(G.equipment.getFollow()),U.featuredFollowOwned=F.featuredFollows.some((k=>G.backpack.hasItem("follow",k))),!U.featuredFollowEquipped&&U.featuredFollowOwned&&U.numFeaturedItemsThatCouldBeEquipped++,U.featuredMountEquipped=F.featuredMounts.includes(G.equipment.getMount()),U.featuredMountOwned=F.featuredMounts.some((k=>G.backpack.hasItem("mount",k))),!U.featuredMountEquipped&&U.featuredMountOwned&&U.numFeaturedItemsThatCouldBeEquipped++;let $=0;for(let W=0;WH&&(U.numFeaturedItemsThatCouldBeEquipped+=V-H),U.numFeaturedItemsEquipped=(U.featuredPetEquippedInSlot1?1:0)+(U.featuredPetEquippedInSlot2?1:0)+(U.featuredFollowEquipped?1:0)+(U.featuredMountEquipped?1:0),U.cappedNumFeaturedItemsOwned=Math.min(U.numFeaturedPetsOwned,2)+(U.featuredFollowOwned?1:0)+(U.featuredMountOwned?1:0),U}))}joinMatch(){return(0,F.sH)(this,void 0,void 0,(function*(){this._matchController=bt.getMatchController(this.matchType,this.networkHandler,this._playerProvider,this.config),this._matchController.onMatchJoined.addOnce((()=>this.setState(z.zM.WaitingForPlayers))),X.q.instance.prodigy.gameContainer.get("c47-20b6").lootDash.lootDashMatchController=this._matchController,this._matchController.joinMatch(),this.immediateStart=void 0,this._matchType=z.B1.Home}))}matchmakingComplete(k,B){this._matchmakingTimeouts.push(window.setTimeout((()=>{this.setState(z.zM.MatchStartingSoon),window.setTimeout((()=>{this.setState(z.zM.MatchStartingNow),X.q.instance.prodigy.gameContainer.get("a25-68f4").getBattleStartQuestData(W.gu.LootDash).catch((k=>{G.RQr.createHandler("Error getting battle quest data, starting battle with no quest data")(k)})).then((k=>{this.startBattle(k)})).catch(G.RQr.createHandler("Error continuing the battle start function in LootDashManager"))}),B)}),k))}cancelMatchmaking(){this.cleanupMatch(this._matchController),this._matchmakingTimeouts.forEach(window.clearTimeout),this._matchmakingTimeouts.length=0,this.setState(z.zM.LobbyDefault)}startBattle(k){this.matchController.revivesRemaining=this.getNumberOfStartingRevives();const B={battleType:W.gu.LootDash,lootDashMatchType:this.matchController.matchType,opponents:{units:{}},difficulty:$.z,activeQuestIDs:null==k?void 0:k.questIDs,questEventsToSend:null==k?void 0:k.questEvents};this.matchController.isQuickQuiz&&(B.quickQuizId=et.w.instance().currentQuickQuizId);const U={backgroundID:[V.q.Battle_wizarddash_bg,V.q.Battle_wizarddash_fg],backgroundMusicID:H.B.Loot_dash_background_music,defeatData:{preventDefaultTeleport:!0},onVictory:this.handlePostBattle.bind(this),onDefeat:this.handlePostBattle.bind(this),onEscape:this.handlePostBattle.bind(this),showQiBadgeAnimations:!1};X.q.instance.game.state.states.get(J.G.SecureBattleRevamp).startBattleRequest(B,U)}cleanupMatch(k){k.cleanup(),this.matchController===k&&(X.q.instance.prodigy.gameContainer.get("c47-20b6").lootDash.lootDashMatchController=null,this._matchController=null)}handlePostBattle(){const k=G.wa5.getActiveScene().container.get("BattleController"),B=k.postBattleExpressModeController.isEnabled;if(k.prefabRoot.destroy(),this.matchController.isQuickQuiz){X.q.instance.prodigy.gameContainer.get("fc2-cb0a").handleQuizExitFlowComplete()}else B?X.q.instance.prodigy.world.teleportToCurrentMap():X.q.instance.prodigy.open.lootDashMenu()}};yt=(0,F.Cg)([(0,j.injectable)(),(0,F.Sn)("design:paramtypes",[])],yt)},99015:(k,B,U)=>{"use strict";U.d(B,{C:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(76546);let H=class extends $.D{claimMemberRewards(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(j.D.MagicoinBattleRewards.ClaimMemberRewards,{})}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},82142:(k,B,U)=>{"use strict";U.d(B,{gT:()=>pe});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U(20748),V=U(35120),W=U(51477),q=U(29738),K=(U(34829),U(2272)),z=U(75329),Y=U(29546),Q=U(70399),X=U(64794),Z=U(90736),J=U(51365),tt=U(43844),et=U(94909),it=U(80070),st=U(66930),nt=U(42862),at=U(40410),rt=U(59510),ot=U(99625),ht=U(15521),ct=U(51972),dt=U(48199),lt=U(50348),ut=U(21457),ft=U(10312),bt=U(91207),pt=U(90161),vt=U(21573),gt=U(99332),mt=U(39258),yt=U(43054),_t=U(69046);class Et{get factory(){return this._factory}constructor(k){this._factory=k}}var wt=U(41666),Tt=U(14991);class St{constructor(k,B,U,F=Tt.v.Visible){this._state=Tt.v.Visible,this._tween=null,this._factoryProvider=U,this._toVisible=k,this._toHidden=B,this._state=F}get state(){return this._state}get isTweening(){return this._state===Tt.v.SlidingIn||this._state===Tt.v.SlidingOut}cancel(k=!1){this._tween&&this.isTweening&&this._tween.stop(k)}slide(k,B=0,U=null){k&&!this.isTweening&&(this._state===Tt.v.Hidden?(this._state=Tt.v.SlidingOut,this._tween=this._factoryProvider.factory.tween(k.legacyTransform.group,this).to(this._toVisible,B)):this._state===Tt.v.Visible&&(this._state=Tt.v.SlidingIn,this._tween=this._factoryProvider.factory.tween(k.legacyTransform.group,this).to(this._toHidden,B)),this._tween.onTweenComplete.add((()=>{this._tween.onTweenComplete.removeAll(),this._state=this._state===Tt.v.SlidingIn?Tt.v.Hidden:Tt.v.Visible,this._tween=null,U&&U()}),this),this._tween.start())}}class At{get width(){return this._component?this._component.width:0}set width(k){this._component&&(this._component.width=k)}get text(){return this._component?this._component.text:null}set text(k){this._component&&(this._component.text=k)}get gameObject(){return this._gameObject}get onComponentLoaded(){return this._componentLoadedSignal}constructor(k,B,U){this._componentLoadedSignal=new G.HN0,this._prefabLoader=B,this._parent=U,this._factoryProvider=new Et(k.add),V.q.instance.prodigy.load.assets([X.D.ATLAS_STORE],this.assetsReady.bind(this))}destroy(){(this._tween.isTweening||this._tween.state===Tt.v.Visible)&&(this._tween.cancel(),this.setVisible(!1)),this._componentLoadedSignal.dispose(),this._gameObject.destroy()}setVisible(k,B=At.SLIDE_DURATION_MS,U=X.D.TOOLTIP_STAY_DURATION,F){this._component&&(B<=0?this._component.root.legacyTransform.y=k?X.D.SPACE_16PX:-this._component.height-X.D.SPACE_16PX:this._tween.isTweening||this._tween.slide(this._component.root,B,F),k&&G.Aq$.isDefined(U)&&U>0&&setTimeout((()=>{this.setVisible(!1,B,0,(()=>{this.destroy()}))}),U))}assetsReady(k,B){this._gameObject=this._prefabLoader.loadFromGUID(X.D.UI_TOOLTIP_PREFAB,this._parent),this._component=this._gameObject.findComponent(wt.Z),this._gameObject.legacyTransform.x=V.q.instance.game.width/2,this._component&&(this._component.root.legacyTransform.y=-this._component.height-X.D.SPACE_16PX,this._tween=new St({y:X.D.SPACE_16PX},{y:-this._component.height-X.D.SPACE_16PX},this._factoryProvider,Tt.v.Hidden),this._componentLoadedSignal.dispatch())}}At.SLIDE_DURATION_MS=0;class Ct extends pt.R{get itemSelected(){return this._itemSelected}get selectionChanged(){return this._selectionChanged}constructor(k,B,U,F,j,$,H,W,q=null,K=null){super(k,B?B.legacyTransform.group:void 0,U,F,[X.D.ATLAS_STORE,X.D.ATLAS_TOWERTOWN_MISC,X.D.ATLAS_BUTTONS]),this._towerTownBreadcrumbManager=null,this._pages=new Map,this._smallItems=new Map,this._slots=new Map,this._itemSelected=new G.HN0,this._selectionChanged=new G.HN0,this._selection={},this._currentFilter=gt.R.Rooms,this._building=!1,this._parentGameObject=null,this._parentGameObject=B,this._toolTip=j,this._storeManager=H,this._decorator=$,this._spriteFactory=W,this._towerTownBreadcrumbManager=q,this._closeCallback=K,this._selection.decorations=new Map,V.q.instance.prodigy.load.assets(X.D.TAB_CLICK_SFX)}create(){this._ui=this._prefabLoader.loadFromGUID(X.D.UI_CHOOSE_FLOOR_LOOK_PREFAB,this._parentGameObject),this._floorComponent=this._ui.findComponent(mt.p),this._floorComponent.commands.add(this.execute,this),this._towerTownBreadcrumbManager&&!this._towerTownBreadcrumbManager.isBreadcrumbComplete(rt.M.TutorialCompleted)||(this._toolTip.width=250,this._toolTip.text=V.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("TT_CHOOSE_FLOOR_TITLE"),this._toolTip.setVisible(!0,At.SLIDE_DURATION_MS,null)),this._floorComponent.largeItemPointer.active=!1,this._floorComponent.smallItemPointer.active=!1,this._floorComponent.smallItemContainer.active=!1,this._floorComponent.largeItemContainer.active=!1,this.makeLargePrefabs(X.D.UI_LARGE_LIST_ITEM_PREFAB,this._floorComponent.largeItemPoints),this.makeSmallPrefabs(X.D.UI_SMALL_LIST_ITEM_PREFAB,this._floorComponent.smallItemPoints),this._decorator&&(this._decorator.itemSelected.add((k=>{this.applyDecoration(k)}),this),this._decorator.removeSelected.add((k=>{this.removeDecoration(k)}),this)),this._spriteFactory.assetsReady.add(this.assetsReady.bind(this)),this.createPage(gt.R.Rooms,this._floorComponent.largeItemPoints),this.createPage(gt.R.Frames,this._floorComponent.largeItemPoints),this.createPage(gt.R.Decorations,this._floorComponent.smallItemPoints),this.startBuildingButton.onClick.add(this.consumeItems,this),this._mathTower.uiFactory.screen.backgroundGameObject.addChild(this.startBuildingButton.GameObject),this.updateView()}close(){this._toolTip.destroy(),this.removeListeners(),this.startBuildingButton.GameObject.destroy(),!this._building&&this._closeCallback&&this._closeCallback(),this._ui.destroy(),super.close()}get quitButton(){return this._floorComponent.quitButton}get startBuildingButton(){return this._floorComponent.startBuildingButton}get roomsToggleButton(){return this._floorComponent.roomsToggle}get framesToggleButton(){return this._floorComponent.framesToggle}get decorationsToggleButton(){return this._floorComponent.decorationsToggle}createPage(k,B){this._pages[k]={assetType:this.getAssetType(k),pageSize:B.length,pageCount:this._storeManager.getBackpackPageCount(this.getAssetType(k),B.length),currentPage:0,hardPoints:B}}execute(k){switch(k){case gt.R.Rooms:case gt.R.Frames:case gt.R.Decorations:V.q.instance.prodigy.audio.playSFX(X.D.TAB_CLICK_SFX_ID,X.D.TAB_CLICK),this._currentFilter=k,this._currentFilter!==gt.R.Decorations&&(this._currentIndex=-1),this._decorator.showPoints(this._currentFilter===gt.R.Decorations),this.updateView();break;case gt.R.StartBuilding:this._building=!0,this._itemSelected.dispatch(this._selection);break;case gt.R.PageLeft:V.q.instance.prodigy.audio.playSFX(X.D.BUTTON_CLICK_SFX_ID,X.D.BUTTON_CLICK),this.pageLeft();break;case gt.R.PageRight:V.q.instance.prodigy.audio.playSFX(X.D.BUTTON_CLICK_SFX_ID,X.D.BUTTON_CLICK),this.pageRight()}}applyDecoration(k){this._currentIndex=k}removeDecoration(k){this._selection.decorations.delete(k),this.selectionChanged.dispatch(this._selection),this.updateCounter(k,1),this._slots.delete(this._currentIndex),this.applyDecoration(k)}pageLeft(){const k=this._pages[this._currentFilter];k.currentPage>0&&k.currentPage--,this.updatePageButtons(),this.updateView()}pageRight(){const k=this._pages[this._currentFilter];k.currentPage0),this._floorComponent.pageRightEnabled(k.currentPage0&&this._currentIndex>=0&&!this._slots.has(this._currentIndex)){this._selection.decorations.set(this._currentIndex,this._selectedDecor);const B=this._storeManager.getItemImageName(X.D.ASSET_TYPE_DECORATION,this._selectedDecor);this._decorator.setAsset(this._currentIndex,bt.E.getTowerTownImage(B)),this._slots.set(this._currentIndex,k),this.updateCounter(this._currentIndex)}}this.updateCursor(),this._selectionChanged&&this._selectionChanged.dispatch(this._selection)}updateCounter(k,B=-1){const U=this._slots.get(k);if(!G.Aq$.isDefined(U))return;let F=this._smallItems.get(U);if(G.Aq$.isDefined(F)){F+=B,this._smallItems.set(U,F);const k=this._pages[this._currentFilter],G=k.hardPoints.length;for(let B=0;B{const F=B.findComponentInChildren(yt.R);B.active&&F&&F.assetID===k&&F.assetType===U&&(this._floorComponent.largeItemPointer.legacyTransform.group.position=B.legacyTransform.group.position,this._floorComponent.largeItemPointer.active=this._currentFilter!==gt.R.Decorations)}),this)}makeLargePrefabs(k,B){B.forEach((B=>{const U=this._prefabLoader.loadFromGUID(k,B).findComponentInChildren(yt.R);if(U){const k=V.q.instance.prodigy.create.sprite(0,0,X.D.ATLAS_TOWERTOWN_MISC,"interior-ui-mask"),B=V.q.instance.prodigy.create.sprite(0,0,X.D.ATLAS_TOWERTOWN_MISC,"frame-ui-interior");k.scale.set(.5,.5),B.scale.set(.5,.5),U.frame.legacyTransform.group.addChild(k),U.interior.legacyTransform.group.addChild(B),U.selected.add(this.selectAsset,this)}}))}makeSmallPrefabs(k,B){B.forEach((B=>{const U=this._prefabLoader.loadFromGUID(k,B).findComponentInChildren(_t.t);U&&(U.counterVisible=!1,U.selected.add(this.selectAsset,this))}))}removeListeners(){$.union(this._floorComponent.largeItemPoints,this._floorComponent.smallItemPoints).forEach((k=>{const B=k.findComponentInChildren(vt.s);B&&B.selected.removeAll()}))}consumeItems(){this.startBuildingButton.onClick.remove(this.consumeItems,this),this.consume(X.D.ASSET_TYPE_FRAME,this._selection.frameID),this.consume(X.D.ASSET_TYPE_INTERIOR,this._selection.roomID),this._selection.decorations.forEach((k=>{this.consume(X.D.ASSET_TYPE_DECORATION,k)}))}consume(k,B){if(!G.Aq$.isDefined(k)||!G.Aq$.isDefined(B))return;const U=this._storeManager.consume(k,B);G.VyI.log(`Asset of type '${k}' (${B}) was ${U?"consumed":"ignored"}.`,G.$bb.Verbose)}showCounter(k,B,U){return this._currentFilter===k&&!this._storeManager.isDefaultItem(B,U)}destroy(){this._itemSelected.dispose(),this._selectionChanged.dispose(),super.destroy()}}var Ot=U(3836),It=U(68910),Dt=U(27314);class Rt{get itemSelected(){return this._itemSelected}get removeSelected(){return this._removeSelected}constructor(k,B,U){this._itemSelected=new G.HN0,this._removeSelected=new G.HN0,this._gameObjects=[],this._components=[],this._prefabLoader=B,this._parent=U,V.q.instance.prodigy.load.assets([X.D.ATLAS_TOWERTOWN_MISC],this.assetsReady.bind(this))}destroy(){this._removeSelected.dispose(),this._itemSelected.dispose(),this._components.forEach((k=>{k.destroy()})),this._gameObjects.forEach((k=>{k.destroy()}))}showPoints(k){this._gameObjects.forEach((B=>{B.active=k}),this),this._components.forEach((B=>{B.showHardPoint(k)}),this)}setAsset(k,B){this._components[k].setAsset(B),this.showPointer(Rt.HIDE_ITEMS),this.showPopup(k)}assetsReady(k,B){for(let U=0;U{j.clearAsset(),this.showPointer(U),this.removeSelected.dispatch(U)}),this),j.onSelect.add((()=>{j.popupShowing?(this.showPointer(Rt.HIDE_ITEMS),this.showPopup(U)):(this.showPopup(Rt.HIDE_ITEMS),this.showPointer(U)),this.itemSelected.dispatch(U)}),this),this._gameObjects.push(k),this._components.push(j)}this._gameObjects[1].parent=this._parent,this._gameObjects[2].parent=this._parent,this._gameObjects[3].parent=this._parent,this._gameObjects[0].parent=this._parent,this._gameObjects[4].parent=this._parent}addPoints(k,B){return new It.Point(k.x+B.x,k.y+B.y)}showPopup(k){for(let B=0;B{this.game.broadcaster.broadcast(X.D.MESSAGE_ENABLE_NAVIGATION)})))}onFloatlingFlingClicked(){V.q.instance.prodigy.audio.playSFX(X.D.BUTTON_CLICK_SFX_ID,X.D.BUTTON_CLICK),this._mathTower.startFloatlingFling()}onStoreButtonClicked(){V.q.instance.prodigy.audio.playSFX(X.D.BUTTON_CLICK_SFX_ID,X.D.BUTTON_CLICK),this.game.broadcaster.broadcast(X.D.MESSAGE_DISABLE_NAVIGATION),this._mathTower.openStore()}onClickSettings(){V.q.instance.prodigy.audio.playSFX(X.D.BUTTON_CLICK_SFX_ID,X.D.BUTTON_CLICK),this._mathTower.openSettings((()=>{this.game.broadcaster.broadcast(X.D.MESSAGE_ENABLE_NAVIGATION)}))}updateBreadcrumbsLocked(){this._component&&(this.updateButtonLockedFromBreadcrumb(this._component.floatlingFlingButton,rt.M.FlingUnlocked,rt.M.FlingTutorialComplete),this.updateButtonLockedFromBreadcrumb(this._component.storeButton,rt.M.FlingTutorialComplete,rt.M.StoreFirstPurchaseComplete))}updateButtonLockedFromBreadcrumb(k,B,U){this._breadcrumbManager.isBreadcrumbComplete(B)?(k.inputEnabled=!0,k.unlockState(),this._breadcrumbManager.isBreadcrumbComplete(U)?this._guideHand.get(U)&&(this._guideHand.get(U).destroy(),this._guideHand.delete(U)):this._guideHand.get(U)||this._guideHand.set(U,Nt.o.highlightObjectOnLayer(this.game,100,0,k.GameObject.legacyTransform.group,void 0))):(k.inputEnabled=!1,k.lockState(Pt.K.Disabled))}close(){this.removeListeners(),super.close()}toggleVisible(k=!0){if(this._component)if(this._tweenToPullTab.state===Tt.v.Hidden)this._component.GameObject.active=k;else{let B=this._tweenToHide.state===(k?Tt.v.Hidden:Tt.v.Visible);this._tweenToHide.isTweening&&!B&&(this._tweenToHide.cancel(!0),B=!0),B&&(this._component.sliderButton.inputEnabled=!1,this._tweenToHide.slide(this._component.hudUI,Lt.SLIDE_HIDE_DURATION_MS,(()=>{this._visible=this._tweenToHide.state===Tt.v.Visible,this._component.sliderButton.inputEnabled=!0})))}else this._callOnComponentLoad=this.toggleVisible.bind(this,k)}get floatlingFlingButton(){return this._component.floatlingFlingButton}toggleFlingButton(k){this._component&&(this._breadcrumbManager.isBreadcrumbComplete(rt.M.FlingTutorialComplete)||(!this._guideHand.get(rt.M.FlingTutorialComplete)&&k?this._guideHand.set(rt.M.FlingTutorialComplete,Nt.o.highlightObjectOnLayer(this.game,100,0,this._component.floatlingFlingButton.GameObject.legacyTransform.group,void 0)):this._guideHand.get(rt.M.FlingTutorialComplete)&&!k&&(this._guideHand.get(rt.M.FlingTutorialComplete).destroy(),this._guideHand.delete(rt.M.FlingTutorialComplete))),this.toggleButton(this._component.floatlingFlingButton,k))}toggleWorldMapButton(k){this._component&&this.toggleButton(this._component.chooseTownButton,k)}bringToTop(){G.Aq$.isDefined(this._gameObject)&&this._gameObject.bringToFront()}removeListeners(){this._component.chooseTownButton.onClick.dispose(),this._component.floatlingFlingButton.onClick.dispose(),this._component.storeButton.onClick.dispose(),this._component.settingsButton.onClick.dispose(),this._component.sliderButton.onClick.dispose()}slideUI(){V.q.instance.prodigy.audio.playSFX(X.D.BUTTON_CLICK_SFX_ID,X.D.BUTTON_CLICK),this._visible&&!this._tweenToPullTab.isTweening&&(this._component.sliderButton.inputEnabled=!1,this._tweenToPullTab.slide(this._component.hudUI,Lt.SLIDE_DURATION_MS,(()=>{this._component.setSlideIndicator(this._tweenToPullTab.state),this._component.sliderButton.inputEnabled=!0})))}toggleButton(k,B){k.inputEnabled=B,B?k.unlockState():k.lockState(Pt.K.Disabled)}}Lt.TOWER_TOWN_UI_PREFAB=21,Lt.UI_X_HIDE=-79,Lt.UI_X_FULL_HIDE=-179,Lt.UI_X_SHOW=0,Lt.SLIDE_DURATION_MS=200,Lt.SLIDE_HIDE_DURATION_MS=400,(0,F.Cg)([(0,H.sg)(X.D.BUTTON_DEBOUNCE_TIME),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],Lt.prototype,"onOpenWorldMap",null),(0,F.Cg)([(0,H.sg)(X.D.BUTTON_DEBOUNCE_TIME),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],Lt.prototype,"onFloatlingFlingClicked",null),(0,F.Cg)([(0,H.sg)(X.D.BUTTON_DEBOUNCE_TIME),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],Lt.prototype,"onStoreButtonClicked",null),(0,F.Cg)([(0,H.sg)(X.D.BUTTON_DEBOUNCE_TIME),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],Lt.prototype,"onClickSettings",null),(0,F.Cg)([(0,H.sg)(X.D.BUTTON_DEBOUNCE_TIME),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],Lt.prototype,"slideUI",null);var kt=U(27292);class Bt extends pt.R{get rightButton(){return this._moveFloorComponent.rightButton}get leftButton(){return this._moveFloorComponent.leftButton}get cancelButton(){return this._moveFloorComponent.cancelButton}get saveButton(){return this._moveFloorComponent.saveButton}get warningQuitButton(){return this._moveFloorComponent.warningQuitButton}get warningObject(){return this._moveFloorComponent.warningObject}get arrowObject(){return this._moveFloorComponent.arrowObject}constructor(k,B,U,F,G=!0){super(k,B?B.legacyTransform.group:void 0,U,F,[X.D.ATLAS_TOWERTOWN_MISC,X.D.ATLAS_BUTTONS,X.D.ATLAS_DIALOGUES]),this._enableTooltip=G,this._parentGameObject=B}create(){this._gameObject=this.prefabLoader.loadFromGUID(X.D.UI_MOVE_FLOOR,this._parentGameObject),this._moveFloorComponent=this._gameObject.findComponent(kt.B),this._tooltip=this._mathTower.uiFactory.tooltip(this._mathTower.uiFactory.localizer.getText(X.D.HEADER_MOVE_FLOOR),this._enableTooltip,X.D.MOVE_HEADER_WIDTH,0,0),this._mathTower.uiFactory.screen.backgroundGameObject.addChild(this.rightButton.GameObject),this._mathTower.uiFactory.screen.backgroundGameObject.addChild(this.leftButton.GameObject),this._mathTower.uiFactory.screen.backgroundGameObject.addChild(this._moveFloorComponent.warningObject),this._mathTower.uiFactory.screen.backgroundGameObject.addChild(this._moveFloorComponent.arrowObject),this._moveFloorComponent.warningObject.active=!1,this._moveFloorComponent.arrowObject.active=!1}close(){this._moveFloorComponent&&this.disposeComponent(),this._gameObject&&(this._gameObject.destroy(),this._tooltip.setVisible(!1,0)),super.close()}disposeComponent(){this.rightButton.onClick.dispose(),this.leftButton.onClick.dispose(),this.saveButton.onClick.dispose(),this.cancelButton.onClick.dispose(),this.warningQuitButton.onClick.dispose(),this.rightButton.GameObject.destroy(),this.leftButton.GameObject.destroy(),this._moveFloorComponent.warningObject.destroy(),this._moveFloorComponent.arrowObject.destroy()}setWarningText(k){this._moveFloorComponent.warningText.text=k}hideUI(){this.rightButton.GameObject.active=!1,this.leftButton.GameObject.active=!1,this._gameObject.active=!1}}var Ut=U(6145);class Ft extends Mt.W{constructor(k,B,U,F=null){super(k,B,X.D.BASE_MENU_ASSET_ID,void 0,[""]),this._onClose=null,this._newGradeUI=null,this._component=null,this._prefabLoader=U,this._onClose=F}create(){this._newGradeUI=this._prefabLoader.loadFromGUID(X.D.UI_NEW_GRADE_PREFAB),this.parent.addChild(this._newGradeUI.legacyTransform.group),this._component=this._newGradeUI.findComponent(Ut.Q),this._component.closeButton.onClick.add((()=>{V.q.instance.prodigy.audio.playSFX(18,"pop"),this.close()}))}close(){G.Aq$.isDefined(this._onClose)&&this._onClose(),this.removeListeners(),this._newGradeUI.destroy(),super.close()}removeListeners(){this._component.closeButton.onClick.dispose()}}var Gt=U(56942),jt=U(40295),$t=U(75214),Ht=U(87337),Vt=U(23748),Wt=U(93867),qt=U(77175);class Kt extends pt.R{get quitButton(){return this._rooftopComponent.quitButton}get attackButton(){return this._rooftopComponent.attackButton}get topBanner(){return this._rooftopComponent.topBanner}get battleButton(){return this._rooftopComponent.battleButton}get onShadowSummoned(){return this._shadowSummonedSignal}get onVictory(){return this._victorySignal}get onDefeat(){return this._defeatSignal}get onIncorrectAnswer(){return this._incorrectAnswerSignal}get onCorrectAnswer(){return this._correctAnswerSignal}constructor(k,B,U,F,j,$){super(k,B?B.legacyTransform.group:void 0,U,F,[X.D.ATLAS_TOWERTOWN_MISC,X.D.SPINE_STUBBORN_SHADOW,X.D.SPINE_SHADOW_PORTAL,X.D.SPINE_SHADOW_CLASH]),this._puppetMaster=null,this._shadowSummonedSignal=new G.HN0,this._victorySignal=new G.HN0,this._defeatSignal=new G.HN0,this._incorrectAnswerSignal=new G.HN0,this._correctAnswerSignal=new G.HN0,this._parentGameObject=null,this._parentGameObject=B,this._floor=j,this._characterController=$}create(){const k=this.prefabLoader.loadFromGUID(X.D.UI_ROOFTOP_MASTERY,this._parentGameObject);this._rooftopComponent=k.findComponent(qt.W),this._gameObject=k,V.q.instance.prodigy.open.menuLayer.addChild(this._rooftopComponent.GameObject.legacyTransform.group),this.attackButton.GameObject.parent=null,this.battleButton.GameObject.parent=null,this._mathTower.uiFactory.screen.background.addChild(this.attackButton.GameObject.legacyTransform.group),this._mathTower.uiFactory.screen.background.addChild(this.battleButton.GameObject.legacyTransform.group),this._portalSpine=V.q.instance.prodigy.create.spine(0,0,X.D.SPINE_SHADOW_PORTAL,this._mathTower.uiFactory.screen.background),this._stubbornShadowSpine=V.q.instance.prodigy.create.spine(0,0,X.D.SPINE_STUBBORN_SHADOW,this._mathTower.uiFactory.screen.background),this._shadowBeamSpine=V.q.instance.prodigy.create.spine(0,0,X.D.SPINE_SHADOW_CLASH,this._mathTower.uiFactory.screen.background),this._lightBeamSpine=V.q.instance.prodigy.create.spine(0,0,X.D.SPINE_SHADOW_CLASH,this._mathTower.uiFactory.screen.background),this._clashSpine=V.q.instance.prodigy.create.spine(0,0,X.D.SPINE_SHADOW_CLASH,this._mathTower.uiFactory.screen.background),this._spellSpine=V.q.instance.prodigy.create.spine(0,0,X.D.SPINE_SHADOW_CLASH,this._mathTower.uiFactory.screen.background),this._stubbornShadowSpine.visible=!1,this._portalSpine.visible=!1,this._shadowBeamSpine.visible=!1,this._clashSpine.visible=!1,this._lightBeamSpine.visible=!1,this._lightMask=this._mathTower.game.add.graphics(0,0,this._mathTower.uiFactory.screen.background),this._darkMask=this._mathTower.game.add.graphics(0,0,this._mathTower.uiFactory.screen.background)}close(){this._gameObject.destroy(),this.attackButton.GameObject.destroy(),this.battleButton&&(this.battleButton.onClick.removeAll(),this.battleButton.GameObject&&this.battleButton.GameObject.destroy()),this.resetPlayer(),this._stubbornShadowSpine.destroy(),this._portalSpine.destroy(),this._lightBeamSpine.destroy(),this._shadowBeamSpine.destroy(),this._clashSpine.destroy(),this._spellSpine.destroy(),this._shadowSummonedSignal.dispose(),this._victorySignal.dispose(),this._defeatSignal.dispose(),this._incorrectAnswerSignal.dispose(),this._correctAnswerSignal.dispose(),this._lightMask.destroy(),this._darkMask.destroy(),super.close()}setAttackButtonPosition(k){this.attackButton.GameObject.legacyTransform.group.position=k}toggleStaticUIVisibility(k){this._rooftopComponent.GameObject.active=k}spawnStubbornShadow(k,B){this._stubbornShadowSpine.position.set(k,B),this._stubbornShadowSpine.visible=!0,this._stubbornShadowSpine.setToSetupPose(),this._stubbornShadowSpine.setAnimationByName(0,X.D.STUBBORN_SHADOW_IDLE_ANIMATION,!0)}summonStubbornShadow(k,B){this._portalSpine.visible=!0,this._portalSpine.position.set(k,B+X.D.SHADOW_PORTAL_OFFSET.y),this._portalSpine.setToSetupPose(),this._portalSpine.rotation=G.cj9.degToRad(90),this._portalSpine.setAnimationByName(0,X.D.PORTAL_APPEAR_ANIMATION,!1),this._portalSpine.addAnimationByName(0,X.D.PORTAL_IDLE_ANIMATION,!1),this._portalSpine.onComplete.add((()=>{this.finishShadowSummon(k,B)}),this),setTimeout((()=>{V.q.instance.prodigy.audio.playSFX(X.D.TOWER_TOWN_SFX_ID,X.D.STUBBORN_SHADOW_DROP)}),500)}spawnPortalFTUE(k,B){const U=Wt.U.isStepComplete(jt.B.PuppetMasterDefeated)?X.D.STUBBORN_SHADOW_OFFSET_X:0;this._portalSpine.visible=!0,this._portalSpine.position.set(k+U,B+X.D.SHADOW_PORTAL_OFFSET.y),this._portalSpine.rotation=G.cj9.degToRad(90),this._portalSpine.setToSetupPose(),this._portalSpine.setAnimationByName(0,X.D.SHADOW_PORTAL_ANIMATION_APPEAR,!1),this._portalSpine.addAnimationByName(0,X.D.SHADOW_PORTAL_ANIMATION_IDLE,!0)}startBattle(){this.topBanner.legacyTransform.x=0,this._beamStart=this._stubbornShadowSpine.position.x+X.D.SPELL_CLASH_START_OFFSET,this._beamEnd=this._stubbornShadowSpine.position.x+X.D.SPELL_CLASH_END_OFFSET,this.quitButton.inputEnabled=!1,this._characterController.float(!1),this._stubbornShadowSpine.setAnimationByName(0,X.D.STUBBORN_SHADOW_DEFEND_ANIMATION,!1),this._stubbornShadowSpine.onComplete.add(this.startBeams.bind(this))}makePlayerAttack(){const k=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;G.Aq$.isDefined(k.equipment.getEquipment("weapon"))?this.doAttackAnimation():k.equip(25,"weapon").then((()=>this.doAttackAnimation())).catch(G.RQr.createHandler("RooftopMasteryInterface:makePlayerAttack Error equipping training wand"))}doAttackAnimation(){this._characterController.playerContainer.forceWeaponVisual=!0,this._mathTower.uiFactory.screen.user.attack(),this._characterController.playerContainer.OnLoad.add((()=>{this._characterController.float(!1),this._characterController.playerContainer.OnLoad.removeAll(this)}),this),this._characterController.playerContainer.reload()}resetPlayer(){this._characterController.playerContainer.forceWeaponVisual=!1,this._characterController.playerContainer.reload((()=>{this._characterController.float(!0)}))}startBeams(){this._stubbornShadowSpine.onComplete.removeAll(),this._stubbornShadowSpine.setAnimationByName(0,X.D.STUBBORN_SHADOW_SUSTAIN_ANIMATION,!0),this._lightBeamSpine.position.set(this._beamStart+X.D.SPELL_CLASH_END_OFFSET,this._stubbornShadowSpine.position.y+X.D.SPELL_CLASH_Y_OFFSET),this._lightBeamSpine.setAnimationByName(0,X.D.BEAM_TRAVEL_ANIMATION,!0),this._lightBeamSpine.scale.x=X.D.BEAM_SCALE_X,this._lightBeamSpine.visible=!0,this._shadowBeamSpine.position.set(this._stubbornShadowSpine.position.x-X.D.SPELL_CLASH_X_OFFSET,this._stubbornShadowSpine.position.y+X.D.SPELL_CLASH_Y_OFFSET),this._shadowBeamSpine.setAnimationByName(0,X.D.SHADOW_BEAM_TRAVEL_ANIMATION,!0),this._shadowBeamSpine.scale.x=-X.D.BEAM_SCALE_X,this._shadowBeamSpine.visible=!0,this.makePlayerAttack(),this._spellSpine.position.set(this._beamStart+X.D.SPELL_CLASH_END_OFFSET,this._stubbornShadowSpine.position.y+X.D.SPELL_CLASH_Y_OFFSET),this._spellSpine.setAnimationByName(0,X.D.SPELL_SUMMON_ANIMATION,!1),this._spellSpine.addAnimationByName(0,X.D.SPELL_TRAVEL_ANIMATION,!0),this._spellSpine.scale.set(.5),this._clashSpine.visible=!0,this._clashSpine.setAnimationByName(0,X.D.SPELL_CLASH_ANIMATION,!0),this._clashSpine.scale.set(X.D.SPELL_CLASH_SCALE),this._clashSpine.position.set(this._stubbornShadowSpine.position.x,this._stubbornShadowSpine.position.y+X.D.SPELL_CLASH_Y_OFFSET),this.setTheta(this._mathTower.education.getSkillById(this._floor.skillID).theta),this.startAttack()}startAttack(){this.attackButton.GameObject.active=!1,this.quitButton.inputEnabled=!1,this.mathTower.openQuestionForStubbornShadow(this.mathTower.activeFloor.skillID,this.onQuestionAnswered.bind(this))}onQuestionAnswered(k){let B=this._mathTower.education.getSkillById(this._floor.skillID).theta;const U=this._mathTower.game.add.tween(this,this).to({_currentTheta:B});U.onUpdate.add(this.updateTheta.bind(this)),U.onTweenComplete.add(this.onThetaTweenFinished.bind(this,k)),U.start(),this.quitButton.inputEnabled=!0}onThetaTweenFinished(k){this.updateTheta(),this._currentTheta>=X.D.THETA_MAXIMUM?this.defeatShadow():(this.attackButton.GameObject.active=!0,k?this._correctAnswerSignal.dispatch():this._incorrectAnswerSignal.dispatch())}defeatShadow(){this.attackButton.GameObject.active=!1,this._stubbornShadowSpine.setAnimationByName(0,X.D.STUBBORN_SHADOW_DEATH_ANIMATION,!1),this._stubbornShadowSpine.onEnd.add(this.finishBeams.bind(this)),this._lightBeamSpine.onEnd.addOnce((()=>{this._victorySignal.dispatch()}),this),setTimeout((()=>{V.q.instance.prodigy.audio.playSFX(X.D.TOWER_TOWN_SFX_ID,X.D.STUBBORN_SHADOW_DEFEAT)}),500)}finishBeams(){this.attackButton.GameObject.active=!1,this._lightBeamSpine.setAnimationByName(0,X.D.BEAM_END_ANIMATION,!1),this._shadowBeamSpine.setAnimationByName(0,X.D.SHADOW_BEAM_END_ANIMATION,!1),this._clashSpine.setAnimationByName(0,X.D.SPELL_CLASH_END_ANIMATION,!1),this._spellSpine.setAnimationByName(0,X.D.SPELL_END_ANIMATION,!1),this._lightBeamSpine.onComplete.add((()=>{this._lightBeamSpine.visible=!1,this._lightBeamSpine.onComplete.dispose()})),this._shadowBeamSpine.onComplete.add((()=>{this._shadowBeamSpine.visible=!1,this._shadowBeamSpine.onComplete.dispose()})),this._clashSpine.onComplete.add((()=>{this._clashSpine.visible=!1,this._clashSpine.onComplete.dispose()})),this._spellSpine.onComplete.add((()=>{this._spellSpine.visible=!1,this._spellSpine.onComplete.dispose()}))}setTheta(k){this._currentTheta=k;const B=Vt.z.normalizeRange(X.D.THETA_MINIMUM,X.D.THETA_MAXIMUM,k),U=this._beamEnd-this._beamStart;this._clashSpine.x=this._beamStart+U*B,this._lightMask.clear(),this._lightMask.beginFill(X.D.SPELL_MASK_FILL),this._lightMask.drawRect(this._beamStart-X.D.SPELL_MASK_SKIN_WIDTH,this._clashSpine.y-X.D.SPELL_MASK_OFFSET_Y,this._clashSpine.x-this._beamStart+X.D.SPELL_MASK_SKIN_WIDTH,X.D.SPELL_MASK_HEIGHT),this._lightBeamSpine.mask=this._lightMask,this._darkMask.clear(),this._darkMask.beginFill(X.D.SPELL_MASK_FILL),this._darkMask.drawRect(this._clashSpine.x,this._clashSpine.y-X.D.SPELL_MASK_OFFSET_Y,this._beamEnd-this._clashSpine.x+X.D.SPELL_MASK_SKIN_WIDTH,X.D.SPELL_MASK_HEIGHT),this._shadowBeamSpine.mask=this._darkMask}updateTheta(){this.setTheta(this._currentTheta)}resumeBattle(k,B){this._stubbornShadowSpine.position.set(k,B),this._stubbornShadowSpine.visible=!0,this.quitButton.inputEnabled=!1,this.startBattle()}finishShadowSummon(k,B){this._stubbornShadowSpine.position.set(k,B),this._stubbornShadowSpine.visible=!0,this._portalSpine.onComplete.removeAll(),this._portalSpine.setAnimationByName(0,X.D.PORTAL_IDLE_ANIMATION,!0),this._stubbornShadowSpine.setAnimationByName(0,X.D.STUBBORN_SHADOW_APPEAR_ANIMATION,!1),this._stubbornShadowSpine.addAnimationByName(0,X.D.STUBBORN_SHADOW_IDLE_ANIMATION,!0),this._stubbornShadowSpine.onComplete.add((()=>{this._portalSpine.setAnimationByName(0,X.D.PORTAL_DISAPPEAR_ANIMATION,!1),this._shadowSummonedSignal.dispatch(),this._stubbornShadowSpine.onComplete.removeAll()}),this)}spawnPMAndStubbornShadowFTUE(k,B){if(this._stubbornShadowSpine.position.set(k+X.D.STUBBORN_SHADOW_OFFSET_X,B+X.D.STUBBORN_SHADOW_OFFSET_Y),this._stubbornShadowSpine.visible=!0,this._stubbornShadowSpine.setAnimationByName(0,X.D.STUBBORN_SHADOW_ANIMATION_APPEAR,!1),this._stubbornShadowSpine.addAnimationByName(0,X.D.STUBBORN_SHADOW_ANIMATION_IDLE,!0),!Wt.U.isStepComplete(jt.B.PuppetMasterDefeated)){this._puppetMaster=new $t.p(this.game,"NPC_NAME_PUPPETMASTER",Gt.Q.Spine_npc_puppetmaster_json,Ht.ac.Boss,this._mathTower.uiFactory.screen.background,k,B+X.D.SHADOW_PORTAL_OFFSET.y,"idle",null,!0);const U=k+X.D.PUPPET_MASTER_PORTAL_OFFSET_X,F=B;this.game.add.tween(this._puppetMaster,this).to({x:U,y:F},X.D.PUPPET_MASTER_TWEEN_TO_PORTAL_DELAY_MS).start()}}removePMandPortalFTUE(k,B){const U=k,F=B+X.D.SHADOW_PORTAL_OFFSET.y,G=this.game.add.tween(this._puppetMaster,this).to({x:U,y:F},X.D.PUPPET_MASTER_TWEEN_TO_PORTAL_DELAY_MS);V.q.instance.prodigy.effects.resizeContainer(this._puppetMaster,0,X.D.PUPPET_MASTER_TWEEN_TO_PORTAL_DELAY_MS),G.start(),G.onTweenComplete.add((()=>{this._puppetMaster.destroy(),this._puppetMaster=null,G.onTweenComplete.dispose()})),this.removePortalFTUE()}removePortalFTUE(){this._portalSpine.onComplete.add((()=>{this._portalSpine.setAnimationByName(0,X.D.SHADOW_PORTAL_ANIMATION_DISAPPEAR,!1),this._portalSpine.onComplete.dispose()}))}}var zt=U(14151);class Yt extends pt.R{get cleanButton(){return this._shroudLockComponent.cleanButton}get gameObject(){return this._gameObject}get quitButton(){return this._shroudLockComponent.quitButton}get onCloudAppear(){return this._cloudAppeared}get cloudSpine(){return this._cloudSpine}constructor(k,B,U,F){super(k,B?B.legacyTransform.group:void 0,U,F,[X.D.ATLAS_TOWERTOWN_MISC]),this._cloudAppeared=new G.HN0,this._parentGameObject=null,this._parentGameObject=B}create(){this._cloudSpine=V.q.instance.prodigy.create.spine(0,0,X.D.SPINE_SHROUD_CLOUD);const k=this.prefabLoader.loadFromGUID(X.D.UI_SHROUD_LOCK_PREFAB,this._parentGameObject);this._shroudLockComponent=k.findComponent(zt.q),this._rightBar=V.q.instance.prodigy.create.sprite(this._shroudLockComponent.rightBarTransform.x,this._shroudLockComponent.rightBarTransform.y),this._leftBar=V.q.instance.prodigy.create.sprite(this._shroudLockComponent.leftBarTransform.x,this._shroudLockComponent.leftBarTransform.y),this._middleBar=V.q.instance.prodigy.create.sprite(this._shroudLockComponent.middleBarTransform.x,this._shroudLockComponent.middleBarTransform.y),k.legacyTransform.group.addChild(this._leftBar),k.legacyTransform.group.addChild(this._rightBar),k.legacyTransform.group.addChild(this._middleBar),this._rightBar.loadTexture(X.D.ATLAS_TOWERTOWN_MISC,X.D.FRAME_RIGHT_BAR),this._leftBar.loadTexture(X.D.ATLAS_TOWERTOWN_MISC,X.D.FRAME_LEFT_BAR),this._middleBar.loadTexture(X.D.ATLAS_TOWERTOWN_MISC,X.D.FRAME_MIDDLE_BAR),this._middleBar.anchor.x=0,this._middleBar.width=0,this._rightBar.visible=!1,this.setShroudCleansRemainingUI(),this._gameObject=k,V.q.instance.prodigy.open.menuLayer.addChild(this._shroudLockComponent.GameObject.legacyTransform.group),this._mathTower.uiFactory.screen.background.addChild(this._cloudSpine),this._mathTower.uiFactory.screen.background.addChild(this._shroudLockComponent.cleanButton.GameObject.legacyTransform.group)}close(){this._cloudSpine.pendingDestroy=!0,G.Aq$.isDefined(this.cleanButton)&&(this.cleanButton.onClick.removeAll(),this.cleanButton.GameObject&&this.cleanButton.GameObject.destroy()),this._leftBar.destroy(),this._rightBar.destroy(),this._middleBar.destroy(),G.Aq$.isDefined(this._gameObject)&&(this._gameObject.destroy(),this._gameObject=null),this._cloudAppeared.dispose(),super.close()}setShroudCleansRemainingUI(k=X.D.SHROUD_CLEAN_SPELLS){const B=Math.min(X.D.SHROUD_CLEAN_SPELLS,Math.max(0,k)),U=this._rightBar.x-(this._leftBar.x+this._leftBar.width);this._middleBar.width=U*(X.D.SHROUD_CLEAN_SPELLS-B)*(1/X.D.SHROUD_CLEAN_SPELLS),this._rightBar.visible=B<=0,this._shroudLockComponent.statusText=`Spells remaining: ${B}`}setCleanButtonPosition(k){this._shroudLockComponent.cleanButton.GameObject.legacyTransform.group.position=k}makeCloudAppear(k=0,B=0,U=!1){this._cloudSpine.position.set(k,B),this._cloudSpine.setToSetupPose(),U||this._cloudSpine.setAnimationByName(0,"fade in",!1),this._cloudSpine.addAnimationByName(0,"idle",!0),this._cloudAppeared.dispatch()}makeCloudDisappear(k){V.q.instance.prodigy.audio.playSFX(X.D.TOWER_TOWN_SFX_ID,X.D.CLEAR_SHROUD),this._cloudSpine.setToSetupPose(),this._cloudSpine.setAnimationByName(0,"fade out",!1),k&&this._cloudSpine.onComplete.add(k)}bringToTop(){ht.Z.bringToTop(this.gameObject.legacyTransform.group),ht.Z.bringToTop(this.cloudSpine),ht.Z.bringToTop(this.cleanButton.GameObject.legacyTransform.group)}hideUI(){this.quitButton.GameObject.active=!1,this._shroudLockComponent.header.active=!1,this._rightBar.visible=!1,this._leftBar.visible=!1,this._middleBar.visible=!1,this._shroudLockComponent.buttonBG.active=!1}setQuitButtonVisibility(k){this.quitButton.GameObject.active=k,this._shroudLockComponent.buttonBG.active=k}}class Qt{constructor(){this._assetsReady=new G.HN0}get assetsReady(){return this._assetsReady}getItemGuid(k){return bt.E.getTowerTownImage(k.data.tag)}getSprites(k){this._items=k;const B=[];k.forEach((k=>B.push(this.getItemGuid(k)))),V.q.instance.prodigy.load.assets(B,this.assetsLoaded.bind(this))}assetsLoaded(k,B){const U=[];this._items.forEach((k=>{U.push({bitmapData:this.createSprite(k.data.tag),imageName:k.data.tag,ID:k.ID,count:k.count})})),this._assetsReady.dispatch(U)}createSprite(k){const B=bt.E.getTowerTownImage(k);return V.q.instance.prodigy.create.sprite(0,0,B).texture}}var Xt=U(49237);let Zt=class extends G.uAl{constructor(){super(...arguments),this._okayButton=null,this._closeButton=null,this._headerText=null,this._bodyText=null,this._okayButtonText=[]}get okayButton(){return this._okayButton}get closeButton(){return this._closeButton}get headerText(){return this._headerText.TextObject.text}set headerText(k){this._headerText.text=k}get bodyText(){return this._bodyText.TextObject.text}set bodyText(k){this._bodyText.text=k}get okayButtonText(){return this._okayButtonText[0].TextObject.text}set okayButtonText(k){this._okayButtonText.forEach((B=>B.text=k))}};(0,F.Cg)([(0,G.x4W)("okayButton"),(0,F.Sn)("design:type",Xt.$)],Zt.prototype,"_okayButton",void 0),(0,F.Cg)([(0,G.x4W)("closeButton"),(0,F.Sn)("design:type",Xt.$)],Zt.prototype,"_closeButton",void 0),(0,F.Cg)([(0,G.x4W)("headerText"),(0,F.Sn)("design:type",G.EYj)],Zt.prototype,"_headerText",void 0),(0,F.Cg)([(0,G.x4W)("bodyText"),(0,F.Sn)("design:type",G.EYj)],Zt.prototype,"_bodyText",void 0),(0,F.Cg)([(0,G.x4W)("okayButtonText"),(0,F.Sn)("design:type",Array)],Zt.prototype,"_okayButtonText",void 0),Zt=(0,F.Cg)([(0,G.EVk)("HatStoreAdvertComponent")],Zt);class Jt extends Mt.W{constructor(k,B,U,F){super(k,U,200),this._prefabLoader=null,this._closeCallback=null,this._prefabLoader=B,this._closeCallback=F}create(){super.create(),this._ui=this._prefabLoader.loadFromGUID(X.D.UI_TOWER_TOWN_MALL_HATSTORE_AD),this.parent.addChild(this._ui.legacyTransform.group),this._ui.legacyTransform.group.fixedToCamera=!0,this._ui.legacyTransform.group.cameraOffset=new It.Point(0,0),this._component=this._ui.findComponent(Zt),this._component.closeButton.onClick.add((()=>{this.close()})),this._component.okayButton.onClick.add((()=>{this.close()})),this.game.broadcaster.broadcast(X.D.MESSAGE_DISABLE_NAVIGATION)}close(){this._closeCallback&&this._closeCallback(),V.q.instance.prodigy.audio.playSFX(18,"pop"),super.close()}destroy(){this._component.closeButton.onClick.dispose(),this._component.okayButton.onClick.dispose(),this._ui.destroy(),super.destroy()}}var te=U(47716),ee=U(12420),ie=U(76501),se=U(43531),ne=U(95946),ae=U(30376),re=U(36730);class oe extends Mt.W{constructor(k,B,U){super(k,U,200,void 0,[X.D.ATLAS_BUTTONS,X.D.ATLAS_TOWERTOWN_MISC,X.D.ATLAS_TOWERTOWN,X.D.ATLAS_STORE,X.D.ATLAS_BAM,X.D.ATLAS_SHARED,X.D.ATLAS_PANELS]),this._prefabLoader=null,this._breadcrumbManager=null,this._uiFactory=null,this._mainUI=null,this._scrollViewObject=null,this._scrollView=null,this._scrollBarObject=null,this._scrollBar=null,this._mainComponent=null,this._uiFactory=B,this._prefabLoader=V.q.instance.prodigy.gameContainer.get("d0e-64fd"),this._breadcrumbManager=V.q.instance.prodigy.gameContainer.get(Q.G.BreadcrumbManager)}create(){super.create(),this._mainUI=this._prefabLoader.loadFromGUID(X.D.UI_TOWER_TOWN_MALL_PREFAB),this._mainComponent=this._mainUI.findComponent(re.f),this.parent.addChild(this._mainUI.legacyTransform.group),this._mainUI.legacyTransform.group.fixedToCamera=!0,this._mainUI.legacyTransform.group.cameraOffset=new It.Point(0,0),this._scrollViewObject=this._prefabLoader.loadFromGUID(X.D.UI_TOWER_TOWN_MALL_SCROLLVIEW,this._mainUI),this._scrollView=this._scrollViewObject.findComponentInChildren(te.H),this._scrollBarObject=this._prefabLoader.loadFromGUID(X.D.UI_TOWER_TOWN_MALL_SCROLLBAR,this._mainUI),this._scrollBar=this._scrollBarObject.findComponentInChildren(ee.$),this._mainComponent.closeButton.onClick.add((()=>{this.game.broadcaster.broadcast(X.D.MESSAGE_ENABLE_NAVIGATION),V.q.instance.prodigy.audio.playSFX(18,"pop"),this.close()})),this._mainComponent.GameObject.legacyTransform.group.fixedToCamera=!0,this.fillMall()}update(){super.update(),this._scrollView}destroy(){this.checkBreadcrumb(),this._mainComponent.closeButton.onClick.dispose(),this._mainUI.destroy(),this._scrollViewObject.destroy(),this._scrollBarObject.destroy(),super.destroy()}checkBreadcrumb(){if(!this._breadcrumbManager.isBreadcrumbComplete(rt.M.StoreFirstPurchaseComplete)){const k=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(k.backpack.getBackpackItemsByType(X.D.ASSET_TYPE_FRAME).length+k.backpack.getBackpackItemsByType(X.D.ASSET_TYPE_INTERIOR).length+k.backpack.getBackpackItemsByType(X.D.ASSET_TYPE_DECORATION).length>X.D.DEFAULT_ITEM_COUNT){this._breadcrumbManager.completeBreadcrumb(rt.M.StoreFirstPurchaseComplete),this._uiFactory.hud.updateBreadcrumbsLocked();const k=new se.rD(this.game),B=[];X.D.STORE_FTUE_OUTRO_DIALOGUE.forEach((U=>{B.push({dialogueData:k.dataProvider.get(U),blockInput:!0})})),k.addEvents(B),k.start()}}}fillMall(){const k=[],B=[],U={cells:B};k.push(U),B.push({type:ne.a.Fire,storeID:X.D.STORE_FIRE,playerCurrency:this.getCurrency(X.D.FIRE_RESEARCH_CURRENCY)}),B.push({type:ne.a.Ice,storeID:X.D.STORE_ICE,playerCurrency:this.getCurrency(X.D.ICE_RESEARCH_CURRENCY)}),B.push({type:ne.a.Plant,storeID:X.D.STORE_PLANT,playerCurrency:this.getCurrency(X.D.PLANT_RESEARCH_CURRENCY)}),B.push({type:ne.a.Storm,storeID:X.D.STORE_STORM,playerCurrency:this.getCurrency(X.D.STORM_RESEARCH_CURRENCY)}),B.push({type:ne.a.Water,storeID:X.D.STORE_WATER,playerCurrency:this.getCurrency(X.D.WATER_RESEARCH_CURRENCY)}),B.push({storeID:X.D.STORE_HAT,playerCurrency:0,hatStore:!0}),this._scrollView._createCell=()=>{const k=this._prefabLoader.loadFromGUID(X.D.UI_TOWER_TOWN_MALL_SHOP_PREFAB,null);return k.findComponentInChildren(ae.l).onClick.add((k=>{V.q.instance.prodigy.audio.playSFX(18,"pop"),k===X.D.STORE_HAT?this._uiFactory.openHatStore((()=>{this._uiFactory.openStore()})):V.q.instance.prodigy.open.store(k,(()=>{this._uiFactory.openStore()})),this.close()})),k},this._scrollView.dataSource=new ie.W(k),this._scrollBar._scrollView=this._scrollView,this._scrollView.verticalScrollBar=this._scrollBar,this._scrollView.populateContentView()}getCurrency(k){return V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("currency",k)}}var he=U(82443);class ce extends Mt.W{constructor(k,B,U,F,j=null){super(k,B,X.D.BASE_MENU_ASSET_ID,void 0,[""]),this._townUpdateData=null,this._onClose=null,this._updateUI=null,this._component=null,this._localizer=V.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),this._prefabLoader=U,this._townUpdateData=F,this._onClose=j}create(){this._updateUI=this._prefabLoader.loadFromGUID(X.D.UI_TOWER_TOWN_UPDATE),this.parent.addChild(this._updateUI.legacyTransform.group),this._component=this._updateUI.findComponent(he.O),this._component.closeButton.onClick.add((()=>{this.close()})),this.checkTownProgress(this._townUpdateData)}close(){G.Aq$.isDefined(this._onClose)&&this._onClose(),this.removeListeners(),this._updateUI.destroy(),super.close()}removeListeners(){this._component.closeButton.onClick.dispose()}checkTownProgress(k){this._component.blocksText=`${k.blocks} ${this._localizer.getText(X.D.TT_UPDATE_BLOCKS_BUILT)}`,this._component.floorsText=`${k.floors} ${this._localizer.getText(X.D.TT_UPDATE_FLOORS_MADE)}`,this._component.shroudsText=`${k.shrouds} ${this._localizer.getText(X.D.TT_UPDATE_SHROUDS_CLEARED)}`}}class de{get hud(){return this._hud||this.start(),this._hud}get localizer(){return this._localizer}get screen(){return this._screen}constructor(k,B,U,F){this._prefabLoader=V.q.instance.prodigy.gameContainer.get("d0e-64fd"),this._root=U.uiLayerGameObject,this._game=k,this._mathTower=B,this._screen=U,this._localizer=V.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),this._map=F}destroy(){this._hud&&(this._hud.close(),this._hud.destroy()),this._scrim&&this._scrim.destroy()}start(){this._hud||(this._hud=new Lt(this._game,this._mathTower,this._root,this._prefabLoader)),this._scrim||(this._scrim=this._game.add.graphics(0,0),this._scrim.beginFill(16777215,X.D.SCRIM_ALPHA),this._scrim.drawRect(0,0,this._game.width*X.D.SCRIM_SCALE_X,this._game.height*X.D.SCRIM_SCALE_Y),this._scrim.visible=!1)}chooseFloorLook(k,B=null){const U=new G._mx(this.screen.backgroundGameObject);U.addComponent(G.K16),U.legacyTransform.x+=k.x,U.legacyTransform.y+=k.y;const F=new At(this._game,this._prefabLoader,this._root),j=new Rt(this._game,this._prefabLoader,U),$=new Qt,H=G.Aq$.isDefined(B)&&!B.isBreadcrumbComplete(rt.M.TutorialCompleted),W=new Ct(this._game,this._root,this._mathTower,this._prefabLoader,F,j,V.q.instance.prodigy.gameContainer.get(Q.G.StoreManager),$,B,H?null:()=>{j.destroy(),F.destroy()});return W.itemSelected.add((()=>{j.destroy(),F.destroy()}),this),W}openStore(){V.q.instance.prodigy.open.fromFactory((()=>new oe(this._game,this,V.q.instance.prodigy.open.menuLayer)))}openHatStore(k){V.q.instance.prodigy.open.fromFactory((()=>new Jt(this._game,this._prefabLoader,V.q.instance.prodigy.open.menuLayer,k)))}openUpdate(k,B){V.q.instance.prodigy.open.fromFactory((()=>new ce(this._game,V.q.instance.prodigy.open.menuLayer,this._prefabLoader,k,B)))}openNewGradePopup(k){this._game.broadcaster.broadcast(X.D.MESSAGE_DISABLE_NAVIGATION),V.q.instance.prodigy.open.fromFactory((()=>new Ft(this._game,V.q.instance.prodigy.open.menuLayer,this._prefabLoader,k)))}buildInterface(k,B=null){return new Ot._(this._game,this._screen.backgroundGameObject,this._mathTower,this._prefabLoader,B||this._mathTower.activeFloor,k.x+X.D.IN_PROGRESS_PREFAB_X_OFFSET,k.y+X.D.IN_PROGRESS_PREFAB_Y_OFFSET,B?Ot.i.QuickReno:null)}shroudLockInterface(){return new Yt(this._game,this._screen.backgroundGameObject,this._mathTower,this._prefabLoader)}tooltip(k,B=!0,U=X.D.TOOLTIP_WIDTH,F=X.D.TOOLTIP_SLIDE_DURATION,G=X.D.TOOLTIP_STAY_DURATION){const j=new At(this._game,this._prefabLoader,this._root);return j.onComponentLoaded.add(this.onTooltipLoad.bind(this,j,B,k,U,F,G)),j}buttonTooltip(k,B,U,F=ct.i.LEFT,G){const j=F===ct.i.LEFT||F===ct.i.RIGHT?.5:void 0,$=F===ct.i.UP||F===ct.i.DOWN?.5:void 0,H=this.getTooltipX(U.GameObject,F),V=this.getTooltipY(U.GameObject,F);return dt.A.displayToolTipManual(k,this._root,{arrowDirection:F,bodyText:B,xPosition:H,yPosition:V,proceedButtonCallback:G,arrowYRelPos:j,arrowXRelPos:$})}rooftopMasteryInterface(k){return new Kt(this._game,this._screen.backgroundGameObject,this._mathTower,this._prefabLoader,k,this._map.characterController)}moveFloorInterface(k=!0){return new Bt(this._game,this._root,this._mathTower,this._prefabLoader,k)}showTowerTownIsOpen(k,B){const U=this._localizer.getText(X.D.TT_TOWER_TOWN_OPEN),F=this._localizer.getText(X.D.TT_TOWER_WORK_DONE),G=this._localizer.getText(X.D.TT_START_BUILDING);this.showBanner(U,F,G,X.D.POPUP_TOWER_TOWN_OPEN,k,void 0,void 0,B)}showInfinityTowerIsOpen(k,B){const U=this._localizer.getText(X.D.TT_INFINITY_TOWER_OPEN),F=this._localizer.getText(X.D.TT_INFINITY_TOWER_OPEN_BODY),G=this._localizer.getText(X.D.TT_START_BUILDING);this.showBanner(U,F,G,X.D.POPUP_INFINITY_TOWER_OPEN,k,void 0,void 0,B)}showInfinityTowerIsClosed(){const k=this._localizer.getText(X.D.TT_INFINITY_TOWER_CLOSED),B=this._localizer.getText(X.D.TT_TOWER_CLOSED_BODY),U=this._localizer.getText(X.D.TT_TOWER_CLOSED_LINKTXT),F=this._localizer.getText(X.D.TT_TOWER_CLOSED_FOOTER);this._game.broadcaster.broadcast(X.D.MESSAGE_DISABLE_NAVIGATION),V.q.instance.prodigy.open.bannerDialog(new ut.Z(U,(()=>{ft.I.openWebsite(this.localizer.getText(X.D.TT_TOWER_CLOSED_LINK))}),de.INFINITY_TOWER_DIALOG_WIDTH,k,B,!0,X.D.POPUP_INFINITY_TOWER_CLOSE,null,!0,(()=>{this._game.broadcaster.broadcast(X.D.MESSAGE_ENABLE_NAVIGATION),this._game.broadcaster.broadcast(X.D.MESSAGE_ENABLE_BUTTON)}),!0,F))}spawnScrim(k,B,U=!1){let F,G;U?(F=this._map.townRenderer.infinityRenderer,G=F.getFloor(F.floors.length-1)):(F=this._map.townRenderer.towerRenderers[k],G=F.getFloor(B)),ht.Z.bringToTop(F.legacyTransform.group),F.floors.forEach((k=>{k&&k.decorations.forEach((k=>{ht.Z.bringToTop(k.GameObject.legacyTransform.group)}))})),F.legacyTransform.group.addChild(this._scrim),this._scrim.x=-this._mathTower.game.width*X.D.SCRIM_OFFSET_X_IN_SCREENS,this._scrim.y=-this._mathTower.game.height*X.D.SCRIM_OFFSET_Y_IN_SCREENS,this._scrim.visible=!0,ht.Z.bringToTop(G.legacyTransform.group),G.decorations.forEach((k=>{ht.Z.bringToTop(k.GameObject.legacyTransform.group)}))}spawnInfinityScrim(){this.spawnScrim(-1,-1,!0)}despawnScrim(){this._scrim&&(this._scrim.visible=!1)}showNewTownPopup(k){V.q.instance.prodigy.open.topHeavyInformationDialog(new z.Z(X.D.POPUP_NEW_TOWN_BUTTON,k,K.E.Small,X.D.NEW_TOWN_POPUP_SIZE,X.D.POPUP_NEW_TOWN_TITLE,X.D.POPUP_NEW_TOWN_BODY,!0,X.D.ATLAS_SWOOPY_FACE,X.D.ATLAS_SWOOPY_FACE_FRAME_DEFAULT,ot.l.TopHeavyHeader,ot.l.BannerDialogFooter,ot.l.TopHeavyBody))}showBanner(k,B,U,F,G,j=de.INFINITY_TOWER_DIALOG_WIDTH,$,H){if(V.q.instance.prodigy.open.isMenuOpen(lt.L))return;const W=!!$||void 0,q=H?()=>{H()}:()=>{this._game.broadcaster.broadcast(X.D.MESSAGE_ENABLE_NAVIGATION)};this._game.broadcaster.broadcast(X.D.MESSAGE_DISABLE_NAVIGATION),V.q.instance.prodigy.open.bannerDialog(new ut.Z(U,(()=>{G&&G()}),j,k,B,!0,F,null,!0,q,W,$))}onTooltipLoad(k,B,U,F,G,j){k.width=F,k.text=U,B&&k.setVisible(!0,G,j)}getTooltipX(k,B,U=0){const F=k.legacyTransform.group.getGlobalPosition().x-k.legacyTransform.group.pivot.x;switch(B){case ct.i.DOWN:case ct.i.UP:return F+Math.ceil(k.legacyTransform.group.width/2);case ct.i.LEFT:return F+k.legacyTransform.group.width;case ct.i.RIGHT:return F-U}}getTooltipY(k,B,U=0){const F=k.legacyTransform.group.getGlobalPosition().y-k.legacyTransform.group.pivot.y;switch(B){case ct.i.LEFT:case ct.i.RIGHT:return F+Math.ceil(k.legacyTransform.group.height/2);case ct.i.UP:return F+k.legacyTransform.group.height;case ct.i.DOWN:return F-U}}}de.INFINITY_TOWER_DIALOG_WIDTH=700;class le{static removeFloorsWithDuplicateSkillIds(k){const B=[...k.floors].filter((k=>k.skillID)),U=(0,$.uniqBy)(B,"skillID");return B.filter((k=>!(0,$.includes)(U,k))).forEach((B=>{(0,$.remove)(k.floors,B)})),k}static removeFloorsThatArePreConstruction(k){return(0,$.remove)(k.floors,(k=>k.isPreConstruction)),k}static removeFloorsWithSkillIdsThatMatch(k,B){return(0,$.remove)(k.floors,(k=>!k.isComplete&&(0,$.includes)(B,k.skillID))),k}static removeSkillIdFromInfinityTowerFloors(k){return(null==k?void 0:k.isInfinityTower)&&k.floors.forEach((k=>{k.skillID=null})),k}}const ue=[Z.L.EDUCATION_QUESTION_INTERFACE_CLOSE,Z.L.EDUCATION_QUESTION_INTERFACE_OPEN,Z.L.FLOATLING_SET_LAST_THROWN,Z.L.FLOOR_AWARD_FLOATLINGS,Z.L.FLOOR_SET_BLOCK_COUNT,Z.L.TOWER_PUSH_FLOOR,Z.L.TOWER_REMOVE_FLOOR];var fe,be;!function(k){k[k[1/0]=0]="Infinity",k[k.Build=1]="Build"}(fe||(fe={})),function(k){k.FLOOR_BUILDING_INFINITY="TowerTownInfinityTower",k.FLOOR_BUILDING="TowerTownFloorBuilding",k.QUICK_RENOVATION="TowerTownQuickRenovation",k.SHROUD_CLEAR="ShadowShroud",k.STUBBORN_SHADOW="StubbornShadow",k.TUTORIAL="TowerTownTutorialBuilding"}(be||(be={}));let pe=class extends it.v{get isClickable(){return this._isClickable}get isInfinity(){return this._isInfinity}set isInfinity(k){this._isInfinity=k}get currentTown(){return this._town}get currentGrade(){return this._gradeID}get uiFactory(){return this._uiFactory}get stateManager(){return this._stateManager}set stateManager(k){this._stateManager=k}buildUIFactory(k,B){this._uiFactory=new de(this.game,this,k,B)}constructor(k,B,U,F){super(),this._town=null,this._towerMode=fe.Build,this._gradeID="",this.newGrade=!1,this._isClickable=!0,this._isInfinity=!1,this._game=k,this._storage=B,this._education=U,this._events=F,this.registerEducationHandler(this._education)}showWorldMap(k=null){V.q.instance.prodigy.open.map({onClose:k})}destroy(){this.onUpdate&&this.onUpdate.dispose(),this.uiFactory&&this.uiFactory.destroy()}getGrade(){var k;return null!==(k=this._education.getGrade())&&void 0!==k?k:X.D.DEFAULT_EDUCATION_GRADE}setCurrentTown(k,B=!1){let U=this._storage.getTown(k);const F=this._storage.getTownIDs();return parseInt(k)!==X.D.TUTORIAL_GRADE&&F.length>0&&!F.includes(k)&&(this.newGrade=!0),U?(this.unregisterTownHandler(U),U.onUpdate.remove(this.conditionallySaveTown.bind(this)),this.sanitizeTown(U)):U=new et.J,this.registerTownHandler(U),B||U.onUpdate.add(this.conditionallySaveTown.bind(this)),this._gradeID=k,this._town=U,this._town.init(B),this.notifyUpdate(Z.L.TOWER_TOWN_SET_CURRENT_TOWN),U}sanitizeTown(k){const B=this.education.getMobileUnfriendlySkillIds();le.removeSkillIdFromInfinityTowerFloors(k.infinityTower),[...k.towers,k.infinityTower].filter((k=>k)).forEach((k=>{le.removeFloorsWithDuplicateSkillIds(k),le.removeFloorsThatArePreConstruction(k),le.removeFloorsWithSkillIdsThatMatch(k,B)}))}conditionallySaveTown(k){const B=!!this._town&&this._town.isTutorialTown;(0,$.includes)(ue,k.getFinalNotification().type)&&!B&&this.saveTown()}saveTown(){this.setTown()}forceSaveTown(){this.setTown()}setTown(){this._storage.setTown(this._gradeID,this._town),this.notifyUpdate(Z.L.TOWER_TOWN_SAVE_TOWN)}isEnabledForPlayer(k){const B=Y.X.isMathSubjectRequirementMet(),U=q.O.isEnglishLocale();return k.isFocusModeEnabled&&B&&U}startFloatlingFling(){this._isClickable&&this.notifyUpdate(Z.L.TOWER_TOWN_FLOATLING_FLING_START)}fireEvent(k,B){this.events.handleNotification(this,new J.L(this,k,null,B))}startHideAndSeek(){throw new Error("Start hide and seek.")}openSettings(k=null){this._isClickable&&(this.game.broadcaster.broadcast(X.D.MESSAGE_DISABLE_NAVIGATION),V.q.instance.prodigy.open.optionsMenu(k),this.notifyUpdate(Z.L.TOWER_TOWN_SETTINGS_OPEN))}showTownUpdate(k,B){const U={blocks:k.totalNewBlocks,floors:k.totalNewFloors,shrouds:k.totalShroudsCleared,shadows:k.totalNewStubbornShadows};this._uiFactory.openUpdate(U,B)}showNewGradePopup(k){this._uiFactory.openNewGradePopup(k)}openStore(){this._uiFactory.openStore(),this.notifyUpdate(Z.L.TOWER_TOWN_STORE_OPEN)}openQuestionForShroud(k){this.openQuestionInterfaceThenEmitNotifications(be.SHROUD_CLEAR,!0,null,!0,k)}openQuestionForStubbornShadow(k,B){this.openQuestionInterfaceThenEmitNotifications(be.STUBBORN_SHADOW,!1,k,!0,B)}openQuestionForFloorBuilding(k,B){this.openQuestionInterfaceThenEmitNotifications(be.FLOOR_BUILDING,!1,k,!1,B)}openQuestionForInfinityFloorBuilding(k){this.openQuestionInterfaceThenEmitNotifications(be.FLOOR_BUILDING_INFINITY,!0,null,!1,k)}openQuestionForQuickRenovation(k,B){this.openQuestionInterfaceThenEmitNotifications(be.QUICK_RENOVATION,!1,k,!0,B)}openQuestionForTutorial(k){this.openQuestionInterfaceThenEmitNotifications(be.TUTORIAL,!0,null,!1,k)}openQuestionInterfaceThenEmitNotifications(k,B,U,F,G){if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){G&&G(!0,10,1,!1,!1,{});return}this._education.openQuestionInterface(B,U,F,((B,U,F,j,$,H)=>{const V={eventType:k,skill:H,wasCorrect:B};this.fireEvent(Z.L.TOWER_TOWN_QUESTION_ANSWERED,V),G&&G(B,U,F,!1,!1,H)}))}shouldUseBuildMode(){return this._towerMode===fe.Build}shouldUseInfinityTowerMode(){const k=this.getGrade(),B=this._education.getPendingSkillsByGrade(k).length;return this._towerMode===fe.Infinity||0===B}get activeInfinityFloor(){return(0,$.last)(this._town.infinityTower.floors)}get activeFloor(){return this.isInfinity?this.activeInfinityFloor:(0,$.last)(this._town.floors)}getActiveFloorIndexes(){if(this.isInfinity)return new G.I9Y(-1,-1);const k=this.currentTown,B=this.activeFloor;for(let U=k.towers.length-1;U>=0;--U){const F=k.towers[U].floors.indexOf(B);if(F>=0)return new G.I9Y(U,F)}return new G.I9Y(0,0)}get activeTower(){return this.isInfinity?this._town.infinityTower:(0,$.last)(this._town.towers)}get currentSkillID(){const k=this._education.getCurrentSkillByGrade(this.getGrade());return k?k.ID:null}get game(){return this._game}get education(){return this._education}get events(){return this._events}removeTowers(){(0,$.range)(this._town.towers.length).forEach((()=>{this._town.removeTower()}))}hasMinimumFloorsToMove(k){return k.floors.length>tt.o.MINIMUM_FLOOR_COUNT}isTopFloorOfTower(k,B){return B===k.floors.length-1}canMoveFloorToPrevTower(k,B){return 0===B&&G.Aq$.isDefined(k)&&k.floors.length{const B=k.getFinalNotification().type;if(this.conditionallySaveTown(k),B===Z.L.EDUCATION_SET_ALGORITHM){const k=this._education.isCurrentAlgorithmBasicOrGameChallenge(),B=this._towerMode;this._towerMode=k?fe.Build:fe.Infinity,this._towerMode!==B&&this.notifyUpdate(Z.L.TOWER_TOWN_INFINITY_TOWER_OPEN)}}))}getFloatlingsForFling(){return this.isInfinity?this.currentTown.infinityTower.getWanderingFloatlings():this.currentTown.getWanderingFloatlings()}hasAvailableFloatlings(){return this.stateManager.map.breadCrumbManager.isBreadcrumbComplete(rt.M.FlingTutorialComplete)?this.isInfinity?this.currentTown.infinityTower.getFloatlings().length>0:this.currentTown.getAllFloatlings().length>0:this.getFloatlingsForFling().length>=X.D.FLING_FTUE_FLOATLING_COUNT}handleUpdate(k){const B=super.handleUpdate(k);return this.events.handleNotification(this,B),B}setClickable(k){this._isClickable=k}redirectTowerTownPopup(){return V.q.instance.prodigy.open.informationDialog(new z.Z(X.D.POPUP_TOWER_TOWN_GO_TO_BUTTON,(()=>{V.q.instance.prodigy.world.it(X.D.TOWER_TOWN_MAP)}),K.E.Medium,600,X.D.POPUP_TOWER_TOWN_GO_TO,X.D.POPUP_TOWER_TOWN_REDIRECT,!0,X.D.ATLAS_SWOOPY_FACE,X.D.ATLAS_SWOOPY_FACE_FRAME_DEFAULT))}};(0,F.Cg)([(0,H.sg)(500,{leading:!1}),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],pe.prototype,"saveTown",null),pe=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("51c-03a0")),(0,F.Qj)(1,(0,j.inject)(Q.G.Storage)),(0,F.Qj)(2,(0,j.inject)(Q.G.Education)),(0,F.Qj)(3,(0,j.inject)(Q.G.Events)),(0,F.Sn)("design:paramtypes",[W.n,at.w,st.V,nt.s])],pe)},26023:(k,B,U)=>{"use strict";U.d(B,{k:()=>nt});var F=U(62459),G=U(35120),j=U(70399),$=U(82142),H=U(66930),V=U(42862),W=U(40410),q=U(6191),K=U(41340),z=U(8674),Y=U(79687),Q=U(95891),X=U(77938),Z=U(64794);let J=class{constructor(){this._items=new Map,this._itemsReady=!1}get items(){return this._itemsReady||(this.lazyLoadItems(),this._itemsReady=!0),this._items}getItems(k){const B=this.items.get(k);return B||[]}isDefaultItem(k,B){const U=this.items.get(k);return U&&Q.find(U,(k=>k===B))===B}lazyLoadItems(){this._items.set(Z.D.ASSET_TYPE_INTERIOR,[]),this._items.set(Z.D.ASSET_TYPE_FRAME,[]);const k=X.t.getItemsWithFilter(Z.D.ASSET_TYPE_INTERIOR,(k=>Q.get(k,"data.tag")&&k.data.tag.endsWith("-1"))).map((k=>k.ID)),B=X.t.getItemsWithFilter(Z.D.ASSET_TYPE_FRAME,(k=>Q.get(k,"data.tag")&&k.data.tag.endsWith("-1"))).map((k=>k.ID));this._items.get(Z.D.ASSET_TYPE_INTERIOR).push(...k),this._items.get(Z.D.ASSET_TYPE_FRAME).push(...B)}};J=(0,z.Cg)([(0,Y.injectable)()],J);var tt=U(25863),et=U(51477),it=U(59510);let st=class{get assets(){return this._assetsLoaded||(this._assetsLoaded=!0,this.addAssets()),this._assets}get backpack(){return G.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack}constructor(k,B,U){this._assetsLoaded=!1,this._assets=new Map,this._imageNames=new Map,this._itemProvider=B,this._breadcrumbManager=U}getBackpackItems(k,B){const U=this.backpack.getBackpackItemsByType(k);if(0===U.length)return[];let F=this.assets.get(k);return F&&0!==F.length?(B&&(F=F.filter((k=>k.data.tag&&k.data.tag.indexOf(`-${B}-`)>=0))),F=F.filter((k=>Q.find(U,(B=>B.ID===k.ID&&k.data.tag&&k.data.tag.indexOf("-bp-")<0)))),Q.sortBy(F,(k=>k.ID))):[]}getBackpackItem(k,B){const U=this.backpack.getBackpackItemsByType(k);return Q.find(U,(k=>k.ID===B))}getBackpackPageCount(k,B,U){const F=this.getBackpackItems(k,U);return F&&0!==F.length?Math.ceil(F.length/B):0}getPagedBackpackItems(k,B,U,F){const G=this.getBackpackItems(k,F);if(!G||0===G.length)return[];const j=B*U;return G.slice(j,j+U)}getItemDataAt(k,B,U,F){const G=this.assets.get(k),j=B*F+U;return j>=G.length?null:G[j].data}getItemData(k,B){const U=Q.find(this.assets.get(k),(k=>k.ID===B));return F.Aq$.isDefined(U)?U.data:null}getItemImageName(k,B,U){const G=`${k}-${B}${F.Aq$.isDefined(U)&&U?"-bp":""}`;let j=this._imageNames.get(G);if(j)return j;const $=Q.find(this.assets.get(k),(k=>k.ID===B));if(null==$?void 0:$.data){if(F.Aq$.isDefined(U)&&U){const k=$.data.tag.split("-"),B=k.shift(),U=k.shift();return k.unshift("bp"),k.unshift(U),k.unshift(B),j=k.join("-"),this._imageNames.set(G,j),j}return j=$.data.tag,this._imageNames.set(G,j),j}return null}getPage(k,B,U){const F=this.assets.get(k);if(!F||0===F.length)return[];const G=[],j=B*U,$=F.slice(j,j+U);return $.forEach((k=>G.push(k.data))),$}getPageCount(k,B){return this.assets.get(k).length>0?Math.ceil(this._assets.get(k).length/B):0}awardDefaultItems(k){const B=[];this._itemProvider.getItems(Z.D.ASSET_TYPE_FRAME).forEach((k=>B.push({type:Z.D.ASSET_TYPE_FRAME,ID:k})));const U=this._breadcrumbManager.isBreadcrumbComplete(it.M.DefaultFramesReceived),F=this._breadcrumbManager.isBreadcrumbComplete(it.M.DefaultItemsReceived);if(U)F?k():this.awardDefaultRooms(k);else{this._breadcrumbManager.completeBreadcrumb(it.M.DefaultFramesReceived);G.q.instance.prodigy.open.gotItem(B,this.awardDefaultRooms.bind(this,k)).setInputEnabled(!1)}}awardDefaultRooms(k){const B=[];this._itemProvider.getItems(Z.D.ASSET_TYPE_INTERIOR).forEach((k=>B.push({type:Z.D.ASSET_TYPE_INTERIOR,ID:k}))),this._breadcrumbManager.completeBreadcrumb(it.M.DefaultItemsReceived);G.q.instance.prodigy.open.gotItem(B,k).setInputEnabled(!1)}pushDefaultItems(){const k=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this._itemProvider.getItems(Z.D.ASSET_TYPE_INTERIOR).forEach((B=>{k.backpack.add(Z.D.ASSET_TYPE_INTERIOR,B)})),this._itemProvider.getItems(Z.D.ASSET_TYPE_FRAME).forEach((B=>{k.backpack.add(Z.D.ASSET_TYPE_FRAME,B)}))}hasDefaultItems(){const k=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=this._itemProvider.getItems(Z.D.ASSET_TYPE_FRAME).every((B=>k.backpack.hasItem(Z.D.ASSET_TYPE_FRAME,B)>0)),U=this._itemProvider.getItems(Z.D.ASSET_TYPE_INTERIOR).every((B=>k.backpack.hasItem(Z.D.ASSET_TYPE_INTERIOR,B)>0));return B&&U}isDefaultItem(k,B){return this._itemProvider.isDefaultItem(k,B)}removeDefaultItems(){const k=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this._itemProvider.getItems(Z.D.ASSET_TYPE_INTERIOR).forEach((B=>{k.backpack.consume(Z.D.ASSET_TYPE_INTERIOR,B)})),this._itemProvider.getItems(Z.D.ASSET_TYPE_FRAME).forEach((B=>{k.backpack.consume(Z.D.ASSET_TYPE_FRAME,B)}))}consume(k,B){return k!==Z.D.ASSET_TYPE_INTERIOR&&!this._itemProvider.isDefaultItem(k,B)&&(this.backpack.consume(k,B,1),!0)}addAssets(){const k={};this.addByType(Z.D.ASSET_TYPE_INTERIOR,k),this.addByType(Z.D.ASSET_TYPE_FRAME,k),this.addByType(Z.D.ASSET_TYPE_DECORATION,k),G.q.instance.prodigy.assets.assignAssets(k)}addByType(k,B){this._assets.set(k,[]);const U=X.t.getItemsWithFilter(k,(k=>!0));U&&U.length>0&&U.forEach((U=>{U.data.tag?B[U.data.tag]=U.metadata:B[U.data.name]=U.metadata,this._assets.get(k).push(U)}))}};st=(0,z.Cg)([(0,Y.injectable)(),(0,z.Qj)(0,(0,Y.inject)("51c-03a0")),(0,z.Qj)(1,(0,Y.inject)(j.G.DefaultItems)),(0,z.Qj)(2,(0,Y.inject)(j.G.BreadcrumbManager)),(0,z.Sn)("design:paramtypes",[et.n,J,K.Y])],st);class nt extends F.PQK{installBindings(){window.__pnp_safeBind(G.q.instance.prodigy.gameContainer,j.G.MathTower).to($.gT).asSingleton(),window.__pnp_safeBind(G.q.instance.prodigy.gameContainer,j.G.Storage).to(W.w).asSingleton(),window.__pnp_safeBind(G.q.instance.prodigy.gameContainer,j.G.StorageSerializer).to(q.Y).asSingleton(),window.__pnp_safeBind(G.q.instance.prodigy.gameContainer,j.G.StoreManager).to(st).asSingleton(),window.__pnp_safeBind(G.q.instance.prodigy.gameContainer,j.G.BreadcrumbManager).to(K.Y).asSingleton(),window.__pnp_safeBind(G.q.instance.prodigy.gameContainer,j.G.DefaultItems).to(J).asSingleton(),window.__pnp_safeBind(G.q.instance.prodigy.gameContainer,j.G.Education).to(H.V).asSingleton(),window.__pnp_safeBind(G.q.instance.prodigy.gameContainer,j.G.DialogueFactory).to(tt.Y),window.__pnp_safeBind(G.q.instance.prodigy.gameContainer,j.G.Events).to(V.s)}}},70399:(k,B,U)=>{"use strict";var F;U.d(B,{G:()=>F}),function(k){k.MathTower="MathTower",k.DefaultItems="DefaultItems",k.Storage="Storage",k.StorageSerializer="StorageSerializer",k.StoreManager="StoreManager",k.BreadcrumbManager="TowerTownBreadcrumbManager",k.Education="Education",k.DialogueFactory="DialogueFactory",k.Events="Events"}(F||(F={}))},64794:(k,B,U)=>{"use strict";U.d(B,{D:()=>z});var F=U(62459),G=U(99625),j=U(95946),$=U(88022),H=U(56942),V=U(36648),W=U(85855),q=U(51742),K=U(84317);class z{}z.FEATURE_NAME="FEATURE_TOWERTOWN",z.TOWER_TOWN_MAP="tower_town-A1",z.TOWER_TOWN_TUTORIAL_MAP="tower_town-A0",z.MAP_INFINITY_TOWER_CONSTRUCTION="towertown-default-1",z.CURRENCY_FIRE=21,z.CURRENCY_ICE=22,z.CURRENCY_PLANT=23,z.CURRENCY_WATER=24,z.CURRENCY_STORM=25,z.ATLAS_CORE=$._.General_core_json,z.ATLAS_CORE_2=$._.General_core_2_json,z.ATLAS_ICONS=$._.General_icons_json,z.ATLAS_MATH_TOWER=$._.Popup_member_modular_json,z.ATLAS_SWOOPY_FACE=$._.Npc_face_swoopy_json,z.ATLAS_SHARED=$._.Ui_shared_json,z.ATLAS_UI_TITAN=$._.Ui_titan_json,z.ATLAS_SHIPWRECK_PROGRESS=$._.Ui_shipwreck_progress_json,z.ATLAS_SHIVERCHILL_PROGRESS=$._.Ui_shiverchill_progress_json,z.ATLAS_BAM=$._.Ui_bam_json,z.ATLAS_BUTTONS=$._.Ui_buttons_json,z.ATLAS_DIALOGUES=$._.Ui_dialogues_json,z.ATLAS_STORE=$._.Ui_store_json,z.ATLAS_REGISTRATION=$._.Ui_registration_json,z.ATLAS_TOWERTOWN_MISC=$._.Ui_towertown_misc_json,z.ATLAS_TOWERTOWN=$._.Ui_towertown_json,z.ATLAS_UI_ICONS=$._.Ui_icons_json,z.ATLAS_PANELS=$._.Ui_panels_json,z.ATLAS_FLING_TARGETS=$._.Floatling_fling_json,z.ATLAS_RESEARCH_POINTS=$._.Ui_towertown_samples_json,z.ATLAS_FLAGS=$._.Ui_towertown_flags_json,z.ATLAS_TOPIC_ICONS=$._.Icon_topic_pixel_json,z.ATLAS_SWOOPY_FACE_FRAME_LAUGH="face_0",z.ATLAS_SWOOPY_FACE_FRAME_DEFAULT="face_1",z.ATLAS_SWOOPY_FACE_FRAME_THINK="face_2",z.SPINE_SHADOW_PORTAL=H.Q.Spine_shadowportal_json,z.SPINE_SMART_BLOCK_VFX=H.Q.Spine_smartblock_vfx_json,z.SPINE_FLOATING_FIRE_1=H.Q.Spine_npc_floatling_fire1_json,z.SPINE_FLOATING_ICE_1=H.Q.Spine_npc_floatling_ice1_json,z.SPINE_FLOATLING_PLANT_1=H.Q.Spine_npc_floatling_plant1_json,z.SPINE_FLOATLING_STORM_1=H.Q.Spine_npc_floatling_storm1_json,z.SPINE_LUMIN_TREE=H.Q.Spine_lumintree_json,z.SPINE_SWOOPY=H.Q.Spine_npc_swoopy_json,z.SPINE_FLING_SHIMMER=H.Q.Spine_floatlingfling_zoneshimmer_json,z.SPINE_STUBBORN_SHADOW=H.Q.Spine_stubbornshadow_json,z.SPINE_SHROUD_CLOUD=H.Q.Spine_shroud_json,z.SPINE_SHADOW_CLASH=H.Q.Spine_shadowclash_json,z.SPINE_FLAGPOLE=H.Q.Spine_smoke_flagmask_json,z.FLOATLING_FLING_BACKGROUND=V.q.Bg_floatling_fling,z.FLOATLING_FLING_RESEARCH_ICONS=V.q.Spot_samples,z.POPUP_NO_FLOATLINGS_ICON=V.q.Sleeping_floatlings_pop_up,z.POPUP_INFINITY_TOWER_CLOSE=V.q.Infinitytower_closed,z.POPUP_INFINITY_TOWER_OPEN=V.q.Infinitytower_open,z.POPUP_TOWER_TOWN_OPEN=V.q.Towertown_open,z.FRAME_LEFT_BAR="meter-fill-left-green",z.FRAME_RIGHT_BAR="meter-fill-right-green",z.FRAME_MIDDLE_BAR="meter-fill-mid-green",z.ASSET_ORANGE_FLAG_FRAME="skill-flag-g-ss",z.ASSET_BLUE_FLAG_FRAME="skill-flag-p-a",z.ASSET_RED_FLAG_FRAME="skill-flag-dm-p",z.ASSET_PURPLE_FLAG_FRAME="skill-flag-m",z.ASSET_TURQOISE_FLAG_FRAME="skill-flag-ns-n",z.UI_BUILD_COMPONENT_PREFAB=24,z.UI_ADD_FLOOR_PREFAB=G.l.AddFloor,z.UI_ARROW_HUD_PREFAB=G.l.CameraControlHUD,z.UI_CHOOSE_FLOOR_LOOK_PREFAB=G.l.ChooseFloorLook,z.UI_LARGE_LIST_ITEM_PREFAB=G.l.FloorListLargeItem,z.UI_SMALL_LIST_ITEM_PREFAB=G.l.FloorListSmallItem,z.UI_TOOLTIP_PREFAB=G.l.ToolTip,z.UI_SHROUD_LOCK_PREFAB=G.l.MathTowerShroudLock,z.UI_DECORATION_POINTS_PREFAB=G.l.FloorDecorationPlacer,z.UI_RESEARCH_POINTS_PANEL_PREFAB=G.l.FloatlingFlingResearchPointPanel,z.UI_CORNER_PREFAB=G.l.CornerQuit,z.UI_TOWER_TOWN_MALL_PREFAB=G.l.TowerTownMallInterface,z.UI_TOWER_TOWN_MALL_SHOP_PREFAB=G.l.TowerTownMallShopComponent,z.UI_TOWER_TOWN_MALL_SCROLLVIEW=G.l.TowerTownShopScrollView,z.UI_TOWER_TOWN_MALL_SCROLLBAR=G.l.TowerTownMallScrollBar,z.UI_TOWER_TOWN_MALL_HATSTORE_AD=G.l.HatStoreAdvertisement,z.UI_TUTORIAL_TAG=G.l.TutorialTag,z.UI_ROOFTOP_MASTERY=G.l.RooftopMastery,z.UI_MOVE_FLOOR=G.l.MoveFloor,z.UI_TOWER_TOWN_UPDATE=G.l.TowerTownUpdate,z.UI_QUICK_RENOVATION=G.l.QuickRenovationComponent,z.UI_INFINITY_TOWER_TOP_RIGHT_CONTAINER=G.l.InfinityTowerTopRightContainer,z.UI_CLOSED_RED_MESSAGE=G.l.ClosedRedRectangleMessage,z.UI_SMALL_WARNING_MESSAGE=G.l.SmallWarningMessage,z.UI_NEW_GRADE_PREFAB=G.l.NewTownPopup,z.POPUP_NO_FLOATLINGS_TITLE="FF_POPUP_NO_FLOATLING_TITLE",z.POPUP_NO_FLOATLINGS_BODY="FF_POPUP_NO_FLOATLING_BODY",z.POPUP_NO_FLOATLINGS_CONFIRM="BUTTON_OKAY_CAPITAL",z.POPUP_FLING_FINISH_TITLE="FF_POPUP_FINISH_TITLE",z.POPUP_FLING_FINISH_BODY="FF_POPUP_FINISH_BODY",z.POPUP_FLING_FINISH_BUTTON="BUTTON_OKAY_CAPITAL",z.POPUP_FLING_COLLECT_TITLE="FF_POPUP_COLLECT_TITLE",z.POPUP_FLING_COLLECT_BODY="FF_POPUP_COLLECT_BODY",z.FLING_CLICK_AND_DRAG="FF_CLICK_AND_DRAG",z.TOOLTIP_FLOOR_FINISHED="TT_TOOLTIP_FLOOR_COMPLETE",z.HEADER_MOVE_FLOOR="TT_MOVE_FLOOR_HEADER",z.WARNING_TOP_FORWARD="TT_MOVE_FLOOR_TOP_ONLY_FORWARD",z.WARNING_BOTTOM_BACK="TT_MOVE_FLOOR_BOTTOM_ONLY_BACK",z.MOVE_FLOOR_MINIMUM_WARNING="TT_MOVE_FLOOR_MINIMUM_WARNING",z.MOVE_FLOOR_TOP_BOTTOM="TT_MOVE_FLOOR_TOP_BOTTOM_ONLY",z.MOVE_FLOOR_PREV_TALL="TT_MOVE_FLOOR_PREV_TALL",z.MOVE_FLOOR_NEXT_TALL="TT_MOVE_FLOOR_NEXT_TALL",z.MOVE_FLOOR_FIRST="TT_MOVE_FIRST_FLOOR",z.POPUP_FLING_QUIT_CONFIRM="BUTTON_QUIT_CAPITAL",z.POPUP_FLING_QUIT_DECLINE="BUTTON_STAY_TEAM",z.POPUP_FLING_QUIT_TITLE="BUTTON_QUIT_QUESTION",z.POPUP_FLING_QUIT_BODY="FF_QUIT_BODY",z.TT_ROOMMATES="TT_ROOMMATES",z.TT_BLOCKED_FLOOR="TT_MOVE_FLOOR_BLOCKED",z.POPUP_STUBBORN_SHADOW_QUIT_BODY="TT_STUBBORN_SHADOW_QUIT_BODY",z.POPUP_STUBBORN_SHADOW_QUIT_TITLE="BUTTON_QUIT_QUESTION",z.POPUP_STUBBORN_SHADOW_QUIT_BUTTON="BUTTON_QUIT_CAPITAL",z.POPUP_STUBBORN_SHADOW_STAY_BUTTON="BUTTON_STAY_TEAM",z.POPUP_SHROUD_QUIT_BODY="TT_SHROUD_QUIT_CONFIRM_BODY",z.POPUP_SHROUD_QUIT_TITLE="BUTTON_QUIT_QUESTION",z.POPUP_SHROUD_QUIT_BUTTON="BUTTON_QUIT_CAPITAL",z.POPUP_SHROUD_STAY_BUTTON="BUTTON_STAY_TEAM",z.POPUP_CHOOSE_FLOOR_QUIT_BUTTON="BUTTON_QUIT_CAPITAL",z.POPUP_CHOOSE_FLOOR_STAY_BUTTON="BUTTON_STAY_TEAM",z.POPUP_CHOOSE_FLOOR_QUIT_TITLE="BUTTON_QUIT_QUESTION",z.POPUP_CHOOSE_FLOOR_QUIT_BODY="TT_CHOOSE_FLOOR_QUIT_BODY",z.TT_TOWER_WORK_DONE="TT_TOWER_WORK_DONE",z.TT_START_BUILDING="TT_START_BUILDING",z.TT_TOWER_TOWN_OPEN="TT_TOWER_TOWN_OPEN",z.TT_INFINITY_TOWER_OPEN_BODY="TT_INFINITY_TOWER_OPEN_BODY",z.TT_INFINITY_TOWER_OPEN="TT_INFINITY_TOWER_OPEN",z.TT_FINISH_TOWER_FIRST="TT_FINISH_TOWER_FIRST",z.TT_FINISH_TOWER_ON_ADD="TT_FINISH_TOWER_ON_ADD",z.TT_TOWER_CLOSED_LINKTXT="TT_TOWER_CLOSED_LINKTXT",z.TT_TOWER_CLOSED_FOOTER="TT_TOWER_CLOSED_FOOTER",z.TT_TOWER_CLOSED_BODY="TT_TOWER_CLOSED_BODY",z.TT_INFINITY_TOWER_CLOSED="TT_INFINITY_TOWER_CLOSED",z.TT_TOWER_CLOSED_LINK="TT_TOWER_CLOSED_LINK",z.TT_STORE_TOO_MANY_ITEMS="STORE_TOOLTIP_MESSAGE_2",z.TT_STORE_ALREADY_OWNED="STORE_TOOLTIP_MESSAGE_5",z.TT_STORE_ITEM_LOCKED="STORE_TOOLTIP_MESSAGE_6",z.TT_STORE_ITEM_BUY_LOCKED="STORE_TOOLTIP_MESSAGE_4",z.TT_STORE_YOU_NEED_MORE="STORE_TOOLTIP_MESSAGE_3",z.TT_STORE_ITEM_LOCKED_HEADER="STORE_TOOLTIP_HEADER_4",z.TT_STORE_NOT_ENOUGH_HEADER="STORE_TOOLTIP_HEADER_3",z.TT_UPDATE_SHROUDS_CLEARED="TT_UPDATE_SHROUDS_CLEARED",z.TT_UPDATE_BLOCKS_BUILT="TT_UPDATE_BLOCKS_BUILT",z.TT_UPDATE_FLOORS_MADE="TT_UPDATE_FLOORS_MADE",z.POPUP_TOWER_TOWN_REDIRECT="TOWER_TOWN_REDIRECT",z.POPUP_TOWER_TOWN_GO_TO="TOWER_TOWN_GO_POPUP",z.POPUP_TOWER_TOWN_GO_TO_BUTTON="TOWER_TOWN_GO_BUTTON",z.POPUP_NEW_TOWN_BUTTON="NEW_TOWN_POPUP_BUTTON",z.POPUP_NEW_TOWN_TITLE="NEW_TOWN_POPUP_TITLE",z.POPUP_NEW_TOWN_BODY="NEW_TOWN_POPUP_BODY",z.ASSET_TYPE_DECORATION="mathTownDecor",z.ASSET_TYPE_FRAME="mathTownFrame",z.ASSET_TYPE_INTERIOR="mathTownInterior",z.ASSET_TYPE_STREET_FURNITURE="mathTowerOrnament",z.BASE_MENU_ASSET_ID=74,z.PUPPETMASTER_BGM=W.V.Bgm_puppetmaster,z.TOWER_TOWN_BGM=W.V.Bgm_towertown,z.FLOATLING_FLING_BGM=W.V.Bgm_floatlingfling,z.PUPPETMASTER_BGM_ID=12,z.TOWER_TOWN_BGM_ID=27,z.FLOATLING_FLING_BGM_ID=28,z.SHADOW_PORTAL_OPEN=q.c.Sfx_academy_portal_open,z.SHADOW_PORTAL_CLOSE=q.c.Sfx_academy_portal_close,z.TOWER_TOWN_SFX=q.c.Sfx_tower_town,z.FLOATLING_FLING_SFX=q.c.Sfx_floatling_fling,z.TAB_CLICK_SFX=q.c.Sfx_tab_click,z.SHADOW_PORTAL_OPEN_ID=34,z.SHADOW_PORTAL_CLOSE_ID=35,z.TOWER_TOWN_SFX_ID=48,z.FLOATLING_FLING_SFX_ID=47,z.BUTTON_CLICK_SFX_ID=18,z.TAB_CLICK_SFX_ID=50,z.LAND_FLOATLING="landaFloatling",z.LAUNCH_FLOATLING="launchaFloatling",z.CLEAR_SHROUD="clearaShroud",z.COMPLETE_FLOOR="completeaFloor",z.STUBBORN_SHADOW_DEFEAT="defeataStubbornShadow",z.STUBBORN_SHADOW_DEFEND="StubbornShadowDefend",z.STUBBORN_SHADOW_DROP="droppingaStubbornShadow",z.DROP_BLOCK="droppingaBlock",z.BUTTON_CLICK="pop",z.TAB_CLICK="pop",z.FLAG_SMOKE_ANIMATION="spine-smoke-flagmask",z.PORTAL_APPEAR_ANIMATION="appear",z.PORTAL_IDLE_ANIMATION="idle",z.PORTAL_DISAPPEAR_ANIMATION="disappear2",z.STUBBORN_SHADOW_APPEAR_ANIMATION="appear",z.STUBBORN_SHADOW_IDLE_ANIMATION="idle",z.STUBBORN_SHADOW_DEFEND_ANIMATION="defend",z.STUBBORN_SHADOW_SUSTAIN_ANIMATION="sustain",z.STUBBORN_SHADOW_DEATH_ANIMATION="die",z.BEAM_TRAVEL_ANIMATION="beam-travel",z.BEAM_END_ANIMATION="beam-end",z.SHADOW_BEAM_TRAVEL_ANIMATION="beam-travel-shadow",z.SHADOW_BEAM_END_ANIMATION="beam-end-shadow",z.SPELL_SUMMON_ANIMATION="summon-create",z.SPELL_TRAVEL_ANIMATION="summon-travel",z.SPELL_END_ANIMATION="summon-end",z.SPELL_CLASH_ANIMATION="cap-clash",z.SPELL_CLASH_END_ANIMATION="cap-end",z.SHADOW_PORTAL_ANIMATION_APPEAR="appear",z.SHADOW_PORTAL_ANIMATION_IDLE="idle",z.SHADOW_PORTAL_ANIMATION_DISAPPEAR="disappear2",z.STUBBORN_SHADOW_ANIMATION_APPEAR="appear",z.STUBBORN_SHADOW_ANIMATION_IDLE="idle",z.TOWN_BG_COLOR=8703726,z.TUTORIAL_BG_COLOR=1585480,z.DEFAULT_EDUCATION_GRADE=1,z.DEFAULT_ITEM_COUNT=10,z.ADD_FLOOR_BUTTON_OFFSET=45,z.BLOCK_FALL_DURATION_SECONDS=.2,z.BLOCK_FALL_HEIGHT=250,z.BLOCK_OFFSET_X=34,z.BLOCK_OFFSET_Y=54,z.CAMERA_Y_OFFSET=298,z.CAMERA_Y_OFFSET_QUICK_RENO=268,z.CAMERA_X_OFFSET=-500,z.PLAYER_CAMERA_OFFSET_X=180,z.PLAYER_CAMERA_OFFSET_Y=680,z.PLAYER_FLING_OFFSET_X=100,z.PLAYER_FLING_OFFSET_Y=500,z.SWOOPY_OFFSET_X=-25,z.SWOOPY_OFFSET_Y=-90,z.FLOOR_HEIGHT=134,z.FLOOR_WIDTH=416,z.FLOOR_TUTORIAL_OFFSET=320,z.GAME_CHALLENGE_SCENARIO_ID=10001,z.MAX_SMART_BLOCKS=10,z.TUTORIAL_SMART_BLOCKS=5,z.RENDERER_JUMP_PERCENTAGE=.5,z.RENDERER_OFFSET_PERCENTAGE=.25,z.RENDERER_OFFSET_PERCENTAGE_INFINITY_TOWER=.5,z.TOWER_BASE_Y=450,z.PLAYER_BASE_Y=450,z.UI_BUILD_INTERFACE_X=250,z.UI_BUILD_INTERFACE_Y=250,z.UI_BUILD_INTERFACE_X_OFFSET=20,z.MAX_DECORATION_SLOTS=5,z.FRAME_HEIGHT=196,z.FRAME_WIDTH=416,z.FRAME_HALF_WIDTH=208,z.IN_PROGRESS_PREFAB_X_OFFSET=-169,z.IN_PROGRESS_PREFAB_Y_OFFSET=-19,z.FLOOR_LOOK_PREFAB_X_OFFSET=-200,z.FLOOR_LOOK_PREFAB_Y_OFFSET=-120,z.BLOCK_APPEAR_TIMESCALE=2.5,z.BLOCK_FALL_TIMESCALE=1.5,z.BLOCK_FALL_MULTIPLE_DELAY=300,z.BLOCK_FALL_SHAKE_DISTANCE=20,z.BLOCK_FALL_SHAKE_IN_TIME=50,z.BLOCK_FALL_SHAKE_OUT_TIME=200,z.BLOCK_FALL_SHAKE_ANIMATION_DELAY=230,z.MS_DAY=864e5,z.TOOLTIP_SLIDE_DURATION=500,z.TOOLTIP_WIDTH=380,z.TOOLTIP_STAY_DURATION=3e3,z.TOOLTIP_OFFSET_X=125,z.MOVE_HEADER_WIDTH=340,z.STUBBORN_SHADOW_OFFSET_X=140,z.STUBBORN_SHADOW_OFFSET_Y=-90,z.STUBBORN_SHADOW_PLAYER_OFFSET_X=-350,z.STUBBORN_SHADOW_PLAYER_OFFSET_Y=0,z.SHADOW_PORTAL_OFFSET=new F.I9Y(0,-250),z.SPELL_CLASH_START_OFFSET=-400,z.SPELL_CLASH_END_OFFSET=-40,z.SPELL_CLASH_X_OFFSET=20,z.SPELL_CLASH_Y_OFFSET=30,z.SPELL_CLASH_SCALE=.7,z.SPELL_MASK_FILL=0,z.SPELL_MASK_SKIN_WIDTH=60,z.SPELL_MASK_HEIGHT=200,z.SPELL_MASK_OFFSET_Y=100,z.BEAM_SCALE_X=.9,z.BUTTON_FLASH_DURATION_MS=150,z.LUMIN_TREE_OFFSET_Y=40,z.MOVE_FLOOR_BUTTON_OFFSET_X=200,z.MOVE_FLOOR_WARNING_OFFSET_X=-175,z.MOVE_FLOOR_WARNING_OFFSET_Y=-110,z.WARNING_ARROW_OFFSET_X=20,z.WARNING_ARROW_OFFSET_Y=-7,z.FLOOR_FINISHED_TOOLTIP_WIDTH=350,z.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_X=120,z.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_Y=90,z.FLAG_VISIBILITY_DELAY_MS=200,z.STUBBORN_SHADOW_BOUNDS_OFFSET_X=300,z.STUBBORN_SHADOW_CAMERA_OFFSET_X=600,z.NO_SKILL_FLAG_ICON_ID=-1,z.TOWER_RENDERER_CAMERA_HEIGHT=8,z.PUPPET_MASTER_PORTAL_OFFSET_X=-50,z.PUPPET_MASTER_TWEEN_TO_PORTAL_DELAY_MS=1200,z.BUTTON_DEBOUNCE_TIME=300,z.CHARACTER_TWEEN_DELAY_MS=200,z.SCRIM_ALPHA=.6,z.SCRIM_SCALE_X=20,z.SCRIM_SCALE_Y=40,z.SCRIM_OFFSET_X_IN_SCREENS=3,z.SCRIM_OFFSET_Y_IN_SCREENS=10,z.NEW_TOWN_POPUP_SIZE=300,z.FLOATLING_WALK_AREA=new F.M_G(-250,50,500,200),z.FLOATLING_WALK_PIXELS_PER_SECOND=70,z.FLOATLING_WALK_MIN_IDLE_MS=3e3,z.FLOATLING_WALK_MAX_IDLE_MS=1e4,z.FLOATLING_IMMEDIATE_WALK_RATIO=.2,z.FLOATLING_FLOOR_X_OFFSET=50,z.FLOATLING_FLOOR_Y_OFFSET=-35,z.FLOATLING_MAX_COUNT_DISPLAYED=8,z.FLOATLING_FLOAT_MIN_START_Y_OFFSET=-700,z.FLOATLING_FLOAT_MAX_START_Y_OFFSET=-500,z.FLOATLING_FLOAT_HALF_ARC_WIDTH=50,z.FLOATLING_FLOAT_MIN_DELAY_MS=0,z.FLOATLING_FLOAT_MAX_DELAY_MS=400,z.FLOATLING_FLOAT_LAST_FLOATED_OFFSET_MS=600,z.FLOATLING_FLOAT_PIXELS_PER_SECOND=60,z.FLOATLING_FLY_AWAY_MS=1700,z.BUTTON_OFFSET_X=65,z.BUTTON_OFFSET_Y=34,z.SHROUD_OFFSET_Y=30,z.SHROUD_CLEAN_SPELLS=20,z.THETA_MAXIMUM=3,z.THETA_MINIMUM=-3,z.TUTORIAL_GRADE=-1,z.DIALOGUE_SHROUD_FTUE_1=914,z.DIALOGUE_SHROUD_FTUE_2=915,z.DIALOGUE_SHROUD_FTUE_3=916,z.DIALOGUE_SHROUD_FTUE_4=917,z.DIALOGUE_SHROUD_FTUE_POST_ENDGAME_1=1455,z.DIALOGUE_START_CLICKING_BUTTON=920,z.DIALOGUE_CHOOSE_THE_LOOK=921,z.DIALOGUE_CAST_SPELLS_FOR_BLOCKS=922,z.DIALOGUE_SPEED_UP_BLOCK_NUMBERS=923,z.DIALOGUE_FORCE_CORRECT_ANSWER=924,z.DIALOGUE_ALL_DONE=925,z.DIALOGUE_RETURNING_FLOATLINGS=926,z.DIALOGUE_GATHERED_KNOWLEDGE=927,z.DIALOGUE_LETS_GET_TO_WORK=928,z.DIALOGUE_THANK_GOODNESS=945,z.DIALOGUE_LUMIN_TREE=946,z.DIALOGUE_SHOW_YOU=947,z.DIALOGUE_BUILDING_BASICS=952,z.DIALOGUE_FLOATLING_TYPES=953,z.DIALOGUE_WEAKENED_PUPPETMASTER=954,z.FLING_FTUE_MISSED=959,z.FLING_FTUE_POST_FLING=939,z.FLING_FTUE_INTRO_DIALOGUES=[937,949,938,950,951],z.FLING_FTUE_OUTRO_DIALOGUES=[969,970],z.STORE_FTUE_OUTRO_DIALOGUE=[971,972,973],z.DIALOGUE_WELCOME_BACK=960,z.DIALOGUE_STUBBORN_SHADOW_FTUE_1=929,z.DIALOGUE_STUBBORN_SHADOW_FTUE_2=956,z.DIALOGUE_STUBBORN_SHADOW_FTUE_3=930,z.DIALOGUE_STUBBORN_SHADOW_FTUE_4=931,z.DIALOGUE_STUBBORN_SHADOW_FTUE_5=933,z.DIALOGUE_STUBBORN_SHADOW_FTUE_6=957,z.DIALOGUE_STUBBORN_SHADOW_FTUE_7=974,z.DIALOGUE_STUBBORN_SHADOW_FTUE_8=935,z.DIALOGUE_STUBBORN_SHADOW_FTUE_9=958,z.DIALOGUE_STUBBORN_SHADOW_POST_ENDGAME_FTUE_1=1456,z.DIALOGUE_STUBBORN_SHADOW_POST_ENDGAME_FTUE_2=1457,z.DIALOGUE_STUBBORN_SHADOW_DUEL_CHOICE=934,z.FLAG_ORANGE_SKILL_IDS=[1,2,8,42,46,47],z.FLAG_BLUE_SKILL_IDS=[28,29,30,41,45,50,54,73,84],z.FLAG_RED_SKILL_IDS=[14,60,75],z.FLAG_PURPLE_SKILL_IDS=[9,48,49,62,81,82],z.STORE_PLANT=40,z.STORE_FIRE=41,z.STORE_ICE=42,z.STORE_WATER=43,z.STORE_STORM=44,z.STORE_HAT=-1,z.ZONE_CURRENCY_IDS=[13,15,16,12,14],z.ZONE_CURRENCY_PAYOUT=10,z.SHROUD_CORRECT_PAYOUT=1,z.ROOFTOP_CORRECT_PAYOUT=1,z.FIRE_RESEARCH_CURRENCY=21,z.ICE_RESEARCH_CURRENCY=22,z.PLANT_RESEARCH_CURRENCY=23,z.WATER_RESEARCH_CURRENCY=24,z.STORM_RESEARCH_CURRENCY=25,z.FLING_PIP_SPREAD=.07,z.FLING_PIP_COUNT=12,z.FLING_GRAVITY=98,z.FLING_GRAVITY_POWER=3,z.FLING_FIRE_POWER_MULTIPLIER=2,z.FLING_FIRE_POWER_MAX=600,z.FLING_MIN_DRAG_DISTANCE=50,z.FLING_CAMERA_TWEEN_IN_MS=1e3,z.FLING_CAMERA_TWEEN_OUT_MS=3e3,z.FLING_CAMERA_LEAVE_DELAY_MS=1e3,z.FLING_PLAYER_DELAY_OFFSET_MS=100,z.FLING_MAX_COUNT_DISPLAYED=10,z.FLING_WAITING_SPAWN_OFFSET=400,z.FLING_WAITING_SPAWN_TWEEN_MS=2e3,z.FLING_WAITING_SHARED_OFFSET=100,z.FLING_WAITING_INDIVIDUAL_OFFSET=25,z.FLING_WAITING_MIN_X=-180,z.FLING_WAITING_MAX_X=-100,z.FLING_FTUE_POINTS_PER_SHOT=140,z.FLING_FTUE_INTRO_DIALOGUE_Y_OFFSET=120,z.FLING_FTUE_FLOATLING_COUNT=2,z.FLING_SCORE_MANAGER_X=532,z.FLING_SCORE_MANAGER_Y=32,z.SPACE_16PX=16,z.STATE_BUILD="build",z.STATE_CAMERA="camera",z.STATE_CHOOSE_FLOOR="chooseFloor",z.STATE_START="start",z.STATE_SHROUD="shroud",z.STATE_ROOFTOP="rooftop",z.STATE_MOVE="move",z.STATE_FLING="fling",z.STATE_INFINITY="infinity",z.STATE_INFINITY_CHOOSE_FLOOR="infinityChooseFloor",z.STATE_INFINITY_BUILD="infinityBuild",z.STATE_QUICK_RENO="quickReno",z.STATE_TUTORIAL_START="tutorialStart",z.STATE_TUTORIAL_BUILD="tutorialBuild",z.STATE_TUTORIAL_CHOOSE_FLOOR="tutorialFloor",z.STATE_TUTORIAL_END="tutorialEnd",z.TUTORIAL_CUTSCENE="tower_town-intro",z.MESSAGE_DISABLE_NAVIGATION="tt-navigation-disable",z.MESSAGE_ENABLE_NAVIGATION="tt-navigation-enable",z.MESSAGE_DISABLE_FLING_BUTTON="tt-fling-button-disable",z.MESSAGE_ENABLE_FLING_BUTTON="tt-fling-button-enable",z.MESSAGE_ENABLE_BUTTON="tt-enable-button",z.MESSAGE_DISABLE_BUTTON="tt-disable-button",z.ELEMENT_STRINGS=[j.a.Plant,j.a.Ice,j.a.Storm,j.a.Fire,j.a.Water],z.FLING_CURRENCY_ORDER=[z.CURRENCY_PLANT,z.CURRENCY_ICE,z.CURRENCY_STORM,z.CURRENCY_FIRE,z.CURRENCY_WATER],z.MAX_FLOATLING_LEVELS=5,z.POINTER_BOUNCE_MS=750,z.DECORATION_PREFAB_HEIGHT=46,z.DECORATION_FLOOR_OFFSET=20,z.DECORATION_OFFSETS=[new F.I9Y(-z.FRAME_WIDTH/2,-z.FRAME_HEIGHT/2+z.DECORATION_PREFAB_HEIGHT/2-z.DECORATION_FLOOR_OFFSET),new F.I9Y(-z.FRAME_WIDTH/2,-z.FRAME_HEIGHT+z.DECORATION_PREFAB_HEIGHT),new F.I9Y(0,-z.FRAME_HEIGHT+z.DECORATION_PREFAB_HEIGHT),new F.I9Y(z.FRAME_WIDTH/2,-z.FRAME_HEIGHT+z.DECORATION_PREFAB_HEIGHT),new F.I9Y(z.FRAME_WIDTH/2,-z.FRAME_HEIGHT/2+z.DECORATION_PREFAB_HEIGHT/2-z.DECORATION_FLOOR_OFFSET)],z.DEFAULT_FLOOR_ROOM_ID=1,z.DEFAULT_FLOOR_FRAME_ID=2,z.TILESET_CLOUD=K.t.Tileset_cloud_png,z.TILESET_CLOUD_NEW=K.t.Tileset_cloud_new_png,z.TILESET_COLLISIONS=K.t.Tileset_collisions_png,z.TILESET_FOREST_NEW=K.t.Tileset_forest_new_png,z.TILESET_GENERIC=K.t.Tileset_generic_png,z.TILESET_GENERIC_NEW=K.t.Tileset_generic_new_png,z.TILESET_MATH_TOWER_BASIC="tileset-math-tower-basic",z.TILESET_TUTORIAL_SUBSPACE=K.t.Tileset_tutorial_subspace_png,z.TILESET_INFINITY_TOWER_CONSTRUCTION=K.t.Tileset_infinity_tower_construction_png,z.TILESET_OUTSIDE=K.t.Tileset_outside_png,z.TILESET_TOWERTOWN_BASIC=K.t.Tileset_towertown_basic_png,z.TILESET_TOWN_NEW=K.t.Tileset_town_new_png},90736:(k,B,U)=>{"use strict";var F;U.d(B,{L:()=>F}),function(k){k[k.BREADCRUMB=0]="BREADCRUMB",k[k.FLOOR_AWARD_FLOATLINGS=1]="FLOOR_AWARD_FLOATLINGS",k[k.FLOOR_PUSH_FLOATLING=2]="FLOOR_PUSH_FLOATLING",k[k.FLOOR_SET_BLOCK_COUNT=3]="FLOOR_SET_BLOCK_COUNT",k[k.FLOOR_SET_DECORATION_POSITIONS=4]="FLOOR_SET_DECORATION_POSITIONS",k[k.FLOOR_SET_DECORATIONS=5]="FLOOR_SET_DECORATIONS",k[k.FLOOR_SET_EXTERNAL_BUILD=6]="FLOOR_SET_EXTERNAL_BUILD",k[k.FLOOR_SET_FRAME_ID=7]="FLOOR_SET_FRAME_ID",k[k.FLOOR_SET_HAS_SHROUD=8]="FLOOR_SET_HAS_SHROUD",k[k.FLOOR_SET_NUM_SPELLS=9]="FLOOR_SET_NUM_SPELLS",k[k.FLOOR_SET_ROOM_ID=10]="FLOOR_SET_ROOM_ID",k[k.FLOOR_SET_SKILL_ID=11]="FLOOR_SET_SKILL_ID",k[k.FLOOR_SET_STATE=12]="FLOOR_SET_STATE",k[k.FLOOR_START_BUILDING=13]="FLOOR_START_BUILDING",k[k.TOWER_CREATE_FLOOR=14]="TOWER_CREATE_FLOOR",k[k.TOWER_MOVE_FLOOR=15]="TOWER_MOVE_FLOOR",k[k.TOWER_PUSH_FLOOR=16]="TOWER_PUSH_FLOOR",k[k.TOWER_REMOVE_FLOOR=17]="TOWER_REMOVE_FLOOR",k[k.TOWER_ROOM_BUILT=18]="TOWER_ROOM_BUILT",k[k.TOWER_COMPLETED=19]="TOWER_COMPLETED",k[k.TOWER_SET_ACTIVE_TOWER=20]="TOWER_SET_ACTIVE_TOWER",k[k.TOWER_SET_INFINITY_TOWER=21]="TOWER_SET_INFINITY_TOWER",k[k.TOWER_SET_SIDEWALK_ID=22]="TOWER_SET_SIDEWALK_ID",k[k.TOWN_CREATE_INFINITY_TOWER=23]="TOWN_CREATE_INFINITY_TOWER",k[k.TOWN_CREATE_TOWER=24]="TOWN_CREATE_TOWER",k[k.TOWN_PUSH_TOWER=25]="TOWN_PUSH_TOWER",k[k.TOWN_REMOVE_TOWER=26]="TOWN_REMOVE_TOWER",k[k.TOWN_FIND_DESCENDED_FLOATLINGS_TOWER=27]="TOWN_FIND_DESCENDED_FLOATLINGS_TOWER",k[k.FLOATLING_SET_ELEMENT=28]="FLOATLING_SET_ELEMENT",k[k.FLOATLING_SET_EXPLORER_LEVEL=29]="FLOATLING_SET_EXPLORER_LEVEL",k[k.FLOATLING_SET_FLOOR_ASSOCIATION=30]="FLOATLING_SET_FLOOR_ASSOCIATION",k[k.FLOATLING_SET_GEAR_ELEMENT=31]="FLOATLING_SET_GEAR_ELEMENT",k[k.FLOATLING_SET_LAST_THROWN=32]="FLOATLING_SET_LAST_THROWN",k[k.FLOATLING_SET_PERSONALITY=33]="FLOATLING_SET_PERSONALITY",k[k.FLOATLING_SET_STATE=34]="FLOATLING_SET_STATE",k[k.TOWER_TOWN_FLOATLING_FLING_END=35]="TOWER_TOWN_FLOATLING_FLING_END",k[k.TOWER_TOWN_FLOATLING_FLING_START=36]="TOWER_TOWN_FLOATLING_FLING_START",k[k.TOWER_TOWN_INFINITY_TOWER_OPEN=37]="TOWER_TOWN_INFINITY_TOWER_OPEN",k[k.TOWER_TOWN_QUESTION_ANSWERED=38]="TOWER_TOWN_QUESTION_ANSWERED",k[k.TOWER_TOWN_SAVE_TOWN=39]="TOWER_TOWN_SAVE_TOWN",k[k.TOWER_TOWN_SET_CURRENT_TOWN=40]="TOWER_TOWN_SET_CURRENT_TOWN",k[k.TOWER_TOWN_SETTINGS_OPEN=41]="TOWER_TOWN_SETTINGS_OPEN",k[k.TOWER_TOWN_STORE_OPEN=42]="TOWER_TOWN_STORE_OPEN",k[k.EDUCATION_QUESTION_ANSWER=43]="EDUCATION_QUESTION_ANSWER",k[k.EDUCATION_QUESTION_ANSWER_CORRECT=44]="EDUCATION_QUESTION_ANSWER_CORRECT",k[k.EDUCATION_QUESTION_ANSWER_INCORRECT=45]="EDUCATION_QUESTION_ANSWER_INCORRECT",k[k.EDUCATION_QUESTION_INTERFACE_CLOSE=46]="EDUCATION_QUESTION_INTERFACE_CLOSE",k[k.EDUCATION_QUESTION_INTERFACE_OPEN=47]="EDUCATION_QUESTION_INTERFACE_OPEN",k[k.EDUCATION_SET_ALGORITHM=48]="EDUCATION_SET_ALGORITHM",k[k.EDUCATION_SKILL_LOCKED=49]="EDUCATION_SKILL_LOCKED",k[k.EDUCATION_SKILL_MASTERED=50]="EDUCATION_SKILL_MASTERED",k[k.EDUCATION_SKILL_UNLOCKED=51]="EDUCATION_SKILL_UNLOCKED"}(F||(F={}))},58604:(k,B,U)=>{"use strict";U.d(B,{R:()=>$});var F=U(90736);class G{get assetID(){return this._assetID}set assetID(k){this._assetID=k}}var j=U(80070);class $ extends j.v{constructor(){super(...arguments),this._decorations=new Map}get count(){return this._decorations.size}get keys(){return Array.from(this._decorations.keys())}removeAt(k){return!!this._decorations.has(k)&&(this._decorations.delete(k),this.notifyUpdate(F.L.FLOOR_SET_DECORATIONS),!0)}getAt(k){return this._decorations.has(k)?this._decorations.get(k):null}clear(){this._decorations.clear(),this.notifyUpdate(F.L.FLOOR_SET_DECORATIONS)}setAt(k,B){const U=new G;U.assetID=B,this._decorations.set(k,U),this.notifyUpdate(F.L.FLOOR_SET_DECORATIONS)}flush(){const k=this.keys.map((k=>this.getAt(k))).filter((k=>null!==k));return this.clear(),k}}},96417:(k,B,U)=>{"use strict";U.d(B,{b:()=>q,a:()=>V});var F,G=U(95946),j=U(64794),$=U(90736),H=U(81670);!function(k){k[k.Stubborn=0]="Stubborn",k[k.Shy=1]="Shy",k[k.Socialite=2]="Socialite",k[k.ChillDude=3]="ChillDude"}(F||(F={}));var V,W=U(80070);!function(k){k[k.Wandering=0]="Wandering",k[k.Awake=1]="Awake",k[k.Asleep=2]="Asleep",k[k.Floating=3]="Floating",k[k.ScaredAway=4]="ScaredAway"}(V||(V={}));class q extends W.v{constructor(){super(...arguments),this._state=V.Asleep,this._gearElement=0,this._explorerLevel=0,this._lastThrown=0,this._floor=null,this._personality=F.ChillDude,this._element=G.a.Fire}get state(){return this._state}set state(k){this._state!==k&&(this._state=k,this.notifyUpdate($.L.FLOATLING_SET_STATE))}get gearElement(){return this._gearElement}set gearElement(k){this._gearElement=k,this.notifyUpdate($.L.FLOATLING_SET_GEAR_ELEMENT)}get explorerLevel(){return this._explorerLevel}set explorerLevel(k){this._explorerLevel=k,this.notifyUpdate($.L.FLOATLING_SET_EXPLORER_LEVEL)}get lastThrown(){return this._lastThrown}set lastThrown(k){this._lastThrown=k,this.updateState(),this.notifyUpdate($.L.FLOATLING_SET_LAST_THROWN)}get floor(){return this._floor}set floor(k){this._floor=k,this.notifyUpdate($.L.FLOATLING_SET_FLOOR_ASSOCIATION)}get element(){return this._element}set element(k){this._element=k,this.notifyUpdate($.L.FLOATLING_SET_ELEMENT)}get personality(){return this._personality}set personality(k){this._personality=k,this.notifyUpdate($.L.FLOATLING_SET_PERSONALITY)}get spineID(){return`spine-${H.s.getFloatlingAssetID(this.element,this.explorerLevel)}`}get researchPointID(){return`researchpoint-sm-${this.element}`}updateState(){this.state!==V.Floating&&this.state!==V.ScaredAway&&(this.lastThrown<=Date.now()-j.D.MS_DAY?this.state!==V.Wandering&&(this.state=V.Awake):this.state=V.Asleep)}static organizeFloatlings(k){const B=new Map;return j.D.ELEMENT_STRINGS.forEach((k=>{B.set(k,[])})),k.forEach((k=>{let U=!1;for(let F=0;FB.get(k.element)[F].explorerLevel){B.get(k.element).splice(F,0,k),U=!0;break}U||B.get(k.element).push(k)})),B}}},9439:(k,B,U)=>{"use strict";U.d(B,{Z:()=>X});var F=U(62459),G=U(95891),j=U(35120),$=U(76945),H=U(70399),V=U(64794),W=U(90736),q=U(15678),K=U(58604),z=U(96417),Y=U(39666),Q=U(80070);class X extends Q.v{get hasShroud(){return this._hasShroud}get isComplete(){return this.state===Y.u.Complete}get isPreConstruction(){return this.state===Y.u.ChooseLook}get roomID(){return this._roomID}set roomID(k){this._roomID=k,this.notifyUpdate(W.L.FLOOR_SET_ROOM_ID)}get skillID(){return this._skillID}set skillID(k){this._skillID=k,this.notifyUpdate(W.L.FLOOR_SET_SKILL_ID)}get frameID(){return this._frameID}set frameID(k){this._frameID=k,this.notifyUpdate(W.L.FLOOR_SET_FRAME_ID)}get blockCount(){return this._blockCount}set blockCount(k){this._blockCount!==k&&(this._blockCount=k,this.notifyUpdate(W.L.FLOOR_SET_BLOCK_COUNT))}get hasMaxBlocks(){return this.blockCount>=V.D.MAX_SMART_BLOCKS}get isQuickReno(){return this.state===Y.u.QuickReno}get isExternalBuild(){return this._isExternalBuild}set isExternalBuild(k){this._isExternalBuild=k,this.notifyUpdate(W.L.FLOOR_SET_EXTERNAL_BUILD)}get state(){return this._state}set state(k){this._state!==k&&(this._state=k,this.notifyUpdate(W.L.FLOOR_SET_STATE))}get floatlings(){return this._floatlings}get decorations(){return this._decorations}get decorationPositions(){return this._decorationPositions}set decorationPositions(k){if(k.length>V.D.MAX_DECORATION_SLOTS)throw new Error(`Maximum decorations cannot exceed ${V.D.MAX_DECORATION_SLOTS}`);this._decorationPositions=k,this.notifyUpdate(W.L.FLOOR_SET_DECORATION_POSITIONS)}getRestingFloatlings(){return this.floatlings.filter((k=>(k.updateState(),k.state===z.a.Asleep||k.state===z.a.Awake)))}getFloatlingsInState(k){return this.floatlings.filter((B=>B.state===k))}getFloatingFloatlings(){return this.floatlings.filter((k=>k.state===z.a.Floating))}constructor(){var k,B,U;super(),this._roomID=0,this._skillID=0,this._frameID=0,this._blockCount=0,this._isExternalBuild=!1,this._hasShroud=!1,this._state=Y.u.ChooseLook,this._decorations=new K.R,this._decorationPositions=[{x:-160,y:-80},{x:-160,y:-135},{x:0,y:-135},{x:160,y:-135},{x:160,y:-80}],this._floatlings=[],this._mathTower=null!==(U=null===(B=null===(k=j.q.instance)||void 0===k?void 0:k.prodigy)||void 0===B?void 0:B.gameContainer.get(H.G.MathTower))&&void 0!==U?U:null,this.registerDecorHandler(this._decorations)}calculateShroudStatus(){var k;if(!(null===(k=null==this?void 0:this._mathTower)||void 0===k?void 0:k.education))return;const B=this._mathTower.education.getSkillById(this._skillID),U=q.g.answersToUnlock(B);this._hasShroud=B&&U>0,this.notifyUpdate(W.L.FLOOR_SET_HAS_SHROUD,this._hasShroud)}cleansRemaining(k=null){var B,U,F;const G=k||(null===(U=null===(B=this._mathTower)||void 0===B?void 0:B.education)||void 0===U?void 0:U.getSkillById(this._skillID)),j=G&&null!==(F=q.g.answersToUnlock(G))&&void 0!==F?F:0;return Math.max(j,0)}onShroudQuestionAnswered(){this._hasShroud&&(this.notifyUpdate(W.L.FLOOR_SET_NUM_SPELLS),this.calculateShroudStatus())}generateRandomFloatlings(k=5,B=0){((k,B)=>(0,G.range)(B).map((()=>{const B=new z.b;return B.gearElement=$.o.seededRange(2,3,k),B.element=(0,G.first)((0,G.shuffle)([...V.D.ELEMENT_STRINGS])),B.explorerLevel=$.o.seededRange(0,4,k),B})))(this.skillID,k).forEach((k=>{k.lastThrown=B,this.pushFloatling(k)}))}awardFloatlings(k){const B=k.getItemData(V.D.ASSET_TYPE_INTERIOR,this.roomID);if(!F.Aq$.isDefined(B))return;let U=0,G="";B.occupantLevels.forEach((k=>{const F=new z.b;F.element=V.D.ELEMENT_STRINGS[Number.parseInt(B.element)],F.explorerLevel=k,this.pushFloatling(F),U++,G=F.element})),this.notifyUpdate(W.L.FLOOR_AWARD_FLOATLINGS,{floatlingCount:U,element:G})}pushFloatling(k){this._floatlings.push(k),k.floor=this,this.registerFloatlingHandler(k),this.notifyUpdate(W.L.FLOOR_PUSH_FLOATLING)}get isRenovating(){return(this.isQuickReno||this.state===Y.u.UnderConstruction)&&this._isExternalBuild}setComplete(k=!1,B=V.D.MAX_SMART_BLOCKS){this.blockCount=B,this.isExternalBuild=k,this.state=Y.u.Complete}isInBlueprintState(){return!this.hasMaxBlocks&&X.FULL_STATES.every((k=>this.state!==k))}setReadyForRenovation(){this.isExternalBuild=!0,this.state=Y.u.Complete}setRenovation(){this.isExternalBuild=!0,this.state=Y.u.QuickReno}setRenoConstruction(){this.blockCount=this.hasMaxBlocks?0:this.blockCount,this.isExternalBuild=!0,this.state=Y.u.UnderConstruction}get canReceiveFloatlings(){return this.isComplete&&!this.isExternalBuild&&0===this.floatlings.length}registerFloatlingHandler(k){k.onUpdate.add(this.handleUpdate.bind(this))}registerDecorHandler(k){k.onUpdate.add(this.handleUpdate.bind(this))}}X.FULL_STATES=[Y.u.Complete,Y.u.ChooseLook,Y.u.QuickReno,Y.u.RooftopMastery]},39666:(k,B,U)=>{"use strict";var F;U.d(B,{u:()=>F}),function(k){k[k.Complete=0]="Complete",k[k.UnderConstruction=1]="UnderConstruction",k[k.SkillLocked=2]="SkillLocked",k[k.RooftopMastery=3]="RooftopMastery",k[k.TowerRoof=4]="TowerRoof",k[k.ChooseLook=5]="ChooseLook",k[k.QuickReno=6]="QuickReno",k[k.MoveFloor=7]="MoveFloor"}(F||(F={}))},51365:(k,B,U)=>{"use strict";U.d(B,{L:()=>j});var F=U(95891),G=U(90736);class j{get source(){return this._source}get child(){return this._child}get type(){return this._type}get value(){return this._value}constructor(k,B,U,F){this._source=k,this._child=U,this._type=B,this._value=F}getLastChild(){return(0,F.last)(this.traverseNotificationTree(this._child))}getChildren(){return this.traverseNotificationTree(this._child)}getFinalNotification(){return this._child?this.getLastChild():this}getStringType(){return Object.keys(G.L).find((k=>{if(G.L[k]===this._type)return k}))}traverseNotificationTree(k){const B=[],U=k=>{k._child&&(B.push(k._child),U(k._child))};return k&&(B.push(k),U(k)),B}}},43844:(k,B,U)=>{"use strict";U.d(B,{o:()=>q});var F=U(95891),G=U(90736),j=U(58604),$=U(96417),H=U(9439),V=U(39666),W=U(80070);class q extends W.v{get ornamentPositions(){return this._ornamentsPositions}get floors(){return this._floors}get ornaments(){return this._ornaments}get sideWalkAssetID(){return this._sideWalkAssetID}set sideWalkAssetID(k){this._sideWalkAssetID=k,this.notifyUpdate(G.L.TOWER_SET_SIDEWALK_ID)}get isInfinityTower(){return this._isInfinityTower}set isInfinityTower(k){this._isInfinityTower=k,this.notifyUpdate(G.L.TOWER_SET_INFINITY_TOWER)}get isActiveTower(){return this._isActiveTower}set isActiveTower(k){this._isActiveTower=k,this.notifyUpdate(G.L.TOWER_SET_ACTIVE_TOWER)}constructor(k=!1){super(),this._sideWalkAssetID=0,this._isInfinityTower=!1,this._isActiveTower=!1,this._ornaments=new j.R,this._floors=[],this._ornamentsPositions=[{x:-200,y:70},{x:-100,y:70},{x:0,y:70},{x:100,y:70},{x:200,y:70}],this._isInfinityTower=k,this._isActiveTower=!0}createFloor(k,B=!1){if(!this.canAddFloor())return null;const U=new H.Z;return U.skillID=this.isInfinityTower?null:k,U.isExternalBuild=B,this._floors.push(U),this.registerFloorHandler(U),this.notifyUpdate(G.L.TOWER_CREATE_FLOOR,{skillID:k,isInfinityTower:this.isInfinityTower}),U}hasSkillLockedFloors(){return(0,F.filter)(this._floors,(k=>k.state===V.u.SkillLocked)).length>0}canRemoveFloor(){return!this._isInfinityTower&&this._floors.length>q.MINIMUM_FLOOR_COUNT}canAddFloor(){return this._isInfinityTower||this._floors.length=q.MINIMUM_FLOOR_COUNT}takeFloorFrom(k,B=!1,U=!0){return!!(B||k.canRemoveFloor()&&this.canAddFloor())&&(this.pushFloor(k.removeFromBottom(!1),U),k.isActiveTower&&0===k.floors.length&&(this.isActiveTower=!0),!0)}moveFloorTo(k,B=!1,U=!0){return!!(B||this.canRemoveFloor()&&k.canAddFloor())&&(k.addFloor(this._floors.pop(),!1),k.isActiveTower&&(this.isActiveTower=!1),U&&this.notifyUpdate(G.L.TOWER_MOVE_FLOOR),!0)}getFloatlings(){const k=[];for(let B=0;Bk.getFloatlingsInState($.a.Wandering))).filter((k=>k)))}removeFromTop(){const k=this._floors.pop();this.unregisterFloorHandler(k),this.notifyUpdate(G.L.TOWER_REMOVE_FLOOR)}removeFromBottom(k=!0){const B=this._floors.shift();return this.unregisterFloorHandler(B),k&&this.notifyUpdate(G.L.TOWER_REMOVE_FLOOR),B}removeFloors(k,B,U=!0){this._floors.splice(k,B).forEach((k=>{this.unregisterFloorHandler(k)})),U&&this.notifyUpdate(G.L.TOWER_REMOVE_FLOOR)}addFloor(k,B=!0){this._floors.unshift(k),B&&this.notifyUpdate(G.L.TOWER_CREATE_FLOOR,{skillID:k.skillID,isInfinityTower:this.isInfinityTower})}pushFloor(k,B=!0,U=!1){if(this.canAddFloor()){const j=(0,F.last)(this._floors);return U&&j&&j.state!==V.u.Complete?(this._floors.pop(),this._floors.push(k),this._floors.push(j)):this._floors.push(k),this.registerFloorHandler(k),B&&this.notifyUpdate(G.L.TOWER_PUSH_FLOOR),!0}return!1}registerFloorHandler(k){k.onUpdate.add(this.handleUpdate.bind(this))}unregisterFloorHandler(k){k.onUpdate.remove(this.handleUpdate.bind(this))}}q.MINIMUM_FLOOR_COUNT=3,q.MAXIMUM_FLOOR_COUNT=28},94909:(k,B,U)=>{"use strict";U.d(B,{J:()=>W});var F=U(95891),G=U(90736),j=U(96417),$=U(39666),H=U(43844),V=U(80070);class W extends V.v{get towers(){return this._towers}get floors(){return(0,F.flatten)(this.towers.map((k=>k.floors)))}constructor(){super(),this._towers=[],this.isTutorialTown=!1,this._infinityTower=null,this._floatlingsScared=!1,this.onUpdate.add(this.handleTowerUpdate.bind(this))}init(k=!1){const B=(0,F.last)(this.floors);B&&B.state===$.u.RooftopMastery&&(this._floatlingsScared=!0,this.setAllFloatlingsState(j.a.ScaredAway)),this.isTutorialTown=k}canCreateTower(k){if(this._towers.length===W.MAX_TOWERS)return!1;return(W.MAX_TOWERS-this._towers.length)*H.o.MAXIMUM_FLOOR_COUNT>=k}get skillCount(){return(0,F.sumBy)(this.towers,(k=>k.floors.length))}get infinityTower(){return this._infinityTower}getPage(k,B){const U=Math.max(0,k)*B;return this._towers.slice(U,U+B)}getPageCount(k){const B=Math.max(1,k);return Math.ceil(this._towers.length/B)}createTower(){const k=new H.o;return this._towers.push(k),this.registerTowerHandler(k),this.notifyUpdate(G.L.TOWN_CREATE_TOWER),k}removeTower(){const k=this._towers.pop();this.notifyUpdate(G.L.TOWN_REMOVE_TOWER),this.unregisterTowerHandler(k)}createInfinityTower(){return this._infinityTower||(this._infinityTower=new H.o(!0)),this.registerTowerHandler(this._infinityTower),this.notifyUpdate(G.L.TOWN_CREATE_INFINITY_TOWER),this._infinityTower}getWanderingFloatlings(){return(0,F.flatten)(this.towers.map((k=>k.getWanderingFloatlings())))}getAllFloatlings(){return(0,F.flatten)(this.towers.map((k=>k.getFloatlings())))}pushTower(k){this._towers.push(k),this.registerTowerHandler(k),this.notifyUpdate(G.L.TOWN_PUSH_TOWER)}getIndexesOfFloor(k){const B={floorIndex:-1,towerIndex:-1};for(let U=0;U=0){B.towerIndex=U;break}return B}setAllFloatlingsState(k){this.floors.forEach((B=>{B.floatlings.forEach((B=>{B.state=k}))}))}registerTowerHandler(k){k.onUpdate.add(this.handleUpdate.bind(this))}unregisterTowerHandler(k){k.onUpdate.remove(this.handleUpdate.bind(this))}handleTowerUpdate(k){switch(k.getFinalNotification().type){case G.L.TOWN_CREATE_TOWER:this.towers.length>1&&(this.towers[this.towers.length-2].isActiveTower=!1);break;case G.L.TOWN_REMOVE_TOWER:this.towers.length>0&&(this.towers[this.towers.length-1].isActiveTower=!0);break;case G.L.FLOOR_SET_STATE:k.getLastChild().source.state===$.u.RooftopMastery?(this._floatlingsScared=!0,this.setAllFloatlingsState(j.a.ScaredAway)):this._floatlingsScared&&(this._floatlingsScared=!1,this.setAllFloatlingsState(j.a.Asleep))}}}W.MAX_TOWERS=14},80070:(k,B,U)=>{"use strict";U.d(B,{v:()=>V});var F=U(8674),G=U(62459),j=U(79687),$=U(90736),H=U(51365);let V=class{constructor(){this._onUpdate=new G.HN0}get onUpdate(){return this._onUpdate}notifyUpdate(k,B){this.onUpdate.dispatch(new H.L(this,k,null,B))}handleUpdate(k){const B=new H.L(this,$.L.BREADCRUMB,k);return this._onUpdate.dispatch(B),B}};V=(0,F.Cg)([(0,j.injectable)()],V)},66930:(k,B,U)=>{"use strict";U.d(B,{V:()=>Y});var F=U(8674),G=U(62459),j=U(79687),$=U(35120),H=U(51477),V=U(90736),W=U(80070),q=U(64794),K=U(15678);class z{static isTypeBasicOrGameChallenge(k,B){return B.isDefaultSkillSelectionType(k)||B.isAlgorithmTypeGameChallenge(k)}static getSkills(k){return k.skills?k.skills.filter((k=>K.g.isAvailable(k))):[]}static getBasicAlgorithm(k){return k.getBasicAlgorithm()}static getCurrentAlgorithm(k){return k.getNextAlgorithm()}static openQuestionAtSkill(k,B,U=!1,F){k.showGameChallenge(B,q.D.GAME_CHALLENGE_SCENARIO_ID,0,!1,0,0,F,U)}static openQuestion(k,B=!1,U){k.question(U,{forceAnswerBonus:!1,energyCost:0,allowTutorials:!0,canInstantWin:!1,isUserInBattle:!1,disableLock:B})}}let Y=class extends W.v{getEducationSystemAPI(){const k=this._externalFactory.getEducationSystemAPI();if(!k)return G.VyI.log("Trying to use education system API in a non-math context.",G.$bb.Error),null;const B=k.getNextAlgorithm().type;return this._currentAlgorithmType!==B&&(this._currentAlgorithmType=B,this.notifyUpdate(V.L.EDUCATION_SET_ALGORITHM,B)),k}constructor(k){super(),this._externalFactory=null,this._externalFactory=$.q.instance.prodigy.education}getGrade(){return this.getEducationSystemAPI().getAlgorithmGrade()}openQuestionInterface(k,B,U,F){const G=k?this.getNextSkill():this.getSkillById(B),j=(k,B,U)=>{const j=G?G.ID:null,$=this.getSkillById(j);this.notifyUpdate(V.L.EDUCATION_QUESTION_ANSWER,$),this.notifyUpdate(k?V.L.EDUCATION_QUESTION_ANSWER_CORRECT:V.L.EDUCATION_QUESTION_ANSWER_INCORRECT,$),this.notifyUpdate(V.L.EDUCATION_QUESTION_INTERFACE_CLOSE,$),this.notifyUpdatesIfSkillChanged(G,$),F&&F(k,B,U,!1,!1,$)};k?z.openQuestion(this._externalFactory,U,j):G?z.openQuestionAtSkill(this._externalFactory,B,U,j):F&&F(!0),this.notifyUpdate(V.L.EDUCATION_QUESTION_INTERFACE_OPEN,G)}getNextSkill(){return this.getEducationSystemAPI().getNextAlgorithm().nextSkill}isCurrentAlgorithmBasicOrGameChallenge(){return z.isTypeBasicOrGameChallenge(this._currentAlgorithmType,this.getEducationSystemAPI())}getMobileUnfriendlySkillIds(){return this.getEducationSystemAPI().nonMobileFriendlySkillIds}getSkills(){const k=this.getEducationSystemAPI(),B=z.getBasicAlgorithm(k);return z.getSkills(B).filter((B=>K.g.isSkillIdMobileFriendly(B.ID,k.nonMobileFriendlySkillIds)))}getSkillsByGrade(k){return K.g.getSkillsByGrade(this.getSkills(),k)}getCurrentSkillByGrade(k){return K.g.getCurrentSkillByGrade(this.getSkills(),k)}getSkillsMasteredByGrade(k){return K.g.getSkillsMasteredByGrade(this.getSkills(),k)}getPendingSkillsByGrade(k){return K.g.getPendingSkillsByGrade(this.getSkills(),k)}getSkillById(k){const B=this.getEducationSystemAPI().getAllAlgorithmSkills();return K.g.getSkillById(B,k)}notifyUpdatesIfSkillChanged(k,B){k&&B&&k.ID===B.ID&&(K.g.determineJustLocked(k,B)&&this.notifyUpdate(V.L.EDUCATION_SKILL_LOCKED,B),K.g.determineJustUnlocked(k,B)&&this.notifyUpdate(V.L.EDUCATION_SKILL_UNLOCKED,B),K.g.determineJustMastered(k,B)&&this.notifyUpdate(V.L.EDUCATION_SKILL_MASTERED,B))}};Y=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("51c-03a0")),(0,F.Sn)("design:paramtypes",[H.n])],Y)},42862:(k,B,U)=>{"use strict";U.d(B,{s:()=>z});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U(35120),V=U(51477),W=U(64794),q=U(90736),K=U(37747);let z=class{get educationApi(){return this._educationApi||(this._educationApi=H.q.instance.prodigy.education.getEducationSystemAPI(),this._educationApi||G.VyI.log("Trying to use education system API in a non-math context.",G.$bb.Error)),this._educationApi}constructor(k){this._game=k}handleNotification(k,B){const U=this.getNotification(B),F=this.getTowerID(k),j=this.getActiveFloorID(k);switch(U.type){case q.L.TOWER_TOWN_FLOATLING_FLING_START:H.q.instance.prodigy.gameContainer.get("c47-20b6").economy.sendMinigameEvent("floatling-fling",!0);break;case q.L.TOWER_TOWN_FLOATLING_FLING_END:H.q.instance.prodigy.gameContainer.get("c47-20b6").economy.sendMinigameEvent("floatling-fling",!1);break;case q.L.FLOOR_AWARD_FLOATLINGS:const B=U.value;H.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.towerTownEvents.sendFloatlingCreatedEvent(B.element,B.floatlingCount);break;case q.L.FLOOR_START_BUILDING:const $={towerID:F,floorID:j,isInfinityFloor:k.isInfinity,algorithmType:k.isInfinity?this.getAlgoType():k.currentGrade};H.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.towerTownEvents.sendFloatlingFloorCreatedEvent($);break;case q.L.TOWN_CREATE_TOWER:H.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.towerTownEvents.sendFloatlingTowerCreatedEvent(F);break;case q.L.TOWER_COMPLETED:const V=k.currentTown.towers[F].floors.length;H.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.towerTownEvents.sendFloatlingTowerCompletedEvent(F,V);break;case q.L.TOWER_ROOM_BUILT:const W=G.Aq$.isDefined(k.stateManager.switchParams.quickRenoFloor),K=W?k.stateManager.switchParams.quickRenoFloor:k.activeFloor,z=[];for(let k=0;k{"use strict";U.d(B,{w:()=>Z});var F=U(8674),G=U(62459),j=U(79687),$=U(35120),H=U(51477),V=U(70399),W=U(95891);class q{static deepKeyRename(k,B){return this.deepMapKeys(k,(k=>B[k]||k))}static deepMapKeys(k,B){if(!W.isObject(k))return k;const U=k=>k.map((k=>this.deepMapKeys(k,B))),F=k=>this.deepMapKeys(k,B);return Object.keys(k||{}).reduce(((G,j)=>{const $=W.isArray(k[j])?U(k[j]):W.isObject(k[j])?F(k[j]):k[j];return Object.assign(Object.assign({},G),{[B(j)]:$})}),{})}}const K={blockCount:1,decorations:2,element:3,explorerLevel:4,floatlings:5,floors:6,frameID:7,gearElement:8,hasShroud:9,infinityTower:10,isActiveTower:11,isExternalBuild:12,isInfinityTower:13,lastThrown:14,numSpells:15,personality:16,roomID:17,sideWalkAssetID:18,skillID:19,towers:20,type:21};class z{static compressKeys(k){return q.deepKeyRename(k,K)}static decompressKeys(k){return q.deepKeyRename(k,W.invert(K))}}var Y,Q=U(73678),X=U(6191);let Z=Y=class{constructor(k,B){this._serializer=B}getTown(k){const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return this._serializer.deserialize(z.decompressKeys(B.state.get(this.getTownPath(k))))}getTownIDs(){const k=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return G.Aq$.isDefined(k.state.get(`zone-${Y.TOWERTOWER_ZONE}-towns`))?Object.keys(k.state.get(`zone-${Y.TOWERTOWER_ZONE}-towns`)):[]}setTown(k,B){const U=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=this._serializer.serialize(B);F&&U.state.set(this.getTownPath(k),z.compressKeys(F))}getTownPath(k){return`zone-${Y.TOWERTOWER_ZONE}-towns-${k}`}};Z.TOWERTOWER_ZONE=Q.A_.TOWERTOWN,Z=Y=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("51c-03a0")),(0,F.Qj)(1,(0,j.inject)(V.G.StorageSerializer)),(0,F.Sn)("design:paramtypes",[H.n,X.Y])],Z)},6191:(k,B,U)=>{"use strict";U.d(B,{Y:()=>z});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U(64794),V=U(96417),W=U(39666),q=U(94909);class K{static log(k,B){G.VyI.log(`- TOWER TOWN - ${k}`,B)}}let z=class{serialize(k){if(!k)return K.log("Could not serialize town in StorageSerializer because it was null",G.$bb.Verbose),null;const B=null!==k.infinityTower?this.serializeTower(k.infinityTower):void 0;return{towers:k.towers.length>0?Array.from($.map(k.towers,this.serializeTower.bind(this))):void 0,infinityTower:B}}deserialize(k){return k||K.log("Could not deserialize townState in StorageSerializer because it was null",G.$bb.Verbose),k?this.deserializeTown(k):null}serializeTower(k){return{sideWalkAssetID:k.sideWalkAssetID,isInfinityTower:k.isInfinityTower,isActiveTower:k.isActiveTower,decorations:k.ornaments.count>0?this.serializeDecorContainer(k.ornaments):void 0,floors:k.floors.length>0?Array.from($.map(k.floors,this.serializeFloor.bind(this))):void 0}}serializeFloor(k){const B=k.roomID,U=k.skillID,F=k.frameID,G=k.blockCount,j=k.isExternalBuild,H=k.state,V=k.hasShroud;return{roomID:B,skillID:U,frameID:F,blockCount:G,isExternalBuild:j,type:H,decorations:0!==k.decorations.count?this.serializeDecorContainer(k.decorations):void 0,floatlings:k.floatlings&&k.floatlings.length>0?Array.from($.map(k.floatlings,this.serializeFloatling.bind(this))):void 0,numSpells:0,hasShroud:V}}serializeDecorContainer(k){const B=[],U=k.keys;return $.forEach(U,(U=>{const F=k.getAt(U).assetID;B.push({slot:U,assetID:F})})),B}serializeFloatling(k){return{gearElement:k.gearElement,explorerLevel:k.explorerLevel,lastThrown:k.lastThrown,personality:k.personality,element:k.element}}deserializeTown(k){const B=new q.J;if(k.infinityTower){const U=B.createInfinityTower();this.deserializeTower(U,k.infinityTower)}return k.towers&&k.towers.length>0&&this.deserializeTowers(B,k.towers),B}deserializeTowers(k,B){$.forEach(B,(B=>{const U=k.createTower();this.deserializeTower(U,B)}))}deserializeTower(k,B){k.sideWalkAssetID=B.sideWalkAssetID,k.isInfinityTower=B.isInfinityTower,k.isActiveTower=B.isActiveTower,this.deserializeDecorations(k.ornaments,B.decorations),this.deserializeFloors(k,B.floors)}deserializeDecorations(k,B){B&&$.forEach(B,(B=>{G.Aq$.isDefined(B.atlasID)&&!G.Aq$.isDefined(B.assetID)?k.setAt(B.slot,B.atlasID):(B.atlasID=void 0,k.setAt(B.slot,B.assetID))}))}deserializeFloors(k,B){B&&B.length>0&&$.forEach(B,(B=>{const U=k.createFloor(B.skillID,B.isExternalBuild);this.deserializeDecorations(U.decorations,B.decorations),U.blockCount=B.blockCount,U.frameID=B.frameID,U.roomID=B.roomID,B.type===W.u.Complete&&U.blockCount0&&$.forEach(B,(B=>{const U=new V.b;this.shallowCopy(B,U),U.floor=k,k.pushFloatling(U)}))}shallowCopy(k,B){for(const U in k)B[U]=k[U]}};z=(0,F.Cg)([(0,j.injectable)()],z)},41340:(k,B,U)=>{"use strict";U.d(B,{Y:()=>W});var F=U(8674),G=U(79687),j=U(35120),$=U(51477),H=U(64794),V=U(59510);let W=class{constructor(k){this._breadcrumbManager=j.q.instance.prodigy.breadcrumbManager}completeBreadcrumb(k){this._breadcrumbManager.completeBreadcrumb(H.D.FEATURE_NAME,k)}isBreadcrumbComplete(k){return this._breadcrumbManager.isBreadcrumbComplete(H.D.FEATURE_NAME,k)}resetBreadcrumb(k){this._breadcrumbManager.resetBreadcrumb(H.D.FEATURE_NAME,k)}resetBreadcrumbs(){this._breadcrumbManager.resetBreadcrumbs(H.D.FEATURE_NAME)}init(){this._breadcrumbManager.breadcrumbConfig.addFeature(H.D.FEATURE_NAME).addBreadcrumb(V.M.DefaultItemsReceived,0).addBreadcrumb(V.M.ShroudTutorialCompleted,1).addBreadcrumb(V.M.FlingTutorialComplete,2).addBreadcrumb(V.M.TutorialCompleted,3).addBreadcrumb(V.M.ShroudTutorialFirstTime,4).addBreadcrumb(V.M.FlingUnlocked,5).addBreadcrumb(V.M.StoreFirstPurchaseComplete,6).addBreadcrumb(V.M.DefaultFramesReceived,7).addBreadcrumb(V.M.StubbornShadowTutorialOneCompleted,8).addBreadcrumb(V.M.StubbornShadowTutorialTwoCompleted,9)}};W=(0,F.Cg)([(0,G.injectable)(),(0,F.Qj)(0,(0,G.inject)("51c-03a0")),(0,F.Sn)("design:paramtypes",[$.n])],W)},59510:(k,B,U)=>{"use strict";var F;U.d(B,{M:()=>F}),function(k){k.DefaultItemsReceived="DefaultItemsReceived",k.TutorialCompleted="TutorialComplete",k.ShroudTutorialFirstTime="ShroudTutorialFirstTime",k.ShroudTutorialCompleted="ShroudTutorialCompleted",k.FlingUnlocked="FlingUnlocked",k.FlingTutorialComplete="FlingTutorialComplete",k.StoreFirstPurchaseComplete="StoreFirstPurchaseComplete",k.DefaultFramesReceived="DefaultFramesReceived",k.StubbornShadowTutorialOneCompleted="StubbornShadowTutorialOneCompleted",k.StubbornShadowTutorialTwoCompleted="StubbornShadowTutorialTwoCompleted"}(F||(F={}))},25863:(k,B,U)=>{"use strict";U.d(B,{Y:()=>q});var F=U(8674),G=U(79687),j=U(30405),$=U(70399),H=U(64794),V=U(43531);class W{constructor(k,B){this._events=[],this._showGuideHand=B,this._controller=new V.rD(k)}addDialogue(k,B=!0,U=null){return this._events.push({dialogueConfig:{dialogueData:this._controller.dataProvider.get(k),blockInput:B},condition:U}),this}addAction(k,B=null){return this._events.push({dialogueConfig:{callback:k},condition:B}),this}addGuideHand(k,B=0,U=0){return this.addAction((()=>{this._showGuideHand.addGuideHand(k,B,U)})),this}removeGuideHand(k){return this.addAction((()=>{this._showGuideHand.removeGuideHand(k)})),this}start(k,B){const U=[];for(let F=0;F{"use strict";U.d(B,{m:()=>je});var F=U(35120),G=U(11624),j=U(87820),$=U(70399),H=U(64794),V=U(73678),W=U(62459),q=U(56942),K=U(85855),z=U(40295),Y=U(73797),Q=U(75214),X=U(87337),Z=U(79340),J=U(93867);class tt extends Z.Z{constructor(k,B){super(k,"A1",B.concat([q.Q.Spine_shadowportal_json,K.V.Bgm_towertown,K.V.Bgm_floatlingfling]),"towertown-default-2")}setup(k,B,U){super.setup(k,B,U)}start(k,B){super.start(k,B,this.zone.bgmID),k.broadcaster.broadcast(Y.Y1.HideHUD,Y.HG.HUD);const U=F.q.instance.prodigy.gameContainer.get(W.$Bt.IFSMController),G=F.q.instance.prodigy.gameContainer.get(W.$Bt.FSMService),j=J.U.isStepComplete(z.B.PuppetMasterDefeated);this._puppet=j?new Q.p(k,"NPC_NAME_STUBBORN_SHADOW",239,X.ac.Boss,B.content,640,260,"idle"):new Q.p(k,"NPC_NAME_PUPPETMASTER",q.Q.Spine_npc_puppetmaster_json,X.ac.Boss,B.content,640,320,"idle"),U.execute(G.getStateMachine(200),{game:k,screen:B,scene:this,player:B.user,puppet:this._puppet,dialogueIDs:j?[1452,1453]:[918,919],path:B.path,pathfinder:B.path,isPuppetMaster:!j})}cleanup(){this._puppet&&(this._puppet.destroy(),this._puppet=null),super.cleanup()}tweenPuppet(){F.q.instance.game.add.tween(this._puppet,this).to({x:1400},tt._walkTweenMS).start()}}tt._walkTweenMS=1700;var et=U(8674),it=U(95891),st=U(88022),nt=U(60881),at=U(75781),rt=U(68910),ot=U(43844),ht=U(15678);class ct{constructor(k,B,U){this._currentState=null,this._states=new Map,this._mathTower=k,this._mathTower.stateManager=this,this._prefabLoader=B,this._map=U,this._localizer=F.q.instance.prodigy.gameContainer.get(W.$Bt.LocalizationService),this._dialogueController=F.q.instance.prodigy.dialogue.create(),this._switchParams={}}addState(k,B){this._states.set(k,B),B.init(this)}changeToState(k,B={}){this._states.has(k)&&(this._switchParams=B,W.Aq$.isDefined(this._currentState)&&this._currentState.onExit(k),this._currentState=this._states.get(k),this._currentState.onEnter())}update(){this._currentState.onUpdate}get states(){return this._states}get currentState(){return this._currentState}get mathTower(){return this._mathTower}get switchParams(){return this._switchParams}get prefabLoader(){return this._prefabLoader}get localizer(){return this._localizer}get dialogueController(){return this._dialogueController}nextTowerAvailable(){const k=this._mathTower.currentTown,B=k.towers.length>0,U=k.towers[k.towers.length-1].floors.length>=ot.o.MINIMUM_FLOOR_COUNT,F=this._mathTower.education.getPendingSkillsByGrade(this._mathTower.getGrade()),G=k.canCreateTower(F.length);return!B||U&&G}nextFloorPosition(k=!1){if(this.mathTower.isInfinity)return this.nextInfinityFloorPosition();const B=this._mathTower.currentTown;let U=0===B.towers.length?0:B.towers.length-1,F=0===B.towers.length?0:B.towers[U].floors.length;return B.towers.length>0&&!B.towers[U].canAddFloor()&&!k&&(U++,F=1),this.getFloorPosition(U,F)}moveToNextFloor(k=!1){const B=this._mathTower.currentTown;let U=0===B.towers.length?0:B.towers.length-1,F=0===B.towers.length?0:B.towers[U].floors.length;B.towers.length>0&&!B.towers[U].canAddFloor()&&!k&&(U++,F=1),this._map.townRenderer.moveToFloor(U,F)}nextInfinityFloorPosition(){return new rt.Point(-F.q.instance.game.width*H.D.RENDERER_OFFSET_PERCENTAGE_INFINITY_TOWER,H.D.TOWER_BASE_Y-H.D.FLOOR_HEIGHT*this.mathTower.currentTown.infinityTower.floors.length)}getFloorPosition(k,B){const U=this._mathTower.game.width*H.D.RENDERER_JUMP_PERCENTAGE,F=this._mathTower.game.width*H.D.RENDERER_OFFSET_PERCENTAGE;return new rt.Point(k*U+F,H.D.TOWER_BASE_Y-H.D.FLOOR_HEIGHT*B)}getCameraPosition(){return new W.I9Y(this._map.pageCamera.x,this._map.pageCamera.y)}isSkillMastered(k){const B=this._mathTower.education.getSkillById(k);return ht.g.isSkillMastered(B)}isSkillLocked(k){const B=this._mathTower.education.getSkillById(k);return ht.g.isSkillLocked(B)}get map(){return this._map}}var dt,lt=U(90736),ut=U(34603),ft=U(29834),bt=U(28402),pt=U(76945),vt=U(96417),gt=U(51365);!function(k){k.IDLE="idle",k.WALK="walk",k.SLEEP="sleep"}(dt||(dt={}));class mt extends W.uAl{constructor(){super(...arguments),this.researchScore=1}get activeTween(){return this._activeTween}set activeTween(k){this._activeTween&&this._activeTween.onDestroy.removeAll(this),this._activeTween=k,this._activeTween.onDestroy.add(this.onActiveTweenDestroyed,this)}set floatling(k){this._floatling!==k&&(this._floatling=k,this._floatling.onUpdate.add(this.updateFloatlingState,this),this.spine.setAsset(k.spineID,(()=>{this.animator.create(),this.walkTarget=null,this._researchPoint.setAsset(H.D.ATLAS_RESEARCH_POINTS,k.researchPointID),this._elementType=H.D.ELEMENT_STRINGS.indexOf(k.element),this.researchScore=k.explorerLevel+1,this.updateFloatlingState(new gt.L(k,lt.L.FLOATLING_SET_STATE)),this.onFloatingAssetLoaded.dispatch()})))}get floatling(){return this._floatling}get spine(){return this._spine}get elementType(){return this._elementType}get walkTarget(){return this._walkTarget}set walkTarget(k){this._walkTarget=k,k?(this.playAnimation(dt.WALK),k.x>this.GameObject.legacyTransform.x?this.GameObject.legacyTransform.group.scale.set(1,1):this.GameObject.legacyTransform.group.scale.set(-1,1)):this.playAnimation(dt.IDLE)}get waitingToDescend(){return this._waitingToDescend}set waitingToDescend(k){this._waitingToDescend=k}playAnimation(k,B=!0){this.animator.playAnimation(k,B)}create(){super.create(),this._game=F.q.instance.game;const k=new W._mx(this.GameObject);k.addComponent(W.K16),this._spine=k.addComponent(bt.v),this.animator=this.spine.GameObject.addComponent(ft.j);const B=new W._mx(this.GameObject);B.addComponent(W.K16),this._researchPoint=B.addComponent(ut._),this._researchPoint.GameObject.legacyTransform.y=30,this._researchPoint.setAnchor(.5,1),this._researchPoint.GameObject.active=!1,this._waitingToDescend=!1,this.onFloatingAssetLoaded=new W.HN0}destroy(){this.onFloatingAssetLoaded.dispose(),super.destroy()}onDisable(){super.onDisable(),window.clearTimeout(this._floatDownTimerHandle),this.activeTween&&this.activeTween.stop(!1),this._game.time.events.remove(this._walkTargetTimerEvent),this._walkTargetTimerEvent=null,this._wanderBounds=null,this._floatling&&this._floatling.onUpdate.removeAll(this)}set researchPointVisible(k){this._researchPoint.GameObject.active=k}get researchPointVisible(){return this._researchPoint.GameObject.active}startWandering(k,B=!0){this._wanderBounds=k,this.setRandomWalkTarget(),B&&this.GameObject.legacyTransform.group.position.copyFrom(this.walkTarget)}setRandomWalkTarget(){this._game.time.events.remove(this._walkTargetTimerEvent),this._walkTargetTimerEvent=null,W.Aq$.isDefined(this._wanderBounds)&&(this.walkTarget=new W.I9Y(pt.o.integerInRange(this._wanderBounds.x,this._wanderBounds.width+this._wanderBounds.x),pt.o.integerInRange(this._wanderBounds.y,this._wanderBounds.height+this._wanderBounds.y)))}update(){switch(super.update(),this.floatling.state){case vt.a.Wandering:this.updateWalk();break;case vt.a.Floating:this.updateFloat()}}updateFloat(){var k;this._activeTween&&(null===(k=this.GameObject)||void 0===k?void 0:k.legacyTransform)&&this.walkTarget&&(this.GameObject.legacyTransform.y+=H.D.FLOATLING_FLOAT_PIXELS_PER_SECOND*this._game.time.deltaMS*.001,this.GameObject.legacyTransform.y>this.walkTarget.y&&(this._activeTween.stop(!1),this._activeTween=null,this.floatling.state=vt.a.Wandering,this._onFinishFloatDown&&this._onFinishFloatDown(),this._onFinishFloatDown=null))}updateWalk(){if(W.Aq$.isDefined(this._walkTarget)){const k=new W.I9Y(this._walkTarget.x-this.GameObject.legacyTransform.group.position.x,this._walkTarget.y-this.GameObject.legacyTransform.group.position.y);let B=H.D.FLOATLING_WALK_PIXELS_PER_SECOND*this._game.time.deltaMS*.001;B>k.getMagnitude()?(this.GameObject.legacyTransform.group.position.copyFrom(this._walkTarget),this.walkTarget=null,this._walkTargetTimerEvent=this._game.time.events.addTimer(this.getWalkDelay(),this.setRandomWalkTarget,this)):(B=Math.min(B,k.getMagnitude()),k.normalize(),k.multiply(new W.I9Y(B,B)),this.GameObject.legacyTransform.group.position.set(this.GameObject.legacyTransform.group.position.x+k.x,this.GameObject.legacyTransform.group.position.y+k.y))}}getWalkDelay(){return pt.o.integerInRange(H.D.FLOATLING_WALK_MIN_IDLE_MS,H.D.FLOATLING_WALK_MAX_IDLE_MS)}floatDown(k,B,U){this.floatling.state=vt.a.Floating,this._onFinishFloatDown=U;let F=0;if(!B){this.GameObject.legacyTransform.x=this.GameObject.legacyTransform.x-H.D.FLOATLING_FLOAT_HALF_ARC_WIDTH,this.GameObject.legacyTransform.group.visible=!1;const k=Date.now();F=pt.o.realInRange(H.D.FLOATLING_FLOAT_MIN_DELAY_MS,H.D.FLOATLING_FLOAT_MAX_DELAY_MS),mt.lastFloatlingSendTime+H.D.FLOATLING_FLOAT_LAST_FLOATED_OFFSET_MS>k&&(F+=mt.lastFloatlingSendTime+H.D.FLOATLING_FLOAT_LAST_FLOATED_OFFSET_MS-k),mt.lastFloatlingSendTime=F+k}this._walkTarget=new W.I9Y(this.GameObject.legacyTransform.x,k),window.clearTimeout(this._floatDownTimerHandle),this._waitingToDescend=!0,this._floatDownTimerHandle=window.setTimeout(this.beginTweenSideToSide.bind(this,this.GameObject.legacyTransform.x+H.D.FLOATLING_FLOAT_HALF_ARC_WIDTH,B),F)}beginTweenSideToSide(k,B){this._activeTween&&this._activeTween.stop(),this.playAnimation(dt.IDLE),this.GameObject.legacyTransform.group.visible=!0,B||(this.GameObject.legacyTransform.y=W.i7d.main.viewMatrix.ty+pt.o.realInRange(H.D.FLOATLING_FLOAT_MIN_START_Y_OFFSET,H.D.FLOATLING_FLOAT_MAX_START_Y_OFFSET)),this._waitingToDescend=!1,this._activeTween=this._game.add.tween(this.GameObject.legacyTransform,this).to({x:k},1e3,W.GS3.Quadratic.InOut).yoyo(!0).loop(!0).start()}updateFloatlingState(k){if(k.getFinalNotification().type===lt.L.FLOATLING_SET_STATE)switch(k.getFinalNotification().source.state){case vt.a.ScaredAway:this.playAnimation(dt.IDLE),this._game.add.tween(this.GameObject.legacyTransform.group,this).to({y:W.i7d.main.viewMatrix.ty-W.i7d.main.viewportSize.height+100,alpha:0},H.D.FLOATLING_FLY_AWAY_MS,W.GS3.Quadratic.In,!0).onTweenComplete.add((()=>{this.GameObject.active=!1}));break;case vt.a.Asleep:this.playAnimation(dt.SLEEP)}}onActiveTweenDestroyed(){this._activeTween=null}}mt.lastFloatlingSendTime=0;var yt=U(20748),_t=U(39666),Et=U(25735);class wt{init(k){this._owner=k,this._mathTower=k.mathTower}onEnter(){}onExit(){}onUpdate(){}switchState(k,B={}){this._owner.changeToState(k,B)}}class Tt extends wt{constructor(){super(...arguments),this._defaultReturnState=H.D.STATE_CAMERA,this._activeFloor=null,this._floorPosition=null}onEnter(){this._activeFloor=this._owner.switchParams.quickRenoFloor,W.Aq$.isDefined(this._activeFloor)||(this._activeFloor=this._mathTower.activeFloor),this._buildInterface=this.getBuildInterface(),this._quitButtonObject=this._owner.prefabLoader.loadFromGUID(H.D.UI_CORNER_PREFAB,F.q.instance.prodigy.open.menusGameObject),this._quitButton=this._quitButtonObject.findComponent(Et.I).quitButton,this._buildInterface.onCreate.add(this.prefabCreated.bind(this)),this._buildInterface.floorFinishedSignal.add(this.floorFinished.bind(this)),this._buildInterface.wrongAnswerSignal.add(this.wrongAnswer.bind(this)),this._buildInterface.onBuildAnimationComplete.add(this.buildAnimationFinished.bind(this)),this._floorPosition=this._activeFloor.isRenovating?this._owner.switchParams.position:this._owner.nextFloorPosition();const k=new W.I9Y;k.x=this._floorPosition.x-W.i7d.main.viewMatrix.tx,k.y=this._floorPosition.y-W.i7d.main.viewMatrix.ty+60,this._flagpoleSpine=F.q.instance.prodigy.create.spine(k.x,k.y,H.D.SPINE_FLAGPOLE,this._mathTower.uiFactory.screen.foreground),this._flagpoleSpine.visible=!1,this.spawnScrim()}spawnScrim(){const k=this._mathTower.currentTown.getIndexesOfFloor(this._activeFloor);this._mathTower.uiFactory.spawnScrim(k.towerIndex,k.floorIndex)}getBuildInterface(){if(!this._activeFloor.isRenovating)return this._floorPosition=this._owner.nextFloorPosition(),this._owner.mathTower.uiFactory.buildInterface(this._floorPosition);this._floorPosition=this._owner.switchParams.position;const k=this._activeFloor;return this._owner.mathTower.uiFactory.buildInterface(this._floorPosition,k)}onExit(){this._buildInterface.close(),this._quitButton.onClick.removeAll(),this._quitButtonObject.destroy(),this._mathTower.uiFactory.despawnScrim()}prefabCreated(){this._quitButton.onClick.add(this.quitButtonClicked.bind(this)),this._buildInterface.buildButton.onClick.add(this.buildButtonClicked.bind(this)),this._activeFloor.hasMaxBlocks?this.floorFinished():this.buildButtonClicked()}quitButtonClicked(){if(F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._activeFloor.isRenovating){const k=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this._activeFloor.decorations.flush().forEach((B=>{k.backpack.add(H.D.ASSET_TYPE_DECORATION,B.assetID)})),this._activeFloor.setReadyForRenovation()}this.switchState(this._defaultReturnState)}buildButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._quitButton.inputEnabled=!1,this._buildInterface.buildFloor()}buildAnimationFinished(){this._quitButton.inputEnabled=!0}wrongAnswer(){if(this._quitButton.inputEnabled=!0,this._owner.isSkillLocked(this._activeFloor.skillID)){this._activeFloor.state=_t.u.SkillLocked;const k=this._mathTower.currentTown.towers.length-1,B=this._mathTower.currentTown.towers[k].floors.length-1;this.switchState(H.D.STATE_SHROUD,{towerIndex:k,floorIndex:B})}}floorFinished(){let k=H.D.STATE_CAMERA;const B=this._mathTower.education.getSkillById(this._activeFloor.skillID);!B||ht.g.isSkillMastered(B)||this._activeFloor.isRenovating?(this.completeFloor(),this._flagpoleSpine.visible=!0,this._flagpoleSpine.addAnimationByName(0,H.D.FLAG_SMOKE_ANIMATION,!1),this._mathTower.uiFactory.tooltip(this._owner.localizer.getText(H.D.TOOLTIP_FLOOR_FINISHED),!0,H.D.FLOOR_FINISHED_TOOLTIP_WIDTH)):(this._activeFloor.state=_t.u.RooftopMastery,k=H.D.STATE_ROOFTOP);const U=this._mathTower.currentTown.towers.length-1,F=this._mathTower.currentTown.towers[U].floors.length-1;this._mathTower.fireEvent(lt.L.TOWER_ROOM_BUILT),this.switchState(k,{towerIndex:U,floorIndex:F})}completeFloor(){F.q.instance.prodigy.audio.playSFX(H.D.TOWER_TOWN_SFX_ID,H.D.COMPLETE_FLOOR),this._activeFloor.setComplete()}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],Tt.prototype,"quitButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],Tt.prototype,"buildButtonClicked",null);var St,At=U(15521),Ct=U(51972),Ot=U(59510);class It extends W.JTX{get x(){return this._x}set x(k){this._x=this.bounds?Math.max(this.bounds.left,Math.min(this.bounds.right-this.cameraWidth,k)):k,this._fakeCamera.viewMatrix.tx=this._x,this._fakeCamera.GameObject.transform.worldPosition.x=this._x,this._fakeCamera.GameObject.transform.onWorldMatrixChanged.dispatch(),this.gameObject.legacyTransform.x=-this._x}get y(){return this._y}set y(k){this._y=this.bounds?Math.max(this.bounds.top,Math.min(this.bounds.bottom-this.cameraHeight,k)):k,this._fakeCamera.viewMatrix.ty=this._y,this._fakeCamera.GameObject.transform.worldPosition.y=this._y,this._fakeCamera.GameObject.transform.onWorldMatrixChanged.dispatch(),this.gameObject.legacyTransform.y=-this._y}get bounds(){return this._bounds}set bounds(k){k?(this._bounds=W.M_G.clone(k),this.updateBounds()):this._bounds=k}get cameraWidth(){return this._game.width}get cameraHeight(){return this._game.height}constructor(){super(),this._x=0,this._y=0,this._bounds=new W.M_G(0,0,0,0),this._game=F.q.instance.game}create(){super.create(),this._fakeCamera={viewMatrix:{ty:this.y,tx:this.x,isTranslateOnly:()=>!0},viewportSize:{height:this.cameraHeight,width:this.cameraWidth,getHalfWidth:()=>this.cameraWidth/2,getHalfHeight:()=>this.cameraHeight/2},GameObject:{transform:{worldPosition:{x:this.x,y:this.y},onWorldMatrixChanged:new W.HN0}},setCameraActive:()=>{}},W.i7d._main=this._fakeCamera,this._initialBounds=new W.M_G(0,0,this.cameraWidth,this.cameraHeight),this.bounds=W.M_G.clone(this._initialBounds)}destroy(){W.i7d._main=null,this.gameObject&&(this.gameObject.legacyTransform.x=0,this.gameObject.legacyTransform.y=0),super.destroy()}updateBounds(){this.x=this._x,this.y=this._y}}!function(k){k[k.UP=0]="UP",k[k.DOWN=1]="DOWN",k[k.LEFT=2]="LEFT",k[k.RIGHT=3]="RIGHT"}(St||(St={}));class Dt extends It{clearQueues(){this._verticalQueue=null,this._horizontalQueue=null}get CanMoveUp(){return this._canMoveUp}get CanMoveDown(){return this._canMoveDown}get CanMoveLeft(){return this._canMoveLeft}get CanMoveRight(){return this._canMoveRight}get onAtEdgeChanged(){return this._onAtEdgeChanged}get onBlockedMoveAttempt(){return this._onBlockedMoveAttempt}get onBeginHorizontalTween(){return this._onBeginHorizontalTween}get onBeginVerticalTween(){return this._onBeginVerticalTween}get onUpdateHorizontalTween(){return this._onUpdateHorizontalTween}get onUpdateVerticalTween(){return this._onUpdateVerticalTween}get onEndHorizontalTween(){return this._onEndHorizontalTween}get onEndVerticalTween(){return this._onEndVerticalTween}constructor(){super(),this._cameraTransitionTimeMS=300,this.transitionEase=W.GS3.Exponential.Out,this._onFullScrollComplete=new W.HN0,this._fullScrollH=!1,this._fullScrollV=!1,this._canMoveUp=!0,this._canMoveDown=!0,this._canMoveLeft=!0,this._canMoveRight=!0,this._onAtEdgeChanged=new W.HN0,this._onBlockedMoveAttempt=new W.HN0,this._onBeginHorizontalTween=new W.HN0,this._onBeginVerticalTween=new W.HN0,this._onUpdateHorizontalTween=new W.HN0,this._onUpdateVerticalTween=new W.HN0,this._onEndHorizontalTween=new W.HN0,this._onEndVerticalTween=new W.HN0,this.transitionDistance={x:F.q.instance.game.width,y:F.q.instance.game.height},this._signalBindings=[],this._canMoveLeft=!0,this._broadcaster=this._game.broadcaster}onEnable(){super.onEnable();for(let k=0;k{this.scrollUp(k)}:this.CanMoveUp?(this.scrollVertical(this.y-this.transitionDistance.y,0,k),this._broadcaster.broadcast(H.D.MESSAGE_DISABLE_BUTTON)):this.blockedMoveAttempt(St.UP)}scrollDown(k=!1){W.Aq$.isDefined(this._verticalTween)&&this._verticalTween.isRunning?this._verticalQueue=()=>{this.scrollDown(k)}:this.CanMoveDown?(this.scrollVertical(this.y+this.transitionDistance.y,0,k),this._broadcaster.broadcast(H.D.MESSAGE_DISABLE_BUTTON)):this.blockedMoveAttempt(St.DOWN)}scrollLeft(k=!1){W.Aq$.isDefined(this._horizontalTween)&&this._horizontalTween.isRunning?this._horizontalQueue=()=>{this.scrollLeft(k)}:this.CanMoveLeft?(this.scrollHorizontal(this.x-this.transitionDistance.x,k),this._broadcaster.broadcast(H.D.MESSAGE_DISABLE_BUTTON)):this.blockedMoveAttempt(St.LEFT)}scrollRight(k=!1){W.Aq$.isDefined(this._horizontalTween)&&this._horizontalTween.isRunning?this._horizontalQueue=()=>{this.scrollRight(k)}:this.CanMoveRight?(this.scrollHorizontal(this.x+this.transitionDistance.x,k),this._broadcaster.broadcast(H.D.MESSAGE_DISABLE_BUTTON)):this.blockedMoveAttempt(St.RIGHT)}scrollVertical(k,B=0,U=!1){if(!this.Active)return void this.cleanup();const F=Math.min(this.bounds.bottom,Math.max(this.bounds.top,k));this.checkVerticalLimits(F),this._verticalTween=this._game.add.tween(this,this).to({y:F},this._cameraTransitionTimeMS,this.transitionEase,!0,B),this._verticalTween.onTweenComplete.add(this.onCompleteVertical.bind(this)),this.onBeginVerticalTween.dispatch(F,U),this._verticalTween.onUpdate.add(this.onUpdateVerticalTween.dispatch,this.onUpdateVerticalTween)}scrollHorizontal(k,B=!1){if(!this.Active)return void this.cleanup();const U=Math.min(this.bounds.right-this.cameraWidth,Math.max(this.bounds.left,k));this.checkHorizontalLimits(U),this._horizontalTween=this._game.add.tween(this,this).to({x:U},this._cameraTransitionTimeMS,this.transitionEase,!0),this._horizontalTween.onTweenComplete.add(this.onCompleteHorizontal.bind(this)),this.onBeginHorizontalTween.dispatch(U,B),this._horizontalTween.onUpdate.add(this.onUpdateHorizontalTween.dispatch,this.onUpdateHorizontalTween)}scrollToPosition(k,B){this._fullScrollH=!1,this._fullScrollV=!1,this.scrollHorizontal(k),this.scrollVertical(B)}get onFullScrollCompleted(){return this._onFullScrollComplete}onCompleteVertical(){this._verticalTween=null,this.onEndVerticalTween.dispatch(),this._fullScrollV=!0,this._fullScrollH&&(this._onFullScrollComplete.dispatch(),this._fullScrollH=!1,this._fullScrollV=!1),this.checkVerticalLimits(this.y),this._verticalQueue&&(this._verticalQueue(),this._verticalQueue=null),this._broadcaster.broadcast(H.D.MESSAGE_ENABLE_BUTTON)}onCompleteHorizontal(){if(this._horizontalTween=null,this.onEndHorizontalTween.dispatch(),this._fullScrollH=!0,this._fullScrollV&&(this._onFullScrollComplete.dispatch(),this._fullScrollH=!1,this._fullScrollV=!1),this.checkHorizontalLimits(this.x),this._horizontalQueue)return this._horizontalQueue(),void(this._horizontalQueue=null);this._broadcaster.broadcast(H.D.MESSAGE_ENABLE_BUTTON)}blockedMoveAttempt(k){this.cleanup(),this.onBlockedMoveAttempt.dispatch(k)}cleanup(){this._broadcaster.broadcast(H.D.MESSAGE_ENABLE_BUTTON)}setTransitionDistanceScreenRatio(k,B){this.transitionDistance.x=this._game.width*k,this.transitionDistance.y=this._game.height*B}updateBounds(){super.updateBounds(),this.checkVerticalLimits(this.y),this.checkHorizontalLimits(this.x)}checkVerticalLimits(k=0){if(!this.bounds)return;const B=k>this.bounds.top&&this.cameraHeightthis.bounds.left&&this.cameraWidth0;this.shouldAddNewFloor()?this._shouldHaveShroud||this._shouldHaveShadow||!k||this.spawnAddFloorPrefab():this.spawnInProgressFloorPrefab();const B=this._owner.map.breadCrumbManager;if(this._shouldHaveShroud)this.spawnShroudCloud();else if(this._shouldHaveShadow){if(!B.isBreadcrumbComplete(Ot.M.StubbornShadowTutorialOneCompleted)){const k=this._mathTower.currentTown.towers.length-1,B=this._mathTower.currentTown.towers[k].floors.length-1;return void this.switchState(H.D.STATE_ROOFTOP,{towerIndex:k,floorIndex:B})}B.isBreadcrumbComplete(Ot.M.StubbornShadowTutorialTwoCompleted)||B.completeBreadcrumb(Ot.M.StubbornShadowTutorialTwoCompleted),this.spawnStubbornShadow()}this.bringHUDToTop(),this._hudInterface.forceEnabledLeft=!0,this._pageCamera.onBlockedMoveAttempt.add(this.onBlockedMoveAttempt,this),this._owner.switchParams.shroudComplete&&!B.isBreadcrumbComplete(Ot.M.ShroudTutorialCompleted)&&(B.completeBreadcrumb(Ot.M.ShroudTutorialCompleted),this._owner.dialogueController.addEvents([{callback:()=>{this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_DISABLE_NAVIGATION)}},{dialogueData:this._owner.dialogueController.dataProvider.get(H.D.DIALOGUE_SHROUD_FTUE_4),blockInput:!0},{callback:()=>{this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_ENABLE_NAVIGATION)}}]),this._owner.dialogueController.start(!0)),this._owner.moveToNextFloor(this._shouldHaveShadow),this._owner.map.townRenderer.onFloorClicked.add(this.onFloorClicked.bind(this)),this.setupHorizontalTween(),this._pageCamera.onBeginVerticalTween.add((()=>{this._addFloorTooltip&&this._addFloorTooltip.close()}),this),Pt.firstTimeInState&&this._mathTower.shouldUseInfinityTowerMode()&&this._owner.map.showInfinityTowerDialog(),Pt.firstTimeInState=!1;const U=this._owner.mathTower.hasAvailableFloatlings()?H.D.MESSAGE_ENABLE_FLING_BUTTON:H.D.MESSAGE_DISABLE_FLING_BUTTON;this._mathTower.game.broadcaster.broadcast(U)}shouldAddNewFloor(){return!this._activeFloor||!this._activeSkill||this._activeFloor.isExternalBuild||this._activeFloor.hasMaxBlocks}closeAllInterfaces(){this._buildInterface&&(this._buildInterface.close(),this._buildInterface=null),this._shroudInterface&&(this._shroudInterface.close(),this._shroudInterface=null),this._rooftopInterface&&(this._rooftopInterface.close(),this._rooftopInterface=null),this._moveFloorInterface&&(this._moveFloorInterface.close(),this._moveFloorInterface=null),this._addFloorTooltip&&this._addFloorTooltip.close()}onExit(){this._owner.switchParams.keepHud||this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_DISABLE_NAVIGATION),W.Aq$.isDefined(this._addFloor)&&this._addFloor.GameObject&&(this._addFloor.addFloorButton.onClick.removeAll(),this._addFloor.GameObject.destroy(),this._addFloor=null),this.closeAllInterfaces(),this._owner.map.townRenderer.onFloorClicked.removeAll(),this._pageCamera.onBeginVerticalTween.removeAll(this),this._pageCamera.onBeginHorizontalTween.removeAll(this),this._pageCamera.onBlockedMoveAttempt.removeAll(this),this._hudInterface.forceEnabledLeft=!1}spawnAddFloorPrefab(){const k=this._owner.prefabLoader.loadFromGUID(H.D.UI_ADD_FLOOR_PREFAB,this._owner.map.screen.backgroundGameObject);At.Z.bringToTop(this._owner.map.screen.user),this._addFloor=k.findComponent(Rt.R),k.legacyTransform.group.position=this._owner.nextFloorPosition(),this._owner.nextTowerAvailable()||this._addFloor.removeNewTowerButton(),this._addFloor.addFloorButton.onClick.add(this.onAddFloorButtonClicked.bind(this)),this._mathTower.currentTown.towers[this._mathTower.currentTown.towers.length-1].floors.length===ot.o.MAXIMUM_FLOOR_COUNT?this.onNewTowerButtonClicked():this._addFloor.newTowerButton.onClick.add(this.onNewTowerButtonClicked.bind(this))}spawnInProgressFloorPrefab(){const k=this._owner.getFloorPosition(this._activeFloorIndex.x,this._activeFloorIndex.y+1),B=this._mathTower.activeFloor;this._buildInterface=this._mathTower.uiFactory.buildInterface(k),this._buildInterface.onCreate.add(this.inProgressPrefabCreated.bind(this)),B.hasShroud&&this._buildInterface.onCreate.add(this.setBuildButtonVisible.bind(this,!1)),this._owner.moveToNextFloor()}spawnShroudCloud(){this._shroudInterface=this._mathTower.uiFactory.shroudLockInterface(),this._shroudInterface.onCreate.add(this.onShroudInterfaceCreated.bind(this))}spawnStubbornShadow(){const k=this._mathTower.currentTown.towers[this._troubledFloorIndex.x].floors[this._troubledFloorIndex.y];this._rooftopInterface=this._mathTower.uiFactory.rooftopMasteryInterface(k),this._rooftopInterface.onCreate.add(this.onRooftopInterfaceCreated.bind(this))}inProgressPrefabCreated(){this._buildInterface.buildButton.onClick.add((()=>{this._mathTower.isClickable&&(this._mathTower.shouldUseInfinityTowerMode()?this.showButtonTooltip(this._buildInterface.buildButton):(this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_DISABLE_NAVIGATION),this.switchState(H.D.STATE_BUILD,{keepHud:!0})))}),this),W.Aq$.isDefined(this._shroudInterface)&&W.Aq$.isDefined(this._shroudInterface.gameObject)&&(this._shroudInterface.bringToTop(),this.bringHUDToTop())}onAddFloorButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._mathTower.isClickable&&(this._mathTower.shouldUseInfinityTowerMode()?this.showButtonTooltip(this._addFloor.addFloorButton):(this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_DISABLE_NAVIGATION,{keepHud:!0}),this._pageCamera.onBeginHorizontalTween.removeAll(this),this._pageCamera.onBeginHorizontalTween.addOnce((()=>{this.setupHorizontalTween()}),this),this._owner.moveToNextFloor(),this._pageCamera.onFullScrollCompleted.add(this.cameraFinishedScrolling.bind(this))))}showButtonTooltip(k){const B=this._mathTower.uiFactory.localizer.getText(H.D.TT_FINISH_TOWER_ON_ADD);this._addFloorTooltip=this._mathTower.uiFactory.buttonTooltip(this._addFloorTooltip,B,k,Ct.i.DOWN,this.changeState.bind(this,H.D.STATE_INFINITY,{enteringInfinity:!0}))}cameraFinishedScrolling(){this._pageCamera.onFullScrollCompleted.removeAll(),this._pageCamera.clearQueues(),this.switchState(H.D.STATE_CHOOSE_FLOOR)}onBlockedMoveAttempt(k){k===St.LEFT&&this._owner.map.showInfinityTowerDialog(!0)}onNewTowerButtonClicked(){this._mathTower.isClickable&&(this.closeAllInterfaces(),F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._mathTower.activeTower.isActiveTower=!1,this._mathTower.fireEvent(lt.L.TOWER_COMPLETED),this._addFloor.GameObject.active=!1,this._owner.map.townRenderer.towerRenderers[this._mathTower.currentTown.towers.length-1].onLuminTreeSpawned.add(this.switchState.bind(this,H.D.STATE_CAMERA)),this._mathTower.currentTown.createTower())}bringHUDToTop(){this._hudInterface.parent.setChildIndex(this._hudInterface,this._hudInterface.parent.children.length-1),this._mathTower.uiFactory.hud.bringToTop()}onShroudInterfaceCreated(){const k=this._owner.getFloorPosition(this._troubledFloorIndex.x,this._troubledFloorIndex.y+1);this._shroudInterface.setCleanButtonPosition(new rt.Point(k.x-H.D.BUTTON_OFFSET_X,k.y+H.D.BUTTON_OFFSET_Y)),this._shroudInterface.onCloudAppear.add(this.bringHUDToTop.bind(this)),this._shroudInterface.makeCloudAppear(k.x,k.y+H.D.SHROUD_OFFSET_Y,!0),this._shroudInterface.hideUI(),this._shroudInterface.cleanButton.onClick.add(this.cleanButtonClicked.bind(this)),this._owner.moveToNextFloor()}onRooftopInterfaceCreated(){this._rooftopInterface.toggleStaticUIVisibility(!1),this._rooftopInterface.attackButton.GameObject.active=!1;const k=this._owner.nextFloorPosition(!0);this._rooftopInterface.spawnStubbornShadow(k.x,k.y+H.D.STUBBORN_SHADOW_OFFSET_Y),this._rooftopInterface.battleButton.GameObject.legacyTransform.group.position.x=k.x,this._rooftopInterface.battleButton.GameObject.legacyTransform.group.position.y=k.y+H.D.BUTTON_OFFSET_Y,this._rooftopInterface.battleButton.onClick.add(this.battleButtonClicked.bind(this))}setBuildButtonVisible(k){this._buildInterface.buildButton.GameObject.active=k}cleanButtonClicked(){this._mathTower.isClickable&&(this._mathTower.shouldUseInfinityTowerMode()?this.showButtonTooltip(this._shroudInterface.cleanButton):this.switchState(H.D.STATE_SHROUD,{questionOnEnter:!0,towerIndex:this._troubledFloorIndex.x,floorIndex:this._troubledFloorIndex.y}))}battleButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._mathTower.isClickable&&(this._mathTower.shouldUseInfinityTowerMode()?this.showButtonTooltip(this._rooftopInterface.battleButton):this.switchState(H.D.STATE_ROOFTOP,{resumeBattle:!0,towerIndex:this._troubledFloorIndex.x,floorIndex:this._troubledFloorIndex.y}))}onFloorClicked(k,B){if(!this._mathTower.isClickable)return;F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK);const U=this._mathTower.currentTown;if(U.towers[k].floors[B].isExternalBuild)return void(this._owner.currentState!==this._owner.states.get(H.D.STATE_QUICK_RENO)&&(this._owner.map.townRenderer.towerRenderers[k].floors[B].onQuickRenoClicked(),this._owner.map.townRenderer.moveToFloor(k,B+1),this._pageCamera.clearQueues(),this.switchState(H.D.STATE_QUICK_RENO,{towerIndex:k,floorIndex:B})));const G=U.towers.length,j=U.towers[k],$=k-1>=0?U.towers[k-1]:null,V=k+1{F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._moveFloorInterface.warningObject.active=!1,this._moveFloorInterface.arrowObject.active=!1}))}setupHorizontalTween(){this._pageCamera.onBeginHorizontalTween.add((()=>{this._addFloorTooltip&&this._addFloorTooltip.close()}),this)}changeState(k,B={}){this._owner.changeToState(k,B)}}Pt.firstTimeInState=!0,(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],Pt.prototype,"onAddFloorButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],Pt.prototype,"onNewTowerButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],Pt.prototype,"cleanButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],Pt.prototype,"battleButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[Number,Number]),(0,et.Sn)("design:returntype",void 0)],Pt.prototype,"onFloorClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[String,Object]),(0,et.Sn)("design:returntype",void 0)],Pt.prototype,"changeState",null);var Mt=U(642),Nt=U(2272);class xt extends wt{constructor(){super(...arguments),this._returnState=H.D.STATE_CAMERA,this._buildState=H.D.STATE_BUILD}onEnter(){const k=this._owner.nextFloorPosition();this._chooseFloor=this._mathTower.uiFactory.chooseFloorLook(k),this._chooseFloor.onCreate.add(this.onChooseFloorInterfaceCreated.bind(this)),this._chooseFloor.selectionChanged.add(this.selectionChanged.bind(this)),this._towerIndex=this._mathTower.currentTown.towers.length-1,this._floorIndex=this._mathTower.currentTown.towers[this._towerIndex].floors.length}onExit(){this._chooseFloor.close(),this._mathTower.uiFactory.despawnScrim()}onChooseFloorInterfaceCreated(){this.bindButtons(),this.setupTempFloor();const k=this.getFloorPosition();this._chooseFloor.startBuildingButton.GameObject.legacyTransform.group.position.set(k.x-H.D.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_X,k.y+H.D.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_Y),this.spawnScrim()}spawnScrim(){this._mathTower.uiFactory.spawnScrim(this._towerIndex,this._floorIndex)}getFloorPosition(){return this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1)}bindButtons(){this._chooseFloor.quitButton.onClick.add(this.quitPopup.bind(this)),this._chooseFloor.startBuildingButton.onClick.add(this.onStartBuildingClicked.bind(this))}setupTempFloor(){const k=this.getActiveTower();this._tempFloor=k.createFloor(this._mathTower.currentSkillID),this._tempFloor.blockCount=H.D.MAX_SMART_BLOCKS,this._tempFloor.roomID=1,this._tempFloor.frameID=2}getActiveTower(){let k=this._mathTower.activeTower;return(!W.Aq$.isDefined(k)||k.floors.length>=ot.o.MAXIMUM_FLOOR_COUNT)&&(k=this._mathTower.currentTown.createTower()),k}quitPopup(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),F.q.instance.prodigy.open.confirmationDialog(new Mt.k(this._owner.localizer.getText(H.D.POPUP_CHOOSE_FLOOR_QUIT_BUTTON),this.onQuitClicked.bind(this),this._owner.localizer.getText(H.D.POPUP_CHOOSE_FLOOR_STAY_BUTTON),void 0,{atlas:H.D.ATLAS_STORE,name:"icon-large-exclamation"},Nt.E.Small,void 0,this._owner.localizer.getText(H.D.POPUP_CHOOSE_FLOOR_QUIT_TITLE),this._owner.localizer.getText(H.D.POPUP_CHOOSE_FLOOR_QUIT_BODY)))}onQuitClicked(){this._mathTower.activeTower.removeFromTop(),this.switchState(this._returnState)}onStartBuildingClicked(){this._tempFloor.blockCount=ht.g.determineNewBlockCount(this._mathTower.education.getSkillById(this._tempFloor.skillID),this._tempFloor),this._mathTower.fireEvent(lt.L.FLOOR_START_BUILDING),this._mathTower.activeFloor.state=_t.u.UnderConstruction,this.switchState(this._buildState)}selectionChanged(k){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._tempFloor.roomID=W.Aq$.isDefined(k.roomID)?k.roomID:1,this._tempFloor.frameID=W.Aq$.isDefined(k.frameID)?k.frameID:2,this._tempFloor.decorations.clear(),k.decorations&&k.decorations.forEach(((k,B)=>{this._tempFloor.decorations.setAt(B,k)}))}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],xt.prototype,"quitPopup",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],xt.prototype,"onQuitClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],xt.prototype,"onStartBuildingClicked",null);var Lt=U(75329),kt=U(65240),Bt=U(49237),Ut=U(8182),Ft=U(48199),Gt=U(43531),jt=U(23748);class $t extends W.uAl{constructor(){super(...arguments),this._objects=[],this._deltaX=0,this._deltaY=0}get objects(){return this._objects}get deltaX(){return this._deltaX}set deltaX(k){this._deltaX=k;for(let B=0;BH.D.ELEMENT_STRINGS.map((U=>`${k}${U}${B}`)))("bucket-")),this.targets.setAnchor(.5,1),this.targets.deltaX=170,this.shimmerSpines=[];for(let B=0;B{k.setAnimationByName(0,`idle-${H.D.ELEMENT_STRINGS[B]}`,!0)}))}isInTarget(k,B){const U=H.D.ELEMENT_STRINGS.indexOf(B);if(U>-1){const B=this.targets.objects[U].legacyTransform.x+this.GameObject.legacyTransform.x-this._targetHalfWidth,F=this.targets.objects[U].legacyTransform.x+this.GameObject.legacyTransform.x+this._targetHalfWidth;if(k>B&&k{k.GameObject.active=!1})),this._floatlingRenderers=[],this._floatling&&(this._floatling.GameObject.active=!1,this._floatling=null),this.canFire=!1}enableInput(){this._game.input.onDown.removeAll(this),this._game.input.onUp.removeAll(this),this._game.input.onDown.add(this.onMouseDown,this),this._game.input.onUp.add(this.onMouseUp,this),this._mouseDownWhileCanFire=!1}disableInput(){this._game.input.onDown.removeAll(this),this._game.input.onUp.removeAll(this),this.onMouseUp(),this._startMousePosition=null}spawnFloatlings(k){this._floatlingRenderers=[],this._floatlings=k;const B=Math.min(k.length,H.D.FLING_MAX_COUNT_DISPLAYED);for(let F=0;F{k.playAnimation(dt.IDLE)})),this._floatlingRenderers.push(k)}readyNextFloatling(){if(0===this._floatlingRenderers.length)return;const k=this._floatlingRenderers[0];k.activeTween&&k.activeTween.isRunning?k.activeTween.onTweenComplete.add(this.readyNextFloatling,this):this.setFloatling(this._floatlingRenderers.shift())}setFloatling(k){this._floatling=k;const B=this.GameObject.legacyTransform.group.children.length-1;this.GameObject.legacyTransform.group.setChildIndex(this._floatling.GameObject.legacyTransform.group,B),this.GameObject.legacyTransform.group.setChildIndex(this._frontElasticImage.GameObject.legacyTransform.group,B),this.GameObject.legacyTransform.group.setChildIndex(this._foregroundImage.GameObject.legacyTransform.group,B),this._game.add.tween(this._floatling.GameObject.legacyTransform.group,this).to({x:0},500,W.GS3.Linear.None,!0);const U=this._game.add.tween(this._floatling.GameObject.legacyTransform.group,this).to({y:-100},250,W.GS3.Quadratic.Out,!1),F=this._game.add.tween(this._floatling.GameObject.legacyTransform.group,this).to({y:0},250,W.GS3.Quadratic.In,!1);F.onTweenComplete.add((()=>{this.canFire=!0,this.targets.highlightTarget(k.elementType),this._floatlingTweeningToSling=!1})),U.chain(F),U.start(),this._floatlingTweeningToSling=!0,this._floatlings.length>0&&this.spawnFloatling();for(let G=0;G{k.playAnimation(dt.WALK)})),k.activeTween.onTweenComplete.add((()=>{k.playAnimation(dt.IDLE)})),k.activeTween.start()}}fireFloatling(){this._floatling.spine.setSlotVisibility("shadow",!1),this._startMousePosition=null,this._firingTime=0,this.canFire=!1,this.hidePips(),this._game.add.tween(this._slingImage.GameObject.legacyTransform.group,this).to({rotation:0,x:0,y:0},400,W.GS3.Elastic.Out,!0),this._slingTarget={x:0,y:0},F.q.instance.prodigy.audio.playSFX(H.D.FLOATLING_FLING_SFX_ID,H.D.LAUNCH_FLOATLING)}onMouseDown(){this.canFire&&(this._mouseDownWhileCanFire=!0,this._game.input.activePointer.justPressed&&(this._startMousePosition={x:this._game.input.activePointer.position.x,y:this._game.input.activePointer.position.y}))}onMouseUp(){if(this.canFire&&this._mouseDownWhileCanFire)return this._mouseDistance{this._pips[B].setAlpha(0)}),B*k)}normalizePosition(){this._mousePosition.x=Math.min(this._mousePosition.x,this._startMousePosition.x),this._mousePosition.y=Math.max(this._mousePosition.y,this._startMousePosition.y)}elasticTransform(k){let B=Math.sqrt(this._slingImage.GameObject.legacyTransform.x*this._slingImage.GameObject.legacyTransform.x+this._slingImage.GameObject.legacyTransform.y*this._slingImage.GameObject.legacyTransform.y);B/=61;const U=Math.atan2(this._slingImage.GameObject.legacyTransform.y,this._slingImage.GameObject.legacyTransform.x);this._elasticMatrix.a=B*Math.cos(U),this._elasticMatrix.b=B*Math.sin(U),this._elasticMatrix.c=Math.sin(0),this._elasticMatrix.d=Math.cos(0),this._elasticMatrix.tx=k.legacyTransform.group.x,this._elasticMatrix.ty=k.legacyTransform.group.y,k.legacyTransform.group.transform.setFromMatrix(this._elasticMatrix)}update(){if(super.update(),this.elasticTransform(this._backElasticImage.GameObject),this.elasticTransform(this._frontElasticImage.GameObject),this._firingTime>=0){this._firingTime+=F.q.instance.game.time.deltaMS/1e3;const k=this.getArcPosition(this._fireAngle,this._firePower,this._firingTime);return this._floatling.GameObject.legacyTransform.group.position.set(k.x,k.y),void(k.y>this.targets.getHeightAt(k.x)&&this.endShot())}if(this._slingImage.GameObject.legacyTransform.x=jt.z.clampedLerp(this._slingImage.GameObject.legacyTransform.x,this._slingTarget.x,.1),this._slingImage.GameObject.legacyTransform.y=jt.z.clampedLerp(this._slingImage.GameObject.legacyTransform.y,this._slingTarget.y,.1),this._floatling&&(this._floatlingTweeningToSling||(this._floatling.GameObject.legacyTransform.group.position.x=this._slingImage.GameObject.legacyTransform.x,this._floatling.GameObject.legacyTransform.group.position.y=this._slingImage.GameObject.legacyTransform.y)),!this._startMousePosition)return this._firePower=0,void(this._slingTarget={x:0,y:0});this._game.input.activePointer.isDown&&(this._mousePosition={x:this._game.input.activePointer.position.x,y:this._game.input.activePointer.position.y},this.normalizePosition());const k={x:this._mousePosition.x-this._startMousePosition.x,y:this._mousePosition.y-this._startMousePosition.y};if(this._fireAngle=this.calculateFireAngle(k),this._firePower=this.calculateFirePower(this._mousePosition,this._startMousePosition),this._mouseDistance0}destroy(){this._onLand.dispose(),super.destroy()}}var Wt=U(65826),qt=U(15016);class Kt extends W.uAl{create(){super.create(),this._game=F.q.instance.game;const k=new W._mx(this.GameObject);k.addComponent(W.K16),this.scorePrefabs=k.addComponent($t),this.scorePrefabs.generateFromPrefab(H.D.UI_RESEARCH_POINTS_PANEL_PREFAB,5),this.scorePrefabs.deltaX=145,this.texts=[],this.scores=[];const B=F.q.instance.prodigy.gameContainer.get("580-3bea");Wt.b.statusRequiresConsent(B.consentStatus)&&(this.scorePrefabs.GameObject.legacyTransform.y+=qt.R.HUD_RESERVE_HEIGHT);for(let U=0;U{this.texts[k].text=this.scores[k].toString()})),U.chain(F),U.start()}getCombinedScore(){let k=0;for(let B=0;B{k.state=vt.a.Awake})),this._postGameSignal.addOnce(B),this.GameObject.parent.legacyTransform.group.setChildIndex(this.GameObject.legacyTransform.group,this.GameObject.parent.children.length-1),this.GameObject.active=!0,this._oldCameraBounds=this.camera.bounds,this._oldCameraPosition={x:this.camera.x,y:this.camera.y},this.GameObject.legacyTransform.y=-this.camera.bounds.height-1*this.camera.cameraHeight,this.GameObject.legacyTransform.x=this.camera.x,this.camera.bounds=null,this.camera.Active=!1;const U=this.isFtue?H.D.FLING_FTUE_INTRO_DIALOGUE_Y_OFFSET:0;this._game.add.tween(this.camera,this).to({x:this.GameObject.legacyTransform.x,y:this.GameObject.legacyTransform.y+U},H.D.FLING_CAMERA_TWEEN_IN_MS,W.GS3.Quadratic.Out,!0).onUpdateCallback(this.camera.onUpdateVerticalTween.dispatch,this.camera.onUpdateVerticalTween).onTweenComplete.add((()=>{this._catapult.Active=!0,this._catapult.spawnFloatlings(this._floatlings.slice(0)),this.isFtue?this.startFTUE():(this._quitButton.GameObject.active=!0,this.startCatapult())})),this._game.add.tween(this._scoreManager.GameObject.legacyTransform.group,this).to({y:H.D.FLING_SCORE_MANAGER_Y+U},H.D.FLING_CAMERA_TWEEN_IN_MS,W.GS3.Quadratic.Out,!0),this.characterController.tweenToPosition({x:this.GameObject.legacyTransform.group.position.x+H.D.PLAYER_FLING_OFFSET_X,y:this.GameObject.legacyTransform.group.position.y+H.D.PLAYER_FLING_OFFSET_Y},H.D.FLING_CAMERA_TWEEN_IN_MS,H.D.FLING_PLAYER_DELAY_OFFSET_MS,W.GS3.Quadratic.Out),F.q.instance.prodigy.audio.playBGM(H.D.FLOATLING_FLING_BGM_ID,!0)}startCatapult(){this._catapult.onLand.add(this.onFloatlingLand,this),this._catapult.readyNextFloatling()}onFloatlingLand(k,B){B.floatling.lastThrown=Date.now(),k?this.animateFloatlingScore(B):this._game.add.tween(B.GameObject.legacyTransform.group,this).to({y:300,alpha:0},500,W.GS3.Quadratic.In,!0).onTweenComplete.add(this.onFloatlingScoreTweenEnd.bind(this,B)),this._catapult.readyNextFloatling()}animateFloatlingScore(k){k.researchPointVisible=!0,this._scoreManager.addScore(k.elementType,this.isFtue?H.D.FLING_FTUE_POINTS_PER_SHOT:k.researchScore);const B=this._scoreManager.scorePrefabs.objects[k.elementType].legacyTransform.group,U=this._catapult.GameObject.legacyTransform.group,F=B.getGlobalPosition(),G=F.x-U.x+.5*B.width,j=F.y-U.y;this._game.add.tween(k.GameObject.legacyTransform.group,this).to({x:G,y:j,alpha:0},500,W.GS3.Quadratic.In,!0).onTweenComplete.add(this.onFloatlingScoreTweenEnd.bind(this,k))}onFloatlingScoreTweenEnd(k){k.GameObject.destroy(),this._catapult.hasFloatlings()||this.awardPoints(this.showEndPopup.bind(this))}startFTUE(){this._ftueTutorialLabel=this._prefabLoader.loadFromGUID(H.D.UI_TUTORIAL_TAG,F.q.instance.prodigy.open.menusGameObject),this._ftueTutorialLabel.legacyTransform.group.position.set(32,32);const k=new Gt.rD(this._game),B=[];for(let U=0;U{this._game.add.tween(this.camera,this).to({x:this.GameObject.legacyTransform.x,y:this.GameObject.legacyTransform.y},H.D.FLING_CAMERA_TWEEN_IN_MS,W.GS3.Quadratic.Out,!0).onTweenComplete.add((()=>{this.showHowToFlingFTUE()})),this._game.add.tween(this._scoreManager.GameObject.legacyTransform.group,this).to({y:H.D.FLING_SCORE_MANAGER_Y},H.D.FLING_CAMERA_TWEEN_IN_MS,W.GS3.Quadratic.Out,!0)}}),k.addEvents(B),k.start()}showHowToFlingFTUE(){this._catapult.readyNextFloatling(),this._catapult.onLand.add(this.onFloatlingLandFTUE,this),this._ftueTooltip=this._prefabLoader.load(10,this.GameObject).findComponent(Ut.p),this._ftueTooltip=Ft.A.displayToolTipAuto(this._ftueTooltip,this.GameObject,{bodyText:F.q.instance.prodigy.gameContainer.get(W.$Bt.LocalizationService).getText(H.D.FLING_CLICK_AND_DRAG),xPosition:300,yPosition:164}),this._ftueTooltip._timeout.stop();const k=new W._mx(this.GameObject);k.addComponent(W.K16),this._ftueHand=k.addComponent(ut._),this._ftueHand.setAsset(H.D.ATLAS_ICONS,"help"),this._ftueHand.GameObject.legacyTransform.group.position.set(450,256),this._ftueHandTween=this._game.add.tween(this._ftueHand.GameObject.legacyTransform.group,this).to({x:350,y:400},2e3,W.GS3.Quadratic.In,!0,500).loop(!0)}onFloatlingLandFTUE(k,B){if(k){B.floatling.lastThrown=Date.now(),this.animateFloatlingScore(B),this.onFloatlingScoredFTUE();const k=new Gt.rD(this._game);k.addEvents([{dialogueData:k.dataProvider.get(H.D.FLING_FTUE_POST_FLING),blockInput:!0},{callback:this.showFTUEEndPopup.bind(this)}]),k.start()}else{const k=new Gt.rD(this._game);k.addEvents([{dialogueData:k.dataProvider.get(H.D.FLING_FTUE_MISSED),blockInput:!0},{callback:this._catapult.setFloatling.bind(this._catapult,B)}]),k.start()}}onFloatlingScoredFTUE(){this._catapult.onLand.removeAll(),this._ftueHandTween.stop(),this._ftueHand.GameObject.destroy(),this._ftueTooltip.GameObject.destroy(),this._ftueTooltip=null}showEndPopup(){F.q.instance.prodigy.open.informationDialog(new Lt.Z(H.D.POPUP_FLING_FINISH_BUTTON,(()=>{this.returnToGame()}),Nt.E.Medium,void 0,H.D.POPUP_FLING_FINISH_TITLE,H.D.POPUP_FLING_FINISH_BODY,!0,H.D.ATLAS_SWOOPY_FACE,H.D.ATLAS_SWOOPY_FACE_FRAME_DEFAULT))}showFTUEEndPopup(){F.q.instance.prodigy.open.informationDialog(new Lt.Z(H.D.POPUP_NO_FLOATLINGS_CONFIRM,this.startCatapult.bind(this),Nt.E.Medium,void 0,H.D.POPUP_FLING_COLLECT_TITLE,H.D.POPUP_FLING_COLLECT_BODY,!0,H.D.FLOATLING_FLING_RESEARCH_ICONS))}onQuitClick(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._catapult.disableInput();const k=F.q.instance.prodigy.gameContainer.get(W.$Bt.LocalizationService);F.q.instance.prodigy.open.confirmationDialog(new Mt.k(k.getText(H.D.POPUP_FLING_QUIT_CONFIRM),(()=>{this.awardPoints(this.returnToGame.bind(this))}),k.getText(H.D.POPUP_FLING_QUIT_DECLINE),(()=>{this._catapult.enableInput()}),{atlas:H.D.ATLAS_STORE,name:"icon-large-exclamation"},Nt.E.Small,void 0,k.getText(H.D.POPUP_FLING_QUIT_TITLE),k.getText(H.D.POPUP_FLING_QUIT_BODY),!0))}awardPoints(k){if(!this.GameObject.active)return;this._quitButton.onClick.removeAll(this),this._quitButton.GameObject.active=!1,this._ftueTutorialLabel&&(this._ftueTutorialLabel.destroy(),this.breadcrumbManager.completeBreadcrumb(Ot.M.FlingTutorialComplete));const B=this._scoreManager.scores,U=[];for(let F=0;F0&&U.push({type:"currency",ID:H.D.FLING_CURRENCY_ORDER[F],N:B[F]});F.q.instance.prodigy.gameContainer.get("c47-20b6");U.length>0?F.q.instance.prodigy.open.gotItem(U,k,null,null,null,null,{source_type:kt.C.MiniGame}):k()}returnToGame(){this._floatlings.forEach((k=>{k.state=vt.a.Wandering})),this._game.add.tween(this.camera,this).to({x:this._oldCameraPosition.x,y:0},H.D.FLING_CAMERA_TWEEN_OUT_MS,W.GS3.Quadratic.Out,!0,H.D.FLING_CAMERA_LEAVE_DELAY_MS).onUpdateCallback(this.camera.onUpdateVerticalTween.dispatch,this.camera.onUpdateVerticalTween).onTweenComplete.add(this.onFinishReturnToGame,this),this.characterController.tweenToPosition({x:this._oldCameraPosition.x+H.D.PLAYER_CAMERA_OFFSET_X,y:H.D.PLAYER_CAMERA_OFFSET_Y},H.D.FLING_CAMERA_TWEEN_OUT_MS,H.D.FLING_CAMERA_LEAVE_DELAY_MS+H.D.FLING_PLAYER_DELAY_OFFSET_MS,W.GS3.Quadratic.Out),F.q.instance.prodigy.audio.playBGM(H.D.TOWER_TOWN_BGM_ID,!0)}onFinishReturnToGame(){if(this.isFtue){this._isFtue=!1;const k=new Gt.rD(this._game),B=[];H.D.FLING_FTUE_OUTRO_DIALOGUES.forEach((U=>{B.push({dialogueData:k.dataProvider.get(U),blockInput:!0})})),B.push({callback:this.onFinishReturnToGame.bind(this)}),k.addEvents(B),k.start()}else this.GameObject.active=!1,this.camera.Active=!0,this.camera.bounds=this._oldCameraBounds,this._postGameSignal.dispatch()}destroy(){this._postGameSignal.dispose(),super.destroy()}}class Yt extends wt{constructor(k){super(),this._floatlingPool=k}init(k){super.init(k),this.createFloatlingFling(),this._mathTower.onUpdate.add((k=>{k.type===lt.L.TOWER_TOWN_FLOATLING_FLING_START&&this.switchState(H.D.STATE_FLING)}))}onEnter(){super.onEnter();const k=this._owner.mathTower.getFloatlingsForFling();0!==k.length?(this._floatlingFling.startFloatlingFling(k,this.onFinishFloatlingFling.bind(this)),this._mathTower.events.handleNotification(this._mathTower,new gt.L(this._mathTower,lt.L.TOWER_TOWN_FLOATLING_FLING_START))):this.showNoFloatlingPopup()}createFloatlingFling(){const k=new W._mx(this._owner.map.screen.backgroundGameObject);k.addComponent(W.K16),this._floatlingFling=k.addComponent(zt),this._floatlingFling.breadcrumbManager=this._owner.map.breadCrumbManager,this._floatlingFling.camera=this._owner.map.pageCamera,this._floatlingFling.GameObject.active=!1,this._floatlingFling.characterController=this._owner.map.characterController,this._floatlingFling.floatlingPool=this._floatlingPool}showNoFloatlingPopup(){F.q.instance.prodigy.open.informationDialog(new Lt.Z(H.D.POPUP_NO_FLOATLINGS_CONFIRM,(()=>{this.returnToTownState()}),Nt.E.Medium,void 0,H.D.POPUP_NO_FLOATLINGS_TITLE,H.D.POPUP_NO_FLOATLINGS_BODY,!0,H.D.POPUP_NO_FLOATLINGS_ICON))}onFinishFloatlingFling(){this._owner.map.refreshVisibleTown(),this._mathTower.uiFactory.hud.updateBreadcrumbsLocked(),this.returnToTownState(),this._mathTower.notifyUpdate(lt.L.TOWER_TOWN_FLOATLING_FLING_END),this._mathTower.fireEvent(lt.L.TOWER_TOWN_FLOATLING_FLING_END)}returnToTownState(){this._mathTower.isInfinity?this.switchState(H.D.STATE_INFINITY):this.switchState(H.D.STATE_CAMERA)}}var Qt=U(3836);class Xt extends Tt{constructor(){super(),this._defaultReturnState=H.D.STATE_INFINITY}getBuildInterface(){const k=this._owner.nextInfinityFloorPosition();return this._activeFloor=this._mathTower.activeFloor,new Qt._(this._owner.mathTower.game,this._owner.map.screen.backgroundGameObject,this._owner.mathTower,this._owner.prefabLoader,this._activeFloor,k.x+H.D.IN_PROGRESS_PREFAB_X_OFFSET,k.y+H.D.IN_PROGRESS_PREFAB_Y_OFFSET,Qt.i.Infinity)}wrongAnswer(){this._quitButton.inputEnabled=!0}floorFinished(){this.completeFloor(),this._mathTower.uiFactory.tooltip(this._owner.localizer.getText(H.D.TOOLTIP_FLOOR_FINISHED),!0,H.D.FLOOR_FINISHED_TOOLTIP_WIDTH),this._owner.map.townRenderer.checkAwardFloatlings(this._mathTower.activeInfinityFloor),this._mathTower.fireEvent(lt.L.TOWER_ROOM_BUILT),this.switchState(this._defaultReturnState)}spawnScrim(){this._mathTower.uiFactory.spawnInfinityScrim()}}class Zt extends xt{constructor(){super(),this._buildState=H.D.STATE_INFINITY_BUILD,this._returnState=H.D.STATE_INFINITY}getActiveTower(){return this._mathTower.currentTown.infinityTower}getFloorPosition(){return this._owner.nextInfinityFloorPosition()}spawnScrim(){this._mathTower.uiFactory.spawnInfinityScrim()}onQuitClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._mathTower.currentTown.infinityTower.removeFromTop(),this.switchState(this._returnState)}onStartBuildingClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._tempFloor.blockCount=0,this._mathTower.fireEvent(lt.L.FLOOR_START_BUILDING),this._mathTower.activeInfinityFloor.state=_t.u.UnderConstruction,this.switchState(this._buildState)}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],Zt.prototype,"onQuitClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],Zt.prototype,"onStartBuildingClicked",null);var Jt=U(76974),te=U(52080),ee=U(1041);class ie extends wt{constructor(k){super(),this._maxFloorAmount=100,this._townRenderer=k}init(k){super.init(k),this._map=k.map,this.createMap()}createMap(){const k=F.q.instance.game.width,B=F.q.instance.game.height;this._parent=new W._mx(this._townRenderer.GameObject),setTimeout((()=>{this._townRenderer.GameObject.legacyTransform.group.setChildIndex(this._parent.legacyTransform.group,0)})),this._parent.addComponent(W.K16).group.position.set(-k,0);const U=new W._mx(this._parent);U.addComponent(W.K16);const G=new W._mx(this._parent);G.addComponent(W.K16);const j=new te.Y(new rt.BaseRenderTexture({width:k,height:B})),$=new te.Y(new rt.BaseRenderTexture({width:k,height:B})),V=F.q.instance.prodigy.create.element(U.legacyTransform.group,0,0),q=F.q.instance.prodigy.create.element(G.legacyTransform.group,0,0),K=new ee.Z(F.q.instance.prodigy.gameContainer);K.init(this._map.game,V,q,{background:U,foreground:G},{mapName:H.D.MAP_INFINITY_TOWER_CONSTRUCTION,assets:H.D.TILESET_INFINITY_TOWER_CONSTRUCTION},(()=>{j.clear(),j.renderXY(V,0,0,!0),U.legacyTransform.group.addChild(F.q.instance.prodigy.create.image(0,0,void 0,void 0,j)),$.clear(),$.renderXY(q,0,0,!0),G.legacyTransform.group.addChild(F.q.instance.prodigy.create.image(0,0,void 0,void 0,$)),V.destroy(),q.destroy(),K.processAnimations(this._map.game,{above:G,below:U})}))}onEnter(){super.onEnter(),this._mathTower.isInfinity=!0,this.setupTower(),this._owner.mathTower.activeFloor&&!this._owner.mathTower.activeFloor.hasMaxBlocks?this.spawnInProgressFloorPrefab():(this.clearMidFloors(),this.setupAddFloorPrefab()),this.setupCamera(),this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_ENABLE_NAVIGATION),this._map.pageCamera.onBeginHorizontalTween.add(this.onHorizontalTween,this);const k=this._owner.mathTower.hasAvailableFloatlings()?H.D.MESSAGE_ENABLE_FLING_BUTTON:H.D.MESSAGE_DISABLE_FLING_BUTTON;this._mathTower.game.broadcaster.broadcast(k)}onExit(k){super.onExit(),this._map.pageCamera.onFullScrollCompleted.removeAll(this),this._map.pageCamera.onBeginHorizontalTween.removeAll(this),W.Aq$.isDefined(this._addFloor)&&this._addFloor.GameObject&&(this._addFloor.addFloorButton.onClick.removeAll(),this._addFloor.GameObject.destroy(),this._addFloor=null),this._buildInterface&&(this._buildInterface.close(),this._buildInterface=null),k!==H.D.STATE_INFINITY_BUILD&&k!==H.D.STATE_INFINITY_CHOOSE_FLOOR&&k!==H.D.STATE_FLING?this.cleanup():this._owner.switchParams.keepHud||this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_DISABLE_NAVIGATION)}cleanup(){this._mathTower.isInfinity=!1,this._map.pageCamera.onEnable(),this._townRenderer.GameObject.active=!0,this._townRenderer.updateBounds(),this._map.cameraHUDInterface.forceEnabledRight=!1,this._map.pageCamera.onBlockedMoveAttempt.removeAll(this)}spawnInProgressFloorPrefab(){const k=this._owner.nextFloorPosition();this._buildInterface=this._mathTower.uiFactory.buildInterface(k),this._buildInterface.onCreate.add(this.inProgressPrefabCreated.bind(this))}inProgressPrefabCreated(){this._buildInterface.buildButton.onClick.add(this.onBuildButtonClicked.bind(this)),this._buildInterface.buildButton.inputEnabled=this._mathTower.shouldUseInfinityTowerMode(),this._buildInterface.buildButton.currentState=this._mathTower.shouldUseInfinityTowerMode()?Jt.K.Up:Jt.K.Disabled}onBuildButtonClicked(){this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_DISABLE_NAVIGATION,{keepHud:!0}),this.switchState(H.D.STATE_INFINITY_BUILD)}onHorizontalTween(k){k===-F.q.instance.game.width&&this.switchState(H.D.STATE_CAMERA)}setupTower(){this._owner.mathTower.currentTown.infinityTower||this._owner.mathTower.currentTown.createInfinityTower()}setupCamera(){const k=F.q.instance.game.width,B=F.q.instance.game.height;this._map.pageCamera.onDisable();const U=this._map.pageCamera.bounds.width,G=-k,j=-H.D.FLOOR_HEIGHT*this._mathTower.currentTown.infinityTower.floors.length,$=-j+B;this._map.pageCamera.bounds.setTo(G,j,U,$),this._map.pageCamera.updateBounds(),this._map.pageCamera.onEndVerticalTween.add((()=>{this._owner.switchParams.backToTowerTown&&this.switchState(H.D.STATE_CAMERA)})),this._map.pageCamera.onFullScrollCompleted.add(this.onFinishTransitionIn,this),this._owner.switchParams.enteringInfinity?this._map.pageCamera.scrollToPosition(-k,0):this.scrollToTop()}clearMidFloors(){const k=this._owner.mathTower.currentTown.infinityTower.floors.length;if(k<=this._maxFloorAmount)return;const B=k-this._maxFloorAmount,U=Math.ceil(this._maxFloorAmount/2);this._owner.mathTower.currentTown.infinityTower.removeFloors(U,B,!0)}setupAddFloorPrefab(){const k=this._owner.prefabLoader.loadFromGUID(H.D.UI_ADD_FLOOR_PREFAB,this._map.screen.backgroundGameObject);this._addFloor=k.findComponent(Rt.R),k.legacyTransform.group.position=this._owner.nextFloorPosition(),this._addFloor.addFloorButton.onClick.add(this.onAddFloorButtonClicked.bind(this)),this._addFloor.addFloorButton.inputEnabled=this._mathTower.shouldUseInfinityTowerMode(),this._addFloor.addFloorButton.currentState=this._mathTower.shouldUseInfinityTowerMode()?Jt.K.Up:Jt.K.Disabled,this._addFloor.removeNewTowerButton()}onAddFloorButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_DISABLE_NAVIGATION,{keepHud:!0}),this.switchState(H.D.STATE_INFINITY_CHOOSE_FLOOR)}onFinishTransitionIn(){this._map.pageCamera.onFullScrollCompleted.removeAll(this);const k=this._map.pageCamera.bounds;k.width=F.q.instance.game.width,this._map.pageCamera.bounds=k,this._map.cameraHUDInterface.forceEnabledRight=!0,this._map.pageCamera.onBlockedMoveAttempt.add(this.onBlockedMoveAttempt,this),this.scrollToTop(1e3)}onBlockedMoveAttempt(k){k===St.RIGHT&&this._owner.changeToState(H.D.STATE_CAMERA)}scrollToTop(k=0){this._map.pageCamera.scrollVertical(this._owner.nextInfinityFloorPosition().y-.5*F.q.instance.game.height,k)}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],ie.prototype,"onBuildButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],ie.prototype,"onAddFloorButtonClicked",null);class se extends wt{get towerIndex(){return this._towerIndex}get floorIndex(){return this._floorIndex}onEnter(){this._moveInterface=this._mathTower.uiFactory.moveFloorInterface(),this._moveInterface.onCreate.add(this.onMoveFloorInterfaceCreated.bind(this)),this._towerIndex=this._owner.switchParams.towerIndex,this._floorIndex=this._owner.switchParams.floorIndex,this.checkTowerFloorBoundaries()&&(this._mathTower.currentTown.towers[this._towerIndex].floors[this._floorIndex].state=_t.u.MoveFloor),this._owner.map.pageCamera.onFullScrollCompleted.add(this.cameraFinishedScrolling.bind(this),this)}onExit(){this.checkTowerFloorBoundaries()&&(this._mathTower.currentTown.towers[this._towerIndex].floors[this._floorIndex].state=_t.u.Complete),this._mathTower.uiFactory.despawnScrim(),this._moveInterface.close(),this._owner.map.pageCamera.onFullScrollCompleted.removeAll(this)}checkTowerFloorBoundaries(){return this._towerIndexot.o.MINIMUM_FLOOR_COUNT;B&&F?(this._moveInterface.leftButton.lockState(Jt.K.Disabled),this._moveInterface.leftButton.onClick.add(this.leftButtonClicked.bind(this,!0)),this._moveInterface.rightButton.unlockState(),this._moveInterface.rightButton.currentState=Jt.K.Up,this._moveInterface.rightButton.onClick.add(this.rightButtonClicked.bind(this))):U&&F?(this._moveInterface.rightButton.lockState(Jt.K.Disabled),this._moveInterface.rightButton.onClick.add(this.rightButtonClicked.bind(this,!0)),this._moveInterface.leftButton.unlockState(),this._moveInterface.leftButton.currentState=Jt.K.Up,this._moveInterface.leftButton.onClick.add(this.leftButtonClicked.bind(this))):(this._moveInterface.rightButton.lockState(Jt.K.Disabled),this._moveInterface.rightButton.onClick.add(this.rightButtonClicked.bind(this,!0)),this._moveInterface.leftButton.lockState(Jt.K.Disabled),this._moveInterface.leftButton.onClick.add(this.leftButtonClicked.bind(this,!0)))}onSaveClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._revertCallback=null,this.switchState(H.D.STATE_CAMERA),this._mathTower.forceSaveTown()}onCancelClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this.reverseChanges(),this._revertCallback=null,this.switchState(H.D.STATE_CAMERA)}leftButtonClicked(k=!1){if(F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),k){const k=this._mathTower.currentTown.towers[this._towerIndex].floors.length>ot.o.MINIMUM_FLOOR_COUNT?H.D.WARNING_TOP_FORWARD:H.D.MOVE_FLOOR_MINIMUM_WARNING;this._moveInterface.warningObject.active=!0,this._moveInterface.arrowObject.active=!0;const B=this._moveInterface.leftButton.GameObject.legacyTransform.group.position,U=this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1);this._moveInterface.warningObject.legacyTransform.group.position.set(U.x-H.D.FLOOR_WIDTH/1.5,B.y+H.D.MOVE_FLOOR_WARNING_OFFSET_Y),this._moveInterface.arrowObject.legacyTransform.group.position.set(B.x+H.D.WARNING_ARROW_OFFSET_X,B.y+H.D.WARNING_ARROW_OFFSET_Y),this._moveInterface.setWarningText(this._owner.localizer.getText(k)),this._moveInterface.warningQuitButton.onClick.add(this.warningQuitButtonClicked.bind(this))}else this.bottomToTop(),this._revertCallback?this._revertCallback=null:this._revertCallback=this.topToBottom.bind(this),this.initMoveButtons()}rightButtonClicked(k=!1){if(F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),k){const k=this._mathTower.currentTown.towers[this._towerIndex].floors.length>ot.o.MINIMUM_FLOOR_COUNT?H.D.WARNING_BOTTOM_BACK:H.D.MOVE_FLOOR_MINIMUM_WARNING;this._moveInterface.warningObject.active=!0,this._moveInterface.arrowObject.active=!0;const B=this._moveInterface.rightButton.GameObject.legacyTransform.group.position,U=this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1);this._moveInterface.warningObject.legacyTransform.group.position.set(U.x-70,B.y+H.D.MOVE_FLOOR_WARNING_OFFSET_Y),this._moveInterface.arrowObject.legacyTransform.group.position.set(B.x+H.D.WARNING_ARROW_OFFSET_X,B.y+H.D.WARNING_ARROW_OFFSET_Y),this._moveInterface.setWarningText(this._owner.localizer.getText(k)),this._moveInterface.warningQuitButton.onClick.add(this.warningQuitButtonClicked.bind(this))}else this.topToBottom(),this._revertCallback?this._revertCallback=null:this._revertCallback=this.bottomToTop.bind(this),this.initMoveButtons()}topToBottom(){let k=this._mathTower.currentTown.towers[this._towerIndex+1];W.Aq$.isDefined(k)||(k=this._mathTower.currentTown.createTower()),this._mathTower.currentTown.towers[this._towerIndex].moveFloorTo(k,!0,!1),this._towerIndex++,this._floorIndex=0,this._mathTower.currentTown.towers[this._towerIndex].notifyUpdate(lt.L.TOWER_MOVE_FLOOR),this._mathTower.currentTown.towers[this._towerIndex-1].notifyUpdate(lt.L.TOWER_MOVE_FLOOR)}bottomToTop(){const k=this._mathTower.currentTown.towers[this._towerIndex-1];k.takeFloorFrom(this._mathTower.currentTown.towers[this._towerIndex],!0,!1),0===this._mathTower.currentTown.towers[this._towerIndex].floors.length&&(this._mathTower.currentTown.towers[this._towerIndex-1].isActiveTower=!1),this._mathTower.currentTown.towers[this._towerIndex].notifyUpdate(lt.L.TOWER_MOVE_FLOOR),this._towerIndex--,this._floorIndex=k.floors.length-1,this._mathTower.currentTown.towers[this._towerIndex].notifyUpdate(lt.L.TOWER_MOVE_FLOOR)}reverseChanges(){this._revertCallback&&this._revertCallback()}warningQuitButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._moveInterface.warningObject.active=!1,this._moveInterface.arrowObject.active=!1}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],se.prototype,"onSaveClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],se.prototype,"onCancelClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[Boolean]),(0,et.Sn)("design:returntype",void 0)],se.prototype,"leftButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[Boolean]),(0,et.Sn)("design:returntype",void 0)],se.prototype,"rightButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],se.prototype,"warningQuitButtonClicked",null);class ne extends wt{constructor(){super(...arguments),this._returnState=H.D.STATE_CAMERA,this._buildState=H.D.STATE_BUILD}onEnter(){this._towerIndex=this._owner.switchParams.towerIndex,this._floorIndex=this._owner.switchParams.floorIndex,this._activeFloor=this._mathTower.currentTown.towers[this._towerIndex].floors[this._floorIndex],this._owner.map.townRenderer.towerRenderers[this._towerIndex].floors[this._floorIndex].setFloorVisibility(!0),this._activeFloor.roomID=H.D.DEFAULT_FLOOR_ROOM_ID,this._activeFloor.frameID=H.D.DEFAULT_FLOOR_FRAME_ID,this._activeFloor.setRenovation(),this._owner.map.pageCamera.onFullScrollCompleted.addOnce(this.cameraFinishedScrolling.bind(this),this)}cameraFinishedScrolling(){const k=this._owner.getFloorPosition(this._towerIndex,this._floorIndex);this._chooseFloor=this._mathTower.uiFactory.chooseFloorLook(k),this._chooseFloor.onCreate.add(this.onChooseFloorInterfaceCreated.bind(this)),this._chooseFloor.selectionChanged.add(this.selectionChanged.bind(this)),this._owner.map.refreshVisibleTown(),this._mathTower.uiFactory.spawnScrim(this._towerIndex,this._floorIndex)}onExit(){this._chooseFloor.close(),this._mathTower.uiFactory.despawnScrim()}onChooseFloorInterfaceCreated(){this.bindButtons();const k=this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1);this._chooseFloor.startBuildingButton.GameObject.legacyTransform.group.position.set(k.x-H.D.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_X,k.y+H.D.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_Y)}bindButtons(){this._chooseFloor.quitButton.onClick.add(this.quitPopup.bind(this)),this._chooseFloor.startBuildingButton.onClick.add(this.onStartBuildingClicked.bind(this))}quitPopup(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),F.q.instance.prodigy.open.confirmationDialog(new Mt.k(this._owner.localizer.getText(H.D.POPUP_CHOOSE_FLOOR_QUIT_BUTTON),this.onQuitClicked.bind(this),this._owner.localizer.getText(H.D.POPUP_CHOOSE_FLOOR_STAY_BUTTON),void 0,{atlas:H.D.ATLAS_STORE,name:"icon-large-exclamation"},Nt.E.Small,void 0,this._owner.localizer.getText(H.D.POPUP_CHOOSE_FLOOR_QUIT_TITLE),this._owner.localizer.getText(H.D.POPUP_CHOOSE_FLOOR_QUIT_BODY)))}onQuitClicked(){this._owner.map.townRenderer.towerRenderers[this._towerIndex].floors[this._floorIndex].setQuickRenoPrefabVisibility(!0),this._owner.map.townRenderer.towerRenderers[this._towerIndex].floors[this._floorIndex].setFloorVisibility(!1),this._activeFloor.decorations.clear(),this._activeFloor.setComplete(!0,this._activeFloor.blockCount),this.switchState(this._returnState)}onStartBuildingClicked(){this._activeFloor.setRenoConstruction();const k=this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1),B=this._activeFloor;this.switchState(this._buildState,{quickRenoFloor:B,position:k})}selectionChanged(k){this._activeFloor.roomID=W.Aq$.isDefined(k.roomID)?k.roomID:H.D.DEFAULT_FLOOR_ROOM_ID,this._activeFloor.frameID=W.Aq$.isDefined(k.frameID)?k.frameID:H.D.DEFAULT_FLOOR_FRAME_ID,this._activeFloor.decorations.clear(),k.decorations&&k.decorations.forEach(((k,B)=>{this._activeFloor.decorations.setAt(B,k)}))}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],ne.prototype,"quitPopup",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],ne.prototype,"onStartBuildingClicked",null);class ae{constructor(){this.items=[]}getRewards(){return this.items}addOneOf(k){const B=pt.o.integerInRange(0,k.length);this.items.push(k[B])}add(k){this.items.push(k)}}class re extends wt{onEnter(){this._dialogueController=this._owner.dialogueController,this._towerIndex=this._owner.switchParams.towerIndex,this._floorIndex=this._owner.switchParams.floorIndex,this._activeFloor=this._mathTower.currentTown.towers[this._towerIndex].floors[this._floorIndex],this._topFloorIndex=this._mathTower.currentTown.towers[this._towerIndex].floors.length-1,this._rooftopInterface=this._mathTower.uiFactory.rooftopMasteryInterface(this._activeFloor),this._rooftopInterface.onCreate.add(this.onRooftopInterfaceCreated.bind(this))}onExit(){this._owner.map.characterController.Active=!0,this._owner.map.townRenderer.updateBounds(0),this._rooftopInterface.close()}startFTUE(){const k=this._owner.nextFloorPosition(),B=J.U.isStepComplete(z.B.PuppetMasterDefeated);this._dialogueController.addEvents([{dialogueData:this._dialogueController.dataProvider.get(H.D.DIALOGUE_STUBBORN_SHADOW_FTUE_1),blockInput:!0},{callback:()=>{this._rooftopInterface.spawnPortalFTUE(k.x,k.y)}},{dialogueData:this._dialogueController.dataProvider.get(H.D.DIALOGUE_STUBBORN_SHADOW_FTUE_2),blockInput:!0},{callback:()=>{this._rooftopInterface.spawnPMAndStubbornShadowFTUE(k.x,k.y)}},{dialogueData:this._dialogueController.dataProvider.get(B?H.D.DIALOGUE_STUBBORN_SHADOW_POST_ENDGAME_FTUE_1:H.D.DIALOGUE_STUBBORN_SHADOW_FTUE_3),blockInput:!0},{dialogueData:this._dialogueController.dataProvider.get(B?H.D.DIALOGUE_STUBBORN_SHADOW_POST_ENDGAME_FTUE_2:H.D.DIALOGUE_STUBBORN_SHADOW_FTUE_4),blockInput:!0},{callback:()=>{B?this._rooftopInterface.removePortalFTUE():this._rooftopInterface.removePMandPortalFTUE(k.x,k.y)}}]),this._dialogueController.addEvents([{dialogueData:this._dialogueController.dataProvider.get(H.D.DIALOGUE_STUBBORN_SHADOW_FTUE_5),blockInput:!0},{dialogueData:this._dialogueController.dataProvider.get(H.D.DIALOGUE_STUBBORN_SHADOW_FTUE_6),blockInput:!0}]),this._dialogueController.start(!0,this.onFirstFTUEEnd.bind(this))}onFirstFTUEEnd(){this._owner.map.breadCrumbManager.completeBreadcrumb(Ot.M.StubbornShadowTutorialOneCompleted),this._mathTower.education.isCurrentAlgorithmBasicOrGameChallenge()?this.onShadowAppeared():(this._dialogueController.addEvents([{dialogueData:this._dialogueController.dataProvider.get(H.D.DIALOGUE_STUBBORN_SHADOW_FTUE_7),blockInput:!0}]),this._dialogueController.start(!0,this.switchState.bind(this,H.D.STATE_CAMERA)))}onRooftopInterfaceCreated(){const k=this._owner.getFloorPosition(this._towerIndex,this._topFloorIndex+1);k.set(k.x+-H.D.BUTTON_OFFSET_X,k.y+H.D.BUTTON_OFFSET_Y),this._rooftopInterface.setAttackButtonPosition(k),this._rooftopInterface.attackButton.GameObject.active=!1,this._rooftopInterface.battleButton.GameObject.active=!1,this._rooftopInterface.quitButton.onClick.add(this.onQuitButtonClicked.bind(this)),this._rooftopInterface.attackButton.onClick.add(this.onAttackButtonClicked.bind(this)),this._rooftopInterface.onVictory.add(this.onVictory.bind(this)),this._rooftopInterface.onDefeat.add(this.onDefeat.bind(this)),this._rooftopInterface.onIncorrectAnswer.add(this.onWrongAnswer.bind(this)),this._rooftopInterface.onCorrectAnswer.add(this.onCorrectAnswer.bind(this,!1));const B=J.U.isStepComplete(z.B.PuppetMasterDefeated);this._rooftopInterface.topBanner.legacyTransform.x=B?-280:0;const U=this._owner.getFloorPosition(this._towerIndex,this._topFloorIndex+1),F=U.x+=H.D.STUBBORN_SHADOW_PLAYER_OFFSET_X,G=U.y+=H.D.STUBBORN_SHADOW_PLAYER_OFFSET_Y;this._owner.map.characterController.tweenToPosition(new W.I9Y(F,G),150),this._owner.map.characterController.Active=!1,setTimeout((()=>{this.updateCameraBounds()}),H.D.CHARACTER_TWEEN_DELAY_MS)}updateCameraBounds(){const k=this._owner.getFloorPosition(this._towerIndex,this._topFloorIndex+1);k.set(k.x+H.D.STUBBORN_SHADOW_OFFSET_X,k.y+H.D.STUBBORN_SHADOW_OFFSET_Y),this._owner.map.townRenderer.updateBounds(-H.D.STUBBORN_SHADOW_BOUNDS_OFFSET_X),this._owner.map.pageCamera.scrollToPosition(k.x-H.D.STUBBORN_SHADOW_CAMERA_OFFSET_X,k.y-H.D.CAMERA_Y_OFFSET),this._owner.map.pageCamera.onFullScrollCompleted.addOnce(this.cameraFinishedScrolling.bind(this,k.x,k.y),this)}cameraFinishedScrolling(k,B){this._owner.map.breadCrumbManager.isBreadcrumbComplete(Ot.M.StubbornShadowTutorialOneCompleted)?this._owner.switchParams.resumeBattle?this._rooftopInterface.resumeBattle(k,B):(this._rooftopInterface.onShadowSummoned.add(this.onShadowAppeared.bind(this)),this.makeStubbornShadowAppear()):this.startFTUE()}onQuitButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),F.q.instance.prodigy.open.confirmationDialog(new Mt.k(this._owner.localizer.getText(H.D.POPUP_STUBBORN_SHADOW_QUIT_BUTTON),this.switchState.bind(this,H.D.STATE_CAMERA),this._owner.localizer.getText(H.D.POPUP_STUBBORN_SHADOW_STAY_BUTTON),void 0,{atlas:H.D.ATLAS_STORE,name:"icon-large-exclamation"},Nt.E.Small,void 0,this._owner.localizer.getText(H.D.POPUP_STUBBORN_SHADOW_QUIT_TITLE),this._owner.localizer.getText(H.D.POPUP_STUBBORN_SHADOW_QUIT_BODY)))}makeStubbornShadowAppear(){const k=this._owner.getFloorPosition(this._towerIndex,this._topFloorIndex+1);k.set(k.x+H.D.STUBBORN_SHADOW_OFFSET_X,k.y+H.D.STUBBORN_SHADOW_OFFSET_Y),this._rooftopInterface.summonStubbornShadow(k.x,k.y)}onShadowAppeared(){this._dialogueController.addEvents([{dialogueData:this._dialogueController.dataProvider.get(H.D.DIALOGUE_STUBBORN_SHADOW_DUEL_CHOICE),blockInput:!0,yes:this.onDuelStarted.bind(this),no:this.switchState.bind(this,H.D.STATE_CAMERA)}]),this._dialogueController.start(!0)}onDuelStarted(){this._rooftopInterface.startBattle()}onAttackButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._rooftopInterface.startAttack()}onVictory(){this._activeFloor.state=_t.u.Complete,this.onCorrectAnswer(!0,this.onVictoryEnd.bind(this))}onVictoryEnd(){this._owner.map.breadCrumbManager.isBreadcrumbComplete(Ot.M.StubbornShadowTutorialTwoCompleted)?this.switchState(H.D.STATE_CAMERA):this.startFTUEEnding()}startFTUEEnding(){this._dialogueController.addEvents([{dialogueData:this._dialogueController.dataProvider.get(H.D.DIALOGUE_STUBBORN_SHADOW_FTUE_8),blockInput:!0},{dialogueData:this._dialogueController.dataProvider.get(H.D.DIALOGUE_STUBBORN_SHADOW_FTUE_9),blockInput:!0},{callback:()=>{this._owner.map.breadCrumbManager.completeBreadcrumb(Ot.M.StubbornShadowTutorialTwoCompleted)}}]),this._dialogueController.start(!0,this.switchState.bind(this,H.D.STATE_CAMERA))}onDefeat(){this.switchState(H.D.STATE_SHROUD)}onWrongAnswer(){const k=this._mathTower.education.getSkillById(this._activeFloor.skillID);ht.g.isSkillLocked(k)&&this.switchState(H.D.STATE_SHROUD,{towerIndex:this._towerIndex,floorIndex:this._floorIndex})}onCorrectAnswer(k,B){const U=H.D.ROOFTOP_CORRECT_PAYOUT+(k?H.D.ZONE_CURRENCY_PAYOUT:0);this.giveCurrency(U,B)}giveCurrency(k,B){const U=this._owner.map.storeManager.getItemData(H.D.ASSET_TYPE_INTERIOR,this._owner.mathTower.activeFloor.roomID);if(!U)return;const G=new ae;G.add({type:"currency",ID:H.D.ZONE_CURRENCY_IDS[Number.parseInt(U.element)],N:k}),F.q.instance.prodigy.open.gotItem(G.getRewards(),B)}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],re.prototype,"onQuitButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],re.prototype,"onAttackButtonClicked",null);class oe extends wt{onEnter(){if(this._towerIndex=this._owner.switchParams.towerIndex,this._floorIndex=this._owner.switchParams.floorIndex,this._activeFloor=this._mathTower.currentTown.towers[this._towerIndex].floors[this._floorIndex],!this._activeFloor.hasMaxBlocks){const k=this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1);this._buildInterface=this._mathTower.uiFactory.buildInterface(k),this._buildInterface.onCreate.add(this.onBuildInterfaceCreated.bind(this))}this._shroudInterface=this._mathTower.uiFactory.shroudLockInterface(),this._shroudInterface.onCreate.add(this.onShroudInterfaceCreated.bind(this)),this._owner.map.townRenderer.moveToFloor(this._towerIndex,this._floorIndex+1)}onExit(){this._shroudInterface.pendingClose=!0,W.Aq$.isDefined(this._buildInterface)&&(this._buildInterface.pendingClose=!0)}onShroudInterfaceCreated(){const k=this._owner.getFloorPosition(this._towerIndex,this._floorIndex+1);if(this._shroudInterface.setCleanButtonPosition(new rt.Point(k.x-H.D.BUTTON_OFFSET_X,k.y+H.D.BUTTON_OFFSET_Y)),this._shroudInterface.makeCloudAppear(k.x,k.y+H.D.SHROUD_OFFSET_Y),this._shroudInterface.cleanButton.GameObject.active=!1,this._shroudInterface.setShroudCleansRemainingUI(this._activeFloor.cleansRemaining()),this._owner.map.breadCrumbManager.isBreadcrumbComplete(Ot.M.ShroudTutorialFirstTime))this.initUI();else{this._shroudInterface.setQuitButtonVisibility(!1);const k=J.U.isStepComplete(z.B.PuppetMasterDefeated);this._owner.dialogueController.addEvents([{dialogueData:this._owner.dialogueController.dataProvider.get(k?H.D.DIALOGUE_SHROUD_FTUE_POST_ENDGAME_1:H.D.DIALOGUE_SHROUD_FTUE_1),blockInput:!0},{dialogueData:this._owner.dialogueController.dataProvider.get(H.D.DIALOGUE_SHROUD_FTUE_2),blockInput:!0}]),this._owner.dialogueController.start(!0,this.initUI.bind(this))}}initUI(){this._shroudInterface.setQuitButtonVisibility(!0),this._shroudInterface.cleanButton.GameObject.active=!0,this._shroudInterface.quitButton.onClick.add(this.onQuitButtonClicked.bind(this)),this._shroudInterface.cleanButton.onClick.add(this.onCleanButtonClicked.bind(this)),!this._owner.switchParams.questionOnEnter&&this._owner.map.breadCrumbManager.isBreadcrumbComplete(Ot.M.ShroudTutorialFirstTime)||this.onCleanButtonClicked()}onQuitButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),F.q.instance.prodigy.open.confirmationDialog(new Mt.k(this._owner.localizer.getText(H.D.POPUP_SHROUD_QUIT_BUTTON),(()=>{this.switchState(H.D.STATE_CAMERA)}),this._owner.localizer.getText(H.D.POPUP_SHROUD_STAY_BUTTON),void 0,{atlas:H.D.ATLAS_STORE,name:"icon-large-exclamation"},Nt.E.Small,void 0,this._owner.localizer.getText(H.D.POPUP_SHROUD_QUIT_TITLE),this._owner.localizer.getText(H.D.POPUP_SHROUD_QUIT_BODY)))}onCleanButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._mathTower.openQuestionForShroud(this.onQuestionAnswered.bind(this))}onQuestionAnswered(k){this._activeFloor.onShroudQuestionAnswered(),this._shroudInterface.setShroudCleansRemainingUI(this._activeFloor.cleansRemaining()),this._owner.map.breadCrumbManager.isBreadcrumbComplete(Ot.M.ShroudTutorialFirstTime)||H.D.SHROUD_CLEAN_SPELLS-this._activeFloor.cleansRemaining()!=1?k?this.giveCurrency(H.D.SHROUD_CORRECT_PAYOUT,this.checkEndOfShroud.bind(this,k)):this.checkEndOfShroud(k):(this._shroudInterface.setQuitButtonVisibility(!1),this._shroudInterface.cleanButton.GameObject.active=!1,this._owner.map.breadCrumbManager.completeBreadcrumb(Ot.M.ShroudTutorialFirstTime),this._owner.dialogueController.addEvents([{dialogueData:this._owner.dialogueController.dataProvider.get(H.D.DIALOGUE_SHROUD_FTUE_3),blockInput:!0}]),this._owner.dialogueController.start(!0,(()=>{this._shroudInterface.cleanButton.GameObject.active=!0,this._shroudInterface.setQuitButtonVisibility(!0)})))}checkEndOfShroud(k){if(this._activeFloor.cleansRemaining()<=0){const B=k?H.D.SHROUD_CORRECT_PAYOUT:0;this.giveCurrency(H.D.ZONE_CURRENCY_PAYOUT+B,this.wrapUpState.bind(this))}}wrapUpState(){this._activeFloor.state=_t.u.UnderConstruction,this._shroudInterface.cleanButton.GameObject.active=!1,this._shroudInterface.makeCloudDisappear(this.switchState.bind(this,H.D.STATE_CAMERA,{shroudComplete:!0}))}onBuildInterfaceCreated(){this._buildInterface.buildButton.GameObject.active=!1,W.Aq$.isDefined(this._shroudInterface.gameObject)&&this._shroudInterface.bringToTop()}giveCurrency(k,B){const U=this._owner.map.storeManager.getItemData(H.D.ASSET_TYPE_INTERIOR,this._activeFloor.roomID);let G;G=U?H.D.ZONE_CURRENCY_IDS[Number.parseInt(U.element)]:H.D.ZONE_CURRENCY_IDS[pt.o.integerInRange(0,H.D.ZONE_CURRENCY_IDS.length)];const j=new ae;j.add({type:"currency",ID:G,N:k}),F.q.instance.prodigy.open.gotItem(j.getRewards(),B)}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],oe.prototype,"onQuitButtonClicked",null),(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],oe.prototype,"onCleanButtonClicked",null);class he extends wt{onEnter(){this.onCreateHUD()}onCreateHUD(){this._owner.map.breadCrumbManager.isBreadcrumbComplete(Ot.M.DefaultItemsReceived)?(this._owner.map.storeManager.hasDefaultItems()||this._owner.map.storeManager.pushDefaultItems(),window.setTimeout((()=>{this.switchState(H.D.STATE_CAMERA)}),100)):(this._mathTower.uiFactory.hud.toggleVisible(!1),this._owner.map.storeManager.awardDefaultItems(this.onDefaultItemsAwarded.bind(this)))}onDefaultItemsAwarded(){this.switchState(H.D.STATE_CAMERA)}}var ce=U(82680),de=U(22162);class le extends ce.W{get forceEnabledUp(){return this._forceEnabledUp}set forceEnabledUp(k){k!==this._forceEnabledUp&&(this._forceEnabledUp=k,this.updateButtonLock(k||this._pageCamera.CanMoveUp,this._component.upButton))}get forceEnabledDown(){return this._forceEnabledDown}set forceEnabledDown(k){k!==this._forceEnabledDown&&(this._forceEnabledDown=k,this.updateButtonLock(k||this._pageCamera.CanMoveDown,this._component.downButton))}get forceEnabledRight(){return this._forceEnabledRight}set forceEnabledRight(k){k!==this._forceEnabledRight&&(this._forceEnabledRight=k,this.updateButtonLock(k||this._pageCamera.CanMoveRight,this._component.rightButton))}get forceEnabledLeft(){return this._forceEnabledLeft}set forceEnabledLeft(k){k!==this._forceEnabledLeft&&(this._forceEnabledLeft=k,this.updateButtonLock(k||this._pageCamera.CanMoveLeft,this._component.leftButton))}constructor(k,B,U,F){super(k,U.legacyTransform.group,H.D.UI_BUILD_COMPONENT_PREFAB,void 0,[H.D.ATLAS_STORE,H.D.ATLAS_TOWERTOWN,H.D.ATLAS_TOWERTOWN_MISC,H.D.ATLAS_BUTTONS]),this._component=null,this._parentGameObject=null,this._forceEnabledUp=!1,this._forceEnabledDown=!1,this._forceEnabledRight=!1,this._forceEnabledLeft=!1,this._pageCamera=B,this._prefabLoader=F,this._parentGameObject=U;const G=this._prefabLoader.loadFromGUID(H.D.UI_ARROW_HUD_PREFAB,this._parentGameObject);this._component=G.findComponent(de.B)}create(){this._component.upButton.onClick.add((()=>{this._pageCamera.scrollUp()}),this),this._component.downButton.onClick.add((()=>{this._pageCamera.scrollDown()}),this),this._component.leftButton.onClick.add((()=>{this._pageCamera.scrollLeft()}),this),this._component.rightButton.onClick.add((()=>{this._pageCamera.scrollRight()}),this),this._pageCamera.onAtEdgeChanged.add(this.updateButtonStates,this),this.updateButtonStates(),this._pageCamera.onBeginVerticalTween.add(this.onKeystrokeOfVerticalTween,this),this._pageCamera.onBeginHorizontalTween.add(this.onKeystrokeOfHorizontalTween,this)}onKeystrokeOfVerticalTween(k,B){B&&(this._pageCamera.y-k>0?this.makeScrollButtonPop(this._component.upButton,"CanMoveUp",this.forceEnabledUp):this.makeScrollButtonPop(this._component.downButton,"CanMoveDown",this.forceEnabledDown))}onKeystrokeOfHorizontalTween(k,B){B&&(this._pageCamera.x-k>0?this.makeScrollButtonPop(this._component.leftButton,"CanMoveLeft",this.forceEnabledLeft):this.makeScrollButtonPop(this._component.rightButton,"CanMoveRight",this.forceEnabledRight))}makeScrollButtonPop(k,B,U){const F=this._pageCamera[B]||U;this.updateButtonLock(!1,k),setTimeout(this.updateButtonLock.bind(this,F,k),H.D.BUTTON_FLASH_DURATION_MS)}close(){this.removeListeners(),super.close()}removeListeners(){this._component.upButton.onClick.removeAll(this),this._component.downButton.onClick.removeAll(this),this._component.leftButton.onClick.removeAll(this),this._component.rightButton.onClick.removeAll(this),this._pageCamera.onAtEdgeChanged.removeAll(this)}updateButtonLock(k,B){k?B.inputEnabled||(B.unlockState(),B.inputEnabled=!0):B.inputEnabled&&(B.lockState(Jt.K.Disabled),B.inputEnabled=!1)}updateButtonStates(){this.updateButtonLock(this._pageCamera.CanMoveUp||this.forceEnabledUp,this._component.upButton),this.updateButtonLock(this._pageCamera.CanMoveDown||this.forceEnabledDown,this._component.downButton),this.updateButtonLock(this._pageCamera.CanMoveLeft||this.forceEnabledLeft,this._component.leftButton),this.updateButtonLock(this._pageCamera.CanMoveRight||this.forceEnabledRight,this._component.rightButton)}}var ue=U(99625),fe=U(84317),be=U(92150);class pe{constructor(k,B){this._container=B.background.getChildAt(2),this._camera=k,this._screen=B,this.checkBackgroundLoaded()}destroy(){window.clearTimeout(this._timeoutID),this._camera.onUpdateHorizontalTween.removeAll(this)}checkBackgroundLoaded(){this._container.children.length>0?this.createBackgroundClone():this._timeoutID=window.setTimeout(this.checkBackgroundLoaded.bind(this),1)}createBackgroundClone(){this._backgroundImage=this._container.getChildAt(0),this._backgroundImage.addChild(new be._(this._screen.prodigyGame,F.q.instance.game.width,0,void 0,void 0,this._backgroundImage.texture)),this._camera.onUpdateHorizontalTween.add(this.updatePositions,this)}updatePositions(){this._backgroundImage.position.x=this._camera.x-this._camera.x%F.q.instance.game.width}}var ve=U(97071),ge=U(83726),me=(U(34829),U(9439));class ye{get town(){return this._town}get floor(){return this._floor}get skill(){return this._skill}get previousBlockCount(){return this._previousBlockCount}get newBlockCount(){return this._newBlockCount}get shouldAddStubbornShadow(){return this._shouldAddStubbornShadow}get shroudIsClearing(){return this._shroudIsClearing}get shouldAddShroud(){return this._shouldAddShroud}get hasRun(){return this._hasRun}constructor(k,B,U){this._shouldAddStubbornShadow=!1,this._newBlockCount=0,this._previousBlockCount=0,this._shroudIsClearing=!1,this._shouldAddShroud=!1,this._hasRun=!1,U&&(B.skillID=U.ID),this._shouldAddShroud=!B.hasShroud&&B.cleansRemaining(U)>0;const F=this._shouldAddShroud||B.isRenovating;this._newBlockCount=F?B.blockCount:ht.g.determineNewBlockCount(U,B),this._shroudIsClearing=B.hasShroud&&0===B.cleansRemaining(U),this._previousBlockCount=B.blockCount,this._shouldAddStubbornShadow=!!U&&ht.g.shouldHaveStubbornShadow(U,this._newBlockCount),this._town=k,this._floor=B,this._skill=U}applyChange(){this.hasRun||(this.apply(),this._hasRun=!0)}}class _e extends ye{apply(){const k=(0,it.last)(this.town.towers)||this.town.createTower();(k.canAddFloor()?k:this.town.createTower()).pushFloor(this.floor,!0,this.floor.isExternalBuild),this.floor.blockCount=this.newBlockCount}}class Ee extends ye{constructor(k,B,U,F=!1,G=B.state){super(k,B,U),this._hasIncorrectState=F,this._expectedState=G}apply(){this.floor.blockCount=this.newBlockCount,this._hasIncorrectState&&(this._expectedState!==_t.u.Complete||this.floor.isExternalBuild?this.floor.state=this._expectedState:this.floor.setComplete())}}class we{get _allChanges(){return[...this._updates,...this._additions]}get hasPendingChanges(){return this._allChanges.some((k=>!k.hasRun))}get additions(){return this._additions}get updates(){return this._updates}get totalNewFloors(){return this._additions.length}get totalNewBlocks(){return this._updates.map((k=>k.newBlockCount-k.previousBlockCount)).reduce(((k,B)=>k+B),0)}get totalNewShrouds(){return this._allChanges.map((k=>k.shouldAddShroud?1:0)).reduce(((k,B)=>k+B),0)}get totalShroudsCleared(){return this._allChanges.map((k=>k.shroudIsClearing?1:0)).reduce(((k,B)=>k+B),0)}get totalNewStubbornShadows(){return this._allChanges.map((k=>k.shouldAddStubbornShadow?1:0)).reduce(((k,B)=>k+B),0)}get totalUpdateChanges(){return(0,it.sum)([this.totalNewBlocks,this.totalNewFloors,this.totalShroudsCleared])}constructor(k,B){this._updates=k,this._additions=B}applyChanges(){this._allChanges.filter((k=>!k.hasRun)).forEach((k=>{k.applyChange()}))}}class Te{static hasIncorrectFloorState(k,B,U=!1){return k.state!==this.determineExpectedFloorState(k,B,U)}static determineExpectedFloorState(k,B,U=!1){return B&&U?ht.g.isSkillMastered(B)?_t.u.Complete:ht.g.isSkillLocked(B)?_t.u.SkillLocked:ht.g.shouldHaveStubbornShadow(B,ht.g.determineNewBlockCount(B,k))?_t.u.RooftopMastery:U?_t.u.UnderConstruction:_t.u.Complete:_t.u.Complete}}class Se{static generateTownUpdateSummary(k,B,U){return new we(Se.generateUpdates(k,B),Se.generateAdditions(k,U))}static generateAdditions(k,B){return B.map((B=>{if(!k.floors.find((k=>k.skillID===B.ID)))return new _e(k,(k=>{const B=new me.Z,U=pt.o.seededRange(1,5,k);return B.frameID=U+1,B.isExternalBuild=!0,B.roomID=U,B.skillID=k,B.state=_t.u.Complete,B})(B.ID),B)})).filter((k=>k))}static generateUpdates(k,B){const U=k.floors.length>0?k.floors[k.floors.length-1]:null;return k.floors.map((F=>{const G=this.findSkillByFloor(F,B),j=F===U;if(this.shouldUpdateFloor(F,G,j)){const B=Te.hasIncorrectFloorState(F,G,j),U=Te.determineExpectedFloorState(F,G,j);return new Ee(k,F,G,B,U)}})).filter((k=>k))}static findSkillByFloor(k,B){return B.find((B=>B.ID===k.skillID))}static shouldUpdateFloor(k,B,U=!1){return!B||k.skillID===B.ID&&(Te.hasIncorrectFloorState(k,B,U)||ht.g.getBlockDiscrepancy(B,k)>0||ht.g.shouldHaveStubbornShadow(B,ht.g.determineNewBlockCount(B,k)))}}class Ae extends W.uAl{constructor(){super(...arguments),this._playerTransitionTimeMS=1e3,this._floatTweenTimeMS=1400,this._wasGrounded=!0,this.transitionEase=W.GS3.Exponential.Out,this._playerContainer=null,this._floatling=null,this._camera=null}get playerContainer(){return this._playerContainer}set playerContainer(k){this.gameObject.legacyTransform.group.addChild(k),this._playerContainer=k}get floatling(){return this._floatling}set floatling(k){this._floatling=k}get camera(){return this._camera}set camera(k){this._camera&&(this._camera.onBeginHorizontalTween.removeAll(this),this._camera.onBeginVerticalTween.removeAll(this)),this._camera=k,this._camera&&(this._camera.onBeginHorizontalTween.add(this.onBeginHorizontalCameraMovement,this),this._camera.onBeginVerticalTween.add(this.onBeginVerticalCameraMovement,this))}create(){super.create(),this._game=F.q.instance.game}onEnable(){super.onEnable(),this._camera&&(this._camera.onBeginHorizontalTween.add(this.onBeginHorizontalCameraMovement,this),this._camera.onBeginVerticalTween.add(this.onBeginVerticalCameraMovement,this))}onDisable(){super.onDisable(),this._camera&&(this._camera.onBeginHorizontalTween.removeAll(this),this._camera.onBeginVerticalTween.removeAll(this))}onBeginHorizontalCameraMovement(k){this.Active&&(this._horizontalTween&&this._horizontalTween.stop(),this._horizontalTween=this._game.add.tween(this._playerContainer,this).to({x:k+H.D.PLAYER_CAMERA_OFFSET_X},this._playerTransitionTimeMS,this.transitionEase,!0))}onBeginVerticalCameraMovement(k){if(!this.Active)return;this._verticalTween&&this._verticalTween.stop();let B=k+H.D.PLAYER_CAMERA_OFFSET_Y;this._camera.CanMoveDown||(B=H.D.PLAYER_CAMERA_OFFSET_Y),this._verticalTween=this._game.add.tween(this._playerContainer,this).to({y:B},this._playerTransitionTimeMS,this.transitionEase,!0),this._verticalTween.onTweenComplete.removeAll(this),this.checkGrounded(B)}tweenToPosition(k,B=this._playerTransitionTimeMS,U=0,F=this.transitionEase){this.Active&&(this._verticalTween&&this._verticalTween.stop(),this._horizontalTween&&this._horizontalTween.stop(),this._horizontalTween=this._game.add.tween(this._playerContainer,this).to({x:k.x},B,F,!0,U),this._verticalTween=this._game.add.tween(this._playerContainer,this).to({y:k.y},B,F,!0,U),this._verticalTween.onTweenComplete.removeAll(this),this.checkGrounded(k.y))}tweenFloatling(k,B){this._swoopyTween&&this._swoopyTween.stop(),this._swoopyTween=this._game.add.tween(this._floatling,this).to({x:k,y:B-20},this._floatTweenTimeMS,W.GS3.Quadratic.InOut).to({x:k,y:B},this._floatTweenTimeMS,W.GS3.Quadratic.InOut).loop(!0),this._swoopyTween.start()}float(k){k?this.playerContainer.float(!0):(this.playerContainer.float(!1),this.playerContainer.stand())}checkGrounded(k){this.floatling&&(!this._wasGrounded&&k>H.D.PLAYER_BASE_Y?(this.playerContainer.isMounted()||this.float(!1),this._wasGrounded=!0,this.floatling.position.set(H.D.SWOOPY_OFFSET_X-10,0),this.tweenFloatling(H.D.SWOOPY_OFFSET_X-10,0)):this._wasGrounded&&k<=H.D.PLAYER_BASE_Y&&(this.float(!0),this.floatling.position.set(H.D.SWOOPY_OFFSET_X,H.D.SWOOPY_OFFSET_Y),this.tweenFloatling(H.D.SWOOPY_OFFSET_X,H.D.SWOOPY_OFFSET_Y),this._wasGrounded=!1))}}class Ce extends ge.T{constructor(){super(...arguments),this._mathTower=null,this._storeManager=null,this._prefabLoader=null,this._breadcrumbManager=null}get characterController(){return this._characterController}setup(k,B,U){super.setup(k,B,U),this._breadcrumbManager.init(),k.transparent=!1;const G=B.backgroundGameObject.addComponent(W.bE_),j=new ve.p(this.game);G.Installers.push(j),G.runInstallers(),this._towerRoot=new W._mx(B.backgroundGameObject),this.setupCameraController(),F.q.instance.prodigy.notifications.pause(this)}cleanup(){this._mathTower.destroy(),this.screen&&(this.screen.showMenu=!0),this._pageCamera.Active=!1,this._pageCamera.destroy(),F.q.instance.prodigy.notifications.resume(this),F.q.instance.prodigy.load.removeAssets(),super.cleanup()}setupCameraController(){this._pageCamera=this.screen.backgroundGameObject.addComponent(Dt),this._pageCamera.setTransitionDistanceScreenRatio(.5,.5)}setupCharacterController(){const k=F.q.instance.prodigy.create.spine(H.D.SWOOPY_OFFSET_X,H.D.SWOOPY_OFFSET_Y,H.D.SPINE_SWOOPY);k.setToSetupPose(),k.setAnimationByName(0,"pickup",!0),this.screen.user.addChild(k),this.screen.user.hideName(),this.screen.user.float(!0),this.zone.hideFollow(this.screen),this._characterController=this.screen.backgroundGameObject.addComponent(Ae),this._characterController.playerContainer=this.screen.user,this._characterController.floatling=k,this._characterController.camera=this._pageCamera,this._characterController.tweenToPosition(new W.I9Y(this._pageCamera.x,this._pageCamera.y))}generateTown(k=!1){const B=k?H.D.TUTORIAL_GRADE:this._mathTower.getGrade();this._town=this._mathTower.setCurrentTown(String(B),k)}refreshVisibleTown(){this._townRenderer.refreshVisibleFloors()}get pageCamera(){return this._pageCamera}get breadCrumbManager(){return this._breadcrumbManager}get storeManager(){return this._storeManager}get townRenderer(){return this._townRenderer}showInfinityTowerDialog(k=!1){this._stateManager.currentState!==this._stateManager.states.get(H.D.STATE_BUILD)&&(!this._mathTower.isInfinity&&this._mathTower.shouldUseInfinityTowerMode()?this._mathTower.uiFactory.showInfinityTowerIsOpen(this.onGoToInfinityButtonClicked.bind(this),this.onCloseInfinityTowerOpenDialog.bind(this)):this._mathTower.shouldUseBuildMode()&&(this._mathTower.isInfinity?this._mathTower.uiFactory.showTowerTownIsOpen(this.onGoToTowerTownClicked.bind(this),this.onCloseTowerTownOpenDialog.bind(this)):k&&!this._mathTower.isInfinity&&this._mathTower.uiFactory.showInfinityTowerIsClosed()))}onCloseTowerTownOpenDialog(){this._stateManager.changeToState(H.D.STATE_INFINITY,{backToTowerTown:!0})}onGoToTowerTownClicked(){this._stateManager.changeToState(H.D.STATE_INFINITY,{backToTowerTown:!0})}onCloseInfinityTowerOpenDialog(){this._stateManager.changeToState(H.D.STATE_CAMERA)}onGoToInfinityButtonClicked(){this._stateManager.changeToState(H.D.STATE_INFINITY,{enteringInfinity:!0})}generateTownUpdateSummary(k,B){const U=this._mathTower.education.getSkillsByGrade(B),F=this._mathTower.education.getSkillsMasteredByGrade(B);return Se.generateTownUpdateSummary(k,U,F)}}var Oe=U(91207),Ie=U(30857);class De extends W._mx{get decorations(){return this._decorations}set floatlingPool(k){this._floatlingPool=k}set decorationPool(k){this._decorationPool=k}get onClick(){return this._onClickSignal}constructor(k,B,U){super(B),this._underConstruction=!1,this._decorationIDs=[],this._decorationPositions=[],this._mathTower=null,this._decorations=[],this._storeManager=null,this._prefabLoader=null,this._quickRenoPrefab=null,this._quickRenoComponent=null,this._onClickSignal=new W.HN0,this._onFinishAssetLoad=null,this._storeManager=k,this._game=F.q.instance.game,this.addComponent(W.K16),this._mathTower=U;const G=new W._mx(this);G.addComponent(W.K16),this._skillBadgeFlag=G.addComponent(ut._),this._skillBadgeFlag.setAnchor(1,1);const j=this._skillBadgeFlag.GameObject.legacyTransform.group;j.scale.set(-1,1),j.position.x+=183,j.position.y-=60,j.visible=!1;const $=j.parent;j.setParent(this.legacyTransform.group),j.updateTransform(),j.setParent($);const H=new W._mx(this);H.addComponent(W.K16),this._skillBadge=H.addComponent(ut._),this._skillBadge.setAnchor(1,1);const V=this._skillBadge.GameObject.legacyTransform.group;V.position.x+=275,V.position.y-=80,V.visible=!1;const q=V.parent;V.setParent(this.legacyTransform.group),V.updateTransform(),V.setParent(q);const K=new W._mx(this);K.addComponent(W.K16),this._interior=K.addComponent(ut._);const z=new W._mx(this);z.addComponent(W.K16),this._frameLeft=z.addComponent(ut._);const Y=new W._mx(this);Y.addComponent(W.K16),this._frameRight=Y.addComponent(ut._),this._interior.setAnchor(.5,1),this._frameLeft.setAnchor(1,1),this._frameRight.setAnchor(1,1),this._frameRight.GameObject.legacyTransform.group.scale.set(-1,1);const Q=this._frameRight.GameObject.legacyTransform.group.parent;j.setParent(this.legacyTransform.group),this._frameRight.GameObject.legacyTransform.group.updateTransform(),this._frameRight.GameObject.legacyTransform.group.setParent(Q),this._flattenedSprite=F.q.instance.prodigy.create.image(0,0,null,null),this._flattenedSprite.anchor.set(.5,1),this._flattenedSprite.alpha=.75,this.legacyTransform.group.addChild(this._flattenedSprite),this._frameLeft.setInputEnabled(!0),this._frameRight.setInputEnabled(!0),this._frameLeft.getEvents().onInputDown.add(this.floorClicked.bind(this)),this._frameRight.getEvents().onInputDown.add(this.floorClicked.bind(this)),this._prefabLoader=F.q.instance.prodigy.gameContainer.get("d0e-64fd")}hideFloor(){this.disposeDecorations(),this.disposeFloatlings(),this._onFinishAssetLoad=null,this.active=!1,this._floor.onUpdate.removeAll(this),this._floor=null,W.Aq$.isDefined(this._quickRenoPrefab)&&this.removeQuickRenoPrefab()}floorClicked(){this._onClickSignal.dispatch()}disposeDecorations(){this._decorations.forEach((k=>{this.legacyTransform.group.removeChild(k.GameObject.legacyTransform.group),k.GameObject.active=!1})),this._decorations=[],this._decorationIDs=[],this._decorationPositions=[]}disposeFloatlings(){this._floatlingLeft&&(this._floatlingLeft.GameObject&&(this._floatlingLeft.GameObject.active=!1),this._floatlingLeft=null),this._floatlingRight&&(this._floatlingRight.GameObject&&(this._floatlingRight.GameObject.active=!1),this._floatlingRight=null)}updateInterior(){this._interiorID=this._storeManager.getItemImageName(H.D.ASSET_TYPE_INTERIOR,this._floor.roomID,this._underConstruction),this._interior.setAsset(Oe.E.getTowerTownImage(this._interiorID)).catch(W.RQr.createHandler("Error setting _interior"))}updateFrame(){this._frameID=this._storeManager.getItemImageName(H.D.ASSET_TYPE_FRAME,this._floor.frameID,this._underConstruction),this._frameLeft.setAsset(Oe.E.getTowerTownImage(this._frameID)).catch(W.RQr.createHandler("Error setting _frameLeft")),this._frameRight.setAsset(Oe.E.getTowerTownImage(this._frameID)).catch(W.RQr.createHandler("Error setting _frameRight"))}updateUnderConstruction(k=!1){const B=this._floor.isInBlueprintState();(this._underConstruction!==B||k)&&(this._underConstruction=B,this.updateInterior(),this.updateFrame(),this.updateDecorations(this._underConstruction),this.setObjectVisibility(this._underConstruction),this._underConstruction&&this.loadForBlueprint())}loadForBlueprint(){this._onFinishAssetLoad=this.drawTexture.bind(this),F.q.instance.prodigy.load.assets([this._frameID,this._interiorID,...this._decorationIDs].map((k=>Oe.E.getTowerTownImage(k))),(()=>{W.Aq$.isDefined(this._onFinishAssetLoad)&&this._onFinishAssetLoad()}))}displayFloor(k){if(this._floor){if(!this._floor.isExternalBuild&&this._floor===k)return;this._floor.onUpdate.removeAll(this)}this._floor=k,this._floor.onUpdate.add(this.onFloorUpdate,this),this.onUpdateFloorState(!0),this.updateFloatlings(),this.updateFlag()}setObjectVisibility(k){this._flattenedSprite.visible=k,this._frameRight.GameObject.active=!k,this._frameLeft.GameObject.active=!k,this._interior.GameObject.active=!k,this._decorations.forEach((B=>{B.GameObject.active=!k})),this.legacyTransform.group.setChildIndex(k?this._flattenedSprite:this._interior.GameObject.legacyTransform.group,0)}drawTexture(){const k=this._game.add.renderTexture(H.D.FRAME_WIDTH,H.D.FRAME_HEIGHT);this._frameLeft.setAsset(Oe.E.getTowerTownImage(this._frameID)).catch(W.RQr.createHandler("Error setting _frameLeft for drawTexture")),this._frameRight.setAsset(Oe.E.getTowerTownImage(this._frameID)).catch(W.RQr.createHandler("Error setting _frameRight for drawTexture")),this._interior.setAsset(Oe.E.getTowerTownImage(this._interiorID)).catch(W.RQr.createHandler("Error setting _interior for drawTexture"));const B=this._interior.sprite.visible,U=this._frameLeft.sprite.visible,F=this._frameRight.sprite.visible;this._frameRight.sprite.scale.x=-1,this._interior.sprite.visible=!0,this._frameLeft.sprite.visible=!0,this._frameRight.sprite.visible=!0,k.renderXY(this._interior.sprite,H.D.FRAME_HALF_WIDTH,H.D.FRAME_HEIGHT),k.renderXY(this._frameLeft.sprite,H.D.FRAME_HALF_WIDTH,H.D.FRAME_HEIGHT),k.renderXY(this._frameRight.sprite,H.D.FRAME_HALF_WIDTH,H.D.FRAME_HEIGHT),this._interior.sprite.visible=B,this._frameLeft.sprite.visible=U,this._frameRight.sprite.visible=F,this._frameRight.sprite.scale.x=1;for(let G=0;Gk.state===B.state?0:k.state===vt.a.Awake?1:-1)),this.removeFloatlings(k,this._floatlingLeft),this.removeFloatlings(k,this._floatlingRight),this._floatlingLeft=this.trySetFloatling(k,this._floatlingLeft,-1),this._floatlingRight=this.trySetFloatling(k,this._floatlingRight,1)}removeFloatlings(k,B){if(B){const U=k.indexOf(B.floatling);U>=0&&k.splice(U,1)}}trySetFloatling(k,B,U=1){let F=B;return 0===k.length?(F&&(F.GameObject.active=!1),null):(F||(F=this.getFloatling(H.D.FLOATLING_FLOOR_X_OFFSET*U,H.D.FLOATLING_FLOOR_Y_OFFSET)),F.floatling=k[0],k.splice(0,1),F)}getFloatling(k,B){const U=this._floatlingPool.getObject().findComponent(mt);return this.legacyTransform.group.addChildAt(U.GameObject.legacyTransform.group,1),U.GameObject.legacyTransform.group.alpha=0,this._game.add.tween(U.GameObject.legacyTransform.group,this).to({alpha:1},500).start(),U.GameObject.legacyTransform.group.position.set(k,B),U}updateDecorations(k=!1){this.disposeDecorations(),this._floor.decorations.keys.forEach((B=>{const U=this._floor.decorations.getAt(B);if(U){const F=this._decorationPool.getObject();this.parent.addChild(F);const G=this._floor.decorationPositions[B],j=this.legacyTransform.group;F.legacyTransform.group.position.set(G.x+j.position.x,G.y+j.position.y);const $=this._storeManager.getItemImageName(H.D.ASSET_TYPE_DECORATION,U.assetID,k),V=F.findComponent(ut._);V.setAsset(Oe.E.getTowerTownImage($)),this._decorations.push(V),this._decorationPositions.push(G),this._decorationIDs.push($)}}),this)}onFloatlingStateChange(k){k.state===vt.a.Floating&&k.floor!==this._mathTower.activeFloor&&(this._floatlingLeft&&this._floatlingLeft.floatling===k&&(this._floatlingLeft.GameObject.legacyTransform.y+=this.legacyTransform.y,this.parent.descendFloatling(this._floatlingLeft,!0),this._floatlingLeft=null),this._floatlingRight&&this._floatlingRight.floatling===k&&(this._floatlingRight.GameObject.legacyTransform.y+=this.legacyTransform.y,this.parent.descendFloatling(this._floatlingRight,!0),this._floatlingRight=null),this.updateFloatlings())}onFloorUpdate(k){let B=!1;switch(k.getFinalNotification().type){case lt.L.FLOOR_SET_STATE:this.onUpdateFloorState(),this.updateFlag(this._floor.isComplete);break;case lt.L.FLOOR_SET_ROOM_ID:B=!0,this.updateInterior();break;case lt.L.FLOOR_SET_FRAME_ID:B=!0,this.updateFrame();break;case lt.L.FLOOR_SET_DECORATIONS:B=!0,this.updateDecorations();break;case lt.L.FLOATLING_SET_STATE:this.onFloatlingStateChange(k.getFinalNotification().source)}B&&this._underConstruction&&this.loadForBlueprint()}onUpdateFloorState(k=!1){this._floor.isExternalBuild&&!this._floor.isRenovating?(this.setQuickRenoPrefabVisibility(!0),this.setFloorVisibility(!1)):(this.setQuickRenoPrefabVisibility(!1),this.updateUnderConstruction(k))}setQuickRenoPrefabVisibility(k){W.Aq$.isDefined(this._quickRenoPrefab)||(this._quickRenoPrefab=this._prefabLoader.loadFromGUID(H.D.UI_QUICK_RENOVATION,this),this._quickRenoComponent=this._quickRenoPrefab.findComponent(Ie.G),this._quickRenoComponent.quickRenovationButton.onClick.add(this.floorClicked.bind(this))),this._quickRenoPrefab.active=k}removeQuickRenoPrefab(){this._quickRenoPrefab.destroy(),this._quickRenoPrefab=null}setFloorVisibility(k){this._frameLeft.GameObject.active=k,this._frameRight.GameObject.active=k,this._interior.GameObject.active=k,W.Aq$.isDefined(this._flattenedSprite)&&(this._flattenedSprite.visible=k)}onQuickRenoClicked(){this.setFloorVisibility(!0),this.setQuickRenoPrefabVisibility(!1)}updateFlag(k=!1){if(this._floor)if(!this._floor.isComplete||this._floor.isExternalBuild||this._mathTower.isInfinity||this._mathTower.currentTown.isTutorialTown)this._skillBadge.GameObject.legacyTransform.group.visible=!1,this._skillBadgeFlag.GameObject.legacyTransform.group.visible=!1;else{const k=this._mathTower.education.getSkillById(this._floor.skillID);if(k&&W.Aq$.isDefined(k.topicGameIconAssetId)){const B=k.topicGameIconAssetId;this.setFlag(B),this._skillBadge.setAsset(H.D.ATLAS_TOPIC_ICONS,`topic-pixel-${B}`),this._skillBadge.GameObject.legacyTransform.group.visible=!0}else this.setFlag(H.D.NO_SKILL_FLAG_ICON_ID),this._skillBadge.GameObject.legacyTransform.group.visible=!1;this._skillBadgeFlag.GameObject.legacyTransform.group.visible=!0}}setFlag(k){it.includes(H.D.FLAG_ORANGE_SKILL_IDS,k)?this._skillBadgeFlag.setAsset(H.D.ATLAS_FLAGS,H.D.ASSET_ORANGE_FLAG_FRAME):it.includes(H.D.FLAG_BLUE_SKILL_IDS,k)?this._skillBadgeFlag.setAsset(H.D.ATLAS_FLAGS,H.D.ASSET_BLUE_FLAG_FRAME):it.includes(H.D.FLAG_RED_SKILL_IDS,k)?this._skillBadgeFlag.setAsset(H.D.ATLAS_FLAGS,H.D.ASSET_RED_FLAG_FRAME):it.includes(H.D.FLAG_PURPLE_SKILL_IDS,k)?this._skillBadgeFlag.setAsset(H.D.ATLAS_FLAGS,H.D.ASSET_PURPLE_FLAG_FRAME):this._skillBadgeFlag.setAsset(H.D.ATLAS_FLAGS,H.D.ASSET_TURQOISE_FLAG_FRAME)}destroy(){this._onClickSignal.dispose(),super.destroy()}}var Re=U(36648);class Pe extends W._mx{get onFloorClicked(){return this._floorClickedSignal}get onLuminTreeSpawned(){return this._luminTreeSpawnedSignal}constructor(k,B,U,G,j){super(B),this.floors=[],this.descendingFloatlings=[],this._floorClickedSignal=new W.HN0,this._luminTreeSpawnedSignal=new W.HN0,this.addComponent(W.K16),this._mathTower=k,this._floorPool=U,this._ornamentPool=G,this._floatlingPool=j,this._game=F.q.instance.game,this.groundFloatlingContainer=new W._mx(this),this.groundFloatlingContainer.addComponent(W.K16),this._luminTreeSpine=null}set tower(k){W.Aq$.isDefined(this._tower)&&(this._tower.onUpdate.removeAll(this),this.hideTower()),this._tower=k,this._tower.onUpdate.add(this.onTowerUpdate,this),this.floors=[];for(let B=0;B{At.Z.bringToTop(k.GameObject.legacyTransform.group)}));const F=!this._tower.isActiveTower,G=U>=this._tower.floors.length-1,j=!this._tower.isInfinityTower,$=0===this._mathTower.education.getPendingSkillsByGrade(this._mathTower.getGrade()).length,H=0===this._tower.floors.length;F&&G&&j||j&&$?this.spawnLuminTree():W.Aq$.isDefined(this._luminTreeSpine)&&this.setLuminTreeVisibility(!1),j&&$&&H&&this.setLuminTreeVisibility(!1),W.Aq$.isDefined(this._luminTreeSpine)&&At.Z.bringToTop(this._luminTreeSpine),At.Z.bringToTop(this.groundFloatlingContainer.legacyTransform.group)}refreshFloor(k,B=!1){this.floors[k]||(this.floors[k]=this._floorPool.getObject(),this.addChild(this.floors[k]),this.floors[k].legacyTransform.y=-k*H.D.FLOOR_HEIGHT),this.floors[k].displayFloor(this._tower.floors[k]),this.floors[k].onClick.removeAll(),this.floors[k].onClick.add(this.floorClicked.bind(this,k)),B&&this.realignTower()}realignTower(){this.floors.forEach((k=>{k&&At.Z.bringToTop(k.legacyTransform.group)}))}getFloor(k){return this.floors[k]||this.refreshFloor(k,!0),this.floors[k]}spawnLuminTree(k=!0){const B=-this._tower.floors.length*H.D.FLOOR_HEIGHT-H.D.LUMIN_TREE_OFFSET_Y;if(W.Aq$.isDefined(this._luminTreeSpine))return this.setLuminTreeVisibility(!0),void(this._luminTreeSpine.y=B);W.Aq$.isDefined(this._luminTreeSpine)||(this._luminTreeSpine=F.q.instance.prodigy.create.spine(0,B,H.D.SPINE_LUMIN_TREE,this.legacyTransform.group),this._luminTreeSpine.setToSetupPose(),k?(this._luminTreeSpine.setAnimationByName(0,"grow",!1),this._luminTreeSpine.onComplete.add(this.luminTreeSpawned.bind(this))):this._luminTreeSpine.setAnimationByName(0,"idle-noglow",!0)),this._luminTreeSpine.y=B}setLuminTreeVisibility(k){this._luminTreeSpine.visible=k}luminTreeSpawned(){this._luminTreeSpine.onComplete.removeAll(),this._luminTreeSpine.setAnimationByName(0,"idle-noglow",!0),this._luminTreeSpawnedSignal.dispatch()}renderOrnaments(){if(!W.Aq$.isDefined(this.ornaments)){this.ornaments=[];for(let k=0;k0;)0===k.get(U[B]).length?(k.delete(U[B]),U.splice(B,1)):(this.addGroundFloatling(k.get(U[B]).shift()),B++),B%=U.length;this.updateGroundFloatlingBounds()}addGroundFloatling(k){const B=this._floatlingPool.getObject().findComponent(mt);B.floatling=k,this.groundFloatlings.push(B),this.groundFloatlingContainer.addChild(B.GameObject)}disposeGroundFloatlings(){this.groundFloatlings&&(this.groundFloatlings.forEach((k=>{k.GameObject.active=!1})),this.groundFloatlings=null)}spawnAndDescendFloatlings(k){const B=this._floatlingPool.getObject().findComponent(mt);B.onFloatingAssetLoaded.addOnce((()=>{this.descendFloatling(B,!1)})),B.floatling=k}descendFloatling(k,B){this.groundFloatlingContainer.addChild(k.GameObject),At.Z.bringToTop(this.groundFloatlingContainer.legacyTransform.group),this.descendingFloatlings.push(k),B||(k.GameObject.legacyTransform.x=(H.D.FRAME_HALF_WIDTH+50)*(2*pt.o.integerInRange(0,2)-1)),k.floatDown(H.D.FLOATLING_WALK_AREA.y+H.D.FLOATLING_WALK_AREA.height,B,this.onFinishDescend.bind(this,k))}onFinishDescend(k){k.floatling.lastThrown=0;const B=this.descendingFloatlings.indexOf(k);this.descendingFloatlings.splice(B,1),-1===this._tower.floors.indexOf(k.floatling.floor)?this._tower.notifyUpdate(lt.L.TOWN_FIND_DESCENDED_FLOATLINGS_TOWER,k):this.addFloatlingRendererToGround(k)}addFloatlingRendererToGround(k){if(W.Aq$.isDefined(this.groundFloatlings)){if(this.groundFloatlings.push(k),this.updateGroundFloatlingBounds(!1),k.GameObject.parent!==this.groundFloatlingContainer){const B=k.GameObject.legacyTransform.group.getGlobalPosition().clone();this.groundFloatlingContainer.addChild(k.GameObject),k.GameObject.legacyTransform.group.updateTransform();const U=k.GameObject.legacyTransform.group.getGlobalPosition().clone();k.GameObject.legacyTransform.group.position=new rt.Point(k.GameObject.legacyTransform.group.position.x-(U.x-B.x),k.GameObject.legacyTransform.group.position.y-(U.y-B.y))}}else k.GameObject.active=!1}offsetWaitingViews(){const k=W.i7d.main;this.descendingFloatlings.filter((k=>k.waitingToDescend)).forEach((B=>{B.GameObject.legacyTransform.y=k.viewMatrix.ty-k.viewportSize.height,this.descendFloatling(B,!0)}))}updateGroundFloatlingBounds(k=!0){const B=W.M_G.clone(H.D.FLOATLING_WALK_AREA);B.height=B.height/this.groundFloatlings.length;for(let U=0;UH.D.FLOATLING_IMMEDIATE_WALK_RATIO&&this.groundFloatlings[U].setRandomWalkTarget(),B.y+=B.height,At.Z.bringToTop(this.groundFloatlings[U].GameObject.legacyTransform.group)}onTowerUpdate(k){switch(k.getFinalNotification().type){case lt.L.TOWER_CREATE_FLOOR:case lt.L.TOWER_MOVE_FLOOR:case lt.L.TOWER_PUSH_FLOOR:case lt.L.TOWER_REMOVE_FLOOR:this.renderFloors(this._floorsStart,this._floorsEnd);break;case lt.L.FLOOR_PUSH_FLOATLING:const B=k.getFinalNotification().source;B.isExternalBuild?(this.disposeGroundFloatlings(),this.renderFloors(this._floorsStart,this._floorsEnd)):this.spawnAndDescendFloatlings(B.floatlings[B.floatlings.length-1])}}destroy(){this._floorClickedSignal.dispose(),this._luminTreeSpawnedSignal.dispose(),super.destroy()}}class Me extends W.uAl{constructor(){super(...arguments),this._towerRenderers=[],this._mathTower=null,this._leftMostIndex=0,this._rightMostIndex=0,this._bottomMostIndex=0,this._topMostIndex=0,this._floorClickedSignal=new W.HN0}get infinityRenderer(){return this._infinityRenderer}get towerRenderers(){return this._towerRenderers}set town(k){this._town&&this._town.onUpdate.removeAll(this),this._town=k,this._town.onUpdate.add(this.onTownUpdate,this),this.refreshRenderers()}get floorPool(){return this._floorPool}get decorationPool(){return this._decorationPool}get floatlingPool(){return this._floatlingPool}get bottomMostIndex(){return this._bottomMostIndex}get topMostIndex(){return this._topMostIndex}get onFloorClicked(){return this._floorClickedSignal}create(){super.create(),this._game=F.q.instance.game,this._floorPool=new W.iyL(this.createFloor.bind(this)),this._decorationPool=new W.iyL(this.createDecoration.bind(this)),this._floatlingPool=new W.iyL(this.createFloatling.bind(this),this.resetFloatling.bind(this))}init(k,B,U,F=!1,G){this._mathTower=G,this._camera=B,this._storeManager=U,this.town=k,this._isTutorial=F,this._camera.onBeginHorizontalTween.add(this.onBeginHorizontalMove,this),this._camera.onUpdateVerticalTween.add(this.onVerticalMove,this),this._mathTower.onUpdate.add(this.onMathTowerUpdate.bind(this))}moveToFloor(k,B){const U=this._camera.transitionDistance.x*(k%2==0?k:k-1),F=H.D.TOWER_BASE_Y-H.D.FLOOR_HEIGHT*B-H.D.CAMERA_Y_OFFSET;this._camera.scrollToPosition(U,F)}onBeginHorizontalMove(k){k=this._camera.x-this._camera.transitionDistance.x?(this._leftMostIndex>0&&(this._leftMostIndex--,this._towerRenderers[this._leftMostIndex].renderFloors(this._bottomMostIndex,this._topMostIndex)),this._camera.onEndHorizontalTween.addOnce(this.onEndHorizontalStep,this)):k>this._camera.x&&k<=this._camera.x+this._camera.transitionDistance.x?(this._rightMostIndex{this._camera.onUpdateHorizontalTween.remove(this.onHorizontalMove),this.findHorizontalEdgeIndexes()})))}onEndHorizontalStep(){!this.isTowerOnScreen(this._leftMostIndex)&&this._leftMostIndex0&&(this._towerRenderers[this._rightMostIndex].hideTower(),this._rightMostIndex--)}onHorizontalMove(){this.findHorizontalEdgeIndexes();for(let k=0;k=this._leftMostIndex&&k<=this._rightMostIndex?this._towerRenderers[k].renderFloors(this._bottomMostIndex,this._topMostIndex):this._towerRenderers[k].hideTower()}onVerticalMove(){const k=this._bottomMostIndex,B=this._topMostIndex;if(this.findVerticalEdgeIndexes(),this._bottomMostIndex!==k||this._topMostIndex!==B){if(this._mathTower.isInfinity)return void this._infinityRenderer.renderFloors(this._bottomMostIndex,this._topMostIndex);for(let k=this._leftMostIndex;k<=this._rightMostIndex;k++)this._towerRenderers[k]&&this._towerRenderers[k].renderFloors(this._bottomMostIndex,this._topMostIndex)}}floorClicked(k,B){this._floorClickedSignal.dispatch(k,B)}isTowerOnScreen(k){if(k<0||k>=this._towerRenderers.length)return!1;const B=this._towerRenderers[k].legacyTransform.group.position.x-this._camera.x;return B>0&&B=this.bottomMostIndex&&k=this._towerRenderers.length){this._leftMostIndex--;break}for(this._rightMostIndex=this._towerRenderers.length-1;this._rightMostIndex>-1&&!this.isTowerOnScreen(this._rightMostIndex);)if(this._rightMostIndex--,this._rightMostIndex<0){this._rightMostIndex++;break}}findVerticalEdgeIndexes(){this._bottomMostIndex=-Math.floor((this._camera.y+this._camera.cameraHeight-H.D.TOWER_BASE_Y)/H.D.FLOOR_HEIGHT)-1,this._topMostIndex=this._bottomMostIndex+H.D.TOWER_RENDERER_CAMERA_HEIGHT,this._bottomMostIndex=Math.max(this._bottomMostIndex,0)}refreshVisibleFloors(){if(this._mathTower.isInfinity)this._infinityRenderer.renderFloors(this._bottomMostIndex,this._topMostIndex);else if(0!==this._towerRenderers.length)for(let k=this._leftMostIndex;k<=this._rightMostIndex;k++)this._towerRenderers[k].renderFloors(this._bottomMostIndex,this._topMostIndex)}createFloatling(){const k=new W._mx(this.GameObject);return k.addComponent(W.K16),k.addComponent(mt),k}resetFloatling(k){k.active=!0,k.legacyTransform.group.alpha=1,k.legacyTransform.group.visible=!0,k.legacyTransform.group.scale.set(1,1);k.findComponent(mt).spine.setSlotVisibility("shadow",!0)}createFloor(){const k=new De(this._storeManager,null,this._mathTower);return k.floatlingPool=this._floatlingPool,k.decorationPool=this._decorationPool,k}createDecoration(){const k=new W._mx;k.addComponent(W.K16);return k.addComponent(ut._).setAnchor(.5,.5),k}checkAwardFloatlings(k){k.canReceiveFloatlings&&k.awardFloatlings(this._storeManager)}offsetWaitingFloatlings(){this._mathTower.isInfinity?this._infinityRenderer&&this._infinityRenderer.offsetWaitingViews():this._towerRenderers.forEach((k=>{k.offsetWaitingViews()}))}onTownUpdate(k){if(this.GameObject.active)switch(k.getFinalNotification().type){case lt.L.TOWN_CREATE_TOWER:case lt.L.TOWN_PUSH_TOWER:this.addTowerRenderer(!0);break;case lt.L.TOWN_REMOVE_TOWER:this._towerRenderers.pop().destroy(),this._rightMostIndex>=this._towerRenderers.length&&(this._rightMostIndex=this._towerRenderers.length-1);break;case lt.L.TOWER_CREATE_FLOOR:case lt.L.TOWER_PUSH_FLOOR:case lt.L.TOWER_MOVE_FLOOR:case lt.L.TOWER_REMOVE_FLOOR:this.updateBounds(),this.refreshVisibleFloors();break;case lt.L.FLOOR_SET_STATE:this._isTutorial||this.checkAwardFloatlings(k.getLastChild().source);break;case lt.L.TOWN_FIND_DESCENDED_FLOATLINGS_TOWER:const B=k.getLastChild().value;if(-1!==this._infinityRenderer.tower.floors.indexOf(B.floatling.floor))break;for(let k=0;k(0,et.sH)(this,void 0,void 0,(function*(){if(!this.breadCrumbManager.isBreadcrumbComplete(Ot.M.TutorialCompleted))return F.q.instance.prodigy.world.playScene(H.D.TUTORIAL_CUTSCENE),void this.cleanup(!1);this.setupRenderers(),this.setupCharacterController(),this.setupFTUEElements(),this.setupNavButtons(F.q.instance.prodigy.open.menusGameObject),this.setupHUD(),this.setupStateManager(),this.setupNotifications(),setTimeout(this.processTownUpdates.bind(this),500)})),j=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player;J.U.progressData.step===z.B.NotStarted&&j.hasFoundAllKeystones()?at.E.runAllKeystonesSequenceOnMapSetup(G):G().catch(W.RQr.createHandler("TowerTownMap setup error finishing setup"))}cleanup(k=!0){var B;this.game.broadcaster.removeAppListener(H.D.MESSAGE_DISABLE_NAVIGATION,this),this.game.broadcaster.removeAppListener(H.D.MESSAGE_ENABLE_NAVIGATION,this),this.game.broadcaster.removeAppListener(H.D.MESSAGE_DISABLE_FLING_BUTTON,this),this.game.broadcaster.removeAppListener(H.D.MESSAGE_ENABLE_FLING_BUTTON,this),this.game.broadcaster.removeAppListener(H.D.MESSAGE_ENABLE_BUTTON,this),this.game.broadcaster.removeAppListener(H.D.MESSAGE_DISABLE_BUTTON,this),this._town&&this._town.onUpdate.removeAll(this),this._repeatingBackgroundController&&this._repeatingBackgroundController.destroy(),this.screen&&(k&&(null===(B=this.screen.menuBar)||void 0===B||B.destroy(),this.screen.menuBar=null),this.screen.showMenu=!0,this.screen.user.showName(),this.screen.user.float(!1)),this._mathTower.isInfinity=!1,this._hudContainer&&this._hudContainer.destroy(),this._mathTower.education.onUpdate.removeAll(this),super.cleanup()}setupCameraController(){super.setupCameraController(),this._pageCamera.registerKeyListeners(nt.D.UP,nt.D.DOWN,nt.D.LEFT,nt.D.RIGHT),this._pageCamera.registerKeyListeners(nt.D.W,nt.D.S,nt.D.A,nt.D.D)}setupNotifications(){this._mathTower.education.onUpdate.add(this.onEducationNotification,this)}generateTown(k=!1){super.generateTown(k);this._mathTower.currentTown.towers.length>0?this._mathTower.activeTower.isActiveTower=!0:this._mathTower.currentTown.createTower(),this.addCurrentTownAssets()}addCurrentTownAssets(){const k=[st._.Towertown_frames_store_json,st._.Towertown_interiors_store_json];W.Mnj.addAll(this.assets,k)}setupRenderers(){this._requiredLayers.forEach((k=>{let B=W.wa5.getActiveScene().getLayer(k);B||(B=W.wa5.getActiveScene().addLayer(k)),B.attachToCamera=!0}));const k=new W._mx(this.screen.backgroundGameObject);k.addComponent(W.K16),this._townRenderer=k.addComponent(Me),this._townRenderer.init(this._town,this._pageCamera,this._storeManager,!1,this._mathTower),this._repeatingBackgroundController=new pe(this.pageCamera,this.screen),this.game.stage.setBackgroundColor(H.D.TOWN_BG_COLOR)}setupCharacterController(){this.screen.user.position.set(H.D.PLAYER_CAMERA_OFFSET_X,H.D.PLAYER_CAMERA_OFFSET_Y),W.Aq$.isDefined(this.screen.user.follow)&&this.screen.user.follow.position.set(H.D.PLAYER_CAMERA_OFFSET_X,H.D.PLAYER_CAMERA_OFFSET_Y),super.setupCharacterController()}setupFTUEElements(){this._awakeFloatlings=this._mathTower.getFloatlingsForFling().length,this.breadCrumbManager.isBreadcrumbComplete(Ot.M.FlingUnlocked)&&!this.breadCrumbManager.isBreadcrumbComplete(Ot.M.FlingTutorialComplete)&&this._awakeFloatlings{this._mathTower.setClickable(!0)}),this),this.game.broadcaster.addAppListener(H.D.MESSAGE_DISABLE_BUTTON,(()=>{this._mathTower.setClickable(!1)}),this)}setupStateManager(){this._stateManager=new ct(this._mathTower,this._prefabLoader,this),this._stateManager.addState(H.D.STATE_CAMERA,new Pt(this._pageCamera,this.cameraHUDInterface)),this._stateManager.addState(H.D.STATE_CHOOSE_FLOOR,new xt),this._stateManager.addState(H.D.STATE_BUILD,new Tt),this._stateManager.addState(H.D.STATE_START,new he),this._stateManager.addState(H.D.STATE_SHROUD,new oe),this._stateManager.addState(H.D.STATE_ROOFTOP,new re),this._stateManager.addState(H.D.STATE_MOVE,new se),this._stateManager.addState(H.D.STATE_INFINITY,new ie(this._townRenderer)),this._stateManager.addState(H.D.STATE_INFINITY_CHOOSE_FLOOR,new Zt),this._stateManager.addState(H.D.STATE_INFINITY_BUILD,new Xt),this._stateManager.addState(H.D.STATE_FLING,new Yt(this._townRenderer.floatlingPool)),this._stateManager.addState(H.D.STATE_QUICK_RENO,new ne)}disableNavigation(){this._mathTower.uiFactory.hud.toggleVisible(!1),this._mathTower.setClickable(!1),this._hudContainer.active=!1,this._pageCamera.onDisable()}enableNavigation(){this._mathTower.uiFactory.hud.toggleVisible(!0),this._hudContainer.active=!0,this._mathTower.setClickable(!0),this._pageCamera.onEnable()}enableFlingButton(){this._mathTower.uiFactory.hud.toggleFlingButton(!0)}disableFlingButton(){this._mathTower.uiFactory.hud.toggleFlingButton(!1)}setAllFloatlingsLastThrownTime(k,B){for(let U=0;U{U.lastThrown=k,U.state=B}))}processTownUpdates(){const k=this.generateTownUpdateSummary(this._town,this._mathTower.getGrade());k.hasPendingChanges?(this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_DISABLE_NAVIGATION),k.applyChanges(),k.totalUpdateChanges>0?(this._stateManager.dialogueController.addEvents([{dialogueData:this._stateManager.dialogueController.dataProvider.get(H.D.DIALOGUE_WELCOME_BACK),blockInput:!0,yes:()=>{this._mathTower.showTownUpdate(k,(()=>{F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this.startNewGradeSequence()}))},no:this.startNewGradeSequence.bind(this)}]),this._stateManager.dialogueController.start(!0)):this.startNewGradeSequence()):this.startNewGradeSequence()}startNewGradeSequence(){this._mathTower.newGrade?(this._mathTower.newGrade=!1,this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_DISABLE_NAVIGATION),this._mathTower.uiFactory.openNewGradePopup((()=>{this._mathTower.game.broadcaster.broadcast(H.D.MESSAGE_ENABLE_NAVIGATION),setTimeout((()=>{this.startGame()}),500)}))):this.startGame()}startGame(){this._mathTower.uiFactory.start(),this._stateManager.changeToState(H.D.STATE_START),this.setupInfinityTowerListener()}setupInfinityTowerListener(){this._mathTower.onUpdate.add((k=>{k.type===lt.L.TOWER_TOWN_INFINITY_TOWER_OPEN&&this.showInfinityTowerDialog()}))}checkFlingBreadcrumb(k){this.breadCrumbManager.isBreadcrumbComplete(Ot.M.FlingUnlocked)||k.state===vt.a.Wandering&&(this._awakeFloatlings++,this._awakeFloatlings>=H.D.FLING_FTUE_FLOATLING_COUNT&&(this.breadCrumbManager.completeBreadcrumb(Ot.M.FlingUnlocked),this._mathTower.uiFactory.hud.updateBreadcrumbsLocked()))}beginFloatlingWander(){const k=(0,it.shuffle)(this.townRenderer.floatlingPool.aliveList.generateArray());for(let U=0;U{this._buildInterface.forceRightAnswer(),this._buildInterface.buildButton.inputEnabled=!1}))}floorFinished(){this.completeFloor(),this.switchState(H.D.STATE_TUTORIAL_END)}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],Le.prototype,"buildButtonClicked",null);class ke extends wt{constructor(k){super(),this._toolTip=null,this._towerTownBreadcrumbManager=k}onEnter(){this._dialogueController=new xe.Y(this._mathTower);const k=this._owner.nextFloorPosition();this._chooseFloor=this._mathTower.uiFactory.chooseFloorLook(k,this._towerTownBreadcrumbManager),this._chooseFloor.onCreate.add(this.setupTempFloor.bind(this)),this._chooseFloor.onCreate.add(this.bindButtons.bind(this)),this._chooseFloor.selectionChanged.add(this.selectionChanged.bind(this)),this._toolTip=Ft.A.displayToolTipSpeech(this._toolTip,F.q.instance.prodigy.open.menusGameObject,{bodyText:F.q.instance.prodigy.gameContainer.get(W.$Bt.LocalizationService).getText("TT_FTUE_CHOOSE_FLOOR"),xPosition:315,yPosition:350,arrowXRelPos:.7,arrowDirection:Ct.i.DOWN}),this._owner.map.screen.backgroundGameObject.addChild(this._toolTip.GameObject)}bindButtons(){this._chooseFloor.startBuildingButton.onClick.add(this.onStartBuildingClicked.bind(this)),this._chooseFloor.quitButton.lockState(Jt.K.Disabled),this._chooseFloor.quitButton.inputEnabled=!1,this._chooseFloor.framesToggleButton.GameObject.destroy(),this._chooseFloor.decorationsToggleButton.GameObject.destroy();const k=this.getFloorPosition(),B=k.x-H.D.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_X;this._chooseFloor.startBuildingButton.GameObject.legacyTransform.group.position.set(B,k.y+H.D.CHOOSE_FLOOR_BUILD_BUTTON_OFFSET_Y)}getFloorPosition(){const k=this._mathTower.currentTown.towers.length-1,B=this._mathTower.currentTown.towers[k].floors.length;return this._owner.getFloorPosition(k+.5,B)}setupTempFloor(){let k=this._mathTower.activeTower;(!W.Aq$.isDefined(k)||k.floors.length>=ot.o.MAXIMUM_FLOOR_COUNT)&&(k=this._mathTower.currentTown.createTower()),this._tempFloor=k.createFloor(this._mathTower.currentSkillID),this._tempFloor.blockCount=H.D.MAX_SMART_BLOCKS,this._tempFloor.roomID=1,this._tempFloor.frameID=2,this._tempFloor.blockCount=ht.g.determineNewBlockCount(this._mathTower.education.getSkillById(this._tempFloor.skillID),this._tempFloor),this._dialogueController.addGuideHand(this._chooseFloor.roomsToggleButton.GameObject.legacyTransform.group,this._mathTower.game.width/2,30)}onStartBuildingClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._mathTower.uiFactory.tooltip(F.q.instance.prodigy.gameContainer.get(W.$Bt.LocalizationService).getText("TT_FTUE_TUTORIAL"),!0,250,0,0),this._toolTip.close(),this._tempFloor.blockCount=0,this._chooseFloor.close(),this._mathTower.activeFloor.state=_t.u.UnderConstruction,this._dialogueController.showCastSpells((()=>{this.switchState(H.D.STATE_TUTORIAL_BUILD)}))}selectionChanged(k){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._tempFloor.roomID=W.Aq$.isDefined(k.roomID)?k.roomID:1,this._tempFloor.frameID=W.Aq$.isDefined(k.frameID)?k.frameID:2,this._tempFloor.decorations.clear(),k.decorations&&k.decorations.forEach((B=>{this._tempFloor.decorations.setAt(B,k.decorations.get(B))})),this._hasChanged||(this._toolTip=Ft.A.displayToolTipSpeech(this._toolTip,F.q.instance.prodigy.open.menusGameObject,{bodyText:F.q.instance.prodigy.gameContainer.get(W.$Bt.LocalizationService).getText("TT_FTUE_START_BUILDING"),xPosition:640,yPosition:245,arrowXRelPos:.5,arrowDirection:Ct.i.DOWN}),this._hasChanged=!0)}}(0,et.Cg)([(0,yt.sg)(H.D.BUTTON_DEBOUNCE_TIME),(0,et.Sn)("design:type",Function),(0,et.Sn)("design:paramtypes",[]),(0,et.Sn)("design:returntype",void 0)],ke.prototype,"onStartBuildingClicked",null);var Be=U(96810);class Ue extends wt{constructor(k,B){super(),this.tweenDelayMS=500,this.tweenFloatHorizontally=1e3,this.tweenFloatVertically=2800,this._pageCamera=k,this._breadcrumbManager=B}onEnter(){this._pageCamera.Active=!0,this._dialogueController=new xe.Y(this._mathTower),this._dialogueController.showAllDone(this.spawnFloatlings.bind(this))}onExit(){this._pageCamera.Active=!1}spawnFloatlings(){const k=this.createFloatling(364,-100);this.tweenFloatling(k,420,400);const B=this.createFloatling(924,-100);this.tweenFloatling(B,988,445,600),this._dialogueController.showTutorialCompleted(this.completeTutorial.bind(this))}completeTutorial(){this._owner.map.storeManager.removeDefaultItems(),this._breadcrumbManager.completeBreadcrumb(Ot.M.TutorialCompleted),F.q.instance.prodigy.world.it(H.D.TOWER_TOWN_MAP),F.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:"Tower Town",funnelType:"tutorial",stepName:Be.l.TutorialComplete})}createFloatling(k,B){const U=F.q.instance.prodigy.create.spine(k,B,H.D.SPINE_SWOOPY);return U.setToSetupPose(),U.setAnimationByName(0,"idle",!0),U}tweenFloatling(k,B,U,F=0){const G=this._mathTower.game.add.tween(k,this).to({x:B},this.tweenFloatHorizontally,W.GS3.Quadratic.InOut).delay(this.tweenDelayMS+F).yoyo(!0),j=this._mathTower.game.add.tween(k,this).to({y:U},this.tweenFloatVertically,W.GS3.Quadratic.InOut).delay(F);G.start(),j.start()}}class Fe extends wt{constructor(k){super(),this._pageCamera=k}onEnter(){this._pageCamera.Active=!0,this._dialogueController=new xe.Y(this._mathTower),this._owner.map.storeManager.pushDefaultItems(),this.spawnAddFloorPrefab()}onExit(){this._pageCamera.Active=!1,this._toolTip.destroy(),W.Aq$.isDefined(this._addFloor)&&W.Aq$.isDefined(this._addFloor.GameObject)&&(this._addFloor.addFloorButton.onClick.removeAll(),this._addFloor.GameObject.destroy()),W.Aq$.isDefined(this._buildInterface)&&this._buildInterface.close()}spawnAddFloorPrefab(){const k=this._owner.prefabLoader.loadFromGUID(H.D.UI_ADD_FLOOR_PREFAB,this._owner.map.screen.backgroundGameObject);this._addFloor=k.findComponent(Rt.R),k.legacyTransform.group.position=this._owner.nextFloorPosition(),k.legacyTransform.group.position.x+=H.D.FLOOR_TUTORIAL_OFFSET,this._addFloor.newTowerButton.GameObject.destroy(),this._addFloor.addFloorButton.GameObject.legacyTransform.y+=H.D.ADD_FLOOR_BUTTON_OFFSET,this._owner.moveToNextFloor(),this._addFloor.addFloorButton.onClick.add(this.onAddFloorButtonClicked.bind(this)),this._toolTip=this._mathTower.uiFactory.tooltip(F.q.instance.prodigy.gameContainer.get(W.$Bt.LocalizationService).getText("TT_FTUE_TUTORIAL"),!0,250,0,0),this._addFloor.addFloorButton.inputEnabled=!1,F.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:"Tower Town",funnelType:"tutorial",stepName:Be.l.TutorialStart});const B=new W.I9Y(this._addFloor.addFloorButton.GameObject.legacyTransform.width,0);this._dialogueController.showSwoopyIntroduction(this._addFloor.addFloorButton.GameObject,B,(()=>{this._addFloor.addFloorButton.inputEnabled=!0}))}onAddFloorButtonClicked(){F.q.instance.prodigy.audio.playSFX(H.D.BUTTON_CLICK_SFX_ID,H.D.BUTTON_CLICK),this._dialogueController.removeGuideHand(this._addFloor.addFloorButton.GameObject.legacyTransform.group),this.switchState(H.D.STATE_TUTORIAL_CHOOSE_FLOOR)}}class Ge extends Ce{constructor(k,B,U,F,G,j){super(k,"A0","TOWER_TOWN_TUTORIAL_MAP",235,480,["towertown-A0"],j,"towertown-tutorial"),this._mathTower=B,this._breadcrumbManager=U,this._storeManager=F,this._prefabLoader=G}setup(k,B,U){super.setup(k,B,U);const G=F.q.instance.prodigy.create.spine(300,480,H.D.SPINE_SWOOPY,B.background);G.setToSetupPose(),G.setAnimationByName(0,"idle",!0),B.user.hideName(),this._pageCamera=B.backgroundGameObject.addComponent(Dt);const j=new W._mx(B.backgroundGameObject);j.addComponent(W.K16),this._townRenderer=j.addComponent(Me),this._townRenderer.init(this._town,this._pageCamera,this._storeManager,!this._breadcrumbManager.isBreadcrumbComplete(Ot.M.TutorialCompleted),this._mathTower),this._mathTower.buildUIFactory(B,this),B.showMenu=!1,k.broadcaster.broadcast(Y.Y1.HideHUD,Y.HG.HUD),this._stateManager=new ct(this._mathTower,this._prefabLoader,this),this._stateManager.addState(H.D.STATE_TUTORIAL_START,new Fe(this._pageCamera)),this._stateManager.addState(H.D.STATE_TUTORIAL_CHOOSE_FLOOR,new ke(this._breadcrumbManager)),this._stateManager.addState(H.D.STATE_TUTORIAL_BUILD,new Le),this._stateManager.addState(H.D.STATE_TUTORIAL_END,new Ue(this._pageCamera,this._breadcrumbManager)),this._stateManager.changeToState(H.D.STATE_TUTORIAL_START),k.stage.setBackgroundColor(H.D.TUTORIAL_BG_COLOR)}cleanup(){super.cleanup()}}class je extends j.b{constructor(k){super(k),this.difficultyModeAgnostic=!0,this.name="TowerTownZone",this.ID=je.ZONE_ID,this.battleBG="towertown-default-2",this.defaultOnFaint="towertown-A1",this.questHub="towertown-A1",this.states=["firstVisit"],this.bgmID=H.D.TOWER_TOWN_BGM_ID,this.zoneIndex=G.P.TowerTown;const B=F.q.instance.prodigy.gameContainer.get($.G.MathTower),U=F.q.instance.prodigy.gameContainer.get($.G.StoreManager),j=F.q.instance.prodigy.gameContainer.get("d0e-64fd"),V=F.q.instance.prodigy.gameContainer.get($.G.BreadcrumbManager);this.maps={A0:new Ge(this,B,V,U,j,je.ASSETS),A1:new Ne(this,B,V,U,j,je.ASSETS)},this.scenes={intro:new tt(this,je.ASSETS)}}teleport(k,B,U,F,G){this.maps[k].generateTown("A0"===k),super.teleport(k,B,U,F,G)}teleportLoad(){F.q.instance.prodigy.load.removeAssets(!0),super.teleportLoad()}}je.ZONE_ID=V.A_.TOWERTOWN,je.ASSETS=[H.D.ATLAS_CORE,H.D.ATLAS_CORE_2,H.D.ATLAS_ICONS,H.D.ATLAS_UI_TITAN,H.D.ATLAS_SHIPWRECK_PROGRESS,H.D.ATLAS_SHIVERCHILL_PROGRESS,H.D.ATLAS_BUTTONS,H.D.ATLAS_DIALOGUES,H.D.ATLAS_STORE,H.D.ATLAS_REGISTRATION,H.D.ATLAS_TOWERTOWN_MISC,H.D.ATLAS_TOWERTOWN,H.D.ATLAS_PANELS,H.D.ATLAS_FLING_TARGETS,H.D.ATLAS_RESEARCH_POINTS,H.D.ATLAS_FLAGS,H.D.ATLAS_TOPIC_ICONS,H.D.ATLAS_SWOOPY_FACE,H.D.SPINE_SHADOW_PORTAL,H.D.SPINE_FLOATING_FIRE_1,H.D.SPINE_FLOATING_ICE_1,H.D.SPINE_FLOATLING_PLANT_1,H.D.SPINE_FLOATLING_STORM_1,H.D.SPINE_LUMIN_TREE,H.D.SPINE_SWOOPY,H.D.SPINE_FLING_SHIMMER,H.D.SPINE_STUBBORN_SHADOW,H.D.SPINE_SHROUD_CLOUD,H.D.SPINE_FLAGPOLE,H.D.PUPPETMASTER_BGM,H.D.TOWER_TOWN_BGM,H.D.FLOATLING_FLING_BGM,H.D.SHADOW_PORTAL_OPEN,H.D.SHADOW_PORTAL_CLOSE,H.D.TOWER_TOWN_SFX,H.D.FLOATLING_FLING_SFX,H.D.TILESET_CLOUD,H.D.TILESET_CLOUD_NEW,H.D.TILESET_COLLISIONS,H.D.TILESET_FOREST_NEW,H.D.TILESET_GENERIC,H.D.TILESET_GENERIC_NEW,H.D.TILESET_MATH_TOWER_BASIC,H.D.TILESET_TUTORIAL_SUBSPACE,H.D.TILESET_INFINITY_TOWER_CONSTRUCTION,H.D.TILESET_OUTSIDE,H.D.TILESET_TOWERTOWN_BASIC,H.D.TILESET_TOWN_NEW]},90161:(k,B,U)=>{"use strict";U.d(B,{R:()=>j});var F=U(82680),G=U(64794);class j extends F.W{constructor(k,B,U,F,j){super(k,B,G.D.BASE_MENU_ASSET_ID,void 0,j),this._mathTower=U,this._prefabLoader=F}get mathTower(){return this._mathTower}get prefabLoader(){return this._prefabLoader}}},3836:(k,B,U)=>{"use strict";U.d(B,{_:()=>z,i:()=>F});var F,G=U(62459),j=U(35120),$=U(76974),H=U(64794),V=U(15678),W=U(84938),q=U(90161),K=U(50860);!function(k){k[k.Normal=0]="Normal",k[k.Tutorial=1]="Tutorial",k[k[1/0]=2]="Infinity",k[k.QuickReno=3]="QuickReno"}(F||(F={}));class z extends q.R{constructor(k,B,U,j,$,V,W,q=F.Normal){super(k,B?B.legacyTransform.group:void 0,U,j,[H.D.ATLAS_MATH_TOWER,H.D.SPINE_SMART_BLOCK_VFX]),this._onBuildAnimationComplete=new G.HN0,this._onFloorFinished=new G.HN0,this._onWrongAnswer=new G.HN0,this._parentGameObject=null,this._state=F.Normal,this._parentGameObject=B,this._floor=$,this._compX=V,this._compY=W,this._state=q}create(){const k=this.prefabLoader.load(H.D.UI_BUILD_COMPONENT_PREFAB,this._parentGameObject);k.legacyTransform.group.position=k.legacyTransform.group.position.set(k.legacyTransform.group.position.x+this._compX,k.legacyTransform.group.position.y+this._compY),this._inProgressComponent=k.findComponent(K.v);for(let B=0;B{this.floorFinished()}),this._state===F.Tutorial?this.quickBuild(k):this._state===F.QuickReno?this.onSkillMastered(k):this.startBlockAnimation(k,B,!0,!0)}forceRightAnswer(){this.quickBuild(this._floor.blockCount)}onSkillMastered(k){this._floor.blockCount=H.D.MAX_SMART_BLOCKS,this.dropBlocks(k,H.D.MAX_SMART_BLOCKS,this.floorFinished.bind(this))}dropBlocks(k,B,U){for(let F=k;F{if(this.game){let k;F===B-1&&(k=U),this.startBlockAnimation(F,k,!1,!1)}}),(F-k)*H.D.BLOCK_FALL_MULTIPLE_DELAY)}quickBuild(k){this._floor.blockCount{this._inProgressComponent.buildButton.inputEnabled=!0,this._inProgressComponent.buildButton.currentState=$.K.Up,this._onBuildAnimationComplete.dispatch()}))):this.onSkillMastered(k)}get buildButton(){return this._inProgressComponent.buildButton}get onBuildAnimationComplete(){return this._onBuildAnimationComplete}get floorFinishedSignal(){return this._onFloorFinished}get wrongAnswerSignal(){return this._onWrongAnswer}get gameObject(){return this._gameObject}floorFinished(){this._state===F.QuickReno&&(this._state=F.Normal),this._inProgressComponent.buildButton.inputEnabled=!0,this._inProgressComponent.buildButton.currentState=$.K.Up,setTimeout((()=>{this._onFloorFinished.dispatch()}),100)}qiCallback(k){const B=this.mathTower.education.getSkillById(this._floor.skillID);V.g.isSkillMastered(B)&&this._state!==F.QuickReno?this.onSkillMastered(this._floor.blockCount):k?this.onRightAnswer(this._floor.blockCount):(this._inProgressComponent.buildButton.inputEnabled=!0,this._inProgressComponent.buildButton.currentState=$.K.Up,this._onWrongAnswer.dispatch())}infinityQiCallback(k){k?this.onRightAnswer(this._floor.blockCount++):(this._inProgressComponent.buildButton.inputEnabled=!0,this._inProgressComponent.buildButton.currentState=$.K.Up,this._onWrongAnswer.dispatch())}startBlockAnimation(k,B,U=!1,F=!1){this._inProgressComponent.setBlockEnabled(k,!0),this._inProgressComponent.setBlockGraphicVisible(k,!1),this._floor.blockCount=k+1;const G=this._inProgressComponent.blocks[k],$=j.q.instance.prodigy.create.spine(H.D.BLOCK_OFFSET_X,H.D.BLOCK_OFFSET_Y-H.D.BLOCK_FALL_HEIGHT,H.D.SPINE_SMART_BLOCK_VFX);G.legacyTransform.group.addChild($),$.setToSetupPose(),$.setAnimationByName(0,"appear",!1).timeScale=H.D.BLOCK_APPEAR_TIMESCALE,$.onComplete.add(this.makeBlockTween.bind(this,k,$,B,U,F)),j.q.instance.prodigy.audio.playSFX(H.D.TOWER_TOWN_SFX_ID,H.D.DROP_BLOCK)}makeBlockTween(k,B,U,F=!1,G=!1){this._inProgressComponent.blocks[k];B.y=H.D.BLOCK_OFFSET_Y,B.setToSetupPose(),B.setAnimationByName(0,"land2",!1).timeScale=H.D.BLOCK_FALL_TIMESCALE,this.shakeScreen(H.D.BLOCK_FALL_SHAKE_ANIMATION_DELAY);B.onComplete.removeAll(),B.onComplete.add((()=>{F&&(this._inProgressComponent.buildButton.inputEnabled=!0,this._inProgressComponent.buildButton.currentState=$.K.Up),this._inProgressComponent.setBlockGraphicVisible(k,!0),window.setTimeout((()=>{this.deleteSpine(B)}),1),G&&this._onBuildAnimationComplete.dispatch()}).bind(this)),U&&B.onComplete.add(U)}deleteSpine(k){k.visible=!1,k.pendingDestroy=!0}shakeScreen(k=0){const B=this.game.world.getChildAt(0),U=this.game.add.tween(B,this).to({y:H.D.BLOCK_FALL_SHAKE_DISTANCE*W.B.screenShake.value},H.D.BLOCK_FALL_SHAKE_IN_TIME,G.GS3.Linear.None,!1,k),F=this.game.add.tween(B,this).to({y:0},H.D.BLOCK_FALL_SHAKE_OUT_TIME,G.GS3.Bounce.Out);U.chain(F),U.start()}}},14991:(k,B,U)=>{"use strict";var F;U.d(B,{v:()=>F}),function(k){k[k.Visible=0]="Visible",k[k.Hidden=1]="Hidden",k[k.SlidingOut=2]="SlidingOut",k[k.SlidingIn=3]="SlidingIn"}(F||(F={}))},67844:(k,B,U)=>{"use strict";U.d(B,{R:()=>V});var F=U(8674),G=U(62459),j=U(49237),$=U(28152),H=U(64794);let V=class extends G.uAl{constructor(){super(...arguments),this._addFloorButton=null,this._newTowerButton=null}get addFloorButton(){return this._addFloorButton}get newTowerButton(){return this._newTowerButton}removeNewTowerButton(){this.newTowerButton.GameObject.destroy(),this.addFloorButton.GameObject.legacyTransform.y+=H.D.ADD_FLOOR_BUTTON_OFFSET}};(0,F.Cg)([(0,G.x4W)("addFloorButton"),(0,F.Sn)("design:type",j.$)],V.prototype,"_addFloorButton",void 0),(0,F.Cg)([(0,G.x4W)("newTowerButton"),(0,F.Sn)("design:type",j.$)],V.prototype,"_newTowerButton",void 0),V=(0,F.Cg)([(0,G.EVk)("AddFloorComponent",$.Y.towerTown)],V)},21573:(k,B,U)=>{"use strict";U.d(B,{s:()=>G});var F=U(62459);class G extends F.uAl{constructor(){super(...arguments),this._selected=new F.HN0}get selected(){return this._selected}onSelection(){this._selected.dispatch(this.assetID,this.assetType)}destroy(){this._selected.dispose(),super.destroy()}}},22162:(k,B,U)=>{"use strict";U.d(B,{B:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._upButton=null,this._downButton=null,this._leftButton=null,this._rightButton=null}get upButton(){return this._upButton}get downButton(){return this._downButton}get leftButton(){return this._leftButton}get rightButton(){return this._rightButton}};(0,F.Cg)([(0,G.x4W)("upButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_upButton",void 0),(0,F.Cg)([(0,G.x4W)("downButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_downButton",void 0),(0,F.Cg)([(0,G.x4W)("leftButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_leftButton",void 0),(0,F.Cg)([(0,G.x4W)("rightButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_rightButton",void 0),H=(0,F.Cg)([(0,G.EVk)("CameraControlHUD",$.Y.ui)],H)},25735:(k,B,U)=>{"use strict";U.d(B,{I:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._quitButton=null}get quitButton(){return this._quitButton}};(0,F.Cg)([(0,G.x4W)("QuitButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_quitButton",void 0),H=(0,F.Cg)([(0,G.EVk)("CornerQuitComponent",$.Y.towerTown)],H)},99332:(k,B,U)=>{"use strict";var F;U.d(B,{R:()=>F}),function(k){k[k.StartBuilding=0]="StartBuilding",k[k.Quit=1]="Quit",k[k.Rooms=2]="Rooms",k[k.Frames=3]="Frames",k[k.Decorations=4]="Decorations",k[k.PageLeft=5]="PageLeft",k[k.PageRight=6]="PageRight"}(F||(F={}))},39258:(k,B,U)=>{"use strict";U.d(B,{p:()=>q});var F=U(8674),G=U(62459),j=U(49237),$=U(76974),H=U(83133),V=U(28152),W=U(99332);let q=class extends G.uAl{constructor(){super(...arguments),this._largeItems=[],this._smallItems=[],this._commandSignal=new G.HN0}get commands(){return this._commandSignal}get largeItemPointer(){return this._largeItemPointer}get smallItemPointer(){return this._smallItemPointer}get largeItemContainer(){return this._largeItemContainer}get smallItemContainer(){return this._smallItemContainer}get largeItemPoints(){return this._largeItems}get smallItemPoints(){return this._smallItems}get quitButton(){return this._quit}get startBuildingButton(){return this._startBuilding}get roomsToggle(){return this._rooms}get framesToggle(){return this._frames}get decorationsToggle(){return this._decorations}pageLeftEnabled(k){this.setPageButtonEnabled(this._pageLeft,k)}pageRightEnabled(k){this.setPageButtonEnabled(this._pageRight,k)}setPageButtonEnabled(k,B){B?(k.unlockState(),k.currentState=$.K.Up):k.lockState($.K.Disabled),k.inputEnabled=B}create(){super.create(),this._startBuilding.onClick.add((()=>{this._commandSignal.dispatch(W.R.StartBuilding)})),this._quit.onClick.add((()=>{this._commandSignal.dispatch(W.R.Quit)})),this._rooms.onSelected.add((()=>{this._commandSignal.dispatch(W.R.Rooms)})),this._frames.onSelected.add((()=>{this._commandSignal.dispatch(W.R.Frames)})),this._decorations.onSelected.add((()=>{this._commandSignal.dispatch(W.R.Decorations)})),this._pageLeft.onClick.add((()=>{this._commandSignal.dispatch(W.R.PageLeft)})),this._pageRight.onClick.add((()=>{this._commandSignal.dispatch(W.R.PageRight)}))}destroy(){super.destroy(),this._startBuilding.onClick.dispose(),this._quit.onClick.dispose(),this._rooms.onSelected.dispose(),this._frames.onSelected.dispose(),this._decorations.onSelected.dispose(),this._pageLeft.onClick.dispose(),this._pageRight.onClick.dispose(),this._commandSignal.dispose()}};(0,F.Cg)([(0,G.x4W)("startBuilding"),(0,F.Sn)("design:type",j.$)],q.prototype,"_startBuilding",void 0),(0,F.Cg)([(0,G.x4W)("quit"),(0,F.Sn)("design:type",j.$)],q.prototype,"_quit",void 0),(0,F.Cg)([(0,G.x4W)("pageLeft"),(0,F.Sn)("design:type",j.$)],q.prototype,"_pageLeft",void 0),(0,F.Cg)([(0,G.x4W)("pageRight"),(0,F.Sn)("design:type",j.$)],q.prototype,"_pageRight",void 0),(0,F.Cg)([(0,G.x4W)("rooms"),(0,F.Sn)("design:type",H.l)],q.prototype,"_rooms",void 0),(0,F.Cg)([(0,G.x4W)("frames"),(0,F.Sn)("design:type",H.l)],q.prototype,"_frames",void 0),(0,F.Cg)([(0,G.x4W)("decorations"),(0,F.Sn)("design:type",H.l)],q.prototype,"_decorations",void 0),(0,F.Cg)([(0,G.x4W)("largeItemPointer"),(0,F.Sn)("design:type",G._mx)],q.prototype,"_largeItemPointer",void 0),(0,F.Cg)([(0,G.x4W)("smallItemPointer"),(0,F.Sn)("design:type",G._mx)],q.prototype,"_smallItemPointer",void 0),(0,F.Cg)([(0,G.x4W)("largeItemContainer"),(0,F.Sn)("design:type",G._mx)],q.prototype,"_largeItemContainer",void 0),(0,F.Cg)([(0,G.x4W)("smallItemContainer"),(0,F.Sn)("design:type",G._mx)],q.prototype,"_smallItemContainer",void 0),(0,F.Cg)([(0,G.x4W)("largeItems"),(0,F.Sn)("design:type",Array)],q.prototype,"_largeItems",void 0),(0,F.Cg)([(0,G.x4W)("smallItems"),(0,F.Sn)("design:type",Array)],q.prototype,"_smallItems",void 0),q=(0,F.Cg)([(0,G.EVk)("DecorateFloorComponent",V.Y.towerTown)],q)},27314:(k,B,U)=>{"use strict";U.d(B,{V:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(49237),H=U(28152),V=U(64794);let W=class extends G.uAl{constructor(){super(...arguments),this._selected=new G.HN0,this._deleted=new G.HN0,this._image=null,this._tween=null}get onDelete(){return this._deleted}get onSelect(){return this._selected}get popupShowing(){return this._popup&&this._popup.active}create(){super.create(),this._deleteButton.onClick.add((()=>{this._deleted.dispatch()}),this),this._selectButton.onClick.add((()=>{this._selected.dispatch()}),this),this.showPopup(!1),this.showSelected(!1),this._tween=j.q.instance.game.add.tween(this._pointer.legacyTransform.group,this).to({y:-V.D.SPACE_16PX},V.D.POINTER_BOUNCE_MS,G.GS3.Quadratic.InOut).yoyo(!0).loop(!0).start()}destroy(){this._deleteButton.onClick.dispose(),this._selectButton.onClick.dispose(),this._selected.dispose(),this._deleted.dispose(),j.q.instance.game.tweens.remove(this._tween),this.clearAsset(),this.showPopup(!1),this.showSelected(!1),super.destroy()}setAsset(k){this.clearAsset(),this._image=j.q.instance.prodigy.create.sprite(0,0,k),this._image.inputEnabled=!0,this._image.events.onInputDown.add((()=>{this.showPopup(!0),this.onSelect.dispatch()}),this),this._itemSpawn.legacyTransform.group.addChild(this._image),this.showHardPoint(!1)}clearAsset(){this._image&&(this._image.events.onInputDown.dispose(),this._itemSpawn.legacyTransform.group.removeChild(this._image),this._image.destroy(),this._image=null),this.showHardPoint(!0)}showPointer(k){this._pointer.active=k}showHardPoint(k){this.showPopup(!1),this._image?this._selectButton.GameObject.active=!1:(this.showSelected(!1),this._selectButton.GameObject.active=k)}showPopup(k){this._popup.active=k}showSelected(k){this._selectButton.GameObject.active=!0,this._solid.active=k,this._pointer.active=k,this._dashed.active=!k}};(0,F.Cg)([(0,G.x4W)("deleteButton"),(0,F.Sn)("design:type",$.$)],W.prototype,"_deleteButton",void 0),(0,F.Cg)([(0,G.x4W)("selectButton"),(0,F.Sn)("design:type",$.$)],W.prototype,"_selectButton",void 0),(0,F.Cg)([(0,G.x4W)("pointer"),(0,F.Sn)("design:type",G._mx)],W.prototype,"_pointer",void 0),(0,F.Cg)([(0,G.x4W)("popup"),(0,F.Sn)("design:type",G._mx)],W.prototype,"_popup",void 0),(0,F.Cg)([(0,G.x4W)("itemSpawn"),(0,F.Sn)("design:type",G._mx)],W.prototype,"_itemSpawn",void 0),(0,F.Cg)([(0,G.x4W)("solid"),(0,F.Sn)("design:type",G._mx)],W.prototype,"_solid",void 0),(0,F.Cg)([(0,G.x4W)("dashed"),(0,F.Sn)("design:type",G._mx)],W.prototype,"_dashed",void 0),W=(0,F.Cg)([(0,G.EVk)("DecorationHardPoint",H.Y.towerTown)],W)},43054:(k,B,U)=>{"use strict";U.d(B,{R:()=>W});var F=U(8674),G=U(62459),j=U(49237),$=U(28152),H=U(79979),V=U(21573);let W=class extends V.s{get assetID(){return this._assetID}get assetType(){return this._assetType}get assetVisual(){return this._assetVisual}get assetVisualMirror(){return this._assetVisualMirror}get interior(){return this._interiorRoot}get frame(){return this._frameRoot}get counterText(){return this._counterText.TextObject.text}set counterText(k){this._counterText.text=k}get counter(){const k=this._counterText.TextObject.text;return k?parseInt(k):0}set counter(k){this._counterText.text=k.toString()}get counterVisible(){return this._counterRoot.active}set counterVisible(k){this._counterRoot.active=k}create(){super.create(),this._button.onClick.add(this.onSelection,this)}setData(k,B,U,F){this._assetType=k,this._assetID=B,this.counter=U,this._counterRoot.active=F}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],W.prototype,"_frameRoot",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],W.prototype,"_interiorRoot",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],W.prototype,"_counterRoot",void 0),(0,F.Cg)([(0,G.MnK)(H.Y),(0,F.Sn)("design:type",H.Y)],W.prototype,"_assetVisual",void 0),(0,F.Cg)([(0,G.MnK)(H.Y),(0,F.Sn)("design:type",H.Y)],W.prototype,"_assetVisualMirror",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],W.prototype,"_counterText",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],W.prototype,"_button",void 0),W=(0,F.Cg)([(0,G.EVk)("LargeAssetListComponent",$.Y.towerTown)],W)},27292:(k,B,U)=>{"use strict";U.d(B,{B:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._rightButton=null,this._leftButton=null,this._cancelButton=null,this._saveButton=null,this._warningQuitButton=null,this._warningObject=null}get leftButton(){return this._leftButton}get rightButton(){return this._rightButton}get saveButton(){return this._saveButton}get cancelButton(){return this._cancelButton}get warningQuitButton(){return this._warningQuitButton}get warningObject(){return this._warningObject}get warningText(){return this._warningText}get arrowObject(){return this._arrowObject}};(0,F.Cg)([(0,G.x4W)("rightButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_rightButton",void 0),(0,F.Cg)([(0,G.x4W)("leftButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_leftButton",void 0),(0,F.Cg)([(0,G.x4W)("cancelButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_cancelButton",void 0),(0,F.Cg)([(0,G.x4W)("saveButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_saveButton",void 0),(0,F.Cg)([(0,G.x4W)("warningQuitButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_warningQuitButton",void 0),(0,F.Cg)([(0,G.x4W)("warningObject"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_warningObject",void 0),(0,F.Cg)([(0,G.x4W)("text"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_warningText",void 0),(0,F.Cg)([(0,G.x4W)("arrowObject"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_arrowObject",void 0),H=(0,F.Cg)([(0,G.EVk)("MoveFloorComponent",$.Y.towerTown)],H)},6145:(k,B,U)=>{"use strict";U.d(B,{Q:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._buildButton=null,this._body=null,this._title=null}get closeButton(){return this._buildButton}};(0,F.Cg)([(0,G.x4W)("buildButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_buildButton",void 0),(0,F.Cg)([(0,G.x4W)("body"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_body",void 0),(0,F.Cg)([(0,G.x4W)("title"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_title",void 0),H=(0,F.Cg)([(0,G.EVk)("NewTownPopupComponent",$.Y.towerTown)],H)},30857:(k,B,U)=>{"use strict";U.d(B,{G:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{get newTag(){return this._newTag}get quickRenovationButton(){return this._quickRenovationButton}get newTagText(){return this._newTagText}get bodyText(){return this._bodyText}setNewTagVisibility(k){this._newTag.active=k}};(0,F.Cg)([(0,G.x4W)("newTag"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_newTag",void 0),(0,F.Cg)([(0,G.x4W)("newTagText"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_newTagText",void 0),(0,F.Cg)([(0,G.x4W)("bodyText"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_bodyText",void 0),(0,F.Cg)([(0,G.x4W)("quickRenovationButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_quickRenovationButton",void 0),H=(0,F.Cg)([(0,G.EVk)("QuickRenovationComponent",$.Y.towerTown)],H)},77175:(k,B,U)=>{"use strict";U.d(B,{W:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._quitButton=null,this._attackButton=null,this._battleButton=null,this._topBanner=null}get topBanner(){return this._topBanner}get quitButton(){return this._quitButton}get attackButton(){return this._attackButton}get battleButton(){return this._battleButton}};(0,F.Cg)([(0,G.x4W)("quitButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_quitButton",void 0),(0,F.Cg)([(0,G.x4W)("attackButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_attackButton",void 0),(0,F.Cg)([(0,G.x4W)("battleButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_battleButton",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],H.prototype,"_topBanner",void 0),H=(0,F.Cg)([(0,G.EVk)("RooftopMasteryComponent",$.Y.towerTown)],H)},14151:(k,B,U)=>{"use strict";U.d(B,{q:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._quitButton=null,this._leftBarTransform=null,this._rightBarTransform=null,this._middleBarTransform=null,this._statusText=null,this._cleanButton=null,this._header=null,this._buttonBG=null}get quitButton(){return this._quitButton}get header(){return this._header}get buttonBG(){return this._buttonBG}get cleanButton(){return this._cleanButton}get leftBarTransform(){return this._leftBarTransform}get rightBarTransform(){return this._rightBarTransform}get middleBarTransform(){return this._middleBarTransform}set statusText(k){this._statusText.text=k}};(0,F.Cg)([(0,G.x4W)("QuitButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_quitButton",void 0),(0,F.Cg)([(0,G.x4W)("LeftBar"),(0,F.Sn)("design:type",G.K16)],H.prototype,"_leftBarTransform",void 0),(0,F.Cg)([(0,G.x4W)("RightBar"),(0,F.Sn)("design:type",G.K16)],H.prototype,"_rightBarTransform",void 0),(0,F.Cg)([(0,G.x4W)("MiddleBar"),(0,F.Sn)("design:type",G.K16)],H.prototype,"_middleBarTransform",void 0),(0,F.Cg)([(0,G.x4W)("StatusText"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_statusText",void 0),(0,F.Cg)([(0,G.x4W)("CleanButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_cleanButton",void 0),(0,F.Cg)([(0,G.x4W)("ShroudHeader"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_header",void 0),(0,F.Cg)([(0,G.x4W)("ButtonBG"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_buttonBG",void 0),H=(0,F.Cg)([(0,G.EVk)("ShroudLockComponent",$.Y.towerTown)],H)},69046:(k,B,U)=>{"use strict";U.d(B,{t:()=>V});var F=U(8674),G=U(62459),j=U(49237),$=U(28152),H=U(21573);let V=class extends H.s{constructor(){super(...arguments),this._counterRoot=null,this._assetRoot=null,this._counterText=null,this._button=null}get counterVisible(){return this._counterRoot.active}set counterVisible(k){this._counterRoot.active=k}get assetRoot(){return this._assetRoot}get counter(){const k=this._counterText.TextObject.text;return k?parseInt(k):0}set counter(k){this._counterText.text=k.toString()}get assetID(){return this._assetID}get assetType(){return this._assetType}create(){super.create(),this._button=this.GameObject.findComponent(j.$),this._button.onClick.add(this.onSelection,this)}setData(k,B,U,F){this._assetType=k,this._assetID=B,this.counter=U,this._counterRoot.active=F}};(0,F.Cg)([(0,G.x4W)("counterRoot"),(0,F.Sn)("design:type",G._mx)],V.prototype,"_counterRoot",void 0),(0,F.Cg)([(0,G.x4W)("assetRoot"),(0,F.Sn)("design:type",G._mx)],V.prototype,"_assetRoot",void 0),(0,F.Cg)([(0,G.x4W)("counterText"),(0,F.Sn)("design:type",G.EYj)],V.prototype,"_counterText",void 0),V=(0,F.Cg)([(0,G.EVk)("SmallAssetListComponent",$.Y.towerTown)],V)},41666:(k,B,U)=>{"use strict";U.d(B,{Z:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(64794);let H=class extends G.uAl{get root(){return this._root}get height(){return this._toolTip?this._toolTip.legacyTransform.group.height:0}get width(){return this._toolTip.legacyTransform.group.width}set width(k){this._toolTip.legacyTransform.anchorX=.5,this._toolTip.legacyTransform.group.x+=$.D.TOOLTIP_OFFSET_X,this._toolTip.legacyTransform.group.width=k}get text(){return this._text.text}set text(k){this._text.text=k}};(0,F.Cg)([(0,G.x4W)("root"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_root",void 0),(0,F.Cg)([(0,G.x4W)("toolTip"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_toolTip",void 0),(0,F.Cg)([(0,G.x4W)("text"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_text",void 0),H=(0,F.Cg)([(0,G.EVk)("ToolTipComponent",j.Y.ui)],H)},50860:(k,B,U)=>{"use strict";U.d(B,{v:()=>W});var F=U(8674),G=U(62459),j=U(49237),$=U(28152),H=U(25132),V=U(64794);let W=class extends G.uAl{constructor(){super(...arguments),this._buildButton=null,this._blocks=[]}get buildButton(){return this._buildButton}set buildButton(k){this._buildButton=k}get blocks(){return this._blocks}setBlockEnabled(k,B){k<0||k>=V.D.MAX_SMART_BLOCKS||(this._blocks[k].active=B)}setBlockGraphicVisible(k,B){this._blocks[k]&&(this._blocks[k].findComponent(H.$)._singleImage.alpha=B?1:0)}};(0,F.Cg)([(0,G.x4W)("buildButton"),(0,F.Sn)("design:type",j.$)],W.prototype,"_buildButton",void 0),(0,F.Cg)([(0,G.x4W)("blocks"),(0,F.Sn)("design:type",Array)],W.prototype,"_blocks",void 0),W=(0,F.Cg)([(0,G.EVk)("TowerTownInProgressFloor",$.Y.towerTown)],W)},20583:(k,B,U)=>{"use strict";U.d(B,{u:()=>V});var F=U(8674),G=U(62459),j=U(49237),$=U(28152),H=U(14991);let V=class extends G.uAl{constructor(){super(...arguments),this._chooseTownButton=null,this._floatlingFlingButton=null,this._storeButton=null,this._settingsButton=null,this._sliderButton=null,this._hudUI=null,this._chevrons=[]}get chooseTownButton(){return this._chooseTownButton}get floatlingFlingButton(){return this._floatlingFlingButton}get storeButton(){return this._storeButton}get settingsButton(){return this._settingsButton}get sliderButton(){return this._sliderButton}get hudUI(){return this._hudUI}setSlideIndicator(k){this._chevrons.forEach((B=>{B.GameObject.legacyTransform.group.scale.x=k===H.v.Hidden?-1:1}))}};(0,F.Cg)([(0,G.x4W)("chooseTownButton"),(0,F.Sn)("design:type",j.$)],V.prototype,"_chooseTownButton",void 0),(0,F.Cg)([(0,G.x4W)("floatlingFlingButton"),(0,F.Sn)("design:type",j.$)],V.prototype,"_floatlingFlingButton",void 0),(0,F.Cg)([(0,G.x4W)("storeButton"),(0,F.Sn)("design:type",j.$)],V.prototype,"_storeButton",void 0),(0,F.Cg)([(0,G.x4W)("settingsButton"),(0,F.Sn)("design:type",j.$)],V.prototype,"_settingsButton",void 0),(0,F.Cg)([(0,G.x4W)("sliderButton"),(0,F.Sn)("design:type",j.$)],V.prototype,"_sliderButton",void 0),(0,F.Cg)([(0,G.x4W)("hudUI"),(0,F.Sn)("design:type",G._mx)],V.prototype,"_hudUI",void 0),(0,F.Cg)([(0,G.x4W)("chevrons"),(0,F.Sn)("design:type",Array)],V.prototype,"_chevrons",void 0),V=(0,F.Cg)([(0,G.EVk)("TowerTownHUDComponent",$.Y.towerTown)],V)},30376:(k,B,U)=>{"use strict";U.d(B,{l:()=>q});var F=U(8674),G=U(62459),j=U(95891),$=U(49237),H=U(89400),V=U(28152),W=U(95946);let q=class extends H.B{constructor(){super(...arguments),this._elementalMap=new Map,this._button=null,this._headerText=null,this._currencyText=null,this._jars=[],this._colourSplash=[]}get headerText(){return this._headerText.TextObject.text}set headerText(k){this._headerText.text=k}get currencyText(){return this._currencyText.TextObject.text}set currencyText(k){this._currencyText.text=k}create(){super.create(),this._elementalMap.set(W.a.Fire,0),this._elementalMap.set(W.a.Ice,1),this._elementalMap.set(W.a.Plant,2),this._elementalMap.set(W.a.Storm,3),this._elementalMap.set(W.a.Water,4)}destroy(){super.destroy()}updateContentView(k){this._storeID=k.storeID;const B=!!G.Aq$.isDefined(k.hatStore)&&k.hatStore;if(this._jars.forEach((k=>k.active=!1)),this._colourSplash.forEach((k=>k.active=!1)),this._headerText.GameObject.active=!B,this._currencyText.GameObject.active=!B,this._cartIcon.active=!B,this._hatStoreText.active=B,this._hatIcon.active=B,this._hatStoreColourSplash.active=B,!B){const B=this._elementalMap.get(k.type);this.headerText=`${j.capitalize(k.type)} Shop`,this.currencyText=k.playerCurrency.toString(),this._jars[B].active=!0,this._colourSplash[B].active=!0}this._button.onClick.add((()=>{this.onClick.dispatch(this._storeID)}))}};(0,F.Cg)([(0,G.x4W)("button"),(0,F.Sn)("design:type",$.$)],q.prototype,"_button",void 0),(0,F.Cg)([(0,G.x4W)("header"),(0,F.Sn)("design:type",G.EYj)],q.prototype,"_headerText",void 0),(0,F.Cg)([(0,G.x4W)("currency"),(0,F.Sn)("design:type",G.EYj)],q.prototype,"_currencyText",void 0),(0,F.Cg)([(0,G.x4W)("jars"),(0,F.Sn)("design:type",Array)],q.prototype,"_jars",void 0),(0,F.Cg)([(0,G.x4W)("hatStoreText"),(0,F.Sn)("design:type",G._mx)],q.prototype,"_hatStoreText",void 0),(0,F.Cg)([(0,G.x4W)("hatStoreColourSplash"),(0,F.Sn)("design:type",G._mx)],q.prototype,"_hatStoreColourSplash",void 0),(0,F.Cg)([(0,G.x4W)("cartIcon"),(0,F.Sn)("design:type",G._mx)],q.prototype,"_cartIcon",void 0),(0,F.Cg)([(0,G.x4W)("hatIcon"),(0,F.Sn)("design:type",G._mx)],q.prototype,"_hatIcon",void 0),(0,F.Cg)([(0,G.x4W)("colourSplashes"),(0,F.Sn)("design:type",Array)],q.prototype,"_colourSplash",void 0),q=(0,F.Cg)([(0,G.EVk)("TowerTownShopComponent",V.Y.towerTown)],q)},36730:(k,B,U)=>{"use strict";U.d(B,{f:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._closeButton=null}get closeButton(){return this._closeButton}};(0,F.Cg)([(0,G.x4W)("closeButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_closeButton",void 0),H=(0,F.Cg)([(0,G.EVk)("TowerTownShoppingMallComponent",$.Y.towerTown)],H)},82443:(k,B,U)=>{"use strict";U.d(B,{O:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._blocksText=null,this._shroudsText=null,this._floorsText=null,this._closeButton=null}set blocksText(k){this._blocksText.text=k}set shroudsText(k){this._shroudsText.text=k}set floorsText(k){this._floorsText.text=k}get closeButton(){return this._closeButton}};(0,F.Cg)([(0,G.x4W)("blocksText"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_blocksText",void 0),(0,F.Cg)([(0,G.x4W)("shroudsText"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_shroudsText",void 0),(0,F.Cg)([(0,G.x4W)("floorsText"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_floorsText",void 0),(0,F.Cg)([(0,G.x4W)("closeButton"),(0,F.Sn)("design:type",j.$)],H.prototype,"_closeButton",void 0),H=(0,F.Cg)([(0,G.EVk)("TowerTownUpdateComponent",$.Y.towerTown)],H)},81670:(k,B,U)=>{"use strict";U.d(B,{s:()=>G});var F=U(64794);class G{static getFloatlingAssetID(k,B){const U=F.D.ELEMENT_STRINGS.indexOf(k);return-1===U?0:this.floatlingSpineIDs[U][B+1]}}G.floatlingSpineIDs={},G.FLOATLING_PREFIX="spine-npc-floatling-"},15678:(k,B,U)=>{"use strict";U.d(B,{g:()=>j});var F=U(95891),G=U(64794);class j{static determineJustLocked(k,B){return!this.isSkillLocked(k)&&this.isSkillLocked(B)}static determineJustUnlocked(k,B){return this.isSkillLocked(k)&&!this.isSkillLocked(B)}static determineJustMastered(k,B){return!this.isSkillMastered(k)&&this.isSkillMastered(B)}static shouldHaveShroud(k){return this.isSkillLocked(k)}static shouldHaveStubbornShadow(k,B){return!this.isSkillMastered(k)&&!this.isSkillLocked(k)&&this.isBlockCountIsAtMaximumAllowed(B)&&this.isSkillCorrectCountAtBlockCountMaximum(k)}static getBlockDiscrepancy(k,B){const U=k.totalCorrectCount-B.blockCount,F=G.D.MAX_SMART_BLOCKS-B.blockCount;return F=G.D.MAX_SMART_BLOCKS}static isSkillCorrectCountAtBlockCountMaximum(k){return k.totalCorrectCount>=G.D.MAX_SMART_BLOCKS}static getCurrentSkillByGrade(k,B){return(0,F.first)(this.getSkillsByGrade(k,B).filter((k=>!this.isSkillMastered(k)&&!this.isSkillLocked(k))))}static getSkillsByGrade(k,B){return k.filter((k=>k.grade===B))}static getSkillsMasteredByGrade(k,B){return(0,F.orderBy)(k.filter((k=>this.isSkillMastered(k))),["dateMastered"]).filter((k=>k.grade===B))}static getPendingSkillsByGrade(k,B){return k.filter((k=>!this.isSkillMastered(k)&&k.grade===B))}static getSkillById(k,B){return(0,F.find)(k,["ID",B])}static answersToUnlock(k){return k?k.lock:0}static isAvailable(k){return k.isAvailable}static isSkillMastered(k){return k.hasBeenMastered}static isSkillLocked(k){return k.lock>0}static hasMaximumTheta(k){return k.theta===G.D.THETA_MAXIMUM}static hasMinimumTheta(k){return k.theta===G.D.THETA_MINIMUM}static isSkillIdMobileFriendly(k,B){return!(0,F.includes)(B,k)}}},82271:(k,B,U)=>{"use strict";U.d(B,{S:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(76546);let H=class extends $.D{getMemberJarData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.MemberJar.GetMemberJarData,{},!1)}))}updateMemberJarRewards(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B={rewardsToAppend:k.filter((k=>!k.isSecure))};return this.makeCloudscriptRequest(j.D.MemberJar.UpdateMemberJarRewards,B,!1)}))}resetMemberJarData(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B={sevenlevelsExperimentRedeemed:k};return this.makeCloudscriptRequest(j.D.MemberJar.ResetMemberJarData,B,!1)}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},78365:(k,B,U)=>{"use strict";U.d(B,{Q:()=>j});var F=U(24521),G=U(23029);class j{static getMemberJarDropData(){return G.R.loadData(F.r.MemberJarData_json)}}},47917:(k,B,U)=>{"use strict";U.d(B,{P:()=>Y});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(29834),V=U(97518),W=U(64353),q=U(95057),K=U(47255),z=U(34616);let Y=class extends G.uAl{constructor(){super(...arguments),this._hideWhenEmpty=!1,this._syncRibbonVisibilityWithJar=!0,this._thresholds=[],this.onUpdateViewItemCount=new G.HN0,this.onReadyToOpenJar=new G.HN0,this.onJarAppearFinished=new G.HN0,this.onJarUseFinished=new G.HN0,this.onJarRewardsSequenceFinished=new G.HN0,this._stopOngoingAnimation=new G.HN0}create(){super.create(),this._thresholds.sort(((k,B)=>B.atLeastFraction-k.atLeastFraction)),this._jarVisual&&this._hideWhenEmpty&&(this._jarVisual.GameObject.active=!1),this._ribbonVisual&&this._hideWhenEmpty&&this._syncRibbonVisibilityWithJar&&(this._ribbonVisual.active=!1),this._jarIsFullGameObject&&(this._jarIsFullGameObject.active=!1),this._rewardCountText&&(this._rewardCountText.GameObject.active=!1),this._goldCountText&&(this._goldCountText.GameObject.active=!1),this._currencyCountText&&(this._currencyCountText.GameObject.active=!1),this._moreItemsCountText&&(this._moreItemsCountText.GameObject.active=!1),this._starCountText&&(this._starCountText.GameObject.active=!1)}showEntityUpdate(k){this.updateView(k,!0)}showEntity(k){this.updateView(k,!1)}showEntityRedeem(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._jarVisual)return;this._jarVisual.GameObject.active=!0;const B=this.findThreshold(k);B.useAnimation&&(this._jarVisual.playAnimation(B.useAnimation,!1,!0),yield this.completeVisualAnimation());const U=this.findThreshold({savedBattleCount:0,savedRewards:[]});this._jarVisual.playAnimation(U.idleAnimation,!0)}))}updateView(k,B){var U;const F=this.countTotalRewardsInEntity(k),G=this.countCurrentStoredStars(),j=F.total+G,$=!this._hideWhenEmpty||j>0;this.onUpdateViewItemCount.dispatch(j),(null===(U=this._jarVisual)||void 0===U?void 0:U.GameObject)&&(this._jarVisual.GameObject.active=$),this._ribbonVisual&&this._syncRibbonVisibilityWithJar&&(this._ribbonVisual.active=$),this._rewardCountText&&(this._rewardCountText.setTextArguments(j),this._rewardCountText.GameObject.active=j>0),this._goldCountText&&(this._goldCountText.setTextArguments(F.gold),this._goldCountText.GameObject.active=!0),this._currencyCountText&&(this._currencyCountText.setTextArguments(F.currency),this._currencyCountText.GameObject.active=!0),this._moreItemsCountText&&(this._moreItemsCountText.setTextArguments(F.moreItems,1===F.moreItems?"":"s"),this._moreItemsCountText.GameObject.active=!0),this._starCountText&&(this._starCountText.setTextArguments(G,1===G?"":"s"),this._starCountText.GameObject.active=!0),this._jarIsFullGameObject.active=this.isJarFull(k),this.gameObject.active?this.animateJar(k,B):this.openJarIfReady(k)}isJarFull(k){return k.savedBattleCount>=z.N.maximumSavedBattleCount}animateJar(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=this.findThreshold(k);if(B){if(this._jarVisual.playAnimation(U.appearAnimation,!1,!0),!(yield this.completeVisualAnimation()))return;this.onJarAppearFinished.dispatch()}this.openJarIfReady(k),B&&G.Aq$.isDefined(U.nextAnimation)?this._jarVisual.playAnimation(U.nextAnimation,!0):this._jarVisual.playAnimation(U.idleAnimation,!0)}))}completeVisualAnimation(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._stopOngoingAnimation.dispatch(),Promise.race([this._jarVisual.OnAnimationComplete.asPromise().then((()=>!0),(()=>!1)),this._stopOngoingAnimation.asPromise().then((()=>!1),(()=>!1))])}))}findThreshold(k){var B;const U=0===k.savedBattleCount?Math.min(k.savedRewards.length,1):k.savedBattleCount;return null!==(B=this._thresholds.find((k=>U>=k.atLeastFraction*z.N.maximumSavedBattleCount)))&&void 0!==B?B:this._thresholds[0]}countTotalRewardsInEntity(k){let B=0,U=0,F=0;for(const{itemType:G,quantity:j}of k.savedRewards)switch(G){case"gold":B+=j;break;case"currency":U+=j;break;default:F+=j}return{gold:B,currency:U,moreItems:F,total:B+U+F}}countCurrentStoredStars(){var k;return null!==(k=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.storedMemberStars)&&void 0!==k?k:0}isReadyToOpenJar(k){const B=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return(this.countTotalRewardsInEntity(k).total>0||this.countCurrentStoredStars()>0)&&B.hasMembership()}openJarIfReady(k){this.isReadyToOpenJar(k)&&this.onReadyToOpenJar.dispatch(k)}completeRewardsSequence(){this.onJarRewardsSequenceFinished.dispatch()}destroy(){this._stopOngoingAnimation.dispose(),this.onUpdateViewItemCount.dispose(),this.onReadyToOpenJar.dispose(),this.onJarAppearFinished.dispose(),this.onJarUseFinished.dispose(),this.onJarRewardsSequenceFinished.dispose(),super.destroy()}sendPurchaseFunnelStart(k="Member-Jar",B="Member-Jar"){const U=j.q.instance.prodigy.gameContainer.get("c47-20b6"),F=W.P.shouldUseUnifiedConversionFlow(K.o.FunnelMemberJar)?q.R.UnifiedConversionFlow:q.R.Static;U.purchase.sendFunnelStart({adType:F,category:k,contentId:void 0,type:B,adVersion:W.P.getAdVersion(K.o.FunnelMemberJar)})}};(0,F.Cg)([(0,G.MnK)(H.j),(0,F.Sn)("design:type",H.j)],Y.prototype,"_jarVisual",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Y.prototype,"_ribbonVisual",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Y.prototype,"_jarIsFullGameObject",void 0),(0,F.Cg)([(0,G.MnK)(V.R),(0,F.Sn)("design:type",V.R)],Y.prototype,"_rewardCountText",void 0),(0,F.Cg)([(0,G.MnK)(V.R),(0,F.Sn)("design:type",V.R)],Y.prototype,"_starCountText",void 0),(0,F.Cg)([(0,G.MnK)(V.R),(0,F.Sn)("design:type",V.R)],Y.prototype,"_goldCountText",void 0),(0,F.Cg)([(0,G.MnK)(V.R),(0,F.Sn)("design:type",V.R)],Y.prototype,"_currencyCountText",void 0),(0,F.Cg)([(0,G.MnK)(V.R),(0,F.Sn)("design:type",V.R)],Y.prototype,"_moreItemsCountText",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_hideWhenEmpty",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_syncRibbonVisibilityWithJar",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Array)],Y.prototype,"_thresholds",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onUpdateViewItemCount",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onReadyToOpenJar",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onJarAppearFinished",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onJarUseFinished",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onJarRewardsSequenceFinished",void 0),Y=(0,F.Cg)([(0,G.EVk)("MemberJarController",$.Y.membership)],Y)},24473:(k,B,U)=>{"use strict";U.d(B,{S:()=>Y});var F=U(8674),G=U(46791),j=U(5491),$=U(63011),H=U(15821),V=U(35120),W=U(76277),q=U(48235),K=U(55122),z=U(78365);class Y{static updateRewardedState(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield q.W.getCollectedRewardsData();this.isRewarded=H.A.isDefined(null==k?void 0:k.rewarded[$.D.MEMBER_LEVEL_BOOST])}))}static isFeatureEnabled(){return(0,W.G)(G.a).enabled}static isEligibleForFeature(){const k=this.isFeatureEnabled(),B=this.playerNearLevelCap();return k&&!this.isRewarded&&!B}static calculateFeatureEligibility(){const k=V.q.instance.prodigy.gameContainer.get("306-5359");k.hasMembership()||k.addExperimentToEligiblilityList(G.a.key)}static canReceiveReward(){const k=this.isEligibleForFeature(),B=V.q.instance.prodigy.gameContainer.get("306-5359");return k&&B.hasMembership()}static playerNearLevelCap(){var k,B;const U=V.q.instance.prodigy.gameContainer.get("306-5359");return U.getLevel()+(null!==(B=null===(k=z.Q.getMemberJarDropData().memberLevelBoost)||void 0===k?void 0:k.levels)&&void 0!==B?B:0)>U.currentMaxLevel}static redeemReward(){var k;const B=V.q.instance.prodigy.gameContainer.get("306-5359"),U=z.Q.getMemberJarDropData().memberLevelBoost.levels,F=B.getLevel(),G=F+U,$=null!==(k=B.data.stars)&&void 0!==k?k:K.s.xpRequiredForLevel(F,j.V.Player),H=K.s.xpRequiredForLevel(G,j.V.Player)-$;B.addStars(H),this.isRewarded=!0,B.forceSaveCharacter();V.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendPlayerProgressionAdvancedEvent({progressionType:"Player Level",creatureName:"Player",progressionNewValue:G.toString(),progressionPreviousValue:F.toString(),progressionSubType:"membership-bonus"},{pointType:"stars",pointCount:H})}}},63731:(k,B,U)=>{"use strict";U.d(B,{Z:()=>V});var F=U(8674),G=U(79687),j=U(95891),$=U.n(j),H=U(93288);let V=class{constructor(){this._objectiveSources=[]}registerSource(k){this._objectiveSources.push(k)}getObjectives(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield Promise.all(this._objectiveSources.filter((B=>0===B.objectiveTypes.length||B.objectiveTypes.some((B=>{var U,F;return null===(F=null===(U=null==k?void 0:k.types)||void 0===U?void 0:U.includes(B))||void 0===F||F})))).map((B=>(0,F.sH)(this,void 0,void 0,(function*(){var U;return(yield B.getObjectives()).filter(((B,U,F)=>{var G,j,$,H;return!(null!==(j=null===(G=null==k?void 0:k.types)||void 0===G?void 0:G.includes(B.type))&&void 0!==j&&!j)&&(null===(H=null===($=null==k?void 0:k.filter)||void 0===$?void 0:$.call(k,B,U,F))||void 0===H||H)})).sort(null!==(U=null==k?void 0:k.sort)&&void 0!==U?U:()=>0)})))));return $().flatten(B)}))}};(0,F.Cg)([(0,G.multiInject)(H._),(0,F.Sn)("design:type",Array)],V.prototype,"_objectiveSources",void 0),V=(0,F.Cg)([(0,G.injectable)()],V)},93288:(k,B,U)=>{"use strict";U.d(B,{_:()=>F});const F=Symbol.for("OBJECTIVE_SOURCE")},65068:(k,B,U)=>{"use strict";var F;U.d(B,{q:()=>F}),function(k){k.RestrictedEncounter="restricted-encounter",k.RestrictedEncounterBlocking="restricted-encounter-blocking",k.QuestTask="quest-task",k.HardModeRequirement="hard-mode-requirement",k.QuestState="quest-state"}(F||(F={}))},49126:(k,B,U)=>{"use strict";U.d(B,{x:()=>Q});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U.n($),V=U(99625),W=U(35120),q=U(67665),K=U(88061),z=U(43754),Y=U(65240);let Q=class{constructor(){this._uncollectedTransactions=[]}get hasUncollectedTransactions(){return this._uncollectedTransactions.length>0}queueUncollectedTransactions(...k){for(const B of k)this._uncollectedTransactions.some((k=>k.transactionID===B.transactionID))||this._uncollectedTransactions.push(B)}acknowledgeUncollectedTransactions(){return(0,F.sH)(this,void 0,void 0,(function*(){if(0!==this._uncollectedTransactions.length)try{let k=0;for(const{quantity:G}of this._uncollectedTransactions)k+=G;const B=this._hardCurrency.getBalance(27),U=yield new Promise((U=>{let F;F=W.q.instance.prodigy.open.prefabMenu(V.l.OTPCelebrationModal,void 0,void 0,void 0,void 0,{OTP_CELEBRATION_GAINS_TEXT:`+${k}`,OTP_CELEBRATION_INITIAL_VALUE:B,OTP_CELEBRATION_FINAL_VALUE:B+k,OTP_CELEBRATION_CLOSE_CALLBACK:()=>U(F)})})),F=W.q.instance.prodigy.open.showFullScreenSpinner();try{const k=this._segment.item.beginSecureItemTransaction(),B=yield this._otpNetwork.collectPurchasedItems(this._uncollectedTransactions);k.flush({transaction_id:B[0],source_type:Y.C.Otp,source_id:B[0]}),H().pullAllWith(this._uncollectedTransactions,B,((k,B)=>k.transactionID===B))}finally{F.destroy(),U.close()}if(this._uncollectedTransactions.length>0){const k=this._uncollectedTransactions.map((k=>k.transactionID)).join("\n");yield new Promise((B=>W.q.instance.prodigy.open.message(this._localizer.getText("ONE_TIME_PURCHASE_ACKNOWLEDGE_FAILED",k),B)))}this._segment.purchase.sendFunnelComplete()}catch(e){const B=e instanceof Error?e.message:"unknown error";G.VyI.log(`Error acknowledging transaction: ${B}`,G.$bb.Error)}}))}updatePurchaseHistory(k){this._otpNetwork.updatePurchaseHistory(k.quantity).catch(G.RQr.createHandler("Error updating spend amounts."))}};(0,F.Cg)([(0,j.inject)("295-41dc"),(0,F.Sn)("design:type",K.o)],Q.prototype,"_otpNetwork",void 0),(0,F.Cg)([(0,j.inject)("c47-20b6"),(0,F.Sn)("design:type",q.Y)],Q.prototype,"_segment",void 0),(0,F.Cg)([(0,j.inject)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],Q.prototype,"_localizer",void 0),(0,F.Cg)([(0,j.inject)("5c7-e02d"),(0,F.Sn)("design:type",z.W)],Q.prototype,"_hardCurrency",void 0),Q=(0,F.Cg)([(0,j.injectable)()],Q)},89517:(k,B,U)=>{"use strict";U.d(B,{Y:()=>Q,F:()=>Z});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U.n($),V=U(65240),W=U(35120),q=U(1195),K=U(34992),z=U(73797),Y=U(80403);const Q=Symbol("ParentGoalDataProvider"),X=["parentReward","parentRewardMember"];let Z=class{constructor(k,B,U){this.goal=null,this.onChange=new G.HN0,this._lastChangedAt=null,this._localCorrectAnswerCount=0,this._isInitialized=!1,this._graphQl=k,this._playerDataProvider=B,this._externalMethods=U,W.q.instance.prodigy.game.broadcaster.addAppListener(z.zr.UpdateMailCounters,this.onMailChanged.bind(this),this,z.HG.MailerButton,!0),W.q.instance.prodigy.game.broadcaster.addAppListener(z.zr.UpdateMailCounters,this.onMailChanged.bind(this),this,z.HG.Mailer,!0)}claimAllRewards(){const k=this.goal;if(!k)return void G.VyI.log("Attempted to claim nonexistent goal, ignoring.",G.$bb.Warning);if(!k.isComplete)return void G.VyI.log("Attempted to claim incomplete goal, ignoring.",G.$bb.Warning,k);this.setGoal(null);const B={source_type:V.C.ParentGoals,source_id:"parent"},U=this.getPlayerGoalData();if(null==U?void 0:U.lastUnclaimedGoal){for(const k of this.findMailRewardsExcept(U.lastUnclaimedGoal.previousRewardMailIds)){if(k.isOpened)continue;const U=null==k?void 0:k.gameMethod;this._externalMethods.runFunction(null==U?void 0:U.name,null==U?void 0:U.params,k.attachments,k,[B]),W.q.instance.prodigy.mailNetworkHandler.deleteMail(k)}U.lastUnclaimedGoal=null}else k.rewards.length>0&&W.q.instance.prodigy.open.gotItem(k.rewards,void 0,!0,void 0,void 0,!1,B)}refresh(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.isStale())try{yield this.refreshAsync()}catch(k){G.VyI.log("ParentGoalDataProvider Refresh failed:",G.$bb.Error,k)}}))}setGoal(k){var B;H().isEqual(k,this.goal)||this._isInitialized&&(null==k?void 0:k.id)&&(null==k?void 0:k.id)!==(null===(B=this.goal)||void 0===B?void 0:B.id)||(k&&this.goal&&!k.isComplete||(this._localCorrectAnswerCount=0),this.goal=k,this._lastChangedAt=new Date,this._isInitialized=!0,this.onChange.dispatch(k))}markStale(){this._lastChangedAt=null}destroy(){this._educationQuestionAnswered.destroy(),this.onChange.dispose(),W.q.instance.prodigy.game.broadcaster.removeAppListener(z.zr.UpdateMailCounters,this,z.HG.MailerButton),W.q.instance.prodigy.game.broadcaster.removeAppListener(z.zr.UpdateMailCounters,this,z.HG.Mailer)}refreshAsync(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this.getPlayerGoalData();if(this.restoreGoalFromPlayerData())return;const B=yield function(k){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield k.sendRequest("\n query getActiveGoal {\n viewer {\n activeGoal {\n id\n goalTarget\n questionsAnswered\n studentCompletedAt\n giftSentAt\n reward {\n id\n type\n }\n }\n }\n }\n ")).data.viewer.activeGoal}))}(this._graphQl);if(!B)return void this.setGoal(null);const U=[];B.reward&&U.push({ID:B.reward.id,type:B.reward.type,N:1}),this._localCorrectAnswerCount=Math.max(B.questionsAnswered,this._localCorrectAnswerCount),this.setGoal({id:B.id,rewards:U,progress:this._localCorrectAnswerCount,target:B.goalTarget,isComplete:!1}),B.studentCompletedAt&&(k.lastUnclaimedGoal={goal:this.goal,previousRewardMailIds:this.findMailRewardsExcept([]).map((k=>k.id))})}))}findMailRewardsExcept(k=[]){return W.q.instance.prodigy.mailNetworkHandler.mailList.filter((B=>X.includes(B.name)&&!k.includes(B.id)))}isStale(){const k=W.q.instance.prodigy.education;if(!this._educationQuestionAnswered&&k&&(this._educationQuestionAnswered=k.onQuestionAnswered.add(this.onQuestionAnswered.bind(this))),!this._lastChangedAt)return!0;const B=this._lastChangedAt.valueOf()+3e5;return Date.now()>B}onMailChanged(){this.restoreGoalFromPlayerData()}onQuestionAnswered(k){this.markStale(),k&&this.goal&&this._localCorrectAnswerCount++}getPlayerGoalData(){var k;const B=this._playerDataProvider.player.data;return null!==(k=B.parentGoal)&&void 0!==k||(B.parentGoal={}),B.parentGoal}restoreGoalFromPlayerData(){const k=this.getPlayerGoalData();if(!k.lastUnclaimedGoal)return!1;const{previousRewardMailIds:B,goal:U}=k.lastUnclaimedGoal,F=this.findMailRewardsExcept(B);return 0===F.length?(this.setGoal(Object.assign(Object.assign({},U),{isComplete:!1})),!0):F.every((k=>k.isOpened))?(this.getPlayerGoalData().lastUnclaimedGoal=null,this.markStale(),this.setGoal(null),!0):(this.setGoal(Object.assign(Object.assign({},U),{isComplete:!0})),!0)}};Z=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("8bb-7057")),(0,F.Qj)(1,(0,j.inject)("e20-0fb0")),(0,F.Qj)(2,(0,j.inject)("eb9-3fdf")),(0,F.Sn)("design:paramtypes",[Y.K,q.E,K.g])],Z)},10674:(k,B,U)=>{"use strict";U.d(B,{q:()=>Y});var F=U(8674),G=U(62459),j=U(79687),$=U(35120),H=U(77938),V=U(73797),W=U(90633),q=U(13956),K=U(60126),z=U(72772);let Y=class{get allPetGear(){return(()=>(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.fetchPetGear()).items})))()}get allEquippedPetGear(){return(()=>(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.allPetGear).filter((k=>z.I.getPetWithEquippedGearByUniqueId(k.uuid)))})))()}get petRelics(){return(()=>(0,F.sH)(this,void 0,void 0,(function*(){return this.getPetGearByType("petRelic")})))()}get petHats(){return(()=>(0,F.sH)(this,void 0,void 0,(function*(){return this.getPetGearByType("petHat")})))()}constructor(){this._fetchIsInFlight=!1,this._equippedGear=[],$.q.instance.game.broadcaster.addAppListener(V.bI.PetGearAdClicked,this.getPetGearAdGifts,this,void 0,!0)}getPetGearByType(k){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.fetchPetGear()).items.filter((B=>{var U;return(null===(U=B.data.asset)||void 0===U?void 0:U.type)===k}))}))}getPetGearByUniqueId(k){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.fetchPetGear()).items.find((B=>B.uuid===k))}))}refreshPetGear(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;if(this._petGearFetchPromise&&this._fetchIsInFlight)return this._petGearFetchPromise;{const B=null===(k=yield this._petGearFetchPromise)||void 0===k?void 0:k.items;return this._petGearFetchPromise=null,this.fetchPetGear().then((k=>(this.checkForPlayerReceivedFirstPetGear(B,null==k?void 0:k.items),k)))}}))}fetchPetGear(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this._petGearFetchPromise)return this._petGearFetchPromise;this._fetchIsInFlight=!0;try{return yield this._petGearFetchPromise=this._networkHandler.getOwnedPetGear().finally((()=>this._fetchIsInFlight=!1))}catch(k){return G.RQr.logError(k,"Failed to fetch pet gear"),this._petGearFetchPromise=null,{items:[]}}}))}checkForPlayerReceivedFirstPetGear(k=[],B=[]){0===k.length&&B.length>0&&$.q.instance.game.broadcaster.broadcast(V.bI.ReceivedPetGear)}getSortedPetGearByType(k){return(0,F.sH)(this,void 0,void 0,(function*(){this._equippedGear=yield this.allEquippedPetGear;const B=yield this.getPetGearByType(k);if(B.sort(this.byId.bind(this)).sort(this.byRarity.bind(this)).sort(this.byNew.bind(this)).sort(this.byEquipped.bind(this)),z.I.shouldShowPetGearTutorialCached&&!$.q.instance.prodigy.gameContainer.get("e20-0fb0").isMember()){const k=B.map((k=>H.t.getItem(k.data.asset.type,k.data.asset.id))).findIndex((k=>{var B;return 1!==(null===(B=null==k?void 0:k.data)||void 0===B?void 0:B.member)}));if(-1!==k){const U=B.splice(k,1)[0];B.unshift(U)}}return B}))}byId(k,B){return Number(k.itemID.split("-").slice(-1))-Number(B.itemID.split("-").slice(-1))}byRarity(k,B){return H.t.getItem(B.data.asset.type,B.data.asset.id).data.rarity-H.t.getItem(k.data.asset.type,k.data.asset.id).data.rarity}byNew(k,B){var U,F,j,$;return G.Aq$.isDefined(null===(U=k.data)||void 0===U?void 0:U.seenAt)||G.Aq$.isDefined(null===(F=B.data)||void 0===F?void 0:F.seenAt)?G.Aq$.isDefined(null===(j=k.data)||void 0===j?void 0:j.seenAt)?G.Aq$.isDefined(null===($=B.data)||void 0===$?void 0:$.seenAt)?0:1:-1:0}byEquipped(k,B){return this._equippedGear.includes(k)&&this._equippedGear.includes(B)?0:this._equippedGear.includes(k)?-1:this._equippedGear.includes(B)?1:0}markGearAsSeen(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(0===k.length)return null;const B=yield this._networkHandler.markGearAsSeen(k);return(yield this.allPetGear).forEach((k=>{var U;const F=B.items.find((B=>B.uuid===k.uuid));(null===(U=null==F?void 0:F.data)||void 0===U?void 0:U.seenAt)&&(k.data.seenAt=F.data.seenAt)})),B.items}))}getPetGearAdGifts(){return(0,F.sH)(this,void 0,void 0,(function*(){if($.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(W.B.FEATURE_PET_GEAR,W.B.BREADCRUMB_RECEIVE_PET_GEAR_AD_GIFT))return G.VyI.log("Cannot received pet gear ad gift. Gift has already been received.",G.$bb.Warning),[];let k;try{k=yield this._networkHandler.getPetGearAdGifts()}catch(B){return G.RQr.logError(B,"Failed to get pet gear ad gifts from WW ad"),[]}if($.q.instance.game.broadcaster.removeAppListener(V.bI.PetGearAdClicked,this,void 0),$.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(W.B.FEATURE_PET_GEAR,W.B.BREADCRUMB_RECEIVE_PET_GEAR_AD_GIFT),k.items.length>0){const B=[...yield this.allPetGear];$.q.instance.prodigy.open.gotItem(k.items.map((k=>H.t.getItem(k.data.asset.type,k.data.asset.id))),(()=>this.checkForPlayerReceivedFirstPetGear(B,k.items)),!0,null,null,!0),(yield this.allPetGear).push(...k.items)}else G.VyI.log("Cannot received pet gear ad gift. Gift response returned no items.",G.$bb.Warning);return k.items}))}};(0,F.Cg)([(0,q.b)("1e8-b306"),(0,F.Sn)("design:type",K.L)],Y.prototype,"_networkHandler",void 0),Y=(0,F.Cg)([(0,j.injectable)(),(0,F.Sn)("design:paramtypes",[])],Y)},41935:(k,B,U)=>{"use strict";U.d(B,{o:()=>z});var F=U(8674),G=U(62459),j=U(28152),$=U(28402),H=U(20597);class V{}V.petGearHatMap=[null,"c18d1717-37ff-4c83-aa15-a219bef52c26","67678c5a-2a3f-40f6-ace3-57bd791c0050","60b22020-28c9-47b8-a316-e945d3bbf431","d4683af0-3b7c-4bd4-b840-915a0b9ece4c","01f39c50-17ee-4b9c-8414-223bab88bf4a","dc0ca518-c75d-4d8f-864c-97bb5b27744d","34e2cd40-f396-4e07-b13c-a4f34e8afca1","fc395621-9bc5-4130-a5ab-901bfeecdbf1","0b572c65-3e16-44ee-93aa-4ab77fe51c1d","a80205c4-c2fc-4dbc-aefa-3dba91c9b48d","28849986-cc38-4196-bcea-894c0e3f4431","d6f4ca6c-57aa-4c01-8f9a-a29c43f1969b","e5db148d-9924-4f22-b544-ea22d2de0bea","11d6eb66-fbe3-4c79-a7d6-fa78299776d6","ad0d0fad-9082-4464-aa20-e0e4f28c635a","74a62e4c-bf9b-46cf-8f7c-c80feb2aa266","57f0121e-1305-4252-9f9d-051d2174729e","d6d5410f-7228-41f5-921f-0d1dc5286aa7","e5f54cca-f111-4a78-b491-8e32f198f3b7","83876be2-9bfe-4f18-bba2-7b1648621cbb","f5c6df09-3563-48c1-bc99-478a9c857d05","855aafa0-a50d-424a-b357-28d7f1f1b837","3f5e1303-56da-4fd0-9b2d-97f1c3b4bdc4","7febfab4-2799-4055-bc4b-f3e53b47d0d3","de7cfa29-2d45-4bcf-ba76-f520d268ee81","a88b291e-016f-4d81-a7aa-299dfd6a52b6","0ca819f0-9d61-4f50-83c3-bc59b466b718","27463a4a-27f7-4d22-822b-ba51342384ce","f9b09b2f-1ea4-4ad2-8352-babb6bd8a1cf","a8f487bf-38c1-4385-98d4-367f0fab3c1a","df1a1025-6b95-47dc-83ca-9b048a898c70","31b394b7-cc54-46b9-b239-b0db25592041","8cd26676-9113-4a8f-ab53-6309ab337359","dc1c4e5d-e9ff-4a7c-9fa6-8c16d34fd783","60c236fc-20f4-41f7-87ac-b5c1fd64d6b3","fdb5d8f4-f435-409e-a4d0-53a872038706","c4cef804-cd06-492d-9f4f-15993eadd7a1","78e9db0f-9622-4403-bae9-3c5a79e026c4","af57df98-b771-431d-9350-78ac38678375","0afb318d-d004-49b5-8be1-269f9cbc3240","a213bfaa-7010-4748-aeb4-c6aade659397","33155a7e-7202-4068-be8e-7f69a3b998dd","5dec792b-06d6-4576-8d6c-6099a383a8a7","fc505f6d-04c5-4bca-b18b-7380d64e367a","e7897421-1d27-49c3-b058-2f5fda1891c9","999ec657-8bc0-4dde-8422-0b5c134f7bbe","a193a9fe-a6a9-44d4-af6c-9e4bb614b635","af31ea7c-52a2-4c52-a6d1-eade789b41b8","bee1ca65-8cf9-4ba5-8bcb-1e4c77c2cd75","7a88fa27-7770-4b3a-96a1-d40611b374b6","feea9557-c418-468d-a569-e3fbd93dcfa9","efa3e8a5-cad5-4b36-b77b-8527a20e196a","c09d9af3-246c-4dce-84e6-9bdb98360d80","6cdd225f-6988-4887-8874-9309b0f7dd6b","7e6b9e0c-97dd-4736-afd5-fa452ba1fde1","de9d8419-e0a8-4d51-8063-055cd04c52bb","3029f156-7c20-4b12-b91a-eb48485275c2","4c2a3e1c-7275-4dd9-b32d-e74fa7540e81","173155db-924e-4eb5-ba7e-8dd6384406e9","272911eb-aac9-4b4c-b138-877f6811a070","046238ac-70ed-4c85-87c1-438533ed8f0e","ecd671d2-5813-445c-bd17-d2991a072756","7eae0ef1-09a9-4b8a-883e-68d2487089da","2120297d-d3a7-4f53-bd7a-08ebbd7a4a4c","413eea9a-b379-40db-94fc-da6ae1cc6f3b","8c5f1923-45c5-4747-8c96-9024a1410993","4bb9ec14-17d5-4a80-a6dd-3c2dbac71a1c","1abec9d7-410d-4621-844f-8d66e764bf42","3593e514-1410-4ab0-9eaa-db16483acc62","0dbd3a3b-cd61-4427-addc-13eb128318f9","0804fa95-9402-46dd-bbdd-767738c9ab19","8f7e640e-9207-40e4-b54c-70da3a935269","c2dd3f50-349e-4444-8d65-d9e435a937c2","88eab339-1e39-4adf-af76-007754c60e03","79d899cf-3607-4ee1-ac5b-8c31a181f009","9c9a3a17-18eb-4d3b-a975-ba2f645fc5b1","370402eb-ebae-4cc3-bba2-db852d4f1354","c7f67d62-71c0-432c-8b00-619cd2a96f14","48c91acc-55e8-4042-8bad-e6ed6865db0d","c57d5879-665b-45d0-8136-882030bd9bba","094f0584-03db-48ee-ada6-c0f9981e229b","53f27a7d-e90e-47e2-8ac5-a5645d99c7a8","13471571-21c2-4269-8581-eb6afdc73c8b","cdf895c9-0fbf-4240-8cd9-26d7d02396cb","ad755ea7-b4d2-483c-8036-ff58bf8dc7b2","2c966c38-70c8-4f2a-b997-a62bc58ad2ac","b1fae9a9-43ee-40e2-aafb-f488a8f4a2e8","14923276-d3b9-4c2e-b171-994359e0516f","251609c3-973f-4608-8922-a7b52380a4b1","1a218c90-d2bf-47f1-b908-fa1a91308335","5c469219-eaf1-420f-87f3-5c38eb12ab80","c94915bb-f301-4e04-9a0d-b894347d7c3e","1727c866-bd17-4415-b72e-b3b9e80e7d31","c7f9fc22-b640-437a-b589-242f72c85210","230da12b-5f02-46cf-b465-1a6838d7de6e","8aba827d-6966-47fe-a78e-7f8e53000ff6","a923762a-8f94-423f-af3a-632124095aad","809546ff-d30a-4b7f-9191-0b8464f58466","a14164c9-4b4a-4e65-a133-f9d3562645a3","45f2a05c-26ff-48a1-9165-e9d9534da385","2e042b99-849c-4604-bd76-23caee75de7a","a66002a0-ea33-4403-810c-77dde379d567","4c4202e8-e309-48f7-8eae-4ef2f50d91b0","3162e771-dc1d-4fe8-b309-ad04b891530f","cf0ec8b5-87dd-4b9b-bcab-b7602c08facf","03979f2e-170c-4b8f-9f3e-79bf03e9f380","3d689bc4-1375-424d-8a0d-4544f86e1a43","8ea606cb-4163-4021-a6d9-6b0f857733a4","950a5a67-bade-4e9b-b8b5-4fb7fb4bd77c","9f21dace-aa8c-4b3f-bfdd-a5deedd45621","e5ac591f-280e-4ea2-a2ee-91aa30416995","58ef7d8e-8747-492d-90e8-fbd5fc0f27bf","e1bfd055-4057-4345-bbb7-e113d2eeaeb5","2a0b4469-9154-4100-a17b-a9e7c653e181","2aabc034-feca-4c84-8bed-40f59159d1fa","095f2e67-261b-436f-a75b-eee3603f9b3c","6352271b-8d28-4cec-80aa-ad5dfe562f35","25042c90-1655-4070-a5fa-357135e72a5b","34d849ff-dc51-44f1-9b5e-43ae896a5951","add2cc97-2d16-4907-9c0d-d8d9cb2821bb","c2228f53-34d5-4b6e-a15f-bc35a7efccfb","36c6280d-a75f-46d2-bbca-2bf398af3b0a","5b687c8e-9e5b-4dfa-ad0c-603d67a510c9","386529bd-8a53-4a16-ab09-922effb7eece","ea7ad051-7bfd-46ac-8e0f-46d6a77db97c","da131b4a-1085-4e16-89bd-aade3aa3119b","f5a6256c-e538-4864-8afc-1f760645dc71","5afac8d4-4dc3-4030-aa1f-75c792b6a040","4fbd2a8a-9a76-4cb5-b1ad-10a6cf03d2d8","03242b34-4e4d-4ed8-8dc8-9620857f5eef","e269228b-e118-4347-bf7e-4e99c6953321","40f85224-82f9-467e-b805-2bfafcc14b14","a11a394c-2c30-42c8-b9fd-9fa36765d8cf","af880135-c488-4ee0-9ec7-d0d7d97f3b77","a50495ee-ec97-44fd-9311-052ff8f2c065","af79c264-2964-4533-80b8-b5c12b9c9ed2","471132f9-fee5-4e42-bd87-25ff266b5bad","e79fe436-b88c-43cd-95e1-692126ff1879","4a512fe3-3c81-4834-8204-256189f3b433","54c8e0b4-492a-41f9-9d00-483c77089f8d","0ac02e40-7185-4fb4-806b-1fca584b8fc0","92e7a1c1-adf9-471b-9210-9aa7042a7570","fba609cf-1bdd-4360-a4a9-0aac30cccba2","50d5d82e-dbc6-42a7-81ce-d1351847b4e8"],V.petGearRelicMap=[null,"e565e4c1-faae-4bcd-b7bf-17a8fa82b02b","4d3daa38-8555-4a59-b579-a7d413ff08bf","dcb4587b-aeb7-4ecb-868e-623a2b8977c8","8c436fee-63b9-4071-9c13-ec9921394876","972ce5a9-4070-4d03-ac82-f973b179bb17","330ba7e3-d4ae-4726-bfdc-2fefcbcfd560","e4167afb-90c3-449b-9ca9-db25394151d7","93180782-3435-4dff-8453-d18eefae6af4","c6019d63-b342-468b-bd90-a8b164a9745a","c2228638-f7f6-434b-b3a0-6c5fdac4dcbc","9774fc88-dae9-41e4-8e74-ea989a68ca86","2cca773e-8d77-40f4-90fa-2415aa2042c8","6c74a732-898d-4d2e-bf74-b3db5caf2c08","0fae1ecf-a12e-4468-89d1-5cfe2c731491","fe432bf4-6c82-44ea-87a0-21473c7f6e0f","43cc6964-12af-4613-bb78-84babbdf6d1c","1a9f5e0d-2f38-43e7-aed3-d3baa11d5980","ca7f8d50-79f5-4c9b-9fde-117ed074df8f","805a0ec5-973a-4db2-a8a7-578a72af1908","d4f4a307-b49c-41ae-9db0-f50be7c5a34d","b277ebdc-dfc1-4f65-bac7-981485143571","e5329b54-bc62-48f0-9933-459ae3d5215f","d58552a8-b331-4d4a-a6be-4af863cb30fb","9f1239fc-22c5-40b8-bf8b-27d5aea2fa29","0776bafe-00ad-4330-9a8d-d27192e16f8f","f6724e18-c0b6-4362-affb-635dcdcb243e","726b27a5-10c6-469d-a866-24af58dfd98e","c0c9004c-0551-43e2-aa51-b64fd37f25b2","549ab8d1-d30b-4b0e-b74f-7f447bf72d27","74aad4b1-3092-4eb2-a626-245c6c07753b","508fbc3b-21fd-4167-938c-47c5c2479448","85bddfa9-200b-4bfa-a50a-b987f02047db","6ba91cdc-c03e-4911-97ab-46ade2083212","26de7583-5a04-4131-ac83-6f6b0180b461","8c4640ac-3f23-45ef-be2d-6921df9897e9","488d398a-b817-4f7c-b703-6c8bbdc3c9fd","0203ff16-a092-4e73-9ce7-d06f4aac4187","efcacc62-980b-4bd2-9467-fe2ec6fbb447","3e811936-f217-4bdb-abdd-e9b5cd02e998","c9cf1589-ce23-4682-a6a6-42d74f583548","dd6f3b75-55f9-415f-9a37-3a63e86dfb6c","5baf22dc-712f-44c0-839e-b8badfb49363","aaf601e3-c687-4be1-bd6d-a8403359b5ff","ceeadb29-0a91-4595-b31a-90367e14ca80","0cd748e1-138d-439c-98b8-fa0b5a095a40","076bec69-6c02-4be8-b223-77be44dce933","64890b30-d47e-4f46-8449-15c498b2a21e","07b99689-35e2-4945-91fb-1bc1592b2b16","a54397d2-62e7-493b-be0a-a84115a10490","57317ac7-83ca-4b91-be0f-d4c49daec19d","9ad61d70-64a9-4ca3-9796-5f9f68830ea3","61e85783-4439-4a4d-9f8d-53fad913a396","ac42c1b5-df00-4085-91bd-9cff255339c4","6192506b-85e4-4d65-b737-9430a8d579e7","601d1546-3271-4546-812a-366b985ad2eb","181a5ac1-274f-49da-9967-44f8c7148402","1685b401-15f1-4038-8aa1-2be1d3adfaea","ee19ef9a-d86b-468c-985a-86adfbb9aa0e","d5fbbb82-4e63-4317-8da5-a50e66779aa1","cac0cc28-49d9-40ff-85a6-9f6bd48f0207","ebc964a9-efe5-4608-906c-905fe3129a84","2829c626-044b-4304-bea3-44499dcdc6fd","a38ecc5b-e12a-4446-a312-bdb44fc3c07f","283a5111-09f6-40da-b88b-ea9106132484","acf5ee98-2c62-4698-952d-415672291fea","9ce2daf1-c131-4f36-85c0-ac289c1a49ba","ad888910-ec1d-48ee-9826-40b12bee66d2","0e5f6804-7dc5-4baf-a620-3b495d80611c","8053a052-e5dd-4cfc-9c1f-08906df52b1f","425739cd-0799-4524-b22c-e43e619dc1f7","57f6149d-563c-440b-85ff-59a6de9c1bb0","478a1bd5-e744-4bca-8b50-0c4cdc130a62","525889df-7480-4f94-800c-0cf66c537f6c","5ce905e3-a51c-4bd1-9008-21130218ed74","9c906f80-30d0-422d-99bf-44e5fa6bf923","d28078ac-6725-4c36-a55b-efd86774cf7e","05ba9cf4-8309-48b4-afed-b56475696c99","e3f5797f-723b-4026-9d7b-b99e6195630c","981307c5-7c64-408f-89c0-b7ca703ff476","730e515b-6839-4aac-a8c1-be91f0741025","00d7b723-22c6-48d9-a8f5-ee4023ab28f3","e2edc611-1d4a-4e9b-86d0-096042235f31","3d519399-5ca4-44ef-b8ba-7441f4765e45",null,"965eaef4-dd2c-4238-9c3a-050d95276064","c8e39757-794e-4cda-8ee6-eebc454e8fb8","1201b04b-a8f9-4b39-b1a1-a03d6bc0648b","84e5c0eb-84d6-4802-8f1d-2fa3857cd3c2","fcc7bc89-d241-4d26-9ff9-4c289e3283ce","a1140b9a-ce6d-46cf-9732-53666636bff8","5939ade6-c16b-4450-87cf-12e6f2eaf01b","d80e68c1-6778-435c-8277-cdc41cd05ec1","310ceb0d-c2e6-4260-b2ca-623c196a37e5","8ae5832a-f7a0-4d2c-aa7b-e0830ca17c43","bdfaf06f-9f73-427b-a40a-ec9cd373f231","9db5fa89-8776-474b-b637-5b4129e93a08","57ea3485-1f46-4ba8-8249-866dcd69c9c5","8c7af42d-a8cd-4ecd-9b93-5800849fabca","04fa078a-fd27-4b8d-8582-bf311b119be5","b0bc9e82-6762-4e47-86ea-ffc656fb81cc","1535696a-8ef4-43b2-b5b2-4fe4f1dbee90","6b14784b-e0aa-41c3-b9a2-7f9fb6acd314","a6399d08-f382-467b-9645-249ac5e34ae5","23e4bd78-7044-4da0-a8bc-01e6bbd27894","72d20335-aef9-4f52-94ff-ec279afb217d","e40e146a-e771-4447-82fb-f21ec8dc81f0","312728aa-efbf-45ae-92f1-e7ce6731c4d5","26afd9ae-428d-41f5-ad25-b5b24d9dca28","897de8ae-c5b1-477a-b55b-d38755eb7c32","28c17bb1-7aa8-4b06-972d-e9ca342f3b9a","37a37fa2-ff26-4014-9bf6-1ab7e82b56a1","97009a93-f624-40b1-be4e-dba7ff045107","3b59a5cb-e398-4ee7-998f-5feed720aea2","d89e4244-49f7-42bc-950e-d5df948e23a3","4f2eed9c-c31c-45b3-9193-76a2464be96e","cc05f3a5-679f-4f2b-9890-4837b8b84858","a8c9420d-022e-474f-bd1e-32379019c17a","b2e7103b-24f7-4fa4-b0a0-e06b9a78f1b7","2464648d-3369-4e23-b875-1c63ab4bcf1d","63da5755-04ae-42ef-b7d1-3efc9549ecde","6e605402-8361-40bf-8ebf-db4920b6b1fb","498c6410-0c03-4c95-9528-a735c50e0bf0","299ec8a6-067e-474f-83cd-45ad8ab239d4","80228696-4f96-415c-bf56-3783be400034","0f3e1a6e-fbe1-48b3-85b8-936f3ebda7ef","cbf576af-6cf7-4295-9087-8a4e7e5ba812","6b91fe88-1bdb-4913-8e93-f0b9dbd6dc6d","e2e91b6d-0fbc-46ca-8806-c2948e47c1b2","d81cc11b-6e53-4967-815c-aac25938e5d9","20596f74-b851-409e-b5fc-a92ea2d3a690","4e169c5c-d879-4ada-b196-f11b2988729c","7552a74a-781a-47b5-8143-43821edb59b7","a31e5862-b1e5-46db-a309-5806245a5399","ce2e4781-f17f-4dbd-ac7f-7bee9b7ee31d","01a441ff-33b2-42ab-8d91-555cd856b093","03482cdc-8bd5-4fc1-8e82-dfccbd242562","e82cecde-c21d-46d6-9356-f79ef72994f2","c28dcabc-d74c-4ab3-889a-2131d86d036a","c08aadf9-c509-433c-bf34-64827859efc9","cff2b8d1-ac5d-4814-864b-838ae4f3487e","694dbbdc-a285-4642-87a5-7f0c8edb8b88","dc57e08b-186f-47b1-8238-7cb01d8889e1","2a6c788b-f4fc-4337-8f32-498166af2e39","d93c2ded-e8f2-4e97-8990-3d52701d6b01","ae3e80fc-26aa-4e2b-93bc-80181c1dd25c","1b08a939-882c-4bcc-aba8-ee2ef14a0770","384f58c0-8156-4d04-8926-42d71bedcaaa"];var W=U(62889),q=U(53661),K=U(10674);let z=class extends G.uAl{constructor(){super(...arguments),this.runOnCreate=!0}set petData(k){this._petData=k}get petData(){var k;return null!==(k=this._petData)&&void 0!==k?k:this.getInjectedValue(q.hi.PetCreatureData)}create(){super.create(),this.runOnCreate&&this.updateGear().catch(G.RQr.createHandler("[PetGearLoadoutComponent] Could not update gear on create"))}updateGear(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,j,$,H,V,W;if(k||this.petData)try{this._spine.isLoaded||(yield this._spine.OnLoaded.asPromise());const G=null!==(B=null==k?void 0:k.petHat)&&void 0!==B?B:null===(F=null===(U=this.petData)||void 0===U?void 0:U.gear)||void 0===F?void 0:F.petHat,q=null!==(j=null==k?void 0:k.petRelic)&&void 0!==j?j:null===(H=null===($=this.petData)||void 0===$?void 0:$.gear)||void 0===H?void 0:H.petRelic,K="number"==typeof G?G:null===(V=yield this._inventoryManager.getPetGearByUniqueId(G))||void 0===V?void 0:V.data.asset.id,z="number"==typeof q?q:null===(W=yield this._inventoryManager.getPetGearByUniqueId(q))||void 0===W?void 0:W.data.asset.id;yield Promise.all([this.setGearOfType(null!=K?K:0,"petHat"),this.setGearOfType(null!=z?z:0,"petRelic")]),yield this._gearManager.refresh()}catch(q){G.RQr.createHandler("[PetGearLoadoutComponent] error updating gear")}}))}setGearOfType(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=this.getPetGearMapByCategory(B),F=this.getGearSlotIndexByCategory(B),j=U[k];if(!j)return void(yield this._gearManager.setGearAt(F,null,!1));const $=yield W.M.loadGearElementFromGuid(j);G.Aq$.isDefined($)?yield this._gearManager.setGearAt(F,$,!1):G.RQr.createHandler(`[PetGearLoadoutComponent] Failed to parse GearElement from file for ${j} of type ${B}`)}))}getPetGearMapByCategory(k){switch(k){case"petHat":return V.petGearHatMap;case"petRelic":return V.petGearRelicMap}}getGearSlotIndexByCategory(k){switch(k){case"petHat":return 0;case"petRelic":return 1}}};(0,F.Cg)([(0,G.Cdj)("d69-defe"),(0,F.Sn)("design:type",K.q)],z.prototype,"_inventoryManager",void 0),(0,F.Cg)([(0,G.Pqz)(H.B),(0,F.Sn)("design:type",H.B)],z.prototype,"_gearManager",void 0),(0,F.Cg)([(0,G.Pqz)($.v),(0,F.Sn)("design:type",$.v)],z.prototype,"_spine",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],z.prototype,"runOnCreate",void 0),z=(0,F.Cg)([(0,G.EVk)("PetGearLoadout",j.Y.player)],z)},19592:(k,B,U)=>{"use strict";var F;U.d(B,{R:()=>F}),function(k){k[k.petRelic=0]="petRelic",k[k.petHat=1]="petHat"}(F||(F={}))},72772:(k,B,U)=>{"use strict";U.d(B,{I:()=>Q});var F=U(8674),G=U(62459),j=U(90156),$=U(35120),H=U(77938),V=U(76277),W=U(90633),q=U(3119),K=U(25480),z=U(56625),Y=U(73678);class Q{static get shouldShowPetGearTutorialCached(){return Q.cachedTutorialEnabledFlag}static updateCachedPetGearTutorialFlag(){return(0,F.sH)(this,void 0,void 0,(function*(){return Q.shouldShowPetGearTutorial()}))}static getEquippablePetGears(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=$.q.instance.prodigy.gameContainer.get("e20-0fb0"),B=yield $.q.instance.prodigy.gameContainer.get("d69-defe").allPetGear;return k.isMember()?B:B.filter((k=>{var B,U;return 1!==(null===(U=null===(B=H.t.getItem(k.data.asset.type,k.data.asset.id))||void 0===B?void 0:B.data)||void 0===U?void 0:U.member)}))}))}static shouldShowPetGearTutorial(){return(0,F.sH)(this,void 0,void 0,(function*(){if($.q.instance.prodigy.gameContainer.get("12f-4e29").isBreadcrumbComplete(W.B.FEATURE_PET_GEAR,W.B.BREADCRUMB_EQUIP_PET_GEAR_FTUE))return this.cachedTutorialEnabledFlag=!1,this.cachedTutorialEnabledFlag;if((0,V.G)(j.m))return this.cachedTutorialEnabledFlag=!1,this.cachedTutorialEnabledFlag;const k=$.q.instance.prodigy.world.getCurrentZone(),B=$.q.instance.prodigy.gameContainer.get("e20-0fb0"),U=![Y.A_.CRYSTALCAVERNS,Y.A_.DARKTOWER,Y.A_.TOWERTOWN].includes(k),F=$.q.instance.prodigy.open.menus.length>0,G=$.q.instance.prodigy.open.isMenuOpen(K.u),Q=$.q.instance.prodigy.open.isMenuOpen(q.o),X=B.player.kennel.getPets().map((k=>H.t.getItem("pet",k.ID))).some((k=>{var B;return(null===(B=k.data.gearEquipSlots)||void 0===B?void 0:B.length)>0})),Z=yield $.q.instance.prodigy.gameContainer.get("d69-defe").allPetGear,J=(null==Z?void 0:Z.length)>0,tt=B.isMember()||Z.map((k=>H.t.getItem(k.data.asset.type,k.data.asset.id))).some((k=>{var B;return 1!==(null===(B=null==k?void 0:k.data)||void 0===B?void 0:B.member)}));return this.cachedTutorialEnabledFlag=U&&X&&J&&tt&&(!F||G||Q)&&z.s.canShowFtue(),this.cachedTutorialEnabledFlag}))}static getPetGearStats(k){var B,U,F;return null!==(F=null===(U=null===(B=H.t.getItem(k.data.asset.type,k.data.asset.id))||void 0===B?void 0:B.data)||void 0===U?void 0:U.stats)&&void 0!==F?F:{}}static getPetWithEquippedGearByUniqueId(k){return $.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPets().find((B=>{var U,F;return(null===(U=B.gear)||void 0===U?void 0:U.petHat)===k||(null===(F=B.gear)||void 0===F?void 0:F.petRelic)===k}))}static getEquippedGearForPetByUniqueId(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPetByUniqueID(k);return B?this.getEquippedGearForPet(B):{}}))}static getEquippedGearForPet(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;const F=$.q.instance.prodigy.gameContainer.get("d69-defe");return{petHat:yield F.getPetGearByUniqueId(null===(B=k.gear)||void 0===B?void 0:B.petHat),petRelic:yield F.getPetGearByUniqueId(null===(U=k.gear)||void 0===U?void 0:U.petRelic)}}))}static getStatsOfEquippedGearForPet(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=$.q.instance.prodigy.gameContainer.get("d69-defe");return(yield Promise.all(Object.values(null!=k?k:{}).map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return B.getPetGearByUniqueId(k)})))))).filter(G.Aq$.isDefined).map(Q.getPetGearStats).reduce(((k,B)=>(Object.entries(B).forEach((([B,U])=>{var F;null!==(F=k[B])&&void 0!==F||(k[B]=0),k[B]+=U})),k)),{})}))}}Q.cachedTutorialEnabledFlag=!1},52382:(k,B,U)=>{"use strict";U.d(B,{H:()=>Z});var F=U(8674),G=U(62459),j=U(99625),$=U(83133),H=U(94566),V=U(28152),W=U(76642),q=U(94325),K=U(53661),z=U(10674),Y=U(19592),Q=U(72772),X=U(9195);let Z=class extends G.uAl{constructor(){super(...arguments),this._maxCardAmount=20,this._cardWidth=130,this._cardHeight=130,this._startIndexOfCurrentRange=0,this._cachedContentViewLastY=0,this._nextContentViewY=0,this._prevContentViewY=0,this._lastRowIndex=16,this._loading=!1,this.onGridInitialized=new G.HN0,this.onGearCardSelected=new G.HN0,this.onGridDisplayed=new G.HN0,this.onEquippedGearChanged=new G.HN0,this.onEmptyGrid=new G.HN0}create(){const k=Object.create(null,{create:{get:()=>super.create}});return(0,F.sH)(this,void 0,void 0,(function*(){k.create.call(this),this._assetType=this._petGearIdentifier===Y.R.petHat?"petHat":"petRelic",this._allGearData=yield this._inventoryManager.getSortedPetGearByType(this._assetType),this._equippedGear=this._allGearData.find((k=>{var B;return(null===(B=Q.I.getPetWithEquippedGearByUniqueId(k.uuid))||void 0===B?void 0:B.uniqueID)===this._activePetData.uniqueID})),this._recycledContainer=new G._mx,this._objectPool=new G.iyL(this.createGearCard.bind(this),null,this.recycleGearCard.bind(this)),this._objectPool.allocate(this._maxCardAmount),this.onEmptyGrid.dispatch(0===this._allGearData.length),this.initialize()}))}initialize(){this._startIndexOfCurrentRange=0,this._cachedContentViewLastY=0,this._nextContentViewY=this.calcNextYThreshold(),this._prevContentViewY=this.calcPrevYThreshold(),this._displayedGearData=this._allGearData.slice(0,Math.min(this._maxCardAmount,this._allGearData.length)),this._displayedGearData.forEach((k=>{this.addGearCard(k)})),this.calcLastRowIndex(),this.resizeContentArea(),this._gearGrid.updateAll(!1),this._objectPool.aliveList.forEach((k=>{var B;null===(B=k.findComponentInChildren($.l))||void 0===B||B.setSelected(!1)})),this.onGridInitialized.dispatch()}onDisplayed(){var k,B;this.onGridDisplayed.dispatch(null!==(B=null!==(k=this._selectedGear)&&void 0!==k?k:this._equippedGear)&&void 0!==B?B:null)}resizeContentArea(){const k=this._gearGrid.GameObject.findComponent(G.XVE);k.setSizeDelta(k.widthDelta,this._gearGrid.yPositionOffset+Math.ceil(this._allGearData.length/this._gearGrid.fixedColumnCount)*this._gearGrid.rowSpacing)}createGearCard(){let k=new G._mx;return k=this._prefabLoader.loadFromGUID(j.l.PetGearItemCard),k}recycleGearCard(k){const B=k.findComponent(X.M);B.unbindContext(),B.onEquip.removeAll(),B.onUnequip.removeAll(),B.onSelect.removeAll();const U=k.findComponentInChildren($.l);U.onUnselected.dispatch(),this._toggleGroup.removeSelectable(U),this._toggleGroup.setSelectedIndex(-1),k.transform.setPosition(-this._cardHeight,-this._cardHeight),this._recycledContainer.addChild(k)}addGearCard(k,B=!1){var U;const F=this._objectPool.getObject();F.findComponent(G.bE_).Container.rebind(K._R.PetGearItemData).toConstantValue(k),F.findComponent(G.bE_).Container.rebind(K.hi.PetCreatureData).toConstantValue(this._activePetData);const j=F.findComponent(X.M);j.bindContext(),j.onEquip.add(this.swapEquippedItem.bind(this)),j.onSelect.add(this.setCardSelected.bind(this,j)),(null===(U=j.equippedPetData)||void 0===U?void 0:U.uniqueID)===this._activePetData.uniqueID&&(this._equippedGear=j.gearData,G.Aq$.isDefined(this._selectedGear)||(this._selectedGear=this._equippedGear));const H=F.findComponentInChildren($.l);this._toggleGroup.addSelectable(H),this._selectedGear===j.gearData&&(j.setSelected(!0),this._toggleGroup.setItemSelected(H,!0)),B?this._gearGrid.GameObject.addChildAt(F,0):this._gearGrid.GameObject.addChild(F)}removeGearCard(k=!1){const B=this._gearGrid.GameObject.children.length;if(B<=0)return;const U=k?0:B-1,F=this._gearGrid.GameObject.children[U];F.parent=null,this._objectPool.recycleObject(F)}updateActiveGearCards(k=!1){this._startIndexOfCurrentRange=k?Math.max(this._startIndexOfCurrentRange-this._gearGrid.fixedColumnCount,0):this._startIndexOfCurrentRange+this._gearGrid.fixedColumnCount;const B=Math.min(this._startIndexOfCurrentRange+this._maxCardAmount,this._allGearData.length);this._displayedGearData=this._allGearData.slice(this._startIndexOfCurrentRange,B),k||this.calcLastRowIndex();const U=this._displayedGearData.slice(k?0:this._lastRowIndex,k?this._gearGrid.fixedColumnCount:this._displayedGearData.length);k&&U.reverse(),U.forEach((B=>{this.addGearCard(B,k)}))}getVisibleGearCardByIndex(k=0){return k<0||k>=this._gearGrid.GameObject.children.length?null:this._gearGrid.GameObject.children[k]}update(){if(super.update(),this._scrollView.getVisibleLocalRange().x!==this._cachedContentViewLastY&&!this._loading){this._cachedContentViewLastY=this._scrollView.getVisibleLocalRange().x,!0===this._tooltip.parent.active&&(this._tooltip.parent.active=!1);const k=Math.abs(this._cachedContentViewLastY);if(k>this._nextContentViewY){this._loading=!0;for(let k=0;k=0;k--)if(k%this._gearGrid.fixedColumnCount==0){this._lastRowIndex=k;break}}calcNextYThreshold(){if(this._startIndexOfCurrentRange+this._maxCardAmount>=this._allGearData.length)return 1/0;return this._gearGrid.yPositionOffset+this._gearGrid.rowSpacing*(Math.floor(this._startIndexOfCurrentRange/this._gearGrid.fixedColumnCount)+1)}calcPrevYThreshold(){if(0===this._startIndexOfCurrentRange)return 0;return this._gearGrid.yPositionOffset+this._gearGrid.rowSpacing*Math.floor(this._startIndexOfCurrentRange/this._gearGrid.fixedColumnCount)}swapEquippedItem(){if(this._equippedGear){const k=this._gearGrid.GameObject.children.find((k=>k.findComponent(X.M).gearData===this._equippedGear));null==k||k.findComponent(X.M).unequipItem()}this._equippedGear=this._selectedGear,this.onEquippedGearChanged.dispatch(this._equippedGear)}setCardSelected(k){this._selectedGear=k.gearData,this.setTooltip(k),this.onGearCardSelected.dispatch(k);const B=this.gameObject.findComponentInChildren(G.bE_,!0);if(G.Aq$.isDefined(B)){const k=B.Container.get(K._R.PetGearItemInfoDataProvider);null==k||k.setGearItem(this._selectedGear);const U=B.Container.get(K._R.PetGearPetPreviewDataProvider);null==U||U.setGearPreviewItem(this._selectedGear)}}setTooltip(k){if(this._selectedGear===this._equippedGear||!(null==k?void 0:k.equippedPetData))return void(this._tooltip.parent.active=!1);const B=this._gearGrid.GameObject.children.indexOf(k.GameObject)%4==3?.75:.5,U=k.GameObject.transform.worldPosition.x+this._cardWidth/2,F=k.GameObject.transform.worldPosition.y+this._cardHeight/2;this._tooltip.parent.transform.setPosition(U,F+87),this._tooltip.parent.findComponent(G.XVE).setPivot(B,.5),this._tooltip.findComponent(G.XVE).setAnchorMin(B,0),this._tooltip.findComponent(G.XVE).setAnchorMax(B,0),this._tooltip.parent.active=!0;const j=this._tooltip.parent.findComponentInChildren(W.S);j.onDispatch.removeAll(),j.addListener((()=>{k.equipItem(),this._tooltip.parent.active=!1}))}resetSelection(){this._toggleGroup.setSelectedIndex(-1);const k=this._gearGrid.GameObject.children.find((k=>k.findComponent(X.M).gearData===this._selectedGear));null==k||k.findComponentInChildren($.l).onUnselected.dispatch()}destroy(){this.onGridInitialized.dispose(),this.onGearCardSelected.dispose(),this.onGridDisplayed.dispose(),this.onEquippedGearChanged.dispose(),this.onEmptyGrid.dispose();const k=this._allGearData.filter((k=>{var B;return!G.Aq$.isDefined(null===(B=k.data)||void 0===B?void 0:B.seenAt)})).map((k=>({itemID:k.itemID,uuid:k.uuid})));this._inventoryManager.markGearAsSeen(k).catch(G.RQr.createHandler("[Pet Gear Inventory Manager] Failed to mark gear as seen")).finally((()=>{this._objectPool.destroy(!0),this._recycledContainer.destroy(),super.destroy()}))}};(0,F.Cg)([(0,G.Cdj)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],Z.prototype,"_prefabLoader",void 0),(0,F.Cg)([(0,G.Cdj)("d69-defe"),(0,F.Sn)("design:type",z.q)],Z.prototype,"_inventoryManager",void 0),(0,F.Cg)([(0,G.Cdj)(K.hi.PetCreatureData),(0,F.Sn)("design:type",Object)],Z.prototype,"_activePetData",void 0),(0,F.Cg)([(0,G.gfw)(Y.R),(0,F.Sn)("design:type",Number)],Z.prototype,"_petGearIdentifier",void 0),(0,F.Cg)([(0,G.MnK)(G.JTA),(0,F.Sn)("design:type",G.JTA)],Z.prototype,"_gearGrid",void 0),(0,F.Cg)([(0,G.MnK)(q.C),(0,F.Sn)("design:type",q.C)],Z.prototype,"_scrollView",void 0),(0,F.Cg)([(0,G.MnK)(H.O),(0,F.Sn)("design:type",H.O)],Z.prototype,"_toggleGroup",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Z.prototype,"_tooltip",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Z.prototype,"onGridInitialized",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Z.prototype,"onGearCardSelected",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Z.prototype,"onGridDisplayed",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Z.prototype,"onEquippedGearChanged",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Z.prototype,"onEmptyGrid",void 0),Z=(0,F.Cg)([(0,G.EVk)("PetGearInventoryGridManager",V.Y.uiPet)],Z)},9195:(k,B,U)=>{"use strict";U.d(B,{M:()=>et});var F=U(8674),G=U(62459),j=U(17446),$=U(35120),H=U(91207),V=U(1195),W=U(77938),q=U(28152),K=U(34603),z=U(26932),Y=U(26004),Q=U(64353),X=U(95057),Z=U(53661),J=U(47255),tt=U(72772);let et=class extends z.z{constructor(){super(...arguments),this.onEquip=new G.HN0,this.onUnequip=new G.HN0,this.onSelect=new G.HN0}get gearData(){return this._gearData}get equippedPetData(){return this._equippedPetData}create(){super.create()}destroy(){this.unbindContext(),this.onEquip.dispose(),this.onUnequip.dispose(),this.onSelect.dispose(),super.destroy()}bindContext(){var k,B,U,F;this._gearData=this._context.Container.get(Z._R.PetGearItemData),this._equippedPetData=tt.I.getPetWithEquippedGearByUniqueId(this._gearData.uuid),this._itemAssetData=W.t.getItem(this._gearData.data.asset.type,this._gearData.data.asset.id),this._context.Container.rebind(Z._R.PetGearItemIcon).toConstantValue(this.getGearIcon(this._gearData)),this._context.Container.rebind(Z._R.PetGearItemRarity).toConstantValue(this.getCardRarityIcon(null===(k=this._itemAssetData.data)||void 0===k?void 0:k.rarity)),this._context.Container.rebind(Z._R.PetGearItemMember).toConstantValue(null===(B=this._itemAssetData.data)||void 0===B?void 0:B.member),this._context.Container.rebind(Z._R.PetGearItemNew).toConstantValue(!G.Aq$.isDefined(null===(U=this._gearData.data)||void 0===U?void 0:U.seenAt)),this._context.Container.rebind(Z._R.PetGearItemEquipped).toConstantValue(G.Aq$.isDefined(this._equippedPetData)&&this._activePetData===this._equippedPetData),this._context.Container.rebind(Z._R.PetGearShowPetIcon).toConstantValue(G.Aq$.isDefined(this._equippedPetData)),this._context.Container.rebind(Z._R.PetGearPetIcon).toConstantValue(this.getPetIcon(null===(F=this._equippedPetData)||void 0===F?void 0:F.ID)),this.refreshCard(),this.gameObject.active=!0}unbindContext(){this.setSelected(!1),this._context.Container.unbind(Z._R.PetGearItemData),this._context.Container.unbind(Z._R.PetGearItemIcon),this._context.Container.unbind(Z._R.PetGearItemMember),this._context.Container.unbind(Z._R.PetGearItemNew),this._context.Container.unbind(Z._R.PetGearItemRarity),this._context.Container.unbind(Z._R.PetGearItemSelected),this._context.Container.unbind(Z._R.PetGearItemEquipped),this._context.Container.unbind(Z._R.PetGearShowPetIcon),this._context.Container.unbind(Z._R.PetGearPetIcon);const k=this.gameObject.findComponentsInChildren(K._);k&&k.forEach((k=>{var B;(null===(B=k.sprite)||void 0===B?void 0:B.frameName)||(k.sprite.key=null)})),this.refreshCard()}refreshCard(){this.gameObject.findComponentsInChildren(Y.B).forEach((k=>k.consume()))}equipItem(){var k;if(null===(k=this._activePetData)||void 0===k?void 0:k.uniqueID){if(this._itemAssetData.data.member&&!this._playerData.isMember()){const k={conversionFunnelName:J.o.FunnelPetGear,conversionStaticOrVideo:X.R.Modal},B=Q.P.shouldUseUnifiedConversionFlow(J.o.FunnelPetGear)?X.R.UnifiedConversionFlow:X.R.Modal;return $.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:"Equip-Member-Locked-Pet-Gear",category:"Pet-Gear",contentId:this.gearData.itemID,adType:B,adVersion:Q.P.getAdVersion(J.o.FunnelPetGear)}),void $.q.instance.prodigy.open.membershipInfo(null,k)}this.onEquip.dispatch(),this._playerData.player.kennel.equipGearForPet(this._activePetData.uniqueID,this._gearData),this._equippedPetData=this._activePetData,this._context.Container.rebind(Z._R.PetGearItemEquipped).toConstantValue(!0),this._context.Container.rebind(Z._R.PetGearShowPetIcon).toConstantValue(!0),this._context.Container.rebind(Z._R.PetGearPetIcon).toConstantValue(this.getPetIcon(this._activePetData.ID)),this.refreshCard()}}unequipItem(){var k;(null===(k=this._activePetData)||void 0===k?void 0:k.uniqueID)&&(this.onUnequip.dispatch(),this._playerData.player.kennel.unequipGearForPet(this._activePetData.uniqueID,this._gearData.itemID.split("-")[0]),this._equippedPetData=null,this._context.Container.rebind(Z._R.PetGearItemEquipped).toConstantValue(!1),this._context.Container.rebind(Z._R.PetGearShowPetIcon).toConstantValue(!1),this._context.Container.rebind(Z._R.PetGearPetIcon).toConstantValue(null),this.refreshCard())}setSelected(k){var B,U;k&&this.onSelect.dispatch(),G.Aq$.isDefined(null===(U=null===(B=this._gearData)||void 0===B?void 0:B.data)||void 0===U?void 0:U.seenAt)||this._context.Container.rebind(Z._R.PetGearItemNew).toConstantValue(!k),this._context.Container.rebind(Z._R.PetGearItemSelected).toConstantValue(k),this.refreshCard()}getGearIcon(k){return H.E.getIconForType(k.data.asset.type,k.data.asset.id)}getPetIcon(k){return k?H.E.getIconForType("pet",k):null}getCardRarityIcon(k){return`${j.E[k].toLowerCase()}-130x130`}};(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",V.E)],et.prototype,"_playerData",void 0),(0,F.Cg)([(0,G.Cdj)(Z.hi.PetCreatureData),(0,F.Sn)("design:type",Object)],et.prototype,"_activePetData",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],et.prototype,"onEquip",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],et.prototype,"onUnequip",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],et.prototype,"onSelect",void 0),et=(0,F.Cg)([(0,G.EVk)("PetGearItemCardDataProvider",q.Y.uiPet)],et)},91020:(k,B,U)=>{"use strict";U.d(B,{t:()=>Y});var F,G=U(8674),j=U(62459),$=U(88022),H=U(36648),V=U(17446),W=U(77938),q=U(28152),K=U(26932),z=U(26004);let Y=F=class extends K.z{bindContext(){var k,B,U,G;const j=W.t.getItem(null===(B=null===(k=this._petGearItem)||void 0===k?void 0:k.data)||void 0===B?void 0:B.asset.type,null===(G=null===(U=this._petGearItem)||void 0===U?void 0:U.data)||void 0===G?void 0:G.asset.id),V=$._.Ui_pet_gear_json;this._petGearItem&&j?(this._context.Container.rebind("PetGearSlotIcon").toConstantValue(H.q[`Icon_${j.type}_${j.ID}`]),this._context.Container.rebind("PetGearSlotBackground").toConstantValue([V,F.RARITY_SLOT_ASSET_MAP[j.data.rarity]])):(this._context.Container.rebind("PetGearSlotIcon").toConstantValue("empty"),this._context.Container.rebind("PetGearSlotBackground").toConstantValue([V,"pet-gear-slot-empty"])),this.gameObject.findComponentsInChildren(z.B,!1).forEach((k=>k.consume()))}};Y.RARITY_SLOT_ASSET_MAP={[V.E.Common]:"pet-gear-slot-common",[V.E.Uncommon]:"pet-gear-slot-uncommon",[V.E.Rare]:"pet-gear-slot-rare",[V.E.Heroic]:"pet-gear-slot-heroic",[V.E.Legendary]:"pet-gear-slot-legendary"},Y.GEAR_TYPE_TO_SLOT_IDENTIFIER_MAP={petRelic:"PetRelicSlotContainer",petHat:"PetHatSlotContainer"},(0,G.Cg)([(0,j.Cdj)("PetGearSlotData",!1),(0,G.Sn)("design:type",Object)],Y.prototype,"_petGearItem",void 0),Y=F=(0,G.Cg)([(0,j.EVk)("PetGearSlotDataProvider",q.Y.uiPet)],Y)},9860:(k,B,U)=>{"use strict";U.d(B,{n:()=>Q});var F,G=U(8674),j=U(62459),$=U(79687),H=U(65240),V=U(35120),W=U(73797),q=U(41674),K=U(13956),z=U(35537),Y=U(65933);let Q=class{get petInventoryData(){return this._isInitialized||j.VyI.log("PetInventoryDataProvider has not been initialized",j.$bb.Error),this._petInventoryData}constructor(){this._petInventoryData=null,this.onPetInventoryDataUpdated=new j.HN0,this._isInitialized=!1,this[F]="petInventoryChangedData",V.q.instance.prodigy.game.broadcaster.addAppListener(W.H3.MembershipResponseReceived,this.handleMembershipChange.bind(this),this,void 0,!0)}fetchPetInventoryData(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._networkHandler.getPetInventoryData();return this._petInventoryData=k,k}))}updateSlots(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=V.q.instance.prodigy.gameContainer.get("c47-20b6").item.beginSecureItemTransaction();yield Promise.all([this._networkHandler.updateSlots(k),this.onPetInventoryDataUpdated.asPromise()]),U.flush({sink_type:H.C.PetSlots,transaction_id:B})}))}setSlots(k){return(0,G.sH)(this,void 0,void 0,(function*(){0}))}destroy(){this.onPetInventoryDataUpdated.dispose(),V.q.instance.prodigy.game.broadcaster.removeAppListener(W.H3.MembershipResponseReceived,this,void 0)}refresh(){this.fetchPetInventoryData().then((()=>{this._isInitialized=!0})).catch((k=>{j.RQr.logError(k,"Failed to fetch pet inventory data")}))}handleMembershipChange(k){"success"===k&&this.refresh()}[(F=z.sE,z.JN)](k){return(0,G.sH)(this,void 0,void 0,(function*(){if(k.bonusJustClaimed&&k.previousSlotsValue!==k.entity.permanentSlots){V.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendPetSlotUnlockedEvent(q.No.MemberGiftAwarded,k.entity.permanentSlots,k.previousSlotsValue)}this._isInitialized=!0,this._petInventoryData=k.entity,this.onPetInventoryDataUpdated.dispatch()}))}};Q.PET_SLOT_GROUP_COUNT=3,Q.PET_SLOT_COST_VARIANT_BASE_STRING="slotsThresholdsV",(0,G.Cg)([(0,K.b)("f32-d326"),(0,G.Sn)("design:type",Y.Y)],Q.prototype,"_networkHandler",void 0),Q=(0,G.Cg)([(0,$.injectable)(),(0,G.Sn)("design:paramtypes",[])],Q)},16383:(k,B,U)=>{"use strict";U.d(B,{l:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(16847),V=U(9860);let W=class extends G.uAl{create(){super.create(),this._petInventoryDataProvider.onPetInventoryDataUpdated.add(this.updateDisplay,this)}updateDisplay(){const k=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this._playerWallet&&(this._playerWallet.updateCurrencyID(1),this._playerWallet.updateAmount(k.getGold()))}destroy(){this._petInventoryDataProvider.onPetInventoryDataUpdated.remove(this.updateDisplay,this),super.destroy()}};(0,F.Cg)([(0,G.Cdj)("8b9-bad1"),(0,F.Sn)("design:type",V.n)],W.prototype,"_petInventoryDataProvider",void 0),(0,F.Cg)([(0,G.MnK)(H.n),(0,F.Sn)("design:type",H.n)],W.prototype,"_playerWallet",void 0),W=(0,F.Cg)([(0,G.EVk)("PetInventoryController",$.Y.petRescue)],W)},11848:(k,B,U)=>{"use strict";U.d(B,{N:()=>st});var F=U(8674),G=U(62459),j=U(21574),$=U(50788),H=U(37016),V=U(96989),W=U(90633),q=U(65240),K=U(35120),z=U(29738),Y=U(77938),Q=U(76277),X=U(68152),Z=U(56625),J=U(22023),tt=U(30226),et=U(6413),it=U(73678);class st{static get shouldShowPetMergeTutorial(){return st._cacheInValidTutorialState&&z.O.isEnglishLocale()}static set shouldShowPetMergeTutorial(k){st._cacheInValidTutorialState=k}static hasSeenPetMergeFTUE(){return K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(W.B.FEATURE_PET_MERGE,W.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED)}static awardPetMergeFtueIngredients(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;if(K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(W.B.FEATURE_PET_MERGE,W.B.BREADCRUMB_PET_MERGE_FTUE_INGREDIENTS_GIVEN))return;const B=K.q.instance.prodigy.gameContainer,U=B.get("306-5359"),F=U.kennel;let j=st.getChosenPetForMergeRankFTUE(B,U,F);if(!G.Aq$.isDefined(j)){const k=Y.t.getItem("pet",et.h.STARTER_PETS[0]);tt.J.bagItem(k,K.q.instance.prodigy.game,"got-pet",void 0,{source_type:q.C.QuestReward}),j=F.data[F.data.length-1]}if(!(0,Q.G)($.J)){(0,X.v)(G.Aq$.isDefined(j),"Unable to gift pet merge ingredients for FTUE");let B=Y.t.getItem("pet",j.ID);const U=(0,Q.G)($.J)?V.Y.getMerge2RecipeForPet(B.ID,B.data.rarity,j.mergeRank):V.Y.getRecipeForPet(B.data.evolution.totalEvos,j.mergeRank);B=null!==(k=J.P8.getRequiredPetMergeIngredient(B,U))&&void 0!==k?k:B;for(let k=0;kU.forceSaveCharacter(k)))}))}static getChosenPetForMergeRankFTUE(k,B,U){const F=null!=k?k:K.q.instance.prodigy.gameContainer,j=null!=B?B:F.get("306-5359"),W=null!=U?U:j.kennel,q=J.P8.showUniquePetsFeature()?W.getPrimaryPets():W.getPets(),z=(0,Q.G)($.J),X=q.filter((k=>{if(!J.P8.canPetAccessMergeRanks(k.ID)||k.mergeRank===H.qd.MAX)return!1;if(!z)return!0;const B=Y.t.getItem("pet",k.ID),U=V.Y.getMerge2RecipeForPet(k.ID,B.data.rarity,k.mergeRank);return!!G.Aq$.isDefined(U)&&k.level>=U.requiredLevel})),Z=J.P8.sortPetList(X);return Z.length>0?Z[0]:null}static cacheCanShowPetMergeTutorial(){if(!z.O.isEnglishLocale())return this._cacheInValidTutorialState=!1,this._cacheInValidTutorialState;const k=K.q.instance.prodigy.gameContainer.get("12f-4e29"),B=st.hasSeenPetMergeFTUE();if(!J.P8.canPlayerAccessPetMergeFeature()||B)return this._cacheInValidTutorialState=!1,this._cacheInValidTutorialState;const U=K.q.instance.prodigy.world.getCurrentZone();let F=![it.A_.CRYSTALCAVERNS,it.A_.DARKTOWER,it.A_.TOWERTOWN,it.A_.HOUSE].includes(U);const G=k.isBreadcrumbComplete(W.B.FEATURE_PET_MERGE,W.B.BREADCRUMB_PET_MERGE_FTUE_STARTED);if(U!==it.A_.ACADEMY||k.isBreadcrumbComplete(W.B.BREADCRUMB_UNLOCK_ACADEMY,W.B.BREADCRUMB_UNLOCK_ACADEMY_NOOT_DIALOGUE)||(F=!1),!F)return this._cacheInValidTutorialState=!1,this._cacheInValidTutorialState;let H;H=!(J.P8.showUniquePetsFeature()&&!G)||k.isBreadcrumbComplete(W.B.FEATURE_UNIQUE_PETS,W.B.BREADCRUMB_UNIQUE_PETS_INTRO_SEQUENCE);if(!Z.s.canShowFtue()||!H)return this._cacheInValidTutorialState=!1,this._cacheInValidTutorialState;if((0,Q.G)($.J)){const k=null!==st.getChosenPetForMergeRankFTUE();this._cacheInValidTutorialState=k}else{const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this._cacheInValidTutorialState=k.getLevel()>=j.g.config.minimumPlayerLevel}return this._cacheInValidTutorialState}}st._cacheInValidTutorialState=!1},12472:(k,B,U)=>{"use strict";U.d(B,{r:()=>Y});var F=U(62459),G=U(95891),j=U.n(G),$=U(50788),H=U(37016),V=U(96989),W=U(76277),q=U(22023),K=U(35120),z=U(77938);class Y{static getOwnedIngredientsForRecipe(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=F.kennel.getPets();if((0,W.G)($.J)){return F.kennel.getAllPetsByID(+k.ID).filter((B=>B.uniqueID!==k.uniqueID))}return j().chain(G).filter((F=>V.Y.isCompatibleIngredient(B,(k=>k===F.uniqueID?F:void 0),k,{type:H.J1.Pet,uniqueId:F.uniqueID},U))).sortBy([k=>k.mergeRank,k=>{var B,U,F;return null===(F=null===(U=null===(B=z.t.getItem("pet",k.ID))||void 0===B?void 0:B.data)||void 0===U?void 0:U.evolution)||void 0===F?void 0:F.tier},"level"]).value()}static getMergeIngredientInfo(k){var B,U,G,j;const K=null!==(B=q.P8.getPetDisplayMergeRank(k.ID,k.uniqueID))&&void 0!==B?B:H.qd.MIN,Q=z.t.getItem("pet",k.ID),X={requiredIngredientsCount:0,validPetIngredientCount:0,mergeRecipe:void 0},Z=k=>z.t.getItem("pet",k),J=B=>{var U;return null!==(U=q.P8.getPetDisplayMergeRank(k.ID,B))&&void 0!==U?U:H.qd.MIN};if((0,W.G)($.J)){if(X.mergeRecipe=V.Y.getMerge2RecipeForPet(k.ID,Q.data.rarity,K),F.Aq$.isDefined(X.mergeRecipe)&&V.Y.isMerge2Recipe(X.mergeRecipe)){const B=Y.getOwnedIngredientsForRecipe(k,Z,X.mergeRecipe);X.requiredIngredientsCount=null!==(G=null===(U=X.mergeRecipe)||void 0===U?void 0:U.ingredientCount)&&void 0!==G?G:0;const F=V.Y.getMergedIngredientCountPerPet(J,B,k,Q.data.rarity);X.validPetIngredientCount=Object.values(F).reduce(((k,B)=>k+B),0),X.willLevelOnMerge=B.some((B=>B.level>k.level))}}else{if(X.mergeRecipe=V.Y.getRecipeForPet(Q.data.evolution.totalEvos,K),!F.Aq$.isDefined(X.mergeRecipe))return;const B=Y.getOwnedIngredientsForRecipe(k,Z,X.mergeRecipe);X.requiredIngredientsCount=null!==(j=X.mergeRecipe.ingredientCount)&&void 0!==j?j:0,X.validPetIngredientCount=B.length,X.willLevelOnMerge=B.some((B=>B.level>k.level))}return X}}},4234:(k,B,U)=>{"use strict";U.d(B,{m:()=>tt});var F,G=U(8674),j=U(87490),$=U(62459),H=U(79687);!function(k){k.Hard_map_spawn_constants="195f52c5-daf3-4d6a-80f3-05f67043e2a3",k.Hard_zone_constants="e1194526-45fc-4bf3-8d8c-37475b83204f",k.Regular_map_spawn_constants="d186f15e-4a39-47fe-9005-6c14066475ea",k.Regular_zone_constants="07f88337-a630-4af0-baad-8fb01e5383c0"}(F||(F={}));var V,W=U(97495),q=U(35120),K=U(77938),z=U(22023),Y=U(30226),Q=U(73678),X=U(95946),Z=U(84399),J=U(46725);let tt=V=class{getPetsInZone(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;const U=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let F=[],G=!0;const j=q.q.instance.prodigy.world.getZone(k).difficultyMode;if(J.D.isPrefabZoneAvailable(k)||Z.R.isZoneAvailable(k)||j!==W.i.Regular){const U=yield this.getZoneConfig(k,j);F=null!==(B=null==U?void 0:U.rescuablePets)&&void 0!==B?B:[],G=!1}if(0===F.length){const B=q.q.instance.prodigy.gameContainer.get("e5b-e931");F=(yield B.getAllSpawnDataInZone(k)).reduce(((k,B)=>{var U;return k.concat(null!==(U=B.mods.encounter)&&void 0!==U?U:[])}),[]).map((k=>k.ID))}const $=new Map,H=new Map;return F.forEach((k=>{const B=K.t.getItem("pet",k);if(B&&!$.has(k)&&($.set(k,{ID:k,name:B.data.name,data:B.data,benchType:"main",firstRescuedDate:U.encounters.getPetFirstRescuedDate(k)}),G)){z.P8.getPetBench(k).forEach((B=>{const F=K.t.getItem("pet",B.petID);F&&!$.has(B.petID)&&H.set(F.ID,{ID:F.ID,name:F.data.name,data:F.data,benchType:"bench",fromBench:k,firstRescuedDate:U.encounters.getPetFirstRescuedDate(F.ID)})}))}})),Array.from(H.keys()).forEach((k=>{$.has(k)||$.set(k,H.get(k))})),Array.from($.values()).sort(((k,B)=>k.data.ordinal-B.data.ordinal)).sort(((B,U)=>B.data.element===U.data.element?0:B.data.element===V.ElementForZoneID[k]?-1:1)).sort(((k,B)=>{var U,F;return(null!==(U=B.firstRescuedDate)&&void 0!==U?U:0)-(null!==(F=k.firstRescuedDate)&&void 0!==F?F:0)}))}))}getZoneConfig(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=(null!=B?B:q.q.instance.prodigy.world.getZone(k).difficultyMode)===W.i.Regular?F.Regular_zone_constants:F.Hard_zone_constants;yield q.q.instance.prodigy.gameContainer.get($.t5G.AssetLoader).loadAssets([U]);return(yield q.q.instance.game.cache.getJSON(U))[k.replace("_hard","")]}))}getPetsInCurrentZone(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.getPetsInZone(q.q.instance.prodigy.world.getCurrentZone())}))}getZonesForPetId(k){return(0,G.sH)(this,void 0,void 0,(function*(){return Y.J.asyncFilter(Object.values(Q.A_),(B=>(0,G.sH)(this,void 0,void 0,(function*(){return(yield this.getPetsInZone(B)).some((B=>B.ID===k))}))))}))}getMinMaxEnemyLevelsForZone(k){return(0,G.sH)(this,void 0,void 0,(function*(){let B;return(J.D.isPrefabZoneAvailable(k)||Z.R.isZoneAvailable(k))&&(B=yield this.getZoneConfig(k)),$.Aq$.isDefined(B)||(B=yield this.getZoneConfig(k,W.i.Regular)),null==B?void 0:B.enemyLevels}))}};tt.ElementForZoneID={[Q.A_.FOREST]:j.ELegacyElementType.Earth,[Q.A_.BONFIRE]:X.a.Fire,[Q.A_.SHIPWRECK]:X.a.Water,[Q.A_.SHIVERCHILL]:X.a.Ice,[Q.A_.SKYWATCH]:X.a.Storm,[Q.A_.FORESTHARD]:j.ELegacyElementType.Earth,[Q.A_.BONFIREHARD]:X.a.Fire,[Q.A_.SHIPWRECKHARD]:X.a.Water,[Q.A_.SHIVERCHILLHARD]:X.a.Ice,[Q.A_.SKYWATCHHARD]:X.a.Storm},tt=V=(0,G.Cg)([(0,H.injectable)()],tt)},36811:(k,B,U)=>{"use strict";U.d(B,{V:()=>Y});var F=U(8674),G=U(62459),j=U(99625),$=U(10727),H=U(35120),V=U(46784),W=U(65050),q=U(41674),K=U(76277),z=U(13956);class Y{static loadPlayerGoalsHUDIcon(){return this._prefabLoader.loadWithDependenciesFromGUID(j.l.FtuePlayerGoalsHudIcon)}static openPlayerGoalsIfPrizeReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){if((0,K.G)($.d3).enabled)return;const B=H.q.instance.prodigy.gameContainer.get("d65-d7bb");yield B.updateQuestProgress(),yield B.sendQuestEventPromise;B.surfacedTasks.some((k=>B.isPrizeReady(k)))&&(yield new Promise((B=>{H.q.instance.prodigy.open.prefabMenu(j.l.FtuePlayerGoals,B,!0,!0,!1,{},{interfaceName:V.B.PlayerGoals,interfaceType:q.Wm.Modal,originType:k,instanceType:W.N.UI})})))}))}}(0,F.Cg)([(0,z.b)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],Y,"_prefabLoader",void 0)},10551:(k,B,U)=>{"use strict";U.d(B,{d:()=>K});var F=U(8674),G=U(62459),j=U(62886),$=U(35120),H=U(13956),V=U(30226),W=U(3606),q=U(44677);class K{static initializePlayerGoals(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this._questManager.preloadQuestProgress(),yield K.sendStartQuest(),yield K.sendPlayAfterHoursQuestEvent(),yield K.sendAttachParentQuestEvent(),yield K.sendAttachClassCodeQuestEvent()}))}static get loggedInPlayer(){return $.q.instance.prodigy.gameContainer.get("e20-0fb0")}static sendStartQuest(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._questManager.sendQuestEvent(j.T.START_QUEST,{id:"player-goals-quest-start"})}))}static sendPlayAfterHours(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._questManager.sendQuestEvent(j.T.PLAY_AFTER_HOURS,{})}))}static sendPlayAfterHoursQuestEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){V.J.isNightTime()&&(yield K.sendPlayAfterHours())}))}static sendAttachParent(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._questManager.sendQuestEvent(j.T.ATTACH_PARENT,{})}))}static sendAttachParentQuestEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){this.loggedInPlayer.player.hasValidatedParentEmail()&&(yield K.sendAttachParent())}))}static sendAttachClassCode(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._questManager.sendQuestEvent(j.T.ATTACH_CLASS_CODE,{id:"player-goals-collect-class-code-attach"})}))}static sendAttachClassCodeQuestEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){let k=[];try{k=yield q.p.requestClassCodes()}catch(e){return void G.VyI.log(`Error requesting class codes: ${e.code}`,G.$bb.Error)}if(k.length>0)try{(yield q.p.hasAttachedClassCode())||(yield K.sendAttachClassCode())}catch(e){return void G.VyI.log(`Error getting attached classcode quest status: ${e.code}`,G.$bb.Error)}}))}static sendCompleteProfileQuizEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._questManager.sendQuestEvent(j.T.COMPLETE_PROFILE_QUIZ,{id:"player-goals-profile-quiz"})}))}}(0,F.Cg)([(0,H.b)("d65-d7bb"),(0,F.Sn)("design:type",W.n)],K,"_questManager",void 0)},44677:(k,B,U)=>{"use strict";U.d(B,{p:()=>H});var F=U(8674),G=U(3606),j=U(13956),$=U(35120);class H{static requestClassCodes(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=$.q.instance.prodigy.gameContainer.get("c97-bd0d");return(yield k.getClassCodes()).data.player.classrooms}))}static get isQuestComplete(){return this._questManager.isQuestComplete}static hasAttachedClassCode(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._questManager.hasAttachedClassCode()}))}static availableQuestTasks(){return this._questManager.availableTasks}static pairedTaskByQuestEventId(k){return this._questManager.pairedTasks.find((B=>{var U,F,G,j;const $=null===(F=null===(U=B.taskDefinition)||void 0===U?void 0:U.metadata)||void 0===F?void 0:F.goalCardData,H=null===(j=null===(G=B.awardTask.taskDefinition)||void 0===G?void 0:G.metadata)||void 0===j?void 0:j.goalCardData,V=null==$?void 0:$.questEventId,W=null==H?void 0:H.questEventId;return V===k||W===k}))}}(0,F.Cg)([(0,j.b)("d65-d7bb"),(0,F.Sn)("design:type",G.n)],H,"_questManager",void 0)},46855:(k,B,U)=>{"use strict";U.d(B,{r:()=>V});var F=U(62459),G=U(5491),j=U(35120),$=U(39984),H=U(55122);class V{constructor(k,B,U,F){this._player=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player,this.maxLevel=F,this.baseMaxLevel=F,this.updateCreatureXpBarInformation(k,B,U)}updateCreatureXpBarInformation(k,B,U){this.levels=[],this.starsRequiredForEachLevel=[],this.currentCreatureStars=k,this.starsToAward=U.totalNonMemberXp+(this._player.hasMembership()?U.memberXp:0);const F=H.s.activePlayerLevelCap,G=$.e.levelFromStars(this.currentCreatureStars+this.starsToAward,B,F),V=$.e.levelFromStars(k,B,F);if(this.currentRelativeStars=this.currentCreatureStars-$.e.starsToLevel(V,B),this.creatureType=B,this.shouldDisplayChargedLevelXp(G)){const k=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=k.data.chargedLevelData,U=H.s.activePlayerLevelCap,F=k.getLevel()>=U?k.getLevel():U,$=B.newLevelData.levelsGained.map((k=>k.level+F)),W=B.newLevelData.levelsGained.map((k=>k.relativeXp));if(V>=U)this.levels=$,this.currentRelativeStars=B.newLevelData.startingLevelRelativeXp,this.starsRequiredForEachLevel=W,this.starsToAward=this.levels[0]=this.maxLevel){const k=$.e.starsToLevel(this.maxLevel,B)-this.currentCreatureStars;this.starsToAward=Math.min(k,this.starsToAward),this.starsToAward=Math.max(0,this.starsToAward)}V=H.s.activePlayerLevelCap&&(null===(U=$.newLevelData.levelsGained)||void 0===U?void 0:U.length)>0}getStarsBetweenLevels(k){const B=k.concat(k[k.length-1]+1).filter((k=>k<=H.s.activePlayerLevelCap)).map((k=>$.e.starsToLevel(k,this.creatureType)));return B.map(((k,U)=>k-(B[U-1]||0))).splice(1)}getLevels(k,B){return Array.from({length:Math.min(B,this.maxLevel)-k+1},((B,U)=>U+k))}}},59754:(k,B,U)=>{"use strict";U.d(B,{I:()=>rt});var F=U(8674),G=U(62459),j=U(66582),$=U(35120),H=U(96535),V=U(63352),W=U(73797),q=U(28152),K=U(41674),z=U(67665),Y=U(15485),Q=U(46784),X=U(19633),Z=U(95057),J=U(16847),tt=U(53661),et=U(40743),it=U(47255),st=U(43754),nt=U(99015),at=U(8838);let rt=class extends G.uAl{constructor(){super(...arguments),this.onActionsComplete=new G.HN0}postCreate(){var k,B,U,F;if(super.postCreate(),this._postBattleFlowData=this.getInjectedValue(tt.uo.PostBattleFlowData),!this._postBattleFlowData)return;this._segmentConversionFunnelTrigger={type:"MC-Battle-Reward",category:"battles",contentId:this._segment.postBattleFlow.getBattleId(),adType:Z.R.UnifiedConversionFlow};const j=this._currentPlayer.hasMembership(),$=null!==(k=this._postBattleFlowData.rewards.find((k=>"currency"===k.type&&27===k.ID)))&&void 0!==k?k:void 0,H=null!==(B=this._postBattleFlowData.memberRewards.find((k=>"currency"===k.type&&27===k.ID)))&&void 0!==B?B:void 0,V=$&&null!==(U=$.N)&&void 0!==U?U:1,W=H&&null!==(F=H.N)&&void 0!==F?F:1,q=this._hardCurrencyDataProvider.getBalance(27)-V-(j?W:0);this._freeRewardsMagicoinAmountText.text=`x${V}`,this._memberRewardsMagicoinAmountText.text=`x${W}`,this._currencyDisplay.updateAmount(q),this._getFreeRewardsButton.onClick.addOnce((()=>{this._currencyDisplay.playEarnEffect(q+V),j||this._segment.purchase.sendFunnelTriggerImpression(this._segmentConversionFunnelTrigger)}),this),this._getMemberRewardsButton.onClick.add(this.startConversionFunnel,this),this._collectAllRewardsButton.onClick.addOnce((()=>{this._currencyDisplay.playEarnEffect(q+V+W)}),this),this.setWizardBankChestStates().catch(G.RQr.createHandler("PostBattleFlowMagicoinRewardDisplayComponent: Failed to set wizard bank chest states")),j?this._collectAllRewardsButton.onClick.add(this.onActionsComplete.dispatch,this.onActionsComplete):this._collectAllRewardsButton.onClick.add(this.claimMemberRewardsAfterConversion,this)}destroy(){$.q.instance.prodigy.game.broadcaster.removeAppListener(W.H3.MembershipResponseReceived,this),this._getFreeRewardsButton.onClick.removeAll(),this._getMemberRewardsButton.onClick.removeAll(),this._collectAllRewardsButton.onClick.removeAll(),this.onActionsComplete.dispose(),super.destroy()}claimMemberRewardsAfterConversion(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._segment.item.beginSecureItemTransaction();yield this._magicoinBattleRewardsNetworkHandler.claimMemberRewards(),k.flush(this._segment.postBattleFlow.getItemReceivedMetadata()),this.onActionsComplete.dispatch()}))}setWizardBankChestStates(){return(0,F.sH)(this,void 0,void 0,(function*(){yield Promise.all([this._coreMemberBankChestStateManager.onStateUpdated.asPromise(),this._plusMemberBankChestStateManager.onStateUpdated.asPromise(),this._ultraMemberBankChestStateManager.onStateUpdated.asPromise()]);switch(this._featureAccessData.memberTier){case j._$.NonMember:this._coreMemberBankChestStateManager.setState(at.T.Closed),this._plusMemberBankChestStateManager.setState(at.T.Closed),this._ultraMemberBankChestStateManager.setState(at.T.Closed);break;case j._$.MemberCore:this._coreMemberBankChestStateManager.setState(at.T.Open),this._plusMemberBankChestStateManager.setState(at.T.Closed),this._ultraMemberBankChestStateManager.setState(at.T.Closed);break;case j._$.MemberPlus:this._coreMemberBankChestStateManager.setState(at.T.Open),this._plusMemberBankChestStateManager.setState(at.T.Open),this._ultraMemberBankChestStateManager.setState(at.T.Closed);break;case j._$.MemberUltra:default:this._coreMemberBankChestStateManager.setState(at.T.Open),this._plusMemberBankChestStateManager.setState(at.T.Open),this._ultraMemberBankChestStateManager.setState(at.T.Open)}}))}startConversionFunnel(){this._segment.featureCommon.sendButtonEvent({buttonName:Y.k.PostBattleFlowMagicoinGetMemberRewards,destinationName:Q.B.MembershipParentAd,interfaceName:Q.B.PostBattleFlowMagicoinRewardDisplay,interfaceType:K.Wm.Screen,saveClickInfo:Y.k.PostBattleFlowMagicoinGetMemberRewards}),this._segment.purchase.sendFunnelStart(this._segmentConversionFunnelTrigger),$.q.instance.prodigy.open.unifiedConversionFlow(void 0,{conversionFunnelName:it.o.FunnelPostBattleMagicoinGetMemberRewards,conversionStage:it.o.StagePostBattleMagicoinClickGetMemberRewards},{id:Y.k.PostBattleFlowMagicoinGetMemberRewards,type:K.$N.ButtonClick})}};(0,F.Cg)([(0,G.Cdj)("306-5359"),(0,F.Sn)("design:type",H.W)],rt.prototype,"_currentPlayer",void 0),(0,F.Cg)([(0,G.Cdj)("358-48b9"),(0,F.Sn)("design:type",nt.C)],rt.prototype,"_magicoinBattleRewardsNetworkHandler",void 0),(0,F.Cg)([(0,G.Cdj)("5c7-e02d"),(0,F.Sn)("design:type",st.W)],rt.prototype,"_hardCurrencyDataProvider",void 0),(0,F.Cg)([(0,G.Cdj)("3a0-8003"),(0,F.Sn)("design:type",V.F)],rt.prototype,"_featureAccessData",void 0),(0,F.Cg)([(0,G.Cdj)("c47-20b6"),(0,F.Sn)("design:type",z.Y)],rt.prototype,"_segment",void 0),(0,F.Cg)([(0,G.MnK)(J.n),(0,F.Sn)("design:type",J.n)],rt.prototype,"_currencyDisplay",void 0),(0,F.Cg)([(0,G.MnK)(X.S),(0,F.Sn)("design:type",X.S)],rt.prototype,"_getFreeRewardsButton",void 0),(0,F.Cg)([(0,G.MnK)(X.S),(0,F.Sn)("design:type",X.S)],rt.prototype,"_getMemberRewardsButton",void 0),(0,F.Cg)([(0,G.MnK)(X.S),(0,F.Sn)("design:type",X.S)],rt.prototype,"_collectAllRewardsButton",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],rt.prototype,"_freeRewardsMagicoinAmountText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],rt.prototype,"_memberRewardsMagicoinAmountText",void 0),(0,F.Cg)([(0,G.MnK)(et.r),(0,F.Sn)("design:type",et.r)],rt.prototype,"_coreMemberBankChestStateManager",void 0),(0,F.Cg)([(0,G.MnK)(et.r),(0,F.Sn)("design:type",et.r)],rt.prototype,"_plusMemberBankChestStateManager",void 0),(0,F.Cg)([(0,G.MnK)(et.r),(0,F.Sn)("design:type",et.r)],rt.prototype,"_ultraMemberBankChestStateManager",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],rt.prototype,"onActionsComplete",void 0),rt=(0,F.Cg)([(0,G.EVk)("PostBattleFlowMagicoinRewardDisplay",q.Y.postBattleFlow)],rt)},68788:(k,B,U)=>{"use strict";U.d(B,{D:()=>re});var F,G=U(8674),j=U(62459),$=U(99625),H=U(28628),V=U(83798),W=U(39596),q=U(50788),K=U(49754),z=U(35120),Y=U(49237),Q=U(29738),X=U(1195),Z=U(55734),J=U(73797),tt=U(70704),et=U(79399),it=U(93833),st=U(98998),nt=U(41674),at=U(67665),rt=U(66998),ot=U(76277),ht=U(85515),ct=U(94236),dt=U(53661),lt=U(80060),ut=U(60985),ft=U(1312);!function(k){k.Win="win",k.Loss="loss",k.Draw="draw",k.Timeout="timeout",k.Run="run"}(F||(F={}));var bt=U(2212),pt=U(55122),vt=U(56718),gt=U(81914),mt=U(90633),yt=U(65050);class _t{constructor(k,B,U,F,G,$){this.onComplete=new j.HN0,this.onEvent=new j.HN0,this.postBattleFlowData=k,this.continueButton=B,this.rewardsBar=U,this.animationsInProgress=F,this.segment=z.q.instance.prodigy.gameContainer.get("c47-20b6"),this._mainFlowContainer=G,this._rescueFlowContainer=$}setup(k,B){var U;j.Aq$.isDefined(null===(U=this.continueButton)||void 0===U?void 0:U.GameObject)&&(this.continueButton.GameObject.active=!0),this.rewardsBar.active=!0,this._expressModeEnabled=k,B&&(this._interfaceName=B,this.sendInterfaceOpenedEvent())}sendInterfaceOpenedEvent(){this.segment.featureCommon.sendInterfaceEvent({interfaceName:this._interfaceName,interfaceType:nt.Wm.Screen,instanceType:yt.N.Interface,originType:nt.$N.Battle,originID:this.segment.postBattleFlow.getBattleId()})}onAllAnimationsComplete(){}sendPlayerProgressionEvent(k){this.segment.playerProgression.sendFunnelAdvancedEvent({funnelName:"Post Battle Flow",funnelType:"battle",stepName:k,funnelId:this.segment.postBattleFlow.getBattleId()})}dispatchClickToProceed(){this.continueButton.onClick.dispatch(),this.continueButton.onEnabledClick.dispatch()}enableExpressMode(){this._expressModeEnabled=!0,this._waitingForInput&&this.dispatchClickToProceed()}destroy(){this.onComplete.dispose(),this.onEvent.dispose()}}class Et extends _t{setup(k){super.setup(k),this._fsmController=z.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),this._fsmService=z.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService)}}class wt extends Et{constructor(){super(...arguments),this.FSM_ID=57}setup(k){super.setup(k),this.rewardsBar.active=!1;const B=z.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=B.hasCompletedTutorial(),F=z.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(mt.B.BREADCRUMB_UNLOCK_ACADEMY,mt.B.BREADCRUMB_UNLOCK_ACADEMY_NOOT_DIALOGUE),G=z.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirementsDeprecated(12),j=B.backpack.hasItem("key",22)>0;this._expressModeEnabled||!U||F||!G||j?this.onComplete.dispatch():(this.continueButton.GameObject.active=!1,this._fsmController.execute(this._fsmService.getStateMachine(this.FSM_ID),{game:z.q.instance.game,menu:this},null))}runNextEvent(){var k;this.onComplete.dispatch(),(null===(k=this.continueButton)||void 0===k?void 0:k.GameObject)&&(this.continueButton.GameObject.active=!0)}}class Tt extends _t{getPrefabInjectionParams(){return{}}setup(k,B){var U,F;super.setup(k,B);const G=z.q.instance.prodigy.gameContainer.get("d0e-64fd");this._prefabPromise=lt.d.loadWithInjectedValuesAndDependenciesFromGUID(G,this.PREFAB_GUID,Object.assign(Object.assign({},this.getPrefabInjectionParams()),{[dt.uo.PostBattleFlowData]:this.postBattleFlowData,[dt.uo.PostBattleFlowNumberOfRegularRewardCards]:vt.S.combineRewards(null!==(U=this.postBattleFlowData.rewards)&&void 0!==U?U:[]).length,[dt.uo.PostBattleFlowNumberOfMemberRewardCards]:vt.S.combineRewards(null!==(F=this.postBattleFlowData.memberRewards)&&void 0!==F?F:[]).length})).then((k=>(this.rewardsBar.addChild(k),this.continueButton.onClick.addOnce((()=>k.destroy()),this),k.onDestroy.add((()=>this.onComplete.dispatch())),k))).catch(j.RQr.createHandler(`Failed to load prefab ${this.PREFAB_GUID}.`))}}class St extends Tt{constructor(){super(...arguments),this.PREFAB_GUID=$.l.Charged_levels_tutorial}setup(k){super.setup(k),this.continueButton.GameObject.active=!1,this._mainFlowContainer&&(this._mainFlowContainer.active=!0),this._rescueFlowContainer&&(this._rescueFlowContainer.active=!1),this._prefabPromise.then((k=>{k.transform.setPosition(-this.rewardsBar.transform.worldPosition.x,-this.rewardsBar.transform.worldPosition.y)}))}}var At,Ct=U(88038);!function(k){k.RewardsAnimationFinished="REWARDS_ANIMATION_FINISHED",k.EvolveAutoSurfaced="EVOLVE_AUTO_SURFACED",k.StandardXPBarSequenceFinished="STANDARD_XP_BAR_SEQUENCE_FINISHED",k.RescueFlowFinished="RESCUE_FLOW_FINISHED"}(At||(At={}));class Ot extends _t{constructor(){super(...arguments),this._timeBetweenPrompts=500}setup(k){super.setup(k),this._mainFlowContainer&&(this._mainFlowContainer.active=!0),this._rescueFlowContainer&&(this._rescueFlowContainer.active=!1),this.continueButton.GameObject.active=!1,this.rewardsBar.active=!1,this._expressModeEnabled?this.onComplete.dispatch():this.openEvolutionPrompts().catch(j.RQr.createHandler("Failed to open evolution prompts"))}openEvolutionPrompts(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=z.q.instance.prodigy.gameContainer.get("5c7-e02d"),B=this.postBattleFlowData.creatures.filter((k=>k.canEvolve)).sort(((k,B)=>k.creature.justLeveled&&!B.creature.justLeveled?-1:B.creature.justLeveled&&!k.creature.justLeveled?1:B.creature.getLevel()-k.creature.getLevel()));B.length>0&&this.onEvent.dispatch(At.EvolveAutoSurfaced),Ct._.postBattleFlowShown();for(const U of B)if(Ct._.shouldAutomaticallyPromptEvolution(k,U.creature.getID())){this._waitingForInput=!0;const k=ct.K.openEvolutionPromptIfEligible(U.creature,U.originalCreature,this._expressModeEnabled,nt.k.PostBattleWin);this._expressModeEnabled&&this.dispatchClickToProceed(),yield k,this._waitingForInput=!1,Ct._.automaticEvolutionPromptShown(),yield j.Egh.timeout(this._timeBetweenPrompts)}this.onComplete.dispatch()}))}dispatchClickToProceed(){ct.K.attemptToForceSkip()}}var It=U(46784),Dt=U(47917),Rt=U(96810),Pt=U(54234);class Mt extends Tt{constructor(){super(...arguments),this.PREFAB_GUID=$.l.RewardsDisplay}setup(k,B){super.setup(k,null!=B?B:It.B.PostBattleFlowStandardRewardDisplay),this.continueButton.GameObject.active=this.animationsInProgress.counter<=0,this.continueButton.onClick.addOnce((()=>{z.q.instance.prodigy.gameContainer.get("c47-20b6").postBattleFlow.sendButtonEvent("post_battle_rewards","battle_rewards_dismiss"),this._waitingForInput=!1})),this.setupRewardAnimationFinishedEvent(),this.sendPlayerProgressionEvent(Rt.l.PostBattleFlowRewardsDisplay)}setupRewardAnimationFinishedEvent(){this._prefabPromise.then((k=>{k.findComponent(Pt.I).onRewardsDisplayFilled.addOnce((()=>{this.onEvent.dispatch(At.RewardsAnimationFinished),this._waitingForInput=!0,this._expressModeEnabled&&this.dispatchClickToProceed()}))})).catch(j.RQr.createHandler("PostBattleFlowRewardDisplayState.setupRewardAnimationFinishedEvent failed"))}onAllAnimationsComplete(){super.onAllAnimationsComplete(),this.continueButton.GameObject.active=!0}}class Nt extends Mt{constructor(){super(...arguments),this.PREFAB_GUID=$.l.MemberJarRewardsDisplay}getPrefabInjectionParams(){return{[dt.uo.PostBattleFlowContinueCallback]:()=>{this.dispatchClickToProceed()}}}setup(k){z.q.instance.prodigy.gameContainer.get("e20-0fb0").isMember()||this.animationsInProgress.counter>0&&this.animationsInProgress.increment(),super.setup(k,It.B.PostBattleFlowMemberJarRewardDisplay),this.continueButton.GameObject.active=!1}setupRewardAnimationFinishedEvent(){this._prefabPromise.then((k=>{k.findComponentInChildren(Dt.P).onJarRewardsSequenceFinished.addOnce((()=>{this.onEvent.dispatch(At.RewardsAnimationFinished),this._waitingForInput=!0,this._expressModeEnabled&&this.dispatchClickToProceed()}))})).catch(j.RQr.createHandler("PostBattleFlowJarRewardDisplayState.setupRewardAnimationFinishedEvent failed"))}onAllAnimationsComplete(){}}var xt=U(59754);class Lt extends Mt{constructor(){super(...arguments),this.PREFAB_GUID=$.l.MagicoinRewardsDisplay}getPrefabInjectionParams(){return{[dt.uo.PostBattleFlowContinueCallback]:()=>{this.dispatchClickToProceed()}}}setup(k){super.setup(k,It.B.PostBattleFlowMagicoinRewardDisplay),this.continueButton.GameObject.active=!1}setupRewardAnimationFinishedEvent(){this._prefabPromise.then((k=>{k.findComponent(xt.I).onActionsComplete.addOnce((()=>{this.onEvent.dispatch(At.RewardsAnimationFinished),this._waitingForInput=!0,this._expressModeEnabled&&this.dispatchClickToProceed()}))})).catch(j.RQr.createHandler("PostBattleFlowMagicoinRewardDisplayState.setupRewardAnimationFinishedEvent failed"))}onAllAnimationsComplete(){}}var kt=U(5491);class Bt extends _t{setup(k){super.setup(k),this.continueButton.GameObject.active=!1,this.rewardsBar.active=!1,this._mainFlowContainer&&(this._mainFlowContainer.active=!0),this._rescueFlowContainer&&(this._rescueFlowContainer.active=!1),this.setupNootTipScreen()}setupNootTipScreen(){const k=this.postBattleFlowData.creatures.filter((k=>k.creature.creatureType===kt.V.Pet)).map((k=>k.creature.data.uniqueID));z.q.instance.prodigy.open.postBattleLossMenu(k,this.postBattleFlowData.nootTipBattleInfo,this.onComplete.dispatch.bind(this.onComplete))}}class Ut extends _t{setup(k){super.setup(k),this.onEvent.dispatch(At.RewardsAnimationFinished),this.onComplete.dispatch()}}var Ft=U(87490),Gt=U(55346),jt=U(58347);class $t extends _t{constructor(){super(...arguments),this.PBF_RESCUE_LATER="PBF_RESCUE_LATER",this.PBF_CONTINUE_LOC_KEY="PBF_CONTINUE",this.PBF_RESCUE_PETS_LOC_KEY="PBF_RESCUE_PETS",this.PBF_PETS_ARE_RESCUED_LOC_KEY="PBF_PETS_ARE_RESCUED",this._rescuablePets=[],this._rescuePetQueue=[]}setup(k){var B;super.setup(k),(null===(B=this.postBattleFlowData)||void 0===B?void 0:B.rescuablePets)&&0!==this.postBattleFlowData.rescuablePets.length?(this._mainFlowContainer&&(this._mainFlowContainer.active=!1),this._rescueFlowContainer&&(this._rescueFlowContainer.active=!0),this.setupRescuablePets().catch((k=>{j.VyI.log("Failed to setup rescuable pets",j.$bb.Error,k)}))):this.onEvent.dispatch(At.RescueFlowFinished)}runRescuePetQueue(k){return(0,G.sH)(this,void 0,void 0,(function*(){for(this._rescuePetQueue.push(k);this._rescuePetQueue.length>0;){const k=this._rescuePetQueue.pop();k&&(yield k)}}))}setupRescuablePets(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=z.q.instance.prodigy.gameContainer.get("d0e-64fd"),B=j.wa5.getActiveScene().container.get(dt.sD.RescuablePetsContainer);yield k.preloadFromGUIDWithDependencies($.l.RescuablePet);const U=this.getRescueScreenState();this.postBattleFlowData.rescuablePets.forEach((F=>{const H=k.loadFromGUID($.l.RescuablePet,B).findComponent(Gt.fL);H?(this._rescuablePets.push(H),H.setup(F,U.showMembershipButton,(()=>this.updateRescuablePetsUI(this.getRescueScreenState().showMembershipButton)),(k=>(0,G.sH)(this,void 0,void 0,(function*(){return this.runRescuePetQueue(k)}))))):j.VyI.log("RescuablePetComponent not found on RescuablePet prefab",j.$bb.Error)})),this.updatePetsRescuedState(U.hasPetToRescue),U.showMembershipButton&&(z.q.instance.prodigy.game.broadcaster.addAppListener(J.H3.MembershipResponseReceived,this.handleMembershipChange,this),z.q.instance.prodigy.game.broadcaster.addAppListener(J.H3.MembershipRewardsFlowComplete,this.handleMembershipRewardsFlowComplete,this)),z.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:It.B.PetRescueWindow,interfaceType:nt.Wm.Window,originType:nt.$N.AutoSurfaced,instanceType:yt.N.UI})}))}getRescueScreenState(){const k=z.q.instance.prodigy.gameContainer,B=k.get("306-5359").canPurchaseMembershipInGame(),U=k.get("5c7-e02d"),F=(0,ot.G)(jt.F);let G=B,j=!1,$=Number.MAX_SAFE_INTEGER;return this.postBattleFlowData.rescuablePets.forEach((k=>{var H;if(k.battleStatus===Ft.EUnitBattleStatus.Defeated&&(j=!0),k.battleStatus===Ft.EUnitBattleStatus.Defeated&&(null===(H=k.cost)||void 0===H?void 0:H.value)>0){const j=U.canAfford(k.cost);$=Math.min($,k.cost.value),(F||j&&B)&&(G=!1)}})),j||(G=!1),U.isHardCurrencyMemberLocked($)&&(G=!0),{showMembershipButton:G,hasPetToRescue:j}}updatePetsRescuedState(k){const B=z.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),U={[dt.uo.PostBattleFlowRescueContinueButtonText]:k?B.getText(this.PBF_RESCUE_LATER):B.getText(this.PBF_CONTINUE_LOC_KEY),[dt.uo.PostBattleFlowRescueTitle]:k?B.getText(this.PBF_RESCUE_PETS_LOC_KEY):B.getText(this.PBF_PETS_ARE_RESCUED_LOC_KEY),[dt.uo.PostBattleFlowShowClouds]:k};lt.d.updateInjectedValues(this._rescueFlowContainer,U)}updateRescuablePetsUI(k){let B=!1;this._rescuablePets.forEach((U=>{U.updateUI(),U.isRescued||(B=!0,U.updateButtons(k))})),this.updatePetsRescuedState(B)}handleMembershipChange(k){const B="success"===k;this.updateRescuablePetsUI(!B),B||lt.d.updateInjectedValues(this._rescueFlowContainer,{[dt.uo.EnableRescueButtonInput]:!0})}handleMembershipRewardsFlowComplete(){return(0,G.sH)(this,void 0,void 0,(function*(){this.updateRescuablePetsUI(!1)}))}destroy(){super.destroy(),z.q.instance.prodigy.game.broadcaster.removeAppListener(J.H3.MembershipResponseReceived,this),z.q.instance.prodigy.game.broadcaster.removeAppListener(J.H3.MembershipRewardsFlowComplete,this)}}var Ht=U(42448),Vt=U(44357),Wt=U(74958);class qt extends _t{setup(k){super.setup(k),this.showDialogueIfNecessary().catch((()=>{j.RQr.createHandler("Error displaying Post Battle Flow Rift Key Obtained dialogue."),this.onComplete.dispatch()}))}showDialogueIfNecessary(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,j;const $=z.q.instance.prodigy,H=$.gameContainer.get("e20-0fb0").player,V=$.gameContainer.get("61f-37d6"),[W,q,K]=[null!==(B=null===(k=V.get({type:"riftRunKey",id:Ht.BN.PortalOneKey}))||void 0===k?void 0:k.quantity)&&void 0!==B?B:0,null!==(F=null===(U=V.get({type:"riftRunKey",id:Ht.BN.PortalTwoKey}))||void 0===U?void 0:U.quantity)&&void 0!==F?F:0,null!==(j=null===(G=V.get({type:"riftRunKey",id:Ht.BN.PortalThreeKey}))||void 0===G?void 0:G.quantity)&&void 0!==j?j:0],Y=Math.max(W,q,K)>0,Q=H.hasCompletedTutorial(),X=$.breadcrumbManager.isBreadcrumbComplete(mt.B.FEATURE_RIFTS,mt.B.BREADCRUMB_FIRST_RIFT_KEY_OBTAINED);Q&&!X&&Y&&(this.rewardsBar.active=!1,yield(0,Vt.v$)([1596]),z.q.instance.prodigy.gameContainer.get("c47-20b6").rifts.sendRiftsFunnelAdvancedEvent(Wt.fk.RiftsReceiveFirstRiftKey),$.breadcrumbManager.completeBreadcrumb(mt.B.FEATURE_RIFTS,mt.B.BREADCRUMB_FIRST_RIFT_KEY_OBTAINED),this.rewardsBar.active=!0),this.onComplete.dispatch()}))}}class Kt extends _t{setup(k){super.setup(k),this._mainFlowContainer&&(this._mainFlowContainer.active=!0),this._rescueFlowContainer&&(this._rescueFlowContainer.active=!1),this.continueButton.GameObject.active=!1,this.rewardsBar.active=!1}onAllAnimationsComplete(){this.onEvent.dispatch(At.StandardXPBarSequenceFinished)}}var zt,Yt=U(28344),Qt=U(4903),Xt=U(34829),Zt=U(84415),Jt=U(30226),te=U(48982),ee=U(1716),ie=U(52157),se=U(3374);!function(k){k.PetEvolution="1-evolve/in-game-pet-evolution",k.PetCollect="2-collect/in-game-pet-collect",k.MythicalEpics="3-mythical-epics/in-game-mythical-epics",k.PlayAtHome="4-play-at-home/in-game-play-at-home",k.Magicoin="5-magicoin/in-game-magicoin"}(zt||(zt={}));class ne extends _t{constructor(){super(...arguments),this._isAtSchool=!1,this.et=!1}setup(k){super.setup(k),this.continueButton.GameObject.active=!1,this.rewardsBar.active=!1,this._activePlayer=z.q.instance.prodigy.gameContainer.get("e20-0fb0").player,this._isAtSchool=this._activePlayer.isPlayingAtSchool()||Jt.J.isDateWithinSchoolDayAndHours(new Date(Date.now())),this.et=this._activePlayer.hasMembership(),this.isVideoReady().then((k=>{k?(this.openVideoPlayerMenu(),this._waitingForInput=!1):this.onComplete.dispatch()})).catch((()=>{j.RQr.createHandler("[PostBattleFlowVideoState] Error getting whether video is ready"),this.onComplete.dispatch()}))}isVideoReady(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,j;if(Xt.s.get("GameConstants.Battle.SKIP_POST_BATTLE_VIDEOS"))return!1;const $=(0,ot.G)(Yt.y).enabled,H=yield(new ie.L).isReady({questId:ee.E.id,taskId:"2-0"});if($&&!H)return!1;if(!this._activePlayer.hasCompletedTutorial())return!1;if(!this.checkRequiredBreadcrumbsComplete())return!1;yield this.refreshVideoData();const V=null!==(U=null===(B=null===(k=this._currentVideoTypeData)||void 0===k?void 0:k.metadata)||void 0===B?void 0:B.showToMembers)&&void 0!==U&&U;if(this.et&&!V)return!1;const W=null!==(j=null===(G=null===(F=this._currentVideoTypeData)||void 0===F?void 0:F.metadata)||void 0===G?void 0:G.frequencyHours)&&void 0!==j?j:0;return Zt.a.isFeatureReadyForNextInteraction(this._videoType,3600*W)}))}checkRequiredBreadcrumbsComplete(){const k=z.q.instance.prodigy.breadcrumbManager;return Array.from(ne.REQUIRED_BREADCRUMBS.entries()).every((([B,U])=>k.isBreadcrumbComplete(B,U)))}openVideoPlayerMenu(){var k,B,U,F,G,j;const $=Object.keys(null!==(U=null===(B=null===(k=this._currentVideoTypeData)||void 0===k?void 0:k.data)||void 0===B?void 0:B.videos)&&void 0!==U?U:{});if($.length<=0)return void this.onComplete.dispatch();const H=te.h.selectNextVideoInFeature(this._videoType,$);Zt.a.saveTimestampData(this._videoType,{videoId:H});const V=null===(G=null===(F=this._currentVideoTypeData)||void 0===F?void 0:F.data)||void 0===G?void 0:G.videos[H];z.q.instance.prodigy.open.postBattleMembershipVideoMenu(H,V,null===(j=this._currentVideoTypeData)||void 0===j?void 0:j.metadata,this._isAtSchool,this.onComplete.dispatch.bind(this.onComplete))}refreshVideoData(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=se.C.getVideosDataProvider(),B=this.postBattleFlowData.battleType,U=this._isAtSchool?`${B}-school`:`${B}-home`;if(this._currentVideoTypeData=yield k.getVideosDataByType(U),this._videoType=U,!this._currentVideoTypeData){const B=this._isAtSchool?Qt.s.PostBattleFlowSchool:Qt.s.PostBattleFlowHome;this._currentVideoTypeData=yield k.getVideosDataByType(B),this._videoType=B}}))}}ne.REQUIRED_BREADCRUMBS=new Map([[mt.B.FEATURE_ZONE_ENTRY_ILLUSTRATION,mt.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FOREST]]);class ae extends _t{setup(k){super.setup(k),this._mainFlowContainer&&(this._mainFlowContainer.active=!0),this._rescueFlowContainer&&(this._rescueFlowContainer.active=!1),this.continueButton.GameObject.active=!1,this.rewardsBar.active=!1}}let re=class extends j.uAl{set continueButton(k){this._continueButton=k}get animationsInProgressSemaphore(){return this._animationsInProgressSemaphore}constructor(){super(),this._activePartyMembers=[],this._onActiveTeamChanged=new j.HN0,this._onStateEvent=new j.HN0,this._onActiveTeamInitialized=new j.HN0,this._onShowStarsGained=new j.HN0,this._stateIndex=0,this._expressModeEnabled=!1,this._showPostLossFlow=!1,this.POST_BATTLE_VIDEO_EXEMPT_TYPES=[H.gu.Tutorial1,H.gu.Tutorial1Revised,H.gu.Tutorial2,H.gu.Tutorial2Revised,H.gu.Tutorial3,H.gu.StatusEffectsTutorial,H.gu.Duel,H.gu.MatchmakingDuel,H.gu.MatchmakingBotDuel];{this._starJarController=new st.b;const k=(0,ot.G)(q.F);z.q.instance.game.broadcaster.addAppListener(k?J.ig.Merged:J.ig.Evolved,(()=>{const k=this._postBattleFlowData.creatures.filter((k=>k.creature instanceof Z.R)).map((k=>k.creature));this.updatePetSpines(k),this._onActiveTeamChanged.dispatch(k)}),this,null)}}postCreate(){var k,B;super.postCreate(),this._postBattleFlowData=this.getInjectedValue(dt.uo.PostBattleFlowData),this._rewardsScalingInfo=this.getInjectedValue(dt.uo.PostBattleFlowRewardsScalingInfo),this._segment.playerProgression.clearPlayerProgressionDataForFunnelName("Post Battle Flow"),this._segment.postBattleFlow.sendPostBattleFlowOpensEvent(),this.updatePetSpines();const U=this.getInjectedValue(dt.uo.PostBattleFlowVictory);this.showXpWarningMessage(U);const F=this._player.player.isPlayingAtSchool(),G=this._player.player.hasMembership();let j=!1;const $=(0,ot.G)(V.G);if($.enabled){const k=$.unlockLevel;j=this._player.getLevel(){const B=k.creature;return B instanceof Z.R&&B.data.level===B.currentMaxLevel}));G||F||!K||ft.s.startRecording("PostBattleFlowManager","post_battle_flow"),this._statesInOrder=[];const z=this.getInjectedValue(dt.uo.PostBattleFlowBattleType);if(this._showPostLossFlow=!U&&vt.S.isPostLossFlowAvailable(z),this._showPostLossFlow)this.setupPostDefeatStates();else{const k=U&&!this.POST_BATTLE_VIDEO_EXEMPT_TYPES.includes(z)&&Q.O.isEnglishLocale();this.setupPostBattleStates(q,k)}(null===(B=null===(k=this._postBattleFlowData.creatures[0].creatureXpBarInformation)||void 0===k?void 0:k.levels)||void 0===B?void 0:B.length)>1?this.playerLevelUpCelebrationFlow():this.setupDefaultFlow()}setupPostBattleStates(k,B){var U,F,G,j,$;(0,ot.G)(K.H).enabled&&this._statesInOrder.push($t),(0,ot.G)(q.F)||this._statesInOrder.push(Ot),(null===(U=this._postBattleFlowData)||void 0===U?void 0:U.magicoinRewardGranted)?this._statesInOrder.push(Lt):(null===(G=null===(F=this._postBattleFlowData)||void 0===F?void 0:F.rewards)||void 0===G?void 0:G.length)>0||(null===($=null===(j=this._postBattleFlowData)||void 0===j?void 0:j.memberRewards)||void 0===$?void 0:$.length)>0?(this._statesInOrder.push(k?Nt:Mt),this._statesInOrder.push(qt)):this._statesInOrder.push(Ut),this._statesInOrder.push(wt),B&&this._statesInOrder.push(ne);{this._activePartyMembers.push(this._centrePartyMember),this._centrePlayerGameObject.active=!0,this._postBattleFlowData.creatures.length>1&&(this._activePartyMembers.push(this._leftPartyMember),this._leftPetSpineRootContainer.visible=!0),this._postBattleFlowData.creatures.length>2&&(this._activePartyMembers.push(this._rightPartyMember),this._rightPetSpineRootContainer.visible=!0);const k=this._postBattleFlowData.creatures.filter((k=>k.creature instanceof Z.R)).map((k=>k.creature));this._onActiveTeamInitialized.dispatch(k)}}setupPostDefeatStates(){this._expressModeEnabled=!0,this._statesInOrder.push(Bt)}finishRescueFlow(){this._animationsInProgressSemaphore.initialize(this._postBattleFlowData.creatures.length),this.completeCurrentState(),this.setupPostBattleFlowMemberComponentsForParty(),this._activePartyMembers[0].shouldShowChargedLevelUnlock()&&this._statesInOrder.splice(2,0,St)}setupDefaultFlow(){this._showPostLossFlow?this.setupNextState():(0,ot.G)(K.H).enabled?(this._statesInOrder.splice(1,0,Kt),this.setupNextState()):(this._animationsInProgressSemaphore.initialize(this._postBattleFlowData.creatures.length),this._statesInOrder.unshift(Kt),this.setupNextState(),this.setupPostBattleFlowMemberComponentsForParty())}playerLevelUpCelebrationFlow(){this._rewardsBar.active=!1,(0,ot.G)(K.H).enabled?(this._statesInOrder.splice(1,0,ae),this.setupNextState()):(this._animationsInProgressSemaphore.initialize(this._postBattleFlowData.creatures.length),this._statesInOrder.unshift(ae),this.setupNextState(),this.setupPostBattleFlowMemberComponentsForParty(),this._activePartyMembers[0].shouldShowChargedLevelUnlock()&&this._statesInOrder.splice(1,0,St))}initPetLevelUp(){this.setupPostBattleFlowMemberComponentsForParty()}evolvePet(k){const B=this._postBattleFlowData.creatures[k];if(!(B&&B.creature instanceof Z.R))return void j.VyI.log(`Warning: attempted to evolve pet in post battle flow with invalid index ${k}`,j.$bb.Warning);const U=this._postBattleFlowData.creatures[k];ct.K.openEvolutionPromptIfEligible(U.creature,U.originalCreature,!1,nt.k.PostBattleWin).then((k=>{k&&(this._leftPartyMember.enableEvolveButtonInput(!0),this._rightPartyMember.enableEvolveButtonInput(!0))})).catch(j.RQr.createHandler("Error showing evolution summary in post battle flow"))}showMergeMenu(k){const B=this._postBattleFlowData.creatures[k];if(!(B&&B.creature instanceof Z.R))return void j.VyI.log(`Warning: attempted to merge pet in post battle flow with invalid index ${k}`,j.$bb.Warning);const U=this._postBattleFlowData.creatures[k];z.q.instance.prodigy.open.petMergeMenu(U.creature.data,nt.k.PostBattleWin,(()=>{this._leftPartyMember.enableMergeButtonInput(!0),this._rightPartyMember.enableMergeButtonInput(!0),this._leftPartyMember.updateMergeBadgeRank(),this._rightPartyMember.updateMergeBadgeRank()}))}destroy(){var k,B;null===(B=null===(k=z.q.instance.game.state.getCurrentState())||void 0===k?void 0:k.endCombat)||void 0===B||B.call(k,F.Win),ft.s.stopRecording(),this._onActiveTeamChanged.dispose(),this._onStateEvent.dispose(),this._onActiveTeamInitialized.dispose(),this._onShowStarsGained.dispose(),z.q.instance.game.broadcaster.removeAppListener(J.ig.Evolved,this),super.destroy()}setupNextState(){var k,B,U,F,G;if(this._stateIndex>=this._statesInOrder.length)return void(0===(null===(B=null===(k=this._postBattleFlowData)||void 0===k?void 0:k.rewards)||void 0===B?void 0:B.length)&&0===(null===(F=null===(U=this._postBattleFlowData)||void 0===U?void 0:U.memberRewards)||void 0===F?void 0:F.length)?(this._continueButton.GameObject.active=!0,this._continueButton.onClick.addOnce((()=>{this._segment.postBattleFlow.sendPBFClosedEvent(),this.endPostBattleFlow()})),this._expressModeEnabled&&(this._continueButton.onClick.dispatch(),this._continueButton.onEnabledClick.dispatch())):(this._segment.postBattleFlow.sendPBFClosedEvent(),this.endPostBattleFlow()));const $=new this._statesInOrder[this._stateIndex](this._postBattleFlowData,this._continueButton,this._rewardsBar,this._animationsInProgressSemaphore.semaphore,this._mainFlowContainer,this._rescueFlowContainer);if($.onComplete.addOnce((()=>{this._stateIndex++,$.destroy(),this.setupNextState()})),$.onEvent.add((k=>{this._onStateEvent.dispatch(k)})),j.Aq$.isDefined(null===(G=this._continueButton)||void 0===G?void 0:G.GameObject)){this._continueButton.GameObject.findComponentInChildren(j.EYj).text=this._stateIndex===this._statesInOrder.length-1?this._baseLocalizer.getText("BUTTON_DONE"):this._baseLocalizer.getText("DIALOG_CONTINUE")}this._currentState=$,$.setup(this._expressModeEnabled)}onAllAnimationsComplete(){this._currentState.onAllAnimationsComplete()}redeemStarsThroughMemberJar(){const k=this._starJarController.getNumberOfStoredStars(),B={baseXp:0,memberXp:Math.round(k/this._postBattleFlowData.creatures.length),totalNonMemberXp:0},U=pt.s.calculatePlayerOverflowXp(B.memberXp);return this._postBattleFlowData.awardXp(B),this._player.player.data.storedMemberStars=0,this._postBattleFlowData.saveCharacterData(),U>0&&this._postBattleFlowData.awardChargedLevelStarJarXp({baseXp:0,memberXp:U,totalNonMemberXp:0}).catch(j.RQr.createHandler("[PostBattleFlowManagerComponent] Failed to award charged level star jar xp.")),{totalStarsAwarded:k,starJarXpGained:B}}visuallyRedeemStarsThroughMemberJar(k){this._animationsInProgressSemaphore.initialize(this._postBattleFlowData.creatures.length),this._centrePartyMember.visuallyAwardPartyMemberXpOutsideOfSetup(k),this._leftPartyMember.visuallyAwardPartyMemberXpOutsideOfSetup(k),this._rightPartyMember.visuallyAwardPartyMemberXpOutsideOfSetup(k)}completeCurrentState(){this._currentState.onComplete.dispatch()}incrementAnimationsInProgress(){this._animationsInProgressSemaphore.increment()}decrementAnimationsInProgress(){this._animationsInProgressSemaphore.decrement()}updatePetSpines(k){const B=null!=k?k:this._postBattleFlowData.creatures.filter((k=>k.creature instanceof Z.R)).map((k=>k.creature));this._petSpinesComponent.updatePetSpines(B)}enableExpressMode(k){var B;this._expressModeEnabled=!0,j.Aq$.isDefined(k)&&this.showForceEndDialog(k).catch(j.RQr.createHandler("PostBattleFlowManagerComponent.enableExpressMode failed")),null===(B=this._currentState)||void 0===B||B.enableExpressMode()}showXpWarningMessage(k){const B=ut.R.shouldShowRewardsScalingWarning(this._rewardsScalingInfo)||bt.J.shouldShowHardModePbfBannerWarning();this._scaledRewardsWarning.active=k&&B}showForceEndDialog(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;const U=z.q.instance.prodigy.gameContainer.get("d0e-64fd");if(this._forceEndDialog=yield lt.d.loadWithInjectedValuesAndDependenciesFromGUID(U,$.l.WarningToaster,{NOTIFICATION_BODY_TEXT:k}),this._forceEndDialog.setLayer(ht.E.Ui),!j.Aq$.isDefined(this._forceEndDialog))return;const F=null===(B=this._forceEndDialog.findChildByName("FromBottom"))||void 0===B?void 0:B.findComponent(rt.s);null==F||F.runInTween()}))}setupPostBattleFlowMemberComponentsForParty(){var k,B;let U=0;for(let F=0;F{"use strict";U.d(B,{O:()=>it});var F=U(8674),G=U(62459),j=U(88022),$=U(50788),H=U(5491),V=U(76277),W=U(53661),q=U(80060),K=U(1195),z=U(77938),Y=U(39984),Q=U(28152),X=U(25809),Z=U(95913),J=U(72162),tt=U(55122),et=U(50475);let it=class extends G.uAl{constructor(){super(...arguments),this._onXpGained=new G.HN0,this._onMemberXpGained=new G.HN0,this._onLevelUp=new G.HN0,this._onChargedLevelUp=new G.HN0,this._onSpellLearned=new G.HN0,this._onStatGained=new G.HN0,this._onStarsGained=new G.HN0}setup(k,B,U,F=!0){this._xpGained=k,this._creatureInformation=B,F&&(this._xpBar.GameObject.active=!0,this._xpBar.onLevelUp.addOnce(((k,B)=>{const U=this.buildPopupMessagePropertiesForCreatureForLevelUp(B);this._levelUpPopupMessageManager.playPopupMessageAnimations(U).catch(G.RQr.createHandler("Failed to play level up popup message animations."))})),this._xpBar.setup(this._creatureInformation.creatureXpBarInformation,U,!0,this.shouldShowChargedLevelUnlock()),this._onStarsGained.dispatch(this._creatureInformation.creatureXpBarInformation.starsToAward),this.playPopupMessagesForCreatureXpGain(),(0,V.G)($.F)&&this.updateMergeBadgeRank())}visuallyAwardPartyMemberXpOutsideOfSetup(k){this._xpBar.GameObject.active&&(this._xpGained=k,this._creatureInformation.updateMainCreatureInformation(this._creatureInformation.creature,k),this._xpBar.fakeAwardXp(!1,k),this.playPopupMessagesForCreatureXpGain())}shouldShowChargedLevelUnlock(){var k,B;return this._creatureInformation.creatureXpBarInformation.creatureType===H.V.Player&&(null===(B=null===(k=this._currentPlayer.player.data)||void 0===k?void 0:k.chargedLevelData)||void 0===B?void 0:B.hasJustReceivedFreeChargedLevel)}buildPopupMessagePropertiesForCreatureForLevelUp(k){const B=[];if(0===k){const k=this._creatureInformation.creatureXpBarInformation.creatureType===H.V.Player&&this._creatureInformation.creatureXpBarInformation.levels[0]>tt.s.activePlayerLevelCap?Z.v4.chargeUp(this._onChargedLevelUp):Z.v4.levelUp(this._onLevelUp);B.push(k)}if(B.push(...Z.v4.battleStats(this._creatureInformation.statIncreases,this._onStatGained)),k===this._creatureInformation.creatureXpBarInformation.levels.length-2){const k=this.buildSpellLearnedPopupMessagesForCreatureLevelUp();B.push.apply(B,k)}return B}buildSpellLearnedPopupMessagesForCreatureLevelUp(){const k=[];for(const B of this._creatureInformation.unlockedSpellsDisplayInformation)k.push(Z.v4.spell(B,this._onSpellLearned));return k}playPopupMessageForPetChargedLevel(){if(!this._creatureInformation)return;const k=this._creatureInformation.creature.getBattleAssetSpecifier(),B=z.t.getItem(k.type,k.id),U=null==B?void 0:B.data,F=this._creatureInformation.creature.getLevel()+this._currentPlayer.getChargedLevel()-1,j=this._creatureInformation.creature.getLevel()+this._currentPlayer.getChargedLevel(),$=Y.e.getStatIncreasesFromLevelUps(U,F,j),H=Z.v4.battleStats($);this._levelUpPopupMessageManager.playPopupMessageAnimations(H).catch(G.RQr.createHandler("Failed to play level up popup message animations."))}playPopupMessagesForCreatureXpGain(){const k=[];this._currentPlayer.getLevel()>=tt.s.activePlayerLevelCap||(this._xpGained.totalNonMemberXp&&k.push({type:J.m0.Stat,statIncreaseAmount:this._xpGained.baseXp,atlasGuid:j._.Ui_postbattle_json,atlasFrameName:"small-levelup",showSignal:this._onXpGained}),this._currentPlayer.isMember()&&this._xpGained.memberXp&&k.push({type:J.m0.Stat,statIncreaseAmount:this._xpGained.memberXp,atlasGuid:j._.Ui_postbattle_json,atlasFrameName:"small-levelup-member",showSignal:this._onMemberXpGained}),k.length>0&&this._xpGainedPopupMessageManager.playPopupMessageAnimations(k).catch(G.RQr.createHandler("Failed to play wizard XP gained popup messages")))}destroy(){this._onXpGained.dispose(),this._onMemberXpGained.dispose(),this._onLevelUp.dispose(),this._onChargedLevelUp.dispose(),this._onSpellLearned.dispose(),this._onStatGained.dispose(),this._onStarsGained.dispose(),super.destroy()}enableEvolveButtonInput(k){this._xpBar.evolveButton.setButtonEnabled(k)}enableMergeButtonInput(k){this._xpBar.mergeButton.setButtonEnabled(k)}updateMergeBadgeRank(){var k;q.d.updateInjectedValues(this._xpBar.GameObject,{[W.hi.YourPetPanelPetMergeRank]:null!==(k=this._creatureInformation.creature.data.mergeRank)&&void 0!==k?k:0})}};(0,F.Cg)([(0,G.MnK)(et.B),(0,F.Sn)("design:type",et.B)],it.prototype,"_xpBar",void 0),(0,F.Cg)([(0,G.MnK)(X.g),(0,F.Sn)("design:type",X.g)],it.prototype,"_levelUpPopupMessageManager",void 0),(0,F.Cg)([(0,G.MnK)(X.g),(0,F.Sn)("design:type",X.g)],it.prototype,"_xpGainedPopupMessageManager",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],it.prototype,"_onXpGained",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],it.prototype,"_onMemberXpGained",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],it.prototype,"_onLevelUp",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],it.prototype,"_onChargedLevelUp",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],it.prototype,"_onSpellLearned",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],it.prototype,"_onStatGained",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],it.prototype,"_onStarsGained",void 0),(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",K.E)],it.prototype,"_currentPlayer",void 0),it=(0,F.Cg)([(0,G.EVk)("PostBattleFlowPartyMember",Q.Y.postBattleFlow)],it)},54234:(k,B,U)=>{"use strict";U.d(B,{I:()=>X});var F=U(8674),G=U(62459),j=U(83798),$=U(39596),H=U(1195),V=U(77938),W=U(28152),q=U(76277),K=U(53661),z=U(80060),Y=U(56718);const Q=["r-common","r-uncommon","r-rare","r-heroic","r-legendary"];let X=class extends G.uAl{constructor(){super(...arguments),this._displayRegular=!0,this._displayMember=!0,this._rewardScalingThresholds=[4],this._rewardScalingRowSpacings=[84],this._rewardScalingColumnSpacings=[104],this._rewardScalingValues=[.6],this._rewardScalingColumnAmounts=[4],this.onRewardsDisplayFilled=new G.HN0,this.onThresholdExceeded=new G.HN0}postCreate(){const k=Object.create(null,{postCreate:{get:()=>super.postCreate}});return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;if(k.postCreate.call(this),this._postBattleFlowData=this.getInjectedValue(K.uo.PostBattleFlowData),!this._postBattleFlowData)return;const G=this._loggedInPlayer.isMember();let H=(0,q.G)($.g)||!this._loggedInPlayer.player.isPlayingAtSchool()||G;const W=(0,q.G)(j.G);if(W.enabled&&H){const k=W.unlockLevel;H=this._player.getLevel()>=k}const X=Symbol();let Z=[];this._postBattleFlowData.rewards&&this._displayRegular&&(Z=Z.concat(this._postBattleFlowData.rewards)),this._postBattleFlowData.memberRewards&&this._displayMember&&H&&(Z=Z.concat(this._postBattleFlowData.memberRewards.map((k=>Object.assign(Object.assign({},k),{[X]:!G}))))),Z=Y.S.combineRewards(Z),this._gridLayout.GameObject.active=!1;const J=(yield Promise.all(Z.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return[k,yield V.t.secureGetItem(k.type,k.ID)]})))))).filter((([,k])=>null==k?void 0:k.data));for(const[k,{data:F}]of J){const G=null!==(B=k.N)&&void 0!==B?B:1,j=null!==(U=F.rarity)&&void 0!==U?U:0,$=Q[j],V=k[X],W=yield z.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._cardPrefabGuid,{[K.uo.PostBattleFlowRewardCardAssetId]:k.ID,[K.uo.PostBattleFlowRewardCardAssetType]:k.type,[K.uo.PostBattleFlowRewardCardFrame]:$,[K.uo.PostBattleFlowRewardCardMoreThanOneItem]:G>1,[K.uo.PostBattleFlowRewardCardAmountText]:`x${G}`,[K.uo.PostBattleFlowRewardCardMemberItem]:F.member&&!H,[K.uo.PostBattleFlowRewardCardIsLocked]:V||F.member&&H});if(Z.length>this._rewardScalingThresholds[0]){const k=this._rewardScalingThresholds.findIndex(((k,B)=>B===this._rewardScalingThresholds.length-1||Z.length>k&&Z.length<=this._rewardScalingThresholds[B+1]));this._gridLayout.setRowSpacing(this._rewardScalingRowSpacings[k]),this._gridLayout.setColumnSpacing(this._rewardScalingColumnSpacings[k]),this._gridLayout.setFixedColumnCount(this._rewardScalingColumnAmounts[k]),W.transform.setScale(this._rewardScalingValues[k]),this.onThresholdExceeded.dispatch()}if(!this._gridLayout.GameObject)return;this._gridLayout.GameObject.addChild(W)}this.onRewardsDisplayFilled.dispatch(),this._gridLayout.GameObject.active=!0}))}destroy(){this.onRewardsDisplayFilled.dispose(),this.onThresholdExceeded.dispose(),super.destroy()}};(0,F.Cg)([(0,G.MnK)(G.JTA),(0,F.Sn)("design:type",G.JTA)],X.prototype,"_gridLayout",void 0),(0,F.Cg)([(0,G.i0J)(G.Z$z.Prefab),(0,F.Sn)("design:type",String)],X.prototype,"_cardPrefabGuid",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],X.prototype,"_displayRegular",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],X.prototype,"_displayMember",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.g11)(),(0,F.Sn)("design:type",Array)],X.prototype,"_rewardScalingThresholds",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.g11)(),(0,F.Sn)("design:type",Array)],X.prototype,"_rewardScalingRowSpacings",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.g11)(),(0,F.Sn)("design:type",Array)],X.prototype,"_rewardScalingColumnSpacings",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.g11)(),(0,F.Sn)("design:type",Array)],X.prototype,"_rewardScalingValues",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.g11)(),(0,F.Sn)("design:type",Array)],X.prototype,"_rewardScalingColumnAmounts",void 0),(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",Object)],X.prototype,"_loggedInPlayer",void 0),(0,F.Cg)([(0,G.Cdj)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],X.prototype,"_prefabLoader",void 0),(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",H.E)],X.prototype,"_player",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],X.prototype,"onRewardsDisplayFilled",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],X.prototype,"onThresholdExceeded",void 0),X=(0,F.Cg)([(0,G.EVk)("PostBattleFlowRewardsDisplay",W.Y.postBattleFlow)],X)},50475:(k,B,U)=>{"use strict";U.d(B,{B:()=>J});var F,G=U(8674),j=U(62459),$=U(5491),H=U(35120),V=U(28152),W=U(26004),q=U(93171),K=U(19633),z=U(72379),Y=U(37773),Q=U(65732),X=U(97317),Z=U(55122);let J=F=class extends j.uAl{constructor(){super(...arguments),this.runOnSetup=!0,this.onSetup=new j.HN0,this.onLevelUp=new j.HN0,this.onChargedLevelUnlocked=new j.HN0,this.onBarCompletelyFinishedAnimating=new j.HN0,this.onPreviewBarReachLevelUp=new j.HN0,this._skipFakeAwardXp=!1}get _canShowChargedLevels(){var k;return(null===(k=this._creatureXpBarInformation)||void 0===k?void 0:k.creatureType)===$.V.Player}setup(k,B=10,U=!1,F=!1){const G=k.levels[0];this._creatureXpBarInformation=k,this._barFillSpeed=B,this.showPreviewBar=this.delayPreview=U,this.showChargedLevelUnlock=F,this.levelText.text=G.toString(),this.onSetup.dispatch(G,0);const j=Z.s.baseLevelRequiredForChargedLevels,$=this._creatureXpBarInformation.levels[0]>j;this._canShowChargedLevels&&this.showChargedLevelUnlock&&G<=j?this.showChargedLevelUnlockSequence():($&&this.showBarWithChargedLevels(),this.runOnSetup?this.fakeAwardXp():this._creatureXpBarInformation.levels[0]>=this._creatureXpBarInformation.maxLevel?(this.progressBar.setValue(1),this.showBarAtMaxLevel()):this.progressBar.setValue(this._creatureXpBarInformation.currentRelativeStars/this._creatureXpBarInformation.starsRequiredForEachLevel[0]))}drainXpBar(k){this._barFillSpeed=k>0?30:10,this.progressBar.setValue(1),this.progressBar.tweenValue(0),k<=0||this.progressBar.onComplete.addOnce((()=>{var B,U,F;const G=null!==(F=null===(U=null===(B=this._chargedLevelsProgressManager)||void 0===B?void 0:B.chargedLevelsProgressData)||void 0===U?void 0:U.chargedLevel)&&void 0!==F?F:0,j=this._creatureXpBarInformation.baseMaxLevel+G+(k-1);j>this._creatureXpBarInformation.maxLevel?this.showBarWithChargedLevels():this.showBarAtNonMaxLevel(),this.levelText.text=j.toString(),this.drainXpBar(k-1)}))}fakeAwardXp(k=!0,B){if(this._numTimesXpBarFilled=0,this._skipFakeAwardXp)return;k||this._creatureXpBarInformation.updateCreatureXpBarInformation(this._creatureXpBarInformation.currentCreatureStars+this._starsEarned,this._creatureXpBarInformation.creatureType,B),this._starsToAddToBar=this._starsEarned=this._creatureXpBarInformation.starsToAward;const U=this._creatureXpBarInformation.currentRelativeStars/this._creatureXpBarInformation.starsRequiredForEachLevel[0];this.previewProgressBar.setValue(U),this.progressBar.setValue(U),0===this._starsToAddToBar?(this._creatureXpBarInformation.levels[0]>=this._creatureXpBarInformation.maxLevel&&(this.progressBar.setValue(1),this.showBarAtMaxLevel()),this.showPreviewBar?this.showPreviewBar=!1:(this.progressBar.onComplete.dispatch(),this.onBarCompletelyFinishedAnimating.dispatch())):this.delayPreview||this.tweenBar(this._creatureXpBarInformation.currentRelativeStars)}tweenBar(k=0){if(this.previewProgressBar&&this.progressBar&&this.GameObject&&this._starsToAddToBar){let B=1,U=this._creatureXpBarInformation.starsRequiredForEachLevel[this._numTimesXpBarFilled],F=k+this._starsToAddToBar===this._creatureXpBarInformation.starsRequiredForEachLevel[this._numTimesXpBarFilled];k+this._starsToAddToBar{this.tweenBar(this._creatureXpBarInformation.currentRelativeStars)})),1===B&&G.onComplete.addOnce((()=>{if(this._canShowChargedLevels&&this.showChargedLevelUnlock&&$)this.showBarAtMaxLevel(),this.progressBar.setValue(1),this.onChargedLevelUnlocked.dispatch();else{const k=this._canShowChargedLevels&&this._creatureXpBarInformation.levels[this._numTimesXpBarFilled]>this._creatureXpBarInformation.maxLevel;this.onPreviewBarReachLevelUp.dispatch(k)}}))):(1===B&&G.onComplete.addOnce((()=>{this._canShowChargedLevels&&$?this.levelText.text=this._creatureXpBarInformation.maxLevel.toString():this.onLevelUp.dispatch(this._creatureXpBarInformation.levels[this._numTimesXpBarFilled+1],this._numTimesXpBarFilled)}),this),F&&G.onComplete.addOnce((()=>{this.onBarCompletelyFinishedAnimating.dispatch()}))),G.fillSpeedMS=0===this._numTimesXpBarFilled?Math.min((U-k)/this._barFillSpeed*1e3,3e3):Math.min((U-k)/this._barFillSpeed*1e3,1e3),G.tweenValue(B)}}resetXpBar(){if(0===this._numTimesXpBarFilled?this._starsToAddToBar-=this._creatureXpBarInformation.starsRequiredForEachLevel[this._numTimesXpBarFilled]-this._creatureXpBarInformation.currentRelativeStars:this._starsToAddToBar-=this._creatureXpBarInformation.starsRequiredForEachLevel[this._numTimesXpBarFilled],this._numTimesXpBarFilled++,this._numTimesXpBarFilled>=this._creatureXpBarInformation.levels.length)return void this.onBarCompletelyFinishedAnimating.dispatch();const k=this._creatureXpBarInformation.levels[this._numTimesXpBarFilled];if(this.levelText.text=k.toString(),k>=this._creatureXpBarInformation.maxLevel)this.showBarAtMaxLevel(),this.progressBar.setValue(1),this.onBarCompletelyFinishedAnimating.dispatch();else{(this._creatureXpBarInformation.levels[this._numTimesXpBarFilled]>Z.s.baseLevelRequiredForChargedLevels?this.showBarWithChargedLevels.bind(this):this.showBarAtNonMaxLevel.bind(this))(),this.progressBar.setValue(0),this.previewProgressBar.setValue(0),this.tweenBar()}}setXPBarToZero(){this.showBarAtNonMaxLevel(),this.progressBar.setValue(0)}showChargedLevelUnlockSequence(){this.showBarAtMaxLevel(),this.progressBar.setValue(1),this.onChargedLevelUnlocked.dispatch(),this._creatureXpBarInformation.levels.unshift(Z.s.baseLevelRequiredForChargedLevels),this._creatureXpBarInformation.starsRequiredForEachLevel.unshift(0),this._starsToAddToBar=this._starsEarned=this._creatureXpBarInformation.starsToAward,this._skipFakeAwardXp=!0}getChargedXpBarAnimations(){var k;const B=Y.e.getActivePlayerChargedLevelTier();return B===X.Bv.NO_CHARGE?null:null!==(k=F.CHARGED_LEVELS_TIER_ANIMATIONS[B])&&void 0!==k?k:null}playChargedTierUpgradeAnimations(k){var B;const U=this._creatureXpBarInformation.maxLevel,F=X.QT.MAX_NONMEMBER_CHARGED_LEVEL+U,G=X.QT.MAX_MEMBER_CHARGED_LEVEL+U;k!==F&&k!==G||(null===(B=this.gameObjectContext)||void 0===B||B.Container.rebind(Q.E.ShowTierUp).toConstantValue(!0),this.gameObject.findComponentsInChildren(W.B).forEach((k=>k.consume())))}showBarWithChargedLevels(){var k,B;this.progressBar.setFillColor("#A6FFFE"),this.previewProgressBar.setInnerColor("#5D8789"),this.previewProgressBar.setOuterColor("#612531"),this._maxLevelText.active=!1,null===(k=this.gameObjectContext)||void 0===k||k.Container.rebind(Q.E.ShowXpBar).toConstantValue(!0),null===(B=this.gameObjectContext)||void 0===B||B.Container.rebind(Q.E.LevelTierIdleAnimation).toConstantValue(this.getChargedXpBarAnimations()),this.gameObject.findComponentsInChildren(W.B).forEach((k=>k.consume()))}showBarAtMaxLevel(){this.progressBar.setFillColor("#A7E34E"),this.previewProgressBar.setInnerColor("#A7E34E"),this.previewProgressBar.setOuterColor("#2E573A"),this._maxLevelText.active=!0,this._canShowChargedLevels&&Y.e.getActivePlayerChargedLevelTier()===X.Bv.MAX_CHARGE&&(this._maxLevelText.findComponent(j.EYj).text=H.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MAX_CHARGE"))}showBarAtNonMaxLevel(k=!1){var B,U;this.progressBar.setFillColor("#F8CC38"),this.previewProgressBar.setInnerColor("#9D4539"),this.previewProgressBar.setOuterColor("#612531"),this._maxLevelText.active=!1,k||(null===(B=this.gameObjectContext)||void 0===B||B.Container.rebind(Q.E.ShowXpBar).toConstantValue(!1),null===(U=this.gameObjectContext)||void 0===U||U.Container.rebind(Q.E.LevelTierIdleAnimation).toConstantValue(X.Bv.NO_CHARGE),this.gameObject.findComponentsInChildren(W.B).forEach((k=>k.consume())))}destroy(){super.destroy(),this.onSetup.dispose(),this.onLevelUp.dispose(),this.onChargedLevelUnlocked.dispose(),this.onBarCompletelyFinishedAnimating.dispose(),this.onPreviewBarReachLevelUp.dispose()}};J.CHARGED_LEVELS_TIER_ANIMATIONS={[X.Bv.CHARGED]:"tier-2-idle",[X.Bv.MAX_CHARGE]:"tier-4-idle"},(0,G.Cg)([(0,j.Cdj)("62e-110e"),(0,G.Sn)("design:type",z.g)],J.prototype,"_chargedLevelsProgressManager",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],J.prototype,"runOnSetup",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],J.prototype,"levelText",void 0),(0,G.Cg)([(0,j.MnK)(q.a),(0,G.Sn)("design:type",q.a)],J.prototype,"progressBar",void 0),(0,G.Cg)([(0,j.MnK)(q.a),(0,G.Sn)("design:type",q.a)],J.prototype,"previewProgressBar",void 0),(0,G.Cg)([(0,j.MnK)(j.bE_),(0,G.Sn)("design:type",j.bE_)],J.prototype,"gameObjectContext",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],J.prototype,"onSetup",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],J.prototype,"onLevelUp",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],J.prototype,"onChargedLevelUnlocked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],J.prototype,"onBarCompletelyFinishedAnimating",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],J.prototype,"onPreviewBarReachLevelUp",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],J.prototype,"_maxLevelText",void 0),(0,G.Cg)([(0,j.MnK)(K.S),(0,G.Sn)("design:type",K.S)],J.prototype,"evolveButton",void 0),(0,G.Cg)([(0,j.MnK)(K.S),(0,G.Sn)("design:type",K.S)],J.prototype,"mergeButton",void 0),J=F=(0,G.Cg)([(0,j.EVk)("XpBar",V.Y.postBattleFlow)],J)},55346:(k,B,U)=>{"use strict";U.d(B,{fL:()=>gt});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(27842);let V=class extends G.uAl{constructor(){super(...arguments),this._lastPlayedMap=new Map,this._timesPlayedMap=new Map}playXpGain(){this.playSound(this._xpPlayer)}playMemberXpGain(){this.playSound(this._memberXpPlayer)}playXpParticleTrail(){this.playSound(this._xpParticleTrail)}playLevelUp(){this.playSound(this._levelUpPlayer)}playChargedLevelUp(){this.playSound(this._chargedLevelUpPlayer)}playChargedLevelUnlocked(){this.playSound(this._chargedLevelUnlocked)}playLevelUpCelebrationFanfare(){this.playSound(this._levelUpCelebrationFanfare)}playSpellLearned(){this.playSound(this._spellLearnedPlayer)}playStatGained(){this.playSound(this._statGainedPlayer)}playBarFilled(){this.playSoundSingular(this._barFillPlayer)}stopBarFilled(){this.stopSoundSingular(this._barFillPlayer)}playSound(k){const B=Date.now();B-(this._lastPlayedMap.has(k)?this._lastPlayedMap.get(k):0)>50&&(k.play(),this._lastPlayedMap.set(k,B))}playSoundSingular(k){k.isPlaying()||k.play();const B=this._timesPlayedMap.has(k)?this._timesPlayedMap.get(k):0;this._timesPlayedMap.set(k,B+1)}stopSoundSingular(k){if(!k.isPlaying())return void this._timesPlayedMap.set(k,0);const B=this._timesPlayedMap.has(k)?this._timesPlayedMap.get(k):0;B-1==0&&k.stop(),this._timesPlayedMap.set(k,B-1)}pauseBGM(){j.q.instance.prodigy.audio.pauseBGM()}resumeBGM(){j.q.instance.prodigy.audio.resumeBGM()}destroy(){this._lastPlayedMap.clear(),this._timesPlayedMap.clear(),super.destroy()}};(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_xpPlayer",void 0),(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_memberXpPlayer",void 0),(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_xpParticleTrail",void 0),(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_levelUpPlayer",void 0),(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_chargedLevelUpPlayer",void 0),(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_chargedLevelUnlocked",void 0),(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_levelUpCelebrationFanfare",void 0),(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_spellLearnedPlayer",void 0),(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_statGainedPlayer",void 0),(0,F.Cg)([(0,G.MnK)(H.J),(0,F.Sn)("design:type",H.J)],V.prototype,"_barFillPlayer",void 0),V=(0,F.Cg)([(0,G.EVk)("PostBattleFlowAudioController",$.Y.postBattleFlow)],V);U(59754),U(68788),U(81914),U(54234);var W=U(95057);let q=class extends G.uAl{create(){super.create(),this.pbfSegment=j.q.instance.prodigy.gameContainer.get("c47-20b6").postBattleFlow}sendButtonEvent(k,B){this.pbfSegment.sendButtonEvent(k,B)}sendChestOpenEvent(k){this.pbfSegment.sendChestOpenEvent(k)}sendChestFailedToOpenEvent(k,B){this.pbfSegment.sendChestFailedToOpenEvent(k,B)}sendStarJarFunnelStartEvent(){j.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:"NonMember-Star-Jar",category:"Star-Jar",contentId:this.pbfSegment.getBattleId(),adType:W.R.PostBattleBanner})}};q=(0,F.Cg)([(0,G.EVk)("PostBattleFlowSegment",G.YH6.ui)],q);var K=U(87490),z=U(99625),Y=U(50788),Q=U(49754),X=U(17446),Z=U(66582),J=U(77938),tt=U(96535),et=U(73797),it=U(53661),st=U(8770),nt=U(22023),at=U(80060),rt=U(44094),ot=U(30226),ht=U(91462),ct=U(76277),dt=U(10670),lt=U(71041),ut=U(53671),ft=U(50084),bt=U(86283),pt=U(43754),vt=U(99979);let gt=class extends G.uAl{get isRescued(){return this._isRescued}setup(k,B,U,F){this._petRescueUnitData=k,this._isRescued=k.battleStatus===K.EUnitBattleStatus.Rescued;const G=this._petRescueUnitData.cost;this._isFreeToRescue=void 0===G||0===G.value,this.setupPetInfo(),this._onPetRescued=U,this._rescuePetQueue=F,this.updateUI(),this.updateButtons(B),at.d.updateInjectedValues(this.GameObject,{[it.uo.PetRescued]:this._isRescued,[it.uo.EnableRescueButtonInput]:!this._isRescued})}setupPetInfo(){var k;const B=J.t.getItem("pet",this._petRescueUnitData.asset.id),U=vt.gI.getElementIconTexture(B.data.element);this._elementIcon.setTexture(U),this._petName.text=B.data.name;const F=null!==(k=B.data.rarity)&&void 0!==k?k:X.E.Common;this._petRarity.text=ot.J.convertRarityToText(F),this._petRarity.stroke=st.wB[F],this._newPetText.active=!bt.D.hasBeenRescuedPreviously(this._activePlayer,this._petRescueUnitData.asset.id),at.d.updateInjectedValues(this.GameObject,{PET_ID:B.ID})}updateUI(){const k=this._petRescueUnitData.cost;if(this._petRescuedFrontAnimation.active=this._isRescued,this._petRescuedBackAnimation.active=this._isRescued,this._rescuedAura.active=this._isRescued,this._magicoinRescueButton.amount=k?k.value:0,(0,ct.G)(Y.J)){this._mergeBarContainer.active=!0;const k=this._activePlayer.kennel.getPrimaryPetById(this._petRescueUnitData.asset.id);G.Aq$.isDefined(k)?this._mergeBar.setup(k,!0):this._mergeBar.setup({ID:this._petRescueUnitData.asset.id,level:this._petRescueUnitData.level},!0)}}updateButtons(k){at.d.updateInjectedValues(this.GameObject,{[it.uo.ShowFreeRescueButton]:this._isFreeToRescue,[it.uo.ShowMagicoinButton]:!this._isFreeToRescue&&!k,[it.uo.ShowMembershipButton]:!this._isFreeToRescue&&k})}rescueWithMagicoin(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this.performMagicoinRescue();this._rescuePetQueue&&(yield this._rescuePetQueue(k))}))}performMagicoinRescue(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._petRescueUnitData.cost;!k||this._hardCurrencyDataProvider.canAfford(k)?yield this.rescuePet(!1):this._activePlayer.canPurchaseMembershipInGame()?this.showInsufficientResourcePopup():j.q.instance.prodigy.open.messageBoxPrefab({text:"YOU_DONT_HAVE_ENOUGH_MAGICOIN",confirmCallback:()=>{this.setRescueButtonEnabled(!0)}})}))}rescuePet(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;const F=J.t.getItem("pet",this._petRescueUnitData.asset.id),$=rt.$.generateUID(),H=this._activePlayer.kennel.amountOfPet(F.ID),V=(0,ct.G)(Q.H),W={currency:27,value:V.magicoinCost};yield ft.a.rescuePet(k,{id:this._petRescueUnitData.asset.id,name:F.data.name,nickname:F.data.nickname,level:this._petRescueUnitData.level},$,V.enabled&&V.magicoinCost>0?W:void 0).catch((k=>{G.VyI.log("Failed to rescue pet",G.$bb.Error,k),this.sendPetCapturedFailedSegmentEvent("Rescue API Failed")})),j.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendBattlePetCapturedEvent({petName:null!==(B=this._petRescueUnitData.nickname)&&void 0!==B?B:F.data.name,petLevel:this._petRescueUnitData.level,petElement:F.data.element,petType:nt.P8.getPetEvolutionType(F.ID),petRarity:F.data.rarity,petRank:null!==(U=this._petRescueUnitData.mergeRank)&&void 0!==U?U:0,previousPetCopies:H,captureSource:dt.z2.PostBattle},{transaction_id:$}),this.updatePetRescuedUI()}))}updatePetRescuedUI(){this._isRescued=!0,this._onPetRescued(),at.d.updateInjectedValues(this.GameObject,{[it.uo.PetRescued]:!0})}openMembershipPage(){const k=this.gameObject.findComponentInParent(ht.M);if(k){j.q.instance.prodigy.game.broadcaster.addAppListener(et.H3.MembershipRewardsFlowComplete,this.handleMembershipRewardsFlowComplete,this),j.q.instance.prodigy.game.broadcaster.addAppListener(et.H3.MembershipResponseReceived,this.handleMembershipChange,this),k.onComplete.addOnce((()=>this.setRescueButtonEnabled(!0)));this._activePlayer.getMemberTier()===Z._$.NonMember?k.initiateMembershipPurchase():k.initiateMembershipPurchaseUpgradeWithIFrame().catch(G.RQr.createHandler("Failed to initiate membership upgrade purchase"))}else G.VyI.log("ProcessWebPurchaseComponent not found in parent hierarchy",G.$bb.Error)}showInsufficientResourcePopup(){var k,B,U,F;const G=J.t.getItem("pet",this._petRescueUnitData.asset.id);j.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:"Pet-Hard-Currency-Insufficient-Resources-Rescue",category:"Pet",contentId:`pet-${this._petRescueUnitData.asset.id}`,adType:W.R.Static});const $=this._baseLocalizer.getText("MAGICOIN");j.q.instance.prodigy.open.prefabMenu(z.l.EvolvedPet_InsufficientResources,void 0,void 0,void 0,void 0,{PET_RESCUE_ID:null==G?void 0:G.ID,PET_RESCUE_NAME:null===(k=null==G?void 0:G.data)||void 0===k?void 0:k.name,PET_RESCUE_RARITY:null===(B=null==G?void 0:G.data)||void 0===B?void 0:B.rarity,PET_RESCUE_LEVEL:null!==(F=null===(U=this._petRescueUnitData.level)||void 0===U?void 0:U.toString())&&void 0!==F?F:"Pet Name",[it.n7.InsufficientResource]:$}).onDestroy.addOnce((()=>{this.sendPetCapturedFailedSegmentEvent(`Insufficient ${$}`),this.setRescueButtonEnabled(!0)}))}sendPetCapturedFailedSegmentEvent(k){var B,U;const F=null===(B=J.t.getItem("pet",this._petRescueUnitData.asset.id))||void 0===B?void 0:B.data,G=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel;j.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendBattlePetCaptureFailedEvent({petName:null==F?void 0:F.name,petLevel:this._petRescueUnitData.level,petElement:null==F?void 0:F.element,petType:nt.P8.getPetEvolutionType(this._petRescueUnitData.asset.id),petRarity:null==F?void 0:F.rarity,petRank:null!==(U=this._petRescueUnitData.mergeRank)&&void 0!==U?U:0,failReason:k,previousPetCopies:G.amountOfPet(F.ID),captureSource:dt.z2.PostBattle})}handleMembershipChange(k){const B="success"===k;j.q.instance.prodigy.game.broadcaster.removeAppListener(et.H3.MembershipResponseReceived,this),B||j.q.instance.prodigy.game.broadcaster.removeAppListener(et.H3.MembershipRewardsFlowComplete,this)}handleMembershipRewardsFlowComplete(){return(0,F.sH)(this,void 0,void 0,(function*(){j.q.instance.prodigy.game.broadcaster.removeAppListener(et.H3.MembershipRewardsFlowComplete,this),yield this.rescuePet(!0),this.setRescueButtonEnabled(!1)}))}setRescueButtonEnabled(k){at.d.updateInjectedValues(this.gameObject,{[it.uo.EnableRescueButtonInput]:k})}destroy(){j.q.instance.prodigy.game.broadcaster.removeAppListener(et.H3.MembershipRewardsFlowComplete,this),j.q.instance.prodigy.game.broadcaster.removeAppListener(et.H3.MembershipResponseReceived,this)}};(0,F.Cg)([(0,G.Cdj)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],gt.prototype,"_baseLocalizer",void 0),(0,F.Cg)([(0,G.Cdj)("306-5359"),(0,F.Sn)("design:type",tt.W)],gt.prototype,"_activePlayer",void 0),(0,F.Cg)([(0,G.Cdj)("5c7-e02d"),(0,F.Sn)("design:type",pt.W)],gt.prototype,"_hardCurrencyDataProvider",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],gt.prototype,"_elementIcon",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],gt.prototype,"_petName",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],gt.prototype,"_mergeBarContainer",void 0),(0,F.Cg)([(0,G.MnK)(ut.J),(0,F.Sn)("design:type",ut.J)],gt.prototype,"_mergeBar",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],gt.prototype,"_petRarity",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],gt.prototype,"_newPetText",void 0),(0,F.Cg)([(0,G.MnK)(lt.Eo),(0,F.Sn)("design:type",lt.Eo)],gt.prototype,"_magicoinRescueButton",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],gt.prototype,"_rescuedAura",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],gt.prototype,"_petRescuedFrontAnimation",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],gt.prototype,"_petRescuedBackAnimation",void 0),gt=(0,F.Cg)([(0,G.EVk)("RescuablePet",$.Y.postBattleFlow)],gt);U(50475);var mt=U(36648),yt=U(34829);let _t=class extends G.uAl{constructor(){super(...arguments),this._source=mt.q.Xp_stardust,this._autoRun=!1,this.onStartParticles=new G.HN0,this.onStopParticles=new G.HN0}create(){super.create(),this._autoRun&&this.run()}run(k=!1){if(k){const k=j.q.instance.prodigy.game.time.events.loop(yt.s.TARGET_FPS_40_MS,this.gameObject.update,this.gameObject);this.gameObject.onDestroy.addOnce((()=>j.q.instance.prodigy.game.time.events.remove(k)))}const B=new G.Qgu,U=new G.mYY;U.point1.setTo(this._linePoint1.x,this._linePoint1.y),U.point2.setTo(this._linePoint2.x,this._linePoint2.y);const F=new G.ZxM;F.life.setMinMax(this._lifespan.x,this._lifespan.y),F.life.type=G.UvC.Random;const $=new G.U8B;this.particleTargetDirection?$.angle.setMinMax(this.getAngle()*G.cj9.RAD_TO_DEG,this.getAngle()*G.cj9.RAD_TO_DEG):$.angle.setMinMax(this._angle.x*G.cj9.RAD_TO_DEG,this._angle.y*G.cj9.RAD_TO_DEG),$.angle.type=G.UvC.PhasePerSample,$.speed.setMinMax(this._speed.x,this._speed.y);const H=new G.hQR;H.scale.setMinMax(this._scale.x,this._scale.y);const V=new G.m$y;V.endAlpha=this._alpha.x,V.startAtLifePercentage=this._alpha.y,j.q.instance.prodigy.load.assets([mt.q.Xp_stardust],(()=>{B.imageGuid=this._source,this._frame&&(B.frame=this._frame),this._particleSystem=this.gameObject.addComponent(G.okU),this._particleSystem.emitPerSecond.setMinMax(this._particlePerSecond,this._particlePerSecond),this._particleSystem.initializers=[B,U,F,$,H],this._particleSystem.behaviours=[V],this.onStartParticles.dispatch()}))}stopParticles(){var k,B;this._particleSystem&&(null===(B=null===(k=this._particleSystem)||void 0===k?void 0:k.emitPerSecond)||void 0===B||B.setMinMax(0,0),this.onStopParticles.dispatch())}getAngle(){const k=new G.I9Y(this.particleTargetDirection.transform.worldPosition.x,this.particleTargetDirection.transform.worldPosition.y);k.subtract(this.gameObject.transform.worldPosition),k.normalize();let B=Math.acos(k.y);return k.x<0&&(B*=-1),B}destroy(){var k;this.stopParticles(),null===(k=this._particleSystem)||void 0===k||k.destroy(),this._particleSystem=null,this.onStartParticles.dispose(),this.onStopParticles.dispose(),super.destroy()}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],_t.prototype,"particleTargetDirection",void 0),(0,F.Cg)([(0,G.Bak)(),(0,G.W_S)(),(0,F.Sn)("design:type",String)],_t.prototype,"_source",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],_t.prototype,"_frame",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],_t.prototype,"_particlePerSecond",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],_t.prototype,"_lifespan",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],_t.prototype,"_speed",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],_t.prototype,"_angle",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],_t.prototype,"_linePoint1",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],_t.prototype,"_linePoint2",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],_t.prototype,"_scale",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],_t.prototype,"_alpha",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],_t.prototype,"_autoRun",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],_t.prototype,"onStartParticles",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],_t.prototype,"onStopParticles",void 0),_t=(0,F.Cg)([(0,G.EVk)("XpParticleTrail",$.Y.postBattleFlow)],_t)},85773:(k,B,U)=>{"use strict";U.d(B,{b:()=>Q});var F=U(8674),G=U(87490),j=U(62459),$=U(82351),H=(U(34829),U(35757)),V=U(57502),W=U(13956),q=U(22023),K=U(30226);const z=JSON.parse('{"nootBattleTips":[{"dialogueId":1827,"showCriteria":"mergeAvailable"},{"dialogueId":1828,"showCriteria":"evolutionAvailable"},{"dialogueId":1829,"showCriteria":"elementalTypeWeakness"},{"dialogueId":1830},{"dialogueId":1831},{"dialogueId":1832},{"dialogueId":1833},{"dialogueId":1834},{"dialogueId":1835,"showCriteria":"schoolOnly"}]}');var Y;let Q=Y=class extends j.uAl{constructor(){super(...arguments),this._teamPets=[]}setup(k,B){this._teamPets=k,this._nootTipBattleInfo=B;const U=this.filterTips(this.processNootBattleTips()),F=Math.floor(Math.random()*U.length);this.assignTip(U[F])}processNootBattleTips(){return z.nootBattleTips.map((k=>({dialogueId:k.dialogueId,showCriteria:k.showCriteria})))}filterTips(k){return k.filter((k=>"mergeAvailable"===k.showCriteria?this._teamPets.some((k=>q.P8.canPetMerge(k.data))):"evolutionAvailable"===k.showCriteria?this._teamPets.some((k=>q.P8.canPetEvolve(k,k.getLevel()))):"schoolOnly"===k.showCriteria?K.J.isDateWithinSchoolDayAndHours():"elementalTypeWeakness"!==k.showCriteria||j.Aq$.isDefined(this._nootTipBattleInfo.enemyElementWeakness)))}assignTip(k){const B=(new H.u).get(k.dialogueId);"elementalTypeWeakness"===k.showCriteria?(this._textComponent.text=this._localizer.getText(B.textKey,this._nootTipBattleInfo.enemyElementWeakness),this._dialogueAudio={tag:Y.NOOT_VO_ELEMENTAL_WEAKNESS[this._nootTipBattleInfo.enemyElementWeakness]}):(this._textComponent.text=this._localizer.getText(B.textKey),this._dialogueAudio=B.audio)}playTipAudio(){this._playDialogueAudioComponent.playAudioData(this._dialogueAudio)}};Q.NOOT_VO_ELEMENTAL_WEAKNESS={[G.EElementType.Plant]:$.B.Voice_PostBattle_LossFlow_Noot_03_plant,[G.EElementType.Fire]:$.B.Voice_PostBattle_LossFlow_Noot_04_fire,[G.EElementType.Water]:$.B.Voice_PostBattle_LossFlow_Noot_05_water,[G.EElementType.Storm]:$.B.Voice_PostBattle_LossFlow_Noot_06_storm,[G.EElementType.Astral]:$.B.Voice_PostBattle_LossFlow_Noot_07_astral,[G.EElementType.Shadow]:$.B.Voice_PostBattle_LossFlow_Noot_08_shadow},(0,F.Cg)([(0,W.b)(j.$Bt.LocalizationService),(0,F.Sn)("design:type",j.dTp)],Q.prototype,"_localizer",void 0),(0,F.Cg)([(0,j.MnK)(j.EYj),(0,F.Sn)("design:type",j.EYj)],Q.prototype,"_textComponent",void 0),(0,F.Cg)([(0,j.MnK)(V.W),(0,F.Sn)("design:type",V.W)],Q.prototype,"_playDialogueAudioComponent",void 0),Q=Y=(0,F.Cg)([(0,j.EVk)("NootBattleTip")],Q)},56718:(k,B,U)=>{"use strict";U.d(B,{S:()=>W});var F=U(62459),G=U(77601),j=U(28628);const $=(0,G.gb)({key:"fab-post-loss-flow",activateAssociatedExperiments:0,default:!1}),H=[j.gu.Basic,j.gu.FireflyQ2Miniboss,j.gu.FireflyQ3Miniboss,j.gu.FireflyQ8TriptropTrio,j.gu.FireflyQ12Gerald,j.gu.SkywatchCloudMiniboss,j.gu.SkywatchCloudBoss,j.gu.SkywatchQ11Bitbots,j.gu.SkywatchQ6Swarm,j.gu.ShiverchillQ6Ghosts,j.gu.ShiverchillQ7IceWyrm,j.gu.ShiverchillQ13IceWyrm,j.gu.BonfireQ12Guardian,j.gu.BonfireQ13Cebollini,j.gu.ShipwreckQ11OldOne,j.gu.EndgamePippet,j.gu.EndGameGuardianFirefly,j.gu.EndGameGuardianShiverchill,j.gu.EndGameGuardianSkywatch,j.gu.EndGameGuardianBonfire,j.gu.EndGameGuardianShipwreck,j.gu.EndGamePuppetMaster];var V=U(76277);class W{static isPostLossFlowAvailable(k){return(0,V.G)($)&&H.includes(k)}static combineRewards(k){const B=[];return k.forEach((k=>{const U=B.findIndex((B=>F.Aq$.isDefined(null==k?void 0:k.N)&&B.type===k.type&&("gold"===k.type||B.ID===k.ID)));U>=0?B[U].N+=k.N:B.push(k)})),B}}},20117:(k,B,U)=>{"use strict";U.d(B,{tN:()=>F,w5:()=>H});var F,G,j=U(22023),$=U(77938);!function(k){k.PetInSlot="PET_IN_SLOT",k.ShowCta="SHOW_CTA",k.PetID="PET_ID",k.PetGear="PET_GEAR",k.CtaTipArgs="CTA_TIP_ARGS",k.CloseCTA="CLOSE_CTA",k.CloseAllCTAs="CLOSE_ALL_CTA",k.OnCtasCompleted="ON_CTAS_COMPLETED"}(F||(F={})),function(k){k.ButtonCallback="BUTTON_CALLBACK",k.ButtonText="BUTTON_TEXT",k.CurrentEvolution="CURRENT_PET_ASSET_ID",k.NextEvolution="NEXT_PET_ASSET_ID",k.CurrentLevelText="CURRENT_LEVEL",k.NextLevelText="NEXT_LEVEL",k.CurrentMergeRank="CURRENT_MERGE_RANK",k.NextMergeRank="NEXT_MERGE_RANK"}(G||(G={}));class H{static getMergeCtaArgs(k,B){const U=k.pet.data.mergeRank;return{type:0,buttonCallback:B.openMergeModal.bind(B,k),currentMergeRank:U,nextMergeRank:U+1}}static getEvolutionCtaArgs(k,B){const{pet:U}=k,F=$.t.getItem("pet",U.data.ID),G=j.P8.findNextEvolution(F);return{type:2,buttonCallback:B.openEvolutionMenu.bind(B,k),currentEvoID:F.ID,nextEvoID:G.ID}}static GetInjectionValuesForCtaTipContent(k){switch(k.type){case 0:return H.GetMergeCtaTipInjectionValues(k);case 2:return H.GetEvolveCtaTipInjectionValues(k);case 1:return H.GetLevelUpCtaTipInjectionValues(k);default:return{}}}static GetCtaTipButtonInjectionValues(k){return Object.assign(Object.assign({},k.buttonText&&{[G.ButtonText]:k.buttonText}),k.buttonCallback&&{[G.ButtonCallback]:k.buttonCallback})}static GetEvolveCtaTipInjectionValues(k){return Object.assign(Object.assign({},H.GetCtaTipButtonInjectionValues(k)),{[G.CurrentEvolution]:k.currentEvoID,[G.NextEvolution]:k.nextEvoID})}static GetMergeCtaTipInjectionValues(k){return Object.assign(Object.assign({},H.GetCtaTipButtonInjectionValues(k)),{[G.CurrentMergeRank]:k.currentMergeRank,[G.NextMergeRank]:k.nextMergeRank})}static GetLevelUpCtaTipInjectionValues(k){return Object.assign(Object.assign({},H.GetCtaTipButtonInjectionValues(k)),{[G.CurrentLevelText]:k.currentLevel,[G.NextLevelText]:k.nextLevel})}}},96217:(k,B,U)=>{"use strict";U.d(B,{Q:()=>et});var F,G=U(8674),j=U(62459),$=U(35120),H=U(1195),V=U(63834),W=U(73797),q=U(41674),K=U(13956),z=U(94236),Y=U(53661),Q=U(22023),X=U(80060),Z=U(11848),J=U(85773),tt=U(20117);!function(k){k.TryAgainCallback="TRY_AGAIN_CALLBACK",k.ContinueCallback="CONTINUE_CALLBACK",k.NootTipText="NOOT_TIP_TEXT",k.NootTipExtended="NOOT_TIP_EXTENDED"}(F||(F={}));let et=class extends j.uAl{constructor(){super(...arguments),this._teamSlotContainers=[],this._teamSlotPetCta=[],this._teamPets=[],this._canAccessMergeFeature=Q.P8.canPlayerAccessPetMergeFeature()&&Z.N.hasSeenPetMergeFTUE(),this._getCtaFunctions=new Map([[0,[k=>this._canAccessMergeFeature&&Q.P8.canPetAccessMergeRanks(k.data.ID)&&Q.P8.canPetMerge(k.data),k=>tt.w5.getMergeCtaArgs(k,this)]],[2,[k=>!!k&&Q.P8.canPetEvolve(k,k.getLevel()),k=>tt.w5.getEvolutionCtaArgs(k,this)]]])}postCreate(){super.postCreate(),$.q.instance.prodigy.game.broadcaster.addAppListener(W.ig.EvolveEnd,this.onPetEvolved,this)}setUpScreen(k){this._playerContainer.active=!0,this._hasOpenCTAs=!1,this._teamSlotContainers.forEach(((k,B)=>{this._teamSlotPetCta.push({index:B,container:k})})),this._teamPets=k.teamUids?k.teamUids.map((k=>new V.r($.q.instance.prodigy.game,this._loggedInPlayer.player.kennel.getPetByUniqueID(k)))):this._loggedInPlayer.player.kennel.getPetTeam(!1),this._nootTipBattleInfo=k.nootTipBattleInfo,this._nootBattleTipComponent.setup(this._teamPets,this._nootTipBattleInfo),this.updateTeamSlots(this._teamPets);const B=Object.assign(Object.assign(Object.assign({},this.getNootTipInjections(!this._hasOpenCTAs)),{[F.ContinueCallback]:k.continueCallback.bind(this)}),k.tryAgainCallback&&{[F.TryAgainCallback]:k.tryAgainCallback.bind(this)});X.d.updateInjectedValues(this.gameObject,B),this._nootBattleTipComponent.playTipAudio()}updateTeamSlots(k){this._teamSlotPetCta.forEach(((B,U)=>{const F=k[U];F&&(B.pet=F,this.updateTeamSlot(B))}))}updateTeamSlot(k){var B,U;const{pet:F,container:G}=k;if(!F)return;const j={contentArgs:[]};let $={[tt.tN.PetInSlot]:Q.P8.isPetOnTeam(F.data),[tt.tN.PetID]:F.data.ID,[tt.tN.PetGear]:F.data.gear,[tt.tN.OnCtasCompleted]:this.onAllCTAsComplete.bind(this),[Y.hi.SpinePetEvolveIdle]:Q.P8.canPetEvolve(F,F.getLevel())},H=!1;for(const[V,W]of this._getCtaFunctions){W[0](F)&&(H=!0,null!==(B=j.startingType)&&void 0!==B||(j.startingType=V),null===(U=j.contentArgs)||void 0===U||U.push(W[1](k)))}this._hasOpenCTAs||(this._hasOpenCTAs=H),$=Object.assign(Object.assign(Object.assign({},$),{[tt.tN.ShowCta]:H}),H&&{[tt.tN.CtaTipArgs]:j}),X.d.updateInjectedValues(G,$)}getNootTipInjections(k){return{[F.NootTipExtended]:k}}updateOrCloseCtaOfType(k,B,U){const[F,G]=this._getCtaFunctions.get(k),{pet:j,container:$}=B,H=F(j);let V=Object.assign({},U);if(H){const k={contentArgs:[G(B)]};V=Object.assign(Object.assign({},V),{[tt.tN.CtaTipArgs]:k}),this._hasOpenCTAs=!0}else V=Object.assign(Object.assign({},V),{[tt.tN.CloseCTA]:!1});X.d.updateInjectedValues($,V)}openMergeModal(k){$.q.instance.prodigy.open.petMergeMenu(k.pet.data,q.k.PostBattleLose).onPetMergeSuccess.addOnce((()=>this.onPetMerged(k)))}validateTeam(){const k=this._loggedInPlayer.player.kennel.getPetTeam(!1);this._teamSlotPetCta.forEach((B=>{const U=k.find((k=>{var U;return k.data.uniqueID===(null===(U=B.pet)||void 0===U?void 0:U.data.uniqueID)}));U?B.pet=U:(B.pet=void 0,X.d.updateInjectedValues(B.container,{[tt.tN.CloseAllCTAs]:!1,[tt.tN.PetInSlot]:!1}))})),this._teamPets=k}onPetMerged(k){this.validateTeam(),this.updateOrCloseCtaOfType(0,k)}openEvolutionMenu(k){z.K.openEvolutionPromptIfEligible(k.pet,null,!1,q.k.PostBattleLose).catch(j.RQr.createHandler("Failed to open evolution prompt"))}onPetEvolved(k){const B=this._teamSlotPetCta.find((B=>{var U;return(null===(U=B.pet)||void 0===U?void 0:U.data.uniqueID)===k}));B&&(this.validateTeam(),this.updateOrCloseCtaOfType(2,B),this._teamSlotPetCta.forEach((k=>{k.pet&&this.updateTeamSlot(k)})),X.d.updateInjectedValues(this.gameObject,this.getNootTipInjections(!this._hasOpenCTAs)))}onAllCTAsComplete(){this._hasOpenCTAs?this._hasOpenCTAs=!1:X.d.updateInjectedValues(this.gameObject,this.getNootTipInjections(!0))}destroy(){$.q.instance.prodigy.game.broadcaster.removeAppListener(W.ig.EvolveEnd,this),this._teamSlotContainers=[],this._teamSlotPetCta=[],super.destroy()}};(0,G.Cg)([(0,K.b)("e20-0fb0"),(0,G.Sn)("design:type",H.E)],et.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],et.prototype,"_teamSlotContainers",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_playerContainer",void 0),(0,G.Cg)([(0,j.MnK)(J.b),(0,G.Sn)("design:type",J.b)],et.prototype,"_nootBattleTipComponent",void 0),et=(0,G.Cg)([(0,j.EVk)("PostLossFlowUpgradeScreen")],et)},79368:(k,B,U)=>{"use strict";U.d(B,{k:()=>Pt});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U.n($),V=U(70472),W=U(6670),q=U(58776),K=U(62886),z=U(29891),Y=U(35120),Q=U(88355);class X extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B;setTimeout((()=>Y.q.instance.game.broadcaster.broadcast(`Prodigy.Events.${k.category}.${k.event}`)),null!==(B=k.timeout)&&void 0!==B?B:0)}))}}var Z=U(52191);class J extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){Y.q.instance.prodigy.game.input.enabled=k.enabled}))}}var tt=U(96165);class et extends tt.I{doTask(k){const B=Object.create(null,{doTask:{get:()=>super.doTask}});return(0,F.sH)(this,void 0,void 0,(function*(){const U=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=k.itemDrops.reduce(((k,B)=>{var F,j;if(!H().isNumber(B.ID)||!H().isString(B.type))return G.VyI.log("EnsureHasItemTaskHandler: Invalid item drop data",G.$bb.Warning),k;let $=null!==(F=B.N)&&void 0!==F?F:1;"key"===B.type&&$>1&&($=1);const V=$-(null!==(j=U.getItemCount(B.type,B.ID))&&void 0!==j?j:0);return V>0&&k.push(Object.assign(Object.assign({},B),{N:V})),k}),[]);if(0===F.length)return;const j=Object.assign(Object.assign({},k),{itemDrops:F});yield B.doTask.call(this,j)}))}}var it=U(97806),st=U(52269),nt=U(99625),at=U(80060);class rt extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){k.leaveNetworkZone&&Y.q.instance.prodigy.gameContainer.get("c97-bd0d").leaveZone(),yield at.d.loadWithInjectedValuesAndDependenciesFromGUID(Y.q.instance.prodigy.gameContainer.get("d0e-64fd"),k.guid,k.injectedValues).catch(G.RQr.createHandler(`[LoadPrefabCompleteHandler] Could not load prefab: ${nt.l[k.guid]}`))}))}}var ot=U(1195),ht=U(73797),ct=U(13956),dt=U(34616),lt=U(82271);class ut extends tt.I{doTask(k){const B=Object.create(null,{doTask:{get:()=>super.doTask}});return(0,F.sH)(this,void 0,void 0,(function*(){if(this._loggedInPlayer.isMember())return B.doTask.call(this,k);const U=Y.q.instance.prodigy.game;(yield this._memberJarNetworkHandler.getMemberJarData()).savedBattleCount>=dt.N.maximumSavedBattleCount?U.broadcaster.broadcast(ht.oI.ItemsLost,U,k.itemDrops):U.broadcaster.broadcast(ht.oI.ItemsSaved,U,k.itemDrops)}))}}(0,F.Cg)([(0,ct.b)("e20-0fb0"),(0,F.Sn)("design:type",ot.E)],ut.prototype,"_loggedInPlayer",void 0),(0,F.Cg)([(0,ct.b)("097-a053"),(0,F.Sn)("design:type",lt.S)],ut.prototype,"_memberJarNetworkHandler",void 0);class ft extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){return new Promise((B=>{var U,F,j,$;const H=Y.q.instance.prodigy.gameContainer.get("b5b-6fa4"),V=Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),W=V.getText(null!==(U=k.yesButtonLocalizationKey)&&void 0!==U?U:"BUTTON_OKAY_CAPITAL"),q=V.getText(null!==(F=k.noButtonLocalizationKey)&&void 0!==F?F:"NOT_NOW_CAPITAL"),K=Y.q.instance.prodigy.world;H.addEvents([{dialogueData:H.dataProvider.get(k.dialogueID),blockInput:!0,yes:K.it.bind(K,k.targetMapTag,null===(j=k.position)||void 0===j?void 0:j.x,null===($=k.position)||void 0===$?void 0:$.y),nextButtonText:q,yesButtonText:W,isCancelButtonVisible:!0}]),H.start(!0,B,k.reenableInputOnClose,k.clearExistingDialogue)}))}))}}var bt=U(61468),pt=U(43531);class vt extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){return new Promise((B=>{pt.rD.runDialogueSequence(bt.l.guaranteeArray(k.dialogueIDs),B,k.reenableInputOnClose,k.clearExistingDialogue)}))}))}}var gt=U(65240),mt=U(77938);class yt extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=Y.q.instance.prodigy.gameContainer.get("c47-20b6");for(const F of k.itemDrops){if(!F.ID){G.VyI.log(`ItemDrop ID is undefined for type: ${F.type}. Skipping removal.`,G.$bb.Error);continue}B.backpack.consume(F.type,F.ID,F.N);const j=mt.t.getItem(F.type,F.ID);U.item.sendItemRemovedEvent(j.ID,j.name,j.type,F.N,this.getCustomSegmentData(j,k.sourceType))}null==B||B.forceSaveCharacter()}))}getCustomSegmentData(k,B){const U={sink_type:gt.C.RemoveUnsecureItem,sink_id:k.ID,source_type:B};if(B===gt.C.FestivalCurrencyReset){const k=Y.q.instance.prodigy.gameContainer.get("12b-405a"),B=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily;U.instance_type=k.getActiveFestivalName()||"unknown festival",U.instance_id=B.getFestivalInstanceName()}return U}}class _t extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){Y.q.instance.prodigy.gameContainer.get("c47-20b6").sendCustomEvent(k.segmentEventType,k.segmentEventData)}))}}var Et=U(41674);class wt extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=Y.q.instance.prodigy.gameContainer.get("c47-20b6");if(k.funnelStepId){const U={funnelName:"player_goals",funnelType:"feature",stepName:k.stepName},F={step_index:k.funnelStepId};B.playerProgression.sendFunnelAdvancedEvent(U,F)}if(k.goalId){const U=k.goalName;B.economy.sendGoalAchievedEvent(U,k.goalId.toString(),Et.yO.Ftue,Et.ss.FtueGoals,!1)}}))}}class Tt extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield Y.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(k.eventType,k.eventData)}))}}class St extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){Y.q.instance.prodigy.notifications.initGenericNotification(k.notificationType)}))}}var At=U(34454);class Ct extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=new G._mx;At.w.startTaskCompleteDialogue(B,k.petID,this._questID)}))}}class Ot extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=Y.q.instance.prodigy.world;if(B.getCurrentMap()===k.targetMapTag&&!k.allowSameMapWarp)return;const U=new Promise((U=>{var F,G;B.it(k.targetMapTag,null===(F=k.position)||void 0===F?void 0:F.x,null===(G=k.position)||void 0===G?void 0:G.y,void 0,{shutdownLoadState:!1,callback:()=>{U()}})}));k.awaitLoad&&(yield U,k.loadTimeout&&(k.disablePopups&&Y.q.instance.prodigy.notifications.pause(this),Y.q.instance.prodigy.game.input.enabled=!1,yield new Promise((B=>setTimeout(B,k.loadTimeout))),Y.q.instance.prodigy.game.input.enabled=!0,k.disablePopups&&Y.q.instance.prodigy.notifications.resume(this)))}))}}class It extends Q.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B;yield Y.q.instance.prodigy.gameContainer.get("7a1-ff33").queueStoreOfferTrigger(k.offerId,null!==(B=k.instantTrigger)&&void 0!==B&&B)}))}}const Dt={[z.s.COMPLETE_TUTORIAL]:Z.G,[z.s.GOT_ITEM]:tt.I,[z.s.ENSURE_ITEM]:et,[z.s.GOT_PET]:st.uu,[z.s.MEMBER_JAR_GOT_ITEM]:ut,[z.s.GIVE_ULTIMATE]:it.N,[z.s.LOAD_PREFAB]:rt,[z.s.ENABLE_INPUT]:J,[z.s.OFFER_TELEPORT]:ft,[z.s.PLAY_DIALOGUE]:vt,[z.s.SHOW_COLLECTED_ITEM]:Ct,[z.s.SEND_PLAYER_GOALS_SEGMENT_EVENT]:wt,[z.s.SEND_CUSTOM_SEGMENT_EVENT]:_t,[z.s.SEND_TOASTER_NOTIFICATION]:St,[z.s.REMOVE_UNSECURE_ITEM]:yt,[z.s.TELEPORT_TO_MAP]:Ot,[z.s.TRIGGER_STORE_OFFER]:It,[z.s.SEND_QUEST_EVENT_VIA_HUB]:Tt,[z.s.BROADCAST]:X};var Rt=U(56567);let Pt=class{constructor(){this.onQuestTaskStart=new G.HN0,this.onQuestTaskComplete=new G.HN0,this._getProgressDirty=!1,this._tags=[]}setup(){return(0,F.sH)(this,void 0,void 0,(function*(){}))}getQuestData(k){return(0,F.sH)(this,void 0,void 0,(function*(){const{active:B,inactive:U}=yield this.fetchQuestData();return B.has(k)||U.has(k)?B.get(k)||U.get(k):(G.VyI.log(`Tried getting quest data for quest ${k} but it doesn't exist.`,G.$bb.Warning),null)}))}forceEnableDataUpdate(){this._getDataPromise=null}fetchQuestData(){return(0,F.sH)(this,void 0,void 0,(function*(){if(G.Aq$.isDefined(this._getDataPromise))return this._getDataPromise;const k={tags:this._tags};return this._getDataPromise=new Promise(((B,U)=>{this._questNetworkHandler.getQuestData(k).then((k=>{const U=new Map,F=new Map;k.activeQuests.forEach((k=>{U.set(k.id,k)})),k.inactiveQuests.forEach((k=>{F.set(k.id,k)})),B({active:U,inactive:F})})).catch((k=>{this.forceEnableDataUpdate(),U(new Error(k))}))})),this._getDataPromise}))}getQuestProgress(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.getQuestData(k);if(!B)return G.VyI.log(`No quest progress available for ${k} because the quest data doesn't exist.`,G.$bb.Warning),null;const{active:U,inactive:F}=yield this.fetchQuestProgress(),j=U.get(k)||F.get(k);return(yield W.f.preprocessQuestProgress(B,j)).fullProgress}))}getRawQuestProgress(k){return(0,F.sH)(this,void 0,void 0,(function*(){const{active:B,inactive:U}=yield this.fetchQuestProgress();return B.get(k)||U.get(k)||null}))}preloadQuestProgress(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.fetchQuestProgress()}))}questProgressHasBeenLoaded(){return G.Aq$.isDefined(this._getProgressPromise)}fetchQuestProgress(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._getProgressDirty&&G.Aq$.isDefined(this._getProgressPromise))return this._getProgressPromise;const k=!G.Aq$.isDefined(this._getProgressPromise),B={tags:this._tags};return this._getProgressPromise=new Promise(((U,F)=>{this._questNetworkHandler.getQuestProgress(B).then((B=>{this._getProgressDirty=!1;const F=new Map,j=new Map;B.activeQuests.forEach((k=>{F.set(k.id,k)})),B.inactiveQuests.forEach((k=>{j.set(k.id,k)})),U({active:F,inactive:j}),k&&this.sendQuestEvent(K.T.NONE,{}).catch(G.RQr.createHandler(`Error sending NONE quest event. ${JSON.stringify(this._tags)}`))})).catch((k=>{this._getProgressDirty=!0,F(new Error(k))}))})),this._getProgressPromise}))}processQuestProgressResponse(k){return(0,F.sH)(this,arguments,void 0,(function*(k,B={}){var U,F,j,$,H,V,K,z,Y,Q,X;const{active:Z,inactive:J}=yield this.fetchQuestProgress();for(const tt of k.activeQuests){if((null===(U=Z.get(tt.id))||void 0===U?void 0:U.status)===q.t.COMPLETE)continue;const k=yield this.getQuestData(tt.id);if(!G.Aq$.isDefined(k))continue;const J=null!==(j=null===(F=Z.get(tt.id))||void 0===F?void 0:F.tasks)&&void 0!==j?j:[],et=new Set,it=new Map,st=[];J.forEach((B=>{var U;if(B.status===q.t.COMPLETE){et.add(B.id);const F=k.tasks.find((k=>k.id===B.id));(null===(U=null==F?void 0:F.metadata)||void 0===U?void 0:U.isExperimentGate)&&st.push(B.id)}it.set(B.id,B)}));const nt={};if(tt.status!==q.t.COMPLETE&&tt.tasks)for(const B of tt.tasks)if(B.status!==q.t.COMPLETE&&(null===($=B.data)||void 0===$?void 0:$.timesCompleted)>0){const k=it.get(B.id);(null!==(V=null===(H=null==k?void 0:k.data)||void 0===H?void 0:H.timesCompleted)&&void 0!==V?V:0)<(null===(K=B.data)||void 0===K?void 0:K.timesCompleted)&&(nt[B.id]=(null===(z=B.data)||void 0===z?void 0:z.timesCompleted)-(null!==(Q=null===(Y=null==k?void 0:k.data)||void 0===Y?void 0:Y.timesCompleted)&&void 0!==Q?Q:0))}for(const U of k.tasks){if(!U)continue;if(et.has(U.id))continue;const F=U.id;let j=0,$=[];if(nt[F]?j=nt[F]:tt.status===q.t.COMPLETE?j=1:($=W.f.getTasksOfStatus(tt.tasks,q.t.COMPLETE),$.includes(F)&&(j=1)),j>0){if(U.metadata&&(U.metadata.parentCompleted=tt.status===q.t.COMPLETE),!J[U.id]||W.f.shouldProcessOnCompleteHandlers(J[U.id]))for(let k=0;kW.f.isPrerequisiteValid(B,k,st,U))).every((k=>$.includes(k)))&&this.onQuestTaskStart.dispatch(U)}Z.set(tt.id,tt)}for(const G of k.inactiveQuests)J.set(G.id,G)}))}getQuestTasks(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.getQuestData(k);if(null===B)return[];const U=yield this.getQuestProgress(k),F=[];if(null==U?void 0:U.tasks)for(const G of B.tasks)for(const B of U.tasks)if(B.id===G.id){F.push(new V.A(k,G,B));break}return F}))}getTasksInProgress(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){var F;const G=yield this.fetchQuestData();let j=[];const $=null!=B?B:Array.from(G.active.keys());for(const B of $){const $=null!==(F=G.active.get(B))&&void 0!==F?F:G.inactive.get(B);if((null==k?void 0:k.length)>0&&!this.questDataHasTags($,k))continue;const H=yield this.getQuestProgress(B),V=yield W.f.getTasksInProgress($,H,new Rt.f(null==U?void 0:U.params));j=j.concat(V)}return j}))}isTaskInProgress(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.getTasksInProgress(void 0,[k])).some((k=>k.taskID===B))}))}isTaskCompleted(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){var F,G,j;const $=yield this.getQuestProgress(k),H=null===(F=null==$?void 0:$.tasks)||void 0===F?void 0:F.find((k=>k.id===B)),V=(null==H?void 0:H.status)===q.t.COMPLETE,W=!!U&&(null!==(j=null===(G=null==H?void 0:H.data)||void 0===G?void 0:G.timesCompleted)&&void 0!==j?j:0)>0;return V||W}))}getQuestStatus(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B;const U=yield this.getQuestProgress(k);return null!==(B=null==U?void 0:U.status)&&void 0!==B?B:null}))}getOverallProgress(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.fetchQuestData(),B=[],U=Array.from(k.active.keys()).concat(Array.from(k.inactive.keys()));for(const F of U)B.push(yield this.getQuestProgress(F));return B}))}sendQuestEvent(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=this._segment.quests.beginQuestEventTransaction();try{if((yield this.shouldSendQuestEvents([k],B,U)).some((B=>B===k))){this._sendQuestEventPromise=this._questNetworkHandler.sendQuestEvent({eventType:k,eventData:B,questIDs:U,tags:this._tags});const F=yield this._sendQuestEventPromise;return yield this.processQuestProgressResponse(F),F}return{activeQuests:[],inactiveQuests:[]}}finally{F.flush({})}}))}preSendQuestEventViaHub(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){if((yield this.shouldSendQuestEvents([k],B)).some((B=>B===k))){const k=this.getCurrentQuestID();return{manager:this,questIDs:void 0!==k?[k]:yield this.getAllActiveQuestIDs(),tags:this._tags}}return{manager:this,questIDs:[],tags:[]}}))}postSendQuestEventViaHub(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){k&&(yield this.processQuestProgressResponse(k))}))}shouldSendQuestEvents(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=yield this.getTasksInProgress(void 0,void 0,B),G=[];for(const j of k)F.some((k=>!(Array.isArray(U)&&U.length>0&&!U.includes(k.questID))&&k.shouldSendEvent(j,B)))&&G.push(j);return G}))}getQuestMetaData(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.getQuestData(k);return null==B?void 0:B.metadata}))}updateQuestProgress(k){return(0,F.sH)(this,void 0,void 0,(function*(){try{const B=k?{questIDs:[k],tags:this._tags}:{tags:this._tags},U=yield this._questNetworkHandler.getQuestProgress(B);(U.activeQuests.length>0||U.inactiveQuests.length>0)&&(yield this.processQuestProgressResponse(U))}catch(B){throw this._getProgressDirty=!0,B}}))}getQuestIDsFromItem(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=yield this.getTasksInProgress(),F=[];return U.forEach((U=>{U.taskDefinition.completionRequirements.type===K.T.COLLECT_ITEM&&U.taskDefinition.completionRequirements.data.id===k&&U.taskDefinition.completionRequirements.data.type===B&&F.push(U.questID)})),F}))}getAllActiveQuestIDs(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.fetchQuestData();return this.getQuestIDsFromQuestData(B.active,k)}))}getAllInactiveQuestIDs(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.fetchQuestData();return this.getQuestIDsFromQuestData(B.inactive,k)}))}setupValidTasks(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=new G.bnh,F=G.wa5.getActiveScene().container.get(G.$Zn.PopupHandler);null==F||F.delayPopupsUntil(U),yield this._sendQuestEventPromise;const j=yield this.getTasksInProgress(k,B),$=[];j.forEach((k=>{k.onSetupTasks.filter((k=>Dt[k.type]&&(!k.featureRequirements||this._featureRequirements.meetsRequirementsDeprecated(k.featureRequirements)))).forEach((B=>{$.push(new Dt[B.type](k.questID,k.taskID).doTask(B.data).catch(G.RQr.createHandler(`Error performing onSetup task handler. ${B.type}`)))}))})),yield Promise.all($),U.resolve()}))}beginAllAvailableQuests(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=(yield this.getTasksInProgress(k)).filter((k=>0===k.taskDefinition.prerequisites.length&&k.taskProgress.status!==q.t.COMPLETE));for(const k of B)yield this.sendQuestEvent(k.type,Object.assign({},k.taskDefinition.completionRequirements.data),[k.questID])}))}questDataHasTags(k,B){return H().intersection(B,k.tags).length>0}getQuestIDsFromQuestData(k,B){return(null==B?void 0:B.length)>0?Array.from(k.values()).filter((k=>this.questDataHasTags(k,B))).map((k=>k.id)):Array.from(k.keys())}getCurrentQuestID(){}cleanup(){this.onQuestTaskStart.dispose(),this.onQuestTaskComplete.dispose()}reenter(){}getTags(){return this._tags}getQuestObjectStates(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.getQuestData(k);return null==B?void 0:B.states}))}isCutsceneTaskInProgress(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return yield this._sendQuestEventPromise,(yield this.getTasksInProgress(k,B)).some((k=>k.taskDefinition.isCutscene))}))}};(0,F.Cg)([(0,j.inject)("a6a-6157"),(0,F.Sn)("design:type",Object)],Pt.prototype,"_questNetworkHandler",void 0),(0,F.Cg)([(0,j.inject)("db5-fb6e"),(0,F.Sn)("design:type",Object)],Pt.prototype,"_featureRequirements",void 0),(0,F.Cg)([(0,j.inject)("c47-20b6"),(0,F.Sn)("design:type",Function)],Pt.prototype,"_segment",void 0),Pt=(0,F.Cg)([(0,j.injectable)()],Pt)},63536:(k,B,U)=>{"use strict";U.d(B,{$:()=>V});var F=U(8674),G=U(79687),j=U(48417),$=U(76546),H=U(45918);let V=class extends $.D{getQuestData(){return(0,F.sH)(this,arguments,void 0,(function*(k={}){return this.makeCloudscriptRequest(j.D.Quests.GetQuestData,k,!1)}))}getQuestProgress(){return(0,F.sH)(this,arguments,void 0,(function*(k={}){return this.makeCloudscriptRequest(j.D.Quests.GetQuestProgress,k,!1)}))}setQuestProgressTimestamp(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Quests.SetQuestTaskProgressTimestamp,k,!1)}))}sendQuestEvent(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Quests.SendQuestEvent,k,!1)}))}debugSetFtueQuestComplete(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Debug.ForceCompleteFtueQuest,{questIds:[H.M.FTUE]},!1)}))}};V=(0,F.Cg)([(0,G.injectable)()],V)},52437:(k,B,U)=>{"use strict";U.d(B,{$:()=>z});var F=U(8674),G=U(62459),j=U(65240),$=U(35120),H=U(1195),V=U(28152),W=U(85604),q=U(43531),K=U(23082);let z=class extends G.uAl{constructor(){super(...arguments),this._questNPCName=W.y.Flora,this._screen=null,this._dialogueController=null}create(){var k;super.create(),this._screen=$.q.instance.game.state.get(K.G.TileScreen),null===(k=this._screen.events)||void 0===k||k.push(this)}process(k,B,U){this._dialogueController&&this._dialogueController.close();const F=this._playerDataProvider.player,H=null!=k?k:$.q.instance.prodigy.world.getZone($.q.instance.prodigy.world.getCurrentZone());if(!F.isZoneQuestEnabled)return;if(this._dialogueController=new q.rD($.q.instance.game),!G.Aq$.isDefined(H.getQuestState()))return H.startQuest(1).onQuestEventDialogue("onStart"),this.queueEventText(H,"onStart",1),this._dialogueController.addEvents([{callback:()=>{this._screen.process()}}]),void this._dialogueController.start();const V=H.getQuestState().ID,W=H.getQuest(V);if(H.isQuestComplete(V)&&!W.chain)this.queueEventText(H,"onComplete",V),W.onQuestEventDialogue("onComplete"),this._dialogueController.addEvents([{callback:()=>{F.saveEnabled=!1,W.end(),G.Aq$.isDefined(W.reward)&&W.reward.length>0?(H.completeQuest(V),$.q.instance.prodigy.open.gotItem(W.reward,(()=>{F.saveEnabled=!0,this._screen.process()}),null,"advanced-quest-event-reward",null,null,{source_type:j.C.QuestReward})):(H.completeQuest(V),F.saveEnabled=!0,this._screen.process())}}]),this._dialogueController.start();else if(!H.isQuestStarted(V)&&G.Aq$.isDefined(W))this.queueEventText(H,"onStart",V),W.onQuestEventDialogue("onStart"),this._dialogueController.addEvents([{callback:()=>{H.startQuest(V),this._screen.process()}}]),this._dialogueController.start();else if(U&&G.Aq$.isDefined(W))this.queueEventText(H,"onStart",V),W.onQuestEventDialogue("onStart"),this._dialogueController.start();else if(U){const k=$.q.instance.prodigy.event.create();k.text(39,this._questNPCName),k.start()}}queueEventText(k,B,U){const F=k.getQuest(U);if(G.Aq$.isDefined(F[B]))for(let G=0;G{"use strict";U.d(B,{G:()=>W});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(73678);const W={id:`quest-${G.t.BonfireSpireHard}`,tags:[G.t.LocalZoneQuests,G.t.BonfireSpireHard],metadata:{zoneId:V.A_.BONFIREHARD},tasks:[{id:"1-0",prerequisites:[],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-introduction`}},metadata:{locations:[`${V.A_.BONFIREHARD}-B1`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-lever1-off`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[515,516]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_PULL_LEVER",metadata:{locations:[`${V.A_.BONFIREHARD}-D1`]}},{id:"2-0",prerequisites:["1-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-lever2-off`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[517,518]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_PULL_LEVER",metadata:{locations:[`${V.A_.BONFIREHARD}-C2`]}},{id:"3-0",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-lever3-off`}},localizationKey:"QUESTS_BONFIRE_SPIRE_PULL_LEVER",metadata:{locations:[`${V.A_.BONFIREHARD}-D4`]}},{id:"3-1",prerequisites:["3-0"],completionRequirements:{type:j.T.NONE,data:{}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[519,520,521]}}}],localizationKey:"",metadata:{locations:[]}},{id:"4-0",prerequisites:["3-1"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:88,target:1}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[522,523]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_COLLECT_RAISINS",metadata:{locations:[`${V.A_.BONFIREHARD}-C3`]}},{id:"5-0",prerequisites:["4-0"],completionRequirements:{type:j.T.BUTTON_CLICK,data:{id:`${V.A_.BONFIRE}-ingredient-added`}},localizationKey:"QUESTS_BONFIRE_SPIRE_ADD_INGREDIENT",metadata:{locations:[`${V.A_.BONFIREHARD}-E6`]}},{id:"5-1",prerequisites:["5-0"],completionRequirements:{type:j.T.NONE,data:{}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[524,525]}}}],localizationKey:"",metadata:{locations:[]}},{id:"6-0",prerequisites:["5-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-Q6-attend-dinner`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[526,527,528,529,530]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_ATTEND_DINNER",metadata:{locations:[`${V.A_.BONFIREHARD}-D5`]}},{id:"7-0",prerequisites:["6-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:89,target:3}},localizationKey:"QUESTS_BONFIRE_SPIRE_COLLECT_COOKING_TOOLS",metadata:{locations:[{location:`${V.A_.BONFIREHARD}-D4`,disallowedStates:{"quest-state-2":1}},{location:`${V.A_.BONFIREHARD}-C2`,disallowedStates:{"quest-state-1":1}},{location:`${V.A_.BONFIREHARD}-D1`,disallowedStates:{"quest-state-0":1}}]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:j.T.NONE,data:{}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[531,532,533]}}}],localizationKey:"",metadata:{locations:[]}},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-Q8-guards`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[534,535]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_TALK_TO_GUARDS",metadata:{locations:[`${V.A_.BONFIREHARD}-C6`]}},{id:"9-0",prerequisites:["8-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:90,target:2}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"item",ID:91,N:1}],additionalDialogueIds:{succeedingDialogue:[536,537]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_SAVE_GATHERERS",metadata:{locations:[`${V.A_.BONFIREHARD}-A4`]}},{id:"10-0",prerequisites:["9-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-Q10-food-stolen`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[538,539,540,541,542,543]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_OFFER_DISH",metadata:{locations:[`${V.A_.BONFIREHARD}-C6`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[92]}}],data:{}},localizationKey:"QUESTS_BONFIRE_SPIRE_FIND_KEY",metadata:{locations:[`${V.A_.BONFIREHARD}-C4`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-Q11-received-strong-fire-relic`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"item",ID:92,N:1}],additionalDialogueIds:{succeedingDialogue:[544,545,546]},isFake:!0}}],metadata:{locations:[`${V.A_.BONFIREHARD}-C4`]}},{id:"12-0",prerequisites:["11-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.BonfireQ12Guardian}},localizationKey:"QUESTS_BONFIRE_SPIRE_UNLOCK_CHEST",metadata:{locations:[`${V.A_.BONFIREHARD}-A4`]}},{id:"12-1",prerequisites:["12-0"],completionRequirements:{type:j.T.OPEN_CHEST,data:{id:`${V.A_.BONFIREHARD}-chestGuardian`}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[547,548,549]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_UNLOCK_CHEST",metadata:{locations:[`${V.A_.BONFIREHARD}-A4`]}},{id:"13-0",prerequisites:["12-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.BonfireQ13Cebollini}},localizationKey:"QUESTS_BONFIRE_SPIRE_DEFEAT_CHEF",metadata:{locations:[`${V.A_.BONFIREHARD}-D6`]}},{id:"13-1",prerequisites:["13-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-Q13-post-battle`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[550,551]}}}],metadata:{locations:[`${V.A_.BONFIREHARD}-D6`]}},{id:"14-0",prerequisites:["13-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.BONFIRE}-Q14-attend-dinner`}},localizationKey:"QUESTS_BONFIRE_SPIRE_TALK_TO_QUEEN",metadata:{locations:[`${V.A_.BONFIREHARD}-D5`]}},{id:"14-1",prerequisites:["14-0"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"slurpy"}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"key",ID:11}],additionalDialogueIds:{precedingDialogue:[554,555,556],succeedingDialogue:[557]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_TALK_TO_SLURPY",metadata:{locations:[`${V.A_.BONFIREHARD}-B1`]}}]}},63674:(k,B,U)=>{"use strict";U.d(B,{K:()=>q});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(24522),W=U(73678);const q={id:`quest-${G.t.BonfireSpire}`,tags:[G.t.LocalZoneQuests,G.t.BonfireSpire],metadata:{zoneId:W.A_.BONFIRE},tasks:[{id:"0-0",prerequisites:[],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.BONFIRE}-B1`}},preconditions:[{type:V.n.IS_IN_ZONE,data:{zone:[W.A_.BONFIRE]}}],metadata:{locations:[]}},{id:"1-0",prerequisites:["0-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-introduction`}},onComplete:[{type:$.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:j.T.BUTTON_CLICK,eventData:{id:`${W.A_.BONFIRE}-introduction`}}}],metadata:{locations:[`${W.A_.BONFIRE}-B1`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-lever1-off`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[515,516]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_PULL_LEVER",metadata:{locations:[`${W.A_.BONFIRE}-D1`]}},{id:"2-0",prerequisites:["1-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-lever2-off`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[517,518]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_PULL_LEVER",metadata:{locations:[`${W.A_.BONFIRE}-C2`]}},{id:"3-0",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-lever3-off`}},localizationKey:"QUESTS_BONFIRE_SPIRE_PULL_LEVER",metadata:{locations:[`${W.A_.BONFIRE}-D4`]}},{id:"3-1",prerequisites:["3-0"],completionRequirements:{type:j.T.NONE,data:{}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"hat",ID:65}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[519,520,521]}}}],localizationKey:"",metadata:{locations:[]}},{id:"4-0",prerequisites:["3-1"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:88,target:1}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{succeedingDialogue:[522,523]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_COLLECT_RAISINS",metadata:{locations:[`${W.A_.BONFIRE}-C3`]}},{id:"5-0",prerequisites:["4-0"],completionRequirements:{type:j.T.BUTTON_CLICK,data:{id:`${W.A_.BONFIRE}-ingredient-added`}},localizationKey:"QUESTS_BONFIRE_SPIRE_ADD_INGREDIENT",metadata:{locations:[`${W.A_.BONFIRE}-E6`]}},{id:"5-1",prerequisites:["5-0"],completionRequirements:{type:j.T.NONE,data:{}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:1}],additionalDialogueIds:{precedingDialogue:[509,510],succeedingDialogue:[524,525]}}}],localizationKey:"",metadata:{locations:[]}},{id:"6-0",prerequisites:["5-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-Q6-attend-dinner`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[526,527,528,529,530]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_ATTEND_DINNER",metadata:{locations:[`${W.A_.BONFIRE}-D5`]}},{id:"7-0",prerequisites:["6-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:89,target:3}},localizationKey:"QUESTS_BONFIRE_SPIRE_COLLECT_COOKING_TOOLS",metadata:{locations:[{location:`${W.A_.BONFIRE}-D4`,disallowedStates:{"quest-state-2":1}},{location:`${W.A_.BONFIRE}-C2`,disallowedStates:{"quest-state-1":1}},{location:`${W.A_.BONFIRE}-D1`,disallowedStates:{"quest-state-0":1}}]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:j.T.NONE,data:{}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"outfit",ID:56,N:1}],additionalDialogueIds:{succeedingDialogue:[531,532,533]}}}],localizationKey:"",metadata:{locations:[]}},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-Q8-guards`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[534,535]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_TALK_TO_GUARDS",metadata:{locations:[`${W.A_.BONFIRE}-C6`]}},{id:"9-0",prerequisites:["8-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:90,target:2}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"item",ID:91,N:1}],additionalDialogueIds:{succeedingDialogue:[536,537]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_SAVE_GATHERERS",metadata:{locations:[`${W.A_.BONFIRE}-A4`]}},{id:"10-0",prerequisites:["9-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-Q10-food-stolen`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[538,539,540,541,542,543]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_OFFER_DISH",metadata:{locations:[`${W.A_.BONFIRE}-C6`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[92]}}],data:{}},localizationKey:"QUESTS_BONFIRE_SPIRE_FIND_KEY",metadata:{locations:[`${W.A_.BONFIRE}-C4`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-Q11-received-strong-fire-relic`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:2,N:1}],additionalDialogueIds:{precedingDialogue:[509,510]}}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"item",ID:92,N:1}],additionalDialogueIds:{succeedingDialogue:[544,545,546]},isFake:!0}}],metadata:{locations:[`${W.A_.BONFIRE}-C4`]}},{id:"12-0",prerequisites:["11-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.BonfireQ12Guardian}},localizationKey:"QUESTS_BONFIRE_SPIRE_UNLOCK_CHEST",metadata:{locations:[`${W.A_.BONFIRE}-A4`]}},{id:"12-1",prerequisites:["12-0"],completionRequirements:{type:j.T.OPEN_CHEST,data:{id:`${W.A_.BONFIRE}-chestGuardian`}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[509],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{succeedingDialogue:[547,548,549]}}},{type:$.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:j.T.BUTTON_CLICK,eventData:{id:`${W.A_.BONFIRE}-chestGuardian`}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_UNLOCK_CHEST",metadata:{locations:[`${W.A_.BONFIRE}-A4`]}},{id:"13-0",prerequisites:["12-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.BonfireQ13Cebollini}},localizationKey:"QUESTS_BONFIRE_SPIRE_DEFEAT_CHEF",metadata:{locations:[`${W.A_.BONFIRE}-D6`]}},{id:"13-1",prerequisites:["13-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-Q13-post-battle`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"weapon",ID:81,N:1}],additionalDialogueIds:{precedingDialogue:[509],succeedingDialogue:[550,551]}}}],metadata:{locations:[`${W.A_.BONFIRE}-D6`]}},{id:"14-0",prerequisites:["13-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.BONFIRE}-Q14-attend-dinner`}},localizationKey:"QUESTS_BONFIRE_SPIRE_TALK_TO_QUEEN",metadata:{locations:[`${W.A_.BONFIRE}-D5`]}},{id:"14-1",prerequisites:["14-0"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"slurpy"}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:3},{type:"key",ID:11}],additionalDialogueIds:{precedingDialogue:[554,555,510,556],succeedingDialogue:[557]}}}],localizationKey:"QUESTS_BONFIRE_SPIRE_TALK_TO_SLURPY",metadata:{locations:[`${W.A_.BONFIRE}-B1`]}}]}},88919:(k,B,U)=>{"use strict";U.d(B,{C:()=>q});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(24522),W=U(73678);const q={id:`quest-${G.t.FireflyForestHard}`,tags:[G.t.LocalZoneQuests,G.t.FireflyForestHard],metadata:{zoneId:W.A_.FORESTHARD},tasks:[{id:"0-0",prerequisites:[],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.FORESTHARD}-C8`}},preconditions:[{type:V.n.IS_IN_ZONE,data:{zone:[W.A_.FORESTHARD]}}],metadata:{locations:[]}},{id:"1-0",prerequisites:["0-0"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{target:2},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-forest_hard-uniqueEncounters-C7-forest_C7_Q2_special","zone-forest_hard-uniqueEncounters-C7-forest_C7_S2_special"]}}]},metadata:{locations:[`${W.A_.FORESTHARD}-C7`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q1-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}}],metadata:{locations:[`${W.A_.FORESTHARD}-C7`]}},{id:"2-0",prerequisites:["1-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.FireflyQ2Miniboss}},localizationKey:"QUEST_DEFEAT_MONSTER",metadata:{locations:[`${W.A_.FORESTHARD}-C7`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q2-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}},{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[1349]}}],metadata:{locations:[`${W.A_.FORESTHARD}-C7`]}},{id:"3-0",prerequisites:["2-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q3-intro`}},metadata:{locations:[`${W.A_.FORESTHARD}-B7`]}},{id:"3-1",prerequisites:["3-0"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{type:"pet",id:20,target:2},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-forest_hard-uniqueEncounters-B7-forest_B7_S2_special","zone-forest_hard-uniqueEncounters-B7-forest_B7_Q1_special"]}}]},localizationKey:"QUESTS_FOREST_DEFEAT_LUMINITES",metadata:{locations:[`${W.A_.FORESTHARD}-B7`]}},{id:"3-2",prerequisites:["3-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q3-miniboss-intro`}},localizationKey:"QUEST_DEFEAT_MONSTER",metadata:{locations:[`${W.A_.FORESTHARD}-B7`]}},{id:"3-3",prerequisites:["3-2"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.FireflyQ3Miniboss}},localizationKey:"QUEST_DEFEAT_MONSTER",metadata:{locations:[`${W.A_.FORESTHARD}-B7`]}},{id:"3-4",prerequisites:["3-3"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q3-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}},{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[1370,1371]}}],metadata:{locations:[`${W.A_.FORESTHARD}-B7`]}},{id:"4-0",prerequisites:["3-4"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"florian"}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{}],showGotItem:!1}}],localizationKey:"QUEST_FIND_FLORIAN",metadata:{locations:[`${W.A_.FORESTHARD}-B6`]}},{id:"5-0",prerequisites:["4-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q5-florian`}},localizationKey:"QUEST_JOB_COMPLETE",metadata:{locations:[`${W.A_.FORESTHARD}-B6`]}},{id:"5-1",prerequisites:["5-0"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"bok"}},onComplete:[{type:$.s.GOT_PET,data:{id:80,showPetsInCardFormat:!0,claimToken:"16c7deee-f3a8-4599-856b-acb1884aeb40",playerLevelDeltaMin:0,playerLevelDeltaMax:0}}],localizationKey:"QUEST_GO_TO_SHIVERCHILL",metadata:{locations:[`${W.A_.SHIVERCHILLHARD}-A10`]}},{id:"5-2",prerequisites:["5-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q5-bok`}},metadata:{locations:[`${W.A_.SHIVERCHILLHARD}-A10`]}},{id:"6-1",prerequisites:["5-2"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.QuestPippet}},localizationKey:"QUEST_DEFEAT_PIPPET",metadata:{locations:[`${W.A_.FORESTHARD}-B5`]}},{id:"6-2",prerequisites:["6-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q6-post-battle`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"item",ID:67}],additionalDialogueIds:{succeedingDialogue:[306,307]}}}],metadata:{locations:[`${W.A_.FORESTHARD}-B5`]}},{id:"6-3",prerequisites:["6-2"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"merchant"}},localizationKey:"QUEST_TRANSLATE_NOTE",metadata:{locations:[`${W.A_.FORESTHARD}-C4`]}},{id:"6-4",prerequisites:["6-3"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q6-noot`}},localizationKey:"QUEST_BATTLE_SPRIKES",metadata:{locations:[`${W.A_.FORESTHARD}-D3`]}},{id:"6-5",prerequisites:["6-4"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[24]}}],data:{}},localizationKey:"QUEST_BATTLE_SPRIKES",metadata:{locations:[`${W.A_.FORESTHARD}-D3`]}},{id:"6-6",prerequisites:["6-5"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.FORESTHARD}-D3`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:["item"],ID:[24],N:1}],isFake:!0}},{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[310,311,312]}}],metadata:{locations:[`${W.A_.FORESTHARD}-D3`]}},{id:"7-0",prerequisites:["6-6"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:24,target:5}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[331],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[313,314,315]}}}],metadata:{locations:[{location:`${W.A_.FORESTHARD}-A4`,disallowedStates:{"quest-state-1":1,"quest-state-2":1}},{location:`${W.A_.FORESTHARD}-A5`,disallowedStates:{"quest-state-3":1,"quest-state-4":1,"quest-state-5":1}}]}},{id:"8-0",prerequisites:["7-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.FireflyQ8TriptropTrio}},localizationKey:"QUEST_DEFEAT_TRIPTROP_TRIO",metadata:{locations:[`${W.A_.FORESTHARD}-A3`]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}}],metadata:{locations:[`${W.A_.FORESTHARD}-A3`]}},{id:"9-0",prerequisites:["8-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:"find-gerald"}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}}],localizationKey:"QUESTS_FOREST_FIND_GERALD",metadata:{locations:[`${W.A_.FORESTHARD}-D3`]}},{id:"10-0",prerequisites:["9-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:"fixed-flute"}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}]}}],localizationKey:"QUESTS_FOREST_FIX_FLUTE",metadata:{locations:[`${W.A_.FORESTHARD}-A5`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[70]}}],data:{}},localizationKey:"QUESTS_FOREST_COLLECT_FLUTE",metadata:{locations:[`${W.A_.FORESTHARD}-A3`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.FORESTHARD}-A3`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[331],succeedingDialogue:[325,326]}}}],metadata:{locations:[`${W.A_.FORESTHARD}-A3`]}},{id:"12-1",prerequisites:["11-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.FireflyQ12Gerald}},localizationKey:"QUESTS_FOREST_DEFEAT_GERALD",metadata:{locations:[`${W.A_.FORESTHARD}-D3`]}},{id:"12-2",prerequisites:["12-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q12-post-battle`}},metadata:{locations:[`${W.A_.FORESTHARD}-D3`]}},{id:"12-3",prerequisites:["12-2"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q12-quest-complete`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"key",ID:3}]}}],metadata:{locations:[`${W.A_.FORESTHARD}-D3`]}},{id:"13-0",prerequisites:["12-3"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.SHIVERCHILLHARD}-A10`}},metadata:{locations:[`${W.A_.SHIVERCHILLHARD}-A10`]}}]}},1716:(k,B,U)=>{"use strict";U.d(B,{E:()=>q});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(24522),W=U(73678);const q={id:`quest-${G.t.FireflyForest}`,tags:[G.t.LocalZoneQuests,G.t.FireflyForest],metadata:{zoneId:W.A_.FOREST},tasks:[{id:"0-0",prerequisites:[],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.FOREST}-C8`}},preconditions:[{type:V.n.IS_IN_ZONE,data:{zone:[W.A_.FOREST]}}],metadata:{locations:[]}},{id:"1-0",prerequisites:["0-0"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{target:2},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-forest-uniqueEncounters-C7-forest_C7_Q2_special","zone-forest-uniqueEncounters-C7-forest_C7_S2_special"]}}]},metadata:{locations:[`${W.A_.FOREST}-C7`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q1-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}]}}],metadata:{locations:[`${W.A_.FOREST}-C7`]}},{id:"2-0",prerequisites:["1-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.FireflyQ2Miniboss}},localizationKey:"QUEST_DEFEAT_MONSTER",metadata:{locations:[`${W.A_.FOREST}-C7`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q2-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}]}},{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[1349]}}],metadata:{locations:[`${W.A_.FOREST}-C7`]}},{id:"3-0",prerequisites:["2-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q3-intro`}},localizationKey:"QUEST_LEVEL_UP",metadata:{locations:[`${W.A_.FOREST}-B7`]}},{id:"3-1",prerequisites:["3-0"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{target:2},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-forest-uniqueEncounters-B7-forest_B7_S2_special","zone-forest-uniqueEncounters-B7-forest_B7_Q1_special"]}}]},localizationKey:"QUEST_LEVEL_UP",metadata:{locations:[`${W.A_.FOREST}-B7`]}},{id:"3-2",prerequisites:["3-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q3-miniboss-intro`}},localizationKey:"QUEST_DEFEAT_MONSTER",metadata:{locations:[`${W.A_.FOREST}-B7`]}},{id:"3-3",prerequisites:["3-2"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.FireflyQ3Miniboss}},localizationKey:"QUEST_DEFEAT_MONSTER",metadata:{locations:[`${W.A_.FOREST}-B7`]}},{id:"3-4",prerequisites:["3-3"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q3-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}]}},{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[1370,1371]}}],metadata:{locations:[`${W.A_.FOREST}-B7`]}},{id:"4-0",prerequisites:["3-4"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"florian"}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:13}],showGotItem:!1}}],localizationKey:"QUEST_FIND_FLORIAN",metadata:{locations:[`${W.A_.FOREST}-B6`]}},{id:"5-0",prerequisites:["4-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q5-florian`}},localizationKey:"QUEST_JOB_COMPLETE",metadata:{locations:[`${W.A_.FOREST}-B6`]}},{id:"5-1",prerequisites:["5-0"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"bok"}},onComplete:[{type:$.s.GOT_PET,data:{id:79,showPetsInCardFormat:!0,claimToken:"877e5cbb-48fb-4e88-bde4-6abd96fe4275",playerLevelDeltaMin:0,playerLevelDeltaMax:0}},{type:$.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:j.T.BUTTON_CLICK,eventData:{id:`${W.A_.FOREST}-Q5-bok-receive-pet`}}}],localizationKey:"QUEST_GO_TO_SHIVERCHILL",metadata:{locations:[`${W.A_.SHIVERCHILL}-A10`]}},{id:"5-2",prerequisites:["5-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q5-bok`}},metadata:{locations:[`${W.A_.SHIVERCHILL}-A10`]}},{id:"6-1",prerequisites:["5-2"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.QuestPippet}},localizationKey:"QUEST_DEFEAT_PIPPET",metadata:{locations:[`${W.A_.FOREST}-B5`]}},{id:"6-2",prerequisites:["6-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q6-post-battle`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"item",ID:67}],additionalDialogueIds:{succeedingDialogue:[306,307]}}}],metadata:{locations:[`${W.A_.FOREST}-B5`]}},{id:"6-3",prerequisites:["6-2"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"merchant"}},localizationKey:"QUEST_TRANSLATE_NOTE",metadata:{locations:[`${W.A_.FOREST}-C4`]}},{id:"6-4",prerequisites:["6-3"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q6-noot`}},localizationKey:"QUEST_BATTLE_SPRIKES",metadata:{locations:[`${W.A_.FOREST}-D3`]}},{id:"6-5",prerequisites:["6-4"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[24]}}],data:{}},localizationKey:"QUEST_BATTLE_SPRIKES",metadata:{locations:[`${W.A_.FOREST}-D3`]}},{id:"6-6",prerequisites:["6-5"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.FOREST}-D3`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}]}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:["item"],ID:[24],N:1}],isFake:!0}},{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[310,311,312]}}],metadata:{locations:[`${W.A_.FOREST}-D3`]}},{id:"7-0",prerequisites:["6-6"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:24,target:5}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[331],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{succeedingDialogue:[313,314,315]}}}],metadata:{locations:[{location:`${W.A_.FOREST}-A4`,disallowedStates:{"quest-state-1":1,"quest-state-2":1}},{location:`${W.A_.FOREST}-A5`,disallowedStates:{"quest-state-3":1,"quest-state-4":1,"quest-state-5":1}}]}},{id:"8-0",prerequisites:["7-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.FireflyQ8TriptropTrio}},localizationKey:"QUEST_DEFEAT_TRIPTROP_TRIO",metadata:{locations:[`${W.A_.FOREST}-A3`]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:14}]}}],metadata:{locations:[`${W.A_.FOREST}-A3`]}},{id:"9-0",prerequisites:["8-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:"find-gerald"}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}]}}],localizationKey:"QUESTS_FOREST_FIND_GERALD",metadata:{locations:[`${W.A_.FOREST}-D3`]}},{id:"10-0",prerequisites:["9-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:"fixed-flute"}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}]}}],localizationKey:"QUESTS_FOREST_FIX_FLUTE",metadata:{locations:[`${W.A_.FOREST}-A5`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[70]}}],data:{}},localizationKey:"QUESTS_FOREST_COLLECT_FLUTE",metadata:{locations:[`${W.A_.FOREST}-A3`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.FOREST}-A3`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[331],succeedingDialogue:[325,326]}}}],metadata:{locations:[`${W.A_.FOREST}-A3`]}},{id:"12-1",prerequisites:["11-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.FireflyQ12Gerald}},localizationKey:"QUESTS_FOREST_DEFEAT_GERALD",metadata:{locations:[`${W.A_.FOREST}-D3`]}},{id:"12-2",prerequisites:["12-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q12-post-battle`}},metadata:{locations:[`${W.A_.FOREST}-D3`]}},{id:"12-3",prerequisites:["12-2"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.FOREST}-Q12-quest-complete`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"key",ID:3}]}}],metadata:{locations:[`${W.A_.FOREST}-D3`]}},{id:"13-0",prerequisites:["12-3"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.SHIVERCHILL}-A10`}},metadata:{locations:[`${W.A_.SHIVERCHILL}-A10`]}}]}},57144:(k,B,U)=>{"use strict";U.d(B,{r:()=>q});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(24522),W=U(73678);const q={id:`quest-${G.t.ShipwreckShoreHard}`,tags:[G.t.LocalZoneQuests,G.t.ShipwreckShoreHard],metadata:{zoneId:W.A_.SHIPWRECKHARD},tasks:[{id:"0-0",prerequisites:[],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.SHIPWRECKHARD}-B12`}},preconditions:[{type:V.n.IS_IN_ZONE,data:{zone:[W.A_.SHIPWRECKHARD]}}],metadata:{locations:[]}},{id:"1-0",prerequisites:["0-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"key",id:14,target:1}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[668,669,670,671]}}}],metadata:{locations:[`${W.A_.SHIPWRECKHARD}-C10`]}},{id:"2-0",prerequisites:["1-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q2-jelly-jim-intro`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[708]}}}],localizationKey:"QUESTS_SHIPWRECK_FIND_JIM",metadata:{locations:[`${W.A_.SHIPWRECKHARD}-C9`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q2-1-quest-complete`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[672,673,674]}}}],localizationKey:"QUESTS_SHIPWRECK_LOOK_AROUND",metadata:{locations:[`${W.A_.SHIPWRECKHARD}-A7`]}},{id:"3-0",prerequisites:["2-1"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:112,target:1}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[676,677,678,679,680,681,682,683]}}],metadata:{locations:[`${W.A_.SHIPWRECKHARD}-A7`]}},{id:"4-0",prerequisites:["3-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"key",id:15,target:1}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[684,685]}}}],metadata:{locations:[`${W.A_.SHIPWRECKHARD}-B7`]}},{id:"5-0",prerequisites:["4-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q5-clear-ink`}},localizationKey:"QUESTS_SHIPWRECK_CLEAR_INK",metadata:{locations:[{location:`${W.A_.SHIPWRECKHARD}-A7`,requiredStates:{inkA7:0}},{location:`${W.A_.SHIPWRECKHARD}-B6`,requiredStates:{inkB6:0}},{location:`${W.A_.SHIPWRECKHARD}-B5`,requiredStates:{inkB5:0}},{location:`${W.A_.SHIPWRECKHARD}-A5`}]}},{id:"5-1",prerequisites:["5-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q5-quest-complete`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[686,687,688,689]}}}],metadata:{locations:[`${W.A_.SHIPWRECKHARD}-A5`]}},{id:"6-0",prerequisites:["5-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q6-get-camera`}},onComplete:[{type:$.s.GOT_ITEM,data:{additionalDialogueIds:{precedingDialogue:[709,710]},itemDrops:[{type:"key",ID:16,N:1}]}},{type:$.s.GOT_ITEM,data:{additionalDialogueIds:{precedingDialogue:[708]},itemDrops:[{type:"gold",ID:1,N:400}]}}],localizationKey:"QUESTS_SHIPWRECK_GET_CAMERA",metadata:{locations:[`${W.A_.SHIPWRECKHARD}-C9`]}},{id:"6-1",prerequisites:["6-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q6-1-take-photo`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[690,691,692]}}}],localizationKey:"QUESTS_SHIPWRECK_TAKE_PHOTO",metadata:{locations:[`${W.A_.SHIPWRECKHARD}-A5`]}},{id:"7-0",prerequisites:["6-1"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:113,target:3}},metadata:{locations:[`${W.A_.SHIPWRECKHARD}-A2`]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q7-quest-complete`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[658,675],succeedingDialogue:[693,697,695]}}}],metadata:{locations:[`${W.A_.SHIPWRECKHARD}-A2`]}},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{type:"pet",id:119,target:4},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-shipwreck_shore_hard-uniqueEncounters-B8-shipwreck_shore_B8_S1_special","zone-shipwreck_shore_hard-uniqueEncounters-B8-shipwreck_shore_B8_S2_special","zone-shipwreck_shore_hard-uniqueEncounters-B7-shipwreck_shore_B7_S1_special","zone-shipwreck_shore_hard-uniqueEncounters-B7-shipwreck_shore_B7_S3_special"]}}]},metadata:{locations:[{location:`${W.A_.SHIPWRECKHARD}-B8`,uniqueEncounters:{B8:["shipwreck_shore_B8_S1_special","shipwreck_shore_B8_S2_special"]}},{location:`${W.A_.SHIPWRECKHARD}-B7`,uniqueEncounters:{B7:["shipwreck_shore_B7_S1_special","shipwreck_shore_B7_S3_special"]}}]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q8-quest-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[696,658],succeedingDialogue:[697,698,699]}}}],metadata:{locations:[`${W.A_.SHIPWRECKHARD}-B8`,`${W.A_.SHIPWRECKHARD}-B7`]}},{id:"9-0",prerequisites:["8-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q9-open-door`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[700]}}}],localizationKey:"QUESTS_SHIPWRECK_OPEN_DOOR",metadata:{locations:[`${W.A_.SHIPWRECKHARD}-B6`]}},{id:"10-0",prerequisites:["9-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:114,target:1}},metadata:{locations:[`${W.A_.SHIPWRECKHARD}-B7`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.ShipwreckQ11OldOne}},localizationKey:"QUESTS_SHIPWRECK_DEFEAT_BOSS",metadata:{locations:[`${W.A_.SHIPWRECKHARD}-C6`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q11-post-battle`}},localizationKey:"QUESTS_SHIPWRECK_TALK_TO_EVE",metadata:{locations:[`${W.A_.SHIPWRECKHARD}-C6`]}},{id:"11-2",prerequisites:["11-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q11-quest-end`}},localizationKey:"QUESTS_SHIPWRECK_TALK_TO_EVE",metadata:{locations:[`${W.A_.SHIPWRECKHARD}-B12`]}},{id:"11-3",prerequisites:["11-2"],completionRequirements:{type:j.T.NONE,data:{}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:800},{type:"key",ID:17,N:1}],additionalDialogueIds:{precedingDialogue:[658,675,702]}}}],localizationKey:"QUESTS_SHIPWRECK_TALK_TO_EVE",metadata:{locations:[`${W.A_.SHIPWRECKHARD}-B12`]}}]}},76175:(k,B,U)=>{"use strict";U.d(B,{J:()=>q});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(24522),W=U(73678);const q={id:`quest-${G.t.ShipwreckShore}`,tags:[G.t.LocalZoneQuests,G.t.ShipwreckShore],metadata:{zoneId:W.A_.SHIPWRECK},tasks:[{id:"0-0",prerequisites:[],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${W.A_.SHIPWRECK}-B12`}},preconditions:[{type:V.n.IS_IN_ZONE,data:{zone:[W.A_.SHIPWRECK]}}],metadata:{locations:[]}},{id:"1-0",prerequisites:["0-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"key",id:14,target:1}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[668,669,670,671]}}}],metadata:{locations:[`${W.A_.SHIPWRECK}-C10`]}},{id:"2-0",prerequisites:["1-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q2-jelly-jim-intro`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[708]}}}],localizationKey:"QUESTS_SHIPWRECK_FIND_JIM",metadata:{locations:[`${W.A_.SHIPWRECK}-C9`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q2-1-quest-complete`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"boots",ID:32,N:1}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[672,673,674]}}}],localizationKey:"QUESTS_SHIPWRECK_LOOK_AROUND",metadata:{locations:[`${W.A_.SHIPWRECK}-A7`]}},{id:"3-0",prerequisites:["2-1"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:112,target:1}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[676,677,678,679,680,681,682,683]}}],metadata:{locations:[`${W.A_.SHIPWRECK}-A7`]}},{id:"4-0",prerequisites:["3-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"key",id:15,target:1}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[684,685]}}}],metadata:{locations:[`${W.A_.SHIPWRECK}-B7`]}},{id:"5-0",prerequisites:["4-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q5-clear-ink`}},localizationKey:"QUESTS_SHIPWRECK_CLEAR_INK",metadata:{locations:[{location:`${W.A_.SHIPWRECK}-A7`,requiredStates:{inkA7:0}},{location:`${W.A_.SHIPWRECK}-B6`,requiredStates:{inkB6:0}},{location:`${W.A_.SHIPWRECK}-B5`,requiredStates:{inkB5:0}},{location:`${W.A_.SHIPWRECK}-A5`}]}},{id:"5-1",prerequisites:["5-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q5-quest-complete`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[686,687,688,689]}}}],metadata:{locations:[`${W.A_.SHIPWRECK}-A5`]}},{id:"6-0",prerequisites:["5-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q6-get-camera`}},onComplete:[{type:$.s.GOT_ITEM,data:{additionalDialogueIds:{precedingDialogue:[709,710]},itemDrops:[{type:"key",ID:16,N:1}]}},{type:$.s.GOT_ITEM,data:{additionalDialogueIds:{precedingDialogue:[708]},itemDrops:[{type:"gold",ID:1,N:200}]}}],localizationKey:"QUESTS_SHIPWRECK_GET_CAMERA",metadata:{locations:[`${W.A_.SHIPWRECK}-C9`]}},{id:"6-1",prerequisites:["6-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q6-1-take-photo`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"outfit",ID:61,N:1}],additionalDialogueIds:{precedingDialogue:[658],succeedingDialogue:[690,691,692]}}}],localizationKey:"QUESTS_SHIPWRECK_TAKE_PHOTO",metadata:{locations:[`${W.A_.SHIPWRECK}-A5`]}},{id:"7-0",prerequisites:["6-1"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:113,target:3}},metadata:{locations:[`${W.A_.SHIPWRECK}-A2`]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q7-quest-complete`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"spellRelic",ID:11,N:1}],additionalDialogueIds:{precedingDialogue:[658,675],succeedingDialogue:[693,697,695]}}}],metadata:{locations:[`${W.A_.SHIPWRECK}-A2`]}},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{target:4},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-shipwreck_shore-uniqueEncounters-B8-shipwreck_shore_B8_S1_special","zone-shipwreck_shore-uniqueEncounters-B8-shipwreck_shore_B8_S2_special","zone-shipwreck_shore-uniqueEncounters-B7-shipwreck_shore_B7_S1_special","zone-shipwreck_shore-uniqueEncounters-B7-shipwreck_shore_B7_S3_special"]}}]},metadata:{locations:[{location:`${W.A_.SHIPWRECK}-B8`,uniqueEncounters:{B8:["shipwreck_shore_B8_S1_special","shipwreck_shore_B8_S2_special"]}},{location:`${W.A_.SHIPWRECK}-B7`,uniqueEncounters:{B7:["shipwreck_shore_B7_S1_special","shipwreck_shore_B7_S3_special"]}}]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q8-quest-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[696,658],succeedingDialogue:[697,698,699]}}}],metadata:{locations:[`${W.A_.SHIPWRECK}-B8`,`${W.A_.SHIPWRECK}-B7`]}},{id:"9-0",prerequisites:["8-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q9-open-door`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"hat",ID:80,N:1}],additionalDialogueIds:{succeedingDialogue:[700]}}}],localizationKey:"QUESTS_SHIPWRECK_OPEN_DOOR",metadata:{locations:[`${W.A_.SHIPWRECK}-B6`]}},{id:"10-0",prerequisites:["9-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:114,target:1}},metadata:{locations:[`${W.A_.SHIPWRECK}-B7`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.ShipwreckQ11OldOne}},localizationKey:"QUESTS_SHIPWRECK_DEFEAT_BOSS",metadata:{locations:[`${W.A_.SHIPWRECK}-C6`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q11-post-battle`}},localizationKey:"QUESTS_SHIPWRECK_TALK_TO_EVE",metadata:{locations:[`${W.A_.SHIPWRECK}-C6`]}},{id:"11-2",prerequisites:["11-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${W.A_.SHIPWRECK}-Q11-quest-end`}},localizationKey:"QUESTS_SHIPWRECK_TALK_TO_EVE",metadata:{locations:[`${W.A_.SHIPWRECK}-B12`]}},{id:"11-3",prerequisites:["11-2"],completionRequirements:{type:j.T.NONE,data:{}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"spellRelic",ID:12,N:1},{type:"key",ID:17,N:1}],additionalDialogueIds:{precedingDialogue:[658,675,702]}}}],localizationKey:"QUESTS_SHIPWRECK_TALK_TO_EVE",metadata:{locations:[`${W.A_.SHIPWRECK}-B12`]}}]}},38693:(k,B,U)=>{"use strict";U.d(B,{S:()=>W});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(73678);const W={id:`quest-${G.t.ShiverchillHard}`,tags:[G.t.LocalZoneQuests,G.t.ShiverchillHard],metadata:{zoneId:V.A_.SHIVERCHILLHARD},tasks:[{id:"1-0",prerequisites:[],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"bok"}},metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A10`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SHIVERCHILLHARD}-B10`}},localizationKey:"QUESTS_SHIVERCHILL_INVESTIGATE_FURNACE_ROOM",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B10`]}},{id:"1-2",prerequisites:["1-1"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{target:3},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-shiverchill_hard-uniqueEncounters-B10-shiverchill_B10_S1_special","zone-shiverchill_hard-uniqueEncounters-B10-shiverchill_B10_S2_special","zone-shiverchill_hard-uniqueEncounters-B10-shiverchill_B10_S3_special"]}}]},localizationKey:"QUESTS_SHIVERCHILL_CLEAR_FURNACE_ROOM",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B10`]}},{id:"1-3",prerequisites:["1-2"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q1-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[339,334,340,341]}}}],metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B10`]}},{id:"2-0",prerequisites:["1-3"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[71]}}],data:{}},localizationKey:"QUESTS_SHIVERCHILL_FIND_POWER_CRYSTAL",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A9`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q2-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[342,343]}}}],metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A9`]}},{id:"3-0",prerequisites:["2-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q3-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[344,345]}}}],localizationKey:"QUESTS_SHIVERCHILL_LIGHT_FIRST_FURNACE",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B10`]}},{id:"4-0",prerequisites:["3-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q4-shake`}},localizationKey:"QUESTS_SHIVERCHILL_EXPLORE_CAVES",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A7`]}},{id:"4-1",prerequisites:["4-0"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"shiverchill-miner"}},localizationKey:"QUESTS_SHIVERCHILL_EXPLORE_CAVES",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A7`]}},{id:"4-2",prerequisites:["4-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q4-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"item",ID:75,N:1}],additionalDialogueIds:{succeedingDialogue:[349]}}}],metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A7`]}},{id:"5-0",prerequisites:["4-2"],completionRequirements:{type:j.T.OPEN_CHEST,data:{id:"shiverchill_hard-chest1"}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[350,334,351],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"item",ID:72,N:1}],additionalDialogueIds:{succeedingDialogue:[352]}}}],localizationKey:"QUESTS_SHIVERCHILL_GET_BOKS_SHOVEL",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B6`]}},{id:"6-0",prerequisites:["5-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.ShiverchillQ6Ghosts}},localizationKey:"QUESTS_SHIVERCHILL_FREE_MINER",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A7`]}},{id:"6-1",prerequisites:["6-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q6-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[353,354]}}}],metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A7`]}},{id:"7-0",prerequisites:["6-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.ShiverchillQ7IceWyrm}},localizationKey:"QUESTS_SHIVERCHILL_FIND_POWER_CRYSTALS",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B8`]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q7-post-battle`}},metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B8`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[355,356,334,357]}}}]},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q8-pippet-encounter-complete`}},localizationKey:"QUESTS_SHIVERCHILL_DEFEAT_CLOAKERS",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A7`]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{type:"pet",id:90,target:3},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-shiverchill_hard-uniqueEncounters-B6-shiverchill_B6_S1_special","zone-shiverchill_hard-uniqueEncounters-B6-shiverchill_B6_S2_special","zone-shiverchill_hard-uniqueEncounters-B7-shiverchill_B7_S1_special","zone-shiverchill_hard-uniqueEncounters-B7-shiverchill_B7_S2_special"]}}]},metadata:{locations:[{location:`${V.A_.SHIVERCHILLHARD}-B7`,uniqueEncounters:{B7:["shiverchill_B7_S1_special","shiverchill_B7_S2_special"]}},{location:`${V.A_.SHIVERCHILLHARD}-B6`,uniqueEncounters:{B6:["shiverchill_B6_S1_special","shiverchill_B6_S2_special"]}}]}},{id:"8-2",prerequisites:["8-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q8-end`}},metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B7`,`${V.A_.SHIVERCHILLHARD}-B6`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[358]}}}]},{id:"9-0",prerequisites:["8-2"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:71,target:1}},localizationKey:"QUESTS_SHIVERCHILL_COLLECT_POWER_CRYSTAL",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A6`]}},{id:"9-1",prerequisites:["9-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q9-end`}},metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A6`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[342,343]}}}]},{id:"10-0",prerequisites:["9-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q10-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[359,360]}}}],localizationKey:"QUESTS_SHIVERCHILL_LIGHT_SECOND_FURNACE",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B10`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q11-end`}},localizationKey:"QUESTS_SHIVERCHILL_CHECK_THRONE_ROOM",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B3`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[362,334,363,364,365]}}}]},{id:"12-0",prerequisites:["11-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:74,target:3}},localizationKey:"QUESTS_SHIVERCHILL_COLLECT_CRYSTALS",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A3`]}},{id:"12-1",prerequisites:["12-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:74,target:5}},localizationKey:"QUESTS_SHIVERCHILL_COLLECT_CRYSTALS",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B3`]}},{id:"12-2",prerequisites:["12-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q12-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[366,334,367]}}}],metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B3`]}},{id:"13-0",prerequisites:["12-2"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILLHARD}-Q13-start`}},localizationKey:"QUESTS_SHIVERCHILL_DEFEAT_ICE_WORM",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A4`]}},{id:"13-1",prerequisites:["13-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.ShiverchillQ13IceWyrm}},localizationKey:"QUESTS_SHIVERCHILL_DEFEAT_ICE_WORM",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A4`]}},{id:"13-2",prerequisites:["13-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILLHARD}-Q13-post-battle`}},metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-A4`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[342,343]}}}]},{id:"14-0",prerequisites:["13-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q14-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[368,369]}}}],localizationKey:"QUESTS_SHIVERCHILL_LIGHT_THIRD_FURNACE",metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B10`]}},{id:"15-0",prerequisites:["14-0"],localizationKey:"QUESTS_SHIVERCHILL_GO_TO_THRONE_ROOM",completionRequirements:{type:j.T.FSM_COMPLETE_SEQUENCE,data:{}},metadata:{locations:[`${V.A_.SHIVERCHILLHARD}-B2`]}}]}},99689:(k,B,U)=>{"use strict";U.d(B,{a:()=>W});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(73678);const W={id:`quest-${G.t.Shiverchill}`,tags:[G.t.LocalZoneQuests,G.t.Shiverchill],metadata:{zoneId:V.A_.SHIVERCHILL},tasks:[{id:"1-0",prerequisites:[],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"bok"}},onComplete:[{type:$.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:j.T.BUTTON_CLICK,eventData:{id:`${V.A_.SHIVERCHILL}-A10-bok-start-quest`}}}],metadata:{locations:[`${V.A_.SHIVERCHILL}-A10`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SHIVERCHILL}-B10`}},localizationKey:"QUESTS_SHIVERCHILL_INVESTIGATE_FURNACE_ROOM",metadata:{locations:[`${V.A_.SHIVERCHILL}-B10`]}},{id:"1-2",prerequisites:["1-1"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{target:3},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-shiverchill-uniqueEncounters-B10-shiverchill_B10_S1_special","zone-shiverchill-uniqueEncounters-B10-shiverchill_B10_S2_special","zone-shiverchill-uniqueEncounters-B10-shiverchill_B10_S3_special"]}}]},localizationKey:"QUESTS_SHIVERCHILL_CLEAR_FURNACE_ROOM",metadata:{locations:[`${V.A_.SHIVERCHILL}-B10`]}},{id:"1-3",prerequisites:["1-2"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q1-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[339,334,340,341]}}}],metadata:{locations:[`${V.A_.SHIVERCHILL}-B10`]}},{id:"2-0",prerequisites:["1-3"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[71]}}],data:{}},localizationKey:"QUESTS_SHIVERCHILL_FIND_POWER_CRYSTAL",metadata:{locations:[`${V.A_.SHIVERCHILL}-A9`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q2-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[342,343]}}}],metadata:{locations:[`${V.A_.SHIVERCHILL}-A9`]}},{id:"3-0",prerequisites:["2-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q3-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:4,N:1}],additionalDialogueIds:{precedingDialogue:[333],succeedingDialogue:[344,345]}}}],localizationKey:"QUESTS_SHIVERCHILL_LIGHT_FIRST_FURNACE",metadata:{locations:[`${V.A_.SHIVERCHILL}-B10`]}},{id:"4-0",prerequisites:["3-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q4-shake`}},localizationKey:"QUESTS_SHIVERCHILL_EXPLORE_CAVES",metadata:{locations:[`${V.A_.SHIVERCHILL}-A7`]}},{id:"4-1",prerequisites:["4-0"],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:"shiverchill-miner"}},localizationKey:"QUESTS_SHIVERCHILL_EXPLORE_CAVES",metadata:{locations:[`${V.A_.SHIVERCHILL}-A7`]}},{id:"4-2",prerequisites:["4-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q4-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100},{type:"item",ID:75,N:1}],additionalDialogueIds:{succeedingDialogue:[349]}}}],metadata:{locations:[`${V.A_.SHIVERCHILL}-A7`]}},{id:"5-0",prerequisites:["4-2"],completionRequirements:{type:j.T.OPEN_CHEST,data:{id:"shiverchill-chest1"}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[350,334,351],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100},{type:"item",ID:72,N:1}],additionalDialogueIds:{succeedingDialogue:[352]}}}],localizationKey:"QUESTS_SHIVERCHILL_GET_BOKS_SHOVEL",metadata:{locations:[`${V.A_.SHIVERCHILL}-B6`]}},{id:"6-0",prerequisites:["5-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.ShiverchillQ6Ghosts}},localizationKey:"QUESTS_SHIVERCHILL_FREE_MINER",metadata:{locations:[`${V.A_.SHIVERCHILL}-A7`]}},{id:"6-1",prerequisites:["6-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q6-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"hat",ID:54,N:1}],additionalDialogueIds:{succeedingDialogue:[353,354]}}}],metadata:{locations:[`${V.A_.SHIVERCHILL}-A7`]}},{id:"7-0",prerequisites:["6-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.ShiverchillQ7IceWyrm}},localizationKey:"QUESTS_SHIVERCHILL_FIND_POWER_CRYSTALS",metadata:{locations:[`${V.A_.SHIVERCHILL}-B8`]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q7-post-battle`}},metadata:{locations:[`${V.A_.SHIVERCHILL}-B8`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[355,356,334,357]}}}]},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q8-pippet-encounter-complete`}},localizationKey:"QUESTS_SHIVERCHILL_DEFEAT_CLOAKERS",metadata:{locations:[`${V.A_.SHIVERCHILL}-A7`]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{type:"pet",id:90,target:3},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-shiverchill-uniqueEncounters-B6-shiverchill_B6_S1_special","zone-shiverchill-uniqueEncounters-B6-shiverchill_B6_S2_special","zone-shiverchill-uniqueEncounters-B7-shiverchill_B7_S1_special","zone-shiverchill-uniqueEncounters-B7-shiverchill_B7_S2_special"]}}]},metadata:{locations:[{location:`${V.A_.SHIVERCHILL}-B7`,uniqueEncounters:{B7:["shiverchill_B7_S1_special","shiverchill_B7_S2_special"]}},{location:`${V.A_.SHIVERCHILL}-B6`,uniqueEncounters:{B6:["shiverchill_B6_S1_special","shiverchill_B6_S2_special"]}}]}},{id:"8-2",prerequisites:["8-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q8-end`}},metadata:{locations:[`${V.A_.SHIVERCHILL}-B7`,`${V.A_.SHIVERCHILL}-B6`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[358]}}}]},{id:"9-0",prerequisites:["8-2"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:71,target:1}},localizationKey:"QUESTS_SHIVERCHILL_COLLECT_POWER_CRYSTAL",metadata:{locations:[`${V.A_.SHIVERCHILL}-A6`]}},{id:"9-1",prerequisites:["9-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q9-end`}},metadata:{locations:[`${V.A_.SHIVERCHILL}-A6`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[342,343]}}}]},{id:"10-0",prerequisites:["9-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q10-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:5,N:1}],additionalDialogueIds:{precedingDialogue:[333],succeedingDialogue:[359,360]}}}],localizationKey:"QUESTS_SHIVERCHILL_LIGHT_SECOND_FURNACE",metadata:{locations:[`${V.A_.SHIVERCHILL}-B10`]}},{id:"11-0",prerequisites:["10-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q11-end`}},localizationKey:"QUESTS_SHIVERCHILL_CHECK_THRONE_ROOM",metadata:{locations:[`${V.A_.SHIVERCHILL}-B3`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[362,334,363,364,365]}}}]},{id:"12-0",prerequisites:["11-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:74,target:3}},localizationKey:"QUESTS_SHIVERCHILL_COLLECT_CRYSTALS",metadata:{locations:[`${V.A_.SHIVERCHILL}-A3`]}},{id:"12-1",prerequisites:["12-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:74,target:5}},localizationKey:"QUESTS_SHIVERCHILL_COLLECT_CRYSTALS",metadata:{locations:[`${V.A_.SHIVERCHILL}-B3`]}},{id:"12-2",prerequisites:["12-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q12-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"outfit",ID:47,N:1}],additionalDialogueIds:{succeedingDialogue:[366,334,367]}}}],metadata:{locations:[`${V.A_.SHIVERCHILL}-B3`]}},{id:"13-0",prerequisites:["12-2"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q13-start`}},onComplete:[{type:$.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:j.T.BUTTON_CLICK,eventData:{id:`${V.A_.SHIVERCHILL}-Q13-cutscene-start-finished`}}}],localizationKey:"QUESTS_SHIVERCHILL_DEFEAT_ICE_WORM",metadata:{locations:[`${V.A_.SHIVERCHILL}-A4`]}},{id:"13-1",prerequisites:["13-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.ShiverchillQ13IceWyrm}},localizationKey:"QUESTS_SHIVERCHILL_DEFEAT_ICE_WORM",metadata:{locations:[`${V.A_.SHIVERCHILL}-A4`]}},{id:"13-2",prerequisites:["13-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-Q13-post-battle`}},metadata:{locations:[`${V.A_.SHIVERCHILL}-A4`]},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:100}],additionalDialogueIds:{succeedingDialogue:[342,343]}}}]},{id:"14-0",prerequisites:["13-2"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q14-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:6,N:1}],additionalDialogueIds:{precedingDialogue:[333],succeedingDialogue:[368,369]}}}],localizationKey:"QUESTS_SHIVERCHILL_LIGHT_THIRD_FURNACE",metadata:{locations:[`${V.A_.SHIVERCHILL}-B10`]}},{id:"15-0",prerequisites:["14-0"],localizationKey:"QUESTS_SHIVERCHILL_GO_TO_THRONE_ROOM",completionRequirements:{type:j.T.FSM_COMPLETE_SEQUENCE,data:{}},metadata:{locations:[`${V.A_.SHIVERCHILL}-B2`]}},{id:"15-1",prerequisites:["15-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SHIVERCHILL}-q15-end`}},localizationKey:"QUESTS_SHIVERCHILL_SPEAK_WITH_BOK",onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"weapon",ID:74,N:1}]}}],metadata:{locations:[`${V.A_.SHIVERCHILL}-A10`]}}]}},97340:(k,B,U)=>{"use strict";U.d(B,{x:()=>W});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(73678);const W={id:`quest-${G.t.SkywatchHard}`,tags:[G.t.LocalZoneQuests,G.t.SkywatchHard],metadata:{zoneId:V.A_.SKYWATCHHARD},tasks:[{id:"1-0",prerequisites:[],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:`${V.A_.SKYWATCH}-introduction`}},metadata:{locations:[`${V.A_.SKYWATCHHARD}-A1`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{type:"pet",id:72,target:3},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-skywatch_hard-uniqueEncounters-B2-skywatch_B2_S1_special","zone-skywatch_hard-uniqueEncounters-B2-skywatch_B2_S2_special","zone-skywatch_hard-uniqueEncounters-B2-skywatch_B2_S3_special"]}}]},localizationKey:"QUESTS_SKYWATCH_DEFEAT_CLOUD_NEEKS",metadata:{locations:[`${V.A_.SKYWATCHHARD}-B2`]}},{id:"1-2",prerequisites:["1-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q1-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[414,422],succeedingDialogue:[423,424,425,426]}}}],metadata:{locations:[`${V.A_.SKYWATCHHARD}-B2`]}},{id:"2-0",prerequisites:["1-2"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCHHARD}-C2`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCHHARD}-C2`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q2-thief-C2`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCHHARD}-C2`]}},{id:"2-2",prerequisites:["2-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q2-2-thief-flees`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCH}-C1`]}},{id:"2-3",prerequisites:["2-2"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q2-3-thief-flees`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCHHARD}-C3`]}},{id:"2-4",prerequisites:["2-3"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[87]}}],data:{}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCHHARD}-C4`]}},{id:"2-5",prerequisites:["2-4"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q2-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[427,428,429]}}}],metadata:{locations:[`${V.A_.SKYWATCHHARD}-C4`]}},{id:"3-0",prerequisites:["2-5"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q3-note`}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_FIND_BROCCOLINA",metadata:{locations:[`${V.A_.SKYWATCHHARD}-B2`]}},{id:"3-1",prerequisites:["3-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-A0-found-broccolina`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"key",ID:8,N:1}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[430,431,432]}}}],localizationKey:"QUESTS_SKYWATCH_FIND_BROCCOLINA",metadata:{locations:[`${V.A_.SKYWATCHHARD}-A0`]}},{id:"4-0",prerequisites:["3-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q4-trim-vines-D1`}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCHHARD}-D1`]}},{id:"4-1",prerequisites:["4-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q4-trim-vines-D2`}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCHHARD}-D2`]}},{id:"4-2",prerequisites:["4-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q4-clogged-machine`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[433,434,435,436]}}}],localizationKey:"QUESTS_SKYWATCH_INSPECT_MACHINE",metadata:{locations:[`${V.A_.SKYWATCHHARD}-D3`]}},{id:"5-0",prerequisites:["4-2"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:56,target:3}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[415],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{succeedingDialogue:[437,438]}}}],localizationKey:"QUESTS_SKYWATCH_FIND_CLUES",metadata:{locations:[{location:`${V.A_.SKYWATCHHARD}-D2`,disallowedStates:{"quest-state-1":1}},{location:`${V.A_.SKYWATCHHARD}-C3`,disallowedStates:{"quest-state-2":1}},{location:`${V.A_.SKYWATCHHARD}-B3`,disallowedStates:{"quest-state-3":1}}]}},{id:"6-0",prerequisites:["5-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:81,target:1}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_GET_FACTORY_KEY",metadata:{locations:[`${V.A_.SKYWATCHHARD}-D1`]}},{id:"6-1",prerequisites:["6-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchQ6Swarm}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_ENTER_FACTORY",metadata:{locations:[`${V.A_.SKYWATCHHARD}-D1`]}},{id:"6-2",prerequisites:["6-1"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCHHARD}-D1`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[439]}}}],localizationKey:"QUESTS_SKYWATCH_ENTER_FACTORY",metadata:{locations:[`${V.A_.SKYWATCHHARD}-D1`]}},{id:"7-0",prerequisites:["6-2"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[49]}}],data:{target:5}},localizationKey:"",metadata:{locations:[{location:`${V.A_.SKYWATCHHARD}-E1`,uniqueEncounters:{E1:["skywatch_E1_S1_special","skywatch_E1_S2_special"]}},{location:`${V.A_.SKYWATCHHARD}-E3`,uniqueEncounters:{E3:["skywatch_E3_S1_special","skywatch_E3_S2_special","skywatch_E3_Q1_special"]}}]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q7-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"key",ID:9,N:1}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[440,441,442]}}}],localizationKey:"",metadata:{locations:[`${V.A_.SKYWATCHHARD}-E1`,`${V.A_.SKYWATCHHARD}-E3`]}},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchCloudMiniboss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCHHARD}-B3`]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q8-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[443]}}}],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCHHARD}-B3`]}},{id:"9-0",prerequisites:["8-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchCloudMiniboss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCHHARD}-C4`]}},{id:"9-1",prerequisites:["9-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q9-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[414],succeedingDialogue:[444]}}}],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCHHARD}-C4`]}},{id:"10-0",prerequisites:["9-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchCloudMiniboss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCHHARD}-D3`]}},{id:"10-1",prerequisites:["10-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q10-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[445,446,447]}}}],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCHHARD}-D3`]}},{id:"11-0",prerequisites:["10-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchQ11Bitbots}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_FIND_EUGENE",metadata:{locations:[`${V.A_.SKYWATCHHARD}-E2`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCHHARD}-E2`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400}],additionalDialogueIds:{precedingDialogue:[464,465,466,467,468,469]}}}],localizationKey:"QUESTS_SKYWATCH_FIND_EUGENE",metadata:{locations:[`${V.A_.SKYWATCHHARD}-E2`]}},{id:"11-2",prerequisites:["11-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q11-end`}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[415,448,449,450]}}],localizationKey:"QUESTS_SKYWATCH_FIND_EUGENE",metadata:{locations:[`${V.A_.SKYWATCHHARD}-E2`]}},{id:"12-0",prerequisites:["11-2"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:82,target:2}},onComplete:[{type:$.s.REMOVE_UNSECURE_ITEM,data:{itemDrops:[{type:"item",ID:82,N:2}]}},{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[414],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:400},{type:"item",ID:83,N:1}],additionalDialogueIds:{succeedingDialogue:[451,452]}}}],localizationKey:"QUESTS_SKYWATCH_COLLECT_KEY_PARTS",metadata:{locations:[{location:`${V.A_.SKYWATCHHARD}-D3`,disallowedStates:{"quest-state-0":1}},{location:`${V.A_.SKYWATCHHARD}-C3`,disallowedStates:{"quest-state-1":1}}]}},{id:"13-0",prerequisites:["12-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchCloudBoss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_DEFEAT_BOSS",metadata:{locations:[`${V.A_.SKYWATCHHARD}-E4`]}},{id:"13-1",prerequisites:["13-0"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCHHARD}-E4`}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[51]}},{type:$.s.OFFER_TELEPORT,data:{dialogueID:1753,targetMapTag:`${V.A_.SKYWATCHHARD}-A1`,position:{x:600,y:360}}}],localizationKey:"QUESTS_SKYWATCH_DEFEAT_BOSS",metadata:{locations:[`${V.A_.SKYWATCHHARD}-E4`]}},{id:"13-2",prerequisites:["13-1"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCHHARD}-A1`}},onComplete:[{type:$.s.GOT_ITEM,data:{additionalDialogueIds:{precedingDialogue:[453,454,455]},itemDrops:[{type:"key",ID:10,N:1}]}}],localizationKey:"QUESTS_SKYWATCH_TALK_TO_BENNI",metadata:{locations:[`${V.A_.SKYWATCHHARD}-A1`]}}]}},64891:(k,B,U)=>{"use strict";U.d(B,{x:()=>W});var F=U(28628),G=U(98938),j=U(62886),$=U(29891),H=U(7247),V=U(73678);const W={id:`quest-${G.t.Skywatch}`,tags:[G.t.LocalZoneQuests,G.t.Skywatch],metadata:{zoneId:V.A_.SKYWATCH},tasks:[{id:"1-0",prerequisites:[],completionRequirements:{type:j.T.SPEAK_WITH_NPC,data:{id:`${V.A_.SKYWATCH}-introduction`}},onComplete:[{type:$.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:j.T.BUTTON_CLICK,eventData:{id:`${V.A_.SKYWATCH}-introduction`}}}],metadata:{locations:[`${V.A_.SKYWATCH}-A1`]}},{id:"1-1",prerequisites:["1-0"],completionRequirements:{type:j.T.DEFEAT_QUEST_ENCOUNTER,data:{type:"pet",id:72,target:3},conditions:[{type:H.i.UNIQUE_ENCOUNTER_RESTRICTIONS,data:{ids:["zone-skywatch-uniqueEncounters-B2-skywatch_B2_S1_special","zone-skywatch-uniqueEncounters-B2-skywatch_B2_S2_special","zone-skywatch-uniqueEncounters-B2-skywatch_B2_S3_special"]}}]},localizationKey:"QUESTS_SKYWATCH_DEFEAT_CLOUD_NEEKS",metadata:{locations:[`${V.A_.SKYWATCH}-B2`]}},{id:"1-2",prerequisites:["1-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q1-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[414,422],succeedingDialogue:[423,424,425,426]}}}],metadata:{locations:[`${V.A_.SKYWATCH}-B2`]}},{id:"2-0",prerequisites:["1-2"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCH}-C2`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCH}-C2`]}},{id:"2-1",prerequisites:["2-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q2-thief-C2`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCH}-C2`]}},{id:"2-2",prerequisites:["2-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q2-2-thief-flees`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCH}-C1`]}},{id:"2-3",prerequisites:["2-2"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q2-3-thief-flees`}},localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCH}-C3`]}},{id:"2-4",prerequisites:["2-3"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[87]}}],data:{}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_GET_WEATHER_O_METER",metadata:{locations:[`${V.A_.SKYWATCH}-C4`]}},{id:"2-5",prerequisites:["2-4"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q2-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[427,428,429]}}}],metadata:{locations:[`${V.A_.SKYWATCH}-C4`]}},{id:"3-0",prerequisites:["2-5"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q3-note`}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_FIND_BROCCOLINA",metadata:{locations:[`${V.A_.SKYWATCH}-B2`]}},{id:"3-1",prerequisites:["3-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-A0-found-broccolina`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"key",ID:8,N:1}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[430,431,432]}}}],localizationKey:"QUESTS_SKYWATCH_FIND_BROCCOLINA",metadata:{locations:[`${V.A_.SKYWATCH}-A0`]}},{id:"4-0",prerequisites:["3-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q4-trim-vines-D1`}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCH}-D1`]}},{id:"4-1",prerequisites:["4-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q4-trim-vines-D2`}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCH}-D2`]}},{id:"4-2",prerequisites:["4-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q4-clogged-machine`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:7,N:1}],additionalDialogueIds:{precedingDialogue:[415,460],succeedingDialogue:[433,434,435,436]}}}],localizationKey:"QUESTS_SKYWATCH_INSPECT_MACHINE",metadata:{locations:[`${V.A_.SKYWATCH}-D3`]}},{id:"5-0",prerequisites:["4-2"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:56,target:3}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[415],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{succeedingDialogue:[437,438]}}}],localizationKey:"QUESTS_SKYWATCH_FIND_CLUES",metadata:{locations:[{location:`${V.A_.SKYWATCH}-D2`,disallowedStates:{"quest-state-1":1}},{location:`${V.A_.SKYWATCH}-C3`,disallowedStates:{"quest-state-2":1}},{location:`${V.A_.SKYWATCH}-B3`,disallowedStates:{"quest-state-3":1}}]}},{id:"6-0",prerequisites:["5-0"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:81,target:1}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_GET_FACTORY_KEY",metadata:{locations:[`${V.A_.SKYWATCH}-D1`]}},{id:"6-1",prerequisites:["6-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchQ6Swarm}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_ENTER_FACTORY",metadata:{locations:[`${V.A_.SKYWATCH}-D1`]}},{id:"6-2",prerequisites:["6-1"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCH}-D1`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[439]}}}],localizationKey:"QUESTS_SKYWATCH_ENTER_FACTORY",metadata:{locations:[`${V.A_.SKYWATCH}-D1`]}},{id:"7-0",prerequisites:["6-2"],completionRequirements:{type:j.T.RECEIVE_ITEM,conditions:[{type:H.i.ITEM_RESTRICTIONS,data:{types:["item"],ids:[49]}}],data:{target:5}},localizationKey:"",metadata:{locations:[{location:`${V.A_.SKYWATCH}-E1`,uniqueEncounters:{E1:["skywatch_E1_S1_special","skywatch_E1_S2_special"]}},{location:`${V.A_.SKYWATCH}-E3`,uniqueEncounters:{E3:["skywatch_E3_S1_special","skywatch_E3_S2_special","skywatch_E3_Q1_special"]}}]}},{id:"7-1",prerequisites:["7-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q7-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"key",ID:9,N:1}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[440,441,442]}}}],localizationKey:"",metadata:{locations:[`${V.A_.SKYWATCH}-E1`,`${V.A_.SKYWATCH}-E3`]}},{id:"8-0",prerequisites:["7-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchCloudMiniboss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCH}-B3`]}},{id:"8-1",prerequisites:["8-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q8-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"outfit",ID:5,N:1}],additionalDialogueIds:{precedingDialogue:[415],succeedingDialogue:[443]}}}],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCH}-B3`]}},{id:"9-0",prerequisites:["8-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchCloudMiniboss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCH}-C4`]}},{id:"9-1",prerequisites:["9-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q9-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200}],additionalDialogueIds:{precedingDialogue:[414],succeedingDialogue:[444]}}}],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCH}-C4`]}},{id:"10-0",prerequisites:["9-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchCloudMiniboss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCH}-D3`]}},{id:"10-1",prerequisites:["10-0"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q10-end`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"spellRelic",ID:8,N:1}],additionalDialogueIds:{precedingDialogue:[415,460],succeedingDialogue:[445,446,447]}}}],localizationKey:"QUESTS_SKYWATCH_TRIM_VINES",metadata:{locations:[`${V.A_.SKYWATCH}-D3`]}},{id:"11-0",prerequisites:["10-1"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchQ11Bitbots}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_FIND_EUGENE",metadata:{locations:[`${V.A_.SKYWATCH}-E2`]}},{id:"11-1",prerequisites:["11-0"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCH}-E2`}},onComplete:[{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"hat",ID:8,N:1}],additionalDialogueIds:{precedingDialogue:[464,465,466,467,468,469]}}}],localizationKey:"QUESTS_SKYWATCH_FIND_EUGENE",metadata:{locations:[`${V.A_.SKYWATCH}-E2`]}},{id:"11-2",prerequisites:["11-1"],completionRequirements:{type:j.T.COMPLETE_CUTSCENE,data:{id:`${V.A_.SKYWATCH}-Q11-end`}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[415,448,449,450]}}],localizationKey:"QUESTS_SKYWATCH_FIND_EUGENE",metadata:{locations:[`${V.A_.SKYWATCH}-E2`]}},{id:"12-0",prerequisites:["11-2"],completionRequirements:{type:j.T.COLLECT_ITEM,data:{type:"item",id:82,target:2}},onComplete:[{type:$.s.REMOVE_UNSECURE_ITEM,data:{itemDrops:[{type:"item",ID:82,N:2}]}},{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[414],clearExistingDialogue:!1}},{type:$.s.GOT_ITEM,data:{itemDrops:[{type:"gold",ID:1,N:200},{type:"item",ID:83,N:1}],additionalDialogueIds:{succeedingDialogue:[451,452]}}},{type:$.s.SEND_QUEST_EVENT_VIA_HUB,data:{eventType:j.T.BUTTON_CLICK,eventData:{id:`${V.A_.SKYWATCH}-collect-key-parts`}}}],localizationKey:"QUESTS_SKYWATCH_COLLECT_KEY_PARTS",metadata:{locations:[{location:`${V.A_.SKYWATCH}-D3`,disallowedStates:{"quest-state-0":1}},{location:`${V.A_.SKYWATCH}-C3`,disallowedStates:{"quest-state-1":1}}]}},{id:"13-0",prerequisites:["12-0"],completionRequirements:{type:j.T.WIN_BATTLE,data:{type:F.gu.SkywatchCloudBoss}},onComplete:[],localizationKey:"QUESTS_SKYWATCH_DEFEAT_BOSS",metadata:{locations:[`${V.A_.SKYWATCH}-E4`]}},{id:"13-1",prerequisites:["13-0"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCH}-E4`}},onComplete:[{type:$.s.PLAY_DIALOGUE,data:{dialogueIDs:[51]}},{type:$.s.OFFER_TELEPORT,data:{dialogueID:1753,targetMapTag:"skywatch-A1",position:{x:600,y:360}}}],localizationKey:"QUESTS_SKYWATCH_DEFEAT_BOSS",metadata:{locations:[`${V.A_.SKYWATCH}-E4`]}},{id:"13-2",prerequisites:["13-1"],completionRequirements:{type:j.T.ENTER_MAP,data:{id:`${V.A_.SKYWATCH}-A1`}},onComplete:[{type:$.s.GOT_ITEM,data:{additionalDialogueIds:{precedingDialogue:[453,454,455]},itemDrops:[{type:"spellRelic",ID:9,N:1},{type:"key",ID:10,N:1}]}}],localizationKey:"QUESTS_SKYWATCH_TALK_TO_BENNI",metadata:{locations:[`${V.A_.SKYWATCH}-A1`]}}]}},18587:(k,B,U)=>{"use strict";U.d(B,{R:()=>lt});var F=U(8674),G=U(62459),j=U(26738),$=U(89067),H=U(98938),V=U(58776),W=U(62886),q=U(29891),K=U(24522),z=U(51151),Y=U(65240),Q=U(61468),X=U(53151),Z=U(40579),J=U(35120),tt=U(65050),et=U(67665),it=U(13956),st=U(25480),nt=U(69698),at=U(46014),rt=U(76007),ot=U(9475),ht=U(79368),ct=U(97806),dt=U(96165);class lt extends ht.k{constructor(){super(...arguments),this._tags=[H.t.BattlePass],this._latestDataVersion=0,this._getDataQueue=[],this.onDataChanged=new G.HN0,this.onSlowServerRequest=new G.HN0,this.onAllSlowServerRequestsCompleted=new G.HN0,this.onQuestRewardAutoCollected=new G.HN0,this._currentSlowRequestCount=0,this._lastQuestEventTime=0,this._timeouts={},this._slowRequests={},this._requestCount=0,this._lastProcessedVersion=0,this._battlePassPetIds=null}setup(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=J.q.instance.prodigy.gameContainer.get("737-e070");this._battleQuestEventHandler=k,this._battleQuestEventHandler.onChange.add(this.questProgressCallback,this),this.rollOverCompletedQuests().catch(G.RQr.createHandler("Error rolling over completed quests for the battle pass")),this.completeRootTask().catch(G.RQr.createHandler("Error completing root task for the battle pass")),X.h.isFeatureEnabled()&&this.claimAllUnclaimedQuests().catch(G.RQr.createHandler("Error claiming all unclaimed quests in the battle pass")),this.onDataChanged.add((()=>{this.setupBonusQuestRollover(),this.setupSeasonRollover(),this.sendHudButtonData()}))}))}cleanup(){this.onDataChanged.dispose(),this.onSlowServerRequest.dispose(),this.onAllSlowServerRequestsCompleted.dispose(),this.onQuestRewardAutoCollected.dispose(),this._battleQuestEventHandler.onChange.remove(this.questProgressCallback,this),super.cleanup()}getTasksInProgress(k,B,U){const G=Object.create(null,{getTasksInProgress:{get:()=>super.getTasksInProgress}});return(0,F.sH)(this,void 0,void 0,(function*(){const F=this.getCurrentQuestID()?[this.getCurrentQuestID()]:B;return G.getTasksInProgress.call(this,k,F,U)}))}getCurrentBattlePassData(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;if(void 0===this._currentBattlePass&&(yield this.updateBattlePassData()),null===this._currentBattlePass)return null;const B=this._latestDataVersion!==(null===(k=this._currentBattlePass)||void 0===k?void 0:k.dataVersion),U=this._getDataQueue.length>0;return(B||U)&&(yield new Promise((k=>this._getDataQueue.push(k)))),this._currentBattlePass}))}getCachedBattlePassData(){return this._currentBattlePass}updateBattlePassData(){return(0,F.sH)(this,void 0,void 0,(function*(){this._latestDataVersion++;const k=this._latestDataVersion,B=yield this.getAllActiveQuestIDs(),U=this._timeManager.getServerTimeMs();let F;for(const W of B){const k=yield this.getQuestMetaData(W);if(new Date(k.startDate).getTime()k.taskDefinition.id)),V),setTimeout((()=>{k===this._latestDataVersion&&(this._currentBattlePass=H,this.dispatchAndClearQueue())}),0))}))}dispatchAndClearQueue(){for(this.onDataChanged.dispatch();this._getDataQueue.length>0;)this._getDataQueue.shift().call(null)}setupBonusQuestRollover(){var k;const B=null===(k=this._currentBattlePass)||void 0===k?void 0:k.getQuestComingSoonDate();if(B){const k=this._timeManager.getServerTimeMs(),U=B.getTime();if(this._bonusQuestRolloverTimeoutId&&window.clearTimeout(this._bonusQuestRolloverTimeoutId),U-k>6048e5)return;this._bonusQuestRolloverTimeoutId=window.setTimeout((()=>{this.updateBattlePassData().catch(G.RQr.createHandler("Failed to refresh battle pass data"))}),U-k)}}setupSeasonRollover(){var k;const B=null===(k=this._currentBattlePass)||void 0===k?void 0:k.getEndDate();if(!B)return;const U=this._timeManager.getServerTimeMs();this._seasonRolloverTimeoutId&&window.clearTimeout(this._seasonRolloverTimeoutId),B-U>6048e5||(this._seasonRolloverTimeoutId=window.setTimeout((()=>{this.onDataChanged.addOnce((()=>{this.completeRootTask().catch(G.RQr.createHandler("Error completing root task for the battle pass"))})),this.updateBattlePassData().catch(G.RQr.createHandler("Failed to refresh battle pass data"))}),B-U))}preloadPreviousUnclaimedRewards(){return(0,F.sH)(this,void 0,void 0,(function*(){0!==(yield this._networkHandler.getPastUnclaimedRewards()).unclaimedRewards.length&&(this._unclaimedRewardsMail=new z.MailData({isOpened:!1,subject:this._localizer.getText("BATTLE_PASS_UNCLAIMED_REWARDS_MAIL_SUBJECT"),sendDate:Date.now().toString(),extension:{name:at.R.BattlePass,deleteMailOnClose:!1,trashButtonVisible:!1}}))}))}getUnclaimedRewardsMail(){return this._unclaimedRewardsMail}claimUnclaimedBattlePassRewards(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._segment.quests.beginQuestEventTransaction(),B=yield this._networkHandler.claimPastUnclaimedReward(),U=[];let F=[];B.unclaimedRewards.forEach((k=>{k.type===q.s.GOT_ITEM?F.push(k.data):k.type===q.s.GIVE_ULTIMATE&&U.push(k.data)}));for(const G of U)yield new ct.N(null,null).doTask({id:G.ID,showPetMenu:!1,sourceType:Y.C.BattlePass});for(F=st.u.mergeItems(F);F.length>0;){const k=F.splice(0,5);yield new dt.I("mailer","mailer").doTask({itemDrops:k,sourceType:Y.C.BattlePass})}this._unclaimedRewardsMail=void 0,k.flush({})}))}preSendQuestEventViaHub(k,B){const U=Object.create(null,{preSendQuestEventViaHub:{get:()=>super.preSendQuestEventViaHub}});return(0,F.sH)(this,void 0,void 0,(function*(){if(!this.getCurrentQuestID())return{manager:this,questIDs:[],tags:[]};const F=yield this.battlePassPreSendQuestEvent(),G=yield U.preSendQuestEventViaHub.call(this,k,B);return Object.assign(Object.assign({},G),{requestID:F})}))}battlePassPreSendQuestEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){this._lastQuestEventTime=Date.now(),this._requestCount+=1;const k=this._requestCount;return this._slowRequests[k]=!1,this._timeouts[k]=window.setTimeout((()=>{this._slowRequests[k]=!0,this._currentSlowRequestCount++,Date.now()>=this._lastQuestEventTime+1500&&this.onSlowServerRequest.dispatch()}),1500),k}))}sendQuestEvent(k,B,U){const G=Object.create(null,{sendQuestEvent:{get:()=>super.sendQuestEvent}});return(0,F.sH)(this,void 0,void 0,(function*(){var U;const F=null!==(U=this._currentBattlePass)&&void 0!==U?U:yield this.getCurrentBattlePassData(),j=null==F?void 0:F.getQuestID();if(!j)return{activeQuests:[],inactiveQuests:[]};const $=yield this.battlePassPreSendQuestEvent(),H=yield G.sendQuestEvent.call(this,k,B,[j]);return yield this.battlePassPostSendQuestEvent(H,$),H}))}postSendQuestEventViaHub(k,B){const U=Object.create(null,{postSendQuestEventViaHub:{get:()=>super.postSendQuestEventViaHub}});return(0,F.sH)(this,void 0,void 0,(function*(){(this._currentBattlePass||(yield this.getCurrentBattlePassData()))&&(yield U.postSendQuestEventViaHub.call(this,k),yield this.battlePassPostSendQuestEvent(k,B))}))}battlePassPostSendQuestEvent(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U;if(k&&k.activeQuests.length>0){const k=null!==(U=this._currentBattlePass)&&void 0!==U?U:yield this.getCurrentBattlePassData();yield this.updateQuestDataAndProcessDifferences(k)}B&&(this._timeouts[B]&&(window.clearTimeout(this._timeouts[B]),delete this._timeouts[B]),void 0!==this._slowRequests[B]&&(this._slowRequests[B]&&(this._currentSlowRequestCount--,0===this._currentSlowRequestCount&&this.onAllSlowServerRequestsCompleted.dispatch()),delete this._slowRequests[B]))}))}questProgressCallback(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B;if(!k.progressResponses)return;for(const F of k.progressResponses)yield this.processQuestProgressResponse(F);const U=null!==(B=this._currentBattlePass)&&void 0!==B?B:yield this.getCurrentBattlePassData();yield this.updateQuestDataAndProcessDifferences(U)}))}updateQuestDataAndProcessDifferences(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(!k)return;yield this.updateBattlePassData();const B=yield this.getCurrentBattlePassData();B&&B.dataVersion!==this._lastProcessedVersion&&(this.processQuestProgress(k,B),this._lastProcessedVersion=B.dataVersion)}))}processQuestProgress(k,B){const U=[],F=new Map;null==k||k.getTasks().forEach((k=>{k.taskDefinition.metadata.questGoalTaskType===j.x.GOAL&&(k.taskProgress.status===V.t.COMPLETE?U.push(k.taskID):k.taskProgress.status===V.t.IN_PROGRESS&&F.set(k.taskID,k))}));const $=[],H=[];null==B||B.getTasks().forEach((k=>{k.taskDefinition.metadata.questGoalTaskType===j.x.GOAL&&(k.taskProgress.status===V.t.COMPLETE?$.push(k.taskID):k.taskProgress.status===V.t.IN_PROGRESS&&H.push(k))}));const W=J.q.instance.prodigy.gameContainer.get("c47-20b6");Q.l.getAddedItems(U,$).forEach((k=>{var U;const F=null==B?void 0:B.getTasks().find((B=>B.taskID===k));if(!F)return;const j=null==B?void 0:B.getQuests().find((B=>B.goalTaskId===k));if(!j)return;W.battlePass.sendQuestGoalCompleteEvent(F);const $=null!==(U=j.reward.battlePassXp)&&void 0!==U?U:0;let H="default";X.h.isFeatureEnabled()&&(H="auto_collected",this.sendRewardClaimedEvent(j.reward.rewardId).then((()=>this.onQuestRewardAutoCollected.dispatch(j))).catch(G.RQr.createHandler(`Failed to claim battle pass reward ${j.reward.rewardId}`))),et.Y.track("Player Progression Points Earned",{point_type:"treasure_points",point_count:$,instance_type:tt.N.BattlePass,instance_id:B.getSeasonName(),transaction_id:W.battlePass.goalCompleteTransactionId,claim_type:H})})),H.forEach((k=>{var B,U,G,j,$,H,V;const q=null===(G=null===(U=null===(B=k.taskDefinition.preconditions)||void 0===B?void 0:B.find((k=>k.type===K.n.DATE_BEFORE)))||void 0===U?void 0:U.data)||void 0===G?void 0:G.date,z=F.get(k.taskID),Y=null!==($=null===(j=null==z?void 0:z.taskProgress.data)||void 0===j?void 0:j.progress)&&void 0!==$?$:0;Y!==(null===(H=k.taskProgress.data)||void 0===H?void 0:H.progress)&&W.battlePass.sendQuestGoalUpdatedEvent(k,(null===(V=k.taskProgress.data)||void 0===V?void 0:V.progress)-Y,q)}))}sendRewardClaimedEvent(k){return(0,F.sH)(this,arguments,void 0,(function*(k,B=1){yield this.sendQuestEvent(W.T.BUTTON_CLICK,{id:k,progressToAdd:B})}))}sendFtueViewedEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=(yield this.getCurrentBattlePassData()).getFtueTask();k&&!k.isCompleted&&(yield this.sendQuestEvent(W.T.BUTTON_CLICK,{id:k.buttonId}))}))}sendGainPetXpEvent(k){return(0,F.sH)(this,void 0,void 0,(function*(){k<=0||(yield this.sendQuestEvent(W.T.GAIN_PET_XP,{progressToAdd:k}))}))}rollOverCompletedQuests(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.getCurrentBattlePassData();if(null===k)return;const B=[];for(const U of this._currentBattlePass.getQuests())U.isExpired&&U.reward.claimable&&B.push(U.claimTaskId);if(B.length>0){const U=yield this._networkHandler.completeExpiredClaimQuests(k.getQuestID(),B);yield this.processQuestProgressResponse(U),yield this.updateBattlePassData()}}))}getBattlePassXpData(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B;const U=null!=k?k:null===(B=yield this.getCurrentBattlePassData())||void 0===B?void 0:B.getQuestID();if(U)return this._currentBattlePassXp||(this._currentBattlePassXp=(yield this._networkHandler.getBattlePassXpData(U)).data),this._currentBattlePassXp}))}completeRootTask(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.getCurrentBattlePassData();if(null===k)return;const B=k.getTasks().find((k=>"root"===k.taskID));B&&(yield this.sendQuestEvent(B.type,Object.assign({},B.taskDefinition.completionRequirements.data)))}))}claimAllUnclaimedQuests(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.getCurrentBattlePassData();null!==k&&k.getCompletedUnclaimedQuests().forEach((k=>{this.sendRewardClaimedEvent(k.reward.rewardId).catch(G.RQr.createHandler(`Failed to claim battle pass reward ${k.reward.rewardId}`))}))}))}getCurrentQuestID(){if(this._currentBattlePass)return this._currentBattlePass.getQuestID()}sendHudButtonData(){this.getCurrentBattlePassData().then((k=>{if(!G.Aq$.isDefined(k))return;const B=this._currentBattlePass.getNumUnclaimedRewards()+this._currentBattlePass.getUnclaimedQuestCount();if(this._hudService.updateNotificationBadge($.ts.TreasureTrack,B),B>0){const k=J.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);this._hudService.updateCachedLabelData($.ts.TreasureTrack,{labelValue:k.getText("PLUS_ULTRA_BONUS_COLLECT")})}else{const B=J.q.instance.prodigy.gameContainer.get("a03-308f"),U=k.getEndDate()-B.getServerTimeMs();this._hudService.updateCachedLabelData($.ts.TreasureTrack,{labelValue:U})}})).catch(G.RQr.createHandler("BattlePassQuestManager: Could not send hud button data."))}buildBattlePassPetIdsCache(){const k=this._currentBattlePass;if(!k)return void(this._battlePassPetIds=new Set);const B=new Set;k.getMythicalEpicPetIds().forEach((k=>B.add(k))),k.getBattlePassChasePets().forEach((k=>B.add(k))),this._battlePassPetIds=B}isPetBattlePassReward(k){return null===this._battlePassPetIds&&this.buildBattlePassPetIdsCache(),this._battlePassPetIds.has(k)}reenter(){this.setupBonusQuestRollover(),this.setupSeasonRollover()}}(0,F.Cg)([(0,it.b)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],lt.prototype,"_localizer",void 0),(0,F.Cg)([(0,it.b)("b26-31af"),(0,F.Sn)("design:type",rt.k)],lt.prototype,"_networkHandler",void 0),(0,F.Cg)([(0,it.b)("a03-308f"),(0,F.Sn)("design:type",nt.V)],lt.prototype,"_timeManager",void 0),(0,F.Cg)([(0,it.b)("cc9-a3f0"),(0,F.Sn)("design:type",Z.W)],lt.prototype,"_hudService",void 0)},60031:(k,B,U)=>{"use strict";U.d(B,{k:()=>st});var F,G,j=U(8674),$=U(62459),H=U(79687);!function(k){k.SinglePetChasePrize="SinglePetChasePrize"}(F||(F={})),function(k){k.STANDARD_TRACK_QUEST_TAG="standard-quest-track",k.ULTIMATE_TRACK_QUEST_TAG="ultimate-quest-track"}(G||(G={}));var V=U(98938),W=U(35120),q=U(34829),K=U(96810),z=U(13956),Y=U(68152);const Q=Math.pow(2,31)-1;function X(){let k;return function B(U,F){(0,Y.v)($.Aq$.isDefined(U),"Timeout expects a non-nullish endTime."),(0,Y.v)("number"==typeof U||U instanceof Date,"Timeout expects a Date object or a number. Received: "+typeof U),clearTimeout(k);const G=Date.now();let j="number"==typeof U?U:U.getTime()-G;(0,Y.v)(j>0,"Timeout expects a positive duration.");let H=0;j>Q&&(H=j-Q,j=Q),k=setTimeout((()=>{clearTimeout(k),H>0?B(H,F):null==F||F()}),j)}}var Z=U(69698),J=U(79368),tt=U(58776),et=U(89067),it=U(40579);let st=class extends J.k{constructor(){super(...arguments),this._ultimateTimer=X(),this._standardTimer=X(),this.onDataChanged=new $.HN0,this.onTimeUpdated=new $.HN0,this._tags=[V.t.DailyLoginCalendar]}setup(){return(0,j.sH)(this,void 0,void 0,(function*(){this.sendHudButtonData().catch($.RQr.createHandler("DailyLoginCalendarQuestManager: Failed to send HUD button data."))}))}sendQuestEvent(k,B,U){const F=Object.create(null,{sendQuestEvent:{get:()=>super.sendQuestEvent}});return(0,j.sH)(this,void 0,void 0,(function*(){var U;const j=yield this.getActiveQuestId(G.STANDARD_TRACK_QUEST_TAG),H=yield this.getActiveQuestId(G.ULTIMATE_TRACK_QUEST_TAG);if(!$.Aq$.isDefined(j)||!$.Aq$.isDefined(H))return $.VyI.log("Daily Login Calendar did not have an active Standard and Ultimates track",$.$bb.Error),{activeQuests:[],inactiveQuests:[]};const V=yield F.sendQuestEvent.call(this,k,B,[j,H]),W=V.activeQuests.find((k=>k.id===j));return this.sendQuestProgressUpdateEvent(yield this.getActiveStandardTrack(),null!==(U=null==W?void 0:W.tasks)&&void 0!==U?U:[]),this.onDataChanged.dispatch(),V}))}sendQuestProgressUpdateEvent(k,B){var U,F;if(0===B.length)return;const G=(null!==(F=null===(U=B[B.length-1].data)||void 0===U?void 0:U.timesCompleted)&&void 0!==F?F:0)>0?B.length:B.length-1,j=G+2,$="daily_login_calendar",H="feature";let V=K.l.DailyLoginCalendarNthReward;1===G?(V=K.l.DailyLoginCalendarFirstReward,this._segment.playerProgression.sendFunnelAdvancedEvent({funnelName:$,funnelType:H,stepName:K.l.DailyLoginCalendarAssigned},{step_index:1}),this._segment.playerProgression.sendFunnelAdvancedEvent({funnelName:$,funnelType:H,stepName:K.l.DailyLoginCalendarViewed},{step_index:2})):G===k.length-1?V=K.l.DailyLoginCalendarComplete:G===k.length&&(V=K.l.DailyLoginCalendarLoopingReward),this._segment.playerProgression.sendFunnelAdvancedEvent({funnelName:$,funnelType:H,stepName:V},{step_index:j},!0)}getActiveStandardTrack(){return(0,j.sH)(this,void 0,void 0,(function*(){return this.getActiveQuestTrack(G.STANDARD_TRACK_QUEST_TAG)}))}getActiveUltimateTrack(){return(0,j.sH)(this,void 0,void 0,(function*(){return this.getActiveQuestTrack(G.ULTIMATE_TRACK_QUEST_TAG)}))}getActiveQuestTrack(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=yield this.getActiveQuestId(k);return $.Aq$.isDefined(B)?this.getQuestTasks(B):[]}))}getActiveStandardTrackMetadata(){return(0,j.sH)(this,void 0,void 0,(function*(){const k=yield this.getActiveQuestTrackMetadata(G.STANDARD_TRACK_QUEST_TAG);return this.updateToNewEventTimer(k.endDate,this._standardTimer),k}))}getActiveUltimateTrackMetadata(){return(0,j.sH)(this,void 0,void 0,(function*(){const k=yield this.getActiveQuestTrackMetadata(G.ULTIMATE_TRACK_QUEST_TAG);return this.updateToNewEventTimer(k.endDate,this._ultimateTimer),k}))}updateToNewEventTimer(k,B){B(this.getDurationUntilCron(k),(()=>{this.forceUpdate()}))}forceUpdate(){this.clearQuestID(),this.forceEnableDataUpdate(),this.onDataChanged.dispatch()}getDurationUntilCron(k){let B=Math.max(k-this._timeManager.getServerTimeMs(),0);return B+=q.A.MINUTES_IN_MS,B+=3*q.A.SECONDS_IN_MS,B}getActiveQuestTrackMetadata(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=yield this.getActiveQuestId(k);return $.Aq$.isDefined(B)?yield this.getQuestMetaData(B):{uuid:"",startDate:Date.now()-2*q.A.DAY_IN_MS,endDate:Date.now()-q.A.DAY_IN_MS}}))}getActiveQuestId(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=yield this.getAllActiveQuestIDs([k]);if(B.length<1)return void $.VyI.log("No active quests found for Daily Login Calendar",$.$bb.Error);const U=this.getCachedQuestIdByTag(k);if($.Aq$.isDefined(U))return U;const F=this._timeManager.getServerTimeMs();for(const G of B){const B=yield this.getQuestMetaData(G);if(new Date(B.startDate).getTime()k.taskProgress.status===tt.t.IN_PROGRESS)),G=(yield this.getActiveStandardTrackMetadata()).endDate,j=Math.min(null!==(B=null===(k=null==F?void 0:F.taskProgress.data)||void 0===k?void 0:k.progress)&&void 0!==B?B:G,G);return{targetDate:j,calendarIsEnding:j===G,calendarEnded:U>=G}}))}sendHudButtonData(){return(0,j.sH)(this,void 0,void 0,(function*(){const k=(yield this.getTimerData()).targetDate-W.q.instance.prodigy.gameContainer.get("a03-308f").getServerTimeMs();this._hudService.updateCachedLabelData(et.ts.LoginRewards,{labelValue:k})}))}};(0,j.Cg)([(0,z.b)("a03-308f"),(0,j.Sn)("design:type",Z.V)],st.prototype,"_timeManager",void 0),(0,j.Cg)([(0,z.b)("cc9-a3f0"),(0,j.Sn)("design:type",it.W)],st.prototype,"_hudService",void 0),st=(0,j.Cg)([(0,H.injectable)()],st)},55080:(k,B,U)=>{"use strict";U.d(B,{s:()=>gt});var F,G=U(8674),j=U(62459),$=U(79687),H=U(99625),V=U(10471),W=U(34656),q=U(64270),K=U(89067),z=U(98938),Y=U(58776),Q=U(8394),X=U(65240);!function(k){k.Bundle="bundle"}(F||(F={}));var Z=U(66582),J=U(88131),tt=U(35120),et=U(91620),it=U(40579),st=U(77938),nt=U(73797),at=U(46784),rt=U(65050),ot=U(41674),ht=U(90744),ct=U(13956),dt=U(21097),lt=U(53661),ut=U(10711),ft=U(55328),bt=U(64868),pt=U(43754),vt=U(79368);class gt extends vt.k{constructor(){super(...arguments),this._tags=[z.t.DynamicStore],this._defeatedPetOffers=[],this.onDefeatedPetOffersUpdated=new j.HN0,this.onStoreOffersUpdated=new j.HN0,this._nextStoreExpiryCache=-1,this._pendingOfferTriggers=[],this._triggeredOffersThisSession=[]}setup(){return(0,G.sH)(this,void 0,void 0,(function*(){this.updateDefeatedPetOffers().catch(j.RQr.createHandler("Could not get defeated pet offers.")),this.sendHudButtonData().catch(j.RQr.createHandler("DynamicStoreQuestManager: Could not send HUD button data."));tt.q.instance.prodigy.gameContainer.get("737-e070").onChange.add(this.questProgressCallback,this),this.preloadQuestProgress().catch(j.RQr.createHandler("Error preloading quest progress for dynamic store"))}))}cleanup(){this.onStoreOffersUpdated.dispose(),this.onDefeatedPetOffersUpdated.dispose(),super.cleanup()}getDefeatedPetOffers(){return this._defeatedPetOffers}getResetTime(){return this._resetTime}updateDefeatedPetOffers(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;this.forceEnableDataUpdate();const B=(yield this.getStoreOffers(q.GA.PetShop)).expect().sections.find((({id:k})=>k===q.Xx.DefeatedPets));if(!(null==B?void 0:B.expiresAt))return j.VyI.log("Could not find a valid Defeated Pets section in store, returning empty set",j.$bb.Error,B),{defeatedPetOffers:[],resetTime:new Date};this._resetTime=new Date(B.expiresAt),this._defeatedPetOffers=B.offers;const U={resetTime:this._resetTime,defeatedPetOffers:B.offers};return null===(k=this.onDefeatedPetOffersUpdated)||void 0===k||k.dispatch(U),this.sendHudButtonData().catch(j.RQr.createHandler("DynamicStoreQuestManager: Could not send HUD button data.")),U}))}getStoreOffers(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this._networkHandler.getStoreOffers(k)}))}getNextOfferExpiry(){return(0,G.sH)(this,void 0,void 0,(function*(){if(-1===this._nextStoreExpiryCache&&(this._nextStoreExpiryCache=yield this._networkHandler.getNextSectionExpiry()),this._segmentedOffers.userCanReceiveSegmentedOffers()){const k=yield this._segmentedOffers.getActiveOfferAsync();if(j.Aq$.isDefined(k)){const B=new Date(k.endDate).getTime();return Math.min(this._nextStoreExpiryCache,B)}}return this._nextStoreExpiryCache}))}purchaseItem(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;tt.q.instance.game.broadcaster.broadcast(nt.zg.PurchaseStarted);const{offer:U,storeKey:G,storeCategory:j,categoryId:$,itemSegmentData:H}=Object.assign({},k);yield this.preloadQuestProgress();const V=(0,ut.uA)(U,((k,B)=>{var U;return null===(U=st.t.getItem(k,B))||void 0===U?void 0:U.data})),q=W.j.getItemRewards(U.task),K=q[0],z=q.length>1,Y=(0,Q.p)(null!==(B=V.type)&&void 0!==B?B:"currency",V.currency),Z=this._segment.quests.beginQuestEventTransaction(),J=this._segment.shop.getDynamicStoreSourceId(G),et=this._segment.shop.startDynamicStoreTransaction(J),it="string"==typeof k.itemSegmentData.instance_id?k.itemSegmentData.instance_id:this._segment.featureCommon.getCurrentInterfaceID(at.B.UnifiedStore),ot=z?{bundleName:U.task.metadata.displayName}:void 0,ht=this.validateOfferPurchase(U);if(!ht.isSuccess())throw this.broadcastPurchaseFailed(ht.error),this._segment.shop.sendDynamicStorePurchaseFailedEvent({storeKey:G,itemType:z?F.Bundle:K.type,itemId:z?+U.task.id:K.ID,cost:V,category:j,categoryId:$,instanceId:it,bundleData:ot,failReason:ht.error,funnelId:this._segment.purchase.getFunnelID()}),new Error(`Error purchasing item: ${ht.error}`);this._lastTransactionStoreName=G;const ct=yield this._networkHandler.purchaseItem(U.task.id,et);if(!ct.activeQuests.find((k=>k.id===gt.STORE_QUEST_ID)))throw Z.flush({}),this.broadcastPurchaseFailed(dt.WE.ServerPurchaseFailed),new Error("Error purchasing item. Cloudscript item purchase did not go through");return Y||(yield this._paymentManager.spend(V,"dynamicStore",Object.assign(Object.assign({},H),{transaction_id:et,instance_type:rt.N.ShopVisit,instance_id:it,sink_id:J,sink_type:X.C.Shop,sink_name:G}))),this.forceEnableDataUpdate(),yield this.processQuestProgressResponse(ct,{customSegmentData:{instance_type:rt.N.ShopVisit,interface_name:at.B.UnifiedStore,transaction_id:et,instance_id:it,source_name:G}}),Z.flush(Object.assign(Object.assign({},H),{transaction_id:et,instance_type:rt.N.ShopVisit,instance_id:it,source_id:J,source_type:X.C.Shop,source_name:G,sink_id:J,sink_type:X.C.Shop,sink_name:G})),this._segment.shop.sendDynamicStorePurchaseCompletedEvent({storeKey:G,itemType:z?F.Bundle:K.type,itemId:z?+U.task.id:K.ID,cost:V,category:j,categoryId:$,instanceId:it,bundleData:ot}),tt.q.instance.prodigy.game.broadcaster.broadcast(nt.zg.PurchaseSuccessful),!0}))}sendHudButtonData(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=(yield this.getNextOfferExpiry())-tt.q.instance.prodigy.gameContainer.get("a03-308f").getServerTimeMs();this._hudService.updateCachedLabelData(K.ts.Shop,{labelValue:k});const B=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=this.getDefeatedPetOffers();let F=0;if(j.Aq$.isDefined(B.data.dynamicStore)){let k=0;for(const F of U)B.data.dynamicStore.seenOffers[F.task.id]&&++k;F=U.length-k}else F=U.length;this._hudService.updateNotificationBadge(K.ts.Shop,F)}))}getLastTransactionStore(){return this._lastTransactionStoreName}questProgressCallback(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(j.Aq$.isDefined(k.progressResponses))for(const B of k.progressResponses)yield this.processQuestProgressResponse(B)}))}validateOfferPurchase(k){var B,U;if((null!==(B=k.expiresAt)&&void 0!==B?B:1/0)<=tt.q.instance.prodigy.timeManager.getLocalTimeMs())return J.Q.error(dt.WE.OfferExpired);const F=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=(0,ut.uA)(k,((k,B)=>{var U;return null===(U=st.t.getItem(k,B))||void 0===U?void 0:U.data})),j=W.j.getItemRewards(k.task);if((0,ut.H9)(j)&&F.getMemberTier()===Z._$.NonMember)return J.Q.error(dt.WE.MemberLocked);if((0,ut.$U)(j,F.getLevel()))return J.Q.error(dt.WE.LevelLocked);if(!this._paymentManager.canAfford(G)){const k=(0,Q.p)(null!==(U=G.type)&&void 0!==U?U:"currency",G.currency);return J.Q.error(k?dt.WE.NotEnoughCurrency:dt.WE.NotEnoughUnsecureCurrency)}return J.Q.success(!0)}broadcastPurchaseFailed(k){tt.q.instance.game.broadcaster.broadcast(nt.zg.PurchaseFailed,void 0,[k])}queueStoreOfferTrigger(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=!1){if(this._triggeredOffersThisSession.includes(k)||!bt._.areBundlesEnabled())return;const U=(yield this.getTasksInProgress()).find((B=>B.taskID===k));if(j.Aq$.isDefined(U)){const k=U.taskDefinition;this._pendingOfferTriggers.push({questId:gt.STORE_QUEST_ID,task:k,progress:{id:k.id,status:Y.t.IN_PROGRESS}}),B&&(yield this.triggerCurrentOffer())}}))}canTriggerOffer(){return bt._.isFeatureEnabled()&&this._pendingOfferTriggers.length>0}triggerCurrentOffer(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._pendingOfferTriggers.shift();if(!j.Aq$.isDefined(k))return;const B=(0,ut.K8)([k])[0],U=B.dynamicStoreData.isNew,F=B.additionalItems.map((k=>({[lt.AP.ItemCardData]:{item:st.t.getItem(k.type,k.ID),quantity:k.N},[lt.AP.ItemCardIsNew]:U}))),G=(0,Q.p)("currency",B.currencyID)&&V.h.includes(B.currencyID)&&this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(B.currencyAmount),$=`bundle_${B.dynamicStoreData.offers[0].task.id}`,W={DYNAMIC_STORE_BUNDLE_OFFER_TITLE:B.dynamicStoreData.title,DYNAMIC_STORE_BUNDLE_OFFER_SUBTITLE:B.dynamicStoreData.subtitle,DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_DATA:[{PET_ID:B.item.ID}],DYNAMIC_STORE_BUNDLE_OFFER_FOCUS_NAME:B.item.data.name,DYNAMIC_STORE_BUNDLE_ADDITIONAL_OFFERS:F,DYNAMIC_STORE_BUNDLE_PURCHASE_BUTTON_CALLBACK:()=>{this._segment.featureCommon.sendButtonEvent({buttonName:$,interfaceType:ot.Wm.Modal,interfaceName:$});const B={offer:k,storeKey:q.GA.OfferPopup,storeCategory:k.task.metadata.category,categoryId:k.task.metadata.category,itemSegmentData:{instance_type:rt.N.Interface,instance_id:this._segment.featureCommon.getCurrentInterfaceID(at.B.StoreBundlesPopup),sink_type:"bundle",sink_id:k.questId}};this.purchaseItem(B).catch(j.RQr.createHandler("Error purchasing triggered bundle"))},DYNAMIC_STORE_BUNDLE_PRICE_AMOUNT:B.currencyAmount,DYNAMIC_STORE_BUNDLE_PRICE_CURRENCY:B.currencyID,DYNAMIC_STORE_BUNDLE_IS_NEW:U,DYNAMIC_STORE_BUNDLE_HARD_CURRENCY_LOCKED:G};this._triggeredOffersThisSession.push(k.task.id),yield new Promise((k=>{tt.q.instance.prodigy.open.prefabMenu(H.l.StoreBundlePopup,k,void 0,void 0,void 0,Object.assign(Object.assign({},W),{BUNDLE_POPUP_INTERFACE_NAME:$}))}))}))}getCurrentQuestID(){return gt.OFFER_TRIGGER_QUEST_ID}}gt.STORE_QUEST_ID="DynamicStoreItems",gt.OFFER_TRIGGER_QUEST_ID="DynamicStoreOfferTriggers",(0,G.Cg)([(0,$.inject)("743-fd51"),(0,G.Sn)("design:type",ht.E)],gt.prototype,"_paymentManager",void 0),(0,G.Cg)([(0,$.inject)("9ea-3f44"),(0,G.Sn)("design:type",ft.v)],gt.prototype,"_networkHandler",void 0),(0,G.Cg)([(0,$.inject)("a02-c2b2"),(0,G.Sn)("design:type",et.D)],gt.prototype,"_segmentedOffers",void 0),(0,G.Cg)([(0,ct.b)("cc9-a3f0"),(0,G.Sn)("design:type",it.W)],gt.prototype,"_hudService",void 0),(0,G.Cg)([(0,ct.b)("5c7-e02d"),(0,G.Sn)("design:type",pt.W)],gt.prototype,"_hardCurrencyDataProvider",void 0)},53037:(k,B,U)=>{"use strict";U.d(B,{q:()=>gt});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U.n($),V=U(51540),W=U(57797),q=U(98938),K=U(58776),z=U(24522),Y=U(61468),Q=U(35120),X=U(13956),Z=U(69698),J=U(15821);class tt{constructor(k){this._experimentFeatureTaskIds=[],this._questId=k.questId,this._metaData=k.metadata,this._progressTasks=k.allTasks,this._questStates=k.states,this._videoAssets=k.videos,this._seenCompletedTasks=k.seenCompletedTasks,this.dataVersion=k.dataVersion}parseTaskData(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;const F=[],G=[];for(let j=0;j{var B,U;return k.taskProgress.status===K.t.COMPLETE||(null!==(U=null===(B=k.taskProgress.data)||void 0===B?void 0:B.progress)&&void 0!==U?U:0)>0}))}getQuestById(k){return this._progressTasks.find((B=>B.taskID===k))}getUnclaimedQuestCount(k,B=!0){let U=0,F=0,G=0,j=0,$=0,H=0;return this._progressTasks.filter((B=>{var U;return!k||(null===(U=B.taskDefinition.metadata)||void 0===U?void 0:U.questGoalType)===k})).forEach((k=>{var V,W,q;if(k.taskProgress.status!==K.t.COMPLETE)return;if(!B&&k.getTimeUntilExpiry()<0)return;const z=this._claimTasks.find((B=>B.taskID===`${k.taskID}-${gt.FESTIVAL_CLAIM_STRING}`));z&&(null==z?void 0:z.taskProgress.status)!==K.t.COMPLETE&&!(null===(V=null==z?void 0:z.taskProgress.data)||void 0===V?void 0:V.timesCompleted)&&(U++,(null===(W=k.taskDefinition.metadata)||void 0===W?void 0:W.isMemberLocked)?F++:G++,this._seenCompletedTasks.taskIds.includes(k.taskID)||(j++,(null===(q=k.taskDefinition.metadata)||void 0===q?void 0:q.isMemberLocked)?$++:H++))})),{unclaimedQuestCount:U,unclaimedMemberCount:F,unclaimedNonMemberCount:G,unseenQuestCount:j,unseenMemberCount:$,unseenNonMemberCount:H}}getVideoAsset(k){var B;const U=null===(B=this._metaData.videoTypes)||void 0===B?void 0:B[k];if(J.A.isDefined(U))return this._videoAssets[U]}updateSeenCompletedTasks(k,B){this._seenCompletedTasks=class{static updateSeenCompletedTasks(k,B,U){var F;const G=[];if(J.A.isDefined(k)&&B===k.festivalId)for(const j of null!==(F=k.taskIds)&&void 0!==F?F:[])G.includes(j)||G.push(j);for(const j of null!=U?U:[])G.includes(j)||G.push(j);return{festivalId:B,taskIds:G}}}.updateSeenCompletedTasks(this._seenCompletedTasks,k,B)}}var et,it=U(79368),st=U(89067),nt=U(40579),at=U(96535),rt=U(77938),ot=U(65240),ht=U(19586),ct=U(65068),dt=U(92240),lt=U(73797),ut=U(94310),ft=U(56567),bt=U(76277),pt=U(71698),vt=U(3374);let gt=et=class extends it.k{constructor(){super(...arguments),this.objectiveTypes=[ct.q.QuestState],this._tags=[q.t.Festival],this._latestDataVersion=0,this._lastProcessedVersion=0,this._getDataQueue=[],this.onDataChanged=new G.HN0,this.onSlowServerRequest=new G.HN0,this.onAllSlowServerRequestsCompleted=new G.HN0,this._currentSlowRequestCount=0,this._lastQuestEventTime=0,this._timeouts={},this._slowRequests={},this._requestCount=0}setup(){return(0,F.sH)(this,void 0,void 0,(function*(){this.onDataChanged.add((()=>{this.sendHudButtonData()})),Q.q.instance.game.broadcaster.addAppListener(lt.H3.MembershipResponseReceived,(()=>{this.sendHudButtonData()}),this),this.completePastFestivals(),yield this.getCurrentFestivalQuestData().catch(G.RQr.createHandler("Error getting quests for festival")),this.completeRootTask().catch(G.RQr.createHandler("Error completing root task for festival quests"));const k=Q.q.instance.prodigy.gameContainer.get("737-e070");this._festivalQuestEventHandler=k,this._festivalQuestEventHandler.onChange.add(this.questProgressCallback,this)}))}cleanup(){this.onDataChanged.dispose(),this.onSlowServerRequest.dispose(),this.onAllSlowServerRequestsCompleted.dispose(),this._festivalQuestEventHandler.onChange.remove(this.questProgressCallback,this),super.cleanup()}reenter(){this._currentFestivalQuests=void 0,this._getProgressPromise=void 0}getTasksInProgress(k,B,U){const G=Object.create(null,{getTasksInProgress:{get:()=>super.getTasksInProgress}});return(0,F.sH)(this,void 0,void 0,(function*(){const F=this.getCurrentQuestID()?[this.getCurrentQuestID()]:B;return G.getTasksInProgress.call(this,k,F,U)}))}getCurrentFestivalQuestData(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;if(void 0===this._currentFestivalQuests&&(yield this.updateFestivalQuestData()),null===this._currentFestivalQuests)return null;const B=this._latestDataVersion!==(null===(k=this._currentFestivalQuests)||void 0===k?void 0:k.dataVersion),U=this._getDataQueue.length>0;return(B||U)&&(yield new Promise((k=>this._getDataQueue.push(k)))),this._currentFestivalQuests}))}getCachedFestivalQuestData(){return this._currentFestivalQuests}completePastFestivals(){this._networkHandler.completePastFestivals().then((k=>{var B;if(!k)return;const U=Q.q.instance.prodigy.gameContainer.get("c47-20b6");null===(B=k.updatedFestivals)||void 0===B||B.forEach((k=>{var B,F;if(!k.metadata.festivalCurrencyId)return;const G=rt.t.getItem("currency",k.metadata.festivalCurrencyId),j=null!==(F=null===(B=this._activePlayer.backpack.getItem(G.type,G.ID))||void 0===B?void 0:B.N)&&void 0!==F?F:0;this._activePlayer.backpack.consume("currency",k.metadata.festivalCurrencyId,9999999),U.item.sendItemRemovedEvent(G.ID,G.name,G.type,j,{sink_type:ot.C.FestivalCurrencyConversion,sink_id:G.ID,source_type:ot.C.FestivalCurrencyConversion,instance_type:k.id,instance_id:k.id})})),k.updatedFestivals.length>0&&this._activePlayer.forceSaveCharacter()})).catch(G.RQr.createHandler("Error completing past festivals"))}updateFestivalQuestData(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,j;this._latestDataVersion++;const $=this._latestDataVersion;let H=null;const V=(0,bt.G)(pt.o);if(!V.enabled)return this._currentFestivalQuests=null,void this.dispatchAndClearQueue();{const G=yield this.getAllActiveQuestIDs(),j=this._timeManager.getServerTimeMs();for(const $ of G){const G=yield this.getQuestMetaData($),W=null!==(B=null===(k=null==V?void 0:V.startDates)||void 0===k?void 0:k[$])&&void 0!==B?B:new Date(G.startDate).getTime(),q=null!==(F=null===(U=null==V?void 0:V.endDates)||void 0===U?void 0:U[$])&&void 0!==F?F:new Date(G.endDate).getTime();if(W{$===this._latestDataVersion&&(this._currentFestivalQuests=Q,this.dispatchAndClearQueue())}),0))}))}dispatchAndClearQueue(){var k;for(this.onDataChanged.dispatch();this._getDataQueue.length>0;)null===(k=this._getDataQueue.shift())||void 0===k||k.call(null)}shouldSendQuestEvents(k,B,U){const G=Object.create(null,{shouldSendQuestEvents:{get:()=>super.shouldSendQuestEvents}});return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.isFestivalLocked())?[]:G.shouldSendQuestEvents.call(this,k,B,U)}))}preSendQuestEventViaHub(k,B){const U=Object.create(null,{preSendQuestEventViaHub:{get:()=>super.preSendQuestEventViaHub}});return(0,F.sH)(this,void 0,void 0,(function*(){if(!this.getCurrentQuestID())return{manager:this,questIDs:[],tags:[]};if(yield this.isFestivalLocked())return{manager:this,questIDs:[],tags:[]};const F=yield this.festivalPreSendQuestEvent(),G=yield U.preSendQuestEventViaHub.call(this,k,B);return Object.assign(Object.assign({},G),{requestID:F})}))}festivalPreSendQuestEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){this._lastQuestEventTime=Date.now(),this._requestCount+=1;const k=this._requestCount;return this._slowRequests[k]=!1,this._timeouts[k]=window.setTimeout((()=>{this._slowRequests[k]=!0,this._currentSlowRequestCount++,Date.now()>=this._lastQuestEventTime+1500&&this.onSlowServerRequest.dispatch()}),1500),k}))}sendQuestEvent(k,B,U){const G=Object.create(null,{sendQuestEvent:{get:()=>super.sendQuestEvent}});return(0,F.sH)(this,void 0,void 0,(function*(){var U;const F=null!==(U=this._currentFestivalQuests)&&void 0!==U?U:yield this.getCurrentFestivalQuestData(),j=null==F?void 0:F.getQuestID();if(!j)return{activeQuests:[],inactiveQuests:[]};const $=yield this.festivalPreSendQuestEvent(),H=yield G.sendQuestEvent.call(this,k,B,[j]);return yield this.festivalPostSendQuestEvent(H,$),H}))}postSendQuestEventViaHub(k,B){const U=Object.create(null,{postSendQuestEventViaHub:{get:()=>super.postSendQuestEventViaHub}});return(0,F.sH)(this,void 0,void 0,(function*(){(yield this.isFestivalLocked())||(this._currentFestivalQuests||(yield this.getCurrentFestivalQuestData()))&&(yield U.postSendQuestEventViaHub.call(this,k),yield this.festivalPostSendQuestEvent(k,B))}))}festivalPostSendQuestEvent(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U;if(k&&k.activeQuests.length>0){const k=null!==(U=this._currentFestivalQuests)&&void 0!==U?U:yield this.getCurrentFestivalQuestData();yield this.updateQuestDataAndProcessDifferences(k)}B&&(this._timeouts[B]&&(window.clearTimeout(this._timeouts[B]),delete this._timeouts[B]),void 0!==this._slowRequests[B]&&(this._slowRequests[B]&&(this._currentSlowRequestCount--,0===this._currentSlowRequestCount&&this.onAllSlowServerRequestsCompleted.dispatch()),delete this._slowRequests[B]))}))}questProgressCallback(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B;if(yield this.isFestivalLocked())return;if(!k.progressResponses)return;for(const F of k.progressResponses)yield this.processQuestProgressResponse(F);const U=null!==(B=this._currentFestivalQuests)&&void 0!==B?B:yield this.getCurrentFestivalQuestData();U&&(yield this.updateQuestDataAndProcessDifferences(U))}))}updateQuestDataAndProcessDifferences(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.updateFestivalQuestData();const B=yield this.getCurrentFestivalQuestData();null!==B&&B.dataVersion!==this._lastProcessedVersion&&(this.processQuestProgress(k,B),this._lastProcessedVersion=B.dataVersion)}))}processQuestProgress(k,B){const U=[],F=[];null==k||k.getProgressTasks().forEach((k=>{k.taskProgress.status===K.t.COMPLETE?U.push(k.taskID):k.taskProgress.status===K.t.IN_PROGRESS&&F.push(k)}));const j=[],$=[];null==B||B.getProgressTasks().forEach((k=>{k.taskProgress.status===K.t.COMPLETE?j.push(k.taskID):k.taskProgress.status===K.t.IN_PROGRESS&&$.push(k)})),U.forEach((k=>{const B=this._currentFestivalQuests.getClaimTasks().find((B=>B.taskID===`${k}-${et.FESTIVAL_CLAIM_STRING}`));if(B&&B.taskProgress.status!==K.t.COMPLETE){Q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.viewedProgressMenu=!1}}));const H=Q.q.instance.prodigy.gameContainer.get("c47-20b6"),V=Y.l.getAddedItems(U,j);V.forEach((k=>{var U;const F=null==B?void 0:B.getTasks().find((B=>B.taskID===k));if(F&&(H.festival.sendQuestGoalCompleteEvent(F),this.canSendToaster(F)&&Q.q.instance.prodigy.notifications.initGenericNotification(ht._.FESTIVALQUESTGOALCOMPLETED)),(null===(U=null==F?void 0:F.taskDefinition.metadata)||void 0===U?void 0:U.questGoalType)===W.xK.Story&&F.taskDefinition.metadata.storyMetadata){let k=F.taskDefinition.metadata.storyMetadata.segmentFunnelStepName;k||(k=F.taskID),H.festival.sendFestivalFunnelAdvancedEvent(k)}}));const q=[...V];$.forEach((k=>{var B,U,G,j,$,V,W,K;let Y=null===(G=null===(U=null===(B=k.taskDefinition.preconditions)||void 0===B?void 0:B.find((k=>k.type===z.n.DATE_BEFORE)))||void 0===U?void 0:U.data)||void 0===G?void 0:G.date;Y||(Y=new Date(this._currentFestivalQuests.getEndDate()).toISOString());const Q=F.find((B=>B.taskID===k.taskID)),X=null!==($=null===(j=null==Q?void 0:Q.taskProgress.data)||void 0===j?void 0:j.progress)&&void 0!==$?$:0;X!==(null===(V=k.taskProgress.data)||void 0===V?void 0:V.progress)&&(H.festival.sendQuestGoalUpdatedEvent(k,(null!==(K=null===(W=k.taskProgress.data)||void 0===W?void 0:W.progress)&&void 0!==K?K:0)-X,Y),q.push(k.taskID))})),this.processMainObjective(q).catch(G.RQr.createHandler("Error processing Festival main objective"))}sendRewardClaimedEvent(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;const F=(null!==(U=null===(B=this._currentFestivalQuests)||void 0===B?void 0:B.getClaimTasks())&&void 0!==U?U:[]).find((B=>B.taskID===k));F?yield this.sendQuestEvent(F.type,Object.assign({},F.taskDefinition.completionRequirements.data)):G.VyI.log(`FestivalQuestManager.sendRewardClaimedEvent: claim task not found for ${k}`,G.$bb.Error)}))}getClaimTask(k){var B,U;const F=[],G=null!==(U=null===(B=this._currentFestivalQuests)||void 0===B?void 0:B.getClaimTasks())&&void 0!==U?U:[];for(let j=0;j"root"===k.taskID));B&&(yield this.sendQuestEvent(B.type,Object.assign({},B.taskDefinition.completionRequirements.data)))}))}getCurrentQuestID(){if(this._currentFestivalQuests)return this._currentFestivalQuests.getQuestID()}getProgressTasks(){var k,B;return null!==(B=null===(k=this._currentFestivalQuests)||void 0===k?void 0:k.getProgressTasks())&&void 0!==B?B:[]}getProgressTaskCount(k){var B,U;return null!==(U=null===(B=this._currentFestivalQuests)||void 0===B?void 0:B.getProgressTasks().filter((B=>{var U;return k&&(null===(U=B.taskDefinition.metadata)||void 0===U?void 0:U.questGoalType)===k&&!B.taskDefinition.metadata.isHiddenQuest&&B.getTimeUntilExpiry()>=0})).length)&&void 0!==U?U:0}getAllProgressTaskCounts(){var k;const B={};return null===(k=this._currentFestivalQuests)||void 0===k||k.getProgressTasks().forEach((k=>{var U,F;const G=null===(U=k.taskDefinition.metadata)||void 0===U?void 0:U.questGoalType;G&&(B[G]=(null!==(F=B[G])&&void 0!==F?F:0)+1)})),B}getCompletedTaskCount(k,B,U,F){let G=0;return this.getProgressTasks().forEach((j=>{var $,H,V,W;if(j.taskProgress.status===K.t.COMPLETE){if("root"===j.taskID||(null===($=j.taskDefinition.metadata)||void 0===$?void 0:$.isHiddenQuest))return;if(!F&&j.getTimeUntilExpiry()<0)return;if(k&&(null===(H=j.taskDefinition.metadata)||void 0===H?void 0:H.questGoalType)!==k)return;if(B&&(null===(V=j.taskDefinition.metadata)||void 0===V?void 0:V.questGoalTaskType)!==B)return;if(U){const k=this.getClaimTask(j.taskID);if(k.taskProgress.status!==K.t.COMPLETE&&!(null===(W=k.taskProgress.data)||void 0===W?void 0:W.timesCompleted))return}G++}})),G}getStoryTaskCount(){var k,B;return null!==(B=null===(k=this._currentFestivalQuests)||void 0===k?void 0:k.getProgressTasks().filter((k=>{var B;return(null===(B=k.taskDefinition.metadata)||void 0===B?void 0:B.questGoalTaskType)===W.wD.STORY&&!k.taskDefinition.metadata.isHiddenQuest&&k.getTimeUntilExpiry()>=0})).length)&&void 0!==B?B:0}isFestivalTaskCompleted(k){var B,U;return(null===(U=null===(B=this._currentFestivalQuests)||void 0===B?void 0:B.getTasks().find((B=>B.taskDefinition.id===k)))||void 0===U?void 0:U.taskProgress.status)===K.t.COMPLETE}willFestivalTaskComplete(k,B,U){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U,F=1){var G,j;let $;const H=this.getCurrentQuestID();H&&($=[H]);const V=(yield this.getTasksInProgress(this._tags,$)).find((B=>B.taskDefinition.id===k));return!(!(null==V?void 0:V.eventMatchesTask(B,U))||!(null==V?void 0:V.taskDefinition.completionRequirements.data.target))&&((null===(G=V.taskProgress.data)||void 0===G?void 0:G.progress)?V.taskProgress.status===K.t.IN_PROGRESS&&(null===(j=V.taskProgress.data)||void 0===j?void 0:j.progress)>=V.taskDefinition.completionRequirements.data.target-F:V.taskDefinition.completionRequirements.data.target-F<=0)}))}sendHudButtonData(){this.getCurrentFestivalQuestData().then((k=>{if(!J.A.isDefined(k))return;const{unclaimedQuestCount:B,unclaimedNonMemberCount:U,unseenMemberCount:F}=k.getUnclaimedQuestCount();if(this._hudService.updateNotificationBadge(st.ts.Festival,this._activePlayer.hasMembership()?B:U+F),this._activePlayer.hasMembership()&&B>0||U>0){const k=Q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);this._hudService.updateCachedLabelData(st.ts.Festival,{labelValue:k.getText("PLUS_ULTRA_BONUS_COLLECT")})}else{const B=Q.q.instance.prodigy.gameContainer.get("a03-308f"),U=k.getEndDate()-B.getServerTimeMs();this._hudService.updateCachedLabelData(st.ts.Festival,{labelValue:U})}})).catch(G.RQr.createHandler("FestivalQuestManager: Could not send hud button data."))}canSendToaster(k){var B,U,F,G,j;return!0!==(null===(B=k.taskDefinition.metadata)||void 0===B?void 0:B.isHiddenQuest)&&(null===(U=k.taskDefinition.metadata)||void 0===U?void 0:U.questGoalTaskType)!==W.wD.CLAIM&&(null===(F=k.taskDefinition.metadata)||void 0===F?void 0:F.questGoalType)!==W.xK.Story&&(null===(G=k.taskDefinition.metadata)||void 0===G?void 0:G.questGoalType)!==W.xK.Coop&&!0!==(null===(j=k.taskDefinition.metadata)||void 0===j?void 0:j.isExperimentGate)&&"root"!==k.taskDefinition.id}isFestivalInTimeframe(){var k;const B=null===(k=this._currentFestivalQuests)||void 0===k?void 0:k.getMetadata(),U=this._timeManager.getServerTimeMs();return void 0!==B&&new Date(B.startDate).getTime()super.isCutsceneTaskInProgress}});return(0,F.sH)(this,void 0,void 0,(function*(){return!!this.isFestivalInTimeframe()&&U.isCutsceneTaskInProgress.call(this,k,B)}))}setupValidTasks(k,B){const U=Object.create(null,{setupValidTasks:{get:()=>super.setupValidTasks}});return(0,F.sH)(this,void 0,void 0,(function*(){if(!(yield this.isFestivalLocked()))return this.isFestivalInTimeframe()?U.setupValidTasks.call(this,k,B):Promise.resolve()}))}markCompletedTasksSeen(k){var B,U,F;const j=[];for(const G of this.getProgressTasks())k&&(null===(U=null===(B=G.taskDefinition)||void 0===B?void 0:B.metadata)||void 0===U?void 0:U.questGoalType)!==k||G.taskProgress.status===K.t.COMPLETE&&j.push(G.taskID);const $=this.getCurrentQuestID();void 0!==$&&(this._networkHandler.setCompletedTasksSeen($,j).catch(G.RQr.createHandler("Error setting completed festival tasks as seen")),null===(F=this._currentFestivalQuests)||void 0===F||F.updateSeenCompletedTasks($,j),this.sendHudButtonData())}processMainObjective(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;if(void 0===this.getCurrentQuestID()||!this._currentFestivalQuests)return;const F=yield dt.h.calculateStateWithPreconditions(ut.L.MainObjective,this._currentFestivalQuests.getStates(),this._currentFestivalQuests.getTasks().map((k=>k.taskProgress)),new ft.f);H().isEqual(this._mainObjectiveState,F)&&!k.includes(null===(U=null===(B=this._mainObjectiveState)||void 0===B?void 0:B.objective)||void 0===U?void 0:U.progressTaskId)||(this._mainObjectiveState=F,Q.q.instance.game.broadcaster.broadcast(lt.GR.ObjectiveUpdated))}))}getObjectives(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U,F;if(void 0===this.getCurrentQuestID()||!this._currentFestivalQuests)return[];if(yield this.isFestivalLocked())return[];if(this._mainObjectiveState=yield dt.h.calculateStateWithPreconditions(ut.L.MainObjective,this._currentFestivalQuests.getStates(),this._currentFestivalQuests.getTasks().map((k=>k.taskProgress)),new ft.f),!(null===(k=this._mainObjectiveState)||void 0===k?void 0:k.objective))return[];const j=Q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),$=null!==(B=this._mainObjectiveState.objective.localizationKey?j.getText(this._mainObjectiveState.objective.localizationKey):this._mainObjectiveState.objective.text)&&void 0!==B?B:"";let H;if(J.A.isDefined(this._mainObjectiveState.objective.progressTaskId)){const k=yield this.getQuestProgress(this.getCurrentQuestID()),B=null===(U=null==k?void 0:k.tasks)||void 0===U?void 0:U.find((k=>k.id===this._mainObjectiveState.objective.progressTaskId)),G=this._currentFestivalQuests.getTasks().find((k=>k.taskID===this._mainObjectiveState.objective.progressTaskId));J.A.isDefined(null===(F=null==B?void 0:B.data)||void 0===F?void 0:F.progress)&&J.A.isDefined(null==G?void 0:G.taskDefinition.completionRequirements.data.target)&&(H={current:B.data.progress,target:G.taskDefinition.completionRequirements.data.target})}return[{id:this._mainObjectiveState.objective.id,text:$,type:ct.q.QuestState,location:this._mainObjectiveState.objective.location,guideHand:this._mainObjectiveState.objective.guideHand,progress:H}]}))}};gt.FESTIVAL_ROOT_TASK_ID="root",gt.FESTIVAL_CLAIM_STRING="claim",(0,F.Cg)([(0,X.b)("4fd-fef7"),(0,F.Sn)("design:type",V.v)],gt.prototype,"_networkHandler",void 0),(0,F.Cg)([(0,X.b)("a03-308f"),(0,F.Sn)("design:type",Z.V)],gt.prototype,"_timeManager",void 0),(0,F.Cg)([(0,X.b)("306-5359"),(0,F.Sn)("design:type",at.W)],gt.prototype,"_activePlayer",void 0),(0,F.Cg)([(0,X.b)("4fc-916d"),(0,F.Sn)("design:type",vt.C)],gt.prototype,"_videosDataProvider",void 0),(0,F.Cg)([(0,X.b)("cc9-a3f0"),(0,F.Sn)("design:type",nt.W)],gt.prototype,"_hudService",void 0),gt=et=(0,F.Cg)([(0,j.injectable)()],gt)},87761:(k,B,U)=>{"use strict";U.d(B,{B:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(79368);class H extends $.k{constructor(){super(...arguments),this._legacyQuestIdTracker=void 0}processQuestProgressResponse(k){const B=Object.create(null,{processQuestProgressResponse:{get:()=>super.processQuestProgressResponse}});return(0,F.sH)(this,void 0,void 0,(function*(){yield B.processQuestProgressResponse.call(this,k),this.updateQuestTracker()}))}updateQuestProgress(k){const B=Object.create(null,{updateQuestProgress:{get:()=>super.updateQuestProgress}});return(0,F.sH)(this,void 0,void 0,(function*(){this._getProgressDirty=!0,yield B.updateQuestProgress.call(this,k)}))}preSendQuestEventViaHub(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U;return(null===(U=j.q.instance.prodigy.world.getCurrentZoneObject())||void 0===U?void 0:U.difficultyMode)===this._difficultyMode&&(yield this.sendQuestEvent(k,B)),{manager:this,questIDs:[],tags:[]}}))}sendQuestEvent(k,B,U){const G=Object.create(null,{sendQuestEvent:{get:()=>super.sendQuestEvent}});return(0,F.sH)(this,void 0,void 0,(function*(){var F,j;return null!==(F=this._legacyQuestIdTracker)&&void 0!==F||(this._legacyQuestIdTracker=null===(j=this.getZoneObject())||void 0===j?void 0:j.getCurrentQuestID()),G.sendQuestEvent.call(this,k,B,U)}))}getZoneObject(){const k=j.q.instance.prodigy.world.getZone(this._zoneId);if(G.Aq$.isDefined(k))return k;G.VyI.log("No zone found for local zone quest manager",G.$bb.Warning)}getCurrentQuestIDAndSequence(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;return null===(k=(yield this.getTasksInProgress())[0])||void 0===k?void 0:k.taskID.toString()}))}updateQuestTracker(){const k=this.getZoneObject();if(!k)return;const B=k.getCurrentQuestID();if(G.Aq$.isDefined(B)&&B!==this._legacyQuestIdTracker){const U=j.q.instance.prodigy.gameContainer.get("c47-20b6");k.allQuestsAreComplete?U.quests.sendZoneQuestlineCompleteEvent(this._zoneId):U.quests.sendZoneQuestStartedEvent(this._zoneId,B),this._legacyQuestIdTracker=B}}}},3606:(k,B,U)=>{"use strict";U.d(B,{n:()=>et});var F=U(8674),G=U(62459),j=U(13027),$=U(70472);class H extends $.A{constructor(k,B,U,F){super(k,B,U),this.awardTask=F}}var V=U(98938),W=U(58776),q=U(62886),K=U(35120),z=U(1195),Y=U(3032),Q=U(73797),X=U(13956),Z=U(30226),J=U(79368),tt=U(56567);class et extends J.k{get awardAvailable(){return this._awardAvailable}get awardsAvailableCount(){return this._awardsAvailableCount}get availableTasks(){return this._availableTasks}get isQuestComplete(){return this._questComplete}get sendQuestEventPromise(){return this._sendQuestEventPromise}constructor(){super(),this._awardAvailable=!1,this.onDataChanged=new G.HN0,this._awardsAvailableCount=0,this._questComplete=!1,this._tags=[V.t.PlayerGoals],K.q.instance.game.broadcaster.addAppListener(Q.Ii.Victory,(()=>{this.onVictory().catch(G.RQr.createHandler("PlayerGoalsQuestManager.onVictory"))}),this,void 0,!0)}sendQuestEvent(k,B,U){const G=Object.create(null,{sendQuestEvent:{get:()=>super.sendQuestEvent}});return(0,F.sH)(this,void 0,void 0,(function*(){const F=yield G.sendQuestEvent.call(this,k,B,U);return this.onDataChanged.dispatch(null==B?void 0:B.id),F}))}onVictory(){return(0,F.sH)(this,void 0,void 0,(function*(){this.isQuestComplete||(yield this.sendQuestEvent(q.T.WIN_ANY_BATTLE,{}))}))}preloadQuestProgress(){const k=Object.create(null,{preloadQuestProgress:{get:()=>super.preloadQuestProgress}});return(0,F.sH)(this,void 0,void 0,(function*(){yield k.preloadQuestProgress.call(this),yield this.updateFlags()}))}processQuestProgressResponse(k){const B=Object.create(null,{processQuestProgressResponse:{get:()=>super.processQuestProgressResponse}});return(0,F.sH)(this,void 0,void 0,(function*(){yield B.processQuestProgressResponse.call(this,k),yield this.updateFlags()}))}updateFlags(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.getQuestProgress(et.PLAYER_GOALS_QUEST_ID);this._questTasks=yield this.getQuestTasks(et.PLAYER_GOALS_QUEST_ID);const B=yield this.getTasksInProgress([V.t.PlayerGoals]),U=this.sortByQuestOrder(this._questTasks),F=yield this.filterByPreconditions(U);if(this._pairedTasks=this.pairTasks(F),this._surfacedTasks=this.filterCompletedTasks(this._pairedTasks),this._availableTasks=this._pairedTasks.filter((k=>k.taskProgress.status!==W.t.COMPLETE||(null==k?void 0:k.awardTask.taskProgress.status)!==W.t.COMPLETE)),this._questComplete=(null==k?void 0:k.status)===W.t.COMPLETE||0===B.length,this._questComplete)return this._awardAvailable=!1,void(this._awardsAvailableCount=0);const G=this.filterByAwardTasks(yield this.getTasksInProgress([V.t.PlayerGoals])),j=[];this.surfacedTasks.forEach((k=>j.push(null==k?void 0:k.awardTask)));const $=G.filter((k=>j.some((B=>B.taskID===k.taskID))&&this.shouldAwardAutoSurface(k)));this._awardAvailable=$.length>0,this._awardsAvailableCount=$.length}))}get surfacedTasks(){return this._surfacedTasks}get pairedTasks(){return this._pairedTasks}isTaskComplete(k){return(null==k?void 0:k.taskProgress.status)===W.t.COMPLETE}isGoalTask(k){var B;return(null===(B=null==k?void 0:k.taskDefinition.prerequisites)||void 0===B?void 0:B[0])===et.PLAYER_GOALS_START_QUEST_TASK_ID}isAwardTask(k){var B;const U=null===(B=k.taskDefinition.prerequisites)||void 0===B?void 0:B[0];return G.Aq$.isDefined(U)&&U!==et.PLAYER_GOALS_START_QUEST_TASK_ID}isAwardBlocked(k){return!!et.BLOCK_AWARD_IN_TUTORIAL.includes(k.taskID)&&(this.isAwardTask(k)&&!this._loggedInPlayer.player.hasCompletedTutorial())}shouldAwardAutoSurface(k){return et.BLOCK_AUTO_SURFACE_BEFORE_TUTORIAL_COMPLETE.includes(k.taskID)?this.isAwardTask(k)&&this._loggedInPlayer.player.hasCompletedTutorial():this.isAwardTask(k)}sortByQuestOrder(k){const B=k.concat(),U=Object.values(j.k);return B.sort(((k,B)=>U.indexOf(k.taskID)-U.indexOf(B.taskID)))}filterByPreconditions(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=k.concat(),U=new tt.f;return Z.J.asyncFilter(B,(k=>(0,F.sH)(this,void 0,void 0,(function*(){let B=!0;if(!this._loggedInPlayer.areLoginCredentialsValid()&&k.taskID===j.k.ProfileQuiz||!this._loggedInPlayer.areLoginCredentialsValid()&&k.taskID===j.k.ProfileQuizGotItem)return!1;for(const F of k.taskDefinition.preconditions||[])if(B=yield U.check(F.type,F.data),!B)break;return B}))))}))}filterByGoalTasks(k){return k.filter((k=>this.isGoalTask(k)))}filterByAwardTasks(k){return k.filter((k=>this.isAwardTask(k)))}filterCompletedTasks(k,B=4){const U=k.concat();for(;U.length>B&&this.isTaskComplete(U[0].awardTask);)U.shift();return U.length=B,U}pairTasks(k){const B=k.concat(),U=[],F=this.filterByGoalTasks(B),G=this.filterByAwardTasks(B);return F.forEach((k=>{const B=G.find((B=>{var U;return k.taskID===(null===(U=B.taskDefinition.prerequisites)||void 0===U?void 0:U[0])})),F=new H(k.questID,k.taskDefinition,k.taskProgress,B);U.push(F)})),U}getBattleGoal(){switch(this._loggedInPlayer.player.getQuestSystem("playerGoals")){case Y.p.PlayerGoalsFtue:return j.k.BattleTwoGotItem;case Y.p.PlayerGoalsPostFtue:case Y.p.RevisedWithPlayerGoals:case Y.p.Revised:case Y.p.Legacy:default:return j.k.BattleTwoGotItemB}}getParentAttachGoal(){switch(this._loggedInPlayer.player.getQuestSystem("playerGoals")){case Y.p.PlayerGoalsPostFtue:return j.k.ParentAttachB;case Y.p.PlayerGoalsFtue:case Y.p.RevisedWithPlayerGoals:case Y.p.Revised:case Y.p.Legacy:default:return j.k.ParentAttach}}hasCompletedBattles(){return this.isTaskComplete(this._pairedTasks.find((k=>k.taskID===this.getBattleGoal()||k.awardTask.taskID===this.getBattleGoal())))}hasAttachedParent(){return this.isTaskComplete(this._pairedTasks.find((k=>k.taskID===this.getParentAttachGoal()||k.awardTask.taskID===this.getParentAttachGoal())))}hasAttachedClassCode(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.isTaskComplete(this._pairedTasks.find((k=>k.taskID===j.k.ClassCode)))}))}isPrizeReady(k){return this.isTaskComplete(k)&&!this.isTaskComplete(k.awardTask)&&!this.isAwardBlocked(k.awardTask)}cleanup(){this.onDataChanged.dispose(),super.cleanup()}}et.BLOCK_AUTO_SURFACE_BEFORE_TUTORIAL_COMPLETE=[j.k.ParentAttachGotItem,j.k.ParentAttachGotItemB,j.k.PlayAfterHoursGotItem,j.k.ClassCode,j.k.ClassCodeGotItem],et.BLOCK_AWARD_IN_TUTORIAL=[j.k.PlayAfterHoursGotItem,j.k.ClassCodeGotItem],et.PLAYER_GOALS_QUEST_ID="FtuePlayerGoalQuests",et.PLAYER_GOALS_START_QUEST_TASK_ID=1,(0,F.Cg)([(0,X.b)("e20-0fb0"),(0,F.Sn)("design:type",z.E)],et.prototype,"_loggedInPlayer",void 0)},3001:(k,B,U)=>{"use strict";U.d(B,{n:()=>Q});var F=U(8674),G=U(62459),j=U(79687),$=U(28628),H=U(98938),V=U(62886),W=U(60157),q=U(35120),K=U(13956),z=U(63536),Y=U(80434);let Q=class{constructor(){this._questManagerMap=new Map,this.managerSetupPromise=new Promise((k=>{this._onSetupComplete=k}))}get questManagerMap(){return this._questManagerMap}init(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.setup()}))}setup(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=q.q.instance.prodigy.gameContainer;this._questManagerMap.set(H.t.BattlePass,k.get("8dc-04eb")),this._questManagerMap.set(H.t.Festival,k.get("99d-5e9e")),this._questManagerMap.set(H.t.ZoneQuests,k.get("f91-8211")),this._questManagerMap.set(H.t.DailyLoginCalendar,k.get("a71-dfcf")),this._questManagerMap.set(H.t.PlayerGoals,k.get("d65-d7bb")),this._questManagerMap.set(H.t.DynamicStore,k.get("7a1-ff33")),Object.values(Y.n).forEach((B=>{this._questManagerMap.set(B.questTag,k.get(B.injectionKey))})),yield Promise.all(Array.from(this._questManagerMap.values()).map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return k.setup()}))))),q.q.instance.prodigy.education.onQuestionAnswered.add(this.onQuestionAnswered,this),setInterval((()=>{this.sendQuestEventViaHub(V.T.PLAY_MINUTES,{progressToAdd:5}).catch(G.RQr.createHandler("Unable to send PlayMinutes quest event"))}),3e5),this._onSetupComplete()}))}sendQuestEventViaHub(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=this._segment.quests.beginQuestEventTransaction(),G=yield Promise.all(Array.from(this._questManagerMap,(U=>(0,F.sH)(this,[U],void 0,(function*([,U]){return U.preSendQuestEventViaHub(k,B)}))))),j=new Set,$=new Set;for(const k of G)k.questIDs.forEach((k=>j.add(k))),k.tags.forEach((k=>$.add(k)));const H=Array.from(j),V=Array.from($);let W;H.length>0&&V.length>0&&(W=yield this._questNetworkHandler.sendQuestEvent({eventType:k,eventData:B,questIDs:H,tags:V})),yield Promise.all(G.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return k.manager.postSendQuestEventViaHub(W,k.requestID)}))))),U.flush({})}))}getBattleStartQuestData(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U={params:{taskEventType:W.Z7.Battle,battleType:null!=k?k:$.gu.Basic,battleSubType:B,allies:[],enemies:[]}},F=[V.T.PLAY_ANY_BATTLE,V.T.WIN_ANY_BATTLE,V.T.LOSE_ANY_BATTLE],G=yield this.shouldSendQuestEvents(F,U);return{questIDs:G.ids,questEvents:G.events}}))}getCurrentQuestIDs(){const k=[];return this._questManagerMap.forEach((B=>{const U=B.getCurrentQuestID();U&&k.push(U)})),k}shouldSendQuestEvents(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=yield Promise.all(Array.from(this._questManagerMap,(U=>(0,F.sH)(this,[U],void 0,(function*([,U]){const F=yield U.shouldSendQuestEvents(k,B);return{id:U.getCurrentQuestID(),taskTypes:F}}))))),G=new Set,j=new Set;for(const k of U)k.id&&k.taskTypes.length>0&&(G.add(k.id),k.taskTypes.forEach((k=>j.add(k))));return{ids:Array.from(G),events:Array.from(j)}}))}onQuestionAnswered(k){return(0,F.sH)(this,void 0,void 0,(function*(){k?yield this.sendQuestEventViaHub(V.T.ANSWER_QUESTION_CORRECTLY,{}):yield this.sendQuestEventViaHub(V.T.ANSWER_QUESTION_INCORRECTLY,{})}))}reenter(){q.q.instance.prodigy.education.onQuestionAnswered.remove(this.onQuestionAnswered,this),this._questManagerMap.forEach((k=>{k.cleanup(),k.reenter()})),this.init()}isCutsceneTaskInProgress(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=yield Promise.all(Array.from(this._questManagerMap.values()).map((k=>(0,F.sH)(this,void 0,void 0,(function*(){const B=k.getCurrentQuestID();return k.isCutsceneTaskInProgress(void 0,B?[B]:[])})))));return null!==(k=null==B?void 0:B.some((k=>!0===k)))&&void 0!==k&&k}))}setupValidTasks(){return(0,F.sH)(this,void 0,void 0,(function*(){yield Promise.all(Array.from(this._questManagerMap.values()).map((k=>(0,F.sH)(this,void 0,void 0,(function*(){const B=k.getCurrentQuestID();return k.setupValidTasks(void 0,B?[B]:[])})))))}))}getTasksInProgress(){return(0,F.sH)(this,arguments,void 0,(function*(k=[]){const B=new Map;return 0===k.length?yield Promise.all(Array.from(this._questManagerMap,(k=>(0,F.sH)(this,[k],void 0,(function*([k,U]){const F=yield U.getTasksInProgress();B.set(k,F)}))))):yield Promise.all(Array.from(this._questManagerMap,(U=>(0,F.sH)(this,[U],void 0,(function*([U,F]){var G;if(k.includes(U)){const k=null!==(G=yield null==F?void 0:F.getTasksInProgress())&&void 0!==G?G:[];B.set(U,k)}}))))),B}))}};(0,F.Cg)([(0,K.b)("a6a-6157"),(0,F.Sn)("design:type",z.$)],Q.prototype,"_questNetworkHandler",void 0),(0,F.Cg)([(0,K.b)("c47-20b6"),(0,F.Sn)("design:type",Function)],Q.prototype,"_segment",void 0),Q=(0,F.Cg)([(0,j.injectable)()],Q)},76846:(k,B,U)=>{"use strict";U.d(B,{C:()=>z});var F=U(8674),G=U(79687),j=U(98938),$=U(8820),H=U(2980),V=U(59219),W=U(79368),q=U(24030),K=U(4766);class z extends W.k{constructor(){super(...arguments),this._tags=[j.t.StateChallenge,j.t.NationalCup],this._isInitialized=!1,this._isDataDirty=!1,this._hasUnclaimedPreviousRewardsCache=void 0}setup(){const k=Object.create(null,{setup:{get:()=>super.setup}});return(0,F.sH)(this,void 0,void 0,(function*(){this._isInitialized||(yield k.setup.call(this),this._stateChallengesDataProvider.onNewDataProcessed.add((()=>this.markDataAsDirty())),this._isInitialized=!0)}))}getStateChallengeGoalsProgress(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._currentProgressData||this._isDataDirty){this._isDataDirty=!1;const k=this._stateChallengesDataProvider.getGoalsParametersData();this._currentProgressData=yield this._stateChallengesNetworkHandler.getStateChallengeGoalsData(null!=k?k:{questionsAnswered:0,competition:$.a.None})}return this._currentProgressData}))}markDataAsDirty(){this._isDataDirty=!0,this._hasUnclaimedPreviousRewardsCache=void 0}checkHasUnclaimedPreviousRewards(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(void 0!==this._hasUnclaimedPreviousRewardsCache)return this._hasUnclaimedPreviousRewardsCache;const{hasUnclaimedRewards:B}=yield this._stateChallengesNetworkHandler.hasUnclaimedPreviousStateChallengeGoalsRewards(k);return this._hasUnclaimedPreviousRewardsCache=B,B}))}cacheChallengeStartTaskIds(k,B){this._currentChallengeStartTaskId=k,this._previousChallengeStartTaskId=B}getCurrentChallengeUniqueId(){var k;return null===(k=this._currentChallengeStartTaskId)||void 0===k?void 0:k.split("_")[0]}getPreviousChallengeUniqueId(){var k;return null===(k=this._previousChallengeStartTaskId)||void 0===k?void 0:k.split("_")[0]}getPreviousChallengeStartTaskId(){return this._previousChallengeStartTaskId}claimStateChallengeGoalsReward(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this._stateChallengesDataProvider.getGoalsParametersData(),U=yield this._stateChallengesNetworkHandler.claimStateChallengeGoalsRewards(k,null!=B?B:{questionsAnswered:0,competition:$.a.None});return yield this.processQuestProgressResponse(U),this._isDataDirty=!0,U}))}processPreviousChallengeRewardsResponse(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.processQuestProgressResponse(k),this._isDataDirty=!0}))}sendClassCodeQuestEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!(yield this.isClassCodeQuestCompleted())){const k=this._segment.quests.beginQuestEventTransaction();this.markDataAsDirty(),yield this.claimStateChallengeGoalsReward(z.CLASS_CODE_QUEST_CLAIM_ID),k.flush({})}}))}isClassCodeQuestCompleted(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=null!==(k=(0,q.$)(this._stateChallengesDataProvider.viewableCompetitionPhase))&&void 0!==k?k:"";return this.isTaskCompleted(B,z.CLASS_CODE_QUEST_TASK_ID)}))}sendCurrentChallengeStartedEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){this._currentChallengeStartTaskId&&((yield this.isCurrentChallengeStarted())||(this.markDataAsDirty(),yield this.claimStateChallengeGoalsReward(`${this.getCurrentChallengeUniqueId()}_claim_start`)))}))}sendPreviousChallengeStartedEvent(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B;if(this._previousChallengeStartTaskId&&!(yield this.isPreviousChallengeStarted())){const U=K.H.getPreviousChallengeCompetition(this._stateChallengesDataProvider.viewableCompetitionPhase,new Date(Date.now()),this._stateChallengesDataProvider.finalsPhaseEndDate),F={questionsAnswered:null!==(B=null===(k=this._stateChallengesDataProvider.getSchoolEntryForPreviousChallenge())||void 0===k?void 0:k.correctAnswers)&&void 0!==B?B:0,competition:U},G=yield this._stateChallengesNetworkHandler.claimPreviousStateChallengeGoalsRewards(F,`${this.getPreviousChallengeUniqueId()}_claim_start`);yield this.processQuestProgressResponse(G),this.markDataAsDirty()}}))}isCurrentChallengeStarted(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;if(!this._currentChallengeStartTaskId)return!1;const B=null!==(k=(0,q.$)(this._stateChallengesDataProvider.viewableCompetitionPhase))&&void 0!==k?k:"";return this.isTaskCompleted(B,this._currentChallengeStartTaskId)}))}isPreviousChallengeStarted(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._previousChallengeStartTaskId)return!1;const k=K.H.getPreviousChallengeCompetition(this._stateChallengesDataProvider.viewableCompetitionPhase,new Date(Date.now()),this._stateChallengesDataProvider.finalsPhaseEndDate),B=(0,q.$)(k);return!!B&&this.isTaskCompleted(B,this._previousChallengeStartTaskId)}))}}z.CLASS_CODE_QUEST_TASK_ID="id-2025_milestone_classcode",z.CLASS_CODE_QUEST_CLAIM_ID="id-2025_claim_classcode",(0,F.Cg)([(0,G.inject)("a96-1470"),(0,F.Sn)("design:type",V.E)],z.prototype,"_stateChallengesNetworkHandler",void 0),(0,F.Cg)([(0,G.inject)("0f9-dd7b"),(0,F.Sn)("design:type",H.v)],z.prototype,"_stateChallengesDataProvider",void 0)},45918:(k,B,U)=>{"use strict";U.d(B,{M:()=>F,k:()=>W});var F,G=U(8674),j=U(98938),$=U(35120),H=U(84642),V=U(79368);!function(k){k.FTUE="ZoneQuest-Ftue"}(F||(F={}));class W extends V.k{constructor(){super(...arguments),this._tags=[j.t.ZoneQuests]}fetchQuestData(){const k=Object.create(null,{fetchQuestData:{get:()=>super.fetchQuestData}});return(0,G.sH)(this,void 0,void 0,(function*(){try{return yield k.fetchQuestData.call(this)}catch(B){throw $.q.instance.prodigy.gameContainer.get("306-5359").hasCompletedTutorial()||H.x.showErrorMessageThenReturnToCurrentMap(),new Error(`ZoneQuestManager: Failed to fetch quest data from server. Original error: ${B.message}`)}}))}}},80434:(k,B,U)=>{"use strict";U.d(B,{n:()=>pt});var F=U(98938),G=U(73678),j=U(8674),$=U(97495),H=U(70472),V=U(58776),W=U(62886),q=U(93867),K=U(87761);class z extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.ACADEMY,this._tags=[F.t.LocalZoneQuests,F.t.AcademyEndgame],this._difficultyMode=$.i.Regular}getTasksInProgress(k,B,U){return(0,j.sH)(this,void 0,void 0,(function*(){const k=`quest-${F.t.AcademyEndgame}`,B=q.U.getNextStep();return B?[new H.A(k,{id:B,prerequisites:[],completionRequirements:{type:W.T.NONE,data:{}}},{id:B,status:V.t.IN_PROGRESS})]:[]}))}}var Y=U(28433);class Q extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.BONFIREHARD,this._tags=[F.t.LocalZoneQuests,F.t.BonfireSpireHard],this._difficultyMode=$.i.Hard}getCurrentQuestID(){return Y.G.id}}var X=U(63674);class Z extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.BONFIRE,this._tags=[F.t.LocalZoneQuests,F.t.BonfireSpire],this._difficultyMode=$.i.Regular}getCurrentQuestID(){return X.K.id}}var J=U(88919);class tt extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.FORESTHARD,this._tags=[F.t.LocalZoneQuests,F.t.FireflyForestHard],this._difficultyMode=$.i.Hard}getCurrentQuestID(){return J.C.id}}var et=U(1716);class it extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.FOREST,this._tags=[F.t.LocalZoneQuests,F.t.FireflyForest],this._difficultyMode=$.i.Regular}getCurrentQuestID(){return et.E.id}}var st=U(57144);class nt extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.SHIPWRECKHARD,this._tags=[F.t.LocalZoneQuests,F.t.ShipwreckShoreHard],this._difficultyMode=$.i.Hard}getCurrentQuestID(){return st.r.id}}var at=U(76175);class rt extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.SHIPWRECK,this._tags=[F.t.LocalZoneQuests,F.t.ShipwreckShore],this._difficultyMode=$.i.Regular}getCurrentQuestID(){return at.J.id}}var ot=U(38693);class ht extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.SHIVERCHILLHARD,this._tags=[F.t.LocalZoneQuests,F.t.ShiverchillHard],this._difficultyMode=$.i.Hard}getCurrentQuestID(){return ot.S.id}}var ct=U(99689);class dt extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.SHIVERCHILL,this._tags=[F.t.LocalZoneQuests,F.t.Shiverchill],this._difficultyMode=$.i.Regular}getCurrentQuestID(){return ct.a.id}}var lt=U(97340);class ut extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.SKYWATCHHARD,this._tags=[F.t.LocalZoneQuests,F.t.SkywatchHard],this._difficultyMode=$.i.Hard}getCurrentQuestID(){return lt.x.id}}var ft=U(64891);class bt extends K.B{constructor(){super(...arguments),this._zoneId=G.A_.SKYWATCH,this._tags=[F.t.LocalZoneQuests,F.t.Skywatch],this._difficultyMode=$.i.Regular}getCurrentQuestID(){return ft.x.id}}const pt={[G.A_.FOREST]:{injectionKey:"985-7051",questId:`quest-${F.t.FireflyForest}`,questTag:F.t.FireflyForest,manager:it},[G.A_.SHIVERCHILL]:{injectionKey:"c16-888b",questId:`quest-${F.t.Shiverchill}`,questTag:F.t.Shiverchill,manager:dt},[G.A_.BONFIRE]:{injectionKey:"474-b78a",questId:`quest-${F.t.BonfireSpire}`,questTag:F.t.BonfireSpire,manager:Z},[G.A_.SHIPWRECK]:{injectionKey:"3e8-8772",questId:`quest-${F.t.ShipwreckShore}`,questTag:F.t.ShipwreckShore,manager:rt},[G.A_.SKYWATCH]:{injectionKey:"496-af48",questId:`quest-${F.t.Skywatch}`,questTag:F.t.Skywatch,manager:bt},[G.A_.ACADEMY]:{injectionKey:"933-6c74",questId:`quest-${F.t.AcademyEndgame}`,questTag:F.t.AcademyEndgame,manager:z},[G.A_.FORESTHARD]:{injectionKey:"123-14b6",questId:`quest-${F.t.FireflyForestHard}`,questTag:F.t.FireflyForestHard,manager:tt},[G.A_.SHIVERCHILLHARD]:{injectionKey:"246-64db",questId:`quest-${F.t.ShiverchillHard}`,questTag:F.t.ShiverchillHard,manager:ht},[G.A_.BONFIREHARD]:{injectionKey:"c82-7848",questId:`quest-${F.t.BonfireSpireHard}`,questTag:F.t.BonfireSpireHard,manager:Q},[G.A_.SHIPWRECKHARD]:{injectionKey:"cbb-cf01",questId:`quest-${F.t.ShipwreckShoreHard}`,questTag:F.t.ShipwreckShoreHard,manager:nt},[G.A_.SKYWATCHHARD]:{injectionKey:"38d-437e",questId:`quest-${F.t.SkywatchHard}`,questTag:F.t.SkywatchHard,manager:ut}}},88355:(k,B,U)=>{"use strict";U.d(B,{y:()=>F});class F{constructor(k,B){this._questID=k,this._taskID=B}}},52191:(k,B,U)=>{"use strict";U.d(B,{G:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(86051),H=U(88355);class V extends H.y{doTask(){return(0,F.sH)(this,void 0,void 0,(function*(){this.markTutorialComplete()}))}markTutorialComplete(){const k=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=k.tutorial;k.state.set("zone-house-quest",{ID:2}),k.state.set("zone-academy-quest",{ID:2}),k.state.set("tutorial-0",4),B.setMenuValue($.K.WORLD_MAP.INTRO,1),B.setMenuValue($.K.BESTIARY.INTRO,1),k.backpack.hasItem("key",13)||k.backpack.add("key",13),k.tutorialCompletedThisSession=!0,j.q.instance.prodigy.gameContainer.get("d65-d7bb").updateFlags().catch(G.RQr.createHandler("onTutorialComplete: error updating player goals quest manager flags")),k.forceSaveCharacter(),k.saveEnabled=!1}}},97806:(k,B,U)=>{"use strict";U.d(B,{N:()=>$});var F=U(8674),G=U(55122),j=U(52269);class $ extends j.uu{doTask(k){const B=Object.create(null,{doTask:{get:()=>super.doTask}});return(0,F.sH)(this,void 0,void 0,(function*(){var U,F;yield B.doTask.call(this,Object.assign(Object.assign({},k),{usePlayerLevel:!0,minLevel:G.s.minLevel,maxLevel:G.s.activePlayerLevelCap-j.Ai,showPetMenu:!1!==k.showPetMenu,showPetCard:null!==(U=k.showPetCard)&&void 0!==U?U:k.showGotItem,showPetsInCardFormat:null!==(F=k.showPetsInCardFormat)&&void 0!==F&&F}))}))}}},96165:(k,B,U)=>{"use strict";U.d(B,{I:()=>Q});var F,G=U(8674),j=U(62459),$=U(8394),H=U(65240),V=U(35120),W=U(23891),q=U(65050),K=U(41674),z=U(88355);!function(k){k.FreePrize="free-prize",k.PremiumPrize1="prem-prize-1",k.PremiumPrize2="prem-prize-2",k.Claim="claim"}(F||(F={}));const Y={[F.FreePrize]:"Free",[F.PremiumPrize1]:"Core",[F.PremiumPrize2]:"Plus",[F.Claim]:"magicoin quest"};class Q extends z.y{doTask(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,G;const $=V.q.instance.prodigy.gameContainer.get("c47-20b6"),K=new j._mx,z=K.addComponent(W.f);let X=!1,Z=!1;for(const F of k.itemDrops){const B=Q.processSecureItemReceived($,F,k.sourceType);B.award&&(X=!0,z.addItem(F.type,F.ID,F.N,B.secure),"currency"===F.type&&27===F.ID&&(Z=!0))}if(!X)return void K.destroy();k.isFake&&z.setItemRewardAsFake(),k.sourceType&&(z.sourceType=k.sourceType);let J=q.N.BattlePass;if(k.sourceType===H.C.Festival){J=null!==(U=null===(B=V.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig())||void 0===B?void 0:B.name)&&void 0!==U?U:"unknown festival"}else k.sourceType===H.C.UnifiedStore||k.sourceType===H.C.DynamicStore?J=q.N.ShopVisit:k.sourceType!==H.C.StateChallengeOnboarding&&k.sourceType!==H.C.StateChallengeMilestone&&k.sourceType!==H.C.StateChallengePodium||(J=q.N.StateChallenge);const tt={source_type:k.sourceType,source_id:`${this._questID}-${this._taskID}`,instance_type:J,instance_id:this._questID};if(k.sourceType===H.C.BattlePass){let k="unknown";const B=null===(G=this._taskID)||void 0===G?void 0:G.toString();(null==B?void 0:B.includes(F.FreePrize))?k=Y[F.FreePrize]:(null==B?void 0:B.includes(F.PremiumPrize1))?k=Y[F.PremiumPrize1]:(null==B?void 0:B.includes(F.PremiumPrize2))?k=Y[F.PremiumPrize2]:(null==B?void 0:B.includes(F.Claim))&&Z?k=Y[F.Claim]:(null==B?void 0:B.includes("mailer"))&&(k="mailer"),tt.source_name=k}else if(k.sourceType===H.C.DynamicStore){const k=V.q.instance.prodigy.gameContainer.get("7a1-ff33").getLastTransactionStore();tt.source_name=k}for(const F of k.itemDrops)$.quests.questEventTransaction.setIndividualData(F.type,F.ID,tt);z.awardSilently=!1===k.showGotItem,z.showPetsInPetCardFormat=!0===k.showPetsInCardFormat,z.customSegmentMetadata=tt,z.additionalDialogueIds=k.additionalDialogueIds,z.awardItem(),z.awardSilently||(yield z.onComplete.asPromise()),K.destroy()}))}static processSecureItemReceived(k,B,U){var F;if("item"===B.type&&184===B.ID){const G=V.q.instance.prodigy.gameContainer.get("8b9-bad1"),$=G.petInventoryData.permanentSlots-B.N,W=G.petInventoryData.permanentSlots;if(U===H.C.BattlePass){const B=null===(F=k.item.getSourceTransactionData(U))||void 0===F?void 0:F.transaction_id;k.featureCommon.sendPetSlotUnlockedEvent(K.No.TreasureTrack,W,$,B)}else j.VyI.log("Pet slot sourceType is not valid",j.$bb.Warning);return G.fetchPetInventoryData().catch(j.RQr.createHandler("Error fetching pet inventory data")),{award:!1,secure:!0}}return("petHat"===B.type||"petRelic"===B.type)&&V.q.instance.prodigy.gameContainer.get("d69-defe").refreshPetGear().catch(j.RQr.createHandler("GotItemTaskCompleteHandler: Error refreshing pet gear")),{award:!0,secure:(0,$.p)(B.type,B.ID)}}}},52269:(k,B,U)=>{"use strict";U.d(B,{Ai:()=>q,uu:()=>K});var F=U(8674),G=U(62459),j=U(61468),$=U(35120),H=U(43485),V=U(55122),W=U(88355);const q=-5;class K extends W.y{doTask(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,W,K,z,Y;const Q=$.q.instance.prodigy.gameContainer.get("e50-b09b");Q.questProgressHasBeenLoaded()&&(yield Q.updateQuestProgress());const X=new G._mx,Z=X.addComponent(H.j);k.sourceType&&(Z.sourceType=k.sourceType);const J=null===(B=k.usePlayerLevel)||void 0===B||B,tt=j.l.guaranteeArray(k.id).map((k=>"number"==typeof k?k:parseInt(k)))[0];k.claimToken&&(yield $.q.instance.prodigy.gameContainer.get("f45-d827").claim(k.claimToken,tt)),Z.showPetsInPetCardFormat=null===(F=null!==(U=k.showPetsInCardFormat)&&void 0!==U?U:k.showPetCard)||void 0===F||F,Z.init(tt,1,!0),Z.setPlayerLevelDelta(null!==(W=k.playerLevelDeltaMin)&&void 0!==W?W:-10,null!==(K=k.playerLevelDeltaMax)&&void 0!==K?K:q,J);const et=V.s.minLevel,it=V.s.activePlayerLevelCap-q;Z.setLevelMinMax(null!==(z=k.minLevel)&&void 0!==z?z:et,null!==(Y=k.maxLevel)&&void 0!==Y?Y:it),Z.awardSilently=!1===k.showPetCard,k.customSegmentData&&(Z.customSegmentMetadata=k.customSegmentData),Z.awardItem(),Z.awardSilently||(yield Z.onComplete.asPromise()),k.showPetMenu&&$.q.instance.prodigy.open.pets(),X.destroy()}))}}},55337:(k,B,U)=>{"use strict";U.d(B,{F:()=>F});class F{getCacheKey(k){return null}}},52157:(k,B,U)=>{"use strict";U.d(B,{L:()=>$});var F=U(8674),G=U(35120),j=U(55337);class $ extends j.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=G.q.instance.prodigy.gameContainer.get("a25-68f4"),U=Array.from(B.questManagerMap.values()).map((B=>(0,F.sH)(this,void 0,void 0,(function*(){return B.isTaskCompleted(k.questId,String(k.taskId))}))));return(yield Promise.all(U)).some((k=>k))||!1}))}getCacheKey(k){return`IsQuestTaskComplete:${k.questId}:${k.taskId}`}}},56567:(k,B,U)=>{"use strict";U.d(B,{f:()=>Ot});var F=U(8674),G=U(62459);var j=U(24522),$=U(5491),H=U(35120),V=U(55337);class W extends V.F{isReady(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const B=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return B.kennel.petTeam.length>0&&B.kennel.petTeam.filter((k=>(null==k?void 0:k.creatureType)===$.V.Pet)).every((B=>B.getElement()===k.element))}))}getCacheKey(k){return`AllPetsOnTeamHaveElement${k.element}`}}class q extends V.F{isReady(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return!0}))}getCacheKey(k){return`BattleHasEnemy${k.enemies.map((k=>`${k.unitType}:${k.assetId}`)).join("|")}`}}function K(k,B){const U=[];for(const F of B)k.hasOwnProperty(F)||U.push(F);return U}class z extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=K(k,["battlePassXpId"]);if(B.length>0)throw new Error(`BattlePassXpPreconditionHandler: Missing required properties: ${B.join(", ")}`);if(!G.Aq$.isDefined(k.battlePassXpRequired)&&!G.Aq$.isDefined(k.infiniteXpRequired))throw new Error('BattlePassXpPreconditionHandler: One of "battlePassXpRequired" or "infiniteXpRequired" is required');const U=H.q.instance.prodigy.gameContainer.get("8dc-04eb"),F=yield U.getBattlePassXpData(k.battlePassXpId);return F&&G.Aq$.isDefined(k.battlePassXpRequired)?F.total>=k.battlePassXpRequired:!!(F&&G.Aq$.isDefined(k.infiniteXpRequired)&&G.Aq$.isDefined(F.currentInfinite))&&F.currentInfinite>=k.infiniteXpRequired}))}getCacheKey(k){return`BattlePassXp:${k.battlePassXpId}:${k.battlePassXpRequired}`}}var Y=U(58776),Q=U(34829),X=U(13956),Z=U(69698);class J extends V.F{isReady(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U;const F=(yield this._dailyLoginCalendarQuestManager.getActiveStandardTrack()).find((k=>k.taskProgress.status===Y.t.IN_PROGRESS)),G=this._timeManager.getServerTimeMs(),j=null!==(U=null===(B=null===(k=null==F?void 0:F.taskProgress)||void 0===k?void 0:k.data)||void 0===B?void 0:B.progress)&&void 0!==U?U:0,$=G>=j,H=j-G>=2*Q.A.DAY_IN_MS;return $||H}))}getCacheKey(){return"DailyLoginCalendarCheckDatePreconditionHandler"}}(0,F.Cg)([(0,X.b)("a03-308f"),(0,F.Sn)("design:type",Z.V)],J.prototype,"_timeManager",void 0),(0,F.Cg)([(0,X.b)("a71-dfcf"),(0,F.Sn)("design:type",Function)],J.prototype,"_dailyLoginCalendarQuestManager",void 0);class tt extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=K(k,["date"]);if(B.length>0)throw new Error(`DateAfterPreconditionHandler: Missing required properties: ${B.join(", ")}`);const U=H.q.instance.prodigy.gameContainer.get("a03-308f");return new Date(k.useClientTime?Date.now():U.getServerTimeMs())>=new Date(k.date)}))}getCacheKey(k){return`DateAfter:${k.date}:${k.useClientTime?"client":"server"}`}}class et extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.getMillisecondsUntilDate(k)>0}))}getMillisecondsUntilDate(k){const B=K(k,["date"]);if(B.length>0)throw new Error(`DateBeforePreconditionHandler: Missing required properties: ${B.join(", ")}`);const U=H.q.instance.prodigy.gameContainer.get("a03-308f"),F=new Date(k.useClientTime?Date.now():U.getServerTimeMs());return new Date(k.date).valueOf()-F.valueOf()}getCacheKey(k){return`DateBefore:${k.date}:${k.useClientTime?"client":"server"}`}}class it extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return!(k.hairStyle&&!k.hairStyle.some((k=>{var U;return k===(null===(U=B.appearance.getHair())||void 0===U?void 0:U.style)})))&&(!(k.hairColor&&!k.hairColor.some((k=>{var U;return k===(null===(U=B.appearance.getHair())||void 0===U?void 0:U.color)})))&&(!(k.skinColor&&!k.skinColor.some((k=>k===B.appearance.getSkinColor())))&&(!(k.eyeColor&&!k.eyeColor.some((k=>k===B.appearance.getEyeColor())))&&!(k.face&&!k.face.some((k=>k===B.appearance.getFace()))))))}))}getCacheKey(k){var B,U,F,G,j;return`HasAppearance\n HairStyle${null===(B=k.hairStyle)||void 0===B?void 0:B.map((k=>k.toString())).join("|")}\n HairColor${null===(U=k.hairColor)||void 0===U?void 0:U.map((k=>k.toString())).join("|")}\n SkinColor${null===(F=k.skinColor)||void 0===F?void 0:F.map((k=>k.toString())).join("|")}\n EyeColor${null===(G=k.eyeColor)||void 0===G?void 0:G.map((k=>k.toString())).join("|")}\n Face${null===(j=k.face)||void 0===j?void 0:j.map((k=>k.toString())).join("|")}`}}class st extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=H.q.instance.prodigy.gameContainer.get("073-6f3b");return function(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=K(k,["experimentFeatureId","experimentType","expectedValue"]);if(U.length>0)throw new Error(`ExperimentFeatureHandler: Missing required properties: ${U.join(", ")}`);if("json"!==k.experimentType&&k.experimentType!==typeof k.expectedValue)throw new Error(`ExperimentFeatureHandler: Expected value type (${typeof k.expectedValue}) does not match the experiment type (${k.experimentType})`);let F=yield B(k.experimentFeatureId);if("json"===k.experimentType){if(void 0===k.valuePath)throw new Error("ExperimentFeatureHandler: valuePath is required for json experiment types");for(let B=0;B(0,F.sH)(this,void 0,void 0,(function*(){return B.getFeatureValue(k)}))))}))}getCacheKey(k){let B=`ExperimentFeature:${k.experimentFeatureId}:${k.expectedValue.toString()}`;return"json"===k.experimentType&&k.valuePath&&(B+=`:${k.valuePath.join(".")}`),B}}class nt extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){return H.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getQuestSystem(k.questId)===k.questSystem}))}getCacheKey(k){return`HasGameQuest:${k.questId}:${k.questSystem}`}}class at extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=K(k,["feature"]);if(B.length>0)throw new Error(`HasMemberFeaturePreconditionHandler: Missing required properties: ${B.join(", ")}`);return H.q.instance.prodigy.gameContainer.get("3a0-8003").hasFeatureAccess(k.feature)}))}getCacheKey(k){return`HasMemberFeature:${k.feature}`}}class rt extends V.F{isReady(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return!0}))}getCacheKey(){return null}}class ot extends V.F{isReady(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return H.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.petTeam.some((B=>B.getElement()===k.element))}))}getCacheKey(k){return`HasPetOnTeamWithElement${k.element}`}}var ht=U(60157);class ct extends V.F{isReady(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){let U,F;if(B&&(0,ht.Q9)(B))U=B.battleType,F=B.battleSubType;else{const k=G.wa5.getActiveScene().container.get("BattleController");if(!k)return!1;U=k.type,F=k.subType}return!!k.battleType.some((k=>k===U))&&!(k.battleSubType&&!k.battleSubType.some((k=>k===F)))}))}getCacheKey(k){var B;return`InBattleOfType${k.battleType.map((k=>k.toString())).join("|")}-${null===(B=k.battleSubType)||void 0===B?void 0:B.join("|")}`}}var dt=U(71586),lt=U(30226);class ut extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const k=dt.R.getNowWithServerTimezoneOffset();return lt.J.isDateWithinSchoolHours(k)&<.J.isSchoolDay(k)}))}getCacheKey(k){return"IsDuringSchoolHours"}}class ft extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const k=dt.R.getNowWithServerTimezoneOffset();return lt.J.isWeekend(k)}))}getCacheKey(k){return"IsDuringWeekend"}}class bt extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=H.q.instance.prodigy.world;return!(k.zone&&!k.zone.some((k=>k===B.getCurrentZone())))&&!(k.map&&!k.map.some((k=>k===B.getCurrentMap())))}))}getCacheKey(k){var B,U;return`IsInZone\n Zone${null===(B=k.zone)||void 0===B?void 0:B.map((k=>k.toString())).join("|")}\n Map${null===(U=k.map)||void 0===U?void 0:U.join("|")}`}}class pt extends V.F{isReady(){return(0,F.sH)(this,void 0,void 0,(function*(){return H.q.instance.prodigy.gameContainer.get("3a0-8003").isMember}))}getCacheKey(){return"IsMember"}}var vt=U(52157),gt=U(77938);class mt extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(k.follow&&!k.follow.some((k=>k===B.equipment.getFollow())))return!1;if(k.followRarity){const U=gt.t.getItem("follow",B.equipment.getFollow());if(U&&!k.followRarity.some((k=>{var B;return k===(null===(B=U.data)||void 0===B?void 0:B.rarity)})))return!1}if(k.hat&&!k.hat.some((k=>k===B.equipment.getHat())))return!1;if(k.hatRarity){const U=gt.t.getItem("hat",B.equipment.getHat());if(U&&!k.hatRarity.some((k=>{var B;return k===(null===(B=U.data)||void 0===B?void 0:B.rarity)})))return!1}if(k.outfit&&!k.outfit.some((k=>k===B.equipment.getOutfit())))return!1;if(k.outfitRarity){const U=gt.t.getItem("outfit",B.equipment.getOutfit());if(U&&!k.outfitRarity.some((k=>{var B;return k===(null===(B=U.data)||void 0===B?void 0:B.rarity)})))return!1}if(k.weapon&&!k.weapon.some((k=>k===B.equipment.getWeapon())))return!1;if(k.weaponRarity){const U=gt.t.getItem("weapon",B.equipment.getWeapon());if(U&&!k.weaponRarity.some((k=>{var B;return k===(null===(B=U.data)||void 0===B?void 0:B.rarity)})))return!1}if(k.spellRelic&&!k.spellRelic.some((k=>k===B.equipment.getSpellRelic())))return!1;if(k.spellRelicRarity){const U=gt.t.getItem("spellRelic",B.equipment.getSpellRelic());if(U&&!k.spellRelicRarity.some((k=>{var B;return k===(null===(B=U.data)||void 0===B?void 0:B.rarity)})))return!1}if(k.boots&&!k.boots.some((k=>k===B.equipment.getBoots())))return!1;if(k.bootsRarity){const U=gt.t.getItem("boots",B.equipment.getBoots());if(U&&!k.bootsRarity.some((k=>{var B;return k===(null===(B=U.data)||void 0===B?void 0:B.rarity)})))return!1}if(k.mount&&!k.mount.some((k=>k===B.equipment.getMount())))return!1;if(k.mountRarity){const U=gt.t.getItem("mount",B.equipment.getMount());if(U&&!k.mountRarity.some((k=>{var B;return k===(null===(B=U.data)||void 0===B?void 0:B.rarity)})))return!1}return!0}))}getCacheKey(k){var B,U,F,G,j,$,H,V,W,q,K,z,Y,Q;return`IsWearingGear\n Follow${null===(B=k.follow)||void 0===B?void 0:B.map((k=>k.toString())).join("|")}\n FollowRarity${null===(U=k.followRarity)||void 0===U?void 0:U.map((k=>k.toString())).join("|")}\n Hat${null===(F=k.hat)||void 0===F?void 0:F.map((k=>k.toString())).join("|")}\n HatRarity${null===(G=k.hatRarity)||void 0===G?void 0:G.map((k=>k.toString())).join("|")}\n Outfit${null===(j=k.outfit)||void 0===j?void 0:j.map((k=>k.toString())).join("|")}\n OutfitRarity${null===($=k.outfitRarity)||void 0===$?void 0:$.map((k=>k.toString())).join("|")}\n Weapon${null===(H=k.weapon)||void 0===H?void 0:H.map((k=>k.toString())).join("|")}\n WeaponRarity${null===(V=k.weaponRarity)||void 0===V?void 0:V.map((k=>k.toString())).join("|")}\n SpellRelic${null===(W=k.spellRelic)||void 0===W?void 0:W.map((k=>k.toString())).join("|")}\n SpellRelicRarity${null===(q=k.spellRelicRarity)||void 0===q?void 0:q.map((k=>k.toString())).join("|")}\n Boots${null===(K=k.boots)||void 0===K?void 0:K.map((k=>k.toString())).join("|")}\n BootsRarity${null===(z=k.bootsRarity)||void 0===z?void 0:z.map((k=>k.toString())).join("|")}\n Mount${null===(Y=k.mount)||void 0===Y?void 0:Y.map((k=>k.toString())).join("|")}\n MountRarity${null===(Q=k.mountRarity)||void 0===Q?void 0:Q.map((k=>k.toString())).join("|")}`}}var yt=U(90975);class _t extends V.F{isReady(){return(0,F.sH)(this,void 0,void 0,(function*(){return yt.Y.meetsNarrativeCatchupRequirements()||yt.Y.meetsNarrativeIntroRequirements()}))}getCacheKey(){return"MeetsCampaignReplayNarrativeRequirement"}}class Et extends V.F{isReady(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return!0}))}getCacheKey(k){return`RemainingHealth${k.wizardPercent}|${k.petPercent}|${k.teamPercent}`}}class wt extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getLevel();return!(k.minLevel&&B&&Bk.maxLevel)}))}getCacheKey(k){return`IsLevel\n MinLevel${k.minLevel}\n MaxLevel${k.maxLevel}`}}var Tt=U(29738);class St extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){return k.validLocales.includes(Tt.O.localeCode)}))}getCacheKey(k){var B;return`HasLocale\n ValidLocales${null===(B=k.validLocales)||void 0===B?void 0:B.map((k=>k.toString())).join("|")}`}}class At extends V.F{isReady(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=H.q.instance.prodigy.gameContainer.get("db5-fb6e");return yield B.meetsRequirements(k.requirementID)}))}getCacheKey(k){return`MeetsFeatureRequirement_${k.requirementID}`}}const Ct={[j.n.DATE_BEFORE]:et,[j.n.DATE_AFTER]:tt,[j.n.HAS_EXPERIMENT_FEATURE]:st,[j.n.HAS_MEMBER_FEATURE]:at,[j.n.HAS_TOTAL_BATTLE_PASS_XP]:z,[j.n.HAS_QUEST_SYSTEM]:nt,[j.n.DAILY_LOGIN_CALENDAR_CHECK_DATE]:J,[j.n.IS_DURING_SCHOOL_HOURS]:ut,[j.n.IS_MEMBER]:pt,[j.n.HAS_PET_ON_TEAM_WITH_ELEMENT]:ot,[j.n.ALL_PETS_ON_TEAM_HAVE_ELEMENT]:W,[j.n.IN_BATTLE_OF_TYPE]:ct,[j.n.REMAINING_HEALTH]:Et,[j.n.IS_DURING_WEEKEND]:ft,[j.n.HAS_MET_STATE_CHALLENGE_GOAL]:rt,[j.n.IS_IN_ZONE]:bt,[j.n.HAS_APPEARANCE]:it,[j.n.IS_WEARING_GEAR]:mt,[j.n.MEETS_CAMPAIGN_REPLAY_NARRATIVE_REQUIREMENT]:_t,[j.n.IS_QUEST_TASK_COMPLETE]:vt.L,[j.n.IS_LEVEL]:wt,[j.n.HAS_LOCALE]:St,[j.n.MEETS_FEATURE_REQUIREMENT]:At,[j.n.BATTLE_HAS_ENEMY]:q};class Ot extends class{constructor(){this.reset()}doCheck(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){let F=k.getCacheKey(B);if(F&&!0===(null==B?void 0:B.negateResult)&&(F=`${F}-negate`),F&&F in this._resultsCache)return this._resultsCache[F];let G=yield k.isReady(B,U);return!0===(null==B?void 0:B.negateResult)&&(G=!G),F&&(this._resultsCache[F]=G),G}))}reset(){this._resultsCache={},this._cache={}}}{constructor(k){super(),this._taskParams=k}check(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=Ct[k];if(void 0===U)return G.VyI.log(`No precondition handler found for type: ${k}. Treating precondition as unmet (false).`,G.$bb.Warning),!1;const F=new U;return this.doCheck(F,B,this._taskParams)}))}}},32073:(k,B,U)=>{"use strict";U.d(B,{v:()=>X});var F=U(62459),G=U(68910),j=U(99625),$=U(65741),H=U(94428),V=U(35120),W=U(29738),q=U(23082),K=U(29546),z=U(13021),Y=U(61895),Q=U(19145);class X{static canBeTransportedToQuickQuiz(k={}){if(!W.O.isEnglishLocale())return{canBeTransported:!1,info:"Player is not in English locale"};const B=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=[q.G.CharCreate,q.G.CharSelect,q.G.SplashScreen,q.G.Loading],G=V.q.instance.game.state.current;if(U.includes(G))return{canBeTransported:!1,info:`${G} is not an eligible state`};if(G===q.G.PrefabScene){if(V.q.instance.game.state.getCurrentState().prefabGameAssets.includes(j.l.DuelsStadiumMenu))return{canBeTransported:!1,info:"Player is in the duels stadium menu"};if(!k.skipPendingLoadCheck){const k=V.q.instance.game.state.get(q.G.Loading);if(null==k?void 0:k.isLoadingAdditional)return{canBeTransported:!1,info:"Loading screen still has pending tasks"}}}if(!B.hasCompletedTutorial())return{canBeTransported:!1,info:"Player has not completed the tutorial"};if(V.q.instance.prodigy.education.isQuestionInterfaceOpen)return{canBeTransported:!1,info:"Question interface is open"};if(z.w.isInTitanParty())return{canBeTransported:!1,info:"Player is in a titan party"};if(!k.skipOpenMenuCheck){if(V.q.instance.prodigy.open.menus.length>0||V.q.instance.prodigy.open.renderMenus.length>0)return{canBeTransported:!1,info:"Player is in a menu"}}if(!k.skipBattleCanEndInstantlyCheck){if(G===q.G.SecureBattleRevamp){const k=F.wa5.getActiveScene().container.get("BattleController");if(!(null==k?void 0:k.canBattleEndInstantly())&&!(null==k?void 0:k.isBattleBeingForciblyEndedMidBattle()))return{canBeTransported:!1,info:"Battle can not end right now"}}if(G===q.G.CoOp){if(!V.q.instance.game.state.getCurrentState().canBattleEndInstantly())return{canBeTransported:!1,info:"CoOp Battle can not end right now"}}}return V.q.instance.prodigy.gameContainer.get("c97-bd0d").canUseMultiplayer()?Q.Z.instance.isInProgress()?{canBeTransported:!1,info:"Spell Status Effects Tutorial is in progress"}:{canBeTransported:!0,info:""}:{canBeTransported:!1,info:"Multiplayer is currently unavailable"}}static canBeTransportedFromBattleToQuickQuiz(){return!!V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasCompletedTutorial()}static transportPlayerToQuickQuiz(k,B){const U=new G.Sprite(V.q.instance.game.renderer.generateTexture(V.q.instance.game.world,{region:new G.Rectangle(0,0,V.q.instance.game.width,V.q.instance.game.height)}));switch(U.filters=[new G.filters.BlurFilter],k){case H.oW.WizardDash:X.ensureMapCallsCleanup(),V.q.instance.game.state.start(q.G.LootDashTransport,!0,U,B);break;default:return void F.RQr.createHandler("transportPlayerToQuickQuiz: Quick quiz type does not exist")}}static cancelQuickQuiz(k){switch(k){case H.oW.WizardDash:Y.B.cancelQuickQuiz();break;default:return void F.RQr.createHandler("transportPlayerToQuickQuiz: Quick quiz type does not exist")}}static addCompletedQuickQuizId(k){var B;const U=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;U.data.quickQuizData=null!==(B=U.data.quickQuizData)&&void 0!==B?B:{completedQuizIds:[]},U.data.quickQuizData.completedQuizIds.push(k),U.data.quickQuizData.completedQuizIds=U.data.quickQuizData.completedQuizIds.slice(-10),U.updated=!0}static markAssignmentAsCompleted(k){V.q.instance.prodigy.gameContainer.get("c97-bd0d").completeAssignment(k)}static hasCompletedQuickQuiz(k){var B,U;return null!==(U=null===(B=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.quickQuizData)||void 0===B?void 0:B.completedQuizIds.includes(k))&&void 0!==U&&U}static getPlayerProgressFromChannelData(k){const B=k[`playerProgress-${V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.userID}`];return B?B.progress:$.k.NOT_STARTED}static isInValidSubjectForQuickQuiz(){return K.X.isMathSubjectRequirementMet()}static ensureMapCallsCleanup(){if(V.q.instance.game.state.current===q.G.TileScreen){V.q.instance.game.state.getCurrentState().forceMapCleanupOnShutdown()}}}},4764:(k,B,U)=>{"use strict";U.d(B,{w:()=>st});var F=U(8674),G=U(62459),j=U(79687),$=U(65741),H=U(94428);class V{static getChannelName(k){return`quickQuiz-${k}`}}var W=U(35120),q=U(29738),K=U(71543),z=U(32073),Y=(U(48417),U(17516)),Q=U(96535),X=U(23082),Z=U(13956),J=U(76546),tt=U(80403),et=U(70330);class it extends J.D{constructor(k){super(),this._quickQuizManager=k,this._synapse.onNotificationReceived.add(this.handleSynapseNotifications,this)}cleanUp(){this._synapse.onNotificationReceived.remove(this.handleSynapseNotifications,this)}handleSynapseNotifications(k){switch(k.type){case Y.m.QuickQuizJoinRequest:let B;if(B=W.q.instance.game.state.current===X.G.CoOp?W.q.instance.game.state.getCurrentState():G.wa5.getActiveScene().container.get("BattleController"),B&&z.v.canBeTransportedFromBattleToQuickQuiz()){const U=this._localizer.getText("LOOT_DASH_QUICK_QUIZ_CANCELLING_BATTLE");if(this._quickQuizManager.currentQuickQuizId)return B.enablePostBattleExpressMode(U),void this._quickQuizManager.setMayHavePendingActiveQuizzes();const F=G.wa5.getActiveScene().container.get("RemoteConfig");if(F&&(this._activePlayer.battleResumeData={battleType:B.type,data:F.clientState}),!B.canBattleEndInstantly()){const F={enablePostBattleFlowExpressMode:!0,forceEndMessageText:U};return void B.beginEndingBattle((()=>{this._quickQuizManager.attemptToJoinQuickQuiz(k.data.quizType,k.data.quickQuizId,k.data.channelName)}),F)}}this._quickQuizManager.attemptToJoinQuickQuiz(k.data.quizType,k.data.quickQuizId,k.data.channelName)}}joinQuickQuizChannel(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this._synapse.joinFeatureChannel(k,this.handleChannelMessages.bind(this))}))}leaveQuickQuizChannel(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this._synapse.leaveFeatureChannel(k)}))}handleChannelMessages(k){this._quickQuizManager.handleChannelMessages(k)}callDebugRoute(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return Promise.resolve()}))}getActiveQuickQuizData(){return(0,F.sH)(this,void 0,void 0,(function*(){return yield this.getActiveQuizzesFromGraphQL()}))}getActiveQuizzesFromGraphQL(){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this._graphQlRequestSender.sendRequest("\n query getActiveQuickQuizzes {\n viewer {\n quickQuizzes {\n id\n startDate\n endDate\n assignment {\n id\n }\n }\n }\n }\n ")).data.viewer.quickQuizzes.sort(((k,B)=>k.startDate-B.startDate)).map((k=>({id:k.id,type:H.oW.WizardDash,assignmentId:k.assignment.id,startDate:k.startDate,endDate:k.endDate})))}))}}(0,F.Cg)([(0,Z.b)("779-a746"),(0,F.Sn)("design:type",et.d)],it.prototype,"_synapse",void 0),(0,F.Cg)([(0,Z.b)("8bb-7057"),(0,F.Sn)("design:type",tt.K)],it.prototype,"_graphQlRequestSender",void 0),(0,F.Cg)([(0,Z.b)("306-5359"),(0,F.Sn)("design:type",Q.W)],it.prototype,"_activePlayer",void 0),(0,F.Cg)([(0,Z.b)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],it.prototype,"_localizer",void 0);let st=class{get currentQuickQuizId(){return this._currentQuickQuizId}get currentQuickQuizType(){return this._currentQuickQuizType}get currentAssignmentId(){return this._quizIdToAssignmentIdMap.get(this._currentQuickQuizId)}get waitingToTransport(){return G.Aq$.isDefined(this._timerID)}constructor(){this.onQuickQuizMessageReceived=new G.HN0,this.onQuickQuizExitFlowComplete=new G.HN0,this.checkForValidStateIntervalMs=5e3,this._mayHavePendingActiveQuizzes=!0,this._quizIdToAssignmentIdMap=new Map,this._startTime=0,this._allMessages=[],this._onCustomDataReceived=new G.HN0,this.quickQuizNetworkHandler=new it(this);W.q.instance.prodigy.gameContainer.get("c97-bd0d").onSocketReconnect.add((()=>this.onSocketReconnect()))}cleanUp(){this._startTime=0,this.quickQuizNetworkHandler.cleanUp(),this.onQuickQuizExitFlowComplete.dispose(),this.onQuickQuizMessageReceived.dispose(),this._onCustomDataReceived.dispose()}static instance(){return W.q.instance.prodigy.gameContainer.get("fc2-cb0a")}joinQuickQuizIfActive(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(!q.O.isEnglishLocale())return;if(!z.v.isInValidSubjectForQuickQuiz())return;if(!this._mayHavePendingActiveQuizzes)return;const B=yield this.fetchActiveQuickQuizData();this._mayHavePendingActiveQuizzes=!1;for(const U of B)this.attemptToJoinQuickQuiz(U.type,U.id,V.getChannelName(U.id),k)}))}attemptToJoinQuickQuiz(k,B,U,F){if(q.O.isEnglishLocale()&&z.v.isInValidSubjectForQuickQuiz())if(z.v.hasCompletedQuickQuiz(B))G.VyI.log(`Quick Quiz ${B} has already been completed. Ignoring attempt to join.`,G.$bb.Info);else{if(!this._currentQuickQuizId)return z.v.canBeTransportedToQuickQuiz(F).canBeTransported?(this._currentQuickQuizId=B,this._currentQuickQuizType=k,this._currentChannelName=U,window.clearInterval(this._timerID),this._timerID=void 0,void this.joinQuickQuiz().catch((k=>{G.RQr.logError(k,`Failed to join quick quiz ${this._currentQuickQuizId}, ${this._currentQuickQuizType}`),this.leaveQuickQuiz()}))):void this.createTransportTimer();this._mayHavePendingActiveQuizzes=!0}}createTransportTimer(){G.Aq$.isDefined(this._timerID)||(this._timerID=window.setInterval((()=>{z.v.canBeTransportedToQuickQuiz().canBeTransported&&(window.clearInterval(this._timerID),this._timerID=void 0,this._mayHavePendingActiveQuizzes=!0,this.joinQuickQuizIfActive().catch((k=>{G.RQr.logError(k,`Failed to join quick quiz ${this._currentQuickQuizId}, ${this._currentQuickQuizType}`),this.leaveQuickQuiz()})))}),this.checkForValidStateIntervalMs))}joinQuickQuiz(){return(0,F.sH)(this,void 0,void 0,(function*(){this._quizIdToAssignmentIdMap.has(this._currentQuickQuizId)||(yield this.fetchActiveQuickQuizData(),this._quizIdToAssignmentIdMap.has(this._currentQuickQuizId)||G.VyI.log(`QuickQuizManager: Quick Quiz ID not found in map for quick quiz ${this._currentQuickQuizId}`,G.$bb.Error)),yield this.quickQuizNetworkHandler.joinQuickQuizChannel(this._currentChannelName);const k=(yield this._onCustomDataReceived.asPromise())[0],B=z.v.getPlayerProgressFromChannelData(k);if(B===$.k.COMPLETED)return z.v.addCompletedQuickQuizId(this._currentQuickQuizId),void this.leaveQuickQuiz();z.v.transportPlayerToQuickQuiz(this._currentQuickQuizType,B)}))}leaveQuickQuizChannel(){this.quickQuizNetworkHandler.leaveQuickQuizChannel(this._currentChannelName).catch(G.RQr.createHandler("Failed to leave quick quiz channel"))}leaveQuickQuiz(){this.leaveQuickQuizChannel(),this._currentQuickQuizId=void 0,this._currentQuickQuizType=void 0,this._currentChannelName=void 0,this._allMessages.length=0}handleChannelMessages(k){switch(this._allMessages.push(k),k.type){case"channelData":const B=k.channelData;B.quizStatus===$.d.INACTIVE&&this.leaveQuickQuiz(),this._startTime=B.matchStartTime,this._onCustomDataReceived.dispatch(B);break;case"broadcastAction":const U=k.actionInfo;if(!U)return;switch(U.type){case H.H9.QuizEnded:z.v.cancelQuickQuiz(this._currentQuickQuizType),this.leaveQuickQuizChannel()}}this.onQuickQuizMessageReceived.dispatch(k)}handleQuizExitFlowComplete(){this.leaveQuickQuiz(),this.onQuickQuizExitFlowComplete.dispatch(),this.joinQuickQuizIfActive({skipBattleCanEndInstantlyCheck:!0}).then((()=>{this.currentQuickQuizId||!this.waitingToTransport&&K.p.resumeBattle()||W.q.instance.prodigy.world.teleportToCurrentMap()})).catch((k=>{G.RQr.logError(k,`Failed to join quick quiz ${this._currentQuickQuizId}, ${this._currentQuickQuizType}`),this.leaveQuickQuiz()}))}setMayHavePendingActiveQuizzes(){this._mayHavePendingActiveQuizzes=!0}onSocketReconnect(){this.setMayHavePendingActiveQuizzes(),this.joinQuickQuizIfActive().then((()=>{this._currentQuickQuizId&&W.q.instance.prodigy.education.loadAndInitEducationData().catch(G.RQr.createHandler("SplashScreen: Error reloading education data"))})).catch((k=>{G.RQr.logError(k,`Failed to join quick quiz ${this._currentQuickQuizId}, ${this._currentQuickQuizType}`),this.leaveQuickQuiz()}))}getMillisecondsSinceStart(){return W.q.instance.prodigy.gameContainer.get("a03-308f").getServerTimeMs()-this._startTime}fetchActiveQuickQuizData(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.quickQuizNetworkHandler.getActiveQuickQuizData();for(const B of k)this._quizIdToAssignmentIdMap.set(B.id,B.assignmentId);return k}))}};st=(0,F.Cg)([(0,j.injectable)(),(0,F.Sn)("design:paramtypes",[])],st)},43579:(k,B,U)=>{"use strict";U.d(B,{Nx:()=>H,TQ:()=>$,_l:()=>j,fs:()=>W,wS:()=>V});var F,G=U(97495);!function(k){k.DifficultyMode="DIFFICULTY_MODE",k.SelectedState="SELECTED_STATE",k.MaxLevel="MAX_LEVEL",k.TitleColor="TITLE_COLOR"}(F||(F={}));const j="DIFFICULTY_MODE";var $,H;!function(k){k.Unselected="#AB5947",k.RegularSelected="#363636",k.HardSelected="#4132CF",k.ExpertSelected="#D734D4"}($||($={})),function(k){k.Select="select",k.Unlock="unlock",k.Current="current",k.ComingSoon="coming-soon"}(H||(H={}));const V={[G.i.Regular]:void 0,[G.i.Hard]:59,[G.i.Expert]:60};var W;!function(k){k.RegularHeaderText="GO_TO_EASY_MODE",k.RegularBodyText="ARE_YOU_SURE_EASY_MODE",k.HardHeaderText="GO_TO_HARD_MODE",k.HardBodyText="ARE_YOU_SURE_HARD_MODE",k.ExpertHeaderText="GO_TO_EXPERT_MODE",k.ExpertBodyText="ARE_YOU_SURE_EXPERT_MODE",k.ZoneUnavailableForDifficultyText="ZONE_UNAVAILABLE_FOR_DIFFICULTY"}(W||(W={}))},9579:(k,B,U)=>{"use strict";U.d(B,{a:()=>Y});var F=U(8674),G=U(62459),j=U(35120),$=U(1717),H=U(30226),V=U(15821),W=U(58776);const q=JSON.parse('{"i":{"N4":{"requirements":[{"dynamicStoreItemPurchaseCount":{"id":"white-glove-service-normal-mode-restrictions-free-offer","purchaseCount":1}},{"accountCreationDate":{"after":1759354069533}},{"difficultyUnlocked":"hard"},{"restrictionMet":"normal-academy-27-pet-collection"}],"evaluationStrategy":"RequireNone"}}}'),K={[$.$.Rescue]:"BATTLE_RULES_DESCRIPTION_PETS_RESCUED",[$.$.EvolutionTier]:"BATTLE_RULES_DESCRIPTION_EVOLUTION_LEVEL",[$.$.Element]:"BATTLE_RULES_DESCRIPTION_ELEMENTAL_PET",[$.$.Level]:"BATTLE_RULES_DESCRIPTION_PET_LEVEL",[$.$.MergeRank]:"BATTLE_RULES_DESCRIPTION_MERGE_RANK",[$.$.Rarity]:"BATTLE_RULES_DESCRIPTION_RARITY"},z={[$.$.Rescue]:"BATTLE_RULES_DESCRIPTION_PETS_RESCUED_SINGULAR",[$.$.EvolutionTier]:"BATTLE_RULES_DESCRIPTION_EVOLUTION_LEVEL_SINGULAR",[$.$.Element]:"BATTLE_RULES_DESCRIPTION_ELEMENTAL_PET_SINGULAR",[$.$.Level]:"BATTLE_RULES_DESCRIPTION_PET_LEVEL_SINGULAR",[$.$.MergeRank]:"BATTLE_RULES_DESCRIPTION_MERGE_RANK_SINGULAR",[$.$.Rarity]:"BATTLE_RULES_DESCRIPTION_RARITY_SINGULAR"};class Y{static getRequirementsResult(k){return(0,F.sH)(this,void 0,void 0,(function*(){return j.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirements(k)}))}static isEligibleForFreePetPack(){return(0,F.sH)(this,void 0,void 0,(function*(){return j.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirements(q.i.N4)}))}static hasReceivedFreePetPack(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=j.q.instance.prodigy.gameContainer.get("7a1-ff33"),B=(yield k.getTasksInProgress()).find((k=>{var B;return k.taskID===(null===(B=q.i.N4.requirements[0].dynamicStoreItemPurchaseCount)||void 0===B?void 0:B.id)}));return!!B&&B.taskProgress.status===W.t.COMPLETE}))}static markFreePetPackAsClaimed(){j.q.instance.prodigy.gameContainer.get("9ea-3f44").markFreeRestrictionOfferClaimed().catch(G.RQr.createHandler("RestrictionHelper: Error marking free pet pack as claimed"))}static tryResetPlayerLastUnmetBattleRequirements(){const k=j.q.instance.prodigy.gameContainer.get("306-5359");k.data.lastUnmetBattleRequirements&&Y.getRequirementsResult(k.data.lastUnmetBattleRequirements.featureRequirements).then((k=>{k&&Y.resetPlayerLastUnmetBattleRequirements()})).catch(G.RQr.createHandler("[RestrictedSpawnPointComponent]: Error opening battle restrictions popup with provided requirements"))}static resetPlayerLastUnmetBattleRequirements(){const k=j.q.instance.prodigy.gameContainer.get("306-5359");k.data.lastUnmetBattleRequirements=void 0,k.updated=!0}static getRuleDescriptionKey(k){var B;const U=Y.getRuleType(k);return 1===k.petCount&&null!==(B=z[U])&&void 0!==B?B:K[U]}static getRuleDescriptionArgs(k,B){var U,F,G,j,V,W,q,K;switch(k){case $.$.EvolutionTier:return null!==(F=null===(U=null==B?void 0:B.evolutionTier)||void 0===U?void 0:U.toString())&&void 0!==F?F:"";case $.$.Element:return null!==(G=null==B?void 0:B.affinity)&&void 0!==G?G:"";case $.$.Level:return null!==(V=null===(j=null==B?void 0:B.level)||void 0===j?void 0:j.toString())&&void 0!==V?V:"";case $.$.MergeRank:return null!==(q=null===(W=null==B?void 0:B.mergeRank)||void 0===W?void 0:W.toString())&&void 0!==q?q:"";case $.$.Rarity:return H.J.convertRarityToText(null!==(K=null==B?void 0:B.rarity)&&void 0!==K?K:0);default:return""}}static getRuleType(k){return V.A.isDefined(null==k?void 0:k.evolutionTier)?$.$.EvolutionTier:V.A.isDefined(null==k?void 0:k.affinity)?$.$.Element:V.A.isDefined(null==k?void 0:k.level)?$.$.Level:V.A.isDefined(null==k?void 0:k.mergeRank)?$.$.MergeRank:V.A.isDefined(null==k?void 0:k.rarity)?$.$.Rarity:$.$.Rescue}}},53040:(k,B,U)=>{"use strict";U.d(B,{y:()=>z});var F=U(8674),G=U(62459),j=U(99625),$=U(642),H=U(35120),V=U(2272),W=U(75329),q=U(99429),K=U(77997);class z{static handleAbuseReportResponsePromise(k){return(0,F.sH)(this,void 0,void 0,(function*(){try{200===(yield k).getHttpStatusCode()?z.displayReportingSuccessDialog():z.displayReportingFailureDialog()}catch(B){z.displayReportingFailureDialog()}}))}static displayReportingSuccessDialog(){const k=H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);H.q.instance.prodigy.open.informationDialog(new W.Z(k.getText("BUTTON_OKAY"),void 0,V.E.Small,q.K.CONFIRM_WIDTH,k.getText("REPORT_SUCCESS_TITLE"),k.getText("REPORT_SUCCESS_BODY"),void 0,void 0,void 0,j.l.DefaultHeader,j.l.DefaultFooter))}static displayReportingFailureDialog(){const k=H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);H.q.instance.prodigy.open.informationDialog(new W.Z(k.getText("BUTTON_OKAY"),void 0,V.E.Small,q.K.CONFIRM_WIDTH,k.getText("REPORT_FAILED_TITLE"),k.getText("REPORT_FAILED_BODY"),void 0,void 0,void 0,j.l.ErrorDialogHeader,j.l.DefaultFooter))}static openReportHouseConfirmationDialog(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield H.q.instance.game.renderer.extract.base64(H.q.instance.game.world),B=H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);H.q.instance.prodigy.open.confirmationDialogNoIconButtons(new $.k(B.getText("BUTTON_NO"),void 0,B.getText("BUTTON_YES"),(()=>{this.reportHouse(k)}),void 0,V.E.Small,q.K.CONFIRM_WIDTH,B.getText("REPORT_MODAL_TITLE"),B.getText("CONFIRM_REPORT")))}))}static reportHouse(k){const B=H.q.instance.prodigy.gameContainer.get("bbf-3165"),U=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=H.q.instance.prodigy.world.getZone(H.q.instance.prodigy.world.getCurrentZone()).screen,j=null==F?void 0:F.saveTag.split("-").pop(),$={clientID:K.Z,userID:U.userID.toString(),reportedUserID:null!=j?j:"",reason:"Inappropriate House",category:"House",screenshot:k};z.handleAbuseReportResponsePromise(B.reportAbuse($)).catch(G.RQr.createHandler("Error sending abuse report"))}}},87557:(k,B,U)=>{"use strict";U.d(B,{V:()=>q});var F=U(8674),G=U(62459),j=U(95891),$=U(35120),H=U(28152),V=U(77997),W=U(53040);let q=class extends G.uAl{setReportedUserID(k){this.reportedUserID=k}reportPlayer(k,B){if(!(0,j.isNumber)(this.reportedUserID))return;const U=$.q.instance.prodigy.gameContainer.get("bbf-3165"),F=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player,H={clientID:V.Z,userID:F.userID.toString(),reportedUserID:this.reportedUserID.toString(),reason:B,category:k,screenshot:void 0};W.y.handleAbuseReportResponsePromise(U.reportAbuse(H)).catch(G.RQr.createHandler("Error reporting player"))}};q=(0,F.Cg)([(0,G.EVk)("ReportPlayer",H.Y.reporting)],q)},77997:(k,B,U)=>{"use strict";U.d(B,{Z:()=>F,v:()=>G});const F="1",G="enableReporting"},5708:(k,B,U)=>{"use strict";U.d(B,{X:()=>$});var F=U(8674),G=U(79687),j=U(6030);let $=class{getRestrictionById(k){return j[k]}};$=(0,F.Cg)([(0,G.injectable)()],$)},37050:(k,B,U)=>{"use strict";U.d(B,{Q:()=>J});var F=U(8674),G=U(62459),j=U(79687),$=U(77601),H=U(42448);const V=(0,$.gb)({key:"rifts-pet-reuse-data",default:{enabled:!1,portal:H.ni.Portal2,data:{reuseCostPerSecond:.01,petCooldownMs:36e5,costMultiplierPerUse:1}},activateAssociatedExperiments:0});var W,q=U(38170),K=U(35120),z=U(34829),Y=U(76277),Q=U(44094),X=U(30226),Z=U(38560);let J=W=class{constructor(){this._riftsTierTotalDataMap={[H.ni.Portal1]:void 0,[H.ni.Portal2]:void 0,[H.ni.Portal3]:void 0},this._lastRiftsDataFetchMapMs={[H.ni.Portal1]:void 0,[H.ni.Portal2]:void 0,[H.ni.Portal3]:void 0}}get riftsConfig(){return this._riftsConfig}get riftsTierTotalData(){return this.selectedPortalId?this._riftsTierTotalDataMap[this.selectedPortalId]:void 0}static getRiftsDataProvider(){return K.q.instance.prodigy.gameContainer.get("196-d3a5")}fetchRiftsConfig(){return(0,F.sH)(this,void 0,void 0,(function*(){this._riftsConfig?this._lastRiftsConfigFetchMs&&q.r.toDateUtcMs(Date.now())-this._lastRiftsConfigFetchMs>z.s.MINUTES_IN_MS&&(this._riftsConfig=yield this._riftsNetworkHandler.getRiftsConfig(),this._lastRiftsConfigFetchMs=q.r.toDateUtcMs(Date.now())):(this._riftsConfig=yield this._riftsNetworkHandler.getRiftsConfig(),this._lastRiftsConfigFetchMs=q.r.toDateUtcMs(Date.now()));const k=(0,Y.G)(V);return k.enabled&&this._riftsConfig[k.portal]&&(this._riftsConfig[k.portal].options.petReuseData=k.data),this._riftsConfig}))}fetchRiftsTierData(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this.selectedPortalId&&(this.selectedPortalId=yield this._riftsNetworkHandler.getSelectedPortalId(),!this.selectedPortalId))return;const k=this._lastRiftsDataFetchMapMs[this.selectedPortalId];try{this._riftsTierTotalDataMap[this.selectedPortalId]?k&&q.r.toDateUtcMs(Date.now())-k>z.s.MINUTES_IN_MS&&(this._riftsTierTotalDataMap[this.selectedPortalId]=yield this._riftsNetworkHandler.getRiftsTierData(this.selectedPortalId),this._lastRiftsDataFetchMapMs[this.selectedPortalId]=q.r.toDateUtcMs(Date.now())):(this._riftsTierTotalDataMap[this.selectedPortalId]=yield this._riftsNetworkHandler.getRiftsTierData(this.selectedPortalId),this._lastRiftsDataFetchMapMs[this.selectedPortalId]=q.r.toDateUtcMs(Date.now()))}catch(B){return}return this._riftsTierTotalDataMap[this.selectedPortalId]}))}getRiftsPortalConfig(){if(this.selectedPortalId&&this._riftsConfig)return this._riftsConfig[this.selectedPortalId];G.VyI.log("RiftsDataProvider: Missing data when attempting get the rifts portal config",G.$bb.Error)}getActiveRiftsPortalIds(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.fetchRiftsConfig();if(!k)return;const B=Object.values(H.ni),U=[],F=q.r.toDateUtcMs(Date.now());for(const j of B){const B=k[j];if(!B)continue;if(G.Aq$.isDefined(B.enabled)&&!B.enabled)continue;const $=B.startDate?q.r.toDateUtcMs(B.startDate):void 0,H=B.endDate?q.r.toDateUtcMs(B.endDate):void 0;(void 0===$&&void 0===H||void 0===$&&H&&H>F||void 0===H&&$&&$F)&&U.push(j)}return U}))}getRiftRunEntryCost(k){var B,U,F,G;const j=W.getRiftsDataProvider().getRiftsPortalConfig();return null!==(G=null===(F=null===(U=null===(B=null==j?void 0:j.options)||void 0===B?void 0:B.entryCostData)||void 0===U?void 0:U[k])||void 0===F?void 0:F.quantity)&&void 0!==G?G:W._DEFAULT_ENTRY_COST}getRiftKeyMagicoinCost(){var k,B;const U=W.getRiftsDataProvider().getRiftsPortalConfig();return null!==(B=null===(k=null==U?void 0:U.options)||void 0===k?void 0:k.keyMagicoinCost)&&void 0!==B?B:W._DEFAULT_KEY_MAGICOIN_COST}getCurrentRiftsId(){var k;return null===(k=this.getRiftsPortalConfig())||void 0===k?void 0:k.riftsId}static getBuffRerollCost(k){var B,U,F;const G=W.getRiftsDataProvider().getRiftsPortalConfig();let j=W._DEFAULT_BUFF_REROLL_MAGICOIN_COST,$=W._DEFAULT_BUFF_REROLL_MAGICOIN_COST_MULTIPLIER*k;return(null===(B=null==G?void 0:G.options)||void 0===B?void 0:B.buffRerollData)&&(j=null!==(U=G.options.buffRerollData.baseMagicoinRerollCost)&&void 0!==U?U:W._DEFAULT_BUFF_REROLL_MAGICOIN_COST,$=Math.pow(null!==(F=G.options.buffRerollData.rerollCostMultiplier)&&void 0!==F?F:W._DEFAULT_BUFF_REROLL_MAGICOIN_COST_MULTIPLIER,k)),Math.ceil(j*$)}static getOpponentsRerollCost(k){var B,U,F;const G=W.getRiftsDataProvider().getRiftsPortalConfig();let j=W._DEFAULT_OPPONENTS_REROLL_MAGICOIN_COST,$=W._DEFAULT_OPPONENTS_REROLL_MAGICOIN_COST_MULTIPLIER*k;return(null===(B=null==G?void 0:G.options)||void 0===B?void 0:B.opponentsRerollData)&&(j=null!==(U=G.options.opponentsRerollData.baseMagicoinRerollCost)&&void 0!==U?U:W._DEFAULT_OPPONENTS_REROLL_MAGICOIN_COST,$=Math.pow(null!==(F=G.options.opponentsRerollData.rerollCostMultiplier)&&void 0!==F?F:W._DEFAULT_OPPONENTS_REROLL_MAGICOIN_COST_MULTIPLIER,k)),Math.ceil(j*$)}static canRerollBuff(k){var B;const U=W.getRiftsDataProvider().getRiftsPortalConfig();let F;return(null===(B=null==U?void 0:U.options)||void 0===B?void 0:B.buffRerollData)&&(F=U.options.buffRerollData.maxRerolls),void 0===F||k{"use strict";U.d(B,{n:()=>bt});var F=U(8674),G=U(87490),j=U(62459),$=U(85855),H=U(99625),V=U(36648),W=U(24652),q=U(35120),K=U(23082),z=U(20705),Y=U(74958),Q=U(13956),X=U(43714),Z=U(58707),J=U(642),tt=U(2272),et=U(53661),it=U(54865),st=U(80060),nt=U(71790),at=U(37050),rt=U(1551),ot=U(43503),ht=U(68836),ct=U(14117),dt=U(68387),lt=U(90500),ut=U(72955),ft=U(82781);class bt extends z.f{constructor(){super(...arguments),this.persistentPrefabs=[]}get modifierGridPrefab(){return this._modifierGridPrefab}init(k=ut.I){const B=j.wa5.getActiveScene().container;B.bind(G.BattleConstants).to(G.BattleConstants).asSingleton(),B.bind(G.ConstantsDataProvider).to(nt.T).asSingleton(),q.q.instance.prodigy.load.assetsAsPromise([$.V.Bgm_intro,V.q.Sparkle]).then((()=>{q.q.instance.prodigy.audio.playBGM($.V.Bgm_intro,!0),q.q.instance.prodigy.audio.resumeBGM()})).catch(j.RQr.createHandler("Failed to load the Rifts into BGM.")),this.addBackgroundFill(k===ft.Q?"#639D95":void 0),new it.w(k).start().catch(j.RQr.createHandler("Failed to start the RiftsStateMachine"))}setRiftRunProgress(k){switch(ht.T.riftTier=k.currentRiftTier,k.type){case W.cn.Normal:ht.T.firstBattleCompleted=k.round>1;const B=q.q.instance.prodigy.gameContainer.get("c47-20b6");B.rifts.riftRunUuid=k.riftRunSegmentUuid,B.rifts.riftRunRoundUuid=k.riftRunRoundSegmentUuid,j.Aq$.isDefined(k.chosenOpponentTeamIndex)&&(ht.T.chosenOpponentTeamIndex=k.chosenOpponentTeamIndex,ht.T.chosenHomeTeamPetUids=k.chosenHomeTeamPetUids)}}resumeRiftRun(k){var B;if(ht.T.canResumeBattle=k,k)q.q.instance.game.state.start(K.G.Rifts,void 0,ft.Q);else switch(null===(B=this._riftsSyncedDataStore.cache.currentRiftRunProgress)||void 0===B?void 0:B.type){case W.cn.Normal:ht.T.sawBuffPopup=!1,q.q.instance.game.state.start(K.G.Rifts,void 0,lt.R);break;case W.cn.Boss:q.q.instance.game.state.start(K.G.Rifts,void 0,dt.O);break;default:ot.L.resetRiftRunProgressAndTeleportToDragonIsle(null).catch(j.RQr.createHandler("RiftsScreen: Failed to reset rift run progress and teleport to Dragon Isle when resuming a rift run with no specified rift tier type"))}}static onRiftRunClose(k){const B=q.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);q.q.instance.prodigy.open.confirmationDialog(new J.k(B.getText("BUTTON_QUIT_CAPITAL"),(()=>{ot.L.resetRiftRunProgressAndTeleportToDragonIsle(k).catch(j.RQr.createHandler("RiftsScreen: Failed to reset rift run progress and teleport to Dragon Isle"))}),B.getText("BUTTON_BACK_CAPITAL"),(()=>q.q.instance.prodigy.open.menuCloseAll()),void 0,tt.E.Medium,void 0,B.getText("RIFT_RUN_CLOSE_POPUP_TITLE"),B.getText("RIFT_RUN_CLOSE_POPUP_BODY")))}addBackgroundFill(k="#ddb2a5"){const B=new j._mx;B.name="BackgroundFill",B.layer="background",B.addComponent(j.dLy);const U=B.addComponent(j.Lom);U.setSize(new j.or0(1920,1080)),U.setColor(k),j.wa5.getActiveScene().addGameObject(B)}initPersistentPrefabs(){return(0,F.sH)(this,void 0,void 0,(function*(){this.persistentPrefabs.length||(this.persistentPrefabs=yield Promise.all([rt.Q.addModifierGridPrefab().then((k=>this._modifierGridPrefab=k)),rt.Q.addProgressTrackPrefab()]))}))}destroyPersistentPrefabs(){for(const k of this.persistentPrefabs)k.destroy();this.persistentPrefabs.length=0}updateModifierGrid(){rt.Q.updateModifierGridPrefab(this._modifierGridPrefab)}showBuffPopup(){var k,B;const U=this._riftsSyncedDataStore.cache.currentRiftRunProgress;if(!U)return void j.VyI.log("RiftsScreen: Cannot show buff popup if current rift run is undefined",j.$bb.Error);if(U.type!==W.cn.Normal)return void j.VyI.log("RiftsScreen: Cannot show buff popup if current rift run is not a normal rift",j.$bb.Error);const F=U.buffModifier;if(!F)return void j.VyI.log("RiftsScreen: Cannot show buff popup if buff modifier is undefined",j.$bb.Error);const G=null!==(k=null==U?void 0:U.numBuffRerolls)&&void 0!==k?k:0,$=at.Q.canRerollBuff(G),V=at.Q.getBuffRerollCost(G),K=U.currentRiftTier,z=q.q.instance.prodigy.gameContainer.get("5c7-e02d");q.q.instance.prodigy.open.prefabMenu(H.l.RiftRunModifierPopup,(()=>{var k;const B=null===(k=q.q.instance.prodigy.open.menus[q.q.instance.prodigy.open.menus.length-1].prefab.findComponentInChildren(X.x))||void 0===k?void 0:k.GameObject;B&&rt.Q.animateModifierIconToGrid(B,0),this.injectToHeaderPrefab({[et.bL.ShowMagicoin]:!z.isHardCurrencyMemberLocked(V)}).catch(j.RQr.createHandler("Failed to inject magicoin show into header prefab"))}),void 0,!0,!1,{IS_BUFF:!0,MODIFIER_ICON:bt.getGuidForModifierIcon(null!==(B=F.icon)&&void 0!==B?B:""),MODIFIER_NAME:F.caption,MODIFIER_DESCRIPTION:F.description,MODIFIER_GOLD_BONUS:0,MODIFIER_REROLL_COST:V,SHOW_MC_COST:!z.isHardCurrencyMemberLocked(V),SHOW_MEMBER_ICON:z.isHardCurrencyMemberLocked(V),CAN_REROLL_MODIFIER:$,MAGICOIN_BALANCE:z.getBalance(27),RIFT_TIER:K});q.q.instance.prodigy.gameContainer.get("c47-20b6").rifts.sendRiftRunBonusOffered(F),this.injectToHeaderPrefab({[et.bL.ShowMagicoin]:!1}).catch(j.RQr.createHandler("Failed to inject magicoin show into header prefab"))}injectToHeaderPrefab(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._headerPrefab){const k=q.q.instance.prodigy.gameContainer.get("d0e-64fd");this._headerPrefab=yield k.loadWithDependenciesFromGUID(H.l.RiftRunMenuBackground),j.wa5.getActiveScene().addGameObject(this._headerPrefab)}st.d.updateInjectedValues(this._headerPrefab,k)}))}handleNotEnoughCurrency(k,B){var U;this._headerPrefab||j.VyI.log("RiftsScreen: Cannot handle not enough currency since the header prefab is not initialized",j.$bb.Error);const F=null===(U=this._headerPrefab)||void 0===U?void 0:U.findComponentInChildren(Z.b);null==F||F.tryDismissTooltip(),null==F||F.handleNotEnoughCurrency(k,Y.Aj.RIFT_ENCOUNTER_REROLL_TYPE,B)}closeNotEnoughCurrencyTooltip(){var k;const B=null===(k=this._headerPrefab)||void 0===k?void 0:k.findComponentInChildren(Z.b);null==B||B.tryDismissTooltip()}shutdown(){var k;this.closeNotEnoughCurrencyTooltip(),null===(k=this._headerPrefab)||void 0===k||k.destroy(),this._headerPrefab=null,this.destroyPersistentPrefabs(),super.shutdown()}static getGuidForModifierIcon(k){return V.q[`Effect_${k}_small`]}}(0,F.Cg)([(0,Q.b)("9ac-9677"),(0,F.Sn)("design:type",ct.M)],bt.prototype,"_riftsSyncedDataStore",void 0)},1551:(k,B,U)=>{"use strict";U.d(B,{Q:()=>nt});var F,G,j=U(8674),$=U(62459),H=U(88022),V=U(99625),W=U(24652),q=U(42448),K=U(35120),z=U(29834),Y=U(23082),Q=U(13956),X=U(85515),Z=U(43714);!function(k){k.StepSpacing="STEP_SPACING",k.StepData="STEP_DATA"}(F||(F={})),function(k){k.TrackBackingColor="TRACK_BACKING_COLOR",k.OuterCircleColor="OUTER_CIRCLE_COLOR",k.InnerCircleColor="INNER_CIRCLE_COLOR",k.IconImage="ICON_IMAGE",k.IsCurrentStep="IS_CURRENT_STEP",k.ProgressIndicatorOuter="PROGRESS_INDICATOR_OUTER"}(G||(G={}));var J,tt=U(80060),et=U(77713),it=U(39785),st=U(68836);!function(k){k.DefaultBorderColor="#655466",k.CurrentStepBorderColor="#00466E",k.FinalCurrentStepBorderColor="#7D1E3D",k.CompletedStepBorderColor="#55772F",k.DefaultInnerCircleColor="#ABA5C4",k.CurrentStepInnerCircleColor="#3D99D1",k.FinalCurrentStepInnerCircleColor="#F68F00",k.CompletedStepInnerCircleColor="#A6C755"}(J||(J={}));class nt{static addProgressTrackPrefab(){return(0,j.sH)(this,arguments,void 0,(function*(k=this.PROGRESS_TRACK_X,B=this.PROGRESS_TRACK_Y){const U=yield tt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,V.l.ProgressTrack,this.getProgressTrackInjectionData());return U.transform.setPosition(k,B),U}))}static getProgressTrackInjectionData(){const k=K.q.instance.prodigy.gameContainer.get("9ac-9677").cache.currentRiftRunProgress,B=(null==k?void 0:k.type)===W.cn.Normal?q.vP:1,U=(null==k?void 0:k.type)===W.cn.Normal?k.round:1;return{[F.StepSpacing]:20,[F.StepData]:Array.from({length:B},((k,F)=>{const j=F===U-1,$=F===B-1,V=F0?this.getModifierGridInjectionData():this.getEmptyModifierGridInjectionData());return F.transform.setPosition(k,B),F}))}static updateModifierGridPrefab(k){const B=this.getModifierGridInjectionData();k.findComponentInChildren(et.h).GameObject.children.forEach(((k,U)=>{tt.d.updateInjectedValues(k,B.MODIFIERS[U])}))}static getModifierGridInjectionData(){const k=K.q.instance.prodigy.gameContainer.get("9ac-9677").cache.currentRiftRunProgress;if(!k)return{MODIFIERS:[]};switch(k.type){case W.cn.Boss:return{MODIFIERS:k.bossRiftModifiers.map((k=>({IS_BUFF:!1,DISABLED:!1,MODIFIER_ICON:it.n.getGuidForModifierIcon(k.icon),MODIFIER_TEXT:"",MODIFIER_TOOLTIP_TITLE:k.caption,MODIFIER_TOOLTIP_TEXT:k.description})))};case W.cn.Normal:const B=k.buffModifier,U=[...k.chosenNerfModifiers];return st.T.chosenModifier&&U.push(st.T.chosenModifier),{MODIFIERS:[{IS_BUFF:!0,DISABLED:!1,MODIFIER_ICON:it.n.getGuidForModifierIcon(B.icon),MODIFIER_TEXT:"",MODIFIER_TOOLTIP_TITLE:B.caption,MODIFIER_TOOLTIP_TEXT:B.description},...U.map((k=>({IS_BUFF:!1,DISABLED:!1,MODIFIER_ICON:it.n.getGuidForModifierIcon(k.icon),MODIFIER_TEXT:"",MODIFIER_TOOLTIP_TITLE:k.caption,MODIFIER_TOOLTIP_TEXT:k.description}))),...Array.from({length:3-U.length},(()=>({IS_BUFF:!1,DISABLED:!0})))]};default:return{MODIFIERS:[]}}}static getEmptyModifierGridInjectionData(){return{MODIFIERS:Array.from({length:4},(()=>({IS_BUFF:!1,DISABLED:!0})))}}static animateModifierIconToGrid(k,B){const U=k.findComponentInChildren(z.j),F=U.GameObject.parent,G=K.q.instance.game.state.get(Y.G.Rifts),j=k.findComponentInChildren(Z.x),H=G.modifierGridPrefab.children[0].children[B].transform;F.active=!0;const V=k.transform.worldPosition;k.layer=X.E.UiLayer,k.parent=null,k.transform.worldPosition=V,j.setMovement(H.worldPosition.x-H.fullWidth/2,H.worldPosition.y-H.fullHeight/2),j.startTween(),j.onComplete.addOnce((()=>{var B;null===(B=k.findComponentInChildren($.okU))||void 0===B||B.destroy(),U.GameObject.active=!0,U.playAnimation("add-fx",!1),U.OnAnimationComplete.addOnce((()=>{k.destroy(),G.updateModifierGrid()}))}))}}nt.PROGRESS_TRACK_X=1243,nt.PROGRESS_TRACK_Y=134,nt.MODIFIER_GRID_X=37,nt.MODIFIER_GRID_Y=134,nt.MODIFIER_GRID_X_IN_BATTLE=18,nt.MODIFIER_GRID_Y_IN_BATTLE=50,(0,j.Cg)([(0,Q.b)("d0e-64fd"),(0,j.Sn)("design:type",$.wNP)],nt,"_prefabLoader",void 0)},43503:(k,B,U)=>{"use strict";U.d(B,{L:()=>rt});var F=U(8674),G=U(62459),j=U(99625),$=U(36648),H=U(24227),V=U(24652),W=U(42448),q=U(90633),K=U(73678),z=U(38170);class Y{static ceilAboveEpsilon(k){return Math.ceil(k-Y.EPSILON)}static round(k,B){const U=Math.pow(10,B);return Math.round(k*U)/U}static weightedRandom(k,B=100){var U;const F=k.reduce(((k,U)=>{var F;return k+(null!==(F=U.weight)&&void 0!==F?F:B)}),0);let G=Math.random()*F;for(const j of k)if(G-=null!==(U=j.weight)&&void 0!==U?U:B,G<=0)return j;return k[0]}}Y.EPSILON=1e-4;var Q=U(35120),X=U(91207),Z=U(77938),J=U(46784),tt=U(65050),et=U(41674),it=U(44094),st=U(97447),nt=U(30226),at=U(24409);class rt{static getWeightedRouletteReward(k){const B=Y.weightedRandom(k),U=Z.t.getItem(B.type,B.id),F=null==U?void 0:U.data;if(!U||!F)return G.VyI.log("RiftsUtil#getWeightedRouletteReward: Item not found",G.$bb.Error),null;return{type:B.type,ID:B.id,N:B.quantity,data:{name:nt.J.getLocalizationNameKey(F),flavorText:nt.J.getLocalizationFlavorKey(F),rarity:F.rarity}}}static visuallyAdjustDragonRouletteRewards(k){const B=k.reduce(((k,B)=>k+B.weight),0),U=k.filter((k=>"gold"===k.type||"currency"===k.type)).reduce(((k,B)=>k+B.weight),0),F=B-U;let G=1,j=1;if(F>0){const k=.3;G=B*(1-k)/U,j=B*k/F}return k.map((k=>{const B="gold"===k.type||"currency"===k.type?k.weight*G:k.weight*j;return{type:k.type,ID:k.id,N:k.quantity,R:B}}))}static canResumeRiftRun(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U,F,j,$;const H=Q.q.instance.prodigy.gameContainer.get("196-d3a5"),V=Q.q.instance.prodigy.gameContainer.get("9ac-9677"),[W,q,K]=yield Promise.all([H.fetchRiftsConfig(),H.fetchRiftsTierData(),H.getActiveRiftsPortalIds()]),z=null!==(B=null===(k=V.cache.currentRiftRunProgress)||void 0===k?void 0:k.currentRiftTier)&&void 0!==B?B:void 0;return!(!(W&&q&&H.selectedPortalId&&(null===(U=W[H.selectedPortalId])||void 0===U?void 0:U.riftsId)===(null===(F=null==V?void 0:V.cache)||void 0===F?void 0:F.currentRiftsId))||G.Aq$.isDefined(z)&&(null===(j=q[z])||void 0===j?void 0:j.type)!==(null===($=V.cache.currentRiftRunProgress)||void 0===$?void 0:$.type)||!(null==K?void 0:K.includes(H.selectedPortalId)))}))}static resetRiftRunProgressAndTeleportToDragonIsle(k){return(0,F.sH)(this,void 0,void 0,(function*(){k?yield k.goToState(at.y):Q.q.instance.prodigy.world.it(st.j.MAP_KEY),yield Q.q.instance.prodigy.gameContainer.get("8f8-d5bc").resetRiftRun()}))}static getBossDisplayDataFromBossType(k){var B;const U=Q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),F=H.j.getBossElementFromBossType(k);let j="",$="",W="",q="";const K=V.vA[k];return j=K?U.getText(K):it.$.toTitleCase(k),W=V.rI[k][0],q=null!==(B=V.rI[k][1])&&void 0!==B?B:"",$=V.Hz[k],{name:j,keyPoseAtlasGuid:W,keyPoseFrame:q,element:F,tierBackgroundImageGuid:$}}static setUpIconGuidOverrides(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=Q.q.instance.prodigy.gameContainer.get("196-d3a5"),U=yield B.fetchRiftsConfig();for(const F of W.T7){const B=W.JG[F];if(!U||!G.Aq$.isDefined(B))continue;const j=null===(k=U[B])||void 0===k?void 0:k.currencyTheme;if(!j)continue;const H=`Rifts_currency_${j}`;$.q[H]&&(X.P[`Icon_currency_${F}`]=$.q[H],X.P[`Icon_currency_${F}_store`]=$.q[`${H}_store`])}}))}static shouldShowRiftsCycleModal(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=Q.q.instance.prodigy.gameContainer.get("196-d3a5"),U=yield B.fetchRiftsConfig();if(!U)return!1;const F=Q.q.instance.prodigy.gameContainer.get("306-5359");let G=!1;return Object.values(W.ni).forEach((B=>{this.checkRiftsCycleData(U[B],B,k)&&(G=!0)})),F.forceSaveCharacter(),G}))}static checkRiftsCycleData(k,B,U){var F,G,j,$,H,V,W,Y,X,Z,J,tt,et,it;let st=!0,nt=!0;const at=null!==(F=(it=Q.q.instance.prodigy.gameContainer.get("306-5359").data).rifts)&&void 0!==F?F:it.rifts={};null!==(G=at.cycleData)&&void 0!==G||(at.cycleData={});const rt=z.r.toDateUtcMs(Date.now()),ot=(null==k?void 0:k.startDate)?z.r.toDateUtcMs(k.startDate):void 0,ht=(null==k?void 0:k.endDate)?z.r.toDateUtcMs(k.endDate):void 0;let ct=null!==($=null===(j=at.cycleData[B])||void 0===j?void 0:j.modalSeenCount)&&void 0!==$?$:0,dt=null!==(V=null===(H=at.cycleData[B])||void 0===H?void 0:H.skippedResets)&&void 0!==V?V:0;return(null===(W=null==k?void 0:k.options.cycleModalData)||void 0===W?void 0:W.cycleId)!==(null===(Y=at.cycleData[B])||void 0===Y?void 0:Y.lastSeenCycleId)&&(ct=0,dt=0),U!==K.A_.DRAGONISLE?(st=!1,nt=!1):(null==k?void 0:k.enabled)?ot&&ot>rt||ht&&ht=k.options.cycleModalData.maxTimesSeen?st=!1:(null===(tt=null==k?void 0:k.options.cycleModalData)||void 0===tt?void 0:tt.riftsToSkipCount)&&ct>0&&dt{"use strict";U.d(B,{L:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{enter(k=0,B){const U=function(){this.gameObject.active=!0,this._cardEnterTween.resetToStart(),this._cardEnterTween.playAnimation(),B&&this._cardEnterTween.onTweenComplete.addOnce(B)}.bind(this);window.setTimeout(U,k)}exit(k=0,B){const U=function(){this._cardExitTween.playAnimation(),this._cardExitTween.onTweenComplete.addOnce((()=>{B&&B()}))}.bind(this);window.setTimeout(U,k)}};(0,F.Cg)([(0,G.MnK)(G.bTj),(0,F.Sn)("design:type",G.bTj)],$.prototype,"_cardEnterTween",void 0),(0,F.Cg)([(0,G.MnK)(G.bTj),(0,F.Sn)("design:type",G.bTj)],$.prototype,"_cardExitTween",void 0),$=(0,F.Cg)([(0,G.EVk)("RiftRunOpponentCardAnimationController",j.Y.rifts)],$)},68836:(k,B,U)=>{"use strict";U.d(B,{T:()=>G});class F{static clear(){this.chosenModifier=null,this.riftTier=1,this.chosenHomeTeamPetUids=void 0,this.sawBuffPopup=!1}}F.riftTier=1,F.sawBuffPopup=!1;class G extends F{static clear(){super.clear(),this.chosenOpponentTeamIndex=-1,this.usedPetUids=[],this.reward=void 0,this.isFinalBattle=!1,this.firstBattleCompleted=!1,this.canResumeBattle=!1}}G.chosenOpponentTeamIndex=-1,G.usedPetUids=[],G.isFinalBattle=!1},14117:(k,B,U)=>{"use strict";U.d(B,{M:()=>z,R:()=>G});var F,G,j=U(8674),$=U(62459),H=U(79687),V=U(24652),W=U(35120),q=U(35537),K=U(24227);!function(k){k[k.Available=1]="Available",k[k.OnCooldown=2]="OnCooldown",k[k.Expired=3]="Expired"}(G||(G={}));let z=class{constructor(){this[F]="riftsSyncedData"}get cache(){return this._cache}init(k){$.Aq$.isDefined(this._cache)?$.VyI.log("RiftsSyncedDataStore was already initialized",$.$bb.Warning):this._cache=k}getUsedPetMetadata(k){var B,U,F,G;const j=W.q.instance.prodigy.gameContainer.get("196-d3a5");if(!$.Aq$.isDefined(j.selectedPortalId))return;const H=null===(U=null===(B=this._cache[j.selectedPortalId])||void 0===B?void 0:B.metaProgress.usedPetData)||void 0===U?void 0:U[k];return(null===(F=this._cache.currentRiftRunProgress)||void 0===F?void 0:F.type)===V.cn.Normal&&$.Aq$.isDefined(H)&&(null===(G=this._cache.currentRiftRunProgress)||void 0===G?void 0:G.usedPetUids.includes(k))?{timestamp:void 0,currentlyAvailable:!1,reuseCount:0}:H}getUsedPetReuseCost(k){var B,U;const F=this.getUsedPetMetadata(k),G=null===(U=null===(B=W.q.instance.prodigy.gameContainer.get("196-d3a5").getRiftsPortalConfig())||void 0===B?void 0:B.options)||void 0===U?void 0:U.petReuseData;return $.Aq$.isDefined(null==F?void 0:F.timestamp)&&G?K.j.getRiftsPetReuseCost(F,G,Date.now()):0}isPetAvailableForUse(k){return this.getPetCooldownStatus(k)!==G.OnCooldown}getPetCooldownStatus(k){var B,U;const F=this.getUsedPetMetadata(k),j=W.q.instance.prodigy.gameContainer.get("196-d3a5");if(!F)return G.Available;const H=F.currentlyAvailable?G.Available:G.OnCooldown;if(void 0===F.timestamp||F.currentlyAvailable)return H;const V=null===(U=null===(B=j.getRiftsPortalConfig())||void 0===B?void 0:B.options)||void 0===U?void 0:U.petReuseData;return $.Aq$.isDefined(V)&&void 0!==(null==V?void 0:V.petCooldownMs)?Date.now()>=F.timestamp+V.petCooldownMs?G.Expired:G.OnCooldown:H}hasUsedPets(){var k,B,U;if((null===(k=this._cache.currentRiftRunProgress)||void 0===k?void 0:k.type)!==V.cn.Normal)return!1;const F=W.q.instance.prodigy.gameContainer.get("196-d3a5");return(null===(B=this._cache.currentRiftRunProgress)||void 0===B?void 0:B.usedPetUids.length)>0||Object.values(null!==(U=this._cache[F.selectedPortalId].metaProgress.usedPetData)&&void 0!==U?U:{}).length>0}[(F=q.sE,q.JN)](k){return(0,j.sH)(this,void 0,void 0,(function*(){this._cache=k}))}getRiftsEntityPortalEntryData(){const k=W.q.instance.prodigy.gameContainer.get("196-d3a5");if(k.selectedPortalId)return this._cache[k.selectedPortalId];$.VyI.log("RiftsSyncedDataStore: No selected portal ID when attempting to fetch the portal entry data",$.$bb.Error)}};z=(0,j.Cg)([(0,H.injectable)()],z)},68387:(k,B,U)=>{"use strict";U.d(B,{O:()=>et});var F,G=U(8674),j=U(87490),$=U(62459),H=U(68910),V=U(88022),W=U(99625),q=U(24652),K=U(35120),z=U(23082),Y=U(53661),Q=U(37050),X=U(39785),Z=U(43503),J=U(11673),tt=U(53027);!function(k){k.AllModifierData="ALL_MODIFIER_DATA",k.OnNext="ON_NEXT",k.BossKeyPose="BOSS_KEY_POSE",k.BossName="NAME",k.WeaknessIcon="WEAKNESS_ICON",k.BossIsSilhouetted="BOSS_IS_SILHOUETTED",k.ShowBossInfo="SHOW_INFO"}(F||(F={}));class et extends J.O{constructor(){super(...arguments),this.bossBackgroundColors={[j.EElementType.Fire]:{background:"#E2B48B",pattern:"#F1C69C"},[j.EElementType.Ice]:{background:"#86B5C6",pattern:"#96C5D6"},[j.EElementType.Plant]:{background:"#C1CC90",pattern:"#D4DFA6"},[j.EElementType.Storm]:{background:"#A58EAF",pattern:"#B49EBE"},[j.EElementType.Water]:{background:"#93A9E9",pattern:"#A3B9F9"},[j.EElementType.Shadow]:{background:"#9F99BD",pattern:"#ABA5C7"},[j.EElementType.Physical]:{background:"#93877B",pattern:"#9F9387"},[j.EElementType.Astral]:{background:"#E3D09D",pattern:"#F2DFAE"}}}enter(){const k=Object.create(null,{enter:{get:()=>super.enter}});return(0,G.sH)(this,void 0,void 0,(function*(){var B;const U=K.q.instance.game.state.get(z.G.Rifts),G=yield Z.L.canResumeRiftRun(),J=this._riftsSyncedDataStore.cache.currentRiftRunProgress;if(!U||!G||(null==J?void 0:J.type)!==q.cn.Boss||!J.bossType)return void(yield Z.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine));yield U.initPersistentPrefabs();const et=Z.L.getBossDisplayDataFromBossType(J.bossType),it=this._riftsSyncedDataStore.getRiftsEntityPortalEntryData(),st=this.bossBackgroundColors[et.element],nt=this.getRestriction(),at=Q.Q.getRestrictionBadgeData(nt);this._prefabHeaderInjectionValues={[Y.bL.HeaderTitle]:et.name,[Y.bL.OnClose]:()=>{X.n.onRiftRunClose(this._stateMachine)},[Y.bL.ShowRiftKeys]:!1,[Y.bL.BackgroundHex]:st.background,[Y.bL.GradientHex]:H.Color.shared.setValue(st.background.toLowerCase()).toNumber(),[Y.bL.DiamondsHex]:st.pattern,[Y.bL.DiamondsAlpha]:.8};const rt=$.wa5.getActiveScene().container.get(j.BattleConstants),ot=!$.Aq$.isDefined(null===(B=it.metaProgress.bossDefeats)||void 0===B?void 0:B[J.bossType]);this._prefabGUID=W.l.BossRiftScreen,this._prefabInjectionValues={[F.AllModifierData]:J.bossRiftModifiers.map((k=>({IS_BUFF:!1,DISABLED:!1,MODIFIER_ICON:X.n.getGuidForModifierIcon(k.icon),MODIFIER_NAME:k.caption,MODIFIER_DESCRIPTION:k.description,MODIFIER_TEXT:"",MODIFIER_GOLD_BONUS:0}))),[F.BossKeyPose]:[et.keyPoseAtlasGuid,et.keyPoseFrame],[F.BossName]:et.name,[F.WeaknessIcon]:[V._.Ui_battle_revamp_json,`icon-mini-element-${rt.getElementalWeakness(et.element)}`],[F.BossIsSilhouetted]:ot,[F.ShowBossInfo]:!ot,[F.OnNext]:()=>{this._stateMachine.goToState(tt.t).catch($.RQr.createHandler("BossRiftScreenState: Error transitioning to TeamSelectionState"))},[Y.Fm.ShowRestrictionBadge]:at.showRestrictionBadge,[Y.Fm.RestrictionBadgeTest]:at.restrictionBadgeText},yield k.enter.call(this)}))}}},86498:(k,B,U)=>{"use strict";U.d(B,{j:()=>V});var F=U(8674),G=U(35120),j=U(68836),$=U(72955),H=U(11673);class V extends H.O{enter(){const k=Object.create(null,{enter:{get:()=>super.enter}});return(0,F.sH)(this,void 0,void 0,(function*(){yield k.enter.call(this);G.q.instance.prodigy.gameContainer.get("c47-20b6").rifts.cachedCurrentBossRiftProgress=void 0,j.T.clear(),yield this._stateMachine.goToState($.I)}))}}},84060:(k,B,U)=>{"use strict";U.d(B,{n:()=>W});var F=U(8674),G=U(90633),j=U(35120),$=U(68836),H=U(72955),V=U(87427);class W extends V.I{enter(){const k=Object.create(null,{enter:{get:()=>super.enter}});return(0,F.sH)(this,void 0,void 0,(function*(){yield k.enter.call(this);const B=$.T.firstBattleCompleted&&!j.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(G.B.FEATURE_RIFTS,G.B.BREADCRUMB_RIFTS_AFTER_FIRST_CUTSCENE_SEEN),U=$.T.firstBattleCompleted;$.T.clear(),this._segment.rifts.cachedCurrentNormalRiftProgress=void 0,this._segment.rifts.riftInstanceUuid=void 0,B?j.q.instance.prodigy.world.playScene("dragon_isle-postFirstRift"):yield this._stateMachine.goToState(H.I,{didRiftBattle:U})}))}}},24409:(k,B,U)=>{"use strict";U.d(B,{y:()=>W});var F=U(8674),G=U(24652),j=U(35120),$=U(97447),H=U(68836),V=U(87427);class W extends V.I{enter(){const k=Object.create(null,{enter:{get:()=>super.enter}});return(0,F.sH)(this,void 0,void 0,(function*(){yield k.enter.call(this);let B=!1;const U=this._riftsSyncedDataStore.cache.currentRiftRunProgress;switch(null==U?void 0:U.type){case G.cn.Boss:this._segment.rifts.cachedCurrentBossRiftProgress=void 0,B=!0,H.T.clear();break;case G.cn.Normal:this._segment.rifts.cachedCurrentNormalRiftProgress=void 0,this._segment.rifts.riftInstanceUuid=void 0,B=H.T.firstBattleCompleted,H.T.clear()}this._segment.rifts.riftInstanceUuid=void 0,j.q.instance.prodigy.world.it($.j.MAP_KEY,void 0,void 0,{didRiftBattle:B})}))}}},53232:(k,B,U)=>{"use strict";U.d(B,{X:()=>q});var F=U(8674),G=U(24652),j=U(68836),$=U(43503),H=U(86498),V=U(84060),W=U(11673);class q extends W.O{enter(){const k=Object.create(null,{enter:{get:()=>super.enter}});return(0,F.sH)(this,void 0,void 0,(function*(){yield k.enter.call(this);const B=this._riftsSyncedDataStore.cache.currentRiftRunProgress;if(!B)return j.T.clear(),void(yield $.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine));switch(null==B?void 0:B.type){case G.cn.Boss:yield this._stateMachine.goToState(H.j);break;case G.cn.Normal:yield this._stateMachine.goToState(V.n)}}))}}},90500:(k,B,U)=>{"use strict";U.d(B,{R:()=>yt});var F,G=U(8674),j=U(87490),$=U(62459),H=U(68910),V=U(88022),W=U(99625),q=U(36648),K=U(54300),z=U(24652),Y=U(42448),Q=U(35120),X=U(77938),Z=U(23082),J=U(74958),tt=U(90744),et=U(13956),it=U(43714),st=U(64353),nt=U(95057),at=U(53661),rt=U(22023),ot=U(80060),ht=U(44094),ct=U(77713),dt=U(47255),lt=U(37050),ut=U(39785),ft=U(1551),bt=U(43503),pt=U(82436),vt=U(68836),gt=U(11673),mt=U(53027);!function(k){k.AllOpponentsData="ALL_OPPONENTS_DATA",k.RerollOpponents="REROLL_OPPONENTS",k.ContentAlphaTween="CONTENT_ALPHA_TWEEN",k.OpponentTeamData="OPPONENT_TEAM_DATA",k.IsMemberOption="IS_MEMBER_OPTION",k.IsMemberOptionLocked="IS_MEMBER_OPTION_LOCKED",k.CardSelectedCallback="CARD_SELECTED_CALLBACK",k.ModifierIcon="MODIFIER_ICON",k.ModifierName="MODIFIER_NAME",k.ModifierDescription="MODIFIER_DESCRIPTION",k.ModifierGoldBonus="MODIFIER_GOLD_BONUS",k.PetId="PET_ID",k.PetName="PET_NAME",k.WeaknessIcon="WEAKNESS_ICON",k.PetScale="PET_SCALE",k.PetWidthLimit="PET_WIDTH_LIMIT",k.PetHeightLimit="PET_HEIGHT_LIMIT",k.OnPetLoaded="ON_PET_LOADED",k.IsRarePet="IS_RARE_PET",k.InputBlock="INPUT_BLOCK"}(F||(F={}));class yt extends gt.O{constructor(){super(...arguments),this._teamLoadedFlags=[!1,!1,!1]}enter(){const k=Object.create(null,{enter:{get:()=>super.enter}});return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,j,H,V,q;if(!((yield this.updateCachedRiftRunProgress())&&(yield bt.L.canResumeRiftRun())&&$.Aq$.isDefined(this._currentRiftProgress.nextOpponentTeamOptions)))return void(yield bt.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine));this._segment.rifts.sendRiftRunOpponentSelectionMenuOpenedEvent(),vt.T.chosenModifier=null;const z=Q.q.instance.game.state.get(Z.G.Rifts);yield z.initPersistentPrefabs();const X=null!==(B=this._currentRiftProgress.numOpponentRerolls)&&void 0!==B?B:0,J=lt.Q.canRerollOpponents(X),tt=lt.Q.getOpponentsRerollCost(X),et=Q.q.instance.prodigy.gameContainer.get("5c7-e02d"),it=this.getRiftsKeyId(),st=null!==(j=null===(U=this._secureInventory.get({type:"riftRunKey",id:it}))||void 0===U?void 0:U.quantity)&&void 0!==j?j:0,nt=Q.q.instance.prodigy.gameContainer.get("196-d3a5"),rt=nt.getRiftsPortalConfig();let ot=Y.X5.Default,ht=!1;rt&&nt.selectedPortalId&&(ot=null!==(H=null==rt?void 0:rt.menuTheme)&&void 0!==H?H:Y.X5.Default,ht=null!==(V=null==rt?void 0:rt.storeEnabled)&&void 0!==V&&V),this._prefabHeaderInjectionValues={[at.bL.HeaderTitle]:this._localizer.getText("RIFTS_HEADER_TITLE_OPPONENT_SELECTION"),[at.bL.OnClose]:()=>ut.n.onRiftRunClose(this._stateMachine),[at.bL.ShowHeaderText]:!0,[at.bL.ShowMagicoin]:!et.isHardCurrencyMemberLocked(tt),[at.bL.ShowMagicoinText]:!1,[at.bL.ShowRiftKeys]:!1,[at.bL.StoreEnabled]:ht,[at.bL.StoreKey]:nt.selectedPortalId?Y.d[nt.selectedPortalId]:void 0,[at.bL.RiftCurrencyId]:Y.Ty[null!==(q=nt.selectedPortalId)&&void 0!==q?q:Y.ni.Portal1],[at.bL.RiftKeyAmount]:this.getRiftKeyComparisonText(st),[at.bL.RiftKeyIcon]:K.p[`riftRunKey-${it}`],[at.bL.BackgroundHex]:Y.a6[ot],[at.bL.GradientHex]:Y.aK[ot],[at.bL.DiamondsHex]:Y.h5[ot],[at.bL.DiamondsAlpha]:Y.VS[ot]},this._prefabGUID=W.l.RiftRunOpponentSelection,this._prefabInjectionValues={[F.AllOpponentsData]:this.getAllOpponentTeamsData(this._currentRiftProgress.nextOpponentTeamOptions,this._currentRiftProgress),[F.RerollOpponents]:()=>(0,G.sH)(this,void 0,void 0,(function*(){return this.rerollOpponents()})),[at.bL.OpponentsRerollCost]:tt,[at.bL.ShowRerollMagicoinCost]:!et.isHardCurrencyMemberLocked(tt),[at.bL.ShowRerollMemberIcon]:et.isHardCurrencyMemberLocked(tt),[at.bL.CanRerollOpponents]:J},yield k.enter.call(this)}))}updateCachedRiftRunProgress(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._riftsSyncedDataStore.cache.currentRiftRunProgress;return k&&k.type===z.cn.Normal?(this._currentRiftProgress=k,!0):(yield bt.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine),!1)}))}onOpponentCardsSpawned(k){this._teamLoadedFlags[k]=!0,this._teamLoadedFlags.indexOf(!1)>=0||this.showOpponentCardAnimation(!0)}getAllOpponentTeamsData(k,B,U=!1){return U||this._segment.rifts.sendRiftRunEncounterOffered(k,B.currentRiftTier),k.map(((k,B)=>this.getAllOpponentsData(k,B)))}getAllOpponentsData(k,B){this._teamLoadedFlags=[!1,!1,!1];const U=2===B,j={petsToLoad:k.petIds.length,teamIndex:B};return{[F.CardSelectedCallback]:()=>(0,G.sH)(this,void 0,void 0,(function*(){var F;if(!U||this._player.hasMembership()){vt.T.chosenOpponentTeamIndex=B,vt.T.chosenModifier=k.nerfModifier;const U=null===(F=this._prefabRoot.children[0].children[B].findComponentInChildren(it.x))||void 0===F?void 0:F.GameObject;U&&ft.Q.animateModifierIconToGrid(U,this._currentRiftProgress.round),this._stateMachine.goToState(mt.t).catch($.RQr.createHandler("Failed to go to TeamSelectionState"))}else yield this.openMembershipPrompt()})),[F.IsMemberOption]:U,[F.IsMemberOptionLocked]:U&&!this._player.hasMembership(),[F.ModifierIcon]:q.q[`Effect_${k.nerfModifier.icon}_small`],[F.ModifierName]:k.nerfModifier.caption,[F.ModifierDescription]:k.nerfModifier.description,[F.ModifierGoldBonus]:k.nerfModifier.goldReward,[F.OpponentTeamData]:k.petIds.map((k=>this.getOpponentDataFromPetID(k,j)))}}getOpponentDataFromPetID(k,B){var U,G;const W=Q.q.instance.prodigy.gameContainer.get("196-d3a5").getRiftsPortalConfig(),q=X.t.getItem("pet",k),K=rt.P8.getElementType(q),z=$.wa5.getActiveScene().container.get(j.BattleConstants).getElementalWeakness(K);return{[F.IsRarePet]:null!==(U=null==W?void 0:W.options.rarePetIds.includes(k))&&void 0!==U&&U,[F.PetId]:k,[F.PetName]:null===(G=null==q?void 0:q.data)||void 0===G?void 0:G.name,[F.WeaknessIcon]:[V._.Ui_battle_revamp_json,`icon-mini-element-${z}`],[F.PetScale]:[-1,1],[F.PetWidthLimit]:180,[F.PetHeightLimit]:120,[F.OnPetLoaded]:k=>{var U;null===(U=k.getSpine().pixiSpine)||void 0===U||U.hackTextureBySlotName("shadow",H.Texture.EMPTY);const F=k.getRootContainer().getBounds(),G=k.GameObject.transform.worldPosition.y-F.bottom;k.GameObject.transform.setPosition(0,G),0==--B.petsToLoad&&this.onOpponentCardsSpawned(B.teamIndex)}}}openMembershipPrompt(){return(0,G.sH)(this,void 0,void 0,(function*(){const k={round:this._currentRiftProgress.round,nerf_modifier:this._currentRiftProgress.nextOpponentTeamOptions[2].nerfModifier,opponent_team_pet_ids:this._currentRiftProgress.nextOpponentTeamOptions[2].petIds},B=st.P.shouldUseUnifiedConversionFlow(dt.o.FunnelRiftRunMemberLockedOpponentOption)?nt.R.UnifiedConversionFlow:nt.R.DynamicMemberPrompt;return Q.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:"Rift-Run-Member-Locked-Opponent-Option",category:"Rifts",contentId:JSON.stringify(k),adType:B,adVersion:st.P.getAdVersion(dt.o.FunnelRiftRunMemberLockedOpponentOption)}),new Promise((B=>{Q.q.instance.prodigy.open.membershipInfo(B,{conversionFunnelName:dt.o.FunnelRiftRunMemberLockedOpponentOption,conversionFunnelMetadata:JSON.stringify(k)})}))}))}rerollOpponents(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U;const G=null!==(B=null===(k=this._currentRiftProgress)||void 0===k?void 0:k.numOpponentRerolls)&&void 0!==B?B:0,j={currency:27,value:lt.Q.getOpponentsRerollCost(G)};if(!this._paymentManager.canAfford(j)){const k=JSON.stringify(null===(U=this._currentRiftProgress)||void 0===U?void 0:U.nextOpponentTeamOptions);return void Q.q.instance.game.state.get(Z.G.Rifts).handleNotEnoughCurrency(j,k)}$.wa5.getActiveScene().container.get(F.InputBlock).GameObject.active=!0;const H=this._segment.item.beginSecureItemTransaction();this._riftsNetworkHandler.rerollRiftOpponents().then((()=>{this.showOpponentCardAnimation(!1);const k=Object.assign(Object.assign({},this._segment.rifts.getRiftTransactionData()),{sink_type:J.Aj.RIFT_ENCOUNTER_REROLL_TYPE,sink_id:ht.$.generateUID()});this._segment.rifts.sendRiftRunEncounterRerolled(this._currentRiftProgress.nextOpponentTeamOptions,this._currentRiftProgress.currentRiftTier,j.value,k.transaction_id,k.sink_id),H.flush(k)})).catch($.RQr.createHandler("Error rerolling rift opponents"))}))}showOpponentCardAnimation(k){const B=this._prefabRoot.findComponentsInChildren(pt.L);null==B||B.forEach(((U,G)=>{const j=k?G===B.length-1:0===G,H=k?150*G:150*(B.length-(G+1)),V=j?()=>{var B;if(k){if(!vt.T.sawBuffPopup&&1===(null===(B=this._currentRiftProgress)||void 0===B?void 0:B.round)){const k=Q.q.instance.game.state.get(Z.G.Rifts);vt.T.sawBuffPopup=!0,k.showBuffPopup()}$.wa5.getActiveScene().container.get(F.InputBlock).GameObject.active=!1}else this.refreshOpponents()}:void 0;k?U.enter(H,V):U.exit(H,V)}))}refreshOpponents(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;yield this.updateCachedRiftRunProgress();const U=null!==(k=this._currentRiftProgress.numOpponentRerolls)&&void 0!==k?k:0,G=lt.Q.canRerollOpponents(U),j=lt.Q.getOpponentsRerollCost(U),$=Q.q.instance.prodigy.gameContainer.get("5c7-e02d");this._prefabRoot.findComponentInChildren(ct.h).destroySpawnedPrefabs(),ot.d.updateInjectedValues(this._prefabRoot,{[at.bL.OpponentsRerollCost]:j,[at.bL.CanRerollOpponents]:G,[at.bL.ShowRerollMagicoinCost]:!$.isHardCurrencyMemberLocked(j),[at.bL.ShowRerollMemberIcon]:$.isHardCurrencyMemberLocked(j),[F.AllOpponentsData]:this.getAllOpponentTeamsData(null!==(B=this._currentRiftProgress.nextOpponentTeamOptions)&&void 0!==B?B:[],this._currentRiftProgress,!0)})}))}exit(){const k=Object.create(null,{exit:{get:()=>super.exit}});return(0,G.sH)(this,void 0,void 0,(function*(){Q.q.instance.game.state.get(Z.G.Rifts).closeNotEnoughCurrencyTooltip(),yield k.exit.call(this)}))}}(0,G.Cg)([(0,et.b)("743-fd51"),(0,G.Sn)("design:type",tt.E)],yt.prototype,"_paymentManager",void 0)},72955:(k,B,U)=>{"use strict";U.d(B,{I:()=>vt});var F,G,j=U(8674),$=U(62459),H=U(95891),V=U.n(H),W=U(54300),q=U(99625),K=U(58776),z=U(24652),Y=U(42448),Q=U(90633),X=U(38170),Z=U(35120),J=U(34829),tt=U(77938),et=U(73797),it=U(74958),st=U(53661),nt=U(77713),at=U(10711),rt=U(80060),ot=U(30226),ht=U(97447),ct=U(68836),dt=U(37050),lt=U(43503),ut=U(68387),ft=U(24409),bt=U(90500),pt=U(11673);!function(k){k.RiftRunTiersData="RIFT_RUN_TIERS_DATA",k.FocusedCardIndex="FOCUSED_CARD_INDEX",k.FirstTimeMaxRiftCompleted="FIRST_TIME_MAX_RIFT_COMPLETED",k.MaxRiftPopupOnClick="MAX_RIFT_POPUP_ON_CLICK",k.MaxRiftCardTeaserAlpha="MAX_RIFT_CARD_TEASER_ALPHA",k.RiftHeading="RIFT_HEADING",k.RiftSubHeading="RIFT_SUB_HEADING",k.RewardHeading="REWARD_HEADING",k.EnterRiftButtonText="ENTER_RIFT_BUTTON_TEXT",k.OnEnterRift="ON_ENTER_RIFT",k.LockRiftButton="LOCK_RIFT_BUTTON",k.RarePetsData="RARE_PETS_DATA",k.RiftRunRewardsData="RIFT_RUN_REWARDS_DATA",k.RiftKeyEntryCost="RIFT_KEY_ENTRY_COST",k.RiftKeyIcon="RIFT_KEY_ICON",k.RiftKeyIconSmall="RIFT_KEY_ICON_SMALL",k.MagicoinEntryCost="MAGICOIN_ENTRY_COST",k.ShowRiftKeyOnly="SHOW_RIFT_KEY_ONLY",k.ShowMagicoinOnly="SHOW_MAGICOIN_ONLY",k.ShowRiftKeyAndMagicoin="SHOW_RIFT_KEY_AND_MAGICOIN",k.ShowRiftSubHeading="SHOW_RIFT_SUB_HEADING",k.TierType="TIER_TYPE",k.BossKeyPoseData="BOSS_KEY_POSE_DATA",k.BossBackgroundImageGuid="BOSS_BACKGROUND_IMAGE_GUID",k.RiftTierLocked="RIFT_TIER_LOCKED",k.PreviousTierCompleteText="PREVIOUS_TIER_COMPLETE_TEXT",k.PreviousTierComplete="PREVIOUS_TIER_COMPLETE",k.UnlockConditionMet="UNLOCK_CONDITION_MET",k.UnlockConditionText="UNLOCK_CONDITION_TEXT",k.UnlockConditionTextSize="UNLOCK_CONDITION_TEXT_SIZE",k.InputBlocker="INPUT_BLOCKER",k.MaxRiftTierPopup="MAX_RIFT_TIER_POPUP"}(F||(F={})),function(k){k.RiftsHeaderTitleRiftSelection="RIFTS_HEADER_TITLE_RIFT_SELECTION",k.RiftsSelectionHeading="RIFTS_SELECTION_HEADING",k.RiftsSelectionRewardHeading="RIFTS_SELECTION_REWARD_HEADING",k.RiftsSelectionFirstTimeRewardHeading="RIFTS_SELECTION_FIRST_TIME_REWARD_HEADING",k.RiftsSelectionRewardsHeading="RIFTS_SELECTION_REWARDS_HEADING",k.RiftsSelectionEnterButton="RIFTS_SELECTION_ENTER_BUTTON",k.RiftsPreviousTierCompleteUnlockText="RIFTS_PREVIOUS_TIER_COMPLETE_UNLOCK_TEXT",k.RiftsKeystonesUnlockText="RIFTS_KEYSTONES_UNLOCK_TEXT",k.RiftsPuppetMasterDefeatedUnlockText="RIFTS_PUPPET_MASTER_DEFEATED_UNLOCK_TEXT",k.RiftsLevelLockUnlockText="RIFTS_LEVEL_LOCK_UNLOCK_TEXT",k.RiftsCurrentTierDragonsDefeatedUnlockText="RIFTS_CURRENT_TIER_DRAGON_DEFEATED_UNLOCK_TEXT",k.RiftsOwnPetsUnlockText="RIFTS_OWN_PETS_UNLOCK_TEXT"}(G||(G={}));class vt extends pt.O{enter(){return(0,j.sH)(this,arguments,void 0,(function*(k={didRiftBattle:!1}){var B,U,F,G,j;const H=Z.q.instance.prodigy.gameContainer;yield this.createLoadingOverlay();const V=H.get("8f8-d5bc"),W=H.get("196-d3a5"),q=W.getRiftsPortalConfig();if(!W.selectedPortalId||!q)return $.VyI.log("RiftsSelectionMenuState: No selected portal ID or portal config found",$.$bb.Error),void Z.q.instance.prodigy.world.it(ht.j.MAP_KEY);const K=H.get("84d-05d4"),z=H.get("9ea-3f44");let X,J,tt="";try{yield this._riftsNetworkHandler.updateSelectedPortal(W.selectedPortalId);const[k,H,Q,et]=yield Promise.all([W.fetchRiftsTierData(),this._riftsNetworkHandler.attemptSecureUnlockNextRiftTier(W.selectedPortalId),q.storeEnabled?K.getDynamicStoreUIData({storeKey:Y.d[W.selectedPortalId]}):void 0,q.storeEnabled?z.getStoreConfigurationEntity():void 0]);if(!k)return $.RQr.logError(void 0,"RiftSelectionMenuState: Error fetching rifts data"),this.destroyLoadingOverlay(),void Z.q.instance.prodigy.world.it(ht.j.MAP_KEY);this._riftsTierData=k,this._firstTimeRewardsData=yield V.getFirstTimeRewardsData(),(null==Q?void 0:Q.isSuccess())&&(X=Q.get(),J=null===(U=null===(B=null==et?void 0:et.storeConfigEntity)||void 0===B?void 0:B[null==X?void 0:X.storeKey])||void 0===U?void 0:U.nameLocalizationKey,tt=null!==(j=null===(G=null===(F=null==et?void 0:et.storeConfigEntity)||void 0===F?void 0:F[null==X?void 0:X.storeKey])||void 0===G?void 0:G.label)&&void 0!==j?j:"")}catch(e){return $.RQr.logError(e,"RiftSelectionMenuState: Error fetching rifts data"),this.destroyLoadingOverlay(),void Z.q.instance.prodigy.world.it(ht.j.MAP_KEY)}it.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(it.fk.RiftsOpenRiftSelectionMenu,Q.B.BREADCRUMB_RIFTS_OPENED_RIFT_SELECTION_MENU_FIRST_TIME),this._riftsEntityPortalEntry=this._riftsSyncedDataStore.getRiftsEntityPortalEntryData(),W.riftsConfig&&W.selectedPortalId&&(this._riftsPortalConfig=W.riftsConfig[W.selectedPortalId]),yield this.setUpMenu({enterParams:k,riftsDataProvider:W,riftsPortalConfig:q,dynamicStoreUiData:X,dynamicStoreNameLocalizationKey:J,dynamicStoreBackupName:tt})}))}setUpMenu(k){const B=Object.create(null,{enter:{get:()=>super.enter}});return(0,j.sH)(this,void 0,void 0,(function*(){var U,j,H,V,K,Q,tt;const rt=Z.q.instance.prodigy.gameContainer;k.enterParams.didRiftBattle||this._segment.rifts.sendRiftsSelectionMenuOpenedEvent();(yield this.attemptUnsecureUnlockNextRiftTier())&&(this._riftsEntityPortalEntry=this._riftsSyncedDataStore.getRiftsEntityPortalEntryData()),this._hardCurrencyDataProvider=rt.get("5c7-e02d");const ot=this.getRiftsKeyId(),ht=null!==(j=null===(U=this._secureInventory.get({type:"riftRunKey",id:ot}))||void 0===U?void 0:U.quantity)&&void 0!==j?j:0,ct=rt.get("5c7-e02d").getBalance(27),ut=dt.Q.getOpponentsRerollCost((null===(H=this._riftsSyncedDataStore.cache.currentRiftRunProgress)||void 0===H?void 0:H.type)===z.cn.Normal&&null!==(K=null===(V=this._riftsSyncedDataStore.cache.currentRiftRunProgress)||void 0===V?void 0:V.numOpponentRerolls)&&void 0!==K?K:0),bt=this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(ut);let pt=Y.X5.Default;this._riftsPortalConfig&&(pt=null!==(tt=null===(Q=this._riftsPortalConfig)||void 0===Q?void 0:Q.menuTheme)&&void 0!==tt?tt:Y.X5.Default),this._prefabHeaderInjectionValues={[st.bL.HeaderTitle]:this._localizer.getText(G.RiftsHeaderTitleRiftSelection),[st.bL.OnClose]:()=>{Z.q.instance.game.canvas.style.cursor="",this._stateMachine.goToState(ft.y,k.enterParams).catch($.RQr.createHandler("Error exiting dragon rift menu"))},[st.bL.OpponentsRerollCost]:ut,[st.bL.RiftCurrencyId]:Y.Ty[k.riftsDataProvider.selectedPortalId],[st.bL.RiftKeyAmount]:this.getRiftKeyComparisonText(ht),[st.bL.RiftKeyIcon]:W.p[`riftRunKey-${ot}`],[st.bL.ShowHeaderText]:!1,[st.bL.ShowMagicoin]:!bt,[st.bL.ShowMagicoinText]:!0,[st.bL.ShowRiftKeys]:!0,[st.bL.ShowRerollMagicoinCost]:!bt,[st.bL.ShowRerollMemberIcon]:bt,[st.bL.ShowTooltip]:!1,[st.bL.StoreEnabled]:k.riftsPortalConfig.storeEnabled,[st.bL.StoreKey]:Y.d[k.riftsDataProvider.selectedPortalId],[st.bL.MenuInterfaceName]:it.zE[k.riftsDataProvider.selectedPortalId],[st.bL.BackgroundHex]:Y.a6[pt],[st.bL.GradientHex]:Y.aK[pt],[st.bL.DiamondsHex]:Y.h5[pt],[st.bL.DiamondsAlpha]:Y.VS[pt],[st.n7.TimeRemainingMs]:this._riftsPortalConfig.endDate?X.r.toDateUtcMs(this._riftsPortalConfig.endDate)-X.r.toDateUtcMs(Date.now()):0,[st.n7.ShowTimeRemaining]:$.Aq$.isDefined(this._riftsPortalConfig.endDate)},this._prefabGUID=q.l.RiftsSelectionMenu,this._prefabInjectionValues={[F.RiftRunTiersData]:this.getRiftRunCardsData(ht,ct),[F.FocusedCardIndex]:Object.keys(this._riftsTierData).length-this._riftsEntityPortalEntry.metaProgress.maxRiftTier-1},yield B.enter.call(this),this._inputBlocker=$.wa5.getActiveScene().container.get(F.InputBlocker),this._inputBlocker.GameObject.active=!1;const vt=lt.L.getRiftsModalLastSeenTime(k.riftsDataProvider.selectedPortalId,Y.Qm.TemporaryMemberModal);if(k.riftsPortalConfig.options.useTemporaryMemberModal&&(!vt||Date.now()-vt>=J.A.DAY_IN_MS))Z.q.instance.prodigy.open.openMemberLockedGoldRiftModal(),lt.L.setRiftsModalLastSeenTime(k.riftsDataProvider.selectedPortalId,Y.Qm.TemporaryMemberModal);else{const B=(0,at.KQ)(Y.d[k.riftsDataProvider.selectedPortalId]);k.riftsPortalConfig.storeEnabled&&k.dynamicStoreUiData&&(!B||Date.now()-B>=J.A.DAY_IN_MS)&&(this.openDynamicStoreModal(k),(0,at._m)(Y.d[k.riftsDataProvider.selectedPortalId]))}const gt=this._prefabRoot.findComponentInChildren(nt.h);gt?gt.onAllPrefabsSpawned.addOnce((()=>this.destroyLoadingOverlay())):this.destroyLoadingOverlay(),Z.q.instance.game.broadcaster.addAppListener(et.Lk.HardCurrencyPurchased,this.updateRiftRunCardsButtons,this)}))}exit(){const k=Object.create(null,{exit:{get:()=>super.exit}});return(0,j.sH)(this,void 0,void 0,(function*(){Z.q.instance.game.broadcaster.removeAppListener(et.Lk.HardCurrencyPurchased,this.updateRiftRunCardsButtons,this),yield k.exit.call(this)}))}getRiftRunCardsData(k=0,B=0){var U,H,V,q,K,Y,Q;const X=Z.q.instance.prodigy.gameContainer.get("196-d3a5"),J=this._riftsEntityPortalEntry.metaProgress.maxRiftTier,et=[];for(let Z=Object.keys(this._riftsTierData).length;Z>0;Z--){const it=Z>J,nt=this._riftsTierData[Z],at=Z-1>0?this._riftsTierData[Z-1]:void 0,rt=null==nt?void 0:nt.firstTimeReward;let ht;const ct=!!rt&&(!$.Aq$.isDefined(this._firstTimeRewardsData[Z])||!this._firstTimeRewardsData[Z]),ut=[];ct&&rt&&(ht=null===(U=tt.t.getItem(rt.type,rt.id))||void 0===U?void 0:U.data,ut.push({type:rt.type,id:rt.id,hasItem:null!==(H=this._firstTimeRewardsData[Z])&&void 0!==H&&H}));const ft=X.getRiftRunEntryCost(Z),bt=Math.min(k,ft),pt=ft-bt,gt=X.getRiftKeyMagicoinCost()*pt,mt=this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(gt),yt=dt.Q.getRestrictionBadgeData(null==nt?void 0:nt.restriction);let _t;nt.type===z.cn.Boss&&(_t=lt.L.getBossDisplayDataFromBossType(nt.bossType));const Et={[F.RiftHeading]:(null==nt?void 0:nt.type)===z.cn.Boss?null==_t?void 0:_t.name:this._localizer.getText(G.RiftsSelectionHeading,Z),[F.RiftSubHeading]:this._localizer.getText(G.RiftsSelectionHeading,Z),[F.ShowRiftSubHeading]:nt.type===z.cn.Boss,[F.RewardHeading]:this._localizer.getText(ct?G.RiftsSelectionFirstTimeRewardHeading:G.RiftsSelectionRewardsHeading,ct&&rt&&ht?ot.J.getItemName(rt):""),[F.OnEnterRift]:()=>(0,j.sH)(this,void 0,void 0,(function*(){nt?yield this.enterRiftTier(Z,nt,bt,gt):$.VyI.log(`RiftSelectionMenuState: No rift tier data found for tier ${Z}`,$.$bb.Warning)})),[F.LockRiftButton]:this.shouldLockEnterButtonForTier(Z,B,k),[F.RarePetsData]:[null!==(V=this._riftsPortalConfig.options.rarePetIds.slice(0,Z).map((k=>({type:"pet",id:k}))).reverse())&&void 0!==V?V:[],it,vt.MAX_RARE_PETS],[F.RiftRunRewardsData]:[ct?ut:this.getFeaturedRiftRunTierRewards(nt,Z),it,vt.MAX_RIFT_RUN_REWARDS],[F.RiftKeyIcon]:W.p[`riftRunKey-${this.getRiftsKeyId()}`],[F.RiftKeyIconSmall]:`icon-rift-key-small-${this.getRiftsKeyId()}`,[F.RiftKeyEntryCost]:mt?ft:bt,[F.MagicoinEntryCost]:gt,[F.ShowRiftKeyOnly]:Boolean(bt>0&><=0||mt),[F.ShowMagicoinOnly]:Boolean(bt<=0&>>0&&!mt),[F.ShowRiftKeyAndMagicoin]:Boolean(bt>0&>>0&&!mt),[F.TierType]:nt.type,[F.BossKeyPoseData]:[null==_t?void 0:_t.keyPoseAtlasGuid,null==_t?void 0:_t.keyPoseFrame],[F.BossBackgroundImageGuid]:null==_t?void 0:_t.tierBackgroundImageGuid,[st.Fm.ShowRestrictionBadge]:yt.showRestrictionBadge,[st.Fm.RestrictionBadgeTest]:yt.restrictionBadgeText},wt={};if(it){wt[F.RiftTierLocked]=!0;let k=0;const B=null!==(q=null==at?void 0:at.numTierCompletionsToUnlockNextTier)&&void 0!==q?q:1;if(Z===J+1&&(k=null!==(K=this._riftsEntityPortalEntry.metaProgress.riftTierUnlockData.maxTierCompletions)&&void 0!==K?K:0,k>B&&(k=B)),Z>1&&(wt[F.PreviousTierCompleteText]=this._localizer.getText(G.RiftsPreviousTierCompleteUnlockText,Z-1,k,null!==(Y=null==at?void 0:at.numTierCompletionsToUnlockNextTier)&&void 0!==Y?Y:1)),k>=B&&(wt[F.PreviousTierComplete]=!0),null===(Q=null==nt?void 0:nt.unlockCondition)||void 0===Q?void 0:Q.condition){const k=Z-1;wt[F.UnlockConditionText]=this.getUnlockConditionText(nt.unlockCondition,k),this._riftsEntityPortalEntry.metaProgress.riftTierUnlockData.hasMetUnlockCondition&&(wt[F.UnlockConditionMet]=!0)}}et.push(Object.assign(Object.assign({},Et),wt))}return et}updateRiftRunCardsButtons(){var k,B,U;const G=this._prefabRoot.findComponentInChildren(nt.h);if(!G)return;const j=Z.q.instance.prodigy.gameContainer.get("196-d3a5"),$=this.getRiftsKeyId(),H=null!==(B=null===(k=this._secureInventory.get({type:"riftRunKey",id:$}))||void 0===k?void 0:k.quantity)&&void 0!==B?B:0,V=this._hardCurrencyDataProvider.getBalance(27),W=this._riftsEntityPortalEntry.metaProgress.maxRiftTier;for(let q=Math.min(W>0?W+1:W+2,null!==(U=j.getMaxRiftTier())&&void 0!==U?U:-1);q>0;q--){const k=this.shouldLockEnterButtonForTier(q,V,H),B={[F.LockRiftButton]:k};rt.d.updateInjectedValues(G.GameObject.children[G.GameObject.children.length-q],B)}}shouldLockEnterButtonForTier(k,B,U){const F=Z.q.instance.prodigy.gameContainer.get("196-d3a5"),G=F.getRiftRunEntryCost(k),j=Math.min(U,G),$=G-j,H=F.getRiftKeyMagicoinCost()*$;return this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(H)?j{var B,U;let F=0;if("currency"!==k.type&&"gold"!==k.type){const G=tt.t.getItem(k.type,k.id);G&&(F=null!==(U=null===(B=null==G?void 0:G.data)||void 0===B?void 0:B.rarity)&&void 0!==U?U:0)}return{id:k.id,type:k.type,rarity:F}})),(k=>`${k.id}_${k.type}_${k.rarity}`));return V().orderBy(F,[k=>"currency"===k.type||"gold"===k.type,"rarity"],["asc","desc"]).slice(0,Math.min(vt.MAX_RIFT_RUN_REWARDS,F.length)).map((k=>({type:k.type,id:k.id,hasItem:this._player.getItemCount(k.type,k.id)>0&&!Y._u.includes(k.type)})))}getUnlockConditionText(k,B){switch(k.condition){case z.Y1.KeystonesUnlocked:return this._localizer.getText(G.RiftsKeystonesUnlockText,k.value,k.value>1?"s":"");case z.Y1.PuppetMasterDefeated:return this._localizer.getText(G.RiftsPuppetMasterDefeatedUnlockText);case z.Y1.LevelLock:return this._localizer.getText(G.RiftsLevelLockUnlockText,k.value);case z.Y1.OwnPetsOfElement:return this._localizer.getText(G.RiftsOwnPetsUnlockText,k.value,k.data.element);case z.Y1.OwnPetsOfRarity:return this._localizer.getText(G.RiftsOwnPetsUnlockText,k.value,ot.J.convertRarityToText(k.data.rarity).toLowerCase());default:return""}}openDynamicStoreModal(k){const B=Z.q.instance.prodigy.gameContainer.get($.$Bt.LocalizationService),U=k.dynamicStoreUiData.store,F=k.dynamicStoreUiData.offerReadById,G=[...U.sections.reduce(((k,B)=>(k.push(...B.offers),k)),[])].filter((k=>k.progress.status===K.t.IN_PROGRESS)),j=k.dynamicStoreNameLocalizationKey&&B?B.getText(k.dynamicStoreNameLocalizationKey):k.dynamicStoreBackupName,H=k.riftsDataProvider.selectedPortalId;Z.q.instance.prodigy.open.dynamicStoreModal({[st.YM.BodyText]:B.getText(Y.Bs.DynamicStoreModalBodyText,j),[st.YM.HeaderText]:j,[st.YM.OfferData]:G,[st.YM.OfferReadById]:F,[st.YM.ShowTimer]:H!==Y.ni.Portal1,[st.YM.StoreKey]:Y.d[H],[st.n7.TimeRemainingMs]:k.riftsPortalConfig.endDate?new Date(k.riftsPortalConfig.endDate).getTime()-Date.now():void 0})}attemptUnsecureUnlockNextRiftTier(){return(0,j.sH)(this,void 0,void 0,(function*(){var k,B,U;let F=!1;const G=Z.q.instance.prodigy.gameContainer.get("196-d3a5");if(!Z.q.instance.prodigy.gameContainer.get("9ac-9677").cache||this._riftsEntityPortalEntry.metaProgress.maxRiftTier>=(null!==(k=G.getMaxRiftTier())&&void 0!==k?k:-1)||this._riftsEntityPortalEntry.metaProgress.riftTierUnlockData.hasMetUnlockCondition)return F;const j=this._riftsTierData[this._riftsEntityPortalEntry.metaProgress.maxRiftTier+1];if(!(null===(B=null==j?void 0:j.unlockCondition)||void 0===B?void 0:B.condition))return F;const $=Z.q.instance.prodigy.gameContainer.get("8f8-d5bc");switch(null===(U=null==j?void 0:j.unlockCondition)||void 0===U?void 0:U.condition){case z.Y1.KeystonesUnlocked:this._player.getNumKeystones()>=j.unlockCondition.value&&(yield $.updateTierUnlockProgress()),F=!0;break;case z.Y1.LevelLock:this._player.getLevel()>=j.unlockCondition.value&&(yield $.updateTierUnlockProgress()),F=!0}return F}))}enterRiftTier(k,B,U,G){return(0,j.sH)(this,void 0,void 0,(function*(){const j=$.wa5.getActiveScene().container.get(F.InputBlocker);(null==j?void 0:j.GameObject)&&(j.GameObject.active=!0);try{switch(B.type){case z.cn.Normal:ct.T.riftTier=k,yield this._riftsNetworkHandler.startRiftRun(k,{[this.getRiftsKeyId()]:U},G>0),yield this._stateMachine.goToState(bt.R);break;case z.cn.Boss:ct.T.riftTier=k,yield this._riftsNetworkHandler.startBossRift(k,B.bossType),yield this._stateMachine.goToState(ut.O);break;default:$.VyI.log(`RiftSelectionMenuState: Unknown rift tier type for rift ${k}`,$.$bb.Error)}}catch(e){$.RQr.logError(e,`RiftSelectionMenuState: Error entering rift ${k}`)}finally{(null==j?void 0:j.GameObject)&&(j.GameObject.active=!1)}}))}}vt.MAX_RARE_PETS=6,vt.MAX_RIFT_RUN_REWARDS=3},11673:(k,B,U)=>{"use strict";U.d(B,{O:()=>et});var F=U(8674),G=U(62459),j=U(99625),$=U(42448),H=U(35120),V=U(96535),W=U(70005),q=U(23082),K=U(13956),z=U(85515),Y=U(56617),Q=U(53661),X=U(38920),Z=U(80060),J=U(80105),tt=U(87427);class et extends tt.I{enter(k){const B=Object.create(null,{enter:{get:()=>super.enter}});return(0,F.sH)(this,void 0,void 0,(function*(){if(this._preloadAssets&&(yield H.q.instance.prodigy.load.assetsAsPromise(this._preloadAssets)),this._prefabHeaderInjectionValues){let k=this._prefabHeaderInjectionValues;k=Object.assign({[Q.n7.ShowTimeRemaining]:!1},this._prefabHeaderInjectionValues),yield H.q.instance.game.state.get(q.G.Rifts).injectToHeaderPrefab(k)}this._prefabGUID&&(this._prefabRoot=yield Z.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGUID,this._prefabInjectionValues),G.wa5.getActiveScene().addGameObject(this._prefabRoot.parent)),yield B.enter.call(this,k)}))}createLoadingOverlay(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=H.q.instance.prodigy.gameContainer.get("d0e-64fd");this._loadingOverlay=yield k.loadWithDependenciesFromGUID(j.l.LoadingOverlay),this._loadingOverlay.addComponent(W.h),this._loadingOverlay.layer=z.E.Result;const B=this._loadingOverlay.findComponentInChildren(Y.i);null==B||B.showLoadingUI()}))}destroyLoadingOverlay(){if(!this._loadingOverlay)return;const k=this._loadingOverlay.findComponentInChildren(Y.i);null==k||k.forceHideLoadingUI(),this._loadingOverlay.destroyDeferred(),this._loadingOverlay=void 0}getRiftKeyComparisonText(k){var B;const U=null===(B=H.q.instance.prodigy.gameContainer.get("196-d3a5").getRiftsPortalConfig())||void 0===B?void 0:B.options.maxRiftRunKeys;return U?(0,X.RL)(k,U):k.toString()}getRiftsKeyId(){var k;const B=H.q.instance.prodigy.gameContainer.get("196-d3a5");return B.selectedPortalId&&null!==(k=$.fW[B.selectedPortalId])&&void 0!==k?k:$.BN.PortalOneKey}getRestriction(){var k,B;const U=H.q.instance.prodigy.gameContainer.get("196-d3a5").riftsTierTotalData;if(!U)return;let F;const G=null===(k=this._riftsSyncedDataStore.cache.currentRiftRunProgress)||void 0===k?void 0:k.currentRiftTier;return G&&(F=null===(B=U[G])||void 0===B?void 0:B.restriction),F}exit(){const k=Object.create(null,{exit:{get:()=>super.exit}});return(0,F.sH)(this,void 0,void 0,(function*(){var B;null===(B=this._prefabRoot)||void 0===B||B.destroy(),yield k.exit.call(this)}))}}(0,F.Cg)([(0,K.b)("306-5359"),(0,F.Sn)("design:type",V.W)],et.prototype,"_player",void 0),(0,F.Cg)([(0,K.b)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],et.prototype,"_localizer",void 0),(0,F.Cg)([(0,K.b)("61f-37d6"),(0,F.Sn)("design:type",J.U)],et.prototype,"_secureInventory",void 0)},87427:(k,B,U)=>{"use strict";U.d(B,{I:()=>V});var F=U(8674),G=U(13956),j=U(63546),$=U(38560),H=U(14117);class V extends j.${}(0,F.Cg)([(0,G.b)("8f8-d5bc"),(0,F.Sn)("design:type",$.B)],V.prototype,"_riftsNetworkHandler",void 0),(0,F.Cg)([(0,G.b)("9ac-9677"),(0,F.Sn)("design:type",H.M)],V.prototype,"_riftsSyncedDataStore",void 0)},82781:(k,B,U)=>{"use strict";U.d(B,{Q:()=>rt});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(30334),V=U(28628),W=U(24652),q=U(42448),K=U(90633),z=U(35120),Y=U(96535),Q=U(23082),X=U(74958),Z=U(13956),J=U(80494),tt=U(68836),et=U(43503),it=U(84060),st=U(53232),nt=U(90500),at=U(87427);class rt extends at.I{enter(){const k=Object.create(null,{enter:{get:()=>super.enter}});return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,j,K,Y;yield k.enter.call(this);const X=this._riftsSyncedDataStore.cache.currentRiftRunProgress;if(!X||X.type!==W.cn.Normal)return void(yield et.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine));const Z=z.q.instance.prodigy.gameContainer.get("196-d3a5"),J=Z.getCurrentRiftsId(),it=yield z.q.instance.prodigy.gameContainer.get("a25-68f4").getBattleStartQuestData(V.gu.NormalRiftRun,J),st={battleType:V.gu.NormalRiftRun,battleSubType:J,difficulty:H.z,chosenOpponentTeamIndex:tt.T.chosenOpponentTeamIndex,chosenHomeTeamPetUids:tt.T.chosenHomeTeamPetUids,activeQuestIDs:it.questIDs,questEventsToSend:it.questEvents},nt=z.q.instance.game.state.states.get(Q.G.SecureBattleRevamp);if(!(yield et.L.canResumeRiftRun()))return yield Promise.all([nt.clearBattle(st),et.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine)]),void(this._player.battleResumeData=void 0);const at=null==X?void 0:X.currentRiftTier;let ot;Z.riftsTierTotalData&&at&&(ot=null===(B=Z.riftsTierTotalData[at])||void 0===B?void 0:B.battleBackgrounds),ot||(ot=rt.DEFAULT_RIFT_RUN_BATTLE_BACKGROUNDS);const ht=null!==(U=null==X?void 0:X.chosenNerfModifiers)&&void 0!==U?U:[],ct=!G.Aq$.isDefined(X.chosenOpponentTeamIndex)||!tt.T.canResumeBattle,dt=null!==(F=(Y=this._player.data).battleResumeDataClient)&&void 0!==F?F:Y.battleResumeDataClient={};dt.currentBackground||(dt.currentBackground=$().sample(ot),this._player.forceSaveCharacter());const lt={backgroundID:dt.currentBackground,onVictory:this.victoryCallback.bind(this),onDefeat:this.defeatCallback.bind(this),onEscape:this.defeatCallback.bind(this),guaranteedDrops:[{type:"gold",N:null!==(K=null===(j=tt.T.chosenModifier)||void 0===j?void 0:j.goldReward)&&void 0!==K?K:ht[ht.length-1].goldReward}]};X.round===q.vP&&(tt.T.isFinalBattle=!0),this._segment.rifts.cachedCurrentNormalRiftProgress=$().cloneDeep(X),tt.T.chosenModifier&&this._segment.rifts.cachedCurrentNormalRiftProgress.chosenNerfModifiers.push(tt.T.chosenModifier),tt.T.chosenHomeTeamPetUids.length>0&&this._segment.rifts.cachedCurrentNormalRiftProgress.usedPetUids.push(...tt.T.chosenHomeTeamPetUids),this._segment.rifts.sendRiftRunRoundStartedEvent(),tt.T.chosenModifier=null,ct?nt.startBattleRequest(st,lt):nt.resumeBattleRequest(st,lt)}))}cleanUpClientData(){var k;(null===(k=this._player.data.battleResumeDataClient)||void 0===k?void 0:k.currentBackground)&&(delete this._player.data.battleResumeDataClient.currentBackground,this._player.forceSaveCharacter())}victoryCallback(){var k;const B=this._riftsSyncedDataStore.cache.currentRiftRunProgress;if(tt.T.firstBattleCompleted=!0,this.cleanUpClientData(),X.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(X.fk.RiftsCompleteFirstRiftRunRound,K.B.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_ROUND),this._segment.rifts.sendRiftRunRoundCompletedEvent("win"),B&&B.type===W.cn.Normal){const U=this._riftsSyncedDataStore.cache.currentPortalId;if(U&&this._riftsSyncedDataStore.cache[U]){const B=null!==(k=this._riftsSyncedDataStore.cache[U].metaProgress.usedPetData)&&void 0!==k?k:{};this._segment.rifts.sendPetCooldownStartedEvents(B)}this._segment.rifts.riftRunRoundUuid=B.riftRunRoundSegmentUuid,z.q.instance.game.state.start(Q.G.Rifts,void 0,nt.R)}else X.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(X.fk.RiftsCompleteRiftRunWinOrLose,K.B.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN_OR_LOSE),X.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(X.fk.RiftsCompleteRiftRunWin,K.B.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN),this._segment.rifts.sendRiftRunCompletedEvent(),z.q.instance.game.state.start(Q.G.Rifts,void 0,it.n)}defeatCallback(){this.cleanUpClientData(),tt.T.firstBattleCompleted=!0,X.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(X.fk.RiftsCompleteRiftRunWinOrLose,K.B.BREADCRUMB_RIFTS_COMPLETED_FIRST_RIFT_RUN_WIN_OR_LOSE),this._segment.rifts.sendRiftRunRoundCompletedEvent("loss"),z.q.instance.game.state.start(Q.G.Rifts,void 0,st.X)}}rt.DEFAULT_RIFT_RUN_BATTLE_BACKGROUNDS=[J.t.BattleBonfireInside,J.t.BattleBonfireLava,J.t.BattleBonfireOutside,J.t.BattleForestGeneric,J.t.BattleForestOutside,J.t.BattleShipwreckInside,J.t.BattleShipwreckOutside,J.t.BattleShipwreckUnderwater,J.t.BattleShiverchillInside,J.t.BattleShiverchillOutside,J.t.BattleSkywatchInside,J.t.BattleSkywatchOutside],(0,F.Cg)([(0,Z.b)("306-5359"),(0,F.Sn)("design:type",Y.W)],rt.prototype,"_player",void 0)},53027:(k,B,U)=>{"use strict";U.d(B,{t:()=>Et});var F=U(8674),G=U(87490),j=U(62459),$=U(95891),H=U.n($),V=U(88022),W=U(99625),q=U(60035),K=U(24652),z=U(42448),Y=U(35120),Q=U(91207),X=U(77938),Z=U(51972),J=U(23082),tt=U(53661),et=U(22023),it=U(80060),st=U(44094),nt=U(47255),at=U(37050),rt=U(39785),ot=U(43503),ht=U(68836),ct=U(14117),dt=U(68387),lt=U(90500),ut=U(11673),ft=U(30334),bt=U(82351),pt=U(28628),vt=U(86498),gt=U(53232),mt=U(87427),yt=U(82781);class _t extends mt.I{enter(){const k=Object.create(null,{enter:{get:()=>super.enter}});return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,G,$;yield k.enter.call(this);const V=Y.q.instance.prodigy.gameContainer.get("196-d3a5"),W=this._riftsSyncedDataStore.cache.currentRiftRunProgress,q=V.riftsTierTotalData,z=(null==W?void 0:W.currentRiftTier)?null==q?void 0:q[null==W?void 0:W.currentRiftTier]:void 0;if(!W||W.type!==K.cn.Boss||(null==z?void 0:z.type)!==K.cn.Boss)return void(yield ot.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine));const Q=V.getCurrentRiftsId(),X=Y.q.instance.prodigy.gameContainer.get("c47-20b6").rifts,Z=yield Y.q.instance.prodigy.gameContainer.get("a25-68f4").getBattleStartQuestData(pt.gu.BossRiftRun,Q);let tt="";!j.Aq$.isDefined(null==z?void 0:z.useParallaxBackground)||z.useParallaxBackground||(tt=null!==(U=H().sample(null!==(B=z.battleBackgrounds)&&void 0!==B?B:yt.Q.DEFAULT_RIFT_RUN_BATTLE_BACKGROUNDS))&&void 0!==U?U:""),X.cachedCurrentBossRiftProgress=H().cloneDeep(W);const et={battleType:pt.gu.BossRiftRun,battleSubType:Q,difficulty:ft.z,chosenHomeTeamPetUids:null!==(F=ht.T.chosenHomeTeamPetUids)&&void 0!==F?F:[],activeQuestIDs:Z.questIDs,questEventsToSend:Z.questEvents},it={backgroundID:tt,backgroundMusicID:null!==($=_t.BOSS_BGM[null!==(G=W.bossType)&&void 0!==G?G:K.ts.AstralDragon])&&void 0!==$?$:bt.B.Bgm_battle_astral_dragon,onVictory:this.victoryCallback.bind(this),onDefeat:this.defeatCallback.bind(this),onEscape:this.defeatCallback.bind(this)};Y.q.instance.game.state.states.get(J.G.SecureBattleRevamp).startBattleRequest(et,it)}))}victoryCallback(){var k;const B=this._riftsSyncedDataStore.cache.currentPortalId;if(B&&this._riftsSyncedDataStore.cache[B]){const U=null!==(k=this._riftsSyncedDataStore.cache[B].metaProgress.usedPetData)&&void 0!==k?k:{};this._segment.rifts.sendPetCooldownStartedEvents(U)}this._segment.rifts.sendBossRiftCompletedEvent("win"),Y.q.instance.game.state.start(J.G.Rifts,void 0,vt.j)}defeatCallback(){this._segment.rifts.sendBossRiftCompletedEvent("loss"),Y.q.instance.game.state.start(J.G.Rifts,void 0,gt.X)}}_t.BOSS_BGM={[K.ts.AstralDragon]:bt.B.Bgm_battle_astral_dragon,[K.ts.FireDragon]:bt.B.Bgm_battle_astral_dragon,[K.ts.PhysicalDragon]:bt.B.Bgm_battle_physical_dragon,[K.ts.ShadowDragon]:bt.B.Bgm_battle_shadow_dragon,[K.ts.IceWyrm]:bt.B.Bgm_battle_astral_dragon,[K.ts.IceDragon]:bt.B.Bgm_battle_astral_dragon};class Et extends ut.O{constructor(){super(...arguments),this._teamPetIndices=[-1,-1],this._selectedSlotIndex=0,this._showPetSelectionDrawerSignal=new j.HN0,this._hidePetSelectionDrawerSignal=new j.HN0}enter(){const k=Object.create(null,{enter:{get:()=>super.enter}});return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;const $=this._riftsSyncedDataStore.cache.currentRiftRunProgress;if(!$)return void(yield ot.L.resetRiftRunProgressAndTeleportToDragonIsle(this._stateMachine));this._currentRiftProgress=$;const H=j.wa5.getActiveScene().container;Y.q.instance.prodigy.gameContainer.get("196-d3a5").getRiftsPortalConfig();this._restriction=this.getRestriction(),this._restrictionBadgeData=at.Q.getRestrictionBadgeData(this._restriction),this._sortedPets=this.getSortedAndFilteredPets(this._restriction);let q=0;if(this._sortedPets.some(((k,B)=>!(k.disabledData||!this._riftsSyncedDataStore.isPetAvailableForUse(k.uniqueID))&&(this._teamPetIndices[q++]=B,q>=2))),this._prefabHeaderInjectionValues={[tt.bL.HeaderTitle]:this._localizer.getText("RIFTS_HEADER_TITLE_TEAM_SELECTION"),[tt.bL.OnClose]:()=>{rt.n.onRiftRunClose(this._stateMachine)}},this._currentRiftProgress.type===K.cn.Boss?this._prefabHeaderInjectionValues[tt.bL.OnBack]=()=>(0,F.sH)(this,void 0,void 0,(function*(){yield this._stateMachine.goToState(dt.O)})):this._prefabHeaderInjectionValues[tt.bL.OnBack]=()=>(0,F.sH)(this,void 0,void 0,(function*(){ht.T.chosenModifier=null;Y.q.instance.game.state.get(J.G.Rifts).updateModifierGrid(),yield this._stateMachine.goToState(lt.R)})),this._prefabGUID=W.l.RiftRunTeamSelection,this._prefabInjectionValues={ON_CHANGE_0:()=>{this.showPetSelectionDrawer(0)},ON_CHANGE_1:()=>{this.showPetSelectionDrawer(1)},ON_ELEMENTS:()=>(0,F.sH)(this,void 0,void 0,(function*(){yield this.showElementsPopup()})),ON_START_RIFT:()=>(0,F.sH)(this,void 0,void 0,(function*(){const k=this._teamPetIndices.map((k=>{var B;return null===(B=this._sortedPets[k])||void 0===B?void 0:B.uniqueID})).filter((k=>k));this._currentRiftProgress.type===K.cn.Boss?(ht.T.chosenHomeTeamPetUids=k,yield this._stateMachine.goToState(_t)):(ht.T.chosenHomeTeamPetUids=k,yield this._stateMachine.goToState(yt.Q))})),ON_HOME_TEAM_SPAWNED:()=>{const k=H.get("PLAYER_TRANSFORM"),B=H.get("HOME_TEAM_TRANSFORM");k.GameObject.parent=B.GameObject},PLAYER_NAME:this._player.name.getName(),PLAYER_CONTAINER_WIDTH:200,PLAYER_CONTAINER_HEIGHT:170,WEAK_TO_OFFSET:18,PEDESTAL_ASSET:[V._.Ui_rifts_json,"base-cool-grey-light"],HOME_TEAM_DATA:this._teamPetIndices.map((k=>{var B,U;if(k>=0){const F=this._sortedPets[k],G=X.t.getItem("pet",F.ID),j=et.P8.getElementType(G);return Object.assign(Object.assign({},this.getCommonPetInjectionData(j)),{IS_RARE_PET:!1,PET_ID:F.ID,PET_NAME:null!==(U=null!==(B=F.nickname)&&void 0!==B?B:F.name)&&void 0!==U?U:G.data.name})}return{IS_RARE_PET:!1,PET_NAME:"",WEAKNESS_ICON:""}}))},this._currentRiftProgress.type===K.cn.Boss&&this._currentRiftProgress.bossType){const k=this._riftsSyncedDataStore.getRiftsEntityPortalEntryData(),F=ot.L.getBossDisplayDataFromBossType(this._currentRiftProgress.bossType),$=j.wa5.getActiveScene().container.get(G.BattleConstants).getElementalWeakness(F.element),H=!j.Aq$.isDefined(null===(U=null===(B=k.metaProgress)||void 0===B?void 0:B.bossDefeats)||void 0===U?void 0:U[this._currentRiftProgress.bossType]);this._prefabInjectionValues.BOSS_KEY_POSE=[F.keyPoseAtlasGuid,F.keyPoseFrame],this._prefabInjectionValues.BOSS_NAME=st.$.toTitleCase(F.name),this._prefabInjectionValues.BOSS_WEAKNESS_ICON=[V._.Ui_battle_revamp_json,`icon-mini-element-${$}`],this._prefabInjectionValues.BOSS_IS_SILHOUETTED=H,this._prefabInjectionValues.IS_BOSS_BATTLE=!0,this._prefabInjectionValues[tt.Fm.ShowRestrictionBadge]=this._restrictionBadgeData.showRestrictionBadge,this._prefabInjectionValues[tt.Fm.RestrictionBadgeTest]=this._restrictionBadgeData.restrictionBadgeText}else if(this._currentRiftProgress.type===K.cn.Normal){const k=Y.q.instance.prodigy.gameContainer.get("196-d3a5").getRiftsPortalConfig();this._prefabInjectionValues.BOSS_IS_SILHOUETTED=!1,this._prefabInjectionValues.SHOW_INFO=!1,this._prefabInjectionValues.OPPONENT_TEAM_DATA=this._currentRiftProgress.nextOpponentTeamOptions[ht.T.chosenOpponentTeamIndex].petIds.map((B=>{var U;const F=X.t.getItem("pet",B),G=et.P8.getElementType(F);return Object.assign(Object.assign({},this.getCommonPetInjectionData(G)),{IS_RARE_PET:null!==(U=null==k?void 0:k.options.rarePetIds.includes(B))&&void 0!==U&&U,PET_ID:B,PET_NAME:F.data.name,PET_SCALE:[-1,1]})}))}yield k.enter.call(this),yield this.setupPetDrawer()}))}getSortedAndFilteredPets(k){const B=H().cloneDeep(this._player.kennel.getPrimaryPets());(this._currentRiftProgress.type===K.cn.Boss?this._currentRiftProgress.bossRiftModifiers:this._currentRiftProgress.type===K.cn.Normal?[...this._currentRiftProgress.chosenNerfModifiers,ht.T.chosenModifier]:[]).forEach((k=>{k.type===q.z.RemovePetsByElement?B.forEach((B=>{const U=X.t.getItem("pet",B.ID);et.P8.getElementType(U)===k.element&&(B.disabledData={disabledBy:k.element,disabledIcon:rt.n.getGuidForModifierIcon(k.icon)})})):k.type===q.z.RemovePetsByRarity&&B.forEach((B=>{const U=X.t.getItem("pet",B.ID);B.disabledData&&this.isEElementType(B.disabledData.disabledBy)||U.data.rarity===k.rarity&&(B.disabledData={disabledBy:k.rarity,disabledIcon:rt.n.getGuidForModifierIcon(k.icon)})}))})),k&&B.forEach((B=>{var U,F;const G=null===(U=X.t.getItem("pet",B.ID))||void 0===U?void 0:U.data;if(null!==(F=B.disabledData)&&void 0!==F?!F:G)switch(k.type){case z.CN.OnlyPetsOfElement:G.affinity!==k.data.element&&(B.disabledData={disabledBy:k.data.element,restriction:k});break;case z.CN.NoPetsOfElement:G.affinity===k.data.element&&(B.disabledData={disabledBy:k.data.element,restriction:k});break;case z.CN.OnlyPetsOfRarity:G.rarity!==k.data.rarity&&(B.disabledData={disabledBy:k.data.rarity,restriction:k});break;case z.CN.NoPetsOfRarity:G.rarity===k.data.rarity&&(B.disabledData={disabledBy:k.data.rarity,restriction:k})}}));return H().chain(B).filter("ID").orderBy([k=>j.Aq$.isDefined(k.disabledData),k=>k.mergeRank,k=>k.level],["asc","desc","desc"]).value()}setupPetDrawer(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U;this._drawerCloseOverlay=j.wa5.getActiveScene().container.get("DRAWER_CLOSE_OVERLAY");const F=Y.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("PET_DRAWER_ALREADY_USED"),G=null===(B=null===(k=Y.q.instance.prodigy.gameContainer.get("196-d3a5").getRiftsPortalConfig())||void 0===k?void 0:k.options)||void 0===B?void 0:B.petReuseData,$={START_OFFSCREEN_X:-800,TWEEN_IN_SIGNAL:this._showPetSelectionDrawerSignal,TWEEN_OUT_SIGNAL:this._hidePetSelectionDrawerSignal,ON_CLOSE:()=>{this.hidePetSelectionDrawer()},PET_DATA:this._sortedPets.reduce(((k,B,U)=>{var $,H,V,W;const q=X.t.getItem("pet",B.ID);if(!q)return j.VyI.log(`Pet with ID ${B.ID} not found in items`,j.$bb.Error),k;const K={DISABLED:!1,OVERLAY_TEXT:"",DISABLED_ICON:"",PET_ID:B.ID,PET_DATA:B,NAME:null!==(H=null!==($=B.nickname)&&void 0!==$?$:B.name)&&void 0!==H?H:q.data.name,LEVEL:B.level,MERGE_RANK:et.P8.getPetDisplayMergeRank(B.ID,B.uniqueID),SHOW_MERGE_RANK_BADGE:et.P8.canPetAccessMergeRanks(B.ID),SHOW_UPGRADE:!1,SHOW_EVOLVE:!1,SHOW_ON_TEAM:this._teamPetIndices.includes(U),SHOW_GUIDE_HAND:!1,INPUT_ENABLED:!this._teamPetIndices.includes(U)&&!this._sortedPets[U].disabledData,ON_CLICK:()=>{this.selectPet(U),this.hidePetSelectionDrawer()},ON_DISABLED_CLICK:()=>{this.showPetReuseInterface(B,q,U)},SHOW_TIME_REMAINING:!1};if(this._riftsSyncedDataStore.getPetCooldownStatus(B.uniqueID)===ct.R.Expired){const k=this._riftsSyncedDataStore.getUsedPetMetadata(B.uniqueID);this._riftsNetworkHandler.expireRiftPetCooldown(B.uniqueID).then((()=>{var U;this._segment.rifts.sendCooldownTimerEnded(k.cooldownID,B.uniqueID,null!==(U=null==G?void 0:G.petCooldownMs)&&void 0!==U?U:0)})).catch(j.RQr.createHandler("Error expiring pet cooldown"))}if(this._riftsSyncedDataStore.isPetAvailableForUse(B.uniqueID))B.disabledData&&(K.DISABLED=!0,K.DISABLED_ICON=null!==(W=B.disabledData.disabledIcon)&&void 0!==W?W:"");else{const k=this._riftsSyncedDataStore.getUsedPetMetadata(B.uniqueID);if(j.Aq$.isDefined(G)&&j.Aq$.isDefined(null==G?void 0:G.petCooldownMs)&&j.Aq$.isDefined(k.timestamp)){const B=k.timestamp+(null!==(V=null==G?void 0:G.petCooldownMs)&&void 0!==V?V:0)-Date.now();K.SHOW_TIME_REMAINING=!0,K.TIME_REMAINING_MS=B}else K.OVERLAY_TEXT=F;K.DISABLED=!0}return k.push(K),k}),[]),PET_GRID_FIXED_ROW_COUNT:Math.ceil(this._sortedPets.length/4),[tt.Fm.ShowRestrictionBadge]:this._restrictionBadgeData.showRestrictionBadge,[tt.Fm.RestrictionBadgeTest]:this._restrictionBadgeData.restrictionBadgeText};this._petSelectionDrawer?it.d.updateInjectedValues(this._petSelectionDrawer,$):(this._petSelectionDrawer=yield it.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,W.l.PetSelectionDrawer,$),this._petSelectionDrawer.parent=this._prefabRoot,this._drawerCloseOverlay.onClicked.add(this.hidePetSelectionDrawer,this)),this._riftsSyncedDataStore.hasUsedPets()&&this.setupPetReuseCta(),null!==(U=this._petSpawner)&&void 0!==U||(this._petSpawner=j.wa5.getActiveScene().container.get(tt.oX.PetCardPetSpawner))}))}exit(){const k=Object.create(null,{exit:{get:()=>super.exit}});return(0,F.sH)(this,void 0,void 0,(function*(){this._showPetSelectionDrawerSignal.dispose(),this._hidePetSelectionDrawerSignal.dispose(),yield k.exit.call(this)}))}getCommonPetInjectionData(k){const B=j.wa5.getActiveScene().container.get(G.BattleConstants).getElementalWeakness(k);return{ELEMENT_ICON:[V._.Ui_battle_revamp_json,`icon-mini-element-${k}`],PEDESTAL_ASSET:[V._.Ui_rifts_json,"base-cool-grey-light"],PET_CONTAINER_WIDTH:200,PET_CONTAINER_HEIGHT:170,WEAK_TO_OFFSET:18,WEAKNESS_ICON:[V._.Ui_battle_revamp_json,`icon-mini-element-${B}`],PET_WIDTH_LIMIT:200,PET_HEIGHT_LIMIT:150}}getReusablePetInjectionData(k,B){var U,F,G,j;return{PET_RESCUE_CREATURE_DATA:{ID:k.ID,name:k.name,level:k.level},PET_RESCUE_NAME:null!==(F=null===(U=null==B?void 0:B.data)||void 0===U?void 0:U.name)&&void 0!==F?F:"",PET_RESCUE_RARITY:null!==(j=null===(G=null==B?void 0:B.data)||void 0===G?void 0:G.rarity)&&void 0!==j?j:0,PET_RESCUE_STAMP_ENABLED:!1}}showPetSelectionDrawer(k){this._selectedSlotIndex=k,this._drawerCloseOverlay.GameObject.active=!0,this._showPetSelectionDrawerSignal.dispatch()}hidePetSelectionDrawer(){this._drawerCloseOverlay.GameObject.active=!1,this._hidePetSelectionDrawerSignal.dispatch()}setupPetReuseCta(){const k=j.wa5.getActiveScene().container.get("DRAWER_TWEEN_IN_ON_COMPLETE_SIGNAL"),B=j.wa5.getActiveScene().container.get("DRAWER_PET_GRID_LAYOUT_GAME_OBJECT");k.addOnce((()=>{const k=Q.E.getIconForType("currency",27);Y.q.instance.prodigy.load.assetsAsPromise([k]).then((()=>{const k=this._sortedPets.findIndex((k=>!1===this._riftsSyncedDataStore.isPetAvailableForUse(k.uniqueID))),U=B.children[k];Y.q.instance.prodigy.prefabFactory.createTooltip(U.transform,"REUSE_PET_MAGICOIN",{arrowDirection:Z.i.LEFT,iconGUID:Q.E.getIconForType("currency",27),titleKey:"PET_LOCKED"})})).catch(j.RQr.createHandler("TeamSelectionState: Failed to load magicoin icon for pet reuse tooltip"))}),this)}showElementsPopup(){return(0,F.sH)(this,void 0,void 0,(function*(){yield new Promise((k=>{Y.q.instance.prodigy.open.prefabMenu(W.l.ElementalWeaknessChartPopup,k,void 0,!0,!1)}))}))}selectPet(k,B=!1){var U,F;const G=this._teamPetIndices[this._selectedSlotIndex];this._teamPetIndices[this._selectedSlotIndex]=k;const $=k>=0?this._sortedPets[k]:null;if($){const k=X.t.getItem("pet",$.ID),G=et.P8.getElementType(k),H=j.wa5.getActiveScene().container.get("HOME_TEAM_TRANSFORM"),V=k=>{k.setAnimationByName(0,"evolution",!1),k.GameObject.active=!0,k.getSpine().onComplete.addOnce((()=>{k.GameObject.active=!1}))};it.d.updateInjectedValues(H.GameObject.children[this._selectedSlotIndex],Object.assign(Object.assign(Object.assign({},this.getCommonPetInjectionData(G)),{IS_RARE_PET:!1,PET_ID:$.ID,PET_NAME:null!==(F=null!==(U=$.nickname)&&void 0!==U?U:$.name)&&void 0!==F?F:k.data.name}),B&&{REVIVE_UPPER_SPINE:V,REVIVE_LOWER_SPINE:V}))}else{const k=j.wa5.getActiveScene().container.get("HOME_TEAM_TRANSFORM");it.d.updateInjectedValues(k.GameObject.children[this._selectedSlotIndex],{IS_RARE_PET:!1,PET_NAME:"",WEAKNESS_ICON:""})}if(G>=0){const k={INPUT_ENABLED:!0,SHOW_ON_TEAM:!1};this._petSpawner.updateInjectionData(G,k)}if($){const k=this._sortedPets.indexOf($),B={INPUT_ENABLED:!1,SHOW_ON_TEAM:!0};this._petSpawner.updateInjectionData(k,B)}}showPetReuseInterface(k,B,U){var F,G,$;const H=null!==(F=this._sortedPets[U].uniqueID)&&void 0!==F?F:"";if(this._riftsSyncedDataStore.isPetAvailableForUse(H)||!k.uniqueID)return;const V=Y.q.instance.prodigy.gameContainer.get("5c7-e02d"),q=Y.q.instance.prodigy.gameContainer.get("196-d3a5"),K=this._riftsSyncedDataStore.getUsedPetMetadata(k.uniqueID),z=null===($=null===(G=q.getRiftsPortalConfig())||void 0===G?void 0:G.options)||void 0===$?void 0:$.petReuseData;if(!z||!K)return;const Q=this.getReusablePetInjectionData(k,B),X=V.getBalance(27);Q.PET_EVOLUTION_CARD_BALANCE=X;const Z=Y.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);j.Aq$.isDefined(null==z?void 0:z.petCooldownMs)&&j.Aq$.isDefined(null==K?void 0:K.timestamp)?(Q[tt.n7.TimeRemainingMs]=K.timestamp+z.petCooldownMs-Date.now(),Q[tt.n7.TitleText]=Z.getText("RIFTS_USE_PET_AGAIN")):(Q[tt.n7.TitleText]=Z.getText("RIFTS_USE_PET_AGAIN_NO_TIME"),Q[tt.n7.ShowTimeRemaining]=!1);const J=this._riftsSyncedDataStore.getUsedPetReuseCost(H);Q.PET_EVOLUTION_CARD_COST_BALANCE=J,Q.REUSE_PET_CALLBACK=()=>{if(X>=J){const k=this._segment.item.beginSecureItemTransaction(),B=this._segment.rifts.getRiftTransactionData();this._riftsNetworkHandler.reuseRiftPet(H).then((()=>{var k,F;const G=null!==(k=null==z?void 0:z.petCooldownMs)&&void 0!==k?k:0,j=G>0?Math.max(0,(K.timestamp+G-Date.now())/1e3):0;this._segment.rifts.sendCooldownTimeSkipped(null!==(F=K.cooldownID)&&void 0!==F?F:"",H,G/1e3,j,J,B.transaction_id),this.hidePetSelectionDrawer(),this._petSpawner.updateInjectionData(U,{INPUT_ENABLED:!0,DISABLED:!1,SHOW_TIME_REMAINING:!1,OVERLAY_TEXT:"",DISABLED_ICON:""}),this.selectPet(U,!0)})).catch(j.RQr.createHandler("TeamSelectionState: Error in the reuse pet flow")).finally((()=>k.flush(B)))}else Y.q.instance.prodigy.open.unifiedConversionFlow(void 0,{conversionFunnelName:nt.o.FunnelNotEnoughCurrencyRifts})},it.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,W.l.RiftRunReusePetModal,Q).then((()=>{this._segment.rifts.sendOpenPetReuseInterface()})).catch(j.RQr.createHandler("Team Selection: Error loading reuse pet modal"))}isEElementType(k){return Object.values(G.EElementType).includes(k)}}},13302:(k,B,U)=>{"use strict";var F,G;U.d(B,{X:()=>F,h:()=>G}),function(k){k.Small="small",k.Normal="normal",k.Medium="medium",k.Large="large",k.Huge="huge"}(F||(F={})),function(k){k[k.Home=0]="Home",k[k.Away=1]="Away"}(G||(G={}))},52850:(k,B,U)=>{"use strict";U.d(B,{e:()=>Z});var F=U(8674),G=U(62459),j=U(36648),$=U(28628),H=U(32389),V=U(51151),W=U(35120),q=U(129),K=U(89360),z=U(73797),Y=U(23082),Q=U(10670),X=U(76277);class Z{static get _duelInviteService(){return W.q.instance.prodigy.gameContainer.get("636-444c")}static get _localPlayer(){return W.q.instance.prodigy.gameContainer.get("e20-0fb0").player}static invite(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=this.getActiveInvites().find((k=>k.userID===B.userID));if(!F)return this.rejectAllInvites(),this.sendInvite(k,B,U);this.acceptInvite(k,F,U)}))}static getActiveInvites(){return this._duelInviteService.getInvites()}static getPlayerFromInvite(k){var B;const U=new q.a(W.q.instance.game);return k instanceof V.DuelInviteProto?U.initFromProtobuf({userID:k.userID,appearance:k.appearance,equipment:k.equipment,name:k.name,team:k.team,member:k.member,level:k.level}):(k.name&&(k.appearance?k.appearance.name=k.name:k.appearance={name:k.name}),U.init({userID:k.userID,appearance:k.appearance,equipment:{follow:k.equipment.followID,hat:k.equipment.hatID,outfit:k.equipment.outfitID,weapon:k.equipment.weaponID,spellRelic:k.equipment.spellRelicID,boots:k.equipment.bootsID,mount:k.equipment.mountID,costume:(0,X.G)(H.q).enabled?k.equipment.costumeID:void 0},isMember:k.member,data:{level:k.level,playerTransformation:null===(B=k.appearance)||void 0===B?void 0:B.morph}})),U}static acceptInvite(k,B,U){this._duelInviteService.acceptInvite(B),this.getActiveInvites().filter((k=>k!==B)).forEach((k=>{this.rejectInvite(k)}));const F=this.getPlayerFromInvite(B),j=B instanceof V.DuelInviteProto?B.roomID:B.channelName;W.q.instance.prodigy.gameContainer.get("a25-68f4").getBattleStartQuestData(this.getBattleTypeFromVariant(k)).catch((k=>{G.RQr.createHandler("Error getting battle quest data, starting battle with no quest data")(k)})).then((B=>{this.startBattle(k,F,this._localPlayer,j,U,B)})).catch(G.RQr.createHandler("Error continuing the battle start function in DuelInviteUI"))}static rejectInvite(k){this._duelInviteService.rejectInvite(k)}static rejectAllInvites(){for(const k of this.getActiveInvites())this.rejectInvite(k)}static sendInvite(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F={},j=new G.bnh,$=this._duelInviteService;$.onInviteSent.add((k=>j.resolve(k)),F),$.onInviteFailed.add((k=>j.reject(k)),F),j.finally((()=>{$.onInviteSent.removeAll(F),$.onInviteFailed.removeAll(F)})),$.sendInvite(B);const H=yield j,q=H instanceof V.DuelInviteProto?H.roomID:H.channelName;W.q.instance.prodigy.gameContainer.get("a25-68f4").getBattleStartQuestData(this.getBattleTypeFromVariant(k)).catch((k=>{G.RQr.createHandler("Error getting battle quest data, starting battle with no quest data")(k)})).then((F=>{this.startBattle(k,this._localPlayer,B,q,U,F)})).catch(G.RQr.createHandler("Error continuing the battle start function in DuelInviteUI"))}))}static startBattle(k,B,U,F,G,H){var V;const q=W.q.instance.game,K=B===W.q.instance.prodigy.gameContainer.get("e20-0fb0").player?U:B,X=q.broadcaster.broadcast(z.pm.GetTarget,q,[!0]),Z=q.state.current,J=k=>{G?G():this.onBattleEnd(q,Z,X,k)};W.q.instance.prodigy.battle.battleStats.type="PVP-Duel";const tt=W.q.instance.game.state.states.get(Y.G.SecureBattleRevamp),et={battleType:this.getBattleTypeFromVariant(k),hostUserId:`${B.getID()}`,guestUserId:`${U.getID()}`,roomId:null===(V=W.q.instance.game.state.get(Y.G.DuelMatchmaking).roomConfig)||void 0===V?void 0:V.id,activeQuestIDs:null==H?void 0:H.questIDs,questEventsToSend:null==H?void 0:H.questEvents},it={backgroundID:[j.q.Battle_coliseum_outside_bg,j.q.Battle_coliseum_outside_fg],onVictory:()=>J($.XK.Victory),onEscape:()=>J($.XK.Escape),onDefeat:()=>J($.XK.Defeat),opponent:K,channelName:F,clearWorld:k!==Q.VB.DuelsStadium,defeatData:{preventDefaultTeleport:!0}};tt.startBattleRequest(et,it)}static onBattleEnd(k,B,U,F){if(B===Y.G.Tower){const B=k.state.get(Y.G.Tower);B.startX=U.x,B.startY=U.y,W.q.instance.prodigy.start(Y.G.Tower)}else W.q.instance.prodigy.world.it(this._localPlayer.data.zone,U.x,U.y,{battleResult:F});W.q.instance.prodigy.gameContainer.get("0f1-c356").onWeeklyChallengeBattleEnd("PVP-Duel").then((()=>{K.h.instance.updateData()})).catch((k=>{G.VyI.log(`BattleStats update failed at duel pvp battle end: ${G.RQr.stringify(k)}`,G.$bb.Warning)}))}static getBattleTypeFromVariant(k){return k===Q.VB.DuelsStadium?$.gu.MatchmakingDuel:$.gu.Duel}}},66840:(k,B,U)=>{"use strict";U.d(B,{D:()=>z});var F=U(8674),G=U(62459),j=U(43846),$=U(28152),H=U(80060),V=U(17710),W=U(35120),q=U(30226),K=U(88022);let z=class extends G.uAl{constructor(){super(...arguments),this._addTurnsRemainingText=!1}setStatusEffect(k,B){const U=this._addTurnsRemainingText?`${k.remainingDuration} ${(0,j.k)(1===k.remainingDuration?"STATUS_EFFECT_TURN":"STATUS_EFFECT_TURNS")}`:`${k.remainingDuration}`,F=W.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),$=q.J.getLocalizationActiveNameKey("statusEffect",k.statusEffectId),z=F.hasText($)?F.getText($):F.getText(q.J.getLocalizationNameKey("statusEffect",k.statusEffectId)),Y=q.J.getLocalizationActiveFlavorKey("statusEffect",k.statusEffectId),Q=F.hasText(Y)?F.getText(Y):F.getText(q.J.getLocalizationFlavorKey("statusEffect",k.statusEffectId)),X=V.D.formatStatusEffectDescription(Q,k.remainingDuration,B);H.d.updateInjectedValues(this.GameObject,{SPELL_STATUS_EFFECT_NAME:z,SPELL_STATUS_EFFECT_DESCRIPTION:X,SPELL_STATUS_EFFECT_DURATION:U});const Z={atlas:K._.Ui_spell_effect_icons_json,frame:k.itemData.icon};this._icon.updateAsset(Z.atlas,Z.frame)}};(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],z.prototype,"_icon",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],z.prototype,"_addTurnsRemainingText",void 0),z=(0,F.Cg)([(0,G.EVk)("ActiveStatusEffectUI",$.Y.battleRevamp)],z)},75935:(k,B,U)=>{"use strict";U.d(B,{k:()=>K});var F=U(8674),G=U(62459),j=U(95891),$=U(99625),H=U(28152),V=U(19690),W=U(94325),q=U(66840);let K=class extends G.uAl{constructor(){super(...arguments),this._transformsToApplyHeightReferenceTo=[]}displayEffects(k,B){var U;const F=(null!==(U=this._gridLayout.GameObject.children)&&void 0!==U?U:[]).map((k=>k.findComponent(q.D))).filter((k=>!!k));F.forEach((k=>{k.GameObject.active=!1}));(0,j.clone)(k).reverse().forEach(((k,U)=>{if(U>=F.length){const k=this.addNewEntry();F.push(k)}const G=F[U];G.setStatusEffect(k,B),G.GameObject.active=!0})),this._gridLayout.onUpdated.addOnce(this.onGridLayoutUpdated,this),this._gridLayout.updateAll()}addNewEntry(){const k=(0,V.Ks)().loadFromGUID($.l.StatusEffect,this._gridLayout.GameObject);return this._gridLayout.GameObject.addChild(k),k.findComponent(q.D)}updateHeight(){const k=this.getClampedScrollAreaHeight();this._transformsToApplyHeightReferenceTo.forEach((B=>{B.heightDelta=k+8})),this._scrollView.rectTransform.heightDelta=k}getClampedScrollAreaHeight(){var k;const B=this._gridLayoutContainer.heightDelta;if(B<=274)return B;const U=null!==(k=this._gridLayout.GameObject.children)&&void 0!==k?k:[];let F=0;for(let j=0;j{"use strict";U.d(B,{k:()=>G,y:()=>it});var F,G,j=U(8674),$=U(87490),H=U(62459),V=U(88022),W=U(82351),q=U(36648),K=U(43523),z=U(76277),Y=U(35120),Q=U(83133),X=U(28152),Z=U(10670),J=U(80060),tt=U(44094),et=U(81531);!function(k){k.Astral1="4BDDFB",k.Astral2="8085FF",k.Astral3="FF9CB8",k.Fire="FDA915",k.Ice="BBF1FF",k.Physical="D7F5EB",k.Plant="C0E894",k.Shadow="F597E7",k.Storm="FFD406",k.Water="6DC7FF",k.Neutral="91FFEC",k.Disabled="8A827F",k.Cooldown="D5CBC4"}(G||(G={}));let it=F=class extends H.uAl{constructor(){super(...arguments),this.index=-1,this._activeUnit=null,this.onActionSelected=new H.HN0,this.onActionOnCooldownSelected=new H.HN0,this.onActionUnavailable=new H.HN0,this.onActionAvailable=new H.HN0,this.onActionDisabled=new H.HN0,this.onInactiveSelected=new H.HN0,this._sendOnInactiveSelected=!1,this._inactiveMsgArg=null}initialize(){this._inactiveMsgKey="",this._inactiveMsgArg=null,this._displayObject.active=!0,this._activeUnit=this._battleController.activeUnit,this._mainSpellList=this._activeUnit.spells.filter((k=>this._gameDataProvider.getItem("spellV2",k.spellId).data.showSpellcard)),this.checkValidity()}checkValidity(){var k,B,U;if(null===(k=this._activeUnit)||void 0===k?void 0:k.data){if(this.type===$.EBattleAction.CastSpell&&this.index>=0){if(this._mainSpellList.length<=this.index)return void this.onActionUnavailable.dispatch();const k=this.getSpellData();if(!k)return;const G=this._gameDataProvider.getItem("spellV2",k.spellId),j=G.data;(0,z.G)(K.P)||(j.statusEffects=[]);const H=G.metadata,W=k.currentCooldown>0||this.isOneUseSpell(k.currentCooldown)||k.isLocked||this._activeUnit.currentMp0?Z=F.COOLDOWN_TEXT:W&&(Z=F.IS_LOCKED_TEXT);const et={SPELLCARD_COLOR_STATE:Z,SPELLCARD_COOLDOWN_BARS_TOTAL:Y,SPELLCARD_COOLDOWN_BARS_CURRENT:Q,SPELLCARD_COOLDOWN_1:this.getCooldownBarColor(Q,1,j.element),SPELLCARD_COOLDOWN_2:this.getCooldownBarColor(Q,2,j.element),SPELLCARD_COOLDOWN_3:this.getCooldownBarColor(Q,3,j.element),SPELLCARD_CENTRE_ICON:X,SPELLCARD_MINI_ICON:[V._.Ui_battle_revamp_json,`icon-mini-element-${j.element}${W?"-cooldown":""}`],SPELL_HAS_STATUS_EFFECT:$.Util.isDefined(j.statusEffects)&&j.statusEffects.length>0};if(this._activeUnit.affixes.length){let k;this._activeUnit.affixes.find((B=>{var U;return B.type===$.EAffixType.AdditiveDamageMultiplier&&(k=null===(U=B.instances.find((k=>k.element)))||void 0===U?void 0:U.element)})),$.Util.singleOrArrayIncludes(k,j.element)&&(et.SPELLCARD_BOOST_ICON=[V._.Ui_battle_revamp_json,"icon-mini-buff-chevron"])}if(J.d.updateInjectedValues(this.GameObject.parent,et),this.onActionAvailable.dispatch(),this._activeUnit.currentMp0)return this._inactiveMsgKey=1===k.currentCooldown?"BATTLE_REVAMP_ON_COOLDOWN":"BATTLE_REVAMP_ON_COOLDOWN_PLURAL",void(this._inactiveMsgArg=k.currentCooldown)}if(this.type===$.EBattleAction.RescuePet){if(!this._battleController.isRescueAvailable())return void this.onActionUnavailable.dispatch();this.onActionAvailable.dispatch()}}else H.VyI.log("Invalid data on active unit.",H.$bb.Error)}checkValidTargets(k,B=!1){if(k.team===$.ESpellTeamTarget.Own&&k.unit===$.ESpellUnitTarget.Ally){if(!this._battleController.getUnits().some((k=>{var B;return k.data.teamId===(null===(B=this._activeUnit)||void 0===B?void 0:B.data.teamId)&&k!==this._activeUnit&&k.isTargetable})))return B&&(this._inactiveMsgKey="BATTLE_REVAMP_NO_VALID_ALLY_TARGETS",this._sendOnInactiveSelected=!0),!1}return!0}isOneUseSpell(k){return-1===k}getCooldownBarColor(k,B,U){let j=F.COOLDOWN_TEXT;return this.isOneUseSpell(k)?j=F.IS_LOCKED_TEXT:k>=B&&(j=U===$.EElementType.Astral?`${$.EElementType.Astral}${B}`:U),G[tt.$.capitalizeFirstLetter(j)]}getSpellData(){var k;return this.type===$.EBattleAction.CastSpell&&this.index>=0?null===(k=this._mainSpellList)||void 0===k?void 0:k[this.index]:this.type===$.EBattleAction.RescuePet?{spellId:this._battleController.battleConstants.rescueSpellId,isLocked:!1,currentCooldown:0}:null}sendActionData(){const k=this.getSpellData();if(k){Y.q.instance.prodigy.audio.playSFXFromGUID(W.B.Sfx_spell_card_select);const B=this._gameDataProvider.getItem("spellV2",k.spellId).data,U=this._battleController.battleConstants.rescueSpellId===k.spellId;if(Y.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendBattleInterfaceClickedEvent({object_name:`Spell Card ${B.name}`,object_type:U?Z.zA.Action:Z.zA.Spell}),0!==k.currentCooldown)return this.onActionOnCooldownSelected.dispatch(k),void(this._battleController.selectedSpell=k);this._sendOnInactiveSelected&&this.onInactiveSelected.dispatch()}this.onActionSelected.dispatch(k),this._battleController.selectedSpell=k}sendInactiveMessage(){this.clearInactiveMessage(),this._inactiveMsgArg?this._battleController.textLog.showMessage(this._inactiveMsgKey,this._inactiveMsgArg):this._battleController.textLog.showMessage(this._inactiveMsgKey)}clearInactiveMessage(){this._battleController.textLog.clearMessageQueue()}destroy(){this.onActionSelected.dispose(),this.onActionUnavailable.dispose(),this.onActionAvailable.dispose(),this.onActionDisabled.dispose(),this.onActionOnCooldownSelected.dispose(),this.onInactiveSelected.dispose(),super.destroy()}};it.COOLDOWN_TEXT="cooldown",it.IS_LOCKED_TEXT="disabled",(0,j.Cg)([(0,H.gfw)($.EBattleAction),(0,j.Sn)("design:type",String)],it.prototype,"type",void 0),(0,j.Cg)([(0,H.g11)(),(0,j.Sn)("design:type",Number)],it.prototype,"index",void 0),(0,j.Cg)([(0,H.Cdj)("BattleController"),(0,j.Sn)("design:type",Function)],it.prototype,"_battleController",void 0),(0,j.Cg)([(0,H.Cdj)("GameDataProvider"),(0,j.Sn)("design:type",et.q)],it.prototype,"_gameDataProvider",void 0),(0,j.Cg)([(0,H.MnK)(Q.l),(0,j.Sn)("design:type",Q.l)],it.prototype,"_toggle",void 0),(0,j.Cg)([(0,H.ERr)(),(0,j.Sn)("design:type",H._mx)],it.prototype,"_displayObject",void 0),(0,j.Cg)([(0,H.bbQ)(),(0,j.Sn)("design:type",H.HN0)],it.prototype,"onActionSelected",void 0),(0,j.Cg)([(0,H.bbQ)(),(0,j.Sn)("design:type",H.HN0)],it.prototype,"onActionOnCooldownSelected",void 0),(0,j.Cg)([(0,H.bbQ)(),(0,j.Sn)("design:type",H.HN0)],it.prototype,"onActionUnavailable",void 0),(0,j.Cg)([(0,H.bbQ)(),(0,j.Sn)("design:type",H.HN0)],it.prototype,"onActionAvailable",void 0),(0,j.Cg)([(0,H.bbQ)(),(0,j.Sn)("design:type",H.HN0)],it.prototype,"onActionDisabled",void 0),(0,j.Cg)([(0,H.bbQ)(),(0,j.Sn)("design:type",H.HN0)],it.prototype,"onInactiveSelected",void 0),it=F=(0,j.Cg)([(0,H.EVk)("BattleActionData",X.Y.battleRevamp)],it)},77823:(k,B,U)=>{"use strict";U.d(B,{u:()=>$});var F=U(8674),G=U(79687),j=U(39984);let $=class{get teamCurrentHP(){return this._teamCurrentHP}constructor(k){this._activePlayer=k.player}refreshTeamCurrentHP(){const k=[];this._activePlayer.kennel.petTeam.forEach((B=>{if(B){const U=B.getCurrentHearts();k.push(Math.min(Math.round(U),j.e.MAX_HEARTS))}})),this._teamCurrentHP=k}getTeamCurrentHP(){return this._teamCurrentHP||this.refreshTeamCurrentHP(),this._teamCurrentHP}};$=(0,F.Cg)([(0,G.injectable)(),(0,F.Qj)(0,(0,G.inject)("e20-0fb0")),(0,F.Sn)("design:paramtypes",[Object])],$)},86323:(k,B,U)=>{"use strict";U.d(B,{I:()=>q});var F=U(8674),G=U(62459),j=U(5491),$=U(35120),H=U(63834),V=U(28152),W=U(68788);let q=class extends G.y4o{constructor(){super(...arguments),this.onClosed=new G.HN0,this.onOpened=new G.HN0,this.onStarted=new G.HN0,this._dropDownStart=new G.I9Y,this._groupContainer=null,this._postBattleFlowManager=null}create(){super.create(),this._groupContainer=$.q.instance.game.add.container($.q.instance.game.stage),this._groupContainer.name=this.GameObject.name,this.setRootContainer(this._groupContainer)}getDimensions(){return G.or0.ZERO}getBattleCreatures(k){const B=$.q.instance.prodigy.gameContainer.get("306-5359");return[B,...k.map((k=>{var U;if(!k.includes(j.V.Player)){const F=null===(U=/^pet-(.*)$/.exec(k))||void 0===U?void 0:U[1];if(F){const k=B.kennel.getPetByUniqueID(F);if(k)return new H.r(B.game,k)}}return null})).filter((k=>k))]}show(k,B,U,F,j){const H=this.getBattleCreatures(k),V=F.rewards;F.skipChests&&(V.length=0,F.memberRewards.length=0),$.q.instance.prodigy.prefabFactory.openPostBattleFlow({currentTeamCreatures:H,victory:B,battleType:U,postBattleRewards:{xpGained:F.xpGained,rewards:V,memberRewards:F.memberRewards,rewardsScalingInfo:F.rewardsScalingInfo,rescuablePets:F.rescuablePets,magicoinRewardGranted:F.magicoinRewardGranted},nootTipInfo:j}).promise.then((k=>{this.onOpened.dispatch(),this._postBattleFlowManager=k.findComponentInChildren(W.D),this._postBattleFlowManager?(this._postBattleFlowManager.OnDestroy.addOnce((()=>this.onResultClosed())),this.onStarted.dispatch(k)):this.onResultClosed()})).catch(G.RQr.createHandler("Error with post battle flow menu"))}onResultClosed(){this.onClosed.dispatch()}destroy(){this.onClosed.dispose(),this.onOpened.dispose(),this.onStarted.dispose(),super.destroy()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],q.prototype,"onOpened",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],q.prototype,"onStarted",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],q.prototype,"_dropDownStart",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_dropDownDuration",void 0),q=(0,F.Cg)([(0,G.EVk)("BattleRevampResult",V.Y.battleRevamp)],q)},64019:(k,B,U)=>{"use strict";U.d(B,{cs:()=>J,pV:()=>G});var F,G,j,$=U(8674),H=U(87490),V=U(62459),W=U(95891),q=U.n(W),K=U(28628),z=U(28152),Y=U(13302),Q=U(630),X=U(63761),Z=U(83269);!function(k){k.None="none",k.AllUnits="all",k.NonWizardUnits="nonWizard",k.WizardUnits="wizard"}(G||(G={})),function(k){k[k.FrontTop=0]="FrontTop",k[k.FrontMiddle=1]="FrontMiddle",k[k.FrontBottom=2]="FrontBottom",k[k.BackMiddle=3]="BackMiddle",k[k.Middle=4]="Middle",k[k.HugeUnit=5]="HugeUnit"}(j||(j={}));let J=F=class extends V.uAl{constructor(){super(...arguments),this._units=[],this.teleportInBehaviour=G.None}get id(){return this._id}get units(){return this._units.filter((k=>k.creature))}get rawUnits(){return this._units}get wizard(){return this.units.find((k=>k.type===K.uj.Wizard))}setData(k,B,U){this._id=k,this._teamData=B,this._unitData=U,this.positionTeamMembers(U)}positionTeamMembers(k){const B=1===q().keys(q().pickBy(k,{type:K.uj.Wizard})).length,U=Z.B.getUnitContainer(k[0].type).defaultSize,G=k.every((k=>void 0!==k.slot));B&&k.sort(((k,B)=>k.type===K.uj.Wizard?-1:B.type===K.uj.Wizard?1:0)),k.forEach(((j,$)=>{const W=j.type===K.uj.Boss?X.H0.None:U===Y.X.Huge?X.H0.Immediate:j.teamId===H.ETeamId.Home?X.H0.Astral:X.H0.Shadow;let q=j.slot;1===k.length&&j.type!==K.uj.Boss&&U===Y.X.Huge&&(q=K.Ie.HugeUnit);const z=F.TEAM_UNIT_SLOT_MAP[q],Q=this.units.find((k=>k.type===K.uj.Wizard));this.addUnitToSlot(j,G&&V.Aq$.isDefined(z)?z:this.getFallbackUnitPosition($),W,B&&Q?Q:void 0)}))}getFallbackUnitPosition(k){switch(k){case 0:return F.TEAM_UNIT_SLOT_MAP[K.Ie.BackMiddle];case 1:return F.TEAM_UNIT_SLOT_MAP[K.Ie.FrontTop];case 2:return F.TEAM_UNIT_SLOT_MAP[K.Ie.FrontBottom];default:return F.TEAM_UNIT_SLOT_MAP[K.Ie.FrontMiddle]}}addUnitToSlot(k,B,U,F){var G;const j=this._units[null!==(G=k.unitSlot)&&void 0!==G?G:B];return j.setData(k,U,F,k.scale),j}teleportIn(){return(0,$.sH)(this,void 0,void 0,(function*(){const k=[];this._units.forEach((B=>{if(B.creature){const U=this.teleportInBehaviour===G.AllUnits||this.teleportInBehaviour===G.NonWizardUnits&&B.data.type!==K.uj.Wizard||this.teleportInBehaviour===G.WizardUnits&&B.data.type===K.uj.Wizard;k.push(B.enterBattle(U))}})),yield Promise.all(k)}))}teleportOut(){return(0,$.sH)(this,void 0,void 0,(function*(){const k=[];this._units.forEach((B=>{B.creature&&B.isAlive()&&k.push(B.playDefeated())})),yield Promise.all(k)}))}awaitUnitsLoaded(){return(0,$.sH)(this,void 0,void 0,(function*(){return Promise.all(this.units.map((k=>(0,$.sH)(this,void 0,void 0,(function*(){k.creature||(yield k.onDataSet.asPromise()),yield k.loadPromise})))))}))}getUnitIndex(k){return this._units.findIndex((B=>B===k))}isRescuable(){const k=this.getInjectedValue("BattleController");return this.units.some((B=>B.data.teamId===k.rightTeamId&&B.type===K.uj.Pet&&B.data.catchChance>=0&&!B.controllerUnit))}destroy(){super.destroy(),this._units.length=0}};J.TEAM_UNIT_SLOT_MAP={[K.Ie.FrontTop]:j.FrontTop,[K.Ie.FrontMiddle]:j.FrontMiddle,[K.Ie.FrontBottom]:j.FrontBottom,[K.Ie.BackMiddle]:j.BackMiddle,[K.Ie.Middle]:j.Middle,[K.Ie.HugeUnit]:j.HugeUnit},(0,$.Cg)([(0,V.SZi)(),(0,V.MnK)(Q.Xc),(0,$.Sn)("design:type",Array)],J.prototype,"_units",void 0),(0,$.Cg)([(0,V.gfw)(G),(0,$.Sn)("design:type",String)],J.prototype,"teleportInBehaviour",void 0),J=F=(0,$.Cg)([(0,V.EVk)("BattleRevampTeam",z.Y.battleRevamp)],J)},630:(k,B,U)=>{"use strict";U.d(B,{GH:()=>$,Xc:()=>Ut,jN:()=>j,rC:()=>G});var F,G,j,$,H,V=U(8674),W=U(87490),q=U(62459),K=U(95891),z=U.n(K),Y=U(20748),Q=U(62248),X=U(88022),Z=U(82351),J=U(99625),tt=U(36648),et=U(28628),it=U(37016),st=U(43523),nt=U(35120),at=U(49237),rt=U(91207),ot=U(77938),ht=U(28152),ct=U(37468),dt=U(29834),lt=U(23082),ut=U(76277),ft=U(96810),bt=U(70703),pt=U(66998),vt=U(26004),gt=U(3583),mt=U(96304),yt=U(34958),_t=U(16847),Et=U(6719),wt=U(80060),Tt=U(44094),St=U(86283),At=U(34578),Ct=U(97317),Ot=U(55122),It=U(13302),Dt=U(81531),Rt=U(35856),Pt=U(29143),Mt=U(46352),Nt=U(88331),xt=U(99057),Lt=U(63761),kt=U(83269),Bt=U(92611);!function(k){k.Entrance="entrance",k.Exit="exit",k.ExitToStore="exit-to-store"}(G||(G={})),function(k){k.TransitionUnit="unit-show-hide",k.TransitionUi="healthbar-hide",k.StoreParticleStart="particle-start"}(j||(j={})),function(k){k.PetMergeRank="PET_MERGE_RANK",k.PetMergeBadge="PET_MERGE_BADGE"}($||($={})),function(k){k.Apply="apply",k.ApplyLarge="apply-large",k.Sustain="sustain"}(H||(H={}));let Ut=F=class extends q.uAl{constructor(){super(...arguments),this.onDataSet=new q.HN0,this.onTurnTimerExpired=new q.HN0,this.onUnitDefeated=new q.HN0,this.onUnitRevived=new q.HN0,this.onInfoTooltipShown=new q.HN0,this.onInfoTooltipHidden=new q.HN0,this.onHpSet=new q.HN0,this.onApplyDamage=new q.HN0,this._unitTooltipIsShowing=!1,this.loadPromise=Promise.resolve(),this.isRescued=!1,this.turnIndicatorOffset=null,this.onDefeatAnimationStarted=new q.HN0,this.onDefeatAnimationFinished=new q.HN0,this._defeatAnimationPlaying=!1,this.cleanUpOnDefeat=!1,this.affixes=[],this.statusEffects=[],this.onStatusEffectsChanged=new q.HN0,this.unitNameForSegment=null,this._isTargetable=!0}get creature(){return this._creature}get data(){return this._data}get overlayParent(){return this._overlayParent}get levelUi(){return this._levelUi}get statusEffectContainer(){return this._statusEffectContainer}get storeTeleportPriority(){return this._storeTeleportPriority}get unitTooltipIsShowing(){return this._unitTooltipIsShowing}set unitTooltipIsShowing(k){this._unitTooltipIsShowing!==k&&(this._unitTooltipIsShowing=k,k?this.onInfoTooltipShown.dispatch():this.onInfoTooltipHidden.dispatch())}get _teleportAnimator(){var k;switch(null===(k=this._creature)||void 0===k?void 0:k.teleportType){case Lt.H0.Astral:return this._teleportAnimatorAstral;case Lt.H0.ShadowBig:return this._teleportAnimatorShadowBig;case Lt.H0.Shadow:default:return this._teleportAnimatorShadow}}get size(){return this._creature.size}set size(k){this._creature.size=k,this.targetComponent.size=k}get scale(){return this._characterRoot.transform.localScale.y}set scale(k){this._characterRoot.transform.setScale(k)}get spellOriginOffset(){return this.size===It.X.Huge?{x:40,y:100}:{x:0,y:0}}get element(){return this.data.element}set element(k){this.data.element=k,this.updateWeaknessIcon()}create(){super.create();const{x:k,y:B}=this._newIndicator.transform.localPosition;this.createUnitTooltipTrigger()}destroy(){this.controllerUnit=null,this.onDataSet.dispose(),this.onTurnTimerExpired.dispose(),this.onUnitDefeated.dispose(),this.onUnitRevived.dispose(),this.onInfoTooltipShown.dispose(),this.onInfoTooltipHidden.dispose(),this.onHpSet.dispose(),this.onApplyDamage.dispose(),this.hideWaitingMessage(),this.onDefeatAnimationStarted.dispose(),this.onDefeatAnimationFinished.dispose(),this.onStatusEffectsChanged.dispose(),super.destroy()}fadeOut(){return(0,V.sH)(this,arguments,void 0,(function*(k=!0){var B;yield null===(B=this._creature)||void 0===B?void 0:B.fadeOut(500).then((()=>{var B;k&&(this.GameObject.destroy(),null===(B=this.ultimatesUi)||void 0===B||B.GameObject.destroy())}))}))}fadeIn(){return(0,V.sH)(this,void 0,void 0,(function*(){this._creature.visible=!0,yield this._creature.fadeIn(500)}))}get hitbox(){return this._creature.hitbox}getHitboxCenter(){const k=this._creature.hitbox;return{x:k.x+.5*k.w,y:k.y+.5*k.h}}enterBattle(k){return(0,V.sH)(this,arguments,void 0,(function*(k,B=!1,U=!1){var F;this._creature||(yield this.onDataSet.asPromise(),yield this.loadPromise),this._creature.ran=!1,null===(F=this._hpBarSequence)||void 0===F||F.setupPulse(this._data.health.current/this._data.health.max),k?yield this.playTeleport(G.Entrance,B,U):(this._creature.visible=!0,this._creature.handleEnter(),B&&(this.uiContent.active=!0,this.uiContent.findComponent(bt.x).targetComponent.getRootContainer().alpha=1))}))}setData(k,B,U,G=1){if(this.statusEffects.length=0,this.uiContent.active=!0,this._data=k,this.controllerUnit=U,this.scale=G,!k)return this.clearData(),void this.onDataSet.dispatch();this._battleController.onChoosingSpell.removeAll(this),this._battleController.onChoosingSpell.add((()=>{this.updatePetRescueTooltip(),this.updateIdleStatusEffect()})),this._battleController.onSpellCardSelected.removeAll(this),this._battleController.onSpellCardSelected.add((()=>{this.updatePetRescueTooltip()}),this),this._battleController.onSpellCardUnselected.removeAll(this),this._battleController.onSpellCardUnselected.add((()=>{this.updatePetRescueTooltip()}),this),this._battleController.onSpellTargetChosen.removeAll(this),this._battleController.onSpellTargetChosen.add((()=>{this.updatePetRescueTooltip(),this.hideIdleStatusEffect()}),this),this._battleController.onBattleEnded.removeAll(this),this._battleController.onBattleEnded.add((()=>{this.updatePetRescueTooltip()}),this);const j=new(kt.B.getUnitContainer(k.type));this._creature=j,this.loadPromise=j.setData(k,this._characterRoot,B).then((()=>{j.size===It.X.Normal&&G{this.statusEffects.push(k)})),k.statusEffects.length=0}clearData(){this.uiContent&&(this.uiContent.active=!1),this._unitTooltipTrigger.active=!1,this._data=null,this.isRescued=!1,this._creature&&(this._creature.creatureGameObject&&(this._creature.creatureGameObject.active=!1),this._creature.destroy(),this._creature=null),this._unitShield&&(this._unitShield.active=!1)}setUnitTooltipTriggerEnabled(k){this._unitTooltipTrigger&&(this._unitTooltipTrigger.active=k)}get battleId(){var k;return null===(k=this._data)||void 0===k?void 0:k.unitId}get name(){return this._creature.name||this.defaultName}set name(k){this._creature.name=k}get defaultName(){const k=this._data.teamId===this._battleController.leftTeam.id?nt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.name.getFallbackName():this._localizer.getText("FALLBACK_NAME_WIZARD");switch(this.type){case et.uj.Wizard:return k;default:return Tt.$.capitalizeFirstLetter(this.type)}}get level(){return this._data.level}get currentHp(){return this._data.health.current}get maxHp(){return this._data.health.max}get currentMp(){return this._data.mp.current}get maxMp(){return this._data.mp.max}get type(){return this._data.type}get spells(){return this._data.spells}isAlive(){return!this.isDefeated()}isDefeated(){return this.isKnockedOut()||this.isRescued}isKnockedOut(){return this.currentHp<=0}get isTargetable(){return this._isTargetable&&!this.isDefeated()}set isTargetable(k){this._isTargetable=k}isARescuableUnit(){var k,B;return(null===(k=this._data)||void 0===k?void 0:k.catchChance)>=0&&(null===(B=this._data)||void 0===B?void 0:B.teamId)===this._battleController.rightTeam.id&&this.type===et.uj.Pet&&this.isTargetable&&!this.controllerUnit}isInARescuableState(){var k;return this.isARescuableUnit()&&this._data.health.current<=(null!==(k=this._data.catchHealth)&&void 0!==k?k:this._data.health.max*this._battleController.battleConstants.rescueDamageThreshold)}playAttackAnimation(){this._creature.attack()}playSummonAnimation(){this._creature.summon()}playLevelUp(){this._creature.levelUp()}playHurt(){this._creature.hurt()}playWalk(){this._creature.walk()}defeatUnit(){return(0,V.sH)(this,arguments,void 0,(function*(k=G.Exit){this.onUnitDefeated.dispatch(),this.removeAllStatusEffects(),yield this.playDefeated(k)}))}reviveUnit(){this.onUnitRevived.dispatch()}playDefeated(){return(0,V.sH)(this,arguments,void 0,(function*(k=G.Exit){this._creature&&(this._creature.ran?this._defeatAnimationPlaying&&(yield this.onDefeatAnimationFinished.asPromise()):(this._creature.ran=!0,this.hideWaitingMessage(),this.onDefeatAnimationStarted.dispatch(),this._defeatAnimationPlaying=!0,this.setNewIndicatorActive(!1),this._creature.teleportType===Lt.H0.None||this._creature.teleportType===Lt.H0.Immediate?(yield this._creature.defeated(),this.uiContent.active=!1,this._unitTooltipTrigger.active=!1,this._unitShield&&(this._unitShield.active=!1)):yield this.playTeleport(k,!1),this._defeatAnimationPlaying=!1,this.cleanUpOnDefeat&&(yield this.cleanUpAssets()),this.onDefeatAnimationFinished.dispatch()))}))}cleanUpAssets(){return(0,V.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,j;const $=[...this.getInjectedValue("LeftTeamUnits"),...this.getInjectedValue("RightTeamUnits")].filter((k=>!k.isDefeated()||!k.cleanUpOnDefeat));if($.map((k=>k.creature.id)).includes(this.creature.id))return;const H=nt.q.instance.game.state.states.get(lt.G.SecureBattleRevamp).getUnitAssets({[this.data.unitId]:this.data});rt.E.removeAssetsFromCache(H);const V=z().flatMap($.map((k=>k.spells))),W=V.map((k=>k.spellId)),K=this.spells.filter((k=>!W.includes(k.spellId))),Y=V.map((k=>this._gameDataProvider.getItem("spellV2",k.spellId))),Q=K.map((k=>this._gameDataProvider.getItem("spellV2",k.spellId))),X=[],Z=[];for(const q of Y)(null===(U=null===(B=null===(k=null==q?void 0:q.metadata)||void 0===k?void 0:k.assets)||void 0===B?void 0:B.icon)||void 0===U?void 0:U.assetKey)&&X.push(Tt.$.capitalizeFirstLetter(q.metadata.assets.icon.assetKey));for(const z of Q){const k=(null===(j=null===(G=null===(F=null==z?void 0:z.metadata)||void 0===F?void 0:F.assets)||void 0===G?void 0:G.icon)||void 0===j?void 0:j.assetKey)?Tt.$.capitalizeFirstLetter(z.metadata.assets.icon.assetKey):null;!X.includes(k)&&q.Aq$.isDefined(tt.q[k])&&Z.push(tt.q[k],tt.q[`${k}_cooldown`])}for(const q of Z)nt.q.instance.game.cache.removeImage(q);const J=rt.E.getSpellGuids(Y),et=rt.E.getSpellGuids(Q),it=rt.E.getAssetDependencies(J),st=rt.E.getAssetDependencies(et),at=z().difference(st,it);rt.E.removeAssetsFromCache(at),this._creature.animator instanceof dt.j&&this._creature.animator.spine.destroy(),this._creature.creatureGameObject.destroy(),q.C1c.markTextureGarbageCollectionFrame(),yield q.Egh.timeout(0),q.C1c.garbageCollectTextures()}))}playEscaped(){return(0,V.sH)(this,void 0,void 0,(function*(){var k;const B=nt.q.instance.game,U=this._creature.creatureGameObject.transform,F=(null===(k=this._data)||void 0===k?void 0:k.teamId)===this._battleController.rightTeam.id?B.width+100:-100,G=B.add.tween(U.localPosition,U).to({x:F},2e3,q.GS3.Quadratic.In);this.uiContent.active=!1,this._creature.flip(),this._creature.walk(),G.start(),yield G.onTweenComplete.asPromise()}))}setNewIndicatorActive(k=!0){if(!this._creature)return;const B=nt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=this._creature.id,F=!St.D.hasBeenRescuedPreviously(B,U);this._newIndicator.active=F&&k}showRarity(){return(0,V.sH)(this,void 0,void 0,(function*(){var k;yield null===(k=this._rarityDisplay)||void 0===k?void 0:k.showRarity(this._data.rarity)}))}updateRescuableUI(){return(0,V.sH)(this,arguments,void 0,(function*(k=!0){this.isARescuableUnit()?(this.setNewIndicatorActive(!0),k&&(yield this.showRarity())):this.setNewIndicatorActive(!1)}))}hasAccessToSpell(k){return this.spells.some((B=>B.spellId===k))}setRescueCost(k,B,U,F){this._rescueCost.GameObject&&(this._rescueCost.GameObject.active=k),k&&(this._rescueCost.updateCurrencyID(B),this._rescueCost.updateAmount(U,F),this.getInjectedValue("c47-20b6").playerProgression.sendPetHardCurrencyFunnelAdvancedEventIfApplicable(Q.l6.Rescue,ft.l.PetHardCurrencyImpression))}setOwnedCount(k){var B,U;null===(U=null===(B=this.gameObject)||void 0===B?void 0:B.isDestroyed)||void 0===U||U||wt.d.updateInjectedValues(this.gameObject,{OWNED_COUNT:q.Aq$.isDefined(k)?this._localizer.getText(k?"PET_RESCUE_OWNED_COUNT":"PET_RESCUE_NOT_OWNED",...k?[k]:[]):""})}fadeUi(k,B){return(0,V.sH)(this,void 0,void 0,(function*(){const U=this.uiContent.findComponent(bt.x);U.startTween(k,null!=B?B:U.targetComponent.getRootContainer().alpha),yield U.onComplete.asPromise()}))}updateWeaknessIcon(){const k=this._battleController.battleConstants;this._weaknessIcon.updateAsset(X._.Ui_battle_revamp_json,`icon-mini-element-${k.getElementalWeakness(this._data.element)}`)}setupMergeRankUi(){const k=this._data.teamId===W.ETeamId.Away,B=this._data.mergeRank;if(this.type!==et.uj.Pet)return;const U=void 0===B||B===it.qd.MIN,G={};U||(G[$.PetMergeRank]=B),k&&(G[$.PetMergeBadge]=Et.y.toInjectionParams({atlas:X._.Ui_battle_revamp_json,frame:`${F.PET_MERGE_BADGE_PREFIX}-purple`})),wt.d.updateInjectedValues(this.petMergeUi,G),this.petMergeUi.active=!U}setupIndicators(){this.updateWeaknessIcon(),this._creature.shouldShowLevel()?this._levelText.text=`${this._data.level}`:this._levelUi.active=!1,this.hpBar.setFromValues(this._data.health.current,this._data.health.max),this.mpBar.init(this._data.mp),this._data.teamId!==this._battleController.leftTeamId&&this.ultimatesUi&&this._battleController.type===et.gu.Ultimates&&this._questDataProvider.getCurrentQuestData().then((k=>{const B=nt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=k.find((k=>k.questID===B.ultimateQuestId)),F=Number(B.ultimateTaskId)>0?U.getTamingLevel()+1:1;this.ultimatesUi.init(F,this._data.nickname)})).catch(q.RQr.createHandler("Error initializing mythics taming progress UI")),this.processUnitShield(),this.setupMergeRankUi()}setupRarityDisplay(){if(this._rarityDisplay){const k=Math.min(this.hitbox.h,F.UNIT_RARITY_MAX_YSHIFT);this._rarityDisplay.GameObject.transform.setPositionY(-k)}}setupChargedLevels(){if(this._creature instanceof Bt.N&&this._creature.chargedLevel>0){const k=Ct.QT.MAX_NONMEMBER_CHARGED_LEVEL,B=this.gameObject.findComponent(q.bE_);this._levelText.text=`${this._creature.level+this._creature.chargedLevel}`,B.Container.rebind(At.m.ShowChargedLevels).toConstantValue(!0),B.Container.rebind(At.m.ChargedLevelAnimationTier).toConstantValue(this._creature.chargedLevel>=k?"max-charged":"charged"),this.gameObject.findComponentsInChildren(vt.B).forEach((k=>k.consume()))}}setupUnitTooltip(){this.unitTooltipPopupContainer=this._unitTooltipTrigger.findComponent(q.y4o).getRootContainer();const k=this.GameObject.transform.worldPosition;this._unitTooltipTrigger.transform.setPosition(k.x,k.y);const B=this._unitTooltipTrigger.findComponentInChildren(at.$),U=B.GameObject.transform;if(U.setPosition(this.hitbox.x,this.hitbox.y),U.setSizeDelta(this.hitbox.w,this.hitbox.h),B.onClick.removeAll(),B.onClick.add((()=>{this._battleController.onClickUnitTooltip(this.battleId)})),this.petRescueTooltip){const k=this.petRescueTooltip.findComponentInChildren(at.$);k.onClick.removeAll(),k.onClick.add((()=>{this._battleController.onClickUnitTooltip(this.battleId)}))}}updateHp(k){var B;const U=this._data.health.current;this._data.health.current=q.cj9.clamp(k,0,this.maxHp),this.hpBar.setFromValues(this._data.health.current,this._data.health.max,!0),null===(B=this._hpBarSequence)||void 0===B||B.triggerShake(this._data.health.current/this._data.health.max),this.onHpSet.dispatch(this._data.health.current,U)}updateMp(k){k===this.maxMp?this.refillMp():(this._data.mp.current=q.cj9.clamp(k,0,this.maxMp),this.mpBar.GameObject.active&&this.mpBar.updateMp(this._data.mp.current))}updateLevel(k){this._data.level=q.cj9.clamp(k,Ot.s.minLevel,Ot.s.activePlayerLevelCap),this._creature.shouldShowLevel()&&(this._levelText.text=`${this._data.level}`)}updatePetRescueTooltip(){if(!this.petRescueTooltip||!this.isARescuableUnit())return;this.petRescueTooltip.active=!0;const k=this.petRescueTooltip.findComponentInChildren(pt.s),B=this._battleController.isHighlightingRescue,U=this._battleController.isChoosingSpell,F=this._battleController.isPerformingAction,G=null!==this._battleController.selectedSpell,j=this._unitTooltipIsShowing;!this.isInARescuableState()||!U&&!B||F||G||j?(this.setNewIndicatorActive(!0),k.runOutTween()):(this.setNewIndicatorActive(!1),k.runInTween())}updateIdleStatusEffect(k=!1){if(!this._battleController.isChoosingSpell&&!k)return void this.hideIdleStatusEffect();const B=this.statusEffects.filter((k=>k.itemData.type===W.EStatusEffectType.DOT));if(0===B.length)return void this.hideIdleStatusEffect();const U=B[0];this._battleController.statusEffectAnimationController.queueAnimationAction(J.l[U.itemData.animationData.statusEffectPrefab],this._statusEffectContainer,gt.c.getIdleAnimation(U.remainingDuration),!0,this.size)}hideIdleStatusEffect(){this._battleController.statusEffectAnimationController.hideAnimationOfType(W.EStatusEffectType.DOT,this._statusEffectContainer)}updatePersistentStatusEffects(){const k=this.statusEffects.filter((k=>k.itemData.type===W.EStatusEffectType.Bomb));if(0===k.length)return void this.hideActivePersistentStatusEffect();const B=k.sort(((k,B)=>k.remainingDuration-B.remainingDuration))[0];this._battleController.statusEffectAnimationController.queueAnimationAction(J.l[B.itemData.animationData.statusEffectPrefab],this._statusEffectContainer,gt.c.getIdleAnimation(B.remainingDuration),!0,this.size)}hideActivePersistentStatusEffect(){this._battleController.statusEffectAnimationController.hideAnimationOfType(W.EStatusEffectType.Bomb,this._statusEffectContainer)}alertMpEmpty(){return(0,V.sH)(this,arguments,void 0,(function*(k=!1){return nt.q.instance.prodigy.audio.playSFXFromGUID(Z.B.Sfx_empty_mp),k?this.mpBar.alertMpEmptyAnimExtreme():this.mpBar.alertMpEmptyAnim()}))}onSelectSpell(k){k?this.mpBar.onSelectSpell(k.cost):this.mpBar.onSelectSpell(0)}processUnitShield(){this._unitShield&&(this._unitShield.active=this._data.type===et.uj.Titan)}refillMp(){this._data.mp.current=this.maxMp,this.mpBar.GameObject.active&&(nt.q.instance.prodigy.audio.playSFXFromGUID(Z.B.Sfx_mp_refilled),this.mpBar.refillMp())}playTeleport(k,B){return(0,V.sH)(this,arguments,void 0,(function*(k,B,U=!1){var F;const $=k===G.Entrance;this.controllerUnit&&(null===(F=this.controllerUnit)||void 0===F||F.playSummonAnimation(),yield q.Egh.timeout(500)),this.playTeleportAudio($),$||(yield this._creature.handleExit()),this._creature.visible=!$,this._teleportAnimator.GameObject.active=!0,this._teleportAnimator.playAnimation(k,!1,!0),this._teleportAnimator.spine.onEvent.add(((F,$)=>{switch($.data.name){case j.TransitionUnit:this._creature.visible=k===G.Entrance,this._unitTooltipTrigger.active=!this._battleController.isUnitTooltipLocked()&&k===G.Entrance,B&&k===G.Entrance&&(this.uiContent.active=!0,this.fadeUi(1).catch(q.RQr.createHandler("Error showing UI"))),U&&k===G.Entrance&&(this._healAnimation.GameObject.active=!0,this._healAnimation.OnAnimationComplete.addOnce((()=>this._healAnimation.GameObject.active=!1)),this._healAnimation.playAnimation(this._creature.teleportType===Lt.H0.ShadowBig?H.ApplyLarge:H.Apply,!1,!0),this._creature instanceof Bt.N&&this._creature.setFollowPosition());break;case j.TransitionUi:this.uiContent.active=k===G.Entrance,this._unitTooltipTrigger.active=!this._battleController.isUnitTooltipLocked()&&k===G.Entrance,this.ultimatesUi&&(this.ultimatesUi.GameObject.active=!1);break;case j.StoreParticleStart:{const k=this._storeParticleContainer.children[0];k&&(k.active=!0);break}}}),this),yield this._teleportAnimator.OnAnimationComplete.asPromise(),this._teleportAnimator.spine.onEvent.removeAll(this),this._teleportAnimator.GameObject.active=!1}))}playStoreTeleport(){return(0,V.sH)(this,void 0,void 0,(function*(){yield this.playTeleport(G.ExitToStore,!1)}))}playTeleportAudio(k){if(k)nt.q.instance.prodigy.audio.playSFXFromGUID(Z.B.Sfx_wizard_team_teleport);else{this._data.teamId===this._battleController.rightTeamId&&this._creature.teleportType===Lt.H0.Astral?nt.q.instance.prodigy.audio.playSFXFromGUID(Z.B.Sfx_teleport_rescue):nt.q.instance.prodigy.audio.playSFXFromGUID(Z.B.Sfx_teleport_defeat)}}createWaitingMessage(k,B,U){const F={MESSAGE:this._localizer.getText(B),TIMEOUT:U};if(this._waitingMessage)wt.d.updateInjectedValues(this._waitingMessage,F);else{const B=nt.q.instance.prodigy.gameContainer.get("d0e-64fd");this._waitingMessage=wt.d.loadWithInjectedValuesFromGUID(B,k,F,this.gameObject);const U=Math.max(this.gameObject.transform.worldPosition.y+this.hitbox.y,this._waitingMessage.transform.fullHeight);this._waitingMessage.transform.setPosition(0,U-this.gameObject.transform.worldPosition.y)}}hideWaitingMessage(){this._waitingMessage&&(this._waitingMessage.destroyDeferred(),this._waitingMessage=null)}showOpponentWaitingMessage(k){this.createWaitingMessage(J.l.DuelWaitingMessage,k)}showCasterWaitingMessage(k){this.createWaitingMessage(J.l.DuelTurnTimer,void 0,k);const B=this._waitingMessage.findComponentInChildren(yt.P);B.tweenValue(0),B.onComplete.addOnce((()=>this.onTurnTimerExpired.dispatch()))}updateLayerByPrefix(k){const B=`${k}${this.layerLevel}`;this.updateLayerByName(B)}updateLayerByName(k){this.GameObject.setLayer(k,!1),this.creature.creatureGameObject.setLayer(k,!0),this.statusEffectContainer.setLayer(k,!0),this.uiContent.setLayer(k,!0)}showAffix(k){return(0,V.sH)(this,void 0,void 0,(function*(){const B=this.affixes.find((B=>B.type===k.type));if(B)B.instances.push(k),this.updateAffixQuantity(B);else{const B=this.getAffixIcon(k),U=B?yield this.addAffixIcon(B):void 0;if(this.affixes.push({type:k.type,instances:[k],prefab:U}),k.type===W.EAffixType.Shield){const k=this.size===It.X.Huge?3:It.X?2:1;this.creature.addBarrier(Lt.HW.LegacySprite,null,0,0,k,k)}}}))}getAffixIcon(k){if(!(0,ut.G)(st.P))switch(k.type){case W.EAffixType.AdditiveDamageMultiplier:if(k.element){const B=F.ELEMENTAL_BUFF_ICONS[Array.isArray(k.element)?k.element[0]:k.element];if(B)return{atlas:X._.Ui_battle_revamp_json,frame:B}}break;case W.EAffixType.Revive:return tt.q.Effect_revive_mini;case W.EAffixType.Shield:return{atlas:X._.Ui_battle_revamp_json,frame:"icon-small-shield-titan"}}}addAffixIcon(k){return(0,V.sH)(this,void 0,void 0,(function*(){yield Et.y.loadAssets(k);const B=wt.d.loadWithInjectedValuesFromGUID(this.getInjectedValue("d0e-64fd"),J.l.VisibleAffixIcon,{ICON_GUID:Et.y.toInjectionParams(k)});return this.affixContainer.parent.active=!0,this.affixContainer.addChild(B),this.affixBackground.active=!0,B}))}updateAffixQuantity(k){if(!k.prefab)return;const B=k.instances.length;wt.d.updateInjectedValues(k.prefab,{NUMBER:B>1?`${B}`:""})}removeAffix(k){var B;let U=-1;const F=this.affixes.findIndex((B=>(U=B.instances.findIndex((B=>B.id===k)))>-1));if(F<0)return;const G=this.affixes[F];G.instances.splice(U,1),G.instances.length>0?this.updateAffixQuantity(G):(this.affixes.splice(F,1),null===(B=G.prefab)||void 0===B||B.destroy(),this.affixes.length<=0&&(this.affixContainer.parent.active=!1,this.affixBackground.active=!1,G.type===W.EAffixType.Shield&&(this.creature.breakBarrier(),this.creature.removeBarrier(!1))))}addStatusEffect(k){var B;const U=null===(B=ot.t.getItem("statusEffect",k.statusEffectId))||void 0===B?void 0:B.data;if(!U)throw new Error(`Status effect item data with ID ${k.statusEffectId} not found.`);const F=Object.assign(Object.assign({},k),{itemData:U});return this.statusEffects.push(F),this.updateDisplayedStatusEffects(),F}removeStatusEffect(k){const B=this.statusEffects.findIndex((B=>B.id===k));B>=0&&(this.statusEffects.splice(B,1),this.onStatusEffectsChanged.dispatch()),this._statusEffectIndicators.updateDisplayedEffects(this.statusEffects,this._data)}removeAllStatusEffects(){this.statusEffects.length>0&&(this.statusEffects.length=0,this.updateDisplayedStatusEffects(),this.updatePersistentStatusEffects())}modifyStatusEffect(k,B){const U=this.statusEffects.find((B=>B.id===k));if(U){const k=U.remainingDuration;U.remainingDuration=B,k!==B&&(this.onStatusEffectsChanged.dispatch(),this._statusEffectIndicators.updateDisplayedEffects(this.statusEffects))}}updateDisplayedStatusEffects(){this.onStatusEffectsChanged.dispatch(),this._statusEffectIndicators.updateDisplayedEffects(this.statusEffects,this.data)}showAsInteractive(k){const B=this._unitTooltipTrigger.findComponentInChildren(at.$);B&&(B.useHandCursor=k)}createUnitTooltipTrigger(){this._unitTooltipTrigger=new q._mx(this.GameObject);const k=this._unitTooltipTrigger.addComponent(q.XVE);k.setAnchorMin(0,0),k.setAnchorMax(1,1),k.setPivot(0,0),k.setPosition(0,0),this._unitTooltipTrigger.setLayer("unit-tooltip-input-bottom",!0),this._unitTooltipTrigger.addComponent(at.$)}};Ut.UNIT_TOOLTIP_HEIGHT_MAX=100,Ut.UNIT_RARITY_MAX_YSHIFT=150,Ut.PET_MERGE_BADGE_PREFIX="icon-pet-merge",Ut.SMALL_UNIT_SCALE_THRESHOLD=.6,Ut.ELEMENTAL_BUFF_ICONS={[W.EElementType.Fire]:"icon-mini-buff-fire",[W.EElementType.Ice]:"icon-mini-buff-ice",[W.EElementType.Physical]:"icon-mini-buff-physical",[W.EElementType.Plant]:"icon-mini-buff-plant",[W.EElementType.Storm]:"icon-mini-buff-storm",[W.EElementType.Water]:"icon-mini-buff-water"},(0,V.Cg)([(0,q.Cdj)("200-7dc0"),(0,V.Sn)("design:type",Object)],Ut.prototype,"_questDataProvider",void 0),(0,V.Cg)([(0,q.Cdj)("BattleController"),(0,V.Sn)("design:type",Function)],Ut.prototype,"_battleController",void 0),(0,V.Cg)([(0,q.Cdj)(q.$Bt.LocalizationService),(0,V.Sn)("design:type",q.dTp)],Ut.prototype,"_localizer",void 0),(0,V.Cg)([(0,q.Cdj)("GameDataProvider"),(0,V.Sn)("design:type",Dt.q)],Ut.prototype,"_gameDataProvider",void 0),(0,V.Cg)([(0,q.MnK)(Rt.Ri),(0,V.Sn)("design:type",Rt.Ri)],Ut.prototype,"targetComponent",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"_overlayParent",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"_characterRoot",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"uiContent",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"_newIndicator",void 0),(0,V.Cg)([(0,q.MnK)(_t.n),(0,V.Sn)("design:type",_t.n)],Ut.prototype,"_rescueCost",void 0),(0,V.Cg)([(0,q.MnK)(q.vYh),(0,V.Sn)("design:type",q.vYh)],Ut.prototype,"_weaknessIcon",void 0),(0,V.Cg)([(0,q.MnK)(q.EYj),(0,V.Sn)("design:type",q.EYj)],Ut.prototype,"_levelText",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"_levelUi",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"petMergeUi",void 0),(0,V.Cg)([(0,q.MnK)(ct.z),(0,V.Sn)("design:type",ct.z)],Ut.prototype,"hpBar",void 0),(0,V.Cg)([(0,q.MnK)(mt.j),(0,V.Sn)("design:type",mt.j)],Ut.prototype,"_hpBarSequence",void 0),(0,V.Cg)([(0,q.MnK)(Pt.e),(0,V.Sn)("design:type",Pt.e)],Ut.prototype,"mpBar",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"affixContainer",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"affixBackground",void 0),(0,V.Cg)([(0,q.MnK)(xt.M),(0,V.Sn)("design:type",xt.M)],Ut.prototype,"ultimatesUi",void 0),(0,V.Cg)([(0,q.MnK)(dt.j),(0,V.Sn)("design:type",dt.j)],Ut.prototype,"_teleportAnimatorAstral",void 0),(0,V.Cg)([(0,q.MnK)(dt.j),(0,V.Sn)("design:type",dt.j)],Ut.prototype,"_teleportAnimatorShadow",void 0),(0,V.Cg)([(0,q.MnK)(dt.j),(0,V.Sn)("design:type",dt.j)],Ut.prototype,"_teleportAnimatorShadowBig",void 0),(0,V.Cg)([(0,q.MnK)(dt.j),(0,V.Sn)("design:type",dt.j)],Ut.prototype,"_healAnimation",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"_statusEffectContainer",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"_unitShield",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"missedTurnX",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"_storeParticleContainer",void 0),(0,V.Cg)([(0,q.g11)(),(0,V.Sn)("design:type",Number)],Ut.prototype,"_storeTeleportPriority",void 0),(0,V.Cg)([(0,q.MnK)(Mt.Z),(0,V.Sn)("design:type",Mt.Z)],Ut.prototype,"_rarityDisplay",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],Ut.prototype,"petRescueTooltip",void 0),(0,V.Cg)([(0,q.MnK)(Nt.m),(0,V.Sn)("design:type",Nt.m)],Ut.prototype,"_statusEffectIndicators",void 0),(0,V.Cg)([(0,Y.sg)(500),(0,V.Sn)("design:type",Function),(0,V.Sn)("design:paramtypes",[Boolean]),(0,V.Sn)("design:returntype",void 0)],Ut.prototype,"playTeleportAudio",null),Ut=F=(0,V.Cg)([(0,q.EVk)("BattleRevampUnit",ht.Y.battleRevamp)],Ut)},15160:(k,B,U)=>{"use strict";U.d(B,{F:()=>it});var F,G=U(8674),j=U(62459),$=U(62248),H=U(99625),V=U(35120),W=U(28152),q=U(16847),K=U(80060),z=U(43754),Y=U(13302),Q=U(13956),X=U(81531),Z=U(17710),J=U(21001),tt=U(35856),et=U(87490);let it=F=class extends j.uAl{constructor(){super(...arguments),this.onRescueCurrencyBalanceShown=new j.HN0,this.onRescueCurrencyBalanceHidden=new j.HN0,this._battleActions=[],this.battleTargets=[],this._currentActionData=null,this.onTargetConfirmed=new j.HN0,this.onActionChange=new j.HN0,this.onHardCurrencyBalanceTooltipHidden=new j.HN0}create(){this._battleActions=this.GameObject.findComponentsInChildren(J.y),this._battleActions.forEach(((k,B)=>{k.onActionSelected.add(this.processActionSelected.bind(this,B),this),k.onActionOnCooldownSelected.add(this.processActionOnCooldownSelected.bind(this,B))}))}initialize(){const k=this.getInjectedValue("d0e-64fd"),B=this.getInjectedValue(j.$Bt.LocalizationService);this.hideRescueUi(),this._spellTooltips=this._battleActions.map((U=>{var G,j,$;if(U.type===et.EBattleAction.RescuePet)return null;const V=U.getSpellData();if(!V)return null;const W=this._gameDataProvider.getItem("spellV2",V.spellId).data;if(!W)return null;const q=this._battleController.getActiveUnitSpellData(V.spellId),z=null!==(G=null==q?void 0:q.spellPower)&&void 0!==G?G:0,Y=null!==(j=null==q?void 0:q.spellAccuracy)&&void 0!==j?j:0,Q=null===($=W.flags)||void 0===$?void 0:$.find((k=>k.flag===et.ESpellFlag.ChangeHp)),X=this._spellLevelBonusConstants.getDisplaySpellPower(Q?Q.flagValue:z,!!Q),J=this._spellLevelBonusConstants.getDisplaySpellAccuracy(Y),tt=W.cooldown<0?B.getText("SPELL_COOLDOWN_NEVER"):0===W.cooldown?B.getText("SPELL_COOLDOWN_NONE"):`${W.cooldown}`,it=Z.D.getStatusEffectInjectedValues(W),st=K.d.loadWithInjectedValuesFromGUID(k,H.l.RevampSpellTooltip,Object.assign({TOOLTIP_IS_IN_COOLDOWN:V.currentCooldown>0,TOOLTIP_ELEMENT:W.element,TOOLTIP_NAME:W.name,TOOLTIP_POWER:X,TOOLTIP_ACCURACY:J,TOOLTIP_COOLDOWN:tt,TOOLTIP_SELECTED:!1},it),this._spellTooltipContainer);return st.transform.setPosition(0,F.SPELL_TOOLTIP_OFFSCREEN_Y),st})),this.battleTargets=this.GameObject.findComponentsInChildren(tt.Ri),this._battleController.getUnits().forEach((k=>{this.battleTargets.push(k.targetComponent)}));for(const U of this.battleTargets)U.onTargetSelected.removeAll(this),U.onTargetSelected.add(this.processTargetSelected,this);this._spellTooltipTweens=Array(this._spellTooltips.length).fill(void 0),this._rescueCurrencyBalance.GameObject.onActiveChanged.remove(this.onRescueCurrencyBalanceActiveChanged,this),this._rescueCurrencyBalance.GameObject.onActiveChanged.add(this.onRescueCurrencyBalanceActiveChanged,this),this._rescueCurrencyBalance.GameObject.onDestroy.remove(this.onRescueCurrencyBalanceDestroyed,this),this._rescueCurrencyBalance.GameObject.onDestroy.addOnce(this.onRescueCurrencyBalanceDestroyed,this)}onRescueCurrencyBalanceActiveChanged(){this._rescueCurrencyBalance.GameObject.active?this.onRescueCurrencyBalanceShown.dispatch():this.onRescueCurrencyBalanceHidden.dispatch()}onRescueCurrencyBalanceDestroyed(){this._rescueCurrencyBalance.GameObject.active&&this.onRescueCurrencyBalanceHidden.dispatch()}processActionSelected(k,B){var U,F,G;this._currentActionData=B;const j=B?this._gameDataProvider.getItem("spellV2",B.spellId).data:null,$=null===(U=null==j?void 0:j.target)||void 0===U?void 0:U.team,H=null===(F=null==j?void 0:j.target)||void 0===F?void 0:F.unit;this.onActionChange.dispatch(j);const V=this._battleController.rightTeam.rawUnits,W=(null==B?void 0:B.spellId)===this._battleController.battleConstants.rescueSpellId;this.setRescueIndicators(V,W);const q=()=>this._battleController.activeUnit.data.teamId===this._battleController.leftTeamId?this._battleController.activeUnit:null;for(const K of this.battleTargets){const k=()=>K.isMultiTarget?(H===et.ESpellUnitTarget.Team||H===et.ESpellUnitTarget.Random)&&K.targets.every((k=>k.size!==Y.X.Huge)):!K.isTargetDisabled()&&(H===et.ESpellUnitTarget.Single&&(!W||K.singleTarget.isInARescuableState())||H===et.ESpellUnitTarget.Self&&K.singleTarget===q()||H===et.ESpellUnitTarget.Ally&&K.singleTarget!==q()||(H===et.ESpellUnitTarget.Team||H===et.ESpellUnitTarget.Random)&&K.singleTarget.size===Y.X.Huge),U=()=>K.teamId===this._battleController.rightTeamId&&$===et.ESpellTeamTarget.Enemy||K.teamId===this._battleController.leftTeamId&&$===et.ESpellTeamTarget.Own,F=B&&k()&&U();let V=tt.Bp.Standard;if(j)if(null===(G=j.flags)||void 0===G?void 0:G.some((k=>k.flag===et.ESpellFlag.Rescue)))V=tt.Bp.Rescue;else if(K.teamId===this._battleController.leftTeamId)V=K.size===Y.X.Small?tt.Bp.AssistSmall:tt.Bp.Assist;else{const k=K.singleTarget;if(k)switch(this._battleController.battleConstants.getElementalAdvantage(j.element,k.data.element)){case et.EElementalAdvantage.Strong:V=tt.Bp.Effective;break;case et.EElementalAdvantage.Weak:V=tt.Bp.Ineffective}}K.updateTargetInteractive(F,V,null==j?void 0:j.element)}this.showTooltip(B,k,j)}setRescueIndicators(k,B){var U;let F;for(const G of k){if(!j.Aq$.isDefined(null===(U=null==G?void 0:G.creature)||void 0===U?void 0:U.id))continue;if(!(B&&G.isInARescuableState())){G.setRescueCost(!1),G.setOwnedCount(null);continue}const k=this._hardCurrency.petAcquisitionCost(G.creature.id,$.l6.Rescue);j.Aq$.isDefined(k)?(G.setRescueCost(!0,k.currency,k.value),null!=F||(F=k.currency)):(G.setRescueCost(!0,27,0),F=27);const H=this.getInjectedValue("306-5359").kennel.getPets().filter((k=>k.ID===G.creature.id)).length;G.setOwnedCount(H)}this.setHardCurrencyBalanceDisplay(B&&j.Aq$.isDefined(F)?{currency:F,value:this._hardCurrency.getBalance(F)}:null)}setHardCurrencyBalanceDisplay(k){var B;(null===(B=this._rescueCurrencyBalance)||void 0===B?void 0:B.GameObject)&&(j.Aq$.isDefined(k)?(this._rescueCurrencyBalance.GameObject.active=!0,this._rescueCurrencyBalance.updateCurrencyID(k.currency),this._rescueCurrencyBalance.updateAmount(k.value)):this._rescueCurrencyBalance.GameObject.active=!1)}processActionOnCooldownSelected(k,B){if(this._currentActionData=B,B){const U=this._gameDataProvider.getItem("spellV2",B.spellId).data;this.showTooltip(B,k,U)}}showTooltip(k,B,U){if(k&&this._spellTooltips[B]){this._spellTooltips[B].bringToFront();const G=0!==k.currentCooldown?F.SPELL_TOOLTIP_COOLDOWN_KEY:U.element;K.d.updateInjectedValues(this._spellTooltips[B],{TOOLTIP_SELECTED:!0,TOOLTIP_ELEMENT:G,TOOLTIP_IS_IN_COOLDOWN:0!==k.currentCooldown}),this.tweenTooltipToY(B,F.SPELL_TOOLTIP_ONSCREEN_Y)}this.dismissActionTooltips(B,k)}showHardCurrencyBalanceTooltip(k){const B=this._hardCurrency.petAcquisitionCost(k.id,$.l6.Rescue);if(!j.Aq$.isDefined(B))return;const U=this._hardCurrency.getBalance(B.currency);for(const F of this._battleController.rightTeam.rawUnits)F.creature===k&&F.setRescueCost(!0,B.currency,B.value,U);this._rescueCurrencyBalance.updateCurrencyID(B.currency),this._rescueCurrencyBalance.updateBudgetDifference(B.value-U)}dispatchOnHardCurrencyBalanceTooltipHidden(){this.onHardCurrencyBalanceTooltipHidden.dispatch()}dismissActionTooltips(k,B){for(let U=0;U{if(H){const B=q.percent+.4*Math.sin(q.percent*Math.PI);this._spellTooltips[k].transform.setPositionY(G+B*$)}else this._spellTooltips[k].transform.setPositionY(G+q.percent*$)})),K.onTweenComplete.addOnce((()=>{this._spellTooltips[k].transform.setPositionY(B)}))}processTargetSelected(k){this.onTargetConfirmed.dispatch(this._currentActionData,k)}targetRoulette(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const G=this.battleTargets.filter((B=>!B.isMultiTarget&&!B.isTargetDisabled()&&B.canBeTargetedBySpell(k,U.data.teamId)));if(G.length<=1)return;const j=B.targetComponent;G.forEach((k=>k.updateTargetInteractive(!1)));const $=(F.ROULETTE_SLOW_WAIT_TIME-F.ROULETTE_FAST_WAIT_TIME)/F.ROULETTE_ITERATIONS/(G.length-1);let H=F.ROULETTE_FAST_WAIT_TIME;for(let k=0;k{k.updateTargetInteractive(!1)}))}hideRescueUi(){var k;if(null===(k=this._battleController.rightTeam)||void 0===k?void 0:k.rawUnits)for(const B of this._battleController.rightTeam.rawUnits)B.setNewIndicatorActive(!1),B.setRescueCost(!1),B.setOwnedCount(null);this.setHardCurrencyBalanceDisplay(null)}destroy(){var k;if(this._battleActions)for(const B of this._battleActions)B.onActionSelected.remove(this.processActionSelected,this),B.onActionOnCooldownSelected.remove(this.processActionOnCooldownSelected,this);if(this._battleActions=null,this.battleTargets)for(const B of this.battleTargets)B.onTargetSelected.remove(this.processTargetSelected,this);if(this.battleTargets=null,this._spellTooltipTweens)for(const B of this._spellTooltipTweens)null==B||B.destroy();if(this.hideRescueUi(),null===(k=this._battleController.rightTeam)||void 0===k?void 0:k.rawUnits)for(const B of this._battleController.rightTeam.rawUnits)B.setRescueCost(!1),B.setOwnedCount(null);this._hardCurrency.onBalanceChanged.removeAll(this),this.onActionChange.dispose(),this.onTargetConfirmed.dispose(),this.onHardCurrencyBalanceTooltipHidden.dispose(),this.onRescueCurrencyBalanceShown.dispose(),this.onRescueCurrencyBalanceHidden.dispose(),super.destroy()}};it.SPELL_TOOLTIP_TWEEN_DURATION_OUT_MS=200,it.SPELL_TOOLTIP_TWEEN_DURATION_IN_MS=200,it.SPELL_TOOLTIP_OFFSCREEN_Y=150,it.SPELL_TOOLTIP_ONSCREEN_Y=-5,it.SPELL_TOOLTIP_COOLDOWN_KEY="cooldown",it.POWER_METER_SEGMENTS=10,it.ROULETTE_FAST_WAIT_TIME=75,it.ROULETTE_SLOW_WAIT_TIME=150,it.ROULETTE_FINAL_TARGET_WAIT_TIME=300,it.ROULETTE_ITERATIONS=4,(0,G.Cg)([(0,j.Cdj)("BattleController"),(0,G.Sn)("design:type",Function)],it.prototype,"_battleController",void 0),(0,G.Cg)([(0,j.Cdj)("5c7-e02d"),(0,G.Sn)("design:type",z.W)],it.prototype,"_hardCurrency",void 0),(0,G.Cg)([(0,j.Cdj)("GameDataProvider"),(0,G.Sn)("design:type",X.q)],it.prototype,"_gameDataProvider",void 0),(0,G.Cg)([(0,Q.b)("98d-7b90"),(0,G.Sn)("design:type",et.SpellLevelBonusConstants)],it.prototype,"_spellLevelBonusConstants",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],it.prototype,"_spellTooltipContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],it.prototype,"dismissalOverlayObject",void 0),(0,G.Cg)([(0,j.MnK)(q.n),(0,G.Sn)("design:type",q.n)],it.prototype,"_rescueCurrencyBalance",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],it.prototype,"onTargetConfirmed",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],it.prototype,"onActionChange",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],it.prototype,"onHardCurrencyBalanceTooltipHidden",void 0),it=F=(0,G.Cg)([(0,j.EVk)("BattleTargetController",W.Y.battleRevamp)],it)},35856:(k,B,U)=>{"use strict";U.d(B,{Bp:()=>G,Ri:()=>tt,fO:()=>j});var F,G,j,$=U(8674),H=U(87490),V=U(62459),W=U(68910),q=U(35120),K=U(35084),z=U(29834),Y=U(36045),Q=U(10670),X=U(13302),Z=U(28402),J=U(99979);!function(k){k.Standard="attack-idle",k.Effective="attack-weakness-idle",k.Ineffective="resist-idle",k.Assist="assist-idle",k.AssistSmall="assist-idle-small",k.Rescue="rescue-idle"}(G||(G={})),function(k){k.DownTarget="down-target",k.UpTarget="up-target",k.SelectTarget="select-target"}(j||(j={}));let tt=F=class extends V.uAl{constructor(){super(...arguments),this.isMultiTarget=!1,this.targets=[],this._unitHitboxes=[],this._size=X.X.Normal,this.onTargetSelected=new V.HN0}get singleTarget(){return 1===this.targets.length&&this.targets[0].data?this.targets[0]:null}get teamId(){var k,B;return null===(B=null===(k=this.targets.find((k=>k.data)))||void 0===k?void 0:k.data)||void 0===B?void 0:B.teamId}get size(){return this._size}set size(k){this._size=k;const B=F.TARGET_ELLIPSE_SIZES[k];this._groundTargetTransform.setSizeDelta(B.x,B.y)}postCreate(){super.postCreate(),this.configureTarget()}configureTarget(){this.size=this._size;const k=[...this._unitHitboxes];for(const B of this.targets)if(!B.creature||B.creature.isLoaded){if(B.data){const U=B.hitbox;if(this.isMultiTarget){const k=this.groundTarget.findComponentInChildren(K.n);if(k){k.onHoverEnterInputUp.add((()=>{B.targetComponent.setArrowVisible(!0)}));const U=()=>{B.targetComponent.setArrowVisible(!1)};k.onHoverExitInputUp.add(U),k.onInputUpOutside.add(U)}}else{const k=F.TARGET_INPUT_DATA[this._size];this._inputOverlayTransform.setSizeDelta(k.w,k.h),this._inputOverlayTransform.setPositionY(k.y),this._targetArrow.setPosition(0,U.y+F.ARROW_Y),this._targetArrow.worldPosition={x:this._targetArrow.worldPosition.x,y:Math.max(F.MIN_ARROW_Y,this._targetArrow.worldPosition.y)}}const G=k.pop();G&&(G.GameObject.findComponent(Y.X).Active=!0,G.setPosition(U.x,U.y),G.setSizeDelta(U.w,U.h))}}else B.creature.onLoaded.addOnce((()=>{this.configureTarget()}));for(const B of k)B.GameObject.findComponent(Y.X).Active=!1}sendTargetData(){var k;const B=this.targets[0].data.teamId===this._battleController.leftTeamId?(null===(k=this.singleTarget)||void 0===k?void 0:k.battleId)===this._battleController.activeUnit.battleId?Q.zA.Self:Q.zA.Ally:Q.zA.Enemy;q.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendBattleInterfaceClickedEvent({object_name:"Target",object_type:B}),this.onTargetSelected.dispatch(this)}updateTargetInteractive(k=!1,B=G.Standard,U){if(!this.isMultiTarget&&!this.singleTarget)return;const F=k&&this.canShowTargetUi();if(this._targetArrow.Active=!1,this._targetArrowElement.GameObject.active=!1,this.groundTarget.active=!1,F){this.groundTarget.active=!0;for(const k of this.groundTarget.children)k.active=!0}if(!this.isMultiTarget&&(this._targetArrow.GameObject.findComponent(z.j).playAnimation(B,!0),U&&(B===G.Effective||B===G.Ineffective))){const k=this._targetArrow.GameObject.findComponent(Z.v).getSpine(),B=J.gI.getElementIconTexture(U);if(B){const{width:U,height:F}=this._targetArrowElement.GameObject.transform.sizeDelta;k.pixiSpine.hackTextureBySlotName("targeting-arrow-element",B,new W.Rectangle(0,0,U,F))}}}setArrowVisible(k){const B=k&&this.canShowTargetUi();this._targetArrow.GameObject.active=B,this._targetArrow.GameObject.findComponent(z.j).seekTo(0)}playGroundTargetAnimation(k,B=!1){k===j.SelectTarget&&this._groundTargetSpineAnimator.OnAnimationComplete.addOnce((()=>{this._battleController.getUnits().forEach((k=>{k.targetComponent.groundTarget.active=!1}))})),this._groundTargetSpineAnimator.playAnimation(`${k}${F.TARGET_ANIMATION_SIZE_SUFFIXES[this._size]}`,B)}canShowTargetUi(){var k;return this.isMultiTarget||(null===(k=this.singleTarget)||void 0===k?void 0:k.isAlive())&&this.singleTarget.isTargetable}isTargetDisabled(){var k;return!(null===(k=this.singleTarget)||void 0===k?void 0:k.isTargetable)}canBeTargetedBySpell(k,B){switch(k){case H.ESpellTeamTarget.All:case H.ESpellTeamTarget.Any:return!0;case H.ESpellTeamTarget.Enemy:return B!==this.targets[0].data.teamId;case H.ESpellTeamTarget.Own:return B===this.targets[0].data.teamId}}highlightAndWait(k,B){return(0,$.sH)(this,void 0,void 0,(function*(){this.groundTarget.active=!0,this.setArrowVisible(!0),B&&this.playGroundTargetAnimation(B,!1),yield V.Egh.timeout(k),this.groundTarget.active=!1,this.setArrowVisible(!1)}))}destroy(){this.onTargetSelected.dispose(),super.destroy()}};tt.ARROW_Y=135,tt.MIN_ARROW_Y=210,tt.TARGET_ELLIPSE_SIZES={[X.X.Small]:{x:136,y:48},[X.X.Normal]:{x:260,y:95},[X.X.Medium]:{x:450,y:150},[X.X.Large]:{x:797,y:293},[X.X.Huge]:{x:797,y:293}},tt.TARGET_INPUT_DATA={[X.X.Small]:{x:0,y:32,w:136,h:250},[X.X.Normal]:{x:0,y:50,w:260,h:300},[X.X.Medium]:{x:0,y:75,w:450,h:400},[X.X.Large]:{x:0,y:150,w:800,h:550},[X.X.Huge]:{x:0,y:150,w:800,h:775}},tt.TARGET_ANIMATION_SIZE_SUFFIXES={[X.X.Small]:"-small",[X.X.Normal]:"-single",[X.X.Medium]:"-med",[X.X.Large]:"-aoe",[X.X.Huge]:"-aoe"},(0,$.Cg)([(0,V.vkK)(),(0,$.Sn)("design:type",Boolean)],tt.prototype,"isMultiTarget",void 0),(0,$.Cg)([(0,V.SZi)(),(0,V.MnK)("BattleRevampUnitComponent"),(0,$.Sn)("design:type",Array)],tt.prototype,"targets",void 0),(0,$.Cg)([(0,V.MnK)(V.dLy),(0,$.Sn)("design:type",V.dLy)],tt.prototype,"_targetArrow",void 0),(0,$.Cg)([(0,V.MnK)(V.vYh),(0,$.Sn)("design:type",V.vYh)],tt.prototype,"_targetArrowElement",void 0),(0,$.Cg)([(0,V.ERr)(),(0,$.Sn)("design:type",V._mx)],tt.prototype,"groundTarget",void 0),(0,$.Cg)([(0,V.MnK)(V.XVE),(0,$.Sn)("design:type",V.XVE)],tt.prototype,"_groundTargetTransform",void 0),(0,$.Cg)([(0,V.MnK)(z.j),(0,$.Sn)("design:type",z.j)],tt.prototype,"_groundTargetSpineAnimator",void 0),(0,$.Cg)([(0,V.MnK)(V.XVE),(0,$.Sn)("design:type",V.XVE)],tt.prototype,"_inputOverlayTransform",void 0),(0,$.Cg)([(0,V.SZi)(),(0,V.MnK)(V.XVE),(0,$.Sn)("design:type",Array)],tt.prototype,"_unitHitboxes",void 0),(0,$.Cg)([(0,V.Cdj)("BattleController"),(0,$.Sn)("design:type",Function)],tt.prototype,"_battleController",void 0),(0,$.Cg)([(0,V.gfw)(X.X),(0,$.Sn)("design:type",String),(0,$.Sn)("design:paramtypes",[String])],tt.prototype,"size",null),(0,$.Cg)([(0,V.bbQ)(),(0,$.Sn)("design:type",V.HN0)],tt.prototype,"onTargetSelected",void 0),tt=F=(0,$.Cg)([(0,V.EVk)("BattleTargetData")],tt)},83441:(k,B,U)=>{"use strict";U.d(B,{O:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(29834);let H=class extends G.uAl{get spineAnimator(){return this._spineAnimator}};(0,F.Cg)([(0,G.MnK)($.j),(0,F.Sn)("design:type",$.j)],H.prototype,"_spineAnimator",void 0),H=(0,F.Cg)([(0,G.EVk)("BattleUnitAnimatorRelay",j.Y.battleRevamp)],H)},89584:(k,B,U)=>{"use strict";U.d(B,{h:()=>st});var F,G,j,$,H,V=U(8674),W=U(87490),q=U(62459),K=U(88022),z=U(82351),Y=U(35120),Q=U(28152),X=U(29834),Z=U(53885),J=U(97518),tt=U(99979);!function(k){k.NORMAL_FILL="#FFFFFF",k.NORMAL_STROKE="#363636",k.MISS_FILL="#B2B2B2",k.MISS_STROKE="#363636",k.CRITICAL_FILL="#FFF540",k.CRITICAL_STROKE="#9C341A",k.EFFECTIVE_FILL="#FFF540",k.EFFECTIVE_STROKE="#9C341A",k.INEFFECTIVE_FILL="#A8E9FF",k.INEFFECTIVE_STROKE="#094E86",k.HEAL_FILL="#A0E772",k.HEAL_STROKE="#29484A",k.DODGE_FILL="#B2B2B2",k.DODGE_STROKE="#363636"}(G||(G={})),function(k){k.NORMAL_ANIM="damage-normal",k.MISS_ANIM="effect-miss",k.CRITICAL_ANIM="effect-critical",k.EFFECTIVE_ANIM="effect-powerful",k.INEFFECTIVE_ANIM="effect-resist",k.DODGE_ANIM="dodge"}(j||(j={})),function(k){k.INDICATOR_SLOT="indicator",k.DAMAGE_SLOT="damage",k.BACKING_SLOT="backing"}($||($={})),function(k){k.MISS_TEXT="BATTLE_REVAMP_TEXT_MISS",k.CRITICAL_TEXT="BATTLE_REVAMP_TEXT_CRITICAL",k.EFFECTIVE_TEXT="BATTLE_REVAMP_TEXT_EFFECTIVE",k.INEFFECTIVE_TEXT="BATTLE_REVAMP_TEXT_INEFFECTIVE",k.FUMBLE_TEXT="BATTLE_REVAMP_TEXT_FUMBLE",k.REFLECT_TEXT="BATTLE_REVAMP_TEXT_REFLECT",k.ABSORB_TEXT="BATTLE_REVAMP_TEXT_ABSORB",k.DODGE_TEXT="BATTLE_REVAMP_TEXT_DODGE"}(H||(H={}));const et={[W.EDamageInformation.Effective]:"spell-hit-powerful",[W.EDamageInformation.Ineffective]:"spell-hit-resist"},it={[W.EDamageInformation.Effective]:2,[W.EDamageInformation.Ineffective]:0};let st=F=class extends q.uAl{constructor(){super(...arguments),this._onAnimationComplete=new q.HN0,this._animationName=j.NORMAL_ANIM}postCreate(){super.postCreate(),this.GameObject.active=!1;const k=this._spineComponent.getSlot($.DAMAGE_SLOT),B=this._spineComponent.getSpine().getSlotContainer(k);this._damageText.GameObject.transform.setScale(1,-1),this._criticalObj.transform.setScale(1,-1),this._criticalHitBacking.transform.setScale(1,-1),this._criticalHitBackingLarge.transform.setScale(1,-1),B.addChild(this._groupRelayNumber.getRootContainer());const U=this._spineComponent.getSlot($.INDICATOR_SLOT),F=this._spineComponent.getSpine().getSlotContainer(U);this._indicatorSettings.GameObject.transform.setScale(1,-1),F.addChild(this._groupRelayIndicator.getRootContainer()),this._elementalDisplay.active=!1,this._groupRelayNumber.GameObject.active=!1,this._groupRelayIndicator.GameObject.active=!1}setupAndDisplay(k,B,U,$,V,K={}){var z,Y,Q,X;const{onlyShowDamageNumber:Z,onlyShowIndicator:J,deemphasizeIndicator:tt,suppressSfx:et}=K;this._transform.setPosition(k,B),this._damageText.text=Math.abs(U.damage).toString(),et||(Z?this.playHitInfoSfx(U):this._spineAnimator.spine.onEvent.addOnce((()=>this.playHitInfoSfx(U)),this)),q.OQO.areBitsSet(U.damageInformation,W.EDamageInformation.Reflected)?(this._animationName=j.EFFECTIVE_ANIM,this._indicatorText.setLocalizationKey(H.REFLECT_TEXT),this.setTextColor(G.INEFFECTIVE_FILL,G.INEFFECTIVE_STROKE),this._damageText.GameObject.active=!1):q.OQO.areBitsSet(U.damageInformation,W.EDamageInformation.Missed)?(this.setTextColor(G.MISS_FILL,G.MISS_STROKE),this._animationName=j.MISS_ANIM,this._indicatorText.setLocalizationKey(null!==(z=U.textKey)&&void 0!==z?z:H.MISS_TEXT),this._damageText.GameObject.active=!1):q.OQO.areBitsSet(U.damageInformation,W.EDamageInformation.Absorb)?(this._animationName=j.INEFFECTIVE_ANIM,this._indicatorText.setLocalizationKey(H.ABSORB_TEXT),this.setTextColor(G.HEAL_FILL,G.HEAL_STROKE)):q.OQO.areBitsSet(U.damageInformation,W.EDamageInformation.Heal)?(this.setTextColor(G.HEAL_FILL,G.HEAL_STROKE),this._animationName=j.NORMAL_ANIM,this._indicatorSettings.GameObject.parent.active=!1):q.OQO.areBitsSet(U.damageInformation,W.EDamageInformation.CriticalHit)?(this.setTextColor(G.CRITICAL_FILL,G.CRITICAL_STROKE),this._animationName=j.CRITICAL_ANIM,this._indicatorSettings.GameObject.active=!1,this._criticalObj.active=!0,this._damageText.text.length<3?this._criticalHitBacking.active=!0:this._criticalHitBackingLarge.active=!0):q.OQO.areBitsSet(U.damageInformation,W.EDamageInformation.Dodge)?(this.setTextColor(G.DODGE_FILL,G.DODGE_STROKE),Z?this._animationName=j.INEFFECTIVE_ANIM:(this._transform.setPositionY(B+F.DODGE_ANIMATION_OFFSET_Y),this._animationName=j.DODGE_ANIM,this._indicatorText.setLocalizationKey(H.DODGE_TEXT),this._indicatorText.localizedText.fontSize=F.DODGE_TEXT_SIZE,this._indicatorText.GameObject.transform.setPositionY(this._indicatorText.GameObject.transform.localPosition.y+F.DODGE_INDICATOR_TEXT_OFFSET_Y))):q.OQO.areBitsSet(U.damageInformation,W.EDamageInformation.Effective)?(this.showElementalDisplay(U,$),this._indicatorText.setLocalizationKey(null!==(Y=U.textKey)&&void 0!==Y?Y:H.EFFECTIVE_TEXT),this.setTextColor(G.EFFECTIVE_FILL,G.EFFECTIVE_STROKE),this._animationName=j.EFFECTIVE_ANIM):q.OQO.areBitsSet(U.damageInformation,W.EDamageInformation.Ineffective)?(this.showElementalDisplay(U,$),this._indicatorText.setLocalizationKey(null!==(Q=U.textKey)&&void 0!==Q?Q:H.INEFFECTIVE_TEXT),this.setTextColor(G.INEFFECTIVE_FILL,G.INEFFECTIVE_STROKE),this._animationName=j.INEFFECTIVE_ANIM):q.OQO.areBitsSet(U.damageInformation,W.EDamageInformation.Fumble)?(this._transform.setPositionY(B+F.FUMBLE_TEXT_OFFSET_Y),this.setTextColor(G.INEFFECTIVE_FILL,G.INEFFECTIVE_STROKE),this._animationName=j.INEFFECTIVE_ANIM,this._indicatorText.setLocalizationKey(null!==(X=U.textKey)&&void 0!==X?X:H.FUMBLE_TEXT),this._damageText.GameObject.active=!1):(this.setTextColor(G.NORMAL_FILL,G.NORMAL_STROKE),this._animationName=j.NORMAL_ANIM,this._indicatorSettings.GameObject.parent.active=!1),Z&&(this._indicatorText.GameObject.active=!1,this._criticalObj.active=!1,this._elementalDisplay.active=!1),J&&(this._damageText.GameObject.active=!1,this._criticalHitBacking.active=!1,this._criticalHitBackingLarge.active=!1),tt&&(this._indicatorText.localizedText.fontSize=20),this._spineAnimator.OnAnimationComplete.addOnce((()=>{this._spineAnimator.spine.onEvent.removeAll(this),null==V||V(),this._onAnimationComplete.dispatch()})),this.GameObject.active=!0,this.playAnim(),this._groupRelayIndicator.GameObject.active=!0,this._groupRelayNumber.GameObject.active=!0}setTextColor(k,B){this._damageText.fill=k,this._damageText.stroke=B,this._indicatorSettings.fill=k,this._indicatorSettings.stroke=B}playAnim(){this._spineAnimator.playAnimation(this._animationName,!1)}destroy(){this._onAnimationComplete.dispose(),super.destroy()}playHitInfoSfx(k){let B;if(q.OQO.areBitsSet(k.damageInformation,W.EDamageInformation.Reflected))B=z.B.Sfx_resist_hit;else{if(q.OQO.areBitsSet(k.damageInformation,W.EDamageInformation.Absorb))return;q.OQO.areBitsSet(k.damageInformation,W.EDamageInformation.CriticalHit)?B=z.B.Sfx_critial_hit:q.OQO.areBitsSet(k.damageInformation,W.EDamageInformation.Dodge)?B=z.B.Sfx_Dodge:q.OQO.areBitsSet(k.damageInformation,W.EDamageInformation.Effective)?B=z.B.Sfx_powerful_hit:q.OQO.areBitsSet(k.damageInformation,W.EDamageInformation.Ineffective)&&(B=z.B.Sfx_resist_hit)}B&&Y.q.instance.prodigy.audio.playSFXFromGUID(B)}showElementalDisplay(k,B){if(!B)return;this._elementalDisplay.active=!0;const U=tt.gI.getElementIconTexture(B);let F;this._elementalIcon.setTexture(U);const G=this._elementalIcon.GameObject.transform.localPosition.y;q.OQO.areBitsSet(k.damageInformation,W.EDamageInformation.Effective)?(F=et[W.EDamageInformation.Effective],this._elementalIcon.GameObject.transform.setPositionY(G+it[W.EDamageInformation.Effective])):q.OQO.areBitsSet(k.damageInformation,W.EDamageInformation.Ineffective)&&(F=et[W.EDamageInformation.Ineffective],this._elementalIcon.GameObject.transform.setPositionY(G+it[W.EDamageInformation.Ineffective]));const j=Y.q.instance.prodigy.game.cache.getTexture(K._.Ui_battle_revamp_json,F);this._damageEffectShield.setTexture(j),this._damageEffectShield.GameObject.transform.setSizeDelta(j.width,j.height)}};st.FUMBLE_TEXT_OFFSET_Y=50,st.DODGE_ANIMATION_OFFSET_Y=-90,st.DODGE_INDICATOR_TEXT_OFFSET_Y=-8,st.DODGE_TEXT_SIZE=28,(0,V.Cg)([(0,q.MnK)(q.XVE),(0,V.Sn)("design:type",q.XVE)],st.prototype,"_transform",void 0),(0,V.Cg)([(0,q.MnK)(q.v2j),(0,V.Sn)("design:type",q.v2j)],st.prototype,"_spineComponent",void 0),(0,V.Cg)([(0,q.MnK)(X.j),(0,V.Sn)("design:type",X.j)],st.prototype,"_spineAnimator",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],st.prototype,"_criticalHitBacking",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],st.prototype,"_criticalHitBackingLarge",void 0),(0,V.Cg)([(0,q.MnK)(q.EYj),(0,V.Sn)("design:type",q.EYj)],st.prototype,"_damageText",void 0),(0,V.Cg)([(0,q.MnK)(q.EYj),(0,V.Sn)("design:type",q.EYj)],st.prototype,"_indicatorSettings",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],st.prototype,"_criticalObj",void 0),(0,V.Cg)([(0,q.MnK)(J.R),(0,V.Sn)("design:type",J.R)],st.prototype,"_indicatorText",void 0),(0,V.Cg)([(0,q.MnK)(Z.u),(0,V.Sn)("design:type",Z.u)],st.prototype,"_groupRelayNumber",void 0),(0,V.Cg)([(0,q.MnK)(Z.u),(0,V.Sn)("design:type",Z.u)],st.prototype,"_groupRelayIndicator",void 0),(0,V.Cg)([(0,q.ERr)(),(0,V.Sn)("design:type",q._mx)],st.prototype,"_elementalDisplay",void 0),(0,V.Cg)([(0,q.MnK)(q.vYh),(0,V.Sn)("design:type",q.vYh)],st.prototype,"_damageEffectShield",void 0),(0,V.Cg)([(0,q.MnK)(q.vYh),(0,V.Sn)("design:type",q.vYh)],st.prototype,"_elementalIcon",void 0),(0,V.Cg)([(0,q.bbQ)(),(0,V.Sn)("design:type",q.HN0)],st.prototype,"_onAnimationComplete",void 0),st=F=(0,V.Cg)([(0,q.EVk)("HitInfoController",Q.Y.battleRevamp)],st)},29143:(k,B,U)=>{"use strict";U.d(B,{e:()=>V});var F,G=U(8674),j=U(62459),$=U(28152),H=U(29834);let V=F=class extends j.uAl{constructor(){super(...arguments),this.mpAnimators=[],this._mpFxAnimators=[]}init(k){this._maxMp=k.max,this._currentMp=k.current,this._middlePoint=Math.round((k.max-1)/2),this.initEmptyMp(),this.updateIndicator(!0)}updateMp(k){this._currentMp=k,this.updateIndicator()}refillMp(){this.activateFx(),this._currentMp=this._maxMp,this._emptyMp.active=!1,this._mpFxAnimators.forEach(((k,B)=>{B{B===this._middlePoint?k.playAnimation("teal_pulse-overlay",!1,!0):k.GameObject.active=!1})),yield this._mpFxAnimators[this._middlePoint].OnAnimationComplete.asPromise(),j.Egh.timeout(F.ALERT_TIMER_MS)}))}alertMpEmptyAnimExtreme(){return(0,G.sH)(this,void 0,void 0,(function*(){this.activateFx();for(let k=0;k{U{B{this.updateIndicator()}),this),k.playAnimation("fx-full",!1))}))}updateIndicator(k=!1,B=0){const U=this._maxMp-this._currentMp;this.mpAnimators.forEach(((F,G)=>{G{k.active=B{"use strict";U.d(B,{Z:()=>q});var F=U(8674),G=U(62459),j=U(68910),$=U(17446),H=U(28152),V=U(29834);const W={[$.E.Uncommon]:"uncommon",[$.E.Rare]:"rare",[$.E.Heroic]:"heroic",[$.E.Legendary]:"legendary"};let q=class extends G.uAl{showRarity(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=W[k],U=G.Aq$.isDefined(B);if(this.GameObject.active=U,U){this._animator.playAnimation(B,!1,!0);const U=this.getRarityTextComponent(k);U&&(U.GameObject.active=!0,this.attachRarityTextToSlot(U)),yield this._animator.OnAnimationComplete.asPromise(),U&&(U.GameObject.active=!1)}}))}getRarityTextComponent(k){switch(k){case $.E.Uncommon:return this._uncommonText;case $.E.Rare:return this._rareText;case $.E.Heroic:return this._heroicText;case $.E.Legendary:return this._legendaryText;default:return null}}attachRarityTextToSlot(k){const B=k.getRootContainer(),U=this._animator.spine,F=U.getSlot("text"),G=U.getSpine().getSlotContainer(F);G.removeChildren();const $=G.addChild(new j.Container);$.scale.y=-1,$.addChild(B),$.position.set(.5*-B.width,.5*B.height)}};(0,F.Cg)([(0,G.MnK)(V.j),(0,F.Sn)("design:type",V.j)],q.prototype,"_animator",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],q.prototype,"_uncommonText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],q.prototype,"_rareText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],q.prototype,"_heroicText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],q.prototype,"_legendaryText",void 0),q=(0,F.Cg)([(0,G.EVk)("Rarity",H.Y.battleRevamp)],q)},72748:(k,B,U)=>{"use strict";U.d(B,{N:()=>H});var F=U(8674),G=U(62459),j=U(28829),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._unitsToHighlight=[]}destroy(){this._unitsToHighlight=[],super.destroy()}startSequence(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){0!==k.length&&(this._unitsToHighlight=k,this._overlay.setFocusLayer("overlay-top"),this.GameObject.active=!0,this.registerUnitsToFocus(),yield this._overlay.showOverlay(),this.showRescueAvailableLogMessage(B),yield this._overlay.playGlowAnimations(),yield this._overlay.hideOverlay(),B.GameObject.setLayer("overlay",!0),this.GameObject.active=!1)}))}showRescueAvailableLogMessage(k){k.GameObject.setLayer("overlay-top",!0),k.showMessage("BATTLE_REVAMP_RESCUE_AVAILABLE")}registerUnitsToFocus(){this._unitsToHighlight.forEach((k=>{var B,U,F;const j=k.creature.creatureGameObject,$=k.uiContent,H=null!==(F=null===(U=null===(B=k.petRescueTooltip)||void 0===B?void 0:B.findComponentInChildren(G.jsv))||void 0===U?void 0:U.GameObject)&&void 0!==F?F:null;this._overlay.addFocusableGameObject(j,void 0,!0,{applyGlow:!0}),this._overlay.addFocusableGameObject($,void 0,!0),H&&this._overlay.addFocusableGameObject(H)}))}};(0,F.Cg)([(0,G.MnK)(j.q),(0,F.Sn)("design:type",j.q)],H.prototype,"_overlay",void 0),H=(0,F.Cg)([(0,G.EVk)("RescueAvailableSequence",$.Y.battleRevamp)],H)},18278:(k,B,U)=>{"use strict";U.d(B,{b:()=>K});var F,G=U(8674),j=U(62459),$=U(35120),H=U(28152),V=U(90614),W=U(90351),q=U(15160);let K=F=class extends j.uAl{constructor(){super(...arguments),this.onUiReady=new j.HN0,this._initialCardXPositions=[]}destroy(){this.onUiReady.dispose(),this._tween&&(this._tween.stop().destroy(),this._tween=null),super.destroy()}tweenSpellCards(k,B=!0){k&&(this._spellCardsContainer.active=!0),this.inputBlocker.active=!0,this._spellCards||(this._spellCards=this._spellCardsContainer.children.slice(0,-1),this._spellCards.forEach(((k,B)=>{this._initialCardXPositions.push(this._spellCardsGrid.getLayoutPositionX(B))})));const U=this._spellCards.filter((k=>k.active));if(U.forEach(((B,U)=>{k?B.transform.setPositionX(0):B.transform.setPositionX(this._initialCardXPositions[U])})),0===U.length)return;const G=k?this._initialCardXPositions[U.length-1]:0,j=U.pop(),H={x:j.transform.localPosition.x};this._tween=$.q.instance.game.add.tween(H,this).to({x:G},this.getSlideDuration(U.length),W.K.getEasingFunctionFromEnum(W.i.ExponentialOut),!0,F.SPELL_CARD_SLIDE_DELAY_MS),this._tween.onUpdate.add((()=>{j.transform.setPositionX(H.x),U.forEach(((B,U)=>{k?0===B.transform.localPosition.x&&j.transform.localPosition.x>=this._initialCardXPositions[U]&&B.transform.setPositionX(this._initialCardXPositions[U]):B.active&&j.transform.localPosition.x<=this._initialCardXPositions[U]&&(B.active=!1)}))})),this._tween.onTweenComplete.addOnce((()=>{this._spellCardsGrid.updateAll(),$.q.instance.game.tweens.remove(this._tween),this._tween=null,k||this._spellCards.forEach((k=>{k.active=!1})),B&&(this.inputBlocker.active=!1),this.onUiReady.dispatch(k,!0)}))}getSpellCardAtIndex(k){var B,U,F;return this._spellCardsContainer?(null===(B=this._spellCardsContainer.children)||void 0===B?void 0:B[k])||j.VyI.log(`Spell card is undefined at index: ${k}`,j.$bb.Warning):j.VyI.log("Spell card container is undefined",j.$bb.Warning),null===(F=null===(U=this._spellCardsContainer)||void 0===U?void 0:U.children)||void 0===F?void 0:F[k]}getSpellCards(){var k;return this._spellCardsContainer||j.VyI.log("Spell card container is undefined",j.$bb.Warning),null===(k=this._spellCardsContainer)||void 0===k?void 0:k.children}hideSpellCards(){this._spellCardsContainer.active=!1,this.targetController.hideTargets()}getSlideDuration(k){switch(k){case 1:return 400;case 2:return 500;case 3:return 600;case 4:default:return 700}}hidePetRescue(){var k;(null===(k=this._petRescueTween.GameObject)||void 0===k?void 0:k.active)&&(this.inputBlocker.active=!0,this._petRescueTween.startTween())}};K.SPELL_CARD_SLIDE_DELAY_MS=100,(0,G.Cg)([(0,j.Cdj)("BattleController"),(0,G.Sn)("design:type",Function)],K.prototype,"controller",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],K.prototype,"_spellCardsContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],K.prototype,"inputBlocker",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],K.prototype,"petRescueCard",void 0),(0,G.Cg)([(0,j.MnK)(j.JTA),(0,G.Sn)("design:type",j.JTA)],K.prototype,"_spellCardsGrid",void 0),(0,G.Cg)([(0,j.MnK)(V.P),(0,G.Sn)("design:type",V.P)],K.prototype,"_petRescueTween",void 0),(0,G.Cg)([(0,j.MnK)(q.F),(0,G.Sn)("design:type",q.F)],K.prototype,"targetController",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],K.prototype,"onUiReady",void 0),K=F=(0,G.Cg)([(0,j.EVk)("SpellCardsController",H.Y.battleRevamp)],K)},88331:(k,B,U)=>{"use strict";U.d(B,{m:()=>V});var F=U(8674),G=U(62459),j=U(95891),$=U(28152),H=U(66840);let V=class extends G.uAl{create(){super.create(),this.updateDisplayedEffects([])}updateDisplayedEffects(k,B){var U;const F=(null!==(U=this._gridLayout.GameObject.children)&&void 0!==U?U:[]).map((k=>k.findComponent(H.D))).filter((k=>!!k));this._overflowIndicator.active=k.length>F.length,F.forEach((k=>{k.GameObject.active=!1}));(0,j.clone)(k).sort(((B,U)=>k.indexOf(U)-k.indexOf(B))).forEach(((k,U)=>{if(U{"use strict";U.d(B,{K:()=>X,W:()=>F});var F,G=U(8674),j=U(62459),$=U(68910),H=U(35120),V=U(28152),W=U(29834),q=U(70703),K=U(97518),z=U(33744),Y=U(46459),Q=U(28829);!function(k){k.Click="click",k.StraightIdle="straight-idle"}(F||(F={}));let X=class extends j.uAl{constructor(){super(...arguments),this.onDialogueDisplayComplete=new j.HN0}setDialogueTextKey(k,...B){this._nootDialogueLocalizationKey.localizationKey=k,this._nootDialogueLocalizationKey.setTextArguments(...B)}playNootWidgetIn(k=!0,B){k&&this._nootWidgetInAnimation.onComplete.addOnce((()=>{this.playFadeInDialogue(B)})),this._nootWidgetInAnimation.startTween()}playNootWidgetOut(){this._nootWidgetOutAnimation.startTween()}updateDialogue(k,B){this._panelOutAnimation.onComplete.addOnce((()=>{this.setDialogueTextKey(k),this.playFadeInDialogue(B)})),this.playFadeOutDialogue()}playFadeInDialogue(k){this._panelInAnimation.onComplete.addOnce((()=>{j.Aq$.isDefined(k)&&H.q.instance.prodigy.audio.playVoice(k,null),this.onDialogueDisplayComplete.dispatch()})),this._textInAnimation.startTween(),this._panelInAnimation.startTween()}playFadeOutDialogue(){this._textOutAnimation.startTween(),this._panelOutAnimation.startTween()}enableGuideHand(k=!0,B=F.Click,U=new $.Point(0,0),G=0){if(this.guideHandAnimator.GameObject.active=k,k){this.guideHandAnimator.playAnimation(B,!0,!0);const k=this.guideHandAnimator.GameObject.findComponentInChildren(j.XVE);k.worldPosition=U,k.setRotation(G)}else this.guideHandAnimator.stopAnimation()}setGuideHandLayer(k){const B=this.guideHandAnimator.GameObject.layer;return this.guideHandAnimator.GameObject.setLayer(k,!0),B}destroy(){this.onDialogueDisplayComplete.dispose(),super.destroy()}};(0,G.Cg)([(0,j.MnK)(z.N),(0,G.Sn)("design:type",z.N)],X.prototype,"overlayInputBlocker",void 0),(0,G.Cg)([(0,j.MnK)(K.R),(0,G.Sn)("design:type",K.R)],X.prototype,"_nootDialogueLocalizationKey",void 0),(0,G.Cg)([(0,j.MnK)(Y._),(0,G.Sn)("design:type",Y._)],X.prototype,"_nootWidgetInAnimation",void 0),(0,G.Cg)([(0,j.MnK)(Y._),(0,G.Sn)("design:type",Y._)],X.prototype,"_nootWidgetOutAnimation",void 0),(0,G.Cg)([(0,j.MnK)(q.x),(0,G.Sn)("design:type",q.x)],X.prototype,"_textInAnimation",void 0),(0,G.Cg)([(0,j.MnK)(q.x),(0,G.Sn)("design:type",q.x)],X.prototype,"_textOutAnimation",void 0),(0,G.Cg)([(0,j.MnK)(q.x),(0,G.Sn)("design:type",q.x)],X.prototype,"_panelInAnimation",void 0),(0,G.Cg)([(0,j.MnK)(q.x),(0,G.Sn)("design:type",q.x)],X.prototype,"_panelOutAnimation",void 0),(0,G.Cg)([(0,j.MnK)(W.j),(0,G.Sn)("design:type",W.j)],X.prototype,"guideHandAnimator",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],X.prototype,"dismissalOverlay",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],X.prototype,"onDialogueDisplayComplete",void 0),(0,G.Cg)([(0,j.MnK)(Q.q),(0,G.Sn)("design:type",Q.q)],X.prototype,"focusOverlay",void 0),X=(0,G.Cg)([(0,j.EVk)("TutorialController",V.Y.battleRevamp)],X)},99057:(k,B,U)=>{"use strict";U.d(B,{M:()=>V});var F,G=U(8674),j=U(62459),$=U(28152),H=U(29834);!function(k){k.InBattle="pulse",k.Unlock="idle",k.EndBattle="FULL"}(F||(F={}));let V=class extends j.uAl{init(k,B){this.GameObject.active=!0,this._friendshipLevel=k,this._heartAnimator.playAnimation(this.getAnimationName(F.InBattle),!0),this._name.text=B}battleWin(){return(0,G.sH)(this,void 0,void 0,(function*(){return this._heartAnimator.playAnimation(this.getAnimationName(F.Unlock),!1),yield this._heartAnimator.OnAnimationComplete.asPromise(),this._heartAnimator.playAnimation(this.getAnimationName(F.EndBattle),!0),j.Egh.timeout(200)}))}getAnimationName(k){return`Heart-${this._friendshipLevel}-${k}`}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],V.prototype,"_name",void 0),(0,G.Cg)([(0,j.MnK)(H.j),(0,G.Sn)("design:type",H.j)],V.prototype,"_heartAnimator",void 0),V=(0,G.Cg)([(0,j.EVk)("UltimatesUI",$.Y.battleRevamp)],V)},19176:(k,B,U)=>{"use strict";U.d(B,{$:()=>X});var F=U(8674),G=U(87490),j=U(62459),$=U(62248),H=U(88022),V=U(28628),W=U(35120),q=U(28152),K=U(66998),z=U(80060),Y=U(75935),Q=U(47215);let X=class extends j.uAl{constructor(){super(...arguments),this.onPetRescueButtonClicked=new j.HN0,this.onTooltipClosed=new j.HN0,this._unit=null}showTooltipForUnit(k){if(!k||this._unit)return void this.hideTooltip();this._unit=k,this._unitOriginalCreatureLayer=this._unit.creature.creatureGameObject.layer,this._headerModule.active=!0,this._background.active=!0;if(this._headerModule.findComponent(Q.u).setUnitInfo(this._unit),this._rescueModule.active=this._unit.isInARescuableState(),this._background.setLayer("unit-tooltip-input-bottom",!0),this._unit.updateLayerByName("unit-tooltip-input-bottom"),this._statusEffectsModule.active=this._unit.statusEffects.length>0,this._statusEffectsModule.active){this._statusEffectsModule.findComponent(Y.k).displayEffects(this._unit.statusEffects,this._unit.data)}const B=this._unit.data.teamId===G.ETeamId.Home?230:-230;this._tooltipObject.transform.worldPosition={x:this._unit.hpBar.GameObject.transform.worldPosition.x+B,y:this._unit.GameObject.transform.worldPosition.y},this.updateActiveTooltip(),this._inOutAnimation.runInTween(),this.ensureOnScreen()}updateActiveTooltip(){this._unit&&(this.updateInjectedValues(),this._unit.unitTooltipIsShowing=!0)}updateInjectedValues(){var k,B,U,F,G,j,q,K;const Y=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player,Q=Y.kennel.getPets().filter((k=>{var B;return k.ID===(null===(B=this._unit)||void 0===B?void 0:B.creature.id)})).length,X=W.q.instance.prodigy.gameContainer.get("5c7-e02d"),Z=(null===(k=this._unit)||void 0===k?void 0:k.type)===V.uj.Pet?X.petAcquisitionCost(null===(B=this._unit)||void 0===B?void 0:B.creature.id,$.l6.Rescue):void 0,J=!(null==Z?void 0:Z.value)||0===Z.value;let tt="";(null===(U=this._unit)||void 0===U?void 0:U.isInARescuableState())&&(tt=J?this._baseLocalizer.getText("ITEMCARD_FREE"):null===(F=null==Z?void 0:Z.value)||void 0===F?void 0:F.toString());const et=X.isHardCurrencyMemberLocked(null==Z?void 0:Z.value),it=J||X.canAfford(Z),st=Y.canPurchaseMembershipInGame(),nt=!it&&st||!J&&et;z.d.updateInjectedValues(this._tooltipObject,{PET_RESCUE_OWNED_COUNT:Q,UNIT_TOOLTIP_NAME:null!==(j=null===(G=this._unit)||void 0===G?void 0:G.data.nickname)&&void 0!==j?j:null===(q=this._unit)||void 0===q?void 0:q.name,UNIT_TOOLTIP_RESCUE_COST:nt?"":tt,UNIT_TOOLTIP_RESCUE_SHOW_MC:!nt&&!J,UNIT_TOOLTIP_RESCUE_SHOW_MEMBER:nt,UNIT_TOOLTIP_AFFINITY:[H._.Ui_battle_revamp_json,`icon-mini-element-${null===(K=this._unit)||void 0===K?void 0:K.data.element}`]})}dispatchPetRescueButtonClicked(){var k;(null===(k=this._unit)||void 0===k?void 0:k.isInARescuableState())&&this.onPetRescueButtonClicked.dispatch(this._unit)}hideTooltip(){this._unit&&(this._unit.updateLayerByName(this._unitOriginalCreatureLayer),this._unit.unitTooltipIsShowing=!1,this._unit.updatePetRescueTooltip(),this._inOutAnimation.runOutTween(),this.onTooltipClosed.dispatch(),this.onPetRescueButtonClicked.dispose()),this._unit=null}moveOffScreen(){this._tooltipObject.transform.worldPosition={x:-1e3,y:-1e3}}destroy(){this.onPetRescueButtonClicked.dispose(),this.onTooltipClosed.dispatch(),this.onTooltipClosed.dispose(),super.destroy()}ensureOnScreen(){if(!this._unit)return;const k=this._tooltipObject.transform,B=W.q.instance.prodigy.game.height,U=this._tooltipObject.findComponent(j.hQi);U.onResizeComplete.addOnce((()=>{const U=this._tooltipObject.findComponent(j.jsv),F=U.getRootContainer().getBounds().top,G=U.getRootContainer().getBounds().bottom;if(F<0)k.worldPosition={x:k.worldPosition.x,y:k.worldPosition.y-F};else if(G>B){const U=G-B;k.worldPosition={x:k.worldPosition.x,y:k.worldPosition.y-U}}})),U.sizeToChildren()}};(0,F.Cg)([(0,j.ERr)(),(0,F.Sn)("design:type",j._mx)],X.prototype,"_tooltipObject",void 0),(0,F.Cg)([(0,j.ERr)(),(0,F.Sn)("design:type",j._mx)],X.prototype,"_background",void 0),(0,F.Cg)([(0,j.ERr)(),(0,F.Sn)("design:type",j._mx)],X.prototype,"_headerModule",void 0),(0,F.Cg)([(0,j.ERr)(),(0,F.Sn)("design:type",j._mx)],X.prototype,"_statusEffectsModule",void 0),(0,F.Cg)([(0,j.ERr)(),(0,F.Sn)("design:type",j._mx)],X.prototype,"_rescueModule",void 0),(0,F.Cg)([(0,j.MnK)(K.s),(0,F.Sn)("design:type",K.s)],X.prototype,"_inOutAnimation",void 0),(0,F.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,F.Sn)("design:type",j.dTp)],X.prototype,"_baseLocalizer",void 0),X=(0,F.Cg)([(0,j.EVk)("UnitInfoTooltip",q.Y.battleRevamp)],X)},47215:(k,B,U)=>{"use strict";U.d(B,{u:()=>q});var F=U(8674),G=U(62459),j=U(88022),$=U(17446),H=U(35120),V=U(28152),W=U(80060);let q=class extends G.uAl{constructor(){super(...arguments),this._commonRarityGameObjects=[],this._uncommonRarityGameObjects=[],this._rareRarityGameObjects=[],this._heroicRarityGameObjects=[],this._legendaryRarityGameObjects=[],this._unit=null}setUnitInfo(k){var B;this._unit&&(this._unit.unitTooltipIsShowing=!1,this._unit.updatePetRescueTooltip()),this._unit=k,this.updateActiveTooltip(),this.updateRarityDisplay(null===(B=this._unit)||void 0===B?void 0:B.data.rarity),this.updateRectTransform()}getActiveTransform(){const k=this._elementName.active?this._elementName:this._elementNameRarity.active?this._elementNameRarity:this._elementNameRarityOwned.active?this._elementNameRarityOwned:void 0;return null==k?void 0:k.transform}updateRectTransform(){if(!this._unit)return;const k=this.getActiveTransform();if(k){const B=this.GameObject.transform;B&&B.setSizeDelta(k.sizeDelta.width,k.sizeDelta.height)}}updateRarityDisplay(k){G.Aq$.isDefined(k)&&(this._commonRarityGameObjects.forEach((B=>B.active=k===$.E.Common)),this._uncommonRarityGameObjects.forEach((B=>B.active=k===$.E.Uncommon)),this._rareRarityGameObjects.forEach((B=>B.active=k===$.E.Rare)),this._heroicRarityGameObjects.forEach((B=>B.active=k===$.E.Heroic)),this._legendaryRarityGameObjects.forEach((B=>B.active=k===$.E.Legendary)))}updateActiveTooltip(){if(!this._unit)return;const k=this._unit.isARescuableUnit(),B=G.Aq$.isDefined(this._unit.data.rarity);this._elementName.active=!k&&!B,this._elementNameRarity.active=!k&&B,this._elementNameRarityOwned.active=k&&B,this.updateInjectedValues(),this._unit.unitTooltipIsShowing=!0}updateInjectedValues(){var k,B,U,F;const G=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPets().filter((k=>{var B;return k.ID===(null===(B=this._unit)||void 0===B?void 0:B.creature.id)})).length;W.d.updateInjectedValues(this.gameObject,{PET_RESCUE_OWNED_COUNT:G,UNIT_TOOLTIP_NAME:null!==(B=null===(k=this._unit)||void 0===k?void 0:k.data.nickname)&&void 0!==B?B:null===(U=this._unit)||void 0===U?void 0:U.name,UNIT_TOOLTIP_AFFINITY:[j._.Ui_battle_revamp_json,`icon-mini-element-${null===(F=this._unit)||void 0===F?void 0:F.data.element}`]})}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],q.prototype,"_elementName",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],q.prototype,"_elementNameRarity",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],q.prototype,"_elementNameRarityOwned",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],q.prototype,"_commonRarityGameObjects",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],q.prototype,"_uncommonRarityGameObjects",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],q.prototype,"_rareRarityGameObjects",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],q.prototype,"_heroicRarityGameObjects",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],q.prototype,"_legendaryRarityGameObjects",void 0),q=(0,F.Cg)([(0,G.EVk)("UnitInfoTooltipHeader",V.Y.battleRevamp)],q)},91631:(k,B,U)=>{"use strict";U.d(B,{W:()=>$});var F=U(62459),G=U(35120),j=U(88022);class $ extends F.mcf{constructor(k,B=0,U=0,F=1,H=1){super();const V=G.q.instance.prodigy.create;this._barrierSprite=V.sprite(0,0,j._.Boss_titan_barrier_json,"1",{x:.5,y:.5},(k=>this.addBarrierSpritesheet("deflect",[1,2,3,4,5,6,7,8,9,10],k))),this._breakSprite=V.sprite(0,0,j._.Boss_titan_barrier_break_json,"1",{x:.5,y:.5},(k=>this.addBarrierSpritesheet("break",[1,2,3,4,5,6,7,8,9,10],k))),this._sparkSprite=V.sprite($.SPARK_POSITION.x,$.SPARK_POSITION.y,j._.Boss_titan_spark_json,"1",{x:.5,y:.5},(k=>this.addBarrierSpritesheet("spark",[1,2,3],k))),this.addChild(this._barrierSprite,this._breakSprite,this._sparkSprite),this.position.set(B,U),this.scale.set(F,H),k.addChild(this)}addBarrierSpritesheet(k,B,U){U.alpha=0,U.name=k,U.smoothed=!1;U.animations.add(k,B,10,!1).onComplete.add((()=>{U.alpha=0}),U)}playHitAnimation(){this._barrierSprite.animations.stop(),this._sparkSprite.animations.stop(),this._barrierSprite.alpha=1,this._sparkSprite.alpha=1,this._barrierSprite.animations.play("deflect",10),this._sparkSprite.animations.play("spark",10)}playBreakAnimation(){this._breakSprite.alpha=1,this._sparkSprite.alpha=1,this._breakSprite.animations.play("break",10),this._sparkSprite.animations.play("spark",10)}}$.SPARK_POSITION={x:-165,y:19}},38340:(k,B,U)=>{"use strict";U.d(B,{H:()=>z});var F=U(8674),G=U(62459),j=U(99625),$=U(56942),H=U(29834),V=U(13956),W=U(34234),q=U(13302),K=U(63761);class z extends K.cw{setData(k,B,U){const G=Object.create(null,{setData:{get:()=>super.setData}});return(0,F.sH)(this,void 0,void 0,(function*(){var F;yield G.setData.call(this,k,B,U),this.hitbox.w<=z.SMALL_CREATURE_WIDTH_MAXIMUM||(1===(null===(F=this._battleController.getTeamById(k.teamId))||void 0===F?void 0:F.units.length)?this.size=q.X.Large:this.size=q.X.Medium)}))}createRenderables(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this._prefabLoader.loadWithDependenciesFromGUID(j.l.AnimatedSpineCreature,U);this._creatureGameObject=k,k.active=!1;const F=k.findComponentInChildren(H.j);return this._animator=F,yield new Promise((k=>{F.spine.setAsset(z.getBossSpineId(B.metadata.assets,B.ID),k)})),k}))}static getBossSpineId(k,B){var U,F;return G.Aq$.isDefined(null===(U=k.battle)||void 0===U?void 0:U.assetKey)?$.Q[k.battle.assetKey]:"spine"===(null===(F=k.default)||void 0===F?void 0:F.type)&&k.default.assetKey?$.Q[k.default.assetKey]:`default-boss-${B}`}}z.defaultSize=q.X.Large,z.SMALL_CREATURE_WIDTH_MAXIMUM=200,(0,F.Cg)([(0,W.d)("BattleController"),(0,F.Sn)("design:type",Function)],z.prototype,"_battleController",void 0),(0,F.Cg)([(0,V.b)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],z.prototype,"_prefabLoader",void 0)},39674:(k,B,U)=>{"use strict";U.d(B,{j:()=>Y});var F=U(8674),G=U(62459),j=U(1195),$=U(13956),H=U(80060),V=U(37773),W=U(97317),q=U(65732),K=U(41935),z=U(63761);class Y extends z.cw{createRenderables(k,B,U){const j=Object.create(null,{createRenderables:{get:()=>super.createRenderables}});return(0,F.sH)(this,void 0,void 0,(function*(){var F;if(this.isOpponent){const B="number"==typeof k.asset.id?k.asset.id:parseInt(k.asset.id);this._loggedInPlayer.player.encounters.addToPetTimesBattled(B)}const $=yield j.createRenderables.call(this,k,B,U);return k.petGear&&(null===(F=$.findComponentInChildren(K.o))||void 0===F||F.updateGear(Object.assign({},k.petGear)).catch(G.RQr.createHandler("Unable to update pet gear"))),H.d.updateInjectedValues($,{[q.E.ChargedCreatureEffectTier]:V.e.getChargedLevelTierFromLevel(k.chargedLevel),[q.E.ChargedCreatureEffectDisplayType]:k.chargedLevel>0?W.X$.IDLE:W.X$.HIDDEN}),$}))}}(0,F.Cg)([(0,$.b)("e20-0fb0"),(0,F.Sn)("design:type",j.E)],Y.prototype,"_loggedInPlayer",void 0)},63761:(k,B,U)=>{"use strict";U.d(B,{HW:()=>j,H0:()=>G,cw:()=>nt});var F,G,j,$=U(8674),H=U(62459),V=U(35120),W=U(21492),q=U(29834),K=U(51315),z=U(93833),Y=U(13956),Q=U(34234),X=U(54950),Z=U(13302),J=U(81531),tt=U(83441),et=U(91631),it=U(28402);!function(k){k.Activate="activate",k.Deactive="deactive",k.Hit="hit",k.Idle="idle"}(F||(F={}));class st{constructor(k,B,U=0,G=0,j=1,$=1){this._barrierGameObject=new H._mx(k);const V=this._barrierGameObject.addComponent(H.dLy);V.setPosition(V.localPosition.x+U,V.localPosition.y+G),V.setScale(j,$);const W=this._barrierGameObject.addComponent(it.v);this._barrierAnimator=W.GameObject.addComponent(q.j),W.setAsset(B,(()=>{this._barrierAnimator.OnAnimationComplete.addOnce((()=>{this._barrierAnimator.playAnimation(F.Idle,!0)})),this._barrierAnimator.playAnimation(F.Activate,!1)}))}playHitAnimation(){this._barrierAnimator.OnAnimationComplete.addOnce((()=>{this._barrierAnimator.playAnimation(F.Idle,!0)})),this._barrierAnimator.spine&&this._barrierAnimator.playAnimation(F.Hit,!1)}playBreakAnimation(){this._barrierAnimator.OnAnimationComplete.addOnce((()=>{this.destroy()})),this._barrierAnimator.playAnimation(F.Deactive,!1)}destroy(){var k,B;null===(k=this._barrierAnimator)||void 0===k||k.destroy(),null===(B=this._barrierGameObject)||void 0===B||B.destroy(),this._barrierGameObject=null}}!function(k){k.Astral="astral",k.Shadow="shadow",k.ShadowBig="shadowBig",k.None="none",k.Immediate="immediate"}(G||(G={})),function(k){k.LegacySprite="legacySprite",k.Spine="spine"}(j||(j={}));class nt{constructor(){this._fadeAnimation=null,this.shouldFadeOnDefeat=!0,this.castSpellSfx=null,this.isLoaded=!1,this.onLoaded=new H.HN0,this.ran=!1}get creatureGameObject(){return this._creatureGameObject}get rootContainer(){return this._rootContainer}get animator(){return this._animator}get visible(){return this._creatureGameObject.active}set visible(k){this._creatureGameObject.active=k}get barrier(){return this._barrier}setData(k,B,U){return(0,$.sH)(this,void 0,void 0,(function*(){var F,G,j,$,V,W,q,K,Y,Q,X,J,tt;const et=k.asset,it=et?this._gameDataProvider.getItem(et.type,et.id):null;et&&(this.id="number"==typeof et.id?et.id:parseInt(et.id),this.name=H.Aq$.isDefined(it.data.nameKey)?this._localizer.getText(it.data.nameKey):it.data.name),this.nickname=k.nickname,this.isOpponent=k.teamId!==this._leftTeamId,this.teleportType=U,this.level=k.level,this.chargedLevel=null!==(F=k.chargedLevel)&&void 0!==F?F:0,this._rootContainer=B.findComponent(z.$).rootContainer,this._creatureGameObject=yield this.createRenderables(k,it,B),this.isOpponent&&this.flip(),H.Aq$.isDefined(null===($=null===(j=null===(G=null==it?void 0:it.metadata)||void 0===G?void 0:G.assets)||void 0===j?void 0:j.battle)||void 0===$?void 0:$.shouldFadeOnDefeat)&&(this.shouldFadeOnDefeat=null===(q=null===(W=null===(V=null==it?void 0:it.metadata)||void 0===V?void 0:V.assets)||void 0===W?void 0:W.battle)||void 0===q?void 0:q.shouldFadeOnDefeat),H.Aq$.isDefined(null===(Q=null===(Y=null===(K=null==it?void 0:it.metadata)||void 0===K?void 0:K.assets)||void 0===Y?void 0:Y.battle)||void 0===Q?void 0:Q.castSpellSfx)&&(this.castSpellSfx=null===(tt=null===(J=null===(X=null==it?void 0:it.metadata)||void 0===X?void 0:X.assets)||void 0===J?void 0:J.battle)||void 0===tt?void 0:tt.castSpellSfx),this.addAnimationRemaps(it),this._creatureGameObject.setLayer(B.layer,!0),this.idle(),this.size=Z.X.Normal,this.recalculateHitbox(),this.isLoaded=!0,this.onLoaded.dispatch()}))}createRenderables(k,B,U){return(0,$.sH)(this,void 0,void 0,(function*(){var F,G,j,$,H;const V=this._prefabAppearanceLoader.loadAppearancePrefab(k.asset.type,k.asset.id,U);V.active=!1;const W=null!==(G=null===(F=B.metadata.assets.default)||void 0===F?void 0:F.battleScale)&&void 0!==G?G:1;return V.transform.setScale(W,W),this._animator=null!==(H=null!==($=null===(j=V.findComponentInChildren(tt.O))||void 0===j?void 0:j.spineAnimator)&&void 0!==$?$:V.findComponentInChildren(q.j))&&void 0!==H?H:V.findComponentInChildren(K.K),V}))}addAnimationRemaps(k){var B,U,F;if(this._animator instanceof q.j&&k){const G=this._animator.spine,j=null===(F=null===(U=null===(B=k.metadata)||void 0===B?void 0:B.assets)||void 0===U?void 0:U.battle)||void 0===F?void 0:F.animations;(null==j?void 0:j.idle)&&G.addAnimationRemap("idle",null==j?void 0:j.idle),(null==j?void 0:j.attack)&&G.addAnimationRemap("attack",null==j?void 0:j.attack),(null==j?void 0:j.defeat)&&G.addAnimationRemap("defeat",null==j?void 0:j.defeat)}}addBarrier(k,B,U=0,F=0,G=1,$=1){switch(k){case j.LegacySprite:this._barrier=new et.W(this._rootContainer,U,F,G,$);break;case j.Spine:H.Aq$.isDefined(B)&&(this._barrier=new st(this._creatureGameObject,B,U,F,G,$))}}removeBarrier(k=!0){var B;k&&(null===(B=this._barrier)||void 0===B||B.destroy()),this._barrier=null}get width(){return this._rootContainer.width}get height(){return this._rootContainer.height}get worldScale(){return this._creatureGameObject.transform.worldScale}get worldPosition(){return this._creatureGameObject.transform.worldPosition}get hitbox(){return this._hitbox}destroy(){this.onLoaded.dispose(),this._fadeAnimation&&(V.q.instance.game.tweens.remove(this._fadeAnimation),this._fadeAnimation=null)}fadeOut(){return(0,$.sH)(this,arguments,void 0,(function*(k=nt.FADE_OUT_TIME_MS){this._fadeAnimation=V.q.instance.game.add.tween(this._rootContainer,this,!0).to({alpha:0},k,H.GS3.Quadratic.In,!0),yield this._fadeAnimation.onTweenComplete.asPromise()}))}fadeIn(){return(0,$.sH)(this,arguments,void 0,(function*(k=nt.FADE_OUT_TIME_MS){this._rootContainer.alpha=0,this._fadeAnimation=V.q.instance.game.add.tween(this._rootContainer,this,!0).to({alpha:1},k,H.GS3.Quadratic.In,!0),yield this._fadeAnimation.onTweenComplete.asPromise()}))}flip(){this._creatureGameObject.transform.setScale(-this._creatureGameObject.transform.localScale.x,this._creatureGameObject.transform.localScale.y)}idle(){this._animator.playAnimation("idle",!0)}attack(){this._animator instanceof q.j&&this._animator.OnAnimationComplete.addOnce((()=>{this.idle()})),this._animator.playAnimation("attack",!1)}summon(){this.attack()}defeated(){return(0,$.sH)(this,void 0,void 0,(function*(){this.breakBarrier(),this._animator instanceof q.j&&this._animator.hasAnimation("defeat")&&(this._animator.playAnimation("defeat",!1),yield this._animator.OnAnimationComplete.asPromise()),this.shouldFadeOnDefeat&&(yield this.fadeOut())}))}breakBarrier(){var k;null===(k=this._barrier)||void 0===k||k.playBreakAnimation()}hurt(){var k;null===(k=this._barrier)||void 0===k||k.playHitAnimation()}walk(){this._animator.playAnimation("walk",!0)}levelUp(){this._animator.playAnimation("attack",!1)}shouldShowLevel(){return!0}recalculateHitbox(){const k=this.visible;this.visible=!0;const B=this._rootContainer.getBounds();this.visible=k,this._hitbox={x:B.x-this._rootContainer.worldTransform.tx,y:B.y-this._rootContainer.worldTransform.ty,w:B.width,h:B.height}}getNameFromAppearance(k){if(!k)return;const B=k.name;if(!H.Aq$.isDefined(B))return;if("string"==typeof B)return this._localizer.getText(B);return this.getNameResolver(B).getName()}getNameResolver(k){const B=V.q.instance.prodigy.gameContainer.resolve(W.C);return B.initFromProtobuf(k),B}handleExit(){return(0,$.sH)(this,void 0,void 0,(function*(){}))}handleEnter(){}}nt.defaultSize=Z.X.Normal,nt.FADE_OUT_TIME_MS=2e3,(0,$.Cg)([(0,Q.d)("LeftTeamId"),(0,$.Sn)("design:type",String)],nt.prototype,"_leftTeamId",void 0),(0,$.Cg)([(0,Y.b)("b2a-9519"),(0,$.Sn)("design:type",X.S)],nt.prototype,"_prefabAppearanceLoader",void 0),(0,$.Cg)([(0,Y.b)(H.$Bt.LocalizationService),(0,$.Sn)("design:type",H.dTp)],nt.prototype,"_localizer",void 0),(0,$.Cg)([(0,Q.d)("GameDataProvider"),(0,$.Sn)("design:type",J.q)],nt.prototype,"_gameDataProvider",void 0)},83269:(k,B,U)=>{"use strict";U.d(B,{B:()=>et});var F=U(28628),G=U(38340),j=U(8674),$=U(62459),H=U(29834),V=U(28402),W=U(63761);class q extends W.cw{get animator(){return this._animator}setData(k,B,U){const F=Object.create(null,{setData:{get:()=>super.setData}});return(0,j.sH)(this,void 0,void 0,(function*(){this._spineGuid=`${k.asset.id}`,this.name=this.getNameFromAppearance(k.appearance),yield F.setData.call(this,Object.assign(Object.assign({},k),{asset:null}),B,U)}))}createRenderables(k,B,U){return(0,j.sH)(this,void 0,void 0,(function*(){const k=new $._mx(U);k.active=!1,k.addComponent($.dLy);const B=k.addComponent(V.v);return yield new Promise((k=>B.setAsset(this._spineGuid,k))),this._animator=k.addComponent(H.j),k}))}idle(){this._animator.hasAnimation("idle")&&super.idle()}attack(){this._animator.hasAnimation("attack")&&super.attack()}}var K=U(39674),z=U(99625),Y=U(56942),Q=U(13956),X=U(13302),Z=U(91631);class J extends W.cw{setData(k,B,U){const F=Object.create(null,{setData:{get:()=>super.setData}});return(0,j.sH)(this,void 0,void 0,(function*(){yield F.setData.call(this,k,B,U),this.size=X.X.Huge}))}createRenderables(k,B,U){return(0,j.sH)(this,void 0,void 0,(function*(){const k=B.metadata.assets.battle,F=yield this._prefabLoader.loadWithDependenciesFromGUID(z.l.AnimatedSpineCreature,U);this._barrier=new Z.W(this._rootContainer,J.BARRIER_DATA.offset.x,J.BARRIER_DATA.offset.y,J.BARRIER_DATA.scale.x,J.BARRIER_DATA.scale.y),this._animator=F.findComponentInChildren(H.j);const G=Y.Q[k.assetKey],j=F.findComponentInChildren($.v2j);return F.transform.setScale(1.75,1.75),yield new Promise((k=>{j.setAsset(G,k)})),j.getSpine().transform.scale.set(1,1),F}))}addAnimationRemaps(k){super.addAnimationRemaps(k),this._animator.spine.addAnimationRemap("defeat","knockout")}shouldShowLevel(){return!1}defeated(){return(0,j.sH)(this,void 0,void 0,(function*(){this._barrier.playBreakAnimation(),this._animator.playAnimation("defeat",!1),yield this._animator.OnAnimationComplete.asPromise()}))}}J.defaultSize=X.X.Huge,J.BARRIER_DATA={offset:{x:-60,y:-60},scale:{x:2.4,y:2.4}},(0,j.Cg)([(0,Q.b)("d0e-64fd"),(0,j.Sn)("design:type",$.wNP)],J.prototype,"_prefabLoader",void 0);var tt=U(92611);class et{static getUnitContainer(k){switch(k){case F.uj.Titan:return J;case F.uj.Boss:return G.H;case F.uj.Wizard:return tt.N;case F.uj.Object:return q;case F.uj.Pet:default:return K.j}}}},92611:(k,B,U)=>{"use strict";U.d(B,{N:()=>at});var F,G=U(8674),j=U(62459),$=U(99625),H=U(32389),V=U(35120),W=U(77938),q=U(129),K=U(63115),z=U(64889),Y=U(99737),Q=U(41538),X=U(75777),Z=U(76277),J=U(44357),tt=U(24521),et=U(23029);!function(k){k.hearts="hearts",k.damage="damage"}(F||(F={}));class it{static getRevampLabelForAffix(k){const B=V.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);switch(k.type){case F.hearts:return B.getText("PLAYER_CARD_REVAMP_HEALTH_BONUS");case F.damage:return B.getText("PLAYER_CARD_REVAMP_POWER_BONUS");default:return""}}static getRevampBonusForLegacyAffix(k){const B=et.R.loadData(tt.r.BattleRevampConstants_json).battleConstants.equipmentModifierBaseValues;if(!k.valuePercent)return 0;switch(k.type){case F.hearts:return Math.round(k.amount*B.health);case F.damage:return Math.round(k.amount*B.power)}}static getTotalRevampHealthBonusFromAffixes(k){return k.reduce(((k,B)=>{const U=W.t.getItem("affix",B).data;let G=k;return U.type===F.hearts&&(G+=this.getRevampBonusForLegacyAffix(U)),G}),0)}static isFollowContainer(k){return void 0!==k.stopMoving&&void 0===k.setup}static isFollowSpineContainer(k){return void 0!==k.stopMoving&&void 0!==k.setup}static isPet(k){return void 0!==k.createDog&&void 0!==k.createCat}static isLegacyGameObject(k){return void 0!==k.handleGameObjectDestroy&&void 0!==k.visible}}var st=U(28080),nt=U(63761);class at extends nt.cw{constructor(){super(...arguments),this._scale=1}setData(k,B,U){const F=Object.create(null,{setData:{get:()=>super.setData}});return(0,G.sH)(this,void 0,void 0,(function*(){var G,j;this._scale=B.transform.localScale.y,yield F.setData.call(this,Object.assign(Object.assign({},k),{asset:null}),B,U),this.id="number"==typeof(null===(G=k.asset)||void 0===G?void 0:G.id)?k.asset.id:Number.parseInt(null===(j=k.asset)||void 0===j?void 0:j.id),this.name=this.getNameFromAppearance(k.appearance)}))}getNameResolver(k){const B=super.getNameResolver(k);return this.isOpponent||B.setFallbackName(V.q.instance.prodigy.gameContainer.get("e20-0fb0").loginCredentials.username),B}createRenderables(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){var B,F;const G=new q.a(V.q.instance.game);G.appearance.init(Object.assign(Object.assign({},k.appearance),{name:void 0}));const $=this.isOpponent&&!(0,Z.G)(H.q).enabled?Object.assign(Object.assign({},k.equipment),{costume:void 0}):k.equipment;G.equipment.init($),k.appearance.morph&&G.setData({playerTransformation:{transformType:k.appearance.morph.type,transformID:k.appearance.morph.ID}}),G.data.level=k.level;const W=j.Aq$.isDefined(k.chargedLevel)&&k.chargedLevel>0;G.data.chargedLevelData={chargedLevelsEnabled:W,chargedLevel:null!==(B=k.chargedLevel)&&void 0!==B?B:0,chargedLevelCap:null!==(F=k.chargedLevel)&&void 0!==F?F:0,chargedLevelXpForCurrentLevel:0,chargedLevelXpRequiredForNextLevel:0,chargedLevelCumulativeXp:0,hasReceivedFreeChargedLevel:!0,newLevelData:{levelsGained:[],startingLevelRelativeXp:0,xpGained:0},recuperableLevels:0,recuperableXp:0,costToKeepLevels:0,daysUntilLevelDecay:0,lastVisited:(new Date).toISOString()};const Y=yield st.D.createWizardObject(G,!1);Y.active=!1,U.addChild(Y),this._animation=Y.findComponentInChildren(z.$);const Q=Y.findComponentInChildren(K.T);return Q&&(Q.transformationChecker=this,Q.updateMountAppearance()),this.renderFollowContainer(G,U),Y}))}renderFollowContainer(k,B){const U=k.equipment.getFollow();if(at.FOLLOW_MORPH_MARBLE_BLACKLIST.includes(U))return;const F=W.t.getItem("follow",U);if(!F)return;this.followContainer=V.q.instance.prodigy.create.follow(this._rootContainer,F.ID,1,null,at.WIZARD_FOLLOW_OFFSET_X,at.WIZARD_FOLLOW_OFFSET_Y);const G=V.q.instance.prodigy.gameContainer.get("d0e-64fd"),j=Object.keys(F.data.stats).find((k=>F.data.stats[k]>0)),H={power:$.l.BuddyParticlePower,defence:$.l.BuddyParticleDefence,speed:$.l.BuddyParticleSpeed,hp:$.l.BuddyParticleHp};this._followParticles=G.loadFromGUID(H[j],B),this._followParticles.transform.setPosition(at.WIZARD_FOLLOW_OFFSET_X,at.WIZARD_FOLLOW_OFFSET_Y),this._followParticles.active=!1,(this.followContainer instanceof Y.z||this.followContainer instanceof Q.g||this.followContainer instanceof X.i)&&this.followContainer.startLoad()}setFollowPosition(k,B){this.followContainer&&this.followContainer.transform.position.set(null!=k?k:at.WIZARD_FOLLOW_OFFSET_X,null!=B?B:at.WIZARD_FOLLOW_OFFSET_Y)}idle(){this._animation.changeState(4)}attack(){this._animation.changeState(2)}summon(){this._animation.changeState(3)}walk(){this._animation.changeState(1)}levelUp(){this._animation.changeState(5)}recalculateHitbox(){const k=at.WIZARD_WIDTH*this._scale,B=at.WIZARD_HEIGHT*this._scale;this._hitbox={x:-k>>1,y:-B,w:k,h:B}}isTransformed(){return this._animation.isTransformed()}set visible(k){this._creatureGameObject.active=k,this.followContainer&&(this.followContainer.visible=k)}flip(){super.flip(),this.followContainer&&(it.isLegacyGameObject(this.followContainer)||it.isPet(this.followContainer)?(this.followContainer.transform.position.x=-this.followContainer.transform.position.x,this.followContainer.transform.scale.x=-this.followContainer.transform.scale.x):(it.isFollowContainer(this.followContainer)||it.isFollowSpineContainer(this.followContainer))&&(this.followContainer.x=-this.followContainer.x,this.followContainer.scale.x=-this.followContainer.scale.x))}handleExit(){return(0,G.sH)(this,void 0,void 0,(function*(){this.followContainer&&(yield(0,J.Qx)(this,this.followContainer,{x:0,y:0,duration:1e3,ease:j.GS3.Linear.None}))}))}handleEnter(k=2e3){this.followContainer&&(this._followParticles.active=!0,V.q.instance.game.time.events.addTimer(k,(()=>{this._followParticles.active=!1}),this),V.q.instance.game.add.tween(this.followContainer,this,!0).to({alpha:1},k/4,j.GS3.Quadratic.In,!0))}}at.WIZARD_HEIGHT=115,at.WIZARD_WIDTH=120,at.WIZARD_FOLLOW_OFFSET_X=-100,at.WIZARD_FOLLOW_OFFSET_Y=-80,at.FOLLOW_MORPH_MARBLE_BLACKLIST=[234,232,199,218]},65725:(k,B,U)=>{"use strict";U.d(B,{R:()=>X,V:()=>Q});var F=U(8674),G=U(99625),j=U(28628),$=U(57797),H=U(8394),V=U(65240),W=U(35120),q=U(96535),K=U(65050),z=U(13956),Y=U(60155);const Q=["currency","gold","item","pet"];class X extends Y.V{getUnitDataForTeam(k,B){var U;const F=this._activePlayer.daily,G=super.getUnitDataForTeam(k,B),H=G.find((k=>{var B,U;return k.asset.id===(null===(U=null===(B=F.getDailyBattleEncounter($.je.Boss))||void 0===B?void 0:B.boss)||void 0===U?void 0:U.ID)}));if(H){const k=null!==(U=H.slot)&&void 0!==U?U:j.Ie.FrontBottom;G.forEach((B=>{B.slot===j.Ie.BackMiddle&&B.asset.id!==H.asset.id&&(B.slot=k)})),H.slot=j.Ie.BackMiddle}return G}showBattleResult(k,B,U,j){const $=Object.create(null,{showBattleResult:{get:()=>super.showBattleResult}});return(0,F.sH)(this,arguments,void 0,(function*(k,B,U,F,j=!0){var H,q;if(!j)return;const z=null===(q=null===(H=W.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig())||void 0===H?void 0:H.festivalDailyData)||void 0===q?void 0:q.bossBattleRouletteData;let Y=[],Q=[{type:"currency",ID:1,N:50}];z&&(Y=this.processRewards(z.items),Q=this.processRewards(z.fallbackItems)),yield new Promise((k=>{W.q.instance.prodigy.open.bossRewards(Y,K.N.FestivalDailyBossRouletteSpin,G.l.BossRewardUIwithnorespin,void 0,Q,k,void 0,void 0,void 0,{instanceId:this._activePlayer.daily.getFestivalInstanceName(),sourceType:V.C.FestivalBossLootWheel})})),yield $.showBattleResult.call(this,k,B,U,F,j)}))}processRewards(k){let B=k.map((k=>Object.assign(Object.assign({},k),{isSecure:(0,H.p)(k.type,k.ID)})));return B=B.filter((k=>Q.includes(k.type)||this._activePlayer.getItemCount(k.type,k.ID)<=0)),B}}X.FESTIVAL_DAILY_BOSS_BATTLE_ID="festivalDailyBoss",(0,F.Cg)([(0,z.b)("306-5359"),(0,F.Sn)("design:type",q.W)],X.prototype,"_activePlayer",void 0)},73032:(k,B,U)=>{"use strict";U.d(B,{o:()=>j});var F=U(8674),G=U(62459);class j{constructor(){this.onPostBattleExpressModeComplete=new G.HN0}get isEnabled(){return this._isEnabled}get hasStarted(){return this._isEnabled&&G.Aq$.isDefined(this._postBattleFlowManager)}enable(k){return(0,F.sH)(this,void 0,void 0,(function*(){this._isEnabled=!0,G.Aq$.isDefined(this._postBattleFlowManager)?this.start(k):this._message=k}))}start(k){this._postBattleFlowManager.enableExpressMode(k)}setPostBattleFlowManager(k){G.Aq$.isDefined(this._postBattleFlowManager)||(this._postBattleFlowManager=k,this._postBattleFlowManager.OnDestroy.addOnce((()=>{this._isEnabled&&this.onPostBattleExpressModeComplete.dispatch()})),this._isEnabled&&this.start(this._message))}destroy(){this.onPostBattleExpressModeComplete.dispose()}}},60155:(k,B,U)=>{"use strict";U.d(B,{Y:()=>le,V:()=>be});var F=U(8674),G=U(87490),j=U(62459),$=U(95891),H=U.n($),V=U(88022),W=U(82351),q=U(85855),K=U(24521),z=U(99625),Y=U(51742),Q=U(36648),X=U(40671),Z=U(56942),J=U(60035),tt=U(28628),et=U(62886),it=U(46701),st=U(73678),nt=U(15821),at=U(35120),rt=U(34829),ot=U(23029),ht=U(77938),ct=U(37465),dt=U(73797),lt=U(16495),ut=U(34603),ft=U(71857),bt=U(36279),pt=U(43531),vt=U(23082),gt=U(81617),mt=U(76277),yt=U(65050),_t=U(41674),Et=U(67665),wt=U(15485),Tt=U(46784),St=U(70703),At=U(2224),Ct=U(98400),Ot=U(13956),It=U(34234),Dt=U(42430),Rt=U(3583),Pt=U(17425),Mt=U(60985),Nt=U(44094),xt=U(50084),Lt=U(86283),kt=U(94393),Bt=U(71796),Ut=U(78365),Ft=U(68788),Gt=U(56718),jt=U(13302),$t=U(21001),Ht=U(64019),Vt=U(15160),Wt=U(83441),qt=U(72748),Kt=U(18278),zt=U(19176),Yt=U(63761),Qt=U(81531),Xt=U(58203),Zt=U(60668),Jt=U(95807);class te extends Jt.Z{constructor(k){super(),this.callback=k}enter(){this.callback()}}var ee=U(52516),ie=U(63046),se=U(43503);class ne extends Jt.Z{constructor(k){super(),this._storedSegmentData=k,this.nextState=this.nextState.bind(this)}enter(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.battleController.type===tt.gu.NormalRiftRun){const k=yield se.L.canResumeRiftRun(),B=j.wa5.getActiveScene().container.get("NetworkHandler");if(!k)return void(yield Promise.all([se.L.resetRiftRunProgressAndTeleportToDragonIsle(null),B.clearBattleState()]))}this.battleController.onResumeBattle().then((()=>{this.sendBattleResumeSegmentData(),this.nextState()})).catch((k=>{j.RQr.logError(k,"Error resuming a battle"),this.stateMachine.showThrownErrorDialog(k)}))}))}nextState(){this.stateMachine.goToState(ie.B)}sendBattleResumeSegmentData(){const k=this.stateMachine.getStartOrResumeSegmentData();this.stateMachine.segment.battleRevamp.sendBattleResumedEvent(Object.assign({battle_id:this.battleController.battleId,battle_type:this.stateMachine.segment.battleRevamp.getSegmentBattleType(this.stateMachine.battleType),battle_variant:this.stateMachine.segment.battleRevamp.getBattleVariant(this.stateMachine.battleType,k.variantData),battle_difficulty:k.difficulty,player_team_size:this.stateMachine.homeTeam.units.length,enemy_team_size:this.stateMachine.awayTeam.units.length,resumedData:this._storedSegmentData},k.instance))}}var ae,re,oe=U(37987),he=U(21945),ce=U(60604),de=U(73032);!function(k){k.SmallActivate="activate-player-small",k.SmallIdle="idle-player-small",k.SmallDeactivate="deactivate-player-small",k.NormalActivate="activate-player",k.NormalIdle="idle-player",k.NormalDeactivate="deactivate-player",k.LargeActivate="activate-boss",k.LargeIdle="idle-boss",k.LargeDeactivate="deactivate-boss"}(ae||(ae={})),function(k){k.ConcurrentPlay="animation-concurrent-play"}(re||(re={}));const le={delay:200,duration:1600,bgStartScale:.95,bgEndScale:1,fgStartScale:.82,fgEndScale:1},ue=[Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.FrontBottom],Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.FrontTop],Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.BackMiddle],Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.FrontMiddle],Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.Middle]],fe=[Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.FrontBottom],Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.FrontTop],Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.FrontMiddle],Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.BackMiddle],Ht.cs.TEAM_UNIT_SLOT_MAP[tt.Ie.Middle]];class be{get isAnsweringQuestion(){return this._isAnsweringQuestion}get isChoosingSpell(){return this._isChoosingSpell}get isPerformingAction(){return this._isPerformingAction}get isHighlightingRescue(){return this._isHighlightingRescue}get prefabRoot(){return this._prefabRoot}get spellRoot(){return this._spellRoot}getAssetList(){return this._baseAssets}get statusEffectAnimationController(){return this._statusEffectAnimationController||(this._statusEffectAnimationController=new Rt.c),this._statusEffectAnimationController}get battleConstants(){return this._battleConstants}get leftTeamId(){return G.ETeamId.Home}get rightTeamId(){return G.ETeamId.Away}get activeUnit(){return this._activeUnit}set activeUnitSpellData(k){this._activeUnitSpellData=k}get battleBackgroundFX(){return this._battleBackgroundFX}getSpellComponentById(k){return this._spellComponents.get(k)}getBattlePrefab(){return z.l.RevampBattleScene}getActiveUnitSpellData(k){var B;return null===(B=this._activeUnitSpellData)||void 0===B?void 0:B.find((B=>B.spellId===k))}constructor(k){var B;this.allowVideoLessons=!0,this.selectedSpell=null,this._isAnsweringQuestion=!1,this._isChoosingSpell=!1,this._isPerformingAction=!1,this._isHighlightingRescue=!1,this._baseAssets=[Y.c.Sfx_bar_fill,Y.c.Sfx_results_screen,Y.c.Sfx_battle,q.V.Bgm_victory,q.V.Bgm_battle,Z.Q.Spine_xpbar_json,Z.Q.Spine_character_shine_json,V._.Ui_battle_revamp_json,V._.Ui_battle_revamp_legacy_json,Q.q.Particle_petstore_orb_1,Q.q.Particle_petstore_1,Q.q.Battle_interstitial_bg,W.B.Sfx_critial_hit,W.B.Sfx_Dodge,W.B.Sfx_empty_mp,W.B.Sfx_fumble_poof,W.B.Sfx_heal,W.B.Sfx_mp_refilled,W.B.Sfx_powerful_hit,W.B.Sfx_resist_hit,W.B.Sfx_spell_card_hover,W.B.Sfx_spell_card_select,W.B.Sfx_teleport_defeat,W.B.Sfx_teleport_rescue,W.B.Sfx_unit_select,W.B.Sfx_vs_animation,W.B.Sfx_wizard_team_teleport,W.B.Sfx_unit_buff_positive,Y.c.Sfx_qi_button_default,Y.c.Sfx_qi_button_disabled,Y.c.Sfx_qi_positive_action,Y.c.Sfx_qi_negative_action],this._stateMachinePromise=new j.bnh,this.postBattleExpressModeController=new de.o,this._spellCardBattleActionData=[],this._battleTargetControllerComponent=null,this.onChoosingSpell=new j.HN0,this.onSpellCardSelected=new j.HN0,this.onSpellCardUnselected=new j.HN0,this.onSpellTargetChosen=new j.HN0,this.onSpellCardsRemoved=new j.HN0,this.onBattleEnded=new j.HN0,this._spellComponents=new Map,this._battleVisualCenterPositionX=700,this._showIndicator=!0,this._isUnitTooltipLocked=!1,this._battleBackgroundFX=null,this._spellBookShowing=!1,this._ignoreUnitEntranceUIWhenMoving=!1,this.awardedXpData=null,this.postBattleRescuablePets=[],this.magicoinRewardGranted=!1,this._paintedBackgroundZoomConfigs=le,this._forceEndBattle=!1,this.hasMpOverrides=!1,this._spellCardsHidden=!0,this.type=null!==(B=k.battleType)&&void 0!==B?B:tt.gu.Basic,this.subType=k.battleSubType,this.battleCooldownConfig=k.cooldown,this._updateTimer=at.q.instance.prodigy.game.time.events.loop(rt.s.TARGET_FPS_40_MS,this.update,this)}update(){this._statusEffectAnimationController&&this._statusEffectAnimationController.update()}bindNetworkHandler(){j.wa5.getActiveScene().container.bind("NetworkHandler").to(Xt.m).asSingleton()}requestBattleStart(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this._networkHandler.createBattle(k)}))}requestBattleSimulation(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;return(null===(U=null===(B=k.debug)||void 0===B?void 0:B.battleSim)||void 0===U?void 0:U.simCount)?this._networkHandler.createBattleSim(k):{simData:"Sim count did not exist in the config"}}))}requestBattleResume(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._networkHandler.resumeBattle()}))}getLoadingScreen(k){const B=new gt.R;return B.data=Object.assign(Object.assign({},B.data),k),B}initBattlePrefab(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,$;const H=j.wa5.getActiveScene(),V=this.leftTeamId,W=this.rightTeamId;H.container.bind("LeftTeamId").toConstantValue(V),H.container.bind("RightTeamId").toConstantValue(W),H.container.bind("976-9e42").toConstantValue(new Ct.w(at.q.instance.prodigy.education));const q=this.getUnitSpellData(k.state.units,null===(B=k.preload)||void 0===B?void 0:B.spellV2),Y=this.preloadUnitSpellIcons(q),Q=this.getBattlePrefab();let X=yield this._prefabLoader.loadWithDependenciesFromGUID(Q);this._prefabRoot=X,yield this.loadUnitInfoTooltip(),Q!==z.l.RevampBattleScene&&(X=X.findComponentInChildren(oe.$).GameObject);const Z=X.findComponent(oe.$);H.addGameObject(this._prefabRoot),this.preloadUnitSpells(q).then((k=>{this._spellRoot=k,X.addChild(k)})).catch(j.RQr.createHandler("Error preloading unit spells"));const J=ot.R.loadData(K.r.BattleRevampConstants_json).battleConstants,tt=X.findComponent(j.bE_);tt.Container.bind(G.ConstantsDataProvider).toConstantValue({constants:J}),tt.Container.bind("Constants").to(G.BattleConstants).asSingleton(),this._battleConstants=tt.Container.get("Constants"),this.leftTeam=tt.getInjectedValue("BattleHomeTeam"),this.leftTeam.setData(V,k.state.teams[V],this.getUnitDataForTeam(k,V)),H.container.bind("LeftTeamUnits").toConstantValue(this.leftTeam.units),this.rightTeam=tt.getInjectedValue("BattleAwayTeam"),this.rightTeam.setData(W,k.state.teams[W],this.getUnitDataForTeam(k,W)),H.container.bind("RightTeamUnits").toConstantValue(this.rightTeam.units),null===(U=k.state.statusEffects)||void 0===U||U.forEach((k=>{var B;null===(B=this.getUnitById(k.unitId))||void 0===B||B.addStatusEffect(k)})),this.shouldNotifyWhenRescueAvailable=this.rightTeam.isRescuable(),this.textLog=tt.getInjectedValue("BattleLog"),X.findComponentInChildren(At.Y).playBgmID(null!==(F=this._localConfig.backgroundMusicID)&&void 0!==F?F:2),Z.battleType=this.type,Z.battleController=this,Z.difficulty=null===($=k.state.config)||void 0===$?void 0:$.difficulty,Z.onVictory.addOnce((()=>{at.q.instance.game.broadcaster.broadcast(dt.Ii.Victory)})),this.registerBattleEndHandlers(Z),yield Promise.all([Y,this.leftTeam.awaitUnitsLoaded(),this.rightTeam.awaitUnitsLoaded(),this.setupBattleBackgrounds()]),this.battleResult=Z.battleResult,this.mapRoot=Z.mapRoot,this._stateMachine=Z,this._stateMachinePromise.resolve(Z),this._stateMachine.onStateChange.add(this.handleStateChange,this),this.initBattleStats(),this._stateMachine.stateUpdateQueue.push(...this.processBattleStateUpdates(k.updates));const et=this._prefabLoader.loadFromGUID(z.l.RescueAvailableSequence);this._rescueAvailableSequence=null==et?void 0:et.findComponentInChildren(qt.N)}))}registerBattleEndHandlers(k){const B=at.q.instance.prodigy.gameContainer.get("306-5359"),U=k=>{(0,mt.G)(it.Q).enabled&&(0,ct.u)(B,B.kennel.getPets()),k()};k.onVictory.addOnce((()=>U(this._localConfig.onVictory))),k.onDefeat.addOnce((()=>U(this._localConfig.onDefeat))),k.onEscape.addOnce((()=>U(this._localConfig.onEscape)))}setupBattleBackgrounds(){return(0,F.sH)(this,void 0,void 0,(function*(){let k;if("string"==typeof this._localConfig.backgroundID){const B=this._prefabRoot.findComponent(j.BSH);k=B.onMapLoaded.asPromise(),B.loadMap(this._localConfig.backgroundID)}else k=Promise.all(this._localConfig.backgroundID.map(((k,B)=>(0,F.sH)(this,void 0,void 0,(function*(){const U=new j._mx(this._prefabRoot);U.layer=0===B?"backgroundImage":"foregroundImage";const F=U.addComponent(j.XVE);0!==B&&(this._foregroundTransform=F);const G=U.addComponent(ut._);yield G.setAsset(k),G.sizeToSourceImage()})))));return k}))}startStateMachine(){this._foregroundTransform&&(this.setZoom(this._paintedBackgroundZoomConfigs.bgStartScale,this._paintedBackgroundZoomConfigs.fgStartScale),window.setTimeout((()=>this.zoomCamera(this._paintedBackgroundZoomConfigs.bgStartScale,this._paintedBackgroundZoomConfigs.bgEndScale,this._paintedBackgroundZoomConfigs.fgStartScale,this._paintedBackgroundZoomConfigs.fgEndScale,this._paintedBackgroundZoomConfigs.duration)),this._paintedBackgroundZoomConfigs.delay)),this._stateMachine.goToStart()}resumeLastBattleState(k){this._stateMachine.goToState(ne,k)}getUnitSpellData(k,B=[]){const U=new Set(B);for(const F of Object.values(k))for(const k of F.spells)U.add(k.spellId);return Array.from(U.values()).map((k=>this._gameDataProvider.getItem("spellV2",k))).map((k=>this.applyExperimentOverrides(k)))}getTotalTeamDamagePercentage(k,B=!1){let U=!1;if(B){const B=this._stateMachine.stateUpdateQueue.find((k=>k.type===G.EBattleStateUpdate.EndBattle));B&&B.victoriousTeamId!==k&&(U=!0)}const F=this.getUnits().filter((B=>B.data.teamId===k)),j=F.reduce(((k,B)=>k+B.data.health.max),0),$=F.reduce(((k,B)=>k+B.data.health.current),0);return U?1:1-$/j}applyExperimentOverrides(k){var B;return(null===(B=null==k?void 0:k.metadata)||void 0===B?void 0:B.experiments)?(k.metadata.experiments.filter((k=>{const B=this._featureProvider.getFeatureValue(k.featureName);return nt.A.traverseIfObject(B,k.featureVariable)})).forEach((B=>{var U,F;Object.keys(null!==(U=B.data)&&void 0!==U?U:[]).forEach((U=>{k.data[U]=Object.assign(k.data[U],B.data[U])})),Object.keys(null!==(F=B.metadata)&&void 0!==F?F:[]).forEach((U=>{k.data[U]=Object.assign(k.metadata[U],B.metadata[U])}))})),k):k}preloadUnitSpellIcons(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F;const G=[];for(const j of k){const k=(null===(F=null===(U=null===(B=null==j?void 0:j.metadata)||void 0===B?void 0:B.assets)||void 0===U?void 0:U.icon)||void 0===F?void 0:F.assetKey)?Nt.$.capitalizeFirstLetter(j.metadata.assets.icon.assetKey):null;nt.A.isDefined(Q.q[k])&&G.push(Q.q[k],Q.q[`${k}_cooldown`])}return new Promise(((k,B)=>{at.q.instance.prodigy.load.assets(G,((U,F)=>{F?k():B(new Error(`App.instance.prodigy.load failed for assets ${G.join(", ")}`))}))}))}))}preloadUnitSpells(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=new j._mx;B.name="SpellRoot";return B.addComponent(j.dLy).setPositionX(this._battleVisualCenterPositionX),yield Promise.all(k.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){var U,F,G,j;const $=null===(G=null===(F=null===(U=null==k?void 0:k.metadata)||void 0===U?void 0:U.assets)||void 0===F?void 0:F.default)||void 0===G?void 0:G.assetKey,H=`${Nt.$.capitalizeFirstLetter($)}_spell`,V=null!==(j=nt.A.isDefined($)?X.z[H]:void 0)&&void 0!==j?j:X.z.Spell_storm_ioncannon_single_spell,W=B.addComponent(Dt.o,!1);this._spellComponents.set(`${k.ID}`,W),W.spellGUID=V,yield new Promise(((k,B)=>{at.q.instance.prodigy.load.assets([V],(()=>{at.q.instance.game.cache.getJSON(V)?k():B(new Error(`${H} - ${V} not loaded, does it exist in ESpellGameAssets?`))}))})),W.create(),W.postCreate(),yield W.preloadAssets()}))))),B}))}initBattleStats(){this.battleStats=new bt.g,this.battleStats.type=tt.gu.Basic,this.battleStats.startTime=at.q.instance.prodigy.timeManager.getServerTimeMs(),this.battleStats.endTime=bt.g.INVALID_TIME,this.battleStats.consumablesUsed=[],this.battleStats.enemySpellsCast=0,this.battleStats.energyCost=0,this.battleStats.epicAttack=null,this.battleStats.spellsCast=0,this.battleStats.spellsFailed=0,this.battleStats.pets=[],this.battleStats.petsRescued=[]}onStartBattle(){return(0,F.sH)(this,arguments,void 0,(function*(k=!0){at.q.instance.prodigy.gameContainer.get("306-5359").saveEnabled=!1,this.applyModifiers(),this.getUnits().filter((k=>(null==k?void 0:k.type)===tt.uj.Wizard)).forEach(this.remapStandAnimation);const B=[];B.push(this.leftTeam.teleportIn()),B.push(this.rightTeam.teleportIn()),yield j.Egh.timeout(2e3),yield this.playIntroSequence(),k&&(yield this.setSpellBookVisible(!0)),this.getUnits().forEach((k=>{k.uiContent.findComponent(St.x).startTween(),k.ultimatesUi&&this.type===tt.gu.Ultimates&&k.ultimatesUi.GameObject.findComponent(St.x).startTween()})),this.setupUnitTooltip(),yield Promise.all(B)}))}highlightRescuableUnits(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this.getTeam(jt.h.Away).units.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return k.updateRescuableUI()}))));yield Promise.all(k)}))}onResumeBattle(){return(0,F.sH)(this,void 0,void 0,(function*(){at.q.instance.prodigy.gameContainer.get("306-5359").saveEnabled=!1,this.applyModifiers(),this.getUnits().filter((k=>(null==k?void 0:k.type)===tt.uj.Wizard)).forEach(this.remapStandAnimation);const k=[];this.getUnits().forEach((B=>k.push(B.enterBattle(!1,!0)))),yield this.setSpellBookVisible(!0),this.setupUnitTooltip(),this.highlightRescuableUnits().catch((k=>j.RQr.logError(k,"Error: Could not highlight rescuable units"))),yield Promise.all(k)}))}playIntroSequence(){return(0,F.sH)(this,void 0,void 0,(function*(){at.q.instance.prodigy.audio.playSFXFromGUID(W.B.Sfx_vs_animation),this._stateMachine.introAnimator.GameObject.active=!0,yield(0,lt.ye)(this._stateMachine.introAnimator,"vs")}))}applyModifiers(){const k=j.wa5.getActiveScene().container.get("Modifiers");for(const B of k)switch(B.type){case J.z.TurnTimer:B.teamId===this.leftTeamId&&this.useTurnTimer(1e3*B.seconds)}}remapStandAnimation(k){var B,U,F,G,$,H;const V=(null===(G=null===(F=null===(U=null===(B=k.creature)||void 0===B?void 0:B.creatureGameObject)||void 0===U?void 0:U.findComponentInChildren(Wt.O,!0))||void 0===F?void 0:F.spineAnimator)||void 0===G?void 0:G.spine)||(null===(H=null===($=k.creature)||void 0===$?void 0:$.creatureGameObject)||void 0===H?void 0:H.findComponentInChildren(j.v2j,!0));null==V||V.addAnimationRemap(ft.$.STAND,ft.$.STOP_HEAVY)}zoomCamera(k,B,U,F,G){const $={progress:0};at.q.instance.game.tweens.create($,this,!0).to({progress:1},G,j.GS3.Quadratic.InOut).start().onUpdate.add((()=>{this.setZoom(j.cj9.linear(k,B,$.progress),j.cj9.linear(U,F,$.progress))}))}setZoom(k,B){var U;j.i7d.main.GameObject.transform.setScale(1/k),null===(U=this._foregroundTransform)||void 0===U||U.setScale(B)}processBattleStateUpdates(k){return k}onPlayerAction(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this._networkHandler.doBattleAction(k,this.battleId),U=yield this.handleWaitingMessage(B),F=this.processBattleStateUpdates(U);return this.updateBattleStats(k,F),F}))}attemptEscape(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._networkHandler.escapeBattle(),B=yield this.handleWaitingMessage(k),U=this.processBattleStateUpdates(B);this._stateMachine.stateUpdateQueue.push(...U),this._stateMachine.goToState(ie.B)}))}handleWaitingMessage(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=j.Egh.timeout(be.NETWORK_LAG_MESSAGE_DELAY_MS),U=yield Promise.race([k,B]);if(Array.isArray(U))return U;this._stateMachine.isShowingNetworkErrorDialog()||this._stateMachine.showErrorDialog(oe.D.Connection,void 0,!0);const F=yield k;return this._stateMachine.hideErrorDialog(),F}))}updateBattleStats(k,B){switch(k.type){case G.EBattleAction.PowerUp:k.correctAnswer?this.battleStats.spellsCast++:this.battleStats.spellsFailed++;break;case G.EBattleAction.CastSpell:this.battleStats.spellEnergyCost=1,++this.battleStats.energyCost}}beginEndingBattle(k,B={}){this.beginEndingBattleAndGotoState([te,k],B)}beginEndingBattleAndGotoState(k,B={}){this._forceEndState=k,this.canBattleEndInstantly()?this._stateMachine.goToState(...this._forceEndState):(this._forceEndBattle=!0,B.enablePostBattleFlowExpressMode&&this.enablePostBattleExpressMode(B.forceEndMessageText))}enablePostBattleExpressMode(k){this.postBattleExpressModeController.enable(k).catch(j.RQr.createHandler("Failed to enable express mode on post-battle menus"))}canBattleEndInstantly(){return this._stateMachine&&this.canBattleEndDelayed()&&this._stateMachine.currentState instanceof ee.W}isBattleBeingForciblyEndedMidBattle(){return this._forceEndState&&this._stateMachine&&this._stateMachine.currentState instanceof this._forceEndState[0]&&!this.postBattleExpressModeController.hasStarted}canBattleEndDelayed(){var k;return 0===this._stateMachine.stateUpdateQueue.length&&!this.isAnsweringQuestion&&(null===(k=this.activeUnit)||void 0===k?void 0:k.data.teamId)===this.leftTeamId}onEndGame(k){return(0,F.sH)(this,arguments,void 0,(function*(k,B=!0){var U;const F=at.q.instance.prodigy;if(k&&B){const k=null!==(U=this._localConfig.victoryMusicID)&&void 0!==U?U:1;F.audio.isBGMPlaying(Pt.K.getAssetID("bgm",k))||F.audio.playBGM(k,!0)}this.setUnitTooltipUi(!1),this.hideSpellCards(!0,(()=>{this.setSpellBookVisible(!1).catch(j.RQr.createHandler("Error hiding spell book"))}));const G=[];for(let j=0;j{k.assetIDs.forEach((k=>{at.q.instance.prodigy.load.removeSpine(k)}))})),this.onBattleEnded.dispatch()}))}onVictory(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){at.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(et.T.WIN_BATTLE,{type:this.type}).catch(j.RQr.createHandler(`Could not send quest event for battle won: ${this.type}`));const F=at.q.instance.prodigy.gameContainer.get("3a0-8003");yield F.refreshMembership();const G=at.q.instance.prodigy.gameContainer.get("306-5359");yield G.updateChargedLevelsData(),yield this.showBattleResult(!1,k,B,U,!0)}))}onDefeat(){return(0,F.sH)(this,arguments,void 0,(function*(k=!1){const B=Gt.S.isPostLossFlowAvailable(this.type);B||k||!Bt.k.useRevisedDifficulty||(yield this.showDefeatedDialogue()),this._forceEndBattle&&(this._forceEndBattle=!1,this._stateMachine.goToState(...this._forceEndState)),B&&(yield this.showBattleResult(!0,void 0,void 0,void 0,!1))}))}onEscape(){return(0,F.sH)(this,void 0,void 0,(function*(){}))}handleBattleStartError(k){return(0,F.sH)(this,void 0,void 0,(function*(){return!0}))}completeBattle(k,B,U){this._stateMachine.completeBattle(k,void 0,null==B?void 0:B.rewardsScalar,U)}getTeam(k){return[this.leftTeam,this.rightTeam][k]}getTeamById(k){return this.leftTeamId===k?this.leftTeam:this.rightTeamId===k?this.rightTeam:void 0}getUnits(){return[...this.leftTeam.units,...this.rightTeam.units]}getUnitById(k){return this.getUnits().find((B=>B.battleId===k))}deactivateTurnIndicator(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=this._stateMachine.turnIndicator;B.GameObject.active&&(B.OnAnimationComplete.removeAll(B.playAnimation),B.playAnimation(be.TURN_INDICATOR_DEACTIVATE_ANIMATIONS[(null===(k=this._activeUnit)||void 0===k?void 0:k.size)||jt.X.Normal],!1,!0),yield B.OnAnimationComplete.asPromise(),B.GameObject.active=!1)}))}setActiveUnit(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F;if(!this._spellCardsHidden){null===(B=this.spellCardsController)||void 0===B||B.hidePetRescue();const k=new j.bnh;this.hideSpellCards(!0,k.resolve),yield k.catch(j.RQr.createHandler("Error: Could not clean up battle revamp unit ui"))}if(this._previousUnitId=null===(U=this._activeUnit)||void 0===U?void 0:U.battleId,this._activeUnit=k,k){k.creature.isOpponent||(this.showSpellCards(!0,!1),yield this.spellCardsController.onUiReady.asPromise()),yield this.setUnitIndicator(k);const B=this.getTeam(jt.h.Away).units.filter((k=>k.isInARescuableState()));let U=[],G=[];this.isRescueAvailable(!1)&&!k.creature.isOpponent&&(U=Lt.D.filterForNewlyRescuable(B),U.length>0&&(G=U,this.hideVisibleUnitTooltips(),this._isHighlightingRescue=!0,yield null===(F=this._rescueAvailableSequence)||void 0===F?void 0:F.startSequence(G,this.textLog),this.shouldNotifyWhenRescueAvailable=!1,this._isHighlightingRescue=!1));const j=this.getUnits().find((k=>k.battleId===this._previousUnitId));this._showIndicator&&(k.creature.isOpponent&&!(null==j?void 0:j.creature.isOpponent)?this.textLog.showMessage("BATTLE_REVAMP_ENEMY_TURN"):k.creature.isOpponent||(this.isRescueAvailable()&&this.shouldNotifyWhenRescueAvailable?(this.textLog.showMessage("BATTLE_REVAMP_RESCUE_AVAILABLE"),this.shouldNotifyWhenRescueAvailable=!1):k.currentMp>0&&((null==j?void 0:j.creature.isOpponent)||!j)&&this.textLog.showMessage("BATTLE_REVAMP_YOUR_TURN"))),this.getTeam(jt.h.Away).units.filter((k=>!G.includes(k))).forEach((k=>{k.updatePetRescueTooltip()})),U.forEach((k=>{Lt.D.sendPetRescueAvailableEvent(k)}))}}))}setUnitIndicator(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;const F=this._stateMachine.turnIndicator,G=k.GameObject.transform.worldPosition;k.turnIndicatorOffset&&(G.x+=k.turnIndicatorOffset.x,G.y+=k.turnIndicatorOffset.y),(null===(B=F.GameObject.transform.worldPosition)||void 0===B?void 0:B.x)===G.x&&(null===(U=F.GameObject.transform.worldPosition)||void 0===U?void 0:U.y)===G.y&&this._stateMachine.turnIndicator.GameObject.active||(yield this.deactivateTurnIndicator(),F.GameObject.transform.setPosition(G.x,G.y),F.GameObject.active=this._showIndicator,this._showIndicator&&(F.playAnimation(be.TURN_INDICATOR_ACTIVATE_ANIMATIONS[k.size],!1,!0),F.OnAnimationComplete.addOnce((()=>{F.playAnimation(be.TURN_INDICATOR_IDLE_ANIMATIONS[k.size],!0)}),F.playAnimation),yield Promise.race([F.spine.waitForEvent(re.ConcurrentPlay),F.OnAnimationComplete.asPromise()])))}))}setSpellBookVisible(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=k?this._stateMachine.spellBookMoveIn:this._stateMachine.spellBookMoveOut;k!==this._spellBookShowing&&(this._spellBookShowing=k,B.startTween(),yield B.onComplete.asPromise())}))}showSpellCards(k,B=!0){var U;if(this._spellCardsHidden=!1,!this.spellCardsPrefab){this.spellCardsPrefab=this._prefabLoader.loadFromGUID(z.l.RevampActionMenu),this.spellCardsController=this.spellCardsPrefab.findComponentInChildren(Kt.b),this._battleTargetControllerComponent=this.spellCardsPrefab.findComponentInChildren(Vt.F),this.spellCardsController.getSpellCards().forEach((k=>{const B=k.findComponentInChildren($t.y);B&&this._spellCardBattleActionData.push(B)}));const k=this.spellCardsController.petRescueCard.findComponentInChildren($t.y);k&&this._spellCardBattleActionData.push(k)}this.spellCardsController.onUiReady.removeAll(),this._spellCardBattleActionData.forEach((k=>k.initialize())),null===(U=this._battleTargetControllerComponent)||void 0===U||U.initialize(),k?this.spellCardsController.tweenSpellCards(!0,B):(this.spellCardsController.onUiReady.dispatch(!0,!1),this.spellCardsController.inputBlocker.active=!1)}updateSpellCards(){this.hideSpellCards(!1,(()=>{this.showSpellCards(!1)}))}hideSpellCards(k,B){this._spellCardsHidden=!0,this.onSpellCardsRemoved.dispatch(),this.spellCardsPrefab?k?(this.spellCardsController.targetController.dismissActionTooltips(0,null),B&&this.spellCardsController.onUiReady.addOnce(B),this.spellCardsController.tweenSpellCards(!1)):(this.spellCardsController.onUiReady.dispatch(!1,!1),null==B||B()):null==B||B()}showUnitTooltip(k){if(this._isUnitTooltipLocked)return;const B=this.getUnits().find((B=>B.battleId===k));this.showUnitInfoTooltip(B)}hideVisibleUnitTooltips(){this.setVisibleUnitInfoTooltip(null)}setUnitTooltipUi(k){this._isUnitTooltipLocked||(this.hideVisibleUnitTooltips(),this.getUnits().forEach((B=>{k&&B.isAlive()?B.setUnitTooltipTriggerEnabled(!0):B.setUnitTooltipTriggerEnabled(!1)})))}updateInteractionPointerForUnits(){this.getUnits().forEach((k=>{k.showAsInteractive(this._isChoosingSpell&&(null==k?void 0:k.isAlive())&&!this._isUnitTooltipLocked)}))}setUnitTooltipLock(k){this._isUnitTooltipLocked=!1,this.setUnitTooltipUi(!k),this._isUnitTooltipLocked=k,this.updateInteractionPointerForUnits()}isUnitTooltipLocked(){return this._isUnitTooltipLocked}setupUnitTooltip(){this.onSpellCardSelected.add(this.setUnitTooltipUi.bind(this,!1)),this.onSpellCardUnselected.add(this.setUnitTooltipUi.bind(this,!0)),this.onSpellTargetChosen.add(this.setUnitTooltipUi.bind(this,!0)),this._isUnitTooltipLocked||this.setUnitTooltipUi(!0)}useTurnTimer(k){this.onChoosingSpell.removeAll(this),this.onChoosingSpell.add((()=>{this.activeUnit.showCasterWaitingMessage(k),this.activeUnit.onTurnTimerExpired.addOnce((()=>{this.activeUnit.onSelectSpell(null),this.spellCardsController.targetController.hideTargets(),this.hideSpellCards(!0),this._stateMachine.goToState(he.N,{type:G.EBattleAction.Fumble})}),this)}),this);const B=()=>{var k,B;null===(k=this.activeUnit)||void 0===k||k.hideWaitingMessage(),null===(B=this.activeUnit)||void 0===B||B.onTurnTimerExpired.removeAll(this)};this.onSpellTargetChosen.add(B),this.onSpellCardsRemoved.add(B)}showBattleResult(k,B,U,$){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U,F,$=!0){var V,W;const q=null!==(V=null==F?void 0:F.rewardsScalar)&&void 0!==V?V:1,K=this.getEarnedXP();Mt.R.addDebugMessage("\nNon-member rewards:\n");const z=this.getScalableBattleDrops();B&&B.length>0&&z.push(...B.map((k=>({type:k.type,ID:k.ID,N:k.quantity,isSecure:!!k.isSecure}))));const Y=this.getNonScalableBattleDrops(),Q=Mt.R.bucketRewards([...Mt.R.bucketAndScaleRewards(z,q),...Y]);Mt.R.addDebugMessage("\nMember rewards:\n");const X=this.getScalableMemberBattleDrops();U&&U.length>0&&X.push(...U.map((k=>({type:k.type,ID:k.ID,N:k.quantity}))));const Z=this.getNonScalableMemberBattleDrops(),J=Mt.R.bucketRewards([...Mt.R.bucketAndScaleRewards(X,q),...Z]);Mt.R.outputDebugMessages();const et=new j.bnh;this.battleResult.onClosed.add((()=>{et.resolve(),this._forceEndBattle&&(this._forceEndBattle=!1,this._stateMachine.goToState(...this._forceEndState))})),this.battleResult.onStarted.addOnce((k=>{const B=k.findComponentInChildren(Ft.D);this.postBattleExpressModeController.setPostBattleFlowManager(B)}));const it=this.getTeam(jt.h.Away).units.map((k=>k.data)),st=H().orderBy(it,[k=>k.type===tt.uj.Boss?1:0,k=>k.level,k=>{var B;return null!==(B=k.mergeRank)&&void 0!==B?B:0}],["desc","desc","desc"])[0],nt={enemyElementWeakness:null!==(W=this.battleConstants.getElementalWeakness(st.element))&&void 0!==W?W:G.EElementType.Astral};return this.battleResult.show(this.getUnitsToAward(),$,this.type,{xpGained:K,rewards:Q,memberRewards:J,rewardsScalingInfo:F,rescuablePets:this.postBattleRescuablePets,skipChests:k,magicoinRewardGranted:this.magicoinRewardGranted},nt),et}))}getEarnedXP(){var k,B;return null!==(B=null===(k=this.awardedXpData)||void 0===k?void 0:k.xpGained)&&void 0!==B?B:{baseXp:0,memberXp:0,totalNonMemberXp:0}}getUnitsToAward(){var k;return(null===(k=this.awardedXpData)||void 0===k?void 0:k.unitsToAward.length)>0?this.awardedXpData.unitsToAward:this.leftTeam.units.map((k=>k.battleId))}getUnitDataForTeam(k,B){return Object.keys(k.state.units).reduce(((U,F)=>{const G=k.state.units[F];return G.teamId===B&&(G.unitId||(G.unitId=F),U.push(G)),U}),[])}getGuaranteedDrops(){var k;const B=[],U=[],F=null===(k=this._localConfig.guaranteedDrops)||void 0===k?void 0:k.filter(nt.A.isDefined);if(nt.A.isDefined(F)){let k;for(let G=0;G0&&B.push(U[0]),this.debugCurrencyDrops("guaranteed drops",B),B}getScalableBattleDrops(){const k=at.q.instance.prodigy.world.getCurrentZone(),B=at.q.instance.prodigy.gameContainer.get("12b-405a").getMultiplier(k,kt.R.Currency),U=at.q.instance.prodigy.world.getCurrentCurrency(),F=Ut.Q.getMemberJarDropData(),G=this.getDropsFromMemberJarData(F.nonMemberDrops,U,B);return this._localConfig.scaleGuaranteedDrops&&G.push(...this.getGuaranteedDrops()),G}getNonScalableBattleDrops(){return this._localConfig.scaleGuaranteedDrops?[]:this.getGuaranteedDrops()}getScalableMemberBattleDrops(){const k=[];at.q.instance.prodigy.world.getCurrentZone()===st.A_.ARCHIVES&&k.push({type:"gold",N:150});const B=at.q.instance.prodigy.world.getCurrentCurrency(),U=Ut.Q.getMemberJarDropData(),F=this.getDropsFromMemberJarData(U.memberDrops,B,1);return k.push(...F),k}getNonScalableMemberBattleDrops(){return[]}getDropsFromMemberJarData(k,B,U){const F=[],G=this.rightTeam.units.length;if(k.goldPerEnemy>0){const B=k.goldPerEnemy*G*U;Mt.R.addDebugMessage(`Gold per enemy total: ${B}`),F.push({type:"gold",N:B})}if(k.gold>0){const B=k.gold*U;Mt.R.addDebugMessage(`Gold: ${B}`),F.push({type:"gold",N:B})}if(nt.A.isDefined(B)&&1!==B&&k.zoneCurrency>0){const G=k.zoneCurrency*U;Mt.R.addDebugMessage(`Zone Currency ID ${B}: ${G}`),F.push({type:"currency",ID:B,N:G})}if(k.festivalCurrencyPerEnemy>0||k.festivalCurrency>0){at.q.instance.prodigy.skin.getActiveFestivals().forEach((B=>{const U=ht.t.getItemDrops(B.getBattleDrops(G,k.festivalCurrencyPerEnemy,k.festivalCurrency));F.push(...U)}))}return F}getDefeatData(){return this._localConfig.defeatData}showDefeatedDialogue(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=new pt.rD(at.q.instance.game);k.addEvents([{dialogueData:k.dataProvider.get(1535),type:pt.fA.DEFAULT,blockInput:!0}]);const B=new j.bnh;return k.start(!0,(()=>{B.resolve()})),B}))}alertActiveUnitMpEmpty(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this._activeUnit.alertMpEmpty()}))}castActionResultsDisplayTriggered(){}getStateOverride(k){return this._forceEndBattle&&this.canBattleEndDelayed()?(this._forceEndBattle=!1,this._forceEndState):null}isRescueAvailable(k=!0){return!!this._activeUnit.spells.some((k=>k.spellId===this.battleConstants.rescueSpellId))&&(!!this.rightTeam.isRescuable()&&(!!this.getUnits().some((k=>k.isInARescuableState()))&&(!k||this._activeUnit.currentMp>0)))}isRescueInSpellPool(){return this.getUnits().some((k=>k.hasAccessToSpell(this.battleConstants.rescueSpellId)))}moveUnitToTeam(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){var $,H;const V=k.isAlive(),W=this.getTeamById(B),q=fe.find((k=>kB.setAnimationByName(0,"pet-rescue-front",!1)));const U=new j._mx(k.creature.creatureGameObject).addComponent(j.v2j);U.GameObject.sendToBack(),U.setAsset(Z.Q.Spine_pet_shadow_effect_back_json,(()=>U.setAnimationByName(0,"pet-rescue-back",!1))),yield Promise.all([B.getSpine().onComplete.asPromise(),U.getSpine().onComplete.asPromise(),this.setActiveUnit(null),(()=>(0,F.sH)(this,void 0,void 0,(function*(){var B;yield j.Egh.timeout(2800),null===(B=k.creature.animator.spine)||void 0===B||B.getSpine().setTint(16777215)})))()]),yield k.playDefeated()}else yield Promise.all([this.setActiveUnit(null),k.playDefeated()]);K.setData(Object.assign(Object.assign({},k.data),{teamId:B}),null!=U?U:k.creature.teleportType),K.loadPromise.then((()=>(0,F.sH)(this,void 0,void 0,(function*(){if(K.creature.creatureGameObject.active=!1,K.uiContent.active=!1,K.uiContent.findComponent(St.x).targetComponent.getRootContainer().alpha=0,K.setUnitTooltipTriggerEnabled(!1),V){if(G){const k=K.creature.creatureGameObject;k.onActiveChanged.add((()=>{k.active&&(G(K),k.onActiveChanged.removeAll(this))}),this)}yield K.enterBattle(!0,!this._ignoreUnitEntranceUIWhenMoving)}K.creature.teleportType=z,K.controllerUnit=Y})))).catch(j.RQr.createHandler("Unable to load moved unit")),K.transferStatusEffectData(k),K.updateDisplayedStatusEffects(),K.updateIdleStatusEffect(),K.updatePersistentStatusEffects(),k.clearData();const J=j.wa5.getActiveScene().container;J.rebind("LeftTeamUnits").toConstantValue(this.leftTeam.units),J.rebind("RightTeamUnits").toConstantValue(this.rightTeam.units)}))}addUnitToTeam(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=this.getUnitSpellData({[k.unitId]:k});yield this.preloadUnitSpells(U),yield this.preloadUnitSpellIcons(U);const $=at.q.instance.game.state.states.get(vt.G.SecureBattleRevamp);yield at.q.instance.prodigy.load.assetsAsPromise($.getUnitAssets({[k.unitId]:k}));const H=this.getTeamById(B),V=ue.find((k=>k(0,F.sH)(this,void 0,void 0,(function*(){W.creature.creatureGameObject.active=!1,W.uiContent.active=!1,W.uiContent.findComponent(St.x).targetComponent.getRootContainer().alpha=0,W.setUnitTooltipTriggerEnabled(!1),yield W.enterBattle(!0,!this._ignoreUnitEntranceUIWhenMoving),yield W.updateRescuableUI()})))).catch(j.RQr.createHandler("Unable to load added unit"));const q=j.wa5.getActiveScene().container;q.rebind("LeftTeamUnits").toConstantValue(this.leftTeam.units),q.rebind("RightTeamUnits").toConstantValue(this.rightTeam.units)}))}handleStateChange(k){this._isAnsweringQuestion=k instanceof Zt.o,this._isChoosingSpell=k instanceof ee.W,this._isPerformingAction=k instanceof ce.a||k instanceof he.N,this.updateInteractionPointerForUnits()}onRescueCompleted(){this.rightTeam.units.forEach((k=>{k.setNewIndicatorActive(k.isARescuableUnit())}))}onNewRound(k){1===k&&this.highlightRescuableUnits().catch((k=>j.RQr.logError(k,"Error: Could not highlight rescuable units")))}cleanUpSpellCards(){this.spellCardsController=null,this.spellCardsPrefab&&(this.spellCardsPrefab.destroy(),this.spellCardsPrefab=null)}destroy(){var k,B,U;at.q.instance.prodigy.game.time.events.remove(this._updateTimer),null===(k=this._unitInfoTooltip)||void 0===k||k.GameObject.destroy(),this._stateMachinePromise=null;const F=j.wa5.getActiveScene();this._prefabRoot&&(F.removeGameObject(this._prefabRoot),this._prefabRoot.destroy()),this._prefabRoot=null,F.container.unbind("LeftTeamId"),F.container.unbind("RightTeamId"),F.container.unbind("976-9e42"),F.container.unbind("LeftTeamUnits"),F.container.unbind("RightTeamUnits"),F.container.unbind("NetworkHandler"),this.leftTeam=null,this.rightTeam=null,this.battleStats=null,this._rescueAvailableSequence=null,this._stateMachine&&(this._stateMachine.onVictory.removeAll(this),this._stateMachine.onDefeat.removeAll(this),this._stateMachine.onEscape.removeAll(this),this._stateMachine.onStateChange.removeAll(this),this._stateMachine.battleController=null),this.battleResult&&this.battleResult.onClosed.removeAll(this),this.battleResult=null,this._stateMachine=null,this._activeUnit=null,this.mapRoot=null,this._spellComponents.clear(),this.onChoosingSpell.dispose(),this.onSpellCardSelected.dispose(),this.onSpellCardUnselected.dispose(),this.onSpellTargetChosen.dispose(),this.onSpellCardsRemoved.dispose(),this.onBattleEnded.dispose(),this.cleanUpSpellCards(),Lt.D.clearNewlyRescuableUnitsSeen(),null===(B=this.postBattleExpressModeController)||void 0===B||B.destroy(),null===(U=this._statusEffectAnimationController)||void 0===U||U.destroy()}setVisibleUnitInfoTooltip(k){var B,U;if(this.isPerformingAction)return;const F=null!==(B=null==k?void 0:k.isInARescuableState())&&void 0!==B&&B;k&&F&&(this._unitInfoTooltip.onPetRescueButtonClicked.removeAll(this),this._unitInfoTooltip.onPetRescueButtonClicked.add((()=>{this.sendUnitTooltipRescueButtonClickedEvent(),this.attemptToRescueUnit(k)}),this)),this.updateWalletDisplay(F),k&&k.onInfoTooltipHidden.addOnce(this.hideUnitInfoTooltip.bind(this),this),null===(U=this._unitInfoTooltip)||void 0===U||U.showTooltipForUnit(k),this.sendShowUnitTooltipEvent(k)}loadUnitInfoTooltip(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B;const U=yield this._prefabLoader.loadWithDependenciesFromGUID(z.l.FullUnitInfo);this._unitInfoTooltip=U.findComponent(zt.$),null===(B=null===(k=this._unitInfoTooltip)||void 0===k?void 0:k.onTooltipClosed)||void 0===B||B.addOnce(this.hideUnitInfoTooltip.bind(this),this)}))}onClickUnitTooltip(k){this.isChoosingSpell&&this.showUnitTooltip(k)}showUnitInfoTooltip(k){(null==k?void 0:k.isAlive())&&this.setVisibleUnitInfoTooltip(k),k.updatePetRescueTooltip()}sendShowUnitTooltipEvent(k){var B;const U={interfaceName:Tt.B.BattlePetInfoWidget,interfaceType:_t.Wm.InfoPanel,instanceType:yt.N.UI,originType:_t.$N.ButtonClick};nt.A.isDefined(k)||(U.closeMethod=_t.Lv.Toggle),null===(B=this._segment)||void 0===B||B.featureCommon.sendInterfaceEvent(U)}sendUnitTooltipRescueButtonClickedEvent(){const k={buttonName:wt.k.PetRescuePayMagicoin,interfaceName:Tt.B.BattlePetInfoWidget,interfaceType:_t.Wm.InfoPanel,destinationName:Tt.B.PetRescueAttempt};this._segment.featureCommon.sendButtonEvent(k)}attemptToRescueUnit(k){if(!nt.A.isDefined(k)||!k.isInARescuableState())return;const B=new xt.a(at.q.instance.prodigy.game,k),U=k.battleId,F=()=>{this.onSpellTargetChosen.dispatch(),this.spellCardsController.inputBlocker.active=!0,this._stateMachine.goToState(he.N,{type:G.EBattleAction.CastSpell,id:this.battleConstants.rescueSpellId,targets:[U]}),k.updatePetRescueTooltip()};B.onRescueContinue.add((()=>{F(),B.destroy()})),B.onRescueDismissed.add((()=>{B.destroy()})),B.onRescueFailed.add((U=>{var F,G,j,$;U===xt.n.CannotAfford?(null===(G=null===(F=null==this?void 0:this.spellCardsController)||void 0===F?void 0:F.targetController)||void 0===G||G.showHardCurrencyBalanceTooltip(k.creature),null===($=null===(j=null==this?void 0:this.spellCardsController)||void 0===j?void 0:j.targetController)||void 0===$||$.onHardCurrencyBalanceTooltipHidden.addOnce((()=>B.onRescueDismissed.dispatch()))):B.destroy()})),B.start()}updateWalletDisplay(k){var B,U;let F;if(k){F={currency:27,value:at.q.instance.prodigy.gameContainer.get("306-5359").getCurrencyAmount(27)}}null===(U=null===(B=this.spellCardsController)||void 0===B?void 0:B.targetController)||void 0===U||U.setHardCurrencyBalanceDisplay(F)}debugCurrencyDrops(k,B){const U=B.filter((k=>"gold"===k.type||"currency"===k.type)).map((k=>`${k.type} ${k.ID}: ${k.N}`)),F=U.length>0?U.join(", "):"None";Mt.R.addDebugMessage(`${k}:\n${F}`)}hideUnitInfoTooltip(){this._unitInfoTooltip.onPetRescueButtonClicked.removeAll(this),this.sendShowUnitTooltipEvent(null),this.updateWalletDisplay(!1)}getStartBattleDebug(){const k=at.q.instance.prodigy.battle,B=[],U=[],F=[];this.getTeam(jt.h.Away).units.forEach((k=>{var G;"pet"===k.data.type&&(B.push(k.data.asset.id),U.push(k.level),F.push(null!==(G=k.data.mergeRank)&&void 0!==G?G:0))}));const G=null==k?void 0:k.battleMods;return G&&(G.encounter=void 0,G.maxTeamSize=void 0,G.minTeamSize=void 0,G.pets=void 0),`startBattle([${B.join(",")}], [${U.join(",")}], [${F.join(",")}], ${JSON.stringify(null!=G?G:{})})`}}be.NETWORK_LAG_MESSAGE_DELAY_MS=4e3,be.TURN_INDICATOR_ACTIVATE_ANIMATIONS={[jt.X.Small]:ae.SmallActivate,[jt.X.Normal]:ae.NormalActivate,[jt.X.Medium]:ae.LargeActivate,[jt.X.Large]:ae.LargeActivate,[jt.X.Huge]:ae.LargeActivate},be.TURN_INDICATOR_IDLE_ANIMATIONS={[jt.X.Small]:ae.SmallIdle,[jt.X.Normal]:ae.NormalIdle,[jt.X.Medium]:ae.LargeIdle,[jt.X.Large]:ae.LargeIdle,[jt.X.Huge]:ae.LargeIdle},be.TURN_INDICATOR_DEACTIVATE_ANIMATIONS={[jt.X.Small]:ae.SmallDeactivate,[jt.X.Normal]:ae.NormalDeactivate,[jt.X.Medium]:ae.LargeDeactivate,[jt.X.Large]:ae.LargeDeactivate,[jt.X.Huge]:ae.LargeDeactivate},(0,F.Cg)([(0,It.d)("NetworkHandler"),(0,F.Sn)("design:type",Xt.m)],be.prototype,"_networkHandler",void 0),(0,F.Cg)([(0,Ot.b)("073-6f3b"),(0,F.Sn)("design:type",Object)],be.prototype,"_featureProvider",void 0),(0,F.Cg)([(0,Ot.b)("d0e-64fd"),(0,F.Sn)("design:type",j.wNP)],be.prototype,"_prefabLoader",void 0),(0,F.Cg)([(0,It.d)("GameDataProvider"),(0,F.Sn)("design:type",Qt.q)],be.prototype,"_gameDataProvider",void 0),(0,F.Cg)([(0,Ot.b)("c47-20b6"),(0,F.Sn)("design:type",Et.Y)],be.prototype,"_segment",void 0),(0,F.Cg)([(0,It.d)("LocalConfig"),(0,F.Sn)("design:type",Object)],be.prototype,"_localConfig",void 0)},71790:(k,B,U)=>{"use strict";U.d(B,{T:()=>V});var F=U(8674),G=U(87490),j=U(79687),$=U(24521),H=U(23029);let V=class{get constants(){var k,B;return null!==(B=null===(k=H.R.loadData($.r.BattleRevampConstants_json))||void 0===k?void 0:k.battleConstants)&&void 0!==B?B:(new G.HardCodedConstantsDataProvider).constants}};V=(0,F.Cg)([(0,j.injectable)()],V)},80494:(k,B,U)=>{"use strict";var F;U.d(B,{t:()=>F}),function(k){k.BattleAcademyClassroomIceTower="battle-academy-classroom-icetower",k.BattleAcademyClassroom="battle-academy-classroom",k.BattleAcademyGh="battle-academy-gh",k.BattleAcademyGhStairs="battle-academy-gh-stairs",k.BattleAcademyOfficeIceTower="battle-academy-office-icetower",k.BattleAcademyOffice="battle-academy-office",k.BattleArchives="battle-archives",k.BattleBonfireInside="battle-bonfire-inside",k.BattleBonfireLava="battle-bonfire-lava",k.BattleBonfireOutside="battle-bonfire-outside",k.BattleBonfireTitan="battle-bonfire-titan",k.BattleForestGeneric="battle-forest-generic",k.BattleForestOutside="battle-forest-outside",k.BattleLamplightOutside="battle-lamplight-outside",k.BattleLamplightOutsidePumpkinFest="battle-lamplight-outside-pumpkinfest",k.BattleLamplightOutsidePumpkinFestNight="battle-lamplight-outside-pumpkinfest-night",k.BattleLamplightOutsideSpringfest="battle-lamplight-outside-springfest",k.BattleLamplightOutsideWinterfest="battle-lamplight-outside-winterfest",k.BattleLamplightOutsideSummerfest="battle-lamplight-outside-summerfest",k.BattleLamplightOutsideStarlight="battle-lamplight-outside-starlight",k.BattleMoon="battle-moon",k.BattleMoonlight="battle-moonlight",k.BattleShipwreckInside="battle-shipwreck-inside",k.BattleShipwreckOutside="battle-shipwreck-outside",k.BattleShipwreckUnderwater="battle-shipwreck-underwater",k.BattleShiverchillInside="battle-shiverchill-inside",k.BattleShiverchillOutside="battle-shiverchill-outside",k.BattleSkywatchInside="battle-skywatch-inside",k.BattleSkywatchOutside="battle-skywatch-outside",k.BattleTowerInside="battle-tower-inside",k.BattleGrotto="battle-grotto"}(F||(F={}))},81531:(k,B,U)=>{"use strict";U.d(B,{q:()=>j});var F=U(95891),G=U(77938);class j{constructor(k){this._overrides=null!=k?k:{}}getItem(k,B){var U;const j=G.t.getItem(k,B),$=null===(U=this._overrides[k])||void 0===U?void 0:U[`${B}`];return F.merge({},j,$)}}},17710:(k,B,U)=>{"use strict";U.d(B,{D:()=>Q});var F=U(91323),G=U(87490),j=U(62459),$=U(88022),H=U(43523),V=U(25531),W=U(29738),q=U(43846),K=U(77938),z=U(76277),Y=U(30226);class Q{static formatStatusEffectDescription(k,B,U){const G=Q.getTargetReplacementString(U),j=W.O.isEnglishLocale()?(0,F.t)("turn",B):(0,q.k)("STATUS_EFFECT_TURNS");return V.w.replaceMultiple(k,["{NUMBER_OF_TURNS}","{TURNS}","{TARGET}"],B,j,G)}static getStatusEffectInjectedValues(k){var B,U,F;!1===(0,z.G)(H.P)&&(k.statusEffects=[]);const G=null===(B=k.statusEffects)||void 0===B?void 0:B[0],V=null==G?void 0:G.statusEffectId;if(!j.Aq$.isDefined(V))return{SPELL_HAS_STATUS_EFFECT:!1};const W=K.t.getItem("statusEffect",V),X=null==W?void 0:W.data,Z=null!==(F=null===(U=null==G?void 0:G.duration)||void 0===U?void 0:U.remainingDuration)&&void 0!==F?F:0,J=W?Y.J.getItemName(W):"",tt=W?(0,q.k)(Y.J.getLocalizationFlavorKey(W)):"";return{SPELL_HAS_STATUS_EFFECT:!0,SPELL_STATUS_EFFECT_NAME:J,SPELL_STATUS_EFFECT_DESCRIPTION:Q.formatStatusEffectDescription(tt,Z),SPELL_STATUS_EFFECT_ICON:[$._.Ui_spell_effect_icons_json,X.icon]}}static getTargetReplacementString(k){switch(null==k?void 0:k.statGrowthTrackName){case G.EStatGrowthTrackName.Boss:case G.EStatGrowthTrackName.IllusionBoss:case G.EStatGrowthTrackName.PuppetMaster:return(0,q.k)("TARGET_BOSS");case G.EStatGrowthTrackName.Miniboss:case G.EStatGrowthTrackName.Pippet:return(0,q.k)("TARGET_MINIBOSS");case G.EStatGrowthTrackName.Wizard:case G.EStatGrowthTrackName.HoodedWizard:return(0,q.k)("TARGET_WIZARD");case G.EStatGrowthTrackName.DragonBoss:return(0,q.k)("TARGET_DRAGON");default:return(0,q.k)("TARGET_PET")}}}},23506:(k,B,U)=>{"use strict";U.d(B,{V:()=>j});var F=U(62459),G=U(59685);class j{static getBotPersonalityInstanceConfig(k,B){var U;const G=this.globalDuelBotPersonalityConfig.streakConfig.reduce(((k,B)=>B.playerStreak>k?B.playerStreak:k),-1/0),j=this.globalDuelBotPersonalityConfig.streakConfig.reduce(((k,B)=>B.playerStreakk.playerStreak===$)))&&void 0!==U?U:this.globalDuelBotPersonalityConfig.streakConfig[0],V=this.globalDuelBotPersonalityConfig.timingsConfig;return{timings:{questionAnswer:{timings:{average:F.cj9.random(V.questionAnswer.timings.average.min,V.questionAnswer.timings.average.max),variance:V.questionAnswer.timings.variance},maxTimeOverPlayer:V.questionAnswer.maxTimeOverPlayer},spellChoiceTimings:{average:F.cj9.random(V.spellChoiceTimings.average.min,V.spellChoiceTimings.average.max),variance:V.spellChoiceTimings.variance}},streakModifiers:H,personalityType:k}}}j.GLOBAL_DUEL_BOT_TIME_CONFIG={questionAnswer:{timings:{average:{min:15,max:35},variance:.3},maxTimeOverPlayer:8},spellChoiceTimings:{average:{min:4,max:8},variance:.3}},j.GLOBAL_DUEL_BOT_STREAK_BASED_CONFIG=[{playerStreak:-2,questionAnswerPenalty:.66,levelOffset:-3,streakOffset:0,elementalPrep:G.E.Dumb},{playerStreak:-1,questionAnswerPenalty:.33,levelOffset:-2,streakOffset:0,elementalPrep:G.E.Dumb},{playerStreak:0,questionAnswerPenalty:.25,levelOffset:-1,streakOffset:0,elementalPrep:G.E.Dumb},{playerStreak:1,questionAnswerPenalty:.25,levelOffset:0,streakOffset:0,elementalPrep:G.E.Dumb},{playerStreak:2,questionAnswerPenalty:.2,levelOffset:0,streakOffset:0,elementalPrep:G.E.Ok},{playerStreak:3,questionAnswerPenalty:.15,levelOffset:0,streakOffset:1,elementalPrep:G.E.Ok},{playerStreak:4,questionAnswerPenalty:.1,levelOffset:1,streakOffset:1,elementalPrep:G.E.Smart},{playerStreak:5,questionAnswerPenalty:.1,levelOffset:1,streakOffset:2,elementalPrep:G.E.Smart},{playerStreak:6,questionAnswerPenalty:.05,levelOffset:2,streakOffset:3,elementalPrep:G.E.Tricky},{playerStreak:7,questionAnswerPenalty:.05,levelOffset:3,streakOffset:4,elementalPrep:G.E.Tricky},{playerStreak:8,questionAnswerPenalty:0,levelOffset:4,streakOffset:5,elementalPrep:G.E.Reversed}],j.globalDuelBotPersonalityConfig={timingsConfig:j.GLOBAL_DUEL_BOT_TIME_CONFIG,streakConfig:j.GLOBAL_DUEL_BOT_STREAK_BASED_CONFIG}},39070:(k,B,U)=>{"use strict";U.d(B,{i:()=>K});var F=U(8674),G=U(62459),j=U(88541),$=U(35120),H=U(71586),V=U(30226),W=U(4845);class q extends W.P{validateRoom(k){return super.validate({room:k.room,inSchoolHours:k.inSchoolHours,playerLevel:k.player.getLevel(),isMember:k.isMember,numBattlesUsed:k.numBattlesUsed},[()=>this.meetsEntryCostRequirement(k.room,k.player)])}meetsEntryCostRequirement(k,B){if(!k.entryCost)return{eligible:!0};const U=Array.isArray(k.entryCost)?k.entryCost:[k.entryCost],F=U.every((k=>{var U,F;return"gold"===k.type?B.getGold()>=k.amount:(null===(F=B.backpack.getItem(k.type,null!==(U=k.id)&&void 0!==U?U:-1))||void 0===F?void 0:F.N)>=k.amount}));return this._noEntryCostKeys.tooltip.body.args=[U[0].amount,U[0].type],this.getEligibilityObject(F,W.R.NoEntryCost)}}class K{static getValidatedRoomsConfig(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=j.GM;B.rooms=B.rooms.filter((k=>k.active));const U=$.q.instance.prodigy.gameContainer.get("56f-1ccb"),F=yield U.getDailyDuelUses(),W=H.R.getNowWithServerTimezoneOffset(),K=new q($.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService)),z=B.rooms.map((B=>{var U,G;return Object.assign(Object.assign(Object.assign({},B),K.validateRoom({room:B,player:k,inSchoolHours:V.J.isDateWithinSchoolHours(W)&&V.J.isSchoolDay(W),isMember:k.hasMembership(),numBattlesUsed:null!==(U=F[B.id])&&void 0!==U?U:0})),{numBattlesUsed:null!==(G=F[B.id])&&void 0!==G?G:0})}));return Object.assign(Object.assign({},B),{rooms:z})}))}}},75408:(k,B,U)=>{"use strict";U.d(B,{d:()=>ot});var F,G=U(8674),j=U(62459),$=U(95891),H=U(88022),V=U(99625),W=U(36648),q=U(88541),K=U(4845),z=U(35120),Y=U(43846),Q=U(73797),X=U(23082),Z=U(13956),J=U(64353),tt=U(95057),et=U(31211),it=U(6719),st=U(47255),nt=U(52491),at=U(64007),rt=U(39070);!function(k){k.PlayerPosition="PLAYER_POSITION",k.OnClose="ON_CLOSE",k.RoomsData="ROOMS_DATA",k.BackingColor="BACKING_COLOR",k.HeaderImage="HEADER_IMAGE",k.HeaderTextColor="HEADER_TEXT_COLOR",k.RoomName="ROOM_NAME",k.IsFindMatchDisabled="IS_FIND_MATCH_DISABLED",k.IsRoomCardDisabled="IS_ROOM_CARD_DISABLED",k.IsLockedLevel="IS_LOCKED_LEVEL",k.IsLockedTime="IS_LOCKED_TIME",k.LockBarColor="LOCK_BAR_COLOR",k.LockMessage="LOCK_MESSAGE",k.BorderColor="BORDER_COLOR",k.ContentBackingColor="CONTENT_BACKING_COLOR",k.ContentBorderColor="CONTENT_BORDER_COLOR",k.RewardIcon="REWARD_ICON",k.RewardText="REWARD_TEXT",k.KeyStates="KEY_STATES",k.KeyState="KEY_STATE",k.LowerLockVisible="LOWER_LOCK_VISIBLE",k.LowerLockCalendar="LOWER_LOCK_CALENDAR",k.LowerLockLock="LOWER_LOCK_LOCK",k.LowerLockMessage="LOWER_LOCK_MESSAGE",k.CostBackingColor="COST_BACKING_COLOR",k.CostText="COST_TEXT",k.CostTextColor="COST_TEXT_COLOR",k.CostIcon="COST_ICON",k.OnClickFindMatch="ON_CLICK_FIND_MATCH",k.NumBattlesUsed="NUM_BATTLES_USED",k.ElementalBoostText="ELEMENTAL_BOOST_TEXT",k.ElementalBoostTextColor="ELEMENTAL_BOOST_TEXT_COLOR",k.ElementalBoostTextStrokeColor="ELEMENTAL_BOOST_TEXT_STROKE_COLOR",k.ElementalBoostIcon="ELEMENTAL_BOOST_ICON"}(F||(F={}));class ot{static openDuelsStadiumMenu(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=j.wa5.getActiveScene().container.get(F.PlayerPosition),U=null!=B?B:z.q.instance.game.broadcaster.broadcast(Q.pm.GetTarget,z.q.instance.game,[!0]),G=yield rt.i.getValidatedRoomsConfig(),H=$.uniq(G.rooms.reduce(((k,B)=>(B.style.headerImage&&k.push(it.y.toInjectionParams(B.style.headerImage)[0]),B.style.headerImageDisabled&&k.push(it.y.toInjectionParams(B.style.headerImageDisabled)[0]),B.prizeIcon&&k.push(it.y.toInjectionParams(B.prizeIcon)[0]),k)),[]));z.q.instance.prodigy.audio.playBGM(z.q.instance.prodigy.world.getZone(z.q.instance.prodigy.world.getCurrentZone()).bgmID,!0),z.q.instance.prodigy.startPrefabScene([V.l.DuelsStadiumMenu],{preloadAssets:H,injectedValues:Object.assign(Object.assign({},yield ot.getElementalBoostInjectionDictionary()),{[F.OnClose]:null!=k?k:ot.getCloseToMapCallback.bind(this,U),[F.RoomsData]:G.rooms.map((k=>{var B,G,j,$,H,V,W,Y,Q,Z,J,tt,et,st;const nt=!k.eligible&&!!(null===(G=null===(B=k.ineligibleReason)||void 0===B?void 0:B.card)||void 0===G?void 0:G.topMessage);let at=k.style;nt&&k.ineligibleReason.type!==K.R.TimeOfDayLocked&&(at=Object.assign(Object.assign(Object.assign({},at),q.Ct),{headerImage:at.headerImageDisabled}));return{[F.BackingColor]:at.backingColor,[F.HeaderImage]:it.y.toInjectionParams(at.headerImage),[F.HeaderTextColor]:at.headerTextColor,[F.RoomName]:this._localizer.getText(k.nameKey),[F.IsRoomCardDisabled]:nt,[F.IsFindMatchDisabled]:!k.eligible&&(null===(j=k.ineligibleReason)||void 0===j?void 0:j.type)!==K.R.NoMembership,[F.IsLockedLevel]:!k.eligible&&(null===($=k.ineligibleReason)||void 0===$?void 0:$.type)===K.R.LevelLocked,[F.IsLockedTime]:!k.eligible&&(null===(H=k.ineligibleReason)||void 0===H?void 0:H.type)===K.R.TimeOfDayLocked,[F.LockBarColor]:at.lockBarColor,[F.LockMessage]:null===(W=null===(V=k.ineligibleReason)||void 0===V?void 0:V.card)||void 0===W?void 0:W.topMessage,[F.BorderColor]:at.borderColor,[F.ContentBackingColor]:at.contentBackingColor,[F.ContentBorderColor]:at.contentBorderColor,[F.KeyStates]:this.getKeyStatesInjectionList(k),[F.LowerLockVisible]:!!(null===(Q=null===(Y=k.ineligibleReason)||void 0===Y?void 0:Y.card)||void 0===Q?void 0:Q.bottomMessage),[F.LowerLockCalendar]:(null===(Z=k.ineligibleReason)||void 0===Z?void 0:Z.type)===K.R.NoBattlesAvailable,[F.LowerLockLock]:[K.R.LevelLocked,K.R.TimeOfDayLocked].includes(null===(J=k.ineligibleReason)||void 0===J?void 0:J.type),[F.LowerLockMessage]:null===(et=null===(tt=k.ineligibleReason)||void 0===tt?void 0:tt.card)||void 0===et?void 0:et.bottomMessage,[F.RewardText]:`${this.itemAmountToInjectionParams(k.prize)}\n${this._localizer.getText("GOLD")}`,[F.RewardIcon]:it.y.toInjectionParams(k.prizeIcon),[F.CostBackingColor]:at.costBackingColor,[F.CostText]:this.itemAmountToInjectionParams(k.entryCost),[F.CostTextColor]:k.eligible||(null===(st=k.ineligibleReason)||void 0===st?void 0:st.type)!==K.R.NoEntryCost?void 0:"#b80000",[F.OnClickFindMatch]:()=>{var B;if(k.eligible)return z.q.instance.prodigy.gameContainer.get("c47-20b6").duelsStadium.sendRoomSelectedEvent(k),z.q.instance.game.state.start(X.G.DuelMatchmaking,void 0,U,k.id);(null===(B=k.ineligibleReason)||void 0===B?void 0:B.type)===K.R.NoMembership&&this.openMembershipPrompt()}}}))})})}))}static itemAmountToInjectionParams(k){return`${k?(Array.isArray(k)?k[0]:k).amount:(0,Y.k)("ITEMCARD_FREE")}`}static getCloseToMapCallback(k){const B=j.wa5.getActiveScene().getLayer(nt.A.LEGACY_MENU_LAYER_NAME);z.q.instance.prodigy.open.menuLayer=B,z.q.instance.prodigy.open.map({onCloseButtonClicked:()=>{const B=z.q.instance.prodigy.gameContainer.get("306-5359");z.q.instance.prodigy.world.it(B.data.zone,null==k?void 0:k.x,null==k?void 0:k.y)}})}static getKeyStatesInjectionList(k){const B=Math.min(k.numBattlesUsed,k.freeBattles),U=Math.max(0,k.freeBattles-k.numBattlesUsed),G=Math.max(0,k.numBattlesUsed-k.freeBattles),j=k.memberBattles-G;return[...$.range(B).map((()=>({[F.KeyState]:q.d6.FreeUsed}))),...$.range(U).map((()=>({[F.KeyState]:q.d6.Free}))),...$.range(G).map((()=>({[F.KeyState]:q.d6.MemberUsed}))),...$.range(j).map((()=>({[F.KeyState]:q.d6.Member})))]}static openMembershipPrompt(){let k=!1;const B=J.P.shouldUseUnifiedConversionFlow(st.o.FunnelLockedStadiumRoom)?tt.R.UnifiedConversionFlow:tt.R.DynamicMemberPrompt;z.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:"Stadium-Member-Locked-Room",category:"Duels",contentId:null,adType:B,adVersion:J.P.getAdVersion(st.o.FunnelLockedStadiumRoom)});const U=z.q.instance.prodigy.open;U.membershipInfo((()=>{z.q.instance.prodigy.gameContainer.get("306-5359").hasMembership()&&!k&&(k=!0,ot.openDuelsStadiumMenu().catch(j.RQr.createHandler("Failed to open Duels Stadium Menu after closing membership prompt")))}),{conversionFunnelName:st.o.FunnelLockedStadiumRoom});const F=U.menus.find((k=>k instanceof et.v));F&&F.onCreate.addOnce((()=>{var k;return null===(k=F.prefabGameObject)||void 0===k?void 0:k.setLayer(nt.A.LEGACY_MENU_LAYER_NAME,!0)}))}static getElementalBoostInjectionDictionary(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=z.q.instance.prodigy.gameContainer.get("ce9-b630");yield k.cacheElementalBoost();const B=at._.ELEMENT_BOOST_TEXT_CONFIG[k.elementalBoost];return{[F.ElementalBoostText]:this._localizer.getText(B.localizationKey),[F.ElementalBoostTextColor]:B.textColor,[F.ElementalBoostTextStrokeColor]:B.textStrokeColor,[F.ElementalBoostIcon]:[H._.Ui_battle_revamp_json,`icon-mini-element-${k.elementalBoost}`]}}))}static getElementalBoostModifierIconInjectionData(k){const B=at._.ELEMENT_BOOST_TEXT_CONFIG[k];return{IS_BUFF:!0,DISABLED:!1,MODIFIER_ICON:ot.getGuidForBoostIcon(k),MODIFIER_TEXT:"",MODIFIER_TOOLTIP_TITLE:this._localizer.getText(B.localizationKey),MODIFIER_TOOLTIP_TEXT:this._localizer.getText(B.descriptionLocalizationKey)}}static getGuidForBoostIcon(k){return W.q[`Effect_${k}_buff_2_small`]}}(0,G.Cg)([(0,Z.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],ot,"_localizer",void 0)},58203:(k,B,U)=>{"use strict";U.d(B,{m:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(76546);let H=class extends $.D{get networkRequestBehaviour(){return{timeoutMs:3e4,retryCount:185,retryIntervalMs:1e3,retryIncrementMs:1e3,retryMaxDelayMs:1e4}}createBattle(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Battle.Start,{config:k})}))}createBattleSim(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Battle.Debug.SimulateBattle,{config:k})}))}doStatusEffectSim(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Battle.Debug.SimulateStatusEffectCalculations,{config:k})}))}doBattleAction(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Battle.Action,{action:k,battleId:B})}))}doDebugCommand(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){0}))}resumeBattle(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Battle.Resume,null)}))}escapeBattle(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Battle.Escape,null,!0)}))}clearBattleState(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(j.D.Battle.ClearBattleState,{},!0)}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},60668:(k,B,U)=>{"use strict";U.d(B,{o:()=>q});var F=U(87490),G=U(62459),j=U(35120),$=U(34829),H=U(44094),V=U(95807),W=U(21945);class q extends V.Z{constructor(){super(),this._qiOpenTimeout=window.setTimeout((()=>{this.fireFailureSegmentEvent()}),2e4),this.openQI=this.openQI.bind(this)}enter(){this.openQI()}openQI(){this.battleController.alertActiveUnitMpEmpty().then((()=>{if(G.wa5.getActiveScene().container.rebind("84a-1738").toConstantValue(Date.now()),$.s.get("GameConstants.Debug.EDUCATION_ENABLED")){const k=G.wa5.getActiveScene().container.get("976-9e42");k.OnQuestionOpened.addOnce((()=>window.clearTimeout(this._qiOpenTimeout))),k.OnQuestionAnswered.addOnce(this.onQuestionAnswered.bind(this)),k.open({forceAnswerBonus:!0,energyCost:0,allowTutorials:this.battleController.allowVideoLessons,canInstantWin:!1,showTopicBadgeAnimations:this.battleController.showQiBadgeAnimations})}else this.onQuestionAnswered(Math.random()<$.s.get("GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT"),0,10)})).catch((k=>{G.RQr.logError(k,"Error opening question interface"),this.stateMachine.showThrownErrorDialog(k)}))}onQuestionAnswered(k,B,U,G,j,$,H){k&&this.battleController.textLog.showMessage("BATTLE_REVAMP_TEXT_POWER_UP"),this.stateMachine.segment.battleRevamp.updateQuestionData(k,H),this.stateMachine.goToState(W.N,{type:F.EBattleAction.PowerUp,correctAnswer:k,nFactor:null!=U?U:1})}fireFailureSegmentEvent(){j.q.instance.prodigy.gameContainer.get("c47-20b6").sendCustomEvent("Answer Question State No QI",{instance_id:H.$.generateUID(),battleId:this.battleController.battleId,battleType:this.battleController.type})}exit(){window.clearTimeout(this._qiOpenTimeout)}}},52516:(k,B,U)=>{"use strict";U.d(B,{W:()=>Q});var F=U(8674),G=U(87490),j=U(62459),$=U(82351),H=U(35120),V=U(50084),W=U(34234),q=U(81531),K=U(60668),z=U(95807),Y=U(21945);class Q extends z.Z{enter(){this.battleController.activeUnit.currentMp<=0?this.stateMachine.goToState(K.o):(this.attachTargetSignals(),this.battleController.onChoosingSpell.dispatch())}exit(){const k=this.battleController.spellCardsController.targetController;k.onTargetConfirmed.removeAll(this),k.onActionChange.removeAll(this.battleController.activeUnit)}attachTargetSignals(){this.battleController.updateSpellCards();const k=this.battleController.spellCardsController.targetController;k.onTargetConfirmed.add(this.processTargetConfirmed,this),k.onActionChange.add(this.battleController.activeUnit.onSelectSpell,this.battleController.activeUnit)}processTargetConfirmed(k,B){var U;try{const F=B.targets.filter((k=>j.Aq$.isDefined(k.battleId)&&k.isTargetable)).map((k=>k.battleId));H.q.instance.prodigy.audio.playSFXFromGUID($.B.Sfx_unit_select);const W=()=>{this.battleController.onSpellTargetChosen.dispatch(),this.battleController.spellCardsController.inputBlocker.active=!0,this.stateMachine.goToState(Y.N,{type:G.EBattleAction.CastSpell,id:k.spellId,targets:F})};if(null===(U=this._gameDataProvider.getItem("spellV2",k.spellId).data.flags)||void 0===U?void 0:U.some((k=>k.flag===G.ESpellFlag.Rescue))){const k=this.battleController.rightTeam.units.find((k=>k.data.unitId===F[0])),B=new V.a(H.q.instance.prodigy.game,k);B.onRescueContinue.add((()=>{W(),B.destroy()})),B.onRescueDismissed.add((()=>{this.attachTargetSignals(),B.destroy()})),B.onRescueFailed.add((U=>{if(U===V.n.CannotAfford){const U=this.battleController.spellCardsController.targetController;U.showHardCurrencyBalanceTooltip(k.creature),U.onHardCurrencyBalanceTooltipHidden.addOnce((()=>B.onRescueDismissed.dispatch()))}else B.destroy()})),B.start()}else W()}catch(e){j.RQr.logError(e,"Error processing target"),this.stateMachine.showThrownErrorDialog(e)}}}(0,F.Cg)([(0,W.d)("GameDataProvider"),(0,F.Sn)("design:type",q.q)],Q.prototype,"_gameDataProvider",void 0)},78355:(k,B,U)=>{"use strict";U.d(B,{$:()=>H});var F=U(62459),G=U(35120),j=U(23082),$=U(95807);class H extends $.Z{enter(){this.battleController.onDefeat().then((()=>{const k=this.battleController.getDefeatData();if(!(null==k?void 0:k.preventDefaultTeleport)){const B=G.q.instance.game;(null==k?void 0:k.teleportData)&&B.state.states.get(j.G.Faint).updateTeleportData(null==k?void 0:k.teleportData),B.state.start(j.G.Faint,!1)}this.stateMachine.onDefeat.dispatch()})).catch((k=>{F.RQr.logError(k,"Error in battle defeat state"),this.stateMachine.showThrownErrorDialog(k)}))}}},69297:(k,B,U)=>{"use strict";U.d(B,{L:()=>j});var F=U(62459),G=U(95807);class j extends G.Z{enter(){this.battleController.onEscape().then((()=>{this.stateMachine.onEscape.dispatch()})).catch((k=>{F.RQr.logError(k,"Error in EscapeBattleState"),this.stateMachine.showThrownErrorDialog(k)}))}}},63046:(k,B,U)=>{"use strict";U.d(B,{B:()=>Rt});var F=U(87490),G=U(62459),j=U(35120),$=U(52516),H=U(95807),V=U(52855);class W extends V.a{enter(){const k=this._data,B=this.battleController.getUnitById(k.affix.unitId);null==B||B.showAffix(k.affix).catch(G.RQr.createHandler("Error adding affix to unit")).finally((()=>this.stateMachine.goToState(Rt)))}}var q=U(8674),K=U(40671),z=U(77938),Y=U(10670),Q=U(42430),X=U(30226);class Z extends V.a{constructor(k){super(k),this.statusEffectId=k.statusEffects[0].statusEffectId}enter(){const k=this.battleController.spellRoot.addComponent(Q.o);this.handleUpdate(k).catch(G.RQr.createHandler(`${this._data.type}: Error handling update for ${this.statusEffectId}`)).finally((()=>{k.destroy(),this.stateMachine.goToState(Rt)}))}handleUpdate(k){return(0,q.sH)(this,void 0,void 0,(function*(){const B=z.t.getItem("statusEffect",this.statusEffectId);if(!B)throw new Error("Status effect item not found");const U=Object.assign({id:this.statusEffectId},B.data),F=[],G=this._data.statusEffects;for(let k=0;k{F.forEach((k=>this.handleDamageApplied(k)))})),k.OnDestroy.add((()=>{F.forEach((k=>this.handleSpellCompleted(k)))})),yield k.preloadAssets(),yield k.begin({targets:F.map((k=>({unitId:k.battleId,gameObject:k.creature.creatureGameObject,statusEffectContainer:k.statusEffectContainer}))),manager:k,multiHit:1});for(const k of F)if(k.data.health.current<=0){const B=this.battleController.activeUnit;k.battleId===(null==B?void 0:B.battleId)&&(yield this.battleController.deactivateTurnIndicator()),yield this.defeatUnits([k])}}else F.forEach((k=>this.handleSpellCompleted(k)))}))}getSpellGuid(k){}updateBattleUnit(k){return(0,q.sH)(this,void 0,void 0,(function*(){}))}handleDamageApplied(k){}handleSpellCompleted(k){}getSpellGuidFromName(k){if(!k)return;const B=K.z[k];if(X.J.isGuid(B))return B;G.VyI.log(`"${k}" is not a valid spell`,G.$bb.Error)}sendSegmentEvent(k,B){var U,j;const $=this.stateMachine.segment.battleRevamp,H=B.map((k=>k.unitId)),V=H.map((k=>this.battleController.getUnitById(k))).filter((k=>void 0!==k));if(0===V.length)return void G.VyI.log(`No target battle units found for status effect ID ${k.id}`,G.$bb.Error);const W=V[0].data.teamId===F.ETeamId.Home?Y.B1.Player:Y.B1.Opponent,q=k.type;let K,z,Q,X;k.affixes.forEach((k=>{var B;k.type===F.EAffixType.Stat&&(K=k.stat,z=null!==(B=k.amount)&&void 0!==B?B:k.multiplier),k.type!==F.EAffixType.ApplyDamage&&k.type!==F.EAffixType.BonusElement||(Q=k.element),k.type!==F.EAffixType.ApplyDamage&&k.type!==F.EAffixType.ApplyHealing||(X=k.whenToTrigger)}));const Z={spell_id:B[0].spellId,status_effect_id:k.id.toString(),target_team:W,effect_type:q,modified_stat:K,modified_stat_value:z,element:Q,trigger_type:X};if(this._data.type===F.EBattleStateUpdate.AddStatusEffect){const k=B[0].remainingDuration;let U;X===F.EWhenToTrigger.WhenDurationExpires?U=k:X!==F.EWhenToTrigger.StartOfTurn&&X!==F.EWhenToTrigger.EndOfTurn||(U=1),$.sendSpellStatusEffectAppliedEvent(Object.assign({hit_targets:H,intended_targets:this._data.intendedTargets,rounds_active:k,rounds_till_triggered:U},Z))}if(this._data.type===F.EBattleStateUpdate.TriggerStatusEffect){const k=B[0].remainingDuration,F=null!==(j=null===(U=this._data.hitData)||void 0===U?void 0:U.damage)&&void 0!==j?j:0;$.sendSpellStatusEffectTriggeredEvent(Object.assign({target:H[0],number_of_times_triggered:B[0].timesTriggered,rounds_remains_active:k,damage:F},Z))}}}class J extends V.a{enter(){const k=this._data,B=k.unitData;this.battleController.addUnitToTeam(Object.assign({unitId:k.unitId},B),B.teamId).then((()=>{j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`${k.unitId} added to team ${B.teamId}`,G.$bb.Info),this.stateMachine.goToState(Rt)})).catch(G.RQr.createHandler(`Error adding ${k.unitId} to team ${B.teamId}`))}}var tt=U(28628),et=U(71543),it=U(74640);class st extends V.a{enter(){var k,B,U;const F=this._data,G=F.victoriousTeamId?F.victoriousTeamId===this.battleController.leftTeam.id?tt.XK.Victory:tt.XK.Defeat:tt.XK.Escape,$=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player;F.xpToAward&&(this.battleController.awardedXpData=F.xpToAward),this.battleController.postBattleRescuablePets=null!==(k=F.rescuablePets)&&void 0!==k?k:[],this.battleController.magicoinRewardGranted=null!==(B=F.magicoinRewardGranted)&&void 0!==B&&B,$.battleStreak=null===(U=null==F?void 0:F.lifetimeBattleStats)||void 0===U?void 0:U.battleStreak;const H=F.resumePreviousBattleData;H&&et.p.canResumeBattle()&&($.battleResumeData={battleType:H.battleType,data:H.clientState}),this.stateMachine.goToState(it.G,{battleResult:G,rewards:F.rewards,memberRewards:F.memberRewards,rewardsScalingInfo:F.rewardsScalingInfo,magicoinRewardGranted:F.magicoinRewardGranted,magicoinRewardEligible:F.magicoinRewardEligible,magicoinRewardGuaranteed:F.magicoinRewardGuaranteed})}}var nt=U(60604);U(34829);class at extends V.a{enter(){this.stateMachine.goToState(Rt)}}var rt=U(62886),ot=U(60157),ht=U(13956),ct=U(55080);class dt extends V.a{enter(){var k;const B=this.battleController.getUnitById(this._data.unitId);this._featureFlags.getValue("enableVerboseSecureBattle",!1)&&G.VyI.log("Unit defeated",G.$bb.Info,null==B?void 0:B.isDefeated(),null==B?void 0:B.isRescued,B),B&&!B.isRescued&&(null===(k=this._dynamicStore)||void 0===k||k.forceEnableDataUpdate(),this.sendDefeatUnitEvent(B)),this.stateMachine.goToState(Rt)}sendDefeatUnitEvent(k){const B=j.q.instance.prodigy.gameContainer.get("a25-68f4"),U={params:{taskEventType:ot.Z7.Unit,unitType:k.data.type,id:k.creature.id,name:k.creature.name,nickname:k.creature.nickname,team:k.data.teamId}};B.sendQuestEventViaHub(rt.T.DEFEAT_UNIT,U).catch(G.RQr.createHandler("Error sending a quest event for defeating a unit"))}}(0,q.Cg)([(0,ht.b)("80c-6fa4"),(0,q.Sn)("design:type",Object)],dt.prototype,"_featureFlags",void 0),(0,q.Cg)([(0,ht.b)("7a1-ff33"),(0,q.Sn)("design:type",ct.s)],dt.prototype,"_dynamicStore",void 0);class lt extends V.a{enter(){this.run(this._data).catch((k=>{G.RQr.logError(k,"Error letting unit escape from battle"),this.stateMachine.showThrownErrorDialog(k)}))}run(k){return(0,q.sH)(this,void 0,void 0,(function*(){j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`[Battle Revamp] A unit has escaped! Unit ID: ${k.unitId}`,G.$bb.Verbose);const B=this.battleController.getUnitById(k.unitId);B&&(yield B.playEscaped(),this.sendUnitEscapedEvent(B)),this.stateMachine.goToState(Rt)}))}sendUnitEscapedEvent(k){const B=j.q.instance.prodigy.gameContainer.get("a25-68f4"),U={params:{taskEventType:ot.Z7.Unit,unitType:k.data.type,id:k.creature.id,name:k.creature.name,nickname:k.creature.nickname,team:k.data.teamId}};B.sendQuestEventViaHub(rt.T.LET_UNIT_ESCAPE,U).catch(G.RQr.createHandler("Error sending a quest event for a unit escaping"))}}var ut=U(99625),ft=U(5491),bt=U(31029),pt=U(80060),vt=U(55122),gt=U(46855);class mt extends V.a{enter(){this.playerData=j.q.instance.prodigy.gameContainer.get("e20-0fb0");const k=this._data,B=this.battleController.getUnitById(k.unitId);G.VyI.log(`[Battle Revamp] A unit has levelled up to level ${k.level}`,G.$bb.Info),this.battleController.type===tt.gu.FireflyQ2Miniboss&&B.type===tt.uj.Wizard?this.runFireflyQ2LevelUpTutorial(k,B).catch((k=>{G.RQr.logError(k,"Error running FireflyQ2 LevelUp Tutorial"),this.stateMachine.showThrownErrorDialog(k)})):(B.updateLevel(k.level),this.stateMachine.goToState(Rt))}applyStarBonus(k,B){if(k.type===tt.uj.Wizard){const k=vt.s.xpRequiredForLevel(B,ft.V.Player),U=this.playerData.getStars();this.playerData.player.addStars(k-U)}else{const U=vt.s.xpRequiredForLevel(B,ft.V.Pet),F=this.battleController.leftTeam.getUnitIndex(k),G=this.playerData.player.kennel.petTeam.filter((k=>(null==k?void 0:k.creatureType)===ft.V.Pet)),j=G.length<2||F<2?G[0]:G[1],$=j.getStars();j.addStars(U-$)}}runFireflyQ2LevelUpTutorial(k,B){return(0,q.sH)(this,void 0,void 0,(function*(){const U=this.playerData.getStars(),F=vt.s.xpRequiredForLevel(k.level,ft.V.Player)-U,$=j.q.instance.prodigy.gameContainer.get("d0e-64fd"),H={baseXp:F,memberXp:0,totalNonMemberXp:F},V=(yield pt.d.loadWithInjectedValuesAndDependenciesFromGUID($,ut.l.FireflyQ2MidBattleTutorial,{xpBarPositionX:B.creature.worldPosition.x-5,xpBarPositionY:B.creature.worldPosition.y+77,particleLife:B.creature.worldPosition.x<500?new G.I9Y(1.6,1.6):new G.I9Y(.6,.6),creatureXpBarData:new gt.r(U,ft.V.Pet,H,vt.s.activePlayerLevelCap)})).findComponentInChildren(bt.u);V.run(),this.battleController.rightTeam.units.forEach((k=>{k.levelUi.setLayer("result",!0),k.creature.creatureGameObject.setLayer("result",!0)})),B.levelUi.setLayer("result",!0),B.creature.creatureGameObject.setLayer("result",!0),yield V.fsmVariables.applyLevelUp.onDispatch.asPromise(),B.creature.isOpponent||this.applyStarBonus(B,k.level),B.playLevelUp(),B.updateLevel(k.level),yield V.onComplete.asPromise(),this.battleController.rightTeam.units.forEach((k=>{k.levelUi.setLayer(void 0,!0),k.creature.creatureGameObject.setLayer(void 0,!0)})),B.levelUi.setLayer(void 0,!0),B.creature.creatureGameObject.setLayer(void 0,!0),this.stateMachine.goToState(Rt)}))}}class yt extends V.a{enter(){const k=this._data,B=this.battleController.getUnitById(k.unitId);k.mpResult>B.currentMp&&this.sendMpRecoverySegmentData(B,k.mpResult-B.currentMp),B.updateMp(k.mpResult),j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`${k.unitId} MP has been updated and it is now ${B.currentMp} !`,G.$bb.Info),this.stateMachine.goToState(Rt)}}class _t extends V.a{enter(){const k=this._data,B=this.battleController.getUnitById(k.unitId);B&&(B.spells.find((B=>B.spellId===k.spellId)).currentCooldown=k.cooldown,j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`${k.unitId} spell ${k.spellId} cooldown is now ${k.cooldown} !`,G.$bb.Info)),this.stateMachine.goToState(Rt)}}class Et extends V.a{enter(){const k=this._data,B=this.battleController.getUnitById(k.unitId);this.battleController.moveUnitToTeam(B,k.teamId).then((()=>{j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`${k.unitId} moved to team ${k.teamId}`,G.$bb.Info),this.stateMachine.goToState(Rt)})).catch(G.RQr.createHandler(`Error moving ${k.unitId} to team ${k.teamId}`))}}class wt extends V.a{enter(){const k=this._data.round;this.stateMachine.round=k,this.stateMachine.segment.battleRevamp.setRoundNumber(k),this.battleController.onNewRound(k),j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`Start of battle round ${k}`,G.$bb.Verbose),this.stateMachine.goToState(Rt)}}class Tt extends V.a{enter(){const k=this._data;for(const B of this.battleController.getUnits())B.removeAffix(k.affixId);this.stateMachine.goToState(Rt)}}class St extends V.a{enter(){var k;const B=this._data,U=this.battleController.getUnitById(B.unitId);U.updateHp(B.hpResult),U.reviveUnit();const $=[U.enterBattle(!0,!0,!0).then((()=>{U.updateRescuableUI(!1).catch(G.RQr.createHandler(`Error updating rescuable UI for ${B.unitId}`))}))];(null===(k=this.stateMachine.stateUpdateQueue[0])||void 0===k?void 0:k.type)===F.EBattleStateUpdate.ReviveUnit&&$.push(G.Egh.timeout(500)),Promise.race($).then((()=>{j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`${B.unitId} revived with ${B.hpResult} HP`,G.$bb.Info),this.stateMachine.goToState(Rt)})).catch(G.RQr.createHandler(`Error reviving ${B.unitId}`))}}var At=U(80313);class Ct extends V.a{enter(){const k=this._data;j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`Skipping turn for unit ${k.unitId}`,G.$bb.Info),V.a.createHitInfoText(this.battleController.getUnitById(k.unitId),{damage:0,damageInformation:F.EDamageInformation.Fumble,textKey:"BATTLE_REVAMP_TEXT_SKIP_TURN"}),this.stateMachine.goToState(Rt)}}var Ot=U(82351),It=U(8693),Dt=U(63761);class Rt extends H.Z{enter(){const k=this.battleController.getStateOverride(this.stateMachine.stateUpdateQueue[0]);if(k)return void this.stateMachine.goToState(k[0],...k.slice(1));const B=this.stateMachine.stateUpdateQueue.shift();if(!B)return void this.stateMachine.goToState($.W);j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`ProcessStateUpdateQueue - Processing state ${JSON.stringify(B)}`,G.$bb.Verbose);const U=Rt.STATE_UPDATES[B.type];U?this.stateMachine.goToState(U,B):this.stateMachine.goToState(Rt)}}Rt.STATE_UPDATES={[F.EBattleStateUpdate.CastSpell]:nt.a,[F.EBattleStateUpdate.ModifyMp]:yt,[F.EBattleStateUpdate.ModifyLevel]:mt,[F.EBattleStateUpdate.ModifySpellCooldown]:_t,[F.EBattleStateUpdate.ModifyUnitTeam]:Et,[F.EBattleStateUpdate.AddUnit]:J,[F.EBattleStateUpdate.ReviveUnit]:St,[F.EBattleStateUpdate.AddAffix]:W,[F.EBattleStateUpdate.RemoveAffix]:Tt,[F.EBattleStateUpdate.AddStatusEffect]:class extends Z{getSpellGuid(k){return this.getSpellGuidFromName(k.applySpell)}updateBattleUnit(k){return(0,q.sH)(this,void 0,void 0,(function*(){k.unitComponent.addStatusEffect(k.statusEffectInstance)}))}handleSpellCompleted(k){k.updateIdleStatusEffect(),k.updatePersistentStatusEffects()}},[F.EBattleStateUpdate.TriggerStatusEffect]:class extends Z{getSpellGuid(k){return this.getSpellGuidFromName(k.triggerSpell)}updateBattleUnit(k){return(0,q.sH)(this,void 0,void 0,(function*(){const B=k.clientStatusEffect.affixes;for(let U=0;U{G.RQr.logError(k,"Error changing active unit in TriggerStatusEffectStateUpdate"),this.stateMachine.showThrownErrorDialog(k)})))}}))}handleDamageApplied(k){const B=this._data.hitData;if(!B)return;j.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&G.VyI.log(`${k.creature.name} triggered status ${this.statusEffectId} and hit points changed by ${B.damage}!`,G.$bb.Info),k.onApplyDamage.dispatch(B),V.a.createHitInfoText(k,B,this._data.element),k.updateHp(B.hpResult),B.damageInformation&F.EDamageInformation.Heal?j.q.instance.prodigy.audio.playSFXFromGUID(Ot.B.Sfx_heal):(j.q.instance.prodigy.audio.playSFX(8,It.J.Hit),B.hpResult>0?(k.playHurt(),this.checkAndTriggerLowHealthAnimation(k,B.damage)):k.creature.teleportType===Dt.H0.Immediate&&k.playDefeated().catch(G.RQr.createHandler("Error playing defeat animation")))}handleSpellCompleted(k){var B,U;k.updateIdleStatusEffect(),null!==(U=null===(B=this._data)||void 0===B?void 0:B.isBeingRemoved)&&void 0!==U&&U||k.updatePersistentStatusEffects()}},[F.EBattleStateUpdate.RemoveStatusEffect]:class extends Z{getSpellGuid(k){return this.getSpellGuidFromName(k.removeSpell)}updateBattleUnit(k){return(0,q.sH)(this,void 0,void 0,(function*(){k.unitComponent.removeStatusEffect(k.statusEffectInstance.id)}))}handleSpellCompleted(k){k.updatePersistentStatusEffects()}},[F.EBattleStateUpdate.ModifyStatusEffect]:class extends Z{updateBattleUnit(k){return(0,q.sH)(this,void 0,void 0,(function*(){k.unitComponent.modifyStatusEffect(k.statusEffectInstance.id,k.statusEffectInstance.remainingDuration),k.unitComponent.updatePersistentStatusEffects()}))}},[F.EBattleStateUpdate.SetActiveUnit]:At.x,[F.EBattleStateUpdate.EndBattle]:st,[F.EBattleStateUpdate.SkipTurn]:Ct,[F.EBattleStateUpdate.NewRound]:wt,[F.EBattleStateUpdate.Escape]:lt,[F.EBattleStateUpdate.DefeatUnit]:dt,[F.EBattleStateUpdate.DebugMessage]:at}},37987:(k,B,U)=>{"use strict";U.d(B,{D:()=>G,$:()=>lt});var F,G,j=U(8674),$=U(62459),H=U(99625),V=U(28628),W=U(35120),q=U(10778),K=U(29834),z=U(23082),Y=U(46784),Q=U(65050),X=U(67665),Z=U(53661),J=U(90614),tt=U(80060),et=U(27488),it=U(68836),st=U(86323),nt=U(64019),at=U(10670),rt=U(30226),ot=U(86283),ht=U(63046),ct=U(95807);class dt extends ct.Z{constructor(){super(),this.nextState=this.nextState.bind(this)}enter(){return(0,j.sH)(this,void 0,void 0,(function*(){this.battleController.onStartBattle().then((()=>{this.sendBattleStartSegmentData(),this.battleController.getUnits().forEach((k=>{this.sendBattleParticipantSegmentData(k)})),this.nextState()})).catch((k=>{$.RQr.logError(k,"Error starting a battle"),this.stateMachine.showThrownErrorDialog(k)}))}))}nextState(){this.stateMachine.goToState(ht.B)}sendBattleStartSegmentData(){const k=this.stateMachine.getStartOrResumeSegmentData(),B=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily;B.isFestivalDailyBattle&&(k.instance=Object.assign(Object.assign({},k.instance),{instance_type:Q.N.FestivalDaily,instance_id:B.getFestivalInstanceName()}),B.isFestivalDailyBattle=!1);const{requirements:U}=$.wa5.getActiveScene().container.get("LocalConfig"),F=$.Aq$.isDefined(U)&&U.length>0;this.stateMachine.segment.battleRevamp.sendBattleStartEvent(Object.assign({battle_id:this.battleController.battleId,battle_type:this.stateMachine.segment.battleRevamp.getSegmentBattleType(this.stateMachine.battleType),battle_variant:this.stateMachine.segment.battleRevamp.getBattleVariant(this.stateMachine.battleType,k.variantData),battle_difficulty:k.difficulty,player_team_size:this.stateMachine.homeTeam.units.length,enemy_team_size:this.stateMachine.awayTeam.units.length,is_restricted:F,restrictions:U},k.instance)),this.stateMachine.segment.postBattleFlow.init()}sendBattleParticipantSegmentData(k){var B;const U=k.type===V.uj.Wizard&&!k.creature.isOpponent,F=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=k.type!==V.uj.Wizard||k.creature.isOpponent?void 0:rt.J.createGearMetadata(F.equipment.getData()),j=k.type===V.uj.Pet&&$.Aq$.isDefined(k.data.petGear)?rt.J.createPetGearMetadata(k.data.petGear):void 0,H=this.stateMachine.segment.battleRevamp,q=!k.creature.isOpponent||this.battleController.rightTeam.isRescuable();H.sendBattleParticipantEnteredEvent({team:k.creature.isOpponent?at.B1.Opponent:at.B1.Player,character_name:H.getUnitName(U,k),character_level:k.level,character_rank:k.type===V.uj.Pet?null!==(B=k.data.mergeRank)&&void 0!==B?B:0:void 0,character_hp:k.currentHp,character_mp:k.currentMp,character_id:k.data.unitId,position:H.getUnitPosition(k,this.battleController),character_element:k.data.element,character_type:H.getBattleCharacterType(U,k.creature.id,q),character_rarity:H.getUnitRarity(U,k.data.rarity),character_max_hp:k.maxHp,character_max_mp:k.maxMp,character_power:k.data.stats.power,character_defence:k.data.stats.defence,character_speed:k.data.stats.speed,character_order:k.data.stats.initiative,crit_chance:k.data.stats.critDamage,crit_damage:this.battleController.battleConstants.criticalHitBonus,element_advantage:this.battleController.battleConstants.getElementalResistance(k.data.element),element_weakness:this.battleController.battleConstants.getElementalWeakness(k.data.element),spells_available:k.data.spells.map((k=>({spellId:k.spellId,currentCooldown:k.currentCooldown}))),is_rescuable:k.isARescuableUnit(),is_new_pet:!ot.D.hasBeenRescuedPreviously(F,k.creature.id),number_owned:F.kennel.getPets(!1).reduce(((B,U)=>U.ID===k.creature.id?B+1:B),0),times_battled:F.encounters.getPetTimesBattled(k.creature.id),times_rescued:F.encounters.getPetTimesRescued(k.creature.id),gear_hat:k.type===V.uj.Wizard?null==G?void 0:G.hat:null==j?void 0:j.hat,gear_hat_rarity:k.type===V.uj.Wizard?null==G?void 0:G.hat_rarity:null==j?void 0:j.hat_rarity,gear_relic:k.type===V.uj.Wizard?null==G?void 0:G.relic:null==j?void 0:j.relic,gear_relic_rarity:k.type===V.uj.Wizard?null==G?void 0:G.relic_rarity:null==j?void 0:j.relic_rarity,gear_outfit:null==G?void 0:G.outfit,gear_outfit_rarity:null==G?void 0:G.outfit_rarity,gear_boots:null==G?void 0:G.boots,gear_boots_rarity:null==G?void 0:G.boots_rarity,gear_weapon:null==G?void 0:G.weapon,gear_weapon_rarity:null==G?void 0:G.weapon_rarity,gear_buddy:null==G?void 0:G.follow,gear_buddy_rarity:null==G?void 0:G.follow_rarity})}}!function(k){k.Connection="BATTLE_REVAMP_ERROR_NETWORK",k.Server="BATTLE_REVAMP_ERROR_RETRY",k.Client="BATTLE_REVAMP_ERROR_FATAL"}(G||(G={}));let lt=F=class extends $.JTX{constructor(){super(...arguments),this.RETRY_HIDE_DURATION=2e3,this.stateUpdateQueue=[],this.round=0,this._currentState=null,this.onStateChange=new $.HN0,this.onVictory=new $.HN0,this.onDefeat=new $.HN0,this.onEscape=new $.HN0,this._battleCompleted=!1}get currentState(){return this._currentState}goToStart(){this.goToState(dt)}goToState(k,...B){try{this._currentState&&(this._currentState.exit(),this._currentState.destroy()),this._currentState=new k(...B),this._currentState.stateMachine=this,this._currentState.battleController=this.battleController,this.onStateChange.dispatch(this._currentState),this._currentState.enter()}catch(e){$.RQr.logError(e,`Error transitioning to ${k.name} state`),this.showThrownErrorDialog(e)}}update(){var k;null===(k=this._currentState)||void 0===k||k.update(),super.update()}destroy(){this._currentState&&(this._currentState.exit(),this._currentState.destroy()),this._currentState=null,this.battleController=null,this.homeTeam=null,this.awayTeam=null,this.mapRoot=null,this.battleResult=null,this.onVictory.dispose(),this.onDefeat.dispose(),this.onEscape.dispose(),this.onStateChange.dispose(),this.hideErrorDialog(),super.destroy()}showThrownErrorDialog(k){k instanceof et.r?this.showNetworkErrorDialog(k):this.showErrorDialog(void 0,k)}showNetworkErrorDialog(k){0===k.code?this.showErrorDialog(G.Connection,k,!0):k.code>=500&&k.code<600?this.showErrorDialog(G.Server,k):this.showErrorDialog(G.Client,k)}isShowingNetworkErrorDialog(){return Boolean(this._errorDialogPromise)}showErrorDialog(k=G.Client,B,U){this.showErrorDialogAsync(k,B,U).catch($.RQr.createHandler("Error showing error dialog"))}showErrorDialogAsync(){return(0,j.sH)(this,arguments,void 0,(function*(k=G.Client,B,U){if(W.q.instance.game.state.current!==z.G.SecureBattleRevamp)return;const V=this.getInjectedValue($.$Bt.LocalizationService),q={[Z.ZE.Title]:V.getText("BATTLE_REVAMP_ERROR_TITLE"),[Z.ZE.Message]:V.getText(k),[Z.ZE.CTAButtonEnabled]:null!=U&&U,[Z.ZE.CTAButtonFunction]:()=>(0,j.sH)(this,void 0,void 0,(function*(){return this.hideErrorDialogForRetry()}))};if(Boolean(this._errorDialogPromise))tt.d.updateInjectedValues(yield this._errorDialogPromise,q);else{const k=this.getInjectedValue("d0e-64fd");this._errorDialogPromise=tt.d.loadWithInjectedValuesAndDependenciesFromGUID(k,H.l.PaperDialogInjectionConfigured,q),this._errorDialogPromise.then((k=>{W.q.instance.game.state.current!==z.G.SecureBattleRevamp&&k.destroy()})).catch($.RQr.createHandler("Error cleaning up error dialog after state transition"))}if(!this._battleCompleted&&k===G.Client){if(this.completeBattle("error",this.getErrorMessage(B)),B){W.q.instance.prodigy.gameContainer.get("11d-01b8").trackError(B)}$.Egh.timeout(F.FATAL_ERROR_BATTLE_EXIT_DELAY_MS).finally((()=>{var k;null===(k=this.getInjectedValue("BattleState"))||void 0===k||k.handleFatalBattleError()}))}}))}hideErrorDialogForRetry(){return(0,j.sH)(this,void 0,void 0,(function*(){Boolean(this._errorDialogPromise)&&this._errorDialogPromise.promise.then((k=>{k.active=!1,setTimeout((()=>{k&&(k.active=!0)}),this.RETRY_HIDE_DURATION)})).catch($.RQr.createHandler("Error hiding and re-enabling error dialog"))}))}hideErrorDialog(){Boolean(this._errorDialogPromise)&&(this._errorDialogPromise.cancel(),this._errorDialogPromise.promise.then((k=>k.destroy())).catch($.RQr.createHandler("Error cleaning up error dialog")),this._errorDialogPromise=null)}completeBattle(k,B,U,F){var G,j,H,V,W;if(!this._battleCompleted){const{requirements:q}=$.wa5.getActiveScene().container.get("LocalConfig"),K=$.Aq$.isDefined(q)&&q.length>0;this.segment.battleRevamp.sendBattleCompleteEvent({outcome:k,rewards_scalar:U,magicoin_dropped:null!==(G=null==F?void 0:F.granted)&&void 0!==G&&G,magicoin_drop_eligible:null!==(j=null==F?void 0:F.eligible)&&void 0!==j&&j,magicoin_drop_was_guaranteed:null!==(H=null==F?void 0:F.guaranteed)&&void 0!==H&&H,magicoin_drop_amount_free:null!==(V=null==F?void 0:F.freeRewardAmount)&&void 0!==V?V:null,magicoin_drop_amount_member:null!==(W=null==F?void 0:F.memberRewardAmount)&&void 0!==W?W:null,error_detail:B,is_restricted:K,restrictions:q})}this._battleCompleted=!0}getErrorMessage(k){if($.Aq$.isDefined(k))return k instanceof Error&&k.message?k.message:JSON.stringify(k)}getStartOrResumeSegmentData(){var k;const B={};let U=this.segment.gameWorld.getCurrentInstanceTypeAndID(),F=this.difficulty;switch(this.battleType){case V.gu.Basic:case V.gu.FestivalDailyBoss:B.units=this.battleController.rightTeam.units;break;case V.gu.Ultimates:B.questData=null===(k=this.battleController)||void 0===k?void 0:k.currentQuestData;break;case V.gu.MatchmakingBotDuel:U={instance_id:this.segment.featureCommon.getCurrentInterfaceID(Y.B.DuelsStadium),instance_type:Q.N.DuelsStadium},F=this.segment.duelsStadium.botDifficulty;break;case V.gu.NormalRiftRun:U={instance_id:this.segment.rifts.riftInstanceUuid,instance_type:Q.N.RiftRun},F=it.T.riftTier;break;case V.gu.BossRiftRun:U={instance_id:this.segment.rifts.riftInstanceUuid,instance_type:Q.N.BossRift},F=it.T.riftTier}return B.instanceType=U.instance_type,{variantData:B,instance:U,difficulty:F}}};lt.FATAL_ERROR_BATTLE_EXIT_DELAY_MS=5e3,(0,j.Cg)([(0,$.MnK)(nt.cs),(0,j.Sn)("design:type",nt.cs)],lt.prototype,"homeTeam",void 0),(0,j.Cg)([(0,$.MnK)(nt.cs),(0,j.Sn)("design:type",nt.cs)],lt.prototype,"awayTeam",void 0),(0,j.Cg)([(0,$.ERr)(),(0,j.Sn)("design:type",$._mx)],lt.prototype,"mapRoot",void 0),(0,j.Cg)([(0,$.MnK)(st.I),(0,j.Sn)("design:type",st.I)],lt.prototype,"battleResult",void 0),(0,j.Cg)([(0,$.MnK)(K.j),(0,j.Sn)("design:type",K.j)],lt.prototype,"introAnimator",void 0),(0,j.Cg)([(0,$.MnK)(q.i),(0,j.Sn)("design:type",q.i)],lt.prototype,"lowHealthPreviewComponent",void 0),(0,j.Cg)([(0,$.MnK)(K.j),(0,j.Sn)("design:type",K.j)],lt.prototype,"turnIndicator",void 0),(0,j.Cg)([(0,$.MnK)(J.P),(0,j.Sn)("design:type",J.P)],lt.prototype,"spellBookMoveIn",void 0),(0,j.Cg)([(0,$.MnK)(J.P),(0,j.Sn)("design:type",J.P)],lt.prototype,"spellBookMoveOut",void 0),(0,j.Cg)([(0,$.Cdj)("c47-20b6"),(0,j.Sn)("design:type",X.Y)],lt.prototype,"segment",void 0),lt=F=(0,j.Cg)([(0,$.EVk)("SecureBattleRevampStateMachine")],lt)},95807:(k,B,U)=>{"use strict";U.d(B,{Z:()=>F});class F{enter(){}exit(){}update(){}destroy(){}}},21945:(k,B,U)=>{"use strict";U.d(B,{N:()=>$});var F=U(62459),G=U(63046),j=U(95807);class $ extends j.Z{constructor(k){super(),this._action=k}enter(){this.battleController.onPlayerAction(this._action).then((k=>{this.stateMachine.stateUpdateQueue.push(...k),this.stateMachine.goToState(G.B)})).catch((k=>{F.RQr.logError(k,"SendPlayerActionState.enter:playerAction.sendRequest"),this.stateMachine.showThrownErrorDialog(k)}))}}},74640:(k,B,U)=>{"use strict";U.d(B,{G:()=>z});var F=U(62459),G=U(28628),j=U(75172),$=U(10670),H=U(24047),V=U(78355),W=U(69297),q=U(95807),K=U(28496);class z extends q.Z{constructor(k){var B,U,F;super(),this._magicoinRewardGranted=!1,this._magicoinRewardEligible=!1,this._magicoinRewardGuaranteed=!1,this._battleResult=k.battleResult,this._rewards=k.rewards,this._memberRewards=k.memberRewards,this._rewardsScalingInfo=k.rewardsScalingInfo,this._magicoinRewardGranted=null!==(B=k.magicoinRewardGranted)&&void 0!==B&&B,this._magicoinRewardEligible=null!==(U=k.magicoinRewardEligible)&&void 0!==U&&U,this._magicoinRewardGuaranteed=null!==(F=k.magicoinRewardGuaranteed)&&void 0!==F&&F}enter(){var k,B,U,q;const z=this.stateMachine.segment;F.C1c.markTextureGarbageCollectionFrame(),this.battleController.getUnits().forEach((k=>{var B;const U=k.type===G.uj.Wizard&&!k.creature.isOpponent;z.battleRevamp.sendBattleParticipantOutcomesEvent({team:k.creature.isOpponent?$.B1.Opponent:$.B1.Player,character_name:this.stateMachine.segment.battleRevamp.getUnitName(U,k),character_id:k.data.unitId,character_level:k.level,character_rank:k.type===G.uj.Pet?null!==(B=k.data.mergeRank)&&void 0!==B?B:0:void 0,character_hp:k.currentHp,character_mp:k.currentMp,position:z.battleRevamp.getUnitPosition(k,this.battleController),status:k.currentHp<=0?$.rW.Unconscious:$.rW.Conscious})}));const Y=this._magicoinRewardGranted?null===(B=null===(k=this._rewards)||void 0===k?void 0:k.find((k=>"currency"===k.type&&27===k.ID)))||void 0===B?void 0:B.quantity:void 0,Q=this._magicoinRewardGranted?null===(q=null===(U=this._memberRewards)||void 0===U?void 0:U.find((k=>"currency"===k.type&&27===k.ID)))||void 0===q?void 0:q.quantity:void 0,X={granted:this._magicoinRewardGranted,eligible:this._magicoinRewardEligible,guaranteed:this._magicoinRewardGuaranteed,freeRewardAmount:null!=Y?Y:null,memberRewardAmount:null!=Q?Q:null};this._magicoinRewardGranted&&z.funnel.sendStep(H.F.MagicoinBattleRewardsIntro,"feature",j.T.FirstDropReceived,j.h.FirstDropReceived),this.battleController.completeBattle(this._battleResult===G.XK.Victory?"win":"loss",this._rewardsScalingInfo,X),this.battleController.onEndGame(this._battleResult===G.XK.Victory).then((()=>{F.C1c.garbageCollectTextures(),this._battleResult===G.XK.Victory?this.stateMachine.goToState(K.u,this._rewards,this._memberRewards,this._rewardsScalingInfo):this._battleResult===G.XK.Defeat?this.stateMachine.goToState(V.$):this._battleResult===G.XK.Escape&&this.stateMachine.goToState(W.L)})).catch((k=>{F.RQr.logError(k,"Error in the end battle state"),this.stateMachine.showThrownErrorDialog(k)}))}}},28496:(k,B,U)=>{"use strict";U.d(B,{u:()=>j});var F=U(62459),G=U(95807);class j extends G.Z{constructor(k,B,U){super(),this._rewards=k,this._memberRewards=B,this._rewardsScalingInfo=U}enter(){this.battleController.onVictory(this._rewards,this._memberRewards,this._rewardsScalingInfo).then((()=>{this.stateMachine.onVictory.dispatch()})).catch((k=>{F.RQr.logError(k,"Error in victory state"),this.stateMachine.showThrownErrorDialog(k)}))}}},60604:(k,B,U)=>{"use strict";U.d(B,{a:()=>lt});var F=U(8674),G=U(87490),j=U(62459),$=U(95891),H=U.n($),V=U(20748),W=U(82351),q=U(56942),K=U(28628),z=U(62886),Y=U(35120),Q=U(50084),X=U(28402),Z=U(98193),J=U(10670),tt=U(13956),et=U(34234),it=U(39571),st=U(22023),nt=U(44094),at=U(8693),rt=U(630),ot=U(63761),ht=U(81531),ct=U(63046),dt=U(52855);class lt extends dt.a{enter(){this.castSpell(this._data).catch((k=>{j.RQr.logError(k,"Error casting spell"),this.stateMachine.showThrownErrorDialog(k)}))}exit(){this.battleController.selectedSpell=null}castSpell(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,$;const V=this.battleController.activeUnit;let K;for(const H of k.targets){for(const k of H.hits)if(j.OQO.areBitsSet(k.damageInformation,G.EDamageInformation.Reflected)){K=k;break}if(K)break}K&&dt.a.createHitInfoText(V,K);const z=Object.assign(Object.assign({},this._gameDataProvider.getItem("spellV2",k.id).data),{id:k.id}),Z=null!==(U=null===(B=z.flags)||void 0===B?void 0:B.some((k=>k.flag===G.ESpellFlag.Rescue)))&&void 0!==U&&U,J=k.id===this.battleController.battleConstants.fumbleSpellId;Z||J||(null==V?void 0:V.data.teamId)!==this.battleController.leftTeam.id||this.sendBattlePassCastSpellEvent(z.element),Y.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&j.VyI.log(`Spell ${k.id} has been cast by ${null==V?void 0:V.battleId}`,j.$bb.Verbose),z.target.unit===G.ESpellUnitTarget.Random&&(null==V?void 0:V.data.teamId)===this.battleController.leftTeam.id&&(yield this.battleController.spellCardsController.targetController.targetRoulette(z.target.team,this.battleController.getUnitById(k.targets[0].unitId),V));const tt=this.battleController.getSpellComponentById(k.id);yield tt.loadPromise;const et=Y.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1),st=new j.v14,ht=[],ut=H().cloneDeep(k.targets);let ft=0;const bt=new Map,pt=(B,U=!1)=>{var F,$,H,K,Q,Z;const J=ut.find((k=>k.unitId===(null==B?void 0:B.data.unitId))),tt=null!==(F=k.targets.find((k=>k.unitId===(null==B?void 0:B.data.unitId))).hits.length)&&void 0!==F?F:0,it=(null!==($=bt.get(B))&&void 0!==$?$:-1)+1;bt.set(B,it);const nt=1===(null==J?void 0:J.hits.length),rt=null==J?void 0:J.hits.shift();if(!rt)return!1;if(et&&j.VyI.log(`${J.unitId} has been hit and took ${rt.damage} damage!`,j.$bb.Info),B.onApplyDamage.dispatch(rt),(rt.damage||rt.mpDamage||!this.spellFlagsIncludeAny(z.flags,lt.NO_DAMAGE_SPELL_FLAGS))&&(!rt.damage&&rt.mpDamage||(U||(j.OQO.areBitsSet(rt.damageInformation,G.EDamageInformation.Reflected)&&(rt.damageInformation&=~G.EDamageInformation.Reflected),rt.hitCount=tt,rt.hitIndex=it,dt.a.createHitInfoText(B,rt,z.element,st.push())),B.updateHp(rt.hpResult),ft+=rt.damage),rt.mpDamage&&B.updateMp(rt.mpResult)),U||this.spellFlagsIncludeAny(z.flags,lt.NO_SOUND_SPELL_FLAGS)||(rt.damageInformation&G.EDamageInformation.Missed?Y.q.instance.prodigy.audio.playSFX(8,at.J.Miss):rt.damageInformation&G.EDamageInformation.Heal?Y.q.instance.prodigy.audio.playSFXFromGUID(W.B.Sfx_heal):rt.damageInformation&G.EDamageInformation.Fumble?Y.q.instance.prodigy.audio.playSFXFromGUID(W.B.Sfx_fumble_poof):(Y.q.instance.prodigy.audio.playSFX(8,at.J.Hit),rt.hpResult>0||!nt?(B.playHurt(),this.checkAndTriggerLowHealthAnimation(B,rt.damage)):B.creature.teleportType===ot.H0.Immediate&&B.playDefeated().catch(j.RQr.createHandler("Error playing defeat animation")))),this.findSpellFlag(z.flags,G.ESpellFlag.Rescue)){const k=null==V?void 0:V.data.teamId;if(k){const U=null===(H=this.battleController.getTeamById(k))||void 0===H?void 0:H.wizard;U&&(B.controllerUnit=U)}B.creature.teleportType=ot.H0.Astral,ht.push(B)}else if(this.findSpellFlag(z.flags,G.ESpellFlag.StealUnit)){const k=st.push(),U=k=>{var B;const U=new j._mx(k.creature.creatureGameObject).addComponent(X.v);U.GameObject.name="goop-front-spine",U.GameObject.addComponent(j.dLy).setPositionY(5),U.setAsset(q.Q.Spine_pet_shadow_effect_front_json,(()=>U.setAnimationByName(0,"idle",!0)));const F=new j._mx(k.creature.creatureGameObject).addComponent(X.v);F.GameObject.name="goop-back-spine",F.GameObject.sendToBack(),F.setAsset(q.Q.Spine_pet_shadow_effect_back_json,(()=>F.setAnimationByName(0,"idle",!0))),null===(B=k.creature.animator.spine)||void 0===B||B.getSpine().setTint(12421347)};this.battleController.moveUnitToTeam(B,V.data.teamId,ot.H0.Shadow,U).catch(j.RQr.createHandler(`Error moving ${null===(K=null==B?void 0:B.data)||void 0===K?void 0:K.unitId} to ${V.data.teamId} team`)).finally(k)}else rt.hpResult<=0&&0===J.hits.length&&ht.push(B);if((null===(Q=rt.affixes)||void 0===Q?void 0:Q.length)>0)for(const k of rt.affixes)this.playBuffSound(),B.showAffix(k).catch(j.RQr.createHandler("Error adding affix to unit"));if((null===(Z=rt.removedAffixes)||void 0===Z?void 0:Z.length)>0)for(const k of rt.removedAffixes)B.removeAffix(k);return!0};let vt;tt.onApplyDamage.add(((k,B)=>pt(k.findComponentInParent(rt.Xc,!0),B)),this),V&&this.battleController.getUnits().forEach((k=>{k===V?k.updateLayerByPrefix(it.a.ActiveSideCast):k.data.teamId===V.data.teamId?k.layerLevel{const B=this.battleController.getUnitById(k.unitId);B&>.push({unitId:k.unitId,gameObject:B.creature.creatureGameObject,statusEffectContainer:B.statusEffectContainer})})),yield tt.begin({caster:vt,targets:gt,manager:tt,multiHit:null!==(F=z.hits)&&void 0!==F?F:1,spellOriginOffset:null==V?void 0:V.spellOriginOffset});do{mt=!1;for(const k of ut)k.hits.length>0&&(mt=!0,pt(this.battleController.getUnitById(k.unitId)));mt&&(yield j.Egh.timeout(500))}while(mt);tt.onApplyDamage.removeAll(this),yield null===($=this.battleController.battleBackgroundFX)||void 0===$?void 0:$.setDamage(this.battleController.getTotalTeamDamagePercentage((null==V?void 0:V.data.teamId)===G.ETeamId.Away?G.ETeamId.Home:G.ETeamId.Away,!0),(null==V?void 0:V.data.teamId)===G.ETeamId.Away,z.id),ht.find((k=>k.battleId===(null==V?void 0:V.battleId)))&&(yield this.battleController.deactivateTurnIndicator()),yield this.defeatUnits(ht),this.battleController.castActionResultsDisplayTriggered(),yield st.all();const yt=nt.$.generateUID();let _t=0;if(Z)if(1===k.targets.length){const B=this.battleController.getUnitById(k.targets[0].unitId),U=B.creature;et&&j.VyI.log(`${U.name} has been rescued!`,j.$bb.Info);_t=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.amountOfPet(U.id),yield Q.a.receivePet(U,yt),B.isRescued=!0}else j.VyI.log("Rescue spell requires a single target.",j.$bb.Error);J?this.sendMpRecoverySegmentData(V,0):this.sendBattleActionSegmentData({spellId:k.id,activeUnit:V,spellData:z,totalHitDamage:ft,targetData:k.targets,captureTransactionId:yt,previousPetCopies:_t,appliedStatusEffects:k.statusEffectsApplied}),this.stateMachine.goToState(ct.B)}))}sendBattleActionSegmentData(k){var B,U,F,j,$,H,V;const W=k.activeUnit,q=k.spellData,z=k.targetData.map((k=>k.unitId)),Y=z.length>0?this.battleController.getUnitById(z[0]):void 0,Q=this.stateMachine.segment.battleRevamp,X=W?W.creature.isOpponent?J.B1.Opponent:J.B1.Player:void 0;if(Q.sendBattleActionPerformedEvent({team:X,character_name:W?W.type!==K.uj.Wizard||W.creature.isOpponent?W.name:Z.z.PLAYER_SEGMENT_ID:void 0,character_id:null==W?void 0:W.data.unitId,mp_cost:q.cost,action_name:q.name,action_type:k.spellId===this.battleController.battleConstants.rescueSpellId?"Rescue":q.element,action_damage:k.totalHitDamage,action_modifier:(null==W?void 0:W.affixes.find((k=>k.type===G.EAffixType.AdditiveDamageMultiplier&&k.instances.some((k=>G.Util.singleOrArrayIncludes(k.element,q.element))))))?"duel_element_boost":void 0,target_name:1===z.length?null==Y?void 0:Y.name:q.target.unit,target_type:q.target,target_team:Y?Y.data.teamId===G.ETeamId.Home?J.B1.Player:J.B1.Opponent:void 0,target_hits:k.targetData.map((k=>{const B=this.battleController.getUnitById(k.unitId);return{target_id:k.unitId,target_name:null==B?void 0:B.name,target_position:Q.getUnitPosition(B,this.battleController),target_hp:null==B?void 0:B.currentHp,hits:Q.getHitInformation(k.hits)}})),target_hp:z.map((k=>this.battleController.getUnitById(k).currentHp)).reduce(((k,B)=>k+B),0),target_mp:z.map((k=>this.battleController.getUnitById(k).currentMp)).reduce(((k,B)=>k+B),0),intended_status_effects:null!==(U=null===(B=k.spellData.statusEffects)||void 0===B?void 0:B.map((k=>k.statusEffectId)))&&void 0!==U?U:[],status_effects_applied:k.appliedStatusEffects?Object.keys(k.appliedStatusEffects).map(Number):[]}),(null===(F=null==q?void 0:q.flags)||void 0===F?void 0:F.some((k=>k.flag===G.ESpellFlag.Rescue)))&&1===z.length){const B=Y;this.stateMachine.segment.battleRevamp.sendBattlePetCapturedEvent({petName:null!==($=null===(j=B.creature)||void 0===j?void 0:j.nickname)&&void 0!==$?$:B.name,petLevel:B.level,petElement:B.data.element,petType:st.P8.getPetEvolutionType(null===(H=B.creature)||void 0===H?void 0:H.id),petRarity:B.data.rarity,petRank:null!==(V=B.data.mergeRank)&&void 0!==V?V:0,previousPetCopies:k.previousPetCopies,captureSource:J.z2.InBattle},{transaction_id:k.captureTransactionId})}}findSpellFlag(k,B){if(k)return k.find((k=>k.flag===B))}spellFlagsIncludeAny(k,B){return!!k&&k.some((k=>B.has(k.flag)))}sendBattlePassCastSpellEvent(k){const B=Y.q.instance.prodigy.gameContainer.get("a25-68f4"),U=`Cast${nt.$.capitalizeFirstLetter(k)}Spell`;B.sendQuestEventViaHub(U,{}).catch(j.RQr.createHandler(`Error sending a battle pass quest event for casting a spell of the ${k} element`)),B.sendQuestEventViaHub(z.T.CAST_SPELL,{}).catch(j.RQr.createHandler("Error sending a battle pass quest event for casting a spell"))}playBuffSound(){Y.q.instance.prodigy.audio.playSFXFromGUID(W.B.Sfx_unit_buff_positive)}}lt.NO_DAMAGE_SPELL_FLAGS=new Set([G.ESpellFlag.Rescue,G.ESpellFlag.StealUnit,G.ESpellFlag.NoDamage]),lt.NO_SOUND_SPELL_FLAGS=new Set([G.ESpellFlag.Rescue,G.ESpellFlag.StealUnit,G.ESpellFlag.NoDamage]),(0,F.Cg)([(0,et.d)("GameDataProvider"),(0,F.Sn)("design:type",ht.q)],lt.prototype,"_gameDataProvider",void 0),(0,F.Cg)([(0,tt.b)("84d-05d4"),(0,F.Sn)("design:type",Object)],lt.prototype,"_dynamicStore",void 0),(0,F.Cg)([(0,V.sg)(200),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],lt.prototype,"playBuffSound",null)},52855:(k,B,U)=>{"use strict";U.d(B,{a:()=>st});var F=U(8674),G=U(87490),j=U(62459),$=U(95891),H=U.n($),V=U(99625),W=U(28628),q=U(35120),K=U(98193),z=U(630),Y=U(89584);class Q{static isHitEffective(k){return(k.damageInformation&G.EDamageInformation.Effective)===G.EDamageInformation.Effective}static isHitIneffective(k){return(k.damageInformation&G.EDamageInformation.Ineffective)===G.EDamageInformation.Ineffective}static isHitAbsorbed(k){return(k.damageInformation&G.EDamageInformation.Absorb)===G.EDamageInformation.Absorb}static extractParallelHitInfos(k,B,U){let F=[];if(B){if(F.push(k),U){const B=[G.EDamageInformation.Absorb,G.EDamageInformation.Effective,G.EDamageInformation.Ineffective],U=this.extractFirstMatchingDamage(k,B);U&&F.push(U)}return F}const j=this.extractFirstMatchingDamage(k,[G.EDamageInformation.CriticalHit,G.EDamageInformation.Dodge]),$=this.extractFirstMatchingDamage(k,[G.EDamageInformation.Effective,G.EDamageInformation.Ineffective]);return j&&$&&!this.isHitAbsorbed(k)&&F.push(j,$),0===F.length&&F.push(k),F}static extractFirstMatchingDamage(k,B){for(const U of B)if((k.damageInformation&U)===U)return Object.assign(Object.assign({},k),{damageInformation:U});return null}static getPrimaryDisplayConfig(k){if(!j.Aq$.isDefined(Q.primaryDisplayConfigs[k]))return null;for(const[B,U]of Object.entries(Q.primaryDisplayConfigs)){const F=Number(B);if((k&F)===F)return U}return null}}Q.primaryDisplayConfigs={[G.EDamageInformation.CriticalHit]:{textOffsetY:50,delayNext:800},[G.EDamageInformation.Dodge]:{textOffsetY:-25,delayNext:400}};var X=U(95807),Z=U(71391),J=U(64868),tt=U(63343),et=U(96810),it=U(34234);class st extends X.Z{constructor(k){super(),this._data=k}static createHitInfoText(k,B,U,F){const{hitCount:G,hitIndex:$}=B,H=j.Aq$.isDefined(G)&&G>1,W=H&&0===$,K=Q.extractParallelHitInfos(B,H,W);let z=0;K.forEach(((B,G)=>{var j,$;const X=q.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromGUID(V.l.RevampSpellHitInfo).findComponent(Y.h),Z=k.creature.worldPosition.x;let J=Math.max(k.creature.worldPosition.y+k.creature.hitbox.y,st.DAMAGE_TEXT_MIN_Y),tt=null;const et={onlyShowDamageNumber:!1,onlyShowIndicator:!1};H?(et.onlyShowDamageNumber=!0,1===G&&W&&(et.onlyShowDamageNumber=!1,et.onlyShowIndicator=!0,et.suppressSfx=!0)):G>0?(et.onlyShowIndicator=!0,et.deemphasizeIndicator=!0):K.length>1&&(tt=Q.getPrimaryDisplayConfig(B.damageInformation)),tt&&(J+=null!==(j=tt.textOffsetY)&&void 0!==j?j:0),setTimeout((()=>X.setupAndDisplay(Z,J,B,U,G===K.length-1?F:void 0,et)),z),z+=null!==($=null==tt?void 0:tt.delayNext)&&void 0!==$?$:0}))}sendMpRecoverySegmentData(k,B){k.creature.isOpponent||this.stateMachine.segment.battleRevamp.sendBattleMpRecoveryAttemptedEvent({character_name:k.type===W.uj.Wizard?K.z.PLAYER_SEGMENT_ID:k.name,success:!(B<=0),mp_recovered:B,automatic:!0})}checkAndTriggerLowHealthAnimation(k,B){var U;if(!(null==k?void 0:k.data))return;const F=this.battleController.leftTeam.units.filter((k=>k.isAlive())),G=1===F.length?F[0]:void 0,$=!!G&&G.currentHp/G.maxHp<.5;!k.creature.isOpponent&&B>0&&$&&1===F.length&&(null===(U=this.stateMachine.lowHealthPreviewComponent)||void 0===U?void 0:U.GameObject)&&(this.stateMachine.lowHealthPreviewComponent.GameObject.active=!0,this.stateMachine.lowHealthPreviewComponent.playAnimation().catch((k=>{j.VyI.log(`Unable to play low health background pulse: ${j.RQr.stringify(k)}`,j.$bb.Error)})))}defeatUnits(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;const $=this.stateMachine.stateUpdateQueue.filter((k=>k.type===G.EBattleStateUpdate.DefeatUnit)),V=J._.hasDefeatedPetStore()?this._defeatedPetsIcon:void 0,{true:W=[],false:q=[]}=H().groupBy(k,(k=>{var B;return!!(null===(B=$.find((B=>B.unitId===k.battleId)))||void 0===B?void 0:B.storedInDefeatedPets)}));if(W.sort(((k,B)=>k.storeTeleportPriority-B.storeTeleportPriority)),null===(B=this.battleController.spellCardsController)||void 0===B||B.hidePetRescue(),yield Promise.all(q.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return k.defeatUnit(z.rC.Exit)}))))),0===W.length||!V)return;tt.E.recordDefeatedPetsFunnelStep(et.l.DynamicStoreDefeatedPet),yield V.show(),V.expectingMultipleAdditions=W.length>1;const K=[];for(let k=0;k(0,F.sH)(this,void 0,void 0,(function*(){yield B.defeatUnit(z.rC.ExitToStore),V.addPet(B.data)}))))),yield j.Egh.timeout(null!==(U=st.EXIT_TO_STORE_STAGGER_MS[k])&&void 0!==U?U:0)}yield Promise.all(K),yield V.hide()}))}}st.DAMAGE_TEXT_MIN_Y=190,st.EXIT_TO_STORE_STAGGER_MS=[150,250,250,250],(0,F.Cg)([(0,it.d)("DefeatedPetsIcon",!1),(0,F.Sn)("design:type",Z.D)],st.prototype,"_defeatedPetsIcon",void 0)},80313:(k,B,U)=>{"use strict";U.d(B,{x:()=>H});var F=U(62459),G=U(35120),j=U(63046),$=U(52855);class H extends $.a{enter(){const k=this._data,B=this.battleController.getUnits().find((B=>B.battleId===k.unitId));this.battleController.activeUnitSpellData=k.spellData,this.stateMachine.segment.battleRevamp.setTurn(k.turn),this.battleController.setActiveUnit(B).then((()=>{var k;G.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableVerboseSecureBattle",!1)&&F.VyI.log(`Active unit has been switched to ${null===(k=this.battleController.activeUnit)||void 0===k?void 0:k.battleId}!`,F.$bb.Info),this.stateMachine.goToState(j.B)})).catch((k=>{F.RQr.logError(k,"Error changing active unit"),this.stateMachine.showThrownErrorDialog(k)}))}}},61404:(k,B,U)=>{"use strict";U.d(B,{Q:()=>F});class F{static getWaveFadeFragment(){return"precision highp float;\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\n\nuniform float time;\nuniform float fade;\nuniform float amplitude;\nuniform float frequency;\n\t\nvoid main(void) {\n float xOff = sin(vTextureCoord.y * frequency + time) * amplitude;\n vec2 coord = vTextureCoord + vec2(xOff, 0.0);\n vec2 mirrored = abs(mod(coord + 1.0, 2.0) - 1.0);\n vec4 color = texture2D(uSampler, mirrored);\n color *= fade;\n gl_FragColor = color;\n}\n"}static getStarfieldFragment(){return"#define PI 3.14159\nprecision highp float;\nvarying vec2 vTextureCoord;\nuniform float time;\nuniform float alpha;\nuniform vec3 bgColor;\nuniform vec3 trail1;\nuniform vec3 trail2;\n\n\nvec2 line(vec2 radialCoords, float time) {\n float angle = radialCoords.x;\n float dist = radialCoords.y;\n dist *= 0.05;\n angle *= 256.0; // multiple around\n float interRadialDistance = sin(angle * PI);\n angle = floor(angle); // round the angle\n float offset = sin(angle * 13.37); // randomized distance offset\n float speed = cos(angle * 123.45) * 0.2 + 0.5;\n float inverseTrailSize = 70.0;\n \n float yv = fract(dist + time * speed + offset) * inverseTrailSize;\n float f = yv;\n yv = yv * 0.3;\n yv = smoothstep(0.0, 1.0, yv);\n yv = 1.0 - yv;\n yv *= speed * 5.0; // faster = brighter\n \n \n \n return vec2(min(1.0, yv * interRadialDistance * interRadialDistance), f);\n}\n\nvoid main(void) {\n vec2 p = vTextureCoord * 2.0 - 1.0;\n float radialFade = length(p) - 0.01;\n float angle = atan(p.x, p.y) / PI;\n float radialStretch = 2.5 / radialFade;\n vec2 radialCoords = vec2(angle, radialStretch);\n vec2 c1 = line(radialCoords, time);\n\n float revRadialFade = 1.0 - radialFade;\n c1.x *= 1.0 - revRadialFade * revRadialFade;\n\n // vec3 col = mix(trail1, trail2, max(min(c1.y, 1.),0.)); // blend color along trail\n // vec3 col = mix(trail1, trail2, (fract(angle* 13.37))); // blend color along star\n vec3 col = mix(trail1, trail2, floor(fract(angle* 13.37)*1.99)); // stars only color 1/2\n\n col = mix(bgColor, col, c1.x);\n\n // Output to screen\n gl_FragColor = vec4(col * alpha, alpha);\n}\n"}}},45855:(k,B,U)=>{"use strict";U.d(B,{g:()=>z});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(94596),V=U(90351),W=U(68910),q=U(61404);class K extends W.Filter{constructor(k=0){super(W.defaultFilterVertex,q.Q.getStarfieldFragment(),{time:k,bgColor:[.161,.059,.275],trail1:[.729,.612,.718],trail2:[.514,.102,.561]}),this.alpha=1,this.timeSeconds=k}apply(k,B,U,F){this.uniforms.time=this.timeSeconds,this.uniforms.alpha=this.alpha,k.applyFilter(this,B,U,F)}}let z=class extends H.b{constructor(){super(...arguments),this.DEFAULT_FADE_DURATION_MS=2e3,this.speed=.5,this.fadeValue=1,this._fadeInDurationMs=this.DEFAULT_FADE_DURATION_MS,this._fadeOutDurationMs=this.DEFAULT_FADE_DURATION_MS,this._fadeInEase=V.i.LinearNone,this._fadeOutEase=V.i.LinearNone}initialize(){super.initialize(),this._starfieldFilter=new K,this._filterList.push(this._starfieldFilter)}fadeIn(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.fade(0,1,this._fadeInDurationMs,this._fadeInEase)}))}fadeOut(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.fade(1,0,this._fadeOutDurationMs,this._fadeOutEase)}))}fade(k,B,U,$){return(0,F.sH)(this,void 0,void 0,(function*(){if(this._tween)return void G.VyI.log("Cannot start fade, a fade is already in progress.",G.$bb.Warning);this.fadeValue=k;const F={fade:k};this._tween=j.q.instance.game.add.tween(F,this).to({fade:B},U,V.K.getEasingFunctionFromEnum($),!0),this._tween.onUpdate.add((()=>{this.fadeValue=F.fade})),yield this._tween.onTweenComplete.asPromise(),this._tween=null}))}update(){super.update(),this._starfieldFilter&&(this._starfieldFilter.timeSeconds=j.q.instance.game.time.timeMS/1e3*this.speed,this._starfieldFilter.alpha=this.fadeValue)}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"speed",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_fadeInDurationMs",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_fadeOutDurationMs",void 0),(0,F.Cg)([(0,G.gfw)(V.i),(0,F.Sn)("design:type",String)],z.prototype,"_fadeInEase",void 0),(0,F.Cg)([(0,G.gfw)(V.i),(0,F.Sn)("design:type",String)],z.prototype,"_fadeOutEase",void 0),z=(0,F.Cg)([(0,G.EVk)("StarfieldFilter",$.Y.effect)],z)},99979:(k,B,U)=>{"use strict";U.d(B,{XP:()=>F,bf:()=>V,gI:()=>W});var F,G=U(87490),j=U(88022),$=U(35120);!function(k){k.fire="icon-mini-element-fire",k.water="icon-mini-element-water",k.plant="icon-mini-element-plant",k.ice="icon-mini-element-ice",k.storm="icon-mini-element-storm",k.shadow="icon-mini-element-shadow",k.physical="icon-mini-element-physical",k.astral="icon-mini-element-astral"}(F||(F={}));const H={[G.EElementType.Fire]:F.fire,[G.EElementType.Water]:F.water,[G.EElementType.Plant]:F.plant,[G.EElementType.Ice]:F.ice,[G.EElementType.Storm]:F.storm,[G.EElementType.Shadow]:F.shadow,[G.EElementType.Physical]:F.physical,[G.EElementType.Astral]:F.astral};var V;!function(k){k.fire="elemental-base-fire",k.water="elemental-base-water",k.plant="elemental-base-earth",k.ice="elemental-base-ice",k.storm="elemental-base-storm",k.shadow="elemental-base-shadow",k.physical="elemental-base-physical",k.astral="elemental-base-astral"}(V||(V={}));G.EElementType.Fire,V.fire,G.EElementType.Water,V.water,G.EElementType.Plant,V.plant,G.EElementType.Ice,V.ice,G.EElementType.Storm,V.storm,G.EElementType.Shadow,V.shadow,G.EElementType.Physical,V.physical,G.EElementType.Astral,V.astral;class W{static getElementIconTexture(k){const B=H[k];return $.q.instance.game.cache.getTexture(j._.Ui_battle_revamp_json,B)}}},25834:(k,B,U)=>{"use strict";U.d(B,{T:()=>Y});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U.n($),V=U(50508),W=U(8394),q=U(15821),K=U(1195),z=U(80105);let Y=class{constructor(){this._hasPopulatedFromSecure=!1,this._previouslyUsedByUniqueId={}}initialize(){const k=this._player.player.kennel;{const B=this._inventory.getAllOfType("pet").map((k=>{const B={uniqueID:k.data.uniqueId};return this.updateDataFromSecurePet(B,k),B}));k.populateKennel(B),this._hasPopulatedFromSecure=!0}this._inventory.onChange.removeAll(this),this._inventory.onChange.add((B=>(0,F.sH)(this,void 0,void 0,(function*(){var U;if(!(0,W.u)("pet",B))return;let F=k.data.find((k=>k.uniqueID===B.data.uniqueId));if(0===B.quantity)return void(F&&(this._previouslyUsedByUniqueId[F.uniqueID]=F,k.removePetData(F)));let G=!1;F||(F=null!==(U=this._previouslyUsedByUniqueId[B.data.uniqueId])&&void 0!==U?U:{uniqueID:B.data.uniqueId},G=!0),this.updateDataFromSecurePet(F,B),this.updateTeamAssignment(B.data,F),G&&k.addPetFromData(F)}))),this)}getSecureData(k){var B;return null===(B=this._inventory.getAllOfType("pet").find((B=>{var U;return(null===(U=B.data)||void 0===U?void 0:U.uniqueId)===k})))||void 0===B?void 0:B.data}add(k){this._net.add(k).then((B=>{const U=this._inventory.getAllOfType("pet").find((k=>k.data.uniqueId===B));if(!U)throw new Error("Returned pet does not exist in inventory");this.updateDataFromSecurePet(k,U)})).catch(G.RQr.createHandler("Failed to create secure pet"))}remove(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this._net.remove(k)}))}saveUpdatedPets(...k){if(!this._hasPopulatedFromSecure)return;const B=[],U=H().keyBy(k,"uniqueID");for(const F of this._inventory.getAllOfType("pet")){const{uniqueId:k}=F.data,j=U[k];if(!G.Aq$.isDefined(null==j?void 0:j.uniqueID))continue;const $={uniqueID:k};this.updateDataFromSecurePet($,F);const V=H().omit(j,["hp","foreignSpells","evolve"]);q.A.isDeepEqualOrNullishAcyclic($,V)||B.push({id:{type:F.type,id:F.id,uuid:F.uuid},data:j})}0!==B.length&&this._net.update(B).catch(G.RQr.createHandler(`Could not save updated pets ${JSON.stringify(k.map((k=>k.uniqueID)))}`))}updateDataFromSecurePet(k,B){var U;const F=B.data;if((null==F?void 0:F.uniqueId)!==k.uniqueID)throw new Error("Attempted to overwrite one pet with another");k.ID=B.id,k.nickname=F.nickname,k.level=F.level.current,k.nextLevelProgressPercent=F.level.percentToNext,k.stars=F.level.stars,k.levelCaught=F.caught.level,k.catchDate=F.caught.date,k.mergeRank=F.mergeRank,k.team=F.positionInTeam,k.temporaryTeamPosition=F.temporaryTeamPosition,k.evolutionCount=F.evolutionCount,null!==(U=k.gear)&&void 0!==U||(k.gear={});for(const G of V.p)k.gear[G]=F.gear[G]}updateTeamAssignment(k,B){var U;if(k.positionInTeam===B.team)return;const F=this._player.player.kennel;G.Aq$.isDefined(B.team)&&(null===(U=F.getTeamPosition(B.team))||void 0===U?void 0:U.data)===B&&F.removeAtTeamPosition(B.team),G.Aq$.isDefined(k.positionInTeam)&&F.setTeamPosition(B,k.positionInTeam)}};(0,F.Cg)([(0,j.inject)("e20-0fb0"),(0,F.Sn)("design:type",K.E)],Y.prototype,"_player",void 0),(0,F.Cg)([(0,j.inject)("61f-37d6"),(0,F.Sn)("design:type",z.U)],Y.prototype,"_inventory",void 0),(0,F.Cg)([(0,j.inject)("f45-d827"),(0,F.Sn)("design:type",Function)],Y.prototype,"_net",void 0),Y=(0,F.Cg)([(0,j.injectable)()],Y)},80105:(k,B,U)=>{"use strict";U.d(B,{U:()=>K});var F,G=U(8674),j=U(62459),$=U(79687),H=U(95891),V=U.n(H),W=U(35537);const q="stackable";let K=class{constructor(){this.onChange=new j.HN0,this._cacheByPath={},this._cacheByUuid={},this[F]="secureInventoryChanges"}initialize(k){this._cacheByPath={},this._cacheByUuid={};for(const B of k)this.replaceItem(B)}get(k){var B;if(j.Aq$.isDefined(k))return"string"==typeof k?this._cacheByUuid[k]:V().get(this._cacheByPath,[k.type,k.id,null!==(B=k.uuid)&&void 0!==B?B:q])}getAllOfType(k){var B;const U=[];for(const F of Object.values(null!==(B=this._cacheByPath[k])&&void 0!==B?B:{}))for(const k of Object.values(F))U.push(k);return U}getCount(k){var B,U;if(!j.Aq$.isDefined(k))return 0;const F=V().get(this._cacheByPath,[k.type,k.id],{});return j.Aq$.isDefined(k.uuid)?null!==(U=null===(B=F[k.uuid])||void 0===B?void 0:B.quantity)&&void 0!==U?U:0:Object.values(F).map((k=>k.quantity)).reduce(((k,B)=>k+B),0)}[(F=W.sE,W.JN)](k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=new Map;for(const U of k)B.set(U,this.replaceItem(U));for(const U of k){const k=B.get(U);V().isEqual(U,k)||this.onChange.dispatch(U,k)}}))}destroy(){this.onChange.dispose()}replaceItem(k){var B;const U=null!==(B=k.uuid)&&void 0!==B?B:q,F=[k.type,k.id,U],G=V().get(this._cacheByPath,F);return k.quantity>0?(V().setWith(this._cacheByPath,F,k,Object),this._cacheByUuid[U]=k):(V().unset(this._cacheByPath,F),delete this._cacheByUuid[U]),G}};K=(0,G.Cg)([(0,$.injectable)()],K)},91620:(k,B,U)=>{"use strict";U.d(B,{D:()=>ct});var F,G=U(8674),j=U(62459),$=U(79687),H=U(90633),V=U(8394),W=U(98252),q=U(35120),K=U(1195),z=U(77938),Y=U(73797),Q=U(67665),X=U(96494),Z=U(13956),J=U(30226),tt=U(82885);!function(k){k.DualPackage="dual-package",k.UltraFocused="ultra-focused"}(F||(F={}));class et extends tt.J{}et._featureName="contextual-offers",et._defaultConfig={enabled:!1,promptVariant:void 0};var it=U(10674),st=U(43516),nt=U(36233);class at{getAvailableOffers(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=nt.p.getVariables();return(null==k?void 0:k.enabled)?[k]:[]}))}}var rt=U(3519),ot=U(96797);class ht{getAvailableOffers(){return(0,G.sH)(this,void 0,void 0,(function*(){try{return(yield this._networkHandler.getSegmentedOffers()).offers}catch(k){return j.VyI.log(`Error loading Segmented Offers: ${k}`,j.$bb.Error),[]}}))}}(0,G.Cg)([(0,Z.b)("eee-e872"),(0,G.Sn)("design:type",rt.U)],ht.prototype,"_networkHandler",void 0);let ct=class{get meetsMembershipRequirement(){return this._meetsMembershipRequirement}constructor(){this._dataSources=[new ht,new at],this._meetsMembershipRequirement=!1,q.q.instance.prodigy.game.broadcaster.addAppListener(Y.H3.MembershipResponseReceived,this.handleMembershipChange.bind(this),this,void 0,!0)}loadOffersFromData(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!j.Aq$.isDefined(this._cachedData)){for(const k of this._dataSources){const B=yield k.getAvailableOffers();if(B.length>0){this._cachedData=B;break}}this.checkOfferAssignment().then(this.processMembershipRequirement.bind(this)).catch(j.RQr.createHandler("Failed to process segmented offer membership requirement"))}}))}getActiveOfferAsync(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;return j.Aq$.isDefined(this._loadDataPromise)||(this._loadDataPromise=this.loadOffersFromData()),yield this._loadDataPromise,null===(k=this._cachedData)||void 0===k?void 0:k.find((k=>ot.P.isOfferActive(k)||ot.P.isOfferInGracePeriod(k)))}))}checkOfferAssignment(){return(0,G.sH)(this,void 0,void 0,(function*(){!this.userHasOfferAvailable()&&j.Aq$.isDefined(this.activeOffer)&&(yield this.assignActiveOfferToPlayer(),this._segment.segmentedOffers.sendSegmentedOfferAssignedEvent(this.activeOffer,ot.P.getUserSegmentIndex(this.activeOffer)),this.setBreadcrumbUserHasOfferAvailable())}))}destroy(){q.q.instance.prodigy.game.broadcaster.removeAppListener(Y.H3.MembershipResponseReceived,this,void 0)}handleMembershipChange(k){"success"===k&&this.processMembershipRequirement().catch(j.RQr.createHandler("Failed to process segmented offer membership requirement"))}processMembershipRequirement(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this.activeOffer)return void(this._meetsMembershipRequirement=!1);if(this.isPlayerOfferStateValid()||(this._loggedInPlayer.player.clearSegmentedOfferState(),yield this.assignActiveOfferToPlayer()),!j.Aq$.isDefined(this._loggedInPlayer.player.data.segmentedOfferState))return void(this._meetsMembershipRequirement=!1);const k=this._loggedInPlayer.player.data.segmentedOfferState;if(void 0===k.startingMembership)return void(this._meetsMembershipRequirement=this._loggedInPlayer.isMember());const B=yield this._loggedInPlayer.player.getActiveMathMembership();if(!j.Aq$.isDefined(B)||!this._loggedInPlayer.isMember())return yield this.assignActiveOfferToPlayer(),void(this._meetsMembershipRequirement=!1);k.startingMembership===B.currentPackage.id?(this._loggedInPlayer.player.data.segmentedOfferState.upgradeOptions=(null==B?void 0:B.upgradeOptions)||[],this._loggedInPlayer.player.forceSaveCharacter(),this._meetsMembershipRequirement=!1):this._meetsMembershipRequirement=!0}))}isPlayerOfferStateValid(){var k;return this.activeOffer?(null===(k=this._loggedInPlayer.player.data.segmentedOfferState)||void 0===k?void 0:k.offerId)===this.activeOffer.id:void 0===this._loggedInPlayer.player.data.segmentedOfferState}get currentOfferStatus(){const k=this.activeOffer;return k&&this._loggedInPlayer.player.hasCompletedTutorial()?ot.P.isOfferEndingSoon(k)?st.v.OFFER_ENDING_SOON:ot.P.isOfferInGracePeriod(k)?st.v.OFFER_IN_GRACE_PERIOD:st.v.OFFER_ACTIVE:st.v.NO_ACTIVE_OFFER}get rewardsForCurrentUserSegment(){const k=this.activeOffer;if(!k)return[];const B=ot.P.getUserSegment(k);return B?B.rewards:[]}get activeOffer(){var k;if(void 0!==this._cachedData)return null===(k=this._cachedData)||void 0===k?void 0:k.find((k=>ot.P.isOfferActive(k)||ot.P.isOfferInGracePeriod(k)));j.VyI.log("Attemping to read active segmented offer before it was loaded. Try getActiveOfferAsync() to first load the data",j.$bb.Warning)}assignActiveOfferToPlayer(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;this.activeOffer&&(this._loggedInPlayer.isMember()?this._loggedInPlayer.player.setSegmentedOfferState({offerId:this.activeOffer.id,startingMembership:null===(B=null===(k=yield this._loggedInPlayer.player.getActiveMathMembership())||void 0===k?void 0:k.currentPackage)||void 0===B?void 0:B.id,upgradeOptions:(yield this._loggedInPlayer.player.getMembershipUpsellData()).upgradeOptions}):this._loggedInPlayer.player.setSegmentedOfferState({offerId:this.activeOffer.id,startingMembership:void 0,upgradeOptions:[]}))}))}redeemActiveOffer(){const k=this.rewardsForCurrentUserSegment,B=this.activeOffer;k.length>0&&(this.resetSurfacingBreadcrumbs(),this._loggedInPlayer.player.clearSegmentedOfferState(),this._networkHandler.redeemOffer(B.id,ot.P.getUserSegmentIndex(B)).then((k=>{k.items.some((k=>"petHat"===k.type||"petRelic"===k.type))&&this._petGearInventory.refreshPetGear().catch(j.RQr.createHandler("Failed to refresh pet gear after redeeming segmented offer"))})).catch(j.RQr.createHandler(`Failed to redeem segmented offer. Offer ID: ${B.id}.`)).finally((()=>{this._loggedInPlayer.player.encounters.setOfferResolved(B.id)})),k.forEach((k=>{var B,U,F;(0,V.p)(k.type,k.ID)?this._segment.item.sendItemReceivedEvent(k.ID,null===(U=null===(B=z.t.getItem(k.type,k.ID))||void 0===B?void 0:B.data)||void 0===U?void 0:U.name,k.type,null!==(F=k.N)&&void 0!==F?F:1,{source_type:"segmented_offers_reward"}):J.J.bagItem(k,q.q.instance.prodigy.game,"got-item",void 0)})),this.processMembershipRequirement().catch(j.RQr.createHandler("Failed to process segmented offer membership requirement")))}rejectActiveOffer(){const k=this.activeOffer;k&&ot.P.isOfferInGracePeriod(k)&&(this.resetSurfacingBreadcrumbs(),this._loggedInPlayer.player.encounters.setOfferResolved(k.id),this._loggedInPlayer.player.clearSegmentedOfferState(),this.processMembershipRequirement().catch(j.RQr.createHandler("Failed to process segmented offer membership requirement")))}userHasChangedSegment(){const k=this.activeOffer,B=this._currentSegmentIndex;return!!k&&(this._currentSegmentIndex=ot.P.getUserSegmentIndex(k),j.Aq$.isDefined(B)&&j.Aq$.isDefined(this._currentSegmentIndex)&&this._currentSegmentIndex!==B)}userCanReceiveSegmentedOffers(){const k=this._loggedInPlayer.player.hasCompletedTutorial(),B=!this._loggedInPlayer.isMember()||this._loggedInPlayer.player.hasMembershipUpgradeOptions();return k&&B&&!W.pF.isNativeApp()}userHasEligibleOfferAvailable(){return this.currentOfferStatus!==st.v.NO_ACTIVE_OFFER&&this.userCanReceiveSegmentedOffers()}shouldAutoSurfaceSegmentedOffers(){return!this._loggedInPlayer.player.isPlayingAtSchool()||!et.isFeatureEnabled()}userHasLastChance(){return this.currentOfferStatus===st.v.OFFER_IN_GRACE_PERIOD&&!this._breadcrumbManager.isBreadcrumbComplete(H.B.FEATURE_SEGMENTED_OFFERS,H.B.BREADCRUMB_SEGMENTED_OFFERS_SUPPRESS_LAST_CHANCE)}userHasOfferAvailable(){return this._breadcrumbManager.isBreadcrumbComplete(H.B.FEATURE_SEGMENTED_OFFERS,H.B.BREADCRUMB_SEGMENTED_OFFERS_OFFER_AVAILABLE)}userHasSeenFirstOffer(){return this._breadcrumbManager.isBreadcrumbComplete(H.B.FEATURE_SEGMENTED_OFFERS,H.B.BREADCRUMB_SEGMENTED_OFFERS_FIRST_OFFER_SEEN)}userHasSeenFirstBattleLost(){return this._breadcrumbManager.isBreadcrumbComplete(H.B.FEATURE_SEGMENTED_OFFERS,H.B.BREADCRUMB_SEGMENTED_OFFERS_FIRST_BATTLE_LOST)}setBreadcrumbUserHasOfferAvailable(){this.activeOffer&&this._breadcrumbManager.completeBreadcrumb(H.B.FEATURE_SEGMENTED_OFFERS,H.B.BREADCRUMB_SEGMENTED_OFFERS_OFFER_AVAILABLE)}setBreadcrumbHasSeenFirstOffer(){this._breadcrumbManager.completeBreadcrumb(H.B.FEATURE_SEGMENTED_OFFERS,H.B.BREADCRUMB_SEGMENTED_OFFERS_FIRST_OFFER_SEEN)}setBreadcrumbHasSeenFirstBattleLost(){this._breadcrumbManager.completeBreadcrumb(H.B.FEATURE_SEGMENTED_OFFERS,H.B.BREADCRUMB_SEGMENTED_OFFERS_FIRST_BATTLE_LOST)}resetSurfacingBreadcrumbs(){this._breadcrumbManager.resetBreadcrumbs(H.B.FEATURE_SEGMENTED_OFFERS)}};(0,G.Cg)([(0,Z.b)("e20-0fb0"),(0,G.Sn)("design:type",K.E)],ct.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,Z.b)("12f-4e29"),(0,G.Sn)("design:type",X.F)],ct.prototype,"_breadcrumbManager",void 0),(0,G.Cg)([(0,Z.b)("c47-20b6"),(0,G.Sn)("design:type",Q.Y)],ct.prototype,"_segment",void 0),(0,G.Cg)([(0,Z.b)("eee-e872"),(0,G.Sn)("design:type",rt.U)],ct.prototype,"_networkHandler",void 0),(0,G.Cg)([(0,Z.b)("d69-defe"),(0,G.Sn)("design:type",it.q)],ct.prototype,"_petGearInventory",void 0),ct=(0,G.Cg)([(0,$.injectable)(),(0,G.Sn)("design:paramtypes",[])],ct)},3519:(k,B,U)=>{"use strict";U.d(B,{U:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(67238);let H=class extends $.D{redeemOffer(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return this.call(j.D.SegmentedOffers.RedeemOffer,{offerId:k,segmentIndex:B},!0)}))}getSegmentedOffers(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.call(j.D.SegmentedOffers.GetOffers,{},!0)}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},96797:(k,B,U)=>{"use strict";U.d(B,{P:()=>J});var F=U(99625),G=U(38170);class j{static isOfferInDateRange(k,B){return G.r.isDateWithinRange(B,k.startDate,k.endDate)}static isOfferInGracePeriodDateRange(k,B){const U=new Date(k.endDate).getTime(),F=U+k.gracePeriodDays*j.DAY_IN_MS;return G.r.isDateWithinRange(B,U,F)}}j.DAY_IN_MS=864e5;var $=U(35120),H=U(91207),V=U(34829),W=U(77938),q=U(65050),K=U(96810),z=U(41674),Y=U(64353),Q=U(95057),X=U(53661),Z=U(47255);class J{static isOfferActive(k){return j.isOfferInDateRange(k,Date.now())&&!J.userHasResolvedOffer(k)}static isOfferEndingSoon(k){const B=new Date(k.endDate).getTime(),U=B-k.endingSoonDays*V.A.DAY_IN_MS;return G.r.isDateWithinRange(Date.now(),U,B)&&!J.userHasResolvedOffer(k)}static isOfferInGracePeriod(k){return j.isOfferInGracePeriodDateRange(k,Date.now())&&!J.userHasResolvedOffer(k)}static userHasResolvedOffer(k){return $.q.instance.prodigy.gameContainer.get("e20-0fb0").player.encounters.hasResolvedOffer(k.id)}static getUserSegment(k){const B=$.q.instance.prodigy.gameContainer.get("db5-fb6e");return k.segments.sort(((k,B)=>k.priority-B.priority)).find((k=>B.meetsRequirementsDeprecated({requirements:k.featureRequirements})))}static getUserSegmentIndex(k){const B=$.q.instance.prodigy.gameContainer.get("db5-fb6e");return k.segments.sort(((k,B)=>k.priority-B.priority)).findIndex((k=>B.meetsRequirementsDeprecated({requirements:k.featureRequirements})))}static openConfiguredModal(k){const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=$.q.instance.prodigy.gameContainer.get("a02-c2b2"),G=$.q.instance.prodigy.gameContainer.get("c47-20b6");J.sendInterfaceOpenEvents(G,U.activeOffer,B),$.q.instance.prodigy.open.prefabMenu(F.l.SegmentedOffersModal,k,void 0,!0,void 0,J.getFullOfferInjectableProperties(U.activeOffer))}static getFullOfferInjectableProperties(k){const B=$.q.instance.prodigy.gameContainer.get("a02-c2b2"),U=J.getItemInjectableProperties(B.rewardsForCurrentUserSegment),F=$.q.instance.prodigy.gameContainer.get("c47-20b6");return Object.assign({[X.ht.SegmentedOffersTimeRemainingMS]:J.getOfferTimeRemaining(k),[X.ht.SegmentedOffersEnding]:J.isOfferInGracePeriod(k),[X.ht.SegmentedOffersRejected]:B.rejectActiveOffer.bind(B),[X.ht.SegmentedOffersFunnelAdvancedCTA]:J.sendCtaFunnelAdvancedEvent.bind(this,F,k),[X.ht.SegmentedOffersFunnelAdvancedGotMembership]:J.sendMembershipFunnelAdvancedEvent.bind(this,F,k)},U)}static getItemInjectableProperties(k){"pet"!==k[0].type&&k.forEach(((B,U)=>{"pet"===B.type&&(k.splice(U,1),k.unshift(B))}));const B={};return k.forEach(((k,U)=>{B[X.ht.SegmentedOffersItemName+U]=W.t.getItem(k.type,k.ID).data.name,B[X.ht.SegmentedOffersItemIcon+U]=H.E.getIconForType(k.type,k.ID),B[X.ht.SegmentedOffersItemQuantity+U]=`x${k.N}`,B[X.ht.SegmentedOffersItemId+U]=k.ID})),B}static getOfferTimeRemaining(k){const B=new Date(k.endDate).getTime();return Math.max(B-Date.now(),0)}static sendInterfaceOpenEvents(k,B,U,F=!0){k.featureCommon.sendInterfaceEvent({interfaceName:"segmented_offers_main",interfaceType:z.Wm.Window,instanceType:q.N.UI,originType:F?z.$N.AutoSurfaced:z.$N.ButtonClick,originID:"button-click"}),k.playerProgression.sendPlayerProgressionAdvancedEvent({progressionType:"segmented_offers",progressionSubType:B.id,progressionNewValue:(U.encounters.getResolvedOffers().length+1).toString(),progressionPreviousValue:U.encounters.getResolvedOffers().length.toString(),creatureName:"Player"})}static sendCtaFunnelAdvancedEvent(k,B){k.playerProgression.sendFunnelAdvancedEvent({funnelName:B.id,funnelType:"segmented_offers",stepName:K.l.SegmentedOffersClicked},{step_index:3});const U=Y.P.shouldUseUnifiedConversionFlow(Z.o.FunnelSegmentedOffers)?Q.R.UnifiedConversionFlow:Q.R.Static;k.purchase.sendFunnelStart({adType:U,category:"segmented-offers",contentId:B.id,type:"Click-Button-Segmented-Offers",adVersion:Y.P.getAdVersion(Z.o.FunnelSegmentedOffers)})}static sendMembershipFunnelAdvancedEvent(k,B){k.playerProgression.sendFunnelAdvancedEvent({funnelName:B.id,funnelType:"segmented_offers",stepName:K.l.SegmentedOffersGotMembership},{step_index:4})}}},19145:(k,B,U)=>{"use strict";U.d(B,{Z:()=>J});var F=U(8674),G=U(95891),j=U.n(G),$=U(62459),H=U(35120),V=U(44357),W=U(90633),q=U(77578),K=U(28628);const z="tutorial-quests",Y={revampBattleType:K.gu.StatusEffectsTutorial,difficulty:7,opponent:[{data:{ID:62},appearance:{skinColor:3,eyeColor:7,hair:{style:10,color:1}},equipment:{hat:129,boots:57,outfit:114,weapon:152},name:"NPC_NAME_FTUE_WIZARD"}],pets:[{ID:51}],screen:"battle-academy-gh-stairs"};var Q,X=U(73678);!function(k){k.Intro="Intro",k.PreBattleAcademyCutscene="PreBattleAcademyCutscene",k.Battle="Battle",k.PostBattleAcademyCutscene="PostBattleAcademyCutscene"}(Q||(Q={}));const Z=[Q.Intro,Q.PreBattleAcademyCutscene,Q.Battle,Q.PostBattleAcademyCutscene];class J{static get instance(){var k;return null!==(k=this._instance)&&void 0!==k?k:this._instance=new J}constructor(){this._currentStepIndex=-1,this._segment=H.q.instance.prodigy.gameContainer.get("c47-20b6")}isInProgress(){return this._currentStepIndex>=0}runSpellStatusEffectsTutorial(k=(()=>null)){(0,V.dD)(!1),this._previousMap=H.q.instance.prodigy.world.getCurrentMap(),this._currentStepIndex=0,this.runSequence().then((()=>{this.handleTutorialCompletion()})).catch((k=>{$.VyI.log(`Error running Spell Status Effects Tutorial: ${k}`,$.$bb.Error)})).finally(this.leaveTutorial.bind(this,k))}runSequence(){return(0,F.sH)(this,void 0,void 0,(function*(){for(;this._currentStepIndex>=0&&this._currentStepIndex{H.q.instance.prodigy.world.getZone(X.A_.ACADEMY).getScene("statusEffectFTUE1").onSceneComplete.addOnce((()=>{k()})),H.q.instance.prodigy.world.playScene("academy-statusEffectFTUE1")}))}))}playAcademyPostBattleCutscene(){return(0,F.sH)(this,void 0,void 0,(function*(){return new Promise((k=>{H.q.instance.prodigy.world.getZone(X.A_.ACADEMY).getScene("statusEffectFTUE2").onSceneComplete.addOnce((()=>{k()})),H.q.instance.prodigy.world.playScene("academy-statusEffectFTUE2")}))}))}startBattle(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.getFTUEBattleMods();return new Promise((B=>{H.q.instance.prodigy.battle.start(k,(()=>{this._segment.statusEffects.sendStatusEffectFtueEvent(q.K.StatusEffectFTUEBattleCompleted),B()}),(()=>{B()}),(()=>{B()})),this._segment.statusEffects.sendStatusEffectFtueEvent(q.K.StatusEffectFTUEBattleStarted)}))}))}getFTUEBattleMods(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=H.q.instance.prodigy.gameContainer.get($.t5G.AssetLoader);yield B.loadAssets([z]);const U=H.q.instance.game.cache.getJSON(z),F=null!==(k=null==U?void 0:U["status-effects-tutorial"])&&void 0!==k?k:Y;return j().cloneDeep(F)}))}handleTutorialCompletion(){this._segment.statusEffects.sendStatusEffectFtueEvent(q.K.StatusEffectFTUECompleted),H.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(W.B.FEATURE_STATUS_EFFECTS,W.B.BREADCRUMB_STATUS_EFFECTS_FTUE_COMPLETED)}static canShowSpellStatusEffectsTutorial(){const k=[];H.q.instance.prodigy.world.getZone(X.A_.FOREST).getCurrentQuestID()>3||k.push("The player has not progressed far enough in the game");H.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(W.B.FEATURE_STATUS_EFFECTS,W.B.BREADCRUMB_STATUS_EFFECTS_FTUE_COMPLETED)&&k.push("Tutorial has already been viewed");const B=k.join("\n");return{canBeTransported:0===k.length,info:B}}leaveTutorial(k){this._currentStepIndex=-1,k(),H.q.instance.prodigy.world.it(this._previousMap),(0,V.dD)(!0)}escapeTutorial(){if(this.isInProgress()){this._currentStepIndex=-1;const k=H.q.instance.prodigy.gameContainer.get("b5b-6fa4");k.isDialogueInProgress()&&k.close(!0),this.leaveTutorial((()=>null))}}}},45224:(k,B,U)=>{"use strict";U.d(B,{f:()=>F});class F{}F.HARRIET_NAME="NPC_NAME_HARRIET_HOOD",F.DON_ZORRO_NAME="NPC_NAME_DON_ZORRO",F.BARGO_NAME="NPC_NAME_BARGO",F.VERNA_NAME="NPC_NAME_VERNA",F.HARRIET_NAME_SEGMENT="harriet_hood",F.DON_ZORRO_NAME_SEGMENT="don_zorro",F.TOWN_CENTRE="lamplight-B3",F.HARRIET_ZONE="lamplight-A1",F.DON_ZORRO_ZONE="lamplight-D3",F.BARGO_ZONE="lamplight-B2",F.VERNA_ZONE="lamplight-C3-arena",F.MAGIC_EGGS_CURRENCY_ID=17,F.FOX_HATS=[123,124,125,229,261,262,263,285],F.BUNNY_HATS=[126,127,128,222,228,259,260,265,285]},37623:(k,B,U)=>{"use strict";var F;U.d(B,{O:()=>F}),function(k){k.POINTS="UI_POINTS",k.YOUR_CLASS="UI_YOUR_CLASS",k.YOUR_SCHOOL="UI_YOUR_SCHOOL",k.YOU_QUALIFIED="STATE_CHALLENGES_QUALIFIED",k.YOUR_PRIZES="STATE_CHALLENGES_PRIZES",k.HIGHEST_MILESTONE="STATE_CHALLENGES_HIGHEST_MILESTONE",k.NEXT_CHALLENGE="STATE_CHALLENGES_NEXT_CHALLENGE",k.STATE_CHALENGES_STARTS="STATE_CHALENGES_STARTS",k.STATE_CHALLENGES_ENDS_IN="STATE_CHALLENGES_ENDS_IN",k.STATE_CHALLENGES_ON_NOW="STATE_CHALLENGES_ON_NOW",k.STATE_CHALLENGES_CHAMPION_DESCRIPTION="STATE_CHALLENGES_CHAMPION_DESCRIPTION",k.STATE_CHALLENGES_QUALIFIED_DESCRIPTION="STATE_CHALLENGES_QUALIFIED_DESCRIPTION",k.STATE_CHALLENGE_DESCRIPTION="STATE_CHALLENGE_DESCRIPTION",k.STATE_CHALLENGES_CURRENT_TITLE="STATE_CHALLENGES_CURRENT_TITLE",k.STATE_CHALLENGES_CHAMPION_TITLE="STATE_CHALLENGES_CHAMPION_TITLE",k.LEADERBOARDS_SUBHEADING_CORRECT_ANSWERS="LEADERBOARDS_SUBHEADING_CORRECT_ANSWERS",k.CHEST_REWARD_CONGRATULATIONS="CHEST_REWARD_CONGRATULATIONS",k.STATE_CHALLENGES_CLASS_DESCRIPTION="STATE_CHALLENGES_CLASS_DESCRIPTION",k.STATE_CHALLENGES_ONLY_CLASS_DESCRIPTION="STATE_CHALLENGES_ONLY_CLASS_DESCRIPTION",k.STATE_CHALLENGES_RANK="STATE_CHALLENGES_RANK",k.STATE_CHALLENGES_TOTAL_CORRECT="STATE_CHALLENGES_TOTAL_CORRECT",k.STATE_CHALLENGES_THIS_MONTH="STATE_CHALLENGES_THIS_MONTH",k.STATE_CHALLENGES_CLAIM_REWARDS="STATE_CHALLENGES_CLAIM_REWARDS",k.STATE_CHALLENGE_CELEBRATION_BOX="STATE_CHALLENGE_CELEBRATION_BOX",k.NATIONAL_CUP_ENDED="NATIONAL_CUP_ENDED",k.NATIONAL_CUP_ENDED_LONG="NATIONAL_CUP_ENDED_LONG",k.NATIONAL_CUP_TITLE="NATIONAL_CUP_TITLE",k.NATIONAL_CUP_DESCRIPTION="NATIONAL_CUP_DESCRIPTION",k.NATIONAL_CUP_RESULTS_PENDING="NATIONAL_CUP_RESULTS_PENDING",k.NATIONAL_CUP_RESULTS_PENDING_LONG="NATIONAL_CUP_RESULTS_PENDING_LONG",k.NATIONAL_CUP_RESULTS_OFFICIAL="NATIONAL_CUP_RESULTS_OFFICIAL",k.BUTTON_NEXT_CAPITAL="BUTTON_NEXT_CAPITAL"}(F||(F={}))},4766:(k,B,U)=>{"use strict";U.d(B,{H:()=>G});var F=U(8820);class G{static getEndDateForCurrentChallenge(k,B,U){if(k===F.a.NationalCup&&U)return U;if(k===F.a.StateChallenge){const k=B.getUTCFullYear(),U=B.getUTCMonth();return new Date(Date.UTC(k,U+1,1,G.ROLLOVER_HOUR_UTC)-1)}}static isInDowntime(k,B,U,j){if(k===F.a.NationalCup){if(!U)return!1;const k=B.getTime()-U.getTime();return k>=0&&kk.month===V));return null===(H=null==W?void 0:W.currentSchool)||void 0===H?void 0:H.node}static getMsUntilEndOfCurrentChallenge(k,B,U){const F=G.getEndDateForCurrentChallenge(k,B,U);return F?F.getTime()-B.getTime():0}static getDaysUntilEndOfCurrentChallenge(k,B,U){let j;return j=k===F.a.NationalCup&&U?U:G.getEndDateForCurrentChallenge(k,B,U),j?Math.max(0,Math.ceil((j.getTime()-B.getTime())/864e5)):0}static getRepresentativeDateForPreviousChallenge(k,B,U,j){if(G.getPreviousChallengeCompetition(k,B,j)===F.a.NationalCup&&U&&j){const k=(U.getTime()+j.getTime())/2;return new Date(k)}const{month:$,year:H}=G.getPreviousStateChallengeMonthYear(B);return new Date(Date.UTC(H,$-1,15))}static getPreviousChallengeCompetition(k,B,U){return k===F.a.NationalCup&&U&&B>U?F.a.NationalCup:F.a.StateChallenge}}G.ROLLOVER_HOUR_UTC=8,G.ROLLOVER_WINDOW_MS=36e5*G.ROLLOVER_HOUR_UTC},2980:(k,B,U)=>{"use strict";U.d(B,{W:()=>G,v:()=>Z});var F,G,j=U(8674),$=U(62459),H=U(79687),V=U(95891),W=U.n(V),q=U(8820),K=U(35120),z=U(59114),Y=U(4766),Q=U(88912),X=U(87490);!function(k){k.CLASSROOM="CLASSROOM",k.SCHOOL="SCHOOL"}(G||(G={}));let Z=F=class{constructor(){this._isCurrentlyInDownTime=!1,this._totalPhaseCorrectAnswers=0,this._hasValidClassroom=void 0,this._isInitialized=!1,this._isInRewardsGrantingPeriod=!1,this.onNewDataProcessed=new $.HN0,this._hasAnimationPlayed=!1,this._activeCompetitionPhase=q.a.None,this._viewableCompetitionPhase=q.a.None}get isCurrentlyInDownTime(){return this._isCurrentlyInDownTime}get downtimeTitleLocalizationKeyOverride(){var k;return null===(k=this._prodigyCupConfigData)||void 0===k?void 0:k.downtimeTitleLocalizationKeyOverride}get downtimeSubtitleLocalizationKeyOverride(){var k;return null===(k=this._prodigyCupConfigData)||void 0===k?void 0:k.downtimeSubtitleLocalizationKeyOverride}get cachedRolloverHourUTC(){var k;return null===(k=this._prodigyCupConfigData)||void 0===k?void 0:k.rolloverHourUTC}get nationalCupResultsValidated(){var k;return null===(k=this._prodigyCupConfigData)||void 0===k?void 0:k.nationalCupResultsValidated}get currentClassroomData(){return this._currentClassroomData}get totalPhaseCorrectAnswers(){return this._totalPhaseCorrectAnswers}get endDate(){return this._endDate}get finalsPhaseStartDate(){return this._finalsPhaseStartDate}get finalsPhaseEndDate(){return this._finalsPhaseEndDate}get lastUpdated(){return this._lastUpdated}get isInitialized(){return this._isInitialized}get isInRewardsGrantingPeriod(){return this._isInRewardsGrantingPeriod}get hasAnimationPlayed(){return this._hasAnimationPlayed}get classroomRacerIds(){return this._classroomRacerIds}get schoolRacerIds(){return this._schoolRacerIds}get classroomPortraitIds(){return this._classroomPortraitIds}get schoolPortraitIds(){return this._schoolPortraitIds}get lastClassCodeFetched(){return this._lastClassCodeFetched}get activeCompetitionPhase(){return this._activeCompetitionPhase}get viewableCompetitionPhase(){return this._viewableCompetitionPhase}hasValidClassroom(){return(0,j.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,j;if($.Aq$.isDefined(this._hasValidClassroom))return this._hasValidClassroom;if("US"!==(null===(k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.geolocationData.country)||void 0===k?void 0:k.iso_code))return this._hasValidClassroom=!1,!1;const H=K.q.instance.prodigy.gameContainer.get("a96-1470"),V=K.q.instance.prodigy.gameContainer.get("c97-bd0d"),[W,q]=yield Promise.all([H.isEligibleForMenu(),V.getCurrentClassCode()]),z=null!==(j=null===(G=null===(F=null===(U=null===(B=q)||void 0===B?void 0:B.data)||void 0===U?void 0:U.player)||void 0===F?void 0:F.currentClassroom)||void 0===G?void 0:G.code)&&void 0!==j?j:void 0;return $.Aq$.isDefined(z)&&(this._lastClassCodeFetched=z),this._hasValidClassroom=!$.Aq$.isDefined(z)||$.Aq$.isDefined(z)&&z.length>0&&W,this._hasValidClassroom}))}getCurrentSchoolRanking(){return(0,j.sH)(this,void 0,void 0,(function*(){var k;return yield this.initialize(),null===(k=this._currentSchoolData)||void 0===k?void 0:k.rank}))}getSchoolEntryForPreviousChallenge(){return this._previousChallengeResults}getSchoolQualificationStatus(){return(0,j.sH)(this,void 0,void 0,(function*(){return this._qualificationStatus}))}getStateChallengesLeaderboard(k){if(!this._isInitialized||!this._currentClassroomData&&!this._currentSchoolData)return void $.VyI.log("StateChallengesDataProvider: getStateChallengesLeaderboard: Data not initialized",$.$bb.Warning);const B=k===G.CLASSROOM;return{myEntry:B?this._currentClassroomData:this._currentSchoolData,competitorEntries:B?this._stateChallengeClassroomRankingMap:this._stateChallengeSchoolRankingMap}}static getNextRolloverMs(k){const B=new Date(k),U=Date.UTC(B.getUTCFullYear(),B.getUTCMonth(),B.getUTCDate(),Y.H.ROLLOVER_HOUR_UTC);return k=this._cacheExpiresAt&&(this._initializationPromise=void 0,this._isInitialized=!1),this._initializationPromise||(this._initializationPromise=(()=>(0,j.sH)(this,void 0,void 0,(function*(){yield this.checkAndCacheDownTimeState(),$.Aq$.isDefined(this._lastClassCodeFetched)&&this._hasValidClassroom&&(yield this.requestAndCacheProdigyCupData())})))()),this._initializationPromise}))}debugLogStateChallengesLeaderboard(k){const B=this.getStateChallengesLeaderboard(k);X.Util.isDefined(B)?$.VyI.log(`StateChallengesDataProvider from cache: ${B}`,$.$bb.Info):this.initialize().then((()=>{const B=this.getStateChallengesLeaderboard(k);B?($.VyI.log("StateChallenge Leaderboard retrieved from database",$.$bb.Info),$.VyI.log(`StateChallengesDataProvider: ${B}`,$.$bb.Info)):$.VyI.log("StateChallengesDataProvider: debug: No leaderboard data available",$.$bb.Error)})).catch((k=>{$.VyI.log("StateChallengesDataProvider: debug: Error initializing data",$.$bb.Error,k)}))}requestAndCacheProdigyCupData(){return(0,j.sH)(this,void 0,void 0,(function*(){var k,B,U,G,j,H,V,Y;this._isInRewardsGrantingPeriod=!1;const Q=K.q.instance.prodigy.gameContainer.get("a96-1470"),X=yield Q.fetchStateChallengesData();if(!X||!$.Aq$.isDefined(null===(B=null===(k=null==X?void 0:X.data)||void 0===k?void 0:k.viewer)||void 0===B?void 0:B.currentClassroom))return void $.VyI.log("StateChallengesDataProvider: requestAndCacheStateChallengesData: No data received",$.$bb.Error);const Z=null===(U=X.data.viewer.currentClassroom.node)||void 0===U?void 0:U.classroomMonthlyLeaderboard,J=null===(j=null===(G=X.data.viewer.currentClassroom.node)||void 0===G?void 0:G.currentProdigyCup)||void 0===j?void 0:j.stateChallengesPhase,tt=null!==(Y=null===(V=null===(H=X.data.viewer.currentClassroom.node)||void 0===H?void 0:H.currentProdigyCup)||void 0===V?void 0:V.finalsPhase)&&void 0!==Y?Y:null;if(!$.Aq$.isDefined(Z)||!$.Aq$.isDefined(J))return void $.VyI.log("StateChallengesDataProvider: requestAndCacheStateChallengesData: Incomplete data received",$.$bb.Warning);if(this._activeCompetitionPhase=F.determineActivePhase(J,tt),this._viewableCompetitionPhase=this.determineViewableCompetitionPhase(tt),this._activeCompetitionPhase===q.a.None||this._activeCompetitionPhase===q.a.SparkCup){const{rewardsGrantingPeriodEndDate:k}=yield Q.getRewardsGrantingPeriodEndDate(this._viewableCompetitionPhase);this._isInRewardsGrantingPeriod=$.Aq$.isDefined(k)&&Date.now()<=new Date(k).getTime()}this.cacheFinalsPhaseDates(tt,J),this._viewableCompetitionPhase===q.a.NationalCup?this.cacheNationalCupData(tt,J.stateChallenges.nodes,Z):this.cacheStateChallengeData(J,Z),this._cacheExpiresAt=F.getNextRolloverMs(Date.now());const et=[...z.yT.classViewPetIds],it=[...z.yT.schoolViewPetIds];this._classroomRacerIds=W().sampleSize(et,2),this._schoolRacerIds=W().sampleSize(it,2),this._classroomPortraitIds=W().sampleSize(et,3),this._schoolPortraitIds=W().sampleSize(it,3),this._isInitialized=!0,this.onNewDataProcessed.dispatch()}))}cacheFinalsPhaseDates(k,B){if(X.Util.isDefined(null==k?void 0:k.startDate))this._finalsPhaseStartDate=new Date(k.startDate);else{const k=new Date(B.endDate);this._finalsPhaseStartDate=new Date(Date.UTC(k.getUTCFullYear(),k.getUTCMonth()+1,1))}X.Util.isDefined(null==k?void 0:k.endDate)&&(this._finalsPhaseEndDate=new Date(k.endDate))}determineViewableCompetitionPhase(k){if(this._activeCompetitionPhase===q.a.NationalCup||this._activeCompetitionPhase===q.a.StateChallenge)return this._activeCompetitionPhase;return null!==k&&k.competition===q.a.NationalCup&&new Date(k.endDate).getTime()=k&&U<=F){if(B.competition===q.a.SparkCup)return q.a.SparkCup;if(B.competition===q.a.NationalCup)return q.a.NationalCup}}const F=new Date(k.startDate).getTime(),G=new Date(k.endDate).getTime();return U>=F&&U<=G?q.a.StateChallenge:q.a.None}processLeaderboard(k,B,U){k.forEach((k=>{if(void 0===k.rank||void 0===B.rank)return;const F=Math.abs(k.rank-B.rank)<=2,G=k.rank<=3&&!U.has(k.rank);k!==B&&(F||G)&&U.set(k.rank,k)}))}cacheStateChallengeData(k,B){var U,F,G,j,H,V,W,q,K,z,Q,X,Z,J,tt,et;const it=null==B?void 0:B.currentLeaderboard,st=k.currentStateChallenge;if(!$.Aq$.isDefined(it)||!$.Aq$.isDefined(st))return void $.VyI.log("StateChallengesDataProvider: cacheStateChallengeData: Missing classroom or school node",$.$bb.Warning);if(this._lastUpdated=new Date(k.lastUpdated),this._endDate=k.endDate?new Date(k.endDate):new Date((new Date).getFullYear(),4,1),this._qualificationStatus={qualifiedForNationalCup:$.Aq$.isDefined(k.nationalCupQualificationDate),wonStateChallenge:$.Aq$.isDefined(k.stateChallengeWinnerDate)},this._currentClassroomData=null===(F=null===(U=it.node)||void 0===U?void 0:U.currentClassroom)||void 0===F?void 0:F.node,this._currentSchoolData=null===(j=null===(G=st.node)||void 0===G?void 0:G.currentSchool)||void 0===j?void 0:j.node,!$.Aq$.isDefined(this._currentClassroomData)||!$.Aq$.isDefined(this._currentSchoolData))return void $.VyI.log("StateChallengesDataProvider: cacheStateChallengeData: Missing current classroom or school data",$.$bb.Warning);this._previousChallengeResults=Y.H.findPreviousChallengeResults(k.stateChallenges.nodes,this._viewableCompetitionPhase,new Date(Date.now())),this._totalPhaseCorrectAnswers=null!==(V=null===(H=k.stateChallenges.nodes)||void 0===H?void 0:H.reduce(((k,B)=>{var U,F,G;return k+(null!==(G=null===(F=null===(U=B.currentSchool)||void 0===U?void 0:U.node)||void 0===F?void 0:F.correctAnswers)&&void 0!==G?G:0)}),0))&&void 0!==V?V:0,this._stateChallengeClassroomRankingMap=new Map,this._stateChallengeSchoolRankingMap=new Map;const nt=k.currentStateChallenge;this.processLeaderboard(null!==(q=null===(W=B.currentLeaderboard.node.leaderboard)||void 0===W?void 0:W.nodes)&&void 0!==q?q:[],this._currentClassroomData,this._stateChallengeClassroomRankingMap),this.processLeaderboard(null!==(Q=null===(z=null===(K=B.currentLeaderboard.node.leaderboard)||void 0===K?void 0:K.nodes)||void 0===z?void 0:z.slice(0,3))&&void 0!==Q?Q:[],this._currentClassroomData,this._stateChallengeClassroomRankingMap),this.processLeaderboard(null!==(Z=null===(X=nt.node.nearRankings)||void 0===X?void 0:X.nodes)&&void 0!==Z?Z:[],this._currentSchoolData,this._stateChallengeSchoolRankingMap),this.processLeaderboard(null!==(et=null===(tt=null===(J=nt.node.topRankings)||void 0===J?void 0:J.nodes)||void 0===tt?void 0:tt.slice(0,3))&&void 0!==et?et:[],this._currentSchoolData,this._stateChallengeSchoolRankingMap)}cacheNationalCupData(k,B,U){var F,G,j,H,V;const W=U.currentLeaderboard;$.Aq$.isDefined(W)&&$.Aq$.isDefined(k.currentFinalsSchoolEntry)?(this._lastUpdated=new Date(k.lastUpdated),this._endDate=new Date(k.endDate),this._qualificationStatus={},this._currentClassroomData=null===(G=null===(F=W.node)||void 0===F?void 0:F.currentClassroom)||void 0===G?void 0:G.node,this._currentSchoolData=k.currentFinalsSchoolEntry,this._previousChallengeResults=Y.H.findPreviousChallengeResults(B,this._viewableCompetitionPhase,new Date(Date.now()),k.currentFinalsSchoolEntry,this._endDate),this._totalPhaseCorrectAnswers=k.currentFinalsSchoolEntry.correctAnswers,$.Aq$.isDefined(this._currentClassroomData)?(this._stateChallengeClassroomRankingMap=new Map,this._stateChallengeSchoolRankingMap=new Map,this.processLeaderboard(null!==(H=null===(j=U.currentLeaderboard.node.leaderboard)||void 0===j?void 0:j.nodes)&&void 0!==H?H:[],this._currentClassroomData,this._stateChallengeClassroomRankingMap),this.processLeaderboard(null!==(V=k.leaderboard)&&void 0!==V?V:[],this._currentSchoolData,this._stateChallengeSchoolRankingMap),this.isInNationalCupRewardCollectionPeriod()&&!this.nationalCupResultsValidated&&(this._currentSchoolData.rank=void 0,this.processLeaderboard([],this._currentSchoolData,this._stateChallengeSchoolRankingMap),this._previousChallengeResults.rank=void 0)):$.VyI.log("StateChallengesDataProvider: cacheNationalCupData: Missing current classroom data",$.$bb.Warning)):$.VyI.log("StateChallengesDataProvider: cacheNationalCupData: Missing classroom or finals school entry",$.$bb.Warning)}getGoalsParametersData(){if(this._isInitialized&&(this._currentSchoolData||this._currentClassroomData))return{questionsAnswered:this._currentSchoolData.correctAnswers,competition:this._viewableCompetitionPhase};$.VyI.log("StateChallengesDataProvider: getGoalsParametersData: Data not initialized",$.$bb.Warning)}getGoalsParametersDataForPreviousChallenge(){if(!this._isInitialized||!this._previousChallengeResults)return void $.VyI.log("StateChallengesDataProvider: getGoalsParametersDataForPreviousChallenge: Data not initialized",$.$bb.Warning);return{questionsAnswered:this._previousChallengeResults.correctAnswers,competition:Y.H.getPreviousChallengeCompetition(this.viewableCompetitionPhase,new Date(Date.now()),this._finalsPhaseEndDate)}}setAnimationPlayed(){this._hasAnimationPlayed=!0}checkAndCacheDownTimeState(){return(0,j.sH)(this,void 0,void 0,(function*(){var k;if($.Aq$.isDefined(this._prodigyCupConfigData))return;const B=K.q.instance.prodigy.gameContainer.get("a96-1470"),U=yield B.getProdigyCupConfigData();this._prodigyCupConfigData=U,(null==U?void 0:U.isInDowntimeEvent)?this._isCurrentlyInDownTime=!0:null===(k=null==U?void 0:U.useClientSideDowntimeCalculations)||void 0===k||k?this._isCurrentlyInDownTime=Y.H.isInDowntime(this._viewableCompetitionPhase,new Date(Date.now()),this._finalsPhaseEndDate,null==U?void 0:U.rolloverHourUTC):this._isCurrentlyInDownTime=!1}))}isInNationalCupRewardCollectionPeriod(){return this._activeCompetitionPhase===q.a.None&&this._viewableCompetitionPhase===q.a.NationalCup}isInStateChallengesRewardCollectionPeriod(){return(this._activeCompetitionPhase===q.a.None||this._activeCompetitionPhase===q.a.SparkCup)&&this._viewableCompetitionPhase===q.a.StateChallenge}isInActiveCompetition(){return this._activeCompetitionPhase===q.a.StateChallenge||this._activeCompetitionPhase===q.a.NationalCup}getCurrentChallengeSuffixForSegmentEvents(){return this.getCompetitionPhaseSuffixForSegmentEvents(this.activeCompetitionPhase)}getPreviousChallengeSuffixForSegmentEvents(){const k=Y.H.getPreviousChallengeCompetition(this.viewableCompetitionPhase,new Date(Date.now()),this._finalsPhaseEndDate);return this.getCompetitionPhaseSuffixForSegmentEvents(k)}getCompetitionPhaseSuffixForSegmentEvents(k){return Q.jp[k]}};Z=F=(0,j.Cg)([(0,H.injectable)()],Z)},77510:(k,B,U)=>{"use strict";U.d(B,{z:()=>Q});var F=U(8674),G=U(62459),j=U(79687),$=U(89067),H=U(13956),V=U(40579),W=U(76277),q=U(35120);const K=(0,U(77601).gb)({key:"state-challenges",activateAssociatedExperiments:1,default:{enabled:!1}});var z=U(4766),Y=U(2980);let Q=class{constructor(){this.onPauseButtonClicked=new G.HN0,this._isMenuPaused=!1}get isMenuPaused(){return this._isMenuPaused}hasActiveChallengeOrRewards(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=q.q.instance.prodigy.gameContainer.get("0f9-dd7b");if(yield k.initialize(),k.isInActiveCompetition())return!0;if(k.isInRewardsGrantingPeriod){const B=k.getGoalsParametersDataForPreviousChallenge();if(!B)return!1;return q.q.instance.prodigy.gameContainer.get("43a-6f08").checkHasUnclaimedPreviousRewards(B)}return!1}))}isFeatureAvailable(){return(0,F.sH)(this,void 0,void 0,(function*(){return(0,W.G)(K).enabled&&q.q.instance.prodigy.gameContainer.get("0f9-dd7b").hasValidClassroom()}))}setupHudButton(){return(0,F.sH)(this,void 0,void 0,(function*(){if(yield this._stateChallengesDataProvider.checkAndCacheDownTimeState(),this._stateChallengesDataProvider.isCurrentlyInDownTime)return;let k=z.H.getMsUntilEndOfCurrentChallenge(this._stateChallengesDataProvider.activeCompetitionPhase,new Date(Date.now()),this._stateChallengesDataProvider.endDate);k>0&&(k+=86399999),this._hudService.updateCachedLabelData($.ts.StateChallenges,{labelValue:k});const B=yield this._stateChallengesDataProvider.getCurrentSchoolRanking();this._stateChallengesDataProvider.isInActiveCompetition()&&G.Aq$.isDefined(B)&&B<30&&this._hudService.updateSecondaryLabel($.ts.StateChallenges,B)}))}toggleMenuPause(){this._isMenuPaused=!this._isMenuPaused,this.onPauseButtonClicked.dispatch(this._isMenuPaused)}};(0,F.Cg)([(0,j.inject)("0f9-dd7b"),(0,F.Sn)("design:type",Y.v)],Q.prototype,"_stateChallengesDataProvider",void 0),(0,F.Cg)([(0,H.b)("cc9-a3f0"),(0,F.Sn)("design:type",V.W)],Q.prototype,"_hudService",void 0),Q=(0,F.Cg)([(0,j.injectable)()],Q)},88912:(k,B,U)=>{"use strict";U.d(B,{U4:()=>F,jp:()=>$});var F,G,j=U(8820);!function(k){k[k.Bronze=100]="Bronze",k[k.Silver=1e4]="Silver",k[k.Gold=1e5]="Gold",k[k.Diamond=5e5]="Diamond"}(F||(F={})),function(k){k.NationalCup="-nc",k.None=""}(G||(G={}));const $={[j.a.NationalCup]:G.NationalCup,[j.a.StateChallenge]:G.None,[j.a.SparkCup]:G.None,[j.a.None]:G.None}},54140:(k,B,U)=>{"use strict";U.d(B,{X:()=>Y});var F=U(62459),G=U(88818),j=U(24522),$=U(8820),H=U(35120),V=U(38920),W=U(44094),q=U(88912),K=U(59114),z=U(37623);class Y{static getStateChallengeRacersInjectionData(k,B,U,G,j){const $=j.getStateChallengesLeaderboard(k),H=$.myEntry.rank,V=k=>$.competitorEntries.get(H+k),W=F.Aq$.isDefined(H)?V(1):void 0,q=!F.Aq$.isDefined(W)||3===H,z=1===H,Q=q?V(-2):W,X=V(z?2:-1);let Z=K.yT.defaultRacerOffsets;$.competitorEntries.size>0&&F.Aq$.isDefined(H)&&(q?Z=K.yT.heroLastRacerOffsets:z&&(Z=K.yT.heroFirstRacerOffsets));return[{petId:G[0],node:Q,index:0,xOffset:Z[0]},{petId:U,node:$.myEntry,index:1,xOffset:Z[1]},{petId:G[1],node:X,index:2,xOffset:Z[2]}].map((({petId:k,node:U,index:F,xOffset:G})=>Y.createFootracePetInjectionDataFromLeaderboardNode(k,B,U,F,G))).filter(F.Aq$.isDefined)}static createFootracePetInjectionDataFromLeaderboardNode(k,B,U,j,$){var V;if(!U)return void F.VyI.log("StateChallengesMenu: createFootracePetInjectionDataFromLeaderboardNode: node is undefined",F.$bb.Warning);let q=G.Q2.Walk;const Y=H.q.instance.prodigy.gameContainer.get("a94-4ba3");return Y&&(q=Y.isMenuPaused?G.Q2.Idle:G.Q2.Walk),{STATE_CHALLENGES_FOOTRACE_PET_ID:k,STATE_CHALLENGES_FOOTRACE_PET_POSITION:[$,K.yT.yOffsets[j]],STATE_CHALLENGES_FOOTRACE_PETS_INITIAL_ANIMATION:q,STATE_CHALLENGES_RACER_NAME:W.$.truncate(null!==(V=U.displayName)&&void 0!==V?V:"",25,!0),STATE_CHALLENGES_RACER_RANK:U.rank?W.$.addOrdinalSuffix(U.rank):z.O.NATIONAL_CUP_RESULTS_PENDING,STATE_CHALLENGES_RACER_ANSWERS:U.correctAnswers,STATE_CHALLENGES_SCHOOL_VIEW_ACTIVE:!1,STATE_CHALLENGES_CLASS_VIEW_ACTIVE:!1,STATE_CHALLENGES_ANSWERS_VISIBLE:1!==j,STATE_CHALLENGES_SELF_BUBBLE_VISIBLE:1===j,STATE_CHALLENGES_SELF_IDENTIFIER_TEXT:B}}static getMilestoneBackingFrame(k){return k>=q.U4.Diamond?K.yT.postChallengeMilestoneAssetMap[q.U4.Diamond]:k>=q.U4.Gold?K.yT.postChallengeMilestoneAssetMap[q.U4.Gold]:k>=q.U4.Silver?K.yT.postChallengeMilestoneAssetMap[q.U4.Silver]:(q.U4.Bronze,K.yT.postChallengeMilestoneAssetMap[q.U4.Bronze])}static getQuestionsAnsweredFromTaskInThousandFormat(k){return(0,V.Hk)(Y.getQuestionsAnsweredFromTask(k),void 0,",")}static getQuestionsAnsweredFromTask(k){var B;const U=null==k?void 0:k.preconditions;if(U)for(const G of U){const k=null===(B=G.data)||void 0===B?void 0:B.questionsAnswered;if(G.type===j.n.HAS_MET_STATE_CHALLENGE_GOAL&&F.Aq$.isDefined(k))return k}return 0}static getCurrentChallengeDisplayName(k){const B=H.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService);if(k===$.a.NationalCup)return B.getText(z.O.NATIONAL_CUP_TITLE);const U=`MONTH_NAME_${(new Date).getUTCMonth()+1}`;return B.getText(z.O.STATE_CHALLENGES_CURRENT_TITLE,B.getText(U))}}},21953:(k,B,U)=>{"use strict";var F,G;U.d(B,{V:()=>F,Z:()=>G}),function(k){k.HasMilestoneRewardReady="HAS_MILESTONE_REWARD_READY",k.HasOutstandingPrerequisiteTasks="HAS_OUTSTANDING_PREREQUISITE_TASKS",k.IsCurrentChallengeStarted="IS_CURRENT_CHALLENGE_STARTED",k.WasPreviousChallengeStarted="WAS_PREVIOUS_CHALLENGE_STARTED",k.AllMilestonesFinished="ALL_MILESTONES_FINISHED",k.HasMilestoneInProgress="HAS_MILESTONE_IN_PROGRESS",k.CurrentMilestoneProgressValues="CURRENT_MILESTONE_PROGRESS_VALUES",k.QuestionsRemainingToNextMilestone="QUESTIONS_REMAINING_TO_NEXT_MILESTONE",k.DisplayRewardAssetIcon="DISPLAY_REWARD_ASSET_ICON",k.DisplayRewardQuantity="DISPLAY_REWARD_QUANTITY",k.CurrentMilestoneProgressData="CURRENT_MILESTONE_PROGRESS_DATA",k.NextMilestoneBackground="NEXT_MILESTONE_BACKGROUND",k.ShowSeeRewardsButton="SHOW_SEE_REWARDS_BUTTON"}(F||(F={})),function(k){k.DisplayCardRewardIndex="DISPLAY_CARD_REWARD_INDEX",k.DisplayCardRewardAssetIcon="DISPLAY_CARD_REWARD_ASSET_ICON",k.DisplayCardRewardQuantity="DISPLAY_CARD_REWARD_QUANTITY",k.DisplayCardQuestionsAnswered="DISPLAY_CARD_QUESTIONS_ANSWERED",k.DisplayCardIsCollected="DISPLAY_CARD_IS_COLLECTED",k.DisplayCardReadyToCollect="DISPLAY_CARD_READY_TO_COLLECT",k.DisplayCardIsActive="DISPLAY_CARD_IS_ACTIVE",k.DisplayCardCollectCallback="DISPLAY_CARD_COLLECT_CALLBACK",k.DisplayCardBackground="DISPLAY_CARD_BACKGROUND",k.DisplayCardIsFocused="DISPLAY_CARD_IS_FOCUSED",k.DisplayCardCollectButtonEnabledState="DISPLAY_CARD_COLLECT_BUTTON_ENABLED_STATE"}(G||(G={}))},25431:(k,B,U)=>{"use strict";U.d(B,{b:()=>Z});var F=U(8674),G=U(62459),j=U(29891),$=U(24522),H=U(35120),V=U(30405),W=U(38920),q=U(4766),K=U(24030),z=U(88912),Y=U(54140),Q=U(21953),X=U(59114);class Z{static getData(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U,F,j,V;const J=H.q.instance.prodigy.gameContainer.get("0f9-dd7b"),tt=H.q.instance.prodigy.gameContainer.get("43a-6f08");if(yield J.initialize(),!G.Aq$.isDefined(J.getGoalsParametersData()))return void G.RQr.createHandler("[StateChallengeGoalsDataProvider] StateChallengesDataProvider is not initialized");const et=null!==(B=null===(k=J.getGoalsParametersData())||void 0===k?void 0:k.questionsAnswered)&&void 0!==B?B:0,it=yield tt.getStateChallengeGoalsProgress(),st=H.q.instance.prodigy.gameContainer.get("a03-308f"),nt=new Date(st.getServerTimeMs()),at=J.viewableCompetitionPhase,rt=q.H.getPreviousChallengeCompetition(at,nt,J.endDate),ot=Z.getFilteredTasks(it,nt),ht=yield Z.fetchPreviousChallengeTasks(it);let ct,dt;for(const G of ot){const k=G.id;if(k.endsWith("_start")){ct=k;break}}for(const G of ht){const k=G.id;if(k.endsWith("_start")){dt=k;break}}const lt=null!==(U=(0,K.$)(J.viewableCompetitionPhase))&&void 0!==U?U:"",ut=null!==(F=(0,K.$)(rt))&&void 0!==F?F:"",ft=!!ct&&(yield tt.isTaskCompleted(lt,ct)),bt=!!dt&&(yield tt.isTaskCompleted(ut,dt));tt.cacheChallengeStartTaskIds(ct,dt);const pt=[],vt=[],gt=[];for(const $ of it.taskProgress){const k=$.taskProgressSchema.id;G.Aq$.isDefined(Z.getMilestoneIndexFromTaskId(k))?(pt.push($),vt.push(k)):gt.push($)}const mt=pt.length>0,yt=gt.length>0;let _t,Et=0,wt=ot.length+1,Tt={ID:"",type:"",quantity:0};if(mt){const k=pt[0];Tt=Z.getRewardAssetDataFromTaskComplete(k.taskDefinition.onComplete),_t=Y.X.getMilestoneBackingFrame(Y.X.getQuestionsAnsweredFromTask(k.taskDefinition))}for(const G of ot){const k=Z.getMilestoneIndexFromTaskId(G.id);if(void 0!==k){const B=null===(j=G.preconditions)||void 0===j?void 0:j.find((k=>k.type===$.n.HAS_MET_STATE_CHALLENGE_GOAL));if(B){const U=B.data.questionsAnswered;if(U>et){Et=U,wt=k,!mt&&G.onComplete&&(_t=Y.X.getMilestoneBackingFrame(Et),Tt=Z.getRewardAssetDataFromTaskComplete(G.onComplete));break}}}}const St=0===pt.length&&0===Et,At=St&&!mt;if(At&&ot.length>0){const k=ot[ot.length-1],B=null===(V=k.preconditions)||void 0===V?void 0:V.find((k=>k.type===$.n.HAS_MET_STATE_CHALLENGE_GOAL));if(B){Et=B.data.questionsAnswered,_t=Y.X.getMilestoneBackingFrame(Et),Tt=Z.getRewardAssetDataFromTaskComplete(k.onComplete)}}const Ct={};for(const G of ot){const k=G.id,B=Z.getMilestoneIndexFromTaskId(k);void 0!==B&&(Ct[String(B)]={task:G,index:B,isCollectible:vt.includes(k),isComplete:B1?`+${Tt.quantity}`:"",[Q.V.CurrentMilestoneProgressData]:Ct,[Q.V.NextMilestoneBackground]:_t||X.yT.postChallengeMilestoneAssetMap[z.U4.Diamond],[Q.V.ShowSeeRewardsButton]:Ot||At}}))}static getPreviousChallengeMilestoneRewards(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield Z.fetchPreviousChallengeTasks(),B=[];for(const U of k){const k=Z.getMilestoneIndexFromTaskId(U.id);void 0!==k&&B.push(...Z.getRewardsFromTaskComplete(k,U.onComplete))}return B}))}static getRewardsFromTaskComplete(k,B=[]){var U,F;const G=[];for(const $ of B)if($.type===j.s.GOT_PET||$.type===j.s.GOT_ITEM)for(const B of null!==(F=null===(U=$.data)||void 0===U?void 0:U.itemDrops)&&void 0!==F?F:[])(null==B?void 0:B.ID)&&G.push({type:B.type,id:Number(B.ID),milestoneIndex:k});return G}static fetchPreviousChallengeTasks(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;const F=H.q.instance.prodigy.gameContainer.get("0f9-dd7b"),G=H.q.instance.prodigy.gameContainer.get("43a-6f08"),j=H.q.instance.prodigy.gameContainer.get("a96-1470"),$=H.q.instance.prodigy.gameContainer.get("a03-308f");yield F.initialize();const V=new Date($.getServerTimeMs()),W=q.H.getRepresentativeDateForPreviousChallenge(F.viewableCompetitionPhase,V,F.finalsPhaseStartDate,F.endDate),K=F.viewableCompetitionPhase,z=q.H.getPreviousChallengeCompetition(K,V,F.endDate),Y=z===K?null!=k?k:yield G.getStateChallengeGoalsProgress():yield j.getStateChallengeGoalsData({questionsAnswered:null!==(U=null===(B=F.getSchoolEntryForPreviousChallenge())||void 0===B?void 0:B.correctAnswers)&&void 0!==U?U:0,competition:z});return Y?Z.getFilteredTasks(Y,W):[]}))}static getMilestoneIndexFromTaskId(k){const B=k.split("_"),U=B[B.length-1];return V.o.isNumber(U)?Number(U):void 0}static getRewardAssetDataFromTaskComplete(k=[]){var B,U;for(const F of k)if(F.type===j.s.GOT_ITEM||F.type===j.s.GOT_PET){const k=null===(B=F.data.itemDrops)||void 0===B?void 0:B[0];if(null==k?void 0:k.ID)return{ID:k.ID.toString(),type:k.type,quantity:null!==(U=k.N)&&void 0!==U?U:1}}return{ID:"",type:"",quantity:0}}static getFilteredTasks(k,B){return k.questDefinition.tasks.filter((k=>{if(!k.preconditions||!Array.isArray(k.preconditions))return!1;const U=k.preconditions.find((k=>k.type===$.n.DATE_AFTER)),F=k.preconditions.find((k=>k.type===$.n.DATE_BEFORE)),G=U?new Date(U.data.date):void 0,j=F?new Date(F.data.date):void 0;return!(!G||!j)&&(B>=G&&B<=j)}))}}},59114:(k,B,U)=>{"use strict";U.d(B,{E2:()=>F,Tz:()=>G,yT:()=>H});var F,G,j,$=U(88912);class H{}H.classViewHeroPetId=136,H.classViewPetIds=[145,139,148,142,216,48,59,20,264],H.schoolViewHeroPetId=138,H.schoolViewPetIds=[147,141,150,144,280,49,60,22,266],H.yOffsets=[-330,-230,-100],H.defaultRacerOffsets=[718,885,1025],H.heroFirstRacerOffsets=[885,1025,718],H.heroLastRacerOffsets=[1025,718,885],H.introAnimationStartPositions=[{x:-400,y:-330},{x:-650,y:-330},{x:-900,y:-330},{x:-550,y:-230},{x:-800,y:-230},{x:-1050,y:-230},{x:-400,y:-100},{x:-650,y:-100},{x:-900,y:-100}],H.introAnimationHeroPosition={x:-100,y:-230},H.bannerTrophyAssets=["state-challenges-trophy-gold-small","state-challenges-trophy-silver-small","state-challenges-trophy-bronze-small"],H.postChallengeTrophyAssets=["state-challenges-trophy-gold","state-challenges-trophy-silver","state-challenges-trophy-bronze"],H.postChallengeMilestoneAssetMap={[$.U4.Bronze]:"state-challenges-milestone-bronze",[$.U4.Silver]:"state-challenges-milestone-silver",[$.U4.Gold]:"state-challenges-milestone-gold",[$.U4.Diamond]:"state-challenges-milestone-diamond"},function(k){k.STATE_CHALLENGES_SHOW_HEADER="STATE_CHALLENGES_SHOW_HEADER",k.STATE_CHALLENGES_DOWNTIME_TITLE_OVERRIDE="STATE_CHALLENGES_DOWNTIME_TITLE_OVERRIDE",k.STATE_CHALLENGES_DOWNTIME_SUBTITLE_OVERRIDE="STATE_CHALLENGES_DOWNTIME_SUBTITLE_OVERRIDE"}(F||(F={})),function(k){k.STATE_CHALLENGES_LR_TWEEN="STATE_CHALLENGES_LR_TWEEN",k.STATE_CHALLENGES_RL_TWEEN="STATE_CHALLENGES_RL_TWEEN",k.STATE_CHALLENGES_BG_INTRO_TWEEN="STATE_CHALLENGES_BG_INTRO_TWEEN",k.STATE_CHALLENGES_BG_IDLE_TWEEN="STATE_CHALLENGES_BG_IDLE_TWEEN"}(G||(G={})),function(k){k.STATE_CHALLENGES_SCHOOL_NATIONAL_QUALIFIED="STATE_CHALLENGES_SCHOOL_NATIONAL_QUALIFIED",k.STATE_CHALLENGES_SCHOOL_WON_CHALLENGE="STATE_CHALLENGES_SCHOOL_WON_CHALLENGE"}(j||(j={}))},74712:(k,B,U)=>{"use strict";U.d(B,{j:()=>K});var F,G=U(8674),j=U(62459),$=U(95891),H=U(68910),V=U(99625),W=U(5822),q=U(47287);let K=F=class extends j.uAl{constructor(){super(...arguments),this._gameDiscoveryEvents=[]}configure(k,B,U,G,W){var q;let K;this._backgroundImage.image.texture.baseTexture.scaleMode=H.SCALE_MODES.LINEAR,K=k?B?[B,...$.chain(F.AD_PREFABS).without(B).shuffle().value(),V.l.StaticAd_SoMuchMore]:[...$.shuffle(F.AD_PREFABS),V.l.StaticAd_SoMuchMore]:[B];for(const F of K){const U=new j._mx,G=k?this._carousel.GameObject.transform:this._content.transform,$=U.addComponent(j.XVE);$.setAnchorMin(0,0),$.setAnchorMax(0,0),$.setPivot(0,0),$.setSizeDelta(G.fullWidth,G.fullHeight),this._prefabLoader.loadWithDependenciesFromGUID(F,U).catch(j.RQr.createHandler(`Failed to load prefab ${B}`)),null===(q=this._carousel)||void 0===q||q.addObject(U),this._content.addChild(U)}for(const F of this._gameDiscoveryEvents)F.value=null!=U?U:"MemberButton"}};K.AD_PREFABS=[V.l.StaticAd_LevelUpFaster,V.l.StaticAd_MemberBoxes,V.l.StaticAd_MemberChests],(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],K.prototype,"_backgroundImage",void 0),(0,G.Cg)([(0,j.MnK)(q.g),(0,G.Sn)("design:type",q.g)],K.prototype,"_carousel",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],K.prototype,"_content",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(W.u),(0,G.Sn)("design:type",Array)],K.prototype,"_gameDiscoveryEvents",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],K.prototype,"_prefabLoader",void 0),K=F=(0,G.Cg)([(0,j.EVk)("StaticAdConfig")],K)},34454:(k,B,U)=>{"use strict";U.d(B,{w:()=>K});var F,G=U(8674),j=U(62459),$=U(99625),H=U(35120),V=U(28152),W=U(43531),q=U(18206);let K=F=class extends j.uAl{constructor(){super(...arguments),this.onReady=new j.HN0}static startTaskCompleteDialogue(k,B,U){W.rD.runDialogueSequence([F.DIALOGUE_COMPLETED_TASK],(()=>{H.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID($.l.UltimatesWanderingNPCBeginTrackingPopup).then((k=>{k.findComponent(F).init(B,U)})).catch(j.RQr.createHandler("[startTaskCompleteDialogue] Error when loading Ultimates Wandering NPC Begin Tracking Popup"))})).setParent(j.wa5.getActiveScene().getLayer(k.layer))}init(k,B){this._petID=k,this._segmentOpenPropertiesComponent.originID=B,this.onReady.dispatch()}openPetQuestProgress(){H.q.instance.prodigy.open.pets()}destroy(){this.onReady.dispose(),super.destroy()}};K.DIALOGUE_COMPLETED_TASK=1271,(0,G.Cg)([(0,j.MnK)(q.y),(0,G.Sn)("design:type",q.y)],K.prototype,"_segmentOpenPropertiesComponent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],K.prototype,"onReady",void 0),K=F=(0,G.Cg)([(0,j.EVk)("TaskCompleteDialogue",V.Y.ultimates)],K)},37155:(k,B,U)=>{"use strict";U.d(B,{i:()=>K});var F,G=U(8674),j=U(62459),$=U(56942),H=U(35120),V=U(77938),W=U(28152),q=U(29834);let K=F=class extends j.uAl{get petSpine(){return this._petSpine}init(k){var B,U;const F=V.t.getItem("pet",k),G=null===(U=null===(B=null==F?void 0:F.metadata)||void 0===B?void 0:B.assets)||void 0===U?void 0:U.default;if(null==G?void 0:G.assetKey){const k=$.Q[G.assetKey];H.q.instance.prodigy.load.assets([k],this.setAnimation.bind(this,k))}else j.VyI.log(`Pet ${k} doesn't have a default value or an assetKey configured to it`,j.$bb.Error)}setAnimation(k){this._petSpine.setAsset(k,(()=>{this._petSpineAnimator.playAnimation(F.DEFAULT_ANIMATION,!0)}))}};K.DEFAULT_ANIMATION="idle",(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],K.prototype,"_petSpine",void 0),(0,G.Cg)([(0,j.MnK)(q.j),(0,G.Sn)("design:type",q.j)],K.prototype,"_petSpineAnimator",void 0),K=F=(0,G.Cg)([(0,j.EVk)("UltimatePet",W.Y.ultimates)],K)},52322:(k,B,U)=>{"use strict";U.d(B,{v:()=>V});var F=U(8674),G=U(62459),j=U(24521),$=U(23029),H=U(28152);let V=class extends G.uAl{static changeNextLocation(){this._changeLocation=!0}static getUltimatesPetLocation(k){if(this._changeLocation||!this._previousLocation[k]||""===this._previousLocation[k]){this._changeLocation=!1;const B=$.R.loadData(j.r.UltimatesPetLocationConfig_json).ultimatesData.find((B=>B.id===k));if(!B)return G.VyI.log(`Provided petID does not exist within generic config: ${k}`,G.$bb.Error),"";this._previousLocation[k]=G.lv2.getRandomItem(B.locationIDs.filter((B=>B!==this._previousLocation[k])))}return this._previousLocation[k]}};V._previousLocation={0:""},V._changeLocation=!1,V=(0,F.Cg)([(0,G.EVk)("UltimatesLocation",H.Y.ultimates)],V)},87742:(k,B,U)=>{"use strict";var F;U.d(B,{e:()=>F}),function(k){k[k.Start=0]="Start",k[k.QuestAccepted=1]="QuestAccepted",k[k.Found=2]="Found",k[k.QuestCompleted=3]="QuestCompleted"}(F||(F={}))},9421:(k,B,U)=>{"use strict";var F;U.d(B,{b:()=>F}),function(k){k[k.TrackLocked=0]="TrackLocked",k[k.TrackUnlocked=1]="TrackUnlocked",k[k.TrackInProgress=2]="TrackInProgress",k[k.Finished=3]="Finished"}(F||(F={}))},33359:(k,B,U)=>{"use strict";U.d(B,{P:()=>V});var F=U(8674),G=U(62459),j=U(10592),$=U(28152),H=U(67818);let V=class extends G.uAl{constructor(){super(...arguments),this.selfDestroy=!1}create(){super.create(),this.setInterface(),this._loggedInPlayer.player.onSessionStatusChange.addOnce(this.checkSelfDestroy,this)}checkSelfDestroy(k,B){this.gameObject&&!this.selfDestroy&&(this.noLongerTaming(k)||this.noLongerTracking(k))&&this.gameObject.destroy()}noLongerTaming(k){return this._tamingUI.active&&k!==j.n.TamingUltimate}noLongerTracking(k){return this._npcQuestUI.active&&k!==j.n.TrackingNPC}setInterface(){switch(this._loggedInPlayer.player.ultimateSessionStatus){case j.n.CollectingItems:this._collectingItemsUI.active=!0,this._npcQuestUI.active=!1,this._tamingUI.active=!1;break;case j.n.TrackingNPC:this._collectingItemsUI.active=!1,this._npcQuestUI.active=!0,this._tamingUI.active=!1;break;case j.n.TamingUltimate:this._collectingItemsUI.active=!1,this._npcQuestUI.active=!1,this._tamingUI.active=!0;break;default:this._collectingItemsUI.active=!1,this._npcQuestUI.active=!1,this._tamingUI.active=!1}}setupTamingUI(k,B=!1){this._petIcon.setItemID(k)}cancelTracking(){this.selfDestroy=!0,this._loggedInPlayer.player.setUltimateSessionStatus(j.n.None,"",0)}destroy(){this._loggedInPlayer.player.onSessionStatusChange.remove(this.checkSelfDestroy,this),super.destroy()}};(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",Object)],V.prototype,"_loggedInPlayer",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],V.prototype,"_collectingItemsUI",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],V.prototype,"_npcQuestUI",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],V.prototype,"_tamingUI",void 0),(0,F.Cg)([(0,G.MnK)(H.i),(0,F.Sn)("design:type",H.i)],V.prototype,"_petIcon",void 0),V=(0,F.Cg)([(0,G.EVk)("UltimatesTaskViewer",$.Y.ultimatesUi)],V)},2775:(k,B,U)=>{"use strict";U.d(B,{m:()=>Y});var F=U(8674),G=U(62459),j=U(79687),$=U(58776),H=U(62886),V=U(35120),W=U(77938),q=U(40392),K=U(435);const z="ultimates";let Y=class{getCurrentQuestData(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("e50-b09b"),B=yield k.getAllActiveQuestIDs([z]),U=yield k.getAllInactiveQuestIDs([z]),F=[];for(const $ of B.concat(U))try{const U=yield k.getQuestMetaData($),G=yield k.getQuestTasks($),j=this.processServerQuest($,U,G,B.includes($));F.push(j)}catch(j){G.RQr.logError(j,`Failed to setup and process quest data for ${$}. Skipping.`)}return F}))}processServerQuest(k,B,U,F){const G={petID:B.petID,questID:k,seen:this.isEpicSeen(U),startButtonID:this.getButtonID(U),status:{active:F,completed:U.every((k=>k.taskProgress.status===$.t.COMPLETE)),taskID:0},deadline:new Date(B.endDate),tracks:this.generateTaskTracks(U)};return new K.p(G)}getButtonID(k){return k.find((k=>k.type===H.T.BUTTON_CLICK)).taskDefinition.completionRequirements.data.id}isEpicSeen(k){return k.filter((k=>k.type===H.T.WIN_BATTLE)).some((k=>k.taskProgress.status===$.t.COMPLETE||k.taskProgress.data.progress>0))}generateTaskTracks(k){const B=[];return k.filter((k=>k.type===H.T.WIN_BATTLE)).forEach((U=>{var F,G;const j=U.taskDefinition.prerequisites[0],H=k.find((k=>k.taskID===j)),V=H.taskDefinition.prerequisites[0],K=k.find((k=>k.taskID===V)),z=K.taskDefinition.completionRequirements.data.type,Y=K.taskDefinition.completionRequirements.data.id,Q=K.taskDefinition.completionRequirements.data.target,X=W.t.getItem(z,Y);B.push({collectionTask:{active:this.isTaskActive(k,K),completed:K.taskProgress.status===$.t.COMPLETE,taskID:V,itemType:z,itemID:Y,targetZone:q.i.getZoneData(X.data.targetZone),verb:"Collect",subject:X.data.name,targetAmount:Q,currentAmount:null!==(G=null===(F=K.taskProgress.data)||void 0===F?void 0:F.progress)&&void 0!==G?G:Q},tradeTask:{active:this.isTaskActive(k,H),completed:H.taskProgress.status===$.t.COMPLETE,taskID:j},tameTask:{active:this.isTaskActive(k,U),completed:U.taskProgress.status===$.t.COMPLETE,taskID:U.taskID}})})),B}isTaskActive(k,B){return B.taskDefinition.prerequisites.every((B=>k.find((k=>k.taskID===B)).taskProgress.status===$.t.COMPLETE))}};Y=(0,F.Cg)([(0,j.injectable)()],Y)},435:(k,B,U)=>{"use strict";U.d(B,{p:()=>W});var F=U(35120),G=U(10592),j=U(40392),$=U(87742),H=U(9421),V=U(52322);class W{constructor(k){this._data=k}getProgressData(){let k=$.e.QuestCompleted;this._data.status.completed||(k=this._data.seen?$.e.Found:this._data.tracks.some((k=>k.collectionTask.active))?$.e.QuestAccepted:$.e.Start);const B=this._data.tracks.some((k=>k.tradeTask.completed));return{questState:k,petId:this._data.petID,totalCollectionTasks:this.getTotalTaskTracks(),accomplishedCollectionTasks:this.getAccomplishedCollectionTasks(),tamingLevel:this.getTamingLevel(),deadline:this._data.deadline,questId:this._data.questID,nameUnlocked:B}}getTamingTaskCardData(){return this._data.tracks.map((k=>{var B,U,$;let W=H.b.Finished;const q=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.tradeTask.completed||(W=k.tradeTask.active&&q.ultimateSessionStatus===G.n.TrackingNPC&&q.ultimateQuestId===this.questID&&q.ultimateTaskId===k.tradeTask.taskID?H.b.TrackInProgress:k.tradeTask.active?H.b.TrackUnlocked:H.b.TrackLocked);let K=H.b.Finished;k.tameTask.completed||(K=k.tameTask.active&&q.ultimateSessionStatus===G.n.TamingUltimate&&q.ultimateQuestId===this.questID&&q.ultimateTaskId===k.tameTask.taskID?H.b.TrackInProgress:k.tameTask.active?H.b.TrackUnlocked:H.b.TrackLocked);const z=V.v.getUltimatesPetLocation(this._data.petID);return{collectingZone:null===(B=k.collectionTask.targetZone)||void 0===B?void 0:B.getName(),collectingZoneID:null===(U=k.collectionTask.targetZone)||void 0===U?void 0:U.zone,tamingZone:null===($=j.i.getZoneData(z.split("-")[0]))||void 0===$?void 0:$.getName(),iconItemType:k.collectionTask.itemType,iconItemID:k.collectionTask.itemID,descriptionVerb:k.collectionTask.verb,descriptionSubject:k.collectionTask.subject,targetAmount:k.collectionTask.targetAmount,currentAmount:k.collectionTask.currentAmount,npcStatus:W,epicStatus:K,trackingTaskId:k.tradeTask.taskID,tamingTaskId:k.tameTask.taskID,collectingTaskId:k.collectionTask.taskID}}))}getTotalTaskTracks(){return this._data.tracks.length}getTotalTasks(){return this._data.tracks.map((k=>Object.keys(k).length)).reduce(((k,B)=>k+B),0)}getCompletedTasks(){return this._data.tracks.map((k=>Object.keys(k).map((B=>k[B].completed?1:0)).reduce(((k,B)=>k+B),0))).reduce(((k,B)=>k+B),0)}getAccomplishedCollectionTasks(){return this._data.tracks.filter((k=>k.collectionTask.completed)).length}getTamingLevel(){return this._data.tracks.reduce(((k,B)=>k+(B.tameTask.completed?1:0)),0)}isTamed(){return this._data.status.completed}getTamedData(){return F.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPetByID(this._data.petID)}getUntamedCardData(){return{id:this._data.petID,accomplishedTasks:this.getCompletedTasks(),totalTasks:this.getTotalTasks()}}isActive(){return this._data.status.active}getCollectionTask(k){return this._data.tracks[k].collectionTask}setTradeQuestActiveState(k,B){this._data.tracks[k].tradeTask.active=B}setEpicQuestActiveState(k,B){this._data.tracks[k].tameTask.active=B}activateCollectionTasks(){this._data.tracks.forEach((k=>{k.collectionTask.active=!0}))}getQuestItem(k){this._data.tracks[k].collectionTask.currentAmount+=1,this._data.tracks[k].collectionTask.currentAmount>=this._data.tracks[k].collectionTask.targetAmount&&(this._data.tracks[k].collectionTask.completed=!0)}collectionQuestsStarted(){return this._data.tracks.some((k=>k.collectionTask.active))}completeTradeQuest(k){this._data.tracks[k].tradeTask.completed=!0}completeTamingQuest(k){this._data.tracks[k].tameTask.completed=!0,this._data.tracks.every((k=>k.tameTask.completed))&&(this._data.status.completed=!0)}setSeenState(k){this._data.seen=k}get buttonID(){return this._data.startButtonID}get questID(){return this._data.questID}getTradeTaskID(k){return this._data.tracks[k].tradeTask.taskID}getTamingTaskID(k){return this._data.tracks[k].tameTask.taskID}get petID(){return this._data.petID}}},19506:(k,B,U)=>{"use strict";U.d(B,{J:()=>W});var F=U(62459),G=U(90633),j=U(35120),$=U(56625),H=U(22023),V=U(73678);class W{static runUniquePetsIntroSequence(k){j.q.instance.prodigy.gameContainer.get("12f-4e29").completeBreadcrumb(G.B.FEATURE_UNIQUE_PETS,G.B.BREADCRUMB_UNIQUE_PETS_INTRO_SEQUENCE),this.updatePlayerKennel();const B=j.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService),U=j.q.instance.prodigy.gameContainer.get("b5b-6fa4"),$=[1754,1755,1756,1757],H=$.map(((F,G)=>{let H={dialogueData:U.dataProvider.get(F),blockInput:!0};return G===$.length-1&&(H=Object.assign(Object.assign({},H),{yesButtonText:B.getText("PET_BOOK_TEXT"),noButtonText:B.getText("NOT_NOW"),yes:()=>{j.q.instance.prodigy.open.pets(k)},no:k})),H}));U.addEvents(H),U.start(!0)}static canShowUniquePetsIntro(){if(!H.P8.showUniquePetsFeature())return!1;const k=j.q.instance.prodigy.gameContainer.get("12f-4e29");if(k.isBreadcrumbComplete(G.B.FEATURE_UNIQUE_PETS,G.B.BREADCRUMB_UNIQUE_PETS_INTRO_SEQUENCE))return!1;const B=j.q.instance.prodigy.world.getCurrentZone(),U=![V.A_.DARKTOWER,V.A_.TOWERTOWN].includes(B),F=k.isBreadcrumbComplete(G.B.FEATURE_PET_MERGE,G.B.BREADCRUMB_PET_MERGE_FTUE_STARTED),W=k.isBreadcrumbComplete(G.B.FEATURE_PET_MERGE,G.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED);return U&&!(F&&!W)&&$.s.canShowFtue()}static updatePlayerKennel(){var k,B;const U=j.q.instance.prodigy.gameContainer.get("306-5359").kennel,F=U.getPrimaryPets();for(const j of U.data)F.find((k=>k.uniqueID===j.uniqueID))||((null===(k=j.gear)||void 0===k?void 0:k.petHat)&&U.unequipGearForPet(j.uniqueID,"petHat"),(null===(B=j.gear)||void 0===B?void 0:B.petRelic)&&U.unequipGearForPet(j.uniqueID,"petRelic"));const G=U.getPetTeam(!1).map((k=>k.data));if(G.some((k=>!F.find((B=>B.uniqueID===k.uniqueID)))))for(const j of G)U.removeAtTeamPosition(j.team)}}},94995:(k,B,U)=>{"use strict";U.d(B,{V:()=>$});var F=U(8674),G=U(67238),j=U(48417);class $ extends G.D{getUtsConfig(){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.call(j.D.UniversalTeamSelect.GetUtsConfig,{},!0)).data}))}}},11288:(k,B,U)=>{"use strict";U.d(B,{O:()=>Q});var F=U(8674),G=U(79687),j=U(62459),$=U(28628),H=U(35120),V=U(99625),W=U(76277),q=U(46701),K=U(15821),z=U(29438),Y=U(16905);let Q=class{constructor(){this._config=void 0,this.requiredNumPets=3}setup(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!(0,W.G)(q.Q).enabled)return;const k=H.q.instance.prodigy.gameContainer.get("88d-8cb1");this._config=yield k.getUtsConfig()}))}initiateTeamSelection(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){if(!(0,W.G)(q.Q).enabled)return void G();if(this.shouldShowTeamSelectionUi(k,B)){H.q.instance.prodigy.open.prefabMenu(V.l.UniversalTeamSelectionMenu).onPrefabLoaded.addOnce((k=>{const F=k.findComponent(Y.I);try{(0,$.zJ)(U),F.setup(U.opponents.units)}catch(V){j.RQr.createHandler("UniversalTeamSelectionService: Failed to assert battle start config")(V)}F.setBackgroundImage(B.screen).catch((k=>{j.RQr.createHandler("UniversalTeamSelectionService: Failed to set background image")(k)})),F.onBattleStart.addOnce((()=>{G()}));H.q.instance.prodigy.gameContainer.get("306-5359").data.utsMenuSeenDate=Date.now()}))}else G()}))}shouldShowTeamSelectionUi(k,B){var U;const F=H.q.instance.prodigy.gameContainer.get("306-5359");if(K.A.isDefined(F.data.utsMenuSeenDate)){const k=(0,W.G)(q.Q).menuCooldownMs;if(K.A.isDefined(k)){if(Date.now()-F.data.utsMenuSeenDate0)||G.displayConditions.every((k=>(0,z.W)(k,B))))))}};Q=(0,F.Cg)([(0,G.injectable)()],Q)},29438:(k,B,U)=>{"use strict";U.d(B,{W:()=>G});var F=U(83195);function G(k,B){switch(k){case F.X.TEAM_RESTRICTED:return!0;default:return!1}}},83195:(k,B,U)=>{"use strict";var F;U.d(B,{X:()=>F}),function(k){k.TEAM_RESTRICTED="TEAM_RESTRICTED"}(F||(F={}))},16905:(k,B,U)=>{"use strict";U.d(B,{I:()=>dt});var F,G=U(8674),j=U(87490),$=U(62459),H=U(95891),V=U(88022),W=U(28628),q=U(15821),K=U(35120),z=U(77938),Y=U(37465),Q=U(129),X=U(28152),Z=U(46784),J=U(65050),tt=U(41674),et=U(67665),it=U(53661),st=U(8763),nt=U(22023),at=U(80060),rt=U(6413),ot=U(28080),ht=U(71790),ct=U(79259);!function(k){k.PlayerName="PLAYER_NAME",k.StarCount="STAR_COUNT",k.WizardAvatar="UTS_WIZARD_AVATAR",k.BackgroundImage="BACKGROUND_IMAGE",k.ForegroundImage="BACKGROUND_FG_IMAGE",k.SlotSelected="UTS_SLOT_SELECTED",k.PetId="UTS_PET_ID",k.PetName="UTS_PET_NAME",k.PetStarCount="UTS_PET_STAR_COUNT",k.WeaknessIcon="UTS_WEAKNESS_ICON",k.IsRarePet="UTS_IS_RARE_PET",k.ElementIcon="UTS_ELEMENT_ICON",k.IsHomeTeam="UTS_IS_HOME_TEAM"}(F||(F={}));let dt=class extends $.uAl{constructor(){super(...arguments),this._homeTeamPetSlots=[],this._teamDrawerPetSlots=[],this._additionalDrawerPetSlots=[],this._awayTeamPetSlots=[],this.onBattleStart=new $.HN0,this.onLeaveBattle=new $.HN0,this._activeTeamSelectionIndex=0,this._cachedTeamIds=[],this._cachedPetDrawerIds=[]}setup(k){const B=$.wa5.getActiveScene().container;B.bind(j.BattleConstants).to(j.BattleConstants).asSingleton(),B.bind(j.ConstantsDataProvider).to(ht.T).asSingleton(),this._player=K.q.instance.prodigy.gameContainer.get("306-5359");const U=(0,Y.u)(this._player,this._player.kennel.getPets()).filter((k=>q.A.isDefined(k))),G=rt.h.MAX_TEAM_SIZE-1;if(U.lengthB.level-k.level)).splice(0,G-U.length),B=U.map((k=>k.team));k.forEach(((k,F)=>{const G=B.includes(F)?F+1:F;k.team=G>=this._homeTeamPetSlots.length?0:G,U.push(k)}))}U.forEach(((k,B)=>{const U=k.ID;this._cachedTeamIds.push(U),this._cachedPetDrawerIds.push(U),at.d.updateInjectedValues(this._teamDrawerPetSlots[B],st.j.GetOwnedPetCardInjectionValues(k,this.onPetCardClicked.bind(this),!1,!0,!0)),this.setPetData(!0,B,k)})),this.setAwayTeam(k),this.setDrawerPets(k),at.d.updateInjectedValues(this.gameObject,{[F.PlayerName]:this._player.getName(),[F.StarCount]:this._player.getLevel()}),this.sendInterfaceOpenedEvent(this._player,k)}destroy(){this.onBattleStart.dispose(),this.onLeaveBattle.dispose(),super.destroy()}startBattle(){this._player.kennel.setTemporaryTeamPosition(this._cachedTeamIds[0],1),this._player.kennel.setTemporaryTeamPosition(this._cachedTeamIds[1],2),this.onBattleStart.dispatch()}setAwayTeam(k){Object.values(k).filter((k=>k.asset.type!==W.uj.Wizard)).forEach(((k,B)=>{this.setPetData(!1,B,k)}));const B=Object.values(k).find((k=>k.asset.type===W.uj.Wizard));B&&this.setupEnemyWizard(B).catch($.RQr.createHandler("Error setting up enemy wizard in universal team selection menu"))}setupEnemyWizard(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=this._awayTeamPetSlots[this._awayTeamPetSlots.length-1],U=new Q.a(K.q.instance.game);U.appearance.init(Object.assign(Object.assign({},k.appearance),{name:void 0})),U.equipment.init(k.equipment);const G=yield ot.D.createWizardObject(U,!1);G.setLayer(void 0,!0),at.d.updateInjectedValues(B,{[F.WizardAvatar]:G,[F.PetName]:k.appearance.name,[F.PetStarCount]:k.level,[F.IsHomeTeam]:!1,[F.IsRarePet]:!0,[F.SlotSelected]:!1}),B.active=!0}))}setPetData(k,B,U){var G,H,W,q,K;const Y=null!==(G=null==U?void 0:U.ID)&&void 0!==G?G:U.asset.id,Q=null!==(H=null==U?void 0:U.level)&&void 0!==H?H:U.level,X=k?this._homeTeamPetSlots[B]:this._awayTeamPetSlots[B];X.active=!0;const Z=z.t.getItem("pet",Y),J=nt.P8.getElementType(Z),tt=$.wa5.getActiveScene().container.get(j.BattleConstants).getElementalWeakness(J);at.d.updateInjectedValues(X,{[F.IsRarePet]:!1,[F.PetId]:Z.ID,[F.PetName]:null!==(q=null===(W=Z.data)||void 0===W?void 0:W.nickname)&&void 0!==q?q:null===(K=Z.data)||void 0===K?void 0:K.name,[F.PetStarCount]:Q,[F.ElementIcon]:[V._.Ui_battle_revamp_json,`icon-mini-element-${J}`],[F.WeaknessIcon]:[V._.Ui_battle_revamp_json,`icon-mini-element-${tt}`],[F.IsHomeTeam]:k,[F.SlotSelected]:!!k&&this._activeTeamSelectionIndex===B})}setBackgroundImage(k){return(0,G.sH)(this,void 0,void 0,(function*(){let B=k;if("string"==typeof k){const U=ct[k];B=null!=U?U:k}yield K.q.instance.prodigy.load.assetsAsPromise(B),at.d.updateInjectedValues(this.gameObject,{[F.BackgroundImage]:Array.isArray(B)?B[0]:B,[F.ForegroundImage]:Array.isArray(B)?B[1]:null})}))}setActiveTeamSelectionIndex(k){if(this._activeTeamSelectionIndex===k)return;const B=this._homeTeamPetSlots[this._activeTeamSelectionIndex];at.d.updateInjectedValues(B,{[F.SlotSelected]:!1}),this._activeTeamSelectionIndex=k;const U=this._homeTeamPetSlots[k];at.d.updateInjectedValues(U,{[F.SlotSelected]:!0})}setDrawerPets(k){var B;const U=K.q.instance.prodigy.gameContainer.get("306-5359"),F=$.wa5.getActiveScene().container.get(j.BattleConstants),G={};Object.values(k).forEach((k=>{var B;const U=z.t.getItem("pet",k.asset.id),j=nt.P8.getElementType(U),$=F.getElementalWeakness(j);G[$]=(null!==(B=G[$])&&void 0!==B?B:0)+1}));const H=U.kennel.getPets(!1).filter((k=>!this._cachedTeamIds.includes(k.ID))).sort(((k,B)=>B.level-k.level)),V=H.slice(0,2),W=H.filter((k=>{if(V.includes(k))return!1;const B=z.t.getItem("pet",k.ID),U=nt.P8.getElementType(B);return void 0!==G[U]}));W.sort(((k,B)=>{var U,F;const j=z.t.getItem("pet",k.ID),$=nt.P8.getElementType(j),H=z.t.getItem("pet",B.ID),V=nt.P8.getElementType(H);return(null!==(U=G[V])&&void 0!==U?U:0)-(null!==(F=G[$])&&void 0!==F?F:0)})),V.push(null!==(B=W[0])&&void 0!==B?B:H[2]),V.filter((k=>q.A.isDefined(k))).forEach(((k,B)=>{const U=this._additionalDrawerPetSlots[B];U.active=!0,this._cachedPetDrawerIds.push(k.ID),at.d.updateInjectedValues(U,st.j.GetOwnedPetCardInjectionValues(k,this.onPetCardClicked.bind(this),!1,!0,!0))}))}onPetCardClicked(k){if(this._cachedTeamIds.includes(k.ID))return;const B=this._player.kennel.getPetByID(k.ID);this.setPetData(!0,this._activeTeamSelectionIndex,B);const U=this._cachedTeamIds[this._activeTeamSelectionIndex];this._cachedTeamIds[this._activeTeamSelectionIndex]=k.ID,Array.from([...this._teamDrawerPetSlots,...this._additionalDrawerPetSlots]).forEach(((k,B)=>{at.d.updateInjectedValues(k,{[it.ML.ShowOnTeam]:this._cachedTeamIds.includes(this._cachedPetDrawerIds[B])})})),0===this._activeTeamSelectionIndex&&this.setActiveTeamSelectionIndex(this._activeTeamSelectionIndex+1);const F=z.t.getItem("pet",U);this._segment.featureCommon.sendTeamUpdatedEvent(k.name,F.data.name,{update_type:tt.jR.Manual,instanceType:J.N.UniversalTeamSelection})}sendInterfaceOpenedEvent(k,B){const U={opponents:this.mapPetsToAnalyticsInfo(B,k),suggestedPets:this.mapPetsToAnalyticsInfo(this._cachedPetDrawerIds,k)};this._segment.featureCommon.sendInterfaceEvent({interfaceName:Z.B.UniversalTeamSelection,interfaceType:tt.Wm.Screen,instanceType:J.N.UniversalTeamSelection,originType:tt.$N.AutoSurfaced},{map_entered_instance_type:this._segment.gameWorld.getCurrentInstanceTypeAndID(J.N.OpenWorld).instance_type,map_entered_instance_id:this._segment.gameWorld.getCurrentInstanceTypeAndID(J.N.OpenWorld).instance_id,item_list:U})}mapPetsToAnalyticsInfo(k,B){return Array.isArray(k)?k.map((k=>{var U,F;const G=z.t.getItem("pet",k),j=B.kennel.getPetByID(k);return{name:null!==(U=j.nickname)&&void 0!==U?U:G.name,level:j.level,rank:null!==(F=j.mergeRank)&&void 0!==F?F:0}})):(0,H.map)(k,(k=>{var B,U;let F="";if(k.asset.type===W.uj.Wizard)F=k.appearance.name;else{F=null===(B=z.t.getItem("pet",k.asset.id).data)||void 0===B?void 0:B.name}return{name:F,level:k.level,rank:null!==(U=k.mergeRank)&&void 0!==U?U:0}}))}};(0,G.Cg)([(0,$.Cdj)("c47-20b6"),(0,G.Sn)("design:type",et.Y)],dt.prototype,"_segment",void 0),(0,G.Cg)([(0,$.SZi)(),(0,$.ERr)(),(0,G.Sn)("design:type",Array)],dt.prototype,"_homeTeamPetSlots",void 0),(0,G.Cg)([(0,$.SZi)(),(0,$.ERr)(),(0,G.Sn)("design:type",Array)],dt.prototype,"_teamDrawerPetSlots",void 0),(0,G.Cg)([(0,$.SZi)(),(0,$.ERr)(),(0,G.Sn)("design:type",Array)],dt.prototype,"_additionalDrawerPetSlots",void 0),(0,G.Cg)([(0,$.SZi)(),(0,$.ERr)(),(0,G.Sn)("design:type",Array)],dt.prototype,"_awayTeamPetSlots",void 0),dt=(0,G.Cg)([(0,$.EVk)("UniversalTeamSelectionMenu",X.Y.universalTeamSelection)],dt)},3374:(k,B,U)=>{"use strict";U.d(B,{C:()=>H});var F=U(8674),G=U(79687),j=U(35120),$=U(37962);let H=class{get videosConfig(){return this._videosConfig}static getVideosDataProvider(){return j.q.instance.prodigy.gameContainer.get("4fc-916d")}fetchVideosConfig(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._videosConfig||(this._videosConfig=yield this._videosNetworkHandler.getVideosConfig()),this._videosConfig}))}getVideosDataByType(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.fetchVideosConfig();return null==B?void 0:B[k]}))}};(0,F.Cg)([(0,G.inject)("7c8-742f"),(0,F.Sn)("design:type",$.j)],H.prototype,"_videosNetworkHandler",void 0),H=(0,F.Cg)([(0,G.injectable)()],H)},13367:(k,B,U)=>{"use strict";U.d(B,{m:()=>z});var F,G=U(8674),j=U(62459),$=U(95891),H=U(68910),V=U(35120),W=U(28152),q=U(87337),K=U(12676);let z=F=class extends j.uAl{constructor(){super(...arguments),this._onWanderingNPCPresent=new j.HN0,this._onWanderingNPCNotPresent=new j.HN0}static getSeededLocation(k){return""}create(){super.create(),H.Ticker.shared.addOnce(this.checkForWanderingNPC,this)}destroy(){this._onWanderingNPCPresent.dispose(),this._onWanderingNPCNotPresent.dispose(),H.Ticker.shared.remove(this.checkForWanderingNPC,this),super.destroy()}checkForWanderingNPC(){(F.getSeededLocation()===this.generateLocationID()?this._onWanderingNPCPresent:this._onWanderingNPCNotPresent).dispatch()}generateLocationID(){const k=V.q.instance.prodigy.world.getCurrentMap(),{x:B,y:U}=this.gameObject.transform.worldPosition;return`${k}-${Math.round(B)}-${Math.round(U)}`}sendDiscoveryEvent(k){const B=F.getSeededLocation();if(B===this.generateLocationID()){const U=B.split("-");V.q.instance.prodigy.gameContainer.get("c47-20b6").gameWorld.sendNpcDiscoveredEvent({npc_name:K.N.Ulla,npc_type:q.ac.QuestGiver,npc_id:"580",npc_animation_id:k,x_coord:(0,$.toInteger)(U[2]),y_coord:(0,$.toInteger)(U[3])})}}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],z.prototype,"_onWanderingNPCPresent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],z.prototype,"_onWanderingNPCNotPresent",void 0),z=F=(0,G.Cg)([(0,j.EVk)("WanderingNPC",W.Y.ultimates)],z)},78703:(k,B,U)=>{"use strict";U.d(B,{o:()=>z});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(28402);class V extends G.m$y{update(k,B){const U=k.gameObject.findComponent(H.v);null!==U?null===U.getSpine()?k.alpha=0:U.alpha=G.cj9.linear(this.startAlpha,this.endAlpha,B):super.update(k,B)}}class W extends G.l28{constructor(){super(...arguments),this.loopAnimation=!0}initialize(k){if(k.alpha=0,!k.gameObject.renderer){const B=k.gameObject.addComponent(H.v);k.gameObject.renderer=B}k.gameObject.renderer.setAsset(this.asset,(()=>{G.Aq$.isDefined(this.animationName)&&this.animationName.length>0&&k.gameObject.renderer.setAnimationByName(0,this.animationName,this.loopAnimation)}))}}var q=U(76945);class K extends G.l28{constructor(){super(...arguments),this.loopAnimation=!0}initialize(k){const B=k.gameObject.renderer;if(B){if(B.isLoaded){const k=B.getSpine().skeleton.data.animations,U=q.o.integerInRange(0,k.length);B.setAnimationByName(0,k[U].name,this.loopAnimation)}}else G.VyI.log("No Spine Found On Particle!!",G.$bb.Error)}}let z=class extends G.uAl{constructor(){super(...arguments),this._assetGUID=null,this._noteSpeed=80,this._waveHeight=200,this._noteScale=4,this._noteLifeSeconds=4,this._notesPerSecond=1,this._angleRAD=1}fireTrail(k){var B;k&&this.gameObject.transform.setPosition(k.worldPosition.x,k.worldPosition.y);const U=this.gameObject.addComponent(G.okU);U.emitPerSecond.setMinMax(this._notesPerSecond,this._notesPerSecond);const F=new W;F.asset=(null===(B=this._asset)||void 0===B?void 0:B.length)>0?this._asset:this._assetGUID;const j=new K;j.loopAnimation=!0;const $=new G.ZxM;$.life.setMinMax(this._noteLifeSeconds,this._noteLifeSeconds),$.life.type=G.UvC.Random;const H=k?this.getFireAngle(k):this._angleRAD,q=new G.U8B;q.angle.setMinMax(H*G.cj9.RAD_TO_DEG,H*G.cj9.RAD_TO_DEG),q.angle.type=G.UvC.PhasePerSample,q.speed.setMinMax(this._noteSpeed,this._noteSpeed);const z=new G.mYY;z.point1.setTo(0,this._waveHeight),z.point2.setTo(0,-this._waveHeight);const Y=new G.hQR;Y.scale.setMinMax(this._noteScale,this._noteScale);const Q=new V;Q.endAlpha=0,Q.startAtLifePercentage=.9,U.initializers=[F,j,$,Y,z,q],U.behaviours=[Q]}getFireAngle(k){const B=new G.I9Y(j.q.instance.game.width/2,j.q.instance.game.height/2);B.subtract(k.worldPosition),B.normalize();let U=Math.acos(B.y);return B.x<0&&(U*=-1),U}};(0,F.Cg)([(0,G.Bak)(),(0,G.i0J)(G.Z$z.Spine),(0,F.Sn)("design:type",String)],z.prototype,"_assetGUID",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],z.prototype,"_asset",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_noteSpeed",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_waveHeight",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_noteScale",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_noteLifeSeconds",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_notesPerSecond",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_angleRAD",void 0),z=(0,F.Cg)([(0,G.EVk)("WanderingNPCTrail",$.Y.ultimates)],z)},12270:(k,B,U)=>{"use strict";U.d(B,{E:()=>j});var F=U(80003),G=U(66582);(0,U(39938).n)(F.D,"WizardBankAllowance");const j=new Map([[G._$.NonMember,F.D.NonMember],[G._$.MemberCore,F.D.Core],[G._$.MemberPlus,F.D.Plus],[G._$.MemberUltra,F.D.Ultra]])},8838:(k,B,U)=>{"use strict";U.d(B,{T:()=>F});var F,G=U(39938);!function(k){k.Open="Open",k.Closed="Closed",k.Disabled="Disabled"}(F||(F={})),(0,G.n)(F,"WizardBankChest")},60228:(k,B,U)=>{"use strict";U.d(B,{Bz:()=>W,Ug:()=>q,cR:()=>V});var F=U(8674),G=U(62459),j=U(89067),$=U(35120),H=U(98252);function V(k){const{currency:B,value:U}=k;return 27===B&&U>0}function W(k){const B=$.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);if(!H.pF.isNativeApp()||H.pF.eligibleVersionForMobileMembershipPurchaseForMultipleTiers())return B.getText(j.Jr[k])}function q(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=$.q.instance.prodigy.gameContainer,B=k.get("231-9111"),U=k.get("cc9-a3f0"),F=k.get("3a0-8003"),H=k.get(G.$Bt.LocalizationService),V=(yield B.getAllowanceClaimData()).totalClaimable,q=j.Uk[F.memberTier],K=V.reduce(((k,B)=>k+B.value),0);U.updateNotificationBadge(q,K>0?"!":void 0),U.updateCachedLabelData(q,{labelValue:K>0?H.getText("PLUS_ULTRA_BONUS_COLLECT"):W(q)})}))}},84234:(k,B,U)=>{"use strict";U.d(B,{W:()=>W});var F,G=U(8674),j=U(62459),$=U(79687),H=U(80105),V=U(2265);let W=F=class{constructor(k){this._seenCostumeIds=[],this.onCostumeDataChanged=new j.HN0,this._networkHandler=new V.l,this._secureInventory=k}initializeCostumeData(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;this._currentCostumePoolData=null==k?void 0:k.pools,this._seenCostumeIds=null!==(B=null==k?void 0:k.seenCostumeIds)&&void 0!==B?B:[],this.onCostumeDataChanged.dispatch()}))}getCurrentCostumePoolData(){var k;const B=Date.now();return null===(k=this._currentCostumePoolData)||void 0===k?void 0:k.filter((k=>(!k.startDate||k.startDate<=B)&&(!k.endDate||k.endDate>=B)))}getCurrentCostumePool(){var k;return null===(k=this.getCurrentCostumePoolData())||void 0===k?void 0:k[0]}getSeenCostumeIds(){return this._seenCostumeIds}getUnseenCostumeIds(){return[...this.getCurrentPoolCostumeIds(),...this.getOwnedCostumes().map((k=>k.id))].filter((k=>!this._seenCostumeIds.includes(k)))}markAllCurrentCostumesAsSeen(){return(0,G.sH)(this,void 0,void 0,(function*(){if(0===this.getUnseenCostumeIds().length)return;const k=new Set([...this._seenCostumeIds,...this.getCurrentPoolCostumeIds()]);this._seenCostumeIds=Array.from(k),yield this._networkHandler.markCostumesSeen(this._seenCostumeIds),this.onCostumeDataChanged.dispatch()}))}getCurrentPoolCostumeIds(){var k;const B=[];return(null!==(k=this.getCurrentCostumePoolData())&&void 0!==k?k:[]).forEach((k=>k.sections.forEach((k=>B.push(...k.costumeIds))))),B}getCostumesToDisplayForFtuePopup(){const k=this.getCurrentCostumePool();return k?k.sections.reduce(((k,B)=>k.concat(B.costumeIds)),[]).slice(-F.NUM_FTUE_COSTUMES):[]}getOwnedCostumes(){return this._secureInventory.getAllOfType("costume")}cleanup(){this.onCostumeDataChanged.dispose()}};W.NUM_FTUE_COSTUMES=6,W=F=(0,G.Cg)([(0,$.injectable)(),(0,G.Qj)(0,(0,$.inject)("61f-37d6")),(0,G.Sn)("design:paramtypes",[H.U])],W)},33587:(k,B,U)=>{"use strict";U.d(B,{z:()=>W});var F=U(8674),G=U(79687),j=U(4903),$=U(35120),H=U(73797),V=U(84415);let W=class{initListeners(){$.q.instance.prodigy.game.broadcaster.addAppListener(H.H3.MembershipLapsedBetweenSessions,this.onMembershipLapsed,this,void 0,!0)}onMembershipLapsed(){V.a.clearFeatureTimestamp(j.s.WizardCostumesTutorial)}};W=(0,F.Cg)([(0,G.injectable)()],W)},32367:(k,B,U)=>{"use strict";U.d(B,{r:()=>ut});var F=U(8674),G=U(62459),j=U(99625),$=U(4903),H=U(35120),V=U(73797),W=U(28152),q=U(28047),K=U(63746),z=U(72799),Y=U(1195),Q=U(97252);let X=class extends G.uAl{constructor(){super(...arguments),this._runOnCreate=!1,this.onGearTypeEquipped=new G.HN0,this.onGearTypeNotEquipped=new G.HN0}create(){this._currentPlayer?this._gearType?this._runOnCreate&&this.isGearTypeEquipped():G.VyI.log("EquippedGearTypeComponent: No gear type specified, unable to check gear type",G.$bb.Error):G.VyI.log("EquippedGearTypeComponent: No current player found, unable to check gear type",G.$bb.Error)}destroy(){this.onGearTypeEquipped.dispose(),this.onGearTypeNotEquipped.dispose(),super.destroy()}isGearTypeEquipped(){this._currentPlayer.player.equipment.getData()[this._gearType]?this.onGearTypeEquipped.dispatch():this.onGearTypeNotEquipped.dispatch()}unEquipGearType(){return(0,F.sH)(this,arguments,void 0,(function*(k=!0){const B=this._currentPlayer.player.equipment.getData()[this._gearType];B&&(yield this._currentPlayer.player.unEquip(B,this._gearType),k&&this.isGearTypeEquipped())}))}};(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",Y.E)],X.prototype,"_currentPlayer",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],X.prototype,"_runOnCreate",void 0),(0,F.Cg)([(0,G.gfw)(Q.At),(0,F.Sn)("design:type",String)],X.prototype,"_gearType",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],X.prototype,"onGearTypeEquipped",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],X.prototype,"onGearTypeNotEquipped",void 0),X=(0,F.Cg)([(0,G.EVk)("EquippedGearType",W.Y.utility)],X);var Z=U(23082),J=U(15485),tt=U(46784),et=U(65050),it=U(96073),st=U(24047),nt=U(41674),at=U(94325),rt=U(21418),ot=U(53661),ht=U(84415),ct=U(3374),dt=U(84234),lt=U(19609);let ut=class extends q.v{constructor(){super(...arguments),this._menuFullyInitialized=new G.HN0,this._onScreenEquippedGearGuards=new Set,this._onScreenItemCards=new Set,this._videoType=$.s.WizardCostumesTutorial,this.onCostumeSelected=new G.HN0,this.onCostumeEquipped=new G.HN0}get firstCostumeCard(){const[k]=this._onScreenItemCards;return k.GameObject.findComponent(G.y4o).getRootContainer()}create(){super.create();const k=this._wizardCostumesDataProvider.getCurrentCostumePool();if(!k)return void G.VyI.log("WizardCostumesMenuComponent#create: No active costume pool found. Unable to initialize the menu.",G.$bb.Error);this._contentRoot.alpha=0,this._contentRoot.updateFilter();const B=H.q.instance.game.state.get(Z.G.TileScreen);(null==B?void 0:B.gameRenderCache)&&(B.gameRenderCache.visible=!1);const U=this.initialize({currentCostumePool:k}).catch(G.RQr.createHandler("WizardCostumesMenuComponent#create: Failed to initialize the menu with the provided data."));this.sendCostumesFunnelStep(it.j.MenuOpen,it.t.MenuOpen),this._howItWorksButton.active=!1;const F=lt.hD.isFtueFlowActive();let j=!1;const $=[U,this.refreshVideoData().then((()=>{if(!G.Aq$.isDefined(this._currentVideoTypeData))return this._howItWorksButton.active=!1,void G.VyI.log("WizardCostumesMenuComponent: No video data found for the current video type.",G.$bb.Warning);if(this._howItWorksButton.active=!0,this.shouldAutoPlayVideo()){j=!0,this.sendCostumesFunnelStep(it.j.TutorialVideoStarted,it.t.TutorialVideoStarted);const k=()=>{this.sendCostumesFunnelStep(it.j.TutorialVideoFinished,it.t.TutorialVideoFinished),F&<.hD.start(this)};this.openVideoMenu(!0,k)}})).catch(G.RQr.createHandler("WizardCostumesMenuComponent#create: Failed to refresh video data on menu creation."))];F&&$.push(lt.hD.preloadOverlay().catch(G.RQr.createHandler("WizardCostumesMenuComponent#create: Failed to preload FTUE overlay."))),Promise.all($).then((()=>{F&&!j&<.hD.start(this),this._contentRoot.alpha=1,this._contentRoot.updateFilter(),this._menuFullyInitialized.dispatch()})).catch(G.RQr.createHandler("WizardCostumesMenuComponent#create error"))}setScrollEnabled(k){this._scrollView.lockScrollWheel=!k,this._scrollView.contentDraggingEnabled=k}resetScrollPosition(){this._scrollView.scrollToPercent(0)}destroy(){this._player.onEquipmentChange.remove(this.handleEquippedStatus,this),this._menuFullyInitialized.dispose(),this.onCostumeSelected.dispose(),this.onCostumeEquipped.dispose(),super.destroy()}initialize(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(!k)return void G.VyI.log("WizardCostumesMenuComponent#initialize: No menu data provided. Unable to initialize the menu.",G.$bb.Error);this._wizardCostumesMenuData=k;const{currentCostumePool:B}=this._wizardCostumesMenuData,U=[];for(const k of B.sections)U.push(...this.addItemsSection({id:k.nameLocKey,label:this._baseLocalizer.getText(k.nameLocKey),colour:k.colour,expiresAt:B.endDate,displayEquippedGearCard:k.displayEquippedGearCard},k.costumeIds));const F=this._player.equipment.getCostume();F&&this._itemPreview.renderSelectedItem({id:F,type:"costume",cost:{}},void 0,!0);const $=yield this._shelfSpawner.spawnPrefabsWithData(U),H=[],V=[];$.forEach((k=>{k.config&&k.attachedObject&&[j.l.ItemCard,j.l.ItemCard_EquippedGear].includes(k.config.prefabGuid)&&(H.push(k.attachedObject.findComponentInChildren(z.M).onRenderComplete.asPromise()),V.push(k.attachedObject.findComponent(G.y4o).getRootContainer()))})),V.forEach((k=>k.alpha=0)),yield Promise.all(H),V.forEach((k=>k.alpha=1)),yield this._wizardCostumesDataProvider.markAllCurrentCostumesAsSeen(),this._player.onEquipmentChange.add(this.handleEquippedStatus,this)}))}addItemsSection(k,B){const U=!!G.Aq$.isDefined(k.expiresAt)&&k.expiresAt-H.q.instance.prodigy.timeManager.getLocalTimeMs();return[{prefabGuid:j.l.DynamicStoreSectionHeader,data:{DYNAMIC_STORE_SHELF_LABEL:k.label,DYNAMIC_STORE_SHELF_MILLISECONDS_REMAINING:U,DYNAMIC_STORE_SHELF_HEADER_COLOUR:k.colour,DYNAMIC_STORE_SHELF_CURRENCIES:[]}},...this.createSectionShelfData(k,B)]}createSectionShelfData(k,B){const U=B.map((k=>({prefabGuid:j.l.ItemCard,data:{[ot.Tl.Data]:{id:k,type:"costume"}}})));return k.displayEquippedGearCard&&U.unshift({prefabGuid:j.l.ItemCard_EquippedGear,data:{}}),U}onPooledObjectEnter(k,B){switch(B.prefabGuid){case j.l.ItemCard:{const U=k.findComponentInChildren(K.Z);if(!U)return G.VyI.log("WizardCostumesMenuComponent#onPooledObjectEnter: Failed to find an ItemCardComponent in ItemCard prefab. Hiding the object.",G.$bb.Error),void(k.active=!1);const F=B.data[ot.Tl.Data];null==U||U.initializeItemCard(F,(()=>{this.onItemCardClicked(F.id).catch(G.RQr.createHandler("WizardCostumesMenuComponent#onPooledObjectEnter: Failed to handle item card click event."))})),U.setNewNotificationBadgeVisibility(this._wizardCostumesDataProvider.getUnseenCostumeIds().includes(F.id)),this._onScreenItemCards.add(U),this.adjustRectTransformsForItemCards(k);break}case j.l.ItemCard_EquippedGear:{const B=k.findComponent(X);if(!B)return G.VyI.log("WizardCostumesMenuComponent#onPooledObjectEnter: Failed to find an EquippedGearTypeComponent in ItemCard_EquippedGear prefab. Hiding the object.",G.$bb.Error),void(k.active=!1);this._onScreenEquippedGearGuards.add(B),B.isGearTypeEquipped(),this.adjustRectTransformsForItemCards(k);break}}}onPooledObjectExit(k,B){switch(B.prefabGuid){case j.l.ItemCard:{const B=k.findComponentInChildren(K.Z);B&&this._onScreenItemCards.delete(B);break}case j.l.ItemCard_EquippedGear:{const B=k.findComponent(X);B&&this._onScreenEquippedGearGuards.delete(B);break}}}adjustRectTransformsForItemCards(k){var B;const U=k.findComponent(G.XVE);if(!U)return G.VyI.log("WizardCostumesMenuComponent#adjustRectTransformsForItemCards: Failed to find a RectTransform in the Item Card or ItemCard_EquippedGear prefab. Hiding the object.",G.$bb.Error),void(k.active=!1);U.setAnchorMin(0,0),U.setAnchorMax(0,0),U.setPivot(0,0);const F=null===(B=k.parent)||void 0===B?void 0:B.findComponent(G.XVE);F?(F.setAnchorMin(0,0),F.setAnchorMax(0,0),F.setPivot(0,0)):(G.VyI.log("WizardCostumesMenuComponent#adjustRectTransformsForItemCards: Failed to find a RectTransform in parent of the Item Card or ItemCard_EquippedGear prefab. Hiding the object.",G.$bb.Error),k.active=!1)}onItemCardClicked(k){return(0,F.sH)(this,void 0,void 0,(function*(){this._onScreenItemCards.forEach((B=>{var U;(null===(U=B.itemCardData)||void 0===U?void 0:U.id)===k&&B.setNewNotificationBadgeVisibility(!1)})),this._segment.featureCommon.sendButtonEvent({buttonName:J.k.CostumesItemCardButton,interfaceName:tt.B.WizardCostumesMenu,interfaceType:nt.Wm.Menu,instanceType:et.N.Interface,destinationName:tt.B.ItemInfo,saveClickInfo:J.k.CostumesItemCardButton}),H.q.instance.prodigy.open.itemInfo({ID:k,type:"costume"},void 0,rt.s.WizardCostumesMenu,J.k.CostumesItemCardButton),this.onCostumeSelected.dispatch(),this.sendCostumesFunnelStep(it.j.CostumePreview,it.t.CostumePreview)}))}handleEquippedStatus(){const k=this._player.equipment.getCostume(),B=G.Aq$.isDefined(k)&&0!==k;this._player.appearanceChanged=!0,H.q.instance.game.broadcaster.broadcast(V.J8.PlayerAppearanceUpdated),this._onScreenEquippedGearGuards.forEach((k=>k.isGearTypeEquipped())),this._onScreenItemCards.forEach((U=>{var F;U.setEquippedIconVisibility(B&&(null===(F=U.itemCardData)||void 0===F?void 0:F.id)===k)})),B&&k?(this._itemPreview.renderSelectedItem({id:k,type:"costume",cost:{}},void 0,!0),this.onCostumeEquipped.dispatch(),this.sendCostumesFunnelStep(it.j.CostumeEquipped,it.t.CostumeEquipped)):this._itemPreview.setToDefaultState()}sendCostumesFunnelStep(k,B){this._segment.funnel.sendStep(st.F.Costumes,"feature",k,B)}shouldAutoPlayVideo(){const k=H.q.instance.prodigy.gameContainer.get("306-5359");return!ht.a.doesFeatureTimestampExist(k,this._videoType)}openVideoMenu(k=!1,B){var U,F,$;Object.keys(null!==($=null===(F=null===(U=this._currentVideoTypeData)||void 0===U?void 0:U.data)||void 0===F?void 0:F.videos)&&void 0!==$?$:{}).length<=0?G.VyI.log("WizardCostumesMenuComponent#openVideoMenu: No valid videos to show for the current video type. Skipping video menu.",G.$bb.Warning):H.q.instance.prodigy.open.genericVideoMenu({videoMenuGuid:j.l.WizardCostumesVideoMenu,videoTypeData:this._currentVideoTypeData,saveTimestamp:!0,showCountdown:k,onClose:B})}refreshVideoData(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=ct.C.getVideosDataProvider();this._currentVideoTypeData=yield k.getVideosDataByType(this._videoType)}))}};(0,F.Cg)([(0,G.Cdj)("6e9-d1dd"),(0,F.Sn)("design:type",dt.W)],ut.prototype,"_wizardCostumesDataProvider",void 0),(0,F.Cg)([(0,G.Cdj)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],ut.prototype,"_baseLocalizer",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],ut.prototype,"_howItWorksButton",void 0),(0,F.Cg)([(0,G.MnK)(G.jsv),(0,F.Sn)("design:type",G.jsv)],ut.prototype,"_contentRoot",void 0),(0,F.Cg)([(0,G.MnK)(at.C),(0,F.Sn)("design:type",at.C)],ut.prototype,"_scrollView",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],ut.prototype,"_menuFullyInitialized",void 0),ut=(0,F.Cg)([(0,G.EVk)("WizardCostumesMenu",W.Y.wizardCostumes)],ut)},2265:(k,B,U)=>{"use strict";U.d(B,{l:()=>$});var F=U(8674),G=U(48417),j=U(76546);class $ extends j.D{markCostumesSeen(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(G.D.WizardCostumes.MarkCostumesSeen,{costumeIds:k},!1)}))}callDebugRoute(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return Promise.resolve()}))}}},19609:(k,B,U)=>{"use strict";U.d(B,{Ts:()=>Y,hD:()=>X});var F=U(8674),G=U(62459),j=U(99625),$=U(35120),H=U(96535),V=U(73797),W=U(13956),q=U(68152),K=U(84415);const z="wizardCostumesFtueSeen",Y=12;var Q;!function(k){k.Initialize="Initialize",k.HighlightFirstCostume="Step 1",k.PointAtFirstCostume="Step 2",k.PointAtWearButton="Step 3",k.AfterEquip="Step 4",k.HighlightBackpackTab="Step 5",k.PointAtBackpackTab="Step 6",k.InsideBackpack="Step 7",k.InsideBackpack2="Step 7.1",k.PointAtCostumesTab="Step 8",k.BackInCostumes="Step 9",k.Complete="Complete"}(Q||(Q={}));class X{constructor(){this._currentStep=Q.Initialize}static isFtueFlowActive(){return X._ftueFlowActive}static shouldShowFtue(){return!K.a.doesFeatureTimestampExist(X._activePlayer,z)}static initFtue(){const k=X._activePlayer;X._ftueFlowActive=!0,k.saveEnabled=!1;const B=k.equipment.getCostume();G.Aq$.isDefined(B)&&0!==B&&(k.equipment.setCostume(0),k.appearanceChanged=!0,$.q.instance.game.broadcaster.broadcast(V.J8.PlayerAppearanceUpdated))}static completeFtue(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=X._activePlayer;K.a.saveTimestampData(z),k.saveEnabled=!0,X._ftueFlowActive=!1,yield new Promise((B=>k.forceSaveCharacter(B)))}))}static preloadOverlay(){return(0,F.sH)(this,void 0,void 0,(function*(){return X._preloadPromise||(X._preloadPromise=(()=>(0,F.sH)(this,void 0,void 0,(function*(){return $.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(j.l.WizardCostumesFTUEOverlay).then((k=>k.active=!1))})))()),X._preloadPromise}))}static start(k){X._instance?X._instance._menuComponent=k:(X._instance=new X,X._instance._menuComponent=k,X.preloadOverlay().then((k=>{var B;k.active=!0,null===(B=X._instance)||void 0===B||B.run({stringState:G.Uoy.getInjectedValue(k,"STRING_STATE"),highlightGraphic:G.Uoy.getInjectedValue(k,"HIGHLIGHT_GRAPHIC"),audioPlayer:G.Uoy.getInjectedValue(k,"AUDIO_PLAYER")})})).catch(G.RQr.createHandler("WizardCostumesTutorialController.start: Failed to load tutorial prefab")))}run(k){var B,U;this._highlightGraphic=k.highlightGraphic,this._audioPlayer=k.audioPlayer,null===(B=this._menuComponent)||void 0===B||B.resetScrollPosition(),null===(U=this._menuComponent)||void 0===U||U.setScrollEnabled(!1),this.setState=B=>{this._currentStep=B,k.stringState.setValue(B),this.handleStateChange()},this.setState(Q.HighlightFirstCostume)}handleStateChange(){switch(this._currentStep){case Q.HighlightFirstCostume:(0,q.v)(this._menuComponent);const k=this._menuComponent.firstCostumeCard,B=$.q.instance.game.renderer.generateTexture(k);this._highlightGraphic.setTexture(B),this._highlightGraphic.GameObject.transform.setPosition(k.getBounds().x,k.getBounds().y),this._audioPlayer.onDialogueAudioComplete.addOnce((()=>{this.setState(Q.PointAtFirstCostume)}));break;case Q.PointAtFirstCostume:(0,q.v)(this._menuComponent),this._menuComponent.onCostumeSelected.addOnce((()=>{this.setState(Q.PointAtWearButton)}));break;case Q.PointAtWearButton:(0,q.v)(this._menuComponent),this._highlightGraphic.setTexture(void 0),this._menuComponent.onCostumeEquipped.addOnce((()=>{this.setState(Q.AfterEquip)}));break;case Q.AfterEquip:this._audioPlayer.onDialogueAudioComplete.addOnce((()=>{this.setState(Q.HighlightBackpackTab)}));break;case Q.HighlightBackpackTab:(0,q.v)(this._menuComponent),this._audioPlayer.onDialogueAudioComplete.addOnce((()=>{this.setState(Q.PointAtBackpackTab)})),this._menuComponent.headerNavigation.tabsContainerObject.children[1].layer="CostumesFTUEDimmer";break;case Q.PointAtBackpackTab:(0,q.v)(this._menuComponent),this._menuComponent.headerNavigation.tabsContainerObject.children[1].layer="default",this._menuComponent.OnDestroy.addOnce((()=>{this._menuComponent=void 0,this.setState(Q.InsideBackpack)}));break;case Q.InsideBackpack:this._audioPlayer.onDialogueAudioComplete.addOnce((()=>{this.setState(Q.InsideBackpack2)}));break;case Q.InsideBackpack2:this._audioPlayer.onDialogueAudioComplete.addOnce((()=>{this.setState(Q.PointAtCostumesTab)}));break;case Q.PointAtCostumesTab:$.q.instance.prodigy.open.onPrefabMenuOpened.addOnce((k=>{k===j.l.WizardCostumesMenu&&this.setState(Q.BackInCostumes)}));break;case Q.BackInCostumes:this._audioPlayer.onDialogueAudioComplete.addOnce((()=>(0,F.sH)(this,void 0,void 0,(function*(){this.setState(Q.Complete),X._instance=void 0,yield X.completeFtue()}))))}}}X._ftueFlowActive=!1,X.ftuePopupLoading=!1,(0,F.Cg)([(0,W.b)("306-5359"),(0,F.Sn)("design:type",H.W)],X,"_activePlayer",void 0)},41012:(k,B,U)=>{"use strict";U.d(B,{e:()=>K});var F=U(8674),G=U(62459),j=U(28344),$=U(29738),H=U(34829),V=U(96535),W=U(76277),q=U(13956);class K{static hasWizardWatchAccess(){return(0,F.sH)(this,void 0,void 0,(function*(){return!!$.O.isEnglishLocale()&&(!(0,W.G)(j.y).enabled||this._featureRequirements.meetsRequirements(7))}))}static canAutoSurfaceWizardWatch(){return(0,F.sH)(this,void 0,void 0,(function*(){return!!(yield K.hasWizardWatchAccess())&&(!(this._activePlayer.tutorialCompletedThisSession||!this._activePlayer.hasCompletedTutorial())&&!(G.Aq$.isDefined(this._activePlayer.data.wwCooldownTime)&&Date.now()-this._activePlayer.data.wwCooldownTime<2*H.A.HOURS_IN_MS))}))}}(0,F.Cg)([(0,q.b)("306-5359"),(0,F.Sn)("design:type",V.W)],K,"_activePlayer",void 0),(0,F.Cg)([(0,q.b)("db5-fb6e"),(0,F.Sn)("design:type",Object)],K,"_featureRequirements",void 0)},52250:(k,B,U)=>{"use strict";U(10778);var F=U(49237),G=(U(12808),U(8674)),j=U(62459);let $=class extends j.uAl{logOver(){this.logMessage("over")}logOut(){this.logMessage("out")}logDown(){this.logMessage("down")}logUp(){this.logMessage("up")}logClick(){this.logMessage("click")}logMessage(k){j.VyI.log(`Got button event: ${k}`,j.$bb.Info)}};$=(0,G.Cg)([(0,j.EVk)("ButtonTester",j.YH6.ui)],$);var H=U(24519),V=U(56163),W=(U(54422),U(28152));let q=class extends j.uAl{constructor(){super(...arguments),this.direction=j.e$E.Vertical,this.spacing=10,this.offset=0,this.fitChildren=!0,this.ignoreInactive=!0}postCreate(){this.gameObject.onChildAdded.add(this.updateLayout,this),this.gameObject.onChildRemoved.add(this.updateLayout,this);for(const k of this.gameObject.children)this.onChildAdded(k,!1);this.updateLayout()}destroy(){this.gameObject.onChildAdded.remove(this.updateLayout,this),this.gameObject.onChildRemoved.remove(this.updateLayout,this);for(const k of this.gameObject.children){k.onActiveChanged.remove(this.updateLayout,this);const B=k.transform;B instanceof j.XVE&&B.onDimensionsChanged.remove(this.updateLayout,this)}super.destroy()}onChildAdded(k,B=!0){k.onActiveChanged.add(this.updateLayout,this);const U=k.transform;U instanceof j.XVE&&U.onDimensionsChanged.add(this.updateLayout,this),B&&this.updateLayout()}onChildRemoved(k,B=!0){k.onActiveChanged.remove(this.updateLayout,this);const U=k.transform;U instanceof j.XVE&&U.onDimensionsChanged.remove(this.updateLayout,this),B&&this.updateLayout()}updateLayout(){let k=this.offset;for(const B of this.gameObject.children){if(this.ignoreInactive&&!B.active)continue;const U=B.transform;U&&(this.direction===j.e$E.Vertical?U.setPositionY(k):U.setPositionX(k),k+=this.spacing,U instanceof j.XVE&&(this.direction===j.e$E.Vertical?k+=U.sizeDelta.height:k+=U.sizeDelta.width))}if(this.fitChildren){const B=this.gameObject.transform;if(B instanceof j.XVE){const U=new j.or0(B.sizeDelta.width,B.sizeDelta.height);this.direction===j.e$E.Vertical?U.height=k:U.width=k,B.setSizeDelta(U.width,U.height)}}}};(0,G.Cg)([(0,j.gfw)(j.e$E),(0,G.Sn)("design:type",String)],q.prototype,"direction",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],q.prototype,"spacing",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],q.prototype,"offset",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"fitChildren",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"ignoreInactive",void 0),q=(0,G.Cg)([(0,j.EVk)("ListLayout",W.Y.uiLayout)],q);U(47716);var K=U(12420),z=U(11472),Y=U(53153);let Q=class extends Y.y{constructor(){super(...arguments),this._button=null}postDeserialize(){super.postDeserialize(),this._base=this._button}};(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Q.prototype,"_button",void 0),Q=(0,G.Cg)([(0,j.EVk)("ScrollViewButton")],Q);var X=U(89400),Z=(U(76501),U(33961));U(25456);let J=class extends H.v{constructor(){super(...arguments),this._selectedStateObject=null,this._selectable=null}postCreate(){super.postCreate(),this._selectedStateObject&&(this._selectedStateObject.active=this._selectable.isSelected())}getStateObject(k){return this._selectable.isSelected()?this._selectedStateObject:super.getStateObject(k)}};(0,G.Cg)([(0,j.x4W)("selectedStateObject"),(0,G.Sn)("design:type",j._mx)],J.prototype,"_selectedStateObject",void 0),(0,G.Cg)([(0,j.x4W)("selectable"),(0,G.Sn)("design:type",Object)],J.prototype,"_selectable",void 0),J=(0,G.Cg)([(0,j.EVk)("SelectedGameObjectTransition",j.YH6.transition)],J);var tt=U(35120);let et=class extends j.uAl{get scrollBarListener(){return this._scrollView.scrollBarListener}get scrollReleaseListener(){return this._scrollView.scrollReleaseListener}create(){super.create(),this._barWidth=this._sliderTrack.legacyTransform.width,this._barHeight=this._sliderTrack.legacyTransform.height,this._contentView=new j._mx(this.GameObject),this._contentView.addComponent(j.K16),this._contentViewChild=new j._mx(this._contentView),this._contentViewChild.addComponent(j.K16),this._scrollViewObject=new j._mx,this._scrollViewObject.addComponent(j.K16),this._scrollView=this._scrollViewObject.addComponent(z.B,!1),this._scrollView.allowMouseWheel=!1,this._scrollView.horizontal=!0,this._scrollView.contentView=this._contentView,this._scrollView.create(),this._scrollBar=this.GameObject.addComponent(K.$),this._scrollBar.horizontal=!0,this._scrollBar.useHandCursor=!0,this._scrollBar.initialize(this._sliderNib,this._scrollView),this._scrollView.scrollBarListener.add(this.updateSlider.bind(this)),this._sliderMask=tt.q.instance.game.add.graphics(0,0,this._sliderFill.legacyTransform.group),this._sliderMask.beginFill(0),this._sliderMask.drawRect(0,0,this._barWidth,this._barHeight),this._sliderMask.inputEnabled=!1,this._sliderFill.legacyTransform.group.mask=this._sliderMask}setInputPriority(k){this._scrollBar.setInputPriority(k)}getPercent(){return this._scrollBar.getPercent()}scrollToPercent(k){this._scrollBar.scrollToPercent(k),this.updateSlider()}updateSlider(){this._sliderMask.x=this._sliderNib.legacyTransform.x-this._barWidth+this._sliderNib.legacyTransform.width/2}destroy(){this._scrollBar.destroy(),this._scrollView.destroy(),this._scrollViewObject.destroy(),this._contentView.destroy(),this._contentViewChild.destroy(),this._sliderMask.destroy(),this._sliderFill.destroy(),this._sliderTrack.destroy(),this._sliderNib.destroy(),super.destroy()}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_sliderFill",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_sliderTrack",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_sliderNib",void 0),et=(0,G.Cg)([(0,j.EVk)("Slider",j.YH6.ui)],et);var it,st=U(83133);U(13930);!function(k){k.Vertical="vertical",k.Horizontal="horizontal"}(it||(it={}));class nt extends j.$KW{generate(k,B){return j.XRp.createVertical([this.waveFunction(k),this.gridLayout(k)])}waveFunction(k){var B,U,F,G,$;const H=j.Gme.checkboxGroup({id:"applyForY",labelValue:"Apply for Y",inputValue:k.applyForY||!1,labelTooltip:"If it should apply on the Y coordinates"}),V=j.Gme.checkboxGroup({id:"avoidDuplicatePositions",labelValue:"Avoid Dup. Pos.",inputValue:k.avoidDuplicatePositions||!1,labelTooltip:"Tries to avoid duplicate positions making the positioning seem continuous"}),W=j.Gme.numberGroup({id:"amplitude",labelValue:"Amplitude",inputValue:null!==(B=k.amplitude)&&void 0!==B?B:50,inputUpdateMode:j.JGO.OnTheFly,labelTooltip:"How high and how low will items be placed"}),q=j.Gme.numberGroup({id:"frequency",labelValue:"Frequecy",inputValue:null!==(U=k.frequency)&&void 0!==U?U:1.1,inputUpdateMode:j.JGO.OnTheFly,labelTooltip:"Increases and decreases how frequent overtime the cycle repeats"}),K=j.Gme.numberGroup({id:"phase",labelValue:"Phase",inputValue:null!==(F=k.phase)&&void 0!==F?F:5.35,inputUpdateMode:j.JGO.OnTheFly,labelTooltip:"At which point the wave start, used to advance or retreat the starting point"}),z=j.Gme.numberGroup({id:"timeFraction",labelValue:"Time Fraction",inputValue:null!==(G=k.timeFraction)&&void 0!==G?G:5,inputUpdateMode:j.JGO.OnTheFly,labelTooltip:"Controls how many items are contained in a full wave"}),Y=j.Gme.numberGroup({id:"roundStep",labelValue:"Round Step",inputValue:null!==($=k.roundStep)&&void 0!==$?$:10,inputUpdateMode:j.JGO.OnTheFly,labelTooltip:"Snap to positions following this gap"}),Q=j.XRp.createVertical([W,q,K],{title:"Wave Length Configs",isContainer:!0,startCollapsed:!1}),X=j.XRp.createVertical([z,Y],{title:"Position Fine Tuning",isContainer:!0,startCollapsed:!1});return j.XRp.createVertical([H,V,Q,X],{title:"Wave Function Configs",startCollapsed:!1,isContainer:!0})}gridLayout(k){const B=j.Gme.numberGroup({id:"fixedRowCount",labelValue:"fixedRowCount",inputValue:k.fixedRowCount}),U=j.Gme.numberGroup({id:"fixedColumnCount",labelValue:"fixedColumnCount",inputValue:k.fixedColumnCount}),F=j.Gme.checkboxGroup({id:"dynamicRowHeight",labelValue:"dynamicRowHeight",inputValue:k.dynamicRowHeight}),G=j.Gme.checkboxGroup({id:"dynamicColumnWidth",labelValue:"dynamicColumnWidth",inputValue:k.dynamicColumnWidth}),$=j.Gme.numberGroup({id:"rowSpacing",labelValue:"rowSpacing",inputValue:k.rowSpacing}),H=j.Gme.numberGroup({id:"columnSpacing",labelValue:"columnSpacing",inputValue:k.columnSpacing}),V=j.Gme.numberGroup({id:"xPositionOffset",labelValue:"xPositionOffset",inputValue:k.xPositionOffset}),W=j.Gme.numberGroup({id:"yPositionOffset",labelValue:"yPositionOffset",inputValue:k.yPositionOffset}),q=j.Gme.numberGroup({id:"alignmentAnchorX",labelValue:"alignmentAnchorX",inputValue:k.alignmentAnchorX}),K=j.Gme.numberGroup({id:"alignmentAnchorY",labelValue:"alignmentAnchorY",inputValue:k.alignmentAnchorY}),z=j.Gme.enumGroup({id:"fillPriority",labelValue:"Fill Priority",selectValue:k.fillPriority},it),Y=j.Gme.checkboxGroup({id:"reverseFillRow",labelValue:"reverseFillRow",inputValue:k.reverseFillRow}),Q=j.Gme.checkboxGroup({id:"reverseFillColumn",labelValue:"reverseFillColumn",inputValue:k.reverseFillColumn}),X=j.Gme.numberGroup({id:"indexOffset",labelValue:"indexOffset",inputValue:k.indexOffset}),Z=j.NyS.create({id:"onUpdated",label:"On Updated",signalValue:k.onUpdated,componentGUID:this._componentGuid}),J=j.Gme.enumGroup({id:"lastLineAlignment",labelValue:"Last Line Alignment",selectValue:k.lastLineAlignment},j.DEw);return j.XRp.createVertical([B,U,F,G,$,H,V,W,q,K,z,Y,Q,X,Z,J],{title:"Grid Layout Configs",startCollapsed:!1,isContainer:!0})}}let at=class extends j.PEP{constructor(){super(...arguments),this.amplitude=50,this.frequency=1.1,this.phase=5.35,this.timeFraction=5,this.roundStep=10,this._yCache=[],this._yCacheI=0,this.applyForY=!0,this.avoidDuplicatePositions=!1,this._fixedRowCount=0,this._fixedColumnCount=0,this._dynamicRowHeight=!1,this._dynamicColumnWidth=!1,this._rowSpacing=0,this._columnSpacing=0,this._xPositionOffset=0,this._yPositionOffset=0,this._alignmentAnchorX=0,this._alignmentAnchorY=0,this._fillPriority=it.Horizontal,this._reverseFillRow=!1,this._reverseFillColumn=!1,this._indexOffset=0,this.onUpdated=new j.HN0,this._lastLineAlignment=j.DEw.Start}get fixedRowCount(){return this._fixedRowCount}get fixedColumnCount(){return this._fixedColumnCount}get dynamicRowHeight(){return this._dynamicRowHeight}get dynamicColumnWidth(){return this._dynamicColumnWidth}get rowSpacing(){return this._rowSpacing}get columnSpacing(){return this._columnSpacing}get xPositionOffset(){return this._xPositionOffset}get yPositionOffset(){return this._yPositionOffset}get alignmentAnchorX(){return this._alignmentAnchorX}get alignmentAnchorY(){return this._alignmentAnchorY}get fillPriority(){return this._fillPriority}get indexOffset(){return this._indexOffset}set indexOffset(k){this._indexOffset=k}postDeserialize(){super.postDeserialize(),this._fixedRowCount<1&&this._fixedColumnCount<1?(j.VyI.log("At least one direction in grid needs to be a fixed size",j.$bb.Error),this._fixedRowCount=1,this._fixedColumnCount=1):this._fixedRowCount<1&&this._fixedColumnCount>=1?(this._fillPriority=it.Horizontal,this._reverseFillRow=!1):this._fixedRowCount>=1&&this._fixedColumnCount<1&&(this._fillPriority=it.Vertical,this._reverseFillColumn=!1)}destroy(){this.onUpdated.dispose(),super.destroy()}setFixedColumnCount(k){this._fixedColumnCount=k,this.updateAll()}setFixedRowCount(k){this._fixedRowCount=k,this.updateAll()}setXOffset(k){this._xPositionOffset=k,this.updateAll()}setYOffset(k){this._yPositionOffset=k,this.updateAll()}waveFunction(k){const B=this.getColumn(k);let U=this.amplitude*Math.sin(2*Math.PI*this.frequency*(B/this.timeFraction)+this.phase);return U=j.cj9.snapTo(U,this.roundStep),U}getLayoutPositionX(k){const B=this.getColumn(k+this._indexOffset),U=this.getTotalCellCount(),F=this.getGameObjectList().length;if(this.fillPriority===it.Vertical||1===this.getColumnCount()||this._dynamicColumnWidth||F===U||k+this._indexOffset=1&&(B=this._fixedRowCount-1-B),B}getColumn(k){let B;return B=this._fillPriority===it.Horizontal?k%this._fixedColumnCount:Math.floor(k/this._fixedRowCount),this._reverseFillColumn&&this._fixedColumnCount>=1&&(B=this._fixedColumnCount-1-B),B}getRowCount(){const k=this.getGameObjectList().length+this._indexOffset;return this._fillPriority===it.Horizontal?Math.ceil(k/this._fixedColumnCount):Math.min(k,this._fixedRowCount)}getColumnCount(){const k=this.getGameObjectList().length+this._indexOffset;return this._fillPriority===it.Horizontal?Math.min(k,this._fixedColumnCount):Math.ceil(k/this._fixedRowCount)}getTotalCellCount(){if(this._fixedRowCount>0&&this._fixedColumnCount>0)return this._fixedRowCount*this._fixedColumnCount}isFilled(){return this._fixedRowCount>=1&&this._fixedColumnCount>=1&&this.getGameObjectList().length>=this._fixedRowCount*this._fixedColumnCount}isEmpty(){return this.getGameObjectList().length<=0}setRowSpacing(k){this._rowSpacing=k,this.updateAll()}setColumnSpacing(k){this._columnSpacing=k,this.updateAll()}updateAll(k=!0){const B=this.updateCachedDimensions();super.updateAll(k),this.onUpdated.dispatch(B)}updateCachedDimensions(){this._yCache.length=0,this._yCacheI=0;const k=Math.max(1,this.getRowCount()),B=Math.max(1,this.getColumnCount()),U=new Array(k).fill(0),F=new Array(B).fill(0),G=this.getGameObjectList();for(let V=G.length-1;V>=0;--V){const k=this.getRow(V),B=this.getColumn(V),$=G[V],H=j.Htv.getWidth($),W=j.Htv.getHeight($);U[k]=Math.max(U[k],W),F[B]=Math.max(F[B],H)}this._cachedColumnX=new Array(B),this._cachedRowY=new Array(k);let $=this._xPositionOffset,H=this._yPositionOffset;for(let j=0;jArray($).fill(1))),this._tileSize=U.getTileDimensions().width>>1;const W=U.getLayers().filter((k=>{var B,U;return!j.Aq$.isDefined(null===(B=k.properties)||void 0===B?void 0:B.isAbove)&&!j.Aq$.isDefined(null===(U=k.properties)||void 0===U?void 0:U.reference)}));for(const k of W){if(!Array.isArray(k.data))continue;const j=null!==(B=ct.get(k,"properties.toggle"))&&void 0!==B?B:ct.get(k,"properties.dynamicToggle",-1);let W=V.get(j);W||V.set(j,W=Array(H).fill(void 0).map((()=>Array($).fill(1)))),k.data.forEach(((k,B)=>{const j=this.getTileCollisionString(U,F,k);if(j)for(let U=0;U<4;++U){const k=parseInt(j[U]);if(1===k||6===k){const F=B%G.width,j=Math.floor(B/G.width);W[(j<<1)+(1&U)][(F<<1)+(U>>1)]=1===k?0:k}}}))}return this._collisionDataByGroup=V,this.buildFinalCollisionData(),this._finalCollisionData}))}setToggleGroupVisibility(k,B){B?this._disabledGroups.delete(k):this._disabledGroups.add(k),this._finalCollisionData&&this.buildFinalCollisionData()}loadMap(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=tt.q.instance.game;let U=B.cache.getJSON(k);if(U)return new j.i4g(U);const F=tt.q.instance.prodigy;if(yield F.load.assetsAsPromise(k),U=B.cache.getJSON(k),U)return new j.i4g(U);throw new Error(`Failed to load map data for "${k}"`)}))}getTileCollisionString(k,B,U){var F,G,$;const H=k.getTilesetForTile(U);if(!H)return null;const V=B.getTilesets().find((k=>k.name===H.name&&k.tileproperties));if(!V)return null;const W=(U&~j.DXe.all)-(null!==(F=H.firstgid)&&void 0!==F?F:0),q=null===($=null===(G=V.tileproperties)||void 0===G?void 0:G[W])||void 0===$?void 0:$.x;if(!q)return null;const K=0!=(U&j.DXe.flippedHorizontally),z=0!=(U&j.DXe.flippedVertically);let Y=q;if(0!=(U&j.DXe.flippedDiagonally)){if(Y=this.transformCollisionString(q,[3,1,2,0]),K)return this.transformCollisionString(q,[2,3,0,1]);if(z)return this.transformCollisionString(q,[1,0,3,2])}else{if(K)return this.transformCollisionString(q,[1,0,3,2]);if(z)return this.transformCollisionString(q,[2,3,0,1])}return Y}transformCollisionString(k,B){return B.map((B=>k[B])).join("")}buildFinalCollisionData(){(0,ut.v)(this._finalCollisionData,"Final collision data not initialized"),this._finalCollisionData.forEach((k=>k.fill(1)));for(const[k,B]of Array.from(this._collisionDataByGroup.entries()))if(!this._disabledGroups.has(k))for(let U=0;UYt.t.getCategoryItems(k).map((k=>{var B,U;return{label:`${(k?Qt.J.getItemName(k):"Unknown")||"Unknown"} (${null!==(B=null==k?void 0:k.ID)&&void 0!==B?B:"?"})`,value:String(null!==(U=null==k?void 0:k.ID)&&void 0!==U?U:"")}})).filter((k=>!!k.value)).sort(((k,B)=>Number(k.value)-Number(B.value)))}!function(k){k[k.Button=0]="Button",k[k.Toggle=1]="Toggle",k[k.InputButton=2]="InputButton",k[k.Info=3]="Info",k[k.InfoWithCopyButton=4]="InfoWithCopyButton",k[k.DropdownInput=5]="DropdownInput"}(jt||(jt={})),function(k){k.MapInfo="Map Info",k.Battle="Battle",k.Economy="Economy",k.Menus="Menus",k.Game="Game",k.Warps="Warps",k.Misc="Misc",k.Inventory="Inventory",k.Pets="Pets",k.Campaign="Campaign",k.Feature="Feature",k.Key="Key",k.General="General",k.GrowthbookFeatures="GrowthbookFeatures",k.WizardDash="WizardDash",k.DailyLogin="DailyLogin",k.PrefabScenes="PrefabScenes",k.DarkTower="Dark Tower",k.Rifts="Rifts",k.Encounters="Encounters",k.WizardCostumes="WizardCostumes",k.HudAttention="HUD Attention",k.RegularZones="Regular Zones",k.HardZones="Hard Zones",k.ExpertZones="Expert Zones",k.BattleUnits="Battle Units"}($t||($t={})),function(k){k.DebugMenuGoToCategory="debugMenu.goToCategory",k.DebugMenuFilterGrowthbookFeatures="debugMenu.filterGrowthbookFeatures",k.ToggleDebugMenu="toggleDebugMenu",k.Answer="answer",k.Snow="snow",k.OpenOptionsMenu="openOptionsMenu",k.CloseMenus="closeMenus",k.GetGold="getGold",k.GetCurrency="getCurrency",k.GetEpic="getEpic",k.GetSpell="getSpell",k.EasyMode="easyMode",k.HardMode="hardMode",k.KillGore="killGore",k.PreventDefeatHomeTeam="battleRevamp.preventDefeat",k.PreventDefeatEnemyTeam="battleRevamp.preventDefeat",k.BattleUnitOverrideDodge="battleRevamp.overrideUnitDodgeChance",k.BattleUnitSetHealth="battleRevamp.setUnitHealth",k.BattleSetTeamHealth="battleRevamp.setTeamHealth",k.GrabBag="grabBag",k.MaintainAspectRatio="maintainAspectRatio",k.Player="player",k.ScaleEncounterDistance="scaleEncounterDistance",k.DisableBlockingEncounters="encounters.disableBlockingEncounters",k.ResetCooldowns="encounters.resetCooldowns",k.ResetAllUniqueEncounters="encounters.resetAllUniqueEncounters",k.ResetUniqueEncountersForMap="encounters.resetUniqueEncountersForMap",k.ResetUniqueEncountersForZone="encounters.resetUniqueEncountersForZone",k.SetEnemyAccuracy="setEnemyAccuracy",k.SetGameSpeed="setGameSpeed",k.SetLevel="setLevel",k.SetMorphDuration="setMorphDuration",k.SetMembership="setMembership",k.GetMembership="getMembership",k.OpenFirstNameSelector="openFirstNameSelector",k.OpenWizardNameSelector="openWizardNameSelector",k.OpenPlayer="openPlayer",k.OpenPlayerInToolbox="openPlayerInToolbox",k.ResetAccount="resetAccount",k.ShowFpsGraph="showFpsGraph",k.EnableSkynet="enableSkynet",k.DisableSkynet="disableSkynet",k.Tp="tp",k.WarpTour="warpTour",k.CancelWarpTour="cancelWarpTour",k.PrintMousePositionOnClick="printMousePositionOnClick",k.SetGameConstant="setGameConstant",k.SetFeatureFlag="setFeatureFlag",k.RenderPrefab="renderPrefab",k.WarpMode="enableWarpMode",k.JSError="jsError",k.GetPet="getPet",k.GetPets="getPets",k.SetTriggerAreaVisibility="setTriggerAreaVisibility",k.ShowAreaEvents="showAreaEvents",k.ShowCollisions="showCollisions",k.EnablePlayerCards="enablePlayerCards",k.SetRespawnTime="setRespawnTime",k.OpenStore="openStore",k.BattleRevampKillGore="battleRevamp.killGore",k.CompleteTutorial="completeTutorial",k.UnlockAcademy="unlockAcademy",k.GetAllKeystones="getAllKeystones",k.ResetAllKeystones="resetAllKeystones",k.SetEndgameQuestStep="setQuestStep",k.GetLastKeystone="getLastKeystone",k.ResetBreadcrumbFeature="resetBreadcrumbFeature",k.ResetPrizeWheelSpins="resetPrizeWheelSpins",k.ShowDialogueDebug="showDialogueDebug",k.ShowImage="showImage",k.SetUnlimitedWheelSpins="setUnlimitedWheelSpins",k.SetDebugSubject="setDebugSubject",k.EnableTimeOverride="enableTimeOverride",k.ReenterWorld="reenterWorld",k.GetItemType="getItemType",k.GetAllUnownedPetGear="getAllUnownedPetGear",k.ClearResolvedOffers="clearResolvedOffers",k.SetPetLevel="setPetLevel",k.SetAllPetLevels="setAllPetLevels",k.GetAllUnownedPets="getAllUnownedPets",k.GetSecureItem="getSecureItem",k.GetSecureItems="getSecureItems",k.GetPetGearItem="getPetGearItem",k.AddPetSlots="addPetSlots",k.RemoveAllSecureItemsByType="removeAllSecureItemsByType",k.RemoveAllPets="removeAllPets",k.StartQuickQuiz="quickQuiz.quickStart",k.EndQuickQuiz="quickQuiz.endLast",k.EndAllQuickQuizzesForPlayer="quickQuiz.endAllForThisPlayer",k.UsePrefabScenes="usePrefabScenes",k.SetDlcTaskCollectTo="dlc.setDLCTaskCollectImmediate",k.GetRiftsKeys="getRiftsKeys",k.GetRiftsStoreCurrency="getRiftsStoreCurrency",k.ToggleInputAreas="toggleInputAreaPreview",k.EditStatusEffects="battleRevamp.editStatusEffects",k.BurnMagicoin="burnMagicoin",k.GoToDarkTowerFloor="tpTowerFloor",k.StartBattle="startBattle",k.CopyBattleToClipboard="copyBattleToClipboard",k.OpenWindow="window.open",k.ClaimAllowance="claimAllowance",k.SetLocale="locale.set",k.SkipPostBattleVideos="skipPostBattleVideos",k.UseDebugSegmentLogger="useDebugSegmentLogger",k.EnableOutfitDebugMenu="enableOutfitDebugMenu",k.GrantCostumeItem="wizardCostumes.grantCostumeItem",k.GrantAllCostumeItems="wizardCostumes.grantAllCostumeItems",k.OpenWizardCostumesMenu="wizardCostumes.openWizardCostumesMenu",k.OpenWizardCostumesFtuePopup="wizardCostumes.openWizardCostumesFtuePopup",k.ResetViewedCostumes="wizardCostumes.resetViewedCostumes",k.ResetViewedCostumesTutorial="wizardCostumes.resetViewedTutorial",k.ResetWizardCostumesFtue="wizardCostumes.resetWizardCostumesFtue",k.RenderCostumeById="wizardCostumes.renderCostumeById",k.CreateEquippedGearItemCard="wizardCostumes.createEquippedGearItemCard",k.GetCurrentCostumePoolData="wizardCostumes.getCurrentCostumePoolData",k.ForceHighlightHudButton="hudAttention.forceHighlight",k.ResetHudButtonCooldown="hudAttention.resetCooldown",k.SetWasMemberLastSession="setWasMemberLastSession"}(Ht||(Ht={}));const Zt=[{type:jt.Button,command:Ht.EnableTimeOverride,title:"Enable Time Override",description:"Opens the time override menu",closeMenu:!0},{type:jt.InputButton,command:Ht.SetLocale,title:"Set Locale",description:`Sets the game locale (${Object.values(It.s).map((k=>`"${k}"`)).join(", ")}). Use "en-pseudo" for pseudo-translation.`,args:{args:["en-us"],inputIdx:0},closeMenu:!1},{type:jt.Button,command:Ht.ReenterWorld,title:"Reload World",description:"Loads the initial scene again",closeMenu:!0},{type:jt.Button,command:Ht.Answer,title:"Open QI",description:"Opens up an education content question.",closeMenu:!0},{type:jt.Button,command:Ht.CloseMenus,title:"Close Menus",description:"Close all Menus"},{type:jt.Button,command:Ht.OpenPlayerInToolbox,title:"Toolbox",description:"Opens player data in toolbox"},{type:jt.Button,command:Ht.ResetAccount,title:"Reset Account",description:"Resets the account, wiping all game data",closeMenu:!0,buttonOptions:{text:"Reset",type:Pt.vX.Ruby,icon:Pt.XN.Close}}],Jt=[{type:jt.Button,command:Ht.ResetHudButtonCooldown,title:"Reset Shop Cooldown",description:"Resets the cooldown for Shop HUD button attention",args:{args:["Shop"]}},{type:jt.Button,command:Ht.ResetHudButtonCooldown,title:"Reset Treasure Track Cooldown",description:"Resets the cooldown for Treasure Track HUD button attention",args:{args:["TreasureTrack"]}},{type:jt.Button,command:Ht.ResetHudButtonCooldown,title:"Reset Festival Cooldown",description:"Resets the cooldown for Festival HUD button attention",args:{args:["Festival"]}},{type:jt.Button,command:Ht.ResetHudButtonCooldown,title:"Reset StateChallenges Cooldown",description:"Resets the cooldown for StateChallenges HUD button attention",args:{args:["StateChallenges"]}},{type:jt.Button,command:Ht.ResetHudButtonCooldown,title:"Reset AfterSchoolWidget Cooldown",description:"Resets the cooldown for AfterSchoolWidget HUD button attention",args:{args:["AfterSchoolWidget"]}},{type:jt.Button,command:Ht.ForceHighlightHudButton,title:"Highlight Treasure Track",description:"Force highlights the Treasure Track HUD button",args:{args:["TreasureTrack"]}},{type:jt.Button,command:Ht.ForceHighlightHudButton,title:"Highlight Festival Button",description:"Force highlights the Festival HUD button",args:{args:["Festival"]}},{type:jt.Button,command:Ht.ForceHighlightHudButton,title:"Highlight StateChallenges Button",description:"Force highlights the StateChallenges HUD button",args:{args:["StateChallenges"]}},{type:jt.Button,command:Ht.ForceHighlightHudButton,title:"Highlight AfterSchoolWidget Button",description:"Force highlights the AfterSchoolWidget HUD button",args:{args:["AfterSchoolWidget"]}}],te=[{category:$t.WizardDash,data:[{type:jt.InputButton,command:Ht.StartQuickQuiz,title:"StartQuickQuiz",description:"Starts a debug Quick Quiz with optional id prefix",args:{args:["id"],inputIdx:0},closeMenu:!0},{type:jt.Button,command:Ht.EndQuickQuiz,title:"End QuickQuiz",description:"Ends the last debug Quick Quiz created this session",closeMenu:!0},{type:jt.Button,command:Ht.EndAllQuickQuizzesForPlayer,title:"End All Quick Quizzes",description:"Ends all debug Quick Quizzes for this player",closeMenu:!0}]},{category:$t.DailyLogin,data:[{type:jt.Button,command:Ht.SetDlcTaskCollectTo,title:"DLC Reward",description:"Immediately sets the next DLC reward to ready to collect",closeMenu:!0}]},{category:$t.PrefabScenes,data:[{type:jt.Toggle,command:Ht.UsePrefabScenes,title:"Use Prefab Scenes",description:"Toggles whether to use prefab scenes",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>zt.D.isFeatureEnabled()}]},{category:$t.DarkTower,data:[{type:jt.Button,command:Ht.Tp,title:"Go to Lobby",description:"Teleports to the Dark Tower lobby",args:{args:["darktower-A1"]},closeMenu:!0},{type:jt.InputButton,command:Ht.GoToDarkTowerFloor,title:"Go to Floor",description:"Teleports to a specified floor (1-100)",args:{args:[100],inputIdx:0,useArgsValueAsDefault:!0},closeMenu:!0}]},{category:$t.Rifts,data:[{type:jt.InputButton,command:Ht.GetRiftsKeys,title:"Add Portal 1 Keys",description:"Enter the amount of rifts keys for portal 1 to gain",args:{args:[Vt.ni.Portal1,3],inputIdx:1,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetRiftsKeys,title:"Add Portal 2 Keys",description:"Enter the amount of rifts keys for portal 2 to gain",args:{args:[Vt.ni.Portal2,3],inputIdx:1,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetRiftsKeys,title:"Add Portal 3 Keys",description:"Enter the amount of rifts keys for portal 3 to gain",args:{args:[Vt.ni.Portal3,3],inputIdx:1,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetRiftsStoreCurrency,title:"Add Portal 1 Currency",description:"Enter the amount of rifts store currency for portal 1 to gain",args:{args:[28,Vt.ni.Portal1,100],inputIdx:2,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetRiftsStoreCurrency,title:"Add Portal 2 Currency",description:"Enter the amount of rifts store currency for portal 2 to gain",args:{args:[29,Vt.ni.Portal2,100],inputIdx:2,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetRiftsStoreCurrency,title:"Add Portal 3 Currency",description:"Enter the amount of rifts store currency for portal 3 to gain",args:{args:[30,Vt.ni.Portal3,100],inputIdx:2,useArgsValueAsDefault:!0}}]},{category:$t.WizardCostumes,data:[{type:jt.Button,command:Ht.OpenWizardCostumesMenu,title:"Open Wizard Costumes Menu",description:"Open the Wizard Costumes menu",closeMenu:!0},{type:jt.Button,command:Ht.OpenWizardCostumesFtuePopup,title:"Open FTUE Popup",description:"Open the Wizard Costumes FTUE popup",closeMenu:!0},{type:jt.InputButton,command:Ht.GrantCostumeItem,title:"Get Costume Item",description:"Grant a costume item by Id",args:{args:[1],inputIdx:0,useArgsValueAsDefault:!0}},{type:jt.Button,command:Ht.GrantAllCostumeItems,title:"Get All Costumes",description:"Grants all costume items to the player"},{type:jt.Button,command:Ht.RemoveAllSecureItemsByType,title:"Remove All Costumes",description:"Removes all costume inventory items from the player",args:{args:["costume"]},buttonOptions:{type:Pt.vX.Ruby,icon:Pt.XN.Close,text:""}},{type:jt.Button,command:Ht.ResetViewedCostumes,title:"Reset Viewed Costumes",description:"Reset the viewed costumes list so all costumes appear as new"},{type:jt.Button,command:Ht.ResetViewedCostumesTutorial,title:"Reset Video Viewed",description:"Reset the costumes video so it will auto-play when the menu is opened"},{type:jt.Button,command:Ht.ResetWizardCostumesFtue,title:"Reset Costumes FTUE",description:"Reset the wizard costumes FTUE so it will trigger again"},{type:jt.InputButton,command:Ht.RenderCostumeById,title:"Render Costume by Id",description:"Renders a costume on the item card by Id",args:{args:[1],inputIdx:0,useArgsValueAsDefault:!0}},{type:jt.Button,command:Ht.CreateEquippedGearItemCard,title:"Create Equipped Gear Item Card",description:"Creates an equipped gear item card"},{type:jt.Button,command:Ht.GetCurrentCostumePoolData,title:"Get Costume Pool Data",description:"Logs the current active costume pool data to the console"}]},{category:$t.HudAttention,data:Jt}],ee=[{type:jt.Button,command:Ht.UseDebugSegmentLogger,title:"Segment Logger",description:"Logs segment events to the console"},{type:jt.Button,command:Ht.ShowFpsGraph,title:"Toggle FPS Graph",description:""},{type:jt.Button,command:Ht.PrintMousePositionOnClick,title:"Log Mouse Position",description:"Prints mouse position on click"},{type:jt.Button,command:Ht.MaintainAspectRatio,title:"Aspect Ratio",description:"Sets the game window to 16:9"},{type:jt.InputButton,command:Ht.SetGameSpeed,title:"Game Speed",description:"Enter the game speed.",args:{args:[1],inputIdx:0,useArgsValueAsDefault:!0}},{type:jt.Button,command:Ht.EnableSkynet,title:"Enable Skynet",args:{args:[.5,50]},description:"Begins spawning fake players into the scene until there are 50 fake players"},{type:jt.Button,command:Ht.DisableSkynet,title:"Disable Skynet",description:"Stops spawning fake players into the scene, and clear any fake players"},{type:jt.Toggle,command:Ht.ShowCollisions,title:"Show Collisions",description:"Toggles the visibility of collision boxes. Warning: If you try to open a menu with this active there will be issues.",args:{selectedArgs:[!0],unselectedArgs:[!1]},closeMenu:!0,disableMenuToggle:!0},{type:jt.Toggle,command:Ht.ToggleInputAreas,title:"Toggle Input Preview",description:"Toggles the preview of the instantiated input areas",args:{selectedArgs:[!0],unselectedArgs:[!1]}},{type:jt.Toggle,command:Ht.EnablePlayerCards,title:"Toggle hiding player cards",description:"Toggle hiding the player cards",args:{selectedArgs:[!1],unselectedArgs:[!0]}},{type:jt.InputButton,command:Ht.SetRespawnTime,title:"Respawn Time",description:"Sets the respawn time for monsters in seconds.",args:{args:[120],inputIdx:0,useArgsValueAsDefault:!0}},{type:jt.Toggle,command:Ht.ShowAreaEvents,title:"Show Area Events",description:"Toggles the visibility of area events",args:{selectedArgs:[!0],unselectedArgs:[!1]}},{type:jt.Toggle,command:Ht.SetGameConstant,title:"Inactivity Timer",description:"Toggles between 10s and the default (25 mins)",args:{selectedArgs:["GameConstants.Inactivity.DIALOG_TIMER_SECONDS",10],unselectedArgs:["GameConstants.Inactivity.DIALOG_TIMER_SECONDS",1500]}},{type:jt.Toggle,command:Ht.SetTriggerAreaVisibility,title:"Show Trigger Areas",description:"Toggles the visibility of trigger areas",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>Kt.s.get("GameConstants.Build.DRAW_TRIGGERS")}],ie=[{type:jt.InputButton,command:Ht.StartBattle,title:"Start Battle",description:"Enter as 1 or 1,2,3. PetIds-first box, then levels then merge rank.",args:{args:[[1,2,3],[0,0,0],[0,0,0]],inputIdx:[0,1,2],useArgsValueAsDefault:!0},closeMenu:!0}],se=[{type:jt.Button,command:Ht.CopyBattleToClipboard,title:"Copy Battle Command",description:"Copies startBattle debug command to clipboard for the current battle",buttonOptions:{text:"Copy",type:Pt.vX.Sapphire,icon:Pt.XN.Info}},{type:jt.Button,command:Ht.EditStatusEffects,title:"Edit Status Effects",description:"Opens the debug menu to add and remove status effects",closeMenu:!0,buttonOptions:{text:"Open",type:Pt.vX.Sapphire},feature:Wt.P},{type:jt.InputButton,command:Ht.BattleSetTeamHealth,title:"Set Home Health",description:"Sets the health of all home team units to the entered value",args:{args:["home",100],inputIdx:1,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.BattleSetTeamHealth,title:"Set Enemy Health",description:"Sets the health of all enemy team units to the entered value",args:{args:["enemy",100],inputIdx:1,useArgsValueAsDefault:!0}}],ne=[{type:jt.InputButton,command:Ht.Tp,title:"Warp",description:"Warp to the entered location",args:{args:[Ft.A_.HOUSE],inputIdx:0,useArgsValueAsDefault:!0},closeMenu:!0},{type:jt.InputButton,command:Ht.WarpTour,title:"Warp Tour",description:"Warp to all maps! Enter the delay between warps, and the zone to warp to (leave blank for all zones)",args:{args:[2,"all zones"],inputIdx:[0,1],useArgsValueAsDefault:!0},closeMenu:!0},{type:jt.Button,command:Ht.CancelWarpTour,title:"Cancel Warp Tour",description:"Cancel an ongoing warp tour",closeMenu:!0},{type:jt.Toggle,command:Ht.WarpMode,title:"Warp Mode",description:"Toggles between walking and warping in the map",args:{selectedArgs:[!0],unselectedArgs:[!1]}}],ae=[{type:jt.InputButton,command:Ht.GetGold,title:"Gold",description:"Enter the amount to gain",args:{args:[1e3],inputIdx:0,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetSecureItem,title:"Magicoin",description:"Enter the amount to gain",args:{args:["currency",27,1e3],inputIdx:2,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.BurnMagicoin,title:"Burn Magicoin",description:"Enter the amount to lose",args:{args:[1e3],inputIdx:0,useArgsValueAsDefault:!0}},{type:jt.Button,command:Ht.ClearResolvedOffers,title:"Clear Resolved Offers",description:"Clears seen segmented upsell offers so they can appear again"},{type:jt.InputButton,command:Ht.GetCurrency,title:"Hot-Hots",description:"Enter the amount to gain",args:{args:[12,1e3],inputIdx:1,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetCurrency,title:"Florans",description:"Enter the amount to gain",args:{args:[13,1e3],inputIdx:1,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetCurrency,title:"Yars",description:"Enter the amount to gain",args:{args:[14,1e3],inputIdx:1,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetCurrency,title:"Shivers",description:"Enter the amount to gain",args:{args:[15,1e3],inputIdx:1,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetCurrency,title:"Aeros",description:"Enter the amount to gain",args:{args:[16,1e3],inputIdx:1,useArgsValueAsDefault:!0}},{type:jt.Button,command:Ht.ResetPrizeWheelSpins,title:"Reset Wheel Spins",description:"Resets the prize wheel so you can spin again"},{type:jt.Toggle,command:Ht.SetUnlimitedWheelSpins,title:"Unlimited Wheel Spins",description:"Allows for unlimited wheel spins",args:{selectedArgs:[!0],unselectedArgs:[!1]}},{type:jt.InputButton,command:Ht.ClaimAllowance,title:"Claim Monthly Allowance",description:"Valid options: ultra, plus, core, non_member",args:{args:["ultra"],inputIdx:0,useArgsValueAsDefault:!0},feature:qt.d}],re=[{type:jt.Toggle,command:Ht.ScaleEncounterDistance,title:"Disable Regular Encounters",description:"Toggles whether regular encounters can trigger",args:{selectedArgs:[0],unselectedArgs:[1]},initialValue:()=>0===Kt.s.get("GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE")},{type:jt.Toggle,command:Ht.DisableBlockingEncounters,title:"Disable Blocking Encounters",description:"Toggles whether cloaked wizards block map exits",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>Kt.s.get("GameConstants.Debug.DISABLE_BLOCKING_ENCOUNTERS")},{type:jt.Toggle,command:Ht.SetTriggerAreaVisibility,title:"Show Trigger Areas",description:"Toggles the visibility of trigger areas",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>Kt.s.get("GameConstants.Build.DRAW_TRIGGERS")},{type:jt.Button,command:Ht.ResetCooldowns,title:"Reset Cooldowns",description:"Resets all active encounter cooldowns",closeMenu:!0},{type:jt.Button,command:Ht.ResetAllUniqueEncounters,title:"Reset All Unique Encounters",description:"Reset defeated unique encounters. Cause all unique encounters in the game to respawn.",closeMenu:!0},{type:jt.Button,command:Ht.ResetUniqueEncountersForZone,title:"Reset Uniques for this Zone",description:"Reset defeated unique encounters in this zone only.",closeMenu:!0},{type:jt.Button,command:Ht.ResetUniqueEncountersForMap,title:"Reset Uniques for this Map",description:"Reset defeated unique encounters on this map only.",closeMenu:!0}],oe=[{category:$t.Encounters,data:re},{type:jt.Toggle,command:Ht.EasyMode,title:"Easy Mode",description:"Turns easy mode on, all answers are correct",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>{var k;return!1===(null===(k=Kt.s.get("GameConstants.Debug.EDUCATION_ENABLED"))||void 0===k||k)}},{type:jt.Toggle,command:Ht.HardMode,title:"Hard Mode",description:"Turns hard mode on, all answers are incorrect",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>0===Kt.s.get("GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT")},{type:jt.Toggle,command:Ht.KillGore,title:"Kill Gore",description:"Spells deal max damage",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>{var k;return!0===(null!==(k=Kt.s.get("GameConstants.Build.KILL_GORE"))&&void 0!==k&&k)}},{type:jt.Toggle,command:Ht.PreventDefeatEnemyTeam,title:"Prevent Defeat (Away)",description:"Prevent enemy team units from being defeated",args:{selectedArgs:[!0,1],unselectedArgs:[!1,1]}},{type:jt.Toggle,command:Ht.PreventDefeatHomeTeam,title:"Prevent Defeat (Home)",description:"Prevent home team units from being defeated",args:{selectedArgs:[!0,0],unselectedArgs:[!1,0]}},{type:jt.Toggle,command:Ht.SetEnemyAccuracy,title:"Toggle Enemy Accuracy",description:"Toggles 100% enemy accuracy",args:{selectedArgs:[!0,1],unselectedArgs:[!1,0]},initialValue:()=>1===Kt.s.get("GameConstants.Battle.ENEMY_ACCURACY_OVERRIDE")},{type:jt.Toggle,command:Ht.SkipPostBattleVideos,title:"Skip Post Battle Videos",description:"Skips videos in post-battle flow",args:{selectedArgs:[!0],unselectedArgs:[!1]},initialValue:()=>{var k;return!0===(null!==(k=Kt.s.get("GameConstants.Battle.SKIP_POST_BATTLE_VIDEOS"))&&void 0!==k&&k)}}],he=[{type:jt.Button,command:Ht.SetMembership,title:"Enable Membership",description:"Grants membership for this session"},{type:jt.Button,command:Ht.EnableOutfitDebugMenu,title:"Outfit Debug Menu",description:"Change screens to create the menu"},{type:jt.Button,command:Ht.GrabBag,title:"Grab Bag",description:"Give the player a random assortment of all items & equipment"},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Item",description:"Pick by name, or type an item id",args:{args:["item",0],inputIdx:1},options:Xt("item")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Buddy",description:"Pick by name, or type a buddy id",args:{args:["follow",0],inputIdx:1},options:Xt("follow")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Mount",description:"Pick by name, or type a mount id",args:{args:["mount",0],inputIdx:1},options:Xt("mount")},{type:jt.DropdownInput,command:Ht.GetSpell,title:"Get Spell",description:"Pick by name, or type a spell id (0 to 52 are safe)",args:{args:[0],inputIdx:0},options:Xt("spell")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Wand",description:"Pick by name, or type a wand id",args:{args:["weapon",0],inputIdx:1},options:Xt("weapon")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Hat",description:"Pick by name, or type a hat id",args:{args:["hat",0],inputIdx:1},options:Xt("hat")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Outfit",description:"Pick by name, or type an outfit id",args:{args:["outfit",0],inputIdx:1},options:Xt("outfit")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Boots",description:"Pick by name, or type a boots id",args:{args:["boots",0],inputIdx:1},options:Xt("boots")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Fossil",description:"Pick by name, or type a fossil id",args:{args:["fossil",0],inputIdx:1},options:Xt("fossil")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Key Item",description:"Pick by name, or type a key item id",args:{args:["key",0],inputIdx:1},options:Xt("key")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Relic",description:"Pick by name, or type a relic id",args:{args:["spellRelic",0],inputIdx:1},options:Xt("spellRelic")},{type:jt.DropdownInput,command:Ht.GetItemType,title:"Get Dorm Item",description:"Pick by name, or type a dorm item id",args:{args:["dorm",0],inputIdx:1},options:Xt("dorm")},{type:jt.InputButton,command:Ht.SetMorphDuration,title:"Set Morph Duration",description:"Set the duration of the morph marbles in minutes",args:{args:[5],inputIdx:0,useArgsValueAsDefault:!0}}],ce=[{type:jt.DropdownInput,command:Ht.GetPets,title:"Get Pets",description:"Pick a pet by name, or type a comma-separated list of pet ids (ex: 100, 13, 290). Leave blank to get a random pet.",args:{args:[""],inputIdx:0},options:Xt("pet")},{type:jt.InputButton,command:Ht.SetAllPetLevels,title:"Set Pet Level",description:"Set the level of all pets in your kennel to the entered value",args:{args:[50],inputIdx:0,useArgsValueAsDefault:!0}},{type:jt.InputButton,command:Ht.GetAllUnownedPets,title:"Get All Unowned Pets",description:"Gets all pets you don't currently have",args:{args:[99]},closeMenu:!0},{type:jt.DropdownInput,command:Ht.RemoveAllPets,title:"Remove Pets",description:"Pick a pet by name, or type a comma-separated list of pet ids (ex: 100, 13, 290). Leave blank to remove all pets.",args:{args:[""],inputIdx:0,useArgsValueAsDefault:!0},options:Xt("pet")},{type:jt.InputButton,command:Ht.GetPetGearItem,title:"Get Pet Hat",description:"Grant a specific pet hat by id",args:{args:["petHat",0],inputIdx:1}},{type:jt.InputButton,command:Ht.GetPetGearItem,title:"Get Pet Relic",description:"Grant a specific pet relic by id",args:{args:["petRelic",0],inputIdx:1}},{type:jt.InputButton,command:Ht.GetAllUnownedPetGear,title:"Get Pet Gear",description:"Gets all pet gear you don't currently have. Restart may be required to view items"}],de=[{type:jt.Button,command:Ht.SetMembership,title:"Enable Membership",description:"Grants membership for this session"},{type:jt.Toggle,command:Ht.SetWasMemberLastSession,title:"Set WasMemberLastSession",description:"Sets the wasMemberLastSession flag in player data",args:{selectedArgs:[!0],unselectedArgs:[!1]}},{type:jt.InputButton,command:Ht.SetLevel,title:"Set Player Level",description:"Set the player level, level will be 1 higher than the number input (ie; 99 will become level 100)",args:{args:[50],inputIdx:0,useArgsValueAsDefault:!0}},{type:jt.Button,command:Ht.CompleteTutorial,title:"Complete Tutorial",description:"Completes the tutorial"},{type:jt.Button,command:Ht.UnlockAcademy,title:"Unlock Academy",description:"Sets the player to level 15 and skips the entering the academy cutscene."},{type:jt.Button,command:Ht.ResetAllKeystones,title:"Reset All Keystones",description:"Resets all keystones"},{type:jt.Button,command:Ht.GetAllKeystones,title:"Get All Keystones",description:"Gives the player all keystones"},{type:jt.Button,command:Ht.GetLastKeystone,title:"Get Last Keystone",description:"Gives the player the last keystone, might affect the Pippet cutscene"},{type:jt.InputButton,command:Ht.ShowDialogueDebug,title:"Show Dialogue",description:"Open the dialogue for a given ID",args:{args:[100],inputIdx:0},closeMenu:!0},{type:jt.InputButton,command:Ht.SetEndgameQuestStep,title:"Endgame Quest Step",description:"Not Started: 0, Keystone Cutscene: 1, Pippet Defeated: 2, Guardians Defeated: 3-7",args:{args:[0],inputIdx:0}},{type:jt.Button,command:Ht.SetEndgameQuestStep,title:"Defeat Puppet Master",description:"Set the endgame quest step to 8, Puppet Master Defeated",args:{args:[8]}},{type:jt.Button,command:Ht.ResetBreadcrumbFeature,title:"Reset Endgame",description:"Resets the endgame Puppet Master quests",args:{args:["FEATURE_ENDGAME_QUEST"]}}],le="UNIT_ID_PLACEHOLDER",ue=[{type:jt.InfoWithCopyButton,title:"Copy unit id",description:le,command:void 0},{type:jt.Toggle,command:Ht.BattleUnitOverrideDodge,title:"Set dodge chance",description:"True=100% dodge, False=0% dodge",args:{selectedArgs:[le,!0],unselectedArgs:[le,!1]}},{type:jt.InputButton,command:Ht.BattleUnitSetHealth,title:"Set Health",description:"Set the unit's health to the entered value",args:{args:[le,100],inputIdx:1,useArgsValueAsDefault:!0}}];var fe=U(97495),be=U(77601);class pe{static setOverrideValue(k,B,U){pe.unitOverrides[k]||(pe.unitOverrides[k]={}),pe.unitOverrides[k][B]=U}static getOverrideValue(k,B){var U;return null===(U=pe.unitOverrides[k])||void 0===U?void 0:U[B]}}pe.unitOverrides={};const ve=[Ft.A_.HOUSE,Ft.A_.EARTHTOWER,Ft.A_.ICETOWER,Ft.A_.STORMTOWER,Ft.A_.FIRETOWER,Ft.A_.WATERTOWER,Ft.A_.ASTRALTOWER,Ft.A_.CRYSTALCAVERNS];class ge{getRootCategories(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=[{category:$t.General,data:this.getGeneralCommands()},{category:$t.Feature,data:this.getFeatureCommands()},{category:$t.Economy,data:ae},{category:$t.Game,data:ee},{category:$t.Battle,data:this.getBattleCommands()},{category:$t.Inventory,data:he},{category:$t.Pets,data:ce},{category:$t.Campaign,data:de},{category:$t.Warps,data:this.getWarpCommands()},{category:$t.MapInfo,data:yield this.getMapInfo()}];return this.checkForDisabledCommands(k),this.filterEmptyCategories(k)}))}static getGrowthbookFeatures(){var k;window.debugMenu.filterGrowthbookFeatures=k=>{window.debugMenu.growthbookFilter=k,ye.reloadViewWithNewData(ge.getGrowthbookFeatures())};const B={type:jt.InputButton,command:Ht.DebugMenuFilterGrowthbookFeatures,title:"Filter features",description:"Type to filter features by name",args:{args:[""],inputIdx:0},buttonOptions:{text:"Search",icon:Pt.XN.Info,type:Pt.vX.Sapphire}},U=null!==(k=window.debugMenu.growthbookFilter)&&void 0!==k?k:"";return[B,...(0,be.y8)().filter((k=>k.toLowerCase().includes(U.toLowerCase()))).map((k=>({type:jt.Button,command:Ht.OpenWindow,args:{args:[`https://growthbook.prv.prodigygame.com/features/${k}`]},title:k,description:"Click to open Growthbook page",buttonOptions:{text:"",icon:Pt.XN.Right,type:Pt.vX.Sapphire},feature:{key:k}})))]}checkForDisabledCommands(k){k.forEach((k=>{"type"in k&&k.feature&&!(0,Bt._)(k.feature)&&(k.type=jt.Button,k.description=`Feature disabled: (${k.feature.key}). Click to open GrowthBook.`,k.buttonOptions={text:"",icon:Pt.XN.Right,type:Pt.vX.Sapphire},k.command=Ht.OpenWindow,k.args={args:[`https://growthbook.prv.prodigygame.com/features/${k.feature.key}`]}),"category"in k&&Array.isArray(k.data)&&this.checkForDisabledCommands(k.data)}))}filterEmptyCategories(k){return k.filter((k=>"type"in k||!(!("category"in k)||!Array.isArray(k.data))&&(k.data=this.filterEmptyCategories(k.data),k.data.length>0)))}getGeneralCommands(){return[...Zt]}getFeatureCommands(){return[{category:$t.GrowthbookFeatures,data:ge.getGrowthbookFeatures()},...te]}getWarpCommands(){var k;const B=ne,U=[],F=null===(k=tt.q.instance)||void 0===k?void 0:k.prodigy.world;return F&&U.push({category:$t.RegularZones,data:this.getZonesCategoryData(F,(k=>k.difficultyMode===fe.i.Regular))},{category:$t.HardZones,data:this.getZonesCategoryData(F,(k=>k.difficultyMode===fe.i.Hard))},{category:$t.ExpertZones,data:this.getZonesCategoryData(F,(k=>k.difficultyMode===fe.i.Expert))}),[...U,...B]}getBattleCommands(){const k=oe;let B;const U=j.wa5.getActiveScene().container.get("BattleController");return B=U?[...se,this.getBattleUnitCommands(U)]:ie,[...B,...k]}getBattleUnitCommands(k){const B=k.getUnits().map((k=>{const B=xt.$.capitalizeFirstLetter(k.data.teamId),U=k.data.unitId,F=k.name,G=`${B} - ${k.data.slot}`,j=[];return ue.forEach((k=>{const B=JSON.parse(xt.$.replaceAll(JSON.stringify(k),le,U)),F=k.command;F&&(B.initialValue=()=>pe.getOverrideValue(U,F)),j.push(B)})),{category:G,data:j,description:`Debug commands for "${F}"`}}));return{category:$t.BattleUnits,data:B,description:"Commands for individual battle units"}}getMapInfo(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,$,H,V,W;const q=[];return q.push({type:jt.InfoWithCopyButton,command:void 0,title:"Current Map",description:tt.q.instance.prodigy.world.getCurrentMap()},{type:jt.Info,command:void 0,title:"Multiplayer room",description:null!==(B=null===(k=j.wa5.getActiveScene().container.get("c5f-aceb"))||void 0===k?void 0:k.multiplayerRoomID)&&void 0!==B?B:"none"},{type:jt.InfoWithCopyButton,command:void 0,title:"Character ID",description:null!==(G=null===(F=null===(U=tt.q.instance.prodigy.gameContainer.get("e20-0fb0"))||void 0===U?void 0:U.player)||void 0===F?void 0:F.getID().toString())&&void 0!==G?G:"No ID found"},{type:jt.Info,command:null,title:"Scene Type",description:(null===($=j.wa5.getActiveScene())||void 0===$?void 0:$.container.get("IS_PREFAB_MAP"))?"Prefab":"Legacy"},{type:jt.Info,command:null,title:"Current Quest",description:null!==(W=yield null===(V=null===(H=j.wa5.getActiveScene())||void 0===H?void 0:H.container.get("a78-11c7"))||void 0===V?void 0:V.getCurrentQuestIDAndSequence())&&void 0!==W?W:"None Found"}),q}))}getZonesCategoryData(k,B=(()=>!0)){return Object.values(k.zones).filter((k=>!ve.includes(k.ID))).filter(B).map((B=>({category:`${B.name} ${B.difficultyMode!==fe.i.Regular?B.difficultyMode:""}`,data:this.getMapCommandsData(B,k)})))}getMapCommandsData(k,B){var U,F;const G=k.ID;return G===Ft.A_.DARKTOWER?null!==(F=null===(U=te.find((k=>k.category===$t.DarkTower)))||void 0===U?void 0:U.data)&&void 0!==F?F:[]:Object.entries(k.maps).map((([k,U])=>{let F=`Go to map ${U.zoneName}`,j=k;return U.zoneName===B.getCurrentMap()&&(j+=" (current)",F="Refresh current map"),{type:jt.Button,command:Ht.Tp,title:j,description:F,args:{args:[`${G}-${k}`]},closeMenu:!0}}))}}var me;let ye=me=class extends j.uAl{constructor(){super(...arguments),this._debugMenuDataProvider=new ge,this._categoryTabComponents=[],this._categoryBreadcrumbs=[]}postCreate(){super.postCreate(),window.debugMenu.goToCategory=(k,B)=>{this.openCategory(k,B)},window.debugMenu.reloadView=k=>{this._scrollViewParent.findComponent(Te).clearCommands(),this.loadCategory(me.LastOpenedCategory,k).catch(j.RQr.createHandler("Error trying to open a prefab in DebugMenu"))},this.openInitialCategory()}static reloadViewWithNewData(k){window.debugMenu.reloadView(k)}createCategoryTabs(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=Rt.l.DebugMenuCategoryTab;for(let k=this._categoryTabParent.children.length-1;k>=0;k--)this._categoryTabParent.children[k].destroy();this._categoryTabComponents.length=0;for(let U=0;Uk.category===me.LastOpenedCategory));-1===B&&(B=0);j.wa5.getActiveScene().container.get("BattleController")&&(B=k.findIndex((k=>k.category===$t.Battle))),this.openCategory(k[B].category,k[B].data)}))}openCategory(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){this.resetCategoryTabs();const U=this._categoryBreadcrumbs.length,F=this._categoryBreadcrumbs.findIndex((B=>B.category===k));F>=0&&this._categoryBreadcrumbs.splice(F);const G=yield this._debugMenuDataProvider.getRootCategories();if(G.some((B=>B.category===k))&&(this._categoryBreadcrumbs.length=0),this._categoryBreadcrumbs.push({category:k,data:B}),U!==this._categoryBreadcrumbs.length&&this.createCategoryTabs(this._categoryBreadcrumbs.length>1?this._categoryBreadcrumbs:G).then((()=>{var B;return null===(B=this._categoryTabComponents.find((B=>B.category===k)))||void 0===B?void 0:B.setSelected(!0)})).catch(j.RQr.createHandler("Error trying to create the category tabs")),!j.Aq$.isDefined(this._currentCategoryObj)||this._currentCategory!==k){if(this._currentCategoryObj){this._currentCategoryObj.findComponent(Te).clearCommands()}this.loadCategory(k,B).catch(j.RQr.createHandler("Error trying to open a prefab in DebugMenu"))}}))}resetCategoryTabs(){for(const k of this._categoryTabComponents)k.setSelected(!1)}loadCategory(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=this._scrollViewParent,F=U.findComponent(Te);yield F.populateCategory(k,B),U.transform.setPosition(0,0),this._currentCategory=k,me.LastOpenedCategory=k,this._currentCategoryObj=U}))}closeDebugMenu(){me.runCloseDebugMenu()}static runCloseDebugMenu(){}};var _e;(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ye.prototype,"_scrollViewParent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ye.prototype,"_categoryTabParent",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],ye.prototype,"_prefabLoader",void 0),ye=me=(0,G.Cg)([(0,j.EVk)("DebugMenuController",W.Y.debug)],ye);let Ee=_e=class extends j.uAl{constructor(){super(...arguments),this._inputParams=[],this._defaultValue=[]}get getInputParams(){return this._inputParams}destroy(){this.destroyDatalist(),this.destroyInputField(),super.destroy()}destroyDatalist(){this._datalistInputParam&&this._datalistInputListener&&(this._datalistInputParam.htmlInputElement.removeEventListener("input",this._datalistInputListener),this._datalistInputParam.htmlInputElement.removeAttribute("list")),this._datalist&&this._datalist.remove(),this._datalist=null,this._datalistInputListener=null,this._datalistInputParam=null}setParent(k){this._parent=k}setInfo(k){var B,U,F;if(this._info=k,this._commandDisabledBackground.active=!1,k.type===jt.Info||k.type===jt.InfoWithCopyButton)return void this.setInfoOnlyDebugFields(k);_e.isButtonArgs(k.args)&&k.args.useArgsValueAsDefault&&(this._defaultValue=dt().cloneDeep(k.args.args)),this.setTitle(k.title),this.setDescription(k.description),this.updateButton(null===(B=k.buttonOptions)||void 0===B?void 0:B.text,null===(U=k.buttonOptions)||void 0===U?void 0:U.type,null===(F=k.buttonOptions)||void 0===F?void 0:F.icon),j.Aq$.isDefined(k.initialValue)&&this.updateState("function"==typeof k.initialValue?k.initialValue():k.initialValue);const G=this.getFunc(this._info.command);G?this.setFunction(G,this._info.args):this.setValid(!1),k.feature&&!(0,Bt._)(k.feature)&&(this._commandDisabledBackground.active=!0)}setInfoOnlyDebugFields(k){this.setTitle(k.title),this.setDescription(k.description),this._commandButton&&(k.type===jt.InfoWithCopyButton?(this._commandButton.onClick.add((()=>{const B=k.description;navigator.clipboard.writeText(B).catch((k=>{j.VyI.log(`Failed to copy debug text: ${String(k)}`,j.$bb.Error)}))})),this.updateButton("Copy",Pt.vX.Sapphire,Pt.XN.Info)):this._commandButton.GameObject.active=!1),this._commandToggle&&(this._commandToggle.GameObject.active=!1),this._inputParams.forEach((k=>{k.GameObject.active=!1}))}getFunc(k){return null==k?void 0:k.split(".").reduce(((k,B)=>k&&k[B]),window)}setTitle(k){this._commandTitle.text=k}setDescription(k){this._commandDescription.text=k}updateButton(k,B,U){j.Aq$.isDefined(this._commandButton)&&(this._commandButton.text=null!=k?k:"Select",this._commandButton.iconPosition=Ut.d.NONE,U&&(this._commandButton.iconPosition=Ut.d.RIGHT,this._commandButton.icon=U),this._commandButton.type=null!=B?B:Pt.vX.Emerald,this._commandButton.regenerateButton())}setFunction(k,B){this._commandButton?(this.setButton(k,B),this._functionValid=!0,0!==this._inputParams.length&&this.setUpInputField()):this._commandToggle&&(this.setToggle(k,B),this._functionValid=!0)}setButton(k,B){this._commandButton.onClick.add((()=>{B?k(...(null==B?void 0:B.args)||[]):k()}))}setToggle(k,B){this._info.title in _e.DebugState&&this._commandToggle.setSelected(_e.DebugState[this._info.title]),B?(this._commandToggle.onSelected.add(k,void 0,void 0,...B.selectedArgs),this._commandToggle.onUnselected.add(k,void 0,void 0,...B.unselectedArgs)):(this._commandToggle.onSelected.add(k),this._commandToggle.onUnselected.add(k))}setValid(k){this._functionValid=k}getNumberOfActiveInputs(){const k=this._info.args;if(!j.Aq$.isDefined(null==k?void 0:k.inputIdx))return 0;return Lt.l.guaranteeArray(k.inputIdx).length}setUpInputField(){const k=this.getNumberOfActiveInputs();this._inputParams.forEach(((B,U)=>{if(U>=k)return void(B.GameObject.active=!1);const F=k-U-1,G=this._info.title+F;G in _e.DebugState&&(B.text=_e.DebugState[G]),B.GameObject.active=!0,B.enablePerKeyEvents(!0),B.onTextChanged.add(this.readInputField,this,void 0,B,F),B.onClear.add(this.readInputField,this,void 0,B,F),this.readInputField(B.text,B,F),this._info.type===jt.DropdownInput&&0===F&&j.Aq$.isDefined(this._info.options)&&this.setUpDatalist(B,F)}))}setUpDatalist(k,B){var U;const F=this._info.options,G="function"==typeof F?F():F;if(!G||0===G.length)return;const j=document.createElement("datalist"),$=this._info.title.replace(/[^a-z0-9]/gi,"-").toLowerCase();j.id=`debug-dropdown-${$}-${B}`,G.forEach((k=>{const B=document.createElement("option");B.value=k.value,B.textContent=k.label,j.appendChild(B)}));(null!==(U=document.getElementById("external-ui"))&&void 0!==U?U:document.body).appendChild(j);const H=k.htmlInputElement;H.setAttribute("list",j.id),this._datalistInputListener=()=>{this.readInputField(H.value,k,B)},H.addEventListener("input",this._datalistInputListener),this._datalist=j,this._datalistInputParam=k}readInputField(k,B,U){var F;const G=k,$=this._info.args;let H;if(!j.Aq$.isDefined($.inputIdx)||"number"!=typeof $.inputIdx&&!Array.isArray($.inputIdx))return;H="number"==typeof $.inputIdx?$.inputIdx:$.inputIdx[U];const V=_e.isInputFieldValueValid(this._info,G,H);this._inputValid=this.isWarp()?this.isWarpValid(V.output):V.valid;const W=!this._inputValid&&""===G&&(null===(F=this._defaultValue)||void 0===F?void 0:F.length)>0;W&&(B.htmlInputElement.placeholder=this._defaultValue[H],this._inputValid=this.isWarp()?this.isWarpValid(this._defaultValue[H]):this._inputValid),this._commandButton.inputEnabled=this._inputValid||W,this._inputValid&&!W&&(this.updateState(V.output,U),$.args[H]=V.output)}static isInputFieldValueValid(k,B,U){const F=k.args;if("string"==typeof F.args[U])return{valid:!0,output:B};if("number"==typeof F.args[U]){const k=parseFloat(B);if(!isNaN(k))return{valid:!0,output:k}}else if(Array.isArray(F.args[U])&&""!==B){const k=B.split(",");if("number"==typeof F.args[U][0]){if(k.some((k=>""===k)))return{valid:!1,output:null};const B=k.map((k=>k.trim())).map(Number);return B.some(isNaN)?{valid:!1,output:null}:{valid:!0,output:B}}if("string"==typeof F.args[U][0]){return{valid:!0,output:k.map((k=>k))}}}return{valid:!1,output:null}}isValid(){const k=this._info.type===jt.InputButton||this._info.type===jt.DropdownInput;return this._functionValid&&(!k||this._inputValid)}isWarp(){return this._parent&&this._parent.getCategory()===$t.Warps&&this._info.command!==Ht.WarpTour}isWarpValid(k){return k===Ft.A_.HOUSE||tt.q.instance.prodigy.world.isValidLocation(k)}destroyInputField(){this._inputParams&&this._inputParams.forEach((k=>{k.destroy()}))}checkOptionalProps(){this._info.disableMenuToggle&&(ye._allowKeystrokeToOpenDebugMenu=!1),this._info.closeMenu&&ye.runCloseDebugMenu()}logPress(){this.isValid()?j.VyI.log(`PRESSED - Running command assigned to ${this._info.title}`,j.$bb.Info):this._functionValid?this._inputValid||j.VyI.log(`${this._info.title} has invalid inputs`,j.$bb.Error):j.VyI.log(`${this._info.title} has no function assigned`,j.$bb.Error),this.isValid()?this.checkOptionalProps():this._defaultValue.length>0&&(j.VyI.log(`${this._info.title} using default values`,j.$bb.Info),this.checkOptionalProps())}logSelected(){this.isValid()?(j.VyI.log(`SELECTED - Running command assigned to ${this._info.title}`,j.$bb.Info),this.updateState(!0)):j.VyI.log(`${this._info.title} has no function assigned`,j.$bb.Error),this.isValid()&&this.checkOptionalProps()}logUnselected(){this.isValid()?(j.VyI.log(`UNSELECTED - Running command assigned to ${this._info.title}`,j.$bb.Info),this.updateState(!1)):j.VyI.log(`${this._info.title} has no function assigned`,j.$bb.Error),this.isValid()&&this.checkOptionalProps()}updateState(k,B=-1){var U;this._commandButton&&(null===(U=this._info.args)||void 0===U?void 0:U.shouldNotPersistInput)||(_e.DebugState[this._info.title+(-1!==B?B:"")]=k)}static isButtonArgs(k){return"object"==typeof k&&null!==k&&Array.isArray(k.args)&&("number"==typeof k.inputIdx||Array.isArray(k.inputIdx))}};var we;Ee.DebugState={},(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ee.prototype,"_commandTitle",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ee.prototype,"_commandDescription",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Ee.prototype,"_commandButton",void 0),(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],Ee.prototype,"_commandToggle",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ee.prototype,"_commandDisabledBackground",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(kt.S),(0,G.Sn)("design:type",Array)],Ee.prototype,"_inputParams",void 0),Ee=_e=(0,G.Cg)([(0,j.EVk)("DebugMenuCommand",W.Y.debug)],Ee);let Te=we=class extends j.uAl{constructor(){super(...arguments),this._commandComponents=[]}getCategory(){return this._category}populateCategory(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){this._category=k,this._commands=B,yield this.createCommandButtons(),this._scrollView.setScrollPosition(0)}))}clearCommands(){for(let k=this._buttonParent.children.length;k--;)this._buttonParent.children[k].destroy();this._commandComponents=[]}destroyInputFields(){for(let k=this._commandComponents.length;k--;)this._commandComponents[k].destroyInputField()}createCommandButtons(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=Rt.l.DebugMenuCommand,B=Rt.l.DebugMenuToggle,U=Rt.l.DebugMenuInputField;let F=0;for(const j of this._commands){const G=yield this.createCommandButton(j,k,B,U);this._commandComponents.push(G),G.GameObject.transform.setPosition(0,100*F+50),F++}const G=this._buttonParent.findComponent(j.XVE);G?G.setSizeDelta(G.sizeDelta.width,100*F):j.VyI.log("RectTransform was not found on the debug category button parent!",j.$bb.Error)}))}createCommandButton(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){var G;let j,$=k;switch("category"in k&&($={type:jt.Button,args:{args:[k.category,k.data]},title:xt.$.toTitleCase(k.category),description:null!==(G=k.description)&&void 0!==G?G:`Show ${xt.$.toTitleCase(k.category)} commands`,command:Ht.DebugMenuGoToCategory,buttonOptions:{text:"Open",type:Pt.vX.Sapphire}}),$.type){default:case jt.Button:j=B;break;case jt.Toggle:j=U;break;case jt.InputButton:case jt.DropdownInput:j=we.inputFieldValid($)?F:B}const H=(yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,j,{},this._buttonParent)).findComponent(Ee);return H.setParent(this),H.setInfo($),H}))}static inputFieldValid(k){const B=k.args;if(j.Aq$.isDefined(null==B?void 0:B.inputIdx)){const k=Lt.l.guaranteeArray(B.inputIdx);if(k.length>0&&k.every((k=>Number.isInteger(k)&&k>=0&&k0&&this._tween.to({y:0},this._bottomDelayMS),this._tween.to({y:this._distance},.5*this._duration,G),(null!==(B=this._topDelayMS)&&void 0!==B?B:0)>0&&this._tween.to({y:this._distance},this._topDelayMS),this._tween.to({y:0},.5*this._duration,G),this._tween.loop(!0).start(),this._tween.onUpdate.add((()=>{this.GameObject.legacyTransform?this.GameObject.legacyTransform.y=this._initialY+U.y:F.setPosition(F.localPosition.x,this._initialY+U.y)})),this.IsActiveInHierarchy||this._tween.pause()}onEnable(){var k;null===(k=this._tween)||void 0===k||k.resume(),super.onEnable()}onDisable(){var k;null===(k=this._tween)||void 0===k||k.pause(),super.onDisable()}updatePosition(k){this._initialY=k.y,this.GameObject.legacyTransform?(this.GameObject.legacyTransform.x=k.x,this.GameObject.legacyTransform.y=k.y):this.GameObject.transform.setPosition(k.x,k.y)}destroy(){tt.q.instance.game.tweens.remove(this._tween),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ie.prototype,"_distance",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ie.prototype,"_duration",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ie.prototype,"_topDelayMS",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ie.prototype,"_bottomDelayMS",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ie.prototype,"_easingCategory",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ie.prototype,"_easingType",void 0),Ie=(0,G.Cg)([(0,j.EVk)("BobTransform",W.Y.motion)],Ie);U(5885);let De=class extends j.uAl{loadItemRewards(){}getItem(){}removeItem(k,B){}};De=(0,G.Cg)([(0,j.EVk)("BountyRunBossItemProvider")],De);let Re=class extends j.uAl{restartDungeon(){this.completeRun(),this._dungeonState.startDungeonRun(),this._dungeonState.setCurrentMap(this._startingMap),tt.q.instance.prodigy.world.it(this._startingMap)}leaveDungeon(){this.completeRun(),tt.q.instance.prodigy.world.it(this._hubMap)}completeRun(){this._dungeonState.setCompletedRuns(this._dungeonState.getCompletedRuns()+1),this._dungeonState.resetRunData()}};(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],Re.prototype,"_dungeonState",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Re.prototype,"_hubMap",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Re.prototype,"_startingMap",void 0),Re=(0,G.Cg)([(0,j.EVk)("CompleteDungeonUI",W.Y.adventureUi)],Re);let Pe=class extends j.uAl{continueDungeonRun(){tt.q.instance.prodigy.world.it(this._dungeonState.getCurrentMap())}};(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],Pe.prototype,"_dungeonState",void 0),Pe=(0,G.Cg)([(0,j.EVk)("ContinueDungeonRun",W.Y.adventure)],Pe);var Me=U(10044);let Ne=class extends j.uAl{constructor(){super(...arguments),this._onPlayerSpawned=new j.HN0}spawnPlayer(){var k;let B=0,U=0,F=1;const G=this._dungeonState.getCheckpointLocation();if(this._injectedSpawnPosition)B=this._injectedSpawnPosition.x,U=this._injectedSpawnPosition.y,F=null!==(k=this._injectedSpawnDirection)&&void 0!==k?k:1;else if(G)B=G.x,U=G.y,F=this._dungeonState.getFacingDirection();else{const k=this.GameObject.transform,G=k.worldPosition;B=G.x,U=G.y,F=k.localScale.x}j.i7d.main.GameObject.transform.setPosition(B,U),this._player.transform.setPosition(B,U),this._player.transform.setScale(F,1),this._player.findComponentInChildren(j.mZY)._loadedBounds={left:B,right:B,top:U,bottom:U},this._onPlayerSpawned.dispatch()}destroy(){this._onPlayerSpawned.dispose(),super.destroy()}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ne.prototype,"_player",void 0),(0,G.Cg)([(0,j.Cdj)("InitData-spawnPosition"),(0,G.Sn)("design:type",j.I9Y)],Ne.prototype,"_injectedSpawnPosition",void 0),(0,G.Cg)([(0,j.Cdj)("InitData-spawnFacingDirection"),(0,G.Sn)("design:type",Number)],Ne.prototype,"_injectedSpawnDirection",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],Ne.prototype,"_dungeonState",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ne.prototype,"_onPlayerSpawned",void 0),Ne=(0,G.Cg)([(0,j.EVk)("DungeonPlayerSpawner")],Ne);let xe=class extends j.uAl{getSpawnData(){return null}};xe=(0,G.Cg)([(0,j.EVk)("SpawnDataProvider (abstract)")],xe);let Le=class extends xe{getSpawnData(){const k=this._dungeonState.getCheckpointLocation();return k?{location:new j.I9Y(k.x,k.y),facingDirection:this._dungeonState.getFacingDirection()}:null}};(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],Le.prototype,"_dungeonState",void 0),Le=(0,G.Cg)([(0,j.EVk)("DungeonSpawnDataProvider",W.Y.mapSpawning)],Le);let ke=class extends j.uAl{enter(){this._dungeonState.resetRunData(),this._dungeonState.startDungeonRun(),this._dungeonState.setCurrentMap(this._startingMap),tt.q.instance.prodigy.world.it(this._startingMap)}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ke.prototype,"_startingMap",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],ke.prototype,"_dungeonState",void 0),ke=(0,G.Cg)([(0,j.EVk)("EnterDungeon",W.Y.adventure)],ke);var Be=U(31029);let Ue=class extends Be.u{};Ue=(0,G.Cg)([(0,j.EVk)("HealStone")],Ue);var Fe=U(35084);let Ge=class extends j.uAl{constructor(){super(...arguments),this._inputPaddingOnHover=new j.I9Y(5,5),this._applied=!1}create(){super.create(),this._hoverInput&&(this._hoverInput.onHoverEnter.add(this.applyOffset,this),this._hoverInput.onHoverExit.add(this.removeOffset,this))}destroy(){this._hoverInput&&(this._hoverInput.onHoverEnter.remove(this.applyOffset,this),this._hoverInput.onHoverExit.remove(this.removeOffset,this)),super.destroy()}onDisable(){super.onDisable(),this.removeOffset()}applyOffset(){if(this._applied)return;this._hoverInput.setOffset(-this._offset.x-this._inputPaddingOnHover.x,-this._offset.y-this._inputPaddingOnHover.y,!1),this._hoverInput.setSize(this._hoverInput.width+2*this._inputPaddingOnHover.x,this._hoverInput.height+2*this._inputPaddingOnHover.y);const k=this.GameObject.transform.localPosition;this.GameObject.transform.setPosition(k.x+this._offset.x,k.y+this._offset.y),this._applied=!0}removeOffset(){if(!this._applied)return;this._hoverInput.setOffset(0,0,!1),this._hoverInput.setSize(this._hoverInput.width-2*this._inputPaddingOnHover.x,this._hoverInput.height-2*this._inputPaddingOnHover.x);const k=this.GameObject.transform.localPosition;this.GameObject.transform.setPosition(k.x-this._offset.x,k.y-this._offset.y),this._applied=!1}};(0,G.Cg)([(0,j.MnK)(Fe.n),(0,G.Sn)("design:type",Fe.n)],Ge.prototype,"_hoverInput",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],Ge.prototype,"_offset",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],Ge.prototype,"_inputPaddingOnHover",void 0),Ge=(0,G.Cg)([(0,j.EVk)("HoverOffset",W.Y.ui)],Ge);var je,$e=U(68910),He=U(92150),Ve=U(88022);let We=je=class extends j.y4o{constructor(){super(...arguments),this.onStart=new j.HN0,this.onEnd=new j.HN0}create(){super.create(),this.setRootContainer(this._container=new $e.Container)}destroy(){this.onStart.dispose(),this.onEnd.dispose(),this._container.destroy(),super.destroy()}start(){this._topBox?j.VyI.log("Attempted to start a cutscene when one is already active",j.$bb.Warning):(this.showLetterbox(),this.onStart.dispatch())}end(){this._topBox?(this.hideLetterbox(),this.onEnd.dispatch()):j.VyI.log("Attempted to end a cutscene when none is active",j.$bb.Warning)}showLetterbox(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;const U=tt.q.instance.game,F=U.width,G=U.height,$=U.state.getCurrentState();null===(B=null===(k=$.getParentalConsentBanner)||void 0===k?void 0:k.call($))||void 0===B||B.then((k=>{k&&(k.active=!1)})),this._topBox=new He._(U,0,-je.BOX_HEIGHT,Ve._.Tiled_sprites_json,"overlay-small"),this._topBox.width=F,this._topBox.height=je.BOX_HEIGHT,this._container.addChild(this._topBox),this._bottomBox=new He._(U,0,G,Ve._.Tiled_sprites_json,"overlay-small"),this._bottomBox.width=F,this._bottomBox.height=je.BOX_HEIGHT,this._container.addChild(this._bottomBox);const H=U.add.tween(this._topBox,this).to({y:0},je.TWEEN_DURATION_MS,j.GS3.Quadratic.Out).start();return U.add.tween(this._bottomBox,this).to({y:G-je.BOX_HEIGHT},je.TWEEN_DURATION_MS,j.GS3.Quadratic.Out).start(),new Promise((k=>{H.onTweenComplete.add(k)}))}))}hideLetterbox(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;const U=tt.q.instance.game,F=U.state.getCurrentState();null===(B=null===(k=F.getParentalConsentBanner)||void 0===k?void 0:k.call(F))||void 0===B||B.then((k=>{k&&(k.active=!0)}));const G=U.add.tween(this._topBox,this).to({y:-je.BOX_HEIGHT},je.TWEEN_DURATION_MS,j.GS3.Quadratic.Out).start();return U.add.tween(this._bottomBox,this).to({y:U.height},je.TWEEN_DURATION_MS,j.GS3.Quadratic.Out).start(),new Promise((k=>{G.onTweenComplete.add((()=>{this._topBox.destroy(),this._bottomBox.destroy(),this._topBox=this._bottomBox=null,k()}))}))}))}};We.BOX_HEIGHT=50,We.TWEEN_DURATION_MS=1e3,(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],We.prototype,"onStart",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],We.prototype,"onEnd",void 0),We=je=(0,G.Cg)([(0,j.EVk)("Letterbox",W.Y.adventure)],We);let qe=class extends j.uAl{constructor(){super(...arguments),this._shouldCheckMembership=!0,this.membershipSuppressOn=new j.HN0,this.membershipSuppressOff=new j.HN0,this._runOnLoad=!1,this.shouldSuppressAd=!1}create(){super.create(),this.checkForMemberSuppression(),this._runOnLoad&&this.run()}run(){this.checkForMemberSuppression(),this.shouldSuppressAd?this.membershipSuppressOn.dispatch():this.membershipSuppressOff.dispatch()}checkForMemberSuppression(){this.shouldSuppressAd=Qt.J.shouldSuppressAd(this._loggedInPlayer.player,this._shouldCheckMembership)}destroy(){this.membershipSuppressOn.dispose(),this.membershipSuppressOff.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],qe.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],qe.prototype,"_shouldCheckMembership",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],qe.prototype,"membershipSuppressOn",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],qe.prototype,"membershipSuppressOff",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],qe.prototype,"_runOnLoad",void 0),qe=(0,G.Cg)([(0,j.EVk)("MembershipSuppressionGuard",W.Y.membership)],qe);var Ke=U(34603),ze=U(51972);let Ye=class extends j.uAl{constructor(){super(...arguments),this._tooltipPositionX=0,this._tooltipPositionY=0,this._tooltipPositionArrow=0}postCreate(){super.postCreate(),this._membershipSuppression&&this.updateLockState(this._membershipSuppression.shouldSuppressAd)}updateLockState(k){this._lockImage.GameObject.active=k,this._sparkles&&k&&(this._sparkles.active=!k),this._mainImage.sprite.tint=k?3355443:16777215}run(){tt.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:this._tooltipPositionX,yPosition:this._tooltipPositionY,arrowXRelPos:this._tooltipPositionArrow,arrowDirection:ze.i.DOWN})}};(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],Ye.prototype,"_mainImage",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],Ye.prototype,"_lockImage",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ye.prototype,"_sparkles",void 0),(0,G.Cg)([(0,j.MnK)(qe),(0,G.Sn)("design:type",qe)],Ye.prototype,"_membershipSuppression",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ye.prototype,"_tooltipPositionX",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ye.prototype,"_tooltipPositionY",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ye.prototype,"_tooltipPositionArrow",void 0),Ye=(0,G.Cg)([(0,j.EVk)("LockInteractable",W.Y.adventure)],Ye);var Qe=U(76945);class Xe{static fromRange(k,B){return class{static isDefined(k){return null!=k}static valueIsRange(k){return null!==k&&"object"==typeof k&&"min"in k&&"max"in k}static valueIsWeightedTable(k){return Array.isArray(k)&&k.length>0&&"weight"in k[0]&&"value"in k[0]}}.valueIsRange(k)?Math.floor(Math.random()*(k.max-k.min)+k.min):Math.floor(Math.random()*(null!=B?B:0-k)+k)}}class Ze{static shuffle(k,B=!0){const U=ct.shuffle(Array.from(k));if(!B&&k.length>1&&U.length>1&&U[0]===k[k.length-1]){const k=U.shift(),B=Math.floor(Math.random()*(U.length-1)+1);U.splice(B,0,k)}return U}static selectElement(k){return k[Xe.fromRange(0,k.length)]}static selectElements(k,B){return ct.sampleSize(B,k)}static selectFromWeightedTable(k){return Ze.selectByWeight(k,(k=>k.weight)).value}static selectByWeight(k,B){const U=k.map(B),F=Math.random()*ct.sum(U);let G=0;return k[ct.findIndex(U,(k=>(G+=k,F({ID:k.ID,type:k.type})));return k.push({ID:U.fallback.ID,type:U.fallback.type}),k}const F=this.removeOwnedItems(U.items,U.fallback),G=[];for(let $=0;$k.weight));k!==U.fallback&&(F.splice(F.indexOf(k),1),U.fallback.weight+=k.weight),j.Aq$.isDefined(k.N)&&"number"!=typeof k.N?G.push({ID:k.ID,type:k.type,N:Qe.o.integerInRange(k.N.min,k.N.max+1)}):G.push({ID:k.ID,type:k.type,N:k.N})}return G}removeOwnedItems(k,B){const U=k.length,F=[];B.weight=0;for(let G=0;G0&&F.push(B),F}};(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],Je.prototype,"_tables",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Je.prototype,"_loggedInPlayer",void 0),Je=(0,G.Cg)([(0,j.EVk)("LootTables",W.Y.root)],Je);let ti=class extends j.JTX{getItems(){const k=Qe.o.integerInRange(this._minItems,this._maxItems+1);return this.tables.getRandomItems(this.tableName,k)}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ti.prototype,"tableName",void 0),(0,G.Cg)([(0,j.fFd)("LootTables"),(0,G.Sn)("design:type",Je)],ti.prototype,"tables",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],ti.prototype,"_minItems",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],ti.prototype,"_maxItems",void 0),ti=(0,G.Cg)([(0,j.EVk)("LootProvider",W.Y.root)],ti);let ei=class extends j.uAl{saveCheckpoint(){}};(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],ei.prototype,"_checkpointPosition",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],ei.prototype,"_mainPlayer",void 0),ei=(0,G.Cg)([(0,j.EVk)("CheckpointBase (abstract)")],ei);let ii=class extends ei{saveCheckpoint(){var k;this._index>this._dungeonState.getCheckpointIndex()&&this._dungeonState.setCheckpoint(this._index,null!==(k=this._checkpointPosition.worldPosition)&&void 0!==k?k:this.GameObject.transform.worldPosition,this._mainPlayer.transform.localScale.x)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],ii.prototype,"_index",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],ii.prototype,"_dungeonState",void 0),ii=(0,G.Cg)([(0,j.EVk)("MapCheckpoint",W.Y.adventure)],ii);let si=class extends j.uAl{constructor(){super(...arguments),this._onMapObjectComplete=new j.HN0,this._onMapObjectIncomplete=new j.HN0}postCreate(){super.postCreate(),this._dungeonState&&(this.isCompleted()?this._onMapObjectComplete.dispatch():this._onMapObjectIncomplete.dispatch())}destroy(){this._onMapObjectComplete.dispose(),this._onMapObjectIncomplete.dispose(),super.destroy()}completeMapObject(){this._dungeonState.setMapObjectCompleted(this.mapObjectID,!0),this._onMapObjectComplete.dispatch()}isCompleted(){return this._dungeonState.isMapObjectCompleted(this.mapObjectID)}};(0,G.Cg)([(0,j.Mts)(),(0,G.Sn)("design:type",Number)],si.prototype,"mapObjectID",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],si.prototype,"_dungeonState",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],si.prototype,"_onMapObjectComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],si.prototype,"_onMapObjectIncomplete",void 0),si=(0,G.Cg)([(0,j.EVk)("MapSaveCompletionState",W.Y.adventure)],si);var ni=U(48975),ai=U(79421);let ri=class extends j.y4o{constructor(){super(...arguments),this.minerAtlas=Ve._.Npc_sprite_gnome_json,this._npcMiner=null,this._minerSize=new j.or0}create(){super.create();const k=tt.q.instance.game;this._npcMiner=new ai.N(k,null,null,null,0,0,new ni.s(k),9,6,null),this._npcMiner.stand(),this._minerSize.setTo(this._npcMiner.width,this._npcMiner.height),this.setRootContainer(this._npcMiner)}destroy(){this._npcMiner.destroy(),super.destroy()}getDimensions(){return this._minerSize}};(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],ri.prototype,"minerAtlas",void 0),ri=(0,G.Cg)([(0,j.EVk)("MinerNPC",W.Y.object)],ri);var oi=U(28402),hi=U(54336);let ci=class extends j.uAl{constructor(){super(...arguments),this.monsterIDs=[1],this._battleDifficulty=1,this._battleScreen="battle-shiverchill-outside",this._saveStateComponent=null,this._battleStars=null}create(){super.create()}startBattle(){const k=tt.q.instance.prodigy,B=k.world.getCurrentMap(),U=new j.I9Y;U.copyFrom(this._respawnPosition.worldPosition);const F=this._dungeonState,G=this._mainPlayer.transform.localScale.x,$=this._saveStateComponent.mapObjectID;k.battle.battleStats.type="DungeonMonsterBattle",k.battle.start({screen:this._battleScreen,encounter:this.monsterIDs.map((k=>({ID:k,level:this._dungeonState.getLevel()}))),difficulty:this._battleDifficulty,starOverride:this._battleStars,disableHealing:!0},(()=>{k.world.it(B)}),(()=>{F.setMapObjectCompleted($,!0),k.world.it(B,U.x,U.y,{playerDirection:G})}),null,this._loggedInPlayer.player.data.zone)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],ci.prototype,"_battleDifficulty",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ci.prototype,"_battleScreen",void 0),(0,G.Cg)([(0,j.MnK)(si),(0,G.Sn)("design:type",si)],ci.prototype,"_saveStateComponent",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],ci.prototype,"_dungeonState",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],ci.prototype,"_respawnPosition",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ci.prototype,"_allowCatching",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],ci.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],ci.prototype,"_battleStars",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],ci.prototype,"_loggedInPlayer",void 0),ci=(0,G.Cg)([(0,j.EVk)("StartDungeonBattle",W.Y.adventure)],ci);let di=class extends j.uAl{constructor(){super(...arguments),this._monsterID=null,this._spine=null,this._startBattle=null}create(){super.create();const k=Yt.t.getItem("pet",this._monsterID).metadata;this._spine.setAsset(`spine-${k.assets.default.ID}`),this._startBattle.monsterIDs=[this._monsterID]}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],di.prototype,"_monsterID",void 0),(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],di.prototype,"_spine",void 0),(0,G.Cg)([(0,j.MnK)(ci),(0,G.Sn)("design:type",ci)],di.prototype,"_startBattle",void 0),di=(0,G.Cg)([(0,j.EVk)("MonsterEncounter",W.Y.adventure)],di);var li=U(65240),ui=U(41674),fi=U(65050),bi=U(67665),pi=U(51742);class vi extends Be.u{constructor(){super(...arguments),this._containerType=ui.ZF.WorldChest,this._instanceType=fi.N.OpenWorld,this.openSoundEffect=pi.c.Sfx_ui,this.revealItemSoundEffect=pi.c.Sfx_world}showOpenChest(){this._chestImage.setFrameName(this._chestOpenFrameName)}}(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],vi.prototype,"_segment",void 0),(0,G.Cg)([(0,j.gfw)(ui.ZF),(0,G.Sn)("design:type",String)],vi.prototype,"_containerType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],vi.prototype,"_containerID",void 0),(0,G.Cg)([(0,j.gfw)(fi.N),(0,G.Sn)("design:type",String)],vi.prototype,"_instanceType",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],vi.prototype,"_interactableGameObject",void 0),(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],vi.prototype,"openSoundEffect",void 0),(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],vi.prototype,"revealItemSoundEffect",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],vi.prototype,"_chestTransform",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],vi.prototype,"_chestOpenFrameName",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],vi.prototype,"_chestImage",void 0);let gi=class extends vi{run(){var k;const B=this._lootProvider.getItems();if(null===(k=this._interactableGameObject)||void 0===k?void 0:k.transform){const k=tt.q.instance.prodigy.world.getCurrentZone();this._containerID=`${k}-${this._interactableGameObject.transform.worldPosition.x}-${this._interactableGameObject.transform.worldPosition.y}`}this._segment.container.sendContainerOpenedEvent(this._containerType,this._containerID,this._instanceType),this.execute(145,{game:tt.q.instance.game,chestTransform:this._chestTransform,openChestFSM:this,chestItems:B,itemCount:B.length,mapSaveState:this._mapSaveState,sourceType:this._containerType===ui.ZF.WorldChest?li.C.WorldChest:li.C.WorldMemberChest,sourceID:this._containerID,transactionID:this._segment.container.getCurrentContainerTransactionID()})}};(0,G.Cg)([(0,j.MnK)(ti),(0,G.Sn)("design:type",ti)],gi.prototype,"_lootProvider",void 0),(0,G.Cg)([(0,j.MnK)(si),(0,G.Sn)("design:type",si)],gi.prototype,"_mapSaveState",void 0),gi=(0,G.Cg)([(0,j.EVk)("OpenChestFSM",W.Y.adventureFsm)],gi);var mi=U(43531);let yi=class extends j.uAl{constructor(){super(...arguments),this._dialogueIDs=[],this._onFinished=new j.HN0,this._attachToGameObjectLayer=!1}destroy(){this._onFinished.dispose(),super.destroy()}play(){const k=mi.rD.runDialogueSequence(Lt.l.guaranteeArray(this._dialogueIDs),(()=>{this._onFinished.dispatch()}));this._attachToGameObjectLayer&&k.setParent(j.wa5.getActiveScene().getLayer(this.GameObject.layer))}};(0,G.Cg)([(0,j.SZi)(),(0,j.g11)(),(0,G.Sn)("design:type",Array)],yi.prototype,"_dialogueIDs",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yi.prototype,"_onFinished",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],yi.prototype,"_attachToGameObjectLayer",void 0),yi=(0,G.Cg)([(0,j.EVk)("PlayDialogue",W.Y.ui)],yi);var _i=U(51941);let Ei=class extends j.uAl{create(){var k;let B;if(super.create(),null===(k=this.gameObject.findComponentInChildren(_i.c))||void 0===k||k.onLoadComplete.add((()=>{this.gameObject.active=!0})),B=this._dungeonState.getCheckpointIndex(),-1===B){const k=this._dungeonState.getCurrentMap(),U=this.phaseNames.indexOf(k);U>=0?B=this.phaseDefaultIDs[U]:k&&j.VyI.log(`No phase name for ${k}`,j.$bb.Error)}const U=ct.sortedIndex(this.checkpointIDs,B),F=this.gameObject.legacyTransform,G=this.checkpointsParent.children[U].legacyTransform;F.x=G.x,F.y=G.y}};(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],Ei.prototype,"_dungeonState",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ei.prototype,"checkpointsParent",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.g11)(),(0,G.Sn)("design:type",Array)],Ei.prototype,"checkpointIDs",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],Ei.prototype,"phaseNames",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.g11)(),(0,G.Sn)("design:type",Array)],Ei.prototype,"phaseDefaultIDs",void 0),Ei=(0,G.Cg)([(0,j.EVk)("PlayerPinProgress",W.Y.adventureUi)],Ei);let wi=class extends Be.u{run(){this._fsmData&&j.Aq$.isDefined(this._fsmData.ID)&&this.execute(this._fsmData.ID,this._fsmData.variables)}};(0,G.Cg)([(0,j.Cdj)("InitData-playFSM"),(0,G.Sn)("design:type",Object)],wi.prototype,"_fsmData",void 0),wi=(0,G.Cg)([(0,j.EVk)("PlayInitDataFSM",W.Y.animation)],wi);var Ti=U(9531);let Si=class extends j.JTX{postCreate(){if(super.postCreate(),this._playerProvider){const k=[],B=this._bossIDs.length;for(let j=0;j0?1===G?this._localizer.getText("ADVENTURE_REMAINING_REWARDS_SINGLE"):this._localizer.getText("ADVENTURE_REMAINING_REWARDS",G):""}}};(0,G.Cg)([(0,j.fFd)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Si.prototype,"_playerProvider",void 0),(0,G.Cg)([(0,j.Cdj)("Localization"),(0,G.Sn)("design:type",j.dTp)],Si.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Si.prototype,"_labelText",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],Si.prototype,"_bossIDs",void 0),Si=(0,G.Cg)([(0,j.EVk)("RemainingRewards",W.Y.adventureUi)],Si);let Ai=class extends Be.u{run(){const k=this._lootProviderComponent.getItems();this.execute(135,{game:tt.q.instance.game,spine:this._interactableSpine.getSpine(),items:k.length>0?k:null,saveComponent:this._saveCompletionComponent,revealAnimationName:this._revealAnimationName})}};(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],Ai.prototype,"_interactableSpine",void 0),(0,G.Cg)([(0,j.MnK)(si),(0,G.Sn)("design:type",si)],Ai.prototype,"_saveCompletionComponent",void 0),(0,G.Cg)([(0,j.MnK)(ti),(0,G.Sn)("design:type",ti)],Ai.prototype,"_lootProviderComponent",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ai.prototype,"_revealAnimationName",void 0),Ai=(0,G.Cg)([(0,j.EVk)("RevealInteractableItemFSM",W.Y.adventureFsm)],Ai);var Ci=U(28628);class Oi{static getBossAssetID(k){const B=Object.keys(Oi.BOSS_ID_MAP).find((B=>Oi.BOSS_ID_MAP[B]===k));return B?parseInt(B,10):null}static getBossEnum(k){var B;return null!==(B=Oi.BOSS_ID_MAP[k])&&void 0!==B?B:null}static getRevampBattleType(k){return Oi.REVAMP_BATTLE_TYPES[k]}}Oi.BOSS_ID_MAP={19:0,20:3,21:4,17:1,18:2},Oi.REVAMP_BATTLE_TYPES={0:Ci.gu.CrystalCavernsGrumpyYeti,4:Ci.gu.CrystalCavernsCrystalThief,3:Ci.gu.CrystalCavernsGlacias,1:Ci.gu.CrystalCavernsMakalu,2:Ci.gu.CrystalCavernsCrystalGolem};var Ii=U(83668);let Di=class extends j.uAl{constructor(){super(...arguments),this.preloadAtlas=Ve._.Ui_cc_adventure_map_json}create(){super.create();let k=Rt.l.AdventureMap_RowUnrevealed;{const B=Yt.t.getItemData("boss",Oi.getBossAssetID(this.bossID));this._crystalCavernsState.isBossDefeatedCurrentRun(this.bossID)?k=Rt.l.AdventureMap_RowDone:this._crystalCavernsState.getCheckpointIndex()===B.battleCheckpointID&&(k=Rt.l.AdventureMap_RowCurrent)}this._prefabLoader.loadFromGUID(k,this.gameObject)}};(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],Di.prototype,"preloadAtlas",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Di.prototype,"bossID",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ii.o)],Di.prototype,"_crystalCavernsState",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Di.prototype,"_prefabLoader",void 0),Di=(0,G.Cg)([(0,j.EVk)("RewardRowBacking",W.Y.adventureUi)],Di);var Ri=U(5822);let Pi=class extends Ri.u{};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pi.prototype,"_firstEntryEvent",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pi.prototype,"_reentryEvent",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],Pi.prototype,"_dungeonState",void 0),Pi=(0,G.Cg)([(0,j.EVk)("SendStartDungeonMetric",W.Y.adventure)],Pi);var Mi=U(19464);let Ni=class extends j.uAl{teleportPlayer(){this._dungeonState.resetPhaseData(),this._dungeonState.setCurrentMap(this._destinationMap),tt.q.instance.prodigy.world.it(this._destinationMap),tt.q.instance.prodigy.gameContainer.get("c47-20b6").playerMovementAndDiscovery.sendCrystalCavernsMilestoneReachedEvent(Mi.lT.Complete)}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ni.prototype,"_destinationMap",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],Ni.prototype,"_dungeonState",void 0),Ni=(0,G.Cg)([(0,j.EVk)("TransitionDungeonPhases",W.Y.adventure)],Ni);var xi=U(79009),Li=U(5668),ki=U(54950);let Bi=class extends j.PQK{installBindings(){const k=tt.q.instance.prodigy.gameContainer;this.Container.bind("Localization").toConstantValue(k.get(j.$Bt.LocalizationService)),this.Container.bind("d30-0043").toConstantValue(tt.q.instance.prodigy.open),this.Container.bind("AnimationData").toConstantValue(new xi.F(U(34500))),this.Container.bind("b2a-9519").to(ki.S).asSingleton(),this.Container.bind("c5f-aceb").toConstantValue(new Li.D(this.Container,k.get("c97-bd0d")))}};Bi=(0,G.Cg)([(0,j.Og1)("AdventureInstaller","Installer")],Bi);var Ui,Fi=U(26932),Gi=U(13956),ji=U(63860);!function(k){k.afterSchoolWidgetSchoolRewardState="AFTER_SCHOOL_WIDGET_SCHOOL_REWARD_STATE",k.afterSchoolWidgetHomeRewardState="AFTER_SCHOOL_WIDGET_HOME_REWARD_STATE",k.afterSchoolWidgetRewardTooltipActive="AFTER_SCHOOL_WIDGET_REWARD_TOOLTIP_ACTIVE",k.afterSchoolWidgetRewardTooltipState="AFTER_SCHOOL_WIDGET_REWARD_TOOLTIP_STATE",k.afterSchoolWidgetSchoolRewardAmount="AFTER_SCHOOL_WIDGET_SCHOOL_REWARD_AMOUNT",k.afterSchoolWidgetHomeRewardAmount="AFTER_SCHOOL_WIDGET_HOME_REWARD_AMOUNT"}(Ui||(Ui={}));let $i=class extends Fi.z{constructor(){super(...arguments),this.onSchoolRewardClaimed=new j.HN0,this.onHomeRewardClaimed=new j.HN0}create(){super.create(),this.bindContext()}bindContext(){this.schoolRewardStateSignalBinding=this._afterSchoolWidgetService.onSchoolRewardStateSet.add((k=>this.refreshSchoolRewardState(k))),this.homeRewardStateSignalBinding=this._afterSchoolWidgetService.onHomeRewardStateSet.add((k=>this.refreshHomeRewardState(k))),this.rewardDataSignalBinding=this._afterSchoolWidgetService.onDataSet.add((()=>this.refreshRewardValues())),this.refreshSchoolRewardState(),this.refreshHomeRewardState(),this.refreshRewardValues()}refreshSchoolRewardState(k=this._afterSchoolWidgetService.schoolRewardState){j.Aq$.isDefined(k)&&(this.updateValue(Ui.afterSchoolWidgetSchoolRewardState,k),this.refreshToolTipState())}refreshHomeRewardState(k=this._afterSchoolWidgetService.homeRewardState){j.Aq$.isDefined(k)&&(this.updateValue(Ui.afterSchoolWidgetHomeRewardState,k),this.refreshToolTipState())}refreshToolTipState(){const{homeRewardState:k,schoolRewardState:B}=this._afterSchoolWidgetService,U=this._afterSchoolWidgetService.isFtueAvailable();"Locked"===k?(this.updateValue(Ui.afterSchoolWidgetRewardTooltipState,"Locked"),this.updateValue(Ui.afterSchoolWidgetRewardTooltipActive,!U)):"Collected"===B&&"Collected"===k?(this.updateValue(Ui.afterSchoolWidgetRewardTooltipState,"Collected"),this.updateValue(Ui.afterSchoolWidgetRewardTooltipActive,!U)):this.updateValue(Ui.afterSchoolWidgetRewardTooltipActive,!1)}refreshRewardValues(){const k=this._afterSchoolWidgetService.getData().homeReward,B=this._afterSchoolWidgetService.getData().schoolReward;this.updateValue(Ui.afterSchoolWidgetHomeRewardAmount,k.amount),this.updateValue(Ui.afterSchoolWidgetSchoolRewardAmount,B.amount)}claimSchoolReward(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._afterSchoolWidgetService.claimSchoolReward();this.onSchoolRewardClaimed.dispatch(k)}))}claimHomeReward(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._afterSchoolWidgetService.claimHomeReward();this.onHomeRewardClaimed.dispatch(k)}))}destroy(){this.onHomeRewardClaimed.dispose(),this.onSchoolRewardClaimed.dispose(),this.schoolRewardStateSignalBinding.destroy(),this.homeRewardStateSignalBinding.destroy(),this.rewardDataSignalBinding.destroy(),super.destroy()}};(0,G.Cg)([(0,Gi.b)("e94-c727"),(0,G.Sn)("design:type",ji.e)],$i.prototype,"_afterSchoolWidgetService",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$i.prototype,"onSchoolRewardClaimed",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$i.prototype,"onHomeRewardClaimed",void 0),$i=(0,G.Cg)([(0,j.EVk)("AfterSchoolWidgetRewards",W.Y.afterSchoolWidget)],$i);var Hi=U(18344);let Vi=class extends j.uAl{constructor(){super(...arguments),this.iconGraphicComponents=[]}postCreate(){super.postCreate(),j.Aq$.isDefined(this.bannerText)&&this.setBannerText(this.bannerText),j.Aq$.isDefined(this.iconGraphicAsset)&&this.setIconGraphicAsset(this.iconGraphicAsset)}init(k){this._definition=k,this.setBannerText(k.text),this.setIconGraphicAsset(k.iconGuid)}getDefinition(){return Object.assign({},this._definition)}setIconGraphicAsset(k){if(j.Aq$.isDefined(k)){if(this.iconGraphicAsset=k,!j.Aq$.isDefined(this.iconGraphicAsset))for(const k of this.iconGraphicComponents)k.GameObject.active=!1;this._assetLoader.loadAssets([this.iconGraphicAsset]).then((()=>{for(const k of this.iconGraphicComponents)k.GameObject.active=!0,k.updateAsset(this.iconGraphicAsset)})).catch((k=>{j.VyI.log(k,j.$bb.Error)}))}}setBannerText(k){this.bannerText=k,j.Aq$.isDefined(this.bannerTextComponent)&&(this.bannerTextComponent.text=k)}};(0,G.Cg)([(0,j.Cdj)(j.t5G.AssetLoader),(0,G.Sn)("design:type",Hi.A)],Vi.prototype,"_assetLoader",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Vi.prototype,"bannerTextComponent",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Vi.prototype,"bannerText",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",Array)],Vi.prototype,"iconGraphicComponents",void 0),(0,G.Cg)([(0,j.i0J)(j.Z$z.SingleImage),(0,G.Sn)("design:type",String)],Vi.prototype,"iconGraphicAsset",void 0),Vi=(0,G.Cg)([(0,j.EVk)("BannerControllerComponent")],Vi);var Wi=U(11647),qi=U(52743);let Ki=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.maxBannersToShow=3,this._isLoadingBanners=!1}postCreate(){super.postCreate(),this.updateBanners(this._bannerQueueManager.getStack()).catch((k=>j.VyI.log(k,j.$bb.Error))),this.addListenerToSignal(this._bannerQueueManager.onBannerQueueUpdated,(k=>{this.updateBanners(k).catch((k=>j.VyI.log(k,j.$bb.Error)))}))}updateBanners(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;if(this._isLoadingBanners)return;this._isLoadingBanners=!0;const U=null!==(B=this.contentContainerObject)&&void 0!==B?B:this.gameObject,F=U.children.map((k=>k.findComponent(Vi)));for(let G=0;G=1}}(0,G.Cg)([(0,j.x4W)("left"),(0,G.Sn)("design:type",zi.k)],Qi.prototype,"_left",void 0),(0,G.Cg)([(0,j.x4W)("right"),(0,G.Sn)("design:type",zi.k)],Qi.prototype,"_right",void 0),(0,G.Cg)([(0,j.x4W)("middle"),(0,G.Sn)("design:type",zi.k)],Qi.prototype,"_middle",void 0);let Xi=class extends Vi{constructor(){super(...arguments),this.progress=0,this.target=1}postCreate(){super.postCreate(),this.setProgress(this.progress,this.target)}init(k){super.init(k),this.setProgress(k.progress.current,k.progress.target)}setProgress(k,B){var U;this.progress=k,this.target=B;const F=Math.min(k/B,1);j.Aq$.isDefined(this.progressLabelTextComponent)&&(this.progressLabelTextComponent.text=`${k}/${B}`),null===(U=this.progressBarComponent)||void 0===U||U.setValue(F)}};(0,G.Cg)([(0,j.MnK)(Qi),(0,G.Sn)("design:type",Qi)],Xi.prototype,"progressBarComponent",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Xi.prototype,"progressLabelTextComponent",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Xi.prototype,"progress",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Xi.prototype,"target",void 0),Xi=(0,G.Cg)([(0,j.EVk)("ProgressBannerController")],Xi);var Zi=U(35997);let Ji=class extends j.uAl{constructor(){super(...arguments),this._onLoad=new j.HN0}create(){super.create(),tt.q.instance.prodigy.titansNetworkHandler.getTitans().then((()=>{this._onLoad.dispatch()}))}destroy(){this._onLoad.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ji.prototype,"_onLoad",void 0),Ji=(0,G.Cg)([(0,j.EVk)("AwaitTitan",W.Y.titan)],Ji);let ts=class extends j.uAl{constructor(){super(...arguments),this._onAlive=new j.HN0,this._onDead=new j.HN0}check(){tt.q.instance.prodigy.titansNetworkHandler.isTitanAlive()?this._onAlive.dispatch():this._onDead.dispatch()}destroy(){this._onAlive.dispose(),this._onDead.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ts.prototype,"_onAlive",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ts.prototype,"_onDead",void 0),ts=(0,G.Cg)([(0,j.EVk)("IsTitanAliveGuard",W.Y.titan)],ts);let es=class extends j.uAl{constructor(){super(...arguments),this._onNew=new j.HN0,this._onNotNew=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.check()}destroy(){this._onNew.dispose(),this._onNotNew.dispose(),super.destroy()}check(){tt.q.instance.prodigy.titansNetworkHandler.isNewTitan()?this._onNew.dispatch():this._onNotNew.dispatch()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],es.prototype,"_onNew",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],es.prototype,"_onNotNew",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],es.prototype,"_runOnLoad",void 0),es=(0,G.Cg)([(0,j.EVk)("IsTitanNewGuard",W.Y.titan)],es);var is=U(65116),ss=U(49037);let ns=class extends j.uAl{setDestination(){const k=tt.q.instance.prodigy.titansNetworkHandler.titan;if(k){const B=`${Yt.t.getItem("titan",k.assetID).data.zone}-Titan`;this.canTeleport&&(this.canTeleport.mapTag=B),this.teleport&&(this.teleport.mapTag=B)}}};(0,G.Cg)([(0,j.MnK)(is.$),(0,G.Sn)("design:type",is.$)],ns.prototype,"canTeleport",void 0),(0,G.Cg)([(0,j.MnK)(ss.q),(0,G.Sn)("design:type",ss.q)],ns.prototype,"teleport",void 0),ns=(0,G.Cg)([(0,j.EVk)("SetTitanTeleportComponents",W.Y.titan)],ns);let as=class extends j.uAl{constructor(){super(...arguments),this._duelInviteUpdate=new j.HN0}create(){super.create(),this.fireSignalBasedOnCurrentDuelInviteState(),this._duelInviteService.onInviteReceived.add(this.fireSignalBasedOnCurrentDuelInviteState,this),this._duelInviteService.onInviteRemoved.add(this.fireSignalBasedOnCurrentDuelInviteState,this),this._duelInviteService.onInviteCancelled.add(this.fireSignalBasedOnCurrentDuelInviteState,this)}destroy(){this._duelInviteUpdate.dispose(),this._duelInviteService.onInviteReceived.remove(this.fireSignalBasedOnCurrentDuelInviteState,this),this._duelInviteService.onInviteCancelled.remove(this.fireSignalBasedOnCurrentDuelInviteState,this),this._duelInviteService.onInviteRemoved.remove(this.fireSignalBasedOnCurrentDuelInviteState,this),super.destroy()}fireSignalBasedOnCurrentDuelInviteState(){this._duelInviteUpdate.dispatch(this._duelInviteService.getInvites().length>0)}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],as.prototype,"_duelInviteUpdate",void 0),(0,G.Cg)([(0,j.Cdj)("636-444c"),(0,G.Sn)("design:type",Object)],as.prototype,"_duelInviteService",void 0),as=(0,G.Cg)([(0,j.EVk)("DuelInviteUpdate",W.Y.titan)],as);var rs=U(56942),os=U(52156),hs=U(53661),cs=U(18587);let ds=class extends j.uAl{constructor(){super(...arguments),this._generalChaseItems=[],this._levelupChaseItems=[],this._ultimateChaseItems=[]}create(){const k=Object.create(null,{create:{get:()=>super.create}});return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G,$,H,V;k.create.call(this),this._battlePassQuestData=yield this._questManager.getCurrentBattlePassData();const W=this._battlePassQuestData.getChasePetsLevelUp(),q=this._battlePassQuestData.getChasePetsUltimate(),K=null===(B=W[0])||void 0===B?void 0:B.id,z=null===(U=q[0])||void 0===U?void 0:U.id,Y=null===(F=q[1])||void 0===F?void 0:F.id,Q={};j.Aq$.isDefined(K)&&(Q[hs.XU.LevelupMythicGuid]=rs.Q[`Spine_pet_${K}_json`]),j.Aq$.isDefined(z)&&(Q[hs.XU.MythicGuid]=rs.Q[`Spine_pet_${z}_json`]),j.Aq$.isDefined(Y)&&(Q[hs.XU.UltimateMemberPetGuid]=rs.Q[`Spine_pet_${Y}_json`]),Nt.d.updateInjectedValues(this.gameObject,Q);const X=this._battlePassQuestData.getMiniChaseItemsUltimate();for(let k=0;kk&&(this._ultimateChaseItems[k].findComponentInChildren(j.EYj).text=1===X[k].quantity?"":null!==($=null===(G=X[k].quantity)||void 0===G?void 0:G.toString())&&void 0!==$?$:"",this._ultimateChaseItems[k].findComponentInChildren(os.X).setAsset(X[k].id,X[k].type).catch((B=>{j.VyI.log(`Battle pass was unable to load asset for ultimate chase item at index ${k}`,j.$bb.Error)})));const Z=this._battlePassQuestData.getMiniChaseItemsLevelUp();for(let k=0;kk&&(this._levelupChaseItems[k].findComponentInChildren(j.EYj).text=1===Z[k].quantity?"":null!==(V=null===(H=Z[k].quantity)||void 0===H?void 0:H.toString())&&void 0!==V?V:"",this._levelupChaseItems[k].findComponentInChildren(os.X).setAsset(Z[k].id,Z[k].type).catch((B=>{j.VyI.log(`Battle pass was unable to load asset for level up chase item at index ${k}`,j.$bb.Error)})));const J=this._loggedInPlayer.isMember();this._nonMemberCTA.active=!J,this._levelUpMemberCTA.active=J,this._battlePassQuestData||j.VyI.log("Battle pass track was unable to retrieve quest data for the current battle pass.",j.$bb.Error)}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],ds.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],ds.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],ds.prototype,"_generalChaseItems",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],ds.prototype,"_levelupChaseItems",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],ds.prototype,"_ultimateChaseItems",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ds.prototype,"_nonMemberCTA",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ds.prototype,"_levelUpMemberCTA",void 0),ds=(0,G.Cg)([(0,j.EVk)("BattlePassChaseItemsController",W.Y.battlePass)],ds);var ls=U(90633),us=U(46784),fs=U(91207);let bs=class extends j.uAl{constructor(){super(...arguments),this._battlePassAtlas=Ve._.Ui_battle_pass_json,this._complexFtue=!1,this._paginationBubbleSize=20,this._paginationBubbles=[],this._ftueFrames=[],this._additionalUiElements=[],this._currentFrame=0,this._finalFrameNextButtonTextKey="BUTTON_START_NOW"}create(){super.create(),this._closeCallback=this.getInjectedValue(hs.XU.CloseCallback),this._battlePassQuestManager.getCurrentBattlePassData().then((k=>(0,G.sH)(this,void 0,void 0,(function*(){const B=[];this._ftueFrames=k.getFtueFrames(),this._frameAmount=this._complexFtue?this._ftueFrames.length:1;for(let k=0;k{k.empty.Active=this._currentFrame!==B,k.full.Active=this._currentFrame===B}));else{this._paginationBubbleGrid.GameObject.active=!1;for(let k=0;k{this.handleNextClicked().catch(j.RQr.createHandler("BattlePassFtueComponent: Error setting up the next button click handler"))}))}))}handleNextClicked(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._currentFrame===this._frameAmount-1)return yield this.completeFtue(!1),void tt.q.instance.prodigy.open.battlePassMenu(us.B.BattlePassFtue,ui.$N.AutoSurfaced,this._closeCallback);yield this.loadFrame(this._currentFrame+1),this.setUpPaginationBubbles(),yield this.setUpNextButton()}))}completeFtue(){return(0,G.sH)(this,arguments,void 0,(function*(k=!0){if(this._complexFtue){tt.q.instance.prodigy.gameContainer.get("12f-4e29").completeBreadcrumb(ls.B.FEATURE_BATTLE_PASS,ls.B.BREADCRUMB_BATTLE_PASS_COMPLEX_FTUE_VIEWED)}yield this._battlePassQuestManager.sendFtueViewedEvent(),this._modal.destroyDeferred(),k&&this._closeCallback()}))}};(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],bs.prototype,"_battlePassAtlas",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],bs.prototype,"_modal",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],bs.prototype,"_frameImage",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],bs.prototype,"_frameGameObject",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],bs.prototype,"_nextButton",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],bs.prototype,"_nextButtonText",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],bs.prototype,"_complexFtue",void 0),(0,G.Cg)([(0,j.MnK)(j.JTA),(0,G.Sn)("design:type",j.JTA)],bs.prototype,"_paginationBubbleGrid",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],bs.prototype,"_battlePassQuestManager",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],bs.prototype,"_localizer",void 0),bs=(0,G.Cg)([(0,j.EVk)("BattlePassFtue",W.Y.battlePass)],bs);var ps=U(36648),vs=U(97518);let gs=class extends j.uAl{constructor(){super(...arguments),this._chasePrizeImages=[]}create(){super.create(),this.setupUi().catch(j.RQr.createHandler("BattlePassHomeScreen: Failed to set up chase prizes."))}destroy(){this._goToQuestsTab.onClick.remove(this.goToQuestsTab),this._goToIntroModal.onClick.remove(this.showIntro),super.destroy()}setupUi(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=yield this._battlePassQuestManager.getCurrentBattlePassData(),U=B.getHomeScreenPromoImageGuid(),F=fs.E.resolveSingleImageAssetSource(U,B.getHomeScreenPromoImageURL());if(null===(k=this._splashArt)||void 0===k||k.setAsset(F).catch(j.RQr.createHandler(`BattlePassHomeScreen: Failed to load splash art image ${U}`)),this._chasePrizeImages[0]){const k=B.getChaseHeroPoseImageGuid();this._chasePrizeImages[0].setAsset(k).catch(j.RQr.createHandler(`BattlePassHomeScreen: Failed to load chase prize image ${k}`))}const G=B.getChasePrizes();for(let H=1;H0?k.setBarText(U):k.setBarText((0,ms.k)(this.textToDisplay))}};(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],_s.prototype,"fillColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],_s.prototype,"innerColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],_s.prototype,"outerColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],_s.prototype,"textOutlineColor",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],_s.prototype,"textToDisplay",void 0),_s=(0,G.Cg)([(0,j.EVk)("ProgressBarState",W.Y.battlePass)],_s);var Es,ws,Ts,Ss,As,Cs,Os=U(29834),Is=U(15485),Ds=U(21418),Rs=U(96165);!function(k){k.Common="common-130x130",k.Uncommon="uncommon-130x130",k.Rare="rare-130x130",k.Heroic="heroic-130x130",k.Legendary="legendary-130x130"}(Es||(Es={})),function(k){k.Free="select-nonmember",k.Premium="select-member",k.Ultimate="frame-ultramember-diamond"}(ws||(ws={})),function(k){k.Free="frame-free-offseason",k.Core="select-member_offseason",k.Plus="frame-ultramember-diamond-offseason"}(Ts||(Ts={})),function(k){k.Common="#C5D1F5",k.Uncommon="#53A18A",k.Rare="#3B61C5",k.Heroic="#7E44CC",k.Legendary="#EFA378"}(Ss||(Ss={})),function(k){k.Common="#CCD7F9",k.Uncommon="#E3EFCA",k.Rare="#B6CFFB",k.Heroic="#F7CFF7",k.Legendary="#F3D07F"}(As||(As={})),function(k){k.MysteryRewardClaimSwitch="switch"}(Cs||(Cs={}));const Ps=["#363636","#FFFFFF","#FFFFFF","#FFFFFF","#363636"],Ms="generic",Ns={19:"academy-scroll",16:"aeros",2:"candy-corn",3:"generic",10:"generic",21:"generic",13:"florans",1:"gold",18:"academy-scroll",12:"hothots",22:"generic",8:"gold",17:"magic-egg",5:"magic-snowflake",7:"gold",23:"generic",20:"sand-dollar",15:"shivers",6:"gold",4:"star-shards",25:"generic",11:"titan-shards",9:"generic",14:"yars",27:"magicoin"};var xs=U(66582);let Ls=class extends j.uAl{setUp(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;if(!this.gameObject||this.GameObject.isDestroyed)return;if(!k)return void(this.gameObject.active=!1);switch(this.gameObject.active=!0,this._levelUpMemberIcon.active=!1,this._ultimateMemberIcon.active=!1,k.membershipTier){case xs._$.NonMember:break;case xs._$.MemberLevelUp:case xs._$.MemberCore:this._levelUpMemberIcon.active=!0;break;case xs._$.MemberUltimateMath:case xs._$.MemberUltimateBundle:case xs._$.MemberPlus:case xs._$.MemberUltra:this._ultimateMemberIcon.active=!0;break;default:j.VyI.log(`Unhandled member tier ${k.membershipTier} ${xs._$[k.membershipTier]}, presenting as Ultimate as a fallback`,j.$bb.Warning),this._ultimateMemberIcon.active=!0}const U=k.itemDrop.N;U>1&&!k.isMystery?(this._counterText.Active=!0,this._counterText.text=`x${U}`):this._counterText.Active=!1;const F=null!==(B=Yt.t.getItem(k.itemDrop.type,k.itemDrop.ID).data.rarity)&&void 0!==B?B:0,G=k.isMystery?182:k.itemDrop.ID,$=k.isMystery?"item":k.itemDrop.type;yield Promise.all([this._background.setAsset(Ve._.Ui_battle_pass_json,Object.values(Es)[F]),this._itemImageDataLoader.setAsset(G,$)])}))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ls.prototype,"_levelUpMemberIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ls.prototype,"_ultimateMemberIcon",void 0),(0,G.Cg)([(0,j.MnK)(os.X),(0,G.Sn)("design:type",os.X)],Ls.prototype,"_itemImageDataLoader",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],Ls.prototype,"_background",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ls.prototype,"_counterText",void 0),Ls=(0,G.Cg)([(0,j.EVk)("BattlePassItemCard",W.Y.battlePass)],Ls);let ks=class extends j.uAl{constructor(){super(...arguments),this.onRewardClaimed=new j.HN0}setup(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(dt().isEqual(this._infiniteTierData,k))return;this._infiniteTierData=k,this._currentTierIcon.active=k.isCurrentTier,this.setUpProgressBar(k);const B=k.timesCompleted-k.timesClaimed;this._claimButtonSparkle.GameObject.active=B>0,this.setUpClaimButton(k,B),this._itemCardSparkle.GameObject.active=B>0,this._itemCard&&k.freeReward&&(yield this._itemCard.setUp(k.freeReward).catch(j.RQr.createHandler("Failed to set up the item card in the battle pass infinite tier")),this.assignListenerToSignal(this._itemCardButton.onClick,this.itemCardClickEvent))}))}destroy(){this.onRewardClaimed.dispose(),super.destroy()}claimRewards(k){var B;this._claimButtonParent.active=!1,this._claimButtonSparkle.GameObject.active=!1,this._itemCardSparkle.GameObject.active=!1;const U=k.freeReward.rewardId,F=k.timesCompleted-k.timesClaimed;this._questManager.sendRewardClaimedEvent(U,F).then((()=>{new Rs.I(null,null).doTask({itemDrops:[{ID:k.freeReward.itemDrop.ID,type:k.freeReward.itemDrop.type,N:k.freeReward.itemDrop.N*F}],showGotItem:!1,sourceType:li.C.BattlePass}).catch(j.RQr.createHandler("BattlePassInfiniteTierComponent: Failed to grant reward"))})).catch(j.RQr.createHandler(`BattlePassInfiniteTierComponent: Failed to claim battle pass reward ${U}`)),this._claimedAnimationAnimator.GameObject.active=!0;const G=k.freeReward,$=("currency"===G.itemDrop.type||"gold"===G.itemDrop.type)&&null!==(B=Ns[G.itemDrop.ID])&&void 0!==B?B:Ms;this._claimedAnimationAnimator.playAnimation($,!1)}setUpProgressBar(k){if(!this._progressBarState)return void j.VyI.log("BattlePassInfiniteTierComponent does not have a progress bar state assigned.",j.$bb.Error);const B=k.currentProgress/k.targetProgress,U=k.isCurrentTier?`${k.currentProgress} / ${k.targetProgress}`:"--";this._progressBarState.applyStateToProgressBar(this._progressBar,B,U)}setUpClaimButton(k,B){B<=0?this._claimButtonParent.active=!1:(this._claimButtonParent.active=!0,this._claimButton.useHandCursor=!0,this.setUpClaimButtonText(B),this.assignListenerToSignal(this._claimButton.onClick,this.claimButtonClickEvent))}assignListenerToSignal(k,B){k.has(B,this)||k.add(B,this)}setUpClaimButtonText(k){let B=(0,ms.k)("BTN_COLLECT");k>1&&(B+=` x${k}`),this._claimButton.text=B,this._claimButton.regenerateButton()}claimButtonClickEvent(){this._claimButton.onClick.removeAll(),this.claimRewards(this._infiniteTierData),this._claimedAnimationAnimator.OnAnimationComplete.addOnce((()=>{this.onRewardClaimed.dispatch()}));const k=tt.q.instance.prodigy.gameContainer.get("c47-20b6");k.battlePass.generateRewardClaimedTransactionId(),k.featureCommon.sendButtonEvent({buttonName:Is.k.BattlePassClaimInfiniteTierButton,interfaceName:us.B.BattlePassMenu,interfaceType:ui.Wm.BattlePass,transactionId:k.battlePass.rewardClaimedTransactionId})}itemCardClickEvent(){const k="gold"===this._infiniteTierData.freeReward.itemDrop.type?"currency":this._infiniteTierData.freeReward.itemDrop.type;tt.q.instance.prodigy.open.itemInfo({ID:this._infiniteTierData.freeReward.itemDrop.ID,L:0,type:k},null,Ds.s.View)}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ks.prototype,"onRewardClaimed",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ks.prototype,"_currentTierIcon",void 0),(0,G.Cg)([(0,j.MnK)(Ls),(0,G.Sn)("design:type",Ls)],ks.prototype,"_itemCard",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],ks.prototype,"_itemCardButton",void 0),(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],ks.prototype,"_itemCardSparkle",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ks.prototype,"_claimButtonParent",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],ks.prototype,"_claimButton",void 0),(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],ks.prototype,"_claimButtonSparkle",void 0),(0,G.Cg)([(0,j.MnK)(ys.z),(0,G.Sn)("design:type",ys.z)],ks.prototype,"_progressBar",void 0),(0,G.Cg)([(0,j.MnK)(_s),(0,G.Sn)("design:type",_s)],ks.prototype,"_progressBarState",void 0),(0,G.Cg)([(0,j.MnK)(_s),(0,G.Sn)("design:type",_s)],ks.prototype,"_upcomingTierProgressBarState",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],ks.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],ks.prototype,"_claimedAnimationAnimator",void 0),ks=(0,G.Cg)([(0,j.EVk)("BattlePassInfiniteTier",W.Y.battlePass)],ks);var Bs=U(63011),Us=U(64353),Fs=U(95057),Gs=U(98252),js=U(66207);let $s=class extends j.uAl{constructor(){super(...arguments),this._chaseRewardsDisplay=[]}create(){super.create(),this.updateMembershipButton(),this.setUpBattlePassDataUi().catch(j.RQr.createHandler("BattlePassLeftPanel: Failed to set up panel data")),this._battlePassQuestManager.getCurrentBattlePassData().then((k=>(0,G.sH)(this,void 0,void 0,(function*(){if(!k)return;const B=k.getChasePrizes();for(let k=1;kthis.updateMembershipButton())).catch((k=>j.RQr.logError(k,"Failed to open battle pass ultimate member upsell modal")))}destroy(){super.destroy(),this._memberUnlockButton.onClick.removeAll()}};(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],$s.prototype,"_battlePassQuestManager",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",Array)],$s.prototype,"_chaseRewardsDisplay",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],$s.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],$s.prototype,"_memberUnlockButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$s.prototype,"_memberIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$s.prototype,"_ultimateMemberIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$s.prototype,"_memberUnlockText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$s.prototype,"_ultimateMemberUnlockText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$s.prototype,"_currentUltimateMemberText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$s.prototype,"_chaseRewardsParent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$s.prototype,"_ultraMembershipWidget",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],$s.prototype,"_backgroundImage",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],$s.prototype,"_ultimateActivatedText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$s.prototype,"_mythicPet",void 0),$s=(0,G.Cg)([(0,j.EVk)("BattleLeftPanelComponent",W.Y.battlePass)],$s);let Hs=class extends j.uAl{create(){const k=Object.create(null,{create:{get:()=>super.create}});return(0,G.sH)(this,void 0,void 0,(function*(){k.create.call(this);const B=yield this._questManager.getCurrentBattlePassData();if(!B)return void j.VyI.log("Battle pass track was unable to retrieve quest data for the current battle pass.",j.$bb.Error);const U=this.getInjectedValue(hs.XU.ItemTierNumber),F=B.getTierData(U);if(!F)return void j.VyI.log(`Battle pass track was unable to retrieve tier data for tier ${U}.`,j.$bb.Error);const G=dt().chain([F.topPremiumReward,F.bottomPremiumReward]).reject((k=>k.claimable||k.claimed)).sortBy((k=>k.membershipTier)).value();if(js.D.isFeatureEnabled())this._levelUpMemberVisuals.active=!1,this._ultimateMemberVisuals.active=!1,this._ultraMemberVisuals.active=!0;else{const k=dt().last(G).membershipTier!==xs._$.MemberLevelUp;this._levelUpMemberVisuals.active=!k,this._ultimateMemberVisuals.active=k,this._ultraMemberVisuals.active=!1}G.length>=2?yield Promise.all([this.setUpItemCard(this._leftPremiumItemCard,G[0]),this.setUpItemCard(this._rightPremiumItemCard,G[1])]):1===G.length?yield this.setUpItemCard(this._midPremiumItemCard,G[0]):j.VyI.log(`${G.length} rewards were eligible to display`,j.$bb.Error)}))}setUpItemCard(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=yield this._prefabLoader.loadWithDependenciesFromGUID(Rt.l.BattlePassLargeItemCard);U.parent=k,yield U.findComponentInChildren(Ls).setUp(B)}))}};(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],Hs.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Hs.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Hs.prototype,"_midPremiumItemCard",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Hs.prototype,"_leftPremiumItemCard",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Hs.prototype,"_rightPremiumItemCard",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Hs.prototype,"_levelUpMemberVisuals",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Hs.prototype,"_ultimateMemberVisuals",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Hs.prototype,"_ultraMemberVisuals",void 0),Hs=(0,G.Cg)([(0,j.EVk)("BattlePassMembershipModal",W.Y.battlePass)],Hs);var Vs=U(68834),Ws=U(53151),qs=U(94566),Ks=U(69698);let zs=class extends j.uAl{postCreate(){super.postCreate(),this._closeCallback=this.getInjectedValue(hs.XU.CloseCallback),this._homeTabToggle.onSelected.add(this.loadScreen,this,0,Vs.H2.Home),this._rewardsTabToggle.onSelected.add(this.loadScreen,this,0,Vs.H2.Rewards),this._questsTabToggle.onSelected.add(this.loadScreen,this,0,Vs.H2.Quests),this._battlePassQuestManager.getCurrentBattlePassData().then((k=>{const B=this.getInjectedValue(hs.XU.FocusTabOverride);k?B?this.openScreenAndSwitchTab(B):Ws.h.isFeatureEnabled()?this.openScreenAndSwitchTab(Vs.H2.Rewards):k.hasMadeQuestProgress()?this.openScreenAndSwitchTab(Vs.H2.Quests):this.openScreenAndSwitchTab(Vs.H2.Home):(this.openScreenAndSwitchTab(Vs.H2.Rewards),this._homeTabToggle.GameObject.active=!1,this._questsTabToggle.GameObject.active=!1)})).catch(j.RQr.createHandler("BattlePassMenuBarControllerComponent: Error setting default tab state"))}loadScreen(k){(()=>(0,G.sH)(this,void 0,void 0,(function*(){let B;switch(this._loadingScreen.active=!0,this._inputBlocker.active=!0,this._screenContainer.children.forEach((k=>{k.destroy()})),this._screenContainer.children.length=0,k){case Vs.H2.Home:B=yield this.openHomeScreen();break;case Vs.H2.Rewards:B=yield this.openRewardsScreen();break;case Vs.H2.Quests:yield this.openQuestsScreen()}if(B){const k=B.transform;k.setPivot(.5,.5),k.setAnchorMin(0,0),k.setAnchorMax(0,0)}this._loadingScreen.active=!1,this._inputBlocker.active=!1,this.sendTabSegmentEvent(k)})))().catch(j.RQr.createHandler("Error loading a screen in the battle pass menu"))}openHomeScreen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._battlePassQuestManager.getCurrentBattlePassData();if(!k)return null;const B=k.getEndDate()-this._timeManager.getServerTimeMs();return Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.BattlePassHomeScreen,{[hs.n7.TimeRemainingMs]:B,[hs.XU.MenuBarQuestsTabOpenCallback]:this.openScreenAndSwitchTab.bind(this,Vs.H2.Quests),[hs.XU.DestroyBattlePassMenuCallback]:this.destroyBattlePassMenu.bind(this),[hs.XU.CloseCallback]:this._closeCallback.bind(this)},this._screenContainer)}))}openRewardsScreen(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F;const G=yield this._battlePassQuestManager.getCurrentBattlePassData(),$=G?G.getEndDate()-this._timeManager.getServerTimeMs():0,H={[hs.n7.TimeRemainingMs]:$,[hs.XU.PremiumTrackIconAtlasGuid]:null==G?void 0:G.getPremiumTrackIconAtlasGuid(),[hs.XU.PremiumTrackIconFrameName]:null==G?void 0:G.getPremiumTrackIconFrameName(),[hs.XU.PremiumTrackName]:null==G?void 0:G.getPremiumTrackName()};if(j.Aq$.isDefined(G)){const $=null==G?void 0:G.getChasePetsUltimate(),V=null==G?void 0:G.getChasePrizes(),W=null!==(B=null===(k=$[0])||void 0===k?void 0:k.id)&&void 0!==B?B:null===(U=V[0])||void 0===U?void 0:U.id,q=null===(F=$[1])||void 0===F?void 0:F.id;j.Aq$.isDefined(W)&&(H[hs.XU.MythicGuid]=rs.Q[`Spine_pet_${W}_json`]),j.Aq$.isDefined(q)&&(H[hs.XU.UltimateMemberPetGuid]=rs.Q[`Spine_pet_${q}_json`])}const V=js.D.isFeatureEnabled()?Rt.l.BattlePassThreeTierRewardsScreen:Rt.l.BattlePassRewardsScreen;return Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,V,H,this._screenContainer)}))}openQuestsScreen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._battlePassQuestManager.getCurrentBattlePassData();if(!k)return;const B=k.getEndDate()-this._timeManager.getServerTimeMs(),U=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.BattlePassQuestsScreen,{[hs.n7.TimeRemainingMs]:B,[hs.XU.MenuBarRewardTabOpenCallback]:this.openScreenAndSwitchTab.bind(this,Vs.H2.Rewards),[hs.XU.DestroyBattlePassMenuCallback]:this.destroyBattlePassMenu.bind(this),[hs.XU.CloseCallback]:this._closeCallback.bind(this)});this._screenContainer.addChild(U)}))}openScreenAndSwitchTab(k){this.loadScreen(k),this._menuTabToggleGroup.setItemSelected(this._homeTabToggle,k===Vs.H2.Home),this._menuTabToggleGroup.setItemSelected(this._rewardsTabToggle,k===Vs.H2.Rewards),this._menuTabToggleGroup.setItemSelected(this._questsTabToggle,k===Vs.H2.Quests)}sendTabSegmentEvent(k){this._segment.featureCommon.sendTabEvent({tabName:`treasure_track_${k}_tab`,interfaceName:us.B.BattlePassMenu,interfaceType:ui.Wm.BattlePass})}closeBattlePassMenu(){var k;null===(k=this._closeCallback)||void 0===k||k.call(this),this.gameObject.destroyDeferred()}destroyBattlePassMenu(){this.gameObject.destroyRootDeferred()}};(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],zs.prototype,"_homeTabToggle",void 0),(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],zs.prototype,"_rewardsTabToggle",void 0),(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],zs.prototype,"_questsTabToggle",void 0),(0,G.Cg)([(0,j.MnK)(qs.O),(0,G.Sn)("design:type",qs.O)],zs.prototype,"_menuTabToggleGroup",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],zs.prototype,"_loadingScreen",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],zs.prototype,"_screenContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],zs.prototype,"_inputBlocker",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],zs.prototype,"_battlePassQuestManager",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],zs.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("a03-308f"),(0,G.Sn)("design:type",Ks.V)],zs.prototype,"_timeManager",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],zs.prototype,"_segment",void 0),zs=(0,G.Cg)([(0,j.EVk)("BattlePassMenuBarController",W.Y.battlePass)],zs);let Ys=class extends j.uAl{constructor(){super(...arguments),this.onBattlePassActive=new j.HN0,this.onNoBattlePassActive=new j.HN0,this.onUnclaimedRewardCountChanged=new j.HN0,this.onUnclaimedQuestCountChanged=new j.HN0,this.onUnclaimedRewardAndQuestCountChanged=new j.HN0,this.onBattlePassDataChanged=new j.HN0,this.onSlowServerRequest=new j.HN0,this.onAllSlowServerRequestsCompleted=new j.HN0,this._hasBattlePassActiveOffSeason=!0}create(){super.create(),this.handleQuestDataChange(),this._battlePassQuestManager.onDataChanged.add(this.handleQuestDataChange,this),this._battlePassQuestManager.onSlowServerRequest.add(this.handleSlowServerRequest,this),this._battlePassQuestManager.onAllSlowServerRequestsCompleted.add(this.handleSlowServerRequestsCompleted,this),this._hasBattlePassActiveOffSeason=js.D.isFeatureEnabled()}destroy(){this.onBattlePassActive.dispose(),this.onNoBattlePassActive.dispose(),this.onUnclaimedRewardCountChanged.dispose(),this.onUnclaimedQuestCountChanged.dispose(),this.onUnclaimedRewardAndQuestCountChanged.dispose(),this.onBattlePassDataChanged.dispose(),this.onSlowServerRequest.dispose(),this.onAllSlowServerRequestsCompleted.dispose(),this._battlePassQuestManager.onDataChanged.remove(this.handleQuestDataChange,this),this._battlePassQuestManager.onSlowServerRequest.remove(this.handleSlowServerRequest,this),this._battlePassQuestManager.onAllSlowServerRequestsCompleted.remove(this.handleSlowServerRequestsCompleted,this),this._battlePassQuestManager.hudButton===this.gameObject&&(this._battlePassQuestManager.hudButton=null),super.destroy()}handleQuestDataChange(){this._battlePassQuestManager.getCurrentBattlePassData().then((k=>{if(!k&&!this._hasBattlePassActiveOffSeason)return this.onNoBattlePassActive.dispatch(),void(this._previousActiveStatus=!1);if(!0!==this._previousActiveStatus&&(this.onBattlePassActive.dispatch(),this._previousActiveStatus=!0),!k)return;this.onBattlePassDataChanged.dispatch();const B=this._unclaimedRewardCount!==k.getNumUnclaimedRewards(),U=this._unclaimedQuestCount!==k.getUnclaimedQuestCount();if(this._unclaimedRewardCount=k.getNumUnclaimedRewards(),this._unclaimedQuestCount=k.getUnclaimedQuestCount(),B&&this.onUnclaimedRewardCountChanged.dispatch(this._unclaimedRewardCount>0,this._unclaimedRewardCount),U&&this.onUnclaimedQuestCountChanged.dispatch(this._unclaimedQuestCount>0,this._unclaimedQuestCount),B||U&&!Ws.h.isFeatureEnabled()){let k=this._unclaimedRewardCount;Ws.h.isFeatureEnabled()||(k+=this._unclaimedQuestCount),this.onUnclaimedRewardAndQuestCountChanged.dispatch(k>0,k)}})).catch(j.RQr.createHandler("BattlePassQuestDataComponent::handleQuestDataChange Failed to get battle pass quest data"))}handleSlowServerRequest(){this.onSlowServerRequest.dispatch()}handleSlowServerRequestsCompleted(){this.onAllSlowServerRequestsCompleted.dispatch()}sendFtueViewedEvent(){this._battlePassQuestManager.sendFtueViewedEvent().catch(j.RQr.createHandler("BattlePassQuestDataComponent: Failed to send battle pass FTUE viewed event"))}setGameObjectAsHudButton(){this._battlePassQuestManager.hudButton=this.gameObject}};(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],Ys.prototype,"_battlePassQuestManager",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ys.prototype,"onBattlePassActive",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ys.prototype,"onNoBattlePassActive",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ys.prototype,"onUnclaimedRewardCountChanged",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ys.prototype,"onUnclaimedQuestCountChanged",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ys.prototype,"onUnclaimedRewardAndQuestCountChanged",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ys.prototype,"onBattlePassDataChanged",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ys.prototype,"onSlowServerRequest",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ys.prototype,"onAllSlowServerRequestsCompleted",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Ys.prototype,"_hasBattlePassActiveOffSeason",void 0),Ys=(0,G.Cg)([(0,j.EVk)("BattlePassQuestData",W.Y.battlePass)],Ys);var Qs=U(99246);let Xs=class extends Qs.I{constructor(){super(...arguments),this.interfaceName=void 0,this.getInstanceIdFromInterface=!1}getPropertiesObject(){let k=this.instanceId;this.getInstanceIdFromInterface&&this.interfaceName&&(k=this._segment.featureCommon.getCurrentInterfaceID(this.interfaceName));return{buttonName:this.buttonName,destinationName:this.destinationName,elementType:this._elementType,elementID:this.elementId,interfaceName:this.interfaceName,interfaceType:this._interfaceType,saveClickInfo:this.saveClickInfo,instanceId:k,instanceType:this.instanceType}}};(0,G.Cg)([(0,Gi.b)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],Xs.prototype,"_segment",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xs.prototype,"buttonName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xs.prototype,"destinationName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xs.prototype,"elementId",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xs.prototype,"_elementType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xs.prototype,"interfaceName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xs.prototype,"_interfaceType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xs.prototype,"saveClickInfo",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Xs.prototype,"getInstanceIdFromInterface",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xs.prototype,"instanceId",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xs.prototype,"instanceType",void 0),Xs=(0,G.Cg)([(0,j.EVk)("SegmentButtonPropertiesProvider",W.Y.analytics)],Xs);class Zs extends j.uFJ{constructor(){super(...arguments),this.totalLifetime=3,this.burstTime=.4,this.lingerTime=2.4}update(k,B){const U=this.totalLifetime-k.life;if(Utt.q.instance.prodigy.game.time.events.remove(k)))}const B=new j.Qgu,U=new j.mYY;U.point1.setTo(this._linePoint1.x,this._linePoint1.y),U.point2.setTo(this._linePoint2.x,this._linePoint2.y);const F=new Js(this.totalAnimationTime,this._maxBurstSpeed),G=new Zs,$=this.GameObject.transform.worldMatrix.applyInverse(this.particleTargetDirection.transform.worldPosition);G.endLocationX=$.x,G.endLocationY=$.y,G.totalLifetime=this.totalAnimationTime,G.burstTime=this._burstTime,G.lingerTime=this._lingerTime,tt.q.instance.prodigy.load.assets([ps.q.Xp_stardust],(()=>{B.imageGuid=this._source,this._frame&&(B.frame=this._frame),this._particleSystem=this.gameObject.addComponent(j.okU),this._particleSystem.emitPerSecond.setMinMax(this._particlePerSecond,this._particlePerSecond),this._particleSystem.initializers=[B,U,F],this._particleSystem.behaviours=[G],this._particleSystem.worldSpace=!0,this._particleSystem.emit(this._totalParticles),this._particleSystem.emitPerSecond.setMinMax(1e-5,1e-5),this.onStartParticles.dispatch()}))}stopParticles(){this._particleSystem&&(this._particleSystem.destroy(),this._particleSystem=null,this.onStopParticles.dispatch())}destroy(){this.stopParticles(),this.onStartParticles.dispose(),this.onStopParticles.dispose(),super.destroy()}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],tn.prototype,"particleTargetDirection",void 0),(0,G.Cg)([(0,j.Bak)(),(0,j.W_S)(),(0,G.Sn)("design:type",String)],tn.prototype,"_source",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],tn.prototype,"_frame",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tn.prototype,"_particlePerSecond",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],tn.prototype,"_linePoint1",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],tn.prototype,"_linePoint2",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],tn.prototype,"_autoRun",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],tn.prototype,"onStartParticles",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],tn.prototype,"onStopParticles",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tn.prototype,"_totalParticles",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tn.prototype,"totalAnimationTime",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tn.prototype,"_burstTime",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tn.prototype,"_lingerTime",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tn.prototype,"_maxBurstSpeed",void 0),tn=(0,G.Cg)([(0,j.EVk)("ParticleBurstAndZip",W.Y.animation)],tn);var en=U(47255);let sn=class extends j.uAl{constructor(){super(...arguments),this.SINGLE_REWARD_QUEST_HEIGHT=124,this.DOUBLE_REWARD_QUEST_HEIGHT=154,this.MAGICOIN_ANIM_SPINE="magicoin",this.MAGICOIN_ICON_SIZE_DELTA=52,this.XP_ICON_FRAME_NAME="xp-icon-80x80",this.XP_ANIM_SPINE="treasure-token-burst",this.XP_ICON_SIZE_DELTA=33}create(){super.create(),this._closeCallback=this.getInjectedValue(hs.XU.CloseCallback),this._destroyBattlePassMenuCallback=this.getInjectedValue(hs.XU.DestroyBattlePassMenuCallback)}setup(k,B){B&&(this._particleAnimation.particleTargetDirection=B);const U=j.Aq$.isDefined(k.comingSoonDate),F=k.questType;this.goButton.GameObject.active=!1,this._questCompleteIcon.active=!1,this._questData=k,this._questType.text=this._baseLocalizer.getText(Vs.IC[F]),this._questTypeComingSoon.text=this._baseLocalizer.getText(Vs.IC[F]),this._questDescription.text=k.questDescription,this._lockedIcon.active=U,this._questTypeContainer.active=!U,this._questTypeContainerComingSoon.active=U,this.setupClaimButton(k.reward),!k.questGoButtonAction||k.reward.claimable||k.reward.claimed||k.comingSoonDate||this.setupGoButton(k.questGoButtonAction);if(!k.reward.itemDrop||!k.reward.battlePassXp?this.setupSingleReward(k.reward,U):this.setupDoubleReward(k.reward,U),k.reward.claimed)this._completeProgressBarState.applyStateToProgressBar(this._progressBar,1),this._questCompleteIcon.active=!0;else if(k.reward.claimable)this._claimableProgressBarState.applyStateToProgressBar(this._progressBar,1);else if(U)this._progressBar.setValue(1),this._comingSoonProgressBarState.applyStateToProgressBar(this._progressBar,1);else{const B=k.currentProgress/k.targetProgress,U=`${k.currentProgress} / ${k.targetProgress}`;this._normalProgressBarState.applyStateToProgressBar(this._progressBar,B,U)}this._memberIcon.active=k.isMemberQuest}setupGoButton(k){let B,U;switch(k){case Vs.Nz.EvolvePet:B=()=>{tt.q.instance.prodigy.open.pets(this._closeCallback),this._destroyBattlePassMenuCallback()},U=us.B.PetsWindow;break;case Vs.Nz.BecomeAMember:B=()=>{const k={conversionFunnelName:en.o.FunnelBattlePassMemberUnlock};tt.q.instance.prodigy.open.membershipInfo(this._closeCallback,k,"member-button"),this._destroyBattlePassMenuCallback()},U=us.B.KidsMlpModalNonMember}B&&(this._goButtonSegmentProperties.destinationName=U,this.goButton.GameObject.active=!0,this.goButton.onClick.addOnce(B,this))}updateQuestData(){this._questManager.getCurrentBattlePassData().then((k=>{var B;const U=k.getQuestById(null===(B=this._questData)||void 0===B?void 0:B.goalTaskId);U&&!ct.isEqual(this._questData,U)&&this.setup(U)})).catch(j.RQr.createHandler("BattlePassQuestGoalComponent::updateQuestData Failed to update battle pass quest data"))}setupSingleReward(k,B){this.gameObject.transform.fullHeight=this.SINGLE_REWARD_QUEST_HEIGHT,k.itemDrop?this.isMagicoinReward(k)?this.setUpMagicoinReward(k.itemDrop):this.setUpItemCard(k).catch(j.RQr.createHandler("Failed to set up a single reward item card for a battle pass quest goal")):this.setUpXpReward(k),this._doubleRewardContainer.active=!1,this._singleBackground.active=!B,this._singleBackgroundComingSoon.active=B}setupDoubleReward(k,B){this.gameObject.transform.fullHeight=this.DOUBLE_REWARD_QUEST_HEIGHT,k.itemDrop&&(this.isMagicoinReward(k)?this.setUpMagicoinReward(k.itemDrop):this.setUpItemCard(k).catch(j.RQr.createHandler("Failed to set up a single reward item card for a battle pass quest goal"))),this._secondaryRewardText.text=`+${k.battlePassXp}`,this._singleBackground.active=!1,this._singleBackgroundComingSoon.active=!1,this._doubleRewardContainer.active=!0,this._doubleBackground.active=!B,this._doubleBackgroundComingSoon.active=B}setUpItemCard(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=yield this._prefabLoader.loadWithDependenciesFromGUID(Rt.l.BattlePassItemCard);B.parent=this._primaryRewardAnchor,this._primaryRewardContainer.active=!1;const U=B.findComponent(Ls);yield U.setUp(k)}))}isMagicoinReward(k){var B,U;return"currency"===(null===(B=k.itemDrop)||void 0===B?void 0:B.type)&&27===(null===(U=k.itemDrop)||void 0===U?void 0:U.ID)}setUpMagicoinReward(k){this._primaryRewardText.text=`+${k.N}`,this._primaryRewardIcon.updateAsset(ps.q.Icon_currency_27);const B=this._primaryRewardIcon.GameObject.findComponent(j.XVE);B.setSizeDelta(this.MAGICOIN_ICON_SIZE_DELTA,this.MAGICOIN_ICON_SIZE_DELTA),B.setPositionY(-10)}setUpXpReward(k){this._primaryRewardText.text=`+${k.battlePassXp}`,this._primaryRewardIcon.updateAsset(Ve._.Ui_battle_pass_json,this.XP_ICON_FRAME_NAME);const B=this._primaryRewardIcon.GameObject.findComponent(j.XVE);B.setSizeDelta(this.XP_ICON_SIZE_DELTA,this.XP_ICON_SIZE_DELTA),B.setPositionY(-10)}setupClaimButton(k){var B;this.claimButton.GameObject.active=k.claimable,null===(B=this.claimButton.onClick)||void 0===B||B.removeAll(),k.claimable&&(this.claimButton.inputEnabled=!0,this.claimButton.onClick.add((()=>{this.claimButton.inputEnabled=!1,this.claimButton.onClick.removeAll(),this.isMagicoinReward(k)?this._claimAnimationSpineAnimator.playAnimation(this.MAGICOIN_ANIM_SPINE,!1):this._claimAnimationSpineAnimator.playAnimation(this.XP_ANIM_SPINE,!1),this.runParticleTrail(k),this._questManager.sendRewardClaimedEvent(k.rewardId).catch(j.RQr.createHandler(`Failed to claim battle pass reward ${k.rewardId}`)),this._segment.battlePass.generateRewardClaimedTransactionId(),this._segment.featureCommon.sendButtonEvent({buttonName:Is.k.BattlePassClaimQuestButton,interfaceName:us.B.BattlePassMenu,interfaceType:ui.Wm.BattlePass,transactionId:this._segment.battlePass.rewardClaimedTransactionId})})))}runParticleTrail(k){k.battlePassXp&&(this._particleAnimation.run(),this._particleAnimation.onStartParticles.add((()=>{window.setTimeout((()=>{this._particleAnimation.stopParticles()}),1e3*this._particleAnimation.totalAnimationTime)})))}destroy(){this.claimButton.onClick.removeAll(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],sn.prototype,"_segment",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],sn.prototype,"_questType",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],sn.prototype,"_questTypeComingSoon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_questTypeContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_questTypeContainerComingSoon",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],sn.prototype,"_questDescription",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],sn.prototype,"goButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],sn.prototype,"claimButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_doubleRewardContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_singleBackground",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_singleBackgroundComingSoon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_doubleBackground",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_doubleBackgroundComingSoon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_primaryRewardContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_primaryRewardAnchor",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],sn.prototype,"_primaryRewardIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],sn.prototype,"_primaryRewardText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],sn.prototype,"_secondaryRewardText",void 0),(0,G.Cg)([(0,j.MnK)(ys.z),(0,G.Sn)("design:type",ys.z)],sn.prototype,"_progressBar",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_memberIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_lockedIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],sn.prototype,"_questCompleteIcon",void 0),(0,G.Cg)([(0,j.MnK)(_s),(0,G.Sn)("design:type",_s)],sn.prototype,"_normalProgressBarState",void 0),(0,G.Cg)([(0,j.MnK)(_s),(0,G.Sn)("design:type",_s)],sn.prototype,"_claimableProgressBarState",void 0),(0,G.Cg)([(0,j.MnK)(_s),(0,G.Sn)("design:type",_s)],sn.prototype,"_completeProgressBarState",void 0),(0,G.Cg)([(0,j.MnK)(_s),(0,G.Sn)("design:type",_s)],sn.prototype,"_comingSoonProgressBarState",void 0),(0,G.Cg)([(0,j.MnK)(tn),(0,G.Sn)("design:type",tn)],sn.prototype,"_particleAnimation",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],sn.prototype,"_claimAnimationSpineAnimator",void 0),(0,G.Cg)([(0,j.MnK)(Xs),(0,G.Sn)("design:type",Xs)],sn.prototype,"_goButtonSegmentProperties",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],sn.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],sn.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],sn.prototype,"_baseLocalizer",void 0),sn=(0,G.Cg)([(0,j.EVk)("BattlePassQuestGoal",W.Y.battlePass)],sn);let nn=class extends j.uAl{constructor(){super(...arguments),this._whiteXpIconTweenDuration=2,this._progressBarTweenInProgress=!1,this._hasBeenCreated=!1}postCreate(){super.postCreate(),this._goToRewardsCallback=this.getInjectedValue(hs.XU.MenuBarRewardTabOpenCallback),this.setUp().catch(j.RQr.createHandler("Error setting up the battle pass reward tracker on the quests screen")),this._hasBeenCreated=!0}setUp(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._questManager.getCurrentBattlePassData(),B=yield this._questManager.getBattlePassXpData(k.getXpId());this.setUpRewardDisplay(k,B).catch(j.RQr.createHandler("BattlePassQuestRewardTrackerComponent: Error setting up the reward display"))}))}updateQuestData(){!this._progressBarTweenInProgress&&this._hasBeenCreated&&this.setUp().catch(j.RQr.createHandler("Error queuing up the next quest data update for the quest tracker progress bar of the treasure track"))}destroy(){this._whiteXpIconTween&&tt.q.instance.game.tweens.remove(this._whiteXpIconTween),this._goToRewards.onClick.removeAll(),this._progressBar.onProgress.removeAll(),this._progressBar.onTweenValueComplete.removeAll(),super.destroy()}setUpRewardDisplay(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=k.getCurrentTier(),F=k.getAllTierData(),G=k.getTierData(U);if(!this._cachedTierData)return this.setTitleText(G),this._progressBar.setFromValues(G.currentProgress,G.targetProgress),this.setUpTopGroup(k),G.isInfiniteTier?(this._topPremiumRewardItemCard.GameObject.active=!1,this._freeRewardItemCard.GameObject.active=!1,this._bottomPremiumRewardItemCard.setUp(G.freeReward).catch(j.RQr.createHandler("Error setting up the infinite tier reward item card in the reward tracker of the treasure track"))):(this._topPremiumRewardItemCard.setUp(G.topPremiumReward).catch(j.RQr.createHandler("Error setting up the top premium reward item card in the reward tracker of the treasure track")),this._bottomPremiumRewardItemCard.setUp(G.bottomPremiumReward).catch(j.RQr.createHandler("Error setting up the bottom premium reward item card in the reward tracker of the treasure track")),this._freeRewardItemCard.setUp(G.freeReward).catch(j.RQr.createHandler("Error setting up the free reward item card in the reward tracker of the treasure track"))),this._cachedTierData=G,void(this._previousXpData=B);const $=B.total-this._previousXpData.total;this._previousXpData=B,$>0?(this.tweenWhiteXpIcon(),yield this.tweenProgressBar(F,this._cachedTierData.tier-1,$,this._cachedTierData.currentProgress)):this.setUpTopGroup(k)}))}tweenProgressBar(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){this._progressBarTweenInProgress=!0;const $=k[B],H=$.targetProgress;if(this._progressBar.onProgress.removeAll(),this._progressBar.onProgress.add(((k,B,U)=>{const F=Math.ceil(U*H);this._progressBar.setBarText(`${F} / ${H}`)})),U>=H-F)this._progressBar.tweenValue(1),this._progressBar.onTweenValueComplete.addOnce((()=>{(()=>(0,G.sH)(this,void 0,void 0,(function*(){const G=Math.min(B+1,k.length-1);yield this.onProgressBarFilled(k[G]),yield this.tweenProgressBar(k,G,U-(H-F),0)})))().catch(j.RQr.createHandler("Error tweening the progress bar for the reward tracker in the quests screen of the treasure track"))}),this);else{const k=F+U;this._progressBar.tweenValue(k/H),this._progressBar.onTweenValueComplete.addOnce((()=>{this._progressBar.setBarText(`${k} / ${H}`),this._cachedTierData=$,this._progressBarTweenInProgress=!1,this.setUp().catch(j.RQr.createHandler("Error queuing up the next progress bar update for the reward tracker in the quests screen of the treasure track"))}),this)}}))}onProgressBarFilled(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=[];k.isInfiniteTier?(this._topPremiumRewardItemCard.GameObject.active=!1,this._freeRewardItemCard.GameObject.active=!1,B.push(this._bottomPremiumRewardItemCard.setUp(k.freeReward))):(B.push(this._topPremiumRewardItemCard.setUp(k.topPremiumReward)),B.push(this._bottomPremiumRewardItemCard.setUp(k.bottomPremiumReward)),B.push(this._freeRewardItemCard.setUp(k.freeReward))),this.setTitleText(k),this._progressBar.setValue(0),this._progressBar.setBarText(`0 / ${k.targetProgress}`),yield Promise.all(B)}))}setUpTopGroup(k){const B=k.getNumUnclaimedRewards()>0;this._topGroupReadyToClaim.active=B,this._topGroupRegular.active=!B,this._goToRewards.onClick.add(this._goToRewardsCallback.bind(this))}tweenWhiteXpIcon(){if(this._whiteXpIconTween)return;const k={progress:0};this._whiteXpIconTween=tt.q.instance.prodigy.game.add.tween(k,this).to({progress:1},1e3*this._whiteXpIconTweenDuration,j.GS3.Linear.None,!1),this._whiteXpIconTween.onUpdate.add((()=>{let B;B=k.progress<=.5?j.cj9.inverseLerp(0,.5,k.progress):j.cj9.inverseLerp(1,.5,k.progress),this._whiteXpIcon.alpha=B})),this._whiteXpIconTween.onTweenComplete.add((()=>{this._whiteXpIcon.GameObject.active=!1,tt.q.instance.game.tweens.remove(this._whiteXpIconTween),this._whiteXpIconTween=null})),this._whiteXpIcon.alpha=0,this._whiteXpIcon.GameObject.active=!0,this._whiteXpIconTween.start()}setTitleText(k){this._treasureTitle.text=k.isInfiniteTier?(0,ms.k)("TT_INFINITE_TREASURE"):(0,ms.k)("TT_TREASURE_N",k.tier.toString())}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],nn.prototype,"_treasureTitle",void 0),(0,G.Cg)([(0,j.MnK)(ys.z),(0,G.Sn)("design:type",ys.z)],nn.prototype,"_progressBar",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],nn.prototype,"particleEndLocation",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],nn.prototype,"_whiteXpIcon",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],nn.prototype,"_whiteXpIconTweenDuration",void 0),(0,G.Cg)([(0,j.MnK)(Ls),(0,G.Sn)("design:type",Ls)],nn.prototype,"_topPremiumRewardItemCard",void 0),(0,G.Cg)([(0,j.MnK)(Ls),(0,G.Sn)("design:type",Ls)],nn.prototype,"_bottomPremiumRewardItemCard",void 0),(0,G.Cg)([(0,j.MnK)(Ls),(0,G.Sn)("design:type",Ls)],nn.prototype,"_freeRewardItemCard",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],nn.prototype,"_topGroupReadyToClaim",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],nn.prototype,"_topGroupRegular",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],nn.prototype,"_goToRewards",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],nn.prototype,"_questManager",void 0),nn=(0,G.Cg)([(0,j.EVk)("BattlePassQuestRewardTracker",W.Y.battlePass)],nn);let an=class extends j.uAl{constructor(){super(...arguments),this._questTabs=[]}postCreate(){super.postCreate(),this._closeCallback=this.getInjectedValue(hs.XU.CloseCallback),this._destroyBattlePassMenuCallback=this.getInjectedValue(hs.XU.DestroyBattlePassMenuCallback),this.setUpPanelImage().catch(j.RQr.createHandler("BattlePassQuestScreenControllerComponent: Failed to set up panel image")),this._battlePassQuestManager.getCurrentBattlePassData().then((k=>{const B=k.getQuestTypes(),U=B.map((k=>{const B=Vs.IC[k];if(!B)return k;const U=this._baseLocalizer.getText(B);return null!=U?U:k}));for(let F=0;F{this.populateQuests(B[F]).catch(j.RQr.createHandler(`Unable to populate quests for the ${B[F]} tab.`))}),this)}else k.active=!1}this.populateQuests(B[0]).catch(j.RQr.createHandler("Error populating quests in the battle pass quest screen controller component"))})).catch(j.RQr.createHandler("Error retrieving battle pass data for the battle pass quests screen"))}destroy(){var k;if(this._prefabLoadCancelablePromises)for(let B=0;B{const U=k=>{if(k.reward.claimable)return Number.MAX_VALUE;if(k.reward.claimed)return-Number.MAX_VALUE;if(k.sortPriority)return k.sortPriority;return k.currentProgress/k.targetProgress*100};return U(B)-U(k)})),F=this._questGridLayout,j=[];for(let k=0;k(0,G.sH)(this,void 0,void 0,(function*(){const B=Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.BattlePassQuestsComingSoonBanner,{[hs.n7.TimeRemainingMs]:k});this._prefabLoadCancelablePromises[0]=B,this._questGoalGameObjects[0]=yield B,this._questGoalGameObjects[0].name="QuestGoal-Banner"})))())}for(let k=0;k(0,G.sH)(this,void 0,void 0,(function*(){const B=U[k];if(!this._questGoalGameObjects[k+1]){const U=Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.BattlePassQuest,{[hs.XU.QuestDescription]:B.questDescription,[hs.XU.QuestType]:B.questType,[hs.XU.CloseCallback]:this._closeCallback.bind(this),[hs.XU.DestroyBattlePassMenuCallback]:this._destroyBattlePassMenuCallback.bind(this)});this._prefabLoadCancelablePromises[k+1]=U,this._questGoalGameObjects[k+1]=yield U,this._questGoalGameObjects[k+1].name=`QuestGoal-${k+1}`}const F=this._questGoalGameObjects[k+1].findComponent(sn);null==F||F.setup(B,this._rewardTracker.particleEndLocation)})))());yield Promise.all(j),H&&(this._questGoalGameObjects[0].active=!0,F.GameObject.addChild(this._questGoalGameObjects[0]));for(let k=1;k{tt.q.instance.prodigy.open.itemInfo(F)}));B||(this._cardOnClickButton.useHandCursor=!0);const H=this.getInjectedValue(hs.XU.RewardClaimedAnimationName),V=this.getInjectedValue(hs.XU.RewardMovementAnimationName),W=this.getInjectedValue(hs.XU.ItemTierNumber);this._claimedMovementAnimator.GameObject.active=!0,this._cardOnClickButton.onClick.add((()=>{if(k){this._cardOnClickButton.onClick.removeAll(),this._audioPlayer.play(),this._segment.battlePass.generateRewardClaimedTransactionId(),this._segment.featureCommon.sendButtonEvent({buttonName:Is.k.BattlePassClaimRewardButton,interfaceName:us.B.BattlePassMenu,interfaceType:ui.Wm.BattlePass,transactionId:this._segment.battlePass.rewardClaimedTransactionId}),this._cardOnClickButton.useHandCursor=!1;const k=(k,B)=>{B.data.name===Cs.MysteryRewardClaimSwitch&&$&&this._iconImage.setAsset(F.itemDrop.ID,F.itemDrop.type).catch(j.RQr.createHandler("[BattlePassRewardsScreenItemCard] Error setting the icon asset after mystery reward claim"))};this._claimedMovementAnimator.spine.onEvent.addOnce(k,this),this._claimedMovementAnimator.OnAnimationComplete.addOnce((()=>{$||this._claimedMovementAnimator.spine.onEvent.remove(k,this),this.onRewardClaimedComplete.dispatch()})),this.GameObject.findComponentsInChildren(rn.l).forEach((k=>{k.setup()})),this.onRewardClaimed.dispatch(),this._questManager.sendRewardClaimedEvent(F.rewardId).then((()=>this.onRewardClaimServerComplete.dispatch())).catch(j.RQr.createHandler(`Failed to claim battle pass reward ${F.rewardId}`)),this._claimedAnimationAnimator.playAnimation(H,!1),this._claimedMovementAnimator.playAnimation(V,!1)}else if(B)this._cardOnClickButton.useHandCursor=!1;else if(this._currentPlayer.player.isPlayingAtSchool()){const k=this._currentPlayer.player.getMemberTier(),B=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);let U="BATTLE_PASS_SCHOOL_MODE_CLAIM_TOOLTIP",F="";k!==xs._$.MemberLevelUp&&k!==xs._$.MemberCore||(U="BATTLE_PASS_SCHOOL_MODE_LEVEL_UP_CLAIM_TOOLTIP",F=B.getText(js.D.isFeatureEnabled()?"MEMBERSHIP_TIER_NAME_PLUS":"MEMBERSHIP_TIER_2_SHORT_NAME")),this._autoToolTip=on.A.displayToolTipAuto(this._autoToolTip,this._tooltipContainer,{bodyText:B.getText(U,F),xPosition:640,yPosition:100,arrowXRelPos:.7,arrowDirection:ze.i.DOWN})}else{let k=G?"Click-Ultimate-Item-Treasure-Track":"Click-Item-Treasure-Track";js.D.isFeatureEnabled()&&(k=G?"Click-Tier-2-Item-Treasure-Track":"Click-Tier-1-Item-Battle-Pass"),tt.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:k,category:"Treasure-Track",contentId:`${F.itemDrop.type}-${F.itemDrop.ID}`,adType:Fs.R.BattlePassUpsell}),js.D.isFeatureEnabled()?tt.q.instance.prodigy.open.itemInfo(F):tt.q.instance.prodigy.open.battlePassMembershipModal(W).catch(j.RQr.createHandler("Failed to open battle pass membership modal"))}}))}destroy(){this.onRewardClaimedComplete.dispose(),this.onRewardClaimed.dispose(),this.onRewardClaimServerComplete.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],cn.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],cn.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],cn.prototype,"_segment",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],cn.prototype,"_cardOnClickButton",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cn.prototype,"onRewardClaimedComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cn.prototype,"onRewardClaimed",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cn.prototype,"onRewardClaimServerComplete",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],cn.prototype,"_claimedAnimationAnimator",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],cn.prototype,"_claimedMovementAnimator",void 0),(0,G.Cg)([(0,j.MnK)(hn.J),(0,G.Sn)("design:type",hn.J)],cn.prototype,"_audioPlayer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cn.prototype,"_tooltipContainer",void 0),(0,G.Cg)([(0,j.MnK)(os.X),(0,G.Sn)("design:type",os.X)],cn.prototype,"_iconImage",void 0),cn=(0,G.Cg)([(0,j.EVk)("BattlePassRewardsScreenItemCard",W.Y.battlePass)],cn);var dn=U(223),ln=U(77981),un=U(89305),fn=U(9475),bn=U(1959);let pn=class extends j.uAl{constructor(){super(...arguments),this.coreChaseItems=[],this.plusChaseItems=[],this.ultraChaseItems=[],this.coreGroupLabels=[],this.plusGroupLabels=[],this.ultraGroupLabels=[],this.showOtpUpsell=!1}create(){const k=Object.create(null,{create:{get:()=>super.create}});return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G,$,H,V,W,q,K,z,Y,Q,X,Z,J,et,it,st,nt;k.create.call(this),this._battlePassQuestData=yield this._questManager.getCurrentBattlePassData();const at={};if(this._battlePassQuestData){const k=null===(B=this._battlePassQuestData)||void 0===B?void 0:B.getThreeTierPlusAnimatedPets(),H=null===(U=this._battlePassQuestData)||void 0===U?void 0:U.getThreeTierUltraAnimatedPets(),V=null!==(F=null==k?void 0:k[0])&&void 0!==F?F:void 0,W=null!==(G=null==H?void 0:H[0])&&void 0!==G?G:void 0,q=null!==($=null==H?void 0:H[1])&&void 0!==$?$:void 0;j.Aq$.isDefined(V)&&(at[hs.XU.LevelupMythicGuid]=rs.Q[`Spine_pet_${V}_json`]),j.Aq$.isDefined(W)&&(at[hs.XU.MythicGuid]=rs.Q[`Spine_pet_${W}_json`]),j.Aq$.isDefined(q)&&(at[hs.XU.UltimateMemberPetGuid]=rs.Q[`Spine_pet_${q}_json`]),at[hs.XU.MagicoinAmount]=fn.S.DEFAULT_MAGICOIN_AMOUNT}else at[hs.XU.MagicoinAmount]=fn.S.DEFAULT_MAGICOIN_AMOUNT;Nt.d.updateInjectedValues(this.gameObject,at);const rt=this._loggedInPlayer.player.getMemberTier(),ot=(0,Bt.G)(dn.l).enabled;let ht=!1,ct=!1,dt=!1;const lt=this.showOtpUpsell&&ot,ut=(0,un.nO)(ln.r.English);if(Gs.pF.eligibleForMembershipPurchaseForMultipleTiers()?rt===xs._$.NonMember?(ht=this.coreMemberCTA&&!lt,ct=!lt,dt=!0):(ht=this.coreMemberCTA&&rt===xs._$.MemberCore&&!lt,ct=(rt===xs._$.MemberCore||rt===xs._$.MemberPlus&&!ut)&&!lt,dt=!ut&&rt!==xs._$.MemberUltra):(ht=this.coreMemberCTA&&rt===xs._$.NonMember&&!Gs.pF.isNativeApp(),ct=rt===xs._$.NonMember||rt===xs._$.MemberCore),!(ht||ct||dt||lt)){const k=rt===xs._$.MemberUltra||this.showOtpUpsell?"YOU_DONT_HAVE_ENOUGH_MAGICOIN":"MEMBER_AD_VISIT_SITE_BODY";tt.q.instance.prodigy.open.message(this._localizer.getText(k)),this.GameObject.destroyDeferred()}if(ht){const k=null!==(H=bn.A.CHASE_PRIZES.coreChaseItems)&&void 0!==H?H:[];for(let U=0;UU){if(k[U].disable){this.coreChaseItems[U].active=!1;continue}this.coreChaseItems[U].findComponentInChildren(j.EYj).text=1===k[U].quantity?"":null!==(W=null===(V=k[U].quantity)||void 0===V?void 0:V.toString())&&void 0!==W?W:"",this.coreChaseItems[U].findComponentInChildren(os.X).setAsset(k[U].id,k[U].type).catch((k=>{j.VyI.log(`Battle pass was unable to load asset for level up chase item at index ${U}`,j.$bb.Error)}))}const B=null===(q=this._battlePassQuestData)||void 0===q?void 0:q.getThreeTierCoreLabels();for(let U=0;UU){if(k[U].disable){this.plusChaseItems[U].active=!1;continue}this.plusChaseItems[U].findComponentInChildren(j.EYj).text=1===k[U].quantity?"":null!==(Q=null===(Y=k[U].quantity)||void 0===Y?void 0:Y.toString())&&void 0!==Q?Q:"",this.plusChaseItems[U].findComponentInChildren(os.X).setAsset(k[U].id,k[U].type).catch((k=>{j.VyI.log(`Battle pass was unable to load asset for level up chase item at index ${U}`,j.$bb.Error)}))}const B=null===(X=this._battlePassQuestData)||void 0===X?void 0:X.getThreeTierPlusLabels();for(let U=0;UU){if(k[U].disable){this.ultraChaseItems[U].active=!1;continue}this.ultraChaseItems[U].findComponentInChildren(j.EYj).text=1===k[U].quantity?"":null!==(it=null===(et=k[U].quantity)||void 0===et?void 0:et.toString())&&void 0!==it?it:"",this.ultraChaseItems[U].findComponentInChildren(os.X).setAsset(k[U].id,k[U].type).catch((k=>{j.VyI.log(`Battle pass was unable to load asset for ultimate chase item at index ${U}`,j.$bb.Error)}))}const B=null===(st=this._battlePassQuestData)||void 0===st?void 0:st.getThreeTierUltraLabels();for(let U=0;U1&&(Z[`${V.ChaseItemUltraQuantityPrefix}${j}`]=X[j].quantity),Z[`${V.ChaseItemUltraPrefix}${j}`]=[X[j].id,X[j].type];const J=null!==(G=null==H?void 0:H.getThreeTierPlusChaseItems())&&void 0!==G?G:bn.A.CHASE_PRIZES.plusChaseItems,tt={};for(let j=0;j1&&(tt[`${V.ChaseItemPlusQuantityPrefix}${j}`]=J[j].quantity),tt[`${V.ChaseItemPlusPrefix}${j}`]=[J[j].id,J[j].type];const et=null!==($=null==H?void 0:H.getThreeTierCoreChaseItems())&&void 0!==$?$:bn.A.CHASE_PRIZES.coreChaseItems,it={};for(let j=0;j1&&(it[`${V.ChaseItemCoreQuantityPrefix}${j}`]=et[j].quantity),it[`${V.ChaseItemCorePrefix}${j}`]=[et[j].id,et[j].type];const st=null==H?void 0:H.getThreeTierCoreLabels(),nt=null==H?void 0:H.getThreeTierPlusLabels(),at=null==H?void 0:H.getThreeTierUltraLabels(),rt=Object.assign(Object.assign(Object.assign({},st.reduce(((k,B,U)=>Object.assign(Object.assign({},k),{[`${V.ChaseItemCoreTextPrefix}${U}`]:B})),{})),nt.reduce(((k,B,U)=>Object.assign(Object.assign({},k),{[`${V.ChaseItemPlusTextPrefix}${U}`]:B})),{})),at.reduce(((k,B,U)=>Object.assign(Object.assign({},k),{[`${V.ChaseItemUltraTextPrefix}${U}`]:B})),{})),ot=this._loggedInPlayer.player.getMemberTier(),ht={[V.IsPlayerCoreMember]:ot===xs._$.MemberCore,[V.IsPlayerPlusMember]:ot===xs._$.MemberPlus,[V.IsPlayerUltraMember]:ot===xs._$.MemberUltra,[V.ShowCorePanel]:xs._$.NonMember||ot===xs._$.MemberCore,[V.ShowCoreCta]:ot===xs._$.NonMember,[V.ShowPlusPanel]:ot!==xs._$.MemberUltra,[V.ShowPlusCta]:ot===xs._$.NonMember||ot===xs._$.MemberCore,[V.ShowUltraCta]:ot!==xs._$.MemberUltra};Nt.d.updateInjectedValues(this.gameObject,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Q),Z),tt),it),rt),ht))}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],vn.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],vn.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],vn.prototype,"_bindOnCreate",void 0),vn=(0,G.Cg)([(0,j.EVk)("BattlePassThreeTierChaseItemsDataProvider",W.Y.battlePass)],vn);var gn,mn=U(87490),yn=U(38156);let _n=gn=class extends j.uAl{constructor(){super(...arguments),this._itemCards=[],this._loadingSpinners=[],this._itemCardPromises=[],this._pauseUpdates=0}setup(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this._tierNumber)return this._tierNumber=k,this._questManager.onDataChanged.add((()=>{this.updateData().catch(j.RQr.createHandler("Failed to update tier after battle pass data update"))}),this),this.updateData()}))}updateData(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;if(this._pauseUpdates>0)return;const U=null===(k=yield this._questManager.getCurrentBattlePassData())||void 0===k?void 0:k.getTierData(this._tierNumber);if(U&&dt().isEqual(this._currentTierData,U))return;this._currentTierData=U,this._currentTierIcon.active=null!==(B=null==U?void 0:U.isCurrentTier)&&void 0!==B&&B,this._completedTierBackground.active=!1,this._currentTierBackground.active=!1,j.Aq$.isDefined(this._uncompletedTierBackground)&&(this._uncompletedTierBackground.active=!1),U&&(U.isCompleted?(this._completedTierBackground.active=!0,this._currentTierBackground.destroy()):U.isCurrentTier?(this._currentTierBackground.active=!0,this._completedTierBackground.destroy()):j.Aq$.isDefined(this._uncompletedTierBackground)&&(this._uncompletedTierBackground.active=!0)),this.setUpProgressBar(U);(U?[U.topPremiumReward,U.bottomPremiumReward,U.freeReward]:[{rewardId:gn.EMPTY_REWARD_ID,membershipTier:xs._$.MemberUltimateMath},{rewardId:gn.EMPTY_REWARD_ID,membershipTier:xs._$.MemberLevelUp},{rewardId:gn.EMPTY_REWARD_ID,membershipTier:xs._$.NonMember}]).forEach(((k,B)=>{var G,j;if(k){const $=null!==(G=null==U?void 0:U.tier)&&void 0!==G?G:B+1;this._itemCardPromises.push(this.setUpItemCard(this._itemCards[B],k,$,null!==(j=null==U?void 0:U.isCompleted)&&void 0!==j&&j,this._loadingSpinners[B]).then((()=>{this._itemCards[B].findComponentInChildren(F.$).getRootContainer().name=`Tier ${$} ${this._itemCards[B].name}`})))}})),yield Promise.all(this._itemCardPromises.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k.promise})))))}))}destroy(){this._itemCardPromises.forEach((k=>k.cancel())),this._questManager.onDataChanged.removeAll(this),super.destroy()}setUpItemCard(k,B,U,F,G){var $,H,V,W,q;const K=null===(V=Yt.t.getItem(null===($=B.itemDrop)||void 0===$?void 0:$.type,null===(H=B.itemDrop)||void 0===H?void 0:H.ID))||void 0===V?void 0:V.data,z=null!==(W=null==K?void 0:K.rarity)&&void 0!==W?W:0;let Y="";B.itemDrop?Y=("currency"===B.itemDrop.type||"gold"===B.itemDrop.type)&&null!==(q=Ns[B.itemDrop.ID])&&void 0!==q?q:Ms:G.active=!1;const Q=B.isMystery?"claim-mystery":"claim";let X="";(F&&!B.claimed||js.D.isFeatureEnabled())&&(X=B.membershipTier===xs._$.MemberUltimateMath?Ve._.Ui_battle_pass_ultimate_json:Ve._.Ui_battle_pass_json);let Z=ws.Free,J=0,et=Ts.Free;B.membershipTier===xs._$.MemberUltimateMath?(Z=ws.Ultimate,J=50,et=Ts.Plus):B.membershipTier===xs._$.MemberLevelUp&&(Z=ws.Premium,et=Ts.Core);let it=Rt.l.BattlePassRewardsScreenItemCard,st=B.membershipTier===xs._$.MemberLevelUp,nt=B.membershipTier===xs._$.MemberUltimateMath,at=F&&!B.claimed;if(js.D.isFeatureEnabled()){it=Rt.l.BattlePassRewardsScreenItemCardWithLock;const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getMemberTier();B.claimed||B.claimable?(st=!1,nt=!1):(st=st&&k===xs._$.NonMember,nt=nt&&(k===xs._$.NonMember||k===xs._$.MemberLevelUp||k===xs._$.MemberCore))}else{const k=Ws.h.isFeatureEnabled()&&yn.n.playerMembershipMeetsRewardMembership(B.membershipTier)||!Ws.h.isFeatureEnabled();at=at&&k}const rt=new j.kBN((($,H)=>{var V,W,q;Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,it,{[hs.XU.ItemCardRarityBackgroundAtlasGuid]:Ve._.Ui_battle_pass_json,[hs.XU.ItemCardRarityBackgroundFrameName]:Object.values(Es)[z],[hs.XU.ItemCardClaimableBorderAtlasGuid]:X,[hs.XU.ItemCardClaimableBorderFrameName]:Z,[hs.XU.ItemCardClaimableBorderFrameSizeDelta]:[J,J],[hs.XU.ItemCardOffSeasonStateAtlasGuid]:Ve._.Ui_battle_pass_ultimate_json,[hs.XU.ItemCardOffSeasonStateFrameName]:et,[hs.XU.ItemCardOffSeasonStateIsEnabled]:B.rewardId===gn.EMPTY_REWARD_ID,[hs.XU.ItemCardCollectedTextBackingColour]:Object.values(Ss)[z],[hs.XU.ItemCardCollectedTextBackingStrokeColour]:Object.values(As)[z],[hs.XU.ItemCardCollectedTextColour]:null!==(V=Ps[z])&&void 0!==V?V:"#FFFFFF",[hs.XU.ItemRewardId]:B.isMystery&&!B.claimed?182:null===(W=B.itemDrop)||void 0===W?void 0:W.ID,[hs.XU.ItemRewardType]:B.isMystery&&!B.claimed?"item":null===(q=B.itemDrop)||void 0===q?void 0:q.type,[hs.XU.ItemTierNumber]:U,[hs.XU.IsMysteryReward]:B.isMystery,[hs.XU.IsLevelupMemberReward]:st,[hs.XU.IsUltimateMemberReward]:nt,[hs.XU.Reward]:B,[hs.XU.RewardAmount]:B.itemDrop?`x${B.itemDrop.N}`:"",[hs.XU.RewardClaimable]:B.claimable,[hs.XU.RewardClaimed]:B.claimed,[hs.XU.RewardClaimedAnimationGuid]:rs.Q.Spine_claim_currency_json,[hs.XU.RewardClaimedAnimationName]:Y,[hs.XU.RewardMovementAnimationName]:Q,[hs.XU.ShowRewardClaimableAnimation]:at,[hs.XU.RewardClaimableAnimationName]:[B.membershipTier===xs._$.MemberUltimateMath?"idle-ready-ultimate":"idle-ready",!0],[hs.XU.ShowRewardAmount]:B.itemDrop&&!B.isMystery&&!B.claimed&&B.itemDrop.N>1,[hs.XU.TierComplete]:F,[hs.XU.ShouldHighlightCard]:!0}).then((B=>{if(rt.cancelled||!B||B.isDestroyed)(null==B?void 0:B.isDestroyed)||B.destroy();else{k.children.forEach((k=>{k.destroy()}));const U=B.transform;B.parent=k,U.setPivot(.5,.5),U.setAnchorMin(.5,.5),U.setAnchorMax(.5,.5);const F=B.findComponentInChildren(os.X);F&&(F.isLoaded?G.active=!1:F.onItemDataLoaded.addOnce((()=>{G.active=!1}))),this.setUpRewardClaimHandlers(B.findComponentInChildren(cn))}$()})).catch(j.RQr.createHandler("Failed to load an item card in a battle pass tier"))}));return rt}setUpRewardClaimHandlers(k){k.onRewardClaimed.addOnce((()=>{this._pauseUpdates+=2}));const B=()=>{this._pauseUpdates--,this.updateData().catch(j.RQr.createHandler("Failed to update tier after pausing for reward claim"))};k.onRewardClaimServerComplete.addOnce(B),k.onRewardClaimedComplete.addOnce(B)}setUpProgressBar(k){if(this._progressBarCompleteIcon.active=!1,this._xpIcon.active=!1,this.setTierTitle(k),k)if(k.isCompleted)this.claimableRewardsExist(k)?this.applyStateToProgressBar(this._claimableProgressBarState,1):(this.applyStateToProgressBar(this._completeProgressBarState,1),It.O.isEnglishLocale()&&(this._progressBarCompleteIcon.active=!0));else if(k.isCurrentTier){const B=k.currentProgress/k.targetProgress,U=`${k.currentProgress} / ${k.targetProgress}`;this.applyStateToProgressBar(this._normalProgressBarState,B,U),this._xpIcon.active=!0}else this.applyStateToProgressBar(this._normalProgressBarState,0,"--");else this.applyStateToProgressBar(this._normalProgressBarState,0,"")}claimableRewardsExist(k){return k.topPremiumReward.claimable||k.bottomPremiumReward.claimable||k.freeReward.claimable}applyStateToProgressBar(k,B,U){k&&mn.Util.isDefined(B)&&k.applyStateToProgressBar(this._progressBar,B,U)}setTierTitle(k){const B=k?`${k.tier}`:this._tierNumber.toString();(null==k?void 0:k.isCurrentTier)?(this._currentTierTitle.text=B,this._nonCurrentTierTitle.text=""):(this._currentTierTitle.text="",this._nonCurrentTierTitle.text=B)}};_n.EMPTY_REWARD_ID="empty",(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],_n.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],_n.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_n.prototype,"_currentTierBackground",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_n.prototype,"_completedTierBackground",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_n.prototype,"_uncompletedTierBackground",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],_n.prototype,"_nonCurrentTierTitle",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],_n.prototype,"_currentTierTitle",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],_n.prototype,"_itemCards",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],_n.prototype,"_loadingSpinners",void 0),(0,G.Cg)([(0,j.MnK)(_s),(0,G.Sn)("design:type",_s)],_n.prototype,"_normalProgressBarState",void 0),(0,G.Cg)([(0,j.MnK)(_s),(0,G.Sn)("design:type",_s)],_n.prototype,"_claimableProgressBarState",void 0),(0,G.Cg)([(0,j.MnK)(_s),(0,G.Sn)("design:type",_s)],_n.prototype,"_completeProgressBarState",void 0),(0,G.Cg)([(0,j.MnK)(ys.z),(0,G.Sn)("design:type",ys.z)],_n.prototype,"_progressBar",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_n.prototype,"_progressBarCompleteIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_n.prototype,"_xpIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_n.prototype,"_currentTierIcon",void 0),_n=gn=(0,G.Cg)([(0,j.EVk)("BattlePassTier",W.Y.battlePass)],_n);let En=class extends j.uAl{constructor(){super(...arguments),this.onComplete=new j.HN0,this._loadOnCreate=!1}create(){super.create(),this._loadOnCreate&&this.load().catch(j.RQr.createHandler("LoadPrefabComponent: Error loading prefab on create"))}load(k=this._prefabId){var B;const U=this.gameObject.findComponent(j.bE_),F=Object.entries(null!==(B=null==U?void 0:U.injections)&&void 0!==B?B:{}).map((([k,B])=>({injectionName:k,data:B})));if(j.Aq$.isDefined(this._prefabGuid))return this._loader.loadWithDependenciesFromGUID(this._prefabGuid,this._parent,void 0,F).then((k=>(this.onComplete.dispatch(),k))).catch(j.RQr.createHandler("Error loading prefab from guid!"));if(j.Aq$.isDefined(k)){const B=tt.q.instance.prodigy.gameContainer.get("PrefabService").getPrefab(k);return this._loader.loadFromJSONWithDependencies(B,this._parent,void 0,F).then((k=>(this.onComplete.dispatch(),k))).catch(j.RQr.createHandler(`LoadPrefabComponent: Could not load prefab id ${k}`))}return new j.kBN((k=>{k(null)}))}destroy(){this.onComplete.dispose(),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],En.prototype,"_prefabId",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],En.prototype,"_prefabGuid",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],En.prototype,"_parent",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],En.prototype,"_loader",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],En.prototype,"onComplete",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],En.prototype,"_loadOnCreate",void 0),En=(0,G.Cg)([(0,j.EVk)("LoadPrefab",W.Y.utility)],En);var wn,Tn=U(37394);let Sn=wn=class extends Tn.D{constructor(){super(...arguments),this.onSetupComplete=new j.HN0,this._tiersShownAtOnce=4,this._tiersMovedAtOnce=4,this._tierShowingBuffer=1,this._centerSlotFromLeft=2,this._tierGridTweenDurationMs=750,this._leftEdgeBuffer=-20,this._rightEdgeBuffer=-20,this._tiersArrayPromises=[],this._leftMostTierIndex=1}create(){super.create(),this.createAsync().catch(j.RQr.createHandler("BattlePassTrackComponent: Failed to initialize."))}createAsync(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=yield this._questManager.getCurrentBattlePassData();if(!this._tierGrid.GameObject||this._tierGrid.GameObject.isDestroyed)return;B||this._offSeasonDialog.load(),this._tierGridRectTransform=this._tierGrid.GameObject.transform,yield this.createTiers(B);const U=this.getInjectedValue(hs.XU.FocusTierOverride);if(U){const k=this.gameObject.findComponentInParent(j.bE_,!0);null==k||k.unbindInjectedValue(hs.XU.FocusTierOverride)}yield this.centerTierGridOnCurrentTier(null!=U?U:null!==(k=null==B?void 0:B.getCurrentTier())&&void 0!==k?k:1),this.onSetupComplete.dispatch(),this._questManager.onDataChanged.add(this.handleBattlePassDataChanged,this)}))}handleBattlePassDataChanged(){this.showTiers().catch(j.RQr.createHandler("Error updating tracks after battle pass data changed."))}destroy(){this._moveTrackTween&&tt.q.instance.game.tweens.remove(this._moveTrackTween),this._tiersArrayPromises.forEach((k=>{k.cancel()})),this.onSetupComplete.dispose(),this._questManager.onDataChanged.remove(this.handleBattlePassDataChanged,this),super.destroy()}update(){super.update(),this.contentDraggingEnabled&&(this._contentClicked&&!this._contentDragged?this.checkDragStartHorizontal():this._contentDragged&&this.dragContentHorizontal())}createTiers(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U;this._numberOfRegularTiers=null!==(B=null==k?void 0:k.getNumTiers())&&void 0!==B?B:wn._DEFAULT_TIERS_OFF_SEASON;const F=null!==(U=null==k?void 0:k.hasInfiniteTier())&&void 0!==U&&U,j=F?this._numberOfRegularTiers+1:this._numberOfRegularTiers;this._tiersArrayPromises=new Array(j);let $=Rt.l.BattlePassTier,H=Rt.l.BattlePassInfiniteTier;js.D.isFeatureEnabled()&&($=Rt.l.BattlePassThreeTier,H=Rt.l.BattlePassThreeTierInfiniteTier);for(let k=0;kk.active=!1));F&&(this._tiersArrayPromises[this._numberOfRegularTiers]=this._prefabLoader.loadWithDependenciesFromGUID(H).then((k=>k.active=!1)));(yield Promise.all(this._tiersArrayPromises.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k.promise})))))).forEach((k=>{this.setupTierGameObject(k)})),this._numberOfTierGridEntries=this._tierGrid.GameObject.children.length,this._maxIndex=this._numberOfTierGridEntries-this._tiersShownAtOnce+1}))}setupTierGameObject(k){k.active=!1;const B=k.transform;k.parent=this._tierGrid.GameObject,B.setPivot(.5,.5),B.setAnchorMin(0,0),B.setAnchorMax(0,0)}showTiers(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._questManager.getCurrentBattlePassData();if(!this.gameObject||this.gameObject.isDestroyed)return;const B=this._leftMostTierIndex-1,U=this._leftMostTierIndex+this._tiersShownAtOnce;for(let F=0;F=B&&G<=U,G>=B-this._tiersMovedAtOnce&&G<=U+this._tiersMovedAtOnce&&this.setupVisibleGridObject(k,$,F).catch(j.RQr.createHandler("BattlePassTrackComponent: Error setting up a visible battle pass tier"))}this.setupNotificationBadges(k,this._leftMostTierIndex)}))}setupNotificationBadges(k,B){if(!k)return;const U=B+this._tiersShownAtOnce-1,F=k.getAllTierData(),G=k.getInfiniteTierData().timesClaimed{var F,j,$;const H=(null===(F=k.freeReward)||void 0===F?void 0:F.claimable)||(null===(j=k.topPremiumReward)||void 0===j?void 0:j.claimable)||(null===($=k.bottomPremiumReward)||void 0===$?void 0:$.claimable)||k.isInfiniteTier&&G;k.tierU&&H&&(this._rewardsToTheRightNotificationBadge.active=!0)}))}setupVisibleGridObject(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){var F;const G=null==k?void 0:k.getAllTierData(),j=null!==(F=null==G?void 0:G[U])&&void 0!==F?F:{tier:U+1};if(j.isInfiniteTier)return this.setupInfiniteTierComponent(B,k);const $=B.findComponent(_n);yield $.setup(j.tier)}))}setupInfiniteTierComponent(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=k.findComponent(ks),F=B.getInfiniteTierData();U&&F&&(yield U.setup(F).catch(j.RQr.createHandler("Error setting up the infinite battle pass tier.")))}))}moveTrackToIndex(k,B=!0){this._leftMostTierIndex=j.cj9.clamp(k,1,this._maxIndex);const U=this.adjustForBuffer(this._tierGrid.GameObject.children[this._leftMostTierIndex-1].transform.localPosition.x);this.displayVisibleTiers(),this.buildTierGridTween(-U,B),this._moveTrackLeftButton.active=this._leftMostTierIndex1}centerTierGridOnCurrentTier(k){return(0,G.sH)(this,void 0,void 0,(function*(){this.moveTrackToIndex(k-this._centerSlotFromLeft+1,!1)}))}moveTrackRight(){this._moveTrackTween||this.moveTrackToIndex(this._leftMostTierIndex-this._tiersMovedAtOnce)}moveTrackLeft(){this._moveTrackTween||this.moveTrackToIndex(this._leftMostTierIndex+this._tiersMovedAtOnce)}buildTierGridTween(k,B=!0){const U=this._tierGridRectTransform.anchoredPivotOffset.y,F={value:this._tierGridRectTransform.anchoredPivotOffset.x};this._moveTrackTween=tt.q.instance.game.add.tween(F,this).to({value:k},B?this._tierGridTweenDurationMs:0,j.GS3.Quadratic.In,!1),this._moveTrackTween.onUpdate.add((()=>{this._tierGridRectTransform.setAnchoredPivotOffset(F.value,U)})),this._moveTrackTween.onTweenComplete.add((()=>{Qt.J.callAfterFrameDelay((()=>{this.showTiers().catch(j.RQr.createHandler("Error updating tiers after tween.")),this._moveTrackTween=null}),3)})),this._moveTrackTween.start()}adjustForBuffer(k){return 1===this._leftMostTierIndex?k-this._leftEdgeBuffer:this._leftMostTierIndex===this._maxIndex?k+this._rightEdgeBuffer:k}displayVisibleTiers(){for(let k=this._leftMostTierIndex-1;k1}dragContentHorizontal(){const k=tt.q.instance.game.input.activePointer.x-this._lastDragMousePosition.x;this.moveContent(k),super.dragContentHorizontal()}onMouseWheel(k){super.onMouseWheel(k);const B=-j.cj9.clamp(k.deltaY,-this._maximumMouseWheelSpeed,this._maximumMouseWheelSpeed);this.moveContent(B)}};Sn._DEFAULT_TIERS_OFF_SEASON=5,(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],Sn.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Sn.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.MnK)(j.JTA),(0,G.Sn)("design:type",j.JTA)],Sn.prototype,"_tierGrid",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Sn.prototype,"_moveTrackRightButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Sn.prototype,"_rewardsToTheLeftNotificationBadge",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Sn.prototype,"_moveTrackLeftButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Sn.prototype,"_rewardsToTheRightNotificationBadge",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Sn.prototype,"onSetupComplete",void 0),(0,G.Cg)([(0,j.MnK)(En),(0,G.Sn)("design:type",En)],Sn.prototype,"_offSeasonDialog",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Sn.prototype,"_tiersShownAtOnce",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Sn.prototype,"_tiersMovedAtOnce",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Sn.prototype,"_tierShowingBuffer",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Sn.prototype,"_centerSlotFromLeft",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Sn.prototype,"_tierGridTweenDurationMs",void 0),Sn=wn=(0,G.Cg)([(0,j.EVk)("BattlePassTrack",W.Y.battlePass)],Sn);var An=U(96535);let Cn=class extends j.uAl{constructor(){super(...arguments),this.onHardModeUnlocked=new j.HN0,this.onHardModeLocked=new j.HN0,this.onExpertModeUnlocked=new j.HN0,this.onExpertModeLocked=new j.HN0,this._runOnCreate=!1}create(){super.create(),this._runOnCreate&&this.checkDifficultyUnlocks()}checkDifficultyUnlocks(){const k=this._activePlayer.data.difficultyUnlocks;if(!j.Aq$.isDefined(k))return void j.RQr.createHandler("DifficultyUnlocksGuardComponent.checkDifficultyUnlocks: difficultyUnlocks is undefined");const B=!0===k[fe.i.Hard],U=!0===k[fe.i.Expert];B?this.onHardModeUnlocked.dispatch():this.onHardModeLocked.dispatch(),U?this.onExpertModeUnlocked.dispatch():this.onExpertModeLocked.dispatch()}destroy(){super.destroy(),this.onHardModeUnlocked.dispose(),this.onHardModeLocked.dispose(),this.onExpertModeUnlocked.dispose(),this.onExpertModeLocked.dispose()}};(0,G.Cg)([(0,Gi.b)("306-5359"),(0,G.Sn)("design:type",An.W)],Cn.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Cn.prototype,"onHardModeUnlocked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Cn.prototype,"onHardModeLocked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Cn.prototype,"onExpertModeUnlocked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Cn.prototype,"onExpertModeLocked",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Cn.prototype,"_runOnCreate",void 0),Cn=(0,G.Cg)([(0,j.EVk)("DifficultyUnlocksGuard",W.Y.utility)],Cn);var On=U(2212),In=U(2090);let Dn=class extends j.uAl{create(){super.create(),this.setupDifficultyOverlay()}setupDifficultyOverlay(){var k;const B=tt.q.instance.prodigy.world.getCurrentZoneObject(),U=(0,Bt.G)(In.u).enabled&&On.J.isZoneMapDifficultyModeAgnostic(this._mapTag),F=null!==(k=this._activePlayer.currentDifficulty)&&void 0!==k?k:fe.i.Regular,G=(null==B?void 0:B.ID)===Ft.A_.LAMPLIGHT&&tt.q.instance.prodigy.skin.isFestivalActive();if(U&&!G&&F!==fe.i.Regular)switch(F){case fe.i.Hard:this._hardModeOverlay&&(this._hardModeOverlay.active=!0);break;case fe.i.Expert:this._expertModeOverlay&&(this._expertModeOverlay.active=!0)}}};(0,G.Cg)([(0,j.Cdj)("ZONE_MAP_TAG"),(0,G.Sn)("design:type",String)],Dn.prototype,"_mapTag",void 0),(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],Dn.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Dn.prototype,"_hardModeOverlay",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Dn.prototype,"_expertModeOverlay",void 0),Dn=(0,G.Cg)([(0,j.EVk)("DifficultyOverlayDisplay",W.Y.zones)],Dn);var Rn=U(92591),Pn=U(16495);class Mn{constructor(){this._onFinished=new j.HN0}get onFinished(){return this._onFinished}enter(){}exit(){}update(){}destroy(){this._onFinished.dispose(),this._onFinished=null}finish(){this._onFinished.dispatch()}}class Nn extends Mn{constructor(k,B){super(),this._animationName=null,this._animators=null,this._animators=k,this._animationName=B}enter(){(0,Pn.sR)(this._animators,this._animationName,!0)}setAnimationName(k){this._animationName=k}setAnimators(k){this._animators=k}}var xn=U(6997);class Ln extends Mn{constructor(k,B){super(),this._animationName=null,this._animators=null,this._animatorSemaphore=null,this._animators=k,this._animationName=B}destroy(){var k;null===(k=this._animatorSemaphore)||void 0===k||k.destroy(),this._animatorSemaphore=null,super.destroy()}enter(){(0,ut.v)(null===this._animatorSemaphore,"Entering a state with a pending animation semaphore"),this._animatorSemaphore=new xn.o,this._animatorSemaphore.init((()=>{this.onFinished.dispatch()}),this._animators.length);const k=this._animators.length;for(let B=0;B=this.keepChargeCost;B?U?(k.changeGold(-1*this.keepChargeCost),this.onSpendCoins.dispatch()):this.onMemberInsufficientGold.dispatch():this.onShowMembershipModal.dispatch()}addMembershipPurchaseListener(){tt.q.instance.prodigy.game.broadcaster.addAppListener(jn.H3.MembershipResponseReceived,this.handleMembershipChange,this)}handleMembershipChange(k){"success"===k&&(tt.q.instance.prodigy.game.broadcaster.removeAppListener(jn.H3.MembershipResponseReceived,this),this.onSpendCoins.dispatch())}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],$n.prototype,"keepChargeCost",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$n.prototype,"onTaskComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$n.prototype,"onSpendCoins",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$n.prototype,"onMemberInsufficientGold",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$n.prototype,"onShowMembershipModal",void 0),$n=(0,G.Cg)([(0,j.EVk)("ChargedLevelsMembershipButton")],$n);var Hn,Vn=U(5491),Wn=U(88060),qn=U(90744),Kn=U(97651),zn=U(43754),Yn=U(55122),Qn=U(46855);!function(k){k.NumberLevelsLost="NUMBER_OF_LEVELS_LOST",k.KeepChargeCost="KEEP_CHARGE_COST",k.GoldCoins="GOLD_COINS",k.MagicoinAmount="MAGICOIN_AMOUNT",k.TargetGoldCoins="TARGET_GOLD_COINS",k.NotEnoughGold="CHARGED_LEVELS_NOT_ENOUGH_GOLD",k.XpBarInformation="CHARGED_LEVELS_XP_BAR_INFORMATION",k.OriginalCurrencyId="ORIGINAL_CURRENCY_ID",k.OriginalCurrencyAmount="ORIGINAL_CURRENCY_AMOUNT",k.OriginalCurrencyDifference="ORIGINAL_CURRENCY_DIFFERENCE",k.ConversionCurrencyId="CONVERSION_CURRENCY_ID",k.ConversionCurrencyAmount="CONVERSION_CURRENCY_AMOUNT",k.ConversionCurrencyDifference="CONVERSION_CURRENCY_DIFFERENCE",k.ShouldShowCurrencyConversion="SHOULD_SHOW_CURRENCY_CONVERSION",k.ConversionAnalyticsCustomData="CONVERSION_ANALYTICS_CUSTOM_DATA"}(Hn||(Hn={}));let Xn=class extends Fi.z{create(){var k;super.create(),void 0!==this._chargedLevelsProgressManager.chargedLevelsProgressData&&this.bindContext(),this._playerChargedLevelDataProvider=this._mainPlayer?this._mainPlayer.findComponentInChildren(Kn.e,!0):this._loggedInPlayer.player.playerContainer.playerPrefab.findComponentInChildren(Kn.e,!0),null===(k=this._mainPlayer)||void 0===k||k.findComponent(Wn.m).setFacingDirection(Me.y.Right)}abandonChargedLevelLosses(){this.bindCurrentChargedLevelTier(),this._chargedLevelsProgressManager.abandonChargedLevelLosses().then((()=>{var k;null===(k=this._playerChargedLevelDataProvider)||void 0===k||k.showChargeLostEffect()})).catch(j.RQr.createHandler("[ChargedLevelsRetentionDataProviderComponent] Failed to abandon charged level losses"))}recuperateChargedLevelLosses(k,B){this.bindCurrentChargedLevelTier(),this._chargedLevelsProgressManager.recuperateChargedLevelLosses(k,B).then((()=>{var k;null===(k=this._playerChargedLevelDataProvider)||void 0===k||k.showChargeKeptEffect()})).catch(j.RQr.createHandler("[ChargedLevelsRetentionDataProviderComponent] Failed to recuperate charged level losses"))}bindCurrentChargedLevelTier(){var k;const B=this._chargedLevelsProgressManager.chargedLevelsProgressData.recuperableLevels,U=this._chargedLevelsProgressManager.chargedLevelsProgressData.chargedLevel;null===(k=this._playerChargedLevelDataProvider)||void 0===k||k.bindChargedLevelTier(U+B)}bindContext(){var k,B;const U=null!==(k=this.gameObject.findComponentInParent(j.bE_,!1))&&void 0!==k?k:this._context,F=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=this._chargedLevelsProgressManager.chargedLevelsProgressData.chargedLevel,$=this._chargedLevelsProgressManager.chargedLevelsProgressData.recuperableXp,H=this._chargedLevelsProgressManager.chargedLevelsProgressData.recuperableLevels,V=H>1?"s":"",W=null!==(B=this._chargedLevelsProgressManager.chargedLevelsProgressData.costToKeepLevels)&&void 0!==B?B:0,q=0===W?F.getGold():F.getGold()-W,K=new Qn.r($,Vn.V.Player,{baseXp:0,memberXp:0,totalNonMemberXp:0},Yn.s.activePlayerLevelCap),z=this._paymentManager.exchange({currency:1,value:W},27).value,Y=F.getGold(),Q=this._hardCurrency.getBalance(27),X=Yn.s.activePlayerLevelCap;K.maxLevel=X+F.getChargedLevelCap(),K.levels=[X+G+H,X+G+H+1],K.currentCreatureStars=$,K.currentRelativeStars=$,K.starsRequiredForEachLevel=[$+1];this.bindTo(U,Hn.ShouldShowCurrencyConversion,!0),this.bindTo(U,Hn.KeepChargeCost,W),this.bindTo(U,Hn.GoldCoins,Y),this.bindTo(U,Hn.MagicoinAmount,Q),this.bindTo(U,Hn.TargetGoldCoins,q),this.bindTo(U,Hn.NotEnoughGold,q<0),this.bindTo(U,Hn.NumberLevelsLost,[H,V]),this.bindTo(U,Hn.XpBarInformation,K),this.bindTo(U,Hn.OriginalCurrencyId,1),this.bindTo(U,Hn.OriginalCurrencyAmount,W),this.bindTo(U,Hn.OriginalCurrencyDifference,W-Y),this.bindTo(U,Hn.ConversionCurrencyId,27),this.bindTo(U,Hn.ConversionCurrencyAmount,z),this.bindTo(U,Hn.ConversionCurrencyDifference,z-Q),this.bindTo(U,Hn.ConversionAnalyticsCustomData,{sink_type:li.C.ChargedLevelRenewal,sink_id:this._chargedLevelsProgressManager.chargedLevelsProgressData.chargedLevel+H})}bindTo(k,B,U){k.Container.hasBinding(B)||(k.Container.unbind(B),k.Container.bind(B).toConstantValue(U))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Xn.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("743-fd51"),(0,G.Sn)("design:type",qn.E)],Xn.prototype,"_paymentManager",void 0),(0,G.Cg)([(0,j.Cdj)("5c7-e02d"),(0,G.Sn)("design:type",zn.W)],Xn.prototype,"_hardCurrency",void 0),(0,G.Cg)([(0,j.Cdj)("62e-110e"),(0,G.Sn)("design:type",Bn.g)],Xn.prototype,"_chargedLevelsProgressManager",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],Xn.prototype,"_mainPlayer",void 0),Xn=(0,G.Cg)([(0,j.EVk)("ChargedLevelsRetentionDataProvider")],Xn);let Zn=class extends Fi.z{create(){super.create(),this.bindContext()}bindContext(){}bindValue(k,B,U){k.Container.hasBinding(B)||k.Container.bind(B).toConstantValue(U)}};Zn=(0,G.Cg)([(0,j.EVk)("ChargedLevelsTutorialDataProvider",W.Y.ui)],Zn);var Jn=U(65732),ta=(U(34578),U(35571));let ea=class extends j.uAl{run(){this._cloudscriptChargedLevels.sendTutorialReminderMailer().catch(j.RQr.createHandler("[SendChargedLevelsMail] Could not send tutorial reminder mailer"))}};(0,G.Cg)([(0,j.Cdj)("639-22b8"),(0,G.Sn)("design:type",ta.e)],ea.prototype,"_cloudscriptChargedLevels",void 0),ea=(0,G.Cg)([(0,j.EVk)("SendChargedLevelsMail")],ea);let ia=class extends j.JTX{constructor(){super(...arguments),this._isOnCoolDown=new j.HN0,this._isNotOnCoolDown=new j.HN0,this._identifier="",this._cooldownTime=0}get cooldownTime(){return this._cooldownTime}initialize(k,B){this._identifier=k,this._cooldownTime=B}checkCooldown(){this._identifier?tt.q.instance.prodigy.gameContainer.get("b50-4670").hasCooldown(this._identifier,this.cooldownTime).then((k=>{k?this._isOnCoolDown.dispatch():this._isNotOnCoolDown.dispatch()})).catch((k=>{j.VyI.log(`Failed to check for cooldown. ${k.message}`,j.$bb.Error)})):j.VyI.log("An identifier is required to use the CooldownComponent",j.$bb.Error)}destroy(){this._isOnCoolDown.dispose(),this._isNotOnCoolDown.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ia.prototype,"_isOnCoolDown",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ia.prototype,"_isNotOnCoolDown",void 0),ia=(0,G.Cg)([(0,j.EVk)("InteractablesCooldown",W.Y.cooldown)],ia);var sa=U(47969);let na=class extends j.uAl{constructor(){super(...arguments),this._coolownID="",this.onCooldown=new j.HN0,this.notOnCooldown=new j.HN0,this._runOnCreate=!1}create(){super.create(),this._runOnCreate&&this.run().catch(j.RQr.createHandler("Error running CheckCooldownComponent"))}run(){return(0,G.sH)(this,void 0,void 0,(function*(){(yield this._cooldowns.isCooldownActive(this._coolownID))?this.onCooldown.dispatch():this.notOnCooldown.dispatch()}))}destroy(){this.onCooldown.dispose(),this.notOnCooldown.dispose(),super.destroy()}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],na.prototype,"_coolownID",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],na.prototype,"onCooldown",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],na.prototype,"notOnCooldown",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],na.prototype,"_runOnCreate",void 0),(0,G.Cg)([(0,j.Cdj)("098-b402"),(0,G.Sn)("design:type",sa.m)],na.prototype,"_cooldowns",void 0),na=(0,G.Cg)([(0,j.EVk)("CheckCooldown",W.Y.cooldown)],na);var aa=U(86913);let ra=class extends j.uAl{constructor(){super(...arguments),this._coolownID="",this._runOnCreate=!1,this._setCooldownFromSpawnCooldown=!0,this._spawnCooldownCategory=aa.u.Main}create(){super.create(),this._runOnCreate&&this.run().catch(j.RQr.createHandler("Error running SetCooldownComponent"))}run(){return(0,G.sH)(this,arguments,void 0,(function*(k=""){if(""!==k&&(this._coolownID=k),this._setCooldownFromSpawnCooldown){tt.q.instance.prodigy.gameContainer.get("e67-6525").setCooldownFromCategory(this._coolownID,this._spawnCooldownCategory).catch(j.RQr.createHandler("Error setting cooldown from category in SetCooldownComponent"))}}))}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ra.prototype,"_coolownID",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ra.prototype,"_runOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ra.prototype,"_setCooldownFromSpawnCooldown",void 0),(0,G.Cg)([(0,j.gfw)(aa.u),(0,G.Sn)("design:type",String)],ra.prototype,"_spawnCooldownCategory",void 0),ra=(0,G.Cg)([(0,j.EVk)("SetCooldown",W.Y.cooldown)],ra);let oa=class extends j.uAl{constructor(){super(...arguments),this.onSFXComplete=new j.HN0,this._timeouts=[]}postCreate(){super.postCreate(),this._playOnCreate&&this.playSFX()}destroy(){this.onSFXComplete.dispose(),this._timeouts.forEach((k=>{window.clearTimeout(k)})),this._timeouts.length=0,super.destroy()}playSFX(){var k;const B=()=>{tt.q.instance.prodigy.audio.playSFX(this._sfxID,this._clipName,(()=>this.onSFXCompleteHandler()))};(null!==(k=this._delay)&&void 0!==k?k:0)>0?this._timeouts.push(window.setTimeout(B,this._delay)):B()}onSFXCompleteHandler(){this.onSFXComplete.dispatch()}};(0,G.Cg)([(0,j.W_S)(),(0,j.Bak)(),(0,G.Sn)("design:type",String)],oa.prototype,"_sfxTag",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],oa.prototype,"_sfxID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],oa.prototype,"_clipName",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],oa.prototype,"onSFXComplete",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],oa.prototype,"_delay",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],oa.prototype,"_playOnCreate",void 0),oa=(0,G.Cg)([(0,j.EVk)("PlaySoundEffect",W.Y.audio,"Deprecated use PlayAudioGUIDComponent instead")],oa);var ha=U(70570),ca=U(75915),da=U(79484),la=U(84705),ua=U(20786);const fa=new Map([[17,ua.F.createTeam],[18,ca.u.createTeam],[19,ha.l.createTeam],[20,la.Y.createTeam],[21,da.e.createTeam]]);let ba=class extends j.uAl{constructor(){super(...arguments),this._onBossDefeated=new j.HN0,this._onBossAlive=new j.HN0}create(){if(super.create(),this._crystalCavernsState){const k=this.getStateID();null!==k&&this._crystalCavernsState.isBossDefeatedCurrentRun(k)?(this._onBossDefeated.dispatch(),this.GameObject.active=!1):this._onBossAlive.dispatch()}}destroy(){this._onBossAlive.dispose(),this._onBossDefeated.dispose(),super.destroy()}markAsSeen(){const k=this.getStateID();null!==k&&this._crystalCavernsState.setBossSeen(k),this._segment.playerMovementAndDiscovery.sendCrystalCavernsMilestoneReachedEvent(Mi.lT.Boss)}getStateID(){return Oi.getBossEnum(this.bossID)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],ba.prototype,"bossID",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ii.o)],ba.prototype,"_crystalCavernsState",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ba.prototype,"_onBossDefeated",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ba.prototype,"_onBossAlive",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],ba.prototype,"_segment",void 0),ba=(0,G.Cg)([(0,j.EVk)("CrystalCavernsBossEncounter",W.Y.adventure)],ba);let pa=class extends j.uAl{constructor(){super(...arguments),this._introKey="COMBAT_BOSS_BATTLE",this._battleBackground="battle-shiverchill-inside",this._afterBattleFSM=null,this._battleStars=null,this._freeSwitching=!1,this._opponentSwitchDisabled=!1}startBattle(){const k=this._bossEncounter.bossID,B=Yt.t.getItem("boss",k).data,U=this._crystalCavernsState,F=this._currentPlayer.player.data.zone,G=this._mainPlayer.transform.localScale.x,$=new j.I9Y;$.copyFrom(this._afterBattlePosition.worldPosition);const H=new j.I9Y;H.copyFrom(this.GameObject.transform.worldPosition);const V=this._bossEncounter.getStateID();if(null!==V){this._bossEncounter.markAsSeen();const j=tt.q.instance.prodigy.battle;j.battleStats.type="DungeonBossBattle",j.start({adventureRewards:B.adventureRewards,intro:this._localization.getText(this._introKey),boss:{ID:k,level:this._crystalCavernsState.getLevel(),element:B.element,name:this._localization.getText(B.nameKey),nameKey:B.nameKey,attacks:B.attacks,bossFactory:fa.get(k)},screen:this._battleBackground,backgroundMusic:31,difficulty:B.battle.difficulty,targetingEnabled:this._targetingEnabled,starOverride:this._battleStars,freeTeamSwap:this._freeSwitching,disableHealing:!0,videoLessonInstantWinEnabled:!1,revampBattleType:Oi.getRevampBattleType(V)},(()=>{tt.q.instance.prodigy.world.it(F)}),(()=>{U.setBossDefeated(V);let k=null;void 0!==this._afterBattleFSM&&(k={runFSMOnLoad:{ID:this._afterBattleFSM,variables:{game:tt.q.instance.game,encounterX:H.x,encounterY:H.y,playerIdentifier:"MainPlayerGameObject"}},playerDirection:G}),tt.q.instance.prodigy.world.it(F,$.x,$.y,k)}),null,F)}else j.VyI.log(`Starting dungeon boss battle with unknown boss ${k}`,j.$bb.Warning)}};(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ii.o)],pa.prototype,"_crystalCavernsState",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],pa.prototype,"_afterBattlePosition",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],pa.prototype,"_introKey",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],pa.prototype,"_battleBackground",void 0),(0,G.Cg)([(0,j.MnK)(ba),(0,G.Sn)("design:type",ba)],pa.prototype,"_bossEncounter",void 0),(0,G.Cg)([(0,j.Cdj)("Localization"),(0,G.Sn)("design:type",j.dTp)],pa.prototype,"_localization",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],pa.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],pa.prototype,"_afterBattleFSM",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],pa.prototype,"_battleStars",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],pa.prototype,"_freeSwitching",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],pa.prototype,"_opponentSwitchDisabled",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],pa.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],pa.prototype,"_targetingEnabled",void 0),pa=(0,G.Cg)([(0,j.EVk)("StartCrystalCavernsBossBattle",W.Y.adventure)],pa);let va=class extends Be.u{constructor(){super(...arguments),this._spine=null,this._circleTrigger=null,this._facingDirection="right"}run(){this.execute(137,{game:tt.q.instance.game,playerObject:this._mainPlayer,playerTransform:this._mainPlayer.transform,facingDirection:this._facingDirection,circleTrigger:this._circleTrigger,encounterPosition:this._encounterPosition.worldPosition,startBattleComponent:this._startBattleComponent,monsterSpine:this._spine.getSpine(),bossEncounter:this,attackAnimationName:this._attackAnimationName,idleAnimationName:this._idleAnimationName})}playEncounterSFX(){this._encounterSoundEffect&&this._encounterSoundEffect.playSFX()}};(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],va.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],va.prototype,"_spine",void 0),(0,G.Cg)([(0,j.MnK)(hi.s),(0,G.Sn)("design:type",hi.s)],va.prototype,"_circleTrigger",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],va.prototype,"_encounterPosition",void 0),(0,G.Cg)([(0,j.MnK)(pa),(0,G.Sn)("design:type",pa)],va.prototype,"_startBattleComponent",void 0),(0,G.Cg)([(0,j.MnK)(oa),(0,G.Sn)("design:type",oa)],va.prototype,"_encounterSoundEffect",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],va.prototype,"_attackAnimationName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],va.prototype,"_idleAnimationName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],va.prototype,"_facingDirection",void 0),va=(0,G.Cg)([(0,j.EVk)("BossEncounterFSM",W.Y.adventureFsm)],va);let ga=class extends Be.u{constructor(){super(...arguments),this.preloadSFX=pi.c.Sfx_wyrmroar,this._spine=null,this._circleTrigger=null}run(){this.execute(138,{game:tt.q.instance.game,playerIdentifier:"MainPlayerGameObject",circleTrigger:this._circleTrigger,encounterPosition:this._encounterPosition.worldPosition,startBattleComponent:this._startBattleComponent,monsterSpine:this._spine.getSpine(),monsterTransform:this._spine.GameObject.transform})}};(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],ga.prototype,"preloadSFX",void 0),(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],ga.prototype,"_spine",void 0),(0,G.Cg)([(0,j.MnK)(hi.s),(0,G.Sn)("design:type",hi.s)],ga.prototype,"_circleTrigger",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],ga.prototype,"_encounterPosition",void 0),(0,G.Cg)([(0,j.MnK)(pa),(0,G.Sn)("design:type",pa)],ga.prototype,"_startBattleComponent",void 0),ga=(0,G.Cg)([(0,j.EVk)("MakaluEncounterFSM",W.Y.adventureFsm)],ga);let ma=class extends Be.u{run(){this.execute(140,{game:tt.q.instance.game,locomotion:this._playerLocomotion,playerObject:this._mainPlayer,circleTrigger:this._circleTrigger,encounterPosition:this._encounterPosition.worldPosition,exclamationMark:this._exclamationMarkGameObject,startBattleComponent:this._startBattleComponent})}};(0,G.Cg)([(0,j.Cdj)("PlayerLocomotion"),(0,G.Sn)("design:type",j.KhP)],ma.prototype,"_playerLocomotion",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],ma.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.MnK)(hi.s),(0,G.Sn)("design:type",hi.s)],ma.prototype,"_circleTrigger",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],ma.prototype,"_encounterPosition",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ma.prototype,"_exclamationMarkGameObject",void 0),(0,G.Cg)([(0,j.MnK)(pa),(0,G.Sn)("design:type",pa)],ma.prototype,"_startBattleComponent",void 0),ma=(0,G.Cg)([(0,j.EVk)("WinstonVonLootEncounterFSM",W.Y.adventureFsm)],ma);var ya=U(630);let _a=class extends Be.u{create(){var k;super.create(),(null===(k=this._dungeonState)||void 0===k?void 0:k.isBossDefeatedCurrentRun(4))||(this.GameObject.active=!1)}run(){this.execute(143,{game:tt.q.instance.game,winstonGameObject:this._winstonVonLootGameObject,winstonFadeDuration:this._fadeDuration,mapSaveComponent:this._mapSaveStateComponent,playerIdentifier:"MainPlayerGameObject",teleportGameObject:this._teleportSpine.GameObject,teleportSpine:this._teleportSpine.getSpine(),teleportName:ya.rC.Exit,teleportSfx:this._teleportSfx})}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_a.prototype,"_winstonVonLootGameObject",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],_a.prototype,"_fadeDuration",void 0),(0,G.Cg)([(0,j.MnK)(si),(0,G.Sn)("design:type",si)],_a.prototype,"_mapSaveStateComponent",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ii.o)],_a.prototype,"_dungeonState",void 0),(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],_a.prototype,"_teleportSpine",void 0),(0,G.Cg)([(0,j.MnK)(hn.J),(0,G.Sn)("design:type",hn.J)],_a.prototype,"_teleportSfx",void 0),_a=(0,G.Cg)([(0,j.EVk)("WinstonVonLootPostBattleFSM",W.Y.adventureFsm)],_a);let Ea=class extends j.uAl{constructor(){super(...arguments),this.bossID=1,this.bossName="yeti",this._atlas=Ve._.Ui_cc_boss_icons_json,this._border=null,this._bossImage=null,this._iconImage=null,this._isLarge=!1}create(){super.create();const k=this._isLarge?"large":"small";let B,U,F;B=this._crystalCavernsState.isBossSeen(this.bossID),U=this._crystalCavernsState.getCheckpointIndex(),F=this._crystalCavernsState.isBossDefeatedCurrentRun(this.bossID),this._bossImage.setAsset(this._atlas,`icon-${k}-${B?this.bossName:"questionmark"}`);const G=Yt.t.getItemData("boss",Oi.getBossAssetID(this.bossID));let $=null,H=null;F?(H=`icon-checkmark-${k}`,$=`icon-${k}-green`):U===G.battleCheckpointID?(H=`icon-sword-${k}`,$=`icon-${k}-blue`):$=`icon-${k}-grey`,this._border.setAsset(this._atlas,$),j.Aq$.isDefined(H)?this._iconImage.setAsset(this._atlas,H):this._iconImage.GameObject.active=!1}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ea.prototype,"bossID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ea.prototype,"bossName",void 0),(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],Ea.prototype,"_atlas",void 0),(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ii.o)],Ea.prototype,"_crystalCavernsState",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],Ea.prototype,"_border",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],Ea.prototype,"_bossImage",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],Ea.prototype,"_iconImage",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Ea.prototype,"_isLarge",void 0),Ea=(0,G.Cg)([(0,j.EVk)("BossIconStatus",W.Y.adventureUi)],Ea);let wa=class extends j.PQK{installBindings(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.Container.bind("DungeonState").toConstantValue(k.state.getDungeonState(Ii.o,"crystal_caverns"))}};wa=(0,G.Cg)([(0,j.Og1)("CrystalCavernsInstaller","Installer")],wa);var Ta=U(80110);let Sa=class extends Be.u{constructor(){super(...arguments),this._spine=null,this._circleTrigger=null}run(){this.execute(141,{game:tt.q.instance.game,playerObject:this._mainPlayer,playerPathfinder:this._playerPathfinder,circleTrigger:this._circleTrigger,encounterPosition:this._encounterPosition.worldPosition,startBattleComponent:this._startBattleComponent,monsterSpine:this._spine.getSpine(),monsterTransform:this._spine.GameObject.transform,screenShakeComponent:this._screenShakeComponent,cameraTransform:j.i7d.main.GameObject.transform,cameraFollowController:this._mainPlayer.findComponentInChildren(j.mZY),golemRevealCameraPosition:this._golemRevealCameraPosition})}};var Aa;(0,G.Cg)([(0,j.Cdj)("PlayerPathfinder"),(0,G.Sn)("design:type",j.pV3)],Sa.prototype,"_playerPathfinder",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],Sa.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],Sa.prototype,"_spine",void 0),(0,G.Cg)([(0,j.MnK)(hi.s),(0,G.Sn)("design:type",hi.s)],Sa.prototype,"_circleTrigger",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Sa.prototype,"_encounterPosition",void 0),(0,G.Cg)([(0,j.MnK)(pa),(0,G.Sn)("design:type",pa)],Sa.prototype,"_startBattleComponent",void 0),(0,G.Cg)([(0,j.MnK)(Ta.g),(0,G.Sn)("design:type",Ta.g)],Sa.prototype,"_screenShakeComponent",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Sa.prototype,"_golemRevealCameraPosition",void 0),Sa=(0,G.Cg)([(0,j.EVk)("CrystalGolemEncounterFSM",W.Y.adventureFsm)],Sa);let Ca=Aa=class extends j.uAl{constructor(){super(...arguments),this._onMorphExpired=new j.HN0,this._playerData=null,this._lastMorphDataUpdate=0}create(){super.create(),this._playerData=this._loggedInPlayer.player.getPlayerData(),this._lastUpdateTime=Date.now()}update(){var k;super.update();const B=Date.now(),U=null===(k=this._playerData)||void 0===k?void 0:k.playerTransformation;if(U){const k=B-this._lastUpdateTime;U.timeRemaining-=k,B-this._lastMorphDataUpdate>Aa.FORCE_SAVE_TIME_MS&&(this._loggedInPlayer.player.updated=!0,this._lastMorphDataUpdate=B),U.timeRemaining<=0&&(this._onMorphExpired.dispatch(),this._loggedInPlayer.player.transformPlayer(Vn.V.Player))}this._lastUpdateTime=B}destroy(){this._playerData=null,this._onMorphExpired.dispose(),this._onMorphExpired=null,super.destroy()}};Ca.FORCE_SAVE_TIME_MS=3e4,(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ca.prototype,"_onMorphExpired",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Ca.prototype,"_loggedInPlayer",void 0),Ca=Aa=(0,G.Cg)([(0,j.EVk)("MorphExpiration",W.Y.playerAnimation)],Ca);var Oa=U(64889),Ia=U(87337);let Da=class extends j.uAl{constructor(){super(...arguments),this.onQuestionAnswered=new j.HN0,this.onQuestionAnsweredCorrectly=new j.HN0,this.onQuestionAnsweredIncorrectly=new j.HN0,this._isOpen=!1}destroy(){this.onQuestionAnswered.dispose(),this.onQuestionAnsweredCorrectly.dispose(),this.onQuestionAnsweredIncorrectly.dispose(),super.destroy()}answerQuestion(){if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){const _w=Math.random()<(window._.constants.get('GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT')||1);this.onQuestionAnswered.dispatch(_w,0,null);_w?this.onQuestionAnsweredCorrectly.dispatch(0,null):this.onQuestionAnsweredIncorrectly.dispatch(0,null);return}if(!this._isOpen){this._isOpen=!0;const k=tt.q.instance.game.input,B=k.enabled;k.enabled=!1;const U=tt.q.instance.prodigy.notifications;U.pause(this),U.clearNotifications(),tt.q.instance.prodigy.education.question(((F,G,j,$,H,V)=>{this._isOpen=!1,k.enabled=B,U.resume(this),this.onQuestionAnswered.dispatch(F,G,V),F?this.onQuestionAnsweredCorrectly.dispatch(G,V):this.onQuestionAnsweredIncorrectly.dispatch(G,V)}),{isUserInBattle:!1,allowTutorials:!0})}}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Da.prototype,"onQuestionAnswered",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Da.prototype,"onQuestionAnsweredCorrectly",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Da.prototype,"onQuestionAnsweredIncorrectly",void 0),Da=(0,G.Cg)([(0,j.EVk)("OpenQuestionInterface",W.Y.education)],Da);let Ra=class extends j.uAl{constructor(){super(...arguments),this.onQuestionAnsweredSuccessfully=new j.HN0,this.onAllQuestionsAnswered=new j.HN0,this._remainingQuestions=0}create(){super.create(),this._openQuestionInterfaceComponent&&this._openQuestionInterfaceComponent.onQuestionAnswered.add(this.questionWasAnswered,this),this._remainingQuestions=this._questionCount}destroy(){this._openQuestionInterfaceComponent&&this._openQuestionInterfaceComponent.onQuestionAnswered.remove(this.questionWasAnswered,this),this.onQuestionAnsweredSuccessfully.dispose(),this.onAllQuestionsAnswered.dispose(),super.destroy()}openQuestion(){this._remainingQuestions>0&&this._openQuestionInterfaceComponent.answerQuestion()}setQuestionsRemainingCount(k){this._questionCount=k,this._remainingQuestions=k}getQuestionsRemainingCount(){return this._remainingQuestions}questionWasAnswered(k){k&&(--this._remainingQuestions,this.onQuestionAnsweredSuccessfully.dispatch(this._remainingQuestions),this._remainingQuestions<=0&&this.onAllQuestionsAnswered.dispatch())}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ra.prototype,"onQuestionAnsweredSuccessfully",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ra.prototype,"onAllQuestionsAnswered",void 0),(0,G.Cg)([(0,j.MnK)(Da),(0,G.Sn)("design:type",Da)],Ra.prototype,"_openQuestionInterfaceComponent",void 0),Ra=(0,G.Cg)([(0,j.EVk)("AnswerQuestionsAmount",W.Y.education)],Ra);let Pa=class extends j.uAl{constructor(){super(...arguments),this._isHorizontal=!1,this._isGlowing=!1}create(){super.create(),this.updateBoardAnimation()}bringToFront(){const k=this._spineAnimator.GameObject.findComponent(oi.v).getRootContainer();k.parent.setChildIndex(k,k.parent.children.length-1)}setHorizontal(k){this._isHorizontal=k,this.updateBoardAnimation()}playGlow(){this._isGlowing=!0,this.updateBoardAnimation()}playGlowRotation(){var k;this._isGlowing=!0,null===(k=this._spineAnimator)||void 0===k||k.playAnimation(this._isHorizontal?this._horizontalGlowingRotationAnimation:this._verticalGlowingRotationAnimation,!1),this._isHorizontal=!this._isHorizontal}clearGlow(){this._isGlowing=!1,this.updateBoardAnimation()}isHorizontal(){return this._isHorizontal}getAnimationName(){return this._isGlowing?this._isHorizontal?this._horizontalGlowingIdleAnimation:this._verticalGlowingIdleAnimation:this._isHorizontal?this._horizontalIdleAnimation:this._verticalIdleAnimation}updateBoardAnimation(){var k;null===(k=this._spineAnimator)||void 0===k||k.playAnimation(this.getAnimationName(),!1)}};(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],Pa.prototype,"_spineAnimator",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Pa.prototype,"_isHorizontal",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pa.prototype,"_horizontalIdleAnimation",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pa.prototype,"_verticalIdleAnimation",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pa.prototype,"_horizontalGlowingIdleAnimation",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pa.prototype,"_verticalGlowingIdleAnimation",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pa.prototype,"_horizontalGlowingRotationAnimation",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pa.prototype,"_verticalGlowingRotationAnimation",void 0),Pa=(0,G.Cg)([(0,j.EVk)("MinecartTrackSupply",W.Y.adventureFsm)],Pa);let Ma=class extends j.uAl{constructor(){super(...arguments),this._railOffset=new j.I9Y,this._flipped=!1,this._horizontalBoardOffset=new j.I9Y,this._verticalBoardOffset=new j.I9Y,this._trackBoards=[]}create(){var k,B;super.create();const U=Math.ceil(this._boardCount/this._boardsPerLayer);for(let G=0;G0&&this._segment.gameWorld.sendWorldObjectDiscoveredEvent({object_type:Ia.u_.MinecartBridge,object_id:"0",x_coord:null===(k=this._trackBoards[0].GameObject)||void 0===k?void 0:k.transform.worldPosition.x,y_coord:null===(B=this._trackBoards[0].GameObject)||void 0===B?void 0:B.transform.worldPosition.y})}createLayer(k,B){const U=[];for(let F=0;F1?G=this._distanceBetweenBoards:F>0&&(G=-this._distanceBetweenBoards),B?k.transform.setPosition(this._horizontalBoardOffset.x,this._horizontalBoardOffset.y+G):k.transform.setPosition(this._verticalBoardOffset.x+G,this._verticalBoardOffset.y);const j=k.findComponentInChildren(Pa);j.setHorizontal(B),U.push(j)}return U}getBoards(){return this._trackBoards}getRail(){return this._trackRail}getBoardCount(){return this._boardCount}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ma.prototype,"_boardCount",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ma.prototype,"_boardsPerLayer",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ma.prototype,"_boardPrefabID",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ma.prototype,"_railPrefabID",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],Ma.prototype,"_railOffset",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ma.prototype,"_distanceBetweenBoards",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Ma.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],Ma.prototype,"_segment",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Ma.prototype,"_flipped",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],Ma.prototype,"_horizontalBoardOffset",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],Ma.prototype,"_verticalBoardOffset",void 0),Ma=(0,G.Cg)([(0,j.EVk)("MinecartTrackSuppliesPile",W.Y.adventure)],Ma);let Na=class extends Be.u{constructor(){super(...arguments),this.castSFX=pi.c.Sfx_battle,this.onBoardPlaced=new j.HN0,this.onRailPlaced=new j.HN0,this._boardIndex=0}create(){super.create();let k=0;this._suppliesPile&&(k=this._suppliesPile.getBoardCount()),this._answerQuestionAmount&&(this._answerQuestionAmount.setQuestionsRemainingCount(k),this._answerQuestionAmount.onQuestionAnsweredSuccessfully.add(this.placeBoard,this))}destroy(){this._answerQuestionAmount&&this._answerQuestionAmount.onQuestionAnsweredSuccessfully.remove(this.placeBoard,this),this.onBoardPlaced.dispose(),this.onRailPlaced.dispose(),super.destroy()}placeBoard(k){const B=this._suppliesPile.getBoards(),U=this._suppliesPile.getBoardCount()-1,F=B[U-this._boardIndex],G=this._boardPositionsParent.children[this._boardIndex].transform;F.bringToFront();const j=F.GameObject.parent.transform.worldMatrix,$=G.worldMatrix,H=new $e.Point;j.applyInverse(H,H),$.apply(H,H),++this._boardIndex,this.execute(132,{game:tt.q.instance.game,supply:F,sparklesGameObject:this._sparklesGameObject,playerAnimationController:this._mainPlayer.findComponentInChildren(Oa.$),supplyTransform:F.GameObject.transform,supplyStartingPosition:F.GameObject.transform.localPosition,supplyPosition:H,rotateSupply:this._isHorizontal===F.isHorizontal(),morphExpiration:this._mainPlayer.findComponentInChildren(Ca)},(()=>{this._boardIndex<=1?this._startingTrackDamage.active=!1:this._boardIndex>=B.length&&(this._endingTrackDamage.active=!1),this.onBoardPlaced.dispatch(),k<=0&&this.placeRail(),this._segment.gameWorld.sendWorldObjectUsedEvent({object_type:Ia.u_.MinecartBridge,object_id:""+(this._boardIndex-1)})}))}hasBoardsRemaining(){return this._boardIndex{this.onRailPlaced.dispatch(),this._segment.playerMovementAndDiscovery.sendCrystalCavernsMilestoneReachedEvent(Mi.lT.Bridge)}))}run(){}};(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],Na.prototype,"castSFX",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Na.prototype,"onBoardPlaced",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Na.prototype,"onRailPlaced",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Na.prototype,"_boardPositionsParent",void 0),(0,G.Cg)([(0,j.MnK)(Ma),(0,G.Sn)("design:type",Ma)],Na.prototype,"_suppliesPile",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Na.prototype,"_xpPerQuestion",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Na.prototype,"_startingTrackDamage",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Na.prototype,"_sparklesGameObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Na.prototype,"_endingTrackDamage",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],Na.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.MnK)(Ra),(0,G.Sn)("design:type",Ra)],Na.prototype,"_answerQuestionAmount",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Na.prototype,"_isHorizontal",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Na.prototype,"_railTransform",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Na.prototype,"_smokeTrailStart",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],Na.prototype,"_smokeCloudOffset",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Na.prototype,"_smokeCloudCount",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Na.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Na.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],Na.prototype,"_segment",void 0),(0,G.Cg)([(0,j.MnK)(si),(0,G.Sn)("design:type",si)],Na.prototype,"_mapSaveCompletion",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Na.prototype,"_minecartInputObject",void 0),Na=(0,G.Cg)([(0,j.EVk)("FixableMinecartTrack",W.Y.adventureFsm)],Na);let xa=class extends Be.u{run(){this.execute(142,{game:tt.q.instance.game,playerIdentifier:"MainPlayerGameObject"})}};xa=(0,G.Cg)([(0,j.EVk)("GolemPostBattleFSM",W.Y.adventureFsm)],xa);U(29638);var La=U(98013);let ka=class extends j.uAl{constructor(){super(...arguments),this._imageContainer=null}setData(k){this._drop=k,k&&(La.l.removeAll(this._imageContainer.legacyTransform.group,!0),tt.q.instance.prodigy.icon.createFromDataAdvanced(k,this._imageContainer.legacyTransform.group,0,0).catch(j.RQr.createHandler(`LootCardComponent: Failed to create item icon ${k.type}-${k.ID}`)))}getData(){return this._drop}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ka.prototype,"_imageContainer",void 0),ka=(0,G.Cg)([(0,j.EVk)("LootCardComponent",W.Y.adventureUi)],ka);let Ba=class extends j.JTX{constructor(){super(...arguments),this._unobtainedItemOpacity=.5}create(){super.create();{const k=this._crystalCavernsState.isBossDefeatedAllTime(this.bossID);if(this.lootCard.active=k,this.lockedGraphic.active=!k,k){const k={type:this.itemType,ID:this.itemID};this.lootCardComponent.setData(k),this._playerProvider.player.isItemOwned(k)||(this.iconContainer.group.alpha=this._unobtainedItemOpacity)}}}};(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ii.o)],Ba.prototype,"_crystalCavernsState",void 0),(0,G.Cg)([(0,j.fFd)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Ba.prototype,"_playerProvider",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ba.prototype,"bossID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ba.prototype,"itemType",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ba.prototype,"itemID",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ba.prototype,"_unobtainedItemOpacity",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ba.prototype,"lootCard",void 0),(0,G.Cg)([(0,j.MnK)(ka),(0,G.Sn)("design:type",ka)],Ba.prototype,"lootCardComponent",void 0),(0,G.Cg)([(0,j.MnK)(j.K16),(0,G.Sn)("design:type",j.K16)],Ba.prototype,"iconContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ba.prototype,"lockedGraphic",void 0),Ba=(0,G.Cg)([(0,j.EVk)("ItemSlotStatus",W.Y.adventureUi)],Ba);let Ua=class extends j.uAl{constructor(){super(...arguments),this.bossID=1,this.bossName="yeti"}create(){super.create(),this.bossStatus.bossID=this.bossID,this.bossStatus.bossName=this.bossName,this.itemSlot1.bossID=this.bossID,this.itemSlot1.itemType=this.item1Type,this.itemSlot1.itemID=this.item1ID,this.itemSlot2.bossID=this.bossID,this.itemSlot2.itemType=this.item2Type,this.itemSlot2.itemID=this.item2ID,this.itemSlot3.bossID=this.bossID,this.itemSlot3.itemType=this.item3Type,this.itemSlot3.itemID=this.item3ID,this.row.bossID=this.bossID}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ua.prototype,"bossID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ua.prototype,"bossName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ua.prototype,"item1Type",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ua.prototype,"item1ID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ua.prototype,"item2Type",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ua.prototype,"item2ID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ua.prototype,"item3Type",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ua.prototype,"item3ID",void 0),(0,G.Cg)([(0,j.MnK)(Ea),(0,G.Sn)("design:type",Ea)],Ua.prototype,"bossStatus",void 0),(0,G.Cg)([(0,j.MnK)(Ba),(0,G.Sn)("design:type",Ba)],Ua.prototype,"itemSlot1",void 0),(0,G.Cg)([(0,j.MnK)(Ba),(0,G.Sn)("design:type",Ba)],Ua.prototype,"itemSlot2",void 0),(0,G.Cg)([(0,j.MnK)(Ba),(0,G.Sn)("design:type",Ba)],Ua.prototype,"itemSlot3",void 0),(0,G.Cg)([(0,j.MnK)(Di),(0,G.Sn)("design:type",Di)],Ua.prototype,"row",void 0),Ua=(0,G.Cg)([(0,j.EVk)("InitRewardRow",W.Y.adventureUi)],Ua);let Fa=class extends j.uAl{constructor(){super(...arguments),this.onTutorialCompleted=new j.HN0}create(){super.create(),this._fixTrackComponent&&(this._fixTrackComponent.onBoardPlaced.addOnce(this.showFirstQuestionCorrectDialogue,this),this._fixTrackComponent.onRailPlaced.add(this.onTutorialCompleted.dispatch,this.onTutorialCompleted))}destroy(){this._fixTrackComponent&&(this._fixTrackComponent.onBoardPlaced.remove(this.showFirstQuestionCorrectDialogue,this),this._fixTrackComponent.onRailPlaced.remove(this.onTutorialCompleted.dispatch,this.onTutorialCompleted)),this.onTutorialCompleted.dispose(),super.destroy()}showSuppliesPileGuideHand(){this._guideHand.active=!0,this._guideHand.findComponent(Ie).updatePosition(this._suppliesPileLocation.localPosition)}showMinecartGuideHand(){this._guideHand.active=!0,this._guideHand.findComponent(Ie).updatePosition(this._minecartLocation.localPosition)}questionAnswered(k){this._guideHand.active=!1,k||(this._answerQuestionAmount.getQuestionsRemainingCount()>1?this._firstQuestionIncorrectDialogue.play():this._secondQuestionIncorrectDialogue.play())}completeTutorial(){this._tutorialSaveState.completeMapObject()}showFirstQuestionCorrectDialogue(){this._firstQuestionCorrectDialogue.play()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Fa.prototype,"onTutorialCompleted",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Fa.prototype,"_guideHand",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Fa.prototype,"_suppliesPileLocation",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Fa.prototype,"_minecartLocation",void 0),(0,G.Cg)([(0,j.MnK)(yi),(0,G.Sn)("design:type",yi)],Fa.prototype,"_firstQuestionCorrectDialogue",void 0),(0,G.Cg)([(0,j.MnK)(yi),(0,G.Sn)("design:type",yi)],Fa.prototype,"_firstQuestionIncorrectDialogue",void 0),(0,G.Cg)([(0,j.MnK)(yi),(0,G.Sn)("design:type",yi)],Fa.prototype,"_secondQuestionIncorrectDialogue",void 0),(0,G.Cg)([(0,j.MnK)(Ra),(0,G.Sn)("design:type",Ra)],Fa.prototype,"_answerQuestionAmount",void 0),(0,G.Cg)([(0,j.MnK)(Na),(0,G.Sn)("design:type",Na)],Fa.prototype,"_fixTrackComponent",void 0),(0,G.Cg)([(0,j.Cdj)("IntroMinecartSave"),(0,G.Sn)("design:type",si)],Fa.prototype,"_tutorialSaveState",void 0),Fa=(0,G.Cg)([(0,j.EVk)("MinecartFixingTutorialFSM",W.Y.adventureFsm)],Fa);var Ga=U(30488);let ja=class extends Be.u{create(){super.create(),this._minecartFixingTutorial.onTutorialCompleted.add(this._mapSaveState.completeMapObject,this._mapSaveState)}destroy(){this._minecartFixingTutorial.onTutorialCompleted.remove(this._mapSaveState.completeMapObject,this._mapSaveState),super.destroy()}run(){this.execute(144,{game:tt.q.instance.game,aspenExclamation:this._aspenExclamationMark,startTrigger:this._startTrigger,aspenStoreMarker:this._aspenStoreMarker,playerTransform:this._mainPlayer.transform,playerAspenPosition:this._startPosition.worldPosition,minecartFixingTutorial:this._minecartFixingTutorial})}};(0,G.Cg)([(0,j.MnK)(Ga.E),(0,G.Sn)("design:type",Ga.E)],ja.prototype,"_startTrigger",void 0),(0,G.Cg)([(0,j.MnK)(si),(0,G.Sn)("design:type",si)],ja.prototype,"_mapSaveState",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ja.prototype,"_aspenExclamationMark",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ja.prototype,"_aspenStoreMarker",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],ja.prototype,"_startPosition",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],ja.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("IntroMinecartFixing"),(0,G.Sn)("design:type",Fa)],ja.prototype,"_minecartFixingTutorial",void 0),ja=(0,G.Cg)([(0,j.EVk)("MinecartIntroTutorialFSM",W.Y.adventureFsm)],ja);let $a=class extends j.uAl{constructor(){super(...arguments),this._hideStartButton=!0,this._onMapClose=new j.HN0}destroy(){this._onMapClose.dispose(),super.destroy()}open(){tt.q.instance.prodigy.open.adventureMap(this._hideStartButton,(()=>{this._onMapClose.dispatch()}))}};var Ha;(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],$a.prototype,"_hideStartButton",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$a.prototype,"_onMapClose",void 0),$a=(0,G.Cg)([(0,j.EVk)("OpenAdventureMap",W.Y.adventureUi)],$a);let Va=Ha=class extends j.uAl{constructor(){super(...arguments),this.onHide=new j.HN0,this.onShow=new j.HN0,this._isShowing=!0}static make(k,B,U){const F=k.addComponent(Ha,!1);return F._trackObject=B,F._relativeBounds=U,F.create(),F}get isShowing(){return this._isShowing}create(){super.create();{const k=j.i7d.main;if(!k)return;const B=k.viewportSize;this._cameraTransform=k.GameObject.transform,this._cameraHalfWidth=B.getHalfWidth(),this._cameraHalfHeight=B.getHalfHeight(),this._cameraTransform.onWorldMatrixChanged.add(this.cull,this),this._trackObject.onWorldMatrixChanged.add(this.cull,this),this.cull()}}destroy(){var k,B;null===(k=this._cameraTransform)||void 0===k||k.onWorldMatrixChanged.remove(this.cull,this),null===(B=this._trackObject.onWorldMatrixChanged)||void 0===B||B.remove(this.cull,this),this.onHide.dispose(),this.onShow.dispose(),super.destroy()}cull(){const k=this._cameraTransform.worldPosition,B=this._trackObject.worldPosition,U=B.x-k.x,F=B.y-k.y,G=this._relativeBounds,j=U+G.left-this._cameraHalfWidth&&F+G.top-this._cameraHalfHeight;this._isShowing!==j&&(j?this.onShow.dispatch():this.onHide.dispatch()),this._isShowing=j}};(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Va.prototype,"_trackObject",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],Va.prototype,"_relativeBounds",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Va.prototype,"onHide",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Va.prototype,"onShow",void 0),Va=Ha=(0,G.Cg)([(0,j.EVk)("DynamicObjectCameraCulling",W.Y.map)],Va);let Wa=class extends j.uAl{constructor(){super(...arguments),this._hasValidPath=!1}create(){super.create(),this._followLocomotion&&this._followLocomotion.onPathStart.add(this.followLocomotionStarted,this),this._minFollowDistanceSq=this._minFollowDistance*this._minFollowDistance,this._maxFollowDistanceSq=this._maxFollowDistance*this._maxFollowDistance}destroy(){this._followLocomotion&&(this._followLocomotion.onPathStart.remove(this.followLocomotionStarted,this),this._followLocomotion=null),super.destroy()}update(){if(super.update(),this._followLocomotion){const k=this._followLocomotion.GameObject.transform.worldPosition,B=this._targetLocomotion.GameObject.transform.worldPosition,U=j.C1c.getDistanceSq(k,B);this._hasValidPath?Uthis._maxFollowDistanceSq&&this.updateFollowPath(B,k)}}setFollowDistance(k,B){this._minFollowDistance=k,this._maxFollowDistance=B,this._minFollowDistanceSq=k*k,this._maxFollowDistanceSq=B*B}setFollowLocomotion(k){this._followLocomotion&&this._followLocomotion.onPathStart.remove(this.followLocomotionStarted,this),(0,ut.v)(!!k,"Invalid pathLocomotion was set"),this._followLocomotion=k,this._followLocomotion.onPathStart.add(this.followLocomotionStarted,this)}followLocomotionStarted(){this._hasValidPath?this.updateFollowPath(this._targetLocomotion.GameObject.transform.worldPosition,this._followLocomotion.GameObject.transform.worldPosition):this._hasValidPath=!1}updateFollowPath(k,B){var U,F;const G=this._pathfinder?this._pathfinder.findPath(k,B):null===(U=j.W$e.instance.game.navMeshSystem.navMesh)||void 0===U?void 0:U.findPath(k,B);if(!G)return;const $=null===(F=this._followLocomotion.getPath())||void 0===F?void 0:F.slice(this._followLocomotion.currentPathSegment+1);this._targetLocomotion.setPath([...G,...null!=$?$:[]]),this._hasValidPath=!0}};var qa;(0,G.Cg)([(0,j.MnK)(j.KhP),(0,G.Sn)("design:type",j.KhP)],Wa.prototype,"_followLocomotion",void 0),(0,G.Cg)([(0,j.MnK)(j.KhP),(0,G.Sn)("design:type",j.KhP)],Wa.prototype,"_targetLocomotion",void 0),(0,G.Cg)([(0,j.Cdj)("Pathfinder"),(0,G.Sn)("design:type",j.wGs)],Wa.prototype,"_pathfinder",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Wa.prototype,"_minFollowDistance",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Wa.prototype,"_maxFollowDistance",void 0),Wa=(0,G.Cg)([(0,j.EVk)("FollowPathLocomotion",W.Y.motion)],Wa);let Ka=qa=class extends j.uAl{constructor(){super(...arguments),this._petFollowCount=0,this._followSpawnOffset=new j.I9Y,this._minimumFollowDistance=0,this._maximumFollowDistance=0,this._currentFollows=[],this._spawnedPetFollows=[],this._nextPathLocomotion=null}get spawnedPetFollows(){return this._spawnedPetFollows}get petFollowCount(){return this._petFollowCount}create(){super.create(),this._nextPathLocomotion=this._playerPathLocomotion}destroy(){this._playerPathLocomotion=null,super.destroy()}spawnBuddyFollow(k){const B=Yt.t.getItem("follow",k);if(!B)return;const U=B.metadata;let F=null,G=k;"legacy"===U.type?F="legacy":"spine"===U.type?F="spine":"pet"===U.type&&(F="pet",G=U.petID),(0,ut.v)(null!==F,`Invalid buddy follow was attempted to load with ID: ${k}`);const $=this._prefabAppearanceLoader.loadFollowPrefab(F,G,this._followParent);this._followParent||j.wa5.getActiveScene().addGameObject($),this.initializeFollowPrefab($),this._nextPathLocomotion=$.findComponentInChildren(j.KhP)}spawnPetFollow(k){const B=this._prefabAppearanceLoader.loadFollowPrefab("pet",k,this._followParent);this._followParent||j.wa5.getActiveScene().addGameObject(B),this.initializeFollowPrefab(B),this._nextPathLocomotion=B.findComponentInChildren(j.KhP),this._spawnedPetFollows.push(k)}destroyCurrentFollows(){const k=this._currentFollows.length;if(k>0){for(let B=0;B0){tt.q.instance.game.broadcaster.addAppListener(jn.ig.Evolved,this.petEvolved,this,null);for(const k of this.getPetsToFollow())this._followSpawner.spawnPetFollow(k)}const F=this._playerData.player,G=F.equipment.getFollow();if(j.Aq$.isDefined(G)){const j=null===(B=null===(k=Yt.t.getItem("follow",G))||void 0===k?void 0:k.metadata)||void 0===B?void 0:B.petID,$=null===(U=Yt.t.getItem("pet",j))||void 0===U?void 0:U.data;if((null==$?void 0:$.unlockFollow)&&(null==$?void 0:$.unlockFollow)===G){const k=F.kennel.amountOfPet(j),B=F.kennel.getPetTeamIDs()[0]===j;(this._petFollowCount<=0||k>=2||!B)&&this._followSpawner.spawnPetFollow(j)}else this._followSpawner.spawnBuddyFollow(G)}}unloadFollows(){tt.q.instance.game.broadcaster.removeAppListener(jn.ig.Evolved,this,null),tt.q.instance.game.broadcaster.removeAppListener(jn.Y1.ClosePetsMenu,this),this._followSpawner.destroyCurrentFollows()}getPetsToFollow(){if(this._petFollowCount<1)return[];const k=this._playerData.player.kennel.getPetTeamIDs();return k.length=Math.min(k.length,this._petFollowCount),k}petEvolved(k){this._playerData.player.kennel.petTeam.indexOf(k)>-1&&this.reloadFollows()}petMenuClosed(){const k=this._followSpawner.spawnedPetFollows,B=this.getPetsToFollow();(k.length!==B.length||k.some(((k,U)=>B[U]!==k)))&&this.reloadFollows()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],za.prototype,"_petFollowCount",void 0),(0,G.Cg)([(0,j.MnK)(Ka),(0,G.Sn)("design:type",Ka)],za.prototype,"_followSpawner",void 0),(0,G.Cg)([(0,j.Cdj)("377-3e7b"),(0,G.Sn)("design:type",Object)],za.prototype,"_playerData",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],za.prototype,"_loadOnCreate",void 0),za=(0,G.Cg)([(0,j.EVk)("PlayerPetAndFollowLoader",W.Y.follow)],za);let Ya=class extends Be.u{constructor(){super(...arguments),this._monsterJumpHeight=80}run(){const k=new j.I9Y;k.copyFrom(this._crystalMonster.transform.worldPosition);const B=new j.I9Y(k.x,k.y-this._monsterJumpHeight);this.execute(131,{game:tt.q.instance.game,playerObject:this._mainPlayer,playerStartPosition:this._initialPlayerPosition.worldPosition,playerTransform:this._mainPlayer.transform,camera:j.i7d.main.GameObject,playerWalkTarget:this._playerWalkTarget.worldPosition,nootWalkTarget:this._nootWalkTarget.worldPosition,playerFollowSpawner:this._mainPlayer.findComponentInChildren(za),nootTransform:this._nootGameObject.transform,nootAlertBubble:this._nootAlertBubble,playerAlertBubble:this._playerAlertBubble,nootQuestionBubble:this._nootQuestionBubble,monsterSpineTransform:this._crystalMonsterSpine.transform,monsterAlertBubble:this._crystalMonsterAlertBubble,monsterTransform:this._crystalMonster.transform,monsterJumpEnd:B,monsterJumpStart:k,monsterOffscreenPosition:this._monsterOffscreenPosition.worldPosition,monsterSpine:this._crystalMonsterSpine.findComponent(oi.v).getSpine(),nootGraphic:this._nootGraphic})}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ya.prototype,"_nootGameObject",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Ya.prototype,"_initialPlayerPosition",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Ya.prototype,"_playerWalkTarget",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Ya.prototype,"_nootWalkTarget",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ya.prototype,"_nootQuestionBubble",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ya.prototype,"_nootAlertBubble",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ya.prototype,"_playerAlertBubble",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ya.prototype,"_crystalMonster",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ya.prototype,"_crystalMonsterSpine",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ya.prototype,"_monsterJumpHeight",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ya.prototype,"_crystalMonsterAlertBubble",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],Ya.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Ya.prototype,"_monsterOffscreenPosition",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],Ya.prototype,"_nootGraphic",void 0),Ya=(0,G.Cg)([(0,j.EVk)("Phase1IntroFSM",W.Y.adventureFsm)],Ya);var Qa,Xa=U(88818),Za=U(24110),Ja=U(63068);let tr=Qa=class extends Be.u{constructor(){super(...arguments),this.minecartSoundEffect=pi.c.Sfx_minecart,this.minecartStopSoundEffect=pi.c.Sfx_minecartstop,this._gearElement=new j.KDe}create(){super.create(),this._gearElement.hiddenSlots.push(Xa.Cj.Weapon),this._minecartAnimator&&this._minecartSpine&&(this.playIdleAnimation(),this._minecartSpine.getSpine()?this.createMask():this._minecartSpine.OnLoaded.add(this.createMask,this,0,!1))}destroy(){this._mask&&this._mask.destroy(),super.destroy()}run(){var k;null===(k=this._mainPlayer.findComponentInChildren(Ja.n))||void 0===k||k.addExtraGear(this._gearElement);const B=new $e.Point;this._mainPlayer.parent.transform.worldMatrix.applyInverse(B,B),this._minecartEntryPoint.worldMatrix.apply(B,B);const U=new $e.Point;this.GameObject.parent.transform.worldMatrix.applyInverse(U,U),this._minecartDestination.worldMatrix.apply(U,U);const F=new $e.Point;this._mainPlayer.parent.transform.worldMatrix.applyInverse(F,F),this._minecartExit.worldMatrix.apply(F,F);const G=new j.I9Y;G.copyFrom(this.GameObject.transform.localPosition);const $=new j.I9Y(U.x-G.x,U.y-G.y);this.execute(134,{game:tt.q.instance.game,playerAnimationController:this._mainPlayer.findComponentInChildren(Oa.$),playerTransform:this._mainPlayer.transform,minecartInput:this._minecartInput,minecartEntryPosition:B,minecartEntryDuration:this._minecartEntryDuration,minecart:this,minecartTransform:this.GameObject.transform,minecartFrom:G,minecartDestination:U,minecartRideDuration:this._minecartRideDuration,playerMinecartDestination:new j.I9Y(B.x+$.x,B.y+$.y),minecartAnimator:this._minecartAnimator,minecartExitDuration:this._minecartExitDuration,minecartExitPosition:F,saveState:this._mapSaveComponent,minecartStopOffset:this._minecartRideDuration-100,morphExpiration:this._mainPlayer.findComponentInChildren(Ca),playerSpawnFollows:this._mainPlayer.findComponentInChildren(Ka),playerFollowLoader:this._mainPlayer.findComponentInChildren(za)})}checkTrackCompletion(){this._minecartTrackSaveState&&!this._minecartTrackSaveState.isCompleted()||(this._minecartInput.active=!0)}playMotionAnimation(){this._minecartAnimator.playAnimation(`${Qa.ANIMATION_NAMES[this._minecartMovementDirection]}-motion`,!0)}playIdleAnimation(){this._minecartAnimator.playAnimation(`${Qa.ANIMATION_NAMES[this._minecartMovementDirection]}-idle`,!0)}applyMaskToPlayer(){const k=this._mainPlayer.findComponentInChildren(Za.B);this._mask.visible=!0,k.getRootContainer().mask=this._mask}clearPlayerMask(){const k=this._mainPlayer.findComponentInChildren(Za.B);this._mask.visible=!1,k.getRootContainer().mask=null}addPlayerWeapon(){var k;null===(k=this._mainPlayer.findComponentInChildren(Ja.n))||void 0===k||k.removeExtraGear(this._gearElement)}createMask(){const k=this._minecartSpine.getSlot(this._maskSlotName),B=this._minecartSpine.getSpine().getSlotContainer(k),U=B.getChildAt(0),F=new j.or0(B.width/B.scale.x,B.height/B.scale.y);U.visible=!1,this._mask=tt.q.instance.game.add.graphics(),this._mask.clear(),this._mask.visible=!1,this._mask.beginFill(16776960,1),this._mask.drawRect(.5*-F.width+U.position.x,.5*-F.height+U.position.y,F.width,F.height),this._mask.endFill(),B.addChild(this._mask)}};tr.ANIMATION_NAMES={0:"X",1:"Y-D",2:"Y-U"},(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],tr.prototype,"minecartSoundEffect",void 0),(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],tr.prototype,"minecartStopSoundEffect",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],tr.prototype,"_minecartAnimator",void 0),(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],tr.prototype,"_minecartSpine",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tr.prototype,"_minecartMovementDirection",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],tr.prototype,"_maskSlotName",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],tr.prototype,"_minecartEntryPoint",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],tr.prototype,"_minecartDestination",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],tr.prototype,"_minecartExit",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],tr.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.MnK)(si),(0,G.Sn)("design:type",si)],tr.prototype,"_minecartTrackSaveState",void 0),(0,G.Cg)([(0,j.MnK)(si),(0,G.Sn)("design:type",si)],tr.prototype,"_mapSaveComponent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],tr.prototype,"_minecartInput",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tr.prototype,"_minecartEntryDuration",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tr.prototype,"_minecartRideDuration",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tr.prototype,"_minecartExitDuration",void 0),tr=Qa=(0,G.Cg)([(0,j.EVk)("RideableMinecart",W.Y.adventureFsm)],tr);const er={[Bs.D.MEMBERSHIP_UPGRADE_REWARD_SMALL]:200,[Bs.D.MEMBERSHIP_UPGRADE_REWARD_MEDIUM]:225,[Bs.D.MEMBERSHIP_UPGRADE_REWARD_LARGE]:575};var ir,sr=U(48235);!function(k){k.UpgradeMagicoinAmountCore="UPGRADE_MAGICOIN_AMOUNT_CORE",k.UpgradeMagicoinAmountPlus="UPGRADE_MAGICOIN_AMOUNT_PLUS",k.UpgradeMagicoinAmountPlusCumulative="UPGRADE_MAGICOIN_AMOUNT_PLUS_CUMULATIVE",k.UpgradeMagicoinAmountUltra="UPGRADE_MAGICOIN_AMOUNT_ULTRA",k.UpgradeMagicoinAmountUltraCumulative="UPGRADE_MAGICOIN_AMOUNT_ULTRA_CUMULATIVE"}(ir||(ir={}));let nr=class extends Fi.z{create(){super.create(),this._bindOnCreate&&this.bindContext().catch(j.RQr.createHandler("[MembershipUpgradeRewardDataProvider] Unable to bind context"))}bindContext(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield sr.W.getCollectedRewardsData(),B=this.getMagicoinRewardQuantityForFeature(k,Bs.D.MEMBERSHIP_UPGRADE_REWARD_SMALL),U=this.getMagicoinRewardQuantityForFeature(k,Bs.D.MEMBERSHIP_UPGRADE_REWARD_MEDIUM),F=this.getMagicoinRewardQuantityForFeature(k,Bs.D.MEMBERSHIP_UPGRADE_REWARD_LARGE);Nt.d.updateInjectedValues(this.gameObject,{[ir.UpgradeMagicoinAmountCore]:B,[ir.UpgradeMagicoinAmountPlus]:U,[ir.UpgradeMagicoinAmountPlusCumulative]:B+U,[ir.UpgradeMagicoinAmountUltra]:F,[ir.UpgradeMagicoinAmountUltraCumulative]:B+U+F})}))}getMagicoinRewardQuantityForFeature(k,B){return j.Aq$.isDefined(k.rewarded[B])?0:er[B]}destroy(){this.unbindContext(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],nr.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],nr.prototype,"_bindOnCreate",void 0),nr=(0,G.Cg)([(0,j.EVk)("MembershipUpgradeRewardDataProvider",j.YH6.injection)],nr);var ar,rr=U(30405);!function(k){k.QuestManager="QuestManager",k.TaskInfo="TASK_INFO",k.TaskRepeatableIndex="TASK_REPEATABLE_INDEX",k.TaskIndex="TASK_INDEX",k.TaskInProgressIndex="TASK_IN_PROGRESS_INDEX"}(ar||(ar={}));var or,hr=U(60031),cr=U(43518);!function(k){k.COMPLETE="complete",k.IN_PROGRESS="in-progress",k.LOCKED="locked"}(or||(or={}));let dr=class extends Fi.z{constructor(){super(...arguments),this.onAnimateCard=new j.HN0,this.onRefreshCards=new j.HN0,this.isCollecting=!1}create(){super.create(),this.bindContext().catch(j.RQr.createHandler("[DailyLoginCalendarCardComponent] Unable to retrieve daily login calendar metadata"))}postCreate(){super.postCreate(),this.runCalcTimeToCollect().catch(j.RQr.createHandler("[DailyLoginCalendarCardComponent] Unable to calculate time to collect"))}destroy(){this.onAnimateCard.dispose(),this.onRefreshCards.dispose(),super.destroy()}bindContext(){const k=Object.create(null,{bindContext:{get:()=>super.bindContext}});return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G,j;k.bindContext.call(this),this._task=this._context.Container.get(ar.TaskInfo),this._indexOfTaskInProgress=this._context.Container.get(ar.TaskInProgressIndex);const $=this._dataProvider.player.hasMembership(),H=this._task.taskProgress.results,V="complete"===this._task.taskProgress.status,W=this._index===this._indexOfTaskInProgress,q=null===(B=null==H?void 0:H[this._repeatableIndex])||void 0===B?void 0:B.result,K="in-progress"===this._task.taskProgress.status&&(null!==(G=null===(F=null===(U=this._task.taskProgress)||void 0===U?void 0:U.data)||void 0===F?void 0:F.timesCompleted)&&void 0!==G?G:0)>this._repeatableIndex,z=!$&&(V||K)&&"ItemsSaved"===q,Y=(V||K)&&"ItemsLost"===q,Q=V&&void 0===H||V&&$&&"ItemsSaved"===q||K&&!z&&!Y,X=this._timeManager.getServerTimeMs(),Z=W?yield cr.M.getProgressOfTaskInProgress(this._task):0,J=Math.max(Z-X,0),tt=(yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata()).endDate,et=yield cr.M.getProgressOfTaskInProgress(),it=Math.min(et,tt)===tt,st=X>=tt,nt=Object.assign(Object.assign({},this.getPrizes()),{IN_PROGRESS_TIME:J,SHOW_TIMER:!!J,SHOW_COLLECT_BUTTON:W&&!it&&!st,ENABLE_COLLECT_BUTTON:!st&&!this.isCollecting&&W&&J<=0,IS_READY_TO_COLLECT:!st&&J<=0,LABEL_COLLECTED:V||K,MEMBER_LABEL_COLLECTED:Q,MEMBER_LABEL_SAVED:z,MEMBER_LABEL_LOST:Y,TASK_PROGRESS:this.taskProgressStatus(it||st),SHOW_CALENDAR_ENDING:W&&(it||st),IS_REPEATED_TASK:null===(j=this._task.taskDefinition)||void 0===j?void 0:j.repeatable,CARD_INDEX:`${this._index}`});Nt.d.updateInjectedValues(this.gameObject,nt)}))}isTaskReadyToBeCollect(){return(0,G.sH)(this,void 0,void 0,(function*(){return cr.M.isTaskReadyToCollect()}))}runCalcTimeToCollect(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._index===this._indexOfTaskInProgress,B=this._timeManager.getServerTimeMs(),U=k?yield cr.M.getProgressOfTaskInProgress(this._task):0,F=(yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata()).endDate,G=B>=F,j=F{this.onTaskCollectAnimationEnded.dispatch()},this.refreshRewardCards=()=>(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this.getTasks();this._rewardCards.forEach(((B,U)=>{const F=U>=k.length?k[k.length-1]:k[U],G={[ar.TaskInfo]:F,[ar.TaskInProgressIndex]:this.getCurrentQuestIndex(k)};Nt.d.updateInjectedValues(B,G);const $=this.getCard(B);null==$||$.bindContext().catch(j.RQr.createHandler("[DailyLoginCalendarRewardsComponent]: Could not rebind context for reward cards")),null==$||$.runCalcTimeToCollect().catch(j.RQr.createHandler("[DailyLoginCalendarCardComponent] Unable to calculate time to collect"))}))}))}create(){super.create(),this.onLoadingStart.dispatch(),this.populateRewardCards().then((()=>(0,G.sH)(this,void 0,void 0,(function*(){return this.scrollToInProgress()})))).catch(j.RQr.createHandler("Error populating prizes")),this._dailyLoginCalendarQuestManager.onDataChanged.add(this.onDataChangedCallback,this),this._dailyLoginCalendarQuestManager.onTimeUpdated.add(this.onTimeUpdatedCallback,this),this.onMouseWheelHandler=this.onMouseWheelCallback.bind(this),tt.q.instance.game.input.mouse.addMouseWheelCallback(this.onMouseWheelHandler)}onTimeUpdatedCallback(){(()=>(0,G.sH)(this,void 0,void 0,(function*(){yield this.updateTasks(),yield this.refreshRewardCards()})))().catch(j.RQr.createHandler("Error updating time on DailyLoginCalendarRewardsComponent"))}onDataChangedCallback(){(()=>(0,G.sH)(this,void 0,void 0,(function*(){if((yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata()).uuid===this.currentUUID){if(yield this.checkPrizeCollectAnimation()){this.updateCurrentGameObjectInjections(),this.onTriggerTaskCollectAnimation.dispatch(),yield this.waitForSignal(this.onTaskCollectAnimationEnded);const k=this.getCard(this._currentTaskGameObject);null==k||k.onAnimateCard.dispatch(),yield this.waitForSignal(this.onTaskCollectAnimationEnded),yield rr.o.wait(1e3)}yield this.updateTasks(),yield this.refreshRewardCards(),yield this.updateCurrentTaskIndex(),this.onAnimationsFinished.dispatch()}else this.resetComponent()})))().catch(j.RQr.createHandler("Error updating data onDataChangedCallback"))}resetComponent(){this.onLoadingStart.dispatch(),this._container.children.forEach((k=>{k.active=!1,k.destroyDeferred()})),this._questTasks.length=0,this._rewardCards.length=0,this.populateRewardCards().then((()=>(0,G.sH)(this,void 0,void 0,(function*(){return this.scrollToInProgress()})))).catch(j.RQr.createHandler("Error populating prizes"))}checkPrizeCollectAnimation(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this.getCurrentQuestIndex(yield this._dailyLoginCalendarQuestManager.getActiveStandardTrack());return this._cachedCurrentIndex!==k}))}waitForSignal(k){return(0,G.sH)(this,void 0,void 0,(function*(){return new Promise((B=>{k.addOnce((()=>{B()}))}))}))}populateRewardCards(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F;this._container.children.length=0;const j=yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata();this.currentUUID=j.uuid;const $=[],H=yield this.getTasks();for(const G of H){const j=null!==(B=null===(k=G.taskDefinition)||void 0===k?void 0:k.repeatable)&&void 0!==B&&B;if(j&&"number"==typeof j)for(let k=0;k(0,G.sH)(this,[k,B],void 0,(function*({repeatableIndex:k,task:B},U){return yield rr.o.wait(10*U),this.instantiateChild(B,U,k,H)}))))),this._rewardCards.forEach((k=>{this._container.addChild(k),k.active=!0})),this._rewardCards}))}updateTasks(){return(0,G.sH)(this,void 0,void 0,(function*(){return this._questTasks=yield this._dailyLoginCalendarQuestManager.getActiveStandardTrack(),this._questTasks}))}getTasks(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;return(null===(k=this._questTasks)||void 0===k?void 0:k.length)||(yield this.updateTasks()),this._questTasks}))}instantiateChild(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){const G=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.CardDailyLoginCalendar,{[ar.TaskInfo]:k,[ar.TaskRepeatableIndex]:U,[ar.TaskIndex]:B,[ar.TaskInProgressIndex]:this.getCurrentQuestIndex(F)});return G.active=!1,G.name=`${G.name} ${k.taskID}`,G}))}scrollToInProgress(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this._scrollViewRef||!this._gridLayoutRef)return;const k=this._container.children,B=yield this.updateCurrentTaskIndex(),U=j.Htv.getWidth(k[0]),F=this._gridLayoutRef.columnSpacing,G=(U+F)*B-j.Htv.getWidth(this._scrollViewRef.GameObject)/2+U/2+2*F;this._scrollViewRef.setScrollPosition(-G),this.updateCurrentGameObjectInjections(),this.onLoadingEnd.dispatch()}))}updateCurrentTaskIndex(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._container.children,B=this.getCurrentQuestIndex(yield this.getTasks());return this._cachedCurrentIndex=B,this._currentTaskGameObject=k[B],this.updateCurrentGameObjectInjections(),B}))}updateCurrentGameObjectInjections(){var k,B;this._prefabRoot&&Nt.d.updateInjectedValues(this._prefabRoot,{CURRENT_TASK_GAME_OBJECT:this._currentTaskGameObject,CURRENT_TASK_COLLECT_BUTTON_GAME_OBJECT:null===(B=null===(k=this._currentTaskGameObject)||void 0===k?void 0:k.findChildByName("PrizeSlots"))||void 0===B?void 0:B.findChildByName("Button Collect")})}getCurrentQuestIndex(k){var B,U;let F=k.findIndex((k=>"in-progress"===k.taskProgress.status));return k[F].taskDefinition.repeatable&&(F+=null!==(U=null===(B=k[F].taskProgress.data)||void 0===B?void 0:B.timesCompleted)&&void 0!==U?U:0),F}getCard(k){if(!k||k.isDestroyed)return null;const B=k.findComponent(dr);return B||(j.VyI.log("%c DailyLoginCalendarRewardsComponent getCard `card` %O not found to `.bindContext`, or destroyed",j.$bb.Error,"color: #00FF00; background: #000;",B),null)}isTaskReadyToBeCollect(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.refreshRewardCards(),yield this.updateCurrentTaskIndex();const k=this.getCard(this._currentTaskGameObject),B=yield cr.M.hasStandardTrackEnded();this.onTaskPrizeReady.dispatch(!B&&!!(null==k?void 0:k.isTaskReadyToBeCollect()))}))}onMouseWheelCallback(){this._rewardPopover.active&&(this._rewardPopover.active=!1)}destroy(){this._dailyLoginCalendarQuestManager.onDataChanged.remove(this.onDataChangedCallback,this),this._dailyLoginCalendarQuestManager.onTimeUpdated.remove(this.onTimeUpdatedCallback,this),tt.q.instance.game.input.mouse.removeMouseWheelCallback(this.onMouseWheelHandler),this.onAnimationsFinished.dispose(),this.onTaskCollectAnimationEnded.dispose(),this.onTriggerTaskCollectAnimation.dispose(),this.onTaskPrizeReady.dispose(),this.onLoadingStart.dispose(),this.onLoadingEnd.dispose(),super.destroy()}};var ur;(0,G.Cg)([(0,j.ERr)(),(0,j.YLv)("Prefab Root to dispatch some injections"),(0,G.Sn)("design:type",j._mx)],lr.prototype,"_prefabRoot",void 0),(0,G.Cg)([(0,j.ERr)(),(0,j.YLv)("Root container for the Reward Cards"),(0,G.Sn)("design:type",j._mx)],lr.prototype,"_container",void 0),(0,G.Cg)([(0,j.MnK)(Mt.C),(0,j.YLv)("Reference to the `StandardScrollView` to be navigated"),(0,G.Sn)("design:type",Mt.C)],lr.prototype,"_scrollViewRef",void 0),(0,G.Cg)([(0,j.MnK)(at),(0,G.Sn)("design:type",at)],lr.prototype,"_gridLayoutRef",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],lr.prototype,"_rewardPopover",void 0),(0,G.Cg)([(0,j.Cdj)("a71-dfcf"),(0,G.Sn)("design:type",hr.k)],lr.prototype,"_dailyLoginCalendarQuestManager",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],lr.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],lr.prototype,"onLoadingStart",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],lr.prototype,"onLoadingEnd",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],lr.prototype,"onTriggerTaskCollectAnimation",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],lr.prototype,"onTaskPrizeReady",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],lr.prototype,"onAnimationsFinished",void 0),(0,G.Cg)([(0,j.Bak)(),(0,j.i0J)(j.Z$z.SingleImage),(0,G.Sn)("design:type",String)],lr.prototype,"preloadSingleImage",void 0),lr=(0,G.Cg)([(0,j.EVk)("DailyLoginCalendarRewards",void 0,"Populate items for DailyLoginCalendar")],lr);let fr=ur=class extends j.uAl{constructor(){super(...arguments),this._playNotificationSfx=new j.HN0,this.isCalendarEnded=new j.HN0}create(){super.create(),this._broadcaster=tt.q.instance.prodigy.game.broadcaster,this._runOnCreate&&this.run().catch(j.RQr.createHandler("Error running Daily Login Calendar Timer Data Provider")),this._dailyLoginCalendarQuestManager.onDataChanged.add(this.onDataChanges,this),this._dailyLoginCalendarQuestManager.onTimeUpdated.add(this.onDataChanges,this)}onDataChanges(){ur._hasPlayedNotificationSfx=!1,this.run().catch(j.RQr.createHandler("Error running Daily Login Calendar Timer Data Provider"))}run(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._timeManager.getServerTimeMs(),B=yield this._dailyLoginCalendarQuestManager.getTimerData();if(B.calendarEnded)return void this._broadcaster.broadcast(jn.rF.CalendarEnded,tt.q.instance.prodigy.game,[]);const U=B.targetDate>k?jn.rF.CountdownStarted:jn.rF.ReadyToCollect,F=[B.targetDate-k];this._broadcaster.broadcast(U,tt.q.instance.prodigy.game,F),B.calendarIsEnding&&this._broadcaster.broadcast(jn.rF.CalendarEnding,tt.q.instance.prodigy.game,[]),U===jn.rF.ReadyToCollect&&!ur._hasPlayedNotificationSfx&&this.IsActiveInHierarchy&&tt.q.instance.prodigy.world.getCurrentZone()!==Ft.A_.CRYSTALCAVERNS&&(ur._hasPlayedNotificationSfx=!0,this._playNotificationSfx.dispatch())}))}hasCalendarEnded(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=(yield cr.M.hasUltimateTrackEnded())&&(yield cr.M.hasStandardTrackEnded());return this.isCalendarEnded.dispatch(k),k}))}destroy(){super.destroy(),this._dailyLoginCalendarQuestManager.onDataChanged.remove(this.onDataChanges,this),this._dailyLoginCalendarQuestManager.onTimeUpdated.remove(this.onDataChanges,this),this.isCalendarEnded.dispose(),this._playNotificationSfx.dispose()}};fr._hasPlayedNotificationSfx=!1,(0,G.Cg)([(0,j.Cdj)("a03-308f"),(0,G.Sn)("design:type",Ks.V)],fr.prototype,"_timeManager",void 0),(0,G.Cg)([(0,j.Cdj)("a71-dfcf"),(0,G.Sn)("design:type",hr.k)],fr.prototype,"_dailyLoginCalendarQuestManager",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],fr.prototype,"_runOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],fr.prototype,"_playNotificationSfx",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],fr.prototype,"isCalendarEnded",void 0),fr=ur=(0,G.Cg)([(0,j.EVk)("Daily Login Calendar - Timer Data Provider",void 0,"Reads the current calendar time for the Daily Login Calendar")],fr);var br=U(6670),pr=U(58776),vr=U(56567);let gr=class extends Fi.z{constructor(){super(...arguments),this.onUltimatePrizeReady=new j.HN0,this._initialBind=!0}create(){super.create(),this._dailyLoginCalendarQuestManager.onDataChanged.add(this.tryBindContext,this),this._bindOnCreate&&this.tryBindContext(),tt.q.instance.prodigy.game.broadcaster.addAppListener(jn.H3.MembershipResponseReceived,this.handleMembershipChange,this)}tryBindContext(){this.bindContext().catch(j.RQr.createHandler("[DlcUltimateTrackDataProviderComponent] Failed to bind context"))}bindContext(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;const U=yield this._dailyLoginCalendarQuestManager.getActiveUltimateTrack(),F=yield this._dailyLoginCalendarQuestManager.getActiveUltimateTrackMetadata(),G=yield this.getRewardTask(U),$=this.getClaimTask(U),H=this.getClaimTaskProgress($),V=null!==(k=$.taskDefinition.completionRequirements.data.target)&&void 0!==k?k:H,W=Math.max(1,F.endDate-this._timeManager.getServerTimeMs()),q=(null===(B=null==G?void 0:G.taskProgress)||void 0===B?void 0:B.status)===pr.t.COMPLETE,K=[H,V,!this._initialBind,this._initialBind?0:1200],z={[hs.jP.ShouldShowMemberJar]:!1,[hs.jP.ThresholdPrizeMembershipTier]:xs._$.MemberUltimateBundle,[hs.jP.ThresholdPrizePackageFeatureKey]:"daily_login_calendar_threshold_reward",[hs.jP.UltimateTrackTimeRemaining]:W,[hs.jP.UltimateTrackRewardAvailable]:yield this.isUltimatePrizeReady(),[hs.jP.UltimateTrackRewardClaimed]:q,[hs.jP.UltimateTrackProgressBarFillData]:K};(null==F?void 0:F.prizeDisplayConfig)?(z[hs.jP.UltimateTrackRewardDisplayConfig]=F.prizeDisplayConfig,Object.entries(F.prizeDisplayConfig).forEach((([k,B])=>{z[`${hs.jP.UltimateTrackRewardDisplayConfig}.${k}`]=B}))):j.RQr.createHandler("[DlcUltimateTrackDataProviderComponent] No prize display config found in ultimate quest metadata"),Nt.d.updateInjectedValues(this.gameObject,z),this._initialBind=!1}))}checkIfUltimatePrizeReady(){return(0,G.sH)(this,void 0,void 0,(function*(){this.onUltimatePrizeReady.dispatch(yield this.isUltimatePrizeReady())}))}isUltimatePrizeReady(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;const U=yield this._dailyLoginCalendarQuestManager.getActiveUltimateTrack(),F=yield this.getRewardTask(U),G=this.getClaimTask(U),j=(null===(k=null==G?void 0:G.taskProgress)||void 0===k?void 0:k.status)===pr.t.COMPLETE,$=(null===(B=null==F?void 0:F.taskProgress)||void 0===B?void 0:B.status)===pr.t.COMPLETE;return j&&!$}))}getClaimTaskProgress(k){var B,U,F,G,j;return(null===(B=k.taskProgress)||void 0===B?void 0:B.status)===pr.t.COMPLETE?null!==(U=k.taskDefinition.completionRequirements.data.target)&&void 0!==U?U:0:null!==(j=null===(G=null===(F=null==k?void 0:k.taskProgress)||void 0===F?void 0:F.data)||void 0===G?void 0:G.progress)&&void 0!==j?j:0}handleMembershipChange(k){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.prodigy.game.broadcaster.removeAppListener(jn.H3.MembershipResponseReceived,this),yield this._playerProvider.fetchMembershipUpsell(),yield this.bindContext()}))}getClaimTask(k){return k[0]}getRewardTask(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=new vr.f,U=k.filter((B=>B!==this.getClaimTask(k)));return(yield br.f.filterTasksByPreconditions(U,B))[0]}))}destroy(){tt.q.instance.prodigy.game.broadcaster.removeAppListener(jn.H3.MembershipResponseReceived,this),this._dailyLoginCalendarQuestManager.onDataChanged.remove(this.tryBindContext,this),this.onUltimatePrizeReady.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],gr.prototype,"_playerProvider",void 0),(0,G.Cg)([(0,j.Cdj)("a71-dfcf"),(0,G.Sn)("design:type",hr.k)],gr.prototype,"_dailyLoginCalendarQuestManager",void 0),(0,G.Cg)([(0,j.Cdj)("a03-308f"),(0,G.Sn)("design:type",Ks.V)],gr.prototype,"_timeManager",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],gr.prototype,"_bindOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],gr.prototype,"onUltimatePrizeReady",void 0),gr=(0,G.Cg)([(0,j.EVk)("DailyLoginCalendarUltimateTrackDataProvider")],gr);var mr=U(43333);let yr=class extends j.uAl{postCreate(){super.postCreate(),this._dailyLoginCalendarQuestManager.onDataChanged.add(this.run,this),this._dailyLoginCalendarQuestManager.onTimeUpdated.add(this.run,this),this.run()}destroy(){this._dailyLoginCalendarQuestManager.onDataChanged.remove(this.run,this),this._dailyLoginCalendarQuestManager.onTimeUpdated.remove(this.run,this),super.destroy()}run(){this.updateTimerEndEvent().catch(j.RQr.createHandler("DailyLoginCalendarEndEventDataProvider bindContext error from updateTimerEndEvent"))}updateTimerEndEvent(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._dailyLoginCalendarQuestManager.getActiveStandardTrackMetadata(),B=this._timeManager.getServerTimeMs(),U=k.endDate-B,F=U<=0;tt.q.instance.prodigy.game.broadcaster.broadcast(jn.rF.CalendarTimeRemaining,tt.q.instance.prodigy.game,[U]),this._timerText&&F&&this._timerText.onTimerCompleted.dispatch()}))}};(0,G.Cg)([(0,j.Cdj)("a71-dfcf"),(0,G.Sn)("design:type",hr.k)],yr.prototype,"_dailyLoginCalendarQuestManager",void 0),(0,G.Cg)([(0,j.Cdj)("a03-308f"),(0,G.Sn)("design:type",Ks.V)],yr.prototype,"_timeManager",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],yr.prototype,"_timerText",void 0),yr=(0,G.Cg)([(0,j.EVk)("DailyLoginCalendarEndEvent",void 0,"")],yr);var _r=U(47728);let Er=class extends j.uAl{setItem(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U;const F=yield Yt.t.secureGetItem(k.type,k.ID);if(!F)throw new Error(`DailyLoginCalendarPrizeItemComponent setItem Item was not found for ${k.type}-${k.ID}`);const G=os.X.createImageLoadData(F);yield this._image.setAsset(G.source,G.frame),null===(U=null===(B=this._quantity.GameObject)||void 0===B?void 0:B.isDestroyed)||void 0===U||U||(this._quantity.text=`x ${k.N}`,"item"===F.type&&F.ID&&_r.x.isMorphMarbleAsset(F.ID)&&(this._morphMarbleIcon.active=!0))}))}};(0,G.Cg)([(0,j.MnK)(Ke._),(0,j.YLv)("Image of the prize item to be filled by invoking `setItem`"),(0,G.Sn)("design:type",Ke._)],Er.prototype,"_image",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,j.YLv)("Quantity of the prize item to be filled by invoking `setItem`"),(0,G.Sn)("design:type",j.EYj)],Er.prototype,"_quantity",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Er.prototype,"_morphMarbleIcon",void 0),Er=(0,G.Cg)([(0,j.EVk)("DailyLoginCalendarPrizeItem",void 0,"DailyLoginCalendar prize item consumer and display")],Er);U(28047);let wr=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.onShopSelected=this.createTidySignal()}setup(k){if(!j.Aq$.isDefined(this.shopButtonPrefab)||!j.Aq$.isDefined(this.shopButtonsContainerObject))return;const B=Object.entries(k);B.sort(((k,B)=>k[1].cover-B[1].cover)),Promise.all(B.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return this.createButtonForShop(k)}))))).then((k=>{k.filter((k=>j.Aq$.isDefined(k))).forEach(((k,B)=>{this.shopButtonsContainerObject.addChildAt(k,B)}))})).catch((k=>{throw k}))}createButtonForShop(k){return(0,G.sH)(this,void 0,void 0,(function*(){const[B,U]=k,{label:F,cover:G,itemBake:j,nameLocalizationKey:$}=U,H=$?this._baseLocalizer.getText($):void 0,V=[{injectionName:"SELECTED_BAKE",data:j},{injectionName:"SELECTED_COVER",data:G},{injectionName:"SELECTED_URL",data:`singleImage-${j}`},{injectionName:"USING_URL_IMAGE",data:"string"==typeof j}],W=yield this._prefabLoader.loadWithDependenciesFromGUID(this.shopButtonPrefab,this.shopButtonsContainerObject,!1,V);return Nt.d.updateInjectedValues(W,{SHOP_LABEL:null!=H?H:F,SHOP_KEY:B,SHOP_CLICKED_CB:()=>{this.onShopSelected.dispatch(B)}}),W}))}};(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],wr.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],wr.prototype,"_baseLocalizer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],wr.prototype,"onShopSelected",void 0),(0,G.Cg)([(0,j.i0J)(j.Z$z.Prefab),(0,G.Sn)("design:type",String)],wr.prototype,"shopButtonPrefab",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],wr.prototype,"shopButtonsContainerObject",void 0),wr=(0,G.Cg)([(0,j.EVk)("AllShopsMenuController")],wr);var Tr=U(10471),Sr=U(8394),Ar=U(59599);let Cr=class extends j.uAl{constructor(){super(...arguments),this._amount=0,this._currencyID=0}set amount(k){this._amount=k}set currency(k){this._currencyID=k}refresh(){const k=(0,Sr.p)("currency",this._currencyID)&&Tr.h.includes(this._currencyID)&&this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(this._amount);this._lockedState.setValue(k)}};(0,G.Cg)([(0,Gi.b)("5c7-e02d"),(0,G.Sn)("design:type",zn.W)],Cr.prototype,"_hardCurrencyDataProvider",void 0),(0,G.Cg)([(0,j.MnK)(Ar.f),(0,G.Sn)("design:type",Ar.f)],Cr.prototype,"_lockedState",void 0),Cr=(0,G.Cg)([(0,j.EVk)("DynamicStoreBundleLockedState",W.Y.store)],Cr);U(71391),U(76016),U(77992);var Or=U(16847);let Ir=class extends j.uAl{constructor(){super(...arguments),this.currencyDisplayComponents=[],this.currenciesToExclude=[]}setDisplayedCurrencies(k){const B=Object.entries(k).sort((([,k],[,B])=>B-k)).map((([k])=>parseInt(k,10))).filter((k=>!this.currenciesToExclude.includes(k)));for(const[U,F]of this.currencyDisplayComponents.entries()){const k=B[U];F.GameObject.active=j.Aq$.isDefined(k),F.GameObject.active&&F.updateCurrencyID(k)}}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Or.n),(0,G.Sn)("design:type",Array)],Ir.prototype,"currencyDisplayComponents",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.g11)(),(0,G.Sn)("design:type",Array)],Ir.prototype,"currenciesToExclude",void 0),Ir=(0,G.Cg)([(0,j.EVk)("DynamicStoreCurrencyDisplayContoller")],Ir);var Dr=U(64270),Rr=U(88131),Pr=U(55328);const Mr=[13,15,12,14,16,1,27];let Nr=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.onDataLoadStarted=this.createTidySignal(),this.onDataLoadFinished=this.createTidySignal(),this.onConfigurationEntityLoaded=this.createTidySignal()}postCreate(){this.loadStore().catch((k=>{this.dispatchError(k)})),this.loadConfig().catch((k=>{this.dispatchError(k)}))}loadStore(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;this.onDataLoadStarted.dispatch();const U=null!==(B=null!=k?k:this.storeName)&&void 0!==B?B:Dr.g0.AllShops;if(U===Dr.g0.AllShops)return void this.onDataLoadFinished.dispatch(Rr.Q.success({DYNAMIC_STORE_DATA:U}));const{player:F}=this._playerDataProvider,G=Mr.map((k=>({[hs.$u.CurrencyID]:k,[hs.$u.CurrencyAmount]:F.getCurrencyAmount(k)}))),j=yield this._dynamicStoreDataProvider.getDynamicStoreUIData({storeKey:U});if(j.isSuccess()){const k=j.get();this.onDataLoadFinished.dispatch(Rr.Q.success({MULTI_CURRENCY_WALLET_DATA:G,DYNAMIC_STORE_DATA:k,DYNAMIC_STORE_TAB_AMOUNT:k.store.sections.length}))}else this.dispatchError(j.error)}))}loadConfig(){return(0,G.sH)(this,void 0,void 0,(function*(){try{const{storeConfigEntity:k}=yield this._dynamicStoreRoute.getStoreConfigurationEntity();this.onConfigurationEntityLoaded.dispatch(k)}catch(e){this.dispatchError(e)}}))}dispatchError(k){if("string"==typeof k)return j.VyI.log(k,j.$bb.Error),void this.onDataLoadFinished.dispatch(Rr.Q.error(new Error(k)));const B=new Error(j.RQr.stringify(null!=k?k:"There was an error loading the dynamic store data"));j.VyI.log(B.message,j.$bb.Error),this.onDataLoadFinished.dispatch(Rr.Q.error(B))}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Nr.prototype,"onDataLoadStarted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Nr.prototype,"onDataLoadFinished",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Nr.prototype,"onConfigurationEntityLoaded",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Nr.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("84d-05d4"),(0,G.Sn)("design:type",Object)],Nr.prototype,"_dynamicStoreDataProvider",void 0),(0,G.Cg)([(0,Gi.b)("9ea-3f44"),(0,G.Sn)("design:type",Pr.v)],Nr.prototype,"_dynamicStoreRoute",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Nr.prototype,"storeName",void 0),Nr=(0,G.Cg)([(0,j.EVk)("DynamicStoreDataConsumer")],Nr);let xr=class extends j.uAl{get labelString(){return this._labelString}set labelString(k){this._labelString=(0,ms.k)(k),this.updateLabels()}get count(){return this._count}set count(k){this._count=k,this.updateLabels()}constructor(){super(),this.hideIfLessThanOne=!1,this._count=0,this._labelString=(0,ms.k)("MORE")}postCreate(){this.updateLabels()}updateLabels(){const k=this.hideIfLessThanOne&&this.count<1;this.gameObject.active=!k,this.counterText&&(this.counterText.text=`${this.getSignChar()}${this._count}`),this.labelText&&(this.labelText.text=this._labelString)}getSignChar(){return this._count>0?"+":""}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],xr.prototype,"hideIfLessThanOne",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String),(0,G.Sn)("design:paramtypes",[String])],xr.prototype,"labelString",null),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number),(0,G.Sn)("design:paramtypes",[Number])],xr.prototype,"count",null),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],xr.prototype,"counterText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],xr.prototype,"labelText",void 0),xr=(0,G.Cg)([(0,j.EVk)("ItemsCountCardController"),(0,G.Sn)("design:paramtypes",[])],xr);var Lr=U(71134),kr=U(43858),Br=U(10711);let Ur=class extends j.uAl{constructor(){super(...arguments),this._itemCards=[],this.onLoadingFinished=new j.HN0}postCreate(){var k,B;this._itemCards=null!==(B=null===(k=this.itemCardContainerObject)||void 0===k?void 0:k.findComponentsInChildren(kr.j))&&void 0!==B?B:[],this._itemCards.forEach((k=>{k.GameObject.active=!1})),this.onLoadingFinished.addOnce((()=>{var k;this.sendInterfaceOpenedEvent(),this._storeKey=this.getInjectedValue(hs.YM.StoreKey),!this._storeKey&&(null===(k=this.openStoreButton)||void 0===k?void 0:k.GameObject)&&(this.openStoreButton.GameObject.active=!1)}),this),this.setUpModal().catch(j.RQr.createHandler("DynamicStoreModalComponent: Failed to get store and quest data"))}setUpModal(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;const U=this.getInjectedValue(hs.YM.OfferData),F=this.getInjectedValue(hs.YM.OfferReadById);if(!U||0===U.length)return void this.gameObject.destroy();const G=(0,Br.K8)(U,F),j=G.slice(0,this._itemCards.length);for(let $=0;${var B;return null===(B=k.getItemData().item)||void 0===B?void 0:B.ID}));k.push(Math.max(this.moreItemsCardController.count,0)),this._segment.featureCommon.sendInterfaceEvent({interfaceName:us.B.DynamicStoreModal,interfaceType:ui.Wm.Window,instanceType:fi.N.UI,originType:ui.$N.AutoSurfaced},{item_list:k})}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ur.prototype,"itemCardContainerObject",void 0),(0,G.Cg)([(0,j.MnK)(xr),(0,G.Sn)("design:type",xr)],Ur.prototype,"moreItemsCardController",void 0),(0,G.Cg)([(0,j.MnK)(Lr.l),(0,G.Sn)("design:type",Lr.l)],Ur.prototype,"_prefabModal",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Ur.prototype,"openStoreButton",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ur.prototype,"onLoadingFinished",void 0),(0,G.Cg)([(0,Gi.b)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],Ur.prototype,"_segment",void 0),Ur=(0,G.Cg)([(0,j.EVk)("DynamicStoreModal",W.Y.store)],Ur);U(282),U(37816),U(50379),U(24595);var Fr,Gr,jr=U(69811);!function(k){k[k.Brown=0]="Brown",k[k.Grey=1]="Grey",k[k.Lavender=2]="Lavender",k[k.Blue=3]="Blue"}(Fr||(Fr={})),function(k){k[k.SpecialOffers=0]="SpecialOffers",k[k.PetStore=1]="PetStore",k[k.WizardCenter=2]="WizardCenter",k[k.TitanShop=3]="TitanShop",k[k.AcademyShop=4]="AcademyShop",k[k.RegionShop=5]="RegionShop",k[k.FestivalShop=6]="FestivalShop",k[k.LopsRiftShop=7]="LopsRiftShop",k[k.StarlightFestStore=8]="StarlightFestStore"}(Gr||(Gr={}));let $r=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.onShopButtonClicked=this.createTidySignal(),this._selectedCover=Fr.Brown,this._selectedBake=Gr.SpecialOffers}firstUpdate(){var k,B;null===(k=this.coverSwapper)||void 0===k||k.selectGraphicAtIndex(this.selectedCover),"string"!=typeof this._selectedBake&&(null===(B=this.itemBakeSwapper)||void 0===B||B.selectGraphicAtIndex(this._selectedBake))}set selectedCover(k){var B;this._selectedCover=k,null===(B=this.coverSwapper)||void 0===B||B.selectGraphicAtIndex(this._selectedCover)}get selectedCover(){return this._selectedCover}set selectedBake(k){var B;this._selectedBake=k,"string"!=typeof k&&(null===(B=this.itemBakeSwapper)||void 0===B||B.selectGraphicAtIndex(k))}get selectedBake(){return this._selectedBake}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$r.prototype,"onShopButtonClicked",void 0),(0,G.Cg)([(0,j.MnK)(jr.y),(0,G.Sn)("design:type",jr.y)],$r.prototype,"coverSwapper",void 0),(0,G.Cg)([(0,j.MnK)(jr.y),(0,G.Sn)("design:type",jr.y)],$r.prototype,"itemBakeSwapper",void 0),(0,G.Cg)([(0,j.gfw)(Fr),(0,G.Sn)("design:type",Number),(0,G.Sn)("design:paramtypes",[Number])],$r.prototype,"selectedCover",null),(0,G.Cg)([(0,j.gfw)(Gr),(0,G.Sn)("design:type",Object),(0,G.Sn)("design:paramtypes",[Object])],$r.prototype,"selectedBake",null),$r=(0,G.Cg)([(0,j.EVk)("ShopButtonController")],$r);let Hr=class extends j.uAl{constructor(){super(...arguments),this._parseOnCreate=!1,this.onEncounterAssetParsed=new j.HN0,this.onEncounterParsed=new j.HN0}create(){super.create(),this._parseOnCreate&&this.getEncounter().catch(j.RQr.createHandler("EncounterAssetParser: encounterAsset not set"))}parseEncounterAsset(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.encounterAsset?(yield this.assetLoader.loadAssets([this.encounterAsset]),this._spawnData=tt.q.instance.game.cache.getJSON(this.encounterAsset),this._spawnData):Promise.reject(new Error("EncounterAssetParser: encounterAsset not set"))}))}getEncounter(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.getEncounterById(this.encounterId)}))}getEncounterById(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._spawnData||(yield this.parseEncounterAsset()),this._spawnData[k])return this.onEncounterParsed.dispatch(this._spawnData[k]),this._spawnData[k];j.RQr.createHandler(`EncounterAssetParser: No encounter data found for ${k}`)}))}destroy(){this.onEncounterAssetParsed.dispose(),this.onEncounterParsed.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)(j.t5G.AssetLoader),(0,G.Sn)("design:type",Object)],Hr.prototype,"assetLoader",void 0),(0,G.Cg)([(0,j.tW2)("encounter"),(0,G.Sn)("design:type",String)],Hr.prototype,"encounterAsset",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Hr.prototype,"encounterId",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Hr.prototype,"_parseOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hr.prototype,"onEncounterAssetParsed",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hr.prototype,"onEncounterParsed",void 0),Hr=(0,G.Cg)([(0,j.EVk)("EncounterAssetParser",W.Y.mapSpawning)],Hr);var Vr=U(35488),Wr=U(62886),qr=U(87820),Kr=U(3001),zr=U(7170),Yr=U(78889),Qr=U(60157);let Xr=class extends j.uAl{getEncounterData(k){return(0,G.sH)(this,void 0,void 0,(function*(){}))}};(0,G.Cg)([(0,j.Cdj)("EncounterMapSpawnConstants"),(0,G.Sn)("design:type",Object)],Xr.prototype,"spawnConstants",void 0),Xr=(0,G.Cg)([(0,j.EVk)("BaseEncounterDataProvider")],Xr);var Zr=U(10727);const Jr=[{isEnabled:()=>(0,Bt.G)(Zr.d3).enabled,overrideMap:Zr.tZ}];var to,eo=U(22023),io=U(17446);class so{static rollMainEncounter(k,B=fe.i.Regular){return k.length<1?(j.VyI.log("Attempted to roll main encounter from an empty list of possible encounters",j.$bb.Error),{}):1===k.length?k[0]:k.every((k=>j.Aq$.isDefined(k.R)))?Ze.selectByWeight(k,(k=>1/k.R)):Ze.selectByWeight(k,(k=>so.getEncounterWeightByRarityAndEvolution(k,B)))}static getEncounterWeightByRarityAndEvolution(k,B){var U,F,G,$,H;if(!j.Aq$.isDefined(k.ID))return j.VyI.log("Encounter does not have an ID",j.$bb.Warning),0;const V=Yt.t.getItem("pet",k.ID);if(!V)return j.VyI.log(`Could not find pet data for encounter with ID ${k.ID}`,j.$bb.Warning),0;const W=tt.q.instance.prodigy.gameContainer.get("d1f-4da3");return W.encounterRatesPerDifficultyModeAndRarity[B][null!==(F=null===(U=V.data)||void 0===U?void 0:U.rarity)&&void 0!==F?F:io.E.Common]*W.encounterRatesPerDifficultyModeAndEvolutionTier[B][null!==(H=null===($=null===(G=V.data)||void 0===G?void 0:G.evolution)||void 0===$?void 0:$.tier)&&void 0!==H?H:1]}}let no=to=class extends Xr{constructor(){super(...arguments),this._repeatable=!0,this.useMapSpawnConstants=!1,this._encounterOverrides={}}getEncounterData(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G,$;if(!k.isOnCooldown){if(j.Aq$.isDefined(this._encountersDataSource)&&j.Aq$.isDefined(this._encounterId)){const k=this.getUniqueEncounterId();if(!this._repeatable&&j.Aq$.isDefined(this._player.state.get(k)))return;if(to.encounterDataCache[k])return to.encounterDataCache[k];let H=null;for(const B of Jr){if(!B.isEnabled())continue;const k=B.overrideMap[this._encountersDataSource];j.Aq$.isDefined(k)&&(yield tt.q.instance.prodigy.load.assetsAsPromise([k]),H=tt.q.instance.game.cache.getJSON(k))}const V=tt.q.instance.game.cache.getJSON(this._encountersDataSource),W=null!==(B=null==H?void 0:H[this._encounterId])&&void 0!==B?B:V[this._encounterId];if(!W)return void j.VyI.log(`No encounter found with ID ${this._encounterId}`,j.$bb.Warning);if(j.Aq$.isDefined(W.encounter)){const k=tt.q.instance.prodigy.world.getZone(this._zoneId);W.encounter=[so.rollMainEncounter(W.encounter,k.difficultyMode)],!j.Aq$.isDefined(W.pets)&&j.Aq$.isDefined(W.encounter[0].ID)&&(this.useMapSpawnConstants&&this.spawnConstants?(W.bench=null===(U=this.spawnConstants.benchRandoms)||void 0===U?void 0:U.map((k=>({petID:k,weight:1}))),W.minTeamSize=this.spawnConstants.minOptional,W.maxTeamSize=null!==(F=this.spawnConstants.maxOptional)&&void 0!==F?F:Math.min((null!==($=null===(G=W.bench)||void 0===G?void 0:G.length)&&void 0!==$?$:0)+1,3)):W.bench=eo.P8.getPetBench(W.encounter[0].ID))}return to.encounterDataCache[k]=Object.assign(Object.assign(Object.assign({},W),this._encounterOverrides),{unique:!this._repeatable,uniqueId:k}),to.encounterDataCache[k]}return Object.keys(this._encounterOverrides).length>0?this._encounterOverrides:void 0}}))}resetCachedEncounter(){delete to.encounterDataCache[this.getUniqueEncounterId()]}getUniqueEncounterId(){return`zone-${this._zoneId}-uniqueEncounters-${this._mapName}-${this.sanitizeEncounterId(this._encounterId)}`}sanitizeEncounterId(k){return k.replace(/-/g,"_")}};var ao,ro;no.encounterDataCache={},(0,G.Cg)([(0,j.Cdj)("ZoneId"),(0,G.Sn)("design:type",String)],no.prototype,"_zoneId",void 0),(0,G.Cg)([(0,j.Cdj)("MapTag"),(0,G.Sn)("design:type",String)],no.prototype,"_mapName",void 0),(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],no.prototype,"_player",void 0),(0,G.Cg)([(0,j.Bak)(),(0,j.tW2)("encounter"),(0,G.Sn)("design:type",String)],no.prototype,"_encountersDataSource",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],no.prototype,"_encounterId",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],no.prototype,"_repeatable",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],no.prototype,"_encounterOverrides",void 0),no=to=(0,G.Cg)([(0,j.EVk)("BasicEncounterDataProvider",W.Y.mapSpawning)],no),function(k){k.Optional="optional",k.Mandatory="mandatory",k.Special="special",k.FeaturedSpawn="featured-spawn"}(ro||(ro={}));let oo=ao=class extends Fi.z{constructor(){super(...arguments),this.spawnType=ro.Optional,this.spawnCooldownCategory=aa.u.Main,this._runOnCreate=!1,this.encounterDataProviders=[],this.isRespawnAllowed=!0,this._encounterValidators=[k=>j.Aq$.isDefined(k),k=>!Yr.Ue(k)||!(Yr.LT(k)&&66===k.boss.ID),k=>Yr.W0(k)]}get encounterData(){return this._encounterData}get isOnCooldown(){return this._cooldowns.isCooldownActive(this.spawnId)}get cooldownTimeRemaining(){return this._cooldowns.getCooldownRemainingTime(this.spawnId)}get hasExpiredCooldown(){return this._cooldowns.isCooldownExpired(this.spawnId)}create(){super.create(),this._runOnCreate&&this.run().catch(j.RQr.createHandler("Error running SpawnPoint"))}run(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this._encounterData){const k=new vr.f,B=yield Promise.all(this.encounterDataProviders.map((B=>(0,G.sH)(this,void 0,void 0,(function*(){return B.getEncounterData({isOnCooldown:yield this.isOnCooldown,spawnId:this.spawnId,preconditionChecker:k})})))));this._encounterData=B.find((k=>this._encounterValidators.every((B=>B(k)))))}yield this.bindContext()}))}bindContext(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,$,H,V,W,q,K,z,Y,Q,X,Z,J,tt,et,it;if(!this.IsActiveInHierarchy)return;if(!j.Aq$.isDefined(this._encounterData)||this._encounterData===zr.E.Disabled||!ao.SPAWNED_SINCE_COOLDOWN[this.spawnId]&&!1===this.isRespawnAllowed)return void this.gameObject.destroy();const st=Yr.cB(this._encounterData),nt=null===(k=null==st?void 0:st.data)||void 0===k?void 0:k.name,at=null==st?void 0:st.type;let rt,ot;if(Yr.$Q(this._encounterData))rt=this._encounterData.encounter[0].ID,ot=null!==(U=null===(B=null==st?void 0:st.data)||void 0===B?void 0:B.affinity)&&void 0!==U?U:null===(F=null==st?void 0:st.data)||void 0===F?void 0:F.element,j.Aq$.isDefined(this._encounterData.encounter[0].ID)&&(Yr.OI(this._encounterData.encounter[0].ID),this.updateValue("EncounterPetId",this._encounterData.encounter[0].ID));else if(rt=null!==(W=null!==($=null===(G=this._encounterData.boss)||void 0===G?void 0:G.ID)&&void 0!==$?$:null===(V=null===(H=this._encounterData.opponent)||void 0===H?void 0:H[0])||void 0===V?void 0:V.id)&&void 0!==W?W:null===(K=null===(q=this._encounterData.pets)||void 0===q?void 0:q[0])||void 0===K?void 0:K.ID,ot=null!==(Y=null===(z=null==st?void 0:st.data)||void 0===z?void 0:z.element)&&void 0!==Y?Y:null===(Q=null==st?void 0:st.data)||void 0===Q?void 0:Q.affinity,Yr.LT(this._encounterData)&&(null===(X=null==st?void 0:st.data)||void 0===X?void 0:X.category)===Ci.GJ.Wizard){const k=null!==(Z=st.metadata)&&void 0!==Z?Z:{};this.updateValue("EnemyWizardPlayerData",Yr.BQ(k))}else if(Yr.h9(this._encounterData)){const k=this._encounterData.opponent[0];this.updateValue("EnemyWizardPlayerData",Yr.BQ(k))}else Yr.sK(this._encounterData)&&(Yr.OI(this._encounterData.pets[0].ID),this.updateValue("EncounterPetId",this._encounterData.pets[0].ID));ao.SPAWNED_SINCE_COOLDOWN[this.spawnId]=!0,yield this.sendDiscoveryEvent(rt,nt,at,ot);const ht=this.createBattleConfig(),ct=Yr.Yu(this._encounterData),dt=Yr.wd(this._encounterData),lt=Yr.o_(this._encounterData);this.updateValue("EncounterSpawnId",this.spawnId),this.updateValue("CooldownCategory",this.spawnCooldownCategory),this.updateValue("EncounterShouldShowGuideHand",this._encounterData.showGuideHand),this.updateValue("EncounterShouldShowBossIndicator",dt),this.updateValue("EncounterShouldShowNewIndicator",lt),this.updateValue("EncounterShouldShowDifficultyIndicator",ct),this.updateValue("EncounterDifficultyIndicatorLevel",null!==(it=null!==(et=null===(tt=null===(J=this._encounterData.encounter)||void 0===J?void 0:J[0])||void 0===tt?void 0:tt.level)&&void 0!==et?et:this._encounterData.minLevel)&&void 0!==it?it:this._playerDataProvider.player.getLevel()),this.updateValue("EncounterDifficultyIndicatorTier",this._encounterData.minibossDifficulty),this.updateValue("EncounterBattleMods",ht)}))}createBattleConfig(){var k,B;const U={screen:null!==(k=tt.q.instance.prodigy.skin.getSkinOverrideBattleBg(this._mapTag))&&void 0!==k?k:this._battleBg,onFaint:null===(B=this._zone)||void 0===B?void 0:B.defaultOnFaint,addZoneCurrency:!0,cooldown:{id:this.spawnId,duration:this.spawnCooldownCategory,onResult:[Ci.XK.Victory],onAction:[],actionRestrictions:{}}};return j.Aq$.isDefined(this._encounterData)&&!Yr.bU(this._encounterData)?Object.assign(Object.assign({},U),dt().cloneDeep(this._encounterData)):U}sendDiscoveryEvent(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){const G={discovery_type:(yield this.hasExpiredCooldown)?"Spawned":"Existing",enemy_name:this._localization.getText(null!=B?B:"Unknown Enemy"),enemy_id:null!=k?k:0,enemy_type:null!=U?U:"Unknown Type",enemy_element:null!=F?F:"Unknown Element",spawn_type:this.spawnType,cooldown_type:this.spawnCooldownCategory,x_coord:this.gameObject.transform.worldPosition.x,y_coord:this.gameObject.transform.worldPosition.y};this._segment.gameWorld.sendEnemyDiscoveredEvent(G)}))}sendCooldownStartEvent(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=yield this._cooldowns.getCooldownRemainingTime(this.spawnId);if(B<=0)return;const U={cooldown_type:Ia.NM.SpawnPoint,cooldown_subtype:this.spawnCooldownCategory,cooldown_target_type:this.spawnType,cooldown_target_id:this.spawnId,cooldown_length:B,cooldown_trigger_type:Ia.J$.Battle,cooldown_trigger_id:null!==(k=this._segment.battleRevamp.battleId)&&void 0!==k?k:"unknown"};this._segment.gameWorld.sendCooldownTimerStartedEvent(U)}))}setEncounterDefeated(){var k,B;if(!this._encounterData||Yr.bU(this._encounterData))return;const U=null!==(k=Yr.Lj(this._encounterData))&&void 0!==k?k:0,F=this.getEncounterType(this._encounterData),G=this._encounterData.uniqueId,$=null!==(B=this._encounterData.isQuestEncounter)&&void 0!==B&&B;j.Aq$.isDefined(G)&&j.Aq$.isDefined(no.encounterDataCache[G])&&delete no.encounterDataCache[G],this._encounterData.unique&&j.Aq$.isDefined(G)&&this._playerDataProvider.player.state.set(G,!0);let H=Wr.T.DEFEAT_ENCOUNTER;$&&(H=Wr.T.DEFEAT_QUEST_ENCOUNTER),this.sendCooldownStartEvent().catch(j.RQr.createHandler(`Could not send cooldown start event for spawn point: ${this.spawnId}`)),this._questManager.sendQuestEventViaHub(H,{type:F,id:U,params:{taskEventType:Qr.Z7.Encounter,isQuestEncounter:$,uniqueId:G}}).catch(j.RQr.createHandler(`Could not send DEFEAT_ENCOUNTER quest event for encounter: ${F} ${U}`))}delayRespawn(){ao.SPAWNED_SINCE_COOLDOWN[this.spawnId]=!1}getEncounterType(k){return Yr.LT(k)?Ci.uj.Boss:Yr.wd(k)?Ci.uj.Miniboss:Yr.h9(k)?Ci.uj.Wizard:Ci.uj.Pet}destroy(){super.destroy()}};oo.SPAWNED_SINCE_COOLDOWN={},(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],oo.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("098-b402"),(0,G.Sn)("design:type",sa.m)],oo.prototype,"_cooldowns",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],oo.prototype,"_segment",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],oo.prototype,"_localization",void 0),(0,G.Cg)([(0,j.Cdj)("a25-68f4"),(0,G.Sn)("design:type",Kr.n)],oo.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.Cdj)("Zone"),(0,G.Sn)("design:type",qr.b)],oo.prototype,"_zone",void 0),(0,G.Cg)([(0,j.Cdj)("BattleBg"),(0,G.Sn)("design:type",String)],oo.prototype,"_battleBg",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_MAP_TAG"),(0,G.Sn)("design:type",String)],oo.prototype,"_mapTag",void 0),(0,G.Cg)([(0,j.gfw)(ro),(0,G.Sn)("design:type",String)],oo.prototype,"spawnType",void 0),(0,G.Cg)([(0,j.gfw)(aa.u),(0,G.Sn)("design:type",String)],oo.prototype,"spawnCooldownCategory",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],oo.prototype,"spawnId",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],oo.prototype,"_runOnCreate",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Xr),(0,G.Sn)("design:type",Array)],oo.prototype,"encounterDataProviders",void 0),oo=ao=(0,G.Cg)([(0,j.EVk)("SpawnPoint",W.Y.mapSpawning)],oo);let ho=class extends oo{bindContext(){const k=Object.create(null,{bindContext:{get:()=>super.bindContext}});return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F;if(yield k.bindContext.call(this),this.IsActiveInHierarchy&&(this.updateValue("ShouldShowFeaturedSpawnTimer",j.Aq$.isDefined(this._encounterData)),this.updateValue("FeaturedSpawnTimer",this._featuredSpawnService.getTimeUntilExpiry()),j.Aq$.isDefined(this.featureRequirement))){const k=tt.q.instance.prodigy.gameContainer.get("db5-fb6e");if(!(yield k.meetsRequirements(this.featureRequirement))){const G=k.getFeatureRequirementAsset(this.featureRequirement),j=null===(U=null===(B=null==G?void 0:G.data)||void 0===B?void 0:B.requirements)||void 0===U?void 0:U.find((k=>"level"in k)),$=null!==(F=null==j?void 0:j.level)&&void 0!==F?F:0,H=this._localization.getText("UNLOCKS_AT_LEVEL",$.toString());this.updateValue("ShouldShowFeaturedSpawnLockMessage",!0),this.updateValue("FeaturedSpawnLockMessage",H),this.updateValue("DisableTrigger",!0)}}}))}};(0,G.Cg)([(0,j.Cdj)("a2e-a635"),(0,G.Sn)("design:type",Vr.J)],ho.prototype,"_featuredSpawnService",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],ho.prototype,"featureRequirement",void 0),ho=(0,G.Cg)([(0,j.EVk)("FeaturedSpawnPoint",W.Y.mapSpawning)],ho);var co=U(87761);let lo=class extends Xr{constructor(){super(...arguments),this._taskIds=["0-0"]}getEncounterData(k){return(0,G.sH)(this,void 0,void 0,(function*(){return(yield this._localZoneQuestManager.getTasksInProgress()).some((k=>this._taskIds.some((B=>k.taskID===B))))?zr.E.Disabled:void 0}))}};(0,G.Cg)([(0,j.Cdj)("a78-11c7"),(0,G.Sn)("design:type",co.B)],lo.prototype,"_localZoneQuestManager",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],lo.prototype,"_taskIds",void 0),lo=(0,G.Cg)([(0,j.EVk)("QuestDisabledDataProvider",W.Y.mapSpawning)],lo);let uo=class extends no{constructor(){super(...arguments),this._taskIds=["0-0"]}getEncounterData(k){const B=Object.create(null,{getEncounterData:{get:()=>super.getEncounterData}});return(0,G.sH)(this,void 0,void 0,(function*(){const U=(yield this._localZoneQuestManager.getTasksInProgress()).some((k=>this._taskIds.some((B=>k.taskID===B)))),F=yield B.getEncounterData.call(this,Object.assign(Object.assign({},k),{isOnCooldown:!1}));return U&&j.Aq$.isDefined(F)?Object.assign(Object.assign({},F),{showGuideHand:!0,isQuestEncounter:!0}):void 0}))}};(0,G.Cg)([(0,j.Cdj)("a78-11c7"),(0,G.Sn)("design:type",co.B)],uo.prototype,"_localZoneQuestManager",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],uo.prototype,"_taskIds",void 0),uo=(0,G.Cg)([(0,j.EVk)("QuestEncounterDataProvider",W.Y.mapSpawning)],uo);let fo=class extends Xr{getEncounterData(k){return(0,G.sH)(this,void 0,void 0,(function*(){return{minLevel:20,maxLevel:30,encounter:[{ID:87}]}}))}};fo=(0,G.Cg)([(0,j.EVk)("TestEncounterDataProvider",W.Y.mapSpawning)],fo);var bo=U(24800),po=U(50996),vo=U(46571);let go=class extends Xr{constructor(){super(...arguments),this._areProvidersEnabledByDefault=!0,this._encounterProviderWhitelist=[],this._encounterProviderBlacklist=[],this._eventEncounterDataProviders=[],this._setupPromise=null}setupProviders(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this._setupPromise||(this._setupPromise=(()=>(0,G.sH)(this,void 0,void 0,(function*(){this._eventEncounterDataProviders=yield this._providerManager.getProviders(k,this._areProvidersEnabledByDefault,this._encounterProviderBlacklist,this._encounterProviderWhitelist)})))()),this._setupPromise}))}getEncounterData(k){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.setupProviders(k);for(const B of this._eventEncounterDataProviders){if(!(yield B[1].isActive(k)))continue;const U=yield B[1].getEncounterData(k);if(null!=U)return U}}))}static clearCachedEncounters(){bo.p.clearCachedEncounters()}};(0,G.Cg)([(0,j.Cdj)("df9-0276"),(0,G.Sn)("design:type",vo.p)],go.prototype,"_providerManager",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],go.prototype,"_areProvidersEnabledByDefault",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.gfw)(po.I),(0,G.Sn)("design:type",Array)],go.prototype,"_encounterProviderWhitelist",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.gfw)(po.I),(0,G.Sn)("design:type",Array)],go.prototype,"_encounterProviderBlacklist",void 0),go=(0,G.Cg)([(0,j.EVk)("EventsEncounterDataProvider")],go);const mo=(0,be.gb)({key:"white-glove-restrictions",activateAssociatedExperiments:1,default:{enabled:!0,disabledRestrictionTypes:[]}}),yo=(k,B)=>!!B.enabled&&(!B.disabledRestrictionTypes||!0===B.disabledRestrictionTypes.every((B=>B!==k)));var _o,Eo=U(9579),wo=U(56735),To=U(1312);!function(k){k.SelectedMode="SELECTED_MODE",k.NumRulesToDisplay="NUM_RULES_TO_DISPLAY",k.SelectedBossID="SELECTED_BOSS_ID",k.ShowNewRestrictionsMenu="SHOW_NEW_RESTRICTIONS_MENU",k.InterfaceOpenedSegmentCallback="INTERFACE_OPENED_SEGMENT_CALLBACK"}(_o||(_o={}));const So={plant:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-large-earth"},ice:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-large-ice"},fire:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-large-fire"},water:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-large-water"},storm:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-large-storm"},neutral:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-large-neutral"},physical:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-large-physical"},astral:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-large-astral"},shadow:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-large-shadow"},evolution:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-petevolution-indicator-arrows"},rescue:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-pet-collected"},level:{atlas:Ve._.Ui_postbattle_json,frame:"star-level"},mergeRank:{atlas:Ve._.Ui_raster_icons_json,frame:"pet-info-merge-badge"},common:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-pet-rarity-common"},uncommon:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-pet-rarity-uncommon"},rare:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-pet-rarity-rare"},heroic:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-pet-rarity-heroic"},legendary:{atlas:Ve._.Ui_raster_icons_json,frame:"icon-pet-rarity-legendary"}};var Ao=U(5708),Co=U(15571);let Oo=class extends oo{constructor(){super(...arguments),this.overrideQuestIds=[],this._onConfirmBattle=new j.HN0,this._onClose=new j.HN0,this._onExit=new j.HN0,this.hasMetRequirements=!1,this.isInTrigger=!1,this._encounterValidators=[k=>j.Aq$.isDefined(k)]}destroy(){this._onConfirmBattle.dispose(),this._onClose.dispose(),this._onExit.dispose(),super.destroy()}create(){super.create(),this.editorSpawnRenderOnly&&(this.editorSpawnRenderOnly.Active=!1)}createBattleConfig(){var k;const B=super.createBattleConfig();return B.requirements=null===(k=this.getBattleRequirements())||void 0===k?void 0:k.requirements,B}openBattleRestrictionsPopup(){var k;const B=this.getBattleRequirements();if(!B)return void j.VyI.log("[RestrictedSpawnPointComponent]: No battle requirements found",j.$bb.Error);(0,ut.v)(this._encounterData&&!Yr.bU(this._encounterData),"Cannot apply restrictions to disabled encounters");const U=null!==(k=Yr.Lj(this._encounterData))&&void 0!==k?k:0;Eo.a.getRequirementsResult(B).then((k=>{var F,G,$;k?(this.clearUnmetBattleRequirementsIfMatch(U),Promise.all([Eo.a.isEligibleForFreePetPack(),Eo.a.hasReceivedFreePetPack()]).then((([k,B])=>{k||B||Eo.a.markFreePetPackAsClaimed()})).catch(j.RQr.createHandler("[RestrictedSpawnPointComponent]: Error checking if free pet pack has been received"))):this.saveLastUnmetBattleRequirements(U,B);const H=(0,Bt.G)(mo).enabled,V=null!==(G=null===(F=null==B?void 0:B.requirements)||void 0===F?void 0:F.length)&&void 0!==G?G:0;k||To.s.startRecording("RestrictedSpawnPointComponent","battle_restrictions_popup"),tt.q.instance.prodigy.open.prefabMenu(Rt.l.BattleRestrictionsPopup,(()=>{tt.q.instance.prodigy.audio.resumeBGM(),tt.q.instance.game.broadcaster.broadcast(jn.n8.RestrictionsClosed),To.s.stopRecording(),this._onClose.dispatch(),Eo.a.getRequirementsResult(B).then((k=>{k&&this.clearUnmetBattleRequirementsIfMatch(U)})).catch(j.RQr.createHandler("[RestrictedSpawnPointComponent]: Error opening battle restrictions popup with provided requirements"))}),!0,!1,!1,{EncounterConfirmRestrictedBattle:this.confirmBattle.bind(this),EncounterExitRestrictedBattle:this.exitBattleRestrictionsPopup.bind(this),EncounterBattleRequirements:B,EncounterBattleRequirementsMet:k,[_o.SelectedBossID]:U,[_o.ShowNewRestrictionsMenu]:H,[_o.NumRulesToDisplay]:V,[_o.InterfaceOpenedSegmentCallback]:this.sendEncounterDataAnalytics.bind(this)}),null===($=this._restrictedEncountersManager)||void 0===$||$.startEncounter(B.name,this._encounterData,this.overrideQuestIds)})).catch(j.RQr.createHandler("[RestrictedSpawnPointComponent]: Error opening battle restrictions popup with provided requirements"))}saveLastUnmetBattleRequirements(k,B){const U=tt.q.instance.prodigy.gameContainer.get("306-5359");U.data.lastUnmetBattleRequirements={bossID:k,featureRequirements:B,mapID:tt.q.instance.prodigy.world.getCurrentMap(),zoneID:tt.q.instance.prodigy.world.getCurrentZone(),isDoorBlocking:j.Aq$.isDefined(this.triggerToBlock)},U.updated=!0}clearUnmetBattleRequirementsIfMatch(k){var B,U;const F=tt.q.instance.prodigy.gameContainer.get("306-5359");(null===(U=null===(B=null==F?void 0:F.data)||void 0===B?void 0:B.lastUnmetBattleRequirements)||void 0===U?void 0:U.bossID)===k&&Eo.a.resetPlayerLastUnmetBattleRequirements()}getBattleRequirements(){var k;return null===(k=this._restrictionsProvider.getRestrictionById(this.requirementsKey))||void 0===k?void 0:k.data}instantOpenBattleRestrictionsPopupIfInRange(){this.isInTrigger&&this.openBattleRestrictionsPopup()}run(){const k=Object.create(null,{run:{get:()=>super.run}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.run.call(this),this._encounterData&&this.gameObject.active&&this.blockTrigger(!0)}))}blockTrigger(k){this.triggerToBlock&&!Kt.A.get("GameConstants.Debug.DISABLE_BLOCKING_ENCOUNTERS")&&(this.triggerToBlock.Active=!k)}confirmBattle(){tt.q.instance.prodigy.gameContainer.get("c47-20b6").whiteGlove.sendRestrictionFTUEEvent("Restricted battle started"),this._onClose.dispose(),this._onConfirmBattle.dispatch()}exitBattleRestrictionsPopup(){this._onExit.dispatch()}sendEncounterDataAnalytics(){var k,B,U,F,G,$,H,V,W;const q=this._encounterData,K=this.getBattleRequirements(),z=tt.q.instance.prodigy.gameContainer.get("306-5359"),Y=Object.assign(Object.assign({},K),{requirements:null==K?void 0:K.requirements.map((k=>{var B;return Object.assign(Object.assign({},k),{meetsRequirements:wo.p.checkIfMeetsRequirement(null==k?void 0:k.kennel,z),currentProgress:wo.p.getPetsSchema(null==k?void 0:k.kennel,z).length,targetProgress:null===(B=null==k?void 0:k.kennel)||void 0===B?void 0:B.petCount})}))}),Q=null===(k=q.pets)||void 0===k?void 0:k.map((k=>{var B;if(!j.Aq$.isDefined(k)||!j.Aq$.isDefined(k.ID))return;const U=Yt.t.getItem("pet",k.ID);return{id:k.ID,name:null===(B=null==U?void 0:U.data)||void 0===B?void 0:B.name,level:k.level}})),X=Yt.t.getItem("boss",q.boss.ID),Z={id:null!==(U=null===(B=q.boss)||void 0===B?void 0:B.ID)&&void 0!==U?U:null===(G=null===(F=q.opponent)||void 0===F?void 0:F[0])||void 0===G?void 0:G.id,name:null===($=null==X?void 0:X.data)||void 0===$?void 0:$.name,level:null===(H=q.boss)||void 0===H?void 0:H.level,minLevel:q.minLevel,maxLevel:q.maxLevel,type:null===(V=null==X?void 0:X.data)||void 0===V?void 0:V.type,element:null===(W=null==X?void 0:X.data)||void 0===W?void 0:W.affinity,restrictions:Y,pets:Q},J=tt.q.instance.prodigy.gameContainer.get("c47-20b6");J.whiteGlove.setCurrentRestrictionData(Y);const et={interfaceName:us.B.PreBattleScreen,interfaceType:ui.Wm.Modal,originType:ui.$N.RestrictedBattle,instanceType:fi.N.BattleRestriction},it=J.gameWorld.getCurrentInstanceTypeAndID(fi.N.OpenWorld),st={item_list:Z,map_entered_instance_type:it.instance_type,map_entered_instance_id:it.instance_id};J.featureCommon.sendInterfaceEvent(et,st)}get isOnCooldown(){return Promise.resolve(!1)}};(0,G.Cg)([(0,j.Cdj)("b73-c131"),(0,G.Sn)("design:type",Ao.X)],Oo.prototype,"_restrictionsProvider",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Oo.prototype,"requirementsKey",void 0),(0,G.Cg)([(0,j.W_S)(),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],Oo.prototype,"overrideQuestIds",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Oo.prototype,"_onConfirmBattle",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Oo.prototype,"_onClose",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Oo.prototype,"_onExit",void 0),(0,G.Cg)([(0,j.MnK)(Ga.E),(0,G.Sn)("design:type",Ga.E)],Oo.prototype,"triggerToBlock",void 0),(0,G.Cg)([(0,j.MnK)(j.ESH),(0,G.Sn)("design:type",j.ESH)],Oo.prototype,"editorSpawnRenderOnly",void 0),(0,G.Cg)([(0,j.Cdj)("615-fbad"),(0,G.Sn)("design:type",Co.p)],Oo.prototype,"_restrictedEncountersManager",void 0),Oo=(0,G.Cg)([(0,j.EVk)("RestrictedSpawnPoint",W.Y.mapSpawning)],Oo);var Io=U(84643);const Do=()=>(k,B)=>{const U=k.create;k.create=function(){this[B],U.call(this)}};var Ro=U(83726);let Po=class extends j.uAl{setComplete(){var k;if(!this._isPrefabMap)if("number"==typeof this._spawnId){const B=this._spawnId+1;if(this._map.zone.defeatMonster(this._petId,B,null!==(k=this._mods.unique)&&void 0!==k&&k,void 0,this._mods.isQuestEncounter),this._mods.unique)return;Ro.T.resetMonsterRespawn(this._map.mapMonsters[B],this._mods,this._encounterConstants.spawnCooldownDurationSeconds)}else this._map.zone.setState(this._spawnId,1)}};var Mo;(0,G.Cg)([(0,j.Cdj)("d1f-4da3"),(0,G.Sn)("design:type",Io.h)],Po.prototype,"_encounterConstants",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterSpawnId"),(0,G.Sn)("design:type",Object)],Po.prototype,"_spawnId",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterPetId"),(0,G.Sn)("design:type",Number)],Po.prototype,"_petId",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterBattleMods"),(0,G.Sn)("design:type",Object)],Po.prototype,"_mods",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterMap"),(0,G.Sn)("design:type",Ro.T)],Po.prototype,"_map",void 0),(0,G.Cg)([(0,j.Cdj)("IS_PREFAB_MAP"),Do(),(0,G.Sn)("design:type",Boolean)],Po.prototype,"_isPrefabMap",void 0),Po=(0,G.Cg)([(0,j.EVk)("SetZoneEncounterComplete",W.Y.mapSpawning)],Po);let No=Mo=class extends j.uAl{constructor(){super(...arguments),this.battleBackground="",this._spawnPoints=[]}create(){var k;super.create();const B=this.getInjectedValue("Zone"),U=j.Aq$.isDefined(this.battleBackground)&&this.battleBackground.length>0?this.battleBackground:B.battleBG;if(this._context.Container.bind("BattleBg").toConstantValue(U),this._context.Container.bind("EncounterZoneTag").toConstantValue(this._mapName),this._spawnPoints=this.gameObject.findComponentsInChildren(oo),j.Aq$.isDefined(Mo._disabledSpawnCache[this._mapName])){const k=Mo._disabledSpawnCache[this._mapName];this._spawnPoints.forEach((B=>{k.includes(B.spawnId)&&B.GameObject.destroy()}))}else if(j.Aq$.isDefined(this._constantsDataSource)){const B=tt.q.instance.game.cache.getJSON(this._constantsDataSource),U=B[this._mapName.replace("_hard","")];this._minimumOptionalSpawns=null===(k=B[this._mapName])||void 0===k?void 0:k.minOptional,this.determineDisabledSpawns(),this._context.Container.bind("EncounterMapSpawnConstants").toConstantValue(U)}this._spawnPoints.filter((k=>k.spawnType===ro.Optional)).filter((k=>k.IsActiveInHierarchy)).forEach((k=>{var B;null===(B=k.GameObject.findComponentInChildren(Zi.k))||void 0===B||B.onVictory.addOnce((()=>this.cycleDisabledSpawns(k.spawnId)))}))}determineDisabledSpawns(){if(!j.Aq$.isDefined(this._minimumOptionalSpawns))return void j.VyI.log("SpawnManagerComponent, no minimum number of optional spawns provided",j.$bb.Warning);const k=this._spawnPoints.filter((k=>k.spawnType===ro.Optional));if(k.length<=this._minimumOptionalSpawns)return void(Mo._disabledSpawnCache[this._mapName]=[]);const B=Xe.fromRange(this._minimumOptionalSpawns,k.length+1),U=k.length-B;if(U<=0)return void(Mo._disabledSpawnCache[this._mapName]=[]);const F=Ze.selectElements(U,k);Mo._disabledSpawnCache[this._mapName]=F.map((k=>k.spawnId)),F.forEach((k=>k.GameObject.destroy()))}cycleDisabledSpawns(k){var B;if(!j.Aq$.isDefined(Mo._disabledSpawnCache[this._mapName])||0===Mo._disabledSpawnCache[this._mapName].length)return;const U=Ze.selectElement(Mo._disabledSpawnCache[this._mapName]),F=Mo._disabledSpawnCache[this._mapName].indexOf(U);Mo._disabledSpawnCache[this._mapName][F]=k,null===(B=this._spawnPoints.find((k=>k.spawnId===U)))||void 0===B||B.delayRespawn()}};No._disabledSpawnCache={},(0,G.Cg)([(0,j.Bak)(),(0,j.tW2)("constants"),(0,G.Sn)("design:type",String)],No.prototype,"_constantsDataSource",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_MAP_TAG"),(0,G.Sn)("design:type",String)],No.prototype,"_mapName",void 0),(0,G.Cg)([(0,j.Pqz)(j.bE_),(0,G.Sn)("design:type",j.bE_)],No.prototype,"_context",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],No.prototype,"battleBackground",void 0),No=Mo=(0,G.Cg)([(0,j.EVk)("SpawnManager",W.Y.mapSpawning)],No);var xo,Lo=U(26004),ko=U(50503),Bo=U(23748),Uo=U(15218),Fo=U(2072);let Go=xo=class extends Fi.z{isEncounterEnabled(k){var B,U;const F=this._map.zone.getQuestState(),G=this._playerDataProvider.player.state.get(`zone-${this._map.zone.ID}-uniqueEncounters-${this._map.tag}`)||{},j=k.unique?k.isQuestEncounter?1===F.state[this._spawnId+1]:1===G[this._spawnId+1]:(null===(B=this._map.mapMonsters[this._spawnId+1])||void 0===B?void 0:B.respawn)>(new Date).getTime(),$=null===(U=this._map.questParams.enableMonsters)||void 0===U||U;return(k.isQuestEncounter||$)&&!j}create(){super.create(),this.bindContext()}getNewIndicatorVisibility(k){var B,U;const F=this._playerDataProvider.player;return null!==(U=null===(B=this._modsOverride)||void 0===B?void 0:B.showNewIndicator)&&void 0!==U?U:F.hasCompletedTutorial()&&F.encounters.getPetTimesBattled(k)<1}getDifficultyIndicatorVisibility(k){const B=this._playerDataProvider.player,U=tt.q.instance.prodigy.gameContainer.get("d1f-4da3");return Uo.A.useRevisedDifficulty&&k-B.getLevel()>U.threatIndicatorLevel}setPetEncountered(k){this._playerDataProvider.player.encounters.onPetEncountered(k)}getMonsterData(k){var B,U;const F=this._spawnId+1;if(!(null===(B=this._map.mapMonsters[F])||void 0===B?void 0:B.data)&&!(null===(U=this._map.mapMonsters[F])||void 0===U?void 0:U.monsterData)){const B=tt.q.instance.prodigy.battle.chooseRandomMonster(k);this._map.mapMonsters[F]={data:B,monsterData:B}}return this._map.mapMonsters[F].monsterData}bindContext(){this._spawnManager.getSpawnDataForMap(this._map.zoneName).then((k=>{var B,U,F,G,$,H,V;const W=j.Aq$.isDefined(null===(B=this._map.mapMonsters[this._spawnId+1])||void 0===B?void 0:B.respawn),q=null===(U=k[this._spawnId])||void 0===U?void 0:U.mods,K=this.getMonsterData(null!==(G=null===(F=this._modsOverride)||void 0===F?void 0:F.encounter)&&void 0!==G?G:q.encounter),z=Object.assign(Object.assign(Object.assign({},q),{range:(null==q?void 0:q.range)?Math.sqrt(q.range):xo.DEFAULT_ENCOUNTER_RANGE,screen:this._map.battleBG,onFaint:this._map.zone.defaultOnFaint,encounter:[K],addZoneCurrency:!0,monsterData:K}),this._modsOverride),Y=this.getDifficultyIndicatorVisibility(z.minLevel),Q=z.revampBattleType===Ci.gu.ZoneMiniboss,X=z.minLevel>=100?null===($=z.minLevel)||void 0===$?void 0:$.toString():null===(H=z.minLevel)||void 0===H?void 0:H.toString().concat("+"),Z=j.Aq$.isDefined(this._map.mapMonsters[this._spawnId+1]);if(!Q&&Z&&!z.isQuestEncounter&&Uo.A.useRevisedDifficulty){const k=tt.q.instance.prodigy.gameContainer.get("d1f-4da3");z.level=this.getMainEncounterLevelFromProbabilitySchema(k.weightedEncounterLevelProbabilities,z.minLevel,z.maxLevel),z.bench=eo.P8.getPetBench(z.encounter[0].ID),z.bench.forEach((B=>{B.level=this.getBenchLevelFromProbabilitySchema(k.weightedBenchLevelProbabilities,z.level)}))}else z.difficulty&&(z.minLevel=null,z.maxLevel=null);this._context.Container.rebind("EncounterBattleMods").toConstantValue(z),this._context.Container.rebind("EncounterPetId").toConstantValue(z.encounter[0].ID),this._context.Container.rebind("EncounterZoneTag").toConstantValue(this._map.zoneName),this._context.Container.rebind("EncounterEnabled").toConstantValue(this.isEncounterEnabled(z)),this._context.Container.rebind("EncounterTriggerRadius").toConstantValue(z.range*(null!==(V=Kt.A.get("GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE"))&&void 0!==V?V:1)),this._context.Container.rebind("EncounterScale").toConstantValue(this.getEncounterScale(z)),this._context.Container.rebind("EncounterSpawnTime").toConstantValue(W?1:0),this._context.Container.rebind("EncounterShouldShowGuideHand").toConstantValue(z.showGuideHand),this._context.Container.rebind("EncounterShouldShowBossIndicator").toConstantValue(Q),this._context.Container.rebind("EncounterShouldShowNewIndicator").toConstantValue(!(Q||Y)&&this.getNewIndicatorVisibility(z.encounter[0].ID)),this._context.Container.rebind("EncounterShouldShowDifficultyIndicator").toConstantValue(Y&&!z.showGuideHand&&!Q),this._context.Container.rebind("EncounterDifficultyIndicatorLevel").toConstantValue(Q?z.encounter[0].level:X),this._context.Container.rebind("EncounterDifficultyIndicatorTier").toConstantValue(z.minibossDifficulty),z.rangeRadiusOffset&&(this._context.Container.rebind("EncounterRadiusOffsetX").toConstantValue(z.rangeRadiusOffset.x),this._context.Container.rebind("EncounterRadiusOffsetY").toConstantValue(z.rangeRadiusOffset.y)),this.setPetEncountered(K.ID),this.gameObject.findComponentsInChildren(Lo.B).forEach((k=>k.consume()))})).catch(j.RQr.createHandler(`Could not get spawn data for map ${this._map.zoneName}`))}getEncounterScale(k){return k.flip||k.randDir&&Math.random()>.5?[-1,1]:[1,1]}getMainEncounterLevelFromProbabilitySchema(k,B,U){const F=B||Yn.s.minLevel,G=U||Yn.s.activePlayerLevelCap,$=this._playerDataProvider.getLevel();let H;const V=Object.keys(k),W=Object.values(k);switch(V[Bo.z.selectRandomWeightedSelection(W)]){case"higher":H=$+1;break;case"lower":H=$-1;break;default:H=$}return j.cj9.clamp(H,Math.max(F,Yn.s.minLevel),Math.min(G,Yn.s.maxLevelConfig.regular))}getBenchLevelFromProbabilitySchema(k,B){let U;const F=Object.keys(k),G=Object.values(k);switch(F[Bo.z.selectRandomWeightedSelection(G)]){case"lower":U=B-1;break;case"lowest":U=B-2;break;default:U=B}return j.cj9.clamp(U,Yn.s.minLevel,Yn.s.maxLevelConfig.regular)}unbindContext(){}};Go.DEFAULT_ENCOUNTER_RANGE=200,Go.DANGEROUS_ENCOUNTER_LEVEL_DEFICIT=7,(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Go.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("db5-fb6e"),(0,G.Sn)("design:type",Object)],Go.prototype,"_featureRequirements",void 0),(0,G.Cg)([(0,j.Cdj)("e5b-e931"),(0,G.Sn)("design:type",Fo.e)],Go.prototype,"_spawnManager",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterMap"),(0,G.Sn)("design:type",Ro.T)],Go.prototype,"_map",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterSpawnId"),(0,G.Sn)("design:type",Number)],Go.prototype,"_spawnId",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterOverrideMods"),(0,G.Sn)("design:type",Object)],Go.prototype,"_modsOverride",void 0),Go=xo=(0,G.Cg)([(0,j.EVk)("ZoneEncounterDataProvider",W.Y.mapSpawning)],Go);let jo=class extends Fi.z{get isEncounterEnabled(){var k;const B=this._map.zone.getState(this._spawnId),U=null===(k=this._map.questParams.enableWizards)||void 0===k||k,F=j.Aq$.isDefined(B)&&0!==B;return U&&!F&&!0}create(){super.create(),this.bindContext()}bindContext(){var k;const B=this.getBattleMods(this._assetId);this._context.Container.bind("EncounterBattleMods").toConstantValue(B),this._context.Container.rebind("EncounterZoneTag").toConstantValue(this._map.zoneName),this._context.Container.rebind("EncounterEnabled").toConstantValue(this.isEncounterEnabled),this._context.Container.rebind("EncounterTriggerRadius").toConstantValue(B.range*(null!==(k=Kt.A.get("GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE"))&&void 0!==k?k:1)),this._context.Container.rebind("EncounterSpawnTime").toConstantValue(0),this.gameObject.findComponentsInChildren(Lo.B).forEach((k=>k.consume()))}unbindContext(){}getBattleMods(k){var B,U;const F=Yt.t.getItem("boss",k),G=this._playerDataProvider.player.getLevel(),j=null!==(U=null===(B=F.data.battle.pets)||void 0===B?void 0:B.map((k=>({ID:parseInt(k.ID),level:ko.A.getEnemyLevel(G,k.difficulty)}))))&&void 0!==U?U:[];return{opponent:[{data:{ID:k,level:ko.A.getEnemyLevel(G,F.data.battle.difficulty)},appearance:F.metadata.appearance,equipment:F.metadata.equipment}],pets:j,difficulty:F.data.battle.difficulty,range:Go.DEFAULT_ENCOUNTER_RANGE,onEnd:this._map.zoneName,screen:this._map.battleBG,onFaint:this._map.zone.defaultOnFaint}}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],jo.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterMap"),(0,G.Sn)("design:type",Ro.T)],jo.prototype,"_map",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterSpawnId"),(0,G.Sn)("design:type",String)],jo.prototype,"_spawnId",void 0),(0,G.Cg)([(0,j.Cdj)("EncounterAssetId"),(0,G.Sn)("design:type",Number)],jo.prototype,"_assetId",void 0),jo=(0,G.Cg)([(0,j.EVk)("WizardEncounterDataProvider",W.Y.mapSpawning)],jo);let $o=class extends j.PQK{installBindings(){var k,B;const U=null!==(B=null===(k=tt.q.instance.game.state.get(Tt.G.TileScreen).user)||void 0===k?void 0:k.playerPrefab)&&void 0!==B?B:j.wa5.getActiveScene().container.get("MainPlayerGameObject");this.Container.bind("TriggerTarget").toConstantValue(U),this.Container.bind("MainPlayerGameObject").toConstantValue(U),this.Container.bind("PlayerPathfinder").toConstantValue(U.findComponentInChildren(bt.f)),this.Container.bind("PlayerLocomotion").toConstantValue(U.findComponentInChildren(j.KhP))}};$o=(0,G.Cg)([(0,j.Og1)("ZoneEncounterInstaller","Installer")],$o);var Ho=U(40295),Vo=U(93867);let Wo=class extends j.uAl{constructor(){super(...arguments),this._targetStep=Ho.B.NotStarted,this._stepCompleted=new j.HN0,this._stepIsCurrent=new j.HN0,this._stepNotStarted=new j.HN0,this._stepNotCompleted=new j.HN0}checkStep(){let k=Vo.U.isStepComplete(this._targetStep);Vo.U.progressData.step===this._targetStep?this._stepIsCurrent.dispatch():k||this._stepNotStarted.dispatch();(k?this._stepCompleted:this._stepNotCompleted).dispatch()}destroy(){this._stepIsCurrent.dispose(),this._stepNotStarted.dispose(),this._stepCompleted.dispose(),this._stepNotCompleted.dispose(),super.destroy()}};(0,G.Cg)([(0,j.gfw)(Ho.B),(0,G.Sn)("design:type",String)],Wo.prototype,"_targetStep",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wo.prototype,"_stepCompleted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wo.prototype,"_stepIsCurrent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wo.prototype,"_stepNotStarted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wo.prototype,"_stepNotCompleted",void 0),Wo=(0,G.Cg)([(0,j.EVk)("CheckEndgameQuestStep",W.Y.utility)],Wo);let qo=class extends j.uAl{constructor(){super(...arguments),this.questIsActive=new j.HN0,this.questNotActive=new j.HN0,this.questActiveState=new j.HN0}create(){super.create(),this._checkOnCreate&&this.checkQuest()}destroy(){this.questIsActive.dispose(),this.questNotActive.dispose(),this.questActiveState.dispose(),super.destroy()}checkQuest(){const k=Vo.U.isEndgameQuestActive(),B=Vo.U.hasDefeatedPippet();this.questActiveState.dispatch(k),k?B?this.questIsActive.dispatch("ENDGAME_QUEST_BANNER_DEFEAT_PUPPET_MASTER"):this.questIsActive.dispatch("ENDGAME_QUEST_BANNER_GO_TO_ACADEMY"):this.questNotActive.dispatch()}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],qo.prototype,"_checkOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],qo.prototype,"questIsActive",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],qo.prototype,"questNotActive",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],qo.prototype,"questActiveState",void 0),qo=(0,G.Cg)([(0,j.EVk)("CheckOnEndgameQuest",W.Y.utility)],qo);U(68607);let Ko=class extends j.uAl{endgameQuestlocallyAdvance(){Vo.U.locallyAdvanceQuest()}};var zo;Ko=(0,G.Cg)([(0,j.EVk)("EndgameQuestLocallyAdvance",W.Y.utility)],Ko),function(k){k.IsEndgameQuestActive="IsEndgameQuestActive",k.EndgameQuestStep="EndgameQuestStep",k.IsEndgameQuestCompleted="IsEndgameQuestCompleted",k.ShouldShowEndgameCelebrationConfetti="ShouldShowEndgameCelebrationConfetti",k.ShouldShowPuppetMasterDefeatScene="ShouldShowPuppetMasterDefeatScene",k.ShouldShowMissedPuppetMasterGearScene="ShouldShowMissedPuppetMasterGearScene",k.AwardMissedPuppetMasterGearCallback="AwardMissedPuppetMasterGearCallback",k.SavePuppetMasterDefeatDateCallback="SavePuppetMasterDefeatDateCallback"}(zo||(zo={}));let Yo=class extends j.PQK{installBindings(){this.Container.bind(zo.IsEndgameQuestActive).toConstantValue(Vo.U.isEndgameQuestActive()),this.Container.bind(zo.EndgameQuestStep).toConstantValue(Vo.U.progressData.step),this.Container.bind(zo.IsEndgameQuestCompleted).toConstantValue(Vo.U.isStepComplete(Ho.B.PuppetMasterDefeated)),this.Container.bind(zo.ShouldShowEndgameCelebrationConfetti).toConstantValue(Vo.U.shouldShowPuppetMasterDefeatCelebration()),this.Container.bind(zo.ShouldShowPuppetMasterDefeatScene).toConstantValue(Vo.U.shouldShowPuppetMasterDefeatScene()),this.Container.bind(zo.ShouldShowMissedPuppetMasterGearScene).toConstantValue(Vo.U.shouldShowMissedPuppetMasterGearScene()),this.Container.bind(zo.AwardMissedPuppetMasterGearCallback).toConstantValue((()=>Vo.U.awardMissedPuppetMasterGear())),this.Container.bind(zo.SavePuppetMasterDefeatDateCallback).toConstantValue((()=>{tt.q.instance.prodigy.gameContainer.get("306-5359").data.puppetMasterDefeatDate=Date.now()}))}};Yo=(0,G.Cg)([(0,j.Og1)("EndgameQuestProgressInstaller","Installer")],Yo);var Qo=U(28029);let Xo=class extends j.uAl{create(){super.create(),this._showConfettiOnCreate&&this.showConfetti()}showConfetti(){var k;Qo.E.addConfetti(null!==(k=this._targetGameObject)&&void 0!==k?k:this.gameObject)}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Xo.prototype,"_showConfettiOnCreate",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Xo.prototype,"_targetGameObject",void 0),Xo=(0,G.Cg)([(0,j.EVk)("FullScreenConfetti",W.Y.effect)],Xo);var Zo=U(85126),Jo=U(113);let th=class extends j.uAl{constructor(){super(...arguments),this.PLACEMENT_EVENTS=new Map([[Jo.O.Firefly,"KEYSTONE_PLACED_EVENT_FIREFLY"],[Jo.O.Shiverchill,"KEYSTONE_PLACED_EVENT_SHIVERCHILL"],[Jo.O.Bonfire,"KEYSTONE_PLACED_EVENT_BONFIRE"],[Jo.O.Shipwreck,"KEYSTONE_PLACED_EVENT_SHIPWRECK"],[Jo.O.Skywatch,"KEYSTONE_PLACED_EVENT_SKYWATCH"]]),this.KEYSTONE_ORDER=new Map([["KEYSTONE_PLACED_EVENT_FIREFLY",1],["KEYSTONE_PLACED_EVENT_SHIVERCHILL",2],["KEYSTONE_PLACED_EVENT_BONFIRE",3],["KEYSTONE_PLACED_EVENT_SHIPWRECK",4],["KEYSTONE_PLACED_EVENT_SKYWATCH",5]]),this._placeGemsComplete=new j.HN0}placeRemainingGems(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=Zo.N.getKeystonesToPlace().map((k=>this.PLACEMENT_EVENTS.get(k)));if(k.sort(((k,B)=>this.KEYSTONE_ORDER.get(k)-this.KEYSTONE_ORDER.get(B))),k.length>0){for(let B=0;B{this.checkNumberOfAffordableEvolutions(50)}),this,null)}checkNumberOfAffordableEvolutions(k=0){j.Egh.timeout(k).then((()=>(0,G.sH)(this,void 0,void 0,(function*(){const k=this._hardCurrency.getAmountOfAffordableEvolutions();this._onNumberOfAffordablePets.dispatch(k>0,k)}))),j.RQr.createHandler("Could not count affordable evolutions"))}checkAllowanceData(k=qt.D.Ultra){this._hardCurrency.getAllowanceClaimData().then((B=>{var U,{totalClaimable:F}=B,j=(0,G.Tt)(B,["totalClaimable"]);const{[k]:$}=j;if(!oh.A.isDefined($))return;const H=$.availableToCollect?"available":"claimed",V=$.hasValidFeature?H:"needs_membership";this._onAllowanceClaimStatusChecked.dispatch(V),this._onAllowanceAmountChecked.dispatch($.reward.value),this._onAllowanceDaysToCollectChecked.dispatch(null!==(U=$.daysToCollect)&&void 0!==U?U:0),this._allowanceData=$})).catch(j.RQr.createHandler("error checking allowance data"))}claimAllowance(){return(0,G.sH)(this,arguments,void 0,(function*(k=qt.D.Ultra){try{yield this._hardCurrency.claimAllowances([k]),this.checkAllowanceData(k)}catch(B){j.RQr.logError(B,"Error claiming allowance")}}))}showAllowanceDetails(){if(!this._allowanceData)return void j.VyI.log("No allowance loaded, skipping modal",j.$bb.Warning);const{currency:k,value:B}=this._allowanceData.reward;this._segment.purchase.sendFunnelStart({type:"Click-Subscription-Tier-3-Treasure-Track",category:"Treasure-Track",contentId:`currency-${k}`,adType:Fs.R.BattlePassUpsell}),tt.q.instance.prodigy.open.itemInfo({claimable:this._allowanceData.hasValidFeature,claimed:this._allowanceData.hasValidFeature&&!this._allowanceData.availableToCollect,isMystery:!1,membershipTier:xs._$.MemberUltra,rewardId:"",itemDrop:{type:"currency",ID:k,N:B}})}checkTrackedCurrencyBalance(){Tr.B.includes(this._trackedCurrencyId)&&this._onTrackedCurrencyBalanceChecked.dispatch(this._hardCurrency.getBalance(this._trackedCurrencyId))}onBalanceChanged(k){this.checkNumberOfAffordableEvolutions(100),k.currency===this._trackedCurrencyId&&(this._hardCurrency.getPreviousBalance(k.currency)>k.value?this._onTrackedCurrencySpent.dispatch(k.value):this._onTrackedCurrencyEarned.dispatch(k.value))}destroy(){this._onNumberOfAffordablePets.dispose(),this._onAllowanceClaimStatusChecked.dispose(),this._onAllowanceAmountChecked.dispose(),this._onAllowanceDaysToCollectChecked.dispose(),this._onTrackedCurrencyBalanceChecked.dispose(),this._onTrackedCurrencyEarned.dispose(),this._onTrackedCurrencySpent.dispose(),this._hardCurrency.onBalanceChanged.remove(this.onBalanceChanged,this),this._hardCurrency.onAffordableCacheChanged.remove(this._affordableChangeCallback,this),tt.q.instance.game.broadcaster.removeAppListener(jn.ig.AnyLevelUp,this),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("5c7-e02d"),(0,G.Sn)("design:type",zn.W)],hh.prototype,"_hardCurrency",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],hh.prototype,"_segment",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],hh.prototype,"_trackedCurrencyId",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hh.prototype,"_onNumberOfAffordablePets",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hh.prototype,"_onAllowanceClaimStatusChecked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hh.prototype,"_onAllowanceAmountChecked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hh.prototype,"_onAllowanceDaysToCollectChecked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hh.prototype,"_onTrackedCurrencyEarned",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hh.prototype,"_onTrackedCurrencySpent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hh.prototype,"_onTrackedCurrencyBalanceChecked",void 0),hh=(0,G.Cg)([(0,j.EVk)("HardCurrencyDataProvider",W.Y.utility)],hh);var ch,dh,lh=U(42113);!function(k){k.InfoPanelRank="LEADERBOARD_PANEL_RANK",k.InfoPanelDisplayName="LEADERBOARD_PANEL_DISPLAY_NAME",k.InfoPanelCorrectAnswers="LEADERBOARD_PANEL_CORRECT_ANSWERS",k.InfoPanelBorderHex="LEADERBOARD_PANEL_BORDER_HEX",k.InfoPanelBackgroundHex="LEADERBOARD_PANEL_BACKGROUND_HEX",k.InfoPanelPrize="LEADERBOARD_PANEL_PRIZE_INFO"}(ch||(ch={})),function(k){k.Border="#0068A3",k.Background="#DEF5FF"}(dh||(dh={}));let uh=class extends j.uAl{constructor(){super(...arguments),this.isCurrentPlayer=!1}get entryId(){return this._entryId}updatePanelData(k){var B;this._entryId=k.id;const U={[ch.InfoPanelRank]:k.totalAnswersCorrect<=0?this._localizer.getText("LEADERBOARDS_PREVIOUS_UNRANKED"):k.rank,[ch.InfoPanelDisplayName]:xt.$.truncate(k.displayName,lh.O.DISPLAY_NAME_MAX,!0),[ch.InfoPanelCorrectAnswers]:k.totalAnswersCorrect};this.isCurrentPlayer&&(U[ch.InfoPanelBackgroundHex]=dh.Background,U[ch.InfoPanelBorderHex]=dh.Border);const F=null===(B=k.prize)||void 0===B?void 0:B[0];F&&j.Aq$.isDefined(k.prizeIcon)&&(U[ch.InfoPanelPrize]=[`${F.N}`,k.prizeIcon]),Nt.d.updateInjectedValues(this.GameObject,U)}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],uh.prototype,"_localizer",void 0),uh=(0,G.Cg)([(0,j.EVk)("LeaderboardInitPanel",W.Y.leaderboard)],uh);var fh=U(61985),bh=U(93833),ph=U(70548),vh=U(18206);let gh=class extends j.uAl{constructor(){super(...arguments),this._playerAvatar=null,this._previousCycleSvs=null}get isCvCViewed(){return this._breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_LEADERBOARD,ls.B.BREADCRUMB_LEADERBOARD_NOTIFICATION_VIEWED)}get isSvSViewed(){return this._breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_LEADERBOARD,ls.B.BREADCRUMB_STUDENT_LEADERBOARD_NOTIFICATION_VIEWED)}postCreate(){super.postCreate(),this._leaderboardDataProvider.retrievePreviousSvSRankData().then((k=>{this._previousCycleSvs=k,this.checkNotificationEnabled()})).catch(j.RQr.createHandler("Error retrieving previous SvS rank data"))}destroy(){var k;null===(k=this._playerAvatar)||void 0===k||k.destroy(),super.destroy()}checkNotificationEnabled(){var k;let B,U;this._previousCycleSvs&&!((null===(k=this._previousCycleSvs)||void 0===k?void 0:k.totalAnswersCorrect)<=0)||this.isSvSViewed||this._player.data.lastActiveStudentLeaderboardDate===lh.O.cachedCycleEndDate||this._breadcrumbManager.completeBreadcrumb(ls.B.FEATURE_LEADERBOARD,ls.B.BREADCRUMB_STUDENT_LEADERBOARD_PRIZE_CLAIMED),this.isSvSViewed?this.isCvCViewed||(B=this._player.data.lastActiveLeaderboardDate,U=lh.n.ClassLeaderboard,this._segmentInterfaceProperties.interfaceName="leaderboard-notification-popup-class-vs-class"):(B=this._player.data.lastActiveStudentLeaderboardDate,U=lh.n.StudentLeaderboard,this._segmentInterfaceProperties.interfaceName="leaderboard-notification-popup-student-vs-class",this._playerAvatar=tt.q.instance.prodigy.create.player(this._avatarRootContainer.rootContainer,this._player,1,0,0,!0,{isPreview:!0,headOnly:!0,hideMount:!0},!0,!1),this._playerAvatar.reload()),j.Aq$.isDefined(B)&&B!==lh.O.cachedCycleEndDate?this._leaderboardDataProvider.updateLeaderboardData(U):(tt.q.instance.game.broadcaster.broadcast(jn.Y1.UpdateSocialNotification,jn.HG.HUD),this.destroy())}showNotification(){this.isCreated&&!this.GameObject.isDestroyed&&(this._contentContainer.active=!0,this._autoTimeout.startTimer(),this._segmentInterfaceComponent.sendInterfaceEvent())}setRank(k){"1st"===k||"2nd"===k||"3rd"===k?(this._textRankSummaryTop.GameObject.active=!0,this._textRankSummary.GameObject.active=!1):(this._textRankSummaryTop.GameObject.active=!1,this._textRankSummary.GameObject.active=!0)}};(0,G.Cg)([(0,Gi.b)("306-5359"),(0,G.Sn)("design:type",An.W)],gh.prototype,"_player",void 0),(0,G.Cg)([(0,Gi.b)("12f-4e29"),(0,G.Sn)("design:type",sh.F)],gh.prototype,"_breadcrumbManager",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gh.prototype,"_contentContainer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],gh.prototype,"_textRankSummaryTop",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],gh.prototype,"_textRankSummary",void 0),(0,G.Cg)([(0,j.MnK)(fh.E),(0,G.Sn)("design:type",fh.E)],gh.prototype,"_autoTimeout",void 0),(0,G.Cg)([(0,j.MnK)(lh.O),(0,G.Sn)("design:type",lh.O)],gh.prototype,"_leaderboardDataProvider",void 0),(0,G.Cg)([(0,j.MnK)(ph.S),(0,G.Sn)("design:type",ph.S)],gh.prototype,"_segmentInterfaceComponent",void 0),(0,G.Cg)([(0,j.MnK)(vh.y),(0,G.Sn)("design:type",vh.y)],gh.prototype,"_segmentInterfaceProperties",void 0),(0,G.Cg)([(0,j.MnK)(bh.$),(0,G.Sn)("design:type",bh.$)],gh.prototype,"_avatarRootContainer",void 0),gh=(0,G.Cg)([(0,j.EVk)("LeaderboardNotification",W.Y.leaderboard)],gh);var mh=U(5269),yh=U(2385);let _h=class extends j.uAl{constructor(){super(...arguments),this._isInitialUpdate=!0}updatePanels(k,B){this._panelsDivider.active=!1;for(let G=this._panelsObj.children.length;--G>=0;)this._panelsObj.children[G].active&&this._panelsObj.children[G].destroy();let U=null;const F=[];for(const[G,$]of Object.entries(k))$.displayName&&($.totalAnswersCorrect<=0&&!j.Aq$.isDefined(U)&&(U=Number.parseInt(G)),F.push(new Promise((k=>{this._prefabLoader.loadWithDependenciesFromGUID(this._leaderboardType===lh.n.ClassLeaderboard?Rt.l.LeaderboardRankingPanel:Rt.l.LeaderboardSvSRankingPanel,this._panelsObj).then((U=>{const F=U.findComponent(uh);F&&(B===$.id&&(F.isCurrentPlayer=!0),F.updatePanelData($)),k()})).catch(j.RQr.createHandler("Error creating panel"))}))));Promise.all(F).then((()=>{this._isInitialUpdate&&(this._scrollView.scrollToPercent(100,mh.H.Vertical),this._scrollView.resetVelocityWheel(),this._isInitialUpdate=!1),U&&(this._panelsDivider.setRenderOrder(U),this._panelsDivider.active=!0),this._grid.updateAll()})).catch(j.RQr.createHandler("Error loading all panels"))}};(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],_h.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.MnK)(yh.I),(0,G.Sn)("design:type",yh.I)],_h.prototype,"_scrollView",void 0),(0,G.Cg)([(0,j.MnK)(j.JTA),(0,G.Sn)("design:type",j.JTA)],_h.prototype,"_grid",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_h.prototype,"_panelsObj",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_h.prototype,"_panelsDivider",void 0),(0,G.Cg)([(0,j.gfw)(lh.n),(0,G.Sn)("design:type",String)],_h.prototype,"_leaderboardType",void 0),_h=(0,G.Cg)([(0,j.EVk)("LeaderboardRankingView",W.Y.leaderboard)],_h);var Eh=U(93991);let wh=class extends j.uAl{setTintableBanner(){}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],wh.prototype,"_titleText",void 0),(0,G.Cg)([(0,j.MnK)(Eh.w),(0,G.Sn)("design:type",Eh.w)],wh.prototype,"_bannerLeftFill",void 0),(0,G.Cg)([(0,j.MnK)(Eh.w),(0,G.Sn)("design:type",Eh.w)],wh.prototype,"_flagLeftFill",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],wh.prototype,"_flagLeftImage",void 0),(0,G.Cg)([(0,j.MnK)(Eh.w),(0,G.Sn)("design:type",Eh.w)],wh.prototype,"_bannerRightFill",void 0),(0,G.Cg)([(0,j.MnK)(Eh.w),(0,G.Sn)("design:type",Eh.w)],wh.prototype,"_flagRightFill",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],wh.prototype,"_flagRightImage",void 0),wh=(0,G.Cg)([(0,j.EVk)("FlagTintableBanner (abstract)")],wh);let Th=class extends wh{constructor(){super(...arguments),this._rankDisplayText=""}setRank(k){this._rankDisplayText=k,this.setTintableBanner()}setTintableBanner(){let k,B;this._titleText.text=this._rankDisplayText;let U=!1,F=!1;switch(this._rankDisplayText){case"1st":U=!0,F=!0,k="0xD41E3C",B="icon-trophy-gold-large";break;case"2nd":U=!0,F=!0,k="0x4864BA",B="icon-trophy-silver-large";break;case"3rd":U=!0,F=!0,k="0x82AA28",B="icon-trophy-bronze-large";break;case"4th":case"5th":F=!0,k="0xFEB02E"}this._flagLeftGameObject.active=U,this._flagRightGameObject.active=U,this._flagDetailsLeftGameObject.active=U,this._flagDetailsRightGameObject.active=U,this._flagLeftImage.GameObject.active=U,this._flagRightImage.GameObject.active=U,U&&(this._flagLeftFill.disableTint(),this._flagLeftFill.hexTintColor=k,this._flagLeftFill.enableTint(),this._flagRightFill.disableTint(),this._flagRightFill.hexTintColor=k,this._flagRightFill.enableTint(),this._flagLeftImage.setAsset(Ve._.Ui_social_menu_json,B),this._flagRightImage.setAsset(Ve._.Ui_social_menu_json,B)),this._bannerLeftGameObject.active=F,this._bannerRightGameObject.active=F,F&&(this._bannerLeftFill.disableTint(),this._bannerLeftFill.hexTintColor=k,this._bannerLeftFill.enableTint(),this._bannerRightFill.disableTint(),this._bannerRightFill.hexTintColor=k,this._bannerRightFill.enableTint())}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Th.prototype,"_bannerLeftGameObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Th.prototype,"_flagLeftGameObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Th.prototype,"_flagDetailsLeftGameObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Th.prototype,"_bannerRightGameObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Th.prototype,"_flagRightGameObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Th.prototype,"_flagDetailsRightGameObject",void 0),Th=(0,G.Cg)([(0,j.EVk)("RankFlagTintableBanner")],Th);let Sh=class extends j.uAl{constructor(){super(...arguments),this._textCvC=[],this._textSvS=[],this._leaderboardType=lh.n.ClassLeaderboard}updateDisplay(k=this._leaderboardType){this._leaderboardType=k;for(const U of this._textCvC)U.GameObject.active=k===lh.n.ClassLeaderboard;for(const U of this._textSvS)U.GameObject.active=k===lh.n.StudentLeaderboard;this.continueButtonCvC.GameObject.active=k===lh.n.ClassLeaderboard;const B=k===lh.n.StudentLeaderboard&&!tt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_LEADERBOARD,ls.B.BREADCRUMB_STUDENT_LEADERBOARD_PRIZE_CLAIMED);this.continueButtonSvS.GameObject.active=k===lh.n.StudentLeaderboard&&!B,this.getPrizeButtonSvS.GameObject.active=k===lh.n.StudentLeaderboard&&B}};(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Sh.prototype,"continueButtonCvC",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Sh.prototype,"continueButtonSvS",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Sh.prototype,"getPrizeButtonSvS",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",Array)],Sh.prototype,"_textCvC",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",Array)],Sh.prototype,"_textSvS",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],Sh.prototype,"cvcCongratsText",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],Sh.prototype,"svsCongratsText",void 0),Sh=(0,G.Cg)([(0,j.EVk)("LeaderboardResultsDisplay",W.Y.leaderboard)],Sh);let Ah=class extends j.uAl{constructor(){super(...arguments),this._rankDisplayText="",this._leaderboardType=lh.n.ClassLeaderboard,this.onContinue=new j.HN0,this.onPrize=new j.HN0,this._initialized=!1}setRank(k){this._rankDisplayText=k}setLeaderboardType(k){this._leaderboardType=k}updateDisplay(){if(this._rankDisplayText){const k=this.GameObject.findComponentInChildren(Th);k&&k.setRank(this._rankDisplayText);const B=this.GameObject.findComponentInChildren(Sh);if(B){const k=this._leaderboardType===lh.n.ClassLeaderboard,U=k?B.cvcCongratsText:B.svsCongratsText;switch(this._rankDisplayText){case"1st":case"2nd":case"3rd":U.localizationKey=k?"LEADERBOARDS_RESULTS_RANK_TOP":"LEADERBOARDS_RESULTS_RANK_STUDENT_TOP";break;default:U.localizationKey=k?"LEADERBOARDS_RESULTS_RANK":"LEADERBOARDS_RESULTS_RANK_STUDENT"}U.setTextArguments(this._rankDisplayText),B.updateDisplay(this._leaderboardType),this._initialized||(this._initialized=!0,B.continueButtonCvC.onClick.add((()=>{this.onContinue.dispatch()})),B.continueButtonSvS.onClick.add((()=>{this.onContinue.dispatch()})),B.getPrizeButtonSvS.onClick.add((()=>{this.onPrize.dispatch()})))}}}destroy(){this.onContinue.dispose(),this.onPrize.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ah.prototype,"onContinue",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ah.prototype,"onPrize",void 0),Ah=(0,G.Cg)([(0,j.EVk)("LeaderboardResultsController",W.Y.leaderboard)],Ah);U(18332);var Ch=U(78746),Oh=U(90156),Ih=U(129),Dh=U(13693),Rh=U(44564),Ph=U(87331),Mh=U(99737),Nh=U(41538),xh=U(75777);let Lh=class extends j.uAl{refreshFollow(){const k=this._currentPlayer.player.equipment.getFollow();this._followContainer&&(this._followContainer.destroy(),this._followContainer=null),k&&(this._followContainer=tt.q.instance.prodigy.create.follow(this._spine.getRootContainer(),k,1,null),(this._followContainer instanceof xh.i||this._followContainer instanceof Mh.z||this._followContainer instanceof Nh.g)&&this._followContainer.startLoad())}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Lh.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],Lh.prototype,"_spine",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Lh.prototype,"_localizer",void 0),Lh=(0,G.Cg)([(0,j.EVk)("FollowDisplay",W.Y.lootDash)],Lh);var kh=U(61895),Bh=U(66397);let Uh=class extends j.uAl{constructor(){super(...arguments),this._equippedPetsSetup=!1,this._activeItemCards=[],this._itemCards=[],this._onTeamItemCardMap={},this._petFilledTeamCards=[],this._emptyFilledTeamCardInjectedValues={PET_ID:-1,PET_DATA:null,NAME:"Empty",LEVEL:0,MERGE_RANK:0,SHOW_MERGE_RANK_BADGE:!1,INPUT_ENABLED:!0,SHOW_SPINE:!1,SHOW_EMPTY_STATE:!0,SHOW_REPLACE_TOOLTIP:!1,SHOW_SELECTED:!1},this._petFilledTeamCardSelected=-1}get _filledTeamCardPrefab(){return Rt.l.FilledTeamCardInjectionConfiguredMergeRank}create(){this._lootDashManager.onStateDataChanged.add(this.handleStateDataChanged,this)}handleStateDataChanged(k,B){Ch.kL.includes(B)&&(this._teamUpdated||this._appearanceUpdated)&&(this._currentPlayer.player.kennel.updated=this._teamUpdated,this._currentPlayer.player.appearanceChanged=this._appearanceUpdated,this._teamUpdated=!1,this._appearanceUpdated=!1,this._currentPlayer.player.forceSaveCharacter())}setup(k){return(0,G.sH)(this,void 0,void 0,(function*(){this._itemType=k,this._noItemsText.GameObject.active=!1,this._teamUpdated=!1,this._appearanceUpdated=!1,this._onTeamItemCardMap={},this.setupRightPanel(),yield this.setupItemCards()}))}destroy(){this._itemCards.forEach((k=>{null===k.parent&&k.destroy()})),this._itemCardScrollViewSlider.onValueChanged.remove(this.setItemCardVisibilityOnScroll,this),this._lootDashManager.onStateDataChanged.remove(this.handleStateDataChanged,this),super.destroy()}setupRightPanel(){switch(this._itemType){case"pet":this.setActiveRightPanelDisplay(this._petRightSideContainer),this._itemCardHeaderText.text=this._baseLocalizer.getText("LOOT_DASH_YOUR_PETS"),this._equippedPetsSetup?this.resetStatesOfPetFilledTeamCards():(this.setupPetsFilledTeamCards().catch(j.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to set up the pet filled team cards")),this._equippedPetsSetup=!0);break;case"follow":this.setActiveRightPanelDisplay(this._followRightSideDisplay.GameObject),this.setupFollowRightPanel().catch(j.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to set up the follow right panel")),this._followRightSideDisplay.refreshFollow(),this._itemCardHeaderText.text=this._baseLocalizer.getText("LOOT_DASH_YOUR_BUDDIES");break;case"mount":this.setActiveRightPanelDisplay(this._mountRightSideContainer),this.setupMountRightPanel().catch(j.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to set up the mount right panel")),this._itemCardHeaderText.text=this._baseLocalizer.getText("LOOT_DASH_YOUR_MOUNTS")}}setupMountRightPanel(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._currentPlayer.player.equipment.getMount();this._mountFilledTeamCard?yield this.updateFilledTeamCardForBackpackItem(k,this._mountFilledTeamCard,"mount"):(this._mountFilledTeamCard=yield this.setupFilledTeamCardForBackpackItem(k,this._mountFilledTeamCardParent,"mount"),this._characterPreview.addCharacter(this._currentPlayer.player,this._characterPreviewSortingAnchor.getRootContainer()),this._characterPreview.setInputEnabled(!1))}))}setupFollowRightPanel(){return(0,G.sH)(this,void 0,void 0,(function*(){this._followFilledTeamCard?yield this.updateFilledTeamCardForBackpackItem(this._currentPlayer.player.equipment.getFollow(),this._followFilledTeamCard,"follow"):this._followFilledTeamCard=yield this.setupFilledTeamCardForBackpackItem(this._currentPlayer.player.equipment.getFollow(),this._followFilledTeamCardParent,"follow")}))}setActiveRightPanelDisplay(k){this._petRightSideContainer.active=k===this._petRightSideContainer,this._followRightSideDisplay.GameObject.active=k===this._followRightSideDisplay.GameObject,this._mountRightSideContainer.active=k===this._mountRightSideContainer}setupPetsFilledTeamCards(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._cardLoadingPromise)return;const k=this._currentPlayer.player.kennel.getPetTeam(!0),B=[];B.push((()=>(0,G.sH)(this,void 0,void 0,(function*(){var B;null===(B=this._petFilledTeamCards[0])||void 0===B||B.destroy(),this._petFilledTeamCards[0]=yield this.setupFilledTeamCardForPet(k[0],0),this._topPetFilledTeamCard.addChild(this._petFilledTeamCards[0])})))()),B.push((()=>(0,G.sH)(this,void 0,void 0,(function*(){var B;null===(B=this._petFilledTeamCards[1])||void 0===B||B.destroy(),this._petFilledTeamCards[1]=yield this.setupFilledTeamCardForPet(k[1],1),this._bottomPetFilledTeamCard.addChild(this._petFilledTeamCards[1])})))()),this._cardLoadingPromise=Promise.all(B),yield this._cardLoadingPromise.then((()=>{this._cardLoadingPromise=null})).catch(j.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Unable to create team cards"))}))}setupFilledTeamCardForPet(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){if(k){const U=kh.B.getInjectedValuesForFilledTeamCardPet(k);return this.addOnClickCallbacksToPetFilledCards(U,B),kh.B.setupPrefabWithRetainedContext(this._filledTeamCardPrefab,U,`equippedPet-${k.data.ID}`)}{const k=Object.assign({},this._emptyFilledTeamCardInjectedValues);return this.addOnClickCallbacksToPetFilledCards(k,B),kh.B.setupPrefabWithRetainedContext(this._filledTeamCardPrefab,k,"emptyPet")}}))}addOnClickCallbacksToPetFilledCards(k,B){k.ON_CLICK=()=>{this.onPetFilledTeamCardClicked(B)},k.ON_REMOVE_CLICK=()=>{this.onPetFilledTeamCardRemoveClicked(B)},k.ON_INFO_CLICK=()=>{this.onPetFilledTeamCardInfoClicked(B)}}updateFilledTeamCardForPet(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=B?kh.B.getInjectedValuesForFilledTeamCardPet(B):this._emptyFilledTeamCardInjectedValues;Nt.d.updateInjectedValues(this._petFilledTeamCards[k],U,!0),this.setupPetsFilledTeamCards().catch(j.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to set up the pet filled team cards"))}))}onPetCardClicked(k,B){const U=this._currentPlayer.player.kennel.getPetTeam(!0);let F=k;if(this.resetStatesOfPetFilledTeamCards(),U.some((k=>k&&k.data.uniqueID===B.uniqueID)))return;if(!U[0]||!U[1]){const G=U[0]?2:1;this.addPetToTeam(k,B,G),F=-1}this.setSelectedItemCard(F);const G=this._selectedItemCard>=0;for(const j of this._petFilledTeamCards)Nt.d.updateInjectedValues(j,{SHOW_REPLACE_TOOLTIP:G})}addPetToTeam(k,B,U){this._currentPlayer.player.kennel.setTeamPosition(B,U,!1);const F=this._currentPlayer.player.kennel.getPetTeam(!0);this._teamUpdated=!0,this.updateItemCardsForOnTeamPets(k,B),this.updateFilledTeamCardForPet(U-1,F[U-1]).catch(j.RQr.createHandler(`LootDashDetailedSelectionScreenComponent: Failed to update the ${1===U?"top":"bottom"} filled team card`))}setSelectedItemCard(k,B=!1){if(this._selectedItemCard>=0){const k=this._itemCards[this._selectedItemCard];Nt.d.updateInjectedValues(k,{SELECTED:!1})}if(!(this._selectedItemCard!==k&&k>=0))return this._selectedItemCard=-1,void this._petFilledTeamCards.forEach((k=>{Nt.d.updateInjectedValues(k,{SHOW_SELECTED:!1})}));{const U=this._itemCards[k];B||Nt.d.updateInjectedValues(U,{SELECTED:!0}),this._petFilledTeamCards.forEach((k=>{Nt.d.updateInjectedValues(k,{SHOW_SELECTED:!0})}))}this._selectedItemCard=k}onPetFilledTeamCardClicked(k){const B=this._petFilledTeamCards[k],U=this._currentPlayer.player.kennel.getPetTeam(!0)[k];this.resetStatesOfPetFilledTeamCards(),tt.q.instance.prodigy.audio.playSFX(18,"pop"),this._selectedItemCard>=0?this.swapEquippedPet(k):U?Nt.d.updateInjectedValues(B,{SHOW_REMOVE_TOOLTIP:!0}):this._petFilledTeamCardSelected===k?this._petFilledTeamCardSelected=-1:this._petFilledTeamCardSelected=k}onItemCardClicked(k){const B=this._itemCards[k],U=B.findComponent(j.bE_);switch(tt.q.instance.prodigy.audio.playSFX(18,"pop"),this._itemType){case"pet":const F=U.getInjectedValue("PET_DATA");this.onPetCardClicked(k,F);break;case"follow":case"mount":this.onBackpackItemCardClicked(B,k)}}onPetFilledTeamCardRemoveClicked(k){const B=0===k?1:2;this._currentPlayer.player.kennel.removeAtTeamPosition(B),this.resetStatesOfPetFilledTeamCards(),this.updateItemCardsForOnTeamPets(),this.updateFilledTeamCardForPet(k,null).catch(j.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to update the filled team card")),this._petFilledTeamCardSelected=-1}onPetFilledTeamCardInfoClicked(k){var B;const U=this._currentPlayer.player.kennel.getPetTeam(!0)[k].data,F=U.team,G=()=>{this.setupPetsFilledTeamCards().catch(j.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to set up the pet filled team cards after closing the pet menu")),this.setupItemCards().catch(j.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to set up pet cards after closing the pet menu"))};if((0,Bt.G)(Oh.m)){const j=null===(B=tt.q.instance)||void 0===B?void 0:B.prodigy.open.petDetailsMenu(U,G);j.onPetGearChanged.add(this.updateItemCardsForOnTeamPets.bind(this,k)),j.onRemovePetFromTeam.add(this.onPetFilledTeamCardRemoveClicked.bind(this,k)),j.onAddPetToTeam.add(this.addPetToTeam.bind(this,k,U,F))}else{tt.q.instance.prodigy.open.yourPetStandalone(U,{[hs.hi.YourPetPanelShowRightSideButtons]:!1}).onClose=G}this.resetStatesOfPetFilledTeamCards()}resetStatesOfPetFilledTeamCards(){const k={SHOW_SELECTED:!1,SHOW_REMOVE_TOOLTIP:!1,SHOW_REPLACE_TOOLTIP:!1};for(const B of this._petFilledTeamCards)Nt.d.updateInjectedValues(B,k,!0)}swapEquippedPet(k){const B=this._itemCards[this._selectedItemCard],U=B.findComponent(j.bE_).getInjectedValue("PET"),F=0===k?1:2;this._currentPlayer.player.kennel.removeAtTeamPosition(F,!1),this._currentPlayer.player.kennel.setTeamPosition(U,F,!1),this._teamUpdated=!0;const G=this._currentPlayer.player.kennel.petTeam.find((k=>k.data.uniqueID===U.uniqueID));this.updateItemCardsForOnTeamPets(this._selectedItemCard,U),this.updateFilledTeamCardForPet(k,G).catch(j.RQr.createHandler("LootDashDetailedSelectionScreenComponent: Failed to update the filled team card")),this.setSelectedItemCard(-1),Nt.d.updateInjectedValues(B,{SHOW_REPLACE_TOOLTIP:this._selectedItemCard>=0,SELECTED:!1},!0)}setupFilledTeamCardForBackpackItem(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){if(!k){const k=yield kh.B.setupPrefabWithRetainedContext(this._filledTeamCardPrefab,this._emptyFilledTeamCardInjectedValues,`empty-${U}`,B);return"mount"===U&&Nt.d.updateInjectedValues(k,{SHOW_EMPTY_STATE:!0,SHOW_EMPTY_ICON:!1,SHOW_EMPTY_TEXT:!1},!0),Nt.d.updateInjectedValues(k,{INPUT_ENABLED:!1},!0),k}const F=Yt.t.getItem(U,k),G=this.getInjectedValuesForFilledBackpackItemCard(F);return yield kh.B.setupPrefabWithRetainedContext(this._filledTeamCardPrefab,G,`equipped-${U}-${F.data.ID}`,B)}))}updateFilledTeamCardForBackpackItem(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){if(!k)return Nt.d.updateInjectedValues(B,this._emptyFilledTeamCardInjectedValues,!0),void("mount"===U&&Nt.d.updateInjectedValues(B,{SHOW_EMPTY_STATE:!0,SHOW_EMPTY_ICON:!1,SHOW_EMPTY_TEXT:!1},!0));const F=Yt.t.getItem(U,k),G=this.getInjectedValuesForFilledBackpackItemCard(F);Nt.d.updateInjectedValues(B,G,!0)}))}getInjectedValuesForFilledBackpackItemCard(k){var B;const U=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return{PET_ID:-1,PET_DATA:null,NAME:null!==(B=k.data.nickname)&&void 0!==B?B:k.data.name,LEVEL:0,INPUT_ENABLED:!1,SHOW_STAT_ICON:!0,SHOW_SPINE:!1,SHOW_EMPTY_STATE:!1,SHOW_LEVEL:!1,SHOW_MEMBERLOCK_ICON:Ph.G.shouldShowMemberLockIcon(k,U),SHOW_REPLACE_TOOLTIP:!1,STAT_ICON_DISPLAY_ITEM_ID:k.ID,STAT_ICON_DISPLAY_ITEM_TYPE:k.type}}setupItemCards(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=null!==(k=this._itemCards.length)&&void 0!==k?k:0;let U;switch(this.setSelectedItemCard(-1),this._itemType){case"pet":U=yield this.setupItemCardsForPets(B);break;case"follow":const k=(yield this._lootDashManager.getFeaturedItems()).featuredFollows;U=yield this.setupItemCardsForBackpackItems("follow",B,k);break;case"mount":const F=(yield this._lootDashManager.getFeaturedItems()).featuredMounts;U=yield this.setupItemCardsForBackpackItems("mount",B,F)}const F=Math.max(U,B);this._activeItemCards=[];for(let G=0;G=B&&Nt.d.updateInjectedValues(this._itemCards[G],{ON_CLICK:()=>this.onItemCardClicked(G)},!0),Gj.Aq$.isDefined(k)&&!(k instanceof Ih.a))).map((k=>null==k?void 0:k.data));let $=[...F,...this._currentPlayer.player.kennel.getPrimaryPets(!0)];if($.length<=0)return this._noItemsText.text=this._baseLocalizer.getText("LOOT_DASH_NO_PETS"),this._noItemsText.GameObject.active=!0,0;$=ct.orderBy($,[k=>U.includes(k.ID)?1:0,k=>k.mergeRank,k=>{var B,U;return"Mythic"===(null===(U=null===(B=Yt.t.getItem("pet",k.ID))||void 0===B?void 0:B.data)||void 0===U?void 0:U.category)?1:0},"level"],["desc","desc","desc","desc"]);const H=new Array(Math.max($.length-k,0));for(let j=0;j<$.length;j++)B.push((()=>(0,G.sH)(this,void 0,void 0,(function*(){const B=F.some((k=>(null==k?void 0:k.uniqueID)===$[j].uniqueID)),U=kh.B.getInjectedValuesForOwnedPetCardPet($[j],B);B&&(this._onTeamItemCardMap[j]=$[j]),jU.includes(k.ID)&&!U.includes(B.ID)?-1:U.includes(B.ID)&&!U.includes(k.ID)?1:0));if(j.length<=0){switch(k){case"follow":this._noItemsText.text=this._baseLocalizer.getText("LOOT_DASH_NO_BUDDIES");break;case"mount":this._noItemsText.text=this._baseLocalizer.getText("LOOT_DASH_NO_MOUNTS")}return this._noItemsText.GameObject.active=!0,0}const $=new Array(Math.max(j.length-B,0));for(let U=0;U(0,G.sH)(this,void 0,void 0,(function*(){const F=kh.B.getInjectedValuesForOwnedPetCardBackpackItem(j[U].ID,k);UB+U)}}updateItemCardsForOnTeamPets(k,B){j.Aq$.isDefined(k)&&B&&(this._onTeamItemCardMap[k]=B,Nt.d.updateInjectedValues(this._itemCards[k],{SHOW_ON_TEAM:!0}));const U=this._currentPlayer.player.kennel.petTeam.map((k=>null==k?void 0:k.data.uniqueID));for(const F of Object.keys(this._onTeamItemCardMap))this._onTeamItemCardMap[F]&&(U.includes(this._onTeamItemCardMap[F].uniqueID)||(this._onTeamItemCardMap[F]=null,Nt.d.updateInjectedValues(this._itemCards[F],{SHOW_ON_TEAM:!1})))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uh.prototype,"_petRightSideContainer",void 0),(0,G.Cg)([(0,j.MnK)(Lh),(0,G.Sn)("design:type",Lh)],Uh.prototype,"_followRightSideDisplay",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uh.prototype,"_mountRightSideContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uh.prototype,"_topPetFilledTeamCard",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uh.prototype,"_bottomPetFilledTeamCard",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Uh.prototype,"_itemCardHeaderText",void 0),(0,G.Cg)([(0,j.MnK)(j.Sz7),(0,G.Sn)("design:type",j.Sz7)],Uh.prototype,"_itemCardGridLayout",void 0),(0,G.Cg)([(0,j.MnK)(Rh.H),(0,G.Sn)("design:type",Rh.H)],Uh.prototype,"_itemCardScrollViewSlider",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uh.prototype,"_itemCardScrollArea",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],Uh.prototype,"_segment",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uh.prototype,"_followFilledTeamCardParent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uh.prototype,"_mountFilledTeamCardParent",void 0),(0,G.Cg)([(0,j.MnK)(Dh.Y),(0,G.Sn)("design:type",Dh.Y)],Uh.prototype,"_characterPreview",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Uh.prototype,"_noItemsText",void 0),(0,G.Cg)([(0,j.MnK)(Za.B),(0,G.Sn)("design:type",Za.B)],Uh.prototype,"_characterPreviewSortingAnchor",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Uh.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Uh.prototype,"_baseLocalizer",void 0),(0,G.Cg)([(0,j.Cdj)("cfe-9c2c"),(0,G.Sn)("design:type",Bh.K)],Uh.prototype,"_lootDashManager",void 0),Uh=(0,G.Cg)([(0,j.EVk)("LootDashDetailedSelectionScreen",W.Y.lootDash)],Uh);let Fh=class extends j.uAl{findAMatch(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=(yield this._lootDashManager.getFeaturedItemsEquippedData()).numFeaturedItemsThatCouldBeEquipped;if(0===k||this._lootDashManager.hasShownFeaturedItemsConfirmation)return void this._lootDashManager.setState(Ch.zM.FindingAMatch);const B=this.getNumLootBagsPlayerCouldEarn(k);this._lootDashManager.hasShownFeaturedItemsConfirmation=!0,Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.LootDashFeaturedItemConfirmationModal,{[hs.eV.FeaturedItemConfirmationModalHeaderText]:B>1?this._baseLocalizer.getText("LOOT_DASH_ADD_FEATURED_CONTENT_PLURAL",B):this._baseLocalizer.getText("LOOT_DASH_ADD_FEATURED_CONTENT",B),[hs.eV.FeaturedItemConfirmationModalBodyText]:this._baseLocalizer.getText("LOOT_DASH_CHANGE_TEAM"),[hs.eV.FeaturedItemConfirmationModalYesButtonCallback]:void 0,[hs.eV.FeaturedItemConfirmationModalNoButtonCallback]:()=>{this._lootDashManager.setState(Ch.zM.FindingAMatch)}}).catch(j.RQr.createHandler("LootDashFindAMatchPanelComponent: Error creating the featured item confirmation modal"))}))}getNumLootBagsPlayerCouldEarn(k){return k}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Fh.prototype,"_baseLocalizer",void 0),(0,G.Cg)([(0,j.Cdj)("cfe-9c2c"),(0,G.Sn)("design:type",Bh.K)],Fh.prototype,"_lootDashManager",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Fh.prototype,"_prefabLoader",void 0),Fh=(0,G.Cg)([(0,j.EVk)("LootDashFindAMatchPanel",W.Y.lootDash)],Fh);var Gh,jh=U(85515),$h=U(83267),Hh=U(4764);!function(k){k[k.Red=0]="Red",k[k.Yellow=1]="Yellow",k[k.Green=2]="Green"}(Gh||(Gh={}));let Vh=class extends j.uAl{constructor(){super(...arguments),this._characterSetupCancelablePromises=[],this._teleportingStarted=!1,this._setupId=0,this._exitAnimators=[],this._characters=[],this._characterLoadingSpinners=[],this._bannerIcons=[]}create(){super.create(),this._lootDashManager.onStateDataChanged.add(this.onStateDataChanged,this),this._charactersInitialized=new Array(this._characters.length).fill(!1),this._playerDataProvider=$h.E.createMockPlayerDataProvider()}destroy(){var k,B;this._lootDashManager.onStateDataChanged.remove(this.onStateDataChanged,this),null===(B=null===(k=this._lootDashManager.matchController)||void 0===k?void 0:k.onOpponentJoined)||void 0===B||B.remove(this.playerJoined,this),window.clearInterval(this._teleportingInterval),window.clearTimeout(this._teleportDelayTimeout),super.destroy()}onStateDataChanged(k){switch(k){case Ch.zM.FindingAMatch:this.setup(),this.setFindingAMatchElementStates();break;case Ch.zM.WaitingForPlayers:this.setWaitingForPlayersElementStates();break;case Ch.zM.MatchmakingComplete:this.setMatchmakingCompleteElementStates();break;case Ch.zM.MatchStartingSoon:this.setMatchStartingSoonState()}}setup(){this._setupId++,this.setDefaultElementStates(),this.initializeCharacterPrefab(this._characters[0],this._characterLoadingSpinners[0],this._currentPlayer.getAppearance()).catch(j.RQr.createHandler("LootDashWaitingRoomPanelComponent: Failed to load main player into the waiting room")),this._charactersInitialized[0]=!0,this.joinMatch().catch(j.RQr.createHandler("LootDashWaitingRoomPanelComponent: Failed to join a match"))}joinMatch(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this._lootDashManager.joinMatch(),this._lootDashManager.matchController.onOpponentJoined.add(this.playerJoined,this),this._lootDashManager.matchController.isQuickQuiz&&this._countdownTimer.onTimerCompleted.addOnce((()=>{this._lootDashManager.setState(Ch.zM.MatchmakingComplete)}))}))}setDefaultElementStates(){this._characters.forEach((k=>k.active=!1)),this._characterLoadingSpinners.forEach((k=>k.active=!1)),this._charactersInitialized=this._charactersInitialized.fill(!1),this._bannerIcons.forEach((k=>k.active=!1)),this._bannerIcons[Gh.Red].active=!0,this._countdownTimer.GameObject.active=!1,this._cancelButton.GameObject.active=!1,this._leaveMatchButton.GameObject.active=!1,this._bannerText.GameObject.active=!1,this._bottomText.GameObject.active=!1,this._extraPlayerCountObject.active=!1}setFindingAMatchElementStates(){this._characters.forEach((k=>k.active=!1)),this._bannerText.text=this._baseLocalizer.getText("LOOT_DASH_FINDING_MATCH"),this._bottomText.text=this._baseLocalizer.getText("LOOT_DASH_LOOKING_FOR_MATCH"),this._bannerText.GameObject.active=!0,this._bottomText.GameObject.active=!0,this._leaveMatchButton.GameObject.active=!1,this._cancelButton.GameObject.active=!this._lootDashManager.matchController.isQuickQuiz}setWaitingForPlayersElementStates(){this._bannerIcons.forEach((k=>k.active=!1)),this._bannerIcons[Gh.Yellow].active=!0,this._bannerText.text=this._baseLocalizer.getText("LOOT_DASH_MATCH_STARTS_IN"),this._bottomText.text=this._baseLocalizer.getText("LOOT_DASH_WAITING_FOR_PLAYERS"),this._cancelButton.GameObject.active=!1,this._countdownTimer.GameObject.active=!0,this._leaveMatchButton.GameObject.active=!this._lootDashManager.matchController.isQuickQuiz;const k=this._lootDashManager.config;let B=k.matchSetup.matchmakingTimeMs;if(this._lootDashManager.matchController.isQuickQuiz){const U=k.quickQuizConfigs.transportModalDurationMs;B-=Hh.w.instance().getMillisecondsSinceStart()-U,B=Math.max(B,k.quickQuizConfigs.miniumMatchmakingTimeMs)}this._countdownTimer.setCountdownTimeMS(B)}playerJoined(k,B){this._characters.forEach(((B,U)=>{U>0&&UU?(this._extraPlayerCountObject.active=!0,this._extraPlayerCountText.text="+"+(k-U)):this._extraPlayerCountObject.active=!1,B&&!this._lootDashManager.matchController.isQuickQuiz&&this._lootDashManager.setState(Ch.zM.MatchmakingComplete)}initializeCharacterPrefab(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){if(B.active=!0,k.children.length>0)return void this.setPlayerAppearance(k,B,U);const F=new j.kBN(((G,j)=>{Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.WizardInjectionConfigured,{"377-3e7b":this._playerDataProvider}).then((j=>{F.cancelled||(j.children[0].layer=jh.E.Default,j.parent=k,this.setPlayerAppearance(k,B,U)),G()})).catch(j)}));this._characterSetupCancelablePromises.push(F)}))}setPlayerAppearance(k,B,U){const F=this._setupId;k.findComponentInChildren(Ja.n).onAppearanceLoaded.add((()=>{this._teleportingStarted||(F===this._setupId?(B.active=!1,k.active=!0):k.active=!1)})),Nt.d.updateInjectedValues(k,{[hs.n7.WizardInjectionConfiguredAppearance]:U,[hs.n7.WizardInjectionConfiguredInputEnabled]:!1})}setMatchmakingCompleteElementStates(){if(this._bottomText.GameObject.active=!1,this._lootDashManager.matchController.isQuickQuiz)return void this.teleportPlayersOut();const k=this._lootDashManager.config;this._countdownTimer.setCountdownTimeMS(k.matchSetup.finalCountdownMs),this._teleportDelayTimeout=window.setTimeout(this.teleportPlayersOut.bind(this),700)}setMatchStartingSoonState(){this._bannerIcons.forEach((k=>k.active=!1)),this._bannerIcons[Gh.Green].active=!0,this._bannerText.text=this._baseLocalizer.getText("LOOT_DASH_GAME_ON"),this._bottomText.GameObject.active=!1,this._countdownTimer.GameObject.active=!1,this._leaveMatchButton.GameObject.active=!1,this._cancelButton.GameObject.active=!1}teleportPlayersOut(){const k=dt().sample([[0,1,2,3,4,5,6,7],[0,[4,1],[5,2],[6,3],7],[0,...dt().shuffle([1,2,3,4,5,6,7])],[[0,3],[4,7],[1,2],[5,6]]]);this._teleportingStarted=!0,this._teleportingInterval=window.setInterval((()=>{let B=k.shift();B=Array.isArray(B)?B:[B],B.forEach((k=>this.teleportPlayerOut(k))),0===k.length&&window.clearInterval(this._teleportingInterval)}),1e3/k.length)}teleportPlayerOut(k){if(k>0&&!this._charactersInitialized[k])return;const B=this._characters[k],U=this._exitAnimators[k];U.GameObject.active=!0,U.playAnimation(ya.rC.Exit,!1,!0),U.spine.onEvent.add(((U,F)=>{F.data.name===ya.jN.TransitionUnit&&(B.active=!1,k>0&&(this._characterLoadingSpinners[k-1].active=!1))}))}cancelMatchmaking(){this._lootDashManager.cancelMatchmaking(),this._characterSetupCancelablePromises.forEach((k=>k.cancel())),this._characterSetupCancelablePromises.length=0,window.clearInterval(this._teleportingInterval),window.clearTimeout(this._teleportDelayTimeout),this._exitAnimators.forEach((k=>{k.GameObject.active=!1,k.spine.onEvent.removeAll(),k.stopAnimation()})),this._teleportingStarted=!1}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Array)],Vh.prototype,"_exitAnimators",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Vh.prototype,"_characters",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Vh.prototype,"_characterLoadingSpinners",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Vh.prototype,"_bannerText",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Vh.prototype,"_bannerIcons",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Vh.prototype,"_bottomText",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],Vh.prototype,"_countdownTimer",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Vh.prototype,"_cancelButton",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Vh.prototype,"_leaveMatchButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Vh.prototype,"_extraPlayerCountObject",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Vh.prototype,"_extraPlayerCountText",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Vh.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("cfe-9c2c"),(0,G.Sn)("design:type",Bh.K)],Vh.prototype,"_lootDashManager",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Vh.prototype,"_baseLocalizer",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Vh.prototype,"_prefabLoader",void 0),Vh=(0,G.Cg)([(0,j.EVk)("LootDashWaitingRoomPanel",W.Y.lootDash)],Vh);var Wh,qh,Kh=U(70156);!function(k){k[k.Pet1=0]="Pet1",k[k.Pet2=1]="Pet2",k[k.Follow=2]="Follow",k[k.Mount=3]="Mount"}(Wh||(Wh={})),function(k){k.Add="ADD",k.Change="ITEM_TEXT_CHANGE"}(qh||(qh={}));const zh=[Ch.zM.LobbyDefault,Ch.zM.FindingAMatch,Ch.zM.WaitingForPlayers,Ch.zM.MatchmakingComplete,Ch.zM.MatchStartingSoon,Ch.zM.MatchStartingNow];let Yh=class extends j.uAl{constructor(){super(...arguments),this._featuredIconContainers=[],this._featuredItemSelectedIcons=[],this._featuredItemNotSelectedIcons=[],this._petTeamUniqueIds=[]}create(){super.create(),this._changePetButton.onClick.add((()=>{this.openDetailedSelection("pet")})),this._changeFollowButton.onClick.add((()=>{this.openDetailedSelection("follow")})),this._changeMountButton.onClick.add((()=>{this.openDetailedSelection("mount")})),this._lootDashManager.onStateDataChanged.add(this.onStateDataChanged,this),tt.q.instance.game.broadcaster.addAppListener(jn.H3.MembershipResponseReceived,(k=>{"success"===k&&this.setupMembershipElements()}),this)}destroy(){this._lootDashManager.onStateDataChanged.remove(this.onStateDataChanged,this),tt.q.instance.game.broadcaster.removeAppListener(jn.H3.MembershipResponseReceived,this),super.destroy()}onStateDataChanged(k,B){switch(k){case Ch.zM.LobbyDefault:this.setupMembershipElements(),this.setChangeButtonsVisibility(!0);break;case Ch.zM.FindingAMatch:case Ch.zM.WaitingForPlayers:this._getMoreRevivesButton.GameObject.active=!1,this.setChangeButtonsVisibility(!1)}zh.includes(k)&&!zh.includes(B)&&this.updatePanelContents().catch(j.RQr.createHandler("LootDashYourTeamPanelComponent: Failed to render the your team panel of the lobby"))}updatePanelContents(){return(0,G.sH)(this,void 0,void 0,(function*(){this.setupEquippedPets(),this.setupEquippedItems(),yield this.setFeaturedIconStatuses(),this.setupMembershipElements(),this._petTeamUniqueIds=this._currentPlayer.player.kennel.petTeam.filter((k=>!(k instanceof Ih.a))).map((k=>{var B;return null===(B=null==k?void 0:k.data)||void 0===B?void 0:B.uniqueID}))}))}setChangeButtonsVisibility(k){this._changePetButton.GameObject.active=k,this._changeFollowButton.GameObject.active=k,this._changeMountButton.GameObject.active=k}setFeaturedIconStatuses(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._lootDashManager.getFeaturedItemsEquippedData();k.featuredFollowOwned&&(this._featuredItemSelectedIcons[Wh.Follow].active=k.featuredFollowEquipped,this._featuredItemNotSelectedIcons[Wh.Follow].active=!k.featuredFollowEquipped),this._featuredIconContainers[Wh.Follow].active=k.featuredFollowOwned,k.featuredMountOwned&&(this._featuredItemSelectedIcons[Wh.Mount].active=k.featuredMountEquipped,this._featuredItemNotSelectedIcons[Wh.Mount].active=!k.featuredMountEquipped),this._featuredIconContainers[Wh.Mount].active=k.featuredMountOwned,0===k.numFeaturedPetsOwned?(this._featuredIconContainers[Wh.Pet1].active=!1,this._featuredIconContainers[Wh.Pet2].active=!1):(this._featuredIconContainers[Wh.Pet1].active=!0,this._featuredIconContainers[Wh.Pet2].active=!0,this._featuredItemSelectedIcons[Wh.Pet1].active=k.featuredPetEquippedInSlot1,this._featuredItemNotSelectedIcons[Wh.Pet1].active=!k.featuredPetEquippedInSlot1,this._featuredItemSelectedIcons[Wh.Pet2].active=k.featuredPetEquippedInSlot2,this._featuredItemNotSelectedIcons[Wh.Pet2].active=!k.featuredPetEquippedInSlot2,k.featuredPetEquippedInSlot1&&1===k.numFeaturedPetsOwned?this._featuredIconContainers[Wh.Pet2].active=!1:k.featuredPetEquippedInSlot2&&1===k.numFeaturedPetsOwned&&(this._featuredIconContainers[Wh.Pet1].active=!1)),k.cappedNumFeaturedItemsOwned>0?(this._featuredItemsEquippedText.text=`${k.numFeaturedItemsEquipped} / ${k.cappedNumFeaturedItemsOwned}`,this._equippedFeaturedItemsContainer.active=!0):this._equippedFeaturedItemsContainer.active=!1,0===k.cappedNumFeaturedItemsOwned&&(this._featuredItemsInfoContainer.active=!1)}))}setupEquippedPets(){const k=this._currentPlayer.player.kennel.petTeam.filter((k=>!(k instanceof Ih.a)));this.setupEquippedPet(k[0],this._petTeamUniqueIds[0],this._equippedPetLeft),this.setupEquippedPet(k[1],this._petTeamUniqueIds[1],this._equippedPetRight),k[0]&&k[1]?(this._changePetButton.text=this._baseLocalizer.getText(qh.Change),this._changePetButton.regenerateButton()):(this._changePetButton.text=this._baseLocalizer.getText(qh.Add),this._changePetButton.regenerateButton())}setupEquippedPet(k,B,U){k?(this.setupPetCard(k,U).catch(j.RQr.createHandler("LootDashYourTeamPanelComponent: Failed to render a pet card for a currently equipped pet")),U.active=!0):U.active=!1}setupPetCard(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U,F,G,j;const $=Yt.t.getItem("pet",k.data.ID);if(B.children.length>0){const G={PET_ID:k.data.ID,PET_DATA:k.data,NAME:null!==(F=null!==(U=k.data.nickname)&&void 0!==U?U:k.data.name)&&void 0!==F?F:$.data.name,LEVEL:k.data.level,MERGE_RANK:eo.P8.getPetDisplayMergeRank(k.data.ID,k.data.uniqueID),SHOW_MERGE_RANK_BADGE:eo.P8.canPetAccessMergeRanks(k.data.ID),ICON:fs.E.getIconForType("pet",k.data.ID),SHOW_ELEMENT_ICON:!0,SHOW_STAT_ICON:!1};return void Nt.d.updateInjectedValues(B,G)}const H={PET_ID:k.data.ID,PET_DATA:k.data,NAME:null!==(j=null!==(G=k.data.nickname)&&void 0!==G?G:k.data.name)&&void 0!==j?j:$.data.name,LEVEL:k.data.level,MERGE_RANK:eo.P8.getPetDisplayMergeRank(k.data.ID,k.data.uniqueID),SHOW_MERGE_RANK_BADGE:eo.P8.canPetAccessMergeRanks(k.data.ID),ICON:fs.E.getIconForType("pet",k.data.ID),SHOW_UPGRADE:!1,SHOW_EVOLVE:!1,SHOW_ON_TEAM:!1,SHOW_GUIDE_HAND:!1,INPUT_ENABLED:!1,SHOW_ELEMENT_ICON:!0,SHOW_STAT_ICON:!1},V=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.OwnedPetCardInjectionConfiguredMergeRank,H);if(B.isDestroyed)return void V.destroy();const W=V.transform;W.setPivot(.5,.5),W.setAnchorMin(0,0),W.setAnchorMax(0,0),V.name=`pet-${k.data.ID}`,V.parent=B}))}setupEquippedItems(){const k=this._currentPlayer.player.equipment.getFollow();this.setupEquippedItem(k,"follow",this._equippedFollowContainer,this._changeFollowButton,this._followImageItemDataLoader);const B=this._currentPlayer.player.equipment.getMount();this.setupEquippedItem(B,"mount",this._equippedMountContainer,this._changeMountButton,this._mountImageItemDataLoader)}setupEquippedItem(k,B,U,F,G){j.Aq$.isDefined(k)?(G.setAsset(k,B).catch(j.RQr.createHandler(`LootDashYourTeamPanelComponent: Failed to render the equipped ${B}`)),U.active=!0,F.text=this._baseLocalizer.getText(qh.Change),F.regenerateButton()):j.Aq$.isDefined(k)||(U.active=!1,F.text=this._baseLocalizer.getText(qh.Add),F.regenerateButton())}setupMembershipElements(){const k=this._lootDashManager.getNumberOfStartingRevives();this._reviveCountText.text=k===Kh.eA?"∞":`x${k}`;const B=this._currentPlayer.getMembershipUpsell().tier;B!==xs._$.MemberUltimateMath&&B!==xs._$.MemberUltimateBundle?this._getMoreRevivesButton.GameObject.active=!0:this._getMoreRevivesButton.GameObject.active=!1}openDetailedSelection(k){switch(k){case"pet":this._lootDashManager.setState(Ch.zM.SelectPets);break;case"follow":this._lootDashManager.setState(Ch.zM.SelectFollows);break;case"mount":this._lootDashManager.setState(Ch.zM.SelectMounts)}}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yh.prototype,"_equippedPetLeft",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yh.prototype,"_equippedPetRight",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Yh.prototype,"_changePetButton",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Yh.prototype,"_changeFollowButton",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Yh.prototype,"_changeMountButton",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Yh.prototype,"_getMoreRevivesButton",void 0),(0,G.Cg)([(0,j.MnK)(os.X),(0,G.Sn)("design:type",os.X)],Yh.prototype,"_followImageItemDataLoader",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yh.prototype,"_equippedFollowContainer",void 0),(0,G.Cg)([(0,j.MnK)(os.X),(0,G.Sn)("design:type",os.X)],Yh.prototype,"_mountImageItemDataLoader",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yh.prototype,"_equippedMountContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yh.prototype,"_equippedFeaturedItemsContainer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Yh.prototype,"_featuredItemsEquippedText",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Yh.prototype,"_featuredIconContainers",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Yh.prototype,"_featuredItemSelectedIcons",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Yh.prototype,"_featuredItemNotSelectedIcons",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yh.prototype,"_featuredItemsInfoContainer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Yh.prototype,"_reviveCountText",void 0),(0,G.Cg)([(0,j.Cdj)("cfe-9c2c"),(0,G.Sn)("design:type",Bh.K)],Yh.prototype,"_lootDashManager",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Yh.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Yh.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Yh.prototype,"_baseLocalizer",void 0),Yh=(0,G.Cg)([(0,j.EVk)("LootDashYourTeamPanel",W.Y.lootDash)],Yh);let Qh=class extends j.uAl{create(){this._lootDashManager.onStateDataChanged.add(this.onStateDataChanged,this)}destroy(){this._lootDashManager.onStateDataChanged.remove(this.onStateDataChanged,this),super.destroy()}onStateDataChanged(k){switch(k){case Ch.zM.LobbyDefault:this.yourTeamPanel.GameObject.active=!0,this.findAMatchPanel.GameObject.active=!0,this.waitingRoomPanel.GameObject.active=!1;break;case Ch.zM.FindingAMatch:this.yourTeamPanel.GameObject.active=!0,this.findAMatchPanel.GameObject.active=!1,this.waitingRoomPanel.GameObject.active=!0}}};(0,G.Cg)([(0,j.MnK)(Yh),(0,G.Sn)("design:type",Yh)],Qh.prototype,"yourTeamPanel",void 0),(0,G.Cg)([(0,j.MnK)(Fh),(0,G.Sn)("design:type",Fh)],Qh.prototype,"findAMatchPanel",void 0),(0,G.Cg)([(0,j.MnK)(Vh),(0,G.Sn)("design:type",Vh)],Qh.prototype,"waitingRoomPanel",void 0),(0,G.Cg)([(0,j.Cdj)("cfe-9c2c"),(0,G.Sn)("design:type",Bh.K)],Qh.prototype,"_lootDashManager",void 0),Qh=(0,G.Cg)([(0,j.EVk)("LootDashLobbyController",W.Y.lootDash)],Qh);let Xh=class extends j.uAl{constructor(){super(...arguments),this._screens={}}create(){super.create(),this._classCodeButton.onClick.add(this.openClassCodePopup.bind(this)),this.resetMenuToDefault(),this.loadScreen(Ch.mz.Lobby).then((()=>{this._lootDashManager.onStateDataChanged.add(this.onLootDashStateChanged,this),this._lootDashManager.immediateStart?this._lootDashManager.setState(Ch.zM.FindingAMatch):(this._lootDashManager.setState(Ch.zM.LobbyDefault),this._closeButton.GameObject.active=!0)})).catch(j.RQr.createHandler("LootDashMenuControllerComponent: Error loading initial lobby screen"))}destroy(){Object.keys(this._screens).forEach((k=>{null===this._screens[k].parent&&this._screens[k].destroy()})),this._lootDashManager.onStateDataChanged.remove(this.onLootDashStateChanged,this),this._classCodeButton.onClick.removeAll(),super.destroy()}onLootDashStateChanged(k,B){if(k!==B)switch(k){case Ch.zM.LobbyDefault:this.resetMenuToDefault(),this._closeButton.GameObject.active=!0,this.loadScreen(Ch.mz.Lobby).catch(j.RQr.createHandler("LootDashMenuControllerComponent: Error loading lobby screen"));break;case Ch.zM.SelectPets:this._headerText.text=Ch.Ns.ChooseAPet,this._closeButton.GameObject.active=!1,this._backButton.GameObject.active=!0,this.loadScreen(Ch.mz.DetailedSelection,"pet").catch(j.RQr.createHandler("LootDashMenuControllerComponent: Error loading pet selection screen"));break;case Ch.zM.SelectFollows:this._headerText.text=Ch.Ns.ChooseABuddy,this._closeButton.GameObject.active=!1,this._backButton.GameObject.active=!0,this.loadScreen(Ch.mz.DetailedSelection,"follow").catch(j.RQr.createHandler("LootDashMenuControllerComponent: Error loading follow selection screen"));break;case Ch.zM.SelectMounts:this._headerText.text=Ch.Ns.ChooseAMount,this._closeButton.GameObject.active=!1,this._backButton.GameObject.active=!0,this.loadScreen(Ch.mz.DetailedSelection,"mount").catch(j.RQr.createHandler("LootDashMenuControllerComponent: Error loading mount selection screen"));break;case Ch.zM.FindingAMatch:case Ch.zM.WaitingForPlayers:this._headerText.text=Ch.Ns.LootDash,this._closeButton.GameObject.active=!1,this._backButton.GameObject.active=!1,this._classCodeButton.GameObject.active=!1;break;case Ch.zM.MatchStartingNow:this.gameObject.destroy();break;case Ch.zM.MatchEndedByServer:this._closeButton.onEnabledClick.dispatch(),this.OnDestroy.addOnce((()=>{tt.q.instance.prodigy.gameContainer.get("fc2-cb0a").handleQuizExitFlowComplete()}))}}resetMenuToDefault(){this._headerText.text=Ch.Ns.LootDash,this._closeButton.GameObject.active=!1,this._backButton.GameObject.active=!1,this._backButton.onClick.removeAll(),this._backButton.onClick.addOnce((()=>{this._lootDashManager.setState(Ch.zM.LobbyDefault)})),this.updateClassCodeButtons().catch(j.RQr.createHandler("LootDashMenuControllerComponent: Error updating class code buttons"))}loadScreen(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B="pet"){switch(this._loadingScreen.active=!0,this._headerInputBlocker.active=!0,Object.keys(this._screens).forEach((B=>{this._screens[B]&&B!==k&&(this._screens[B].active=!1,this._screens[B].parent=null)})),k){case Ch.mz.Lobby:yield this.openLobbyScreen();break;case Ch.mz.DetailedSelection:yield this.openDetailedSelectionScreen(B)}this._loadingScreen.active=!1,this._headerInputBlocker.active=!1}))}openLobbyScreen(){return(0,G.sH)(this,void 0,void 0,(function*(){this._screens[Ch.mz.Lobby]||(this._screens[Ch.mz.Lobby]=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.LootDashLobby,{"377-3e7b":$h.E.createMockPlayerDataProvider()}));const k=this._screens[Ch.mz.Lobby];k.parent=this._screenContainer,k.active=!0}))}openDetailedSelectionScreen(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(!Ch.Mh.includes(k))throw new Error(`LootDashMenuControllerComponent: Invalid item type for detailed selection: ${k}`);this._screens[Ch.mz.DetailedSelection]||(this._screens[Ch.mz.DetailedSelection]=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.LootDashDetailedSelectionScreen,{}));const B=this._screens[Ch.mz.DetailedSelection];B.parent=this._screenContainer,B.active=!0;const U=B.findComponentInChildren(Uh);yield U.setup(k)}))}openClassCodePopup(){tt.q.instance.prodigy.open.prefabMenu(Rt.l.ClassCodePopup,void 0,void 0,void 0,void 0,{[hs.iu.ClassCodeSubmitSuccess]:this.updateClassCodeButtons.bind(this)})}updateClassCodeButtons(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F;if(this._lootDashManager.immediateStart)return void(this._classCodeButton.GameObject.active=!1);const G=tt.q.instance.prodigy.gameContainer.get("c97-bd0d"),j=null===(F=null===(U=null===(B=null===(k=yield G.getCurrentClassCode())||void 0===k?void 0:k.data)||void 0===B?void 0:B.player)||void 0===U?void 0:U.currentClassroom)||void 0===F?void 0:F.code;j?(this._classCodeButton.text=`${this._baseLocalizer.getText("CLASS_CODE_TITLE")} ${j}`,this._classCodeButton.regenerateButton(),this._classCodeButton.GameObject.active=!0):this._classCodeButton.GameObject.active=!0}))}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Xh.prototype,"_headerText",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Xh.prototype,"_backButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Xh.prototype,"_closeButton",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Xh.prototype,"_classCodeButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Xh.prototype,"_loadingScreen",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Xh.prototype,"_screenContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Xh.prototype,"_headerInputBlocker",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Xh.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("cfe-9c2c"),(0,G.Sn)("design:type",Bh.K)],Xh.prototype,"_lootDashManager",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Xh.prototype,"_baseLocalizer",void 0),Xh=(0,G.Cg)([(0,j.EVk)("LootDashMenuController",W.Y.lootDash)],Xh);let Zh=class extends j.uAl{constructor(){super(...arguments),this.onStateChange=new j.HN0,this.onBattleDataChanged=new j.HN0}create(){super.create(),this._lootDashManager.onStateDataChanged.add(this.onStateChange.dispatch),this._lootDashManager.matchController.onBattleDataChanged.add(this.onBattleDataChanged.dispatch)}destroy(){this.onStateChange.dispose(),this.onBattleDataChanged.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("cfe-9c2c"),(0,G.Sn)("design:type",Bh.K)],Zh.prototype,"_lootDashManager",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Zh.prototype,"onStateChange",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Zh.prototype,"onBattleDataChanged",void 0),Zh=(0,G.Cg)([(0,j.EVk)("LootDashStateData",W.Y.lootDash)],Zh);U(67844),U(21573),U(22162),U(25735),U(99332),U(39258),U(27314);let Jh=class extends j.uAl{constructor(){super(...arguments),this._header=null,this._counters=[]}get header(){return this._header.TextObject.text}set header(k){this._header.text=k}setOccupants(k,B){B&&B.length>-1&&(this.header=k.getText(Yi.D.TT_ROOMMATES,B.length),this.setLevelCounts(B))}setLevelCounts(k){const B=new Map;k.forEach((k=>{let U=B.get(k);j.Aq$.isDefined(U)?U++:U=1,B.set(k,U)}));for(let U=0;Uj.Aq$.isDefined(k.type))).map((k=>{var B,U;return{itemId:null!==(B=k.ID)&&void 0!==B?B:1,itemType:k.type,quantity:null!==(U=k.N)&&void 0!==U?U:1,isSecure:k.isSecure}}));if(this._memberJarController.isJarFull(B))return this._cachedPendingRewards=U,void this._memberJarController.showEntityUpdate(B);k.saveMemberStarsToJar();const F=yield this._memberJarNetworkHandler.updateMemberJarRewards(U);this._segment.conversionJar.sendConversionJarUpdated(Object.assign(Object.assign({},this._segment.conversionJar.memberJarUpdate(F)),{updateType:"Items Added",battleId:this._segment.postBattleFlow.getBattleId(),added:k.memberRewards,transactionId:this._segment.postBattleFlow.memberChestTransactionId})),this._memberJarController.showEntityUpdate(F)}))}redeemMemberJar(){this.isDestroyed()||this.redeemMemberJarContinue().catch(j.RQr.createHandler("Error redeeming member jar"))}redeemMemberJarContinue(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=this.GameObject.findComponentInParent(hc.D),U=xt.$.generateUID(),F=Object.assign({transaction_id:U,source_type:li.C.ConversionJar,source_id:"Member Jar"},this._gotItem.customSegmentMetadata),G=yield this._memberJarNetworkHandler.getMemberJarData(),j=cc.S.canReceiveReward();if(!j&&!this._memberJarController.isReadyToOpenJar(G))return void this.onRedeemAborted.dispatch();const $=G.savedRewards.concat(this._cachedPendingRewards).map((k=>({type:k.itemType,ID:k.itemId,N:k.quantity,isSecure:k.isSecure})));for(const Q of $)Q.isSecure?this.sendItemReceivedEvent(Q,F):Qt.J.bagItemByType(Q,tt.q.instance.game,void 0,void 0,F);let H,V=0;const W=tt.q.instance.prodigy.gameContainer.get("306-5359");if(j){W.data.storedMemberStars=0,cc.S.redeemReward();const k=dc.Q.getMemberJarDropData().memberLevelBoost.levels;$.push({type:"item",ID:252,N:k})}else{const U=null==B?void 0:B.redeemStarsThroughMemberJar();V=null!==(k=null==U?void 0:U.totalStarsAwarded)&&void 0!==k?k:0,H=null==U?void 0:U.starJarXpGained}const q=this._memberJarController.showEntityRedeem(G),K=yield this._memberJarNetworkHandler.resetMemberJarData(j);cc.S.isFeatureEnabled()||W.removeExperimentFromEligibilityList(lc.a.key),$.some((k=>rc.p.includes(k.type)))&&(yield tt.q.instance.prodigy.gameContainer.get("d69-defe").refreshPetGear()),this._segment.conversionJar.sendConversionJarUpdated(Object.assign(Object.assign({},this._segment.conversionJar.memberJarUpdate(K)),{updateType:"Items Claimed",battleId:this._segment.postBattleFlow.getBattleId(),removed:$,transactionId:U})),V>0&&$.push({type:"item",ID:177,N:V});let z=0;const Y=()=>{var k;this._gotItem.clearItems();for(let B=z;B{if(z<$.length)return Y(),void this._gotItem.awardItem();H&&(null==B||B.visuallyRedeemStarsThroughMemberJar(H)),this.onRedeemCompleted.dispatch()})),Y(),yield q,this.onRedeemSuccess.dispatch()}))}sendItemReceivedEvent(k,B){var U,F,G,j;tt.q.instance.prodigy.gameContainer.get("c47-20b6").item.sendItemReceivedEvent("gold"===k.type?0:k.ID,null!==(G=null===(F=null===(U=Yt.t.getItem(k.type,k.ID))||void 0===U?void 0:U.data)||void 0===F?void 0:F.name)&&void 0!==G?G:"unknown",k.type,null!==(j=k.N)&&void 0!==j?j:1,B)}destroy(){this.onRedeemSuccess.dispose(),this.onRedeemAborted.dispose(),this.onRedeemCompleted.dispose(),this.onUpdateComplete.dispose(),super.destroy()}isDestroyed(){return!this.GameObject||this.GameObject.isDestroyed}};(0,G.Cg)([(0,j.Cdj)("097-a053"),(0,G.Sn)("design:type",nc.S)],uc.prototype,"_memberJarNetworkHandler",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],uc.prototype,"_segment",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uc.prototype,"onUpdateComplete",void 0),(0,G.Cg)([(0,j.MnK)(sc.P),(0,G.Sn)("design:type",sc.P)],uc.prototype,"_memberJarController",void 0),(0,G.Cg)([(0,j.Pqz)(oc.f),(0,G.Sn)("design:type",oc.f)],uc.prototype,"_gotItem",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uc.prototype,"onRedeemSuccess",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uc.prototype,"onRedeemCompleted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uc.prototype,"onRedeemAborted",void 0),uc=(0,G.Cg)([(0,j.EVk)("MemberJarUpdate",W.Y.membership)],uc);let fc=class extends j.PQK{installBindings(){this.Container.bind("MEMBERS_GET_SEVEN_LEVELS_FEATURE_ENABLED").toConstantValue(cc.S.isFeatureEnabled());const k=cc.S.isEligibleForFeature();this.Container.bind("MEMBERS_GET_SEVEN_LEVELS_ENABLED").toConstantValue(k);const B=dc.Q.getMemberJarDropData().memberLevelBoost.levels,U=tt.q.instance.prodigy.gameContainer.get("306-5359").getLevel();this.Container.bind("MEMBERS_GET_SEVEN_LEVELS_PLAYER_LEVEL_CURRENT").toConstantValue(U),this.Container.bind("MEMBERS_GET_SEVEN_LEVELS_PLAYER_LEVEL_NEW").toConstantValue(U+B)}};fc=(0,G.Cg)([(0,j.Og1)("MembersGetSevenLevelsInstaller","Installer")],fc);var bc,pc=U(63731),vc=U(65068),gc=U(39144),mc=U(93054);function yc(k){const{text:B,progress:U}=k;return oh.A.isDefined(U)?{bannerType:Rt.l.ProgressBanner,text:B,progress:U}:{bannerType:Rt.l.GuidanceBanner,text:B}}let _c=bc=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.objectiveTypes=[],this._objectiveBannerMap=new Map}static isGuideHandActive(){return bc._guideHandActive}postCreate(){this.init()}destroy(){var k;this._objectiveBannerMap.forEach((k=>this._bannerQueueManager.deleteBanner(k))),null===(k=this._lastUsedGuideHand)||void 0===k||k.despawnGuideHand(),super.destroy()}init(){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.game.broadcaster.addAppListener(jn.n8.FactoryMenuClosed,(()=>{this.updateObjectives().catch(j.RQr.createHandler("Could not get latest objectives"))}),this),tt.q.instance.game.broadcaster.addAppListener(jn.GR.ObjectiveUpdated,(()=>{this.updateObjectives().catch(j.RQr.createHandler("Could not get latest objectives"))}),this);const k=yield this.getObjectives();for(const B of k)this.createBannerForObjective(B);this.createGuideHand(k)}))}getObjectives(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;return null===(k=this._objectiveLog)||void 0===k?void 0:k.getObjectives({types:this.objectiveTypes})}))}updateObjectives(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this.getObjectives();this.updateObjectiveBanners(k),this.createGuideHand(k)}))}createBannerForObjective(k){const B=yc(k),U=this._bannerQueueManager.postBanner(B);this._objectiveBannerMap.set(k.id,U)}updateObjectiveBanners(k){if(this.gameObject.isDestroyed)return;const B=k.map((({id:k})=>k)),U=[];for(const[F,G]of this._objectiveBannerMap.entries())B.includes(F)||(U.push(G),this._objectiveBannerMap.delete(F));U.forEach((k=>this._bannerQueueManager.deleteBanner(k)));for(const F of k)this._objectiveBannerMap.has(F.id)?this._bannerQueueManager.updateBanner(this._objectiveBannerMap.get(F.id),yc(F)):this.createBannerForObjective(F)}createGuideHand(k){var B;if(this.gameObject.isDestroyed)return;const U=k.find((k=>oh.A.isDefined(k.location)||oh.A.isDefined(k.guideHand)));oh.A.isDefined(null==U?void 0:U.guideHand)&&U.guideHand.targetMapTag===tt.q.instance.prodigy.world.getCurrentMap()?this.guideHandFromData(U):oh.A.isDefined(null==U?void 0:U.location)?this.guideHandFromLocation(U):(null===(B=this._lastUsedGuideHand)||void 0===B||B.despawnGuideHand(),bc._guideHandActive=!1)}guideHandFromLocation(k){var B,U,F,G;if(!oh.A.isDefined(k.location))return;const $=[k.location],H=mc.P.getTargetMapsFromLocations($),V=mc.P.findShortestPathsToAllOf(tt.q.instance.prodigy.world.getCurrentMap(),H);if(V.length>0){V.sort(((k,B)=>k.length-B.length));const k=V[0],$=k.length>1?k[1]:"";if(null!==(U=null===(B=j.wa5.getActiveScene())||void 0===B?void 0:B.container.get("IS_PREFAB_MAP"))&&void 0!==U&&U)this._lastUsedGuideHand=mc.P.manageTeleportTriggerGuideHands($);else{(null!==(G=null===(F=tt.q.instance.prodigy.world.getCurrentMapObject())||void 0===F?void 0:F.guideHandData)&&void 0!==G?G:[]).forEach((k=>{k.targetMapTag===$&&(this.guideHandSpawner.angle=k.angle,this.guideHandSpawner.spawnGuideHand(k.position,"").catch(j.RQr.createHandler("Failed to spawn guide hand")),this._lastUsedGuideHand=this.guideHandSpawner)}))}bc._guideHandActive=!0}}guideHandFromData(k){var B,U;if(!oh.A.isDefined(k.guideHand))return;this.guideHandSpawner.angle=k.guideHand.angle,this.guideHandSpawner.spawnGuideHand(k.guideHand.position,"").catch(j.RQr.createHandler("Failed to spawn guide hand")),this._lastUsedGuideHand=this.guideHandSpawner,bc._guideHandActive=!0;null!==(U=null===(B=j.wa5.getActiveScene())||void 0===B?void 0:B.container.get("IS_PREFAB_MAP"))&&void 0!==U&&U&&mc.P.despawnTeleportTriggerGuideHands()}};(0,G.Cg)([(0,j.SZi)(),(0,j.gfw)(vc.q),(0,G.Sn)("design:type",Array)],_c.prototype,"objectiveTypes",void 0),(0,G.Cg)([(0,j.MnK)(gc.P),(0,G.Sn)("design:type",gc.P)],_c.prototype,"guideHandSpawner",void 0),(0,G.Cg)([(0,j.Cdj)("e9c-fde5"),(0,G.Sn)("design:type",pc.Z)],_c.prototype,"_objectiveLog",void 0),(0,G.Cg)([(0,j.Cdj)("dce-fce4"),(0,G.Sn)("design:type",qi.Z)],_c.prototype,"_bannerQueueManager",void 0),_c=bc=(0,G.Cg)([(0,j.EVk)("CurrentObjectiveControllerComponent")],_c);let Ec=class extends j.uAl{constructor(){super(...arguments),this.tierTextComponents=[],this.defaultTierValues=[]}postCreate(){super.postCreate(),this.setTiers(this.defaultTierValues)}setTiers(k){for(let B=0;B{tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:Is.k.ParentGoalTrackerNotAttached,destinationName:"parent_goal_attach_modal",elementType:"parent_goal",interfaceType:ui.Wm.Modal,interfaceName:us.B.ParentGoalsTracker,saveClickInfo:Is.k.ParentGoalTrackerNotAttached}),tt.q.instance.prodigy.open.parentAttachMenu(null,Is.k.ParentGoalTrackerNotAttached,us.B.ParentGoalAttachModal,{SEGMENT_QR_CODE_NAME:Oc.ParentGoalAttachment})})))}exit(){this.parts.button.GameObject.active=!1,super.exit()}}function xc(k){var B;if(!k)return void Lc(Rt.l.ParentGoalStatusDialogNoGoal);const U=null===(B=k.rewards)||void 0===B?void 0:B[0],F=U?{id:U.ID,type:U.type,N:U.N,L:U.L,cost:U.cost,data:U.data,receivedThroughGotItemFlow:!0}:null,G={[hs.Tl.Data]:F};k.progress>=k.target?Lc(Rt.l.ParentGoalStatusDialogComplete,Object.assign({},G)):Lc(Rt.l.ParentGoalStatusDialogInProgress,Object.assign(Object.assign({},G),{promptLabelArgs:[k.target],completionLabelArgs:[k.progress,k.target],completionRatio:k.progress/k.target}))}function Lc(k,B){return tt.q.instance.prodigy.open.prefabMenu(k,void 0,!1,!0,!1,B,void 0,void 0,void 0,void 0,!0)}class kc extends Mc{constructor(){super(...arguments),this.onGoalAcquired=new j.HN0}enter(){super.enter(),this.parts.button.GameObject.active=!0,this.parts.notificationIndicator.active=!1,this.parts.spineButton.playAnimation("idle-nogoal",!0),this.destroyOnExit(this.parts.button.onEnabledClick.add((()=>{tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:Is.k.ParentGoalTrackerNoGoal,destinationName:"parent_goal_need_goal_modal",elementType:"parent_goal",interfaceType:ui.Wm.Modal,interfaceName:us.B.ParentGoalsTracker}),xc(null)}))),this.destroyOnExit(this.parts.dataProvider.onChange.add((k=>{k&&this.onGoalAcquired.dispatch()})))}exit(){this.parts.button.GameObject.active=!1,super.exit()}dispose(){this.onGoalAcquired.dispose(),super.dispose()}}class Bc extends Mc{constructor(){super(...arguments),this.onGoalCompleted=new j.HN0}enter(){super.enter(),this.parts.button.GameObject.active=!0,this.parts.progress.GameObject.active=!0,this.destroyOnExit(this.parts.button.onEnabledClick.add((()=>{const k=tt.q.instance.prodigy.gameContainer.get("c47-20b6"),B=this.parts.dataProvider.goal.progress>=this.parts.dataProvider.goal.target;k.featureCommon.sendButtonEvent({buttonName:B?Is.k.ParentGoalTrackerNeedReward:Is.k.ParentGoalTrackerInProgress,destinationName:B?"parent_goal_need_reward_modal":"parent_goal_status_modal",elementType:"parent_goal",interfaceType:ui.Wm.Modal,interfaceName:us.B.ParentGoalsTracker}),xc(this.parts.dataProvider.goal)}))),this.destroyOnExit(this.parts.dataProvider.onChange.add((()=>this.refresh()))),setTimeout(this.refresh.bind(this,!0),Bc.PROGRESS_BAR_INITIAL_WAIT_MS)}exit(){this.parts.progress.GameObject.active=!1,this.parts.button.GameObject.active=!1,super.exit()}dispose(){this.onGoalCompleted.dispose(),super.dispose()}refresh(k=!1){if(!this.parts.dataProvider.goal)return void this.onGoalCompleted.dispatch();const{progress:B,target:U,isComplete:F}=this.parts.dataProvider.goal;this.parts.notificationIndicator.active=0===B||B>=U;const G=this.parts.progress.getFillValue();let j=B/U;const $=j-G;$>0&&$this.onGoalCompleted.dispatch()))):G=U?this.parts.spineButton.playAnimation("fill-complete",!1):this.parts.spineButton.playAnimation("fill",!1,!0):this.parts.spineButton.playAnimation("idle-inprogress",!0)}}Bc.PROGRESS_BAR_INITIAL_WAIT_MS=150,Bc.MINIMUM_NORMALIZED_INCREMENT=.05;class Uc extends Mc{constructor(){super(...arguments),this.onGoalClaimed=new j.HN0,this._bounceTimeout=null}enter(){super.enter(),this.parts.button.GameObject.active=!0,this.parts.progress.GameObject.active=!0,this.parts.notificationIndicator.active=!0,this.playInitialAnimations(),this.destroyOnExit(this.parts.button.onEnabledClick.add((()=>{tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:Is.k.ParentGoalTrackerCollectReward,destinationName:"parent_goal_collect_reward",elementType:"parent_goal",interfaceType:ui.Wm.Modal,interfaceName:us.B.ParentGoalsTracker,saveClickInfo:Is.k.ParentGoalTrackerCollectReward}),this.parts.dataProvider.claimAllRewards()}))),this.destroyOnExit(this.parts.dataProvider.onChange.add((k=>{(null==k?void 0:k.isComplete)||this.onGoalClaimed.dispatch()})))}playAndSetupBounce(){this.parts.spineButton.playAnimation("gift-bounce",!1,!0),this._bounceTimeout=window.setTimeout(this.playAndSetupBounce.bind(this),Qe.o.integerInRange(Uc.BOUNCE_ANIMATION_REFRESH_MIN_MS,Uc.BOUNCE_ANIMATION_REFRESH_MAX_MS))}playInitialAnimations(){this.parts.progress.setValue(1,!1),this.parts.spineButton.playAnimation("idle-complete-gift",!0),this.parts.spineButtonBacking.GameObject.active=!0,this.parts.spineButtonBacking.playAnimation("idle-complete-glow",!0),this._bounceTimeout=window.setTimeout(this.playAndSetupBounce.bind(this),Qe.o.integerInRange(Uc.BOUNCE_ANIMATION_REFRESH_MIN_MS,Uc.BOUNCE_ANIMATION_REFRESH_MAX_MS))}exit(){this.parts.button.GameObject.active=!1,this.parts.progress.GameObject.active=!1,this.parts.notificationIndicator.active=!1,this.parts.spineButtonBacking.GameObject.active=!1,this.disposeBounceTimeout(),super.exit()}dispose(){this.onGoalClaimed.dispose(),this.disposeBounceTimeout(),super.dispose()}disposeBounceTimeout(){j.Aq$.isDefined(this._bounceTimeout)&&(clearTimeout(this._bounceTimeout),this._bounceTimeout=null)}}Uc.BOUNCE_ANIMATION_REFRESH_MIN_MS=2e3,Uc.BOUNCE_ANIMATION_REFRESH_MAX_MS=5e3;let Fc=class extends j.uAl{constructor(){super(...arguments),this._states=[],this._current=null,this._bindings=[]}create(){super.create(),this._noGoalButton.GameObject.active=!1,this._goalDetailButton.GameObject.active=!1,this._notificationIndicator.active=!1,this._goalProgress.GameObject.active=!1;const k=tt.q.instance.prodigy.gameContainer,B=k.get(Pc.Y),U=k.get("e20-0fb0"),F={dataProvider:B,button:this._noGoalButton,progress:this._goalProgress,notificationIndicator:this._notificationIndicator,spineButton:this._buttonSpine,spineButtonBacking:this._buttonSpineBacking},G={dataProvider:B,button:this._goalDetailButton,progress:this._goalProgress,notificationIndicator:this._notificationIndicator,spineButton:this._buttonSpine,spineButtonBacking:this._buttonSpineBacking};this._buttonSpineBacking.GameObject.active=!1;const j=new Nc(F),$=new kc(F),H=new Bc(G),V=new Uc(G);this._states.push(j,$,H,V);const W=()=>this.setState((()=>{if(!U.hasParentLinkedEmail())return j;const k=B.goal;return k?k.isComplete?V:H:$})());this._bindings.push($.onGoalAcquired.add(W),H.onGoalCompleted.add(W),V.onGoalClaimed.add(W)),B.refresh();tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:us.B.ParentGoalsTracker,interfaceType:ui.Wm.Menu,originType:ui.$N.AutoSurfaced,eventName:"interface_opened"}),W()}destroy(){for(const k of this._bindings)k.destroy();for(const k of this._states)k.dispose();super.destroy()}setState(k){var B;if(!k)throw new Error("Cannot transition to null state");null===(B=this._current)||void 0===B||B.exit(),this._current=k,this._current.enter()}};(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Fc.prototype,"_noGoalButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Fc.prototype,"_goalDetailButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Fc.prototype,"_notificationIndicator",void 0),(0,G.Cg)([(0,j.MnK)(ys.z),(0,G.Sn)("design:type",ys.z)],Fc.prototype,"_goalProgress",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],Fc.prototype,"_buttonSpine",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],Fc.prototype,"_buttonSpineBacking",void 0),Fc=(0,G.Cg)([(0,j.EVk)("ParentGoalTracker",W.Y.ui)],Fc);var Gc=U(46168),jc=U(16815),$c=U(8770);const Hc=Object.assign(Object.assign({},$c.Hh),{Unequipped:16774111}),Vc={[io.E.Legendary]:16777215,[io.E.Heroic]:16777215,[io.E.Rare]:16777215,[io.E.Uncommon]:16777215,[io.E.Common]:16777215,Unequipped:14732719};let Wc=class extends j.uAl{get creatureData(){var k,B,U,F;return null!==(k=this._creatureData)&&void 0!==k?k:this._parentCard instanceof jc.Z?null===(B=this._parentCard)||void 0===B?void 0:B.displayedCreature:null===(F=null===(U=this._parentCard)||void 0===U?void 0:U.creatureData)||void 0===F?void 0:F[0]}set creatureData(k){this._creatureData=k,this.isCreated&&this.onUpdateCard()}constructor(){super(),this._parentCard=null,this._kennel=this._playerData.player.kennel}create(){var k;super.create(),this.gameObject.active=!1,this._parentCard=this.GameObject.findComponentInParent(Gc.Q)||this.GameObject.findComponentInParent(jc.Z),null===(k=this._parentCard)||void 0===k||k.onUpdateDisplay.add(this.onUpdateCard.bind(this)),!this._parentCard&&this.creatureData&&this.onUpdateCard()}onUpdateCard(){var k,B,U;if(null===(k=this._parentCard)||void 0===k?void 0:k.containsPlayer)return void(this.gameObject.active=!1);if(!this.hasPetGearAvailable())return void(this.gameObject.active=!1);this.gameObject.active=!0;const F=this.creatureData;this.applyGearToIndicator(null===(B=null==F?void 0:F.gear)||void 0===B?void 0:B.petHat,this._indicatorHat),this.applyGearToIndicator(null===(U=null==F?void 0:F.gear)||void 0===U?void 0:U.petRelic,this._indicatorRelic)}fetchGearInfo(k,B){tt.q.instance.prodigy.gameContainer.get("d69-defe").getPetGearByUniqueId(k).then(B).catch((k=>{j.VyI.log(`[PetGearEquipStatusIndicator] Error setting indicator ${JSON.stringify(k)}`,j.$bb.Error)}))}hasPetGearAvailable(){const k=this.creatureData,B=this._kennel.petCanEquipGearType(k.ID,"petHat"),U=this._kennel.petCanEquipGearType(k.ID,"petRelic");return B||U}setIndicator(k,B){const U=k.findChildByName("Background"),F=k.findChildByName("Icon"),G=U.findComponent(j.vYh),$=F.findComponent(j.vYh),H=()=>G.tint=Hc[B],V=()=>$.tint=Vc[B];G.isCreated?H():G.onRootContainerSet.addOnce(H),$.isCreated?V():$.onRootContainerSet.addOnce(V)}applyGearToIndicator(k,B){this.setIndicator(B,"Unequipped"),k&&this.fetchGearInfo(k,(k=>{const U=Yt.t.getItem(k.data.asset.type,k.data.asset.id);this.setIndicator(B,U.data.rarity)}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Wc.prototype,"_playerData",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Wc.prototype,"_indicatorHat",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Wc.prototype,"_indicatorRelic",void 0),Wc=(0,G.Cg)([(0,j.EVk)("PetGearEquipStatusIndicator",W.Y.uiPetGear),(0,G.Sn)("design:paramtypes",[])],Wc);U(52382),U(9195);var qc=U(95913);const Kc={petHat:"PETGEAR_CATEGORY_PET_HAT",petRelic:"PETGEAR_CATEGORY_PET_RELIC"},zc={hp:"PETGEAR_BONUS_HP",power:"PETGEAR_BONUS_POWER",defence:"PETGEAR_BONUS_DEFENCE",speed:"PETGEAR_BONUS_SPEED"};let Yc=class extends Fi.z{constructor(){super(...arguments),this.onSelect=new j.HN0}create(){super.create(),this._bindOnCreate&&this.bindContext()}destroy(){this.onSelect.dispose(),this.unbindContext(),super.destroy()}bindContext(){var k,B,U,F;const G=this._context.Container.get(hs._R.PetGearItemData);if(!j.Aq$.isDefined(G))return void this.clearInfo();const $=Yt.t.getItem(G.data.asset.type,G.data.asset.id),H=null!==(B=null===(k=$.data)||void 0===k?void 0:k.rarity)&&void 0!==B?B:io.E.Common;let V;this._context.Container.rebind(hs._R.PetGearItemName).toConstantValue(Qt.J.getLocalizationNameKey($)),this._context.Container.rebind(hs._R.PetGearFlavourText).toConstantValue(Qt.J.getLocalizationFlavorKey($)),this._context.Container.rebind(hs._R.PetGearItemRarityLabel).toConstantValue(Qt.J.convertRarityToText(H)),this._context.Container.rebind(hs._R.PetGearItemRarity).toConstantValue(H),this._context.Container.rebind(hs._R.PetGearCategoryLabel).toConstantValue(Kc[G.data.asset.type]);let W=0;if(Object.entries(null!==(F=null===(U=$.data)||void 0===U?void 0:U.stats)&&void 0!==F?F:{}).forEach((([k,B])=>{B>W&&(W=B,V=k)})),V){this._context.Container.rebind(hs._R.PetGearBonusStatEnabled).toConstantValue(!0);const k=Yt.t.getItem("pet",this._petData.ID),B=eo.P8.getPetChargedLevelCumulative(this._petData),U=eo.P8.getBattleStats(k,B,this._petData.uniqueID);this._context.Container.rebind(hs._R.PetGearBonusStatAppliedAmount).toConstantValue(U[V]),this._context.Container.rebind(hs._R.PetGearBonusStatIcon).toConstantValue([Ve._.Ui_postbattle_json,qc.BV[V]]),this._context.Container.rebind(hs._R.PetGearBonusStatTextKey).toConstantValue(zc[V]),this._context.Container.rebind(hs._R.PetGearBonusStatAmountText).toConstantValue(`+${W}`)}else this._context.Container.rebind(hs._R.PetGearBonusStatEnabled).toConstantValue(!1);this.gameObject.findComponentsInChildren(Lo.B).forEach((k=>k.consume())),this.onSelect.dispatch(!0)}unbindContext(){this._context.Container.rebind(hs._R.PetGearFlavourText).toConstantValue(null),this._context.Container.rebind(hs._R.PetGearItemRarityLabel).toConstantValue(null),this._context.Container.rebind(hs._R.PetGearItemRarity).toConstantValue(null),this._context.Container.rebind(hs._R.PetGearCategoryLabel).toConstantValue(null),this._context.Container.rebind(hs._R.PetGearBonusStatEnabled).toConstantValue(!0),this._context.Container.rebind(hs._R.PetGearBonusStatAppliedAmount).toConstantValue(null),this._context.Container.rebind(hs._R.PetGearBonusStatIcon).toConstantValue(null),this._context.Container.rebind(hs._R.PetGearBonusStatTextKey).toConstantValue(null),this._context.Container.rebind(hs._R.PetGearBonusStatAmountText).toConstantValue(null),this.gameObject.findComponentsInChildren(Lo.B).forEach((k=>k.consume())),this.gameObject.active=!1}setGearItem(k){j.Aq$.isDefined(k)?(this._context.Container.rebind(hs._R.PetGearItemData).toConstantValue(k),this.bindContext()):this.clearInfo()}clearInfo(){this._context.Container.rebind(hs._R.PetGearItemName).toConstantValue("PETGEAR_NO_GEAR_SELECTED"),this._context.Container.rebind(hs._R.PetGearFlavourText).toConstantValue("PETGEAR_SELECT_GEAR_ON_RIGHT"),this.gameObject.findComponentsInChildren(Lo.B).forEach((k=>k.consume())),this.onSelect.dispatch(!1)}};(0,G.Cg)([(0,j.Cdj)(hs.hi.PetCreatureData),(0,G.Sn)("design:type",Object)],Yc.prototype,"_petData",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Yc.prototype,"_bindOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Yc.prototype,"onSelect",void 0),Yc=(0,G.Cg)([(0,j.EVk)("PetGearItemInfoDataProvider",W.Y.uiPet)],Yc);var Qc=U(10674);let Xc=class extends Fi.z{constructor(){super(...arguments),this._equippedGear={petRelic:null,petHat:null},this._previewGear={petRelic:null,petHat:null}}create(){super.create(),this._bindOnCreate&&this.bindContext()}destroy(){this.unbindContext(),super.destroy()}bindContext(){if(this._context.Container.rebind(hs.hi.YourPetPanelPetId).toConstantValue(this._petData.ID),j.Aq$.isDefined(this._petData.team)){const k=this._loggedInPlayer.getChargedLevel();this._context.Container.rebind(Jn.E.ChargedCreatureEffectTier).toConstantValue(Un.e.getChargedLevelTierFromLevel(k)),this._context.Container.rebind(Jn.E.ChargedCreatureEffectDisplayType).toConstantValue(k>0?Fn.X$.IDLE:Fn.X$.HIDDEN)}this.updateEquippedPetGearData().then((()=>{var k,B;this._context.Container.rebind(hs._R.PetGearPreviewLoadout).toConstantValue({petHat:null!==(k=this._previewGear.petHat)&&void 0!==k?k:this._equippedGear.petHat,petRelic:null!==(B=this._previewGear.petRelic)&&void 0!==B?B:this._equippedGear.petRelic}),this.invokeInjectionComponentsInChildren()})).catch((k=>{j.RQr.createHandler("[PetGearPetPreviewDataProviderComponent] Could not update equipped pet gear data")}))}invokeInjectionComponentsInChildren(){this.gameObject.findComponentsInChildren(Lo.B,!1).forEach((k=>k.consume()))}updateEquippedPetGearData(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F;(null===(k=this._petData.gear)||void 0===k?void 0:k.petHat)?this._equippedGear.petHat=(yield this._gearInventoryManager.getPetGearByUniqueId(null===(B=this._petData.gear)||void 0===B?void 0:B.petHat)).uuid:this._equippedGear.petHat=null,(null===(U=this._petData.gear)||void 0===U?void 0:U.petRelic)?this._equippedGear.petRelic=(yield this._gearInventoryManager.getPetGearByUniqueId(null===(F=this._petData.gear)||void 0===F?void 0:F.petRelic)).uuid:this._equippedGear.petRelic=null}))}unbindContext(){this._context.Container.rebind(hs.hi.YourPetPanelPetId).toConstantValue(null),this._context.Container.rebind(Jn.E.ChargedCreatureEffectTier).toConstantValue(null),this._context.Container.rebind(Jn.E.ChargedCreatureEffectDisplayType).toConstantValue(null),this._context.Container.rebind(hs._R.PetGearPreviewLoadout).toConstantValue(null),this.invokeInjectionComponentsInChildren()}setGearPreviewItem(k){j.Aq$.isDefined(k)?this._previewGear[k.data.asset.type]!==k.uuid&&(this._previewGear[k.data.asset.type]=k.uuid,this.bindContext()):this.clearGearPreviewItems()}clearGearPreviewItems(){this._previewGear.petRelic=null,this._previewGear.petHat=null,this.bindContext()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Xc.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("d69-defe"),(0,G.Sn)("design:type",Qc.q)],Xc.prototype,"_gearInventoryManager",void 0),(0,G.Cg)([(0,j.Cdj)(hs.hi.PetCreatureData),(0,G.Sn)("design:type",Object)],Xc.prototype,"_petData",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Xc.prototype,"_bindOnCreate",void 0),Xc=(0,G.Cg)([(0,j.EVk)("PetGearPetPreviewDataProvider",W.Y.uiPet)],Xc);U(91020);const Zc=Object.assign(Object.assign({},$c.Hh),{Unequipped:16777215});let Jc=class extends j.uAl{get creatureData(){return this._creatureData}set creatureData(k){this._creatureData=k,this.isCreated&&this.onUpdateCard()}constructor(){super(),this._kennel=this._playerData.player.kennel}create(){super.create(),this.gameObject.active=!1,this.creatureData&&this.onUpdateCard()}onUpdateCard(){var k,B;if(!this.hasPetGearAvailable())return void(this.gameObject.active=!1);this.gameObject.active=!0;const U=this.creatureData;this.applyGearToIndicator(null===(k=null==U?void 0:U.gear)||void 0===k?void 0:k.petHat,this._indicatorHat),this.applyGearToIndicator(null===(B=null==U?void 0:U.gear)||void 0===B?void 0:B.petRelic,this._indicatorRelic)}fetchGearInfo(k,B){tt.q.instance.prodigy.gameContainer.get("d69-defe").getPetGearByUniqueId(k).then(B).catch((k=>{j.VyI.log(`[PetGearEquipStatusIndicator] Error setting indicator ${JSON.stringify(k)}`,j.$bb.Error)}))}hasPetGearAvailable(){const k=this.creatureData,B=this._kennel.petCanEquipGearType(k.ID,"petHat"),U=this._kennel.petCanEquipGearType(k.ID,"petRelic");return B||U}setIndicator(k,B){const U="Unequipped"!==B,F={[hs.Wg.IconEnabled]:U,[hs.Wg.BackgroundEnabled]:!U,[hs.Wg.RarityTint]:Zc[B]};Nt.d.updateInjectedValues(k,F)}applyGearToIndicator(k,B){k?this.fetchGearInfo(k,(k=>{const U=Yt.t.getItem(k.data.asset.type,k.data.asset.id);this.setIndicator(B,U.data.rarity)})):this.setIndicator(B,"Unequipped")}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Jc.prototype,"_playerData",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Jc.prototype,"_indicatorHat",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Jc.prototype,"_indicatorRelic",void 0),Jc=(0,G.Cg)([(0,j.EVk)("PetGearSimpleEquipStatusIndicator",W.Y.uiPetGear),(0,G.Sn)("design:paramtypes",[])],Jc);var td=U(72772);let ed=class extends j.uAl{constructor(){super(...arguments),this.runOnCreate=!0,this.onShouldPlayTutorial=new j.HN0,this.onShouldNotPlayTutorial=new j.HN0}postCreate(){super.postCreate(),this.runOnCreate&&this.run()}run(){td.I.shouldShowPetGearTutorial().then((k=>{k?this.onShouldPlayTutorial.dispatch():this.onShouldNotPlayTutorial.dispatch()})).catch(j.RQr.createHandler("Error determining pet gear FTUE status."))}destroy(){this.onShouldPlayTutorial.dispose(),this.onShouldNotPlayTutorial.dispose(),super.destroy()}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ed.prototype,"runOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ed.prototype,"onShouldPlayTutorial",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ed.prototype,"onShouldNotPlayTutorial",void 0),ed=(0,G.Cg)([(0,j.EVk)("PetGearTutorialGuard",W.Y.uiPetGear,"Used to initiate the pet-gear FTUE sequence")],ed);let id=class extends j.uAl{constructor(){super(...arguments),this._injectionConsumes=[],this.onGearMenuLoading=new j.HN0,this.onGearMenuOpen=new j.HN0,this.onGearMenuClosed=new j.HN0}create(){var k,B,U,G,j;super.create(),this._petHatSlotContainer=this._context.Container.get("PetHatSlotContainer"),this._petRelicSlotContainer=this._context.Container.get("PetRelicSlotContainer"),null===(B=null===(k=this._petHatSlotContainer)||void 0===k?void 0:k.GameObject.findComponentInChildren(F.$))||void 0===B||B.onEnabledClick.add((()=>this.openGearMenu("petHat"))),null===(G=null===(U=this._petRelicSlotContainer)||void 0===U?void 0:U.GameObject.findComponentInChildren(F.$))||void 0===G||G.onEnabledClick.add((()=>this.openGearMenu("petRelic"))),this._injectionConsumes=null===(j=this.gameObject)||void 0===j?void 0:j.findComponentsInChildren(Lo.B,!1)}openGearMenu(k){const B=tt.q.instance.prodigy.open.yourPetGear(this._creatureDataSchema,k);B&&(this.onGearMenuLoading.dispatch(),B.onGearMenuOpen.add((()=>{this.onGearMenuOpen.dispatch()})),B.onGearMenuClosed.add((()=>{this.onGearMenuClosed.dispatch()})))}resolvePetGear(){var k;this._petItem=Yt.t.getItem("pet",this._creatureDataSchema.ID),this._canWearPetGear=(null===(k=this._petItem.data.gearEquipSlots)||void 0===k?void 0:k.length)>0,this.setGearEnabledState(),this._canWearPetGear&&this.bindPetGear().catch((()=>{j.RQr.createHandler("Failed to bind pet gear to the widget")})).finally((()=>{this.consumeInjections()}))}setGearEnabledState(){const k={[hs.hi.YourPetPanelPetGearShowGearPanel]:this._canWearPetGear,[hs.hi.YourPetPanelPetGearSlotsDisabled]:!this._canWearPetGear};Nt.d.updateInjectedValues(this.gameObject,k)}bindPetGear(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;const U=yield this._gearManager.getPetGearByUniqueId(null===(k=this._creatureDataSchema.gear)||void 0===k?void 0:k.petHat),F=yield this._gearManager.getPetGearByUniqueId(null===(B=this._creatureDataSchema.gear)||void 0===B?void 0:B.petRelic);this._petHatSlotContainer.Container.rebind("PetGearSlotData").toConstantValue(null!=U?U:{}),this._petRelicSlotContainer.Container.rebind("PetGearSlotData").toConstantValue(null!=F?F:{})}))}consumeInjections(){this._injectionConsumes.forEach((k=>k.consume()))}destroy(){this.onGearMenuLoading.dispose(),this.onGearMenuOpen.dispose(),this.onGearMenuClosed.dispose(),super.destroy()}};(0,G.Cg)([(0,Gi.b)("d69-defe"),(0,G.Sn)("design:type",Qc.q)],id.prototype,"_gearManager",void 0),(0,G.Cg)([(0,j.Pqz)(j.bE_),(0,G.Sn)("design:type",j.bE_)],id.prototype,"_context",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],id.prototype,"onGearMenuLoading",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],id.prototype,"onGearMenuOpen",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],id.prototype,"onGearMenuClosed",void 0),id=(0,G.Cg)([(0,j.EVk)("PetGearWidget",W.Y.uiPet)],id);var sd=U(41935),nd=(U(16383),U(58268)),ad=U(94596);let rd=class extends ad.b{initialize(){super.initialize();const k=new nd.N;k.desaturate(),this._filterList.push(k)}};rd=(0,G.Cg)([(0,j.EVk)("GreyscaleFilter",W.Y.effect)],rd);var od=U(67818);let hd=class extends j.uAl{setup(k,B){this._itemIcon.setItemID(k.ID),this._overlay.active=!B,B?(this._stateIcon.updateAsset(Ve._.Ui_raster_icons_json,"icon-medium-checkmark"),this._greyscaleFilter.removeFilter()):(this._stateIcon.updateAsset(Ve._.Ui_hard_currency_json,"icon-currency-27-small"),this._greyscaleFilter.applyFilter(),this._overlayTween.playAnimation())}};(0,G.Cg)([(0,j.MnK)(od.i),(0,G.Sn)("design:type",od.i)],hd.prototype,"_itemIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],hd.prototype,"_stateIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.bTj),(0,G.Sn)("design:type",j.bTj)],hd.prototype,"_overlayTween",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],hd.prototype,"_overlay",void 0),(0,G.Cg)([(0,j.MnK)(rd),(0,G.Sn)("design:type",rd)],hd.prototype,"_greyscaleFilter",void 0),hd=(0,G.Cg)([(0,j.EVk)("MergeIngredient")],hd);var cd=U(12472);let dd=class extends j.uAl{setup(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=!1){const U=Yt.t.getItem("pet",k.ID),F=cd.r.getMergeIngredientInfo(k),G=F.requiredIngredientsCount,j=eo.P8.getRequiredPetMergeIngredient(U,F.mergeRecipe);this.missingIngredientCount=B?0:G-F.validPetIngredientCount,this.ingredientCount=G,yield this._prefabLoader.preloadFromGUIDWithDependencies(this._ingredientPrefab);for(let $=0;${k.GameObject.active=!1})),this.onLoadingFinished.addOnce((()=>{this.sendInterfaceOpenedEvent(),ud.E.recordDefeatedPetsFunnelStep(eh.l.DynamicStoreLostPetsMain)}),this),this.getStoreAndQuestData().catch(j.RQr.createHandler("LostPetsModalControllerComponent: Failed to get store and quest data"))}getStoreAndQuestData(){return(0,G.sH)(this,void 0,void 0,(function*(){let k=this.getInjectedValue("LOST_PETS_OFFER_DATA"),B=this.getInjectedValue("LOST_PETS_RESET_TIME");if(!k||0===k.length){const U=yield this._dynamicStoreQuestManager.updateDefeatedPetOffers();B=U.resetTime,k=[...U.defeatedPetOffers].filter((k=>k.progress.status===pr.t.IN_PROGRESS))}if(!k||0===k.length)return void this.gameObject.destroy();const U=yield this._dynamicStoreDataProvider.getDynamicStoreUIData({storeKey:Dr.GA.PetShop});if(!this.gameObject)return;const{offerReadById:F}=U.expect();this.setLostPetQuests(k,F);const G=B.valueOf()-this._timeManager.getServerTimeMs();this.timerTextComponent.setCountdownTimeMS(G),this.onLoadingFinished.dispatch()}))}destroy(){this.onLoadingStarted.dispose(),this.onLoadingFinished.dispose(),super.destroy()}setLostPetQuests(k,B){var U,F;const G=(0,Br.K8)(k,B),j=G.slice(0,this._petItemCards.length);for(let $=0;${var B;return null===(B=k.getItemData().item)||void 0===B?void 0:B.ID}));k.push(Math.max(this.moreItemsCardController.count,0)),this._segment.featureCommon.sendInterfaceEvent({interfaceName:us.B.LostPetsMain,interfaceType:ui.Wm.Window,instanceType:fi.N.UI,originType:ui.$N.AutoSurfaced},{item_list:k})}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],pd.prototype,"petItemCardContainerObject",void 0),(0,G.Cg)([(0,j.MnK)(xr),(0,G.Sn)("design:type",xr)],pd.prototype,"moreItemsCardController",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],pd.prototype,"timerTextComponent",void 0),(0,G.Cg)([(0,j.MnK)(Lr.l),(0,G.Sn)("design:type",Lr.l)],pd.prototype,"_prefabModalComponent",void 0),(0,G.Cg)([(0,j.Cdj)("a03-308f"),(0,G.Sn)("design:type",Ks.V)],pd.prototype,"_timeManager",void 0),(0,G.Cg)([(0,Gi.b)("7a1-ff33"),(0,G.Sn)("design:type",bd.s)],pd.prototype,"_dynamicStoreQuestManager",void 0),(0,G.Cg)([(0,Gi.b)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],pd.prototype,"_segment",void 0),(0,G.Cg)([(0,Gi.b)("84d-05d4"),(0,G.Sn)("design:type",fd.I)],pd.prototype,"_dynamicStoreDataProvider",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],pd.prototype,"onLoadingStarted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],pd.prototype,"onLoadingFinished",void 0),pd=(0,G.Cg)([(0,j.EVk)("LostPetsModalController",void 0,"A plug-and-play controller component for the LostPetsModal.prefab. See in-code docs for more.")],pd);let vd=class extends j.uAl{constructor(){super(...arguments),this._commonElements=[],this._uncommonElements=[],this._rareElements=[],this._heroicElements=[],this._legendaryElements=[],this._textElements=[]}updateElements(k){let B,U;switch(this._commonElements.forEach((k=>{k.active=!1})),this._uncommonElements.forEach((k=>{k.active=!1})),this._rareElements.forEach((k=>{k.active=!1})),this._heroicElements.forEach((k=>{k.active=!1})),this._legendaryElements.forEach((k=>{k.active=!1})),k){case io.E.Common:default:B=this._commonElements,U=3552822;break;case io.E.Uncommon:B=this._uncommonElements,U=3552822;break;case io.E.Rare:B=this._rareElements,U=16777215;break;case io.E.Heroic:B=this._heroicElements,U=16777215;break;case io.E.Legendary:B=this._legendaryElements,U=3552822}B.forEach((k=>{k.active=!0})),this._textElements.forEach((k=>{k.fill=j.Q1f.numberToHexString(U)}))}};(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],vd.prototype,"_commonElements",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],vd.prototype,"_uncommonElements",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],vd.prototype,"_rareElements",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],vd.prototype,"_heroicElements",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],vd.prototype,"_legendaryElements",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",Array)],vd.prototype,"_textElements",void 0),vd=(0,G.Cg)([(0,j.EVk)("PetRescueMagicoinModal",W.Y.ui)],vd);let gd=class extends j.uAl{create(){super.create();tt.q.instance.prodigy.world.getCurrentZoneObject().createTopLeftNavigationButton()}};gd=(0,G.Cg)([(0,j.EVk)("PetListButton",W.Y.uiPet)],gd);U(4234);var md=U(3032);let yd=class extends j.uAl{constructor(){super(...arguments),this.onTrue=new j.HN0,this.onFalse=new j.HN0,this.onResult=new j.HN0}create(){super.create(),this._runOnCreate&&this.compare().catch(j.RQr.createHandler("CheckPlayerGoalsQuestSystemComponent create error running compare"))}destroy(){this.onTrue.dispose(),this.onFalse.dispose(),this.onResult.dispose(),super.destroy()}compare(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._loggedInPlayer.player.getQuestSystem("playerGoals"),B=this.anyOf.includes(k);(B?this.onTrue:this.onFalse).dispatch(),this.onResult.dispatch(B)}))}};(0,G.Cg)([(0,Gi.b)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],yd.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.gfw)(md.p),(0,G.Sn)("design:type",Array)],yd.prototype,"anyOf",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yd.prototype,"onTrue",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yd.prototype,"onFalse",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yd.prototype,"onResult",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],yd.prototype,"_runOnCreate",void 0),yd=(0,G.Cg)([(0,j.EVk)("CheckPlayerGoalsQuestSystem",W.Y.quest,"")],yd);var _d,Ed,wd=U(13027),Td=U(44357),Sd=U(3606);!function(k){k.HideCloseButton="HIDE_PLAYER_GOALS_CLOSE_BUTTON",k.DeliverPrize="DELIVER_PRIZE",k.HasPrize="HAS_PRIZE",k.HasNotPrize="HAS_NOT_PRIZE",k.GoalHeader="GOAL_HEADER",k.ShowAttachParentCTA="SHOW_PARENT_ATTACH_CTA",k.ShowClassCodeCTA="SHOW_CLASS_CODE_CTA",k.ShowMysteryBox="SHOW_MYSTERY_BOX",k.ReceivePrizeEvent="RECEIVE_PRIZE_EVENT",k.PrizeDescription="PRIZE_DESCRIPTION",k.PrizeImage="PRIZE_IMAGE_",k.ShowDivider="SHOW_DIVIDER",k.PrizeLayout="PRIZE_LAYOUT_",k.ClassCodeSuccess="FTUE_PLAYER_GOALS_CLASS_CODE_SUCCESS",k.ShowLoginCredentialsCTA="SHOW_LOGIN_CREDENTIALS_CTA",k.ShowProfileQuizCTA="SHOW_PROFILE_QUIZ_CTA",k.ProfileQuizBindings="PROFILE_QUIZ_BINDINGS",k.ProfileQuizComplete="PROFILE_QUIZ_COMPLETE",k.GoalFadeOut="GOAL_FADE_OUT",k.GoalFadeIn="GOAL_FADE_IN",k.GoalFadeDuration="GOAL_FADE_DURATION"}(_d||(_d={})),function(k){k.AwardsAvailable="FTUE_PLAYER_GOALS_AWARDS_AVAILABLE",k.QuestComplete="FTUE_PLAYER_GOALS_QUEST_COMPLETE",k.RightSideHudGameObject="FTUE_PLAYER_GOALS_RIGHT_SIDE_HUD_GAMEOBJECT"}(Ed||(Ed={}));var Ad=U(10551),Cd=U(44677);let Od=class extends Fi.z{constructor(){super(...arguments),this.SHOW_INTERVAL_MS=300,this.FADE_DURATION_MS=400,this.MAX_PRIZES_PER_GOAL=3,this._prizeIsBeingDelivered=!1,this._gridElements=[]}create(){var k;super.create(),null===(k=this._questManager)||void 0===k||k.onDataChanged.add(this.onQuestDataUpdated,this),this.tryBindContext()}onQuestDataUpdated(k){this._prizeIsBeingDelivered=!1;const B=Cd.p.pairedTaskByQuestEventId(k),U=this.getIndexCompletedTask(k);if(B&&-1!==U)return this._questTasks[U]=B,this.updateElement(U),this.updateContainer(),void this.animateTaskTransition(U).then((()=>{this.tryBindContext()})).catch(j.RQr.createHandler("PlayerGoalsDataProviderComponent onQuestDataUpdated animateTaskTransition"));this.tryBindContext()}getIndexCompletedTask(k){return this._questTasks.findIndex((B=>{var U,F,G,j,$,H;const V=null===(G=null===(F=null===(U=B.taskDefinition)||void 0===U?void 0:U.metadata)||void 0===F?void 0:F.goalCardData)||void 0===G?void 0:G.questEventId,W=null===(H=null===($=null===(j=B.awardTask.taskDefinition)||void 0===j?void 0:j.metadata)||void 0===$?void 0:$.goalCardData)||void 0===H?void 0:H.questEventId;return V===k||W===k}))}tryBindContext(){this.bindContext().catch(j.RQr.createHandler("[PlayerGoals] Unable to bind player goals"))}destroy(){var k;null===(k=this._questManager)||void 0===k||k.onDataChanged.remove(this.onQuestDataUpdated,this),super.destroy()}bindContext(){return(0,G.sH)(this,void 0,void 0,(function*(){this._questTasks=this._questTasks||this._questManager.surfacedTasks;for(let k=0;kthis._questManager.isPrizeReady(k)));(0,Td.QQ)(tt.q.instance.game,!B),this.updateValue(_d.HideCloseButton,B),this.updateValue(_d.ProfileQuizBindings,this.bindProfileQuiz()),this.updateValue(hs.V8.LoginDetailsUsername,this._loggedInPlayer.loginCredentials.username),this.updateValue(hs.V8.LoginDetailsPassword,this._loggedInPlayer.loginCredentials.password)}showMysteryBox(k){if(this._questManager.isAwardBlocked(k.awardTask))return!0;return this._questManager.isPrizeReady(k)||!this._questManager.isTaskComplete(k)}bindProfileQuiz(){return{[hs.V8.LoginDetailsUsername]:this._loggedInPlayer.loginCredentials.username,[hs.V8.LoginDetailsPassword]:this._loggedInPlayer.loginCredentials.password,[_d.ProfileQuizComplete]:(()=>{Ad.d.sendCompleteProfileQuizEvent().catch(j.RQr.createHandler("[PlayerGoals] Unable to send quest event for completion of profile quiz"))}).bind(this)}}animateTaskTransition(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=this._questManager.surfacedTasks;if(this._questTasks[0].taskID===B[0].taskID)return;yield rr.o.wait(1e3),yield this.fadeOutGoal(k,500);const U=this.fadeOutOthers(B),F=this.fadeInAll(B);yield Promise.all(U),yield Promise.all(F)}))}fadeOutOthers(k){var B;return!this.gameObject||(null===(B=this.gameObject)||void 0===B?void 0:B.isDestroyed)?[Promise.resolve()]:k.map(((k,B)=>(0,G.sH)(this,void 0,void 0,(function*(){const U=this.getTaskIndex(k);yield rr.o.wait(100*B),-1!==U&&(yield this.fadeOutGoal(U,450))}))))}fadeInAll(k){var B;return!this.gameObject||(null===(B=this.gameObject)||void 0===B?void 0:B.isDestroyed)?[Promise.resolve()]:k.map(((k,B)=>(0,G.sH)(this,void 0,void 0,(function*(){const U=200*(B+1),F=25*B;yield rr.o.wait(U-F),this._questTasks[B]=k,this.updateElement(B,!1),this.fadeInGoal(B,800).catch(j.RQr.createHandler("PlayerGoalsDataProviderComponent animateTaskTransition fadeInGoal"))}))))}getTaskIndex(k){return this._questTasks.findIndex((B=>k.taskID===B.taskID))}fadeOutGoal(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U;if(!this.gameObject||(null===(U=this.gameObject)||void 0===U?void 0:U.isDestroyed))return;const F=this._gridElements[k].findComponent(j.bE_);this.updateValue(_d.GoalFadeDuration,null!=B?B:this.FADE_DURATION_MS,F),this.updateValue(_d.GoalFadeOut,!0,F),yield rr.o.wait(null!=B?B:this.FADE_DURATION_MS)}))}fadeInGoal(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U;if(!this.gameObject||(null===(U=this.gameObject)||void 0===U?void 0:U.isDestroyed))return;const F=this._gridElements[k].findComponent(j.bE_);this.updateValue(_d.GoalFadeDuration,null!=B?B:this.FADE_DURATION_MS,F),this.updateValue(_d.GoalFadeIn,!0,F),yield rr.o.wait(null!=B?B:this.FADE_DURATION_MS)}))}};(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Od.prototype,"_gridElements",void 0),(0,G.Cg)([(0,j.Cdj)("d65-d7bb"),(0,G.Sn)("design:type",Sd.n)],Od.prototype,"_questManager",void 0),(0,G.Cg)([(0,Gi.b)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Od.prototype,"_loggedInPlayer",void 0),Od=(0,G.Cg)([(0,j.EVk)("PlayerGoalsDataProvider",W.Y.playerGoals)],Od);let Id=class extends Fi.z{constructor(){super(...arguments),this._bindOnPostCreate=!0}postCreate(){var k;super.postCreate(),null===(k=this._questManager)||void 0===k||k.onDataChanged.add(this.onQuestDataUpdated,this),this._bindOnPostCreate&&this.tryBindContext()}destroy(){super.destroy()}onQuestDataUpdated(){this.tryBindContext()}tryBindContext(){this.bindContext().catch(j.RQr.createHandler("[PlayerGoals] Unable to bind player goals"))}bindContext(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;if(!this.gameObject||(null===(k=this.gameObject)||void 0===k?void 0:k.isDestroyed))return;const B=Cd.p.isQuestComplete;this.updateValue(Ed.QuestComplete,B)}))}};(0,G.Cg)([(0,j.Cdj)("d65-d7bb"),(0,G.Sn)("design:type",Sd.n)],Id.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Id.prototype,"_bindOnPostCreate",void 0),Id=(0,G.Cg)([(0,j.EVk)("PlayerGoalsDataProviderHud",W.Y.playerGoals)],Id);var Dd=U(81137);let Rd=class extends j.uAl{constructor(){super(...arguments),this._playerGoalsSetup=!1}firstUpdate(){super.firstUpdate(),this.setupPlayerGoals().catch(j.RQr.createHandler("Error setting up the player goals for the player goals HUD component"))}setupPlayerGoals(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._playerGoalsSetup||Dd.x.isFeatureEnabled())return;if(this._playerGoalsSetup=!0,!j.Aq$.isDefined(this._playerGoalsHudIcon))return;const k=tt.q.instance.prodigy.gameContainer.get("d65-d7bb");yield k.sendQuestEventPromise;if(0===Cd.p.availableQuestTasks().length)return void(this._playerGoalsHudIcon.active=!1);if(k.surfacedTasks.some((B=>k.isPrizeReady(B)))){const k=new Promise((k=>tt.q.instance.game.broadcaster.addAppListener(jn.nN.PlayerGoalsPanelClosed,k,this)));yield k,tt.q.instance.game.broadcaster.removeAppListener(jn.nN.PlayerGoalsPanelClosed,this),this._playerGoalsHudIcon.active=!0}else this._playerGoalsHudIcon.active=!0}))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Rd.prototype,"_playerGoalsHudIcon",void 0),Rd=(0,G.Cg)([(0,j.EVk)("PlayerGoalsHud",W.Y.playerGoals)],Rd);let Pd=class extends j.uAl{constructor(){super(...arguments),this._playerGoalsQueuedSignal=new j.HN0,this._runOnCreate=!0}create(){super.create(),this._runOnCreate&&tt.q.instance.prodigy.notifications.queuedShowPlayerGoals&&this._playerGoalsQueuedSignal.dispatch()}destroy(){this._playerGoalsQueuedSignal.dispose(),super.destroy()}setPlayerGoalsQueued(k){tt.q.instance.prodigy.notifications.queuedShowPlayerGoals=k,k&&this._playerGoalsQueuedSignal.dispatch()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Pd.prototype,"_playerGoalsQueuedSignal",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Pd.prototype,"_runOnCreate",void 0),Pd=(0,G.Cg)([(0,j.EVk)("PlayerGoalsQueueing",W.Y.playerGoals)],Pd);let Md=class extends j.PQK{installBindings(){const k=tt.q.instance.prodigy.gameContainer;this.Container.bind(ar.QuestManager).toConstantValue(k.get("d65-d7bb"))}};Md=(0,G.Cg)([(0,j.Og1)("FtuePlayerGoalsQuestInstaller","Installer")],Md);U(55346);const Nd=new Map([[0,Rt.l.CtaTipBodyMergePet],[1,Rt.l.CtaTipBodyLevelPet],[2,Rt.l.CtaTipBodyEvolvePet]]);var xd=U(20117);let Ld=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.onAllCTAsCompleted=this.createTidySignal(),this._contentObjects=new Map}setUpTipWidget(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;if(!k.contentArgs||0===k.contentArgs.length)return;const U=[];k.contentArgs.forEach((k=>{if(this._contentObjects.has(k.type)){const{contentObject:B,completedCTA:U}=this._contentObjects.get(k.type);Nt.d.updateInjectedValues(B,xd.w5.GetInjectionValuesForCtaTipContent(k)),B.active=!1,U.setValue(!1)}else U.push(Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Nd.get(k.type),xd.w5.GetInjectionValuesForCtaTipContent(k),this._bodyContainer).then((B=>{this._contentObjects.set(k.type,{contentObject:B,completedCTA:B.findComponentInChildren(Ar.f)}),B.active=!1})).catch())})),j.Aq$.isDefined(k.startingType)?this._activeType=k.startingType:null!==(B=this._activeType)&&void 0!==B||(this._activeType=k.contentArgs[0].type),U.length>0?yield Promise.all(U).then((()=>this.setContentActive(this._activeType))).catch():this.setContentActive(this._activeType)}))}setContentActive(k){this._contentObjects.get(this._activeType).contentObject.active=!1,this._activeType=k,this._contentObjects.get(this._activeType).contentObject.active=!0}closeAllCtas(){for(const k of this._contentObjects.values()){const{contentObject:B,completedCTA:U}=k;B.active=!1,U.setValue(!0)}this.onAllCTAsCompleted.dispatch(),Nt.d.updateInjectedValues(this.gameObject,{[xd.tN.ShowCta]:!1})}closeCta(){let k=!1;this._contentObjects.get(this._activeType).completedCTA.setValue(!0);const B=this.findNextUncompletedCTAType();j.Aq$.isDefined(B)?(k=!0,this.setContentActive(B)):this.onAllCTAsCompleted.dispatch(),Nt.d.updateInjectedValues(this.gameObject,{[xd.tN.ShowCta]:k})}findNextUncompletedCTAType(){for(const[k,B]of this._contentObjects)if(!B.completedCTA.getValue())return k}};(0,G.Cg)([(0,Gi.b)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Ld.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ld.prototype,"_bodyContainer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ld.prototype,"onAllCTAsCompleted",void 0),Ld=(0,G.Cg)([(0,j.EVk)("CtaTipWidget")],Ld);U(85773),U(96217);let kd=class extends j.PQK{installBindings(){const k=tt.q.instance.prodigy.gameContainer;this.Container.bind(ar.QuestManager).toConstantValue(k.get("a71-dfcf"))}};kd=(0,G.Cg)([(0,j.Og1)("DailyLoginCalendarInstaller","Installer")],kd);let Bd=class extends j.PQK{installBindings(){const k=tt.q.instance.prodigy.gameContainer;this.Container.bind("a78-11c7").toConstantValue(k.get("123-14b6")),this.Container.bind(ar.QuestManager).toConstantValue(k.get("123-14b6"))}};Bd=(0,G.Cg)([(0,j.Og1)("FireflyForestHardZoneQuestInstaller","Installer")],Bd);let Ud=class extends j.PQK{installBindings(){const k=tt.q.instance.prodigy.gameContainer;this.Container.bind("a78-11c7").toConstantValue(k.get("985-7051")),this.Container.bind(ar.QuestManager).toConstantValue(k.get("985-7051"))}};Ud=(0,G.Cg)([(0,j.Og1)("FireflyForestZoneQuestInstaller","Installer")],Ud);let Fd=class extends j.PQK{installBindings(){const k=tt.q.instance.prodigy.gameContainer;this.Container.bind(ar.QuestManager).toConstantValue(k.get("f91-8211"))}};Fd=(0,G.Cg)([(0,j.Og1)("ZoneQuestInstaller","Installer")],Fd);let Gd=class extends En{constructor(){super(),this.maxSimultaneousPrefabs=1,this.onSpawned=new j.HN0,this._spawnCount=0,this._tag=`LimitedLoadPrefabComponent_${j.Aq$.generateGUID()}`}destroy(){this.onSpawned.dispose(),super.destroy()}load(){if(this.maxSimultaneousPrefabs>0){if(this._parent.children.filter((k=>k.hasOwnProperty(this._tag))).length>=this.maxSimultaneousPrefabs)return new j.kBN((k=>{k(null)}))}return this.maxTotalSpawns>0&&this._spawnCount>=this.maxTotalSpawns?new j.kBN((k=>{k(null)})):(this._spawnCount++,super.load().then((k=>(k&&(k[this._tag]=!0,this.onSpawned.dispatch(k)),k))))}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Gd.prototype,"maxSimultaneousPrefabs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Gd.prototype,"maxTotalSpawns",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Gd.prototype,"onSpawned",void 0),Gd=(0,G.Cg)([(0,j.EVk)("LimitedLoadPrefab",W.Y.utility,"Ensures that only a limited number of a certain prefab can be active at a time."),(0,G.Sn)("design:paramtypes",[])],Gd);class jd{static getDailyQuestState(k){const B=null!=k?k:tt.q.instance.prodigy.world.getCurrentZoneObject(),U=Qt.J.getDate(),F=B.getState("daily");if(!this.isDailyQuestState(F))return{date:U,flags:[1,1,1,1,1],rewards:0};if(F.date!==U){const k={date:U,flags:[1,1,1,1,1],rewards:F.rewards};return B.setState("daily",k),k}return F}static isDailyQuestState(k){return"object"==typeof k&&null!==k&&"date"in k&&"flags"in k&&"rewards"in k}}let $d=class extends j.uAl{constructor(){super(...arguments),this._dailyQuestItemSpawners=[],this.onDailyQuestCollected=new j.HN0,this.onAllDailyQuestsCompleted=new j.HN0,this._zone=null,this._spawnPromises=[]}get zone(){var k;return null!==(k=this._zone)&&void 0!==k?k:this._zone=tt.q.instance.prodigy.world.getCurrentZoneObject()}create(){super.create()}destroy(){for(const k of this._spawnPromises)k.cancel();this._spawnPromises.length=0,this.onDailyQuestCollected.dispose(),this.onAllDailyQuestsCompleted.dispose(),super.destroy()}getDailySpawnPointData(){const k=tt.q.instance.game.cache.getJSON(this._dailyQuestData);return k||(j.VyI.log("[DailyQuestComponent]: No spawn point data found",j.$bb.Error),null)}spawnDailyQuestItems(){var k,B;const U=this.getDailySpawnPointData();if(!U)return void j.VyI.log("[DailyQuestComponent]: No spawn point data available",j.$bb.Error);const F=null!==(B=null===(k=U.spawnPoints)||void 0===k?void 0:k[this._zoneMapTag])&&void 0!==B?B:0,G=this._dailyQuestItemSpawners.length;F===G?this.getDailySpawnPoints().forEach(((k,B)=>{var U;if(!k.collected&&k.mapTag===this._zoneMapTag){const F=this._dailyQuestItemSpawners[k.index];(null!==(U=F.GameObject.findComponent(j.bE_))&&void 0!==U?U:F.GameObject.addComponent(j.bE_)).Container.bind("ON_COLLECT_DAILY").toConstantValue((()=>{this.collectDailyQuest(B)})),this._spawnPromises.push(F.load())}})):j.VyI.log(`[DailyQuestComponent]: Mismatch between spawn point count (${F}) and spawner count (${G})`,j.$bb.Error)}getDailySpawnPoints(){const k=jd.getDailyQuestState(),B=this.getDailySpawnPointData();if(!k||!B)return j.VyI.log("[DailyQuestComponent]: Invalid daily state or spawn point data",j.$bb.Error),[];const U=new j.bsf(k.date),F=ct.flatMap(Object.entries(B.spawnPoints),(([k,B])=>Array.from({length:B},((B,U)=>({mapTag:k,index:U})))));return U.shuffle(F),F.length=Math.min(F.length,5),F.forEach(((B,U)=>{B.collected=1!==k.flags[U]})),F}getActiveDailySpawnPointsForMap(){return this.getDailySpawnPoints().filter((({mapTag:k,collected:B})=>k===this._zoneMapTag&&!B))}collectDailyQuest(k){if(!j.Aq$.isDefined(k))return void j.VyI.log("[DailyQuestComponent]: Invalid daily index",j.$bb.Error);const B=jd.getDailyQuestState();B?(B.flags[k]=0,this.zone.setState("daily",B),this.onDailyQuestCollected.dispatch(k),this.checkAllDailiesCompleted()):j.VyI.log("[DailyQuestComponent]: No daily quest state found",j.$bb.Error)}checkAllDailiesCompleted(){const k=jd.getDailyQuestState();if(!k)return!1;const B=k.flags.every((k=>0===k));return B&&this.onAllDailyQuestsCompleted.dispatch(),B}};(0,G.Cg)([(0,j.Cdj)("ZONE_MAP_TAG"),(0,G.Sn)("design:type",String)],$d.prototype,"_zoneMapTag",void 0),(0,G.Cg)([(0,j.Bak)(),(0,j.tW2)("daily"),(0,G.Sn)("design:type",String)],$d.prototype,"_dailyQuestData",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Gd),(0,G.Sn)("design:type",Array)],$d.prototype,"_dailyQuestItemSpawners",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$d.prototype,"onDailyQuestCollected",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$d.prototype,"onAllDailyQuestsCompleted",void 0),(0,G.Cg)([(k,B)=>{},(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",Array)],$d.prototype,"getDailySpawnPoints",null),$d=(0,G.Cg)([(0,j.EVk)("DailyQuest",W.Y.quest)],$d);U(52437);let Hd=class extends j.uAl{constructor(){super(...arguments),this._zoneID=Ft.A_.FOREST,this.onCreate=new j.HN0,this.onQuestStarted=new j.HN0,this.onQuestComplete=new j.HN0,this.onQuestIncomplete=new j.HN0,this.onSequenceComplete=new j.HN0,this.onSequenceIncomplete=new j.HN0,this.onCheckSequence=new j.HN0,this._zone=null}get zone(){var k;return null!==(k=this._zone)&&void 0!==k?k:this._zone=tt.q.instance.prodigy.world.getZone(this._zoneID)}create(){super.create(),this.onCreate.dispatch()}checkQuestStatus(k){var B;if(!j.Aq$.isDefined(k))return void j.VyI.log("[LegacyQuestStatusComponent]: No ID provided",j.$bb.Error);(this.zone.isQuestComplete(k)||(null===(B=this.zone.getQuestState())||void 0===B?void 0:B.ID)>k?this.onQuestComplete:this.onQuestIncomplete).dispatch()}checkQuestSequenceStatus(k,B){var U;if(!j.Aq$.isDefined(k)||!j.Aq$.isDefined(B))return void j.VyI.log("[LegacyQuestStatusComponent]: No ID(s) provided",j.$bb.Error);(this.zone.isSequenceComplete(k,B)||(null===(U=this.zone.getQuestState())||void 0===U?void 0:U.ID)>k?this.onSequenceComplete:this.onSequenceIncomplete).dispatch(B)}checkCurrentQuestSequenceStatus(k){var B;(null===(B=this.zone.getQuestState())||void 0===B?void 0:B.ID)===k&&this.onCheckSequence.dispatch(this.zone.getQuestState().seq)}checkQuestStarted(k,B){(j.Aq$.isDefined(B)?this.zone.isOnQuest(k)&&!this.zone.isSequenceComplete(k,B):this.zone.isOnQuest(k))&&this.onQuestStarted.dispatch()}setQuestComplete(k){if(!j.Aq$.isDefined(k))return void j.VyI.log("[LegacyQuestStatusComponent]: No ID provided",j.$bb.Error);this.zone.completeQuest(k);const B=tt.q.instance.game.state.get(Tt.G.TileScreen);B?B.process():j.VyI.log(`[LegacyQuestStatusComponent]: TileScreen not found during complete of Quest ${k}`,j.$bb.Error)}setQuestSequenceComplete(k,B){if(j.Aq$.isDefined(k)&&j.Aq$.isDefined(B)){if(this.zone.completeSequence(k,B),!this._isPrefabMap){const U=tt.q.instance.game.state.get(Tt.G.TileScreen);U?U.process():j.VyI.log(`[LegacyQuestStatusComponent]: TileScreen not found during complete of Quest ${k} Seq ${B}`,j.$bb.Error)}}else j.VyI.log("[LegacyQuestStatusComponent]: No ID(s) provided",j.$bb.Error)}destroy(){this.onCreate.dispose(),this.onCheckSequence.dispose(),this.onSequenceComplete.dispose(),this.onSequenceIncomplete.dispose(),this.onQuestStarted.dispose(),this.onQuestComplete.dispose(),this.onQuestIncomplete.dispose(),super.destroy()}};(0,G.Cg)([(0,j.gfw)(Ft.A_),(0,G.Sn)("design:type",String)],Hd.prototype,"_zoneID",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hd.prototype,"onCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hd.prototype,"onQuestStarted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hd.prototype,"onQuestComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hd.prototype,"onQuestIncomplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hd.prototype,"onSequenceComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hd.prototype,"onSequenceIncomplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hd.prototype,"onCheckSequence",void 0),(0,G.Cg)([(0,j.Cdj)("IS_PREFAB_MAP"),Do(),(0,G.Sn)("design:type",Boolean)],Hd.prototype,"_isPrefabMap",void 0),Hd=(0,G.Cg)([(0,j.EVk)("LegacyQuestStatus",W.Y.quest)],Hd);var Vd=U(25308);let Wd=class extends j.uAl{constructor(){super(...arguments),this._onEncounterComplete=new j.HN0,this._onPostBattleVictory=new j.HN0}create(){super.create(),this._currentZone=tt.q.instance.prodigy.world.getCurrentZoneObject()}startEncounter(){const k=this.getCutsceneAssetID(),B=this.getEncounterAssetID();B&&k?tt.q.instance.prodigy.prefabFactory.createPippetQuestEncounter(this._currentZone,k,B,(()=>this._onPostBattleVictory.dispatch()),(()=>this._onEncounterComplete.dispatch())).catch(j.RQr.createHandler(`Could not load the Pippet Encounter from guid: ${this.getEncounterAssetID()}`)):j.VyI.log(`Encounter or cutscene asset ID not defined for zone: ${this._currentZone.ID}`,j.$bb.Error)}getCutsceneAssetID(){switch(this._currentZone.ID){case Ft.A_.SHIVERCHILL:case Ft.A_.SHIVERCHILLHARD:return 202;case Ft.A_.BONFIRE:case Ft.A_.BONFIREHARD:return 204;case Ft.A_.SHIPWRECK:case Ft.A_.SHIPWRECKHARD:return 205;case Ft.A_.SKYWATCH:case Ft.A_.SKYWATCHHARD:return 206;default:return j.VyI.log(`Pippet quest encounter cutscene not defined for zone: ${this._currentZone.ID}`,j.$bb.Error),null}}getEncounterAssetID(){switch(this._currentZone.ID){case Ft.A_.SHIVERCHILL:return Vd.e.Shiverchill_quests_encounter;case Ft.A_.SHIVERCHILLHARD:return Vd.e.Shiverchill_hard_quests_encounter;case Ft.A_.BONFIRE:return Vd.e.Bonfire_spire_quests_encounter;case Ft.A_.BONFIREHARD:return Vd.e.Bonfire_spire_hard_quests_encounter;case Ft.A_.SHIPWRECK:return Vd.e.Shipwreck_quests_encounter;case Ft.A_.SHIPWRECKHARD:return Vd.e.Shipwreck_hard_quests_encounter;case Ft.A_.SKYWATCH:return Vd.e.Skywatch_quests_encounter;case Ft.A_.SKYWATCHHARD:return Vd.e.Skywatch_hard_quests_encounter;default:return j.VyI.log(`Pippet quest encounter not defined for zone: ${this._currentZone.ID}`,j.$bb.Error),null}}destroy(){this._onEncounterComplete.dispose(),this._onPostBattleVictory.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wd.prototype,"_onEncounterComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wd.prototype,"_onPostBattleVictory",void 0),Wd=(0,G.Cg)([(0,j.EVk)("PippetQuestEncounter",W.Y.quest)],Wd);var qd=U(79368);let Kd=class extends j.uAl{sendEvent(){this._buttonID&&""!==this._buttonID?this._questManager.sendQuestEvent(Wr.T.BUTTON_CLICK,{id:this._buttonID}).catch(j.RQr.createHandler("An error occurred while sending the button click event")):j.VyI.log("QuestButtonEventComponent attempted to send event with empty button id",j.$bb.Error)}};(0,G.Cg)([(0,j.Cdj)(ar.QuestManager),(0,G.Sn)("design:type",qd.k)],Kd.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Kd.prototype,"_buttonID",void 0),Kd=(0,G.Cg)([(0,j.EVk)("QuestButtonEvent",W.Y.ultimates)],Kd);var zd=U(91323),Yd=U(7247);let Qd=class extends j.uAl{constructor(){super(...arguments),this.onQuestTaskStart=new j.HN0,this.onQuestTaskComplete=new j.HN0,this.onQuestObjectiveChange=new j.HN0}getTag(){return this.tag}create(){var k;super.create(),this.localZoneQuestManager?(this.localZoneQuestManager.onQuestTaskStart.add((k=>{this.onQuestTaskStart.dispatch(k),this.setQuestObjective(k),this.addGuideHands().catch(j.RQr.createHandler("Failed to add guide hands"))}),this),this.localZoneQuestManager.onQuestTaskComplete.add((k=>{var B;this.onQuestTaskComplete.dispatch(k),(null===(B=k.metadata)||void 0===B?void 0:B.parentCompleted)&&this.onQuestObjectiveChange.dispatch("")}),this),this.localZoneQuestManager.getTasksInProgress().then((k=>{0!==k.length?this.setQuestObjective(k[0].taskDefinition):j.VyI.log("No tasks in progress",j.$bb.Verbose)})).catch(j.RQr.createHandler("Failed to get tasks in progress")),this.addGuideHands().catch(j.RQr.createHandler("Failed to add guide hands")),this.tag=null===(k=this._zoneMapTag)||void 0===k?void 0:k.split("-")[1]):j.VyI.log("No local zone quest manager found on quest manager component",j.$bb.Warning)}destroy(){var k,B;this.localZoneQuestManager&&(null===(k=this.localZoneQuestManager.onQuestTaskStart)||void 0===k||k.removeAll(this),null===(B=this.localZoneQuestManager.onQuestTaskComplete)||void 0===B||B.removeAll(this)),this.onQuestTaskStart.dispose(),this.onQuestTaskComplete.dispose(),this.onQuestObjectiveChange.dispose(),super.destroy()}setQuestObjective(k){var B,U,F,G,$,H,V,W;if(k.localizationKey)this.onQuestObjectiveChange.dispatch(this._localizer.getText(k.localizationKey));else if(k.completionRequirements.type===Wr.T.DEFEAT_ENCOUNTER||k.completionRequirements.type===Wr.T.DEFEAT_QUEST_ENCOUNTER){const F=null!==(B=tt.q.instance.prodigy.world.getCurrentZoneObject().getQuestState())&&void 0!==B?B:{},G=j.Aq$.isDefined(F.req)?F.req.N:null!==(U=k.completionRequirements.data.target)&&void 0!==U?U:1,$=k.completionRequirements.data.id;let H;if(H=It.O.isEnglishLocale()?`Defeat ${G} ${(0,zd.t)("Monster",G)}`:G>1?this._localizer.getText("DEFEAT_N_MONSTERS",G):this._localizer.getText("DEFEAT_1_MONSTER"),j.Aq$.isDefined($)){const k=Yt.t.getItem("pet",$);if(k){const B=eo.P8.getPetDisplayName(k,k);H=It.O.isEnglishLocale()?`Defeat ${G} ${(0,zd.t)(B,G)}`:this._localizer.getText("DEFEAT_N_NAMED_MONSTERS",G,B)}}this.onQuestObjectiveChange.dispatch(H)}else if(k.completionRequirements.type===Wr.T.COLLECT_ITEM){const B=k.completionRequirements.data.type,U=Number(k.completionRequirements.data.id);this.updateWithItemAmountRemaining(B,U,null!==(F=k.completionRequirements.data.target)&&void 0!==F?F:1)}else if(k.completionRequirements.type===Wr.T.RECEIVE_ITEM&&(null===(G=k.completionRequirements)||void 0===G?void 0:G.conditions)){const B=k.completionRequirements.conditions.find((k=>k.type===Yd.i.ITEM_RESTRICTIONS));if(null==B?void 0:B.data){const U=B.data,F=null===($=U.types)||void 0===$?void 0:$[0],G=Number(null===(H=U.ids)||void 0===H?void 0:H[0]),q=null!==(V=tt.q.instance.prodigy.world.getCurrentZoneObject().getQuestState())&&void 0!==V?V:{},K=j.Aq$.isDefined(q.req)?q.req.N:null!==(W=k.completionRequirements.data.target)&&void 0!==W?W:1;return void this.updateWithItemProgressRemaining(F,G,K)}j.VyI.log("[QuestManagerComponent] ReceiveItem task type expects a condition of type ItemRestrictions, but none was found",j.$bb.Warning),this.onQuestObjectiveChange.dispatch(void 0)}else this.onQuestObjectiveChange.dispatch(void 0)}updateWithItemProgressRemaining(k,B,U){const F=Yt.t.getItem(k,B);let G;G=It.O.isEnglishLocale()?`Collect ${U} ${(0,zd.t)(null==F?void 0:F.name,U)}`:this._localizer.getText("COLLECT_N_ITEMS",U,null==F?void 0:F.name),this.onQuestObjectiveChange.dispatch(G)}updateWithItemAmountRemaining(k,B,U){const F=Yt.t.getItem(k,B),G=U-tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem(k,B);let j;j=It.O.isEnglishLocale()?`Collect ${G} ${(0,zd.t)(F.name,G)}`:this._localizer.getText("COLLECT_N_ITEMS",G,null==F?void 0:F.name),this.onQuestObjectiveChange.dispatch(j)}addGuideHands(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=mc.P.findSceneTeleportTriggers();if(!k.length)return;const B=yield this.localZoneQuestManager.getTasksInProgress(),U=ct.uniq(ct.flatMap(B,(k=>{var B,U;return null!==(U=null===(B=k.taskDefinition.metadata)||void 0===B?void 0:B.locations)&&void 0!==U?U:[]}))),F=mc.P.getTargetMapsFromLocations(U),G=mc.P.findShortestPathsToAllOf(this._zoneMapTag,F);if(G.length>0){G.sort(((k,B)=>k.length-B.length));const B=G[0],U=B.length>1?B[1]:"";mc.P.manageTeleportTriggerGuideHands(U,k)}}))}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Qd.prototype,"onQuestTaskStart",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Qd.prototype,"onQuestTaskComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Qd.prototype,"onQuestObjectiveChange",void 0),(0,G.Cg)([(0,j.Cdj)("a78-11c7"),(0,G.Sn)("design:type",co.B)],Qd.prototype,"localZoneQuestManager",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Qd.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_MAP_TAG"),(0,G.Sn)("design:type",String)],Qd.prototype,"_zoneMapTag",void 0),Qd=(0,G.Cg)([(0,j.EVk)("QuestManager",W.Y.quest)],Qd);var Xd=U(85604);const Zd={[Xd.y.Flora]:39,[Xd.y.Bok]:0,[Xd.y.Slurpy]:0,[Xd.y.Eve]:45,[Xd.y.Broccolina]:2,[Xd.y.Benni]:1,[Xd.y.Gale]:14};let Jd=class extends j.uAl{constructor(){super(...arguments),this._questNPCName=Xd.y.Flora}interact(){var k;null===(k=this._dialogueController)||void 0===k||k.close();const B=this._playerDataProvider.player,U=this._zoneOverride?tt.q.instance.prodigy.world.getZone(this._zoneOverride):tt.q.instance.prodigy.world.getCurrentZoneObject();if(!B.isZoneQuestEnabled)return;const F=()=>{this.getInjectedValue("a25-68f4").sendQuestEventViaHub(Wr.T.SPEAK_WITH_NPC,{id:this._questNPCName}).catch(j.RQr.createHandler("An error occurred while sending the SPEAK_WITH_NPC event via Quest Hub"))};this._dialogueController=new mi.rD(tt.q.instance.game);const G=U.getQuestState();if(!G)return U.startQuest(1).onQuestEventDialogue("onStart"),this.queueEventText(U,"onStart",1),void this._dialogueController.start(void 0,F);const $=G.ID;if(!j.Aq$.isDefined($))return;const H=U.getQuest($);if(H)this.queueEventText(U,"onStart",$),H.onQuestEventDialogue("onStart"),this._dialogueController.start(void 0,F);else{const k=tt.q.instance.prodigy.event.create();k.text(Zd[this._questNPCName],this._questNPCName),k.function(F),k.start()}}queueEventText(k,B,U){const F=k.getQuest(U);if(j.Aq$.isDefined(F[B]))for(const G of F[B])this._dialogueController.addEvents([{dialogueData:this._dialogueController.dataProvider.get(G),blockInput:!0}])}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Jd.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.gfw)(Xd.y),(0,G.Sn)("design:type",String)],Jd.prototype,"_questNPCName",void 0),(0,G.Cg)([(0,j.gfw)(Ft.A_),(0,G.Sn)("design:type",String)],Jd.prototype,"_zoneOverride",void 0),Jd=(0,G.Cg)([(0,j.EVk)("QuestNpc",W.Y.quest)],Jd);let tl=class extends j.uAl{initFromActivePlayer(){this._questID=this._playerDataProvider.player.ultimateQuestId}setTradeEventData(k,B){this._itemID=B,this._itemType=k}sendEvent(){j.Aq$.isDefined(this._itemID)?this._questManager.sendQuestEvent(Wr.T.TRADE_WITH_ULLA,{type:this._itemType,id:this._itemID},this._questID?[this._questID]:void 0).catch(j.RQr.createHandler("An error occurred while sending the NPC trade event")):j.VyI.log("QuestNPCTradeEventComponent attempted to send event with empty item id",j.$bb.Warning)}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],tl.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)(ar.QuestManager),(0,G.Sn)("design:type",qd.k)],tl.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tl.prototype,"_itemID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],tl.prototype,"_itemType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],tl.prototype,"_questID",void 0),tl=(0,G.Cg)([(0,j.EVk)("QuestNPCTradeEvent",W.Y.ultimates)],tl);var el=U(95383),il=U(98938);let sl=class extends j.uAl{constructor(){super(...arguments),this._dispatchStartOnCreate=!0,this._dispatchCompleteOnCreate=!0,this.onTaskStart=new j.HN0,this.onTaskComplete=new j.HN0,this._awaitOpenDialogues=!0}create(){if(super.create(),this._questTag&&this._questManagerHub.questManagerMap.get(this._questTag))this._questManager=this._questManagerHub.questManagerMap.get(this._questTag);else{if(!this._localZoneQuestManager)return void j.VyI.log(`QuestManager with tag [${this._questTag}] is not connected to the QuestManagerHub, and no localZoneQuestManager is available. This quest listener will not function`,j.$bb.Warning);this._questManager=this._localZoneQuestManager}this._questManager.onQuestTaskStart.add(this.handleQuestTaskStart,this),this._questManager.onQuestTaskComplete.add(this.handleQuestTaskComplete,this),this._dispatchStartOnCreate&&this.attemptDispatchTaskStart(),this._dispatchCompleteOnCreate&&this.attemptDispatchTaskComplete()}attemptDispatchTaskStart(){this._popupManager.delayPopupsUntil(this._questManager.isTaskInProgress(this.questId,this.taskId).then((k=>{var B;k&&(null===(B=this.onTaskStart)||void 0===B||B.dispatch())})).catch(j.RQr.createHandler(`Error getting "${this.questId}" "${this.taskId}" task progress`)))}attemptDispatchTaskComplete(){this._popupManager.delayPopupsUntil(this._questManager.isTaskCompleted(this.questId,this.taskId).then((k=>{var B;k&&(null===(B=this.onTaskComplete)||void 0===B||B.dispatch())})).catch(j.RQr.createHandler(`Error getting "${this.questId}" "${this.taskId}" task status`)))}destroy(){var k,B,U,F;null===(B=null===(k=this._questManager)||void 0===k?void 0:k.onQuestTaskStart)||void 0===B||B.remove(this.handleQuestTaskStart,this),null===(F=null===(U=this._questManager)||void 0===U?void 0:U.onQuestTaskComplete)||void 0===F||F.remove(this.handleQuestTaskComplete,this),this.onTaskStart.dispose(),this.onTaskComplete.dispose(),this.onTaskStart=null,this.onTaskComplete=null,super.destroy()}handleQuestTaskStart(k){k.id===this.taskId&&(this._awaitOpenDialogues&&this._dialogueEventController.isDialogueInProgress()?this._dialogueEventController.onComplete.addOnce((()=>{var k;return null===(k=this.onTaskStart)||void 0===k?void 0:k.dispatch()})):this.onTaskStart.dispatch())}handleQuestTaskComplete(k){k.id===this.taskId&&(this._awaitOpenDialogues&&this._dialogueEventController.isDialogueInProgress()?this._dialogueEventController.onComplete.addOnce((()=>{var k;return null===(k=this.onTaskComplete)||void 0===k?void 0:k.dispatch()})):this.onTaskComplete.dispatch())}};(0,G.Cg)([(0,j.Cdj)("a25-68f4"),(0,G.Sn)("design:type",Kr.n)],sl.prototype,"_questManagerHub",void 0),(0,G.Cg)([(0,j.Cdj)("a78-11c7"),(0,G.Sn)("design:type",co.B)],sl.prototype,"_localZoneQuestManager",void 0),(0,G.Cg)([(0,j.gfw)(il.t),(0,G.Sn)("design:type",String)],sl.prototype,"_questTag",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],sl.prototype,"questId",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],sl.prototype,"taskId",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],sl.prototype,"_dispatchStartOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],sl.prototype,"_dispatchCompleteOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],sl.prototype,"onTaskStart",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],sl.prototype,"onTaskComplete",void 0),(0,G.Cg)([(0,j.Cdj)("PopupHandler"),(0,G.Sn)("design:type",el.Y)],sl.prototype,"_popupManager",void 0),(0,G.Cg)([(0,j.Cdj)("b5b-6fa4"),(0,G.Sn)("design:type",mi.rD)],sl.prototype,"_dialogueEventController",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],sl.prototype,"_awaitOpenDialogues",void 0),sl=(0,G.Cg)([(0,j.EVk)("QuestProgressListener",W.Y.quest)],sl);var nl=U(10592);let al=class extends j.uAl{initCurrentQuestID(){this._questID=this._playerDataProvider.player.ultimateQuestId}initCurrentTaskID(){this._taskID=this._playerDataProvider.player.ultimateTaskId}setCollectingItems(){this._playerDataProvider.player.setUltimateSessionStatus(nl.n.CollectingItems,this._questID,this._taskID)}setTrackingNPC(){this._playerDataProvider.player.setUltimateSessionStatus(nl.n.TrackingNPC,this._questID,this._taskID)}setTamingUltimate(){this._playerDataProvider.player.setUltimateSessionStatus(nl.n.TamingUltimate,this._questID,this._taskID)}setNone(){this._playerDataProvider.player.setUltimateSessionStatus(nl.n.None,this._questID,this._taskID)}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],al.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],al.prototype,"_questID",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Object)],al.prototype,"_taskID",void 0),al=(0,G.Cg)([(0,j.EVk)("QuestSessionStatus",W.Y.ultimates)],al);let rl=class extends j.uAl{constructor(){super(...arguments),this._eventType=Wr.T.NONE,this._sendViaQuestHub=!1,this._eventProcessed=new j.HN0}sendEvent(){if(this._eventId)if(this._sendViaQuestHub){const k=this.getInjectedValue("a25-68f4");if(!k)return void j.VyI.log("SendQuestEventIdComponent attempted to send event via Quest Manager Hub, but no Quest Manager Hub was found",j.$bb.Warning);k.sendQuestEventViaHub(this._eventType,{id:this._eventId}).then((()=>this._eventProcessed.dispatch())).catch(j.RQr.createHandler("An error occurred while sending the event via Quest Hub"))}else{const k=this.getInjectedValue(ar.QuestManager);if(!k)return void j.VyI.log("SendQuestEventIdComponent attempted to send event via Quest Manager, but no Quest Manager was found",j.$bb.Warning);k.sendQuestEvent(this._eventType,{id:this._eventId}).then((()=>this._eventProcessed.dispatch())).catch(j.RQr.createHandler("An error occurred while sending the event"))}else j.VyI.log("SendQuestEventIdComponent attempted to send event with an empty id",j.$bb.Warning)}destroy(){this._eventProcessed.dispose(),super.destroy()}};(0,G.Cg)([(0,j.gfw)(Wr.T),(0,G.Sn)("design:type",String)],rl.prototype,"_eventType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],rl.prototype,"_eventId",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],rl.prototype,"_sendViaQuestHub",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rl.prototype,"_eventProcessed",void 0),rl=(0,G.Cg)([(0,j.EVk)("SendQuestEventId",W.Y.quest)],rl);let ol=class extends j.uAl{constructor(){super(...arguments),this._questId=null}updateQuestProgress(){this._questManager.updateQuestProgress(this._questId).catch(j.RQr.createHandler("An error occurred while checking for quest progress"))}};var hl;(0,G.Cg)([(0,j.Cdj)(ar.QuestManager),(0,G.Sn)("design:type",qd.k)],ol.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ol.prototype,"_questId",void 0),ol=(0,G.Cg)([(0,j.EVk)("UpdateQuestProgress",W.Y.quest)],ol),function(k){k.SPEAK_WITH_NPC="SpeakWithNPC",k.OPEN_SHOP="OpenShop",k.LOAD_PREFAB="LoadPrefab"}(hl||(hl={}));var cl=U(94310),dl=U(92240);let ll=class extends j.uAl{constructor(){super(...arguments),this._questTag=il.t.Festival,this._objectStateID=cl.L.FestivalPrizeWheel,this._activeStateObjects=[],this._inactiveStateObjects=[],this._becomeActiveStateObjects=[],this._becomeInactiveStateObjects=[]}postCreate(){this.fetchStateData().then((k=>(0,G.sH)(this,void 0,void 0,(function*(){k&&(this.initializeState(),this.setupCallbacks())})))).catch(j.RQr.createHandler(`Error fetching state data for ${this._objectStateID}`))}fetchStateData(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U;if(this._currentQuestID=this._questID?this._questID:null===(k=this._questManagerHub.questManagerMap.get(this._questTag))||void 0===k?void 0:k.getCurrentQuestID(),!this._currentQuestID)return j.VyI.log(`Quest ID was undefined when attempting to fetch state data for ${this._questTag}`,j.$bb.Verbose),!1;const F=yield null===(B=this._questManagerHub.questManagerMap.get(this._questTag))||void 0===B?void 0:B.getQuestObjectStates(this._currentQuestID);if(!F)return j.VyI.log(`Could not read object state data schema for ${this._currentQuestID}`,j.$bb.Verbose),!1;const G=yield null===(U=this._questManagerHub.questManagerMap.get(this._questTag))||void 0===U?void 0:U.getQuestProgress(this._currentQuestID);return(null==G?void 0:G.tasks)?(this._objectState=yield dl.h.calculateStateWithPreconditions(this._objectStateID,F,G.tasks,new vr.f),!!this._objectState||(j.VyI.log(`No state was found for ${this._objectStateID}`,j.$bb.Verbose),!1)):(j.VyI.log(`Could not read task progress data for ${this._currentQuestID}`,j.$bb.Verbose),!1)}))}initializeState(){var k,B,U,F;this.setupActiveState(),(null===(B=null===(k=this._objectState)||void 0===k?void 0:k.sendQuestEvent)||void 0===B?void 0:B.sendOnInitialize)&&this.handleSendQuestEvent(),(null===(F=null===(U=this._objectState)||void 0===U?void 0:U.loadPrefab)||void 0===F?void 0:F.loadOnInitialize)&&this.handlePrefabLoad()}setupDialogue(){var k,B,U;const F=new mi.rD(tt.q.instance.game),G=[];null===(k=this._objectState.dialogue.dialogueClose)||void 0===k||k.forEach((k=>{switch(k){case hl.OPEN_SHOP:G.push((()=>{var k,B,U,F;const G=null===(B=null===(k=this._objectState)||void 0===k?void 0:k.dialogue)||void 0===B?void 0:B.shopToOpen;"string"==typeof G?tt.q.instance.prodigy.open.dynamicStore({storeKey:G,scrollToSection:null===(F=null===(U=this._objectState)||void 0===U?void 0:U.dialogue)||void 0===F?void 0:F.scrollToSection,origin:{originType:ui.$N.ButtonClick,originId:this._objectStateID}}):"number"==typeof G&&tt.q.instance.prodigy.open.store(G,void 0,void 0,{originType:ui.$N.ButtonClick,originID:this._objectStateID})}));break;case hl.SPEAK_WITH_NPC:G.push((()=>{this._questManagerHub.sendQuestEventViaHub(Wr.T.SPEAK_WITH_NPC,{id:this._npcName}).catch(j.RQr.createHandler("An error occurred while sending the SPEAK_WITH_NPC event via Quest Hub"))}));break;case hl.LOAD_PREFAB:G.push((()=>{this.handlePrefabLoad()}))}})),F.addEvents((null!==(U=null===(B=this._objectState.dialogue)||void 0===B?void 0:B.dialogueArray)&&void 0!==U?U:[]).map((k=>({dialogueData:F.dataProvider.get(k),blockInput:!0}))));F.start(!0,(()=>{G.forEach((k=>k()))}))}setupActiveState(){var k;if(null===(k=this._objectState)||void 0===k?void 0:k.active){if(this._activeStateObjects.forEach((k=>{k.active=this._objectState.active.isActive})),this._inactiveStateObjects.forEach((k=>{k.active=!this._objectState.active.isActive})),void 0!==this._lastEvaluatedActiveState&&this._objectState.active.isActive!==this._lastEvaluatedActiveState){(this._objectState.active.isActive?this._becomeActiveStateObjects:this._becomeInactiveStateObjects).forEach((k=>{k.active=!0,this._objectState.active.stateChangeObjectDuration&&this._objectState.active.stateChangeObjectDuration>0&&(()=>(0,G.sH)(this,void 0,void 0,(function*(){const B=this._objectState.active.stateChangeObjectDuration;yield j.Egh.timeout(B*Kt.s.SECONDS_IN_MS),k&&(k.active=!1)})))().catch(j.RQr.createHandler("Error disabling a state change object"))}))}this._lastEvaluatedActiveState=this._objectState.active.isActive}}handlePrefabLoad(){this._objectState.loadPrefab&&Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(tt.q.instance.prodigy.gameContainer.get("d0e-64fd"),this._objectState.loadPrefab.guid,this._objectState.loadPrefab.injectedValues,this._objectState.loadPrefab.loadAsChild?this.gameObject:void 0).catch(j.RQr.createHandler(`[QuestObjectStateComponent] Could not load prefab: ${Rt.l[this._objectState.loadPrefab.guid]}`))}handleSendQuestEvent(){this._objectState.sendQuestEvent&&(this._questManagerHub.sendQuestEventViaHub(Wr.T.QUEST_OBJECT_STATE_EVALUATED,{id:this._objectStateID}).catch(j.RQr.createHandler("An error occurred while sending the QUEST_OBJECT_STATE_EVALUATED event via Quest Hub")),this._objectState.sendQuestEvent.sendCustomEvent&&this._questManagerHub.sendQuestEventViaHub(this._objectState.sendQuestEvent.customEventType,this._objectState.sendQuestEvent.customEventData).catch(j.RQr.createHandler("An error occurred while sending the a custom object state quest event via Quest Hub")),this._objectState.sendQuestEvent.ignoreCallback&&(this._skipNextEvaluation=!0))}setupCallbacks(){var k;null===(k=this._questManagerHub.questManagerMap.get(this._questTag))||void 0===k||k.onQuestTaskComplete.add((()=>(0,G.sH)(this,void 0,void 0,(function*(){if(this._skipNextEvaluation)return void(this._skipNextEvaluation=!1);(yield this.fetchStateData())&&this.initializeState()}))),this)}interact(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,j,$;(null===(k=this._objectState)||void 0===k?void 0:k.dialogue)?this.setupDialogue():(null===(B=this._objectState)||void 0===B?void 0:B.loadPrefab)&&!(null===(F=null===(U=this._objectState)||void 0===U?void 0:U.loadPrefab)||void 0===F?void 0:F.loadOnInitialize)?this.handlePrefabLoad():(null===(G=this._objectState)||void 0===G?void 0:G.sendQuestEvent)&&!(null===($=null===(j=this._objectState)||void 0===j?void 0:j.sendQuestEvent)||void 0===$?void 0:$.sendOnInitialize)&&this.handleSendQuestEvent()}))}};(0,G.Cg)([(0,j.gfw)(il.t),(0,G.Sn)("design:type",String)],ll.prototype,"_questTag",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ll.prototype,"_questID",void 0),(0,G.Cg)([(0,j.gfw)(cl.L),(0,G.Sn)("design:type",String)],ll.prototype,"_objectStateID",void 0),(0,G.Cg)([(0,j.gfw)(Xd.y),(0,G.Sn)("design:type",String)],ll.prototype,"_npcName",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],ll.prototype,"_activeStateObjects",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],ll.prototype,"_inactiveStateObjects",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],ll.prototype,"_becomeActiveStateObjects",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],ll.prototype,"_becomeInactiveStateObjects",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],ll.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("a25-68f4"),(0,G.Sn)("design:type",Kr.n)],ll.prototype,"_questManagerHub",void 0),ll=(0,G.Cg)([(0,j.EVk)("QuestObjectState",W.Y.quest)],ll);let ul=class extends j.uAl{create(){super.create(),this._setupOnCreate&&this.setupQuestTasks().catch(j.RQr.createHandler("[QuestTaskSetupComponent] Error setting up quest tasks"))}setupQuestTasks(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this._questTasksSetup){this._questTasksSetup=!0;try{yield this._questManagerHub.setupValidTasks()}catch(e){j.RQr.logError(e,"[QuestTaskSetupComponent] Unable to setup tasks via QuestManagerHub")}}}))}};(0,G.Cg)([(0,j.Cdj)("a25-68f4"),(0,G.Sn)("design:type",Kr.n)],ul.prototype,"_questManagerHub",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Zn.PopupHandler),(0,G.Sn)("design:type",el.Y)],ul.prototype,"_popupManager",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ul.prototype,"_setupOnCreate",void 0),ul=(0,G.Cg)([(0,j.EVk)("QuestTaskSetup",W.Y.quest)],ul);var fl,bl=U(37016),pl=U(1717),vl=U(90817);!function(k){k.RulesProgressData="RULES_PROGRESS_DATA",k.RulesModuleEnabled="RULES_MODULE_ENABLED",k.RulesDescriptionKey="RULES_DESCRIPTION_KEY",k.RulesDescriptionArgs="RULES_DESCRIPTION_ARGS",k.RulesShowHelperDialogCallback="RULES_SHOW_HELPER_DIALOG_CALLBACK",k.RulesShowCompleteNowButton="RULES_SHOW_COMPLETE_NOW_BUTTON",k.RulesTooltipArgs="RULES_TOOLTIP_ARGS",k.RulesTooltipCTA="RULES_TOOLTIP_CTA",k.RulesTooltipsEnabled="RULES_TOOLTIPS_ENABLED",k.RulesIconAssetData="RULES_ICON_ASSET_DATA",k.RulesRankIconText="RULES_RANK_ICON_TEXT",k.RulesLevelIconText="RULES_LEVEL_ICON_TEXT",k.RulesProgressPercent="RULES_PROGRESS_PERCENT",k.RulesProgressBarStartValue="RULES_PROGRESS_BAR_START_VALUE",k.RulesProgressBarTargetValue="RULES_PROGRESS_BAR_TARGET_VALUE",k.RulesProgressIsComplete="RULES_PROGRESS_IS_COMPLETE",k.RulesCompletedCountDisplay="RULES_COMPLETED_COUNT_DISPLAY",k.RulesComplete="RULES_ALL_COMPLETE",k.RulesPriorityHelperCallback="RULES_PRIORITY_HELPER_CALLBACK",k.RulesWhiteGloveScreenShowing="RULES_WHITE_GLOVE_SCREEN_SHOWING"}(fl||(fl={}));var gl,ml=U(43579),yl=U(29891);!function(k){k.RestrictionMetNootDialogue1="RestrictionMetNootDialogue1",k.RestrictionMetStartUnlockAnimation="RestrictionMetStartUnlockAnimation",k.RestrictionMetUnlockAnimationPlaying="RestrictionMetUnlockAnimationPlaying",k.RestrictionMetNootDialogue2="RestrictionMetNootDialogue2",k.RestrictionMetFTUEComplete="RestrictionMetFTUEComplete",k.RestrictionNotMetFillProgressBar="RestrictionNotMetFillProgressBar",k.RestrictionNotMetNootDialogue1="RestrictionNotMetNootDialogue1",k.RestrictionNotMetNootDialogue2="RestrictionNotMetNootDialogue2",k.RestrictionNotMetWaitForNext="RestrictionNotMetWaitForNext",k.RestrictionNotMetPlayerInWhiteGloveScreen="RestrictionNotMetPlayerInWhiteGloveScreen",k.RestrictionNotMetStartUnlockAnimation="RestrictionNotMetStartUnlockAnimation",k.RestrictionNotMetUnlockAnimationPlaying="RestrictionNotMetUnlockAnimationPlaying",k.RestrictionNotMetNootDialogue3="RestrictionNotMetNootDialogue3",k.RestrictionNotMetFTUEComplete="RestrictionNotMetFTUEComplete",k.WGRescueNootDialog1="WG-Rescue-NootDialog1",k.WGRescueNootDialog2="WG-Rescue-NootDialog2",k.WGRescueFTUEComplete="WG-Rescue-FTUEComplete"}(gl||(gl={}));const _l=[gl.RestrictionMetNootDialogue1,gl.RestrictionMetStartUnlockAnimation,gl.RestrictionMetUnlockAnimationPlaying,gl.RestrictionMetNootDialogue2,gl.RestrictionMetFTUEComplete],El=[gl.RestrictionNotMetFillProgressBar,gl.RestrictionNotMetNootDialogue1,gl.RestrictionNotMetNootDialogue2,gl.RestrictionNotMetWaitForNext,gl.RestrictionNotMetPlayerInWhiteGloveScreen],wl=[gl.RestrictionNotMetStartUnlockAnimation,gl.RestrictionNotMetUnlockAnimationPlaying,gl.RestrictionNotMetNootDialogue3,gl.RestrictionNotMetFTUEComplete],Tl={[pl.$.Rescue]:[gl.WGRescueNootDialog1,gl.WGRescueNootDialog2,gl.WGRescueFTUEComplete]};class Sl{static get instance(){var k;return null!==(k=this._instance)&&void 0!==k?k:this._instance=new Sl}constructor(){this._segment=tt.q.instance.prodigy.gameContainer.get("c47-20b6")}isBreadcrumbComplete(k){return tt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_RESTRICTIONS,k)}isWhiteGloveFTUEComplete(k){if(!Tl[k])return!0;switch(k){case pl.$.Rescue:return this.isBreadcrumbComplete(ls.B.BREADCRUMB_WHITE_GLOVE_RESCUE_FTUE);case pl.$.MergeRank:return this.isBreadcrumbComplete(ls.B.BREADCRUMB_WHITE_GLOVE_MERGE_FTUE);case pl.$.Element:return this.isBreadcrumbComplete(ls.B.BREADCRUMB_WHITE_GLOVE_ELEMENT_FTUE);case pl.$.Rarity:return this.isBreadcrumbComplete(ls.B.BREADCRUMB_WHITE_GLOVE_RARITY_FTUE);case pl.$.Level:return this.isBreadcrumbComplete(ls.B.BREADCRUMB_WHITE_GLOVE_LEVEL_FTUE);default:return!0}}completeFTUE(k){tt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ls.B.FEATURE_RESTRICTIONS,k)}hasFTUEToShow(k,B){const U=this.isBreadcrumbComplete(ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_MET_FTUE),F=this.isBreadcrumbComplete(ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_PRE_FTUE),G=this.isBreadcrumbComplete(ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_POST_FTUE);return k?!U||F&&!G:!F||!G||!B.every(this.isWhiteGloveFTUEComplete,this)}initializeRestrictionFTUE(k,B,U){if(this.currentRestrictionScreenFTUE)return!1;const F=this.isBreadcrumbComplete(ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_PRE_FTUE),G=this.isBreadcrumbComplete(ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_POST_FTUE);let j,$;return k?F&&!G?(j=wl,$=ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_POST_FTUE):(j=_l,$=ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_MET_FTUE):(j=El,$=ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_PRE_FTUE),!this.isBreadcrumbComplete($)&&void 0!==j&&(this.currentRestrictionScreenFTUE={steps:j,currentStepIndex:0,breadcrumb:$},U.removeAll(this),U.add((()=>{this.currentRestrictionScreenFTUE&&(this.currentRestrictionScreenFTUE.currentStepIndex++,this.playRestrictionScreenStep(B))}),this),this.playRestrictionScreenStep(B),!0)}playRestrictionScreenStep(k){var B;const U=null===(B=this.currentRestrictionScreenFTUE)||void 0===B?void 0:B.steps[this.currentRestrictionScreenFTUE.currentStepIndex];if(this.currentRestrictionScreenFTUE&&U)return k.setValue(U),U===gl.RestrictionNotMetPlayerInWhiteGloveScreen?(this.completeFTUE(ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_PRE_FTUE),void delete this.currentRestrictionScreenFTUE):U===gl.RestrictionNotMetFTUEComplete?(this.completeFTUE(ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_NOT_MET_POST_FTUE),delete this.currentRestrictionScreenFTUE,void this.completeFTUE(ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_MET_FTUE)):U===gl.RestrictionMetFTUEComplete?(this.completeFTUE(ls.B.BREADCRUMB_RESTRICTION_SCREEN_RESTRICTION_MET_FTUE),void delete this.currentRestrictionScreenFTUE):void 0}initializeWhiteGloveScreenFTUE(k,B,U){const F=Tl[k];let G;switch(k){case pl.$.Rescue:G=ls.B.BREADCRUMB_WHITE_GLOVE_RESCUE_FTUE;break;case pl.$.MergeRank:G=ls.B.BREADCRUMB_WHITE_GLOVE_MERGE_FTUE;break;case pl.$.Element:G=ls.B.BREADCRUMB_WHITE_GLOVE_ELEMENT_FTUE;break;case pl.$.Rarity:G=ls.B.BREADCRUMB_WHITE_GLOVE_RARITY_FTUE;break;case pl.$.Level:G=ls.B.BREADCRUMB_WHITE_GLOVE_LEVEL_FTUE;break;default:return}!this.isBreadcrumbComplete(G)&&F&&(this.currentWhiteGloveScreenFTUE={steps:F,currentStepIndex:0,breadcrumb:G},U.add((()=>{this.currentWhiteGloveScreenFTUE&&(this.currentWhiteGloveScreenFTUE.currentStepIndex++,this.playWhiteGloveScreenStep(B))})),this.playWhiteGloveScreenStep(B))}playWhiteGloveScreenStep(k){var B;const U=null===(B=this.currentWhiteGloveScreenFTUE)||void 0===B?void 0:B.steps[this.currentWhiteGloveScreenFTUE.currentStepIndex];if(this.currentWhiteGloveScreenFTUE&&U)if(k.setValue(U),U!==gl.WGRescueNootDialog1){if(U!==gl.WGRescueNootDialog2)return U===gl.WGRescueFTUEComplete?(this.completeFTUE(this.currentWhiteGloveScreenFTUE.breadcrumb),void delete this.currentWhiteGloveScreenFTUE):void 0;this._segment.whiteGlove.sendRestrictionFTUEEvent("Noot explains paid section")}else this._segment.whiteGlove.sendRestrictionFTUEEvent("Noot explains free section")}}var Al;!function(k){k.WHITE_GLOVE_PET_COUNT_PAID_HEADER="WHITE_GLOVE_PET_COUNT_PAID_HEADER",k.WHITE_GLOVE_PET_COUNT_PAID_INFO_SINGLE="WHITE_GLOVE_PET_COUNT_PAID_INFO_SINGLE",k.WHITE_GLOVE_PET_COUNT_PAID_INFO_MULTI="WHITE_GLOVE_PET_COUNT_PAID_INFO_MULTI",k.WHITE_GLOVE_PET_COUNT_FREE_HEADER="WHITE_GLOVE_PET_COUNT_FREE_HEADER",k.WHITE_GLOVE_PET_COUNT_FREE_INFO_SINGLE="WHITE_GLOVE_PET_COUNT_FREE_INFO_SINGLE",k.WHITE_GLOVE_PET_COUNT_FREE_INFO_MULTI="WHITE_GLOVE_PET_COUNT_FREE_INFO_MULTI",k.WHITE_GLOVE_HELPER_HEADER="WHITE_GLOVE_HELPER_HEADER",k.WHITE_GLOVE_HELPER_INFO_SINGLE="WHITE_GLOVE_HELPER_INFO_SINGLE",k.WHITE_GLOVE_HELPER_INFO_MULTI="WHITE_GLOVE_HELPER_INFO_MULTI",k.WHITE_GLOVE_PET_MERGE_FREE_INFO_MULTI="WHITE_GLOVE_PET_MERGE_FREE_INFO_MULTI",k.WHITE_GLOVE_PET_MERGE_FREE_INFO_SINGLE="WHITE_GLOVE_PET_MERGE_FREE_INFO_SINGLE",k.WHITE_GLOVE_PET_MERGE_FREE_HEADER="WHITE_GLOVE_PET_MERGE_FREE_HEADER",k.WHITE_GLOVE_RESTRICTION_TITLE="WHITE_GLOVE_RESTRICTION_TITLE"}(Al||(Al={}));class Cl{constructor(){this.onRestrictionNeedsRechecking=new j.HN0,this.showInsufficientCurrencyTooltip=new j.HN0,this._isInPurchaseOrMemberFlow=!1,this._isWhiteGloveScreenOpen=!1,this.onWhiteGloveScreenOpened=new j.HN0,this.onWhiteGloveScreenClosed=new j.HN0}get isWhiteGloveScreenOpen(){return this._isWhiteGloveScreenOpen}cleanup(){this.onRestrictionNeedsRechecking.dispose(),this.showInsufficientCurrencyTooltip.dispose(),this.onWhiteGloveScreenOpened.dispose(),this.onWhiteGloveScreenClosed.dispose()}getHelperCallback(k,B,U){if(!yo(B,(0,Bt.G)(mo)))return;let F;switch(B){case pl.$.MergeRank:F=this.getMergeRankCallbackHelper(U);break;case pl.$.Rescue:F=this.getRescueCallbackHelper(k,U);break;case pl.$.EvolutionTier:case pl.$.Element:case pl.$.Level:case pl.$.Rarity:default:return}return()=>(0,G.sH)(this,void 0,void 0,(function*(){this._isWhiteGloveScreenOpen||(this._isWhiteGloveScreenOpen=!0,this.onWhiteGloveScreenOpened.dispatch(),this._segment.whiteGlove.sendRestrictionFTUEEvent("White Glove Service screen opened"),yield F())}))}getMergeRankCallbackHelper(k){return()=>(0,G.sH)(this,void 0,void 0,(function*(){const[B,U]=k(),F=U-B,G=this._localizer.getText(1===F?Al.WHITE_GLOVE_PET_MERGE_FREE_INFO_SINGLE:Al.WHITE_GLOVE_PET_MERGE_FREE_INFO_MULTI,F.toString());this.createHelperScreen(Rt.l.PetMergeRestrictionHelperContent,{FREE_HEADER_TEXT:this._localizer.getText(Al.WHITE_GLOVE_PET_MERGE_FREE_HEADER),FREE_INFO_TEXT:G}).catch(j.RQr.createHandler("Error loading access rule helper screen for merge rank")),this._segment.whiteGlove.sendHelperScreenOpenEvent(pl.$.MergeRank,{})}))}getRescueCallbackHelper(k,B){return()=>(0,G.sH)(this,void 0,void 0,(function*(){var U;const F=k?yield this._dynamicStoreNetworkHandler.getRestrictionOffer(k):void 0,G=yield this.buildPetPurchaseInfo(F,B,k),{purchaseContext:$,injectedValues:H}=G,{petsToPurchase:V}=G;$.screen=yield this.createHelperScreen(Rt.l.PetCountRestrictionHelperContent,H,V.length>0),$.buildPurchaseInfo=this.buildPetPurchaseInfo.bind(this);const W=j.Uoy.getInjectedValue($.screen,"TUTORIAL_STRING_STATE"),q=j.Uoy.getInjectedValue($.screen,"TUTORIAL_ADVANCE_SIGNAL");W&&q&&Sl.instance.initializeWhiteGloveScreenFTUE(pl.$.Rescue,W,q.onDispatch);const K=yield Eo.a.isEligibleForFreePetPack();this._segment.whiteGlove.sendHelperScreenOpenEvent(pl.$.Rescue,{offer_data:{pets:V.map((k=>{var B,U,F;return{type:"pet",id:k,name:null!==(F=null===(U=null===(B=Yt.t.getItem("pet",k))||void 0===B?void 0:B.data)||void 0===U?void 0:U.name)&&void 0!==F?F:""}})),cost:null!==(U=null==F?void 0:F.metadata.cost)&&void 0!==U?U:0}},K),tt.q.instance.game.broadcaster.addAppListener(jn.ib.ItemReceived,(U=>{if("pet"===U.type){if(this._isInPurchaseOrMemberFlow)return;this.recheckRequirementsAndUpdateScreens(k,B,$,V.length)}}),this),$.screen.onDestroy.addOnce((()=>{tt.q.instance.game.broadcaster.removeAppListener(jn.ib.ItemReceived,this)}))}))}buildPetPurchaseInfo(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){var F,j;const $=yield Eo.a.isEligibleForFreePetPack(),[H,V]=B(),W=[],q=tt.q.instance.prodigy.gameContainer.get("5c7-e02d");null===(F=null==k?void 0:k.onComplete)||void 0===F||F.forEach((k=>{k.type===yl.s.GOT_PET&&W.push(...k.data.id)}));const K=W.length,z=this._localizer.getText(1===K?Al.WHITE_GLOVE_PET_COUNT_FREE_INFO_SINGLE:Al.WHITE_GLOVE_PET_COUNT_FREE_INFO_MULTI,K),Y=this._localizer.getText(1===K?Al.WHITE_GLOVE_PET_COUNT_PAID_INFO_SINGLE:Al.WHITE_GLOVE_PET_COUNT_PAID_INFO_MULTI,K),Q={featureRequirementName:null!=U?U:"unknown feature",offer:k},X=null!==(j=null==k?void 0:k.metadata.cost)&&void 0!==j?j:0,Z={MAGICOIN_COST:` ${X}`,PET_DATA_ARRAY:W.map((k=>{var B,U,F;return{PET_RARITY:null!==(F=null===(U=null===(B=Yt.t.getItem("pet",k))||void 0===B?void 0:B.data)||void 0===U?void 0:U.rarity)&&void 0!==F?F:io.E.Common,SHOW_ELEMENT_ICON:!0,PET_ID:k}})),FREE_HEADER_TEXT:this._localizer.getText(Al.WHITE_GLOVE_PET_COUNT_FREE_HEADER),FREE_INFO_TEXT:z,PAID_HEADER_TEXT:this._localizer.getText(Al.WHITE_GLOVE_PET_COUNT_PAID_HEADER),PAID_INFO_TEXT:Y,SHOW_MC_BUTTON:!q.isHardCurrencyMemberLocked(X)&&!$,SHOW_MEMBER_BUTTON:q.isHardCurrencyMemberLocked(X)&&!$,ELIGIBLE_FOR_FREE_PET_PACK:$,PURCHASE_PETS_CALLBACK:$?()=>(0,G.sH)(this,void 0,void 0,(function*(){return this.claimFreePetPack(Q,W)})):this.getPurchaseOrConvertCallback(Q,this.purchasePetPack.bind(this,Q,W),B)};return{purchaseContext:Q,injectedValues:Z,petsToPurchase:W}}))}purchasePetPack(k,B){const U=k.offer;if(!U||!k.screen)return;this._isInPurchaseOrMemberFlow=!0,Nt.d.updateInjectedValues(k.screen,{SHOW_LOADING_SPINNER:!0});const F=this._segment.whiteGlove.beginTransaction();this._dynamicStoreNetworkHandler.purchaseItem(U.id).then((()=>(0,G.sH)(this,void 0,void 0,(function*(){var G,$;if(this._dynamicStoreQuestManager.updateQuestProgress().catch(j.RQr.createHandler("RestrictionHelper: Error updating quest progress after purchasing pets")),!k.screen||k.screen.isDestroyed)return;k.screen.destroyDeferred(),k.screen=void 0,this._segment.whiteGlove.sendRestrictionFTUEEvent("Player uses White Glove Service");const{offerId:H,transactionId:V}=this._segment.whiteGlove.sendBundlePurchaseEvent(k.featureRequirementName,null!==($=null===(G=k.offer)||void 0===G?void 0:G.metadata.displayName)&&void 0!==$?$:"unknown offer",B,U.metadata.currency,U.metadata.cost);k.offerId=H,k.transactionId=V,F.flush({source_type:li.C.WhiteGloveService,source_id:k.offerId,transaction_id:k.transactionId,instance_type:fi.N.WhiteGloveOffer,instance_id:k.offerId,sink_type:li.C.WhiteGloveService,sink_id:k.offerId}),Eo.a.tryResetPlayerLastUnmetBattleRequirements(),yield new Rs.I(null,null).doTask({itemDrops:B.map((k=>({type:"pet",ID:k,N:1}))),isFake:!0}).catch(j.RQr.createHandler("RestrictionHelper: Failed to show got item for purchased pets")),this._isInPurchaseOrMemberFlow=!1,this.onRestrictionNeedsRechecking.dispatch()})))).catch(j.RQr.createHandler("RestrictionHelper: Error purchasing pets"))}getPurchaseOrConvertCallback(k,B,U){return()=>(0,G.sH)(this,void 0,void 0,(function*(){var F,G;const{offer:j,screen:$}=k,[H,V]=U(),W=tt.q.instance.prodigy.gameContainer.get("5c7-e02d"),q=this.getPostPurchaseBalance(null!==(F=null==j?void 0:j.metadata.cost)&&void 0!==F?F:0,null!==(G=null==j?void 0:j.metadata.currency)&&void 0!==G?G:27);if(q>=0&&!W.isHardCurrencyMemberLocked(q))return void B();const K=null==$?void 0:$.findComponentInChildren(Or.n);if(!W.isHardCurrencyMemberLocked(q)&&!(yield this.shouldAttemptConversion()))return void this.showNotEnoughCurrencyTooltip();const z=V-H;null==K||K.enableAutomaticUpdates(!1),this._isInPurchaseOrMemberFlow=!0,yield this.openUnifiedConversionFlow(-q,k),null==K||K.enableAutomaticUpdates(!0,!0),this._isInPurchaseOrMemberFlow=!1,this.recheckRequirementsAndUpdateScreens(k.featureRequirementName,U,k,z)}))}shouldAttemptConversion(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=k.hasMembership(),U=(yield k.getMembershipUpsellData()).upgradeOptions.length>0,F=!B||U;return!k.isPlayingAtSchool()&&(F||(0,Bt.G)(dn.l).enabled)&&Us.P.shouldUseUnifiedConversionFlow(en.o.FunnelNotEnoughCurrency)}))}getPostPurchaseBalance(k,B){return tt.q.instance.prodigy.gameContainer.get("5c7-e02d").getBalance(B)-k}openUnifiedConversionFlow(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){return new Promise((U=>{const F={type:"Restricted-Battle",category:"Restrictions",contentId:B.featureRequirementName,adType:Fs.R.Contextual,adVersion:Us.P.getAdVersionFromTriggerCategory("Restrictions")},G=this._segment.purchase.sendFunnelTriggerImpression(F);G&&this._segment.purchase.sendFunnelStart(F,G);tt.q.instance.prodigy.open.unifiedConversionFlow((()=>{U()}),{conversionFunnelName:en.o.FunnelNotEnoughCurrency},Is.k.RestrictionsPurchase,{[hs.FK.OtpMissingMagicoin]:k})}))}))}showNotEnoughCurrencyTooltip(){this.showInsufficientCurrencyTooltip.dispatch()}createHelperScreen(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B={},U=!1){const F=tt.q.instance.prodigy.open.prefabMenu(Rt.l.RestrictionHelperBaseScreen,void 0,!0,!0,!1,{CONTENT_GUID:k,CONTENT_INJECTION_VALUES:B,CURRENCY_DISPLAY_ID:U?27:void 0,HELPER_SCREEN_HEADER:this._localizer.getText(Al.WHITE_GLOVE_HELPER_HEADER),HELPER_SCREEN_INFO:this._localizer.getText(U?Al.WHITE_GLOVE_HELPER_INFO_MULTI:Al.WHITE_GLOVE_HELPER_INFO_SINGLE),SHOW_LOADING_SPINNER:!1,SHOW_INSUFFICIENT_CURRENCY_TOOLTIP_SIGNAL:this.showInsufficientCurrencyTooltip}),G=(yield F.onPrefabLoaded.asPromise())[0];return G.onDestroy.addOnce((()=>{this._isWhiteGloveScreenOpen=!1,this.onWhiteGloveScreenClosed.dispatch()})),G}))}recheckRequirementsAndUpdateScreens(k,B,U,F){const[$,H]=B(),V=H-$;V!==F&&this._dynamicStoreNetworkHandler.getRestrictionOffer(k).then((F=>(0,G.sH)(this,void 0,void 0,(function*(){var G,j,$;if(!F||V<=0)return Eo.a.tryResetPlayerLastUnmetBattleRequirements(),null===(G=U.screen)||void 0===G||G.destroyDeferred(),U.screen=void 0,void this.onRestrictionNeedsRechecking.dispatch();const{purchaseContext:H,injectedValues:W}=yield U.buildPurchaseInfo(F,B,k);H.screen=U.screen;const q=null===($=null===(j=U.screen)||void 0===j?void 0:j.findComponentsInChildren(Lo.B).find((k=>"CONTENT_INJECTION_VALUES"===k.id)))||void 0===$?void 0:$.GameObject;q&&(Nt.d.updateInjectedValues(q,W),this.onRestrictionNeedsRechecking.dispatch())})))).catch(j.RQr.createHandler("Error regenerating restriction offer"))}claimFreePetPack(k,B){this.purchasePetPack(k,B)}}(0,G.Cg)([(0,Gi.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Cl.prototype,"_localizer",void 0),(0,G.Cg)([(0,Gi.b)("9ea-3f44"),(0,G.Sn)("design:type",Pr.v)],Cl.prototype,"_dynamicStoreNetworkHandler",void 0),(0,G.Cg)([(0,Gi.b)("7a1-ff33"),(0,G.Sn)("design:type",bd.s)],Cl.prototype,"_dynamicStoreQuestManager",void 0),(0,G.Cg)([(0,Gi.b)("db5-fb6e"),(0,G.Sn)("design:type",Object)],Cl.prototype,"_featureRequirements",void 0),(0,G.Cg)([(0,Gi.b)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],Cl.prototype,"_segment",void 0);pl.$.Rescue,pl.$.EvolutionTier,pl.$.Element,pl.$.Level,pl.$.MergeRank,pl.$.Rarity,pl.$.Rescue,pl.$.EvolutionTier,pl.$.Element,pl.$.Level,pl.$.MergeRank,pl.$.Rarity,pl.$.Rescue,pl.$.EvolutionTier,pl.$.Element,pl.$.Level,pl.$.MergeRank,pl.$.Rarity;let Ol=class extends Fi.z{constructor(){super(...arguments),this._animatedFillDelayMS=500,this._DEFAULT_NUM_RULES_TO_DISPLAY=1,this._restrictionHelper=new Cl,this._previousProgressValues=[]}create(){super.create();const k=this.getInjectedValue(_o.NumRulesToDisplay);this._previousProgressValues.length=0;for(let B=0;B{this.bindContext().catch(j.RQr.createHandler("[AccessRulesDataProvider] Unable to rebind context after helper dialog"))})),this._restrictionHelper.onWhiteGloveScreenOpened.add((()=>{Nt.d.updateInjectedValues(this.gameObject,{[fl.RulesWhiteGloveScreenShowing]:!0})})),this._restrictionHelper.onWhiteGloveScreenClosed.add((()=>{Nt.d.updateInjectedValues(this.gameObject,{[fl.RulesWhiteGloveScreenShowing]:!1})}))}destroy(){this._restrictionHelper.cleanup(),super.destroy()}bindContext(){return(0,G.sH)(this,arguments,void 0,(function*(k=!1){const B=this.getInjectedValue(_o.NumRulesToDisplay);Nt.d.updateInjectedValues(this.gameObject,this.getAccessRulesData(this.getFeatureRequirement(),null!=B?B:this._DEFAULT_NUM_RULES_TO_DISPLAY,!k))}))}getFeatureRequirement(){return this._selectedMode=this.getInjectedValue(_o.SelectedMode),ml.wS[this._selectedMode]}getAccessRulesData(k,B,U=!1){var F,G,$,H,V;if(!j.Aq$.isDefined(k)||!this.GameObject.activeInHierarchy)return{};let W,q,K=0,z=[];if("number"==typeof k){const B=tt.q.instance.prodigy.gameContainer.get("db5-fb6e").getFeatureRequirementAsset(k).data;z=B.requirements,W=B.name}else z=null!==(F=null==k?void 0:k.requirements)&&void 0!==F?F:[],W=k.name;const Y=Math.min(B,z.length),Q=new Array(Y).fill({RULES_MODULE_ENABLED:!1});let X=0;for(let tt=0;tt=B);tt++){const k=z[tt].kennel;if(!j.Aq$.isDefined(null==k?void 0:k.petCount))continue;const B=Eo.a.getRuleType(k),U=()=>{const U=this.getCurrentProgressCountForRuleType(B,k);return[Math.min(U,k.petCount),k.petCount]},[F,Y]=U(),Z=F===Y;Z&&K++;const J=this.getIconAssetData(B,k),et=B===pl.$.Rescue?[]:[Eo.a.getRuleDescriptionArgs(B,k)],it=this._restrictionHelper.getHelperCallback(W,B,U);Z||q&&B!==pl.$.Rescue||(q=it);let st=!1;W&&(Z?this._loggedInPlayer.player.completedRestrictionProgressBarsSeen.includes(W)||(st=!0,this._loggedInPlayer.player.completedRestrictionProgressBarsSeen.push(W)):this._loggedInPlayer.player.inProgressRestrictionsSeen.includes(W)||(st=!0,this._loggedInPlayer.player.inProgressRestrictionsSeen.push(W)));const nt=[this._previousProgressValues[X],Y,!1],at=[F,Y,st,this._animatedFillDelayMS];Q[X]={[fl.RulesModuleEnabled]:!0,[fl.RulesProgressIsComplete]:Z,[fl.RulesProgressPercent]:F/Y,[fl.RulesProgressBarStartValue]:nt,[fl.RulesProgressBarTargetValue]:at,[fl.RulesIconAssetData]:[null!==(G=null==J?void 0:J.atlas)&&void 0!==G?G:"",null!==($=null==J?void 0:J.frame)&&void 0!==$?$:""],[fl.RulesDescriptionKey]:Eo.a.getRuleDescriptionKey(k),[fl.RulesDescriptionArgs]:[k.petCount.toString(),...et],[fl.RulesTooltipArgs]:et,[fl.RulesRankIconText]:B===pl.$.MergeRank?null===(H=k.mergeRank)||void 0===H?void 0:H.toString():void 0,[fl.RulesLevelIconText]:B===pl.$.Level?null===(V=k.level)||void 0===V?void 0:V.toString():void 0,[fl.RulesTooltipCTA]:this.getRuleGoButtonCTA(B),[fl.RulesShowHelperDialogCallback]:it,[fl.RulesShowCompleteNowButton]:!Z&&j.Aq$.isDefined(it)},this._previousProgressValues[X]=F,X++}const Z=K>=X,J=vl.gz.initialized;return Object.assign(Object.assign(Object.assign(Object.assign({[fl.RulesCompletedCountDisplay]:`${K}/${X}`,[fl.RulesProgressData]:Q,[fl.RulesPriorityHelperCallback]:q},U&&{EncounterBattleRequirementsMet:Z}),Z&&{[fl.RulesComplete]:this._selectedMode}),J&&{[fl.RulesTooltipsEnabled]:!1}),{[fl.RulesWhiteGloveScreenShowing]:this._restrictionHelper.isWhiteGloveScreenOpen})}getCurrentProgressCountForRuleType(k,B){let U=this._loggedInPlayer.player.kennel.getPets();switch(k){case pl.$.EvolutionTier:U=U.filter((k=>{var U,F,G,j,$;return(null!==(j=null===(G=null===(F=null===(U=Yt.t.getItem("pet",k.ID))||void 0===U?void 0:U.data)||void 0===F?void 0:F.evolution)||void 0===G?void 0:G.tier)&&void 0!==j?j:0)>=(null!==($=null==B?void 0:B.evolutionTier)&&void 0!==$?$:0)}));break;case pl.$.Element:U=U.filter((k=>{var U,F;return(null===(F=null===(U=Yt.t.getItem("pet",k.ID))||void 0===U?void 0:U.data)||void 0===F?void 0:F.affinity)===(null==B?void 0:B.affinity)}));break;case pl.$.Level:U=U.filter((k=>{var U,F;return(null!==(U=k.level)&&void 0!==U?U:0)>=(null!==(F=null==B?void 0:B.level)&&void 0!==F?F:0)}));break;case pl.$.MergeRank:U=U.filter((k=>{var U,F,G,j;return(null!==(G=eo.P8.getPetDisplayMergeRank(null!==(U=k.ID)&&void 0!==U?U:0,null!==(F=k.uniqueID)&&void 0!==F?F:""))&&void 0!==G?G:bl.qd.MIN)>=(null!==(j=null==B?void 0:B.mergeRank)&&void 0!==j?j:0)}));break;case pl.$.Rarity:U=U.filter((k=>{var U,F;return(null===(F=null===(U=Yt.t.getItem("pet",k.ID))||void 0===U?void 0:U.data)||void 0===F?void 0:F.rarity)===(null==B?void 0:B.rarity)}));break;case pl.$.Rescue:}return(null==B?void 0:B.unique)&&(U=U.filter(((k,B,U)=>U.findIndex((B=>B.ID===k.ID))===B))),U.length}getIconAssetData(k,B){var U;switch(k){case pl.$.EvolutionTier:return So.evolution;case pl.$.Element:if(null==B?void 0:B.affinity)return So[B.affinity];case pl.$.Level:return So.level;case pl.$.Rescue:return So.rescue;case pl.$.MergeRank:return So.mergeRank;case pl.$.Rarity:const k=io.E[null!==(U=null==B?void 0:B.rarity)&&void 0!==U?U:0].toLowerCase();if(null==B?void 0:B.rarity)return So[k];default:return null}}getRuleGoButtonCTA(k){switch(k){case pl.$.MergeRank:case pl.$.Level:case pl.$.EvolutionTier:return()=>{tt.q.instance.prodigy.prefabFactory.closeAllTooltips(),Nt.d.updateInjectedValues(this.gameObject,{[fl.RulesTooltipsEnabled]:!1}),tt.q.instance.prodigy.open.pets((()=>{Nt.d.updateInjectedValues(this.gameObject,{[fl.RulesTooltipsEnabled]:!0}),this.bindContext().catch(j.RQr.createHandler("[AccessRulesDataProvider] Unable to rebind context after pet book close"))}))};case pl.$.Rescue:case pl.$.Element:case pl.$.Rarity:default:return()=>{tt.q.instance.prodigy.prefabFactory.closeAllTooltips(),tt.q.instance.prodigy.open.menuCloseAll()}}}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Ol.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Ol.prototype,"_bindOnCreate",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ol.prototype,"_animatedFillDelayMS",void 0),Ol=(0,G.Cg)([(0,j.EVk)("AccessRulesDataProvider",j.YH6.injection)],Ol);let Il=class extends Ol{getFeatureRequirement(){return this.getInjectedValue("EncounterBattleRequirements")}setBattleRulesTooltipsEnabled(k){Nt.d.updateInjectedValues(this.gameObject,{[fl.RulesTooltipsEnabled]:k})}};var Dl;Il=(0,G.Cg)([(0,j.EVk)("BattleRulesDataProvider",j.YH6.injection)],Il),function(k){k.BossNameText="BOSS_NAME_TEXT",k.WeaknessIcon="WEAKNESS_ICON",k.RestrictionsBossImage="RESTRICTIONS_BOSS_IMAGE",k.RestrictionsBackgroundImage="RESTRICTIONS_BACKGROUND_IMAGE",k.RestrictionsBannerImage="RESTRICTIONS_BANNER_IMAGE",k.RestrictionsBossName="RESTRICTIONS_BOSS_NAME"}(Dl||(Dl={}));const Rl={14:ps.q.Restriction_banner_gerald,16:ps.q.Restriction_banner_icewyrm,13:ps.q.Restriction_banner_cebollini,15:ps.q.Restriction_banner_oldone,12:ps.q.Restriction_banner_nastycloud,67:ps.q.Restriction_banner_cloakedfire,68:ps.q.Restriction_banner_cloakedice,69:ps.q.Restriction_banner_cloakedplant,70:ps.q.Restriction_banner_cloakedstorm,71:ps.q.Restriction_banner_cloakedwater,72:ps.q.Restriction_banner_cloakedshadow,73:ps.q.Restriction_banner_cloaked,37:ps.q.Restriction_banner_pippet_endgame,54:ps.q.Restriction_banner_puppetmaster_illusion_endgame,55:ps.q.Restriction_banner_puppetmaster_illusion_endgame,56:ps.q.Restriction_banner_puppetmaster_illusion_endgame,57:ps.q.Restriction_banner_puppetmaster_illusion_endgame,58:ps.q.Restriction_banner_puppetmaster_illusion_endgame,59:ps.q.Restriction_banner_puppetmaster},Pl={59:ps.q.Restriction_banner_puppetmaster_endgame},Ml={59:ps.q.Restriction_banner_BG_puppetmaster},Nl={[Ft.A_.BONFIRE]:ps.q.Restriction_banner_BG_bonfire,[Ft.A_.FOREST]:ps.q.Restriction_banner_BG_firefly,[Ft.A_.SHIPWRECK]:ps.q.Restriction_banner_BG_shipwreck,[Ft.A_.SHIVERCHILL]:ps.q.Restriction_banner_BG_shiverchill,[Ft.A_.SKYWATCH]:ps.q.Restriction_banner_BG_skywatch,[Ft.A_.ACADEMY]:ps.q.Restriction_banner_BG_academy,[Ft.A_.BONFIREHARD]:ps.q.Restriction_banner_BG_bonfire,[Ft.A_.FORESTHARD]:ps.q.Restriction_banner_BG_firefly,[Ft.A_.SHIPWRECKHARD]:ps.q.Restriction_banner_BG_shipwreck,[Ft.A_.SHIVERCHILLHARD]:ps.q.Restriction_banner_BG_shiverchill,[Ft.A_.SKYWATCHHARD]:ps.q.Restriction_banner_BG_skywatch},xl={[Ft.A_.BONFIRE]:ps.q.Restriction_banner_wave_bonfire,[Ft.A_.FOREST]:ps.q.Restriction_banner_wave_firefly,[Ft.A_.SHIPWRECK]:ps.q.Restriction_banner_wave_shipwreck,[Ft.A_.SHIVERCHILL]:ps.q.Restriction_banner_wave_shiverchill,[Ft.A_.SKYWATCH]:ps.q.Restriction_banner_wave_skywatch,[Ft.A_.ACADEMY]:ps.q.Restriction_banner_wave_puppetmaster,[Ft.A_.BONFIREHARD]:ps.q.Restriction_banner_wave_hardmode,[Ft.A_.FORESTHARD]:ps.q.Restriction_banner_wave_hardmode,[Ft.A_.SHIPWRECKHARD]:ps.q.Restriction_banner_wave_hardmode,[Ft.A_.SHIVERCHILLHARD]:ps.q.Restriction_banner_wave_hardmode,[Ft.A_.SKYWATCHHARD]:ps.q.Restriction_banner_wave_hardmode},Ll={14:ps.q.Restriction_banner_title_gerald,16:ps.q.Restriction_banner_title_icewyrm,13:ps.q.Restriction_banner_title_cebollini,15:ps.q.Restriction_banner_title_oldone,12:ps.q.Restriction_banner_title_nastycloud,67:ps.q.Restriction_banner_title_cloakedwizard,68:ps.q.Restriction_banner_title_cloakedwizard,69:ps.q.Restriction_banner_title_cloakedwizard,70:ps.q.Restriction_banner_title_cloakedwizard,71:ps.q.Restriction_banner_title_cloakedwizard,72:ps.q.Restriction_banner_title_cloakedwizard,73:ps.q.Restriction_banner_title_cloakedwizard,37:ps.q.Restriction_banner_title_pippet,54:ps.q.Restriction_banner_title_puppetmaster,55:ps.q.Restriction_banner_title_puppetmaster,56:ps.q.Restriction_banner_title_puppetmaster,57:ps.q.Restriction_banner_title_puppetmaster,58:ps.q.Restriction_banner_title_puppetmaster,59:ps.q.Restriction_banner_title_puppetmaster};let kl=class extends Fi.z{create(){super.create(),this._bindOnCreate&&this.bindContext().catch(j.RQr.createHandler("[BossAssetDataProvider] Unable to bind context"))}bindContext(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U;const F=this.getInjectedValue(_o.SelectedBossID),G=tt.q.instance.prodigy.world.getCurrentZone(),$=Yt.t.getItem("boss",parseInt(F)),H=null===(k=null==$?void 0:$.data)||void 0===k?void 0:k.affinity,V=tt.q.instance.prodigy.gameContainer.get("935-4e8b").constants.elementalMultiplier.find((k=>k.name===H)),W=null==V?void 0:V.weakness,q=[Ft.A_.ACADEMY,Ft.A_.ACADEMYHARD,Ft.A_.ACADEMYEXPERT].includes(G)&&j.Aq$.isDefined(Pl[F])?Pl[F]:Rl[F],K=[Ft.A_.ACADEMY,Ft.A_.ACADEMYHARD,Ft.A_.ACADEMYEXPERT].includes(G)&&j.Aq$.isDefined(Ml[F])?Ml[F]:Nl[G];Nt.d.updateInjectedValues(this.gameObject,{[Dl.BossNameText]:null!==(U=null===(B=null==$?void 0:$.data)||void 0===B?void 0:B.name)&&void 0!==U?U:"",[Dl.WeaknessIcon]:[Ve._.Ui_battle_revamp_json,`icon-mini-element-${W}`],[Dl.RestrictionsBossImage]:q,[Dl.RestrictionsBackgroundImage]:K,[Dl.RestrictionsBannerImage]:xl[G],[Dl.RestrictionsBossName]:Ll[F]})}))}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],kl.prototype,"_bindOnCreate",void 0),kl=(0,G.Cg)([(0,j.EVk)("BossAssetDataProvider",j.YH6.injection)],kl);let Bl=class extends j.uAl{constructor(){super(...arguments),this.enable=!0,this._modifiedInput=!1}run(){const k=tt.q.instance.game;k.input.enabled=this.enable,this._modifiedInput=!0,this.enable||k.input.reset(),this.enable=!this.enable}enableInput(){(0,Td.QQ)(tt.q.instance.game,!0),this._modifiedInput=!0}disableInput(){(0,Td.QQ)(tt.q.instance.game,!1),this._modifiedInput=!0}destroy(){this._modifiedInput&&this.enableInput(),super.destroy()}};var Ul;(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Bl.prototype,"enable",void 0),Bl=(0,G.Cg)([(0,j.EVk)("EnableInput",W.Y.input)],Bl),function(k){k.Add="Add",k.Change="Change"}(Ul||(Ul={}));let Fl=class extends j.uAl{constructor(){super(...arguments),this.onOpenDetailedSelection=new j.HN0}create(){super.create(),this._changePetButton.onClick.add((()=>{this.openDetailedSelection()})),this.updatePanelContents().catch(j.RQr.createHandler("YourTeamPetSelectorComponent: Failed to render the your team panel"))}updatePanelContents(){return(0,G.sH)(this,void 0,void 0,(function*(){this.setupEquippedPets()}))}savePlayerTeam(){this._currentPlayer.player.kennel.updated=!0,this._currentPlayer.player.forceSaveCharacter()}setupEquippedPets(){const k=this._currentPlayer.player.kennel.petTeam.filter((k=>!(k instanceof Ih.a)));this.setupEquippedPet(k[0],this._equippedPetLeft),this.setupEquippedPet(k[1],this._equippedPetRight)}setupEquippedPet(k,B){k?(this.setupPetCard(k,B).catch(j.RQr.createHandler("YourTeamPetSelectorComponent: Failed to render a pet card for a currently equipped pet")),B.active=!0):B.active=!1}setupPetCard(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U,F,G,j,$,H,V,W,q,K;const z=Yt.t.getItem("pet",k.data.ID);if(B.children.length>0){const $={PET_ID:k.data.ID,PET_DATA:k.data,NAME:null!==(U=k.data.nickname)&&void 0!==U?U:Qt.J.getLocalizationNameKey(null==z?void 0:z.data),LEVEL:k.data.level,MERGE_RANK:eo.P8.getPetDisplayMergeRank(null!==(F=k.data.ID)&&void 0!==F?F:0,null!==(G=k.data.uniqueID)&&void 0!==G?G:""),ICON:fs.E.getIconForType("pet",null!==(j=k.data.ID)&&void 0!==j?j:0),SHOW_ELEMENT_ICON:!0,SHOW_STAT_ICON:!1};return void Nt.d.updateInjectedValues(B,$)}const Y={PET_ID:null!==($=k.data.ID)&&void 0!==$?$:0,PET_DATA:k.data,NAME:null!==(H=k.data.nickname)&&void 0!==H?H:Qt.J.getLocalizationNameKey(null==z?void 0:z.data),LEVEL:null!==(V=k.data.level)&&void 0!==V?V:0,MERGE_RANK:eo.P8.getPetDisplayMergeRank(null!==(W=k.data.ID)&&void 0!==W?W:0,null!==(q=k.data.uniqueID)&&void 0!==q?q:""),ICON:fs.E.getIconForType("pet",null!==(K=k.data.ID)&&void 0!==K?K:0),SHOW_UPGRADE:!1,SHOW_EVOLVE:!1,SHOW_ON_TEAM:!1,SHOW_GUIDE_HAND:!1,INPUT_ENABLED:!1,SHOW_ELEMENT_ICON:!0,SHOW_STAT_ICON:!1},Q=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.OwnedPetCardInjectionConfiguredMergeRank,Y);if(B.isDestroyed)return void Q.destroy();const X=Q.transform;X.setPivot(.5,.5),X.setAnchorMin(0,0),X.setAnchorMax(0,0),Q.name=`pet-${k.data.ID}`,Q.parent=B}))}openDetailedSelection(){this.openDetailedSelectionScreen("pet").catch(j.RQr.createHandler("YourTeamPetSelectorComponent: Failed to open the detailed selection screen")),this.onOpenDetailedSelection.dispatch()}openDetailedSelectionScreen(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;tt.q.instance.prodigy.prefabFactory.closeAllTooltips(),this._screenContainerParent&&(this._screenContainerParent.active=!0),this._detailedSelectionScreen?this._detailedSelectionScreen.active=!0:(this._detailedSelectionLoadingScreen&&(this._detailedSelectionLoadingScreen.active=!0),this._detailedSelectionScreen=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.LootDashDetailedSelectionScreen,{},this._screenContainer),this._detailedSelectionLoadingScreen&&(null===(B=this._detailedSelectionLoadingScreen.findComponentInChildren(Bl))||void 0===B||B.enableInput(),this._detailedSelectionLoadingScreen.active=!1));const U=this._detailedSelectionScreen.findComponentInChildren(Uh);yield U.setup(k)}))}destroy(){this.onOpenDetailedSelection.dispose(),super.destroy()}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Fl.prototype,"_equippedPetLeft",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Fl.prototype,"_equippedPetRight",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Fl.prototype,"_changePetButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Fl.prototype,"_screenContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Fl.prototype,"_screenContainerParent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Fl.prototype,"_detailedSelectionLoadingScreen",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Fl.prototype,"onOpenDetailedSelection",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Fl.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Fl.prototype,"_currentPlayer",void 0),Fl=(0,G.Cg)([(0,j.EVk)("YourTeamPetSelector",W.Y.uiPet)],Fl);var Gl=U(28559);let jl=class extends j.uAl{constructor(){super(...arguments),this._tooltipGameObject=null,this._isTooltipCreated=!1,this.messageLocalizationArgs=[],this._useIconText=!1,this._resizeToContainer=!1,this._offset=new j.I9Y(0,0),this._useGoButton=!1,this._useCloseButton=!0,this.onTooltipClosed=new j.HN0,this.onGoClicked=new j.HN0}setGoButtonCTA(k){this.onGoClicked.add(k)}showTooltip(k){if(this._tooltipContainer.active=k,k&&!this._isTooltipCreated){tt.q.instance.prodigy.prefabFactory.tooltipsActive()&&tt.q.instance.prodigy.prefabFactory.closeAllTooltips();const k=Object.assign(Object.assign({},Gl.f),{resizeToContainer:this._resizeToContainer,iconGUID:this._iconGUID,useIconText:this._useIconText,layer:this._tooltipLayer,textArgs:this.messageLocalizationArgs,useGoButton:this._useGoButton,useCloseButton:this._useCloseButton,goButtonCTA:()=>this.onGoClicked.dispatch(),offset:this._offset});j.Aq$.isDefined(this._arrowDirection)&&(k.arrowDirection=this._arrowDirection);const B=this._tooltipContainer.transform;this._tooltipGameObject=tt.q.instance.prodigy.prefabFactory.createTooltip(B,this.messageLocalizationKey,k),this._tooltipGameObject.onDestroy.add((()=>{this.onTooltipClosed.dispatch(),this._isTooltipCreated=!1,this._tooltipGameObject=null})),this._isTooltipCreated=!0}else!k&&this._isTooltipCreated&&this.onTooltipClosed.dispatch()}destroy(){this.onTooltipClosed.dispose(),this.onGoClicked.dispose(),super.destroy()}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],jl.prototype,"_tooltipContainer",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],jl.prototype,"messageLocalizationKey",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],jl.prototype,"messageLocalizationArgs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],jl.prototype,"_arrowDirection",void 0),(0,G.Cg)([(0,j.i0J)(j.Z$z.SingleImage),(0,G.Sn)("design:type",String)],jl.prototype,"_iconGUID",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jl.prototype,"_useIconText",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],jl.prototype,"_tooltipLayer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jl.prototype,"_resizeToContainer",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],jl.prototype,"_offset",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jl.prototype,"_useGoButton",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jl.prototype,"_useCloseButton",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],jl.prototype,"onTooltipClosed",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],jl.prototype,"onGoClicked",void 0),jl=(0,G.Cg)([(0,j.EVk)("CreateTooltip",j.YH6.ui)],jl);var $l=U(77997);let Hl=class extends j.uAl{constructor(){super(...arguments),this.onViewing=new j.HN0,this.onEditing=new j.HN0}postCreate(){var k,B;super.postCreate();{const U=tt.q.instance.prodigy.gameContainer.get("80c-6fa4"),F=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=tt.q.instance.prodigy.world.getZone(tt.q.instance.prodigy.world.getCurrentZone()).screen,j=null==G?void 0:G.saveTag.split("-").pop(),$=null!==(B=null===(k=U.getValue($l.v))||void 0===k?void 0:k.houseReportButton)&&void 0!==B&&B;j===F.userID.toString()?this.onEditing.dispatch():$&&this.onViewing.dispatch()}}destroy(){this.onViewing.dispose(),this.onEditing.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hl.prototype,"onViewing",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hl.prototype,"onEditing",void 0),Hl=(0,G.Cg)([(0,j.EVk)("HouseHUDGuard",W.Y.reporting)],Hl);var Vl=U(53040);let Wl=class extends j.uAl{onClick(){return(0,G.sH)(this,void 0,void 0,(function*(){yield Vl.y.openReportHouseConfirmationDialog()}))}};Wl=(0,G.Cg)([(0,j.EVk)("ReportHouse",W.Y.reporting)],Wl);U(87557);var ql=U(76642);class Kl extends j.$KW{constructor(){super(...arguments),this.newSignalValue=""}generate(k,B){var U,F;const G=j.Gme.textGroup({id:"stringValue",labelValue:"String Value",inputValue:k.stringValue}),$=j.Gme.checkboxGroup({id:"checkOnCreate",labelValue:"Check On Create",inputValue:k.checkOnCreate}),H=j.Gme.checkboxGroup({id:"forceChangeOnCreate",labelValue:"Change On Create",inputValue:k.forceChangeOnCreate}),V=j.Gme.checkboxGroup({id:"fireSignalsOnSameValue",labelValue:"Fire Signals On Same Value",inputValue:k.fireSignalsOnSameValue}),W=j.NyS.create({id:"onValueChanged",label:"On Value Changed",signalValue:k.onValueChanged,componentGUID:this._componentGuid}),q=j.NyS.create({id:"onValueChecked",label:"On Value Checked",signalValue:k.onValueChecked,componentGUID:this._componentGuid}),K=null!==(U=k.stateSignals)&&void 0!==U?U:{},z=j.XRp.createVertical([j.bl1.create({id:"addNewSignalInfo",message:"Add custom signals that dispatch when the string value matches the signal name"}),j._Lw.halfBlankLine(),j.XRp.createHorizontal([j.Gme.textGroup({id:"addSignal",labelValue:"Signal Name",inputValue:null!==(F=this.newSignalValue)&&void 0!==F?F:"",onChange:(k,B)=>{this.newSignalValue=B,this._editorAPI.redrawCustomInspector()}}),j.X9M.create({id:"addSignalButton",nodeSize:"1of12",buttonText:"",buttonIcon:j.a2l.Add,buttonDisabled:""===this.newSignalValue,onClick:()=>{var k;this.newSignalValue&&(K[this.newSignalValue]=null!==(k=K[this.newSignalValue])&&void 0!==k?k:[],this._editorAPI.modifyComponent(this._componentGuid,{stateSignals:K}))}})]),j._Lw.halfBlankLine()]),Y=[];return Object.keys(K).forEach((k=>{var B;Y.push(j.XRp.createVerticalContainer([j.X9M.create({id:`deleteSignal-${k}`,buttonText:"Delete Signal",onClick:()=>{delete K[k],this._editorAPI.modifyComponent(this._componentGuid,{stateSignals:K})}}),j.NyS.create({id:`stateSignals-${k}`,label:`String is "${k}"`,signalValue:null!==(B=null==K?void 0:K[k])&&void 0!==B?B:[],componentGUID:this._componentGuid,propertyPath:["stateSignals",k]})],{title:`"${k}" Signal`,isCollapsible:!0,startCollapsed:!0})),Y.push(j._Lw.halfBlankLine())})),j.XRp.createVertical([G,$,H,V,j._Lw.halfBlankLine(),W,q,z,...Y])}}let zl=class extends j.uAl{constructor(){super(...arguments),this.checkOnCreate=!1,this.forceChangeOnCreate=!1,this.fireSignalsOnSameValue=!1,this.onValueChanged=new j.HN0,this.onValueChecked=new j.HN0,this._stateSignals={}}create(){super.create(),this.forceChangeOnCreate&&this.onValueChanged.dispatch(this.stringValue,this.previousValue),this.checkOnCreate&&this.onValueChecked.dispatch(this.stringValue),(this.forceChangeOnCreate||this.checkOnCreate)&&this._stateSignals[this.stringValue]&&this._stateSignals[this.stringValue].dispatch()}setValue(k){(this.fireSignalsOnSameValue||k!==this.stringValue)&&(this.previousValue=this.stringValue,this.stringValue=k,this.onValueChanged.dispatch(this.stringValue,this.previousValue),this._stateSignals[k]&&this._stateSignals[k].dispatch())}goToPreviousValue(){this.setValue(this.previousValue)}checkValue(){this.onValueChecked.dispatch(this.stringValue),this._stateSignals[this.stringValue]&&this._stateSignals[this.stringValue].dispatch()}destroy(){this.onValueChanged.dispose(),this.onValueChecked.dispose(),Object.values(this._stateSignals).forEach((k=>k.dispose())),super.destroy()}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],zl.prototype,"stringValue",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],zl.prototype,"checkOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],zl.prototype,"forceChangeOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],zl.prototype,"fireSignalsOnSameValue",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],zl.prototype,"onValueChanged",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],zl.prototype,"onValueChecked",void 0),(0,G.Cg)([(0,j.OmD)(),(0,j.bbQ)(),(0,j.nKb)("stateSignals"),(0,G.Sn)("design:type",Object)],zl.prototype,"_stateSignals",void 0),zl=(0,G.Cg)([(0,j.WR4)(Kl),(0,j.EVk)("StringState",W.Y.utility)],zl);let Yl=class extends j.uAl{constructor(){super(...arguments),this._tweensToPlayOnUnlock=[],this._unlockSequenceDelayMS=1500,this._advanceTutorialSignal=new ql.S}create(){super.create();const k=this.getInjectedValue("EncounterBattleRequirementsMet"),B=this.getInjectedValue("EncounterBattleRequirements").requirements.map((k=>Eo.a.getRuleType(k.kennel)));Sl.instance.hasFTUEToShow(k,B)&&(this._segment.whiteGlove.initFTUEFunnelId(),this._segment.whiteGlove.sendRestrictionFTUEEvent("Restrictions screen opened"))}handleRequirementsMetChanged(){var k;const B=this.getInjectedValue("EncounterBattleRequirementsMet"),U=this.getInjectedValue("EncounterBattleRequirements");if(!(null==U?void 0:U.name))return;B&&this._segment.whiteGlove.sendRestrictionFTUEEvent("Restricted battle unlocked");!Sl.instance.initializeRestrictionFTUE(B,this._tutorialStringState,this._advanceTutorialSignal.onDispatch)&&this.playIntroAnimations(),this._startFeature.active=B;let F=!1;if(null===(k=null==U?void 0:U.requirements)||void 0===k?void 0:k.length)for(const G of U.requirements){const k=Eo.a.getRuleType(G.kennel);if(yo(k,(0,Bt.G)(mo))){F=!0;break}}this._goToHelperButton.active=!B&&F}playIntroAnimations(){const k=this.getInjectedValue("EncounterBattleRequirementsMet"),B=this.getInjectedValue("EncounterBattleRequirements");if(!(null==B?void 0:B.name))return;if(this.gameObject.findComponentsInChildren(Lo.B,!0).forEach((k=>{k.id===fl.RulesProgressBarTargetValue&&k.consume()})),!k)return;this._advanceTutorialSignal.onDispatch.dispatch();const U=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(U.completedRestrictionUnlockAnimationsSeen.includes(B.name)){this._padlockSpine.GameObject.active=!1;for(const k of this._tweensToPlayOnUnlock)(null==k?void 0:k.GameObject)&&(k.GameObject.active=!1);this._advanceTutorialSignal.onDispatch.dispatch()}else U.completedRestrictionUnlockAnimationsSeen.push(B.name),this._animationDelayTimeoutId=setTimeout((()=>{var k;this._padlockSpine.playAnimation("idle",!1,!0),null===(k=this._unlockSoundEffect)||void 0===k||k.play(),this.playUnlockTweens().then((()=>{this._advanceTutorialSignal.onDispatch.dispatch()})).catch(j.RQr.createHandler("Error playing unlock animation in RestrictionsPopupComponent"))}),this._unlockSequenceDelayMS)}playUnlockTweens(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=[];for(const B of this._tweensToPlayOnUnlock)B&&(k.push(B.onTweenComplete.asPromise()),B.playAnimation());yield Promise.all(k)}))}destroy(){this._segment.whiteGlove.clearFTUEFunnelId(),this._animationDelayTimeoutId&&clearTimeout(this._animationDelayTimeoutId),super.destroy()}};(0,G.Cg)([(0,j.MnK)(j.bTj),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],Yl.prototype,"_tweensToPlayOnUnlock",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],Yl.prototype,"_padlockSpine",void 0),(0,G.Cg)([(0,j.MnK)(hn.J),(0,G.Sn)("design:type",hn.J)],Yl.prototype,"_unlockSoundEffect",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yl.prototype,"_goToHelperButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yl.prototype,"_startFeature",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Yl.prototype,"_unlockSequenceDelayMS",void 0),(0,G.Cg)([(0,j.MnK)(zl),(0,G.Sn)("design:type",zl)],Yl.prototype,"_tutorialStringState",void 0),(0,G.Cg)([(0,j.MnK)(ql.S),(0,G.Sn)("design:type",ql.S)],Yl.prototype,"_advanceTutorialSignal",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],Yl.prototype,"_segment",void 0),Yl=(0,G.Cg)([(0,j.EVk)("RestrictionsPopup",j.YH6.ui,"Consumes the injected value and assigns the value to the referenced property")],Yl);var Ql,Xl=U(24652),Zl=U(74958),Jl=U(58707),tu=U(38560),eu=U(14117),iu=U(37050),su=U(39785);!function(k){k.REROLL="animation"}(Ql||(Ql={}));let nu=class extends j.uAl{destroy(){this._notEnoughCurrencyResponse.tryDismissTooltip(),super.destroy()}updateCachedRiftRunProgress(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._riftsSyncedDataStore.cache.currentRiftRunProgress;return k&&k.type===Xl.cn.Normal?(this._currentRiftRunProgress=k,!0):(j.VyI.log("RiftRunModifierPopupComponent: Cannot reroll modifier if current rift run is undefined",j.$bb.Error),!1)}))}onRerollClicked(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;this._notEnoughCurrencyResponse.tryDismissTooltip();if(!(yield this.updateCachedRiftRunProgress()))return;const B=null!==(k=this._currentRiftRunProgress.numBuffRerolls)&&void 0!==k?k:0,U={currency:27,value:iu.Q.getBuffRerollCost(B)};this._paymentManager.canAfford(U)?(this._mainBodyContent.active=!1,this.performRerollTransaction(U.value).then((()=>{this.showRerollAnimation()})).catch(j.RQr.createHandler("Error rerolling rift modifier"))):this.handleNotEnoughCurrency(U)}))}performRerollTransaction(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=this._segment.item.beginSecureItemTransaction(),U=Object.assign({},this._currentRiftRunProgress.buffModifier);yield this._riftsNetworkHandler.rerollRiftBuffModifier(this._currentRiftRunProgress.currentRiftTier);const F=this._currentRiftRunProgress.buffModifier,G=Object.assign(Object.assign({},this._segment.rifts.getRiftTransactionData()),{sink_type:Zl.Aj.RIFT_BONUS_REROLL_TYPE,sink_id:xt.$.generateUID()});this._segment.rifts.sendRiftRunBonusRerolled(F,U,k,G.transaction_id,G.sink_id),B.flush(G)}))}showRerollAnimation(){Nt.d.updateInjectedValues(this.gameObject,{MODIFIER_CARD_HEADER:"RIFTS_MODIFIER_REROLL"}),this._rerollAnimationSpine.GameObject.active=!0,this._rerollAnimationSpine.setAnimationByName(0,Ql.REROLL,!1),this._rerollAnimationSpine.onEvent.addOnce(((k,B)=>{this._mainBodyContent.active=!0,this.refreshModifier().catch(j.RQr.createHandler("RiftRunModifierPopupComponent: Error refreshing modifier after reroll animation")),Nt.d.updateInjectedValues(this.gameObject,{MODIFIER_CARD_HEADER:"TAKE_THIS_TO_HELP"})}),this),this._rerollAnimationSpine.getSpine().onComplete.addOnce((()=>{this._rerollAnimationSpine.GameObject.active=!1}),this)}refreshModifier(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;yield this.updateCachedRiftRunProgress();const B=null!==(k=this._currentRiftRunProgress.numBuffRerolls)&&void 0!==k?k:0,U=iu.Q.canRerollBuff(B),F=iu.Q.getBuffRerollCost(B),G=this._currentRiftRunProgress.buffModifier,j=tt.q.instance.prodigy.gameContainer.get("5c7-e02d");Nt.d.updateInjectedValues(this.GameObject,{IS_BUFF:!0,MODIFIER_ICON:(null==G?void 0:G.icon)?su.n.getGuidForModifierIcon(G.icon):"",MODIFIER_NAME:null==G?void 0:G.caption,MODIFIER_DESCRIPTION:null==G?void 0:G.description,MODIFIER_GOLD_BONUS:0,MODIFIER_REROLL_COST:F,SHOW_MC_COST:!j.isHardCurrencyMemberLocked(F),SHOW_MEMBER_ICON:j.isHardCurrencyMemberLocked(F),CAN_REROLL_MODIFIER:U,MAGICOIN_BALANCE:j.getBalance(27),RIFT_TIER:this._currentRiftRunProgress.currentRiftTier})}))}updateRerollButtons(k){this._rerollButtons.active=k,this._okayButton.active=!k}handleNotEnoughCurrency(k){const B=JSON.stringify(this._currentRiftRunProgress.buffModifier);this._notEnoughCurrencyResponse.handleNotEnoughCurrency(k,Zl.Aj.RIFT_BONUS_REROLL_TYPE,B)}};(0,G.Cg)([(0,Gi.b)("8f8-d5bc"),(0,G.Sn)("design:type",tu.B)],nu.prototype,"_riftsNetworkHandler",void 0),(0,G.Cg)([(0,Gi.b)("9ac-9677"),(0,G.Sn)("design:type",eu.M)],nu.prototype,"_riftsSyncedDataStore",void 0),(0,G.Cg)([(0,Gi.b)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],nu.prototype,"_segment",void 0),(0,G.Cg)([(0,j.Cdj)("743-fd51"),(0,G.Sn)("design:type",qn.E)],nu.prototype,"_paymentManager",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],nu.prototype,"_rerollButtons",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],nu.prototype,"_okayButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],nu.prototype,"_mainBodyContent",void 0),(0,G.Cg)([(0,j.MnK)(Jl.b),(0,G.Sn)("design:type",Jl.b)],nu.prototype,"_notEnoughCurrencyResponse",void 0),(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],nu.prototype,"_rerollAnimationSpine",void 0),nu=(0,G.Cg)([(0,j.EVk)("RiftRunModifierPopupComponent",W.Y.rifts)],nu);U(82436);var au,ru=U(45224);!function(k){k.Bunny="Bunny",k.Fox="Fox"}(au||(au={}));let ou=class extends j.uAl{constructor(){super(...arguments),this.onAllyDialogue=new j.HN0,this.onEnemyDialogue=new j.HN0,this.onNeutralDialogue=new j.HN0,this._faction=au.Bunny}run(){const k=this._loggedInPlayer.player.equipment.getHat(),B=this._faction===au.Bunny?ru.f.BUNNY_HATS:ru.f.FOX_HATS,U=this._faction===au.Bunny?ru.f.FOX_HATS:ru.f.BUNNY_HATS;B.includes(k)?this.onAllyDialogue.dispatch():U.includes(k)?this.onEnemyDialogue.dispatch():this.onNeutralDialogue.dispatch()}destroy(){this.onAllyDialogue.dispose(),this.onEnemyDialogue.dispose(),this.onNeutralDialogue.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ou.prototype,"onAllyDialogue",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ou.prototype,"onEnemyDialogue",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ou.prototype,"onNeutralDialogue",void 0),(0,G.Cg)([(0,j.gfw)(au),(0,G.Sn)("design:type",String)],ou.prototype,"_faction",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],ou.prototype,"_loggedInPlayer",void 0),ou=(0,G.Cg)([(0,j.EVk)("SpringfestNPC",W.Y.festival)],ou);U(66840);var hu=U(21001),cu=U(77823),du=(U(86323),U(64019),U(15160),U(35856),U(83441),U(571)),lu=U(10670),uu=U(52850);let fu=class extends j.uAl{constructor(){super(...arguments),this._maxPlayerNameLength=22,this._singleInvite=null}postCreate(){super.postCreate(),this.onDuelInviteUpdate()}onDuelInviteUpdate(){if(!this.isCreated)return;const k=uu.e.getActiveInvites(),B=k.length>0;if(this._contentContainer.active=B,B){const B=k.length>1;if(this._opponentNameText.GameObject.active=!B,this._singleOpponentLineText.GameObject.active=!B,this._multipleOpponentLineText.GameObject.active=B,this._duelButton.GameObject.active=!B,this._passButton.GameObject.active=!B,this._viewButton.GameObject.active=B,B)this.destroyOpponentPreview();else{this._singleInvite=k[0];const B=uu.e.getPlayerFromInvite(this._singleInvite);this.gameObject.active=!1,this.setOpponentData(B).catch(j.RQr.createHandler("Failed to set opponent data for duel invite notification")).finally((()=>this.gameObject.active=!0))}}}acceptSingleInvite(){uu.e.acceptInvite(lu.VB.Standard,this._singleInvite)}rejectSingleInvite(){uu.e.rejectInvite(this._singleInvite),this._contentContainer.active=!1}setOpponentData(k){return(0,G.sH)(this,void 0,void 0,(function*(){this.destroyOpponentPreview();const B=this._opponentContainer.findComponent(Za.B).getRootContainer(),U=yield du.z.createHeadFromAppearanceData({hair:k.appearance.getHair(),eyeColor:k.appearance.getEyeColor(),face:k.appearance.getFace(),hat:k.equipment.getHat(),skin:k.appearance.getSkinColor(),outfit:k.equipment.getOutfit(),weapon:k.equipment.getWeapon(),boot:k.equipment.getBoots(),costume:k.equipment.getCostume()});B.addChild(U);let F=k.getName();F.length>this._maxPlayerNameLength&&(F=`${F.substr(0,this._maxPlayerNameLength)}...`),this._opponentNameText.text=F}))}destroyOpponentPreview(){this._opponentContainer.findComponent(Za.B).getRootContainer().removeChildren()}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fu.prototype,"_opponentContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fu.prototype,"_contentContainer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],fu.prototype,"_opponentNameText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],fu.prototype,"_singleOpponentLineText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],fu.prototype,"_multipleOpponentLineText",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],fu.prototype,"_duelButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],fu.prototype,"_passButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],fu.prototype,"_viewButton",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],fu.prototype,"_maxPlayerNameLength",void 0),fu=(0,G.Cg)([(0,j.EVk)("DuelInviteNotification",W.Y.multiplayer)],fu);U(89584),U(29143),U(46352),U(72748),U(18278),U(88331),U(75935);let bu=class extends j.uAl{constructor(){super(...arguments),this._onTextMessageFinished=new j.HN0,this._messageCancellation={},this._messageQueue=[],this._pinnedMessagePromises=[]}create(){super.create(),this._onScreenY=this.gameObject.transform.localPosition.y,this.gameObject.transform.setPositionY(this._onScreenY-this._slideDistance)}showMessage(k,...B){this.showMessageForMs(this._holdMs,k,...B)}showMessageForMs(k,B,...U){const F=this._localizer.getText.apply(this._localizer,[B,...U]);this._messageQueue.push({message:F,holdTimeMs:k}),this.runQueue().catch(j.RQr.createHandler("Error showing message"))}waitForMessage(k,...B){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.waitForMessageForMs(this._holdMs,k,...B)}))}waitForMessageForMs(k,B,...U){return(0,G.sH)(this,void 0,void 0,(function*(){this.showMessageForMs(k,B,...U),this._slideTween&&(yield this._onTextMessageFinished.asPromise())}))}showPinnedMessage(k,...B){this.unpinMessage();const U=this._localizer.getText.apply(this._localizer,[k,...B]),F=new j.bnh;this._messageQueue.push({message:U,pinPromise:F}),this._pinnedMessagePromises.push(F),this.runQueue().catch(j.RQr.createHandler("Error showing message"))}waitForPinnedMessage(k,...B){return(0,G.sH)(this,void 0,void 0,(function*(){this.showPinnedMessage(k,...B),this._slideTween&&(yield this._onTextMessageFinished.asPromise())}))}unpinMessage(){const k=this._pinnedMessagePromises.shift();j.Aq$.isDefined(k)&&(k.resolve(),ct.remove(this._messageQueue,(B=>B.pinPromise===k)))}clearMessageQueue(){var k;this._slideTween&&(this._messageCancellation.cancelled=!0,this._messageCancellation={},null===(k=this._slideTween.onTweenComplete)||void 0===k||k.dispatch(),this._slideTween.stop(),tt.q.instance.game.tweens.remove(this._slideTween),this._slideTween=null),this._pinnedMessagePromises=[],this.gameObject.transform.setPositionY(this._onScreenY-this._slideDistance),this._messageQueue=[]}destroy(){this.clearMessageQueue(),this._onTextMessageFinished.dispose(),super.destroy()}runQueue(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;if(this._slideTween||!this.gameObject)return;const B=this._messageCancellation={};for(;this._messageQueue.length>=1;){const U=this._messageQueue.shift();if(this._textComponent.text=U.message,yield this.tweenBanner(1,this._slideInMs),B.cancelled)return;if(j.Aq$.isDefined(U.pinPromise)?yield U.pinPromise:yield j.Egh.timeout(null!==(k=U.holdTimeMs)&&void 0!==k?k:this._holdMs),B.cancelled)return;yield this.tweenBanner(0,this._slideOutMs)}this._slideTween=null,this._messageCancellation={},this._onTextMessageFinished.dispatch()}))}tweenBanner(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U={value:1-k},F=this._slideTween=tt.q.instance.game.add.tween(U,this,!0).to({value:k},B,j.GS3.Linear.None,!0);F.onUpdate.add((()=>{const k=U.value+.5*Math.sin(U.value*Math.PI);this.gameObject.transform.setPositionY(j.cj9.linear(this._onScreenY-this._slideDistance,this._onScreenY,k))})),yield F.onTweenComplete.asPromise()}))}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],bu.prototype,"_textComponent",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],bu.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],bu.prototype,"_slideInMs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],bu.prototype,"_holdMs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],bu.prototype,"_slideOutMs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],bu.prototype,"_slideDistance",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],bu.prototype,"_onTextMessageFinished",void 0),bu=(0,G.Cg)([(0,j.EVk)("TextLog",W.Y.battleRevamp)],bu);U(96711),U(99057),U(19176),U(47215),U(37987),U(45855);var pu=U(43516),vu=U(91620),gu=U(96797);let mu=class extends Fi.z{create(){super.create(),this._bindOnCreate&&this.bindContext()}bindContext(){const k=tt.q.instance.prodigy.gameContainer.get("c47-20b6"),B=this._segmentedOffersDataProvider.currentOfferStatus,U=this._segmentedOffersDataProvider.activeOffer;if(!j.Aq$.isDefined(U)||!this._segmentedOffersDataProvider.userCanReceiveSegmentedOffers())return void this.unbindContext();this._context.Container.rebind(hs.ht.SegmentedOffersTimeRemainingMS).toConstantValue(gu.P.getOfferTimeRemaining(U)),this._context.Container.rebind(hs.ht.SegmentedOfferCurrentOfferStatus).toConstantValue(B);const F=Object.assign({[hs.ht.SegmentedOffersTimeRemainingMS]:gu.P.getOfferTimeRemaining(U),[hs.ht.SegmentedOffersEnding]:gu.P.isOfferInGracePeriod(this._segmentedOffersDataProvider.activeOffer),[hs.ht.SegmentedOffersRejected]:this._segmentedOffersDataProvider.rejectActiveOffer.bind(this._segmentedOffersDataProvider),[hs.ht.SegmentedOffersFunnelAdvancedCTA]:gu.P.sendCtaFunnelAdvancedEvent.bind(this,k,this._segmentedOffersDataProvider.activeOffer),[hs.ht.SegmentedOffersFunnelAdvancedGotMembership]:gu.P.sendMembershipFunnelAdvancedEvent.bind(this,k,this._segmentedOffersDataProvider.activeOffer)},gu.P.getItemInjectableProperties(this._segmentedOffersDataProvider.rewardsForCurrentUserSegment));this._context.Container.rebind(hs.ht.SegmentedOffersModalInjectableProperties).toConstantValue(F),this.gameObject.findComponentsInChildren(Lo.B,!1).forEach((k=>k.consume()))}unbindContext(){this._context.Container.rebind(hs.ht.SegmentedOffersTimeRemainingMS).toConstantValue(0),this._context.Container.rebind(hs.ht.SegmentedOfferCurrentOfferStatus).toConstantValue(pu.v.NO_ACTIVE_OFFER),this._context.Container.rebind(hs.ht.SegmentedOffersModalInjectableProperties).toConstantValue({}),this.gameObject.findComponentsInChildren(Lo.B,!1).forEach((k=>k.consume()))}sendInterfaceOpenEvents(){if(!this._segmentedOffersDataProvider.activeOffer)return;const k=tt.q.instance.prodigy.gameContainer.get("c47-20b6");gu.P.sendInterfaceOpenEvents(k,this._segmentedOffersDataProvider.activeOffer,this._loggedInPlayer.player,!1)}};(0,G.Cg)([(0,j.Cdj)("a02-c2b2"),(0,G.Sn)("design:type",vu.D)],mu.prototype,"_segmentedOffersDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],mu.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],mu.prototype,"_bindOnCreate",void 0),mu=(0,G.Cg)([(0,j.EVk)("Segmented Offers - Access Point Data Provider",W.Y.ui,"Data provider for the Segmented Offers access point hud icon and popup")],mu);let yu=class extends j.PQK{installBindings(){const k=tt.q.instance.prodigy.gameContainer.get("c47-20b6"),B=tt.q.instance.prodigy.gameContainer.get("a02-c2b2");if(this.Container.bind(hs.ht.SegmentedOfferCurrentOfferStatus).toConstantValue(B.currentOfferStatus),!B.activeOffer)return void j.VyI.log("[SegmentedOffersInstaller] No active offer",j.$bb.Warning);this.Container.bind(hs.ht.SegmentedOffersTimeRemainingMS).toConstantValue(gu.P.getOfferTimeRemaining(B.activeOffer)),this.Container.bind(hs.ht.SegmentedOffersEnding).toConstantValue(gu.P.isOfferInGracePeriod(B.activeOffer)),this.Container.bind(hs.ht.SegmentedOffersRejected).toConstantValue(B.rejectActiveOffer.bind(B)),this.Container.bind(hs.ht.SegmentedOffersFunnelAdvancedCTA).toConstantValue(gu.P.sendCtaFunnelAdvancedEvent.bind(this,k,B.activeOffer)),this.Container.bind(hs.ht.SegmentedOffersFunnelAdvancedGotMembership).toConstantValue(gu.P.sendMembershipFunnelAdvancedEvent.bind(this,k,B.activeOffer));const U=gu.P.getItemInjectableProperties(B.rewardsForCurrentUserSegment);for(const F in U)this.Container.bind(F).toConstantValue(U[F])}};yu=(0,G.Cg)([(0,j.Og1)("SegmentedOffersInstaller","Installer")],yu);var _u=U(2980),Eu=U(77510);let wu=class extends j.uAl{constructor(){super(),this.onPauseButtonClicked=new j.HN0,this._stateChallengesService.onPauseButtonClicked.add((k=>this.onPauseButtonClicked.dispatch(k)))}destroy(){super.destroy(),this.onPauseButtonClicked.dispose(),this._stateChallengesService.onPauseButtonClicked.remove((k=>this.onPauseButtonClicked.dispatch(k)))}toggleMenuPause(){this._stateChallengesService.toggleMenuPause()}};(0,G.Cg)([(0,j.Cdj)("a94-4ba3"),(0,G.Sn)("design:type",Eu.z)],wu.prototype,"_stateChallengesService",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],wu.prototype,"onPauseButtonClicked",void 0),wu=(0,G.Cg)([(0,j.EVk)("StateChallengesService",W.Y.stateChallenges),(0,G.Sn)("design:paramtypes",[])],wu);var Tu,Su,Au=U(54140),Cu=U(54865),Ou=U(76846),Iu=U(59114),Du=U(63546),Ru=U(77713),Pu=U(37623),Mu=U(4766),Nu=U(8820);!function(k){k.CLASSROOM="CLASSROOM",k.SCHOOL="SCHOOL",k.NO_CLASS="NO_CLASS"}(Tu||(Tu={})),function(k){k.Default="Default",k.Qualified="Qualified",k.Champion="Champion",k.NationalCup="NationalCup"}(Su||(Su={}));class xu extends Du.${constructor(){super(...arguments),this._currentLeaderboardView=_u.W.SCHOOL,this._classroomRacerIds=[],this._schoolRacerIds=[],this._classroomPortraitIds=[],this._schoolPortraitIds=[]}enter(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;this._stateChallengesService=tt.q.instance.prodigy.gameContainer.get("a94-4ba3");const U=tt.q.instance.prodigy.gameContainer.get("43a-6f08");yield U.sendClassCodeQuestEvent().catch(j.RQr.createHandler("CurrentStateChallengeViewState: Error completing class code quest")),(yield U.isPreviousChallengeStarted())||(yield U.sendCurrentChallengeStartedEvent().catch(j.RQr.createHandler("CurrentStateChallengeViewState: Error starting current challenge"))),this._stateChallengesDataProvider=k.stateChallengesDataProvider,this._prefabGUID=Rt.l.CurrentStateChallengeView;const F=yield this._stateChallengesDataProvider.getCurrentSchoolRanking();this._currentLeaderboardView=void 0!==F&&F>=xu.LOW_PERFORMANCE_CUTOFF_RANK?_u.W.CLASSROOM:_u.W.SCHOOL,this._menuRootObject=k.rootMenuObject,this._classroomRacerIds=k.classroomRacerIds,this._schoolRacerIds=k.schoolRacerIds,this._classroomPortraitIds=k.classroomPortraitIds,this._schoolPortraitIds=k.schoolPortraitIds;const G=j.wa5.getActiveScene().container.sourceContainer,$=G.get("STATE_CHALLENGES_GOALS_DATA_PROVIDER"),H=$.GameObject.findComponentInChildren(j.bE_,!0);H||$.onDataReady.addOnce((k=>{Nt.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_MILESTONE_WIDGET_VISIBLE:!0})}));const V=this._stateChallengesDataProvider.getStateChallengesLeaderboard(_u.W.SCHOOL),W=this._stateChallengesDataProvider.getStateChallengesLeaderboard(_u.W.CLASSROOM),q=yield this._stateChallengesDataProvider.getSchoolQualificationStatus(),K=this.getDisplayMode(q),z=It.O.localeCode,Y=this._stateChallengesDataProvider.finalsPhaseStartDate;this._prefabInjectionValues=Object.assign(Object.assign(Object.assign({},this.getInjectionsForMode(K,Y,z)),{STATE_CHALLENGES_MILESTONE_WIDGET_VISIBLE:j.Aq$.isDefined(H),STATE_CHALLENGES_LEADERBOARD_TYPE:this._currentLeaderboardView,STATE_CHALLENGES_CURRENT_CLASS_DESC:W.competitorEntries.values.length>0?Pu.O.STATE_CHALLENGES_CLASS_DESCRIPTION:Pu.O.STATE_CHALLENGES_ONLY_CLASS_DESCRIPTION,STATE_CHALLENGES_CLASS_VIEW_NAME:null!==(B=W.myEntry.displayName)&&void 0!==B?B:"",STATE_CHALLENGES_CLASS_RANK_DELTA:W.myEntry.rankDeltaValue,STATE_CHALLENGES_CLASS_RANK_DELTA_ABS:Math.abs(W.myEntry.rankDeltaValue),STATE_CHALLENGES_SCHOOL_TAB_DATA:{label:this._localizer.getText(Pu.O.YOUR_SCHOOL),metadata:{leaderboard:_u.W.SCHOOL}},STATE_CHALLENGES_CLASS_TAB_DATA:{label:this._localizer.getText(Pu.O.YOUR_CLASS),metadata:{leaderboard:_u.W.CLASSROOM}},STATE_CHALLENGES_TOGGLE_GROUP_CALLBACK:this.onTabSelected.bind(this)}),this.setupChallengeBanner(F>=xu.LOW_PERFORMANCE_CUTOFF_RANK?W:V)),this.spawnRacers();const Q=j.wa5.getActiveScene().container.sourceContainer.get(Iu.Tz.STATE_CHALLENGES_BG_IDLE_TWEEN);G.get(Iu.Tz.STATE_CHALLENGES_BG_INTRO_TWEEN).resetToStart(),Q.resetToStart(),this._stateChallengesService&&this._stateChallengesService.isMenuPaused?Q.pauseAnimation():Q.playAnimation(),this._prefabGUID&&(this._prefabRoot=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGUID,this._prefabInjectionValues,k.rootMenuObject),Nt.d.updateInjectedValues(k.rootMenuObject,{[Iu.E2.STATE_CHALLENGES_SHOW_HEADER]:!0}))}))}getDisplayMode(k){return this._stateChallengesDataProvider.viewableCompetitionPhase===Nu.a.NationalCup?Su.NationalCup:k.wonStateChallenge?Su.Champion:k.qualifiedForNationalCup?Su.Qualified:Su.Default}getInjectionsForMode(k,B,U){const F=this.getDefaultStateChallengeInjections();switch(k){case Su.Champion:return Object.assign(Object.assign({},F),this.getChampionInjectionOverrides(B,U));case Su.Qualified:return Object.assign(Object.assign({},F),this.getQualifiedInjectionOverrides());case Su.NationalCup:return Object.assign(Object.assign({},F),this.getNationalCupInjectionOverrides());default:return F}}getDefaultStateChallengeInjections(){const k=Mu.H.getDaysUntilEndOfCurrentChallenge(this._stateChallengesDataProvider.activeCompetitionPhase,new Date(Date.now()),this._stateChallengesDataProvider.endDate).toString();return{STATE_CHALLENGES_SCHOOL_NATIONAL_QUALIFIED:!1,STATE_CHALLENGES_SCHOOL_INNER_QUALIFIER_BANNER_VISIBLE:!1,STATE_CHALLENGES_HAS_WON:!1,STATE_CHALLENGES_CURRENT_VIEW_SUBTITLE_KEY:Pu.O.STATE_CHALLENGES_ON_NOW,STATE_CHALLENGES_CURRENT_VIEW_TITLE:Au.X.getCurrentChallengeDisplayName(this._stateChallengesDataProvider.viewableCompetitionPhase),STATE_CHALLENGES_CURRENT_VIEW_DESCRIPTION:Pu.O.STATE_CHALLENGE_DESCRIPTION,STATE_CHALLENGES_TIME_REMAINING:Pu.O.STATE_CHALLENGES_ENDS_IN,STATE_CHALLENGES_TIME_REMAINING_ARGS:k}}getChampionInjectionOverrides(k,B){const U=Mu.H.getDaysUntilEndOfCurrentChallenge(this._stateChallengesDataProvider.activeCompetitionPhase,new Date(Date.now()),this._stateChallengesDataProvider.endDate).toString();return Object.assign({STATE_CHALLENGES_SCHOOL_NATIONAL_QUALIFIED:!0,STATE_CHALLENGES_HAS_WON:!0,STATE_CHALLENGES_CURRENT_VIEW_SUBTITLE_KEY:Pu.O.CHEST_REWARD_CONGRATULATIONS,STATE_CHALLENGES_CURRENT_VIEW_TITLE:this._localizer.getText(Pu.O.STATE_CHALLENGES_CHAMPION_TITLE),STATE_CHALLENGES_CURRENT_VIEW_DESCRIPTION:Pu.O.STATE_CHALLENGES_CHAMPION_DESCRIPTION},k?{STATE_CHALLENGES_TIME_REMAINING:Pu.O.STATE_CHALENGES_STARTS,STATE_CHALLENGES_TIME_REMAINING_ARGS:k.toLocaleString(B,{month:"long",day:"numeric"})}:{STATE_CHALLENGES_TIME_REMAINING_ARGS:U})}getQualifiedInjectionOverrides(){return{STATE_CHALLENGES_SCHOOL_NATIONAL_QUALIFIED:!0,STATE_CHALLENGES_SCHOOL_INNER_QUALIFIER_BANNER_VISIBLE:!0,STATE_CHALLENGES_CURRENT_VIEW_DESCRIPTION:Pu.O.STATE_CHALLENGES_QUALIFIED_DESCRIPTION}}getNationalCupInjectionOverrides(){return{STATE_CHALLENGES_CURRENT_VIEW_DESCRIPTION:Pu.O.NATIONAL_CUP_DESCRIPTION,STATE_CHALLENGES_SCHOOL_NATIONAL_QUALIFIED:!0,STATE_CHALLENGES_HAS_WON:!0}}onTabSelected(k){var B,U;if(this._currentLeaderboardView===k.metadata.leaderboard)return;this._currentLeaderboardView=k.metadata.leaderboard;const F=this._stateChallengesDataProvider.getStateChallengesLeaderboard(this._currentLeaderboardView),G=tt.q.instance.prodigy.gameContainer.get("43a-6f08");tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:us.B.ProdigyChallenge,interfaceType:ui.Wm.Screen,instanceType:fi.N.UI,originType:ui.$N.TabClick,originID:Is.k.StateChallengesTab},{sub_ui_name:this._currentLeaderboardView===_u.W.CLASSROOM?"class":"school",item_list:{challenge_id:G.getCurrentChallengeUniqueId()+this._stateChallengesDataProvider.getCurrentChallengeSuffixForSegmentEvents(),rank:null===(B=null==F?void 0:F.myEntry)||void 0===B?void 0:B.rank}});const j=Object.assign({STATE_CHALLENGES_CLASS_VIEW_NAME:this._currentLeaderboardView===_u.W.CLASSROOM?null===(U=null==F?void 0:F.myEntry)||void 0===U?void 0:U.displayName:void 0,STATE_CHALLENGES_LEADERBOARD_TYPE:this._currentLeaderboardView},this.setupChallengeBanner(F));Nt.d.updateInjectedValues(this._prefabRoot,j),this.spawnRacers()}setupChallengeBanner(k){var B;const U=k.myEntry.rank,F=this._currentLeaderboardView===_u.W.CLASSROOM?Iu.yT.classViewHeroPetId:Iu.yT.schoolViewHeroPetId,G=j.Aq$.isDefined(U);return{STATE_CHALLENGES_BANNER_PORTRAIT_ID:F,STATE_CHALLENGES_BANNER_RANK:null!==(B=null==U?void 0:U.toString())&&void 0!==B?B:this._stateChallengesDataProvider.totalPhaseCorrectAnswers.toString(),STATE_CHALLENGE_BANNER_TROPHY_ASSET:[Ve._.State_challenges_json,U<=3?Iu.yT.bannerTrophyAssets[U-1]:""],STATE_CHALLENGES_BANNER_TROPHY_VISIBLE:G&&U<=3&&this._currentLeaderboardView!==_u.W.CLASSROOM,STATE_CHALLENGES_BANNER_ANSWERS:k.myEntry.correctAnswers,STATE_CHALLENGES_BANNER_POINTS_TITLE:`${this._localizer.getText(Pu.O.POINTS)}:`,STATE_CHALLENGES_BANNER_ICON_VISIBILITY:this._currentLeaderboardView===_u.W.SCHOOL,STATE_CHALLENGES_BANNER_RIGHT_LOC:G?"LEADERBOARDS_SUBHEADING_CORRECT_ANSWERS":Pu.O.STATE_CHALLENGES_THIS_MONTH,STATE_CHALLENGES_BANNER_LEFT_LOC:G?Pu.O.STATE_CHALLENGES_RANK:Pu.O.STATE_CHALLENGES_TOTAL_CORRECT}}spawnRacers(){this._menuRootObject.findComponentsInChildren(Ru.h).forEach((k=>{k.destroySpawnedPrefabs()}));const k=this._currentLeaderboardView===_u.W.CLASSROOM?Iu.yT.classViewHeroPetId:Iu.yT.schoolViewHeroPetId,B=this._currentLeaderboardView===_u.W.CLASSROOM?this._classroomRacerIds:this._schoolRacerIds,U=`${this._currentLeaderboardView===_u.W.CLASSROOM?this._localizer.getText(Pu.O.YOUR_CLASS):this._localizer.getText(Pu.O.YOUR_SCHOOL)}!`;Nt.d.updateInjectedValues(this._menuRootObject,{STATE_CHALLENGES_FOOTRACE_PETS_DATA:Au.X.getStateChallengeRacersInjectionData(this._currentLeaderboardView,U,k,B,this._stateChallengesDataProvider),STATE_CHALLENGES_DISTANT_RACER_DATA:this.setupRacerPortraits()})}getStateChallengesDistanceRacerInjectionDataForIndex(k,B,U){var F;const G=this._stateChallengesDataProvider.getStateChallengesLeaderboard(this._currentLeaderboardView),j=this._currentLeaderboardView===_u.W.CLASSROOM?this._classroomPortraitIds:this._schoolPortraitIds,$=G.competitorEntries.get(U);if($)return{STATE_CHALLENGES_DISTANT_RACER_ID:j[k],STATE_CHALLENGES_PORTRAIT_TROPHY_ASSET:[Ve._.State_challenges_json,Iu.yT.bannerTrophyAssets[B]],STATE_CHALLENGES_RACER_NAME:xt.$.truncate(null!==(F=null==$?void 0:$.displayName)&&void 0!==F?F:"",35,!0),STATE_CHALLENGES_RACER_RANK:null==$?void 0:$.rank,STATE_CHALLENGES_RACER_ANSWERS:null==$?void 0:$.correctAnswers}}setupRacerPortraits(){const k=this._stateChallengesDataProvider.getStateChallengesLeaderboard(this._currentLeaderboardView).myEntry.rank,B=[];return k>3&&(4===k?(B.push(this.getStateChallengesDistanceRacerInjectionDataForIndex(0,0,1)),B.push(this.getStateChallengesDistanceRacerInjectionDataForIndex(1,1,2))):(B.push(this.getStateChallengesDistanceRacerInjectionDataForIndex(0,1,2)),B.push(this.getStateChallengesDistanceRacerInjectionDataForIndex(1,0,1)),B.push(this.getStateChallengesDistanceRacerInjectionDataForIndex(2,2,3)))),B.filter((k=>void 0!==k))}}xu.LOW_PERFORMANCE_CUTOFF_RANK=30;class Lu extends Du.${enter(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=tt.q.instance.prodigy.gameContainer.get("43a-6f08"),U=yield B.isClassCodeQuestCompleted();this._prefabGUID=Rt.l.StateChallengesNoClassState,this._prefabRoot=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGUID,{STATE_CHALLENGES_SHOW_MAGICOIN_REWARD:!U},k.rootMenuObject.children[k.rootMenuObject.children.length-1]),tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:us.B.ProdigyChallengeClassCode,interfaceType:ui.Wm.Screen,instanceType:fi.N.UI,originType:ui.$N.ButtonClick});const F=tt.q.instance.prodigy.gameContainer.get("0f9-dd7b").activeCompetitionPhase;Nt.d.updateInjectedValues(k.rootMenuObject,{STATE_CHALLENGES_FOOTRACE_PETS_DATA:this.getPetsData(),STATE_CHALLENGES_CURRENT_VIEW_TITLE:Au.X.getCurrentChallengeDisplayName(F),STATE_CHALLENGES_NO_CLASS_GOT_ITEM_COMPLETE:()=>{k.onClassCodeSet().then((()=>{k.rootMenuObject.findComponentsInChildren(Ru.h).forEach((k=>{k.destroySpawnedPrefabs()})),this._prefabRoot&&this._prefabRoot.destroy()})).catch(j.RQr.createHandler("StateChallengesNoClassState: Failed to handle class code set."))}});const G=j.wa5.getActiveScene().container.sourceContainer.get(Iu.Tz.STATE_CHALLENGES_BG_IDLE_TWEEN);G.resetToStart(),G.playAnimation()}))}exit(){return(0,G.sH)(this,void 0,void 0,(function*(){this._prefabRoot&&this._prefabRoot.destroy()}))}getPetsData(){return[{STATE_CHALLENGES_FOOTRACE_PET_ID:Iu.yT.schoolViewPetIds[0],STATE_CHALLENGES_FOOTRACE_PET_POSITION:[Iu.yT.defaultRacerOffsets[0],Iu.yT.yOffsets[0]],STATE_CHALLENGES_FOOTRACE_PETS_INITIAL_ANIMATION:Xa.Q2.Walk},{STATE_CHALLENGES_FOOTRACE_PET_ID:Iu.yT.schoolViewHeroPetId,STATE_CHALLENGES_FOOTRACE_PET_POSITION:[Iu.yT.defaultRacerOffsets[1],Iu.yT.yOffsets[1]],STATE_CHALLENGES_FOOTRACE_PETS_INITIAL_ANIMATION:Xa.Q2.Walk},{STATE_CHALLENGES_FOOTRACE_PET_ID:Iu.yT.schoolViewPetIds[1],STATE_CHALLENGES_FOOTRACE_PET_POSITION:[Iu.yT.defaultRacerOffsets[2],Iu.yT.yOffsets[2]],STATE_CHALLENGES_FOOTRACE_PETS_INITIAL_ANIMATION:Xa.Q2.Walk}]}}var ku=U(21953),Bu=U(25431);class Uu extends Du.${constructor(){super(...arguments),this._RLTweenOffsetX=1e3,this._skippedIntro=!1}enter(k){return(0,G.sH)(this,void 0,void 0,(function*(){this._cachedStateParams=k,this._menuRootObject=k.rootMenuObject,this._prefabGUID=Rt.l.StateChallengesIntroAnimationState;const B=k.stateChallengesDataProvider,U=B.isInitialized;U||B.initialize().then((()=>{Nt.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_SKIP_BUTTON_VISIBLE:!0})})).catch(j.RQr.createHandler("StateChallengesIntroAnimationState: Error initializing StateChallengesDataProvider")),B.setAnimationPlayed(),this._prefabRoot=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGUID,{STATE_CHALLENGES_SKIP_BUTTON_VISIBLE:U,STATE_CHALLENGES_SKIP_BUTTON_CALLBACK:()=>{tt.q.instance.prodigy.gameContainer.get("43a-6f08").markDataAsDirty(),this._skippedIntro=!0,this._stateMachine.goToState(xu,Object.assign(Object.assign({},this._cachedStateParams),{spawnRacers:!0})).catch(j.RQr.createHandler("StateChallengesIntroAnimationState: Error transitioning to CurrentStateChallengeViewState"))}},this._menuRootObject);const F=this.generateIntroRacersData();Nt.d.updateInjectedValues(this._menuRootObject,{STATE_CHALLENGES_FOOTRACE_PETS_DATA:F,STATE_CHALLENGES_RACERS_SPAWNED_CALLBACK:this.onRacersSpawned.bind(this)})}))}exit(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;null===(k=this._prefabRoot)||void 0===k||k.destroy()}))}onRacersSpawned(){if(this._skippedIntro)return;const k=j.wa5.getActiveScene().container.sourceContainer,B=k.getAll(Iu.Tz.STATE_CHALLENGES_LR_TWEEN);Promise.all(B.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k.playAnimation(),new Promise((B=>k.onTweenComplete.addOnce(B)))}))))).then((()=>this.onLeftRightTweenComplete())).catch(j.RQr.createHandler("StateChallengesIntroAnimationState: Error playing racer intro tweens"));const U=k.get(Iu.Tz.STATE_CHALLENGES_BG_INTRO_TWEEN);U.onTweenComplete.addOnce((()=>{U.resetToStart()})),U.playAnimation()}onLeftRightTweenComplete(){this._menuRootObject.findComponentsInChildren(Ru.h).forEach((k=>k.destroySpawnedPrefabs()));const k=Au.X.getStateChallengeRacersInjectionData(_u.W.SCHOOL,this._localizer.getText(Pu.O.YOUR_SCHOOL),Iu.yT.schoolViewHeroPetId,this._cachedStateParams.schoolRacerIds,this._cachedStateParams.stateChallengesDataProvider);k.forEach((k=>{k.STATE_CHALLENGES_FOOTRACE_PET_POSITION[0]+=this._RLTweenOffsetX,k.STATE_CHALLENGES_ANSWERS_VISIBLE=!1,k.STATE_CHALLENGES_SELF_BUBBLE_VISIBLE=!1})),Nt.d.updateInjectedValues(this._menuRootObject,{STATE_CHALLENGES_FOOTRACE_PETS_DATA:k,STATE_CHALLENGES_RACERS_SPAWNED_CALLBACK:this.onCurrentViewRacersSpawned.bind(this)})}onCurrentViewRacersSpawned(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=j.wa5.getActiveScene().container.sourceContainer.getAll(Iu.Tz.STATE_CHALLENGES_RL_TWEEN);yield Promise.all(k.map(((k,B)=>(0,G.sH)(this,void 0,void 0,(function*(){return k.playAnimation(),new Promise((U=>{k.onTweenComplete.addOnce((()=>{Nt.d.updateInjectedValues(k.GameObject.parent,{STATE_CHALLENGES_ANSWERS_VISIBLE:1!==B,STATE_CHALLENGES_SELF_BUBBLE_VISIBLE:1===B}),U()}))}))}))))),tt.q.instance.prodigy.gameContainer.get("43a-6f08").markDataAsDirty(),this._stateMachine.goToState(xu,Object.assign({},this._cachedStateParams)).catch(j.RQr.createHandler("StateChallengesIntroAnimationState: Error transitioning to CurrentStateChallengeViewState"))}))}generateIntroRacersData(){const k=[...Iu.yT.schoolViewPetIds],B=[];for(let U=0;U0;U++){const F=k.splice(Math.floor(Math.random()*k.length),1)[0],G=Iu.yT.introAnimationStartPositions[U];B.push({STATE_CHALLENGES_FOOTRACE_PET_ID:F,STATE_CHALLENGES_FOOTRACE_PET_POSITION:[G.x,G.y],STATE_CHALLENGES_FOOTRACE_PETS_INITIAL_ANIMATION:Xa.Q2.Walk})}return B.push({STATE_CHALLENGES_FOOTRACE_PET_ID:Iu.yT.schoolViewHeroPetId,STATE_CHALLENGES_FOOTRACE_PET_POSITION:[Iu.yT.introAnimationHeroPosition.x,Iu.yT.introAnimationHeroPosition.y],STATE_CHALLENGES_FOOTRACE_PETS_INITIAL_ANIMATION:Xa.Q2.Walk}),B}}class Fu extends Du.${constructor(){super(...arguments),this._highestMilestoneAchieved=0,this._rewardSequenceIndex=0,this._maxRewardSequenceIndex=3,this._materialRewards=[],this._celebrationBoxItem={name:"Celebration Box",icon:ps.q.Icon_celebration_pack,amount:0}}enter(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U;this._cachedEnterParams=k,Nt.d.updateInjectedValues(k.rootMenuObject,{[Iu.E2.STATE_CHALLENGES_SHOW_HEADER]:!1});const F=k.stateChallengesDataProvider.getSchoolEntryForPreviousChallenge();if(!F)return this._rewardSequenceIndex=this._maxRewardSequenceIndex,void this.showNextRewardInSequence();this._previousRank=F.rank,this._correctAnswers=F.correctAnswers;const G=this.rankIsValid(this._previousRank),$=G&&this._previousRank<=5,H=G&&this._previousRank<=3,V=tt.q.instance.prodigy.gameContainer.get("c47-20b6");$&&V.item.beginSecureItemTransaction();const W=tt.q.instance.prodigy.gameContainer.get("a96-1470"),q=yield W.getEndOfChallengeRewards(this._previousRank,this._correctAnswers);this._highestMilestoneAchieved=q.highestMilestoneValue,this._finalsPhaseStartDate=k.stateChallengesDataProvider.finalsPhaseStartDate;const K=tt.q.instance.prodigy.gameContainer.get("43a-6f08");if($){this._celebrationBoxItem.name=this._localizer.getText(Pu.O.STATE_CHALLENGE_CELEBRATION_BOX);const k=null===(B=q.endOfChallengeRewards)||void 0===B?void 0:B[this._previousRank],F=Yt.t.getItem("pet",null!==(U=null==k?void 0:k.ID)&&void 0!==U?U:0);if(F){Qt.J.bagItem(F,tt.q.instance.game,void 0,void 0,{source_type:li.C.StateChallengePodium,source_id:`${K.getPreviousChallengeUniqueId()}-${this._previousRank}`,instance_type:fi.N.StateChallenge,instance_id:V.featureCommon.getCurrentInterfaceID(us.B.ProdigyChallenge),transaction_id:xt.$.generateUID()});tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.forceSaveCharacter();const k=[{name:F.name,icon:fs.E.getIconForType(F.type,F.ID),amount:1}];1===this._previousRank?this._materialRewards=[this._celebrationBoxItem,...k]:this._materialRewards=[...k],yield tt.q.instance.prodigy.load.assetsAsPromise(this._materialRewards.map((k=>k.icon)))}else j.VyI.log(`No reward item found for rank ${this._previousRank}`,j.$bb.Warning)}this._prefabInjectionValues={STATE_CHALLENGES_BANNER_RANK:G?xt.$.addOrdinalSuffix(this._previousRank):this._localizer.getText(Pu.O.NATIONAL_CUP_RESULTS_PENDING),STATE_CHALLENGE_BANNER_TROPHY_ASSET:[Ve._.State_challenges_json,H?Iu.yT.bannerTrophyAssets[this._previousRank-1]:""],STATE_CHALLENGES_BANNER_TROPHY_VISIBLE:H,STATE_CHALLENGES_REWARD_RANK_TROPHY:[Ve._.State_challenges_json,$?Iu.yT.postChallengeTrophyAssets[Math.min(this._previousRank-1,Iu.yT.postChallengeTrophyAssets.length-1)]:""],STATE_CHALLENGES_BANNER_ANSWERS:this._correctAnswers,STATE_CHALLENGES_REWARDS_RANK_VISIBLE:$,STATE_CHALLENGES_POST_CHALLENGE_REWARDS_VISIBLE:this._highestMilestoneAchieved>0||this._materialRewards.length>0||$,STATE_CHALLENGES_BANNER_LEFT_LOC:Pu.O.STATE_CHALLENGES_RANK},this._prefabRoot=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.StateChallengesPostChallengeView,this._prefabInjectionValues,k.rootMenuObject),tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:us.B.ProdigyChallengeResult,interfaceType:ui.Wm.Screen,instanceType:fi.N.UI,originType:ui.$N.ButtonClick},{item_list:{challenge_id:K.getPreviousChallengeUniqueId()+k.stateChallengesDataProvider.getPreviousChallengeSuffixForSegmentEvents()}}),this._currentSchoolRank=yield k.stateChallengesDataProvider.getCurrentSchoolRanking(),this.showNextRewardInSequence()}))}rankIsValid(k){return j.Aq$.isDefined(k)&&k>0}showNextRewardInSequence(){var k,B;const U=null!==(B=null===(k=this._cachedEnterParams)||void 0===k?void 0:k.stateChallengesDataProvider.isInNationalCupRewardCollectionPeriod())&&void 0!==B&&B?[this.showNationalCupEnded.bind(this),this.showMaterialRewards.bind(this),this.showMilestoneAchievements.bind(this)]:[this.showMaterialRewards.bind(this),this.showMilestoneAchievements.bind(this),this.showQualification.bind(this)];this._rewardSequenceIndex{k&&Nt.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_REWARDS_NEXT_BUTTON_TEXT:this._localizer.getText(Pu.O.STATE_CHALLENGES_CLAIM_REWARDS)})})).catch(j.RQr.createHandler("StateChallengesPostChallengeState: prefetchAndUpdateClaimButton"))}collectPastMilestoneRewards(){const k=tt.q.instance.prodigy.gameContainer.get("c47-20b6").item.beginSecureItemTransaction(),B=tt.q.instance.prodigy.gameContainer.get("a96-1470"),U=this._cachedEnterParams.stateChallengesDataProvider.getGoalsParametersDataForPreviousChallenge();if(!U)return j.VyI.log("StateChallengesPostChallengeState: Error claiming previous state challenge milestone rewards",j.$bb.Error),void this.goToNextState();B.claimPreviousStateChallengeGoalsRewards(U).then((B=>(0,G.sH)(this,void 0,void 0,(function*(){const U=tt.q.instance.prodigy.gameContainer.get("43a-6f08");yield this.setSegmentDataForMilestoneRewards(k,U),k.flush({}),yield U.processPreviousChallengeRewardsResponse(B),yield Bu.b.getData(),yield U.sendCurrentChallengeStartedEvent(),tt.q.instance.game.broadcaster.broadcast(jn.Y1.HUDRevampButtonVisibilityRefreshRequested),this.onRewardCompleteGoToNextState()})))).catch(j.RQr.createHandler("StateChallengesPostChallengeState: Error claiming previous state challenge milestone rewards"))}setSegmentDataForMilestoneRewards(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=yield Bu.b.getPreviousChallengeMilestoneRewards(),F=tt.q.instance.prodigy.gameContainer.get("c47-20b6"),G=B.getPreviousChallengeUniqueId(),j=this._cachedEnterParams.stateChallengesDataProvider.getPreviousChallengeSuffixForSegmentEvents();for(const B of U)k.setIndividualData(B.type,B.id,{source_id:`${G}-${B.milestoneIndex}${j}`,instance_id:F.featureCommon.getCurrentInterfaceID(us.B.ProdigyChallengeResult),instance_type:fi.N.StateChallenge,source_type:li.C.StateChallengeMilestone})}))}onRewardCompleteGoToNextState(){var k,B,U;null===(k=this._prefabRoot)||void 0===k||k.destroyDeferred();const F=this._currentSchoolRank>=xu.LOW_PERFORMANCE_CUTOFF_RANK;let G;if(F){G=null===(U=null===(B=tt.q.instance.prodigy.gameContainer.get("0f9-dd7b").getStateChallengesLeaderboard(_u.W.CLASSROOM))||void 0===B?void 0:B.myEntry)||void 0===U?void 0:U.rank}const j=tt.q.instance.prodigy.gameContainer.get("43a-6f08");tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:us.B.ProdigyChallenge,interfaceType:ui.Wm.Screen,instanceType:fi.N.UI,originType:ui.$N.ButtonClick},{sub_ui_name:F?"class":"school",item_list:{challenge_id:j.getCurrentChallengeUniqueId()+this._cachedEnterParams.stateChallengesDataProvider.getCurrentChallengeSuffixForSegmentEvents(),rank:F?G:this._currentSchoolRank}}),this.goToNextState()}goToNextState(){tt.q.instance.prodigy.gameContainer.get("43a-6f08").markDataAsDirty(),this._cachedEnterParams.stateChallengesDataProvider.isInActiveCompetition()?this._stateMachine.goToState(Uu,this._cachedEnterParams).catch(j.RQr.createHandler("StateChallengesPostChallengeState: goToState")):this._cachedEnterParams.rootMenuObject.destroyDeferred()}showMaterialRewards(){if(!j.Aq$.isDefined(this._previousRank)||this._previousRank>5||0===this._materialRewards.length)this._rewardSequenceIndex++,this.showNextRewardInSequence();else{const k=this._materialRewards.shift();k&&Nt.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_REWARDS_NATIONAL_CUP_ENDED:!1,STATE_CHALLENGES_MATERIAL_REWARDS_VISIBLE:!0,STATE_CHALLENGES_MATERIAL_REWARD_NAME:k.name,STATE_CHALLENGES_REWARD_ICON:k.icon,STATE_CHALLENGES_REWARD_AMOUNT:`x ${k.amount}`,STATE_CHALLENGES_SHOW_REWARD_AMOUNT:k.amount>0,STATE_CHALLENGES_REWARDS_NEXT_BUTTON_CALLBACK:()=>this.showMaterialRewards(),STATE_CHALLENGES_REWARD_INFO_TEXT:Pu.O.YOUR_PRIZES})}}showMilestoneAchievements(){if(0===this._highestMilestoneAchieved)return this._rewardSequenceIndex++,void this.showNextRewardInSequence();const k=Object.keys(Iu.yT.postChallengeMilestoneAssetMap).map(Number).reduce(((k,B)=>B<=this._highestMilestoneAchieved?B:k),0);Nt.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_REWARDS_NATIONAL_CUP_ENDED:!1,STATE_CHALLENGES_MATERIAL_REWARDS_VISIBLE:!1,STATE_CHALLENGES_REWARDS_MILESTONE_PROGRESS_VISIBLE:!0,STATE_CHALLENGES_MILESTONE_VALUE:this._highestMilestoneAchieved,STATE_CHALLENGES_MILESTONE_CREST:[Ve._.State_challenges_json,Iu.yT.postChallengeMilestoneAssetMap[k]],STATE_CHALLENGES_REWARDS_NEXT_BUTTON_CALLBACK:()=>{this._rewardSequenceIndex++,this.showNextRewardInSequence()},STATE_CHALLENGES_REWARD_INFO_TEXT:Pu.O.HIGHEST_MILESTONE})}showNationalCupEnded(){var k,B;const U=null!==(B=null===(k=this._cachedEnterParams)||void 0===k?void 0:k.stateChallengesDataProvider.nationalCupResultsValidated)&&void 0!==B&&B;Nt.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_MATERIAL_REWARDS_VISIBLE:!1,STATE_CHALLENGES_REWARDS_MILESTONE_PROGRESS_VISIBLE:!1,STATE_CHALLENGES_REWARDS_QUALIFICATION_VISIBLE:!1,STATE_CHALLENGES_REWARDS_NATIONAL_CUP_ENDED:!0,STATE_CHALLENGES_REWARDS_NEXT_BUTTON_CALLBACK:()=>{this._rewardSequenceIndex++,this.showNextRewardInSequence()},NATIONAL_CUP_RESULTS_OFFICIAL_TEXT:U?Pu.O.NATIONAL_CUP_RESULTS_OFFICIAL:Pu.O.NATIONAL_CUP_RESULTS_PENDING_LONG,STATE_CHALLENGES_REWARD_INFO_TEXT:Pu.O.NATIONAL_CUP_ENDED_LONG})}showQualification(){var k;if(this._previousRank>5)return void(this._highestMilestoneAchieved>0?(this._rewardSequenceIndex++,this.showNextRewardInSequence()):Nt.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_REWARDS_NEXT_BUTTON_CALLBACK:()=>{this._rewardSequenceIndex++,this.showNextRewardInSequence()}}));const B=It.O.localeCode,U=null===(k=this._finalsPhaseStartDate)||void 0===k?void 0:k.toLocaleDateString(B,{month:"long",day:"numeric"}),F=tt.q.instance.prodigy.gameContainer.get(j.Oap);Nt.d.updateInjectedValues(this._prefabRoot,{STATE_CHALLENGES_MATERIAL_REWARDS_VISIBLE:!1,STATE_CHALLENGES_REWARDS_MILESTONE_PROGRESS_VISIBLE:!1,STATE_CHALLENGES_REWARDS_QUALIFICATION_VISIBLE:!0,STATE_CHALLENGES_NEXT_CHALLENGE_DATE:U?`${U}!`:F.getText("RIFTS_MAX_RIFT_CARD_COMING_SOON"),STATE_CHALLENGES_REWARDS_NEXT_BUTTON_CALLBACK:()=>{this._rewardSequenceIndex++,this.showNextRewardInSequence()},STATE_CHALLENGES_REWARD_INFO_TEXT:Pu.O.YOU_QUALIFIED,STATE_CHALLENGES_REWARDS_NEXT_BUTTON_TEXT:this.rankIsValid(this._previousRank)&&this._previousRank>1?this._localizer.getText(Pu.O.NEXT_CHALLENGE):this._localizer.getText(Pu.O.BUTTON_NEXT_CAPITAL)})}}class Gu extends Du.${enter(k){return(0,G.sH)(this,void 0,void 0,(function*(){this._prefabGUID=Rt.l.StateChallengesNoDataState,this._prefabRoot=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGUID,{STATE_CHALLENGES_NO_DATA_BUTTON_CALLBACK:()=>{k.rootMenuObject.destroyDeferred()}},k.rootMenuObject),Nt.d.updateInjectedValues(k.rootMenuObject,{[Iu.E2.STATE_CHALLENGES_SHOW_HEADER]:!1})}))}}class ju extends Du.${enter(k){return(0,G.sH)(this,void 0,void 0,(function*(){this._prefabGUID=Rt.l.StateChallengesDownTimeState,this._prefabRoot=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGUID,{STATE_CHALLENGES_NO_DATA_BUTTON_CALLBACK:()=>{k.rootMenuObject.destroyDeferred()}},k.rootMenuObject),Nt.d.updateInjectedValues(k.rootMenuObject,{[Iu.E2.STATE_CHALLENGES_SHOW_HEADER]:!1});const B=k.stateChallengesDataProvider.downtimeTitleLocalizationKeyOverride,U=k.stateChallengesDataProvider.downtimeSubtitleLocalizationKeyOverride;(j.Aq$.isDefined(B)||j.Aq$.isDefined(U))&&Nt.d.updateInjectedValues(k.rootMenuObject,Object.assign(Object.assign({},j.Aq$.isDefined(B)&&{[Iu.E2.STATE_CHALLENGES_DOWNTIME_TITLE_OVERRIDE]:B}),j.Aq$.isDefined(U)&&{[Iu.E2.STATE_CHALLENGES_DOWNTIME_SUBTITLE_OVERRIDE]:U}))}))}}let $u=class extends j.uAl{constructor(){super(...arguments),this.onDataInitialized=new j.HN0,this._hasUnseenChallengeResults=void 0,this.onUnseenChallengeResultsSet=new j.HN0}getRacers(){return this._racersContainer.children}create(){this.st=tt.q.instance.prodigy.gameContainer.get("c97-bd0d");const k={[Iu.E2.STATE_CHALLENGES_SHOW_HEADER]:!0,[hs.bL.ShowHeaderText]:!1,[hs.bL.ShowMagicoinText]:!0,[hs.bL.HeaderTitle]:tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("STATE_CHALLENGES_TITLE"),[hs.bL.OnClose]:()=>{this.onCloseMenu().catch((k=>{j.VyI.log("Error attempting to close menu",j.$bb.Error,k)}))}};Nt.d.updateInjectedValues(this.gameObject,k),this._setupPromise=new j.bnh,this.setupInitialState().then((()=>{j.VyI.log("StateChallengesMenu initialized",j.$bb.Info)})).catch(j.RQr.createHandler("StateChallengesMenu: setupInitialState")).finally((()=>{this._setupPromise.resolve()}))}setUnseenChallengeResults(k){this._hasUnseenChallengeResults=Boolean(!k.getInjectedValue(ku.V.IsCurrentChallengeStarted)&&k.getInjectedValue(ku.V.WasPreviousChallengeStarted)),this.onUnseenChallengeResultsSet.dispatch()}setupInitialState(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F,$,H;const V=yield this.st.getCurrentClassCode();if(j.Aq$.isDefined(null===(F=null===(U=null===(B=null===(k=V)||void 0===k?void 0:k.data)||void 0===B?void 0:B.player)||void 0===U?void 0:U.currentClassroom)||void 0===F?void 0:F.code)){const k=[];k.push(this._stateChallengesDataProvider.initialize()),j.Aq$.isDefined(this._hasUnseenChallengeResults)||k.push(new Promise((k=>{this.onUnseenChallengeResultsSet.addOnce((()=>{k()}))}))),yield Promise.all(k),yield this._stateChallengesDataProvider.checkAndCacheDownTimeState();const B=this.getEnterStateParams();if(this._stateChallengesDataProvider.isCurrentlyInDownTime)return void(yield new Cu.w(ju).goToState(ju,B));const U=this._stateChallengesDataProvider.getStateChallengesLeaderboard(_u.W.CLASSROOM);if(!j.Aq$.isDefined(U))return void(yield new Cu.w(Gu).goToState(Gu,B));const F=!this._stateChallengesDataProvider.isInActiveCompetition();if(this._hasUnseenChallengeResults||F)return void(yield new Cu.w(Fu).goToState(Fu,B));const G=yield this._stateChallengesDataProvider.getCurrentSchoolRanking(),V=G>=xu.LOW_PERFORMANCE_CUTOFF_RANK;V&&this._stateChallengesDataProvider.setAnimationPlayed();const W=null===(H=null===($=this._stateChallengesDataProvider.getStateChallengesLeaderboard(_u.W.CLASSROOM))||void 0===$?void 0:$.myEntry)||void 0===H?void 0:H.rank;tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:us.B.ProdigyChallenge,interfaceType:ui.Wm.Screen,instanceType:fi.N.UI,originType:ui.$N.ButtonClick},{sub_ui_name:V?"class":"school",item_list:{challenge_id:this._questManager.getCurrentChallengeUniqueId()+this._stateChallengesDataProvider.getCurrentChallengeSuffixForSegmentEvents(),rank:V?W:G}}),this._stateChallengesDataProvider.hasAnimationPlayed?yield new Cu.w(xu).goToState(xu,B):yield new Cu.w(Uu).goToState(Uu,B)}else yield new Cu.w(Lu).goToState(Lu,{rootMenuObject:this.gameObject,onClassCodeSet:()=>(0,G.sH)(this,void 0,void 0,(function*(){return this.setupInitialState()}))});this.onDataInitialized.dispatch()}))}getEnterStateParams(){return{rootMenuObject:this.gameObject,stateChallengesDataProvider:this._stateChallengesDataProvider,schoolRacerIds:this._stateChallengesDataProvider.schoolRacerIds,schoolPortraitIds:this._stateChallengesDataProvider.schoolPortraitIds,classroomRacerIds:this._stateChallengesDataProvider.classroomRacerIds,classroomPortraitIds:this._stateChallengesDataProvider.classroomPortraitIds}}onCloseMenu(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this._setupPromise,this.gameObject.destroyDeferred()}))}destroy(){this.onDataInitialized.dispose(),this.onUnseenChallengeResultsSet.dispose(),super.destroy()}};(0,G.Cg)([(0,Gi.b)("0f9-dd7b"),(0,G.Sn)("design:type",_u.v)],$u.prototype,"_stateChallengesDataProvider",void 0),(0,G.Cg)([(0,Gi.b)("43a-6f08"),(0,G.Sn)("design:type",Ou.C)],$u.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$u.prototype,"onDataInitialized",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$u.prototype,"_racersContainer",void 0),$u=(0,G.Cg)([(0,j.EVk)("StateChallengesMenu",W.Y.stateChallenges)],$u);let Hu=class extends j.uAl{create(){super.create();const k=tt.q.instance.prodigy.gameContainer.get("0f9-dd7b");k.hasValidClassroom().then((B=>{this.gameObject.active=B,k.getCurrentSchoolRanking().then((B=>{this._rankingText.text=B.toString();const U=Mu.H.getDaysUntilEndOfCurrentChallenge(k.activeCompetitionPhase,new Date(Date.now()),k.endDate);this._timeLeftText.setTextArguments(U.toString())})).catch(j.RQr.createHandler("StateChallengesLegacyHUDButton: Error retrieving school rank"))})).catch(j.RQr.createHandler("StateChallengesLegacyHUDButton: Error checking for classroom validity"))}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Hu.prototype,"_rankingText",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],Hu.prototype,"_timeLeftText",void 0),Hu=(0,G.Cg)([(0,j.EVk)("StateChallengesLegacyHUDButton",W.Y.stateChallenges)],Hu);var Vu=U(24030);let Wu=class extends Fi.z{constructor(){super(...arguments),this.onDataReady=new j.HN0}create(){super.create();const k=(0,Vu.$)(this._stateChallengesDataProvider.viewableCompetitionPhase);k&&this._stateChallengeGoalsQuestManager.getQuestTasks(k).then((()=>{this._bindOnCreate&&this.bindContext().catch(j.RQr.createHandler("[StateChallengeGoalsDataProvider] Unable to bind context after getting quest tasks"))})).catch(j.RQr.createHandler(`[StateChallengeGoalsDataProvider] Unable to get quest tasks for ${k}`))}bindContext(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield Bu.b.getData();this.gameObject&&k&&Nt.d.updateInjectedValues(this.gameObject,k),this.onDataReady.dispatch(this._context)}))}destroy(){this.onDataReady.dispose(),super.destroy()}};(0,G.Cg)([(0,Gi.b)("0f9-dd7b"),(0,G.Sn)("design:type",_u.v)],Wu.prototype,"_stateChallengesDataProvider",void 0),(0,G.Cg)([(0,Gi.b)("43a-6f08"),(0,G.Sn)("design:type",Ou.C)],Wu.prototype,"_stateChallengeGoalsQuestManager",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Wu.prototype,"_bindOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wu.prototype,"onDataReady",void 0),Wu=(0,G.Cg)([(0,j.EVk)("StateChallengeGoalsDataProvider",j.YH6.injection)],Wu);var qu,Ku=U(76974),zu=U(38920);!function(k){k.RewardReady="reward-ready",k.RewardCollect="reward-collect"}(qu||(qu={}));let Yu=class extends j.uAl{constructor(){super(...arguments),this._scrollViewPadding=483,this._numRewardsCollected=0,this._goalPrefabs=[],this._slideTweenDurationMs=850,this._slideTweenDelayMs=100,this._fadeInTweenDurationMs=300,this._fadeInTweenDelayMultiplierMs=100,this._goalMaxScale=1.2,this._goalMinScale=.95}create(){super.create(),this.sendInterfaceSegmentEvent().catch((k=>{j.VyI.log("StateChallengeGoalsControllerComponent: Error sending Interface event.",j.$bb.Error,k)}))}destroy(){var k,B,U;null===(U=null===(B=null===(k=this._scrollView)||void 0===k?void 0:k.slider)||void 0===B?void 0:B.onValueChanged)||void 0===U||U.remove(this.scaleGoals,this),To.s.stopRecording(),super.destroy()}loadPrefabs(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this._gridLayout||!this._scrollView)return;To.s.startRecording("StateChallengeGoalsController","state_challenge_goals");const B=[];for(const G in k)k.hasOwnProperty(G)&&B.push(k[G]);const U=[],F=this.getCenteredGoalIndex(B);B.forEach((k=>{k.index=k.index-1;const B={[ku.Z.DisplayCardRewardIndex]:k.index+1,[ku.Z.DisplayCardRewardAssetIcon]:this.getAssetImageData(k.task),[ku.Z.DisplayCardRewardQuantity]:this.getAssetQuantityData(k.task),[ku.Z.DisplayCardQuestionsAnswered]:Au.X.getQuestionsAnsweredFromTaskInThousandFormat(k.task),[ku.Z.DisplayCardIsCollected]:k.isComplete&&!k.isCollectible,[ku.Z.DisplayCardReadyToCollect]:k.isCollectible,[ku.Z.DisplayCardIsActive]:!0,[ku.Z.DisplayCardBackground]:Au.X.getMilestoneBackingFrame(Au.X.getQuestionsAnsweredFromTask(k.task)),[ku.Z.DisplayCardIsFocused]:k.index===F};U.push(Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.StateChallengeGoalsCard,B))})),this._goalPrefabs=yield Promise.all(U),this._contentGameObject.addChild(this.createEmptyCell(this._scrollViewPadding)),this._goalPrefabs.forEach(((k,U)=>{const F=B[U];this._contentGameObject.addChild(k),Nt.d.updateInjectedValues(k,{[ku.Z.DisplayCardCollectCallback]:()=>(0,G.sH)(this,void 0,void 0,(function*(){return this.onCollectButtonClicked(k,B,F)}))})})),this._contentGameObject.addChild(this.createEmptyCell(this._scrollViewPadding)),this._gridLayout.updateAll();const $=this._gridLayout.columnSpacing,H=this._goalPrefabs[0].transform.sizeDelta.width+$;this._scrollView.slider.stepValue=H,this._scrollView.slider.onValueChanged.add(this.scaleGoals,this),this._scrollView.setScrollPosition(this.getScrollPositionForGoal(F<2?0:F-2)),this.scaleGoals(),this.fadeInGoals(F<2?0:F-2),tt.q.instance.game.add.tween(this._scrollView.slider,this).to({value:this.getScrollPositionForGoal(F)},this._slideTweenDurationMs,j.GS3.Exponential.InOut).delay(this._slideTweenDelayMs).start()}))}getScrollPositionForGoal(k){const B=this._gridLayout.columnSpacing,U=this._goalPrefabs[0].transform.sizeDelta.width+B,F=this._scrollView.GameObject.transform.sizeDelta.getHalfWidth();return-(this._scrollViewPadding+(k+1)*U+B/2-U/2-F)}fadeInGoals(k){this._goalPrefabs.filter(((B,U)=>U>=k-2&&U<=k+2)).map(((k,B)=>{const U=k.findComponent(j.jsv);if(!U)return;U.alpha=0,U.updateFilter();tt.q.instance.game.add.tween(U,this).to({alpha:1},this._fadeInTweenDurationMs,j.GS3.Quadratic.Out).delay(B*this._fadeInTweenDelayMultiplierMs).start().onUpdate.add((()=>{U.updateFilter()}))}))}scaleGoals(){var k;if(!(null===(k=this._scrollView)||void 0===k?void 0:k.rectTransform))return;const B=this._scrollView.rectTransform.sizeDelta.getHalfWidth();this._goalPrefabs.forEach((k=>{const U=k.transform.worldPosition.x,F=Math.abs(U-B),G=F>=B/2?this._goalMinScale:(this._goalMinScale-this._goalMaxScale)/(B/2)*F+this._goalMaxScale;k.transform.setScale(G,G)}))}getAssetImageData(k){var B,U,F;const G=null===(F=null===(U=null===(B=null==k?void 0:k.onComplete)||void 0===B?void 0:B[0].data)||void 0===U?void 0:U.itemDrops)||void 0===F?void 0:F[0];return G?[G.ID.toString(),G.type]:["",""]}getAssetQuantityData(k){var B,U,F;const G=null===(F=null===(U=null===(B=null==k?void 0:k.onComplete)||void 0===B?void 0:B[0].data)||void 0===U?void 0:U.itemDrops)||void 0===F?void 0:F[0];return(null==G?void 0:G.N)>1?`+${(0,zu.Hk)(G.N,void 0,",")}`:""}setButtonEnabledStates(k){k?this._closeButton.unlockState():this._closeButton.lockState(Ku.K.Disabled),this._goalPrefabs.forEach((B=>{Nt.d.updateInjectedValues(B,{[ku.Z.DisplayCardCollectButtonEnabledState]:k})}))}collectMilestoneReward(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=B+1,F=this._questManager.getCurrentChallengeUniqueId();if(!F)return j.RQr.createHandler("[StateChallengeGoalsControllerComponent] claim ID is invalid"),void this.setButtonEnabledStates(!0);const G=`${F}_claim_${U}`;try{const k=tt.q.instance.prodigy.gameContainer.get("c47-20b6").item.beginSecureItemTransaction();yield this._questManager.claimStateChallengeGoalsReward(G),k.flush({})}catch(H){j.RQr.createHandler("[StateChallengeGoalsControllerComponent] claiming reward failed")}finally{this.setButtonEnabledStates(!0)}this._numRewardsCollected+=1,k[B].isCollectible=!1;const $=this.getCenteredGoalIndex(k);this.showNewCenteredGoal(B,$),this._scrollView.setScrollPosition(this.getScrollPositionForGoal($))}))}onCollectButtonClicked(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){var F,G,j,$,H,V,W,q;const K=null===(G=null===(F=U.task)||void 0===F?void 0:F.onComplete)||void 0===G?void 0:G[0],z=null===($=null===(j=null==K?void 0:K.data)||void 0===j?void 0:j.itemDrops)||void 0===$?void 0:$[0];if((null==K?void 0:K.type)===yl.s.GOT_PET&&z){const k=tt.q.instance.prodigy.gameContainer.get("c47-20b6"),B=tt.q.instance.prodigy.gameContainer.get("43a-6f08");k.item.sendItemReceivedEvent(z.ID,null!==(W=null===(V=null===(H=Yt.t.getItem(z.type,z.ID))||void 0===H?void 0:H.data)||void 0===V?void 0:V.name)&&void 0!==W?W:"unknown",z.type,null!==(q=z.N)&&void 0!==q?q:1,{source_type:li.C.StateChallengeMilestone,source_id:`${B.getCurrentChallengeUniqueId()}-${U.index+1}${this._stateChallengesDataProvider.getCurrentChallengeSuffixForSegmentEvents()}`,instance_type:fi.N.StateChallenge,instance_id:k.featureCommon.getCurrentInterfaceID(us.B.ProdigyChallenge),transaction_id:xt.$.generateUID()})}const Y=k.findComponentInChildren(Os.j);this.setButtonEnabledStates(!1),Y?(Y.playAnimation(qu.RewardCollect,!1),yield Y.OnAnimationComplete.asPromise(),Y.GameObject.parent.active=!1,yield this.collectMilestoneReward(B,U.index)):yield this.collectMilestoneReward(B,U.index)}))}createEmptyCell(k){const B=new j._mx;return B.addComponent(j.XVE,!0).setSizeDelta(k,0),this._contentGameObject.addChild(B),B}getCenteredGoalIndex(k){const B=k.findIndex((k=>k.isCollectible));if(B>=0)return B;const U=k.findIndex((k=>!k.isComplete));return-1===U?k.length-1:U}showNewCenteredGoal(k,B){if(k===B)return;const U=this._goalPrefabs[k],F=this._goalPrefabs[B];U&&Nt.d.updateInjectedValues(U,{[ku.Z.DisplayCardIsFocused]:!1}),F&&Nt.d.updateInjectedValues(F,{[ku.Z.DisplayCardIsFocused]:!0})}sendInterfaceSegmentEvent(){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:us.B.ProdigyChallengeMilestoneRewards,interfaceType:ui.Wm.Modal,instanceType:fi.N.UI,originType:ui.$N.ButtonClick,originID:Is.k.StateChallengesViewMilestonesButton},{item_list:{challenge_id:this._questManager.getCurrentChallengeUniqueId()+this._stateChallengesDataProvider.getCurrentChallengeSuffixForSegmentEvents(),rank:yield this._stateChallengesDataProvider.getCurrentSchoolRanking()}})}))}};(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Yu.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("43a-6f08"),(0,G.Sn)("design:type",Ou.C)],Yu.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.Cdj)("0f9-dd7b"),(0,G.Sn)("design:type",_u.v)],Yu.prototype,"_stateChallengesDataProvider",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yu.prototype,"_contentGameObject",void 0),(0,G.Cg)([(0,j.MnK)(j.Sz7),(0,G.Sn)("design:type",j.Sz7)],Yu.prototype,"_gridLayout",void 0),(0,G.Cg)([(0,j.MnK)(Mt.C),(0,G.Sn)("design:type",Mt.C)],Yu.prototype,"_scrollView",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Yu.prototype,"_closeButton",void 0),Yu=(0,G.Cg)([(0,j.EVk)("StateChallengeGoalsController",W.Y.stateChallenges)],Yu);U(74712);var Qu,Xu=U(82351),Zu=U(6413);let Ju=Qu=class extends Fi.z{create(){super.create(),this.bindContext()}bindContext(){const k="FTUE_STARTER_PET_IS_ACTIVE_";Lt.l.pad(Zu.h.STARTER_PETS,5,null).forEach(((B,U)=>{var F,G;const $=Yt.t.getItem("pet",B);j.Aq$.isDefined($)?(this._context.Container.bind(k+U).toConstantValue(!0),this._context.Container.bind("FTUE_STARTER_PET_NAME_"+U).toConstantValue($.data.name),this._context.Container.bind("FTUE_STARTER_PET_DEFAULT_SPINE_ID_"+U).toConstantValue(rs.Q[$.metadata.assets.default.assetKey]),this._context.Container.bind("FTUE_STARTER_PET_UPSCALED_SPINE_ID_"+U).toConstantValue(rs.Q[$.metadata.assets.upscaled.assetKey]),this._context.Container.bind("FTUE_STARTER_PET_ICON_ID_"+U).toConstantValue(fs.E.getIconForType("pet",B)),this._context.Container.bind("FTUE_STARTER_PET_SFX_ID_"+U).toConstantValue(Xu.B[$.metadata.assets.interactSfx]),this._context.Container.bind("FTUE_STARTER_PET_X_POSITION_OFFSET_"+U).toConstantValue(null!==(F=Qu.PET_X_POSITION_OFFSETS_MAP[$.ID])&&void 0!==F?F:0),this._context.Container.bind("FTUE_STARTER_UPSCALED_PET_X_POSITION_OFFSET_"+U).toConstantValue(null!==(G=Qu.UPSCALED_PET_X_POSITION_OFFSETS_MAP[$.ID])&&void 0!==G?G:0)):this._context.Container.bind(k+U).toConstantValue(!1)})),this.gameObject.findComponentsInChildren(Lo.B).forEach((k=>k.consume()))}getPetIdfromIndex(k){return Zu.h.STARTER_PETS[k]}};var tf;Ju.PET_X_POSITION_OFFSETS_MAP={139:-13,148:-10},Ju.UPSCALED_PET_X_POSITION_OFFSETS_MAP={139:-20,148:-20},Ju=Qu=(0,G.Cg)([(0,j.EVk)("StarterPetDataProvider",W.Y.ftue)],Ju);let ef=tf=class extends Fi.z{setPetIdBySelectionIndex(k){this._petId=Zu.h.STARTER_PETS[k],this.bindContext()}bindContext(){var k;const B=Yt.t.getItem("pet",this._petId);if(j.Aq$.isDefined(B)){this._context.Container.bind("FTUE_SELECTED_STARTER_PET_DEFAULT_SPINE_ID").toConstantValue(rs.Q[B.metadata.assets.default.assetKey]),this._context.Container.bind("FTUE_SELECTED_STARTER_PET_UPSCALED_SPINE_ID").toConstantValue(rs.Q[B.metadata.assets.upscaled.assetKey]),this._context.Container.bind("FTUE_SELECTED_STARTER_PET_CARD_DATA").toConstantValue({PET_RESCUE_CREATURE_DATA:{ID:B.ID,name:B.data.name,level:tf.STARTER_PET_INITIAL_LEVEL},PET_RESCUE_BUTTON_TEXT_KEY:"EPIC_VIEWER_ADD_TO_TEAM",PET_RESCUE_STAMP_ENABLED:!1});const U=[{type:"pet",ID:B.ID,N:1}];this._context.Container.bind("FTUE_SELECTED_STARTER_PET_AWARD_DATA").toConstantValue(U),this._context.Container.bind("FTUE_SELECTED_STARTER_PET_INTERACT_SCENE_X_OFFSET").toConstantValue(null!==(k=tf.PET_X_POSITION_OFFSETS_MAP[this._petId])&&void 0!==k?k:0)}}};ef.PET_X_POSITION_OFFSETS_MAP={148:-60,139:150,142:50},ef.STARTER_PET_INITIAL_LEVEL=1,ef=tf=(0,G.Cg)([(0,j.EVk)("SelectedStarterPetDataProvider",W.Y.ftue)],ef);var sf=U(435);let nf=class extends j.uAl{constructor(){super(...arguments),this.onError=new j.HN0}startBattle(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=tt.q.instance.prodigy;try{const B=this._currentPlayerProvider.player;yield this.setQuestData();const U=yield tt.q.instance.prodigy.gameContainer.get("a25-68f4").getBattleStartQuestData(Ci.gu.Ultimates),F=k.world.getCurrentZone(),G=k.world.getCurrentMapTag(),j=k.world.getZone(F).getMap(G).battleBG,$={battleType:Ci.gu.Ultimates,difficulty:10,isMock:this.isMockBattle,questId:B.ultimateQuestId,taskId:B.ultimateTaskId,activeQuestIDs:U.questIDs,questEventsToSend:U.questEvents},H={backgroundID:j,backgroundMusicID:2,onEscape:()=>{this.onBattleComplete(!1)},onDefeat:()=>{this.onBattleComplete(!1)},onVictory:()=>{this.onBattleComplete(!0)},onFatalError:()=>{this.onBattleComplete(!1)}};tt.q.instance.prodigy.game.state.states.get(Tt.G.SecureBattleRevamp).startBattleRequest($,H)}catch(e){j.VyI.log(`There was a problem loading battle data for Ultimates battle in StartUltimatesBattleComponent.startBattle: ${e.message}`,j.$bb.Error),this.onError.dispatch()}}))}setQuestData(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._currentPlayerProvider.player,B=(yield this._questDataProvider.getCurrentQuestData()).find((B=>B.questID===k.ultimateQuestId));this.tamingPhase=B.getTamingLevel(),this.ultimateQuestId=B.questID,this.petId=B.petID,this.isMockBattle=!1}))}onBattleComplete(k){const B=this._currentPlayerProvider.player;tt.q.instance.game.broadcaster.addAppListener(jn.ig.PlayerLoaded,(()=>{const U=tt.q.instance.prodigy.open.showFullScreenSpinner();this._questManager.updateQuestProgress(this.ultimateQuestId).then((()=>{(!k||this.tamingPhase<2)&&tt.q.instance.prodigy.open.pets()})).catch((k=>{j.VyI.log(`[StartUltimateBattleComponent] Unable to load quest progress ${j.RQr.stringify(k)}`,j.$bb.Error),tt.q.instance.prodigy.open.prefabMenu(Rt.l.ErrorDialogContentRefresh).createContainer=!1})).finally((()=>{U.destroy()})),tt.q.instance.game.broadcaster.removeAppListener(jn.ig.PlayerLoaded,this,void 0),B.unlockSessionStatus()}),this,void 0,!0),B.setUltimateSessionStatus(nl.n.Transition,"",0,!0)}destroy(){tt.q.instance.game.broadcaster.removeAppListener(jn.ig.PlayerLoaded,this,void 0),this.onError.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],nf.prototype,"_currentPlayerProvider",void 0),(0,G.Cg)([(0,j.Cdj)("200-7dc0"),(0,G.Sn)("design:type",Object)],nf.prototype,"_questDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("2fb-aa75"),(0,G.Sn)("design:type",cu.u)],nf.prototype,"_battleHPProvider",void 0),(0,G.Cg)([(0,j.Cdj)("e50-b09b"),(0,G.Sn)("design:type",qd.k)],nf.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nf.prototype,"onError",void 0),nf=(0,G.Cg)([(0,j.EVk)("StartUltimatesBattle",W.Y.ultimates)],nf);let af=class extends nf{setQuestData(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this._questData)return void j.VyI.log("Could not start mock ultimates battle. No UltimatesQuestData could be found in context.",j.$bb.Error);this.tamingPhase=0,this.petId=this._questData.petID,this.ultimateQuestId=this._questData.questID,this.isMockBattle=!0,this.battleDifficulty="easy";const k=this._currentPlayerProvider.player;this._currentMap=tt.q.instance.prodigy.world.getCurrentMap(),k.setUltimateSessionStatus(nl.n.TamingUltimate,this._questData.questID,-1)}))}onBattleComplete(k){const B=this._currentPlayerProvider.player;B.setUltimateSessionStatus(nl.n.Transition,"",0,!0),tt.q.instance.prodigy.world.it(this._currentMap),tt.q.instance.game.broadcaster.addAppListener(jn.ig.PlayerLoaded,(()=>{tt.q.instance.prodigy.open.pets(),tt.q.instance.game.broadcaster.removeAppListener(jn.ig.PlayerLoaded,this,void 0),B.unlockSessionStatus()}),this,void 0,!0)}sendSegmentEvent(){tt.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:Is.k.TryABattle,interfaceType:ui.Wm.DialogBox,interfaceName:us.B.PetsWindow,elementType:"mythic_task",elementID:this.ultimateQuestId})}};(0,G.Cg)([(0,j.Cdj)("UltimatesQuestData"),(0,G.Sn)("design:type",sf.p)],af.prototype,"_questData",void 0),af=(0,G.Cg)([(0,j.EVk)("StartMockUltimatesBattle",W.Y.ultimates)],af);var rf,of=U(24285),hf=U(93171);!function(k){k.InProgress="inprogress",k.Transition="idle",k.Full="FULL"}(rf||(rf={}));let cf=class extends j.uAl{constructor(){super(...arguments),this.onValueChangeComplete=new j.HN0}setState(k,B,U){const F=B?rf.Full:rf.InProgress;this.heartAnimator.playAnimation(this.getAnimationName(F),!0),this._tintOverlay.active=B,this._highlightBack.active=B||k,this._highlightStroke.active=k,this._progressCompleteIcon.active=B,this._progressBarTrack.active=k,this._membershipLockIcon.active=U,setTimeout((()=>j.qFr.setSmoothed(this._membershipLockIcon.findComponentInChildren(j.vYh).image.texture,!0)),Kt.A.SECONDS_TO_MILLISECONDS_MULTIPLIER),this.setValue(B?1:0,!1)}setValue(k,B){if(!B)return this.setInitialState(k),this._progressBar.setValue(k),void this.onValueChangeComplete.dispatch();this._progressBar.tweenValue(k),1===k&&(this.heartAnimator.OnAnimationComplete.addOnce((()=>{this.heartAnimator.OnAnimationComplete.addOnce((()=>{this.onValueChangeComplete.dispatch()})),this.heartAnimator.stopAnimation(),this.heartAnimator.playAnimation(this.getAnimationName(rf.Full),!0)})),this.heartAnimator.stopAnimation(),this.heartAnimator.playAnimation(this.getAnimationName(rf.Transition),!1)),this._progressBar.onComplete.addOnce((()=>{1===k?this._progressCompleteIcon.active=!0:this.onValueChangeComplete.dispatch()}))}setInitialState(k){this._progressCompleteIcon.active=1===k,1===k?this.heartAnimator.playAnimation(this.getAnimationName(rf.Full),!0):this.heartAnimator.playAnimation(this.getAnimationName(rf.InProgress),!0)}getAnimationName(k){return`Heart-${this._slot}-${k}`}destroy(){this.heartAnimator.OnAnimationComplete.removeAll(),this.onValueChangeComplete.dispose(),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],cf.prototype,"_slot",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],cf.prototype,"heartAnimator",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cf.prototype,"_tintOverlay",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cf.prototype,"_highlightBack",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cf.prototype,"_highlightStroke",void 0),(0,G.Cg)([(0,j.MnK)(hf.a),(0,G.Sn)("design:type",hf.a)],cf.prototype,"_progressBar",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cf.prototype,"_progressBarTrack",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cf.prototype,"_progressCompleteIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cf.prototype,"_membershipLockIcon",void 0),cf=(0,G.Cg)([(0,j.EVk)("UltimatesHealthBarSegment",W.Y.ultimates)],cf);let df=class extends j.uAl{constructor(){super(...arguments),this._segments=[],this._tamingPhase=1}get onHealthChangeComplete(){return this._activeSegment.onValueChangeComplete}setLayerDepths(k,B,U){const F=j.wa5.getActiveScene();F.setLayerDepth(this._background.layer,k),this._segments.forEach((k=>{F.setLayerDepth(k.GameObject.layer,k===this._activeSegment?U:B)})),F.setLayerDepth(this._membershipIconContainer.layer,U)}init(k,B){this._tamingPhase=j.cj9.clamp(k,1,this._segments.length),this._segments.forEach(((k,U)=>{k.setState(U===this._tamingPhase-1,U0&&(F=(this._maxHealth-j.cj9.clamp(k,0,this._maxHealth))/this._maxHealth),this._activeSegment.setValue(F,U)}cacheAsBitmap(k,B){B?of.s.setLayerCacheAsBitmap(this._activeSegment.GameObject.layer,k):(of.s.setLayerCacheAsBitmap(this._background.layer,k),this._segments.forEach((B=>{of.s.setLayerCacheAsBitmap(B.GameObject.layer,k)})))}};(0,G.Cg)([(0,j.MnK)(cf),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],df.prototype,"_segments",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],df.prototype,"_background",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],df.prototype,"_membershipIconContainer",void 0),df=(0,G.Cg)([(0,j.EVk)("UltimatesBattleHealthBarComponent",W.Y.ultimatesUi)],df);var lf=U(37155);let uf=class extends j.uAl{constructor(){super(...arguments),this.onClose=new j.HN0}init(k,B){const U=B?"ULTIMATES_TRIAL_BATTLE_TITLE_VICTORY":"ULTIMATES_TRIAL_BATTLE_TITLE_DEFEAT",F=B?"ULTIMATES_TRIAL_BATTLE_DESC_VICTORY":"ULTIMATES_TRIAL_BATTLE_DESC_DEFEAT",G=this._currentPlayerProvider.player.getName();this._headerText.setLocalizationKey(U),this._descriptionText.setLocalizationKey(F),this._descriptionText.setTextArguments(G),this._ultimatePet.init(k)}destroy(){this.onClose.dispatch(),this.onClose.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],uf.prototype,"_currentPlayerProvider",void 0),(0,G.Cg)([(0,j.MnK)(lf.i),(0,G.Sn)("design:type",lf.i)],uf.prototype,"_ultimatePet",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],uf.prototype,"_headerText",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],uf.prototype,"_descriptionText",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uf.prototype,"onClose",void 0),uf=(0,G.Cg)([(0,j.EVk)("UltimatesTrialPostBattle",W.Y.ultimatesUi)],uf);var ff=U(34398);let bf=class extends ff.l{constructor(){super(...arguments),this._funnelName=en.o.FunnelTransitMap,this._campaign=Fs.R.None,this._sendPromotedAd=!1,this._showVideo=!0,this._injectionIdentifiers=[]}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._loggedInPlayer.player,B=k.hasMembership();return!(!k.hasCompletedTutorial()||k.memberPrompt)&&(!(!B&&Qt.J.isSchoolHours()||B&&k.backpack.hasItem("mount",1)>0)&&(!k.isPlayingAtSchool()||B&&0===k.backpack.hasItem("mount",1)))}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,arguments,void 0,(function*(B=!1,U=!1){yield k.open.call(this),tt.q.instance.game.broadcaster.broadcast(jn.iZ.ToolTipClosed);const F={};let G;this._injectionIdentifiers.forEach((k=>F[k]=this.getInjectedValue(k)));const $=new Promise((k=>{G=this._loggedInPlayer.player.rewardMembershipPrizes(k)})),H=yield G;$.then((()=>{if(H)this.onClose.dispatch();else{const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;tt.q.instance.prodigy.open.membershipInfo((()=>{k.memberPrompt=!0,this.onClose.dispatch()}),{conversionFunnelName:this._funnelName,conversionStaticOrVideo:this._campaign},this._analyticSource,B,F)}})).catch(j.RQr.createHandler("Error opening membership ad"))}))}overrideConversionEvent(k,B){this._funnelName=k,this._campaign=B}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],bf.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.gfw)(en.o),(0,G.Sn)("design:type",String)],bf.prototype,"_funnelName",void 0),(0,G.Cg)([(0,j.gfw)(Fs.R),(0,G.Sn)("design:type",String)],bf.prototype,"_campaign",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],bf.prototype,"_sendPromotedAd",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],bf.prototype,"_analyticSource",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],bf.prototype,"_showVideo",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],bf.prototype,"_injectionIdentifiers",void 0),bf=(0,G.Cg)([(0,j.EVk)("OpenMembershipAdPopup",W.Y.membership)],bf);let pf=class extends ad.b{initialize(){var k;super.initialize();const B=new nd.N,{r:U,g:F,b:G}=j.Q1f.hexToColor(null!==(k=this._color)&&void 0!==k?k:"#000000"),$=j.Aq$.isDefined(this._alpha)?this._alpha:1;B.matrix=[0,0,0,0,U/255,0,0,0,0,F/255,0,0,0,0,G/255,0,0,0,$,0],this._filterList.push(B)}};(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],pf.prototype,"_color",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],pf.prototype,"_alpha",void 0),pf=(0,G.Cg)([(0,j.EVk)("ShadowFilter",W.Y.effect)],pf);let vf=class extends j.uAl{constructor(){super(...arguments),this._ultimateIcon=null,this._nameText=null,this._levelText=null,this._heartsText=null,this._progressText=null,this._unknownText=null,this._tamedIconObject=null,this._levelStarObject=null,this._heartsObject=null,this.popOptions=null,this.addButton=null,this.infoButton=null,this._greyscaleFilter=null,this._shadowFilter=null,this._progressThreshold=25,this.onCardLoaded=new j.HN0}create(){super.create(),this._ultimateIcon.onIconLoaded.add((()=>{this.onCardLoaded.dispatch()}))}destroy(){super.destroy(),this.onCardLoaded.dispose()}setTamed(k,B,U){this.setPetData(k),this._tamedIconObject.active=!0,this._levelStarObject.active=!0,this._heartsObject.active=!0,this._progressText.GameObject.active=!1,this._unknownText.GameObject.active=!1,this._nameText.GameObject.active=!0,this._levelText.text=B.toString(),this._heartsText.text=U.toString(),this._greyscaleFilter.removeFilter(),this._shadowFilter.removeFilter()}setUntamed(k,B){this.setPetData(k);const U=j.cj9.clamp(B,0,100),F=U{k.destroy()})),this._untamedList.children.slice().forEach((k=>{k.destroy()}))}showEmptyList(){this._emptyList.active=!0,this._tamedList.parent.active=!1,this._untamedList.parent.active=!1,this.dispatchLoaded()}initList(k,B){if(!k||k.length<=0)return void(B.parent.active=!1);B.parent.active=!0;B.parent.transform.posY=this._yDepth,k.forEach((k=>{this.createCard(k,B)}),this),this._yDepth+=Math.ceil(k.length/this._petRowSize)*this._petGap+this._listGap}createCard(k,B){this._prefabLoader.loadWithDependenciesFromGUID(Rt.l.UltimatesInventoryCard,B).then((U=>{this.initCard(U,k,B)})).catch((k=>{this.onError.dispatch(),j.VyI.log(`[PetInventoryViewComponent]: Error loading prefab ${Rt.l.UltimatesInventoryCard}. Reason: ${k.message}`,j.$bb.Error)}))}initCard(k,B,U){const F=k.findComponent(vf);F.onCardLoaded.addOnce(this.finishedLoading.bind(this));const G=k.findComponent(Fe.n),$=B;if(j.Aq$.isDefined($.id)){const k=Yt.t.getItem("pet",$.id);F.setUntamed(k,Math.floor(100*$.accomplishedTasks/$.totalTasks)),F.infoButton.onEnabledClick.add((()=>this.onInfoClicked.dispatch($.id))),G.onClicked.add((()=>{this.togglePopOptions(F,$.id,!1),this.onUntamedCardClicked.dispatch($.id)}))}else{const k=B,U=Yt.t.getItem("pet",k.ID);F.setTamed(U,k.level,eo.P8.getPetCurrentHealth(k)),F.addButton.onEnabledClick.add(this.disablePopOptions,this),F.addButton.onEnabledClick.add((()=>this.onAddClicked.dispatch(k))),F.infoButton.onEnabledClick.add((()=>this.onInfoClicked.dispatch(k.ID))),G.onClicked.add((()=>{this.togglePopOptions(F,k.ID,!0),this._segmentButtonProperties.buttonName=k.name,this.onTamedCardClicked.dispatch(k.ID)}))}U.addChild(k)}finishedLoading(){0==--this._unloadedElements&&(this.resizeContainer(),this.dispatchLoaded(),this.fixRenderOrder(this._tamedList),this.fixRenderOrder(this._untamedList))}resizeContainer(){const k=this._emptyList.parent.transform,B=k.widthDelta;k.setSizeDelta(B,Math.max(this._yDepth,this._minimumContainerHeight))}fixRenderOrder(k){k.children.forEach(((B,U)=>B.setRenderOrder(k.children.length-U)))}dispatchLoaded(){this._unloadedElements=-1,this.onLoaded.dispatch()}togglePopOptions(k,B,U){this._tamedList.children.concat(this._untamedList.children).map((k=>k.findComponent(vf))).filter((B=>B!==k)).forEach((k=>k.popOptions.active=!1)),k.popOptions.active=!k.popOptions.active,k.GameObject.bringToFront(),U&&this._player.player.kennel.petTeam.every((k=>(null==k?void 0:k.getID())!==B))?k.addButton.unlockState():k.addButton.lockState(Ku.K.Disabled)}disablePopOptions(){this._tamedList.children.concat(this._untamedList.children).map((k=>k.findComponent(vf))).filter((k=>k.popOptions)).forEach((k=>k.popOptions.active=!1))}destroy(){this.gameObject.onActiveInHierarchyChanged.remove(this.disablePopOptions,this),this.onTamedCardClicked.dispose(),this.onUntamedCardClicked.dispose(),this.onInfoClicked.dispose(),this.onAddClicked.dispose(),this.onLoaded.dispose(),this.onError.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],gf.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],gf.prototype,"_player",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],gf.prototype,"_listGap",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],gf.prototype,"_petGap",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],gf.prototype,"_minimumContainerHeight",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],gf.prototype,"_petRowSize",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gf.prototype,"_emptyList",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gf.prototype,"_tamedList",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gf.prototype,"_untamedList",void 0),(0,G.Cg)([(0,j.MnK)(Xs),(0,G.Sn)("design:type",Xs)],gf.prototype,"_segmentButtonProperties",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],gf.prototype,"onLoaded",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],gf.prototype,"onError",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],gf.prototype,"onAddClicked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],gf.prototype,"onInfoClicked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],gf.prototype,"onTamedCardClicked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],gf.prototype,"onUntamedCardClicked",void 0),gf=(0,G.Cg)([(0,j.EVk)("PetInventoryView",W.Y.ultimatesUi)],gf);var mf=U(62430);let yf=class extends j.uAl{constructor(){super(...arguments),this.onPostFrames=new j.HN0,this._counter=Number.MAX_SAFE_INTEGER}get counter(){return this._counter}start(){this._counter=0}update(){super.update(),this._counter=this._segments.length?j.VyI.log(`[StaticUltimatesTamingMeter] Error setting the taming level: index ${k} out of range`,j.$bb.Error):this._segments.forEach(((B,U)=>{B.active=U===k}))}};var Of;(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Cf.prototype,"_segments",void 0),Cf=(0,G.Cg)([(0,j.EVk)("StaticUltimatesTamingMeter",W.Y.ultimatesUi)],Cf);let If=Of=class extends j.uAl{constructor(){super(...arguments),this.onLoaded=new j.HN0,this.onError=new j.HN0,this.onAddToTeamClicked=new j.HN0}init(k,B,U=!1){var F,G,j;this._componentData=k,this.nt=B,this._panelOverlay.GameObject.active=!0,this._tamedAddToTeamButton.GameObject.active=!1;this._addToTeam.GameObject.parent.active=!1,this._tamingMeter.GameObject.active=!1,this._tamedLabel.active=!1,this._leavingSoon.active=!1,this._notStartedLabel.active=!1,this._startQuest.unlockState(),B?this.initNonMember():U&&(this._ftueBreadcrumb.isIncomplete.addOnce(this.initializeFTUE,this),this._ftueBreadcrumb.checkCompletion()),this._componentData.petItem=Yt.t.getItem("pet",k.petId);const $=null===(G=null===(F=this._componentData.petItem)||void 0===F?void 0:F.metadata)||void 0===G?void 0:G.assets;if("spine"!==(null===(j=null==$?void 0:$.card)||void 0===j?void 0:j.type))throw this.onError.dispatch(),new Error(`Pet ${k.petId} doesn't have a card component with a spine associated to it`);tt.q.instance.prodigy.load.assets([`spine-${$.card.ID}`],this.initPetAndQuestData.bind(this))}disable(){this._startQuest.lockState(Ku.K.Disabled),this._panelOverlay.GameObject.active=!1}initializeFTUE(){this._startQuest.onEnabledClick.addOnce(this.finalizeFTUE,this)}finalizeFTUE(){tt.q.instance.prodigy.gameContainer.get("c47-20b6").ultimatesFTUE.sendFunnelEvent({funnelName:"mythics_ftue",funnelType:"tutorial",stepName:"open_mythic_detail_view",step:_f.V.OpenMythicDetailView})}addToTeamClicked(k=!1){const B=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.onAddToTeamClicked.dispatch(B.kennel.getPetByID(this._componentData.petId)),k&&this.toggleAddPop()}initPetAndQuestData(){switch(this._componentData.questState){case Af.e.Start:this.initStart();break;case Af.e.QuestAccepted:this.initAccepted();break;case Af.e.Found:this.initFound();break;case Af.e.QuestCompleted:this.initCompleted()}}initStart(){this._petName.GameObject.active=!1,this._nameTease.active=!0,this._taskProgress.active=!1,this._questionMark.active=!0,this._startQuest.GameObject.active=!0,this._petSpine.onSpineItemLoaded.addOnce(this._shadowFilter.applyFilter.bind(this._shadowFilter)),this._petSpine.onSpineItemLoaded.addOnce(this._freezeFrameWait.start.bind(this._freezeFrameWait)),this._panelOverlay.GameObject.active=!1,this._addToTeam.lockState(Ku.K.Disabled),this._tamedLabel.active=!1,this._unseenBackground.active=!0,this._seenBackground.active=!1,this._petElement.GameObject.active=!1,this.onLoaded.addOnce((()=>{this._leavingSoon.active=this.isLeavingSoon(),this._notStartedLabel.active=!this.nt,this._tamingMeter.GameObject.active=!1})),this.loadPetAnimation()}initAccepted(){this._petName.GameObject.active=this._componentData.nameUnlocked,this._petName.text=this._componentData.petItem.data.name,this._nameTease.active=!this._componentData.nameUnlocked,this._startQuest.GameObject.active=!1,this._questionMark.active=!0,this._addToTeam.lockState(Ku.K.Disabled),this.initProgressBar(),this.initTimer(),this._tamed.active=!1,this._petSpine.onSpineItemLoaded.addOnce(this._shadowFilter.applyFilter.bind(this._shadowFilter)),this._petSpine.onSpineItemLoaded.addOnce(this._freezeFrameWait.start.bind(this._freezeFrameWait)),this._notStartedLabel.active=!1,this._tamedLabel.active=!1,this._unseenBackground.active=!0,this._seenBackground.active=!1,this._petElement.GameObject.active=!1,this.onLoaded.addOnce((()=>{this._leavingSoon.active=this.isLeavingSoon(),this._tamingMeter.GameObject.active=!0,this._tamingMeter.setTamingLevel(this._componentData.tamingLevel)})),this.loadPetAnimation()}initFound(){this._petName.GameObject.active=!0,this._petName.text=this._componentData.petItem.data.name,this._nameTease.active=!1,this._startQuest.GameObject.active=!1,this._questionMark.active=!1,this._addToTeam.lockState(Ku.K.Disabled),this.initProgressBar(),this.initTimer(),this._tamed.active=!1,this._petSpine.onSpineItemLoaded.addOnce(this._greyscaleFilter.applyFilter.bind(this._greyscaleFilter)),this._petSpine.onSpineItemLoaded.addOnce(this._freezeFrameWait.start.bind(this._freezeFrameWait)),this._notStartedLabel.active=!1,this._tamedLabel.active=!1,this._petElement.GameObject.active=!0,this._petElement.setPetID(this._componentData.petId),this._unseenBackground.active=!1,this._seenBackground.active=!0,this.onLoaded.addOnce((()=>{this._leavingSoon.active=this.isLeavingSoon(),this._tamingMeter.GameObject.active=!0,this._tamingMeter.setTamingLevel(this._componentData.tamingLevel)})),this.loadPetAnimation()}initCompleted(){this._petName.GameObject.active=!0,this._petName.text=this._componentData.petItem.data.name,this._nameTease.active=!1,this.initProgressBar(),this._timer.GameObject.parent.active=!1,this._startQuest.GameObject.active=!1,this._questionMark.active=!1,this._taskProgress.active=!1,this._tamingMeter.setTamingLevel(this._componentData.tamingLevel),this._tamedAddToTeamButton.GameObject.active=!0,this._notStartedLabel.active=!1,this._petElement.GameObject.active=!0,this._petElement.setPetID(this._componentData.petId),this._unseenBackground.active=!1,this._seenBackground.active=!0,this.onLoaded.addOnce((()=>{this._tamingMeter.GameObject.active=!0,this._tamedLabel.active=!this.nt,this._tamingMeter.setTamingLevel(this._componentData.tamingLevel)})),this.loadPetAnimation(),this.gameObject.onActiveInHierarchyChanged.add(this.setTamedLockState,this),this.setTamedLockState()}initProgressBar(){this._taskProgress.active=!0;const k=this._taskProgress.findComponentInChildren(ys.z),B=this._componentData.accomplishedCollectionTasks>=this._componentData.totalCollectionTasks,U=this._componentData.accomplishedCollectionTasks/this._componentData.totalCollectionTasks,F=B?tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("PROGRESS_BAR_COMPLETE"):`${this._componentData.accomplishedCollectionTasks} / ${this._componentData.totalCollectionTasks}`;k.setValue(U),k.setBarText(F)}toggleAddPop(){const k=this._addToTeam.GameObject.parent;k.active=!k.active,this._player.player.kennel.hasPet(this._componentData.petId)&&this._player.player.kennel.petTeam.every((k=>(null==k?void 0:k.getID())!==this._componentData.petId))?this._addToTeam.unlockState():this._addToTeam.lockState(Ku.K.Disabled)}setTamedLockState(){var k;this._addToTeam.GameObject.parent.active&&this.toggleAddPop(),(null===(k=this._player)||void 0===k?void 0:k.player.kennel.petTeam.every((k=>(null==k?void 0:k.getID())!==this._componentData.petId)))?this._tamedAddToTeamButton.unlockState():this._tamedAddToTeamButton.lockState(Ku.K.Disabled)}loadPetAnimation(){const k=this._petSpine.GameObject.parent.transform,B=this._componentData.petItem.metadata.assets.card;k.setScale(B.cardScale,B.cardScale),k.posX=B.x,k.posY=B.y,this._petSpine.onSpineItemLoaded.addOnce((()=>{this.onLoaded.dispatch(),this.restartAnimation()})),this._petSpine.setAssetID(this._componentData.petId)}restartAnimation(){this._petSpineAnimator.stopAnimation(),this._petSpineAnimator.playAnimation(Of.DEFAULT_ANIMATION,!0)}initNonMember(){this.onLoaded.addOnce((()=>{this._membershipLock.active=!0,this._startQuest.lockState(Ku.K.Disabled)}))}initTimer(){this._timer.GameObject.parent.active=!0;const k=this._componentData.deadline.valueOf()-this._timeManager.getServerTimeMs();this._timer.setCountdownTimeMS(k)}isLeavingSoon(){const k=this._componentData.questState!==Af.e.QuestCompleted,B=!tt.q.instance.prodigy.classModeController.isClassMode(),U=eo.P8.isUltimateLeavingSoon(this._componentData.deadline,Tf.T.Week);return k&&B&&U&&!this.nt}destroy(){this.onError.dispose(),this.onLoaded.dispose(),this.onAddToTeamClicked.dispose(),this.gameObject.onActiveInHierarchyChanged.remove(this.setTamedLockState,this),super.destroy()}};If.DEFAULT_ANIMATION="idle",(0,G.Cg)([(0,j.Cdj)("12f-4e29"),(0,G.Sn)("design:type",sh.F)],If.prototype,"_breadcrumbManager",void 0),(0,G.Cg)([(0,j.Cdj)("a03-308f"),(0,G.Sn)("design:type",Ks.V)],If.prototype,"_timeManager",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],If.prototype,"_player",void 0),(0,G.Cg)([(0,j.MnK)(rd),(0,G.Sn)("design:type",rd)],If.prototype,"_greyscaleFilter",void 0),(0,G.Cg)([(0,j.MnK)(pf),(0,G.Sn)("design:type",pf)],If.prototype,"_shadowFilter",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_nameTease",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],If.prototype,"_petName",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],If.prototype,"_startQuest",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_taskProgress",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],If.prototype,"_timer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_tamed",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_membershipLock",void 0),(0,G.Cg)([(0,j.MnK)(mf.N),(0,G.Sn)("design:type",mf.N)],If.prototype,"_petSpine",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],If.prototype,"_petSpineAnimator",void 0),(0,G.Cg)([(0,j.MnK)(yf),(0,G.Sn)("design:type",yf)],If.prototype,"_freezeFrameWait",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],If.prototype,"_addToTeam",void 0),(0,G.Cg)([(0,j.MnK)(Fe.n),(0,G.Sn)("design:type",Fe.n)],If.prototype,"_panelOverlay",void 0),(0,G.Cg)([(0,j.MnK)(Cf),(0,G.Sn)("design:type",Cf)],If.prototype,"_tamingMeter",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_seenBackground",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_unseenBackground",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_notStartedLabel",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_tamedLabel",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_leavingSoon",void 0),(0,G.Cg)([(0,j.MnK)(Sf.D),(0,G.Sn)("design:type",Sf.D)],If.prototype,"_petElement",void 0),(0,G.Cg)([(0,j.MnK)(wf),(0,G.Sn)("design:type",wf)],If.prototype,"_ftueBreadcrumb",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],If.prototype,"_tamedAddToTeamButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],If.prototype,"_questionMark",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],If.prototype,"onLoaded",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],If.prototype,"onError",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],If.prototype,"onAddToTeamClicked",void 0),If=Of=(0,G.Cg)([(0,j.EVk)("PetProgressCard",W.Y.ultimatesUi)],If);let Df=class extends j.uAl{constructor(){super(...arguments),this._progressCards=[]}create(){super.create(),this._progressCards.forEach((k=>{k.GameObject.active=!1}))}init(k,B){this._nonMemberScroll.active=!1;const U=this._nonMemberScroll.findComponentInChildren(F.$);U.onEnabledClick.removeAll(),U.onEnabledClick.add(this.onMembershipBenefitsButtonClicked,this);const G=!tt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_ULTIMATES,ls.B.BREADCRUMB_ULTIMATES_FTUE);this._progressCards.forEach(((U,F)=>{F>=k.cardConfigs.length?U.GameObject.active=!1:(U.GameObject.active=!0,G?(U.init(k.cardConfigs[F],B,0===F),F>0&&U.disable()):U.init(k.cardConfigs[F],B,!0))})),B&&k.tamedPets.length<1?(this.inventory.GameObject.active=!1,this._nonMemberScroll.active=!0):this.inventory.init(k.tamedPets,k.untamedPets)}onMembershipBenefitsButtonClicked(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=Qt.J.showYouTubeMembershipAd(tt.q.instance.game,!0)?Fs.R.Video:Fs.R.Static,B=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasLegacyMembership(),U=this._nonMemberScroll.findComponent(bf),F=B?"visited_mythics_pet_book_upgrade":"visited_mythics_pet_book";tt.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:F,category:"mythics",contentId:null,adType:k}),this.gameObject.active=!1,U.overrideConversionEvent(en.o.FunnelMythics21Q4,Fs.R.Mythics21Q4),yield U.open(!0,B),this.gameObject.active=!0}))}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(If),(0,G.Sn)("design:type",Array)],Df.prototype,"_progressCards",void 0),(0,G.Cg)([(0,j.MnK)(gf),(0,G.Sn)("design:type",gf)],Df.prototype,"inventory",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Df.prototype,"_nonMemberScroll",void 0),Df=(0,G.Cg)([(0,j.EVk)("PetHomeScreen",W.Y.ultimatesUi)],Df);let Rf=class extends j.uAl{updateDisplayInfo(k){this._petId=k,this._petItem=Yt.t.getItem("pet",this._petId),this._petItem?(this._petName.text=eo.P8.getPetDisplayName(this._petItem.data,this._petItem),this._petInfo.text=this._localizer.getText(Qt.J.getLocalizationFlavorKey({id:k,type:"pet"}))):j.VyI.log(`PetAboutInfoComponent: Unable to load pet item data with id ${this._petId}`,j.$bb.Error)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Rf.prototype,"_petId",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Rf.prototype,"_petName",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Rf.prototype,"_petInfo",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Rf.prototype,"_localizer",void 0),Rf=(0,G.Cg)([(0,j.EVk)("PetAboutInfoCard",W.Y.uiPet)],Rf);var Pf=U(95946);let Mf=class extends j.uAl{updateDisplayInfo(k){this._petId=k,this._petItem=Yt.t.getItem("pet",this._petId),this._petItem?(this.updateHearts(),this.updateElement()):j.VyI.log(`PetStatInfoComponent: Unable to load pet item data with id ${this._petId}`,j.$bb.Error)}updateHearts(){var k;const B=null!==(k=this._playerProvider.player.kennel.getPetByID(this._petId))&&void 0!==k?k:this._petItem,U=eo.P8.getPetMaxHealth(B),F=eo.P8.getPetCurrentHealth(B),G=(0,zu.Hk)(U),j=(0,zu.Hk)(F);this._heartsProgressBar.setValue(F/U),this._petHeartsText.text=`${j}/${G}`}updateElement(){const k=eo.P8.getElementType(this._petItem);this._petElementText.text=xt.$.capitalizeFirstLetter(k),this._petElementIcon.updateAsset(Ve._.Ui_raster_icons_json,`icon-medium-${k===Pf.a.Plant?"earth":k}`)}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Mf.prototype,"_playerProvider",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Mf.prototype,"_petId",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Mf.prototype,"_petHeartsText",void 0),(0,G.Cg)([(0,j.MnK)(hf.a),(0,G.Sn)("design:type",hf.a)],Mf.prototype,"_heartsProgressBar",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Mf.prototype,"_petElementText",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],Mf.prototype,"_petElementIcon",void 0),Mf=(0,G.Cg)([(0,j.EVk)("PetStatsInfoCard",W.Y.uiPet)],Mf);var Nf=U(39984);let xf=class extends j.uAl{constructor(){super(...arguments),this.onLoaded=new j.HN0,this.onAddToTeamClicked=new j.HN0}init(k,B,U,F=!1){this._componentData=k,this._componentData.petItem=Yt.t.getItem("pet",k.petId),F&&this.onLoaded.addOnce((()=>{this._unlockSpineAnimator.playAnimation("epic-tamed",!1)})),this._petSpineLoader.onSpineItemLoaded.addOnce(this.onLoaded.dispatch,this.onLoaded),this._petSpineLoader.setAssetID(k.petId),this._tamingMeter.setTamingLevel(k.tamingLevel),this._membershipBenefitsButton.GameObject.active=!1,this._addToTeamButton.GameObject.active=!1,this._petNameHolder.active=!1,this._shadowFilter.removeFilter(),this._greyscaleFilter.removeFilter(),this._addToTeamButton.onEnabledClick.removeAll(),this._addToTeamButton.onEnabledClick.add(this.addToTeamClicked.bind(this)),B&&(this._memberLockObject.active=!0),this._canAccess=!B;const G=this._componentData.petItem.metadata.assets.tamingView;if(G){const k=G.viewerScale;this._petSpineLoader.GameObject.transform.setScale(k);const B=this._petSpineLoader.GameObject.transform.localPosition;this._petSpineLoader.GameObject.transform.setPosition(B.x+G.x,B.y+G.y)}switch(this._petSpineAnimator.GameObject.setLayer(this.GameObject.layer),this._unknownPetName.GameObject.setLayer(this.GameObject.layer),this._untamedPetName.GameObject.setLayer(this.GameObject.layer),this._unknownPetName.GameObject.active=!1,this._untamedPetName.GameObject.active=!1,this._tamedPetDataParent.active=!1,this._lockIconObject.active=!1,k.questState){case Af.e.Start:case Af.e.QuestAccepted:this.initUnknown();break;case Af.e.Found:this.initUntamed();break;case Af.e.QuestCompleted:this.initTamed();break;default:j.VyI.log(`[Pet Taming View]: Invalid petProgressStatus ${k.questState} given`,j.$bb.Warning)}this.showTimerState(U,eo.P8.isUltimateLeavingSoon(k.deadline,Tf.T.Week),k.questState===Af.e.QuestCompleted)}addToTeamClicked(){this.onAddToTeamClicked.dispatch({ID:this._componentData.petId})}showTimerState(k,B,U){this._timer.GameObject.parent.active=k,this._epicOfTheMonthText.active=k&&(!B||U),this._leavingSoonText.active=k&&B&&!U,this._leavingSoonAnimation.active=k&&B&&!U}initNotStarted(){this._unknownPetName.GameObject.active=!0,this._shadowFilter.applyFilter(),this._lockIconObject.active=this._canAccess,this._newEpicTasksButton.GameObject.active=!1,this._petNameHolder.active=!0,this._timer.GameObject.parent.active=!1,this._tamed.active=!1,this._tamingMeter.GameObject.parent.active=!0}initUnknown(){this._unknownPetName.GameObject.active=!this._componentData.nameUnlocked,this._untamedPetName.GameObject.active=this._componentData.nameUnlocked,this._untamedPetName.text=this._componentData.petItem.data.name,this._shadowFilter.applyFilter(),this._lockIconObject.active=this._canAccess,this._petNameHolder.active=!0,this._tamingMeter.GameObject.parent.active=!0,this._timer.GameObject.active=!0;const k=this._componentData.deadline.valueOf()-this._timeManager.getServerTimeMs();this._timer.setCountdownTimeMS(k),this._tamed.active=!1}initUntamed(){this._lockIconObject.active=this._canAccess,this._untamedPetName.GameObject.active=!0,this._untamedPetName.text=this._componentData.petItem.data.name,this._greyscaleFilter.applyFilter(),this._petNameHolder.active=!0,this._tamingMeter.GameObject.parent.active=!0,this._timer.GameObject.active=!0;const k=this._componentData.deadline.valueOf()-this._timeManager.getServerTimeMs();this._timer.setCountdownTimeMS(k),this._tamed.active=!1}initTamed(){this._lockIconObject.active=!1,this._tamedPetDataParent.active=!0,this._petSpineAnimator.playAnimation("idle",!0);const k=this._loggedInPlayer.player.kennel.getPetByID(this._componentData.petId);this._levelNumberText.text=`${k.level}`,this._tamedPetName.text=this._componentData.petItem.data.name,this._addToTeamButton.GameObject.active=!0,this._memberLockObject.active=!1;const B=Nf.e.starsToLevel(k.level,Vn.V.Pet),U=(null!==k.stars?k.stars:B)-B,F=Nf.e.starsToLevel(k.level+1,Vn.V.Pet)-B;this._starsProgressBar.setValue(U/F),this._tamingMeter.GameObject.parent.active=!1,this._timer.GameObject.active=!1,this._tamed.active=!0,this.gameObject.onActiveInHierarchyChanged.add(this.setTamedLockState,this),this.setTamedLockState()}setTamedLockState(){this._loggedInPlayer.player.kennel.petTeam.every((k=>(null==k?void 0:k.getID())!==this._componentData.petId))?this._addToTeamButton.unlockState():this._addToTeamButton.lockState(Ku.K.Disabled)}destroy(){this.gameObject.onActiveInHierarchyChanged.remove(this.setTamedLockState,this),this.onLoaded.dispose(),this.onAddToTeamClicked.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],xf.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("a03-308f"),(0,G.Sn)("design:type",Ks.V)],xf.prototype,"_timeManager",void 0),(0,G.Cg)([(0,j.MnK)(mf.N),(0,G.Sn)("design:type",mf.N)],xf.prototype,"_petSpineLoader",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],xf.prototype,"_unknownPetName",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],xf.prototype,"_lockIconObject",void 0),(0,G.Cg)([(0,j.MnK)(pf),(0,G.Sn)("design:type",pf)],xf.prototype,"_shadowFilter",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],xf.prototype,"_untamedPetName",void 0),(0,G.Cg)([(0,j.MnK)(rd),(0,G.Sn)("design:type",rd)],xf.prototype,"_greyscaleFilter",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],xf.prototype,"_tamedPetDataParent",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],xf.prototype,"_petSpineAnimator",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],xf.prototype,"_levelNumberText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],xf.prototype,"_tamedPetName",void 0),(0,G.Cg)([(0,j.MnK)(hf.a),(0,G.Sn)("design:type",hf.a)],xf.prototype,"_starsProgressBar",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],xf.prototype,"_addToTeamButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],xf.prototype,"_memberLockObject",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],xf.prototype,"_membershipBenefitsButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],xf.prototype,"_newEpicTasksButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],xf.prototype,"_petNameHolder",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],xf.prototype,"_epicOfTheMonthText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],xf.prototype,"_leavingSoonText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],xf.prototype,"_leavingSoonAnimation",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],xf.prototype,"_timer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],xf.prototype,"_tamed",void 0),(0,G.Cg)([(0,j.MnK)(Cf),(0,G.Sn)("design:type",Cf)],xf.prototype,"_tamingMeter",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],xf.prototype,"_unlockSpineAnimator",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],xf.prototype,"onLoaded",void 0),xf=(0,G.Cg)([(0,j.EVk)("PetTamingView",W.Y.ultimates)],xf);var Lf=U(9421);let kf=class extends ih.k{sendButtonEvent(){this._segment.featureCommon.sendButtonEvent(this.getPropertiesObject())}};kf=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsButton",W.Y.analytics)],kf);var Bf=U(13367);let Uf=class extends j.uAl{get currentStatus(){return this._currentStatus}init(k,B=!1){switch(this.reset(),this._currentStatus=k,k){case Lf.b.TrackLocked:break;case Lf.b.TrackUnlocked:this._acceptButton.GameObject.active=!0;break;case Lf.b.TrackInProgress:this._abandonButton.GameObject.active=!0;break;case Lf.b.Finished:this._finishedIcon.active=!0;break;default:j.VyI.log(`[PetTaskStatus] unknown pet progress state ${k}`,j.$bb.Warning)}B&&(this._acceptButton.lockState(Ku.K.Disabled),this._abandonButton.lockState(Ku.K.Disabled))}reset(){this._acceptButton.unlockState(),this._abandonButton.unlockState(),this._acceptButton.GameObject.active=!1,this._abandonButton.GameObject.active=!1,this._finishedIcon.active=!1,this._notFinishedIcon.active=!0}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uf.prototype,"_notFinishedIcon",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Uf.prototype,"_acceptButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Uf.prototype,"_abandonButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uf.prototype,"_finishedIcon",void 0),Uf=(0,G.Cg)([(0,j.EVk)("PetTaskStatus",W.Y.ultimates)],Uf);let Ff=class extends j.uAl{constructor(){super(...arguments),this._interactableIcons=[],this._loadingSpinners=[]}setTooltipIcons(k){this._interactableIcons.length===this._loadingSpinners.length?this._interactableIcons.forEach(((B,U)=>{B.OnLoaded.addOnce((()=>{this._loadingSpinners[U].active=!1})),B.setAsset(Ve._.Ui_raster_epicsv2_json,`icon-large-${k}-interactable-0${U+1}`).catch((k=>j.VyI.log(`[UltimatesTaskTooltip] There was an error setting the icon for the tooltip, ${k.message}`,j.$bb.Error)))})):j.VyI.log("[UltimatesTaskTooltip] Mismatch number of icons to loading spinners",j.$bb.Error)}destroy(){this._interactableIcons.forEach((k=>{k.OnLoaded.dispose()})),super.destroy()}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Array)],Ff.prototype,"_interactableIcons",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Ff.prototype,"_loadingSpinners",void 0),Ff=(0,G.Cg)([(0,j.EVk)("UltimatesTaskTooltip",W.Y.ultimatesUi)],Ff);let Gf=class extends j.uAl{constructor(){super(...arguments),this.onLoaded=new j.HN0,this.onChangeUltimatesSession=new j.HN0,this._onQuestActive=new j.HN0,this._onQuestInactive=new j.HN0}init(k,B,U=!0){this._memberLockedTooltip.active=!1,this._ultimatesTaskTooltip.active=!1,this._memberLocked=B,this._taskItemIcon.onIconLoaded.addOnce(this.onLoaded.dispatch,this.onLoaded),this._taskItemIcon.setItem(k.iconItemType,k.iconItemID,!0),this._taskDescription.text=`${k.descriptionVerb} ${k.targetAmount} ${k.descriptionSubject}`,this._taskProgressBar.setValue(k.currentAmount/k.targetAmount);const F=k.currentAmount>=k.targetAmount?tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("PROGRESS_BAR_COMPLETE"):`${k.currentAmount} / ${k.targetAmount}`;this._taskProgressBar.setBarText(F),this._trackNPCTaskId=k.trackingTaskId,this._tameUltimateTaskId=k.tamingTaskId,this._npcTaskStatus.init(k.npcStatus,B||!U),this._epicTaskStatus.init(k.epicStatus,B||!U),this._collectButton.GameObject.active=k.npcStatus===Lf.b.TrackLocked,B||!U?this._collectButton.lockState(Ku.K.Disabled):this._collectButton.unlockState(),this._collectionZoneID=k.collectingZoneID,this._goCollectSegmentConfig.destinationName=k.collectingZone,this._goCollectSegmentConfig.elementId=k.collectingTaskId.toString(),this._tameSegmentConfig.destinationName=k.tamingZone,this._tameSegmentConfig.elementId=k.tamingTaskId.toString();const G=Bf.m.getSeededLocation().split("-")[0];this._trackSegmentConfig.destinationName=tt.q.instance.prodigy.world.getZone(G).name,this._trackSegmentConfig.elementId=k.trackingTaskId.toString(),this._tooltipSegmentConfig.buttonName=k.descriptionSubject,this._tooltipSegmentConfig.elementId=k.collectingTaskId.toString(),this._isActive=U&&k.npcStatus!==Lf.b.Finished,(this._isActive?this._onQuestActive:this._onQuestInactive).dispatch()}setNPCStatus(k){this._collectButton.GameObject.active||this._npcTaskStatus.init(k)}get npcStatus(){return this._npcTaskStatus.currentStatus}setEpicStatus(k){this._collectButton.GameObject.active||this._epicTaskStatus.init(k)}get epicStatus(){return this._epicTaskStatus.currentStatus}startTracking(){this.onChangeUltimatesSession.dispatch(nl.n.TrackingNPC,this._trackNPCTaskId)}startTaming(){this.onChangeUltimatesSession.dispatch(nl.n.TamingUltimate,this._tameUltimateTaskId)}abandonSession(k){this.onChangeUltimatesSession.dispatch(nl.n.None,0),k?this._epicTaskStatus.init(Lf.b.TrackUnlocked):this._npcTaskStatus.init(Lf.b.TrackUnlocked)}showTooltip(){this._memberLocked&&!this._memberLockedTooltip.active&&this._isActive?this._memberLockedTooltip.active=!0:this.npcStatus{this._taskCards[B].onLoaded.addOnce(this.syncLoad,this),this._taskCards[B].init(k,F,G)}))}setTradeStarted(k){this._taskCards.forEach(((B,U)=>{U===k?B.setNPCStatus(Lf.b.TrackInProgress):B.npcStatus===Lf.b.TrackInProgress&&B.setNPCStatus(Lf.b.TrackUnlocked)})),this.setTamingAbandoned()}setTradeAbandoned(){this._taskCards.forEach((k=>{k.npcStatus===Lf.b.TrackInProgress&&k.setNPCStatus(Lf.b.TrackUnlocked)}))}setTamingStarted(k){this._taskCards.forEach(((B,U)=>{U===k?B.setEpicStatus(Lf.b.TrackInProgress):B.epicStatus===Lf.b.TrackInProgress&&B.setEpicStatus(Lf.b.TrackUnlocked)})),this.setTradeAbandoned()}setTamingAbandoned(){this._taskCards.forEach((k=>{k.epicStatus===Lf.b.TrackInProgress&&k.setEpicStatus(Lf.b.TrackUnlocked)}))}initPetIcon(k,B){const U=Yt.t.getItem("pet",k);switch(this._petIcon.onIconLoaded.addOnce(this.syncLoad,this),this._petIcon.setItem("pet",k,!0),this._petShadowFilter.removeFilter(),this._petGreyscaleFilter.removeFilter(),B){case Af.e.Start:case Af.e.QuestAccepted:this._petName.setLocalizationKey(jf.WHO_AM_I_KEY),this._petShadowFilter.applyFilter();break;case Af.e.Found:this._petName.setLocalizationKey(""),this._petName.GameObject.findComponent(j.EYj).text=U.data.name,this._petGreyscaleFilter.applyFilter();break;case Af.e.QuestCompleted:this._petName.setLocalizationKey(""),this._petName.GameObject.findComponent(j.EYj).text=U.data.name;break;default:j.VyI.log("[PetTasksTab] Unknown pet progress state provided",j.$bb.Warning)}}syncLoad(){--this._partsToBeLoaded<=0&&this.onLoaded.dispatch()}destroy(){this.onLoaded.dispose(),super.destroy()}};var Hf;$f.WHO_AM_I_KEY="ULTIMATES_WHO_AM_I",(0,G.Cg)([(0,j.MnK)(od.i),(0,G.Sn)("design:type",od.i)],$f.prototype,"_petIcon",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],$f.prototype,"_petName",void 0),(0,G.Cg)([(0,j.MnK)(rd),(0,G.Sn)("design:type",rd)],$f.prototype,"_petGreyscaleFilter",void 0),(0,G.Cg)([(0,j.MnK)(pf),(0,G.Sn)("design:type",pf)],$f.prototype,"_petShadowFilter",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Gf),(0,G.Sn)("design:type",Array)],$f.prototype,"_taskCards",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$f.prototype,"_loadingOverlay",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$f.prototype,"onLoaded",void 0),$f=jf=(0,G.Cg)([(0,j.EVk)("PetTasksTab",W.Y.ultimates)],$f);let Vf=Hf=class extends j.uAl{constructor(){super(...arguments),this.onLoaded=new j.HN0,this.onAddToTeamClicked=new j.HN0,this._partsToBeLoaded=-1,this._questId=""}create(){super.create(),this._statsTabToggle.GameObject.active=!1}init(k,B,U,F,G=!1){this._questId=k.questId,this._partsToBeLoaded=Hf.PARTS_TO_LOAD,this._tasksTabToggle.GameObject.parent.findComponent(qs.O).setSelectedIndex(0),this._tasksTabToggle.setSelected(!0),this._tasksTabToggle.onSelected.dispatch(),this._petTamingView.onLoaded.addOnce(this.syncLoad,this),this._petTamingView.init(k,U,F,G),this._petTamingView.onAddToTeamClicked.removeAll(),this._petTamingView.onAddToTeamClicked.add(this.addToTeamClicked.bind(this,k.petId)),this._petTasksTab.onLoaded.addOnce(this.syncLoad,this),this._petTasksTab.init(k.petId,k.questState,B,U,F);B.filter((k=>k.npcStatus===Lf.b.Finished)).length>1?(this._petAboutInfoCard.updateDisplayInfo(k.petId),this._aboutTabToggle.unlockState(),this._aboutTabToggle.inputEnabled=!0):(this._aboutTabToggle.lockState(Ku.K.Disabled),this._aboutTabToggle.inputEnabled=!1);B.every((k=>k.npcStatus===Lf.b.Finished))?(this._petStatsInfoCard.updateDisplayInfo(k.petId),this._statsTabToggle.unlockState(),this._statsTabToggle.inputEnabled=!0):(this._statsTabToggle.lockState(Ku.K.Disabled),this._statsTabToggle.inputEnabled=!1)}setTradeStarted(k){this._petTasksTab.setTradeStarted(k)}setTradeAbandoned(){this._petTasksTab.setTradeAbandoned()}setTamingStarted(k){this._petTasksTab.setTamingStarted(k)}setTamingAbandoned(){this._petTasksTab.setTamingAbandoned()}addToTeamClicked(k){const B=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.onAddToTeamClicked.dispatch(B.kennel.getPetByID(k))}syncLoad(){--this._partsToBeLoaded<=0&&this.onLoaded.dispatch()}changePlayerState(k,B){this._loggedInPlayer.player.setUltimateSessionStatus(k,this._questId,B),k!==nl.n.None&&(tt.q.instance.prodigy.open.map(),this.GameObject.destroy())}destroy(){this.onLoaded.dispose(),this.onAddToTeamClicked.dispose(),super.destroy()}};var Wf;Vf.PARTS_TO_LOAD=2,(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Vf.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],Vf.prototype,"_aboutTabToggle",void 0),(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],Vf.prototype,"_statsTabToggle",void 0),(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],Vf.prototype,"_tasksTabToggle",void 0),(0,G.Cg)([(0,j.MnK)(xf),(0,G.Sn)("design:type",xf)],Vf.prototype,"_petTamingView",void 0),(0,G.Cg)([(0,j.MnK)($f),(0,G.Sn)("design:type",$f)],Vf.prototype,"_petTasksTab",void 0),(0,G.Cg)([(0,j.MnK)(Rf),(0,G.Sn)("design:type",Rf)],Vf.prototype,"_petAboutInfoCard",void 0),(0,G.Cg)([(0,j.MnK)(Mf),(0,G.Sn)("design:type",Mf)],Vf.prototype,"_petStatsInfoCard",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Vf.prototype,"onLoaded",void 0),Vf=Hf=(0,G.Cg)([(0,j.EVk)("PetProgressInfo",W.Y.ultimatesUi)],Vf),function(k){k[k.COLLECT=0]="COLLECT",k[k.TRADE=1]="TRADE",k[k.TAME=2]="TAME",k[k.COMPLETE=3]="COMPLETE"}(Wf||(Wf={}));let qf=class extends j.uAl{constructor(){super(...arguments),this.onLoaded=new j.HN0,this.loadingPromise=new j.bnh}get taskStep(){return this._taskStep}get taskIcon(){return this._taskIcon}init(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){this._taskIcon.isLoaded||(this.onLoaded.addOnce(this.loadingPromise.resolve),yield this.loadingPromise)}))}setButtonState(k){this._startButton&&this._stopButton&&(this._startButton.active=kLf.b.TrackUnlocked)}destroy(){var k;this.onLoaded.dispose(),null===(k=this._taskIcon)||void 0===k||k.destroy(),super.destroy()}};(0,G.Cg)([(0,j.gfw)(Wf),(0,G.Sn)("design:type",Number)],qf.prototype,"_taskStep",void 0),(0,G.Cg)([(0,j.MnK)(od.i),(0,G.Sn)("design:type",od.i)],qf.prototype,"_taskIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],qf.prototype,"_taskDescription",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qf.prototype,"_startButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qf.prototype,"_stopButton",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],qf.prototype,"onLoaded",void 0),qf=(0,G.Cg)([(0,j.EVk)("TaskStepBase (abstract)",W.Y.ultimatesUi)],qf);let Kf=class extends j.uAl{constructor(){super(...arguments),this._checkObjects=[]}configure(k){if(this._checkObjects.length>Object.keys(Wf).length)j.VyI.log("[TaskProgressMeterComponent] There are too many objects listed compared to the amount of steps in ETaskStep.",j.$bb.Error);else for(let B=0;B{k.taskStep===U?(k.GameObject.active=!0,k.taskIcon.GameObject.active=U!==Wf.TRADE,F=k):k.GameObject.active=!1})),F?(yield F.init(k,B),F.GameObject.active=F.taskStep===U,this.setTradeProgressState(B.npcStatus),this.setTameProgressState(B.epicStatus)):j.VyI.log("[PetTamingTaskCardComponentV2] Error initializing the TaskStepComponent: current task step is not within the list of task containers",j.$bb.Error),this._taskProgressMeter.configure(U)}))}getCurrentTaskStep(k){let B;B=k.currentAmountk.taskStep===Wf.TRADE));null==B||B.setButtonState(k)}setTameProgressState(k){this._tamingState=k;const B=this._taskContainers.find((k=>k.taskStep===Wf.TAME));null==B||B.setButtonState(k)}};var Yf;(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(qf),(0,G.Sn)("design:type",Array)],zf.prototype,"_taskContainers",void 0),(0,G.Cg)([(0,j.MnK)(Kf),(0,G.Sn)("design:type",Kf)],zf.prototype,"_taskProgressMeter",void 0),zf=(0,G.Cg)([(0,j.EVk)("PetTamingTaskCardV2",W.Y.ultimates)],zf);let Qf=Yf=class extends j.uAl{constructor(){super(...arguments),this._taskCards=[],this.onLoaded=new j.HN0}init(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){this._loadingContainer.active=!0;const U=Yt.t.getItem("pet",k),F=[];if(B.forEach(((k,B)=>{F.push(this._taskCards[B].getCurrentTaskStep(k))})),F.every((k=>k===Wf.COMPLETE))){if(this.setTaskContainerVisibility(!1),this._allTasksCompleteText.setLocalizationKey(Yf.QUEST_COMPLETE_TEXT),this._allTasksCompleteText.setTextArguments(U.data.name),this._petIcon.onIconLoaded.addOnce(this.onLoaded.dispatch,this.onLoaded),this._petIcon.setItem("pet",k,!0),!this._petIcon.isLoaded){const k=new j.bnh;this.onLoaded.addOnce(k.resolve),yield k}}else this.setTaskContainerVisibility(!0),yield Promise.all(B.map(((B,U)=>(0,G.sH)(this,void 0,void 0,(function*(){yield this._taskCards[U].init(k,B)})))));this._questStatusText.setLocalizationKey(Yf.QUEST_STATUS_TEXT),this._questStatusText.setTextArguments(U.data.name),this.onLoaded.dispatch()}))}setTaskContainerVisibility(k){this._taskCardsContainer.active=k,this._allTasksCompleteContainer.active=!k}setTradeStarted(k){this._taskCards.forEach(((B,U)=>{U===k?B.setTradeProgressState(Lf.b.TrackInProgress):B.tradingState===Lf.b.TrackInProgress&&B.setTradeProgressState(Lf.b.TrackUnlocked)})),this.setTameAbandoned()}setTradeAbandoned(){this._taskCards.forEach((k=>{k.tradingState===Lf.b.TrackInProgress&&k.setTradeProgressState(Lf.b.TrackUnlocked)}))}setTameStarted(k){this._taskCards.forEach(((B,U)=>{U===k?B.setTameProgressState(Lf.b.TrackInProgress):B.tamingState===Lf.b.TrackInProgress&&B.setTameProgressState(Lf.b.TrackUnlocked)})),this.setTradeAbandoned()}setTameAbandoned(){this._taskCards.forEach((k=>{k.tamingState===Lf.b.TrackInProgress&&k.setTameProgressState(Lf.b.TrackUnlocked)}))}destroy(){this.onLoaded.dispose(),super.destroy()}};Qf.QUEST_STATUS_TEXT="ULTIMATES_QUEST_STATUS",Qf.QUEST_COMPLETE_TEXT="ULTIMATES_QUEST_COMPLETE",(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],Qf.prototype,"_questStatusText",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],Qf.prototype,"_allTasksCompleteText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Qf.prototype,"_taskCardsContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Qf.prototype,"_allTasksCompleteContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Qf.prototype,"_loadingContainer",void 0),(0,G.Cg)([(0,j.MnK)(od.i),(0,G.Sn)("design:type",od.i)],Qf.prototype,"_petIcon",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(zf),(0,G.Sn)("design:type",Array)],Qf.prototype,"_taskCards",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Qf.prototype,"onLoaded",void 0),Qf=Yf=(0,G.Cg)([(0,j.EVk)("PetTasksTabV2",W.Y.ultimates)],Qf);let Xf=class extends j.uAl{constructor(){super(...arguments),this.onSelectionChange=new j.HN0,this.onLoaded=new j.HN0}get petTasksTab(){return this._petTasksTab}create(){super.create(),this._statsTabToggle.GameObject.active=!1}init(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){this._toggleGroup.setSelectedIndex(0),this._tasksTabToggle.unlockState(),this._tasksTabToggle.setSelected(!0),this._tasksTabToggle.onSelected.dispatch(),this.onSelectionChange.dispatch(),yield this._petTasksTab.init(k,B);B.every((k=>k.npcStatus===Lf.b.Finished))?(this._petStatsInfoCard.updateDisplayInfo(k),this._statsTabToggle.unlockState(),this._statsTabToggle.inputEnabled=!0):(this._statsTabToggle.lockState(Ku.K.Disabled),this._statsTabToggle.inputEnabled=!1),this.onLoaded.dispatch()}))}setChurnedMemberState(k){this._churnedMemberContainer.active=k,this._petTasksTab.GameObject.active=!k,this.setAllTabsDisabled()}showPetTasksUnavailableState(k){const B=Yt.t.getItem("pet",k);if(B){this._petTaskUnavailableContainer.findComponentInChildren(vs.R).setTextArguments(B.data.name)}this._petTaskUnavailableContainer.active=!0,this._petTasksTab.GameObject.active=!1,this._toggleGroup.setItemSelected(this._tasksTabToggle,!1),this.setAllTabsDisabled(),this.onSelectionChange.dispatch()}hideTasksUnavailableState(){this._petTaskUnavailableContainer.active=!1,this._petTasksTab.GameObject.active=!0}setAllTabsDisabled(){this._toggleGroup.setItemSelected(this._statsTabToggle,!1),this._toggleGroup.setItemSelected(this._aboutTabToggle,!1),this._toggleGroup.setItemSelected(this._tasksTabToggle,!1),this._statsTabToggle.lockState(Ku.K.Disabled),this._aboutTabToggle.lockState(Ku.K.Disabled),this._tasksTabToggle.lockState(Ku.K.Disabled)}destroy(){this.onSelectionChange.dispose(),this.onLoaded.dispose(),super.destroy()}};var Zf;(0,G.Cg)([(0,j.MnK)(qs.O),(0,G.Sn)("design:type",qs.O)],Xf.prototype,"_toggleGroup",void 0),(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],Xf.prototype,"_statsTabToggle",void 0),(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],Xf.prototype,"_aboutTabToggle",void 0),(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],Xf.prototype,"_tasksTabToggle",void 0),(0,G.Cg)([(0,j.MnK)(Mf),(0,G.Sn)("design:type",Mf)],Xf.prototype,"_petStatsInfoCard",void 0),(0,G.Cg)([(0,j.MnK)(Rf),(0,G.Sn)("design:type",Rf)],Xf.prototype,"_petAboutInfoCard",void 0),(0,G.Cg)([(0,j.MnK)(Qf),(0,G.Sn)("design:type",Qf)],Xf.prototype,"_petTasksTab",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Xf.prototype,"_churnedMemberContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Xf.prototype,"_petTaskUnavailableContainer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Xf.prototype,"onSelectionChange",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Xf.prototype,"onLoaded",void 0),Xf=(0,G.Cg)([(0,j.EVk)("PetProgressTabController",W.Y.ultimatesUi)],Xf);let Jf=Zf=class extends qf{init(k,B){const U=Object.create(null,{init:{get:()=>super.init}});return(0,G.sH)(this,void 0,void 0,(function*(){this._taskDescription.text=`${B.descriptionVerb} ${B.targetAmount} ${B.descriptionSubject}`,this._taskIcon.onIconLoaded.addOnce(this.onLoaded.dispatch,this.onLoaded),this._taskIcon.setItem(B.iconItemType,B.iconItemID,!0),this._taskProgressBar.setValue(B.currentAmount/B.targetAmount);const F=B.currentAmount>=B.targetAmount?tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(Zf.PROGRESS_BAR_COMPLETE_TEXT):`${B.currentAmount} / ${B.targetAmount}`;this._taskProgressBar.setBarText(F),this._collectionZoneID=B.collectingZoneID,this._goCollectSegmentConfig.destinationName=B.collectingZone,this._goCollectSegmentConfig.elementId=B.collectingTaskId.toString(),this._tooltipSegmentConfig.buttonName=B.descriptionSubject,this._tooltipSegmentConfig.elementId=B.collectingTaskId.toString(),yield U.init.call(this,k,B)}))}showTooltip(){this._ultimatesTaskTooltip.active=!this._ultimatesTaskTooltip.active,this._ultimatesTaskTooltip.findComponent(Ff).setTooltipIcons(this._collectionZoneID),this._tooltipSegmentConfig.GameObject.findComponent(kf).sendButtonEvent()}};var tb;Jf.PROGRESS_BAR_COMPLETE_TEXT="PROGRESS_BAR_COMPLETE",(0,G.Cg)([(0,j.MnK)(ys.z),(0,G.Sn)("design:type",ys.z)],Jf.prototype,"_taskProgressBar",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Jf.prototype,"_ultimatesTaskTooltip",void 0),(0,G.Cg)([(0,j.MnK)(Xs),(0,G.Sn)("design:type",Xs)],Jf.prototype,"_goCollectSegmentConfig",void 0),(0,G.Cg)([(0,j.MnK)(Xs),(0,G.Sn)("design:type",Xs)],Jf.prototype,"_tooltipSegmentConfig",void 0),Jf=Zf=(0,G.Cg)([(0,j.EVk)("TaskStepCollect",W.Y.ultimatesUi)],Jf);let eb=tb=class extends qf{init(k,B){const U=Object.create(null,{init:{get:()=>super.init}});return(0,G.sH)(this,void 0,void 0,(function*(){this._taskDescription.text=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(tb.TASK_COMPLETE_TEXT),this._taskIcon.onIconLoaded.addOnce(this.onLoaded.dispatch,this.onLoaded),this._taskIcon.setItem("pet",k,!0),yield U.init.call(this,k,B)}))}};var ib;eb.TASK_COMPLETE_TEXT="TASK_STEP_COMPLETE",eb=tb=(0,G.Cg)([(0,j.EVk)("TaskStepComplete",W.Y.ultimatesUi)],eb);let sb=ib=class extends qf{init(k,B){const U=Object.create(null,{init:{get:()=>super.init}});return(0,G.sH)(this,void 0,void 0,(function*(){this._taskDescription.text=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(ib.TAME_TEXT),this._taskIcon.onIconLoaded.addOnce(this.onLoaded.dispatch,this.onLoaded),this._taskIcon.setItem("pet",k,!0),this._tameSegmentConfig.destinationName=B.tamingZone,this._tameSegmentConfig.elementId=B.tamingTaskId.toString(),yield U.init.call(this,k,B)}))}};var nb;sb.TAME_TEXT="TASK_STEP_TAME",(0,G.Cg)([(0,j.MnK)(Xs),(0,G.Sn)("design:type",Xs)],sb.prototype,"_tameSegmentConfig",void 0),sb=ib=(0,G.Cg)([(0,j.EVk)("TaskStepTame",W.Y.ultimatesUi)],sb);let ab=nb=class extends qf{init(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){this._taskDescription.text=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(nb.TRADE_TEXT);const k=Bf.m.getSeededLocation().split("-")[0];this._trackSegmentConfig.destinationName=tt.q.instance.prodigy.world.getZone(k).name,this._trackSegmentConfig.elementId=B.trackingTaskId.toString()}))}};ab.TRADE_TEXT="TASK_STEP_TRADE",(0,G.Cg)([(0,j.MnK)(Xs),(0,G.Sn)("design:type",Xs)],ab.prototype,"_trackSegmentConfig",void 0),ab=nb=(0,G.Cg)([(0,j.EVk)("TaskStepTrade",W.Y.ultimatesUi)],ab);let rb=class extends j.uAl{constructor(){super(...arguments),this.onLoaded=new j.HN0}init(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G;const j=Yt.t.getItem("pet",k);this._headerLocalizationKey&&(null===(B=this._headerTextComponent)||void 0===B||B.setLocalizationKey(this._headerLocalizationKey)),null===(U=this._headerTextComponent)||void 0===U||U.setTextArguments(j.data.name),this._descriptionLocalizationKey&&(null===(F=this._descriptionTextComponent)||void 0===F||F.setLocalizationKey(this._descriptionLocalizationKey)),null===(G=this._descriptionTextComponent)||void 0===G||G.setTextArguments(j.data.name),this._petIcon.setItem("pet",k,!0),this._petIcon.isLoaded||(yield this._petIcon.onIconLoaded.asPromise()),this._loadingContainer.active=!1,this.onLoaded.dispatch()}))}destroy(){this.onLoaded.dispose(),super.destroy()}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],rb.prototype,"_headerLocalizationKey",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],rb.prototype,"_headerTextComponent",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],rb.prototype,"_descriptionLocalizationKey",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],rb.prototype,"_descriptionTextComponent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],rb.prototype,"_loadingContainer",void 0),(0,G.Cg)([(0,j.MnK)(od.i),(0,G.Sn)("design:type",od.i)],rb.prototype,"_petIcon",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rb.prototype,"onLoaded",void 0),rb=(0,G.Cg)([(0,j.EVk)("UltimatesInfoDisplay",W.Y.ultimates)],rb);let ob=class extends j.uAl{init(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){this._ownedPetInfoDisplay.GameObject.active=!1,this._unavailablePetInfoDisplay.GameObject.active=!1,this._availablePetInfoDisplay.GameObject.active=!1,k?(yield this._ownedPetInfoDisplay.init(U),this._ownedPetInfoDisplay.GameObject.active=!0):B?(yield this._availablePetInfoDisplay.init(U),this._availablePetInfoDisplay.GameObject.active=!0):(yield this._unavailablePetInfoDisplay.init(U),this._unavailablePetInfoDisplay.GameObject.active=!0)}))}};var hb;(0,G.Cg)([(0,j.MnK)(rb),(0,G.Sn)("design:type",rb)],ob.prototype,"_ownedPetInfoDisplay",void 0),(0,G.Cg)([(0,j.MnK)(rb),(0,G.Sn)("design:type",rb)],ob.prototype,"_availablePetInfoDisplay",void 0),(0,G.Cg)([(0,j.MnK)(rb),(0,G.Sn)("design:type",rb)],ob.prototype,"_unavailablePetInfoDisplay",void 0),ob=(0,G.Cg)([(0,j.EVk)("UltimatesBannerSpotlight",W.Y.ultimates)],ob);let cb=hb=class extends j.uAl{constructor(){super(...arguments),this._onSelected=new j.HN0,this._onLoaded=new j.HN0,this._selectedMoveAmount=48,this._selectedMoveDirection=new j.I9Y(0,1),this._selectedMoveDuration=1,this._selected=!1,this._activeButton=null}get onSelected(){return this._onSelected}get onLoaded(){return this._onLoaded}get removeFromTeamButton(){return this._removeFromTeamButton}get addToTeamButton(){return this._addToTeamButton}get canCheckInfo(){return this._questData.isActive()||this._questData.getProgressData().questState===Af.e.QuestCompleted}get questData(){return this._questData}init(k,B=!1,U){var F;this._initialY=this._contentView.transform.localPosition.y,this._initialX=this._contentView.transform.localPosition.x,this._questData=k,this._canEarnInTreasureTrack=B,this._battlePassEndDate=U,null===(F=this.gameObject.findComponent(j.bE_))||void 0===F||F.Container.bind("UltimatesQuestData").toConstantValue(k),this.setDefaultUIState();const G=tt.q.instance.prodigy.gameContainer.get("db5-fb6e");this._canAccess=G.meetsRequirementsDeprecated(15),this._ultimateImage.setFrameName(k.petID.toString()),this.refreshCardState()}refreshCardState(){this.setDefaultUIState();const k=this._questData.getProgressData(),B=this._canEarnInTreasureTrack&&j.Aq$.isDefined(this._battlePassEndDate)||!this._canEarnInTreasureTrack&&eo.P8.isUltimateLeavingSoon(k.deadline,Tf.T.Week),U=this._playerData.player.kennel.hasPet(this._questData.petID);this._canEarnInTreasureTrack||this._questData.isActive()?U?this.determinePetAddState():B&&this.leavingSoonState(j.Aq$.isDefined(this._battlePassEndDate)?new Date(this._battlePassEndDate):k.deadline):this.unavailableState(),this._selected&&this.playSelectedAnimation()}playSelectedAnimation(){this._unavailableOverlay.active||this._innerTint.enableTint(),this._selectedBackground.active=!0,this._bloomAnimator.GameObject.active=!0,this._bloomAnimator.OnAnimationComplete.addOnce((()=>{this._bloomAnimator.playAnimation("bloom",!0)}),this),this._bloomAnimator.playAnimation("click",!1,!0)}selectionMove(){if(this._selected)return;this._selected=!0,this._cardInputOverlay.GameObject.active=!1,this._onSelected.dispatch(this._questData),this._activeButton&&(this._activeButton.GameObject.active=!0),this.playSelectedAnimation(),tt.q.instance.game.tweens.remove(this._moveTween);const k=this.getLocalPosObject();this._moveTween=tt.q.instance.game.add.tween(k,this),this._moveTween.to({x:this._initialX+this._selectedMoveAmount*this._selectedMoveDirection.x,y:this._initialY+this._selectedMoveAmount*this._selectedMoveDirection.y},this._selectedMoveDuration),this._moveTween.start()}deselectionMove(){var k;if(!this._selected)return;this._cardInputOverlay.GameObject.active=!0,this._selected=!1,this._innerTint.disableTint(this._graphicsContainer.active),this._selectedBackground.active=!1,this._bloomAnimator.GameObject.active=!1,this._moveTween&&(null===(k=this._moveTween.onTweenComplete)||void 0===k||k.removeAll(),tt.q.instance.game.tweens.remove(this._moveTween));const B=this.getLocalPosObject();this._moveTween=tt.q.instance.game.add.tween(B,this),this._moveTween.to({x:this._initialX,y:this._initialY},this._selectedMoveDuration).onTweenComplete.addOnce((()=>{this._activeButton&&(this._activeButton.GameObject.active=!1)})),this._moveTween.start()}setVisible(k){this._graphicsContainer.active=k}getLocalPosObject(){const k=new $e.ObservablePoint((()=>{this._contentView.transform.setPosition(k.x,k.y)}),this,this._contentView.transform.localPosition.x,this._contentView.transform.localPosition.y);return k}setDefaultUIState(){this._removeFromTeamButton.GameObject.active=!1,this._addToTeamButton.GameObject.active=!1,this._activeButton&&(this._activeButton.GameObject.active=!1),this._activeButton=null,this._innerTint.disableTint(),this._selectedBackground.active=!1,this._plusIcon.active=!1,this._checkmarkIcon.active=!1,this._lockedIcon.active=!1,this._leavingSoonBanner.active=!1,this._unavailableOverlay.active=!1,this._bloomAnimator.GameObject.active=!1}leavingSoonState(k){this._leavingSoonBanner.active=!0;const B=Math.abs(Date.now()-k.getTime()),U=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(hb.DAYS_LEFT_LOCALIZATION_KEY);this._leavingSoonText.setTemplateString(U),this._leavingSoonText.setCountdownTimeMS(B)}enableAddToTeam(){this._plusIcon.active=!0,this._activeButton=this._addToTeamButton}enableRemoveFromTeam(){this._checkmarkIcon.active=!0,this._activeButton=this._removeFromTeamButton}unavailableState(){const k=this._playerData.player.kennel.hasPet(this._questData.petID);this._lockedIcon.active=!k,this._unavailableOverlay.active=!k,k&&this.determinePetAddState()}determinePetAddState(){eo.P8.isPetOnTeam(this._playerData.player.kennel.getPetByID(this._questData.petID))?this.enableRemoveFromTeam():this.enableAddToTeam()}destroy(){var k;this._onSelected.dispose(),this._onLoaded.dispose(),null===(k=this._moveTween)||void 0===k||k.stop(),tt.q.instance.game.tweens.remove(this._moveTween),super.destroy()}};cb.DAYS_LEFT_LOCALIZATION_KEY="ULTIMATES_V2_DAYS_LEFT",(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],cb.prototype,"_playerData",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cb.prototype,"_onSelected",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cb.prototype,"_onLoaded",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],cb.prototype,"_selectedMoveAmount",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],cb.prototype,"_selectedMoveDirection",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],cb.prototype,"_selectedMoveDuration",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cb.prototype,"_contentView",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],cb.prototype,"_removeFromTeamButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],cb.prototype,"_addToTeamButton",void 0),(0,G.Cg)([(0,j.MnK)(Eh.w),(0,G.Sn)("design:type",Eh.w)],cb.prototype,"_innerTint",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cb.prototype,"_selectedBackground",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cb.prototype,"_plusIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cb.prototype,"_checkmarkIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cb.prototype,"_lockedIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cb.prototype,"_leavingSoonBanner",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],cb.prototype,"_leavingSoonText",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],cb.prototype,"_ultimateImage",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cb.prototype,"_unavailableOverlay",void 0),(0,G.Cg)([(0,j.MnK)(Fe.n),(0,G.Sn)("design:type",Fe.n)],cb.prototype,"_cardInputOverlay",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],cb.prototype,"_bloomAnimator",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cb.prototype,"_graphicsContainer",void 0),cb=hb=(0,G.Cg)([(0,j.EVk)("UltimatesCarouselCard",W.Y.ultimatesUi)],cb);let db=class extends j.uAl{constructor(){super(...arguments),this._tamingLevel=0,this.maxTamingLevel=3,this.OnTransitionComplete=new j.HN0}get tamingLevel(){return this._tamingLevel}create(){super.create(),this.setTamingLevel(this._tamingLevel)}setTamingLevel(k,B){this._tamingLevel=Math.min(Math.max(k,0),this.maxTamingLevel);const U=`idle-${this._tamingLevel}`,F=`transition-${this._tamingLevel}`;B&&this._heartSpine.OnAnimationComplete.addOnce((()=>{this._heartSpine.playAnimation(U,!1),this.OnTransitionComplete.dispatch()})),this._heartSpine.playAnimation(B?F:U,!1)}destroy(){this.OnTransitionComplete.dispose(),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],db.prototype,"_tamingLevel",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],db.prototype,"_heartSpine",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],db.prototype,"maxTamingLevel",void 0),db=(0,G.Cg)([(0,j.EVk)("UltimatesTamingMeter",W.Y.ultimatesUi)],db);U(33359),U(34454),U(52322);var lb=U(12676);let ub=class extends j.uAl{constructor(){super(...arguments),this._onPlinthPresent=new j.HN0,this._onPlinthNotPresent=new j.HN0}create(){super.create(),$e.Ticker.shared.addOnce(this.checkForPlinthPresence,this)}checkForPlinthPresence(){this.GameObject.active?this._onPlinthPresent.dispatch():this._onPlinthNotPresent.dispatch()}sendDiscoveryEvent(){tt.q.instance.prodigy.gameContainer.get("c47-20b6").gameWorld.sendNpcDiscoveredEvent({npc_name:lb.N.UltimatesPlinth,npc_id:"ultimates_plinth",npc_type:Ia.ac.QuestGiver,npc_animation_id:"idle",x_coord:this.GameObject.transform.worldPosition.x,y_coord:this.GameObject.transform.worldPosition.y})}sendClickedEvent(){tt.q.instance.prodigy.gameContainer.get("c47-20b6").gameWorld.sendNpcClickedEvent({npc_name:lb.N.UltimatesPlinth,npc_type:Ia.ac.QuestGiver,npc_id:"ultimates_plinth"})}destroy(){this._onPlinthPresent.dispose(),this._onPlinthNotPresent.dispose(),$e.Ticker.shared.remove(this.checkForPlinthPresence,this),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ub.prototype,"_onPlinthPresent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ub.prototype,"_onPlinthNotPresent",void 0),ub=(0,G.Cg)([(0,j.EVk)("UltimatesPlinth",W.Y.ultimates)],ub);let fb=class extends j.PQK{installBindings(){{const k=tt.q.instance.prodigy.gameContainer;this.Container.bind("200-7dc0").toConstantValue(k.get("200-7dc0")),this.Container.bind("e50-b09b").toConstantValue(k.get("e50-b09b")),this.Container.bind(ar.QuestManager).toConstantValue(k.get("e50-b09b")),this.Container.bind("AnimationData").toConstantValue(new xi.F(U(34500)))}}};fb=(0,G.Cg)([(0,j.Og1)("UltimatesInstaller","Installer")],fb);U(11288),U(94995),U(83195),U(29438),U(16905),U(78703);var bb,pb=U(24521),vb=U(23029);!function(k){k[k.AVAILABLE=0]="AVAILABLE",k[k.UNAVAILABLE=1]="UNAVAILABLE",k[k.COMPLETED=2]="COMPLETED"}(bb||(bb={}));let gb=class extends j.uAl{get taskData(){return this._taskData}init(k){this._taskData=this.isTaskData(k)?k:this.getTaskData(k),this._iconTarget.setAsset(this._taskData.icon).catch((k=>j.VyI.log(`There was an error setting the icon for a Quest Task, ${k.message}`,j.$bb.Error)))}setTaskText(){const k={type:this._taskData.type,ID:this._taskData.id};this._name.text=(0,ms.k)(Qt.J.getLocalizationNameKey(k)),this._flavor.text=(0,ms.k)(Qt.J.getLocalizationFlavorKey(k))}setStatus(k){k===bb.AVAILABLE?(this._greyscale.removeFilter(),this.toggle.unlockState(),this.toggle.inputEnabled=!0):(this._greyscale.applyFilter(),this.toggle.lockState(Ku.K.Disabled),this.toggle.inputEnabled=!1,this._iconComplete.active=k===bb.COMPLETED)}isTaskData(k){return void 0!==k.id}getTaskData(k){const B=Yt.t.getItem(k.taskDefinition.completionRequirements.data.type,k.taskDefinition.completionRequirements.data.id);return{type:B.type,id:B.ID,name:Qt.J.getLocalizationNameKey(B),flavorText:Qt.J.getLocalizationFlavorKey(B),icon:fs.E.getIconForType(B.type,B.ID),status:k.taskProgress.status===pr.t.COMPLETE?bb.COMPLETED:bb.UNAVAILABLE}}};(0,G.Cg)([(0,j.MnK)(st.l),(0,G.Sn)("design:type",st.l)],gb.prototype,"toggle",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],gb.prototype,"_name",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],gb.prototype,"_flavor",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],gb.prototype,"_iconTarget",void 0),(0,G.Cg)([(0,j.MnK)(rd),(0,G.Sn)("design:type",rd)],gb.prototype,"_greyscale",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gb.prototype,"_iconComplete",void 0),gb=(0,G.Cg)([(0,j.EVk)("TaskDisplay",W.Y.ultimatesUi)],gb);let mb=class extends j.uAl{constructor(){super(...arguments),this._taskCards=[],this.taskSelected=new j.HN0}create(){super.create(),this._taskCards.forEach((k=>{const B=k.findComponent(gb);B.toggle.onSelected.add((()=>{this.taskSelected.dispatch(B.taskData.type,B.taskData.id),B.setTaskText()}))}))}setTasks(k,B=[]){this._taskCards.length===k.length?this._taskCards.forEach(((U,F)=>{const G=U.findComponent(gb);G.init(k[F]),B.some((k=>k.taskDefinition.completionRequirements.data.id===G.taskData.id))&&(G.taskData.status=bb.AVAILABLE),G.setStatus(G.taskData.status)})):j.VyI.log(`Attempted to set ${k.length} items for ${this._taskCards.length} cards`,j.$bb.Error)}destroy(){this.taskSelected.dispose(),super.destroy()}};(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],mb.prototype,"_taskCards",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],mb.prototype,"taskSelected",void 0),mb=(0,G.Cg)([(0,j.EVk)("TaskSelector",W.Y.ultimatesUi)],mb);var yb=U(2775);let _b=class extends j.uAl{constructor(){super(...arguments),this._animationStates=["idle-1","idle-2","idle-3"],this._idleDialogues=[1258,1259,1260],this.onCutsceneComplete=new j.HN0,this._poseIndex=0}create(){super.create(),tt.q.instance.prodigy.load.assets(Xu.B.Voice_42_1),this._poseIndex=Math.floor(Math.random()*this._animationStates.length),this._spine.playAnimation(this._animationStates[this._poseIndex],!0)}run(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;const U=this._playerDataProvider.player.ultimateQuestId,F=null===(k=yield this._questManager.getQuestMetaData(U))||void 0===k?void 0:k.petID,$=this._playerDataProvider.player.ultimateSessionStatus===nl.n.TrackingNPC,H=(null!==(B=yield this._questManager.getTasksInProgress())&&void 0!==B?B:[]).filter(this.isTradingTask).filter((k=>$&&k.questID===U)),V=H.length>0?(yield this._questManager.getQuestTasks(U)).filter(this.isTradingTask):[],W=yield this.getRandomLoreDialogue();(class{static play(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){k?B?yield(0,Td.v$)([U,1264]):yield(0,Td.v$)([U,F,1265]):yield(0,Td.v$)([1254,1255,1256,1257])}))}}).play(this._featureRequirements.meetsRequirementsDeprecated(15),H.length>0,this._idleDialogues[this._poseIndex],W).then((()=>{this.onCutsceneComplete.dispatch(),H.length>0&&this.openTradingTaskPopup(V,H,F)})).catch(j.RQr.createHandler("An error occurred while trying to play UltimatesWanderingNPCDialogue"))}))}getRandomLoreDialogue(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=(yield this._ultimatesQuestDataProvider.getCurrentQuestData()).filter((k=>k.isActive())).map((k=>k.petID)),B=vb.R.loadData(pb.r.UltimatesPetLocationConfig_json).ultimatesData.filter((B=>k.includes(B.id))).map((k=>k.loreDialogueIDs));return j.lv2.getRandomItem((0,ct.flatten)(B))}))}destroy(){this.onCutsceneComplete.dispose(),super.destroy()}isTradingTask(k){return k.type===Wr.T.TRADE_WITH_ULLA}openTradingTaskPopup(k,B,U){tt.q.instance.prodigy.open.prefabMenu(Rt.l.UltimatesItemTradePopup,void 0,void 0,void 0,void 0,{[ar.QuestManager]:tt.q.instance.prodigy.gameContainer.get("e50-b09b")}).onPrefabLoaded.addOnce((U=>{U.transform.setPosition(tt.q.instance.game.width/2,tt.q.instance.game.height/2),U.findComponent(mb).setTasks(k,B),U.onDestroy.addOnce((()=>{mi.rD.runDialogueSequence([1265],(()=>{this._playerDataProvider.player.ultimateSessionStatus!==nl.n.None&&(tt.q.instance.game.broadcaster.addAppListener(jn.ig.PlayerLoaded,(()=>{tt.q.instance.prodigy.open.pets(),tt.q.instance.game.broadcaster.removeAppListener(jn.ig.PlayerLoaded,this,void 0),this._playerDataProvider.player.unlockSessionStatus()}),this,void 0,!0),this._playerDataProvider.player.setUltimateSessionStatus(nl.n.Transition,"",0,!0))}))}))}))}};(0,G.Cg)([(0,j.Cdj)("db5-fb6e"),(0,G.Sn)("design:type",Object)],_b.prototype,"_featureRequirements",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],_b.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("e50-b09b"),(0,G.Sn)("design:type",qd.k)],_b.prototype,"_questManager",void 0),(0,G.Cg)([(0,j.Cdj)("200-7dc0"),(0,G.Sn)("design:type",yb.m)],_b.prototype,"_ultimatesQuestDataProvider",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],_b.prototype,"_spine",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],_b.prototype,"onCutsceneComplete",void 0),_b=(0,G.Cg)([(0,j.EVk)("WanderingNPCBranchingDialogue",W.Y.ultimates)],_b);var Eb,wb,Tb,Sb=U(12270),Ab=U(39938);!function(k){k.Core="GoldAnchor",k.Plus="PlusAnchor",k.Ultra="UltraAnchor"}(Eb||(Eb={})),function(k){k.Spread="SpreadAnchors",k.Tight="TightAnchors"}(wb||(wb={})),(0,Ab.n)(wb,"ChestGroupLayout"),function(k){k.Sparkle="SparkleContainer",k.Arrow="ArrowContainer"}(Tb||(Tb={}));let Cb=class extends j.uAl{constructor(){super(...arguments),this._allowanceLayoutMap=new Map,this._chestAnchorMap=new Map,this._layout=wb.Tight,this._allowance=qt.D.Core,this._hasBeenInitialized=!1}get _layoutState(){return this._layout}set _layoutState(k){this.onLayoutStateChanged(k)}setLayoutState(k){this.onLayoutStateChanged(k)}set _allowanceState(k){this.onAllowanceStateChanged(k)}setAllowance(k){this.onAllowanceStateChanged(k)}postCreate(){this._allowanceLayoutMap.set(qt.D.NonMember,this.coreLayoutContainer),this._allowanceLayoutMap.set(qt.D.Core,this.coreLayoutContainer),this._allowanceLayoutMap.set(qt.D.Plus,this.plusLayoutContainer),this._allowanceLayoutMap.set(qt.D.Ultra,this.ultraLayoutContainer),this._chestAnchorMap.set(Eb.Core,this.goldChestObject),this._chestAnchorMap.set(Eb.Plus,this.plusChestObject),this._chestAnchorMap.set(Eb.Ultra,this.ultraChestObject),this._hasBeenInitialized=!0,this.updateChestLayout(),this.updateHighlightElements(),super.postCreate()}onLayoutStateChanged(k){this._layout=k,this.updateChestLayout(),this.updateHighlightElements()}onAllowanceStateChanged(k){this._allowance=k,this.updateChestLayout(),this.updateHighlightElements()}updateChestLayout(){this._allowanceLayoutMap.forEach(((k,B)=>{B===this._allowance&&(null==k||k.children.forEach((k=>{var B;k.name===this._layout&&(this._allowance===qt.D.NonMember&&(null===(B=k.findChildByName(Eb.Core))||void 0===B||B.addChild(this.goldChestObject)),Object.values(Eb).forEach((B=>{var U;null===(U=k.findChildByName(B))||void 0===U||U.addChild(this._chestAnchorMap.get(B))})))})))}))}updateHighlightElements(){var k,B;if(!this._hasBeenInitialized)return;const U=null!==(B=null===(k=this._rootHighlightContainer.findChildByName(this._allowance))||void 0===k?void 0:k.findChildByName(this._layout))&&void 0!==B?B:null;if(!U)return;const F=U.findChildByName(Tb.Sparkle);F&&F.addChild(this._highlightSparkle);const G=U.findChildByName(Tb.Arrow);G&&G.addChild(this._highlightArrow)}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cb.prototype,"coreLayoutContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cb.prototype,"plusLayoutContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cb.prototype,"ultraLayoutContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cb.prototype,"goldChestObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cb.prototype,"plusChestObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cb.prototype,"ultraChestObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cb.prototype,"_highlightSparkle",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cb.prototype,"_highlightArrow",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cb.prototype,"_rootHighlightContainer",void 0),(0,G.Cg)([(0,j.gfw)(wb),(0,G.Sn)("design:type",String),(0,G.Sn)("design:paramtypes",[String])],Cb.prototype,"_layoutState",null),(0,G.Cg)([(0,j.gfw)(qt.D),(0,G.Sn)("design:type",String),(0,G.Sn)("design:paramtypes",[String])],Cb.prototype,"_allowanceState",null),Cb=(0,G.Cg)([(0,j.EVk)("WizardBankChestGroupLayoutController")],Cb);var Ob=U(8838);let Ib=class extends j.uAl{constructor(){super(...arguments),this._primaryColor="#F6E38C",this._secondaryColor="#AD3E0F",this._value=0}get primaryColor(){return this._primaryColor}get secondaryColor(){return this._secondaryColor}get value(){return this._value}set value(k){this._value=k,this.setValue(k)}postCreate(){this.setValue(this._value),this.setColors(this.primaryColor,this.secondaryColor),super.postCreate()}setValue(k){this._valueTextComponent.text=`${k}`,this._borderTextComponent.text=`${k}`}setColors(k,B){if(!xt.$.isValidHex(k))return;const U=xt.$.isValidHex(B)?B:k;this._valueTextComponent.fill=`${k}`,this._valueTextComponent.stroke=`${U}`}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ib.prototype,"_valueTextComponent",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ib.prototype,"_borderTextComponent",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",Object)],Ib.prototype,"_primaryColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",Object)],Ib.prototype,"_secondaryColor",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ib.prototype,"_value",void 0),Ib=(0,G.Cg)([(0,j.EVk)("MagicoinValueText")],Ib);var Db=U(40743);const Rb={[qt.D.NonMember]:["#F6E38C","#AD3E0F"],[qt.D.Core]:["#F6E38C","#AD3E0F"],[qt.D.Plus]:["#AEEAF2","#5C6AAA"],[qt.D.Ultra]:["#FFB1D7","#9D3E67"]},Pb=800;let Mb=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.onPanelButtonPressed=this.createTidySignal(),this._canCollect=!1}get canCollect(){return this._canCollect}create(){super.create(),this.gameObject.parent.active=!1,this.setAlpha(0)}update(){super.update(),this._tweenFromPosition&&this._tweenFromPosition.x!==this.gameObject.parent.transform.localPosition.x&&(this.tweenXPosition(this._tweenFromPosition.x-this.gameObject.parent.transform.localPosition.x,0,Pb,0),this._tweenFromPosition=void 0)}onAllowanceTierStateChange(k){oh.A.isDefined(this._tierTextComponent)&&(this._tierTextComponent.text=xt.$.capitalizeFirstLetter(k),this._tierTextComponent.fill=`${Rb[k][0]}`)}destroy(){tt.q.instance.prodigy.game.tweens.removeAllFromOwner(this),super.destroy()}setup(k){var B,U,F,G,j;const{allowanceTier:$,currencyValue:H,forceChestState:V,layout:W}=k;null===(B=this.allowanceStateController)||void 0===B||B.setState($);const q=null!=W?W:wb.Tight;null===(U=this.layoutController)||void 0===U||U.setLayoutState(q);const{value:K}=null!=H?H:{value:0};null===(F=this.valueTextComponent)||void 0===F||F.setValue(K),null===(G=this.valueTextComponent)||void 0===G||G.setColors(...Rb[$]);const z=K>0;this._canCollect=z,oh.A.isDefined(this.collectButtonObject)&&(this.collectButtonObject.active=z),oh.A.isDefined(this.collectedSpineObject)&&(this.collectedSpineObject.active=!z);const Y=null!=V?V:z?Ob.T.Open:Ob.T.Disabled,Q=this.checkIfPlayerNeedsMembership($);oh.A.isDefined(this._askParentTextObject)&&(this._askParentTextObject.active=!!z&&Q),oh.A.isDefined(this._promptTextComponent)&&Q&&(this._promptTextComponent.text=(0,ms.k)("WIZARD_BANK_BECOME")),null===(j=this.chestStateController)||void 0===j||j.setState(Y)}changeToClaimedState(){this.allowanceStateController&&this.setup({allowanceTier:this.allowanceStateController.currentState,forceChestState:Ob.T.Disabled}),this._tweenFromPosition=dt().clone(this.gameObject.parent.transform.localPosition)}checkIfPlayerNeedsMembership(k){var B;switch(null!==(B=Sb.E.get(this._activePlayer.getMemberTier()))&&void 0!==B?B:qt.D.NonMember){case qt.D.Ultra:return!1;case qt.D.Plus:return k===qt.D.Ultra;case qt.D.Core:return k===qt.D.Ultra||k===qt.D.Plus;case qt.D.NonMember:default:return!0}}handleButtonPress(){this.onPanelButtonPressed.dispatch()}tweenIn(k){this.gameObject.parent.active=!0,this.tweenAlpha(0,1,k),this.tweenXPosition(50,0,Pb,k)}tweenAlpha(k,B,U){const F={value:k};this.setAlpha(k);const G=tt.q.instance.prodigy.game.add.tween(F,this);G.to({value:B},Pb,j.GS3.Linear.None,!0,U),G.onUpdate.add((()=>this.setAlpha(F.value))),G.start()}tweenXPosition(k,B,U,F){const G={value:k};this.gameObject.transform.setPositionX(G.value);const $=tt.q.instance.prodigy.game.add.tween(G,this);$.to({value:B},U,j.GS3.Cubic.Out,!0,F),$.onUpdate.add((()=>{this.gameObject.transform.setPositionX(G.value)})),$.start()}setAlpha(k){this.panelRenderComponent&&(this.panelRenderComponent.alpha=k,this.panelRenderComponent.updateFilter())}};(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],Mb.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Mb.prototype,"onPanelButtonPressed",void 0),(0,G.Cg)([(0,j.MnK)(Cb),(0,G.Sn)("design:type",Cb)],Mb.prototype,"layoutController",void 0),(0,G.Cg)([(0,j.MnK)(Db.r),(0,G.Sn)("design:type",Db.r)],Mb.prototype,"chestStateController",void 0),(0,G.Cg)([(0,j.MnK)(Db.r),(0,G.Sn)("design:type",Db.r)],Mb.prototype,"allowanceStateController",void 0),(0,G.Cg)([(0,j.MnK)(Ib),(0,G.Sn)("design:type",Ib)],Mb.prototype,"valueTextComponent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Mb.prototype,"collectButtonObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Mb.prototype,"collectedSpineObject",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Mb.prototype,"_promptTextComponent",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Mb.prototype,"_tierTextComponent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Mb.prototype,"_askParentTextObject",void 0),(0,G.Cg)([(0,j.MnK)(j.jsv),(0,G.Sn)("design:type",j.jsv)],Mb.prototype,"panelRenderComponent",void 0),Mb=(0,G.Cg)([(0,j.EVk)("WizardBankCollectPanelController")],Mb);let Nb=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.onCoinsReachedWallet=this.createTidySignal(),this._canCollect=!1}get canCollect(){return this._canCollect}setup(k){1===k.reward.currency?(this._canCollect=k.availableToCollect,k.availableToCollect?this._rewardAmountText.text=(0,zu.Hk)(k.reward.value):(this._rewardAmountText.text="0",this._claimedStateSignal.run())):j.VyI.log("Attempted to setup gold widget with a non-gold claim",j.$bb.Warning)}playCollectSequence(){this._canCollect=!1,this._collectSequenceSignal.run()}notifyCoinHasReachedWallet(){this.onCoinsReachedWallet.dispatch()}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Nb.prototype,"_rewardAmountText",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Nb.prototype,"collectButton",void 0),(0,G.Cg)([(0,j.MnK)(ql.S),(0,G.Sn)("design:type",ql.S)],Nb.prototype,"_claimedStateSignal",void 0),(0,G.Cg)([(0,j.MnK)(ql.S),(0,G.Sn)("design:type",ql.S)],Nb.prototype,"_collectSequenceSignal",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Nb.prototype,"onCoinsReachedWallet",void 0),Nb=(0,G.Cg)([(0,j.EVk)("WizardBankGoldWidgetController")],Nb);var xb,Lb,kb=U(4903),Bb=U(63352),Ub=U(91462),Fb=U(84938),Gb=U(76253);!function(k){k.Load="on_load",k.Play="on_play"}(Lb||(Lb={}));let jb=xb=class extends j.y4o{constructor(){super(...arguments),this.videoFolderPath="https://cdn.prodigygame.com/videos/",this.videoName="",this.videoSizeRatio="",this.autoPlay=!0,this.videoTimeoutMs=1e4,this.showCountdownTimer=!0,this.sendPurchaseFunnelEvents=!0,this.onVideoEnded=new j.HN0,this.onVideoStarted=new j.HN0,this.onVideoPlayCancelled=new j.HN0,this.onVideoStalled=new j.HN0,this.onVideoResumed=new j.HN0,this.videoEventType=Gb.B.None,this.instanceType=fi.N.MembershipVideo,this._resolutionIds={[kb.W.SD]:"",[kb.W.HD]:"",[kb.W.FullHD]:""},this._containerSize=new j.or0,this._isLoading=!1,this._isPlaying=!1,this._hasError=!1,this._hasNetworkConnection=!0}set funnelStartTriggerParams(k){this._funnelStartTriggerParams=k}postCreate(){var k;super.postCreate();{this._handleNetworkOfflineReference=this.onNetworkOffline.bind(this),window.addEventListener("offline",this._handleNetworkOfflineReference),this._handleNetworkOnlineReference=this.onNetworkOnline.bind(this),window.addEventListener("online",this._handleNetworkOnlineReference);const B=null!==(k=this.getInjectedValue(hs.Wr.OriginId))&&void 0!==k?k:"";this._segment.videos.sendInterfaceOpenEvent(this.videoEventType,this.instanceType,B),this.autoPlay&&this.tryLoadAndPlayVideo()}}destroy(){var k;this._isPlaying&&this.handleVideoEnd(),null===(k=this._container)||void 0===k||k.destroy(),window.removeEventListener("offline",this._handleNetworkOfflineReference),window.removeEventListener("online",this._handleNetworkOnlineReference),this.onVideoEnded.dispose(),this.onVideoStarted.dispose(),this.onVideoPlayCancelled.dispose(),this.onVideoStalled.dispose(),this.onVideoResumed.dispose(),super.destroy()}tryLoadAndPlayVideo(){return(0,G.sH)(this,void 0,void 0,(function*(){this.loadVideoResource().catch((()=>{this.handleVideoError(),j.VyI.log("Failed to set up video player",j.$bb.Error)}))}))}initNetworkSpeed(){return(0,G.sH)(this,void 0,void 0,(function*(){return new Promise(((k,B)=>{const U=Date.now(),F=new Image,j=`https://cdn.prodigygame.com/videos/video-image-purple.png?t=${U}`;F.onerror=this.onVideoError.bind(this),F.onload=()=>(0,G.sH)(this,void 0,void 0,(function*(){try{const B=Date.now(),F=Number((2940192/((B-U)/1e3)).toFixed(2));this._networkSpeedKbps=Number((F/1e3).toFixed(2)),k()}catch(F){B(new Error("Failed to get network speed."))}})),F.src=j}))}))}onNetworkOffline(){this._hasNetworkConnection=!1,this._isLoading&&this.handleVideoError()}onNetworkOnline(){this._hasNetworkConnection=!0}getDimensions(){return this._containerSize.setTo(this._container.width,this._container.height),this._containerSize}getVideoIdForResolution(k=kb.W.SD){return this._resolutionIds[k]?this._resolutionIds[k]:(j.VyI.log(`HTMLVideoPlayerComponent: No GUID found for resolution ${k}; using base video name instead`,j.$bb.Warning),this.videoName)}getVideoPathFromId(k){return`${this.videoFolderPath}${k}.mp4`}getVideoIdsForAllResolutions(){return 0===Object.keys(this._resolutionIds).length?(j.VyI.log("HTMLVideoPlayerComponent: No supported resolutions found for video; using base video ID only",j.$bb.Warning),[this.getVideoIdForResolution()]):Object.keys(this._resolutionIds).map((k=>this.getVideoIdForResolution(k)))}getCachedVideoId(){let k;for(const B of this.getVideoIdsForAllResolutions())if(xb.CACHED_VIDEO_IDS.includes(B)){k=B;break}return k}getResolution(){const k=Object.keys(this._resolutionIds);let B=kb.W.SD;for(let U=1;Uxb.MIN_NETWORK_SPEED_BENCHMARKS[F]&&(B=F)}return B}generateFullVideoPath(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this.getCachedVideoId();if(k)this._selectedVideoId=k;else{if(Object.keys(this._resolutionIds).length>0){yield this.initNetworkSpeed();const k=this.getResolution();this._selectedVideoId=this.getVideoIdForResolution(k)}else this._selectedVideoId=this.getVideoIdForResolution();this._selectedVideoId&&xb.CACHED_VIDEO_IDS.push(this._selectedVideoId)}return this.getVideoPathFromId(this._selectedVideoId)}))}loadVideoResource(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._isLoading=!0,this._segment.videos.setNetworkTestStartedTimestamp(),!this._hasNetworkConnection)return void this.handleVideoError();let k;try{k=yield this.generateFullVideoPath()}catch(jv){return void this.handleVideoError()}this._segment.videos.sendVideoLoadingStartedEvent(this._selectedVideoId,this.videoEventType,this.instanceType),this.setupTimeout();const B=new $e.VideoResource(k,{updateFPS:30,autoPlay:!1,autoLoad:!1});this._videoController=B.source;const U=()=>{this.handleVideoError()};this._videoController.addEventListener("error",U,{once:!0,capture:!0}),this._videoController.volume=Fb.B.voiceVolume.value,this._videoController.onplay=()=>{B.source.pause()},yield B.load(),this._videoController.removeEventListener("error",U),this._hasError?j.VyI.log("HTMLVideoPlayerComponent: Video encountered an error on loading video resource; closing video player",j.$bb.Error):yield this.setupVideoWithResource(B,k)}))}setupVideoWithResource(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U,F;const G=$e.Texture.from(this._videoController);if(k.bind(G.baseTexture),this._videoSprite=new $e.Sprite(G),this._videoController.onerror=this.onVideoError.bind(this),this._videoController.onstalled=this.videoStalled.bind(this),this._videoController.onwaiting=this.videoStalled.bind(this),!(null===(U=this._videoController)||void 0===U?void 0:U.duration))return j.VyI.log("HTMLVideoPlayerComponent: Failed to load video; closing video player",j.$bb.Error),this._segment.videos.sendVideoErrorEvent(this._selectedVideoId,Lb.Load,null===(F=this._videoController)||void 0===F?void 0:F.currentTime),void this.handleVideoEnd(!1);this._videoController.onended=this.onVideoEnd.bind(this),this._isLoading=!1;try{const k=yield this.getVideoSize(B);this._segment.videos.sendVideoLoadingCompletedEvent(k)}catch($){j.VyI.log("HTMLVideoPlayerComponent: Failed to get video size after loading; cannot send video loading completed event to Segment",j.$bb.Warning)}this._hasError?j.VyI.log("HTMLVideoPlayerComponent: Video encountered an error on getting video size; closing video player",j.$bb.Error):yield this.finalizeVideoSetup()}))}finalizeVideoSetup(){return(0,G.sH)(this,void 0,void 0,(function*(){this.setupVideoContainer(),this._videoController.onplay=null,yield this.tryPlayVideo()}))}getVideoSize(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=yield fetch(k,{method:"HEAD"});return Number(B.headers.get("Content-Length"))||0}))}setupVideoContainer(){this._container||(this._container=j.W$e.instance.game.add.container(),this._container.name="Video Player Container"),this._container.addChild(this._videoSprite),this._container.interactive=!0,this._container.interactiveChildren=!0,this._container.alpha=0,this.setRootContainer(this._container)}setupTimeout(){this.clearTimeout(),this._timeoutId=window.setTimeout(this.onTimeout.bind(this),this.videoTimeoutMs)}onTimeout(){j.VyI.log("HTMLVideoPlayerComponent: Video timed out; closing video player",j.$bb.Error),this.handleVideoError()}clearTimeout(){this._timeoutId&&(window.clearTimeout(this._timeoutId),this._timeoutId=void 0)}videoStalled(){this.setupTimeout(),this.showCountdownTimer&&this.countdownTimer.stopTimer(),this._videoController.onstalled=null,this._videoController.onplaying=this.videoResumed.bind(this),this.onVideoStalled.dispatch()}videoResumed(){this.clearTimeout(),this._videoController.onplaying=null,this._videoController.onstalled=this.videoStalled.bind(this);const k=1e3*(this._videoController.duration-this._videoController.currentTime);this.showCountdownTimer&&this.countdownTimer.setCountdownTimeMS(k),this.onVideoResumed.dispatch(k)}onVideoError(){this.handleVideoError()}handleVideoError(){var k;this._hasError=!0,this.clearVideo();const B=this._isPlaying?Lb.Play:Lb.Load;this._segment.videos.sendVideoErrorEvent(this._selectedVideoId,B,null===(k=this._videoController)||void 0===k?void 0:k.currentTime),this.handleVideoEnd(!1)}tryPlayVideo(){return(0,G.sH)(this,arguments,void 0,(function*(k=!0){try{this.setupTimeout(),this._videoController.currentTime=0,yield this._videoController.play(),this._container.alpha=1}catch(e){return j.VyI.log("HTMLVideoPlayerComponent: Failed to play video",j.$bb.Error),this.clearTimeout(),void this.handleVideoError()}this.onVideoStart()}))}onVideoStart(){this.clearTimeout(),this._isPlaying=!0,tt.q.instance.prodigy.audio.pauseBGM(),this._segment.videos.sendVideoPlayedEvent(this._videoController.duration);const k=1e3*this._videoController.duration;this.showCountdownTimer&&(this.countdownTimerContainer.active=!0,this.countdownTimer.setCountdownTimeMS(k)),this.onVideoStarted.dispatch(k)}onVideoEnd(){this.handleVideoEnd()}handleVideoEnd(k=!0){this._isPlaying=!1,this.sendPurchaseFunnelEvents&&this._segment.videos.sendFunnelTriggerImpressionEvent(this.videoEventType),k&&this._segment.videos.sendVideoStoppedEvent(this._videoController.currentTime),this.clearVideo(),this.clearTimeout(),this.countdownTimerContainer.active=!1,this.onVideoEnded.dispatch(k),tt.q.instance.prodigy.audio.resumeBGM()}onVideoCancel(){this.onVideoPlayCancelled.dispatch(),this.handleVideoEnd(!1)}clearVideo(k=!0){var B,U,F;null===(B=this._videoController)||void 0===B||B.pause(),null===(U=this._videoController)||void 0===U||U.removeAttribute("src"),null===(F=this._videoController)||void 0===F||F.load(),this._container&&(this._container.removeChild(this._videoSprite),this._container.alpha=0)}sendFunnelStart(){this._segment.videos.sendFunnelStartEvent(this._funnelStartTriggerParams)}};jb.CACHED_VIDEO_IDS=[],jb.MIN_NETWORK_SPEED_BENCHMARKS={[kb.W.SD]:0,[kb.W.HD]:4e3,[kb.W.FullHD]:8e3},(0,G.Cg)([(0,Gi.b)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],jb.prototype,"_segment",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],jb.prototype,"videoFolderPath",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],jb.prototype,"videoName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],jb.prototype,"videoSizeRatio",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jb.prototype,"autoPlay",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],jb.prototype,"videoTimeoutMs",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],jb.prototype,"countdownTimerContainer",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],jb.prototype,"countdownTimer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jb.prototype,"showCountdownTimer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jb.prototype,"sendPurchaseFunnelEvents",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],jb.prototype,"onVideoEnded",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],jb.prototype,"onVideoStarted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],jb.prototype,"onVideoPlayCancelled",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],jb.prototype,"onVideoStalled",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],jb.prototype,"onVideoResumed",void 0),(0,G.Cg)([(0,j.gfw)(Gb.B),(0,G.Sn)("design:type",String)],jb.prototype,"videoEventType",void 0),(0,G.Cg)([(0,j.gfw)(fi.N),(0,G.Sn)("design:type",String)],jb.prototype,"instanceType",void 0),jb=xb=(0,G.Cg)([(0,j.EVk)("HTMLVideoPlayer",W.Y.uiVideo)],jb);var $b=U(48982),Hb=U(47968),Vb=U(3374),Wb=U(60228);const qb={[qt.D.NonMember]:"collect_gold_wb_button",[qt.D.Core]:"collect_core_wb_button",[qt.D.Plus]:"collect_plus_wb_button",[qt.D.Ultra]:"collect_ultra_wb_button"},Kb={[qt.D.Core]:"trail-gold",[qt.D.Plus]:"trail-plus",[qt.D.Ultra]:"trail-ultra"},zb={[qt.D.Core]:"gold",[qt.D.Plus]:"plus",[qt.D.Ultra]:"ultra"};var Yb;!function(k){k[k.NonMember=0]="NonMember",k[k.Member=1]="Member"}(Yb||(Yb={}));let Qb=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.panelControllers=[],this._debugMode=Yb.NonMember,this._membershipPurchased=!1,this._shouldShowVideo=!1,this._claimAnimationSemaphore=0,this.UPDATE_WIZARD_BANK_HUD_BUTTON_NOTIFICATIONS_ERROR_MESSAGE="WizardBankModalControllerComponent: Error updating Wizard Bank HUD button notifications"}postCreate(){this.init().then((()=>{this.sendMembershipFunnelStart()})).catch(j.RQr.createHandler("WizardBankModalControllerComponent: Error initializing the controller")),this._goldWidget.collectButton.onClick.add(this.startGoldCollection,this),tt.q.instance.prodigy.game.broadcaster.addAppListener(jn.H3.MembershipResponseReceived,this.handleMembershipChange,this),super.postCreate()}destroy(){this.processMembershipFunnelQuit(),super.destroy()}init(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U;if(this.gameObject.isDestroyed||this.gameObject.isMarkedForDestruction)return;const F=null!==(k=Sb.E.get(this._featureAccessData.memberTier))&&void 0!==k?k:qt.D.NonMember,G=F===qt.D.NonMember;this._shouldShowVideo=G&&It.O.isEnglishLocale(),[,this._lastClaimDataResponse]=yield Promise.all([this._shouldShowVideo?this.refreshVideoData():Promise.resolve(),this._hardCurrencyNetworkHandler.getAllowanceClaimData()]);const{totalClaimable:j}=this._lastClaimDataResponse;Nt.d.updateInjectedValues(this.gameObject,Object.assign({CLAIM_TRAIL_ANIMATION:null!==(B=Kb[F])&&void 0!==B?B:void 0,CLAIM_WALLET_MC_ANIMATION:null!==(U=zb[F])&&void 0!==U?U:void 0},this._shouldShowVideo?$b.h.advanceToNextVideoAndGetInjectionData({videoTypeData:this._currentVideoTypeData}):{}));const $=j.find((({currency:k})=>1===k)),H=oh.A.isDefined($)&&$.value>0;this._goldWidget.setup({reward:{currency:1,value:H?$.value:0},hasValidFeature:!0,availableToCollect:H}),G?yield this.setupNonMemberContent():yield this.setupMemberContent(F,this._lastClaimDataResponse)}))}refreshVideoData(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=Vb.C.getVideosDataProvider();this._currentVideoTypeData=yield k.getVideosDataByType(kb.s.WizardBank)}))}setupNonMemberContent(){return(0,G.sH)(this,void 0,void 0,(function*(){oh.A.isDefined(this.nonMembersContentContainer)&&(this.nonMembersContentContainer.active=!0),oh.A.isDefined(this.nonMembersContent)&&(this.nonMembersContent.active=!this._shouldShowVideo),this._videoPlayerContainer.active=this._shouldShowVideo,oh.A.isDefined(this.membersContentContainer)&&(this.membersContentContainer.active=!1),this._shouldShowVideo&&(yield this._videoPlayerComponent.tryLoadAndPlayVideo())}))}sendMembershipFunnelStart(){if(!oh.A.isDefined(this._lastClaimDataResponse))return;const k=function(k){const B=new Set;return"totalClaimable"in k?(k.totalClaimable.forEach((({currency:k,value:U})=>{U>0&&B.add(k)})),B):(Object.values(k).forEach((({availableToCollect:k,reward:U})=>{k&&U.value>0&&B.add(U.currency)})),B)}(this._lastClaimDataResponse),B=`${"gold_"+(k.has(1)?"available":"unavailable")}_${"magicoin_"+(k.has(27)?"available":"unavailable")}`,U=this.getInjectedValue("WIZARD_BANK_ORIGIN_TYPE")===ui.$N.AutoSurfaced?"AutoPop":"Membership";this._segment.purchase.sendFunnelStart({type:U,category:"wizard_bank",contentId:B,adType:Fs.R.UnifiedConversionFlow})}processMembershipFunnelQuit(){this._membershipPurchased||this._segment.purchase.sendFunnelQuit("Click-Membership","Close-Clicked")}setupMemberContent(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U,F,G;oh.A.isDefined(this.nonMembersContentContainer)&&(this.nonMembersContentContainer.active=!1),this._videoPlayerContainer.active=!1,oh.A.isDefined(this.membersContentContainer)&&(this.membersContentContainer.active=!0);const[j,$,H]=this.panelControllers,{totalClaimable:V}=B,W=V.find((({currency:k})=>27===k)),q=(null!==(U=null==W?void 0:W.value)&&void 0!==U?U:0)>0,K=j.IsActiveInHierarchy?650:100;let z=0;(null==j?void 0:j.GameObject)&&(j.setup({allowanceTier:k,currencyValue:W,layout:q?wb.Spread:wb.Tight}),j.IsActiveInHierarchy||(j.tweenIn(z),z+=300)),(null==$?void 0:$.GameObject)&&($.setup({allowanceTier:qt.D.Plus,currencyValue:null===(F=B[qt.D.Plus])||void 0===F?void 0:F.reward,forceChestState:Ob.T.Closed}),$.IsActiveInHierarchy||q||k!==qt.D.Core||($.tweenIn(K+z),z+=300)),(null==H?void 0:H.GameObject)&&(H.setup({allowanceTier:qt.D.Ultra,currencyValue:null===(G=B[qt.D.Ultra])||void 0===G?void 0:G.reward,forceChestState:Ob.T.Closed}),H.IsActiveInHierarchy||q||k!==qt.D.Core&&k!==qt.D.Plus||(H.tweenIn(K+z),z+=300))}))}attemptMemberClaim(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;if(!oh.A.isDefined(this._lastClaimDataResponse))return Promise.resolve();const U=qb[null!==(k=Sb.E.get(this._featureAccessData.memberTier))&&void 0!==k?k:qt.D.Core];this._segment.featureCommon.sendButtonEvent({buttonName:U,interfaceName:us.B.WizardBank,interfaceType:ui.Wm.Modal});const F=[],$=null!==(B=this._lastClaimDataResponse)&&void 0!==B?B:{},{totalClaimable:H}=$,V=(0,G.Tt)($,["totalClaimable"]);for(const[G,{availableToCollect:j}]of Object.entries(V))j&&G!==qt.D.NonMember&&F.push(G);yield this._hardCurrencyDataProvider.claimAllowances(F),(0,Wb.Ug)().catch(j.RQr.createHandler(this.UPDATE_WIZARD_BANK_HUD_BUTTON_NOTIFICATIONS_ERROR_MESSAGE))}))}showMembershipMLP(){var k,B,U;this._featureAccessData.memberTier!==xs._$.NonMember?this.addListenerToPromise(null!==(U=null===(B=this._webPurchaseComponent)||void 0===B?void 0:B.initiateMembershipPurchaseUpgradeWithIFrame())&&void 0!==U?U:Promise.reject(new Error("Web purchase component not available")),(()=>null),(k=>{j.RQr.createHandler(JSON.stringify(k))})):null===(k=this._webPurchaseComponent)||void 0===k||k.initiateMembershipPurchase()}attemptNonMemberClaim(){return(0,G.sH)(this,void 0,void 0,(function*(){oh.A.isDefined(this._lastClaimDataResponse)&&(this._segment.featureCommon.sendButtonEvent({buttonName:qb[qt.D.NonMember],interfaceName:us.B.WizardBank,interfaceType:ui.Wm.Modal}),yield this._hardCurrencyDataProvider.claimAllowances([qt.D.NonMember]),(0,Wb.Ug)().catch(j.RQr.createHandler(this.UPDATE_WIZARD_BANK_HUD_BUTTON_NOTIFICATIONS_ERROR_MESSAGE)))}))}startGoldCollection(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.attemptNonMemberClaim(),this._goldWidget.playCollectSequence()}))}handleMembershipChange(k){this._membershipPurchased="success"===k,tt.q.instance.prodigy.game.broadcaster.removeAppListener(jn.H3.MembershipResponseReceived,this),(0,Wb.Ug)().catch(j.RQr.createHandler(this.UPDATE_WIZARD_BANK_HUD_BUTTON_NOTIFICATIONS_ERROR_MESSAGE)),tt.q.instance.game.broadcaster.broadcast(jn.Y1.HUDRevampButtonVisibilityRefreshRequested)}onCloseButtonClicked(){const[k]=this.panelControllers;k.canCollect&&(k.onPanelButtonPressed.dispatch(),this._claimAnimationSemaphore++),0===this._claimAnimationSemaphore&&this.gameObject.destroyDeferred()}claimAnimationComplete(){0!==this._claimAnimationSemaphore&&(this._claimAnimationSemaphore--,0===this._claimAnimationSemaphore&&this.gameObject.destroyDeferred())}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Mb),(0,G.Sn)("design:type",Array)],Qb.prototype,"panelControllers",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Qb.prototype,"nonMembersContentContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Qb.prototype,"membersContentContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Qb.prototype,"nonMembersContent",void 0),(0,G.Cg)([(0,j.Cdj)("231-9111"),(0,G.Sn)("design:type",Hb.b)],Qb.prototype,"_hardCurrencyNetworkHandler",void 0),(0,G.Cg)([(0,j.Cdj)("5c7-e02d"),(0,G.Sn)("design:type",zn.W)],Qb.prototype,"_hardCurrencyDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("3a0-8003"),(0,G.Sn)("design:type",Bb.F)],Qb.prototype,"_featureAccessData",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],Qb.prototype,"_segment",void 0),(0,G.Cg)([(0,j.MnK)(Nb),(0,G.Sn)("design:type",Nb)],Qb.prototype,"_goldWidget",void 0),(0,G.Cg)([(0,j.MnK)(Ub.M),(0,G.Sn)("design:type",Ub.M)],Qb.prototype,"_webPurchaseComponent",void 0),(0,G.Cg)([(0,j.MnK)(jb),(0,G.Sn)("design:type",jb)],Qb.prototype,"_videoPlayerComponent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Qb.prototype,"_videoPlayerContainer",void 0),(0,G.Cg)([(0,j.gfw)(Yb),(0,G.Sn)("design:type",Number)],Qb.prototype,"_debugMode",void 0),Qb=(0,G.Cg)([(0,j.EVk)("WizardBankModalController")],Qb);var Xb=U(84234),Zb=(U(33587),U(32367),U(2265),U(21097)),Jb=U(79600),tp=U(79687);let ep=class{static openInteractable(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=yield this.makeQuestRequest("interactables.openInteractable",{zoneTag:k});return tt.q.instance.prodigy.gameContainer.get("b50-4670").setCooldown(k,B.cooldown),B}))}static makeQuestRequest(k,B){return(0,G.sH)(this,arguments,void 0,(function*(k,B,U=null){try{const U=tt.q.instance.prodigy.gameContainer.get("00d-b27e"),F=yield U.cloudScript.timeoutMS(1e4).setRetryOption({retryCount:5}).useIdempotency(!0).execute(k,B);if(!F.isOK())throw new Jb.CatalystSdkError(Jb.EErrorCode.Unknown,"Unknown CatalystSDK Error",`${F.status}: ${JSON.stringify(F.data)}`);return F.data.response}catch(e){return j.VyI.log(`There was a problem getting data for ${k}. ${e.message}`,j.$bb.Error),U}}))}};ep=(0,G.Cg)([(0,tp.injectable)()],ep);class ip{static getConfig(){return this._configs||(this._configs=vb.R.loadData(pb.r.WorldInteractablesConfig_json)),this._configs}static isIdentifierValid(k){return j.Aq$.isDefined(this.getConfig().interactables[k])}static getCooldownTime(k){return this.getInteractableAssetFromID(k).cooldownTimeMS}static interactableHasQuestItems(k){var B;return(null===(B=this.getInteractableAssetFromID(k).questDropTables)||void 0===B?void 0:B.length)>0}static getInteractableName(k){var B;return this.isIdentifierValid(k)?null===(B=this.getInteractableAssetFromID(k))||void 0===B?void 0:B.name:""}static getInteractableAssetFromID(k){const B=this.getConfig().interactables[k].assetID,U=Yt.t.getItem("interactable",B).data;if(!j.Aq$.isDefined(U))throw new Error(`Error getting cooldown config for world interactable ${k}. Interactable asset ${B} doesn't exist.`);return U}}let sp=class extends j.uAl{constructor(){super(...arguments),this._checkCooldownDelay=2}update(){if(super.update(),this._checkCooldownDelay>0&&0==--this._checkCooldownDelay)try{let k=!1;const B=this.getIdentifier();if(!k&&!ip.isIdentifierValid(B))throw new Error(`World interactable ${B} doesn't exist in the world interactables config.`);this._cooldownComponent.initialize(B,this.getCooldownTime()),this._cooldownComponent.checkCooldown(),ip.interactableHasQuestItems(B)&&this.hasAccessToUltimates()&&tt.q.instance.prodigy.gameContainer.get("e50-b09b").preloadQuestProgress().catch(j.RQr.createHandler("Error preloading quest progress")),tt.q.instance.prodigy.gameContainer.get("c47-20b6").container.sendContainerDiscoveredEvent(ui.ZF.Interactable,B,this.getPosition().x,this.getPosition().y,ip.getInteractableName(this.getIdentifier()))}catch(k){j.VyI.log(k.message,j.$bb.Error),this.gameObject.active=!1}}hasAccessToUltimates(){return this._featureRequirements.meetsRequirementsDeprecated(15)}getIdentifier(){const k=tt.q.instance.prodigy.world.getCurrentMap(),B=this.getPosition();return`${k}-${B.x}-${B.y}`}getPosition(){return{x:Math.round(this.gameObject.transform.worldPosition.x),y:Math.round(this.gameObject.transform.worldPosition.y)}}getCooldownTime(){return ip.getCooldownTime(this.getIdentifier())}};(0,G.Cg)([(0,j.MnK)(ia),(0,G.Sn)("design:type",ia)],sp.prototype,"_cooldownComponent",void 0),(0,G.Cg)([(0,j.Cdj)("db5-fb6e"),(0,G.Sn)("design:type",Object)],sp.prototype,"_featureRequirements",void 0),sp=(0,G.Cg)([(0,j.EVk)("WorldInteractable",W.Y.ultimates)],sp);let np=class extends Be.u{constructor(){super(...arguments),this.onInteractionStart=new j.HN0,this.onInteractionError=new j.HN0}run(){this.onInteractionStart.dispatch(),this.doRun().then((()=>{this._segment.container.sendContainerOpenedEvent(ui.ZF.Interactable,this._interactable.getIdentifier())})).catch((k=>{this._segment.container.sendContainerOpenedFailedEvent(ui.ZF.Interactable,this._interactable.getIdentifier(),Zb.WE.NetworkFailure),j.RQr.logError(k,`Failed to open interactable ${this._interactable.getIdentifier()}`),this.onInteractionError.dispatch()}))}doRun(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;const U=yield ep.openInteractable(this._interactable.getIdentifier()),F=null!==(k=U.regularItems)&&void 0!==k?k:[],G=null!==(B=U.questItems)&&void 0!==B?B:[],j=G.concat(F);this._openSFX.playSFX(),this.execute(166,{game:tt.q.instance.game,spine:this._interactableSpine.getSpine(),regularItems:F.length>0?F:null,allItems:j.length>0?j:null,revealAnimationName:this._revealAnimationName,hasQuestItems:G.length>0,sourceID:this._interactable.getIdentifier(),transactionID:this._segment.container.getCurrentContainerTransactionID})}))}destroy(){this.onInteractionStart.dispose(),this.onInteractionError.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Pqz)(sp),(0,G.Sn)("design:type",sp)],np.prototype,"_interactable",void 0),(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],np.prototype,"_interactableSpine",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],np.prototype,"_revealAnimationName",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],np.prototype,"onInteractionStart",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],np.prototype,"onInteractionError",void 0),(0,G.Cg)([(0,j.MnK)(oa),(0,G.Sn)("design:type",oa)],np.prototype,"_openSFX",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],np.prototype,"_segment",void 0),np=(0,G.Cg)([(0,j.EVk)("InteractablesFSM",W.Y.ultimates)],np);let ap=class extends sp{getIdentifier(){return this._minibossRewardId}};(0,G.Cg)([(0,j.Cdj)("MinibossInteractableRewardId"),(0,G.Sn)("design:type",String)],ap.prototype,"_minibossRewardId",void 0),ap=(0,G.Cg)([(0,j.EVk)("MinibossRewardInteractable",W.Y.zones)],ap);U(88552);let rp=class extends j.uAl{run(){this.gameObject.active=!1}};rp=(0,G.Cg)([(0,j.EVk)("DeactivateSelf")],rp);let op=class extends j.uAl{constructor(){super(...arguments),this.cutsceneTag=""}playCutscene(){this.cutsceneTag?tt.q.instance.prodigy.world.playScene(this.cutsceneTag):j.VyI.log("StartLegacyCutsceneComponent: No cutscene tag specified",j.$bb.Warning)}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],op.prototype,"cutsceneTag",void 0),op=(0,G.Cg)([(0,j.EVk)("StartLegacyCutscene",W.Y.utility)],op);let hp=class extends j.uAl{create(){super.create(),this._targetState.setValue(Qt.J.shouldSuppressAd(this._loggedInPlayer.player))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],hp.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.MnK)(Ar.f),(0,G.Sn)("design:type",Ar.f)],hp.prototype,"_targetState",void 0),hp=(0,G.Cg)([(0,j.EVk)("ActivePlayerMembershipSuppressionState",W.Y.membership)],hp);let cp=class extends j.uAl{constructor(){super(...arguments),this._runOnLoad=!1,this._onNonMember=new j.HN0,this._onMember=new j.HN0,this._onLegacyMember=new j.HN0,this._onHasFeatureAccess=new j.HN0,this._onNoFeatureAccess=new j.HN0}create(){super.create(),this._runOnLoad&&this.checkMembership()}checkMembership(){this._loggedInPlayer.isMember()?(this._onMember.dispatch(),this._loggedInPlayer.player.hasLegacyMembership()&&this._onLegacyMember.dispatch()):this._onNonMember.dispatch(),this._membershipFeatureName&&(this._loggedInPlayer.player.hasMembershipFeatureAccess(this._membershipFeatureName)?this._onHasFeatureAccess.dispatch():this._onNoFeatureAccess.dispatch())}destroy(){this._onMember.dispose(),this._onNonMember.dispose(),this._onLegacyMember.dispose(),this._onHasFeatureAccess.dispose(),this._onNoFeatureAccess.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],cp.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],cp.prototype,"_runOnLoad",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],cp.prototype,"_membershipFeatureName",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.Lr6)(0),(0,j.YLv)("Fires if the player has no membership"),(0,G.Sn)("design:type",j.HN0)],cp.prototype,"_onNonMember",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.Lr6)(0),(0,j.YLv)("Fires if the player has any membership"),(0,G.Sn)("design:type",j.HN0)],cp.prototype,"_onMember",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.Lr6)(0),(0,j.YLv)("Fires if the player has legacy membership, after onMember"),(0,G.Sn)("design:type",j.HN0)],cp.prototype,"_onLegacyMember",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.Lr6)(0),(0,j.YLv)('Fires if the player has access to the membership feature in "Membership Feature Name"'),(0,G.Sn)("design:type",j.HN0)],cp.prototype,"_onHasFeatureAccess",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.Lr6)(0),(0,j.nKb)(null),(0,j.YLv)('Fires if the player does not have access to the membership feature in "Membership Feature Name"'),(0,G.Sn)("design:type",j.HN0)],cp.prototype,"_onNoFeatureAccess",void 0),cp=(0,G.Cg)([(0,j.EVk)("MembershipGuard",W.Y.membership)],cp);let dp=class extends j.y4o{constructor(){super(...arguments),this._tooltipArrowLocation=.5,this._tooltipArrowDirection=0}create(){super.create(),this._tooltipRoot=tt.q.instance.game.add.group(null,`${this.gameObject.name} - MembershipSuppressionTooltipComponent`),this.setRootContainer(this._tooltipRoot)}destroy(){var k;null===(k=this._tooltipRoot)||void 0===k||k.destroy(),this._tooltipRoot=null,super.destroy()}getDimensions(){return new j.or0(this._tooltipRoot.width,this._tooltipRoot.height)}showTooltip(){var k,B,U;const F=new j.I9Y;F.copyFrom(this.GameObject.transform.worldPosition),j.i7d.main&&null!==(U=null===(B=null===(k=j.wa5.getActiveScene())||void 0===k?void 0:k.getLayer(this.gameObject.layer))||void 0===B?void 0:B.attachToCamera)&&void 0!==U&&!U&&F.subtract(j.i7d.main.GameObject.transform.worldPosition),this.gameObject.findComponentInParent(Ye)&&(F.y-=75);tt.q.instance.prodigy.open.memberAdSuppressionToolTip({xPosition:F.x,yPosition:F.y,bodyText:null,arrowXRelPos:this._tooltipArrowLocation,arrowDirection:this._tooltipArrowDirection})}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],dp.prototype,"_tooltipArrowLocation",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],dp.prototype,"_tooltipArrowDirection",void 0),dp=(0,G.Cg)([(0,j.EVk)("MembershipSuppressionTooltip",W.Y.membership)],dp);let lp=class extends j.uAl{constructor(){super(...arguments),this.onNameChanged=new j.HN0,this.onNameChangedInArray=new j.HN0}get tier(){return this._tier}set tier(k){this._tier=k,this.refresh()}create(){super.create(),this.refresh()}refresh(){const k=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText((0,un.g1)(this._tier));this.onNameChanged.dispatch(k),this.onNameChangedInArray.dispatch([k])}destroy(){this.onNameChanged.dispose(),this.onNameChangedInArray.dispose(),super.destroy()}};(0,G.Cg)([(0,j.gfw)(xs._$),(0,G.Sn)("design:type",Number)],lp.prototype,"_tier",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],lp.prototype,"onNameChanged",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],lp.prototype,"onNameChangedInArray",void 0),lp=(0,G.Cg)([(0,j.EVk)("MembershipTierDataProvider",W.Y.membership)],lp);let up=class extends j.uAl{constructor(){super(...arguments),this._runOnLoad=!1,this._includeNonMembers=!0,this._onUserCanUpgrade=new j.HN0,this._onUserCannotUpgrade=new j.HN0}create(){super.create(),this._runOnLoad&&this.check().catch(j.RQr.createHandler("MembershipUpsellGuardComponent, error checking upgrade options"))}check(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._includeNonMembers&&!this._loggedInPlayer.isMember())return void this._onUserCanUpgrade.dispatch();((yield this._loggedInPlayer.player.getActiveMathMembership()).upgradeOptions.length>0?this._onUserCanUpgrade:this._onUserCannotUpgrade).dispatch()}))}destroy(){this._onUserCanUpgrade.dispose(),this._onUserCannotUpgrade.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],up.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],up.prototype,"_runOnLoad",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],up.prototype,"_includeNonMembers",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.Lr6)(0),(0,j.YLv)("Fires if the player has available upgrade options"),(0,G.Sn)("design:type",j.HN0)],up.prototype,"_onUserCanUpgrade",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.Lr6)(0),(0,j.YLv)("Fires if the player has no upgrade options"),(0,G.Sn)("design:type",j.HN0)],up.prototype,"_onUserCannotUpgrade",void 0),up=(0,G.Cg)([(0,j.EVk)("MembershipUpsellGuard",W.Y.membership)],up);let fp=class extends ih.k{createTrigger(k,B,U,F){const G=this.getCustomPropertiesObject();let j;if(U)j=U;else switch(this._defaultTriggerData){case ih.S.Zone:j=tt.q.instance.prodigy.world.getCurrentZone();break;case ih.S.Map:j=tt.q.instance.prodigy.world.getCurrentMap();break;case ih.S.Battle:j=this._segment.postBattleFlow.getBattleId()}let $=null!=F?F:Qt.J.showYouTubeMembershipAd(tt.q.instance.game,!0)?Fs.R.Video:Fs.R.Static;Us.P.shouldUseUnifiedConversionFlowForTriggerCategory(B)&&($=Fs.R.UnifiedConversionFlow);const H=Us.P.getAdVersionFromTriggerCategory(B);return Object.assign({type:k,category:B,contentId:j,adType:$,adVersion:H},G)}sendPurchaseFunnelImpression(k,B,U,F){this.trigger=this.createTrigger(k,B,U,F),this.purchaseFunnelCandidate=this._segment.purchase.sendFunnelTriggerImpression(this.trigger)}sendPurchaseFunnelStart(k,B,U,F){var G;const j=null!==(G=this.trigger)&&void 0!==G?G:this.createTrigger(k,B,U,F);this._segment.purchase.sendFunnelStart(j,this.purchaseFunnelCandidate)}sendPurchaseFunnelStep(k){this._segment.purchase.sendFunnelStep(k)}sendPurchaseFunnelError(k,B,U){this._segment.purchase.sendFunnelError(k,B,U)}sendPurchaseFunnelQuit(k,B){this._segment.purchase.sendFunnelQuit(k,B)}sendPurchaseFunnelHandoff(k){this._segment.purchase.sendFunnelHandoff(k)}sendPurchaseFunnelComplete(){this._segment.purchase.sendFunnelComplete()}sendFunnelAdvanced(k,B,U,F){const G={step_index:F};this._segment.playerProgression.sendFunnelAdvancedEvent({funnelName:k,funnelType:B,stepName:U},G)}};fp=(0,G.Cg)([(0,j.EVk)("SegmentAnalytics",W.Y.analytics)],fp);let bp=class extends ih.k{constructor(){super(...arguments),this.audience=Ic.w.Adults}sendQrCodeViewedEvent(){this.name&&this.audience?this._segment.qrCode.sendQrCodeViewedEvent(this.name,this.audience,{},this.getPropertiesObject()):j.VyI.log("Attempted to send analytics for QR code with unset fields, ignoring",j.$bb.Info)}};(0,G.Cg)([(0,j.gfw)(Oc),(0,G.Sn)("design:type",String)],bp.prototype,"name",void 0),(0,G.Cg)([(0,j.gfw)(Ic.w),(0,G.Sn)("design:type",String)],bp.prototype,"audience",void 0),bp=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsQrCode",W.Y.analytics)],bp);var pp,vp=U(10312),gp=U(92661);!function(k){k.CloseThisPrompt="closeThisPrompt",k.InitiateMembershipPurchase="initiateMembershipPurchase",k.OpenMembershipParent="openMembershipParent",k.OpenWebsite="openWebsite",k.PrefabMenu="openPrefabMenu",k.None="none"}(pp||(pp={}));const mp=gp.Ikc({colour:gp.YjP(),size:gp.aig().min(1),text:gp.YjP(),font:gp.YjP().optional(),wordWrapWidth:gp.aig().min(1).optional(),localizationKey:gp.YjP().optional()}),yp=gp.Ikc({prefabMenuGuid:gp.k5n(Rt.l).optional(),url:gp.YjP().optional()}),_p=gp.Ikc({actionName:gp.k5n(pp),params:yp.optional()}),Ep=gp.Ikc({text:gp.YjP().optional(),buttonAction:_p.optional()}),wp=gp.Ikc({buttonName:gp.YjP().optional(),interfaceName:gp.YjP().optional(),qrCodeName:gp.k5n(Oc).optional(),instanceType:gp.YjP().optional()}),Tp=gp.Ikc({title:mp.optional(),subtitle:mp.optional(),bodyTextElements:gp.YOg(mp).optional(),button:Ep.optional(),contentImageGuid:gp.k5n(ps.q).optional(),carouselItemNum:gp.Whr().min(0).optional(),segmentProperties:wp.optional()});gp.Ikc({name:gp.YjP(),contentTemplateGuid:gp.k5n(Rt.l),configurableElements:Tp.optional(),injectableProperties:gp.g1P(gp.YjP(),gp.L5J()).optional()});let Sp=class extends j.uAl{constructor(){super(...arguments),this._bodyTextElements=[]}postCreate(){var k,B;super.postCreate();{const U=this.getInjectedValue(hs.Dw.DynamicPromptContentAssetGuid),F=vb.R.loadData(U);if(!F)return void j.VyI.log(`Failed to configure dynamic prompt because content configuration asset with ID: ${U} does not exist.`,j.$bb.Error);const G=F.configurableElements;G&&(null!==(k=this._titleText)&&void 0!==k||(this._titleText=this.gameObject.addComponent(j.EYj)),null!==(B=this._subtitleText)&&void 0!==B||(this._subtitleText=this.gameObject.addComponent(j.EYj)),this.configureTextComponent(this._titleText,G.title),this._subtitleTextLocalizationKey?this.configureLocalizedTextComponent(this._subtitleTextLocalizationKey,G.subtitle):this.configureTextComponent(this._subtitleText,G.subtitle),this._contentArtAsset.setAsset(G.contentImageGuid).catch(j.RQr.createHandler("Failed to set the content art asset on the dynamic prompt.")),G.bodyTextElements&&this.configureBodyTextElements(G.bodyTextElements),G.segmentProperties&&this.configureSegment(G.segmentProperties),G.button&&this.configureButtons(G.button))}}configureBodyTextElements(k){const B=k.length,U=this._bodyTextElements.length;B>U&&j.VyI.log(`There are ${B} bodyTextElements configs, but only ${U} Text components to configure.\n The first ${U} Text components will be configured.`,j.$bb.Warning);for(let F=0;FB-1){j.VyI.log(`There is no config defined for Text component at index ${F} of _bodyTextElements. Completing setup.`,j.$bb.Warning);break}this.configureTextComponent(this._bodyTextElements[F],k[F])}}configureTextComponent(k,B){B&&(k.text=this._localizer.getText(B.text),k.fill=B.colour,k.fontSize=B.size,B.font&&(k.font=B.font),B.wordWrapWidth&&(k.wordWrap=!0,k.wordWrapWidth=B.wordWrapWidth))}configureLocalizedTextComponent(k,B){if(!B)return;k.localizationKey=B.localizationKey;const U=k.localizedText;U.fill=B.colour,U.fontSize=B.size,B.font&&(U.font=B.font),B.wordWrapWidth&&(U.wordWrap=!0,U.wordWrapWidth=B.wordWrapWidth)}configureSegment(k){this._buttonProperties&&(this._buttonProperties.interfaceName=k.interfaceName,this._buttonProperties.buttonName=k.buttonName,this._buttonProperties.saveClickInfo=k.buttonName),this._qrCode&&(this._qrCode.name=k.qrCodeName)}configureButtons(k){var B,U;let F;switch(this.setCtaButtonText(k.text),null===(B=k.buttonAction)||void 0===B?void 0:B.actionName){case pp.PrefabMenu:F=()=>{var B,U;tt.q.instance.prodigy.open.prefabMenu(null===(U=null===(B=k.buttonAction)||void 0===B?void 0:B.params)||void 0===U?void 0:U.prefabMenuGuid).createContainer=!1};break;case pp.OpenMembershipParent:if(tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.isPlayingAtSchool())F=this.lockBecomeAMemberButtonAtSchool();else{const k=this.ctaButton.GameObject.addComponent(fp);F=()=>{tt.q.instance.prodigy.open.membershipParent({flavourText:this.getInjectedValue(hs.Eh.MembershipPurchaseMemberPanelAdFlavourText),frameName:this.getInjectedValue(hs.Eh.MembershipPurchaseMemberPanelAdFrameName),trackingEvent:this.getInjectedValue(hs.Eh.MembershipPurchaseMemberPanelAdTrackingEvent)},{conversionFunnelMetadata:this.getInjectedValue(hs.Eh.MembershipPurchaseConversionFunnelMetadata),conversionFunnelName:this.getInjectedValue(hs.Eh.MembershipPurchaseConversionFunnelName),conversionStage:this.getInjectedValue(hs.Eh.MembershipPurchaseConversionFunnelStage),conversionStaticOrVideo:this.getInjectedValue(hs.Eh.MembershipPurchaseConversionFunnelStaticOrVideo)},this.getInjectedValue(hs.Eh.MembershipPurchaseUpgrade),this._buttonProperties.saveClickInfo),k.sendPurchaseFunnelStep("Click-Membership")},this._buttonOverlay&&(this._buttonOverlay.onClick.add(F),this._buttonOverlay.useHandCursor=!0)}break;case pp.OpenWebsite:F=()=>{var B,U;return vp.I.openWebsite(null===(U=null===(B=k.buttonAction)||void 0===B?void 0:B.params)||void 0===U?void 0:U.url)};break;case pp.CloseThisPrompt:F=()=>{var k;return(null!==(k=this._rootGameObject)&&void 0!==k?k:this.gameObject).destroyDeferred()};break;case pp.InitiateMembershipPurchase:F=()=>(0,G.sH)(this,void 0,void 0,(function*(){const k=this.gameObject.findComponentInChildren(Ub.M,!0);k?k.initiateMembershipPurchase():j.VyI.log("No ProcessWebPurchaseComponent found on this prefab. Cannot initiate purchase.",j.$bb.Error)}));break;case pp.None:return;default:return void j.VyI.log(`Dynamic prompt button action: ${null===(U=k.buttonAction)||void 0===U?void 0:U.actionName} is not in the enum of possible dynamic button actions`,j.$bb.Error)}this.ctaButton.onClick.add(F)}lockBecomeAMemberButtonAtSchool(){return this.setCtaButtonText(this._localizer.getText("DYNAMIC_PROMPT_SCHOOL_BUTTON_LOCKED")),()=>{var k;return(null!==(k=this._rootGameObject)&&void 0!==k?k:this.gameObject).destroyDeferred()}}setCtaButtonText(k){const B=this._localizer.getText(k);if(this.ctaButton instanceof Ut.S)this.ctaButton.text=B;else{const k=this.ctaButton.GameObject.findComponentInChildren(j.EYj);k&&(k.text=B)}}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Sp.prototype,"_rootGameObject",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Sp.prototype,"_titleText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Sp.prototype,"_subtitleText",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],Sp.prototype,"_subtitleTextLocalizationKey",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],Sp.prototype,"_bodyTextElements",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],Sp.prototype,"_contentArtAsset",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Sp.prototype,"ctaButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Sp.prototype,"_buttonOverlay",void 0),(0,G.Cg)([(0,j.MnK)(Xs),(0,G.Sn)("design:type",Xs)],Sp.prototype,"_buttonProperties",void 0),(0,G.Cg)([(0,j.MnK)(bp),(0,G.Sn)("design:type",bp)],Sp.prototype,"_qrCode",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Sp.prototype,"_localizer",void 0),Sp=(0,G.Cg)([(0,j.EVk)("DynamicPromptContentConfiguration",W.Y.uiDynamicPrompts)],Sp);let Ap=class extends j.uAl{constructor(){super(...arguments),this._respectSchoolMode=!1,this._onCtaButtonClicked=new j.HN0,this._onDynamicPromptLoaded=new j.HN0,this._onDynamicPromptClosed=new j.HN0}showPrompt(){this._respectSchoolMode&&this._currentPlayer.player.isPlayingAtSchool()?tt.q.instance.prodigy.open.membershipSchoolAd((()=>{this._onDynamicPromptClosed.dispatch()})):(this._dynamicPrompt=tt.q.instance.prodigy.open.dynamicPrompt(this.configAsset,this.injectedValues,{originType:this._interfaceOriginType}),this._dynamicPrompt.prefab?this.configureCtaButton():this._dynamicPrompt.onPrefabLoaded.addOnce(this.configureCtaButton.bind(this)))}configureCtaButton(){const k=this._dynamicPrompt.prefab.findComponentInChildren(Sp,!0);null==k||k.ctaButton.onClick.add((()=>{this._onCtaButtonClicked.dispatch()}),this),this._onDynamicPromptLoaded.dispatch(),this._dynamicPrompt.prefab.onDestroy.addOnce((()=>{this._onDynamicPromptClosed.dispatch()}),this)}close(){var k;null===(k=this._dynamicPrompt)||void 0===k||k.close(),this._dynamicPrompt=null}destroy(){this.close(),this._onCtaButtonClicked.dispose(),this._onDynamicPromptLoaded.dispose(),this._onDynamicPromptClosed.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Ap.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Ap.prototype,"_respectSchoolMode",void 0),(0,G.Cg)([(0,j.tW2)(),(0,G.Sn)("design:type",String)],Ap.prototype,"configAsset",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],Ap.prototype,"injectedValues",void 0),(0,G.Cg)([(0,j.gfw)(ui.$N),(0,G.Sn)("design:type",String)],Ap.prototype,"_interfaceOriginType",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ap.prototype,"_onCtaButtonClicked",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ap.prototype,"_onDynamicPromptLoaded",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ap.prototype,"_onDynamicPromptClosed",void 0),Ap=(0,G.Cg)([(0,j.EVk)("OpenDynamicPrompt",W.Y.membership)],Ap);const Cp=(0,be.gb)({key:"remove-parent-screen-from-conversion-flow",activateAssociatedExperiments:1,default:{enabled:!1}});let Op=class extends j.uAl{constructor(){super(...arguments),this._conversionFunnelMetadata="",this._conversionFunnelName="",this._conversionFunnelStage="",this._conversionStaticOrVideo=Fs.R.Static,this._memberPanelAdFlavourText="",this._memberPanelAdFrameName="",this._memberPanelAdTrackingEvent="",this._originId="",this._upgrade=!1,this.onClose=new j.HN0}open(){if((0,Bt.G)(Cp).enabled){const k=this.gameObject.findComponentInChildren(Ub.M,!0);if(k)return void k.initiateMembershipPurchase();j.VyI.log("No ProcessWebPurchaseComponent found on this prefab. Cannot initiate purchase.",j.$bb.Error)}tt.q.instance.prodigy.open.membershipParent({flavourText:this._memberPanelAdFlavourText,frameName:this._memberPanelAdFrameName,trackingEvent:this._memberPanelAdTrackingEvent},{conversionFunnelMetadata:this._conversionFunnelMetadata,conversionFunnelName:this._conversionFunnelName,conversionStage:this._conversionFunnelStage,conversionStaticOrVideo:this._conversionStaticOrVideo},this._upgrade,this._originId).onClose=()=>{this.onClose.dispatch()}}destroy(){this.onClose.dispose(),super.destroy()}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Op.prototype,"_conversionFunnelMetadata",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Op.prototype,"_conversionFunnelName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Op.prototype,"_conversionFunnelStage",void 0),(0,G.Cg)([(0,j.gfw)(Fs.R),(0,G.Sn)("design:type",String)],Op.prototype,"_conversionStaticOrVideo",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Op.prototype,"_memberPanelAdFlavourText",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Op.prototype,"_memberPanelAdFrameName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Op.prototype,"_memberPanelAdTrackingEvent",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Op.prototype,"_originId",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Op.prototype,"_upgrade",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Op.prototype,"onClose",void 0),Op=(0,G.Cg)([(0,j.EVk)("OpenMembershipParent",W.Y.membership)],Op);var Ip=U(11117);let Dp=class extends j.JTX{constructor(){super(...arguments),this.onClose=new j.HN0,this.onIsMember=new j.HN0,this.onIsNotMember=new j.HN0}run(){var k;if(this._playerProvider.player.hasMembership())this.onIsMember.dispatch();else{this.onIsNotMember.dispatch();const B={conversionFunnelName:this.analyticConversionFunnelName,conversionFunnelMetadata:tt.q.instance.prodigy.world.getCurrentMap()},U=tt.q.instance.prodigy.open.membershipInfo((()=>{this.onClose.dispatch()}),B,this.panelAdName?Ip.R[this.panelAdName]:void 0);U&&j.wa5.getActiveScene().getLayer(null!==(k=this._adMenuLayer)&&void 0!==k?k:this.GameObject.layer).addDisplayObject(U)}}destroy(){this.onClose.dispose(),this.onIsMember.dispose(),this.onIsNotMember.dispose(),super.destroy()}};(0,G.Cg)([(0,j.fFd)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Dp.prototype,"_playerProvider",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Dp.prototype,"onClose",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Dp.prototype,"onIsMember",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Dp.prototype,"onIsNotMember",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",Object)],Dp.prototype,"panelAdName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Dp.prototype,"analyticConversionFunnelName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Dp.prototype,"analyticConversionFunnelStage",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Dp.prototype,"_adMenuLayer",void 0),Dp=(0,G.Cg)([(0,j.EVk)("ShowAd",W.Y.membership)],Dp);U(56520);let Rp=class extends j.uAl{constructor(){super(...arguments),this._attachmentPivot=new j.I9Y(.5,.5)}create(){super.create(),this.attachToSlot().catch(j.RQr.createHandler("Error attaching render component to spine slot"))}attachToSlot(){return(0,G.sH)(this,void 0,void 0,(function*(){let k=this._attachedRenderComponent.getRootContainer();k||(yield this._attachedRenderComponent.onRootContainerSet.asPromise(),k=this._attachedRenderComponent.getRootContainer());const B=this._spineComponent.getSlot(this._slotName);(null==B?void 0:B.attachment)||j.VyI.log(`SpineAttachComponent: Slot ${this._slotName} has no attachment and will be hidden by the Spine runtime.`,j.$bb.Warning);const U=this._spineComponent.getSpine().getSlotContainer(B);if(!U)throw new Error(`SpineAttachComponent: Slot ${this._slotName} not found on spine.`);U.removeChildren();const F=U.addChild(new $e.Container);F.scale.y=-1,F.addChild(k),F.position.set(this._attachmentPivot.x*-k.width,this._attachmentPivot.y*k.height),this._attachedRenderComponent.GameObject.onHierarchyChanged.removeAll(this._attachedRenderComponent)}))}};(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],Rp.prototype,"_spineComponent",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Rp.prototype,"_slotName",void 0),(0,G.Cg)([(0,j.MnK)(j.y4o),(0,G.Sn)("design:type",j.y4o)],Rp.prototype,"_attachedRenderComponent",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],Rp.prototype,"_attachmentPivot",void 0),Rp=(0,G.Cg)([(0,j.EVk)("SpineAttach",W.Y.animation)],Rp);let Pp=class extends j.uAl{constructor(){super(...arguments),this._disableAfterStepComplete=!1,this.onComplete=new j.HN0,this._onNext=new j.HN0}destroy(){this.onComplete.dispose(),this._onNext.dispose(),super.destroy()}begin(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=this._root.Container;B.bind(this._nextCallbackInjectionId).toConstantValue((()=>this._onNext.dispatch()));try{const U=null!=k?k:this._root.GameObject.children;for(const k of U){const B=this._descendantTriggerName?k.findChildByName(this._descendantTriggerName):k;if(!j.Aq$.isDefined(B))continue;const U=this._onNext.asPromise();B.active=!0;try{yield U}catch(jv){return}this._disableAfterStepComplete&&(B.active=!1)}}finally{this._onNext.dispose(),B.unbind(this._nextCallbackInjectionId)}this.onComplete.dispatch()}))}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pp.prototype,"_descendantTriggerName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Pp.prototype,"_nextCallbackInjectionId",void 0),(0,G.Cg)([(0,j.MnK)(j.bE_),(0,G.Sn)("design:type",j.bE_)],Pp.prototype,"_root",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Pp.prototype,"_disableAfterStepComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Pp.prototype,"onComplete",void 0),Pp=(0,G.Cg)([(0,j.EVk)("StaggerSequence",W.Y.animation)],Pp);let Mp=class extends j.y4o{create(){super.create(),this._timerRoot=tt.q.instance.game.add.group(tt.q.instance.game.stage),this.setRootContainer(this._timerRoot),this.playerMorphed=this.playerMorphed.bind(this),this.cancelledMorph=this.cancelledMorph.bind(this);const k=tt.q.instance.game.broadcaster;k.addAppListener(jn.J8.MorphMarbleUsed,this.playerMorphed,this),k.addAppListener(jn.J8.MorphMarbleTimerUpdated,this.update.bind(this),this),this.initTimer()}destroy(){var k;const B=tt.q.instance.game.broadcaster;B.removeAppListener(jn.J8.MorphMarbleUsed,this),B.removeAppListener(jn.J8.MorphMarbleTimerUpdated,this),this._morphTimer&&(this._morphTimer.destroy(),this._morphTimer=null),null===(k=this._timerRoot)||void 0===k||k.destroy(),super.destroy()}update(){super.update();const k=this._loggedInPlayer.player;if(this._morphTimer&&k)if(k.isPlayerTransformed()){const B=k.getPlayerData().playerTransformation;this._morphTimer.updateTimerValue(B.maxTime-B.timeRemaining)}else this._morphTimer.endTimer()}cancelledMorph(){this._loggedInPlayer.player.transformPlayer(Vn.V.Player),tt.q.instance.game.broadcaster.broadcast(jn.J8.MorphMarbleCancelled)}initTimer(){const k=this._loggedInPlayer.player;if(k.isPlayerTransformed()){const B=k.getPlayerData().playerTransformation;this.createTimer(B.maxTime,B.maxTime-B.timeRemaining)}}playerMorphed(k){this._morphTimer&&this._morphTimer.destroy(),this.GameObject.active=!0,this.createTimer(k.effect.time,0)}createTimer(k,B){this._morphTimer&&this._morphTimer.destroy();const U=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this._morphTimer=tt.q.instance.prodigy.create.timerControl(this._timerRoot,55,50,{maxTime:k,timeDelta:15e3,clickMessage:U.getText("MORPH_END_MESSAGE"),storedTime:B},this.cancelledMorph),this._morphTimer.onDestroy.addOnce((()=>{this._morphTimer=null}))}getDimensions(){return this.GameObject.transform instanceof j.XVE?this.GameObject.transform.rectTransformDimensions:new j.or0(this.getRootContainer().width,this.getRootContainer().height)}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Mp.prototype,"_loggedInPlayer",void 0),Mp=(0,G.Cg)([(0,j.EVk)("MorphTimerButton",W.Y.ui)],Mp);let Np=class extends j.uAl{constructor(){super(...arguments),this.targetTransforms=[],this.moveSpeed=220,this.loop=!1,this._currentTargetIndex=0,this._isMoving=!1,this.onMovementComplete=new j.HN0}destroy(){this.onMovementComplete.dispose(),super.destroy()}update(){if(!this._isMoving||!this.creatureTransform||this.targetTransforms.length<=0)return;const k=this.targetTransforms[this._currentTargetIndex];if(!k)return void this.finishMovement();const B=this.moveSpeed*tt.q.instance.game.time.deltaMS/1e3,U=k.worldPosition.x-this.creatureTransform.worldPosition.x,F=k.worldPosition.y-this.creatureTransform.worldPosition.y,G=Math.sqrt(U*U+F*F);if(G<=B){if(this.creatureTransform.worldPosition=k.worldPosition,++this._currentTargetIndex,this._currentTargetIndex>=this.targetTransforms.length)return this.loop?void(this._currentTargetIndex=0):void this.finishMovement()}else{const k=U/G,j=F/G;this.creatureTransform.worldPosition={x:this.creatureTransform.worldPosition.x+k*B,y:this.creatureTransform.worldPosition.y+j*B},this.updateFacingDirection(k)}}run(){!this.creatureTransform||this.targetTransforms.length<=0?this.onMovementComplete.dispatch():(this._isMoving=!0,this._currentTargetIndex=0,this.creatureAnimator&&this.playWalkAnimation())}updateFacingDirection(k){var B;const U=null!==(B=this.faceDirectionTransform)&&void 0!==B?B:this.creatureTransform;0!==k&&U&&(U.worldScale={x:Math.abs(U.worldScale.x)*(k<0?-1:1),y:U.worldScale.y})}playWalkAnimation(){var k;null===(k=this.creatureAnimator)||void 0===k||k.playAnimation("walk",!0)}playIdleAnimation(){var k;null===(k=this.creatureAnimator)||void 0===k||k.playAnimation("idle",!0)}finishMovement(){this._isMoving=!1,this.playIdleAnimation(),this.onMovementComplete.dispatch()}stop(){this._isMoving&&(this._isMoving=!1,this.playIdleAnimation())}};(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Np.prototype,"creatureTransform",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Np.prototype,"faceDirectionTransform",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],Np.prototype,"creatureAnimator",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",Array)],Np.prototype,"targetTransforms",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Np.prototype,"moveSpeed",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Np.prototype,"loop",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Np.prototype,"onMovementComplete",void 0),Np=(0,G.Cg)([(0,j.EVk)("CreatureMovement",W.Y.motion),(0,j.S1F)()],Np);class xp extends Mn{constructor(k,B,U,F){super(),this._floatHeight=0,this._floatRange=0,this._floatDurationMS=0,this._targetTransform=null,this._floatTween=null,this._initialTransformY=0,this._targetTransform=k,this._floatHeight=B,this._floatRange=U,this._floatDurationMS=F}destroy(){this.exit(),this._targetTransform=null,super.destroy()}enter(){const k=this._floatHeight+this._floatRange,B={y:this._floatHeight-this._floatRange},U=.5*this._floatDurationMS;this._floatTween=tt.q.instance.game.add.tween(B,this).to({y:k},U,j.GS3.Quadratic.InOut,!0,0,-1,!0).onUpdateCallback((()=>{this._targetTransform.setPosition(this._targetTransform.localPosition.x,this._initialTransformY-B.y)}))}exit(){var k;tt.q.instance.game.tweens.remove(this._floatTween),this._floatTween=null,null===(k=this._targetTransform)||void 0===k||k.setPosition(this._targetTransform.localPosition.x,this._initialTransformY)}}let Lp=class extends j.uAl{constructor(){super(...arguments),this._floatHeight=0,this._floatRange=0,this._floatPeriodMS=0}set targetTransform(k){this._targetTransform=k}create(){super.create(),this.setAnimationStates()}setAnimationStates(){const k=new xp(this._targetTransform,this._floatHeight,this._floatRange,this._floatPeriodMS);this._animationController.setAnimationState(0,k),this._animationController.setAnimationState(1,k),this._animationController.setAnimationState(2,k),this._animationController.setAnimationState(4,k)}destroy(){this._animationController=null,this._targetTransform=null,super.destroy()}};(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Lp.prototype,"_animationController",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Lp.prototype,"_targetTransform",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Lp.prototype,"_floatHeight",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Lp.prototype,"_floatRange",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Lp.prototype,"_floatPeriodMS",void 0),Lp=(0,G.Cg)([(0,j.EVk)("FloatAnimationStates",W.Y.animation)],Lp);class kp extends Mn{constructor(k,B,U){super(),this._hopHeight=0,this._hopDurationMS=0,this._targetTransform=null,this._hopTween=null,this._initialTransformY=0,this._targetTransform=k,this._hopHeight=B,this._hopDurationMS=U}destroy(){this._targetTransform=null,tt.q.instance.game.tweens.remove(this._hopTween),this._hopTween=null,super.destroy()}enter(){const k={y:0},B=.5*this._hopDurationMS;this._initialTransformY=this._targetTransform.localPosition.y,this._hopTween=tt.q.instance.game.add.tween(k,this).to({y:this._hopHeight},B,j.GS3.Quadratic.Out).to({y:0},B,j.GS3.Quadratic.In).onUpdateCallback((()=>{this._targetTransform.setPosition(this._targetTransform.localPosition.x,this._initialTransformY-k.y)})).loop(!0).start()}exit(){tt.q.instance.game.tweens.remove(this._hopTween),this._hopTween=null,this._targetTransform.setPosition(this._targetTransform.localPosition.x,this._initialTransformY)}}let Bp=class extends j.uAl{constructor(){super(...arguments),this._hopHeight=0,this._hopDurationMS=0}create(){super.create(),this._animationController.setAnimationState(1,new kp(this._targetTransform,this._hopHeight,this._hopDurationMS))}destroy(){this._animationController=null,this._targetTransform=null,super.destroy()}};(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Bp.prototype,"_animationController",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],Bp.prototype,"_targetTransform",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Bp.prototype,"_hopHeight",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Bp.prototype,"_hopDurationMS",void 0),Bp=(0,G.Cg)([(0,j.EVk)("HopWalkAnimationStates",W.Y.animation)],Bp);U(85697);let Up=class extends j.uAl{constructor(){super(...arguments),this.onGotViewedProgressMenu=new j.HN0}postCreate(){super.postCreate(),this.updateFestivalHudNotification()}updateFestivalHudNotification(){if(this.onHUDMenuBar){const k=!tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.viewedProgressMenu;this.onGotViewedProgressMenu.dispatch(k)}}destroy(){this.onGotViewedProgressMenu.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Up.prototype,"onGotViewedProgressMenu",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Up.prototype,"onHUDMenuBar",void 0),Up=(0,G.Cg)([(0,j.EVk)("FestivalProgress",W.Y.festival)],Up);var Fp=U(57797),Gp=U(53037),jp=U(71586);let $p=class extends j.uAl{setup(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){this._progressTask=k,this._claimTask=B,this._destroyMenuCallback=U,this.setupTierComponent(F)}))}setDefaults(){this._progressBar.GameObject.active=!0,this._progressBarIcon.active=!0,this._tierQuestDescription.GameObject.active=!0,this._tierLockedState.active=!1,this._tierClaimedState.active=!1,this._tierClaimableState.active=!1}setupTierComponent(k){var B,U,F,G,$;if(this.setDefaults(),k)return this._progressBar.GameObject.active=!1,this._tierQuestDescription.GameObject.active=!1,void(this._tierLockedState.active=!0);let H=null!==(U=null===(B=this._progressTask.taskProgress.data)||void 0===B?void 0:B.progress)&&void 0!==U?U:0;const V=null!==(F=this._progressTask.taskDefinition.completionRequirements.data.target)&&void 0!==F?F:0;let W="Complete!";this._progressTask.taskProgress.status===pr.t.COMPLETE&&(H=V,this._progressBarIcon.active=!1),this._progressBar.setFromValues(H,V,!1);if(this._claimTask&&this._progressTask.taskProgress.status===pr.t.COMPLETE&&(this._claimTask.taskProgress.status===pr.t.COMPLETE||(null!==($=null===(G=this._claimTask.taskProgress.data)||void 0===G?void 0:G.timesCompleted)&&void 0!==$?$:0)>0))this._tierClaimedState.active=!0,W="Collected!",this._replayButton.useHandCursor=!0,this._replayButton.onClick.add((()=>{this._festivalQuestManager.sendRewardClaimedEvent(this._claimTask.taskID).catch(j.RQr.createHandler("Failed to send reward claimed event.")),this._replayButton.useHandCursor=!1,this._replayButton.onClick.removeAll(),this._destroyMenuCallback()}));else if(this._claimTask&&this._progressTask.taskProgress.status===pr.t.COMPLETE){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this._tierClaimableState.active=!0,this._progressBar.GameObject.active=!1,k.daily.viewedProgressMenu=!1,this._claimButton.useHandCursor=!0,this._claimButton.onClick.add((()=>{this._festivalQuestManager.sendRewardClaimedEvent(this._claimTask.taskID).catch(j.RQr.createHandler("Failed to send reward claimed event.")),k.daily.viewedProgressMenu=!0,this._claimButton.useHandCursor=!1,this._claimButton.onClick.removeAll(),W="Collected!",this._tierClaimedState.active=!1,this._progressBar.GameObject.active=!0,this._destroyMenuCallback()}))}this._progressBar.onFilled.add((()=>{this._progressBar.setBarText(W)}))}};(0,G.Cg)([(0,j.Cdj)("99d-5e9e"),(0,G.Sn)("design:type",Gp.q)],$p.prototype,"_festivalQuestManager",void 0),(0,G.Cg)([(0,j.MnK)(ys.z),(0,G.Sn)("design:type",ys.z)],$p.prototype,"_progressBar",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],$p.prototype,"_tierQuestDescription",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],$p.prototype,"_claimButton",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],$p.prototype,"_replayButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$p.prototype,"_tierClaimedState",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$p.prototype,"_tierClaimableState",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$p.prototype,"_tierLockedState",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],$p.prototype,"_progressBarIcon",void 0),$p=(0,G.Cg)([(0,j.EVk)("FestivalCoopTier",W.Y.festival)],$p);let Hp=class extends ad.b{constructor(){super(...arguments),this._color="#FFFFFF",this._previousColor=1}get color(){return this._color}set color(k){this._color="number"==typeof k?j.Q1f.numberToHexString(k).slice(0,7):k,this.reset()}initialize(){if(super.initialize(),"tint"in this._rootContainer)return;const k=new nd.N,B=j.Q1f.hexToRGB(this._color),U=B>>16&255,F=B>>8&255,G=255&B;k.matrix[0]=U/255,k.matrix[6]=F/255,k.matrix[12]=G/255,this._filterList.push(k)}applyFilter(){"tint"in this._rootContainer?(this._previousColor=this._rootContainer.tint,this._rootContainer.tint=j.TZp.hexToDecimal(this._color,"#"),of.s.resetCacheAsBitmap(this._rootContainer)):super.applyFilter()}removeFilter(){"tint"in this._rootContainer?(this._rootContainer.tint=this._previousColor,of.s.resetCacheAsBitmap(this._rootContainer)):super.removeFilter()}};(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],Hp.prototype,"_color",void 0),Hp=(0,G.Cg)([(0,j.EVk)("ColorTintFilter",W.Y.effect)],Hp);class Vp extends j.$KW{generate(k,B){const U=this.buildButtonNodeGroup(k),F=this.buildFestivalTiersNodeGroup(k),G=this.buildFestivalTabGroup(k),$=this.buildSignalGroup(k);return j.XRp.createVertical([U,F,G,$])}buildSignalGroup(k){const B=j.NyS.create({id:"onChangeTab",label:"On Change Tab",signalValue:k.onChangeTab,componentGUID:this._componentGuid}),U=j.NyS.create({id:"onChangeTabComplete",label:"On Change Tab Complete",signalValue:k.onChangeTabComplete,componentGUID:this._componentGuid});return j.XRp.createVertical([B,U],{isContainer:!0,title:"Signals",isCollapsible:!0,startCollapsed:!1})}buildFestivalTabGroup(k){const B=j.Gme.gameObjectPickerGroup({id:"storyTabNotification",labelValue:"Story Notification",gameObjectGuid:k.storyTabNotification}),U=j.Gme.gameObjectPickerGroup({id:"seasonTabNotification",labelValue:"Season Notification",gameObjectGuid:k.seasonTabNotification}),F=j.Gme.gameObjectPickerGroup({id:"riftsTabNotification",labelValue:"Rifts Notification",gameObjectGuid:k.riftsTabNotification}),G=j.Gme.gameObjectPickerGroup({id:"memberTabNotification",labelValue:"Member Notification",gameObjectGuid:k.memberTabNotification}),$=j.Gme.gameObjectPickerGroup({id:"coopTabNotification",labelValue:"Coop Notification",gameObjectGuid:k.coopTabNotification}),H=j.Gme.componentPickerGroup({id:"toggleGroup",labelValue:"Toggle Group",componentType:qs.O,componentGuid:k.toggleGroup});return j.XRp.createVertical([B,U,F,G,$,H],{isContainer:!0,title:"Festival Tabs",isCollapsible:!0,startCollapsed:!0})}buildFestivalTiersNodeGroup(k){const B=j.Gme.gameObjectPickerGroup({id:"tierCardContainer",labelValue:"Tier Card Container",gameObjectGuid:k.tierCardContainer}),U=j.Gme.componentPickerGroup({id:"scrollViewRef",labelValue:"Scroll View Ref",componentType:Mt.C,componentGuid:k.scrollViewRef}),F=j.Gme.componentPickerGroup({id:"gridLayoutRef",labelValue:"Grid Layout Ref",componentType:j.Sz7,componentGuid:k.gridLayoutRef}),G=j.Gme.componentPickerGroup({id:"taskCompleteCounter",labelValue:"Task Complete Counter",componentType:j.EYj,componentGuid:k.taskCompleteCounter}),$=j.Gme.gameObjectPickerGroup({id:"loadingObject",labelValue:"Loading Object",gameObjectGuid:k.loadingObject});return j.XRp.createVertical([B,U,F,G,$],{isContainer:!0,title:"Festival Progress Tiers",isCollapsible:!0,startCollapsed:!0})}buildButtonNodeGroup(k){const B=j.Gme.componentPickerGroup({id:"shopButton",labelValue:"Shop Button",componentType:F.$,componentGuid:k.shopButton}),U=j.Gme.componentPickerGroup({id:"ctaButton",labelValue:"CTA Button",componentType:F.$,componentGuid:k.ctaButton});return j.XRp.createVertical([B,U],{isContainer:!0,title:"Buttons",isCollapsible:!0,startCollapsed:!0})}buildTierNodeGroup(k,B){const U=j.Gme.componentPickerGroup({id:`tier${B}Lock`,labelValue:"Lock SpineAnimator",componentType:Os.j,componentGuid:k[`tier${B}Lock`]}),F=j.Gme.componentPickerGroup({id:`tier${B}RewardImage`,labelValue:"Reward Image",componentType:j.vYh,componentGuid:k[`tier${B}RewardImage`]}),G=j.Gme.componentPickerGroup({id:`tier${B}RewardText`,labelValue:"Reward Text",componentType:j.EYj,componentGuid:k[`tier${B}RewardText`]}),$=j.Gme.componentPickerGroup({id:`tier${B}RewardQuantityText`,labelValue:"Reward Quantity Text",componentType:j.EYj,componentGuid:k[`tier${B}RewardQuantityText`]}),H=j.Gme.gameObjectPickerGroup({id:`tier${B}RewardQuantityContainer`,labelValue:"Reward Quantity Container",gameObjectGuid:k[`tier${B}RewardQuantityContainer`]}),V=j.XRp.createVertical([F,G,$,H],{isContainer:!0}),W=j.Gme.componentPickerGroup({id:`tier${B}FestivalCurrencyText`,labelValue:"Festival Currency Text",componentType:j.EYj,componentGuid:k[`tier${B}FestivalCurrencyText`]}),q=j.Gme.componentPickerGroup({id:`tier${B}AtSchoolFestivalCurrencyText`,labelValue:"At School Festival Currency Text",componentType:j.EYj,componentGuid:k[`tier${B}AtSchoolFestivalCurrencyText`]}),K=j.Gme.componentPickerGroup({id:`tier${B}FestivalCurrencyIcon`,labelValue:"Festival Currency Graphic",componentType:j.vYh,componentGuid:k[`tier${B}FestivalCurrencyIcon`]}),z=j.Gme.componentPickerGroup({id:`tier${B}FestivalCurrencyQuantityText`,labelValue:"Festival Currency Quantity Text",componentType:j.EYj,componentGuid:k[`tier${B}FestivalCurrencyQuantityText`]}),Y=j.XRp.createVertical([W,q,K,z],{isContainer:!0}),Q=j.Gme.componentPickerGroup({id:`bar${B}Bg`,labelValue:"Bg ColorTintFilter",componentType:Hp,componentGuid:k[`bar${B}Bg`]}),X=j.Gme.componentPickerGroup({id:`bar${B}Fill`,labelValue:"Fill ColorTintFilter",componentType:Hp,componentGuid:k[`bar${B}Fill`]}),Z=j.Gme.componentPickerGroup({id:`bar${B}ProgressBarOuter`,labelValue:"ProgressBarOuter ColorTintFilter",componentType:Hp,componentGuid:k[`bar${B}ProgressBarOuter`]}),J=j.Gme.componentPickerGroup({id:`bar${B}ProgressText`,labelValue:"ProgressText Text",componentType:j.EYj,componentGuid:k[`bar${B}ProgressText`]}),tt=j.XRp.createVertical([Q,X,Z,J],{isContainer:!0});return j.XRp.createVertical([U,V,Y,tt],{isContainer:!0,title:`Tier ${B}`,isCollapsible:!0,startCollapsed:!0})}}let Wp=class extends ad.b{constructor(){super(...arguments),this._strength=.5}initialize(){super.initialize();const k=new nd.N;k.brightness(this._strength,!1),this._filterList.push(k)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Wp.prototype,"_strength",void 0),Wp=(0,G.Cg)([(0,j.EVk)("BrightnessFilter",W.Y.effect)],Wp);let qp=class extends j.uAl{setup(k,B,U,F,j,$){return(0,G.sH)(this,void 0,void 0,(function*(){this._progressTask=k,this._claimTask=B,this._destroyMenuCallback=U,this._loadingObject=j,this.setupTierComponent(F,$)}))}setDefaults(){this._progressBar.GameObject.active=!0,this._timeBanner.active=!0,this._tierRewardDescription.GameObject.active=!0,this._lockedByQuest.active=!1,this._lockedByTime.active=!1,this._lockedOverlay.active=!1,this._lockBanner.active=!1,this._rewardClaimable.active=!1,this._rewardClaimableHand.active=!1,this._memberRewardGameObject.active=!1,this._memberTaskGameObject.active=!1,this._morphMarbleIcon.active=!1,this._tierRewardQuantityContainer.active=!1,this._tierCollectedLabel.active=!1,this._brightnessFilter.removeFilter(),this._brightnessFilter.GameObject.active=!1,this._rewardItemButton.onClick.removeAll(),this._itemCardButton.onClick.removeAll(),this.storyArrow.active=!1}setupTierComponent(k,B){var U,F,G,$,H,V,W,q;this.setDefaults(),(null===(U=this._progressTask.taskDefinition.metadata)||void 0===U?void 0:U.questGoalType)===Fp.xK.Story&&(this.storyArrow.active=!0);const K=null===($=null===(G=null===(F=this._claimTask)||void 0===F?void 0:F.taskDefinition.onComplete)||void 0===G?void 0:G.find((k=>"GotItem"===k.type)))||void 0===$?void 0:$.data.itemDrops[0],z=K?Yt.t.getItem(K.type,K.ID):null;if(z){this._brightnessFilter.GameObject.active=!0;const k=os.X.createImageLoadData(z);this._tierRewardImage.setAsset(k.source,k.frame).catch(j.RQr.createHandler("Unable to set image from asset data."));const B=z.data;this._tierBackgroundImage.setAsset(Ve._.Ui_battle_pass_json,Object.values(Es)[null!==(H=B.rarity)&&void 0!==H?H:0]).catch(j.RQr.createHandler("Unable to set rarity background from asset data.")),this._tierRewardQuantityContainer.active=!1,j.Aq$.isDefined(K.N)&&K.N>1&&(this._tierRewardQuantityText.text=`x${K.N}`,this._tierRewardQuantityContainer.active=!0),"item"===K.type&&K.ID&&_r.x.isMorphMarbleAsset(K.ID)&&(this._morphMarbleIcon.active=!0),B.member&&(this._memberRewardGameObject.active=!0),this._itemCardButton.onClick.add((()=>{tt.q.instance.prodigy.open.itemInfo(z)}))}this._progressTask.taskDefinition.metadata.isMemberLocked&&(this._memberTaskGameObject.active=!0);let Y=null!==(W=null===(V=this._progressTask.taskProgress.data)||void 0===V?void 0:V.progress)&&void 0!==W?W:0;const Q=this._progressTask.taskDefinition.completionRequirements.data.target;let X="Complete!";if(this._progressTask.taskProgress.status===pr.t.COMPLETE&&(Y=Q),this._progressBar.setFromValues(Y,Q,!1),this._storybookIcon.active=(null===(q=this._progressTask.taskDefinition.metadata)||void 0===q?void 0:q.questGoalType)===Fp.xK.Story,this._claimTask&&this._progressTask.taskProgress.status===pr.t.COMPLETE&&this._claimTask.taskProgress.status===pr.t.COMPLETE)X="Collected!",this._tierCollectedLabel.active=!0,this._timeBanner.active=!1,this._brightnessFilter.applyFilter();else if(this._claimTask&&this._progressTask.taskProgress.status===pr.t.COMPLETE){X="Complete!";const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(this._rewardClaimable.active=!0,this._progressBar.GameObject.active=!1,k.hasMembership()||!this._progressTask.taskDefinition.metadata.isMemberLocked)k.daily.viewedProgressMenu=!1,this.toggleRewardClaimableHand(B),this._rewardItemButton.useHandCursor=!0,this._rewardItemButton.onClick.add((()=>{X="Collected!",this.claimClick(k)}));else{const k={conversionFunnelName:en.o.FunnelFestivalMemberQuest};this._rewardItemButton.onClick.add((()=>{tt.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:`${this._progressTask.questID}-${this._progressTask.taskID}-ClaimButton`,category:"festival",contentId:this._progressTask.questID,adType:Fs.R.BattlePassUpsell}),tt.q.instance.prodigy.open.membershipInfo(void 0,k,"member-button")}))}}else if(this._progressTask.getTimeUntilUnlock()>Kt.A.DAY_IN_MS)this._memberRewardGameObject.active=!1,this._tierRewardDescription.GameObject.active=!1,this._lockedByQuest.active=!1,this._lockedByTime.active=!0,this._progressBar.GameObject.active=!1,this._timeBanner.active=!1,this._lockBanner.active=!1,this._lockedOverlay.active=!0,this._brightnessFilter.applyFilter();else{const B=this._progressTask.getTimeUntilUnlock();this._lockedByTime.active=B>0,this._lockedByQuest.active=k&&!this._lockedByTime.active,this._tierRewardDescription.GameObject.active=!this._lockedByTime.active&&!this._lockedByQuest.active,this._lockedOverlay.active=this._lockedByTime.active||this._lockedByQuest.active,this._lockBanner.active=this._lockedByTime.active||this._lockedByQuest.active,this._progressBar.GameObject.active=!this._lockedOverlay.active,this._timeBanner.active=!this._lockedOverlay.active,this._lockedOverlay.active&&(this._memberRewardGameObject.active=!1,this._brightnessFilter.applyFilter())}this._progressBar.onFilled.add((()=>{this._progressBar.setBarText(X)}))}claimClick(k){var B,U,F,G,$,H;this._festivalQuestManager.sendRewardClaimedEvent(this._claimTask.taskID).catch(j.RQr.createHandler("Failed to send reward claimed event.")),k.daily.viewedProgressMenu=!0,this._rewardItemButton.useHandCursor=!1,this._rewardItemButton.onClick.removeAll(),this._tierCollectedLabel.active=!0,this._rewardClaimable.active=!1,this.toggleRewardClaimableHand(!1,!0),this._progressBar.GameObject.active=!0;!1===(null===(F=null===(U=null===(B=this._claimTask)||void 0===B?void 0:B.taskDefinition.onComplete)||void 0===U?void 0:U.find((k=>k.type===yl.s.GOT_ITEM)))||void 0===F?void 0:F.data.showGotItem)?(null===(G=this._claimedAnimationAnimator)||void 0===G||G.playAnimation("generic",!1),this._claimedMovementBoneFollow.setup(),null===($=this._claimedMovementAnimator)||void 0===$||$.playAnimation("claim",!1)):this._destroyMenuCallback(),null===(H=this._claimAudioComponent)||void 0===H||H.play()}toggleRewardClaimableHand(k,B=!1){B&&this._rewardClaimableHand.active&&this._rewardClaimableHandNext&&this._rewardClaimableHandNext.toggleRewardClaimableHand(!0),this._rewardClaimableHand.active=k}setNextHand(k){this._rewardClaimableHandNext=k}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"storyArrow",void 0),(0,G.Cg)([(0,j.Cdj)("99d-5e9e"),(0,G.Sn)("design:type",Gp.q)],qp.prototype,"_festivalQuestManager",void 0),(0,G.Cg)([(0,j.MnK)(ys.z),(0,G.Sn)("design:type",ys.z)],qp.prototype,"_progressBar",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_tierCollectedLabel",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],qp.prototype,"_tierRewardDescription",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],qp.prototype,"_tierRewardImage",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],qp.prototype,"_tierBackgroundImage",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],qp.prototype,"_tierRewardQuantityText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_tierRewardQuantityContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_memberRewardGameObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_memberTaskGameObject",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],qp.prototype,"_rewardItemButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],qp.prototype,"_itemCardButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_rewardClaimable",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_rewardClaimableHand",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",qp)],qp.prototype,"_rewardClaimableHandNext",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_lockedByQuest",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_lockedByTime",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_lockedOverlay",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_timeBanner",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_lockBanner",void 0),(0,G.Cg)([(0,j.MnK)(Wp),(0,G.Sn)("design:type",Wp)],qp.prototype,"_brightnessFilter",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_morphMarbleIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],qp.prototype,"_storybookIcon",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],qp.prototype,"_claimedAnimationAnimator",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],qp.prototype,"_claimedMovementAnimator",void 0),(0,G.Cg)([(0,j.MnK)(rn.l),(0,G.Sn)("design:type",rn.l)],qp.prototype,"_claimedMovementBoneFollow",void 0),(0,G.Cg)([(0,j.MnK)(hn.J),(0,G.Sn)("design:type",hn.J)],qp.prototype,"_claimAudioComponent",void 0),qp=(0,G.Cg)([(0,j.EVk)("FestivalProgressTier",W.Y.festival)],qp);let Kp=class extends j.uAl{setup(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){this._progressTask=k,this._claimTask=B,this._destroyMenuCallback=U,this.setupTierComponent(F)}))}setDefaults(){this._lockedByQuest.active=!1,this._lockedByTime.active=!1,this._lockedBanner.active=!1}setupTierComponent(k){this.setDefaults();const B=this._progressTask.getTimeUntilUnlock();this._lockedByTime.active=B>0,this._lockedByQuest.active=k&&!this._lockedByTime.active,this._storyDescription.active=!this._lockedByTime.active&&!this._lockedByQuest.active,this._lockedBanner.active=this._lockedByTime.active||this._lockedByQuest.active}};var zp;(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Kp.prototype,"storyArrow",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Kp.prototype,"_lockedByQuest",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Kp.prototype,"_lockedByTime",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Kp.prototype,"_lockedBanner",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Kp.prototype,"_storyDescription",void 0),Kp=(0,G.Cg)([(0,j.EVk)("FestivalProgressTierStory",W.Y.festival)],Kp),function(k){k[k.Claimable=3]="Claimable",k[k.Available=2]="Available",k[k.Locked=1]="Locked",k[k.Claimed=0]="Claimed"}(zp||(zp={}));let Yp=class extends j.uAl{constructor(){super(...arguments),this.onChangeTab=new j.HN0,this.onChangeTabComplete=new j.HN0,this._progressTierPool=[],this._storyTierPool=[],this._coopTierPool=[],this._buildTiersVersion=0,this._storyTasks=[]}postCreate(){var k,B,U;super.postCreate();{this._localizer=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),this._festivalSchema=tt.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival();const F=tt.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig();if(!F)return j.VyI.log("Unable to retrieve Festival Config asset for menu setup. Closing menu.",j.$bb.Error),void this.GameObject.destroyDeferred();this._festivalConfig=F;const G=null===(k=this._toggleGroup)||void 0===k?void 0:k.getToggles(),$=null==G?void 0:G.find((k=>k.GameObject.active));$&&(null===(B=this._toggleGroup)||void 0===B||B.setDefaultSelectionIndex(G.indexOf($)),null===(U=this._toggleGroup)||void 0===U||U.setItemSelected($,!0),$.onSelected.dispatch())}}isTaskLocked(k,B){var U,F;if(k.getTimeUntilUnlock()>0)return!0;return[...k.getPrerequisites(),...null!==(F=null===(U=k.taskDefinition.metadata)||void 0===U?void 0:U.visualPrerequisites)&&void 0!==F?F:[]].some((k=>B.some((B=>B.taskDefinition.id===k&&B.taskProgress.status!==pr.t.COMPLETE))))}buildTiers(){return(0,G.sH)(this,arguments,void 0,(function*(k=!0,B=this._buildTiersVersion){var U;const F=this._festivalQuestManager.getProgressTasks();this._storyTasks=F.reduce(((k,B)=>{var U,F,G;return(null===(G=null===(F=null===(U=B.taskDefinition)||void 0===U?void 0:U.metadata)||void 0===F?void 0:F.storyMetadata)||void 0===G?void 0:G.storyImageGuid)&&k.push(B),k}),[]),this._progressTierPool.forEach((k=>{k.active=!1})),this._storyTierPool.forEach((k=>{k.active=!1})),this._coopTierPool.forEach((k=>{k.active=!1}));let G=0;const j=F.map(((k,B)=>{var U,j,$,H;let V=-1;if(null===(j=null===(U=k.taskDefinition)||void 0===U?void 0:U.metadata)||void 0===j?void 0:j.isHiddenQuest)return{progressTask:void 0,claimTask:void 0,priority:V};if((null===(H=null===($=k.taskDefinition)||void 0===$?void 0:$.metadata)||void 0===H?void 0:H.questGoalType)!==this._currentTab)return{progressTask:void 0,claimTask:void 0,priority:V};const W=this._festivalQuestManager.getClaimTask(k.taskID);return V=k.taskDefinition.metadata.sortPriority?k.taskDefinition.metadata.sortPriority:k.taskProgress.status===pr.t.COMPLETE&&W&&W.taskProgress.status===pr.t.COMPLETE?zp.Claimed:k.taskProgress.status===pr.t.COMPLETE?zp.Claimable:this.isTaskLocked(k,F)?zp.Locked:zp.Available,V>G&&(G=V),{progressTask:k,claimTask:W,priority:V}}));let $,H=!0;for(let V=G;V>=0;V-=1){const k=j.filter((k=>void 0!==k.progressTask&&k.priority===V));for(let G=0;GB.taskDefinition.id===rt[k]&&B.taskProgress.status!==pr.t.COMPLETE));if(void 0!==B){const k=null!==(q=null===(W=null===(V=B.taskDefinition.metadata)||void 0===V?void 0:V.questName)||void 0===W?void 0:W.toString())&&void 0!==q?q:B.taskID;ot=k.length>=_r.x.LONG_QUEST_NAME_CHAR_LENGTH?this._localizer.getText(_r.x.LONG_PREREQUISITE_TEXT_KEY,k):this._localizer.getText(_r.x.SHORT_PREREQUISITE_TEXT_KEY,k),ht++}}ht>1&&(ot=this._localizer.getText(_r.x.MULTIPLE_PREREQUISITES_TEXT_KEY));const ct=(null===(K=k.taskDefinition.metadata)||void 0===K?void 0:K.questGoalTaskType)===Fp.wD.STORY,dt=(null===(z=k.taskDefinition.metadata)||void 0===z?void 0:z.questGoalTaskType)===Fp.wD.COOP,lt=void 0!==(null===(Y=k.taskDefinition.metadata)||void 0===Y?void 0:Y.storyMetadata);let ut=Rt.l.FestivalProgressTier,ft=this._progressTierPool;ct?(ut=Rt.l.FestivalProgressStoryTier,ft=this._storyTierPool):dt&&(ut=Rt.l.FestivalCoopTier,ft=this._coopTierPool);let bt="";bt=lt?k.taskProgress.status===pr.t.COMPLETE?this._localizer.getText(_r.x.STORY_COMPLETE_TEXT_KEY):null===(X=null===(Q=k.taskDefinition.metadata)||void 0===Q?void 0:Q.storyMetadata)||void 0===X?void 0:X.storyDescription:yn.n.getQuestDescription(k.taskDefinition.completionRequirements.type,k.taskDefinition.completionRequirements.data.target,k.taskDefinition.localizationKey);const pt=this._storyTasks.filter((k=>k.taskProgress.status!==pr.t.COMPLETE));pt.length>0&&k===pt[0]&&(ot=null!==(Z=this.overrideQuestUnlockString(rt,F))&&void 0!==Z?Z:ot);let vt="";vt=nt>=0?this._localizer.getText(_r.x.DAYS_LEFT_TEXT_KEY,Math.ceil(nt/Kt.s.DAY_IN_MS)):at?this._localizer.getText("READY"):this._localizer.getText("");const gt={QUEST_DESCRIPTION:bt,TIMER_TEXT:nt>0?void 0:vt,TIMER_TEXT_VALUE:nt>0?nt:void 0,QUEST_UNLOCKS_IN:this.getQuestUnlockText(st),STORY_GRAPHIC:lt?null===(tt=null===(J=k.taskDefinition.metadata)||void 0===J?void 0:J.storyMetadata)||void 0===tt?void 0:tt.storyImageGuid:""};let mt=ft.find((k=>!k.active));if(mt)Nt.d.updateInjectedValues(mt,gt);else{if(mt=yield Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,ut,gt).catch(j.RQr.createHandler("Error creating a festival tier prefab")),this._buildTiersVersion!==H)return mt.active=!1,ft.push(mt),null;ft.push(mt)}const yt=mt.findComponent(qp);return ct?null===(et=mt.findComponent(Kp))||void 0===et||et.setup(k,B,(()=>this.GameObject.destroy()),(null==ot?void 0:ot.length)>0).catch(j.RQr.createHandler("Failed to setup story tier component.")):dt?null===(it=mt.findComponent($p))||void 0===it||it.setup(k,B,(()=>this.GameObject.destroy()),(null==ot?void 0:ot.length)>0).catch(j.RQr.createHandler("Failed to setup coop tier component.")):yt&&yt.setup(k,B,(()=>this.GameObject.destroy()),(null==ot?void 0:ot.length)>0,this._loadingObject,$).catch(j.RQr.createHandler("Failed to setup tier component.")),mt.active=!0,mt.name=`Festival Progress Tier ${k.taskID}`,[mt,yt]}))}setTaskProgressForTab(k){var B,U,F,G;if(k===Fp.xK.Story){const F=null===(B=this._festivalQuestManager)||void 0===B?void 0:B.getCompletedTaskCount(k,Fp.wD.STORY),G=null===(U=this._festivalQuestManager)||void 0===U?void 0:U.getStoryTaskCount();this._taskCompleteCounter.text=this._localizer.getText(_r.x.PROGRESS_STORY_KEY,F,G)}else{const B=null===(F=this._festivalQuestManager)||void 0===F?void 0:F.getCompletedTaskCount(k),U=null===(G=this._festivalQuestManager)||void 0===G?void 0:G.getProgressTaskCount(k);this._taskCompleteCounter.text=this._localizer.getText(_r.x.PROGRESS_COMPLETE_KEY,B,U)}}destroy(){++this._buildTiersVersion,[this._progressTierPool,this._storyTierPool,this._coopTierPool].forEach((k=>{k.forEach((k=>{k.parent||k.destroy()}))})),this.onChangeTab.dispose(),this.onChangeTabComplete.dispose(),super.destroy()}changeTab(k){this._currentTab=k,this.onChangeTab.dispatch(),this.setTaskProgressForTab(k),this.setTabNotifications(k),this._festivalQuestManager.markCompletedTasksSeen(k);const B=++this._buildTiersVersion;this.buildTiers(!0,B).then((()=>{this.gameObject&&!this.gameObject.isDestroyed&&(this._scrollViewRef.scrollToPercent(this.getTabScrollPercent(k)),this.onChangeTabComplete.dispatch())})).catch(j.RQr.createHandler("Failed to rebuild tiers for Festival Progress Menu when switching tabs."))}setTabNotifications(k){var B,U,F,G,j,$;const H=null===(B=this._festivalQuestManager)||void 0===B?void 0:B.getCachedFestivalQuestData(),V=this._activePlayer.hasMembership(),W={unclaimedQuestCount:0,unclaimedMemberCount:0,unclaimedNonMemberCount:0,unseenQuestCount:0,unseenMemberCount:0,unseenNonMemberCount:0},q=null!==(U=null==H?void 0:H.getUnclaimedQuestCount(Fp.xK.Story))&&void 0!==U?U:W,K=null!==(F=null==H?void 0:H.getUnclaimedQuestCount(Fp.xK.Season))&&void 0!==F?F:W,z=null!==(G=null==H?void 0:H.getUnclaimedQuestCount(Fp.xK.Rifts))&&void 0!==G?G:W,Y=null!==(j=null==H?void 0:H.getUnclaimedQuestCount(Fp.xK.Member))&&void 0!==j?j:W,Q=null!==($=null==H?void 0:H.getUnclaimedQuestCount(Fp.xK.Coop))&&void 0!==$?$:W;this._storyTabNotification.active=k!==Fp.xK.Story&&(V?q.unclaimedQuestCount:q.unclaimedNonMemberCount+q.unseenMemberCount)>0,this._seasonTabNotification.active=k!==Fp.xK.Season&&(V?K.unclaimedQuestCount:K.unclaimedNonMemberCount+K.unseenMemberCount)>0,this._riftsTabNotification.active=k!==Fp.xK.Rifts&&(V?z.unclaimedQuestCount:z.unclaimedNonMemberCount+z.unseenMemberCount)>0,this._memberTabNotification.active=k!==Fp.xK.Member&&(V?Y.unclaimedQuestCount:Y.unclaimedNonMemberCount+Y.unseenMemberCount)>0,this._coopTabNotification.active=k!==Fp.xK.Coop&&(V?Q.unclaimedQuestCount:Q.unclaimedNonMemberCount+Q.unseenMemberCount)>0}getTabScrollPercent(k){var B,U,F,G,$,H;let V=0,W=0,q=0,K=0,z=0,Y=0,Q=0,X=0,Z=0;const J=this._gridLayoutRef.columnSpacing,tt=this._scrollViewRef.GameObject.findComponent(j.XVE).widthDelta,et=this._tierCardContainer.findComponent(j.XVE).widthDelta-tt;let it=0,st=0;switch(k){case Fp.xK.Story:K=null===(B=this._festivalQuestManager)||void 0===B?void 0:B.getCompletedTaskCount(Fp.xK.Story,Fp.wD.STORY),Y=null===(U=this._festivalQuestManager)||void 0===U?void 0:U.getCompletedTaskCount(Fp.xK.Story,Fp.wD.GOAL,!0);const k=null!==(G=null===(F=this._tierCardContainer.children[0])||void 0===F?void 0:F.findComponent(Kp))&&void 0!==G?G:null===($=this._tierCardContainer.children[0])||void 0===$?void 0:$.findComponent(qp);k&&(k.storyArrow.active=!1);for(let B=0;B{const U=B.find((B=>B.taskID===k));return(null==U?void 0:U.taskProgress.status)===pr.t.COMPLETE})))return this._localizer.getText(_r.x.QUEST_LAMPLIGHT_PROMPT_KEY)}getQuestUnlockText(k){let B=this._localizer.getText(_r.x.FESTIVAL_QUEST_COMING_SOON_KEY);const U=jp.R.getNow(),F=new Date(U.getTime()+k),G=F.getDate()===U.getDate(),j=F.getDate()===U.getDate()+1;return Qt.J.isDateWithinSchoolHours(U)&&G?B=this._localizer.getText(_r.x.FESTIVAL_TIER_RETURN_TODAY_KEY):j&&(B=this._localizer.getText(_r.x.FESTIVAL_TIER_RETURN_TOMORROW_KEY)),B}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",F.$)],Yp.prototype,"_shopButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",F.$)],Yp.prototype,"_ctaButton",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Yp.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("99d-5e9e"),(0,G.Sn)("design:type",Gp.q)],Yp.prototype,"_festivalQuestManager",void 0),(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],Yp.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yp.prototype,"_tierCardContainer",void 0),(0,G.Cg)([(0,j.MnK)(j.Sz7),(0,G.Sn)("design:type",j.Sz7)],Yp.prototype,"_gridLayoutRef",void 0),(0,G.Cg)([(0,j.MnK)(Mt.C),(0,G.Sn)("design:type",Mt.C)],Yp.prototype,"_scrollViewRef",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yp.prototype,"_storyTabNotification",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yp.prototype,"_seasonTabNotification",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yp.prototype,"_riftsTabNotification",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yp.prototype,"_memberTabNotification",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yp.prototype,"_coopTabNotification",void 0),(0,G.Cg)([(0,j.MnK)(qs.O),(0,G.Sn)("design:type",qs.O)],Yp.prototype,"_toggleGroup",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Yp.prototype,"_taskCompleteCounter",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Yp.prototype,"_loadingObject",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Yp.prototype,"onChangeTab",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Yp.prototype,"onChangeTabComplete",void 0),Yp=(0,G.Cg)([(0,j.EVk)("FestivalProgressMenuSetup",W.Y.festival),(0,j.WR4)(Vp)],Yp);var Qp,Xp=U(94393),Zp=U(30065),Jp=U(65725);!function(k){k.PortalNonMemberSchool="PortalNonMemberSchool",k.PortalNonMemberHome="PortalNonMemberHome",k.PortalMember="PortalMember"}(Qp||(Qp={}));var tv=U(84415);let ev=class extends j.uAl{constructor(){super(...arguments),this._originType=ui.$N.ButtonClick,this.onOpen=new j.HN0}get prefabMenu(){return this._prefabMenu}openFestivalProgressMenu(){var k;this._prefabMenu=_r.x.openFestivalProgressMenu(this._originType,this._originID),null===(k=this._prefabMenu)||void 0===k||k.onPrefabLoaded.addOnce((k=>{this.onOpen.dispatch(k)}))}openFestivalAboutMenu(){var k;this._prefabMenu=_r.x.openFestivalAboutMenu(this._originType,this._originID),null===(k=this._prefabMenu)||void 0===k||k.onPrefabLoaded.addOnce((k=>{this.onOpen.dispatch(k)}))}updateViewedProgressMenu(){this._activePlayer.daily.viewedProgressMenu||(this._activePlayer.daily.viewedProgressMenu=!0,this._activePlayer.getDataAndClear(),this._activePlayer.forceSaveCharacter())}openFestivalStore(){var k;let B;switch(null===(k=this._weekendEvents.getActiveFestival())||void 0===k?void 0:k.type){case Zp.Q.Springfest:B=72;break;case Zp.Q.Summerfest:B=37;break;case Zp.Q.Pumpkinfest:B=14;break;case Zp.Q.Winterfest:B=15;break;case Zp.Q.StarlightFestival:B=13;break;case Zp.Q.MoonlightFestival:B=71;break;case Zp.Q.GenericFestival:B=70;break;default:j.RQr.createHandler("Could not find an About Menu prefab for the current active festival"),B=3}tt.q.instance.prodigy.open.store(B,void 0,void 0,{originType:ui.$N.ButtonClick})}openFestivalRoulette(k=0){var B,U;const F=null===(U=null===(B=this._weekendEvents.getFestivalConfig())||void 0===B?void 0:B.festivalDailyData)||void 0===U?void 0:U.festivalChestRouletteData;let G=[],j=[{type:"currency",ID:1,N:50}];F&&(G=this.processRewards(F[k].items),j=this.processRewards(F[k].fallbackItems)),tt.q.instance.prodigy.open.bossRewards(G,fi.N.FestivalChestRouletteSpin,Rt.l.FestivalChestRewardUI,void 0,j,void 0,void 0,void 0,void 0,{instanceId:this._activePlayer.daily.getFestivalInstanceName(),sourceType:li.C.FestivalBossLootWheel})}processRewards(k){return k.map((k=>Object.assign(Object.assign({},k),{isSecure:(0,Sr.p)(k.type,k.ID)}))).filter((k=>Jp.V.includes(k.type)||this._activePlayer.getItemCount(k.type,k.ID)<=0))}openFestivalPortalVideoPopup(k,B,U,F,G,$,H){var V,W,q,K;const z=tv.a.getMostRecentFeatureTimestamp(this._activePlayer,Object.keys(Qp));if(this._activePlayer.hasMembership()&&z>(null!==(W=null===(V=this._questManager.getCachedFestivalQuestData())||void 0===V?void 0:V.getStartDate())&&void 0!==W?W:0)){if(oh.A.isDefined(H))return void tt.q.instance.prodigy.open.prefabMenu({prefabID:H,isModal:!0});tt.q.instance.prodigy.world.it(k,B,U)}const Y=this._activePlayer.isPlayingAtSchool()||Qt.J.isDateWithinSchoolDayAndHours(new Date(Date.now()));let Q=Qp.PortalNonMemberHome;this._activePlayer.hasMembership()?Q=Qp.PortalMember:Y&&(Q=Qp.PortalNonMemberSchool);const X=null===(q=this._questManager.getCachedFestivalQuestData())||void 0===q?void 0:q.getVideoAsset(Q);if(!oh.A.isDefined(X))return void j.VyI.log(`No video asset defined for ${Q} when trying to open the portal video popup`,j.$bb.Error);const Z=ct.sample(Object.keys(X.data.videos));if(!oh.A.isDefined(Z))return void j.VyI.log("No video id defined when trying to open the portal video popup",j.$bb.Error);const J={type:us.B.FestivalPortalVideo,category:"festival",contentId:null,adType:Fs.R.Video};tt.q.instance.prodigy.open.prefabMenu({prefabID:Rt.l.FestivalPortalVideoPopup,runUpdate:!0,injectablePropertiesDictionary:{[hs.Ut.VideoId]:Z,[hs.Ut.VideoAtSchool]:Y,[hs.Ut.SupportedResolutionIds]:X.data.videos[Z].supportedResolutionIds,[hs.Ut.SizeRatio]:null===(K=X.metadata)||void 0===K?void 0:K.sizeRatio,[hs.Ut.VideoMember]:this._activePlayer.hasMembership(),[hs.Ut.FunnelStartTrigger]:J,[hs.V8.LoginDetailsUsername]:this._loggedInPlayer.loginCredentials.username,[hs.V8.LoginDetailsPassword]:this._loggedInPlayer.loginCredentials.password,[hs.Wr.HomeImageGuid]:$,[hs.Wr.MemberFollowupPrefabGuid]:H,[hs.Wr.MemberImageGuid]:F,[hs.Wr.OriginId]:this._originID,[hs.Wr.SchoolImageGuid]:G,[hs.Wr.TargetMapTag]:k,[hs.Wr.TargetPosition]:{x:B,y:U}}}),tv.a.saveTimestampData(Q)}destroy(){this.onOpen.dispose(),this._prefabMenu=void 0,super.destroy()}};var iv;(0,G.Cg)([(0,j.gfw)(ui.$N),(0,G.Sn)("design:type",String)],ev.prototype,"_originType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ev.prototype,"_originID",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ev.prototype,"onOpen",void 0),(0,G.Cg)([(0,Gi.b)("306-5359"),(0,G.Sn)("design:type",An.W)],ev.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,Gi.b)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],ev.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,Gi.b)("12b-405a"),(0,G.Sn)("design:type",Xp.n)],ev.prototype,"_weekendEvents",void 0),(0,G.Cg)([(0,Gi.b)("99d-5e9e"),(0,G.Sn)("design:type",Gp.q)],ev.prototype,"_questManager",void 0),ev=(0,G.Cg)([(0,j.EVk)("OpenFestivalMenu",W.Y.festival)],ev),function(k){k.Summerfest="summerfest",k.Springfest="springfest",k.Winterfest="winterfest",k.StarlightFestival="starlight-festival",k.Pumpkinfest="pumpkinfest-0"}(iv||(iv={}));let sv=class extends j.uAl{constructor(){super(...arguments),this.FESTIVAL_HUD_ICONS_MAP=new Map([[Zp.Q.Winterfest,iv.Winterfest],[Zp.Q.Springfest,iv.Springfest],[Zp.Q.Summerfest,iv.Summerfest],[Zp.Q.StarlightFestival,iv.StarlightFestival],[Zp.Q.Pumpkinfest,iv.Pumpkinfest],[Zp.Q.MoonlightFestival,iv.StarlightFestival],[Zp.Q.GenericFestival,iv.StarlightFestival]])}postCreate(){var k;let B;super.postCreate();{const U=null===(k=tt.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival())||void 0===k?void 0:k.type;if(!j.Aq$.isDefined(U))return;const F=this.FESTIVAL_HUD_ICONS_MAP.get(U);if(!j.Aq$.isDefined(F))return;B=F}this._upStateGraphic.updateAsset(Ve._.General_icons_hud_json,B),this._overStateGraphic.updateAsset(Ve._.General_icons_hud_json,B)}};(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],sv.prototype,"_upStateGraphic",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],sv.prototype,"_overStateGraphic",void 0),sv=(0,G.Cg)([(0,j.EVk)("SetFestivalHudIcon",W.Y.festival)],sv);let nv=class extends j.uAl{constructor(){super(...arguments),this.onFestivalActive=new j.HN0,this.onFestivalInactive=new j.HN0}create(){super.create(),this._runOnCreate&&this.processFestivalState()}processFestivalState(){const k=this._weekendEvents.getActiveFestival();oh.A.isDefined(k)?this._listenForSpecificFestival&&this._festivals.includes(k.type)?this.onFestivalActive.dispatch():this._listenForSpecificFestival?this.onFestivalInactive.dispatch():this.onFestivalActive.dispatch():this.onFestivalInactive.dispatch()}destroy(){this.onFestivalActive.dispose(),this.onFestivalInactive.dispose()}};(0,G.Cg)([(0,j.Cdj)("12b-405a"),(0,G.Sn)("design:type",Xp.n)],nv.prototype,"_weekendEvents",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nv.prototype,"onFestivalActive",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nv.prototype,"onFestivalInactive",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],nv.prototype,"_runOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],nv.prototype,"_listenForSpecificFestival",void 0),(0,G.Cg)([(0,j.gfw)(Zp.Q),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],nv.prototype,"_festivals",void 0),nv=(0,G.Cg)([(0,j.EVk)("FestivalListener",W.Y.festival)],nv);let av=class extends j.uAl{create(){super.create();{const k=[this._spineAnimator];this._animationController.setAnimationState(0,new Nn(k,"idle")),this._animationController.setAnimationState(1,new Nn(k,"walk"))}}destroy(){this._animationController=null,this._spineAnimator=null,super.destroy()}};(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],av.prototype,"_animationController",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],av.prototype,"_spineAnimator",void 0),av=(0,G.Cg)([(0,j.EVk)("SpineFollowAnimationStates",W.Y.follow)],av);let rv=class extends j.uAl{constructor(){super(...arguments),this._followSpine=null,this._followID=null}get followID(){return this._followID}create(){super.create(),null!==this._followID&&this._followSpine&&this.updateFollowSpine()}destroy(){this._followSpine=null,super.destroy()}setFollowID(k){this._followID=k,this.updateFollowSpine()}updateFollowSpine(){(0,ut.v)(null!==this._followID&&this._followID>0,"Invalid follow ID was loaded");const k=Yt.t.getItem("follow",this._followID).metadata.assets.default;(0,ut.v)("spine"===k.type,`Invalid spine follow data for ID: ${this._followID}`),this._followSpine.setAsset(`spine-${k.ID}`)}};(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],rv.prototype,"_followSpine",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],rv.prototype,"_followID",void 0),rv=(0,G.Cg)([(0,j.EVk)("SpineFollowAppearance",W.Y.follow)],rv);var ov=U(55800),hv=U(80573);let cv=class extends j.uAl{create(){super.create(),this._legacyFollowAppearance.onFollowLoaded.add(this.mapMorphedAppearanceData,this)}destroy(){this._legacyFollowAppearance.onFollowLoaded.remove(this.mapMorphedAppearanceData,this),super.destroy()}mapMorphedAppearanceData(){const k=this._legacyFollowAppearance.followParent;this._morphedAppearance.appearanceRenderComponent=k.findComponentInChildren(Za.B),this._morphedAppearance.animationController=k.findComponentInChildren(Rn.K)}};(0,G.Cg)([(0,j.MnK)(hv.n),(0,G.Sn)("design:type",hv.n)],cv.prototype,"_morphedAppearance",void 0),(0,G.Cg)([(0,j.MnK)(ov.a),(0,G.Sn)("design:type",ov.a)],cv.prototype,"_legacyFollowAppearance",void 0),cv=(0,G.Cg)([(0,j.EVk)("MorphedLegacyFollow",W.Y.follow)],cv);let dv=class extends j.uAl{create(){super.create(),this._legacyAppearanceLoader.onFollowLoaded.add(this.legacyAppearanceWasLoaded,this)}destroy(){this._legacyAppearanceLoader.onFollowLoaded.remove(this.legacyAppearanceWasLoaded,this),this._boundAnimationController&&(this._pathLocomotion.onPathStart.remove(this._boundAnimationController.changeState,this._boundAnimationController),this._pathLocomotion.onPathEnd.remove(this._boundAnimationController.changeState,this._boundAnimationController),this._boundAnimationController=null),this._legacyAppearanceLoader=null,this._pathLocomotion=null,super.destroy()}legacyAppearanceWasLoaded(){this._boundAnimationController=this._legacyAppearanceLoader.followParent.findComponentInChildren(Rn.K),(0,ut.v)(null!==this._boundAnimationController,"No animation controller found in follow prefab"),this._boundAnimationController.changeState(0),this._pathLocomotion.onPathStart.add(this._boundAnimationController.changeState,this._boundAnimationController,0,1),this._pathLocomotion.onPathEnd.add(this._boundAnimationController.changeState,this._boundAnimationController,0,0)}};(0,G.Cg)([(0,j.MnK)(ov.a),(0,G.Sn)("design:type",ov.a)],dv.prototype,"_legacyAppearanceLoader",void 0),(0,G.Cg)([(0,j.MnK)(j.KhP),(0,G.Sn)("design:type",j.KhP)],dv.prototype,"_pathLocomotion",void 0),dv=(0,G.Cg)([(0,j.EVk)("LegacyFollowAnimationBinding",W.Y.follow)],dv);class lv extends Mn{constructor(k,B){super(),this._animationData=null,this._animationTargets=null,this._bindPosition={},this._frameElapsedCache={},this._animationData=B,this._animationTargets=Object.assign({},k);const U=Object.keys(this._animationTargets),F=U.length;for(let G=0;GH.interval){const k=Math.floor(V.elapsed/H.interval);V.frame+=k,V.elapsed-=H.interval*k;const U=H.frames.length,F=U-1;if(this._animationData.loop){if(V.frame>F){const k=Math.floor(V.frame/U);V.frame-=k*U}}else V.frame>F&&(V.frame=F);this.updateGameObjectTargetProperty(B,j,H.frames[V.frame])}}}updateGameObjectTargetProperty(k,B,U){const F=this._animationTargets[k];switch((0,ut.v)(null!==F,"No animation target found for key frame animation"),B){case"x":{const B=F.transform;B.setPosition(this._bindPosition[k].position.x+U,B.localPosition.y);break}case"y":{const B=F.transform;B.setPosition(B.localPosition.x,this._bindPosition[k].position.y+U);break}case"xScale":{const k=F.transform;k.setScale(U,k.localScale.y);break}case"yScale":{const k=F.transform;k.setScale(k.localScale.x,U);break}case"angle":F.transform.setRotation(U);break;case"visible":F.active=U;break;case"frameName":F.findComponentInChildren(Ke._).setFrameName(U)}}isAnimationComplete(){const k=Object.keys(this._frameElapsedCache),B=k.length;for(let U=0;Uk.replace(B,U))))}}return F}}let fv=class extends uv{create(){super.create();const k=this.processAnimationData(U(88505),"{rodentTag}",this._rodentTag),B={body:this._rodentBody,legs:this._rodentLegs};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fv.prototype,"_rodentBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fv.prototype,"_rodentLegs",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],fv.prototype,"_rodentTag",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],fv.prototype,"_animationController",void 0),fv=(0,G.Cg)([(0,j.EVk)("RodentAnimationStates",W.Y.followAnimationState)],fv);let bv=class extends uv{create(){super.create();const k=this.processAnimationData(U(48687),"{catTag}",this._catTag),B={body:this._catBody,legs:this._catLegs,tail:this._catTail};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],bv.prototype,"_catBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],bv.prototype,"_catLegs",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],bv.prototype,"_catTail",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],bv.prototype,"_catTag",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],bv.prototype,"_animationController",void 0),bv=(0,G.Cg)([(0,j.EVk)("CatAnimationStates",W.Y.followAnimationState)],bv);let pv=class extends uv{create(){super.create();const k=this.processAnimationData(U(24625),"{dogTag}",this._dogTag),B={body:this._dogBody,legs:this._dogLegs,tail:this._dogTail};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],pv.prototype,"_dogBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],pv.prototype,"_dogLegs",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],pv.prototype,"_dogTail",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],pv.prototype,"_dogTag",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],pv.prototype,"_animationController",void 0),pv=(0,G.Cg)([(0,j.EVk)("DogAnimationStates",W.Y.followAnimationState)],pv);let vv=class extends uv{create(){super.create();const k=this.processAnimationData(U(77628),"{birdTag}",this._birdTag),B={body:this._birdBody};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],vv.prototype,"_birdBody",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],vv.prototype,"_birdTag",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],vv.prototype,"_animationController",void 0),vv=(0,G.Cg)([(0,j.EVk)("BirdAnimationStates",W.Y.followAnimationState)],vv);let gv=class extends uv{create(){super.create();const k=this.processAnimationData(U(22967),"{lizardTag}",this._lizardTag),B={body:this._lizardBody,head:this._lizardHead,tail:this._lizardTail};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gv.prototype,"_lizardBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gv.prototype,"_lizardHead",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gv.prototype,"_lizardTail",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],gv.prototype,"_lizardTag",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],gv.prototype,"_animationController",void 0),gv=(0,G.Cg)([(0,j.EVk)("LizardAnimationStates",W.Y.followAnimationState)],gv);let mv=class extends uv{create(){super.create();const k=this.processAnimationData(U(43081),"{turtleTag}",this._turtleTag),B={body:this._turtleBody,legs:this._turtleLegs};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],mv.prototype,"_turtleBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],mv.prototype,"_turtleLegs",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],mv.prototype,"_turtleTag",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],mv.prototype,"_animationController",void 0),mv=(0,G.Cg)([(0,j.EVk)("TurtleAnimationStates",W.Y.followAnimationState)],mv);let yv=class extends j.uAl{create(){super.create();const k=U(45221),B={body:this._reindeerBody,legs:this._reindeerLegs,tail:this._reindeerTail};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],yv.prototype,"_reindeerBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],yv.prototype,"_reindeerLegs",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],yv.prototype,"_reindeerTail",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],yv.prototype,"_animationController",void 0),yv=(0,G.Cg)([(0,j.EVk)("ReindeerAnimationStates",W.Y.followAnimationState)],yv);let _v=class extends j.uAl{create(){super.create();const k=U(11475),B={body:this._penguinBody,head:this._penguinHead};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_v.prototype,"_penguinBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_v.prototype,"_penguinHead",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],_v.prototype,"_animationController",void 0),_v=(0,G.Cg)([(0,j.EVk)("PenguinAnimationStates",W.Y.followAnimationState)],_v);let Ev=class extends j.uAl{create(){super.create();const k=U(35002),B={body:this._snowmanBody,head:this._snowmanHead};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ev.prototype,"_snowmanBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ev.prototype,"_snowmanHead",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Ev.prototype,"_animationController",void 0),Ev=(0,G.Cg)([(0,j.EVk)("SnowmanAnimationStates",W.Y.followAnimationState)],Ev);let wv=class extends j.uAl{create(){super.create();const k=U(67987),B={body:this._pandaBody};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],wv.prototype,"_pandaBody",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],wv.prototype,"_animationController",void 0),wv=(0,G.Cg)([(0,j.EVk)("PandaAnimationStates",W.Y.followAnimationState)],wv);let Tv=class extends j.uAl{create(){super.create();const k=U(43168),B={body:this._sheepBody,legs:this._sheepLegs};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Tv.prototype,"_sheepBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Tv.prototype,"_sheepLegs",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Tv.prototype,"_animationController",void 0),Tv=(0,G.Cg)([(0,j.EVk)("SheepAnimationStates",W.Y.followAnimationState)],Tv);let Sv=class extends j.uAl{create(){super.create();const k=U(60296),B={body:this._cactusBody,head:this._cactusFlower};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Sv.prototype,"_cactusBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Sv.prototype,"_cactusFlower",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Sv.prototype,"_animationController",void 0),Sv=(0,G.Cg)([(0,j.EVk)("CactusAnimationStates",W.Y.followAnimationState)],Sv);let Av=class extends j.uAl{create(){super.create();const k=U(85218),B={body:this._foxBody,legs:this._foxLegs,tail:this._foxTail};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Av.prototype,"_foxBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Av.prototype,"_foxLegs",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Av.prototype,"_foxTail",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Av.prototype,"_animationController",void 0),Av=(0,G.Cg)([(0,j.EVk)("FoxAnimationStates",W.Y.followAnimationState)],Av);let Cv=class extends j.uAl{create(){super.create();const k=U(98179),B={body:this._rodentBody};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Cv.prototype,"_rodentBody",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Cv.prototype,"_animationController",void 0),Cv=(0,G.Cg)([(0,j.EVk)("SparkleRodentAnimationStates",W.Y.followAnimationState)],Cv);let Ov=class extends j.uAl{create(){super.create();const k=U(74109),B={body:this._catBody,legs:this._catLegs,tail:this._catTail};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ov.prototype,"_catBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ov.prototype,"_catLegs",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ov.prototype,"_catTail",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Ov.prototype,"_animationController",void 0),Ov=(0,G.Cg)([(0,j.EVk)("SparkleCatAnimationStates",W.Y.followAnimationState)],Ov);let Iv=class extends j.uAl{create(){super.create();const k=U(67131),B={body:this._dogBody,legs:this._dogLegs,tail:this._dogTail};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Iv.prototype,"_dogBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Iv.prototype,"_dogLegs",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Iv.prototype,"_dogTail",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Iv.prototype,"_animationController",void 0),Iv=(0,G.Cg)([(0,j.EVk)("SparkleDogAnimationStates",W.Y.followAnimationState)],Iv);let Dv=class extends uv{create(){super.create();const k=U(57131),B={body:this._lizardBody,head:this._lizardHead,tail:this._lizardTail};this._animationController.setAnimationState(0,new lv(B,k.idle)),this._animationController.setAnimationState(1,new lv(B,k.walk))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Dv.prototype,"_lizardBody",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Dv.prototype,"_lizardHead",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Dv.prototype,"_lizardTail",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],Dv.prototype,"_animationController",void 0),Dv=(0,G.Cg)([(0,j.EVk)("FireLizardAnimationStates",W.Y.followAnimationState)],Dv);let Rv=class extends j.uAl{constructor(){super(...arguments),this._lastKnownFollowID=null,this._lastKnownPetTeam=null}create(){super.create(),this.checkFollowUpdates=this.checkFollowUpdates.bind(this),this._lastKnownFollowID=this._currentPlayer.player.equipment.getFollow(),this._lastKnownPetTeam=this._currentPlayer.player.kennel.getPetTeamIDs();const k=tt.q.instance.game.broadcaster;k.addAppListener(jn.J8.PlayerEditingMenuClosed,this.checkFollowUpdates,this),k.addAppListener(jn.J8.PlayerAppearanceUpdated,this.checkFollowUpdates,this)}destroy(){const k=tt.q.instance.game.broadcaster;k.removeAppListener(jn.J8.PlayerEditingMenuClosed,this),k.removeAppListener(jn.J8.PlayerAppearanceUpdated,this),this._playerFollowLoader=null,super.destroy()}checkFollowUpdates(){let k=!1;const B=this._currentPlayer.player.equipment.getFollow();B!==this._lastKnownFollowID&&(k=!0);const U=this._currentPlayer.player.kennel.getPetTeamIDs();if(!k){const B=U.length;if(B!==this._lastKnownPetTeam.length)k=!0;else for(let F=0;F0,G="prodigy"===B.userDataPlatform,j=U.getValue("showClassCodeOnLogin",!1)&&!this.isClassCodeUpdateOnCooldown(),$=U.getValue("showClassCodeOnLoginIfNotInAClass",!1)&&!F,H=null===(k=U.getClassCodePromptCurriculumBlacklist())||void 0===k?void 0:k.includes(B.educationData.curriculumTreeID),V=(j||$)&&G&&!H;this.showClassCodeScreen(V,F)}isClassCodeUpdateOnCooldown(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!j.Aq$.isDefined(k.data.classCodeUpdateTimestamp))return!1;const B=new Date(k.data.classCodeUpdateTimestamp).getFullYear(),U=new Date(k.data.classCodeUpdateTimestamp).getMonth(),F=new Date(k.data.classCodeUpdateTimestamp).getDate();let G;G=U>xv.b.CLASSCODE_COOLDOWN_MONTH||U===xv.b.CLASSCODE_COOLDOWN_MONTH&&F>=xv.b.CLASSCODE_COOLDOWN_DATE?new Date(B+1,xv.b.CLASSCODE_COOLDOWN_MONTH,xv.b.CLASSCODE_COOLDOWN_DATE):new Date(B,xv.b.CLASSCODE_COOLDOWN_MONTH,xv.b.CLASSCODE_COOLDOWN_DATE);const $=G.getTime();return Date.now()<$}showClassCodeScreen(k,B){const U=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(k&&(!j.Aq$.isDefined(U.data.classCodeUpdateTimestamp)&&B&&(U.data.classCodeUpdateTimestamp=Date.now()-31536e6,U.updated=!0),this.updateButton.onClick.add(this.showClassCodeDialog.bind(this)),this.setClassCodeMenuActive(!0)),j.Aq$.isDefined(U.owners))for(let F=0;F=Mv.CLASS_CODE_CHECK_DATE)return void this.setNextButtonHandGuideActive(!0)}}showClassCodeDialog(){tt.q.instance.prodigy.open.prefabMenu(Rt.l.ClassCodePopup,void 0,void 0,void 0,void 0,{[hs.iu.ClassCodeSubmitSuccess]:this.setClassCodeMenuActive.bind(this,!1)})}setClassCodeMenuActive(k){this._classCodeContainer.active=k}setNextButtonHandGuideActive(k){this._nextButtonHandGuideContainer.active=k}};Lv.CLASS_CODE_CHECK_DATE=143801786e4,(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Lv.prototype,"_classCodeContainer",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],Lv.prototype,"updateButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Lv.prototype,"_nextButtonHandGuideContainer",void 0),(0,G.Cg)([(0,j.Cdj)("2a1-fed9"),(0,G.Sn)("design:type",Nv.U)],Lv.prototype,"_metricsManager",void 0),Lv=Mv=(0,G.Cg)([(0,j.EVk)("CharacterSelectScreenManager",W.Y.uiDialog)],Lv);U(4035),U(32259);let kv=class extends j.uAl{constructor(){super(...arguments),this._dialogueIds=[],this._finalButtonLocalizationKey=null,this.onDialogueAdvanced=new j.HN0,this.onDialogueClosed=new j.HN0,this._blockInputDuringDialogue=!0,this.reenableInputOnClose=!0,this.clearExistingDialogue=!0}start(){this._dialogueIds.forEach(((k,B)=>{this._dialogueEventController.addEvents([{dialogueData:this._dialogueEventController.dataProvider.get(k),blockInput:this._blockInputDuringDialogue,nextButtonText:this._finalButtonLocalizationKey&&B===this._dialogueIds.length-1?tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(this._finalButtonLocalizationKey):null}])})),this._dialogueEventController.onAdvance.add(this.onDialogueAdvanced.dispatch,this.onDialogueAdvanced),this._dialogueEventController.start(!0,(()=>{this.onDialogueClosed.dispatch(),this._dialogueEventController.onAdvance.remove(this.onDialogueAdvanced.dispatch,this.onDialogueAdvanced)}),this.reenableInputOnClose,this.clearExistingDialogue)}setDialogueIds(k){this._dialogueIds=Array.isArray(k)?k:[k]}destroy(){this.onDialogueClosed.dispose(),this.onDialogueAdvanced.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("b5b-6fa4"),(0,G.Sn)("design:type",mi.rD)],kv.prototype,"_dialogueEventController",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.g11)(),(0,G.Sn)("design:type",Array)],kv.prototype,"_dialogueIds",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],kv.prototype,"_finalButtonLocalizationKey",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],kv.prototype,"onDialogueAdvanced",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],kv.prototype,"onDialogueClosed",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],kv.prototype,"_blockInputDuringDialogue",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],kv.prototype,"reenableInputOnClose",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],kv.prototype,"clearExistingDialogue",void 0),kv=(0,G.Cg)([(0,j.EVk)("DialogueEventController",W.Y.uiDialog)],kv);let Bv=class extends j.uAl{constructor(){super(...arguments),this._tooltipSchema={bodyText:""},this.onComplete=new j.HN0}displayTooltip(){const k=tt.q.instance.prodigy.open.overlayToolTip(on.A.TOOLTIP_SPEECH,{bodyText:this._displayText.localizedText.text,xPosition:this._tooltipSchema.xPosition,yPosition:this._tooltipSchema.yPosition,arrowXRelPos:this._tooltipSchema.arrowXRelPos,arrowYRelPos:this._tooltipSchema.arrowYRelPos,arrowDirection:parseInt(this._tooltipSchema.arrowDirection)});this._onCompleteHandler=()=>{this.onComplete.dispatch()},k.onDismissalClick.add(this._onCompleteHandler,this)}destroy(){this.onComplete.dispose(),this._onCompleteHandler=null,super.destroy()}};(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],Bv.prototype,"_displayText",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],Bv.prototype,"_tooltipSchema",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Bv.prototype,"onComplete",void 0),Bv=(0,G.Cg)([(0,j.EVk)("DisplayTooltipOverlay",W.Y.uiDialog)],Bv);var Uv=U(89067);class Fv extends j.uAl{constructor(){super(...arguments),this.onAnimationEnded=new j.HN0,this.onAnimationStarted=new j.HN0}create(){super.create(),this._broadcaster=tt.q.instance.game.broadcaster}animate(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this.hudButtonType();this.onAnimationStarted.dispatch(!0),this._broadcaster.broadcast(jn.Y1.HUDAttentionManagerUpdated,void 0,[k,!0,void 0])}))}createWidget(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=!1){const U=this.hudButtonType();this._broadcaster.broadcast(jn.Y1.HUDAttentionManagerUpdated,void 0,[U,B,k])}))}destroy(){this.onAnimationEnded.dispose(),this.onAnimationStarted.dispose(),super.destroy()}}(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Fv.prototype,"onAnimationEnded",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Fv.prototype,"onAnimationStarted",void 0);let Gv=class extends Fv{constructor(){super(...arguments),this._hudButtonType=Uv.ts.AfterSchoolWidget}needsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){return tt.q.instance.prodigy.gameContainer.get("e94-c727").isFtueAvailable()}))}highlightButton(){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.game.broadcaster.broadcast(jn.Y1.HUDRevampButtonAttentionGranted,void 0,[this._hudButtonType]),yield this.animate()}))}hudButtonType(){return this._hudButtonType}triggerAction(k){return(0,G.sH)(this,void 0,void 0,(function*(){yield k()}))}};Gv=(0,G.Cg)([(0,j.EVk)("HudAfterSchoolWidget",W.Y.uiHudManager)],Gv);var jv,$v=U(96703),Hv=U(85985),Vv=U(41012),Wv=U(29546);function qv(){const k=tt.q.instance.prodigy,B=k.world.getZone(k.world.getCurrentZone()).screen,U=k.gameContainer.get("306-5359"),F=null==B?void 0:B.saveTag.split("-").pop();return U.userID.toString()===F}function Kv(k){const B=tt.q.instance.prodigy;B.gameContainer.get("306-5359").setAllowsHouseVisitors(k),B.open.messageBoxPrefab({text:k?"HOUSE_VISITING_UNLOCKED":"HOUSE_VISITING_LOCKED"}),tt.q.instance.game.broadcaster.broadcast(jn.Y1.HUDRevampButtonVisibilityRefreshRequested)}class zv{static openAndWait(k){return(0,G.sH)(this,void 0,void 0,(function*(){return new Promise((B=>k(B)))}))}static openWizardBank(){(0,Bt.G)(qt.d).enabled?tt.q.instance.prodigy.open.openWizardBank({originType:ui.$N.ButtonClick,originId:Is.k.MemberHudButton}):this.openMLP()}static openMLP(){const k=this._activePlayer.getMemberTier();if(k===xs._$.MemberUltra)return;if(!Gs.pF.eligibleForMembershipPurchaseForMultipleTiers()&&(k===xs._$.MemberPlus||k===xs._$.MemberUltimateMath))return;this._segment.purchase.sendFunnelStart({type:"Click-HUD-Button",category:"HUD",contentId:tt.q.instance.prodigy.world.getCurrentMap(),adType:Fs.R.UnifiedConversionFlow,adVersion:Us.P.getAdVersionFromTriggerCategory("HUD")});tt.q.instance.prodigy.open.unifiedConversionFlow(void 0,{conversionFunnelName:"Click-HUD-Button"})||tt.q.instance.prodigy.open.battlePassUltimateMemberUpsellModal().catch(j.RQr.createHandler("HUDMembershipButtonComponent: Could not open MLP."))}static openDailyLoginCalendar(k){tt.q.instance.prodigy.open.dailyLoginCalendar().catch(j.RQr.createHandler("HudButtonUtils: Could not open Daily Login Calendar")).finally(k)}static openChat(){const k=tt.q.instance.game,B=tt.q.instance.prodigy;k.broadcaster.broadcast(jn.Y1.HideHUD,jn.HG.HUD),B.open.chat(k.broadcaster.broadcast.bind(k.broadcaster,jn.Y1.ShowHUD,jn.HG.HUD))}static areVisibilityConditionsTrue(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U;const F=null!==(U=null===(B=jv.BUTTON_DATA[k])||void 0===B?void 0:B.visibilityConditions)&&void 0!==U?U:[Uv.qe.Always],j=yield Promise.all(F.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return this.isHudButtonConditionMet(k)})))));return F.every(((k,B)=>!0===j[B]))}))}static getButtonEnabledConditionsResult(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U;const F=null!==(U=null===(B=jv.BUTTON_DATA[k])||void 0===B?void 0:B.enabledConditions)&&void 0!==U?U:[Uv.qe.Always],j=yield Promise.all(F.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return this.isHudButtonConditionMet(k)}))))),$=F.filter(((k,B)=>!j[B]));return[0===$.length,$]}))}static isHudButtonConditionMet(k){return(0,G.sH)(this,void 0,void 0,(function*(){switch(k){case Uv.qe.AtHome:{const k=tt.q.instance.game.state.get(Tt.G.TileScreen);return oh.A.isDefined(null==k?void 0:k.zoneName)&&mc.P.isHouse(k.zoneName)&&qv()}case Uv.qe.AtAnotherHome:{const k=tt.q.instance.game.state.get(Tt.G.TileScreen);return oh.A.isDefined(null==k?void 0:k.zoneName)&&mc.P.isHouse(k.zoneName)&&!qv()}case Uv.qe.NotHome:{const k=tt.q.instance.game.state.get(Tt.G.TileScreen);return oh.A.isDefined(null==k?void 0:k.zoneName)&&!mc.P.isHouse(k.zoneName)}case Uv.qe.HomeVisitsAllowed:return this._activePlayer.getAllowsHouseVisitors();case Uv.qe.HomeVisitsNotAllowed:return!this._activePlayer.getAllowsHouseVisitors();case Uv.qe.NonMember:return this._activePlayer.getMemberTier()===xs._$.NonMember;case Uv.qe.CoreMember:{const k=this._activePlayer.getMemberTier();return k===xs._$.MemberCore||k===xs._$.MemberLevelUp}case Uv.qe.PlusMember:{const k=this._activePlayer.getMemberTier();return k===xs._$.MemberPlus||k===xs._$.MemberUltimateMath}case Uv.qe.UltraMember:{const k=this._activePlayer.getMemberTier();return k===xs._$.MemberUltra||k===xs._$.MemberUltimateBundle}case Uv.qe.FestivalActive:return oh.A.isDefined(tt.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig());case Uv.qe.FestivalUnlocked:return tt.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirements(69);case Uv.qe.ValidStateChallenge:return tt.q.instance.prodigy.gameContainer.get("a94-4ba3").isFeatureAvailable();case Uv.qe.StateChallengeActiveOrCanCollectRewards:return tt.q.instance.prodigy.gameContainer.get("a94-4ba3").hasActiveChallengeOrRewards();case Uv.qe.AfterSchoolWidgetEnabled:return!0===(0,Bt.G)($v.K).enabled;case Uv.qe.DailyLoginCalendarEnabled:return Hv.J.showDailyLoginCalendar();case Uv.qe.DailyLoginCalendarUnlocked:return cr.M.hasDailyLoginCalendarAccess();case Uv.qe.WizardWatchUnlocked:return Vv.e.hasWizardWatchAccess();case Uv.qe.PlayerGoalsEnabled:return!(0,Bt.G)(Zr.d3).enabled;case Uv.qe.TreasureTrackUnlocked:return yn.n.hasBattlePassAccess();case Uv.qe.EnglishOnly:return It.O.isEnglishLocale();case Uv.qe.Always:default:return!0}}))}static getDisabledTooltipText(k,B){const U=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);switch(B[0]){case Uv.qe.TreasureTrackUnlocked:{const F=this.getValueForFeatureRequirement(k,B);return oh.A.isDefined(F)?U.getText("REACH_LEVEL_X_TO_UNLOCK",F):U.getText("HUD_BUTTON_UNAVAILABLE")}case Uv.qe.FestivalUnlocked:{const F=this.getValueForFeatureRequirement(k,B),G=tt.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig();if(oh.A.isDefined(F)&&oh.A.isDefined(G)){const k=U.getText(G.tintableBanner.titleText);return U.getText("FESTIVAL_UNLOCKS_AT_LEVEL",k,F)}return U.getText("HUD_BUTTON_UNAVAILABLE")}default:return U.getText("HUD_BUTTON_UNAVAILABLE")}}static getDisabledButtonLabelText(k,B){const U=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);switch(B[0]){case Uv.qe.TreasureTrackUnlocked:case Uv.qe.FestivalUnlocked:{const F=this.getValueForFeatureRequirement(k,B);return oh.A.isDefined(F)?U.getText("LEVEL_X",F):U.getText("ITEMCARD_LOCKED")}default:return U.getText("ITEMCARD_LOCKED")}}static getValueForFeatureRequirement(k,B){switch(B[0]){case Uv.qe.TreasureTrackUnlocked:return Wv.X.getLevelRequirement(70);case Uv.qe.FestivalUnlocked:return Wv.X.getLevelRequirement(69);default:return}}static getButtonTooltipDirection(k){switch(k){case Uv.yR.Liveops:return ze.i.RIGHT;default:return ze.i.DOWN}}}jv=zv,zv.BUTTON_DATA={[Uv.ts.AfterSchoolWidget]:{iconProvider:k=>"a4b76834-dd0e-49df-984a-d33fe014f383",onClick:()=>{tt.q.instance.prodigy.gameContainer.get("e94-c727").openAfterSchoolWidgetRewardsScreenFromHud()},buttonSize:Uv.Cy.Normal,visibilityConditions:[Uv.qe.AfterSchoolWidgetEnabled],analyticsProperties:{interfaceName:us.B.HUD,buttonName:"after-school-widget-button",destinationName:"after_school_widget_rewards_screen"}},[Uv.ts.Backpack]:{iconProvider:k=>"932d246b-c406-4781-81dc-f4761ceb97b9",onClick:()=>{tt.q.instance.prodigy.open.backpack()},visibilityConditions:[Uv.qe.NotHome],analyticsProperties:{buttonName:"backpack-button"}},[Uv.ts.Chat]:{iconProvider:k=>"097bf81a-9354-4837-a7fd-5d07463e8809",onClick:()=>jv.openChat(),analyticsProperties:{buttonName:"chat-button"}},[Uv.ts.Challenges]:{iconProvider:k=>"123a9839-b689-4fa8-bf6c-4cb850c18ec6",onClick:()=>tt.q.instance.prodigy.open.social(),visibilityConditions:[Uv.qe.NotHome,Uv.qe.EnglishOnly],analyticsProperties:{buttonName:"social-button",destinationName:"social_screen"}},[Uv.ts.CoreMember]:{iconProvider:k=>"5c233329-4c2d-4589-a7b5-be79087e7e16",onClick:()=>jv.openWizardBank(),visibilityConditions:[Uv.qe.CoreMember],buttonSize:Uv.Cy.Large,analyticsProperties:{buttonName:"member-button",destinationName:()=>(0,Bt.G)(qt.d).enabled?us.B.WizardBank:"",saveClickInfo:Is.k.MemberHudButton}},[Uv.ts.Duels]:{iconProvider:k=>"c67d47dd-322d-45eb-b3dd-175bf71e53ef",analyticsProperties:{buttonName:"duels-button"}},[Uv.ts.Festival]:{iconProvider:k=>tt.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalIcon(),onClick:()=>(0,G.sH)(void 0,void 0,void 0,(function*(){return jv.openAndWait(_r.x.openFestivalProgressMenu.bind(_r.x,ui.$N.ButtonClick,Is.k.Festival))})),visibilityConditions:[Uv.qe.FestivalActive],enabledConditions:[Uv.qe.FestivalUnlocked],analyticsProperties:{buttonName:Is.k.Festival,destinationName:us.B.FestivalProgressionWindow,saveClickInfo:Is.k.Festival}},[Uv.ts.FriendsList]:{iconProvider:k=>"ab57214a-ee29-4af9-bff7-a9b5c133e730",onClick:()=>{tt.q.instance.prodigy.open.friendsList()},analyticsProperties:{buttonName:"friend-button"}},[Uv.ts.Hamburger]:{iconProvider:k=>"b074e226-1fa6-4f14-bbf2-8668776b21ac",analyticsProperties:{buttonName:"hamburger-button"}},[Uv.ts.HouseEdit]:{iconProvider:k=>"a088c398-06c5-4899-87d0-a72bbd2f454d",onClick:()=>tt.q.instance.game.broadcaster.broadcast(jn.F0.OpenEditor),visibilityConditions:[Uv.qe.AtHome],analyticsProperties:{buttonName:"house-edit-button"}},[Uv.ts.HouseLocked]:{iconProvider:k=>"ea98ef3c-7d8d-4a99-8edc-47bcabd72052",onClick:()=>Kv(!0),visibilityConditions:[Uv.qe.AtHome,Uv.qe.HomeVisitsNotAllowed],analyticsProperties:{buttonName:"house-unlock-button"}},[Uv.ts.HouseReport]:{iconProvider:k=>"decfb13a-a7ee-4d42-82aa-b3a41cd29741",onClick:()=>{Vl.y.openReportHouseConfirmationDialog()},visibilityConditions:[Uv.qe.AtAnotherHome],analyticsProperties:{buttonName:"house-report-button"}},[Uv.ts.HouseUnlocked]:{iconProvider:k=>"23550ac0-65c3-423c-b94f-5b24175b436e",onClick:()=>Kv(!1),visibilityConditions:[Uv.qe.AtHome,Uv.qe.HomeVisitsAllowed],analyticsProperties:{buttonName:"house-lock-button"}},[Uv.ts.HouseUpgrade]:{iconProvider:k=>"2949c8c6-3d9c-4bef-b434-d9d75dfab75b",onClick:()=>tt.q.instance.prodigy.world.getZone(Ft.A_.HOUSE).openHouseStore(),visibilityConditions:[Uv.qe.AtHome],analyticsProperties:{buttonName:"house-upgrade-button"}},[Uv.ts.LoginRewards]:{iconProvider:k=>k===Uv.yR.Liveops?"b5db5845-13c6-4ec1-92cb-e81cd3b1e8ad":"a62096ab-ae16-4cc4-bf92-2dfeaad9e1f6",onClick:()=>(0,G.sH)(void 0,void 0,void 0,(function*(){return jv.openAndWait(jv.openDailyLoginCalendar)})),analyticsProperties:{buttonName:"daily-login-calendar-launch-button",destinationName:"daily_login_calendar_main"},visibilityConditions:[Uv.qe.DailyLoginCalendarEnabled],enabledConditions:[Uv.qe.DailyLoginCalendarUnlocked]},[Uv.ts.Map]:{iconProvider:k=>"6b825a7e-fe52-4bb5-82f0-cd1b448b4eb0",onClick:()=>{const{demandsExclusiveAttention:k}=tt.q.instance.prodigy.gameContainer.get("cc9-a3f0").getCachedButtonData(Uv.ts.Map);tt.q.instance.prodigy.open.map({disableClose:k,disableZoneGoals:k,disableDifficultyModeSelect:k})},analyticsProperties:{buttonName:"map-button",destinationName:"map_screen"}},[Uv.ts.NonMember]:{iconProvider:k=>"66eec2c1-e4df-409c-8a68-7c581ce2bb05",onClick:()=>jv.openWizardBank(),visibilityConditions:[Uv.qe.NonMember],buttonSize:Uv.Cy.Large,analyticsProperties:{buttonName:"member-button",destinationName:()=>(0,Bt.G)(qt.d).enabled?us.B.WizardBank:"",saveClickInfo:Is.k.MemberHudButton}},[Uv.ts.Pets]:{iconProvider:k=>"2bd3e716-979f-4018-8407-d959230736fb",onClick:()=>{tt.q.instance.prodigy.open.pets()},visibilityConditions:[Uv.qe.NotHome],analyticsProperties:{buttonName:"pets-button",destinationName:"pet_book_window",interfaceName:"pet_book_window"}},[Uv.ts.PlusMember]:{iconProvider:k=>"5a68a494-0005-4063-b9ac-826a6b005dad",onClick:()=>jv.openWizardBank(),visibilityConditions:[Uv.qe.PlusMember],buttonSize:Uv.Cy.Large,analyticsProperties:{buttonName:"member-button",destinationName:()=>(0,Bt.G)(qt.d).enabled?us.B.WizardBank:"",saveClickInfo:Is.k.MemberHudButton}},[Uv.ts.Rifts]:{iconProvider:k=>"7c85a67b-dd5f-441d-a988-63a9fc186f58",analyticsProperties:{buttonName:"rifts-button"}},[Uv.ts.Settings]:{iconProvider:k=>"234ca838-35f1-49fe-82f2-bf382624537d",onClick:()=>tt.q.instance.prodigy.open.optionsMenu(),analyticsProperties:{buttonName:"options-button"}},[Uv.ts.Shop]:{iconProvider:k=>"d4dc7070-8a0c-47ba-a2ad-36de33ab6531",onClick:()=>tt.q.instance.prodigy.open.dynamicStore({origin:{originType:ui.$N.ButtonClick,originId:"unifiedStore-button"}}),visibilityConditions:[Uv.qe.NotHome],buttonSize:Uv.Cy.ExtraLarge,analyticsProperties:{buttonName:"unifiedStore-button",destinationName:"unified_store_main"}},[Uv.ts.StateChallenges]:{iconProvider:k=>"60c5cf92-41a2-41d9-bbff-93803d411c63",visibilityConditions:[Uv.qe.ValidStateChallenge,Uv.qe.StateChallengeActiveOrCanCollectRewards],onClick:()=>{tt.q.instance.prodigy.open.prefabMenu(Rt.l.StateChallengesMenu)},analyticsProperties:{buttonName:"state-challenges-button",destinationName:"prodigy_challenge"}},[Uv.ts.TreasureTrack]:{iconProvider:k=>k===Uv.yR.Liveops?"5164fbfe-17ee-4def-9157-678de69a623a":"aa6673a2-b225-4046-be6e-df593a578be9",onClick:()=>(0,G.sH)(void 0,void 0,void 0,(function*(){const k=tt.q.instance.prodigy.open.battlePassMenu();yield k.onPrefabLoaded.asPromise()})),visibilityConditions:[Uv.qe.NotHome],enabledConditions:[Uv.qe.TreasureTrackUnlocked],analyticsProperties:{buttonName:"treasureTrackHud-button",destinationName:"treasure_track_main"}},[Uv.ts.UltraMember]:{iconProvider:k=>"5991c63f-4d9b-459a-9cb6-317bff008268",visibilityConditions:[Uv.qe.UltraMember],onClick:()=>jv.openWizardBank(),buttonSize:Uv.Cy.Large,analyticsProperties:{buttonName:"member-button",destinationName:()=>(0,Bt.G)(qt.d).enabled?us.B.WizardBank:"",saveClickInfo:Is.k.MemberHudButton}},[Uv.ts.WizardDash]:{iconProvider:k=>"db3fe015-bc76-4737-8550-68bce8ec631c",onClick:()=>tt.q.instance.prodigy.open.lootDashMenu(),visibilityConditions:[Uv.qe.NotHome,Uv.qe.EnglishOnly],analyticsProperties:{buttonName:"wizardDashHud-button",destinationName:"wizard_dash_lobby"}},[Uv.ts.WizardWatch]:{iconProvider:k=>"dea91059-3077-4589-9dcc-47b227862a7a",onClick:()=>{tt.q.instance.prodigy.open.socialFeed(void 0,"from-menu")},analyticsProperties:{buttonName:"feed-button"},visibilityConditions:[Uv.qe.EnglishOnly],enabledConditions:[Uv.qe.WizardWatchUnlocked]},[Uv.ts.YourGoals]:{iconProvider:k=>k===Uv.yR.Liveops?"922ac122-1c06-45c0-89e8-452b7474ca3a":"eb9a2046-45c3-4f78-a6ae-71df128c85ce",onClick:()=>(0,G.sH)(void 0,void 0,void 0,(function*(){return jv.openAndWait(tt.q.instance.prodigy.open.prefabMenu.bind(tt.q.instance.prodigy.open,Rt.l.FtuePlayerGoals))})),analyticsProperties:{buttonName:"player_goals"},visibilityConditions:[Uv.qe.PlayerGoalsEnabled]},[Uv.ts.YourMail]:{iconProvider:k=>"371de630-5798-45cf-a7c4-50a713c7f1a3",onClick:()=>{tt.q.instance.prodigy.open.mailer()},analyticsProperties:{buttonName:"mail-button"}},[Uv.ts.WizardCostumes]:{iconProvider:k=>"",analyticsProperties:{buttonName:Is.k.CostumesHudButton,destinationName:us.B.WizardCostumesMenu,saveClickInfo:Is.k.CostumesHudButton}}},(0,G.Cg)([(0,Gi.b)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],zv,"_segment",void 0),(0,G.Cg)([(0,Gi.b)("306-5359"),(0,G.Sn)("design:type",An.W)],zv,"_activePlayer",void 0);let Yv=class extends j.uAl{constructor(){super(...arguments),this._hudButtons=[],this._currentHudButton=null}get hudButtons(){return this._hudButtons}get currentHudButton(){return this._currentHudButton}create(){super.create(),this._broadcaster=tt.q.instance.game.broadcaster,this._broadcaster.addAppListener(jn.Y1.CheckForHUDAttention,this.checkIfNextHudButtonNeedsAttention,this)}destroy(){super.destroy(),this._broadcaster.removeAppListener(jn.Y1.CheckForHUDAttention,this)}onEnable(){var k,B;super.onEnable(),this._currentHudButton=null,null!==(B=null===(k=this.gameObject)||void 0===k?void 0:k.isDestroyed)&&void 0!==B&&!B&&this.checkOnEnable()&&this.checkIfNextHudButtonNeedsAttention().catch(j.RQr.createHandler("Error showing HUD attention"))}checkOnEnable(){var k,B;if(null!==(B=null===(k=j.wa5.getActiveScene())||void 0===k?void 0:k.container.get("IS_PREFAB_MAP"))&&void 0!==B&&B)return this._popupManager.popupsProcessed;{const k=tt.q.instance.game.state.get(Tt.G.TileScreen);return null==k?void 0:k.popupsProcessed}}checkIfNextHudButtonNeedsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this.Active&&Kt.A.get("GameConstants.Debug.POPUPS_ENABLED")&&!tt.q.instance.prodigy.notifications.isPaused())try{let k;tt.q.instance.game.input.enabled=!1;for(const B of this._hudButtons){const[[U],F]=yield Promise.all([zv.getButtonEnabledConditionsResult(B.hudButtonType()),B.needsAttention()]);if(U&&F){if(this._currentHudButton&&this._currentHudButton===B)continue;k=B;break}}k&&(this._currentHudButton=k,yield k.highlightButton())}finally{tt.q.instance.game.input.enabled=!0}}))}};(0,G.Cg)([(0,j.Cdj)("PopupHandler"),(0,G.Sn)("design:type",el.Y)],Yv.prototype,"_popupManager",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Fv),(0,G.Sn)("design:type",Array)],Yv.prototype,"_hudButtons",void 0),Yv=(0,G.Cg)([(0,j.EVk)("HudAttentionManagerHandler",W.Y.uiPopup)],Yv);var Qv=U(17740);let Xv=class extends Fv{constructor(){super(...arguments),this._hudButtonType=Uv.ts.Festival}needsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=tt.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig();if(this._currentFestival=tt.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival(),!k||!this._currentFestival)return!1;const B=this.checkIfFestivalAboutToEnd(this._currentFestival);return!this.hasCurrentFestivalBeenSeen(B)}))}highlightButton(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.animate()}))}hudButtonType(){return this._hudButtonType}triggerAction(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;null!==(B=this._festivalTravelModalEnabled)&&void 0!==B||(this._festivalTravelModalEnabled=(0,Bt.G)(Qv.t)),this._festivalTravelModalEnabled&&tt.q.instance.prodigy.world.getCurrentZone()!==Ft.A_.LAMPLIGHT&&!this.hasCurrentFestivalBeenSeen()?(this.updateFestivalSeenFlag(),_r.x.openTravelModal(ui.$N.HudClick)):(this.updateFestivalSeenFlag(),yield k())}))}checkIfFestivalAboutToEnd(k){if(!k)return!1;const B=Date.now();return new Date(k.endDate).getTime()-B<=1728e5}updateFestivalSeenFlag(){var k,B;if(!this._currentFestival)return;const U=tt.q.instance.prodigy.gameContainer.get("306-5359");null!==(k=(B=U.data).hudAttentionSeenFlags)&&void 0!==k||(B.hudAttentionSeenFlags={});const F=this.checkIfFestivalAboutToEnd(this._currentFestival);U.data.hudAttentionSeenFlags[Uv.ts.Festival]={identifier:F?`${this._currentFestival.type}-expiring`:String(this._currentFestival.type)}}hasCurrentFestivalBeenSeen(k){var B;if(!this._currentFestival)return!1;const U=(null!==(B=tt.q.instance.prodigy.gameContainer.get("306-5359").data.hudAttentionSeenFlags)&&void 0!==B?B:{})[Uv.ts.Festival];return!!j.Aq$.isDefined(null==U?void 0:U.identifier)&&(k?U.identifier===`${this._currentFestival.type}-expiring`:U.identifier===String(this._currentFestival.type))}destroy(){tt.q.instance.game.broadcaster.removeAppListener(jn.bI.FtueCompleted,this),super.destroy()}};Xv=(0,G.Cg)([(0,j.EVk)("HudFestival",W.Y.uiHudManager)],Xv);let Zv=class extends Fv{constructor(){super(...arguments),this._hudButtonType=Uv.ts.Pets}needsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){return td.I.shouldShowPetGearTutorial()}))}highlightButton(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.animate()}))}hudButtonType(){return this._hudButtonType}triggerAction(){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.game.broadcaster.addAppListener(jn.bI.FtueCompleted,(()=>{}),this),tt.q.instance.game.broadcaster.broadcast(jn.bI.ReceivedPetGear)}))}destroy(){tt.q.instance.game.broadcaster.removeAppListener(jn.bI.FtueCompleted,this),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("OnHudLoadedSignal"),(0,G.Sn)("design:type",ql.S)],Zv.prototype,"_onHudLoaded",void 0),Zv=(0,G.Cg)([(0,j.EVk)("HudPetGearPopup",W.Y.uiHudManager)],Zv);var Jv,tg=U(50788),eg=U(11848),ig=U(215),sg=U(19690);!function(k){k.Image1="IMAGE_1",k.Image2="IMAGE_2",k.Image3="IMAGE_3",k.Image4="IMAGE_4",k.Image5="IMAGE_5"}(Jv||(Jv={}));const ng={[Jv.Image1]:ps.q.Pet_Merge_FTUE_New_Menu_slide1,[Jv.Image2]:ps.q.Pet_Merge_FTUE_New_Menu_slide2,[Jv.Image3]:ps.q.Pet_Merge_FTUE_New_Menu_slide3,[Jv.Image4]:ps.q.Pet_Merge_FTUE_New_Menu_slide4,[Jv.Image5]:ps.q.Pet_Merge_FTUE_New_Menu_slide5},ag={[Jv.Image1]:ps.q.Pet_Merge_FTUE_New_Menu_slide1,[Jv.Image2]:ps.q.Pet_Merge_FTUE_New_Menu_slide2merge2,[Jv.Image3]:ps.q.Pet_Merge_FTUE_New_Menu_slide3,[Jv.Image4]:ps.q.Pet_Merge_FTUE_New_Menu_slide4,[Jv.Image5]:ps.q.Pet_Merge_FTUE_New_Menu_slide5merge2};let rg=class extends Fv{constructor(){super(...arguments),this._hudButtonType=Uv.ts.Pets}destroy(){this.removeAllListeners(),super.destroy()}needsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){return!this._breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_PET_MERGE,ls.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED)&&(!!eo.P8.canPlayerAccessPetMergeFeature()&&eg.N.cacheCanShowPetMergeTutorial())}))}triggerAction(){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.game.broadcaster.addAppListener(jn.ki.FtueCompleted,(()=>{this.removeAllListeners()}),this),this._breadcrumbManager.completeBreadcrumb(ls.B.FEATURE_PET_MERGE,ls.B.BREADCRUMB_PET_MERGE_FTUE_STARTED),this._segmentAnalytics.petMerge.sendPetMergeTutorialFunnelAdvancedEvent(ig.S4.TutorialUnlocked),yield eg.N.awardPetMergeFtueIngredients();const k=yield(0,sg.Ks)().loadWithDependenciesFromGUID(Rt.l.PetMergeFTUE);if((0,Bt.G)(Oh.m)){const B=(0,Bt.G)(tg.J),U=B?ag:ng,F=Object.values(U),G=Object.assign({PET_MERGE_2_ENABLED:B},U);yield tt.q.instance.prodigy.load.assetsAsPromise(F).then((()=>{Nt.d.updateInjectedValues(k,G)})).catch((k=>{j.VyI.log("Failed to load images on for the variant FTUE",j.$bb.Error)}))}k.transform.setPosition(tt.q.instance.game.width>>1,tt.q.instance.game.height>>1),k.setLayer(jh.E.OverlayLayer,!0),j.wa5.getActiveScene().addGameObject(k)}))}highlightButton(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.animate()}))}hudButtonType(){return this._hudButtonType}removeAllListeners(){tt.q.instance.game.broadcaster.removeAppListener(jn.ki.FtueCompleted,this)}};(0,G.Cg)([(0,j.Cdj)("12f-4e29"),(0,G.Sn)("design:type",sh.F)],rg.prototype,"_breadcrumbManager",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],rg.prototype,"_segmentAnalytics",void 0),rg=(0,G.Cg)([(0,j.EVk)("HudPetMergePopup",W.Y.uiHudManager)],rg);var og=U(24695);let hg=class extends Fv{constructor(){super(...arguments),this.WIDGET_ITEM_ATTENTION_COOLDOWN=Kt.s.DAY_IN_MS,this._hudButtonType=Uv.ts.Shop,this._currentItem=void 0}needsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!(yield zv.areVisibilityConditionsTrue(Uv.ts.Shop)))return!1;const k=yield this._dataProvider.getHudWidgetItems();for(const B of k)if(!this.hasShopItemBeenSeen(B))return this._currentItem=B,!0;return!1}))}highlightButton(){return(0,G.sH)(this,void 0,void 0,(function*(){oh.A.isDefined(this._currentItem)&&(this.updateItemSeenFlag(this._currentItem),yield this.createWidget(this.getWidgetData(this._currentItem)))}))}getWidgetData(k){var B,U,F,G,j,$,H,V;const W=null!==(U=null===(B=k.metadata.hudWidgetData)||void 0===B?void 0:B.prefab)&&void 0!==U?U:Rt.l.BaseHUDWidget;let q={ORIGIN_ID:`shop-widget-${k.id}`,STORE_TO_OPEN:null===(F=k.metadata.hudWidgetData)||void 0===F?void 0:F.storeKey,SECTION_TO_OPEN:k.metadata.category,TITLE_TEXT_KEY:null!==(j=null===(G=k.metadata.hudWidgetData)||void 0===G?void 0:G.title)&&void 0!==j?j:k.metadata.displayName};if(W===Rt.l.FeaturedPetWidget){const B=null===($=k.onComplete)||void 0===$?void 0:$.find((k=>k.type===yl.s.GOT_PET));let U=0,F=mn.EElementType.Physical;if(Array.isArray(null==B?void 0:B.data.itemDrops)&&B.data.itemDrops.length>0){U=B.data.itemDrops[0].ID;const k=Yt.t.getItem("pet",U);oh.A.isDefined(k)&&(F=eo.P8.getElementType(k))}q=Object.assign(Object.assign({},q),{TITLE_TEXT_KEY:null!==(V=null===(H=k.metadata.hudWidgetData)||void 0===H?void 0:H.title)&&void 0!==V?V:"PET_OF_THE_WEEK",BACKGROUND_IMAGE_GUID:og.N.ELEMENT_TO_WIDGET_BG_MAP[F],PET_SPINE_GUID:U})}return{prefab:W,injectionData:q}}hudButtonType(){return this._hudButtonType}triggerAction(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;oh.A.isDefined(this._currentItem)?yield tt.q.instance.prodigy.open.dynamicStoreAsync({storeKey:null===(B=this._currentItem.metadata.hudWidgetData)||void 0===B?void 0:B.storeKey,scrollToSection:this._currentItem.metadata.category,origin:{originType:ui.$N.ButtonClick,originId:Is.k.UnifiedStore}}):yield k()}))}hasShopItemBeenSeen(k){var B,U;const F=(null!==(B=this._activePlayer.data.hudAttentionSeenFlags)&&void 0!==B?B:{})[Uv.ts.Shop];if(!oh.A.isDefined(F))return!1;const G=null===(U=F.flags)||void 0===U?void 0:U.find((B=>B.identifier===k.id));return!!oh.A.isDefined(G)&&!(oh.A.isDefined(G.cooldownTimestamp)&&G.cooldownTimestamp<=Date.now())}updateItemSeenFlag(k){var B,U,F,G,j;null!==(B=(j=this._activePlayer.data).hudAttentionSeenFlags)&&void 0!==B||(j.hudAttentionSeenFlags={});const $=this._activePlayer.data.hudAttentionSeenFlags[Uv.ts.Shop],H=null!==(U=null==$?void 0:$.flags)&&void 0!==U?U:[],V=H.findIndex((B=>B.identifier===k.id)),W={identifier:k.id,cooldownTimestamp:Date.now()+(null!==(G=null===(F=k.metadata.hudWidgetData)||void 0===F?void 0:F.cooldown)&&void 0!==G?G:this.WIDGET_ITEM_ATTENTION_COOLDOWN)};V>=0?H[V]=W:H.push(W),this._activePlayer.data.hudAttentionSeenFlags[Uv.ts.Shop]={identifier:Uv.ts.Shop,flags:H}}};var cg;(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],hg.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,j.Cdj)("84d-05d4"),(0,G.Sn)("design:type",fd.I)],hg.prototype,"_dataProvider",void 0),hg=(0,G.Cg)([(0,j.EVk)("HudShop",W.Y.uiHudManager)],hg);let dg=cg=class extends Fv{constructor(){super(...arguments),this._hudButtonType=Uv.ts.StateChallenges}needsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=tt.q.instance.prodigy.gameContainer.get("0f9-dd7b"),U=tt.q.instance.prodigy.gameContainer.get("a94-4ba3");yield B.initialize();if(!(yield U.isFeatureAvailable()))return!1;const F=this.checkIfStateChallengeAboutToEnd();if(!this.hasCurrentStateChallengeBeenSeen(F))return!0;const G=(null!==(k=tt.q.instance.prodigy.gameContainer.get("306-5359").data.hudAttentionSeenFlags)&&void 0!==k?k:{})[Uv.ts.StateChallenges],j=Date.now();return!!((null==G?void 0:G.cooldownTimestamp)&&j>=G.cooldownTimestamp&&(yield this.hasPendingReward()))}))}hasCurrentStateChallengeBeenSeen(k){var B;const U=(null!==(B=tt.q.instance.prodigy.gameContainer.get("306-5359").data.hudAttentionSeenFlags)&&void 0!==B?B:{})[Uv.ts.StateChallenges];if(!j.Aq$.isDefined(null==U?void 0:U.identifier))return!1;const F=Date.now(),G=new Date(F).getMonth()+1;return k?U.identifier===`${G}-expiring`:U.identifier===G}hasPendingReward(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=tt.q.instance.prodigy.gameContainer.get("0f9-dd7b"),B=(0,Vu.$)(k.viewableCompetitionPhase);if(!B)return!1;const U=tt.q.instance.prodigy.gameContainer.get("43a-6f08");yield U.getQuestTasks(B);const F=yield Bu.b.getData();return!!F&&F[ku.V.HasMilestoneRewardReady]}))}highlightButton(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.animate()}))}hudButtonType(){return this._hudButtonType}triggerAction(k){return(0,G.sH)(this,void 0,void 0,(function*(){this.updateStateChallengeSeenFlag(),yield k()}))}checkIfStateChallengeAboutToEnd(){const k=Date.now(),B=new Date(k);return new Date(B.getFullYear(),B.getMonth()+1,0,23,59,59,999).getTime()-k<=1728e5}updateStateChallengeSeenFlag(){var k,B;const U=tt.q.instance.prodigy.gameContainer.get("306-5359");null!==(k=(B=U.data).hudAttentionSeenFlags)&&void 0!==k||(B.hudAttentionSeenFlags={});const F=this.checkIfStateChallengeAboutToEnd(),G=Date.now(),j=new Date(G).getMonth()+1;U.data.hudAttentionSeenFlags[Uv.ts.StateChallenges]={identifier:F?`${j}-expiring`:j,cooldownTimestamp:Date.now()+cg.STATE_CHALLENGE_REWARD_NOTIFICATION_COOLDOWN}}destroy(){tt.q.instance.game.broadcaster.removeAppListener(jn.bI.FtueCompleted,this),super.destroy()}};dg.STATE_CHALLENGE_REWARD_NOTIFICATION_COOLDOWN=864e5,dg=cg=(0,G.Cg)([(0,j.EVk)("HudStateChallenge",W.Y.uiHudManager)],dg);let lg=class extends Fv{constructor(){super(...arguments),this._hudButtonType=Uv.ts.TreasureTrack}destroy(){this._battlePassDataPromise&&(this._battlePassDataPromise.cancel(),this._battlePassDataPromise=void 0),super.destroy()}needsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=this._loggedInPlayer.player;if(!B.hasCompletedTutorial()||B.tutorialCompletedThisSession)return!1;this._battlePassDataPromise=new j.kBN(((k,B)=>{this._battlePassQuestManager.getCurrentBattlePassData().then(k).catch(B)}));const U=yield this._battlePassDataPromise;return!1===(null===(k=null==U?void 0:U.getFtueTask())||void 0===k?void 0:k.isCompleted)}))}highlightButton(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.animate()}))}hudButtonType(){return this._hudButtonType}triggerAction(){return(0,G.sH)(this,void 0,void 0,(function*(){yield tt.q.instance.prodigy.open.battlePassFtue()}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],lg.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],lg.prototype,"_battlePassQuestManager",void 0),lg=(0,G.Cg)([(0,j.EVk)("HudTreasureTrack",W.Y.uiHudManager)],lg);var ug=U(19609),fg=U(45385),bg=U(72799);let pg=class extends Fv{create(){super.create(),this._root.active=!1,this._renderPlayerAsTexture.onRenderComplete.addOnce((()=>{this._root.active=!0})),this._activePlayer.onEquipmentChange.add(this.updateAvatarAppearance,this),tt.q.instance.game.broadcaster.addAppListener(jn.ig.AnyLevelUp,this.updateWizardLevelText,this),this._wizardCostumesDataProvider.onCostumeDataChanged.add(this.updateNotificationBadge,this),this.updateNotificationBadge(),this.updateWizardLevelText()}updateNotificationBadge(){const k=this._wizardCostumesDataProvider.getUnseenCostumeIds().length;this._notificationBadge.updateNumberedNotificationBadge(k>0,k)}updateWizardLevelText(){this._levelText.text=this._activePlayer.getLevel().toString()}updateAvatarAppearance(){this._renderPlayerAsTexture.renderPlayerAsTexture()}needsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){return!(this._activePlayer.getLevel()0||ug.hD.shouldShowFtue())}))}highlightButton(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.animate()}))}hudButtonType(){return Uv.ts.WizardCostumes}triggerAction(k){return(0,G.sH)(this,void 0,void 0,(function*(){this._segment.featureCommon.sendButtonEvent({buttonName:Is.k.CostumesHudButton,interfaceName:us.B.HUD,interfaceType:ui.Wm.HUD,destinationName:us.B.WizardCostumesMenu,saveClickInfo:Is.k.CostumesHudButton}),tt.q.instance.prodigy.open.openWizardCostumesMenu(ui.$N.ButtonClick,Is.k.CostumesHudButton),tt.q.instance.game.broadcaster.broadcast(jn.Y1.CheckForHUDAttention)}))}destroy(){this._wizardCostumesDataProvider.onCostumeDataChanged.removeAll(this),this._activePlayer.onEquipmentChange.removeAll(this),tt.q.instance.game.broadcaster.removeAppListener(jn.ig.AnyLevelUp,this),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],pg.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],pg.prototype,"_segment",void 0),(0,G.Cg)([(0,j.Cdj)("6e9-d1dd"),(0,G.Sn)("design:type",Xb.W)],pg.prototype,"_wizardCostumesDataProvider",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],pg.prototype,"_root",void 0),(0,G.Cg)([(0,j.MnK)(fg.e),(0,G.Sn)("design:type",fg.e)],pg.prototype,"_notificationBadge",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],pg.prototype,"_levelText",void 0),(0,G.Cg)([(0,j.MnK)(bg.M),(0,G.Sn)("design:type",bg.M)],pg.prototype,"_renderPlayerAsTexture",void 0),pg=(0,G.Cg)([(0,j.EVk)("HudWizardCostumes",W.Y.uiHudManager)],pg);var vg=U(21738);let gg=class extends j.uAl{constructor(){super(...arguments),this.prefabIsOnStack=new j.HN0,this.prefabIsNotOnStack=new j.HN0}destroy(){this.prefabIsOnStack.dispose(),this.prefabIsNotOnStack.dispose(),super.destroy()}menuStackCloseAll(){tt.q.instance.prodigy.open.menuCloseAll()}isPrefabMenuOnStack(k){const B=tt.q.instance.prodigy.open.menus;for(const U of B)if(U instanceof vg.y&&U.prefabID===k)return void this.prefabIsOnStack.dispatch();this.prefabIsNotOnStack.dispatch()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],gg.prototype,"prefabIsOnStack",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],gg.prototype,"prefabIsNotOnStack",void 0),gg=(0,G.Cg)([(0,j.EVk)("MenuStackManager",j.YH6.ui)],gg);let mg=class extends j.uAl{constructor(){super(...arguments),this._modalFilters=null,this._modalRenderTexture=null,this._isBlurred=!1}create(){this._background=j.wa5.getActiveScene().getLayer(jh.E.BackgroundLayer),this._content=j.wa5.getActiveScene().getLayer(jh.E.ContentLayer),this._foreground=j.wa5.getActiveScene().getLayer(jh.E.ForegroundLayer),this._gameRenderCache=new j._mx,this._gameRenderCache.name=jh.E.GameRenderCacheLayer,this._gameRenderCacheBaseRenderer=this._gameRenderCache.addComponent(j.jsv)}blur(){this.bitmapCacheContainer(!0)}unBlur(){this.bitmapCacheContainer(!1)}fadeOutCachedContainer(k){if(!this._gameRenderCacheBaseRenderer.getRootContainer().visible)return;tt.q.instance.game.add.tween(this._gameRenderCache,this).to({alpha:0},100,j.GS3.Quadratic.Out).start().onTweenComplete.add(this.clearAndResetCachedContainer.bind(this,k))}clearAndResetCachedContainer(k){k.filters=null,k.visible=!1,k.removeChildren()}setUpModalTransition(k){this.clearAndResetCachedContainer(k);const B=tt.q.instance.game.renderer;if(null===this._modalFilters){const k=new $e.filters.BlurFilter;this._modalFilters=[k]}const U=$e.RenderTexture.create({width:tt.q.instance.game.width,height:tt.q.instance.game.height});null===this._modalRenderTexture&&(this._modalRenderTexture=$e.RenderTexture.create({width:tt.q.instance.game.width,height:tt.q.instance.game.height}));const F={renderTexture:U,clear:!0,transform:void 0,skipUpdateTransform:!1},G=Object.assign(Object.assign({},F),{clear:!1}),j=Object.assign(Object.assign({},F),{renderTexture:this._modalRenderTexture});B.render(this._background,F),B.render(this._content,G),B.render(this._foreground,G);const $=new $e.Container;$.addChild(new $e.Sprite(U)),$.filters=this._modalFilters,B.render($,j),$.destroy(),k.addChild(new $e.Sprite(this._modalRenderTexture)),k.alpha=1,k.visible=!0}bitmapCacheContainer(k){const B=this._gameRenderCacheBaseRenderer.getRootContainer();k?this.setUpModalTransition(B):this.fadeOutCachedContainer(B),this.setLayerVisibility(!k)}setLayerVisibility(k){this._background.visible=k,this._content.visible=k,this._foreground.visible=k,this._hudGameObject.active=k,this._isBlurred=!k}destroy(){var k;super.destroy(),this._isBlurred&&(this.clearAndResetCachedContainer(this._gameRenderCacheBaseRenderer.getRootContainer()),this.setLayerVisibility(!0)),tt.q.instance.game.tweens.removeAllFromOwner(this),this._gameRenderCache.destroy(),this._modalFilters&&(this._modalFilters.length=0),null===(k=this._modalRenderTexture)||void 0===k||k.destroy()}};(0,G.Cg)([(0,j.Cdj)(Uv.uR.HudGameObject),(0,G.Sn)("design:type",j._mx)],mg.prototype,"_hudGameObject",void 0),mg=(0,G.Cg)([(0,j.EVk)("ModalPopupBlurController",W.Y.uiPopup)],mg);var yg=U(60155);let _g=class extends j.uAl{constructor(){super(...arguments),this._currentPopup=null}create(){super.create(),this.shouldShowPopupButton()?(tt.q.instance.prodigy.load.assets([Rt.l.MoreMagicAtHomePopup]),this._button.active=!0):this._button.active=!1}openPopup(){if(this._currentPopup)return;this._button.active=!1,this._currentPopup=tt.q.instance.prodigy.open.prefabMenu(Rt.l.MoreMagicAtHomePopup,(()=>{this._button.active=!0,this._currentPopup=null}),!1,!0,!1)}closePopup(){this._currentPopup&&(this._currentPopup.close(),this._currentPopup=null)}shouldShowPopupButton(){return this._battleController.hasMpOverrides&&Qt.J.isDateWithinSchoolDayAndHours()}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_g.prototype,"_button",void 0),(0,G.Cg)([(0,j.Cdj)("BattleController"),(0,G.Sn)("design:type",yg.V)],_g.prototype,"_battleController",void 0),_g=(0,G.Cg)([(0,j.EVk)("MoreMagicAtHomePopupController",W.Y.uiPopup)],_g);let Eg=class extends ff.l{constructor(){super(...arguments),this._notificationAtlas=Ve._.Ui_social_feed_json,this._notificationSfx=pi.c.Sfx_toaster_open}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return this._achievementData=tt.q.instance.prodigy.achievements.updateAchievementsCompletion(),this._achievementData.length>0}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),this._achievementData||(this._achievementData=tt.q.instance.prodigy.achievements.updateAchievementsCompletion()),this.onClose.dispatch();for(const k of this._achievementData)this._loggedInPlayer.player.achievements.complete(k.ID)}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Eg.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],Eg.prototype,"_notificationAtlas",void 0),(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],Eg.prototype,"_notificationSfx",void 0),Eg=(0,G.Cg)([(0,j.EVk)("OpenAchievementToasters",W.Y.uiPopup)],Eg);let wg=class extends ff.l{destroy(){this._battlePassDataPromise&&(this._battlePassDataPromise.cancel(),this._battlePassDataPromise=void 0),super.destroy()}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=this._loggedInPlayer.player;if(!(yield yn.n.hasBattlePassAccess()))return!1;if(!B.hasCompletedTutorial()||B.tutorialCompletedThisSession)return!1;this._battlePassDataPromise=new j.kBN(((k,B)=>{this._battlePassQuestManager.getCurrentBattlePassData().then(k).catch(B)}));const U=yield this._battlePassDataPromise;return!1===(null===(k=null==U?void 0:U.getFtueTask())||void 0===k?void 0:k.isCompleted)}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),yield tt.q.instance.prodigy.open.battlePassFtue((()=>{this.onClose.dispatch()}))}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],wg.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("8dc-04eb"),(0,G.Sn)("design:type",cs.R)],wg.prototype,"_battlePassQuestManager",void 0),wg=(0,G.Cg)([(0,j.EVk)("OpenBattlePassFtuePopup",W.Y.uiDialog)],wg);U(46361);let Tg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;const U=null!==(B=null===(k=this._loggedInPlayer.player.data)||void 0===k?void 0:k.zone)&&void 0!==B?B:"";return On.J.canShowNarrativeIntro(U)}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),tt.q.instance.prodigy.world.it("lamplight-B3")}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Tg.prototype,"_loggedInPlayer",void 0),Tg=(0,G.Cg)([(0,j.EVk)("OpenCampaignNarrativePopup",W.Y.uiPopup)],Tg);let Sg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return this._chargedLevelsProgressManager.shouldShowConversionModal}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),this._chargedLevelsProgressManager.showChargedLevelsConversionModal((()=>{this.onClose.dispatch()}))}))}};(0,G.Cg)([(0,j.Cdj)("62e-110e"),(0,G.Sn)("design:type",Bn.g)],Sg.prototype,"_chargedLevelsProgressManager",void 0),Sg=(0,G.Cg)([(0,j.EVk)("OpenChargedLevelConversionModalPopup",W.Y.uiPopup)],Sg);let Ag=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return this._chargedLevelsProgressManager.shouldShowDecayImmunityModal}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),this._chargedLevelsProgressManager.showChargedLevelsDecayImmunityModal((()=>{this.onClose.dispatch()}))}))}};(0,G.Cg)([(0,j.Cdj)("62e-110e"),(0,G.Sn)("design:type",Bn.g)],Ag.prototype,"_chargedLevelsProgressManager",void 0),Ag=(0,G.Cg)([(0,j.EVk)("OpenChargedLevelsDecayImmunityModalPopup",W.Y.uiPopup)],Ag);let Cg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=Yn.s.baseLevelRequiredForChargedLevels;return this._loggedInPlayer.getLevel()>=k&&this._chargedLevelsProgressManager.shouldShowRetention}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),this._chargedLevelsProgressManager.showChargedLevelsRetentionModal((()=>{this.onClose.dispatch()}))}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],Cg.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("62e-110e"),(0,G.Sn)("design:type",Bn.g)],Cg.prototype,"_chargedLevelsProgressManager",void 0),Cg=(0,G.Cg)([(0,j.EVk)("OpenChargedLevelsRetentionPopup",W.Y.uiPopup)],Cg);let Og=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return cr.M.canAutoSurfaceDailyLoginCalendar()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),tt.q.instance.prodigy.open.dailyLoginCalendar().then((()=>{this.onClose.dispatch()})).catch(j.RQr.createHandler("Failed to open Daily Login Calendar popup"))}))}};Og=(0,G.Cg)([(0,j.EVk)("OpenDailyLoginCalendarPopup",W.Y.uiPopup)],Og);var Ig=U(75781);let Dg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return Vo.U.progressData.step===Ho.B.NotStarted&&this._loggedInPlayer.player.hasFoundAllKeystones()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),Ig.E.runAllKeystonesSequenceOnMapSetup((()=>(0,G.sH)(this,void 0,void 0,(function*(){this.onClose.dispatch()}))))}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Dg.prototype,"_loggedInPlayer",void 0),Dg=(0,G.Cg)([(0,j.EVk)("OpenEndGameKeystonesSequence",W.Y.uiPopup)],Dg);let Rg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return On.J.shouldShowExpertModeUnlockedPopup()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),On.J.showDifficultyUnlockedPopup(fe.i.Expert,(()=>{this.onClose.dispatch()}))}))}};Rg=(0,G.Cg)([(0,j.EVk)("OpenExpertModeUnlockPopup",W.Y.uiPopup)],Rg);let Pg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=tt.q.instance.prodigy.gameContainer.get("a02-c2b2"),B=k.shouldAutoSurfaceSegmentedOffers()&&k.userHasLastChance();return k.userHasEligibleOfferAvailable()&&B}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){var B;yield k.open.call(this);const U=tt.q.instance.prodigy.gameContainer,F=U.get("a02-c2b2");U.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:null===(B=F.activeOffer)||void 0===B?void 0:B.id,funnelType:"segmented_offers",stepName:eh.l.SegmentedOffersGotExpired},{step_index:5}),gu.P.openConfiguredModal((()=>{this.onClose.dispatch()}))}))}};Pg=(0,G.Cg)([(0,j.EVk)("OpenExpiringSegmentOffers",W.Y.uiPopup)],Pg);let Mg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return og.N.shouldShowFeaturedPetPopup()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),og.N.openFeaturedPetPopup((()=>{this.onClose.dispatch()}))}))}};Mg=(0,G.Cg)([(0,j.EVk)("OpenFeaturedPetPopupComponent",W.Y.uiPopup)],Mg);let Ng=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return!!this._loggedInPlayer.player.hasCompletedTutorial()&&_r.x.shouldShowCurrencyDrainPopup(cl.L.CurrencyDrainPopup)}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),_r.x.openCurrencyDrainModal(ui.$N.AutoSurfaced,(()=>{this.onClose.dispatch()}))}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Ng.prototype,"_loggedInPlayer",void 0),Ng=(0,G.Cg)([(0,j.EVk)("OpenFestivalCurrencyDrainPopup",W.Y.uiPopup)],Ng);let xg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return On.J.shouldShowHardModeUnlockedPopup()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),On.J.showDifficultyUnlockedPopup(fe.i.Hard,(()=>{this.onClose.dispatch()}))}))}};xg=(0,G.Cg)([(0,j.EVk)("OpenHardModeUnlockPopup",W.Y.uiPopup)],xg);var Lg=U(40392);let kg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=On.J.shouldShowWorldMapHardModeFtue(),B=On.J.hasStartedHardModeFirstEntryDialogueButNeverCompleted();return k||B}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this);const B=tt.q.instance.prodigy.open.map({disableClose:!0,onClose:()=>this.onClose.dispatch()});On.J.hasStartedHardModeFirstEntryDialogueButNeverCompleted()&&B.onCreate.addOnce((()=>{Lg.i.setDifficultyMode(fe.i.Hard)}))}))}};kg=(0,G.Cg)([(0,j.EVk)("OpenHardModeWorldmapFTUE",W.Y.uiPopup)],kg);var Bg=U(34612);let Ug=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return Bg.F.shouldShowLinearCampaignZoneLockTransition()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),Bg.F.activateLinearCampaignTransitionCutscene(),tt.q.instance.game.broadcaster.addAppListener(jn.n8.WorldMapZoneSelected,(()=>this.onClose.dispatch()),this)}))}};Ug=(0,G.Cg)([(0,j.EVk)("OpenLinearCampaignTransitionPopup",W.Y.uiPopup)],Ug);var Fg=U(51477);let Gg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=this._game.state.getCurrentState(),U=tt.q.instance.prodigy.gameContainer.get("a02-c2b2"),F=(null===(k=null==B?void 0:B.screenData)||void 0===k?void 0:k.battleResult)===Ci.XK.Defeat&&!U.userHasSeenFirstOffer();return U.userHasEligibleOfferAvailable()&&F}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this);const B=tt.q.instance.prodigy.gameContainer.get("a02-c2b2");gu.P.openConfiguredModal((()=>{B.setBreadcrumbHasSeenFirstBattleLost(),this.onClose.dispatch()}))}))}};(0,G.Cg)([(0,j.Cdj)("51c-03a0"),(0,G.Sn)("design:type",Fg.n)],Gg.prototype,"_game",void 0),Gg=(0,G.Cg)([(0,j.EVk)("OpenLostBattleSegmentOffers",W.Y.uiPopup)],Gg);var jg=U(64868);let $g=class extends ff.l{constructor(){super(...arguments),this._filteredOffers=[],this._resetTime=void 0}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F,G,j,$;if(jg._.isFeatureEnabled()){const H=this._game.state.getCurrentState(),V=tt.q.instance.prodigy.gameContainer,W=null!==(B=null===(k=null==H?void 0:H.screenData)||void 0===k?void 0:k.battleResult)&&void 0!==B&&B,q=null!==(F=null===(U=null==H?void 0:H.screenData)||void 0===U?void 0:U.didRiftBattle)&&void 0!==F&&F;if(W||q){const k=V.get("0f1-c356"),{sessionBattles:B}=yield k.getBattleStats(),U=this._loggedInPlayer.player.isPlayingAtSchool(),F=null!==($=null===(j=null===(G=jg._.getVariables())||void 0===G?void 0:G.defeatedPetStore)||void 0===j?void 0:j.battlesToPrompt)&&void 0!==$?$:3,H=B.length%F==0,W=0!==B.length&&B[B.length-1].battleType===Ci.gu.NormalRiftRun;if(U||H||W){const k=V.get("7a1-ff33"),{resetTime:B,defeatedPetOffers:U}=yield k.updateDefeatedPetOffers();if(this._resetTime=B,this._filteredOffers=[...U].filter((k=>k.progress.status===pr.t.IN_PROGRESS)),this._filteredOffers.length>0)return!0}}}return!1}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),tt.q.instance.prodigy.open.prefabMenu(Rt.l.LostPetModal,(()=>{this.onClose.dispatch()}),!0,!0,!1,{LOST_PETS_OFFER_DATA:this._filteredOffers,LOST_PETS_RESET_TIME:this._resetTime})}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],$g.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("51c-03a0"),(0,G.Sn)("design:type",Fg.n)],$g.prototype,"_game",void 0),$g=(0,G.Cg)([(0,j.EVk)("OpenLostPetsModalPopup",W.Y.uiPopup)],$g);let Hg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._loggedInPlayer.player,B=k.hasMembership();return!(!k.hasCompletedTutorial()&&k.memberPrompt)&&(!(!B&&Qt.J.isSchoolHours()||B&&k.backpack.hasItem("mount",1)>0)&&(!(k.isPlayingAtSchool()||!k.hasUnclaimedMembershipRewards())&&(k.seenMapTransitionPromptThisSession=!0,Us.P.shouldUseUnifiedConversionFlow(en.o.FunnelTransitMap))))}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),tt.q.instance.prodigy.open.unifiedConversionFlow((()=>{this.onClose.dispatch()}),{conversionFunnelName:en.o.FunnelTransitMap,conversionStage:en.o.StageTransitMap},ui.$N.AutoSurfaced)}))}};(0,G.Cg)([(0,j.Cdj)("51c-03a0"),(0,G.Sn)("design:type",Fg.n)],Hg.prototype,"_game",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Hg.prototype,"_loggedInPlayer",void 0),Hg=(0,G.Cg)([(0,j.EVk)("OpenMapTransitionAdPopup",W.Y.uiPopup)],Hg);var Vg=U(26691);let Wg=class extends j.uAl{constructor(){super(...arguments),this._onYes=new j.HN0,this._onNo=new j.HN0,this._yesOnly=!1}run(){tt.q.instance.prodigy.open.messageBoxPrefab({text:this.messageKey,buttonState:this._yesOnly?Vg.D.OkayButton:Vg.D.YesNoButtons,confirmCallback:()=>{this._onYes.dispatch()},noCallback:this._yesOnly?void 0:()=>{this._onNo.dispatch()}})}destroy(){this._onYes.dispose(),this._onNo.dispose(),super.destroy()}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Wg.prototype,"messageKey",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wg.prototype,"_onYes",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wg.prototype,"_onNo",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Wg.prototype,"_yesOnly",void 0),Wg=(0,G.Cg)([(0,j.EVk)("OpenMessageBox",W.Y.uiDialog)],Wg);let qg=class extends ff.l{create(){super.create(),this._otpService=tt.q.instance.prodigy.gameContainer.get("e03-b0a9"),this._openOnCreate&&this.canOpen().then((k=>(0,G.sH)(this,void 0,void 0,(function*(){k&&(yield this.open())})))).catch(j.RQr.createHandler("Error opening OPT Unclaimed popup"))}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return this._otpService.hasUncollectedTransactions}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),this._otpService.acknowledgeUncollectedTransactions().catch(j.RQr.createHandler("Error opening OPT Unclaimed popup"))}))}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],qg.prototype,"_openOnCreate",void 0),qg=(0,G.Cg)([(0,j.EVk)("OpenOTPUnclaimedPopup",W.Y.uiDialog)],qg);var Kg=U(32073);let zg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;return j.Aq$.isDefined(this._quickQuizManager.currentQuickQuizId)||(null===(k=this._quickQuizManager)||void 0===k?void 0:k.waitingToTransport)&&Kg.v.canBeTransportedToQuickQuiz({skipPendingLoadCheck:!0}).canBeTransported}))}close(){this.onClose.dispatch()}open(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;null===(k=this._quickQuizManager)||void 0===k||k.onQuickQuizExitFlowComplete.addOnce((()=>{this.close()}))}))}};(0,G.Cg)([(0,j.Cdj)("fc2-cb0a"),(0,G.Sn)("design:type",Hh.w)],zg.prototype,"_quickQuizManager",void 0),zg=(0,G.Cg)([(0,j.EVk)("OpenPendingQuickQuiz",W.Y.uiDialog)],zg);let Yg=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return td.I.shouldShowPetGearTutorial()}))}open(){return(0,G.sH)(this,void 0,void 0,(function*(){if(j.Aq$.isDefined(this._onHudLoaded)){if(0===this._onHudLoaded.dispatchCount)try{yield this.waitForHud()}catch(k){return void j.VyI.log("OpenPetGearPopupComponent: Error waiting for HUD to load, skipping FTUE popup.",j.$bb.Error)}tt.q.instance.game.broadcaster.addAppListener(jn.bI.FtueCompleted,(()=>{this.onClose.dispatch()}),this),tt.q.instance.game.broadcaster.broadcast(jn.bI.ReceivedPetGear)}else j.VyI.log("OpenPetGearPopupComponent: No HUD loaded signal defined, skipping FTUE popup.",j.$bb.Error)}))}waitForHud(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!j.Aq$.isDefined(this._onHudLoaded))throw new Error("OpenPetGearPopupComponent: No HUD loaded signal defined, skipping FTUE popup.");const k=this._onHudLoaded.onDispatch.asPromise(),B=j.Egh.timeout(5e3).then((()=>{throw j.VyI.log("OpenPetGearPopupComponent: Hud load timed out, skipping FTUE popup.",j.$bb.Error),new Error("HUD load timeout")}));yield Promise.race([k,B])}))}destroy(){tt.q.instance.game.broadcaster.removeAppListener(jn.bI.FtueCompleted,this),super.destroy()}};var Qg;(0,G.Cg)([(0,j.Cdj)("OnHudLoadedSignal"),(0,G.Sn)("design:type",ql.S)],Yg.prototype,"_onHudLoaded",void 0),Yg=(0,G.Cg)([(0,j.EVk)("OpenPetGearPopup",W.Y.uiDialog)],Yg),function(k){k.Image1="IMAGE_1",k.Image2="IMAGE_2",k.Image3="IMAGE_3",k.Image4="IMAGE_4",k.Image5="IMAGE_5"}(Qg||(Qg={}));const Xg={[Qg.Image1]:ps.q.Pet_Merge_FTUE_New_Menu_slide1,[Qg.Image2]:ps.q.Pet_Merge_FTUE_New_Menu_slide2,[Qg.Image3]:ps.q.Pet_Merge_FTUE_New_Menu_slide3,[Qg.Image4]:ps.q.Pet_Merge_FTUE_New_Menu_slide4,[Qg.Image5]:ps.q.Pet_Merge_FTUE_New_Menu_slide5},Zg={[Qg.Image1]:ps.q.Pet_Merge_FTUE_New_Menu_slide1,[Qg.Image2]:ps.q.Pet_Merge_FTUE_New_Menu_slide2merge2,[Qg.Image3]:ps.q.Pet_Merge_FTUE_New_Menu_slide3,[Qg.Image4]:ps.q.Pet_Merge_FTUE_New_Menu_slide4,[Qg.Image5]:ps.q.Pet_Merge_FTUE_New_Menu_slide5merge2};let Jg=class extends ff.l{constructor(){super(...arguments),this._checkIfLoadedOnPrefabMap=!1}create(){if(super.create(),this._openOnCreate){if(this._checkIfLoadedOnPrefabMap&&j.Aq$.isDefined(this._popupManager))return;this.canOpen().then((k=>(0,G.sH)(this,void 0,void 0,(function*(){k&&(yield this.open())})))).catch(j.RQr.createHandler("Error opening pet merge FTUE popup"))}}destroy(){this.removeAllListeners(),super.destroy()}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return!this._breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_PET_MERGE,ls.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED)&&(!!eo.P8.canPlayerAccessPetMergeFeature()&&eg.N.cacheCanShowPetMergeTutorial())}))}open(){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.game.broadcaster.addAppListener(jn.ki.FtueCompleted,(()=>{this.removeAllListeners(),this.onClose.dispatch()}),this),this._breadcrumbManager.completeBreadcrumb(ls.B.FEATURE_PET_MERGE,ls.B.BREADCRUMB_PET_MERGE_FTUE_STARTED),this._segmentAnalytics.petMerge.sendPetMergeTutorialFunnelAdvancedEvent(ig.S4.TutorialUnlocked),yield eg.N.awardPetMergeFtueIngredients();const k=yield(0,sg.Ks)().loadWithDependenciesFromGUID(Rt.l.PetMergeFTUE);if((0,Bt.G)(Oh.m)){const B=(0,Bt.G)(tg.J),U=B?Zg:Xg,F=Object.values(U),G=Object.assign({PET_MERGE_2_ENABLED:B},U);yield tt.q.instance.prodigy.load.assetsAsPromise(F).then((()=>{Nt.d.updateInjectedValues(k,G)})).catch((k=>{j.VyI.log("Failed to load images on for the variant FTUE",j.$bb.Error)}))}k.transform.setPosition(tt.q.instance.game.width>>1,tt.q.instance.game.height>>1),k.setLayer(jh.E.OverlayLayer,!0),j.wa5.getActiveScene().addGameObject(k)}))}removeAllListeners(){tt.q.instance.game.broadcaster.removeAppListener(jn.ki.FtueCompleted,this)}};(0,G.Cg)([(0,j.Cdj)("PopupHandler"),(0,G.Sn)("design:type",el.Y)],Jg.prototype,"_popupManager",void 0),(0,G.Cg)([(0,j.Cdj)("12f-4e29"),(0,G.Sn)("design:type",sh.F)],Jg.prototype,"_breadcrumbManager",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],Jg.prototype,"_segmentAnalytics",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Jg.prototype,"_openOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Jg.prototype,"_checkIfLoadedOnPrefabMap",void 0),Jg=(0,G.Cg)([(0,j.EVk)("OpenPetMergePopup",W.Y.uiDialog)],Jg);let tm=class extends j.uAl{open(){tt.q.instance.prodigy.open.pets()}};tm=(0,G.Cg)([(0,j.EVk)("OpenPetbook",W.Y.ui)],tm);var em=U(6476),im=U(36811);let sm=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return!(0,Bt.G)(Zr.d3).enabled&&this._player.hasCompletedTutorial()&&this._questManager.awardsAvailableCount>0}))}close(){this.onClose.dispatch()}open(){return(0,G.sH)(this,void 0,void 0,(function*(){try{yield im.V.openPlayerGoalsIfPrizeReady(ui.$N.AutoSurfaced)}catch(k){j.VyI.log(`Error opening player goals: ${k}`,j.$bb.Error)}this.close()}))}};(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],sm.prototype,"_player",void 0),(0,G.Cg)([(0,j.Cdj)("d65-d7bb"),(0,G.Sn)("design:type",Sd.n)],sm.prototype,"_questManager",void 0),sm=(0,G.Cg)([(0,j.EVk)("OpenPlayerGoalsPopup",W.Y.uiDialog)],sm);U(22866),U(85056);let nm=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=this._game.state.getCurrentState(),U=tt.q.instance.prodigy.gameContainer.get("a02-c2b2"),F=j.Aq$.isDefined(null===(k=B.screenData)||void 0===k?void 0:k.battleResult)&&!U.userHasSeenFirstOffer();return U.userHasEligibleOfferAvailable()&&F}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){var B;yield k.open.call(this);const U=tt.q.instance.prodigy.gameContainer,F=U.get("a02-c2b2");U.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:null===(B=F.activeOffer)||void 0===B?void 0:B.id,funnelType:"segmented_offers",stepName:eh.l.SegmentedOffersViewed},{step_index:2}),gu.P.openConfiguredModal((()=>{F.setBreadcrumbHasSeenFirstOffer(),this.onClose.dispatch()}))}))}};(0,G.Cg)([(0,j.Cdj)("51c-03a0"),(0,G.Sn)("design:type",Fg.n)],nm.prototype,"_game",void 0),nm=(0,G.Cg)([(0,j.EVk)("OpenSegmentOffersAfterBattlePopup",W.Y.uiPopup)],nm);let am=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=tt.q.instance.prodigy.gameContainer.get("a02-c2b2"),B=this._loggedInPlayer.player.justLeveled&&k.userHasChangedSegment();return k.userHasEligibleOfferAvailable()&&B}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this);const B=tt.q.instance.prodigy.gameContainer.get("a02-c2b2");B.resetSurfacingBreadcrumbs(),gu.P.openConfiguredModal((()=>{B.setBreadcrumbHasSeenFirstOffer(),this.onClose.dispatch()}))}))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],am.prototype,"_loggedInPlayer",void 0),am=(0,G.Cg)([(0,j.EVk)("OpenSegmentOffersOnSegmentChangePopup",W.Y.uiPopup)],am);let rm=class extends ff.l{constructor(){super(...arguments),this._shouldCheckNotifications=!1}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return this._loggedInPlayer.player.hasCompletedTutorial()&&tt.q.instance.prodigy.notifications.canPlayNotification()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),this.onClose.dispatch(),tt.q.instance.prodigy.notifications.playNextNotification()}))}onFirstPopup(){this._shouldCheckNotifications=!0}update(){if(super.update(),this._shouldCheckNotifications){const{open:k,notifications:B}=tt.q.instance.prodigy;0===k.menus.length&&0===k.renderMenus.length&&null===k.chatMenu&&null===B.notificationTimer&&B.startTimer()}}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],rm.prototype,"_loggedInPlayer",void 0),rm=(0,G.Cg)([(0,j.EVk)("OpenSocialToasters",W.Y.uiPopup)],rm);var om=U(19145);let hm=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=om.Z.canShowSpellStatusEffectsTutorial(),B=k.canBeTransported?"":`Reason: ${k.info}`;return j.VyI.log(`${(new Date).toISOString()} Spell Status Effects tutorial ready state\ncan be transported: ${k.canBeTransported}\n${B}`,j.$bb.Info),k.canBeTransported}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),om.Z.instance.runSpellStatusEffectsTutorial((()=>{this.onClose.dispatch()}))}))}};hm=(0,G.Cg)([(0,j.EVk)("OpenSpellStatusEffectsTutorial",W.Y.uiPopup)],hm);let cm=class extends ff.l{constructor(){super(...arguments),this._menuVisuals=null}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=tt.q.instance.prodigy.gameContainer.get(ic.G.MathTower),B=this._loggedInPlayer.player;return k.isEnabledForPlayer(B)&&B.hasCompletedTutorial()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this);const B=tt.q.instance.prodigy.gameContainer.get(ic.G.MathTower).redirectTowerTownPopup();this._menuVisuals=B}))}getRootDisplayObject(){return this._menuVisuals}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],cm.prototype,"_loggedInPlayer",void 0),cm=(0,G.Cg)([(0,j.EVk)("OpenTowerTownPopup",W.Y.uiDialog)],cm);let dm=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return!1}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),this.onClose.dispatch()}))}};dm=(0,G.Cg)([(0,j.EVk)("OpenTrialMembershipEndedPopup",W.Y.uiDialog)],dm);let lm=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return this._dynamicStoreQuestManager.canTriggerOffer()}))}close(){this.onClose.dispatch()}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),yield this._dynamicStoreQuestManager.triggerCurrentOffer()}))}};(0,G.Cg)([(0,Gi.b)("7a1-ff33"),(0,G.Sn)("design:type",bd.s)],lm.prototype,"_dynamicStoreQuestManager",void 0),lm=(0,G.Cg)([(0,j.EVk)("OpenTriggeredOfferPopup",W.Y.uiPopup)],lm);U(99617);var um=U(19506);let fm=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return um.J.canShowUniquePetsIntro()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),um.J.runUniquePetsIntroSequence((()=>this.onClose.dispatch()))}))}};fm=(0,G.Cg)([(0,j.EVk)("OpenUniquePetsIntroSequence",W.Y.uiPopup)],fm);let bm=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){const{enabled:k}=(0,Bt.G)(qt.d);if(!k)return!1;this._lastClaimData=yield this._networkHandler.getAllowanceClaimData();const{totalClaimable:B}=this._lastClaimData;return B.some(Wb.cR)}))}open(){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.prodigy.open.openWizardBank({originType:ui.$N.AutoSurfaced},(()=>{this.onClose.dispatch()}))}))}};(0,G.Cg)([(0,j.Cdj)("231-9111"),(0,G.Sn)("design:type",Hb.b)],bm.prototype,"_networkHandler",void 0),bm=(0,G.Cg)([(0,j.EVk)("OpenWizardBankModalPopupComponent",W.Y.membership)],bm);var pm=U(32389);let vm=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return!!(0,Bt.G)(pm.q).enabled&&(!(this._activePlayer.getLevel()super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),tt.q.instance.prodigy.open.openWizardCostumesMenu(ui.$N.AutoSurfaced),this.onClose.dispatch()}))}};(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],vm.prototype,"_activePlayer",void 0),vm=(0,G.Cg)([(0,j.EVk)("OpenWizardCostumesFtuePopup",W.Y.uiDialog)],vm);U(24981);var gm=U(4631);let mm=class extends j.uAl{constructor(){super(...arguments),this.onZoneHandlesLeaving=new j.HN0,this.onZoneDoesNotHandleLeaving=new j.HN0}destroy(){this.onZoneHandlesLeaving.dispose(),this.onZoneDoesNotHandleLeaving.dispose(),super.destroy()}handleLeaving(){const k=tt.q.instance.prodigy.world.getZone(tt.q.instance.prodigy.world.getCurrentZone());k?k.handleLeaving(this._leavingType,(()=>{this.onZoneHandlesLeaving.dispatch()})):this.onZoneDoesNotHandleLeaving.dispatch()}};(0,G.Cg)([(0,j.gfw)(gm.j),(0,G.Sn)("design:type",Number)],mm.prototype,"_leavingType",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],mm.prototype,"onZoneHandlesLeaving",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],mm.prototype,"onZoneDoesNotHandleLeaving",void 0),mm=(0,G.Cg)([(0,j.EVk)("HandleLeavingGuard",W.Y.MapTeleport)],mm);let ym=class extends j.uAl{constructor(){super(...arguments),this._isCloseMapDisabled=!1,this._disableZoneGoals=!1,this._closeOtherMenus=!1,this._hideDifficultySelector=!1,this._lockClassDisabledZones=!1,this._lockedZones=[],this._awardGemForZoneID="",this._injectedValues={},this._onWorldMapClosed=new j.HN0,this.difficultyOverride=void 0}overrideZoneHandlesLeavingEvent(){this._awardGemForZoneID?Lg.i.setNextVisitParameters(Object.assign(Object.assign({},this.getWorldMapOptions(this._awardGemForZoneID.length>0)),{onInitialized:k=>{k.showGemAwardedSequence(this._awardGemForZoneID).catch((()=>j.VyI.log("Failed to show gem awarded sequence",j.$bb.Error)))}})):(this.difficultyOverride&&!Lg.i.isInDifficultyMode(this.difficultyOverride)&&Lg.i.setDifficultyMode(this.difficultyOverride),Lg.i.setNextVisitParameters(Object.assign({},this.getWorldMapOptions())))}getWorldMapOptions(k=!1){return k||this.setLockClassDisabledZones(),{disableClose:this._isCloseMapDisabled,forceLock:this._lockedZones,onClose:()=>this._onWorldMapClosed.dispatch(),disableZoneGoals:this._disableZoneGoals,injectedValues:this._injectedValues,disableDifficultyModeSelect:this._hideDifficultySelector,difficultyMode:this.difficultyOverride,autoOpenDialogueForZoneID:this._autoOpenDialogueForZoneID}}setLockClassDisabledZones(){if(this._lockClassDisabledZones){const k=tt.q.instance.prodigy.classModeController.getInClassDisabledZones().filter((k=>!1===this._lockedZones.includes(k)));this._lockedZones.push(...k)}}openWorldMap(){this._closeOtherMenus&&tt.q.instance.prodigy.open.menuCloseAll(),this.difficultyOverride&&!Lg.i.isInDifficultyMode(this.difficultyOverride)&&Lg.i.setDifficultyMode(this.difficultyOverride),tt.q.instance.prodigy.open.map(this.getWorldMapOptions())}destroy(){this._onWorldMapClosed.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("HandleLeavingGuard"),(0,G.Sn)("design:type",mm)],ym.prototype,"_handleLeavingGuard",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ym.prototype,"_isCloseMapDisabled",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ym.prototype,"_disableZoneGoals",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ym.prototype,"_closeOtherMenus",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ym.prototype,"_hideDifficultySelector",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ym.prototype,"_lockClassDisabledZones",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],ym.prototype,"_lockedZones",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ym.prototype,"_awardGemForZoneID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ym.prototype,"_autoOpenDialogueForZoneID",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],ym.prototype,"_injectedValues",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ym.prototype,"_onWorldMapClosed",void 0),(0,G.Cg)([(0,j.gfw)(fe.i),(0,G.Sn)("design:type",String)],ym.prototype,"difficultyOverride",void 0),ym=(0,G.Cg)([(0,j.EVk)("OpenWorldMap",W.Y.ui)],ym);let _m=class extends j.uAl{constructor(){super(...arguments),this._yesButtonText="BUTTON_OKAY_CAPITAL",this._hideCancelButton=!1,this.onYes=new j.HN0,this.onNo=new j.HN0}start(){const k=tt.q.instance.prodigy.gameContainer.get("b5b-6fa4"),B=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),U=B.hasText(this._yesButtonLocalizationKey)?B.getText(this._yesButtonLocalizationKey):B.getText(this._yesButtonText);k.addEvents([{dialogueData:k.dataProvider.get(this._dialogueID),blockInput:!0,yes:()=>this.onYes.dispatch(),no:()=>this.onNo.dispatch(),nextButtonText:this._nextButtonText,yesButtonText:U,isCancelButtonVisible:!this._hideCancelButton}]),k.start(!0)}destroy(){this.onYes.dispose(),this.onNo.dispose(),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],_m.prototype,"_dialogueID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],_m.prototype,"_nextButtonText",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],_m.prototype,"_yesButtonLocalizationKey",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],_m.prototype,"_yesButtonText",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],_m.prototype,"_hideCancelButton",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],_m.prototype,"onYes",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],_m.prototype,"onNo",void 0),_m=(0,G.Cg)([(0,j.EVk)("OpenYesNoDialogue",W.Y.uiDialog)],_m);var Em=U(38454),wm=U(15804);let Tm=class extends ff.l{constructor(){super(...arguments),this.onSkipped=new j.HN0,this._contentInputBlocker=null}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;return this._zoneName=null!==(k=this._loggedInPlayer.player.data.zone)&&void 0!==k?k:"",!!wm.h.shouldShowEntryIllustration(this._zoneName)||(this.onSkipped.dispatch(),!1)}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),this.setupContentInputBlocker(),this.openZoneEntryIllustration((()=>{this.onClose.dispatch()}))}))}openZoneEntryIllustration(k){wm.h.openZoneEntryIllustrationPrefabForZone(this._zoneName.split("-")[0]).then((B=>{this._game.broadcaster.broadcast(jn.Y1.HideHUD,jn.HG.HUD),this.destroyContentInputBlocker(),B.findComponentInChildren(Em.V).onComplete.addOnce((()=>{this._game.broadcaster.broadcast(jn.Y1.ShowHUD,jn.HG.HUD),null==k||k(),B.destroy()}))})).catch(j.RQr.createHandler("Could not load the zone entry illustration prefab"))}setupContentInputBlocker(){if(j.Aq$.isDefined(this._contentInputBlocker))return;this._contentInputBlocker=new j._mx,this._contentInputBlocker.addComponent(j.dLy);this._contentInputBlocker.addComponent(Fe.n).setSize(this._game.width,this._game.height),this._contentInputBlocker.setLayer(jh.E.ForegroundLayer)}destroyContentInputBlocker(){var k;null===(k=this._contentInputBlocker)||void 0===k||k.destroy(),this._contentInputBlocker=null}destroy(){this.onSkipped.dispose(),this.destroyContentInputBlocker(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Tm.prototype,"onSkipped",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Tm.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("51c-03a0"),(0,G.Sn)("design:type",Fg.n)],Tm.prototype,"_game",void 0),Tm=(0,G.Cg)([(0,j.EVk)("OpenZoneEntryIllustration",W.Y.uiPopup)],Tm);var Sm=U(5075);let Am=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return Sm.H.canShowEntryPopup()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),tt.q.instance.prodigy.open.prefabMenu(Rt.l.ZoneUnlockedPopup,(()=>{Sm.H.completeEntryBreadcrumb(),this.onClose.dispatch()}),void 0,void 0,void 0,{ZONE_STATUS_MODAL_TYPE:Sm.A.UNLOCKED,ZONE_STATUS_POPUP_TARGET_ID:Lg.i.getHighestAvailableZoneData().zone})}))}};Am=(0,G.Cg)([(0,j.EVk)("OpenZoneUnlockedPopup",W.Y.uiPopup)],Am);let Cm=class extends j.uAl{_setVisibility(k){tt.q.instance.game.broadcaster.broadcast(k?jn.Y1.ShowHUD:jn.Y1.HideHUD,jn.HG.HUD,[])}show(){this._setVisibility(!0)}hide(){this._setVisibility(!1)}};(0,G.Cg)([(0,j.DTs)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[Boolean]),(0,G.Sn)("design:returntype",void 0)],Cm.prototype,"_setVisibility",null),Cm=(0,G.Cg)([(0,j.EVk)("ToggleHUD",W.Y.ui)],Cm);let Om=class extends j.uAl{getCustomData(){const k={},B=this._loggedInPlayer.player.kennel.petTeam,U=B.length;for(let F=0;F{this.image.sprite.setTexture(k.texture),this.image.sprite.key=this.cacheKey;const B=tt.q.instance.game.cache.getFrameData(this.sourceImageKey);B&&(this.cacheColoredAnimationFrames(k,B),this.image.sprite.animations.loadFrameData(B)),this.onImageRecolored.dispatch()})),k}))}cacheColoredAnimationFrames(k,B){const U=k.texture,F=new $e.Rectangle(0,0,U.width,U.height),G=B.total;for(let j=0;j{this.GameObject&&(this.clearRenderer(),this.createAttributeRenderer(),this.onAssetChanged.dispatch())})).catch((k=>{throw j.VyI.log(`CustomizablePlayerAttribute#updateAttribute: ${k}`,j.$bb.Error),new Error(k)}))}))}destroy(){this.clearRenderer(),this.onIDChanged.dispose(),this.onAssetChanged.dispose(),super.destroy()}clearRenderer(){const k=this.GameObject.findComponent(Ke._);null!==k&&k.destroy()}}(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$m.prototype,"onAssetChanged",void 0);(0,G.Cg)([(0,j.Cdj)(j.t5G.AssetLoader),(0,G.Sn)("design:type",Object)],class extends $m{constructor(){super(...arguments),this.colorizeComponent=null,this.onColorIDChanged=new j.HN0,this.colorID=null}get ColorID(){return this.colorID}set ColorID(k){this.colorID=k,this.onColorIDChanged.dispatch()}create(){super.create(),this.colorizeComponent=this.GameObject.addComponent(jm)}updateAttribute(){const k=Object.create(null,{updateAttribute:{get:()=>super.updateAttribute}});return(0,G.sH)(this,void 0,void 0,(function*(){var B;yield k.updateAttribute.call(this);const U=null===(B=this.GameObject)||void 0===B?void 0:B.findComponent(Ke._);U&&(this.colorizeComponent.Image=U,yield this.updateColor())}))}updateColor(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this.isValidColor()){const k=this.colorizeComponent.sourceImageKey=this.getSourceImageKey();this.assetLoader.isLoaded(k,j.iO0.Image)||(yield this.assetLoader.loadAssets([k])),this.colorizeComponent.colorReplaceData=this.getColorReplaceData(),this.colorizeComponent.cacheKey=this.getCacheKey(),this.colorizeComponent.replaceColor().catch((k=>{j.VyI.log(`Could not replace color on colorized player attribute, ${k.message}`,j.$bb.Warning)}))}else j.VyI.log(`ColoredCustomizablePlayerAttribute: Set invalid color ${this.ColorID}`,j.$bb.Warning)}))}destroy(){this.onColorIDChanged.dispose(),super.destroy()}}.prototype,"assetLoader",void 0);let Hm=class extends j.uAl{constructor(){super(...arguments),this._quantity=1,this.onItemConsumed=new j.HN0}destroy(){this.onItemConsumed.dispose(),super.destroy()}consumeItem(){this._itemType&&this._itemID&&(this._player.backpack.consume(this._itemType,this._itemID,this._quantity),this.onItemConsumed.dispatch(this._itemType,this._itemID,this._quantity),this._player.forceSaveCharacter())}setItem(k,B,U=1){this._itemType=k,this._itemID=B,this._quantity=U}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Hm.prototype,"_itemType",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Hm.prototype,"_itemID",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Hm.prototype,"_quantity",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Hm.prototype,"onItemConsumed",void 0),(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],Hm.prototype,"_player",void 0),Hm=(0,G.Cg)([(0,j.EVk)("ConsumeItem",W.Y.saving)],Hm);let Vm=class extends j.uAl{constructor(){super(...arguments),this._enable=!0}enablePlayerSaving(){this._loggedInPlayer.player.saveEnabled=this._enable}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Vm.prototype,"_enable",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Vm.prototype,"_loggedInPlayer",void 0),Vm=(0,G.Cg)([(0,j.EVk)("EnablePlayerSaving",W.Y.saving)],Vm);let Wm=class extends j.uAl{constructor(){super(...arguments),this.onXPReceived=new j.HN0,this._afterBattle=!1}destroy(){this.onXPReceived.dispose(),super.destroy()}setXPEarned(k){this._xpEarned=k}showSummary(){const k=ko.A.calculateXP(this._xpEarned),B=this._loggedInPlayer.player,U=B.kennel.petTeam.filter((k=>k));tt.q.instance.prodigy.open.resultsMenu(U,k,[],[],void 0,void 0,this._afterBattle).onClose=()=>{this.onXPReceived.dispatch(),B.updated=!0,B.kennel.updated=!0};const F=tt.q.instance.prodigy.gameContainer.get("c47-20b6");F.playerProgression.sendPlayerProgressionPointsEarnedEvent({pointType:"stars",pointCount:k.totalNonMemberXp+(B.hasMembership()?k.memberXp:0)},{instanceID:F.playerMovementAndDiscovery.getCurrentRunInstanceID(fi.N.CrystalCaverns),instanceType:fi.N.CrystalCaverns})}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Wm.prototype,"onXPReceived",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Wm.prototype,"_xpEarned",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Wm.prototype,"_afterBattle",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Wm.prototype,"_loggedInPlayer",void 0),Wm=(0,G.Cg)([(0,j.EVk)("GivePlayerXP",W.Y.player)],Wm);U(43485);let qm=class extends j.uAl{heal(){this._loggedInPlayer.player.heal()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],qm.prototype,"_loggedInPlayer",void 0),qm=(0,G.Cg)([(0,j.EVk)("HealPlayerTeam",W.Y.player)],qm);var Km=U(20136);class zm extends j.$KW{generate(k,B){return j.XRp.createVertical([j.Gme.checkboxGroup({id:"applyOnCreate",labelValue:"Apply On Create",inputValue:k.applyOnCreate}),j.Gme.numberGroup({id:"alpha",labelValue:"Alpha",inputValue:k.alpha,onChange:(k,B)=>{const U=j.cj9.clamp(B,zm.MIN_ALPHA,zm.MAX_ALPHA);U!==B&&this._editorAPI.modifyComponent(this._componentGuid,{alpha:U})}})])}}zm.MIN_ALPHA=0,zm.MAX_ALPHA=1;let Ym=class extends ad.b{initialize(){super.initialize();const k=new Km.Z;k.alpha=this.alpha,this._filterList.push(k)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ym.prototype,"alpha",void 0),Ym=(0,G.Cg)([(0,j.EVk)("AlphaPIXIFilter",W.Y.effect),(0,j.WR4)(zm)],Ym);var Qm=U(47389);let Xm=class extends j.uAl{create(){super.create(),this._appearanceSelector&&(this._playerData?(this._appearanceSelector.onAppearanceLoaded.add(this.updatePlayerOpacity,this),this.updatePlayerOpacity()):j.VyI.log("InvisibilityCloakOpacityComponent: Failed to initialize the component due to missing player data provider",j.$bb.Error))}destroy(){var k;null===(k=this._appearanceSelector.onAppearanceLoaded)||void 0===k||k.remove(this.updatePlayerOpacity,this),super.destroy()}updatePlayerOpacity(){116===this._playerData.player.equipment.getOutfit()?(this._alphaFilterComponent.alpha=this._equippedOpacity,this._alphaFilterComponent.reset()):this.clearEffect()}clearEffect(){this._alphaFilterComponent&&(this._alphaFilterComponent.alpha=1,this._alphaFilterComponent.removeFilter())}};(0,G.Cg)([(0,j.Cdj)("377-3e7b"),(0,G.Sn)("design:type",Object)],Xm.prototype,"_playerData",void 0),(0,G.Cg)([(0,j.MnK)(Qm.b),(0,G.Sn)("design:type",Qm.b)],Xm.prototype,"_appearanceSelector",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Xm.prototype,"_equippedOpacity",void 0),(0,G.Cg)([(0,j.MnK)(Ym),(0,G.Sn)("design:type",Ym)],Xm.prototype,"_alphaFilterComponent",void 0),Xm=(0,G.Cg)([(0,j.EVk)("InvisibilityCloakOpacity",W.Y.playerAnimation)],Xm);var Zm=U(63398);let Jm=class extends j.uAl{constructor(){super(...arguments),this._showWeapon=!1,this._onAppearanceReloaded=new j.HN0}get onAppearanceReloaded(){return this._onAppearanceReloaded}create(){super.create(),this.reloadPlayerAppearance=this.reloadPlayerAppearance.bind(this);const k=tt.q.instance.game.broadcaster;k.addAppListener(jn.J8.PlayerEditingMenuClosed,this.reloadPlayerAppearance,this),k.addAppListener(jn.J8.PlayerAppearanceUpdated,this.reloadPlayerAppearance,this)}postCreate(){super.postCreate(),this.loadPlayerAppearance()}destroy(){const k=tt.q.instance.game.broadcaster;k.removeAppListener(jn.J8.PlayerEditingMenuClosed,this),k.removeAppListener(jn.J8.PlayerAppearanceUpdated,this),this._onAppearanceReloaded.dispose(),this._onAppearanceReloaded=null,super.destroy()}addWeapon(k){this._weapon=k,this._showWeapon=!0,this.reloadPlayerAppearance()}removeWeapon(){this._showWeapon=!1,this._weapon=null,this.reloadPlayerAppearance()}loadPlayerAppearance(){const k=this._playerData.getAppearance();k.weapon=this._showWeapon?this._weapon:k.weapon,this._playerAppearanceSelector.setAppearance(k).catch(j.RQr.createHandler("Could not set player appearance"))}reloadPlayerAppearance(){this.loadPlayerAppearance(),this._onAppearanceReloaded.dispatch()}};(0,G.Cg)([(0,j.Pqz)(Qm.b),(0,G.Sn)("design:type",Qm.b)],Jm.prototype,"_playerAppearanceSelector",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],Jm.prototype,"_playerData",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Jm.prototype,"_onAppearanceReloaded",void 0),Jm=(0,G.Cg)([(0,j.EVk)("MainPlayerAppearanceListener",W.Y.playerAnimation)],Jm);j.uAl;var ty,ey=U(89717),iy=U(63115),sy=U(39325),ny=U(44356);class ay extends j.y4o{static make(k,B){const U=k.addComponent(ay,!1);return U.sprite=B,U.create(),U}create(){super.create(),this.setRootContainer(this.sprite)}getDimensions(){return new j.or0(this.sprite.width,this.sprite.height)}}let ry=ty=class extends j.uAl{constructor(){super(...arguments),this._emoteSprite=null,this._timer=null,this._tween=null}showEmote(k){const B=Yt.t.getItem("emote",k);if(!B)return j.VyI.log(`Emote ID ${k} is not valid.`,j.$bb.Warning),void tt.q.instance.prodigy.gameContainer.get("c47-20b6").playerIdentityAvatar.sendEmoteFailedEvent({emote_name:B.data.name,emote_type:ny.H.Emote,fail_reason:`Emote ID ${k} is not valid.`});this.showBubbleEmote(k)}showAnimatedEmote(k){this.stopBubbleEmote()}showBubbleEmote(k){this.stopAnimatedEmote(),this.stopBubbleEmote(),this._bubble.active=!0,this._emoteSprite=ay.make(this._emoteIcon,tt.q.instance.prodigy.create.sprite(0,0,fs.E.getIconForType("emote",k),null,null,null,ty.EMOTE_ICON_SIZE,ty.EMOTE_ICON_SIZE)),this._emoteSprite.sprite.name=`Chat Bubble Icon ${k}`,this._bubble.transform.localScale.x=0,this._bubble.transform.localScale.y=0,this._tween=tt.q.instance.game.add.tween(this._bubble.transform.localScale,this).to({x:1.2,y:1.2},200,j.GS3.Quadratic.Out).to({x:.8,y:1},200,j.GS3.Quadratic.In).to({x:1,y:.8},200,j.GS3.Quadratic.Out).to({x:1,y:1},200,j.GS3.Quadratic.In).start(),this._timer=window.setTimeout((()=>{this.stopBubbleEmote()}),ty.BUBBLE_EMOTE_DURATION)}stopAnimatedEmote(){this.cleanUpTimer()}stopBubbleEmote(){this._bubble&&(this._bubble.active=!1),this._emoteSprite&&(this._emoteSprite.destroy(),this._emoteSprite=null),this._tween&&(this._tween.remove(),this._tween=null),this.cleanUpTimer()}cleanUpTimer(){null!==this._timer&&(window.clearTimeout(this._timer),this._timer=null)}destroy(){this.stopAnimatedEmote(),this.stopBubbleEmote(),super.destroy()}};var oy;ry.EMOTE_ICON_SIZE=40,ry.BUBBLE_EMOTE_DURATION=3e3,(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ry.prototype,"_bubble",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ry.prototype,"_emoteIcon",void 0),ry=ty=(0,G.Cg)([(0,j.EVk)("PlayerChatEmote",W.Y.player)],ry);let hy=oy=class extends j.uAl{constructor(){super(...arguments),this._chatStarted=new j.HN0,this._chatEnded=new j.HN0,this._timer=null}setChat(k){j.Aq$.isDefined(k)?(this._chatText.GameObject.active=!0,this._chatText.text=`"${k}"`,null===this._timer?this._chatStarted.dispatch():window.clearTimeout(this._timer),this._timer=window.setTimeout((()=>{this.clearChat()}),oy.CHAT_TIMER)):j.VyI.log("Invalid chat message received",j.$bb.Error)}clearChat(){var k;j.Aq$.isDefined(this._timer)&&(window.clearTimeout(this._timer),this._timer=null),(null===(k=this._chatText)||void 0===k?void 0:k.GameObject)&&(this._chatText.GameObject.active=!1),this._chatEnded.dispatch()}destroy(){this._chatStarted.dispose(),this._chatEnded.dispose(),this.clearChat(),super.destroy()}};hy.CHAT_TIMER=5e3,(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],hy.prototype,"_chatText",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hy.prototype,"_chatStarted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hy.prototype,"_chatEnded",void 0),hy=oy=(0,G.Cg)([(0,j.EVk)("PlayerChatMessage",W.Y.player)],hy);let cy=class extends j.JTX{startDance(k){this._pathLocomotion.stop(),this._animationStateController.playAnimation(k)}};(0,G.Cg)([(0,j.MnK)(sy.F),(0,G.Sn)("design:type",sy.F)],cy.prototype,"_animationStateController",void 0),(0,G.Cg)([(0,j.MnK)(j.KhP),(0,G.Sn)("design:type",j.KhP)],cy.prototype,"_pathLocomotion",void 0),cy=(0,G.Cg)([(0,j.EVk)("PlayerDance",W.Y.player)],cy);let dy=class extends Zm.k{create(){super.create(),this.setCurrentToBindPose()}updateFrameName(k){const B=this.GameObject.findComponent(Ke._);null!==B&&B.setFrameName(`${this.AnimationTargetKey}_${k}`)}};dy=(0,G.Cg)([(0,j.EVk)("PlayerKeyFrameAnimator",W.Y.playerAnimation)],dy);let ly=class extends j.uAl{constructor(){super(...arguments),this.onPlayerMoved=new j.HN0,this.onPlayerStopped=new j.HN0,this._isStopped=!0}create(){var k,B;super.create();const U=tt.q.instance.game.state.get(Tt.G.TileScreen);(null==U?void 0:U.user)?(this._mainPlayerContainer=U.user,null===(k=this._mainPlayerContainer)||void 0===k||k.onPathFound.add(this.playerSetPath,this),null===(B=this._mainPlayerContainer)||void 0===B||B.onStand.add(this.playerStopped,this)):this._playerLocomotion?(this._playerLocomotion.onPathStart.add(this.playerSetPath,this),this._playerLocomotion.onPathEnd.add(this.playerStopped,this)):j.VyI.log(`PlayerMovementSignalComponent attached to ${this.gameObject.name}. No TileScreen or PathLocomotionComponent found.`,j.$bb.Warning)}playerSetPath(k){this.onPlayerMoved.dispatch(),this._isStopped=!1}playerStopped(){this._isStopped||this.onPlayerStopped.dispatch(),this._isStopped=!0}destroy(){var k,B,U,F;this.onPlayerStopped.dispose(),this.onPlayerMoved.dispose(),null===(k=this._mainPlayerContainer)||void 0===k||k.onPathFound.remove(this.playerSetPath,this),null===(B=this._mainPlayerContainer)||void 0===B||B.onStand.remove(this.playerSetPath,this),null===(U=this._playerLocomotion)||void 0===U||U.onPathStart.remove(this.playerSetPath,this),null===(F=this._playerLocomotion)||void 0===F||F.onPathEnd.remove(this.playerStopped,this),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("PlayerLocomotion"),(0,G.Sn)("design:type",j.KhP)],ly.prototype,"_playerLocomotion",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ly.prototype,"onPlayerMoved",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ly.prototype,"onPlayerStopped",void 0),ly=(0,G.Cg)([(0,j.EVk)("PlayerMovementSignal",W.Y.motion)],ly);var uy=U(37193);let fy=class extends j.uAl{create(){super.create(),this.updateNameplate(),tt.q.instance.game.broadcaster.addAppListener(jn.J8.PlayerAppearanceUpdated,this.updateNameplate,this)}updateNameplate(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._playerData){{const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0");this._playerData.isActivePlayer()&&k.player.shouldShowUsernameAbovePlayer()?k.player.shouldShowWizardNameAbovePlayer()?(this._nameLabel.text=this._playerData.player.getName(),this._secondaryNameLabel.text=k.loginCredentials.username):(this._nameLabel.text=k.loginCredentials.username,this._nameLabel.stroke=$h.E.USERNAME_DISPLAY_STROKE_COLOR,this._nameLabel.strokeThickness=$h.E.USERNAME_DISPLAY_STROKE_THICKNESS,this._nameLabel.fontSize=$h.E.USERNAME_DISPLAY_FONT_SIZE,this._nameLabel.update()):this._nameLabel.text=this._playerData.player.getName()}{const k=this._playerData.isMember();if(this._membershipIcon.GameObject.active=k,k){if(js.D.isFeatureEnabled()&&this._playerData.isActivePlayer()){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getMemberTier(),B=uy.i.PLAYER_MEMBERSHIP_ICON_IMAGES[k];B&&(yield this._membershipIcon.setAsset(B.atlas,B.frame))}this._membershipIcon.isLoaded||(yield new Promise((k=>{this._membershipIcon.OnLoaded.addOnce(k)})));const k=this._nameLabel.TextObject;this._membershipIcon.GameObject.transform.setPosition(Math.floor(-.5*(k.width+this._membershipIcon.getWidth()+1)),Math.floor(k.y+1)),this._nameLabel.GameObject.transform.setPosition(Math.floor(.5*this._membershipIcon.getWidth()),0)}}}}))}destroy(){tt.q.instance.game.broadcaster.removeAppListener(jn.J8.PlayerAppearanceUpdated,this)}};(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],fy.prototype,"_membershipIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],fy.prototype,"_nameLabel",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],fy.prototype,"_secondaryNameLabel",void 0),(0,G.Cg)([(0,j.Cdj)("377-3e7b"),(0,G.Sn)("design:type",Object)],fy.prototype,"_playerData",void 0),fy=(0,G.Cg)([(0,j.EVk)("PlayerNameplate",W.Y.player)],fy);U(6190);var by=U(82209);let py=class extends j.uAl{constructor(){super(...arguments),this._enableInput=!0,this._facingDirection=Me.y.Right,this._onPlayerSpawned=new j.HN0}spawn(k){this._spawnParent.children.forEach((k=>k.destroy()));const B=new by.z,U={"377-3e7b":B,FacingDirection:this._facingDirection};B.initialize(k),Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Rt.l.RemotePlayer,U,this._spawnParent).then((k=>(0,G.sH)(this,void 0,void 0,(function*(){this.GameObject&&!this.GameObject.isDestroyed&&(this._playerGameObject=k,this._playerGameObject.active=!1,this.setInputEnabled(),this.setAlertHeight(),this.setAnimations(),yield this.setPlayerAppearance(B),!this.GameObject||this.GameObject.isDestroyed||this._playerGameObject.isDestroyed||(this._playerGameObject.active=!0,this._onPlayerSpawned.dispatch(this._playerGameObject)))})))).catch(j.RQr.createHandler("[SpawnPlayerAppearanceComponent] Error loading Player Prefab"))}setPlayerAppearance(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=this._playerGameObject.findComponentInChildren(Qm.b).setAppearance(k.getAppearance()).catch(j.RQr.createHandler("[SpawnPlayerAppearanceComponent] setAppearance failed")),U=this._playerGameObject.findComponentInChildren(iy.T),F=U?U.updateMountAppearance().catch(j.RQr.createHandler("[SpawnPlayerAppearanceComponent] updateMountAppearance failed")):Promise.resolve();yield Promise.all([B,F])}))}setInputEnabled(){this._playerGameObject.findComponentInChildren(em.T).GameObject.active=this._enableInput}setAlertHeight(){const k=this._playerGameObject.findComponentInChildren(fy),B=this._speechBubble.transform;B.setPosition(B.localPosition.x,k.GameObject.transform.localPosition.y)}setAnimations(){const k=this._playerGameObject.findComponentInChildren(Rn.K);this._alertFSM.animationController=k,k.changeState(0);const B=this._playerGameObject.findComponentInChildren(j.KhP);this._alertFSM.monsterWalk.onMoveStart.addOnce((()=>B.setPath([this.gameObject.transform.worldPosition,this._alertFSM.monsterWalk.MoveTarget])))}destroy(){this._onPlayerSpawned.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],py.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],py.prototype,"_spawnParent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],py.prototype,"_speechBubble",void 0),(0,G.Cg)([(0,j.MnK)(Ti.K),(0,G.Sn)("design:type",Ti.K)],py.prototype,"_alertFSM",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],py.prototype,"_enableInput",void 0),(0,G.Cg)([(0,j.gfw)(Me.y),(0,G.Sn)("design:type",Number)],py.prototype,"_facingDirection",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],py.prototype,"_onPlayerSpawned",void 0),py=(0,G.Cg)([(0,j.EVk)("SpawnPlayerAppearance",W.Y.player)],py);U(97530),U(54584),U(86675),U(48215),U(17737);let vy=class extends j.uAl{constructor(){super(...arguments),this._bodyLocalizationKey="MULTIPLIER_AD_BODY_TITANSHARD"}create(){super.create(),this._bodyMessage.text=this._localizer.getText(this._bodyLocalizationKey,this._weekendEvents.getTitanShardMultiplier())}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],vy.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],vy.prototype,"_bodyLocalizationKey",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],vy.prototype,"_bodyMessage",void 0),(0,G.Cg)([(0,j.Cdj)("12b-405a"),(0,G.Sn)("design:type",Xp.n)],vy.prototype,"_weekendEvents",void 0),vy=(0,G.Cg)([(0,j.EVk)("SetTitanShardEventAdText",W.Y.uiAd)],vy);var gy=U(46902),my=U(59347);let yy=class extends j.uAl{setTeleportMapTag(k){this._canTeleport&&(this._canTeleport.mapTag=k),this._teleport&&(this._teleport.mapTag=k),k&&(this._teleportMessage.key=this._localizer.getText("TRAVEL_CONFIRM_MESSAGE",tt.q.instance.prodigy.world.getZone(k.split("-")[0]).name))}setupTeleport(k){this.setTeleportMapTag(Lg.i.getTeleportMapTag(this._weekendEvents.isMultiZone(k)?this._weekendEvents.getRandomZoneID(k):k))}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],yy.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.MnK)(is.$),(0,G.Sn)("design:type",is.$)],yy.prototype,"_canTeleport",void 0),(0,G.Cg)([(0,j.MnK)(ss.q),(0,G.Sn)("design:type",ss.q)],yy.prototype,"_teleport",void 0),(0,G.Cg)([(0,j.MnK)(my.S),(0,G.Sn)("design:type",my.S)],yy.prototype,"_teleportMessage",void 0),(0,G.Cg)([(0,j.Cdj)("12b-405a"),(0,G.Sn)("design:type",Xp.n)],yy.prototype,"_weekendEvents",void 0),yy=(0,G.Cg)([(0,j.EVk)("SetupEventAdTeleport",W.Y.uiAd)],yy);let _y=class extends j.uAl{constructor(){super(...arguments),this._bodyLocalizationKey="MULTIPLIER_AD_BODY_CURRENCY",this.ZoneCurrencyAssets={[Ft.A_.SHIVERCHILL]:ps.q._2xShivers_CurrencyWeekend,[Ft.A_.SHIPWRECK]:ps.q._2xYars_CurrencyWeekend,[Ft.A_.SKYWATCH]:ps.q._2xAeros_CurrencyWeekend,[Ft.A_.FOREST]:ps.q._2xFlorians_CurrencyWeekend,[Ft.A_.BONFIRE]:ps.q._2xHotHots_CurrencyWeekend,[gy.Q.AllZones]:ps.q._2xAll_CurrencyWeekend}}create(){super.create();const k=this._weekendEvents.getEvents(Xp.R.Currency);let B="",U="",F="";k.forEach(((G,j)=>{this.setAdImage(this.getAdImage(G.zone)),B+=this._weekendEvents.getZoneDisplayName(G.zone),U+=G.bonusMultiplier,F+=this.getCurrencyType(G.zone),j===k.length-2?(B+=" & ",U+=" & ",F+=" & "):j!==k.length-1&&(B+=", ",U+=", ",F+=", "),this._setupEventAdTeleport.setupTeleport(G.zone)})),this._bodyMessage.text=this._localizer.getText(this._bodyLocalizationKey,U,F,B)}getCurrencyType(k){if(k===gy.Q.Global||k===gy.Q.AllZones)return this._localizer.getText("MONEY");if(k===gy.Q.AllInstances)return this._localizer.getText("GOLD");const B=tt.q.instance.prodigy.world.getZone(k).currency;return B?Yt.t.getItem("currency",B).data.name:this._localizer.getText("GOLD")}getAdImage(k){var B;return null!==(B=this.ZoneCurrencyAssets[k])&&void 0!==B?B:ps.q.CurrencyWeekend_gold_coin}setAdImage(k){var B;null===(B=this._adImage)||void 0===B||B.setAsset(k)}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],_y.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],_y.prototype,"_bodyLocalizationKey",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],_y.prototype,"_bodyMessage",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],_y.prototype,"_adImage",void 0),(0,G.Cg)([(0,j.Cdj)("12b-405a"),(0,G.Sn)("design:type",Xp.n)],_y.prototype,"_weekendEvents",void 0),(0,G.Cg)([(0,j.MnK)(yy),(0,G.Sn)("design:type",yy)],_y.prototype,"_setupEventAdTeleport",void 0),_y=(0,G.Cg)([(0,j.EVk)("SetupCurrencyEventAd",W.Y.uiAd)],_y);let Ey=class extends j.uAl{constructor(){super(...arguments),this._bodyLocalizationKey="MULTIPLIER_AD_BODY_XP"}create(){super.create();const k=this._weekendEvents.getEvents(Xp.R.Xp);let B="",U="";k.forEach(((F,G)=>{B+=this._weekendEvents.getZoneDisplayName(F.zone),U+=F.bonusMultiplier,G===k.length-2?(B+=" & ",U+=" & "):G!==k.length-1&&(B+=", ",U+=", "),this._setupEventAdTeleport.setupTeleport(F.zone)})),this._bodyMessage.text=this._localizer.getText(this._bodyLocalizationKey,U,B)}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Ey.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ey.prototype,"_bodyLocalizationKey",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ey.prototype,"_bodyMessage",void 0),(0,G.Cg)([(0,j.Cdj)("12b-405a"),(0,G.Sn)("design:type",Xp.n)],Ey.prototype,"_weekendEvents",void 0),(0,G.Cg)([(0,j.MnK)(yy),(0,G.Sn)("design:type",yy)],Ey.prototype,"_setupEventAdTeleport",void 0),Ey=(0,G.Cg)([(0,j.EVk)("SetupXpEventAd",W.Y.uiAd)],Ey);let wy=class extends j.uAl{postCreate(){super.postCreate(),this.applyBlendMode()}applyBlendMode(){if(this.target){const k=this.target.getRootContainer();"blendMode"in k?k.blendMode=this._blendMode:j.VyI.log("This RenderComponent type is not yet supported.",j.$bb.Error)}}};var Ty;(0,G.Cg)([(0,j.MnK)(j.y4o),(0,G.Sn)("design:type",j.y4o)],wy.prototype,"target",void 0),(0,G.Cg)([(0,j.gfw)($e.BLEND_MODES),(0,G.Sn)("design:type",Number)],wy.prototype,"_blendMode",void 0),wy=(0,G.Cg)([(0,j.EVk)("BlendModeRender",W.Y.effect)],wy),function(k){k[k.Clamp=0]="Clamp",k[k.Shrink=1]="Shrink",k[k.Grow=2]="Grow",k[k.None=3]="None"}(Ty||(Ty={}));let Sy=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.widthMode=Ty.Clamp,this.heightMode=Ty.Clamp,this.widthBounds=new j.I9Y(Number.MIN_VALUE,Number.MAX_VALUE),this.heightBounds=new j.I9Y(Number.MIN_VALUE,Number.MAX_VALUE)}postCreate(){this.addListenerToSignal(this._rectTransform.onRecalculatedBounds,this.limitRectToBounds.bind(this)),this.limitRectToBounds()}limitRectToBounds(){const{widthDelta:k,heightDelta:B}=this._rectTransform;this._rectTransform.setSizeDelta(this.getValueWithBounds(k,this.widthBounds,this.widthMode),this.getValueWithBounds(B,this.heightBounds,this.heightMode))}getValueWithBounds(k,B,U){return(()=>{switch(U){case Ty.Shrink:return Math.min(k,B.x);case Ty.Grow:return Math.max(k,B.y);case Ty.None:return k;case Ty.Clamp:default:return j.cj9.clamp(k,B.x,B.y)}})()}};(0,G.Cg)([(0,j.Pqz)(j.XVE),(0,G.Sn)("design:type",j.XVE)],Sy.prototype,"_rectTransform",void 0),(0,G.Cg)([(0,j.gfw)(Ty),(0,G.Sn)("design:type",Number)],Sy.prototype,"widthMode",void 0),(0,G.Cg)([(0,j.gfw)(Ty),(0,G.Sn)("design:type",Number)],Sy.prototype,"heightMode",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],Sy.prototype,"widthBounds",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],Sy.prototype,"heightBounds",void 0),Sy=(0,G.Cg)([(0,j.EVk)("BoundRectSize",W.Y.uiLayout,"Bind the size of a rect transform to these magic vectors!")],Sy);U(44725);let Ay=class extends j.y4o{constructor(){super(...arguments),this._atlas=null,this._dotImageDefault=null,this._dotImageInProgress=null,this._dotImageComplete=null,this._lineImageDefault=null,this._lineImageComplete=null,this._customEndImageDefault=null,this._customEndImageInProgress=null,this._customEndImageComplete=null,this._lineOffsetX=0,this._endOffsetX=0,this._fixedLength=-1,this._actualTotalLength=0,this._dotsDefault=[],this._dotsInProgress=[],this._dotsComplete=[],this._linesDefault=[],this._linesComplete=[],this.onDiscreteImageProgressMeterCreated=new j.HN0}create(){super.create(),this.addNewDot(),this.addNewLine(),this.onDiscreteImageProgressMeterCreated.dispatch()}addNewDot(k=!1){this.createImage(k&&this._customEndImageDefault?this._customEndImageDefault:this._dotImageDefault,this._dotsDefault,!0),this.createImage(k&&this._customEndImageInProgress?this._customEndImageInProgress:this._dotImageInProgress,this._dotsInProgress,!0),this.createImage(k&&this._customEndImageComplete?this._customEndImageComplete:this._dotImageComplete,this._dotsComplete,!0)}addNewLine(){this.createImage(this._lineImageDefault,this._linesDefault),this.createImage(this._lineImageComplete,this._linesComplete)}createImage(k,B,U=!1){const F=new j._mx(this.gameObject);F.addComponent(j.dLy);const G=F.addComponent(j.vYh);G.updateAsset(this._atlas,k),G.GameObject.active=!0,U&&G.GameObject.sendToBack(),B.push(F)}setFixedLength(k){this._actualTotalLength=0?this._fixedLength:null!=B?B:0,this._totalLength!==this._actualTotalLength){for(this._actualTotalLength=this._totalLength;this._dotsDefault.length=0&&this._dotsDefault.length===this._totalLength-1);for(;this._linesDefault.length=0?this._endOffsetX:0,j=Fk,this._dotsInProgress[U].active=U===k,this._dotsComplete[U].active=U=k,this._linesComplete[U].active=U{var B;k.keyCode===Dy.D.ENTER&&(null===(B=this.submitButton)||void 0===B?void 0:B.getButtonState())!==Ku.K.Disabled&&this.submitButton.IsActiveInHierarchy&&this.submitForm()}))}destroy(){this.onSubmit.dispose(),super.destroy()}submitForm(){const k=this.gameObject.findComponentsInChildren(kt.S).map((k=>k._input.value));this.onSubmit.dispatch(...k)}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ry.prototype,"onSubmit",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],Ry.prototype,"submitButton",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Ry.prototype,"submitOnEnter",void 0),Ry=(0,G.Cg)([(0,j.EVk)("Form",W.Y.uiInput)],Ry);let Py=class extends j.uAl{constructor(){super(...arguments),this._loadingAtlas=Ve._.General_core_json,this.onStartLoading=new j.HN0,this.onAssetLoaded=new j.HN0,this.forceNativeImageSize=!1}init(){j.Aq$.isDefined(this._loadingSpinner)||(this._loadingSpinner=this.gameObject.addComponent(Ke._)),this._loadingSpinner.setAsset(this._loadingAtlas,"loading").then((()=>{this.gameObject.isDestroyed||this._loadingSpinner.GameObject.isDestroyed||(this._loadingTween?this._loadingTween.stop():this._loadingTween=tt.q.instance.game.add.tween(this._loadingSpinner.GameObject.transform,this._loadingSpinner.GameObject).to({localRotation:360},2e3,j.GS3.Linear.None,!1,0,-1),this._loadingSpinner.Active&&this._loadingTween.start())})).catch(j.RQr.createHandler("Failed to load loading spinner")),this._loadingSpinner.Active=!1}updateAsset(k,B){var U;this._loadingSpinner||this.init(),this.onStartLoading.dispatch(k,B),tt.q.instance.prodigy.load.isFileLoaded(k)?this.setAsset(k,B):(null===(U=this._loadingTween)||void 0===U||U.start(),this._graphic.Active=!1,this._loadingSpinner.Active=!0,tt.q.instance.prodigy.load.assets(k,(()=>this.setAsset(k,B))))}setAsset(k,B){var U;if(null===(U=this._loadingTween)||void 0===U||U.stop(),this._graphic.Active=!0,this._loadingSpinner.Active=!1,this.gameObject.transform.localRotation=0,this.onAssetLoaded.dispatch(k,B),this._graphic.updateAsset(k,B),this.forceNativeImageSize){const k=this.gameObject.findComponent(j.XVE);j.Aq$.isDefined(k)&&(k.widthDelta=this._graphic.getDimensions().width,k.heightDelta=this._graphic.getDimensions().height)}}destroy(){this.onStartLoading.dispose(),this.onAssetLoaded.dispose(),tt.q.instance.game.tweens.remove(this._loadingTween),this._loadingTween=null,super.destroy()}};(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],Py.prototype,"_loadingAtlas",void 0),(0,G.Cg)([(0,j.Pqz)(j.vYh),(0,G.Sn)("design:type",j.vYh)],Py.prototype,"_graphic",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Py.prototype,"onStartLoading",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Py.prototype,"onAssetLoaded",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Py.prototype,"forceNativeImageSize",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],Py.prototype,"_loadingSpinner",void 0),Py=(0,G.Cg)([(0,j.EVk)("GraphicAssetLoader",W.Y.utility)],Py);U(12861);let My=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.setWidth=!0,this.setHeight=!0}postCreate(){var k;this._parentRect=null===(k=this.gameObject.parent)||void 0===k?void 0:k.findComponent(j.XVE),null!=this._parentRect&&this.addListenerToSignal(this._parentRect.onDimensionsChanged,this.updateDimensions.bind(this)),this.addListenerToSignal(this._rectTransform.onDimensionsChanged,this.updateDimensions.bind(this)),this.updateDimensions()}updateDimensions(){null!=this._parentRect&&this._rectTransform.setSizeDelta(this.setWidth?this._parentRect.fullWidth:this._rectTransform.fullWidth,this.setHeight?this._parentRect.fullHeight:this._rectTransform.fullHeight)}};(0,G.Cg)([(0,j.Pqz)(j.XVE),(0,G.Sn)("design:type",j.XVE)],My.prototype,"_rectTransform",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],My.prototype,"setWidth",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],My.prototype,"setHeight",void 0),My=(0,G.Cg)([(0,j.EVk)("GrowToContainer",W.Y.uiLayout,"Size your object to fill its container (uses width and height instead of anchors)")],My);U(21397),U(79979);var Ny=U(23034),xy=U(7259);let Ly=class extends j.uAl{constructor(){super(...arguments),this._id="",this._placeholder="",this._tabindex=0,this._clearable=!0,this._showMaxCharacter=!0,this.minCharacter=4,this.maxCharacter=250,this._textColor="#363636",this._backgroundColor="#fff5eb",this._backgroundColorDisabled="#f0f0f0",this._padding=15,this._borderRadius=10,this._borderWidth=1,this._borderStyle="solid",this._borderColor="#363636",this._bottomTextColor="#9f9f9f",this._overMaxCharacterTextColor="#f10000",this._showScrollbarAlways=!0,this._fontFamily=null,this._fontSize=18,this._rows=7,this._outer=document.createElement("div"),this._input=document.createElement("textarea"),this._scrollbarStyle=null,this._bottom=null,this._maxCharactersIndicator=null,this._clearContainer=null,this._clearIcon=document.createElement("i"),this._clearText=document.createElement("div"),this._canvas=null,this._onTextChanged=new j.HN0,this._onFocusChanged=new j.HN0,this.onClear=new j.HN0,this.onTextValid=new j.HN0,this._showExternalPrompt=!1}get id(){return this._id?this._id:null}set text(k){this._input&&(this._input.value=k)}get text(){return this._input?this._input.value:null}get htmlText(){if(this._input)return this.escapeHTML(this._input.value)}get htmlOuterElement(){return this._outer}get htmlTextareaElement(){return this._input}get onTextChanged(){return this._onTextChanged}get onFocusChanged(){return this._onFocusChanged}create(){super.create(),this._localizer=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),this.createOuter(),this.createTextarea(this._outer),this.isShowMaxLength()&&this.createMaxLengthIndicator(this.getBottom(this._outer)),this._clearable&&this.createClearButton(this.getBottom(this._outer)),this.isExternalPromptRequired()&&(this._showExternalPrompt=!0),this.applyTransform(),this.addListeners()}isExternalPromptRequired(){return j.o5U.isAndroid()}setDisabled(k){this._input.disabled=k,this._input.style.backgroundColor=k?this._backgroundColorDisabled:this._backgroundColor}setClearContainerVisibility(k){this._clearContainer&&(this._clearContainer.style.display=k?"flex":"none")}addListeners(){this._onTextChangedHandler=k=>{this.setClearContainerVisibility(""!==this.text),this.updateMaxLengthIndicator(),this._onTextChanged.dispatch()},this._onFocusHandler=k=>{if(this._showExternalPrompt)return k.preventDefault(),k.stopImmediatePropagation(),void this._input.blur();this.handleFocusChanged(!0),this._onFocusChanged.dispatch()},this._onBlurHandler=k=>{if(this._showExternalPrompt)return k.preventDefault(),void k.stopImmediatePropagation();this.handleFocusChanged(!1)},this._onClickHandler=k=>(0,G.sH)(this,void 0,void 0,(function*(){this._input.blur();const k=yield xy.y.showTextareaPrompt(this._placeholder,this.text,this.maxCharacter);j.Aq$.isDefined(k)&&(this.text=k,this.setClearContainerVisibility(""!==this.text),this.updateMaxLengthIndicator(),this._onTextChanged.dispatch())})),this._showExternalPrompt&&this._input.addEventListener("click",this._onClickHandler),this._input.addEventListener("focus",this._onFocusHandler),this._input.addEventListener("blur",this._onBlurHandler),this._onResizeHandler=k=>{window.setTimeout((()=>{this.applyTransform()}),1)},window.addEventListener("resize",this._onResizeHandler),this.enablePerKeyEvents(!0)}getPositionRelativeToParent(k,B={x:0,y:0}){const U={x:B.x+(k.legacyTransform?k.legacyTransform.x:k.transform.localPosition.x),y:B.y+(k.legacyTransform?k.legacyTransform.y:k.transform.localPosition.y)};return k.parent?this.getPositionRelativeToParent(k.parent,U):U}applyTransform(){this._canvas||(this._canvas=document.getElementById("game-container").getElementsByTagName("canvas")[0]),this.setStyle("paddingLeft","0"),this.setStyle("paddingRight","0"),this.setStyle("paddingTop","0"),this.setStyle("paddingBottom","0"),this.setStyle("borderLeftWidth","0"),this.setStyle("borderRightWidth","0"),this.setStyle("borderTopWidth","0"),this.setStyle("borderBottomWidth","0");const{x:k,y:B}=this.getPositionRelativeToParent(this.GameObject);let U,F;this.GameObject.transform instanceof j.XVE?(U=this.GameObject.transform.sizeDelta.width,F=this.GameObject.transform.sizeDelta.height):this.GameObject.legacyTransform?(U=this.GameObject.legacyTransform.width,F=this.GameObject.legacyTransform.height):j.VyI.log("The GameObject needs to have a RectTransform or LegacyTransform attached to it in order to size the input field appropriately.",j.$bb.Error);const G=this._canvas.clientHeight/tt.q.instance.game.world.height,$=this._canvas.clientWidth/tt.q.instance.game.world.width,H=G*B+(this._outer.style.marginTop?parseInt(this._outer.style.marginTop):0),V=$*k+(this._outer.style.marginLeft?parseInt(this._outer.style.marginLeft):0),W=G*this._fontSize;Qt.J.setOuterHeight(this._outer,G*F),Qt.J.setOuterWidth(this._outer,$*U);const q=this._outer.style;q.top=`${H}px`,q.left=`${V}px`,q.fontSize=`${W}px`,q.paddingTop=G*this._padding+"px",q.paddingBottom=G*this._padding+"px",q.paddingLeft=$*this._padding+"px",q.paddingRight=$*this._padding+"px";const K=this.GameObject.findComponentInParent(z.B),Y=null==K?void 0:K.getCollisionBox();Y&&(BY.worldTransform.ty+Y.height||kY.worldTransform.tx+Y.width?this.setStyle("display","none"):this.setStyle("display","unset"))}setVisible(k){this._outer.style.visibility=k?"visible":"hidden"}setOpacity(k){this._outer.style.opacity=k}setStyle(k,B){this._outer.style.setProperty(k,B)}enablePerKeyEvents(k){k?this._input.addEventListener("keyup",this._onTextChangedHandler):this._input.removeEventListener("keyup",this._onTextChangedHandler)}handleFocusChanged(k){k?tt.q.instance.game.input.keyboard.clearCaptures():tt.q.instance.game.input.keyboard.addKeyCapture([Dy.D.BACKSPACE])}removeExisting(){var k,B;this._scrollbarStyle&&document.head.removeChild(this._scrollbarStyle),null===(k=document.getElementById(this._id))||void 0===k||k.remove(),null===(B=this._bottom)||void 0===B||B.remove()}update(){super.update(),this.applyTransform()}destroy(){super.destroy(),this.onTextValid.dispose(),this._onTextChanged.dispose(),this._onFocusChanged.dispose(),this.onClear.dispose(),this._input.removeEventListener("keyup",this._onTextChangedHandler),this._input.removeEventListener("click",this._onClickHandler),this._input.removeEventListener("focus",this._onFocusHandler),this._input.removeEventListener("blur",this._onBlurHandler),window.removeEventListener("resize",this._onResizeHandler),this._onTextChangedHandler=null,this._onClickHandler=null,this._onFocusHandler=null,this._onBlurHandler=null,this._onResizeHandler=null,this._clearContainer&&(this._onClearClicked=null,this._clearContainer.removeEventListener("click",this._onClearClicked)),this.removeExisting()}createOuter(){this._outer.id=this._id;const k=this._outer.style;k.position="absolute",k.backgroundColor=this._backgroundColor,k.paddingLeft=`${this._padding}px`,k.paddingTop=`${this._padding}px`,k.paddingRight=`${this._padding}px`,k.paddingBottom=`${this._padding}px`,k.borderRadius=`${this._borderRadius}px`,k.borderWidth=`${this._borderWidth}px`,k.borderStyle=this._borderStyle,k.borderColor=this._borderColor,j.Aq$.isDefined(this._fontFamily)&&(k.fontFamily=this._fontFamily);document.getElementById("external-ui").appendChild(this._outer)}createTextarea(k){this._input.value="",this._input.id=`${this._id}textarea`,this._input.autocapitalize="off",this._input.autocomplete="off",this._input.tabIndex=this._tabindex,this._input.placeholder=j.Aq$.isDefined(this._placeholder)?this._placeholder:"",this._input.rows=this._rows;const B=this._input.style;B.padding="0px",B.margin="0px",B.resize="none",B.border="0px",B.backgroundColor="transparent",B.borderStyle="none",B.outline="none",B.color=this._textColor,B.textAlign="left",B.boxShadow="none",B.cursor="auto",this._showScrollbarAlways&&(B.overflowY="scroll"),k.appendChild(this._input),this.applyCustomScrollbarStyle()}applyCustomScrollbarStyle(){this._scrollbarStyle=document.createElement("style"),document.head.appendChild(this._scrollbarStyle),this._scrollbarStyle.innerHTML=`\n #${this._input.id}::-webkit-scrollbar {\n width: 32px;\n }\n #${this._input.id}::-webkit-scrollbar-track {\n border-image: url('${this.getSingleImageURL(338)}') 32 32;\n border-style: solid;\n border-width: 32px 0px 32px 32px;\n }\n #${this._input.id}::-webkit-scrollbar-thumb {\n border-image: url('${this.getSingleImageURL(339)}') 33 33;\n border-style: solid;\n border-width: 33px 0px 33px 33px;\n min-height: 66px;\n }\n `}getSingleImageURL(k){const B=tt.q.instance.prodigy.assets.getAsset(`singleImage-${k}`),U=B.filename;return`${Kt.s.get("GameConstants.Build.ASSETS_LOCATION")}${Ny.s.ASSET_FOLDER}/single-images/${U}/${B.v}/${U}.png`}getBottom(k){return this._bottom||(this._bottom=document.createElement("div"),this._bottom.style.color=this._bottomTextColor,k.appendChild(this._bottom)),this._bottom}isShowMaxLength(){return this._showMaxCharacter&&this.maxCharacter>0}createMaxLengthIndicator(k){this._maxCharactersIndicator=document.createElement("div");const B=this._maxCharactersIndicator.style;B.float="left",B.color=this._bottomTextColor,k.appendChild(this._maxCharactersIndicator),this.updateMaxLengthIndicator()}updateMaxLengthIndicator(){this._input.style.opacity=this._input.textLength>0?"1.0":"0.5",this._maxCharactersIndicator.innerText=this._localizer.getText("TEXTAREA_CHARACTERS",this._input.textLength,this.maxCharacter);const k=this._input.textLength>this.maxCharacter;this._maxCharactersIndicator.style.color=k?this._overMaxCharacterTextColor:this._bottomTextColor,this.onTextValid.dispatch(!k&&this._input.textLength>=this.minCharacter)}createClearButton(k){this._clearContainer=document.createElement("div"),this._clearContainer.style.float="right";const B=document.createElement("div");B.style.float="left",B.style.verticalAlign="middle",B.appendChild(this._clearIcon),this._clearContainer.appendChild(B),this._clearContainer.appendChild(this._clearText),this._clearIcon.className="fa fa-times",this._clearText.innerText=this._localizer.getText("INPUT_CLEAR"),j.Aq$.isDefined(this._fontFamily)&&(this._clearText.style.fontFamily=this._fontFamily),this._clearContainer.id=`${this._id}clear`,this._clearContainer.style.display="none",this._clearContainer.style.cursor="pointer",this.setClearContainerVisibility(!1),k.appendChild(this._clearContainer),this._onClearClicked=()=>{this.text="",this.setClearContainerVisibility(!1),this.updateMaxLengthIndicator(),this._input.focus(),this.onClear.dispatch()},this._clearContainer.addEventListener("click",this._onClearClicked)}escapeHTML(k){const B=document.createElement("textarea");return B.innerText=k,B.innerHTML.replace(/"/g,""").replace(/'/g,"'")}};(0,G.Cg)([(0,j.W_S)(),(0,j.Lr6)(0),(0,j.nKb)("name"),(0,G.Sn)("design:type",String)],Ly.prototype,"_id",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ly.prototype,"_placeholder",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ly.prototype,"_tabindex",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Ly.prototype,"_clearable",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Ly.prototype,"_showMaxCharacter",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ly.prototype,"minCharacter",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ly.prototype,"maxCharacter",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],Ly.prototype,"_textColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],Ly.prototype,"_backgroundColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],Ly.prototype,"_backgroundColorDisabled",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ly.prototype,"_padding",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ly.prototype,"_borderRadius",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ly.prototype,"_borderWidth",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ly.prototype,"_borderStyle",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],Ly.prototype,"_borderColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],Ly.prototype,"_bottomTextColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],Ly.prototype,"_overMaxCharacterTextColor",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Ly.prototype,"_showScrollbarAlways",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Ly.prototype,"_fontFamily",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ly.prototype,"_fontSize",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ly.prototype,"_rows",void 0),Ly=(0,G.Cg)([(0,j.EVk)("InputTextarea",W.Y.uiInput)],Ly);let ky=class extends j.uAl{constructor(){super(...arguments),this.canBeEmpty=!1,this.onTextInvalid=new j.HN0,this.onTextValid=new j.HN0,this.onTextInvalidOnBlur=new j.HN0,this.invalid=!1}create(){super.create(),this._validationRegex&&(this.regex=new RegExp(this._validationRegex)),this._input.onTextChanged.add(this.performValidation,this),this._input.onBlur.add(this.updateErrorState,this)}destroy(){this.onTextInvalid.dispose(),this.onTextValid.dispose(),this.onTextInvalidOnBlur.dispose(),super.destroy()}performValidation(){this.invalid=!1,""===this._input.text?this.canBeEmpty||(this.invalid=!0,this._errorText.text=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("ERROR_INPUT_EMPTY")):this.regex&&(this.regex.test(this._input.text)?this.invalid=!1:(this.invalid=!0,this._errorText.text=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(this._errorMessageKey))),this.invalid?this.onTextInvalid.dispatch():(this.onTextValid.dispatch(),this._input.setInError(!1),this._errorText.GameObject.active=!1,this._errorText.text="")}updateErrorState(){this.invalid&&(this.onTextInvalidOnBlur.dispatch(),this._errorText.GameObject.active=!0,this._input.setInError(!0))}};(0,G.Cg)([(0,j.MnK)(kt.S),(0,G.Sn)("design:type",kt.S)],ky.prototype,"_input",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ky.prototype,"_validationRegex",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],ky.prototype,"_errorMessageKey",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ky.prototype,"canBeEmpty",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],ky.prototype,"_errorText",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ky.prototype,"onTextInvalid",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ky.prototype,"onTextValid",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ky.prototype,"onTextInvalidOnBlur",void 0),ky=(0,G.Cg)([(0,j.EVk)("InputTextValidation",W.Y.uiInput)],ky);var By=U(65231);let Uy=class extends By.s{constructor(){super(...arguments),this._imageContainer=null,this._backgroundContainer=null,this._rarityContainer=null,this._rarityConfig=null,this._rarityAtlas=Ve._.Ui_card_json}get rarity(){var k,B;return null!==(B=null===(k=this._item.data)||void 0===k?void 0:k.rarity)&&void 0!==B?B:io.E.Common}updateCard(){super.updateCard(),this.updateBackground()}get backgroundPrefabID(){return this.getRarityPrefabID()}updateBackground(){(0,sg.Ks)().load(this.backgroundPrefabID,this._backgroundContainer)}resetCard(){super.resetCard(),La.l.removeAll(this._backgroundContainer.legacyTransform.group,!0)}getRarityPrefabID(){switch(this.rarity){case io.E.Legendary:return this._rarityConfig.rarityPrefabLegendary;case io.E.Heroic:return this._rarityConfig.rarityPrefabEpic;case io.E.Rare:return this._rarityConfig.rarityPrefabRare;case io.E.Uncommon:return this._rarityConfig.rarityPrefabUncommon;case io.E.Common:default:return this._rarityConfig.rarityPrefabCommon}}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uy.prototype,"_imageContainer",void 0),(0,G.Cg)([(0,j.x4W)("rarityContainer"),(0,G.Sn)("design:type",j._mx)],Uy.prototype,"_backgroundContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Uy.prototype,"_rarityContainer",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],Uy.prototype,"_rarityConfig",void 0),(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],Uy.prototype,"_rarityAtlas",void 0),Uy=(0,G.Cg)([(0,j.EVk)("LegacyItemCard",W.Y.ui)],Uy);var Fy,Gy=U(63746);U(14801);!function(k){k[k.Name=0]="Name",k[k.FlavorText=1]="FlavorText"}(Fy||(Fy={}));let jy=class extends j.uAl{constructor(){super(...arguments),this._textTypeToRetrieve=Fy.Name,this._itemID=-1,this._itemType=""}create(){super.create(),this._itemType&&this._itemID&&this.updateText().catch(j.RQr.createHandler("Error updating text from item: "))}updateText(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield Yt.t.secureGetItem(this._itemType,this._itemID);switch((0,ut.v)(null!==k,`Item was not found for ${this._itemType}-${this._itemID}`),this._textTypeToRetrieve){case Fy.Name:this._targetText.text=this._localizer.getText(Qt.J.getLocalizationNameKey(k));break;case Fy.FlavorText:this._targetText.text=this._localizer.getText(Qt.J.getLocalizationFlavorKey(k));break;default:j.VyI.log("Error updating text from item: Invalid text type",j.$bb.Error)}}))}setAsset(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=null){(k!==this._itemID||j.Aq$.isDefined(B)&&B!==this._itemType)&&(this._itemID=k,j.Aq$.isDefined(B)&&(this._itemType=B),yield this.updateText())}))}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],jy.prototype,"_targetText",void 0),(0,G.Cg)([(0,j.gfw)(Fy),(0,G.Sn)("design:type",Number)],jy.prototype,"_textTypeToRetrieve",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],jy.prototype,"_itemID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],jy.prototype,"_itemType",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],jy.prototype,"_localizer",void 0),jy=(0,G.Cg)([(0,j.EVk)("ItemNameTextLoader",W.Y.item)],jy);let $y=class extends j.uAl{constructor(){super(...arguments),this._petSpineItemDataLoaders=[]}postCreate(){super.postCreate(),this.updatePetSpines()}updatePetSpines(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.petTeam.filter((k=>j.Aq$.isDefined(k)&&k.creatureType!==Vn.V.Player));k.length>this._petSpineItemDataLoaders.length?j.VyI.log("There are not enough renderers to load all team pet spines.",j.$bb.Error):k.forEach(((k,B)=>{var U,F;const G=k.getID(),$=this._petSpineItemDataLoaders[B];$.setAssetID(G),null===(F=null===(U=$.GameObject)||void 0===U?void 0:U.findComponentInChildren(sd.o))||void 0===F||F.updateGear(k.data.gear).catch(j.RQr.createHandler)}))}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(mf.N),(0,G.Sn)("design:type",Array)],$y.prototype,"_petSpineItemDataLoaders",void 0),$y=(0,G.Cg)([(0,j.EVk)("LoadActiveTeamPetSpines",W.Y.animation)],$y);U(70704);let Hy=class extends j.uAl{create(){if(super.create(),!this.primitive){const k=this.gameObject.addComponent(j.Lom),B=this.gameObject.legacyTransform;k.setSize(new j.or0(B.width,B.height)),this.primitive=k}this.target||(this.target=this.gameObject.legacyTransform),this.target.group.mask=this.primitive.getGraphics()}};(0,G.Cg)([(0,j.MnK)(j.K16),(0,G.Sn)("design:type",j.K16)],Hy.prototype,"target",void 0),(0,G.Cg)([(0,j.MnK)(j.sG1),(0,G.Sn)("design:type",j.sG1)],Hy.prototype,"primitive",void 0),Hy=(0,G.Cg)([(0,j.EVk)("Mask",W.Y.effect)],Hy);let Vy=class extends j.uAl{postCreate(){if(super.postCreate(),!this.primitive){const k=this.gameObject.addComponent(j.Lom),B=this.gameObject.findComponent(j.XVE);k.setSize(new j.or0(B.widthDelta,B.heightDelta)),this.primitive=k}this.target.getRootContainer()?this.applyMask():this.target.onRootContainerSet.addOnce(this.applyMask,this)}applyMask(){this.target.getRootContainer().mask=this.primitive.getGraphics()}};var Wy,qy;(0,G.Cg)([(0,j.MnK)(j.y4o),(0,G.Sn)("design:type",j.y4o)],Vy.prototype,"target",void 0),(0,G.Cg)([(0,j.MnK)(j.sG1),(0,G.Sn)("design:type",j.sG1)],Vy.prototype,"primitive",void 0),Vy=(0,G.Cg)([(0,j.EVk)("MaskRenderComponent",W.Y.effect)],Vy),function(k){k[k.Rectangle=0]="Rectangle",k[k.Circle=1]="Circle",k[k.Polygon=2]="Polygon"}(qy||(qy={}));let Ky=Wy=class extends j.uAl{constructor(){super(...arguments),this.maskType=qy.Rectangle}create(){super.create(),this.gameObject.onActiveChanged.add(this.applyMask),this.OnActiveChanged.add(this.applyMask)}applyMask(){if(this.getTarget(),!this.Active)return this.primitive=null,void this.applyMaskToTarget();this.getMask(new j.or0(this._target.width,this._target.height)),this.applyMaskToTarget()}getTarget(){let k=this.targetGameObject.findComponent(j.y4o);k||(k=this.targetGameObject.findComponent(j.K16)),k instanceof j.y4o?(this._target=k.getRootContainer(),k.onRootContainerSet.remove(this.applyMask),this._target||k.onRootContainerSet.addOnce(this.applyMask)):k instanceof j.K16&&(this._target=k)}getMask(k){const B=Wy.MASK_TYPES[this.maskType];if(this.primitive=this.gameObject.findComponent(B),!this.primitive){const U=this.gameObject.addComponent(B);switch(U.constructor){case j.Lom:U.setSize(k);break;case j.ESH:U.setRadius(k.width);break;case j.Uuu:U.setPoints([new $e.Point(0,0),new $e.Point(k.width,0),new $e.Point(k.width,k.height),new $e.Point(0,k.height)])}this.primitive=U}this.primitive.create()}applyMaskToTarget(){var k,B;this._target instanceof $e.Container?this._target.mask=null===(k=this.primitive)||void 0===k?void 0:k.getGraphics():this._target instanceof j.K16&&(this._target.group.mask=null===(B=this.primitive)||void 0===B?void 0:B.getGraphics())}destroy(){this.targetGameObject=null,this._target=null,this.primitive=null,super.destroy()}};Ky.MASK_TYPES={[qy.Rectangle]:j.Lom,[qy.Circle]:j.ESH,[qy.Polygon]:j.Uuu},(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ky.prototype,"targetGameObject",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Ky.prototype,"maskType",void 0),Ky=Wy=(0,G.Cg)([(0,j.EVk)("MaskRenderer",W.Y.effect)],Ky);let zy=class extends j.uAl{constructor(){super(...arguments),this.movementScale=1}create(){super.create(),this._initialLocalPosition=new j.I9Y,this._initialLocalPosition.copyFrom(this._transform.localPosition),this._initialWorldPosition=new j.I9Y,this._initialWorldPosition.copyFrom(this._transform.worldPosition),this._cameraTransform=j.i7d.main.GameObject.transform,this._cameraTransform.onWorldMatrixChanged.add(this.onCameraMoved,this),this.onCameraMoved()}destroy(){this._cameraTransform.onWorldMatrixChanged.remove(this.onCameraMoved,this),super.destroy()}onCameraMoved(){const k=new j.I9Y;k.copyFrom(this._cameraTransform.worldPosition),k.subtract(this._initialWorldPosition);const B=new j.I9Y;B.copyFrom(this._initialLocalPosition),B.x+=k.x*this.movementScale,B.y+=k.y*this.movementScale,this._transform.setPosition(Math.round(B.x),Math.round(B.y))}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],zy.prototype,"movementScale",void 0),(0,G.Cg)([(0,j.Pqz)(j.dLy),(0,G.Sn)("design:type",j.dLy)],zy.prototype,"_transform",void 0),zy=(0,G.Cg)([(0,j.EVk)("Parallax",W.Y.motion)],zy);U(57349),U(42838);let Yy=class extends j.uAl{updateStats(k,B,U){const F=Yt.t.getItem("pet",k),G=eo.P8.getBattleStats(F,B,U);this._healthAmountText.text=G.hp.toString(),this._speedAmountText.text=G.speed.toString(),this._powerAmountText.text=G.power.toString(),this._defenceAmountText.text=G.defence.toString()}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Yy.prototype,"_healthAmountText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Yy.prototype,"_speedAmountText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Yy.prototype,"_powerAmountText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Yy.prototype,"_defenceAmountText",void 0),Yy=(0,G.Cg)([(0,j.EVk)("PetInfoScreenCard",W.Y.uiPet)],Yy);U(41851);let Qy=class extends j.uAl{constructor(){super(...arguments),this.maxWidth=0,this.maxHeight=0}create(){var k;super.create(),this.sizeToTarget(),null===(k=this._target.GameObject.transform)||void 0===k||k.onWorldMatrixChanged.add(this.sizeToTarget,this)}destroy(){var k;null===(k=this._target.GameObject.transform)||void 0===k||k.onWorldMatrixChanged.removeAll(this),super.destroy()}sizeToTarget(){var k;const B=null===(k=this._target.GameObject)||void 0===k?void 0:k.transform,U=this._target.getRootContainer();if(!B||!U)return;B.onWorldMatrixChanged.removeAll(this),B.pixiTransform;const F=Math.round(U.width/U.scale.x),G=Math.round(U.height/U.scale.y),$=Math.min(this.maxWidth<=0?1:this.maxWidth/F,this.maxHeight<=0?1:this.maxHeight/G,1);j.cj9.isNearlyEqual(B.localScale.x,$)||B.setScale($,$),B.onWorldMatrixChanged.add(this.sizeToTarget,this)}};(0,G.Cg)([(0,j.Pqz)(j.y4o),(0,G.Sn)("design:type",j.y4o)],Qy.prototype,"_target",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.xkT)("sizeToTarget"),(0,G.Sn)("design:type",Number)],Qy.prototype,"maxWidth",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.xkT)("sizeToTarget"),(0,G.Sn)("design:type",Number)],Qy.prototype,"maxHeight",void 0),Qy=(0,G.Cg)([(0,j.EVk)("RenderComponentSizeLimiter",W.Y.uiLayout)],Qy);let Xy=class extends j.uAl{constructor(){super(...arguments),this._ignoreTypecase=!1,this.onResult=new j.HN0}create(){super.create(),this._input.enablePerKeyEvents(!0),this._input.onTextChanged.add(this.validate,this),this._input.onBlur.add(this.validate,this)}validate(){if(""===this._input.text)return;const k=this.isInputValid();k?this._input.setValid(!0):this._input.setInError(!0),this.onResult.dispatch(k)}isInputValid(){return""!==this._validationString&&(this._ignoreTypecase&&"password"!==this._input.getType()?this._input.text.toLowerCase()===this._validationString.toLowerCase():this._input.text===this._validationString)}destroy(){this.onResult.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Pqz)(kt.S),(0,G.Sn)("design:type",kt.S)],Xy.prototype,"_input",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Xy.prototype,"_validationString",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Xy.prototype,"_ignoreTypecase",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Xy.prototype,"onResult",void 0),Xy=(0,G.Cg)([(0,j.EVk)("SimpleInputTextValidation",W.Y.uiInput)],Xy);var Zy;U(25132);!function(k){k.intersect=function(k,B){return{left:Math.max(k.left,B.left),right:Math.min(k.right,B.right),top:Math.max(k.top,B.top),bottom:Math.min(k.bottom,B.bottom)}}}(Zy||(Zy={}));class Jy{constructor(){this._indices=[],this._vertices=[],this._uvs=[]}clipGeometry(k,B,U,F){return this.clip={left:k,right:B,top:U,bottom:F},this}addAxisAlignedQuad(k,B,U,F,G,j,$,H){if(this.clip){const V=Math.max(k,this.clip.left),W=Math.min(B,this.clip.right),q=Math.max(U,this.clip.top),K=Math.min(F,this.clip.bottom);if(V>=W||q>=K)return this;V!==k&&(G=this.mapValueInRange(V,k,B,G,j),k=V),W!==B&&(j=this.mapValueInRange(W,k,B,G,j),B=W),q!==U&&($=this.mapValueInRange(q,U,F,$,H),U=q),K!==F&&(H=this.mapValueInRange(K,K,F,H,H),F=K)}let V=this._vertices.length>>1;return this._indices.push(V,V,++V,++V,++V,V),this._vertices.push(k,U,k,F,B,U,B,F),this._uvs.push(G,$,G,H,j,$,j,H),this}addAxisAlignedQuadFromSubTexture(k,B,U,F,G){if(G.trim){const{x:j,y:$,width:H,height:V}=G.trim;k+=j,B+=j+H-G.width,U+=$,F+=$+V-G.height}const j=G.frame,$=G.baseTexture.width,H=G.baseTexture.height;return this.addAxisAlignedQuad(k,B,U,F,j.left/$,j.right/$,j.top/H,j.bottom/H)}createMesh(k){const B=new Float32Array(this._vertices),U=new Float32Array(this._uvs),F=new Uint16Array(this._indices);return new $e.SimpleMesh(k,B,U,F,$e.DRAW_MODES.TRIANGLE_STRIP)}updateMesh(k){const B=k.visible;return B&&(k.visible=!1),k.geometry.getIndex().update(new Uint16Array(this._indices)),k.verticesBuffer.update(new Float32Array(this._vertices)),k.uvBuffer.update(new Float32Array(this._uvs)),B&&(k.visible=!0),this}mapValueInRange(k,B,U,F,G){return F+(k-B)/(U-B)*(G-F)}}let t_=class extends j.y4o{constructor(){super(...arguments),this._topLeft=null,this._topRight=null,this._bottomLeft=null,this._bottomRight=null,this._topCenter=null,this._bottomCenter=null,this._leftCenter=null,this._rightCenter=null,this._center=null,this._tiling=!1,this._mesh=null,this._elementGroupSize=new j.or0}get _allElements(){return[this._topLeft,this._topCenter,this._topRight,this._leftCenter,this._center,this._rightCenter,this._bottomLeft,this._bottomCenter,this._bottomRight]}get clip(){return this._clip}set clip(k){this._clip=k,this.updateMesh()}get tint(){var k;return null===(k=this._mesh)||void 0===k?void 0:k.tintValue}set tint(k){const B="number"==typeof k?k:j.Q1f.hexToRGB(k);this._mesh?this._mesh.tint=B:this._initialTint=B}get alpha(){var k;return null===(k=this._mesh)||void 0===k?void 0:k.alpha}set alpha(k){this._mesh?this._mesh.alpha=k:this._initialAlpha=k}create(){super.create();const k=j.W$e.instance.game.cache.getTexture(this._center.atlas,this._center.frame);this._mesh=new $e.SimpleMesh(new $e.Texture(k.baseTexture),void 0,void 0,void 0,$e.DRAW_MODES.TRIANGLE_STRIP),this._mesh.visible=!1,this.updateMesh(),j.Aq$.isDefined(this._initialTint)&&(this._mesh.tint=this._initialTint),j.Aq$.isDefined(this._initialAlpha)&&(this._mesh.alpha=this._initialAlpha),this.setRootContainer(this._mesh),this.gameObject.onDestroy.add((()=>{this.gameObject.transform instanceof j.XVE&&this.gameObject.transform.onRecalculatedBounds.remove(this.resizeToMatchRectTransform,this)}))}postCreate(){super.postCreate(),this.gameObject.transform instanceof j.XVE&&this.gameObject.transform.onRecalculatedBounds.add(this.resizeToMatchRectTransform,this)}isNineSlice(){return!!(this._topLeft&&this._topRight&&this._bottomLeft&&this._bottomRight)}isHorizontal3Slice(){return this._leftCenter&&this._rightCenter&&!this._topCenter&&!this._bottomCenter}isVertical3Slice(){return this._topCenter&&this._bottomCenter&&!this._leftCenter&&!this._rightCenter}updateMesh(){if(!this._mesh)return;const k=new Jy;this._clip&&(k.clip=this._clip);const B=this._allElements.map((k=>k?this.getElementTexture(k):null)),U=B.map((k=>k?{x:k.width,y:k.height}:{x:0,y:0})),F=Math.max(U[0].x,U[3].x,U[6].x),G=Math.max(U[2].x,U[5].x,U[8].x),j=Math.max(U[0].y,U[1].y,U[2].y),$=Math.max(U[6].y,U[7].y,U[8].y),H=this.getTargetDimensions(),V=H.x-F-G,W=H.y-j-$,q=F+V,K=j+W;this._topLeft&&k.addAxisAlignedQuadFromSubTexture(F-U[0].x,F,j-U[0].y,j,B[0]),this._topCenter&&k.addAxisAlignedQuadFromSubTexture(F,q,j-U[1].y,j,B[1]),this._topRight&&k.addAxisAlignedQuadFromSubTexture(q,q+U[2].x,j-U[2].y,j,B[2]),this._leftCenter&&k.addAxisAlignedQuadFromSubTexture(F-U[3].x,F,j,K,B[3]),!this._tiling||this.isNineSlice()?k.addAxisAlignedQuadFromSubTexture(F,q,j,K,B[4]):this.isHorizontal3Slice()?this.performTilingInOneDirection(!0,V,W,k,B[4],F,j):this.isVertical3Slice()&&this.performTilingInOneDirection(!1,W,V,k,B[4],F,j),this._rightCenter&&k.addAxisAlignedQuadFromSubTexture(q,q+U[5].x,j,K,B[5]),this._bottomLeft&&k.addAxisAlignedQuadFromSubTexture(F-U[6].x,F,K,K+U[6].y,B[6]),this._bottomCenter&&k.addAxisAlignedQuadFromSubTexture(F,q,K,K+U[7].y,B[7]),this._bottomRight&&k.addAxisAlignedQuadFromSubTexture(q,q+U[8].x,K,K+U[8].y,B[8]),k.updateMesh(this._mesh)}getElementTexture(k){return j.W$e.instance.game.cache.getTexture(k.atlas,k.frame)}performTilingInOneDirection(k,B,U,F,G,j,$){const H=B/(k?G.width:G.height);if(H<=0)return;const V=F.clip;let W,q=j,K=$,z=G.width,Y=G.height,Q=0,X=0;k?(W={left:j,right:j+B,top:$,bottom:U},Q=z,Y=U):(W={left:j,right:j+U,top:$,bottom:$+B},X=Y,z=U),V&&(W=Zy.intersect(V,W)),F.clip=W;for(let Z=0;Z")],t_);let e_=class extends j.uAl{constructor(){super(...arguments),this.onEvent=new j.HN0}create(){super.create(),this._spine.onEvent.add(((k,B)=>{var U,F;((null!==(F=null===(U=this._eventName)||void 0===U?void 0:U.length)&&void 0!==F?F:0)<1||B.data.name===this._eventName)&&this.onEvent.dispatch(k,B)}))}destroy(){this.onEvent.dispose(),super.destroy()}};(0,G.Cg)([(0,j.MnK)(oi.v),(0,G.Sn)("design:type",oi.v)],e_.prototype,"_spine",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],e_.prototype,"_eventName",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],e_.prototype,"onEvent",void 0),e_=(0,G.Cg)([(0,j.EVk)("SpineEventListener",W.Y.animation)],e_);let i_=class extends Fi.z{constructor(){super(...arguments),this._canEvolve=!1,this._justReadyToEvolve=!1}bindContext(){this.bindWithData(this._canEvolve,this._justReadyToEvolve)}bindWithData(k,B){this._canEvolve=k,this._justReadyToEvolve=B,this._context.Container.rebind(hs.hi.SpinePetEvolveBurst).toConstantValue(k&&B),this._context.Container.rebind(hs.hi.SpinePetEvolveIdle).toConstantValue(k),this.gameObject.findComponentsInChildren(Lo.B).forEach((k=>k.consume()))}setContainerData(k,B){this._canEvolve=k,this._justReadyToEvolve=B}};i_=(0,G.Cg)([(0,j.EVk)("SpinePetDataProvider",W.Y.data)],i_);var s_=U(27625);let n_=class extends j.uAl{constructor(){super(...arguments),this._spineAssetID=null,this._animation=null,this._loop=!1}create(){super.create();const k=tt.q.instance.game;this._spineUI=new s_.I(k,this.GameObject.legacyTransform.group),this._spineUI.populate({spineKey:this._spineAssetID,animation:this._animation,loop:this._loop})}playAnimation(k,B){const U=j.Aq$.isDefined(k)?k:this._animation,F=j.Aq$.isDefined(B)?B:this._loop;this._spineUI.playAnimation(U,F)}};(0,G.Cg)([(0,j.W_S)(),(0,j.nKb)("id"),(0,G.Sn)("design:type",String)],n_.prototype,"_spineAssetID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,j.nKb)("animation"),(0,G.Sn)("design:type",String)],n_.prototype,"_animation",void 0),(0,G.Cg)([(0,j.vkK)(),(0,j.nKb)("loop"),(0,G.Sn)("design:type",Boolean)],n_.prototype,"_loop",void 0),n_=(0,G.Cg)([(0,j.EVk)("SpineRendererUI",W.Y.ui)],n_);let a_=class extends j.uAl{constructor(){super(...arguments),this._hiddenSlots=[]}postCreate(){super.postCreate(),this._targetSpineComponent?this._targetSpineComponent.isLoaded?(this._spine=this._targetSpineComponent.getSpine()._pixiSpine,this.updateHiddenSlots()):this._targetSpineComponent.OnLoaded.addOnce((()=>{this._spine=this._targetSpineComponent.getSpine()._pixiSpine,this.updateHiddenSlots()})):j.VyI.log("[SpineSlotVisibilityController] No target spine component set",j.$bb.Info)}updateHiddenSlots(){this._hiddenSlots.forEach((k=>{this.hideSlot(k)}))}hideSlot(k){var B,U,F,G,j,$,H,V,W;const q=null===(U=null===(B=this._spine)||void 0===B?void 0:B.skeleton)||void 0===U?void 0:U.findSlotIndex(k);-1!==q&&null!==(null===(j=null===(G=null===(F=this._spine)||void 0===F?void 0:F.skeleton)||void 0===G?void 0:G.slots[q])||void 0===j?void 0:j.attachment)&&(null===($=this._spine)||void 0===$||$.hackTextureBySlotIndex(q,$e.Texture.EMPTY),null===(W=null===(V=null===(H=tt.q.instance)||void 0===H?void 0:H.game)||void 0===V?void 0:V.broadcaster)||void 0===W||W.broadcast(jn.B.SlotVisibilityChanged,"SlotVisibility",[this.gameObject,k,!1]))}addHiddenSlot(k){this._hiddenSlots.includes(k)||(this._hiddenSlots.push(k),this.updateHiddenSlots())}unsetHiddenSlot(k){var B,U,F,G;this._hiddenSlots.includes(k)&&(null===(B=this._spine)||void 0===B||B.hackTextureBySlotName(k,null),this._hiddenSlots.splice(this._hiddenSlots.indexOf(k),1),null===(G=null===(F=null===(U=tt.q.instance)||void 0===U?void 0:U.game)||void 0===F?void 0:F.broadcaster)||void 0===G||G.broadcast(jn.B.SlotVisibilityChanged,"SlotVisibility",[this.gameObject,k,!0]))}};(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],a_.prototype,"_targetSpineComponent",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],a_.prototype,"_hiddenSlots",void 0),a_=(0,G.Cg)([(0,j.EVk)("SpineSlotVisibilityController",W.Y.ui)],a_);var r_,o_=U(95359);!function(k){k.HighestStat="highestStat"}(r_||(r_={}));const h_={[o_.IE.Hp]:"small-stat-health",[o_.IE.Defence]:"small-stat-defense",[o_.IE.Power]:"small-stat-power",[o_.IE.Speed]:"small-stat-dodge"};let c_=class extends j.uAl{constructor(){super(...arguments),this._itemId=void 0,this._itemType=void 0,this.runOnCreate=!0}create(){super.create(),this.runOnCreate&&this.setIcon()}setIcon(){var k,B;const U=this.getInjectedValue((0,hs.F)("STAT_ICON_DISPLAY_ITEM_ID")),F=this.getInjectedValue((0,hs.F)("STAT_ICON_DISPLAY_ITEM_TYPE")),G=null===(k=Yt.t.getItem(F,U))||void 0===k?void 0:k.data;if(null==G?void 0:G.stats){let k;switch(this._statIconDisplayCriteria){case r_.HighestStat:k=Object.keys(G.stats).reduce(((k,B)=>G.stats[k]>=G.stats[B]?k:B))}const U=h_[k],F=Ve._.Ui_battle_revamp_json;null===(B=this._icon)||void 0===B||B.setAsset(F,U).catch(j.RQr.createHandler(`StatIconDisplayComponent: Failed to set the asset for the icon with frame ${U} in atlas ${F}`))}}};(0,G.Cg)([(0,j.gfw)(r_),(0,G.Sn)("design:type",String)],c_.prototype,"_statIconDisplayCriteria",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,G.Sn)("design:type",Ke._)],c_.prototype,"_icon",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],c_.prototype,"runOnCreate",void 0),c_=(0,G.Cg)([(0,j.EVk)("StatIconDisplay",W.Y.ui)],c_);let d_=class extends j.uAl{constructor(){super(...arguments),this._rarityAtlas=Ve._.Ui_card_json,this._rarityConfig=null}changeRarity(k,B=!1){var U;if(!this._backgroundObject||k!==this._currentRarity||B!==this._currentLockedStatus){null===(U=this._loadBackgroundPromise)||void 0===U||U.cancel();const F=B?this._rarityConfig.lockedItemPrefab:this.getBackgroundPrefabID(k);this._loadBackgroundPromise=j.Uoy.getInjectedValue(this.gameObject,"d0e-64fd").loadWithDependencies(F),this._loadBackgroundPromise.then((U=>{var F;null===(F=this._backgroundObject)||void 0===F||F.destroy(),this._backgroundObject=U,this._cardBanner.active=!B,this._cardBannerDimmed.active=B,this.gameObject.addChild(this._backgroundObject),this._currentRarity=k,this._currentLockedStatus=B})).catch(j.RQr.createHandler("Error loading card rarity background"))}}clearBackground(){var k,B;null===(k=this._backgroundObject)||void 0===k||k.destroy(),null===(B=this._loadBackgroundPromise)||void 0===B||B.cancel(),this._currentRarity=null,this._currentLockedStatus=null}getBackgroundPrefabID(k){switch(k){case io.E.Legendary:return this._rarityConfig.rarityPrefabLegendary;case io.E.Heroic:return this._rarityConfig.rarityPrefabEpic;case io.E.Rare:return this._rarityConfig.rarityPrefabRare;case io.E.Uncommon:return this._rarityConfig.rarityPrefabUncommon;case io.E.Common:default:return this._rarityConfig.rarityPrefabCommon}}destroy(){var k;null===(k=this._loadBackgroundPromise)||void 0===k||k.cancel(),super.destroy()}};(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],d_.prototype,"_rarityAtlas",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],d_.prototype,"_rarityConfig",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],d_.prototype,"_cardBanner",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],d_.prototype,"_cardBannerDimmed",void 0),d_=(0,G.Cg)([(0,j.EVk)("ItemRarityBackground",j.YH6.ui)],d_);let l_=class extends j.uAl{constructor(){super(...arguments),this._quantityText=null,this._quantityCircle=null,this._displayThresholdMin=1,this._displayThresholdMax=99}setQuantity(k){k>=this._displayThresholdMin?(this.setIconVisible(!0),k{var F,G;k.active=U===(null!==(G=null===(F=B.data)||void 0===F?void 0:F.rarity)&&void 0!==G?G:0)})),this._stackElements&&(this._stackElements.active=U>1),this._itemAmountText.text=U.toString()}destroy(){this.onImageLoaded.dispose(),super.destroy()}};(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],u_.prototype,"_rarityBackgrounds",void 0),(0,G.Cg)([(0,j.MnK)(os.X),(0,G.Sn)("design:type",os.X)],u_.prototype,"_itemIconContainer",void 0),(0,G.Cg)([(0,j.MnK)(bg.M),(0,G.Sn)("design:type",bg.M)],u_.prototype,"_renderPlayerAsTexture",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],u_.prototype,"_stackElements",void 0),(0,G.Cg)([(0,j.MnK)(jy),(0,G.Sn)("design:type",jy)],u_.prototype,"_itemNameText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],u_.prototype,"_itemAmountText",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],u_.prototype,"onImageLoaded",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Function)],u_.prototype,"_currentPlayer",void 0),u_=(0,G.Cg)([(0,j.EVk)("StoreItemDisplayCard",W.Y.ui)],u_);U(46548);let f_=class extends j.y4o{constructor(){super(...arguments),this._repeatXCount=0,this._repeatYCount=0,this._renderTexture=null,this._sprite=null}create(){super.create();const k=tt.q.instance.game;this._renderTexture=k.add.renderTexture(this._tileColumns*(this._repeatXCount+1)*this._tileSize,this._tileRows*(this._repeatYCount+1)*this._tileSize),this._sprite=tt.q.instance.prodigy.create.image(0,0,void 0,void 0,this._renderTexture),this._sprite.roundPixels=!0,this._sprite.smoothed=!1,this.setRootContainer(this._sprite);const B=tt.q.instance.prodigy.gameContainer.get(j.t5G.AssetLoader);B.isLoaded(this._tilesetKey,j.iO0.Image)?this.renderTiles():B.loadAssets([this._tilesetKey]).then((()=>{this.renderTiles()}))}destroy(){this._sprite.destroy(),this._renderTexture.destroy(!0),super.destroy()}renderTiles(){const k=tt.q.instance.game.cache.getImage(this._tilesetKey);if(!k)return;const B=k.width/this._tileSize,U=tt.q.instance.prodigy.create.image(0,0,this._tilesetKey),F=this._tileColumns*(this._repeatXCount+1),G=this._tileRows*(this._repeatYCount+1);for(let j=0;j{this._loadedPrefab=k,k.active=this._videoEnded})).catch(j.RQr.createHandler("VideoFollowUpComponent: Error loading follow-up prefab")))}onVideoEnded(){j.Aq$.isDefined(this._followUpGuid)&&(this._videoEnded=!0,j.Aq$.isDefined(this._loadedPrefab)&&(this._loadedPrefab.active=!0),this.hideObjects())}onMembershipAcquired(){this._followUpGuid=this.getInjectedValue(hs.Wr.MemberFollowupPrefabGuid),j.Aq$.isDefined(this._followUpGuid)?(this.hideObjects(),tt.q.instance.prodigy.game.broadcaster.addAppListener(jn.H3.MembershipRewardsFlowComplete,this.handleMembershipRewardsFlowComplete,this)):this._fallbackSignal.dispatch()}handleMembershipRewardsFlowComplete(){tt.q.instance.prodigy.game.broadcaster.removeAppListener(jn.H3.MembershipRewardsFlowComplete,this),tt.q.instance.prodigy.open.prefabMenu({prefabID:this._followUpGuid,isModal:!0})}hideObjects(){for(const k of this._objectsToHide)k.active=!1}destroy(){var k;null===(k=this._loadingPromise)||void 0===k||k.cancel(),this._loadingPromise=void 0,this._closeSignal.dispose(),this._fallbackSignal.dispose(),tt.q.instance.prodigy.game.broadcaster.removeAppListener(jn.H3.MembershipRewardsFlowComplete,this),super.destroy()}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],b_.prototype,"_followUpGuid",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],b_.prototype,"_prefabParent",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],b_.prototype,"_objectsToHide",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],b_.prototype,"_closeSignal",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],b_.prototype,"_fallbackSignal",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],b_.prototype,"_prefabLoader",void 0),b_=(0,G.Cg)([(0,j.EVk)("VideoFollowUpComponent",W.Y.uiVideo)],b_);U(71072);let p_=class extends j.uAl{constructor(){super(...arguments),this._onAllowed=new j.HN0,this._onDisallowedMessageClosed=new j.HN0}check(){const k=this._featureFlags.getValue("enableYouTubeAd",!1),B=this._featureFlags.getValue("enableYouTubeTimeCheck",!0),U=this._featureFlags.getValue("useServerTimeForVideoLockout",!0)?new Date(tt.q.instance.prodigy.timeManager.getServerTimeMs()):new Date;let F=null;k?B&&Qt.J.isSchoolDay(U)&&Qt.J.isDateWithinSchoolHours(U)?F="OPENING_A_VIDEO_DURING_SCHOOL":Gs.pF.isNativeApp()&&(F="OPEN_URL_IN_APP"):F="YOUTUBE_DISABLED_MESSAGE",F?tt.q.instance.prodigy.open.message(this._localizer.getText(F),(()=>{this._onDisallowedMessageClosed.dispatch()})):this._onAllowed.dispatch()}destroy(){this._onAllowed.dispose(),this._onDisallowedMessageClosed.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.Oap)],p_.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.Cdj)("80c-6fa4"),(0,G.Sn)("design:type",Object)],p_.prototype,"_featureFlags",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],p_.prototype,"_onAllowed",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],p_.prototype,"_onDisallowedMessageClosed",void 0),p_=(0,G.Cg)([(0,j.EVk)("OpenVideoGuard",W.Y.uiVideo)],p_);var v_=U(95429);let g_=class extends j.uAl{sendCTA(){this.send("click-CTA")}sendClose(){this.send("close-popup")}send(k){this._gameCompleteEvent.name=k,this._gameCompleteEvent.value=this._videoMenu.videoPlayer.errorReason?"-1":this._videoMenu.getMinimumThresholdReached().toString()}};(0,G.Cg)([(0,j.MnK)(v_.k),(0,G.Sn)("design:type",v_.k)],g_.prototype,"_videoMenu",void 0),(0,G.Cg)([(0,j.MnK)(xm.b),(0,G.Sn)("design:type",xm.b)],g_.prototype,"_gameCompleteEvent",void 0),g_=(0,G.Cg)([(0,j.EVk)("SendVideoCloseMetric",W.Y.uiVideo)],g_);let m_=class extends j.uAl{getCustomData(){return{video_loaded:this._videoMenu.videoPlayer.isReady,error_msg:this._videoMenu.videoPlayer.errorReason}}};(0,G.Cg)([(0,j.MnK)(v_.k),(0,G.Sn)("design:type",v_.k)],m_.prototype,"_videoMenu",void 0),m_=(0,G.Cg)([(0,j.EVk)("AppendVideoData",W.Y.uiVideo)],m_);U(62053);var y_=U(83142),__=U(11682);let E_=class extends y_.D{constructor(){super(...arguments),this._menu=null,this._icon=null,this._tooltip=null,this._headerText=null,this._messageText=null,this._highlightText=null,this._highlightBox=null}loadVideoConfig(k){const B=k;this._tooltip.active=!1;const U=j.Aq$.isDefined(B.header),F=j.Aq$.isDefined(B.message),G=j.Aq$.isDefined(B.icon);U&&F&&G&&this.setUpTooltip(B)}setUpTooltip(k){var B;this._headerText&&(this._headerText.TextObject.text=k.header),this._messageText&&(this._messageText.TextObject.text=k.message),j.Aq$.isDefined(k.highlight)?this._highlightText&&(this._highlightText.TextObject.text=k.highlight):this._highlightBox.active=!1,null===(B=this._icon)||void 0===B||B.setAsset(k.icon),this.addVideoStartListener(k.videoID)}addVideoStartListener(k){this._menu.videoPlayer.onPlayerStateChange.add((()=>{this._tooltip.active||this._menu.videoPlayer.getPlayerState()!==__.w.Playing||(this._tooltip.active=!0)}))}};(0,G.Cg)([(0,j.MnK)(v_.k),(0,j.Lr6)(0),(0,j.nKb)("menu"),(0,G.Sn)("design:type",v_.k)],E_.prototype,"_menu",void 0),(0,G.Cg)([(0,j.MnK)(Ke._),(0,j.Lr6)(0),(0,j.nKb)("icon"),(0,G.Sn)("design:type",Ke._)],E_.prototype,"_icon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,j.Lr6)(0),(0,j.nKb)("tooltip"),(0,G.Sn)("design:type",j._mx)],E_.prototype,"_tooltip",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,j.Lr6)(0),(0,j.nKb)("header"),(0,G.Sn)("design:type",j.EYj)],E_.prototype,"_headerText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,j.Lr6)(0),(0,j.nKb)("message"),(0,G.Sn)("design:type",j.EYj)],E_.prototype,"_messageText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,j.Lr6)(0),(0,j.nKb)("highlight"),(0,G.Sn)("design:type",j.EYj)],E_.prototype,"_highlightText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,j.Lr6)(0),(0,j.nKb)("highlightBox"),(0,G.Sn)("design:type",j._mx)],E_.prototype,"_highlightBox",void 0),E_=(0,G.Cg)([(0,j.EVk)("VideoTooltipComponent",W.Y.uiVideo)],E_);let w_=class extends j.uAl{constructor(){super(...arguments),this.anyFestivalIsActive=new j.HN0,this.specificFestivalIsActive=new j.HN0,this.specificFestivalIsNotActive=new j.HN0,this._runOnLoad=!0}create(){super.create(),this._runOnLoad&&this.check()}destroy(){this.anyFestivalIsActive.dispose(),this.specificFestivalIsActive.dispose(),this.specificFestivalIsNotActive.dispose(),super.destroy()}check(){var k;const B=null===(k=tt.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival())||void 0===k?void 0:k.type;j.Aq$.isDefined(B)?(this.anyFestivalIsActive.dispatch(),this.festivalID===B?this.specificFestivalIsActive.dispatch():this.specificFestivalIsNotActive.dispatch()):this.specificFestivalIsNotActive.dispatch()}};(0,G.Cg)([(0,j.gfw)(Zp.Q),(0,G.Sn)("design:type",Number)],w_.prototype,"festivalID",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],w_.prototype,"anyFestivalIsActive",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],w_.prototype,"specificFestivalIsActive",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],w_.prototype,"specificFestivalIsNotActive",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],w_.prototype,"_runOnLoad",void 0),w_=(0,G.Cg)([(0,j.EVk)("ActiveFestivalGuard",W.Y.utility)],w_);var T_=U(72012);let S_=class extends T_.y{constructor(){super(...arguments),this._booleanStates=[]}create(){super.create(),this.checkStatesValue();const k=this._booleanStates.length;for(let B=0;B.5?1:-1;this.gameObject.transform.setScale(k*U,B)}}};(0,G.Cg)([(0,j.gfw)(H_),(0,G.Sn)("design:type",String)],V_.prototype,"_startingDirection",void 0),(0,G.Cg)([(0,j.gfw)(H_),(0,G.Sn)("design:type",String)],V_.prototype,"_targetDirection",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],V_.prototype,"_runOnCreate",void 0),V_=(0,G.Cg)([(0,j.EVk)("FaceDirection",W.Y.utility)],V_);let W_=class extends j.uAl{constructor(){super(...arguments),this._shouldFlipOnXAxis=!0,this._shouldFlipOnYAxis=!1,this._isLeftFacing=!1,this._isTopFacing=!1,this._shouldRunOnUpdate=!1}create(){super.create(),this.faceCenter()}update(){super.update(),this._shouldRunOnUpdate&&this.faceCenter()}faceCenter(){const k=tt.q.instance.game.width/2,B=tt.q.instance.game.height/2,U=this.GameObject.transform?this.GameObject.transform.worldPosition:this.GameObject.legacyTransform.group.getGlobalPosition(),F=this.GameObject.transform?this.GameObject.transform.localScale:this.GameObject.legacyTransform.group.scale;let G=F.x,j=F.y;this._shouldFlipOnXAxis&&(G=this._isLeftFacing?U.xk?-Math.abs(F.x):Math.abs(F.x)),this._shouldFlipOnYAxis&&(j=this._isTopFacing?U.yB?-Math.abs(F.y):Math.abs(F.y)),this.GameObject.transform?this.GameObject.transform.setScale(G,j):(this.GameObject.legacyTransform.group.scale.x=G,this.GameObject.legacyTransform.group.scale.y=j)}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W_.prototype,"_shouldFlipOnXAxis",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W_.prototype,"_shouldFlipOnYAxis",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W_.prototype,"_isLeftFacing",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W_.prototype,"_isTopFacing",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W_.prototype,"_shouldRunOnUpdate",void 0),W_=(0,G.Cg)([(0,j.EVk)("FaceTowardCenterComponent",W.Y.utility)],W_);var q_=U(64593);let K_=class extends j.uAl{toggleFullScreen(){tt.q.instance.prodigy.game.scale.isFullScreen?this.exitFullScreen():this.enterFullScreen()}enterFullScreen(){tt.q.instance.prodigy.game.scale.fullScreenScaleMode=q_.y.EXACT_FIT,tt.q.instance.prodigy.game.scale.fullScreenTarget=document.body,tt.q.instance.prodigy.game.scale.startFullScreen()}exitFullScreen(){tt.q.instance.prodigy.game.scale.stopFullScreen()}};K_=(0,G.Cg)([(0,j.EVk)("FullScreen",W.Y.utility)],K_);let z_=class extends j.uAl{constructor(){super(...arguments),this.onInFullscreenMode=new j.HN0,this.onNotInFullscreenMode=new j.HN0,this.runOnLoad=!1}create(){super.create(),this.runOnLoad&&this.check()}destroy(){this.onInFullscreenMode.dispose(),this.onNotInFullscreenMode.dispose(),super.destroy()}check(){tt.q.instance.prodigy.game.scale.isFullScreen?this.onInFullscreenMode.dispatch():this.onNotInFullscreenMode.dispatch()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],z_.prototype,"onInFullscreenMode",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],z_.prototype,"onNotInFullscreenMode",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],z_.prototype,"runOnLoad",void 0),z_=(0,G.Cg)([(0,j.EVk)("FullScreenGuard",W.Y.utility)],z_);let Y_=class extends pt._{constructor(){super(...arguments),this._onComparisonTrue=new j.HN0,this._onComparisonFalse=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.check()}destroy(){this._onComparisonTrue.dispose(),this._onComparisonFalse.dispose(),super.destroy()}check(){var k;(null===(k=Kt.A.get(this._gameConstantKey))||void 0===k?void 0:k.toString())===this._comparisonString?this._onComparisonTrue.dispatch():this._onComparisonFalse.dispatch()}getData(){return Kt.A.get(this._gameConstantKey)}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Y_.prototype,"_onComparisonTrue",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Y_.prototype,"_onComparisonFalse",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Y_.prototype,"_runOnLoad",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Y_.prototype,"_gameConstantKey",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Y_.prototype,"_comparisonString",void 0),Y_=(0,G.Cg)([(0,j.EVk)("GameConstantComparatorGuard",W.Y.utility)],Y_);let Q_=class extends j.uAl{constructor(){super(...arguments),this._index=0,this._onValueExtracted=new j.HN0}extractValue(k){!k||this._index>=k.length?j.VyI.log("[GetValueFromArrayComponent] Warning: Attempting to extract value from an array with an index out of bounds",j.$bb.Warning):this._onValueExtracted.dispatch(k[this._index])}destroy(){this._onValueExtracted.dispose(),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q_.prototype,"_index",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Q_.prototype,"_onValueExtracted",void 0),Q_=(0,G.Cg)([(0,j.EVk)("GetValueFromArray",W.Y.utility)],Q_);let X_=class extends j.uAl{constructor(){super(...arguments),this._booleanStates=[],this.onResult=new j.HN0,this._value=!1}get value(){return this._value}checkEvery(){this._value=this._booleanStates.every((k=>!0===k.getValue())),this.onResult.dispatch(this.value)}destroy(){this.onResult.dispose(),super.destroy()}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(T_.y),(0,G.Sn)("design:type",Array)],X_.prototype,"_booleanStates",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],X_.prototype,"onResult",void 0),X_=(0,G.Cg)([(0,j.EVk)("GroupBooleanStateCheckValue",W.Y.utility)],X_);let Z_=class extends j.uAl{constructor(){super(...arguments),this.hideWhenNotMobile=!1}create(){this.gameObject.active=j.o5U.isMobile()===this.hideWhenNotMobile}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Z_.prototype,"hideWhenNotMobile",void 0),Z_=(0,G.Cg)([(0,j.EVk)("HideOnMobile",W.Y.utility)],Z_);U(70005);let J_=class extends j.uAl{constructor(){super(...arguments),this._onHome=new j.HN0,this._onSchool=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.checkLocation()}checkLocation(){this._playerData.player.isPlayingAtSchool()?this._onSchool.dispatch():this._onHome.dispatch()}destroy(){this._onSchool.dispose(),this._onHome.dispose(),super.destroy()}checkLocationForZone(k){tt.q.instance.prodigy.classModeController.isLockedZone(k)?this._onSchool.dispatch():this._onHome.dispatch()}showZoneLockMessage(k){tt.q.instance.prodigy.classModeController.onClassMode(k)}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],J_.prototype,"_playerData",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],J_.prototype,"_onHome",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],J_.prototype,"_onSchool",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],J_.prototype,"_runOnLoad",void 0),J_=(0,G.Cg)([(0,j.EVk)("IsAtHomeOrSchool",W.Y.utility)],J_);let tE=class extends j.uAl{constructor(){super(...arguments),this._zones=[],this.isInZone=new j.HN0,this.isNotInZone=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.checkIfPlayerIsInZone()}destroy(){this.isInZone.dispose(),this.isNotInZone.dispose(),super.destroy()}checkIfPlayerIsInZone(){let k=!1;this._zones.forEach((B=>{tt.q.instance.prodigy.world.getCurrentZone()===B&&(k=!0)})),k?this.isInZone.dispatch():this.isNotInZone.dispatch()}};(0,G.Cg)([(0,j.SZi)(),(0,j.gfw)(Ft.A_),(0,G.Sn)("design:type",Array)],tE.prototype,"_zones",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],tE.prototype,"isInZone",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],tE.prototype,"isNotInZone",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],tE.prototype,"_runOnLoad",void 0),tE=(0,G.Cg)([(0,j.EVk)("IsInZoneGuard",W.Y.utility)],tE);let eE=class extends j.uAl{constructor(){super(...arguments),this._parentTransform=null,this._scaleX=1,this._scaleY=1}update(){super.update(),this._parentTransform.localScale.x!==this._scaleX&&(this.gameObject.transform.localScale.x*=-1,this._scaleX=this._parentTransform.localScale.x),this._parentTransform.localScale.y!==this._scaleY&&(this.gameObject.transform.localScale.y*=-1,this._scaleY=this._parentTransform.localScale.y)}};(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],eE.prototype,"_parentTransform",void 0),eE=(0,G.Cg)([(0,j.EVk)("KeepScaleOrientation",W.Y.utility)],eE);let iE=class extends j.uAl{constructor(){super(...arguments),this._holdOnCreate=!0,this._isCritical=!1,this._timeoutMs=0,this.onComplete=new j.HN0,this.onTimeout=new j.HN0,this.onError=new j.HN0}create(){super.create(),this._holdOnCreate&&this.registerWithLoadingScreen()}registerWithLoadingScreen(){if(j.Aq$.isDefined(this._promise))return void j.VyI.log("LoadingWaitComponent is already registered with the loading screen. Call complete() or fail() before registering again.",j.$bb.Error);this._promise=new j.bnh,this._timeoutMs>0&&(this._timeoutId=window.setTimeout((()=>{this.timeout()}),this._timeoutMs));const k=tt.q.instance.game.state.get(Tt.G.Loading);k?k.waitFor(this._promise,this._isCritical):j.VyI.log("Loading screen not available, cannot register LoadingWaitComponent",j.$bb.Warning)}complete(){var k;this.clearTimeout(),null===(k=this._promise)||void 0===k||k.resolve(),this._promise=void 0,this.onComplete.dispatch()}fail(k="Operation failed"){var B;this.clearTimeout(),null===(B=this._promise)||void 0===B||B.reject(k),this._promise=void 0,this.onError.dispatch(k)}timeout(){var k,B;this._timeoutId=void 0,this._isCritical?null===(k=this._promise)||void 0===k||k.reject(new Error("Loading operation timed out")):null===(B=this._promise)||void 0===B||B.resolve(),this.onTimeout.dispatch()}clearTimeout(){j.Aq$.isDefined(this._timeoutId)&&(window.clearTimeout(this._timeoutId),this._timeoutId=void 0)}destroy(){this._promise=void 0,this.clearTimeout(),this.onComplete.dispose(),this.onTimeout.dispose(),this.onError.dispose(),super.destroy()}};(0,G.Cg)([(0,j.vkK)(),(0,j.YLv)("If true, the loading screen will be held immediately upon creation."),(0,G.Sn)("design:type",Boolean)],iE.prototype,"_holdOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,j.YLv)("If true, loading will show an error popup if the operation fails."),(0,G.Sn)("design:type",Boolean)],iE.prototype,"_isCritical",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.YLv)("Optional timeout in milliseconds. Set to 0 for no timeout."),(0,G.Sn)("design:type",Number)],iE.prototype,"_timeoutMs",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],iE.prototype,"onComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],iE.prototype,"onTimeout",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],iE.prototype,"onError",void 0),iE=(0,G.Cg)([(0,j.EVk)("LoadingScreenHold",W.Y.utility)],iE);let sE=class extends j.uAl{create(){super.create(),this.logOnCreate&&this.LogMessage()}LogMessage(k){let B="";k&&k.length>0?B=k:this.defaultMessage&&this.defaultMessage.length>0&&(B=this.defaultMessage),j.VyI.log(`[PREFAB LOG]: ${B}`,j.$bb.Verbose)}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],sE.prototype,"defaultMessage",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],sE.prototype,"logOnCreate",void 0),sE=(0,G.Cg)([(0,j.EVk)("Log",W.Y.utility)],sE);let nE=class extends j.uAl{constructor(){super(...arguments),this.membershipSuppressOn=new j.HN0,this.membershipSuppressOff=new j.HN0,this._shouldSuppressAd=!1}set suppressAdEnabled(k){this._shouldSuppressAd=k}get suppressAdEnabled(){return this._shouldSuppressAd}create(){super.create(),this.suppressAdEnabled=Qt.J.shouldSuppressAd(tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player)}run(){this._shouldSuppressAd?this.membershipSuppressOn.dispatch():this.membershipSuppressOff.dispatch()}destroy(){this.membershipSuppressOn.dispose(),this.membershipSuppressOff.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nE.prototype,"membershipSuppressOn",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nE.prototype,"membershipSuppressOff",void 0),nE=(0,G.Cg)([(0,j.EVk)("MembershipSuppression",W.Y.membership)],nE);let aE=class extends j.uAl{constructor(){super(...arguments),this.onIsVisible=new j.HN0,this.onNotVisible=new j.HN0}create(){super.create(),this._broadcaster=tt.q.instance.game.broadcaster,this._broadcaster.addAppListener(jn.J8.MorphMarbleUsed,this.dispatchIsVisible.bind(this),this),this._broadcaster.addAppListener(jn.J8.MorphMarbleCancelled,this.checkMorphMarbleState.bind(this),this),this._runOnLoad&&this.checkMorphMarbleState()}destroy(){var k,B;this.onIsVisible.dispose(),this.onNotVisible.dispose(),null===(k=this._broadcaster)||void 0===k||k.removeAppListener(jn.J8.MorphMarbleUsed,this),null===(B=this._broadcaster)||void 0===B||B.removeAppListener(jn.J8.MorphMarbleCancelled,this),super.destroy()}checkMorphMarbleState(){this._playerProvider.player.isPlayerTransformed()?this.onIsVisible.dispatch():this.onNotVisible.dispatch()}dispatchIsVisible(){this.onIsVisible.dispatch()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],aE.prototype,"_playerProvider",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],aE.prototype,"_runOnLoad",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],aE.prototype,"onIsVisible",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],aE.prototype,"onNotVisible",void 0),aE=(0,G.Cg)([(0,j.EVk)("MorphMarbleState",W.Y.utility)],aE);let rE=class extends j.uAl{constructor(){super(...arguments),this._checkOnCreate=!1,this._onValueChanged=new j.HN0,this._onValueChecked=new j.HN0}create(){super.create(),this._checkOnCreate&&this.checkValue()}setValue(k){k!==this._numberValue&&(this._numberValue=k,this._onValueChanged.dispatch(this._numberValue))}checkValue(){this._onValueChecked.dispatch(this._numberValue)}destroy(){this._onValueChanged.dispose(),this._onValueChecked.dispose(),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],rE.prototype,"_numberValue",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],rE.prototype,"_checkOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rE.prototype,"_onValueChanged",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rE.prototype,"_onValueChecked",void 0),rE=(0,G.Cg)([(0,j.EVk)("NumberState",W.Y.utility)],rE);let oE=class extends j.uAl{constructor(){super(...arguments),this.reportInitialState=!1,this.treatInactiveAsOffScreen=!1,this.onStateChange=new j.HN0,this.onEnteredScreen=new j.HN0,this.onLeftScreen=new j.HN0}create(){super.create(),this._gameWidth=j.W$e.instance.game.width,this._gameHeight=j.W$e.instance.game.height,this.reportInitialState?this.checkOnScreenIfActive():this._isOnScreen=this.isOnScreen(),this.gameObject.transform.onWorldMatrixChanged.add(this.checkOnScreenIfActive,this)}destroy(){this.gameObject.transform.onWorldMatrixChanged.remove(this.checkOnScreenIfActive,this),this.onStateChange.dispose(),this.onEnteredScreen.dispose(),this.onLeftScreen.dispose(),super.destroy()}checkOnScreenIfActive(){this.Active&&this.checkOnScreen()}checkOnScreen(){const k=this.isOnScreen();k!==this._isOnScreen&&(this._isOnScreen=k,this.onStateChange.dispatch(k),k?this.onEnteredScreen.dispatch():this.onLeftScreen.dispatch())}isOnScreen(){if(this.treatInactiveAsOffScreen&&!this.gameObject.active)return!1;const k=this.gameObject.transform;if(k instanceof j.XVE){const B=k.worldPosition.x,U=k.worldPosition.y,F=B+k.widthDelta,G=U+k.heightDelta;return B=0&&U=0}return k.worldPosition.x=0&&k.worldPosition.y=0}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],oE.prototype,"reportInitialState",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],oE.prototype,"treatInactiveAsOffScreen",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],oE.prototype,"onStateChange",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],oE.prototype,"onEnteredScreen",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],oE.prototype,"onLeftScreen",void 0),oE=(0,G.Cg)([(0,j.EVk)("OnScreenState",W.Y.object)],oE);U(57502);let hE=class extends j.uAl{constructor(){super(...arguments),this._onHasCompletedTutorial=new j.HN0,this._onHasNotCompletedTutorial=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.check()}destroy(){this._onHasCompletedTutorial.dispose(),this._onHasNotCompletedTutorial.dispose(),super.destroy()}check(){tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasCompletedTutorial()?this._onHasCompletedTutorial.dispatch():this._onHasNotCompletedTutorial.dispatch()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hE.prototype,"_onHasCompletedTutorial",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hE.prototype,"_onHasNotCompletedTutorial",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],hE.prototype,"_runOnLoad",void 0),hE=(0,G.Cg)([(0,j.EVk)("PlayerHasCompletedTutorialGuard",W.Y.utility)],hE);let cE=class extends j.uAl{getCustomData(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return{[this._customDataPropertyName]:k.backpack.hasItem(this._key,this._id)>0}}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],cE.prototype,"_customDataPropertyName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],cE.prototype,"_key",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],cE.prototype,"_id",void 0),cE=(0,G.Cg)([(0,j.EVk)("PlayerHasItemCustomData",W.Y.utility)],cE);let dE=class extends j.uAl{constructor(){super(...arguments),this.doesHaveItem=new j.HN0,this.doesNotHaveItem=new j.HN0}destroy(){this.doesHaveItem.dispose(),this.doesNotHaveItem.dispose(),super.destroy()}hasItem(){tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem(this._key,this._id)>0?this.doesHaveItem.dispatch():this.doesNotHaveItem.dispatch()}};var lE;(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],dE.prototype,"_key",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],dE.prototype,"_id",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],dE.prototype,"doesHaveItem",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],dE.prototype,"doesNotHaveItem",void 0),dE=(0,G.Cg)([(0,j.EVk)("PlayerHasItemGuard",W.Y.utility)],dE),function(k){k.HasAnyItem="AnHasAnyItemy",k.HasAllItems="HasAllItems"}(lE||(lE={}));let uE=class extends j.uAl{constructor(){super(...arguments),this._dispatchOnCreate=!1,this._whenToDispatchHasItems=lE.HasAnyItem,this.doesHaveItems=new j.HN0,this.doesNotHaveItems=new j.HN0}create(){super.create(),this._dispatchOnCreate&&this.hasItem()}destroy(){this.doesHaveItems.dispose(),this.doesNotHaveItems.dispose(),super.destroy()}hasItem(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(this._whenToDispatchHasItems===lE.HasAnyItem){(this._keys.some(((B,U)=>{const F=this._ids[U];return k.backpack.hasItem(B,F)>0}))?this.doesHaveItems:this.doesNotHaveItems).dispatch()}else if(this._whenToDispatchHasItems===lE.HasAllItems){let B=!0;this._keys.forEach(((U,F)=>{const G=this._ids[F];0===k.backpack.hasItem(U,G)&&(B=!1)})),B?this.doesHaveItems.dispatch():this.doesNotHaveItems.dispatch()}}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],uE.prototype,"_dispatchOnCreate",void 0),(0,G.Cg)([(0,j.gfw)(lE),(0,G.Sn)("design:type",String)],uE.prototype,"_whenToDispatchHasItems",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],uE.prototype,"_keys",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.g11)(),(0,G.Sn)("design:type",Array)],uE.prototype,"_ids",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uE.prototype,"doesHaveItems",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uE.prototype,"doesNotHaveItems",void 0),uE=(0,G.Cg)([(0,j.EVk)("PlayerHasMultipleItemGuard",W.Y.utility)],uE);let fE=class extends j.uAl{constructor(){super(...arguments),this._callPromiseFunctions=new j.HN0,this.onPromisesResolved=new j.HN0,this.onPromiseRejected=new j.HN0}destroy(){this._callPromiseFunctions.dispose(),this.onPromiseRejected.dispose(),this.onPromisesResolved.dispose(),super.destroy()}callPromises(){const k=this._callPromiseFunctions._bindings,B=k.map((k=>k.listener.apply(k.context))).filter((k=>k instanceof Promise));(0,ut.v)(B.length===k.length,"Invalid function was added to the promises signal"),Promise.all(B).then((()=>{this.onPromisesResolved.dispatch()})).catch((()=>{this.onPromiseRejected.dispatch()}))}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],fE.prototype,"_callPromiseFunctions",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],fE.prototype,"onPromisesResolved",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],fE.prototype,"onPromiseRejected",void 0),fE=(0,G.Cg)([(0,j.EVk)("PromiseAwaiter",W.Y.utility)],fE);var bE=U(20404);let pE=class extends j.uAl{constructor(){super(...arguments),this.onCheckTrue=new j.HN0,this.onCheckFalse=new j.HN0}checkQueryParamExists(){(bE.b.isQueryParameterSetForSession(this._assetID)?this.onCheckTrue:this.onCheckFalse).dispatch()}destroy(){this.onCheckTrue.dispose(),this.onCheckFalse.dispose(),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],pE.prototype,"_assetID",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],pE.prototype,"onCheckTrue",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],pE.prototype,"onCheckFalse",void 0),pE=(0,G.Cg)([(0,j.EVk)("QueryParamExistsGuard",W.Y.web)],pE);let vE=class extends j.uAl{constructor(){super(...arguments),this._runOnCreate=!1,this._decisionThreshold=.5,this._onBelowThreshold=new j.HN0,this._onAboveThreshold=new j.HN0}create(){super.create(),this._runOnCreate&&this.run()}run(){Math.random()=this._maxValue&&j.VyI.log("RandomComponent: Invalid range - minValue must be less than maxValue",j.$bb.Error)}getData(){return this._wholeNumbersOnly?Qe.o.integerInRange(this._minValue,this._maxValue):Qe.o.realInRange(this._minValue,this._maxValue)}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],mE.prototype,"_wholeNumbersOnly",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],mE.prototype,"_minValue",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.YLv)("Max is exclusive. i.e. 4 will return up to 3.9999 (or 3 if whole numbers)"),(0,G.Sn)("design:type",Number)],mE.prototype,"_maxValue",void 0),mE=(0,G.Cg)([(0,j.EVk)("RandomNumberDataProvider",W.Y.utility)],mE);let yE=class extends j.uAl{get anchorMinX(){return this._rectTransform.anchorMin.x}set anchorMinX(k){this._rectTransform.setAnchorMin(k,this.anchorMinY)}get anchorMinY(){return this._rectTransform.anchorMin.y}set anchorMinY(k){this._rectTransform.setAnchorMin(this.anchorMinX,k)}get anchorMaxX(){return this._rectTransform.anchorMax.x}set anchorMaxX(k){this._rectTransform.setAnchorMax(k,this.anchorMaxY)}get anchorMaxY(){return this._rectTransform.anchorMax.y}set anchorMaxY(k){this._rectTransform.setAnchorMax(this.anchorMaxX,k)}get width(){return this._rectTransform.sizeDelta.width}set width(k){this._rectTransform.sizeDelta=new j.or0(k,this.height)}get height(){return this._rectTransform.sizeDelta.height}set height(k){this._rectTransform.sizeDelta=new j.or0(this.width,k)}get pivotX(){return this._rectTransform.pivot.x}set pivotX(k){this._rectTransform.pivot=new j.I9Y(k,this.pivotY)}get pivotY(){return this._rectTransform.pivot.y}set pivotY(k){this._rectTransform.pivot=new j.I9Y(this.pivotX,k)}get rotation(){return this._rectTransform.localRotation}set rotation(k){this._rectTransform.setRotation(k)}get scaleX(){return this._rectTransform.localScale.x}set scaleX(k){this._rectTransform.setScale(k,this.scaleY)}get scaleY(){return this._rectTransform.localScale.y}set scaleY(k){this._rectTransform.setScale(this.scaleX,k)}get posX(){return this._rectTransform.posX}set posX(k){this._rectTransform.posX=k}get yPos(){return this._rectTransform.posY}set yPos(k){this._rectTransform.posY=k}};(0,G.Cg)([(0,j.Pqz)(j.XVE),(0,G.Sn)("design:type",j.XVE)],yE.prototype,"_rectTransform",void 0),yE=(0,G.Cg)([(0,j.EVk)("RectTransformWrapper",W.Y.animation)],yE);let _E=class extends j.uAl{reparent(){this._gameObject.parent=this._targetGameObject}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_E.prototype,"_gameObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_E.prototype,"_targetGameObject",void 0),_E=(0,G.Cg)([(0,j.EVk)("ReparentGameObject",W.Y.utility)],_E);let EE=class extends j.uAl{constructor(){super(...arguments),this._onReplacementComplete=new j.HN0}run(){const k=[];this._targetTiledLayer.findComponentsInChildren(j.w4d).filter((k=>k.tag===this._tagName)).sort(((k,B)=>B.GameObject.legacyTransform.group.position.y-k.GameObject.legacyTransform.group.position.y)).forEach((B=>(0,G.sH)(this,void 0,void 0,(function*(){const U=B.GameObject.legacyTransform.group.position.x,F=B.GameObject.legacyTransform.group.position.y,G=B.GameObject.parent;B.GameObject.destroy();const $=this._prefabLoader.loadWithDependencies(this._prefabID).promise;k.push($),$.then((k=>{G.addChild(k),k.transform?k.transform.setPosition(U,F):(k.legacyTransform.x=U,k.legacyTransform.y=F)})).catch((k=>{j.VyI.log(`Could not load a prefab as tile replacement: ${k.message}`,j.$bb.Error)}))})))),Promise.all(k).then((()=>{this._onReplacementComplete.dispatch()})).catch((k=>{j.VyI.log(`Error loading one or more tile replacements: ${k.message}`,j.$bb.Error),this._onReplacementComplete.dispatch()}))}destroy(){this._onReplacementComplete.dispose(),super.destroy()}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],EE.prototype,"_targetTiledLayer",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],EE.prototype,"_prefabID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],EE.prototype,"_tagName",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],EE.prototype,"_onReplacementComplete",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],EE.prototype,"_prefabLoader",void 0),EE=(0,G.Cg)([(0,j.EVk)("ReplaceTileWithPrefab",W.Y.utility)],EE);let wE=class extends j.uAl{constructor(){super(...arguments),this._bounds=new j.I9Y(100,100),this._limitMaxScale=!1,this._maxScale=new j.I9Y,this._runOnCreate=!1}create(){super.create(),this._runOnCreate&&this.applyScaling()}setBounds(k){this._bounds=k,this.applyScaling()}setBoundsXY(k,B){this._bounds.x=k,this._bounds.y=B,this.applyScaling()}applyScaling(){var k,B,U,F;if(!this._spine.isLoaded)return void this._spine.OnLoaded.addOnce(this.applyScaling,this);const G=this._spine.getDimensions().width,j=this._spine.getDimensions().height;let $;$=this._limitMaxScale?Math.min(Math.min(null!==(B=null===(k=this._maxScale)||void 0===k?void 0:k.x)&&void 0!==B?B:1/0,this._bounds.x/G),Math.min(null!==(F=null===(U=this._maxScale)||void 0===U?void 0:U.y)&&void 0!==F?F:1/0,this._bounds.y/j)):Math.min(this._bounds.x/G,this._bounds.y/j),this.gameObject.transform.setScale($)}};(0,G.Cg)([(0,j.Pqz)(j.v2j),(0,G.Sn)("design:type",j.v2j)],wE.prototype,"_spine",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],wE.prototype,"_bounds",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],wE.prototype,"_limitMaxScale",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],wE.prototype,"_maxScale",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],wE.prototype,"_runOnCreate",void 0),wE=(0,G.Cg)([(0,j.EVk)("ScaleSpineToBounds",W.Y.utility)],wE);let TE=class extends j.uAl{constructor(){super(...arguments),this._scale=new j.I9Y(1,1),this._bounds=new j.I9Y(100,100),this._scaleToBoundsWidth=!1,this._runOnCreate=!1}create(){super.create(),this._runOnCreate&&this.applyScaling()}setScale(k){this._scale=k}setBounds(k){this._bounds=k}applyScaling(){if(!this._spine.isLoaded)return void this._spine.OnLoaded.addOnce(this.applyScaling,this);if(this._scaleToBoundsWidth){const k=Math.max(this._bounds.x/this._spine.getDimensions().width,1);this.setScale(new j.I9Y(k,k))}const k=this._spine.getDimensions().width*this._scale.x,B=this._spine.getDimensions().height*this._scale.y;k>this._bounds.x||B>this._bounds.y?j.VyI.log("[ScaleSpineWithinBoundsComponent] Spine dimensions are larger than specified boundaries -- scaling not applied.",j.$bb.Verbose):this.gameObject.transform.setScale(this._scale.x,this._scale.y)}};(0,G.Cg)([(0,j.Pqz)(j.v2j),(0,G.Sn)("design:type",j.v2j)],TE.prototype,"_spine",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],TE.prototype,"_scale",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],TE.prototype,"_bounds",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],TE.prototype,"_scaleToBoundsWidth",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],TE.prototype,"_runOnCreate",void 0),TE=(0,G.Cg)([(0,j.EVk)("ScaleSpineWithinBounds",W.Y.utility)],TE);let SE=class extends j.uAl{constructor(){super(...arguments),this._runOnCreate=!1}create(){super.create(),this._runOnCreate&&this.adopt()}adopt(){this._adoptiveParent.addChild(this.GameObject)}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],SE.prototype,"_adoptiveParent",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],SE.prototype,"_runOnCreate",void 0),SE=(0,G.Cg)([(0,j.EVk)("SetParent",W.Y.utility)],SE);let AE=class extends j.uAl{logout(){tt.q.instance.prodigy.gameContainer.get("c97-bd0d").logout()}};AE=(0,G.Cg)([(0,j.EVk)("Settings",W.Y.utility)],AE);let CE=class extends j.uAl{constructor(){super(...arguments),this.signal=new j.HN0}fire(k){this.signal.dispatch(k)}destroy(){this.signal.dispose(),super.destroy()}};var OE;(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],CE.prototype,"signal",void 0),CE=(0,G.Cg)([(0,j.EVk)("SignalDummy",W.Y.utility)],CE);let IE=OE=class extends j.uAl{constructor(){super(...arguments),this._templateString=OE.TEMPLATE_TOKEN,this._groupSeparator=" ",this._weeksTemplate="",this._daysTemplate="",this._hoursTemplate="",this._minutesTemplate="",this._secondsTemplate=""}set weeksTemplate(k){this._weeksTemplate=k,this.updateTimeTemplate()}set daysTemplate(k){this._daysTemplate=k,this.updateTimeTemplate()}set hoursTemplate(k){this._hoursTemplate=k,this.updateTimeTemplate()}set minutesTemplate(k){this._minutesTemplate=k,this.updateTimeTemplate()}set secondsTemplate(k){this._secondsTemplate=k,this.updateTimeTemplate()}create(){super.create(),this._timeRemainingText.onTimerUpdated.add(this.updateTimeTemplate,this),this._timeRemainingText.onTimerCompleted.add(this.updateTimeTemplate,this),this.updateTimeTemplate()}destroy(){this._timeRemainingText.onTimerUpdated.remove(this.updateTimeTemplate,this),this._timeRemainingText.onTimerCompleted.remove(this.updateTimeTemplate,this),super.destroy()}updateTimeTemplate(){var k;const B=[["w",this._timeRemainingText.weekRemaining],["d",this._timeRemainingText.daysRemaining],["h",this._timeRemainingText.hoursRemaining],["m",this._timeRemainingText.minutesRemaining],["s",this._timeRemainingText.secondsRemaining]],U=[this.getSegmentTemplate(this.localizeIfPossible(this._weeksTemplate),B[0][1]),this.getSegmentTemplate(this.localizeIfPossible(this._daysTemplate),B[1][1]),this.getSegmentTemplate(this.localizeIfPossible(this._hoursTemplate),B[2][1]),this.getSegmentTemplate(this.localizeIfPossible(this._minutesTemplate),B[3][1]),this.getSegmentTemplate(this.localizeIfPossible(this._secondsTemplate),B[4][1])];if(this._hideCompletedTimeComponents){const k=this._timeRemainingText.smallestTimeGroup;for(;B.length>0&&B[0][1]<=0&&B[0][0]!==k;)B.shift(),U.shift()}this._maxGroups>0&&U.length>this._maxGroups&&(U.length=this._maxGroups);const F=U.filter((k=>k.length>0)).join(this._groupSeparator),G=(null===(k=this._templateString)||void 0===k?void 0:k.length)>0?this.localizeIfPossible(this._templateString).replace(OE.TEMPLATE_TOKEN,F):OE.TEMPLATE_TOKEN;this._timeRemainingText.setTemplateString(G)}getSegmentTemplate(k,B){const U=k.includes("{p}")?"{p}":"{s}",F=1!==B?"s":"";return k.split(U).join(F)}localizeIfPossible(k){return this._localizer.hasText(k)?this._localizer.getText(k):k}};IE.TEMPLATE_TOKEN="{t}",(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],IE.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],IE.prototype,"_timeRemainingText",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],IE.prototype,"_templateString",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],IE.prototype,"_groupSeparator",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],IE.prototype,"_hideCompletedTimeComponents",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],IE.prototype,"_maxGroups",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],IE.prototype,"_weeksTemplate",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],IE.prototype,"_daysTemplate",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],IE.prototype,"_hoursTemplate",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],IE.prototype,"_minutesTemplate",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],IE.prototype,"_secondsTemplate",void 0),IE=OE=(0,G.Cg)([(0,j.EVk)("TimeRemainingTemplateUpdate",W.Y.ui)],IE);var DE=U(95798);let RE=class extends j.uAl{disableAreaEvents(){const k=tt.q.instance.game.state.get(Tt.G.TileScreen);null==k||k.events.forEach((k=>{k instanceof DE.o&&k.disable()}))}};RE=(0,G.Cg)([(0,j.EVk)("ToggleLegacyMapAreaEvents",W.Y.map)],RE);var PE=U(56903);let ME=class extends j.uAl{constructor(){super(...arguments),this.unseenAds=new j.HN0,this._runOnLoad=!1}create(){super.create(),tt.q.instance.game.broadcaster.addAppListener(jn.Y1.RefreshWizardWatchAdCount,this.checkUnseenAdCount,this,jn.HG.HUD),PE.A.getWizardWatchData().then((k=>(0,G.sH)(this,void 0,void 0,(function*(){PE.A.getActiveEntityAds(),this._runOnLoad&&this.checkUnseenAdCount()})))).catch(j.RQr.createHandler("Error loading data for Wizard Watch ads"))}destroy(){this.unseenAds.dispose(),tt.q.instance.game.broadcaster.removeAppListener(jn.Y1.RefreshWizardWatchAdCount,this,jn.HG.HUD),super.destroy()}checkUnseenAdCount(){const k=PE.A.getUnseenActiveAdCount();this.unseenAds.dispatch(k>0,k>0?k:0)}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ME.prototype,"unseenAds",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ME.prototype,"_runOnLoad",void 0),ME=(0,G.Cg)([(0,j.EVk)("UnseenAdCount",W.Y.utility)],ME);var NE=U(36045);let xE=class extends NE.X{isPointOverShape(k){const B=this.worldPointToParent(k,this._rectTransform),U=this._rectTransform.getBounds(),F=new j.or0(U.right-U.left,U.bottom-U.top),G=U.left+F.getHalfWidth(),$=U.top+F.getHalfHeight(),H=2*(G-B.x)/F.width,V=2*($-B.y)/F.height;return H*H+V*V<1}};(0,G.Cg)([(0,j.Pqz)(j.XVE),(0,G.Sn)("design:type",j.XVE)],xE.prototype,"_rectTransform",void 0),xE=(0,G.Cg)([(0,j.EVk)("EllipseShape",W.Y.inputShapes)],xE);U(77442);let LE=class extends NE.X{isPointOverShape(k){const B=this.worldPointToParent(k,this._rectTransform),U=this._rectTransform.getBounds();return B.x>=U.left&&B.x=U.top&&B.yB.Active&&B.isPointOverShape(k)))}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(NE.X),(0,G.Sn)("design:type",Array)],kE.prototype,"_shapes",void 0),kE=(0,G.Cg)([(0,j.EVk)("ShapeGroup",W.Y.inputShapes)],kE);var BE=U(43924),UE=U.n(BE);class FE{static createSeeded(k){return new FE(UE()(k.toString()))}static get DEFAULT(){return this._defaultInstance}constructor(k=Math.random){this._rngFunction=k}setRandomNumberGenerator(k){this._rngFunction=k}getReal(k=1){return this._rngFunction()*k}getRealInRange(k,B){return this.getReal(B-k)+k}getInteger(k=Number.MAX_SAFE_INTEGER){return Math.floor(this._rngFunction()*k)}getIntegerInRange(k,B){return this.getInteger(B-k)+k}getSeed(){return this.getInteger()^this.getInteger()}shuffle(k){for(let B=k.length-1;B>0;B--){const U=this.getInteger(B),F=k[U];k[U]=k[B],k[B]=F}return k}}FE._defaultInstance=new FE(Math.random);class GE{constructor(k){this._tableData=k}getItem(k,B=FE.DEFAULT){const U=this.getItemWithWeight(k,B);return U&&delete U.weight,U}getItemWithWeight(k,B=FE.DEFAULT){const U=this.buildWeightedItemList(k),F=this.selectRandomTableElement(U.items,U.totalItemWeights,B);return F?{type:F.type,ID:F.ID,quantity:this.getItemQuantity(F,B),weight:F.weight}:null}getUniqueItemsWithWeight(k,B,U=FE.DEFAULT){const F=[],G=this.buildWeightedItemList(B),j=G.items;for(let $=0;$0){const k=this.selectRandomTableElement(G.items,G.totalItemWeights,U),B=j.indexOf(k);B>-1&&(j.splice(B,1),G.totalItemWeights-=k.weight,F.push({type:k.type,ID:k.ID,quantity:this.getItemQuantity(k,U),weight:k.weight}))}else{const k=this._tableData[0].fallback;F.push({type:k.type,ID:k.ID,quantity:this.getItemQuantity(k,U),weight:1})}return F}getUniqueItems(k,B,U=FE.DEFAULT){return this.getUniqueItemsWithWeight(k,B,U).map((k=>({type:k.type,ID:k.ID,quantity:k.quantity})))}getItems(k,B,U=FE.DEFAULT){const F=[];for(let G=0;G-1;--G){const j=k[G],$=B.getMaxCount(j.type);if($>0){const G=B.getOwnedCount(j.type,j.ID)+k.filter((k=>k.type===j.type&&k.ID===j.ID)).map((k=>k.quantity)).reduce(((k,B)=>k+B),0);if(G>$){const k=G-$;j.quantity>1&&kk.items)),U=B.length;let F=0;for(let G=0;G-1&&k.getOwnedCount(U.type,U.ID)>=j&&(B[G]=Object.assign(Object.assign({},this._tableData[0].fallback),{weight:U.weight}))}return{totalItemWeights:F,items:B}}}var jE=U(88701);let $E=class extends pt._{create(){super.create();const k=Yt.t.getItem("itemTable",this._itemTableAssetId);(null==k?void 0:k.data)?this._itemTable=new GE([k.data]):j.VyI.log(`[ItemTableComponent]: No item table data found for asset ID ${this._itemTableAssetId}`,j.$bb.Error)}getData(){if(!this._itemTable)return j.VyI.log("[ItemTableComponent]: Item table is not initialized.",j.$bb.Error),null;const k=this._itemTable.getItem(this._activePlayerItemStorage);return k?[k.type,k.ID,k.quantity]:(j.VyI.log(`[ItemTableComponent]: Failed to retrieve item from ItemTable ${this._itemTableAssetId}.`,j.$bb.Warning),null)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],$E.prototype,"_itemTableAssetId",void 0),(0,G.Cg)([(0,j.Cdj)("f51-26f1"),(0,G.Sn)("design:type",jE.C)],$E.prototype,"_activePlayerItemStorage",void 0),$E=(0,G.Cg)([(0,j.EVk)("ItemTableDataProvider",W.Y.item)],$E);let HE=class extends j.uAl{destroy(){this._popupManager?this.enableNotifications():tt.q.instance.prodigy.notifications.resume(this),super.destroy()}disableNotifications(){(0,Td.dU)(this._popupManager,this)}enableNotifications(){(0,Td.EK)(this._popupManager,this)}};(0,G.Cg)([(0,j.Cdj)("PopupHandler"),(0,G.Sn)("design:type",el.Y)],HE.prototype,"_popupManager",void 0),HE=(0,G.Cg)([(0,j.EVk)("EnableNotifications",W.Y.ui)],HE);U(38268);let VE=class extends j.uAl{constructor(){super(...arguments),this._useLocalAssets=!1,this.hasMetRequirements=new j.HN0,this.hasNotMetRequirements=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.checkRequirements()}destroy(){this.hasMetRequirements.dispose(),this.hasNotMetRequirements.dispose(),super.destroy()}checkRequirements(){let k;if(this._useLocalAssets){if(k=tt.q.instance.game.cache.getJSON(this._requirementsDataSource)[this.requirementsKey].data,!k)return void j.VyI.log(`[MeetsFeatureRequirementsComponent]: Cannot find local asset for requirement ${this.requirementsKey}`,j.$bb.Error)}else k=this._requirementsID;Eo.a.getRequirementsResult(k).then((k=>{k?this.hasMetRequirements.dispatch():this.hasNotMetRequirements.dispatch()})).catch(j.RQr.createHandler("[MeetsFeatureRequirementsComponent]: Error checking requirements"))}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],VE.prototype,"_useLocalAssets",void 0),(0,G.Cg)([(0,j.okD)((k=>!k._useLocalAssets)),(0,j.g11)(),(0,G.Sn)("design:type",Number)],VE.prototype,"_requirementsID",void 0),(0,G.Cg)([(0,j.okD)((k=>k._useLocalAssets)),(0,j.Bak)(),(0,j.tW2)("requirements"),(0,G.Sn)("design:type",String)],VE.prototype,"_requirementsDataSource",void 0),(0,G.Cg)([(0,j.okD)((k=>k._useLocalAssets)),(0,j.W_S)(),(0,G.Sn)("design:type",String)],VE.prototype,"requirementsKey",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],VE.prototype,"hasMetRequirements",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],VE.prototype,"hasNotMetRequirements",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],VE.prototype,"_runOnLoad",void 0),VE=(0,G.Cg)([(0,j.EVk)("MeetsFeatureRequirements",W.Y.saving)],VE);let WE=class extends j.uAl{destroy(){this.resume(),super.destroy()}pause(){tt.q.instance.prodigy.notifications.pause(this)}resume(){tt.q.instance.prodigy.notifications.resume(this)}resumeAll(){tt.q.instance.prodigy.notifications.resumeAll()}clearNotifications(k=!1){tt.q.instance.prodigy.notifications.clearNotifications(k)}pauseAndClearNotifications(k=!1){this.pause(),this.clearNotifications(k)}};WE=(0,G.Cg)([(0,j.EVk)("NotificationController",W.Y.ui)],WE);let qE=class extends pt._{getData(){return tt.q.instance.prodigy.notifications.isPaused()}};qE=(0,G.Cg)([(0,j.EVk)("NotificationsPausedDataProvider",W.Y.dataProvider)],qE);var KE=U(642),zE=U(75329);let YE=class extends j.uAl{constructor(){super(...arguments),this.onDialogueOpened=new j.HN0,this.onDialogueClosed=new j.HN0}destroy(){this.onDialogueOpened.dispose(),this.onDialogueClosed.dispose(),super.destroy()}openWebsite(){if(Gs.pF.isNativeApp()||j.o5U.isMobile()){const k=new zE.Z(this._localizer.getText("BUTTON_OKAY_CAPITAL"),(()=>{this.onDialogueClosed.dispatch()}),void 0,void 0,this._localizer.getText("UH_OH_TITLE"),this._localizer.getText("OPEN_URL_IN_APP"));tt.q.instance.prodigy.open.informationDialog(k),this.onDialogueOpened.dispatch()}else if(j.Aq$.isDefined(this.websiteLink)){const k=new KE.k(this._localizer.getText("BUTTON_YES_CAPITAL"),(()=>{vp.I.openWebsite(this.websiteLink),this.onDialogueClosed.dispatch()}),this._localizer.getText("BUTTON_NO_CAPITAL"),(()=>{this.onDialogueClosed.dispatch()}),{atlas:Ve._.Ui_store_json,name:"icon-large-exclamation"},void 0,void 0,this._localizer.getText("LOGIN_LEAVE_GAME"),this._localizer.getText("NOW_LEAVING_PRODIGY"));tt.q.instance.prodigy.open.confirmationDialog(k),this.onDialogueOpened.dispatch()}else j.VyI.log("ERROR: Not a valid link!",j.$bb.Verbose)}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],YE.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],YE.prototype,"websiteLink",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],YE.prototype,"onDialogueOpened",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],YE.prototype,"onDialogueClosed",void 0),YE=(0,G.Cg)([(0,j.EVk)("OpenWebsite",j.YH6.ui)],YE);var QE=U(81623);let XE=class extends j.uAl{constructor(){super(...arguments),this.isInstalled=new j.HN0,this.isNotInstalled=new j.HN0}checkInstallState(){(QE.u.PWA_INSTALLED_DURING_CURRENT_SESSION?this.isInstalled:this.isNotInstalled).dispatch()}destroy(){this.isInstalled.dispose(),this.isNotInstalled.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],XE.prototype,"isInstalled",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],XE.prototype,"isNotInstalled",void 0),XE=(0,G.Cg)([(0,j.EVk)("PWAInstalledGuardCurrentSession",W.Y.web)],XE);let ZE=class extends j.uAl{constructor(){super(...arguments),this.isInstalled=new j.HN0,this.isNotInstalled=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.check()}destroy(){this.isInstalled.dispose(),this.isNotInstalled.dispose(),super.destroy()}check(){(this._pwaService.isPWAInstalled()?this.isInstalled:this.isNotInstalled).dispatch()}};(0,G.Cg)([(0,j.Cdj)("313-bcd5"),(0,G.Sn)("design:type",QE.u)],ZE.prototype,"_pwaService",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ZE.prototype,"isInstalled",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ZE.prototype,"isNotInstalled",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ZE.prototype,"_runOnLoad",void 0),ZE=(0,G.Cg)([(0,j.EVk)("PWAInstalledGuard",W.Y.web)],ZE);var JE=U(95066),tw=U(36525);let ew=class extends j.uAl{constructor(){super(...arguments),this.onPWAAccept=new j.HN0,this.onPWADismiss=new j.HN0,this.onError=new j.HN0,this.onRegisterSuccess=new j.HN0}registerServiceWorker(){this._pwaInstallerService.registerServiceWorker().then((k=>{k?this.onRegisterSuccess.dispatch():this.onError.dispatch()})).catch((()=>{this.onError.dispatch()}))}promptInstall(){var k,B;if(QE.u.PWA_INSTALLED_DURING_CURRENT_SESSION){QE.u.PWA_BEFORE_INSTALL_DEFERRED_EVENT=null,this.onPWAAccept.dispatch();const k=new tw.i;k.setKey("prodigy_game.PWAInstallFromURLIcon"),k.setValue(1);tt.q.instance.prodigy.gameContainer.get("e59-eea6").logStat(k,JE.d.Increment)}else(null===(k=this._pendingInstallState)||void 0===k?void 0:k.getValue())?j.VyI.log("previous promptInstall promise never resolved.",j.$bb.Warning):(null===(B=this._pendingInstallState)||void 0===B||B.setValue(!0),this._pwaInstallerService.promptInstall().then((k=>{var B;null===(B=this._pendingInstallState)||void 0===B||B.setValue(!1),"accepted"===k?this.onPWAAccept.dispatch():"dismissed"===k?this.onPWADismiss.dispatch():this.onError.dispatch()})).catch((()=>{var k;null===(k=this._pendingInstallState)||void 0===k||k.setValue(!1),this.onError.dispatch()})))}destroy(){this.onPWAAccept.dispose(),this.onPWADismiss.dispose(),this.onError.dispose(),this.onRegisterSuccess.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("313-bcd5"),(0,G.Sn)("design:type",QE.u)],ew.prototype,"_pwaInstallerService",void 0),(0,G.Cg)([(0,j.MnK)(Ar.f),(0,G.Sn)("design:type",Ar.f)],ew.prototype,"_pendingInstallState",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ew.prototype,"onPWAAccept",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ew.prototype,"onPWADismiss",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ew.prototype,"onError",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ew.prototype,"onRegisterSuccess",void 0),ew=(0,G.Cg)([(0,j.EVk)("PWAInstaller",W.Y.web)],ew);let iw=class extends j.uAl{constructor(){super(...arguments),this.isSupported=new j.HN0,this.isNotSupported=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.check()}destroy(){this.isSupported.dispose(),this.isNotSupported.dispose(),super.destroy()}check(){(this._pwaService.isPlatformSupported()?this.isSupported:this.isNotSupported).dispatch()}};(0,G.Cg)([(0,j.Cdj)("313-bcd5"),(0,G.Sn)("design:type",QE.u)],iw.prototype,"_pwaService",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],iw.prototype,"isSupported",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],iw.prototype,"isNotSupported",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],iw.prototype,"_runOnLoad",void 0),iw=(0,G.Cg)([(0,j.EVk)("PWAPlatformSupportedGuard",W.Y.web)],iw);U(25809);var sw=U(29044);let nw=class extends j.uAl{constructor(){super(...arguments),this.onNotificationAccept=new j.HN0,this.onNotificationBlock=new j.HN0,this.onNotificationDismiss=new j.HN0,this.onComplete=new j.HN0,this.onError=new j.HN0}requestPermission(){this._notificationInstallerService.notificationPermissionRequest().then((k=>{k.hasChanged?"granted"===k.status?this.onNotificationAccept.dispatch():"denied"===k.status&&this.onNotificationBlock.dispatch():"default"===k.status&&this.onNotificationDismiss.dispatch(),"granted"===k.status?this.registerServiceWorkerForFirebase():this.onComplete.dispatch()})).catch((()=>{this.onError.dispatch()}))}registerServiceWorkerForFirebase(){this._notificationInstallerService.registerServiceWorkerForFirebase().then((k=>{k?this.onComplete.dispatch():this.onError.dispatch()})).catch((()=>{this.onError.dispatch()}))}destroy(){this.onNotificationAccept.dispose(),this.onNotificationBlock.dispose(),this.onNotificationDismiss.dispose(),this.onComplete.dispose(),this.onError.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("23d-f8f6"),(0,G.Sn)("design:type",sw.F)],nw.prototype,"_notificationInstallerService",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nw.prototype,"onNotificationAccept",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nw.prototype,"onNotificationBlock",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nw.prototype,"onNotificationDismiss",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nw.prototype,"onComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nw.prototype,"onError",void 0),nw=(0,G.Cg)([(0,j.EVk)("PushNotificationInstaller",W.Y.web)],nw);let aw=class extends j.uAl{updateTextAndPosition(k,B,U){this.updateTextKey(k),this.updatePosition(B,U)}updateTextKey(k){this._localizedText.setLocalizationKey(k)}updatePosition(k,B){this.gameObject.transform.setPosition(k,B)}};(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],aw.prototype,"_localizedText",void 0),aw=(0,G.Cg)([(0,j.EVk)("TutorialNootDialogue")],aw);U(67820),U(8083),U(1559),U(81617);let rw=class extends j.uAl{constructor(){super(...arguments),this._signInButton=null,this._registerButton=null,this._policyButton=null,this._websiteButton=null,this._forgotPassword=null,this._errorIcon=null,this._errorMessage=null,this._usernameTooltip=null,this._passwordTooltip=null,this._usernameTooltipObj=null,this._passwordTooltipObj=null,this._hideForTutorialObjects=[]}get signInButton(){return this._signInButton}get registerButton(){return this._registerButton}get policyButton(){return this._policyButton}get websiteButton(){return this._websiteButton}get forgotPassword(){return this._forgotPassword}get errorIcon(){return this._errorIcon}get errorMessage(){return this._errorMessage}get usernameTooltip(){return this._usernameTooltip}get passwordTooltip(){return this._passwordTooltip}get usernameTooltipObj(){return this._usernameTooltipObj}get passwordTooltipObj(){return this._passwordTooltipObj}get hideForTutorialObjects(){return this._hideForTutorialObjects}};(0,G.Cg)([(0,j.x4W)("signInButton"),(0,G.Sn)("design:type",F.$)],rw.prototype,"_signInButton",void 0),(0,G.Cg)([(0,j.x4W)("registerButton"),(0,G.Sn)("design:type",F.$)],rw.prototype,"_registerButton",void 0),(0,G.Cg)([(0,j.x4W)("policyButton"),(0,G.Sn)("design:type",F.$)],rw.prototype,"_policyButton",void 0),(0,G.Cg)([(0,j.x4W)("websiteButton"),(0,G.Sn)("design:type",F.$)],rw.prototype,"_websiteButton",void 0),(0,G.Cg)([(0,j.x4W)("forgotPassword"),(0,G.Sn)("design:type",F.$)],rw.prototype,"_forgotPassword",void 0),(0,G.Cg)([(0,j.x4W)("errorIcon"),(0,G.Sn)("design:type",j._mx)],rw.prototype,"_errorIcon",void 0),(0,G.Cg)([(0,j.x4W)("errorMessage"),(0,G.Sn)("design:type",j.EYj)],rw.prototype,"_errorMessage",void 0),(0,G.Cg)([(0,j.x4W)("usernameTooltip"),(0,G.Sn)("design:type",j.EYj)],rw.prototype,"_usernameTooltip",void 0),(0,G.Cg)([(0,j.x4W)("passwordTooltip"),(0,G.Sn)("design:type",j.EYj)],rw.prototype,"_passwordTooltip",void 0),(0,G.Cg)([(0,j.x4W)("usernameTooltipObj"),(0,G.Sn)("design:type",j._mx)],rw.prototype,"_usernameTooltipObj",void 0),(0,G.Cg)([(0,j.x4W)("passwordTooltipObj"),(0,G.Sn)("design:type",j._mx)],rw.prototype,"_passwordTooltipObj",void 0),(0,G.Cg)([(0,j.x4W)("hideForTutorialObjects"),(0,G.Sn)("design:type",Array)],rw.prototype,"_hideForTutorialObjects",void 0),rw=(0,G.Cg)([(0,j.EVk)("LoginPrefab")],rw);U(49334);var ow=U(20705);U(21134),U(77302),U(26022);ow.f;var hw=U(48757);U(14335);let cw=class extends Qs.I{constructor(){super(...arguments),this._funnelIDKey="funnelId"}getPropertiesObject(){return{[this._funnelIDKey]:this._segment.purchase.getFunnelID()}}};(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",Function)],cw.prototype,"_segment",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],cw.prototype,"_funnelIDKey",void 0),cw=(0,G.Cg)([(0,j.EVk)("PurchaseFunnelIDPropertiesProvider",W.Y.analytics)],cw);var dw=U(35569);let lw=class extends ih.k{constructor(){super(...arguments),this.funnelName="academy_towers",this.funnelType="story",this.step=dw.D.FirstKeystonePlaced}sendFunnelEvent(){this._segment.academyTowers.sendFunnelEvent({funnelName:this.funnelName,funnelType:this.funnelType,step:this.step},...this.stepArgs)}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],lw.prototype,"funnelName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],lw.prototype,"funnelType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],lw.prototype,"step",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],lw.prototype,"stepArgs",void 0),lw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsAcademyTowers",W.Y.analytics)],lw);var uw=U(16887);let fw=class extends ih.k{constructor(){super(...arguments),this.stepIndex=uw.g.StepOne,this.stepName=uw.f.PermissionNeeded}sendFunnelAdvancedEvent(){this._segment.consent.sendFunnelAdvancedSegmentEvent(this.stepIndex,this.stepName)}};(0,G.Cg)([(0,j.gfw)(uw.g),(0,G.Sn)("design:type",Number)],fw.prototype,"stepIndex",void 0),(0,G.Cg)([(0,j.gfw)(uw.f),(0,G.Sn)("design:type",String)],fw.prototype,"stepName",void 0),fw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsConsent",W.Y.analytics)],fw);let bw=class extends ih.k{constructor(){super(...arguments),this._containerType=ui.ZF.Interactable,this._instanceType=fi.N.OpenWorld,this._failReason=Zb.WE.MemberLocked}sendContainerDiscoveredEvent(){this._segment.container.sendContainerDiscoveredEvent(this._containerType,this._containerID,Math.round(this.gameObject.transform.worldPosition.x),Math.round(this.gameObject.transform.worldPosition.y))}sendContainerOpenedEvent(){this._segment.container.sendContainerOpenedEvent(this._containerType,this._containerID,this._instanceType)}sendContainerOpenedFailedEvent(){this._segment.container.sendContainerOpenedFailedEvent(this._containerType,this._containerID,this._failReason,this._instanceType)}};(0,G.Cg)([(0,j.gfw)(ui.ZF),(0,G.Sn)("design:type",String)],bw.prototype,"_containerType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],bw.prototype,"_containerID",void 0),(0,G.Cg)([(0,j.gfw)(fi.N),(0,G.Sn)("design:type",String)],bw.prototype,"_instanceType",void 0),(0,G.Cg)([(0,j.gfw)(Zb.WE),(0,G.Sn)("design:type",String)],bw.prototype,"_failReason",void 0),bw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsContainer",W.Y.analytics)],bw);let pw=class extends ih.k{constructor(){super(...arguments),this.instanceOrigin=Mi.W5.New,this.milestoneType=Mi.lT.Healstone,this.exitOutcome=Mi.Yj.Exit}sendCrystalCavernsEnteredEvent(){this._segment.playerMovementAndDiscovery.sendCrystalCavernsEnteredEvent(this.instanceOrigin);const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.kennel.petTeam.forEach((B=>{B&&this._segment.playerMovementAndDiscovery.sendCrystalCavernsParticipantsEvent({name:B.getName()===k.getName()?"Player":B.getName(),type:B.getElement(),health:B.getCurrentHearts()})}))}sendCrystalCavernsMilestoneReachedEvent(){this._segment.playerMovementAndDiscovery.sendCrystalCavernsMilestoneReachedEvent(this.milestoneType)}sendCrystalCavernsCompletedEvent(){this._segment.playerMovementAndDiscovery.sendCrystalCavernsCompletedEvent(this.exitOutcome)}};(0,G.Cg)([(0,j.gfw)(Mi.W5),(0,G.Sn)("design:type",String)],pw.prototype,"instanceOrigin",void 0),(0,G.Cg)([(0,j.gfw)(Mi.lT),(0,G.Sn)("design:type",String)],pw.prototype,"milestoneType",void 0),(0,G.Cg)([(0,j.gfw)(Mi.Yj),(0,G.Sn)("design:type",String)],pw.prototype,"exitOutcome",void 0),pw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsCrystalCaverns",W.Y.analytics)],pw);let vw=class extends ih.k{sendCustomEvent(){this._segment.sendCustomEvent(this._customEvent,this.getPropertiesObject())}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],vw.prototype,"_customEvent",void 0),vw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsCustom",W.Y.analytics)],vw);var gw=U(24047);let mw=class extends ih.k{constructor(){super(...arguments),this.funnelName=gw.F.EndGame,this.funnelType=gw.M.Chapter,this.stepName=lu.jT.IllusionBoss1FirstTimeBattleStart}sendEndGameFunnelAdvancedEvent(){this._segment.battleRevamp.sendBattleFunnelAdvancedEvent({funnel_name:this.funnelName,funnel_type:this.funnelType,step_index:this.stepIndex,step_name:this.stepName})}};(0,G.Cg)([(0,j.gfw)(gw.F),(0,j.W_S)(),(0,G.Sn)("design:type",String)],mw.prototype,"funnelName",void 0),(0,G.Cg)([(0,j.gfw)(gw.M),(0,j.W_S)(),(0,G.Sn)("design:type",String)],mw.prototype,"funnelType",void 0),(0,G.Cg)([(0,j.gfw)(lu.jT),(0,j.W_S)(),(0,G.Sn)("design:type",String)],mw.prototype,"stepName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",Number)],mw.prototype,"stepIndex",void 0),mw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsEndgame",W.Y.analytics)],mw);let yw=class extends ih.k{sendFeatureUnlockedEvent(){const k=this.getPropertiesObject(),B=k.FEATURE_NAME,U=k.FEATURE_TYPE,F=k.LOCK_TYPE;On.J.sendFeatureUnlockedEvent(B,U,F)}sendDifficultyUnlockedEvent(k){On.J.sendDifficultyUnlockedEvent(k)}};yw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsFeatureUnlock",W.Y.analytics)],yw);let _w=class extends ih.k{constructor(){super(...arguments),this.npcName="",this.npcType=Ia.ac.Merchant}sendNpcDiscoveredEvent(){var k,B;this._segment.gameWorld.sendNpcDiscoveredEvent({npc_name:this.npcName,npc_type:this.npcType,x_coord:null===(k=this.GameObject.transform)||void 0===k?void 0:k.worldPosition.x,y_coord:null===(B=this.GameObject.transform)||void 0===B?void 0:B.worldPosition.y,npc_animation_id:"idle"})}sendNpcClickedEvent(){this._segment.gameWorld.sendNpcClickedEvent({npc_name:this.npcName,npc_type:this.npcType})}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],_w.prototype,"npcName",void 0),(0,G.Cg)([(0,j.gfw)(Ia.ac),(0,G.Sn)("design:type",String)],_w.prototype,"npcType",void 0),_w=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsNpc",W.Y.analytics)],_w);let Ew=class extends ih.k{constructor(){super(...arguments),this.stepName=eh.l.TutorialStart}sendFunnelAdvancedEvent(){this._segment.playerProgression.sendFunnelAdvancedEvent({funnelName:"Onboarding",funnelType:"tutorial",stepName:this.stepName})}};(0,G.Cg)([(0,j.gfw)(eh.l),(0,G.Sn)("design:type",String)],Ew.prototype,"stepName",void 0),Ew=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsOnboarding",W.Y.analytics)],Ew);let ww=class extends ih.k{sendFunnelAdvancedEvent(k){this._segment.petMerge.sendPetMergeTutorialFunnelAdvancedEvent(k)}};ww=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsPetMerge",W.Y.analytics)],ww);let Tw=class extends bw{create(){var k;super.create();{const B=tt.q.instance.prodigy.world.getCurrentZone();(null===(k=this._interactableGameObject)||void 0===k?void 0:k.transform)&&(this._containerID=`${B}-${this._interactableGameObject.transform.worldPosition.x}-${this._interactableGameObject.transform.worldPosition.y}`)}}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Tw.prototype,"_interactableGameObject",void 0),Tw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsPositionedContainer",W.Y.analytics)],Tw);let Sw=class extends ih.k{sendTabEvent(){const k=this.getPropertiesObject(),B=this.getCustomPropertiesObject();j.Aq$.isDefined(k.tabName)&&j.Aq$.isDefined(k.interfaceType)&&this._segment.featureCommon.sendTabEvent(k,B)}};Sw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsTab",W.Y.analytics)],Sw);U(7910);let Aw=class extends ih.k{constructor(){super(...arguments),this.objectId="",this.objectType=Ia.u_.Teleporter,this.failedReason=Ia.kN.MemberLocked}sendWorldObjectDiscoveredEvent(){this._segment.gameWorld.sendWorldObjectDiscoveredEvent({object_type:this.objectType,object_id:this.objectId,x_coord:this.gameObject.transform.worldPosition.x,y_coord:this.gameObject.transform.worldPosition.y})}sendWorldObjectUsedEvent(){this._segment.gameWorld.sendWorldObjectUsedEvent({object_type:this.objectType,object_id:this.objectId})}sendWorldObjectUsedFailedEvent(){this._segment.gameWorld.sendWorldObjectUsedFailedEvent({object_type:this.objectType,object_id:this.objectId,fail_reason:this.failedReason})}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Aw.prototype,"objectId",void 0),(0,G.Cg)([(0,j.gfw)(Ia.u_),(0,G.Sn)("design:type",String)],Aw.prototype,"objectType",void 0),(0,G.Cg)([(0,j.gfw)(Ia.kN),(0,G.Sn)("design:type",String)],Aw.prototype,"failedReason",void 0),Aw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsWorldObject",W.Y.analytics)],Aw);let Cw=class extends Qs.I{get destinationName(){return this._destinationName}set destinationName(k){this._destinationName=k}getPropertiesObject(){return{buttonName:this.buttonName,destinationName:this.destinationName,elementType:this._elementType,elementID:this.elementId,interfaceName:this.interfaceName,interfaceType:this._interfaceType,saveClickInfo:this.saveClickInfo,instanceId:this._instanceId}}};(0,G.Cg)([(0,j.gfw)({gold:"keep-charged-level-gold-button",magicoin:"keep-charged-level-magicoin-button"}),(0,G.Sn)("design:type",String)],Cw.prototype,"buttonName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Cw.prototype,"_destinationName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Cw.prototype,"elementId",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Cw.prototype,"_elementType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Cw.prototype,"interfaceName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Cw.prototype,"_interfaceType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Cw.prototype,"saveClickInfo",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Cw.prototype,"_instanceId",void 0),Cw=(0,G.Cg)([(0,j.EVk)("SegmentButtonChargedLevelsPropertiesProvider",W.Y.analytics)],Cw);let Ow=class extends Qs.I{getPropertiesObject(){let k={};return this._customProperties&&(k=Object.assign({},this._customProperties)),k}addPropertiesObject(k){this._customProperties=Object.assign(Object.assign({},this._customProperties),k)}addProperty(k,B){this._customProperties=Object.assign(Object.assign({},this._customProperties),{[k]:B})}};(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],Ow.prototype,"_customProperties",void 0),Ow=(0,G.Cg)([(0,j.EVk)("SegmentCustomPropertiesProvider",W.Y.analytics)],Ow);let Iw=class extends Qs.I{getPropertiesObject(){var k;return{tabName:this._tabName,interfaceName:null!==(k=this._interfaceName)&&void 0!==k?k:"",interfaceType:this._interfaceType,instanceType:this._instanceType,saveClickInfo:this.saveClickInfo}}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Iw.prototype,"_tabName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Iw.prototype,"_interfaceName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Iw.prototype,"_interfaceType",void 0),(0,G.Cg)([(0,j.gfw)(fi.N),(0,G.Sn)("design:type",String)],Iw.prototype,"_instanceType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Iw.prototype,"saveClickInfo",void 0),Iw=(0,G.Cg)([(0,j.EVk)("SegmentTabPropertiesProvider",W.Y.analytics)],Iw);let Dw=class extends j.uAl{sendEntryIllustrationEvent(k){this._segment.featureCommon.sendInterfaceEvent({interfaceName:`zone_entry_illustration_${this._zoneId}_${k+1}`,interfaceType:ui.Wm.Popup,originType:k>0?ui.$N.ButtonClick:ui.$N.AutoSurfaced,eventName:"interface_opened"})}};(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",Function)],Dw.prototype,"_segment",void 0),(0,G.Cg)([(0,j.gfw)(Ft.A_),(0,G.Sn)("design:type",String)],Dw.prototype,"_zoneId",void 0),Dw=(0,G.Cg)([(0,j.EVk)("ZoneEntryIllustrationSegment",W.Y.analytics)],Dw);let Rw=class extends ih.k{sendFunnelAdvanced(k=this.getPropertiesObject().funnelStepName){this._segment.festival.sendFestivalFunnelAdvancedEvent(k)}};Rw=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsFestival",W.Y.analytics,"Used for various festival analytics events for prefabs")],Rw);var Pw=U(99134);let Mw=class extends Qs.I{getPropertiesObject(){return{funnelStepName:this._funnelStepName}}};(0,G.Cg)([(0,j.gfw)(Pw.v),(0,G.Sn)("design:type",String)],Mw.prototype,"_funnelStepName",void 0),Mw=(0,G.Cg)([(0,j.EVk)("SegmentFestivalPropertyProvider",W.Y.analytics,"Provides various properties for festival segment events")],Mw);var Nw=U(74846);U(50118);let xw=class extends j.uAl{constructor(){super(...arguments),this._onComplete=new j.HN0}get OnComplete(){return this._onComplete}destroy(){this._onComplete.dispose(),super.destroy()}play(){this._isLooping?((0,Pn.sR)(this._animators,this._animationName,this._isLooping),this._hasFinished=!0,this._onComplete.dispatch()):(this._hasFinished=!1,(0,Pn.ye)(this._animators,this._animationName).then((()=>{this._onComplete.dispatch(),this._hasFinished=!0})))}hasFinishedPlaying(){return this._hasFinished}setAnimationData(k,B){this._animationName=k,this._isLooping=B}};(0,G.Cg)([(0,j.Cdj)("Animators"),(0,G.Sn)("design:type",Object)],xw.prototype,"_animators",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],xw.prototype,"_animationName",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],xw.prototype,"_isLooping",void 0),xw=(0,G.Cg)([(0,j.EVk)("PlayInjectedAnimators",W.Y.animation)],xw);U(22637),U(99898),U(44977),U(37854),U(16184);var Lw=U(54001);U(71554);let kw=class extends j.uAl{performTween(){this._parabolicTween&&this._startPositionTransform?this._parabolicTween.startTween(this._startPositionTransform.localPosition.x,this._startPositionTransform.localPosition.y,0,0):j.VyI.log("Cannot perform parabolic tween, missing required parameters.",j.$bb.Error)}};(0,G.Cg)([(0,j.Pqz)(Lw.y),(0,G.Sn)("design:type",Lw.y)],kw.prototype,"_parabolicTween",void 0),(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],kw.prototype,"_startPositionTransform",void 0),kw=(0,G.Cg)([(0,j.EVk)("ParabolicTweenTo")],kw);U(1823),U(70703);var Bw=U(66998);let Uw=class extends j.uAl{constructor(){super(...arguments),this._elapsed=0,this._animationTimer=null}create(){super.create(),this._animationTimer=Qe.o.integerInRange(this._minimumTimeToPlay,this._maximumTimeToPlay)}update(){super.update(),this._elapsed+=tt.q.instance.game.time.deltaMS,this._elapsed>this._animationTimer&&(this._ambientAnimationClip.play(),this._elapsed=0,this._animationTimer=Qe.o.integerInRange(this._minimumTimeToPlay,this._maximumTimeToPlay))}};(0,G.Cg)([(0,j.MnK)(Nw.Q),(0,G.Sn)("design:type",Nw.Q)],Uw.prototype,"_ambientAnimationClip",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Uw.prototype,"_minimumTimeToPlay",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Uw.prototype,"_maximumTimeToPlay",void 0),Uw=(0,G.Cg)([(0,j.EVk)("PlayAmbientAnimation",W.Y.animation)],Uw);let Fw=class extends j.uAl{constructor(){super(...arguments),this._animators=[],this._loopInitialAnimation=!1}create(){super.create(),this._initialAnimation&&(0,Pn.sR)(this._animators,this._initialAnimation,this._loopInitialAnimation)}playAnimation(k,B){(0,Pn.sR)(this._animators,k,B)}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(dy),(0,G.Sn)("design:type",Array)],Fw.prototype,"_animators",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Fw.prototype,"_initialAnimation",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Fw.prototype,"_loopInitialAnimation",void 0),Fw=(0,G.Cg)([(0,j.EVk)("PlayPlayerKeyframeAnimators",W.Y.animation)],Fw);let Gw=class extends Ta.g{constructor(){super(...arguments),this.rampUpDuration=500,this._cycleIndex=-1,this._toTargetPosition=new j.I9Y,this._fromTargetPosition=new j.I9Y}update(){if(super.update(),this.isRunning())if(this._shakeTime+=tt.q.instance.game.time.deltaMS,this._shakeTimethis._cycleIndex&&(U>=this.cycles-1?this._toTargetPosition.setTo(0,0):U>this._cycleIndex+1?this.randomizePosition(this._fromTargetPosition):this._fromTargetPosition.copyFrom(this._toTargetPosition),this.randomizePosition(this._toTargetPosition),this._cycleIndex=U);const G=this.rampUpDuration>0?Math.min(1,k*(this.durationMS/this.rampUpDuration)):1,$=this.falloffDuration>0?Math.min(1,(1-k)*(this.durationMS/this.falloffDuration)):1,H=this.amplitude*G*$*Fb.B.screenShake.value;this._cameraTransform.setPosition(this._cameraInitialX+Math.floor(j.cj9.linear(this._fromTargetPosition.x,this._toTargetPosition.x,F)*H),this._cameraInitialY+Math.floor(j.cj9.linear(this._fromTargetPosition.y,this._toTargetPosition.y,F)*H))}else this._cameraTransform.setPosition(this._cameraInitialX,this._cameraInitialY),this._loadAreaCameraFollowController.Active=!0,this._shakeTime=null,this.onComplete.dispatch()}randomizePosition(k){k.x=2*Math.random()-1,k.y=2*Math.random()-1}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Gw.prototype,"rampUpDuration",void 0),Gw=(0,G.Cg)([(0,j.EVk)("ShuffleScreenShake",W.Y.motion)],Gw);U(2224);let jw=class extends j.uAl{constructor(){super(...arguments),this._volume=1}destroy(){this._audio&&(this.stopSFX(),this._audio.destroy()),super.destroy()}playSFX(){const k=j.Aq$.isDefined(this._volume)?this._volume:1,B=Fb.B.effectVolume.value*k;this._audio=tt.q.instance.prodigy.audio.playSound(this._sfxID,!0,B),Fb.B.effectVolume.onChanged.add((B=>{this._audio.volume=B*k}),this)}stopSFX(){this._audio&&(this._audio.stop(),Fb.B.effectVolume.onChanged.removeAll(this))}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],jw.prototype,"_sfxID",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],jw.prototype,"_volume",void 0),jw=(0,G.Cg)([(0,j.EVk)("PlayLoopedSoundEffect",W.Y.audio)],jw);U(86730);let $w=class extends j.uAl{constructor(){super(...arguments),this._timeMS=0}startTimer(){this._timer=window.setTimeout((()=>{this._sfx.playSFX()}),this._timeMS)}destroy(){j.Aq$.isDefined(this._timer)&&(window.clearTimeout(this._timer),this._timer=null),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],$w.prototype,"_timeMS",void 0),(0,G.Cg)([(0,j.MnK)(oa),(0,G.Sn)("design:type",oa)],$w.prototype,"_sfx",void 0),$w=(0,G.Cg)([(0,j.EVk)("PlaySoundEffectTimer",W.Y.audio)],$w);let Hw=class extends j.uAl{constructor(){super(...arguments),this._timers=[]}startSequence(){var k;null===(k=this._timers)||void 0===k||k.forEach((k=>{k.startTimer()}))}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)($w),(0,G.Sn)("design:type",Array)],Hw.prototype,"_timers",void 0),Hw=(0,G.Cg)([(0,j.EVk)("PlaySoundEffectSequence",W.Y.audio)],Hw);let Vw=class extends j.uAl{complete(){tt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(this._breadcrumbFeatureName,this._breadcrumbName)}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Vw.prototype,"_breadcrumbFeatureName",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Vw.prototype,"_breadcrumbName",void 0),Vw=(0,G.Cg)([(0,j.EVk)("CompleteBreadcrumb",W.Y.saving)],Vw);let Ww=class extends j.uAl{constructor(){super(...arguments),this.breadcrumbCompleted=new j.HN0}create(){super.create(),tt.q.instance.prodigy.breadcrumbManager.onBreadcrumbCompleted.add(this.breadcrumbCompleted.dispatch,this.breadcrumbCompleted)}destroy(){this.breadcrumbCompleted.dispose(),tt.q.instance.prodigy.breadcrumbManager.onBreadcrumbCompleted.remove(this.breadcrumbCompleted.dispatch,this.breadcrumbCompleted),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Ww.prototype,"breadcrumbCompleted",void 0),Ww=(0,G.Cg)([(0,j.EVk)("OnBreadcrumbCompleted",W.Y.saving)],Ww);let qw=class extends j.uAl{constructor(){super(...arguments),this.onCanAfford=new j.HN0,this.onCannotAfford=new j.HN0}create(){super.create(),this._checkOnCreate&&this.check()}destroy(){this.onCanAfford.dispose(),this.onCannotAfford.dispose(),super.destroy()}check(){if(!j.Aq$.isDefined(this.currencyId)||!j.Aq$.isDefined(this.amount))return void j.VyI.log("[CanAffordPaymentGuardComponent] Cannot check; Currency ID or Amount are undefined",j.$bb.Warning);const k={currency:this.currencyId,value:this.amount};this._paymentManager.canAfford(k)?this.onCanAfford.dispatch():(this.canSendEvent()&&tt.q.instance.prodigy.gameContainer.get("c47-20b6").item.sendInsufficientCurrencyEvent(k,{sink_type:this.sinkType,sink_id:this.sinkId}),this.onCannotAfford.dispatch())}canSendEvent(){return!(!j.Aq$.isDefined(this.sinkType)||!j.Aq$.isDefined(this.sinkId)||this.sinkType.length<1)&&("string"!=typeof this.sinkId||this.sinkId.length>0)}};(0,G.Cg)([(0,j.Cdj)("743-fd51"),(0,G.Sn)("design:type",qn.E)],qw.prototype,"_paymentManager",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],qw.prototype,"_checkOnCreate",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qw.prototype,"currencyId",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qw.prototype,"amount",void 0),(0,G.Cg)([(0,j.gfw)(li.C),(0,G.Sn)("design:type",String)],qw.prototype,"sinkType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",Object)],qw.prototype,"sinkId",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],qw.prototype,"onCanAfford",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],qw.prototype,"onCannotAfford",void 0),qw=(0,G.Cg)([(0,j.EVk)("CanAffordPaymentGuard",W.Y.economy)],qw);var Kw=U(2519);let zw=class extends j.uAl{constructor(){super(...arguments),this._validClassCode=!1,this.OnDuplicateClassCodeEntered=new j.HN0,this.OnValidClassCodeEntered=new j.HN0,this.OnInputFieldUpdated=new j.HN0,this.OnValidClassCodeSet=new j.HN0,this.OnFailedSetClassCode=new j.HN0,this.OnAttemptedSetClassCode=new j.HN0,this._processingCode=!1}create(){super.create(),this._gameNetworkManager=tt.q.instance.prodigy.gameContainer.get("c97-bd0d"),this._gameNetworkManager.getCurrentClassCode().then((k=>{var B,U,F,G;this._existingClassCode=null===(G=null===(F=null===(U=null===(B=k)||void 0===B?void 0:B.data)||void 0===U?void 0:U.player)||void 0===F?void 0:F.currentClassroom)||void 0===G?void 0:G.code})).catch((()=>{j.RQr.createHandler("ClassCodeSection: Failed to get current class code")}))}destroy(){this.OnDuplicateClassCodeEntered.dispose(),this.OnValidClassCodeEntered.dispose(),this.OnInputFieldUpdated.dispose(),this.OnValidClassCodeSet.dispose(),this.OnFailedSetClassCode.dispose(),this.OnAttemptedSetClassCode.dispose(),super.destroy()}validateClassCode(k){const B=xv.b.reformatClassCode(k);B!==this._existingClassCode?(this._classCodeInput=B,this._validClassCode=xv.b.isValidClassCode(this._classCodeInput),this._validClassCode?this.OnValidClassCodeEntered.dispatch():this.OnInputFieldUpdated.dispatch()):this.OnDuplicateClassCodeEntered.dispatch()}onSaveClassCodeClicked(){this._validClassCode&&!this._processingCode&&(this._processingCode=!0,tt.q.instance.prodigy.audio.playSFX(18,"pop"),this._gameNetworkManager.attachClassCode(this._classCodeInput,(()=>this.onAttachClassCodeAttempted(!0)),(()=>this.onAttachClassCodeAttempted(!1))).catch(j.RQr.createHandler("Error attaching class code")).finally((()=>{this._processingCode=!1})))}onAttachClassCodeAttempted(k){if(!k)return void this.OnFailedSetClassCode.dispatch();const B=tt.q.instance.prodigy.gameContainer.get("306-5359");B&&(B.isClassCodeAttached=!0,B.data.classCodeUpdateTimestamp=Date.now(),B.updated=!0),this.OnValidClassCodeSet.dispatch()}checkAndCompleteClassCodeQuest(){tt.q.instance.prodigy.gameContainer.get("43a-6f08").sendClassCodeQuestEvent().catch(j.RQr.createHandler("[ClassCodeRegistrationHandlerComponent] Error completing class code quest"))}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],zw.prototype,"OnDuplicateClassCodeEntered",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],zw.prototype,"OnValidClassCodeEntered",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],zw.prototype,"OnInputFieldUpdated",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],zw.prototype,"OnValidClassCodeSet",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],zw.prototype,"OnFailedSetClassCode",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],zw.prototype,"OnAttemptedSetClassCode",void 0),zw=(0,G.Cg)([(0,j.EVk)("ClassCodeRegistrationHandler",W.Y.education)],zw);U(20706);let Yw=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["externalFactory"],{inBattle:!1})}execute(){super.execute();if(window._&&window._.constants&&!window._.constants.get('GameConstants.Debug.EDUCATION_ENABLED')){const _w=Math.random()<(window._.constants.get('GameConstants.Debug.AUTO_ANSWER_CORRECT_PERCENT')||1);this.finish({answerCorrect:_w,responseTime:0});return}const k=this.findParameter("externalFactory"),B=this.findParameter("inBattle");k.question(((k,B,U,F,G,j)=>{this.finish({answerCorrect:k,responseTime:B,skillData:j})}),{isUserInBattle:B,allowTutorials:!0})}};Yw=(0,G.Cg)([(0,j.ba9)("AnswerQuestion")],Yw);let Qw=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["items"],{silent:!1,wait:!0,eventType:null,noRepeat:!1,sourceType:li.C.Interactable,sourceID:null,transactionID:null,fakeAward:!1})}execute(){super.execute();let k=this.findParameter("items");const B=this.findParameter("silent"),U=this.findParameter("wait"),F=this.findParameter("eventType"),G=this.findParameter("noRepeat"),j=this.findParameter("sourceType"),$=this.findParameter("sourceID"),H=this.findParameter("transactionID"),V=this.findParameter("fakeAward"),W=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(G&&(k=k.filter((k=>W.backpack.hasItem(k.type,k.ID)<=0))),B){for(const B of k)Qt.J.bagItem(B,tt.q.instance.game,"interactable",void 0,{item_id:B.ID,transaction_id:H,source_type:j,source_id:$});this.finish()}else U?(0,Td.MQ)(k,F,j,$,H,V).then((()=>{this.finish()})):((0,Td.GP)(k,F),this.finish());null==W||W.forceSaveCharacter()}};Qw=(0,G.Cg)([(0,j.ba9)("AwardItems")],Qw);let Xw=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["type","properties"])}execute(){super.execute(),this.finish()}};Xw=(0,G.Cg)([(0,j.ba9)("BroadcastGameEvent")],Xw);let Zw=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["events"])}execute(){super.execute();this.findParameter("events").forEach((k=>{const B=k.eventType,U=k.eventData;switch(B){case"Funnel Advanced":tt.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent(U)}})),this.finish()}};Zw=(0,G.Cg)([(0,j.ba9)("BroadcastSegmentGameEvent")],Zw);let Jw=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["cameraTransform","targetTransform"],{cameraFollowController:null,enableFollowController:!1,panTimeMs:1e3})}execute(){const k=this.findParameter("cameraTransform"),B=this.findParameter("targetTransform"),U=this.findParameter("cameraFollowController"),F=this.findParameter("enableFollowController"),G=this.findParameter("panTimeMs");(0,Td.lz)(k,B,G,F,U).then((()=>{this.finish()}))}};Jw=(0,G.Cg)([(0,j.ba9)("CameraPan")],Jw);let tT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["featureName","breadcrumbName"])}execute(){super.execute();const k=this.findParameter("featureName"),B=this.findParameter("breadcrumbName");tt.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ls.B[k],ls.B[B]),this.finish()}};tT=(0,G.Cg)([(0,j.ba9)("CompleteBreadcrumb")],tT);let eT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["zone","quest"])}execute(){super.execute();const k=tt.q.instance.prodigy.world.getZone(this.findParameter("zone"));k&&k.completeQuest(this.findParameter("quest")),this.finish()}};eT=(0,G.Cg)([(0,j.ba9)("CompleteQuest")],eT);let iT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["zone","quest","sequence"])}execute(){super.execute();const k=this.findParameter("zone"),B=this.findParameter("quest"),U=this.findParameter("sequence"),F=tt.q.instance.prodigy.world.getZone(k);F&&F.completeSequence(this.findParameter("quest"),this.findParameter("sequence"));const G=tt.q.instance.prodigy.gameContainer.get("a25-68f4");G&&G.sendQuestEventViaHub(Wr.T.FSM_COMPLETE_SEQUENCE,{}).catch(j.RQr.createHandler(`Failed to send FSM_COMPLETE_SEQUENCE quest event (zone: ${k}, quest: ${B}, sequence: ${U})`)),this.finish()}};iT=(0,G.Cg)([(0,j.ba9)("CompleteSequence")],iT);let sT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["type","ID"],{amount:1})}execute(){super.execute();tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.consume(this.findParameter("type"),this.findParameter("ID"),this.findParameter("amount")),this.finish()}};sT=(0,G.Cg)([(0,j.ba9)("ConsumeItem")],sT);let nT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["creature","ID"],{height:100,dontHide:!1,durationMS:3e3})}execute(){super.execute();const k=this.findParameter("creature");if(k){const B=this.findParameter("ID"),U=this.findParameter("height"),F=this.findParameter("dontHide"),G=this.findParameter("durationMS");k.chat(B,U,F,G)}this.finish()}};nT=(0,G.Cg)([(0,j.ba9)("CreateChatBubble")],nT);let aT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["parent","x","y"])}execute(){super.execute();const k=this.findParameter("parent");let B=null;k&&(B=tt.q.instance.prodigy.create.element(k,this.findParameter("x"),this.findParameter("y"))),this.finish({element:B})}};aT=(0,G.Cg)([(0,j.ba9)("CreateElement")],aT);var rT=U(5898),oT=U(28930);let hT=class extends j.rcl{constructor(){super(...arguments),this.collected=!1}validate(){return super.validate()&&this.validateParameters(["map","config","x","y"],{})}execute(){super.execute(),this.map=this.findParameter("map"),this.config=this.findParameter("config"),this.x=this.findParameter("x"),this.y=this.findParameter("y"),this.y+=25,j.Aq$.isDefined(this.config)&&(this.goldenPage=tt.q.instance.prodigy.create.sprite(this.x,this.y,ps.q.Golden_page),this.goldenPage.anchor.x=.5,this.goldenPage.anchor.y=1,this.goldenPage.inputEnabled=!0,this.goldenPage.events.onInputUp.add((()=>{this.checkPathToPedestal(0)})),this.map.screen.content.addChild(this.goldenPage),this.map.game.add.tween(this.goldenPage,this).to({y:this.y-20},1400,j.GS3.Quadratic.InOut).yoyo(!0).loop(!0).start(),this.config.sendSegmentEvents("Container Discovered","golden-page",{x:this.x,y:this.y})),this.finish()}checkPathToPedestal(k){let B=0,U=0;switch(k){case oT.O.North:U=-15;break;case oT.O.East:B=80,U=80;break;case oT.O.South:U=120;break;case oT.O.West:B=-80,U=80;break;default:return j.VyI.log("No path can be found to the pedestal! Fix the position or map collisions.",j.$bb.Error),void this.collect()}this.map.screen.path.reset(),this.map.screen.path.findPath(this.map.screen.user.x,this.map.screen.user.y,this.x+B,this.y+U,!0).then((B=>{B?this.map.screen.user.setPath(B,(()=>{this.collect()})):this.checkPathToPedestal(k+1)})).catch(j.RQr.createHandler("Unable to find path to pedestal"))}collect(){if(!this.collected){this.config.sendSegmentEvents("Container Opened","golden-page"),tt.q.instance.prodigy.open.gotItem([{type:"currency",ID:this.config.id,N:this.config.quantity}],null,null,null,null,null,{source_type:li.C.Interactable}),this.map.addCollected("goldenPage");tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.achievements.increment(rT.f.GoldenPagesEarned,this.config.quantity),this.map.game.broadcaster.broadcast(jn.$i.TargetCollected),this.goldenPage.destroy(),this.collected=!0}}};hT=(0,G.Cg)([(0,j.ba9)("CreateGoldenPageDungeonComponent")],hT);let cT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["parent","type","ID","x","y"],{anchor:null})}execute(){super.execute();const k=this.findParameter("parent");let B=null;k&&(B=tt.q.instance.prodigy.icon.createIcon(this.findParameter("x"),this.findParameter("y"),fs.E.getIconForType(this.findParameter("type"),this.findParameter("ID")),this.findParameter("anchor")),k.addChild(B)),this.finish({icon:B})}};cT=(0,G.Cg)([(0,j.ba9)("CreateIcon")],cT);let dT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["map","config","x","y"],{})}execute(){super.execute();const k=this.findParameter("map"),B=this.findParameter("config"),U=this.findParameter("x"),F=this.findParameter("y");if(j.Aq$.isDefined(B)){const G=[];ct.forEach(B.drops,((k,B)=>{const U={type:"",ID:0,N:0};U.type=k.getType(),U.ID=k.getID(),U.N=k.getQuantity(),G.push(U)}));const j={difficulty:B.difficulty,randDir:!0,encounter:[{ID:B.id}],drops:G,dropsDisabled:!0,minTeamSize:B.minTeamSize,maxTeamSize:B.maxTeamSize,bench:B.bench};k.addMonster(k.game,k.screen,1,U,F,!0,j)}this.finish()}};dT=(0,G.Cg)([(0,j.ba9)("CreateMonsterDungeonComponent")],dT);let lT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["map","config","positions"])}execute(){super.execute(),this.map=this.findParameter("map"),this.config=this.findParameter("config");const k=this.findParameter("positions");if(j.Aq$.isDefined(this.config)){for(let B=0;B{this.map.screen.path.findPath(this.map.screen.user.x,this.map.screen.user.y,k[B].x,k[B].y,!0).then((k=>{k?this.map.screen.user.setPath(k,(()=>{this.collect(U,B)})):j.VyI.log("Path to this page cannot be found. Fix the position.",j.$bb.Error)})).catch(j.RQr.createHandler("Unable to find path to page"))})),this.map.screen.content.addChild(U)}k&&k.length>0&&this.config.sendSegmentEvents("Container Discovered","academy-page-0",{x:k[0].x,y:k[0].y})}this.finish()}collect(k,B){this.config.sendSegmentEvents("Container Opened",`academy-page-${B}`),tt.q.instance.prodigy.open.gotItem([{type:"currency",ID:this.config.id,N:1}],null,null,null,null,null,{source_type:li.C.Interactable}),k.destroy(),this.map.addCollected(`page-${B}`),this.map.game.broadcaster.broadcast(jn.f7.PagesCollected)}};lT=(0,G.Cg)([(0,j.ba9)("CreatePageDungeonComponent")],lT);let uT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["prefabLoader","parent","offset","count","wait"])}execute(){super.execute();let k=this.findParameter("count");const B=()=>{--k,k<=0&&this.finish()},U=this.findParameter("prefabLoader"),F=this.findParameter("parent"),G=this.findParameter("offset"),j=this.findParameter("wait");for(let $=0;${k.transform.setPosition(G.x*$,G.y*$);k.findComponent(Os.j).OnAnimationComplete.addOnce((()=>{tt.q.instance.game.time.events.addTimer(1,(()=>{k.destroy()}),[]),j&&B()}),this)}));j||this.finish()}};uT=(0,G.Cg)([(0,j.ba9)("CreateSmokeCloudRow")],uT);let fT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["map","ID","animation","x","y"],{layer:jh.E.ContentLayer,loop:!0,flip:!1,randomDelay:!1,fadeIn:0,animationChain:[],name:null})}execute(){super.execute(),this.map=this.findParameter("map");const k=this.findParameter("x"),B=this.findParameter("y"),U=this.findParameter("ID"),F=this.findParameter("animation"),G=this.findParameter("layer"),j=this.findParameter("loop"),$=this.findParameter("flip"),H=this.findParameter("randomDelay"),V=this.findParameter("fadeIn"),W=this.findParameter("animationChain");tt.q.instance.prodigy.load.assets([`spine-${U}`],(()=>{this.create(this.map,U,F,k,B,j,G,$,H?100*Qe.o.integerInRange(0,20):0,V,W)})),this.finish()}create(k,B,U,F,G,$,H,V,W,q,K){let z=null,Y=null;const Q=k.game.add.spine(F,G,`spine-${B}`);Q.onDestroy.add((B=>{null!==z&&(clearTimeout(z),z=null),Y&&(k.game.tweens.remove(Y),Y=null)}).bind(this,Q)),Q.setToSetupPose(),Q.scale.x*=V?-1:1,k.screen[H].addChild(Q);const X=this.findParameter("name");if(j.Aq$.isDefined(X)&&(Q.name=X),0===K.length)W>0?(Q.visible=!1,z=window.setTimeout((()=>{Q.visible=!0,Y=this.fadeIn(Q,q),Q.setAnimationByName(0,U,$)}),W)):(Q.setAnimationByName(0,U,$),Y=this.fadeIn(Q,q));else{Q.setAnimationByName(0,K[0],!1);for(let k=1;k0){k.alpha=0;const U=this.map.game.add.tween(k,this);return U.to({alpha:1},B,j.GS3.Linear.None,!0),U}}};fT=(0,G.Cg)([(0,j.ba9)("CreateSpine")],fT);let bT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["parent","x","y","source"],{frame:null,width:null,height:null,anchor:null,alpha:1,inputEnabled:!1})}execute(){super.execute();const k=this.findParameter("parent");let B=null;k&&(B=tt.q.instance.prodigy.create.sprite(this.findParameter("x"),this.findParameter("y"),this.findParameter("source"),this.findParameter("frame"),this.findParameter("anchor"),null,this.findParameter("width"),this.findParameter("height")),B.alpha=this.findParameter("alpha"),B.inputEnabled=this.findParameter("inputEnabled"),k.addChild(B)),this.finish({sprite:B})}};bT=(0,G.Cg)([(0,j.ba9)("CreateSprite")],bT);let pT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["object"])}execute(){this.findParameter("object").destroy(),this.finish()}};pT=(0,G.Cg)([(0,j.ba9)("Destroy")],pT);let vT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["enable","game"])}execute(){super.execute();const k=this.findParameter("game"),B=this.findParameter("enable");(0,Td.QQ)(k,B),this.finish()}};vT=(0,G.Cg)([(0,j.ba9)("EnableInput")],vT);let gT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["enable"])}execute(){super.execute(),(0,Td.dD)(this.findParameter("enable")),this.finish()}};gT=(0,G.Cg)([(0,j.ba9)("EnableSave")],gT);let mT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["x","y","w","h","time"],{wait:!0,randomize:!1})}execute(){super.execute();const k=this.findParameter("x"),B=this.findParameter("y"),U=this.findParameter("w"),F=this.findParameter("h"),G=this.findParameter("time"),j=this.findParameter("randomize");this.findParameter("wait")?tt.q.instance.prodigy.effects.explode(k,B,U,F,G,this.finish.bind(this),j):(tt.q.instance.prodigy.effects.explode(k,B,U,F,G,null,j),this.finish())}};mT=(0,G.Cg)([(0,j.ba9)("Explode")],mT);let yT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["graphic","duration"])}execute(){const k=this.findParameter("graphic"),B=this.findParameter("duration");tt.q.instance.game.add.tween(k.image,this).to({alpha:0},B,j.GS3.Quadratic.Out,!0).onTweenComplete.add(this.finish,this)}};yT=(0,G.Cg)([(0,j.ba9)("FadeOutGraphic")],yT);let _T=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["transform","duration"])}execute(){const k=this.findParameter("transform"),B=this.findParameter("duration");tt.q.instance.game.add.tween(k.group,this).to({alpha:0},B,j.GS3.Quadratic.Out,!0).onTweenComplete.add(this.finish,this)}};_T=(0,G.Cg)([(0,j.ba9)("FadeOutLegacyTransform")],_T);let ET=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["spine","duration"])}execute(){const k=this.findParameter("spine"),B=this.findParameter("duration");tt.q.instance.game.add.tween(k.spine,this).to({alpha:0},B,j.GS3.Quadratic.Out,!0).onTweenComplete.add(this.finish,this)}};ET=(0,G.Cg)([(0,j.ba9)("FadeOutSpine")],ET);let wT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["durationMS","renderComponent","targetAlpha"],{initialAlpha:null,wait:!1})}execute(){const k=this.findParameter("renderComponent"),B=this.findParameter("durationMS"),U=this.findParameter("targetAlpha"),F=k.getRootContainer(),G=this.findParameter("wait"),$=this.findParameter("initialAlpha");null===$||Number.isNaN($)||(F.alpha=$);tt.q.instance.game.add.tween(F,this).to({alpha:U},B,j.GS3.Quadratic.Out,!0).onTweenComplete.addOnce((()=>{F.alpha=U,G&&this.finish()})),G||this.finish()}};wT=(0,G.Cg)([(0,j.ba9)("FadeRenderComponent")],wT);let TT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["target","componentType"])}execute(){const k=this.findParameter("target"),B=j.XFX[this.findParameter("componentType")];B?this.finish({component:k.findComponent(B)}):this.finish()}};TT=(0,G.Cg)([(0,j.ba9)("FindComponent")],TT);let ST=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["creature"])}execute(){const k=this.findParameter("creature");k&&k.flip(),this.finish()}};ST=(0,G.Cg)([(0,j.ba9)("FlipCreature")],ST);let AT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["zone"])}execute(){super.execute();const k=tt.q.instance.prodigy.world.getZone(this.findParameter("zone"));let B=0;k&&(B=k.getState("daily").rewards),this.finish({result:B})}};AT=(0,G.Cg)([(0,j.ba9)("GetDailyRewardCount")],AT);let CT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["zone","state"])}execute(){super.execute();const k=tt.q.instance.prodigy.world.getZone(this.findParameter("zone"));let B=null;if(k){const U=k.getState(this.findParameter("state"));j.Aq$.isDefined(U)&&(B=U)}this.finish({result:B})}};CT=(0,G.Cg)([(0,j.ba9)("GetZoneState")],CT);let OT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["type","ID"])}execute(){super.execute();const k=this.findParameter("type"),B=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let U=0;switch(k){case"pet":U=B.kennel.hasPet(this.findParameter("ID"))?1:0;break;default:U=B.backpack.hasItem(k,this.findParameter("ID"))}this.finish({amount:U})}};OT=(0,G.Cg)([(0,j.ba9)("HasItem")],OT);let IT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["screen","hide"])}execute(){super.execute();const k=this.findParameter("screen");k&&(k.hideHex=this.findParameter("hide")),this.finish()}};IT=(0,G.Cg)([(0,j.ba9)("HideFollow")],IT);let DT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["element","show"],{xOffset:0,yOffset:0})}execute(){super.execute();const k=this.findParameter("element");k&&k.highlight(this.findParameter("show"),this.findParameter("xOffset"),this.findParameter("yOffset")),this.finish()}};DT=(0,G.Cg)([(0,j.ba9)("HighlightElement")],DT);let RT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["creature","time"],{wait:!0,xOffset:0,height:0})}execute(){const k=this.findParameter("creature");if(k){const B=this.findParameter("time"),U=this.findParameter("xOffset"),F=this.findParameter("height");this.findParameter("wait")?k.hop(1e3*B,this.finish.bind(this),U,F):(k.hop(1e3*B,null,U,F),this.finish())}else this.finish()}};RT=(0,G.Cg)([(0,j.ba9)("Hop")],RT);let PT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["transform","time"],{wait:!0,xOffset:0,height:0})}execute(){const k=this.findParameter("transform"),B=k.localPosition,U=this.findParameter("time"),F=this.findParameter("xOffset"),G=tt.q.instance.game.add.tween(k.localPosition,this).to({y:B.y-this.findParameter("height")},U,j.GS3.Quadratic.Out).to({y:B.y},U,j.GS3.Quadratic.In).start();0!==F&&tt.q.instance.game.add.tween(k.localPosition,this).to({x:B.x+Math.floor(.5*F)},U,j.GS3.Linear.None).to({x:B.x+F},U,j.GS3.Linear.None).start(),this.findParameter("wait")?G.onTweenComplete.addOnce((()=>{this.finish()})):this.finish()}};PT=(0,G.Cg)([(0,j.ba9)("HopTransform")],PT);let MT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["difficulty"])}execute(){super.execute();const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=this.findParameter("difficulty");let U=!1;B&&(U=k.difficultyUnlocks[B]),this.finish({result:U})}};MT=(0,G.Cg)([(0,j.ba9)("IsDifficultyUnlocked")],MT);let NT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["zone","quest"])}execute(){super.execute();const k=tt.q.instance.prodigy.world.getZone(this.findParameter("zone"));let B=!1;k&&(B=k.isOnQuest(this.findParameter("quest"))),this.finish({result:B})}};NT=(0,G.Cg)([(0,j.ba9)("IsOnQuest")],NT);let xT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["zone","quest","sequence"])}execute(){super.execute();const k=tt.q.instance.prodigy.world.getZone(this.findParameter("zone"));let B=!1;k&&(B=k.isOnSequence(this.findParameter("quest"),this.findParameter("sequence"))),this.finish({result:B})}};xT=(0,G.Cg)([(0,j.ba9)("IsOnSequence")],xT);let LT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["zone","quest"])}execute(){super.execute();const k=tt.q.instance.prodigy.world.getZone(this.findParameter("zone"));let B=!1;k&&(B=k.isQuestComplete(this.findParameter("quest"))),this.finish({result:B})}};LT=(0,G.Cg)([(0,j.ba9)("IsQuestComplete")],LT);let kT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["target","position"])}execute(){const k=this.findParameter("target");k.onMoveEnd.addOnce(this.finish,this),k.MoveTarget=this.findParameter("position")}};kT=(0,G.Cg)([(0,j.ba9)("MoveToTarget")],kT);let BT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters([])}execute(){tt.q.instance.prodigy.audio.pauseBGM(),this.finish()}};BT=(0,G.Cg)([(0,j.ba9)("PauseMusic")],BT);let UT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["animator","animationName"],{loop:!1,wait:!0})}execute(){const k=this.findParameter("animator"),B=this.findParameter("animationName");k&&B?(k.playAnimation(B,this.findParameter("loop"),!0),this.findParameter("wait")?k.OnAnimationComplete.addOnce((()=>{this.finish()})):this.finish()):(j.VyI.log("Missing animation name or ref to animator",j.$bb.Error),this.finish())}};UT=(0,G.Cg)([(0,j.ba9)("PlayAnimation")],UT);let FT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["animationClip"],{wait:!1})}execute(){const k=this.findParameter("animationClip"),B=this.findParameter("wait");k?B?(k.OnComplete.addOnce((()=>{this.finish()})),k.play()):(k.play(),this.finish()):(j.VyI.log("Missing ref to animationClip",j.$bb.Error),this.finish())}};FT=(0,G.Cg)([(0,j.ba9)("PlayAnimationClip")],FT);let GT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["animators","animationName"],{loop:!1,wait:!0})}execute(){const k=this.findParameter("animators"),B=this.findParameter("animationName");this.findParameter("wait")?(0,Pn.ye)(k,B).then((()=>{this.finish()})):((0,Pn.sR)(k,B,this.findParameter("loop")),this.finish())}};GT=(0,G.Cg)([(0,j.ba9)("PlayAnimators")],GT);let jT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["x","y","parent"],{wait:!1,delay:0})}execute(){const k=this.findParameter("wait");tt.q.instance.prodigy.effects.firework(this.findParameter("x"),this.findParameter("y"),k?()=>{this.finish()}:null,this.findParameter("parent"),this.findParameter("delay")),k||this.finish()}};jT=(0,G.Cg)([(0,j.ba9)("PlayFirework")],jT);let $T=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["ID"],{loop:!0})}execute(){const k=tt.q.instance.prodigy.gameContainer.get(j.t5G.AssetLoader),B=this.findParameter("ID");"string"==typeof B?k.loadAssets([B]).then((()=>this.playBgm(B))).catch(j.RQr.createHandler(`Error playing music asset ${B}`)):this.playBgm(B),this.finish()}playBgm(k){tt.q.instance.prodigy.audio.playBGM(k,this.findParameter("loop")),tt.q.instance.prodigy.audio.resumeBGM()}};$T=(0,G.Cg)([(0,j.ba9)("PlayMusic")],$T);let HT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["scene"],{})}execute(){super.execute();const k=this.findParameter("scene");tt.q.instance.prodigy.world.playScene(k)}};HT=(0,G.Cg)([(0,j.ba9)("PlayScene")],HT);var VT=U(79825);let WT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["ID","clip"],{wait:!1,delay:0,playDuration:null,fadeTime:200})}execute(){var k;const B=this.findParameter("ID"),U=this.findParameter("clip"),F=this.findParameter("delay"),G=null!==(k=this.findParameter("sfxVolumeType"))&&void 0!==k?k:VT.h.Sfx,j=tt.q.instance.prodigy.audio.getVolumeForType(G);F>0?tt.q.instance.game.time.events.addTimer(F,(()=>{this.playSFX(B,U,j)}),this):this.playSFX(B,U,j)}playSFX(k,B,U){const F=this.findParameter("playDuration"),G=this.findParameter("wait");if(F>0){const $=Fb.B.effectVolume.value,H=tt.q.instance.prodigy.audio.playSFX(k,B,void 0,1,!1,U),V=this.findParameter("fadeTime");H&&!H.isDestroyed&&(H.loop=!0,H.volume=0,tt.q.instance.game.add.tween(H,this).to({volume:$},V,j.GS3.Linear.None,!0),tt.q.instance.game.add.tween(H,this).to({volume:0},V,j.GS3.Linear.None,!0,F-2*V).onTweenComplete.addOnce((()=>{G&&this.finish()})))}else G?tt.q.instance.prodigy.audio.playSFX(k,B,this.finish.bind(this),1,!1,U):tt.q.instance.prodigy.audio.playSFX(k,B,void 0,1,!1,U);G||this.finish()}};WT=(0,G.Cg)([(0,j.ba9)("PlaySound")],WT);let qT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["spine","animationName"],{loop:!1,wait:!0})}execute(){const k=this.findParameter("spine"),B=this.findParameter("animationName"),U=this.findParameter("loop");j.Aq$.isDefined(k)&&j.Aq$.isDefined(B)?this.findParameter("wait")?(0,Td.qb)(k,B,U).then((()=>{this.finish()})):k instanceof oi.v?k.isLoaded?((0,Td.ce)(k,B,U),this.finish()):k.OnLoaded.addOnce((()=>{(0,Td.ce)(k,B,U),this.finish()})):((0,Td.ce)(k,B,U),this.finish()):(j.VyI.log("Missing animation name or ref to spine",j.$bb.Error),this.finish())}};qT=(0,G.Cg)([(0,j.ba9)("PlaySpine")],qT);let KT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["target"])}execute(){super.execute();this.findParameter("target").run(),this.finish()}};KT=(0,G.Cg)([(0,j.ba9)("RunComponent")],KT);let zT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["transform","targetScale","duration"],{initialScale:null,wait:!1})}execute(){const k=this.findParameter("transform"),B=this.findParameter("targetScale"),U=this.findParameter("initialScale"),F=this.findParameter("duration"),G=this.findParameter("wait"),$=k.localScale;let H={x:$.x,y:$.y};U&&(k.setScale(U.x,U.y),H=Object.assign({},U)),tt.q.instance.game.add.tween(H,this).to({x:B.x,y:B.y},F,j.GS3.Quadratic.InOut,!0).onUpdateCallback((()=>{k.setScale(H.x,H.y)})).onTweenComplete.addOnce((()=>{k.setScale(B.x,B.y),G&&this.finish()})),G||this.finish()}};zT=(0,G.Cg)([(0,j.ba9)("ScaleTransform")],zT);let YT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["eventName","eventData"])}execute(){super.execute(),this.finish()}};YT=(0,G.Cg)([(0,j.ba9)("SendAdvancedEvent")],YT);let QT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["eventType","eventData"])}execute(){super.execute();const k=this.findParameter("eventType"),B=this.findParameter("eventData");tt.q.instance.prodigy.gameContainer.get("f91-8211").sendQuestEvent(k,B).catch(j.RQr.createHandler(`Error sending quest event, ${k}`)),this.finish()}};QT=(0,G.Cg)([(0,j.ba9)("SendZoneQuestEvent")],QT);let XT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["target","active"])}execute(){super.execute();const k=this.findParameter("target"),B=this.findParameter("active");k&&(k instanceof j.uAl?(0,Td.pf)(k,B):(0,Td.Ry)(k,B)),this.finish()}};XT=(0,G.Cg)([(0,j.ba9)("SetActive")],XT);let ZT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["animationController","state"],{loop:!1,wait:!0})}execute(){const k=this.findParameter("animationController"),B=this.findParameter("state"),U=this.findParameter("wait");k.changeState(B),U&&k.currentState?k.currentState.onFinished.addOnce(this.finish,this):this.finish()}};ZT=(0,G.Cg)([(0,j.ba9)("SetAnimationControllerState")],ZT);let JT=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["zone","count"])}execute(){super.execute();const k=tt.q.instance.prodigy.world.getZone(this.findParameter("zone"));k&&k.setState("daily",{date:k.getState("daily").date,flags:k.getState("daily").flags,rewards:this.findParameter("count")}),this.finish()}};JT=(0,G.Cg)([(0,j.ba9)("SetDailyRewardCount")],JT);let tS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["player","flag"])}execute(){const k=this.findParameter("player");k&&(k.evtProc=this.findParameter("flag")),this.finish()}};tS=(0,G.Cg)([(0,j.ba9)("SetEventProcessing")],tS);var eS=U(34234);let iS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["pathfinder","target"],{faceTransform:null})}execute(){var k;const B=null!==(k=this.findParameter("locomotion"))&&void 0!==k?k:j.wa5.getActiveScene().container.get("PlayerLocomotion"),U=Lt.l.guaranteeArray(this.findParameter("target")),F=this.findParameter("faceTransform");this.runWaypoints(B,U,F)}runWaypoints(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F=B.length;for(let G=0;G{k.setPosition(F.x,F.y)})),B?G.onTweenComplete.addOnce(this.finish,this):this.finish(),G.start()}};gS=(0,G.Cg)([(0,j.ba9)("ShakeChestTransform")],gS);let mS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["character","ID"],{overlayMode:!1,showYesNo:!1,reenableInputOnClose:!0})}execute(){super.execute();const k=tt.q.instance.prodigy.dialogue.create(),B=this.findParameter("showYesNo"),U=this.findParameter("ID"),F=this.findParameter("character"),G=this.findParameter("overlayMode"),j=this.findParameter("reenableInputOnClose");if(U.constructor===Array){const F=U;for(let U=0;U{this.finish()}),k);B&&U.setParent(B)}};yS=(0,G.Cg)([(0,j.ba9)("ShowDialogueV2")],yS);let _S=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["ID"],{overlayMode:!1,showYesNo:!1})}execute(){super.execute();const k=new mi.rD(tt.q.instance.game),B=this.findParameter("showYesNo"),U=this.findParameter("ID"),F=this.findParameter("overlayMode");let G;if(G=U.constructor===Array?ct.map(U,(B=>this.createDialogue(k,B,F))):[this.createDialogue(k,U,F)],B){const k=G[G.length-1];k.yes=()=>{this.finishWithAnswer(!0)},k.no=()=>{this.finishWithAnswer(!1)}}k.addEvents(G),k.start(!0,B?void 0:()=>{this.finish({results:!1})})}createDialogue(k,B,U){return{dialogueData:k.dataProvider.get(B),blockInput:!U}}finishWithAnswer(k,B){j.Aq$.isDefined(B)&&B.close(),this.finish({result:k})}logAction(){super.logAction();const k=this.findParameter("ID"),B=this.findParameter("character");if(Array.isArray(k)){const U=k;for(let k=0;k{this.finish({dialogueSelection:"yes"})},no:()=>{this.finish({dialogueSelection:"no"})}}]),U.start(!0)}};ES=(0,G.Cg)([(0,j.ba9)("ShowYesNoDialogue")],ES);let wS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["gameObjectFactory","rocks","positions","startDelay","endDelay","startTimeElapsed","endTimeElapsed","shuffleCount"])}execute(){super.execute();const k={0:0,1:1,2:2},B=this.findParameter("rocks"),U=this.findParameter("positions"),F=U.length,G=this.findParameter("startDelay"),$=this.findParameter("endDelay"),H=this.findParameter("startTimeElapsed"),V=this.findParameter("endTimeElapsed"),W=this.findParameter("shuffleCount"),q=this.findParameter("gameObjectFactory");let K=null,z=null;const Y={};for(let Q=0;Qj.cj9.fuzzyEqual(k.position.x,U[Q].x)&&j.cj9.fuzzyEqual(k.position.y,U[Q].y)));for(let j=0;j1?H+j/(W-1)*(V-H):V;let X=0;j>0&&(X=G+(j-1)/(W-2)*($-G));let Z=null;do{Z=Qe.o.getUniqueRandomNumbers(0,F,2).sort(((k,B)=>k-B))}while(z&&z[0]===Z[0]&&z[1]===Z[1]);const J=Y[Z[0]];B.push(this.createRockTween(J,q,U[Z[1]],Q,X,0===j));const tt=Y[Z[1]];if(B.push(this.createRockTween(tt,q,U[Z[0]],Q,X,0===j)),B[0].onUpdate.add((function(){const k=this;if(k.invert===k.obj1.y>k.obj2.y&&!k.swapped){const B=k.obj1.parent;k.obj2.parent.addChild(k.obj1),B.addChild(k.obj2),k.swapped=!0}}),{obj1:J,obj2:tt,swapped:!1,invert:U[Z[0]].y{const U=B;k.onTweenComplete.addOnce((()=>{U.start()}))}))}Y[Z[1]]=J,Y[Z[0]]=tt;const et=k[Z[1]];k[Z[1]]=k[Z[0]],k[Z[0]]=et,K=B,z=Z}K?K[K.length-1].onTweenComplete.addOnce((()=>{this.finish({newRockPositions:k})})):this.finish({rockPositions:k})}createRockTween(k,B,U,F,G,$){return B.tween(k,this).to({x:U.x,y:U.y},F,j.GS3.Quadratic.InOut,$,G)}};wS=(0,G.Cg)([(0,j.ba9)("ShuffleRocks")],wS);let TS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["transform","scaleTimeMS"],{initialScale:2,targetScale:1,correctionAmounts:[-.03,.03,-.01,0],correctionTimes:[250,200,150,100],wait:!1})}execute(){const k=this.findParameter("transform"),B=this.findParameter("initialScale"),U=this.findParameter("targetScale"),F=this.findParameter("scaleTimeMS"),G=this.findParameter("correctionAmounts"),$=this.findParameter("correctionTimes"),H=this.findParameter("wait"),V={value:B},W=tt.q.instance.game.add.tween(V,this).to({value:U+G[0]},F,j.GS3.Quadratic.InOut),q=$.length;for(let K=1;K{k.setScale(V.value,V.value),H&&this.finish()})),W.onUpdateCallback((()=>{k.setScale(V.value)})),W.start(),H||this.finish()}};TS=(0,G.Cg)([(0,j.ba9)("SlamTransform")],TS);let SS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["ID"],{parent:null,createParent:!0,x:0,y:0,xScale:1,yScale:1})}execute(){super.execute();const k=this.findParameter("ID"),B=this.findParameter("parent"),U=this.findParameter("x"),F=this.findParameter("y"),G=this.findParameter("createParent");this.loadPrefab(k,B,U,F,G)}loadPrefab(k,B,U,F,G){let $;G&&($=new j._mx(ct.defaultTo(B,void 0)),$.addComponent(j.K16),$.legacyTransform.x=U,$.legacyTransform.y=F,$.legacyTransform.scaleX=this.findParameter("xScale"),$.legacyTransform.scaleY=this.findParameter("yScale"));tt.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependencies(k,$).then((k=>{!G&&k.transform&&(k.transform.setPosition(U,F),k.transform.setScale(this.findParameter("xScale"),this.findParameter("yScale"))),this.finish({instance:k})}))}};SS=(0,G.Cg)([(0,j.ba9)("SpawnPrefab")],SS);let AS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["data"],{defeatZone:null})}execute(){super.execute();const k=this.findParameter("data"),B=()=>{this.finish({isVictory:!0})};tt.q.instance.prodigy.battle.start(k,B,B,(()=>{this.finish({isVictory:!1})}),this.findParameter("defeatZone"))}};AS=(0,G.Cg)([(0,j.ba9)("StartBattle")],AS);let CS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["zone","map","data"],{introText:null,wait:!1})}execute(){super.execute();const k=this.findParameter("zone");if(k){const B=this.findParameter("map"),U=this.findParameter("introText"),F=this.findParameter("data");this.findParameter("wait")?k.getBattle(B,U,F,this.finish.bind(this))():(k.getBattle(B,U,F,null)(),this.finish())}else this.finish()}};CS=(0,G.Cg)([(0,j.ba9)("StartZoneBattle")],CS);let OS=class extends j.rcl{execute(){super.execute(),tt.q.instance.prodigy.audio.pauseBGM(),this.finish()}};OS=(0,G.Cg)([(0,j.ba9)("StopBackgroundMusic")],OS);var IS=U(79340);let DS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["map"],{x:null,y:null,data:null,loadingData:{},wait:1e3,asScene:!1,assets:[]})}execute(){super.execute();const k=this.findParameter("map"),B=this.findParameter("x"),U=this.findParameter("y"),F=this.findParameter("loadingData");if(F.callback=()=>{tt.q.instance.game.time.events.addTimer(this.findParameter("wait"),(()=>{this.finish()}),[])},this.findParameter("asScene")){const G=k.split("-"),j=tt.q.instance.prodigy.world.getZone(G[0]),$=new IS.Z(j,G[1],this.findParameter("assets"),null,B,U);j.initScene($,F)}else tt.q.instance.prodigy.world.it(k,B,U,this.findParameter("data"),F)}};DS=(0,G.Cg)([(0,j.ba9)("Teleport")],DS);let RS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["game","rectTransform","target","duration"],{from:null,wait:!0})}execute(){const k=this.findParameter("game"),B=this.findParameter("rectTransform"),U=this.findParameter("target"),F=this.findParameter("from"),G=this.findParameter("duration"),j=this.findParameter("wait"),$=(0,Td.XL)(k,B,U,G,F);j?$.then((()=>{this.finish()})):this.finish()}};RS=(0,G.Cg)([(0,j.ba9)("TweenRectTransformOffset")],RS);let PS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["transform","target","duration"],{from:null,wait:!0,ease:j.GS3.Quadratic.InOut})}execute(){const k=this.findParameter("transform"),B=this.findParameter("target"),U=this.findParameter("from"),F=this.findParameter("duration"),G=this.findParameter("ease"),j=this.findParameter("wait"),$=(0,Td.qe)(k,B,F,U,G);j?$.then((()=>{this.finish()})):this.finish()}};PS=(0,G.Cg)([(0,j.ba9)("TweenTransform")],PS);let MS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters([],{questID:null})}execute(){super.execute();const k=this.findParameter("questID");tt.q.instance.prodigy.gameContainer.get("e50-b09b").updateQuestProgress(k).catch(j.RQr.createHandler("There was a problem updating quest progress")).finally((()=>this.finish()))}};MS=(0,G.Cg)([(0,j.ba9)("UpdateQuestData")],MS);let NS=class extends j.rcl{validate(){return super.validate()&&this.validateParameters(["signal"])}execute(){this.findParameter("signal").onDispatch.addOnce(this.finish,this)}};NS=(0,G.Cg)([(0,j.ba9)("WaitForSignal")],NS);let xS=class extends Lo.B{consume(){if(j.Aq$.isDefined(this.id)){const k=this.getInjectedValue(this.id);k instanceof Function?k(this._targetComponent):j.Aq$.isDefined(k)&&j.VyI.log("InjectableConsumeInteractionComponent: Value is not a function!",j.$bb.Error)}else j.VyI.log("InjectableConsumeInteractionComponent: Value has not been set!",j.$bb.Error)}};xS=(0,G.Cg)([(0,j.EVk)("InjectableComponentInteractionComponent",j.YH6.injection)],xS);let LS=class extends Lo.B{constructor(){super(...arguments),this.onDispatch=new j.HN0}create(){super.create(),this.consume()}consume(){var k;super.consume();const B=this.getInjectedValue(this.id);B instanceof j.HN0&&(null===(k=this._boundSignal)||void 0===k||k.remove(this.onDispatch.dispatch,this),B.add(this.onDispatch.dispatch,this.onDispatch),this._boundSignal=B)}destroy(){var k;null===(k=this._boundSignal)||void 0===k||k.remove(this.onDispatch.dispatch,this.onDispatch),this._boundSignal=null,this.onDispatch.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],LS.prototype,"onDispatch",void 0),LS=(0,G.Cg)([(0,j.EVk)("InjectedSignal",W.Y.injection,"Allows an injected signal to be hooked up in a prefab")],LS);let kS=class extends j.uAl{fire(){const k=this.getInjectedValue(this._id);k instanceof j.HN0?k.dispatch():"function"==typeof k?k():j.Aq$.isDefined(k)&&j.VyI.log("InjectCallback attempted to fire a non-callable value:",j.$bb.Warning,k)}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],kS.prototype,"_id",void 0),kS=(0,G.Cg)([(0,j.EVk)("InjectionCallback",W.Y.injection)],kS);let BS=class extends j.uAl{constructor(){super(...arguments),this._bindMultiple=!1,this._unbindOnDestroy=!0,this._boundValue=null}postDeserialize(){super.postDeserialize(),this._boundValue=this._targetComponent?j.Aq$.isDefined(this._targetProperty)&&this._targetProperty in this._targetComponent?this._targetComponent[this._targetProperty]:this._targetComponent:this.GameObject;const k=j.wa5.getActiveScene().container;this._bindMultiple?k.bind(this._id).toConstantValue(this._boundValue):k.rebind(this._id).toConstantValue(this._boundValue)}destroy(){if(this._unbindOnDestroy){const k=j.wa5.getActiveScene().container;if(k.hasBinding(this._id))if(this._bindMultiple){const B=k.sourceContainer,U=B.getAll(this._id).filter((k=>k!==this._boundValue));B.unbind(this._id);for(const k of U)B.bind(this._id).toConstantValue(k)}else k.get(this._id)===this._boundValue&&k.unbind(this._id)}super.destroy()}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],BS.prototype,"_id",void 0),(0,G.Cg)([(0,j.MnK)(j.uAl),(0,G.Sn)("design:type",j.uAl)],BS.prototype,"_targetComponent",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],BS.prototype,"_targetProperty",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],BS.prototype,"_bindMultiple",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],BS.prototype,"_unbindOnDestroy",void 0),BS=(0,G.Cg)([(0,j.EVk)("InjectionExpose",W.Y.injection)],BS);let US=class extends j.uAl{constructor(){super(...arguments),this.rebindOnCreate=!0}create(){super.create(),this.rebindOnCreate&&this.rebind()}rebind(){this.sourceIdentifiers.forEach(((k,B)=>{const U=this.targetIdentifiers[B]||k;k===U&&this.context.Container.hasBinding(k)&&this.context.Container.unbind(k);const F=this.getInjectedValue(k);this.context.Container.rebind(U).toConstantValue(F)}))}};(0,G.Cg)([(0,j.Pqz)(j.bE_),(0,G.Sn)("design:type",j.bE_)],US.prototype,"context",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],US.prototype,"rebindOnCreate",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],US.prototype,"sourceIdentifiers",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],US.prototype,"targetIdentifiers",void 0),US=(0,G.Cg)([(0,j.EVk)("InjectionRelay",j.YH6.injection,"Rebinds all values to a new local context, possibly with different identifiers")],US);let FS=class extends j.uAl{constructor(){super(...arguments),this.data={}}inject(){var k;Nt.d.updateInjectedValues(null!==(k=this.targetObject)&&void 0!==k?k:this.gameObject,this.data)}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],FS.prototype,"targetObject",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],FS.prototype,"data",void 0),FS=(0,G.Cg)([(0,j.EVk)("Injector")],FS);let GS=class extends j.PQK{installBindings(){this.Container.rebind("c5f-aceb").toConstantValue(new Li.D(this.Container,tt.q.instance.prodigy.gameContainer.get("c97-bd0d")))}cleanup(){var k;null===(k=this.Container)||void 0===k||k.unbind("c5f-aceb")}};GS=(0,G.Cg)([(0,j.Og1)("SocketServiceInstaller","Installer")],GS);var jS=U(30441);let $S=class extends j.uAl{get visible(){return this._renderComponent.Active}set visible(k){this._renderComponent.Active=k}setPath(k,B,U){j.Aq$.isDefined(U)&&(this._pathLocomotion.speed=U);const F=k.map((k=>new j.I9Y(k.x,k.y)));F.unshift(new j.I9Y(this.GameObject.transform.worldPosition.x,this.GameObject.transform.worldPosition.y)),this._pathLocomotion.setPath(F),B&&this._pathLocomotion.onPathEnd.addOnce(B)}hop(k=100,B=null,U=0,F=20){const G={x:this.GameObject.transform.localPosition.x,y:this.gameObject.transform.localPosition.y},$={x:this.GameObject.transform.localPosition.x,y:this.gameObject.transform.localPosition.y},H={x:$.x+U,y:$.y-F},V=tt.q.instance.game.add.tween($,this).to({y:H.y},k,j.GS3.Quadratic.Out).to({y:G.y},k,j.GS3.Quadratic.In),W=tt.q.instance.game.add.tween($,this).to({x:H.x},2*k,j.GS3.Linear.None);V.onUpdate.add((()=>this.gameObject.transform.setPosition($.x,$.y))),V.onTweenComplete.addOnce((()=>{tt.q.instance.prodigy.game.tweens.remove(V),tt.q.instance.prodigy.game.tweens.remove(W),null==B||B()})),V.start(),W.start()}flip(){const k=this.GameObject.transform.localScale.y,B=this.GameObject.transform.localScale.x;this.GameObject.transform.setScale(-1*B,k)}chat(k,B,U,F=3e3){var G;const j=k+12,$=this._renderComponent.getRootContainer(),H=this.gameObject.transform.worldPosition;null!==(G=this._chatBubble)&&void 0!==G||(this._chatBubble=new jS.R(tt.q.instance.prodigy.game,$,H.x,H.y-B,U,F)),this._chatBubble.setID(j)}faceToward(k){const B=this.GameObject.transform.localScale.y,U=Math.abs(this.GameObject.transform.localScale.x),F=k>this.GameObject.transform.worldPosition.x?U:-U;this.GameObject.transform.setScale(F,B)}};(0,G.Cg)([(0,j.Pqz)(j.KhP),(0,G.Sn)("design:type",j.KhP)],$S.prototype,"_pathLocomotion",void 0),(0,G.Cg)([(0,j.Pqz)(j.y4o),(0,G.Sn)("design:type",j.y4o)],$S.prototype,"_renderComponent",void 0),$S=(0,G.Cg)([(0,j.EVk)("CreatureContainerRelay",W.Y.root)],$S);U(53885);let HS=class extends j.uAl{postCreate(){super.postCreate();{const k=this.GameObject,B=this.getLayerContainer();if(B){const U=this._renderComponent.getRootContainer();if(B.addChild(U),this._layerType===jh.E.ContentLayer){U.transform=new $e.Transform;const B=()=>{U.x=k.transform.worldPosition.x,U.y=k.transform.worldPosition.y};B(),k.transform.onWorldMatrixChanged.add(B),k.onDestroy.addOnce((()=>k.transform.onWorldMatrixChanged.remove(B)))}else U.x=k.transform.worldPosition.x,U.y=k.transform.worldPosition.y}const U=tt.q.instance.prodigy.game.time.events.loop(Kt.s.TARGET_FPS_40_MS,k.update,k);k.onDestroy.addOnce((()=>tt.q.instance.prodigy.game.time.events.remove(U)))}}getLayerContainer(){const k=tt.q.instance.game.state.get(Tt.G.TileScreen);switch(this._layerType){case jh.E.BackgroundLayer:return k.background;case jh.E.ContentLayer:return k.content;case jh.E.ForegroundLayer:return k.foreground;case jh.E.DifficultyModeOverlay:return k.difficultyOverlay;case jh.E.UiLayer:return k.uiLayer;case jh.E.GameRenderCacheLayer:return k.gameRenderCache;case jh.E.MenusLayer:return k.menus;case jh.E.DialogueLayer:return k.dialogue;case jh.E.OverlayLayer:return k.overlay;case jh.E.ConsentLayer:default:return j.VyI.log("[LegacyLayerRelayComponent] Could not assign to a layer container.",j.$bb.Error),null}}};(0,G.Cg)([(0,j.gfw)(jh.E),(0,G.Sn)("design:type",String)],HS.prototype,"_layerType",void 0),(0,G.Cg)([(0,j.Pqz)(j.y4o),(0,G.Sn)("design:type",j.y4o)],HS.prototype,"_renderComponent",void 0),HS=(0,G.Cg)([(0,j.EVk)("LegacyLayerRelay",W.Y.root)],HS);U(68370);let VS=class extends j.uAl{get playerContainer(){return this._playerDataProvider.player.playerContainer}showName(k=null){this.playerContainer.showName(k)}setPosition(k,B){this.playerContainer.transform.position.set(k,B)}setPath(k,B,U){this.playerContainer.setPath(k,B,U)}hop(k=100,B=null,U=0,F=20){this.playerContainer.hop(k,B,U,F)}flip(){this.playerContainer.flip()}chat(k,B,U,F){this.playerContainer.chat(k,B,U,F)}get position(){return this.playerContainer.transform.position}get scale(){return this.playerContainer.transform.scale}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],VS.prototype,"_playerDataProvider",void 0),VS=(0,G.Cg)([(0,j.EVk)("MainPlayerContainerRelay",W.Y.root)],VS);let WS=class extends j.uAl{constructor(){super(...arguments),this.onPathFound=new j.HN0,this.onStand=new j.HN0}get x(){return this._mainPlayerGameObject.transform.localPosition.x}get y(){return this._mainPlayerGameObject.transform.localPosition.y}destroy(){this.onPathFound.dispose(),this.onStand.dispose(),super.destroy()}disableMovement(){tt.q.instance.game.input.enabled=!1;this.getInjectedValue("PlayerPathfinder").stopMovement()}setPath(k,B=(()=>null)){if(0===k.length)return void B();const U=this.getInjectedValue("PlayerLocomotion");U.onPathComplete.addOnce(B),U.setPath(k)}};(0,G.Cg)([(0,eS.d)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],WS.prototype,"_mainPlayerGameObject",void 0),WS=(0,G.Cg)([(0,j.EVk)("MainPlayerGameObjectRelay",W.Y.map)],WS);U(73402),U(65165);let qS=class extends j.uAl{constructor(){super(...arguments),this._durationMs=600,this._rotationSpeed=.4,this._rotationVariance=100,this._maxStarScale=1.8,this._rotationVarianceDamping=3}create(){super.create();const k=this._starObject=this._prefabLoader.loadFromGUID(this._starsPrefabGUID);k.active=!1,this._starTransform=k.transform,this._sprite=k.findComponentInChildren(j.vYh).image,this._sprite.smoothed=!0}destroy(){var k;(null===(k=this._starObject)||void 0===k?void 0:k.isDestroyed)||this._starObject.destroy(),super.destroy()}startStar(){this._starTransform.setPosition(1/0,1/0),this._starTransform.setScale(0),this._starObject.active=!0,this._animationTime=this._sizeAnimationTime=0,this._touching=!0}moveStar(k){k&&this._starTransform.setPosition(k.x,k.y)}stopStar(){this._touching=!1}update(){super.update();const k=tt.q.instance.game.time.deltaMS;if(this._animationTime+=k,this._sizeAnimationTime+=k,this._touching){const k=.5*this._durationMs;this._sizeAnimationTime>k&&(this._sizeAnimationTime=k)}const B=this._sizeAnimationTime/this._durationMs;if(B<1){this._starTransform.setScale(B*this._maxStarScale,B*this._maxStarScale);const k=this._animationTime*this._rotationSpeed/this._rotationVariance;this._starTransform.localRotation=(k+Math.sin(k)/this._rotationVarianceDamping)*this._rotationVariance,this._sprite.alpha=Math.min(1,2-2*B)}else this._starObject.active=!1}};(0,G.Cg)([(0,j.Bak)(),(0,j.W_S)(),(0,G.Sn)("design:type",String)],qS.prototype,"_starsPrefabGUID",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qS.prototype,"_durationMs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qS.prototype,"_rotationSpeed",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qS.prototype,"_rotationVariance",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qS.prototype,"_maxStarScale",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qS.prototype,"_rotationVarianceDamping",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],qS.prototype,"_prefabLoader",void 0),qS=(0,G.Cg)([(0,j.S1F)(),(0,j.EVk)("PlayMovementStarsAnimation",W.Y.animation)],qS);let KS=class extends j.uAl{constructor(){super(...arguments),this._pathData=[],this._speed=null,this._fromCurrent=!1,this._onComplete=new j.HN0}run(){(0,ct.isNumber)(this._speed)&&(this._targetLocomotionComponent.speed=this._speed);const k=this._pathData.map((k=>new j.I9Y(k.x,k.y)));this._fromCurrent&&k.unshift(new j.I9Y(this._targetLocomotionComponent.GameObject.transform.worldPosition.x,this._targetLocomotionComponent.GameObject.transform.worldPosition.y)),this._targetLocomotionComponent.setPath(k),this._targetLocomotionComponent.onPathEnd.addOnce(this._onComplete.dispatch,this._onComplete)}destroy(){this._targetLocomotionComponent.onPathEnd.remove(this._onComplete.dispatch,this._onComplete),this._onComplete.dispose(),super.destroy()}};(0,G.Cg)([(0,j.MnK)(j.KhP),(0,G.Sn)("design:type",j.KhP)],KS.prototype,"_targetLocomotionComponent",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Array)],KS.prototype,"_pathData",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],KS.prototype,"_speed",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],KS.prototype,"_fromCurrent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],KS.prototype,"_onComplete",void 0),KS=(0,G.Cg)([(0,j.EVk)("SetPath",W.Y.motion)],KS);let zS=class extends j.uAl{stop(){var k,B;this._playerLocomotion&&this._playerLocomotion.stop();const U=tt.q.instance.game.state.get(Tt.G.TileScreen);null===(B=null===(k=null==U?void 0:U.user)||void 0===k?void 0:k.setPath)||void 0===B||B.call(k,[])}};(0,G.Cg)([(0,j.Cdj)("PlayerLocomotion"),(0,G.Sn)("design:type",j.KhP)],zS.prototype,"_playerLocomotion",void 0),zS=(0,G.Cg)([(0,j.EVk)("StopPlayer",W.Y.motion)],zS);let YS=class extends j.uAl{constructor(){super(...arguments),this.onComplete=new j.HN0}run(){var k;const B=j.wa5.getActiveScene().container;if(B.get("IS_PREFAB_MAP")){B.get("ACTIVE_PLAYER_POSITION")&&j.wa5.getActiveScene().container.rebind("ACTIVE_PLAYER_POSITION").toConstantValue({x:this.gameObject.transform.worldPosition.x,y:this.gameObject.transform.worldPosition.y})}const U=null===(k=B.get("MainPlayerGameObject"))||void 0===k?void 0:k.transform;if(U){U.worldPosition=this.gameObject.transform.worldPosition;const k=U.GameObject.findComponentInChildren(Wn.m);k&&j.Aq$.isDefined(this._facingDirection)&&k.setFacingDirection(this._facingDirection)}else{const k=tt.q.instance.game.state.get(Tt.G.TileScreen);(null==k?void 0:k.user)?(k.user.position=this.gameObject.transform.worldPosition,k.user.faceToward(this.gameObject.transform.worldPosition.x+100*-this._facingDirection)):j.VyI.log("[TeleportPlayerToThisComponent] No player transform found. Unable to teleport the player to the specified position.",j.$bb.Error)}}destroy(){this.onComplete.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],YS.prototype,"onComplete",void 0),(0,G.Cg)([(0,j.gfw)(Me.y),(0,G.Sn)("design:type",Number)],YS.prototype,"_facingDirection",void 0),YS=(0,G.Cg)([(0,j.EVk)("TeleportPlayerToThis",W.Y.motion)],YS);var QS=U(48129),XS=U(39473),ZS=U(35564);class JS{constructor(k,B,U){this._spawnedPlayers=0,this._players=new Map,this.onPlayerSpawned=new j.HN0,this._prefabLoader=k,this._spawnContainer=B,this._remotePlayerSpawnLimiter=U}destroy(){this.onPlayerSpawned.dispose(),this._destroyed=!0}addPlayer(k,B,U){const F=tt.q.instance.prodigy.gameContainer.get("db5-fb6e"),G=ct.map(tt.q.instance.prodigy.friendsListNetworkHandler.friendsList.concat(tt.q.instance.prodigy.friendsListNetworkHandler.classList),"userID");if(!F.meetsRequirementsDeprecated(9)&&-1===ct.indexOf(G,k.userID))return void j.VyI.log(`Only classmates and friends are added below level 5. Player will not be added. ${k.userID}`,j.$bb.Verbose);let $;if(j.VyI.log(`Adding player ${k.userID} to the map`,j.$bb.Verbose),U)$={x:U.x,y:U.y};else{const B=this._players.get(k.userID);B&&!this.isRemotePlayer(B)&&($={x:B.x,y:B.y})}const H={player:k,appearance:B,appearanceUpdated:!0,shouldBeSpawned:!1,pendingOperations:new j.aSj,position:$};this._players.set(k.userID,H),this.prioritizePlayers()}hasPlayer(k){return this.isRemotePlayer(this._players.get(k))}getSpawnedPlayerGameObject(k){const B=this._players.get(k);if(!this.isRemotePlayer(B))return null;const U=B.gameObject;return(null==U?void 0:U.active)&&B.shouldBeSpawned?U:null}removePlayer(k){const B=this._players.get(k);this._players.delete(k),this.isRemotePlayer(B)&&(this.despawnPlayer(B,!0),this.prioritizePlayers())}updatePlayer(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U;const F=this._players.get(k.userID);if(!this.isRemotePlayer(F))return void j.VyI.log(`Attempted to update player ${k.userID} appearance, but that player isn't spawned`,j.$bb.Warning);const G=yield F.pendingOperations.push();if(!this._destroyed){const G=F.appearance.follow!==B.follow;F.player.init(k),F.appearance=B,F.appearanceUpdated=!0,F.gameObject&&(G&&(null===(U=F.gameObject.findComponentInChildren(za))||void 0===U||U.reloadFollows()),yield Promise.all([F.gameObject.findComponentInChildren(Qm.b).setAppearance(B),F.gameObject.findComponentInChildren(fy).updateNameplate()]),F.gameObject.findComponentInChildren(iy.T).updateMountAppearance())}G()}))}movePlayer(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F=this._players.get(k);if(!this.isRemotePlayer(F))return void this._players.set(k,{x:B,y:U});const G=yield F.pendingOperations.push();this._destroyed||(F.position?(F.position.x=B,F.position.y=U,F.gameObject&&this._pathfinder.findPathAsync(F.gameObject.transform.worldPosition,F.position).then((k=>{var B,U;k&&(null===(U=null===(B=F.gameObject)||void 0===B?void 0:B.findComponentInChildren(j.KhP))||void 0===U||U.setPath(k))}))):(F.position={x:B,y:U},this.prioritizePlayers())),G()}))}prioritizePlayers(){var k,B,U,F,G;const $=tt.q.instance.prodigy.friendsListNetworkHandler,H=ct.map($.friendsList.concat($.classList),"userID"),V=[],W=null===(k=j.i7d.main)||void 0===k?void 0:k.GameObject.transform.worldPosition;let q=0;for(const[j,Y]of Array.from(this._players.entries()))if(this.isRemotePlayer(Y)){if(H.includes(j))this.spawnPlayer(Y);else if(Y.position){const k=W?Math.abs(Y.position.x-W.x)+Math.abs(Y.position.y-W.y):0,j=null!==(U=null===(B=Y.gameObject)||void 0===B?void 0:B.active)&&void 0!==U?U:Y.shouldBeSpawned,$=null===(G=null===(F=Y.cullingComponent)||void 0===F?void 0:F.isShowing)||void 0===G||G,H=j?$?0:700:800;V.push([Y,k+H])}this.willPlayerBeVisible(Y)&&++q}let K=this._players.size-V.length;const z=this._remotePlayerSpawnLimiter.evaluateLimit(this._spawnedPlayers,q);V.sort(((k,B)=>k[1]-B[1]));for(const[Y,Q]of V)if(K{this._onPlayerSpawned.dispatch(k)}),this),this.socketService.onConnect.add(this.forceBroadcastPlayerPosition,this);const k=tt.q.instance.game.broadcaster;k.addAppListener(jn.J8.PlayerEditingMenuClosed,this.broadcastAppearanceChanged.bind(this),this),k.addAppListener(jn.J8.PlayerAppearanceUpdated,this.broadcastAppearanceChanged.bind(this),this),k.addAppListener(jn.J8.MorphMarbleUsed,this.broadcastMorphStart.bind(this),this),k.addAppListener(jn.J8.MorphMarbleCancelled,this.broadcastMorphEnd.bind(this),this),k.addAppListener(jn.pm.StopPlayer,this.broadcastStopPlayer,this),tt.q.instance.prodigy.open.chatOpened.add(this.onChatOpened,this);const B=tt.q.instance.prodigy.gameContainer.get("3b1-0a3d");B.onFire.add(this.fxFired,this),B.onComplete.add(this.fxEnded,this),this._gameNetworkManager.startInactiveTimer()}startSpawnLimiter(){this._remotePlayerSpawnLimiter.enteredZone(),this._reprioritizeIntervalId=window.setInterval((()=>{this._remotePlayerManager.prioritizePlayers()}),tA.REPRIORITIZE_INTERVAL_MS)}destroy(){window.clearInterval(this._reprioritizeIntervalId),this._gameNetworkManager.stopInactiveTimer(),this.socketService.onConnect.remove(this.forceBroadcastPlayerPosition,this),this._onPlayerSpawned.dispose();const k=tt.q.instance.game.broadcaster;k.removeAppListener(jn.J8.PlayerEditingMenuClosed,this),k.removeAppListener(jn.J8.PlayerAppearanceUpdated,this),k.removeAppListener(jn.J8.MorphMarbleUsed,this),k.removeAppListener(jn.J8.MorphMarbleCancelled,this),k.removeAppListener(jn.pm.StopPlayer,this),tt.q.instance.prodigy.open.chatOpened.remove(this.onChatOpened,this),tt.q.instance.prodigy.open.chatMenu&&(tt.q.instance.prodigy.open.chatMenu.chatIDSelected.remove(this.handleChatSelected,this),tt.q.instance.prodigy.open.chatMenu.emoteIDSelected.remove(this.handleEmoteSelected,this),tt.q.instance.prodigy.open.chatMenu.danceIDSelected.remove(this.handleDanceSelected,this));const B=tt.q.instance.prodigy.gameContainer.get("3b1-0a3d");B.onFire.remove(this.fxFired,this),B.onComplete.remove(this.fxEnded,this),this._remotePlayerManager.destroy(),super.destroy()}update(){if(super.update(),this._nextPosition&&Date.now()-this._lastPositionBroadcast>tA.POSITION_BROADCAST_INTERVAL){const k={action:ZS.x.Move,data:{target:{x:this._nextPosition.x,y:this._nextPosition.y}}};this.socketService.broadcastMessage(k),this._lastPosition=this._nextPosition,this._nextPosition=void 0,this._lastPositionBroadcast=Date.now()}}receivedMessage(k){var B;null===(B=tA.MESSAGE_HANDLER_FUNCTIONS[k.action])||void 0===B||B.call(this,"data"in k?k.data:void 0)}playerJoined(k){this.forceBroadcastPlayerPosition()}playerLeft(k){this._remotePlayerManager.removePlayer(k)}handlePlayerInfo(k){var B;if(!k.appearance)return;null!==(B=k.equipment)&&void 0!==B||(k.equipment={});const U={skin:k.appearance.skinColor,face:k.appearance.face,eyeColor:k.appearance.eyeColor,hair:k.appearance.hair,outfit:k.equipment.outfit,hat:k.equipment.hat,weapon:k.equipment.weapon,boot:k.equipment.boots,follow:k.equipment.follow,costume:(0,Bt.G)(pm.q).enabled?k.equipment.costume:void 0};if(this._remotePlayerManager.hasPlayer(k.userID))this._remotePlayerManager.updatePlayer(k,U);else{const B=new Ih.a(tt.q.instance.game);B.init(k),this._remotePlayerManager.addPlayer(B,U)}}handlePlayerMoved(k){k.userID!==this._mainPlayer.getUserID()&&this._remotePlayerManager.movePlayer(k.userID,k.target.x,k.target.y)}handleChatReceived(k){const B=this._remotePlayerManager.getSpawnedPlayerGameObject(k.userID);B&&(j.Aq$.isDefined(k.emoteID)?B.findComponentInChildren(ry).showEmote(k.emoteID):j.Aq$.isDefined(k.chatID)?B.findComponentInChildren(hy).setChat(this._theChatManager.getPhrase(k.chatID)):j.Aq$.isDefined(k.danceID)&&B.findComponentInChildren(cy).startDance(k.danceID))}forceBroadcastPlayerPosition(){this._lastPositionBroadcast=0,this._lastPosition=void 0,this.broadcastPlayerPosition()}broadcastPlayerPosition(k){var B,U;void 0===k&&(k=null===(U=null===(B=this._mainPlayerGameObject)||void 0===B?void 0:B.transform)||void 0===U?void 0:U.worldPosition),k&&(this.socketService.isDisconnected||(this._nextPosition||!this._lastPosition||Math.abs(k.x-this._lastPosition.x)+Math.abs(k.y-this._lastPosition.y)>tA.POSITION_BROADCAST_OFFSET_THRESHOLD)&&(this._nextPosition=k))}broadcastAppearanceChanged(){this.socketService.isDisconnected||this.socketService.broadcastMessage({action:ZS.x.Change})}broadcastMorphStart(k){var B,U;if(this.socketService.isDisconnected)return;const F={action:ZS.x.Transform,data:{showEffect:!0,transformID:null===(B=k.effect)||void 0===B?void 0:B.ID,transformType:null===(U=k.effect)||void 0===U?void 0:U.transform}};this.socketService.broadcastMessage(F)}broadcastMorphEnd(){if(this.socketService.isDisconnected)return;const k={action:ZS.x.Transform,data:{showEffect:!0}};this.socketService.broadcastMessage(k)}broadcastStopPlayer(){this.socketService.isDisconnected||this.forceBroadcastPlayerPosition()}handlePlayerChanged(k){var B;if(!this._remotePlayerManager.hasPlayer(k.userID))return;null!==(B=k.equipment)&&void 0!==B||(k.equipment={});const U={skin:k.appearance.skinColor,face:k.appearance.face,eyeColor:k.appearance.eyeColor,hair:k.appearance.hair,outfit:k.equipment.outfit,hat:k.equipment.hat,weapon:k.equipment.weapon,follow:k.equipment.follow,boot:k.equipment.boots,costume:(0,Bt.G)(pm.q).enabled?k.equipment.costume:void 0};this._remotePlayerManager.updatePlayer(k,U)}handlePlayerTransform(k){const B=this._remotePlayerManager.getSpawnedPlayerGameObject(k.userID),U=null==B?void 0:B.findComponentInChildren(ey.R);U&&(k.transformType&&k.transformID?U.transformPlayerWithEffect(k.transformType,k.transformID):U.isMorphed()&&U.clearMorphedAppearance())}onChatOpened(){tt.q.instance.prodigy.open.chatMenu.chatIDSelected.add(this.handleChatSelected,this),tt.q.instance.prodigy.open.chatMenu.emoteIDSelected.add(this.handleEmoteSelected,this),tt.q.instance.prodigy.open.chatMenu.danceIDSelected.add(this.handleDanceSelected,this)}handleChatSelected(k){this._mainPlayerGameObject.findComponentInChildren(hy).setChat(this._theChatManager.getPhrase(k)),this._mainPlayer.player.chatID=null}handleEmoteSelected(k){var B,U,F;this._mainPlayerGameObject.findComponentInChildren(ry).showEmote(k),this._mainPlayer.player.emoteID=null;const G=null!==(F=null===(U=null===(B=Yt.t.getItem("emote",k))||void 0===B?void 0:B.data)||void 0===U?void 0:U.name)&&void 0!==F?F:k.toString();tt.q.instance.prodigy.gameContainer.get("c47-20b6").playerIdentityAvatar.sendEmoteUsedEvent({emote_name:G,emote_type:ny.H.Emote})}handleDanceSelected(k){this._mainPlayerGameObject.findComponentInChildren(cy).startDance(k),this._mainPlayer.player.danceID=null,tt.q.instance.prodigy.gameContainer.get("c47-20b6").playerIdentityAvatar.sendEmoteUsedEvent({emote_name:k,emote_type:ny.H.Dance})}handleFxReceived(k){const B=this._remotePlayerManager.getSpawnedPlayerGameObject(k.userID);B&&tt.q.instance.prodigy.effects.playFX(k.type,B.transform.worldPosition.x,B.transform.worldPosition.y,k.x,k.y,void 0,this._fxContainer)}fxFired(){var k;tt.q.instance.prodigy.game.input.enabled=!1,null===(k=this._mainPlayerGameObject.findComponentInChildren(j.KhP))||void 0===k||k.stop(),this.broadcastStopPlayer()}fxEnded(){tt.q.instance.prodigy.game.input.enabled=!0}};iA.POSITION_BROADCAST_INTERVAL=1e3,iA.POSITION_BROADCAST_OFFSET_THRESHOLD=75,iA.REPRIORITIZE_INTERVAL_MS=1e3,iA.MESSAGE_HANDLER_FUNCTIONS={[ZS.x.Info]:tA.prototype.handlePlayerInfo,[ZS.x.Move]:tA.prototype.handlePlayerMoved,[ZS.x.Chat]:tA.prototype.handleChatReceived,[ZS.x.FX]:tA.prototype.handleFxReceived,[ZS.x.Change]:tA.prototype.handlePlayerChanged,[ZS.x.Transform]:tA.prototype.handlePlayerTransform},(0,G.Cg)([(0,Gi.b)("c97-bd0d"),(0,G.Sn)("design:type",vp.I)],iA.prototype,"_gameNetworkManager",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],iA.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.Cdj)("d77-66fb"),(0,G.Sn)("design:type",eA.Z)],iA.prototype,"_remotePlayerSpawnLimiter",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],iA.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],iA.prototype,"_mainPlayerGameObject",void 0),(0,G.Cg)([(0,j.Cdj)("8c1-3c93"),(0,G.Sn)("design:type",XS.S)],iA.prototype,"_theChatManager",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iA.prototype,"_spawnContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iA.prototype,"_fxContainer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],iA.prototype,"_onPlayerSpawned",void 0),iA=tA=(0,G.Cg)([(0,j.EVk)("MapMultiplayerController",W.Y.multiplayer)],iA);let sA=class extends xe{getSpawnData(){var k;const B=this._streamedMap.mapData.entry,U=null!==(k=null==B?void 0:B[this._entryPointID])&&void 0!==k?k:null==B?void 0:B.default;return U?{location:{x:U.x,y:U.y},facingDirection:U.facingLeft?Me.y.Left:Me.y.Right}:null}};(0,G.Cg)([(0,j.Cdj)("StreamedMap"),(0,G.Sn)("design:type",j.Ee5)],sA.prototype,"_streamedMap",void 0),(0,G.Cg)([(0,j.Cdj)("InitData-spawnLocationName"),(0,G.Sn)("design:type",String)],sA.prototype,"_entryPointID",void 0),sA=(0,G.Cg)([(0,j.EVk)("EntryPointSpawnDataProvider",W.Y.mapSpawning)],sA);let nA=class extends xe{getSpawnData(){var k;return this._injectedSpawnPosition?{location:{x:this._injectedSpawnPosition.x,y:this._injectedSpawnPosition.y},facingDirection:null!==(k=this._injectedSpawnDirection)&&void 0!==k?k:Me.y.Right}:null}};(0,G.Cg)([(0,j.Cdj)("InitData-spawnPosition"),(0,G.Sn)("design:type",j.I9Y)],nA.prototype,"_injectedSpawnPosition",void 0),(0,G.Cg)([(0,j.Cdj)("InitData-spawnFacingDirection"),(0,G.Sn)("design:type",Number)],nA.prototype,"_injectedSpawnDirection",void 0),nA=(0,G.Cg)([(0,j.EVk)("InjectedPositionSpawnDataProvider",W.Y.mapSpawning)],nA);let aA=class extends xe{getSpawnData(){var k;return null===(k=this._saveDataComponent)||void 0===k?void 0:k.getData()}};(0,G.Cg)([(0,j.g8Q)(j.Tyz),(0,G.Sn)("design:type",j.Tyz)],aA.prototype,"_saveDataComponent",void 0),aA=(0,G.Cg)([(0,j.EVk)("MapSaveSpawnDataProvider",W.Y.mapSpawning)],aA);let rA=class extends xe{getSpawnData(){const k=this.GameObject.transform,B=k.worldPosition;return{location:{x:B.x,y:B.y},facingDirection:k.localScale.x<0?Me.y.Left:Me.y.Right}}};rA=(0,G.Cg)([(0,j.EVk)("TransformSpawnDataProvider",W.Y.mapSpawning)],rA);let oA=class extends j.uAl{constructor(){super(...arguments),this._spawnProviders=[],this._onPlayerSpawned=new j.HN0}spawnPlayer(){let k;if(this._spawnProviders.find((B=>k=B.getSpawnData())),k){const B=k.location.x,U=k.location.y;j.i7d.main.GameObject.transform.setPosition(B,U),this._player.transform.setPosition(B,U),this.GameObject.parent.findComponentInChildren(Wn.m).setFacingDirection(k.facingDirection);this._player.findComponentInChildren(j.mZY)._loadedBounds={left:B,right:B,top:U,bottom:U}}this._onPlayerSpawned.dispatch()}destroy(){this._onPlayerSpawned.dispose(),super.destroy()}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],oA.prototype,"_player",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(xe),(0,G.Sn)("design:type",Array)],oA.prototype,"_spawnProviders",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],oA.prototype,"_onPlayerSpawned",void 0),oA=(0,G.Cg)([(0,j.EVk)("PlayerSpawner",W.Y.mapSpawning)],oA);let hA=class extends j.uAl{constructor(){super(...arguments),this._loadingData={}}set position(k){this._position=k}set battleResult(k){this._loadingData.battleResult=k}set target(k){this.targetMapTag=k}set entrance(k){this.entranceName=k}run(){var k,B;tt.q.instance.prodigy.world.it(this.targetMapTag,null===(k=this._position)||void 0===k?void 0:k.x,null===(B=this._position)||void 0===B?void 0:B.y,Object.assign({spawnLocationName:this.entranceName},this._loadingData),{mapEnteredTransitionType:this._transitionTypeOverride})}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],hA.prototype,"targetMapTag",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],hA.prototype,"entranceName",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],hA.prototype,"_position",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],hA.prototype,"_transitionTypeOverride",void 0),hA=(0,G.Cg)([(0,j.EVk)("TeleportToMap",W.Y.MapTeleport)],hA);let cA=class extends hi.s{postCreate(){super.postCreate();const k=tt.q.instance.game.state.get(Tt.G.TileScreen);k&&(this._playerContainer=k.user)}containsTarget(){var k,B;if(!(null===(B=null===(k=this._playerContainer)||void 0===k?void 0:k.transform)||void 0===B?void 0:B.worldTransform))return super.containsTarget();const U=this.GameObject.transform.worldPosition,F=this._playerContainer.transform.worldTransform,G=new j.I9Y(F.tx,F.ty),$=j.C1c.getDistanceSq(U,G);return 0!==$&&$<=this.radius*this.radius}update(){if(super.update(),this._playerContainer){const k=this.containsTarget();this._isTargetInBounds?k||this.onExit.dispatch():k&&this.onEnter.dispatch(),this._isTargetInBounds=k}}};cA=(0,G.Cg)([(0,j.EVk)("CircleTriggerLegacyMap",W.Y.trigger)],cA);let dA=class extends Ga.E{create(){super.create(),this.gameObject.transform instanceof j.XVE&&(this._width=this.gameObject.transform.fullWidth,this._height=this.gameObject.transform.fullHeight)}containsTarget(){const k=this.target.transform.worldPosition,B=this.gameObject.transform.worldPosition;return this.gameObject.transform instanceof j.XVE&&(B.x-=this.gameObject.transform.pivot.x*this._width,B.y-=this.gameObject.transform.pivot.y*this._height),j.M_G.containsRaw(B.x,B.y,this._width,this._height,k.x,k.y)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],dA.prototype,"_width",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],dA.prototype,"_height",void 0),dA=(0,G.Cg)([(0,j.EVk)("RectTrigger",W.Y.trigger)],dA);let lA=class extends j.uAl{constructor(){super(...arguments),this._onMapsCombined=new j.HN0,this._mapCombiner=null,this._combinedPromise=new j.bnh}create(){super.create(),j.wa5.getActiveScene().container.bind("AwaitMapCombiner").toConstantValue(this),this._streamedMap.onMapLoaded.addOnce(this.mapWasLoaded,this)}destroy(){this._streamedMap.onMapLoaded.remove(this.mapWasLoaded,this),this._mapCombiner&&(this._mapCombiner.onMapsCombined.remove(this.mapsCombined,this),this._mapCombiner=null),this._onMapsCombined.dispose(),super.destroy()}mapWasLoaded(){this._streamedMap.map.onLoadedBlocksChanged.addOnce(this.blocksLoaded,this)}blocksLoaded(){var k,B;this._mapCombiner=this._streamedMap.GameObject.findComponentInChildren(j.Phd),null===(B=null===(k=this._mapCombiner)||void 0===k?void 0:k.hasCombinedMaps())||void 0===B||B?this.mapsCombined():this._mapCombiner.onMapsCombined.addOnce(this.mapsCombined,this)}mapsCombined(){this._onMapsCombined.dispatch(),this._combinedPromise.resolve()}awaitCombinedMaps(){return(0,G.sH)(this,void 0,void 0,(function*(){return this._combinedPromise}))}};(0,G.Cg)([(0,j.MnK)(j.Ee5),(0,G.Sn)("design:type",j.Ee5)],lA.prototype,"_streamedMap",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],lA.prototype,"_onMapsCombined",void 0),lA=(0,G.Cg)([(0,j.EVk)("AwaitMapCombiner",W.Y.tiled)],lA);let uA=class extends j.eXg{constructor(){super(...arguments),this._onCombined=new j.HN0}create(){super.create(),(()=>{(0,G.sH)(this,void 0,void 0,(function*(){var k;this._streamedMap&&(yield null===(k=this._streamedMap)||void 0===k?void 0:k.awaitLoaded()),this._mapCombiner&&(yield this._mapCombiner.awaitCombinedMaps()),this._onCombined.dispatch()}))})()}destroy(){this._onCombined.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("StreamedMap"),(0,G.Sn)("design:type",j.Ee5)],uA.prototype,"_streamedMap",void 0),(0,G.Cg)([(0,j.Cdj)("AwaitMapCombiner"),(0,G.Sn)("design:type",lA)],uA.prototype,"_mapCombiner",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uA.prototype,"_onCombined",void 0),uA=(0,G.Cg)([(0,j.EVk)("AwaitMapLoad",W.Y.map)],uA);let fA=class extends j.AY_{constructor(){super(...arguments),this._initialActiveConditions=[]}create(){super.create();for(const k of this._initialActiveConditions)this._dungeonState.setConditionActive(k,!0)}getActiveConditions(){return this._dungeonState.getActiveConditions()}setConditionActive(k,B){this._dungeonState.setConditionActive(k,B)}};(0,G.Cg)([(0,j.Cdj)("DungeonState"),(0,G.Sn)("design:type",Ce.I)],fA.prototype,"_dungeonState",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],fA.prototype,"_initialActiveConditions",void 0),fA=(0,G.Cg)([(0,j.EVk)("DungeonConditionEvaluator",W.Y.adventure)],fA);let bA=class extends j.uAl{constructor(){super(...arguments),this._id="default",this._facingLeft=!1}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],bA.prototype,"_id",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],bA.prototype,"_facingLeft",void 0),bA=(0,G.Cg)([(0,j.EVk)("MapEntryPoint",W.Y.map)],bA);let pA=class extends j.eXg{constructor(){super(...arguments),this._checkOnLoad=!0,this._onEnteredViaPoint=new j.HN0,this._notEnteredViaPoint=new j.HN0}create(){if(super.create(),this._checkOnLoad){const k=j.wa5.getActiveScene().container,B=`${this._id}_triggered`;k.hasBinding(B)||(k.bind(B).toConstantValue(!0),(()=>{(0,G.sH)(this,void 0,void 0,(function*(){this._streamedMap&&(yield this._streamedMap.awaitLoaded()),this._mapCombiner&&(yield this._mapCombiner.awaitCombinedMaps()),this.checkEntryPoint()}))})())}}destroy(){this._onEnteredViaPoint.dispose(),this._notEnteredViaPoint.dispose(),super.destroy()}checkEntryPoint(){this.getEntryPointName(this._playerEntryPoint)===this.getEntryPointName(this._matchEntryPointName)?this._onEnteredViaPoint.dispatch():this._notEnteredViaPoint.dispatch()}getEntryPointName(k){return k||"default"}};(0,G.Cg)([(0,j.Cdj)("InitData-spawnLocationName"),(0,G.Sn)("design:type",String)],pA.prototype,"_playerEntryPoint",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],pA.prototype,"_checkOnLoad",void 0),(0,G.Cg)([(0,j.Cdj)("StreamedMap"),(0,G.Sn)("design:type",j.Ee5)],pA.prototype,"_streamedMap",void 0),(0,G.Cg)([(0,j.Cdj)("AwaitMapCombiner"),(0,G.Sn)("design:type",lA)],pA.prototype,"_mapCombiner",void 0),(0,G.Cg)([(0,j.MnK)(bA),(0,j.nKb)("entryPoint"),(0,j.Wf4)(),(0,G.Sn)("design:type",bA)],pA.prototype,"_matchEntryPoint",void 0),(0,G.Cg)([(0,j.DTs)(),(0,j.W_S)(),(0,G.Sn)("design:type",String)],pA.prototype,"_matchEntryPointName",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],pA.prototype,"_onEnteredViaPoint",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],pA.prototype,"_notEnteredViaPoint",void 0),pA=(0,G.Cg)([(0,j.EVk)("EntryPointTrigger",W.Y.map)],pA);let vA=class extends j.uAl{constructor(){super(),this._layerList=[],this._activeScene=null,this._activeScene=j.wa5.getActiveScene()}create(){super.create();const k=this._layerList.length;for(let B=0;B{this.onGracePeriodDaysLeftSet.dispatch(k),this.handleGracePeriodRequiredChange()}),this),this._parentalConsentService.onGracePeriodMsLeftSet.add((k=>{this.onGracePeriodMsLeftSet.dispatch(k),this.handleGracePeriodRequiredChange()}),this),this._checkStatusOnCreate&&(this.handleConsentStatusChange(this._parentalConsentService.consentStatus,!1),this.onGracePeriodDaysLeftSet.dispatch(this._parentalConsentService.gracePeriodDaysLeft),this.onGracePeriodMsLeftSet.dispatch(this._parentalConsentService.gracePeriodMsLeft))}destroy(){this._parentalConsentService.onConsentStatusChange.removeAll(this),this._parentalConsentService.onGracePeriodDaysLeftSet.removeAll(this),this._parentalConsentService.onGracePeriodMsLeftSet.removeAll(this),this.clearApprovalAutoDismissTimeout(),this.onConsentStatusChange.dispose(),this.onHumanReadableConsentStatusChange.dispose(),this.onGracePeriodDaysLeftSet.dispose(),this.onGracePeriodMsLeftSet.dispose(),this.onGracePeriodRequiredSet.dispose(),this.onConsentRequired.dispose(),this.onNoConsentRequired.dispose(),this.onConsentStatusMessageAvailable.dispose(),this.onBannerDismissed.dispose(),this.onConsentRequested.dispose(),this.onConsentNotRequested.dispose(),this.onConsentGranted.dispose(),this.onConsentRequestSuccess.dispose(),this.onConsentRequestError.dispose(),this.onConsentRequestFirstSuccess.dispose(),super.destroy()}dismissApprovalMessage(){this.clearApprovalAutoDismissTimeout(),this.onBannerDismissed.dispatch()}clearApprovalAutoDismissTimeout(){j.Aq$.isDefined(EA._approvalAutoDismissTimeout)&&(window.clearTimeout(EA._approvalAutoDismissTimeout),EA._approvalAutoDismissTimeout=null)}handleConsentStatusChange(k,B=!0){const U=wA.b.statusRequiresConsent(k);switch(k!==wA.P.Approved||j.Aq$.isDefined(EA._approvalAutoDismissTimeout)||(EA._approvalAutoDismissTimeout=window.setTimeout((()=>this.dismissApprovalMessage()),EA.APPROVAL_AUTO_DISMISS_TIME_MS)),this.onConsentStatusChange.dispatch(k),this.onHumanReadableConsentStatusChange.dispatch(wA.b.getConsentStatusMessage(k)),k){case wA.P.NotRequested:this.onConsentNotRequested.dispatch();break;case wA.P.Requested:this.onConsentRequested.dispatch();break;case wA.P.Approved:this.onConsentGranted.dispatch()}U?this.onConsentRequired.dispatch():this.onNoConsentRequired.dispatch();const F=U||B&&k===wA.P.Approved&&j.Aq$.isDefined(EA._approvalAutoDismissTimeout);this.onConsentStatusMessageAvailable.dispatch(F),this.handleGracePeriodRequiredChange()}handleGracePeriodRequiredChange(){this.onGracePeriodRequiredSet.dispatch(wA.b.statusRequiresConsent(this._parentalConsentService.consentStatus)&&this._parentalConsentService.gracePeriodMsLeft>0)}sendConsentRequest(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=this._parentalConsentService.consentStatus===wA.P.NotRequested;yield this._parentalConsentService.sendConsentRequest(k).then((()=>{B&&this.onConsentRequestFirstSuccess.dispatch(),this.onConsentRequestSuccess.dispatch()})).catch((k=>{this.onConsentRequestError.dispatch(j.RQr.getMessage(k))}))}))}};TA.APPROVAL_AUTO_DISMISS_TIME_MS=6e4,(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onConsentStatusChange",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onHumanReadableConsentStatusChange",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onGracePeriodDaysLeftSet",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onGracePeriodMsLeftSet",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onGracePeriodRequiredSet",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onConsentRequired",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onNoConsentRequired",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onConsentStatusMessageAvailable",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onBannerDismissed",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onConsentRequested",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onConsentNotRequested",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onConsentGranted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onConsentRequestError",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onConsentRequestSuccess",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TA.prototype,"onConsentRequestFirstSuccess",void 0),(0,G.Cg)([(0,j.Cdj)("580-3bea"),(0,G.Sn)("design:type",wA.b)],TA.prototype,"_parentalConsentService",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],TA.prototype,"_checkStatusOnCreate",void 0),TA=EA=(0,G.Cg)([(0,j.EVk)("ParentalConsentService",W.Y.web)],TA);U(20597);var SA,AA=U(57975),CA=U.n(AA),OA=U(62889),IA=U(8900);let DA=SA=class extends j.wvl{constructor(){super(...arguments),this.fileExtension="gear"}initialize(k,B){super.initialize(k,B),this._path=this._editorAPI.getFilePath(this._fileGuid),this._gear=j.KDe.fromGearFile(JSON.parse(this._editorAPI.readFileSync(this._path).toString()))}generate(k,B){if(!this._path)return j.bl1.create({id:`failed-${this.fileExtension}-path-${this._fileGuid}`,iconType:j.ATc.Error,message:`Failed to get filepath for ${this._fileGuid} (likely a race condition with the editors internal file structure). Please re-select the file.`});const U=[OA.M.generateGearHelperNode(this._editorAPI,this.fileExtension),this.generateGearInfoNode(),this.generateHiddenSlotsNode(),this.generateSlotsToNotRecolorNode(),this.generateAttachmentArrayNode()];return j.XRp.createVertical(U)}generateGearInfoNode(){const k=this._path.substring(0,this._path.lastIndexOf(`/${this.fileExtension}/`)),B=CA().basename(this._path,`.${this.fileExtension}`),U=CA().join(k,"images",B),F=[];return F.push(j.ly.create({id:`${this.fileExtension}-type-${this._fileGuid}`,labelValue:`${this.fileExtension} is a ${CA().basename(k)} type`}),j.XRp.createHorizontal([j.ly.create({id:`${this.fileExtension}-image-path-${this._fileGuid}`,labelValue:`Image path: ${U.substring(U.indexOf("/assets/"))}`}),j.X9M.create({id:`open-${this.fileExtension}-image-folder-${this._fileGuid}`,buttonText:"",buttonIcon:j.a2l.Folder,nodeSize:"1of12",onClick:()=>{this._editorAPI.externalOpenFolder(U)}})])),j.XRp.createVertical(F,{isCollapsible:!0,startCollapsed:!1,title:`Info: ${B}`})}generateHiddenSlotsNode(){const k=[j.Gme.dropdownGroup({id:`hidden-slot-quick-dropdown-${this._fileGuid}`,labelValue:"Hidden Slot Presets",selectValue:"selectAnOption",selectOptions:Object.keys(SA.hiddenAttachmentPresets),onChange:k=>{const B="string"==typeof k?k:Object.keys(SA.hiddenAttachmentPresets)[k];if("clear"===B)this._gear.hiddenSlots.length=0;else{const k=new Set(this._gear.hiddenSlots||[]);SA.hiddenAttachmentPresets[B].forEach((B=>k.add(B))),this._gear.hiddenSlots=Array.from(k)}const U=j.KDe.toGearFile(this._gear);tt.q.instance.game.cache.addJSON(this._fileGuid,U),this._editorAPI.writeToPath(this._path,U),this._editorAPI.redrawCustomInspector()}})];return k.push(j._Lw.line(),j.IqD.create({label:"Hidden Slots",id:`hidden-slots-${this._fileGuid}`,arrayType:j.bJb.Enum,enumeration:Xa.VE,value:this._gear.hiddenSlots,onChange:k=>{this._gear.hiddenSlots=k;const B=j.KDe.toGearFile(this._gear);tt.q.instance.game.cache.addJSON(this._fileGuid,B),this._editorAPI.writeToPath(this._path,B),this._editorAPI.redrawCustomInspector()}})),j.XRp.createVertical(k,{isCollapsible:!0,startCollapsed:!1,title:"Hidden Slots"})}generateSlotsToNotRecolorNode(){const k=[j.Gme.dropdownGroup({id:`do-not-recolor-slot-quick-dropdown-${this._fileGuid}`,labelValue:"Do Not Recolor Presets",selectValue:"selectAnOption",selectOptions:Object.keys(SA.doNotRecolorAttachmentPresets),onChange:k=>{const B="string"==typeof k?k:Object.keys(SA.doNotRecolorAttachmentPresets)[k];if("clear"===B)this._gear.slotsToNotRecolor.length=0;else{const k=new Set(this._gear.slotsToNotRecolor||[]);SA.doNotRecolorAttachmentPresets[B].forEach((B=>k.add(B))),this._gear.slotsToNotRecolor=Array.from(k)}const U=j.KDe.toGearFile(this._gear);tt.q.instance.game.cache.addJSON(this._fileGuid,U),this._editorAPI.writeToPath(this._path,U),this._editorAPI.redrawCustomInspector()}})];return k.push(j.IqD.create({label:"Do Not Recolor Slots",id:`do-not-recolor-slots-${this._fileGuid}`,arrayType:j.bJb.Enum,enumeration:Xa.VE,value:this._gear.slotsToNotRecolor||[],onChange:k=>{this._gear.slotsToNotRecolor=k;const B=j.KDe.toGearFile(this._gear);tt.q.instance.game.cache.addJSON(this._fileGuid,B),this._editorAPI.writeToPath(this._path,B),this._editorAPI.redrawCustomInspector()}})),j.XRp.createVertical(k,{isCollapsible:!0,startCollapsed:!1,title:"Do Not Recolor Slots"})}generateAttachmentArrayNode(){const k=j.IqD.create({label:"Attachments",id:`gear-array-${this._fileGuid}`,value:this._gear.attachments,arrayType:j.bJb.GenericObject,insertElementCallbacks:new Map([["default",()=>({name:"",imageGuid:""})]]),onChange:k=>{this._gear.attachments=k;const B=j.KDe.toGearFile(this._gear);tt.q.instance.game.cache.addJSON(this._fileGuid,B),this._editorAPI.writeToPath(this._path,B),this._editorAPI.redrawCustomInspector()},getElementInspector:this.generateElementNode.bind(this)});return j.XRp.createVertical([k],{isCollapsible:!0,startCollapsed:!1,title:"Attachment Editor"})}generateElementNode(k,B){const U=[j.ly.create({id:`attachment-label-${B}`,labelValue:`Attachment '${k.name}'`}),j.ly.create({id:`guid-label-${B}`,labelValue:`Guid '${k.imageGuid}'`})];return k.transform?U.push(this.generateTransformInspector(k,B)):U.push(j.ly.create({id:`missing-transform-${B}-${this._fileGuid}`,labelValue:`Default transform in use at ${B}`}),j.X9M.create({id:`add-missing-transform-${B}-${this._fileGuid}`,buttonText:"Add Transform",onClick:()=>{k.transform={x:0,y:0,scaleX:1,scaleY:1}}})),j.XRp.createVertical(U,{isCollapsible:!0,startCollapsed:!0,title:`${k.name} - ${k.transform?"custom":"default"} Transform`})}generateTransformInspector(k,B){const U=j.fqe.create({id:`transform-x-${B}-${this._fileGuid}`,inputValue:k.transform.x,inputType:"number",labelValue:"x",inputUpdateMode:j.JGO.Confirm,propertyPath:[`${B}`,"transform","x"]}),F=j.fqe.create({id:`transform-y-${B}-${this._fileGuid}`,inputValue:k.transform.y,inputType:"number",labelValue:"y",inputUpdateMode:j.JGO.Confirm,propertyPath:[`${B}`,"transform","y"]}),G=j.fqe.create({id:`transform-scalex-${B}-${this._fileGuid}`,inputValue:k.transform.scaleX,inputType:"number",labelValue:"scaleX",inputUpdateMode:j.JGO.Confirm,propertyPath:[`${B}`,"transform","scaleX"]}),$=j.fqe.create({id:`transform-scaley-${B}-${this._fileGuid}`,inputValue:k.transform.scaleY,inputType:"number",labelValue:"scaleY",inputUpdateMode:j.JGO.Confirm,propertyPath:[`${B}`,"transform","scaleY"]});return j.XRp.createVertical([j.XRp.createHorizontal([U,F]),j.XRp.createHorizontal([G,$])])}};DA.hiddenAttachmentPresets={selectAnOption:[],clear:[],hideFace:IA.M.instance.faceAttachments,hideBody:IA.M.instance.skinAttachments,hideAllHair:IA.M.instance.hairAttachments,hideBackAndShort:[Xa.VE.HairBun,Xa.VE.HairRPigtails,Xa.VE.HairLPigtails,Xa.VE.HairBack,Xa.VE.HairBehind,Xa.VE.HairBackLong,Xa.VE.HairShort],hideBackFull:[Xa.VE.HairBun,Xa.VE.HairRPigtails,Xa.VE.HairLPigtails,Xa.VE.HairBack,Xa.VE.HairBehind,Xa.VE.HairBackLong],hideBackExceptLong:[Xa.VE.HairBun,Xa.VE.HairRPigtails,Xa.VE.HairLPigtails,Xa.VE.HairBack,Xa.VE.HairBehind]},DA.doNotRecolorAttachmentPresets={selectAnOption:[],clear:[],face:IA.M.instance.faceAttachments,hair:IA.M.instance.hairAttachments,skin:IA.M.instance.skinAttachments,eyes:IA.M.instance.eyeAttachments},DA=SA=(0,G.Cg)([(0,j.aw3)("gear")],DA);let RA=class extends DA{constructor(){super(...arguments),this.fileExtension="petgear"}};RA.hiddenAttachmentPresets={selectAnOption:[],clear:[]},RA=(0,G.Cg)([(0,j.aw3)("petgear")],RA);let PA=class extends Fi.z{create(){super.create(),this._bindOnCreate&&this.bindContext()}bindContext(){var k;this._context.Container.rebind("PLAYER_GOLD_COINS").toConstantValue(this._dataProvider.player.getGold()),this._context.Container.rebind("CHARGED_LEVEL_CAP").toConstantValue(this._dataProvider.player.getChargedLevelCap()),this._context.Container.rebind("PLAYER_FIRST_NAME").toConstantValue(this._dataProvider.player.getFirstName()),this._context.Container.rebind("PLAYER_WIZARD_NAME").toConstantValue(null!==(k=this._dataProvider.player.getNameWithoutNickname().split(" ")[1])&&void 0!==k?k:""),this._context.Container.rebind("PLAYER_CHARGED_LEVEL_CUMULATIVE").toConstantValue(this._dataProvider.player.getChargedLevelCumulative())}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],PA.prototype,"_dataProvider",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],PA.prototype,"_bindOnCreate",void 0),PA=(0,G.Cg)([(0,j.EVk)("ActivePlayerDataProvider",W.Y.player)],PA);U(32500);var MA=U(55950),NA=U(36164);let xA=class extends j.uAl{constructor(){super(...arguments),this.texts=[],this.types=[],this._indexes={},this._gearIndex=-1}nextAssetType(k){const B=NA.R[`${k}Map`];if(!B||0===B.length)return void j.VyI.log(`No map of type ${k} in GearMaps.ts`,j.$bb.Error);this._indexes[k]||(this._indexes[k]=0);let U=this._indexes[k];for(U++;!B[U];)U>=B.length?U=0:U++;this.setTypeIndex(k,U,B)}prevAssetType(k){const B=NA.R[`${k}Map`];if(!B)return void j.VyI.log(`No map of type ${k} in GearMaps.ts`,j.$bb.Error);this._indexes[k]||(this._indexes[k]=0);let U=this._indexes[k];for(U--;!B[U];)U<0?U=B.length-1:U--;this.setTypeIndex(k,U,B)}setTypeIndex(k,B,U){this._indexes[k]=B,-1===this._gearIndex&&(this._gearIndex=this._gear.gear.length),this._gear.gear[this._gearIndex]=U[B],this._gear.postCreate(),this._color.refresh(),this.updateTextUI(k,B)}updateTextUI(k,B){const U=this.types.indexOf(k);this.texts.forEach(((k,F)=>{const G=this.types[F].substring(0,1).toUpperCase()+this.types[F].substring(1);k.text=F===U?`${G}-${B}`:G}))}};(0,G.Cg)([(0,j.Pqz)(_i.c),(0,G.Sn)("design:type",_i.c)],xA.prototype,"_gear",void 0),(0,G.Cg)([(0,j.Pqz)(MA.y),(0,G.Sn)("design:type",MA.y)],xA.prototype,"_color",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",Array)],xA.prototype,"texts",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],xA.prototype,"types",void 0),xA=(0,G.Cg)([(0,j.EVk)("GearEditorHelper","Editor")],xA);U(131);let LA=class extends j.uAl{constructor(){super(...arguments),this.time=1e3,this._index=0,this._timer=1e3}postCreate(){super.postCreate(),this.manager=this.gameObject.findComponent(_i.c)}update(){super.update(),this._timer<0&&(this._timer=this.time,this._index"character"===k.name))?F.slots.find((k=>"character"===k.name))?null:"Spine file missing character slot":"Spine file missing character bone":"Spine file missing bones and slots"}validateParticle(){if(!this._mount)return"Failed to load mount file";const k=this._mount.particlesGuid;if(null==k)return null;const B=this._editorAPI.getFilePath(k);if(!B)return"Particle system file not found";let U=null;try{U=this._editorAPI.readFileSync(B).toString()}catch(e){j.RQr.logError(e,"Failed to read particle system file")}return U?U.includes("ParticleSystem")?null:"Particle system file missing ParticleSystem component":"Failed to load particle system file"}generateVectorInspector(k,B,U){const F=null!=B?B:new j.I9Y(0,0),G=j.ly.create({id:`offset-${k}-label-${this._fileGuid}`,labelValue:"Offset"}),$=j.fqe.create({id:`offset-${k}-x-${this._fileGuid}`,inputValue:F.x,inputType:"number",labelValue:"x",inputUpdateMode:j.JGO.Confirm,onChange:(k,B)=>U("x",B)}),H=j.fqe.create({id:`offset-${k}-y-${this._fileGuid}`,inputValue:F.y,inputType:"number",labelValue:"y",inputUpdateMode:j.JGO.Confirm,onChange:(k,B)=>U("y",B)});return j.XRp.createVertical([G,j.XRp.createHorizontal([$,H])])}generateParticlesPickerInspector(){var k;const B=j.ly.create({id:`particle-label-${this._fileGuid}`,labelValue:"Particles"}),U=j.Hnb.create({id:`particles-${this._fileGuid}`,path:null!==(k=this._particleFilePath)&&void 0!==k?k:void 0,allowedExtensions:[".prefab"],onChange:k=>this.onParticleChange(k)});return j.XRp.createVertical([j._Lw.line(`particle-divider-${this._fileGuid}`),B,U])}onParticleOffsetChange(k,B){if(!this._mount)return void j.VyI.log("No mount to update",j.$bb.Error);let U;if("string"==typeof B)U=parseFloat(B);else{if("number"!=typeof B)return void j.VyI.log("Invalid value type for offset",j.$bb.Error);U=B}this._mount.particleOffset||(this._mount.particleOffset=new j.I9Y(0,0)),this._mount.particleOffset[k]=U,this.writeMountFile(),this._editorAPI.redrawCustomInspector()}onMountOffsetChange(k,B){if(!this._mount)return void j.VyI.log("No mount to update",j.$bb.Error);let U;if("string"==typeof B)U=parseFloat(B);else{if("number"!=typeof B)return void j.VyI.log("Invalid value type for offset",j.$bb.Error);U=B}this._mount.offset[k]=U,this.writeMountFile(),this._editorAPI.redrawCustomInspector()}onParticleChange(k){if(this._mount){try{if(k){const B=this._editorAPI.readFileSync(`${k}.meta`).toString(),U=JSON.parse(B).guid;this._mount.particlesGuid=U}else this._mount.particlesGuid=void 0;this.writeMountFile()}catch(e){j.RQr.logError(e,"Failed to parse particle meta file")}this._editorAPI.redrawCustomInspector()}else j.VyI.log("No mount to update",j.$bb.Error)}generateSpinePickerInspector(){return j.ICs.create({id:`spine-picker-${this._fileGuid}`,guid:this._mount.spineGuid,onChange:this.onSpineChange.bind(this)})}onSpineChange(k){this._mount?(this._mount.spineGuid=k,this.writeMountFile(),this._editorAPI.redrawCustomInspector()):j.VyI.log("No mount to update",j.$bb.Error)}writeMountFile(){this._mountFilePath?this._editorAPI.writeToPath(this._mountFilePath,BA.u.toMountFile(this._mount)):j.VyI.log("No path to write mount file to",j.$bb.Error)}generate(k,B){var U,F;if(!this._mountFilePath)return j.bl1.create({id:`failed-mount-path-${this._fileGuid}`,iconType:j.ATc.Error,message:`Failed to get filepath for ${this._fileGuid} (likely a race condition with the editors internal file structure). Please re-select the file.`});this._errorMessage=null!==(F=null!==(U=this.validateSpine())&&void 0!==U?U:this.validateParticle())&&void 0!==F?F:null;const G=[];return this._errorMessage&&G.push(j.bl1.create({id:`mount-error-${this._fileGuid}`,iconType:j.ATc.Error,message:this._errorMessage})),G.push(this.generateVectorInspector("mount",this._mount.offset,this.onMountOffsetChange.bind(this))),G.push(this.generateSpinePickerInspector()),G.push(this.generateParticlesPickerInspector()),G.push(this.generateVectorInspector("particle",this._mount.particleOffset,this.onParticleOffsetChange.bind(this))),j.XRp.createVertical(G)}};UA=(0,G.Cg)([(0,j.aw3)("mount")],UA);let FA=class extends j.uAl{constructor(){super(...arguments),this._boundPreviewUpdate=null,this._updateTween=null,this._tweenState={t:0},this._isIdle=!0,this._mountParticles=null}create(){super.create(),j.VyI.log("The mount preview component is only intended for use inside of the editor.",j.$bb.Error),this._mountComponent.isMountReady?this.onMountReady():this._mountComponent.mountReady.addOnce(this.onMountReady,this)}editorUpdate(k){this._mountComponent.update(),k.update()}onMountReady(){this._mountParticles=null,this._mountComponent.removeParticleEffect(),this._mountComponent.hasInternalParticleEffect()&&this._mountComponent.addInternalParticleEffect().then((k=>{this._mountParticles=k})).catch(j.RQr.createHandler("Could not add internal particle effect in editor."));const k=this._mountComponent.playerObject.findComponent(rn.l);k?(this._boundPreviewUpdate||(this._boundPreviewUpdate=this.editorUpdate.bind(this,k)),this._updateTween||(this._updateTween=j.W$e.instance.game.add.tween(this._tweenState,this),this._updateTween.to({t:1},1e3,j.GS3.Linear.None,!0,0,-1,!0)),this._updateTween.onUpdate.removeAll(),this._updateTween.onUpdate.add(this._boundPreviewUpdate)):j.VyI.log("No player spine bone follower found for player",j.$bb.Error)}toggleWalkAnimation(){this._isIdle?this._mountComponent.playAnimation("walk"):this._mountComponent.playAnimation("idle"),this._isIdle=!this._isIdle}destroy(){var k,B;this._mountParticles=null,null===(k=this._mountComponent)||void 0===k||k.removeParticleEffect(),null===(B=this._updateTween)||void 0===B||B.destroy()}};(0,G.Cg)([(0,j.Pqz)(kA.N),(0,G.Sn)("design:type",kA.N)],FA.prototype,"_mountComponent",void 0),FA=(0,G.Cg)([(0,j.EVk)("MountPreview",j.YH6.animation)],FA);let GA=class extends j.uAl{constructor(){super(...arguments),this._allowNotOwned=!1,this._equipOnCreate=!1}create(){super.create(),this._equipOnCreate&&this.equipItem()}run(){this.equipItem()}equipItem(){if(!j.Aq$.isDefined(this._type))return void j.VyI.log("PlayerEquipItemComponent: item type required",j.$bb.Error);const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;(this._allowNotOwned||k.backpack.hasItem(this._type,this._id))&&k.equip(this._id,this._type).then((()=>{var k,B,U;return null===(U=null===(B=null===(k=this._playerDataProvider)||void 0===k?void 0:k.player)||void 0===B?void 0:B.playerContainer)||void 0===U?void 0:U.reload()})).catch(j.RQr.createHandler(`PlayerEquipItemComponent:equipItem Failed to equip item ${this._type}-${this._id}`))}unequipItem(){if(!j.Aq$.isDefined(this._type))return void j.VyI.log("PlayerEquipItemComponent: item type required",j.$bb.Error);const k=this._playerDataProvider.player;k.equipment[this._type]===this._id&&k.unEquip(this._id,this._type).then((()=>{var k,B,U;return null===(U=null===(B=null===(k=this._playerDataProvider)||void 0===k?void 0:k.player)||void 0===B?void 0:B.playerContainer)||void 0===U?void 0:U.reload()})).catch(j.RQr.createHandler(`PlayerEquipItemComponent:unequipItem Failed to unequip item ${this._type}-${this._id}`))}unequipCurrentOfType(){if(!j.Aq$.isDefined(this._type))return void j.VyI.log("PlayerEquipItemComponent: item type required",j.$bb.Error);const k=this._playerDataProvider.player;k.equipment[this._type]&&k.unEquip(k.equipment[this._type],this._type).then((()=>{var k,B,U;return null===(U=null===(B=null===(k=this._playerDataProvider)||void 0===k?void 0:k.player)||void 0===B?void 0:B.playerContainer)||void 0===U?void 0:U.reload()})).catch(j.RQr.createHandler(`PlayerEquipItemComponent:unequipCurrentOfType Failed to unequip current item of type ${this._type}`))}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],GA.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],GA.prototype,"_id",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],GA.prototype,"_type",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],GA.prototype,"_allowNotOwned",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],GA.prototype,"_equipOnCreate",void 0),GA=(0,G.Cg)([(0,j.EVk)("PlayerEquipItem",W.Y.player)],GA);let jA=class extends j.uAl{constructor(){super(...arguments),this._equipOnCreate=!1}create(){super.create(),this._equipOnCreate&&this.equipPet()}run(){this.equipPet()}equipPet(){if(!j.Aq$.isDefined(this._petId))return void j.VyI.log("PlayerEquipPetComponent: pet ID required",j.$bb.Error);const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=k.kennel.getPetTeamIDs();if(B.includes(this._petId))eo.P8.showUniquePetsFeature()&&k.kennel.replaceDuplicateOnTeam(this._petId);else{const U=eo.P8.isPetEvolvedStarter(B[1])?1:2,F=k.kennel.getAllPetsByID(this._petId),G=eo.P8.showUniquePetsFeature()?eo.P8.getPrimaryPet(this._petId,F):this.getHighestLevelPet(F);if(!G)return void j.VyI.log(`PlayerEquipPetComponent: pet with ID ${this._petId} not found in kennel; cannot equip`,j.$bb.Error);k.kennel.removeAtTeamPosition(U),k.kennel.setTeamPosition(G,U)}}getHighestLevelPet(k){if(k&&0!==k.length)return k.sort(((k,B)=>B.level-k.level)),k[0]}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],jA.prototype,"_petId",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jA.prototype,"_equipOnCreate",void 0),jA=(0,G.Cg)([(0,j.EVk)("PlayerEquipPet",W.Y.player)],jA);U(47734);var $A=U(97252);let HA=class extends j.PQK{installBindings(){this.Container.bind("PLAYER_APPEARANCE_SCALING").toConstantValue($A.M.UPSCALED_4x)}};HA=(0,G.Cg)([(0,j.Og1)("PlayerUpscalingInstaller","Installer")],HA);U(77409);var VA=U(42430),WA=U(91016),qA=U(39571),KA=U(90351);class zA extends j.$KW{generate(k,B){this._dropdownOptions||(this._dropdownOptions=Array.from(VA.o.spellConstructors.keys()),this._dropdownOptions.unshift(zA.ADD_STEP));const U=this.displayWarnings();if(U)return U;const F=[];F.push(j.X9M.create({id:"begin-button",buttonText:"Begin",onClick:()=>{this._editorAPI.switchFocusToPlayMode(),this.getComponent().begin()}})),F.push(j.X9M.create({id:"save-button",buttonText:"Save",onClick:()=>{const k=this.getSpell(),B=this._editorAPI.getFilePath(k.spellGUID);this._editorAPI.writeToPath(B,this.getJSONString(k))}})),F.push(j.Gme.numberGroup({id:"multiHit",labelValue:"Multi-Hit",inputValue:k.multiHit})),F.push(j.Gme.gameObjectPickerGroup({id:"caster",labelValue:"Spell Caster",gameObjectGuid:k.caster}));const G=[];for(let $=0;$<3;$++)G.push(j.WVg.create({id:`target.${$}`,gameObjectGuid:k.targets[$],propertyPath:["targets",`${$}`]}));return F.push(j.XRp.createVertical(G,{isCollapsible:!0,title:"Spell Targets"})),F.push(j._Lw.line()),F.push(this.createSpellEditor(this.getSpell().steps)),F.push(j._Lw.line()),F.push(j._6c.create({id:"add-end",selectValue:0,selectOptions:this._dropdownOptions,onChange:k=>{if(k===zA.ADD_STEP)return;this.getSpell().steps.push(VA.o.spellConstructors.get(k)()),this.updateCache()}})),j.XRp.createVertical(F)}displayWarnings(){var k;const B=this.getComponent();return B?(null===(k=B.spell)||void 0===k?void 0:k.steps)?null:j.XRp.createVertical([j.bl1.create({id:"missing-spell-steps",message:"Either no SpellComponent found, SpellComponent.spellGUID is undefined, or the .spell file is not yet loaded",iconType:j.ATc.Warning}),j.X9M.create({id:"refresh-button",buttonText:"Refresh"})]):j.XRp.createVertical([j.bl1.create({id:"missing-component",message:"SpellTestComponent is missing, please interact with another ui element to force a redraw",iconType:j.ATc.Warning}),j.X9M.create({id:"refresh-button",buttonText:"Refresh"})])}getComponent(){return this._editorAPI.getComponent(this._componentGuid)}getSpell(){var k;return null===(k=this.getComponent())||void 0===k?void 0:k.spell}getJSONString(k){return JSON.stringify({steps:k.steps},((k,B)=>k.startsWith("__")?B:k.startsWith("_")?void 0:B),"\t")}updateCache(){const k=this.getSpell();tt.q.instance.game.cache.addJSON(k.spellGUID,JSON.parse(this.getJSONString(k))),this._editorAPI.modifyComponent(this._componentGuid,{})}createSpellEditor(k){const B=[];for(let U=0;U{const B=this.getSpell(),U=B.steps[k-1];B.steps[k-1]=B.steps[k],B.steps[k]=U,this.updateCache()}})),B.push(j.X9M.create({id:`move-down-${k}`,buttonText:"⬇️",buttonDisabled:k===this.getSpell().steps.length-1,onClick:()=>{const B=this.getSpell(),U=B.steps[k+1];B.steps[k+1]=B.steps[k],B.steps[k]=U,this.updateCache()}})),B.push(j._6c.create({id:`add-${k}`,selectValue:0,selectOptions:this._dropdownOptions,onChange:B=>{if(B===zA.ADD_STEP)return;this.getSpell().steps.splice(k,0,VA.o.spellConstructors.get(B)()),this.updateCache()}})),B.push(j.ly.create({id:`break-${k}`,labelValue:" "})),B.push(j.X9M.create({id:`delete-${k}`,buttonText:"❌",onClick:()=>{this.getSpell().steps.splice(k,1),this.updateCache()}})),j.XRp.createHorizontal(B)}getSpellStepInspector(k,B){const U=[this.getSpellStepHeader(B)];return k?(k._spellComponent=this.getSpell(),Object.keys(k).filter((k=>!k.startsWith("_"))).forEach((F=>{const G=(k,U)=>{this.getSpell().steps[B][F]=U,this.updateCache()},$={id:F+Math.random(),labelValue:F,inputUpdateMode:j.JGO.Confirm},H=k.getOverrideInspectorNode(F,$.id,G);if(!0===H)if("target"===F)U.push(j.Gme.enumGroup(Object.assign(Object.assign({},$),{selectValue:k[F],onChange:k=>{G(0,k)}}),WA.Wo));else if("blend"===F)U.push(j.Gme.enumGroup(Object.assign(Object.assign({},$),{selectValue:k[F],onChange:k=>{G(0,k)}}),j.PzZ));else if("PlayAnimationStep"!==k.__type||"animation"!==F&&"returnToLoop"!==F)if(-1!==F.indexOf("ffset"))U.push(j.XRp.createHorizontal([j.ly.create($),j.Gme.numberGroup(Object.assign(Object.assign({},$),{id:`x-${$.id}`,labelValue:"x",inputValue:k[F].x,onChange:(U,G)=>{k[F].x=G;this.getSpell().steps[B]=k,this.updateCache()}})),j.Gme.numberGroup(Object.assign(Object.assign({},$),{id:`y-${$.id}`,labelValue:"y",inputValue:k[F].y,onChange:(U,G)=>{k[F].y=G;this.getSpell().steps[B]=k,this.updateCache()}}))]));else if(-1!==F.indexOf("Ease"))U.push(j.Gme.enumGroup(Object.assign(Object.assign({},$),{selectValue:k[F],onChange:k=>{G(0,k)}}),KA.i));else if("layerOverride"===F)U.push(j.Gme.enumGroup(Object.assign(Object.assign({},$),{selectValue:k[F],onChange:k=>{G(0,k)}}),WA.Cr));else if("prefabID"===F)U.push(j.T7t.create(Object.assign(Object.assign({},$),{guid:k[F],onChange:k=>{G(0,k)}})));else if("spineID"===F)U.push(j.ICs.create(Object.assign(Object.assign({},$),{guid:k[F],onChange:k=>{G(0,k)}})));else switch($.inputValue=k[F],$.onChange=G,typeof k[F]){case"string":U.push(j.Gme.textGroup($));break;case"boolean":U.push(j.Gme.checkboxGroup($));break;case"number":U.push(j.Gme.numberGroup($));break;case"function":break;default:U.push(j.ly.create({id:Math.random().toString(),labelValue:`Unknown parameter ${F} - ${typeof k[F]}. Please update SpellTestInspector`}))}else U.push(j.Gme.dropdownGroup(Object.assign(Object.assign({},$),{selectValue:k[F],selectOptions:zA.ANIMATION_NAMES,onChange:k=>{G(0,k)}})));else!1!==H&&U.push(H)})),j.XRp.createVertical(U,{isCollapsible:!0,title:k.__type})):j.XRp.createVertical(U)}}zA.ADD_STEP="add step",zA.ANIMATION_NAMES=["attack","idle","walk"];let YA=class extends j.uAl{constructor(){super(...arguments),this.multiHit=0,this.targets=[],this._playing=!1}begin(){this._playing||(this._playing=!0,this.GameObject.children.forEach((k=>{k===this.caster?this.updateLayerByName(k,qA.a.ActiveSideCast):k.name.charAt(0)===this.caster.name.charAt(0)?this.getLayerLevel(k.layer)({unitId:`target-${B}`,gameObject:k,statusEffectContainer:k}))),manager:this.spell,multiHit:this.multiHit}).then((()=>{this._playing=!1})).catch((k=>{this._playing=!1,console.error(k)})))}updateLayerByName(k,B){const U=`${B}${this.getLayerLevel(k.layer)}`;k.setLayer(U,!0)}getLayerLevel(k){const B=parseInt(k.charAt(k.length-1));return rr.o.isNumber(B)||console.log("ERROR: layer name requires a numerical suffix value"),B}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],YA.prototype,"multiHit",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],YA.prototype,"caster",void 0),(0,G.Cg)([(0,j.ERr)(),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],YA.prototype,"targets",void 0),(0,G.Cg)([(0,j.Pqz)(VA.o),(0,G.Sn)("design:type",VA.o)],YA.prototype,"spell",void 0),(0,G.Cg)([(0,j.GO0)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],YA.prototype,"begin",null),YA=(0,G.Cg)([(0,j.WR4)(zA),(0,j.EVk)("SpellTest",j.YH6.animation)],YA);U(90076);let QA=class extends j.JTX{constructor(){super(...arguments),this._rewardItems=[],this._replacementItems=[]}create(){const k=this.getInjectedValue(hs.Co.WeightedRewards),B=this.getInjectedValue(hs.Co.FallbackRewards);k&&(this._rewardItems=k),B&&(this._replacementItems=Lt.l.guaranteeArray(B))}getItem(){return this._rewardItems.length>0?this.getWeightedItem(this._rewardItems):this.getWeightedItem(this._replacementItems)}getWeightedItem(k){return Ze.selectByWeight(k,(k=>{var B;return null!==(B=k.R)&&void 0!==B?B:1}))}};(0,G.Cg)([(0,j.SZi)(),(0,j.vCS)(),(0,G.Sn)("design:type",Array)],QA.prototype,"_rewardItems",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Array)],QA.prototype,"_replacementItems",void 0),QA=(0,G.Cg)([(0,j.EVk)("BossItems",W.Y.adventure)],QA);U(55237);var XA=U(96268);let ZA=class extends j.JTX{constructor(){super(...arguments),this.itemCardScale=1}create(){super.create(),this._pool=new j.iyL(this.loadCard.bind(this),this.setCardData.bind(this))}getObject(){return this._pool.getObject()}reloadCards(){this._pool.aliveList.forEach((k=>{this.setCardData(k)}))}loadCard(){const k=this._prefabLoader.loadFromGUID(Rt.l.ItemCard);return this.setCardData(k),k.addComponent(XA.a),k}setCardData(k){k.transform.setScale(this.itemCardScale,this.itemCardScale);const B=k.findComponentInChildren(Gy.Z),U=this.itemProvider.getItem();B&&(B.initializeOnPostCreate=!1,B.initializeItemCard({id:U.ID,type:U.type,L:U.L,N:U.N,cost:U.cost,data:U.data,receivedThroughGotItemFlow:!1}))}destroy(){this._pool.destroy(),super.destroy()}};(0,G.Cg)([(0,j.MnK)(j.uAl),(0,G.Sn)("design:type",Object)],ZA.prototype,"itemProvider",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],ZA.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],ZA.prototype,"itemCardScale",void 0),ZA=(0,G.Cg)([(0,j.EVk)("ItemCardPool",W.Y.adventureUi)],ZA);var JA=U(23283),tC=U(71041),eC=U(34374);let iC=class extends j.JTX{constructor(){super(...arguments),this._respinTextKey="RESPIN_ROULETTE"}destroy(){var k,B;null===(B=null===(k=this._currencyDisplay)||void 0===k?void 0:k.onCurrencyUpdateComplete)||void 0===B||B.remove(this.handleCurrencyUpdateComplete,this),super.destroy()}run(){this._roulette.headerText.text=this._localizer.getText(this._respinTextKey),this.card.active=!1,this._roulette.reset(),this._roulette.isRespin=!0,this._roulette.GameObject.active=!0,this.respinButtonsContainer.active=!0,this.setupCurrencyRespin()}setupCurrencyRespin(){if(this._currencyId=this.getInjectedValue(hs.Co.CurrencyId),this._respinCost=this.getInjectedValue(hs.Co.RespinCost),!j.Aq$.isDefined(this._currencyId)||!j.Aq$.isDefined(this._respinCost))return void j.VyI.log("ResetBossRewardsComponent: Missing currency ID and/or respin cost for currency respin setup",j.$bb.Error);if(!(this._currencyRespinButton&&this._makePaymentComponent&&this._currencyDisplay&&this._currencyDisplayContainer&&this._notEnoughCurrencyTooltip&&this._notEnoughCurrencyText))return void j.VyI.log("ResetBossRewardsComponent: Missing required components for currency respin setup",j.$bb.Error);Nt.d.updateInjectedValues(this._currencyDisplayContainer,{CURRENCY_DISPLAY_ID:this._currencyId}),this._currencyRespinButton.currency=this._currencyId,this._currencyRespinButton.amount=this._respinCost,this._currencyRespinButton.regenerateButton(),this._makePaymentComponent.currencyId=this._currencyId,this._makePaymentComponent.amount=this._respinCost;const k={sink_type:li.C.PrizeWheel};this._roulette.instanceTypeForSegmentEvent!==fi.N.RiftRun&&this._roulette.instanceTypeForSegmentEvent!==fi.N.BossRift||(this._makePaymentComponent.customData=Object.assign({sink_id:this._segment.rifts.getRiftsRewardSpinUuid(),transaction_id:this._segment.rifts.getRiftsRewardSpinTransactionUuid(),instance_id:this._segment.rifts.riftInstanceUuid,instance_type:this._roulette.instanceTypeForSegmentEvent},k)),this._makePaymentComponent.onFailure.add((()=>{this.handleNotEnoughCurrency(),this.sendPrizeWheelSpinFailedEvent(Zb.WE.NotEnoughCurrency)})),this._currencyDisplay.onCurrencyUpdateComplete.add(this.handleCurrencyUpdateComplete,this),this._currencyDisplayContainer.active=!0}handleNotEnoughCurrency(){const k=this._currentPlayer.player.getMemberTier(),B=this._respinCost-this._currentPlayer.player.getCurrencyAmount(this._currencyId);if(!Tr.h.includes(this._currencyId)||this._currentPlayer.player.isPlayingAtSchool()||xs.kG.includes(k))return this._notEnoughCurrencyText.text=27===this._currencyId?this._localizer.getText("YOU_NEED_MORE_MAGICOIN",B):this._localizer.getText("YOU_NEED_MORE_CURRENCY",B),void(this._notEnoughCurrencyTooltip.active=!0);const U={conversionFunnelName:en.o.FunnelNotEnoughCurrencyRifts,conversionStage:en.o.StageClickRouletteSpinAgain,conversionStaticOrVideo:Fs.R.Static};this._segment.purchase.sendFunnelStart({type:"Click-Roulette-Spin-Again",category:"Rifts",contentId:`${this._currencyId}-${B}`,adType:Fs.R.Static}),tt.q.instance.prodigy.open.membershipInfo(void 0,U)}handleCurrencyUpdateComplete(k){k&&(this._currencyDisplayContainer.active=!1),this._currencyRespinButton.regenerateButton()}sendPrizeWheelSpinFailedEvent(k){this._roulette.instanceTypeForSegmentEvent===fi.N.RiftRun||this._roulette.instanceTypeForSegmentEvent===fi.N.BossRift?this._segment.rifts.sendRiftsPrizeWheelSpinFailedEvent(this._roulette.instanceTypeForSegmentEvent,k):this._segment.economy.sendPrizeWheelSpinFailedEvent(JA.U.LuckyLoot,k)}};(0,G.Cg)([(0,j.MnK)(eC.i),(0,G.Sn)("design:type",eC.i)],iC.prototype,"_roulette",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iC.prototype,"card",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iC.prototype,"respinButtonsContainer",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],iC.prototype,"_respinTextKey",void 0),(0,G.Cg)([(0,j.MnK)(tC.Eo),(0,G.Sn)("design:type",tC.Eo)],iC.prototype,"_currencyRespinButton",void 0),(0,G.Cg)([(0,j.MnK)(Kw.E),(0,G.Sn)("design:type",Kw.E)],iC.prototype,"_makePaymentComponent",void 0),(0,G.Cg)([(0,j.MnK)(Or.n),(0,G.Sn)("design:type",Or.n)],iC.prototype,"_currencyDisplay",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iC.prototype,"_currencyDisplayContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iC.prototype,"_notEnoughCurrencyTooltip",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],iC.prototype,"_notEnoughCurrencyText",void 0),(0,G.Cg)([(0,j.fFd)(j.$Zn.Localization),(0,G.Sn)("design:type",j.dTp)],iC.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],iC.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],iC.prototype,"_segment",void 0),iC=(0,G.Cg)([(0,j.EVk)("ResetBossRewards",W.Y.adventureUi)],iC);let sC=class extends j.uAl{constructor(){super(...arguments),this.maxScale=1.5,this.window=.5,this._rouletteScaling=!1,this._positionOffset=300}create(){super.create(),this.roulette.onStart.add(this.setScalingEnabled,this,0,!0),this.roulette.onComplete.add(this.setScalingEnabled,this,0,!1)}destroy(){this.roulette.onStart.remove(this.setScalingEnabled,this),this.roulette.onComplete.remove(this.setScalingEnabled,this),super.destroy()}update(){if(super.update(),this._rouletteScaling)for(const k of this.roulette.GameObject.children){const B=k.transform;let U=(B.anchoredPivotOffset.x+this._positionOffset)/this.roulette.width-.5;U/=this.window,U+=.5,U=j.cj9.clamp(U,0,1);const F=this.GameObject.findComponent(ZA).itemCardScale,G=this.quadraticYoyoEase(U)*(this.maxScale-F)+F;B.setScale(G,G)}}setScalingEnabled(k){this._rouletteScaling=k}quadraticYoyoEase(k){return k<.5?k*k*4:4*(k*(k-2)+1)}};(0,G.Cg)([(0,j.MnK)(eC.i),(0,G.Sn)("design:type",eC.i)],sC.prototype,"roulette",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],sC.prototype,"maxScale",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],sC.prototype,"window",void 0),sC=(0,G.Cg)([(0,j.EVk)("RouletteScaleAnimator")],sC);let nC=class extends j.uAl{create(){super.create(),this._audio=tt.q.instance.prodigy.audio,this.roulette.onStart.add(this.setTickSFXSignal,this,0,!0),this.roulette.onComplete.add(this.setTickSFXSignal,this,0,!1)}destroy(){this.roulette.onStart.remove(this.setTickSFXSignal,this),this.roulette.onComplete.remove(this.setTickSFXSignal,this),super.destroy()}setTickSFXSignal(k){k?this.roulette.onTick.add(this.playSFX,this):this.roulette.onTick.remove(this.playSFX,this)}playSFX(){this._audio.playSFX(19,"tick")}};(0,G.Cg)([(0,j.MnK)(eC.i),(0,G.Sn)("design:type",eC.i)],nC.prototype,"roulette",void 0),nC=(0,G.Cg)([(0,j.EVk)("RouletteTicker")],nC);var aC=U(24190);let rC=class extends j.y4o{constructor(){super(...arguments),this.onStateAvailable=new j.HN0,this._spinnerPadding=35,this._root=null,this._size=new j.or0}create(){super.create();const k=tt.q.instance.game;this._root=k.add.group(k.stage),this.setRootContainer(this._root),this._size.copyFrom(j.i7d.main.viewportSize);const B=new aC.C(k,0,0,this._size.width,this._size.height,Ve._.Tiled_sprites_json,"load");B.inputEnabled=!0,this._root.addChild(B),this._spinner=this._root.addChild(tt.q.instance.prodigy.create.sprite(0,0,Ve._.General_core_json,"loading")),this._spinner.position.set(this._size.width-.5*this._spinner.width-this._spinnerPadding,this._size.height-.5*this._spinner.height-this._spinnerPadding),this._spinner.anchor.set(.5,.5),k.add.tween(this._spinner,this).to({angle:360},2e3,j.GS3.Linear.None,!0,0,-1)}destroy(){this.onStateAvailable.dispose(),this._root.destroy(),super.destroy()}getDimensions(){return this._size}hide(){this._spinner.visible=!1,tt.q.instance.game.add.tween(this._root,this).to({alpha:0},this._hideFadeTime,j.GS3.Linear.None,!0).onTweenComplete.addOnce((()=>{this.onStateAvailable.dispatch(),this.GameObject.destroy()}))}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rC.prototype,"onStateAvailable",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],rC.prototype,"_spinnerPadding",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],rC.prototype,"_hideFadeTime",void 0),rC=(0,G.Cg)([(0,j.EVk)("LoadingScreen",W.Y.ui)],rC);U(25983);var oC,hC=U(46318);let cC=oC=class extends Za.B{constructor(){super(...arguments),this.onWheelClose=new j.HN0}destroy(){this.onWheelClose.dispose(),super.destroy()}openWheel(k=oC.WONDER_WHEEL_ID){if(k!==oC.TWILIGHT_WHEEL_ID||Qt.J.isNightTime())new hC.Q(tt.q.instance.prodigy.game,this.getRootContainer(),this._loggedInPlayer.player,null,k,-55,(()=>{this.onWheelClose.dispatch()}),!0);else{tt.q.instance.prodigy.open.twilightWheelPopup((()=>{this.onWheelClose.dispatch()})).setParent(this.getRootContainer())}}};cC.WONDER_WHEEL_ID=1,cC.TWILIGHT_WHEEL_ID=2,(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],cC.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cC.prototype,"onWheelClose",void 0),cC=oC=(0,G.Cg)([(0,j.EVk)("PrizeWheel",j.YH6.ui)],cC);var dC,lC=U(31818),uC=U(40579);!function(k){k.HudButtonLabelValue="HudButtonLabelValue",k.HudButtonLabelPillColour="HudButtonLabelPillColour"}(dC||(dC={}));let fC=class extends j.uAl{constructor(){super(...arguments),this.NORMAL_FONT=12,this.LARGE_FONT=16,this.ICON_VERTICAL_OFFSET=22,this.ICON_SECONDARY_VERTICAL_OFFSET=17,this.DEFAULT_LABEL_PILL_COLOUR="#db1e75",this._type=Uv.ts.Backpack,this._style=Uv.yR.Standard,this.onExclusiveAttentionChanged=new j.HN0,this.onNotificationBadgeUpdated=new j.HN0,this._currentWidget=null,this._enabled=!0}create(){var k;super.create(),null!==(k=this.rootGameObject)&&void 0!==k||(this.rootGameObject=this.gameObject),this._broadcaster=tt.q.instance.game.broadcaster,this._labelText=this.label.findComponentInChildren(j.EYj),this._labelTimerText=this.label.findComponentInChildren(mr.U),this._broadcaster.addAppListener(jn.Y1.HUDRevampStartOperation,this.onHudOperationStarted.bind(this),this,void 0,!0),this._broadcaster.addAppListener(jn.Y1.HUDRevampEndOperation,this.onHudOperationEnded.bind(this),this,void 0,!0),this._broadcaster.addAppListener(jn.Y1.HUDRevampButtonDataUpdated,this.onNotificationDataUpdated,this),this._broadcaster.addAppListener(jn.Y1.HUDRevampButtonVisibilityRefreshRequested,this.onVisibilityRefreshRequested,this),this._broadcaster.addAppListener(jn.n8.MenuOpened,this.destroyWidget,this),this._broadcaster.addAppListener(jn.n8.FactoryMenuOpened,this.destroyWidget,this),this._broadcaster.addAppListener(jn.Y1.HUDAttentionManagerUpdated,this.processButtonAttention,this),this._hudAttentionManagerHandler=j.wa5.getActiveScene().container.get("HudAttentionHandler")}postCreate(){this.updateButton().catch(j.RQr.createHandler("HudButtonComponent: Failed to update button on postCreate"))}destroy(){j.Aq$.isDefined(this._broadcaster)&&(this._broadcaster.removeAppListener(jn.Y1.HUDRevampStartOperation,this),this._broadcaster.removeAppListener(jn.Y1.HUDRevampEndOperation,this),this._broadcaster.removeAppListener(jn.Y1.HUDRevampButtonDataUpdated,this),this._broadcaster.removeAppListener(jn.Y1.HUDRevampButtonVisibilityRefreshRequested,this),this._broadcaster.removeAppListener(jn.Y1.HUDAttentionManagerUpdated,this),this._broadcaster.removeAppListener(jn.n8.MenuOpened,this),this._broadcaster.removeAppListener(jn.n8.FactoryMenuOpened,this)),this.onNotificationBadgeUpdated.dispose(),this.onExclusiveAttentionChanged.dispose(),this.destroyWidget(),super.destroy()}onHudOperationStarted(){this.button.inputEnabled=!1}onHudOperationEnded(){this.button.inputEnabled=!0}onVisibilityRefreshRequested(){this.updateVisibility().catch(j.RQr.createHandler("HudButtonComponent: Failed to update appearance on visibility refresh"))}onNotificationDataUpdated(k){if(k!==this._type)return;const B=this._hudService.getCachedButtonData(this._type);this.updateNotificationBadge(B.notificationData),this.updateLabel(B.labelData),this.updateAlternateLabel(B.alternateLabel),this.onExclusiveAttentionChanged.dispatch(B.demandsExclusiveAttention)}setTypeSilently(k){this._type!==k&&(this._type=k)}getType(){return this._type}setStyleSilently(k){this._style!==k&&(this._style=k)}getStyle(){return this._style}updateButton(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;if(!this._type)return;const U=zv.BUTTON_DATA[this._type];if(this.rootGameObject.active=!1,this.button.onClick.removeAll(this),!j.Aq$.isDefined(U))return;const F=U.iconProvider(this._style),[$,[H,V]]=yield Promise.all([tt.q.instance.prodigy.load.assetsAsPromise(F),zv.getButtonEnabledConditionsResult(this._type)]);if(this._enabled=H,zv.BUTTON_DATA[this._type]!==U)return;this.icon.updateAsset(F),this.icon.sizeToSourceImage();const{buttonName:W,interfaceName:q,destinationName:K,saveClickInfo:z}=U.analyticsProperties;if(this.segmentProperties.buttonName=W,this.segmentProperties.interfaceName="function"==typeof q?q():null!==(k=null!=q?q:U.analyticsProperties.buttonName)&&void 0!==k?k:"",this.segmentProperties.destinationName="function"==typeof K?K():null!=K?K:"",this.segmentProperties.saveClickInfo="function"==typeof z?z():null!=z?z:"",this.button.onClick.add((()=>this.segment.sendButtonEvent()),this),(j.Aq$.isDefined(U.onClick)||j.Aq$.isDefined(this._injectedClickEvent))&&this.button.onEnabledClick.add((()=>(0,G.sH)(this,void 0,void 0,(function*(){yield this.handleButtonClick()}))),this),j.Aq$.isDefined(this._injectedClickEvent)&&this.button.onEnabledClick.add(this._injectedClickEvent,this),this.button.onClick.add(this.disableAttentionAnimation,this),this._enabled)this.lockedLabel.active=!1,this.button.onDisabledClick.removeAll(this),this.button.inputEnabled=0!==this.button.onClick.getBindingsCount();else{this.button.lockState(Ku.K.Disabled);const k=zv.getDisabledTooltipText(this._type,V),U=zv.getDisabledButtonLabelText(this._type,V);this.button.onDisabledClick.add((()=>{on.A.displayTooltipTargeted(this._reusableStandardTooltip,this._hudGameObject,{bodyText:k,arrowDirection:zv.getButtonTooltipDirection(this._style)},this.icon.GameObject)}),this),null===(B=this.gameObject.findComponentInChildren(rd))||void 0===B||B.applyFilter(),this.lockedLabel.findComponentInChildren(j.EYj).text=U,this.button.inputEnabled=!0,this.lockedLabel.active=!0}switch(this.resizeButtonToData(U),this.onNotificationDataUpdated(this._type),Nt.d.updateInjectedValues(this.gameObject,{[Uv.Kr.HudButtonEnabled]:this._enabled}),this.nameLabel.findComponent(j.EYj).text=this._localizer.getText(this._type.replace(" ","_").toUpperCase()),this.nameLabel.active=this._style===Uv.yR.PlayerHub,this._style){case Uv.yR.Liveops:break;case Uv.yR.Secondary:this.icon.tint=12747129,this.icon.GameObject.transform.setPositionY(this.ICON_SECONDARY_VERTICAL_OFFSET);break;default:this.icon.GameObject.transform.setPositionY(this.ICON_VERTICAL_OFFSET)}yield this.updateVisibility()}))}resizeButtonToData(k){var B;if(this._style===Uv.yR.Liveops)return;const U=null!==(B=k.buttonSize)&&void 0!==B?B:Uv.Cy.Normal;this.gameObject.findComponent(j.XVE).setSizeDelta(U,U)}setInjectedClickEvent(k){this._injectedClickEvent=k}updateVisibility(){return(0,G.sH)(this,void 0,void 0,(function*(){this.rootGameObject.active=yield zv.areVisibilityConditionsTrue(this._type)}))}handleButtonClick(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=zv.BUTTON_DATA[this._type];tt.q.instance.game.broadcaster.broadcast(jn.Y1.HUDRevampStartOperation);const{hudButton:U,needsAttention:F}=yield this.checkIfCurrentHudButtonNeedsAttention();try{if((F||j.Aq$.isDefined(this._currentWidget))&&j.Aq$.isDefined(U)){if(yield U.triggerAction((()=>(0,G.sH)(this,void 0,void 0,(function*(){var k;yield null===(k=B.onClick)||void 0===k?void 0:k.call(B)})))),F){const k=this._hudAttentionManagerHandler.currentHudButton;k&&this._type===(null==k?void 0:k.hudButtonType())&&tt.q.instance.game.broadcaster.broadcast(jn.Y1.CheckForHUDAttention)}}else yield null===(k=B.onClick)||void 0===k?void 0:k.call(B)}catch($){j.RQr.createHandler("HudButtonComponent: Error during HUD button callback")($)}finally{tt.q.instance.game.broadcaster.broadcast(jn.Y1.HUDRevampEndOperation)}}))}checkIfCurrentHudButtonNeedsAttention(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;if(!j.Aq$.isDefined(this._hudAttentionManagerHandler))return{hudButton:null,needsAttention:!1};const B=this._hudAttentionManagerHandler.currentHudButton;if(j.Aq$.isDefined(B)&&this._type===B.hudButtonType())return{hudButton:B,needsAttention:yield B.needsAttention()};const U=null!==(k=this._hudAttentionManagerHandler.hudButtons)&&void 0!==k?k:[];for(const F of U)if(this._type===F.hudButtonType())return{hudButton:F,needsAttention:yield F.needsAttention()};return{hudButton:null,needsAttention:!1}}))}defaultHandleButtonClick(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;yield Promise.all([null===(B=k.onClick)||void 0===B?void 0:B.call(k)]).catch(j.RQr.createHandler("Error during HUD button callback"))}))}disableAttentionAnimation(){Nt.d.updateInjectedValues(this.gameObject,{[Uv.Kr.HudAttentionRequested]:!1})}processButtonAttention(k,B,U){var F;if(k===this._type){if(this.rootGameObject.active=!0,j.Aq$.isDefined(U)){j.Aq$.isDefined(this._currentWidget)&&this.destroyWidget();const k=tt.q.instance.prodigy.gameContainer.get("d0e-64fd");Nt.d.loadWithInjectedValuesAndDependenciesFromGUID(k,U.prefab,null!==(F=U.injectionData)&&void 0!==F?F:{},this.widgetParent).then((k=>{this._currentWidget=k})).catch(j.RQr.createHandler("Error creating a HUD widget"))}Nt.d.updateInjectedValues(this.gameObject,{[Uv.Kr.HudAttentionRequested]:B})}}updateLabel(k){var B,U;if(!this._enabled)return void(this.label.active=!1);const F=(null!==(B=zv.BUTTON_DATA[this._type].buttonSize)&&void 0!==B?B:Uv.Cy.Normal)===Uv.Cy.ExtraLarge?this.LARGE_FONT:this.NORMAL_FONT;this._labelText.fontSize=F;const G=null==k?void 0:k.labelValue;if(j.Aq$.isDefined(G)&&("string"==typeof G||G>0)){const k=this.animatedLabelToggle(G);this.label.active=!k,this.animatedCollectButton.active=k,"string"==typeof G?(this._labelText.text=G,this._labelTimerText.stopTimer()):this._labelTimerText.setCountdownTimeMS(G)}else this.label.active=!1;Nt.d.updateInjectedValues(this.gameObject,{[dC.HudButtonLabelValue]:null==k?void 0:k.labelValue,[dC.HudButtonLabelPillColour]:null!==(U=null==k?void 0:k.pillColour)&&void 0!==U?U:this.DEFAULT_LABEL_PILL_COLOUR})}animatedLabelToggle(k){return this._style===Uv.yR.Liveops&&"string"==typeof k}updateAlternateLabel(k){const B=j.Aq$.isDefined(k)&&("string"==typeof k||k>0);if(this.alternateLabel.active=B,B){this.alternateLabel.findComponentInChildren(j.EYj).text=String(k)}}updateNotificationBadge(k){var B;this.notificationBadge.GameObject.active=!1,this._enabled&&(j.Aq$.isDefined(k)&&("string"==typeof k?""===k?this.notificationBadge.updateEmptyNotificationBadge(!0):this.notificationBadge.updateNonNumberedNotificationBadge(!0):k>0&&this.notificationBadge.updateNumberedNotificationBadge(!0,k)),null===(B=this.onNotificationBadgeUpdated)||void 0===B||B.dispatch())}hasActiveNotificationBadge(){return this.notificationBadge.GameObject.active}destroyWidget(){j.Aq$.isDefined(this._currentWidget)&&!this._currentWidget.isDestroyed&&this._currentWidget.destroy(),this._currentWidget=null}};(0,G.Cg)([(0,j.gfw)(Uv.ts),(0,G.Sn)("design:type",String)],fC.prototype,"_type",void 0),(0,G.Cg)([(0,j.gfw)(Uv.yR),(0,G.Sn)("design:type",Number)],fC.prototype,"_style",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],fC.prototype,"icon",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],fC.prototype,"button",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fC.prototype,"label",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fC.prototype,"animatedCollectButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fC.prototype,"alternateLabel",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fC.prototype,"nameLabel",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fC.prototype,"lockedLabel",void 0),(0,G.Cg)([(0,j.MnK)(fg.e),(0,G.Sn)("design:type",fg.e)],fC.prototype,"notificationBadge",void 0),(0,G.Cg)([(0,j.MnK)(kf),(0,G.Sn)("design:type",kf)],fC.prototype,"segment",void 0),(0,G.Cg)([(0,j.MnK)(Xs),(0,G.Sn)("design:type",Xs)],fC.prototype,"segmentProperties",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fC.prototype,"widgetParent",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fC.prototype,"tooltipTarget",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],fC.prototype,"onExclusiveAttentionChanged",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],fC.prototype,"rootGameObject",void 0),(0,G.Cg)([(0,j.Cdj)(Uv.uR.HudGameObject),(0,G.Sn)("design:type",j._mx)],fC.prototype,"_hudGameObject",void 0),(0,G.Cg)([(0,j.Cdj)(Uv.uR.HudRevampReusableStandardTooltip),(0,G.Sn)("design:type",lC.tX)],fC.prototype,"_reusableStandardTooltip",void 0),(0,G.Cg)([(0,Gi.b)("cc9-a3f0"),(0,G.Sn)("design:type",uC.W)],fC.prototype,"_hudService",void 0),(0,G.Cg)([(0,Gi.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],fC.prototype,"_localizer",void 0),fC=(0,G.Cg)([(0,j.EVk)("HudButton")],fC);var bC=U(15819),pC=U(28344);const vC=["PLAYER_INFO_WIDGET","PET_ZONE_WIDGET","ARCHIVES_WIDGET","MORPH_MARBLE_WIDGET"];let gC=class extends j.uAl{constructor(){super(...arguments),this._activeWidgets=new Set}create(){super.create(),this._widgetMap={PET_ZONE_WIDGET:this._petZoneWidget,MORPH_MARBLE_WIDGET:this._morphMarbleWidget,PLAYER_INFO_WIDGET:this._playerInfoWidget,ARCHIVES_WIDGET:this._archivesWidget};const k=tt.q.instance.prodigy.world,B=k.getCurrentZone(),U=k.getCurrentMapTag(),F=k.getCurrentMapObject(),G=(0,Bt.G)(pC.y).enabled;if(this.setPetZoneWidget(!G&&Qt.J.isCoreZone(B)&&"Titan"!==U),B===Ft.A_.ARCHIVES&&F instanceof bC.M){const k=F.hudCounterContainer;j.lx6.make(this._widgetMap.ARCHIVES_WIDGET,k),this.setArchivesWidget(!0)}this.setPlayerInfoWidget(!0)}setPetZoneWidget(k){k&&tt.q.instance.prodigy.world.getCurrentZoneObject().setUpPetsInZoneButton(this._petZoneWidget),this.updateWidget("PET_ZONE_WIDGET",k)}setMorphMarbleWidget(k){this.updateWidget("MORPH_MARBLE_WIDGET",k)}setPlayerInfoWidget(k){(0,Bt.G)(pm.q).enabled?this.updateWidget("PLAYER_INFO_WIDGET",k):this.updateWidget("PLAYER_INFO_WIDGET",!1)}setArchivesWidget(k){this.updateWidget("ARCHIVES_WIDGET",k)}updateWidget(k,B){B?this._activeWidgets.add(k):this._activeWidgets.delete(k);let U=0;for(const F of vC){if(!j.Aq$.isDefined(this._widgetMap[F]))continue;let k=this._activeWidgets.has(F);U>=2&&(k=!1),this._widgetMap[F].active=k,k&&U++}}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gC.prototype,"_petZoneWidget",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gC.prototype,"_morphMarbleWidget",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gC.prototype,"_playerInfoWidget",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gC.prototype,"_archivesWidget",void 0),gC=(0,G.Cg)([(0,j.EVk)("HudContextManager",W.Y.uiHudManager)],gC);var mC=U(78407);let yC=class extends j.uAl{constructor(){super(...arguments),this.maxButtons=5,this._onLiveOpsHudButtonsLoaded=new j.HN0}create(){this.instantiateButtons().catch(j.RQr.createHandler("HUD: Error creating liveops buttons"))}instantiateButtons(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield this._hudDataProvider.getHudData(),B=(yield Promise.all(k.liveopsButtonData.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return(yield zv.areVisibilityConditionsTrue(k.type))?k:void 0})))))).filter(Boolean),U=[],F=Math.min(B.length,this.maxButtons);for(let G=0;G(0,G.sH)(this,void 0,void 0,(function*(){return(yield zv.areVisibilityConditionsTrue(k))?k:void 0})))))).filter(Boolean),F=[];for(const G of U)F.push({HUD_REVAMP_BUTTON_TYPE:G,HUD_REVAMP_BUTTON_STYLE:Uv.yR.PlayerHub,HUD_REVAMP_BUTTON_CLICK_EVENT:()=>this.hideMenu()});yield this._prefabSpawner.spawnDefaultPrefabsFromDataArray(F),this._spawnedHudButtons=this._prefabSpawner.spawnedPrefabs.map((k=>k.findComponent(fC)));for(const G of this._spawnedHudButtons)G.onNotificationBadgeUpdated.add((()=>this.onChildNotificationBadgeUpdate()));this.onChildNotificationBadgeUpdate()}))}openMenu(){this._segment.featureCommon.sendInterfaceEvent({interfaceName:"hamburger_menu",interfaceType:ui.Wm.Window,originType:ui.$N.ButtonClick}),this._hudMenu.active=!0}hideMenu(){this._hudMenu.active=!1}onChildNotificationBadgeUpdate(){let k=!1;for(const B of this._spawnedHudButtons)if(B.hasActiveNotificationBadge()){k=!0;break}this._hamburgerButton.updateNotificationBadge(k?"":void 0)}};(0,G.Cg)([(0,Gi.b)("446-72a7"),(0,G.Sn)("design:type",mC._)],_C.prototype,"_hudDataProvider",void 0),(0,G.Cg)([(0,Gi.b)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],_C.prototype,"_segment",void 0),(0,G.Cg)([(0,j.MnK)(Ru.h),(0,G.Sn)("design:type",Ru.h)],_C.prototype,"_prefabSpawner",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],_C.prototype,"_hudMenu",void 0),(0,G.Cg)([(0,j.MnK)(fC),(0,G.Sn)("design:type",fC)],_C.prototype,"_hamburgerButton",void 0),_C=(0,G.Cg)([(0,j.EVk)("HudSecondaryMenu")],_C);let EC=class extends j.uAl{create(){super.create(),this.updateText()}setItem(k,B){this._itemType=k,this._itemID=B,this.updateText()}updateText(){var k;if(!this._text||!this._itemID||!this._itemType)return;(null===(k=Yt.t.getItem(this._itemType,this._itemID))||void 0===k?void 0:k.data)||j.VyI.log(`Invalid or missing item data found for itemID ${this._itemID} of type ${this._itemType}`,j.$bb.Warning),this._text.text=(0,ms.k)(`${this._itemType}_${this._itemID}_FLAVORTEXT`.toUpperCase())}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],EC.prototype,"_text",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],EC.prototype,"_itemType",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],EC.prototype,"_itemID",void 0),EC=(0,G.Cg)([(0,j.EVk)("ItemFlavorText",W.Y.ui)],EC);U(57324),U(98762);var wC,TC=U(6719);let SC=wC=class extends j.uAl{constructor(){super(...arguments),this._gridAssetsData=[],this._fillGridWithEmptyCells=!0,this._onGridAssetsAdded=new j.HN0,this._waitForAllLoadedToActivate=!1}addGridAssets(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){var F,G;this._gridAssetsData=k,this._maxAssetsToShow=null!==(F=null!=U?U:this._maxAssetsToShow)&&void 0!==F?F:k.length;const j=this._gridAssetsData.slice(0,this._maxAssetsToShow),$=[];for(let k=0;k0,"Items per page must be greater than 0"),this._itemsPerPage=k,this.updateChangePageComponent()}setData(k){(0,ut.v)(!!k,"Data must be a valid array"),this._data=k,this.updateChangePageComponent()}getCurrentPageItems(){return this._currentPage}updateChangePageComponent(){this._changePageButtons.setMaximumPage(Math.max(1,Math.ceil(this._data.length/this._itemsPerPage))),this.updateCurrentPageItems()}updateCurrentPageItems(){const k=this._itemsPerPage*(this._changePageButtons.currentPage-1);this._currentPage=this._data.slice(k,k+this._itemsPerPage),this._onPageItemsChanged.dispatch()}}let OC=class extends j.uAl{constructor(){super(...arguments),this._gridElements=[]}create(){var k;super.create(),0!==this._gridElements.length||(null===(k=this._gridLayout)||void 0===k?void 0:k.isEmpty())||this._gridLayout.GameObject.children.forEach((k=>this._gridElements.push(k))),this._changePageButtons&&this._gridElements.length>0&&(this._dataPaginator=new CC(this._changePageButtons,this._gridViewData,this._gridElements.length),this._dataPaginator.onPageItemsChanged.add(this.updateGridElements,this))}destroy(){var k;null===(k=this._dataPaginator)||void 0===k||k.destroy(),super.destroy()}updateGridElements(){if(this._dataPaginator){const k=this._gridElements.length,B=this._dataPaginator.getCurrentPageItems(),U=B.length;for(let F=0;Fthis.validateComponent(k.component,k.name)))}validateComponent(k,B){k||j.VyI.log(`ClassCodeSection: ${B} is required but not defined`,j.$bb.Error)}destroy(){var k,B,U,F,G;this._onClassCodeSuccess.dispose(),this._onClassCodeTextChanged.dispose(),null===(k=this.saveScrollViewButton)||void 0===k||k.onClick.removeAll(this),null===(B=this.changeScrollViewButton)||void 0===B||B.onClick.removeAll(this),null===(U=this.editSaveScrollViewButton)||void 0===U||U.onClick.removeAll(this),null===(F=this.editCancelScrollViewButton)||void 0===F||F.onClick.removeAll(this),null===(G=this.learnMoreScrollViewButton)||void 0===G||G.onClick.removeAll(this),super.destroy()}setInputVisibility(k){document.getElementById("external-ui").style.setProperty("display",k?"unset":"none")}setUpClassCodeInput(){this._classCodeInput.enablePerKeyEvents(!0),this._classCodeInput.onTextChanged.add(this.classCodeTextChanged,this),this._classCodeInput.onClear.add(this.classCodeTextChanged,this)}setUpButtons(){switch(this._operationMode){case RC.ScrollView:this.changeScrollViewButton.onClick.add(this.onChangeClicked,this),this.editCancelScrollViewButton.onClick.add(this.onEditCancelClicked,this),this.learnMoreScrollViewButton.onClick.add(this.onLearnMoreClicked,this);break;case RC.Simple:this.simpleModeLearnMoreButton.onEnabledClick.add(this.onLearnMoreClicked.bind(this))}this.disableSaveButtons()}classCodeTextChanged(){const k=this.classCodeInput.text,B=xv.b.reformatClassCode(k);B!==k&&(this.classCodeInput.text=B),this._onClassCodeTextChanged.dispatch(B)}setClassCode(k){k?tt.q.instance.prodigy.education.loadAndInitEducationData().then((()=>{this.validStatusContainer.active=!1,this._operationMode!==RC.Simple&&this.changeClassCodeButtonView(),on.A.displayToolTipAuto(null,null,{bodyText:tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("CLASS_CODE_SAVED"),xPosition:635,yPosition:100})})).then((()=>(0,G.sH)(this,void 0,void 0,(function*(){return Ad.d.sendAttachClassCodeQuestEvent()})))).then((()=>{this._onClassCodeSuccess.dispatch()})).catch((()=>{this.failedValidationView(),this.enableSaveButtons()})):this.failedValidationView()}onChangeClicked(){tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.editClassCodeButtonView()}onEditCancelClicked(){tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.changeClassCodeButtonView()}onLearnMoreClicked(){tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!1),tt.q.instance.prodigy.open.learnMore("HEY_TEACHERS","CLASS_CODE_LEARN_MORE_HEADER","CLASS_CODE_LEARN_MORE_BODY",(()=>{this.setInputVisibility(!0)}),void 0,this.GameObject.layer!==jh.E.Default?this.GameObject.layer:void 0)}enableSaveButtons(){switch(this._operationMode){case RC.ScrollView:this.saveScrollViewButton.inputEnabled=!0,this.editSaveScrollViewButton.inputEnabled=!0,this.saveScrollViewButton.currentState=Ku.K.Up,this.editSaveScrollViewButton.currentState=Ku.K.Up;break;case RC.Simple:this.simpleModeSaveButton.unlockState()}}disableSaveButtons(){switch(this._operationMode){case RC.ScrollView:this.saveScrollViewButton.inputEnabled=!1,this.editSaveScrollViewButton.inputEnabled=!1,this.saveScrollViewButton.currentState=Ku.K.Disabled,this.editSaveScrollViewButton.currentState=Ku.K.Disabled;break;case RC.Simple:this.simpleModeSaveButton.lockState(Ku.K.Disabled)}}successfulValidationView(){this.enableSaveButtons(),this.classCodeInput.setInError(!1),this.validStatusContainer.active=!0,this.invalidStatusContainer.active=!1,this.duplicateClassStatusContainer&&(this.duplicateClassStatusContainer.active=!1),this.classCodeInput.setInError(!1)}failedValidationView(){this.disableSaveButtons(),this.classCodeInput.setInError(!0),this.validStatusContainer.active=!1,this.invalidStatusContainer.active=!0,this.duplicateClassStatusContainer&&(this.duplicateClassStatusContainer.active=!1)}neutralValidationView(){this.disableSaveButtons(),this.classCodeInput.setInError(!1),this.validStatusContainer.active=!1,this.invalidStatusContainer.active=!1,this.duplicateClassStatusContainer&&(this.duplicateClassStatusContainer.active=!1)}duplicateClassValidationView(){this.disableSaveButtons(),this.classCodeInput.setInError(!0),this.validStatusContainer.active=!1,this.invalidStatusContainer.active=!1,this.duplicateClassStatusContainer&&(this.duplicateClassStatusContainer.active=!0)}standardButtonView(){switch(this._operationMode){case RC.ScrollView:this.saveScrollViewButton.GameObject.active=!0,this.changeScrollViewButton.GameObject.active=!1,this.editClassCodeContainer.active=!1,this.inClassStatusContainer.active=!1;break;case RC.Simple:this.simpleModeSaveButton.GameObject.active=!0}this.classCodeInput.setVisible(this.GameObject.activeInHierarchy),this.classCodeInput._input.blur(),this.classCodeInput.text="",this.classCodeInput.setInError(!1),this.classCodeText.GameObject.active=!0,this.initialText.GameObject.active=!0}changeClassCodeButtonView(){this.saveScrollViewButton.GameObject.active=!1,this.changeScrollViewButton.GameObject.active=!0,this.editClassCodeContainer.active=!1,this.classCodeInput.setVisible(!1),this.classCodeInput._input.blur(),this.invalidStatusContainer.active=!1,this.duplicateClassStatusContainer&&(this.duplicateClassStatusContainer.active=!1),this.validStatusContainer.active=!1,this.inClassStatusContainer.active=!0,this.classCodeText.GameObject.active=!1,this.initialText.GameObject.active=!1}editClassCodeButtonView(){this.classCodeInput.setDisabled(!1),this.saveScrollViewButton.GameObject.active=!1,this.changeScrollViewButton.GameObject.active=!1,this.editClassCodeContainer.active=!0,this.classCodeInput.setVisible(!0),this.classCodeInput._input.focus(),this.classCodeInput.text="",this.classCodeInput.setInError(!1),this.inClassStatusContainer.active=!1,this.classCodeText.GameObject.active=!0,this.initialText.GameObject.active=!0}};MC.DEBOUNCE_MS=500,(0,G.Cg)([(0,j.gfw)(RC),(0,G.Sn)("design:type",Number)],MC.prototype,"_operationMode",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],MC.prototype,"_changeScrollViewButton",void 0),(0,G.Cg)([(0,j.MnK)(kt.S),(0,G.Sn)("design:type",kt.S)],MC.prototype,"_classCodeInput",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],MC.prototype,"_classCodeText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],MC.prototype,"_editClassCodeContainer",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],MC.prototype,"_editCancelScrollViewButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],MC.prototype,"_editSaveScrollViewButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],MC.prototype,"_inClassStatusContainer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],MC.prototype,"_initialText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],MC.prototype,"_invalidStatusContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],MC.prototype,"_duplicateClassStatusContainer",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],MC.prototype,"_learnMoreScrollViewButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],MC.prototype,"simpleModeLearnMoreButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],MC.prototype,"_saveScrollViewButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],MC.prototype,"simpleModeSaveButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],MC.prototype,"_validStatusContainer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],MC.prototype,"_onClassCodeSuccess",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],MC.prototype,"_onClassCodeTextChanged",void 0),(0,G.Cg)([(0,PC.sg)(MC.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],MC.prototype,"onChangeClicked",null),(0,G.Cg)([(0,PC.sg)(MC.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],MC.prototype,"onEditCancelClicked",null),(0,G.Cg)([(0,PC.sg)(MC.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],MC.prototype,"onLearnMoreClicked",null),MC=(0,G.Cg)([(0,j.EVk)("ClassCodeOptionsSection")],MC);let NC=class extends j.uAl{constructor(){super(...arguments),this.localization=null,this._autoClick={}}create(){super.create(),this.localization=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),this.setUpButtons()}setUpButtons(){this._linkButton.onClick.add(this.onLinkParentAccountClicked.bind(this))}setInputVisibility(k){document.getElementById("external-ui").style.setProperty("display",k?"unset":"none")}onLinkParentAccountClicked(){tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!1);tt.q.instance.prodigy.open.parentAttachMenu((()=>{this.setInputVisibility(!0)})).onPrefabLoaded.addOnce((k=>k.setLayer(jh.E.Result,!0)))}};var xC;NC.DEBOUNCE_MS=500,(0,G.Cg)([(0,j.MnK)(j.Sjx),(0,G.Sn)("design:type",j.Sjx)],NC.prototype,"_linkButton",void 0),(0,G.Cg)([(0,PC.sg)(NC.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],NC.prototype,"onLinkParentAccountClicked",null),NC=(0,G.Cg)([(0,j.EVk)("CompletedParentSection")],NC);let LC=xC=class extends j.uAl{constructor(){super(...arguments),this._serverIcons=[]}setServerData(k){this.setupServerFill(k.full),k.meta&&this.setupServerImage(k.meta)}setupServerFill(k){let B=xC.NORMAL_TINT;k>=xC.WARNING_MAX?B=xC.DANGER_TINT:k>xC.NORMAL_MAX&&(B=xC.WARNING_TINT);const U=100/this._serverIcons.length;for(let F=0;F0&&k>=F*U;G.active=$,$&&(G.findComponent(j.vYh).getRootContainer().tint=B)}}setupServerImage(k){var B;let U;if(null===(B=this._sprite)||void 0===B||B.destroy(),j.Aq$.isDefined(k.ID)&&"pet"===k.type){const B=Yt.t.getItem("pet",k.ID);("spine"===ct.get(B,"metadata.assets.default.type",null)||ct.get(B,"metadata.assets.spine",!1))&&(U={x:-.06,y:.05})}this._sprite=tt.q.instance.prodigy.icon.createFromData(k,0,0,U,(k=>{this._serverImage.setTexture(k.texture)})),this._serverImage.setTexture(this._sprite.texture)}destroy(){var k;null===(k=this._sprite)||void 0===k||k.destroy(),super.destroy()}};LC.NORMAL_MAX=80,LC.WARNING_MAX=95,LC.NORMAL_TINT=8111468,LC.WARNING_TINT=15194464,LC.DANGER_TINT=14307665,(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],LC.prototype,"_serverIcons",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],LC.prototype,"_serverImage",void 0),LC=xC=(0,G.Cg)([(0,j.EVk)("WorldInfoCard")],LC);let kC=class extends j.uAl{create(){super.create();const k=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this._worldInfoText.text=k.getText("WORLD_INFO_PLAY_TOGETHER"),this._serverNameLabel.text=k.getText("WORLD_INFO_YOU_ARE_IN"),this._worldInfoTitle.text=k.getText("WORLD_INFO_TITLE"),this._offlineText1.text=k.getText("WORLD_OFFLINE_TEXT_1"),this._offlineText2.text=k.getText("WORLD_OFFLINE_TEXT_2"),this._offlineView.active=!1,this._onlineView.active=!1}setServerData(k){k.full=Math.max(1,k.full);const B=j.Aq$.isDefined(k);B&&(this._serverNameText.text=k.name,this._infoCard.setServerData(k)),this._onlineView.active=B,this._offlineView.active=!B}destroy(){super.destroy()}};(0,G.Cg)([(0,j.MnK)(LC),(0,G.Sn)("design:type",LC)],kC.prototype,"_infoCard",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],kC.prototype,"_worldInfoTitle",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],kC.prototype,"_serverNameText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],kC.prototype,"_worldInfoText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],kC.prototype,"_serverNameLabel",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],kC.prototype,"_offlineText1",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],kC.prototype,"_offlineText2",void 0),(0,G.Cg)([(0,j.ERr)(),(0,j.Lr6)(0),(0,G.Sn)("design:type",j._mx)],kC.prototype,"_offlineView",void 0),(0,G.Cg)([(0,j.ERr)(),(0,j.Lr6)(0),(0,G.Sn)("design:type",j._mx)],kC.prototype,"_onlineView",void 0),kC=(0,G.Cg)([(0,j.EVk)("WorldInfo")],kC);let BC=class extends j.uAl{postCreate(){var k,B,U;super.postCreate();const F=null===(B=null===(k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0"))||void 0===k?void 0:k.player)||void 0===B?void 0:B.world;F&&(null===(U=this.worldInfoSelection)||void 0===U||U.setServerData(F))}};(0,G.Cg)([(0,j.MnK)(kC),(0,G.Sn)("design:type",kC)],BC.prototype,"worldInfoSelection",void 0),BC=(0,G.Cg)([(0,mn.injectable)(),(0,j.EVk)("CurrentWorld")],BC);var UC=U(99429),FC=U(2272);let GC=class extends j.uAl{constructor(){super(...arguments),this._linkParentScrollViewButton=null,this._noRewardsScrollViewButton=null,this.localization=null}get linkParentScrollViewButton(){return this._linkParentScrollViewButton}get noRewardsScrollViewButton(){return this._noRewardsScrollViewButton}create(){super.create(),this.localization=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),this.setUpButtons()}destroy(){super.destroy(),this.linkParentScrollViewButton.onClick.removeAll(this),this.noRewardsScrollViewButton.onClick.removeAll(this)}setUpButtons(){this.linkParentScrollViewButton.onClick.add(this.onLinkParentAccountClicked,this),this.noRewardsScrollViewButton.onClick.add(this.onNoRewardClicked,this)}setInputVisibility(k){document.getElementById("external-ui").style.setProperty("display",k?"unset":"none")}linkParent(k){const B=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=Qt.J.getEnvironmentURL(),F=()=>{tt.q.instance.prodigy.gameContainer.get("c97-bd0d").logout()},G=()=>{this.setInputVisibility(!0)};B.isPlayingAtSchool()?tt.q.instance.prodigy.open.parentalLoginPopup():tt.q.instance.prodigy.open.confirmationDialog(new KE.k(this.localization.getText("PARENTAL_POPUP_LOGIN"),F,this.localization.getText("BUTTON_STAY_TEAM"),G,{atlas:Ve._.Ui_store_json,name:"icon-large-exclamation"},FC.E.Small,UC.K.CONFIRM_WIDTH,this.localization.getText("LINK_PARENT_NO_REWARDS"),this.localization.getText("PARENT_LINK_POST_CLICK"))),vp.I.openWebsite(`${U}/#start-now?usertype=parent&utm_source=student-referral&utm_medium=register-prompt`)}onLinkParentAccountClicked(){tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!1);tt.q.instance.prodigy.open.parentAttachMenu((()=>{this.setInputVisibility(!0)}),Is.k.LinkParent).onPrefabLoaded.addOnce((k=>k.setLayer(jh.E.Result,!0)))}onNoRewardClicked(){tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!1);tt.q.instance.prodigy.open.confirmationDialog(new KE.k(this.localization.getText("PARENTAL_POPUP_LOGIN"),(()=>{tt.q.instance.prodigy.gameContainer.get("c97-bd0d").logout()}),this.localization.getText("BUTTON_STAY_TEAM"),(()=>{this.setInputVisibility(!0)}),{atlas:Ve._.Ui_store_json,name:"icon-large-exclamation"},FC.E.Small,UC.K.CONFIRM_WIDTH,this.localization.getText("LINK_PARENT_NO_REWARDS"),this.localization.getText("PARENT_LINK_POST_CLICK")))}};GC.DEBOUNCE_MS=500,(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],GC.prototype,"_linkParentScrollViewButton",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],GC.prototype,"_noRewardsScrollViewButton",void 0),(0,G.Cg)([(0,PC.sg)(GC.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],GC.prototype,"onLinkParentAccountClicked",null),(0,G.Cg)([(0,PC.sg)(GC.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],GC.prototype,"onNoRewardClicked",null),GC=(0,G.Cg)([(0,j.EVk)("ParentSection")],GC);let jC=class extends j.uAl{constructor(){super(...arguments),this.fullscreenTitle=null,this.fullscreenToggle=null}create(){super.create(),this._canGoFullscreen=!j.o5U.isMobile()&&Gs.pF.isFullscreenSupported(),this.setUpButtons();const k=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this.fullscreenTitle.text=k.getText("SCREEN_SIZE_TITLE"),this.fullscreenToggle.setText(k.getText("FULLSCREEN_LABEL"))}setUpButtons(){this._canGoFullscreen&&this.fullscreenToggle.onClick.add(this.onFullscreenToggleClicked,this)}onFullscreenToggleClicked(){this.fullscreenToggle.isDisabled()||(tt.q.instance.prodigy.audio.playSFX(18,"pop"),this.toggleFullscreen())}toggleFullscreen(){tt.q.instance.prodigy.game.scale.isFullScreen?this.exitFullscreen():this.enterFullscreen()}enterFullscreen(){tt.q.instance.prodigy.game.scale.fullScreenScaleMode=q_.y.EXACT_FIT,tt.q.instance.prodigy.game.scale.fullScreenTarget=document.body,tt.q.instance.prodigy.game.scale.startFullScreen().catch(j.RQr.createHandler("Failed to start fullscreen."))}exitFullscreen(){tt.q.instance.prodigy.game.scale.stopFullScreen()}isFullscreen(){return tt.q.instance.prodigy.game.scale.isFullScreen}};jC.DEBOUNCE_MS=500,(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],jC.prototype,"fullscreenTitle",void 0),(0,G.Cg)([(0,j.MnK)(Q),(0,G.Sn)("design:type",Q)],jC.prototype,"fullscreenToggle",void 0),(0,G.Cg)([(0,PC.sg)(jC.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],jC.prototype,"onFullscreenToggleClicked",null),jC=(0,G.Cg)([(0,j.EVk)("ScreenSizeSection")],jC);var $C=U(93690);let HC=class extends j.uAl{constructor(){super(...arguments),this.tabs=[],this.tabContents=[],this.defaultSelectedTabIndex=0,this._selectedTabIndex=0}set selectedTabIndex(k){this._selectedTabIndex=k,this.updateTabs()}get selectedTabIndex(){return this._selectedTabIndex}postCreate(){this.tabs.forEach(((k,B)=>{k.onClick.add((()=>{this.selectedTabIndex=B}),this);const U=k.renderComponent.getRootContainer();U&&$C.p.patchPhaserInteraction(U,!0)})),this.selectedTabIndex=this.defaultSelectedTabIndex}destroy(){super.destroy(),this.tabs.forEach((k=>{k.onClick.removeAll(this)}))}updateTabs(){for(let k=0;k=k.length)return void this.onMissingSpell.dispatch();this.onFilledSpell.dispatch();const B=Yt.t.getItem("spellV2",k[this.spellIndex]),U=B.data,F=B.metadata,G=this.isOneUseSpell(U.cooldown)?U.warmup:U.cooldown,$=this.isOneUseSpell(U.cooldown)?U.cooldown:G-U.cooldown,H=yield this.loadIcon(F),V={SPELLCARD_COLOR_STATE:U.element,SPELLCARD_COOLDOWN_BARS_TOTAL:G,SPELLCARD_COOLDOWN_BARS_CURRENT:$,SPELLCARD_COOLDOWN_1:this.getCooldownBarColor($,1,U.element),SPELLCARD_COOLDOWN_2:this.getCooldownBarColor($,2,U.element),SPELLCARD_COOLDOWN_3:this.getCooldownBarColor($,3,U.element),SPELLCARD_CENTRE_ICON:H,SPELLCARD_MINI_ICON:[Ve._.Ui_battle_revamp_json,`icon-mini-element-${U.element}`]};this.GameObject&&!this.GameObject.isDestroyed&&Nt.d.updateInjectedValues(this.GameObject,V,!1)}))}loadIcon(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=this.getCentreIcon(k);return new Promise((k=>{tt.q.instance.prodigy.load.assets([B],(()=>{k(B)}))}))}))}getCentreIcon(k){var B,U;return(null===(U=null===(B=k.assets)||void 0===B?void 0:B.icon)||void 0===U?void 0:U.assetKey)?ps.q[xt.$.capitalizeFirstLetter(k.assets.icon.assetKey)]:ps.q.Spell_fire_fireball_single}isOneUseSpell(k){return-1===k}getCooldownBarColor(k,B,U){let F="cooldown";return this.isOneUseSpell(k)?F="disabled":k>=B&&(F=U===mn.EElementType.Astral?`${mn.EElementType.Astral}${B}`:U),hu.k[xt.$.capitalizeFirstLetter(F)]}destroy(){this.onMissingSpell.dispose(),this.onFilledSpell.dispose(),tt.q.instance.prodigy.game.broadcaster.removeAppListener(jn.ig.Evolved,this),super.destroy()}};(0,G.Cg)([(0,j.Cdj)(hs.hi.PetCreatureData),(0,G.Sn)("design:type",Object)],WC.prototype,"_petData",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.YLv)("Index of the spell this component represents"),(0,G.Sn)("design:type",Number)],WC.prototype,"spellIndex",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Dispatched if spell slot is empty"),(0,G.Sn)("design:type",j.HN0)],WC.prototype,"onMissingSpell",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Dispatched if spell slot is empty"),(0,G.Sn)("design:type",j.HN0)],WC.prototype,"onFilledSpell",void 0),WC=(0,G.Cg)([(0,j.EVk)("SpellCardData",W.Y.uiPet)],WC);var qC=U(55734),KC=U(17710);let zC=class extends Fi.z{constructor(){super(...arguments),this.spellIndex=-1}create(){super.create(),tt.q.instance.prodigy.game.broadcaster.addAppListener(jn.ig.Evolved,this.onEvolvePet.bind(this),this),tt.q.instance.prodigy.game.broadcaster.addAppListener(jn.ig.GearUpdate,this.onGearEquip.bind(this),this),tt.q.instance.prodigy.game.broadcaster.addAppListener(jn.ig.AnyLevelUp,this.onLevelPet.bind(this),this),this.bindContext()}bindContext(){super.bindContext(),this.fillTooltip()}onEvolvePet(){this.bindContext()}onGearEquip(){this.bindContext()}onLevelPet(){this.bindContext()}fillTooltip(k=!1){if(!this.GameObject)return;if(this.spellIndex<0)return void j.VyI.log("SpellIndex unset or invalid.",j.$bb.Error);const B=new qC.R(tt.q.instance.game,this._petData);let U;if(k)U=B.getAvailableSpells(B.currentMaxLevel);else if(U=B.getAvailableSpells(),this.spellIndex>=U.length)return;const F=Yt.t.getItem("spellV2",U[this.spellIndex]).data,G=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getGrowthBattleStats(this._petData),$=KC.D.getStatusEffectInjectedValues(F);td.I.getStatsOfEquippedGearForPet(this._petData.gear).then((k=>{for(const B in k)"number"==typeof G[B]&&"number"==typeof k[B]&&(G[B]+=k[B])})).catch(j.RQr.createHandler("Error when adding pet gear.")).finally((()=>{const k=Object.assign({TOOLTIP_IS_IN_COOLDOWN:!1,TOOLTIP_ELEMENT:F.element,TOOLTIP_NAME:F.name,TOOLTIP_POWER:this.getPower(G.power,this._petData.level,F),TOOLTIP_ACCURACY:this.getCasterAccuracy(G.speed,this._petData.level,F),TOOLTIP_COOLDOWN:this.getCooldown(F),TOOLTIP_SELECTED:!0},$);Nt.d.updateInjectedValues(this.GameObject,k,!1)}))}getPower(k,B,U){var F;const G=null===(F=U.flags)||void 0===F?void 0:F.find((k=>k.flag===mn.ESpellFlag.ChangeHp)),j=G?G.flagValue:this._spellLevelBonusConstants.getSpellPower({casterValue:k,spellBaseValue:U.damage,upgradeType:U.upgradeType,level:B});return this._spellLevelBonusConstants.getDisplaySpellPower(j,!!G).toString()}getCasterAccuracy(k,B,U){const F=this._spellLevelBonusConstants.getSpellSpeed({casterValue:k,spellBaseValue:U.accuracySpeedBonus,upgradeType:U.upgradeType,level:B});return this._spellLevelBonusConstants.getDisplaySpellAccuracy(F)}determineAccuracyTier(k){return k<.7?"SPELL_ACCURACY_TIER_4":k<.85?"SPELL_ACCURACY_TIER_3":k<1?"SPELL_ACCURACY_TIER_2":"SPELL_ACCURACY_TIER_1"}getCooldown(k){const B=this.getInjectedValue(j.$Bt.LocalizationService);let U;return U=k.cooldown<0?B.getText("SPELL_COOLDOWN_NEVER"):0===k.cooldown?B.getText("SPELL_COOLDOWN_NONE"):`${k.cooldown}`,U}destroy(){super.destroy(),tt.q.instance.prodigy.game.broadcaster.removeAppListener(jn.ig.Evolved,this)}};(0,G.Cg)([(0,j.Cdj)(hs.hi.PetCreatureData),(0,G.Sn)("design:type",Object)],zC.prototype,"_petData",void 0),(0,G.Cg)([(0,Gi.b)("98d-7b90"),(0,G.Sn)("design:type",mn.SpellLevelBonusConstants)],zC.prototype,"_spellLevelBonusConstants",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.YLv)("Index of the spell this component represents"),(0,G.Sn)("design:type",Number)],zC.prototype,"spellIndex",void 0),zC=(0,G.Cg)([(0,j.EVk)("SpellTooltipData",W.Y.uiPet)],zC);U(56345);let YC=class extends X.B{constructor(){super(...arguments),this._titleWhite=null,this._titleGrey=null,this._selectedGraphic=null}updateContentView(k){this._titleWhite.text=k.title,this._titleGrey.text=k.title,this._titleWhite.GameObject.active=!1,this._titleGrey.GameObject.active=!0,this._selectedGraphic.active=!1,this.onClick.add(((B=!0)=>{this._selectedGraphic.active=!0,this._titleWhite.GameObject.active=!0,this._titleGrey.GameObject.active=!1,k.onClick(this._selectedGraphic,B,(()=>{this._titleWhite.GameObject.active=!1,this._titleGrey.GameObject.active=!0}))})),k.selected&&this.onClick.dispatch(!1)}};(0,G.Cg)([(0,j.x4W)("titleWhite"),(0,G.Sn)("design:type",j.EYj)],YC.prototype,"_titleWhite",void 0),(0,G.Cg)([(0,j.x4W)("titleGrey"),(0,G.Sn)("design:type",j.EYj)],YC.prototype,"_titleGrey",void 0),(0,G.Cg)([(0,j.x4W)("selectedGraphic"),(0,G.Sn)("design:type",j._mx)],YC.prototype,"_selectedGraphic",void 0),YC=(0,G.Cg)([(0,j.EVk)("RegistrationCellPrefab")],YC);let QC=class extends Z.C{constructor(){super(...arguments),this._title=null,this._singleRow=null,this._doubleRow=null,this._tripleRow=null,this._numberOfColumns=3}updateContentView(k){this._title.text=k.title;const B=k.cells.length/this._numberOfColumns;this._singleRow.active=B<=1,this._doubleRow.active=B<=2&&B>1,this._tripleRow.active=B<=3&&B>2}};(0,G.Cg)([(0,j.x4W)("title"),(0,G.Sn)("design:type",j.EYj)],QC.prototype,"_title",void 0),(0,G.Cg)([(0,j.x4W)("singleRow"),(0,G.Sn)("design:type",j._mx)],QC.prototype,"_singleRow",void 0),(0,G.Cg)([(0,j.x4W)("doubleRow"),(0,G.Sn)("design:type",j._mx)],QC.prototype,"_doubleRow",void 0),(0,G.Cg)([(0,j.x4W)("tripleRow"),(0,G.Sn)("design:type",j._mx)],QC.prototype,"_tripleRow",void 0),QC=(0,G.Cg)([(0,j.EVk)("RegistrationSectionPrefab")],QC);let XC=class extends j.uAl{constructor(){super(...arguments),this._animate=!1,this._bounce=null}create(){super.create(),this.gameObject.onActiveInHierarchyChanged.add((()=>{this.animateArrow(this.gameObject.active)}))}animateArrow(k){var B;this._animate=k,this._animate?(this._bounce||(this._bounce=tt.q.instance.game.add.tween(this.gameObject.transform.localPosition,this).to({y:this.gameObject.transform.localPosition.y-5},1e3,j.GS3.Quadratic.InOut,!0,0,Kt.s.MAX_SAFE_INTEGER,!0)),this._bounce.isRunning||this._bounce.start()):(this.gameObject.transform.setPositionY(0),null===(B=this._bounce)||void 0===B||B.stop())}destroy(){this._bounce&&(this._bounce.stop(),tt.q.instance.game.tweens.remove(this._bounce),this._bounce=null),super.destroy()}};XC=(0,G.Cg)([(0,j.EVk)("ItemCardArrow",j.YH6.ui)],XC);var ZC=U(55301),JC=U(59701);let tO=class extends j.uAl{constructor(){super(...arguments),this._onRequirementsMet=new j.HN0}create(){super.create(),this._isZoneStore=JC.W.isPrimaryMajorZoneStore(this._storeID),this._isZoneStore&&(tt.q.instance.prodigy.gameContainer.get("a50-726e").getStore(this._storeID).then((([k,B])=>{k?j.VyI.log(`[OpenStoreComponent] Error retrieving the store with ID: ${this._storeID}`,j.$bb.Error):this._storeData=B})).catch(j.RQr.createHandler(`[OpenStoreComponent] Error retrieving the store with ID: ${this._storeID}`)),this._requirementsID>=0&&this._featureRequirements.meetsRequirementsDeprecated(this._requirementsID)&&this._onRequirementsMet.dispatch())}destroy(){this._onRequirementsMet.dispose(),super.destroy()}openStore(){var k,B,U,F;const G=new mi.rD(tt.q.instance.game),$=`${null===(k=G.dataProvider.get(this._openStoreDialogueID))||void 0===k?void 0:k.textKey}_${us.B.Dialogue}`,H=tt.q.instance.prodigy.world.getCurrentZone(),V=tt.q.instance.prodigy.world.getCurrentMapTag();if(this._featureRequirements.meetsRequirementsDeprecated(this._requirementsID)){this._segment.featureCommon.sendInterfaceEvent({interfaceName:$,interfaceType:ui.Wm.Shop,instanceType:fi.N.ShopVisit,originType:ui.$N.Npc,originID:`${H}-${V}-${this._storeID}`});const k=G.dataProvider.get(this._openStoreDialogueID);this._isZoneStore&&(k.args=[null===(B=this._storeData)||void 0===B?void 0:B.getName()]);const[F,W]=null!==(U=ZC.X[this._storeID])&&void 0!==U?U:[],q=`${F}${j.Aq$.isDefined(W)?`_${W}`:""}`.replace("-","_");if(!k)return void this.openStoreMenu($,q);G.addEvents([{dialogueData:k,type:mi.fA.STORE,yes:()=>this.openStoreMenu($,q),no:()=>this.dismissStoreMenu($,q),blockInput:!0}])}else{const k=G.dataProvider.get(this._unmetRequirementsDialogueID);this._isZoneStore&&(k.args=[Yt.t.getItem("currency",null===(F=this._storeData)||void 0===F?void 0:F.getStoreCurrencyID()).data.name]),G.addEvents([{dialogueData:k,blockInput:!0}])}G.start(!0)}openStoreMenu(k,B){this.sendDialogueSegmentEvents(Is.k.Shop,k,B),tt.q.instance.prodigy.open.store(this._storeID)}dismissStoreMenu(k,B){this.sendDialogueSegmentEvents(Is.k.NotNow,k,B)}sendDialogueSegmentEvents(k,B,U){this._segment.featureCommon.sendButtonEvent({buttonName:k,interfaceName:B,interfaceType:ui.Wm.DialogBox,saveClickInfo:k,destinationName:U}),this._segment.featureCommon.sendInterfaceEvent({interfaceName:B,interfaceType:ui.Wm.DialogBox,instanceType:fi.N.Interface,closeMethod:ui.Lv.ButtonClick})}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tO.prototype,"_storeID",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tO.prototype,"_requirementsID",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tO.prototype,"_openStoreDialogueID",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tO.prototype,"_unmetRequirementsDialogueID",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],tO.prototype,"_onRequirementsMet",void 0),(0,G.Cg)([(0,j.Cdj)("db5-fb6e"),(0,G.Sn)("design:type",Object)],tO.prototype,"_featureRequirements",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],tO.prototype,"_segment",void 0),tO=(0,G.Cg)([(0,j.EVk)("OpenStore",W.Y.uiDialog)],tO);U(63811),U(25317),U(74208),U(32456),U(13751);let eO=class extends j.uAl{constructor(){var k;super(...arguments),this._onMenuClosed=new j.HN0,this._closeCallback=null,this.menuFactory=null===(k=tt.q.instance)||void 0===k?void 0:k.prodigy.open}map(k,B,U,F,G){return this.menuFactory.map({disableClose:k,forceLock:B,onClose:U,forceUnlock:F,disableZoneGoals:G})}firstNameSelector(k,B=!1){this.menuFactory.firstNameSelector(k,B)}wizardNameSelector(k,B,U){this.menuFactory.wizardNameSelector(k,B,U)}openChatFromHUD(){this.menuFactory.chat(tt.q.instance.game.broadcaster.broadcast.bind(tt.q.instance.game.broadcaster,jn.Y1.ShowHUD,jn.HG.HUD))}openWorldMapFromHUD(){this.menuFactory.map()}openWorldMapForDifficultyMode(k){Lg.i.setDifficultyMode(k)}openWorldMapWithZoneLockCutscene(){this.menuFactory.map({disableClose:!0,disableZoneGoals:!0}).activateZoneLockCutscene()}openMessageWithLocalizationKey(k){this.menuFactory.message(this._localizer.getText(k))}openMessageWithLocalizationKeyAndArgs(k,...B){this.menuFactory.message(this._localizer.getText(k,...B))}openBattlePassMenu(){var k;const B=this.getInjectedValue(hs.XU.ToasterNotificationId);this.menuFactory.battlePassMenu(this._originId,this._originType,null!==(k=this._closeCallback)&&void 0!==k?k:void 0,B)}openBattlePassUltimateMemberUpsellModal(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.menuFactory.battlePassUltimateMemberUpsellModal().then((()=>this._onMenuClosed.dispatch())).catch(j.RQr.createHandler("Error opening battle pass ultimate member upsell modal from the legacy menu factory component."))}))}openLootDashMenu(){this.menuFactory.lootDashMenu({originId:this._originId,originType:this._originType})}openDynamicStore(k,B){const U=null!=k?k:this._storeKey,F=null!=B?B:this._storeScrollToSection;this.menuFactory.dynamicStore({closeCallback:this._onMenuClosed.dispatch.bind(this._onMenuClosed),origin:{originType:this._originType,originId:this._originId},storeKey:U,scrollToSection:F})}openNicknamer(){const k=tt.q.instance.prodigy.gameContainer.get("dcf-fcf7"),B=tt.q.instance.prodigy.world.getCurrentZone().replace("_hard",""),U=k.isAvailable(B)?k.getNicknameData(B):[];this.menuFactory.nicknamer(U,this._player.playerContainer,B)}showMessageWithLocalizationKey(k){this.menuFactory.message(this._localizer.getText(k))}openDifficultySelector(){this.menuFactory.difficultySelector((()=>this._onMenuClosed.dispatch())).catch(j.RQr.createHandler("Error opening difficulty selector from the legacy menu factory component."))}openDifficultySelectorConfirmationModal(k){const B=null!=k?k:this.getInjectedValue(ml._l);B?this.menuFactory.difficultySelectorConfirmationModal(B):j.VyI.log("LegacyMenuFactoryComponent: Failed to find get the difficulty mode via injected value",j.$bb.Error)}openArchiveEntranceMenu(){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.prodigy.open.archiveEntranceMenu(Ft.A_.ARCHIVES,(()=>{this._onMenuClosed.dispatch()}))}))}openYourMailMenu(){this.menuFactory.mailer()}openNetworkErrorPopup(){this.menuFactory.networkError((()=>{this._onMenuClosed.dispatch()}))}destroy(){this._closeCallback=null,this._onMenuClosed.dispose(),super.destroy()}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],eO.prototype,"_originId",void 0),(0,G.Cg)([(0,j.gfw)(ui.$N),(0,G.Sn)("design:type",String)],eO.prototype,"_originType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],eO.prototype,"_storeKey",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],eO.prototype,"_storeScrollToSection",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],eO.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],eO.prototype,"_player",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],eO.prototype,"_onMenuClosed",void 0),eO=(0,G.Cg)([(0,j.EVk)("LegacyMenuFactory",j.YH6.ui)],eO);U(29281);let iO=class extends j.uAl{assignScrollToSection(k){this._scrollToSection=k}assignButtonCallback(k){k&&this._goNowButton.onInputUp.add((()=>{tt.q.instance.prodigy.open.dynamicStore({storeKey:k,scrollToSection:this._scrollToSection,origin:{originType:ui.$N.WizardWatch,originId:Is.k.WizardWatchButton}})}))}};(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],iO.prototype,"_goNowButton",void 0),iO=(0,G.Cg)([(0,j.EVk)("WizardWatchAdItem")],iO);var sO;U(31091);let nO=sO=class extends j.uAl{constructor(){super(...arguments),this.onPlayerAppearanceUpdated=new j.HN0}create(){super.create(),this._metricsManager.sendOnboardingFunnelEvent(eh.l.LoadGame),this._metricsManager.sendOnboardingFunnelEvent(eh.l.CreateCharacter),this._loggedInPlayer.player.saveEnabled=!1,this._loggedInPlayer.player.appearance.setName(null),this.randomizeAppearance()}randomizeAppearance(){const k=FE.createSeeded(Date.now()),B=sO.HAIR_STYLES[k.getIntegerInRange(0,sO.HAIR_STYLES.length-1)],U=sO.HAIR_COLORS[k.getIntegerInRange(0,sO.HAIR_COLORS.length-1)],F=k.getRealInRange(0,1)>.5,G=Math.floor(3*k.getRealInRange(0,1))+1,j=Math.floor(2*k.getRealInRange(0,1))+4;this._loggedInPlayer.player.setDefault(F?j:G,B,U),this._loggedInPlayer.player.forceSaveCharacter(),this.onPlayerAppearanceUpdated.dispatch(this._loggedInPlayer.getAppearance())}onCharacterCreateComplete(){var k;const B=this._loggedInPlayer.player.getPlayerData();delete B.reset,B.school="none",null!==(k=B.startDate)&&void 0!==k||(B.startDate=(new Date).getTime());[eh.l.CustomizeCharacter,eh.l.SelectLocation,eh.l.CompleteSignup].forEach((k=>{this._metricsManager.sendOnboardingFunnelEvent(k)})),this._loggedInPlayer.player.forceSaveCharacter()}destroy(){this.onPlayerAppearanceUpdated.dispose(),super.destroy()}};nO.SKIN_COLORS=[1,2,3,4,5,14],nO.EYE_COLORS=[1,2,3,4,6,8],nO.HAIR_COLORS=[1,2,3,4,5,6],nO.HAIR_STYLES=[5,10,20,41,37,53],(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],nO.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nO.prototype,"onPlayerAppearanceUpdated",void 0),(0,G.Cg)([(0,j.Cdj)("2a1-fed9"),(0,G.Sn)("design:type",Object)],nO.prototype,"_metricsManager",void 0),nO=sO=(0,G.Cg)([(0,j.EVk)("CharacterCreate",W.Y.uiCharCreate)],nO);let aO=class extends j.uAl{init(k,B=null,U=null){this._button.onEnabledClick.add(B),this.gameObject.findComponentsInChildren(Ke._).forEach((B=>{B.sprite.tint=k})),U&&this.gameObject.findComponentsInChildren(j.EYj).forEach((k=>{k.GameObject.active=!0,k.text=U.toString()}))}};var rO,oO;(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],aO.prototype,"_button",void 0),aO=(0,G.Cg)([(0,j.EVk)("CharacterPaletteButton",W.Y.uiCharCreate)],aO),function(k){k.EyeColor="eyeColor",k.SkinColor="skinColor",k.HairColor="hairColor",k.HairStyle="hairStyle"}(oO||(oO={}));let hO=rO=class extends j.uAl{constructor(){super(...arguments),this.paletteType=oO.EyeColor,this.onPlayerAppearanceUpdated=new j.HN0,this._paletteKeys=[]}setTitle(k){this._textKey.setLocalizationKey(k)}init(){switch(this.paletteType){case oO.EyeColor:this._paletteKeys=nO.EYE_COLORS;break;case oO.SkinColor:this._paletteKeys=nO.SKIN_COLORS;break;case oO.HairColor:this._paletteKeys=nO.HAIR_COLORS;break;case oO.HairStyle:this._paletteKeys=nO.HAIR_STYLES}const k=tt.q.instance.prodigy.gameContainer.get("d0e-64fd");this._paletteKeys.forEach(((B,U)=>{k.loadWithDependenciesFromGUID(Rt.l.CharacterPaletteButton,null).then((k=>{k.parent=this._grid.GameObject,this._grid.updateAll(!0);const F=this.getPaletteTint(B);k.findComponentInChildren(aO).init(F,this.changeVisuals.bind(this,B),this.paletteType===oO.HairStyle?U+1:null)})).catch(j.RQr.createHandler("[Character Palette Selector] Error loading the character palette button"))}))}getPaletteTint(k){if(this.paletteType===oO.HairStyle)return rO.HAIRSTYLE_TINT;const B=Object.values(oO).indexOf(this.paletteType);return $c.TZ.rgbArrayToHex(Yt.t.getItemData(this.paletteType,k).colors[B])}changeVisuals(k){const B=this._playerDataProvider.player;switch(this.paletteType){case oO.EyeColor:B.appearance.setEyeColor(k);break;case oO.SkinColor:B.appearance.setSkinColor(k);break;case oO.HairColor:B.appearance.setHair(null,k);break;case oO.HairStyle:B.appearance.setHair(k)}this.onPlayerAppearanceUpdated.dispatch(this._playerDataProvider.getAppearance())}destroy(){this.onPlayerAppearanceUpdated.dispose(),super.destroy()}};hO.HAIRSTYLE_TINT=548722,(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],hO.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.gfw)(oO),(0,G.Sn)("design:type",String)],hO.prototype,"paletteType",void 0),(0,G.Cg)([(0,j.MnK)(j.JTA),(0,G.Sn)("design:type",j.JTA)],hO.prototype,"_grid",void 0),(0,G.Cg)([(0,j.MnK)(vs.R),(0,G.Sn)("design:type",vs.R)],hO.prototype,"_textKey",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],hO.prototype,"onPlayerAppearanceUpdated",void 0),hO=rO=(0,G.Cg)([(0,j.EVk)("CharacterPaletteSelector",W.Y.uiCharCreate)],hO);var cO=U(73722),dO=U(80974);let lO=class extends j.uAl{constructor(){super(),this.onServerSelected=new j.HN0,this.openWorld=ct.throttle(this.openWorld,1e3,{trailing:!1})}openWorld(){this.setHomeOrSchool()||this.chooseServer(!1,!1)}setHomeOrSchool(k,B){if(this._servers){const U=new dO.H(this._servers,this.chooseServer.bind(this),k,B);return cO.V.instance.isInitComplete()||(cO.V.instance.selectedLocation="school"),U.applyServerSelectMode(),!0}return!1}chooseServer(k,B){B||(this.onServerSelected.dispatch(),tt.q.instance.prodigy.world.enter().catch(j.RQr.createHandler("Error entering world")))}destroy(){this.onServerSelected.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("InitData-servers"),(0,G.Sn)("design:type",Array)],lO.prototype,"_servers",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],lO.prototype,"onServerSelected",void 0),lO=(0,G.Cg)([(0,j.EVk)("OpenServerSelect",W.Y.uiCharCreate),(0,G.Sn)("design:paramtypes",[])],lO);U(47878);var uO=U(79998);let fO=class extends j.uAl{constructor(){super(...arguments),this._rarityBackground=uO.u.Pet_card_bg_bw,this._rarity=io.E.Common,this._rarityTintMap=Object.assign({[-1]:12500670},$c.Hh),this._rarityStrokeMap={[-1]:"#766685",[io.E.Common]:"#766685",[io.E.Uncommon]:"#477251",[io.E.Rare]:"#505796",[io.E.Heroic]:"#812A93",[io.E.Legendary]:"#AE0000"},this._rarityImageMap={[-1]:uO.u.Pet_card_bg_bw,[io.E.Common]:uO.u.Pet_card_bg_common,[io.E.Uncommon]:uO.u.Pet_card_bg_uncommon,[io.E.Rare]:uO.u.Pet_card_bg_rare,[io.E.Heroic]:uO.u.Pet_card_bg_heroic,[io.E.Legendary]:uO.u.Pet_card_bg_legendary}}changeStrokeMap(k){this._rarityStrokeMap=k,this.updateGraphic()}changeTintMap(k){this._rarityTintMap=k,this.updateGraphic()}changeImageMap(k){this._rarityImageMap=k,tt.q.instance.prodigy.load.isFileLoaded(this._rarityImageMap[this._rarity])?this.updateGraphic():this.loadAssets()}changeRarity(k){this._rarity=k,tt.q.instance.prodigy.load.isFileLoaded(this._rarityImageMap[this._rarity])?this.updateGraphic():this.loadAssets()}loadAssets(){const k=Object.values(this._rarityImageMap);tt.q.instance.prodigy.load.assetsAsPromise(k).then((()=>{this.updateGraphic()})).catch((k=>{j.VyI.log("Failed to load images on rarity graphic state component",j.$bb.Error)}))}updateGraphic(){const k={[hs.Wg.RarityGraphic]:this._rarityImageMap[this._rarity],[hs.Wg.RarityTint]:this._rarityTintMap[this._rarity],[hs.Wg.RarityStroke]:this._rarityStrokeMap[this._rarity]};Nt.d.updateInjectedValues(this.gameObject,k)}};(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],fO.prototype,"_rarityBackground",void 0),(0,G.Cg)([(0,j.gfw)(io.E),(0,G.Sn)("design:type",Number)],fO.prototype,"_rarity",void 0),(0,G.Cg)([(0,j.npj)(),(0,G.Sn)("design:type",Object)],fO.prototype,"_rarityTintMap",void 0),(0,G.Cg)([(0,j.npj)(),(0,G.Sn)("design:type",Object)],fO.prototype,"_rarityStrokeMap",void 0),(0,G.Cg)([(0,j.npj)(),(0,G.Sn)("design:type",Object)],fO.prototype,"_rarityImageMap",void 0),fO=(0,G.Cg)([(0,j.EVk)("RarityGraphicState")],fO);var bO=U(93375);let pO=class extends j.uAl{};(0,G.Cg)([(0,j.gfw)(bO.f),(0,G.Sn)("design:type",String)],pO.prototype,"hudStyle",void 0),pO=(0,G.Cg)([(0,j.EVk)("HUDStyle",W.Y.ui)],pO);let vO=class extends j.uAl{constructor(){super(...arguments),this.onStandardHUDStyle=new j.HN0,this.onHouseHUDStyle=new j.HN0,this._runOnCreate=!1}create(){super.create(),this._runOnCreate&&this.checkHUDStyle()}checkHUDStyle(){const k=tt.q.instance.prodigy.game.state.getCurrentState(),B=k instanceof hw.c?k:null,U=j.wa5.getActiveScene().gameObjects.find((k=>k.findComponentInChildren(pO))),F=null==U?void 0:U.findComponentInChildren(pO);switch(B?B.hudMenuStyle:null==F?void 0:F.hudStyle){case void 0:j.VyI.log("HUDStyleGuardComponent could not determine HUD Style; current screen does not appear to have a HUD",j.$bb.Warning);break;case bO.f.House:this.onHouseHUDStyle.dispatch();break;case bO.f.Standard:default:this.onStandardHUDStyle.dispatch()}}destroy(){this.onStandardHUDStyle.dispose(),this.onHouseHUDStyle.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],vO.prototype,"onStandardHUDStyle",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],vO.prototype,"onHouseHUDStyle",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],vO.prototype,"_runOnCreate",void 0),vO=(0,G.Cg)([(0,j.EVk)("HUDStyleGuard",W.Y.ui)],vO);let gO=class extends j.uAl{constructor(){super(...arguments),this._kennelSizeThreshold=3}create(){super.create(),!this.checkPlayerHasUpgradedPet()&&this.checkPlayerHasHitPetThreshold()?(this._petMenuNotificationDown.active=!0,this._petMenuNotificationUp.active=!0):(this._petMenuNotificationDown.active=!1,this._petMenuNotificationUp.active=!1)}checkPlayerHasHitPetThreshold(){var k,B;return(null===(B=null===(k=this._currentPlayer)||void 0===k?void 0:k.player.kennel)||void 0===B?void 0:B.getPets().length)>=this._kennelSizeThreshold}checkPlayerHasUpgradedPet(){return this._breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_PET_UPGRADE_FTUE,ls.B.BREADCRUMB_LEVELLED_UP_PET_FIRST_TIME)}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gO.prototype,"_petMenuNotificationDown",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],gO.prototype,"_petMenuNotificationUp",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],gO.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("12f-4e29"),(0,G.Sn)("design:type",sh.F)],gO.prototype,"_breadcrumbManager",void 0),gO=(0,G.Cg)([(0,j.EVk)("HUDPetMenuNotifier",W.Y.ui)],gO);let mO=class extends j.uAl{postCreate(){const k=Object.create(null,{postCreate:{get:()=>super.postCreate}});return(0,G.sH)(this,void 0,void 0,(function*(){k.postCreate.call(this),tt.q.instance.prodigy.game.broadcaster.addAppListener(jn.H3.MembershipResponseReceived,this.handleMembershipChange,this),this.updateHudMembershipFromCacheData()}))}updateHudMembershipFromCacheData(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0");this.updateHudButtons(k.getMembershipUpsell())}handleMembershipChange(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0"),B=yield k.fetchMembershipUpsell();this.updateHudButtons(B)}))}updateHudButtons(k){var B,U;if(j.Aq$.isDefined(this.memberButton)&&j.Aq$.isDefined(this.ultimateMemberButton)&&j.Aq$.isDefined(this.coreMemberButton)&&j.Aq$.isDefined(this.plusMemberButton)&&j.Aq$.isDefined(this.ultraMemberButton)){if(js.D.isFeatureEnabled()){if(!Dd.x.isFeatureEnabled()){const F=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getMemberTier();this.memberButton.active=!1,this.ultimateMemberButton.active=!1,this.coreMemberButton.active=!Gs.pF.isNativeApp()&&F===xs._$.NonMember,this.plusMemberButton.active=Gs.pF.isNativeApp()&&(F===xs._$.NonMember||F===xs._$.MemberCore)||!Gs.pF.isNativeApp()&&F===xs._$.MemberCore&&(null===(B=null==k?void 0:k.upgradeOptions)||void 0===B?void 0:B.length)>0,this.ultraMemberButton.active=!Gs.pF.isNativeApp()&&F===xs._$.MemberPlus&&(null===(U=null==k?void 0:k.upgradeOptions)||void 0===U?void 0:U.length)>0}}else{const B=(k.tier===xs._$.MemberLevelUp||k.tier===xs._$.MemberUltimateMath||k.tier===xs._$.MemberCore||k.tier===xs._$.MemberPlus)&&k.upgradeOptions.length>0;this.memberButton.active=!B&&k.tier===xs._$.NonMember,this.ultimateMemberButton.active=B,this.coreMemberButton.active=!1,this.plusMemberButton.active=!1,this.ultraMemberButton.active=!1}this._grid.updateAll()}}destroy(){tt.q.instance.prodigy.game.broadcaster.removeAppListener(jn.H3.MembershipResponseReceived,this),super.destroy()}};(0,G.Cg)([(0,j.MnK)(j.JTA),(0,G.Sn)("design:type",j.JTA)],mO.prototype,"_grid",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],mO.prototype,"memberButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],mO.prototype,"ultimateMemberButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],mO.prototype,"coreMemberButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],mO.prototype,"plusMemberButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],mO.prototype,"ultraMemberButton",void 0),mO=(0,G.Cg)([(0,j.EVk)("HUDMembershipButtonComponent",W.Y.ui)],mO);U(28832),U(29853),U(5679),U(52211);var yO=U(53671),_O=U(21574),EO=U(96989);let wO=class extends j.uAl{constructor(){super(...arguments),this.onPetMergeSuccess=new j.HN0,this._willPetLevelOnMerge=!1}setup(k,B){this.mergeModalCloseCallback=B,this._petData=k,this.updateMergeProperties()}updateMergeProperties(){var k,B,U;const F=eo.P8.canPlayerAccessPetMergeFeature(this._activePlayer),G=(null!==(k=eo.P8.getPetDisplayMergeRank(this._petData.ID,this._petData.uniqueID))&&void 0!==k?k:bl.qd.MIN)>=bl.qd.MAX;this.mergeBar.setup(this._petData,F);let $={requiredIngredientsCount:0,validPetIngredientCount:0,mergeRecipe:void 0};G||($=cd.r.getMergeIngredientInfo(this._petData),this._willPetLevelOnMerge=null!==(B=$.willLevelOnMerge)&&void 0!==B&&B,EO.Y.isMerge2Recipe($.mergeRecipe)&&(this._merge2LevelRequirement=$.mergeRecipe.requiredLevel)),j.Aq$.isDefined(this._merge2LevelRequirement)&&this._petData.level=$.requiredIngredientsCount),this.mergeButton.regenerateButton(),this.mergeButton.GameObject.active=F&&!G,this.mergeNotAvailableText.GameObject.active=!F;const H=F&&G;if(this.duplicateText.GameObject.active=H,H){const k=Math.max(0,this._activePlayer.kennel.amountOfPet(this._petData.ID)-1);this.duplicateText.text=this._localizer.getText("PET_DETAILS_PET_DUPLICATES",k)}if(!F){const k=null!==(U=_O.g.config.minimumPlayerLevel)&&void 0!==U?U:0;this.mergeNotAvailableText.text=this._localizer.getText("PET_SCREEN_GET_LEVEL_TO_MERGE",k)}}onPetMergeClicked(){if(this.mergeButton.isButtonEnabled){tt.q.instance.prodigy.open.petMergeMenu(this._petData,ui.k.PetBook,(()=>{this.onPetMergeSubMenuClosed()})).onPetMergeSuccess.add((k=>{this.onPetMergeSuccess.dispatch(k,this._willPetLevelOnMerge)}))}else this.mergeButton.inputEnabled&&j.Aq$.isDefined(this._merge2LevelRequirement)&&(this._tooltip.GameObject.active=!0,this._tooltip.body=this._localizer.getText("MERGE_LEVEL_REQUIREMENT_TOOLTIP_DESCRIPTION",this._merge2LevelRequirement))}onPetMergeSubMenuClosed(){this.updateMergeProperties(),this.mergeModalCloseCallback&&this.mergeModalCloseCallback()}destroy(){this.onPetMergeSuccess.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],wO.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],wO.prototype,"mergeNotAvailableText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],wO.prototype,"duplicateText",void 0),(0,G.Cg)([(0,j.MnK)(yO.J),(0,G.Sn)("design:type",yO.J)],wO.prototype,"mergeBar",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],wO.prototype,"mergeButton",void 0),(0,G.Cg)([(0,Gi.b)("306-5359"),(0,G.Sn)("design:type",An.W)],wO.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],wO.prototype,"_buttonSparkles",void 0),(0,G.Cg)([(0,j.MnK)(lC.tX),(0,G.Sn)("design:type",lC.tX)],wO.prototype,"_tooltip",void 0),wO=(0,G.Cg)([(0,j.EVk)("MergeWidgetController")],wO);let TO=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.onTabSelected=this.createTidySignal()}get toggle(){return this._toggle}get data(){return this._data}init(k){this.toggle.setSelected(!0),this.toggle.inputEnabled=!0,this._data=k,this.addListenerToSignal(this.toggle.onSelected,(()=>this.onTabSelected.dispatch(this._data))),j.Aq$.isDefined(this.labelComponent)&&(this.labelComponent.text=k.label),j.Aq$.isDefined(this.graphicComponent)&&this.graphicComponent.updateAsset(k.iconId,k.iconFrame)}};(0,G.Cg)([(0,j.Pqz)(st.l),(0,G.Sn)("design:type",st.l)],TO.prototype,"_toggle",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],TO.prototype,"labelComponent",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],TO.prototype,"graphicComponent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],TO.prototype,"onTabSelected",void 0),TO=(0,G.Cg)([(0,j.EVk)("NavigationTab")],TO);let SO=class extends j.uAl{setup(k){var B;this._statName.text=k.name,this._statValue.text=k.value,this._statIcon.updateAsset(k.iconAtlasId,k.iconAsset),this._chargedTier1Background.active=k.chargedEffectTier===Fn.Bv.CHARGED,this._chargedTier2Background.active=k.chargedEffectTier===Fn.Bv.MAX_CHARGE,this._background.active=null!==(B=k.showBackground)&&void 0!==B&&B,this._chargedTier1Background.active=k.chargedEffectTier===Fn.Bv.CHARGED,this._chargedTier2Background.active=k.chargedEffectTier===Fn.Bv.MAX_CHARGE,this._statGearBoost.GameObject.active=k.hasAnyGearBoost,k.hasAnyGearBoost&&(this._statGearBoost.text=k.gearBoost)}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],SO.prototype,"_statName",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],SO.prototype,"_statValue",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],SO.prototype,"_statGearBoost",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],SO.prototype,"_statIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],SO.prototype,"_chargedTier1Background",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],SO.prototype,"_chargedTier2Background",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],SO.prototype,"_background",void 0),SO=(0,G.Cg)([(0,j.EVk)("PetInfoStat",W.Y.uiPetMenu)],SO);let AO=class extends j.uAl{setup(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=Math.abs(this._statsGrid.sizeDelta.height)/k.length;yield this._prefabLoader.preloadFromGUIDWithDependencies(this._statPrefab);for(let U=0;Uk.destroyDeferred())),Promise.all(this._tabs.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return[yield this._prefabLoader.loadWithDependenciesFromGUID(this._tabPrefab,this._tabsContainerObject),k]}))))).then((k=>{k.forEach((([B,U],F)=>{var G;const $=B.findComponent(TO);if(j.Aq$.isDefined($)){null===(G=this._toggleGroup)||void 0===G||G.addSelectable($.toggle),U.onTabSelected&&this.addListenerToSignal($.onTabSelected,U.onTabSelected.bind(this)),$.init(U);const B=""!==this._currentTabKey&&this._currentTabKey===U.key||""===this._currentTabKey&&this._defaultSelectedTabIndex===F;$.toggle.setSelected(B),1===k.length&&($.toggle.inputEnabled=!1)}}))})).catch(j.RQr.createHandler("There was an error creating the tabs")))}setPetStatsData(){this._statsPrefab&&this._tabsContainerObject&&(this._contentObject.children.forEach((k=>k.destroyDeferred())),this._prefabLoader.loadWithDependenciesFromGUID(this._statsPrefab,this._contentObject).then((k=>{const B=k.findComponent(AO);B?this.updateStats(B):j.VyI.log("Failed to find PetInfoStatTab component in statsPrefab",j.$bb.Error)})).catch(j.RQr.createHandler("Failed to load statsPrefab")))}updatePetInfo(){const k=this._tabs.find((k=>k.key===this._currentTabKey));(null==k?void 0:k.onTabSelected)&&k.onTabSelected()}updateStats(k){return(0,G.sH)(this,void 0,void 0,(function*(){this._currentTabKey=this._statsTabData.key;const B=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=Yt.t.getItem("pet",this._petData.ID),F=eo.P8.isPetOnTeam(this._petData)&&B.getChargedLevel()>0,G=F?Un.e.getActivePlayerChargedLevelTier():Fn.Bv.NO_CHARGE,j=F?this._petData.level+B.getChargedLevel():this._petData.level,$=eo.P8.getBattleStats(U,j,this._petData.uniqueID),H=yield this.getPetGearBoosts(),V=Object.values(H).some((k=>k>0)),W=this._statDisplayConfigs.map((k=>{var B,U;return{name:this._localizer.getText(k.labelLocalizedKey),value:null!==(U=null===(B=$[k.stat])||void 0===B?void 0:B.toString())&&void 0!==U?U:"",gearBoost:H[k.stat]&&H[k.stat]>0?`+${H[k.stat]}`:"",iconAsset:k.iconAsset,chargedEffectTier:G,iconAtlasId:k.iconAtlasId,hasAnyGearBoost:V}}));yield k.setup(W)}))}getPetGearBoosts(){return(0,G.sH)(this,void 0,void 0,(function*(){return td.I.getStatsOfEquippedGearForPet(this._petData.gear)}))}setPetLoreData(){this._currentTabKey=this._loreTabData.key,this._statsPrefab&&this._tabsContainerObject&&(this._contentObject.children.forEach((k=>k.destroyDeferred())),this._prefabLoader.loadWithDependenciesFromGUID(this._lorePrefab,this._contentObject).then((()=>this.updateLoreData())).catch((k=>{var B;j.VyI.log("Failed to load descriptionPrefab",j.$bb.Error),j.VyI.log(null===(B=null==k?void 0:k.toString)||void 0===B?void 0:B.call(k),j.$bb.Error)})))}updateLoreData(){const k=Yt.t.getItem("pet",this._petData.ID),B={[hs.hi.YourPetInfoLoreText]:this._localizer.getText(`${k.type}_${k.ID}_FLAVORTEXT`.toUpperCase())};Nt.d.updateInjectedValues(this.gameObject,B)}};(0,G.Cg)([(0,j.Cdj)("d69-defe"),(0,G.Sn)("design:type",Qc.q)],CO.prototype,"_gearManager",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],CO.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.i0J)(j.Z$z.Prefab),(0,G.Sn)("design:type",String)],CO.prototype,"_tabPrefab",void 0),(0,G.Cg)([(0,j.i0J)(j.Z$z.Prefab),(0,G.Sn)("design:type",String)],CO.prototype,"_statsPrefab",void 0),(0,G.Cg)([(0,j.i0J)(j.Z$z.Prefab),(0,G.Sn)("design:type",String)],CO.prototype,"_lorePrefab",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],CO.prototype,"_defaultSelectedTabIndex",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],CO.prototype,"_tabsContainerObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],CO.prototype,"_contentObject",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],CO.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,Gi.b)("306-5359"),(0,G.Sn)("design:type",An.W)],CO.prototype,"_activePlayer",void 0),CO=(0,G.Cg)([(0,j.EVk)("PetInfoWidgetController")],CO);let OO=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this._spellIndex=-1,this.onCardSelectedSignal=this.createTidySignal(),this.onCardDeselectedSignal=this.createTidySignal(),this._isUnlocked=!1}setup(k,B){this._petData=k,this.updateSpellCard().catch(j.RQr.createHandler)}updateSpellCard(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B;if(!this.GameObject)return;if(this._spellIndex<0)return void j.VyI.log("SpellIndex unset or invalid.",j.$bb.Error);const U=Yt.t.getItem("pet",this._petData.ID).data.spells.find((k=>k.slot===this._spellIndex+1)),F=null!==(k=null==U?void 0:U.level)&&void 0!==k?k:0;if(F>eo.P8.getMaxOwnableLevel(this._petData.ID,this._petData.mergeRank))return void(this.gameObject.active=!1);this.gameObject.active=!0,this._isUnlocked=null!==(B=U&&this._petData.level>=U.level)&&void 0!==B&&B;const G=Yt.t.getItem("spellV2",U.id),$=G.data,H=G.metadata,V=this.isOneUseSpell($)?$.warmup:$.cooldown,W=this.isOneUseSpell($)?$.cooldown:V-$.cooldown;this._spellLevel.text=(0,ms.k)("LEADERBOARD_CLASS_LEVEL_SHORT",F),this._spellElementIcon.updateAsset(Ve._.Ui_battle_revamp_json,`icon-mini-element-${$.element}`),this._lockedState.active=!this._isUnlocked;const q=yield this.loadIcon(H,this._isUnlocked),K={SPELLCARD_COLOR_STATE:this._isUnlocked?$.element:"cooldown",SPELLCARD_COOLDOWN_BARS_TOTAL:V,SPELLCARD_COOLDOWN_BARS_CURRENT:W,SPELLCARD_COOLDOWN_1:this.getCooldownBarColor(W,1,$),SPELLCARD_COOLDOWN_2:this.getCooldownBarColor(W,2,$),SPELLCARD_COOLDOWN_3:this.getCooldownBarColor(W,3,$),SPELLCARD_CENTRE_ICON:q,SPELLCARD_MINI_ICON:[Ve._.Ui_battle_revamp_json,`icon-mini-element-${this._isUnlocked?$.element:`${$.element}-cooldown`}`]};this.GameObject&&!this.GameObject.isDestroyed&&Nt.d.updateInjectedValues(this.GameObject,K,!1)}))}isOneUseSpell(k){return-1===k.cooldown}loadIcon(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=this.getSpellIcon(k,B);return new Promise((k=>{tt.q.instance.prodigy.load.assets([U],(()=>{k(U)}))}))}))}getSpellIcon(k,B){var U,F;const G=B?"":"_cooldown";return(null===(F=null===(U=k.assets)||void 0===U?void 0:U.icon)||void 0===F?void 0:F.assetKey)?ps.q[`${xt.$.capitalizeFirstLetter(k.assets.icon.assetKey)}${G}`]:ps.q.Spell_fire_fireball_single}getCooldownBarColor(k,B,U){let F="cooldown";return this.isOneUseSpell(U)?F="disabled":k>=B&&(F=U.element===mn.EElementType.Astral?`${mn.EElementType.Astral}${B}`:U.element),hu.k[xt.$.capitalizeFirstLetter(F)]}onCardSelected(){this.onCardSelectedSignal.dispatch(this),this._tooltipInOutAnimation.runInTween(),this._highLight.active=!0}onCardDeselected(){this.onCardDeselectedSignal.dispatch(this),this._tooltipInOutAnimation.runOutTween(),this._highLight.active=!1}};(0,G.Cg)([(0,j.g11)(),(0,j.YLv)("Index of the spell this component represents"),(0,G.Sn)("design:type",Number)],OO.prototype,"_spellIndex",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],OO.prototype,"_highLight",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],OO.prototype,"_spellElementIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],OO.prototype,"_spellLevel",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],OO.prototype,"_lockedState",void 0),(0,G.Cg)([(0,j.MnK)(j.XVE),(0,G.Sn)("design:type",j.XVE)],OO.prototype,"_toolTip",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],OO.prototype,"onCardSelectedSignal",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],OO.prototype,"onCardDeselectedSignal",void 0),(0,G.Cg)([(0,j.MnK)(Bw.s),(0,G.Sn)("design:type",Bw.s)],OO.prototype,"_tooltipInOutAnimation",void 0),OO=(0,G.Cg)([(0,j.EVk)("SpellsWidgetCard")],OO);let IO=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this._cards=[],this._currentCardSelected=null}setup(k){this._petData=k,this._cards=this.gameObject.findComponentsInChildren(OO);for(const B of this._cards)B.setup(this._petData),B.onCardSelectedSignal.add(this.onCardSelected.bind(this)),B.onCardDeselectedSignal.add(this.onCardDeselected.bind(this))}updateCards(k){this._petData=k;for(const B of this._cards)B.setup(this._petData)}onCardSelected(k){null!==this._currentCardSelected&&this._currentCardSelected.onCardDeselected(),this._currentCardSelected=k}onCardDeselected(k){this._currentCardSelected===k&&(this._currentCardSelected=null)}};IO=(0,G.Cg)([(0,j.EVk)("SpellsWidgetController")],IO);var DO;U(63086);!function(k){k.bossID="PREBATTLE_POPUP_BOSS_ID",k.mapID="PREBATTLE_POPUP_MAP_ID",k.zoneID="PREBATTLE_POPUP_ZONE_ID",k.isDoorBlocking="PREBATTLE_POPUP_IS_DOOR_BLOCKING",k.name="PREBATTLE_POPUP_NAME",k.banner="PREBATTLE_POPUP_BANNER",k.mapIcon="PREBATTLE_POPUP_MAP_ICON",k.descriptionLocalizationKey="PREBATTLE_POPUP_DESCRIPTION_LOCALIZATION_KEY",k.descriptionArg="PREBATTLE_POPUP_DESCRIPTION_ARG"}(DO||(DO={}));let RO=class extends ff.l{canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=tt.q.instance.prodigy.gameContainer,U=B.get("db5-fb6e"),F=B.get("306-5359"),G=null===(k=null==F?void 0:F.data)||void 0===k?void 0:k.lastUnmetBattleRequirements;return oh.A.isDefined(null==G?void 0:G.featureRequirements)&&U.meetsRequirementsDeprecated(G.featureRequirements)}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this);const B=tt.q.instance.prodigy.gameContainer.get("306-5359").data.lastUnmetBattleRequirements;tt.q.instance.prodigy.open.prefabMenu(Rt.l.PrebattlePopup,(()=>this.onClose.dispatch()),void 0,void 0,void 0,{[DO.bossID]:B.bossID,[DO.zoneID]:B.zoneID,[DO.mapID]:B.mapID,[DO.isDoorBlocking]:B.isDoorBlocking},{interfaceName:us.B.RestrictedBattleCallbackScreen,interfaceType:ui.Wm.Modal,originType:ui.$N.BattleRestrictionsMet,instanceType:fi.N.UI,custom:{instance_id:xt.$.generateUID(),restrictions:B.featureRequirements}},!0),Eo.a.resetPlayerLastUnmetBattleRequirements()}))}};RO=(0,G.Cg)([(0,j.EVk)("OpenPrebattlePopup",W.Y.uiDialog)],RO);const PO={14:{banner:"replay-unlock-gerald",nootTextKey:"GERALD_QUEST_POPUP_DESCRIPTION"},16:{banner:"replay-unlock-icewyrm",nootTextKey:"ICE_WYRM_QUEST_POPUP_DESCRIPTION"},13:{banner:"replay-unlock-cebollini",nootTextKey:"CEBOLLINI_QUEST_POPUP_DESCRIPTION"},15:{banner:"replay-unlock-oldone",nootTextKey:"OLD_ONE_QUEST_POPUP_DESCRIPTION"},12:{banner:"replay-unlock-nastycloud",nootTextKey:"NASTY_CLOUD_QUEST_POPUP_DESCRIPTION"},54:{banner:"replay-unlock-puppetmaster-final",nootTextKey:"GERALD_ILLUSION_QUEST_POPUP_DESCRIPTION",name:"The Puppet Master"},55:{banner:"replay-unlock-puppetmaster-final",nootTextKey:"ICE_WYRM_ILLUSION_QUEST_POPUP_DESCRIPTION",name:"The Puppet Master"},56:{banner:"replay-unlock-puppetmaster-final",nootTextKey:"CEBOLLINI_ILLUSION_QUEST_POPUP_DESCRIPTION",name:"The Puppet Master"},57:{banner:"replay-unlock-puppetmaster-final",nootTextKey:"OLD_ONE_ILLUSION_QUEST_POPUP_DESCRIPTION",name:"The Puppet Master"},58:{banner:"replay-unlock-puppetmaster-final",nootTextKey:"NASTY_CLOUD_ILLUSION_QUEST_POPUP_DESCRIPTION",name:"The Puppet Master"},37:{banner:"replay-unlock-pippet",nootTextKey:"PIPPET_QUEST_POPUP_DESCRIPTION"},59:{banner:"replay-unlock-puppetmaster-final",nootTextKey:"PUPPET_MASTER_FINAL_QUEST_POPUP_DESCRIPTION"}};let MO=class extends Fi.z{create(){super.create(),this.bindContext()}bindContext(){var k,B,U,F;const G=Yt.t.getItem("boss",this.bossID);if(!G)return;let $;$=(null===(k=G.data)||void 0===k?void 0:k.category)===Ci.GJ.Wizard&&G.ID!==Ci.JT?((k,B)=>{const U=B?"CLOAKED_WIZARD_BLOCKING_POPUP_DESCRIPTION":"CLOAKED_WIZARD_POPUP_DESCRIPTION",F=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("CLOAKED_WIZARD");return{nootTextKey:U,banner:k===Pf.a.Physical||k===Pf.a.Astral?"replay-unlock-cloaked-wizard":`replay-unlock-cloaked-wizard-${k}`,name:F}})(null===(B=G.data)||void 0===B?void 0:B.affinity,this.isDoorBlocking):PO[this.bossID],this.updateValue(DO.name,null!==(U=null==$?void 0:$.name)&&void 0!==U?U:null===(F=G.data)||void 0===F?void 0:F.name),this.updateValue(DO.banner,null==$?void 0:$.banner),this.updateValue(DO.descriptionLocalizationKey,null==$?void 0:$.nootTextKey),this.updateValue(DO.descriptionArg,Lg.i.getZoneName(this.zoneID)),this.updateValue(DO.mapIcon,`icon-zone-${Lg.i.getZoneTagForZoneId(this.zoneID)||this.zoneID.replace(/_hard|_expert/,"")}`)}};(0,G.Cg)([(0,j.Cdj)(DO.bossID),(0,G.Sn)("design:type",Number)],MO.prototype,"bossID",void 0),(0,G.Cg)([(0,j.Cdj)(DO.mapID),(0,G.Sn)("design:type",String)],MO.prototype,"mapID",void 0),(0,G.Cg)([(0,j.Cdj)(DO.zoneID),(0,G.Sn)("design:type",String)],MO.prototype,"zoneID",void 0),(0,G.Cg)([(0,j.Cdj)(DO.isDoorBlocking),(0,G.Sn)("design:type",Boolean)],MO.prototype,"isDoorBlocking",void 0),MO=(0,G.Cg)([(0,j.EVk)("PrebattlePopupComponent",W.Y.uiDialog)],MO);U(88217);var NO=U(48842);let xO=class extends Fi.z{constructor(){super(...arguments),this.NEWLY_RESCUED_STAMP_INTERVAL_MS=300}create(){super.create(),this._context.Container.bind("PET_ZONE_CARD_IS_RESCUED").toConstantValue(null),this._context.Container.bind("PET_ZONE_CARD_ICON_ID").toConstantValue(null),this._context.Container.bind("PET_ZONE_CARD_RESCUED_STAMP_DELAY").toConstantValue(null)}destroy(){this.unbindContext(),super.destroy()}bindContext(){this._petId=this._context.Container.get("ELEMENT_VIEW_DATA");const k=this.getRescuedStampDelay(),B=j.Aq$.isDefined(k),U=this._context.Container.get("PET_ZONE_MENU_STATE")===NO.SB.InZone;this._context.Container.rebind("PET_ZONE_CARD_IS_RESCUED").toConstantValue(this.isPetOwned()&&!U||this.isPetOwned()&&U&&!B),this._context.Container.rebind("PET_ZONE_CARD_ICON_ID").toConstantValue(this.getPetIconName()),U&&this._context.Container.rebind("PET_ZONE_CARD_RESCUED_STAMP_DELAY").toConstantValue(k),this.gameObject.findComponentsInChildren(Lo.B).forEach((k=>k.consume())),this.gameObject.active=!0}unbindContext(){this._context.Container.unbind("PET_ZONE_CARD_IS_RESCUED"),this._context.Container.unbind("PET_ZONE_CARD_ICON_ID"),this._context.Container.unbind("PET_ZONE_CARD_RESCUED_STAMP_DELAY");const k=this.gameObject.findComponentInChildren(Ke._);k&&(k.sprite.key=null),this.gameObject.active=!1}isPetOwned(){return j.Aq$.isDefined(tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.encounters.getPetFirstRescuedDate(this._petId))}getRescuedStampDelay(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.newPetRescueData.newRescuedPets[tt.q.instance.prodigy.world.getCurrentZone()];if(k){const B=k.findIndex((k=>k===this._petId));return-1===B?null:B*this.NEWLY_RESCUED_STAMP_INTERVAL_MS}return null}getPetIconName(){return fs.E.getIconForType("pet",this._petId)}};xO=(0,G.Cg)([(0,j.EVk)("PetGridDataProvider",W.Y.uiPetsInZones)],xO);U(41968);let LO=class extends j.uAl{constructor(){super(...arguments),this.obfuscateOnCreate=!0,this.obfuscationCharacter="*",this._isObfuscated=!1}create(){this._originalText=this._targetText.text,this.obfuscateOnCreate&&this.toggleObfuscation()}toggleObfuscation(){this._targetText.text=this._isObfuscated?this._originalText:this.obfuscationCharacter.repeat(this._originalText.length),this._isObfuscated=!this._isObfuscated}setOriginalText(k){this._originalText=k,this._isObfuscated?this._targetText.text=this.obfuscationCharacter.repeat(this._originalText.length):this._targetText.text=this._originalText}};(0,G.Cg)([(0,j.Pqz)(j.EYj),(0,G.Sn)("design:type",j.EYj)],LO.prototype,"_targetText",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],LO.prototype,"obfuscateOnCreate",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],LO.prototype,"obfuscationCharacter",void 0),LO=(0,G.Cg)([(0,j.EVk)("TextObfuscationComponent",j.YH6.ui)],LO);var kO=U(21644);let BO=class extends j.uAl{setupButtonCallback(){{const k=kO.p1[this._unifiedStoreButton];let B;if(k){const U=(0,kO.Bi)(k);U?B=()=>{tt.q.instance.prodigy.open.store(U,void 0,void 0,{originType:ui.$N.ButtonClick})}:"customCallback"in k?B=k.customCallback:(k.name,j.VyI.log(`The unified store button: ${k.name} has no associated action.`,j.$bb.Error))}B&&this._button.onClick.add(B)}}};(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],BO.prototype,"_button",void 0),(0,G.Cg)([(0,j.gfw)(kO.Uh),(0,G.Sn)("design:type",String)],BO.prototype,"_unifiedStoreButton",void 0),BO=(0,G.Cg)([(0,j.EVk)("UnifiedStoreButton",W.Y.uiUnifiedStore)],BO);let UO=class extends j.uAl{postCreate(){super.postCreate();const k=(0,ct.cloneDeep)(kO.ju);jg._.hasDefeatedPetStore()&&k.unshift(kO.Uh.OpenDynamicStore),this._gridLayout&&k.forEach((k=>{var B,U,F,G;const $=kO.p1[k],H=new j._mx,V=H.addComponent(j.XVE);V.setAnchorMin(0,0),V.setAnchorMax(0,0),V.setPivot(0,0);const W=H.addComponent(j.bE_);W.Container.bind(hs.zw.UnifiedStoreButton).toConstantValue(k),W.Container.bind(hs.zw.UnifiedStoreButtonName).toConstantValue($.name),W.Container.bind(hs.zw.UnifiedStoreButtonImageFrame).toConstantValue($.imageFrame),W.Container.bind(hs.zw.UnifiedStoreButtonIconFrame).toConstantValue($.iconFrame),W.Container.bind(hs.zw.UnifiedStoreSegmentButtonName).toConstantValue(null!==(U=null===(B=$.segmentData)||void 0===B?void 0:B[hs.zw.UnifiedStoreSegmentButtonName])&&void 0!==U?U:$.name),W.Container.bind(hs.zw.UnifiedStoreSegmentDestinationName).toConstantValue(null!==(G=null===(F=$.segmentData)||void 0===F?void 0:F[hs.zw.UnifiedStoreSegmentDestinationName])&&void 0!==G?G:void 0),this._prefabLoader.loadWithDependenciesFromGUID(Rt.l.UnifiedStoreButton,H).catch(j.RQr.createHandler(`Failed to load unified store button prefab for the button named ${$.name}.`)),this._gridLayout.GameObject.addChild(H)}))}};(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],UO.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.MnK)(j.JTA),(0,G.Sn)("design:type",j.JTA)],UO.prototype,"_gridLayout",void 0),UO=(0,G.Cg)([(0,j.EVk)("UnifiedStoreButtonGrid",W.Y.uiUnifiedStore)],UO);var FO=U(49569);let GO=class extends j.uAl{open(){const{enabled:k}=(0,Bt.G)(FO.Y);if(k)return void tt.q.instance.prodigy.open.dynamicStore({origin:{originType:ui.$N.HudClick,originId:Is.k.UnifiedStore}});const B=this._currentPlayer.player.data.zone,U=Object.values(kO.p1).find((k=>k.zone&&(null==B?void 0:B.includes(k.zone))));let F;U&&(F=(0,kO.Bi)(U)),F?tt.q.instance.prodigy.open.store(F,void 0,void 0,{interfaceType:ui.Wm.Shop,instanceType:fi.N.ShopVisit,originType:ui.$N.HudClick}):tt.q.instance.prodigy.open.prefabMenu(Rt.l.UnifiedStoreBase,void 0,!0,!1,!0,void 0,{interfaceName:us.B.UnifiedStoreBase,interfaceType:ui.Wm.Menu,originType:ui.$N.HudClick,originID:Is.k.UnifiedStore,instanceType:fi.N.Interface},!0,!1,void 0,!0)}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],GO.prototype,"_currentPlayer",void 0),GO=(0,G.Cg)([(0,j.EVk)("UnifiedStoreHudButton",W.Y.uiUnifiedStore)],GO);let jO=class extends j.uAl{constructor(){super(...arguments),this.canBake=!0,this.bakeOnCreate=!0,this._defaultRenderComponent=null,this._originalTexture=null}create(){super.create(),this.setUpTextureFunctions(),this.bakeOnCreate&&this.bakeTexture()}setUpTextureFunctions(){this._defaultRenderComponent instanceof Ke._?(this._setTextureFunction=this.setImageTexture,this._getTextureFunction=this.getImageTexture):this._defaultRenderComponent instanceof j.vYh&&(this._setTextureFunction=this.setGraphicTexture,this._getTextureFunction=this.getGraphicTexture)}findObjectFilters(){return this.gameObject.findComponentsInChildren(ad.b).reduce(((k,B)=>(k.push(...B.filterList),k)),[])}bakeTexture(){var k,B,U;if(!this.canBake)return;const F=this.findObjectFilters(),G=[new j.dbg];G[0].filters=F,this._originalTexture=null!==(B=null===(k=this._getTextureFunction)||void 0===k?void 0:k.call(this))&&void 0!==B?B:null,this._originalTexture?(this._bakeTexture=new j.X2n(this._originalTexture,G),null===(U=this._setTextureFunction)||void 0===U||U.call(this,this._bakeTexture)):j.VyI.log("No starting texture found for BakeTextureComponent",j.$bb.Warning)}unbakeTexture(){var k;this._originalTexture&&(null===(k=this._setTextureFunction)||void 0===k||k.call(this,this._originalTexture)),this.destroyTexture()}destroyTexture(){var k;null===(k=this._bakeTexture)||void 0===k||k.destroy()}getImageTexture(){const k=this._defaultRenderComponent;return tt.q.instance.game.cache.getTexture(k.getImageKey(),k.getFrame())}setImageTexture(k){this._defaultRenderComponent.sprite.setTexture(k)}setGraphicTexture(k){this._defaultRenderComponent.setTexture(k)}getGraphicTexture(){const k=this._defaultRenderComponent;return tt.q.instance.game.cache.getTexture(k.atlasKey,k.frame)}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jO.prototype,"canBake",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],jO.prototype,"bakeOnCreate",void 0),(0,G.Cg)([(0,j.Pqz)(j.y4o),(0,G.Sn)("design:type",j.y4o)],jO.prototype,"_defaultRenderComponent",void 0),jO=(0,G.Cg)([(0,j.EVk)("BakeTexture",W.Y.ui)],jO);let $O=class extends j.uAl{create(){super.create(),this._button&&this._button.onInputDown.add(this.playSFX,this)}destroy(){this._button.onInputDown.removeAll(this),super.destroy()}playSFX(){this._button.getButtonState()===Ku.K.Disabled?this._disabledSoundEffect.playSFX():this._buttonSoundEffect.playSFX()}};(0,G.Cg)([(0,j.MnK)(oa),(0,G.Sn)("design:type",oa)],$O.prototype,"_buttonSoundEffect",void 0),(0,G.Cg)([(0,j.MnK)(oa),(0,G.Sn)("design:type",oa)],$O.prototype,"_disabledSoundEffect",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],$O.prototype,"_button",void 0),$O=(0,G.Cg)([(0,j.EVk)("ButtonStateSoundEffect",W.Y.ui)],$O);U(47287);let HO=class extends j.uAl{updateText(k){this._buttonObject.children.forEach((B=>{const U=B.findComponentInChildren(vs.R);null==U||U.setLocalizationKey(k)}))}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],HO.prototype,"_buttonObject",void 0),HO=(0,G.Cg)([(0,j.EVk)("ChangeButtonText",j.YH6.ui)],HO);let VO=class extends j.uAl{constructor(){super(...arguments),this.offset=new j.I9Y(0,0),this._track=!1,this._isTracking=!1}get source(){return this._source}set source(k){this.setUpTracking(!1),this._source=k,this.setUpTracking(this._track)}get track(){return this._track}set track(k){this._track=k,this.setUpTracking(k)}create(){super.create(),this.setUpTracking(this._track)}destroy(){this.track=!1,super.destroy()}copy(){var k;if(!this._source)return null;const B=null!==(k=this.target)&&void 0!==k?k:this.GameObject,U={x:this._source.transform.worldPosition.x+this.offset.x,y:this._source.transform.worldPosition.y+this.offset.y};return B.transform.worldPosition=U,B.transform.localPosition}setUpTracking(k){this._source&&k!==this._isTracking&&(k?this._source.transform.onWorldMatrixChanged.add(this.copy,this):this._source.transform.onWorldMatrixChanged.remove(this.copy,this),this._isTracking=k)}};(0,G.Cg)([(0,j.ERr)(),(0,j.YLv)("GameObject to copy position from"),(0,G.Sn)("design:type",j._mx),(0,G.Sn)("design:paramtypes",[j._mx])],VO.prototype,"source",null),(0,G.Cg)([(0,j.ERr)(),(0,j.YLv)("GameObject to copy position to (optional)"),(0,G.Sn)("design:type",j._mx)],VO.prototype,"target",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],VO.prototype,"offset",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean),(0,G.Sn)("design:paramtypes",[Boolean])],VO.prototype,"track",null),VO=(0,G.Cg)([(0,j.EVk)("CopyPosition",W.Y.ui,"Copy the position of another `GameObject` when invoking `copy()`")],VO);let WO=class extends j.uAl{create(){super.create(),this._changePageButtons.onPageChanged.add(this.updateText,this),this._changePageButtons.onMaxPageChanged.add(this.updateText,this),this.updateText()}destroy(){this._changePageButtons.onPageChanged.remove(this.updateText,this),this._changePageButtons.onMaxPageChanged.remove(this.updateText,this),super.destroy()}updateText(){this._pageDisplayText.text=this._localizationSystem.getText(this._currentPageLocalizationKey,this._changePageButtons.currentPage,this._changePageButtons.maximumPage)}};(0,G.Cg)([(0,j.MnK)(AC.a),(0,G.Sn)("design:type",AC.a)],WO.prototype,"_changePageButtons",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],WO.prototype,"_currentPageLocalizationKey",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],WO.prototype,"_pageDisplayText",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],WO.prototype,"_localizationSystem",void 0),WO=(0,G.Cg)([(0,j.EVk)("CurrentPageDisplay",W.Y.uiPagination)],WO);let qO=class extends j.uAl{constructor(){super(...arguments),this._texts=[],this._nonFadeTimeMs=2500,this._fadeInTimeMs=2500,this._fadeOutTimeMs=2500,this._currentTextIndex=0}startCycle(){0!==this._texts.length?(this._currentTextIndex=0,this._texts.forEach((k=>{k.alpha=0})),this._texts[0].alpha=1,this.waitOnCurrentText()):j.VyI.log("MemberJarCyclingText: Texts array is empty",j.$bb.Warning)}waitOnCurrentText(){this._nonFadeTimer=tt.q.instance.game.time.create(!1),this._nonFadeTimer.addTimer(this._nonFadeTimeMs,this.fadeOutCurrentText,this),this._nonFadeTimer.start()}fadeOutCurrentText(){const k=this._texts[this._currentTextIndex];this._activeTween=tt.q.instance.game.add.tween(k,this).to({alpha:0},this._fadeOutTimeMs,j.GS3.Linear.None,!0),this._activeTween.onTweenComplete.addOnce((()=>{this._activeTween=null,this.fadeInNextText()}))}fadeInNextText(){this._currentTextIndex=(this._currentTextIndex+1)%this._texts.length;const k=this._texts[this._currentTextIndex];this._activeTween=tt.q.instance.game.add.tween(k,this).to({alpha:1},this._fadeInTimeMs,j.GS3.Cubic.InOut,!0),this._activeTween.onTweenComplete.addOnce((()=>{this._activeTween=null,this.waitOnCurrentText()}))}destroy(){this._activeTween&&(tt.q.instance.game.tweens.remove(this._activeTween),this._activeTween=null),tt.q.instance.game.time.destroy(this._nonFadeTimer),this._nonFadeTimer=null,super.destroy()}};(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",Array)],qO.prototype,"_texts",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qO.prototype,"_nonFadeTimeMs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qO.prototype,"_fadeInTimeMs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qO.prototype,"_fadeOutTimeMs",void 0),qO=(0,G.Cg)([(0,j.EVk)("CyclingText",W.Y.ui)],qO);var KO=U(82366);let zO=class extends j.y4o{constructor(){super(...arguments),this._pageCount=1,this._currentPage=0,this._dotRadius=5,this._dotSpacing=10,this._selectedPageColor="#8c8c8c",this._selectedPageAlpha=1,this._unselectedPageColor="#cccccc",this._unselectedPageAlpha=1,this._pageTransitionTimeMs=500,this._pageDots=[]}create(){super.create(),this.setRootContainer(new $e.Container),this.createPageDot(),this.setPageCount(this._pageCount),this.setCurrentPage(this._currentPage,0)}destroy(){this._pageDotTexture.destroy(),super.destroy()}getDimensions(){return new j.or0(this._totalWidth,2*this._dotRadius)}setPageCount(k){for(;this._pageDots.length>k;)this._pageDots.pop().destroy();const B=this.getRootContainer();for(;this._pageDots.length{G.tint=$c.TZ.lerpRgb(G.tintValue,B,k.percent)})).start()}}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],zO.prototype,"_pageCount",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],zO.prototype,"_currentPage",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],zO.prototype,"_dotRadius",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],zO.prototype,"_dotSpacing",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],zO.prototype,"_selectedPageColor",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],zO.prototype,"_selectedPageAlpha",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],zO.prototype,"_unselectedPageColor",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],zO.prototype,"_unselectedPageAlpha",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],zO.prototype,"_pageTransitionTimeMs",void 0),zO=(0,G.Cg)([(0,j.EVk)("DotPagination",W.Y.uiPagination)],zO);U(28829),U(96304);var YO=U(23365);let QO=class extends YO.s{constructor(){super(...arguments),this._durationMS=1e3,this._repeatCount=0,this.onHexCodeStringUpdate=new j.HN0,this.onHexCodeNumberUpdate=new j.HN0}startTween(){super.startTween(),this.doTween(this._from,this._to)}startTweenReverse(){super.startTween(),this.doTween(this._to,this._from)}doTween(k,B){const U="number"==typeof k?j.Q1f.numberToHexString(k).slice(0,-2):k,F="number"==typeof B?j.Q1f.numberToHexString(B).slice(0,-2):B;if(this.dispatchColorUpdate(U),!this._tween){const k={value:U};this._tween=j.W$e.instance.game.add.tween(k,this).to({value:F},this._durationMS,KA.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._repeatCount,this._yoyo),this._tween.onUpdate.add((()=>{if(k.value.startsWith("rgba")){const B=k.value.match(/\d+/g),U=$c.TZ.rgbToHex(parseInt(B[0]),parseInt(B[1]),parseInt(B[2]));this.dispatchColorUpdate(j.Q1f.numberToHexString(U).slice(0,-2))}})),this._tween.onTweenComplete.addOnce((()=>{this.destroyTween(),this.dispatchColorUpdate(F),this.onComplete.dispatch()}))}}dispatchColorUpdate(k){this.onHexCodeStringUpdate.dispatch(k),this.onHexCodeNumberUpdate.getBindingsCount()>0&&this.onHexCodeNumberUpdate.dispatch(j.Q1f.hexToRGB(k))}destroy(){this.onHexCodeStringUpdate.dispose(),this.onHexCodeNumberUpdate.dispose(),super.destroy()}};(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],QO.prototype,"_from",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],QO.prototype,"_to",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],QO.prototype,"_durationMS",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],QO.prototype,"_repeatCount",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],QO.prototype,"onHexCodeStringUpdate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],QO.prototype,"onHexCodeNumberUpdate",void 0),QO=(0,G.Cg)([(0,j.EVk)("HexColorCodeTween")],QO);var XO;U(68239);let ZO=XO=class extends j.uAl{set rarity(k){this.setupBannerWithRarity(k)}create(){super.create(),this.setupBannerWithRarity(this._rarity)}setupBannerWithRarity(k){this._rarity=k,this._bannerText.text=XO.RARITY_LOCALIZATION_KEYS[k],this._bannerText.fill=XO.FONT_COLOURS[k],this._bannerBackerCommon.active=k===io.E.Common,this._bannerBackerUncommon.active=k===io.E.Uncommon,this._bannerBackerRare.active=k===io.E.Rare,this._bannerBackerHeroic.active=k===io.E.Heroic,this._bannerBackerLegendary.active=k===io.E.Legendary}};ZO.FONT_COLOURS={[io.E.Common]:"#363636",[io.E.Uncommon]:"#363636",[io.E.Rare]:"#FFFFFF",[io.E.Heroic]:"#FFFFFF",[io.E.Legendary]:"#363636"},ZO.RARITY_LOCALIZATION_KEYS={[io.E.Common]:"RARITY_COMMON",[io.E.Uncommon]:"RARITY_UNCOMMON",[io.E.Rare]:"RARITY_RARE",[io.E.Heroic]:"RARITY_HEROIC",[io.E.Legendary]:"RARITY_LEGENDARY"},(0,G.Cg)([(0,j.gfw)(io.E),(0,G.Sn)("design:type",Number)],ZO.prototype,"_rarity",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],ZO.prototype,"_bannerText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ZO.prototype,"_bannerBackerCommon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ZO.prototype,"_bannerBackerUncommon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ZO.prototype,"_bannerBackerRare",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ZO.prototype,"_bannerBackerHeroic",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ZO.prototype,"_bannerBackerLegendary",void 0),ZO=XO=(0,G.Cg)([(0,j.EVk)("ItemRarityBanner",j.YH6.ui)],ZO);var JO;U(79424),U(89192);let tI=JO=class extends j.y4o{constructor(){super(...arguments),this._spinnerSpeed=3,this.onStateAvailable=new j.HN0}get spinningTween(){return this._spinningTween}create(){super.create();{const k=this._spinnerSpeed>=0?360:-360,B=JO.BASE_SPINNING_TIME_MS/Math.abs(this._spinnerSpeed);this._spinningTween=tt.q.instance.game.add.tween(this._spinnerImage.GameObject.transform,this).to({localRotation:k},B,j.GS3.Linear.None,!0,0,-1),this._hideFadeTime>0&&this.hide(this._hideFadeTime)}}destroy(){this._spinningTween&&(this._spinningTween.stop(),tt.q.instance.game.tweens.remove(this._spinningTween)),this._spinningTween=null,this.onStateAvailable.dispose(),super.destroy()}hide(k){tt.q.instance.game.add.tween(this._spinnerImage,this._spinnerImage).to({alpha:0},k,j.GS3.Linear.None,!0).onTweenComplete.addOnce((()=>{this.onStateAvailable.dispatch()}))}show(k){tt.q.instance.game.add.tween(this._spinnerImage,this._spinnerImage).to({alpha:1},k,j.GS3.Linear.None,!0)}};tI.BASE_SPINNING_TIME_MS=1e3,(0,G.Cg)([(0,j.MnK)(j.y4o),(0,G.Sn)("design:type",j.y4o)],tI.prototype,"_spinnerImage",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tI.prototype,"_spinnerSpeed",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],tI.prototype,"_hideFadeTime",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],tI.prototype,"onStateAvailable",void 0),tI=JO=(0,G.Cg)([(0,j.EVk)("LoadingSpinner",W.Y.ui)],tI);U(56617);let eI=class extends pt._{constructor(){super(...arguments),this.localizedText=new j.HN0}destroy(){this.localizedText.dispose(),super.destroy()}localize(k=this.key){const B=this.localizer.getText(k);return this.localizedText.dispatch(B),B}getData(){return this.localizer.getText(this.key)}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],eI.prototype,"localizer",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],eI.prototype,"key",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],eI.prototype,"localizedText",void 0),eI=(0,G.Cg)([(0,j.EVk)("Localizer",W.Y.utility)],eI);let iI=class extends j.uAl{create(){super.create(),this._imageAndQuantityQuantity=this._imageAndQuantityRoot.findComponentInChildren(j.EYj)}setData(k){if(this._drop=k,k){La.l.removeAll(this._imageOnlyImage.legacyTransform.group,!0),La.l.removeAll(this._imageAndQuantityImage.legacyTransform.group,!0);const B=k.N>1;this._imageOnlyRoot.active=!B,this._imageAndQuantityRoot.active=B;const U=B?this._imageAndQuantityImage:this._imageOnlyImage;if(k.image){const[B,F]=TC.y.toInjectionParams(k.image);tt.q.instance.prodigy.create.sprite(0,0,B,F,void 0,(k=>{k.smoothed=!0,U.legacyTransform.group.addChild(k)}))}else tt.q.instance.prodigy.icon.createFromDataAdvanced(k,U.legacyTransform.group,0,0).then((([k,B])=>j.qFr.setSmoothed(B.texture,!0))).catch(j.RQr.createHandler(`LootCardWithQuantityComponent: Failed to create item icon ${k.type}-${k.ID}`));B&&(this._imageAndQuantityQuantity.text=k.N.toString())}}getData(){return this._drop}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iI.prototype,"_imageOnlyRoot",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iI.prototype,"_imageOnlyImage",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iI.prototype,"_imageAndQuantityRoot",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iI.prototype,"_imageAndQuantityImage",void 0),iI=(0,G.Cg)([(0,j.EVk)("LootCardWithQuantityComponent",W.Y.adventureUi)],iI);U(90614),U(43714);let sI=class extends YO.s{constructor(){super(...arguments),this._from=0,this._to=1,this._durationMS=1e3,this._repeatCount=0,this.onUpdate=new j.HN0,this.roundValues=!1}startTween(){if(super.startTween(),!this._tween){const k={value:this._from};this._tween=j.W$e.instance.game.add.tween(k,this).to({value:this._to},this._durationMS,KA.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._repeatCount,this._yoyo),this._tween.onUpdate.add((()=>{const B=this.roundValues?Math.round(k.value):k.value;this.onUpdate.dispatch(B)})),this._tween.onTweenComplete.addOnce((()=>{this.destroyTween();const k=this.roundValues?Math.round(this._to):this._to;this.onUpdate.dispatch(k),this.onComplete.dispatch()}))}}destroy(){this.onUpdate.dispose(),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],sI.prototype,"_from",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],sI.prototype,"_to",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],sI.prototype,"_durationMS",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],sI.prototype,"_repeatCount",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],sI.prototype,"onUpdate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],sI.prototype,"roundValues",void 0),sI=(0,G.Cg)([(0,j.EVk)("NumericTween")],sI);U(33744);let nI=class extends j.uAl{constructor(){super(...arguments),this.offset=0,this.clampPosition=!1,this.minPosition=0,this.maxPosition=0}create(){var k;super.create(),this.setContainerPosition(null===(k=this.anchorTarget.fillTransform)||void 0===k?void 0:k.rectTransformDimensions.width),this.anchorTarget.onProgress.add((()=>{var k;this.setContainerPosition(null===(k=this.anchorTarget.fillTransform)||void 0===k?void 0:k.rectTransformDimensions.width)})),this.anchorTarget.onToggleAnchors.add((k=>{this.gameObject.active=k}))}destroy(){var k,B;super.destroy(),null===(k=this.anchorTarget.onProgress)||void 0===k||k.dispose(),null===(B=this.anchorTarget.onToggleAnchors)||void 0===B||B.dispose()}setContainerPosition(k=0){const B=k-(this.isInnerContainer?this.container.rectTransformDimensions.width:0)+this.offset;this.container.posX=this.clampPosition?j.cj9.clamp(B,this.minPosition,this.maxPosition):B}};(0,G.Cg)([(0,j.MnK)(hf.a),(0,G.Sn)("design:type",hf.a)],nI.prototype,"anchorTarget",void 0),(0,G.Cg)([(0,j.MnK)(j.XVE),(0,G.Sn)("design:type",j.XVE)],nI.prototype,"container",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],nI.prototype,"offset",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],nI.prototype,"clampPosition",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],nI.prototype,"minPosition",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],nI.prototype,"maxPosition",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],nI.prototype,"isInnerContainer",void 0),nI=(0,G.Cg)([(0,j.EVk)("ProgressBarAnchor",W.Y.ui)],nI);let aI=class extends j.uAl{constructor(){super(...arguments),this.onFillValueIncrease=new j.HN0,this.onFillValueDecrease=new j.HN0,this.onFillValueUnchanged=new j.HN0,this.onBarFillValueMaxed=new j.HN0}listen(k,B,U){U-B>0?this.onFillValueIncrease.dispatch():U-B<0?this.onFillValueDecrease.dispatch():this.onFillValueUnchanged.dispatch(),U>=1&&this.onBarFillValueMaxed.dispatch()}destroy(){this.onFillValueDecrease.dispose(),this.onFillValueIncrease.dispose(),this.onFillValueUnchanged.dispose(),this.onBarFillValueMaxed.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],aI.prototype,"onFillValueIncrease",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],aI.prototype,"onFillValueDecrease",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],aI.prototype,"onFillValueUnchanged",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],aI.prototype,"onBarFillValueMaxed",void 0),aI=(0,G.Cg)([(0,j.EVk)("ProgressBarChangeListener",W.Y.ui)],aI);let rI=class extends j.uAl{countAsPercent(k,B,U){this._text.text=`${Math.floor(100*U)}%`}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],rI.prototype,"_text",void 0),rI=(0,G.Cg)([(0,j.EVk)("ProgressBarCounter")],rI);var oI;U(34958),U(12408),U(46459),U(41365);!function(k){k[k.None=0]="None",k[k.Value=1]="Value",k[k.Percentage=2]="Percentage",k[k.PercentagePreNormalized=3]="PercentagePreNormalized",k[k.Rounded=4]="Rounded",k[k.OneDecimal=5]="OneDecimal"}(oI||(oI={}));let hI=class extends j.uAl{constructor(){super(...arguments),this.valueDisplay=oI.Value,this.updateOnSettingChange=!1}postCreate(){var k,B;super.postCreate(),this._setting=Fb.B[this.settingType],void 0!==this._setting?(this._setting.onChanged.add(this.onSettingChange,this),this.label.text=this.getInjectedValue(j.$Bt.LocalizationService).getText(this._setting.data.name),this.slider.minValue=null!==(k=this._setting.data.minValue)&&void 0!==k?k:0,this.slider.maxValue=null!==(B=this._setting.data.maxValue)&&void 0!==B?B:this._setting.data.defaultValue,this.slider.value=this._setting.value,this.slider.onValueChanged.add(this.onSliderChange,this),this.updateValueText(),this.slider.value=this._setting.value):j.VyI.log(`SettingSlider: postCreate: setting is undefined, no setting named ${this.settingType} found`,j.$bb.Error)}destroy(){var k;null===(k=this._setting)||void 0===k||k.onChanged.remove(this.onSettingChange,this),this.slider.onValueChanged.remove(this.onSliderChange,this),this._setting=void 0,super.destroy()}updateValueText(){var k,B;if(!this.valueText)return;if(this.valueDisplay===oI.None)return void(this.valueText.GameObject.active=!1);this.valueText.GameObject.active=!0;const U=null!==(B=null===(k=this._setting)||void 0===k?void 0:k.value)&&void 0!==B?B:0;switch(this.valueDisplay){case oI.Value:this.valueText.text=U.toString();break;case oI.Percentage:this.valueText.text=`${Math.round(100*this.slider.normalizedValue)}%`;break;case oI.PercentagePreNormalized:this.valueText.text=`${Math.round(100*this.slider.value)}%`;break;case oI.Rounded:this.valueText.text=Math.round(U).toString();break;case oI.OneDecimal:this.valueText.text=U.toFixed(1)}}onSliderChange(k){void 0!==this._setting?(this._setting.setStoredValue(k),this.updateValueText()):j.VyI.log(`SettingSlider: onSliderChange: setting is undefined, no setting named ${this.settingType} found`,j.$bb.Error)}onSettingChange(k){this.updateOnSettingChange&&this.slider.value!==k&&(this.slider.value=k)}};(0,G.Cg)([(0,j.gfw)(Fb._),(0,G.Sn)("design:type",String)],hI.prototype,"settingType",void 0),(0,G.Cg)([(0,j.MnK)(Rh.H),(0,G.Sn)("design:type",Rh.H)],hI.prototype,"slider",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],hI.prototype,"label",void 0),(0,G.Cg)([(0,j.gfw)(oI),(0,G.Sn)("design:type",Number)],hI.prototype,"valueDisplay",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],hI.prototype,"valueText",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],hI.prototype,"updateOnSettingChange",void 0),hI=(0,G.Cg)([(0,j.EVk)("SettingSlider")],hI);var cI=U(95865);let dI=class extends cI.A{constructor(){super(...arguments),this._shakeDurationMs=1e3,this._amplitudeX=0,this._amplitudeY=0,this._repeatCount=0,this._disabled=!1}set disabled(k){this._disabled=k}startTween(){if(super.startTween(),!this._tween&&!this._disabled){const k=this._targetGameObject.transform;(0,ut.v)(!!k,"Cannot be attached to a GameObject without a transform");const B={amplitudeX:0,amplitudeY:0},U={x:k.localPosition.x,y:k.localPosition.y};this._tween=tt.q.instance.game.add.tween(B,this).to({amplitudeX:this._amplitudeX,amplitudeY:this._amplitudeY},this._shakeDurationMs,KA.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._repeatCount,this._yoyo),this._tween.onUpdate.add((()=>{const F=this._easing===KA.i.LinearNone?this._amplitudeX:B.amplitudeX,G=this._easing===KA.i.LinearNone?this._amplitudeY:B.amplitudeY;k.setPosition(U.x+Math.random()*F*2-F,U.y+Math.random()*G*2-G)})),this._tween.onTweenComplete.addOnce((()=>{this.destroyTween(),k.setPosition(U.x,U.y),this.onComplete.dispatch()}))}}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],dI.prototype,"_shakeDurationMs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],dI.prototype,"_amplitudeX",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],dI.prototype,"_amplitudeY",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],dI.prototype,"_repeatCount",void 0),dI=(0,G.Cg)([(0,j.EVk)("ShakeTransform",W.Y.motion)],dI);U(57103);let lI=class extends j.y4o{constructor(){super(...arguments),this._alpha=1,this._tint="#FFFFFF"}set alpha(k){this._alpha=k,this._sprite&&(this._sprite.alpha=k)}get alpha(){return this._alpha}set tint(k){this._tint=k,this._sprite&&(this._sprite.tint=$e.Color.shared.setValue(k.toLowerCase()).toNumber())}get tint(){return this._tint}create(){super.create(),this._atlas&&this.createTilingSprite().catch(j.RQr.createHandler("Failed to create tiling sprite"))}createTilingSprite(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this.gameObject.transform;if(!(k instanceof j.XVE))return;tt.q.instance.prodigy.load.isFileLoaded(this._atlas)||(yield tt.q.instance.prodigy.load.assetsAsPromise(this._atlas));const B=new $e.TilingSprite(tt.q.instance.game.cache.getTexture(this._atlas,this._frame),k.fullWidth,k.fullHeight);B.alpha=this._alpha,B.tint=$e.Color.shared.setValue(this._tint).toNumber(),this._sprite=B,this.setRootContainer(B)}))}getDimensions(){const k=this.getRootContainer();return k?new j.or0(k.width,k.height):j.or0.ZERO}};(0,G.Cg)([(0,j.W_S)(),(0,j.Bak)(),(0,G.Sn)("design:type",String)],lI.prototype,"_atlas",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],lI.prototype,"_frame",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],lI.prototype,"_alpha",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],lI.prototype,"_tint",void 0),lI=(0,G.Cg)([(0,j.EVk)("TiledUISprite",W.Y.ui)],lI);let uI=class extends((0,Wi.o)(j.y4o)){constructor(){super(...arguments),this._sizeOffset=j.I9Y.ZERO,this._tint="#FFFFFF",this._alpha=1,this._tilePositionSpeed=j.I9Y.ZERO,this._onSpriteLoaded=new j.HN0,this._containerSize=new j.or0,this._listenerCreated=!1}postCreate(){super.postCreate(),this.createBackground()}update(){if(super.update(),null!=this._tileSprite){const k=tt.q.instance.game.time.deltaMS/1e3;this._tileSprite.tilePosition.x+=this._tilePositionSpeed.x*k,this._tileSprite.tilePosition.y+=this._tilePositionSpeed.y*k}}destroy(){this._onSpriteLoaded.dispose(),this._container.destroy(),super.destroy()}getDimensions(){return this._containerSize.setTo(this._container.width,this._container.height),this._containerSize}createBackground(){this.createTiledBackground().catch((k=>{j.VyI.log(`There was an error creating a tiled background:\n${k}`,j.$bb.Error)}))}createTiledBackground(){return(0,G.sH)(this,void 0,void 0,(function*(){tt.q.instance.prodigy.load.isFileLoaded(this._tilingGraphic)||(yield this._assetLoader.loadAssets([this._tilingGraphic])),null!=this._tileSprite&&(this._container.removeChild(this._tileSprite),this._tileSprite.destroy(),this._tileSprite=null);const k=tt.q.instance.game.cache.getTexture(this._tilingGraphic),B=this.GameObject.transform.rectTransformDimensions;null!=k&&(this._tileSprite=new $e.TilingSprite(k,B.width+this._sizeOffset.x,B.height+this._sizeOffset.y),this._tileSprite.tint=$e.utils.string2hex(this._tint),this._tileSprite.alpha=this._alpha,null==this._container&&(this._container=tt.q.instance.game.add.container(),this.setRootContainer(this._container)),this._container.addChild(this._tileSprite)),this._listenerCreated||(this.addListenerToSignal(this._rectTransform.onDimensionsChanged,this.createBackground.bind(this)),this._listenerCreated=!0),this._onSpriteLoaded.dispatch()}))}};(0,G.Cg)([(0,j.Cdj)(j.t5G.AssetLoader),(0,G.Sn)("design:type",Hi.A)],uI.prototype,"_assetLoader",void 0),(0,G.Cg)([(0,j.Pqz)(j.XVE),(0,G.Sn)("design:type",j.XVE)],uI.prototype,"_rectTransform",void 0),(0,G.Cg)([(0,j.i0J)(j.Z$z.SingleImage),(0,G.Sn)("design:type",String)],uI.prototype,"_tilingGraphic",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],uI.prototype,"_sizeOffset",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],uI.prototype,"_tint",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],uI.prototype,"_alpha",void 0),(0,G.Cg)([(0,j._Hz)(),(0,G.Sn)("design:type",j.I9Y)],uI.prototype,"_tilePositionSpeed",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uI.prototype,"_onSpriteLoaded",void 0),uI=(0,G.Cg)([(0,j.EVk)("TilingSprite",j.YH6.ui,"Tiles a graphic contained inside the object RectTransform")],uI);let fI=class extends j.uAl{postCreate(){super.postCreate(),this.text.text="Interact for test log messages",this.slider.onValueChanged.add((()=>{this.text.text=`Slider: ${this.slider.value.toString()}`}))}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],fI.prototype,"text",void 0),(0,G.Cg)([(0,j.MnK)(Rh.H),(0,G.Sn)("design:type",Rh.H)],fI.prototype,"slider",void 0),fI=(0,G.Cg)([(0,j.EVk)("UI Test",j.YH6.ui)],fI);var bI,pI=U(89360),vI=U(25286),gI=U(3119),mI=U(8096);let yI=bI=class extends j.uAl{constructor(){super(...arguments),this.onProgressReceived=new j.HN0,this.onTimeRemaining=new j.HN0,this.onItemDataReceived=new j.HN0,this.paramSwapItemData=new j.HN0,this.onMemberItemDataReceived=new j.HN0,this.paramSwapMemberItemData=new j.HN0,this.onSplashImageReceived=new j.HN0,this.onPreviousDataExists=new j.HN0,this.onAllDataReceived=new j.HN0,this.onAutoSurface=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.getWeeklyChallengeData()}getWeeklyChallengeData(){this._waitingForLoad&&(this._waitingForLoad.active=!1),pI.h.instance.getData().then((k=>{var B,U,F,G;if(!(null==k?void 0:k.weeklyChallengeData))throw new Error("Data object is undefined.");if(!k.weeklyChallengeData.currentChallenge)throw new Error("No current challenge exists.");this._waitingForLoad&&(this._waitingForLoad.active=!0);const $=k.weeklyChallengeData.currentChallenge.progressCount,H=k.weeklyChallengeData.currentChallenge.goalCount;this.onProgressReceived.dispatch($,H);const V=k.weeklyChallengeData.timeRemaining;this.onTimeRemaining.dispatch(V);const W=null===(B=k.weeklyChallengeData.previousChallenge)||void 0===B?void 0:B.reward.default.ID,q=null===(U=k.weeklyChallengeData.previousChallenge)||void 0===U?void 0:U.reward.default.type,K=null===(F=k.weeklyChallengeData.previousChallenge)||void 0===F?void 0:F.reward.member.ID,z=null===(G=k.weeklyChallengeData.previousChallenge)||void 0===G?void 0:G.reward.member.type,Y=k.weeklyChallengeData.currentChallenge.reward.default.ID,Q=k.weeklyChallengeData.currentChallenge.reward.default.type,X=k.weeklyChallengeData.currentChallenge.reward.member.ID,Z=k.weeklyChallengeData.currentChallenge.reward.member.type,J=k.weeklyChallengeData.previousChallenge&&k.weeklyChallengeData.previousChallenge.progressCount>=k.weeklyChallengeData.previousChallenge.goalCount&&!this.checkRewardOwned(q,W,z,K)&&tt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_WEEKLY_CHALLENGE,ls.B.BREADCRUMB_FIRST_CHALLENGE_COMPLETE);J?(this.onItemDataReceived.dispatch(q,W),this.onMemberItemDataReceived.dispatch(z,K),this.paramSwapItemData.dispatch(W,q),this.paramSwapMemberItemData.dispatch(K,z)):(this.onItemDataReceived.dispatch(Q,Y),this.onMemberItemDataReceived.dispatch(Z,X),this.paramSwapItemData.dispatch(Y,Q),this.paramSwapMemberItemData.dispatch(X,Z));let et=!1;if($>=H&&this.checkRewardOwned(Q,Y,Z,X)&&(et=!0),et&&-1===k.weeklyChallengeData.timeRemaining)throw new Error("No future challenge exists.");this.onAllDataReceived.dispatch($,H,V,k.isTransition,et,J);const it=k.weeklyChallengeData.currentChallenge.splashImage;if(j.Aq$.isDefined(it)&&it.length>0&&this.onSplashImageReceived.dispatch(k.weeklyChallengeData.currentChallenge.splashImage),J){const k=tt.q.instance.prodigy.open.findMenuByType(gI.o);null==k||k.forceClose(),this.onPreviousDataExists.dispatch()}et||J||this.checkAutoSurface()})).catch((k=>{j.VyI.log(`Weekly Challenge feature is disabled. WeeklyChallengeDataComponent found no data: ${j.RQr.stringify(k)}`,j.$bb.Verbose),this._disableOnError&&(this._disableOnError.active=!1)}))}checkRewardOwned(k,B,U,F){const G="dorm"===k?this._player.player.house.getOwned(B)>0:this._player.player.backpack.hasItem(k,B)>0,j="dorm"===U?this._player.player.house.getOwned(F)>0:this._player.player.backpack.hasItem(U,F)>0;return G||j}checkAutoSurface(){if(bI._isSessionCountUpdated)return;if(tt.q.instance.prodigy.open.isMenuOpen(vI.g)||tt.q.instance.prodigy.open.isMenuOpen(gI.o)||tt.q.instance.prodigy.open.isMenuOpen(mI.a))return;bI._isSessionCountUpdated=!0;const k=this._player.player.data;if(j.Aq$.isDefined(k.weeklySessionTimestamp)||(k.weeklySessionTimestamp=0),j.Aq$.isDefined(k.weeklySessionCount)){jp.R.getISOWeekNumber(k.weeklySessionTimestamp)===jp.R.getISOWeekNumber(Date.now())?k.weeklySessionCount+=1:k.weeklySessionCount=0}else k.weeklySessionCount=0;pI.h.instance.autoSurfaceSessionInterval>0&&k.weeklySessionCount%pI.h.instance.autoSurfaceSessionInterval==0?this.onAutoSurface.dispatch():0===pI.h.instance.autoSurfaceSessionInterval&&(Qt.J.isDateWithinSameDay(new Date,new Date(k.weeklySessionTimestamp))||this.onAutoSurface.dispatch()),k.weeklySessionTimestamp=Date.now(),this._player.player.updated=!0}destroy(){this.onProgressReceived.dispose(),this.onTimeRemaining.dispose(),this.onItemDataReceived.dispose(),this.paramSwapItemData.dispose(),this.onMemberItemDataReceived.dispose(),this.paramSwapMemberItemData.dispose(),this.onSplashImageReceived.dispose(),this.onPreviousDataExists.dispose(),this.onAllDataReceived.dispose(),this.onAutoSurface.dispose(),super.destroy()}};var _I;yI._isSessionCountUpdated=!1,(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],yI.prototype,"_player",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"onProgressReceived",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"onTimeRemaining",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"onItemDataReceived",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"paramSwapItemData",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"onMemberItemDataReceived",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"paramSwapMemberItemData",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"onSplashImageReceived",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"onPreviousDataExists",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"onAllDataReceived",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],yI.prototype,"_waitingForLoad",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],yI.prototype,"_disableOnError",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],yI.prototype,"onAutoSurface",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],yI.prototype,"_runOnLoad",void 0),yI=bI=(0,G.Cg)([(0,j.EVk)("WeeklyChallengeData",W.Y.data)],yI),function(k){k.Standard="standard",k.Hidden="hidden",k.RewardAvailable="reward_available"}(_I||(_I={}));let EI=class extends j.uAl{constructor(){super(...arguments),this.onRewardUi=new j.HN0,this.onNotRewardUi=new j.HN0,this.uiMode=_I.Standard}updateProgressDisplay(k,B,U=0,F=!1,G=!1,$=!1){this.clearDisplay();const H=Boolean(k>=B);H&&!G?this.onRewardUi.dispatch():this.onNotRewardUi.dispatch();const V=Boolean((H&&F||!H)&&!G);this._progressBarObject.active=V,this._timeRemainingObject.active=V,V&&(this._timeRemainingTimer&&(U>=0?this._timeRemainingTimer.setCountdownTimeMS(U):this._timeRemainingObject.active=!1),this._progressBar&&(this._progressShineObject.active=F,F&&this._shineAnimation.playAnimation(this._shineAnimationName,!1,!0),H?(this._progressBar.setValue(1),this._progressBar.setBarText(tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(this._progressBarCompleteLocalizedTextKey)),this._progressBar.setFillColor(this._progressBarCompleteFillColor),this._progressBar.setOuterColor(this._progressBarCompleteOutlineColor),this._progressBar.setTextOutlineColor(this._progressBarCompleteOutlineColor),F&&this._claimRewardTimeout.startTimer()):(this._progressBar.setValue(k/B),this._progressBar.setBarText(`${k} / ${B}`)))),!H||G||F||this._claimRewardTimeout.onTimeout.dispatch(),this._nextChallengeObject.active=G,G&&this._nextChallengeTimer&&(U>=0?this._nextChallengeTimer.setCountdownTimeMS(U):this._nextChallengeObject.active=!1),this.toggleOverlayOnClick(!H&&!$)}clearDisplay(){this._notificationBadgeObject.active=!1,this._claimRewardObject.active=!1,this._nextChallengeObject.active=!1,this._timeRemainingObject.active=!1,this._progressShineObject.active=!1,this._progressBarObject.active=!1,this._overlayButton.onClick.active=!1,this.uiMode=_I.Standard}shiftHudUi(k){this.uiMode===_I.Hidden&&this._hudUi.transform.setPositionX(k)}toggleOverlayOnClick(k){this._overlayButton.onClick.active=k,this._overlayButton.useHandCursor=k}destroy(){this.onRewardUi.dispose(),this.onNotRewardUi.dispose(),super.destroy()}};(0,G.Cg)([(0,j.MnK)(fg.e),(0,G.Sn)("design:type",fg.e)],EI.prototype,"_notificationBadge",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],EI.prototype,"_timeRemainingTimer",void 0),(0,G.Cg)([(0,j.MnK)(mr.U),(0,G.Sn)("design:type",mr.U)],EI.prototype,"_nextChallengeTimer",void 0),(0,G.Cg)([(0,j.MnK)(Os.j),(0,G.Sn)("design:type",Os.j)],EI.prototype,"_shineAnimation",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],EI.prototype,"_shineAnimationName",void 0),(0,G.Cg)([(0,j.MnK)(ys.z),(0,G.Sn)("design:type",ys.z)],EI.prototype,"_progressBar",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],EI.prototype,"_progressBarCompleteFillColor",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],EI.prototype,"_progressBarCompleteOutlineColor",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],EI.prototype,"_progressBarCompleteLocalizedTextKey",void 0),(0,G.Cg)([(0,j.MnK)(fh.E),(0,G.Sn)("design:type",fh.E)],EI.prototype,"_claimRewardTimeout",void 0),(0,G.Cg)([(0,j.MnK)(F.$),(0,G.Sn)("design:type",F.$)],EI.prototype,"_overlayButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],EI.prototype,"_notificationBadgeObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],EI.prototype,"_claimRewardObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],EI.prototype,"_nextChallengeObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],EI.prototype,"_timeRemainingObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],EI.prototype,"_progressShineObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],EI.prototype,"_progressBarObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],EI.prototype,"_hudUi",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],EI.prototype,"onRewardUi",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],EI.prototype,"onNotRewardUi",void 0),EI=(0,G.Cg)([(0,j.EVk)("WeeklyChallengePanelController",j.YH6.ui)],EI);let wI=class extends j.uAl{constructor(){super(...arguments),this._showNotification=new j.HN0,this._hideNotification=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.updateNotification()}destroy(){this._showNotification.dispose(),this._hideNotification.dispose(),super.destroy()}updateNotification(){!this.hasSeenCrystalCaverns()&&this.isCrystalCavernsEnabled()||this.isTitanUnlocked()&&this.isNewTitan()||this.shouldShowAcademyIndicator()||this.shouldShowKeystoneIndicator()?this._showNotification.dispatch():this._hideNotification.dispatch()}hasSeenCrystalCaverns(){return this._breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_DUNGEONS,ls.B.BREADCRUMB_STARTED_CRYSTAL_CAVERNS)}isCrystalCavernsEnabled(){return tt.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableCrystalCaverns",!0)}isNewTitan(){const k=tt.q.instance.prodigy.titansNetworkHandler;return k.isTitanAlive()&&k.isNewTitan()}isTitanUnlocked(){return this._featureRequirements.meetsRequirementsDeprecated(8)}shouldShowAcademyIndicator(){return this._breadcrumbManager.isBreadcrumbComplete(ls.B.BREADCRUMB_UNLOCK_ACADEMY,ls.B.BREADCRUMB_UNLOCK_ACADEMY_NOOT_DIALOGUE)&&!this._breadcrumbManager.isBreadcrumbComplete(ls.B.BREADCRUMB_UNLOCK_ACADEMY,ls.B.BREADCRUMB_CLICKED_WORLD_MAP_BUTTON)}shouldShowKeystoneIndicator(){return Zo.N.anyKeystonesToPlace()&&this._breadcrumbManager.isBreadcrumbComplete(ls.B.FEATURE_ACADEMY_TOWERS,ls.B.BREADCRUMB_ACADEMY_NO_KEYSTONES)}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],wI.prototype,"_showNotification",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],wI.prototype,"_hideNotification",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],wI.prototype,"_runOnLoad",void 0),(0,G.Cg)([(0,j.Cdj)("db5-fb6e"),(0,G.Sn)("design:type",Object)],wI.prototype,"_featureRequirements",void 0),(0,G.Cg)([(0,j.Cdj)("12f-4e29"),(0,G.Sn)("design:type",sh.F)],wI.prototype,"_breadcrumbManager",void 0),wI=(0,G.Cg)([(0,j.EVk)("WorldMapButtonNotificationLogic")],wI);var TI;U(45902),U(72849);!function(k){k.Add="add",k.Subtract="subtract",k.Multiply="multiply",k.Divide="divide",k.Remainder="remainder"}(TI||(TI={}));let SI=class extends j.uAl{constructor(){super(...arguments),this.operation=TI.Add,this.operand=1,this.onResult=new j.HN0}run(k){switch(this.operation){default:case TI.Add:return this.onResult.dispatch(k+this.operand);case TI.Subtract:return this.onResult.dispatch(k-this.operand);case TI.Multiply:return this.onResult.dispatch(k*this.operand);case TI.Divide:return this.onResult.dispatch(k/this.operand);case TI.Remainder:return this.onResult.dispatch(k%this.operand)}}destroy(){this.onResult.dispose(),super.destroy()}};(0,G.Cg)([(0,j.gfw)(TI),(0,G.Sn)("design:type",String)],SI.prototype,"operation",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],SI.prototype,"operand",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],SI.prototype,"onResult",void 0),SI=(0,G.Cg)([(0,j.EVk)("Arithmetic",W.Y.utility)],SI);U(80882);var AI=U(88253);let CI=class extends j.uAl{constructor(){super(...arguments),this.runOnCreate=!1,this._watchMode=!1,this._watchInterval=1e3,this.testIsPlaying=!1,this.onCutsceneChange=new j.HN0,this.onIsPlaying=new j.HN0,this.onIsNotPlaying=new j.HN0,this.onStartedPlaying=new j.HN0,this.onStoppedPlaying=new j.HN0,this.onDebugPrintVariables=new j.HN0,this.wasPlaying=!1,this._firstUpdateCalled=!1}get watchMode(){return this._watchMode}set watchMode(k){this._watchMode=k,!this.GameObject.isDestroyed&&this._firstUpdateCalled&&(k?this.startWatchMode():this.stopWatchMode())}create(){super.create(),this.runOnCreate&&(this.check(),this.watchMode&&this.startWatchMode())}firstUpdate(){this._firstUpdateCalled=!0}startWatchMode(){this.stopWatchMode(),this._watchIntervalRefId=setInterval((()=>this.check()),this._watchInterval)}stopWatchMode(){clearInterval(this._watchIntervalRefId)}check(k=!1){const B=AI.M.isCutscenePlaying();this.dispatchSignals(B,k),this.dispatchDebugSignals(),this.wasPlaying=B}dispatchSignals(k,B=!1){(this.wasPlaying!==k||B)&&(this.onCutsceneChange.dispatch(k),k&&this.onIsPlaying.dispatch(),!k&&this.onIsNotPlaying.dispatch(),this.wasPlaying&&this.onStoppedPlaying.dispatch(),!this.wasPlaying&&this.onStartedPlaying.dispatch())}destroy(){this.stopWatchMode(),this.onCutsceneChange.dispose(),this.onIsPlaying.dispose(),this.onIsNotPlaying.dispose(),this.onStartedPlaying.dispose(),this.onStoppedPlaying.dispose(),this.onDebugPrintVariables.dispose(),super.destroy()}dispatchDebugSignals(){const k=AI.M.getCutsceneDeterminers();this.onDebugPrintVariables.dispatch(JSON.stringify(k,void 0,2))}};(0,G.Cg)([(0,j.vkK)(),(0,j.YLv)("Run on create"),(0,G.Sn)("design:type",Boolean)],CI.prototype,"runOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,j.YLv)("enabled will invoke `check()` method on a given interval"),(0,G.Sn)("design:type",Boolean)],CI.prototype,"_watchMode",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.YLv)("Interval in milliseconds where`check()` will be invoked"),(0,G.Sn)("design:type",Number)],CI.prototype,"_watchInterval",void 0),(0,G.Cg)([(0,j.vkK)(),(0,j.YLv)("TEST_ONLY_PROPERTY - Used only for testing in editor"),(0,G.Sn)("design:type",Boolean)],CI.prototype,"testIsPlaying",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Fires the current prediction for a cutscene playing(true/false) "),(0,G.Sn)("design:type",j.HN0)],CI.prototype,"onCutsceneChange",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Fires only when the cutscene is playing"),(0,G.Sn)("design:type",j.HN0)],CI.prototype,"onIsPlaying",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Fires only when the cutscene is not playing"),(0,G.Sn)("design:type",j.HN0)],CI.prototype,"onIsNotPlaying",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Fires when a cutscene starts playing"),(0,G.Sn)("design:type",j.HN0)],CI.prototype,"onStartedPlaying",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Fires when a cutscene stops playing"),(0,G.Sn)("design:type",j.HN0)],CI.prototype,"onStoppedPlaying",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Fires with checked variables"),(0,G.Sn)("design:type",j.HN0)],CI.prototype,"onDebugPrintVariables",void 0),CI=(0,G.Cg)([(0,j.EVk)("CutsceneChecker",W.Y.utility,"Utility component that tries to guess if a cutscene is playing and respond with signals")],CI);let OI=class extends((0,Wi.o)(j.uAl)){constructor(){super(...arguments),this.debug=!1,this.zeroOutPlaceholderTransforms=!1,this.resizePlaceholderToObject=!1,this.prefabGuid=null,this.preloadDependencies=!0,this.spawnedObjectWidth=100,this.spawnedObjectHeight=100,this.staggerPlaceholderCreation=!1,this.onPlaceholdersCreated=new j.HN0,this.onObjectScreenEntered=new j.HN0,this.onObjectScreenExited=new j.HN0,this.placeholders=[],this._pendingPlaceholderOperations=new Map}create(){var k;super.create(),this.staggerPlaceholderCreation=null!==(k=window.asdf)&&void 0!==k?k:this.staggerPlaceholderCreation,this._objectPool=new j.iyL((()=>this.spawnPrefab())),this._objectPool.autoRecycleOnDisable=!1,this._deadPoolContainer||(this._deadPoolContainer=new j._mx(this.gameObject),this._deadPoolContainer.name=`${this.gameObject.name} dead pool`,this._deadPoolContainer.active=!1,this._deadPoolContainer.addComponent(j.dLy))}postCreate(){var k;const B=null===(k=this.container)||void 0===k?void 0:k.findComponent(j.XVE);j.Aq$.isDefined(B)&&this.addListenerToSignal(B.onDimensionsChanged,(()=>{this.checkAllPlaceholdersOnScreen()}))}update(){super.update(),this._pendingPlaceholderOperations.forEach(((k,B)=>{var U;if(null!==k){if(0===B.children.length){const U=this._objectPool.getObject();if(Nt.d.updateInjectedValues(U,this._injectionData[k]),U.parent=B,this.resizePlaceholderToObject){const k=U.findComponent(j.XVE),F=B.findComponent(j.XVE);F.setSizeDelta(k.widthDelta,k.heightDelta),k.onDimensionsChanged.add((()=>{F.setSizeDelta(k.widthDelta,k.heightDelta)}),this)}this.onObjectScreenEntered.dispatch(U)}}else for(const F of B.children)this.onObjectScreenExited.dispatch(F),this._objectPool.recycleObject(F),null===(U=F.findComponent(j.XVE))||void 0===U||U.onDimensionsChanged.removeAll(this),F.parent=this._deadPoolContainer})),this._pendingPlaceholderOperations.clear()}destroy(){this._injectionData=null,this.onObjectScreenEntered.dispose(),this.onObjectScreenExited.dispose(),this.onPlaceholdersCreated.dispose(),super.destroy()}spawnPrefabsFromDataArray(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=[...k];if(this._injectionData=B,this.preloadDependencies&&(yield this.preloadPrefab(),B!==this._injectionData))return;const U=this.staggerPlaceholderCreation?this.getInjectedValue(j.t5G.FrameWorkManager):void 0;yield j.Ff4.completeGeneratorAsync(this.createPlaceholders(B),U),this.checkAllPlaceholdersOnScreen(),this.onPlaceholdersCreated.dispatch()}))}destroySpawnedPrefabs(){var k;this._injectionData=null;for(let B;B=null===(k=this._objectPool.aliveList.head)||void 0===k?void 0:k.object;)this._objectPool.recycleObject(B);this._objectPool.flush(!0);for(const B of this.placeholders)B.destroy();this.placeholders.length=0,this._pendingPlaceholderOperations.clear()}updateInjectionData(k,B){var U;ct.merge(this._injectionData[k],B),(null===(U=this.placeholders[k].children[0])||void 0===U?void 0:U.active)&&Nt.d.updateInjectedValues(this.placeholders[k].children[0],B)}*createPlaceholders(k){for(let B=0;B{this.checkPlaceholderOnScreen(U,k)})),this.debug&&U.addComponent(j.Lom).setColor("00ff00"),U.parent=null!==(B=this.container)&&void 0!==B?B:this.gameObject,U}preloadPrefab(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this._prefabLoader.preloadFromGUIDWithDependencies(this.prefabGuid)}))}spawnPrefab(){return this._prefabLoader.loadFromGUID(this.prefabGuid)}checkAllPlaceholdersOnScreen(){for(const[k,B]of this.placeholders.entries())this.checkPlaceholderOnScreen(B,k)}checkPlaceholderOnScreen(k,B){const U=Qt.J.isObjectOnScreen(k)?B:null;this._pendingPlaceholderOperations.set(k,U)}removePrefabAt(k){var B;const U=this.placeholders[k];if(U){for(const k of U.children)this.onObjectScreenExited.dispatch(k),this._objectPool.recycleObject(k),null===(B=k.findComponent(j.XVE))||void 0===B||B.onDimensionsChanged.removeAll(this),k.parent=this._deadPoolContainer;U.destroy(),this.placeholders.splice(k,1),this._injectionData.splice(k,1);for(let B=k;B{this.checkPlaceholderOnScreen(k,B)})))}}}updateAllInjectionData(k){for(;this.placeholders.length>k.length;)this.removePrefabAt(this.placeholders.length-1);for(;this.placeholders.length{this.checkPlaceholderOnScreen(k,B)})))}this.checkAllPlaceholdersOnScreen()}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],OI.prototype,"debug",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],OI.prototype,"zeroOutPlaceholderTransforms",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],OI.prototype,"resizePlaceholderToObject",void 0),(0,G.Cg)([(0,j.Cdj)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],OI.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],OI.prototype,"prefabGuid",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],OI.prototype,"preloadDependencies",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],OI.prototype,"container",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],OI.prototype,"_deadPoolContainer",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],OI.prototype,"spawnedObjectWidth",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],OI.prototype,"spawnedObjectHeight",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],OI.prototype,"staggerPlaceholderCreation",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],OI.prototype,"onPlaceholdersCreated",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],OI.prototype,"onObjectScreenEntered",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],OI.prototype,"onObjectScreenExited",void 0),OI=(0,G.Cg)([(0,j.EVk)("DataArrayPooledPrefabSpawner",W.Y.utility,"Spawns a pooled prefab for each item in a data array, injecting the data into the prefab")],OI);let II=class extends j.uAl{constructor(){super(...arguments),this.argumentIndex=0,this.dataPath="",this.onDataExtracted=new j.HN0}extract(...k){if(k.length<=this.argumentIndex)return null;const B=k[this.argumentIndex],U=j.Aq$.isDefined(this.dataPath)&&""!==this.dataPath?ct.get(B,this.dataPath):B;return this.onDataExtracted.dispatch(U),U}destroy(){this.onDataExtracted.dispose(),super.destroy()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],II.prototype,"argumentIndex",void 0),(0,G.Cg)([(0,j.W_S)(),(0,j.YLv)("Data path compatible with lodash get"),(0,G.Sn)("design:type",String)],II.prototype,"dataPath",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],II.prototype,"onDataExtracted",void 0),II=(0,G.Cg)([(0,j.EVk)("DataExtraction",W.Y.utility,"Extracts data from given arguments")],II);let DI=class extends j.uAl{constructor(){super(...arguments),this.debugSize=!1,this.debugColour=!1,this.rectColour="#ff0000",this.width=1920,this.height=1080}postCreate(){}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],DI.prototype,"debugSize",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],DI.prototype,"debugColour",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",Object)],DI.prototype,"rectColour",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],DI.prototype,"width",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],DI.prototype,"height",void 0),(0,G.Cg)([(0,j.Pqz)(j.XVE),(0,G.Sn)("design:type",j.XVE)],DI.prototype,"_rectTransform",void 0),DI=(0,G.Cg)([(0,j.EVk)("DebugRectTransform")],DI);let RI=class extends j.uAl{constructor(){super(...arguments),this._checkOnCreate=!1,this._onNativeApp=new j.HN0,this._onNonNativeApp=new j.HN0,this._onThreeTierElegibilityCheck=new j.HN0}create(){super.create(),this._checkOnCreate&&this.checkDevice()}checkDevice(){Gs.pF.isNativeApp()?this._onNativeApp.dispatch():this._onNonNativeApp.dispatch(),this._onThreeTierElegibilityCheck.dispatch(Gs.pF.eligibleForMembershipPurchaseForMultipleTiers())}destroy(){this._onNativeApp.dispose(),this._onNonNativeApp.dispose(),this._onThreeTierElegibilityCheck.dispose(),super.destroy()}};(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],RI.prototype,"_checkOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],RI.prototype,"_onNativeApp",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],RI.prototype,"_onNonNativeApp",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],RI.prototype,"_onThreeTierElegibilityCheck",void 0),RI=(0,G.Cg)([(0,j.EVk)("Device",W.Y.utility)],RI);U(10704);let PI=class extends j.uAl{constructor(){super(...arguments),this.onTrigger=new j.HN0,this._fireOnCreate=!1}create(){super.create(),this._fireOnCreate&&this.trigger()}destroy(){this.onTrigger.dispose(),super.destroy()}trigger(){this.onTrigger.dispatch(this.component)}};var MI,NI;(0,G.Cg)([(0,j.MnK)(j.uAl),(0,G.Sn)("design:type",j.uAl)],PI.prototype,"component",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],PI.prototype,"onTrigger",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],PI.prototype,"_fireOnCreate",void 0),PI=(0,G.Cg)([(0,j.EVk)("GetComponentReference")],PI),function(k){k.EqualToConstant="===",k.EquivalentToConstant="==",k.GreaterThanConstant=">",k.GreaterThanOrEqualToConstant=">=",k.LessThanConstant="<",k.LessThanOrEqualToConstant="<="}(NI||(NI={}));let xI=MI=class extends j.uAl{constructor(){super(...arguments),this.comparisonFunction=NI.EqualToConstant,this.onTrue=new j.HN0,this.onFalse=new j.HN0,this.onResult=new j.HN0,this.onNegatedResult=new j.HN0}destroy(){this.onTrue.dispose(),this.onFalse.dispose(),this.onResult.dispose(),this.onNegatedResult.dispose(),super.destroy()}baseCompare(k,B){const U=MI.COMPARISON_FUNCTIONS[this.comparisonFunction](k,B);(U?this.onTrue:this.onFalse).dispatch(),this.onResult.dispatch(U),this.onNegatedResult.dispatch(!U)}};xI.COMPARISON_FUNCTIONS={[NI.EqualToConstant]:(k,B)=>k===B,[NI.EquivalentToConstant]:(k,B)=>k==B,[NI.GreaterThanConstant]:(k,B)=>k>B,[NI.GreaterThanOrEqualToConstant]:(k,B)=>k>=B,[NI.LessThanConstant]:(k,B)=>kk<=B},(0,G.Cg)([(0,j.gfw)(NI),(0,G.Sn)("design:type",String)],xI.prototype,"comparisonFunction",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],xI.prototype,"onTrue",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],xI.prototype,"onFalse",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],xI.prototype,"onResult",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],xI.prototype,"onNegatedResult",void 0),xI=MI=(0,G.Cg)([(0,j.EVk)("Comparison (abstract)")],xI);let LI=class extends xI{constructor(){super(...arguments),this.constant=0}compare(k){this.baseCompare(k,this.constant)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],LI.prototype,"constant",void 0),LI=(0,G.Cg)([(0,j.EVk)("NumberComparison",W.Y.utility)],LI);U(41170);let kI=class extends j.uAl{constructor(){super(...arguments),this.onMemberTier=new j.HN0,this.onHighestMemberTierTrue=new j.HN0,this.onHighestMemberTierFalse=new j.HN0}create(){super.create()}checkMemberTier(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.onMemberTier.dispatch(k.getMemberTier())}checkHighestMembershipTier(){const k=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;(xs.kG.includes(k.getMemberTier())?this.onHighestMemberTierTrue:this.onHighestMemberTierFalse).dispatch()}destroy(){this.onMemberTier.dispose(),this.onHighestMemberTierTrue.dispose(),this.onHighestMemberTierFalse.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],kI.prototype,"onMemberTier",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],kI.prototype,"onHighestMemberTierTrue",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],kI.prototype,"onHighestMemberTierFalse",void 0),kI=(0,G.Cg)([(0,j.EVk)("PlayerMemberTier",W.Y.player,"")],kI);U(11191),U(61917);let BI=class extends j.uAl{constructor(){super(...arguments),this._parameters=[],this.onTrigger=new j.HN0}destroy(){this.onTrigger.dispose(),super.destroy()}trigger(...k){const B=this._parameters.map((B=>{if("string"==typeof B){const U=B.match(/^\[(\d+)\]$/);if(U){const B=parseInt(U[1]);return k[B]}if(B.match(/^\d+(\.\d*)?$/))return parseFloat(B)}return B}));this.onTrigger.dispatch(...B)}};(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Object)],BI.prototype,"_parameters",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],BI.prototype,"onTrigger",void 0),BI=(0,G.Cg)([(0,j.EVk)("SignalParameterRemix",W.Y.utility)],BI);let UI=class extends xI{constructor(){super(...arguments),this.comparisonFunction=NI.EqualToConstant,this.constant=""}compare(k){this.baseCompare(k,this.constant)}};(0,G.Cg)([(0,j.DTs)(),(0,j.gfw)(NI),(0,G.Sn)("design:type",String)],UI.prototype,"comparisonFunction",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],UI.prototype,"constant",void 0),UI=(0,G.Cg)([(0,j.EVk)("StringComparison",W.Y.utility)],UI);var FI=U(47008),GI=U(325);let jI=class extends xI{constructor(){super(...arguments),this.comparisonFunction=NI.EqualToConstant}compare(){this.baseCompare(this._subjectProvider.getSubject(),this.subject)}};(0,G.Cg)([(0,j.DTs)(),(0,j.gfw)(NI),(0,G.Sn)("design:type",String)],jI.prototype,"comparisonFunction",void 0),(0,G.Cg)([(0,j.gfw)(GI.Q),(0,G.Sn)("design:type",String)],jI.prototype,"subject",void 0),(0,G.Cg)([(0,j.Cdj)("f1d-f7b1"),(0,G.Sn)("design:type",FI.W)],jI.prototype,"_subjectProvider",void 0),jI=(0,G.Cg)([(0,j.EVk)("SubjectComparison",W.Y.utility)],jI);let $I=class extends j.uAl{constructor(){super(...arguments),this._startDelayMs=0,this._intervalMs=1e3,this._autoStart=!0,this._fireOnStart=!1,this.onInterval=new j.HN0}create(){super.create(),this._autoStart&&this.start()}destroy(){tt.q.instance.game.time.destroy(this._timer),this._timer=null,this.onInterval.dispose(),super.destroy()}start(){this._timer=tt.q.instance.game.time.create(!1),this._startDelayMs>0?(this._timer.addTimer(this._startDelayMs,this.startLoop,this),this._timer.start()):this.startLoop()}startLoop(){this._fireOnStart&&this.onInterval.dispatch(),this._timer.loop(this._intervalMs,this.onInterval.dispatch,this.onInterval),this._timer.start()}};var HI;(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],$I.prototype,"_startDelayMs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],$I.prototype,"_intervalMs",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],$I.prototype,"_autoStart",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],$I.prototype,"_fireOnStart",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],$I.prototype,"onInterval",void 0),$I=(0,G.Cg)([(0,j.EVk)("TimeInterval",W.Y.utility)],$I);let VI=HI=class extends j.uAl{constructor(){super(...arguments),this._networkCheckMinTimeMS=6e4,this.friendsListEventSignal=new j.HN0,this._broadcaster=tt.q.instance.game.broadcaster}create(){super.create(),this._broadcaster.addAppListener(jn.sd.GetTotalFriendRequests,this.process,this,jn.HG.HUD,!1),this._broadcaster.addAppListener(jn.sd.RequestReceived,this.process,this,jn.HG.HUD,!1),this._broadcaster.addAppListener(jn.sd.RequestRejected,this.process,this,jn.HG.HUD,!1),this._broadcaster.addAppListener(jn.sd.RequestAccepted,this.process,this,jn.HG.HUD,!1),this._broadcaster.addAppListener(jn.sd.RequestCancelled,this.process,this,jn.HG.HUD,!1),this.fetchFriendRequestsAndFriends(),this.process()}fetchFriendRequestsAndFriends(){const k=tt.q.instance.prodigy.timeManager.getServerTimeMs();k-this._networkCheckMinTimeMS>=HI._lastNetworkCheckTime&&(tt.q.instance.game.broadcaster.broadcast(jn.sd.GetTotalFriendRequests,jn.HG.FriendsList),HI._lastNetworkCheckTime=k)}destroy(){this._broadcaster.removeAppListener(jn.sd.GetTotalFriendRequests,this,jn.HG.HUD),this._broadcaster.removeAppListener(jn.sd.RequestReceived,this,jn.HG.HUD),this._broadcaster.removeAppListener(jn.sd.RequestRejected,this,jn.HG.HUD),this._broadcaster.removeAppListener(jn.sd.RequestAccepted,this,jn.HG.HUD),this._broadcaster.removeAppListener(jn.sd.RequestCancelled,this,jn.HG.HUD),this.friendsListEventSignal.dispose(),super.destroy()}process(){const k=tt.q.instance.prodigy.friendsListNetworkHandler;this.friendsListEventSignal.dispatch(k.hasPendingRequests())}};VI._lastNetworkCheckTime=0,(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],VI.prototype,"_networkCheckMinTimeMS",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],VI.prototype,"friendsListEventSignal",void 0),VI=HI=(0,G.Cg)([(0,j.EVk)("FriendsListChangeListener",W.Y.multiplayer)],VI);let WI=class extends j.uAl{constructor(){super(...arguments),this.mailEventSignal=new j.HN0}create(){super.create();{tt.q.instance.game.broadcaster.addAppListener(jn.zr.UpdateMailCounters,this.process,this,jn.HG.MailerButton);const k=tt.q.instance.prodigy.mailNetworkHandler.mailTotals;k&&this.process(k),tt.q.instance.prodigy.mailNetworkHandler.getAllMail(!1)}}destroy(){tt.q.instance.game.broadcaster.removeAppListener(jn.zr.UpdateMailCounters,this,jn.HG.MailerButton),this.mailEventSignal.dispose(),super.destroy()}process({totalUnread:k}){if(k>0){const B=tt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.mailEventSignal.dispatch(!Qt.J.shouldSuppressAd(B)&&!B.tutorialCompletedThisSession,k)}else this.mailEventSignal.dispatch(!1,0)}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],WI.prototype,"mailEventSignal",void 0),WI=(0,G.Cg)([(0,j.EVk)("MailChangeListener",W.Y.multiplayer)],WI);let qI=class extends j.uAl{constructor(){super(...arguments),this.onIconsLoaded=new j.HN0,this._iconCount=0}create(){super.create(),j.Aq$.isDefined(this._petID)&&this.setPetID(this._petID)}setPetID(k){this._petID!==k&&(this._petID=k,this._iconCount++,this._petIcon.onIconLoaded.addOnce(this.iconLoaded,this),this._petIcon.setItemID(k),this._iconCount++,this._elementIcon.onIconLoaded.addOnce(this.iconLoaded,this),this._elementIcon.setPetID(k))}iconLoaded(){this._iconCount--,0===this._iconCount&&this.onIconsLoaded.dispatch()}destroy(){this.onIconsLoaded.dispose(),super.destroy()}};(0,G.Cg)([(0,j.MnK)(od.i),(0,G.Sn)("design:type",od.i)],qI.prototype,"_petIcon",void 0),(0,G.Cg)([(0,j.MnK)(Sf.D),(0,G.Sn)("design:type",Sf.D)],qI.prototype,"_elementIcon",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],qI.prototype,"_petID",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],qI.prototype,"onIconsLoaded",void 0),qI=(0,G.Cg)([(0,j.EVk)("ElementalPetDisplay",W.Y.uiPet)],qI);let KI=class extends j.uAl{create(){super.create(),this.refreshPlayerAppearance()}refreshPlayerAppearance(){this._playerAppearance.setAppearance(this._loggedInPlayer.getAppearance())}};(0,G.Cg)([(0,j.MnK)(Qm.b),(0,G.Sn)("design:type",Qm.b)],KI.prototype,"_playerAppearance",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],KI.prototype,"_loggedInPlayer",void 0),KI=(0,G.Cg)([(0,j.EVk)("LoggedInPlayerAppearanceLoader",W.Y.playerAnimation)],KI);let zI=class extends j.PQK{installBindings(){this.Container.bind("AnimationData").toConstantValue(new xi.F(U(34500)))}};zI=(0,G.Cg)([(0,j.Og1)("PlayerAnimationDataInstaller","Installer")],zI);let YI=class extends j.PQK{installBindings(){const k=tt.q.instance.prodigy.gameContainer;this.Container.bind("377-3e7b").toConstantValue(k.get("e20-0fb0"))}};var QI;YI=(0,G.Cg)([(0,j.Og1)("PlayerDataInstaller","Installer")],YI);let XI=QI=class extends j.uAl{constructor(){super(...arguments),this._teleportOutClips=[],this._teleportInClips=[],this.onTeleportOut=new j.HN0,this.onTeleportIn=new j.HN0,this._disableInput=!0}create(){super.create(),this._flashClip.GameObject.active=!1,this.gameObject.active=!1,this._belowObject=this.gameObject.children.find((k=>"Below"===k.name))}alignToTarget(){this.teleportObject&&(this.GameObject.transform.worldPosition=this.teleportObject.transform.worldPosition)}playOut(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U;this.setupTeleportCommon(),null===(k=this._teleportOutSoundEffect)||void 0===k||k.playSFX(),null===(B=this._teleportOutSoundTimer)||void 0===B||B.startTimer(),null===(U=this._screenShake)||void 0===U||U.run(),this._flashClip.OnComplete.addOnce((()=>{this._flashClip.GameObject.active=!1})),yield this.playTeleportCommon([...this._teleportOutClips,this._flashClip])}))}playIn(){return(0,G.sH)(this,arguments,void 0,(function*(k=0){var B,U;return this.setupTeleportCommon(),this.teleportObject.active=!1,k>0&&(yield j.Egh.timeout(k)),null===(B=this._teleportInSoundEffect)||void 0===B||B.playSFX(),null===(U=this._teleportInSoundTimer)||void 0===U||U.startTimer(),this.playTeleportCommon(this._teleportInClips)}))}setupTeleportCommon(){this.setInputEnabled(!1),this.gameObject.active=!0,this.sortBelowObject()}playTeleportCommon(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;const U=new j.v14;for(const F of k)F.animator.spine.onEvent.add(this.processEvent,this),F.OnComplete.addOnce((()=>{F.animator.spine.onEvent.remove(this.processEvent,this)})),F.OnComplete.addOnce(U.push()),F.play();yield U.all(),null===(B=this._screenShake)||void 0===B||B.forceCompletion(),this.restoreBelowObjectSorting(),this.gameObject.active=!1,this.setInputEnabled(!0)}))}processEvent(k,B){var U;switch(B.data.name){case QI.OUT_EVENT:this.onTeleportOut.dispatch(),this.teleportObject.active=!1;break;case QI.IN_EVENT:this.onTeleportIn.dispatch(),this.teleportObject.active=!0,null===(U=this.teleportObject.findComponent(j.y4o))||void 0===U||U.getRootContainer().updateTransform();break;case QI.FLASH_EVENT:this._flashClip.GameObject.active=!0,this._flashClip.play(!0)}}setInputEnabled(k){this._disableInput&&(0,Td.QQ)(tt.q.instance.game,k)}sortBelowObject(){const k=this.teleportObject.parent.children.indexOf(this.teleportObject);this.teleportObject.parent.addChildAt(this._belowObject,k)}restoreBelowObjectSorting(){this.gameObject.addChild(this._belowObject)}destroy(){this.onTeleportOut.dispose(),this.onTeleportIn.dispose(),super.destroy()}};XI.OUT_EVENT="ch-out",XI.IN_EVENT="ch-in",XI.FLASH_EVENT="flash",(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],XI.prototype,"teleportObject",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Nw.Q),(0,G.Sn)("design:type",Array)],XI.prototype,"_teleportOutClips",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(Nw.Q),(0,G.Sn)("design:type",Array)],XI.prototype,"_teleportInClips",void 0),(0,G.Cg)([(0,j.MnK)(Nw.Q),(0,G.Sn)("design:type",Nw.Q)],XI.prototype,"_flashClip",void 0),(0,G.Cg)([(0,j.MnK)(Ta.g),(0,G.Sn)("design:type",Ta.g)],XI.prototype,"_screenShake",void 0),(0,G.Cg)([(0,j.MnK)(oa),(0,G.Sn)("design:type",oa)],XI.prototype,"_teleportInSoundEffect",void 0),(0,G.Cg)([(0,j.MnK)(oa),(0,G.Sn)("design:type",oa)],XI.prototype,"_teleportOutSoundEffect",void 0),(0,G.Cg)([(0,j.MnK)($w),(0,G.Sn)("design:type",$w)],XI.prototype,"_teleportInSoundTimer",void 0),(0,G.Cg)([(0,j.MnK)($w),(0,G.Sn)("design:type",$w)],XI.prototype,"_teleportOutSoundTimer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],XI.prototype,"onTeleportOut",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],XI.prototype,"onTeleportIn",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],XI.prototype,"_disableInput",void 0),XI=QI=(0,G.Cg)([(0,j.EVk)("TeleportEffect",W.Y.effect)],XI);let ZI=class extends j.uAl{playOut(){return(0,G.sH)(this,void 0,void 0,(function*(){this._teleportEffect.teleportObject=this._mainPlayer,this._teleportEffect.alignToTarget(),this._teleportEffect.onTeleportOut.add((()=>{this.unloadFollows()})),yield this._teleportEffect.playOut(),this._teleportEffect.onTeleportOut.removeAll()}))}playIn(){return(0,G.sH)(this,void 0,void 0,(function*(){this._teleportEffect.teleportObject=this._mainPlayer,this._teleportEffect.alignToTarget(),this._teleportEffect.onTeleportIn.add((()=>{this.reloadFollows()})),yield this._teleportEffect.playIn(),this._teleportEffect.onTeleportIn.removeAll()}))}unloadFollows(){const k=this._mainPlayer.findComponentInChildren(za);null==k||k.unloadFollows()}reloadFollows(){const k=this._mainPlayer.findComponentInChildren(za);null==k||k.reloadFollows()}};(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObject"),(0,G.Sn)("design:type",j._mx)],ZI.prototype,"_mainPlayer",void 0),(0,G.Cg)([(0,j.MnK)(XI),(0,G.Sn)("design:type",XI)],ZI.prototype,"_teleportEffect",void 0),ZI=(0,G.Cg)([(0,j.EVk)("PlayerTeleportEffect",W.Y.effect)],ZI);U(28080);let JI=class extends j.uAl{constructor(){super(...arguments),this._onKeystonesToPlace=new j.HN0,this._onNoKeystonesToPlace=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._runOnLoad&&this.check()}check(){Zo.N.anyKeystonesToPlace()?this._onKeystonesToPlace.dispatch():this._onNoKeystonesToPlace.dispatch()}destroy(){this._onKeystonesToPlace.dispose(),this._onNoKeystonesToPlace.dispose(),super.destroy()}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],JI.prototype,"_onKeystonesToPlace",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],JI.prototype,"_onNoKeystonesToPlace",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],JI.prototype,"_runOnLoad",void 0),JI=(0,G.Cg)([(0,j.EVk)("AnyKeystonesToPlaceGuard",W.Y.utility)],JI);let tD=class extends Be.u{run(){var k;const B=this._playerContainer?[new j.I9Y(this._playerContainer.x,this._playerContainer.y)].concat(this.path):this.path;this.execute(194,{game:tt.q.instance.game,playerContainer:null!==(k=this._playerContainer)&&void 0!==k?k:this._playerData.player.playerContainer,playerLocomotion:this._playerLocomotion,monsterAnimationController:this.monsterAnimationController,circleTrigger:this._circleTrigger,path:B})}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],tD.prototype,"_playerData",void 0),(0,G.Cg)([(0,j.Cdj)("MainPlayerGameObjectRelay"),(0,G.Sn)("design:type",WS)],tD.prototype,"_playerContainer",void 0),(0,G.Cg)([(0,j.Cdj)("PlayerLocomotion"),(0,G.Sn)("design:type",j.KhP)],tD.prototype,"_playerLocomotion",void 0),(0,G.Cg)([(0,j.MnK)(Rn.K),(0,G.Sn)("design:type",Rn.K)],tD.prototype,"monsterAnimationController",void 0),(0,G.Cg)([(0,j.MnK)(hi.s),(0,G.Sn)("design:type",hi.s)],tD.prototype,"_circleTrigger",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j._Hz)(),(0,G.Sn)("design:type",Array)],tD.prototype,"path",void 0),tD=(0,G.Cg)([(0,j.EVk)("Q3MinibossGateFSM",W.Y.zoneForest)],tD);let eD=class extends Be.u{run(){this.execute(188,{game:tt.q.instance.game,target:this._playerData.player.playerContainer,path:[new j.I9Y(910,480)]})}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],eD.prototype,"_playerData",void 0),eD=(0,G.Cg)([(0,j.EVk)("TroptropTrioDialogueFSM",W.Y.zoneForest)],eD);let iD=class extends Be.u{run(){this.execute(187,{game:tt.q.instance.game,chatBubble:this._chatBubble,monsterTransform:this._monsterTransform})}};(0,G.Cg)([(0,j.MnK)(j.dLy),(0,G.Sn)("design:type",j.dLy)],iD.prototype,"_monsterTransform",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],iD.prototype,"_chatBubble",void 0),iD=(0,G.Cg)([(0,j.EVk)("TroptropTrioFSM",W.Y.zoneForest)],iD);let sD=class extends j.PQK{installBindings(){var k,B;const U="forest-Q2-Q3-miniboss-level",F=tt.q.instance.prodigy.gameContainer.get("e20-0fb0"),G=tt.q.instance.prodigy.world.getCurrentZoneObject().getQuestState(),j=tt.q.instance.prodigy.world.getCurrentZoneObject().difficultyMode===fe.i.Hard?Math.max(Yn.s.maxLevelConfig.regular,F.getLevel()+2):F.getLevel()+2,$=null!==(B=null===(k=null==G?void 0:G.state)||void 0===k?void 0:k[U])&&void 0!==B?B:Math.min(j,Yn.s.activePlayerLevelCap);(null==G?void 0:G.state)&&(G.state[U]=$);const H={encounter:[{ID:96}],level:$,onEnd:"forest-C7",screen:"battle-forest-outside",onFaint:"forest-C8",backgroundMusic:Xu.B.Bg_bossbattle_firefly,revampBattleType:3===(null==G?void 0:G.ID)?Ci.gu.FireflyQ3Miniboss:Ci.gu.FireflyQ2Miniboss};this.Container.bind("EncounterBattleMods").toConstantValue(H),this.Container.bind("EncounterDifficultyIndicatorLevel").toConstantValue($)}};sD=(0,G.Cg)([(0,j.Og1)("ForestQ2MinibossEncounterInstaller","Installer")],sD);let nD=class extends j.uAl{constructor(){super(...arguments),this._onVisitingAllowed=new j.HN0,this._onVisitingNotAllowed=new j.HN0,this._runOnLoad=!1}create(){super.create(),this._player=this.getInjectedValue("e20-0fb0").player,this._runOnLoad&&this.isVisitingAllowed()}destroy(){this._onVisitingAllowed.dispose(),this._onVisitingNotAllowed.dispose(),super.destroy()}isVisitingAllowed(){var k;(null===(k=this._player)||void 0===k?void 0:k.getAllowsHouseVisitors())?this._onVisitingAllowed.dispatch():this._onVisitingNotAllowed.dispatch()}allowVisiting(){var k;null===(k=this._player)||void 0===k||k.setAllowsHouseVisitors(!0)}denyVisiting(){var k;null===(k=this._player)||void 0===k||k.setAllowsHouseVisitors(!1)}};(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nD.prototype,"_onVisitingAllowed",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],nD.prototype,"_onVisitingNotAllowed",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],nD.prototype,"_runOnLoad",void 0),nD=(0,G.Cg)([(0,j.EVk)("HouseVisitorsGuard",W.Y.utility)],nD);let aD=class extends j.uAl{openHouseStore(){tt.q.instance.prodigy.world.getZone(Ft.A_.HOUSE).openHouseStore()}};aD=(0,G.Cg)([(0,j.EVk)("OpenHouseStore",W.Y.ui)],aD);let rD=class extends j.uAl{constructor(){super(...arguments),this.isUnderwater=!1,this.bubblePrefab=Rt.l.Bubble,this.playerAnimationController=null,this._playerSpineAnimator=null}create(){super.create(),this.isUnderwater&&(this.playerAnimationController?(this._playerSpineAnimator=this.playerAnimationController.getSpineAnimator(),this._playerSpineAnimator?this._playerSpineAnimator.isLoaded?this.addBubbleEffectToPlayer():this._playerSpineAnimator.spine.OnLoaded.addOnce(this.addBubbleEffectToPlayer,this):j.VyI.log("No player spine animator set on wizard animation controller, skipping underwater setup.",j.$bb.Error)):j.VyI.log("No player animation controller set for underwater component, skipping spine animator setup.",j.$bb.Error))}addBubbleEffectToRemotePlayer(k){if(!this.isUnderwater)return;if(!k)return void j.VyI.log("No player object provided to add bubble effect.",j.$bb.Error);const B=k.findComponentInChildren(Oa.$);if(!B)return void j.VyI.log("No WizardAnimationControllerComponent found on player object, cannot add bubble effect.",j.$bb.Error);const U=B.getSpineAnimator();U?this.addBubbleEffectToPlayer(U):j.VyI.log("No SpineAnimator found on player animation controller, cannot add bubble effect.",j.$bb.Error)}addBubbleEffectToPlayer(k=this._playerSpineAnimator){k?j.W$e.instance.prefabLoaderInstance.loadWithDependenciesFromGUID(this.bubblePrefab,k.GameObject).then((B=>{B.transform.setScale(8,8),B.transform.setPositionY(-448);const U=B.findComponent(rn.l);U?U.setup({spineComponent:k.spine,boneName:"hip",slotName:"hip",followAxis:3,followRotation:!1,followScale:4,boneFollowerTransform:B.transform}):j.VyI.log("No SpineBoneFollowerComponent found on bubble prefab, cannot set up bubble effect.",j.$bb.Error)})).catch(j.RQr.createHandler(`Unable to load the bubble prefab: ${this.bubblePrefab}`)):j.VyI.log("No player spine animator available to add bubble effect.",j.$bb.Error)}};(0,G.Cg)([(0,j.vkK)({toolTip:"Is this map underwater? Should a breathing bubble be shown?"}),(0,G.Sn)("design:type",Boolean)],rD.prototype,"isUnderwater",void 0),(0,G.Cg)([(0,j.gfw)(Rt.l),(0,G.Sn)("design:type",String)],rD.prototype,"bubblePrefab",void 0),(0,G.Cg)([(0,j.MnK)(Oa.$,{toolTip:"The animation controller for the main player in the underwater zone."}),(0,G.Sn)("design:type",Oa.$)],rD.prototype,"playerAnimationController",void 0),rD=(0,G.Cg)([(0,j.EVk)("BreathingBubble",W.Y.zoneShipwreckShore)],rD);let oD=class extends j.uAl{chatWithNpc(){var k;const B=new mi.rD,U=this.getInjectedValue("306-5359"),F=tt.q.instance.prodigy.world.getCurrentZoneObject(),G=tt.q.instance.prodigy.world.getZone(Jo.O.Shiverchill),$=jd.getDailyQuestState(G);F.isOnQuest(4)||F.isOnQuest(5)?F.isOnSequence(4,1)?B.addEvents([{dialogueData:B.dataProvider.get(379),blockInput:!0},{dialogueData:B.dataProvider.get(380),blockInput:!0},{callback:()=>{const k=this.getInjectedValue("a25-68f4");k?k.sendQuestEventViaHub(Wr.T.SPEAK_WITH_NPC,{id:"shiverchill-miner"}).catch(j.RQr.createHandler("An error occurred while sending the event via Quest Hub")):j.VyI.log("Attempted to send event via Quest Manager Hub, but no Quest Manager Hub was found",j.$bb.Warning)}}]):B.addEvents([{dialogueData:B.dataProvider.get(380),blockInput:!0}]):F.isOnQuest(6)?B.addEvents([{dialogueData:B.dataProvider.get(384),blockInput:!0}]):(null===(k=F.getQuestState())||void 0===k?void 0:k.ID)>=6&&(0===U.backpack.hasItem("item",80)?B.addEvents([{dialogueData:B.dataProvider.get(399),blockInput:!0},{dialogueData:B.dataProvider.get(402),blockInput:!0},{dialogueData:B.dataProvider.get(403),blockInput:!0},{dialogueData:B.dataProvider.get(404),blockInput:!0}]):U.backpack.hasItem("item",80)<5?(B.addEvents([{dialogueData:B.dataProvider.get(399),blockInput:!0},{dialogueData:B.dataProvider.get(391),blockInput:!0}]),4===U.backpack.hasItem("item",80)&&B.addEvents([{dialogueData:B.dataProvider.get(397),blockInput:!0}])):U.backpack.hasItem("item",80)>4&&$.rewards<5?B.addEvents([{dialogueData:B.dataProvider.get(398),blockInput:!0},{callback:()=>{U.saveEnabled=!1,G.setState("daily",{date:$.date,flags:$.flags,rewards:5}),tt.q.instance.prodigy.open.gotItem([{type:"item",ID:76,N:5}],void 0,void 0,void 0,void 0,void 0,{source_type:li.C.Npc})}},{dialogueData:B.dataProvider.get(392),blockInput:!0},{callback:()=>{U.saveEnabled=!0}}]):U.backpack.hasItem("item",80)>4&&U.backpack.hasItem("item",80)<10&&$.rewards>4?(B.addEvents([{dialogueData:B.dataProvider.get(399),blockInput:!0},{dialogueData:B.dataProvider.get(392),blockInput:!0}]),9===U.backpack.hasItem("item",80)&&B.addEvents([{dialogueData:B.dataProvider.get(397),blockInput:!0}])):U.backpack.hasItem("item",80)>9&&$.rewards<10?B.addEvents([{dialogueData:B.dataProvider.get(398),blockInput:!0},{callback:()=>{U.saveEnabled=!1,G.setState("daily",{date:$.date,flags:$.flags,rewards:10}),tt.q.instance.prodigy.open.gotItem([{type:"item",ID:77,N:10}],void 0,void 0,void 0,void 0,void 0,{source_type:li.C.Npc})}},{dialogueData:B.dataProvider.get(393),blockInput:!0},{callback:()=>{U.saveEnabled=!0}}]):U.backpack.hasItem("item",80)>9&&U.backpack.hasItem("item",80)<25&&$.rewards>9?(B.addEvents([{dialogueData:B.dataProvider.get(399),blockInput:!0},{dialogueData:B.dataProvider.get(393),blockInput:!0}]),24===U.backpack.hasItem("item",80)&&B.addEvents([{dialogueData:B.dataProvider.get(397),blockInput:!0}])):U.backpack.hasItem("item",80)>24&&$.rewards<25?B.addEvents([{dialogueData:B.dataProvider.get(398),blockInput:!0},{callback:()=>{U.saveEnabled=!1,G.setState("daily",{date:$.date,flags:$.flags,rewards:25}),tt.q.instance.prodigy.open.gotItem([{type:"hat",ID:10}],void 0,void 0,void 0,void 0,void 0,{source_type:li.C.Npc})}},{dialogueData:B.dataProvider.get(394),blockInput:!0},{callback:()=>{U.saveEnabled=!0}}]):U.backpack.hasItem("item",80)>24&&U.backpack.hasItem("item",80)<50&&$.rewards>24?(B.addEvents([{dialogueData:B.dataProvider.get(399),blockInput:!0},{dialogueData:B.dataProvider.get(394),blockInput:!0}]),49===U.backpack.hasItem("item",80)&&B.addEvents([{dialogueData:B.dataProvider.get(397),blockInput:!0}])):U.backpack.hasItem("item",80)>49&&$.rewards<50?B.addEvents([{dialogueData:B.dataProvider.get(398),blockInput:!0},{callback:()=>{U.saveEnabled=!1,G.setState("daily",{date:$.date,flags:$.flags,rewards:50}),tt.q.instance.prodigy.open.gotItem([{type:"outfit",ID:6}],void 0,void 0,void 0,void 0,void 0,{source_type:li.C.Npc})}},{dialogueData:B.dataProvider.get(395),blockInput:!0},{callback:()=>{U.saveEnabled=!0}}]):U.backpack.hasItem("item",80)>49&&U.backpack.hasItem("item",80)<75&&$.rewards>49?(B.addEvents([{dialogueData:B.dataProvider.get(399),blockInput:!0},{dialogueData:B.dataProvider.get(395),blockInput:!0}]),74===U.backpack.hasItem("item",80)&&B.addEvents([{dialogueData:B.dataProvider.get(397),blockInput:!0}])):U.backpack.hasItem("item",80)>74&&$.rewards<75?B.addEvents([{dialogueData:B.dataProvider.get(398),blockInput:!0},{callback:()=>{U.saveEnabled=!1,G.setState("daily",{date:$.date,flags:$.flags,rewards:75}),tt.q.instance.prodigy.open.gotItem([{type:"weapon",ID:13}],void 0,void 0,void 0,void 0,void 0,{source_type:li.C.Npc})}},{dialogueData:B.dataProvider.get(396),blockInput:!0},{callback:()=>{U.saveEnabled=!0}}]):U.backpack.hasItem("item",80)>74&&U.backpack.hasItem("item",80)<99&&$.rewards>74?(B.addEvents([{dialogueData:B.dataProvider.get(399),blockInput:!0},{dialogueData:B.dataProvider.get(396),blockInput:!0}]),98===U.backpack.hasItem("item",80)&&B.addEvents([{dialogueData:B.dataProvider.get(397),blockInput:!0}])):U.backpack.hasItem("item",80)>98&&$.rewards<99?B.addEvents([{dialogueData:B.dataProvider.get(398),blockInput:!0},{callback:()=>{U.saveEnabled=!1,G.setState("daily",{date:$.date,flags:$.flags,rewards:99}),tt.q.instance.prodigy.open.gotItem([{type:"hat",ID:56}],void 0,void 0,void 0,void 0,void 0,{source_type:li.C.Npc}),U.saveEnabled=!0}}]):B.addEvents([{dialogueData:B.dataProvider.get(408),blockInput:!0}])),B.start()}};var hD;oD=(0,G.Cg)([(0,j.EVk)("ShiverchillMinerNpc")],oD),function(k){k.NormalChest="A",k.QuestChest="B",k.MemberChest="C"}(hD||(hD={}));let cD=class extends j.uAl{constructor(){super(...arguments),this.chestType=hD.NormalChest,this.rewards=[{ID:0,type:"gold",N:100}],this.onAttemptOpen=new j.HN0,this.onOpening=new j.HN0,this.onCollected=new j.HN0,this.onGotItemClosed=new j.HN0}create(){var k;super.create(),null===(k=this._gameObjectContext)||void 0===k||k.bindInjectedValues({ZONE_CHEST_ID:this.chestId,ZONE_CHEST_TYPE:this.chestType,ZONE_CHEST_REWARD:this.rewards})}destroy(){this.onAttemptOpen.dispose(),this.onOpening.dispose(),this.onCollected.dispose(),this.onGotItemClosed.dispose(),super.destroy()}collect(){if(this.onAttemptOpen.dispatch(),this.chestType===hD.MemberChest&&!this._activePlayer.hasMembership())return this.broadcastMemberChestOpenedFailedEvents(),void(Qt.J.shouldSuppressAd(this._activePlayer)?this.showMemberAdSuppressionToolTip():this.showAd());this.chestKey&&0===this._activePlayer.backpack.hasItem(this.chestKey.type,this.chestKey.id)?this.handleChestLocked():this.initChestOpening()}initChestOpening(){this._activePlayer.saveEnabled=!1,tt.q.instance.game.input.enabled=!1;tt.q.instance.prodigy.game.add.tween(this.gameObject.transform.localPosition,this).to({x:"-=5"},50,j.GS3.Linear.None).to({x:"+=10"},150,j.GS3.Linear.None).to({x:"-=10"},150,j.GS3.Linear.None).to({x:"+=5"},50,j.GS3.Linear.None).to({y:"-=50"},200,j.GS3.Quadratic.Out).to({y:"+=50"},200,j.GS3.Quadratic.In).to({y:"-=20"},100,j.GS3.Quadratic.Out).to({y:"+=20"},100,j.GS3.Quadratic.In).start().onTweenComplete.add(this.openChest,this,1),this.onOpening.dispatch()}handleChestLocked(){var k;let B=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SOMETHING");if(this.chestKey){const U=null===(k=Yt.t.getItem(this.chestKey.type,this.chestKey.id))||void 0===k?void 0:k.data;B=(null==U?void 0:U.name)?U.name:B}tt.q.instance.prodigy.open.messageBoxPrefab({text:"CHEST_LOCKED_MESSAGE",textArgs:[B]})}broadcastMemberChestOpenedFailedEvents(){const k=Us.P.shouldUseUnifiedConversionFlow(en.o.FunnelOpenMemberChestWorld)?Fs.R.UnifiedConversionFlow:Qt.J.showYouTubeMembershipAd(tt.q.instance.game,!0)?Fs.R.Video:Fs.R.Static;this._segment.purchase.sendFunnelStart({type:"Open-Member-Chest-World",category:"World",contentId:tt.q.instance.prodigy.world.getCurrentMap(),adType:k,adVersion:Us.P.getAdVersion(en.o.FunnelOpenMemberChestWorld)}),this._segment.container.sendContainerOpenedFailedEvent(ui.ZF.WorldMemberChest,this.chestId,Zb.WE.MemberLocked,fi.N.OpenWorld)}showMemberAdSuppressionToolTip(){const k=this._bounds,B=new j.or0(j.Htv.getWidth(k.GameObject),j.Htv.getHeight(k.GameObject)),U=k.GameObject.transform.worldPosition,F=U.x;let G,$,H;$=U.x>tt.q.instance.game.width/2?.75:.25,U.y>tt.q.instance.game.height/2?(G=U.y+B.getHalfHeight(),H=ze.i.UP):(G=U.y-B.getHalfHeight(),H=ze.i.DOWN),tt.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:F,yPosition:G,arrowXRelPos:$,arrowDirection:H})}showAd(){const k={conversionFunnelName:en.o.FunnelOpenMemberChestWorld,conversionFunnelMetadata:tt.q.instance.prodigy.world.getCurrentMap()};tt.q.instance.prodigy.open.membershipInfo(void 0,k)}openChest(){var k;const B=this._activePlayer;tt.q.instance.prodigy.world.getZone(tt.q.instance.prodigy.world.getCurrentZone()).setState(this.chestId,1),j.Aq$.isDefined(null===(k=this.chestKey)||void 0===k?void 0:k.id)&&B.backpack.consume(this.chestKey.type,this.chestKey.id,1),B.saveEnabled=!0,tt.q.instance.game.input.enabled=!0,tt.q.instance.prodigy.open.gotItem(this.rewards,(()=>{this.onGotItemClosed.dispatch()}),void 0,"open-chest",void 0,void 0,{source_type:this.chestType!==hD.QuestChest?this.chestType===hD.NormalChest?li.C.WorldChest:li.C.WorldMemberChest:void 0}),this.chestType!==hD.NormalChest&&this.chestType!==hD.MemberChest||this._segment.container.sendContainerOpenedEvent(this.chestType===hD.NormalChest?ui.ZF.WorldChest:ui.ZF.WorldMemberChest,this.chestId,fi.N.OpenWorld),this.checkQuestProgress(),this.onCollected.dispatch()}checkQuestProgress(){this.getInjectedValue("a25-68f4").sendQuestEventViaHub(Wr.T.OPEN_CHEST,{id:`${tt.q.instance.prodigy.world.getCurrentZone()}-${this.chestId}`}).catch(j.RQr.createHandler(`Error sending the OPEN_CHEST event via Quest Hub (${this.chestId})`))}};(0,G.Cg)([(0,j.Pqz)(j.bE_),(0,G.Sn)("design:type",j.bE_)],cD.prototype,"_gameObjectContext",void 0),(0,G.Cg)([(0,j.Cdj)("306-5359"),(0,G.Sn)("design:type",An.W)],cD.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],cD.prototype,"_segment",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],cD.prototype,"chestId",void 0),(0,G.Cg)([(0,j.gfw)(hD),(0,G.Sn)("design:type",String)],cD.prototype,"chestType",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],cD.prototype,"chestKey",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.vCS)(),(0,G.Sn)("design:type",Array)],cD.prototype,"rewards",void 0),(0,G.Cg)([(0,j.MnK)(j.XVE),(0,G.Sn)("design:type",j.XVE)],cD.prototype,"_bounds",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cD.prototype,"onAttemptOpen",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cD.prototype,"onOpening",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cD.prototype,"onCollected",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],cD.prototype,"onGotItemClosed",void 0),cD=(0,G.Cg)([(0,j.EVk)("Chest")],cD);var dD=U(51540);class lD{static getChestState(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=jp.R.getNowWithServerTimezoneOffset(),U=B.getHours()>=(Qt.J.isWeekend(B)?8:16),F=U?jp.R.getDateTimeTomorrowLocal():jp.R.getDateTimeLocal(),G=yield this.festivalNetworkHandler.getChestData(k);return(null==G?void 0:G.lastChestDateOpenMs)!==F?(yield this.festivalNetworkHandler.setChestDate(k,F),yield this.festivalNetworkHandler.setChestSpins(k,0),0):0===G.festivalChestSpins?0:U?1:2}))}static attemptChestSpin(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=yield this.getChestState(k);return 0===B&&(yield this.festivalNetworkHandler.setChestSpins(k,1)),B}))}}(0,G.Cg)([(0,Gi.b)("4fd-fef7"),(0,G.Sn)("design:type",dD.v)],lD,"festivalNetworkHandler",void 0);let uD=class extends j.uAl{constructor(){super(...arguments),this.onClickClaimable=new j.HN0,this.onClickNotClaimable=new j.HN0}create(){super.create(),this.setChestGraphic().catch(j.RQr.createHandler("[FestivalChestComponent] Could not set chest graphic for festival chest."))}setChestGraphic(){return(0,G.sH)(this,void 0,void 0,(function*(){this._chestVisualState=yield lD.getChestState(this._chestID),this.activeGameObject.active=0===this._chestVisualState,this.inactiveGameObject.active=0!==this._chestVisualState}))}chestClicked(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._clicksDisabled)return;let k;this._clicksDisabled=!0;try{k=yield lD.attemptChestSpin(this._chestID)}catch(U){return void j.VyI.log("Error getting a response from FestivalChestUtil.attemptChestSpin",j.$bb.Error)}finally{this._clicksDisabled=!1}0===k&&0!==this._chestVisualState&&(k=2);const B=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);switch(k){case 0:this._chestVisualState=1,this.onClickClaimable.dispatch(this);break;case 1:tt.q.instance.prodigy.open.messageBoxOkay(B.getText("FESTIVAL_CHEST_COME_BACK_TOMORROW"),B.getText("BUTTON_OKAY"),null),this.onClickNotClaimable.dispatch(this);break;case 2:tt.q.instance.prodigy.open.messageBoxOkay(B.getText("FESTIVAL_CHEST_COME_BACK_LATER"),B.getText("BUTTON_OKAY"),null),this.onClickNotClaimable.dispatch(this)}}))}destroy(){this.onClickClaimable.dispose(),this.onClickNotClaimable.dispose()}setClicksEnabled(){this._clicksDisabled=!1}setClicksDisabled(){this._clicksDisabled=!0}};(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],uD.prototype,"activeGameObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],uD.prototype,"inactiveGameObject",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],uD.prototype,"_chestID",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uD.prototype,"onClickClaimable",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],uD.prototype,"onClickNotClaimable",void 0),uD=(0,G.Cg)([(0,j.EVk)("FestivalChest",W.Y.festival)],uD);let fD=class extends pt._{constructor(){super(...arguments),this._chestState=2,this.onChestStateReady=new j.HN0}create(){super.create(),lD.getChestState(this._chestID).then((k=>{this._chestState=k,this.onChestStateReady.dispatch()})).catch(j.RQr.createHandler("[FestivalChestDataComponent] Could not get chest state."))}getData(){return this._chestState}destroy(){this.onChestStateReady.dispose(),super.destroy()}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],fD.prototype,"_chestID",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],fD.prototype,"onChestStateReady",void 0),fD=(0,G.Cg)([(0,j.EVk)("FestivalChestData",W.Y.festival)],fD);let bD=class extends j.uAl{constructor(){super(...arguments),this._onAttemptOpen=new j.HN0,this._onOpening=new j.HN0,this._onCollected=new j.HN0}collect(){this._zone=tt.q.instance.prodigy.world.getZone(tt.q.instance.prodigy.world.getCurrentZone());const k=this._playerDataProvider.player;if(this._onAttemptOpen.dispatch(),"C"===this._chestType&&!k.hasMembership())return this.broadcastMemberChestOpenedFailedEvents(),void(Qt.J.shouldSuppressAd(this._playerDataProvider.player)?this.showMemberAdSuppressionToolTip():this.showAd());j.Aq$.isDefined(this._chestKey)&&0===k.backpack.hasItem(this._chestKey.type,this._chestKey.ID)?this.handleChestLocked():this.initChestOpening()}initChestOpening(){const k=this._playerDataProvider.player,B=k.playerContainer;k.saveEnabled=!1,tt.q.instance.game.input.enabled=!1,B.evtProc=!0;tt.q.instance.prodigy.game.add.tween(this.gameObject.transform.localPosition,this).to({x:"-=5"},50,j.GS3.Linear.None).to({x:"+=10"},150,j.GS3.Linear.None).to({x:"-=10"},150,j.GS3.Linear.None).to({x:"+=5"},50,j.GS3.Linear.None).to({y:"-=50"},200,j.GS3.Quadratic.Out).to({y:"+=50"},200,j.GS3.Quadratic.In).to({y:"-=20"},100,j.GS3.Quadratic.Out).to({y:"+=20"},100,j.GS3.Quadratic.In).start().onTweenComplete.add(this.openChest,this,1),this._onOpening.dispatch()}handleChestLocked(){var k;let B=tt.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SOMETHING");if(this._chestKey){const U=null===(k=Yt.t.getItem(this._chestKey.type,this._chestKey.ID))||void 0===k?void 0:k.data;B=(null==U?void 0:U.name)?U.name:B}tt.q.instance.prodigy.open.messageBoxPrefab({text:"CHEST_LOCKED_MESSAGE",textArgs:[B]})}broadcastMemberChestOpenedFailedEvents(){const k=Us.P.shouldUseUnifiedConversionFlow(en.o.FunnelOpenMemberChestWorld)?Fs.R.UnifiedConversionFlow:Qt.J.showYouTubeMembershipAd(tt.q.instance.game,!0)?Fs.R.Video:Fs.R.Static;this._segment.purchase.sendFunnelStart({type:"Open-Member-Chest-World",category:"World",contentId:tt.q.instance.prodigy.world.getCurrentMap(),adType:k,adVersion:Us.P.getAdVersion(en.o.FunnelOpenMemberChestWorld)}),this._segment.container.sendContainerOpenedFailedEvent(ui.ZF.WorldMemberChest,this._chestId,Zb.WE.MemberLocked,fi.N.OpenWorld)}showMemberAdSuppressionToolTip(){const k=this._chestBounds,B=new j.or0(j.Htv.getWidth(k.GameObject),j.Htv.getHeight(k.GameObject)),U=k.GameObject.transform.worldPosition,F=U.x;let G,$,H;$=U.x>tt.q.instance.game.width/2?.75:.25,U.y>tt.q.instance.game.height/2?(G=U.y+B.getHalfHeight(),H=ze.i.UP):(G=U.y-B.getHalfHeight(),H=ze.i.DOWN),tt.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:F,yPosition:G,arrowXRelPos:$,arrowDirection:H})}showAd(){const k={conversionFunnelName:en.o.FunnelOpenMemberChestWorld,conversionFunnelMetadata:tt.q.instance.prodigy.world.getCurrentMap()};tt.q.instance.prodigy.open.membershipInfo(null,k)}openChest(){const k=this._playerDataProvider.player;this._zone.setState(this._chestId,1),j.Aq$.isDefined(this._chestKey)&&k.backpack.consume(this._chestKey.type,this._chestKey.ID,1),k.playerContainer.evtProc=!1,k.saveEnabled=!0,tt.q.instance.game.input.enabled=!0,tt.q.instance.prodigy.open.gotItem(this._rewards,this.checkQuestProgress,null,"open-chest",void 0,void 0,{source_type:"B"!==this._chestType?"A"===this._chestType?li.C.WorldChest:li.C.WorldMemberChest:null}),"A"!==this._chestType&&"C"!==this._chestType||this._segment.container.sendContainerOpenedEvent("A"===this._chestType?ui.ZF.WorldChest:ui.ZF.WorldMemberChest,this._chestId,fi.N.OpenWorld),this._onCollected.dispatch()}checkQuestProgress(){var k;null===(k=tt.q.instance.game.state.get(Tt.G.TileScreen))||void 0===k||k.process()}destroy(){super.destroy(),this._onAttemptOpen.dispose(),this._onOpening.dispose(),this._onCollected.dispose()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],bD.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",bi.Y)],bD.prototype,"_segment",void 0),(0,G.Cg)([(0,j.MnK)(j.XVE),(0,G.Sn)("design:type",j.XVE)],bD.prototype,"_chestBounds",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],bD.prototype,"_onAttemptOpen",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],bD.prototype,"_onOpening",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],bD.prototype,"_onCollected",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_CHEST_ID"),(0,G.Sn)("design:type",String)],bD.prototype,"_chestId",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_CHEST_KEY"),(0,G.Sn)("design:type",Object)],bD.prototype,"_chestKey",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_CHEST_TYPE"),(0,G.Sn)("design:type",String)],bD.prototype,"_chestType",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_CHEST_REWARD"),(0,G.Sn)("design:type",Array)],bD.prototype,"_rewards",void 0),bD=(0,G.Cg)([(0,j.EVk)("LegacyZoneChestCollectEvent",W.Y.map)],bD);let pD=class extends Fi.z{constructor(){super(...arguments),this._bindOnCreate=!1,this._onContextBound=new j.HN0}create(){super.create(),this._zone=this.getCurrentZone(),this._bindOnCreate&&this.bindContext()}bindContext(){var k;let B=null;if(!j.Aq$.isDefined(this._chestType)){B="A";for(let U=0;U=500&&(B="C")}}j.Aq$.isDefined(B)&&this._context.Container.rebind("ZONE_CHEST_TYPE").toConstantValue(B),this._context.Container.rebind("ZONE_CHEST_IS_ENABLED").toConstantValue(!this.areZoneChestsDisabledByQuest()),this._context.Container.rebind("ZONE_CHEST_STATE").toConstantValue(this.getZoneChestState()),this._context.Container.rebind("ZONE_CHEST_IS_CLOSED").toConstantValue(this.isChestClosed()),this._context.Container.rebind("ZONE_CHEST_IS_HIGHLIGHTED").toConstantValue(this.isChestHighlighted()),this.gameObject.findComponentsInChildren(Lo.B).forEach((k=>k.consume())),this._onContextBound.dispatch()}areZoneChestsDisabledByQuest(){var k;const B=null===(k=this._zone.getMap(tt.q.instance.prodigy.world.getCurrentMapTag()))||void 0===k?void 0:k.questParams;return!1===(null==B?void 0:B.enableChests)}unbindContext(){}getCurrentZone(){return tt.q.instance.prodigy.world.getZone(tt.q.instance.prodigy.world.getCurrentZone())}getZoneChestState(){let k;const B=this.isChestClosed();switch(this._chestType){default:case"A":k=B?"NORMAL_CHEST_CLOSED":"NORMAL_CHEST_OPENED";break;case"B":k=B?"QUEST_CHEST_CLOSED":"QUEST_CHEST_OPENED";break;case"C":k=B?"MEMBER_CHEST_CLOSED":"MEMBER_CHEST_OPENED"}return k}isChestClosed(){const k=this._zone.getState(this._chestId);return!j.Aq$.isDefined(k)||0===k}isChestHighlighted(){var k;const B=this._zone.getQuestState();if(!j.Aq$.isDefined(B)||!j.Aq$.isDefined(B.req)||tt.q.instance.game.state.current===Tt.G.PrefabScene)return!1;const U=this._playerDataProvider.player;for(let F=0;FU.backpack.hasItem(B.req.type,B.req.ID))return!0}return!1}destroy(){super.destroy(),this._onContextBound.dispose()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",wt.E)],pD.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_CHEST_ID"),(0,G.Sn)("design:type",String)],pD.prototype,"_chestId",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_CHEST_TYPE"),(0,G.Sn)("design:type",String)],pD.prototype,"_chestType",void 0),(0,G.Cg)([(0,j.Cdj)("ZONE_CHEST_REWARD"),(0,G.Sn)("design:type",Array)],pD.prototype,"_rewards",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],pD.prototype,"_bindOnCreate",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],pD.prototype,"_onContextBound",void 0),pD=(0,G.Cg)([(0,j.EVk)("ZoneChestDataProvider",W.Y.map)],pD);var vD=U(64544);let gD=class extends j.uAl{constructor(){super(...arguments),this._floor=1,this._runOnLoad=!1,this.isEqual=new j.HN0,this.isGreaterThan=new j.HN0,this.isLesserThan=new j.HN0}create(){super.create(),this._runOnLoad&&this.checkTowerCurrentFloor()}destroy(){this.isEqual.dispose(),this.isGreaterThan.dispose(),this.isLesserThan.dispose(),super.destroy()}checkTowerCurrentFloor(){const k=this._academyTowerDataProvider.getCurrentFloor();k===this._floor?this.isEqual.dispatch():k{switch(k){case mD.NextFloorOrdinal:B.push(xt.$.addOrdinalSuffix(this._academyTowerDataProvider.getNextFloor()));break;case mD.Element:B.push(xt.$.capitalizeFirstLetter(this._academyTowerDataProvider.getElement()));break;case mD.BattlesWon:B.push(this._academyTowerDataProvider.getBattlesWon().toString());break;case mD.TotalBattles:B.push(this._academyTowerDataProvider.getTotalBattles().toString());break;case mD.CurrentFloorOrdinal:B.push(xt.$.addOrdinalSuffix(this._academyTowerDataProvider.getCurrentFloor()));break;case mD.NextFloor:B.push(this._academyTowerDataProvider.getNextFloor().toString());break;case mD.CurrentFloor:B.push(this._academyTowerDataProvider.getCurrentFloor().toString())}})),this._localizedText.text=this._localizer.getText(this._localizationKey,...B)}};(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],yD.prototype,"_localizer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],yD.prototype,"_localizedText",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],yD.prototype,"_localizationKey",void 0),(0,G.Cg)([(0,j.MnK)(vD.w),(0,G.Sn)("design:type",vD.w)],yD.prototype,"_academyTowerDataProvider",void 0),(0,G.Cg)([(0,j.gfw)(mD),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],yD.prototype,"_formatTypes",void 0),yD=(0,G.Cg)([(0,j.EVk)("AcademyTowerLocalizedKeyText",W.Y.academy)],yD);let _D=class extends j.uAl{constructor(){super(...arguments),this._battlesWon=1,this._runOnLoad=!1,this.isEqual=new j.HN0,this.isGreaterThan=new j.HN0,this.isLesserThan=new j.HN0}create(){super.create(),this._runOnLoad&&this.checkBattlesWon()}destroy(){this.isEqual.dispose(),this.isGreaterThan.dispose(),this.isLesserThan.dispose(),super.destroy()}checkBattlesWon(){const k=this._academyTowerDataProvider.getBattlesWon();k===this._battlesWon?this.isEqual.dispatch():k{tt.q.instance.prodigy.open.menuCloseAll();const k=Number(this._storeIdToOpen);isNaN(k)?tt.q.instance.prodigy.open.dynamicStore({storeKey:this._storeIdToOpen,origin:{originType:ui.$N.ButtonClick}}):tt.q.instance.prodigy.open.store(k,void 0,void 0,{originType:ui.$N.ButtonClick})}));const k=this.getInjectedValue("a25-68f4");k&&k.sendQuestEventViaHub(Wr.T.BUTTON_CLICK,{id:this._questEventId}).catch(j.RQr.createHandler("An error occurred while sending a quest event from the CurrencyDrainModal"))}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",Object)],SD.prototype,"_storeIdToOpen",void 0),(0,G.Cg)([(0,j.MnK)(Ut.S),(0,G.Sn)("design:type",Ut.S)],SD.prototype,"_actionButton",void 0),SD=(0,G.Cg)([(0,j.EVk)("CurrencyDrainModalComponent",W.Y.festival)],SD);let AD=class extends j.uAl{constructor(){super(...arguments),this.onSkinProcessed=new j.HN0}create(){super.create(),this.processActiveSkin()}processActiveSkin(){for(const k of tt.q.instance.prodigy.skin.active){const B=k.getOverrideName(this._mapTag);if(void 0!==B)return void this.onSkinProcessed.dispatch(B)}this.onSkinProcessed.dispatch()}destroy(){this.onSkinProcessed.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("ZONE_MAP_TAG"),(0,G.Sn)("design:type",String)],AD.prototype,"_mapTag",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],AD.prototype,"onSkinProcessed",void 0),AD=(0,G.Cg)([(0,j.EVk)("SkinManager",W.Y.festival)],AD)},88552:(k,B,U)=>{"use strict";U.d(B,{Z:()=>j});var F=U(8674),G=U(62459);let j=class extends G.uAl{constructor(){super(...arguments),this.onClose=new G.HN0}destroy(){this.onClose.dispose(),super.destroy()}run(){var k;this.onClose.dispatch(),null===(k=this.menu)||void 0===k||k.close()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"onClose",void 0),j=(0,F.Cg)([(0,G.EVk)("CloseMenu")],j)},95798:(k,B,U)=>{"use strict";U.d(B,{K:()=>F,o:()=>K});var F,G=U(62459),j=U(95891),$=U(35120),H=U(34829),V=U(98623),W=U(30226),q=U(88022);!function(k){k[k.UP=0]="UP",k[k.UP_RIGHT=45]="UP_RIGHT",k[k.RIGHT=90]="RIGHT",k[k.DOWN_RIGHT=135]="DOWN_RIGHT",k[k.DOWN=180]="DOWN",k[k.DOWN_LEFT=225]="DOWN_LEFT",k[k.LEFT=270]="LEFT",k[k.UP_LEFT=315]="UP_LEFT"}(F||(F={}));class K extends V.H{constructor(k,B,U,V,W,K,z=F.UP,Y,Q){var X,Z;super(k,B,U.x,U.y),this.isBlocked=!1,this.data={},this.canReTrigger=!1,this.callback=null,this.frameCount=0,this.fired=!1,this.forceVisible=!1,this.data=U,this.user=V,this.path=W,this.canReTrigger=j.get(U,"canReTrigger",!1),this.callback=Q?null:K;const J=j.get(U,"guideHandPathToX",U.x),tt=j.get(U,"guideHandPathToY",U.y);let et=z;G.Aq$.isDefined(et)||(et=U.x<50?U.y<50?F.UP_LEFT:U.y>670?F.DOWN_LEFT:F.LEFT:U.x>1230?U.y<50?F.UP_RIGHT:U.y>670?F.DOWN_RIGHT:F.RIGHT:U.y<50?F.UP:U.y>60?F.DOWN:F.LEFT);const it=this.add($.q.instance.prodigy.create.sprite(0,0,q._.General_core_json,"area-pointer"));it.anchor.set(.5,0),it.angle=et,it.inputEnabled=!0,it.events.onInputDown.add(this.moveTo.bind(this,J,tt)),this.handSprite=it,Q&&U.disabledGraphic&&(this.forceVisible=!0,it.visible=!1,this.add($.q.instance.prodigy.create.sprite(null!==(X=U.arrowOffsetX)&&void 0!==X?X:0,null!==(Z=U.arrowOffsetY)&&void 0!==Z?Z:0,U.disabledGraphic,void 0,{x:.5,y:.5})));let st=0;et>F.UP&&etF.DOWN&&et<360&&(st=30);let nt=0;et>F.LEFT||etF.RIGHT&&etnull)){var B,U;this.callback=k,this.data.disabledGraphic&&(this.forceVisible=!0,this.handSprite.visible=!1,this.add($.q.instance.prodigy.create.sprite(null!==(B=this.data.arrowOffsetX)&&void 0!==B?B:0,null!==(U=this.data.arrowOffsetY)&&void 0!==U?U:0,this.data.disabledGraphic,void 0,{x:.5,y:.5})))}update(){if(super.update(),this.user.evtProc||this.fired&&!this.canReTrigger)return;if(!(this.frameCount<=0))return void this.frameCount--;this.frameCount=5;let k=!1;G.Aq$.isDefined(this.data.r)&&G.cj9.distance(this.user.x,this.user.y,this.x,this.y)<=this.data.r||!G.Aq$.isDefined(this.data.r)&&G.Aq$.isDefined(this.data.w)&&this.user.x>=this.x-Math.floor(this.data.w/2)&&this.user.x<=this.x+Math.floor(this.data.w/2)&&this.user.y>=this.y-Math.floor(this.data.h/2)&&this.user.y<=this.y+Math.floor(this.data.h/2)?k=!this.fired:this.canReTrigger&&(this.fired=!1),k&&(this.fired=!0,G.Aq$.isDefined(this.callback)&&this.callback())}process(k,B,U=""){return this.visible=this.forceVisible,this.checkDistance(k,B,U)}setClosest(){this.visible=!0}getTarget(){return this.data.target}checkDistance(k,B,U){if(!G.Aq$.isDefined(this.data.target)||!G.Aq$.isDefined(U)||U===k.questHub&&k.getCurrentQuestID()!==k.finalQuestId)return null;if(`${k.ID}-${B.getTag()}`===U)return 1;const F=(k,B,j)=>{if(!G.Aq$.isDefined(j)||W.J.inArray(B,j))return null;if(U===j)return B.length+1;const $=j.split("-"),H=k.getZone($[0]);if(!G.Aq$.isDefined(H))return null;const V=H.getMap($[1]).locations;let q=null;for(let U=0;U1180?Math.floor(.5*this.data.w):0),B=this.y+(this.data.y<100?-Math.floor(.5*this.data.h):this.data.y>620?Math.floor(.5*this.data.h):0),U=this.data.w*(this.data.x<100||this.data.x>1180?1:.5),F=this.data.h*(this.data.y<100||this.data.y>620?1:.5));const j=this.game.add.graphics(0,0);return j.beginFill(0,.75),this.data.rect?j.drawRect(k-.5*U,B-.5*F,U,F):j.drawEllipse(k,B,U,F),j}}},73797:(k,B,U)=>{"use strict";var F,G,j,$,H,V,W,q,K,z,Y,Q,X,Z,J,tt,et,it,st,nt,at,rt,ot,ht,ct,dt,lt,ut,ft,bt,pt,vt,gt,mt,yt,_t,Et,wt,Tt,St,At,Ct,Ot,It,Dt,Rt,Pt,Mt;U.d(B,{$i:()=>pt,AU:()=>it,B:()=>Ot,Bk:()=>ot,F0:()=>at,GR:()=>Mt,H3:()=>mt,HG:()=>tt,Ii:()=>K,J3:()=>q,J8:()=>ft,Lk:()=>yt,RZ:()=>ut,Y1:()=>Z,_D:()=>wt,bI:()=>St,bS:()=>bt,bv:()=>nt,cN:()=>Y,f7:()=>vt,fP:()=>st,gJ:()=>rt,hw:()=>H,iZ:()=>gt,ib:()=>It,ig:()=>z,ki:()=>At,lT:()=>X,lc:()=>j,n8:()=>lt,nN:()=>Tt,oI:()=>W,oL:()=>Rt,ph:()=>Q,pm:()=>ct,rF:()=>Ct,sd:()=>ht,sn:()=>Dt,u0:()=>$,vy:()=>Pt,zg:()=>_t,zr:()=>J}),function(k){k.ShowDrops="Prodigy.Events.VictoryManager.SHOW_DROPS",k.Complete="Prodigy.Events.VictoryManager.COMPLETE"}(F||(F={})),function(k){k.Audio="Prodigy.Events.SystemMenu.REFRESH_AUDIO_MENU"}(G||(G={})),function(k){k.AddChild="Prodigy.Events.Screen.ADD_CHILD",k.GetLayer="Prodigy.Events.Screen.GET_LAYER",k.EnableBackground="Prodigy.Events.Screen.ENABLE_BACKGROUND",k.EnableContent="Prodigy.Events.Screen.ENABLE_CONTENT"}(j||(j={})),function(k){k.PlayerAdded="Prodigy.Events.WalkableScreen.PLAYER_ADDED",k.PlayerUpdate="Prodigy.Events.WalkableScreen.PLAYER_UPDATED"}($||($={})),function(k){k.Done="Prodigy.Events.FlyingStars.DONE",k.PippetStarsDone="Prodigy.Events.FlyingPippetStars.DONE",k.MemberStarsDone="Prodigy.Events.FlyingMemberStars.DONE"}(H||(H={})),function(k){k.Done="Prodigy.Events.OpenJar.DONE"}(V||(V={})),function(k){k.ItemsLost="Prodigy.Event.MemberJar.ITEMS_LOST",k.ItemsSaved="Prodigy.Event.MemberJar.ITEMS_SAVED"}(W||(W={})),function(k){k.GetIsRunning="Prodigy.Events.Battle.GET_IS_RUNNING",k.PopupClosed="Prodigy.Events.Battle.POPUP_CLOSED",k.EndBattle="Prodigy.Events.Battle.END_BATTLE",k.PvpComboIncrease="Prodigy.Events.Battle.PVP_COMBO_INCREASE",k.PvpComboBreak="Prodigy.Events.Battle.PVP_COMBO_BREAK",k.PvpUpdate="Prodigy.Events.Battle.PVP_UPDATE",k.PvpComboMeterMoveIn="Prodigy.Events.Battle.PVP_COMBO_METRE_MOVE_IN",k.PvpComboMeterMoveOut="Prodigy.Events.Battle.PVP_COMBO_METRE_MOVE_OUT"}(q||(q={})),function(k){k.DismissalOverlay="Prodigy.Events.RevampBattle.DISMISSAL_OVERLAY",k.Victory="Prodigy.Events.RevampBattle.VICTORY"}(K||(K={})),function(k){k.AnimationDone="Prodigy.Events.Creature.ANIMATION_DONE",k.LevelUp="Prodigy.Events.Creature.LEVEL_UP",k.AnyLevelUp="Prodigy.Events.Creature.ANY_LEVEL_UP",k.StarsAdded="Prodigy.Events.Creature.STARS_ADDED",k.PlayerLoaded="Prodigy.Events.Creature.PLAYER_LOADED",k.LevelUpAnimation="Prodigy.Events.Creature.LEVEL_UP_ANIMATION",k.ProcessedAllEvents="Prodigy.Events.Creature.PROCESSED_ALL_EVENTS",k.EvolveStart="Prodigy.Events.Creature.EVOLVE_START",k.EvolveEnd="Prodigy.Events.Creature.EVOLVE_END",k.Evolved="Prodigy.Events.Creature.EVOLVED",k.GearUpdate="Prodigy.Events.Creature.GEAR_UPDATE",k.Merged="Prodigy.Events.Creature.MERGED"}(z||(z={})),function(k){k.ShowPippetBattleBonus="Prodigy.Events.Chest.SHOW_PIPPET_BATTLE_BONUS",k.ShowMemberStars="Prodigy.Events.Chest.SHOW_MEMBER_STARS"}(Y||(Y={})),function(k){k.EnableDynamicLayer="Prodigy.Events.Map.ENABLE_DYNAMIC_LAYER"}(Q||(Q={})),function(k){k.Setup="Prodigy.Events.NetworkHandlers.SETUP",k.LoginError="Prodigy.Events.NetworkHandlers.LOGIN_ERROR",k.ArcadiaHandoffSuccess="Prodigy.Events.NetworkHandlers.ARCADIA_HANDOFF_SUCCESS",k.ArcadiaHandoffFailure="Prodigy.Events.NetworkHandlers.ARCADIA_HANDOFF_FAILURE"}(X||(X={})),function(k){k.HideHUD="Prodigy.Events.HUD.HIDE_HUD",k.ShowHUD="Prodigy.Events.HUD.SHOW_HUD",k.RefreshHUD="Prodigy.Events.HUD.REFRESH_HUD_ICONS",k.SetClickedWorldMap="Prodigy.Events.HUD.SET_CLICKED_WORLD_MAP",k.WorldMapOpened="Prodigy.Events.HUD.WORLD_MAP_OPENED",k.HideChatNotif="Prodigy.Events.HUD.HIDE_CHAT_NOTIF",k.ClosePetsMenu="Prodigy.Events.HUD.CLOSE_PETS_MENU",k.ShowRightSideHUD="Prodigy.Events.HUD.SHOW_RIGHT_HUD",k.HideRightSideHUD="Prodigy.Events.HUD.HIDE_RIGHT_HUD",k.RefreshWizardWatchAdCount="Prodigy.Events.HUD.REFRESH_WIZARD_WATCH_AD_COUNT",k.HighlightMapButton="Prodigy.Events.HUD.HIGHLIGHT_MAP_BUTTON",k.HidePetUpgradeNotification="Prodigy.Events.HUD.HIDE_PET_UPGRADE_NOTIFICATION",k.UpdateSocialNotification="Prodigy.Events.HUD.UPDATE_SOCIAL_NOTIFICATION",k.HUDRevampDemandAttention="Prodigy.Events.HUD.HUD_REVAMP_DEMAND_ATTENTION",k.HUDRevampStartOperation="Prodigy.Events.HUD.HUD_REVAMP_START_OPERATION",k.HUDRevampEndOperation="Prodigy.Events.HUD.HUD_REVAMP_END_OPERATION",k.HUDRevampButtonDataUpdated="Prodigy.Events.HUD.HUD_REVAMP_BUTTON_DATA_UPDATED",k.HUDRevampButtonVisibilityRefreshRequested="Prodigy.Events.HUD.HUD_REVAMP_BUTTON_VISIBILITY_REFRESH_REQUESTED",k.HUDRevampButtonAttentionGranted="Prodigy.Events.HUD.HUD_REVAMP_ATTENTION_GRANTED",k.HUDRevampExclusiveAttentionChanged="Prodigy.Events.HUD.HUD_REVAMP_EXCLUSIVE_ATTENTION_CHANGED",k.HUDAttentionManagerUpdated="Prodigy.Events.HUD.HUD_ATTENTION_MANAGER_UPDATED",k.CheckForHUDAttention="Prodigy.Events.HUD.CHECK_FOR_HUD_ATTENTION"}(Z||(Z={})),function(k){k.GetAllMailSuccess="Prodigy.Events.Mailer.GET_ALL_MAIL_SUCCESS",k.GetAllMailFailure="Prodigy.Events.Mailer.GET_ALL_MAIL_FAILURE",k.MarkAsRead="Prodigy.Events.Mailer.MARK_AS_READ",k.MarkAsReadFailure="Prodigy.Events.Mailer.MARK_AS_READ_FAILED",k.DeleteMailSuccess="Prodigy.Events.Mailer.DELETE_MAIL_SUCCESSFUL",k.DeleteMailFailure="Prodigy.Events.Mailer.DELETE_MAIL_FAILURE",k.UpdateMailCounters="Prodigy.Events.Mailer.UPDATE_MAIL_COUNTERS",k.ShowIndicator="Prodigy.Events.Mailer.SHOW_INDICATOR",k.GiftBoxOpened="Prodigy.Events.Mailer.GIFT_BOX_OPENED",k.CloseList="Prodigy.Events.Mailer.CLOSE_LIST"}(J||(J={})),function(k){k.Card="Card",k.ChatButton="chatButton",k.FriendsList="FriendsList",k.FriendsListOfActualFriends="FriendsListOfActualFriends",k.HUD="HUD",k.MailerButton="ProdigyMailerButton",k.Mailer="ProdigyMailer",k.MailView="ProdigyMailView",k.NetworkHandlers="NetworkHandlers",k.Titan="Titan",k.WeekendEventsLevelUp="WeekendEvents.AnyLevelUp"}(tt||(tt={})),function(k){k.OnGetDataComplete="Prodigy.Events.Boss.ON_GET_DATA_COMPLETE"}(et||(et={})),function(k){k.Update="Prodigy.Events.GameObj.UPDATE",k.PlayerInitialized="Prodigy.Events.GameObj.PLAYER_INITIALIZED"}(it||(it={})),function(k){k.Loaded="Prodigy.Events.Boot.LOADED"}(st||(st={})),function(k){k.WorkerLoadComplete="Prodigy.Events.Loading.WORKER_LOAD_COMPLETE",k.FestivalInitialized="Prodigy.Events.Loading.FESTIVAL_INITIALIZED",k.AnalyticsInitialized="Prodigy.Events.Loading.ANALYTICS_INITIALIZED"}(nt||(nt={})),function(k){k.ClickedHouseIcon="Prodigy.Events.House.CLICKED_HOUSE_ICON",k.OpenEditor="Prodigy.Events.House.OPEN_EDITOR",k.CloseEditor="Prodigy.Events.House.CLOSE_EDITOR"}(at||(at={})),function(k){k.InkBlasted="Prodigy.Events.ShipwreckShore.INK_BLASTED",k.InkGroupDestroyed="Prodigy.Events.ShipwreckShore.INK_GROUP_DESTROYED"}(rt||(rt={})),function(k){k.OnMouseWheel="Prodigy.Events.Input.ON_MOUSE_WHEEL"}(ot||(ot={})),function(k){k.GotFriendsList="Prodigy.Events.FriendsList.GOT_FRIENDS_LIST",k.GotFriendsListAppearance="Prodigy.Events.FriendsList.GOT_FRIENDS_LIST_APPEARANCE",k.GetTotalFriendRequests="Prodigy.Events.FriendsList.GET_TOTAL_FRIEND_REQUESTS",k.GetTotalFriendRequestsFailure="Prodigy.Events.FriendsList.GET_TOTAL_FRIEND_REQUESTS_FAILURE",k.ClearFriendRequestsCache="Prodigy.Events.FriendsList.CLEAR_FRIEND_REQUESTS_CACHE",k.GetFriendRequestList="Prodigy.Events.FriendsList.GET_FRIEND_REQUEST_LIST",k.GotFriendRequestList="Prodigy.Events.FriendsList.GOT_FRIEND_REQUEST_LIST",k.GetFriendList="Prodigy.Events.FriendsList.GET_FRIENDS_LIST",k.SetRequests="Prodigy.Events.FriendsList.SET_REQUESTS",k.SendRequest="Prodigy.Events.FriendsList.SEND_REQUEST",k.CancelRequest="Prodigy.Events.FriendsList.CANCEL_REQUEST",k.AcceptRequest="Prodigy.Events.FriendsList.ACCEPT_REQUEST",k.RejectRequest="Prodigy.Events.FriendsList.REJECT_REQUEST",k.RequestSent="Prodigy.Events.FriendsList.REQUEST_SENT",k.RequestCancelled="Prodigy.Events.FriendsList.REQUEST_CANCELLED",k.RequestReceived="Prodigy.Events.FriendsList.REQUEST_RECEIVED",k.RequestAccepted="Prodigy.Events.FriendsList.REQUEST_ACCEPTED",k.RequestRejected="Prodigy.Events.FriendsList.REQUEST_REJECTED",k.RemoveFriend="Prodigy.Events.FriendsList.REMOVE_FRIEND",k.FriendRemoved="Prodigy.Events.FriendsList.FRIEND_REMOVED",k.GetFriendshipStatus="Prodigy.Events.FriendsList.GET_FRIENDSHIP_STATUS",k.GotFriendshipStatus="Prodigy.Events.FriendsList.GOT_FRIENDSHIP_STATUS",k.FriendsAppearanceUpdated="Prodigy.Events.FriendsList.FRIENDS_APPEARANCE_UPDATED",k.IllogicalRequestAction="Prodigy.Events.FriendsList.ILLOGICAL_REQUEST_ACTION"}(ht||(ht={})),function(k){k.MovePlayer="Prodigy.Events.PlayerLocomotion.MOVE_PLAYER",k.StopPlayer="Prodigy.Events.PlayerLocomotion.STOP_PLAYER",k.GetTarget="Prodigy.Events.PlayerLocomotion.GET_TARGET"}(ct||(ct={})),function(k){k.SetBackgroundPanelTileDimensions="Prodigy.Events.LocationPage.SET_BACKGROUND_PANEL_TILE_DIMENSIONS",k.GetBackgroundPanelTileDimensions="Prodigy.Events.LocationPage.GET_BACKGROUND_PANEL_TILE_DIMENSIONS"}(dt||(dt={})),function(k){k.TabButtonClicked="Prodigy.Events.UI.TAB_BUTTON_CLICKED",k.TabSelected="Prodigy.Events.UI.TAB_SELECTED",k.ChildAdded="Prodigy.Events.UI.CHILD_ADDED",k.ChildRemoved="Prodigy.Events.UI.CHILD_REMOVED",k.MenuOpened="Prodigy.Events.UI.MENU_OPENED",k.FactoryMenuOpened="Prodigy.Events.UI.FACTORY_MENU_OPENED",k.FactoryMenuClosed="Prodigy.Events.UI.FACTORY_MENU_CLOSED",k.MountTogglePressed="Prodigy.Events.UI.MOUNT_TOGGLE_PRESSED",k.WorldMapZoneSelected="Prodigy.Events.UI.WORLD_MAP_ZONE_SELECTED",k.WorldMapDifficultyModeChanged="Prodigy.Events.UI.WORLD_MAP_DIFFICULTY_MODE_CHANGED",k.DialogClosed="prodigy.Events.UI.DIALOG_CLOSED",k.GotItemClosed="prodigy.Events.UI.GOT_ITEM_CLOSED",k.SegmentedOfferDialogClosed="prodigy.Events.UI.SEGMENTED_OFFER_DIALOG_CLOSED",k.RestrictionsClosed="Prodigy.Events.UI.RESTRICTIONS_CLOSED",k.FestivalProgressClosed="Prodigy.Events.UI.FESTIVAL_PROGRESS_CLOSED",k.FestivalVideoClosed="Prodigy.Events.UI.FESTIVAL_VIDEO_CLOSED"}(lt||(lt={})),function(k){k.GotTitans="Prodigy.Events.Titan.GOT_TITANS",k.GotTitan="Prodigy.Events.Titan.GOT_TITAN",k.Catapult="Prodigy.Events.Titan.CATAPULT"}(ut||(ut={})),function(k){k.PlayerAppearanceUpdated="Prodigy.Events.PlayerContainer.PLAYER_APPEARANCE_UPDATED",k.PlayerEditingMenuClosed="Prodigy.Events.PlayerContainer.PLAYEREDITINGMENUCLOSED",k.NewAnimationStateSet="Prodigy.Events.PlayerContainer.NEW_ANIMATION_STATE_SET",k.MorphMarbleUsed="Prodigy.Events.PlayerContainer.MORPH_MARBLE_USED",k.MorphMarbleCancelled="Prodigy.Events.PlayerContainer.MORPH_MARBLE_CANCELLED",k.MorphMarbleTimerUpdated="Prodigy.Events.PlayerContainer.MORPH_MARBLE_TIMER_UPDATED"}(ft||(ft={})),function(k){k.POST_MESSAGE_RECEIVED="Prodigy.Events.Web.POST_MESSAGE_RECEIVED"}(bt||(bt={})),function(k){k.TargetCollected="Prodigy.Events.Dungeon.TARGET_COLLECTED"}(pt||(pt={})),function(k){k.PagesCollected="Prodigy.Events.Achievements.PAGES_COLLECTED",k.ClaimedRewardsUpdated="Prodigy.Events.Achievements.CLAIMED_REWARDS_UPDATED"}(vt||(vt={})),function(k){k.ToolTipClosed="Prodigy.Events.ToolTip.CLOSE"}(gt||(gt={})),function(k){k.MembershipLapsedBetweenSessions="Prodigy.Events.Membership.LAPSED_BETWEEN_SESSIONS",k.MembershipResponseReceived="Prodigy.Events.Membership.RESPONSE_RECEIVED",k.MembershipRewardsFlowComplete="Prodigy.Events.Membership.REWARDS_FLOW_COMPLETE"}(mt||(mt={})),function(k){k.HardCurrencyPurchased="Prodigy.Events.HardCurrency.HARD_CURRENCY_PURCHASED"}(yt||(yt={})),function(k){k.PurchaseStarted="Prodigy.Events.DynamicStore.PURCHASE_STARTED",k.PurchaseSuccessful="Prodigy.Events.DynamicStore.PURCHASE_SUCCESSFUL",k.PurchaseFailed="Prodigy.Events.DynamicStore.PURCHASE_FAILED"}(_t||(_t={})),function(k){k.StarJarRedeemed="Prodigy.Events.PostBattleFlow.STAR_JAR_REDEEMED"}(Et||(Et={})),function(k){k.PuppetmasterWorldMapSpell="Prodigy.Events.EZoneUnlockScalingEvents.PUPPETMASTER_LOCKS_ZONES",k.PuppetmasterCutsceneComplete="Prodigy.Events.EZoneUnlockScalingEvents.PUPPETMASTER_CUTSCENE_COMPLETE"}(wt||(wt={})),function(k){k.PlayerGoalsOpenPanel="Prodigy.Events.EPlayerGoalsQuestEvent.PLAYER_GOALS_OPEN_PANEL",k.PlayerGoalsPanelClosed="Prodigy.Events.EPlayerGoalsQuestEvent.PLAYER_GOALS_PANEL_CLOSED",k.PlayerGoalsClosed="Prodigy.Events.EPlayerGoalsQuestEvent.PLAYER_GOALS_CLOSED"}(Tt||(Tt={})),function(k){k.ReceivedPetGear="Prodigy.Events.PET_GEAR.RECEIVED_PET_GEAR",k.FtueStarted="Prodigy.Events.PET_GEAR.FTUE_STARTED",k.FtueCompleted="Prodigy.Events.PET_GEAR.FTUE_COMPLETED",k.PetGearAdClicked="Prodigy.Events.PetGear.AD_CLICKED"}(St||(St={})),function(k){k.AbleToMerge="Prodigy.Event.PET_MERGE.ABLE_TO_MERGE",k.FtueStarted="Prodigy.Events.PET_MERGE.FTUE_STARTED",k.FtuePetMenuOpened="Prodigy.Events.FTUE_PET_MERGE.PET_MENU_OPEN",k.FtueMergeModalLoaded="Prodigy.Events.FTUE_PET_MERGE.MERGE_MODAL_LOADED",k.FtueCompleted="Prodigy.Events.PET_MERGE.FTUE_COMPLETED"}(At||(At={})),function(k){k.CountdownStarted="Prodigy.Events.DailyLoginCalendar.COUNTDOWN_STARTED",k.CountdownTask="Prodigy.Events.DailyLoginCalendar.COUNTDOWN_TASK",k.ReadyToCollect="Prodigy.Events.DailyLoginCalendar.READY_TO_COLLECT",k.CalendarEnding="Prodigy.Events.DailyLoginCalendar.CALENDAR_ENDING",k.CalendarEnded="Prodigy.Events.DailyLoginCalendar.CALENDAR_ENDED",k.CalendarTimeRemaining="Prodigy.Events.DailyLoginCalendar.CALENDAR_TIME_REMAINING"}(Ct||(Ct={})),function(k){k.SlotVisibilityChanged="Prodigy.Events.SLOT_VISIBILITY_CHANGED"}(Ot||(Ot={})),function(k){k.ItemConsumed="Prodigy.Events.Item.ITEM_CONSUMED",k.ItemReceived="Prodigy.Events.Item.ITEM_RECEIVED"}(It||(It={})),function(k){k.HardModeFtueStepAdvanced="Prodigy.Events.CampaignReplayFtue.HARD_MODE_FTUE_STEP_ADVANCED",k.HardModeFtueCanceled="Prodigy.Events.CampaignReplayFtue.HARD_MODE_FTUE_CANCELLED",k.HardModeFtueCompleted="Prodigy.Events.CampaignReplayFtue.HARD_MODE_FTUE_COMPLETED"}(Dt||(Dt={})),function(k){k.HardModeJustUnlocked="Prodigy.Events.CampaignReplay.HARD_MODE_JUST_UNLOCKED",k.ExpertModeJustUnlocked="Prodigy.Events.CampaignReplay.EXPERT_MODE_JUST_UNLOCKED",k.DifficultyUnlockRequestFailed="Prodigy.Events.CampaignReplay.DIFFICULTY_UNLOCK_REQUEST_FAILED",k.DifficultyModeChangeFailed="Prodigy.Events.CampaignReplay.DIFFICULTY_MODE_CHANGE_FAILED"}(Rt||(Rt={})),function(k){k.FtueStepAdvanced="Prodigy.Events.AfterSchoolWidget.FTUE_STEP_ADVANCED",k.FtueFunnelProgressionStepComplete="Prodigy.Events.AfterSchoolWidget.FTUE_FUNNEL_PROGRESSION_STEP_COMPLETE"}(Pt||(Pt={})),function(k){k.ObjectiveUpdated="Prodigy.Events.Objectives.OBJECTIVE_UPDATED"}(Mt||(Mt={}))},79421:(k,B,U)=>{"use strict";U.d(B,{N:()=>V});var F=U(62459),G=U(88022),j=U(35120),$=U(34829),H=U(59968);class V extends H.R{constructor(k,B,U,$,H,V,W,q,K,z){super(k,B,W,null,H,V),this.sprite=null,this.animWalk=null,this.animStand=null,this.head=null,this.indicator=null,this.nameOffsetX=-5,5===K&&this.nameText.GameObject.legacyTransform.group.position.set(0,-135),this.sprite=this.sprites.addChild(j.q.instance.prodigy.create.sprite(0,0,G._.Npc_sprite_gnome_json,"npc_0",void 0,this.onTextureLoaded.bind(this))),this.sprite.x-=Math.floor(this.sprite.width/2),this.sprite.y=-this.sprite.height,this.head=j.q.instance.prodigy.create.element(this.sprites,this.sprite.x,0);const Y=13-(2===K||3===K||4===K?5:5===K?20:6===K?22:0),Q=this.head.add(j.q.instance.prodigy.create.sprite(Y,0,G._.Npc_sprite_gnome_json,`hat_${F.Aq$.isDefined(K)?K:1}`));Q.y=10-Q.height;const X=this.head.add(j.q.instance.prodigy.create.sprite(0,0,G._.Npc_sprite_gnome_json,`head_${F.Aq$.isDefined(q)?q:1}`));F.Aq$.isDefined(z)&&(X.inputEnabled=!0,X.events.onInputDown.add((()=>{this.clicked(U,$,z)})),Q.inputEnabled=!0,Q.events.onInputDown.add((()=>{this.clicked(U,$,z)})),this.sprite.inputEnabled=!0,this.sprite.events.onInputDown.add((()=>{this.clicked(U,$,z)}))),this.stand(),this.showName(),this.repositionName()}onTextureLoaded(k){k&&(this.animWalk=k.animations.addIfFound("walk",["npc_0","npc_1","npc_2","npc_3","npc_4","npc_5","npc_6","npc_7"],10,!0),this.animWalk.frame=0,this.animStand=k.animations.addIfFound("stand",["npc_8","npc_9","npc_10","npc_11","npc_12","npc_13","npc_14","npc_15"],10,!0),this.animStand.frame=0)}flip(){super.flip(),this.repositionName()}update(){if(super.update(),F.Aq$.isDefined(this.animWalk)&&F.Aq$.isDefined(this.animStand)){let k="npc_0";1===this.mode?k=this.animStand.currentFrame.name:0===this.mode&&(k=this.animWalk.currentFrame.name),F.Aq$.isDefined(this.head)&&(this.head.y=this.sprite.y-15+V.frameOffsets[k])}}setIndicator(k){F.Aq$.isDefined(this.indicator)||(this.indicator=j.q.instance.prodigy.create.sprite(0,-70,G._.General_icons_json,k),this.indicator.anchor.set(.5,1),this.indicatorE.add(this.indicator),this.game.add.tween(this.indicator,this).to({y:this.indicator.y-50},1e3,F.GS3.Quadratic.InOut,!0,0,$.s.MAX_SAFE_INTEGER,!0)),this.indicator.frameName=k}clicked(k,B,U){B.findPath(k.x,k.y,this.x-20,this.y+20,!0).then((B=>{B&&k.setPath(B,(()=>{null==U||U()}))})).catch(F.RQr.createHandler("Unable to find path to gnome")),this.sendNpcClickedEvent()}repositionName(){this.nameText.GameObject.legacyTransform.x=Math.round((this.sprites.scale.x<0?-1:1)*this.nameOffsetX)}}V.frameOffsets={npc_0:0,npc_1:0,npc_2:2,npc_3:1,npc_4:0,npc_5:0,npc_6:2,npc_7:1,npc_8:0,npc_9:0,npc_10:1,npc_11:2,npc_12:4,npc_13:5,npc_14:4,npc_15:3}},18916:(k,B,U)=>{"use strict";U.d(B,{U:()=>H});var F=U(62459),G=U(35120),j=U(59968),$=U(88022);class H extends j.R{constructor(k,B,U,F,j,H,V){super(k,B,V,null,U,F),this.body=this.add(G.q.instance.prodigy.create.sprite(-35,0,$._.Npc_sprite_cebollini_json,"mini",void 0,this.onTextureLoaded.bind(this))),this.body.anchor.set(0,1),this.sprites.addChild(this.body),this.nameText.GameObject.legacyTransform.y+=40,this.showName()}onTextureLoaded(k){k&&(k.animations.add("stand",["mini","mini1","mini2","mini3","mini2","mini1"],10,!0,!1),k.animations.play("stand",void 0,!1))}bossStart(k){this.rightArm=this.add(G.q.instance.prodigy.create.sprite(50,-30,$._.Npc_sprite_cebollini_json,"hand_1")),this.body=this.add(G.q.instance.prodigy.create.sprite(-40,-90,$._.Npc_sprite_cebollini_json,"body")),this.head=this.add(G.q.instance.prodigy.create.sprite(-20,-45,$._.Npc_sprite_cebollini_json,"face_1")),this.hat=this.add(G.q.instance.prodigy.create.sprite(-55,-135,$._.Npc_sprite_cebollini_json,"hat_0")),this.leftArm=this.add(G.q.instance.prodigy.create.sprite(-50,-30,$._.Npc_sprite_cebollini_json,"hand_2")),this.sprites.addChild(this.rightArm),this.sprites.addChild(this.body),this.sprites.addChild(this.head),this.sprites.addChild(this.hat),this.sprites.addChild(this.leftArm),k.add.tween(this.head,this).to({y:"-=1"},200,F.GS3.Linear.None).to({y:"+=2"},500,F.GS3.Linear.None).to({y:this.head.y},400,F.GS3.Linear.None).loop(!0).start(),k.add.tween(this.hat,this).to({y:"-=1"},200,F.GS3.Linear.None).to({y:"+=2"},500,F.GS3.Linear.None).to({y:this.hat.y},400,F.GS3.Linear.None).loop(!0).start(),k.add.tween(this.leftArm,this).to({y:"+=2"},800,F.GS3.Linear.None).delay(600).to({y:this.leftArm.y},800,F.GS3.Linear.None).loop(!0).start(),this.rightArm.frameName="spatula_0",this.rightArm.y=this.rightArm.y-60,this.rightArm.x=this.rightArm.x-15}entreeStart(){this.rightArm.frameName="spatula_1",this.rightArm.x=this.rightArm.x+15,this.hat.frameName="hat_1"}dessertStart(){this.hat.frameName="hat_2",this.hat.x=this.hat.x-20,this.hat.y=this.hat.y-5,this.head.frameName="face_2"}}},86949:(k,B,U)=>{"use strict";U.d(B,{u:()=>F});class F{constructor(){this.gameObject=null}create(){}update(){}destroy(){}hasUniqueInstance(){return!1}}},19273:(k,B,U)=>{"use strict";U.d(B,{_:()=>$});var F=U(62459),G=U(35120),j=U(57308);class $ extends j.Y{constructor(k,B,U,F=0,j=0){let $;for(super(k,B),this.initialized=!1,this.components=[],this.metricsManager=G.q.instance.prodigy.gameContainer.get("2a1-fed9"),this.metricsManager.objectCreated("GameObject"),$=0;${"use strict";U.d(B,{j:()=>q});var F=U(59838),G=U(62459),j=U(35120),$=U(31427);class H extends $.A{constructor(k,B){super(k,B)}create(){super.create(),this.sprite=j.q.instance.prodigy.create.image(0,0,"",""),this.gameObject.add(this.sprite),this.sprite.position.set(0,0),this.updateSource()}postLoad(k,B){B&&(this.updateSpriteSource(),this.onLoaded.dispatch())}setAnchor(k,B){this.sprite.anchor.set(k,B)}setScale(k,B){this.sprite.scale.set(k,B)}getScale(){return this.sprite.scale}getWorld(){return this.sprite.world}getWidth(){return this.sprite.width}getHeight(){return this.sprite.height}setAlpha(k){this.sprite.alpha=k}setPosition(k,B){this.sprite.position.set(k,B)}draggingStopped(){this.resetAfterDrag&&(this.gameObject.x+=this.sprite.x,this.gameObject.y+=this.sprite.y,this.sprite.x=0,this.sprite.y=0)}getEvents(){return this.sprite.events}setInputEnabled(k=!0){G.Aq$.isDefined(this.sprite)?(this.sprite.inputEnabled=!0,k?this.sprite.events.onDragStop.add(this.draggingStopped,this,-99):this.sprite.events.onDragStop.remove(this.draggingStopped,this)):this.onLoaded.addOnce(this.setInputEnabled,this,0,k)}enableDragging(k,B,U,F){this.sprite.inputEnabled&&(this.sprite.input.enableDrag(k,B),void 0!==U&&void 0!==F&&this.sprite.input.enableSnap(U,F))}disableDragging(){this.sprite.inputEnabled&&this.sprite.input.disableDrag()}getBounds(){const k=this.sprite.getBounds(),B=this.getWorld();return new G.M_G(B.x,B.y,k.width,k.height)}resetToOrigin(){this.sprite&&(this.sprite.x=0,this.sprite.y=0)}setAsset(k,B){"singleImage"===B.type&&(this.source=k,this.metadata=B,this.updateSource())}updateSource(){j.q.instance.game.cache.checkImageKey(this.source)?(this.updateSpriteSource(),this.onLoaded.dispatch()):j.q.instance.prodigy.load.assets([this.source],this.postLoad.bind(this))}updateSpriteSource(){var k;null===(k=this.sprite)||void 0===k||k.loadTexture(this.source),G.Aq$.isDefined(this.metadata.frame)&&(this.sprite.frame=this.metadata.frame)}getInputHandler(){return G.Aq$.isDefined(this.sprite)?this.sprite.input:null}setAngle(k){this.sprite.angle=k}hasAnimations(){return G.Aq$.isDefined(this.sprite.animations.frameData)}getAnimationLength(k){return this.sprite.animations.frameData?this.sprite.animations.frameData.total:0}playAnimation(k,B,U){this.sprite.animations.frame=U,this.sprite.animations.play(k,void 0,B)}destroy(){this.sprite&&(this.sprite.destroy(),this.sprite=null),super.destroy()}}var V=U(34829);class W extends H{constructor(k,B){super(k,B)}setAsset(k,B){if("spritesheet"===B.type){this.source=k,this.metadata=B,this.sprite.animations.stop();for(let k=0;k{"use strict";U.d(B,{A:()=>$});var F=U(62459),G=U(68910),j=U(86949);class $ extends j.u{constructor(k,B){super(),this.resetAfterDrag=!1,this.source=k,this.metadata=B,this.onLoaded=new F.HN0}create(){super.create()}setAnchor(k,B){}setScale(k,B){}getScale(){return new G.Point(1,1)}setAlpha(k){}setPosition(k,B){}getWorld(){return new G.Point}getWidth(){return 0}getHeight(){return 0}getEvents(){return null}setInputEnabled(k=!0){}enableDragging(k,B,U,F){}disableDragging(){}draggingStopped(){}getBounds(){return new F.M_G(0,0,0,0)}resetToOrigin(){}hasAnimations(){return!1}getAnimationLength(k){return 0}playAnimation(k,B,U){}setAsset(k,B){}getInputHandler(){return null}setAngle(k){}hasUniqueInstance(){return!0}destroy(){super.destroy()}}},59838:(k,B,U)=>{"use strict";U.d(B,{F:()=>q});var F=U(62459),G=U(95891),j=U(68910),$=U(35120),H=U(34829),V=U(88022),W=U(31427);class q extends W.A{constructor(k,B){super(k,B),this.spine=null,this.spineInputSlot=null,this.inputSprite=null,this.inputGroup=null,this._defaultScale=new j.Point(1,1),this._destroyed=!1;const U=this.metadata;this.anchor=new j.Point(0,0),this._game=$.q.instance.game,F.Aq$.isDefined(U.anchor)?this.spineAnchor=new j.Point(F.Aq$.isDefined(U.anchor.x)?U.anchor.x:.5,F.Aq$.isDefined(U.anchor.y)?U.anchor.y:0):this.spineAnchor=new j.Point(.5,0),this.spineInputSlot=null,this.inputSprite=null,this.dragOffset=new j.Point(0,0)}create(){super.create(),this.updateSource()}postLoad(k,B){B&&(this.updateSpineSource(),this.onLoaded.dispatch())}updateSource(){if(F.Aq$.isDefined(this.source)){const k=this._game.cache.checkJSONKey(this.source),B=this._game.cache.checkImageKey(`${this.source}.png`),U=this._game.cache.checkTextKey(`${this.source}Atlas`),F=this._game.cache.checkSpineKey(this.source);k&&B&&U||F?(this.updateSpineSource(),this.onLoaded.dispatch()):$.q.instance.prodigy.load.assets([this.source],this.postLoad.bind(this))}}updateSpineSource(){if(!this.spine&&this.gameObject&&this._game){this.spine=this._game.add.spine(0,0,this.source,this.gameObject),this.spine.setToSetupPose();const k=this.spine.skeleton.findSlot("input_hitbox");if(k){const B=this.spine.getSlotContainer(k);if(B){this.spineInputSlot=k,B.getChildAt(0).alpha=0;const U=k.getAttachment();this.dragOffset.set(.5*B.width-U.x-(k.bone?k.bone.x+k.bone.skeleton.getRootBone().x:0),.5*B.height+U.y+(k.bone?k.bone.y+k.bone.skeleton.getRootBone().y:0)),this.inputGroup=$.q.instance.prodigy.create.group(this.gameObject),this.inputGroup.position.set(this.spine.x-this.dragOffset.x,this.spine.y-this.dragOffset.y),this.inputSprite=this.inputGroup.addChild($.q.instance.prodigy.create.image(0,0,V._.General_core_json,"overlay-small")),this.inputSprite.alpha=0,this.inputSprite.width=B.width,this.inputSprite.height=B.height}}this.resetToOrigin()}}setAsset(k,B){var U;"spine"===B.type&&(this.source=k,this.metadata=B,null===(U=this.spine)||void 0===U||U.destroy(),this.spine=null,this.updateSource())}setAnchor(k,B){if(this.spine){const U=this.getAnchorOffset(),F=this.getSpineAnchorOffset();this.anchor.x=k,this.anchor.y=B,this.setPosition(this.spine.x+U.x-F.x,this.spine.y+U.y-F.y)}else this._destroyed||this.onLoaded.addOnce((()=>this.setAnchor(k,B)))}setScale(k,B){if(this.spine){const U=this.getAnchorOffset(),F=this.getSpineAnchorOffset();this.spine.scale.x=k,this.spine.scale.y=B,this.setPosition(this.spine.x+U.x-F.x,this.spine.y+U.y-F.y)}else this._destroyed||this.onLoaded.addOnce(this.setScale,this,0,k,B)}getScale(){return this.spine?this.spine.scale:this._defaultScale}setAlpha(k){if(this.spine){const B=this.spine.skeleton;for(let U=0;U{"use strict";var F;U.d(B,{T:()=>F}),function(k){k[k.Top=1]="Top",k[k.Middle=2]="Middle",k[k.Bottom=4]="Bottom",k[k.Left=8]="Left",k[k.Center=16]="Center",k[k.Right=32]="Right",k[k.TopLeft=9]="TopLeft",k[k.TopCenter=17]="TopCenter",k[k.TopRight=33]="TopRight",k[k.MiddleLeft=10]="MiddleLeft",k[k.MiddleCenter=18]="MiddleCenter",k[k.MiddleRight=34]="MiddleRight",k[k.BottomLeft=12]="BottomLeft",k[k.BottomCenter=20]="BottomCenter",k[k.BottomRight=36]="BottomRight"}(F||(F={}))},9976:(k,B,U)=>{"use strict";U.d(B,{E:()=>$});var F,G=U(62459),j=U(47332);!function(k){k[k.Normal=0]="Normal",k[k.Bold=1]="Bold",k[k.Italic=2]="Italic",k[k.BoldAndItalic=3]="BoldAndItalic"}(F||(F={}));class $ extends G.uAl{constructor(){super(...arguments),this.textSource=null,this.alignment=j.T.TopLeft,this.textObject=null}get TextObject(){return this.textObject}set Source(k){null!==this.textSource&&this.textSource.OnTextChanged.removeAll(this),this.textSource=k,this.textSource.OnTextChanged.add(this.updateText,this),this.updateText()}get Source(){return this.textSource}set Font(k){G.dBt[k]?this.textObject.font=G.dBt[k]:this.textObject.font=G.dBt.LuckiestGuy,this.updateAlignment()}get Font(){return this.textObject.font}set FontStyle(k){this.textObject.fontStyle=(k&F.Italic)===F.Italic?G.EQV.Italic:G.EQV.Normal,this.textObject.fontWeight=(k&F.Bold)===F.Bold?G.vLr.Bold:G.vLr.Normal,this.updateAlignment()}get FontStyle(){let k=F.Normal;return"italic"===this.textObject.fontStyle&&(k|=F.Italic),"bold"===this.textObject.fontWeight&&(k|=F.Bold),k}set FontSize(k){this.textObject.fontSize=k,this.updateAlignment()}get FontSize(){return this.textObject.fontSize}set LineSpacing(k){this.textObject.lineSpacing=k,this.updateAlignment()}get LineSpacing(){return this.textObject.lineSpacing}set Alignment(k){this.alignment=k,this.updateAlignment()}get Alignment(){return this.alignment}set FillColor(k){this.isValidColor(k)?this.textObject.fill=k:G.VyI.log(`Fill color was provided was not a valid color ${k}.`,G.$bb.Warning)}get FillColor(){return this.textObject.fill}set BlendMode(k){this.textObject.TextObject.blendMode=k}get BlendMode(){return this.textObject.TextObject.blendMode}set StrokeColor(k){this.isValidColor(k)?this.textObject.stroke=k:G.VyI.log(`Stroke color was provided was not a valid color ${k}.`,G.$bb.Warning)}get StrokeColor(){return this.textObject.stroke}set StrokeThickness(k){this.textObject.strokeThickness=k,this.updateAlignment()}get StrokeThickness(){return this.textObject.strokeThickness}set ShadowAlpha(k){this.textObject.dropShadowAlpha=k,this.updateAlignment()}get ShadowAlpha(){return this.textObject.dropShadowAlpha}set ShadowAngle(k){this.textObject.dropShadowAngle=k,this.updateAlignment()}get ShadowAngle(){return this.textObject.dropShadowAngle}set ShadowColor(k){this.isValidColor(k)?this.textObject.dropShadowColor=k:G.VyI.log(`Shadow color was provided was not a valid color ${k}.`,G.$bb.Warning)}get ShadowColor(){return this.textObject.dropShadowColor}set ShadowBlur(k){this.textObject.dropShadowBlur=k}get ShadowBlur(){return this.textObject.dropShadowBlur}set ShadowDistance(k){this.textObject.dropShadowDistance=k,this.updateAlignment()}get ShadowDistance(){return this.textObject.dropShadowDistance}set TextConfig(k){G.Aq$.isDefined(k.font)&&(this.Font=k.font),G.Aq$.isDefined(k.fontSize)&&(this.FontSize=k.fontSize),G.Aq$.isDefined(k.fontWeight)&&("bold"===k.fontWeight?this.FontStyle=F.Bold:this.FontStyle=F.Normal),G.Aq$.isDefined(k.fill)&&(this.FillColor=k.fill),G.Aq$.isDefined(k.blendMode)&&(this.BlendMode=k.blendMode),G.Aq$.isDefined(k.stroke)&&(this.StrokeColor=k.stroke),G.Aq$.isDefined(k.strokeThickness)&&(this.StrokeThickness=k.strokeThickness),G.Aq$.isDefined(k.shadowAlpha)&&(this.ShadowAlpha=k.shadowAlpha),G.Aq$.isDefined(k.shadowAngle)&&(this.ShadowAngle=k.shadowAngle),G.Aq$.isDefined(k.shadowDistance)&&(this.ShadowDistance=k.shadowDistance),G.Aq$.isDefined(k.shadowColor)&&(this.ShadowColor=k.shadowColor),G.Aq$.isDefined(k.shadowBlur)&&(this.ShadowBlur=k.shadowBlur)}get TextWidth(){return this.textObject.TextObject.width}get TextHeight(){return this.textObject.TextObject.height}create(){super.create(),this.textObject=new G.EYj,this.textObject.GameObject=this.GameObject,this.textObject.create();const k=this.textObject.TextObject;k.visible=this.Active,this.GameObject.legacyTransform.group.addChild(k),this.OnActiveChanged.add((()=>k.visible=this.Active))}destroy(){this.textSource&&this.textSource.OnTextChanged.removeAll(this),this.textSource=null,this.textObject.destroy(),this.textObject=null,this.OnActiveChanged.dispose(),super.destroy()}setText(k){this.Source instanceof G.uFU&&this.Source.getText()===k||(this.Source=new G.uFU(k))}updateText(){null===this.textObject?G.VyI.log("Trying to update the text on a Text component before the text object was created.",G.$bb.Warning):(this.textObject.text=this.Source.getText(),this.updateAlignment())}updateAlignment(){const k=this.Alignment,B=this.textObject.TextObject;(k&j.T.Center)===j.T.Center?(B.x=-Math.round(.5*B.width),this.textObject.align=G.If$.Center):(k&j.T.Right)===j.T.Right?(B.x=-B.width,this.textObject.align=G.If$.Right):(B.position.x=0,this.textObject.align=G.If$.Left),(k&j.T.Middle)===j.T.Middle?B.position.y=-Math.round(.5*B.height):(k&j.T.Bottom)===j.T.Bottom?B.position.y=-B.height:B.position.y=0}isValidColor(k){return!!/^#[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8}$/.test(k)}}},75017:(k,B,U)=>{"use strict";U.d(B,{p:()=>F});class F{}F.BUY_ITEM_FLAVOUR_TEXT="PLAY_AT_HOME_BUY_ITEM",F.DEFAULT={frameName:"icons/iconbox-TEST",trackingEvent:"Feature-MemberChests"},F.MEMBER_HUD={frameName:"icons/iconbox-TEST",trackingEvent:"Feature-MemberChests",flavourText:"PLAY_AT_HOME_MEMBER_HUD"},F.NOT_MEMBER_HUD={frameName:"icons/iconbox-TEST",trackingEvent:"Feature-MemberChests",flavourText:"PLAY_AT_HOME_NOT_MEMBER_HUD"},F.TWILIGHT_WHEEL={frameName:"icons/iconbox-TEST",trackingEvent:"Feature-MemberChests",flavourText:"PLAY_AT_HOME_TWILIGHT_WHEEL"},F.MEMBER_BOUNTY={frameName:"icons/iconbox-TEST",trackingEvent:"Feature-MemberChests",flavourText:"PLAY_AT_HOME_MEMBER_BOUNTY"},F.MEMBER_CHESTS={frameName:"icons/member-chests",trackingEvent:"Feature-MemberChests",flavourText:"PLAY_AT_HOME_MEMBER_CHESTS"},F.BUDDIES={frameName:"icons/cute-and-cool-buddies",trackingEvent:"Feature-Buddies",flavourText:F.BUY_ITEM_FLAVOUR_TEXT},F.HOUSE_ITEMS={frameName:"icons/special-house-furniture",trackingEvent:"Feature-HouseItems",flavourText:F.BUY_ITEM_FLAVOUR_TEXT},F.NEW_HOUSE={frameName:"icons/new-house",trackingEvent:"Feature-NewHouse",flavourText:F.BUY_ITEM_FLAVOUR_TEXT},F.MORE_GOLD={frameName:"icons/more-gold",trackingEvent:"Feature-MoreGold",flavourText:"PLAY_AT_HOME_MORE_GOLD"},F.MORE_EXP={frameName:"icons/level-faster",trackingEvent:"Feature-LevelFaster",flavourText:"PLAY_AT_HOME_MORE_EXP"},F.MORE_EXP_CLASS_LEADERS={frameName:"icons/level-faster",trackingEvent:"Feature-LevelFaster",flavourText:"PLAY_AT_HOME_MORE_EXP_CLASS_LEADERS"},F.WHEEL_SPIN={frameName:"icons/more-spins",trackingEvent:"Feature-MoreSpins",flavourText:"PLAY_AT_HOME_WHEEL_SPIN"},F.MEMBER_PETS={frameName:"icons/catch-more-pets",trackingEvent:"Feature-MorePets",flavourText:"PLAY_AT_HOME_MEMBER_PETS"},F.CATCH={frameName:"icons/second-catch",trackingEvent:"Feature-SecondCatchChance"},F.BOOSTS={frameName:"icons/minigame-boosts",trackingEvent:"Feature-MinigameBoosts"},F.STYLE={frameName:"icons/cool-new-styles",trackingEvent:"Feature-NewStyles",flavourText:F.BUY_ITEM_FLAVOUR_TEXT},F.TOWER={frameName:"icons/climb-the-dark-tower",trackingEvent:"Feature-DarkTower",flavourText:"PLAY_AT_HOME_TOWER"},F.POTIONS={frameName:"icons/potions",trackingEvent:"Feature-PowerfulPotions",flavourText:F.BUY_ITEM_FLAVOUR_TEXT},F.DANCE={frameName:"icons/dab-dance",trackingEvent:"Feature-Dab",flavourText:"PLAY_AT_HOME_DANCE"},F.CLOUD_MOUNT={frameName:"icons/cloud-mount",trackingEvent:"Feature-CloudMount"},F.MORPH_MARBLE={frameName:"icons/morph-marble",trackingEvent:"Feature-MorphMarble",flavourText:F.BUY_ITEM_FLAVOUR_TEXT},F.BUY_ITEM={frameName:"icons/iconbox-TEST",trackingEvent:"PremiumItems",flavourText:F.BUY_ITEM_FLAVOUR_TEXT},F.PREMIUM_ITEM={frameName:"icons/iconbox-TEST",trackingEvent:"PremiumItems",flavourText:"PLAY_AT_HOME_PREMIUM_ITEM"},F.VISIT_HOUSE={frameName:"icons/friends-visit-house",trackingEvent:"Feature-VisitHouse"},F.BIGGER_ROSTER={frameName:"icons/iconbox-TEST",trackingEvent:"BiggerRoster"},F.NICKNAME={frameName:"icons/iconbox-TEST",trackingEvent:"Nickname",flavourText:"PLAY_AT_HOME_NICKNAME"},F.EVOLVE_PETS={frameName:"icons/evolve-pets",trackingEvent:"Nickname",flavourText:"PLAY_AT_HOME_EVOLVE_PETS"}},37193:(k,B,U)=>{"use strict";U.d(B,{i:()=>j});var F=U(88022),G=U(66582);class j{}j.PLAYER_MEMBERSHIP_ICON_IMAGES={[G._$.NonMember]:void 0,[G._$.MemberLevelUp]:void 0,[G._$.MemberUltimateMath]:void 0,[G._$.MemberUltimateBundle]:void 0,[G._$.MemberCore]:{atlas:F._.Ui_member_tiers_json,frame:"core-membership-icon-name-small"},[G._$.MemberPlus]:{atlas:F._.Ui_member_tiers_json,frame:"plus-membership-icon-name-small"},[G._$.MemberUltra]:{atlas:F._.Ui_member_tiers_json,frame:"ultra-membership-icon-name-small"}}},77981:(k,B,U)=>{"use strict";var F;U.d(B,{r:()=>F}),function(k){k.Math="MATH",k.English="ENGLISH",k.UltimateBundle="MATH_ENGLISH_BUNDLE"}(F||(F={}))},89305:(k,B,U)=>{"use strict";U.d(B,{Sz:()=>W,g1:()=>V,jK:()=>z,nO:()=>K,nQ:()=>q,ty:()=>Y});var F=U(8674),G=U(62459),j=U(66582),$=U(35120),H=U(66207);function V(k){return H.D.isFeatureEnabled()&&k>0?`MEMBERSHIP_TIER_${k}_SHORT_NAME_STRATIFICATION`:`MEMBERSHIP_TIER_${k}_SHORT_NAME`}function W(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){if(k.player.hasMembershipUpgradeOptions()){B.purchase.sendFunnelHandoff("Membership-Upgrade-IFrame",{purchaseOrder:q(U)});const F=$.q.instance.prodigy.gameContainer.get("be9-3278"),G=yield k.getActiveMembershipId(),j=H.D.isFeatureEnabled()?`?group=science_variant_${H.D.getVariantForUpgrading()}`:"",V=$.q.instance.prodigy.gameContainer.get("b94-d1b1");yield V.createIFrame(F.getMembershipUpgradeUrl(G).concat(j),"upgrade-iframe-closed")}else Y()}))}function q(k){if(H.D.isFeatureEnabled())switch(k){case"tier_1":return j.rH[j._$.MemberCore];case"tier_2":return j.rH[j._$.MemberPlus];case"tier_3":return j.rH[j._$.MemberUltra];default:return""}else switch(k){case"tier_1":return j.rH[j._$.MemberLevelUp];case"tier_2":case"tier_3":return j.rH[j._$.MemberUltimateMath];default:return""}}function K(k){return $.q.instance.prodigy.gameContainer.get("e20-0fb0").activeMemberships.map((k=>{var B;return null!==(B=k.categories)&&void 0!==B?B:[]})).some((B=>B.includes(k)))}function z(k){switch(k){case j._$.MemberCore:case j._$.MemberLevelUp:return"tier_1";case j._$.MemberPlus:case j._$.MemberUltimateMath:return"tier_2";case j._$.MemberUltra:case j._$.MemberUltimateBundle:default:return"tier_3"}}function Y(){const k=$.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("MEMBERSHIP_UPGRADES_UNAVAILABLE");$.q.instance.prodigy.open.messageBoxOkay(k)}},91462:(k,B,U)=>{"use strict";U.d(B,{M:()=>Rt});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(62886),V=U(35120),W=(U(34829),U(1195)),q=U(48235),K=U(44367);class z extends K.z{static applyCheckoutStyling(k){document.getElementsByTagName("body")[0].className=k?z.CHECKOUT_STYLE_CLASS_NAME:null}}z._featureName="game-overlay-checkout",z.CHECKOUT_STYLE_CLASS_NAME="game-overlay-checkout-experiment";var Y=U(73797),Q=U(28152),X=U(15485),Z=U(46784),J=U(65050),tt=U(41674),et=U(67665),it=U(95525);const st=(0,U(77601).gb)({key:"combined-otp",activateAssociatedExperiments:1,default:{enabled:!1},evaluate:({enabled:k},B)=>({enabled:k&&!B.isMember})});var nt,at,rt,ot=U(223);!function(k){k.Selection="selection",k.Combined="combined"}(nt||(nt={})),function(k){k[k.DailySpendCap=0]="DailySpendCap",k[k.MonthlySpendCap=1]="MonthlySpendCap",k[k.Forbidden=2]="Forbidden",k[k.Cooldown=3]="Cooldown"}(at||(at={})),function(k){k.OtpMobilePurchaseSuccessful="otpPurchaseSuccessful",k.OtpMobilePurchaseFailed="otpPurchaseFailed",k.OtpMobileNoPurchaseOptions="otpNoPurchaseOptions",k.OtpMobilePurchasePending="otpPurchasePending"}(rt||(rt={}));const ht=["membership-flow-closed","upgrade-iframe-closed","membership-iframe-closed"];var ct=U(66582),dt=U(13956),lt=U(49126),ut=U(76277),ft=U(5018),bt=U(67510),pt=U(2272),vt=U(75329),gt=U(99183),mt=U(94236),yt=U(53661),_t=U(98252),Et=U(30226),wt=U(88061),Tt=U(10312),St=U(21314),At=U(20352),Ct=U(60654),Ot=U(77981),It=U(89305);class Dt{static open(k,B,U,F,G,j,$,H,V,W,q,K,z,Y){return prodigyWeb.membershipFlow.open(k,B,U,F,G,j,$,H,V,W,q,K,z,Y)}static openUrl(k,B,U,F,G=!1,j=null,$=null){return prodigyWeb.membershipFlow.openUrl(k,B,U,F,G,j,$)}static getMembershipFlowUrl(k,B,U,G,j,$,H,V,W,q){return(0,F.sH)(this,void 0,void 0,(function*(){return prodigyWeb.membershipFlow.getMembershipFlowUrl(k,B,U,G,j,$,H,V,W,q)}))}static getMembershipDirectPurchaseFlowUrl(k,B,U,G,j,$,H,V,W,q,K,z){return(0,F.sH)(this,void 0,void 0,(function*(){return prodigyWeb.membershipFlow.getMembershipDirectPurchaseFlowUrl(k,B,U,G,j,$,H,V,W,q,K,z)}))}static getAuthenticatedUrl(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return prodigyWeb.membershipFlow.getAuthenticatedUrl(k,B)}))}static getCombinedOtpPurchaseFlowUrl(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=encodeURIComponent(JSON.stringify({priceOptions:B}));return prodigyWeb.membershipFlow.getCombinedOtpPurchaseFlowUrl(k,U)}))}}let Rt=class extends G.uAl{constructor(){super(...arguments),this.OTP_SPEND_CAP_CUSTOM_EVENT_NAME="Spend Cap",this.OTP_SPEND_CAP_EVENT_NAME="spend_cap",this.MEMBERSHIP_UPDATE_RETRY_COUNT=4,this.OTP_UNAVAILABLE_PARAMETERS={[at.Forbidden]:{messageTitleKey:"ERROR",messageBodyKey:"NETWORK_FORBIDDEN",interfaceName:"otp_spend_cap_blacklist"},[at.MonthlySpendCap]:{messageTitleKey:"OTP_MONTHLY_CAP_HIT_TITLE",messageBodyKey:"OTP_MONTHLY_CAP_HIT_BODY",interfaceName:"otp_spend_cap_monthly"},[at.DailySpendCap]:{messageTitleKey:"OTP_DAILY_CAP_HIT_TITLE",messageBodyKey:"OTP_DAILY_CAP_HIT_BODY",interfaceName:"otp_spend_cap_daily"},[at.Cooldown]:{messageTitleKey:"MESSAGE_TITLE_OOPS",messageBodyKey:"OTP_COOLDOWN_BODY",interfaceName:"otp_spend_cap_cooldown"}},this.onQrUrlRetrieved=new G.HN0,this.onComplete=new G.HN0,this.onMembershipFlowSuccess=new G.HN0,this.onMembershipStatusUpdateStarted=new G.HN0,this._respectSchoolMode=!0,this._listenOnPurchaseFlowOnly=!1,this._otpFunnelPurchaseOrder="OTP-GenericMC",this._retryTimeoutMs=5e3,this._analyticEvents={},this._upgrade=!1,this._handoffPurchaseOrder="",this._failureProcessing=!1,this._purchaseProcessing=!1}postCreate(){var k,B,U;super.postCreate(),this._memberAd={frameName:this.getInjectedValue(yt.Eh.MembershipPurchaseMemberPanelAdFrameName),trackingEvent:this.getInjectedValue(yt.Eh.MembershipPurchaseMemberPanelAdTrackingEvent),flavourText:this.getInjectedValue(yt.Eh.MembershipPurchaseMemberPanelAdFlavourText)},this._analyticEvents={conversionFunnelName:this.getInjectedValue(yt.Eh.MembershipPurchaseConversionFunnelName),conversionFunnelMetadata:this.getInjectedValue(yt.Eh.MembershipPurchaseConversionFunnelMetadata),conversionStage:this.getInjectedValue(yt.Eh.MembershipPurchaseConversionFunnelStage),conversionStaticOrVideo:this.getInjectedValue(yt.Eh.MembershipPurchaseConversionFunnelStaticOrVideo)},this._upgrade=this.getInjectedValue(yt.Eh.MembershipPurchaseUpgrade),this._listenOnPurchaseFlowOnly||this.setupPurchaseListener(),this.requestMembershipFlowUrl("qrCode").then((k=>this.onQrUrlRetrieved.dispatch(k)),(k=>{this.onQrUrlRetrieved.getBindingsCount()>0&&G.RQr.logError(k,"Failed to retrieve Membership Landing Page URL for QR Code")})),this._generateOtpUrlPromise=this.generateOtpUrl(),this.shouldUseMobileOTP()&&(null===(U=null===(B=null===(k=window.SW)||void 0===k?void 0:k.OTP)||void 0===B?void 0:B.initOneTimePurchases)||void 0===U||U.call(B,this.handleMobileOtpCallback.bind(this)).catch(G.RQr.createHandler("Failed to initialize native app OTP purchases")))}shouldUseMobileOTP(){return(_t.pF.isNativeAndroidApp()||_t.pF.isNativeIOSApp())&&_t.pF.eligibleVersionForMobileOtpPurchase()}setupPurchaseListener(){V.q.instance.game.broadcaster.addAppListener(Y.bS.POST_MESSAGE_RECEIVED,((k,B)=>{try{const k="string"==typeof B?JSON.parse(B):B;if(this._failureProcessing&&("fail"===k.success||!1===k.success))return;ht.includes(k.name)&&!this._purchaseProcessing&&(this._purchaseProcessing=!0,G.Aq$.isDefined(k.transactionId)?this.processOtpMessage(k):this.processMembershipMessage(k))}catch(U){G.RQr.logError(U,"Error receiving purchase post message"),this.completeFlow()}}),this,V.q.instance.game)}completeFlow(){this._purchaseProcessing=!1,this._failureProcessing=!1,this._listenOnPurchaseFlowOnly&&this.clearPostMembershipListener(),this.onComplete.dispatch()}clearPostMembershipListener(){V.q.instance.game.broadcaster.removeAppListener(Y.bS.POST_MESSAGE_RECEIVED,this,V.q.instance.game)}processMembershipMessage(k){"upgrade-iframe-closed"===k.name&&(this._upgrade=!0),this.finishUpgrade(k.success).catch(G.RQr.createHandler("ProcessWebPurchaseComponent: Error finishing upgrade"))}initiateMembershipPurchase(k,B,U){var F,j,$,H,W,q,K;const Y=V.q.instance.prodigy.gameContainer,Q=this._currentPlayer.player,X=null!=B?B:"tier_1";if(this._respectSchoolMode&&Q.isPlayingAtSchool())return V.q.instance.prodigy.open.membershipSchoolAd(),void this.completeFlow();if(_t.pF.isNativeAmazonApp()||(_t.pF.isNativeAndroidApp()||_t.pF.isNativeIOSApp())&&!_t.pF.eligibleVersionForMobileMembershipPurchase())return V.q.instance.prodigy.open.message(this._localizer.getText("MEMBER_AD_VISIT_SITE_BODY")),this.sendFunnelHandoffEvent("Visit-Site-Dialog",X),void this.completeFlow();this._listenOnPurchaseFlowOnly&&this.setupPurchaseListener();try{this._gameNetworkManager.stopInactiveTimer();const B=Y.get("00d-b27e").authHandler.getIdentityToken(),V=null!==(F=Q.username)&&void 0!==F?F:Q.getName(),q=!Q.isPlayingAtSchool();if(z.isFeatureEnabled()&&(z.applyCheckoutStyling(!0),Et.J.applyBlurToScreen(!0)),G.Aq$.isDefined(this._analyticEvents)){let F=0;G.Aq$.isDefined(null===(j=this._memberAd)||void 0===j?void 0:j.adID)&&(F=this._memberAd.adID);const K=(0,ut.G)(it.w).variant;if((null==k?void 0:k.useDirectPurchaseFlow)||z.isFeatureEnabled())Dt.getMembershipDirectPurchaseFlowUrl(null!==($=null==k?void 0:k.billingInterval)&&void 0!==$?$:12,null!==(H=null==k?void 0:k.category)&&void 0!==H?H:Ot.r.Math,null!==(W=null==k?void 0:k.tier)&&void 0!==W?W:2,F,this._analyticEvents.conversionFunnelName,this._segment.purchase.getFunnelID(),q,this._analyticEvents.conversionFunnelMetadata,"ctaButton",this._analyticEvents.conversionStaticOrVideo,B,K.toString()).then((k=>{const B=Dt.openUrl(V,Q.userID,void 0,k,!1,(0,It.nQ)(X),U);this.sendFunnelHandoffEvent(B,X)})).catch(G.RQr.createHandler("Could not get membership URL"));else{const k=Dt.open(V,Q.userID,void 0,F,this._analyticEvents.conversionFunnelName,q,this._analyticEvents.conversionFunnelMetadata,Y.get("f7c-2e57").getSessionToken(),this._analyticEvents.conversionStaticOrVideo,this._upgrade,B,K.toString(),(0,It.nQ)(X),U);this.sendFunnelHandoffEvent(k,X)}}}catch(e){G.VyI.log(e,G.$bb.Error),V.q.instance.prodigy.open.message(this._localizer.getText("MEMBER_AD_ERROR_BODY")),this._segment.purchase.sendFunnelError("Purchase-Handoff","Handoff-Exception",e?null!==(q=e.message)&&void 0!==q?q:null===(K=e.toString)||void 0===K?void 0:K.call(e):e)}}initiateMembershipPurchaseUpgradeWithIFrame(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._webFrameManager.canOpenIframe())return;const B=this._currentPlayer.player;if(this._respectSchoolMode&&B.isPlayingAtSchool())return V.q.instance.prodigy.open.membershipSchoolAd(),void this.completeFlow();const U=this.getMembershipUpgradeInterval(this._currentPlayer),F=V.q.instance.prodigy.gameContainer.get("80c-6fa4").getOverrideForMinVersionForMobileMembershipTierPurchases();if(B.hasMembership())if(_t.pF.eligibleVersionForMobileMembershipPurchaseForMultipleTiers(F))0===this._currentPlayer.getMembershipUpsell().upgradeOptions.length?(0,It.ty)():(this._listenOnPurchaseFlowOnly&&this.setupPurchaseListener(),this.initiateMembershipPurchase(void 0,k,U));else{if(_t.pF.isNativeAmazonApp()||_t.pF.isNativeAndroidApp()||_t.pF.isNativeIOSApp())return V.q.instance.prodigy.open.message(this._localizer.getText("MEMBER_AD_VISIT_SITE_BODY")),this.sendFunnelHandoffEvent("Visit-Site-Dialog",k),void this.completeFlow();this._listenOnPurchaseFlowOnly&&this.setupPurchaseListener(),yield(0,It.Sz)(this._currentPlayer,this._segment,k)}else this._listenOnPurchaseFlowOnly&&this.setupPurchaseListener(),this.initiateMembershipPurchase(void 0,k,U)}))}getMembershipUpgradeInterval(k){var B;return null!==(B=k.getMembershipUpsell().interval)&&void 0!==B?B:null}finishUpgrade(){return(0,F.sH)(this,arguments,void 0,(function*(k=!1){let B;if(this._gameNetworkManager.startInactiveTimer(),z.isFeatureEnabled()&&(z.applyCheckoutStyling(!1),Et.J.applyBlurToScreen(!1)),B="boolean"==typeof k?k?"success":"fail":k,"success"!==B)yield this.processMembershipResult(B);else try{yield this.updateMembershipStatus(this.MEMBERSHIP_UPDATE_RETRY_COUNT),this._currentPlayer.player.hasMembership()?yield this.processMembershipResult(B):yield this.processMembershipResult("pending")}catch(e){G.VyI.log(`Membership purchase pending due to the following: ${e}`,G.$bb.Warning),yield this.processMembershipResult("pending")}}))}processMembershipResult(k){return(0,F.sH)(this,void 0,void 0,(function*(){switch(V.q.instance.prodigy.game.broadcaster.broadcast(Y.H3.MembershipResponseReceived,void 0,[k]),k){case"success":{let k=$().noop;this._currentPlayer.player.unlockMemberItems(),yield this._currentPlayer.fetchMembershipUpsell(),V.q.instance.prodigy.gameContainer.get("8dc-04eb").sendQuestEvent(H.T.NONE,{}).catch(G.RQr.createHandler("Error sending NONE quest event after membership purchase."));const B=V.q.instance.prodigy.open.getTopmostConversionPrefabIndex();k=B>-1?()=>{V.q.instance.prodigy.open.menuCloseAllUntil(B)}:V.q.instance.prodigy.open.menus[1]instanceof mt.K?()=>{V.q.instance.prodigy.open.menuCloseAllUntil(1)}:V.q.instance.prodigy.open.menus[0]instanceof gt.k||V.q.instance.prodigy.open.menus[0]instanceof bt.v||V.q.instance.prodigy.open.menus[0]instanceof Ct.i?()=>{V.q.instance.prodigy.open.menuCloseAllUntil(0)}:()=>{V.q.instance.prodigy.open.menuCloseAll()};{const B=k;k=()=>{B(),this.completeFlow()}}const U=this._currentPlayer.player.hasUnclaimedMembershipRewards();if(U){const B=k;k=()=>{this._currentPlayer.player.rewardMembershipPrizes(B).catch(G.RQr.createHandler("Error rewarding membership prizes."))}}V.q.instance.prodigy.open.membershipSuccess("paid",(()=>{k(),this.onMembershipFlowSuccess.dispatch(),U||V.q.instance.prodigy.game.broadcaster.broadcast(Y.H3.MembershipRewardsFlowComplete)}),{origin_type:tt.$N.MembershipUpgrade,origin_id:this._segment.segmentDataCache[et.r.MembershipBundleModalInstanceId],instance_type:J.N.KidsMlpUpgradeComplete});const F=this._currentPlayer.player.getMemberTier();this._segment.purchase.sendFunnelComplete({purchaseOrder:ct.rH[F],triggerTier:(0,It.jK)(F)})}break;case"pending":V.q.instance.prodigy.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_PENDING_BODY"),this.completeFlow.bind(this)),this._segment.purchase.sendFunnelStep("Purchase-Pending");break;case"deferred":V.q.instance.prodigy.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_DEFERRED_BODY"),this.completeFlow.bind(this)),this._segment.purchase.sendFunnelStep("Purchase-Pending-Parent-Approval");break;case"fail":default:this._failureProcessing=!0,(_t.pF.isNativeAndroidApp()||_t.pF.isNativeIOSApp())&&_t.pF.eligibleVersionForMobileMembershipPurchase()?(this._segment.featureCommon.sendButtonEvent({buttonName:X.k.MembershipUpgradeOkay,interfaceType:tt.Wm.Popup,interfaceName:Z.B.KidsMlpUpgradeFail}),this.completeFlow()):V.q.instance.prodigy.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_FAILED_BODY"),(()=>{this._segment.featureCommon.sendButtonEvent({buttonName:X.k.MembershipUpgradeOkay,interfaceType:tt.Wm.Popup,interfaceName:Z.B.KidsMlpUpgradeFail}),this.completeFlow()})),this._segment.featureCommon.sendInterfaceEvent({interfaceName:Z.B.KidsMlpUpgradeFail,interfaceType:tt.Wm.Popup,originID:this._segment.segmentDataCache[et.r.MembershipBundleModalInstanceId],originType:this._upgrade?tt.$N.MembershipUpgrade:tt.$N.MembershipPurchase,instanceType:J.N.KidsMlpUpgradeFail}),this._segment.purchase.sendFunnelError("Purchase-Handoff","Payment-Failed","Payment-Failed")}}))}updateMembershipStatus(){return(0,F.sH)(this,arguments,void 0,(function*(k=3){this.onMembershipStatusUpdateStarted.dispatch();const B=V.q.instance.prodigy.gameContainer.get("3a0-8003"),U=V.q.instance.prodigy.gameContainer.get("639-22b8");V.q.instance.prodigy.loading(!0,!0);let F=!1;try{const G=yield B.refreshMembership();if(G){if(!G.active&&k>0)return yield this.retryUpdateMembershipStatus(k-1);F=G.active,yield ft.G.loadFeatures(),yield U.updateDecayImmunity(),yield this._currentPlayer.player.updateChargedLevelsData(),yield q.W.checkMemberUpgradeReward()}}catch(j){G.RQr.logError(j,"MembershipParent.updateMembershipStatus - failed on refreshMembership")}return V.q.instance.prodigy.loading(!1),F}))}retryUpdateMembershipStatus(k){return(0,F.sH)(this,void 0,void 0,(function*(){return yield G.Egh.timeout(this._retryTimeoutMs),this.updateMembershipStatus(k)}))}requestMembershipFlowUrl(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B;const U=V.q.instance.prodigy.gameContainer;return Dt.getMembershipFlowUrl(G.Aq$.isDefined(null===(B=this._memberAd)||void 0===B?void 0:B.adID)?this._memberAd.adID:0,this._analyticEvents.conversionFunnelName,!U.get("e20-0fb0").player.isPlayingAtSchool(),this._analyticEvents.conversionFunnelMetadata,this._analyticEvents.conversionStaticOrVideo,this._upgrade,U.get("00d-b27e").authHandler.getIdentityToken(),k,this._segment.purchase.getFunnelID(),(0,ut.G)(it.w).variant.toString())}))}sendFunnelHandoffEvent(k,B){this._handoffPurchaseOrder=(0,It.nQ)(B),this._segment.purchase.sendFunnelHandoff(k,{triggerTier:B,purchaseOrder:this._handoffPurchaseOrder})}generateOtpUrl(){return(0,F.sH)(this,void 0,void 0,(function*(){const{storeName:k}=(0,ut.G)(ot.l);if(G.Aq$.isDefined(k)){if(this._cachedFetchOptionResult=yield this._otpNetworkHandler.fetchOptions(k),(0,ut.G)(st).enabled){const k=V.q.instance.prodigy.gameContainer.get("00d-b27e").authHandler.getIdentityToken();return Dt.getCombinedOtpPurchaseFlowUrl(k,this._cachedFetchOptionResult.options)}return this._urlProvider.getOtpUrl(this._cachedFetchOptionResult.options)}}))}initiateOtp(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!(0,ut.G)(ot.l).enabled||!this._webFrameManager.canOpenIframe())return;const k=V.q.instance.prodigy,B=this._currentPlayer.player;if(B.isPlayingAtSchool())k.open.membershipSchoolAd(),this.completeFlow();else if(_t.pF.isNativeAndroidApp()||_t.pF.isNativeIOSApp())_t.pF.eligibleVersionForMobileOtpPurchase()?0===this._cachedFetchOptionResult.options.length?(this.showOtpUnavailablePopup(this._cachedFetchOptionResult.spendCapHit),this.completeFlow()):yield this.initOtpForNativeApp(this._cachedFetchOptionResult.options):(k.open.message(this._localizer.getText("MEMBER_AD_VISIT_SITE_BODY")),this.completeFlow());else if(_t.pF.isNativeAmazonApp())k.open.message(this._localizer.getText("MEMBER_AD_VISIT_SITE_BODY")),this.completeFlow();else{const U=yield this._generateOtpUrlPromise.then((k=>G.Aq$.isDefined(k)?k:(G.VyI.log("Error generating otp url: Invalid store name",G.$bb.Error),""))),F=(0,ut.G)(st).enabled;F||0!==this._cachedFetchOptionResult.options.length?U&&U.length>0?(this._gameNetworkManager.stopInactiveTimer(),this._listenOnPurchaseFlowOnly&&this.setupPurchaseListener(),F?Dt.openUrl(B.getName(),B.userID,void 0,U,!0):yield this._webFrameManager.createIFrame(U,"membership-iframe-closed"),this._segment.purchase.sendFunnelHandoff(void 0,{purchaseOrder:this._otpFunnelPurchaseOrder})):(k.open.message(this._localizer.getText("FEATURE_DISABLED")),this._segment.purchase.sendFunnelError("Purchase-Handoff","Handoff-Exception","No OTP store available"),this.completeFlow()):(this.showOtpUnavailablePopup(this._cachedFetchOptionResult.spendCapHit),this.completeFlow())}}))}showOtpUnavailablePopup(k){var B,U;const F=V.q.instance.prodigy,G=F.gameContainer.get("c47-20b6"),j=this.OTP_UNAVAILABLE_PARAMETERS[k],$=(0,ut.G)(ot.l);let H=null;k===at.MonthlySpendCap?H=null!==(B=$.spendCap.monthlyLimit)&&void 0!==B?B:null:k===at.DailySpendCap&&(H=null!==(U=$.spendCap.dailyLimit)&&void 0!==U?U:null),G.featureCommon.sendInterfaceEvent({interfaceName:j.interfaceName,interfaceType:tt.Wm.Window}),G.sendCustomEvent(this.OTP_SPEND_CAP_CUSTOM_EVENT_NAME,{event:this.OTP_SPEND_CAP_EVENT_NAME,funnel_id:G.purchase.getFunnelID(),cap_type:j.interfaceName,cap_amount:H,currency_id:27}),F.open.informationDialog(new vt.Z(this._localizer.getText("BUTTON_OKAY_CAPITAL"),void 0,pt.E.Small,void 0,this._localizer.getText(j.messageTitleKey),this._localizer.getText(j.messageBodyKey)))}finishOtp(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(!(0,ut.G)(ot.l).enabled)return;this._gameNetworkManager.startInactiveTimer();const B=V.q.instance.prodigy;switch(k.success){case"success":this._otpService.updatePurchaseHistory(k),this._otpService.queueUncollectedTransactions({transactionID:k.transactionId,quantity:k.quantity,analyticsTransactionID:this._segment.purchase.getFunnelID()});try{yield this._otpService.acknowledgeUncollectedTransactions(),this.completeFlow(),V.q.instance.game.broadcaster.broadcast(Y.Lk.HardCurrencyPurchased)}catch(U){throw this._segment.purchase.sendFunnelError("Purchase-Handoff","Handoff-Exception",U),U}break;case"pending":B.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_PENDING_BODY"),this.completeFlow.bind(this)),this._segment.purchase.sendFunnelStep("Purchase-Pending");break;case"deferred":B.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_DEFERRED_BODY"),this.completeFlow.bind(this)),this._segment.purchase.sendFunnelStep("Purchase-Pending-Parent-Approval");break;case"noPurchaseOptions":case"fail":this._failureProcessing=!0,(_t.pF.isNativeAndroidApp()||_t.pF.isNativeIOSApp())&&_t.pF.eligibleVersionForMobileOtpPurchase()?this.completeFlow():B.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_FAILED_BODY"),this.completeFlow.bind(this)),this._segment.purchase.sendFunnelQuit("Purchase-Handoff","Close-Clicked");break;default:this._failureProcessing=!0,B.open.message(this._localizer.getText("MEMBER_AD_PURCHASE_FAILED_BODY"),this.completeFlow.bind(this)),this._segment.purchase.sendFunnelQuit("Purchase-Handoff","Close-Clicked")}}))}processOtpMessage(k){this.finishOtp(k).catch(G.RQr.createHandler("Failed to finish OTP"))}handleMobileOtpCallback(k){var B,U,F;const{message:j,data:$}=k;try{let k={name:"",success:"fail",transactionId:"",quantity:0};switch(j){case rt.OtpMobilePurchaseSuccessful:k={name:j,success:"success",transactionId:String(null===(B=null==$?void 0:$.transaction)||void 0===B?void 0:B.transactionIdentifier)||"",quantity:null!==(F=null===(U=null==$?void 0:$.productData)||void 0===U?void 0:U.quantity)&&void 0!==F?F:0};break;case rt.OtpMobilePurchaseFailed:k={name:j,success:"fail",transactionId:"",quantity:0};break;case rt.OtpMobileNoPurchaseOptions:k={name:j,success:"noPurchaseOptions",transactionId:"",quantity:0};break;case rt.OtpMobilePurchasePending:k={name:j,success:"pending",transactionId:"",quantity:0}}this.finishOtp(k)}catch(H){G.RQr.logError(H,"Failed to finish OTP")}}initOtpForNativeApp(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;if(_t.pF.isNativeApp())if(this._listenOnPurchaseFlowOnly&&this.setupPurchaseListener(),null===(U=null===(B=null===window||void 0===window?void 0:window.SW)||void 0===B?void 0:B.OTP)||void 0===U?void 0:U.startOneTimePurchase){const B=Date.now();!this._lastOtpStartTime||B-this._lastOtpStartTime>5e3?(this._lastOtpStartTime=B,window.SW.OTP.startOneTimePurchase(k).catch(G.RQr.createHandler("startOneTimePurchase Error"))):G.VyI.log("startOneTimePurchase called too quickly, ignoring.",G.$bb.Warning)}else G.VyI.log("startOneTimePurchase is not available - Mobile OTP not initialized",G.$bb.Error)}))}destroy(){V.q.instance.game.broadcaster.removeAppListener(Y.bS.POST_MESSAGE_RECEIVED,this,V.q.instance.game),this.onQrUrlRetrieved.dispose(),this.onComplete.dispose(),this.onMembershipFlowSuccess.dispose(),this.onMembershipStatusUpdateStarted.dispose(),super.destroy()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Rt.prototype,"onQrUrlRetrieved",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Rt.prototype,"onComplete",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Rt.prototype,"onMembershipFlowSuccess",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Rt.prototype,"onMembershipStatusUpdateStarted",void 0),(0,F.Cg)([(0,G.Cdj)("c47-20b6"),(0,F.Sn)("design:type",Function)],Rt.prototype,"_segment",void 0),(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",W.E)],Rt.prototype,"_currentPlayer",void 0),(0,F.Cg)([(0,dt.b)("b94-d1b1"),(0,F.Sn)("design:type",At.j)],Rt.prototype,"_webFrameManager",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Rt.prototype,"_respectSchoolMode",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Rt.prototype,"_listenOnPurchaseFlowOnly",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],Rt.prototype,"_otpFunnelPurchaseOrder",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Rt.prototype,"_retryTimeoutMs",void 0),(0,F.Cg)([(0,dt.b)("e03-b0a9"),(0,F.Sn)("design:type",lt.x)],Rt.prototype,"_otpService",void 0),(0,F.Cg)([(0,dt.b)("295-41dc"),(0,F.Sn)("design:type",wt.o)],Rt.prototype,"_otpNetworkHandler",void 0),(0,F.Cg)([(0,dt.b)("c97-bd0d"),(0,F.Sn)("design:type",Tt.I)],Rt.prototype,"_gameNetworkManager",void 0),(0,F.Cg)([(0,dt.b)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],Rt.prototype,"_localizer",void 0),(0,F.Cg)([(0,dt.b)("be9-3278"),(0,F.Sn)("design:type",St.p)],Rt.prototype,"_urlProvider",void 0),Rt=(0,F.Cg)([(0,G.EVk)("ProcessWebPurchase",Q.Y.membership)],Rt)},91160:(k,B,U)=>{"use strict";var F;U.d(B,{u:()=>F}),function(k){k.Boot="boot",k.BootFeatureFlags="boot.feature_flags",k.BootGameData="boot.game_data",k.BootFeatureRevision="boot.feature_revisions",k.BootAssets="boot.assets",k.BootLocalization="boot.localization",k.BootRebuildGUID="boot.rebuild_guids",k.BootStartNextState="boot.start_next_state",k.Splash="splash",k.SplashCreate="splash.create",k.SplashLoadQI="splash.load_QI",k.SplashLoadQIEducationStatus="splash.load_QI.education_status",k.SplashLoadQILoadQuestion="splash.load_QI.load_question",k.SplashLoadQILoadQuestionInterface="splash.load_QI.load_question_interface",k.SplashLoadGame="splash.load_game",k.SplashTitans="splash.titans",k.SplashLogin="splash.login",k.SplashIapInit="splash.iap_init",k.SplashUpdateFeatureAccess="splash.update_feature_access",k.SplashCharacter="splash.character",k.SplashFetchEndGameQuestData="splash.fetch_end_game_quest_data",k.SplashInitFeatureProvider="splash.init_feature_provider",k.SplashEducation="splash.education",k.SplashParentalConsentService="splash.parental_consent_service",k.SplashSegment="splash.segment",k.SplashSetupFeatureProvider="splash.setup_feature_provider",k.SplashWorldList="splash.world_list",k.SplashRegistrationMenu="splash.registration_menu",k.SplashPlayerEducationInit="splash.player_education_init",k.SplashPrefabRequest="splash.prefab_request",k.ServerMenuSelection="server_menu",k.ServerMenuSuggestedServers="server_menu.suggested_servers",k.ServerMenuShowAllServers="server_menu.all_servers",k.ServerMenuConnect="server_menu.connect",k.PrefabLoaderScene="prefab_loader_scene",k.PrefabLoaderSceneAssetPreload="prefab_loader_scene.asset_preload",k.PrefabLoaderScenePrefabLoading="prefab_loader_scene.prefab_loading",k.PrefabLoaderSceneConsentBanner="prefab_loader_scene.consent_banner",k.SingleAssetLoading="load_single_asset",k.World="world",k.WorldRemotePlayerSpawnLimiterInit="world.remotePlayerSpawnLimiter",k.WorldSynapseMultiplayerServiceConnection="world.synapse_multiplayer_service_connection",k.WorldNetworkHandlerEnterWorld="world.network_handler_enter_world",k.WorldInitProgressDataManager="world.init_progress_datamanager",k.WorldSynchedRiftDataInit="world.synched_rift_data_init",k.WorldFeaturedSpawnDataInit="world.featured_spawn_data_init",k.WorldDynamicStoreQuestManagerSetup="world.dynamic_store_quest_manager_setup",k.WorldInventoryInit="world.inventory_init",k.WorldHudDataInit="world.hud_data_init",k.WorldSegmentAnalyticsSetup="world.segment_analytics_setup",k.WorldElementalBoostCache="world.elemental_boost_cache",k.WorldPippetEncounterInit="world.pippet_encounter_init",k.WorldGetTowerData="world.get_tower_data",k.WorldInitTowerData="world.init_tower_data",k.WorldJoinActiveQuiz="world.join_active_quiz",k.WorldPlayerGoalsInit="world.player_goals_init",k.WorldEnterMap="world.enter_map",k.WorldSegmentedOffersDataInit="world.segmented_offers_data_init",k.WorldWizardCostumeDataInit="world.wizard_costume_data_init",k.LoadingState="loadingstate",k.LoadingStateAssetsLoad="loadingstate.assets_load",k.LoadingStateAdditionalLoadPromise="loadingstate.additional_load_promise",k.QuestManagerHubSetup="quest_manager_hub_setup"}(F||(F={}))},28152:(k,B,U)=>{"use strict";var F;U.d(B,{Y:()=>F}),function(k){k.root="",k.analytics="Analytics",k.animation="Animation",k.audio="Audio",k.battle="Battle",k.battleRevamp="Battle Revamp",k.creature="Creature",k.creatureAnimation="Creature/Animation",k.data="Data",k.dataProvider="Data/Provider",k.debug="Debug",k.economy="Economy",k.effect="Effect",k.player="Creature/Player",k.playerAnimation="Creature/Player/Animation",k.follow="Creature/Follow",k.followAnimationState="Creature/Follow/Animation State",k.education="Education",k.injection="Injection",k.input="Input",k.inputShapes="Input/Shapes",k.item="Item",k.map="Map",k.tiled="Map/Tiled",k.mapSpawning="Map/Spawning",k.MapTeleport="Map/Teleport",k.membership="Membership",k.motion="Motion",k.multiplayer="Multiplayer",k.object="Object",k.saving="Saving",k.stateChallenges="StateChallenges",k.store="Store",k.transition="Transition",k.cooldown="Cooldown",k.trigger="Trigger",k.ui="UI",k.uiAchievement="UI/Achievement",k.uiCharCreate="UI/CharCreate",k.uiDialog="UI/Dialog",k.uiInput="UI/Input",k.uiLayout="UI/Layout",k.uiPagination="UI/Pagination",k.uiPet="UI/Pet",k.uiPetGear="UI/PetGear",k.uiPetMerge="UI/PetMerge",k.uiAd="UI/Ad",k.uiVideo="UI/Video",k.uiDynamicPrompts="UI/Dynamic Prompts",k.uiUnifiedStore="UI/Unified Store",k.uiPetsInZones="UI/Pets In Zones",k.uiPopup="UI/Popup",k.utility="Utility",k.uiPetMenu="UI/Pet Menu",k.universalTeamSelection="UI/Universal Team Selection",k.uiHudManager="UI/Hud Manager",k.web="Web",k.reporting="Reporting",k.ultimates="Ultimates",k.ultimatesUi="Ultimates/UI",k.quest="Quest",k.zones="Zones",k.zoneForest="Zones/Forest",k.zoneShipwreckShore="Zones/Shipwreck Shore",k.adventure="Feature/Adventure",k.adventureFsm="Feature/Adventure/FSM",k.adventureUi="Feature/Adventure/UI",k.academy="Feature/Academy",k.festival="Feature/Festival",k.leaderboard="Feature/Leaderboard",k.postBattleFlow="Feature/Post Battle Flow",k.towerTown="Feature/Tower Town",k.titan="Feature/Titan",k.ftue="Feature/FTUE",k.petRescue="Feature/Pet Rescue",k.battlePass="Feature/Battle Pass",k.worldMapDuelsStadium="Feature/World Map/Duels Stadium",k.chargedLevels="Feature/Charged Levels",k.lootDash="Feature/Loot Dash",k.playerGoals="Feature/Player Goals",k.rifts="Feature/Rifts",k.afterSchoolWidget="Feature/After School Widget",k.wizardCostumes="Feature/Wizard Costumes"}(F||(F={}))},17331:(k,B,U)=>{"use strict";U.d(B,{H:()=>V,_:()=>F});var F,G=U(62459),j=U(35120),$=U(77078),H=U(28402);!function(k){k[k.Up=0]="Up",k[k.Down=1]="Down"}(F||(F={}));class V extends G.uAl{init(k,B,U){this.screen=k,this.enterCallback=U,B===F.Up?(this.openAnimation="open going up",this.closeAnimation="close going up"):(this.openAnimation="open going down",this.closeAnimation="close going down")}create(){super.create();const k=this.gameObject.findComponentInChildren(H.v);this.spine=k.getSpine(),this.input=this.gameObject.findComponentInChildren($.p),this.input.InputEnabled=!0,this.input.onClicked.add((()=>{this.walkTo()}))}walkTo(){this.screen.user.setValidPath(this.screen.path,this.gameObject.transform.localPosition.x+12,this.gameObject.transform.localPosition.y+160,(k=>({}))),this.spine.setAnimationByName(0,this.openAnimation),this.spine.onComplete.addOnce((()=>{this.enter()})),j.q.instance.prodigy.audio.playSFX(17,"elevator")}enter(){this.screen.user.setValidPath(this.screen.path,this.gameObject.transform.localPosition.x+12,this.gameObject.transform.localPosition.y+90,(k=>(G.Aq$.isDefined(k)&&(this.screen.content.removeChild(this.screen.user),this.screen.below.add(this.screen.user),this.spine.setAnimationByName(0,this.closeAnimation),j.q.instance.prodigy.audio.playSFX(17,"elevator-doors"),this.spine.onComplete.addOnce((()=>{this.enterCallback()}))),{})))}exit(){this.spine.setAnimationByName(0,this.openAnimation),j.q.instance.prodigy.audio.playSFX(17,"elevator-doors"),this.spine.onComplete.addOnce((()=>{this.screen.below.remove(this.screen.user),this.screen.content.addChild(this.screen.user),this.screen.user.setValidPath(this.screen.path,this.gameObject.transform.localPosition.x+12,this.gameObject.transform.localPosition.y+160,(k=>({}))),this.spine.setAnimationByName(0,this.closeAnimation),j.q.instance.prodigy.audio.playSFX(17,"elevator-doors")}))}}},96282:(k,B,U)=>{"use strict";U.d(B,{G:()=>K});var F=U(62459),G=U(35120),j=U(91207),$=U(77938),H=U(86949),V=U(31427),W=U(70123),q=U(59838);class K extends H.u{constructor(k,B,U,G){super(),this.onItemDrag=new F.HN0,this.onItemDropped=new F.HN0,this.onItemMoved=new F.HN0,this.onItemInputDown=new F.HN0,this.canRevert=null,this.orientation=0,this.assetData=null,this.assetMetadata=null,this.editable=!1,this.itemID=U,this.orientation=G,this.parentHouse=B}create(){super.create(),this.updateItemData()}setItemID(k){this.itemID!==k&&(this.itemID=k,this.updateItemData())}updateItemData(){this.assetData=$.t.getItem("dorm",this.itemID).data,this.assetMetadata=$.t.getItem("dorm",this.itemID).metadata,this.updateSprite()}getAssetName(){return F.Aq$.isDefined(this.assetData)?`${this.getOrientation()}-dorm-${this.itemID}`:""}isAnimated(){if(F.Aq$.isDefined(this.assetMetadata)){const k=this.getOrientation();return F.Aq$.isDefined(this.assetMetadata.assets[k])&&F.Aq$.isDefined(this.assetMetadata.assets[k].animations)&&F.Aq$.isDefined(this.assetMetadata.assets[k].animations.idle)}return!1}canRotate(){return F.Aq$.isDefined(this.assetData)&&this.assetData.r>0}getScaleX(){return F.Aq$.isDefined(this.assetData)&&this.assetData.r>0&&this.orientation>1?-1:1}updateSprite(k=!1){let B=this.gameObject.findComponent(V.A);F.Aq$.isDefined(B)?B.setAsset(j.E.getDormItem(this.getStrictOrientation(),this.itemID),this.assetMetadata.assets[this.getOrientation()]):(B=this.initRenderInterface(),k&&(this.setEditable(!1),this.setEditable(!0))),B.setScale(this.getScaleX(),1),B.hasAnimations()&&B.playAnimation("idle",!0,Math.random()*B.getAnimationLength("idle"))}initRenderInterface(){const k=W.j.createRenderer(j.E.getDormItem(this.getStrictOrientation(),this.itemID),this.assetMetadata.assets[this.getOrientation()]);return this.gameObject.addComponent(k),k.setAnchor(.5,0),k.resetAfterDrag=!0,k}rotateItem(){if(this.editable&&this.canRotate()){const k=this.assetMetadata.assets[this.getOrientation()].type;this.orientation+=2===this.assetData.r?2:1,this.orientation>3&&(this.orientation=0);const B=this.assetMetadata.assets[this.getOrientation()].type,U=this.getRenderer();F.Aq$.isDefined(k)&&F.Aq$.isDefined(B)&&k!==B?(this.setEditable(!1),this.gameObject.removeComponent(U),U.destroy()):U.onLoaded.addOnce((()=>{this.setEditable(!1),this.setEditable(!0)})),this.updateSprite(!0)}}setEditable(k=!0){this.editable!==k&&(this.editable=k,this.editable?this.registerInputHandlers():this.unregisterInputHandlers())}registerInputHandlers(){const k=this.getRenderer();k.setInputEnabled(),k.enableDragging(!0,!0,20,20);const B=k.getEvents();F.Aq$.isDefined(B)&&(B.onDragStart.add(this.dragStarted,this),B.onDragUpdate.add(this.dragUpdated,this),B.onDragStop.add(this.dragStopped,this),B.onInputDown.add(this.itemFocused,this))}unregisterInputHandlers(){const k=this.getRenderer();k.setInputEnabled(!1),k.disableDragging();const B=k.getEvents();F.Aq$.isDefined(B)&&(B.onDragStart.remove(this.dragStarted,this),B.onDragUpdate.remove(this.dragUpdated,this),B.onDragStop.remove(this.dragStopped,this),B.onInputDown.remove(this.itemFocused,this))}getRenderer(){return this.gameObject.findComponent(V.A)}dragStarted(){G.q.instance.game.stage.addChild(this.gameObject),this.onItemDrag.dispatch()}dragUpdated(){if(F.Aq$.isDefined(this.parentHouse)){const k=this.getRenderer();k instanceof q.F||k.setAlpha(this.parentHouse.canPlaceItem(this)?1:.5)}}dragStopped(){if(F.Aq$.isDefined(this.parentHouse)?this.parentHouse.content.addChild(this.gameObject):G.q.instance.game.add.existing(this.gameObject),!F.Aq$.isDefined(this.parentHouse)||this.parentHouse.canPlaceItem(this)){const k=this.getRenderer(),B=k.getWorld();if(this.onItemDropped.dispatch(this,B.x,B.y),k instanceof q.F){const U=k.getSpineObjectOffset();B.x+=U.x,B.y+=U.y}const U=F.cj9.snapToCeil(B.x,K.HOUSE_ITEM_GRID_SNAP_INTERVAL),G=F.cj9.snapToFloor(B.y,K.HOUSE_ITEM_GRID_SNAP_INTERVAL);this.onItemMoved.dispatch(this,this.gameObject.x,this.gameObject.y,U,G),this.canRevert=!0,this.gameObject.x=U,this.gameObject.y=G,k.resetToOrigin()}else{if(!this.canRevert)return void this.gameObject.destroy();{const k=this.getRenderer(),B=k.getWorld();this.onItemDropped.dispatch(this,B.x,B.y),k.resetToOrigin()}}}itemFocused(){this.onItemInputDown.dispatch()}resetItem(){this.getRenderer().setAlpha(1)}getOrientation(){return"horizontal"===this.getStrictOrientation()?"horizontal":"vertical"}getStrictOrientation(){return this.assetData.r>0&&1==(1&this.orientation)?"horizontal":"vertical"}destroy(){this.onItemDrag.dispose(),this.onItemDropped.dispose(),this.onItemMoved.dispose(),this.onItemInputDown.dispose(),super.destroy()}}K.HOUSE_ITEM_GRID_SNAP_INTERVAL=20},16495:(k,B,U)=>{"use strict";U.d(B,{QW:()=>j,ib:()=>H,sR:()=>G,ye:()=>$});var F=U(8674);const G=(k,B,U)=>{if(Array.isArray(k))for(let F=0;F{if(Array.isArray(k))for(let B=0;B(0,F.sH)(void 0,void 0,void 0,(function*(){if(Array.isArray(k)){const U=[];for(let G=0;G(0,F.sH)(void 0,void 0,void 0,(function*(){return new Promise((F=>{k[U].OnAnimationComplete.addOnce(F),k[U].playAnimation(B,!1)}))})))(G));return Promise.all(U).then((()=>Promise.resolve()))}return new Promise((U=>{k.OnAnimationComplete.addOnce(U),k.playAnimation(B,!1)}))})),H=(k,B,U)=>(0,F.sH)(void 0,void 0,void 0,(function*(){for(let U=0;U{"use strict";U.d(B,{R:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.uAl{create(){super.create();j.q.instance.prodigy.gameContainer.get("c97-bd0d").startInactiveTimer()}destroy(){j.q.instance.prodigy.gameContainer.get("c97-bd0d").stopInactiveTimer(),super.destroy()}};H=(0,F.Cg)([(0,G.EVk)("InactivityDialog",$.Y.uiDialog)],H)},27812:(k,B,U)=>{"use strict";U.d(B,{I:()=>q});var F=U(8674),G=U(62459),j=U(35120),$=U(53885),H=U(73402),V=U(30226),W=U(28152);let q=class extends G.uAl{constructor(){super(...arguments),this.moveSpeed=220,this.moveTarget=null,this.roundTarget=!1,this.isMoving=!1,this._deltaPos=new G.I9Y,this.initToCurrentPosition=!1,this.onMoveStart=new G.HN0,this.onMoveEnd=new G.HN0,this.lastFrameTime=null,this.localTargetPos=null,this._normalizedMoveVector=new G.I9Y}get MoveSpeed(){return this.moveSpeed}set MoveSpeed(k){this.moveSpeed=k}get MoveTarget(){return this.moveTarget}set MoveTarget(k){this.roundTarget?this.moveTarget=new G.I9Y(Math.round(this.moveTarget.x),Math.round(this.moveTarget.y)):this.moveTarget=new G.I9Y(k.x,k.y)}get RoundTarget(){return this.roundTarget}set RoundTarget(k){this.roundTarget=k}get IsMoving(){return this.isMoving}get deltaPos(){return this._deltaPos}create(){if(super.create(),this.initToCurrentPosition){const{x:k,y:B}=this.GameObject.transform.worldPosition;this.moveTarget=new G.I9Y(k,B)}this.lastFrameTime=j.q.instance.game.time.timeMS}update(){if(super.update(),this.updateLocalTargetPos(),this.isMoving||this.hasReachedTarget()||(this.isMoving=!0,this.onMoveStart.dispatch()),this.isMoving){let k=null;if(this.GameObject.transform)if(this.GameObject.transform instanceof H.N){k=this.GameObject.findComponent($.u).getRootContainer().transform.position}else k=this.GameObject.transform.localPosition;else{const B=this.GameObject.legacyTransform.group.position;k=new G.I9Y(B.x,B.y)}const B=this.localTargetPos.x{"use strict";U.d(B,{$:()=>j});var F=U(8674),G=U(62459);class j extends G.JTX{create(){super.create(),this.socketService.onMessage.add(this.receivedMessage,this),this.socketService.onPlayerJoined.add(this.playerJoined,this),this.socketService.onPlayerDisconnect.add(this.playerLeft,this)}destroy(){this.socketService.onMessage.remove(this.receivedMessage,this),this.socketService.onPlayerJoined.remove(this.playerJoined,this),this.socketService.onPlayerDisconnect.remove(this.playerLeft,this),super.destroy()}playerJoined(k){}playerLeft(k){}}(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],j.prototype,"socketService",void 0)},25809:(k,B,U)=>{"use strict";U.d(B,{g:()=>Q});var F=U(8674),G=U(62459),j=U(30226),$=U(72162),H=U(99625),V=U(53661);class W extends $.O6{constructor(k,B,U,F){var G,j,$;super(H.l.SpellLearnedPopupMessage,B,U,F);const W=k.spellIcon[0];let q;k.spellIcon[1]&&(q=k.spellIcon[1]),this._injectablePropertiesDictionary={[V.FO.PopupMessageAtlasGuid]:W,[V.FO.PopupMessageText]:k.spellName,[V.FO.PopupMessageTextFill]:null!==(G=k.fill)&&void 0!==G?G:"#ffffff",[V.FO.PopupMessageTextStroke]:null!==(j=k.stroke)&&void 0!==j?j:"#000000",[V.FO.PopupMessageTextStrokeThickness]:null!==($=k.strokeThickness)&&void 0!==$?$:0},q&&(this._injectablePropertiesDictionary=Object.assign({[V.FO.PopupMessageAtlasFrameName]:q},this._injectablePropertiesDictionary))}}class q extends $.O6{constructor(k,B,U,F){var G,j,$;super(H.l.StatPopupMessage,B,U,F),this._injectablePropertiesDictionary={[V.FO.PopupMessageAtlasFrameName]:k.atlasFrameName,[V.FO.PopupMessageAtlasGuid]:k.atlasGuid,[V.FO.PopupMessageText]:`+${k.statIncreaseAmount}`,[V.FO.PopupMessageTextFill]:null!==(G=k.fill)&&void 0!==G?G:"#ffffff",[V.FO.PopupMessageTextStroke]:null!==(j=k.stroke)&&void 0!==j?j:"#000000",[V.FO.PopupMessageTextStrokeThickness]:null!==($=k.strokeThickness)&&void 0!==$?$:5}}}class K extends $.O6{constructor(k,B,U,F){var G,j;super(H.l.TextPopupMessage,B,U,F),this._injectablePropertiesDictionary={[V.FO.PopupMessageText]:k.text,[V.FO.PopupMessageTextFill]:k.fill,[V.FO.PopupMessageTextStroke]:null!==(G=k.stroke)&&void 0!==G?G:"#000000",[V.FO.PopupMessageTextStrokeThickness]:null!==(j=k.strokeThickness)&&void 0!==j?j:0}}}class z{static popupMessage(k,B){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U=0,F=0){let j;switch(k.type){case $.m0.Text:j=new K(k,B,U,F);break;case $.m0.Stat:j=new q(k,B,U,F);break;case $.m0.SpellLearned:j=new W(k,B,U,F);break;default:return G.VyI.log("The popup message being created does not have a valid type.",G.$bb.Error),null}return yield j.init(),j}))}}var Y=U(28152);let Q=class extends G.uAl{constructor(){super(...arguments),this.delayBetweenPopups=0,this.onPopupMessageAnimationSequenceStarted=new G.HN0,this.onPopupMessageAnimationSequenceComplete=new G.HN0,this.onPopupMessageEntranceComplete=new G.HN0,this._popups=[],this._signalBindingsToCleanUp=new Set}playPopupMessageAnimations(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(0!==k.length){0===this._popups.length&&this.onPopupMessageAnimationSequenceStarted.dispatch();for(const B of k){const k=yield z.popupMessage(B,this.GameObject);if(!k)continue;const U=k.onPopupStarted.addOnce((()=>{var k;this._signalBindingsToCleanUp.delete(U),null===(k=B.showSignal)||void 0===k||k.dispatch()}));this._signalBindingsToCleanUp.add(U);const F=k.onEntranceComplete.addOnce((()=>{this._signalBindingsToCleanUp.delete(F),this.onPopupMessageEntranceComplete.dispatch(k,B.type),this._enteringNowPopup=null,this.showNextPopup()}));this._signalBindingsToCleanUp.add(F);const G=k.onPopupComplete.addOnce((()=>{var U;this._signalBindingsToCleanUp.delete(G),k.cleanup(),j.J.removeFromArray(k,this._popups),null===(U=B.hideSignal)||void 0===U||U.dispatch(),0===this._popups.length&&this.onPopupMessageAnimationSequenceComplete.dispatch()}));this._signalBindingsToCleanUp.add(G),this._popups.push(k)}this.showNextPopup()}}))}showNextPopup(){if(this._enteringNowPopup)return;const k=this._popups.find((k=>k.currentState===$.jk.Created));if(!k)return;this._enteringNowPopup=k;const B=this._popups[0]===k?0:this.delayBetweenPopups;if(this.shouldPushPopupsUp)for(const U of this._popups){if(U===k)break;U.tweenYPos(U.getYPos()-k.popupHeight,null,B)}k.setYPos(0),k.tweenYPos(k.getYPos()-k.popupHeight,null,B),k.playAnimation(B)}destroy(){this._signalBindingsToCleanUp.forEach((k=>k.destroy())),this.onPopupMessageAnimationSequenceComplete.dispose(),this.onPopupMessageAnimationSequenceStarted.dispose(),this.onPopupMessageEntranceComplete.dispose(),this._popups.forEach((k=>k.cleanup())),super.destroy()}};(0,F.Cg)([(0,G.vkK)(),(0,G.Lr6)(0),(0,G.YLv)("If true, popups will push previous popups up. If false, popups will overlap."),(0,F.Sn)("design:type",Boolean)],Q.prototype,"shouldPushPopupsUp",void 0),(0,F.Cg)([(0,G.g11)(),(0,G.Lr6)(0),(0,G.YLv)("Number of ms to wait before starting the next popup in the queue"),(0,F.Sn)("design:type",Number)],Q.prototype,"delayBetweenPopups",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Q.prototype,"onPopupMessageAnimationSequenceStarted",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Q.prototype,"onPopupMessageAnimationSequenceComplete",void 0),Q=(0,F.Cg)([(0,G.EVk)("PopupMessageManager",Y.Y.ui)],Q)},76642:(k,B,U)=>{"use strict";U.d(B,{S:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this.runOnCreate=!1,this.runOnEnable=!1,this.onDispatch=new G.HN0}get dispatchCount(){return this.onDispatch.dispatchCount}create(){super.create(),this.runOnCreate&&this.run()}onEnable(){super.onEnable(),this.runOnEnable&&this.run()}destroy(){this.onDispatch.dispose(),super.destroy()}run(k){this.onDispatch.dispatch(k)}addListener(k){this.onDispatch.add(k)}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"runOnCreate",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"runOnEnable",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onDispatch",void 0),$=(0,F.Cg)([(0,G.EVk)("Signal",j.Y.utility)],$)},56520:(k,B,U)=>{"use strict";U.d(B,{L:()=>K});var F,G=U(8674),j=U(62459),$=U(95891),H=U.n($),V=U(68910),W=U(35120),q=U(28152);let K=F=class extends j.uAl{constructor(){super(...arguments),this._frames=[],this._graphicTintColor="#ffffff",this._shuffleFrames=!0,this._frameSeparation=100,this.onSpinComplete=new j.HN0,this.onTargetChosen=new j.HN0,this._itemObjects=[]}get isSpinning(){return this._shouldSpin}create(){var k,B;super.create(),this._itemMaxY=.5*((null!==(B=null===(k=this._rectTransform)||void 0===k?void 0:k.fullHeight)&&void 0!==B?B:this._frameSeparation)+this._frameSeparation),this._shuffleFrames&&(this._frames=H().shuffle(this._frames)),H().times(this._frames.length,(()=>this.addItemGraphic()))}destroy(){var k;this.onSpinComplete.dispose(),this.onTargetChosen.dispose(),null===(k=this._spinPromise)||void 0===k||k.cancel(),this._spinTween&&W.q.instance.game.tweens.remove(this._spinTween),super.destroy()}addItemGraphic(){const k=new j._mx(this.gameObject),B=k.addComponent(j.XVE);B.setAnchorMin(.5,.5),B.setAnchorMax(.5,.5),B.setPivot(.5,.5),B.setPositionY(((this._frames.length>>1)-this._itemObjects.length)*this._frameSeparation);const U=k.addComponent(j.vYh);this._graphicTintColor&&(U.tint=j.TZp.hexToDecimal(this._graphicTintColor)),U.updateAsset(this._atlas,this._frames[this._itemObjects.length]);const F=U.getDimensions();B.setSizeDelta(F.width,F.height),this._itemObjects.push([U,B])}startSpin(){this._shouldSpin=!0,this._spinPromise=new j.kBN(((k,B)=>{(()=>(0,G.sH)(this,void 0,void 0,(function*(){if(yield this.tweenItems(this._frameSeparation,F.SPIN_LEAD_IN_TIME_MS,j.GS3.Back.In),this._spinPromise.cancelled)return;let B;if(yield new Promise((k=>{B=()=>{this._spinPromise.cancelled||!this._shouldSpin?k():this.offsetItems(V.Ticker.shared.deltaMS/F.SPIN_CYCLE_TIME_MS*this._frameSeparation)},V.Ticker.shared.add(B)})),V.Ticker.shared.remove(B),this._spinPromise.cancelled)return;const U=H()(this._itemObjects).filter((k=>k[1].localPosition.y<-this._itemMaxY)).maxBy((k=>k[1].localPosition.y));this.onTargetChosen.dispatch(U),yield this.tweenItems(-U[1].localPosition.y,2*F.SPIN_CYCLE_TIME_MS,j.GS3.Back.Out),this.onSpinComplete.dispatch(),k()})))().catch((k=>{j.RQr.logError(k,"Error in slot spin animation"),B(k)})).finally((()=>{this._spinPromise=null,this._spinTween=null}))}))}stopSpin(){this._shouldSpin=!1}offsetItems(k){for(const B of this._itemObjects){let U=B[1].localPosition.y+k;U>this._itemMaxY&&(U-=this._itemObjects.length*this._frameSeparation),B[1].setPositionY(U)}}tweenItems(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F={lastOffset:0,offset:0};this._spinTween=W.q.instance.game.add.tween(F,this).to({offset:k},B,U,!0),this._spinTween.onUpdate.add((()=>{const k=F.offset-F.lastOffset;F.lastOffset=F.offset,this.offsetItems(k)})),yield this._spinTween.onTweenComplete.asPromise()}))}};K.SPIN_LEAD_IN_TIME_MS=1e3,K.SPIN_CYCLE_TIME_MS=100,(0,G.Cg)([(0,j.Pqz)(j.XVE),(0,G.Sn)("design:type",j.XVE)],K.prototype,"_rectTransform",void 0),(0,G.Cg)([(0,j.Bak)(),(0,j.W_S)(),(0,G.Sn)("design:type",String)],K.prototype,"_atlas",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],K.prototype,"_frames",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",String)],K.prototype,"_graphicTintColor",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],K.prototype,"_shuffleFrames",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],K.prototype,"_frameSeparation",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],K.prototype,"onSpinComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],K.prototype,"onTargetChosen",void 0),K=F=(0,G.Cg)([(0,j.EVk)("SlotMachineAnimation",q.Y.animation)],K)},85697:(k,B,U)=>{"use strict";U.d(B,{o:()=>q});var F=U(8674),G=U(62459),j=U(91207),$=U(77938),H=U(68152),V=U(28152),W=U(34603);let q=class extends G.uAl{constructor(){super(...arguments),this._dormImage=null,this._dormItemID=null,this._orientation=null}get dormItemID(){return this._dormItemID}create(){super.create(),this._dormImage.OnLoaded.add(this.updateOffset,this),null!==this._dormItemID&&this._dormImage&&null!==this._orientation&&this.updateDormImage()}destroy(){this._dormImage.OnLoaded.remove(this.updateOffset,this),this._dormImage=null,super.destroy()}setDormItemID(k,B){this._dormItemID=k,this._orientation=B,this.updateDormImage()}updateDormImage(){(0,H.v)(null!==this._dormItemID&&this._dormItemID>0,"Invalid dorm item ID was loaded");const k=$.t.getItem("dorm",this._dormItemID).metadata.assets[this._orientation];(0,H.v)("singleImage"===k.type,`Invalid singleImage dorm item data for ID: ${this._dormItemID}`),this._dormImage.setAsset(j.E.getDormImage(this._orientation,this._dormItemID)).catch(G.RQr.createHandler("Error setting _dormImage"))}updateOffset(){const k=this._dormImage.getDimensions();this._dormImage.GameObject.transform.setPosition(-k.getHalfWidth(),-k.height)}};(0,F.Cg)([(0,G.MnK)(W._),(0,F.Sn)("design:type",W._)],q.prototype,"_dormImage",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_dormItemID",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],q.prototype,"_orientation",void 0),q=(0,F.Cg)([(0,G.EVk)("SingleImageDormItem",V.Y.object)],q)},53880:(k,B,U)=>{"use strict";var F,G;U.d(B,{J:()=>G,d:()=>F}),function(k){k.StoryTabActive="STORY_TAB_ACTIVE",k.CoopTabActive="COOP_TAB_ACTIVE",k.SeasonTabActive="SEASON_TAB_ACTIVE",k.RiftsTabActive="RIFTS_TAB_ACTIVE",k.MemberTabActive="MEMBER_TAB_ACTIVE",k.BackgroundImageGuid="BACKGROUND_IMAGE_GUID",k.TitleText="TITLE_TEXT",k.BannerFillColor="BANNER_FILL_COLOR"}(F||(F={})),function(k){k.BackgroundImageGuid="BACKGROUND_IMAGE_GUID",k.TitleText="TITLE_TEXT",k.FestivalAtlasGuid="FESTIVAL_ATLAS_GUID",k.LeftColumnText="LEFT_COLUMN_TEXT",k.LeftColumnFrame="LEFT_COLUMN_FRAME",k.RightColumnText="RIGHT_COLUMN_TEXT",k.RightColumnFrame="RIGHT_COLUMN_FRAME",k.MiddleColumnText="MIDDLE_COLUMN_TEXT",k.MiddleColumnFrame="MIDDLE_COLUMN_FRAME"}(G||(G={}))},55741:(k,B,U)=>{"use strict";U.d(B,{l:()=>q});var F=U(8674),G=U(20136),j=U(58268),$=U(62459),H=U(68910),V=U(28152),W=U(28402);let q=class extends $.uAl{constructor(){super(...arguments),this._targetTransform=null,this._boneFollower=null,this._followAxis=3,this._followRotation=!1,this._followScale=3,this._followAlpha=!0,this._followTint=!1,this._localOffset=new $.I9Y(0,0),this._previousLocalOffset=new $.I9Y(0,0),this._bone=null,this._slot=null,this._boneFollowerLocalTransform=new H.Matrix,this._localMatrix=new H.Matrix,this._bonesPreviousPosition=new $.I9Y(0,0),this._transformsNewPosition=new $.I9Y(0,0),this._setupFunctions=new Map([["spineComponent",k=>this.setupSpine(k.spineComponent)],["boneName",k=>this.setupBone(k.boneName)],["slotName",k=>this.setupSlot(k.slotName)],["followAxis",k=>{this._followAxis=k.followAxis}],["followRotation",k=>{this._followRotation=k.followRotation}],["followScale",k=>{this._followScale=k.followScale}],["boneFollower",k=>this.setupFollower(k.boneFollower)],["boneFollowerTransform",k=>{this.targetTransform=k.boneFollowerTransform}]])}set targetTransform(k){const B=k.GameObject.findComponentInChildren($.y4o,!0);B&&(this.setupFollower(B.getRootContainer())||B.onRootContainerSet.addOnce(this.onFollowerRootContainerSet.bind(this,B)),this._targetTransform=k)}set followAxis(k){this._followAxis=k}set followRotation(k){this._followRotation=k}set followScale(k){this._followScale=k}set localOffset(k){this._localOffset.set(k.x,k.y)}create(){super.create()}setup(k=null){var B;if(!$.Aq$.isDefined(null===(B=this._spineComponent)||void 0===B?void 0:B.OnLoaded)||this._spineComponent.isLoaded)if(k)Object.keys(k).forEach((B=>{this._setupFunctions.get(B)(k)}));else{if(!this._spineComponent)return;if(!this._boneFollower&&this._targetTransform){const k=this._targetTransform.GameObject.findComponentInChildren($.y4o,!0);if(!k)return;this.setupFollower(k.getRootContainer())||k.onRootContainerSet.addOnce(this.onFollowerRootContainerSet.bind(this,k))}!this._bone&&$.Aq$.isDefined(this._boneName)&&0!==this._boneName.length&&this.setupBone(this._boneName),!this._slot&&$.Aq$.isDefined(this._slotName)&&0!==this._slotName.length&&this.setupSlot(this._slotName)}else this._spineComponent.OnLoaded.addOnce((()=>{this.setup(k)}))}setupBone(k){return this._bone=this._spineComponent.getBone(k),!!this._bone&&(this._boneName=k,this._bonesPreviousPosition.set(this._bone.worldX,this._bone.worldY),!0)}setupFollower(k){return!!k&&(this._boneFollower=k,this._boneFollowerLocalTransform.copyFrom(this._boneFollower.transform.localTransform),this._localMatrix.copyFrom(this._boneFollowerLocalTransform),!0)}setupSlot(k){return this._slot=this._spineComponent.getSlot(k),!!this._slot&&(this._slotName=k,!0)}destroyOnAnimationComplete(k){this._spineComponent.getSpine().onStart.addOnce((()=>{this._spineComponent.getSpine().onComplete.addOnce((()=>{this._spineComponent.getSpine().setToSetupPose(),this.Active=!1,this.destroy(),null==k||k()}))}))}update(){super.update(),this._bone&&this._boneFollower&&(this._boneFollower.filters=[],this._followAlpha&&this.filterAlpha(this._boneFollower),this._followTint&&this.filterTint(this._boneFollower),this._targetTransform?(4!==this._followAxis&&(this._transformsNewPosition.x=this._targetTransform.localPosition.x+(this._bone.worldX-this._bonesPreviousPosition.x)+(this._localOffset.x-this._previousLocalOffset.x),this._transformsNewPosition.y=this._targetTransform.localPosition.y+(this._bone.worldY-this._bonesPreviousPosition.y)+(this._localOffset.y-this._previousLocalOffset.y),this._targetTransform.setPosition(2!==this._followAxis?this._transformsNewPosition.x:this._targetTransform.localPosition.x,1!==this._followAxis?this._transformsNewPosition.y:this._targetTransform.localPosition.y),this._bonesPreviousPosition.x=this._bone.worldX,this._bonesPreviousPosition.y=this._bone.worldY,this._previousLocalOffset.x=this._localOffset.x,this._previousLocalOffset.y=this._localOffset.y),4!==this._followScale&&this._targetTransform.setScale(2!==this._followScale?this._bone.scaleX:this._targetTransform.localScale.x,1!==this._followScale?this._bone.scaleY:this._targetTransform.localScale.y),this._followRotation&&this._targetTransform.setRotation(this._bone.rotation)):(this._localMatrix.copyFrom(this._boneFollowerLocalTransform),4!==this._followAxis&&(this._localMatrix.translate(2!==this._followAxis?this._bone.worldX+this._localOffset.x:0,1!==this._followAxis?this._bone.worldY+this._localOffset.y:0),this._boneFollower.transform.setFromMatrix(this._localMatrix)),4!==this._followScale&&(this._boneFollower.scale=new H.Point(2!==this._followScale?this._bone.scaleX:this._boneFollower.scale.x,1!==this._followScale?this._bone.scaleY:this._boneFollower.scale.y)),this._followRotation&&(this._boneFollower.rotation=this._bone.rotation),this._boneFollower.updateTransform()))}setupSpine(k){return k?(this._spineComponent=k,!0):($.VyI.log("SpineComponent cannot be null or undefined",$.$bb.Error),!1)}onFollowerRootContainerSet(k){k.onRootContainerSet.remove(this.onFollowerRootContainerSet,this),this.setupFollower(k.getRootContainer())||$.VyI.log("Bone Follower cannot be null or undefined",$.$bb.Error)}filterTint(k){var B;if(!(null===(B=this._slot)||void 0===B?void 0:B.color))return;const U=new j.N;U.matrix[0]=this._slot.color.r,U.matrix[6]=this._slot.color.g,U.matrix[12]=this._slot.color.b,k.filters.push(U)}filterAlpha(k){var B;if(!(null===(B=this._slot)||void 0===B?void 0:B.color))return;const U=new G.Z;U.alpha=this._slot.color.a,k.filters.push(U)}destroy(){this._spineComponent=null,this._bone=null,this._slot=null,this._boneFollower=null,this._boneName=null,this._slotName=null,this._targetTransform=null,super.destroy()}};(0,F.Cg)([(0,$.MnK)($.dLy),(0,F.Sn)("design:type",$.dLy)],q.prototype,"_targetTransform",void 0),(0,F.Cg)([(0,$.MnK)(W.v),(0,F.Sn)("design:type",W.v)],q.prototype,"_spineComponent",void 0),(0,F.Cg)([(0,$.W_S)(),(0,F.Sn)("design:type",String)],q.prototype,"_boneName",void 0),(0,F.Cg)([(0,$.W_S)(),(0,F.Sn)("design:type",String)],q.prototype,"_slotName",void 0),(0,F.Cg)([(0,$.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_followAxis",void 0),(0,F.Cg)([(0,$.vkK)(),(0,F.Sn)("design:type",Boolean)],q.prototype,"_followRotation",void 0),(0,F.Cg)([(0,$.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_followScale",void 0),(0,F.Cg)([(0,$.vkK)(),(0,F.Sn)("design:type",Boolean)],q.prototype,"_followAlpha",void 0),(0,F.Cg)([(0,$.vkK)(),(0,F.Sn)("design:type",Boolean)],q.prototype,"_followTint",void 0),(0,F.Cg)([(0,$.DTs)(),(0,F.Sn)("design:type",$.I9Y),(0,F.Sn)("design:paramtypes",[$.I9Y])],q.prototype,"localOffset",null),(0,F.Cg)([(0,$.DTs)(),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[H.Container]),(0,F.Sn)("design:returntype",Boolean)],q.prototype,"setupFollower",null),(0,F.Cg)([(0,$.DTs)(),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Function]),(0,F.Sn)("design:returntype",void 0)],q.prototype,"destroyOnAnimationComplete",null),(0,F.Cg)([(0,$.DTs)(),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[W.v]),(0,F.Sn)("design:returntype",Boolean)],q.prototype,"setupSpine",null),(0,F.Cg)([(0,$.DTs)(),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[$.y4o]),(0,F.Sn)("design:returntype",void 0)],q.prototype,"onFollowerRootContainerSet",null),q=(0,F.Cg)([(0,$.EVk)("SpineBoneFollower",V.Y.animation)],q)},55800:(k,B,U)=>{"use strict";U.d(B,{a:()=>V});var F=U(8674),G=U(62459),j=U(77938),$=U(68152),H=U(28152);let V=class extends G.uAl{constructor(){super(...arguments),this._followParent=null,this._followID=null,this._onFollowLoaded=new G.HN0,this._followAppearance=null}get followID(){return this._followID}get followParent(){return this._followParent}get onFollowLoaded(){return this._onFollowLoaded}create(){super.create(),null!==this._followID&&this._followParent&&this.updateFollowAppearance()}destroy(){this._onFollowLoaded.dispose(),this._followParent=null,super.destroy()}setFollowID(k){this._followID=k,this.updateFollowAppearance()}updateFollowAppearance(){this._followAppearance&&this._followAppearance.destroy(),(0,$.v)(null!==this._followID&&this._followID>0,"Invalid follow ID was loaded");const k=j.t.getItem("follow",this._followID).metadata.assets.prefab;(0,$.v)("prefab"===(null==k?void 0:k.type),`Invalid follow prefab data for ID: ${this._followID}`),this._followAppearance=this._prefabLoader.load(k.ID,this._followParent),this._onFollowLoaded.dispatch()}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],V.prototype,"_followParent",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_followID",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"_onFollowLoaded",void 0),(0,F.Cg)([(0,G.Cdj)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],V.prototype,"_prefabLoader",void 0),V=(0,F.Cg)([(0,G.EVk)("LegacyFollowAppearance",H.Y.follow)],V)},77078:(k,B,U)=>{"use strict";U.d(B,{p:()=>H});var F=U(8674),G=U(62459),j=U(68910),$=U(36303);let H=class extends $.O{constructor(){super(...arguments),this._width=100,this._height=100}get Width(){return this._width}set Width(k){this._width=k,this.redrawInputRect()}get Height(){return this._height}set Height(k){this._height=k,this.redrawInputRect()}getInputRect(){return new j.Rectangle(-.5*this._width,-.5*this._height,this._width,this._height)}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_width",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_height",void 0),H=(0,F.Cg)([(0,G.EVk)("Input")],H)},36303:(k,B,U)=>{"use strict";U.d(B,{O:()=>z});var F=U(8674),G=U(62459),j=U(68910),$=U(35120),H=U(74560),V=U(77442),W=U(59231);class q extends W.l{constructor(k,B){var U;if(super(k),this._shape=B,B instanceof V.k){const B=k,F=null===(U=B.containsPoint)||void 0===U?void 0:U.bind(k);F&&(B.containsPoint=k=>!this._shape.isPointOverShape(k)&&(!!F&&F(k)))}}getHandlerType(){return this._shape instanceof V.k?W.q.Passthrough:W.q.Shape}checkPointerOver(k){return super.checkPointerOver(k)&&this.isPointOverShape(k.position)}checkPointerDown(k){return super.checkPointerDown(k)&&this.isPointOverShape(k.position)}isPointOverShape(k){return this._shape.isPointOverShape(k)}}var K=U(36045);class z extends G.y4o{constructor(){super(...arguments),this._inputGraphic=null,this.onClicked=new G.HN0,this.onHoverEnter=new G.HN0,this.onHoverExit=new G.HN0,this.onHoverEnterInputUp=new G.HN0,this.onHoverExitInputUp=new G.HN0,this.onInputDown=new G.HN0,this.onInputUp=new G.HN0,this.onInputUpOutside=new G.HN0,this._onInputEnabledChanged=new G.HN0,this._priorityID=0,this._useHandCursor=!1,this._forceAttachToCamera=!1,this._spriteDimensions=new G.or0,this.sendClickLocationWithOnClick=!0,this._cooldownTimeMs=0}set useHandCursor(k){this._useHandCursor=k,this._useHandCursor&&this._inputGraphic.input.pointerOver()&&($.q.instance.game.canvas.style.cursor="pointer")}get useHandCursor(){return this._useHandCursor}get InputEnabled(){return this._inputGraphic.inputEnabled}set InputEnabled(k){this._inputGraphic.inputEnabled=k,this._onInputEnabledChanged.dispatch();const B=$.q.instance.game.input.activePointer;null!==B&&B.targetObject===this._inputGraphic.input&&B.swapTarget(null)}onEnable(){this.InputEnabled=!0,super.onEnable()}onDisable(){this.InputEnabled=!1,super.onDisable()}set blockType(k){this._inputGraphic.input.blockType=k}create(){super.create(),this._inputParent=$.q.instance.game.add.group(),this._inputParent.name=`${this.GameObject.name} - InputBase parent`,this._inputGraphic=$.q.instance.prodigy.create.image(0,0,void 0,0,j.Texture.WHITE),this._inputParent.addChild(this._inputGraphic),this._inputGraphic.name=`${this.GameObject.name} - Input sprite`,this.customShape&&H.m.setInputHandler(this._inputGraphic,new q(this._inputGraphic,this.customShape)),this._inputGraphic.inputEnabled=!0,this._priorityID&&(this._inputGraphic.input.priorityID=this._priorityID);G.wa5.getActiveScene()&&(this.updateAttachToCamera(),this.gameObject.onHierarchyChanged.add(this.updateAttachToCamera,this),this.gameObject.onLayerChanged.add(this.updateAttachToCamera,this)),this.setRootContainer(this._inputParent),this._inputGraphic.events.onInputDown.add(((k,B)=>{const U=k.input.attachToCamera?B.position:B.worldPosition,F=new G.I9Y(U.x,U.y);this.gameObject.activeInHierarchy&&!this.isOnCooldown()&&(this.onClicked.dispatch(...this.sendClickLocationWithOnClick?[F]:[]),this._lastClickTime=Date.now(),this.onInputDown.dispatch())}),this),this._inputGraphic.events.onInputUp.add(((k,B)=>{k.input.checkPointerOver(B)?this.onInputUp.dispatch():this.onInputUpOutside.dispatch()}),this),this._inputGraphic.events.onInputOver.add(((k,B)=>{this._useHandCursor&&($.q.instance.game.canvas.style.cursor="pointer"),this.onHoverEnter.dispatch(),B.isDown||this.onHoverEnterInputUp.dispatch()}),this),this._inputGraphic.events.onInputOut.add(((k,B)=>{this._useHandCursor&&($.q.instance.game.canvas.style.cursor=""),this.onHoverExit.dispatch(),B.isDown||B.justReleased()||this.onHoverExitInputUp.dispatch()}),this),this.redrawInputRect()}destroy(){var k;this.gameObject.onHierarchyChanged.remove(this.updateAttachToCamera,this),this.gameObject.onLayerChanged.remove(this.updateAttachToCamera,this),$.q.instance.game.canvas.style.cursor="",null===(k=this._inputParent)||void 0===k||k.destroy(),this.onClicked.dispose(),this.onHoverEnter.dispose(),this.onHoverExit.dispose(),this.onInputDown.dispose(),this.onInputUp.dispose(),this.onInputUpOutside.dispose(),this.onHoverEnterInputUp.dispose(),this.onHoverExitInputUp.dispose(),this._onInputEnabledChanged.dispose(),super.destroy(),this._inputGraphic=null}getDimensions(){return this._spriteDimensions}redrawInputRect(){var k;if(this._inputGraphic){const B=this.getInputRect();this._inputGraphic.alpha=0;const U=null===(k=this.gameObject)||void 0===k?void 0:k.transform;U?U instanceof G.XVE||(this._inputGraphic.width=B.width,this._inputGraphic.height=B.height,this._inputGraphic.position.set(B.x,B.y)):(this._inputGraphic.width=B.width,this._inputGraphic.height=B.height,this._inputGraphic.x=B.x,this._inputGraphic.y=B.y),this._spriteDimensions.setTo(this._inputGraphic.width,this._inputGraphic.height)}}updateAttachToCamera(){const k=G.wa5.getActiveScene();k&&(this._inputGraphic.input.attachToCamera=this._forceAttachToCamera||k.getLayer(this.gameObject.layer).attachToCamera)}isOnCooldown(){return this._cooldownTimeMs>0&&Date.now(){"use strict";U.d(B,{n:()=>V});var F=U(8674),G=U(62459),j=U(68910),$=U(28152),H=U(36303);let V=class extends H.O{constructor(){super(...arguments),this._width=100,this._height=100,this._offset=new G.I9Y(0,0),this._inputSize=new G.or0(100,100)}get width(){return this._width}get height(){return this._height}onEnable(){}onDisable(){}setSize(k,B,U=!0){this._width=k,this._height=B,this._inputSize.setTo(this._width,this._height),U&&this.redrawInputRect()}setOffset(k,B,U=!0){this._offset.setTo(k,B),U&&this.redrawInputRect()}getInputRect(){return new j.Rectangle(this._offset.x,this._offset.y,this._width,this._height)}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_width",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_height",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],V.prototype,"_offset",void 0),V=(0,F.Cg)([(0,G.EVk)("InputOverlay",$.Y.input)],V)},27952:(k,B,U)=>{"use strict";U.d(B,{t:()=>V});var F=U(8674),G=U(62459),j=U(68910),$=U(28152),H=U(36303);let V=class extends H.O{getInputRect(){let k=0,B=0,U=100,F=100;const{legacyTransform:$,transform:H}=this.gameObject;return $?({width:U,height:F}=$):H instanceof G.XVE?({left:k,top:B,rectTransformDimensions:{width:U,height:F}}=H):G.VyI.log("RectInput missing valid Transform",G.$bb.Error),new j.Rectangle(k,B,U,F)}};V=(0,F.Cg)([(0,G.EVk)("RectInput",$.Y.input)],V)},28047:(k,B,U)=>{"use strict";U.d(B,{v:()=>Q});var F=U(8674),G=U(62459),j=U(94566),$=U(96535),H=U(24595),V=U(43754),W=U(67665),q=U(13956),K=U(21097),z=U(11647),Y=U(10704);class Q extends((0,z.o)(G.uAl)){constructor(){super(...arguments),this.onItemSelected=this.createTidySignal()}}(0,F.Cg)([(0,q.b)("c47-20b6"),(0,F.Sn)("design:type",W.Y)],Q.prototype,"_segment",void 0),(0,F.Cg)([(0,q.b)("306-5359"),(0,F.Sn)("design:type",$.W)],Q.prototype,"_player",void 0),(0,F.Cg)([(0,q.b)("5a6-53a5"),(0,F.Sn)("design:type",Object)],Q.prototype,"_gameNativeAppNotificationProvider",void 0),(0,F.Cg)([(0,q.b)("5c7-e02d"),(0,F.Sn)("design:type",V.W)],Q.prototype,"_hardCurrencyDataProvider",void 0),(0,F.Cg)([(0,G.MnK)(H.V),(0,F.Sn)("design:type",H.V)],Q.prototype,"headerNavigation",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Q.prototype,"onItemSelected",void 0),(0,F.Cg)([(0,G.MnK)(Y.f),(0,F.Sn)("design:type",Y.f)],Q.prototype,"_shelfSpawner",void 0),(0,F.Cg)([(0,G.MnK)(K.NL),(0,F.Sn)("design:type",K.NL)],Q.prototype,"_itemPreview",void 0),(0,F.Cg)([(0,G.MnK)(j.O),(0,F.Sn)("design:type",j.O)],Q.prototype,"_itemCardToggleGroup",void 0)},88060:(k,B,U)=>{"use strict";U.d(B,{m:()=>H});var F=U(8674),G=U(62459),j=U(10044),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._isMoving=!1,this._initialScaleX=1}create(){super.create(),this._initialFaceTarget&&this.setFacingDirection(this._initialFaceTarget.worldPosition.x{"use strict";U.d(B,{U:()=>H});var F=U(8674),G=U(62459),j=U(68152),$=U(28152);let H=class extends G.uAl{closeFail(){this.close(!1)}closeSucceed(){this.close(!0)}close(k){(0,j.v)(!!this.openDialog,"Missing OpenBooleanDialog"),this.prefabRoot.destroy(),(k?this.openDialog.onSuccess:this.openDialog.onFail).dispatch(),this.openDialog=null}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],H.prototype,"prefabRoot",void 0),H=(0,F.Cg)([(0,G.EVk)("CloseBooleanDialogPrefab",$.Y.uiDialog)],H)},32259:(k,B,U)=>{"use strict";U.d(B,{e:()=>V});var F=U(8674),G=U(62459),j=U(68152),$=U(28152),H=U(4035);let V=class extends G.uAl{constructor(){super(...arguments),this.onFail=new G.HN0,this.onSuccess=new G.HN0}destroy(){this.onFail.dispose(),this.onSuccess.dispose(),super.destroy()}configure(k){const B=k.findComponentInChildren(H.U);(0,j.v)(!!B,"Missing CloseBooleanDialog component"),B.openDialog=this}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onFail",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onSuccess",void 0),V=(0,F.Cg)([(0,G.EVk)("ConfigureBooleanDialogPrefab",$.Y.uiDialog)],V)},46361:(k,B,U)=>{"use strict";U.d(B,{S:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(68152),H=U(28152),V=U(4035);let W=class extends G.uAl{constructor(){super(...arguments),this.onFail=new G.HN0,this.onSuccess=new G.HN0}destroy(){this.onFail.dispose(),this.onSuccess.dispose(),super.destroy()}open(){const k=j.q.instance.prodigy.open.prefabMenu(this._prefabID);return k.onPrefabLoaded.addOnce((k=>{const B=k.findComponentInChildren(V.U);(0,$.v)(!!B,"Missing CloseBooleanDialog component"),B.openDialog=this})),k}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_prefabID",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],W.prototype,"onFail",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],W.prototype,"onSuccess",void 0),W=(0,F.Cg)([(0,G.EVk)("OpenBooleanDialogPrefab",H.Y.uiDialog)],W)},6476:(k,B,U)=>{"use strict";U.d(B,{T:()=>V});var F=U(8674),G=U(62459),j=U(92579),$=U(35120),H=U(28152);let V=class extends G.uAl{open(){this.IsActiveInHierarchy&&$.q.instance.prodigy.open.card(this._playerData.player,!0,j.a.available)}};(0,F.Cg)([(0,G.Cdj)("377-3e7b"),(0,F.Sn)("design:type",Object)],V.prototype,"_playerData",void 0),V=(0,F.Cg)([(0,G.EVk)("OpenPlayerCard",H.Y.uiDialog)],V)},34398:(k,B,U)=>{"use strict";U.d(B,{l:()=>$});var F=U(8674),G=U(62459),j=U(35120);class $ extends G.uAl{constructor(){super(...arguments),this.onClose=new G.HN0,this.onOpen=new G.HN0}open(){return(0,F.sH)(this,void 0,void 0,(function*(){this.onOpen.dispatch()}))}onFirstPopup(){}create(){super.create(),this.onOpen.add(this.onOpenCallback,this),this.onClose.add(this.onCloseCallback,this)}onOpenCallback(){const k=j.q.instance.prodigy.world.getCurrentZoneObject();null==k||k.togglePetsInZoneButtonVisibility(!1)}onCloseCallback(){const k=j.q.instance.prodigy.world.getCurrentZoneObject();null==k||k.togglePetsInZoneButtonVisibility(!0)}destroy(){this.onClose.dispose(),this.onOpen.dispose(),super.destroy()}}(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onClose",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onOpen",void 0)},22866:(k,B,U)=>{"use strict";U.d(B,{l:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._onClosed=new G.HN0,this.onOpen=new G.HN0,this._isModal=!0,this._skipTransparency=!1,this._skipStopPlayer=!1,this._createContainer=!0,this._obeyMenuStackVisibility=!1}get prefabMenu(){return this._prefabMenu}destroy(){this.onOpen.dispose(),this._onClosed.dispose(),this._prefabMenu=null,super.destroy()}open(){var k;this._prefabMenu=j.q.instance.prodigy.open.prefabMenu(null!==(k=this._prefabGuid)&&void 0!==k?k:this._prefabID,(()=>{this._onClosed.dispatch()}),!0,this._isModal,this._skipTransparency,this._injectablePropertiesDictionary,void 0,void 0,void 0,void 0,this._obeyMenuStackVisibility),this._prefabMenu.createContainer=this._createContainer,this._prefabMenu.skipStopPlayer=this._skipStopPlayer,this._prefabMenu.onPrefabLoaded.addOnce((k=>{this.onOpen.dispatch(k)}))}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_prefabID",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"_prefabGuid",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"_onClosed",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onOpen",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_isModal",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_skipTransparency",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_skipStopPlayer",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_createContainer",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],H.prototype,"_injectablePropertiesDictionary",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_obeyMenuStackVisibility",void 0),H=(0,F.Cg)([(0,G.EVk)("OpenPrefabMenu",$.Y.uiDialog)],H)},85056:(k,B,U)=>{"use strict";U.d(B,{k:()=>W});var F=U(8674),G=U(62459),j=U(98252),$=U(35120),H=U(28152),V=U(34398);const W="lastReviewPopupVersion";let q=class extends V.l{canOpen(){return(0,F.sH)(this,void 0,void 0,(function*(){if(j.pF.appType()!==j.uC.NATIVE_APP)return!1;const k=j.pF.getNativeAppVersion(),B=window.localStorage.getItem(W);if(!k||k===B)return!1;const U=this._loggedInPlayer.player;return!(!U.justLeveled||!this._featureRequirements.meetsRequirementsDeprecated(14))&&(U.justLeveled=!1,window.localStorage.setItem(W,k),!0)}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,F.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),$.q.instance.prodigy.open.rating((()=>{this.onClose.dispatch()}))}))}};(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",Object)],q.prototype,"_loggedInPlayer",void 0),(0,F.Cg)([(0,G.Cdj)("db5-fb6e"),(0,F.Sn)("design:type",Object)],q.prototype,"_featureRequirements",void 0),q=(0,F.Cg)([(0,G.EVk)("OpenRatingPopup",H.Y.uiPopup)],q)},99617:(k,B,U)=>{"use strict";U.d(B,{I:()=>z});var F=U(8674),G=U(62459),j=U(35120),$=U(41674),H=U(64353),V=U(95057),W=U(47255),q=U(28152),K=U(34398);let z=class extends K.l{constructor(){super(...arguments),this._forwardedInjectionIdentifiers=[],this._funnelName=W.o.FunnelClickHUDButton,this._funnelStage=W.o.StageClickCTA,this._sendFunnelStart=!1,this.onRulesetSuccess=new G.HN0,this.onRulesetFail=new G.HN0}canOpen(){return(0,F.sH)(this,void 0,void 0,(function*(){return G.Aq$.isDefined(H.P.evaluateUnifiedConversionFlowRules(this._funnelName))}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,F.sH)(this,arguments,void 0,(function*(B={}){yield k.open.call(this),(yield this.canOpen())?(this._sendFunnelStart&&j.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({adType:V.R.UnifiedConversionFlow,adVersion:H.P.getAdVersion(this._funnelName),category:"currency",contentId:this._funnelStartTriggerContent,type:"magicoin_currency_button"}),j.q.instance.prodigy.open.unifiedConversionFlow(this.onPromptClosed.bind(this),{conversionFunnelName:this._funnelName,conversionStage:this._funnelStage},{id:this._analyticSource,type:this._analyticSourceType},this.getInjectableValues(B)),this.onRulesetSuccess.dispatch()):this.onRulesetFail.dispatch()}))}onPromptClosed(){var k;null===(k=this.onClose)||void 0===k||k.dispatch()}destroy(){this.onRulesetFail.dispose(),this.onRulesetSuccess.dispose(),super.destroy()}getInjectableValues(k={}){const B=Object.assign({},k);return this._forwardedInjectionIdentifiers.forEach((k=>{B[k]=this.getInjectedValue(k)})),B}};(0,F.Cg)([(0,G.SZi)(),(0,G.W_S)(),(0,F.Sn)("design:type",Array)],z.prototype,"_forwardedInjectionIdentifiers",void 0),(0,F.Cg)([(0,G.gfw)(W.o),(0,F.Sn)("design:type",String)],z.prototype,"_funnelName",void 0),(0,F.Cg)([(0,G.gfw)(W.o),(0,F.Sn)("design:type",String)],z.prototype,"_funnelStage",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],z.prototype,"_analyticSource",void 0),(0,F.Cg)([(0,G.gfw)($.$N),(0,F.Sn)("design:type",String)],z.prototype,"_analyticSourceType",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],z.prototype,"_sendFunnelStart",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],z.prototype,"_funnelStartTriggerContent",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],z.prototype,"onRulesetSuccess",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],z.prototype,"onRulesetFail",void 0),z=(0,F.Cg)([(0,G.EVk)("OpenUnifiedConversionFlow",q.Y.uiPopup)],z)},24981:(k,B,U)=>{"use strict";U.d(B,{S:()=>K});var F,G=U(8674),j=U(62459),$=U(99625),H=U(35120),V=U(41012),W=U(28152),q=U(34398);let K=F=class extends q.l{static get openedThisSession(){return F._openedThisSession}canOpen(){return(0,G.sH)(this,void 0,void 0,(function*(){return V.e.canAutoSurfaceWizardWatch()}))}open(){const k=Object.create(null,{open:{get:()=>super.open}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.open.call(this),F._openedThisSession=!0,this._loggedInPlayer.player.data.wwCooldownTime=Date.now();H.q.instance.prodigy.open.socialFeed((()=>{H.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID($.l.PushNotificationPermission).catch((k=>{j.VyI.log("Error loading push notification permission prefab",j.$bb.Error)})),this.onClose.dispatch()}),"from-login")}))}};K._openedThisSession=!1,(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],K.prototype,"_loggedInPlayer",void 0),K=F=(0,G.Cg)([(0,j.EVk)("OpenWizardWatchPopup",W.Y.uiPopup)],K)},95383:(k,B,U)=>{"use strict";U.d(B,{Y:()=>q});var F=U(8674),G=U(62459),j=U(35120),$=U(34829),H=U(28152),V=U(73797),W=U(34398);let q=class extends G.uAl{constructor(){super(...arguments),this.onPopupClosed=new G.HN0,this.onNoPopupAvailable=new G.HN0,this._openPopupsOnCreate=!1,this._popups=[],this._currentPopup=null,this._isFirstPopup=!0,this._popupDelayPromises=[],this._popupsProcessed=!1}get popupsProcessed(){return this._popupsProcessed}postCreate(){super.postCreate(),this._openPopupsOnCreate&&Promise.all(this._popupDelayPromises).catch((()=>{G.VyI.log("Popups have been suppressed",G.$bb.Verbose)})).then((()=>(0,F.sH)(this,void 0,void 0,(function*(){var k,B;null===(B=null===(k=this.gameObject)||void 0===k?void 0:k.isDestroyed)||void 0===B||B||(yield this.openNextPopup())})))).catch(G.RQr.createHandler("Error showing popups"))}destroy(){this._popupDelayPromises.length=0;const k=j.q.instance.prodigy.world.getCurrentZoneObject();null==k||k.destroyPetsInZoneButton(),j.q.instance.prodigy.notifications.clearNotifications(),this.onPopupClosed.dispose(),this.onNoPopupAvailable.dispose(),super.destroy()}openNextPopup(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this._isFirstPopup){this._isFirstPopup=!1;for(const B of this._popups)try{B.onFirstPopup()}catch(k){G.RQr.logError(k,"Error in onFirstPopup")}}if(this.Active&&$.A.get("GameConstants.Debug.POPUPS_ENABLED")&&!j.q.instance.prodigy.notifications.isPaused())try{let k;j.q.instance.game.input.enabled=!1;for(const B of this._popups){if(yield B.canOpen()){k=B;break}}k?(this._currentPopup=k,this._currentPopup.onClose.addOnce((()=>{this._currentPopup=null,this.onPopupClosed.dispatch(),j.q.instance.game.broadcaster.broadcast(V.Y1.CheckForHUDAttention),this._popupsProcessed=!0})),yield k.open()):(this.onNoPopupAvailable.dispatch(),j.q.instance.game.broadcaster.broadcast(V.Y1.CheckForHUDAttention),this._popupsProcessed=!0)}finally{j.q.instance.game.input.enabled=!0}}))}isShowingPopup(){return null!==this._currentPopup}delayPopupsUntil(k){this._popupDelayPromises.push(k)}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],q.prototype,"onPopupClosed",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],q.prototype,"onNoPopupAvailable",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],q.prototype,"_openPopupsOnCreate",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(W.l),(0,F.Sn)("design:type",Array)],q.prototype,"_popups",void 0),q=(0,F.Cg)([(0,G.EVk)("PopupPriorityHandler",H.Y.uiPopup)],q)},71134:(k,B,U)=>{"use strict";U.d(B,{l:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(76642);let H=class extends G.uAl{constructor(){super(...arguments),this._onCloseAnimationFinished=new G.HN0,this._onClose=new G.HN0}get onClose(){return this._onClose}close(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;this._closeAnimationSignal.run(),null===(k=this._disableInputSignal)||void 0===k||k.run(),yield this._onCloseAnimationFinished.asPromise(),this._onClose.dispatch()}))}markCloseAnimationAsFinished(){this._onCloseAnimationFinished.dispatch()}destroy(){this._onClose.dispose(),this._onCloseAnimationFinished.dispose(),super.destroy()}};(0,F.Cg)([(0,G.MnK)($.S),(0,F.Sn)("design:type",$.S)],H.prototype,"_closeAnimationSignal",void 0),(0,F.Cg)([(0,G.MnK)($.S),(0,F.Sn)("design:type",$.S)],H.prototype,"_disableInputSignal",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"_onCloseAnimationFinished",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"_onClose",void 0),H=(0,F.Cg)([(0,G.EVk)("PrefabModalComponent",j.Y.uiDialog)],H)},93963:(k,B,U)=>{"use strict";U.d(B,{b:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this._customDataComponents=[]}sendEvent(){}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],$.prototype,"type",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],$.prototype,"name",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",Number)],$.prototype,"id",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],$.prototype,"value",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],$.prototype,"_custom",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(G.uAl),(0,F.Sn)("design:type",Array)],$.prototype,"_customDataComponents",void 0),$=(0,F.Cg)([(0,G.EVk)("SendGameCompleteEvent",j.Y.analytics)],$)},5822:(k,B,U)=>{"use strict";U.d(B,{u:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this._customDataComponents=[]}sendEvent(){}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],$.prototype,"eventType",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],$.prototype,"type",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],$.prototype,"subtype",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],$.prototype,"value",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],$.prototype,"custom",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(G.uAl),(0,F.Sn)("design:type",Array)],$.prototype,"_customDataComponents",void 0),$=(0,F.Cg)([(0,G.EVk)("SendGameDiscoveryEvent",j.Y.analytics)],$)},61840:(k,B,U)=>{"use strict";U.d(B,{C:()=>H});var F=U(8674),G=U(62459),j=U(95946),$=U(28152);let H=class extends G.uAl{get type(){return this._type}};(0,F.Cg)([(0,G.gfw)(j.a),(0,F.Sn)("design:type",String)],H.prototype,"_type",void 0),H=(0,F.Cg)([(0,G.EVk)("ElementType",$.Y.uiPet)],H)},52894:(k,B,U)=>{"use strict";U.d(B,{u:()=>K});var F=U(8674),G=U(62459),j=U(49237),$=U(35120),H=U(63834),V=U(94236),W=U(53661),q=U(28152);let K=class extends G.uAl{constructor(){super(...arguments),this.onMenuClose=new G.HN0}destroy(){this.onMenuClose.dispose(),super.destroy()}openEvolutionMenu(){V.K.openEvolutionPromptIfEligible(new H.r($.q.instance.prodigy.game,this.creatureDataSchema)).then((k=>{k&&(this.evolveButton.inputEnabled=!0,this.onMenuClose.dispatch())})).catch(G.RQr.createHandler("Failed to open evolution prompt"))}};(0,F.Cg)([(0,G.Cdj)(W.hi.YourPetPanelPetData),(0,F.Sn)("design:type",Object)],K.prototype,"creatureDataSchema",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],K.prototype,"evolveButton",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],K.prototype,"onMenuClose",void 0),K=(0,F.Cg)([(0,G.EVk)("OpenEvolutionMenu",q.Y.uiPet,"A component that allows for the evolution menu to be opened for a given pet")],K)},51790:(k,B,U)=>{"use strict";U.d(B,{s:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(61840);let H=class extends G.uAl{constructor(){super(...arguments),this._elementalGraphic=[]}setElementalBanner(k){this._elementalGraphic.forEach((B=>{B.GameObject.active=B.type===k}))}};(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)($.C),(0,F.Sn)("design:type",Array)],H.prototype,"_elementalGraphic",void 0),H=(0,F.Cg)([(0,G.EVk)("PetElementalGraphic",j.Y.uiPet)],H)},79512:(k,B,U)=>{"use strict";U.d(B,{o:()=>Q});var F,G=U(8674),j=U(62459),$=U(56942),H=U(35120),V=U(63834),W=U(97518),q=U(22023),K=U(28152),z=U(29834),Y=U(51790);let Q=F=class extends j.uAl{init(k){var B,U;this.loadPet(k),this.setElementIcon(null===(B=null==k?void 0:k.data)||void 0===B?void 0:B.element),this._petName.text=null===(U=null==k?void 0:k.data)||void 0===U?void 0:U.name;const G=q.P8.GetEvolutionaryLine(k);this._petEvolutionIndex.setLocalizationKey(F.EVOLUTION_INDEX_TEXT),this._petEvolutionIndex.setTextArguments(this.getEvolutionIndex(k.ID,G))}loadPet(k){var B,U;const F=null===(U=null===(B=null==k?void 0:k.metadata)||void 0===B?void 0:B.assets)||void 0===U?void 0:U.default;if(F)if("spritesheet"===F.type){H.q.instance.prodigy.create.monster(this._petSpine.getRootContainer(),new V.r(H.q.instance.game,{ID:k.ID,level:1}),2,0,0).startLoad()}else{const k=(null==F?void 0:F.assetKey)?$.Q[F.assetKey]:`spine-${null==F?void 0:F.ID}`;H.q.instance.prodigy.load.assets([k],this.setAnimation.bind(this,k))}else j.VyI.log(`[PetEvolutionDisplayComponent] Pet ${null==k?void 0:k.ID} does not have a default value or an assetKey configured to it`,j.$bb.Error)}setAnimation(k){this._petSpine.setAsset(k,(()=>{this._petSpineAnimator.playAnimation(F.DEFAULT_ANIMATION,!0)}))}setElementIcon(k){this._petElementIcon.setElementalBanner(k)}getEvolutionIndex(k,B){return B.findIndex((B=>B===k))+1}};Q.DEFAULT_ANIMATION="idle",Q.EVOLUTION_INDEX_TEXT="EVOLUTION_INDEX_TEXT",(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],Q.prototype,"_petSpine",void 0),(0,G.Cg)([(0,j.MnK)(z.j),(0,G.Sn)("design:type",z.j)],Q.prototype,"_petSpineAnimator",void 0),(0,G.Cg)([(0,j.MnK)(Y.s),(0,G.Sn)("design:type",Y.s)],Q.prototype,"_petElementIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Q.prototype,"_petName",void 0),(0,G.Cg)([(0,j.MnK)(W.R),(0,G.Sn)("design:type",W.R)],Q.prototype,"_petEvolutionIndex",void 0),Q=F=(0,G.Cg)([(0,j.EVk)("PetEvolutionDisplay",K.Y.uiPet)],Q)},80711:(k,B,U)=>{"use strict";U.d(B,{l:()=>pt});var F,G,j=U(8674),$=U(62459),H=U(62248),V=U(93893),W=U(90633),q=U(65240),K=U(66582),z=U(76277),Y=U(77938),Q=U(35120),X=U(49237),Z=U(1195),J=U(43754),tt=U(65050),et=U(96810),it=U(41674),st=U(13956),nt=U(95057),at=U(97518),rt=U(53661),ot=U(22023),ht=U(44094),ct=U(30226),dt=U(28152),lt=U(99617),ut=U(51790),ft=U(79512),bt=U(9853);!function(k){k[k.PET_EVOLUTION=0]="PET_EVOLUTION",k[k.GIFT_EVOLUTION=1]="GIFT_EVOLUTION"}(G||(G={}));let pt=F=class extends $.uAl{constructor(){super(...arguments),this._interfaceName="new_evolution_window",this._menuType=G.PET_EVOLUTION,this._isEvolving=!1,this._openingInsufficientResourcesModal=!1}init(k,B){var U,j,V;if(this._currentPetCreatureData=k,this._currentPetItem=Y.t.getItem("pet",k.getID()),this._evolutionPetItem=ot.P8.findNextEvolution(this._currentPetItem),this._evolutionSource=B,!this._currentPetItem||!this._evolutionPetItem)return void $.VyI.log(`[PetEvolutionMenuComponent] Creature id ${k.getID()} is not valid`,$.$bb.Error);null===(U=this._currentPetDisplay)||void 0===U||U.init(this._currentPetItem),null===(j=this._evolutionPetDisplay)||void 0===j||j.init(this._evolutionPetItem),null===(V=this._elementBanner)||void 0===V||V.setElementalBanner(this._currentPetItem.data.element);const q=Q.q.instance.prodigy.gameContainer.get("e20-0fb0").player,z=Q.q.instance.prodigy.gameContainer.get("e20-0fb0").isMember();if(this._menuType!==G.GIFT_EVOLUTION||z)this._evolveText&&(this._evolveText.GameObject.active=!1);else{const k=!Q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(W.B.FEATURE_PET_EVOLUTION,W.B.BREADCRUMB_NONMEMBER_FIRST_PET_EVOLUTION);this._evolveText.setLocalizationKey(k?F.FREE_EVOLUTION_TEXT_KEY:F.FREE_EVOLUTION_UNAVAILABLE_TEXT_KEY),this._evolveText.setTextArguments(this._currentPetItem.data.name)}this._segment.featureCommon.sendInterfaceEvent({interfaceName:this._interfaceName,interfaceType:it.Wm.Window,originType:it.$N.ButtonClick,instanceType:tt.N.UI,eventName:"interface_opened"},{evolution_source:this._evolutionSource}),this._timeOpened=Date.now();const X=this._hardCurrency.petAcquisitionCost(this._currentPetCreatureData.data.ID,H.l6.Evolution),Z=this._hardCurrency.canAfford(X),J=q.getMemberTier();(Z||J===K._$.MemberUltra)&&this.sendHardCurrencyFunnelEvent(et.l.PetHardCurrencyImpression)}startEvolutionFromMembershipPurchase(){return(0,j.sH)(this,void 0,void 0,(function*(){if(this._isEvolving)return;this._isEvolving=!0;const k=ht.$.generateUID(),B=this._currentPetCreatureData.data.uniqueID;(0,z.G)(V.v)&&(this._secureTransaction=this._segment.item.beginSecureItemTransaction(),yield this._evolutionSequence.evolvePet(this._currentPetCreatureData,!0)),yield this.triggerEvolutionFlow(k,B)}))}startEvolution(){return(0,j.sH)(this,void 0,void 0,(function*(){if(this._isEvolving)return;this._isEvolving=!0;const k=ht.$.generateUID(),B=this._currentPetCreatureData.data.uniqueID;try{if((0,z.G)(V.v))this._secureTransaction=this._segment.item.beginSecureItemTransaction(),yield this._evolutionSequence.evolvePet(this._currentPetCreatureData,!1);else{const U=this._hardCurrency.petAcquisitionCost(this._currentPetCreatureData.data.ID,H.l6.Evolution);yield this._hardCurrency.spend(U,{sink_type:q.C.PetEvolution,sink_id:B,transaction_id:k})}}catch(U){return $.RQr.logError(U,"Attempted to evolve pet with no funds"),void this._evolutionSequence.completeSequence(B)}yield this.triggerEvolutionFlow(k,B)}))}triggerEvolutionFlow(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){const U=this._currentPetCreatureData.getLevel(),F=this._currentPetCreatureData.team,G=this._currentPetCreatureData.getName();(0,z.G)(V.v)?(this._secureTransaction.flush({sink_type:q.C.PetEvolution,sink_id:B,transaction_id:k}),this.updatePlayerDataAfterEvolution(U,G,F)):(this._segment.item.sendItemRemovedEvent(this._currentPetItem.ID,this._currentPetItem.name,this._currentPetItem.type,1,{sink_type:q.C.PetEvolution,sink_id:B,transaction_id:k}),this._segment.item.sendItemReceivedEvent(this._evolutionPetItem.ID,this._evolutionPetItem.name,this._evolutionPetItem.type,1,{source_type:q.C.PetEvolution,source_id:B,transaction_id:k}),yield this._evolutionSequence.evolvePet(this._currentPetCreatureData),this.updatePlayerDataAfterEvolution(U,G,F)),this._segment.playerProgression.sendPetEvolvedEvent({petName:this._evolutionPetItem.data.name,petLevel:U,petRank:ot.P8.getPetDisplayMergeRank(this._currentPetCreatureData.data.ID,B),petOldName:G,petType:ot.P8.getPetEvolutionType(this._evolutionPetItem.ID),evolutionSource:this._evolutionSource},{transaction_id:k})}))}updatePlayerDataAfterEvolution(k,B,U){this._loggedInPlayer.player.forceSaveCharacter(),this.sendHardCurrencyFunnelEvent(et.l.PetHardCurrencyTransactionComplete),this._isEvolving=!1,$.Aq$.isDefined(U)&&this._segment.featureCommon.sendTeamUpdatedEvent(this._evolutionPetItem.data.name,B,{pet_added_level:k,pet_added_rank:ot.P8.getPetDisplayMergeRank(this._evolutionPetItem.data.ID,this._currentPetCreatureData.data.uniqueID)})}sendEvolutionIntention(){this.sendHardCurrencyFunnelEvent(et.l.PetHardCurrencyIntention);const k=this._hardCurrency.petAcquisitionCost(this._currentPetCreatureData.data.ID,H.l6.Evolution);this._hardCurrency.canAfford(k)||this._segment.item.sendInsufficientCurrencyEvent(k,{sink_type:q.C.PetEvolution,sink_id:this._currentPetCreatureData.data.ID})}sendPopupClosedEvent(k){this._segment.featureCommon.sendInterfaceEvent({interfaceName:this._interfaceName,interfaceType:it.Wm.Window,originType:it.$N.ButtonClick,instanceType:tt.N.UI,eventName:"interface_closed",closeMethod:k},{durationSeconds:(Date.now()-this._timeOpened)/1e3,evolution_source:this._evolutionSource})}sendPetEvolutionCancelledEvent(){this._segment.playerProgression.sendPetEvolutionCancelledEvent({petName:this._currentPetCreatureData.getName(),petLevel:this._currentPetCreatureData.getLevel(),petElement:this._currentPetCreatureData.getElement(),petRank:ot.P8.getPetDisplayMergeRank(this._currentPetCreatureData.data.ID,this._currentPetCreatureData.data.uniqueID),evolutionSource:this._evolutionSource})}sendPurchaseFunnelStartEvent(){const k=ct.J.showYouTubeMembershipAd(Q.q.instance.prodigy.game,!0)?nt.R.Video:nt.R.Static;this._segment.purchase.sendFunnelStart({type:"Pet-Evolution-Member-Lock",category:"Pet",contentId:`pet-${this._currentPetCreatureData.getID()}`,adType:k})}sendHardCurrencyFunnelEvent(k){this._segment.playerProgression.sendPetHardCurrencyFunnelAdvancedEventIfApplicable(H.l6.Evolution,k,this._currentPetItem.ID)}handleInsufficientCurrency(){if(this._openingInsufficientResourcesModal)return;const k=this._hardCurrency.petAcquisitionCost(this._currentPetCreatureData.data.ID,H.l6.Evolution);if(this._loggedInPlayer.player.isPlayingAtSchool())this.showMessageBox();else if($.Aq$.isDefined(this.openUnifiedConversionFlowComponent)){this.openUnifiedConversionFlowComponent.onRulesetFail.addOnce((()=>{this.showDefaultInsufficientPopup(),this.openUnifiedConversionFlowComponent.onRulesetSuccess.removeAll(this)}),this),this.openUnifiedConversionFlowComponent.onRulesetSuccess.addOnce((()=>{this.openUnifiedConversionFlowComponent.onRulesetFail.removeAll(this)}));const B=this._hardCurrency.getBalance(k.currency);this._openingInsufficientResourcesModal=!0,this.openUnifiedConversionFlowComponent.open({[rt.FK.OtpMissingMagicoin]:k.value-B}).catch($.RQr.createHandler("PetEvolutionMenuComponent: Error opening unified conversion flow")).finally((()=>{this._openingInsufficientResourcesModal=!1}))}else this.showDefaultInsufficientPopup()}showDefaultInsufficientPopup(){this._openingInsufficientResourcesModal=!0,Q.q.instance.prodigy.open.message(this._baseLocalizer.getText("YOU_DONT_HAVE_ENOUGH_MAGICOIN"),(()=>{this._openingInsufficientResourcesModal=!1}))}showMessageBox(){$.Aq$.isDefined(this.messageBox)?this.messageBox.active=!0:this.showDefaultInsufficientPopup()}hideMessageBox(){$.Aq$.isDefined(this.messageBox)&&(this.messageBox.active=!1)}showLegacyInsufficientResourcesModal(){$.Aq$.isDefined(this.insufficientResourcesModal)&&(this.insufficientResourcesModal.active=!0)}};pt.FREE_EVOLUTION_TEXT_KEY="USE_FREE_EVOLUTION_TEXT",pt.FREE_EVOLUTION_UNAVAILABLE_TEXT_KEY="ALREADY_USED_FREE_EVOLUTION_TEXT",(0,j.Cg)([(0,st.b)("c47-20b6"),(0,j.Sn)("design:type",Function)],pt.prototype,"_segment",void 0),(0,j.Cg)([(0,st.b)("e20-0fb0"),(0,j.Sn)("design:type",Z.E)],pt.prototype,"_loggedInPlayer",void 0),(0,j.Cg)([(0,$.gfw)(G),(0,j.Sn)("design:type",Number)],pt.prototype,"_menuType",void 0),(0,j.Cg)([(0,$.MnK)(ft.o),(0,j.Sn)("design:type",ft.o)],pt.prototype,"_currentPetDisplay",void 0),(0,j.Cg)([(0,$.MnK)(ft.o),(0,j.Sn)("design:type",ft.o)],pt.prototype,"_evolutionPetDisplay",void 0),(0,j.Cg)([(0,$.MnK)(ut.s),(0,j.Sn)("design:type",ut.s)],pt.prototype,"_elementBanner",void 0),(0,j.Cg)([(0,$.MnK)(at.R),(0,j.Sn)("design:type",at.R)],pt.prototype,"_evolveText",void 0),(0,j.Cg)([(0,$.MnK)(bt.d),(0,j.Sn)("design:type",bt.d)],pt.prototype,"_evolutionSequence",void 0),(0,j.Cg)([(0,$.MnK)(lt.I),(0,j.Sn)("design:type",lt.I)],pt.prototype,"openUnifiedConversionFlowComponent",void 0),(0,j.Cg)([(0,$.ERr)(),(0,j.Sn)("design:type",$._mx)],pt.prototype,"messageBox",void 0),(0,j.Cg)([(0,$.ERr)(),(0,j.Sn)("design:type",$._mx)],pt.prototype,"insufficientResourcesModal",void 0),(0,j.Cg)([(0,st.b)("5c7-e02d"),(0,j.Sn)("design:type",J.W)],pt.prototype,"_hardCurrency",void 0),(0,j.Cg)([(0,$.Cdj)($.$Bt.LocalizationService),(0,j.Sn)("design:type",$.dTp)],pt.prototype,"_baseLocalizer",void 0),(0,j.Cg)([(0,$.MnK)(X.$),(0,j.Sn)("design:type",X.$)],pt.prototype,"skipButton",void 0),pt=F=(0,j.Cg)([(0,$.EVk)("PetEvolutionMenu",dt.Y.uiPet)],pt)},9853:(k,B,U)=>{"use strict";U.d(B,{d:()=>at});var F,G=U(8674),j=U(62459),$=U(56942),H=U(62886),V=U(60157),W=U(65240),q=U(35120),K=U(77938),z=U(63834),Y=U(73797),Q=U(97518),X=U(22023),Z=U(28152),J=U(55741),tt=U(29834),et=U(76277),it=U(58182),st=U(99625),nt=U(39674);let at=F=class extends j.uAl{constructor(){super(...arguments),this.onSequenceStarted=new j.HN0,this.onSequenceComplete=new j.HN0}evolvePet(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=!1){const U=k.getAllEvolutions()[0],F=(null==U?void 0:U.evolveID)?U.evolveID:U.e,G=K.t.getItem("pet",k.getID()),$=X.P8.findNextEvolution(G);G&&$?(this.loadPet(G,this._petCurrentSpine,this._petCurrentAnimator),this.loadPet($,this._petEvoSpine,this._petEvoAnimator),this._evolutionCompletedText.setTextArguments(G.data.name,$.data.name),this._currentPetNameText.text=G.data.name,this._evoPetNameText.text=$.data.name,yield k.evolve(F,B),this.sendQuestEvolveEvent(G),this.playSequence(k.data.uniqueID,$)):j.VyI.log(`[PetEvolutionSequenceComponent] Creature id ${k.getID()} is not valid`,j.$bb.Error)}))}playSequence(k,B){this.onSequenceStarted.dispatch(),this._spineBone.setup(),this._newSpineBone.setup(),this._evolutionSequenceAnimator.playAnimation("evolution",!1,!0),this._evolutionSequenceAnimator.spine.onEvent.add(((k,B)=>{B.data.name===F.CHANGE_EVENT&&(this._petCurrentSpine.GameObject.active=!1,this._petEvoSpine.GameObject.active=!0,this._newSpineBone.targetTransform=this._petEvoSpine.GameObject.transform,this._evolvingText.GameObject.active=!1,this._currentPetNameText.GameObject.active=!1,this._evoPetNameText.GameObject.active=!1,this._congratulatoryText.GameObject.active=!0,this._evolutionCompletedText.GameObject.active=!0),B.data.name===F.ATTACK_EVENT&&(this._petEvoAnimator.playAnimation(F.ATTACK_ANIMATION,!1),this._petEvoAnimator.OnAnimationComplete.addOnce((()=>{this._petEvoAnimator.playAnimation(F.IDLE_ANIMATION,!0)})))}));const U=(0,et.G)(it.N)?()=>this.openPetItemCard(k,B):()=>this.completeSequence(k);this._evolutionSequenceAnimator.OnAnimationComplete.addOnce(U)}openPetItemCard(k,B){const U=new nt.j;U.id=B.ID,U.level=1,U.name=B.data.name,this._petEvoAnimator.stopAnimation(),q.q.instance.prodigy.game.broadcaster.broadcast(Y.ig.EvolveEnd),q.q.instance.prodigy.open.prefabMenu(st.l.PetRescueCardSequence,(()=>{this.completeSequence(k)}),void 0,!1,!0,{PET_RESCUE_CREATURE_DATA:Object.assign(Object.assign({},U),{ID:B.ID})})}completeSequence(k){this._petEvoAnimator.stopAnimation(),q.q.instance.prodigy.game.broadcaster.broadcast(Y.ig.EvolveEnd,null,[k]),this.onSequenceComplete.dispatch()}loadPet(k,B,U){var G,H;const V=null===(H=null===(G=null==k?void 0:k.metadata)||void 0===G?void 0:G.assets)||void 0===H?void 0:H.default;if(V)if("spritesheet"===V.type){q.q.instance.prodigy.create.monster(B.getRootContainer(),new z.r(q.q.instance.game,{ID:k.ID,level:1}),2,0,0).startLoad()}else{const k=(null==V?void 0:V.assetKey)?$.Q[V.assetKey]:`spine-${null==V?void 0:V.ID}`;q.q.instance.prodigy.load.assets([k],(()=>{B.setAsset(k,(()=>{U.playAnimation(F.IDLE_ANIMATION,!0)}))}))}else j.VyI.log(`[PetEvolutionSequenceComponent] Pet ${null==k?void 0:k.ID} does not have a default value or an assetKey configured to it`,j.$bb.Error)}sendQuestEvolveEvent(k){const B={params:{taskEventType:V.Z7.Pet,rarity:k.data.rarity,itemType:"pet",source:W.C.PetEvolution,id:k.data.ID,element:k.data.affinity,level:k.data.level}};q.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(H.T.EVOLVE_PET,B).catch(j.RQr.createHandler("Error sending a quest event for evolving a pet"))}destroy(){this.onSequenceStarted.dispose(),this.onSequenceComplete.dispose(),super.destroy()}};at.ATTACK_ANIMATION="attack",at.IDLE_ANIMATION="idle",at.CHANGE_EVENT="pet-change",at.ATTACK_EVENT="attack-ani",(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],at.prototype,"_petCurrentSpine",void 0),(0,G.Cg)([(0,j.MnK)(tt.j),(0,G.Sn)("design:type",tt.j)],at.prototype,"_petCurrentAnimator",void 0),(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],at.prototype,"_petEvoSpine",void 0),(0,G.Cg)([(0,j.MnK)(tt.j),(0,G.Sn)("design:type",tt.j)],at.prototype,"_petEvoAnimator",void 0),(0,G.Cg)([(0,j.MnK)(tt.j),(0,G.Sn)("design:type",tt.j)],at.prototype,"_evolutionSequenceAnimator",void 0),(0,G.Cg)([(0,j.MnK)(J.l),(0,G.Sn)("design:type",J.l)],at.prototype,"_spineBone",void 0),(0,G.Cg)([(0,j.MnK)(J.l),(0,G.Sn)("design:type",J.l)],at.prototype,"_newSpineBone",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],at.prototype,"_currentPetNameText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],at.prototype,"_evoPetNameText",void 0),(0,G.Cg)([(0,j.MnK)(Q.R),(0,G.Sn)("design:type",Q.R)],at.prototype,"_evolvingText",void 0),(0,G.Cg)([(0,j.MnK)(Q.R),(0,G.Sn)("design:type",Q.R)],at.prototype,"_congratulatoryText",void 0),(0,G.Cg)([(0,j.MnK)(Q.R),(0,G.Sn)("design:type",Q.R)],at.prototype,"_evolutionCompletedText",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],at.prototype,"onSequenceStarted",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],at.prototype,"onSequenceComplete",void 0),at=F=(0,G.Cg)([(0,j.EVk)("PetEvolutionSequence",Z.Y.uiPet)],at)},78675:(k,B,U)=>{"use strict";U.d(B,{d:()=>q});var F=U(8674),G=U(62459),j=U(5491),$=U(9531),H=U(54950),V=U(28152),W=U(80573);let q=class extends G.uAl{constructor(){super(...arguments),this._onMonsterClicked=new G.HN0,this._enableInput=!0}destroy(){var k,B,U;null===(U=null===(B=null===(k=this.monsterAppearance)||void 0===k?void 0:k.input)||void 0===B?void 0:B.onClicked)||void 0===U||U.remove(this._onMonsterClicked.dispatch,this._onMonsterClicked),this._onMonsterClicked.dispose(),super.destroy()}spawn(k){this._spawnParent.children.forEach((k=>k.destroy())),this.monsterAppearance=this._prefabAppearanceLoader.loadHitboxAppearancePrefab(j.V.Pet,k,this._spawnParent).findComponentInChildren(W.n),this.monsterAppearance.input.InputEnabled=this._enableInput,this._alertFSM?(this.setAlertHeight(),this.monsterAppearance.onHitboxUpdate.add(this.setAlertHeight,this),this._alertFSM.animationController=this.monsterAppearance.animationController):G.VyI.log(`[SpawnMonsterAppearanceComponent]: No alert FSM component found for monster with ID ${k}`,G.$bb.Warning),this.monsterAppearance.animationController.changeState(0),this._enableInput&&this.monsterAppearance.input.onClicked.add(this._onMonsterClicked.dispatch,this._onMonsterClicked)}setAlertHeight(){const k=this._speechBubble.transform;k.setPosition(k.localPosition.x,this.monsterAppearance.input.GameObject.transform.localPosition.y)}};(0,F.Cg)([(0,G.Cdj)("b2a-9519"),(0,F.Sn)("design:type",H.S)],q.prototype,"_prefabAppearanceLoader",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],q.prototype,"_spawnParent",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],q.prototype,"_speechBubble",void 0),(0,F.Cg)([(0,G.MnK)($.K),(0,F.Sn)("design:type",$.K)],q.prototype,"_alertFSM",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],q.prototype,"_onMonsterClicked",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],q.prototype,"_enableInput",void 0),q=(0,F.Cg)([(0,G.EVk)("SpawnMonsterAppearance",V.Y.creature)],q)},93718:(k,B,U)=>{"use strict";U.d(B,{i:()=>V});var F=U(8674),G=U(62459),j=U(28152),$=U(34603),H=U(63398);let V=class extends H.k{constructor(){super(...arguments),this._atlasKey=null}set AtlasKey(k){this._atlasKey=k}updateFrameName(k){const B=this.GameObject.findComponent($._);null!==B&&B.setFrameName(`${this._atlasKey}/${this.animationName}/${this.AnimationTargetKey}-${k}`)}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],V.prototype,"_atlasKey",void 0),V=(0,F.Cg)([(0,G.EVk)("BuddyKeyFrameAnimator",j.Y.creatureAnimation)],V)},80573:(k,B,U)=>{"use strict";U.d(B,{n:()=>W});var F=U(8674),G=U(62459),j=U(77938),$=U(92591),H=U(28152),V=U(35084);let W=class extends G.uAl{constructor(){super(...arguments),this.onHitboxUpdate=new G.HN0,this._type=null,this._id=null}get input(){return this._inputOverlay}setData(k,B){this._type=k,this._id=B,this.updateInputSize()}updateInputSize(){var k,B,U,F;if(this._type&&G.Aq$.isDefined(this._id)){const $=j.t.getItem(this._type,this._id),H=$.metadata.assets?$.metadata.assets[this._assetKey]:null,V=null==H?void 0:H.hitbox,W=this.appearanceRenderComponent.getDimensions();this._inputOverlay.setSize(null!==(k=null==V?void 0:V.width)&&void 0!==k?k:W.width,null!==(B=null==V?void 0:V.height)&&void 0!==B?B:W.height),G.Aq$.isDefined(null==V?void 0:V.x)&&G.Aq$.isDefined(null==V?void 0:V.y)?this._inputOverlay.GameObject.transform.setPosition(V.x,V.y):this._inputOverlay.GameObject.transform.setPosition(.5*-this._inputOverlay.width+(null!==(U=null==V?void 0:V.xOffset)&&void 0!==U?U:0),-this._inputOverlay.height+(null!==(F=null==V?void 0:V.yOffset)&&void 0!==F?F:0)),this.onHitboxUpdate.dispatch()}}destroy(){this.onHitboxUpdate.dispose(),super.destroy()}};(0,F.Cg)([(0,G.MnK)(G.y4o),(0,F.Sn)("design:type",G.y4o)],W.prototype,"appearanceRenderComponent",void 0),(0,F.Cg)([(0,G.MnK)($.K),(0,F.Sn)("design:type",$.K)],W.prototype,"animationController",void 0),(0,F.Cg)([(0,G.MnK)(V.n),(0,F.Sn)("design:type",V.n)],W.prototype,"_inputOverlay",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],W.prototype,"_assetKey",void 0),W=(0,F.Cg)([(0,G.EVk)("DynamicAppearance",H.Y.creature)],W)},23891:(k,B,U)=>{"use strict";U.d(B,{f:()=>Y});var F=U(8674),G=U(62459),j=U(99625),$=U(62886),H=U(65240),V=U(35120),W=U(77938),q=U(47728),K=U(30226),z=U(28152);let Y=class extends G.uAl{constructor(){super(...arguments),this._isFake=!1,this._noDialogue=!1,this.awardSilently=!1,this._showPetsInPetCardFormat=!1,this._shouldSendQuestEvent=!0,this._customSegmentMetadata={},this._useFestivalContext=!1,this.additionalDialogueIds={},this._items=[],this.onItemAwarded=new G.HN0,this.onComplete=new G.HN0,this._shouldRefreshMultiplayer=!1}set showPetsInPetCardFormat(k){this._showPetsInPetCardFormat=k}set sourceType(k){this._sourceType=k}get customSegmentMetadata(){return this._customSegmentMetadata}set customSegmentMetadata(k){this._customSegmentMetadata=k}get singleItemData(){return this._itemType&&this._itemID?W.t.getItem(this._itemType,this._itemID):null}create(){super.create(),G.Aq$.isDefined(this._itemType)&&G.Aq$.isDefined(this._itemID)&&(this._items=[{type:this._itemType,ID:this._itemID,N:this._itemQuantity}])}destroy(){this.onItemAwarded.dispose(),this.onComplete.dispose(),super.destroy()}setItemRewardAsFake(){this._isFake=!0}awardItem(){var k;if(this._sourceType&&(this._customSegmentMetadata.source_type=this._sourceType),this._useFestivalContext){const k=q.x.getFestivalSegmentContext();this._customSegmentMetadata.instance_type=k.instance_type,this._customSegmentMetadata.instance_id=k.instance_id}const B=null!==(k=this.getItemData())&&void 0!==k?k:[],U=this.getInjectedValue("a25-68f4");if(this._isFake)this._shouldSendQuestEvent&&U.sendQuestEventViaHub($.T.COLLECT_ITEM,{type:this._itemType,id:this._itemID,progress:this._loggedInPlayer.player.backpack.hasItem(this._itemType,this._itemID)}).catch(G.RQr.createHandler("[GotItemComponent] Error sending quest event."));else for(const F of B)this._loggedInPlayer.setSavingEnabled(!1),K.J.bagItemByType(F,V.q.instance.game,void 0,void 0,this._customSegmentMetadata),this._shouldSendQuestEvent?U.sendQuestEventViaHub($.T.COLLECT_ITEM,{type:this._itemType,id:this._itemID,progress:this._loggedInPlayer.player.backpack.hasItem(this._itemType,this._itemID)}).then((()=>{var k;null===(k=this._loggedInPlayer.player)||void 0===k||k.forceSaveCharacter(null,!0)})).catch(G.RQr.createHandler("[GotItemComponent] Error sending quest event.")).finally((()=>{this._loggedInPlayer.setSavingEnabled(!0)})):this._loggedInPlayer.player.forceSaveCharacter();this.awardSilently?this.complete():this.doAwardItemSequence(B).catch(G.RQr.createHandler("[GotItemComponent] Error awarding item.")),this.onItemAwarded.dispatch(this._itemType,this._itemID,this._itemQuantity)}doAwardItemSequence(){return(0,F.sH)(this,arguments,void 0,(function*(k=[]){const B=this._showPetsInPetCardFormat?k.filter((k=>"pet"!==k.type)):k;if(B.length>0&&(yield new Promise((k=>{this._gotItem=V.q.instance.prodigy.open.gotItem(B,k,!this._noDialogue,void 0,void 0,!0,this._customSegmentMetadata,this.additionalDialogueIds)}))),this._showPetsInPetCardFormat&&k.length>0){const B=k.filter((k=>"pet"===k.type)),U=B.length;let F=0;for(;F{var U,G,$;V.q.instance.prodigy.open.prefabMenu(j.l.PetRescueCardSequence,B,void 0,!1,!0,{PET_RESCUE_CREATURE_DATA:{ID:k.ID,level:null!==(G=null===(U=k.data)||void 0===U?void 0:U.level)&&void 0!==G?G:1,name:null!==($=null==F?void 0:F.name)&&void 0!==$?$:""}})})),$++}))}getItemData(){return this._items}setItem(k,B,U=1,F=!1){this._itemType=k,this._itemID=B,this._itemQuantity=U,this._isFake=F,this._items=[{type:this._itemType,ID:this._itemID,N:this._itemQuantity}]}addItem(k,B,U=1,F=!1){this._isFake=F,this._items.push({type:k,ID:B,N:U})}addItems(k,B=!1){this._isFake=B,this._items.push(...k)}clearItems(){this._items=[]}close(){var k;null===(k=this._gotItem)||void 0===k||k.close()}complete(){!this._isFake&&this._shouldRefreshMultiplayer&&(G.VyI.log("Forcing a reconnect to the multiplayer server",G.$bb.Verbose),V.q.instance.prodigy.gameContainer.get("c97-bd0d").refreshMultiplayer(),this._shouldRefreshMultiplayer=!1),this.onComplete.dispatch()}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],Y.prototype,"_itemType",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Y.prototype,"_itemID",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Y.prototype,"_itemQuantity",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_isFake",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_noDialogue",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"awardSilently",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_showPetsInPetCardFormat",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_shouldSendQuestEvent",void 0),(0,F.Cg)([(0,G.gfw)(H.C),(0,F.Sn)("design:type",String)],Y.prototype,"_sourceType",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],Y.prototype,"_customSegmentMetadata",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_useFestivalContext",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],Y.prototype,"additionalDialogueIds",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onItemAwarded",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onComplete",void 0),(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",Object)],Y.prototype,"_loggedInPlayer",void 0),Y=(0,F.Cg)([(0,G.EVk)("GotItem",z.Y.item)],Y)},43485:(k,B,U)=>{"use strict";U.d(B,{j:()=>Z});var F=U(8674),G=U(62459),j=U(5491),$=U(77938),H=U(50503),V=U(55122),W=U(22023),q=U(28152),K=U(30226),z=U(35120),Y=U(13956),Q=U(25834),X=U(23891);let Z=class extends X.f{constructor(){super(...arguments),this._itemType="pet",this._usePlayerLevel=!1,this._playerLevelDeltaMin=0,this._playerLevelDeltaMax=0,this._minLevel=1,this._maxLevel=null}init(k,B=1,U=!1){this.setItem(this._itemType,k,B,U)}setPlayerLevelDelta(k,B,U=!0){this._usePlayerLevel=U,this._playerLevelDeltaMin=k,this._playerLevelDeltaMax=B}setLevelMinMax(k,B){this._minLevel=k,this._maxLevel=B}awardItem(){var k;let B=[];if(this._isFake){B=this.getItemData();const U=B.findIndex((k=>"pet"===k.type)),{data:F,ID:j}=B.splice(U,1)[0];let $;const H=this._loggedInPlayer.player.kennel;for(let B=H.data.length-1;B>=0;--B){const U=H.data[B];if(U.ID===j&&!(null===(k=this._bridge.getSecureData(U.uniqueID))||void 0===k?void 0:k.caught.legacySource)){$=U;break}}F&&G.Aq$.isDefined($)&&($.level=F.level,$.stars=F.stars,H.updated=!0)}super.awardItem();for(const U of B)K.J.bagItemByType(U,z.q.instance.game,void 0,void 0,this._customSegmentMetadata)}getItemData(){var k;const B=null===(k=$.t.getItem(this._itemType,this._itemID))||void 0===k?void 0:k.data;if(!B)return G.VyI.log(`[GotPetComponent] Failed to find item data for ${this._itemType} ${this._itemID}`,G.$bb.Error),null;const U=[this.getPetItemData()];return B.unlockFollow&&U.push({type:"follow",ID:B.unlockFollow}),"pet"===this._itemType&&W.P8.isPetEpic(this._itemID)&&(this._shouldRefreshMultiplayer=!0),U}getPetItemData(){var k,B;const U=null===(k=$.t.getItem(this._itemType,this._itemID))||void 0===k?void 0:k.data;let F=this._minLevel;if(this._usePlayerLevel){const k=Math.min(this._playerLevelDeltaMin,this._playerLevelDeltaMax),B=Math.max(this._playerLevelDeltaMin,this._playerLevelDeltaMax);F=this._loggedInPlayer.getLevel()+Math.floor(G.cj9.random(k,B+1))}return F=G.cj9.clamp(F,this._minLevel,null!==(B=this._maxLevel)&&void 0!==B?B:V.s.activePlayerLevelCap),{type:this._itemType,ID:this._itemID,N:this._itemQuantity,data:{seed:0,level:F,stars:V.s.xpRequiredForLevel(F,j.V.Pet),hp:H.A.getHPFromParams(F,U.statHealth||5)}}}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],Z.prototype,"_itemType",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Z.prototype,"_usePlayerLevel",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Z.prototype,"_playerLevelDeltaMin",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Z.prototype,"_playerLevelDeltaMax",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Z.prototype,"_minLevel",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Z.prototype,"_maxLevel",void 0),(0,F.Cg)([(0,Y.b)(Q.T),(0,F.Sn)("design:type",Q.T)],Z.prototype,"_bridge",void 0),Z=(0,F.Cg)([(0,G.EVk)("GotPet",q.Y.saving)],Z)},63398:(k,B,U)=>{"use strict";U.d(B,{k:()=>V});var F=U(8674),G=U(62459),j=U(95891),$=U(35120),H=U(79009);class V extends G.JTX{constructor(){super(...arguments),this.onAnimationComplete=new G.HN0,this.isAnimating=!1,this.animationName=null,this.loopOverride=!0,this.bindData={position:{x:0,y:0},scale:{x:1,y:1},angle:0},this.animationData=null,this.currentFrameData={},this.targetKey=null}get OnAnimationComplete(){return this.onAnimationComplete}get AnimationTargetKey(){return this.targetKey}set AnimationTargetKey(k){this.targetKey=k}setCurrentToBindPose(){this.bindData.position={x:this.GameObject.legacyTransform.x,y:this.GameObject.legacyTransform.y},this.bindData.angle=this.GameObject.legacyTransform.group.angle,this.bindData.scale={x:this.GameObject.legacyTransform.group.scale.x,y:this.GameObject.legacyTransform.group.scale.y}}playAnimation(k,B,U){if(this.isAnimating){if(this.animationName===k){const k=Object.keys(this.currentFrameData),B=k.length;for(let U=0;Uk[U].frames.length-1===B.frame))&&(this.onAnimationComplete.dispatch(),this.stopAnimation())}}}updateX(k){this.GameObject.legacyTransform.group.position.x=this.bindData.position.x+k}updateY(k){this.GameObject.legacyTransform.group.position.y=this.bindData.position.y+k}updateAngle(k){this.GameObject.legacyTransform.group.angle=k}updateXScale(k){this.GameObject.legacyTransform.group.scale.x=k}updateYScale(k){this.GameObject.legacyTransform.group.scale.y=k}updateVisible(k){this.GameObject.active=k}stopAnimation(){this.isAnimating=!1,this.GameObject.legacyTransform.group.position.set(this.bindData.position.x,this.bindData.position.y),this.GameObject.legacyTransform.group.angle=this.bindData.angle,this.GameObject.legacyTransform.group.scale.set(this.bindData.scale.x,this.bindData.scale.y),this.GameObject.active=!0}updateFrame(k,B){const U=this.animationData.animatedProperties[B],F=this.getCurrentFrameForProperty(B),G=Math.floor((k+F.elapsed)/U.interval);let j=F.frame+G;const $=U.frames.length-1;j>=$&&(this.animationData.loop?j%=U.frames.length:j=$);const H=this.currentFrameData[B];return H.frame=j,H.elapsed=H.elapsed+k-U.interval*G,H}updateFrameProperty(k,B,U,F){const G=this.updateFrame(k,B);null!==G&&F(U[B].frames[G.frame])}getCurrentFrameForProperty(k){return G.Aq$.isDefined(this.currentFrameData[k])||(this.currentFrameData[k]={elapsed:0,frame:0}),this.currentFrameData[k]}destroy(){this.onAnimationComplete.dispose(),super.destroy()}}(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],V.prototype,"targetKey",void 0),(0,F.Cg)([G.IJn,(0,F.Qj)(2,(0,G.vQZ)("AnimationData")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[String,Boolean,H.F]),(0,F.Sn)("design:returntype",void 0)],V.prototype,"playAnimation",null)},89717:(k,B,U)=>{"use strict";U.d(B,{R:()=>K});var F=U(8674),G=U(62459),j=U(35120),$=U(54950),H=U(73797),V=U(28152),W=U(29834),q=U(80573);let K=class extends G.uAl{constructor(){super(...arguments),this._onSmokeCloudShown=new G.HN0,this._onPlayerMorphStarted=new G.HN0,this._onPlayerMorphEnded=new G.HN0,this._onMorphedAppearanceClicked=new G.HN0,this._morphedObject=null,this._morphedAppearance=null}get morphedAppearance(){return this._morphedAppearance}get onPlayerMorphStarted(){return this._onPlayerMorphStarted}get onPlayerMorphEnded(){return this._onPlayerMorphEnded}create(){if(super.create(),this._playerData){if(this._playerData.player.isPlayerTransformed()&&this.createMorphAppearance(),this.transformPlayer=this.transformPlayer.bind(this),this.clearMorphedAppearance=this.clearMorphedAppearance.bind(this),this._playerData.isActivePlayer()){const k=j.q.instance.game.broadcaster;k.addAppListener(H.J8.MorphMarbleUsed,this.transformPlayer,this),k.addAppListener(H.J8.MorphMarbleCancelled,this.clearMorphedAppearance,this)}}else G.VyI.log("MorphTransformationComponent: Failed to initialize the component due to missing player data provider",G.$bb.Error)}destroy(){var k;if(j.q.instance.game.time.events.remove(this._smokeTimer),this._onSmokeCloudShown.dispose(),this._onSmokeCloudShown=null,this._onPlayerMorphStarted.dispose(),this._onPlayerMorphStarted=null,this._onPlayerMorphEnded.dispose(),this._onPlayerMorphEnded=null,this._morphedObject&&(this._morphedAppearance.input.onClicked.remove(this._onMorphedAppearanceClicked.dispatch,this._onMorphedAppearanceClicked),this._morphedAppearance=null,this._morphedObject=null),this._onMorphedAppearanceClicked.dispose(),this._onMorphedAppearanceClicked=null,null===(k=this._playerData)||void 0===k?void 0:k.isActivePlayer()){const k=j.q.instance.game.broadcaster;k.removeAppListener(H.J8.MorphMarbleUsed,this),k.removeAppListener(H.J8.MorphMarbleCancelled,this)}super.destroy()}isMorphed(){var k,B;return(null===(B=null===(k=this._playerData)||void 0===k?void 0:k.player)||void 0===B?void 0:B.isPlayerTransformed())&&G.Aq$.isDefined(this._morphedAppearance)}createMorphAppearance(){var k;this._morphedObject&&this.destroyMorphAppearance();const B=this._playerData.player.getPlayerData().playerTransformation;B&&(this._morphedObject=this._appearanceLoader.loadHitboxAppearancePrefab(B.transformType,B.transformID,this.gameObject),this._morphedAppearance=this._morphedObject.findComponentInChildren(q.n),this._morphedAppearance.input.onClicked.add(this._onMorphedAppearanceClicked.dispatch,this._onMorphedAppearanceClicked),this._morphedAppearance.appearanceRenderComponent.GameObject.setLayer(void 0,!0),null===(k=this._onPlayerMorphStarted)||void 0===k||k.dispatch())}clearMorphedAppearance(){null!==this._morphedObject&&this.showSmokeCloud((()=>{var k;this.destroyMorphAppearance(),null===(k=this._onPlayerMorphEnded)||void 0===k||k.dispatch()}))}clearMorphedAppearanceWithoutEffect(){var k;this.destroyMorphAppearance(),null===(k=this._onPlayerMorphEnded)||void 0===k||k.dispatch()}destroyMorphAppearance(){var k;null===(k=this._morphedObject)||void 0===k||k.destroy(),this._morphedObject=null,this._morphedAppearance=null}transformPlayer(k){this.transformPlayerWithEffect(k.effect.transform,k.effect.ID,k.effect.time)}transformPlayerWithEffect(k,B,U=6e3,F){this._playerData.player.transformPlayer(k,B,U,F),this.showSmokeCloud(this.createMorphAppearance)}transformPlayerWithoutEffect(k,B,U=6e3,F){this._playerData.player.transformPlayer(k,B,U,F),this.createMorphAppearance()}showSmokeCloud(k){var B;this._playerData.isActivePlayer()&&(j.q.instance.game.input.enabled=!1,j.q.instance.game.input.reset()),this._smokeTimer=j.q.instance.game.time.events.addTimer(400,k,this),this._playerData.isActivePlayer()&&(this._smokeAnimator?this._smokeAnimator.OnAnimationComplete.addOnce((()=>j.q.instance.game.input.enabled=!0)):j.q.instance.game.input.enabled=!0),null===(B=this._smokeAnimator)||void 0===B||B.playAnimation("spine-smoke-2",!1,!0),this._onSmokeCloudShown.dispatch()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],K.prototype,"_onSmokeCloudShown",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],K.prototype,"_onPlayerMorphStarted",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],K.prototype,"_onPlayerMorphEnded",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],K.prototype,"_onMorphedAppearanceClicked",void 0),(0,F.Cg)([(0,G.MnK)(W.j),(0,F.Sn)("design:type",W.j)],K.prototype,"_smokeAnimator",void 0),(0,F.Cg)([(0,G.Cdj)("377-3e7b"),(0,F.Sn)("design:type",Object)],K.prototype,"_playerData",void 0),(0,F.Cg)([(0,G.Cdj)("b2a-9519"),(0,F.Sn)("design:type",$.S)],K.prototype,"_appearanceLoader",void 0),K=(0,F.Cg)([(0,G.EVk)("MorphTransformation",V.Y.playerAnimation)],K)},63115:(k,B,U)=>{"use strict";U.d(B,{T:()=>K});var F,G=U(8674),j=U(62459);!function(k){k.Clamshell_mount="01b0fac7-6659-4a4b-8c9e-e0ba6bdd814d",k.Cloud_mount="1292a7de-833f-4f57-b59e-e00c942f62e1",k.Coin_mount="b5e58a6c-a45c-465b-9549-d44632d25974",k.Flowers_mount="0434f3ed-7a2f-4e70-9f59-9f208cf80831",k.Mount_12_mount="eacb8d01-7722-4a58-a3ed-0557bb595490",k.Mount_13_mount="a1cfd064-10e9-4f4e-8620-f3f9a40c9c4d",k.Mount_14_mount="3065f309-5410-4974-84ab-67a0f72fd07f",k.Mount_15_mount="44c46fb8-0a97-458f-8167-29305b00a139",k.Mount_16_mount="ec8a9fd8-4fd1-4316-bb4d-d106b556c74b",k.Mount_17_mount="30d63d06-820b-46d9-8374-e85dff1b5244",k.Mount_18_mount="e1d22939-2dd0-4713-893a-f88020942d46",k.Mount_19_mount="5f31ac1d-1847-46a2-b540-ed7d65c5d9db",k.Mount_20_mount="a589dc3d-42e1-4ee9-b4a1-9c1a8ad41432",k.Mount_21_mount="61b0b8a3-506a-4645-af01-0bd446612ece",k.Mount_22_mount="82e7063c-ae67-40b6-b147-5944a5f168f9",k.Mount_23_mount="3a164ae8-0bd1-40ba-8542-d407f9316c47",k.Mount_24_mount="689d94a6-061c-4f10-84f9-7b79a3c233cb",k.Mount_25_mount="0db7bf9a-7e3b-46bc-a3fc-913207039867",k.Mount_26_mount="7959719b-58df-47de-8f66-c8a004eb0f58",k.Mount_27_mount="f6f5a970-bd24-46b2-b5f9-b453b8defe91",k.Mount_28_mount="bce878c1-a0d0-4103-9032-959e047e5a6f",k.Mount_29_mount="2842e909-4a6f-4bf6-a3a6-88c52c7088a7",k.Mount_30_mount="400cdf0b-ffda-4e6b-8fe0-85a09937efa1",k.Mount_31_mount="c2df8c8f-db83-488b-a4c0-e93f33799b95",k.Mount_32_mount="9fb4c701-9376-4abc-b0c4-a0d51031f058",k.Mount_33_mount="54b0b61a-e283-41f9-b7d0-6f5c05581a95",k.Mount_34_mount="5ac56738-6022-4f42-b2e2-69488f15741b",k.Mount_35_mount="7ac360b8-1676-4d92-b269-a65ceb5a0433",k.Mount_36_mount="bf9c6ec9-22ec-462a-9234-5b902040209a",k.Mount_37_mount="1bb50f3c-7e3d-4ca4-a1f0-7e05077ca897",k.Mount_38_mount="9817e829-895c-4602-a3fc-16391e7f3122",k.Mount_39_mount="f38096ba-715a-4aa1-9a80-b47730b8c4f3",k.Mount_40_mount="38e4de2e-94b8-4c33-b8a4-b47fdf2dd189",k.Mount_41_mount="905efbb2-1357-405b-871d-48a1f3e2f2b3",k.Mount_42_mount="23ec77e0-7da7-413b-9e6e-0609a6b2b77d",k.Mount_43_mount="04387aa5-95db-41ad-83f0-ea233b65e5a8",k.Mount_44_mount="87f9f92a-a0f5-4230-9a07-44d8c1f6c488",k.Mount_45_mount="9d1677d9-dc6f-439e-bb5a-fac54852bdbf",k.Mount_46_mount="01267385-f2de-4c73-8faa-b924021decff",k.Mount_47_mount="6cf715f3-6a1d-4908-9ee7-83a17da3817f",k.Mount_48_mount="85b49bda-42a4-4ca6-998b-72c3892472ac",k.Mount_49_mount="3ac41c6d-8b2b-4b86-80ce-0eddd406c2f5",k.Rainbow_cloud_mount="f65753d9-9ffb-4b5b-96b2-440062f35e5f",k.Storm_cloud_mount="ce2010d2-f3ce-4811-94a7-17ef018625d7",k.Surfboard_mount="9138b7ad-f8f7-43e7-af73-64c64b75214b",k.Test_mount="bc30712a-feb9-46a1-bc27-c4c02b2a4db6",k.Treasure_chest_mount="a9cb6b76-7977-4865-9711-ee3cf1956846",k.Tube_mount="36f07d74-1ec1-4406-80fc-133bea288f85"}(F||(F={}));var $=U(35120),H=U(77938),V=U(73797),W=U(1492),q=U(28152);let K=class extends j.uAl{constructor(){super(...arguments),this._onMount=new j.HN0,this._onDismount=new j.HN0,this._transformationNotSupported=!1,this._transformationChecker=null,this._pendingCheckerResolvers=[],this._mountID=null,this._listenerEnabled=!0,this._updateMountAppearanceQueue=Promise.resolve()}get onMount(){return this._onMount}get onDismount(){return this._onDismount}get transformationChecker(){return this._transformationChecker}set transformationChecker(k){if(this._transformationChecker=k,k&&this._pendingCheckerResolvers.length>0){const k=this._pendingCheckerResolvers;this._pendingCheckerResolvers=[],k.forEach((k=>k()))}}create(){if(super.create(),!this._playerData)return void j.VyI.log("MountListenerComponent: Failed to initialize the component due to missing player data provider",j.$bb.Error);const k=$.q.instance.game.broadcaster;this._playerData.isActivePlayer()&&(k.addAppListener(V.J8.PlayerEditingMenuClosed,this.updateMountAppearance,this),k.addAppListener(V.J8.PlayerAppearanceUpdated,this.updateMountAppearance,this)),k.addAppListener(V.J8.MorphMarbleUsed,this.updateMountAppearance,this),k.addAppListener(V.J8.MorphMarbleCancelled,this.updateMountAppearance,this),k.addAppListener(V.J8.MorphMarbleTimerUpdated,this.updateMountAppearance,this)}destroy(){var k,B,U;null===(k=this._onMount)||void 0===k||k.dispose(),this._onMount=null,null===(B=this._onDismount)||void 0===B||B.dispose(),this._onDismount=null,this.mountComponent=null;{const k=$.q.instance.game.broadcaster;(null===(U=this._playerData)||void 0===U?void 0:U.isActivePlayer())&&(k.removeAppListener(V.J8.PlayerEditingMenuClosed,this),k.removeAppListener(V.J8.PlayerAppearanceUpdated,this)),k.removeAppListener(V.J8.MorphMarbleUsed,this),k.removeAppListener(V.J8.MorphMarbleCancelled,this),k.removeAppListener(V.J8.MorphMarbleTimerUpdated,this)}if(this._transformationChecker=null,this._pendingCheckerResolvers.length>0){const k=this._pendingCheckerResolvers;this._pendingCheckerResolvers=[],k.forEach((k=>k()))}super.destroy()}updateMountAppearance(){return(0,G.sH)(this,void 0,void 0,(function*(){this._updateMountAppearanceQueue=this._updateMountAppearanceQueue.then((()=>(0,G.sH)(this,void 0,void 0,(function*(){var k;this._transformationChecker||this._transformationNotSupported||(j.VyI.log("No transformation checker set for mount listener. Deferring update until a transformation checker is set.",j.$bb.Verbose),yield new Promise((k=>{this._pendingCheckerResolvers.push(k)}))),this.mountComponent&&((null===(k=this._transformationChecker)||void 0===k?void 0:k.isTransformed())?yield this.setMountAppearanceFromId(0):yield this.setMountAppearanceFromId())})))),yield this._updateMountAppearanceQueue}))}addParticleSystem(k){var B,U,F;if(this.mountComponent)if(this.mountComponent.hasInternalParticleEffect())this.mountComponent.addInternalParticleEffect().catch(j.RQr.createHandler("Could not add internal particle effect."));else if(null===(F=null===(U=null===(B=k.metadata)||void 0===B?void 0:B.assets)||void 0===U?void 0:U.particles)||void 0===F?void 0:F.ID){const B=k.metadata.assets.particles;this.mountComponent.addParticleEffectByID(B.ID,B.x,B.y),this.mountComponent.pauseParticles()}else this.mountComponent.removeParticleEffect()}setMountAppearanceFromId(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,G;if(!this._listenerEnabled||!this._playerData)return;const $=null!=k?k:this._playerData.player.equipment.getMount();if($!==this._mountID)if(this._mountID=$,this._mountID>0){const k=H.t.getItem("mount",this._mountID);(null===(B=k.data)||void 0===B?void 0:B.mountGuid)||(j.VyI.log(`ERROR: Mount item ${this._mountID} does not have a GUID, defaulting to Cloud`,j.$bb.Error),k.data.mountGuid=F.Cloud_mount);const G=k.data.mountGuid;try{if(yield this.mountComponent.setMount(G),!this.mountComponent)return;this.addParticleSystem(k),null===(U=this._onMount)||void 0===U||U.dispatch()}catch(V){j.RQr.logError(V,"ERROR: Unable to update mount appearance.")}}else try{if(yield this.mountComponent.clearMount(),!this.mountComponent)return;null===(G=this._onDismount)||void 0===G||G.dispatch()}catch(V){j.RQr.logError(V,"ERROR: Unable to clear mount appearance.")}}))}setListenersEnabled(k=!0){this._listenerEnabled=k}};(0,G.Cg)([(0,j.Pqz)(W.N),(0,G.Sn)("design:type",W.N)],K.prototype,"mountComponent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],K.prototype,"_onMount",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],K.prototype,"_onDismount",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],K.prototype,"_transformationNotSupported",void 0),(0,G.Cg)([(0,j.Cdj)("377-3e7b"),(0,G.Sn)("design:type",Object)],K.prototype,"_playerData",void 0),K=(0,G.Cg)([(0,j.EVk)("MountListener",q.Y.playerAnimation)],K)},39325:(k,B,U)=>{"use strict";U.d(B,{F:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(29834);let H=class extends G.uAl{playAnimation(k){var B;(null===(B=this._spineAnimator)||void 0===B?void 0:B.hasAnimation(k))?this._spineAnimator.playAnimation(k,!0):G.Aq$.isDefined(this._spineAnimator)&&G.VyI.log(`ERROR: Animation ${k} not found in player SpineAnimator`,G.$bb.Error)}};(0,F.Cg)([(0,G.MnK)($.j),(0,F.Sn)("design:type",$.j)],H.prototype,"_spineAnimator",void 0),H=(0,F.Cg)([(0,G.EVk)("PlayerAnimationStates",j.Y.playerAnimation)],H)},47389:(k,B,U)=>{"use strict";U.d(B,{b:()=>H});var F=U(8674),G=U(62459),j=U(63068),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this.onAppearanceLoaded=new G.HN0,this.onAppearanceDone=new G.HN0}create(){super.create(),this._appearanceData&&this.setAppearance(this._appearanceData)}setAppearance(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F;k.outfit||(k.outfit=1);const $=null===(F=null===(U=null===(B=this.gameObject)||void 0===B?void 0:B.parent)||void 0===U?void 0:U.parent)||void 0===F?void 0:F.findComponentInChildren(j.n);return $?(yield $.fromPlayerAppearanceData(k).catch(G.RQr.createHandler("fromPlayerAppearanceData failed in PlayerAppearanceSelector")),this.onAppearanceLoaded.dispatch()):this.onAppearanceLoaded.dispatch(),Promise.resolve()}))}destroy(){this.onAppearanceLoaded.dispose(),this.onAppearanceDone.dispose(),super.destroy()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onAppearanceLoaded",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onAppearanceDone",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],H.prototype,"_appearanceData",void 0),H=(0,F.Cg)([(0,G.EVk)("PlayerAppearanceSelector",$.Y.playerAnimation)],H)},6190:(k,B,U)=>{"use strict";U.d(B,{q:()=>q});var F=U(8674),G=U(62459),j=U(65240),$=U(35120),H=U(65050),V=U(30226),W=U(28152);let q=class extends G.JTX{constructor(){super(...arguments),this.eventType="got-item",this.awardSourceType=j.C.PrizeWheel,this.instanceType=H.N.OpenWorld,this.awardItems=!0,this.onComplete=new G.HN0}destroy(){this.onComplete.dispose(),super.destroy()}run(){if(this.awardItems){for(const k of this.items)k.isSecure||V.J.bagItem(k,$.q.instance.game,this.eventType,void 0,{source_type:this.awardSourceType,instance_type:this.instanceType,instance_id:this.instanceId});this.onComplete.dispatch()}else this.onComplete.dispatch()}addItem(k,B,U=1){this.items.push({type:k,ID:B,N:U})}setItem(k,B,U=1){this.items=[{type:k,ID:B,N:U}]}};(0,F.Cg)([(0,G.SZi)(),(0,G.vCS)(),(0,F.Sn)("design:type",Array)],q.prototype,"items",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],q.prototype,"eventType",void 0),(0,F.Cg)([(0,G.gfw)(j.C),(0,F.Sn)("design:type",String)],q.prototype,"awardSourceType",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],q.prototype,"onComplete",void 0),q=(0,F.Cg)([(0,G.EVk)("SilentAwardItems",W.Y.player)],q)},64889:(k,B,U)=>{"use strict";U.d(B,{$:()=>K});var F=U(8674),G=U(62459),j=U(92591),$=U(71857),H=U(28152),V=U(29834),W=U(89717),q=U(63115);let K=class extends G.uAl{constructor(){super(...arguments),this._isMounted=!1,this._currentStateID=0}get currentState(){return this._activeController.currentState}create(){super.create(),this._isMounted=!1,this._activeController=this._playerController,this._morphTransformation.onPlayerMorphStarted.add(this.setMorphController,this),this._morphTransformation.onPlayerMorphEnded.add(this.clearMorphController,this),this._mountListener.onMount.add(this.setMounted,this),this._mountListener.onDismount.add(this.clearMounted,this),this._mountListener.transformationChecker=this}getSpineAnimator(){return this._spineAnimator}setMorphController(){this._activeController=this._morphTransformation.morphedAppearance.animationController,this.changeState(this._currentStateID),this._mountListener.updateMountAppearance()}clearMorphController(){this._activeController=this._playerController,this.changeState(this._currentStateID)}setMounted(){this._isMounted=!0,this.changeState(this._currentStateID)}clearMounted(){this._isMounted&&(this._isMounted=!1,this.changeState(this._currentStateID))}isTransformed(){return this._morphTransformation.isMorphed()}changeState(k){this._currentStateID=k,this._isMounted&&[0,4,1].includes(k)?this._morphTransformation.isMorphed()&&this._activeController.changeState(0):this._morphTransformation.isMorphed()&&this._activeController.changeState(k),this._spineAnimator.GameObject.active=this._activeController===this._playerController;const B=this._spineAnimator;B&&(B.OnAnimationComplete.removeAll(),2===k?(B.playAnimation($.$.ATTACK,!1),B.OnAnimationComplete.addOnce((()=>{B.playAnimation($.$.STOP_HEAVY,!0)}))):3===k?(B.playAnimation($.$.ATTACK2,!1),B.OnAnimationComplete.addOnce((()=>{B.playAnimation($.$.STOP_HEAVY,!0)}))):5===k?(B.playAnimation($.$.ATTACK,!1),B.OnAnimationComplete.addOnce((k=>{k===$.$.ATTACK&&(B.playAnimation($.$.DANCE_RUNNINGMAN,!1),B.OnAnimationComplete.addOnce((()=>{B.playAnimation($.$.STOP_HEAVY,!0)})))}))):1===k?B.playAnimation(this._isMounted?$.$.WALK_FLOAT:$.$.WALK,!0):4===k?B.playAnimation($.$.STOP_HEAVY,!0):B.playAnimation($.$.STAND,!0))}destroy(){var k,B,U,F;this._morphTransformation&&(null===(k=this._morphTransformation.onPlayerMorphStarted)||void 0===k||k.removeAll(this),null===(B=this._morphTransformation.onPlayerMorphEnded)||void 0===B||B.removeAll(this)),this._mountListener&&(null===(U=this._mountListener.onMount)||void 0===U||U.removeAll(this),null===(F=this._mountListener.onDismount)||void 0===F||F.removeAll(this)),this._playerController=null,this._morphTransformation=null,this._mountListener=null,super.destroy()}};(0,F.Cg)([(0,G.MnK)(j.K),(0,G.Lr6)(0),(0,G.nKb)("defaultAnimationController"),(0,F.Sn)("design:type",j.K)],K.prototype,"_playerController",void 0),(0,F.Cg)([(0,G.MnK)(V.j),(0,F.Sn)("design:type",V.j)],K.prototype,"_spineAnimator",void 0),(0,F.Cg)([(0,G.MnK)(W.R),(0,F.Sn)("design:type",W.R)],K.prototype,"_morphTransformation",void 0),(0,F.Cg)([(0,G.MnK)(q.T),(0,F.Sn)("design:type",q.T)],K.prototype,"_mountListener",void 0),K=(0,F.Cg)([(0,G.EVk)("WizardAnimationController",H.Y.playerAnimation)],K)},13693:(k,B,U)=>{"use strict";U.d(B,{Y:()=>q});var F,G=U(8674),j=U(62459),$=U(95891),H=U(35120),V=U(129),W=U(71857);let q=F=class extends j.uAl{constructor(){super(...arguments),this._characterContainer=null,this._character=null,this._timeout=null,this._loadOnCreate=!1,this._adjustForMount=!1,this._hideMount=!1,this._animationState=W.$.SETUP,this.onLoaded=new j.HN0,this._inputEnabled=!0}create(){super.create(),this._loadOnCreate&&this.addDefaultPlayerCharacter()}addDefaultPlayerCharacter(){var k;const B=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=B.equipment.getMount()>0;this.addCharacter(B,null===(k=this._baseRenderComponent)||void 0===k?void 0:k.getRootContainer(),0,this._adjustForMount&&U?F._MOUNT_OFFSET:0)}addCharacter(k,B,U,F){var G;void 0===B&&(B=null===(G=this.GameObject.legacyTransform)||void 0===G?void 0:G.group),void 0===U&&(U=0),void 0===F&&(F=0),this._character=new V.a(H.q.instance.game),this._character.appearance=$.clone(k.appearance),this._character.equipment=$.clone(k.equipment),this._character.data.chargedLevelData=$.clone(k.data).chargedLevelData,this._character.data.level=$.clone(k.data).level,this._characterContainer=H.q.instance.prodigy.create.player(B,this._character,1,U,F,!1,{isPreview:!0,hideMount:this._hideMount}),this._characterContainer.forceWeaponVisual=!0,this._characterContainer.reload(),this._characterContainer.onFullyLoaded.addOnce((()=>{var k,B;this._animationState!==W.$.SETUP&&(null===(k=this._characterContainer)||void 0===k||k.setNewAnimationState(this._animationState)),null===(B=this._characterContainer)||void 0===B||B.setSpriteInput(this._inputEnabled),this.onLoaded.dispatch()}))}removeCharacter(){var k;null===(k=this._characterContainer)||void 0===k||k.destroy(),this._characterContainer=null}setEquipment(k,B){var U;this._character?("outfit"===k?this._character.equipment.setOutfit(B,!0):"hat"===k?this._character.equipment.setHat(B,!0):"weapon"===k?this._character.equipment.setWeapon(B,!0):"boots"===k?this._character.equipment.setBoots(B,!0):"mount"===k?this._character.equipment.setMount(B,!0):"costume"===k?this._character.equipment.setCostume(B,!0):j.VyI.log("Item type is unknown.",j.$bb.Warning),null===(U=this._characterContainer)||void 0===U||U.reload()):j.VyI.log("Character is undefined.",j.$bb.Warning)}setInputEnabled(k){var B;null===(B=this._characterContainer)||void 0===B||B.setSpriteInput(k),this._inputEnabled=k}setAppearance(k,B){var U;if(this._character){if("hair"===k)this._character.appearance.setHair(B);else if("hairColor"===k){const k=this._character.appearance.getHair().style;this._character.appearance.setHair(k,B)}else"face"===k?this._character.appearance.setFace(B):"eyeColor"===k?this._character.appearance.setEyeColor(B):"skinColor"===k?this._character.appearance.setSkinColor(B):j.VyI.log("Item type is unknown.",j.$bb.Warning);null===(U=this._characterContainer)||void 0===U||U.reload()}else j.VyI.log("Character is undefined.",j.$bb.Warning)}transformEffect(k,B=1e3){null!==this._timeout&&window.clearTimeout(this._timeout),this._timeout=window.setTimeout((()=>{var B;null===(B=this._characterContainer)||void 0===B||B.transformToItem(k.transform,k.ID,!0,0)}),B)}destroy(){this.removeCharacter(),window.clearTimeout(this._timeout),this.onLoaded.dispose(),super.destroy()}};q._MOUNT_OFFSET=36,(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"_loadOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"_adjustForMount",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"_hideMount",void 0),(0,G.Cg)([(0,j.gfw)(W.$),(0,G.Sn)("design:type",String)],q.prototype,"_animationState",void 0),(0,G.Cg)([(0,j.MnK)(j.jsv),(0,G.Sn)("design:type",j.jsv)],q.prototype,"_baseRenderComponent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],q.prototype,"onLoaded",void 0),q=F=(0,G.Cg)([(0,j.EVk)("CharacterPreview")],q)},44725:(k,B,U)=>{"use strict";U.d(B,{u:()=>z});var F=U(8674),G=U(62459),j=U(95891),$=U(35120),H=U(55734),V=U(129),W=U(22023),q=U(19690),K=U(28152);let z=class extends G.uAl{get renderContainer(){return this._renderContainer}addCreature(k,B=!1){this._renderContainer&&this._renderContainer.destroy(),k instanceof V.a?this.renderPlayer(k):this.renderMonster(k,B)}renderPlayer(k){const B=new V.a($.q.instance.game);return B.appearance=j.clone(k.appearance),B.equipment=j.clone(k.equipment),B.data.level=j.clone(k.data.level),B.data.chargedLevelData=j.clone(k.data.chargedLevelData),this._renderContainer=(0,q.vt)().player(this.GameObject.legacyTransform.group,B,1,0,0,!1,{isPreview:!0}),this._renderContainer.forceWeaponVisual=!0,this._renderContainer.standStill(),this._renderContainer.OnLoad.add((()=>{this._renderContainer.setSpriteInput(!1)})),this._renderContainer.startLoad(),this._renderContainer}renderMonster(k,B){var U;const F=new H.R($.q.instance.game,k.data);return this._renderContainer=(0,q.vt)().monster(this.GameObject.legacyTransform.group,F,1,0,0),G.Aq$.isDefined(null===(U=F.source)||void 0===U?void 0:U.defaultScale)&&(this._renderContainer.sprites.scale.x=F.source.defaultScale,this._renderContainer.sprites.scale.y=F.source.defaultScale),this._renderContainer.OnLoad.add((()=>{B?this._renderContainer.stand():this._renderContainer.stopAllAnimations();const U=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getChargedLevel()>0&&W.P8.isPetOnTeam(k.data);this._renderContainer.setChargedEffectVisibility(U)})),this._renderContainer.startLoad(),this._renderContainer}destroy(){var k;null===(k=this._renderContainer)||void 0===k||k.destroy(),this._renderContainer=null,super.destroy()}};z=(0,F.Cg)([(0,G.EVk)("CreaturePreview",K.Y.creatureAnimation)],z)},24382:(k,B,U)=>{"use strict";U.d(B,{j:()=>j});var F=U(62459),G=U(35120);class j extends F.uAl{constructor(){super(...arguments),this.onUpdateDisplay=new F.HN0}get game(){return G.q.instance.game}get name(){return null}get isCardValid(){return!1}updateDisplay(){this.isCardValid&&(this.resetCard(),this.updateCard(),this.onUpdateDisplay.dispatch())}updateCard(){}resetCard(){}clearCard(){this.resetCard()}destroy(){this.onUpdateDisplay.dispose(),super.destroy()}}},37468:(k,B,U)=>{"use strict";U.d(B,{z:()=>W});var F,G=U(8674),j=U(62459),$=U(43846),H=U(93171),V=U(38920);!function(k){k.Fraction="fraction",k.Percentage="percentage"}(F||(F={}));let W=class extends j.uAl{constructor(){super(...arguments),this._initialValue=0,this._filledText="",this._textDisplayType=F.Fraction,this._denominator=10,this._numerator=void 0,this._formatDisplayText=!1,this._initialFillColor="#FFFFFF",this._initialBgColor="#FFFFFF",this._initialOuterColor="#FFFFFF",this._initialTextOutlineColor="#902736",this._changeColorMidpoint=!1,this._midpointThreshold=.5,this._middleFillColor="#FFFFFF",this._middleBgColor="#FFFFFF",this._middleOuterColor="#FFFFFF",this._middleTextOutlineColor="#FFFFFF",this._changeColorOnComplete=!1,this.waitForAnimationCompleteToChangeColours=!1,this._completeThreshold=1,this._completeFillColor="#FFFFFF",this._completeBgColor="#FFFFFF",this._completeOuterColor="#FFFFFF",this._completeTextOutlineColor="#FFFFFF",this.onTweenValueStart=new j.HN0,this.onTweenValueComplete=new j.HN0,this.onFilled=new j.HN0}get progressBar(){return this._progressBar}get onProgress(){return this._progressBar.onProgress}create(){super.create(),this._initialColors={outerColor:this._initialOuterColor,bgColor:this._initialBgColor,fillColor:this._initialFillColor,textOutlineColor:this._initialTextOutlineColor},this._middleColors={outerColor:this._middleOuterColor,bgColor:this._middleBgColor,fillColor:this._middleFillColor,textOutlineColor:this._middleTextOutlineColor},this._completeColors={outerColor:this._completeOuterColor,bgColor:this._completeBgColor,fillColor:this._completeFillColor,textOutlineColor:this._completeTextOutlineColor},this.updateColors(this._initialColors),this.setValue(this._initialValue)}destroy(){super.destroy(),this.onTweenValueStart.dispose(),this.onTweenValueComplete.dispose(),this.onFilled.dispose()}setOuterColor(k){this._outlineGraphic.tint="number"==typeof k?k:j.Q1f.hexToColor(k).color}setBackgroundColor(k){this._innerGraphic.tint="number"==typeof k?k:j.Q1f.hexToColor(k).color}setFillColor(k){this._fillGraphic.tint="number"==typeof k?k:j.Q1f.hexToColor(k).color}setTextOutlineColor(k){this._barText.stroke="number"==typeof k?j.Q1f.numberToHexString(k):k}setBarText(k){this._barText.TextObject.destroyed||(this._barText.text=k)}hideBarText(){this._barText.Active=!1}showBarText(){this._barText.Active=!0}setBarTextStrokeColor(k){this._barText.TextObject.destroyed||(this._barText.stroke=k)}setValue(k,B=!1,U=0){this._initialValue=k,this.updateText(),B?(this._progressBar.tweenValue(k,U),this.onTweenValueStart.dispatch(),this._progressBar.onProgress.add((()=>{this.updateText()}),this),this._progressBar.onComplete.addOnce((()=>{this._progressBar.onProgress.removeAll(),this.updateText(),this.onTweenValueComplete.dispatch(),this.setColorsBasedOnValue(k),this.isFilledCheck()}))):(this._progressBar.setValue(k),this.updateText(),this.isFilledCheck()),B&&this.waitForAnimationCompleteToChangeColours||this.setColorsBasedOnValue(k)}setColorsBasedOnValue(k){this._changeColorOnComplete&&k>=this._completeThreshold?this.updateColors(this._completeColors):this._changeColorMidpoint&&this._changeColorMidpoint&&k>=this._midpointThreshold?this.updateColors(this._middleColors):this.updateColors(this._initialColors)}updateColors(k){this._activeColors!==k&&(this._activeColors=k,this.setOuterColor(k.outerColor),this.setBackgroundColor(k.bgColor),this.setFillColor(k.fillColor),this.setTextOutlineColor(k.textOutlineColor))}setFromValues(k,B,U=!1,F=0,G){this._numerator=k,this._denominator=B,U&&j.Aq$.isDefined(G)&&this.setValue(G/B,!1),this.setValue(k/B,U,F)}updateText(){const k=this._progressBar.fillValue;if(1!==k||""===this._filledText)if(this._textDisplayType===F.Fraction){let B=k*this._denominator;B=this._numerator&&this._numerator>B?Math.ceil(B):Math.floor(B),this._formatDisplayText?this.setBarText(`${(0,V.Hk)(B,0,",")} / ${(0,V.Hk)(this._denominator,0,",")}`):this.setBarText(`${B} / ${this._denominator}`)}else this._textDisplayType===F.Percentage&&this.setBarText(`${Math.round(100*k)}%`);else this.setBarText((0,$.k)(this._filledText))}tweenValue(k){this._progressBar.tweenValue(k),this._progressBar.onComplete.addOnce((()=>this.onTweenValueComplete.dispatch()))}getFillValue(){return this._progressBar.fillValue}isFilledCheck(){this._progressBar.fillValue>=1&&this.onFilled.dispatch()}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],W.prototype,"_initialValue",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],W.prototype,"_filledText",void 0),(0,G.Cg)([(0,j.gfw)(F),(0,G.Sn)("design:type",String)],W.prototype,"_textDisplayType",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.okD)((k=>k._textDisplayType===F.Fraction)),(0,G.Sn)("design:type",Number)],W.prototype,"_denominator",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W.prototype,"_formatDisplayText",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",Object)],W.prototype,"_initialFillColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",Object)],W.prototype,"_initialBgColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",Object)],W.prototype,"_initialOuterColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",Object)],W.prototype,"_initialTextOutlineColor",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W.prototype,"_changeColorMidpoint",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.okD)((k=>k._changeColorMidpoint)),(0,G.Sn)("design:type",Number)],W.prototype,"_midpointThreshold",void 0),(0,G.Cg)([(0,j.iEU)(),(0,j.okD)((k=>k._changeColorMidpoint)),(0,G.Sn)("design:type",String)],W.prototype,"_middleFillColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,j.okD)((k=>k._changeColorMidpoint)),(0,G.Sn)("design:type",String)],W.prototype,"_middleBgColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,j.okD)((k=>k._changeColorMidpoint)),(0,G.Sn)("design:type",String)],W.prototype,"_middleOuterColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,j.okD)((k=>k._changeColorMidpoint)),(0,G.Sn)("design:type",String)],W.prototype,"_middleTextOutlineColor",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W.prototype,"_changeColorOnComplete",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],W.prototype,"waitForAnimationCompleteToChangeColours",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.okD)((k=>k._changeColorOnComplete)),(0,G.Sn)("design:type",Number)],W.prototype,"_completeThreshold",void 0),(0,G.Cg)([(0,j.iEU)(),(0,j.okD)((k=>k._changeColorOnComplete)),(0,G.Sn)("design:type",String)],W.prototype,"_completeFillColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,j.okD)((k=>k._changeColorOnComplete)),(0,G.Sn)("design:type",String)],W.prototype,"_completeBgColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,j.okD)((k=>k._changeColorOnComplete)),(0,G.Sn)("design:type",String)],W.prototype,"_completeOuterColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,j.okD)((k=>k._changeColorOnComplete)),(0,G.Sn)("design:type",String)],W.prototype,"_completeTextOutlineColor",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],W.prototype,"onTweenValueStart",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],W.prototype,"onTweenValueComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],W.prototype,"onFilled",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],W.prototype,"_outlineGraphic",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],W.prototype,"_innerGraphic",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],W.prototype,"_fillGraphic",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],W.prototype,"_barText",void 0),(0,G.Cg)([(0,j.MnK)(H.a),(0,G.Sn)("design:type",H.a)],W.prototype,"_progressBar",void 0),W=(0,G.Cg)([(0,j.EVk)("DynamicProgressBar",j.YH6.ui)],W)},11624:(k,B,U)=>{"use strict";var F;U.d(B,{P:()=>F}),function(k){k[k.None=-1]="None",k[k.Firefly=0]="Firefly",k[k.Shiverchill=1]="Shiverchill",k[k.Skywatch=2]="Skywatch",k[k.Bonfire=3]="Bonfire",k[k.Shipwreck=4]="Shipwreck",k[k.Academy=5]="Academy",k[k.Darktower=6]="Darktower",k[k.Lamplight=7]="Lamplight",k[k.Dyno=8]="Dyno",k[k.House=9]="House",k[k.TowerTown=10]="TowerTown",k[k.DuelsStadium=11]="DuelsStadium",k[k.DragonIsle=12]="DragonIsle",k[k.FireflyHard=13]="FireflyHard",k[k.ShiverchillHard=14]="ShiverchillHard",k[k.BonfireHard=15]="BonfireHard",k[k.ShipwreckHard=16]="ShipwreckHard",k[k.SkywatchHard=17]="SkywatchHard",k[k.AcademyHard=18]="AcademyHard",k[k.Arcadia=19]="Arcadia"}(F||(F={}))},50873:(k,B,U)=>{"use strict";U.d(B,{k:()=>j});var F=U(62459),G=U(18280);class j extends F.uAl{constructor(){super(...arguments),this.maskWidth=0,this.maskHeight=0,this.isHorizontal=!0,this.targetMask=null}get Width(){return this.maskWidth}set Width(k){this.maskWidth=k,this.updateSize()}get Height(){return this.maskHeight}set Height(k){this.maskHeight=k,this.updateSize()}get IsHorizontal(){return this.isHorizontal}set IsHorizontal(k){this.isHorizontal=k,this.updateMaskAnchor(),this.updateSize()}create(){super.create(),this.targetMask=this.GameObject.findComponent(G.n),this.updateMaskAnchor()}setFillPercent(k){const B=F.cj9.clamp(k,0,1);this.isHorizontal?this.targetMask.updateAnchor(this.maskWidth*(1-B),0):this.targetMask.updateAnchor(0,this.maskHeight*(1-B))}updateMaskAnchor(){this.isHorizontal?this.targetMask.setAnchor(0,.5*this.maskHeight,this.maskWidth,this.maskHeight):this.targetMask.setAnchor(.5*this.maskWidth,0,this.maskWidth,this.maskHeight)}updateSize(){this.isHorizontal?(this.targetMask.GameObject.legacyTransform.x=.5*-this.maskWidth,this.targetMask.setAnchor(0,.5*this.maskHeight,this.maskWidth,this.maskHeight)):(this.targetMask.GameObject.legacyTransform.y=.5*-this.maskHeight,this.targetMask.setAnchor(.5*this.maskWidth,0,this.maskWidth,this.maskHeight))}}},12861:(k,B,U)=>{"use strict";U.d(B,{A:()=>V});var F=U(8674),G=U(62459),j=U(8770),$=U(28152),H=U(84246);let V=class extends H.j{applyEffect(k){if(k&&k.data)for(let B=0;B{"use strict";U.d(B,{w:()=>K});var F=U(8674),G=U(62459),j=U(28152),$=U(53661),H=U(35120),V=U(73797),W=U(13956),q=U(21314);let K=class extends G.uAl{constructor(){super(...arguments),this._openIFrameOnLoad=!0,this._iFrameWidth=480,this._iFrameHeight=700,this._iFrameBorderRadius=12,this.onIFrameClosed=new G.HN0}create(){super.create(),this._iFrame=document.createElement("iframe"),this._iFrameSource=this.getInjectedValue($.n7.IFrameSource),this._closePostMessage=this.getInjectedValue($.n7.IFrameClosePostMessage),this.st=H.q.instance.prodigy.gameContainer.get("c97-bd0d"),this.st.stopInactiveTimer()}postCreate(){super.postCreate(),this._openIFrameOnLoad&&this.setup(),this._closePostMessage&&H.q.instance.game.broadcaster.addAppListener(V.bS.POST_MESSAGE_RECEIVED,((k,B)=>{let U=null;if(U="string"==typeof B?JSON.parse(B):B,U.name===this._closePostMessage){document.getElementById("external-ui").removeChild(this._iFrame),this.st.startInactiveTimer(),this.gameObject.destroyDeferred(),this.onIFrameClosed.dispatch()}}),this,H.q.instance.game)}destroy(){this._iFrame&&this._iFrame.remove(),this._closePostMessage&&H.q.instance.game.broadcaster.removeAppListener(V.bS.POST_MESSAGE_RECEIVED,this,H.q.instance.game),this.onIFrameClosed.dispose(),super.destroy()}setup(){if(!this._iFrameSource)return void G.VyI.log("IFrameComponent: No source provided for the iframe.",G.$bb.Error);const k=document.getElementById("game-container").getElementsByTagName("canvas")[0],B=this._iFrame.style;this._iFrame.setAttribute("src",this._iFrameSource),this._iFrame.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),this._iFrame.setAttribute("allow",`payment ${this._urlProvider.getRootUrl()};`),B.position="absolute",B.display="block";const U=k.clientWidth>1}px)`,B.top=`calc(50% - ${F>>1}px)`,B.borderRadius=`${this._iFrameBorderRadius}px`;document.getElementById("external-ui").appendChild(this._iFrame)}};(0,F.Cg)([(0,W.b)("be9-3278"),(0,F.Sn)("design:type",q.p)],K.prototype,"_urlProvider",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],K.prototype,"_openIFrameOnLoad",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],K.prototype,"_iFrameWidth",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],K.prototype,"_iFrameHeight",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],K.prototype,"_iFrameBorderRadius",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],K.prototype,"onIFrameClosed",void 0),K=(0,F.Cg)([(0,G.EVk)("IFrame",j.Y.ui)],K)},65231:(k,B,U)=>{"use strict";U.d(B,{s:()=>K});var F=U(8674),G=U(62459),j=U(35120),$=U(98013),H=U(6719),V=U(19690),W=U(28152),q=U(24382);let K=class extends q.j{constructor(){super(...arguments),this._imageContainer=null}setItemData(k){this._item=k}get isCardValid(){return!!this._item}updateCard(){super.updateCard(),this.updateIcon()}resetCard(){$.l.removeAll(this._imageContainer.legacyTransform.group,!0)}updateIcon(k){if(this.itemIsImageItemDrop(this._item)){const[B,U]=H.y.toInjectionParams(this._item.image);j.q.instance.prodigy.create.sprite(0,0,B,U,void 0,(B=>{null==B||B.setParent(this._imageContainer.legacyTransform.group),null==k||k(B)}))}else(0,V.mD)().createFromDataAdvanced(this._item,this._imageContainer.legacyTransform.group,0,0).then((([B,U])=>null==k?void 0:k(U))).catch(G.RQr.createHandler(`IconCard: Failed to create icon from item data for ${this._item.type}-${this._item.ID}`))}itemIsImageItemDrop(k){return void 0!==k.image}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],K.prototype,"_imageContainer",void 0),K=(0,F.Cg)([(0,G.EVk)("IconCard",W.Y.ui)],K)},34603:(k,B,U)=>{"use strict";U.d(B,{_:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(95925),H=U(57750),V=U(28152);let W=class extends G.y4o{constructor(){super(...arguments),this._initialAtlas="",this._initialFrame=null,this._initialAlpha=1,this._initialTint="#FFFFFF",this.resizeOnLoad=!1,this.resizeLimitedToParentSize=!1,this._currentAtlas="",this._currentFrame=void 0,this._sprite=null,this._isLoaded=!1,this.onLoaded=new G.HN0,this.onAssetSet=new G.HN0,this._alwaysDispatchOnLoaded=!1}get isLoaded(){return this._isLoaded}get sprite(){return this._sprite}get OnLoaded(){return this.onLoaded}create(){super.create(),this._currentAtlas=this._initialAtlas,this._currentFrame=this._initialFrame,this._sprite=j.q.instance.prodigy.create.sprite(0,0),this._sprite.roundPixels=!0,this.setRootContainer(this._sprite),this._initialAtlas&&this.setAsset(this._initialAtlas,this._initialFrame),this.setAlpha(this._initialAlpha),"string"==typeof this._initialTint?this.tint(parseInt(this._initialTint.substring(1),16)):"number"==typeof this._initialTint?this.tint(this._initialTint):G.VyI.log("%c Image create failed to apply tint "+typeof this._initialTint,G.$bb.Error,"color: #FF0000; background: #000;")}setAnchor(k,B){this._sprite.anchor.set(k,B)}tint(k){this.sprite?this._sprite.tint=k:this._initialTint=`#${k.toString(16)}`}setScale(k,B){this._sprite.scale.set(k,B)}getScale(){return this._sprite.scale}setAlpha(k){this.sprite?this._sprite.alpha=k:this._initialAlpha=k}getWorld(){return this._sprite.world}getWidth(){return this._sprite.width}getHeight(){return this._sprite.height}getEvents(){return this._sprite.events}setInputEnabled(k=!0){this._sprite.inputEnabled=k}enableDragging(k,B,U,F){this._sprite.inputEnabled&&(this._sprite.input.enableDrag(k,B),G.Aq$.isDefined(U)&&G.Aq$.isDefined(F)&&this._sprite.input.enableSnap(U,F))}disableDragging(){this._sprite.input.disableDrag()}getBounds(){const k=this._sprite.getBounds();return new G.M_G(k.x,k.y,k.width,k.height)}resetToOrigin(){this._sprite.position.set(0,0)}setAsset(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){if(this._isLoaded=!1,this._currentAtlas=k,this._currentFrame=B,this.onAssetSet.dispatch(),this._sprite){this._targetSource=k,this._targetFrame=B;const U=this.getAssetLoader();if(!U.isLoaded(k,$.i.Image))return yield U.loadAssets([k]),void(k===this._targetSource&&!this._sprite._destroyed&&U.isLoaded(k,$.i.Image)&&(yield this.setAsset(k,this._targetFrame)));this._sprite.key!==k?(this._sprite.loadTexture(k,B),this._isLoaded=!0,this.resizeOnLoad&&this.sizeToSourceImage(),this.onLoaded.dispatch()):B?this.setFrameName(B):this._alwaysDispatchOnLoaded&&this.onLoaded.dispatch(),this.sprite.name||(this.sprite.name=`${k}/${B}`)}else this._initialAtlas=k,this._initialFrame=B;this.updateSmooth()}))}getInputHandler(){return this._sprite.input}hasUniqueInstance(){return!0}setAngle(k){this._sprite.angle=k}setFrame(k){this._sprite.frame=k}sizeToSourceImage(){const k=this.gameObject.transform;if(!(k instanceof G.XVE))return;k.fullWidth=this._sprite.width,k.fullHeight=this._sprite.height;const B=this.gameObject.parent.transform;if(this.resizeLimitedToParentSize&&B instanceof G.XVE){const U=B.fullWidth>B.fullHeight?B.worldScale.x*k.fullWidth/B.fullWidth:B.worldScale.y*k.fullHeight/B.fullHeight;U>1&&(k.fullWidth/=U,k.fullHeight/=U)}}setFrameName(k){this._sprite&&G.Aq$.isDefined(this._sprite.key)?this._sprite.frameName=k:(this._initialFrame=k,this._targetFrame=k),this._currentFrame=k}getImageKey(){return this._currentAtlas}getFrame(){return this._currentFrame}destroy(){null!==this._sprite&&this._sprite.destroy(),this.onLoaded.dispose(),this.onAssetSet.dispose(),super.destroy()}getDimensions(){return!this._sprite||this._sprite[H.k.DESTROYED]?(G.VyI.log("Cannot get dimensions, sprite has been destroyed.",G.$bb.Error),new G.or0(0,0)):new G.or0(this._sprite.width,this._sprite.height)}getAssetLoader(){var k;return this.GameObject&&null!==(k=this.assetLoader)&&void 0!==k?k:j.q.instance.prodigy.gameContainer.get(G.t5G.AssetLoader)}};(0,F.Cg)([(0,G.Cdj)(G.t5G.AssetLoader),(0,F.Sn)("design:type",Object)],W.prototype,"assetLoader",void 0),(0,F.Cg)([(0,G.Bak)(),(0,G.W_S)(),(0,G.Lr6)(0),(0,G.nKb)("atlas"),(0,F.Sn)("design:type",String)],W.prototype,"_initialAtlas",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.Lr6)(0),(0,G.nKb)("frame"),(0,F.Sn)("design:type",String)],W.prototype,"_initialFrame",void 0),(0,F.Cg)([(0,G.g11)(),(0,G.Lr6)(0),(0,G.nKb)("alpha"),(0,F.Sn)("design:type",Number)],W.prototype,"_initialAlpha",void 0),(0,F.Cg)([(0,G.iEU)(),(0,G.Lr6)(0),(0,G.nKb)("tint"),(0,F.Sn)("design:type",Object)],W.prototype,"_initialTint",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],W.prototype,"resizeOnLoad",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],W.prototype,"resizeLimitedToParentSize",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],W.prototype,"onLoaded",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],W.prototype,"onAssetSet",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],W.prototype,"_alwaysDispatchOnLoaded",void 0),W=(0,F.Cg)([(0,G.EVk)("Image",V.Y.root)],W)},38042:(k,B,U)=>{"use strict";U.d(B,{p:()=>j});var F=U(62459),G=U(34603);class j extends F.uAl{constructor(){super(...arguments),this.onComplete=new F.HN0,this.onLoop=new F.HN0,this.currentAnimation=null}get OnAnimationComplete(){return this.onComplete}playAnimation(k,B,U){const F=this.GameObject.findComponent(G._);if(null!==F){const G=F.sprite;if(!G.key)return void F.OnLoaded.addOnce(this.playAnimation,this,-Number.MAX_SAFE_INTEGER,k,B);const j=G.animations.getAnimation(this.currentAnimation);null!==j&&(j.onComplete.removeAll(this),j.onLoop.removeAll(this));const $=G.animations.getAnimation(k);$?($.onComplete.removeAll(this),$.onComplete.addOnce((()=>{this.onComplete.dispatch()}),this),$.onLoop.removeAll(this),$.onLoop.add((()=>{this.onLoop.dispatch($.loopCount)}),this),G.animations.play(k,U,B),this.currentAnimation=k):this.onComplete.dispatch()}}stopAnimation(){const k=this.GameObject.findComponent(G._);null!==k&&k.sprite.animations.stop()}createAnimationSequence(k,B,U,F){const j=this.GameObject.findComponent(G._);null!==j&&j.sprite.animations.add(k,B,U,F,!0)}destroy(){const k=this.GameObject.findComponent(G._);if(null==k?void 0:k.sprite){const B=k.sprite.animations.getAnimation(this.currentAnimation);B&&(B.onComplete.removeAll(this),B.onLoop.removeAll(this))}this.onComplete.dispose(),this.onLoop.dispose(),super.destroy()}}},84246:(k,B,U)=>{"use strict";U.d(B,{j:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(92150);class H extends G.uAl{constructor(){super(...arguments),this._baseGameObject=null,this._anchorCorrectionOffsetX=0,this._anchorCorrectionOffsetY=0}initialize(k){if(this._baseGameObject.legacyTransform.group.children.length<=1)return;const B=this._baseGameObject.legacyTransform.group.getChildAt(1).exists;B||(this._baseGameObject.legacyTransform.group.getChildAt(1).exists=!0);const U=this._baseGameObject.legacyTransform.x,F=this._baseGameObject.legacyTransform.y;this._baseGameObject.legacyTransform.x-=this._baseGameObject.legacyTransform.group.getGlobalPosition().x-this._anchorCorrectionOffsetX,this._baseGameObject.legacyTransform.y-=this._baseGameObject.legacyTransform.group.getGlobalPosition().y-this._anchorCorrectionOffsetY,this._baseGameObject.legacyTransform.group.updateTransform(),this._bmd=j.q.instance.game.add.bitmapData(this._baseGameObject.legacyTransform.width,this._baseGameObject.legacyTransform.height),this._bmd.drawGroup(this._baseGameObject.legacyTransform.group),this._bmd.update(),this._bmdWidth=Math.floor(this._bmd.width),this._bmdHeight=Math.floor(this._bmd.height);const G=this._bmd.renderTarget.context.getImageData(0,0,this._bmdWidth,this._bmdHeight);this.applyEffect(G),this._bmd.renderTarget.context.putImageData(G,0,0),this._bmd.generateTexture(k,(B=>{var U,F;if(!(null===(F=null===(U=this.GameObject)||void 0===U?void 0:U.legacyTransform)||void 0===F?void 0:F.group))return;const G=new $._(j.q.instance.game,0,0,void 0,void 0,B);G.name=k,this.GameObject.legacyTransform.group.addChild(G)}),this),this._baseGameObject.legacyTransform.x=U,this._baseGameObject.legacyTransform.y=F,this._baseGameObject.legacyTransform.group.updateTransform(),B||(this._baseGameObject.legacyTransform.group.getChildAt(1).exists=!1)}destroy(){this._bmd&&(this._bmd.clear(),this._bmd.destroy()),this._bmd=null,super.destroy()}}(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],H.prototype,"_baseGameObject",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_anchorCorrectionOffsetX",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_anchorCorrectionOffsetY",void 0)},52156:(k,B,U)=>{"use strict";U.d(B,{X:()=>Z});var F,G=U(8674),j=U(62459),$=U(54300),H=U(88022),V=U(99625),W=U(36648),q=U(91207),K=U(77938),z=U(68152),Y=U(19690),Q=U(28152),X=U(34603);let Z=F=class extends j.uAl{constructor(){super(...arguments),this._targetImage=null,this._itemID=null,this._itemType=null,this._assetKey=null,this._updateTransformOnLoad=!0,this._onItemDataLoaded=new j.HN0}get onItemDataLoaded(){return this._onItemDataLoaded}get isLoaded(){var k,B;return null!==(B=null===(k=this._targetImage)||void 0===k?void 0:k.isLoaded)&&void 0!==B&&B}get assetID(){return this._itemID}create(){super.create(),this._updateTransformOnLoad&&this._targetImage.OnLoaded.add(this.updateOffset,this),"gold"===this._itemType&&(this._itemType="currency",this._itemID=1),this._targetImage&&this._itemType&&this._itemID&&this.updateTargetImage().catch(j.RQr.createHandler("Unable to load image"))}destroy(){var k;null===(k=this._loadSpineEffectIconPromise)||void 0===k||k.cancel(),this._updateTransformOnLoad&&this._targetImage.OnLoaded.remove(this.updateOffset,this),this._targetImage=null,this._onItemDataLoaded.dispose(),super.destroy()}setItem(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(!(null==k?void 0:k.ID))throw new Error("Item ID is not defined");yield this.setAsset(k.ID,k.type)}))}setAsset(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=null,U=null){(k!==this._itemID||j.Aq$.isDefined(B)&&B!==this._itemType||j.Aq$.isDefined(U)&&U!==this._assetKey)&&(this._itemID=k,j.Aq$.isDefined(B)&&(this._itemType=B),j.Aq$.isDefined(U)&&(this._assetKey=U),yield this.updateTargetImage())}))}updateTargetImage(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=yield K.t.secureGetItem(this._itemType,this._itemID);(0,z.v)(null!==B,`Item was not found for ${this._itemType}-${this._itemID}`);const U=F.createImageLoadData(B,this._assetKey);this.addItemEffects(B);try{yield null===(k=this._targetImage)||void 0===k?void 0:k.setAsset(U.source,U.frame)}catch(G){j.RQr.logError(G,"Error loading image from item")}this._onItemDataLoaded.dispatch()}))}addItemEffects(k){var B,U,F;this._targetImage&&(null===(B=this._effectIcon)||void 0===B||B.destroy(),j.Aq$.isDefined(null===(F=null===(U=k.data)||void 0===U?void 0:U.effect)||void 0===F?void 0:F.transform)&&(j.Aq$.isDefined(this._loadSpineEffectIconPromise)&&this._loadSpineEffectIconPromise.cancel(),this._loadSpineEffectIconPromise=(0,Y.Ks)().loadWithDependenciesFromGUID(V.l.MorphMarbleIconSpine),this._loadSpineEffectIconPromise.then((k=>{var B,U;const F=null===(B=K.t.getItem(this._itemType,this._itemID))||void 0===B?void 0:B.data;this._effectIcon=k,this.gameObject&&(null===(U=null==F?void 0:F.effect)||void 0===U?void 0:U.transform)?this.gameObject.addChild(this._effectIcon):k.destroy()})).catch(j.RQr.createHandler("Error loading item effect icon spine"))))}removeItemEffects(){var k,B;null===(k=this._effectIcon)||void 0===k||k.destroy(),(null===(B=this.gameObject)||void 0===B?void 0:B.children)&&(this.gameObject.children.length=0)}updateOffset(){const k=this._targetImage.getDimensions();this._targetImage.GameObject.transform instanceof j.XVE?(this._targetImage.GameObject.transform.setSizeDelta(k.width,k.height),this._targetImage.GameObject.transform.anchoredPivotOffset=new j.I9Y(-k.getHalfWidth(),-k.height)):this._targetImage.GameObject.transform.setPosition(-k.getHalfWidth(),-k.height)}static createImageAssetSourceName(k,B,U="default"){var F,G;const j=`Icon_${k}_${B}`,H=q.P[j];return H||(null!==(G=null!==(F=W.q[j])&&void 0!==F?F:$.p[`${k}-${B}`])&&void 0!==G?G:`${U}-${k}-${B}`)}static createImageLoadData(k,B){var U,G,$,V,W,K,z;const Y=null===(G=null===(U=k.metadata)||void 0===U?void 0:U.assets)||void 0===G?void 0:G[B];if(null==Y?void 0:Y.atlas)return{source:Y.atlas,frame:Y.frame};switch(k.type){case"gold":return{source:q.E.getIconForType("currency",1)};case"eyeColor":case"skinColor":return{source:H._.General_icons_json,frame:"empty"};case"mathTownInterior":return{source:H._.Towertown_interiors_store_json,frame:k.data.tag};case"mathTownFrame":return{source:H._.Towertown_frames_store_json,frame:k.data.tag};case"mathTownDecor":return{source:q.E.getTowerTownIcon(k.data.tag)};case"item":if(j.Aq$.isDefined(null===($=k.data.effect)||void 0===$?void 0:$.transform))return{source:q.E.getIconForType(k.data.effect.transform,k.data.effect.ID)};break;case"boots":case"hat":case"weapon":case"follow":case"outfit":case"dorm":case"hairColor":case"costume":if(!j.Aq$.isDefined(B))return{source:q.E.getIconForType(k.type,k.ID)};break;case"pet":if("spritesheet"===(null===(V=k.data)||void 0===V?void 0:V.assetType)||"spritesheet"===(null===(z=null===(K=null===(W=k.metadata)||void 0===W?void 0:W.assets)||void 0===K?void 0:K.reduced)||void 0===z?void 0:z.type))return{source:`${B}-${k.type}-${k.ID}`};break;case"currency":if(27===k.ID&&"upscaled"===B)return{source:H._.Ui_battle_pass_ultimate_json,frame:"magicoin-pile"}}return{source:F.createImageAssetSourceName(k.type,k.ID,B)}}};(0,G.Cg)([(0,j.MnK)(X._),(0,G.Sn)("design:type",X._)],Z.prototype,"_targetImage",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Z.prototype,"_itemID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Z.prototype,"_itemType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Z.prototype,"_assetKey",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],Z.prototype,"_updateTransformOnLoad",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],Z.prototype,"_onItemDataLoaded",void 0),Z=F=(0,G.Cg)([(0,j.EVk)("ImageItemDataLoader",Q.Y.data)],Z)},79979:(k,B,U)=>{"use strict";U.d(B,{Y:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(92150);let H=class extends G.y4o{constructor(){super(...arguments),this._image=null,this._atlas="",this._frame="",this._uniformScale=1}create(){super.create(),this._group=j.q.instance.prodigy.create.group(void 0,"ImagePlaceholder",!1),this.setRootContainer(this._group),this._atlas&&(this._image=new $._(j.q.instance.game,0,0,this._atlas,this._frame),this._image.scale.set(this._uniformScale,this._uniformScale),this._group.addChild(this._image))}changeImage(k,B,U){var F;null===(F=this._image)||void 0===F||F.destroy(),this._image=new $._(j.q.instance.game,0,0,void 0,void 0,k);const H=!!G.Aq$.isDefined(U)&&U,V=G.Aq$.isDefined(B)?B:1;this._image.scale.set(H?-V:V,V),this._group.addChild(this._image)}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"_atlas",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"_frame",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_uniformScale",void 0),H=(0,F.Cg)([(0,G.EVk)("ImagePlaceholder")],H)},38181:(k,B,U)=>{"use strict";U.d(B,{S:()=>z});var F=U(8674),G=U(62459),j=U(68910),$=U(35120),H=U(60881),V=U(11472),W=U(43846),q=U(7259),K=U(28152);let z=class extends G.y4o{constructor(){super(...arguments),this._id="",this._placeholder="",this._tabindex=0,this._showPasswordByDefault=!1,this._newPassword=!1,this._clearable=!1,this._backgroundColor=null,this._borderRadius=null,this._fontFamily=null,this._showInputPromptOnAndroid=!0,this._enablePerKeyEvents=!1,this._input=document.createElement("input"),this._eye=document.createElement("i"),this._check=document.createElement("check"),this._eyeEnabled=!1,this._checkEnabled=!1,this._clearContainer=null,this._clearIcon=document.createElement("i"),this._clearText=document.createElement("div"),this._canvas=null,this._style={},this.onTextChanged=new G.HN0,this.onFocusChanged=new G.HN0,this.onBlur=new G.HN0,this._onTogglePasswordShowHide=new G.HN0,this.onClear=new G.HN0,this._clearContainerVisible=!1,this._showPrompt=!1,this._previousTextValue=""}get id(){return this._id?this._id:null}get text(){return this._input?this._input.value:null}set text(k){this._input&&(this._previousTextValue=this._input.value,this._input.value=k,this._previousTextValue!==k&&this._onTextChangedHandler(null))}get htmlInputElement(){return this._input}get onTogglePasswordShowHide(){return this._onTogglePasswordShowHide}create(){super.create();const k=new j.Container;k.on("destroyed",this.destroy,this),this.setRootContainer(k),this._input.value="",this._input.id=this._id,this._input.className="game-input",this._input.autocapitalize="off",this._input.autocomplete="off",this._input.tabIndex=this._tabindex,this._input.placeholder=G.Aq$.isDefined(this._placeholder)?$.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(this._placeholder):"",this._type&&(this._input.type=this._type),G.Aq$.isDefined(this._backgroundColor)&&(this._input.style.backgroundColor=`#${this._backgroundColor}`),G.Aq$.isDefined(this._borderRadius)&&(this._input.style.borderRadius=`${this._borderRadius}px`),G.Aq$.isDefined(this._fontFamily)&&(this._input.style.fontFamily=this._fontFamily);document.getElementById("external-ui").appendChild(this._input);"password"===this._type&&this._clearable&&G.VyI.log("This input field is set as both a password field and as clearable. Due to padding issues, the clear button will not be displayed.",G.$bb.Warning),"password"===this._type?(this.createEye(),this._showPasswordByDefault&&this._onEyeClicked()):this._clearable&&this.createClear(),G.o5U.isAndroid()&&(this._showPrompt=this._showInputPromptOnAndroid),this.applyTransform(),this.addListeners(),this.enablePerKeyEvents(this._enablePerKeyEvents)}createEye(){if(!this._eyeEnabled){this._eyeEnabled=!0,this._showPasswordByDefault?this._eye.className="fa fa-eye":this._eye.className="fa fa-eye-slash",this._eye.id=`${this._id}eye`,this._eye.style.position="absolute",this._eye.style.left="0px",this._eye.style.top="0px",this._eye.style.fontSize="25px",this._eye.style.color="#363636";document.getElementById("external-ui").appendChild(this._eye);this._onEyeClicked=()=>{this.togglePasswordShowHide(),this._onTogglePasswordShowHide.dispatch()},this._eye.addEventListener("click",this._onEyeClicked)}}createCheck(){if(!this._checkEnabled){this._checkEnabled=!0,this._check.className="fa fa-check-circle",this._check.id=`${this._id}check`,this._check.style.position="absolute",this._check.style.left="0px",this._check.style.top="0px",this._check.style.fontSize="25px",this._check.style.color="#A5C754";document.getElementById("external-ui").appendChild(this._check)}}setDisabled(k){this._input.disabled=k,this._input.style.backgroundColor=k?"#F0F0F0":"#FFFFFF"}setInError(k){if(this._input.style.backgroundColor=k?"#FEC4C4":"#FFFFFF",this._input.style.border=k?"1px solid #E03E3E":"1px solid #363636",this._input.style.outline=k?"none":"",this._checkEnabled){const k=document.getElementById(`${this._id}check`);G.Aq$.isDefined(k)&&k.remove(),this._checkEnabled=!1}}setValid(k){this._input.style.backgroundColor=k?"#F2F7E8":"#FFFFFF",this._input.style.border=k?"1px solid #6B9F27":"1px solid #363636",this._input.style.outline=k?"none":"",this.createCheck()}setClearContainerVisibility(k){this._clearContainer&&(this._clearContainerVisible=k,this._clearContainer.style.display=this._clearContainerVisible?"flex":"none")}createClear(){this._clearContainer=document.createElement("div"),this._clearContainer.appendChild(this._clearIcon),this._clearContainer.appendChild(this._clearText),this._clearIcon.className="fa fa-times",this._clearText.innerText=(0,W.k)("INPUT_CLEAR"),G.Aq$.isDefined(this._fontFamily)&&(this._clearText.style.fontFamily=this._fontFamily),this._clearContainer.id=`${this._id}clear`,this._clearContainer.style.display="none",this._clearContainer.style.position="absolute",this._clearContainer.style.left="0px",this._clearContainer.style.top="0px",this._clearContainer.style.fontSize="25px",this._clearContainer.style.color="#363636",this._clearContainer.style.cursor="pointer",this.setClearContainerVisibility(!1);document.getElementById("external-ui").appendChild(this._clearContainer);this._onClearClicked=()=>{this.text="",this.setClearContainerVisibility(!1),this.onClear.dispatch()},this._clearContainer.addEventListener("click",this._onClearClicked)}togglePasswordShowHide(){this._eyeEnabled&&("password"===this._type?(this.setType("text"),this._eye.className="fa fa-eye"):(this.setType("password"),this._eye.className="fa fa-eye-slash"))}addListeners(){this._onTextChangedHandler=k=>{this.setClearContainerVisibility(""!==this.text),this.onTextChanged.dispatch(this.text)},this._onFocusHandler=k=>{if(this._showPrompt)return k.preventDefault(),k.stopImmediatePropagation(),void this._input.blur();this.handleFocusChanged(!0),this.onFocusChanged.dispatch()},this._onBlurHandler=k=>{if(this._showPrompt)return k.preventDefault(),void k.stopImmediatePropagation();this.handleFocusChanged(!1),this.onBlur.dispatch()},this._onClickHandler=k=>(0,F.sH)(this,void 0,void 0,(function*(){this._input.blur();const k=yield q.y.showPrompt(this._placeholder,this.text);G.Aq$.isDefined(k)&&(this.text=k,this.setClearContainerVisibility(""!==this.text),this.onTextChanged.dispatch(this.text))})),this._showPrompt&&this._input.addEventListener("click",this._onClickHandler),this._input.addEventListener("focus",this._onFocusHandler),this._input.addEventListener("blur",this._onBlurHandler),this.gameObject.onActiveInHierarchyChanged.add((()=>{this.setVisible(this.gameObject.activeInHierarchy)}),this)}getPositionRelativeToParent(k){const B=k,U={x:0,y:0};return B.transform instanceof G.XVE?(U.x=B.transform.worldMatrix.tx-B.transform.sizeDelta.width*B.transform.pivot.x,U.y=B.transform.worldMatrix.ty-B.transform.sizeDelta.height*B.transform.pivot.y):B.legacyTransform?(U.x+=B.legacyTransform.group.worldTransform.tx,U.y+=B.legacyTransform.group.worldTransform.ty):G.VyI.log("The GameObject needs to have a RectTransform or LegacyTransform attached to it in order to size the input field appropriately.",G.$bb.Error),U}applyTransform(){let k,B;this.GameObject.transform instanceof G.XVE?(k=this.GameObject.transform.sizeDelta.width,B=this.GameObject.transform.sizeDelta.height):this.GameObject.legacyTransform?(k=this.GameObject.legacyTransform.width,B=this.GameObject.legacyTransform.height):G.VyI.log("The GameObject needs to have a RectTransform or LegacyTransform attached to it in order to size the input field appropriately.",G.$bb.Error);const{x:U,y:F}=this.getPositionRelativeToParent(this.GameObject);this._canvas||(this._canvas=document.getElementById("game-container").getElementsByTagName("canvas")[0]);const j=this._canvas.clientHeight/$.q.instance.game.world.height;this._input.style.height=j*B+"px";const H=this._canvas.clientWidth/$.q.instance.game.world.width;this._input.style.width=H*k+"px";const W=j*F+(this._input.style.marginTop?parseInt(this._input.style.marginTop):0),q=H*U+(this._input.style.marginLeft?parseInt(this._input.style.marginLeft):0),K=j*B*.5;this.setStyle("top",`${W}px`),this.setStyle("left",`${q}px`),this.setStyle("font-size",`${K}px`);const z=this.GameObject.findComponentInParent(V.B),Y=null==z?void 0:z.getCollisionBox();let Q=!1;if(Y&&(FY.worldTransform.ty+Y.height||UY.worldTransform.tx+Y.width?(this.setStyle("display","none"),Q=!0):this.setStyle("display","unset")),this._eyeEnabled&&(this._eye.style.top=`${W+.2*parseInt(this._input.style.height)}px`,this._eye.style.left=(this._checkEnabled?q-35:q)+.95*parseInt(this._input.style.width)-K+"px",this._eye.style.fontSize=`${K}px`,this.setStyle("padding-right",`${K+5+.05*parseInt(this._input.style.width)}px`)),this._checkEnabled&&(this._check.style.top=`${W+.2*parseInt(this._input.style.height)}px`,this._check.style.left=q+.95*parseInt(this._input.style.width)-K+"px",this._check.style.fontSize=`${K}px`,this.setStyle("padding-right",`${K+5+.05*parseInt(this._input.style.width)}px`)),this._clearContainer){this._clearContainer.style.display=this._clearContainerVisible&&!Q?"flex":"none",this._clearContainer.style.top=`${W+.25*parseInt(this._input.style.height)}px`,this._clearContainer.style.fontSize=.7*K+"px";const k=this._clearContainer.clientWidth+4;this._clearContainer.style.left=q+parseInt(this._input.style.width)-k+"px",this._clearIcon.style.paddingTop=.09*parseInt(this._input.style.height)+"px",this._clearIcon.style.paddingRight=.015*parseInt(this._input.style.width)+"px",this.setStyle("padding-right",`${k}px`)}if(G.Aq$.isDefined(this._style))for(const G in this._style)this._style.hasOwnProperty(G)&&this.setStyle(G,this._style[G])}setVisible(k){k?(this._input.type=this._type,""!==this.text&&this.setClearContainerVisibility(k)):(this._input.type="hidden",this.setClearContainerVisibility(k))}setOpacity(k){this.setStyle("opacity",k),this._eyeEnabled&&(this._eye.style.opacity=k),this._checkEnabled&&(this._check.style.opacity=k),this._clearContainer&&(this._clearContainer.style.opacity=k)}setStyle(k,B){this._input.style.setProperty(k,B)}setType(k){G.Aq$.isDefined(k)&&(this._type=k,this._input.type=this._type)}getType(){return this._type}setTypeToPassword(){"password"!==this._type&&"text"!==this._type&&(this._type="password",this._input.type=this._type,this.createEye(),this._showPasswordByDefault&&this._onEyeClicked())}enablePerKeyEvents(k){k?this._input.addEventListener("keyup",this._onTextChangedHandler):this._input.removeEventListener("keyup",this._onTextChangedHandler)}handleFocusChanged(k){k?$.q.instance.game.input.keyboard.clearCaptures():$.q.instance.game.input.keyboard.addKeyCapture([H.D.BACKSPACE])}removeExisting(){var k;const B=document.getElementById(this._id);if(G.Aq$.isDefined(B)&&!this._newPassword&&B.remove(),this._eyeEnabled){const k=document.getElementById(`${this._id}eye`);G.Aq$.isDefined(k)&&k.remove()}if(this._checkEnabled){const k=document.getElementById(`${this._id}check`);G.Aq$.isDefined(k)&&k.remove()}null===(k=this._clearContainer)||void 0===k||k.remove()}getDimensions(){return this.GameObject.transform instanceof G.XVE?new G.or0(this.GameObject.transform.sizeDelta.width,this.GameObject.transform.sizeDelta.height):this.GameObject.legacyTransform?new G.or0(this.GameObject.legacyTransform.width,this.GameObject.legacyTransform.height):new G.or0(100,100)}update(){super.update(),this.applyTransform()}destroy(){var k;super.destroy(),this.onTextChanged.dispose(),this.onFocusChanged.dispose(),this.onBlur.dispose(),this._onTogglePasswordShowHide.dispose(),this.onClear.dispose(),this._input.removeEventListener("keyup",this._onTextChangedHandler),this._input.removeEventListener("click",this._onClickHandler),this._input.removeEventListener("focus",this._onFocusHandler),this._input.removeEventListener("blur",this._onBlurHandler),null===(k=this.gameObject)||void 0===k||k.onActiveInHierarchyChanged.removeAll(this),this._onTextChangedHandler=null,this._onClickHandler=null,this._onFocusHandler=null,this._onBlurHandler=null,this._eyeEnabled&&(this._onEyeClicked=null,this._eye.removeEventListener("click",this._onEyeClicked)),this._clearContainer&&(this._onClearClicked=null,this._clearContainer.removeEventListener("click",this._onClearClicked)),this.removeExisting()}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],z.prototype,"_type",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.Lr6)(0),(0,G.nKb)("name"),(0,F.Sn)("design:type",String)],z.prototype,"_id",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],z.prototype,"_placeholder",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_tabindex",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],z.prototype,"_showPasswordByDefault",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],z.prototype,"_newPassword",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],z.prototype,"_clearable",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],z.prototype,"_backgroundColor",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],z.prototype,"_borderRadius",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],z.prototype,"_fontFamily",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],z.prototype,"_showInputPromptOnAndroid",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],z.prototype,"_enablePerKeyEvents",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],z.prototype,"onTextChanged",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],z.prototype,"onFocusChanged",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],z.prototype,"onClear",void 0),z=(0,F.Cg)([(0,G.EVk)("InputText",K.Y.uiInput)],z)},63746:(k,B,U)=>{"use strict";U.d(B,{Z:()=>J});var F=U(8674),G=U(62459),j=U(68910),$=U(17446),H=U(35120),V=U(77938),W=U(24110),q=U(53661),K=U(30226),z=U(28152),Y=U(35084),Q=U(52156),X=U(72799);const Z=["eyeColor","hairColor","skinColor"];let J=class extends G.uAl{constructor(){super(...arguments),this._rarityBackgrounds=[],this._rarityCounters=[],this.initializeOnPostCreate=!0,this._onClickReference=void 0}get itemCardData(){return this._itemCardData}get itemData(){return this._itemData}postCreate(){super.postCreate(),this.initializeOnPostCreate&&this.initializeItemCard(this.getInjectedValue(q.Tl.Data),this.getInjectedValue(q.Tl.OnClick))}destroy(){this._onClickReference&&(this._inputOverlay.onClicked.remove(this._onClickReference,this),this._onClickReference=void 0),super.destroy()}initializeItemCard(k,B){this.resetItemCard(),this._itemCardData=k,k?V.t.secureGetItem(k.type,k.id).then((U=>{var F,V,W;if(!this.GameObject.isDestroyed&&(null===(F=this._itemCardData)||void 0===F?void 0:F.id)===(null==k?void 0:k.id)&&(null===(V=this._itemCardData)||void 0===V?void 0:V.type)===(null==k?void 0:k.type)&&U.data){if(this._itemData=U.data,this._rarityBackgrounds[null!==(W=this._itemData.rarity)&&void 0!==W?W:0].active=!0,this._itemNameText.text=K.J.getItemName(U),this._itemData.rarity===$.E.Rare||this._itemData.rarity===$.E.Heroic?this._itemNameText.fill=j.Color.shared.setValue(16777215).toHex():this._itemNameText.fill=j.Color.shared.setValue(3552822).toHex(),this._equippedIcon.active=this._currentPlayer.player.equipment.hasItemEquipped(k.type,k.id),this._memberIcon.active=!!this._itemData.member,this.handleRarityCounters(),"costume"===k.type)this._playerContainer.active=!0,this._imageItemDataLoader.GameObject.active=!1,this._renderPlayerAsTextureComponent.renderPlayerAsTexture(Object.assign(Object.assign({},this._currentPlayer.getAppearance()),{costume:k.id}));else if(Z.includes(k.type)){this._playerContainer.active=!1,this._imageItemDataLoader.GameObject.active=!1;H.q.instance.prodigy.icon.createFromData(U).setParent(this._itemImageSortingAnchor.getRootContainer())}else this._imageItemDataLoader.removeItemEffects(),this._imageItemDataLoader.setAsset(k.id,k.type).catch(G.RQr.createHandler("ItemCardComponent: Failed to load the icon for the item card")),this._playerContainer.active=!1,this._imageItemDataLoader.GameObject.active=!0;this._onClickReference=null!=B?B:void 0,this._onClickReference&&this._inputOverlay.onClicked.add(this._onClickReference,this),this._inputOverlay.useHandCursor=!!B}})).catch((()=>{this.setCardState(!0)})):this.setCardState(!0)}resetItemCard(){this.setCardState(!1),this._rarityBackgrounds.forEach((k=>{k.active=!1})),this._equippedIcon.active=!1,this._memberIcon.active=!1,this._onClickReference&&(this._inputOverlay.onClicked.remove(this._onClickReference,this),this._onClickReference=void 0)}handleRarityCounters(){var k,B,U;if(!G.Aq$.isDefined(this._itemCardData.N)||1===this._itemCardData.N)return void(this._rarityCounters[null!==(k=this._itemData.rarity)&&void 0!==k?k:0].active=!1);this._rarityCounters[null!==(B=this._itemData.rarity)&&void 0!==B?B:0].active=!0;const F=this._rarityCounters[null!==(U=this._itemData.rarity)&&void 0!==U?U:0].findComponentInChildren(G.EYj);this._itemCardData.receivedThroughGotItemFlow&&(F.fontSize=24,F.font=G.dBt.PaytoneOne),F.text=`${this._itemCardData.receivedThroughGotItemFlow?"x":""}${this._itemCardData.N}${this._itemCardData.max?`/${this._itemCardData.max}`:""}`}setCardState(k){this._nonEmptyState.active=!k,this._emptyState.active=k}setNewNotificationBadgeVisibility(k){this._newNotificationBadge.active=k}setEquippedIconVisibility(k){this._equippedIcon.active=k}};(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",Function)],J.prototype,"_currentPlayer",void 0),(0,F.Cg)([(0,G.MnK)(Q.X),(0,F.Sn)("design:type",Q.X)],J.prototype,"_imageItemDataLoader",void 0),(0,F.Cg)([(0,G.MnK)(W.B),(0,F.Sn)("design:type",W.B)],J.prototype,"_itemImageSortingAnchor",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],J.prototype,"_itemNameText",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],J.prototype,"_rarityBackgrounds",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],J.prototype,"_rarityCounters",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_memberIcon",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_equippedIcon",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"revealOverlay",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_nonEmptyState",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_emptyState",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_playerContainer",void 0),(0,F.Cg)([(0,G.MnK)(X.M),(0,F.Sn)("design:type",X.M)],J.prototype,"_renderPlayerAsTextureComponent",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_newNotificationBadge",void 0),(0,F.Cg)([(0,G.MnK)(Y.n),(0,F.Sn)("design:type",Y.n)],J.prototype,"_inputOverlay",void 0),J=(0,F.Cg)([(0,G.EVk)("Item Card",z.Y.ui)],J)},85540:(k,B,U)=>{"use strict";U.d(B,{r:()=>W,w:()=>V});var F=U(58776),G=U(15821),j=U(35120),$=U(64868),H=U(10711);function V(k){var B,U;const F=k.item;if(G.A.isDefined(k.dynamicStoreData)&&$._.isFeatureEnabled()){return W(k)===(null!==(U=null===(B=k.dynamicStoreData)||void 0===B?void 0:B.itemQuantity)&&void 0!==U?U:1)}const H=j.q.instance.game.rootContainer.get("e20-0fb0");return!(!H||!F)&&H.player.isItemOwned({type:F.type,ID:F.ID})}function W(k){var B,U,G,j;const $=null!==(U=null===(B=k.dynamicStoreData)||void 0===B?void 0:B.offers)&&void 0!==U?U:[];let V=0;if($.length>1)$.forEach((k=>{k.progress.status===F.t.COMPLETE&&V++}));else{const k=$[0].progress,B=(0,H.Nx)($[0]);V=k.status===F.t.COMPLETE?B:null!==(j=null===(G=k.data)||void 0===G?void 0:G.timesCompleted)&&void 0!==j?j:0}return V}},14801:(k,B,U)=>{"use strict";U.d(B,{m:()=>Ot});var F,G=U(8674),j=U(62459),$=U(36648),H=U(56942),V=U(12049),W=U(17446),q=U(66582),K=U(35120),z=U(1195),Y=U(77938),Q=U(66207),X=U(73797),Z=U(65050),J=U(41674),tt=U(67665),et=U(15485),it=U(46784),st=U(24110),nt=U(19633),at=U(64353),rt=U(95057),ot=U(25317),ht=U(21097),ct=U(21418),dt=U(98252),lt=U(44094),ut=U(30226),ft=U(47255),bt=U(99737),pt=U(41538),vt=U(75777),gt=U(28152),mt=U(13693),yt=U(52156),_t=U(29834),Et=U(51972);!function(k){k[k.BuyButtonIndex=0]="BuyButtonIndex",k[k.MemberBuyButtonIndex=1]="MemberBuyButtonIndex",k[k.WearButtonIndex=2]="WearButtonIndex",k[k.LockedWearButtonIndex=3]="LockedWearButtonIndex",k[k.MemberWearButtonIndex=4]="MemberWearButtonIndex",k[k.RemoveButtonIndex=5]="RemoveButtonIndex",k[k.HideButtonIndex=6]="HideButtonIndex",k[k.ShowButtonIndex=7]="ShowButtonIndex",k[k.UseButtonIndex=8]="UseButtonIndex",k[k.RideButtonIndex=9]="RideButtonIndex",k[k.EquipButtonIndex=10]="EquipButtonIndex",k[k.UpsellButtonIndex=11]="UpsellButtonIndex",k[k.TreasurePointsButtonIndex=12]="TreasurePointsButtonIndex",k[k.LockedEquipButtonIndex=13]="LockedEquipButtonIndex",k[k.MemberEquipButtonIndex=14]="MemberEquipButtonIndex"}(F||(F={}));const wt=["hat","outfit","boots","weapon","mount","spellRelic","costume"],Tt=["hair","hairColor","face","skinColor","eyeColor"],St=1.55,At={pet:1,dorm:1.25,mathTownFrame:.75,mathTownInterior:.75,mathTownDecor:.75,hair:St,hairColor:St,face:St,skinColor:St,eyeColor:St,follow:St,item:St,currency:St,spellRelic:St,weapon:St,hat:St,outfit:St,boots:St,mount:1,costume:St};var Ct;!function(k){k.WEAR="ITEM_BUTTON_WEAR",k.REMOVE="ITEM_BUTTON_REMOVE",k.RIDE="ITEM_BUTTON_RIDE",k.BUY="ITEM_BUTTON_BUY"}(Ct||(Ct={}));let Ot=class extends j.uAl{constructor(){super(),this._rarityBanners=[],this._oneLineItemNameRarityBanners=[],this._twoLineItemNameRarityBanners=[],this._stratifiedMemberTierLabelTexts=[],this._buttons=[],this._owned=!1}setup(k,B=ct.s.View,U,F){let G,$;this.hideElements(),this._mode=B,this._gearBattleStats=this._currentPlayer.player.getGearBattleStats(),this._closeCallback=U,k instanceof V.J?(G=k.getType(),$=k.getID(),this._cost=k.getCost()[0]):this.isBattlePassReward(k)?(G=k.itemDrop.type,$=k.itemDrop.ID,this._locked=k.claimable):(G=k.type,$=k.ID,j.Aq$.isDefined(k.L)&&(this._locked=1===k.L)),this._segment.featureCommon.sendInterfaceEvent({interfaceName:it.B.ItemInfo,interfaceType:J.Wm.InfoPanel,instanceType:Z.N.Interface,originType:J.$N.ButtonClick,originID:F}),Y.t.secureGetItem(G,$).then((U=>{var F,V;if(U){if(this._itemData=U,this._itemType=G,this._itemId=$,this._owned=this._currentPlayer.player.backpack.hasItem(G,$)>0,!this._itemData.data)return j.VyI.log(`ItemDetailsModalComponent: Item data is missing for item type ${G} and item id ${$}, closing the modal`,j.$bb.Error),void this.GameObject.destroyDeferred();if(!this._owned){const k=K.q.instance.prodigy.gameContainer.get("61f-37d6");this._owned=k.getCount({type:G,id:$})>0}if(j.Aq$.isDefined(this._locked)||(this._locked=1===this._itemData.data.member),this._itemDescription.text=this._localizer.getText(ut.J.getLocalizationFlavorKey(this._itemData)),this._previewContainer.transform.setScale(null!==(F=At[this._itemType])&&void 0!==F?F:1),this._memberIcon.active=1===this._itemData.data.member,this._rarity=this._itemData.data.rarity,this.isBattlePassReward(k)&&k.membershipTier===q._$.MemberUltra&&(this._rarity=5),this.setupRarity(),this.setupOptionalProperties(B),"follow"===this._itemType?this.setupFollowItem():wt.includes(this._itemType)?this.setupWearableEquipmentItem(B):Tt.includes(this._itemType)?this.setupAppearanceItem():"pet"===this._itemType?(this._spine.OnLoaded.addOnce((()=>{this._spineAnimator.playAnimation("idle",!0)}),this),this._spine.setAsset(H.Q[`Spine_pet_${this._itemId}_json`])):(null===(V=this._itemData.data.effect)||void 0===V?void 0:V.transform)?this.setupMorphMarbleItem():this.setupIcon(),B===ct.s.Buy){for(const k of this._buttons)k.GameObject.active=!1;this.setupPurchaseableItem()}else if(B===ct.s.View)for(const k of this._buttons)k.GameObject.active=!1;this.isBattlePassReward(k)&&this.setupBattlePassReward(k)}})).catch(j.RQr.createHandler(`ItemDetailsModalComponent: Failed to load item data for ${G} ${$}`))}close(k=!1){this._closeCallback&&this._closeCallback.apply(this,[k]),this.GameObject.destroyDeferred()}hideElements(){this._rarityBanners.forEach((k=>{k.active=!1})),this._oneLineItemNameRarityBanners.forEach((k=>{k.active=!1})),this._twoLineItemNameRarityBanners.forEach((k=>{k.active=!1})),this._itemName.text="",this._itemDescription.text="",this._memberIcon.active=!1,this._gearStat1.GameObject.active=!1,this._gearStat2.GameObject.active=!1,this._spellStat.GameObject.active=!1,this._costContainer.active=!1,this._levelLockContainer.active=!1,this._levelLockText.text="",this._bonusBackground.active=!1,this._buttons.forEach((k=>{k.GameObject.active=!1}))}setupRarity(){var k,B,U;if(this._itemData.data){if(this._itemName.text=ut.J.getItemName(this._itemData),this._rarityBanners.forEach((k=>k.active=!1)),this._oneLineItemNameRarityBanners.forEach((k=>k.active=!1)),this._twoLineItemNameRarityBanners.forEach((k=>k.active=!1)),this._itemName.wordWrap=!1,(null===(k=this._itemName.GameObject)||void 0===k?void 0:k.transform).sizeDelta.width<=300?this._oneLineItemNameRarityBanners[null!==(B=this._rarity)&&void 0!==B?B:W.E.Common].active=!0:(this._twoLineItemNameRarityBanners[null!==(U=this._rarity)&&void 0!==U?U:W.E.Common].active=!0,this._itemName.wordWrap=!0,this._itemName.updateText()),j.Aq$.isDefined(this._rarity)){this._rarityBanners[this._rarity].active=!0}this._rarity===W.E.Rare||this._rarity===W.E.Heroic?this._itemName.fill="#ffffff":this._itemName.fill="#363636"}}addCharacter(k=!1,B=!1,U=!1){this._characterPreview.addCharacter(this._currentPlayer.player,this._characterPreviewSortingAnchor.getRootContainer()),this._characterPreview.setInputEnabled(!1),k&&this._characterPreview.setEquipment("mount",null),B&&this._characterPreview.setEquipment("hat",null),U&&this._characterPreview.setEquipment("costume",null)}setupOptionalProperties(k){var B,U,F;if(!this._itemData)return;if(k===ct.s.Buy){this._costContainer.active=!0;let k="[mail-gold] ";const B=ut.J.getPurchasePrice(this._itemData.data,this._cost);"currency"===this._cost.getType()&&1===this._cost.getID()||(k=`[${Y.t.getItem(this._cost.getType(),this._cost.getID()).data.icon}] `),K.q.instance.prodigy.create.font(this._currencyIconSortingAnchor.getRootContainer(),0,0,k);const U=this._costContainer.findComponentInChildren(j.EYj);U&&(U.text=`${B}`)}const G=this._itemData.data.spellID;if(j.Aq$.isDefined(G)){const k=Y.t.getItem("spellV2",G);if(k){const G=null===(F=null===(U=null===(B=null==k?void 0:k.metadata)||void 0===B?void 0:B.assets)||void 0===U?void 0:U.icon)||void 0===F?void 0:F.assetKey,j=$.q[lt.$.capitalizeFirstLetter(G)];this._spellStat.setSpellStatData({name:k.data.name,iconGuid:j,element:k.data.element}),this._spellStat.GameObject.active=!0}}if(j.Aq$.isDefined(this._itemData.data.stats)&&"pet"!==this._itemType&&"spellRelic"!==this._itemType){const k={};for(const F in this._itemData.data.stats)this._itemData.data.stats[F]>0&&(k[F]=this._itemData.data.stats[F]);const B=Object.keys(k)[0],U=Object.keys(k)[1];B&&this.setupGearStatDisplay(B,this._gearStat1),U&&this.setupGearStatDisplay(U,this._gearStat2)}}setupGearStatDisplay(k,B){var U;let F=0;this._gearBattleStats[this._itemType]&&(F=null!==(U=this._gearBattleStats[this._itemType][k])&&void 0!==U?U:0),B.setGearStatData(k,this._itemData.data.stats[k],this._itemData.data.stats[k]-F),B.GameObject.active=!0}activateButton(k,B){this._buttons[k].GameObject.active=!0,this._buttons[k].onClick.add(B,this)}setupWearableEquipmentItem(k){var B,U,G,$,H,V;"spellRelic"===this._itemType?this.setupIcon():(this.addCharacter("mount"!==this._itemType,!1,!ht.Dq.includes(this._itemType)),this._characterPreview.setEquipment(this._itemType,this._itemId)),"costume"===this._itemType&&this._segment.item.sendCostumePreviewedEvent(this._itemId,ut.J.getItemName(this._itemData),null!==(U=1===(null===(B=this._itemData.data)||void 0===B?void 0:B.member))&&void 0!==U&&U,null!==(G=this._rarity)&&void 0!==G?G:W.E.Common);const q=this._currentPlayer.player,z=q.equipment.hasItemEquipped(this._itemType,this._itemId),Y=this._locked&&1===(null===($=this._itemData.data)||void 0===$?void 0:$.member),Q=q.hasMembership(),X=!j.Aq$.isDefined(null===(H=this._itemData.data)||void 0===H?void 0:H.lockLevel)||this._currentPlayer.getLevel()>=this._itemData.data.lockLevel,Z=(!Y||Q)&&X,J=(k=Ct.WEAR)=>{const B=`${this._localizer.getText(k)}-button`;this.sendButtonEvent(B),q.equip(this._itemId,this._itemType,!0,B).then((k=>{k&&(q.appearanceChanged=!0,K.q.instance.prodigy.audio.playSFX(18,"whoosh"))})).catch(j.RQr.createHandler(`ItemDetailsModalComponent:setupWearableEquipmentItem Failed to equip item ${this._itemType}-${this._itemId}`)).finally((()=>{this.close(!0)}))};z?this.activateButton(F.RemoveButtonIndex,(()=>{const k=`${this._localizer.getText(Ct.REMOVE)}-button`;this.sendButtonEvent(k),q.unEquip(this._itemId,this._itemType,k).then((k=>{k&&(q.appearanceChanged=!0,K.q.instance.prodigy.audio.playSFX(18,"blop"))})).catch(j.RQr.createHandler(`ItemDetailsModalComponent:setupWearableEquipmentItem Failed to unequip item ${this._itemType}-${this._itemId}`)).finally((()=>{this.close()}))})):k===ct.s.WizardCostumesMenu&&"costume"===this._itemType?Y&&!Q?this.activateButton(F.MemberWearButtonIndex,(()=>{this.sendButtonEvent(`${this._localizer.getText(Ct.WEAR)}-button`,it.B.MembershipParentAd),this.memberLockedEquipFlow()})):this.activateButton(F.WearButtonIndex,(()=>J(Ct.WEAR))):this._owned&&"mount"===this._itemType?this.activateButton(F.RideButtonIndex,(()=>J(Ct.RIDE))):this._owned&&Z?this.activateButton("weapon"===this._itemType?F.EquipButtonIndex:F.WearButtonIndex,(()=>J())):this._owned&&!X?(this._levelLockText.text=`Level ${null===(V=this._itemData.data)||void 0===V?void 0:V.lockLevel}`,this._levelLockContainer.active=!0,this.activateButton("weapon"===this._itemType?F.LockedEquipButtonIndex:F.LockedWearButtonIndex,(()=>{this.sendButtonEvent(`${this._localizer.getText(Ct.WEAR)}-button`),this.levelLockedEquipFlow()}))):this._owned&&Y&&!Q&&this.activateButton("weapon"===this._itemType?F.MemberEquipButtonIndex:F.MemberWearButtonIndex,(()=>{this.sendButtonEvent(`${this._localizer.getText(Ct.WEAR)}-button`,it.B.MembershipParentAd),this.memberLockedEquipFlow()}))}setupAppearanceItem(){this.addCharacter(!0,"hair"===this._itemType||"hairColor"===this._itemType,!ht.Dq.includes(this._itemType)),this._characterPreview.setAppearance(this._itemType,this._itemId)}setupIcon(){this._imageItemDataLoader.setAsset(this._itemId,this._itemType,"upscaled").catch(j.RQr.createHandler("ItemDetailsModalComponent: Failed to load item icon"))}setupFollowItem(){var k;const B=K.q.instance.prodigy.create.follow(this._spine.getRootContainer(),this._itemId,1,null),U=this._currentPlayer.player,G=this._locked&&1===(null===(k=this._itemData.data)||void 0===k?void 0:k.member),$=U.hasMembership();(B instanceof vt.i||B instanceof bt.z||B instanceof pt.g)&&B.startLoad();U.equipment.hasItemEquipped(this._itemType,this._itemId)?this.activateButton(F.RemoveButtonIndex,(()=>{this.sendButtonEvent(`${this._localizer.getText(Ct.REMOVE)}-button`),U.unEquip(this._itemId,this._itemType).then((k=>{k&&(U.appearanceChanged=!0,K.q.instance.prodigy.audio.playSFX(18,"blop"))})).catch(j.RQr.createHandler(`ItemDetailsModalComponent:setupFollowItem Failed to unequip item ${this._itemType}-${this._itemId}`)).finally((()=>{this.close()}))})):this._owned&&G&&!$?this.activateButton(F.MemberEquipButtonIndex,(()=>{this.sendButtonEvent(`${this._localizer.getText(Ct.WEAR)}-button`,it.B.MembershipParentAd),this.memberLockedEquipFlow()})):this._owned&&this.activateButton(F.EquipButtonIndex,(()=>{this.sendButtonEvent(`${this._localizer.getText(Ct.WEAR)}-button`),U.equip(this._itemId,this._itemType,!0).then((k=>{k&&(U.appearanceChanged=!0,K.q.instance.prodigy.audio.playSFX(18,"whoosh"))})).catch(j.RQr.createHandler(`ItemDetailsModalComponent:setupFollowItem Failed to equip item ${this._itemType}-${this._itemId}`)).finally((()=>{this.close()}))}))}setupMorphMarbleItem(){this.addCharacter(!0),this._characterPreview.transformEffect({transform:this._itemData.data.effect.transform,ID:this._itemData.data.effect.ID}),this.activateButton(F.UseButtonIndex,(()=>{this.sendButtonEvent(et.k.Use),this.checkTransformation()}))}setupPurchaseableItem(){const k=()=>{this.sendButtonEvent(`${this._localizer.getText(Ct.BUY)}-button`),this.close(!0)};this._itemData.data.member?this.activateButton(F.MemberBuyButtonIndex,k):this.activateButton(F.BuyButtonIndex,k)}setupBattlePassReward(k){if(k.membershipTier===q._$.MemberUltra&&(this._bonusBackground.active=!0),k.claimed||k.claimable)return;if(this._buttons.some((k=>k.GameObject.active)))return;if(this._currentPlayer.player.membershipUpsell.tier>=k.membershipTier)return;if(!Q.D.isFeatureEnabled())return;this._stratifiedMemberAvailabilityLabel.GameObject.active=!0;let B=0;switch(k.membershipTier){case q._$.MemberUltra:case q._$.MemberUltimateBundle:B=2;break;case q._$.MemberPlus:case q._$.MemberUltimateMath:B=1;break;case q._$.MemberCore:case q._$.MemberLevelUp:}const U=this._stratifiedMemberTierLabelTexts.slice(B,dt.pF.eligibleForMembershipPurchaseForMultipleTiers()?this._stratifiedMemberTierLabelTexts.length:-1).map((k=>this._localizer.getText(k))),G=U.length;1===G?this._stratifiedMemberAvailabilityLabel.text=`${U[0]} ${this._localizer.getText("ITEM_DETAILS_MEMBERSHIP_ONLY")}`:2===G?this._stratifiedMemberAvailabilityLabel.text=`${U[0]} & ${U[1]}`:G>2?this._stratifiedMemberAvailabilityLabel.text=`${U.slice(0,-1).join(", ")} & ${U[G-1]}`:j.VyI.log("No tiers to show for this item membership requirement",j.$bb.Error),this.activateButton(F.UpsellButtonIndex,(()=>{K.q.instance.prodigy.open.unifiedConversionFlow(void 0,{conversionFunnelName:"Click-Item-Treasure-Track"})||K.q.instance.prodigy.open.battlePassUltimateMemberUpsellModal().catch(j.RQr.createHandler("ItemDetailsModalComponent: Failed to open battle pass ultimate member upsell modal"))}))}memberLockedEquipFlow(){const k=at.P.shouldUseUnifiedConversionFlow(ft.o.FunnelUseMemberLockedItem)?rt.R.UnifiedConversionFlow:ut.J.showYouTubeMembershipAd(K.q.instance.game,!0)?rt.R.Video:rt.R.Static,B={conversionFunnelName:this._mode===ct.s.WizardCostumesMenu?ft.o.FunnelEquipMemberLockedCostume:ft.o.FunnelEquipBackpackLockedItem,conversionFunnelMetadata:`${this._itemType}-${this._itemId}`};this._segment.purchase.sendFunnelStart({type:this._mode===ct.s.WizardCostumesMenu?"Equip-Member-Locked-Costume":"Equip-Member-Locked-Item-Backpack",category:"Item-Equip",contentId:`${this._itemType}-${this._itemId}`,adType:k,adVersion:at.P.getAdVersion(ft.o.FunnelUseMemberLockedItem)}),this._segment.item.sendItemEquipFailedEvent({item_name:ut.J.getItemName(this._itemData),item_type:this._itemType,item_id:this._itemId,fail_reason:"Member Locked"}),ut.J.shouldSuppressAd(this._currentPlayer.player)?K.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:820,yPosition:462,arrowXRelPos:.5,arrowDirection:Et.i.DOWN}):K.q.instance.prodigy.open.membershipInfo(null,B)}levelLockedEquipFlow(){var k,B;const U=at.P.shouldUseUnifiedConversionFlow(ft.o.FunnelEquipLevelLockedItem)?rt.R.UnifiedConversionFlow:ut.J.showYouTubeMembershipAd(K.q.instance.game,!0)?rt.R.Video:rt.R.Static,F=this._localizer.getText("LEVEL_LOCK_EQUIP",null===(k=this._itemData.data)||void 0===k?void 0:k.name,null===(B=this._itemData.data)||void 0===B?void 0:B.lockLevel),G=K.q.instance.prodigy.open.message(F),j=`${this._itemType}-${this._itemId}`;G.onClose=()=>{var k;this._currentPlayer.player.hasMembership()||ut.J.shouldSuppressAd(this._currentPlayer.player)||(this._segment.purchase.sendFunnelStart({type:"Equip-Level-Locked-Item-Backpack",category:"Item-Equip",contentId:j,adType:U,adVersion:at.P.getAdVersion(ft.o.FunnelEquipLevelLockedItem)}),this._segment.item.sendItemEquipFailedEvent({item_name:null===(k=this._itemData.data)||void 0===k?void 0:k.name,item_type:this._itemType,item_id:this._itemId,fail_reason:"Level Locked"}),K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:ft.o.FunnelEquipLevelLockedItem,conversionFunnelMetadata:j}))}}checkTransformation(){var k,B;j.Aq$.isDefined(null===(k=this._itemData.data)||void 0===k?void 0:k.effect)&&j.Aq$.isDefined(null===(B=this._itemData.data.effect)||void 0===B?void 0:B.transform)&&(this._currentPlayer.player.isPlayerTransformed()?K.q.instance.prodigy.open.messageBox(this._localizer.getText("MORPH_START_NEW"),(()=>{this.useTransformation()})):this.useTransformation())}useTransformation(){var k,B,U,F;const G=this._currentPlayer.player;null===(k=G.playerContainer)||void 0===k||k.transformToItem(this._itemData.data.effect.transform,this._itemData.data.effect.ID,!0,null===(U=null===(B=this._itemData.data)||void 0===B?void 0:B.effect)||void 0===U?void 0:U.time),G.backpack.consume(this._itemType,this._itemId),K.q.instance.game.broadcaster.broadcast(X.J8.MorphMarbleUsed,void 0,[this._itemData.data]),this.close(!0),this._segment.item.sendItemUsedEvent({item_id:`${this._itemId}`,item_name:null===(F=this._itemData.data)||void 0===F?void 0:F.name,item_type:"morph",item_count:1})}sendButtonEvent(k,B){this._segment.featureCommon.sendButtonEvent(Object.assign({buttonName:k,interfaceName:it.B.ItemInfo,interfaceType:J.Wm.InfoPanel,instanceType:Z.N.Interface,saveClickInfo:k},B?{destinationName:B}:{}))}isBattlePassReward(k){return"rewardId"in k&&"string"==typeof k.rewardId&&"itemDrop"in k}};(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Ot.prototype,"_rarityBanners",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Ot.prototype,"_oneLineItemNameRarityBanners",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],Ot.prototype,"_twoLineItemNameRarityBanners",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.W_S)(),(0,G.Sn)("design:type",Array)],Ot.prototype,"_stratifiedMemberTierLabelTexts",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ot.prototype,"_stratifiedMemberAvailabilityLabel",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ot.prototype,"_previewContainer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ot.prototype,"_itemName",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ot.prototype,"_itemDescription",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ot.prototype,"_memberIcon",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ot.prototype,"_bonusBackground",void 0),(0,G.Cg)([(0,j.MnK)(mt.Y),(0,G.Sn)("design:type",mt.Y)],Ot.prototype,"_characterPreview",void 0),(0,G.Cg)([(0,j.MnK)(st.B),(0,G.Sn)("design:type",st.B)],Ot.prototype,"_characterPreviewSortingAnchor",void 0),(0,G.Cg)([(0,j.MnK)(j.v2j),(0,G.Sn)("design:type",j.v2j)],Ot.prototype,"_spine",void 0),(0,G.Cg)([(0,j.MnK)(_t.j),(0,G.Sn)("design:type",_t.j)],Ot.prototype,"_spineAnimator",void 0),(0,G.Cg)([(0,j.MnK)(yt.X),(0,G.Sn)("design:type",yt.X)],Ot.prototype,"_imageItemDataLoader",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ot.prototype,"_costContainer",void 0),(0,G.Cg)([(0,j.MnK)(st.B),(0,G.Sn)("design:type",st.B)],Ot.prototype,"_currencyIconSortingAnchor",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Ot.prototype,"_levelLockContainer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Ot.prototype,"_levelLockText",void 0),(0,G.Cg)([(0,j.MnK)(ot.D),(0,G.Sn)("design:type",ot.D)],Ot.prototype,"_gearStat1",void 0),(0,G.Cg)([(0,j.MnK)(ot.D),(0,G.Sn)("design:type",ot.D)],Ot.prototype,"_gearStat2",void 0),(0,G.Cg)([(0,j.MnK)(ot.D),(0,G.Sn)("design:type",ot.D)],Ot.prototype,"_spellStat",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.MnK)(nt.S),(0,G.Sn)("design:type",Array)],Ot.prototype,"_buttons",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",z.E)],Ot.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",tt.Y)],Ot.prototype,"_segment",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Ot.prototype,"_localizer",void 0),Ot=(0,G.Cg)([(0,j.EVk)("ItemDetailsModal",gt.Y.ui),(0,G.Sn)("design:paramtypes",[])],Ot)},70704:(k,B,U)=>{"use strict";U.d(B,{J:()=>V});var F=U(8674),G=U(62459),j=U(41935),$=U(28152),H=U(62430);let V=class extends G.uAl{constructor(){super(...arguments),this._petSpineItemDataLoaders=[]}updatePetSpines(k){k.length>this._petSpineItemDataLoaders.length?G.VyI.log("There are not enough renderers to load all team pet spines.",G.$bb.Error):k.forEach(((k,B)=>{var U,F;const $=k.getID(),H=this._petSpineItemDataLoaders[B];H.setAssetID($),null===(F=null===(U=H.GameObject)||void 0===U?void 0:U.findComponentInChildren(j.o))||void 0===F||F.updateGear(k.data.gear).catch(G.RQr.createHandler)}))}};(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(H.N),(0,F.Sn)("design:type",Array)],V.prototype,"_petSpineItemDataLoaders",void 0),V=(0,F.Cg)([(0,G.EVk)("LoadPetSpines",$.Y.animation)],V)},18280:(k,B,U)=>{"use strict";U.d(B,{n:()=>j});var F=U(62459),G=U(35120);class j extends F.uAl{constructor(){super(...arguments),this.maskGraphic=null,this.origX=0,this.origY=0}create(){super.create(),this.maskGraphic=G.q.instance.game.add.graphics(0,0,this.GameObject.legacyTransform.group)}destroy(){this.maskGraphic.destroy(),super.destroy()}updateAnchor(k,B){this.maskGraphic.x=this.origX-k,this.maskGraphic.y=this.origY-B}setAnchor(k,B,U,F){this.maskGraphic.clear(),this.maskGraphic.beginFill(16777215,1),this.maskGraphic.drawRect(-k,-B,U,F),this.maskGraphic.endFill(),this.origX=this.maskGraphic.x,this.origY=this.maskGraphic.y}getGraphicSource(){return this.maskGraphic}}},72799:(k,B,U)=>{"use strict";U.d(B,{M:()=>V});var F=U(8674),G=U(62459),j=U(83267),$=U(17002),H=U(571);let V=class extends G.uAl{constructor(){super(...arguments),this._runOnCreate=!0,this.onRenderComplete=new G.HN0,this._displayMount=!0,this._displayWand=!0,this._displayCostume=!0}create(){super.create(),this._mockPlayerDataProvider=j.E.createMockPlayerDataProvider(this._displayMount),this._runOnCreate&&this.renderPlayerAsTexture()}destroy(){this.onRenderComplete.dispose(),super.destroy()}renderPlayerAsTexture(k){if(!this._currentPlayer)return void G.VyI.log("RenderPlayerAsTextureComponent: Failed to render the player due to the logged in player data provider returning no data",G.$bb.Error);if(!this._playerGraphic)return void G.VyI.log("RenderPlayerAsTextureComponent: Failed to render the player due to no player graphic being available",G.$bb.Warning);const B=null!=k?k:this._currentPlayer.getAppearance(),U=Object.assign(Object.assign({},B),{costume:this._displayCostume?B.costume:void 0,weapon:this._displayWand?B.weapon:void 0});H.z.createFullBodyFromAppearanceData(U,this._mockPlayerDataProvider).then((k=>{const B=this._playerGraphic.GameObject.findComponent(G.XVE);if(!B)return void G.VyI.log("RenderPlayerAsTextureComponent: Failed to render the player due to the player graphic missing a RectTransform component",G.$bb.Error);const U=$.f.getScaledTextureFromSpriteWithAspectRatio(k,B.sizeDelta.width,B.sizeDelta.height);this._playerGraphic.setTexture(U),this.onRenderComplete.dispatch()})).catch(G.RQr.createHandler("RenderPlayerAsTextureComponent: Failed to render the player sprite"))}};(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",Function)],V.prototype,"_currentPlayer",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],V.prototype,"_playerGraphic",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_runOnCreate",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onRenderComplete",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_displayMount",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_displayWand",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_displayCostume",void 0),V=(0,F.Cg)([(0,G.EVk)("RenderPlayerAsTexture",G.YH6.render)],V)},35189:(k,B,U)=>{"use strict";U.d(B,{e:()=>V});var F=U(8674),G=U(62459),j=U(76974),$=U(24519),H=U(28152);let V=class extends $.v{constructor(){super(...arguments),this._secondState=!1}set SecondState(k){this._secondState=k,this.refreshState()}get SecondState(){return this._secondState}postCreate(){this._upSecondStateObject&&(this._upSecondStateObject.active=!1),this._downSecondStateObject&&(this._downSecondStateObject.active=!1),this._overSecondStateObject&&(this._overSecondStateObject.active=!1),this._disableSecondStateObject&&(this._disableSecondStateObject.active=!1),super.postCreate()}refreshState(){this.setState(this.currentState)}getStateObject(k){const B=this.SecondState?this.getSecondStateObject(k):super.getStateObject(k);return B&&(this.currentState=k),B}getSecondStateObject(k){switch(k){case j.K.Up:return this._upSecondStateObject;case j.K.Down:return this._downSecondStateObject;case j.K.Over:return this._overSecondStateObject;case j.K.Disabled:return this._disableSecondStateObject;default:return null}}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],V.prototype,"_upSecondStateObject",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],V.prototype,"_downSecondStateObject",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],V.prototype,"_overSecondStateObject",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],V.prototype,"_disableSecondStateObject",void 0),V=(0,F.Cg)([(0,G.EVk)("SecondStateGameObjectTransition",H.Y.ui)],V)},25132:(k,B,U)=>{"use strict";U.d(B,{$:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(68152),H=U(28152);let V=class extends G.uAl{constructor(){super(...arguments),this._singleImage=null,this._imageID=0}create(){super.create(),(0,$.v)(!!this.GameObject.legacyTransform,"Gameobject is missing Legacy Transform");const k="number"==typeof this._imageID?`singleImage-${this._imageID.toString()}`:this._imageID;this._singleImage=j.q.instance.prodigy.create.sprite(0,0,k),this.GameObject.legacyTransform.group.addChild(this._singleImage)}};(0,F.Cg)([(0,G.g11)(),(0,G.nKb)("singleImageID"),(0,F.Sn)("design:type",Number)],V.prototype,"_imageID",void 0),V=(0,F.Cg)([(0,G.EVk)("SingleImage",H.Y.root)],V)},29834:(k,B,U)=>{"use strict";U.d(B,{j:()=>q});var F=U(8674),G=U(62459),j=U(68910),$=U(28152),H=U(16495);class V extends G.$KW{generate(k,B){const U=this.getAnimationGroup(k),F=G.Gme.checkboxGroup({id:"loopAnimation",labelValue:"Loop Animation",inputValue:k.loopAnimation}),j=G.Gme.numberGroup({id:"startTimeSeconds",labelValue:"Start Time in Seconds",inputValue:k.startTimeSeconds}),$=G.NyS.create({id:"onAnimationComplete",label:"On Animation Complete",signalValue:k.onAnimationComplete,componentGUID:this._componentGuid});return G.XRp.createVertical([U,F,j,$])}getAnimationGroup(k){var B;const U=this._editorAPI.getComponent(this._componentGuid),F=null===(B=null==U?void 0:U.spine)||void 0===B?void 0:B.getAnimationNames();let j;return j=(null==F?void 0:F.length)?G.Gme.dropdownGroup({id:"animation",labelValue:"Animation",selectOptions:k.animation?["None",...F]:F,selectValue:k.animation,onChange:k=>{"None"===k&&this._editorAPI.modifyComponent(this._componentGuid,{animation:void 0})}}):G.Gme.textGroup({id:"animation",labelValue:"Animation",inputValue:k.animation}),j}}var W=U(28402);let q=class extends G.uAl{constructor(){super(...arguments),this.onAnimationComplete=new G.HN0,this._initialAnimation=null,this._loopAnimation=!0,this._startTimeSeconds=0,this._paused=!1,this._isLoaded=!1}get spine(){return this._spineComponent}get OnAnimationComplete(){return this.onAnimationComplete}get paused(){return this._paused}set paused(k){this._paused=k,this.spine&&(this.spine.paused=k)}get isLoaded(){return this._isLoaded}create(){if(super.create(),this._spineComponent=this._spineComponent||this.gameObject.findComponent(W.v),this._isLoaded=!1,!this.spine)return G.VyI.log(`SpineAnimator missing SpineComponent on ${this.toString()}`,G.$bb.Error),void this.destroy();this.spine.isLoaded?this.onLoaded():this.spine.OnLoaded.addOnce(this.onLoaded,this,0)}onLoaded(){this._isLoaded=!0,this.spine.paused=this._paused,this._initialAnimation&&this.playAnimation(this._initialAnimation,this._loopAnimation)}playAnimation(k,B,U=!1,F=!1,j=0){if(!this._isLoaded)return this._initialAnimation=k,void(this._loopAnimation=B);const $=this.spine.getSpine();if(!(null==$?void 0:$.destroyed))if(null==$?void 0:$.state){if(!this.hasAnimation(k))return void G.VyI.log(`No animation named ${k} on spine ${$.name}`,G.$bb.Warning);const H=$.state.tracks[0];if(!U&&H&&H.animation.name===k)return;if($.onComplete.removeAll(this),F||(B?$.onComplete.add((()=>{this.onAnimationComplete.dispatch(k)}),this):$.onComplete.addOnce((()=>{this.onAnimationComplete.dispatch(k)}),this)),$.lastTime=Date.now(),j>0){$.state.setAnimation(0,k,B).mixDuration=j}else $.setToSetupPose(),this.spine.setAnimationByName(0,k,B);this.seekTo(this._startTimeSeconds),$.state.apply($.skeleton)}else this.spine.OnLoaded.addOnce(this.playAnimation,this,0,k,B,U,F,j)}playAnimationNumTimes(k,B,U=!1){this.playAnimation(k,!1,U),B>1&&this.onAnimationComplete.addOnce((()=>{this.playAnimationNumTimes(k,B-1,!0)}))}playAnimationSequence(k,...B){return(0,F.sH)(this,void 0,void 0,(function*(){yield(0,H.ib)(this,B,k)}))}stopAnimation(){var k;if(!this.spine)return void G.VyI.log(`[SpineAnimator.stopAnimation]: Invalid _spineComponent ${this.toString()}`,G.$bb.Error);const B=this.spine.getSpine();B&&(null===(k=B.onComplete)||void 0===k||k.removeAll(this),B.setToSetupPose(),B.state.clearTracks())}seekTo(k){var B;if(!this.spine)return void G.VyI.log(`[SpineAnimator.seekTo]: Invalid _spineComponent ${this.toString()}`,G.$bb.Error);const U=null===(B=this.spine.getSpine())||void 0===B?void 0:B.state;U?U.tracks[0].trackTime=k:G.VyI.log(`[SpineAnimator.seekTo]: State is invalid for ${this.toString()}`,G.$bb.Error)}hasAnimation(k){var B,U,F,G;return null===(F=null===(U=null===(B=this.spine)||void 0===B?void 0:B.getSpine())||void 0===U?void 0:U.state)||void 0===F?void 0:F.hasAnimation(null===(G=this.spine)||void 0===G?void 0:G.getRemappedAnimation(k))}applySkin(k){if(!this.spine)return void G.VyI.log(`[SpineAnimator.applySkin] Invalid _spineComponent ${this.toString()}`,G.$bb.Error);const B=this.spine.getSpine(),U=B.skeleton.data.findSkin(k);B.setSkin(U);const F=B.skeleton.slots;for(let j=0;j{"use strict";U.d(B,{v:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.v2j{setAsset(k,B){{const U=j.q.instance.prodigy.assets.getAsset(k);(null==U?void 0:U.guidMapping)?super.setAsset(U.guidMapping,B,this.loadAsset.bind(this)):super.setAsset(k,B,this.loadAsset.bind(this))}}loadAsset(k,B){j.q.instance.prodigy&&j.q.instance.prodigy.load.assets([k],(()=>{super.setAsset(k,B)}))}getEventNames(){var k,B,U,F,G;return null!==(G=null===(F=null===(U=null===(B=null===(k=this.getSpine())||void 0===k?void 0:k.skeleton)||void 0===B?void 0:B.data)||void 0===U?void 0:U.events)||void 0===F?void 0:F.map((k=>k.name)))&&void 0!==G?G:[]}getAnimationNames(){var k,B,U,F,G;return null!==(G=null===(F=null===(U=null===(B=null===(k=this.getSpine())||void 0===k?void 0:k.skeleton)||void 0===B?void 0:B.data)||void 0===U?void 0:U.animations)||void 0===F?void 0:F.map((k=>k.name)))&&void 0!==G?G:[]}waitForEvent(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this.getEventNames();if(-1===B.indexOf(k))return void G.VyI.log(`No event named ${k} found in spine, available events: ${B.join(", ")}`,G.$bb.Warning);let U=null;yield new Promise((B=>{U=this.getSpine().onEvent.add(((U,F)=>{F.data.name===k&&B()}),this).listener})).then((()=>{this.getSpine().onEvent.remove(U,this)}))}))}};H=(0,F.Cg)([(0,G.EVk)("Spine",$.Y.animation)],H)},62430:(k,B,U)=>{"use strict";U.d(B,{N:()=>K});var F,G=U(8674),j=U(62459),$=U(56942),H=U(77938),V=U(68152),W=U(28152),q=U(28402);let K=F=class extends j.uAl{constructor(){super(...arguments),this._targetSpine=null,this._itemID=null,this._itemType=null,this._assetKey=null,this._onSpineItemLoaded=new j.HN0}get onSpineItemLoaded(){return this._onSpineItemLoaded}get isLoaded(){var k,B;return null!==(B=null===(k=this._targetSpine)||void 0===k?void 0:k.isLoaded)&&void 0!==B&&B}get assetID(){return this._itemID}create(){super.create(),this._targetSpine&&null!==this._itemType&&null!==this._itemID&&null!==this._assetKey&&this.updateTargetSpine()}destroy(){this._targetSpine=null,this._onSpineItemLoaded.dispose(),super.destroy()}setAssetID(k){this._itemID=k,this.updateTargetSpine()}updateTargetSpine(){var k;const B=H.t.getItem(this._itemType,this._itemID);(0,V.v)(null!==B,`Item was not found for ${this._itemType}-${this._itemID}`);const U=null===(k=B.metadata.assets)||void 0===k?void 0:k[this._assetKey],G=this._targetSpine.GameObject.transform;if((null==U?void 0:U.defaultScale)&&(G.localScale.x=U.defaultScale,G.localScale.y=U.defaultScale),null==U?void 0:U.flip){const k=G.localScale;G.setScale(-1*k.x,k.y)}const j=F.createSpineAssetSourceName(B,this._itemType,this._itemID,this._assetKey);this._targetSpine.OnLoaded.addOnce((()=>{this._onSpineItemLoaded.dispatch()})),this._targetSpine.setAsset(j)}static createSpineAssetSourceName(k,B,U,F="default"){var G;const H=null===(G=k.metadata.assets)||void 0===G?void 0:G[F];return"follow"===B&&j.Aq$.isDefined(U)&&$.Q[`Default_follow_${U}_json`]?$.Q[`Default_follow_${U}_json`]:j.Aq$.isDefined(null==H?void 0:H.assetKey)?$.Q[H.assetKey]:j.Aq$.isDefined(null==H?void 0:H.ID)?`spine-${H.ID}`:`${F}-${B}-${U}`}};(0,G.Cg)([(0,j.MnK)(q.v),(0,G.Sn)("design:type",q.v)],K.prototype,"_targetSpine",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],K.prototype,"_itemID",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],K.prototype,"_itemType",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],K.prototype,"_assetKey",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],K.prototype,"_onSpineItemLoaded",void 0),K=F=(0,G.Cg)([(0,j.EVk)("SpineItemDataLoader",W.Y.data)],K)},51315:(k,B,U)=>{"use strict";U.d(B,{K:()=>H});var F=U(8674),G=U(62459),j=U(34603),$=U(38042);let H=class extends $.p{constructor(){super(...arguments),this._loopAnimation=!1,this._onInitialize=new G.HN0,this._image=null}create(){super.create(),this._image=this.GameObject.findComponent(j._);const k=this._image.sprite;k&&null!==k.key?this.initImage():this._image.OnLoaded.addOnce(this.initImage,this)}destroy(){this._onInitialize.dispose(),super.destroy()}initImage(){const k=this._image.sprite;k.animations.add("walk",[0,1,2,3,4,5,6,7],10,!0);const B=k.animations.add("idle",[8,9,10,11,12,13,14,15],10,!0);k.animations.add("attack",[16,17,18,19,20,21,22,23],10).onComplete.add(B.play,B),k.animations.addIfFound("stand",["npc_0","npc_1","npc_2","npc_3","npc_4","npc_5","npc_6","npc_7"],10,!0),this._initialAnimation&&this.playAnimation(this._initialAnimation,this._loopAnimation),this._onInitialize.dispatch()}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"_initialAnimation",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_loopAnimation",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"_onInitialize",void 0),H=(0,F.Cg)([(0,G.EVk)("SpritesheetAnimator")],H)},43858:(k,B,U)=>{"use strict";U.d(B,{j:()=>et});var F,G=U(8674),j=U(62459),$=U(64868),H=U(35120),V=U(34829),W=U(1195),q=U(64794),K=U(16847),z=U(30405),Y=U(38920),Q=U(28152),X=U(93833);!function(k){k[k.Owned=0]="Owned",k[k.Locked=1]="Locked",k[k.Default=2]="Default"}(F||(F={}));var Z=U(34603),J=U(52156),tt=U(85540);let et=class extends j.uAl{constructor(){super(...arguments),this._localizer=null,this._rarityBackgrounds=[],this._itemIconContainer=null,this._stateIcon=null,this._currencyBannerLocked=null,this._levelLockContainer=null,this._costContainer=null,this._quantityCanBuyText=null,this._stackElements=null,this._arrow=null,this._newBadge=null,this._stateIconConfig=null,this._currentCardState=null,this.bounce=null,this._showMembershipLockIcon=!0}get _item(){var k;return null===(k=this._itemCardData)||void 0===k?void 0:k.item}get _amount(){var k;return null===(k=this._itemCardData)||void 0===k?void 0:k.currencyAmount}get _currencyID(){var k;return null===(k=this._itemCardData)||void 0===k?void 0:k.currencyID}setShowMembershipLockIcon(k){this._showMembershipLockIcon=k}create(){super.create(),this._localizer=H.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService)}setItemData(k){this._itemCardData=k,this._rootContainerComponent.name=`${k.item.type}-${k.item.ID}-card`,this.updateCard()}getItemData(){return Object.assign({},this._itemCardData)}updateItemData(k){var B,U;this.setItemData(k),this.setNewBadge(null!==(U=null===(B=k.dynamicStoreData)||void 0===B?void 0:B.isNew)&&void 0!==U&&U)}setNewBadge(k){this._newBadge.active=k}getItem(){return this._itemCardData.item}setPlayerGearStats(k,B=!1){this._playerGearStats=k}get isCardValid(){return!(!this._itemCardData.item||!this._activePlayer)}updateDisplay(){if(!this.isCardValid)return;const k=this._itemCardData.item;Promise.all([this._itemIconContainer.setAsset(k.ID,k.type),this.updateCardState(this._currentCardState)]).catch(j.RQr.createHandler("Error updating store item card")),this._rarityBackgrounds.forEach(((B,U)=>{var F,G;B.active=U===(null!==(G=null===(F=k.data)||void 0===F?void 0:F.rarity)&&void 0!==G?G:0)})),this.updateQuantityCanBuy(),this.animateArrow(!0)}updateTask(k){if(this._itemCardData.dynamicStoreData){const B=this._itemCardData.dynamicStoreData.offers.findIndex((B=>B.task.id===k.task.id));B>-1&&(this._itemCardData.dynamicStoreData.offers[B]=k)}this.updateCard()}updateCard(){this.setCardState(),this.updateDisplay()}updateQuantityCanBuy(){var k,B;const U=null!==(B=null===(k=this._itemCardData.dynamicStoreData)||void 0===k?void 0:k.itemQuantity)&&void 0!==B?B:1;if($._.isFeatureEnabled()&&U>1){this._stackElements.active=!0;const k=(0,tt.r)(this._itemCardData),B=k>0?`${k.toString()}/${U.toString()}`:U.toString();this._quantityCanBuyText.text=B}else this._stackElements.active=!1}updateCardState(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,G,$;this._stateIcon.Active=!1;const H=this._costContainer.findComponentInChildren(j.EYj);H.GameObject.transform.setPositionX(0);const V=[];switch(k){case F.Owned:H.text=this._localizer.getText("ITEMCARD_OWNED"),this._currencyDisplay.setIconVisible(!1),V.push(this.setStateIcon(this._stateIconConfig.atlas,this._stateIconConfig.frameOwned)),this.showLockedElements(!1);break;case F.Locked:this._levelLockContainer.findComponentInChildren(j.EYj).text=this._localizer.getText("ITEMCARD_LEVEL",null!==($=null===(G=null===(U=null===(B=this._itemCardData)||void 0===B?void 0:B.item)||void 0===U?void 0:U.data)||void 0===G?void 0:G.lockLevel)&&void 0!==$?$:""),this.showLockedElements(!0);break;case F.Default:default:this._itemCardData.currencyAmount>0&&!this.memberLockHardCurrency()?(this._currencyDisplay.setIconVisible(!0),H.text=(0,Y.Hk)(this._itemCardData.currencyAmount),H.GameObject.transform.setPositionX(2*H.text.length+2),this._currencyDisplay.updateCurrencyID(this._itemCardData.currencyID),this._currencyDisplay.updateAmount(this._itemCardData.currencyAmount)):(this._currencyDisplay.setIconVisible(!1),H.text=this.memberLockHardCurrency()?"":this._localizer.getText("ITEMCARD_FREE")),this.showLockedElements(!1)}this._showMembershipLockIcon&&k!==F.Owned&&this.isMembershipLocked()&&V.push(this.setStateIcon(this._stateIconConfig.atlas,this._stateIconConfig.frameMembership)),yield Promise.all(V)}))}showLockedElements(k){this._costContainer.active=!k,this._currencyBannerLocked.active=k,this._levelLockContainer.active=k}setCardState(){this.isOwned()?this._currentCardState=F.Owned:this.isLevelLocked()?this._currentCardState=F.Locked:this._currentCardState=F.Default}setStateIcon(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){yield this._stateIcon.setAsset(k,B),this._stateIcon.Active=!0}))}getCardState(){return this._currentCardState}isOwned(){return(0,tt.w)(this._itemCardData)}isLevelLocked(){var k,B;const U=this._itemCardData.item;return!(!this._activePlayer||!U)&&z.o.isLevelLocked(this._activePlayer.player,null!==(B=null===(k=U.data)||void 0===k?void 0:k.lockLevel)&&void 0!==B?B:0)}isMathTowerConsumableItem(k){return k===q.D.ASSET_TYPE_FRAME||k===q.D.ASSET_TYPE_DECORATION||k===q.D.ASSET_TYPE_STREET_FURNITURE}isMembershipLocked(){const k=this._itemCardData.item;return!!k&&(1===k.data.member&&"pet"!==k.type||this.memberLockHardCurrency())}memberLockHardCurrency(){const k=H.q.instance.prodigy.gameContainer.get("5c7-e02d");return 27===this._itemCardData.currencyID&&k.isHardCurrencyMemberLocked(this._itemCardData.currencyAmount)}animateArrow(k){k?(this.bounce||(this._arrow.onDestroy.add((()=>{this.bounce&&(this.bounce.stop(),H.q.instance.game.tweens.remove(this.bounce),this.bounce=null)})),this.bounce=H.q.instance.game.add.tween(this._arrow.transform.localPosition,this).to({y:this._arrow.transform.localPosition.y-5},1e3,j.GS3.Quadratic.InOut,!0,0,V.A.MAX_SAFE_INTEGER,!0)),this.bounce.start()):(this._arrow.transform.setPositionY(0),this.bounce.remove(),this.bounce=null)}destroy(){H.q.instance.game.tweens.remove(this.bounce),this.bounce=null,super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",W.E)],et.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],et.prototype,"_rarityBackgrounds",void 0),(0,G.Cg)([(0,j.MnK)(J.X),(0,j.Lr6)(0),(0,G.Sn)("design:type",J.X)],et.prototype,"_itemIconContainer",void 0),(0,G.Cg)([(0,j.MnK)(Z._),(0,G.Sn)("design:type",Z._)],et.prototype,"_stateIcon",void 0),(0,G.Cg)([(0,j.MnK)(K.n),(0,G.Sn)("design:type",K.n)],et.prototype,"_currencyDisplay",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_currencyBannerLocked",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_levelLockContainer",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_costContainer",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],et.prototype,"_quantityCanBuyText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_stackElements",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_arrow",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],et.prototype,"_newBadge",void 0),(0,G.Cg)([(0,j.vCS)(),(0,G.Sn)("design:type",Object)],et.prototype,"_stateIconConfig",void 0),(0,G.Cg)([(0,j.MnK)(X.$),(0,G.Sn)("design:type",X.$)],et.prototype,"_rootContainerComponent",void 0),et=(0,G.Cg)([(0,j.EVk)("StoreItemCard",Q.Y.ui)],et)},46548:(k,B,U)=>{"use strict";U.d(B,{t:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(84246);let H=class extends $.j{constructor(){super(...arguments),this._strokeColor=null}applyEffect(k){const B=[];for(let F=0;F{"use strict";U.d(B,{E:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this._durationInMilliseconds=0,this.onStart=new G.HN0,this.onTimeout=new G.HN0,this.passArgsOnTimeout=!1,this._timerOn=!1}create(){this._autoStartTimer&&this.startTimer(),super.create()}startTimer(...k){this.Active&&!this._timerOn&&G.Aq$.isDefined(this._durationInMilliseconds)&&(this._timerOn=!0,this._timer=window.setTimeout((()=>{this.onTimeoutCallback(...k)}),this._durationInMilliseconds),this.onStart.dispatch())}onTimeoutCallback(...k){this.Active&&(this.resetTimer(),this.passArgsOnTimeout?this.onTimeout.dispatch(...k):this.onTimeout.dispatch())}stop(k=!1){k?this.onTimeoutCallback():this.resetTimer()}resetTimer(){this._timerOn=!1,window.clearTimeout(this._timer),this._timer=null}onDisable(){this.resetTimer(),super.onDisable()}destroy(){this.onStart.dispose(),this.onTimeout.dispose(),this.resetTimer(),super.destroy()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],$.prototype,"_durationInMilliseconds",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_autoStartTimer",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onStart",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onTimeout",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"passArgsOnTimeout",void 0),$=(0,F.Cg)([(0,G.EVk)("Timeout",j.Y.root)],$)},17509:(k,B,U)=>{"use strict";U.d(B,{e:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(84246);let H=class extends $.j{constructor(){super(...arguments),this._tintColor=null}applyEffect(k){G.Aq$.isDefined(this._tintColor)||(this._tintColor=16777215..toString());const B=G.Q1f.hexToRGBArray(Number(this._tintColor)),U=B[0],F=B[1],j=B[2];if(k&&k.data)for(let G=0;G{"use strict";U.d(B,{w:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.y4o{constructor(){super(...arguments),this._hexTintColor="0xFFFFFF",this._alpha=1,this._isTinted=!1,this._created=!1,this._renderTextureDimensions=new G.or0}set hexTintColor(k){this._hexTintColor=k}create(){super.create(),this._root=j.q.instance.game.add.group(),this._root.name=`${this.GameObject.name} - TintRenderComponent`,this.setRootContainer(this._root)}postCreate(){super.postCreate(),this._created=!0,this.Active&&this._tintOnCreate&&(this.enableTint(),this._isTinted=!0)}destroy(){var k;this._targetRenderComponent.onRootContainerSet.remove(this.enableTint,this),this.disableTint(),null===(k=this._root)||void 0===k||k.destroy(),this._root=null,super.destroy()}onEnable(){super.onEnable(),this._isTinted&&this.enableTint()}onDisable(){super.onDisable(),this.isCreated&&this._isTinted&&(this.disableTint(),this._isTinted=!0)}getDimensions(){return this._renderTextureDimensions}enableTint(){var k,B;if(!this._created)return void(this._tintOnCreate=!0);const U=this._targetRenderComponent.getRootContainer(),F=this._targetRenderComponent.GameObject.transform;if(F instanceof G.XVE)if(this._targetRenderComponent.IsActiveInHierarchy)if(U){const $=F.rectTransformDimensions;if(this._renderTextureDimensions.setTo($.width,$.height),!this._renderTextureDimensions.isNearlyEqual(G.or0.ZERO)){this._renderComponentToTexture=j.q.instance.game.add.renderTexture(this._renderTextureDimensions.width,this._renderTextureDimensions.height);const H=new G.I9Y($.width*F.pivot.x,$.height*F.pivot.y),V=G.i7d.main;if(!(null===(B=null===(k=G.wa5.getActiveScene())||void 0===k?void 0:k.getLayer(this._targetRenderComponent.GameObject.layer))||void 0===B?void 0:B.attachToCamera)&&V){const k=V.GameObject.transform.worldPosition,B=V.viewportSize;H.add(new G.I9Y(k.x-B.getHalfWidth(),k.y-B.getHalfHeight()))}const W={x:F.worldPosition.x,y:F.worldPosition.y};F.worldPosition=new G.I9Y(H.x,H.y),U.displayObjectUpdateTransform(),this._renderComponentToTexture.render(U),F.worldPosition=W,this._imageNode||(this._imageNode=j.q.instance.prodigy.create.image(this._renderTextureDimensions.getHalfWidth(),this._renderTextureDimensions.getHalfHeight(),void 0,null,this._renderComponentToTexture),this._root.add(this._imageNode)),this._imageNode.tint=parseInt(this._hexTintColor,16),this._imageNode.alpha=Math.min(Math.max(this._alpha,0),1),this._imageNode.anchor.set(.5,.5),U.visible=!1,U.renderable=!1,this._isTinted=!0}}else this._targetRenderComponent.onRootContainerSet.addOnce(this.enableTint,this);else this._targetRenderComponent.GameObject.onActiveInHierarchyChanged.addOnce(this.enableTint,this);else G.VyI.log("Target render component must have a RectTransform",G.$bb.Error)}disableTint(k=!0){this._imageNode&&(this._imageNode.destroy(),this._imageNode=null),this._renderComponentToTexture&&(this._renderComponentToTexture.clear(),this._renderComponentToTexture.destroy(!0),this._renderComponentToTexture=null);{const B=this._targetRenderComponent.getRootContainer();B&&(B.visible=k,B.renderable=!0,this._isTinted=!1)}}};(0,F.Cg)([(0,G.MnK)(G.y4o),(0,F.Sn)("design:type",G.y4o)],H.prototype,"_targetRenderComponent",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"_hexTintColor",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_alpha",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_tintOnCreate",void 0),H=(0,F.Cg)([(0,G.EVk)("TintRenderComponent",$.Y.effect)],H)},8182:(k,B,U)=>{"use strict";U.d(B,{p:()=>V});var F=U(8674),G=U(62459),j=U(28152),$=U(61985),H=U(51972);let V=class extends H.f{constructor(){super(...arguments),this._timeout=null}startTimer(){this._timeout.startTimer()}close(){this._timeout.stop(!0)}};(0,F.Cg)([(0,G.x4W)("timeout"),(0,F.Sn)("design:type",$.E)],V.prototype,"_timeout",void 0),V=(0,F.Cg)([(0,G.EVk)("ToolTipAuto",j.Y.ui)],V)},51972:(k,B,U)=>{"use strict";U.d(B,{f:()=>$,i:()=>F});var F,G=U(8674),j=U(62459);!function(k){k[k.UP=0]="UP",k[k.DOWN=1]="DOWN",k[k.LEFT=2]="LEFT",k[k.RIGHT=3]="RIGHT"}(F||(F={}));class $ extends j.uAl{constructor(){super(...arguments),this._headerMessageText=null,this._bodyMessageText=null,this._indicatorArrowVertical=null,this._indicatorArrowHorizontal=null,this._leftSideBorderOffset=0,this._rightSideBorderOffset=0}postCreate(){super.postCreate(),this.GameObject.active=!1,this._cachedTextPositionYHeader=this._headerMessageText.GameObject.legacyTransform.group.position.y,this._cachedTextPositionYBody=this._bodyMessageText.GameObject.legacyTransform.group.position.y,this._cachedTextPositionYAverage=.5*(this._cachedTextPositionYHeader+this._cachedTextPositionYBody),this._leftSideBorderOffset=this._bodyMessageText.GameObject.legacyTransform.group.position.x,this._rightSideBorderOffset=this._background.GameObject.legacyTransform.width-this._bodyMessageText.GameObject.legacyTransform.group.position.x}initializeText(k,B,U){this._bodyMessageText.text=k,j.Aq$.isDefined(B)&&0!==B.length?(this._headerMessageText.text=B,this._bodyMessageText.GameObject.legacyTransform.group.position.y=this._cachedTextPositionYBody):(this._headerMessageText.text="",this._bodyMessageText.GameObject.legacyTransform.group.position.y=this._cachedTextPositionYAverage),this.resizeSlicedGraphic(this._background,this.getBackgroundWidth(),this._background.GameObject.legacyTransform.height);const F=this.GameObject.active;this.GameObject.active=!0,this.GameObject.legacyTransform.anchorX=this.GameObject.legacyTransform.anchorX,this.GameObject.legacyTransform.anchorY=this.GameObject.legacyTransform.anchorY,this.GameObject.active=F}resizeSlicedGraphic(k,B,U){k.GameObject.legacyTransform.group.removeChild(k.elementsGroup),k.GameObject.legacyTransform.group.cacheAsBitmap=!1,k.elementsGroup.destroy(),k._rootContainer=null,k.elementsGroup=null,k.GameObject.legacyTransform.group.getChildAt(0).width=B,k.GameObject.legacyTransform.group.getChildAt(0).height=U,k.create()}getBackgroundWidth(){const k=Math.max(this._headerMessageText.TextObject.width,this._bodyMessageText.TextObject.width);return this._leftSideBorderOffset+k+this._rightSideBorderOffset}setIndicatorArrow(k,B=.5,U=.5){const G=this.GameObject.legacyTransform;switch(k){case F.UP:this._indicatorArrowHorizontal.destroy(),this.setArrow(k,this._indicatorArrowVertical,1,this.getBackgroundWidth()*B,0),this.setAnchor(G,B,0);break;case F.DOWN:this.setArrow(k,this._indicatorArrowVertical,-1,this.getBackgroundWidth()*B,this._cachedGameObjectHeight),this.setAnchor(G,B,1),this._indicatorArrowHorizontal.destroy();break;case F.LEFT:this._indicatorArrowVertical.destroy(),this.setArrow(k,this._indicatorArrowHorizontal,-1,2,this._cachedGameObjectHeight*U),this.setAnchor(G,0,U);break;case F.RIGHT:this._indicatorArrowVertical.destroy(),this.setArrow(k,this._indicatorArrowHorizontal,1,this.getBackgroundWidth()-2,this._cachedGameObjectHeight*U),this.setAnchor(G,1,U);break;default:this._indicatorArrowVertical.destroy(),this._indicatorArrowHorizontal.destroy()}}setArrow(k,B,U,G,j){k===F.UP||k===F.DOWN?B.legacyTransform.group.scale.y=U:B.legacyTransform.group.scale.x=U,B.legacyTransform.group.position.set(G,j)}setAnchor(k,B,U){k.anchorX=B,k.anchorY=U}}(0,G.Cg)([(0,j.x4W)("headerMessageText"),(0,G.Sn)("design:type",j.EYj)],$.prototype,"_headerMessageText",void 0),(0,G.Cg)([(0,j.x4W)("bodyMessageText"),(0,G.Sn)("design:type",j.EYj)],$.prototype,"_bodyMessageText",void 0),(0,G.Cg)([(0,j.x4W)("background"),(0,G.Sn)("design:type",j.V09)],$.prototype,"_background",void 0),(0,G.Cg)([(0,j.x4W)("indicatorArrow"),(0,G.Sn)("design:type",j._mx)],$.prototype,"_indicatorArrowVertical",void 0),(0,G.Cg)([(0,j.x4W)("indicatorArrowHorizontal"),(0,G.Sn)("design:type",j._mx)],$.prototype,"_indicatorArrowHorizontal",void 0)},82125:(k,B,U)=>{"use strict";U.d(B,{i:()=>W});var F=U(8674),G=U(62459),j=U(49237),$=U(76974),H=U(28152),V=U(51972);let W=class extends V.f{constructor(){super(...arguments),this._callbacks=[],this._numLayoutObjects=0}postCreate(){super.postCreate(),this._cachedGameObjectHeight=this.GameObject.legacyTransform.height}setCallbacks(k){if(G.Aq$.isDefined(k)){this._callbacks=k,this._numLayoutObjects=this._callbacks.length;const B=this.GameObject.findComponentInChildren(G.JTA);for(let k=0;k{"use strict";U.d(B,{f:()=>j,y:()=>G});var F=U(51972);class G{}G.CENTER=.5,G.LEFT=0,G.RIGHT=1,G.TOP=0,G.BOTTOM=1;const j={arrowAnchor:G.CENTER,tooltipAnchor:G.CENTER,arrowDirection:F.i.DOWN,useCloseButton:!0}},48199:(k,B,U)=>{"use strict";U.d(B,{A:()=>Q});var F=U(62459),G=U(99625),j=U(35120),$=U(31818),H=U(8182),V=U(82125),W=U(64191),q=U(8674),K=U(28152),z=U(51972);let Y=class extends z.f{postCreate(){super.postCreate(),this._cachedGameObjectHeight=this.GameObject.legacyTransform.height}initializeText(k,B){super.initializeText(k,B),this.GameObject.active=!0}close(){this.GameObject.active=!1}};Y=(0,q.Cg)([(0,F.EVk)("ToolTipSpeech",K.Y.ui)],Y);class Q{static displayToolTipAuto(k,B,U){const F=Q.setToolTip(H.p,k,B,Q.TOOLTIP_AUTO);return Q.updateBaseDisplay(F,U),F.close(),F.startTimer(),F}static displayTooltipTargeted(k,B,U,F){let H=k;if(!H){H=j.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromGUID(G.l.StandardTooltip,B).findComponentInChildren($.tX)}return H.setFromSchema(U),H.setTarget(F,B),H}static displayToolTipManual(k,B,U){const G=Q.setToolTip(W.q,k,B,Q.TOOLTIP_MANUAL),j=F.Aq$.isDefined(U.proceedButtonCallback);return j?(G.setProceedButtonVisibility(!0),G.setCallback(U.proceedButtonCallback)):G.setProceedButtonVisibility(!1),Q.updateBaseDisplay(G,U,j),F.Aq$.isDefined(U.arrowXRelPos)||F.Aq$.isDefined(U.arrowYRelPos)?G.setIndicatorArrow(U.arrowDirection,U.arrowXRelPos,U.arrowYRelPos):G.setIndicatorArrow(U.arrowDirection,.5,null),G}static displayToolTipSpeech(k,B,U){const F=Q.setToolTip(Y,k,B,Q.TOOLTIP_SPEECH);return Q.updateBaseDisplay(F,U),F.setIndicatorArrow(U.arrowDirection,U.arrowXRelPos,U.arrowYRelPos),F}static displayToolTipCustomManual(k,B,U,F){const G=Q.setToolTip(W.q,k,B,U);return G.setProceedButtonVisibility(!1),Q.updateBaseDisplay(G,F),G.setIndicatorArrow(F.arrowDirection,F.arrowXRelPos,F.arrowYRelPos),G}static displayToolTipButtonGrid(k,B,U,G,j=!0,$){const H=Q.setToolTip(V.i,k,B,G);return H.GameObject.active=j,Q.updateBaseDisplay(H,U),F.Aq$.isDefined(U.arrowDirection)&&H.setIndicatorArrow(U.arrowDirection,U.arrowXRelPos,U.arrowYRelPos),F.Aq$.isDefined($)&&$.length>0&&H.setCallbacks($),H}static updateBaseDisplay(k,B,U){k.initializeText(B.bodyText,B.headerText,U),F.Aq$.isDefined(B.xPosition)&&(k.GameObject.legacyTransform.group.position.x=B.xPosition),F.Aq$.isDefined(B.yPosition)&&(k.GameObject.legacyTransform.group.position.y=B.yPosition),k.GameObject.legacyTransform.group.updateTransform()}static setToolTip(k,B,U,F){if(!B){const B=j.q.instance.prodigy.gameContainer.get("d0e-64fd");return("number"==typeof F?B.load(F,U):B.loadFromGUID(F,U)).findComponentInChildren(k)}return B}}Q.TOOLTIP_AUTO=10,Q.TOOLTIP_MANUAL=11,Q.TOOLTIP_SPEECH=108},64191:(k,B,U)=>{"use strict";U.d(B,{q:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(49237),H=U(28152),V=U(51972);let W=class extends V.f{constructor(){super(...arguments),this._closeButton=null,this._proceedButton=null,this._proceedButtonText=null}postCreate(){super.postCreate(),this._rightSideBorderOffset+=this._closeButton.GameObject.legacyTransform.width+this._proceedButton.GameObject.legacyTransform.width,this._closeButton.onClick.add((()=>{j.q.instance.prodigy.audio.playSFX(18,"pop"),this.close()})),this._cachedGameObjectHeight=this.GameObject.legacyTransform.height}initializeText(k,B,U){super.initializeText(k,B),this._closeButton.GameObject.legacyTransform.group.position.x=this.getBackgroundWidth()-this._rightSideBorderOffset*(G.Aq$.isDefined(U)&&U?.25:.5),U&&(this._proceedButton.GameObject.legacyTransform.group.position.x=this.getBackgroundWidth()-.7*this._rightSideBorderOffset),this.GameObject.active=!0}setCallback(k){this._proceedButton.onClick.add((()=>{k(),j.q.instance.prodigy.audio.playSFX(18,"pop"),this.close()})),this._proceedButtonText.text="Go"}setProceedButtonVisibility(k){k?this._proceedButton.GameObject.active||(this._rightSideBorderOffset+=this._proceedButton.GameObject.legacyTransform.width,this._proceedButton.GameObject.active=!0):this._proceedButton.GameObject.active&&(this._rightSideBorderOffset-=this._proceedButton.GameObject.legacyTransform.width,this._proceedButton.GameObject.active=!1)}close(){this.GameObject.active=!1}destroy(){this._closeButton.onClick.remove(this.close,this),super.destroy()}};(0,F.Cg)([(0,G.x4W)("closeButton"),(0,F.Sn)("design:type",$.$)],W.prototype,"_closeButton",void 0),(0,F.Cg)([(0,G.x4W)("proceedButton"),(0,F.Sn)("design:type",$.$)],W.prototype,"_proceedButton",void 0),(0,F.Cg)([(0,G.x4W)("proceedButtonText"),(0,F.Sn)("design:type",G.EYj)],W.prototype,"_proceedButtonText",void 0),W=(0,F.Cg)([(0,G.EVk)("ToolTipManual",H.Y.ui)],W)},97530:(k,B,U)=>{"use strict";U.d(B,{d:()=>it});var F=U(8674),G=U(62459),j=U(65240),$=U(35120),H=U(1195),V=U(73797),W=U(65116),q=U(49037),K=U(93171),z=U(68152),Y=U(44094),Q=U(20952),X=U(28152),Z=U(22866),J=U(34603),tt=U(19633),et=U(86675);let it=class extends G.uAl{init(k){this._achievementData=k;const B=$.q.instance.prodigy.achievements;this._title.text=B.getName(k),this._description.text=B.getDesc(k),this._achievementStars.init(k),this._progressBar.setValue(B.getProgress(k)),this._fractionText.text=B.getCompletionText(k);const U=k.data.reward;if(U){this._rewardIcon.setAsset($.q.instance.prodigy.icon.iconKey(U)).catch(G.RQr.createHandler("Error setting achievement reward image")),this._goButton.GameObject.active=!1,this._claimButton.GameObject.active=!1,this._claimedText.active=!1,this._rewardCheckmark.active=!1;const F=k.data.mapKey;B.isRewardClaimed(k)?(this._claimedText.active=!0,this._rewardCheckmark.active=!0):B.isComplete(k)?this._claimButton.GameObject.active=!0:F?(this._canTeleport.mapTag=F,this._teleport.mapTag=F,this._openTravelConfirm.onOpen.add((k=>k.findComponent(G.bE_).getInjectedValue("bodyTextComponent").text=this._localizer.getText("TRAVEL_CONFIRM_MESSAGE",$.q.instance.prodigy.world.getZone(F.split("-")[0]).name))),this._goButton.GameObject.active=!0):(this._claimButton.inputEnabled=!1,this._claimButton.GameObject.active=!0)}}claimReward(){const k=$.q.instance.prodigy.achievements;(0,z.v)(!k.isRewardClaimed(this._achievementData),"Achievement reward was claimed even though it has already been marked claimed."),this._claimButton.inputEnabled=!1;const B=Y.$.generateUID(),U=this._achievementData.ID;$.q.instance.prodigy.open.gotItem([this._achievementData.data.reward],void 0,void 0,void 0,void 0,void 0,{transaction_id:B,source_type:j.C.Achievement,source_id:U.toString()}),$.q.instance.prodigy.gameContainer.get("c47-20b6").create.achievementComplete({level:this._playerProvider.getLevel(),session_uuid:this._uuidProvider.getUUID(),achievement_name:k.getName(this._achievementData),achievement_id:U,transaction_id:B}).send(),this._playerProvider.player.achievements.complete(U),$.q.instance.game.broadcaster.broadcast(V.f7.ClaimedRewardsUpdated,void 0,[k.getUnclaimedRewards()])}};(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",H.E)],it.prototype,"_playerProvider",void 0),(0,F.Cg)([(0,G.Cdj)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],it.prototype,"_localizer",void 0),(0,F.Cg)([(0,G.Cdj)("2e6-0f71"),(0,F.Sn)("design:type",Q.H)],it.prototype,"_uuidProvider",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],it.prototype,"_title",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],it.prototype,"_description",void 0),(0,F.Cg)([(0,G.MnK)(et.u),(0,F.Sn)("design:type",et.u)],it.prototype,"_achievementStars",void 0),(0,F.Cg)([(0,G.MnK)(K.a),(0,F.Sn)("design:type",K.a)],it.prototype,"_progressBar",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],it.prototype,"_fractionText",void 0),(0,F.Cg)([(0,G.MnK)(J._),(0,F.Sn)("design:type",J._)],it.prototype,"_rewardIcon",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],it.prototype,"_rewardCheckmark",void 0),(0,F.Cg)([(0,G.MnK)(tt.S),(0,F.Sn)("design:type",tt.S)],it.prototype,"_claimButton",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],it.prototype,"_claimedText",void 0),(0,F.Cg)([(0,G.MnK)(tt.S),(0,F.Sn)("design:type",tt.S)],it.prototype,"_goButton",void 0),(0,F.Cg)([(0,G.MnK)(W.$),(0,F.Sn)("design:type",W.$)],it.prototype,"_canTeleport",void 0),(0,F.Cg)([(0,G.MnK)(q.q),(0,F.Sn)("design:type",q.q)],it.prototype,"_teleport",void 0),(0,F.Cg)([(0,G.MnK)(Z.l),(0,F.Sn)("design:type",Z.l)],it.prototype,"_openTravelConfirm",void 0),it=(0,F.Cg)([(0,G.EVk)("InitAchievementCard",X.Y.uiAchievement)],it)},54584:(k,B,U)=>{"use strict";U.d(B,{x:()=>Y});var F=U(8674),G=U(62459),j=U(95891),$=U(99625),H=U(35120),V=U(5269),W=U(2385),q=U(28152),K=U(97530),z=U(48215);let Y=class extends G.uAl{constructor(){super(...arguments),this._onInitComplete=new G.HN0}create(){super.create(),this._scrollView=this.GameObject.findComponentInChildren(W.I)}init(k){const B=this._contentObject.children;for(let F=B.length;--F>=0;)B[F].destroy();this._zoneRequirementText.run(k.data.zone);const U=H.q.instance.prodigy.achievements;j.sortBy(k.achievements,(k=>U.isComplete(k)?k.data.reward?U.isRewardClaimed(k)?2:0:2:1)).forEach((k=>this._prefabLoader.loadFromGUID(k.data.reward?$.l.AchievementCardWithReward:$.l.AchievementCard,this._contentObject).findComponent(K.d).init(k))),this._scrollView.scrollToPercent(100,V.H.Vertical),this._scrollView.resetVelocityWheel(),this._onInitComplete.dispatch()}destroy(){this._onInitComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.Cdj)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],Y.prototype,"_prefabLoader",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"_onInitComplete",void 0),(0,F.Cg)([(0,G.MnK)(z.Y),(0,F.Sn)("design:type",z.Y)],Y.prototype,"_zoneRequirementText",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Y.prototype,"_contentObject",void 0),Y=(0,F.Cg)([(0,G.EVk)("InitAchievementScrollview",q.Y.uiAchievement)],Y)},86675:(k,B,U)=>{"use strict";U.d(B,{u:()=>W});var F=U(8674),G=U(62459),j=U(1195),$=U(68152),H=U(28152),V=U(88022);let W=class extends G.uAl{constructor(){super(...arguments),this._evenStars=[],this._oddStars=[]}init(k){const B=k.data.ranks.length;(0,$.v)(B<=5,`There are over 5 ranks in achievement ${k.ID}: ${k.data.title}`),(0,$.v)(B>0,`There are no ranks in achievement ${k.ID}: ${k.data.title}`);const U=Math.min(this._playerProvider.player.achievements.getProgress(k.ID),B),F=B%2==0;this._evenStarsParent.active=F,this._oddStarsParent.active=!F;const G=F?this._evenStars:this._oddStars,j=(G.length-B)/2,H=[[j,"empty"],[j+U,"star-full"],[j+B,"star-empty"],[G.length,"empty"]];let W=0;for(const[$,q]of H)for(;W<$;)G[W++].updateAsset(V._.General_core_json,q);this._bigStar.active=U>=B}};(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",j.E)],W.prototype,"_playerProvider",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],W.prototype,"_bigStar",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],W.prototype,"_evenStarsParent",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],W.prototype,"_oddStarsParent",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",Array)],W.prototype,"_evenStars",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",Array)],W.prototype,"_oddStars",void 0),W=(0,F.Cg)([(0,G.EVk)("InitAchievementStars",H.Y.uiAchievement)],W)},48215:(k,B,U)=>{"use strict";U.d(B,{Y:()=>H});var F=U(8674),G=U(62459),j=U(40392),$=U(28152);let H=class extends G.uAl{run(k){let B;const U=k&&(B=j.i.BUTTONS_CONFIG.find((B=>B.zone===k)))&&!B.meetsRequirements();this._textObject.active=U,U&&(this._text.text=B.getGenericLockMessage())}};(0,F.Cg)([(0,G.Cdj)("db5-fb6e"),(0,F.Sn)("design:type",Object)],H.prototype,"_featureRequirement",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],H.prototype,"_textObject",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_text",void 0),H=(0,F.Cg)([(0,G.EVk)("SetZoneRequirementText",$.Y.uiAchievement)],H)},17737:(k,B,U)=>{"use strict";U.d(B,{n:()=>H});var F=U(8674),G=U(62459),j=U(44357);var $=U(28152);let H=class extends G.uAl{create(){super.create(),this._defaultBG.active=!0,this._unseenBG.active=!1}run(){(class{static play(k,B,U,G,$,H){return(0,F.sH)(this,void 0,void 0,(function*(){(0,j.Ry)(k,!1),(0,j.Ry)(B,!0),(0,j.Wf)($,H),yield(0,j.yH)(U,{x:.97,y:.97},300),yield(0,j.yH)(U,{x:1.03,y:1.03},200),yield(0,j.yH)(U,{x:.99,y:.99},250),yield(0,j.yH)(U,{x:1,y:1},100),yield(0,j.yH)(G,{x:.96,y:.96},200),yield(0,j.yH)(G,{x:1.04,y:1.04},200),yield(0,j.yH)(G,{x:.98,y:.98},150),yield(0,j.yH)(G,{x:1,y:1},100)}))}}).play(this._defaultBG,this._unseenBG,this._adTransform,this._newIcon,this._title,this._titleTargetPosition.localPosition)}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],H.prototype,"_defaultBG",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],H.prototype,"_unseenBG",void 0),(0,F.Cg)([(0,G.MnK)(G.dLy),(0,F.Sn)("design:type",G.dLy)],H.prototype,"_adTransform",void 0),(0,F.Cg)([(0,G.MnK)(G.dLy),(0,F.Sn)("design:type",G.dLy)],H.prototype,"_newIcon",void 0),(0,F.Cg)([(0,G.MnK)(G.dLy),(0,F.Sn)("design:type",G.dLy)],H.prototype,"_title",void 0),(0,F.Cg)([(0,G.MnK)(G.dLy),(0,F.Sn)("design:type",G.dLy)],H.prototype,"_titleTargetPosition",void 0),H=(0,F.Cg)([(0,G.EVk)("InitializeAd",$.Y.uiAd)],H)},94596:(k,B,U)=>{"use strict";U.d(B,{b:()=>$});var F=U(8674),G=U(62459),j=U(24285);class $ extends G.uAl{constructor(){super(...arguments),this._applyOnCreate=!1,this._filterList=[]}get filterList(){return this._filterList}create(){super.create(),this._renderComponent||(this._renderComponent=this.gameObject.findComponent(G.y4o)),this._renderComponent.getRootContainer()?this.onRootContainerInitialized():this._renderComponent.onRootContainerSet.add((()=>{this.onRootContainerInitialized()}))}destroy(){this._rootContainer&&!this._rootContainer.destroyed&&this.removeFilter(),super.destroy()}onRootContainerInitialized(){this.initialize(),this._applyOnCreate&&this.applyFilter()}initialize(){this._rootContainer=this._renderComponent.getRootContainer(),this._rootContainer&&(this._rootContainer.filters||(this._rootContainer.filters=[]))}reset(){this._rootContainer&&(this.removeFilter(),this._filterList=[],this.initialize(),this.applyFilter())}applyFilter(){var k;(null===(k=this._rootContainer)||void 0===k?void 0:k.filters)&&(this._filterList.forEach((k=>{-1===this._rootContainer.filters.indexOf(k)&&this._rootContainer.filters.push(k)})),j.s.resetCacheAsBitmap(this._rootContainer))}removeFilter(){var k;(null===(k=this._rootContainer)||void 0===k?void 0:k.filters)&&(this._rootContainer.filters=this._rootContainer.filters.filter((k=>!this._filterList.includes(k))),j.s.resetCacheAsBitmap(this._rootContainer))}}(0,F.Cg)([(0,G.Pqz)(G.y4o),(0,F.Sn)("design:type",G.y4o)],$.prototype,"_renderComponent",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_applyOnCreate",void 0)},57349:(k,B,U)=>{"use strict";U.d(B,{$:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(54524);let H=class extends $.K{constructor(){super(...arguments),this._addButtonSignal=new G.HN0}get emptyText(){return this._emptyText}get choosePetText(){return this._choosePetText}get clickToAddText(){return this._clickToAddText}get addSignal(){return this._addButtonSignal}setSelected(k){super.setSelected(k),this._addIcon.active=!k,this._emptyText.active=!k,this._choosePetText.active=k}onCardClick(){super.onCardClick(),this.addButtonClicked()}addButtonClicked(){this.addSignal.dispatch(null,this.teamPosition)}destroy(){this._addButtonSignal.dispose(),super.destroy()}};(0,F.Cg)([(0,G.x4W)("addIcon"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_addIcon",void 0),(0,F.Cg)([(0,G.x4W)("emptyText"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_emptyText",void 0),(0,F.Cg)([(0,G.x4W)("choosePetText"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_choosePetText",void 0),(0,F.Cg)([(0,G.x4W)("clickToAddText"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_clickToAddText",void 0),H=(0,F.Cg)([(0,G.EVk)("EmptyTeamCard",j.Y.uiPet)],H)},42838:(k,B,U)=>{"use strict";U.d(B,{s:()=>V});var F=U(8674),G=U(62459),j=U(28152),$=U(50873),H=U(18280);let V=class extends G.uAl{constructor(){super(...arguments),this._currentMask=null,this._fillMask=null}postCreate(){super.postCreate(),this.createMask(),this.applyMask(this._currentMask)}applyMask(k){this._currentMask=k,this._fillImage.legacyTransform.group.mask=this._currentMask.getGraphicSource()}removeMask(){this._currentMask=null,this._fillImage.legacyTransform.group.mask=null}set fillPercent(k){this._fillMask.setFillPercent(k)}createMask(){const k=new G._mx(this.gameObject);k.addComponent(G.K16),k.name="Mask",this._currentMask=k.addComponent(H.n),this._fillMask=k.addComponent($.k);const B=this._fillImage.legacyTransform.width,U=this._fillImage.legacyTransform.height;this._fillMask.Width=B,this._fillMask.Height=U,k.legacyTransform.x+=.5*B,k.legacyTransform.y+=.5*U}};(0,F.Cg)([(0,G.x4W)("fillImage"),(0,F.Sn)("design:type",G._mx)],V.prototype,"_fillImage",void 0),V=(0,F.Cg)([(0,G.EVk)("FillBarComponent",j.Y.ui)],V)},46168:(k,B,U)=>{"use strict";U.d(B,{Q:()=>J});var F=U(8674),G=U(62459),j=U(68910),$=U(35120),H=U(98013),V=U(37773),W=U(65732),q=U(97317),K=U(22023),z=U(80060),Y=U(49282),Q=U(28152),X=U(44725),Z=U(54524);let J=class extends Z.K{constructor(){super(...arguments),this._editSignal=new G.HN0,this._addMode=!1}get editSignal(){return this._editSignal}get creatureData(){return[this._creatureData]}postCreate(){super.postCreate(),this._bottomPanel.legacyTransform.group.getChildAt(1).exists=!0,this._staticBackgroundContainer.legacyTransform.group.exists=!1}setDisplayCreature(k,B=!1){this.containsPlayer=B,this._creatureData=k.data,this._itemData=k.source,this._displayCreature=k,this.containsPlayer&&this._cardShadow&&(this._cardShadow.active=!1);const U=this.containsPlayer?V.e.getActivePlayerChargedLevelTier():q.Bv.NO_CHARGE,F=V.e.activePlayerHasChargedLevels?q.X$.IDLE:q.X$.HIDDEN;z.d.updateInjectedValues(this.gameObject,{[W.E.ChargedCreatureEffectTier]:U,[W.E.ChargedCreatureEffectDisplayType]:F,MERGE_RANK:0})}get isCardValid(){return!(!this._displayCreature||!this._creatureData)}get name(){return this.containsPlayer?"You!":K.P8.getPetDisplayName(this._itemData,this._creatureData,15)}get tooltipPosition(){return this._tooltipPosition.legacyTransform.group.getGlobalPosition()}get worldPosition(){const k=this.GameObject.legacyTransform.group.worldTransform;return new j.Point(k.tx,k.ty)}onCardClick(){this._addMode?this.sendData(this._creatureData,this.teamPosition):(super.onCardClick(),this.editSignal.dispatch(this,this._creatureData,this.teamPosition))}updateCard(){this.setNameText(this.name);let k=K.P8.getPetLevel(this._creatureData);if(this.containsPlayer){k+=$.q.instance.prodigy.gameContainer.get("306-5359").getChargedLevel()}this.setLevelText(k),this.containsPlayer&&V.e.getActivePlayerChargedLevelTier()!==q.Bv.NO_CHARGE&&(this._levelText.fill=q.Vh);const B=K.P8.getPetDisplayMergeRank(this._displayCreature.data.ID,this._displayCreature.data.uniqueID),U=!(this.containsPlayer||void 0===B);if(this._mergeRankBadge.active=U,U){const k={MERGE_RANK:B,SHOW_MERGE_RANK_BADGE:K.P8.canPetAccessMergeRanks(this._creatureData.ID)};z.d.updateInjectedValues(this.gameObject,k,!0)}this.setCreaturePreview(this._displayCreature),this.setElement(this._creatureData.ID)}setNameText(k){this._nameText.text=null!=k?k:this._nameText.text}setElement(k){this._wizardElementDisplay.active=this.containsPlayer,this._elementDisplay.GameObject.active=!this.containsPlayer,this.containsPlayer||this._elementDisplay.setPetID(k)}setLevelText(k){var B;this._levelText.text=null!==(B=k.toString())&&void 0!==B?B:this._levelText.text}setCreaturePreview(k){this._creaturePreview.addCreature(k,!0)}setDefaultState(){super.setDefaultState(),this._addMode=!1,this._clickPanel.active=!1}setAddMode(){super.setHighlighted(!0),this._addMode=!0,this._clickPanel.active=!0,$.q.instance.prodigy.audio.playSFX(18,"pop")}setEditMode(k){super.setHighlighted(k)}resetCard(){H.l.removeAll(this._creaturePreview.GameObject.legacyTransform.group,!0)}destroy(){var k;(null===(k=this._staticBackgroundContainer)||void 0===k?void 0:k.legacyTransform)&&(this._staticBackgroundContainer.legacyTransform.group.cacheAsBitmap=!1,this._staticBackgroundContainer.legacyTransform.group.destroy()),this._editSignal.dispose(),super.destroy()}};(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],J.prototype,"_nameText",void 0),(0,F.Cg)([(0,G.MnK)(X.u),(0,F.Sn)("design:type",X.u)],J.prototype,"_creaturePreview",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],J.prototype,"_levelText",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_mergeRankBadge",void 0),(0,F.Cg)([(0,G.ERr)(),(0,G.nKb)("clickTextPanel"),(0,F.Sn)("design:type",G._mx)],J.prototype,"_clickPanel",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_tooltipPosition",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_bottomPanel",void 0),(0,F.Cg)([(0,G.ERr)(),(0,G.nKb)("backgroundContainer"),(0,F.Sn)("design:type",G._mx)],J.prototype,"_staticBackgroundContainer",void 0),(0,F.Cg)([(0,G.MnK)(Y.D),(0,F.Sn)("design:type",Y.D)],J.prototype,"_elementDisplay",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_wizardElementDisplay",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_cardShadow",void 0),J=(0,F.Cg)([(0,G.EVk)("FilledTeamCard",Q.Y.uiPet)],J)},16815:(k,B,U)=>{"use strict";U.d(B,{Z:()=>it});var F,G=U(8674),j=U(62459),$=U(50788),H=U(37016),V=U(96989),W=U(49237),q=U(77938),K=U(12472),z=U(76277),Y=U(22023),Q=U(80060),X=U(49282),Z=U(28152),J=U(65231),tt=U(35189),et=U(29834);let it=F=class extends J.s{constructor(){super(...arguments),this._stackBackgrounds=[],this._stackShadows=[],this._isCardInputDisabled=!1,this._onUpdateCanBeEvolved=new j.HN0}get creatureData(){return this._creatureData}get displayedCreature(){var k;return this._creatureData?null!==(k=this._creatureData.find((k=>Y.P8.isPetOnTeam(k))))&&void 0!==k?k:this._creatureData[0]:null}get onInputOver(){return this._cardInteraction.onInputOver}get onInputOut(){return this._cardInteraction.onInputOut}postCreate(){super.postCreate(),this._bottomPanel.legacyTransform.group.getChildAt(1).exists=!0,this._staticBackgroundContainer.legacyTransform.group.exists=!1}setPetData(k,B){var U;super.setItemData(B),this._elementDisplay.setPetID(null!==(U=null==k?void 0:k[0].ID)&&void 0!==U?U:1),this._creatureData=k;for(let F=0;FF.getMergeUpgradeSuggestion(k)));Q.d.updateInjectedValues(this.gameObject,{SHOW_MERGE_RANK_BADGE:B,MERGE_RANK:k,READY_TO_MERGE:U},!0)}}setOnTeamContainer(){this._onTeamContainer.active=this._creatureData.some((k=>Y.P8.isPetOnTeam(k)))}setUpgradeState(){let k=Y.P8.getUpgradeSuggestion(this.displayedCreature);for(let B=0;!k&&Bq.t.getItem("pet",k)),F).length{"use strict";U.d(B,{K:()=>V});var F=U(8674),G=U(62459),j=U(49237),$=U(24382),H=U(35189);class V extends $.j{constructor(){super(...arguments),this._sendDataSignal=new G.HN0,this._sendClickSignal=new G.HN0,this._isCardInputEnabled=!1,this._isSelected=!1,this._containsPlayer=!1}set teamPosition(k){this._teamPosition=k,this._teamPositionText.text=(k+1).toString()}get teamPosition(){return this._teamPosition}get sendDataSignal(){return this._sendDataSignal}get sendClickSignal(){return this._sendClickSignal}get isSelected(){return this._isSelected}set containsPlayer(k){this._containsPlayer=k}get containsPlayer(){return this._containsPlayer}setDefaultState(){this.setSelected(!1),this.enableCardInput(!0),this.enableTransparency(!1)}setPlayerState(){this.setSelected(!1),this.enableCardInput(!1),this.enableTransparency(!1)}setHighlighted(k){this._cardState.SecondState=k}setSelected(k){this._isSelected=k,this.setHighlighted(k),this.enableCardInput(!k)}enableCardInput(k){this._isCardInputEnabled=k,this._cardInteraction.inputEnabled=k}enableTransparency(k){this.GameObject.legacyTransform.group.alpha=k?.7:1}create(){super.create(),this.setDefaultState(),this._cardInteraction.onClick.add((()=>{this.onCardClick()}))}onCardClick(){this.reportClick(),this.setSelected(!0)}reportClick(){this.sendClickSignal.dispatch()}sendData(k,B){this.sendDataSignal.dispatch(k,B)}addClickListener(k){this.sendClickSignal.add(k.onCardClicked,k)}addDataReceiver(k){this.sendDataSignal.add(k.receivePetData,k)}destroy(){this._sendDataSignal.dispose(),this._sendClickSignal.dispose(),super.destroy()}}(0,F.Cg)([(0,G.x4W)("cardInteraction"),(0,F.Sn)("design:type",j.$)],V.prototype,"_cardInteraction",void 0),(0,F.Cg)([(0,G.x4W)("cardState"),(0,F.Sn)("design:type",H.e)],V.prototype,"_cardState",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],V.prototype,"_teamPositionText",void 0)},41851:(k,B,U)=>{"use strict";U.d(B,{v:()=>q});var F,G=U(8674),j=U(62459),$=U(35120),H=U(49237),V=U(76974),W=U(28152);!function(k){k[k.DEFAULT=1]="DEFAULT",k[k.INVERTED=-1]="INVERTED"}(F||(F={}));let q=class extends j.uAl{constructor(){super(...arguments),this.swapSignal=new j.HN0,this.failedSwapSignal=new j.HN0,this.finishEditingSignal=new j.HN0}postCreate(){super.postCreate(),this._rightSwapButton.GameObject.active=!1,this.rightIcons=this._rightSwapButton.GameObject.findComponentsInChildren(j.vYh),this.leftIcons=this._leftSwapButton.GameObject.findComponentsInChildren(j.vYh),this._kennel=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel,this._confirmButton.onClick.add((()=>{$.q.instance.prodigy.audio.playSFX(18,"pop"),this.doneEditing()})),this._leftSwapButton.onClick.add((()=>{this.tryToSwap(this._canSwapLeft,this._leftSwapPosition)})),this._rightSwapButton.onClick.add((()=>{this.tryToSwap(this._canSwapRight,this._rightSwapPosition)}))}tryToSwap(k,B){k?this.swap(B,this._currentTeamPosition):($.q.instance.prodigy.audio.playSFX(67,"button-disabled"),this.failedSwapSignal.dispatch())}setSwapPositions(k){switch(this._currentTeamPosition=k,k){case 0:this._leftSwapPosition=1,this._rightSwapPosition=2,this.flipRightIcons(F.DEFAULT),this.flipLeftIcons(F.DEFAULT);break;case 1:this._leftSwapPosition=2,this._rightSwapPosition=0,this.flipRightIcons(F.DEFAULT),this.flipLeftIcons(F.INVERTED);break;case 2:this._leftSwapPosition=1,this._rightSwapPosition=0,this.flipRightIcons(F.INVERTED),this.flipLeftIcons(F.DEFAULT)}}setSwapButtonsEnabled(){this._canSwapLeft=this._kennel.canSwapPositions(this._currentTeamPosition,this._leftSwapPosition,1),this._canSwapRight=this._kennel.canSwapPositions(this._currentTeamPosition,this._rightSwapPosition,1),this._canSwapLeft?this._leftSwapButton.unlockState():this._leftSwapButton.lockState(V.K.Disabled),this._canSwapRight?this._rightSwapButton.unlockState():this._rightSwapButton.lockState(V.K.Disabled)}movePanel(k){this.gameObject.legacyTransform.group.position.set(k.x,k.y)}flipRightIcons(k){this.rightIcons.forEach((B=>{B.GameObject.legacyTransform.group.scale.y=k}))}flipLeftIcons(k){this.leftIcons.forEach((B=>{B.GameObject.legacyTransform.group.scale.y=k}))}swap(k,B){this.swapSignal.dispatch(k,B)}doneEditing(){this.finishEditingSignal.dispatch()}setActive(k){this.gameObject.active=k}destroy(){this.swapSignal.dispose(),this.finishEditingSignal.dispose(),this.failedSwapSignal.dispose(),super.destroy()}};(0,G.Cg)([(0,j.x4W)("confirmButton"),(0,G.Sn)("design:type",H.$)],q.prototype,"_confirmButton",void 0),(0,G.Cg)([(0,j.x4W)("leftSwapButton"),(0,G.Sn)("design:type",H.$)],q.prototype,"_leftSwapButton",void 0),(0,G.Cg)([(0,j.x4W)("rightSwapButton"),(0,G.Sn)("design:type",H.$)],q.prototype,"_rightSwapButton",void 0),q=(0,G.Cg)([(0,j.EVk)("TeamSwapPanel",W.Y.uiPet)],q)},62053:(k,B,U)=>{"use strict";U.d(B,{I:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{getCustomData(){return{adId:this.adID,value:this._videoMenu.videoPlayer.errorReason?-1:this._videoMenu.getMinimumThresholdReached()}}};(0,F.Cg)([(0,G.MnK)("VideoMenuComponent"),(0,F.Sn)("design:type",Function)],$.prototype,"_videoMenu",void 0),$=(0,F.Cg)([(0,G.EVk)("AppendVideoProgress",j.Y.uiVideo)],$)},83142:(k,B,U)=>{"use strict";U.d(B,{D:()=>G});var F=U(62459);class G extends F.uAl{}},71072:(k,B,U)=>{"use strict";U.d(B,{V:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(46361),V=U(83142);let W=class extends V.D{loadVideoConfig({adID:k,videoID:B,header:U,message:F}){G.Aq$.isDefined(k)&&(this._adID=k),B&&(this.videoID=B),U&&(this.tooltipHeaderKey=U),F&&(this.tooltipMessageKey=F)}open(){this._menuOpener.open().onPrefabLoaded.addOnce((k=>{const B={videoID:this.videoID,adID:this._adID,header:this.tooltipHeaderKey?this._localizer.getText(this.tooltipHeaderKey):void 0,message:this.tooltipMessageKey?this._localizer.getText(this.tooltipMessageKey):void 0,icon:this.tooltipIconAsset};for(const U of k.findComponentsInChildren(V.D))U.loadVideoConfig(B);j.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendPostOpenedEvent(this._adID.toString())}))}destroy(){super.destroy()}};(0,F.Cg)([(0,G.Cdj)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],W.prototype,"_localizer",void 0),(0,F.Cg)([(0,G.MnK)(H.S),(0,F.Sn)("design:type",H.S)],W.prototype,"_menuOpener",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],W.prototype,"videoID",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],W.prototype,"tooltipHeaderKey",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],W.prototype,"tooltipMessageKey",void 0),(0,F.Cg)([(0,G.Bak)(),(0,G.W_S)(),(0,F.Sn)("design:type",String)],W.prototype,"tooltipIconAsset",void 0),W=(0,F.Cg)([(0,G.EVk)("OpenVideo",$.Y.uiVideo)],W)},95429:(k,B,U)=>{"use strict";U.d(B,{k:()=>z});var F=U(8674),G=U(62459),j=U(35120),$=U(49237),H=U(28152),V=U(93963),W=U(62053),q=U(83142),K=U(11682);let z=class extends q.D{constructor(){super(...arguments),this._videoPlayer=null,this._closeButton=null,this._ctaButton=null,this._minThresholdReached=0}get videoPlayer(){return this._videoPlayer}get closeButton(){return this._closeButton}get callToActionButton(){return this._ctaButton}update(){super.update(),this.calculateMinimumThreshold()}loadVideoConfig(k){this.videoPlayer.youtubeID=k.videoID,this.videoPlayer.init(),this._closeMetric.id=k.adID,this._closeMetric2&&(this._closeMetric2.adID=k.adID)}calculateMinimumThreshold(){if(this._videoPlayer&&this._minThresholdReached<100)if(this._videoPlayer.getPlayerState()===K.w.Playing){const k=this._videoPlayer.getPercentPlayed();k>this._minThresholdReached&&(this._minThresholdReached=k)}else this._videoPlayer.getPlayerState()===K.w.Ended&&(this._minThresholdReached=100)}getMinimumThresholdReached(){return this._minThresholdReached}destroy(){j.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendPostClosedEvent(this._closeMetric.id.toString(),this._videoPlayer.isReady),this.closeButton.onClick.dispose(),this.callToActionButton.onClick.dispose(),super.destroy()}};(0,F.Cg)([(0,G.MnK)(K.H),(0,G.Lr6)(0),(0,G.nKb)("videoPlayer"),(0,F.Sn)("design:type",K.H)],z.prototype,"_videoPlayer",void 0),(0,F.Cg)([(0,G.MnK)($.$),(0,G.Lr6)(0),(0,G.nKb)("close"),(0,F.Sn)("design:type",$.$)],z.prototype,"_closeButton",void 0),(0,F.Cg)([(0,G.MnK)($.$),(0,G.Lr6)(0),(0,G.nKb)("callToAction"),(0,F.Sn)("design:type",$.$)],z.prototype,"_ctaButton",void 0),(0,F.Cg)([(0,G.MnK)(V.b),(0,F.Sn)("design:type",V.b)],z.prototype,"_closeMetric",void 0),(0,F.Cg)([(0,G.MnK)(W.I),(0,F.Sn)("design:type",W.I)],z.prototype,"_closeMetric2",void 0),z=(0,F.Cg)([(0,G.EVk)("VideoMenuComponent",H.Y.uiVideo)],z)},11682:(k,B,U)=>{"use strict";U.d(B,{H:()=>W,w:()=>G});var F,G,j=U(8674),$=U(62459),H=U(35120),V=U(28152);!function(k){k[k.Unstarted=-1]="Unstarted",k[k.Ended=0]="Ended",k[k.Playing=1]="Playing",k[k.Paused=2]="Paused",k[k.Buffering=3]="Buffering",k[k.VideoCued=5]="VideoCued"}(G||(G={}));let W=F=class extends $.uAl{constructor(){super(...arguments),this._urlID="",this._autoCreateComponent=!0,this._showControls=!0,this._autoPlay=!0,this._iframe=document.createElement("iframe"),this._canvas=null,this._ytPlayerObject=null,this._onPlayerReady=new $.HN0,this._onPlayerError=new $.HN0,this._onPlayerStateChange=new $.HN0,this._cachedHeightRatio=-1,this._cachedWidthRatio=-1,this._isReady=!1,this._initWaiting=!1,this._isInit=!1,this._errorReason=null}get errorReason(){return this._errorReason}set youtubeID(k){this._urlID=k}get youtubeID(){return this._urlID}set showControls(k){this._showControls=k}get showControls(){return this._showControls}get onPlayerReady(){return this._onPlayerReady}get onPlayerError(){return this._onPlayerError}get onPlayerStateChange(){return this._onPlayerStateChange}get isReady(){return this._isReady}create(){if(super.create(),this._canvas=document.getElementById("game-container").getElementsByTagName("canvas")[0],!F.GOOGLE_YTPLAYER_API_LOADED){const k=document.createElement("script");k.src=`${F.YOUTUBE_BASE_URL}player_api`,k.onerror=()=>{this._errorReason="YTPlayer API failed to load"};const B=document.getElementsByTagName("script")[0];B.parentNode.insertBefore(k,B)}}postCreate(){super.postCreate(),this._autoCreateComponent&&this.init()}init(){this._isInit?this.logError("Attempting to initialize more than once."):(this._isInit=!0,F.GOOGLE_YTPLAYER_API_LOADED?this.createYTPlayerObject():this._initWaiting=!0)}createYTPlayerObject(){if(this._isReady)this.logError("Attempting to create YTPlayer object more than once.");else{if(this._iframe){this._isReady=!0,this._resumeAudioOnRemove=!!H.q.instance.prodigy.audio.currentBgm&&H.q.instance.prodigy.audio.currentBgm.isPlaying,H.q.instance.prodigy.audio.pauseBGM(),this._iframe.setAttribute("class","youtube"),this._iframe.setAttribute("id","ytplayer"),this.updateSrc(),this._iframe.style.position="absolute",this._iframe.style.display="block",this._autoPlay&&(this._iframe.allow="autoplay");document.getElementById("external-ui").appendChild(this._iframe),this.applyTransform()}else this.logError("YouTube iframe is undefined.");this._errorReason="timeout on loading",this._ytPlayerObject=new window.YT.Player("ytplayer",{events:{onReady:()=>{this.onPlayerReadyHandler()},onError:k=>{this.onPlayerErrorHandler(k)},onStateChange:()=>{this.onPlayerStateChangeHandler()}},origin:window.location.origin})}}onPlayerReadyHandler(){this._errorReason=null,this._onPlayerReady.dispatch()}onPlayerErrorHandler(k){switch(k.data){case 2:this._errorReason="Invalid parameter";break;case 5:this._errorReason="HTML 5 player error";break;case 100:this._errorReason="Video not found";break;case 101:this._errorReason="Video not playable"}this._onPlayerError.dispatch()}onPlayerStateChangeHandler(){this._onPlayerStateChange.dispatch()}applyVideoURL(k){this._urlID=k,this._isReady?this.updateSrc():this.logError("Attempting to set url before player is ready. Waiting for initialization.")}updateSrc(){if($.Aq$.isDefined(this._urlID)&&0!==this._urlID.length){let k,B;k=this._showControls?1:0,B=this._autoPlay?1:0,this._iframe.setAttribute("src",`${F.YOUTUBE_BASE_URL}embed/${this._urlID}?autoplay=${B.toString()}&modestbranding=1&controls=${k.toString()}&rel=0&enablejsapi=1`)}else this.logError("YouTube id is required.")}applyTransform(){const k=this._canvas.clientHeight/H.q.instance.game.height,B=this._canvas.clientWidth/H.q.instance.game.width;if(k!==this._cachedHeightRatio||B!==this._cachedWidthRatio){const U=this.GameObject.legacyTransform.width,F=this.GameObject.legacyTransform.height,G=this.GameObject.legacyTransform.x,j=this.GameObject.legacyTransform.y;this._iframe.style.height=k*F+"px",this._iframe.style.width=B*U+"px";const $=k*j,H=B*G;this._iframe.style.top=`${$}px`,this._iframe.style.left=`${H}px`,this._cachedHeightRatio=k,this._cachedWidthRatio=B}}setVisible(k){this._iframe&&(k?(this._iframe.style.visibility="visible",this._iframe.style.display="block"):(this._iframe.style.visibility="hidden",this._iframe.style.display="none"))}playVideo(){var k;(null===(k=this._ytPlayerObject)||void 0===k?void 0:k.playVideo)&&this._ytPlayerObject.playVideo()}stopVideo(k=!1){var B;(null===(B=this._ytPlayerObject)||void 0===B?void 0:B.pauseVideo)&&(this._ytPlayerObject.pauseVideo(),k&&this._ytPlayerObject.seekTo(0))}getPlayerState(){var k;return(null===(k=this._ytPlayerObject)||void 0===k?void 0:k.getPlayerState)?this._ytPlayerObject.getPlayerState():-1}getPercentPlayed(){var k;return(null===(k=this._ytPlayerObject)||void 0===k?void 0:k.getDuration)&&0!==this._ytPlayerObject.getDuration()?Math.floor(this._ytPlayerObject.getCurrentTime()/this._ytPlayerObject.getDuration()*100):0}update(){super.update(),F.GOOGLE_YTPLAYER_API_LOADED&&(this._initWaiting?(this._initWaiting=!1,this.createYTPlayerObject()):this._isReady&&this.applyTransform())}logError(k){$.VyI.log(`YouTubeVideo Component: ${k}`,$.$bb.Verbose)}destroy(){var k;this._resumeAudioOnRemove&&H.q.instance.prodigy.audio.resumeBGM(),this._iframe&&(this._iframe.remove(),this._iframe=null),(null===(k=this._ytPlayerObject)||void 0===k?void 0:k.destroy)&&(this._ytPlayerObject.destroy(),this._ytPlayerObject=null),this._onPlayerReady.dispose(),this._onPlayerError.dispose(),this._onPlayerStateChange.dispose(),super.destroy()}};W.GOOGLE_YTPLAYER_API_LOADED=!1,W.YOUTUBE_BASE_URL="https://www.youtube.com/",(0,j.Cg)([(0,$.W_S)(),(0,$.nKb)("id"),(0,j.Sn)("design:type",String)],W.prototype,"_urlID",void 0),(0,j.Cg)([(0,$.vkK)(),(0,$.nKb)("autoCreate"),(0,j.Sn)("design:type",Boolean)],W.prototype,"_autoCreateComponent",void 0),(0,j.Cg)([(0,$.vkK)(),(0,$.nKb)("showControls"),(0,j.Sn)("design:type",Boolean)],W.prototype,"_showControls",void 0),(0,j.Cg)([(0,$.vkK)(),(0,$.nKb)("autoPlay"),(0,j.Sn)("design:type",Boolean)],W.prototype,"_autoPlay",void 0),W=F=(0,j.Cg)([(0,$.EVk)("YouTubeVideo",V.Y.uiVideo)],W),window.onYouTubeIframeAPIReady=()=>{W.GOOGLE_YTPLAYER_API_LOADED=!0}},31029:(k,B,U)=>{"use strict";U.d(B,{u:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(95383);class V extends G.$KW{generate(k,B){const U=G.Gme.checkboxGroup({id:"closeMenus",labelValue:"Close Menus",inputValue:k.closeMenus}),F=G.Gme.numberGroup({id:"assetId",labelValue:"Asset ID",inputValue:k.assetId}),j=G.NyS.create({id:"onComplete",label:"On FSM Complete",signalValue:k.onComplete,componentGUID:this._componentGuid});return G.XRp.createVertical([U,F,j,this.createVariablesRecordGroup(k,B)])}createVariablesRecordGroup(k,B){var U;const F=Object.keys(null!==(U=k.fsmVariables)&&void 0!==U?U:{}),j=G.XRp.createHorizontal([G.fqe.create({id:"addComponentKey",inputType:"text",inputValue:B.addComponentKey,onChange:(k,B)=>{this._editorAPI.saveComponentMetadata(this._componentGuid,{[k]:B})}}),G.X9M.create({id:"addComponentButton",buttonText:"+ Component",onClick:()=>{B.addComponentKey.length<1||F.includes(B.addComponentKey)||(this._editorAPI.modifyComponent(this._componentGuid,{fsmVariables:Object.assign(Object.assign({},k.fsmVariables),{[B.addComponentKey]:null})}),this._editorAPI.saveComponentMetadata(this._componentGuid,{addComponentKey:void 0}))}})]),$=F.map((B=>G.XRp.createHorizontal([G.Gme.componentPickerGroup({id:B,labelValue:B,componentType:"any",componentGuid:k.fsmVariables[B],propertyPath:["fsmVariables",B],onChange:U=>{this._editorAPI.modifyComponent(this._componentGuid,{fsmVariables:Object.assign(Object.assign({},k.fsmVariables),{[B]:U})})}}),G.X9M.create({id:"removeComponentButton",buttonText:"X",nodeSize:"1of12",onClick:()=>{delete k.fsmVariables[B],this._editorAPI.modifyComponent(this._componentGuid,{fsmVariables:k.fsmVariables})}})])));return $.push(j),G.XRp.createVertical($,{title:"FSM Variables",isContainer:!0,isCollapsible:!0,startCollapsed:!0})}}let W=class extends G.uAl{constructor(){super(...arguments),this.fsmVariables={},this.onStart=new G.HN0,this.onComplete=new G.HN0,this._closeMenus=!0}run(){this.execute(this.assetId,Object.assign({game:j.q.instance.prodigy.game},this.fsmVariables))}execute(k,B,U=null){this._closeMenus&&j.q.instance.prodigy.open.menuCloseAll();const F=j.q.instance.prodigy.notifications;F.pause(this),F.clearNotifications(),this._popupManager&&(this._popupManager.Active=!1),this.onStart.dispatch(B),this.fsmController.execute(this.fsmService.getStateMachine(k),B,(()=>{this._popupManager&&(this._popupManager.Active=!0),F.resume(this),null==U||U(),this.onComplete.dispatch(B)}))}destroy(){this.onStart.dispose(),this.onComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"assetId",void 0),(0,F.Cg)([(0,G.OmD)(),(0,G.MnK)(G.uAl),(0,F.Sn)("design:type",Object)],W.prototype,"fsmVariables",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],W.prototype,"onStart",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],W.prototype,"onComplete",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],W.prototype,"_closeMenus",void 0),(0,F.Cg)([(0,G.Cdj)(G.$Bt.IFSMController),(0,F.Sn)("design:type",Object)],W.prototype,"fsmController",void 0),(0,F.Cg)([(0,G.Cdj)(G.$Bt.FSMService),(0,F.Sn)("design:type",G.CQn)],W.prototype,"fsmService",void 0),(0,F.Cg)([(0,G.Cdj)("PopupHandler"),(0,F.Sn)("design:type",H.Y)],W.prototype,"_popupManager",void 0),W=(0,F.Cg)([(0,G.WR4)(V),(0,G.EVk)("FSM",$.Y.utility)],W)},72012:(k,B,U)=>{"use strict";U.d(B,{y:()=>j});var F=U(8674),G=U(62459);let j=class extends G.uAl{constructor(){super(...arguments),this._currentValue=!1,this._onValueChanged=new G.HN0,this._onValueChangedToTrue=new G.HN0,this._onValueChangedToFalse=new G.HN0}get onValueChanged(){return this._onValueChanged}destroy(){this._onValueChanged.dispose(),this._onValueChangedToTrue.dispose(),this._onValueChangedToFalse.dispose(),super.destroy()}setValue(k){k!==this._currentValue&&(this._currentValue=k,this._onValueChanged.dispatch(),!0===k?this._onValueChangedToTrue.dispatch():!1===k&&this._onValueChangedToFalse.dispatch())}getValue(){return this._currentValue}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"_onValueChanged",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"_onValueChangedToTrue",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"_onValueChangedToFalse",void 0),j=(0,F.Cg)([(0,G.EVk)("BooleanStateBase (abstract)")],j)},59599:(k,B,U)=>{"use strict";U.d(B,{f:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(72012);let H=class extends $.y{create(){var k;super.create(),this.setValue((null===(k=this._saveData)||void 0===k?void 0:k.getData())||this._booleanValue)}setValue(k){super.setValue(k),this._booleanValue=k,this._saveData&&this._saveData.setData(k)}toggleValue(){this.setValue(!this._booleanValue)}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_booleanValue",void 0),(0,F.Cg)([(0,G.MnK)(G.Tyz),(0,F.Sn)("design:type",G.Tyz)],H.prototype,"_saveData",void 0),H=(0,F.Cg)([(0,G.EVk)("BooleanState",j.Y.utility)],H)},37251:(k,B,U)=>{"use strict";U.d(B,{X:()=>q});var F,G=U(8674),j=U(79600),$=U(62459),H=U(3332),V=U(79687),W=U(35120);let q=F=class{constructor(){const k=W.q.instance.prodigy.gameContainer.get("be9-3278"),B=k.getCortexRootURL(),U=k.getMultiplayerRootURL();this.init(`${F.CLIENT_ID}`,{serviceRootURL:B}),this.multiplayer=new H.Multiplayer(`${F.CLIENT_ID}`,U)}setToken(k,B,U,F){j.catalystSDK.setToken(k,B,{header:U,body:F}),"jwt"===k&&B&&this.multiplayer.authenticate(B).catch((k=>{$.VyI.log("[CatalystSDKWrapper] Failed to authenticate multiplayer client",$.$bb.Error)}))}init(k,B){j.catalystSDK.init(k,B),j.catalystSDK.authHandler.setCallback("onRenewJWTError",this.onRenewJWTError.bind(this))}onRenewJWTError(k){W.q.instance.prodigy.gameContainer.get("c97-bd0d").showTokenExpiredPopup()}get cloudScript(){return j.catalystSDK.cloudScript}get mailer(){return j.catalystSDK.mailer}get gameAssetsExperiments(){return j.catalystSDK.gameAssetsExperiments}get featureAccess(){return j.catalystSDK.featureAccess}get genericRequest(){return j.catalystSDK.genericRequest}get authHandler(){return j.catalystSDK.authHandler}get isLoggedIn(){return j.catalystSDK.authHandler.isLoggedIn()}};q.CLIENT_ID=1,q=F=(0,G.Cg)([(0,V.injectable)(),(0,G.Sn)("design:paramtypes",[])],q)},77065:(k,B,U)=>{"use strict";U.d(B,{B:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(38920),H=U(28152);let V=class extends G.uAl{constructor(){super(...arguments),this._speedMS=500,this.onStart=new G.HN0,this.onComplete=new G.HN0,this._autoStart=!1,this._useFormatting=!1,this._tweenObject=null}set initialNumber(k){this._initialNumber=k}set targetNumber(k){this._targetNumber=k}set speedMS(k){this._speedMS=k}create(){super.create(),this._autoStart&&this.startCounter()}startCounter(){if(this._textObject){if(!this._initialNumber){const k=parseInt(this._textObject.text);isNaN(k)||(this._initialNumber=k)}this._tweenObject={target:this._initialNumber},this._activeTween=j.q.instance.game.add.tween(this._tweenObject,this._tweenObject),this._activeTween.to({target:this._targetNumber},this._speedMS,G.GS3.Quadratic.Out,!1),this._activeTween.onUpdate.add((()=>{this.setValue(this._tweenObject.target)})),this._activeTween.onTweenComplete.addOnce((()=>{this.setValue(this._targetNumber),this.onComplete.dispatch(),this._activeTween.destroy()})),this._activeTween.onStart.addOnce((()=>{this.onStart.dispatch()})),this._activeTween.start()}else G.VyI.log("The text component with the number to tween for the CounterTextComponent has not been set.",G.$bb.Error)}setValue(k){!this._textObject.GameObject||this._textObject.GameObject.isDestroyed||this._textObject.GameObject.isMarkedForDestruction||(this._textObject.text=this._useFormatting?(0,$.Hk)(k):Math.floor(k).toString())}destroy(){this.onStart.dispose(),this.onComplete.dispose(),j.q.instance.game.tweens.remove(this._activeTween),super.destroy()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_initialNumber",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_targetNumber",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_speedMS",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],V.prototype,"_textObject",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onStart",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onComplete",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_autoStart",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_useFormatting",void 0),V=(0,F.Cg)([(0,G.EVk)("CounterText",H.Y.ui)],V)},79399:(k,B,U)=>{"use strict";U.d(B,{R:()=>H});var F=U(8674),G=U(62459),j=U(6997),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this.onSemaphoreFired=new G.HN0,this.onSemaphoreCountUpdate=new G.HN0,this._initialCount=1}get semaphore(){return this._semaphore}create(){super.create(),this._initialCount>1&&this.initialize(this._initialCount)}destroy(){this.clear(),this.onSemaphoreFired.dispose(),this.onSemaphoreCountUpdate.dispose(),super.destroy()}decrement(){var k;null===(k=this._semaphore)||void 0===k||k.decrement(),this.onSemaphoreCountUpdate.dispatch()}increment(){var k;null===(k=this._semaphore)||void 0===k||k.increment(),this.onSemaphoreCountUpdate.dispatch()}clear(){var k;null===(k=this._semaphore)||void 0===k||k.destroy(),this._semaphore=null}initialize(k){var B;null===(B=this._semaphore)||void 0===B||B.destroy(),this._semaphore=new j.o,this._semaphore.init((()=>{this.onSemaphoreFired.dispatch()}),k)}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onSemaphoreFired",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onSemaphoreCountUpdate",void 0),(0,F.Cg)([(0,G.g11)(),(0,G.tfT)(G.LkC.greaterThan(0)),(0,F.Sn)("design:type",Number)],H.prototype,"_initialCount",void 0),H=(0,F.Cg)([(0,G.EVk)("CountingSemaphore",$.Y.utility)],H)},93833:(k,B,U)=>{"use strict";U.d(B,{$:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this._runInEditor=!1,this._visible=!0,this._cacheAsBitmap=!1,this._alpha=1,this._name=""}get rootContainer(){return this._rootContainer}get visible(){return this._rootContainer.visible}set visible(k){this._visible=k,this._rootContainer&&(this._rootContainer.visible=k)}get cacheAsBitmap(){return this._rootContainer?this._rootContainer.cacheAsBitmap:this._cacheAsBitmap}set cacheAsBitmap(k){this._cacheAsBitmap=k,this._rootContainer&&(this._rootContainer.cacheAsBitmap=k)}get alpha(){return this._rootContainer?this._rootContainer.alpha:this._alpha}set alpha(k){this._alpha=k,this._rootContainer&&(this._rootContainer.alpha=k)}get mask(){return this._rootContainer?this._rootContainer.mask:null}set mask(k){this._rootContainer&&(k instanceof G.y4o?this._rootContainer.mask=k.getRootContainer():this._rootContainer.mask=k)}get name(){return this._rootContainer?this._rootContainer.name:this._name}set name(k){this._rootContainer?this._rootContainer.name=k:this._name=k}create(){super.create(),this._renderComponent?this._renderComponent.getRootContainer()?this.initializeProperties():this._renderComponent.onRootContainerSet.addOnce(this.initializeProperties,this):G.VyI.log("Could not get root container, this object has no render component",G.$bb.Warning)}initializeProperties(){this._rootContainer=this._renderComponent.getRootContainer(),this._rootContainer.alpha=this._alpha,this._rootContainer.visible=this._visible,this._rootContainer.cacheAsBitmap=this._cacheAsBitmap,this._name&&(this._rootContainer.name=this._name)}};(0,F.Cg)([(0,G.Pqz)(G.y4o),(0,F.Sn)("design:type",G.y4o)],$.prototype,"_renderComponent",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_runInEditor",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_visible",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_cacheAsBitmap",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],$.prototype,"_alpha",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.YLv)("The name to give to the Pixi object this component is attached to"),(0,F.Sn)("design:type",String)],$.prototype,"_name",void 0),$=(0,F.Cg)([(0,G.EVk)("GetRootContainer",j.Y.utility)],$)},70005:(k,B,U)=>{"use strict";U.d(B,{h:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(34829),H=U(28152);let V=class extends G.uAl{create(){super.create(),this.attachUpdateFunction()}attachUpdateFunction(){const k=j.q.instance.prodigy.game.time.events.loop($.A.TARGET_FPS_40_MS,this.GameObject.update,this.GameObject);this.GameObject.onDestroy.addOnce((()=>j.q.instance.prodigy.game.time.events.remove(k)))}};V=(0,F.Cg)([(0,G.EVk)("HookGameObjectUpdate",H.Y.utility)],V)},57502:(k,B,U)=>{"use strict";U.d(B,{W:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(68152),H=U(28152);let V=class extends G.uAl{constructor(){super(...arguments),this.onDialogueAudioComplete=new G.HN0}playAudioSprite(k,B,U){this.playAudioData({tag:k,dataTag:B,soundId:U})}playAudioData(k){(0,$.v)(G.Aq$.isDefined(k),"PlayDialogueAudio needs defined audio data");const B=[k.tag];k.dataTag&&B.push(k.dataTag),j.q.instance.prodigy.load.assets(B,(()=>{j.q.instance.prodigy.audio.playDialogue(k,(()=>{this.onDialogueAudioComplete.dispatch()}))}))}destroy(){this.onDialogueAudioComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onDialogueAudioComplete",void 0),V=(0,F.Cg)([(0,G.EVk)("PlayDialogueAudio",H.Y.utility)],V)},77442:(k,B,U)=>{"use strict";U.d(B,{k:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(36045);let H=class extends $.X{constructor(){super(...arguments),this._inputShapes=[],this._passthroughShapes=[]}isPointOverShape(k){var B;return!!this._inputShapes.some((B=>B.isPointOverShape(k)))&&(null===(B=this._passthroughShapes)||void 0===B?void 0:B.every((B=>B.isPointOverShape(k))))}};(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)($.X),(0,F.Sn)("design:type",Array)],H.prototype,"_inputShapes",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)($.X),(0,F.Sn)("design:type",Array)],H.prototype,"_passthroughShapes",void 0),H=(0,F.Cg)([(0,G.EVk)("PassThroughInputShape",j.Y.inputShapes)],H)},36045:(k,B,U)=>{"use strict";U.d(B,{X:()=>j});var F=U(8674),G=U(62459);let j=class extends G.uAl{isPointOverShape(k){return!0}worldPointToParent(k,B){const U=B.worldMatrix.applyInverse(k);return B.localMatrix.apply(U)}};j=(0,F.Cg)([(0,G.EVk)("Shape (abstract)")],j)},93709:(k,B,U)=>{"use strict";U.d(B,{H:()=>W});var F=U(62459),G=U(35120),j=U(98013),$=U(77938),H=U(17425),V=U(59968);class W extends V.R{constructor(k,B,U,F,G){super(k,B,U,2,F,G),this.game=k,this.source=U,this.assets=this.getListOfAssets(),this.walkIntoBattle=!1}startLoad(){super.startLoad(),this.loading=!0,this.assets=this.getListOfAssets(),G.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this))}setup(k,B){if(!F.Aq$.isDefined(this.game)||!B||!F.Aq$.isDefined(this.assets))return;this.cacheBoss(),j.l.removeAll(this.sprites,!0);const U=this.assets[0];let H;H=G.q.instance.prodigy.assets.getImageBounds(U),this.body=G.q.instance.prodigy.create.sprite(0,0,U),this.sprites.addChild(this.body),this.body.x=-H[0],this.body.y=-H[3];let V=null;try{this.sprites.children.forEach((k=>{k.animations.add("walk",[0,1,2,3,4,5,6,7],10,!0,!0),k.animations.add("stand",[0,1,2,3,4,5,6,7],10,!0,!0)})),V=this.body.animations.add("attack",[8,9,10,11,12,13,14,15],10)}catch(e){this.sprites.children.forEach((k=>{k.animations.add("walk",[0],10,!0,!0),k.animations.add("stand",[0],10,!0,!0)})),V=this.body.animations.add("attack",[0],10)}V.onComplete.add(this.stand,this),this.sprites.children.forEach((k=>{k.animations.play("stand")})),this.setHitbox($.t.getItem("boss",this.source.getID()).metadata.assets.default.hitbox),this.complete=!0,this.loading=!1,this._onLoad.dispatch()}attack(){try{super.attack(),this.sprites.children.forEach((k=>{k.animations.play("attack")}))}catch(e){F.VyI.log("Error trying to play BossContainer Attack animation",F.$bb.Error)}}getListOfAssets(){return W.getAssets(this.source)}static getAssets(k){return k.getAssets()}cacheBoss(){H.K.cacheAssets(this.game,this.getListOfAssets(),H.K.zoneAssetsCached)}setRootOffset(k){this._rootOffset=k?{x:k.x,y:k.y}:{x:0,y:0}}}},30441:(k,B,U)=>{"use strict";U.d(B,{R:()=>V});var F=U(62459),G=U(35120),j=U(91207),$=U(98623),H=U(88022);class V extends $.H{constructor(k,B,U,j,$,V=3e3){super(k,B,U,j,"Chat Bubble"),this.chatID=0,this.dontHide=F.Aq$.isDefined($)&&$,this.durationMS=V,this.add(G.q.instance.prodigy.create.sprite(-38,-72,H._.General_icons_json,"chat/bubble"))}setID(k){F.Aq$.isDefined(this.game)&&(this.visible=!0,this.chatID++,this.scale.x=0,this.scale.y=0,this.game.add.tween(this.scale,this).to({x:1.2,y:1.2},200,F.GS3.Quadratic.Out).to({x:.8,y:1},200,F.GS3.Quadratic.In).to({x:1,y:.8},200,F.GS3.Quadratic.Out).to({x:1,y:1},200,F.GS3.Quadratic.In).start(),F.Aq$.isDefined(this.emote)&&this.emote.destroy(),this.emote=G.q.instance.prodigy.create.sprite(-18,-62,j.E.getIconForType("emote",k),null,null,null,40,40),this.emote.name=`Chat Bubble Icon ${k}`,this.add(this.emote),this.dontHide||this.game.time.events.addTimer(this.durationMS,this.onTimerEvent.bind(this,this.chatID),this))}onTimerEvent(k){k===this.chatID&&(this.visible=!1)}}},59968:(k,B,U)=>{"use strict";U.d(B,{R:()=>ot,W:()=>st});var F=U(8674),G=U(62459),j=U(68910),$=U(88022),H=U(35120),V=U(92150),W=U(77938),q=U(48975),K=U(73797),z=U(23082),Y=U(12676),Q=U(44356),X=U(98623),Z=U(57750),J=(U(34829),U(35564)),tt=U(88253);class et{constructor(k){this.target={x:-1,y:-1},this.lastTargetBroadcasted={x:-1,y:-1},this.lastUpdateCount=0,this.isMainPlayer=!1,this.game=k}setup(k,B,U){this.screen=k,this.creatureContainer=B,this.isMainPlayer=U,this.isMainPlayer&&(this.game.broadcaster.addAppListener(K.pm.MovePlayer,this.onMovePlayer.bind(this),this),this.game.broadcaster.addAppListener(K.pm.StopPlayer,this.onStopPlayer.bind(this),this),this.game.broadcaster.addAppListener(K.pm.GetTarget,this.onGetTarget.bind(this),this),this.onVisibilityChangedBound=this.onVisibilityChanged.bind(this),document.addEventListener("visibilitychange",this.onVisibilityChangedBound,!1))}destroy(){this.isMainPlayer&&(this.game.broadcaster.removeAppListener(K.pm.MovePlayer,this),this.game.broadcaster.removeAppListener(K.pm.StopPlayer,this),this.game.broadcaster.removeAppListener(K.pm.GetTarget,this),document.removeEventListener("visibilitychange",this.onVisibilityChangedBound,!1)),this.creatureContainer=null,this.game=null,this.screen=null,this.onVisibilityChangedBound=null}update(){H.q.instance.prodigy.updateCount%et.UPDATE_INTERVAL==0&&(-1===this.target.x&&-1===this.target.y&&(this.creatureContainer.x>0||this.creatureContainer.y>0)&&(this.target.x=this.creatureContainer.x,this.target.y=this.creatureContainer.y),this.broadcastPosition())}broadcastPosition(){if(this.isMainPlayer&&!this.creatureContainer.evtProc&&(this.lastTargetBroadcasted.x!==this.target.x||this.lastTargetBroadcasted.y!==this.target.y)&&H.q.instance.prodigy.updateCount-this.lastUpdateCount>et.EMIT_MESSAGE&&(G.cj9.distanceSq(this.target.x,this.target.y,this.lastTargetBroadcasted.x,this.lastTargetBroadcasted.y)>et.DISTANCE_THRESHOLD||H.q.instance.prodigy.updateCount-this.lastUpdateCount>2*et.EMIT_MESSAGE)){this.lastUpdateCount=H.q.instance.prodigy.updateCount,this.lastTargetBroadcasted.x=this.target.x,this.lastTargetBroadcasted.y=this.target.y;H.q.instance.prodigy.gameContainer.get("c97-bd0d").emitMessage({action:J.x.Move,data:{target:this.target}})}}onGetTarget(k=!1){if(k)return Object.assign({},this.target);const{x:B,y:U}=this.screen.path.xyToTile(this.target.x,this.target.y);return{x:B,y:U}}onFindPath(k){var B;if(this.game&&k){const U=this.screen.path.xyToTile(k[0].x,k[0].y);this.creatureContainer.setPath(k,null!==(B=this.screen.path.getCallback(U.x,U.y,this.isMainPlayer))&&void 0!==B?B:void 0),this.broadcastPosition()}}setNewTarget(k,B){const U=this.screen.path.xyToTile(k,B);this.screen.path.isNodeOpen(U.x,U.y)&&(this.creatureContainer.x<=0&&this.creatureContainer.y<=0?(this.creatureContainer.x=k,this.creatureContainer.y=B,G.Aq$.isDefined(this.creatureContainer.follow)&&(this.creatureContainer.follow.x=k,this.creatureContainer.follow.y=B-1)):this.target.x===k&&this.target.y===B||this.screen.path.findPath(this.creatureContainer.x,this.creatureContainer.y,k,B,this.isMainPlayer).then((k=>this.onFindPath(k))).catch(G.RQr.createHandler("Unable to find path to target")),this.target.x=k,this.target.y=B)}onMovePlayer(k,B){const U=this.screen.path.xyToTile(k,B);return!!this.screen.path.isNodeOpen(U.x,U.y)&&(this.target.x=k,this.target.y=B,this.screen.path.findPath(this.creatureContainer.x,this.creatureContainer.y,k,B,this.isMainPlayer).then((k=>this.onFindPath(k))).catch(G.RQr.createHandler("Unable to find path to target")),!0)}onVisibilityChanged(){tt.M.isCutscenePlaying||this.onStopPlayer()}onStopPlayer(){this.screen.isMapScreen&&(this.target.x=this.creatureContainer.x,this.target.y=this.creatureContainer.y,this.creatureContainer.stand(),this.creatureContainer.stopMoveTween())}}et.DISTANCE_THRESHOLD=4,et.EMIT_MESSAGE=120,et.UPDATE_INTERVAL=200;class it extends X.H{constructor(k,B,U){super(k,B),this.emoteElement=null,this.setEmoteData(U)}setEmoteData(k){}}it.EMOTE_DURATION=3;var st,nt=U(44661),at=U(85515);class rt{constructor(k,B,U){this.starList=[],this.game=k,this.x=B-10,this.y=U-10,this.animate()}animate(){for(let k=0;k<10;k++)this.addStar(80*k+50*Math.random(),9===k)}finish(){this.game.broadcaster.broadcast(K.hw.Done,this.game,null)}addStar(k,B){const U=H.q.instance.prodigy.create.sprite(this.x+20*Math.random(),this.y+20*Math.random(),$._.General_core_2_json,"user-star");this.starList.push(U),U.anchor.set(.5,.5),U.scale.set(0,0),U.angle+=Math.round(90*Math.random()),this.game.broadcaster.broadcast(K.lc.AddChild,this.game,[U,at.E.OverlayLayer]);const F=.3*Math.random(),j=this.game.add.tween(U.scale,this).to({x:1,y:1},200,G.GS3.Quadratic.Out).delay(k),V=this.game.add.tween(U.scale,this).to({x:1.3,y:1.3},250,G.GS3.Quadratic.InOut),W=this.game.add.tween(U.scale,this).to({x:F+1,y:F+1},250,G.GS3.Quadratic.InOut),q=this.game.add.tween(U.scale,this).to({x:0,y:0},200,G.GS3.Quadratic.In);q.onTweenComplete.add(this.onStarComplete.bind(this,U),U),B&&q.onTweenComplete.add(this.finish.bind(this),this),j.chain(V),V.chain(W),W.chain(q),this.game.add.tween(U,this).to({y:10*Math.random()+90},900,G.GS3.Quadratic.In).delay(k).start(),this.game.add.tween(U,this).to({x:40*Math.random()+279},900,G.GS3.Quadratic.Out).delay(k).start(),j.start()}onStarComplete(k){k.visible=!1}destroy(){this.game.tweens.removeAllFromOwner(this);for(const k of this.starList)k.destroy();this.starList.length=0}}!function(k){k[k.Walk=0]="Walk",k[k.Stand=1]="Stand",k[k.Moonwalk=2]="Moonwalk",k[k.Attack=3]="Attack",k[k.Stopped=4]="Stopped"}(st||(st={}));class ot extends X.H{get OnLoad(){return this._onLoad}constructor(k,B,U,F,j,V){var W;if(super(k,B),this.walkSpeed=1.5,this.ran=!1,this._onLoad=new G.HN0,this.nameText=null,this.chatText=null,this.complete=!1,this.captured=null,this.potionIcon=null,this.potencyIcon=null,this.statusEffects=null,this.onPathFound=new G.HN0,this.onStopped=new G.HN0,this.onStand=new G.HN0,this.locomotion=null,this.speed=10,this.fxQueue=0,this.pairs=null,this.evtProc=!1,this.castDelay=0,this.walkIntoBattle=!0,this.battleShy=!1,this.rt=null,this.nameY=0,this.source=U,this.setScale=G.Aq$.isDefined(F)?F:1,this.x=Math.floor(j),this.y=Math.floor(V),this.ran=this.source.data.hp<=0,this.sprites=H.q.instance.prodigy.create.element(this,0,0),this.indicatorE=H.q.instance.prodigy.create.element(this),this.rt=H.q.instance.prodigy.gameContainer.get("8c1-3c93"),null===(W=this.source.modifiers)||void 0===W?void 0:W.barrier){const k=this.source.modifiers.barrier;this.barrierSprite=H.q.instance.prodigy.create.sprite(0,0,$._.Boss_titan_barrier_json,"1",{x:.5,y:.5},this.addBarrierSpritesheet.bind(this,"deflect",[1,2,3,4,5,6,7,8,9,10])),this.barrierSpriteBreak=H.q.instance.prodigy.create.sprite(0,0,$._.Boss_titan_barrier_break_json,"1",{x:.5,y:.5},this.addBarrierSpritesheet.bind(this,"break",[1,2,3,4,5,6,7,8,9,10])),this.barrierSpriteSpark=H.q.instance.prodigy.create.sprite(-165*k.scale.x,19*k.scale.y,$._.Boss_titan_spark_json,"1",{x:.5,y:.5},this.addBarrierSpritesheet.bind(this,"spark",[1,2,3])),this.add(this.barrierSprite),this.add(this.barrierSpriteBreak),this.add(this.barrierSpriteSpark)}this.nameY=1===F?-130:-230,U instanceof q.s&&(this.nameY=-150),this.nameText=H.q.instance.prodigy.create.nameFont(this,0,this.nameY,""),this.nameText.GameObject.legacyTransform.group.name="name-text",U instanceof q.s&&this.showName(),this.chatText=H.q.instance.prodigy.create.nameFont(this,0,this.nameY,""),this.chatText.FillColor="#FFB600",this.chatText.GameObject.legacyTransform.group.name="chat-text",this.showChat(!1),this.onDestroy.add(this.stopListeners,this),this.initListeners()}showName(k=null){let B=null;B=G.Aq$.isDefined(k)?k:this.source.getName(),G.Aq$.isDefined(B)&&(this.nameText.setText(B),this.nameText.Active=!0)}hideName(){this.nameText.Active=!1,this.nameText.TextObject.TextObject.visible=!1}showChat(k){this.chatText.Active=k,this.chatText.TextObject.TextObject.visible=k}float(k){G.Aq$.isDefined(this.floatTween)?k||(this.sprites.y=this.sprites.oldY,this.floatTween.stop(),delete this.floatTween):k&&(this.sprites.children.length>0?(this.sprites.oldY=this.sprites.y,this.sprites.y=this.sprites.y-10,this.floatTween=this.game.add.tween(this.sprites,this.sprites).to({y:"-=20"},1400,G.GS3.Quadratic.InOut).to({y:"+=20"},1400,G.GS3.Quadratic.InOut).loop(!0),this.floatTween.start()):G.VyI.log("Cannot tween float because sprites has no children",G.$bb.Warning))}chat(k,B,U,F){if(this.game){const G=k+12;this.chatBubble?this.chatBubble.setID(G):this.chatBubble=H.q.instance.prodigy.effects.chatBubble(this,G,B,U,F)}}startChat(k){if(G.Aq$.isDefined(this.game)){const B=this.rt.getPhrase(k);G.Aq$.isDefined(B)&&(G.Aq$.isDefined(this.timer)&&window.clearInterval(this.timer),this.hideName(),this.showChat(!0),this.game.add.tween(this.chatText.GameObject.legacyTransform.group,this).to({y:this.nameText.GameObject.legacyTransform.y-10},500,G.GS3.Quadratic.Out).to({y:this.nameText.GameObject.legacyTransform.y},500,G.GS3.Quadratic.In).start(),this.chatText.setText(`"${B}"`),this.timer=window.setInterval((()=>{this.endChat()}),5e3))}}endChat(){G.Aq$.isDefined(this.timer)&&window.clearInterval(this.timer),this.timer=null,this.chatText.Active=!1,this.showName()}hop(k=100,B=null,U=0,F=20){const j=this.game.add.tween(this,this).to({y:this.y-F},k,G.GS3.Quadratic.Out).to({y:this.y},k,G.GS3.Quadratic.In).start();this.game.add.tween(this,this).to({x:this.x+Math.floor(U/2)},k,G.GS3.Linear.None).to({x:this.x+U},k,G.GS3.Linear.None).start(),G.Aq$.isDefined(B)&&j.onTweenComplete.addOnce(B)}setPath(k,B,U){if(!k||!this.game)return;this.stopMoveTween();const F=G.Aq$.isDefined(U)?U:this.walkSpeed;let j=null,$=null,H=this.x,V=this.y;for(let W=k.length-1;W>=0;W--){const B=k[W];G.Aq$.isDefined(B.x)||(B.x=H),G.Aq$.isDefined(B.y)||(B.y=V);const U=G.cj9.distance(B.x,B.y,H,V);if(0===U)continue;G.Aq$.isDefined(j)||(j=this.game.add.tween(this,this),$=this.game.add.tween(this.sprites.scale,this));const q=Math.abs(this.sprites.scale.x);j.to({x:B.x,y:B.y},6*U/F,G.GS3.Linear.None),$.to({x:B.x>H?q:-q},1,G.GS3.Linear.None),$.to({},6*U/F-100,G.GS3.Linear.None),H=B.x,V=B.y}if(G.Aq$.isDefined(j)){let U=1;const F=()=>{0==--U&&G.Aq$.isDefined(B)&&B(k)};j.onTweenComplete.addOnce(this.stand,this),j.onTweenComplete.addOnce(F),G.Aq$.isDefined(this.onPathFound)&&this.onPathFound.dispatch(k),this.walk(),j.start(),this.moveTween=j,G.Aq$.isDefined($)&&(++U,$.onTweenComplete.addOnce(F),$.start())}else G.Aq$.isDefined(B)&&B(k),this.stand()}setValidPath(k,B,U,F,j=!0){k.findPath(this.x,this.y,B,U,j).then((k=>{this.setPath(k,F)})).catch(G.RQr.createHandler("Unable to find path"))}walk(){this.mode!==st.Walk&&(this.mode=st.Walk,this.playAll("walk"))}flip(){this.sprites.scale.x=-this.sprites.scale.x}faceToward(k){const B=Math.abs(this.sprites.scale.x);this.sprites.scale.x=k>this.x?B:-B}stand(){this.mode!==st.Stand&&(this.mode=st.Stand,this.playAll("stand"),this.x=Math.round(this.x),this.y=Math.round(this.y),this.onStand.dispatch())}playAll(k){const B=this.sprites.children.length;for(let U=0;U{k(),this.source instanceof q.s&&this.sendNpcClickedEvent()}))}sendNpcClickedEvent(){var k,B,U,F,G;const j=""===(null===(B=null===(k=this.source)||void 0===k?void 0:k.name)||void 0===B?void 0:B.getName())?Y.N.Merchant:null===(F=null===(U=this.source)||void 0===U?void 0:U.name)||void 0===F?void 0:F.getName(),$=`NPC_ID_${j}`;H.q.instance.prodigy.gameContainer.get("c47-20b6").gameWorld.sendNpcClickedEvent({npc_name:j,npc_type:null===(G=this.source)||void 0===G?void 0:G.getNpcType(),npc_id:$})}onFxAnimationDone(){this.fxQueue>0&&(this.fxQueue--,0===this.fxQueue&&this.game.broadcaster.broadcast(K.ig.AnimationDone,this.source,[]))}onStarsAdded(){!0===this.game.broadcaster.broadcast(K.J3.GetIsRunning,this.game)&&(this.fxQueue++,this.flyingStars=new rt(this.game,this.x,this.y-(this.height-35)))}onCreatureLevelUp(k,B){this.game.state.current!==z.G.TileScreen&&this.fxQueue++}doBarrierAnimation(){this.barrierSprite.alpha=1,this.barrierSpriteSpark.alpha=1,this.barrierSprite.animations.play("deflect",10),this.barrierSpriteSpark.animations.play("spark",10)}doBarrierBreakAnimation(){this.barrierSpriteBreak.alpha=1,this.barrierSpriteSpark.alpha=1,this.barrierSpriteBreak.animations.play("break",10),this.barrierSpriteSpark.animations.play("spark",10)}addBarrierSpritesheet(k,B,U){U.alpha=0,U.name=k;const F=this.source.modifiers.barrier;U.x+=F.offset.x,U.y+=F.offset.y,U.scale.set(F.scale.x,F.scale.y),U.smoothed=!1;U.animations.add(k,B,10,!1).onComplete.add((()=>{U.alpha=0}),U)}displayDamage(k,B,U,F=H.q.instance.prodigy.effects.characterText.bind(H.q.instance.prodigy.effects)){this.getSource().modifiers.barrier&&(this.getSource().getCurrentHearts()>0?this.doBarrierAnimation():(this.doBarrierBreakAnimation(),k.damage=9999,k.critical=!0,this.retreat())),this.healthOverlay?this.healthOverlay.showDamage(k,B,U,F):G.VyI.log("Health overlay missing from CreatureContainer.",G.$bb.Error)}displayHeal(k,B){this.healthOverlay.showHealingHealthBar(k,B)}createHealthBar(k){return this.nameText&&this.hideName(),this.healthOverlay=null!=k?k:new nt.V(this.game,this),this.healthOverlay}doPuppetBreakAnimation(k){this.healthOverlay.doPuppetBreakAnimation(k)}getHitboxWidth(){return this._hitbox?this._hitbox.width:Math.abs(this.sprites.width)}getHitboxHeight(){return this._hitbox?this._hitbox.height:Math.abs(this.sprites.height)}getHitboxLeft(){return this._hitbox?this._hitbox.xOffset-.5*this._hitbox.width:G.J6z.getLeft(this.sprites)}getHitboxTop(){return this._hitbox?this._hitbox.yOffset-this._hitbox.height:G.J6z.getTop(this.sprites)}getTargetingOffset(){return 0}destroy(k={children:!0}){G.Aq$.isDefined(this.timer)&&window.clearInterval(this.timer),this.timer=null,this.rt=null,this.stopTweens(),this.follow&&this.follow.destroy(),this.follow=null,this.locomotion&&(this.locomotion.destroy(),this.locomotion=null),this.healthOverlay&&(this.healthOverlay.destroy(),this.healthOverlay=null),this.nameText&&this.nameText.GameObject.destroy(),this.nameText=null,this.chatText&&this.chatText.GameObject.destroy(),this.chatText=null,this.chatBubble&&this.chatBubble.destroy(),this.chatBubble=null,this.onPathFound.dispose(),this.onStopped.dispose(),this.onStand.dispose(),this._onLoad.dispose(),this.sprites&&(G.W$e.instance.game.tweens.removeAllFromOwner(this.sprites),this.sprites.destroy()),this.floatTween=null,this.moveTween=null,this.indicatorE&&this.indicatorE.destroy(),this.indicatorE=null,this.flyingStars&&this.flyingStars.destroy(),this.flyingStars=null,this.loadedCallback=null,this.statusEffects&&(this.statusEffects.length=0),this.statusEffects=null,this.pairs&&(this.pairs.length=0),super.destroy(k)}getSource(){return this.source}retreat(k){}shouldPlayRetreatOnDefeat(){return!1}patrol(k,B){this.setPath(k,this.patrol.bind(this,k,B))}}},44661:(k,B,U)=>{"use strict";U.d(B,{V:()=>V});var F=U(62459),G=U(35120),j=U(34829),$=U(14088),H=U(88022);class V{constructor(k,B){this.offset={x:0,y:0},this.game=k,this.target=B,this.healthOverlay=new $.h(k,31,B,[H._.Ui_shared_json]),this.healthOverlay.addOnLoadCallback((()=>{this._healthbar=this.healthOverlay.getUiElement("healthBar"),this._healhBarYOffset=this._healthbar.y,this._healthbar.alpha=0,this._healthbar.setPercentComplete(1),this.puppetControllerBreak=this.healthOverlay.getUiElement("puppetControllerBreak")}))}showDamage(k,B=!1,U,F=G.q.instance.prodigy.effects.characterText.bind(G.q.instance.prodigy.effects)){this.onDisplaysCompleteCallback=U,this.damageObject=k,this._showHealthBar=B,k.miss?this.showMiss():this.showDamageNumbers(F)}showHealingHealthBar(k,B){this._showHealthBar=!0,this._healthbar.setPercentComplete(Math.max(0,this.target.source.getCurrentHearts()-k)/this.target.source.getMaxHearts()),this.showHealthOverlay(B)}getTargetPercent(){return this.target.source.getCurrentHearts()/this.target.source.getMaxHearts()}showHealthOverlay(k){if(this._showHealthBar&&this.healthOverlay&&!j.s.get("GameConstants.Battle.HIDE_TEMP_HEALTHBAR")){this._healthbar.y=this._healhBarYOffset-this.target.getHitboxHeight()+this.offset.y;const B=this.getTargetPercent(),U=this._healthbar.getPercentageComplete();if(F.cj9.isNearlyEqual(B,U))null==k||k();else{const G={percent:U},j=300;this.game.add.tween(this._healthbar,this).to({alpha:1},j,F.GS3.Linear.None,!0);const $=this.game.add.tween(this._healthbar,this);$.to({alpha:0},j,F.GS3.Linear.None,!0,V.DURATION+j),k&&$.onTweenComplete.add(k,this),$.start();const H=this.game.add.tween(G,this).to({percent:B},V.DURATION,F.GS3.Cubic.Out,!1,j);H.onUpdate.add((()=>{this._healthbar.setPercentComplete(G.percent)}),this),H.start()}}else null==k||k()}showMiss(){G.q.instance.prodigy.effects.fadeFlyingImage(this.target.x+this.offset.x,this.target.y+this.offset.y-(this.target.height>>1),H._.General_battle_json,"text-miss"),this.game.time.events.addTimer(V.DURATION,(()=>{F.Aq$.isDefined(this.onDisplaysCompleteCallback)&&this.doCallback()}),this)}showDamageNumbers(k=G.q.instance.prodigy.effects.characterText.bind(G.q.instance.prodigy.effects)){k||(k=G.q.instance.prodigy.effects.characterText),k(`-${this.damageObject.damage}`,this.target.x+this.offset.x,this.target.y+this.offset.y,0,{size:1,fontID:12,mono:44},this.showHealthOverlay.bind(this,this.showCritical.bind(this,k))),this.damageObject.damage>0&&this.showNFactor(k)}showCritical(k=G.q.instance.prodigy.effects.characterText.bind(G.q.instance.prodigy.effects)){this.damageObject.critical&&this.damageObject.damage>0?G.q.instance.prodigy.effects.characterImage(G.q.instance.prodigy.create.sprite(this.target.x+this.offset.x,this.target.y+this.offset.y+50,H._.General_battle_json,"text-critical-hit"),100,this.doCallback.bind(this)):this.showTypeAdvantage(k)}showNFactor(k=G.q.instance.prodigy.effects.characterText.bind(G.q.instance.prodigy.effects)){this.damageObject.nFactor>2&&k(G.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("COMBAT_CAST_BONUS_HIT"),this.target.x+this.offset.x,this.target.y+this.offset.y+50,100,null,null)}showTypeAdvantage(k=G.q.instance.prodigy.effects.characterText.bind(G.q.instance.prodigy.effects)){this.damageObject.elementAdvantage>0&&this.damageObject.damage>0?k(G.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("EFFECT_ATTACK_POWERFUL"),this.target.x+this.offset.x,this.target.y+this.offset.y+50,100,null,(()=>{this.doCallback()})):this.damageObject.elementAdvantage<0&&this.damageObject.damage>0?k(G.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("EFFECT_ATTACK_WEAK"),this.target.x+this.offset.x,this.target.y+this.offset.y+50,100,null,(()=>{this.doCallback()})):this.doCallback()}doPuppetBreakAnimation(k){this.puppetControllerBreak.visible=!0,this.puppetControllerBreak.y-=this.target.getHitboxHeight()-this.offset.y,this.puppetControllerBreak.x+=this.offset.x-120,this.puppetControllerBreak.playAnimation("animation",!1,k)}getOverlay(){return this.healthOverlay}doCallback(){F.Aq$.isDefined(this.onDisplaysCompleteCallback)&&this.onDisplaysCompleteCallback()}destroy(){this._showHealthBar=!1,this.damageObject=null,this.target=null,this.onDisplaysCompleteCallback=null,this._healthbar=null,this.puppetControllerBreak=null,this.game=null,this.healthOverlay&&(this.healthOverlay.destroy(),this.healthOverlay=null)}}V.DURATION=2e3},71857:(k,B,U)=>{"use strict";var F;U.d(B,{$:()=>F}),function(k){k.STAND="idle",k.WALK="walk",k.DIG="dig",k.STOP_TO_IDLE="stop-to-idle",k.IDLE_YAWN="idle-yawn",k.STOP_HEAVY="idle-heavy",k.ATTACK="attack",k.ATTACK_BIG="attack",k.ATTACK2="attack2",k.STAND_FLOAT="idle",k.WALK_FLOAT="idle",k.FLOAT_DIG="dig",k.ATTACK_FLOAT="attack",k.ATTACK2_FLOAT="attack2",k.SETUP="idle",k.DANCE_SHIMMY="dance-shimmy",k.DANCE_HAMMER="dance-hammer",k.DANCE_MOONWALK="dance-moonwalk",k.DANCE_RUNNINGMAN="dance-runningman",k.DANCE_DAB="dance-dab",k.STATIC="static"}(F||(F={}))},99737:(k,B,U)=>{"use strict";U.d(B,{z:()=>V});var F=U(62459),G=U(23082),j=U(95373),$=U(59968),H=U(32740);class V extends H.M{constructor(k,B,U,G,$,H,V){super(k,B,U,G,F.Aq$.isDefined(H)?H:$.x,F.Aq$.isDefined(V)?V:$.y-1,!1),this.onTargetStopped=new F.HN0,F.Aq$.isDefined($)&&(this.followController=new j.u(k,this,$))}update(){super.update(),F.Aq$.isDefined(this.followController)&&this.followController.update()}getPosition(){return this.position}pathTo(k){let B;B=this.game.state.get(G.G.TileScreen).path,B||(B=this.game.state.get(G.G.Museum).path),B?this.setValidPath(B,k.x,k.y,this.targetStopped.bind(this),!0):F.VyI.log("No pathfinder found!",F.$bb.Error)}isMoving(){return this.mode===$.W.Walk}stopMoving(){this.stopMoveTween(),this.stand()}targetStopped(){this.onTargetStopped.dispatch()}destroy(){this.onTargetStopped.dispose(),super.destroy()}}},41538:(k,B,U)=>{"use strict";U.d(B,{g:()=>V});var F=U(62459),G=U(23082),j=U(95373),$=U(59968),H=U(73877);class V extends H.P{constructor(k,B,U,G,$,H,V){var W;super(k,B,U,G,F.Aq$.isDefined(H)?H:null!==(W=null==$?void 0:$.x)&&void 0!==W?W:0,F.Aq$.isDefined(V)?V:(null==$?void 0:$.y)?$.y-1:0,!0),this.onTargetStopped=new F.HN0,F.Aq$.isDefined($)&&(this.followController=new j.u(k,this,$))}update(){super.update(),F.Aq$.isDefined(this.followController)&&this.followController.update()}getPosition(){return this.position}pathTo(k){let B;B=this.game.state.get(G.G.TileScreen).path,B||(B=this.game.state.get(G.G.Museum).path),B?this.setValidPath(B,k.x,k.y,this.targetStopped.bind(this),!0):F.VyI.log("No pathfinder found!",F.$bb.Error)}isMoving(){return this.mode===$.W.Walk}stopMoving(){this.stopMoveTween(),this.stand()}setup(k,B){super.setup(k,B),this.sprites.scale.x=this.setScale,this.sprites.scale.y=this.setScale}targetStopped(){this.onTargetStopped.dispatch()}destroy(){this.onTargetStopped.dispose(),super.destroy()}}},32740:(k,B,U)=>{"use strict";U.d(B,{M:()=>J});var F=U(8674),G=U(62459),j=U(99625),$=U(56942),H=U(51742),V=U(35120),W=U(98013),q=U(77938),K=U(37773),z=U(65732),Y=U(97317),Q=U(17425),X=U(80060),Z=U(59968);class J extends Z.R{constructor(k,B,U,F,j,$,H,V){super(k,B,U,F,j,$),this.newIndicatorTweens=[],2!==F||G.Aq$.isDefined(q.t.getItem("pet",U.data.ID).metadata.assets.default)||(this.sprites.scale.x=this.sprites.scale.y=2),this.forceSimple=H,this.assets=J.getAssets(this.source,this.setScale,this.forceSimple),this.onClick=V}static getAssets(k,B,U,F){const j=q.t.getItem("pet",k.data.ID).metadata.assets;let V=null;V=1!==B&&G.Aq$.isDefined(j.default)?"default":"reduced";let W=[];if("default"===V&&U&&!F&&(V="small"),G.Aq$.isDefined(j.default)&&"spine"===j.default.type)W.push(j.default.assetKey?$.Q[j.default.assetKey]:`spine-${j.default.ID}`);else{const B=k.getID();switch(W.push(`${V}-pet-${B}`),B){case 125:W=W.concat([H.c.Sfx_attack_storm_wrath]);break;case 126:W=W.concat([H.c.Sfx_attack_forest_fury]);break;case 127:W=W.concat([H.c.Sfx_attack_frigid_blast]);break;case 128:W=W.concat([H.c.Sfx_attack_tidal_twister]);break;case 129:W=W.concat([H.c.Sfx_attack_hot_snow])}}return W}startLoad(k){super.startLoad(),this.loading=!0,this.assets=J.getAssets(this.source,this.setScale,this.forceSimple),G.Aq$.isDefined(k)&&(this.assets=this.assets.concat(k)),this.loadPrefabs().then((()=>V.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this)))).catch((k=>{G.VyI.log(`Error loading prefabs for MonsterContainer; ${k.message}`,G.$bb.Error),V.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this))}))}loadPrefabs(){const k=Object.create(null,{loadPrefabs:{get:()=>super.loadPrefabs}});return(0,F.sH)(this,void 0,void 0,(function*(){yield k.loadPrefabs.call(this);const B=V.q.instance.prodigy.gameContainer.get("d0e-64fd"),U=B.loadWithDependenciesFromGUID(j.l.LegacyBattleNewIndicator,null);return U.then((k=>{var B;this.newIndicator=k,(null===(B=this.newIndicator)||void 0===B?void 0:B.legacyTransform)&&this.addChild(this.newIndicator.legacyTransform.group),this.newIndicator.active=!1,this._onLoad.addOnce((()=>{this.initializeNewIndicatorPosition()}))})).catch(G.RQr.createHandler("Error loading NewIndicator for Pet")),X.d.loadWithInjectedValuesAndDependenciesFromGUID(B,j.l.Charged_level_effect_top,{[z.E.ChargedCreatureEffectTier]:K.e.getActivePlayerChargedLevelTier(),[z.E.ChargedCreatureEffectDisplayType]:K.e.activePlayerHasChargedLevels?Y.X$.IDLE:Y.X$.HIDDEN}).then((k=>{this.chargedFxTop=k,this.addChildAt(this.chargedFxTop.findComponent(G.y4o).getRootContainer(),this.children.length-1),this.chargedFxTop.active=!1})).catch(G.RQr.createHandler("Error loading Charged Level Effect (top) for Pet")),X.d.loadWithInjectedValuesAndDependenciesFromGUID(B,j.l.Charged_level_effect_bottom,{[z.E.ChargedCreatureEffectTier]:K.e.getActivePlayerChargedLevelTier(),[z.E.ChargedCreatureEffectDisplayType]:K.e.activePlayerHasChargedLevels?Y.X$.IDLE:Y.X$.HIDDEN}).then((k=>{this.chargedFxBottom=k,this.addChildAt(this.chargedFxBottom.findComponent(G.y4o).getRootContainer(),0),this.chargedFxBottom.active=!1})).catch(G.RQr.createHandler("Error loading Charged Level Effect (bottom) for Pet")),Promise.all([U.promise])}))}setup(k,B){if(!G.Aq$.isDefined(this.game)||G.Aq$.isDefined(B)&&!B||!G.Aq$.isDefined(this.assets))return;W.l.removeAll(this.sprites,!0);const U=this.assets[0];let F=null;const j=q.t.getItem("pet",this.source.data.ID).metadata.assets.default;G.Aq$.isDefined(j)&&(F=j.battleScale);const $=V.q.instance.prodigy.assets.getAsset(U);if(G.Aq$.isDefined($)&&this.setHitbox($.hitbox),G.Aq$.isDefined($)&&G.Aq$.isDefined($.battleScale)?this.battleScale=$.battleScale:G.Aq$.isDefined(F)?this.battleScale=F:this.battleScale=1,this.forceSimple){const k=V.q.instance.prodigy.assets.getImageBounds(U);this.body=V.q.instance.prodigy.create.sprite(0,0,U),this.sprites.addChild(this.body),this.body.x=-k[0],this.body.y=-this.body.height,this.onClick&&(this.body.inputEnabled=!0,this.body.events.onInputDown.add(this.onClick))}else{const k=V.q.instance.prodigy.assets.getImageBounds(U),B=-k[0],F=-k[3];this.body=V.q.instance.prodigy.create.sprite(B,F,U),this.sprites.addChild(this.body),this.onClick&&(this.body.inputEnabled=!0,this.body.events.onInputDown.add(this.onClick)),this.sprites.children.forEach((k=>{k.animations.add("walk",[0,1,2,3,4,5,6,7],10,!0,!0),k.animations.add("stand",[8,9,10,11,12,13,14,15],10,!0,!0)}));try{this.body.animations.add("attack",[16,17,18,19,20,21,22,23],10).onComplete.add(this.stand,this)}catch(e){G.VyI.log(`MonsterContainer setting attack animation failed ${this.name}`,G.$bb.Warning)}this.stand()}Math.abs(this.sprites.scale.x)<=1&&G.Aq$.toggleDisplayObjSmooth(this.sprites,!0),this.complete=!0,this.loading=!1,G.Aq$.isDefined(this.loadedCallback)&&this.loadedCallback(this),this._onLoad.dispatch()}attack(){super.attack(),this.playAll("attack")}damaged(){}getSource(){return this.source}cacheAssets(){Q.K.cacheAssets(this.game,this.assets,Q.K.commonAssetsCached)}setNewIndicatorVisibility(k){this.newIndicator&&(this.newIndicator.active=k,k?this.startNewIndicatorEntryAnimation():this.stopNewIndicatorEntryAnimation())}startNewIndicatorEntryAnimation(){var k;if(this.initializeNewIndicatorPosition(),!(null===(k=this.newIndicator)||void 0===k?void 0:k.legacyTransform))return;const B=this.newIndicator.legacyTransform.group.y;this.newIndicator.legacyTransform.group.y+=30,this.newIndicator.legacyTransform.group.alpha=0;const U=V.q.instance.game.add.tween(this.newIndicator.legacyTransform.group,this).to({y:B-10,alpha:1},500,G.GS3.Quadratic.InOut).start();U.onTweenComplete.addOnce((()=>{this.newIndicatorTweens.push(V.q.instance.game.add.tween(this.newIndicator.legacyTransform.group,this).to({y:B},500,G.GS3.Quadratic.InOut).yoyo(!0).loop(!0).start())})),this.newIndicatorTweens.push(U)}stopNewIndicatorEntryAnimation(){this.newIndicatorTweens.forEach((k=>{k.stop(),k.destroy()})),this.newIndicatorTweens.length=0,this.initializeNewIndicatorPosition()}initializeNewIndicatorPosition(){var k;(null===(k=this.newIndicator)||void 0===k?void 0:k.legacyTransform)&&(this.newIndicator.legacyTransform.group.y=-this.getHitboxHeight(),this.newIndicator.legacyTransform.group.x=-this.getHitboxWidth()/2)}setChargedEffectVisibility(k){this.chargedFxTop.active=k,this.chargedFxBottom.active=k}destroy(k={children:!0}){var B,U,F;null===(B=this.newIndicator)||void 0===B||B.destroy(),this.newIndicator=null,this.stopNewIndicatorEntryAnimation(),null===(U=this.chargedFxTop)||void 0===U||U.destroy(),this.chargedFxTop=null,null===(F=this.chargedFxBottom)||void 0===F||F.destroy(),this.chargedFxBottom=null,this.onClick=null,this.assets.length=0,super.destroy(k)}}},73877:(k,B,U)=>{"use strict";U.d(B,{P:()=>J});var F=U(62459),G=U(68910),j=U(99625),$=U(56942),H=U(35120),V=U(98013),W=U(77938),q=U(83441),K=U(53885),z=U(53661),Y=U(80060),Q=U(62430),X=U(59968),Z=U(32740);class J extends Z.M{constructor(k,B,U,F,G,j,$=!1){super(k,B,U,F,G,j,!0,null),this._walkOnSetup=!1,this._standOnSetup=$;const H=W.t.getItem("pet",this.source.data.ID).metadata.assets;this.monsterAsset=H.spine?H.spine:H.default}startLoad(){this._setupSemaphore=2,super.startLoad(),this.loading=!0,this.assets=this.monsterAsset.assetKey?[$.Q[this.monsterAsset.assetKey]]:[`spine-${this.monsterAsset.ID}`],H.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this))}walk(){(this._walkOnSetup||this.mode!==X.W.Walk)&&(this.mode=X.W.Walk,this._spineAnimator?(this._spineAnimator.playAnimation("walk",!0),this._walkOnSetup=!1):this._walkOnSetup=!0)}stand(){this.mode!==X.W.Stand&&this._spineComponent&&(this.mode=X.W.Stand,this._spineAnimator.playAnimation("idle",!0))}attack(){X.R.prototype.attack.call(this),setTimeout((()=>{this._spineAnimator&&(this._spineAnimator.playAnimation("attack",!1),this._spineAnimator.OnAnimationComplete.addOnce((()=>{this.stand()})))}),10)}getAnimationEventTime(k,B){return F.E3R.getAnimationEventTime(this._spineComponent.getSpine(),k,B)}playAll(k){this._spineAnimator.playAnimation(k,!0)}setup(k,B){if(--this._setupSemaphore>0||!F.Aq$.isDefined(this.game)||F.Aq$.isDefined(B)&&!B||!F.Aq$.isDefined(this.assets))return;if(V.l.removeAll(this.sprites,!0),this._petPrefab)return;const U=H.q.instance.prodigy.gameContainer.get("d0e-64fd");Y.d.loadWithInjectedValuesAndDependenciesFromGUID(U,j.l.SpinePetLegacyTransform,{[z.hi.PetCreatureData]:this.source.data}).then((k=>this.postSetup(k))).catch(F.RQr.createHandler("Error loading Legacy Spine Pet Prefab"))}postSetup(k){if(this.destroyed||k.isDestroyed)return;this._petPrefab=k,this._petPrefab.setLayer(void 0,!0),this._petPrefab.findComponentInChildren(Q.N).setAssetID(this.source.data.ID),this._spineComponent=k.findComponentInChildren(q.O).spineAnimator.spine,this._spineAnimator=k.findComponentInChildren(q.O).spineAnimator;const B=this._spineComponent.GameObject.transform;B.GameObject.parent.transform.setScale(this.setScale,this.setScale),B.GameObject.parent.transform.setScale(F.Aq$.isDefined(this.monsterAsset.flip)&&this.monsterAsset.flip?-this.setScale:this.setScale,this.setScale),this.battleScale=F.Aq$.isDefined(this.monsterAsset.battleScale)?this.monsterAsset.battleScale:1,this.sprites.addChild(k.findComponent(K.u).getRootContainer()),this.sprites.visible=!1,F.Aq$.toggleDisplayObjSmooth(this.sprites,!0),this.complete=!0,this.loading=!1,this._spineComponent.isLoaded?this.onSpineLoadComplete():this._spineComponent.OnLoaded.addOnce((()=>{this.onSpineLoadComplete()}))}onSpineLoadComplete(){this.sprites.visible=!0,this._walkOnSetup?this.walk():this._standOnSetup&&this.stand(),F.Aq$.isDefined(this.loadedCallback)&&this.loadedCallback(this),this._onLoad.dispatch()}initializeNewIndicatorPosition(){var k;(null===(k=this.newIndicator)||void 0===k?void 0:k.legacyTransform)&&(this.newIndicator.legacyTransform.group.x=-this._spineComponent.getSpine().getBounds().width/2,this.newIndicator.legacyTransform.group.y=-this._spineComponent.getSpine().getBounds().height)}setChargedEffectVisibility(k){var B;null===(B=this._spineComponent.getSpine().pixiSpine)||void 0===B||B.hackTextureBySlotName("shadow",k?G.Texture.EMPTY:null),super.setChargedEffectVisibility(k)}destroy(k={children:!0}){this._petPrefab&&this._petPrefab.destroy(),this._petPrefab=null,this._spineComponent=null,super.destroy(k)}}J.DEFAULT_FRAME_RATE=10},37946:(k,B,U)=>{"use strict";U.d(B,{v:()=>vt});var F=U(8674),G=U(62459),j=U(88022),$=U(5491),H=U(35120),V=U(82209),W=U(77938),q=U(66207),K=U(73797),z=U(37193),Y=U(23082),Q=U(35564),X=U(63115),Z=U(83267),J=U(99625),tt=U(98013),et=U(65732),it=U(83441),st=U(44356),nt=U(53885),at=U(32500),rt=U(51941),ot=U(47734),ht=U(80060),ct=U(6476),dt=U(89717),lt=U(39325),ut=U(47389),ft=U(59968),bt=U(71857);class pt extends ft.R{get isMainPlayer(){return this._isMainPlayer}get appearanceConfig(){return this._appearanceConfig}constructor(k,B,U,F,j,$,H=!1,V=null){super(k,B,U,F,j,$),this.clickEnabled=!0,this.animState=bt.$.STATIC,this.lastSmoothing=null,this._isMainPlayer=!1,this.data={},this.flagsToComplete=0,this.collisionHead=null,this.collisionBody=null,this.clickCallback=null,this.forceWeaponVisual=!1,this._isMainPlayer=!!G.Aq$.isDefined(H)&&H,this._appearanceConfig={isPreview:null==V?void 0:V.isPreview,headOnly:null==V?void 0:V.headOnly,hideHat:null==V?void 0:V.hideHat,hideMount:null==V?void 0:V.hideMount,hideWeapon:null==V?void 0:V.hideWeapon,chargeRevealEnabled:null==V?void 0:V.chargeRevealEnabled},G.Aq$.isDefined(pt.smoothOverride)&&(this.lastSmoothing=pt.smoothOverride)}static overrideSmoothing(k){pt.smoothOverride=k}getSlotContainer(k){const B=this._spineComponent.getSpine(),U=B.skeleton;return B.getSlotContainerByIndex(U.findSlotIndex(k))}forceOutfit(k){var B;null===(B=this._playerAppearanceSelector)||void 0===B||B.setAppearance(Object.assign(Object.assign({},this._playerDataProvider.getAppearance()),k)).catch(G.RQr.createHandler("Could not override player appearance"))}startLoad(){super.startLoad(),this.loading=!0,this.postStartLoad()}postStartLoad(){this.setup()}setup(){if(this._playerPrefab)return;const k=H.q.instance.prodigy.gameContainer.get("d0e-64fd"),B={"377-3e7b":this._playerDataProvider,[et.E.ChargeRevealEffectEnabled]:!this._appearanceConfig.headOnly&&this._appearanceConfig.chargeRevealEnabled};if(this._appearanceConfig.headOnly)ht.d.loadWithInjectedValuesAndDependenciesFromGUID(k,J.l.MainPlayerIcon,B).then((k=>this.postSetupPlayerIcon(k))).catch(G.RQr.createHandler("Error loading Main Player Icon Prefab"));else{const U=this.isMainPlayer?J.l.MainPlayer:J.l.RemotePlayer;ht.d.loadWithInjectedValuesAndDependenciesFromGUID(k,U,B).then((k=>this.postSetup(k))).catch(G.RQr.createHandler("Error loading Main Player Prefab"))}}postSetup(k){var B;if(pt.HAS_FINISHED_FIRST_LOAD=!0,this.destroyed||k.isDestroyed)return;this._spineAnimator=k.findComponentInChildren(it.O).spineAnimator,this._spineComponent=this._spineAnimator.spine,this._emoteManagerComponent=k.findComponentInChildren(at.h),this._animationController=k.findComponentInChildren(lt.F),this._morphTransformation=k.findComponentInChildren(dt.R),k.setLayer(void 0,!0),this._playerAppearanceSelector=k.findComponentInChildren(ut.b),this._playerDataProvider||(this._playerDataProvider=k.findComponentInChildren(G.bE_).Container.get("377-3e7b"));const U=this._spineAnimator.GameObject.transform,F=U.localScale.x,j=U.localScale.y;U.setScale(F,j),U.GameObject.parent.transform.setScale(this.setScale,this.setScale);const $=k.findComponent(nt.u).getRootContainer();this.sprites.addChild($),this.sprites.visible=!1,this.setupCollisionBlock(),this.x=Math.round(this.x),this.y=Math.round(this.y),this._playerPrefab=k,null===(B=k.findComponentInChildren(rt.c))||void 0===B||B.onLoadComplete.addOnce((()=>this.onLoadComplete())),this._spineComponent.isLoaded?this.loadAppearance().catch(G.RQr.createHandler("Could not load player appearance")):this._spineComponent.OnLoaded.addOnce((()=>{this.loadAppearance().catch(G.RQr.createHandler("Could not load player appearance"))}))}loadAppearance(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._playerDataProvider.getAppearance();if(!k)throw new Error("Could not load PlayerAppearanceData");return this._appearanceConfig.hideWeapon&&(k.weapon=null),this._playerPrefab.findComponentInChildren(ut.b).setAppearance(k)}))}postSetupPlayerIcon(k){var B,U;if(this.destroyed||k.isDestroyed)return;k.setLayer(void 0,!0),this._spineComponent=k.findComponentInChildren(G.v2j);const F=k.findComponent(nt.u).getRootContainer();this.sprites.addChild(F),this.sprites.visible=!1,this._playerDataProvider||(this._playerDataProvider=k.findComponentInChildren(G.bE_).Container.get("377-3e7b")),null===(B=k.findComponentInChildren(rt.c))||void 0===B||B.onLoadComplete.addOnce((()=>this.onLoadComplete())),k.findComponentInChildren(ot.z).updatePlayerAppearance(null===(U=this._playerDataProvider)||void 0===U?void 0:U.getAppearance()),this.x=Math.round(this.x),this.y=Math.round(this.y),this._playerPrefab=k}cleanup(){tt.l.removeAll(this.sprites,!0),this.sprites.alpha=1}onLoadComplete(){this.handlePostSprites(),G.Aq$.isDefined(this.loadedCallback)&&this.loadedCallback(),this._onLoad.dispatch(),this.complete=!0,this.loading=!1,this.sprites.visible=!0,G.Aq$.isDefined(this.game)&&this.game.broadcaster.broadcast(K.ig.PlayerLoaded,this.game,[this])}handlePostSprites(){this._appearanceConfig.headOnly||this.stand()}setupCollisionBlock(){G.Aq$.isDefined(this.game)&&(this.collisionHead=this.sprites.addChild(H.q.instance.prodigy.create.emptySprite(-40,-100,70*this.sprites.scale.y,60*this.sprites.scale.y)),this.collisionHead.alpha=0,this.collisionHead.events.onInputDown.add(this.playerClicked.bind(this)),this.collisionBody=this.sprites.addChild(H.q.instance.prodigy.create.emptySprite(-30,-41,50*this.sprites.scale.y,40*this.sprites.scale.y)),this.collisionBody.alpha=0,this.collisionBody.events.onInputDown.add(this.playerClicked.bind(this)),this.setSpriteInput(!0))}reload(k){var B;super.reload(k),(null===(B=this._spineComponent)||void 0===B?void 0:B.isLoaded)&&this.loadAppearance().then((()=>this.OnLoad.dispatch())).catch(G.RQr.createHandler("Could not load player appearance"))}setSpriteInput(k){this.collisionHead&&(this.collisionHead.inputEnabled=k),this.collisionBody&&(this.collisionBody.inputEnabled=k),this._playerPrefab&&(this._playerPrefab.findComponentInChildren(ct.T).GameObject.active=k)}randomSetup(){this.source.equipment.setOutfit(Math.floor(56*Math.random()+1)),this.source.equipment.setHat(Math.random()>.4?Math.floor(56*Math.random()+1):null),this.source.equipment.setWeapon(Math.floor(56*Math.random()+1)),this.source.appearance.setHair(Math.floor(15*Math.random())+1,Math.floor(21*Math.random())+1),this.source.appearance.setEyeColor(Math.floor(15*Math.random())+1),this.source.appearance.setFace(Math.floor(15*Math.random())+1),this.source.appearance.setSkinColor(Math.floor(5*Math.random())+1)}setData(){this.data={hair:this.source.appearance.getHair(),eyeColor:this.source.appearance.getEyeColor(),face:this.source.appearance.getFace(),skinColor:this.source.appearance.getSkinColor(),weapon:this.source.equipment.getWeapon(),hat:this.source.equipment.getHat(),boots:this.source.equipment.getBoots(),outfit:G.Aq$.isDefined(this.source.equipment.getOutfit())?this.source.equipment.getOutfit():1},this.data.faceColor=W.t.getItemMetadata("skinColor",this.data.skinColor).faceColor}playerClicked(){G.Aq$.isDefined(this.clickCallback)&&this.clickEnabled&&this.clickCallback()}damaged(){}setNewAnimationState(k,B){this.animState===k&&k===bt.$.WALK||this._appearanceConfig.headOnly||(this._animationController?(G.Aq$.isDefined(this.game)&&this.game.broadcaster.broadcast(K.J8.NewAnimationStateSet,this,[k]),B&&this._spineAnimator.OnAnimationComplete.addOnce(B,this),this.animState=k,this._morphTransformation.isMorphed()?this.playMorphedAnimationState(k):this._animationController.playAnimation(k)):this.loading?this.animState=k:G.VyI.log("ERROR: No AnimationController found on CharacterContainer",G.$bb.Error))}playMorphedAnimationState(k){let B;switch(k){case bt.$.ATTACK:case bt.$.ATTACK_BIG:case bt.$.ATTACK_FLOAT:B=2;break;case bt.$.WALK:B=1;break;case bt.$.WALK_FLOAT:default:B=0}this._morphTransformation.morphedAppearance.animationController.changeState(B)}walk(){this.setNewAnimationState(bt.$.WALK)}stand(){this.x=Math.round(this.x),this.y=Math.round(this.y),this.playStandAnimation()}playStandAnimation(){this.setNewAnimationState(bt.$.STAND)}standStill(){this.setNewAnimationState(bt.$.STATIC)}moonwalk(){this.setNewAnimationState(bt.$.WALK)}dig(k,B){this.setNewAnimationState(bt.$.DIG,(()=>this.animState===bt.$.WALK?this.walk():this.stand())),setTimeout(B,1e3)}attack(){super.attack(),this.setNewAnimationState(bt.$.ATTACK,this.stopHeavy.bind(this))}stopHeavy(){this.setNewAnimationState(bt.$.STOP_HEAVY)}setWeaponHidden(k=!0){this._appearanceConfig.hideWeapon=k,this._playerPrefab&&this.loadAppearance().catch(G.RQr.createHandler("Could not load character appearance"))}dance(k){var B;if(this.stopTweens(),this.isMainPlayer&&H.q.instance.prodigy.gameContainer.get("c47-20b6").playerIdentityAvatar.sendEmoteUsedEvent({emote_name:k,emote_type:st.H.Dance}),k===bt.$.STAND)return void this.stand();const U=null===(B=this._emoteManagerComponent)||void 0===B?void 0:B.emoteAssets.find((B=>B.name===k));U?this.setNewAnimationState(U.name):G.VyI.log(`ERROR: No EmoteAsset found for dance ID ${k}`,G.$bb.Error)}playAnimatedEmote(k){}stopAnimatedEmote(){}update(){super.update(),this.locomotion&&this.locomotion.update(),this.lastSmoothing!==pt.smoothOverride&&(this.lastSmoothing=pt.smoothOverride,this.reload())}destroy(k={children:!0}){this._playerPrefab&&this._playerPrefab.destroy(),this._playerPrefab=null,this._animationController=null,this._spineAnimator=null,this._spineComponent=null,this._emoteManagerComponent=null,this._morphTransformation=null,this._playerAppearanceSelector=null,this.collisionHead=null,this.collisionBody=null,this.clickCallback=null,this._playerDataProvider=null,super.destroy(k)}}pt.IDLE_WAIT_TIME_MIN=1e4,pt.IDLE_WAIT_TIME_MAX=15e3,pt.HAS_FINISHED_FIRST_LOAD=!1,pt.smoothOverride=null;class vt extends pt{get OnTransformTimerCreate(){return this.onTransformTimerCreate}get playerPrefab(){return this._playerPrefab}constructor(k,B,U,F,j,$,W,q=null,z=!1,Y=!0){super(k,B,U,F,j,$,W,q),this.onTransformTimerCreate=new G.HN0,this.onFullyLoaded=new G.HN0,this._disableTransform=!1,this._handleLocomotionEvents=!0,this._transformID=null,this._transformationCompleted=!1,this._mountListener=null,this._isMounted=!1,this._timerForPlayerDataUpdate=0,this._updateTime=null,this._membershipSprite=null,this._playerDataSchema=null,this.secondaryNameText=null,this._secondaryNameYOffset=30,this._playerDataSchema=this.source.data,this._disableTransform=z,this._handleLocomotionEvents=Y,this._playerNameplatePositionY=this.nameText.GameObject.legacyTransform.y,this.isMainPlayer?(this._playerDataProvider=H.q.instance.prodigy.gameContainer.get("e20-0fb0"),this.game.broadcaster.addAppListener(K.n8.MountTogglePressed,this.toggleMount.bind(this),this,"mount"),this._handleLocomotionEvents&&this.game.broadcaster.addAppListener(K.pm.StopPlayer,this.broadcastStopPlayer,this),this.game.broadcaster.addAppListener(K.J8.MorphMarbleCancelled,this.broadcastPlayerTransformCancelled,this)):(this._playerDataProvider=new V.z,this._playerDataProvider.initialize(U)),this.cullable=!0}showName(k=null){if(super.showName(k),this._isMainPlayer&&this._playerDataProvider.player.shouldShowUsernameAbovePlayer()&&(this._playerDataProvider.player.shouldShowWizardNameAbovePlayer()?(this.secondaryNameText||(this.secondaryNameText=H.q.instance.prodigy.create.nameFont(this,0,this.nameY-this._secondaryNameYOffset,"")),this.secondaryNameText.setText(this._playerDataProvider.loginCredentials.username),this.secondaryNameText.StrokeColor=Z.E.USERNAME_DISPLAY_STROKE_COLOR,this.secondaryNameText.StrokeThickness=Z.E.USERNAME_DISPLAY_STROKE_THICKNESS,this.secondaryNameText.FontSize=Z.E.USERNAME_DISPLAY_FONT_SIZE,this.secondaryNameText.Active=!0):(this.nameText.setText(this._playerDataProvider.loginCredentials.username),this.nameText.StrokeColor=Z.E.USERNAME_DISPLAY_STROKE_COLOR,this.nameText.StrokeThickness=Z.E.USERNAME_DISPLAY_STROKE_THICKNESS,this.nameText.FontSize=Z.E.USERNAME_DISPLAY_FONT_SIZE)),this.source.hasMembership()){if(!this._membershipSprite){let k=j._.Ui_common_neutral_json,B="misc/membership-icon-small";if(q.D.isFeatureEnabled()&&this._isMainPlayer){const U=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getMemberTier(),F=z.i.PLAYER_MEMBERSHIP_ICON_IMAGES[U];F&&(k=F.atlas,B=F.frame)}this._membershipSprite=H.q.instance.prodigy.create.sprite(0,0,k,B,new G.I9Y(.5,.5)),this.add(this._membershipSprite)}this.nameText.GameObject.legacyTransform.x=0;const k=-2,B=-2;this._membershipSprite.x=this.nameText.GameObject.legacyTransform.x-.5*this.nameText.TextWidth+k,this._membershipSprite.y=this.nameText.GameObject.legacyTransform.y+.5*this.nameText.TextHeight+B,this.nameText.GameObject.legacyTransform.x+=Math.floor(.5*this._membershipSprite.width),this._membershipSprite.visible=!0}else this._membershipSprite&&(this._membershipSprite.visible=!1),this.nameText.GameObject.legacyTransform.x=0}hideName(){super.hideName(),this.secondaryNameText&&(this.secondaryNameText.Active=!1,this.secondaryNameText.TextObject.TextObject.visible=!1),this._membershipSprite&&(this._membershipSprite.visible=!1)}startLoad(){this._transformID=this.source.transformID,super.startLoad()}setup(){if(super.setup(),this.isTransformed()){this._playerDataSchema.playerTransformation.transformID>-1&&!this._disableTransform&&(this.flagsToComplete++,this.setTransformationContainer(this._playerDataSchema.playerTransformation.transformType,this._playerDataSchema.playerTransformation.transformID),this._transformationCompleted=!0)}}postSetup(k){if(super.postSetup(k),!this.destroyed&&!k.isDestroyed&&(this._spineComponent.getRootContainer().visible=!this.isTransformed(),this._morphTransformation)){const k=()=>(0,F.sH)(this,void 0,void 0,(function*(){return this.updateMountAppearance().catch(G.RQr.createHandler("Failed to update player mount appearance"))}));this._morphTransformation.onPlayerMorphStarted.add(k,this),this._morphTransformation.onPlayerMorphEnded.add(k,this)}}cleanup(){var k,B,U,F;this._morphTransformation&&(null===(k=this._morphTransformation.onPlayerMorphStarted)||void 0===k||k.removeAll(this),null===(B=this._morphTransformation.onPlayerMorphEnded)||void 0===B||B.removeAll(this)),this._mountListener&&(null===(U=this._mountListener.onMount)||void 0===U||U.removeAll(this),null===(F=this._mountListener.onDismount)||void 0===F||F.removeAll(this)),super.cleanup()}handlePostSprites(){var k,B;this._appearanceConfig.headOnly||(this.isTransformed()&&this._playerDataSchema.playerTransformation.transformID>-1&&!this._disableTransform?null===(k=this._morphTransformation)||void 0===k||k.transformPlayerWithoutEffect(this._playerDataSchema.playerTransformation.transformType,this._playerDataSchema.playerTransformation.transformID,this._playerDataSchema.playerTransformation.maxTime,this._playerDataSchema.playerTransformation.timeRemaining):null===(B=this._morphTransformation)||void 0===B||B.clearMorphedAppearanceWithoutEffect(),this._mountListener=this._playerPrefab.findComponentInChildren(X.T),this._mountListener.onMount.add((()=>{this._isMounted=!0,this.adjustNameplatePosition()})),this._mountListener.onDismount.add((()=>{this._isMounted=!1,this.adjustNameplatePosition()})),this._appearanceConfig.hideMount&&this._mountListener.setListenersEnabled(!1),this._mountListener.transformationChecker=this,this.updateMountAppearance().catch(G.RQr.createHandler("Failed to update player mount appearance")),this.animState===bt.$.WALK?(this.animState=bt.$.SETUP,this.walk()):this.stand())}adjustNameplatePosition(){var k;const B=this.isMounted()?-40:0;if(this.nameText.GameObject.legacyTransform.y=this._playerNameplatePositionY+B,null===(k=this._membershipSprite)||void 0===k?void 0:k.visible){const k=-2;this._membershipSprite.y=this.nameText.GameObject.legacyTransform.y+.5*this.nameText.TextHeight+k}this.secondaryNameText&&(this.secondaryNameText.GameObject.legacyTransform.y=this._playerNameplatePositionY-this._secondaryNameYOffset+B)}updateMountAppearance(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B;yield null!==(B=null===(k=this._mountListener)||void 0===k?void 0:k.updateMountAppearance())&&void 0!==B?B:Promise.resolve()}))}onLoadComplete(){var k;this.handlePostSprites(),G.Aq$.isDefined(this.loadedCallback)&&this.loadedCallback(),this._onLoad.dispatch(),this.complete=!0,this.loading=!1;const B=()=>{this.destroyed||(this.sprites.visible=!0,G.Aq$.isDefined(this.game)&&this.game.broadcaster.broadcast(K.ig.PlayerLoaded,this.game,[this]),this.onFullyLoaded.dispatch())},U=null===(k=this._mountListener)||void 0===k?void 0:k.updateMountAppearance();G.Aq$.isDefined(U)?U.then(B).catch(G.RQr.createHandler("Failed to update player mount appearance")):B()}setData(){var k;this.data={hair:this.source.appearance.getHair(),eyeColor:this.source.appearance.getEyeColor(),face:this.source.appearance.getFace(),skinColor:this.source.appearance.getSkinColor(),weapon:this.source.equipment.getWeapon(),hat:this.source.equipment.getHat(),outfit:null!==(k=this.source.equipment.getOutfit())&&void 0!==k?k:1,boots:this.source.equipment.getBoots(),mount:this.source.equipment.getMount()},this.data.faceColor=W.t.getItemMetadata("skinColor",this.data.skinColor).faceColor}broadcastPlayerFullInfo(k){if(this.locomotion){const B={action:Q.x.Info,data:{target:this.locomotion.target,appearance:this.source.appearance.getData(),isMember:this.source.hasMembership()?1:0,equipment:this.source.equipment.getData(),data:this.source.data,team:this.source.data.team}};null!==this.source.coOpTeam&&(B.data.coOpTeam=this.source.coOpTeam),G.Aq$.isDefined(k)&&(B.target=k);H.q.instance.prodigy.gameContainer.get("c97-bd0d").emitMessage(B)}}broadcastStopPlayer(){H.q.instance.prodigy.gameContainer.get("c97-bd0d").emitMessage({action:Q.x.Move,data:{target:{x:this.x,y:this.y}}})}disableMovement(){this.evtProc=!0,this.game.input.enabled=!1,this.setPath([]),this.setNewAnimationState(bt.$.STAND),this.broadcastStopPlayer()}walk(){var k,B;this.isMounted()?(null===(k=this._mountListener)||void 0===k||k.mountComponent.resumeParticles(),null===(B=this._mountListener)||void 0===B||B.mountComponent.playAnimation(bt.$.WALK,.25),this.setNewAnimationState(bt.$.STAND)):this.setNewAnimationState(bt.$.WALK)}stand(){var k,B;this.x=Math.round(this.x),this.y=Math.round(this.y),this.isMounted()?(null===(k=this._mountListener)||void 0===k||k.mountComponent.pauseParticles(),null===(B=this._mountListener)||void 0===B||B.mountComponent.playAnimation(bt.$.STAND,.25)):this.playStandAnimation(),this.onStand.dispatch()}isMounted(){return this._isMounted}toggleMount(){if(this.isMounted())return void this.unmount();let k=this.source.equipment.lastEquippedMount;if(!G.Aq$.isDefined(k)||0===k){const B=this.source.backpack.getBackpackItemsByType("mount");B.length>0&&(k=B[0].ID)}this.mount(k);H.q.instance.prodigy.gameContainer.get("e20-0fb0").player.appearanceChanged=!0}mount(k){G.Aq$.isDefined(k)&&this.source.equipment.setMount(k)}unmount(){var k;this.source.equipment.setMount(null),null===(k=this._mountListener)||void 0===k||k.updateMountAppearance()}setTransformationContainer(k,B){const U=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k===$.V.Pet&&U.encounters.onPetEncountered(B)}setVisible(k){this._spineComponent.getRootContainer().visible=k}transformToItem(k,B,U,F){var G,j;if(k===$.V.Player)return this._playerDataSchema.playerTransformation=null,void this._morphTransformation.clearMorphedAppearance();if(this.isMainPlayer){this.source.transformPlayer(k,B,F);H.q.instance.prodigy.gameContainer.get("c97-bd0d").emitMessage({action:Q.x.Transform,data:{transformType:k,transformID:B,showEffect:U}})}else this.source.transformPlayer(k,B,0);U?null===(G=this._morphTransformation)||void 0===G||G.transformPlayerWithEffect(k,B,F):null===(j=this._morphTransformation)||void 0===j||j.transformPlayerWithoutEffect(k,B,F),this.updateMountAppearance()}resetItemTransformation(k){var B,U,F;this.source.transformPlayer($.V.Player),k?null===(B=this._morphTransformation)||void 0===B||B.clearMorphedAppearance():null===(U=this._morphTransformation)||void 0===U||U.clearMorphedAppearanceWithoutEffect(),null===(F=this.game)||void 0===F||F.broadcaster.broadcast(K.J8.MorphMarbleTimerUpdated)}broadcastPlayerTransformCancelled(){var k;this.source.transformPlayer($.V.Player);H.q.instance.prodigy.gameContainer.get("c97-bd0d").emitMessage({action:Q.x.Transform,data:{showEffect:!0}}),null===(k=this.game)||void 0===k||k.broadcaster.broadcast(K.J8.MorphMarbleTimerUpdated)}update(){var k;if(super.update(),null!==this.source.emoteID&&(this.emote(this.source.emoteID),this.source.emoteID=null),null!==this.source.chatID&&(this.startChat(this.source.chatID),this.source.chatID=null),null!==this.source.danceID){H.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.dance(this.source.danceID),this.source.danceID=null}null===this._updateTime&&(this._updateTime=Date.now());const B=this.game.state.get(Y.G.TileScreen),U=(null==B?void 0:B.isMapScreen)&&B.complete,F=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(this.isMainPlayer&&this._transformationCompleted&&U&&G.Aq$.isDefined(null===(k=this._playerDataSchema.playerTransformation)||void 0===k?void 0:k.timeRemaining)&&F)if(this._playerDataSchema.playerTransformation.timeRemaining>0){const k=Date.now()-this._updateTime;F.data.playerTransformation.timeRemaining-=k,this._timerForPlayerDataUpdate+=k,this._timerForPlayerDataUpdate>=3e4&&(F.updated=!0,this._timerForPlayerDataUpdate=0),this.appearanceConfig.isPreview||this.game.broadcaster.broadcast(K.J8.MorphMarbleTimerUpdated)}else F.data.playerTransformation.transformID>-1&&(this._timerForPlayerDataUpdate=0);this._updateTime=Date.now()}destroy(k={children:!0}){this.isMainPlayer&&(this.game.broadcaster.removeAppListener(K.n8.MountTogglePressed,this,"mount"),this._handleLocomotionEvents&&this.game.broadcaster.removeAppListener(K.pm.StopPlayer,this),this.game.broadcaster.removeAppListener(K.J8.MorphMarbleCancelled,this),this.secondaryNameText&&(this.secondaryNameText.GameObject.destroy(),this.secondaryNameText=null)),this.cleanup(),this._membershipSprite&&this._membershipSprite.destroy(),this._membershipSprite=null,this.onTransformTimerCreate.dispose(),this.onFullyLoaded.dispose(),super.destroy(k)}isTransformed(){return this._playerDataSchema.playerTransformation&&!this._appearanceConfig.headOnly}}},60250:(k,B,U)=>{"use strict";U.d(B,{G:()=>F,I:()=>K});var F,G=U(8674),j=U(62459),$=U(95891),H=U(35120),V=U(93709),W=U(59968),q=U(88022);!function(k){k[k.left=0]="left",k[k.right=1]="right"}(F||(F={}));class K extends V.H{hasBracer(k){return this._hasBracer[k]}get bracerCount(){return $.sumBy(this._hasBracer,(k=>k?1:0))}constructor(k,B,U,F,G){super(k,B,U,F,G),this._hasBracer=[!0,!0],this._shouldBreakBracer=[!1,!1],this._bracerPiles=[null,null],this._parentElement=B,U.onBracerBreak.add(this.setShouldBreakBracer,this)}setup(){this.cacheBoss();const k=H.q.instance.prodigy.create.element(this.sprites,0,0);this._spine=this.game.add.spine(0,0,"default-boss-19"),this.idle(),k.add(this._spine),this.complete=!0;for(const B in F)this._bracerPiles[B]=H.q.instance.prodigy.create.image(0,0,q._.Boss_aspen_extras_json,K.BRACER_PILE_ATLAS_FRAMES[B]),this._bracerPiles[B].visible=!1,this._bracerPiles[B].scale.x=-1,this._bracerPiles[B].anchor.set(.5,1),this._parentElement.addChild(this._bracerPiles[B]);this.castDelay=this.getAnimationEventTime("attack-Bracers_both","cast"),this._onLoad.dispatch()}idle(){const k=this.getBracerStateString();this._spine.setAnimationByName(0,`idle-Bracers_${k}`,!0),this._spine.setToSetupPose()}attack(){W.R.prototype.attack.call(this);const k=this.getBracerStateString();this._spine.setAnimationByName(0,`attack-Bracers_${k}`,!1),this._spine.addAnimationByName(0,`idle-Bracers_${k}`,!0),this._spine.setToSetupPose()}setShouldBreakBracer(k){this._shouldBreakBracer[k]=!0}breakBracers(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=Object.assign({},this._shouldBreakBracer),U=this.getBracerStateString();for(const k in F)this._hasBracer[k]=this._hasBracer[k]&&!this._shouldBreakBracer[k],this._shouldBreakBracer[k]=!1;const G=this.getBracerStateString();yield j.Egh.timeout(k),yield new Promise((k=>{this._spine.setAnimationByName(0,`break-Bracers_${U}-${G}`,!1).onComplete=k,this._spine.setToSetupPose()})),this._spine.setAnimationByName(0,`idle-Bracers_${G}`,!0);for(const k in F)B[k]&&(this._bracerPiles[k].x=this.x+K.BRACER_PILE_OFFSET.x,this._bracerPiles[k].y=this.y+K.BRACER_PILE_OFFSET.y,this._bracerPiles[k].visible=!0)}))}getBracerStateString(){const k=this._hasBracer[F.left],B=this._hasBracer[F.right];return k?B?"both":"left":B?"right":"none"}hideBracerPiles(){for(const k of this._bracerPiles)k.visible=!1}getAnimationEventTime(k,B){return j.E3R.getAnimationEventTime(this._spine,k,B)}update(){this._shouldBreakBracer.some((k=>k))&&this.breakBracers(3e3),super.update()}destroy(){this.source.onBracerBreak.remove(this.setShouldBreakBracer,this),super.destroy()}}K.BRACER_PILE_OFFSET={x:-16,y:29},K.BRACER_PILE_ATLAS_FRAMES=["bracer-pile-l","bracer-pile-r"]},18633:(k,B,U)=>{"use strict";U.d(B,{Z:()=>V});var F=U(62459),G=U(35120),j=U(51742),$=U(56942),H=U(59968);class V extends H.R{constructor(k,B,U,F,G){super(k,B,U,.5,F,G),this._idleState=0,this.game=k,this.source=U,this.assets=[$.Q.Spine_crystal_clumps_json,j.c.Sfx_crystalbreak,j.c.Sfx_crystalclumpdestroy],this.pairs=[],this.walkIntoBattle=!1,U.onHPChange.add(this.damaged,this)}startLoad(){super.startLoad(),this.loading=!0,G.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this))}setup(k,B){var U;if(!this.game||!B||!this.assets)return;const F=$.Q.Spine_crystal_clumps_json;this._spine=this.game.add.spine(0,0,F),this._spine.setAnimationByName(0,"idle-1",!0),this.add(this._spine);const j=G.q.instance.prodigy.assets.getAsset(F),H=null===(U=null==j?void 0:j.data)||void 0===U?void 0:U.hitbox;this.setHitbox(H),this.complete=!0,this.loading=!1,this.createHealthBar().getOverlay().scale.x=-1}attack(){}damaged(){const k=this.source.boss.getConfig().tree.breakThresholds;let B=0;const U=this.source.getCurrentHearts()/this.source.getMaxHearts();for(const F of k)Uthis._idleState&&(G.q.instance.prodigy.audio.playSFX(56,"break",void 0,.25),B===k.length+1&&F.Egh.timeout(V.CRYSTAL_DESTROY_DELAY_MS).then((()=>{G.q.instance.prodigy.audio.playSFX(57,"destroy",void 0,.9)})),this._idleState=B,this._spine.setAnimationByName(0,`crack-${B}`),this._spine.addAnimationByName(0,`idle-${B+1}`,!0))}shouldPlayRetreatOnDefeat(){return!0}retreat(k){k()}destroy(){this.source.onHPChange.remove(this.damaged,this),super.destroy()}}V.CRYSTAL_DESTROY_DELAY_MS=2700},99687:(k,B,U)=>{"use strict";U.d(B,{X:()=>q});var F=U(62459),G=U(95891),j=U(35120),$=U(98013),H=U(26657),V=U(59968),W=U(88022);class q extends V.R{constructor(k,B,U,F,j){super(k,B,U,2,F,j),this.tweens=[],this.idleTween=[],this.attackTween=[],this.atlas="",this.atlas=G.get(U,"source.useShadowAssets",!1)?W._.Boss_gerald_shadow_json:W._.Boss_gerald_json}startLoad(){super.startLoad(),this.loading=!0,j.q.instance.prodigy.load.assets([this.atlas],this.setup.bind(this))}setup(k,B){super.startLoad(),F.Aq$.isDefined(this.sprite)&&$.l.removeAll(this.sprite,!0),this.hideName(),this.sprite=j.q.instance.prodigy.create.element(this.sprites,130,-300),this.sprite.scale.x=-1;const U=17,G=95,V=this.sprite.addChild(j.q.instance.prodigy.create.sprite(U,G,this.atlas,"arm-left-1")),W=22,q=43,K=this.sprite.addChild(j.q.instance.prodigy.create.sprite(W,q,this.atlas,"shoulder")),z=94,Y=216,Q=this.sprite.addChild(j.q.instance.prodigy.create.sprite(z,Y,this.atlas,"leg")),X=62,Z=226,J=this.sprite.addChild(j.q.instance.prodigy.create.sprite(X,Z,this.atlas,"foot-left")),tt=118,et=190,it=this.sprite.addChild(j.q.instance.prodigy.create.sprite(tt,et,this.atlas,"waist")),st=52,nt=46,at=this.sprite.addChild(j.q.instance.prodigy.create.sprite(st,nt,this.atlas,"body")),rt=156,ot=215,ht=this.sprite.addChild(j.q.instance.prodigy.create.sprite(rt,ot,this.atlas,"leg")),ct=163,dt=224,lt=this.sprite.addChild(j.q.instance.prodigy.create.sprite(ct,dt,this.atlas,"foot-right")),ut=193,ft=94,bt=this.sprite.addChild(j.q.instance.prodigy.create.sprite(ut,ft,this.atlas,"arm-right-1")),pt=69,vt=15,gt=this.sprite.addChild(j.q.instance.prodigy.create.sprite(pt,vt,this.atlas,"head")),mt=67,yt=58,_t=this.sprite.addChild(j.q.instance.prodigy.create.sprite(mt,yt,this.atlas,"jaw")),Et=131,wt=43,Tt=this.sprite.addChild(j.q.instance.prodigy.create.sprite(Et,wt,this.atlas,"shoulder"));this.idleTween.push(new H.s(gt)),this.idleTween[0].set("x",[pt,pt-4,pt-9,pt-11,pt-11,pt-6,pt-3,pt,pt+3,pt+4,pt+4,pt+2],100,9999),this.idleTween.push(new H.s(gt)),this.idleTween[1].set("y",[vt,vt,vt+3,vt+6,vt+8,vt+10,vt+11,vt+9,vt+7,vt+5,vt+3,vt+2],100,9999),this.idleTween.push(new H.s(_t)),this.idleTween[2].set("x",[mt,mt-3,mt-9,mt-9,mt-9,mt-5,mt-2,mt,mt+3,mt+4,mt+4,mt+2],100,9999),this.idleTween.push(new H.s(_t)),this.idleTween[3].set("y",[yt,yt+2,yt+7,yt+14,yt+16,yt+17,yt+16,yt+12,yt+9,yt+5,yt+3,yt+2],100,9999),this.idleTween.push(new H.s(Tt)),this.idleTween[4].set("x",[Et,Et-2,Et-3,Et-3,Et-3,Et-2,Et-1,Et+1,Et+2,Et+3,Et+3,Et+1],100,9999),this.idleTween.push(new H.s(Tt)),this.idleTween[5].set("y",[wt,wt+2,wt+4,wt+5,wt+6,wt+6,wt+6,wt+4,wt+4,wt+3,wt+3,wt+1],100,9999),this.idleTween.push(new H.s(V)),this.idleTween[6].set("frameName",["arm-left-1","arm-left-1","arm-left-2","arm-left-3","arm-left-3","arm-left-3","arm-left-3","arm-left-2","arm-left-1","arm-left-1","arm-left-1","arm-left-1"],100,9999);const St=10,At=100,Ct=7,Ot=103,It=196,Dt=101,Rt=196,Pt=106;this.idleTween.push(new H.s(bt)),this.idleTween[7].set("x",[ut,ut+1,It,Rt,Rt-4,Rt-6,Rt-7,It-4,ut-1,ut-2,ut-2,ut-1],100,9999),this.idleTween.push(new H.s(bt)),this.idleTween[8].set("y",[ft,ft+2,Dt,Pt,Pt+6,Pt+5,Pt+4,Dt+4,ft+7,ft+4,ft+2,ft+1],100,9999),this.idleTween.push(new H.s(K)),this.idleTween[9].set("x",[W,W+2,W+3,W+3,W+3,W+2,W+1,W-1,W-2,W-3,W-3,W-1],100,9999),this.idleTween.push(new H.s(K)),this.idleTween[10].set("y",[q,q+2,q+4,q+5,q+6,q+6,q+6,q+4,q+4,q+2,q,q-1],100,9999),this.idleTween.push(new H.s(bt)),this.idleTween[11].set("frameName",["arm-right-1","arm-right-1","arm-right-2","arm-right-3","arm-right-3","arm-right-3","arm-right-3","arm-right-2","arm-right-1","arm-right-1","arm-right-1","arm-right-1"],100,9999),this.idleTween.push(new H.s(V)),this.idleTween[12].set("x",[U,U+3,St+6,Ct,Ct+1,Ct+2,Ct+4,St+4,U+1,U+2,U+3,U+2],100,9999),this.idleTween.push(new H.s(V)),this.idleTween[13].set("y",[G,G+2,At+7,Ot,Ot+1,Ot,Ot-1,At,G+2,G+1,G,G-2],100,9999),this.idleTween.push(new H.s(Q)),this.idleTween[14].set("x",[z,z-1,z-1,z-1,z-1,z-1,z,z,z,z,z,z],100,9999),this.idleTween.push(new H.s(Q)),this.idleTween[15].set("y",[Y,Y,Y+1,Y+1,Y+1,Y+1,Y+1,Y,Y,Y,Y,Y],100,9999),this.idleTween.push(new H.s(J)),this.idleTween[16].set("x",[X],100,9999),this.idleTween.push(new H.s(J)),this.idleTween[17].set("y",[Z],100,9999),this.idleTween.push(new H.s(ht)),this.idleTween[18].set("x",[rt,rt+1,rt+1,rt+1,rt+1,rt+1,rt,rt,rt,rt,rt,rt],100,9999),this.idleTween.push(new H.s(ht)),this.idleTween[19].set("y",[ot,ot,ot+1,ot+1,ot+1,ot+1,ot+1,ot,ot,ot,ot,ot],100,9999),this.idleTween.push(new H.s(lt)),this.idleTween[20].set("x",[ct],100,9999),this.idleTween.push(new H.s(lt)),this.idleTween[21].set("y",[dt],100,9999),this.idleTween.push(new H.s(at)),this.idleTween[22].set("x",[st,st-1,st-1,st-1,st-1,st,st+1,st+2,st+3,st+3,st+3,st+3],100,9999),this.idleTween.push(new H.s(at)),this.idleTween[23].set("y",[nt,nt+1,nt+2,nt+3,nt+4,nt+5,nt+4,nt+3,nt+2,nt+1,nt,nt-1],100,9999),this.idleTween.push(new H.s(it)),this.idleTween[24].set("x",[tt,tt-1,tt-1,tt-1,tt-1,tt,tt+1,tt+2,tt+3,tt+3,tt+3,tt+2],100,9999),this.idleTween.push(new H.s(it)),this.idleTween[25].set("y",[et,et+2,et+4,et+6,et+8,et+9,et+8,et+6,et+4,et+2,et,et-1],100,9999),this.idleTween.push(new H.s(V)),this.idleTween[26].set("angle",[0],100,9999),this.idleTween.push(new H.s(V)),this.idleTween[27].set("visible",[!0],100,9999),this.attackTween.push(new H.s(gt)),this.attackTween[0].set("x",[pt,pt-6,pt-15,pt-27,pt-32,pt-34,pt-33,pt-30,pt-19,pt-7],100,9999),this.attackTween.push(new H.s(gt)),this.attackTween[1].set("y",[vt,vt+6,vt+13,vt+20,vt+22,vt+22,vt+20,vt+16,vt+12,vt+5],100,9999),this.attackTween.push(new H.s(_t)),this.attackTween[2].set("x",[mt,mt-6,mt-14,mt-26,mt-31,mt-33,mt-32,mt-29,mt-18,mt-7],100,9999),this.attackTween.push(new H.s(_t)),this.attackTween[3].set("y",[yt,yt+8,yt+20,yt+29,yt+31,yt+31,yt+29,yt+23,yt+13,yt+7],100,9999),this.attackTween.push(new H.s(Tt)),this.attackTween[4].set("x",[W,W-4,W+5,W+12,W+16,W+19,W+21,W+25,W+22,W+15],100,9999),this.attackTween.push(new H.s(K)),this.attackTween[5].set("y",[q,q,q-5,q-10,q-11,q-10,q-9,q-5,q,q+2],100,9999),this.attackTween.push(new H.s(V)),this.attackTween[6].set("frameName",["arm-left-1","arm-left-1","arm-left-1","arm-left-4","arm-left-2","arm-left-5","arm-left-3","arm-left-4","arm-left-4","arm-left-4"],100,9999),this.attackTween.push(new H.s(V)),this.attackTween[7].set("x",[U,U-5,U-8,U-42-15,U-47+90,U+15+50,U+82+20,U+81+80,U,U+-38],100,9999),this.attackTween.push(new H.s(V)),this.attackTween[8].set("y",[G,G-4,G-13,G+73-100,G+34-65-20,G+45-185,G-48+40,G+17,G,G+112],100,9999),this.attackTween.push(new H.s(Tt)),this.attackTween[9].set("x",[Et,Et-8,Et-36,Et-44,Et-48,Et-51,Et-48,Et-42,Et-30,Et-6],100,9999),this.attackTween.push(new H.s(Tt)),this.attackTween[10].set("y",[wt,wt+25,wt+48,wt+52,wt+55,wt+54,wt+54,wt+47,wt+38,wt+13],100,9999),this.attackTween.push(new H.s(bt)),this.attackTween[11].set("frameName",["arm-right-1","arm-right-4","arm-right-5","arm-right-5","arm-right-5","arm-right-5","arm-right-5","arm-right-5","arm-right-4","arm-right-1"],100,9999),this.attackTween.push(new H.s(bt)),this.attackTween[12].set("x",[193,132,58,39,34,35,45,58,127,187],100,9999),this.attackTween.push(new H.s(bt)),this.attackTween[13].set("y",[94,125,162,162,162,162,162,162,135,108],100,9999),this.attackTween.push(new H.s(Q)),this.attackTween[14].set("x",[z,z-2,z-5,z-18,z-21,z-22,z-21,z-19,z-12,z-5],100,9999),this.attackTween.push(new H.s(Q)),this.attackTween[15].set("y",[Y,Y-2,Y-3,Y,Y,Y+1,Y+1,Y+1,Y+1,Y+1],100,9999),this.attackTween.push(new H.s(J)),this.attackTween[16].set("x",[X,X-1,X-7,X-23,X-24,X-23,X-22,X-21,X-15,X-11],100,9999),this.attackTween.push(new H.s(J)),this.attackTween[17].set("y",[Z,Z-9,Z-16,Z,Z,Z,Z,Z,Z,Z],100,9999),this.attackTween.push(new H.s(ht)),this.attackTween[18].set("x",[rt,rt,rt,rt-4,rt-7,rt-8,rt-8,rt-6,rt-3,rt-1],100,9999),this.attackTween.push(new H.s(ht)),this.attackTween[19].set("y",[ot,ot,ot,ot,ot,ot,ot,ot,ot,ot],100,9999),this.attackTween.push(new H.s(lt)),this.attackTween[20].set("x",[ct,ct,ct-2,ct-5,ct-6,ct-6,ct-5,ct-3,ct-2,ct],100,9999),this.attackTween.push(new H.s(lt)),this.attackTween[21].set("y",[dt,dt,dt,dt,dt,dt,dt,dt,dt,dt],100,9999),this.attackTween.push(new H.s(at)),this.attackTween[22].set("x",[st,st-3,st-8,st-11,st-12,st-13,st-12,st-11,st-8,st-3],100,9999),this.attackTween.push(new H.s(at)),this.attackTween[23].set("y",[nt,nt+4,nt+6,nt+7,nt+7,nt+7,nt+7,nt+7,nt+6,nt+3],100,9999),this.attackTween.push(new H.s(it)),this.attackTween[24].set("x",[tt,tt-3,tt-8,tt-11,tt-12,tt-13,tt-12,tt-11,tt-8,tt-3],100,9999),this.attackTween.push(new H.s(it)),this.attackTween[25].set("y",[et,et+4,et+6,et+7,et+7,et+7,et+7,et+7,et+6,et+3],100,9999),this.attackTween.push(new H.s(V)),this.attackTween[26].set("angle",[0,0,0,0,90,90,180,180,270,270],100,9999),this.attackTween.push(new H.s(V)),this.attackTween[27].set("visible",[!0,!0,!0,!0,!0,!0,!0,!0,!1,!1],100,9999),this.attackTween[0].end(this.playIdle.bind(this)),this.playIdle(),this.complete=!0,this.loading=!1,this._onLoad.dispatch()}playIdle(){if(1!==this.mode){this.mode=1,this.tweens=this.idleTween;for(let k=0;k{"use strict";U.d(B,{K:()=>W});var F=U(62459),G=U(35120),j=U(98013),$=U(17425),H=U(59968),V=U(56942);class W extends H.R{constructor(k,B,U,F,G){super(k,B,U,1,F,G),this._spine=null,this.game=k,this.source=U,this.assets=[V.Q.Default_boss_17_json],this.pairs=[]}startLoad(){super.startLoad(),this.loading=!0,G.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this))}setup(k,B){F.Aq$.isDefined(this.game)&&B&&F.Aq$.isDefined(this.assets)&&(j.l.removeAll(this.sprites,!0),this._spine=this.game.add.spine(0,0,V.Q.Default_boss_17_json),this._spine.setToSetupPose(),this._spine.setAnimationByName(0,"mound-blue",!1),this.sprites.addChild(this._spine),this.complete=!0,this.loading=!1,this.createHealthBar())}attack(){}cacheBoss(){$.K.cacheAssets(this.game,this.assets,$.K.zoneAssetsCached)}displayDamage(k,B,U){this._spine.setAnimationByName(0,"mound-blue",!1),U()}shouldPlayRetreatOnDefeat(){return!0}retreat(k){this._spine.setAnimationByName(0,"mound-blue",!1),this.game.time.events.addTimer(1e3,k,this)}setTargetable(k){this._spine.setToSetupPose(),this._spine.setAnimationByName(0,k?"mound-purple":"mound-blue",!1),this.source.setRockActive(k)}getHitboxHeight(){return super.getHitboxHeight()+W.HITBOX_HEIGHT_OFFSET}getHitboxTop(){return super.getHitboxTop()+W.HITBOX_TOP_OFFSET}}W.HITBOX_TOP_OFFSET=45,W.HITBOX_HEIGHT_OFFSET=-50},85604:(k,B,U)=>{"use strict";var F;U.d(B,{y:()=>F}),function(k){k.Benni="benni",k.Bok="bok",k.Broccolina="broccolina",k.Eve="eve",k.Flora="flora",k.Slurpy="slurpy",k.Wheeler="wheeler",k.Spinner="spinner",k.Snips="snips",k.ImaniStar="imani-star",k.Gale="gale",k.Selena="selena",k.MoonPortal="moon-portal",k.Bargo="bargo",k.Verna="verna",k.DonZorro="don-zorro",k.Harriet="harriet",k.HowardCornelius="howard-cornelius",k.Athena="athena",k.GrottoPortal="grotto-portal",k.KandiKorn="kandi-korn"}(F||(F={}))},75214:(k,B,U)=>{"use strict";U.d(B,{p:()=>V});var F=U(62459),G=U(35120),j=U(48975),$=U(29834),H=U(59968);class V extends H.R{constructor(k,B,U,$,H,W,q,K,z,Y,Q,X){super(k,H,new j.s(k),null,W,q),this.onClick=new F.HN0;const Z=G.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService);this.spineNPC=G.q.instance.prodigy.create.spineNPC(this,U,K,0,0,{text:Z.getText(B),parent:z},{npcType:$,npcXCoord:W,npcYCoord:q},(()=>{this.onClick.dispatch()}),void 0,X),this._rootContainer=this.spineNPC.parent.legacyTransform.group,Y&&this.flip(),Q&&(this._rootContainer.alpha=0,this.fade(V.FADE_IN_OPACITY,V.FADE_IN_MS))}flip(){this.spineNPC.legacyTransform.group.scale.x=-1}faceToward(k){this.spineNPC.legacyTransform.group.scale.x=k>=this.x?1:-1}fade(k=0,B=1e3){var U;null===(U=this.game.add.tween(this._rootContainer,this))||void 0===U||U.to({alpha:k},B,F.GS3.Quadratic.In,!0)}playAll(k,B=!0){const U=this.spineNPC.findComponent($.j);U.hasAnimation(k)&&U.playAnimation(k,B)}}V.FADE_IN_OPACITY=1,V.FADE_IN_MS=800},18155:(k,B,U)=>{"use strict";U.d(B,{N:()=>K});var F=U(62459),G=U(35120),j=U(56942),$=U(34829),H=U(45024),V=U(87337),W=U(29834),q=U(75214);class K extends q.p{constructor(k,B,U,F,H,W,q){super(k,B,j.Q.Spine_npc_pippet_json,V.ac.Boss,U,F,H,W),this.user=q;const K=G.q.instance.prodigy.gameContainer.get("80c-6fa4"),z=K.getValue("pippetMaxHP",$.s.get("GameConstants.Pippet.MAX_HP")),Y=null===z?void 0:parseInt(z,10);this.mods={boss:{ID:37,maxHP:Y,element:"shadow",attacks:[73],name:"Pippet",tag:"pippet",pippetBattle:!0},drops:[{type:"currency",ID:3,N:1}],difficulty:parseInt(K.getValue("pippetDifficulty",$.s.get("GameConstants.Pippet.DIFFICULTY")),10)}}process(k,B){this.zone=k,this.map=B}alert(){const k=G.q.instance.prodigy.event.create();G.q.instance.prodigy.world.pippetEncounterDaily.isComplete()?this.completeDailyCutscene(k):(this.user.disableMovement(),this.startDailyCutscene(k,this.user)),k.start()}startDailyCutscene(k,B){k.function(this.chat.bind(this,1,150,!0)),k.function(this.faceToward.bind(this,B.x)),k.delay(1e3),k.function((()=>{this.chatBubble.destroy(),this.endChat()})),k.delay(300),k.text(G.q.instance.prodigy.world.pippetEncounterSpawn.dialogue,"pippet"),k.sound(19,"monster"),k.function(this.startBattle.bind(this))}completeDailyCutscene(k){k.text(H.e.data.completeDialogue,"pippet"),k.function((()=>{this.nameText.Active=!1})),k.set(this.pivot,"y",.5*-this.height),k.set(this,"y",this.y-.5*this.height),k.tween(this.scale,{x:0,y:0},1e3,F.GS3.Linear.None,!0),k.tween(this,{x:640,y:-200,rotation:360},1e3,F.GS3.Linear.None),k.set(G.q.instance.prodigy.world,"pippetEncounterSpawn",null),k.set(this,"visible",!1)}startBattle(){const k=this.map.getLocation(),B={x:this.user.x,y:this.user.y};this.mods.screen=this.map.battleBG,G.q.instance.prodigy.battle.battleStats.type="PippetBattle",this.zone.getBattle(this.map,G.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("COMBAT_PIPPET_BATTLE"),this.mods,(()=>{G.q.instance.prodigy.world.pippetEncounterDaily.complete(),G.q.instance.prodigy.world.it(k,B.x,B.y)}))()}walk(){const k=this.spineNPC.findComponent(W.j);k.hasAnimation("walk")&&k.playAnimation("walk",!0)}stand(){const k=this.spineNPC.findComponent(W.j);k.hasAnimation("idle")&&k.playAnimation("idle",!0)}}},75777:(k,B,U)=>{"use strict";U.d(B,{i:()=>Q});var F=U(62459),G=U(87337),j=U(35120),$=U(77938),H=U(48975),V=U(23082),W=U(17425),q=U(95373),K=U(26657),z=U(59968),Y=U(88022);class Q extends z.R{constructor(k,B,U,j,V,W,K){const z=new H.s(k);z.init({npc_name:"",npc_type:G.ac.Pet,x_coord:W,y_coord:K,npc_animation_id:"idle"}),super(k,B,z,null,F.Aq$.isDefined(W)?W:F.Aq$.isDefined(j)?j.x:0,F.Aq$.isDefined(K)?K:F.Aq$.isDefined(j)?j.y:-1),this.mode=-1,this.tweens=[],this.itemData=$.t.getItem("follow",U).data,this.assets=["pets"],this.onTargetStopped=new F.HN0,F.Aq$.isDefined(j)&&(this.followController=new q.u(k,this,j))}destroy(){this.stopTweens(),this.onTargetStopped.dispose(),super.destroy()}startLoad(){super.startLoad(),this.loading=!0,this.assets=[Y._.General_pets_json,Y._.General_core_2_json],j.q.instance.prodigy.load.assets(this.assets,this.setup.bind(this))}setup(k,B){if(!F.Aq$.isDefined(this.game)||!B||!F.Aq$.isDefined(this.assets))return;const U=this.itemData.tag;this.sprite=j.q.instance.prodigy.create.element(this.sprites,0,0),U.indexOf("cat")>-1?U.indexOf("sparkle")>-1?this.createSparkleCat(U,this.itemData.spriteOffsets):this.createCat(U,this.itemData.spriteOffsets):U.indexOf("dog")>-1?U.indexOf("sparkle")>-1?this.createSparkleDog(U):this.createDog(U):U.indexOf("rodent")>-1?U.indexOf("sparkle")>-1?this.createSparkleRodent(U):this.createRodent(U):U.indexOf("bird")>-1?this.createBird(U):U.indexOf("lizard")>-1?this.createLizard(U):U.indexOf("turtle")>-1?this.createTurtle(U,this.itemData.spriteOffsets):U.indexOf("reindeer")>-1?this.createReindeer(U):U.indexOf("penguin")>-1?this.createPenguin(U):U.indexOf("snowman")>-1?this.createSnowman(U):U.indexOf("panda")>-1?this.createPanda(U):U.indexOf("sheep")>-1?this.createSheep(U):U.indexOf("cactus")>-1?this.createCactus(U):U.indexOf("fox")>-1&&this.createFox(U),F.Aq$.isDefined(this.itemData.extraAnims)&&this.itemData.extraAnims.forEach((k=>{const B=this.sprite.addChild(j.q.instance.prodigy.create.sprite(k.offsets.x,k.offsets.y,Y._.General_pets_json,`${U}/${k.animFrames[0]}`));let F=null;F="walk"===k.targetCycle?this.walkTween:this.standTween,F.push(new K.s(B)),F[F.length-1].set("frameName",k.animFrames.map((k=>`${U}/${k}`),this),80,9999)}),this),this.complete=!0,this.loading=!1,this.stopMoving(),F.Aq$.isDefined(this.loadedCallback)&&this.loadedCallback(),this._onLoad.dispatch()}setupWalk(k){const B=`${k}/walk/`;this.walkTween=[],this.walkTween.push(new K.s(this.body)),this.walkTween[0].set("y",[this.body.y,this.body.y+1],150,9999),this.walkTween.push(new K.s(this.legs)),this.walkTween[1].set("frameName",[`${B}legs-0`,`${B}legs-1`,`${B}legs-2`,`${B}legs-3`],150,9999),F.Aq$.isDefined(this.tail)&&(this.walkTween.push(new K.s(this.tail)),this.walkTween[2].set("frameName",[`${B}tail-0`,`${B}tail-1`],150,9999),this.walkTween.push(new K.s(this.tail)),this.walkTween[3].set("y",[this.tail.y,this.tail.y+1],150,9999))}setupStand(k){const B=`${k}/idle/`;this.standTween=[],F.Aq$.isDefined(this.tail)&&(this.standTween.push(new K.s(this.tail)),this.standTween[0].set("y",[this.tail.y+6],1e4,9999),this.standTween.push(new K.s(this.tail)),this.standTween[1].set("frameName",[`${B}tail-0`,`${B}tail-1`,`${B}tail-2`],150,9999))}setSpriteDefaults(k){const B=(k,B)=>{F.Aq$.isDefined(B)&&(F.Aq$.isDefined(B._defaultAnims)&&(B.frameName=B._defaultAnims[k]),F.Aq$.isDefined(B._defaultVisibility)&&(B.visible=B._defaultVisibility[k]),F.Aq$.isDefined(B._defaults)&&(B.x=B._defaults[k][0],B.y=B._defaults[k][1]))};B(k,this.head),B(k,this.body),B(k,this.legs),B(k,this.tail)}createCat(k,B){const U=F.Aq$.isDefined(B)?B:{};F.Aq$.isDefined(U.tail)||(U.tail={x:-12,y:1}),F.Aq$.isDefined(U.body)||(U.body={x:0,y:0}),F.Aq$.isDefined(U.legs)||(U.legs={x:-1,y:29}),this.tail=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0+U.tail.x,0+U.tail.y,Y._.General_pets_json,`${k}/walk/tail-0`)),this.body=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0+U.body.x,0+U.body.y,Y._.General_pets_json,`${k}/walk/body-0`)),this.legs=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0+U.legs.x,0+U.legs.y,Y._.General_pets_json,`${k}/walk/legs-0`)),this.sprite.y=-this.body.height-this.legs.height,this.sprite.x=-Math.floor(this.body.width/2),this.setupWalk(k),this.setupStand(k)}createSparkleCat(k,B){const U=F.Aq$.isDefined(B)?B:{};F.Aq$.isDefined(U.tail)||(U.tail={x:-12,y:1}),F.Aq$.isDefined(U.body)||(U.body={x:0,y:0}),F.Aq$.isDefined(U.legs)||(U.legs={x:-1,y:29}),this.tail=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0+U.tail.x,0+U.tail.y,Y._.General_pets_json,`${k}/walk/tail-0`)),this.tail._defaultVisibility={walk:!0,stand:!1},this.body=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0+U.body.x,0+U.body.y,Y._.General_pets_json,`${k}/walk/body-0`)),this.body._defaults={walk:[0,0],stand:[-12,0]},this.legs=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0+U.legs.x,0+U.legs.y,Y._.General_pets_json,`${k}/walk/legs-0`)),this.legs._defaultVisibility={walk:!0,stand:!1},this.sprite.y=-this.body.height-this.legs.height,this.sprite.x=-Math.floor(.5*this.body.width),this.setupWalk(k);const G=`${k}/idle/`;this.standTween=[],this.standTween.push(new K.s(this.body)),this.standTween[0].set("frameName",[`${G}body-0`,`${G}body-1`,`${G}body-2`,`${G}body-3`],150,9999)}createDog(k){this.tail=this.sprite.addChild(j.q.instance.prodigy.create.sprite(-12,9,Y._.General_pets_json,`${k}/walk/tail-0`)),this.body=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0,0,Y._.General_pets_json,`${k}/walk/body-0`)),this.legs=this.sprite.addChild(j.q.instance.prodigy.create.sprite(-1,33,Y._.General_pets_json,`${k}/walk/legs-0`)),this.sprite.y=-this.body.height-this.legs.height,this.sprite.x=-Math.floor(this.body.width/2),this.setupWalk(k),this.setupStand(k)}createSparkleDog(k){this.tail=this.sprite.addChild(j.q.instance.prodigy.create.sprite(-12,9,Y._.General_pets_json,`${k}/walk/tail-0`)),this.tail._defaultVisibility={walk:!0,stand:!1},this.body=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0,0,Y._.General_pets_json,`${k}/walk/body-0`)),this.body._defaults={walk:[0,0],stand:[-12,0]},this.legs=this.sprite.addChild(j.q.instance.prodigy.create.sprite(-1,33,Y._.General_pets_json,`${k}/walk/legs-0`)),this.legs._defaultVisibility={walk:!0,stand:!1},this.sprite.y=-this.body.height-this.legs.height,this.sprite.x=-Math.floor(.5*this.body.width),this.setupWalk(k);const B=`${k}/idle/`;this.standTween=[],this.standTween.push(new K.s(this.body)),this.standTween[0].set("frameName",[`${B}body-0`,`${B}body-1`,`${B}body-2`,`${B}body-3`],150,9999)}createRodent(k){this.body=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0,0,Y._.General_pets_json,`${k}/walk/body-0`)),this.legs=this.sprite.addChild(j.q.instance.prodigy.create.sprite(2,18,Y._.General_pets_json,`${k}/walk/legs-0`)),this.sprite.y=-this.body.height-this.legs.height,this.sprite.x=-Math.floor(this.body.width/2),this.setupWalk(k),this.setupStand(k)}createSparkleRodent(k){this.body=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0,0,Y._.General_pets_json,`${k}/walk/body-0`)),this.sprite.y=-this.body.height,this.sprite.x=-Math.floor(.5*this.body.width);const B=`${k}/walk/`;this.walkTween=[],this.walkTween.push(new K.s(this.body)),this.walkTween[0].set("frameName",[`${B}body-0`,`${B}body-1`,`${B}body-2`,`${B}body-3`],150,9999);const U=`${k}/idle/`;this.standTween=[],this.standTween.push(new K.s(this.body)),this.standTween[0].set("frameName",[`${U}body-0`,`${U}body-1`,`${U}body-2`,`${U}body-3`],150,9999)}createBird(k){const B=F.Aq$.isDefined(this.itemData.numWalkAnimFrames)?this.itemData.numWalkAnimFrames:4;this.body=this.sprite.addChild(j.q.instance.prodigy.create.sprite(0,0,Y._.General_pets_json,`${k}/walk/body-0`)),this.sprite.y=-this.body.height-30,this.sprite.x=-Math.floor(this.body.width/2);const U=`${k}/walk/`;this.walkTween=[],this.walkTween.push(new K.s(this.body));const G=[];for(let F=0;F0){this.standTween.push(new K.s(this.body)),this.standTween.push(new K.s(this.tail));for(let k=0;k{"use strict";U.d(B,{Z:()=>W});var F=U(62459),G=U(35120),j=U(99625),$=U(42113),H=U(24110),V=U(98623);class W extends V.H{constructor(k,B,U=0,V=0){super(k,B,U,V);G.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(j.l.LeaderboardView).then((k=>{const B=new F._mx;B.addComponent(F.dLy),B.addComponent(H.B).getRootContainer().setParent(this),B.addChild(k),this._leaderboardPrefab=k,this._leaderboardDataProvider=k.findComponent($.O),this._lastLeaderboardRefresh=Date.now()})).catch(F.RQr.createHandler("Could not load leaderboards"))}destroy(){var k;null===(k=this._leaderboardPrefab)||void 0===k||k.destroy(),super.destroy()}update(){var k;super.update(),this._lastLeaderboardRefresh+W.REFRESH_TIMEOUT_MS{"use strict";U.d(B,{R:()=>q});var F=U(62459),G=U(35120),j=U(29738),$=U(84938),H=U(79825),V=U(57750),W=U(17425);class q{static isAudioSprite(k){return F.Aq$.isDefined(k.s)&&F.Aq$.isDefined(k.d)||F.Aq$.isDefined(k.dataTag)&&F.Aq$.isDefined(k.soundId)}static isLegacyAudioSprite(k){return F.Aq$.isDefined(k.s)&&F.Aq$.isDefined(k.d)}constructor(k){this.game=null,this.currentBgm=null,this.autoplay=!0,this.currentVoice=null,this._doNotResume=!1,this.game=k;let B=null,U=null;void 0!==document.hidden?(B="hidden",U="visibilitychange"):void 0!==document.msHidden?(B="msHidden",U="msvisibilitychange"):void 0!==document.webkitHidden?(B="webkitHidden",U="webkitvisibilitychange"):void 0!==document.mozHidden&&(B="mozHidden",U="mozvisibilitychange"),null!==B&&document.addEventListener(U,this.onVisibilityChanged.bind(this,B)),$.B.musicVolume.onChanged.add(this.setBGMVolume,this)}clearOldSounds(){let k=this.game.sound.sounds.length-1;for(;k>=0;){const B=this.game.sound.sounds[k];B&&!B.isDestroyed&&!B[V.k.DESTROYED]&&B.isPlaying||this.game.sound.sounds.splice(k,1),k--}}playSFX(k,B,U=null,j=1,H=!1,V){var q;this.clearOldSounds();const K=W.K.getAssetID("sfx",k),z=null===(q=G.q.instance.prodigy.assets.getAsset(K))||void 0===q?void 0:q.data;if(!z)return F.VyI.log(`Could not find ${K} in assets, so cannot play the sfx.`,F.$bb.Warning),null==U||U(),null;const Y=z.clips[B],Q=(null!=V?V:$.B.effectVolume.value)*j,X=this.game.cache.getSound(K);return X?(X.addMarker("play",Y.s,Y.d),X.playMarker("play",0,Q,H,void 0,U),X):(F.VyI.log(`Could not play sfx-${k} as it was not in the cache.`,F.$bb.Warning),null==U||U(),null)}playSFXFromGUID(k,B=null,U=0,F=-1,G=!1){this.clearOldSounds();const j=$.B.effectVolume.value,H=this.game.sound.add(k,j);let V;return H&&!H.isDestroyed&&H.sound&&null!==H.sound.instances?(V=!1,this.setupMarker(H,B,U,F,j,G)):(V=!0,this.logSoundError(H,"sound effect")),V&&B&&this.game.time.events.addTimer(1,B,this),H}playSound(k,B=!1,U){const G=F.o5U.getIOSVersion();this.clearOldSounds();const j=null!=U?U:$.B.effectVolume.value,H=W.K.getAssetID("sfx",k),V=this.game.cache.getSound(H);return V?(V.addMarker("play",0,V.duration),V.playMarker("play",0,j,B&&(null===G||G>9))):F.VyI.log(`Could not play sfx-${k} as it was not in the cache.`,F.$bb.Warning),V}playBGM(k,B){var U;const G=F.o5U.getIOSVersion();if(null!==G&&G<=9)return;const j=W.K.getAssetID("bgm",k);if(this.currentBgm&&W.K.matchingAssets(this.currentBgm.key,j))return;null===(U=this.currentBgm)||void 0===U||U.stop(),this.clearOldSounds();const H=this.game.cache.getSound(j);H?(H.singleInstance=!0,this.currentBgm=H,this.currentBgm.playWithOptions({start:0,volume:$.B.musicVolume.value,loop:B})):F.VyI.log(`Background music not found in cache: ${j}`,F.$bb.Error)}pauseBGM(){var k;null===(k=this.currentBgm)||void 0===k||k.pause()}resumeBGM(){var k;null===(k=this.currentBgm)||void 0===k||k.resume()}setBGMVolume(k){var B,U;(null===(U=null===(B=this.currentBgm)||void 0===B?void 0:B.instances)||void 0===U?void 0:U[0])&&(this.currentBgm.instances[0].volume=k)}playDialogue(k,B=(()=>null)){var U;if(this.clearOldSounds(),!j.O.isEnglishLocale())return F.VyI.log(`Skipping dialogue ${k.tag} because it is not localized`,F.$bb.Info),F.Egh.timeout(q.FAKE_DIALOGUE_DURATION_MS).finally((()=>null==B?void 0:B())).catch((()=>F.RQr.createHandler("[AudioController] Error with dialogue timeout"))),null;null===(U=this.currentVoice)||void 0===U||U.stop(),this._bgmLens&&(this._bgmLens.remove(),this._bgmLens=void 0);const G=$.B.voiceVolume.value,H=this.game.sound.add(k.tag,G);if(H&&!H.isDestroyed&&H.sound&&null!==H.sound.instances){this.currentBgm&&G>0&&(this._bgmLens=$.B.musicVolume.addSmoothedLensMultiplier(.25)),q.isAudioSprite(k)?q.isLegacyAudioSprite(k)?this.setupMarker(H,B,k.s,k.d,G):this.playAudioSprite(H,k,G,B):this.setupMarker(H,B,0,H.duration,G),this.currentVoice=H;const U=()=>{this._bgmLens&&(this._bgmLens.remove(),this._bgmLens=void 0),this.currentVoice=null};this.currentVoice.onStop.add(U,this),this.currentVoice.onComplete.add(U,this)}else this.logSoundError(H,"voice"),this.game.time.events.addTimer(1,B,this);return H}playVoice(k,B,U=0,F=-1){return this.playDialogue({tag:k,s:U,d:F},B)}stopVoice(){this.currentVoice&&(this.currentVoice.destroy(),this.currentVoice=null),this._bgmLens&&(this._bgmLens.remove(),this._bgmLens=void 0)}onVisibilityChanged(k){(F.o5U.isIOS()||F.o5U.isAndroid())&&(document[k]?(this._doNotResume=this.currentBgm&&!this.currentBgm.isPlaying,this.pauseBGM(),this.currentVoice&&this.currentVoice.pause()):(this._doNotResume?this._doNotResume=!1:this.resumeBGM(),this.currentVoice&&this.currentVoice.resume()))}isVoicePlaying(k){return this.currentVoice&&!this.currentVoice.isDestroyed&&this.currentVoice.isPlaying&&W.K.matchingAssets(this.currentVoice.key,k)}playAudioSprite(k,B,U,G=(()=>null)){var j;if(!k.sprites.hasOwnProperty(B.soundId)){const U=this.game.cache.getJSON(B.dataTag);if(!(null===(j=null==U?void 0:U.spritemap)||void 0===j?void 0:j.hasOwnProperty(B.soundId)))return F.VyI.log(`Could not play audio sprite ${B.soundId}, failed to load sprite data JSON`,F.$bb.Error),void G();k.addSprites(U.spritemap)}k.volume=U,k.play(B.soundId,G)}setupMarker(k,B,U,F,G,j){k.volume=G;const $=-1!==F?F:k.duration;k.addMarker("play",U,$),k.playMarker("play",0,G,j,void 0,B)}logSoundError(k,B){k?k.isDestroyed?F.VyI.log(`Cannot play ${B} because sound has been destroyed`,F.$bb.Error):k.sound?k.sound.instances||F.VyI.log(`Cannot play ${B} because pixi sound has been destroyed`,F.$bb.Error):F.VyI.log(`Cannot play ${B} because pixi sound has not been set`,F.$bb.Error):F.VyI.log(`Cannot play ${B} because sound does not exist`,F.$bb.Error)}isBGMPlaying(k){return this.currentBgm&&!this.currentBgm.isDestroyed&&this.currentBgm.isPlaying&&W.K.matchingAssets(this.currentBgm.key,k)}getVolumeForType(k){switch(k){case H.h.Sfx:return $.B.effectVolume.value;case H.h.Bgm:case H.h.BgmSfx:return $.B.musicVolume.value;case H.h.VoiceClip:return $.B.voiceVolume.value;default:return F.VyI.log(`Invalid AudioType. Cannot get volume for type ${k}.`,F.$bb.Error),0}}}q.FAKE_DIALOGUE_DURATION_MS=2e3},36279:(k,B,U)=>{"use strict";U.d(B,{g:()=>F});class F{constructor(){this.startTime=F.INVALID_TIME,this.endTime=F.INVALID_TIME,this.type="",this.energy=0,this.energyCost=0,this.turnsRemaining=1,this.battleCustomMeta={},this.startHealth=0,this.endHealth=0,this.pets=[],this.spellsCast=0,this.spellsFailed=0,this.enemySpellsCast=0,this.enemySpellsCastFail=0,this.epicAttack=null,this.consumablesUsed=[],this.petsRescued=[],this.rescuesSuccessful=[],this.spellEnergyCost=null}}F.INVALID_TIME=-1},42749:(k,B,U)=>{"use strict";U.d(B,{m:()=>Y});var F=U(37692),G=U(62459),j=U(95891),$=U(68910),H=U(35120),V=U(9591),W=U(18741),q=U(77938),K=U(8770),z=U(17425);class Y{constructor(k){this.game=null,this.baseDictionary={},this.isBaseReady={},this.isColorReady={},this.baseColor=[],this.newColor=[],this.game=k}static useFilter(k){return k.renderer.type===$.RENDERER_TYPE.WEBGL&&k.renderer.context.webGLVersion>1}getColorReplacedSprite(k,B,U,F=2){Y.useFilter(this.game)?this.getColorReplacedSpriteGL(k,B,U):this.checkColorAsset(k,B,F,(F=>{H.q.instance.prodigy.create.sprite(0,0,this.generateAssetName(k,B),0,null,(k=>{U(k)}))}))}getColorReplacedSpriteGL(k,B,U){let j=[];for(let F=0;F{const B=new F.N(j);B.resolution=$.settings.RESOLUTION,k.filters=[B],k.smoothed=!1;const G=$.RenderTexture.create({width:k.width,height:k.height});this.game.renderer.render(k,{renderTexture:G});const V=H.q.instance.prodigy.create.sprite(0,0);V.texture=G,U(V)}))}checkColorAsset(k,B,U,F){const j=this.generateAssetName(k,B);let $=G.Aq$.isDefined(this.isColorReady[j]);if($&&(this.isColorReady[j].ready?this.game.cache.checkImageKey(j)?this.safeCallback(F,j):$=!1:this.isColorReady[j].callbacks.push(F)),!$){let $=G.Aq$.isDefined(this.isBaseReady[k]);$&&(this.isBaseReady[k].ready?this.game.cache.checkImageKey(k)?(this.isColorReady[j]={ready:!1,callbacks:[F]},this.generateNewColor(k,B,j,U)):$=!1:this.isBaseReady[k].callbacks.push({colorReplaceData:B,callback:F})),$||(this.isBaseReady[k]={ready:!1,callbacks:[{colorReplaceData:B,callback:F}]},H.q.instance.prodigy.create.sprite(0,0,k,0,null,this.onBaseColorReady.bind(this,k,U)))}}clearCache(k=!1){k?(this.isColorReady={},this.isBaseReady={}):(this.clearEntries(this.isColorReady),this.clearEntries(this.isBaseReady))}clearEntries(k){for(const B of Object.keys(k))k[B].ready&&!this.game.cache.checkImageKey(B)&&delete k[B]}generateAssetName(k,B){let U=k;for(let F=0;F0;){const k=this.isBaseReady[U.key].callbacks.pop(),F=this.generateAssetName(U.key,k.colorReplaceData);G.Aq$.isDefined(this.isColorReady[F])?this.isColorReady[F].ready?this.safeCallback(k.callback,F):this.isColorReady[F].callbacks.push(k.callback):(this.isColorReady[F]={ready:!1,callbacks:[k.callback]},this.generateNewColor(U.key,k.colorReplaceData,F,B))}else for(this.isBaseReady[k].ready=!0,this.baseDictionary[k]=U;this.isBaseReady[k].callbacks.length>0;){const B=this.isBaseReady[k].callbacks.pop(),U=this.generateAssetName(k,B.colorReplaceData);this.safeCallback(B.callback,U)}}pixelColorReplace(k){const B=j.findIndex(this.baseColor,(B=>k.r===B[0]&&k.g===B[1]&&k.b===B[2]));return B>-1?Object.assign(Object.assign({},k),{r:this.newColor[B][0],g:this.newColor[B][1],b:this.newColor[B][2]}):k}generateNewColor(k,B,U,F){const j=new V.w(this.game,null,this.baseDictionary[k].width,this.baseDictionary[k].height);j.draw(this.baseDictionary[k]),j.update();let $=[],H=[];for(let V=0;V=0;G--)$[G][0]===H[G][0]&&$[G][1]===H[G][1]&&$[G][2]===H[G][2]&&($.splice(G,1),H.splice(G,1));this.baseColor=$,this.newColor=H,j.processPixelRGB(this.pixelColorReplace,this),j.generateTexture(U,this.textureGenerated.bind(this,k,U,j,F))}textureGenerated(k,B,U,F,j){const $=this.game.cache.getFrameData(k);if($&&this.game.cache.addTextureAtlas(B,j,$),2===F?z.K.cacheAsset(this.game,B,z.K.zoneAssetsCached):1===F&&z.K.cacheAsset(this.game,B,z.K.commonAssetsCached),H.q.instance.prodigy.assets.assignAssets({[B]:{type:"singleImage",v:1}}),U.clear(),W.f.removeByCanvas(U.canvas),U.destroy(),this.isColorReady[B].callbacks){const k=this.isColorReady[B].callbacks;for(let U=0;U{"use strict";U.d(B,{Z:()=>H});var F=U(62459),G=U(95891),j=U(35757),$=U(43531);class H extends $.rD{constructor(){super(...arguments),this.menuLayer=void 0}startDeprecated(k,B,U,$,H,V=!0,W=!0){var q,K;const z={type:H,windowPosition:$,blockInput:!B};for(let Y=0;Yvoid 0!==k));this.start(!B,U,V,W)}setText(k,B=null,U=null){if(isNaN(k)){const B=k,U={legacyData:{index:B.index,face:B.face,audio:B.audio},text:B.text,yes:B.yes,no:B.no,callback:B.callback,hideNext:B.hideNext,type:B.type,preserveNextEvent:B.preserveNextEvent};this.addEvents([U])}else{const F={legacyData:{index:k},yes:B,no:U};this.addEvents([F])}}}},43531:(k,B,U)=>{"use strict";U.d(B,{DG:()=>F,fA:()=>G,rD:()=>Q});var F,G,j=U(8674),$=U(62459),H=U(79687),V=U(35120),W=U(51477),q=U(29738),K=U(35757),z=U(73797),Y=U(8872);!function(k){k[k.Top=0]="Top",k[k.Middle=1]="Middle",k[k.Bottom=2]="Bottom"}(F||(F={})),function(k){k[k.DEFAULT=0]="DEFAULT",k[k.STORE=1]="STORE",k[k.WHEEL=2]="WHEEL",k[k.EQUIP=3]="EQUIP",k[k.START=4]="START",k[k.FOLLOW=5]="FOLLOW",k[k.LEAVE=6]="LEAVE",k[k.CHANGE=7]="CHANGE",k[k.CURRENCY=8]="CURRENCY"}(G||(G={}));let Q=class{set skipCounter(k){this._skipCounter=k}get skipCounter(){return this._skipCounter}constructor(k=V.q.instance.game){this.game=null,this._onClose=[],this.onAdvance=new $.HN0,this.onComplete=new $.HN0,this.eventQueue=[],this.dataProvider=null,this.current=null,this.currentDialogue=null,this._skipCounter=0,this._previousDialogueAudioTag=null,this._reenableInputOnClose=!0,this.game=k,this.dataProvider=new K.u}addEvents(k){this.eventQueue.push(...k)}setParent(k){this._dialogueParent=k,this.currentDialogue&&k.addChild(this.currentDialogue)}start(k=!1,B,U=!0,F=!0){this.currentDialogue?this._previousDialogueAudioTag=this.currentDialogue.dialogueConfig.dialogueData?this.currentDialogue.dialogueConfig.dialogueData.audio.tag:null:(this._previousDialogueAudioTag=null,this.game.input.enabled=!k),F&&this.closeDialogue(!1),B&&this._onClose.push(B),this._reenableInputOnClose=U,V.q.instance.prodigy.notifications.pause(this),this.currentDialogue||this.next()}next(){var k;if(this.eventQueue.length>0){if(this.current=this.eventQueue.splice(0,this.skipCounter+1)[this.skipCounter],this.skipCounter=0,Object.keys(this.current).length>0)if($.Aq$.isDefined(this.current.callback))0===this.eventQueue.length?(this.close(!1,!0),this.onComplete.dispatch(),this.current.callback()):(this.current.callback(),this.next());else{const B=[];if($.Aq$.isDefined(this.current.dialogueData)&&(q.O.isEnglishLocale()&&B.push(this.current.dialogueData.audio.tag),B.push(this.current.dialogueData.avatar.atlas),Y.R.isAudioSprite(this.current.dialogueData.audio)&&!Y.R.isLegacyAudioSprite(this.current.dialogueData.audio)&&q.O.isEnglishLocale()&&B.push(this.current.dialogueData.audio.dataTag)),$.Aq$.isDefined(this.currentDialogue)&&this.currentDialogue.game)this.currentDialogue.updateSchema(this.current,B),this.onAdvance.dispatch();else if(this.currentDialogue=V.q.instance.prodigy.open.characterDialogue(this.current,this.next.bind(this),B),null===(k=this._dialogueParent)||void 0===k||k.addChild(this.currentDialogue),$.Aq$.isDefined(this._previousDialogueAudioTag)&&(!this.currentDialogue.dialogueConfig.dialogueData||this.currentDialogue.dialogueConfig.dialogueData.audio.tag!==this._previousDialogueAudioTag)){const k=this.game.cache.getSound(this._previousDialogueAudioTag);(null==k?void 0:k.sound)&&!k.isDecoding&&this.game.cache.removeSound(this._previousDialogueAudioTag),this._previousDialogueAudioTag=null}}}else this.close(!1,!0),this.onComplete.dispatch()}closeDialogue(k=!1){if(this.game.input.enabled||(this.game.input.enabled=this._reenableInputOnClose),$.Aq$.isDefined(this.currentDialogue)){if(k&&this.currentDialogue.dialogueConfig.dialogueData&&""!==this.currentDialogue.dialogueConfig.dialogueData.audio.tag){const k=this.game.cache.getSound(this.currentDialogue.dialogueConfig.dialogueData.audio.tag);(null==k?void 0:k.sound)&&!k.isDecoding&&this.game.cache.removeSound(this.currentDialogue.dialogueConfig.dialogueData.audio.tag)}this.currentDialogue.close(),this.currentDialogue=null}}close(k=!1,B=!1){this.closeDialogue(B),this.eventQueue=[],this._dialogueParent=void 0;const U=[...this._onClose];this._onClose=[],k||U.forEach((k=>k())),V.q.instance.game.broadcaster.broadcast(z.n8.DialogClosed),V.q.instance.prodigy.notifications.resume(this)}static shouldLoadDialogueAudio(){return q.O.isEnglishLocale()}static runDialogueSequence(k,B,U=!0,F=!0){const G=V.q.instance.prodigy.gameContainer.get("b5b-6fa4");return G.addEvents(k.map((k=>"number"==typeof k?{dialogueData:G.dataProvider.get(k),blockInput:!0}:k.id?Object.assign({dialogueData:G.dataProvider.get(k.id),blockInput:!0},k):k))),G.start(!0,B,U,F),G}isDialogueInProgress(){return this.eventQueue.length>0}};Q=(0,j.Cg)([(0,H.injectable)(),(0,j.Sn)("design:paramtypes",[W.n])],Q)},19586:(k,B,U)=>{"use strict";var F;U.d(B,{_:()=>F}),function(k){k[k.DEFAULT=0]="DEFAULT",k[k.ACHIEVEMENTS=1]="ACHIEVEMENTS",k[k.ITEMRARE=2]="ITEMRARE",k[k.MEMBERSHIP=3]="MEMBERSHIP",k[k.STOREPURCHASE=4]="STOREPURCHASE",k[k.MEMBERBOX=5]="MEMBERBOX",k[k.PARENTREWARD=6]="PARENTREWARD",k[k.ITEMGENERIC=7]="ITEMGENERIC",k[k.LAMPLIGHTPURCHASE=8]="LAMPLIGHTPURCHASE",k[k.ITEMWHEEL=9]="ITEMWHEEL",k[k.QUESTIONSANSWERED=10]="QUESTIONSANSWERED",k[k.NAMECHANGE=13]="NAMECHANGE",k[k.BATTLEPASSQUESTGOALCOMPLETED=15]="BATTLEPASSQUESTGOALCOMPLETED",k[k.CHARGEDLEVELFREEZECOUNTDOWN=17]="CHARGEDLEVELFREEZECOUNTDOWN",k[k.FESTIVALQUESTGOALCOMPLETED=18]="FESTIVALQUESTGOALCOMPLETED"}(F||(F={}))},95373:(k,B,U)=>{"use strict";U.d(B,{u:()=>$});var F=U(62459),G=U(68910),j=U(23082);class ${constructor(k,B,U){this.waitingToFollowDelay=0,this.lastTargetPosition=new G.Point,this.game=k,this.source=B,B.onTargetStopped.add(this.targetStopped,this),B.onDestroy.addOnce(this.handleDestroy,this),this.target=U,U.onPathFound.add(this.targetMoving,this),U.onStopped.add(this.targetStopped,this)}handleDestroy(){this.source.onTargetStopped.remove(this.targetStopped,this),this.target.onPathFound.remove(this.targetMoving,this),this.target.onStopped.remove(this.targetStopped,this)}update(){const k=this.source.getPosition(),B=F.cj9.distance(k.x,k.y,this.target.position.x,this.target.position.y);if(this.waitingToFollowDelay>1)--this.waitingToFollowDelay;else if(this.waitingToFollowDelay>0)if(F.Aq$.isDefined(this.queuedPath)&&this.queuedPath.length>=3){const U=new F.I9Y(this.target.position.x-k.x,this.target.position.y-k.y),G=new F.I9Y(this.target.position.x-this.lastTargetPosition.x,this.target.position.y-this.lastTargetPosition.y);if(G.getMagnitudeSq()<=0){const k=new F.I9Y(this.queuedPath[this.queuedPath.length-2].x,this.queuedPath[this.queuedPath.length-2].y),B=new F.I9Y(this.queuedPath[this.queuedPath.length-3].x,this.queuedPath[this.queuedPath.length-3].y);G.set(B.x-k.x,B.y-k.y)}const H=B>this.lastTargetDistance||G.dot(U)>0;if((B>$.MAX_FOLLOW_DISTANCE||this.source.isMoving())&&H){const B=new F.I9Y(this.queuedPath[0].x,this.queuedPath[0].y);if(F.cj9.distance(B.x,B.y,k.x,k.y)>$.MAX_FOLLOW_DISTANCE){const k=this.game.state.get(j.G.TileScreen),B=this.getPointNearPathEnd(this.queuedPath,$.MIN_FOLLOW_DISTANCE);F.Aq$.isDefined(k)&&F.Aq$.isDefined(B)&&this.source.pathTo(new F.I9Y(B.x,B.y))}this.queuedPath=null,this.waitingToFollowDelay=0}else this.stop()}else this.stop(),this.waitingToFollowDelay=0;this.lastTargetPosition=this.target.position,this.lastTargetDistance=B}targetMoving(k){const B=this.source.getPosition();this.queuedPath=k.concat({x:this.target.x,y:this.target.y},{x:B.x,y:B.y}),this.waitingToFollowDelay=2}targetStopped(){this.queuedPath=null,this.waitingToFollowDelay=2}stop(){this.source.stopMoving()}getPointNearPathEnd(k,B,U){if(!F.Aq$.isDefined(k))return null;const G=F.Aq$.isDefined(U)?U:0;if(G>k.length-2)return null;const j=new F.I9Y(k[G].x,k[G].y),$=new F.I9Y(k[G+1].x,k[G+1].y),H=F.cj9.distance(j.x,j.y,$.x,$.y);if(H{"use strict";U.d(B,{b:()=>V});var F=U(62459),G=U(5491),j=U(35120),$=U(39984),H=U(55122);class V{constructor(){const k=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player;F.Aq$.isDefined(k.data.storedMemberStars)||(k.data.storedMemberStars=0),F.Aq$.isDefined(k.data.memberStarsExpirationDate)||(k.data.memberStarsExpirationDate=this.getNextExpirationDate().getTime())}getNextExpirationDate(){const k=new Date(Date.now()),B=new Date(Date.now());return 0!==k.getDay()&&B.setDate(k.getDate()+(7-k.getDay())),B.setSeconds(59),B.setMinutes(59),B.setHours(23),B.setMilliseconds(0),B}hasExpired(){return!1}storeMemberStars(k){const B=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player;B.data.storedMemberStars+=k,B.data.memberStarsExpirationDate=this.getNextExpirationDate().getTime(),this.sendStarJarUpdate(B,"Items Added")}claimStarJar(){var k;const B=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.sendStarJarUpdate(B,"Items Claimed");const U=null!==(k=B.data.storedMemberStars)&&void 0!==k?k:0;return B.data.storedMemberStars=0,U}doLoseStars(){if(!this.hasExpired())return!1;const k=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return this.sendStarJarUpdate(k,"Jar Refreshed"),k.data.storedMemberStars=0,k.data.memberStarsExpirationDate=this.getNextExpirationDate().getTime(),!0}getNumberOfLevels(k){const B=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=B.getStars(),F=B.getLevel(),V=B.data.storedMemberStars/k;return $.e.levelFromStars(U+V,G.V.Player,H.s.activePlayerLevelCap)-F}getNumberOfStoredStars(){let k=0;const B=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return F.Aq$.isDefined(B.data.storedMemberStars)&&(k=B.data.storedMemberStars),k}getStarJarTier(){return this.calculateStarJarTier(this.getNumberOfStoredStars())}calculateStarJarTier(k){return k>90?4:k>60?3:k>30?2:k>1?1:0}updateExpirationDate(){j.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.memberStarsExpirationDate=this.getNextExpirationDate().getTime()}sendStarJarUpdate(k,B){}}},26657:(k,B,U)=>{"use strict";U.d(B,{s:()=>G});var F=U(62459);class G{constructor(k){this.current=null,this.noSkipFrames=!1,this.tweens=[],this.tweenVars={},this.onEndCallbacks=[],this.index=0,this.src=k}start(k,B,U){this.current=null,this.index=0,this.startTime=F.Aq$.isDefined(k)?k:Date.now();for(let F=0;F=this.tweenVars.next){this.tweenVars.next+=this.current.delay;for(let k=0;k=this.current.end&&(this.current=null,F.Aq$.isDefined(this.onComplete)&&this.onComplete())}else{if(this.current){const B=Math.floor((k-this.current.start)/this.current.delay)*this.current.delay+this.current.start,U=k-this.current.delay,G=U-this.current.lastUpdate>this.current.delay;if(!this.noSkipFrames&&U<=this.current.lastUpdate||G)return"set"!==this.current.type||F.Aq$.isDefined(this.tweenVars.next)||(this.tweenVars.next=this.current.start+this.current.delay,this.tweenVars.frame=0,this.src[this.current.tag]=this.current.frames[0]),G&&(this.current.lastUpdate=B),null;if(this.current.lastUpdate=B,"set"===this.current.type)if(F.Aq$.isDefined(this.tweenVars.next)||(this.tweenVars.next=this.current.start+this.current.delay,this.tweenVars.frame=0,this.src[this.current.tag]=this.current.frames[0]),k>=this.current.end)this.src[this.current.tag]=this.current.frames[this.current.frames.length-1];else if(k>=this.tweenVars.next){if(this.tweenVars.next+=this.current.delay,this.tweenVars.frame++,this.tweenVars.frame>=this.current.frames.length){this.tweenVars.frame=0;for(let k=0;k=this.current.end&&(this.current=null,F.Aq$.isDefined(this.onComplete)&&this.onComplete())}this.current||(this.tweenVars={},this.index>=this.tweens.length?this.startTime=null:(this.current=this.tweens[this.index],this.index++))}}}},16051:(k,B,U)=>{"use strict";U.d(B,{c:()=>$});var F=U(24521),G=U(35120),j=U(23029);class ${static get instance(){return this._instance||(this._instance=new $),this._instance}constructor(){this._petXPBoostData=null,this._isPetXPBoostDataEmpty=!0,this.areRequirementsMet()&&(this._petXPBoostData=j.R.loadData(F.r.PetXPBoostData_json)),this._isPetXPBoostDataEmpty=!this._petXPBoostData||!(Object.keys(this._petXPBoostData).length>0)}getBoostMultiplier(k=G.q.instance.prodigy.world.getCurrentZone()){if(this._isPetXPBoostDataEmpty)return 1;const B=this._petXPBoostData.zone.indexOf(k);return B<0?1:this._petXPBoostData.xpMultiplier[B]}getEligiblePetIDs(k=G.q.instance.prodigy.world.getCurrentZone()){if(this._isPetXPBoostDataEmpty)return null;const B=this._petXPBoostData.zone.indexOf(k);return B<0?null:this._petXPBoostData.petIDs[B]}isPlayerZoneEligible(k=G.q.instance.prodigy.world.getCurrentZone()){if(this._isPetXPBoostDataEmpty)return!1;return!(this._petXPBoostData.zone.indexOf(k)<0)}getFtueData(k=G.q.instance.prodigy.world.getCurrentZone()){if(this._isPetXPBoostDataEmpty)return null;const B=this._petXPBoostData.zone.indexOf(k);return B<0?null:this._petXPBoostData.ftue[B]}getSecondPlusScreenData(k=G.q.instance.prodigy.world.getCurrentZone()){if(this._isPetXPBoostDataEmpty)return null;const B=this._petXPBoostData.zone.indexOf(k);return B<0?null:this._petXPBoostData.secondPlusScreen[B]}getResultsMenuText(k=G.q.instance.prodigy.world.getCurrentZone()){if(this._isPetXPBoostDataEmpty)return null;const B=this._petXPBoostData.zone.indexOf(k);return B<0?null:this._petXPBoostData.resultMenu[B]}getWizardWatchData(){return this._isPetXPBoostDataEmpty?null:this._petXPBoostData.wizardWatch}areRequirementsMet(){return G.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirementsDeprecated(52)}isPlayerQualified(k=G.q.instance.prodigy.world.getCurrentZone()){return this.isPlayerZoneEligible(k)&&this.areRequirementsMet()}}},9831:(k,B,U)=>{"use strict";var F;U.d(B,{V:()=>F}),function(k){k.singleImage="singleImage",k.spriteSheet="spritesheet",k.spine="spine",k.atlas="atlas"}(F||(F={}))},96216:(k,B,U)=>{"use strict";U.d(B,{M:()=>ht});var F,G=U(8674),j=U(62459),$=U(79687),H=U(95891),V=U(88022),W=U(99625),q=U(56942),K=U(35120),z=U(24190),Y=U(51477),Q=U(77938),X=U(84938),Z=U(73797),J=U(22637),tt=U(37854),et=U(99898),it=U(44977),st=U(16184),nt=U(1823),at=U(85515),rt=U(76945),ot=U(30441);let ht=F=class{constructor(k,B){this.game=k,this._prefabLoader=B}setSource(k){this.screen=k}cleanup(k){for(let B=0;B{H.destroy(),j.Aq$.isDefined($)&&$()})),j.Aq$.isDefined(F)&&(q.delay(F),W.delay(F)),q.start(),W.start(),q}characterImage(k,B,U){k.y-=150,k.anchor.set(.5,.5),k.scale.set(0,0),this.game.broadcaster.broadcast(Z.lc.AddChild,this.game,[k,at.E.OverlayLayer]);const F=this.game.add.tween(k.scale,this).to({y:1,x:1},800,j.GS3.Elastic.InOut),G=this.game.add.tween(k,this).to({y:"-=100"},1600,j.GS3.Quadratic.Out).to({alpha:0},200,j.GS3.Quadratic.Out);G.onTweenComplete.add((()=>{k.destroy(),j.Aq$.isDefined(U)&&U()})),j.Aq$.isDefined(B)&&(G.delay(B),F.delay(B)),G.start(),F.start()}chatBubble(k,B=13,U=100,F=!1,G=3e3){const j=new ot.R(this.game,k,0,-U,F,G);return j.setID(B),j}explode(k,B,U,F,G,$,H){const W=Math.ceil(U/80),q=Math.ceil(F/80),z=[];let Y,Q;for(let j=0;j{j.setLayer(null==F?void 0:F.layer,!0),j.findComponentInChildren(tt.v).playEffect(k,B,U,G)}))}confetti(k,B,U,F=this.screen.foregroundGameObject,G=0){this._prefabLoader.loadWithDependenciesFromGUID(W.l.Confetti,F).then((G=>{G.setLayer(null==F?void 0:F.layer,!0),G.findComponentInChildren(J.k).playEffect(k,B,U)}))}waterBalloon(k,B,U,F,G,j=this.screen.foregroundGameObject){this._prefabLoader.loadWithDependenciesFromGUID(W.l.WaterBalloon,j).then(($=>{$.setLayer(null==j?void 0:j.layer,!0),$.findComponentInChildren(nt.k,!0).playEffect(k,B,U,F,G)}))}paintBalloon(k,B,U,F,G,j=this.screen.foregroundGameObject){this._prefabLoader.loadWithDependenciesFromGUID(W.l.PaintBalloon,j).then(($=>{$.setLayer(null==j?void 0:j.layer,!0),$.findComponentInChildren(st.J,!0).playEffect(k,B,U,F,G)}))}projectile(k,B,U,F,$,H){return(0,G.sH)(this,arguments,void 0,(function*(k,B,U,F,G,$,H=this.screen.foregroundGameObject){var V,W;const K=q.Q[null===(W=null===(V=Q.t.getItem("fx",G).metadata.assets)||void 0===V?void 0:V.default)||void 0===W?void 0:W.assetKey],z=Q.t.getItem("fx",G).data.spineID,Y=yield"string"==typeof $?this._prefabLoader.loadWithDependenciesFromGUID($,H):this._prefabLoader.loadWithDependencies($,H);return new Promise((G=>Y.findComponent(j.v2j).setAsset(null!=K?K:`spine-${z}`,(()=>Y.findComponent(et.F).playEffect(k,B,U,F,null==H?void 0:H.layer,G)))))}))}fireworkFX(k,B,U,F,G=this.screen.foregroundGameObject,j=0){"string"==typeof U?this._prefabLoader.loadWithDependenciesFromGUID(U,G).then((U=>{U.findComponent(it.e).playEffect(k,B,null==G?void 0:G.layer,F)})):this._prefabLoader.loadWithDependencies(U,G).then((U=>{U.findComponent(it.e).playEffect(k,B,null==G?void 0:G.layer,F)}))}goldWork(k,B,U){const F=75*Math.random()+25,G=Math.random(),$=100*G-50,H=Math.floor(3*Math.random()+1),W=[];for(let j=1;j{q.destroy()})),Y.onTweenComplete.add(U)}fadeFlyingImage(k,B,U,F){const G=K.q.instance.prodigy.create.sprite(k,B,U,F);G.anchor.set(.5,.5),this.game.broadcaster.broadcast(Z.lc.AddChild,this.game,[G,at.E.OverlayLayer]);const $=this.game.add.tween(G,this).to({y:G.y-100},1300,j.GS3.Quadratic.Out).to({alpha:0},200,j.GS3.Quadratic.Out);$.onTweenComplete.add((()=>{G.visible=!1}),G),$.start()}spellLearned(k,B,U){let F=!1;const G=(k,G)=>{B.addChild(G),G.anchor.set(3,3),G.angle=60*k;const $=this.game.add.tween(G,this).to({angle:"+=1000"},3500,j.GS3.Linear.None).to({alpha:0},500,j.GS3.Linear.None);$.onTweenComplete.add((()=>{G.destroy(),j.Aq$.isDefined(U)&&!F&&(F=!0,U())})),$.start(),this.game.add.tween(G.anchor,this).to({x:.5,y:.5},1500,j.GS3.Linear.None).delay(2e3).to({x:5,y:5},500,j.GS3.Linear.None).start()};for(let j=0;j<6;j++)K.q.instance.prodigy.icon.createFromData(k,B.width/2,B.height/2,null,G.bind(this,j))}resizeContainer(k,B=0,U=800){this.game.add.tween(k.scale,this).to({x:B,y:B},U,j.GS3.Linear.None,!0)}static radialCloud(k,B,U,F,G,$,V,W){const q=new j.jlt(U,F,G);let z=8;const Y=()=>{--z,z<=0&&W()};for(let Q=0;Q{k&&k.destroy()})),W&&Z.onTweenComplete.add(Y)}}};ht.PVP=230,ht.MIDDLE=300,ht.BOTTOM=500,ht.BASE=600,ht.TOP=100,ht.SMALL=2,ht.MEDIUM=1,ht=F=(0,G.Cg)([(0,$.injectable)(),(0,G.Qj)(0,(0,$.inject)("51c-03a0")),(0,G.Qj)(1,(0,$.inject)("d0e-64fd")),(0,G.Sn)("design:paramtypes",[Y.n,j.wNP])],ht)},571:(k,B,U)=>{"use strict";U.d(B,{z:()=>Q});var F=U(8674),G=U(62459),j=U(68910),$=U(99625),H=U(35120),V=U(24110),W=U(53885),q=U(63068),K=U(80060),z=U(17002),Y=U(30226);class Q{static createPixiSpriteFromAppearanceData(k,B,U){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U,F={}){var $;const V=H.q.instance.prodigy.gameContainer.get("d0e-64fd"),W=yield K.d.loadWithInjectedValuesAndDependenciesFromGUID(V,B,null!==($=F.injectedValues)&&void 0!==$?$:{}).catch(G.RQr.createHandler("PlayerSpriteFactory: Error loading player prefab to generate sprite"));yield W.findComponentInChildren(q.n).fromPlayerAppearanceData(k),yield Y.J.waitForFrames(1);const Q=H.q.instance.game.renderer.generateTexture(W.findComponentInChildren(U).getRootContainer());W.destroy(),G.qFr.setSmoothed(Q,!0);const X=new j.Sprite(Q);return!1===F.trimTransparentPixels?X:z.f.trimTransparentPixels(X,H.q.instance.game.renderer)}))}static createHeadFromAppearanceData(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return Q.createPixiSpriteFromAppearanceData(Object.assign(Object.assign({},k),{outfit:null,weapon:null,boot:null}),$.l.MainPlayerIcon,W.u,B)}))}static createFullBodyFromAppearanceData(k,B){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U={}){const F=Object.assign(Object.assign({},U.injectedValues),{"377-3e7b":B});return Q.createPixiSpriteFromAppearanceData(k,$.l.RemotePlayer,V.B,Object.assign(Object.assign({},U),{injectedValues:F}))}))}}},95913:(k,B,U)=>{"use strict";U.d(B,{BV:()=>W,v4:()=>K});var F=U(87490),G=U(62459),j=U(95359),$=U(88022),H=U(35120),V=U(72162);const W={[j.IE.Defence]:"defense",[j.IE.Hp]:"health",[j.IE.Power]:"spell",[j.IE.Speed]:"dodge"},q={[F.EElementType.Astral]:"#F8E48F",[F.ELegacyElementType.Earth]:"#C7F28F",[F.EElementType.Fire]:"#FE9C8E",[F.EElementType.Ice]:"#EBFDFF",[F.ELegacyElementType.Mech]:"#CCE8EA",[F.EElementType.Neutral]:"#FFFFFF",[F.EElementType.Physical]:"#CCE8EA",[F.EElementType.Plant]:"#C7F28F",[F.EElementType.Shadow]:"#A581B0",[F.EElementType.Storm]:"#FFE71C",[F.EElementType.Water]:"#A4D4FF",[F.ELegacyElementType.Wizard]:"#F8E48F"};class K{static levelUp(k,B){return{type:V.m0.Text,text:H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("LEVEL_UP"),fill:"#FFF540",stroke:"#9C341A",strokeThickness:5,showSignal:k,hideSignal:B}}static chargeUp(k,B){return{type:V.m0.Text,text:H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("CHARGE_UP"),fill:"#FFF540",stroke:"#9C341A",strokeThickness:5,showSignal:k,hideSignal:B}}static battleStats(k,B,U){const F=[];return Object.keys(k).forEach((G=>{const j=this.battleStat(G,k[G],B,U);j&&F.push(j)})),F}static battleStat(k,B,U,F){return!k||B<=0?null:{type:V.m0.Stat,atlasGuid:$._.Ui_postbattle_json,atlasFrameName:W[k],statIncreaseAmount:B,showSignal:U,hideSignal:F}}static spell(k,B,U){return{fill:q[k.elementType],type:V.m0.SpellLearned,spellIcon:k.spellIcon,spellName:k.newSpellName,evolved:!1,showSignal:B,stroke:"#363636",strokeThickness:5}}}},72162:(k,B,U)=>{"use strict";U.d(B,{O6:()=>q,jk:()=>V,m0:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(80060),H=U(24110);var V,W;!function(k){k[k.Created=0]="Created",k[k.Entering=1]="Entering",k[k.Playing=2]="Playing",k[k.Exiting=3]="Exiting",k[k.Complete=4]="Complete"}(V||(V={})),function(k){k[k.Text=0]="Text",k[k.Stat=1]="Stat",k[k.SpellLearned=2]="SpellLearned"}(W||(W={}));class q{get currentState(){return this._currentState}get popupHeight(){return this._gameObject.findComponent(H.B).getRootContainer().height}constructor(k,B,U,F){this.onPopupStarted=new G.HN0,this.onEntranceComplete=new G.HN0,this.onPopupComplete=new G.HN0,this._prefabGuid=k,this._parent=B,this._x=U,this._y=F,this._prefabLoader=j.q.instance.prodigy.gameContainer.get("d0e-64fd")}init(){return(0,F.sH)(this,void 0,void 0,(function*(){this._gameObject=yield $.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGuid,this._injectablePropertiesDictionary),this._gameObject.parent=this._parent;this._gameObject.transform.setAnchoredPivotOffset(this._x,this._y);const k=this._gameObject.findComponentsInChildren(G.y4o).map((k=>k.getRootContainer()));for(const B of k)B.alpha=0;this._currentState=V.Created}))}playAnimation(k=0){const B={value:0},U=this._gameObject.findComponentsInChildren(G.y4o).map((k=>k.getRootContainer()));for(const F of U)F.alpha=0;this.onPopupStarted.dispatch(),this._tween=j.q.instance.game.add.tween(B,this).to({value:1},2e3,G.GS3.Quadratic.In,!0,k).onUpdateCallback((()=>{if(B.value<.2){this._currentState=V.Entering;for(const k of U)k.alpha=B.value/.2}else if(B.value>.8){this._currentState=V.Exiting;for(const k of U)k.alpha=(1-B.value)/.2}else{this._currentState!==V.Playing&&(this._currentState=V.Playing,this.onEntranceComplete.dispatch());for(const k of U)k.alpha=1}})),this._tween.onTweenComplete.addOnce((()=>{U.forEach((k=>{k.alpha=0})),this._currentState=V.Complete,this.onPopupComplete.dispatch()}))}setYPos(k){this._gameObject.transform.setPositionY(k)}getYPos(){return this._gameObject.transform.posY}tweenYPos(k,B,U=0){const F=null!=B?B:400,$=this.getYPos(),H={value:0};this._yPositionTween=j.q.instance.game.add.tween(H,this,!0).to({value:1},F,G.GS3.Quadratic.In,!0,U).onUpdateCallback((()=>{this._gameObject.transform.setPositionY(G.cj9.clampedLerp($,k,H.value))}))}cleanup(){j.q.instance.game.tweens.remove(this._tween),j.q.instance.game.tweens.remove(this._yPositionTween),this.onPopupStarted.dispose(),this.onEntranceComplete.dispose(),this.onPopupComplete.dispose(),this._gameObject.destroy()}}},67820:(k,B,U)=>{"use strict";U.r(B),U.d(B,{Boot:()=>hx});var F,G=U(8674),j=U(62459),$=U(95891),H=U.n($),V=U(68910),W=U(86663),q=U(88022),K=U(35120),z=U(29569),Y=U(64593),Q=U(87490),X=U(85855),Z=U(51742),J=U(56942),tt=U(79687);!function(k){k.StoreDataProvider="StoreDataProvider",k.CacheExpirationStrategy="CacheExpirationStrategy",k.CacheStorageStrategy="CacheStorageStrategy",k.DungeonDataProvider="DungeonDataProvider",k.SurveyDataProvider="SurveyDataProvider"}(F||(F={}));var et=U(2872),it=U(85933),st=U(96051);class nt extends st.B{constructor(){super(...arguments),this.seed=null,this.gridWidth=0,this.gridHeight=0,this.minCritPathLength=0,this.maxCritPathLength=0,this.monsterIDs=[],this.minEncounters=0,this.maxEncounters=0,this.monsterDrops=[],this.goldenPages=0,this.minPages=0,this.maxPages=0,this.battleDifficulty=3,this.extraPaths=null,this.normalRooms=[],this.monsterRooms=[],this.endRoom=null}setSeed(k){this.seed=k}getSeed(){return this.seed}setGridWidth(k){this.gridWidth=k}getGridWidth(){return this.gridWidth}setGridHeight(k){this.gridHeight=k}getGridHeight(){return this.gridHeight}setMinCritPathLength(k){this.minCritPathLength=k}getMinCritPathLength(){return this.minCritPathLength}setMaxCritPathLength(k){this.maxCritPathLength=k}getMaxCritPathLength(){return this.maxCritPathLength}setMonsterIDs(k){this.monsterIDs=k}getMonsterIDs(){return this.monsterIDs}setMinEncounters(k){this.minEncounters=k}getMinEncounters(){return this.minEncounters}setMaxEncounters(k){this.maxEncounters=k}getMaxEncounters(){return this.maxEncounters}setMonsterDrops(k){this.monsterDrops=k}getMonsterDrops(){return this.monsterDrops}setGoldenPages(k){this.goldenPages=k}getGoldenPages(){return this.goldenPages}setMinPages(k){this.minPages=k}getMinPages(){return this.minPages}setMaxPages(k){this.maxPages=k}getMaxPages(){return this.maxPages}setBattleDifficulty(k){this.battleDifficulty=k}getBattleDifficulty(){return this.battleDifficulty}setExtraPaths(k){this.extraPaths=k}getExtraPaths(){return this.extraPaths}setNormalRooms(k){this.normalRooms=k}getNormalRooms(){return this.normalRooms}setMonsterRooms(k){this.monsterRooms=k}getMonsterRooms(){return this.monsterRooms}setEndRoom(k){this.endRoom=k}getEndRoom(){return this.endRoom}isValid(){return this.gridWidth>0&&this.gridHeight>0&&this.minCritPathLength>0&&this.maxCritPathLength>0&&this.monsterIDs.length>0&&this.minEncounters>0&&this.maxEncounters>0&&this.monsterDrops.length>0&&(0,$.every)(this.monsterDrops,(k=>k.isValid()))&&this.goldenPages>0&&this.minPages>0&&this.maxPages>0&&this.normalRooms.length>0&&(0,$.every)(this.normalRooms,(k=>k.isValid()))&&this.monsterRooms.length>0&&(0,$.every)(this.monsterRooms,(k=>k.isValid()))&&null!==this.endRoom&&this.endRoom.isValid()}}class at extends st.B{constructor(){super(...arguments),this.type="",this.ID=0,this.quantity=0}setType(k){this.type=k}getType(){return this.type}setID(k){this.ID=k}getID(){return this.ID}setQuantity(k){this.quantity=k}getQuantity(){return this.quantity}isValid(){return this.ID>0&&this.quantity>0&&this.type.length>0}}class rt extends st.B{constructor(){super(...arguments),this.minLength=0,this.maxLength=0,this.minPaths=0,this.maxPaths=0}setMinLength(k){this.minLength=k}getMinLength(){return this.minLength}setMaxLength(k){this.maxLength=k}getMaxLength(){return this.maxLength}setMinPaths(k){this.minPaths=k}getMinPaths(){return this.minPaths}setMaxPaths(k){this.maxPaths=k}getMaxPaths(){return this.maxPaths}isValid(){return this.minLength>0&&this.maxLength>0&&this.minPaths>0&&this.maxPaths>0}}class ot extends st.B{constructor(){super(...arguments),this.tileMap="",this.fsmId=0}setTileMap(k){this.tileMap=k}getTileMap(){return this.tileMap}setFSM(k){this.fsmId=k}getFSM(){return this.fsmId}isValid(){return this.fsmId>0&&this.tileMap.length>0}}class ht extends it.z{deserialize(k){let B=new nt;return null!==k&&1===k.version&&(B.setSeed(k.seed),B.setGridWidth(k.gridWidth),B.setGridHeight(k.gridHeight),B.setMinCritPathLength(k.minCritPathLength),B.setMaxCritPathLength(k.maxCritPathLength),B.setMonsterIDs(k.monsterIDs),B.setMinEncounters(k.minEncounters),B.setMaxEncounters(k.maxEncounters),B.setMonsterDrops(it.z.deserializeCollection(k.monsterDrops,ht.deserializeMonstersDrop)),B.setGoldenPages(k.goldenPages),B.setMinPages(k.minPages),B.setMaxPages(k.maxPages),B.setBattleDifficulty(k.battleDifficulty),B.setExtraPaths(ht.deserializePath(k.extraPaths)),B.setNormalRooms(it.z.deserializeCollection(k.normalRooms,ht.deserializeRoom)),B.setMonsterRooms(it.z.deserializeCollection(k.monsterRooms,ht.deserializeRoom)),B.setEndRoom(ht.deserializeRoom(k.endRoom))),B.isValid()||(B=null),B}serialize(k){let B=null;return k.isValid()&&(B={version:1,seed:k.getSeed(),gridWidth:k.getGridWidth(),gridHeight:k.getGridHeight(),minCritPathLength:k.getMinCritPathLength(),maxCritPathLength:k.getMaxCritPathLength(),monsterIDs:k.getMonsterIDs(),minEncounters:k.getMinEncounters(),maxEncounters:k.getMaxEncounters(),monsterDrops:it.z.serializeCollection(k.getMonsterDrops(),ht.serializeMonstersDrop),goldenPages:k.getGoldenPages(),minPages:k.getMinPages(),maxPages:k.getMaxPages(),battleDifficulty:k.getBattleDifficulty(),extraPaths:ht.serializePath(k.getExtraPaths()),normalRooms:it.z.serializeCollection(k.getNormalRooms(),ht.serializeRoom),monsterRooms:it.z.serializeCollection(k.getMonsterRooms(),ht.serializeRoom),endRoom:ht.serializeRoom(k.getEndRoom())}),B}static deserializeMonstersDrop(k){const B=new at;return B.setID(k.ID),B.setType(k.type),B.setQuantity(k.N),B}static serializeMonstersDrop(k){return{type:k.getType(),ID:k.getID(),N:k.getQuantity()}}static deserializeRoom(k){const B=new ot;return B.setFSM(k.fsmId),B.setTileMap(k.tileMap),B}static serializeRoom(k){return{tileMap:k.getTileMap(),fsmId:k.getFSM()}}static deserializePath(k){const B=new rt;return B.setMinLength(k.minLength),B.setMaxLength(k.maxLength),B.setMinPaths(k.minPaths),B.setMaxPaths(k.maxPaths),B}static serializePath(k){return{minLength:k.getMinLength(),maxLength:k.getMaxLength(),minPaths:k.getMinPaths(),maxPaths:k.getMaxPaths()}}}let ct=class extends et.k{constructor(k){super(),this.dataProvider=null,this.container=null,this.dataProvider=k,this.container=new tt.Container,this.container.bind("v1").to(ht)}getDungeon(k){const B=this.dataProvider.getDungeon(k);return this.container.get(`v${B.version}`).deserialize(B)}};ct=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)(F.DungeonDataProvider)),(0,G.Sn)("design:paramtypes",[Object])],ct);var dt=U(84959),lt=U(76572);let ut=class{constructor(k){this.storageExpiration=null,this.storageExpiration=k}getValue(k){var B;return this.hasValue(k)&&!(null===(B=this.storageExpiration)||void 0===B?void 0:B.hasExpired(k))?this.retrieveValueFromStorage(k):null}invalidate(){var k;null===(k=this.storageExpiration)||void 0===k||k.invalidate()}storeValue(k,B){var U;null===(U=this.storageExpiration)||void 0===U||U.cacheItem(k),this.storeValueInStorage(k,B)}};ut=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)(F.CacheExpirationStrategy)),(0,G.Sn)("design:paramtypes",[Object])],ut);let ft=class{};ft=(0,G.Cg)([(0,tt.injectable)()],ft);class bt extends st.B{constructor(){super(...arguments),this.type=null,this.ID=-1,this.amount=1}getType(){return this.type}setType(k){this.type=k}getAmount(){return this.amount}setAmount(k){this.amount=k}getID(){return this.ID}setID(k){this.ID=k}isValid(){return this.ID>0&&this.amount>0&&null!==this.type&&this.type.length>0}}class pt extends st.B{constructor(){super(...arguments),this.name=null,this.pages=null,this.merchantAvatar=null,this.currencyType=null,this.currencyID=-1}getName(){return this.name}setName(k){this.name=k}getPages(){return this.pages}setPages(k){this.pages=k}getMerchantAvatar(){return this.merchantAvatar}setMerchantAvatar(k){this.merchantAvatar=k}getStoreCurrencyType(){return this.currencyType}setStoreCurrencyType(k){this.currencyType=k}getStoreCurrencyID(){return this.currencyID}setStoreCurrencyID(k){this.currencyID=k}isValid(){return null!==this.merchantAvatar&&this.merchantAvatar.isValid()&&null!==this.name&&this.name.length>0&&null!==this.currencyType&&this.currencyType.length>0&&this.currencyID>0&&null!==this.pages&&this.pages.length>0&&(0,$.every)(this.pages,(k=>k.isValid()))}}var vt,gt=U(12049);class mt extends st.B{constructor(){super(...arguments),this.tag=null,this.frame="",this.scale={x:1,y:1},this.position={x:0,y:0}}getAssetTag(){return this.tag}setAssetTag(k){this.tag=k}getAssetFrame(){return this.frame}setAssetFrame(k){this.frame=k}getScale(){return this.scale}setScale(k,B){this.scale.x=k,this.scale.y=B}getPosition(){return this.position}setPosition(k,B){this.position.x=k,this.position.y=B}isValid(){return null!==this.tag&&this.tag.length>0}}class yt extends st.B{constructor(){super(...arguments),this.itemType=null,this.itemID=-1,this.topText=null,this.bottomText=null}getItemType(){return this.itemType}setItemType(k){this.itemType=k}getItemID(){return this.itemID}setItemID(k){this.itemID=k}getTopText(){return this.topText}setTopText(k){this.topText=k}getBottomText(){return this.bottomText}setBottomText(k){this.bottomText=k}isValid(){return null!==this.itemType&&this.itemType.length>0&&this.itemID>0}}class _t extends st.B{constructor(){super(...arguments),this.button=null,this.items=null}getButton(){return this.button}setButton(k){this.button=k}isDefault(){return this.isDefaultTab}setIsDefault(k){this.isDefaultTab=k}getStoreItems(){return this.items}setStoreItems(k){this.items=k}isValid(){return null!==this.button&&this.button.isValid()&&null!==this.items&&this.items.length>0&&(0,$.every)(this.items,(k=>k.isValid()))}}let Et=vt=class extends it.z{deserialize(k){let B=new pt;return null!==k&&1===k.version&&(B.setName(k.name),B.setStoreCurrencyID(k.currencyID),B.setStoreCurrencyType(k.currencyType),B.setMerchantAvatar(vt.deserializeMerchantAvatar(k.merchantAvatar)),B.setPages(vt.deserializeCollection(k.pages,vt.deserializeTab))),B.isValid()||(B=null),B}serialize(k){let B=null;return k.isValid()&&(B={version:1,name:k.getName(),currencyID:k.getStoreCurrencyID(),currencyType:k.getStoreCurrencyType(),merchantAvatar:vt.serializeMerchantAvatar(k.getMerchantAvatar()),pages:vt.serializeCollection(k.getPages(),vt.serializeTab)}),B}static deserializeMerchantAvatar(k){const B=new mt;return B.setAssetFrame(k.frame),B.setAssetTag(k.tag),B.setPosition(k.position.x,k.position.y),B.setScale(k.scale.x,k.scale.y),B}static serializeMerchantAvatar(k){return{tag:k.getAssetTag(),frame:k.getAssetFrame(),position:Object.assign({},k.getPosition()),scale:Object.assign({},k.getScale())}}static deserializeTab(k){const B=new _t;return B.setButton(vt.deserializeTabButton(k.btn)),B.setIsDefault(k.isDefault),B.setStoreItems(vt.deserializeCollection(k.items,vt.deserializeStoreItem)),B}static serializeTab(k){return{btn:vt.serializeTabButton(k.getButton()),isDefault:k.isDefault(),items:vt.serializeCollection(k.getStoreItems(),vt.serializeStoreItem)}}static deserializeTabButton(k){const B=new yt;return B.setItemType(k.icon.type),B.setItemID(k.icon.ID),B.setTopText(k.top),B.setBottomText(k.bot),B}static serializeTabButton(k){return{icon:{type:k.getItemType(),ID:k.getItemID()},bot:k.getBottomText(),top:k.getTopText()}}static deserializeStoreItem(k){const B=new gt.J;return B.setType(k.type),B.setID(k.ID),B.setCost(vt.deserializeCollection(k.cost,vt.deserializeStoreCost)),B}static serializeStoreItem(k){return{ID:k.getID(),type:k.getType(),cost:vt.serializeCollection(k.getCost(),vt.serializeStoreCost)}}static deserializeStoreCost(k){const B=new bt;return B.setAmount(k.N),B.setType(k.type),B.setID(k.ID),B}static serializeStoreCost(k){return{N:k.getAmount(),ID:k.getID(),type:k.getType()}}};Et=vt=(0,G.Cg)([(0,tt.injectable)()],Et);let wt=class extends et.k{constructor(k,B){super(),this.dataProvider=null,this.cache=null,this.factoriesContainer=null,this.dataProvider=k,this.cache=B,this.factoriesContainer=new tt.Container,this.factoriesContainer.bind("v1").to(Et)}getStore(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=`store-${k}`;let U=this.cache.getValue(B);if(null===U){const[F,G]=yield this.dataProvider.getStore(k);if(!G)return null!==F?[F,null]:[new lt._("Store was not found"),null];U=this.factoriesContainer.get(`v${G.version}`).deserialize(G),this.cache.storeValue(B,U)}return[null,U]}))}invalidateCache(){this.cache.invalidate()}};wt=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)(F.StoreDataProvider)),(0,G.Qj)(1,(0,tt.inject)(F.CacheStorageStrategy)),(0,G.Sn)("design:paramtypes",[ft,ut])],wt);let Tt=class extends ut{constructor(k){super(k),this.cache={}}hasValue(k){return void 0!==this.cache[k]}invalidate(){super.invalidate(),this.cache={}}retrieveValueFromStorage(k){return this.cache[k]}storeValueInStorage(k,B){this.cache[k]=B}};Tt=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)(F.CacheExpirationStrategy)),(0,G.Sn)("design:paramtypes",[Object])],Tt);let St=class{constructor(){this.cacheTime={},this.expiryMilliseconds=3e5}setExpiryTimeInMinutes(k){this.expiryMilliseconds=6e4*k}setExpiryTimeInSeconds(k){this.expiryMilliseconds=1e3*k}cacheItem(k){this.cacheTime[k]=Date.now()}hasExpired(k){return void 0===this.cacheTime[k]||Date.now()>this.cacheTime[k]+this.expiryMilliseconds}invalidate(){this.cacheTime={}}};St=(0,G.Cg)([(0,tt.injectable)()],St);var At=U(7408),Ct=U(51540),Ot=U(55080),It=U(40579),Dt=U(76277);const Rt=(0,U(77601).gb)({key:"game-native-app-notification-config",activateAssociatedExperiments:0,evaluate:k=>Object.assign(Object.assign({},k),{notifications:k.enabled&&Array.isArray(k.notifications)?[...k.notifications]:[]}),default:{enabled:!0,notifications:[]}});var Pt=U(98252);let Mt=class{isNativeAppNotificationFeatureEnabled(){return Pt.pF.isNativeApp()&&(0,Dt.G)(Rt).enabled}getNativeAppNotifications(){const k=(0,Dt.G)(Rt).notifications;return this.isNativeAppNotificationFeatureEnabled()&&(null==k?void 0:k.length)>0?k:[]}getNativeAppNotificationFromTriggerType(k){return this.getNativeAppNotifications().filter((B=>B.notificationTrigger===k))}getNativeAppNotificationFromId(k){return this.getNativeAppNotifications().filter((B=>(null==B?void 0:B.id)===k))}presentOrScheduleNativeAppNotification({triggerType:k,id:B}){var U,F,G;let j;return k&&(j=this.getNativeAppNotificationFromTriggerType(k)),!j&&B&&(j=this.getNativeAppNotificationFromId(B)),!!j&&(null===(G=null===(F=null===(U=window.SW)||void 0===U?void 0:U.NATIVE_APP_NOTIFICATIONS)||void 0===F?void 0:F.presentOrScheduleNotification)||void 0===G||G.call(F,j),!0)}triggerNotification({triggerType:k,id:B}){try{if(!this.isNativeAppNotificationFeatureEnabled())return;this.presentOrScheduleNativeAppNotification({triggerType:k,id:B})}catch(U){j.RQr.createHandler("Error presenting native app notification")(U)}}};Mt=(0,G.Cg)([(0,tt.injectable)()],Mt);let Nt=class{triggerNotification(){}};Nt=(0,G.Cg)([(0,tt.injectable)()],Nt);var xt=U(83634),Lt=U(88061),kt=U(20352),Bt=U(88701),Ut=U(91207),Ft=U(24521),Gt=U(23029);let jt=class{get constants(){var k,B;return this.assetData||(this.assetData=null===(B=null===(k=Gt.R.loadData(Ft.r.BattleRevampConstants_json))||void 0===k?void 0:k.battleConstants)||void 0===B?void 0:B.spawns),this.assetData}};jt=(0,G.Cg)([(0,tt.injectable)()],jt);let $t=class{constructor(){this.constants=U(94554)}};$t=(0,G.Cg)([(0,tt.injectable)()],$t);var Ht=U(84643),Vt=U(34829),Wt=U(1195),qt=U(48417);class Kt{static getStoreId(k){return this._overrideMap||this.populateOverrideMap(),this._overrideMap.has(k)?this._overrideMap.get(k):k}static populateOverrideMap(){var k;const B=K.q.instance.prodigy.gameContainer.get("073-6f3b");this._overrideMap=new Map;for(const U of this._experimentsToCheck){const F=null!==(k=B.getFeatureValue(U))&&void 0!==k?k:[];for(const k of F)this._overrideMap.has(k.storeId)||this._overrideMap.set(k.storeId,k.override)}}}Kt._experimentsToCheck=[];var zt=U(76546);let Yt=class extends zt.D{getStore(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;const U=null!==(B=Kt.getStoreId(k))&&void 0!==B?B:k;try{return[null,yield this.makeCloudscriptRequest(qt.D.GameStore.GetStore,{storeId:U},!1)]}catch(F){return[new lt._(F.message),null]}}))}};Yt=(0,G.Cg)([(0,tt.injectable)()],Yt);var Qt=U(47008),Xt=U(79600),Zt=U(95066),Jt=U(36525),te=U(37629);class ee extends te.c{getContentType(){return"application/json"}getData(){return JSON.stringify(this.getJson())}}var ie,se=U(78686),ne=U(69698);se.defaults.storage=window.sessionStorage;let ae=ie=class{constructor(k){this.timeManager=null,this.timeManager=k}handleErrorCallback(){K.q.instance.prodigy.gameContainer.get("c97-bd0d").logout(!0)}isLoggedIn(){const k=se.remember(ie.JWT_STORAGE_KEY,window.sessionStorage);return this.validate(k)}getToken(){const k=se.get(ie.JWT_STORAGE_KEY,window.sessionStorage);return k.startsWith("Bearer")?k.substring(7):k}authenticateRequest(k){k.setHeader("Authorization",se.get(ie.JWT_STORAGE_KEY,window.sessionStorage),!0)}validate(k){if(j.Aq$.isDefined(k)&&j.Aq$.isDefined(k.claim)){const B=this.timeManager.getServerTimeMs()/1e3;if((!j.Aq$.isDefined(k.claim.exp)||k.claim.exp>B)&&(!j.Aq$.isDefined(k.claim.nbf)||k.claim.nbf{if(k.isOK())return k.data;throw new Error(`Unexpected result: ${JSON.stringify(k)}`)})).catch((k=>{const B=k;throw B.code===Xt.EErrorCode.ScriptError&&500===B.errorInfo.status&&j.VyI.log(`[WeeklyChallengeService] ${B.errorInfo.result.message}`,j.$bb.Verbose),j.VyI.log(`WeeklyChallengeService.getPlayerWeeklyChallengeData caught an error : ${j.RQr.stringify(k)}`,j.$bb.Warning),k}));G.resolve(H)}catch(e){G.reject(e)}finally{this._getWeeklyChallengeGoalPromise=null}return G}))}};ce.REQUEST_TIMEOUT_DURATION_MS=1e4,ce.REQUEST_RETRY_COUNT=5,ce=he=(0,G.Cg)([(0,tt.injectable)()],ce);var de=U(23034),le=U(77938);class ue{calculateDamage(k,B,U,F=0,G=1){let $=0;j.Aq$.isDefined(k)&&j.Aq$.isDefined(k.data.damage)&&($=k.data.damage);const H=k.data.element,V=U.getElement();return"Glacial Shield"!==k.data.name&&0===U.modifiers.ignoreElement&&(this.isStrong(H,V)?$+=4:this.isWeak(H,V)&&($-=3,$<=0&&($=2))),$=Math.floor(10*$*G),Math.max(Math.floor($+(j.Aq$.isDefined(F)?F:0)),0)}isStrong(k,B){return j.Aq$.isDefined(k)&&j.Aq$.isDefined(B)&&("fire"===k&&("ice"===B||"earth"===B||"ice & fire"===B)||"water"===k&&("fire"===B||"ice & fire"===B)||"earth"===k&&"water"===B||"storm"===k&&"water"===B||"mech"===k&&"mech"===B||"ice"===k&&("storm"===B||"mech"===B)||"shadow"===k&&"wizard"!==B||"wizard"===k&&"shadow"===B)}isWeak(k,B){return j.Aq$.isDefined(k)&&j.Aq$.isDefined(B)&&("fire"===k&&"water"===B||"water"===k&&("earth"===B||"storm"===B||"mech"===B)||"earth"===k&&("fire"===B||"ice & fire"===B)||"storm"===k&&"ice"===B||"ice & fire"===B||"mech"===k&&"ice"===B||"ice & fire"===B||"ice"===k&&"fire"===B||"ice & fire"===B||"shadow"===k&&"wizard"===B||"wizard"!==k&&"shadow"===B)}getBestAttack(k,B,U=0){if(k.length<=0)return null;const F=[];let G;for(let H=0;HB.dmg-k.dmg));let j=F[F.length-1].ID,$=U;for(let H=0;H$){j=F[H].ID;break}$*=.75}return this.getAttack(j)}getAttack(k){return le.t.getItem("spell",k)}getHealingAttack(k){let B;for(let U=0;UK.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(U.textKey),configurable:!0})}}}get(k,B){return this.data[k][B]}}var be=U(34992),pe=U(36545),ve=U(15821);let ge=class{get constants(){return ve.A.isDefined(this._spellLevelBonuses)||(this._spellLevelBonuses=Gt.R.loadData(Ft.r.SpellLevelBonusConfigs_json).spellLevelBonusConstants),this._spellLevelBonuses}};ge=(0,G.Cg)([(0,tt.injectable)()],ge);var me,ye=U(96535),_e=U(63352),Ee=U(54950),we=U(63860),Te=U(52743),Se=U(35537);let Ae=class{constructor(){this.onChange=new j.HN0,this[me]="questProgress"}get value(){return this._value}[(me=Se.sE,Se.JN)](k){return(0,G.sH)(this,void 0,void 0,(function*(){this._value=k,this.onChange.dispatch(k)}))}destroy(){this.onChange.dispose()}};Ae=(0,G.Cg)([(0,tt.injectable)()],Ae);var Ce,Oe=U(129),Ie=U(23082),De=U(10670),Re=U(13956),Pe=U(51151),Me=U(30628),Ne=U(52850),xe=U(75408);let Le=Ce=class{constructor(){this.onMatched=new j.HN0,this.onWaitTimeExhausted=new j.HN0,this.onMatchmakingFailure=new j.HN0,this.onQuit=new j.HN0,this.onHostInviteReceived=new j.HN0}startMatchmaking(k){return(0,G.sH)(this,void 0,void 0,(function*(){(yield this._theNetworkManager.startMatchmaking(k))?(this._boundMatchedCallback=this.processMatchedMessage.bind(this),this._boundWaitTimeExhaustedCallback=this.processWaitTimeExhaustedMessage.bind(this),this._boundDisconnectCallback=this.processDisconnection.bind(this),this._matchmakingSocket.addListener(j.KZk.Matched,this._boundMatchedCallback),this._matchmakingSocket.addListener(j.KZk.WaitTimeExhausted,this._boundWaitTimeExhaustedCallback),this._matchmakingSocket.addListener(j.KZk.Disconnect,this._boundDisconnectCallback),yield Promise.race([this.onQuit.asPromise(),this.onMatched.asPromise(),this.onWaitTimeExhausted.asPromise()]).finally((()=>{this.quitMatchmaking()}))):this.onMatchmakingFailure.dispatch(new Error("Matchmaking: Error connecting to the matcher api"))}))}quitMatchmaking(){this.onQuit.dispatch(),this._matchmakingSocket.removeListener(j.KZk.Matched,this._boundMatchedCallback),this._matchmakingSocket.removeListener(j.KZk.WaitTimeExhausted,this._boundWaitTimeExhaustedCallback),this._matchmakingSocket.removeListener(j.KZk.Disconnect,this._boundDisconnectCallback),this._boundMatchedCallback=null,this._boundWaitTimeExhaustedCallback=null,this._boundDisconnectCallback=null,this._theNetworkManager.quitMatchmaking()}processMatchedMessage(k){const B=Me.B.fromArray(Pe.DuelInviteProto,k.opponentData.data),U=new Oe.a(K.q.instance.game);U.initFromProtobuf({userID:B.userID,appearance:B.appearance,equipment:B.equipment,name:B.name,team:B.team,member:B.member,level:B.level});const F={opponent:U,isOpponentHost:k.opponentData.host};this.onMatched.dispatch(F)}processWaitTimeExhaustedMessage(){this.onWaitTimeExhausted.dispatch()}processDisconnection(){this.onMatchmakingFailure.dispatch(new Error("Matchmaking: Disconnected while matchmaking was running"))}startDuel(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(k.isOpponentHost){const B=this._inviteService.getInvites().find((B=>B.userID===k.opponent.userID));if(B)return void this.handleInviteReceived(k.opponent.userID,B);this._inviteService.onInviteReceived.add(this.handleInviteReceived.bind(this,k.opponent.userID),this);const U=j.Egh.timeout(Ce.HOST_INVITE_WAIT_TIME_MS).then((()=>{throw new Error("Timed out waiting for host invite")}));yield Promise.race([this.onHostInviteReceived.asPromise(),U]).finally((()=>{this._inviteService.onInviteReceived.removeAll(this)}))}else yield Ne.e.invite(De.VB.DuelsStadium,k.opponent,this.onDuelEnd.bind(this))}))}onDuelEnd(){K.q.instance.game.state.get(Ie.G.DuelMatchmaking).roomConfig=null,xe.d.openDuelsStadiumMenu().catch(j.RQr.createHandler("Error going back to Duels Stadium menu"))}handleInviteReceived(k,B){B.userID===k&&(this._inviteService.onInviteReceived.removeAll(this),this.onHostInviteReceived.dispatch(),Ne.e.acceptInvite(De.VB.DuelsStadium,B,this.onDuelEnd.bind(this)))}destroy(){this.onMatched.dispose(),this.onWaitTimeExhausted.dispose(),this.onMatchmakingFailure.dispose(),this.onQuit.dispose(),this.onHostInviteReceived.dispose()}};Le.HOST_INVITE_WAIT_TIME_MS=7e3,(0,G.Cg)([(0,Re.b)("03c-6e1e"),(0,G.Sn)("design:type",Object)],Le.prototype,"_matchmakingSocket",void 0),(0,G.Cg)([(0,Re.b)("c97-bd0d"),(0,G.Sn)("design:type",Function)],Le.prototype,"_theNetworkManager",void 0),(0,G.Cg)([(0,Re.b)("636-444c"),(0,G.Sn)("design:type",Object)],Le.prototype,"_inviteService",void 0),Le=Ce=(0,G.Cg)([(0,tt.injectable)()],Le);var ke,Be=U(17516),Ue=U(70330);!function(k){k[k.ServiceUnreachable=0]="ServiceUnreachable",k[k.BattleRoomUnavailable=1]="BattleRoomUnavailable",k[k.Unknown=2]="Unknown"}(ke||(ke={}));var Fe,Ge=U(67665);!function(k){k.Accept="Accept",k.Decline="Decline"}(Fe||(Fe={}));var je,$e=U(52498);let He=je=class{constructor(k){this.jsonData={},this.environment=null,this.loggedFeatureFlagErrors=[],this.environment=k,this.baseAssetsUrl=`${Vt.s.get("GameConstants.Build.ASSETS_LOCATION")}${Vt.s.get("GameConstants.Build.ASSETS_FOLDER")}/`}initializeWithJson(k){this.jsonData=k}getValue(k,B=null){var U;if(j.Aq$.isDefined(this.jsonData[k]))return this.jsonData[k];if((null===(U=this.jsonData.enableVerboseFeatureFlagLogging)||void 0===U||U)&&!this.loggedFeatureFlagErrors.includes(k)){this.loggedFeatureFlagErrors.push(k);let U=`Could not find feature flag value for key: ${k}. `;U+=`Returning the default: ${String("object"==typeof B?JSON.stringify(B):B)}`,j.VyI.log(U,j.$bb.Verbose)}return B}getItemsDataURI(){let k=this.getValue("gameDataVersion");return k=j.Aq$.isDefined(k)&&"0"!==k?`${k}/`:"",`${this.getValue("gameDataPath")}${k}game-metadata.json`}getAssetsDataURI(){var k;const B=K.q.instance.prodigy.gameContainer.get("6a1-4b92").getCurrentEnvironment(),U=this.getAssetURLSuffix(B);let F;if(null===(k=window.gameEnvironmentVariables)||void 0===k?void 0:k.loadAssetsFromPrevEnv){const k=window.gameEnvironmentVariables.prevEnvId;F=`${this.baseAssetsUrl}assets-metadata-${k}.json${U}`}else{const k=this.getLocalAssetVersion();F=`${this.getBaseAssetsURL()}/${k}assets-metadata.json${U}`}return F}getDependencyMapURI(){var k;const B=K.q.instance.prodigy.gameContainer.get("6a1-4b92").getCurrentEnvironment(),U=this.getAssetURLSuffix(B);let F;if(null===(k=window.gameEnvironmentVariables)||void 0===k?void 0:k.loadAssetsFromPrevEnv){const k=window.gameEnvironmentVariables.prevEnvId;F=`${this.baseAssetsUrl}dependencyMap-${k}.json${U}`}else{const k=this.getLocalAssetVersion();F=`${this.getBaseAssetsURL()}/${k}dependencyMap.json${U}`}return F}getAssetPathConfigURI(){var k;const B=K.q.instance.prodigy.gameContainer.get("6a1-4b92").getCurrentEnvironment(),U=this.getAssetURLSuffix(B);let F;if(null===(k=window.gameEnvironmentVariables)||void 0===k?void 0:k.loadAssetsFromPrevEnv){const k=window.gameEnvironmentVariables.prevEnvId;F=`${this.baseAssetsUrl}assetPathConfig-${k}.json${U}`}else{const k=this.getLocalAssetVersion();F=`${this.getBaseAssetsURL()}/${k}assetPathConfig.json${U}`}return F}getLocalAssetVersion(){let k=this.getValue("gameAssetsVersion");return k=k&&"0"!==k?`${k}/`:"",k}getPrefabsURIs(){var k;const B=this.getLocalAssetVersion(),U=K.q.instance.prodigy.gameContainer.get("6a1-4b92").getCurrentEnvironment();let F,G;if(null===(k=window.gameEnvironmentVariables)||void 0===k?void 0:k.loadAssetsFromPrevEnv){G=`-${window.gameEnvironmentVariables.prevEnvId}`,F=this.baseAssetsUrl}else G="",F=`${this.getBaseAssetsURL()}/${B}`;const j=[];for(let $=0;${})}destroy(){this.onInviteReceived.dispose(),this.onInviteCancelled.dispose(),this.onInviteRejected.dispose(),this.onInviteFailed.dispose(),this.onInviteSent.dispose(),this.onInviteRemoved.dispose()}getInvites(){return this._invites}sendInvite(k){this.verboseLog("Retrieving room ID for battle room service");const B=k.userID;this._battleService.getRoomId(`${B}`).then((U=>{var F,G,j,$,H;this.verboseLog(`Retrieved room ID ${U}. Sending invite to user ${B}.`);const V=this._loggedInPlayer.player,W=V.getPlayerData().playerTransformation,q=V.appearance.getData(),z=V.equipment.getData(),Y=V.appearance.getName(),Q=Pe.DuelInviteProto.create({roomID:U,userID:V.userID,team:V.data.team,member:V.hasMembership()?1:0,level:V.getLevel(),appearance:{faceID:q.face,hair:{styleID:q.hair.style,colorID:q.hair.color},skinColorID:q.skinColor,eyeColorID:q.eyeColor,morph:W?{type:W.transformType,ID:W.transformID}:null},equipment:{hatID:z.hat,bootsID:z.boots,weaponID:z.weapon,outfitID:z.outfit,costumeID:z.costume},name:{first:Y.getFirstName(),middle:Y.getMiddleName(),last:Y.getLastName(),nick:Y.getNickname()}});this._multiplayerSocket.emitEvent("message",{action:Ke.Invite,target:B,data:Me.B.toArray(Pe.DuelInviteProto,Q)}),this._segment.social.sendDuelRequestSentEvent({opponent_id:B,is_classmate:K.q.instance.prodigy.friendsListNetworkHandler.isClassmate(B),is_friend:K.q.instance.prodigy.friendsListNetworkHandler.isFriend(B),opponent_hat_id:null===(F=k.equipment)||void 0===F?void 0:F.getHat(),opponent_boots_id:null===(G=k.equipment)||void 0===G?void 0:G.getBoots(),opponent_outfit_id:null===(j=k.equipment)||void 0===j?void 0:j.getOutfit(),opponent_relic_id:null===($=k.equipment)||void 0===$?void 0:$.getSpellRelic(),opponent_wand_id:null===(H=k.equipment)||void 0===H?void 0:H.getWeapon()}),this.onInviteSent.dispatch(Q)})).catch((k=>{j.RQr.logError(k,"MultiplayerSocketDuelingInviteService - Failed to retrieve roomID: ");switch((k instanceof Ve?k:new Ve(We.Unknown)).type){case We.ApiMaintenance:this.onInviteFailed.dispatch(ke.BattleRoomUnavailable);break;case We.ServiceUnreachable:this.onInviteFailed.dispatch(ke.ServiceUnreachable);break;default:this.onInviteFailed.dispatch(ke.Unknown)}}))}rejectInvite(k){const B=this._invites.indexOf(k);B>-1?(this.verboseLog(`Sending invite rejection to user ${k.userID}`),this.sendRejectInvite(k),this.sendDuelRequestAnsweredEvent(B,k,Fe.Decline),this.onInviteRemoved.dispatch(this._invites.splice(B,1)[0])):j.VyI.log(`MultiplayerSocketDuelingInviteService - Could not find invite ${JSON.stringify(k instanceof Pe.DuelInviteProto?k.toJSON():k)} to reject`,j.$bb.Warning)}sendRejectInvite(k){const B=Pe.DuelRejectionProto.create({userID:this._loggedInPlayer.player.userID});this._multiplayerSocket.emitEvent("message",{action:Ke.InviteRejected,target:k.userID,data:Me.B.toArray(Pe.DuelRejectionProto,B)})}acceptInvite(k){const B=this._invites.indexOf(k);B>-1?(this.verboseLog(`Accepting invite ${JSON.stringify(k instanceof Pe.DuelInviteProto?k.toJSON():k)}`),this.sendDuelRequestAnsweredEvent(B,k,Fe.Accept),this.onInviteRemoved.dispatch(this._invites.splice(B,1)[0])):j.VyI.log(`MultiplayerSocketDuelingInviteService - Invite was accepted but not found in list. Nothing will send. ${JSON.stringify(k instanceof Pe.DuelInviteProto?k.toJSON():k)}`,j.$bb.Warning)}cancelInvite(k){this.verboseLog(`Sending cancellation to user ${k}.`);const B=Pe.DuelCancellationProto.create({userID:this._loggedInPlayer.player.userID});this._multiplayerSocket.emitEvent("message",{action:Ke.InviteCancelled,target:k,data:Me.B.toArray(Pe.DuelCancellationProto,B)})}processMessage(k){const B=this._featureFlags.getValue("enableVerboseDuelService",!1);switch(k.action){case Ke.Invite:{const U=Me.B.fromArray(Pe.DuelInviteProto,k.data);this._invites.push(U),this._segment.social.sendDuelRequestReceivedEvent({opponent_id:U.userID,is_classmate:K.q.instance.prodigy.friendsListNetworkHandler.isClassmate(U.userID),is_friend:K.q.instance.prodigy.friendsListNetworkHandler.isFriend(U.userID)}),this.onInviteReceived.dispatch(U),B&&this.verboseLog(`Received invite from other user ${JSON.stringify(U.toJSON())}`);break}case Ke.InviteRejected:{const U=Me.B.fromArray(Pe.DuelRejectionProto,k.data);B&&this.verboseLog(`Received rejection from other user ${JSON.stringify(U.toJSON())}`),this.onInviteRejected.dispatch(U.userID);break}case Ke.InviteCancelled:{const U=Me.B.fromArray(Pe.DuelCancellationProto,k.data),F=this._invites.findIndex((k=>k.userID===U.userID));F>-1?(B&&this.verboseLog(`Received cancellation from other user ${JSON.stringify(U.toJSON())}`),this.onInviteCancelled.dispatch(this._invites.splice(F,1)[0])):j.VyI.log(`MultiplayerSocketDuelingInviteService - Invite was cancelled by user ${U.userID}, but not found`,j.$bb.Warning);break}}}sendDuelRequestAnsweredEvent(k,B,U){const F=K.q.instance.prodigy.friendsListNetworkHandler;this._segment.social.sendDuelRequestAnsweredEvent({opponent_id:B.userID,is_classmate:F.isClassmate(B.userID),is_friend:F.isFriend(B.userID),friends:F.friendsList.length,classmates:F.classList.length,index:k,challenges_pending:this._invites.length,challenge_response:U})}verboseLog(k){j.VyI.log(`${this.serviceName} - ${k}`,j.$bb.Verbose)}};(0,G.Cg)([(0,Re.b)("e2e-64d8"),(0,G.Sn)("design:type",Object)],ze.prototype,"_multiplayerSocket",void 0),(0,G.Cg)([(0,Re.b)("e20-0fb0"),(0,G.Sn)("design:type",Wt.E)],ze.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,Re.b)("80c-6fa4"),(0,G.Sn)("design:type",He)],ze.prototype,"_featureFlags",void 0),(0,G.Cg)([(0,Re.b)("efb-f022"),(0,G.Sn)("design:type",qe)],ze.prototype,"_battleService",void 0),(0,G.Cg)([(0,Re.b)("c47-20b6"),(0,G.Sn)("design:type",Ge.Y)],ze.prototype,"_segment",void 0),ze=(0,G.Cg)([(0,tt.injectable)(),(0,G.Sn)("design:paramtypes",[])],ze);let Ye=class extends ze{get serviceName(){return"SynapseDuelingInviteService"}constructor(){super(),this._synapse.onNotificationReceived.add(this.processNotification,this)}destroy(){this._synapse.onNotificationReceived.remove(this.processNotification,this),super.destroy()}sendInvite(k){const B=Object.create(null,{sendInvite:{get:()=>super.sendInvite}});return(0,G.sH)(this,void 0,void 0,(function*(){var U,F,G,$,H;const V=k.userID,W=this._loggedInPlayer.player,q=W.getPlayerData().playerTransformation,z=W.appearance.getData(),Y=W.equipment.getData(),Q=W.appearance.getName(),X={userID:W.userID,member:W.hasMembership()?1:0,level:W.getLevel()+W.getChargedLevel(),appearance:{face:z.face,hair:{style:z.hair.style,color:z.hair.color},skinColor:z.skinColor,eyeColor:z.eyeColor,morph:q?{type:q.transformType,ID:q.transformID}:null},equipment:{hatID:Y.hat,bootsID:Y.boots,weaponID:Y.weapon,outfitID:Y.outfit,costumeID:Y.costume},name:{first:Q.getFirstName(),middle:Q.getMiddleName(),last:Q.getLastName(),nick:Q.getNickname()}};try{this.verboseLog(`Attempting invite via notification service to user ${V}`);const j=yield this._battleService.sendInvite(`${V}`,X);this._legacyInviteSent=!j.wasInvited,j.wasInvited?(this.verboseLog(`User was invited to channel name ${j.channelName}.`),this._segment.social.sendDuelRequestSentEvent({opponent_id:V,is_classmate:K.q.instance.prodigy.friendsListNetworkHandler.isClassmate(V),is_friend:K.q.instance.prodigy.friendsListNetworkHandler.isFriend(V),opponent_hat_id:null===(U=k.equipment)||void 0===U?void 0:U.getHat(),opponent_boots_id:null===(F=k.equipment)||void 0===F?void 0:F.getBoots(),opponent_outfit_id:null===(G=k.equipment)||void 0===G?void 0:G.getOutfit(),opponent_relic_id:null===($=k.equipment)||void 0===$?void 0:$.getSpellRelic(),opponent_wand_id:null===(H=k.equipment)||void 0===H?void 0:H.getWeapon()}),this.onInviteSent.dispatch(j)):(this.verboseLog(`User is not on the notification service. Sending legacy invite with channel name ${j.channelName}.`),B.sendInvite.call(this,k))}catch(e){j.RQr.logError(e,"SynapseDuelingInviteService - Failed to retrieve roomID"),this.onInviteFailed.dispatch(ke.Unknown)}}))}sendRejectInvite(k){k instanceof Pe.DuelInviteProto?super.sendRejectInvite(k):(this.verboseLog(`Sending rejection to user ${k.userID}.`),this._battleService.rejectInvite(`${k.userID}`).catch(j.RQr.createHandler(`Error sending invite rejection to ${k.userID}`)))}cancelInvite(k){this._legacyInviteSent?super.cancelInvite(k):(this.verboseLog(`Sending cancellation to user ${k}.`),this._battleService.cancelInvite(`${k}`).catch(j.RQr.createHandler(`Error sending invite cancellation to ${k}`)))}processNotification(k){switch(k.type){case Be.m.DuelInvite:{const B=k.data;this._invites.push(B),this._segment.social.sendDuelRequestReceivedEvent({opponent_id:B.userID,is_classmate:K.q.instance.prodigy.friendsListNetworkHandler.isClassmate(B.userID),is_friend:K.q.instance.prodigy.friendsListNetworkHandler.isFriend(B.userID)}),this.onInviteReceived.dispatch(B),this.verboseLog(`Received invite from other user ${JSON.stringify(B)}`);break}case Be.m.DuelInviteRejection:{const{userId:B}=k.data;this.verboseLog(`Received rejection from user ${B}`),this.onInviteRejected.dispatch(parseInt(B));break}case Be.m.DuelInviteCancellation:{const{userId:B}=k.data,U=this._invites.findIndex((k=>`${k.userID}`===B));U>-1?(this.verboseLog(`Received cancellation from user ${B}`),this.onInviteCancelled.dispatch(this._invites.splice(U,1)[0])):j.VyI.log(`SynapseDuelingInviteService - Invite was cancelled by user ${B}, but not found`,j.$bb.Warning);break}}}};(0,G.Cg)([(0,Re.b)("779-a746"),(0,G.Sn)("design:type",Ue.d)],Ye.prototype,"_synapse",void 0),Ye=(0,G.Cg)([(0,tt.injectable)(),(0,G.Sn)("design:paramtypes",[])],Ye);var Qe=U(94393),Xe=U(76007),Ze=U(40295),Je=U(78889),ti=U(93867),ei=U(84399),ii=U(65068);let si=class{constructor(){this.objectiveTypes=[ii.q.RestrictedEncounterBlocking],this.onObjectiveUpdated=new j.HN0}getObjectives(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;if(!ei.R.isFeatureEnabled()||!ti.U.isStepComplete(Ze.B.PuppetMasterDefeated))return[];const{requirements:B}=null!==(k=this._featureRequirements.getProgressForRequirements(59))&&void 0!==k?k:{requirements:[]};return B.every((k=>Object.values(k).every((({progress:k})=>{const[B,U]=k;return B>=U}))))?[]:(0,Je.yd)({requirements:B,objectiveIdPrefix:"hard-mode-req",type:ii.q.HardModeRequirement})}))}};(0,G.Cg)([(0,tt.inject)("db5-fb6e"),(0,G.Sn)("design:type",Object)],si.prototype,"_featureRequirements",void 0),si=(0,G.Cg)([(0,tt.injectable)()],si);var ni=U(47708);var ai,ri=U(97495),oi=U(73797),hi=U(55122);let ci=class{constructor(){this[ai]="campaignReplayChangedData"}[(ai=Se.sE,Se.JN)](k){return(0,G.sH)(this,void 0,void 0,(function*(){j.Aq$.isDefined(k.newProgressStep)&&this.handleNewProgressStep(k.newProgressStep),j.Aq$.isDefined(k.newDifficultyUnlocks)&&this.handleNewDifficultyUnlocks(k.newDifficultyUnlocks),j.Aq$.isDefined(k.newDifficultySelected)&&this.handleNewDifficultySelected(k.newDifficultySelected)}))}handleNewProgressStep(k){switch(k){case ni.q6.HardModeIntroduced:hi.s.validatePlayerAndPetXp(),this.fetchChargedLevelsData();break;case ni.q6.ExpertModeStarted:this.fetchChargedLevelsData()}j.VyI.log(`[CampaignReplaySideEffectEventHandler] New progress step: ${k}`,j.$bb.Verbose)}fetchChargedLevelsData(){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.updateChargedLevelsData().catch(j.RQr.createHandler("CampaignReplaySideEffectEventHandler: Could not update charged levels data"))}handleNewDifficultyUnlocks(k){var B,U;if("object"!=typeof(U=k)||null===U||!Object.entries(U).every((([k,B])=>k in ni.Al&&"boolean"==typeof B)))return void j.VyI.log(`[CampaignReplaySideEffectEventHandler] Invalid difficulty unlocks: ${JSON.stringify(k)}`,j.$bb.Error);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0"),G=null!==(B=F.player.data.difficultyUnlocks)&&void 0!==B?B:ni.Al,$=Object.keys(k).filter((B=>k[B]&&!G[B]));$.includes(ri.i.Hard)&&(j.VyI.log("[CampaignReplaySideEffectEventHandler] Hard mode just unlocked",j.$bb.Verbose),K.q.instance.game.broadcaster.broadcast(oi.oL.HardModeJustUnlocked)),$.includes(ri.i.Expert)&&(j.VyI.log("[CampaignReplaySideEffectEventHandler] Expert mode just unlocked",j.$bb.Verbose),K.q.instance.game.broadcaster.broadcast(oi.oL.ExpertModeJustUnlocked));const V=H().cloneDeep(k);F.player.data.difficultyUnlocks=V,hi.s.validatePlayerAndPetXp(),j.VyI.log(`[CampaignReplaySideEffectEventHandler] New difficulty unlocks applied: ${JSON.stringify(F.player.data.difficultyUnlocks)}`,j.$bb.Verbose)}handleNewDifficultySelected(k){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.currentDifficulty=k,j.VyI.log(`[CampaignReplaySideEffectEventHandler] New difficulty selected: ${k}`,j.$bb.Verbose)}};ci=(0,G.Cg)([(0,tt.injectable)()],ci);var di,li=U(72379),ui=U(47969);let fi=di=class{constructor(k){this._activeCooldowns={},this._timeManager=k}setCooldown(k,B){this._activeCooldowns[k]=B}hasCooldown(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.fetchCooldowns();const U=this._timeManager.getServerTimeMs(),F=this._activeCooldowns[k];return j.Aq$.isDefined(F)&&Uk.indexOf("page")>=0)))}sendSegmentEvents(k,B,U){switch(k){case"Container Discovered":this._segment.container.sendContainerDiscoveredEvent(bi.ZF.Interactable,B,null==U?void 0:U.x,null==U?void 0:U.y,`${bi.ZF.Interactable}--${B}`);break;case"Container Opened":this._segment.container.sendContainerOpenedEvent(bi.ZF.Interactable,B)}}}var vi=U(10730);class gi{constructor(k,B,U=1,F=1,G=3,j=null){this.id=k,this.drops=B,this.minTeamSize=U,this.maxTeamSize=F,this.difficulty=G,this.bench=j}setup(k){k.dungeonZone.collectedItems[k.key].indexOf("monster")<0&&(k.monsterConfig=this)}}var mi=U(28930);let yi=class{constructor(){this.config=null,this.randomDataGenerator=null}initDungeon(k){this.config=k,this.randomDataGenerator=new j.bsf([this.config.getSeed()])}createLayout(){j.VyI.log(`Creating dungeon from seed: ${this.config.getSeed()}`,j.$bb.Verbose),this.layout={seed:this.config.getSeed(),mapConfigs:[],start:null,end:null};for(let G=0;G=U)return null;if(k>=this.config.getGridWidth()||B>=this.config.getGridHeight()||k<0||B<0)return null;if(j.Aq$.isDefined(this.layout.mapConfigs[k][B]))return null;const $={x:k,y:B,tilemap:null,initFsm:null,connections:[],components:[]};this.layout.mapConfigs[k][B]=$;const H=F+1;if(H>=U)return G&&($.components.push(new vi.v(1)),this.layout.end=$),$;let V=this.randomDataGenerator.integerInRange(0,3);0===V&&G&&1===H&&(V=this.randomDataGenerator.integerInRange(1,3));let W=null;const q=V;do{const F={x:k,y:B};switch(V){case mi.O.North:F.y--;break;case mi.O.East:F.x++;break;case mi.O.South:F.y++;break;case mi.O.West:F.x--}if(W=this.addRoomsToPath(F.x,F.y,U,H,G),j.Aq$.isDefined(W))return this.connectRooms(W,$),$;V=(V+1)%4}while(V!==q);return this.layout.mapConfigs[k][B]=null,null}addMonsters(k){const B=this.getAllRooms(!1);for(let U=0;UU===B[k]))}}addExtraPaths(k){const B=this.getAllRooms(!1);this.randomDataGenerator.shuffle(B);let U=0;for(;B.length>0&&U$.findIndex(F,k)>=0))}U!==k&&j.VyI.log(`Could create all extra paths. Target: ${k}, Created: ${U}`,j.$bb.Warning)}addGoldenPages(k){const B=this.getAllRooms(!1);this.randomDataGenerator.shuffle(B);const U=$.remove(B,(k=>$.findIndex(k.components,(k=>k instanceof gi))>=0));let F=0;for(;F.5&&(F=2,U++),B[U].components.push(new pi(19,F))}}assignRoomTilemaps(){const k=this.getAllRooms();let B=[...this.config.getNormalRooms()],U=[...this.config.getMonsterRooms()];this.randomDataGenerator.shuffle(B),this.randomDataGenerator.shuffle(U);for(let F=0;Fk instanceof vi.v&&1===k.id))>=0)G.tilemap=this.config.getEndRoom().getTileMap(),G.initFsm=this.config.getEndRoom().getFSM();else{let k=null,F=B;$.findIndex(G.components,(k=>k instanceof pi&&18===k.id))>=0&&(F=U),k=F.shift(),G.tilemap=k.getTileMap(),j.Aq$.isDefined(k.getFSM())&&(G.initFsm=k.getFSM()),0===B.length&&(B=[...this.config.getNormalRooms()],this.randomDataGenerator.shuffle(B)),0===U.length&&(U=[...this.config.getMonsterRooms()],this.randomDataGenerator.shuffle(U))}}}getAllRooms(k=!0){let B=[];for(let U=0;Uj.Aq$.isDefined(k))));return k||(B=$.filter(B,(k=>$.findIndex(k.components,(k=>k instanceof vi.v))<0))),B}findRandomEmptyAdjacentRoom(k){let B=this.randomDataGenerator.integerInRange(0,3);const U=B;do{const U={x:k.x,y:k.y};switch(B){case 0:U.y--;break;case 1:U.x++;break;case 2:U.y++;break;case 3:U.x--}if(U.x=0&&U.y>=0&&!j.Aq$.isDefined(this.layout.mapConfigs[U.x][U.y]))return U;B=(B+1)%4}while(B!==U);return null}connectRooms(k,B){let U=0,F=0;k.xB.x?(U=3,F=1):k.y>B.y?(U=0,F=2):k.y{this.openExitMenu(k)}));if(k.dungeonZone.collectedItems[k.key].indexOf("floorIntro")<0&&!this._towerZone.isTowerComplete()){k.dungeonZone.addCollected(k.key,"floorIntro");const B=new Ti.rD(K.q.instance.game),U=this._towerZone.getFloorConfig(this._towerZone.CurrentFloor).dialogueIDs,F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.previousZone===Oi.EARTH_TOWER_CR?()=>{Si.c.instance.isPlayerQualified()&&K.q.instance.game.time.events.addTimer(Vt.s.SECONDS_TO_MILLISECONDS_MULTIPLIER*Si.c.instance.getFtueData().delayInSeconds,(()=>{K.q.instance.prodigy.open.prefabMenu(Ei.l.PetXPBoostFTUEPopup).createContainer=!1}),null,null)}:null;B.addEvents(U.map((k=>({dialogueData:B.dataProvider.get(k),blockInput:!0})))),B.start(!1,F)}}}openExitMenu(k){if(this._towerZone.isTowerComplete()&&this._towerZone.isWardenSaved)if(this._towerZone.goalCollected{const k=K.q.instance.prodigy.world.getCurrentZone();K.q.instance.prodigy.world.getZone(k).exitDungeon()};K.q.instance.prodigy.open.bossRewards(U,Ai.N.TowerRun,void 0,void 0,B,F)}else this._towerZone.isTowerComplete()?this.goToCommonRoom(k):this._towerZone.CurrentFloor===this._towerZone.TotalFloors?this.showTowerBattleWarningPopup():this.showGotoNextFloorPopup()}showGotoNextFloorPopup(){const k=K.q.instance.prodigy.open.prefabMenu(Ei.l.AcademyTowerGotoNextFloorPopup);k.createContainer=!1,k.onPrefabLoaded.addOnce((k=>{k.transform&&k.findComponentInChildren(Ci.l).setCallbacks(this.showTowerBattleWarningPopup.bind(this),this.goToNextFloor.bind(this),this._elevator.exit.bind(this._elevator))}))}showTowerBattleWarningPopup(){const k=K.q.instance.prodigy.open.prefabMenu(Ei.l.AcademyTowerExitPopup);k.createContainer=!1;const B=this._elevator.exit.bind(this._elevator),U=this.goToCommonRoom.bind(this);k.onPrefabLoaded.addOnce((k=>{k.transform&&k.findComponentInChildren(Ci.l).setCallbacks(U,void 0,B)}))}goToNextFloor(k){this.onFloorExit(k),k.dungeonZone.enterDungeon()}goToCommonRoom(k){this.onFloorExit(k),this._towerZone.sendSegmentEvent("Tower Run Completed"),K.q.instance.prodigy.world.it(this._towerZone.commonRoom)}onFloorExit(k){this._towerZone.monstersDefeated===this._towerZone.goalTotal&&(this._towerZone.setFloor(this._towerZone.CurrentFloor,!0),this._towerZone.sendSegmentEvent("Tower Floor Completed"))}}Oi.EARTH_TOWER_CR="earthtower-CR";let Ii=class extends yi{createLayout(){j.VyI.log(`Creating dungeon from seed: ${this.config.getSeed()}`,j.$bb.Verbose),this.layout={seed:this.config.getSeed(),mapConfigs:[],start:null,end:null};for(let G=0;Gk instanceof vi.v&&0===k.id))>=0)F.tilemap=this.config.getEndRoom().getTileMap(),F.initFsm=this.config.getEndRoom().getFSM();else{let k=null;k=B.shift(),F.tilemap=k.getTileMap(),j.Aq$.isDefined(k.getFSM())&&(F.initFsm=k.getFSM()),0===B.length&&(B=[...this.config.getNormalRooms()],this.randomDataGenerator.shuffle(B))}}}addCriticalPath(k){const B=Math.floor(this.config.getGridWidth()/2),U=Math.floor(this.config.getGridHeight()/2);this.layout.start=this.addRoomsToPath(B,U,k,0,!0),j.Aq$.isDefined(this.layout.start)?this.layout.start.components.push(new Oi(0)):j.VyI.log("Could not add Critical Path",j.$bb.Verbose)}addMonsters(k){let B=this.getAllRooms(!1);$.remove(B,(k=>k===this.layout.end)),B=[this.layout.end].concat(B);const U=$.map(this.config.getMonsterIDs(),(k=>({petID:k,weight:1})));for(let F=0;F1?[parseInt(B[0]),parseInt(B[1])]:[parseInt(k),0]}}var ms,ys=U(56567);let _s=ms=class{getQuestData(){return(0,G.sH)(this,arguments,void 0,(function*(k={}){if(!1===k.active)return{activeQuests:[],inactiveQuests:[]};return{activeQuests:ms.ZONE_QUESTS.filter((B=>!k.questIDs||k.questIDs.includes(B.id))).filter((B=>!k.tags||k.tags.every((k=>{var U;return null===(U=B.tags)||void 0===U?void 0:U.includes(k)})))),inactiveQuests:[]}}))}getQuestProgress(){return(0,G.sH)(this,arguments,void 0,(function*(k={}){const B=yield this.getQuestData(k);return{activeQuests:B.activeQuests.map((k=>this.generateQuestProgressFromLegacyQuestState(k))),inactiveQuests:B.inactiveQuests.map((k=>this.generateQuestProgressFromLegacyQuestState(k)))}}))}generateQuestProgressFromLegacyQuestState(k){var B;const U=[],F=K.q.instance.prodigy.world.getZone(k.metadata.zoneId).getQuestState();if(null===(B=k.tasks)||void 0===B||B.forEach((k=>{(0,rs.v)("string"==typeof k.id,`Task ID is expected to be a string (found "${k.id}")`);const[B,G]=k.id.split("-").map((k=>parseInt(k))),j=F&&(F.ID>B||F.ID===B&&F.seq>G);U.push({id:k.id,status:j?ns.t.COMPLETE:ns.t.IN_PROGRESS,data:j?void 0:{progress:0}})})),F){const k=U.find((k=>k.id===`${F.ID}-${F.seq}`)),B=U.find((k=>k.status===ns.t.IN_PROGRESS));if(!k&&B){const[k,U]=B.id.toString().split("-").map((k=>parseInt(k)));F.ID=k,F.seq=U}}return{id:k.id,status:U.some((k=>k.status===ns.t.IN_PROGRESS))?ns.t.IN_PROGRESS:ns.t.COMPLETE,tasks:U}}setQuestProgressTimestamp(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.getQuestProgress({questIDs:[k.questId]})}))}sendQuestEvent(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;const U=new ys.f,F=yield this.getQuestData(k),G=yield this.getQuestProgress(k);for(const $ of F.activeQuests){const F=G.activeQuests.find((k=>k.id===$.id));if(!F)continue;const H=(yield ss.f.getTasksInProgress($,F,U)).find((B=>B.shouldSendEvent(k.eventType,k.eventData)));if(H){const U=K.q.instance.prodigy.world.getZone($.metadata.zoneId),F=null!==(B=U.getQuestState())&&void 0!==B?B:{};if(!j.Aq$.isDefined(null==F?void 0:F.ID)){[F.ID,F.seq]=gs.splitTaskId(H.taskID),F.state={},F.req=this.generateQuestRequirementsForTask(H.taskDefinition,$),U.setState("quest",F);K.q.instance.prodigy.gameContainer.get("306-5359").state.updated=!0}yield this.advanceTaskProgress(F,$,H,k.eventData)}}return this.getQuestProgress({questIDs:k.questIDs,tags:k.tags})}))}advanceTaskProgress(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){var G,$,H,V,W;const q=null!==($=null!==(G=F.progress)&&void 0!==G?G:F.progressToAdd)&&void 0!==$?$:1,z=null!==(H=U.taskDefinition.completionRequirements.data.target)&&void 0!==H?H:1,Y=K.q.instance.prodigy.gameContainer.get("306-5359");if(q>=z)yield this.advanceQuestState(k,B,U);else switch(U.type){case as.T.DEFEAT_ENCOUNTER:case as.T.DEFEAT_QUEST_ENCOUNTER:case as.T.RECEIVE_ITEM:if(j.Aq$.isDefined(null===(V=k.req)||void 0===V?void 0:V.N)||(k.req=this.generateQuestRequirementsForTask(U.taskDefinition,B),(0,rs.v)(j.Aq$.isDefined(null===(W=k.req)||void 0===W?void 0:W.N),`Quest requirements incorrectly defined for defeat enemy task ${U.taskID}`)),k.req.N-=q,k.req.N<=0)return void(yield this.advanceQuestState(k,B,U));Y.state.updated=!0;break;case as.T.COLLECT_ITEM:if((0,rs.v)(j.Aq$.isDefined(F.progress),"eventData.progress cannot be empty for the COLLECT_ITEM task; please send the total number of collected items as progress when this event is dispatched"),F.progress>=z)return void(yield this.advanceQuestState(k,B,U));break;default:j.VyI.log(`Task progress could not be made for quest ${U.questID} task ${U.taskID}`,j.$bb.Error)}}))}advanceQuestState(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){var F,G,j,$;const[H,V]=gs.splitTaskId(U.taskID),W=null!==(F=k.ID)&&void 0!==F?F:H,q=null!==(G=k.seq)&&void 0!==G?G:V,z=null===(j=B.tasks)||void 0===j?void 0:j.find((k=>{var B;return null===(B=k.prerequisites)||void 0===B?void 0:B.includes(`${W}-${q}`)})),[Y,Q]=gs.splitTaskId(null!==($=null==z?void 0:z.id)&&void 0!==$?$:`${W+1}-0`),X=K.q.instance.prodigy.gameContainer.get("306-5359");k.ID=Y,k.seq=Q,W!==Y&&(k.state={}),z&&(k.req=this.generateQuestRequirementsForTask(z,B)),X.state.updated=!0,null==X||X.forceSaveCharacter(),z&&(yield this.handleAutoCompletedQuests(z))}))}handleAutoCompletedQuests(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;if((null===(B=null==k?void 0:k.completionRequirements)||void 0===B?void 0:B.type)===as.T.NONE){const k={eventType:as.T.NONE,eventData:{}};yield this.sendQuestEvent(k)}}))}generateQuestRequirementsForTask(k,B){var U,F,G;if(k.metadata.questRequirements)return k.metadata.questRequirements;switch(k.completionRequirements.type){case as.T.DEFEAT_ENCOUNTER:case as.T.DEFEAT_QUEST_ENCOUNTER:return j.Aq$.isDefined(k.completionRequirements.data.id)?{type:"pet",N:k.completionRequirements.data.target,ID:+k.completionRequirements.data.id}:{type:"clear",N:k.completionRequirements.data.target};case as.T.COLLECT_ITEM:case as.T.RECEIVE_ITEM:return{type:"item",N:k.completionRequirements.data.target,ID:+(null!==(U=k.completionRequirements.data.id)&&void 0!==U?U:1)};default:const[$,H]=gs.splitTaskId(k.id),V=(null!==(G=null===(F=B.tasks)||void 0===F?void 0:F.filter((k=>gs.splitTaskId(k.id)[0]===$)))&&void 0!==G?G:[]).map((k=>gs.splitTaskId(k.id)[1]));return{type:"seq",N:Math.max(...V)+1}}}};_s.ZONE_QUESTS=[ds.E,cs.C,bs.a,fs.S,hs.K,os.G,us.J,ls.r,vs.x,ps.x],_s=ms=(0,G.Cg)([(0,tt.injectable)()],_s);var Es=U(18587),ws=U(60031),Ts=U(53037),Ss=U(3606),As=U(3001),Cs=U(76846),Os=U(98938),Is=U(79368);class Ds extends Is.k{constructor(){super(...arguments),this._tags=[Os.t.Ultimates]}}var Rs,Ps=U(45918),Ms=U(80434),Ns=U(63536),xs=U(4764);let Ls=Rs=class extends oe{constructor(){super(...arguments),this.previouslyReportedUserIDs=new Set}reportAbuse(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(this.previouslyReportedUserIDs.has(null==k?void 0:k.reportedUserID))return Promise.reject(new Error("User has already been reported"));this.previouslyReportedUserIDs.add(k.reportedUserID);const B=this.createRequest(j.iXQ.Post,Rs.CORTEX_REPORT_ABUSE_ENDPOINT,k,Rs.REQUEST_TIMEOUT_DURATION_MS);return this._httpClient.sendRequest(B)}))}};Ls.REQUEST_TIMEOUT_DURATION_MS=1e4,Ls.CORTEX_REPORT_ABUSE_ENDPOINT="v1/reporting.reportAbuse",Ls=Rs=(0,G.Cg)([(0,tt.injectable)()],Ls);var ks=U(5708),Bs=U(14117),Us=U(37050),Fs=U(77823),Gs=U(71790),js=U(67238);class $s extends js.D{add(k){return(0,G.sH)(this,void 0,void 0,(function*(){const{uniqueId:B}=yield this.call(qt.D.Kennel.UnsecureAdd,{data:k},!0);return B}))}update(k){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.call(qt.D.Kennel.Update,{update:k},!0)}))}evolve(k){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.call(qt.D.Kennel.Evolve,{uniqueId:k},!0)}))}memberUpgradeEvolve(k){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.call(qt.D.Kennel.MemberUpgradeEvolve,{uniqueId:k},!0)}))}remove(k){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.call(qt.D.Kennel.Remove,{uniqueId:k},!0)}))}claim(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.call(qt.D.Kennel.Claim,{token:k,petId:B},!0)}))}}var Hs=U(25834),Vs=U(80105),Ws=U(91620),qs=U(3519),Ks=U(2980),zs=U(77510),Ys=U(2775),Qs=U(11288),Xs=U(94995),Zs=U(3374),Js=U(84234),tn=U(33587),en=U(46808);let sn=class{constructor(){this._prefabGuidMap=new Map}getPrefab(k){var B;const U=en.T[k];if(this._prefabGuidMap.has(U))return this._prefabGuidMap.get(U).prefab;const F=le.t.getItem("prefab",k);if(!(null===(B=null==F?void 0:F.data)||void 0===B?void 0:B.prefab))throw new Error(`Missing item data for prefab ${k}`);return F.data.prefab}getPrefabItem(k){return this._prefabGuidMap.get(k)}getPrefabFromGUID(k){return this._prefabGuidMap.has(k)?this._prefabGuidMap.get(k).prefab:(j.VyI.log(`Prefab with guid ${k} not found in the PrefabDataProvider`,j.$bb.Warning),null)}rebuildPrefabGuidMap(){var k;(null===(k=le.t.data)||void 0===k?void 0:k.prefab)&&le.t.data.prefab.forEach((k=>{var B;k.guid&&(null===(B=k.data)||void 0===B?void 0:B.prefab)&&this._prefabGuidMap.set(k.guid,k.data)}))}};sn=(0,G.Cg)([(0,tt.injectable)()],sn);var nn=U(37251),an=U(51477),rn=U(44094),on=U(20952),hn=U(73678),cn=U(90661),dn=U(19464),ln=U(90633),un=U(30405),fn=U(5898),bn=U(3862),pn=U(17425),vn=U(87820),gn=U(65240),mn=U(23283),yn=U(64353),_n=U(95057),En=U(21097),wn=U(76945),Tn=U(30226),Sn=U(47255),An=U(46318);class Cn extends An.Q{constructor(k,B,U,F,G){super(k,B,U,F,G,0),this.prizeItems=[],this.poofSpine=null,this.prizeItems=An.Q.getWheelItems(k,G),this.assetID=G,K.q.instance.prodigy.notifications.clearNotifications(!0),this.game.input.enabled=!1,pn.K.cacheAsset(this.game,J.Q.Spine_ui_roulette_json,pn.K.zoneAssetsCached),K.q.instance.prodigy.load.assets([J.Q.Spine_ui_roulette_json],(()=>{this.startSpin()}))}start(){}endSpin(){this.numSpins++,this.itemDrop=le.t.getItem(this.prizeItems[this.selectedIndex].item.type,this.prizeItems[this.selectedIndex].item.ID),this.popPrize(this.itemDrop,this.selectedIndex)}showDialogue(k){this.game.input.enabled=!0,this.dialogueController=K.q.instance.prodigy.dialogue.create();for(let B=0;B{K.q.instance.prodigy.open.membershipInfo((()=>{this.close()}),{conversionFunnelName:Sn.o.FunnelSecondWheelSpin})}});const B=yn.P.shouldUseUnifiedConversionFlow(Sn.o.FunnelSecondWheelSpin)?_n.R.UnifiedConversionFlow:Tn.J.showYouTubeMembershipAd(this.game,!0)?_n.R.Video:_n.R.Static,F=k.get("c47-20b6");F.purchase.sendFunnelStart(Object.assign(Object.assign({},this.getSegmentPurchaseFunnelTriggerTypeAndCategory()),{contentId:`prizeWheel-${this.assetID}`,adType:B,adVersion:yn.P.getAdVersion(Sn.o.FunnelSecondWheelSpin)})),F.economy.sendPrizeWheelSpinFailedEvent(mn.U.PrizeWheel,En.WE.MemberLocked)}this.showDialogue(U)}else this.close()}startSpin(){super.startSpin(),this.game.input.enabled=!1,Tn.J.isDefined(this.dialogueController)&&this.dialogueController.close(),K.q.instance.prodigy.gameContainer.get("c47-20b6").economy.sendPrizeWheelSpunEvent(mn.U.PrizeWheel)}tryAgain(){const k={yes:this.trySpin.bind(this),no:this.close.bind(this),text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(this.data.spinAgainDialogue),anim:4};this.showDialogue([k])}close(){K.q.instance.prodigy.notifications.startTimer(),this.game.input.enabled=!0;const k=K.q.instance.prodigy.world.getCurrentZone();K.q.instance.prodigy.world.getZone(k).exitDungeon(this.itemDrop),super.close()}getSegmentPurchaseFunnelTriggerTypeAndCategory(){return{type:"Second-Reward-Wheel-Spin",category:"Reward"}}popPrize(k,B){let U=k;if(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.isItemOwned({type:k.type,ID:k.ID})){const k={type:"currency",ID:19,N:this.prizeItems[B].item.duplicateValue};U=k}K.q.instance.prodigy.create.sprite(this.wheel.x+10,this.wheel.y+20,K.q.instance.prodigy.icon.iconKey(k),null,{x:.5,y:.5},(k=>{this.add(k),k.scale.x=2,k.scale.y=2,this.poofSpine=this.game.add.spine(this.wheel.x,this.wheel.y,J.Q.Spine_ui_roulette_json),this.poofSpine.setToSetupPose(),this.poofSpine.setAnimationByName(0,"animation",!1).time=4.4,this.add(this.poofSpine);const B=K.q.instance.prodigy.event.create();B.function((()=>{this.game.add.tween(k,this).to({y:j.cj9.between(-100,-50)},1e3,j.GS3.Quadratic.Out).to({y:900},1e3,j.GS3.Quadratic.In).delay(400).start(),this.game.add.tween(k,this).to({x:j.cj9.between(500,780),angle:Math.floor(wn.o.integerInRange(90,360))},2e3,j.GS3.Linear.None).delay(400).start()})),B.delay(2200),B.function((()=>{if("currency"===U.type){k.alpha=0;for(let B=0;B{this.game.input.enabled=!0,K.q.instance.prodigy.open.gotItem([U],(()=>{this.numSpins<2?this.tryAgain():this.close()}),null,null,null,null,{source_type:gn.C.PrizeWheel})})),B.start()}))}}class On extends vn.b{enterDungeon(k){j.Aq$.isDefined(k)?this.generatorConfig.setSeed(k):null===this.generatorConfig.getSeed()&&this.generatorConfig.setSeed(Date.now()),this.resetCooldown(),this.dungeon=K.q.instance.prodigy.gameContainer.get(this.dungeonGenerator),this.dungeon.initDungeon(this.generatorConfig),this.dungeonLayout=this.dungeon.createLayout(),this.collectedItems=null;const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=B.backpack.hasItem("currency",18);B.backpack.consume("currency",18,U),this.teleportInDungeon(this.dungeonLayout.start,640,280)}teleportInDungeon(k,B=640,U=280){j.Aq$.isDefined(this.collectedItems)||(this.collectedItems={}),this.mapConfig=k,this.teleport(this.mapConfig.tilemap,B,U,null,{fadeIn:!0,fadeOut:!0,time:200})}handleLeaving(k,B){this.resetCooldown(),this.consumeTargetCollectible(),super.handleLeaving(k,B)}exitDungeon(k=null){K.q.instance.prodigy.world.it(this.exitMap,855,480)}resetCooldown(){bn.B.setLastDungeonRun(this.game,this.ID,Date.now());K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.updated=!0}getBattleMods(){return{difficulty:this.generatorConfig.getBattleDifficulty(),drops:[{ID:19,type:"currency",N:5}]}}addCollected(k,B){j.Aq$.isDefined(this.collectedItems[k])||(this.collectedItems[k]=[]),this.collectedItems[k].push(B)}defeatMonster(k,B,U){super.defeatMonster(k,B,U),this.map.addCollected("monster"),this.ID===hn.A_.ARCHIVES&&K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.achievements.increment(fn.f.ArchiveEnemiesDefeated,1)}goToEnd(){const k=this.dungeon.getAllRooms();for(let B=0;B{new Cn(this.game,k.uiLayer,G,k,B)}));const j=Date.now();bn.B.setDungeonRunCompleteTime(this.game,this.ID,j)}}var In=U(4631),Dn=U(85126),Rn=U(84317),Pn=U(85182);class Mn extends Pn.T{constructor(k,B,U){super(k,B,1,"",{type:"seq",N:1},[`${U}-CR`],[],[],[],[],!1),this._towerName=U}setup(k,B,U){return super.setup(k,B,U),U.getTag()!==Vt.s.TOWER_COMMON_ROOM_SHORTFORM||this.zone.isQuestComplete(1)||K.q.instance.prodigy.world.playScene(`${this._towerName}-intro`),{quit:!0}}}var Nn=U(71802);class xn extends Nn.D{constructor(k,B,U,F,G){super(k,`floor${F}`,"",640,300,[...B,Z.c.Sfx_academy_portal_open,J.Q.Spine_archive_door_glow_json],U,G),this.counterUI=48,this.doorways=[{area:{x:640,y:220},exit:{x:640,y:560},walkTarget:{x:640,y:260}},{area:{x:1215,y:400},exit:{x:140,y:430},walkTarget:{x:1155,y:430}},{area:{x:640,y:640},exit:{x:640,y:300},walkTarget:{x:640,y:595}},{area:{x:60,y:400},exit:{x:1135,y:430},walkTarget:{x:120,y:430}}],this.floor=F}setup(k,B,U){super.setup(k,B,U);const F=this.zone;j.Aq$.isDefined(F.postBattleNootDialogue)&&F.postBattleNootDialogue.start(!0,(()=>{F.postBattleNootDialogue=null}),!0),this.dungeonZone.goalCollected===this.dungeonZone.goalTotal&&this.guideToExit(0)}start(k,B){super.start(k,B);const U=this.zone.Element;K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_ACADEMY,`BREADCRUMB_${U.toUpperCase()}_TOWER`),K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_ACADEMY,ln.B.BREADCRUMB_ACADEMY_SECOND_FLOOR)}addDoorGlow(k,B){}getName(){const k=this.zone.Element.toUpperCase();return this.zone.isTowerComplete()?K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(`MAP_${k}_TOWER`):K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(`MAP_${k}_TOWER_FLOOR`,this.floor)}}var Ln=U(25531),kn=U(77078),Bn=U(35569),Un=U(83726);class Fn extends Un.T{constructor(k,B,U){super(k,Vt.s.TOWER_COMMON_ROOM_SHORTFORM,`MAP_${U}_COMMON_ROOM`,1100,525,[Fn.ACADEMY_CR_1,k.wardenRoom],B),this.elevator=null,this.elevatorGuideHand=null,this._towerZone=null,this._towerZone=k}setup(k,B,U){super.setup(k,B,U),this.elevator=this.screen.contentGameObject.findChildByName("elevator"),this.elevator.addComponent(wi.H).init(B,wi._.Up,(()=>{this.enterTowerFloor()}));const F=q._.General_core_json,G="area-pointer",$=this._towerZone.Element;K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(Ei.l.AcademyTowerExitSign,B.aboveGameObject).catch((k=>{j.VyI.log(`Could not load tower exit sign: ${k.message}`,j.$bb.Warning)}));const H=K.q.instance.prodigy.gameContainer.get("PrefabService").getPrefabFromGuid(Ei.l.AcademyCommonRoomSignage);if(K.q.instance.prodigy.load.assets([Ei.l.AcademyCommonRoomSignage],(()=>{K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromJSONWithDependencies(H,B.aboveGameObject,void 0,void 0,Ei.l.AcademyCommonRoomSignage).catch((k=>{j.VyI.log(`Could not load Academy Room Signage: ${k.message}`,j.$bb.Warning)}))})),(!K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_ACADEMY,`BREADCRUMB_${$.toUpperCase()}_TOWER`)||this._towerZone.isBossDefeated&&this._towerZone.isWardenSaved&&!K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_ACADEMY_TOWERS,this._towerZone.elevatorBreadcrumb))&&(this.elevatorGuideHand=this.screen.foreground.addChild(K.q.instance.prodigy.create.sprite(this.elevator.transform.localPosition.x+20,this.elevator.transform.localPosition.y+80,F,G)),this.elevatorGuideHand.anchor.set(.5,.5),this.game.add.tween(this.elevatorGuideHand,this).to({y:this.elevatorGuideHand.y+25},400,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0)),K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_ACADEMY,ln.B.BREADCRUMB_ACADEMY_SECOND_FLOOR)||this.segment.academyTowers.sendFunnelEvent({funnelName:Ln.w.format("{0}_tower",this._towerZone.Element),funnelType:"feature",step:Bn.D.TowerCommonRoom}),this._towerZone.isTowerComplete()&&!this._towerZone.isWardenSaved){const k=this.elevator.findComponentInChildren(kn.p);k.onClicked.removeAll(),k.onClicked.add((()=>{const k=new Ti.rD(K.q.instance.game);k.addEvents([{dialogueData:k.dataProvider.get(this._towerZone.NootSaveWardenID),blockInput:!0}]),k.start(!1)}));const B=this.screen.foreground.addChild(K.q.instance.prodigy.create.sprite(400,240,F,G));B.anchor.set(.5,.5),this.game.add.tween(B,this).to({y:B.y+25},400,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0)}const V=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(V.backpack.hasItem("item",this._towerZone.WardenRoomKeyID)>0)!Si.c.instance.isPlayerQualified()||this._towerZone.isBossDefeated||this._towerZone.isWardenSaved||V.data.previousZone!==V.data.zone&&V.data.previousZone!==Fn.ACADEMY_CR_1||K.q.instance.game.time.events.addTimer(Vt.s.SECONDS_TO_MILLISECONDS_MULTIPLIER*Si.c.instance.getFtueData().delayInSeconds,(()=>{K.q.instance.prodigy.open.prefabMenu(Ei.l.PetXPBoostFTUEPopup).createContainer=!1}),null,null),this.addAreaEvent(k,B,{x:400,y:200,w:100,h:150,rect:!0},this._towerZone.wardenRoom,640,590,(()=>{K.q.instance.prodigy.world.it(this._towerZone.wardenRoom)}));else{const k=K.q.instance.prodigy.create.sprite(400,200,F,"empty",{x:.5,y:.5},null,120,160);k.inputEnabled=!0,k.alpha=0,k.events.onInputUp.add((()=>{this.screen.user.setValidPath(this.screen.path,400,260,(()=>(K.q.instance.prodigy.open.message(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TOWER_WARDEN_LOCKED")),{})))})),this.screen.content.addChild(k)}this.addAreaEvent(k,B,{x:1230,y:525,w:180,h:100,rect:!0},Fn.ACADEMY_CR_1,0,0)}enterTowerFloor(){if(this._towerZone.isBossDefeated&&this._towerZone.isWardenSaved){const k=K.q.instance.prodigy.event.create();k.enableInput(!0),k.function((()=>{K.q.instance.prodigy.open.towerEntranceMenu(this._towerZone.ID,this._towerZone.ItemTableID,(()=>{this.elevator.findComponent(wi.H).exit()}))})),k.start()}else{this._towerZone.sendSegmentEvent("Tower Run Started");K.q.instance.prodigy.world.zones[this._towerZone.ID].enterDungeon()}}cleanup(){this.elevator&&(this.elevator.destroy(),this.elevator=null),this.elevatorGuideHand&&(this.elevatorGuideHand.destroy(),this.elevatorGuideHand=null),super.cleanup()}}Fn.ACADEMY_CR_1="academy-CR1";class Gn extends Un.T{constructor(k,B,U){super(k,Vt.s.TOWER_WARDEN_ROOM_SHORTFORM,`MAP_${U}_WARDEN_ROOM`,640,590,[k.commonRoom],B),this._towerZone=k}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:640,y:640,w:180,h:80,rect:!0},this._towerZone.commonRoom,400,350);const F=B.contentGameObject.findChildByName(this._towerZone.Boss.tmxName),G=B.contentGameObject.findChildByName(this._towerZone.Warden.name),j=B.aboveGameObject.findChildByName("bubble");this._towerZone.isBossDefeated?(F.active=!1,j.active=!1,G.active=!1,this._towerZone.isWardenSaved||this._towerZone.playScene("freeWarden")):this._towerZone.playScene("battleShadowBoss")}}var jn=U(75781),$n=U(79340);class Hn extends $n.Z{constructor(k,B){super(k,Vt.s.TOWER_WARDEN_ROOM_SHORTFORM,B),this._towerZone=k}setup(k,B,U){super.setup(k,B,U),B.user.x=640,B.user.y=590}start(k,B){super.start(k,B,23);const U=()=>(0,G.sH)(this,void 0,void 0,(function*(){const U=B.addNPC(720,590,q._.Npc_sprite_noot_json);U.float(!0);const F=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),G=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);F.execute(G.getStateMachine(this._towerZone.FsmIDs.bossBattle),{game:k,screen:B,scene:this,player:B.user,noot:U,map:this},null)})),F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;ti.U.progressData.step===Ze.B.NotStarted&&F.hasFoundAllKeystones()?jn.E.runAllKeystonesSequenceOnMapSetup(U):U().catch(j.RQr.createHandler("AcademyTowerBossBattle start error invoking finishStarting()"))}startBattle(){K.q.instance.prodigy.battle.start({drops:[{type:"gold",N:100}],boss:{ID:this._towerZone.Boss.ID,element:this._towerZone.Element,name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(this._towerZone.Boss.localizedTextRef),attacks:this._towerZone.Boss.attacks,shadowBoss:!0,spineKey:this._towerZone.Boss.spineKey},screen:this._towerZone.Boss.battleBG,difficulty:this._towerZone.Boss.difficulty},null,(()=>{K.q.instance.prodigy.world.getZone(this._towerZone.ID).setBossDefeated(!0),K.q.instance.prodigy.gameContainer.get("c47-20b6").academyTowers.sendFunnelEvent({funnelName:Ln.w.format("{0}_tower",this._towerZone.Element),funnelType:"feature",step:Bn.D.TowerComplete}),K.q.instance.prodigy.world.it(this._towerZone.wardenRoom)}),null,this._towerZone.commonRoom)}}class Vn extends $n.Z{constructor(k,B,U){super(k,Vt.s.TOWER_COMMON_ROOM_SHORTFORM,B),this._fsmID=U}setup(k,B,U){super.setup(k,B,U)}start(k,B){super.start(k,B,11);const U=B.addNPC(950,525,q._.Npc_sprite_noot_json);U.float(!0),U.walkSpeed=2,U.visible=!0,U.flip(),B.user.x=1100,B.user.y=525,B.user.flip();const F=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),G=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);F.execute(G.getStateMachine(this._fsmID),{scene:this,game:k,screen:B,zone:this.zone,player:B.user,noot:U,path:B.path,pathfinder:B.path},null)}}var Wn=U(28402),qn=U(48975),Kn=U(87337),zn=U(59968);class Yn extends zn.R{constructor(k,B,U,F,G){const j=K.q.instance.game,$=new qn.s(j);$.init({npc_name:null==G?void 0:G.localizedTextRef,npc_type:Kn.ac.QuestGiver,x_coord:U,y_coord:F,npc_animation_id:"idle"}),super(j,B,$,null,U,F),this._warden=G,this.setup()}setup(){const k=K.q.instance.prodigy.create.element(this.sprites,0,0);this._wardenSpine=this.game.add.spine(0,0,this._warden.spine),this._wardenSpine.setAnimationByName(0,"idle",!0),k.add(this._wardenSpine),this.setupCollisionBlock(k),this.showName(),this.nameText.GameObject.legacyTransform.y=this._warden.nameTextPos.y,this.nameText.GameObject.legacyTransform.x=this._warden.nameTextPos.x,this._warden.flipSpine&&(this._wardenSpine.scale.x=-1,this.flip())}setupCollisionBlock(k){this._collisionBlock=k.add(K.q.instance.prodigy.create.emptySprite(-.5*k.width+0,-k.height,k.width,k.height)),this._collisionBlock.alpha=0,this._collisionBlock.inputEnabled=!0,this._collisionBlock.events.onInputDown.add(this.onClicked.bind(this))}onClicked(){const k=new Ti.rD(this.game);k.addEvents(this._warden.freedDialogueIDs.map((B=>({dialogueData:k.dataProvider.get(B),blockInput:!0})))),k.start(),this.sendNpcClickedEvent()}}class Qn extends $n.Z{constructor(k,B){super(k,Vt.s.TOWER_WARDEN_ROOM_SHORTFORM,B),this._towerZone=k}setup(k,B,U){super.setup(k,B,U),B.contentGameObject.findChildByName(this._towerZone.Boss.tmxName).active=!1}enterScene(k,B,U){super.enterScene(k,B,U)}start(k,B){var U;super.start(k,B,this._towerZone.bgmID),B.user.x=640,B.user.y=450,B.user.flip();const F=B.addNPC(720,450,q._.Npc_sprite_noot_json);F.float(!0),F.flip();const G=B.contentGameObject.findChildByName(this._towerZone.Warden.name);G.active=!1;const $=new Yn(B,B.content,G.transform.localPosition.x+this._towerZone.Warden.offset.x,G.transform.localPosition.y+this._towerZone.Warden.offset.y,this._towerZone.Warden);$.flip();const H=null!==(U=this._towerZone.Warden.bubbleAnimName)&&void 0!==U?U:"idle-tandem1",V=B.aboveGameObject.findChildByName("bubble");this._bubble=V.findComponentInChildren(Wn.v),this._bubble.getSpine().setAnimationByName(0,H,!0);const W=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),z=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);W.execute(z.getStateMachine(this._towerZone.FsmIDs.freeWarden),{game:k,screen:B,scene:this,player:B.user,warden:$,noot:F,map:this,bubble:this._bubble,path:B.path,pathfinder:B.path},null)}popBubble(){var k;const B=null!==(k=this._towerZone.Warden.bubblePopName)&&void 0!==k?k:"pop";this._bubble.getSpine().setAnimationByName(0,B)}cleanup(){this._bubble&&(this._bubble.destroy(),this._bubble=null),super.cleanup()}}class Xn extends On{get WardenRoomKeyID(){return this._towerData.wardenRoomKeyID}get TowerEventName(){return this._towerData.towerEventName}get Warden(){return this._towerData.warden}get Element(){return this._towerData.element}get KeystoneZone(){return this._towerData.keystone.zone}get Boss(){return this._towerData.boss}get FsmIDs(){return this._towerData.fsmIDs}get TotalFloors(){return this._towerData.floorConfigs.length}get ItemTableID(){return this._towerData.itemTableID}get NootSaveWardenID(){return this._towerData.saveWardenDialogueID}constructor(k,B){super(k),this.elevatorBreadcrumb=ln.B.BREADCRUMB_COMPLETED_ELEVATOR,this._towerData=null,this._academyTowerID=B,this.assets=[Rn.t.Tileset_classroom_png,Rn.t.Tileset_collisions_png,Z.c.Sfx_world,Z.c.Sfx_skywatch,J.Q.Spine_tower_elevator_json],this.dungeonGenerator="d16-1cb5"}init(k,B,U){super.init(k,B,U),U.zoneName!==this.wardenRoom&&U.zoneName!==this.commonRoom?this.bgmID=this._towerData.BGM.dungeon:this.isWardenSaved?this.bgmID=this._towerData.BGM.completed:this.bgmID=this._towerData.BGM.incomplete,j.Aq$.isDefined(this.getCurrentQuest())||this.startQuest(1),this.game.broadcaster.addAppListener(oi.f7.PagesCollected,(()=>{this.updatePagesCounter()}),this)}initData(){if(!j.Aq$.isDefined(this._towerData)){this._towerData=le.t.getItem("academyTower",this._academyTowerID).data,this.name=this._towerData.name,this.ID=this._towerData.towerID,this.wardenRoom=`${this.ID}-${Vt.A.TOWER_WARDEN_ROOM_SHORTFORM}`,this.commonRoom=`${this.ID}-${Vt.A.TOWER_COMMON_ROOM_SHORTFORM}`,this.questHub=this.ID,this.assets=[...this.assets,...this._towerData.assets],this.goalTotal=this._towerData.battlesPerFloor,this.exitMap=this.commonRoom,this.defaultOnFaint=this.commonRoom,this.prizeWheelId=this._towerData.itemTableID,this.battleBG=this._towerData.battleBG,this.bgmID=this._towerData.BGM.incomplete;const k=this.Warden.spine;this.maps={CR:new Fn(this,this.assets,this.TowerEventName.toUpperCase()),WR:new Gn(this,[...this.assets,k,J.Q.Spine_warden_bubble_container_json],this.TowerEventName.toUpperCase())},this.quests={1:new Mn(this,this.assets,this.ID)},this.scenes={intro:new Vn(this,[...this.assets,k,this.Warden.atlas,X.V.Bgm_fun],this.FsmIDs.intro),battleShadowBoss:new Hn(this,this.assets),freeWarden:new Qn(this,[...this.assets,k,Z.c.Sfx_bubble_pop])}}}updatePagesCounter(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let B=k.state.get(`towers-${this.ID}-achievementPagesCount`);B=j.Aq$.isDefined(B)?B:0,B++,k.state.set(`towers-${this.ID}-achievementPagesCount`,B)}handleLeaving(k,B){if(k!==In.j.mapTeleport){const U=K.q.instance.prodigy.world.getCurrentMap().split("-")[1];if(U!==Vt.A.TOWER_COMMON_ROOM_SHORTFORM&&U!==Vt.A.TOWER_WARDEN_ROOM_SHORTFORM){const k=this.goalCollected;K.q.instance.prodigy.open.dungeonExitMenu(this.ID,this._towerData.battlesPerFloor,k,!1,B)}else super.handleLeaving(k,B)}else this.sendSegmentEvent("Tower Run Completed"),super.handleLeaving(k,B)}get CurrentFloor(){if(0===this.FloorStates)return 1;for(let k=1;k<=this.TotalFloors;k++)if(!cn.O.areBitsSet(this.FloorStates,1<0}setBossDefeated(k){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.set(`towers-${this.ID}-boss`,k)}get isBossDefeated(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return $.get(k.state.data,`towers.${this.ID}.boss`,!1)}get isWardenSaved(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return $.get(k.state.data,`towers.${this.ID}.wardenSaved`,!1)}get goalCollected(){return this.monstersDefeated}getBattleMods(){const k=super.getBattleMods(),B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return this.CurrentFloor===this.TotalFloors&&0===B.backpack.hasItem("item",this._towerData.wardenRoomKeyID)&&this.monstersDefeated===this._towerData.battlesPerFloor-1&&k.drops.push({ID:this._towerData.wardenRoomKeyID,type:"item",N:1}),k}getFloorConfig(k){return this._towerData.floorConfigs[k-1]}defeatMonster(k,B,U,F=[]){if(super.defeatMonster(k,B,U),this.monstersDefeated===this._towerData.battlesPerFloor){this.postBattleNootDialogue=K.q.instance.prodigy.dialogue.create();const k=!this.isWardenSaved&&this.isTowerComplete()?this._towerData.afterKeyFoundDialogueIDs:[267];this.postBattleNootDialogue.addEvents(k.map((k=>({dialogueData:this.postBattleNootDialogue.dataProvider.get(k),blockInput:!0}))))}const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let j=Xn.getAchievementMonstersCount(this.game,this.ID);F.length>0?F.forEach((k=>{this._towerData.achievementMonsterIDs.includes(k.getID())&&j++})):this._towerData.achievementMonsterIDs.includes(k)&&j++,G.state.set(`towers-${this.ID}-achievementMonstersCount`,j),this.skipProgressBarAnimation=!1}exitDungeon(k=null){this.isBossDefeated&&this.sendSegmentEvent("Tower Floor Completed"),this.sendSegmentEvent("Tower Run Completed"),super.exitDungeon(k)}static getAchievementMonstersCount(k,B){const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=U.state.get(`towers-${B}-achievementMonstersCount`);return un.o.isNumber(F)?F:(U.state.set(`towers-${B}-achievementMonstersCount`,0),0)}static getAchievementPagesCount(k,B){const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=U.state.get(`towers-${B}-achievementPagesCount`);return un.o.isNumber(F)?F:(U.state.set(`towers-${B}-achievementPagesCount`,0),0)}enterDungeon(k){const B=this.getFloorConfig(this.CurrentFloor).generator;this.generatorConfig=K.q.instance.prodigy.gameContainer.get("aaa-9186").getDungeon(B),super.enterDungeon(k),this.sendSegmentEvent("Tower Floor Started"),this.isWardenSaved&&!K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_ACADEMY_TOWERS,this.elevatorBreadcrumb)&&K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_ACADEMY_TOWERS,this.elevatorBreadcrumb)}teleport(k,B,U,F,G){if(K.q.instance.prodigy.world.getZone(hn.A_.ACADEMY).getKeystoneState(this.KeystoneZone)===Dn.s.Placed){let $=G;k!==Vt.A.TOWER_COMMON_ROOM_SHORTFORM&&k!==Vt.A.TOWER_WARDEN_ROOM_SHORTFORM&&"end"!==k||($={}),j.Aq$.isDefined(G.timeWhenPreviousZoneLoaded)&&($.timeWhenPreviousZoneLoaded=G.timeWhenPreviousZoneLoaded),j.Aq$.isDefined(G.callback)&&($.callback=G.callback),j.Aq$.isDefined(this.mapConfig)&&k!==Vt.A.TOWER_COMMON_ROOM_SHORTFORM&&k!==Vt.A.TOWER_WARDEN_ROOM_SHORTFORM&&(this.map=new xn(this,this.assets,this.mapConfig,this.CurrentFloor,`map-${this.Element}-tower`),this.maps={CR:this.maps[Vt.A.TOWER_COMMON_ROOM_SHORTFORM],WR:this.maps[Vt.A.TOWER_WARDEN_ROOM_SHORTFORM],[k]:this.map}),super.teleport(k,B,U,F,$)}else K.q.instance.prodigy.world.it(hn.A_.HOUSE)}cleanup(){this.game.broadcaster.removeAppListener(oi.f7.PagesCollected,this),super.cleanup()}start(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(j.Aq$.isDefined(this._towerData.betaPopup)&&Object.values(this.quests).length=this._towerData.betaPopup.cooldownTimeInSeconds&&(F.data.betaPopupCooldownTime=k.getTime(),K.q.instance.prodigy.open.prefabMenu(this._towerData.betaPopup.prefabID))}super.start(k,B,U)}sendSegmentEvent(k){const B=K.q.instance.prodigy.gameContainer.get("c47-20b6").playerMovementAndDiscovery,U=this.TowerEventName,F=this.isWardenSaved?dn.ss.Random:dn.ss.Normal;switch(k){case"Tower Run Completed":B.sendTowerRunCompletedEvent(U,this.isTowerComplete());break;case"Tower Floor Completed":B.sendTowerRunFloorCompletedEvent({tower_type:U,floor_id:this.isWardenSaved?this.TotalFloors:this.CurrentFloor-1,floor_type:F});break;case"Tower Floor Started":B.sendTowerRunFloorStartedEvent({tower_type:U,floor_id:this.CurrentFloor,floor_type:F});break;case"Tower Run Started":B.sendTowerRunStartedEvent(U,this.isTowerComplete())}}}let Zn=class{constructor(k,B,U,F){this.game=null,this.game=k,this.localizer=B,this.playerProvider=U,this.uuidProvider=F}updateAchievementsCompletion(){const k=K.q.instance.prodigy.gameContainer.get("db5-fb6e");return Vt.A.get("GameConstants.Debug.DISABLE_ACHIEVEMENTS")?[]:le.t.getCategoryItems("achievement").filter((B=>{if(!B.data.group)return!1;if(B.data.requirements){if(!k.meetsRequirementsDeprecated(B.data.requirements))return!1}const U=this.playerProvider.player.achievements.getProgress(B.ID);if(U>=B.data.ranks.length)return!1;const F=this.getAchievementValue(B.data.valueFunction);return F>=B.data.ranks[U]&&(F>=B.data.ranks.length&&!B.data.reward&&K.q.instance.prodigy.gameContainer.get("c47-20b6").create.achievementComplete({level:this.playerProvider.getLevel(),session_uuid:this.uuidProvider.getUUID(),achievement_name:this.getName(B),achievement_id:B.ID,transaction_id:rn.$.generateUID()}).send(),!0)}))}isComplete(k){return this.playerProvider.player.achievements.getProgress(k.ID)>=k.data.ranks.length}isRewardClaimed(k){return this.playerProvider.player.achievements.getProgress(k.ID)>k.data.ranks.length}canClaimReward(k){return k.data.reward&&this.playerProvider.player.achievements.getProgress(k.ID)===k.data.ranks.length}getCompletionText(k){const B=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);return this.isComplete(k)?B.getText("ACHIEVEMENT_FINISHED"):this.getProgress(k)>=1?B.getText("ACHIEVEMENT_COMPLETED"):`${this.getCurrent(k)} / ${this.getTarget(k)}`}getCurrent(k){let B=this.getAchievementValue(k.data.valueFunction);return(!j.Aq$.isDefined(B)||B<0)&&(B=0),B}getTarget(k){const B=this.playerProvider.player.achievements.getProgress(k.ID);return B>=k.data.ranks.length?0:k.data.ranks[B]}getProgress(k){if(this.isComplete(k))return 1;const B=this.getCurrent(k),U=this.getTarget(k);return Math.min(1,B/U)}getName(k){return this.localizer.getText(k.data.title)}getCategory(k){return this.localizer.getText(k.data.title)}getDesc(k){let B=this.playerProvider.player.achievements.getProgress(k.ID);B>=k.data.ranks.length&&(B=k.data.ranks.length-1);const U=k.data.ranks[B];return j.Aq$.isDefined(U)?this.localizer.getText(k.data.desc).replace("[X]",U.toString()):"Nothing"}getUnclaimedRewards(k=le.t.getCategoryItems("achievement")){return k.filter((k=>this.canClaimReward(k)))}processValue(k){return this.playerProvider.player.achievements.getTag(k)}getAchievementValue(k){var B;let U=0;const F=this.playerProvider.player,G=F.backpack,$=F.kennel,H=F.house,V=F.state,W=k.params,q=k.type;switch(q){case"hasPlayerCompletedTutorial":U=F.hasCompletedTutorial()?1:0;break;case"processValue":U=this.processValue(W.achievementTag);break;case"numberOfItemsInBackpack":U=G.getItemCount(W.backpackItemsTypes);break;case"numberOfItemsInHouse":U=H.getItemCount();break;case"numberOfActiveItemsInHouse":U=H.getActiveCount();break;case"numberOfPets":U=$.getNumPets();break;case"playerLevel":U=F.getLevel();break;case"playerRelicCount":U=F.getNumRelics();break;case"numberOfCompletedQuests":U=V.getCompletedQuests(W.zone);break;case"areItemsPresentInBackpack":U=G.hasItems(W.backpackItems)+H.hasItems(W.backpackItems);break;case"givenTagInZone":U=V.getZoneVars(this.game,W.zone,W.zoneTag);break;case"getSingleStateValue":U=null!==(B=V.get(W.state))&&void 0!==B?B:0;break;case"numberOfStatesCompletedInShipwreckShore":U=K.q.instance.prodigy.world.getZone(hn.A_.SHIPWRECK).getCompletedStatesCount(W.shipwreckShoreStates);break;case"playerAnswerStreakCount":U=F.getAnswerStreak();break;case"masteredSkillsCount":U=K.q.instance.prodigy.education.getMasteredSkills();break;case"towerProgress":U=F.getTowerProgress();break;case"playerColiseumRank":U=F.getColiseum();break;case"isElementalTowerBossDefeated":U=K.q.instance.prodigy.world.getZone(W.elementalTower).isBossDefeated?1:0;break;case"towerPageCount":U=Xn.getAchievementPagesCount(this.game,W.elementalTower);break;case"towerMonsterCount":U=Xn.getAchievementMonstersCount(this.game,W.elementalTower);break;case"elementalTowerCurrentFloor":U=K.q.instance.prodigy.world.getZone(W.elementalTower).CurrentFloor;break;case"isSingleItemPresentInBackpack":{const k=W.backpackItems[0];U=G.hasItem(k.type,k.ID);break}default:(0,rs.v)(!1,`No achievement value function "${q}"`)}return(0,rs.v)(j.Aq$.isDefined(U),`The return value from getAchievementValue for value function "${q}" is not valid.`),U}};Zn=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)("51c-03a0")),(0,G.Qj)(1,(0,tt.inject)(j.$Bt.LocalizationService)),(0,G.Qj)(2,(0,tt.inject)("e20-0fb0")),(0,G.Qj)(3,(0,tt.inject)("2e6-0f71")),(0,G.Sn)("design:paramtypes",[an.n,j.dTp,Wt.E,on.H])],Zn);var Jn=U(8872),ta=U(30334),ea=U(47315);class ia{static getEncounterRate(k){const B=le.t.getItem("pet",k).data;return j.Aq$.isDefined(B)?j.Aq$.isDefined(B.R)?B.R:1:0}process(){const k=14549017,B=le.t.getCategoryItems("pet"),U=[4,4,4,4,4,4,4,12,30,30];let F='';for(let G=0;G`;F+='';for(let G=0;G"+U.ID+'"}F+="
      IDIconMemberElementLifePowerNameDescriptionInformation


      '+(U.data.member?"yes":"no")+''+U.data.element+''+U.data.life+''+U.data.power+'"+U.data.name+'"+U.data.flavorText+'
      '+H+"
      "+V+"
      ",j.VyI.log(F,j.$bb.Verbose)}}var sa=U(38487),na=U(86896),aa=U(7914),ra=U(25048),oa=U(66726),ha=U(8811),ca=U(30424),da=U(82329),la=U(10655),ua=U(37639),fa=U(55734),ba=U(89360),pa=U(47223),va=U(71543),ga=U(50503),ma=U(71796),ya=U(93709),_a=U(32740),Ea=U(36279);class wa{get battleMods(){return this._battleMods}constructor(k,B){this.game=null,this.battleStats=null,this.game=k,this.metricsManager=B,this.battleStats=new Ea.g}start(k,B,U,F,G,$=!1){K.q.instance.prodigy.gameContainer.get("a25-68f4").getBattleStartQuestData(k.revampBattleType).catch((k=>{j.RQr.createHandler("Error getting battle quest data, starting battle with no quest data")(k)})).then((j=>{this.continueBattleStart(k,B,U,F,G,j)})).catch(j.RQr.createHandler("Error continuing the battle start function in BattleController"))}continueBattleStart(k,B,U,F,G,H){var V,W,q,z,Y,Q,X,Z,J,tt,et,it,st;const nt=$.extend({},wa.MOD_DEFAULTS,k);this._battleMods=nt;const at=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,rt=!0===(null===(V=at.battleResumeData)||void 0===V?void 0:V.nextBattleIsResume),ot=K.q.instance.prodigy.world.getZone(K.q.instance.prodigy.world.getCurrentZone()),ht=null==ot?void 0:ot.getMap(K.q.instance.prodigy.world.getCurrentMapTag()),ct=j.Aq$.isDefined(k.difficulty)?k.difficulty:ta.z,dt=Math.max(hi.s.minLevel,ga.A.getEnemyLevel(at.getLevel(),ct)),lt=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),ut=this.initBattle(nt,dt),ft=(null===(W=nt.boss)||void 0===W?void 0:W.ID)?le.t.getItem("boss",nt.boss.ID):null,bt=ut.reduce(((k,B,U)=>{var F;return k[`enemy-${U}`]=Object.assign(Object.assign({},B.data),{asset:{id:B.getID(),type:this.getCreatureUnitType(B)},appearance:B instanceof pa.s?this.translateWizardAppearance(B.appearance):void 0,equipment:B instanceof pa.s?this.translateWizardEquipment(B.equipment):void 0,ignoreEquipmentSpells:B instanceof pa.s?null===(F=null==ft?void 0:ft.metadata)||void 0===F?void 0:F.ignoreEquipmentSpells:void 0,drops:B.getDrops().filter((k=>k)),nickname:B.data.nickname&<.hasText(B.data.nickname)?lt.getText(B.data.nickname):B.data.nickname,level:B.data.level,mergeRank:B.data.mergeRank,skipDefeatedPetStep:B.data.skipDefeatedPetStep}),k}),{}),pt={battleType:null!==(q=nt.revampBattleType)&&void 0!==q?q:Ni.gu.Basic,minTeamSize:nt.minTeamSize,maxTeamSize:nt.maxTeamSize,level:null!==(z=this.getLevelRangeConfig(nt.minLevel,nt.maxLevel))&&void 0!==z?z:nt.level,difficulty:nt.difficulty,opponents:{units:bt},cooldown:nt.cooldown,activeQuestIDs:null==H?void 0:H.questIDs,questEventsToSend:null==H?void 0:H.questEvents};j.Aq$.isDefined(k.towerFloor)&&(pt.currentFloor=k.towerFloor,pt.rouletteResult=k.revampRouletteNumber,pt.opponents.units={});const vt=null!==(Y=(st=at.data).battleResumeDataClient)&&void 0!==Y?Y:st.battleResumeDataClient={};pt.clientState=null!==(X=null===(Q=at.battleResumeData)||void 0===Q?void 0:Q.data)&&void 0!==X?X:{},rt||(vt.currentBackground=null!==(Z=k.screen)&&void 0!==Z?Z:null==ht?void 0:ht.battleBG,va.p.shouldStoreTriggerDataWithBattle(nt)&&(pt.clientState.battleTriggerData={encounterMap:K.q.instance.prodigy.world.getCurrentMap(),encounterPosition:this.game.broadcaster.broadcast(oi.pm.GetTarget,this.game,[!0])}),at.updated=!0);const gt=K.q.instance.prodigy,mt=null===(J=gt.world.getZone(null==G?void 0:G.split("-")[0]))||void 0===J?void 0:J.getOnFaintData(),yt={backgroundID:null!==(tt=vt.currentBackground)&&void 0!==tt?tt:"battle-coliseum-outside",backgroundMusicID:k.backgroundMusic,victoryMusicID:k.victoryMusic,onEscape:B?()=>B():()=>K.q.instance.prodigy.world.teleportToCurrentMap(),onDefeat:F?()=>F():()=>K.q.instance.prodigy.world.teleportToCurrentMap(),onVictory:()=>{U(k,ut)},addZoneCurrency:k.addZoneCurrency,enableTeamDrops:!k.dropsDisabled,scaleGuaranteedDrops:k.scaleGuaranteedDrops,guaranteedDrops:k.drops,defeatData:{teleportData:mt},showQiBadgeAnimations:null!==(et=k.showQiBadgeAnimations)&&void 0!==et?et:nt.showQiBadgeAnimations,requirements:nt.requirements},_t=gt.game.state.states.get(Ie.G.SecureBattleRevamp);rt?_t.resumeBattleRequest(pt,yt):K.q.instance.prodigy.gameContainer.get("54c-b7de").initiateTeamSelection(null!==(it=k.revampBattleType)&&void 0!==it?it:Ni.gu.Basic,k,pt,(()=>_t.startBattleRequest(pt,yt))).catch(j.RQr.createHandler("BattleController: Error initiating universal team selection before starting battle"))}getLevelRangeConfig(k,B){if(j.Aq$.isDefined(k)&&j.Aq$.isDefined(B))return{min:k,max:B}}getCreatureUnitType(k){return k instanceof pa.s?Ni.uj.Wizard:k instanceof la.A?Ni.uj.Titan:k instanceof sa.s?Ni.uj.Boss:Ni.uj.Pet}replaceOpponentTeam(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=!0){const U=this.game.state.get(Ie.G.Battle),F=$.extend({},wa.MOD_DEFAULTS,k);return yield U.replaceOpponentTeam(this.initBattle(F,this.battleStats.level),F,B),U.teams[1]}))}onEndBattle(){const k=K.q.instance.prodigy.battle.battleStats.type;K.q.instance.prodigy.gameContainer.get("0f1-c356").onWeeklyChallengeBattleEnd(k).then((()=>{ba.h.instance.updateData()})).catch((k=>{j.VyI.log(`BattleStats update failed: ${j.RQr.stringify(k)}`,j.$bb.Warning)})),K.q.instance.prodigy.load.removeAssets(),this._assets=null}chooseAction(k,B,U,F,G,$,H,V,W){const q=U.source.getCurrentBamSpells();if(q.length<=0)return j.VyI.log(`Enemy ${U.name} has no spells. Skipping turn.`,j.$bb.Warning),void W();if(B&&Math.random()-1?Y=Q:Math.random()<=k/ga.A.MAX_DIFFICULTY&&G.getCurrentEnergy()>=3&&z.length>0&&(G.changeEnergy(-3),Y=z[j.cj9.between(0,z.length-1)]),!j.Aq$.isDefined(Y))return j.VyI.log("Invalid attack, skipping turn",j.$bb.Warning),void W();H(U,$,W,Y,ga.A.rollMissChance(k,U.getSource().modifiers.miss))}getBattleLevel(k=null){let B=0;if(j.Aq$.isDefined(k))for(let U=0;Uk))}battleScore(k,B,U,F){const G=ga.A.getBestAttack(k.getSource().getAttacks(),k.getSource(),B.getSource(),1-F),j=ga.A.getBestAttack(B.getSource().getAttacks(),B.getSource(),k.getSource(),1-F),$=ga.A.calculateDamage(k.getSource(),k.getSource()instanceof ua.K,B.getSource(),G,{}).damage;if(0===$)return Number.NEGATIVE_INFINITY;const H=ga.A.calculateDamage(B.getSource(),B.getSource()instanceof ua.K,k.getSource(),j,{}).damage;if(0===H)return Number.POSITIVE_INFINITY;let V=k.source.getMaxHearts();U||(V=Math.max(V-H,0));return V/H-k.source.getMaxHearts()/$+(k.battleShy?wa.BATTLE_SHY_MODIFIER:0)}chooseRandomMonster(k){j.Aq$.isDefined(wa.DEBUG_OVERRIDE_MONSTER_ID)&&(k=[{ID:wa.DEBUG_OVERRIDE_MONSTER_ID,R:1}]);let B=0;for(let F=0;F=W.difficultyStreakBench.max;return U=$&&H?1:H||q?F:$||z?G:F>=G?F:wn.o.integerInRange(F,G+1),U}initBattle(k,B){var U,F,G,H,V,W,q;const K=[],z=this.determineOpponentTeamSize(k.minTeamSize,k.maxTeamSize);if(j.Aq$.isDefined(k.boss)){j.Aq$.isDefined(k.boss.level)||(k.boss.level=B),k.boss.level+=j.Aq$.isDefined(k.boss.levelOffset)?k.boss.levelOffset:0;const V=null!==(U=k.minLevel)&&void 0!==U?U:hi.s.minLevel,W=null!==(F=k.maxLevel)&&void 0!==F?F:hi.s.activePlayerLevelCap;k.boss.level=$.clamp(k.boss.level,V,W);const q=le.t.getItem("boss",k.boss.ID);(null===(G=null==q?void 0:q.data)||void 0===G?void 0:G.category)===Ni.GJ.Wizard&&q.ID!==Ni.JT?(k.opponent=[{data:{ID:k.boss.ID,level:k.boss.level,nickname:k.boss.nickname}}],k.difficulty=null!==(H=q.data.difficulty)&&void 0!==H?H:k.difficulty,K.push(...this.initNonBossEnemyTeam(k,B,z))):K.push(...this.initBossEnemyTeam(k,B,z))}else K.push(...this.initNonBossEnemyTeam(k,B,z));if(j.Aq$.isDefined(k.pets))for(let Y=0;Y3&&(K.length=3),j.Aq$.isDefined(k.opponent))for(let $=0;$=3&&(K.length=3)}if(j.Aq$.isDefined(k.teamModifiers))for(let j=0;j0){const B=k.encounter[0];F={ID:B.ID,level:B.level,drops:j.Aq$.isDefined(B.drops)?B.drops:[],nickname:B.nickname}}else{if(!(k.pets&&k.pets.length>0))return;F=Object.assign(Object.assign({},k.pets[0]),{ID:k.pets[0].ID,level:k.pets[0].level+(null!==(U=k.pets[0].levelOffset)&&void 0!==U?U:0),nickname:k.pets[0].nickname}),k.pets.shift()}return j.Aq$.isDefined(F.level)&&!k.scale&&(G=F.level),this.initEnemy(F,k,G)}}initBackupEnemy(k,B,U){if(!j.Aq$.isDefined(k))return;const F=Math.random()*$.sumBy(k,(k=>k.weight));let G=0;for(let $=0;$B===k)))return!1;const B=k.split("-")[0];return(B!==hn.A_.LAMPLIGHT||void 0===K.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival())&&(!!this.lockedZones.includes(B)||!!this.lockedMaps.includes(k))}onClassMode(k,B){const U=k.split("-"),F=Ta.i.getZoneData(U[0]);K.q.instance.prodigy.open.classModeMessage(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(F.classCodeKey),B,null,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(F.nameKey),F.classModeFrame,{isModal:!0},F.nameKey)}}var Aa=U(42749),Ca=U(67255),Oa=U(68370),Ia=U(28962);let Da=class{get OnDownBlocked(){return this.onDownBlocked}set InputMask(k){this.inputMask=k}constructor(k){this.onDownBlocked=new j.HN0,this.inputMask=0,this.input=k.input}setBlockType(k,B){k.blockType=B}getBlockType(k){var B;return null!==(B=null==k?void 0:k.blockType)&&void 0!==B?B:0}inputFilter(k,B,U){return this.lastTarget=U,this.isBlocked(U)?null:U}handleClick(){j.Aq$.isDefined(this.lastTarget)&&this.isBlocked(this.lastTarget)&&this.onDownBlocked.dispatch()}isBlocked(k){return 0==(this.inputMask&this.getBlockType(k))}start(){this.input.onDown.add(this.handleClick,this),this.input.setInteractiveCandidateHandler(this.inputFilter,this)}pause(){this.input.onDown.remove(this.handleClick,this),this.input.setInteractiveCandidateHandler(null,this)}destroy(){this.pause(),this.onDownBlocked.dispose(),this.inputMask=0,this.lastTarget=null}};Da=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)("51c-03a0")),(0,G.Sn)("design:paramtypes",[an.n])],Da);var Ra=U(23748),Pa=U(35564);class Ma{constructor(k,B){this.ot=k,this._player=B}sendEffectMessage(k,B,U){const F={action:Pa.x.FX,data:{type:k,x:B,y:U}};this.ot.emitMessage(F)}}let Na=class{get onBegin(){return this._onBegin}get onComplete(){return this._onComplete}get onFire(){return this._onFire}constructor(k,B,U,F){this._onBegin=new j.HN0,this._onComplete=new j.HN0,this._onFire=new j.HN0,this._fxSocketHandler=null,this._game=k,this._effects=K.q.instance.prodigy.effects,this._fxSocketHandler=new Ma(K.q.instance.prodigy.gameContainer.get("c97-bd0d"),F.player),this._prefabLoader=B,this._localizer=U}doEffect(k){var B,U;const F=k.data.effect.fx,G=le.t.getItem("fx",F).data,$=G.type;if("projectile"===$)this.doProjectile(F,G.name,G.projectileCount,G.delay);else if("firework"===$){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer,G=j.wa5.getActiveScene().container.get("MainPlayerGameObject"),$=null!==(U=null===(B=null==k?void 0:k.transform)||void 0===B?void 0:B.position)&&void 0!==U?U:G.transform.worldPosition;this._fxSocketHandler.sendEffectMessage(F),this._effects.playFX(F,$.x,$.y,void 0,void 0,(()=>{this._onComplete.dispatch()})),this._onFire.dispatch()}}reset(){this.destroyUI(),this._onBegin.removeAll(),this._onFire.removeAll(),this._onComplete.removeAll()}doProjectile(k,B,U,F){this._onBegin.dispatch(),this._inputBlocker=new Da(this._game),this._inputBlocker.InputMask=Ia.z.AIMING_OVERLAY|Ia.z.SYSTEM_INFO|Ia.z.REAR_OVERLAY,this._inputBlocker.start(),this._clickOverlay=new j._mx,this._clickOverlay.layer="ui",this._clickOverlay.addComponent(j.K16),this._clickOverlay.legacyTransform.x=.5*this._game.width,this._clickOverlay.legacyTransform.y=.5*this._game.height;const G=this._clickOverlay.addComponent(kn.p);G.Width=this._game.width,G.Height=this._game.height,G.blockType=Ia.z.AIMING_OVERLAY;const $=this._prefabLoader.loadFromGUID(Ei.l.WaterBalloonInstructionPanel);$.findComponentInChildren(j.EYj).text=this._localizer.getText("PROJECTILE_INSTRUCTIONS",B),this._instructionContainer=new j._mx,this._instructionContainer.layer="ui",this._instructionContainer.addComponent(j.dLy),Oa.b.make(this._instructionContainer,$.legacyTransform),G.onClicked.addOnce((()=>{const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer,G=j.wa5.getActiveScene().container.get("MainPlayerGameObject"),$=j.Aq$.isDefined(B),H=$?B.position:G.transform.worldPosition,V=$?this._game.input:Ra.z.convertScreenToWorldPosition(this._game.input);this._fxSocketHandler.sendEffectMessage(k,V.x,V.y);let W=U;do{const B=1===W;window.setTimeout((()=>{this._effects.playFX(k,H.x,H.y,V.x,V.y,(()=>{B&&this._onComplete.dispatch()}))}),F*W),W--}while(W>0);this.endEffect(!0)}),this)}endEffect(k){this.destroyUI(),k?this._onFire.dispatch():this._onComplete.dispatch()}destroyUI(){var k,B,U;null===(k=this._clickOverlay)||void 0===k||k.destroy(),null===(B=this._instructionContainer)||void 0===B||B.destroy(),null===(U=this._inputBlocker)||void 0===U||U.destroy()}};Na=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)("51c-03a0")),(0,G.Qj)(1,(0,tt.inject)("d0e-64fd")),(0,G.Qj)(2,(0,tt.inject)(j.$Bt.LocalizationService)),(0,G.Qj)(3,(0,tt.inject)("e20-0fb0")),(0,G.Sn)("design:paramtypes",[an.n,j.wNP,j.dTp,Wt.E])],Na);var xa=U(55110),La=U(21492);let ka=class{constructor(k,B,U){this.providers=new Map,this.localizationService=B,U.forEach((k=>{this.providers.set(k.getZoneID(),k)}))}isAvailable(k){if(!this.providers.has(k))return!1;const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return this.providers.get(k).isActive(B)}isLocked(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(j.Aq$.isDefined(k.member)&&k.member&&!B.hasMembership())return!0;if(!j.Aq$.isDefined(k.req))return!1;for(let U=0;U{K.q.instance.game.tweens.remove(this.currentTween),this.currentTween=this.game.add.tween(this,this).delay(k),this.currentTween.onTweenComplete.add(this.closeNotification,this)}))}closeNotification(){this.game&&(K.q.instance.game.tweens.remove(this.currentTween),this.currentTween=this.game.add.tween(this.notificationContainer,this).to({alpha:0},250,j.GS3.Linear.None,!0,0),this.currentTween.onTweenComplete.add(this.close,this))}runNotificationCallback(){this.notificationCallback(),this.closeNotification()}onPause(){var k;this.visible=!1,null===(k=this.currentTween)||void 0===k||k.pause()}onResume(){var k;this.visible=!0,null===(k=this.currentTween)||void 0===k||k.resume()}close(){var k;this.currentTween&&K.q.instance.game.tweens.remove(this.currentTween),this.game&&K.q.instance.prodigy.notifications.notificationPlayed(),null===(k=this.closeCallback)||void 0===k||k.call(this),super.close()}}za.configModifiers={};class Ya extends za{constructor(k,B,U,F=null,G=null){super(k,B,47,U,F,G,[q._.Ui_daily_question_json,J.Q.Spine_questionsanswered_confetti_json]),this.stopAnimation=!1,this.closeButton=null,this.contractButton=null,this.rewardsButton=null,this.rewardsButtonComplete=null,this.game=k}preprocess(){this.queuePostCreateCallback((()=>{this.renderCell()}),(()=>{this.setAnimation(1e4)}))}onCloseClickCallback(k=null){this.close(),k()}renderCell(){if(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getDailyQuestions().isCurrentDayComplete()){const k=this.add(K.q.instance.prodigy.create.sprite(-10,-10,q._.General_core_json,"overlay-small"),0);k.width=1300,k.height=740,k.alpha=0,k.inputEnabled=!0}this.contractButton.onUpCallback=this.onCloseClickCallback.bind(this,this.closeNotification.bind(this)),this.closeButton.onUpCallback=this.onCloseClickCallback.bind(this,this.closeNotification.bind(this)),this.rewardsButton.onDownCallback=this.onCloseClickCallback.bind(this,K.q.instance.prodigy.open.dailyQuestionsMenu.bind(K.q.instance.prodigy.open)),this.rewardsButtonComplete.onDownCallback=this.onCloseClickCallback.bind(this,K.q.instance.prodigy.open.dailyQuestionsMenu.bind(K.q.instance.prodigy.open,null,!0)),this.sliderAnimation(),this.progressBarTween.start()}sliderAnimation(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getDailyQuestions(),B=k.getNumRequiredToday();k.hasPreviousData()?this.progressSlider.setPercentComplete(k.getPreviousNumAnsweredToday()/B):this.progressSlider.setPercentComplete(k.getNumAnsweredToday()/B),k.clearPreviousData(),this.counterText.setText(`${Math.floor(this.progressSlider.getPercentageComplete()*B)}/${B}`);const U={percent:this.progressSlider.getPercentageComplete()};let F=0;const G=k.getNumAnsweredToday()/B;F=Ra.z.clampedLerp(.01,1,G),this.progressBarTween=this.game.add.tween(U,this),this.progressBarTween.to({percent:F},1e3,j.GS3.Cubic.Out,!1,500),this.progressBarTween.onUpdateCallback((()=>{this.stopAnimation||(this.progressSlider.setPercentComplete(U.percent),this.counterText.setText(`${Math.floor(this.progressSlider.getPercentageComplete()*B)}/${B}`))})),this.progressBarTween.onTweenComplete.add((()=>{if(!this.stopAnimation&&(this.progressSlider.setPercentComplete(F),this.counterText.setText(`${k.getNumAnsweredToday()}/${B}`),1===F)){this.closeButton.visible=!1,this.contractButton.onUpCallback=this.onCloseClickCallback.bind(this,K.q.instance.prodigy.open.dailyQuestionsMenu.bind(K.q.instance.prodigy.open,null,!0));const k=this.game.add.spine(300,10,J.Q.Spine_questionsanswered_confetti_json);k.setAnimationByName(0,"animation",!0),this.notificationContainer.add(k,5),this.rewardsButton.onDownCallback=null;this.game.add.tween(this.rewardsButton.scale,this).to({x:0,y:0},200,j.GS3.Linear.None).start(),this.rewardsButtonComplete.scale=new V.Point(0,0),this.rewardsButtonComplete.visible=!0,this.rewardsButtonComplete.onDownCallback=null;const B=this.game.add.tween(this.rewardsButtonComplete.scale,this).to({x:1,y:1},200,j.GS3.Back.InOut,!1,200);B.start(),B.onTweenComplete.add((()=>{this.rewardsButtonComplete.onDownCallback=this.onCloseClickCallback.bind(this,K.q.instance.prodigy.open.dailyQuestionsMenu.bind(K.q.instance.prodigy.open,null,!0))})),this.progressSliderComplete.visible=!0,this.progressSliderComplete.setPercentComplete(1)}}))}onPause(){super.onPause(),j.Aq$.isDefined(this.progressBarTween)&&this.progressBarTween.pause()}onResume(){super.onResume(),j.Aq$.isDefined(this.progressBarTween)&&this.progressBarTween.resume()}closeNotification(){this.stopAnimation=!0,this.progressBarTween.onTweenComplete.removeAll(),this.progressBarTween.stop(),K.q.instance.game.tweens.remove(this.currentTween),this.currentTween=this.game.add.tween(this.notificationContainer,this).to({alpha:0},250,j.GS3.Linear.None,!0,0),this.progressSlider.getPercentageComplete()>=1&&this.currentTween.onTweenComplete.add(K.q.instance.prodigy.open.dailyQuestionsMenu.bind(K.q.instance.prodigy.open,null,!0,"wait"),K.q.instance.prodigy.open),this.currentTween.onTweenComplete.add(this.close,this)}close(){this.stopAnimation=!0,this.progressBarTween.onTweenComplete.removeAll(),K.q.instance.game.tweens.remove(this.progressBarTween),K.q.instance.game.tweens.remove(this.currentTween),super.close()}}var Qa=U(38156),Xa=U(53151),Za=U(19586),Ja=U(80060),tr=U(53661);class er extends za{constructor(k,B,U,F=null,G=null,$,H){super(k,B,null,U,F,G),this._notificationPrefabAsset=Ei.l.ToasterNotification,this._notificationType=Za._.DEFAULT,this._notificationDelay=8e3,this._showHideDuration=250,this._mapChanged=!1,this.game=k,this._localizer=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),$&&(this._notificationPrefabAsset=$),H&&(this._notificationType=H),K.q.instance.prodigy.world.mapChanged.addOnce((()=>{this._mapChanged=!0})),K.q.instance.prodigy.gameContainer.get("c47-20b6").social.sendToastNotificationGeneratedEvent({toast_id:`${this._notificationType}`,category:U.notificationConfig.data.category,friends:K.q.instance.prodigy.friendsListNetworkHandler.friendsList.length,classmates:K.q.instance.prodigy.friendsListNetworkHandler.classList.length})}preprocess(){this.renderCell()}renderCell(){var k,B,U,F;const G=null!==(B=null===(k=j.wa5.getActiveScene())||void 0===k?void 0:k.container.get("IS_PREFAB_MAP"))&&void 0!==B&&B,$=K.q.instance.prodigy.gameContainer.get("d0e-64fd");Ja.d.loadWithInjectedValuesAndDependenciesFromGUID($,this._notificationPrefabAsset,{NOTIFICATION_ICON_GUID:this.data.notificationConfig.data.icon,NOTIFICATION_TITLE_TEXT:this.data.notificationConfig.data.modal.title,NOTIFICATION_BODY_TEXT:this.data.notificationConfig.data.modal.body,NOTIFICATION_ID:this.data.notificationConfig.ID},G||null===(F=null===(U=j.i7d.main)||void 0===U?void 0:U.GameObject)||void 0===F?void 0:F.parent).then((k=>{this._prefabGameObject=k,this.runShowToasterTween()})).catch(j.RQr.createHandler("Failed to load the battle pass toaster"))}runShowToasterTween(){const k={value:this._prefabGameObject.transform.anchoredPivotOffset.y};this.currentTween=K.q.instance.game.add.tween(k,this._prefabGameObject).to({value:Math.abs(k.value)},this._showHideDuration,j.GS3.Linear.None,!0).onUpdateCallback((()=>{var B;null===(B=this._prefabGameObject.transform)||void 0===B||B.setPositionY(k.value)})),this.currentTween.onTweenComplete.add((()=>{var k;null===(k=this.currentTween)||void 0===k||k.stop(),window.setTimeout((()=>{this.runHideToasterTween()}),this._notificationDelay)}),this)}runHideToasterTween(){var k;if(this.game&&!this._prefabGameObject.isDestroyed){null===(k=this.currentTween)||void 0===k||k.stop();const B={value:this._prefabGameObject.transform.anchoredPivotOffset.y};this.currentTween=K.q.instance.game.add.tween(B,this._prefabGameObject).to({value:-B.value},this._showHideDuration,j.GS3.Linear.None,!0).onUpdateCallback((()=>{var k;null===(k=this._prefabGameObject.transform)||void 0===k||k.setPositionY(B.value)})),this.currentTween.onTweenComplete.addOnce((()=>this.close()),this)}}close(){var k;null===(k=this._prefabGameObject)||void 0===k||k.destroy(),super.close()}}class ir extends er{constructor(k,B,U,F=null,G=null,j=!1,$=[]){super(k,B,U,F,G),this._notificationPrefabAsset=Ei.l.BattlePassToaster,this._notificationType=Za._.BATTLEPASSQUESTGOALCOMPLETED,this._particleDelay=500,this._showTreasureTrackDelay=1500,this._multiple=!1,this._autoCollectedQuestData=[],this._multiple=j,this._autoCollectedQuestData=$,this._notificationPrefabAsset=Xa.h.isFeatureEnabled()?Ei.l.BattlePassToasterWithParticles:Ei.l.BattlePassToaster}renderCell(){this.renderCellAsync().catch(j.RQr.createHandler("Failed to render battle pass notification cell"))}renderCellAsync(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F;if(!(yield Qa.n.hasBattlePassAccess()))return void this.close();if(!(yield K.q.instance.prodigy.gameContainer.get("8dc-04eb").getCurrentBattlePassData())||Xa.h.isFeatureEnabled()&&0===this._autoCollectedQuestData.length)return void this.close();this.setToasterText();const G=K.q.instance.prodigy.gameContainer.get("d0e-64fd"),$=Xa.h.isFeatureEnabled()?Ei.l.BattlePassToasterWithParticles:Ei.l.BattlePassToaster,H=null!==(B=null===(k=j.wa5.getActiveScene())||void 0===k?void 0:k.container.get("IS_PREFAB_MAP"))&&void 0!==B&&B;yield K.q.instance.prodigy.load.assetsAsPromise($);const V=yield Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(G,$,{[tr.XU.GoalCompleteToasterTitle]:this._toasterTitleText,[tr.XU.GoalCompleteToasterDescription]:this._toasterBodyText,[tr.XU.ToasterNotificationId]:this.data.notificationConfig.ID},H||null===(F=null===(U=j.i7d.main)||void 0===U?void 0:U.GameObject)||void 0===F?void 0:F.parent);this._prefabGameObject=V,this.runShowToasterTween()}))}setToasterText(){const k=this._autoCollectedQuestData.length;if(Xa.h.isFeatureEnabled())if(k>1){const B=this._autoCollectedQuestData.reduce(((k,B)=>k+B.reward.battlePassXp),0);this._toasterTitleText=this._localizer.getText("BATTLE_PASS_NUM_QUESTS_COMPLETE_TOASTER_HEADER",k),this._toasterBodyText=this._localizer.getText("BATTLE_PASS_EXPERIENCE_GAINED_TOASTER_BODY",B.toLocaleString())}else this._toasterTitleText=this._localizer.getText("BATTLE_PASS_SPECIFIC_QUEST_COMPLETE_TOASTER_HEADER"),this._toasterBodyText=this._autoCollectedQuestData[0].questDescription;else this._multiple||k>1?(this._toasterTitleText=this._localizer.getText("BATTLE_PASS_MULTIPLE_QUESTS_COMPLETE_TOASTER_HEADER"),this._toasterBodyText=this._localizer.getText("BATTLE_PASS_MULTIPLE_QUESTS_COMPLETE_TOASTER_BODY")):(this._toasterTitleText=this._localizer.getText("BATTLE_PASS_QUEST_COMPLETE_TOASTER_HEADER"),this._toasterBodyText=this._localizer.getText("BATTLE_PASS_QUEST_COMPLETE_TOASTER_BODY"))}runShowToasterTween(){super.runShowToasterTween(),this.currentTween.onTweenComplete.add((()=>{window.setTimeout((()=>{this.playParticleAnimation()}),this._particleDelay),Xa.h.autoPopTreasureTrack&&window.setTimeout((()=>{this.openTreasureTrackMenu()}),this._particleDelay+this._showTreasureTrackDelay)}),this)}playParticleAnimation(){var k,B;const U=null===(k=this._prefabGameObject.findComponentInChildren(j.okU,!0))||void 0===k?void 0:k.GameObject,F=null==U?void 0:U.findChildByName("anchor"),G=null===(B=K.q.instance.prodigy.gameContainer.get("8dc-04eb"))||void 0===B?void 0:B.hudButton;F&&G?(F.transform.worldPosition=G.transform.worldPosition,U.parent.active=!0):j.VyI.log("Cannot find required elements to play BattlePassNotificationCell particle animation.",j.$bb.Warning)}openTreasureTrackMenu(){const k=K.q.instance.prodigy;k.gameContainer.get("8dc-04eb").getCurrentBattlePassData().then((B=>(0,G.sH)(this,void 0,void 0,(function*(){B&&B.getNumUnclaimedRewards()>0&&!this._mapChanged&&0===k.open.menus.length&&k.open.battlePassMenu(),this.close()})))).catch(j.RQr.createHandler("Failed to get battle pass quest data."))}}class sr{static loadWithInjectedValuesAndDependencies(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){return Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(k,B,U)}))}static loadWithInjectedValues(k,B,U){return Ja.d.loadWithInjectedValuesFromGUID(k,B,U)}}var nr=U(36648);class ar extends er{constructor(k,B,U,F,G){super(k,B,U,F,G,Ei.l.FestivalToaster,Za._.FESTIVALQUESTGOALCOMPLETED),this._notificationPrefabAsset=Ei.l.FestivalToaster,this._notificationType=Za._.FESTIVALQUESTGOALCOMPLETED}renderCell(){var k,B;const U=K.q.instance.prodigy.gameContainer.get("12b-405a");if(null===(k=U.getActiveFestival())||void 0===k?void 0:k.type){this.setToasterText();const k=K.q.instance.prodigy.gameContainer.get("d0e-64fd");sr.loadWithInjectedValuesAndDependencies(k,Ei.l.FestivalToaster,{FESTIVAL_TOASTER_TITLE:this._toasterTitleText,FESTIVAL_TOASTER_BODY:this._toasterBodyText,FESTIVAL_TOASTER_GRAPHIC:null!==(B=U.getFestivalIcon())&&void 0!==B?B:nr.q.Hud_parent_gifts_circle}).then((k=>{this._prefabGameObject=k,this.runShowToasterTween()})).catch(j.RQr.createHandler("Failed to load the festival quest toaster"))}}setToasterText(){this._toasterTitleText=this._localizer.getText("FESTIVAL_QUEST_COMPLETE_TOASTER_HEADER"),this._toasterBodyText=this._localizer.getText("FESTIVAL_QUEST_COMPLETE_TOASTER_BODY")}}class rr{constructor(k){this.game=null,this.isPlaying=!1,this.currentNotification=null,this.notificationQueue=[],this.notificationTimer=null,this.timerDispatch=null,this.timerOverride=!1,this.queuedShowPlayerGoals=!1,this.notificationBlockers=new Set,this._autoCollectedQuestData=[],this.game=k,this.isPlaying=!1;K.q.instance.prodigy.gameContainer.get("8dc-04eb").onQuestRewardAutoCollected.add((k=>this._autoCollectedQuestData.push(k)))}initGenericNotification(k,B={}){const U=this.getConfig(k);j.Aq$.isDefined(U)&&(U.data=Object.assign(Object.assign({},U.data),B),this.pushNotification({notificationConfig:U,callback:null}))}initNotificationWithTimer(k,B,U=!1){const F=this.getConfig(k);return j.Aq$.isDefined(F)&&(this.timerDispatch=U?window.setTimeout(this.initNotificationWithTimer.bind(this,k,B,U),B):window.setTimeout(this.pushNotification.bind(this,{notificationConfig:F,callback:null}),B),this.pushNotification({notificationConfig:F,callback:null})),this.timerDispatch}isPaused(){return this.notificationBlockers.size>0}pause(k){this.notificationBlockers.add(k),this.onPause()}resume(k){this.notificationBlockers.delete(k),this.isPaused()||this.onResume()}resumeAll(){this.notificationBlockers.clear(),this.onResume()}clearNotificationDispatch(k=null){j.Aq$.isDefined(this.timerDispatch)&&(j.Aq$.isDefined(k)?clearTimeout(k):clearTimeout(this.timerDispatch))}onPause(){j.Aq$.isDefined(this.currentNotification)&&this.currentNotification.onPause()}onResume(){j.Aq$.isDefined(this.currentNotification)&&this.currentNotification.onResume()}pushNotification(k){this.notificationQueue.length<3&&!k.notificationConfig.data.autoShare&&this.notificationQueue.unshift(k)}startTimer(k=!1){this.timerOverride&&!k||(this.timerOverride=!1,this.stopTimer(),this.notificationTimer=this.game.time.events.addTimer(rr.toasterTimeout,this.playNextNotification,this))}stopTimer(){this.game.time.events.remove(this.notificationTimer),this.notificationTimer=null}canPlayNotification(){var k;const B=K.q.instance.prodigy.open,U=K.q.instance.game.state.get(Ie.G.TileScreen);return!this.isPlaying&&!this.isPaused()&&0===B.menus.length&&0===B.renderMenus.length&&null===B.chatMenu&&this.notificationQueue.length>0&&(null===(k=null==U?void 0:U.zone)||void 0===k?void 0:k.ID)!==hn.A_.TOWERTOWN}playNextNotification(){this.canPlayNotification()&&this.notificationQueue.length>0&&this.playNotification(this.notificationQueue.shift()),this.startTimer()}clearNotifications(k=!1){j.Aq$.isDefined(this.currentNotification)&&(this.currentNotification.close(),this.notificationPlayed()),j.Aq$.isDefined(this.notificationTimer)&&(this.timerOverride=k,this.stopTimer())}removeQueuedNotificationOfType(k){const B=this.notificationQueue.length;return this.notificationQueue=this.notificationQueue.filter((B=>!k.includes(B.notificationConfig.ID))),B-this.notificationQueue.length}playNotification(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!this.isPlaying&&B.hasCompletedTutorial()){if(this.isPlaying=!0,k.notificationConfig.ID===Za._.CHARGEDLEVELFREEZECOUNTDOWN)this.currentNotification=new er(this.game,this.menuLayer,k,k.callback,null);else if(k.notificationConfig.ID===Za._.BATTLEPASSQUESTGOALCOMPLETED){const B=this.removeQueuedNotificationOfType([Za._.BATTLEPASSQUESTGOALCOMPLETED]);this.currentNotification=new ir(this.game,this.menuLayer,k,k.callback,null,B>0,this._autoCollectedQuestData),this._autoCollectedQuestData=[]}else k.notificationConfig.ID===Za._.FESTIVALQUESTGOALCOMPLETED?this.currentNotification=new ar(this.game,this.menuLayer,k,k.callback,null):"QuestionsAnswered"===k.notificationConfig.data.category&&(this.currentNotification=new Ya(this.game,this.menuLayer,k,k.callback,null));if(!j.Aq$.isDefined(this.currentNotification))return void this.notificationPlayed();this.currentNotification.preprocess(),this.isPaused()&&this.currentNotification.onPause()}else this.pushNotification(k)}notificationPlayed(){this.isPlaying=!1,this.currentNotification=null}getConfig(k){return Tn.J.copyObject(le.t.getItem("gameFeed",k))}}rr.toasterTimeout=3e3;var or=U(38443);class hr extends _a.M{constructor(k,B,U,F,G,H,V,W,q,K,z,Y,Q){super(k,B,new fa.R(k,{ID:W.monsterData.ID,nickname:W.monsterData.nickname}),1,U,F,null,Y),this.monsterData=W.monsterData,this.unique=q||!1,this.onEnc=K,this.encountered=!1,this.ID=V,this.user=G,this.path=H,this.screen=Q;j.Aq$.isDefined(W.range)||(W.range=hr.DEFAULT_MOD_LENGTH*hr.DEFAULT_MOD_LENGTH*1),W.ignorePathfindingForAlert=$.get(W,"ignorePathfindingForAlert",!1),W.unique=q,this.mods=W,W.randDir&&Math.random()<.5&&this.flip(),this.mods.encounter=[this.monsterData],z&&(this.alpha=.5,this.respawnTimer=(new Date).getTime()+1e4),this.reload(),this.visible=!1}process(k){this.zone=k;let B=!1;this.highlight(!1),this.visible=!0;const U=k.getQuestState();if(!j.Aq$.isDefined(U)||!j.Aq$.isDefined(U.req))return;this.unique&&1===U.state[this.ID]&&(this.visible=!1);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if("pet"===U.req.type&&U.req.N>0&&this.source.getID()===U.req.ID&&this.mods.isQuestEncounter)B=!0;else if("item"===U.req.type&&F.backpack.hasItem("item",U.req.ID)0&&(j.Aq$.isDefined(this.mods.drops)||(this.mods.drops=[]),this.mods.drops.push(...k))}{const k=Dn.N.getAllTowerData().map((k=>k.towerID));this.zone.ID===hn.A_.ARCHIVES?K.q.instance.prodigy.battle.battleStats.type="ArchivesMonsterEncounter":k.includes(this.zone.ID)?(K.q.instance.prodigy.battle.battleStats.type=this.zone.ID,K.q.instance.prodigy.battle.battleStats.battleCustomMeta={floor_number:this.zone.CurrentFloor,encounter_number:this.zone.monstersDefeated+1}):K.q.instance.prodigy.battle.battleStats.type="RandomMonsterEncounter";const B=this.zone.getBattleMods();this.mods=Object.assign(Object.assign({},this.mods),B),K.q.instance.prodigy.battle.start(this.mods,this.onEndBattle.bind(this,this.game,this.zone,this.mods.onEnd,this.source.getID(),this.ID,!1,this.unique,this.onEnc,void 0,this.x,this.y),this.onBattleWin.bind(this,this.game,this.zone,this.mods.onEnd,this.source.getID(),this.ID,this.unique,this.onEnc,this.x,this.y),this.onDefeat,this.mods.onFaint)}}setVisible(k){this.visible=k}patrol(k){this.encountered||this.setPath(k,this.patrol.bind(this,k))}}hr.DEFAULT_MOD_LENGTH=200;var cr=U(98013);class dr extends hr{constructor(k,B,U,F,G,j,$,H,V,W,q,K,z){super(k,B,U,F,G,j,$,H,V,W,q,K,z);const Y=le.t.getItem("pet",this.source.data.ID).metadata.assets;this.monsterAsset=Y.spine?Y.spine:Y.default}startLoad(){super.startLoad([J.Q.Spine_memberpet_icon_json])}setup(k,B){if(B){if(cr.l.removeAll(this.sprites,!0),this.spine=this.game.add.spine(0,0,this.assets[0]),this.spine.setToSetupPose(),this.spine.setAnimationByName(0,"idle",!0),this.spine.scale.x=j.Aq$.isDefined(this.monsterAsset.flip)&&this.monsterAsset.flip?-1:1,this.sprites.addChild(this.spine),j.Aq$.toggleDisplayObjSmooth(this.sprites,!0),this.onClick){const k=K.q.instance.prodigy.create.image(0,0,null);k.alpha=0,k.width=this.getHitboxWidth(),k.height=this.getHitboxHeight(),k.inputEnabled=!0,k.events.onInputDown.add(this.onClick),k.anchor.set(.5,1),this.add(k)}this.complete=!0,this.loading=!1,j.Aq$.isDefined(this.loadedCallback)&&this.loadedCallback(this),this._onLoad.dispatch()}}walk(){this.spine?(this.spine.setToSetupPose(),this.spine.setAnimationByName(0,"walk",!0)):this._onLoad.addOnce(this.walk,this)}stand(){this.spine?(this.spine.setToSetupPose(),this.spine.setAnimationByName(0,"idle",!0)):this._onLoad.addOnce(this.stand,this)}}var lr=U(95373),ur=U(57750),fr=U(86949),br=U(31427);class pr extends fr.u{constructor(k,B){super(),this._isIdling=!1,this._renderer=null,this.onTargetStopped=new j.HN0,this.onDestroy=new j.HN0,j.Aq$.isDefined(B)&&(this._followController=new lr.u(k,this,B),this.walkSpeed=B.walkSpeed)}create(){super.create(),this._renderer=this.gameObject.findComponent(br.A),this._renderer.setAnchor(.5,0),this.stopMoving()}destroy(){this.stopTweens(),this.onDestroy.dispatch(),this.onDestroy.dispose(),this.onTargetStopped.dispose(),super.destroy()}update(){super.update(),j.Aq$.isDefined(this._followController)&&this._followController.update()}walk(){this._isIdling&&(this._renderer.playAnimation("walk",!0),this._isIdling=!1)}stand(){this._isIdling||(this._renderer.playAnimation("idle",!0),this._isIdling=!0,this.gameObject.x=Math.round(this.gameObject.x),this.gameObject.y=Math.round(this.gameObject.y))}setValidPath(k,B,U,F,G=!0){k.findPath(this.gameObject.x,this.gameObject.y,B,U,G).then((k=>{this.setPath(k,F)})).catch(j.RQr.createHandler("Unable to find path for follow"))}setPath(k,B,U){if(!k||!K.q.instance.game)return;this.stopTweens();const F=null!=U?U:this.walkSpeed;let G=null,$=null,H=this.gameObject.x,V=this.gameObject.y;for(let W=k.length-1;W>=0;W--){const B=k[W];j.Aq$.isDefined(B.x)||(B.x=H),j.Aq$.isDefined(B.y)||(B.y=V);const U=j.cj9.distance(B.x,B.y,H,V);if(0===U)continue;j.Aq$.isDefined(G)||(G=K.q.instance.game.add.tween(this.gameObject,this),$=K.q.instance.game.add.tween(this.gameObject.scale,this));const q=Math.abs(this.gameObject.scale.x);G.to({x:B.x,y:B.y},6*U/F,j.GS3.Linear.None),$.to({x:B.x>H?q:-q},1,j.GS3.Linear.None),$.to({},6*U/F-100,j.GS3.Linear.None),H=B.x,V=B.y}j.Aq$.isDefined(G)?(G.onTweenComplete.addOnce(this.stand,this),j.Aq$.isDefined(B)&&G.onTweenComplete.addOnce(B),this.walk(),j.Aq$.isDefined(G)&&G.start(),j.Aq$.isDefined($)&&$.start()):(j.Aq$.isDefined(B)&&B(),this.stand())}stopTweens(){j.Aq$.isDefined(K.q.instance.game)&&(K.q.instance.game.tweens.removeFrom(this.gameObject,!1),this.gameObject&&!this.gameObject[ur.k.DESTROYED]&&K.q.instance.game.tweens.removeFrom(this.gameObject.scale))}getPosition(){return this.gameObject.position}pathTo(k){let B;B=K.q.instance.game.state.get(Ie.G.TileScreen).path,B||(B=K.q.instance.game.state.get(Ie.G.Museum).path),B?this.setValidPath(B,k.x,k.y,this.targetStopped.bind(this),!0):j.VyI.log("No pathfinder found!",j.$bb.Error)}isMoving(){return!this._isIdling}stopMoving(){this._isIdling||(this._renderer.playAnimation("idle",!0),this._isIdling=!0)}targetStopped(){this.onTargetStopped.dispatch()}}class vr extends fr.u{constructor(k){super(),this.text=null,this.xCoord=0,this.yCoord=0,this.text=k.text,this.xCoord=k.x,this.yCoord=k.y}create(){super.create(),K.q.instance.prodigy.create.nameFont(this.gameObject,this.gameObject.position.x+this.xCoord,this.gameObject.position.y+this.yCoord,this.text)}}var gr=U(59838);class mr extends fr.u{constructor(k){super(),this.animations=null,this.timesPlayed=0,this.targetLoops=0,this.nextIdleAnim=0,this.renderer=null,this.animations=k}create(){super.create(),this.renderer=this.gameObject.findComponent(gr.F),this.renderer.setAnchor(.5,0),this.idle()}idle(){j.Aq$.isDefined(this.renderer.spine)?(this.chooseRandomAnimation(),this.renderer.spine.onComplete.has(this.chooseRandomAnimation,this)&&this.renderer.spine.onComplete.remove(this.chooseRandomAnimation,this),this.renderer.spine.onComplete.add(this.chooseRandomAnimation,this)):(this.renderer.onLoaded.has(this.idle,this)&&this.renderer.onLoaded.remove(this.idle,this),this.renderer.onLoaded.addOnce(this.idle,this))}chooseRandomAnimation(){this.timesPlayed===this.targetLoops?(this.targetLoops=this.animations[this.nextIdleAnim].min+Math.floor(Math.random()*(this.animations[this.nextIdleAnim].max+1-this.animations[this.nextIdleAnim].min)),this.renderer.getAnimationLength(this.animations[this.nextIdleAnim].name)>0&&this.renderer.playAnimation(this.animations[this.nextIdleAnim].name,!0),this.timesPlayed=1,this.nextIdleAnim++,this.nextIdleAnim=this.nextIdleAnim%this.animations.length):this.timesPlayed++}}var yr=U(19273),_r=U(24110);class Er extends fr.u{get system(){return this._system}constructor(k){super(),this._particleEffectData=null,this._particleEffectData=k}create(){super.create(),this._systemObject=new j._mx,this._systemObject.addComponent(j.dLy),this._systemObject.addComponent(j.K16),this._systemObject.addComponent(_r.B);const k=K.q.instance.game.state.get(K.q.instance.game.state.current);k?k.backgroundGameObject?k.backgroundGameObject.addChild(this._systemObject):j.VyI.log("ParticleEmitter no background game object to parent to",j.$bb.Error):j.VyI.log("ParticleEmitter no screen to parent to",j.$bb.Error),this._system=or.d.createParticleEmitter(this._systemObject,this._particleEffectData.ID)}update(){super.update(),this._systemObject.transform.setPosition(this.gameObject.x+this._particleEffectData.x,this.gameObject.y+this._particleEffectData.y)}fade(k,B){this._maxAlpha||(this._maxAlpha=new j.wPU,this._system.behaviours.push(this._maxAlpha)),K.q.instance.game.add.tween(this._maxAlpha,this).to({maximumAlpha:k},B,j.GS3.Cubic.Out).start()}setAlpha(k){this._maxAlpha.maximumAlpha=k}destroy(){this._system&&(this._system.destroy(),this._system=null),this._systemObject&&(this._systemObject.destroy(),this._systemObject=null),super.destroy()}}var wr=U(70123),Tr=U(48951),Sr=U(26691),Ar=U(98623);class Cr extends Ar.H{constructor(k,B,U,F,G,$){super(k,B,U,F),this.callback=null,this.maxTime=6e4,this.timeDelta=1e4,this.radius=30,this.clickMessage="",this.hideElements=[],this.blocks=[],this.currentBlockIndex=-1,this.renderer=null,this.gameObject=null,this.time=0,this.endTransformMessage=null,this.numberOfSquares=[],this.activeTweens=[],this.name="timer",this.callback=$,j.Aq$.isDefined(G.maxTime)&&(this.maxTime=G.maxTime),j.Aq$.isDefined(G.timeDelta)&&(this.timeDelta=G.timeDelta),j.Aq$.isDefined(G.radius)&&(this.radius=G.radius),j.Aq$.isDefined(G.clickMessage)&&(this.clickMessage=G.clickMessage),j.Aq$.isDefined(G.hideElements)&&(this.hideElements=G.hideElements),j.Aq$.isDefined(G.storedTime)&&(this.storedTime=G.storedTime),this.setup()}destroy(k={children:!0}){for(const B of this.activeTweens)B.isDestroyed||B.remove();this.activeTweens.length=0,super.destroy(k)}setup(){for(let B=0;B{j.Aq$.isDefined(this.time)||(this.time=0),this.time+=1/60,this.updateTimerVisuals(this.time,.5,10)}:()=>{}}onClick(){this.endTransformMessage=K.q.instance.prodigy.open.messageBoxPrefab({buttonState:Sr.D.YesNoButtons,text:this.clickMessage,confirmCallback:this.callback,noCallback:()=>{this.endTransformMessage=null}})}setupTimerVisuals(k,B,U){const F=k/B,G=Math.floor(360/F/3),$=Math.floor(360/F)*Math.PI/180,H=3*Math.PI/180,V=j.Aq$.isDefined(this.storedTime)?Math.floor(this.storedTime/B-1):-1;this.numberOfSquares=[];const W=(k,B,U,F)=>{k&&!k[ur.k.DESTROYED]?(k.anchor.set(.5,.5),k.scale.x=3*F*.1,k.angle=180*U/Math.PI-90,B.add(k)):j.VyI.log("Timer cannot setup square because sprite was destroyed.",j.$bb.Warning)},z=(k,B,U,F,G,j)=>{if(this.numberOfSquares[k]--,0===this.numberOfSquares[k]){W(j,B,F,G);const k=K.q.instance.prodigy.create.element(this,0,0),$=this.game.add.renderTexture(74,74);$.renderXY(B,37,37,!0),k.add(K.q.instance.prodigy.create.image(-37,-37,void 0,void 0,$)),B.destroy(),this.blocks.push({block:k,direction:U})}};for(let j=0;jV){const U=K.q.instance.prodigy.create.sprite(Q,X,q._.Ui_timer_json,Z,null,z.bind(this,j,k,F,B,J));k&&!U[ur.k.DESTROYED]&&W(U,k,B,J)}else k.destroy()}}}updateTimerVisuals(k,B,U){let F=Math.floor(k/B-1);const G=j.Aq$.isDefined(this.storedTime)?Math.floor(this.storedTime/B-1)+1:-1;if(G>-1&&(F-=G),F>this.currentBlockIndex&&F{for(let k=0;k{this.containerLoaded=!0,this.onContainerLoaded.dispatch()})).catch(j.RQr.createHandler(`ItemContainer: failed to draw card for ${this.name}`))}drawCard(k){return(0,G.sH)(this,void 0,void 0,(function*(){let B,U;if(B="gold"===this.itemType?{type:this.itemType}:"spell"===this.itemType?K.q.instance.prodigy.attacks.getAttack(this.ID):yield le.t.secureGetItem(this.itemType,this.ID),(null==B?void 0:B.data)&&"pet"===this.itemType){const k=this.itemObject.data.nickname;B.data.nickname=j.Aq$.isDefined(k)?k:B.data.name}switch(k){case Lr.s.Icon:U=this.createSmall(B,!0);break;case Lr.s.IconNoBackground:U=this.createSmall(B,!1);break;case Lr.s.Inventory:this.createInventory(B);break;case Lr.s.Store:this.createStore(B);break;case Lr.s.Card:this.createCard(B);break;case Lr.s.Info:U=this.createLarge(B);break;case Lr.s.StylistCard:this.createStylistCard(B)}j.Aq$.isDefined(U)&&(yield U)}))}createPanel(k,B,U,F,G){if(j.Aq$.isDefined(this.panel)&&this.panel.destroy(),j.Aq$.isDefined(G))this.panel=K.q.instance.prodigy.create.panel(this,0,0,U,F,G);else if("gold"===this.itemType)this.panel=K.q.instance.prodigy.create.panel(this,0,0,U,F,"item-currency");else if("spell"===this.itemType)this.panel=K.q.instance.prodigy.create.panel(this,0,0,U,F,`item-${this.itemType}`);else if("item"===this.itemType&&!j.Aq$.isDefined(B)||"fossil"===this.itemType||"currency"===this.itemType||xr.f.includes(this.itemType))this.panel=K.q.instance.prodigy.create.panel(this,0,0,U,F,"item-common");else if(j.Aq$.isDefined(B)){let k=null;switch(B){case 0:k="common";break;case 1:k="uncommon";break;case 2:k="rare";break;case 3:k="epic";break;case 4:k="legend";break;default:k="common"}this.panel=K.q.instance.prodigy.create.panel(this,0,0,U,F,`item-${k}`)}else this.panel=K.q.instance.prodigy.create.panel(this,0,0,U,F,"empty");j.Aq$.isDefined(this.onClick)&&this.panel.setClickable(this.onDown.bind(this))}createSmall(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){this.panel=K.q.instance.prodigy.create.element(this,0,0);const U=j.Aq$.isDefined(k);let F=null,G=null;const $={x:0,y:0};if(j.Aq$.isDefined(B)&&!B||(G=K.q.instance.prodigy.create.sprite(0,0,q._.General_core_json,U?"white-icon":"empty-icon"),this.panel.add(G),$.x=10,$.y=10),U?[F]=yield K.q.instance.prodigy.icon.createFromDataAdvanced(k,this.panel,$.x,$.y):F=K.q.instance.prodigy.create.sprite($.x,$.y,q._.General_icons_json,`empty-${this.itemType}`),this.panel.add(F),j.Aq$.isDefined(this.onClick)){let k=null;if(j.Aq$.isDefined(G))k=G;else if(F instanceof ur.k)k=F;else for(let B=0;B1?2:8,B.lines>2&&(B.destroy(),B=K.q.instance.prodigy.create.font(this,-5,0,k.data.name,{width:180,size:16,align:"center",lineHeight:18}),B.y=2),"gold"===this.itemType?(this.panel.add(K.q.instance.prodigy.icon.gold(40,50)),B.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("CURRENCY_GOLD_COINS"))):"spell"===this.itemType?yield K.q.instance.prodigy.icon.createFromDataAdvanced(k,this.panel,40,70):"item"===this.itemType&&j.Aq$.isDefined(k.type)&&"potion"===k.type?yield K.q.instance.prodigy.icon.createFromDataAdvanced({type:this.itemType,ID:this.ID},this.panel,40,60):"hairColor"===this.itemType||"eyeColor"===this.itemType||"skinColor"===this.itemType||"face"===this.itemType?this.panel.add(K.q.instance.prodigy.icon.createFromData(k,40,50,null,this.onTextureLoaded.bind(this))):"hair"===this.itemType?this.panel.add(K.q.instance.prodigy.icon.createFromData(k,80,100,null,null)):(yield K.q.instance.prodigy.icon.createFromDataAdvanced(k,this.panel,40,50),"pet"===this.itemType&&j.Aq$.isDefined(k.data.nickname)&&B.setText(k.data.nickname)),"gold"===this.itemType||"currency"===this.itemType){const k=this.N>=1?`${this.N}`:"1";K.q.instance.prodigy.create.font(this.panel,0,165,k,{width:160,align:"center"})}else if(this.N>1){"currency"!==this.itemType&&this.panel.add(K.q.instance.prodigy.create.sprite(10,150,q._.General_icons_json,"mail-empty"));const k=j.Aq$.isDefined(this.N)?String(this.N):"99";"currency"===this.itemType?K.q.instance.prodigy.create.font(this.panel,0,165,k,{width:160,align:"center"}):K.q.instance.prodigy.create.font(this.panel,10,155,k,{width:40,align:"center"})}}))}onTextureLoaded(k){if(k){const B=j.Aq$.getCenteredXY(k.width,k.height,0,0,this.panel.width,this.panel.height);k.x=B.x,k.y=B.y}}createLarge(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G;if(!j.Aq$.isDefined(k))return;this.createPanel(null,k.data.rarity,19,10);const $=new Pr.C(this.game,3,40,230,360,q._.Tiled_sprites_json,"overlay-small");$.alpha=.1,this.panel.add($);const H=le.t.getItem(k.type,k.ID).data,V="item"===k.type&&j.Aq$.isDefined(H.effect)&&j.Aq$.isDefined(H.effect.transform),W=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(K.q.instance.prodigy.create.font(this,0,0,(0,Ba.k)(Tn.J.getLocalizationNameKey(k)),{fontID:9,size:36,width:680,align:"center"}),xr.f.includes(k.type)||"hat"===k.type||"weapon"===k.type||"outfit"===k.type||"boots"===k.type||V){const B=this.createCharacterPreview(k,40,65,!1);V&&this.transformEffect(H,B)}else if("follow"===k.type){const $=null!==(U=null===(B=k.metadata)||void 0===B?void 0:B.x)&&void 0!==U?U:120,H=null!==(G=null===(F=k.metadata)||void 0===F?void 0:F.y)&&void 0!==G?G:160;this.followContainer=K.q.instance.prodigy.create.follow(this.panel,k.ID,1,null,$,H),j.Aq$.isDefined(this.followContainer.reload)&&this.followContainer.reload()}else if("pet"===k.type){const B=kr.N.createSpineAssetSourceName(k,k.type,k.ID);K.q.instance.prodigy.load.assets([B],(()=>{K.q.instance.prodigy.create.spine(120,300,B,this.panel).setAnimationByName(0,"idle",!0)}))}else yield K.q.instance.prodigy.icon.createFromDataAdvanced(k,this.panel,80,80);K.q.instance.prodigy.create.font(this.panel,260,60,(0,Ba.k)(Tn.J.getLocalizationFlavorKey(k)),{size:20,fontID:8,width:480,lineHeight:30}),j.Aq$.isDefined(k.data.lockLevel)&&W.getLevel()0&&!B.hasMembership()){if(j.Aq$.isDefined(k.isGift)&&k.isGift)return;Tn.J.shouldSuppressAd(B)?(this.panel.add(K.q.instance.prodigy.create.sprite(110,150,q._.General_icons_json,"icon-medium-lock")),this.onClick=()=>{this.showTooltipAboveThisItem()}):this.panel.add(K.q.instance.prodigy.create.sprite(110,150,q._.General_icons_json,"mail-member"))}}createCharacterPreview(k,B,U,F){if(!j.Aq$.isDefined(k))return null;F&&K.q.instance.prodigy.create.panel(this,B,U,4,5,"shine");const G=new Oe.a(this.game),$=new Ur(this.game,this,B-88,U-75,G,1,!1);return this.resetPlayer(G,$,k),$.user}resetPlayer(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=F.appearance.getHair();let j=G.color,$=G.style,V=F.appearance.getEyeColor(),W=F.appearance.getSkinColor(),q=F.appearance.getFace(),z=F.equipment.getEquipment("outfit"),Y=F.equipment.getEquipment("hat"),Q=F.equipment.getEquipment("weapon"),X=F.equipment.getEquipment("boots");"hair"===U.type?$=U.ID:"eyeColor"===U.type?V=U.ID:"skinColor"===U.type?W=U.ID:"hairColor"===U.type?j=U.ID:"face"===U.type?q=U.ID:"outfit"===U.type?z=U.ID:"hat"===U.type?Y=U.ID:"weapon"===U.type?(Q=U.ID,B.user.forceWeaponVisual=!0):"boots"===U.type&&(X=U.ID),k.appearance.setHair($,j),k.appearance.setEyeColor(V),k.appearance.setSkinColor(W),k.appearance.setFace(q),k.equipment.setOutfit(z,!1),k.equipment.setHat(Y,!1),k.equipment.setWeapon(Q,!1),k.equipment.setBoots(X,!1),k.data.chargedLevelData=H().clone(F.data).chargedLevelData,k.data.level=H().clone(F.data).level,k.appearanceChanged=!0,B.user.reload()}createStore(k){if(!j.Aq$.isDefined(k))return;this.createMedium(k);const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=B.backpack.hasItem(this.itemType,this.ID);this.owned=U>0,"dorm"===this.itemType?this.owned=B.house.getOwned(this.ID)>=9:"pet"===this.itemType?this.owned=B.kennel.hasPet(this.ID):"dormbg"===this.itemType?this.owned=B.house.getCurrentHouseTag()===k.data.tag:"hair"===this.itemType?this.owned=B.appearance.getHair().style===this.ID:"eyeColor"===this.itemType?this.owned=B.appearance.getEyeColor()===this.ID:"skinColor"===this.itemType?this.owned=B.appearance.getSkinColor()===this.ID:"hairColor"===this.itemType?this.owned=B.appearance.getHair().color===this.ID:"face"===this.itemType&&(this.owned=B.appearance.getFace()===this.ID),this.cost=this.itemObject.cost;let F="[mail-gold]";if("currency"===this.cost.type&&1===this.cost.ID||(F=`[${le.t.getItem(this.cost.type,this.cost.ID).data.icon}]`),"item"===this.itemType&&U>=99||"item"!==this.itemType&&this.owned){let k;k="dorm"===this.itemType||U>=99?K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("ITEM_MAX"):"hair"===this.itemType||"eyeColor"===this.itemType||"skinColor"===this.itemType||"hairColor"===this.itemType||"face"===this.itemType?K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("ITEM_CURRENT"):K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("ITEM_OWNED"),K.q.instance.prodigy.create.font(this.panel,10,166,k,{size:20})}else this.cost.N>0&&K.q.instance.prodigy.create.font(this.panel,6,166,F+Tn.J.numberToString(this.cost.N),{size:20});k.data.member>0&&(Tn.J.shouldSuppressAd(B)?(this.panel.add(K.q.instance.prodigy.create.sprite(120,160,q._.General_icons_json,"icon-medium-lock")),this.onClick=()=>{this.showTooltipAboveThisItem()}):this.panel.add(K.q.instance.prodigy.create.sprite(120,160,q._.General_icons_json,"mail-member")))}createStylistCard(k){if(!j.Aq$.isDefined(k))return;this.createCharacterPreview(k,0,0,!0);const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.data.member>0&&!B.hasMembership()&&(j.Aq$.isDefined(k.isGift)&&k.isGift||(Tn.J.shouldSuppressAd(B)?(this.panel.add(K.q.instance.prodigy.create.sprite(110,150,q._.General_icons_json,"icon-medium-lock")),this.onClick=()=>{this.showTooltipAboveThisItem()}):this.panel.add(K.q.instance.prodigy.create.sprite(110,150,q._.General_icons_json,"mail-member"))))}onDown(){j.Aq$.isDefined(this.onClick)&&this.onClick({type:this.itemType,ID:this.ID},this.owned,this.price)}showTooltipAboveThisItem(){K.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:this.worldPosition.x+.5*this.width,yPosition:this.worldPosition.y+7,arrowXRelPos:.5,arrowDirection:Br.i.DOWN})}update(){if(super.update(),j.Aq$.isDefined(this.followContainer)){if(j.Aq$.isDefined(this.followContainer.player)&&(this.followContainer.player=null),j.Aq$.isDefined(this.followContainer.findComponent)&&!j.Aq$.isDefined(this.renderComponent)){const k=this.followContainer.findComponent(pr);j.Aq$.isDefined(k)&&this.followContainer.removeComponent(k),j.Aq$.isDefined(this.followContainer.findComponent(br.A))&&(this.renderComponent=this.followContainer.findComponent(br.A))}if(j.Aq$.isDefined(this.itemContainerWalking)||(this.itemContainerWalking=!0),!j.Aq$.isDefined(this.itemContainerAnimDuration)||this.itemContainerAnimDuration<=0){this.itemContainerAnimDuration=0;let k=!1;this.itemContainerWalking?j.Aq$.isDefined(this.followContainer.tweens)&&j.Aq$.isDefined(this.followContainer.standTween)?(this.followContainer.stand(),k=!0):j.Aq$.isDefined(this.renderComponent)&&(this.renderComponent.playAnimation("idle",!0),k=!0):j.Aq$.isDefined(this.followContainer.tweens)&&j.Aq$.isDefined(this.followContainer.standTween)?(this.followContainer.walk(),k=!0):j.Aq$.isDefined(this.renderComponent)&&(this.renderComponent.playAnimation("walk",!0),k=!0),k&&(this.itemContainerAnimDuration=3e3*Math.random()+1e3,this.itemContainerWalking=!this.itemContainerWalking)}j.Aq$.isDefined(this.followTimer)||(this.followTimer=new j.gXL(this.game)),this.itemContainerAnimDuration-=this.game.app.ticker.deltaMS}}destroy(){var k;null===(k=this._transformEventController)||void 0===k||k.end(),this.onContainerLoaded.dispose(),super.destroy()}}var Gr=U(73877),jr=U(37946);class $r extends Ar.H{constructor(k,B,U,F,G){if(super(k,B,U,F),this.eventFormat=!1,!G){K.q.instance.prodigy.create.panel(this,0,0,6,2,"white").alpha=.8}this.text=K.q.instance.prodigy.create.font(this,0,10,"00:00",{width:240,size:40,align:"center"}),this.msg=K.q.instance.prodigy.create.font(this,0,55,"",{width:240,size:16,align:"center"})}processTime(k){if(k<=0)return"00:00";const B=Math.floor(k/36e5),U=Math.floor((k-36e5*B)/6e4),F=Math.floor((k-36e5*B-6e4*U)/1e3);let G;0===B?G="00":B<10&&(G=`0${B}`);let $=`${U}`;0===U?$="00":U<10&&($=`0${U}`);let H=`${F}`;return 0===F?H="00":F<10&&(H=`0${F}`),"00"===G?`${$}:${H}`:B<24?`${G}:${$}:${H}`:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TIMER_FORMAT_DAYS",Math.floor(B/24))}processTimeFormatted(k){if(k<=0)return"0";const B=Math.floor(k/864e5);let U=k-864e5*B;const F=Math.floor(U/36e5);U-=36e5*F;const G=Math.floor(U/6e4);let $=F.toString();F<10&&($=`0${F}`);let H=G.toString();return G<10&&(H=`0${G}`),K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TIMER_FORMAT",B,$,H)}setTime(k){this.target=k,this.text.setText(this.eventFormat?this.processTimeFormatted(k):this.processTime(k))}setMsg(k){this.msg.setText(k)}start(k,B,U=!1){this.eventFormat=U,this.setTime(k),this.callback=B,this.targetTime=(new Date).getTime()+this.target,this.clear(),this.timer=window.setInterval(this.process.bind(this),100)}pause(){this.paused=this.targetTime-(new Date).getTime()}resume(){this.targetTime=(new Date).getTime()+this.paused,this.paused=null}blink(){this.game.add.tween(this.text,this).to({y:0},500,j.GS3.Quadratic.Out).to({y:10},500,j.GS3.Quadratic.In).start()}addTime(k){this.targetTime+=k,this.process(),this.blink()}clear(){j.Aq$.isDefined(this.timer)&&(window.clearInterval(this.timer),this.timer=null)}process(){if(j.Aq$.isDefined(this.paused))return;const k=this.targetTime-(new Date).getTime();this.text.setText(this.eventFormat?this.processTimeFormatted(k):this.processTime(k)),k<=0&&(this.clear(),j.Aq$.isDefined(this.callback)&&this.callback())}isInProgress(){return j.Aq$.isDefined(this.timer)}destroy(){this.clear(),super.destroy()}}var Hr=U(60250),Vr=U(18916);class Wr extends ya.H{constructor(k,B,U,F,G){super(k,B,U,F,G),this.foodMode="soup",this.previousHP=this.source.getCurrentHearts()}setup(k,B){if(!j.Aq$.isDefined(this.game)||!B||!j.Aq$.isDefined(this.assets))return;this.cacheBoss(),this.potParts={pot:K.q.instance.prodigy.create.sprite(-100,0,q._.Boss_bonfire_json,"pot"),lid:K.q.instance.prodigy.create.sprite(140,-140,q._.Boss_bonfire_json,"pot-lid")},this.potParts.lid.anchor.set(1,1),this.potParts.pot.anchor.set(0,1),this.add(this.potParts.pot),this.add(this.potParts.lid),this.burgerParts={dish:K.q.instance.prodigy.create.sprite(300,-50,q._.Boss_bonfire_json,"dish"),bottom:K.q.instance.prodigy.create.sprite(320,-10,q._.Boss_bonfire_json,"burger-bottom"),top:K.q.instance.prodigy.create.sprite(510,-70,q._.Boss_bonfire_json,"burger-lid")},this.burgerParts.top.anchor.set(1,1),this.burgerParts.bottom.anchor.set(0,1),this.add(this.burgerParts.dish),this.burgerParts.dish.visible=!1,this.add(this.burgerParts.bottom),this.burgerParts.bottom.visible=!1,this.add(this.burgerParts.top),this.burgerParts.top.visible=!1,this.cakeParts={dish:K.q.instance.prodigy.create.sprite(300,-50,q._.Boss_bonfire_json,"dish"),lava:K.q.instance.prodigy.create.sprite(310,0,q._.Boss_bonfire_json,"lava"),face:K.q.instance.prodigy.create.sprite(350,10,q._.Boss_bonfire_json,"expression-1"),strawberry:K.q.instance.prodigy.create.sprite(400,-200,q._.Boss_bonfire_json,"berry")},this.cakeParts.face.animations.add("attack",["expression-1","expression-2","expression-3","expression-3","expression-3","expression-2","expression-1"],10,!1,!1),this.cakeParts.lava.anchor.set(0,1),this.cakeParts.face.anchor.set(0,1),this.add(this.cakeParts.dish),this.cakeParts.dish.visible=!1,this.add(this.cakeParts.lava),this.cakeParts.lava.visible=!1,this.add(this.cakeParts.face),this.cakeParts.face.visible=!1,this.add(this.cakeParts.strawberry),this.cakeParts.strawberry.visible=!1;const U=new qn.s(this.game);U.init({npc_name:"",npc_type:Kn.ac.Boss,x_coord:-100,y_coord:0,npc_animation_id:"idle"}),this.npc=new Vr.U(this.game,this,-100,0,q._.Npc_sprite_cebollini_json,null,U),this.npc.flip(),this.npc.bossStart(this.game),this.complete=!0,this.loading=!1}setDoneCallback(k){this.doneAnimationCallback=k}attack(){let k,B;zn.R.prototype.attack.call(this);const U=K.q.instance.prodigy.animation;"soup"===this.foodMode?(k=K.q.instance.prodigy.event.create(),k.animation(U.rotate.bind(U,this.potParts.lid,35,1e3,0,null,!0)),k.animation(U.translate.bind(U,this.potParts.lid,"+=0","-=20",1e3,0,null,!0),!0),k.animation(U.rotate.bind(U,this.potParts.lid,0,1e3,0,null,!0)),k.animation(U.translate.bind(U,this.potParts.lid,"+=0","+=20",1e3,0,null,!0)),B=K.q.instance.prodigy.event.create(),B.animation(U.rotate.bind(U,this.potParts.pot,-10,1e3,0,null,!0),!0),B.animation(U.rotate.bind(U,this.potParts.pot,0,1e3,0,null,!0)),k.start(),B.start()):"burger"===this.foodMode?(k=K.q.instance.prodigy.event.create(),k.animation(U.rotate.bind(U,this.burgerParts.top,25,700,0,null,!0)),k.animation(U.translate.bind(U,this.burgerParts.top,"+=0","-=20",700,0,null,!0),!0),k.animation(U.rotate.bind(U,this.burgerParts.top,0,700,0,null,!0)),k.animation(U.translate.bind(U,this.burgerParts.top,"+=0","+=20",700,0,null,!0)),B=K.q.instance.prodigy.event.create(),B.animation(U.rotate.bind(U,this.burgerParts.bottom,-10,700,0,null,!0),!0),B.animation(U.rotate.bind(U,this.burgerParts.bottom,0,700,0,null,!0)),k.start(),B.start()):"cake"===this.foodMode&&this.cakeParts.face.animations.play("attack",void 0,!1)}startEntree(){this.foodMode="burger",this.npc.entreeStart();const k=new Ti.rD(this.game);k.addEvents([{callback:()=>{this.entreeEvent(k)}},{dialogueData:k.dataProvider.getLegacy("cebollini",11),blockInput:!0,hideNext:!0}]),k.start()}entreeEvent(k){const B=K.q.instance.prodigy.event.create();B.enableInput(!1);const U=Object.keys(this.potParts);for(let G=0;G{this.dessertEvent(k)}},{dialogueData:k.dataProvider.getLegacy("cebollini",12),blockInput:!0,hideNext:!0}]),k.start()}dessertEvent(k){const B=K.q.instance.prodigy.event.create();B.enableInput(!1);const U=Object.keys(this.burgerParts);for(let G=0;G0,U=j.Aq$.isDefined(this.data.bot)&&this.data.bot.length>0;if(B&&(k+=this.data.top,U&&(k+="-")),U&&(k+=this.data.bot),0===k.length&&j.Aq$.isDefined(this.data.icon)){const B=j.Aq$.isDefined(this.data.atlas)?this.data.atlas:le.t.getIconAtlas(this.data.icon),U=le.t.getIconFrame(this.data.icon);j.Aq$.isDefined(B)&&(k=j.Aq$.isDefined(U)?`${B}-${U}`:B)}return j.Aq$.isDefined(this.name)&&""!==this.name||(this.name=k),k}}class no extends ur.k{constructor(k,B,U,F,G,j=null,$,H){super(k,B,U,F,G[0],j),this.frames=[],this.frameIndex=0,this.frames=G,this.scaleValues=$,this.positionValues=H,this.updateFrameProperties()}get frameNumber(){return this.frameIndex}set frameNumber(k){j.Aq$.isDefined(this.frames)&&(this.frameIndex=Math.floor(k),this.frameName=this.frames[this.frameIndex],this.updateFrameProperties())}updateFrameProperties(){j.Aq$.isDefined(this.scaleValues)&&(this.scale.x=this.scaleValues[this.frameIndex],this.scale.y=this.scaleValues[this.frameIndex]),j.Aq$.isDefined(this.positionValues)&&(this.x=this.positionValues[this.frameIndex].x,this.y=this.positionValues[this.frameIndex].y)}}var ao=U(85313),ro=U(26657);class oo extends Ar.H{setDefaultYPos(k){this.defaultYPos=k}constructor(k,B,U,F,G,$,H,V,W,q=!1,z,Y){super(k,B,U,F,$),this.sprite=null,this._active=!0,this.callback=null,this.animatedSprite=null,this.animatedSpritePos=null,this.animTween=null,this.sfxID=null,this.sfxClip=null,this.spriteOverlay=null,this.spriteOverlayX=0,this.spriteOverlayY=0,this.defaultYPos=0,this.callback=H,this.sprite=K.q.instance.prodigy.create.sprite(0,0,G,$,null,this.onSpriteLoaded.bind(this),z,Y),this.add(this.sprite),j.Aq$.isDefined(V)&&j.Aq$.isDefined(W)&&(this.animatedSprite=K.q.instance.prodigy.create.sprite(W.x,W.y,G,V[0]),this.animatedSpritePos=W,this.add(this.animatedSprite),this.animTween=new ro.s(this.animatedSprite),this.animTween.set("frameName",V,200,9999),this.animTween.start()),this.sprite.inputEnabled=!0,this.sprite.events.onInputDown.add(this.onDown,this),q||(this.sprite.events.onInputUp.add(this.onUp,this),this.sprite.events.onInputOver.add(this.onOver,this)),this.sprite.events.onInputOut.add(this.onOut,this),this.sfxID=18,this.sfxClip="pop",this.onDestroy.add(this.handleDestroy.bind(this))}update(){super.update();const k=Date.now();j.Aq$.isDefined(this.animTween)&&this.animTween.update(k)}setActive(){this._active=!0,this.sprite.tint=16777215}setInactive(k=5789784){this._active=!1,this.sprite.tint=k,this.sprite.y=this.defaultYPos,j.Aq$.isDefined(this.animatedSprite)&&(this.animatedSprite.y=this.animatedSpritePos.y),j.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY)}select(){this.sprite.tint=7447253}deselect(){this._active=!0,this.sprite.tint=16777215,this.sprite.y=this.defaultYPos,j.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY),j.Aq$.isDefined(this.animatedSprite)&&(this.animatedSprite.y=this.animatedSpritePos.y)}isActive(){return this._active}addOverlay(k,B,U,F){return j.Aq$.isDefined(this.spriteOverlay)&&this.spriteOverlay.destroy(),this.spriteOverlayX=k,this.spriteOverlayY=B,this.spriteOverlay=K.q.instance.prodigy.create.sprite(k,B,U,F),this.add(this.spriteOverlay),this.spriteOverlay}onDown(){this.game?this._active?(K.q.instance.prodigy.audio.playSFX(this.sfxID,this.sfxClip),this.sprite.y=this.defaultYPos,j.Aq$.isDefined(this.animatedSprite)&&(this.animatedSprite.y=this.animatedSpritePos.y),j.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY),j.Aq$.isDefined(this.callback)&&this.callback()):K.q.instance.prodigy.audio.playSFX(49,this.sfxClip):j.VyI.log("onDown called on destroyed Button",j.$bb.Warning)}onUp(){this.game?this._active&&this.sprite.input.pointerOver()&&(this.sprite.y=this.defaultYPos-3,j.Aq$.isDefined(this.animatedSprite)&&(this.animatedSprite.y=this.animatedSpritePos.y-3),j.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY-3)):j.VyI.log("onUp called on destroyed Button",j.$bb.Warning)}onOver(){this.game?this._active&&(this.sprite.y=this.defaultYPos-3,j.Aq$.isDefined(this.animatedSprite)&&(this.animatedSprite.y=this.animatedSpritePos.y-3),j.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY-3)):j.VyI.log("onOver called on destroyed Button",j.$bb.Warning)}onOut(){this.game?this._active&&(this.sprite.y=this.defaultYPos,j.Aq$.isDefined(this.animatedSprite)&&(this.animatedSprite.y=this.animatedSpritePos.y),j.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY)):j.VyI.log("onOut called on destroyed Button",j.$bb.Warning)}handleDestroy(){this.visible=!1,this.sprite&&this.sprite.destroy(),this.animTween=null,this.callback=null}onSpriteLoaded(){j.Aq$.isDefined(this.spriteOverlay)&&(this.spriteOverlay.y=this.spriteOverlayY,this.spriteOverlay.x=this.spriteOverlayX)}}class ho extends Ar.H{constructor(k,B,U,F,G,$,H,V,W,z,Y,Q,X){super(k,B,U,F),this.back=null,this.bar=null,this.icon=null,this.label=null,this.direction=0,this.fillFunction=null,this.onFill=null,this.current=0,this.target=0,this.delay=0,this.currentLevel=0,this.speed=1,this.callback=null,this.fillFunction=V,this.direction=H,this.onFill=X,this.back=this.add(K.q.instance.prodigy.create.sprite(0,0,q._.General_core_json,"overlay-small")),this.bar=this.add(K.q.instance.prodigy.create.sprite(1,$-1,q._.General_core_json,"overlay-light")),this.bar.anchor.set(0,1),this.back.width=G,this.back.height=$,this.bar.width=G-2,this.bar.height=$-2,this.bar.tint=j.Aq$.isDefined(W)?W:16777215,this.bar.alpha=Y,this.icon=K.q.instance.prodigy.create.element(this,-Math.floor((80-G)/2),-60),j.Aq$.isDefined(z)&&("string"==typeof z?this.icon.add(K.q.instance.prodigy.create.sprite(0,0,q._.General_icons_json,z)):this.icon.add(K.q.instance.prodigy.icon.createFromData(z,0,0))),this.label=K.q.instance.prodigy.create.font(this.icon,0,20,"",{size:30,width:80,align:"center"}),this.current=0,this.target=0,this.delay=0,this.currentLevel=0,Q&&(this.back.visible=!1),this.setBar()}update(){super.update(),this.current!==this.target?(this.delay--,this.delay<=0&&(this.delay=this.speed,this.currentthis.target&&this.current--,this.setBar())):j.Aq$.isDefined(this.callback)&&(this.callback(),this.callback=null)}setValue(k){this.current=this.target=k,this.setBar()}addValue(k,B,U){return this.target+=k,this.target<0&&(this.target=0),j.Aq$.isDefined(B)?this.speed=B:this.speed=1,this.callback=U,this.target}getValue(){return this.current}getLevel(){return this.currentLevel}setBar(){let k={target:0,text:null,color:null},B={target:0,text:null,color:null},U=1,F=0,G=!0;for(;G;){if(k=this.fillFunction(U),-1===k.target){this.current=this.target,F=1,G=!1;break}if(this.currentthis.currentLevel?(j.Aq$.isDefined(this.onFill)&&this.onFill(U),this.game.add.tween(this.icon,this).to({y:-70},250,j.GS3.Quadratic.Out).to({y:-60},250,j.GS3.Quadratic.In).start()):U=this.pages&&(this.page=this.pages-1),0===this.page?this.up.setInactive():this.up.setActive(),this.page===this.pages-1?this.down.setInactive():this.down.setActive(),this.scroll.y=this.diff*this.page+50,this.scroll.y<50&&(this.scroll.y=50),this.callback(this.page)}}class po extends Ar.H{constructor(k,B,U,F,G,$,H){super(k,B,U,F),this.page=0,this.len=0,this.isVertical=!1,this.bar=null,this.lower=null,this.higher=null,this.slide=null,this.pages=0,this.paging=0,this.inc=0,this.items=0,this.itemsPerPage=0,this.callback=null,this.len=G-100,this.isVertical=$,H&&this.game.broadcaster.addAppListener(oi.Bk.OnMouseWheel,this.onScroll.bind(this),this,"Input",!1),this.isVertical?this.bar=this.add(new Pr.C(this.game,50,0,G,50,q._.Tiled_sprites_json,"slider")):this.bar=this.add(new Pr.C(this.game,0,0,G,50,q._.Tiled_sprites_json,"slider")),this.bar.inputEnabled=!0,this.bar.events.onInputDown.add(this.barClick,this),this.isVertical?(this.lower=K.q.instance.prodigy.create.button(this,50,0,q._.General_core_json,"arrow-btn-back",this.btnClick.bind(this,-1)),this.higher=K.q.instance.prodigy.create.button(this,50,this.len+50,q._.General_core_json,"arrow-btn-next",this.btnClick.bind(this,1))):(this.lower=K.q.instance.prodigy.create.button(this,0,0,q._.General_core_json,"arrow-btn-back",this.btnClick.bind(this,-1)),this.higher=K.q.instance.prodigy.create.button(this,this.len+50,0,q._.General_core_json,"arrow-btn-next",this.btnClick.bind(this,1))),this.lower.setInactive(),this.higher.setInactive(),this.isVertical&&(this.bar.angle=90,this.lower.angle=90,this.higher.angle=90);const V=this.isVertical?new j.M_G(0,50,50,this.len):new j.M_G(50,0,this.len,50);this.slide=this.add(K.q.instance.prodigy.create.sprite(V.x,V.y,q._.General_core_json,"btn-white")),this.slide.anchor.set(this.isVertical?0:.5,this.isVertical?.5:0),this.slide.visible=!1,this.slide.inputEnabled=!0,this.slide.input.enableDrag(),this.slide.input.boundsRect=V,this.slide.events.onDragStop.add(this.onDragStop,this)}getCurrentIndex(){return this.page*this.paging}destroy(k={children:!0}){j.Aq$.isDefined(this.game)&&this.game.broadcaster.removeAppListener(oi.Bk.OnMouseWheel,this,"Input"),super.destroy(k)}reset(k,B,U,F){this.items=k,this.callback=F,j.Aq$.isDefined(B)?this.itemsPerPage=B:this.itemsPerPage=1,this.paging=U<0?this.itemsPerPage:1,U>=0?(this.page=Math.max(0,U-B),this.pages=Math.max(1,this.items-this.itemsPerPage+1)):(this.page=0,this.pages=Math.max(1,Math.ceil(this.items/this.itemsPerPage))),this.inc=this.pages>1?(this.len-50)/(this.pages-1):this.len-50,this.slide.visible=this.pages>1,this.btnClick(0),this.callback(this.page*this.paging)}process(){this.callback(this.page*this.paging)}onDragStop(){let k=0;k=this.isVertical?Math.round((this.slide.y-50-25)/this.inc):Math.round((this.slide.x-50-25)/this.inc),this.btnClick(k-this.page)}barClick(k,B){let U=0;U=this.isVertical?Math.round((B.y-this.bar.world.y-50-25)/this.inc):Math.round((B.x-this.bar.world.x-50-25)/this.inc),this.btnClick(U-this.page)}btnClick(k){const B=this.page;this.page+=k,this.page>this.pages-1&&(this.page=this.pages-1),this.page<0&&(this.page=0),0===this.page?this.lower.setInactive():this.lower.setActive(),this.page===this.pages-1?this.higher.setInactive():this.higher.setActive(),this.isVertical?this.slide.y=75+Math.round(this.inc*this.page):this.slide.x=75+Math.round(this.inc*this.page),B!==this.page&&this.callback(this.page*this.paging)}onScroll(k){j.Aq$.isDefined(this.game)&&this.visible&&this.btnClick(-Math.floor(this.game.input.mouse.wheelDelta))}}class vo extends Ar.H{constructor(k,B,U,F,G,$){super(k,B,U,F),this.callback=null,this.contents=null,this.topIcon=null,this.isActive=!0,this.oldY=null,this.tween=null,this.callback=$,this.contents=K.q.instance.prodigy.create.element(this,0,0);let H=!1;for(let V=0;VZ.setNewIndicatorVisibility(!0))),J.encounters.onPetEncountered(X.ID),Z}character(k,B,U,F,G,j=!1,$=null){const H=Oe.a.fromCharacter(this.game,B);return new jr.v(this.game,k,H,U,F,G,j,$)}player(k,B,U,F,G,j=!1,$=null,H=!1,V=!0){return new jr.v(this.game,k,B,U,F,G,j,$,H,V)}timer(k,B,U,F=!1){return new $r(this.game,k,B,U,F)}houseItem(k,B,U,F,G,j){return new yr._(this.game,k,[new Or.G(this.game,j,B,G)],U,F)}snow(k,B=!1){if(!B&&!Tn.J.isAvgFrameRateAboveThreshold(Vt.s.get("GameConstants.Build.SKIN_FOREGROUND_FPS_THRESHOLD_LIMIT")))return;const U={type:"LINE_ZONE",x1:-200,y1:0,x2:this.game.width,y2:0},F=[new j.d53];or.d.createParticleEmitter(k,1,new j.I9Y(0,0),U,F),or.d.createParticleEmitter(k,2,new j.I9Y(0,0),U,F)}animatedSpineNPC(k,B,U,F,G,$,H,V,W){const q=wr.j.createRenderer(B,F),z=K.q.instance.prodigy.gameContainer.get("c47-20b6"),Y=new yr._(this.game,k,[q,new mr(H),new vr(U)],G,$);if(j.Aq$.isDefined(W)){const k=()=>{q.setInputEnabled(!0),q.getEvents().onInputDown.add((()=>{W(),z.gameWorld.sendNpcClickedEvent({npc_name:null==U?void 0:U.text,npc_type:null==U?void 0:U.npcType})}),q)};j.Aq$.isDefined(q.spine)?k():q.onLoaded.addOnce(k)}return z.gameWorld.sendNpcDiscoveredEvent({npc_name:null==U?void 0:U.text,npc_type:null==U?void 0:U.npcType,x_coord:G,y_coord:$,npc_animation_id:"idle"}),Y}spineNPC(k,B,U,F,G,$,H,V,W=!1,q){const z=K.q.instance.prodigy.gameContainer.get("c47-20b6"),Y=new j._mx;Y.addComponent(j.K16).group.position.set(F,G),k.addChild(Y.legacyTransform.group);const Q=new j._mx(Y);Q.addComponent(j.K16),Q.legacyTransform.group.scale.x=W?-1:1,$&&(Q.name=$.text);const X=Q.addComponent(Wn.v),Z=Q.addComponent(Ir.j);return X.OnLoaded.addOnce((()=>{var k,F,G;Z.playAnimation(U,!0);const W=Q.legacyTransform.group.getLocalBounds();if($){let{x:B,y:U}=$.parent?Y.legacyTransform.group.getGlobalPosition():{x:0,y:0};B+=null!==(k=$.x)&&void 0!==k?k:0,U+=W.y+(null!==(F=$.y)&&void 0!==F?F:-25),this.nameFont(null!==(G=$.parent)&&void 0!==G?G:Y.legacyTransform.group,B,U,$.text)}const K=new j._mx(Q);K.addComponent(j.K16),K.legacyTransform.group.position.set(.5*W.width+W.x,.5*W.height+W.y);const X=K.addComponent(kn.p);X.Width=W.width,X.Height=W.height,X.onClicked.add((()=>{var k;H&&z.gameWorld.sendNpcClickedEvent({npc_name:null!==(k=null==$?void 0:$.text)&&void 0!==k?k:"unknown name",npc_type:H.npcType,npc_id:`${B}`},q),null==V||V()}))})),X.setAsset("number"==typeof B?`spine-${B}`:B),H&&z.gameWorld.sendNpcDiscoveredEvent({npc_name:null==$?void 0:$.text,npc_type:H.npcType,x_coord:H.npcXCoord,y_coord:H.npcYCoord,npc_id:`${B}`,npc_animation_id:U}),Q}timerControl(k,B,U,F,G){return new Cr(this.game,k,B,U,F,G)}nicknamerPedestal(k,B,U,F,G,$){if(!K.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirementsDeprecated(48))return;const H=K.q.instance.prodigy.create.element(F,G,$),V=K.q.instance.prodigy.gameContainer,W=V.get("c47-20b6"),z=V.get("dcf-fcf7"),Y=z.isAvailable(B)?z.getNicknameData(B):[],Q=H.add(K.q.instance.prodigy.create.sprite(0,-100,q._.General_core_2_json,"namer"));0===Y.length?H.alpha=.5:(Q.events.onInputDown.add(K.q.instance.prodigy.open.nicknamer.bind(K.q.instance.prodigy.open,Y,U,B)),Q.inputEnabled=!0);const X=H.add(K.q.instance.prodigy.create.sprite(20,-90,q._.General_core_2_json,"feather"));this.game.add.tween(X,this).to({x:40,y:-98},1500,j.GS3.Linear.None,!0,0,Vt.s.MAX_SAFE_INTEGER,!0),W.gameWorld.sendWorldObjectDiscoveredEvent({object_type:Kn.u_.Nicknamer,x_coord:G,y_coord:$})}notificationBadge(k,B){const U=new Tr.c(this.game).createUIElements(le.t.getItem("ui",97).data.elements,k);return U.find((k=>"badgeNumber"===k.name)).setText(B.toString()),U[0]}}var mo,yo=U(5491),_o=U(93718),Eo=U(34603),wo=U(79009);class To extends j.uAl{constructor(){super(...arguments),this._walkTween=null}get OnAnimationComplete(){return this._walkTween.onTweenComplete}create(){super.create(),this.createWalkTween()}createWalkTween(){this._walkTween=K.q.instance.game.add.tween(this.GameObject.legacyTransform.group,this,!1).to({y:-20},150,j.GS3.Quadratic.Out).to({y:0},150,j.GS3.Quadratic.In)}playAnimation(k,B){"walk"===k?(this._walkTween.killed&&this.createWalkTween(),this._walkTween.loop(B).start()):this.stopAnimation()}stopAnimation(){this._walkTween.killed||this._walkTween.loop(!1)}destroy(){this._walkTween&&(this._walkTween.remove(),this._walkTween=null),super.destroy()}}!function(k){k.default="default",k.reduced="reduced",k.vertical="vertical",k.horizontal="horizontal"}(mo||(mo={}));class So{constructor(){}static Instantiate(k,B,U){const F=new j._mx(B);F.addComponent(j.K16),F.legacyTransform.x=U.offset.x,F.legacyTransform.y=U.offset.y,F.name="sprite appearance";const G=new j._mx(F);G.addComponent(j.K16);const $=G.addComponent(Eo._);$.setAsset(U.assetKey),F.legacyTransform.x-=.5*$.getWidth(),F.legacyTransform.y-=$.getHeight();const H=F.addComponent(j.bE_);return j.Aq$.isDefined(U.hitbox.width)||(U.hitbox.width=$.getWidth()),j.Aq$.isDefined(U.hitbox.height)||(U.hitbox.height=$.getHeight()),H.Container.bind("Hitbox").toConstantValue(U.hitbox),F}}var Ao=U(51315);var Co=U(9831);let Oo=class{constructor(k,B){this._game=k,this._assetLoader=B}create(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){const G=this.getData(B,U,F);return yield this._assetLoader.loadAssets([G.assetKey]),this.selectAppearance(k,G)}))}selectAppearance(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){switch(B.animationType){case Co.V.atlas:return class{constructor(){}static Instantiate(k,B,F){const G=new j._mx(B);G.addComponent(j.K16),G.legacyTransform.x=F.offset.x,G.legacyTransform.y=F.offset.y;const $=new j._mx(G);$.addComponent(j.K16),$.addComponent(Eo._).setAsset(q._.General_pets_json,`${F.buddyTag}/walk/body-0`);const H=$.addComponent(_o.i);H.AtlasKey=F.buddyTag,H.AnimationTargetKey="body",H.setCurrentToBindPose();const V=new j._mx(G);V.addComponent(j.K16),V.legacyTransform.x=2,V.legacyTransform.y=18,V.addComponent(Eo._).setAsset(q._.General_pets_json,`${F.buddyTag}/walk/legs-0`);const W=V.addComponent(_o.i);W.AtlasKey=F.buddyTag,W.AnimationTargetKey="legs",W.setCurrentToBindPose(),G.legacyTransform.x-=.5*G.legacyTransform.width,G.legacyTransform.y-=G.legacyTransform.height;const K=G.addComponent(j.bE_);j.Aq$.isDefined(F.hitbox.width)||(F.hitbox.width=G.legacyTransform.width),j.Aq$.isDefined(F.hitbox.height)||(F.hitbox.height=G.legacyTransform.height),K.Container.bind("Hitbox").toConstantValue(F.hitbox),K.Container.bind("AnimationData").toConstantValue(new wo.F(U(73792)));const z=G.addComponent(j.Fid);return z.Identifier="Animators",z.Components=[H,W],G}}.Instantiate(this._game,k,B);case Co.V.spine:return class{constructor(){}static Instantiate(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const k=new j._mx(B);k.name="spine appearance",k.addComponent(j.K16),k.legacyTransform.x=U.offset.x,k.legacyTransform.y=U.offset.y;const F=k.addComponent(Wn.v),G=new Promise((k=>{F.OnLoaded.addOnce(k)}));F.setAsset(U.assetKey);const $=k.addComponent(j.bE_),H=k.addComponent(j.Fid);return H.Identifier="Animators",H.Components=[k.addComponent(Ir.j)],yield G,j.Aq$.isDefined(U.hitbox.width)||(U.hitbox.width=F.getSpine().width),j.Aq$.isDefined(U.hitbox.height)||(U.hitbox.height=F.getSpine().height),$.Container.bind("Hitbox").toConstantValue(U.hitbox),k}))}}.Instantiate(this._game,k,B);case Co.V.singleImage:return class{constructor(){}static Instantiate(k,B,U){const F=So.Instantiate(k,B,U);F.name="dorm appearance";const G=F.addComponent(j.Fid);G.Identifier="Animators";const $=F.findComponentInChildren(Eo._).GameObject.addComponent(To);return G.Components=[$],F}}.Instantiate(this._game,k,B);case Co.V.spriteSheet:return class{constructor(){}static Instantiate(k,B,U){const F=So.Instantiate(k,B,U);F.name="spritesheet appearance";const G=F.addComponent(j.Fid);G.Identifier="Animators";const $=F.findComponentInChildren(Eo._).GameObject.addComponent(Ao.K);return G.Components=[$],F}}.Instantiate(this._game,k,B);default:return void j.VyI.log(`Bad anim type ${B.animationType}`,j.$bb.Error)}}))}getData(k,B,U){var F,G,$,H;const V=le.t.getItem(k,B),W=V.metadata.assets;let q=U;if(!j.Aq$.isDefined(q))switch(k){case yo.V.Follow:case yo.V.Pet:q=mo.default;break;case yo.V.Dorm:q=mo.vertical;break;default:j.VyI.log(`Bad marble transform type: ${k}`,j.$bb.Error)}const K=null==W?void 0:W[q],z={x:0,y:0};(null==K?void 0:K.rootOffset)&&(z.x=j.Aq$.isDefined(K.rootOffset.x)?K.rootOffset.x:0,z.y=j.Aq$.isDefined(K.rootOffset.y)?K.rootOffset.y:0);const Y={xOffset:0,yOffset:0,width:null,height:null};(null==K?void 0:K.hitbox)&&(Y.xOffset=j.Aq$.isDefined(K.hitbox.xOffset)?K.hitbox.xOffset:0,Y.yOffset=j.Aq$.isDefined(K.hitbox.yOffset)?K.hitbox.yOffset:0,Y.width=K.hitbox.width,Y.height=K.hitbox.height);const Q={type:k,ID:B,size:q,offset:z,hitbox:Y,animationType:null!==(F=null==K?void 0:K.type)&&void 0!==F?F:Co.V.spine,assetKey:null,buddyTag:V.data.tag};return Q.assetKey=this.getAssetKeys(Q,null==K?void 0:K.ID,null!==(G=V.metadata.guid)&&void 0!==G?G:J.Q[null===(H=null===($=V.metadata.assets)||void 0===$?void 0:$.default)||void 0===H?void 0:H.assetKey]),Q}getAssetKeys(k,B,U){if(U)return U;switch(k.animationType){case Co.V.atlas:return q._.General_pets_json;case Co.V.spine:return`spine-${B}`;case Co.V.singleImage:case Co.V.spriteSheet:return`${k.size}-${k.type}-${k.ID}`;default:return void j.VyI.log(`Bad anim type ${k.animationType}`,j.$bb.Error)}}};Oo=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)("51c-03a0")),(0,G.Qj)(1,(0,tt.inject)(j.t5G.AssetLoader)),(0,G.Sn)("design:paramtypes",[an.n,Object])],Oo);class Io{constructor(k){this.game=null,this.game=k}create(){return this._dialogueController.close(),this._dialogueController}}(0,G.Cg)([(0,Re.b)("b5b-6fa4"),(0,G.Sn)("design:type",Ca.Z)],Io.prototype,"_dialogueController",void 0);var Do=U(96216);class Ro{constructor(k,B){this.game=null,this.ID=0,this.npc=null,this.dialogue=[],this.events=[],this.game=k,this.ID=B,this.end()}start(){this.text(),this.next()}end(k=null){null==k||k(),this.npc=null,this.dialogue=[],this.events=[]}next(){if(this.events.length>0){const k=this.events[0];this.events.splice(0,1),k()}else this.end()}add(k){this.text(),this.events.push(k)}text(k,B,U){if(!j.Aq$.isDefined(k)&&0===this.dialogue.length)return;const F=K.q.instance.prodigy.dialogue.create();if(this.dialogue.length>0&&(B!==this.npc||!j.Aq$.isDefined(k))){const k=(k,B,G)=>{for(let U=0;U{k(),B()}).bind(this,this.next.bind(this)))}animation(k,B=!1){this.add((()=>{B?k().onTweenComplete.add(this.next.bind(this)):(k(),this.next())}).bind(this))}enableInput(k){this._inputEnabled=k,this.add((()=>{if(this.game.input.enabled=k,!k)for(let k=0;k{K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.saveEnabled=k,this.next()}).bind(this))}set(k,B,U){this.add((()=>{k[B]=U,this.next()}))}path(k,B,U,F=!1){this.add((()=>{F?(k.setPath(B,null,U),this.next()):k.setPath(B,this.next.bind(this),U)}).bind(this))}validPath(k,B,U,F,G=!1){this.add((G=>{G?(k.setValidPath(B,U,F,null),this.next()):k.setValidPath(B,U,F,this.next.bind(this))}).bind(this,G))}hop(k,B,U,F,G=!1){this.add((()=>{G?(k.hop(B,null,U,F),this.next()):k.hop(B,this.next.bind(this),U,F)}).bind(this))}delay(k){this.add(this.game.time.events.addTimer.bind(this.game.time.events,k,this.next,this))}explode(k,B,U,F,G,j=!1,$=!1){this.add((()=>{j?(K.q.instance.prodigy.effects.explode(k,B,U,F,G,null,$),this.next()):K.q.instance.prodigy.effects.explode(k,B,U,F,G,this.next.bind(this),$)}).bind(this))}fire(k,B,U,F,G,j,$=!1){this.add((()=>{$?(K.q.instance.prodigy.effects.fire(k,B,U,F,G,j),this.next()):K.q.instance.prodigy.effects.fire(k,B,U,F,G,j,this.next.bind(this))}).bind(this))}shake(k,B,U,F,G=!1){this.add((()=>{G?(K.q.instance.prodigy.effects.shake(k,B,U,F),this.next()):K.q.instance.prodigy.effects.shake(k,B,U,F,this.next.bind(this))}).bind(this))}sound(k,B,U=!1){if(U)this.add(K.q.instance.prodigy.audio.playSFX.bind(K.q.instance.prodigy.audio,k,B,this.next.bind(this)));else{const U=()=>{K.q.instance.prodigy.audio.playSFX(k,B),this.next()};this.add(U)}}bgm(k){this.add((()=>{j.Aq$.isDefined(k)?(K.q.instance.prodigy.audio.playBGM(k,!0),K.q.instance.prodigy.audio.resumeBGM()):K.q.instance.prodigy.audio.pauseBGM(),this.next()}).bind(this))}tween(k,B,U,F,G){this.add((()=>{const j=this.game.add.tween(k,this).to(B,U,F);G?this.next():j.onTweenComplete.add(this.next.bind(this)),j.start()}).bind(this))}cameraFlash(){this.add((()=>{const k=K.q.instance.prodigy.create.group();k.addChild(new Pr.C(this.game,0,0,K.q.instance.game.width,K.q.instance.game.height,q._.Tiled_sprites_json,"overlay-light")),k.alpha=0,K.q.instance.prodigy.audio.playSFX(20,"camera");const B=this.game.add.tween(k,this).to({alpha:1},150,j.GS3.Linear.None).to({alpha:0},150,j.GS3.Linear.None);B.onTweenComplete.add((()=>{k.destroy(),this.set(k,"visible",!1),this.next()})),B.start()}).bind(this))}reward(k,B){j.Aq$.isDefined(k)&&k.length>0&&this.add(K.q.instance.prodigy.open.gotItem.bind(K.q.instance.prodigy.open,k,this.next.bind(this),null,B))}popup(k){this.add(K.q.instance.prodigy.open.message.bind(K.q.instance.prodigy.open,k,this.next.bind(this)))}functionCallback(k){this.add((()=>{k(this.next.bind(this))}).bind(this))}}class Po{constructor(k){this.game=null,this.eventID=0,this.game=k}create(){return this.eventID++,new Ro(this.game,this.eventID)}}var Mo=U(60881),No=U(84938),xo=U(96494),Lo=U(76599),ko=U(325);let Bo=class{constructor(){this.addAuthorizationHeader=null,this.addAccessTokenHeader=null,this.addAccessTokenBody=null,this._loginPromise=new j.bnh}get userID(){return this._userID}get accessToken(){return this._accessToken}get loginPromise(){return this._loginPromise}setAuthorizationData(k,B){this._userID=k,this.setAuthorizationToken(B)}setAuthorizationToken(k){if(this._accessToken=k,k){this.createAuthorizationHeaderClosure(k),this.createAccessTokenHeaderClosure(k),this.createAccessTokenBodyClosure(k);K.q.instance.prodigy.gameContainer.get("00d-b27e").setToken("identityToken",k,!1,!1),this._loginPromise.resolve()}}createAuthorizationHeaderClosure(k){(()=>{const B=k;this.addAuthorizationHeader=k=>{k.setHeader("Authorization",`Bearer ${B}`)}})()}createAccessTokenHeaderClosure(k){(()=>{const B=k;this.addAccessTokenHeader=k=>{k.setHeader("identityToken",B)}})()}createAccessTokenBodyClosure(k){(()=>{const B=k;this.addAccessTokenBody=k=>{switch(k.getMethod()){case j.iXQ.Get:k.setQueryParameter("identityToken",B);break;case j.iXQ.Head:break;default:let U=k.getBody();U||(U=new te.c,k.setBody(U)),U.setJson(Object.assign(Object.assign({},U.getJson()),{identityToken:B}))}}})()}isLoggedIn(){return null!==this.addAuthorizationHeader}authenticateRequest(k){if(!this.isLoggedIn())throw new Error("Attempting to authenticate with Identity when not logged in.");k.setHeader("userID",`${this._userID}`),this.addAuthorizationHeader(k)}logout(){this.addAuthorizationHeader=null,this.addAccessTokenHeader=null,this.addAccessTokenBody=null}addValuesToHeader(k){if(!this.isLoggedIn())throw new Error("Attempting to add access token with Identity when not logged in.");this.addAccessTokenHeader(k)}addValuesToBody(k){if(!this.isLoggedIn())throw new Error("Attempting to add access token with Identity when not logged in.");this.addAccessTokenBody(k)}};function Uo(k){return void 0!==k.showQuestion}Bo=(0,G.Cg)([(0,tt.injectable)()],Bo);class Fo{get isQuestionInterfaceOpen(){return this._isQuestionInterfaceOpen}constructor(k){this._staticQuestionList=[{skillId:392,questionId:18171},{skillId:392,questionId:18204},{skillId:436,questionId:20103},{skillId:436,questionId:20120},{skillId:1204,questionId:56219},{skillId:1204,questionId:56231},{skillId:1274,questionId:59834},{skillId:1274,questionId:59865},{skillId:224,questionId:10194},{skillId:224,questionId:10224}],this.isNew=!1,this.game=null,this.rankUpArray=null,this.game=k,this.st=K.q.instance.prodigy.gameContainer.get("c97-bd0d"),this.onQuestionAnswered=new j.HN0,this.onQuestionInterfaceOpened=new j.HN0,this.onQuestionInterfaceClosed=new j.HN0,this._isQuestionInterfaceOpen=!1,this._areSoundsLoaded=!1,this._answerCallback=null,this._answerData=null,this._synapse.onNotificationReceived.add(this.handleEducationSynapseNotification,this)}get shouldShowStaticQuestions(){return!1}openFull(){this.game.stage.visible=!1}closeFull(){this.game.stage.visible=!0}showMathQuestion(k,B,U){var F,G,$,H,V,W,q;K.q.instance.prodigy.gameContainer.get("11d-01b8").setView("question-interface");const z=null!=U?U:{};this._isQuestionInterfaceOpen=!0,this.onQuestionInterfaceOpened.dispatch(),this.st.stopInactiveTimer(),this.game.input.keyboard.clearCaptures(),this.reduceBGMVolumeBeforeQuestion();let Y=1;j.Aq$.isDefined(z.forceAnswerBonus)&&(Y=z.forceAnswerBonus?1:0);const Q=null!==(F=z.allowTutorials)&&void 0!==F&&F,X={selector:"#external-content",userID:this._playerDataProvider.player.userID,callback:this.answerQuestion.bind(this,B),classIDs:this._playerDataProvider.player.classIDs,volume:No.B.effectVolume.value,isTeacher:!1,hideCallback:this.openFull.bind(this),showAnswerBonus:Y,showAnswerBonusAnimation:0,showTutorial:Q,canInstantWin:null!==(G=z.canInstantWin)&&void 0!==G&&G,numQuestions:0,instantWinDialogueCallback:null,showProgressBarOnQuestionComplete:!1,progressBarFrom:0,progressBarTo:0,isUserInBattle:null===($=z.isUserInBattle)||void 0===$||$,isBattleRevampExperiment:null===(H=z.revampBattleOverride)||void 0===H||H,disableLock:null!==(V=z.disableLock)&&void 0!==V&&V,sessionUuid:this._uuidProvider.getUUID(),showTopicBadgeAnimations:null===(W=z.showTopicBadgeAnimations)||void 0===W||W};if(this.shouldShowStaticQuestions){const B=null!==(q=this._playerDataProvider.player.getPlayerData().qiStaticQuestionIndex)&&void 0!==q?q:0,U=this._staticQuestionList[B];return this._playerDataProvider.player.getPlayerData().qiStaticQuestionIndex=B>=this._staticQuestionList.length-1?0:B+1,this._playerDataProvider.player.updated=!0,void k.showGameChallenge(Object.assign(Object.assign(Object.assign({},X),U),{disableLock:!0,scenarioId:1}))}k.showQuestion(X)}showELAQuestion(k,B){this._isQuestionInterfaceOpen||(this._isQuestionInterfaceOpen=!0,this.onQuestionInterfaceOpened.dispatch(),this._areSoundsLoaded=!1,K.q.instance.prodigy.load.assets([Z.c.Sfx_qi_button_default,Z.c.Sfx_qi_button_disabled,Z.c.Sfx_qi_positive_action,Z.c.Sfx_qi_negative_action],((k,B)=>{this._areSoundsLoaded=B})),this.st.stopInactiveTimer(),this.game.input.keyboard.clearCaptures(),this.reduceBGMVolumeBeforeQuestion(),k.open({onClose:this.elaQuestionInterfaceClosedCallback.bind(this),onAnswer:this.answerElaQuestion.bind(this,B),answerLimit:1,preventAbruptClose:!0}))}playSound(k){this._areSoundsLoaded&&K.q.instance.prodigy.audio.playSFXFromGUID(k,void 0,void 0,void 0,!1)}elaQuestionInterfaceClosedCallback(){this._answerData||(this._answerData=this.createEmptyAnswerSchema(),this._answerData.wasCorrect=!1),this.answerQuestion(this._answerCallback,this._answerData),this._isQuestionInterfaceOpen=!1,this.onQuestionInterfaceClosed.dispatch(),this.st.startInactiveTimer(),this.restoreBGMVolumeAfterQuestion(),this.game.input.keyboard.addKeyCapture([Mo.D.BACKSPACE])}question(k,B){this._answerCallback=null!=k?k:null,this._answerData=null,Uo(QI)?this.showMathQuestion(QI,k,B):this.showELAQuestion(QI,k)}updateStrandBasedPlacementTest(k){j.VyI.log("updateStrandBasedPlacementTest",j.$bb.Verbose),j.VyI.log(JSON.stringify(k),j.$bb.Verbose),this.st.updateStrandBasedPlacementTest(k).catch(j.RQr.createHandler("Error updating strand-based placement test"))}createEmptyAnswerSchema(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return{wasCorrect:!1,respTime:0,nFactor:0,awardPrize:!1,awardInstantWin:!1,isMember:k.hasMembership(),playLocation:k.locationSelectionType,sessionID:this._uuidProvider.getUUID(),chances:[],numQuestions:0,skillID:0,currentTheta:0,hwID:0,type:Lo.w.DEFAULT,questionID:0,questionType:void 0}}answerElaQuestion(k,B){const U=this.createEmptyAnswerSchema();U.wasCorrect=B.wasCorrect,this._answerCallback=k,this._answerData=U}answerQuestion(k,B){j.Aq$.isDefined(B.dontSendToAnswersPipeline)&&B.dontSendToAnswersPipeline||this.shouldShowStaticQuestions||!Uo(QI)||this.st.answerQuestion(B).catch(j.RQr.createHandler("Error answering question"));const U={ID:B.skillID,theta:B.currentTheta};if(B.numQuestions>=1)B.numQuestions--,this.question(k,{forceAnswerBonus:!1,energyCost:0,allowTutorials:!1}),j.VyI.log(`calling next question, ${B.numQuestions} remain`,j.$bb.Verbose);else{this._isQuestionInterfaceOpen=!1,this.onQuestionInterfaceClosed.dispatch(),this.st.startInactiveTimer(),this.restoreBGMVolumeAfterQuestion(),this.game.input.keyboard.addKeyCapture([Mo.D.BACKSPACE]),this.closeFull();K.q.instance.prodigy.gameContainer.get("11d-01b8").setView("game"),this._playerDataProvider.player.onQuestionAnswered(B),j.Aq$.isDefined(k)&&k(B.wasCorrect,B.respTime,B.nFactor,B.awardPrize,B.awardInstantWin,U)}this.onQuestionAnswered.dispatch(B.wasCorrect,B)}reduceBGMVolumeBeforeQuestion(){this._questionVolumeToken||(this._questionVolumeToken=No.B.musicVolume.addSmoothedLensMultiplier(.05))}restoreBGMVolumeAfterQuestion(){this._questionVolumeToken&&(this._questionVolumeToken.remove(),this._questionVolumeToken=void 0)}initializeMathQI(k,B){this._playerDataProvider.player.grade=j.Aq$.isDefined(k.chosenGrade)?k.chosenGrade:void 0,j.Aq$.isDefined(k.curriculumTreeID)&&(this._playerDataProvider.player.curriculumTreeID=k.curriculumTreeID),this.shouldShowStaticQuestions||(B.on("assignment-complete",this.finishAssignment.bind(this)),B.on("update-user",this.updateUser.bind(this)),B.on("grade-complete",this.finishGrade.bind(this)),B.on("placement-complete",this.finishPlacement.bind(this)),B.on("placement-test-by-strand-update placement-test-by-strand-complete",this.updateStrandBasedPlacementTest.bind(this)),B.on("update-plan-student",this.updatePlanStudent.bind(this)),B.on("topics-ranked-up",this.updateBreadcrumbs.bind(this))),B.on("video-start",(()=>{K.q.instance.prodigy.audio.pauseBGM()})),B.on("video-stop",(()=>{K.q.instance.prodigy.audio.resumeBGM()})),B.on("get-video-lesson-urls",this.getVideoLessonSignedUrls.bind(this)),B.initWithConfig({studentData:k})}initializeELAQI(k,B){const U=this._subjectProvider.getSubject()===ko.Q.ELA?"ELA":"SCIENCE";B.config({subject:U,authProvider:()=>{const k=K.q.instance.prodigy.gameContainer.get("330-3c25");return{userId:this._identityAuthProvider.userID,identityToken:this._identityAuthProvider.accessToken,gameJwt:k.getToken()}},playerProvider:()=>{const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return{isMember:k.hasMembership(),playLocation:k.locationSelectionType}},gameProvider:()=>({gameTheme:"RPG",sessionUuid:this._uuidProvider.getUUID(),onPlayDefaultButtonSound:this.playSound.bind(this,Z.c.Sfx_qi_button_default),onPlayDisabledButtonSound:this.playSound.bind(this,Z.c.Sfx_qi_button_disabled),onPlayPositiveActionSound:this.playSound.bind(this,Z.c.Sfx_qi_positive_action),onPlayNegativeActionSound:this.playSound.bind(this,Z.c.Sfx_qi_negative_action)})})}initialize(k){Uo(QI)?this.initializeMathQI(k,QI):this.initializeELAQI(k,QI)}loadAndInitEducationData(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=K.q.instance.prodigy.gameContainer.get("c97-bd0d");this._isQuestionInterfaceOpen&&(yield this.onQuestionInterfaceClosed.asPromise());try{const F=yield U.loadEducation(B.userID),G=Object.assign(Object.assign({},F),{goalId:B.goalId,grade:null!==(k=F.grade)&&void 0!==k?k:F.chosenGrade});B.onEducationLoaded(G),B.setEducation(G.chosenGrade,G.curriculumTreeID),B.initEducation(),B.updated=!0}catch(F){throw j.RQr.logError(F,"Error loading and initializing education data"),F}}))}getStudentData(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U,F,G,j,$,H,V;if(Uo(QI))return QI.fetchStudentData({identityToken:this._identityAuthProvider.accessToken,userId:k});this._subjectProvider.getSubject();const W=yield this.st.fetchStudentData(ko.Q.Math);return{userID:k,chosenGrade:(null===(U=null===(B=W.player)||void 0===B?void 0:B.chosenGrade)||void 0===U?void 0:U.chosenGradeNumber)||void 0,grade:(null===(G=null===(F=W.player)||void 0===F?void 0:F.grade)||void 0===G?void 0:G.gradeNumber)||void 0,curriculumTreeID:(null===($=null===(j=W.player)||void 0===j?void 0:j.curriculum)||void 0===$?void 0:$.id)||void 0,goalId:(null===(V=null===(H=W.player)||void 0===H?void 0:H.grade)||void 0===V?void 0:V.gradeNumber)||void 0}}))}processAnswerResponses(){Uo(QI)&&j.Aq$.isDefined(QI.processAnswerResponses)&&QI.processAnswerResponses()}getMasteredSkills(){return Uo(QI)?QI.getMasteredSkills():0}getAllTopicBadges(){return Uo(QI)?QI.getAllTopicBadges():[]}getRankUpBadges(){return this.rankUpArray}updateUser(k){if(!k.usesGraphQLPlacementTestCompleteMutation){const B=k;j.Aq$.isDefined(B.grade)&&"number"==typeof B.grade?this.st.updatePlayerGrade(B).catch((k=>Tn.J.logUpdateUserFailed())):Tn.J.logUpdateUserFailed(2)}}getVideoLessonSignedUrls(k){if(!Uo(QI))return void j.VyI.log("Cannot fetch video lesson URLs for non-math QI.",j.$bb.Error);this.st.getVideoLessonSignedUrls(k.videoURL,k.captionsURL,(k=>{QI.trigger("video-lesson-urls-fetch-success",k)}),(()=>{QI.trigger("video-lesson-urls-fetch-failure"),j.VyI.log("Fetching signed video lesson URLs for user failed.",j.$bb.Error)}))}updatePlanStudent(k){this.st.updatePlanStudent(k)}updateBreadcrumbs(k){if(this.rankUpArray=k,Uo(QI)&&j.Aq$.isDefined(this.rankUpArray)&&this.rankUpArray.length>0)for(let B=0;Bk.id===this.rankUpArray[B].collectionId));for(let U=0;U=k.topics[U].ranks[k.topics[U].ranks.length-1]&&this._breadcrumbManager.resetBreadcrumbs(ln.B.FEATURE_BADGES)}}finishPlacement(k){this.st.finishPlacement(Object.assign(Object.assign({},k),{grade:parseInt(k.grade,10)})).catch(j.RQr.createHandler("Error finishing placement test"))}finishAssignment(k){this.st.completeAssignment(k.assignmentID)}finishGrade(k){}isVideoLessonActive(){return!!Uo(QI)&&j.Aq$.isDefined(QI.createVideoLessonForSkillWithOptions)}getAvailableLessonReport(){return Uo(QI)?QI.getAvailableLessonReport():[]}createVideoLesson(k,B){return Uo(QI)?QI.createVideoLessonForSkillWithOptions(k,B):null}enableLogging(){Uo(QI)&&QI.enableLogging()}disableLogging(){Uo(QI)&&j.Aq$.isDefined(QI.disableLogging)&&QI.disableLogging()}showGameChallenge(k,B=1,U=0,F=!1,G=66,j=33,$,H=!1){if(!Uo(QI))return;const V={selector:"#external-content",userID:this._playerDataProvider.player.userID,callback:this.answerQuestion.bind(this,$),classIDs:this._playerDataProvider.player.classIDs,volume:No.B.effectVolume.value,isTeacher:!1,hideCallback:this.openFull.bind(this),showAnswerBonus:0,showAnswerBonusAnimation:0,showTutorial:!1,skillId:k,scenarioId:B,numQuestions:U,canInstantWin:!1,showProgressBarOnQuestionComplete:F,progressBarFrom:G,progressBarTo:j,isUserInBattle:!1,disableLock:H,sessionUuid:this._uuidProvider.getUUID()};this.reduceBGMVolumeBeforeQuestion(),QI.showGameChallenge(V)}showProgressBar(k,B){Uo(QI)&&QI.showProgress(k,B)}showBannerComplete(){Uo(QI)&&QI.bannerComplete()}doesSkillIDHaveLesson(k){return!!Uo(QI)&&QI.doesSkillIDHaveLesson(k)}getEducationSystemAPI(){return Uo(QI)?QI.EducationSystemAPI:null}handleEducationSynapseNotification(k){switch(k.type){case Be.m.ReloadEducationData:K.q.instance.prodigy.education.loadAndInitEducationData().catch(j.RQr.createHandler("SplashScreen: Error reloading education data"))}}}(0,G.Cg)([(0,Re.b)("e20-0fb0"),(0,G.Sn)("design:type",Wt.E)],Fo.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,Re.b)("2e6-0f71"),(0,G.Sn)("design:type",on.H)],Fo.prototype,"_uuidProvider",void 0),(0,G.Cg)([(0,Re.b)("12f-4e29"),(0,G.Sn)("design:type",xo.F)],Fo.prototype,"_breadcrumbManager",void 0),(0,G.Cg)([(0,Re.b)("40f-f847"),(0,G.Sn)("design:type",Bo)],Fo.prototype,"_identityAuthProvider",void 0),(0,G.Cg)([(0,Re.b)("f1d-f7b1"),(0,G.Sn)("design:type",Qt.W)],Fo.prototype,"_subjectProvider",void 0),(0,G.Cg)([(0,Re.b)("779-a746"),(0,G.Sn)("design:type",Ue.d)],Fo.prototype,"_synapse",void 0);var Go=U(8770),jo=U(83267),$o=U(17002);class Ho extends Ar.H{constructor(k,B,U,F,G,j,$,H){super(k,B,U,F),this.sprite=K.q.instance.prodigy.create.sprite(0,0,G,0),this.sprite.inputEnabled=!0,this.sprite.events.onInputDown.add(this.onClicked,this),this.add(this.sprite),this.callback=H,this.font=K.q.instance.prodigy.create.font(this,0,60,"",{size:20,width:100,align:"left"}),this.icon=K.q.instance.prodigy.create.font(this,0,0,"@",{size:16}),this.icon.alpha=0,this.add(this.icon),this.visible=!1,this.setValue(G,j,$)}setValue(k,B,U){if(U<=0||!j.Aq$.isDefined(U))return this.visible=!1,this.icon.alpha=0,void this.font.setText("");this.visible=!0,j.Aq$.isDefined(k)&&j.Aq$.isDefined(this.sprite.key)&&this.sprite.loadNewTexture(k,B),j.Aq$.isDefined(B)&&(this.sprite.frameName=B),this.font.setText(j.Aq$.isDefined(U)&&U>1?`${U}`:"")}setCallback(k){this.callback=k}onClicked(){j.Aq$.isDefined(this.callback)&&this.callback()}centerAnchor(){this.sprite.anchor.set(.5,.5)}}var Vo=U(571);class Wo{constructor(k){this.game=k}createIcon(k,B,U,F=null,G,j,$,H=!0){return pn.K.cacheAsset(this.game,U,pn.K.zoneAssetsCached),new ur.k(this.game,k,B,U,null,F,G,j,$,H)}gold(k,B,U,F,G,j){return this.createIcon(k,B,Ut.E.getIconForType("currency",1),U,F,G,j)}createFromData(k,B,U,F=null,G,$,H,V){let W;if("gold"===k.type)return this.gold(B,U,F,G,$,H);if("hairColor"===k.type)return W=K.q.instance.prodigy.create.sprite(B,U,q._.General_icons_json,this.iconKey(k),F,G,$,H),W.tint=Go.TZ.rgbToHex(k.data.colors[2][0],k.data.colors[2][1],k.data.colors[2][2]),W;if("eyeColor"===k.type)return W=K.q.instance.prodigy.create.sprite(B,U,q._.General_icons_json,this.iconKey(k),F,G,$,H),W.tint=Go.TZ.rgbArrayToHex(k.data.colors[0]),W;if("skinColor"===k.type)return W=K.q.instance.prodigy.create.sprite(B,U,q._.General_icons_json,this.iconKey(k),F,G,$,H),W.tint=Go.TZ.rgbArrayToHex(k.data.colors[1]),W;if("hair"===k.type){const F=this.iconKey(k),j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.appearance.getHair().color;return W=K.q.instance.prodigy.create.sprite(B,U),K.q.instance.prodigy.colorReplaceController.checkColorAsset(F,[{color:j,itemColor:"hairColor"}],2,(k=>{const B=`${F}-${j}`,U=K.q.instance.prodigy.create.sprite(0,0,B);U.loadTexture(B),W.addChild(U),U.anchor.set(.5,.5),G&&G(W)})),W}return j.Aq$.isDefined(k.type)&&j.Aq$.isDefined(k.ID)?this.createIcon(B,U,this.iconKey(k),F,G,$,H,V):K.q.instance.prodigy.create.sprite(0,0,le.t.getIconAtlas(k),Tn.J.convertItemToIcon(k))}createFromDataAdvanced(k,B,U,F,$,H,V,W){return(0,G.sH)(this,void 0,void 0,(function*(){const G=K.q.instance.prodigy.create.element(B,U,F),z=null!=H?H:B.width-2*U,Y=null!=V?V:B.height-2*F;let Q;const X=new Promise((k=>{Q=k}));let Z=null;const tt=$?new j.I9Y(.5,1):null;if("gold"===k.type)Z=this.gold(0,0,$,Q,H,V);else if("hairColor"===k.type)Z=K.q.instance.prodigy.create.sprite(0,0,q._.General_icons_json,this.iconKey(k),tt,Q,H,V),Z.tint=Go.TZ.rgbToHex(k.data.colors[2][0],k.data.colors[2][1],k.data.colors[2][2]);else if("eyeColor"===k.type)Z=K.q.instance.prodigy.create.sprite(0,0,q._.General_icons_json,this.iconKey(k),tt,Q,H,V),Z.tint=Go.TZ.rgbArrayToHex(k.data.colors[0]);else if("skinColor"===k.type)Z=K.q.instance.prodigy.create.sprite(0,0,q._.General_icons_json,this.iconKey(k),tt,Q,H,V),Z.tint=Go.TZ.rgbArrayToHex(k.data.colors[1]);else if("mathTownInterior"===k.type)Z=K.q.instance.prodigy.create.sprite(-20,0,q._.Towertown_interiors_store_json,this.iconKey(k),tt,Q,H,V);else if("mathTownFrame"===k.type)Z=K.q.instance.prodigy.create.sprite(-20,15,q._.Towertown_frames_store_json,this.iconKey(k),tt,Q,H,V);else if("mathTownDecor"===k.type)Z=this.createIcon(0,0,this.iconKey(k),$,Q,H,V,W);else if("costume"===k.type){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0");Z=yield Vo.z.createFullBodyFromAppearanceData(Object.assign(Object.assign({},k.getAppearance()),{weapon:null,follow:null}),jo.E.createMockPlayerDataProvider(!1)),$o.f.resizeSpriteMaintainingAspectRatio(Z,z,Y),Z.anchor.set(.5,.5),Z.position.set(z/2,Y/2),null==Q||Q()}else Z=j.Aq$.isDefined(k.type)&&j.Aq$.isDefined(k.ID)?this.createIcon(0,0,this.iconKey(k),$,Q,H,V,W):K.q.instance.prodigy.create.sprite(0,0,le.t.getIconAtlas(k),Tn.J.convertItemToIcon(k));if(yield X,G.add(Z),"item"===k.type){const B=le.t.getItem(k.type,k.ID).data;if(j.Aq$.isDefined(B.effect)&&j.Aq$.isDefined(B.effect.transform)){const k=wr.j.createRenderer(J.Q.Spine_morph_marble_icon_json,{type:"spine",anchor:{x:.5,y:.5}});new yr._(this.game,Z,[k]),k.playAnimation("mini",!0)}}return[G,Z]}))}createWithQuantity(k,B,U,F,G,j){return new Ho(this.game,k,B,U,F,null,G,j)}iconKey(k){if("gold"===k.type)return Ut.E.getIconForType("item",26);if("hairColor"===k.type||"skinColor"===k.type||"eyeColor"===k.type)return"empty";if("mathTownInterior"===k.type||"mathTownFrame"===k.type||"mathTowerOrnament"===k.type)return k.data.tag;if("mathTownDecor"===k.type)return`${k.data.tag}-icon`;if("item"===k.type){const B=le.t.getItem(k.type,k.ID);if(!B)return j.VyI.log(`No item found for type - ${k.type}, ID - ${k.ID}`,j.$bb.Error),"empty";{const k=B.data;if(j.Aq$.isDefined(k.effect)&&j.Aq$.isDefined(k.effect.transform))return Ut.E.getIconForType(k.effect.transform,k.effect.ID)}}return Ut.E.getIconForType(k.type,k.ID)}}var qo,Ko=U(88225),zo=U(49569),Yo=U(64270),Qo=U(90156),Xo=U(80003),Zo=U(32389),Jo=U(66207),th=U(63343),eh=U(77992),ih=U(55301),sh=U(72772),nh=U(11848),ah=U(82351),rh=U(223),oh=U(50788),hh=U(37016),ch=U(96989),dh=U(60157);!function(k){k[k.None=0]="None",k[k.AtSchool=1]="AtSchool",k[k.Standard=2]="Standard",k[k.UltraFocussed=3]="UltraFocussed"}(qo||(qo={}));var lh,uh=U(48199),fh=U(77065),bh=U(215),ph=U(46784),vh=U(85515),gh=U(87821),mh=U(21738),yh=U(642),_h=U(16847),Eh=U(22023),wh=U(19690),Th=U(37773),Sh=U(97317),Ah=U(17148),Ch=U(99979),Oh=U(12472);!function(k){k[k.Disabled=0]="Disabled",k[k.Merge=1]="Merge",k[k.MagicoinMerge=2]="MagicoinMerge",k[k.MembershipUpsell=3]="MembershipUpsell",k[k.OtpUpsell=4]="OtpUpsell"}(lh||(lh={}));class Ih extends mh.y{constructor(k,B,U){const F=(0,Dt.G)(oh.J);super(K.q.instance.game,k,F?Ei.l.PetMerge2Modal:Ei.l.PetMergeModal,B,!0),this._showPetMergeDrawer=new j.HN0,this._hidePetMergeDrawer=new j.HN0,this._resetPetMergeDrawerScroll=new j.HN0,this._selectedIngredientSlotIndex=-1,this._onSelectedIngredientsChanged=new j.HN0,this._mergeButtonMode=lh.Merge,this._upsellModalType=qo.None,this.onPetMergeSuccess=new j.HN0,this._petMerge2Enabled=!1,this._isInFTUE=!1,K.q.instance.prodigy.load.assets([ah.B.Sfx_pet_merge_beam_effect,ah.B.Voice_noot_merge_ready_to_merge]),this.isModal=!1,this.skipRenderTransparencyLayer=!1,this._mergeTarget=U,this._petItem=le.t.getItem("pet",this._mergeTarget.ID),this._petMerge2Enabled=F,this._injectablePropertiesDictionary=this.getMergeModalData();const G=K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED);this._isInFTUE=!G&&K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_STARTED),this.onPrefabLoaded.addOnce((()=>{var k,B;const U=j.wa5.getActiveScene().container;if(this._petMerge2Enabled){const F=this._isInFTUE&&!G;this._ingredientWidget=U.get(tr.OA.IngredientWidget),null===(k=this._ingredientWidget)||void 0===k||k.setup(this._mergeTarget,F).catch((()=>{j.VyI.log("Unable to set up ingredientWidget in PetMergeMenu",j.$bb.Warning)})),this._mergeBar=U.get(tr.OA.MergeBar),null===(B=this._mergeBar)||void 0===B||B.setup(this._mergeTarget,!0,F)}else this._ingredientCardSpawner=U.get(tr.OA.IngredientCardSpawner),this._drawerCardSpawner=U.get(tr.oX.PetCardPetSpawner);this.setFTUEStatePetRank(),this.setupMergeButtonMode().catch(j.RQr.createHandler("Error setting up upsell modal")),this._targetPetSpineComponent=U.get(tr.OA.PetSpineComponent),this._mergeRankBadge=U.get(tr.OA.MergeRankBadge).GameObject,this._fanfareParentTransform=U.get(tr.OA.MergeFanfare),this._middlePanelBackingRectTransform=U.get(tr.OA.MiddlePanelBacking),this.bindMagicoinDisplayToPurchase()})),this._isInFTUE&&!this._petMerge2Enabled&&this.onPrefabLoaded.addOnce((()=>{K.q.instance.prodigy.audio.playDialogue({tag:ah.B.Voice_noot_merge_ready_to_merge,s:0,d:-1})})),this._segment.featureCommon.sendInterfaceEvent({interfaceName:ph.B.PetMergePowerUpModal,interfaceType:bi.Wm.Window,originType:bi.$N.ButtonClick,originID:"merge_modal_interface",instanceType:Ai.N.UI});const $=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this._confirmationDialogConfig=new yh.k($.getText("BUTTON_YES_CAPITAL"),(()=>{this._segment.featureCommon.sendButtonEvent({buttonName:"Yes",destinationName:"your_pet_menu",interfaceType:bi.Wm.Window,interfaceName:ph.B.PetMergePowerUpModal,saveClickInfo:ph.B.PetMergePowerUpModal}),this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(bh.Eu.PetMergeConfirm),this.performMerge().catch(j.RQr.createHandler("Error merging pets"))}),$.getText("BUTTON_NO_CAPITAL"),void 0,{atlas:q._.Ui_store_json,name:"icon-large-exclamation"},void 0,void 0,$.getText("MERGE_CONFIRMATION_TITLE"),$.getText("MERGE_CONFIRMATION_BODY"),!0),this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(bh.Eu.PetMergeSelectMerge)}create(){super.create(),(0,wh.Ks)().preloadFromGUIDWithDependencies(Ei.l.PetMergeConsumedIngredient),(0,wh.Ks)().preloadFromGUIDWithDependencies(Ei.l.PetMergePetFanfare),(0,wh.Ks)().preloadFromGUIDWithDependencies(Ei.l.MergeSuccessBadgeVFX),this.onPetMergeSuccess.add(this.playFanfareAnimations.bind(this))}close(){var k;this._showPetMergeDrawer.dispose(),this._hidePetMergeDrawer.dispose(),this._resetPetMergeDrawerScroll.dispose(),this._onSelectedIngredientsChanged.dispose(),this.onPetMergeSuccess.dispose(),null===(k=this._hardCurrencyDataProvider)||void 0===k||k.onBalanceChanged.removeAll(this),super.close()}getMergeModalData(){var k;const B=K.q.instance.prodigy.gameContainer.get("306-5359"),U=this._petItem.data,F=this._mergeTarget.mergeRank,G=Eh.P8.isPetOnTeam(this._mergeTarget),H=B.getChargedLevel(),V=G&&H>0,W=V?Th.e.getChargedLevelTierFromLevel(H):Sh.Bv.NO_CHARGE,q=W===Sh.Bv.MAX_CHARGE,z=Eh.P8.getBattleStats(this._petItem,this._mergeTarget.level,this._mergeTarget.uniqueID),Y=Eh.P8.getBattleStats(this._petItem,this._mergeTarget.level,this._mergeTarget.uniqueID,1),Q=this._petMerge2Enabled?ch.Y.getMerge2RecipeForPet(this._petItem.ID,U.rarity,F):ch.Y.getRecipeForPet(U.evolution.totalEvos,F);this._validPetIngredientList=Oh.r.getOwnedIngredientsForRecipe(this._mergeTarget,(k=>le.t.getItem("pet",k)),Q);const X=K.q.instance.prodigy.gameContainer.get("12f-4e29"),Z=this._petMerge2Enabled&&X.isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_STARTED)&&!X.isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED);this._requiredIngredientCount=Q.ingredientCount;const J=this._validPetIngredientList.length;this._selectedIngredientPetIndices=$.range(Math.min(this._requiredIngredientCount,J));const tt=Z?0:this._requiredIngredientCount-J,et=J>this._requiredIngredientCount,it=[this._mergeTarget,...this._selectedIngredientPetIndices.map((k=>this._validPetIngredientList[k]))],st=null!==(k=it.find((k=>k.nickname)))&&void 0!==k?k:this._mergeTarget,nt=Math.max(...it.map((k=>k.level))),at=Eh.P8.getRequiredPetMergeIngredient(this._petItem,Q),rt=this.getMagicoinCostForMerge(at.ID,tt,Q),ot=this._hardCurrencyDataProvider.getBalance(27),ht=rt.value>0&&ot>=rt.value&&!this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(rt.value);this._mergeButtonMode=tt<=0?lh.Merge:ht?lh.MagicoinMerge:lh.Disabled;const ct=this._mergeButtonMode!==lh.Disabled,dt=(this._petMerge2Enabled||rt.value>0)&&!this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(rt.value);return{TITLE_TEXT:this._localizer.getText("PET_MERGE_MODAL_TITLE",Eh.P8.getPetDisplayName(this._petItem,st)),CURRENCY_DISPLAY_ID:27,CURRENCY_DISPLAY_AMOUNT:ot,MAGICOIN_PRICE:rt.value,SHOW_MAGICOIN_PRICE:dt,SHOW_MEMBER_ICON:this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(rt.value)&&this._mergeButtonMode!==lh.Merge,UPDATE_MAGICOIN_BUDGET:ot,LEVEL_TEXT:`${nt}`,MERGE_RANK:F,STAT_TEXT_COLOR:V?gh.o.CHARGED_STAT_COLOR_MAP[U.rarity]:void 0,HEALTH:z.hp,ADDITIONAL_HEALTH:"+"+(Y.hp-z.hp),POWER:z.power,ADDITIONAL_POWER:"+"+(Y.power-z.power),SPEED:z.speed,ADDITIONAL_SPEED:"+"+(Y.speed-z.speed),DEFENCE:z.defence,ADDITIONAL_DEFENCE:"+"+(Y.defence-z.defence),IS_CHARGED:V,CHARGED_TIER_1:V&&!q,CHARGED_TIER_2:q,RARITY:U.rarity,ELEMENT:U.affinity,INGREDIENT_CARD_DATA:$.range(this._requiredIngredientCount).map((k=>{var B;const U=this._validPetIngredientList[k],F=null!=U?U:this._mergeTarget,G={SELECTED:!1,PET_ID:F.ID,PET_DATA:F,NAME:null,LEVEL:1,MERGE_RANK:0,SHOW_MERGE_RANK_BADGE:!1,SHOW_ON_TEAM:!1,SHOW_UPGRADE:!1,SHOW_EVOLVE:!1,SHOW_STATIC_EVOLVE:!1,SHOW_GUIDE_HAND:!1,SHOW_PET_GEAR:!0};if(U)return Object.assign(Object.assign({},G),{DISABLED:!1,INPUT_ENABLED:ct,ON_CLICK:()=>{if(et)this.showMergePetDrawer(k);else{const B=this._ingredientCardSpawner.spawnedPrefabs[k];K.q.instance.prodigy.audio.playSFX(49,"pop");const U={bodyText:this._localizer.getText("PET_MERGE_MODAL_EXACT_INGREDIENTS")},F=uh.A.displayTooltipTargeted(void 0,B,U,B);j.Aq$.isDefined(F)&&F.GameObject.setLayer(vh.E.OverlayLayer,!0)}},NAME:Eh.P8.getPetDisplayName({type:"pet",ID:U.ID},U),NAME_ALIGN_H:j.If$.Left,LEVEL:U.level,MERGE_RANK:Eh.P8.getPetDisplayMergeRank(U.ID,U.uniqueID),SHOW_MERGE_RANK_BADGE:Eh.P8.canPetAccessMergeRanks(U.ID)});{const k=null!==(B=Eh.P8.getRequiredPetMergeIngredient(this._petItem,Q))&&void 0!==B?B:this._petItem;return Object.assign(Object.assign({},G),{PET_ID:k.ID,PET_DATA:{ID:k.ID},DISABLED:!0,INPUT_ENABLED:!1,NAME:this._localizer.getText("PET_MERGE_MODAL_DISABLED_SLOT_TEXT"),NAME_ALIGN_H:j.If$.Center,LEVEL:1,MERGE_RANK:0,SHOW_MERGE_RANK_BADGE:!1,SHOW_ELEMENT_ICON:!1,SHOW_LEVEL_ICON:!1,SHOW_PET_GEAR:!1})}})),PET_ID:this._mergeTarget.ID,PET_GEAR:this._mergeTarget.gear,CHARGED_CREATURE_EFFECT_TIER:W,CHARGED_CREATURE_EFFECT_DISPLAY_TYPE:V?Sh.X$.IDLE:Sh.X$.HIDDEN,DRAWER_DATA:{PET_DATA:this._validPetIngredientList.map(((k,B)=>({PET_ID:k.ID,PET_DATA:k,NAME:Eh.P8.getPetDisplayName(le.t.getItem("pet",k.ID).data,k),LEVEL:k.level,MERGE_RANK:k.mergeRank,SHOW_MERGE_RANK_BADGE:Eh.P8.canPetAccessMergeRanks(k.ID),SHOW_UPGRADE:!1,SHOW_EVOLVE:!1,SHOW_STATIC_EVOLVE:!1,SHOW_ON_TEAM:B=this._requiredIngredientCount,ON_CLICK:()=>{this.selectIngredient(B)}}))),PET_GRID_FIXED_COLUMN_COUNT:2,DRAWER_WIDTH:444,DRAWER_HEIGHT:720,TITLE:this._localizer.getText("PET_MERGE_MODAL_DRAWER_TITLE"),START_OFFSCREEN_X:-800,TWEEN_IN_SIGNAL:this._showPetMergeDrawer,TWEEN_OUT_SIGNAL:this._hidePetMergeDrawer,RESET_SCROLL_SIGNAL:this._resetPetMergeDrawerScroll,ON_CLOSE:()=>{this.hideMergePetDrawer()}},MERGE_ENABLED:ct,MERGE_SUCCESS_SIGNAL:this.onPetMergeSuccess,ON_MERGE_CLICK:()=>this.onMergeButtonClicked(rt),PET_STANDEE:Ch.bf[U.affinity],MERGE_BUTTON_TEXT:this._localizer.getText(tt>0?"GET_PETS_AND_MERGE":"MERGE"),PET_MERGE_MODAL_CLOSE_BUTTON:()=>this.sendMergeCancelledEvent()}}onMergeButtonClicked(k){const B=K.q.instance.prodigy.gameContainer.get("12f-4e29"),U=this._petMerge2Enabled&&B.isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_STARTED)&&!B.isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED),F=()=>this._segment.item.sendInsufficientCurrencyEvent(k,{sink_type:gn.C.PetMerge,sink_id:this._mergeTarget.ID});if(K.q.instance.prodigy.audio.stopVoice(),this._petMerge2Enabled||this.hideMergePetDrawer(),(0,rs.v)(this._mergeButtonMode!==lh.Disabled),this._mergeButtonMode===lh.OtpUpsell)F(),this.showOtpUpsellModal(k);else if(this._mergeButtonMode===lh.MembershipUpsell)F(),(0,rs.v)(this._upsellModalType!==qo.None),this.showMembershipUpsellModal(this._upsellModalType);else{const k=Object.assign(this._mergeTarget,{mergeRank:this._mergeTarget.mergeRank}),B=this._selectedIngredientPetIndices.map((k=>{const B=this._validPetIngredientList[k];return Object.assign(B,{mergeRank:B.mergeRank})})),F=!U&&Ih.doesMergeRequireConfirmation(k,B),G=F?ph.B.PetMergePowerUpWarning:ph.B.PetMergePowerUpModal,$=this._petMerge2Enabled?this._ingredientWidget.missingIngredientCount:this._ingredientCardSpawner.spawnedPrefabs.length-B.length;this._segment.featureCommon.sendButtonEvent({buttonName:$>0?"merge magicoin":"merge",destinationName:F?"warning_pop_up":"your_pet_menu",interfaceType:bi.Wm.Window,interfaceName:G,saveClickInfo:G});const H=4;this._segment.petMerge.sendPetMergeFunnelAdvancedEvent($>0?bh.Eu.PetMergeMagicoin:bh.Eu.PetMergeFinalizeMerge,H),F?(this._segment.featureCommon.sendInterfaceEvent({interfaceType:bi.Wm.Window,interfaceName:G,originType:bi.$N.ButtonClick,originID:G,instanceType:Ai.N.UI}),K.q.instance.prodigy.open.confirmationDialog(this._confirmationDialogConfig)):U?this.performMerge([{type:hh.J1.FTUEMerge}]).catch(j.RQr.createHandler("Error attempting a ftue pet merge")):this.performMerge().catch(j.RQr.createHandler("Error merging pets"))}}showMergePetDrawer(k){this.selectIngredientSlot(k),this._showPetMergeDrawer.dispatch()}hideMergePetDrawer(){this.selectIngredientSlot(-1),this._hidePetMergeDrawer.dispatch()}selectIngredientSlot(k){if(this._ingredientCardSpawner&&this._selectedIngredientSlotIndex!==k){if(this._selectedIngredientSlotIndex>-1){const k={SELECTED:!1};Ja.d.updateInjectedValues(this._ingredientCardSpawner.spawnedPrefabs[this._selectedIngredientSlotIndex],k)}if(k>-1){const B={SELECTED:!0};Ja.d.updateInjectedValues(this._ingredientCardSpawner.spawnedPrefabs[k],B)}this._selectedIngredientSlotIndex=k}}selectIngredient(k){if(this._selectedIngredientSlotIndex<0)return;this._drawerCardSpawner.updateInjectionData(this._selectedIngredientPetIndices[this._selectedIngredientSlotIndex],{SHOW_ON_TEAM:!1,INPUT_ENABLED:!0});this._drawerCardSpawner.updateInjectionData(k,{SHOW_ON_TEAM:!0,INPUT_ENABLED:!1});const B=this._validPetIngredientList[k],U={PET_ID:B.ID,PET_DATA:B,NAME:Eh.P8.getPetDisplayName(le.t.getItem("pet",B.ID).data,B),LEVEL:B.level,MERGE_RANK:Eh.P8.getPetDisplayMergeRank(B.ID,B.uniqueID),SHOW_MERGE_RANK_BADGE:Eh.P8.canPetAccessMergeRanks(B.ID)};Ja.d.updateInjectedValues(this._ingredientCardSpawner.spawnedPrefabs[this._selectedIngredientSlotIndex],U),this._selectedIngredientPetIndices[this._selectedIngredientSlotIndex]=k,this._onSelectedIngredientsChanged.dispatch()}updatePetStatsUI(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._mergeTarget.mergeRank,B=Eh.P8.getBattleStats(this._petItem,this._mergeTarget.level,this._mergeTarget.uniqueID);if(Ja.d.updateInjectedValues(this.prefabContainer,{MERGE_RANK:k,MERGE_ENABLED:!1,INGREDIENT_CARD_DATA:[]},!0),!this._petMerge2Enabled)for(let F=0;Fk.dispose()))}yield j.Egh.timeout(500);{const k=new j.HN0;Ja.d.updateInjectedValues(this.prefabContainer,{POWER_STAT_SWIPE:k},!0),k.dispatch(),Ja.d.updateInjectedValuesWithDelay(this.prefabContainer,{MERGE_POWER:B.power},!0,U).then((()=>k.dispose()))}yield j.Egh.timeout(500);{const k=new j.HN0;Ja.d.updateInjectedValues(this.prefabContainer,{SPEED_STAT_SWIPE:k},!0),k.dispatch(),Ja.d.updateInjectedValuesWithDelay(this.prefabContainer,{MERGE_SPEED:B.speed},!0,U).then((()=>k.dispose()))}yield j.Egh.timeout(500);{const k=new j.HN0;Ja.d.updateInjectedValues(this.prefabContainer,{DEFENCE_STAT_SWIPE:k},!0),k.dispatch(),Ja.d.updateInjectedValuesWithDelay(this.prefabContainer,{MERGE_DEFENCE:B.defence},!0,U).then((()=>k.dispose()))}Ja.d.updateInjectedValues(this.prefabContainer,{ADDITIONAL_HEALTH:"",ADDITIONAL_POWER:"",ADDITIONAL_SPEED:"",ADDITIONAL_DEFENCE:""},!0)}))}playFanfareAnimations(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=yield(0,wh.Ks)().loadWithDependenciesFromGUID(Ei.l.PetMergeConsumedIngredient,this._middlePanelBackingRectTransform.GameObject);B.active=!1;const U=[];let F,G="Merge_1_3";this._petMerge2Enabled?F=this._ingredientWidget.ingredientCount:(F=this._ingredientCardSpawner.spawnedPrefabs.length,G=`Merge_1_${F}`);const $=B.findComponentInChildren(Ir.j);if(Ja.d.updateInjectedValues(this.prefabContainer,{ORB_ANIMATION_COMPLETE:$.OnAnimationComplete},!0),$.OnAnimationComplete.add(this.updatePetStatsUI.bind(this)),!this._petMerge2Enabled)for(let V=0;Vk.GameObject.activeInHierarchy)),Q=Y.GameObject.findComponent(Ir.j),X=Y.getSpine(),Z=Y.getSlot("Text");if(Z){const k=X.getSlotContainer(Z),B=k.addChild(new V.Container);B.scale.set(1,-1);const U=W.getRootContainer(),F=12;B.addChild(U),B.pivot.set(U.width/2,U.height/2),k.addChild(B),B.position.set(0,F)}yield Q.OnAnimationComplete.asPromise(),yield j.Egh.timeout(1500),this._segment.featureCommon.sendInterfaceEvent({interfaceName:ph.B.PetMergePowerUpModal,interfaceType:bi.Wm.Window,instanceType:Ai.N.UI,closeMethod:bi.Lv.Done}),this.close()}))}performMerge(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;K.q.instance.game.input.enabled=!1;let U,F=null!=k?k:this._selectedIngredientPetIndices.map((k=>({type:hh.J1.Pet,uniqueId:this._validPetIngredientList[k].uniqueID})));if(this._petMerge2Enabled&&!k){const k=null===(B=le.t.getItem("pet",this._mergeTarget.ID))||void 0===B?void 0:B.data,U=ch.Y.getMerge2RecipeForPet(this._mergeTarget.ID,k.rarity,this._mergeTarget.mergeRank),G=k=>{var B;return null!==(B=Eh.P8.getPetDisplayMergeRank(this._mergeTarget.ID,k))&&void 0!==B?B:hh.qd.MIN},j=K.q.instance.prodigy.gameContainer.get("306-5359").kennel.getAllPetsByID(this._mergeTarget.ID).filter((k=>k.uniqueID!==this._mergeTarget.uniqueID)).map((k=>({ID:this._mergeTarget.ID,uniqueID:k.uniqueID}))),$=ch.Y.getMergedIngredientCountPerPet(G,j,{ID:this._mergeTarget.ID,uniqueID:this._mergeTarget.uniqueID},k.rarity);F=ch.Y.selectOptimalIngredients($,U.ingredientCount).map((k=>({uniqueId:k,type:hh.J1.Pet})))}U=this._petMerge2Enabled?this._ingredientWidget.missingIngredientCount:this._ingredientCardSpawner.spawnedPrefabs.length-F.length,U>0&&!k&&(F.length=this._petMerge2Enabled?this._ingredientWidget.ingredientCount:this._ingredientCardSpawner.spawnedPrefabs.length,F.fill({type:hh.J1.MagicoinPet},-U));const G=K.q.instance.prodigy.open.showFullScreenSpinner(),$=this._mergeTarget.mergeRank;yield Ih.performMergeAction(this._mergeTarget.uniqueID,F).then((k=>{var B,F;if(k===hh.zb.Success){this._segment.playerProgression.sendPlayerProgressionAdvancedEvent({progressionType:"Pet Rank",progressionNewValue:`${this._mergeTarget.mergeRank}`,progressionPreviousValue:`${$}`,creatureName:Tn.J.getLocalizationNameKey(null===(B=this._petItem)||void 0===B?void 0:B.data),transactionId:this._segment.petMerge.petMergeTransactionId});const k=U>0?5:6;this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(bh.Eu.PetMergeCompleted,k),Ja.d.updateInjectedValues(this.prefabContainer,{MERGE_ENABLED:!1},!0),this.onPetMergeSuccess.dispatch(),this.game.broadcaster.broadcast(oi.ig.Merged,null,[this._mergeTarget])}else{let B,U="",G=[];switch(k){case hh.zb.AlreadyMaxRank:U="PET_MERGE_FAIL_MAX";break;case hh.zb.IncompatibleIngredients:U="PET_MERGE_FAIL_INCOMPATIBLE";break;case hh.zb.NotEnoughIngredients:U="PET_MERGE_FAIL_INGREDIENTS";break;case hh.zb.PetNotOwned:U="PET_MERGE_FAIL_NO_PET_FOUND",G=[null!==(F=this._mergeTarget.uniqueID)&&void 0!==F?F:""];break;case hh.zb.PetCannotBeMerged:default:U="PET_MERGE_FAIL_GENERAL"}K.q.instance.prodigy.open.messageBoxPrefab({text:U,textArgs:G,confirmCallback:B});const $=this._selectedIngredientPetIndices.map((k=>{const B=this._validPetIngredientList[k];return`{ ${Eh.P8.getPetDisplayName(le.t.getItem("pet",B.ID).data,B)}, Id: ${B.ID} }`})).join(",");U+=`. TargetPet: { ${Eh.P8.getPetDisplayName(le.t.getItem("pet",this._mergeTarget.ID).data,this._mergeTarget)}, Id: ${this._mergeTarget.ID} }, ingredients: ${$}, isInFTUE: ${this._isInFTUE}`;const H=new Error(U);Ko.captureException(H),j.RQr.logError(H,"Pet merge failed!")}})).catch((k=>{Ko.captureException(k),j.RQr.logError(k,`Pet merge failed! Pet Id: ${this._mergeTarget.ID}`)})).finally((()=>{G.destroy(),K.q.instance.game.input.enabled=!0}))}))}static performMergeAction(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=K.q.instance.prodigy.gameContainer,F=U.get("306-5359").kennel,G=F.getPetByUniqueID(k).mergeRank,$=U.get("2a4-9266"),H=U.get("c47-20b6"),V=B.map((k=>k.type===hh.J1.Pet?F.getPetByUniqueID(k.uniqueId):null)).filter((k=>null!==k)),W=H.item.beginSecureItemTransaction(),q=yield $.performMergeAction(k,B);if(q.result!==hh.zb.Success)return q.result;const z=!K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED)&&K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_STARTED),Y=F.getPetByUniqueID(k),Q=le.t.getItem("pet",Y.ID),X=null==Q?void 0:Q.data,Z=(0,Dt.G)(oh.J)?ch.Y.getMerge2RecipeForPet(Q.ID,X.rarity,G):ch.Y.getRecipeForPet(X.evolution.totalEvos,G);return z&&Ih.completePetMergeFTUE(Y,Z.ingredientCount),j.Aq$.isDefined(Y.team)&&Ah.k.cachedDisabledEvolutionFeature&&(F.updated=!0,F.refreshPetTeamData()),B.some((k=>k.type===hh.J1.MagicoinPet))?H.petMerge.sendPetMergedMagicoinEvents({ingredients:V,ingredientBypass:Z.ingredientCount-V.length,basePetData:Y,previousRank:G}):B.some((k=>k.type===hh.J1.MembershipReward))?H.petMerge.sendPetMergedUpsellEvents({ingredientBypass:Z.ingredientCount,basePetData:Y,previousRank:G}):H.petMerge.sendPetsMergedEvents({ingredients:V,basePetData:Y,previousRank:G}),Ih.sendMergePetQuestEvent(X),H.featureCommon.sendFetchPetRosterEvent([Y,...V],{trigger_type:"pet_merge",trigger_id:H.petMerge.petMergeId,fetch_scope:bi.oi.Partial}),W.flush({transaction_id:H.petMerge.petMergeTransactionId,sink_type:gn.C.PetMerge}),q.result}))}static doesMergeRequireConfirmation(k,B){if((0,Dt.G)(oh.J))return!1;if(0===B.length)return!1;const U=k.mergeRank;for(const $ of B){if($.mergeRank>U)return!0}let F=0;!!k.nickname&&F++;for(const $ of B){if(!!$.nickname&&(F++,F>1))return!0}const G=le.t.getItem("pet",k.ID).data.evolution.totalEvos,j=ch.Y.getRecipeForPet(G,U);if(ch.Y.isMerge1Recipe(j))for(const $ of B){if(le.t.getItem("pet",$.ID).data.evolution.tier>j.evolutionTier)return!0}return!1}setFTUEStatePetRank(){if(nh.N.shouldShowPetMergeTutorial){K.q.instance.game.broadcaster.broadcast(oi.ki.FtueMergeModalLoaded);const k=this._mergeButtonMode!==lh.Merge;Ja.d.updateInjectedValues(this.prefabContainer,Object.assign({[tr.$z.PetMergeModalFTUEEnabled]:!0,[tr.$z.PetMergeModalFTUECloseButtonEnabled]:k},k&&{[tr.$z.PetMergeModalCloseButton]:()=>{Ih.escapePetMergeFTUE(this._mergeTarget.uniqueID)}}))}}static escapePetMergeFTUE(k){var B;const U=K.q.instance.prodigy.gameContainer.get("306-5359").kennel.getPetByUniqueID(k),F=null===(B=le.t.getItem("pet",U.ID))||void 0===B?void 0:B.data,G=(0,Dt.G)(oh.J)?ch.Y.getMerge2RecipeForPet(U.ID,F.rarity,U.mergeRank):ch.Y.getRecipeForPet(F.evolution.totalEvos,U.mergeRank);Ih.completePetMergeFTUE(U,G.ingredientCount,!0)}static completePetMergeFTUE(k,B,U=!1){const F=K.q.instance.prodigy.gameContainer.get("c47-20b6");K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED),nh.N.shouldShowPetMergeTutorial=!1,K.q.instance.game.broadcaster.broadcast(oi.ki.FtueCompleted),F.petMerge.sendPetMergeTutorialFunnelAdvancedEvent(bh.S4.TutorialComplete),U&&F.petMerge.sendPetMergeCancelledEvent(k,B,!0)}setupMergeButtonMode(){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._mergeButtonMode===lh.Disabled){if((0,Dt.G)(rh.l).enabled){const k=this._mergeTarget.mergeRank,B=this._petMerge2Enabled?ch.Y.getMerge2RecipeForPet(this._petItem.ID,this._petItem.data.rarity,k):ch.Y.getRecipeForPet(this._petItem.data.evolution.totalEvos,k),U=Eh.P8.getRequiredPetMergeIngredient(this._petItem,B);let F;F=this._petMerge2Enabled?this._ingredientWidget.missingIngredientCount:this._ingredientCardSpawner.spawnedPrefabs.length-this._selectedIngredientPetIndices.length;const G=this.getMagicoinCostForMerge(U.ID,F,B);this._mergeButtonMode=this._hardCurrencyDataProvider.canAfford(G)?lh.MagicoinMerge:lh.OtpUpsell}else{const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this._upsellModalType=yield class{static getEligibleUpsellModalTypeForPlayer(k){return(0,G.sH)(this,void 0,void 0,(function*(){let B=qo.None;const U=k.hasMembership(),F=k.isPlayingAtSchool();if(U){const U=yield k.getMembershipUpsellData();0!==U.upgradeOptions.length&&(B=F?qo.AtSchool:1===U.upgradeOptions.length?qo.UltraFocussed:qo.Standard)}else B=F?qo.AtSchool:qo.Standard;return B}))}}.getEligibleUpsellModalTypeForPlayer(k),this._upsellModalType!==qo.None&&(this._mergeButtonMode=lh.MembershipUpsell)}this._mergeButtonMode!==lh.Disabled&&Ja.d.updateInjectedValues(this.prefabContainer,{MERGE_ENABLED:!0},!0)}}))}bindMagicoinDisplayToPurchase(){var k;const B=this._hardCurrencyDataProvider.getBalance(27),U=this.prefabContainer.findComponentInChildren(_h.n),F=this.prefabContainer.findComponentInChildren(fh.B);null==U||U.updateAmount(B),F&&(F.initialNumber=B,null===(k=this._hardCurrencyDataProvider)||void 0===k||k.onBalanceChanged.add((()=>{const k=this._hardCurrencyDataProvider.getBalance(27);F.targetNumber=k,F.startCounter(),Ja.d.updateInjectedValues(this.prefabContainer,{MERGE_ENABLED:!1,UPDATE_MAGICOIN_BUDGET:k},!0),this._mergeButtonMode=lh.Disabled,this.setupMergeButtonMode().catch(j.RQr.createHandler("Error setting up Merge button mode"))}),this))}showOtpUpsellModal(k){this.sendFunnelStartEvent();const B=K.q.instance.prodigy.gameContainer.get("306-5359").getCurrencyAmount(k.currency),U=$.noop;K.q.instance.prodigy.open.unifiedConversionFlow(U,{conversionFunnelName:Sn.o.FunnelNotEnoughCurrency},null,{[tr.FK.OtpMissingMagicoin]:k.value-B})}sendFunnelStartEvent(){const k={type:"Pet-Merge-Not-Enough-Ingredients",category:"Pet-Merge",contentId:`${this._mergeTarget.ID}`,contentType:"Pet-Merge-Not-Enough-Ingredients",adType:_n.R.Contextual,adVersion:yn.P.getAdVersionFromTriggerCategory("Pet-Merge")},B=this._segment.purchase.sendFunnelTriggerImpression(k);this._segment.purchase.sendFunnelStart(k,B)}showMembershipUpsellModal(k){if(!Pt.pF.eligibleForMembershipPurchaseForMultipleTiers())return void K.q.instance.prodigy.open.messageBoxPrefab({text:"YOU_DONT_HAVE_ENOUGH_MAGICOIN"});if(this._upsellModalType===qo.AtSchool)return void K.q.instance.prodigy.open.membershipSchoolAd();if(this.sendFunnelStartEvent(),yn.P.shouldUseUnifiedConversionFlow(Sn.o.FunnelPetMergeNotEnoughCurrency)){const k=$.noop;return void K.q.instance.prodigy.open.unifiedConversionFlow(k,{conversionFunnelName:Sn.o.FunnelPetMergeNotEnoughCurrency})}let B="";switch(k){case qo.Standard:B=Ei.l.ContextualPromptPetMergeDualPackage;break;case qo.UltraFocussed:B=Ei.l.ContextualPromptPetMergeUltraFocused;break;default:throw new Error(`Invalid upsell modal type: ${k}`)}const U=this._mergeTarget.mergeRank,F=le.t.getItem("pet",this._mergeTarget.ID),G={CONTEXTUAL_CHASE_PET_SPINE_GUID:J.Q[`Spine_pet_${this._mergeTarget.ID}_json`],CONTEXTUAL_CHASE_PET_NAME:Tn.J.getLocalizationNameKey(F),CONTEXTUAL_CONTENT_OLD_RANK:U,CONTEXTUAL_CONTENT_NEW_RANK:U+1};K.q.instance.prodigy.open.petMergeUpsellModal(B,G).onDestroy.addOnce(this.getMembershipConversionAwareModalResultHandler())}getMagicoinCostForMerge(k,B,U){const F=this._hardCurrencyDataProvider.petMergeIngredientCost(k);return(0,rs.v)(!!F,`Couldn't find cost for pet id: ${k}`),F.value*=Math.max(B,0),ch.Y.isMerge2Recipe(U)&&U.cost.forEach((k=>{"currency"===k.type&&27===k.id&&(F.value+=k.amount)})),F}getMembershipConversionAwareModalResultHandler(){let k=$.noop;return K.q.instance.game.broadcaster.addAppListener(oi.H3.MembershipResponseReceived,(B=>{"success"===B&&(k=()=>{this.performMerge([{type:hh.J1.MembershipReward}]).catch(j.RQr.createHandler("Error performing merge action during upsell"))})}),this),()=>{k()}}static sendMergePetQuestEvent(k){const B={params:{taskEventType:dh.Z7.Pet,rarity:k.rarity,itemType:"pet",source:gn.C.PetMerge,id:k.ID,element:k.affinity,level:k.level}};K.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(as.T.MERGE_PET,B).catch(j.RQr.createHandler("Error sending a quest event for merging a pet"))}sendMergeCancelledEvent(){this._isInFTUE||this._segment.petMerge.sendPetMergeCancelledEvent(this._mergeTarget,this._requiredIngredientCount,!1)}destroy(){this._showPetMergeDrawer.dispose(),this._hidePetMergeDrawer.dispose(),this._resetPetMergeDrawerScroll.dispose(),this._onSelectedIngredientsChanged.dispose(),this.onPetMergeSuccess.dispose(),super.destroy()}}(0,G.Cg)([(0,Re.b)("5c7-e02d"),(0,G.Sn)("design:type",Hi.W)],Ih.prototype,"_hardCurrencyDataProvider",void 0),(0,G.Cg)([(0,Re.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Ih.prototype,"_localizer",void 0);var Dh=U(96217);class Rh extends mh.y{constructor(k,B,U,F){super(K.q.instance.game,k,Ei.l.PostLossFlowScreen,B,!0),this.onPrefabLoaded.addOnce((()=>{this.prefab.findComponentInChildren(Dh.Q).setUpScreen({continueCallback:this.close.bind(this),teamUids:F,nootTipBattleInfo:U})}))}}var Ph=U(43579),Mh=U(74712),Nh=U(12270),xh=U(32367),Lh=U(19609),kh=U(63119),Bh=U(17291),Uh=U(32492);class Fh extends Bh.b{constructor(k,B){super(k,B,null,{hideContent:!1,hideMenu:!1}),this.classCode=null,this.classCodeNextButton=null,this.classCodeBackButton=null,this.error=null,this.codeField=null,this._spinner=null,this._blockingOverlay=null,this._localizer=null,this.onClassCodeSubmitComplete=new j.HN0,this._localizer=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),K.q.instance.prodigy.load.assets(j.Aq$.isDefined(j.Aq$.getUrlVariable("unlock"))?[q._.General_core_2_json,q._.Font_black_json,q._.General_icons_json,q._.Ui_common_neutral_json,q._.Font_button_json,q._.Font_general_json,nr.q.Bg_generic_outdoor,nr.q.Bg_battle_forest]:[q._.General_core_2_json,q._.Font_black_json,"monster-small-125","monster-small-126","monster-small-127","monster-small-128","monster-small-129",q._.General_icons_json,q._.Ui_common_neutral_json,q._.Font_button_json,q._.Font_general_json,nr.q.Bg_generic_outdoor,nr.q.Bg_battle_forest],(()=>{this.menuSetup()}))}menuSetup(){K.q.instance.game.broadcaster.addAppListener(oi.bS.POST_MESSAGE_RECEIVED,((k,B)=>{"class-code-entry"===B.name&&this.setCode(B.classCode)}),this,K.q.instance.game),this._blockingOverlay=this.addChild(K.q.instance.prodigy.create.sprite(0,0,q._.General_core_json,"overlay-small")),this._blockingOverlay.width=this.game.width,this._blockingOverlay.height=this.game.height,this._blockingOverlay.alpha=.5,this._blockingOverlay.inputEnabled=!0,this.classCode=K.q.instance.prodigy.create.element(this,340,170),K.q.instance.prodigy.create.panel(this.classCode,0,0,12,8),this.classCodeNextButton=fo.createNextButton(K.q.instance.game,this.classCode,350,370,this.submit.bind(this)),this.classCodeBackButton=fo.createCloseButton(K.q.instance.game,this.classCode,50,370,this.close.bind(this)),K.q.instance.prodigy.create.font(this.classCode,10,25,this._localizer.getText("CHARACTER_SELECT_ENTER_CLASS"),{size:30,width:600,align:"center"}),this.error=K.q.instance.prodigy.create.font(this.classCode,0,300,"",{width:600,align:"center"}),this.codeField=kh.F.createInputField(K.q.instance.game,this.classCode,"classcodeg","",650-.5*kh.F.WIDTH_MEDIUM,285,kh.F.WIDTH_MEDIUM,kh.F.HEIGHT_MEDIUM,"textg");const k=this.classCode.add(K.q.instance.prodigy.create.sprite(40,200,q._.General_core_json,"overlay-light"));k.alpha=.2,k.width=520,k.height=70,k.inputEnabled=!0,k.events.onInputDown.add(this.getCode,this),K.q.instance.prodigy.create.font(this.classCode,50,210,this._localizer.getText("CHARACTER_SELECT_NO_CLASS_CODE"),{size:20,align:"center",width:500}),this._spinner=this.classCode.add(K.q.instance.prodigy.create.sprite(300,125,q._.General_core_json,"loading")),this._spinner.anchor.set(.5,.5),K.q.instance.game.add.tween(this._spinner,this).to({angle:360},2e3,j.GS3.Linear.None,!0,0,Vt.A.MAX_SAFE_INTEGER,!1),this._spinner.visible=!1,this.visible=!0}close(){K.q.instance.game.broadcaster.removeAppListener(oi.bS.POST_MESSAGE_RECEIVED,this,K.q.instance.game),this.classCode=null,this.classCodeNextButton=null,this.classCodeBackButton=null,this.error=null,this.codeField=null,this._spinner=null,this.onClassCodeSubmitComplete.dispose(),super.close()}getCode(){K.q.instance.prodigy.open.learnMore("HEY_TEACHERS","CLASS_CODE_LEARN_MORE_HEADER","CLASS_CODE_LEARN_MORE_BODY",(()=>{this.codeField.setVisible(!0)}),(()=>{this.codeField.clearEvents(!1),this.codeField.setVisible(!1),K.q.instance.game.input.keyboard.clearCaptures()}))}setCode(k){this.codeField.clearEvents(!0),K.q.instance.game.input.keyboard.addKeyCapture([Mo.D.BACKSPACE]),this.codeField.setValue(k)}validationComplete(k){if(this._spinner.visible=!1,k){this.codeField.setVisible(!1);const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;K.q.instance.prodigy.open.message(this._localizer.getText("CHARACTER_SELECT_NEW_CLASS_BODY"),this.classCodeComplete.bind(this),"star",this._localizer.getText("CHARACTER_SELECT_NEW_CLASS_TITLE")),k.isClassCodeAttached=!0,k.data.classCodeUpdateTimestamp=Date.now()}else this.classCodeBackButton.visible=!0,this.classCodeNextButton.visible=!0,this.codeField.show(0),this.error.setText(this._localizer.getText("CHARACTER_SELECT_ERROR_INVALID_CLASS_CODE"))}submit(){const k=Uh.b.reformatClassCode(this.codeField.getValue());if(Uh.b.isValidClassCode(k)){this.codeField.hide(0),this.error.setText(""),this.classCodeBackButton.visible=!1,this.classCodeNextButton.visible=!1,this._spinner.visible=!0;K.q.instance.prodigy.gameContainer.get("c97-bd0d").attachClassCode(k,this.validationComplete.bind(this,!0),this.validationComplete.bind(this,!1))}else this.error.setText(this._localizer.getText("CHARACTER_SELECT_ERROR_NO_CLASS_CODE"))}classCodeComplete(){this.onClassCodeSubmitComplete.dispatch(),this.close()}}var Gh=U(96810),jh=U(15485),$h=U(65088),Hh=U(35452);class Vh extends Ka.W{constructor(k,B,U,F,G,j,$,H){super(k,B,j,{},$),this.dungeon=null,this.closeButton=null,this.mainPanelButtons=null,this.actionContainer=null,this.zoneName=U,this.dungeon=K.q.instance.prodigy.world.zones[this.zoneName],this.lockoutDuration=F,this.lastAttemptTime=G,this.onClose=H}create(){super.create(),this.closeButton.onClickCallback=()=>{this.close()};const k=Vh.getMinutesSinceLastAttempt(this.lastAttemptTime,Date.now());this.setEntranceTemplate(this.lockoutDuration,k)}setEntranceTemplate(k,B){}onEnterButtonClick(){this.dungeon.enterDungeon()}onCatalogButtonClick(k=null){K.q.instance.prodigy.open.dungeonPrizesMenu(this.zoneName,null!=k?k:this.dungeon.prizeWheelId)}static getMinutesSinceLastAttempt(k,B){return Math.floor((B-k)/6e4)}}class Wh extends Vh{constructor(k,B,U,F){super(k,B,U,0,0,35,[Z.c.Sfx_results_screen,q._.Popup_ui_roulette_json,q._.Npc_face_gale_json,q._.Ui_shared_json],F)}setEntranceTemplate(k,B){const U=k/6e4;if(B>=U){const k=this.instantiateTemplate("unusedAttemptsTemplate",this.mainPanelButtons);k.enterButton.onUpCallback=()=>{this.onEnterButtonClick()},k.catalogButton.onUpCallback=()=>{this.onCatalogButtonClick()},this.instantiateTemplate("unusedAttemptsContent",this.actionContainer)}else{this.instantiateTemplate("maxAttemptsTemplate",this.mainPanelButtons).catalogSoloButton.onUpCallback=()=>{this.onCatalogButtonClick()};const k=this.instantiateTemplate("maxAttemptsContent",this.actionContainer),F=""+(U-B);k.timerText.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DUNGEON_ENTRANCE_TIMER",F)),k["max-titleText1"].setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DUNGEON_ENTRANCE_LOCKOUT",this.dungeon.name))}}}var qh=U(8096);class Kh extends Ka.W{constructor(k,B,U,F=[]){super(k,B,24,U,F.concat([q._.Ui_common_neutral_json,q._.Popup_travel_json])),this.okayButton=null,this.okayText=null}preprocess(k,B=null,U=null,F){const G=j.Aq$.isDefined(B)?`[${B}] ${U}`:U;this.updateConfigModifierProperty("lockImage","frameName",F),this.updateConfigModifierProperty("bannerText","text",G),this.updateConfigModifierProperty("contentText","text",k),this.setGameRenderState(!0)}setOkay(k=null,B){this.okayButton.visible=!0,this.okayText.setText(j.Aq$.isDefined(k)?k:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("BUTTON_OKAY_CAPITAL")),B&&this.setCloseCallback(B),this.okayButton.onClickCallback=this.close.bind(this)}}var zh=U(48208);class Yh extends Ka.W{constructor(k,B,U,F,G){super(k,B,49,null,[q._.Ui_daily_question_json,J.Q.Spine_questionsanswered_confetti_json]),this.animate=!1,super.setCloseCallback(U);const j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.dailyQuestions=j.getDailyQuestions(),this.animate=F}create(){super.create(),this.addCards(),this.addDialog()}addCards(){const k=[];for(let B=0;B<7;B++){const U={day:B,rewardData:this.dailyQuestions.getRewards(B,this.game)};this.dailyQuestions.getCurrentDay()===B?k.push(this.createPrizeCard(U)):zh.V.hasDayPassed(this.dailyQuestions.getCurrentDay(),B)?this.dailyQuestions.isDayComplete(B)?k.push(this.createGreenCard(U)):k.push(this.createGreyCard(U)):k.push(this.createYellowCard(U))}for(let B=1;B1?k[B-1].width+k[B-1].x+25:25;k[B].position=new V.Point(U,"prizeCard"===k[B].name?230:350-k[B].height/2)}k[0].position=new V.Point(k[k.length-1].width+k[k.length-1].x+25,350-k[0].height/2)}addDialog(){const k=K.q.instance.prodigy.dialogue.create(),B=this.dailyQuestions.isCurrentDayComplete()?259:258;k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(`DIALOGUE_NOOT_${B}`,this.dailyQuestions.getNumRequired(this.dailyQuestions.getCurrentDay())),face:0,hideNext:!1}),k.startDeprecated("noot",!1,this.close.bind(this))}createGreenCard(k){const B=this.instantiateTemplate("greenCard",this);return this.createIconGroup(k,B),B.greenCard}createGreyCard(k){const B=this.instantiateTemplate("greyCard",this);return this.createIconGroup(k,B),B.iconGroup.alpha=.6,B.valueText.alpha=.6,B.greyCard}createYellowCard(k){const B=this.instantiateTemplate("yellowCard",this);return this.createIconGroup(k,B),B.burst.visible=0===k.day||6===k.day,B.yellowCard}createPrizeCard(k){const B=this.instantiateTemplate("prizeCard",this);this.createIconGroup(k,B);const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(this.animate){const k=this.game.add.spine(300,10,J.Q.Spine_questionsanswered_confetti_json);k.setAnimationByName(0,"animation",!0),this.titleContainer.add(k,!1,5),B.whiteSquare.image.scale=new V.Point(1,1),B.whiteSquare.image.alpha=0,B.checkmark.image.anchor=new V.Point(.5,.5),B.checkmark.image.scale=new V.Point(0,0),B.checkmark.visible=!0;const U=this.game.add.tween(B.whiteSquare.image,this).to({alpha:1},500,j.GS3.Linear.None,!1,0);U.start(),U.onTweenComplete.add((()=>{B.blueCellMatte.visible=!1,B.greenCellMatte.visible=!0;const k=this.game.add.tween(B.whiteSquare.image,this).to({alpha:0},500,j.GS3.Linear.None,!1,250),U=this.game.add.tween(B.checkmark.image.scale,this).to({x:1,y:1},200,j.GS3.Back.InOut,!1,400);k.chain(U),k.start()}))}else U.getDailyQuestions().isDayComplete(k.day)?(B.blueCellMatte.visible=!1,B.greenCellMatte.visible=!0,B.whiteSquare.visible=!1):(B.whiteSquare.visible=!1,B.checkmark.visible=!1);return B.prizeCard}createIconGroup(k,B){let U=Tn.J.getDayName(this.game,k.day);const F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),G=this.dailyQuestions.getCurrentDay();let $=G+1;if($>6&&($=0),k.day===this.dailyQuestions.getCurrentDay()?U=F.getText("WEEKDAY_NAME_TODAY"):k.day!==$||zh.V.hasDayPassed(G,$,this.dailyQuestions.getResetDayIndex())||(U=F.getText("WEEKDAY_NAME_TOMORROW")),B.titleText.setText(U),k.rewardData.length>1){const U=this.game.add.graphics(0,0);U.beginFill(0),U.drawRect(-25,-10,130,100),U.endFill(),B.iconGroup.add(U),B.iconGroup.mask=U,B.iconGroup.add(K.q.instance.prodigy.icon.createIcon(8,16,Ut.E.getIconForType(k.rewardData[2].type,k.rewardData[2].ID),{x:0,y:0}),0),B.iconGroup.add(K.q.instance.prodigy.icon.createIcon(-28,-10,Ut.E.getIconForType(k.rewardData[0].type,k.rewardData[0].ID),{x:0,y:0}),0),B.iconGroup.add(K.q.instance.prodigy.icon.createIcon(28,-10,Ut.E.getIconForType(k.rewardData[1].type,k.rewardData[1].ID),{x:0,y:0}),0),B.valueText.setText("Coin Bundle!")}else B.iconGroup.add(K.q.instance.prodigy.icon.createIcon(0,0,Ut.E.getIconForType(k.rewardData[0].type,k.rewardData[0].ID),{x:0,y:0}),0),B.valueText.setText(`${k.rewardData[0].N} ${le.t.getItemData(k.rewardData[0].type,k.rewardData[0].ID).name}`)}}class Qh extends Ka.W{constructor(k,B,U,F,G,j=!1,$,H){super(k,B,U===hn.A_.ARCHIVES?36:62,{},[Z.c.Sfx_results_screen,q._.Popup_ui_roulette_json]),this.closeButton=null,this.leaveButton=null,this.stayButton=null,this.goldenPagesPanel=null,this.warningContainer=null,this.endRoom=!1,this.zoneName=U,this.maxGoldenPages=F,this.currentGoldenPages=G,this.leaveCallback=$,this.endRoom=j,this.setCloseCallback(H)}create(){super.create(),this.titleText.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("ARCHIVES_EXIT_TITLE",this.zoneName===hn.A_.ARCHIVES?"the Archives":K.q.instance.prodigy.world.zones[this.zoneName].name)),this.closeButton.onUpCallback=()=>{this.close()},this.stayButton.onUpCallback=()=>{this.close()},this.leaveButton.onUpCallback=()=>{this.onLeaveButtonClick()},this.populatePageIcons(),this.endRoom||this.populateWarning()}onLeaveButtonClick(){if(j.Aq$.isDefined(this.leaveCallback))this.leaveCallback();else{const k=K.q.instance.prodigy.world.zones[this.zoneName];k.resetCooldown(),k.exitDungeon()}this.close()}populatePageIcons(){for(let k=0;k=this.currentGoldenPages?this.instantiateTemplate("greyedPageGraphic",this.goldenPagesPanel):this.instantiateTemplate("goldenPageGraphic",this.goldenPagesPanel)}populateWarning(){this.maxGoldenPages===this.currentGoldenPages?this.instantiateTemplate("allPagesWarning",this.warningContainer):this.instantiateTemplate("missingPagesWarning",this.warningContainer)}}class Xh extends Ka.W{constructor(k,B,U,F,G){if(super(k,B,37,{},[Z.c.Sfx_results_screen,q._.Popup_ui_roulette_json]),this.prizeItems=[],this.closeButton=null,this.upperPrizesPanel=null,this.lowerPrizesPanel=null,this.dungeon=null,this.dungeon=K.q.instance.prodigy.world.zones[U],this.prizeDataID=F,this.closeCallback=G,this.dungeon.ID===hn.A_.ARCHIVES)this.prizeItems=An.Q.getWheelItems(k,this.prizeDataID);else{const k=le.t.getItem("itemTable",this.prizeDataID).data.items;for(let B=0;B{j.Aq$.isDefined(this.closeCallback)&&this.closeCallback(),this.close()};let k="",B="";this.dungeon.ID===hn.A_.ARCHIVES?(k="ARCHIVES_PRIZES_TITLE",B="ARCHIVES_PRIZES_MESSAGE"):(k="TOWER_PRIZES_TITLE",B="TOWER_PRIZES_MESSAGE"),this.ArchivesPrizesTitle.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(k,this.dungeon.name)),this.ArchivesMenuTitle.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(B,this.dungeon.name)),this.populatePrizes(this.prizeItems).catch(j.RQr.createHandler("DungeonPrizesMenu: Failed to populate prizes"))}populatePrizes(k){return(0,G.sH)(this,void 0,void 0,(function*(){yield Promise.all(k.map(((k,B)=>(0,G.sH)(this,void 0,void 0,(function*(){if(!k.item.type||void 0===k.item.ID)return void j.VyI.log(`DungeonPrizesMenu: Prize item missing type or ID: ${k.item.type}-${k.item.ID}`,j.$bb.Error);const U=yield le.t.secureGetItem(k.item.type,k.item.ID);U?yield this.addPrizeElement(U,B<4?this.upperPrizesPanel:this.lowerPrizesPanel,this.checkItemOwned(U)?"prizeItemPanel-owned":"prizeItemPanel"):j.VyI.log(`DungeonPrizesMenu: Failed to retrieve item data for prize ${k.item.type}-${k.item.ID}`,j.$bb.Error)})))))}))}addPrizeElement(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F=this.instantiateTemplate(U,B);F.itemName.setText(k.data.name),F[U].onClickCallback=this.viewPrizeInfo.bind(this,k);const G=F.prizeGraphic.width,j=F.prizeGraphic.height,[$,H]=yield K.q.instance.prodigy.icon.createFromDataAdvanced(k,F.prizeGraphic,0,0,{x:.5,y:.5},.5*G,.5*j);H&&(H.width=G,H.height=j),$.children.length>1&&($.x=-10,$.y=-20,$.getChildAt(1).x=10,$.getChildAt(1).y=-25)}))}viewPrizeInfo(k){K.q.instance.prodigy.open.itemInfo(k,null,Lr.s.View)}checkItemOwned(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return"dorm"===k.type?B.hasHouseItem({type:k.type,ID:k.ID}):B.backpack.hasItem(k.type,k.ID)>0}}var Zh=U(76974),Jh=U(5269),tc=U(87392),ec=U(31091),ic=U(49237),sc=U(12420),nc=U(11472),ac=U(38181),rc=U(28152);let oc=class extends j.uAl{constructor(){super(...arguments),this._button=null,this._downStateText=null,this._overStateText=null,this._upStateText=null}get button(){return this._button}get downStateText(){return this._downStateText}get overStateText(){return this._overStateText}get upStateText(){return this._upStateText}};(0,G.Cg)([(0,j.MnK)(ic.$),(0,G.Sn)("design:type",ic.$)],oc.prototype,"_button",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],oc.prototype,"_downStateText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],oc.prototype,"_overStateText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],oc.prototype,"_upStateText",void 0),oc=(0,G.Cg)([(0,j.EVk)("CustomKeyboardLetter")],oc);let hc=class extends j.uAl{constructor(){super(...arguments),this._alphabet=[],this._gridLayout=null,this._initializeOnCreate=!0,this.onButtonClicked=new j.HN0,this._customKeyboardLetters=[]}get alphabet(){return this._alphabet}get gridLayout(){return this._gridLayout}get initializeOnCreate(){return this._initializeOnCreate}create(){super.create(),this._initializeOnCreate&&this.initialize()}destroy(){super.destroy(),this.onButtonClicked&&this.onButtonClicked.dispose()}initialize(){const k=K.q.instance.prodigy.gameContainer.get("d0e-64fd");this.createLetterGameObjects(k,this._customKeyboardLetters,this._gridLayout)}setVisible(k){k&&this._customKeyboardLetters.forEach((k=>{k.button.transition.setState(Zh.K.Up)})),this.GameObject.active=k}createLetterGameObjects(k,B,U){for(let F=0;F{K.q.instance.prodigy.audio.playSFX(18,"pop"),this.onButtonClicked.dispatch(this._alphabet[F])})),B.push(G)}}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",Array)],hc.prototype,"_alphabet",void 0),(0,G.Cg)([(0,j.MnK)(j.JTA),(0,G.Sn)("design:type",j.JTA)],hc.prototype,"_gridLayout",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],hc.prototype,"_initializeOnCreate",void 0),hc=(0,G.Cg)([(0,j.EVk)("CustomKeyboard",rc.Y.uiInput)],hc);let cc=class extends j.uAl{constructor(){super(...arguments),this._backButton=null,this._chooseNameText=null,this._closeButton=null,this._customKeyboard=null,this._doneButton=null,this._nameGridLayout=null,this._nameText=null,this._noNameContainer=null,this._randomButton=null,this._scrollBar=null,this._scrollView=null,this._searchInput=null,this._titleText=null,this._youChoseText=null,this._headerText=null}get backButton(){return this._backButton}get chooseNameText(){return this._chooseNameText}get closeButton(){return this._closeButton}get customKeyboard(){return this._customKeyboard}get doneButton(){return this._doneButton}get nameGridLayout(){return this._nameGridLayout}get nameText(){return this._nameText}get noNameContainer(){return this._noNameContainer}get randomButton(){return this._randomButton}get scrollBar(){return this._scrollBar}get scrollView(){return this._scrollView}get searchInput(){return this._searchInput}get titleText(){return this._titleText}get youChoseText(){return this._youChoseText}get headerText(){return this._headerText}};(0,G.Cg)([(0,j.MnK)(ic.$),(0,G.Sn)("design:type",ic.$)],cc.prototype,"_backButton",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],cc.prototype,"_chooseNameText",void 0),(0,G.Cg)([(0,j.MnK)(ic.$),(0,G.Sn)("design:type",ic.$)],cc.prototype,"_closeButton",void 0),(0,G.Cg)([(0,j.MnK)(hc),(0,G.Sn)("design:type",hc)],cc.prototype,"_customKeyboard",void 0),(0,G.Cg)([(0,j.MnK)(ic.$),(0,G.Sn)("design:type",ic.$)],cc.prototype,"_doneButton",void 0),(0,G.Cg)([(0,j.MnK)(j.JTA),(0,G.Sn)("design:type",j.JTA)],cc.prototype,"_nameGridLayout",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],cc.prototype,"_nameText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],cc.prototype,"_noNameContainer",void 0),(0,G.Cg)([(0,j.MnK)(ic.$),(0,G.Sn)("design:type",ic.$)],cc.prototype,"_randomButton",void 0),(0,G.Cg)([(0,j.MnK)(sc.$),(0,G.Sn)("design:type",sc.$)],cc.prototype,"_scrollBar",void 0),(0,G.Cg)([(0,j.MnK)(nc.B),(0,G.Sn)("design:type",nc.B)],cc.prototype,"_scrollView",void 0),(0,G.Cg)([(0,j.MnK)(ac.S),(0,G.Sn)("design:type",ac.S)],cc.prototype,"_searchInput",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],cc.prototype,"_titleText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],cc.prototype,"_youChoseText",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],cc.prototype,"_headerText",void 0),cc=(0,G.Cg)([(0,j.EVk)("FirstNameSelectorPrefab")],cc);class dc extends Ka.W{constructor(k,B,U,F=!1){super(k,B,200,{},[q._.Ui_store_json,q._.Ui_bam_json,q._.Popup_ui_roulette_json,q._.Ui_registration_json,q._.Ui_raster_icons_json,q._.Ui_raster_pets_menu_json,Z.c.Sfx_book_open,Z.c.Sfx_adding_pet_to_team]),this.prefabRoot=null,this._prefabLoader=null,this._localizer=null,this._selectedFirstNameID=null,this._selectedCell=null,this._firstNameCells=[],this._nameSelected=!1,this._fromStylistShop=!1,this._autoClick={},this.onClose=U,this._fromStylistShop=F}create(){super.create(),this._prefabLoader=K.q.instance.prodigy.gameContainer.get("d0e-64fd"),this._localizer=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),this._activePlayer=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,this._menuGameObject=this._prefabLoader.loadFromGUID(Ei.l.FirstNameSelector),this.prefabRoot.addChild(this._menuGameObject.legacyTransform.group),this._menuPrefab=this._menuGameObject.findComponentInChildren(cc),this._menuPrefab.customKeyboard.onButtonClicked.add(this.showNamesThatStartWithX,this),this.setUpButtons(),this.setUpSearchBar(),this.updateScrollView(),this.standardView(),K.q.instance.prodigy.audio.playSFX(64,"book-open")}destroy(){var k,B;null===(B=null===(k=this._menuPrefab)||void 0===k?void 0:k.customKeyboard)||void 0===B||B.onButtonClicked.remove(this.showNamesThatStartWithX,this),super.destroy()}setUpButtons(){this._menuPrefab.backButton.onClick.add((()=>{K.q.instance.prodigy.audio.playSFX(18,"pop"),this.back()})),this._menuPrefab.randomButton.onClick.add((()=>{K.q.instance.prodigy.audio.playSFX(18,"pop"),this.random()})),this._menuPrefab.doneButton.onClick.add((()=>{this.done()})),this._menuPrefab.doneButton.lockState(Zh.K.Disabled),this._fromStylistShop&&this._menuPrefab.closeButton.onClick.add((()=>{K.q.instance.prodigy.audio.playSFX(18,"pop"),this.onClose=null,this.close()})),this._menuPrefab.closeButton.GameObject.active=this._fromStylistShop}setUpSearchBar(){this._menuPrefab.searchInput.enablePerKeyEvents(!0),this._menuPrefab.searchInput.onTextChanged.add(this.showNamesBasedOnSearch,this),this._menuPrefab.searchInput.onClear.add(this.showNamesBasedOnSearch,this)}onNameSelected(k,B,U){this._selectedCell!==U&&(this._selectedCell&&(this._selectedCell.lockToggle(!1),this._selectedCell.setSelected(!1)),this._selectedCell=U,this._selectedCell.lockToggle(!0),this._selectedFirstNameID=B,this._menuPrefab.chooseNameText.GameObject.active=!1,this._menuPrefab.youChoseText.GameObject.active=!0,this._menuPrefab.nameText.GameObject.active=!0,this._menuPrefab.nameText.text=k,this._nameSelected||(this._menuPrefab.doneButton.unlockState(),this._menuPrefab.doneButton.transition.setState(Zh.K.Up),this._nameSelected=!0))}populateScrollView(k){let B=tc.f.getFilteredFirstNames();if(B=B.filter((B=>B.data.name.substring(0,k.length).toUpperCase()===k.toUpperCase())),this._firstNameCells.length=0,B.length>0){const k=this._menuPrefab.nameGridLayout.GameObject;this._menuPrefab.noNameContainer.active=!1;for(let U=0;U=0;B--)k[B].destroy();this._menuPrefab.nameGridLayout.update()}standardView(){this._menuPrefab.backButton.GameObject.active=!1,this._menuPrefab.customKeyboard.setVisible(!0),this._menuPrefab.scrollView.GameObject.active=!1,this._menuPrefab.noNameContainer.active=!1,this._menuPrefab.searchInput.setVisible(this.shouldShowInput()),this._menuPrefab.titleText.GameObject.active=!this.shouldShowInput(),this._menuPrefab.titleText.text=this._localizer.getText("FIRST_NAME_SELECTOR_TITLE_DEFAULT"),this._menuPrefab.headerText.GameObject.active=!0}startingLetterView(k){this._menuPrefab.customKeyboard.setVisible(!1),this._menuPrefab.searchInput.setVisible(!1),this._menuPrefab.scrollView.GameObject.active=!0,this._menuPrefab.backButton.GameObject.active=!0,this._menuPrefab.backButton.transition.setState(Zh.K.Up),this._menuPrefab.titleText.GameObject.active=!0,this._menuPrefab.titleText.text=this._localizer.getText("FIRST_NAME_SELECTOR_TITLE_LETTER").replace("%LETTER%",k),this._menuPrefab.headerText.GameObject.active=!1}searchView(){this._menuPrefab.customKeyboard.setVisible(!1),this._menuPrefab.scrollView.GameObject.active=!0,this._menuPrefab.backButton.GameObject.active=!1,this._menuPrefab.searchInput.setVisible(!0),this._menuPrefab.titleText.GameObject.active=!1,this._menuPrefab.headerText.GameObject.active=!1}showNamesThatStartWithX(k){this.cleanUpExistingNameObjects(),this.startingLetterView(k),this.populateScrollView(k),this.updateScrollView()}showNamesBasedOnSearch(){""===this._menuPrefab.searchInput.text?this.standardView():(this.cleanUpExistingNameObjects(),this.searchView(),this.populateScrollView(this._menuPrefab.searchInput.text)),this.updateScrollView()}updateScrollView(){this._menuPrefab.scrollView.scrollToPercent(0,Jh.H.Vertical),this._menuPrefab.scrollBar.scrollToPercent(0),this._menuPrefab.scrollView.updateScrollEnabled(Jh.H.Vertical)}close(){this._firstNameCells.length=0,this._menuGameObject.destroy(),super.close()}done(){var k;this._nameSelected?(K.q.instance.prodigy.audio.playSFX(61,"add-pet"),uh.A.displayToolTipAuto(null,null,{bodyText:this._localizer.getText("NAME_CHANGE_SUCCESS"),xPosition:635,yPosition:100}),this._activePlayer.appearance.getName().setFirstName(this._selectedFirstNameID),this._activePlayer.appearance.updated=!0,this._activePlayer.name.init(this._activePlayer.appearance.getName()),null===(k=this._activePlayer.playerContainer)||void 0===k||k.showName(),this.close()):(K.q.instance.prodigy.audio.playSFX(18,"pop"),K.q.instance.prodigy.open.overlayToolTip(uh.A.TOOLTIP_MANUAL,{bodyText:this._localizer.getText("FIRST_NAME_SELECT_CHOOSE_NAME"),xPosition:950,yPosition:533,arrowDirection:Br.i.DOWN}))}back(){this.standardView(),this.updateScrollView()}random(){this._selectedCell&&(this._selectedCell.lockToggle(!1),this._selectedCell.setSelected(!1)),this._menuPrefab.chooseNameText.GameObject.active=!1,this._menuPrefab.youChoseText.GameObject.active=!0,this._menuPrefab.nameText.GameObject.active=!0;const k=La.C.getRandomFirstName();this._selectedFirstNameID=k;const B=le.t.getItem("name",k).data.value.toString();this._menuPrefab.nameText.text=B,this._firstNameCells.some((U=>{if(U.getName()===B)return U.setSelected(!0),this.onNameSelected(B,k,U),!0})),this._nameSelected||(this._menuPrefab.doneButton.unlockState(),this._menuPrefab.doneButton.transition.setState(Zh.K.Up),this._nameSelected=!0)}}var lc=U(92579);class uc{static createSocialStatusIcons(k){const B=K.q.instance.game.renderer;return Object.keys(uc.SOCIAL_STATUS_RENDER_PARAMS).reduce(((U,F)=>{const G=uc.SOCIAL_STATUS_RENDER_PARAMS[F],j=Math.floor(k*uc.SOCIAL_STATUS_ICON_RESOLUTION),$=uc.SOCIAL_STATUS_ICON_RESOLUTION,H=j+$<<1,W=(new V.Graphics).lineStyle($,G.strokeColor).beginFill(G.fillColor).drawCircle(j+$,j+$,j).endFill(),q=V.RenderTexture.create({scaleMode:V.SCALE_MODES.LINEAR,width:H,height:H});return B.render(W,{renderTexture:q}),U[F]=q,U}),{})}static getSocialStatusText(k){return this._localizer.getText(uc.SOCIAL_STATUS_RENDER_PARAMS[k].locKey)}}uc.SOCIAL_STATUS_ICON_RESOLUTION=2,uc.SOCIAL_STATUS_RENDER_PARAMS={[lc.a.available]:{fillColor:1429577,strokeColor:811284,locKey:"USER_SOCIAL_STATUS_AVAILABLE"},[lc.a.offline]:{fillColor:10461087,strokeColor:4934475,locKey:"USER_SOCIAL_STATUS_OFFLINE"},[lc.a.unavailable]:{fillColor:16762624,strokeColor:11962126,locKey:"USER_SOCIAL_STATUS_UNAVAILABLE"}},(0,G.Cg)([(0,Re.b)(j.$Bt.LocalizationService,!1),(0,G.Sn)("design:type",j.dTp)],uc,"_localizer",void 0);class fc extends Ka.W{constructor(k,B){super(k,B,14,fc.configModifiers,[q._.Ui_shared_json,q._.Ui_forest_progress_json,q._.Ui_shipwreck_progress_json,q._.Ui_shiverchill_progress_json]),this.friendCellList=[],this.friendsList=[],this.classList=[],this.friendRequestList=[],this._playerStatusMeta=[],k.broadcaster.addAppListener(oi.sd.RequestCancelled,this.onListUpdate.bind(this),this,"FriendsList"),k.broadcaster.addAppListener(oi.sd.FriendRemoved,this.onListUpdate.bind(this),this,"FriendsList"),k.broadcaster.addAppListener(oi.sd.RequestAccepted,this.onListUpdate.bind(this),this,"FriendsList"),k.broadcaster.addAppListener(oi.sd.RequestRejected,this.onListUpdate.bind(this),this,"FriendsList"),this.currentInterfaceName=ph.B.FriendsList,this._socialStatusIcons=uc.createSocialStatusIcons(9)}create(){this.fireInterfaceEvent({originType:bi.$N.ButtonClick,originID:jh.k.Friend}),super.create()}preprocess(){this.getLists(),this.queuePostCreateCallback(this.fillView.bind(this,this.friendsList),this.setButtons.bind(this))}update(){super.update(),this._socialStatusIcons&&this.refreshPlayerStatuses()}onListUpdate(){this.getLists(),this.setButtons(),this.fillView(this.friendsList,!1)}getLists(){K.q.instance.prodigy.friendsListNetworkHandler.getFriendRequestList(0,K.q.instance.prodigy.friendsListNetworkHandler.getFriendsCap()).then((()=>{this.updateFriendRequestList()})),K.q.instance.prodigy.friendsListNetworkHandler.getUserAppearance(K.q.instance.prodigy.friendsListNetworkHandler.classList,!0),this.friendsList=K.q.instance.prodigy.friendsListNetworkHandler.friendsList,this.classList=K.q.instance.prodigy.friendsListNetworkHandler.classList,this.updateFriendRequestList()}updateFriendRequestList(){this.friendRequestList=K.q.instance.prodigy.friendsListNetworkHandler.friendRequestList,this.requestsButton&&(this.requestsButton.visible=this.friendRequestList.length>0)}setButtons(){const k=this.titleBanner,B=k.text;k.setText(this._localizer.getText("FRIENDS_LIST_TITLE"));const U=B.width+70-k.width;U>0&&(k.width+=U,k.x=k.parent.width-k.width>>1,B.scale.x=1/k.scale.x,B.x=k.width-B.width/B.scale.x>>1,B.y=k.height-B.height>>1),this.friendText.setText(this._localizer.getText("FRIENDS_LIST_FRIENDS_BUTTON")),this.classmatesText.setText(this._localizer.getText("FRIENDS_LIST_CLASSMATES_BUTTON")),this.closeButton.onClickCallback=k=>{this.fireButtonEvent({buttonName:jh.k.X,destinationName:K.q.instance.prodigy.world.getCurrentZone()}),this.close(k)},this.friendButton.onUpCallback=this.fillView.bind(this,this.friendsList),this.classmatesButton.onUpCallback=this.fillView.bind(this,this.classList,!0),this.requestsButton.onUpCallback=K.q.instance.prodigy.open.friendRequests.bind(K.q.instance.prodigy.open,this.preprocess.bind(this)),this.updateFriendRequestList()}setupScrollBar(){this.friendScrollView.linkScrollBar(this.friendScrollBar),this.friendScrollView.setToScrollPercent(0)}fillView(k,B=!1){this.friendButton.setActive(B),this.classmatesButton.setActive(!B),this.clearScrollView(),$.remove(k,(k=>!j.Aq$.isDefined(k.appearance)||!j.Aq$.isDefined($.get(k,"data.level",null))));const U=$.sortBy($.map(k,(k=>{const B=new Oe.a(this.game);return B.init(k),{player:B,status:k.status}})),(k=>k.player.getNameWithoutNickname()));for(let F=0;F=3){const k=G[G.length-1];$="";for(let B=0;B{var k;K.q.instance.prodigy.open.card(K.q.instance.prodigy.friendsListNetworkHandler.getFriend(U[F].player.userID),!1,null===(k=this._playerStatusMeta.find((k=>k.userId===U[F].player.userID)))||void 0===k?void 0:k.status)},this.friendCellList.push(k)}this.friendContents.layoutElement.calculateChildren(),this.friendScrollView.setupVisibleIndices(),this.friendScrollView.calculateMaxScrollDist(),this.setupScrollBar(),U.length<=0&&(B?this.noFriendsText.setText(this._localizer.getText("UI_ZONE_NO_CLASSMATES")):this.noFriendsText.setText(this._localizer.getText("UI_ZONE_NO_FRIENDS"))),this.noFriendsElement.visible=U.length<=0,this.friendScrollBar.visible=U.length>2,this.fireTabEvent({tabName:k===this.classList?"classmatesButton":"friendButton"}),this._socialStatusIcons&&this.refreshPlayerStatuses(!0)}clearScrollView(){this.friendScrollView.clearScrollView(),this._playerStatusMeta=[],this.friendCellList=[],this.setupScrollBar()}refreshPlayerStatuses(k=!1){if(j.Aq$.isDefined(this._playerStatusRefreshPromise))return;if(!k&&Date.now()>this._lastPlayerStatusRefresh+1e3)return;const B=$.uniq([...this.friendsList.map((k=>`${k.userID}`)),...this.classList.map((k=>`${k.userID}`))]);0!==B.length&&(this._playerStatusRefreshPromise=this._synapse.getFriendsStatuses(B),this._playerStatusRefreshPromise.then((k=>{var B;for(const U of this._playerStatusMeta){const F=null!==(B=k[`${U.userId}`])&&void 0!==B?B:lc.a.offline;F!==U.status&&(U.sprite.texture=this._socialStatusIcons[F],U.text.text=uc.getSocialStatusText(F),U.text.position.set(-24-U.text.width,1),U.container.visible=!0,U.status=F)}})).finally((()=>{this._lastPlayerStatusRefresh=Date.now(),this._playerStatusRefreshPromise=null})))}close(k){this.game.broadcaster.removeAppListener(oi.sd.RequestCancelled,this,"FriendsList"),this.game.broadcaster.removeAppListener(oi.sd.FriendRemoved,this,"FriendsList"),this.game.broadcaster.removeAppListener(oi.sd.RequestAccepted,this,"FriendsList"),this.game.broadcaster.removeAppListener(oi.sd.RequestRejected,this,"FriendsList"),null==k||k(),this.fireInterfaceEvent({closeMethod:bi.Lv.X}),super.close()}}fc.FRIEND_PANEL_WIDTH=375,fc.FRIEND_PANEL_PADDING=7,fc.configModifiers={},(0,G.Cg)([(0,Re.b)("779-a746"),(0,G.Sn)("design:type",Ue.d)],fc.prototype,"_synapse",void 0),(0,G.Cg)([(0,Re.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],fc.prototype,"_localizer",void 0);var bc=U(44357),pc=U(4324);class vc extends Ka.W{constructor(k,B,U){super(k,B,42,{},[J.Q.Spine_academygh_addkeystone_json]),this.closeButton=null,this.keystonesContainer=null,this.allPlacedText=null,this.localizer=null,this.academyZone=null,this.localizer=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),this.setCloseCallback(U),this.academyZone=K.q.instance.prodigy.world.getZone(hn.A_.ACADEMY)}create(){super.create(),this.closeButton.onUpCallback=()=>{K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:ph.B.KeystonePopup,interfaceType:bi.Wm.Menu,closeMethod:bi.Lv.CloseButton}),this.close()};const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=Dn.N.getAllTowerData();for(let U=0;U0;if(j.Aq$.isDefined(W)&&W!==Dn.s.None){const k=wr.j.createRenderer(J.Q.Spine_academygh_addkeystone_json,{type:"spine"});k.playAnimation(`keystone-idle-${F.keystone.zone}`,!0),new yr._(this.game,$[G],[k],1,3),V.setText(this.localizer.getText("KEYSTONE_UNLOCKED"))}else this.allPlacedText.visible=!1,H.tint=5789784,H.inputEnabled=!0,q?($[G].highlight(!0,-60,-35),H.tint=15132390,V.setText(this.localizer.getText("KEYSTONE_READY")),H.events.onInputUp.add((()=>{this.placeOnPedestal(F.keystone,F.element).catch(j.RQr.createHandler(`Error placing ${F.element} keystone`))}))):(V.setText(""),H.events.onInputUp.add((()=>{this.popupMessage(this.localizer.getText("KEYSTONE_PEDESTAL_NOT_FOUND"))})))}K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:ph.B.KeystonePopup,interfaceType:bi.Wm.Menu})}placeOnPedestal(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this.academyZone.anyKeystonesPlaced()){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.set("keystones-first",Object.assign({element:B},k)),K.q.instance.prodigy.gameContainer.get("c47-20b6").academyTowers.sendFunnelEvent({funnelName:"academy_towers",funnelType:"story",step:Bn.D.FirstKeystonePlaced},B)}this.close(),K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:ph.B.KeystonePopup,interfaceType:bi.Wm.Menu,closeMethod:bi.Lv.KeystonePlaced});const U=K.q.instance.prodigy.world.getZone(hn.A_.ACADEMY).getMap("GH2");bc.QQ(this.game,!1),pc.k.setGuideHandActive(!1),yield pc.k.placeKeystone(this.game,U.screen,k,B),bc.QQ(this.game,!0)}))}popupMessage(k){const B=this.localizer.getText("BUTTON_OKAY_UPPERCASE");K.q.instance.prodigy.open.messageBoxOkay(k,B,null)}}class gc extends Ka.W{constructor(k,B,U,F=null,G){super(k,B,45,j.Aq$.isDefined(G)?G:{},[q._.Popup_ui_roulette_json]),this.skipButton=null,this.watchButton=null,this.openVideoCallback=null,this.onClose=F,this.openVideoCallback=U}create(){super.create(),this.skipButton.onUpCallback=()=>{this.close()},this.watchButton.onUpCallback=()=>{this.openVideo()}}openVideo(){j.Aq$.isDefined(this.openVideoCallback)&&(this.onClose=null,this.openVideoCallback()),this.close()}}var mc=U(25983);class yc extends Ka.W{constructor(k,B,U,F,G){super(k,B,200,void 0,[]),this.onPrefabLoaded=new j.HN0,this._confirmCallback=null,this._closeCallback=null,this._skipCloseCallback=!1,this._confirmCallback=F,this._closeCallback=G,this._zoneData=U}create(){super.create(),K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(Ei.l.MapLocationDialog).then((k=>{var B;this._ui=k,this._ui.onDestroy.add(this.destroy,this),null===(B=this._rearOverlay)||void 0===B||B.destroy(),this.configure(this._ui)}))}setSkipCallback(){this._skipCloseCallback=!0}close(){var k;this._skipCloseCallback||null===(k=this._closeCallback)||void 0===k||k.call(this),this._ui.destroy(),this.onPrefabLoaded.dispose(),this._skipCloseCallback=!1,super.close()}configure(k){var B;if(null===(B=this._zoneData)||void 0===B?void 0:B.useLocationDialogPrefab){const B=k.findComponent(mc.s),U=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),F=Ta.i.isZoneLocked(this._zoneData.zone);F?B.showOneButton(this._zoneData.splashImage,this._zoneData.getLockName(),this._zoneData.getLockMessage(),U.getText("BUTTON_OKAY_CAPITAL"),F):B.showTwoButton(this._zoneData.splashImage,this._zoneData.getName(),this._zoneData.getSummary(),U.getText("NOT_NOW"),this._zoneData.getGoButtonText(),F),B.onClose.addOnce((()=>{var k;null===(k=this._closeCallback)||void 0===k||k.call(this),this._ui.destroy(),this.destroy()})),B.onConfirm.addOnce((()=>{var k;null===(k=this._confirmCallback)||void 0===k||k.call(this)})),this.onPrefabLoaded.dispatch(this._ui)}}}var _c=U(11117);class Ec extends Ka.W{constructor(k,B,U){super(k,B,51,{},[q._.Popup_ui_roulette_json,q._.Npc_face_noot_json,q._.Popup_member_modular_json]),this.okayButton=null,this.setCloseCallback(U)}create(){super.create(),K.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelQuit("At-School-Dialog","At-School"),this.okayButton.onUpCallback=()=>{this.close()}}setUIConfig(k){}}var wc=U(31211),Tc=U(91315),Sc=U(53452);class Ac extends Ka.W{constructor(k,B,U){super(k,B,4,U),this.mailData=null,this.attachments=[],this.attachmentImageID=0,this.shouldRenderAttachments=!0,this._externalMethods=null,this.closeButton=null,this.titleText=null,this.bodyText=null,this.imageContainer=null,this.imageLoader=null,this.loadingSpinner=null,this.actionButtonText=null,this.actionButtonContainer=null,this.actionButton=null,this.attachmentContainer=null,this.content=null,this.woodBackground=null,this.deleteMailCallback=null,k.broadcaster.addAppListener(oi.zr.MarkAsRead,this.markAsReadFailed,this,oi.HG.Mailer),this._externalMethods=K.q.instance.prodigy.gameContainer.get("eb9-3fdf")}preprocess(k){this.mailData=k,"noImage"!==k.image&&(Tn.J.isGuid(k.image)?this.preloadLocalMailImage(k.image):this.addImageToAssets(k.image,k.vImage)),this.queuePostCreateCallback((()=>{this.tweenLoader(),this.renderMenu(),this.closeButton.onClickCallback=this.close.bind(this)})),k.isOpened||this.isSingleUse()||this.queuePostCreateCallback((()=>{this.game.broadcaster.broadcast(oi.zr.MarkAsRead,oi.HG.MailView,[()=>{this.markReadSuccess()},this.mailData])}))}close(){this.game.broadcaster.removeAppListener(oi.zr.MarkAsReadFailure,this,oi.HG.Mailer),this.game.broadcaster.removeAppListener(oi.zr.MarkAsRead,this,oi.HG.Mailer),super.close(),this.destroy()}setDeleteMailCallback(k){this.deleteMailCallback=k}markReadSuccess(){if(!this.matchGameMethod(this._externalMethods.openGiftBox.functionName))if(Sc.b.isDebugMailData(this.mailData)){const k=this.mailData.attachments;j.Aq$.isDefined(k)&&k.length>0&&K.q.instance.prodigy.open.gotItem(k,null,null,"mail-open",null,null,{source_type:gn.C.Container})}else{K.q.instance.prodigy.gameContainer.get("535-27b9").collectMailRewards(this.mailData).then((k=>{const B=Sc.b.mergeSecureUnsecure(k.rewards,k.unsecuredRewards);j.Aq$.isDefined(B)&&B.length>0&&K.q.instance.prodigy.open.gotItem(B,null,null,"mail-open",null,null,{source_type:gn.C.Container})})).catch((k=>{const B=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);K.q.instance.prodigy.open.message(B.getText("ERROR_DIALOG_BODY"))}))}}markAsReadFailed(){if(j.Aq$.isDefined(this.game)){const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);K.q.instance.prodigy.open.message(k.getText("MAIL_UNAVAILABLE"),this.closeOnFailed.bind(this),null,k.getText("MESSAGE_TITLE_OOPS"))}}renderMenu(){this.titleText.setText(this.mailData.subject.toUpperCase()),this.bodyText.setText(this.mailData.message),this.renderImages(),this.renderCheckItOutButton(),this.renderAttachments(),this.resize()}renderImages(){if("noImage"===this.mailData.image)return;const k=this.mailData.image.length>0?this.mailData.image:nr.q.Letter_mail_open_image;K.q.instance.prodigy.create.sprite(Math.floor(this.imageContainer.width/2),Math.floor(this.imageContainer.height/2),k,null,{x:.5,y:.5},this.fixImage.bind(this),null,null)}tweenLoader(){if("noImage"===this.mailData.image)return this.imageContainer.destroy(),void this.resize();this.imageLoader.image.pivot.x=.5,this.imageLoader.image.pivot.y=.5,this.imageLoader.image.anchor.x=.5,this.imageLoader.image.anchor.y=.5,this.imageLoader.image.x+=.5*this.imageLoader.width,this.imageLoader.image.y+=.5*this.imageLoader.height,this.loadingSpinner=this.game.add.tween(this.imageLoader.image,this).to({angle:360},2e3,j.GS3.Linear.None,!0,0,Vt.s.MAX_SAFE_INTEGER,!1)}fixImage(k){j.Aq$.isDefined(this.loadingSpinner)&&(K.q.instance.game.tweens.remove(this.loadingSpinner),this.loadingSpinner=null),this.imageLoader.visible=!1;const B=this.imageContainer.width-40;if(this.imageContainer.add(k),k.smoothed=!0,k.y=.5*this.imageContainer.height,k.width>B){const U=1-(k.width-B)/B;k.scale.x=U,k.scale.y=U}this.resize()}renderCheckItOutButton(){var k;if(j.Aq$.isDefined(this.mailData.gameMethod)&&this._externalMethods.doesFunctionExist(this.mailData.gameMethod.name)){const B=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this.matchGameMethod(this._externalMethods.openGiftBox.functionName)?j.Aq$.isDefined(this.actionButtonText)&&(this.actionButtonText.setText(B.getText("MAIL_CLICK_TO_OPEN")),(null===(k=this.mailData.attachments)||void 0===k?void 0:k.length)>0&&this.actionButtonText.setText(B.getText("MAIL_OPEN_MY_BOX"))):this.matchGameMethod(this._externalMethods.openMembershipSignUp.functionName)&&this.actionButtonText.setText(B.getText("MAIL_BECOME_A_MEMBER")),j.Aq$.isDefined(this.mailData.gameMethod.buttonText)&&""!==this.mailData.gameMethod.buttonText&&this.actionButtonText.setText(this.mailData.gameMethod.buttonText.toUpperCase()),this.isSingleUse()&&(this.shouldRenderAttachments=!1),this.actionButtonContainer.visible=this.shouldShowActionButtonContainer(),this.actionButton.onClickCallback=this.runMailAction.bind(this,this.mailData.gameMethod)}else this.actionButtonContainer.visible=!1}isSingleUse(){return Sc.b.isSingleUse(this.mailData)}shouldShowActionButtonContainer(){return!(this.mailData.isOpened&&this.isSingleUse()||this.mailData.isCollected)}matchGameMethod(k){return Sc.b.mailHasGameMethod(this.mailData,k)}renderAttachments(){var k;if(!this.shouldRenderAttachments)return void this.attachmentContainer.destroy();this.attachmentImageID=0;const B=this.attachmentContainer;for(let U=0;U<(null===(k=this.mailData.attachments)||void 0===k?void 0:k.length);U++){const k=this.instantiateTemplate("attachmentItem",B);this.attachments.push(k);const F=this.mailData.attachments[U],G=K.q.instance.prodigy.icon.iconKey(F);K.q.instance.prodigy.icon.createIcon(Math.floor(.5*k.attachmentItem.width),Math.floor(.5*k.attachmentItem.height)-3,G,{x:.5,y:.5},(k=>{this.attachments[this.attachmentImageID++].attachmentImage.add(k)})),j.Aq$.isDefined(F.N)&&F.N>1&&(k.amount.visible=!0,k.amount.setText(F.N.toString()))}this.attachments.length<=0&&this.attachmentContainer.destroy()}runMailAction(k){this.matchGameMethod(this._externalMethods.openGiftBox.functionName)?this.mailData.isOpened||(this.actionButtonContainer.visible=!1,K.q.instance.prodigy.gameContainer.get("c47-20b6").container.sendContainerOpenedEvent(bi.ZF.MonthlyMemberBox,null,Ai.N.OpenWorld)):this.actionButtonContainer.visible=this.shouldShowActionButtonContainer(),this._externalMethods.runFunction(k.name,k.params,this.mailData.attachments,this.mailData,[()=>{this.close()},this.deleteMailCallback])}resize(){this.content.layoutElement.calculateChildren();const k=this.content.layoutElement.getContentHeight()+30;this.woodBackground.resize(this.woodBackground.width-20,k),this.woodBackground.y=Math.floor((this.game.height-k)/2)}closeOnFailed(){this.game.broadcaster.broadcast(oi.zr.CloseList,oi.HG.Mailer),this.close()}preloadLocalMailImage(k){Object.values(nr.q).includes(k)?K.q.instance.prodigy.load.assets(k):j.VyI.log(`Could not find local image with GUID: ${k} in ESingleImageGameAssets.`,j.$bb.Error)}addImageToAssets(k,B=1){const U={};U[k]={type:"singleImage",v:j.Aq$.isDefined(B)&&B>0?B:1},K.q.instance.prodigy.assets.assignAssets(U)}}const Cc={XP_BONUS:{frameName:"small-star-boost",trackingEvent:"XPBonus-Icon-Click"},BUDDY_FOX:{frameName:"get-fox-buddy",trackingEvent:"Buddy-Icon-Click"},BUDDY_SPARKLE_PUP:{frameName:"get-sparkle-pup-buddy",trackingEvent:"Buddy-Icon-Click"},FIREWORKS:{frameName:"get-free-fireworks",trackingEvent:"Fireworks-Icon-Click"},TRACKING_EVENT_MOBILE:"Mobile-Message-Displayed",TRACKING_EVENT_SIGN_UP:"Signup-Button-Click",TRACKING_EVENT_PLAY_ONLY:"Signup-Button-Play",TRACKING_EVENT_LINK_PARENT:"Signup-Button-LinkParent",TRACKING_EVENT_POPUP_SHOWN:"Popup-Shown",TRACKING_EVENT_SCHOOL_HOURS:"School-Hours-Message-Displayed",TRACKING_EVENT_RECEIVED_REWARDS:"Parent-Benefits-Rewards-Received",MESSAGE_MOBILE:"PARENT_LINK_MOBILE_MESSAGE",MESSAGE_POST_CLICK:"PARENT_LINK_POST_CLICK",MESSAGE_SCHOOL_HOURS:"PARENT_LINK_SCHOOL_HOURS",ATLAS:q._.Popup_parent_link_json,DESCRIPTION_TEXT_BG_HEIGHT_PERCENT:.25,REWARD_ICONS_BG_HEIGHT_PERCENT:.5,LINK_ACCOUNT_BG_HEIGHT_PERCENT:.88,CLOSE_BTN_OFFSET:{x:-10,y:10},BODY_TEXT_OFFSET:{x:40,y:0},ICON_TWEEN_TIME_MS:125,ICON_TWEEN_DELAY_MS:125,ICON_TWEEN_AMOUNT_Y:20,SUCCESS_POPUP_CONFIG:{headerText:"PARENTAL_LINK_TITLE_SUCCESS",bodyText:"PARENT_LINK_SUCCESS_BODY",showCloseButton:!1},AT_SCHOOL_POPUP_CONFIG:{headerText:"PARENTAL_LINK_TITLE",bodyText:"PARENTAL_LINK_CONTENT_SCHOOL",showCloseButton:!0}};var Oc=U(71586);class Ic extends Ka.W{constructor(k,B,U,F,G){super(k,B,26,void 0,[q._.Ui_common_neutral_json,q._.Popup_ui_roulette_json,q._.Ui_store_json]),this.popupConfig=null,this.onRewardIconClickCallback=null,this.onContinueCallback=null,this.onCloseCallback=null;K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.parentalLink=!0,this.onContinueCallback=G,this.onCloseCallback=F,this.popupConfig=U,this.onRewardIconClickCallback=null,super.queuePostCreateCallback((()=>{this.setupMenu()}))}setupMenu(){const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);switch(this.popupConfig){case Cc.AT_SCHOOL_POPUP_CONFIG:this.instantiateTemplate("atSchoolContainer",this.findUIElement("buttonTemplateContainer")).playAtSchoolButton.onClickCallback=()=>{this.onContinueClick()};break;case Cc.SUCCESS_POPUP_CONFIG:this.instantiateTemplate("successContainer",this.findUIElement("buttonTemplateContainer")).okayButton.onClickCallback=()=>{this.onOkayClick()}}this.popupConfig.showCloseButton&&(this.findUIElement("closeButton").visible=!0,this.findUIElement("closeButton").onClickCallback=()=>{j.Aq$.isDefined(this.onCloseCallback)&&this.onCloseCallback(),this.close()}),this.findUIElement("bannerText").setText(k.getText(this.popupConfig.headerText)),this.findUIElement("contentText").setText(k.getText(this.popupConfig.bodyText)),this.renderFeatureIcons(0,this.findUIElement("woodBackground"))}renderFeatureIcons(k,B,U=3,F=40,G=80){const $=[Cc.XP_BONUS,Cc.BUDDY_SPARKLE_PUP,Cc.FIREWORKS];for(let H=k;H{this.onRewardIconClickCallback(U.trackingEvent)}:null,W=K.q.instance.prodigy.create.button(B,(F+170)*(H-k)+G,205,Cc.ATLAS,U.frameName,V);this.popupConfig===Cc.AT_SCHOOL_POPUP_CONFIG&&W.setInactive(16777215)}}onOkayClick(){const k=()=>{j.Aq$.isDefined(this.onCloseCallback)&&this.onCloseCallback(),this.close(),uh.A.displayToolTipAuto(null,null,{bodyText:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("PARENTAL_LINK_TITLE_SUCCESS"),xPosition:635,yPosition:100})};0===K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("follow",34)?K.q.instance.prodigy.open.gotItem([{type:"follow",ID:34,N:1},{type:"item",ID:76,N:10}],k,null,"parental-link"):k()}onContinueClick(k=null){j.Aq$.isDefined(this.onContinueCallback)&&this.onContinueCallback();const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.popupConfig===Cc.AT_SCHOOL_POPUP_CONFIG?B.data.atSchoolTimestamp=Oc.R.getDateTime():B.data.atHomeTimestamp=Oc.R.getDateTime(),this.close()}static isInfoRequired(k){return!k.parentalLink&&!Tn.J.isSchoolHours()&&!k.hasValidatedParentEmail()&&k.hasCompletedTutorial()}static isSuccessRequired(k){return k.hasValidatedParentEmail()&&k.hasCompletedTutorial()&&k.backpack.hasItem("follow",34)<=0}}class Dc extends Ka.W{constructor(k,B){super(k,B,40,{},[q._.Popup_ui_roulette_json,q._.Ui_shared_json])}create(){super.create();const k=K.q.instance.prodigy.gameContainer.get("c97-bd0d");this.findUIElement("backButton").onUpCallback=()=>{this.close()},this.findUIElement("loginButton").onUpCallback=()=>{k.logout()}}}var Rc=U(39984),Pc=U(99183);class Mc extends Pc.k{constructor(k,B,U,F,G,$,H,V,W=!0){super(k,B,U,F,G,$,H,103,[q._.Ui_raster_icons_json,q._.Ui_raster_icons_json,nr.q.Ui_pet_xp_sunburst_white],V,W),this._eligibleCreaturesForBoost=[],this._nonEligibleCreatures=[],this._onElementsInstantiated=new j.HN0,this._multiplier=Si.c.instance.getBoostMultiplier(),this.currentCreatures&&(this._eligibleCreaturesForBoost=this.currentCreatures.filter((k=>k instanceof fa.R&&Si.c.instance.getEligiblePetIDs().includes(k.data.ID))),this._nonEligibleCreatures=this.currentCreatures.filter((k=>!this._eligibleCreaturesForBoost.includes(k))),this.queuePostCreateCallback(this.instantiateElements.bind(this)),this._onElementsInstantiated.addOnce((()=>{this._onElementsInstantiated.dispose(),this.changeSunburstBackgroundTint(16772830,16706454),this.createCreatureDisplays(),this.addXPBarMultiplierPill(),this.setStarsEarnedMessage(this._nonEligibleCreatures,this.xpGained.totalNonMemberXp),this.loadBottomDisplayCreatureIcons(this._nonEligibleCreatures,this._nonEligibleCreaturesAvatars),this.loadBottomDisplayCreatureIcons(this._eligibleCreaturesForBoost,this._eligibleCreaturesAvatars,!0),this.setupUIElements(),this.buildEventsQueue(),this.buildCommonEventsQueue(),this.animateDropIn()})))}addXPBarMultiplierPill(){this._eligibleCreaturesForBoost.forEach((k=>{const B=this.currentCreatures.indexOf(k),U=this.creatureDisplays[B],F=this.instantiateTemplate(Mc.XP_BAR_MULTIPLIER_PILL,U.xpBar),G=`${this._multiplier}x`;F[Mc.BOOST_MULTIPLIER_TEXT].setText(G)}))}setStarsEarnedMessage(k,B){this._battleStarsEarned.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(Mc.MAX_STARS_EARNED));let U=!1;k.forEach((k=>{const F=hi.s.activePlayerLevelCap;if(!U&&Rc.e.levelFromStars(k.getStars()+B,k.creatureType,F){F.standStill()}))}}else if(j instanceof pa.s){const k=K.q.instance.prodigy.create.character(B,j,Mc.SCALE_VALUE,U,0,!1,{isPreview:!0,hideMount:!0});k.y=k.height,k.reload((()=>{k.standStill()}))}else{const k=K.q.instance.prodigy.create.sprite(0,0,Ut.E.getIconForType("pet",j.data.ID),null,{x:.5,y:.5}),F=K.q.instance.prodigy.create.element(B,U,0);F.scale=new V.Point(Mc.SCALE_VALUE,Mc.SCALE_VALUE),F.height=k.height,F.add(k)}}U&&B.children.forEach((k=>{const B=this.instantiateTemplate("bottomDisplayMultiplierPill",k),U=`${this._multiplier}x`;B[Mc.BOOST_MULTIPLIER_TEXT].setText(U)}))}changeSunburstBackgroundTint(k,B){this._sunBurstRect.tint=j.yQ0.WHITE,this._bottomDisplaySunBurst.image.tint=j.yQ0.WHITE,this._sunBurstRect.tint=k,this._bottomDisplaySunBurst.image.tint=B}instantiateElements(){this._battleStarsEarned=this.findUIElement("battleStarsEarned"),this._nonEligibleCreaturesAvatars=this.findUIElement("nonEligibleCreaturesAvatars"),this._eligibleCreaturesAvatars=this.findUIElement("eligibleCreaturesAvatars"),this._bottomDisplaySunBurstBg=this.findUIElement("bottomDisplaySunBurstBg"),this._sunBurstRect=new V.Graphics,this._sunBurstRect.beginFill(16777215),this._sunBurstRect.drawRoundedRect(0,0,this._bottomDisplaySunBurstBg.width,this._bottomDisplaySunBurstBg.height,Mc.ROUND_RECT_RADIUS),this._sunBurstRect.endFill(),this._bottomDisplaySunBurstBg.add(this._sunBurstRect),this._bottomDisplaySunBurst=this.findUIElement("bottomDisplaySunBurst"),this._onElementsInstantiated.dispatch()}showBottomDisplayCreatureIconsAndText(k){k.visible=!0,this._battleStarsEarned.visible=!0,this._battleStarsEarned.alpha=1,this.game.add.tween(this._battleStarsEarned.scale,this).from({x:0,y:0},1e3,j.GS3.Back.Out,!0).onTweenComplete.add(this.runNextEvent.bind(this))}buildEventsQueue(){this.eventQueue.push(this.runNextEvent.bind(this,300),this.showBottomDisplayCreatureIconsAndText.bind(this,this._nonEligibleCreaturesAvatars),this.applyXPGainToTeam.bind(this,this._nonEligibleCreatures,this.xpGained.totalNonMemberXp),this.runNextEvent.bind(this,1e3),(()=>{this.game.add.tween(this._battleStarsEarned,this).to({alpha:0},1e3,j.GS3.Back.Out,!0).onTweenComplete.add((()=>{this._nonEligibleCreaturesAvatars.visible=!1,this._battleStarsEarned.visible=!1,this.runNextEvent()}))}),this.setBottomDisplayForEligibleCreatures.bind(this),this.showBottomDisplayCreatureIconsAndText.bind(this,this._eligibleCreaturesAvatars),this.applyXPGainToTeam.bind(this,this._eligibleCreaturesForBoost,this.xpGained.totalNonMemberXp*this._multiplier),this.unlockAcademyDialogue.bind(this),this.unlockNootTowerDialogue.bind(this),...this.buildPopupEvents(),this.runNextEvent.bind(this,1500),this.bottomSectionFadeOutAnimation.bind(this,this.bottomDisplayContainer,this.runNextEvent.bind(this)),(()=>{this.changeSunburstBackgroundTint(16772830,16706454),this.runNextEvent()}))}setBottomDisplayForEligibleCreatures(){this.changeSunburstBackgroundTint(15924460,13236420),this._battleStarsEarned.textObject.style.fill=4027215,this._battleStarsEarned.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(Mc.MAX_STARS_EARNED));let k=!1;const B=this.xpGained.totalNonMemberXp*this._multiplier;this._eligibleCreaturesForBoost.forEach((U=>{const F=hi.s.activePlayerLevelCap;if(!k&&Rc.e.levelFromStars(U.getStars()+B,U.creatureType,F)0}getBannerLocKey(){return"SUMMARY_POPUP_NEW_HEARTS"}setup(){K.q.instance.prodigy.audio.playSFX(32,"popUpDisplay"),K.q.instance.prodigy.create.sprite(0,0,q._.General_battle_json,"icon-heart",new j.I9Y(.5,.5),(k=>{j.Aq$.isDefined(this.spriteHolder)&&(this.spriteHolder.add(k),this.game.add.tween(k.scale,this).from({x:0,y:0},1e3,j.GS3.Elastic.Out,!0))})),this.setActionText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SUMMARY_POPUP_HEARTS_EARNED",this.currentCreature.getFirstName(),this.numHeartsGained))}}var Fc=U(87239);class Gc extends Bc.l{constructor(k,B,U,F){super(k,B,U,F,21),this.newAttackList=[],this.newAttackList=F.diffAvailableSpellsV2(U.getLevel()),this.queuePostCreateCallback(this.showNextSpell.bind(this),this.setupButton.bind(this))}showNextSpell(){this.newAttackList.length<=0?this.close():(K.q.instance.prodigy.audio.playSFX(32,"popUpDisplay"),this.loadSpell(this.newAttackList.shift()))}loadSpell(k){var B;const U=Fc.x.getUnlockedSpellDisplayInformation(k);k.newlyUnlocked?this.setActionText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SUMMARY_POPUP_SPELL_UNLOCKED",this.currentCreature.getFirstName(),U.newSpellName)):this.setActionText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SUMMARY_POPUP_SPELL_EVOLVED",U.oldSpellName,U.newSpellName));const F=Tn.J.convertLegacyElements(U.elementType);this.ballDisplay.image.loadTexture(q._.Ui_battle_revamp_legacy_json,`pet-icon-backers-${F}`),this.okayButton.visible=!1,null===(B=this.spellIcon)||void 0===B||B.destroy(),this.spellIcon=K.q.instance.prodigy.create.sprite(0,0,U.spellIcon[0],U.spellIcon[1],new j.I9Y(.5,.5),(k=>{if(j.Aq$.isDefined(this.spriteHolder)){this.spriteHolder.add(k);this.game.add.tween(k.scale,this).from({x:0,y:0},1e3,j.GS3.Elastic.Out,!0),K.q.instance.prodigy.audio.playSFX(32,"popUpDisplay"),this.okayButton.visible=!0}}))}setupButton(){this.okayButton.onUpCallback=()=>{this.fireButtonEvent({buttonName:jh.k.Okay}),this.showNextSpell()}}isRequired(){return this.newAttackList.length>0}getBannerLocKey(){return"SUMMARY_POPUP_NEW_SPELL"}}var jc=U(47717);class $c extends Ka.W{constructor(k,B,U,F){super(k,B,9,{modifyProperty:[{element:"rewardsContainer",property:"visible",value:!U},{element:"infoContainer",property:"visible",value:U},{element:"shardsInfoText",property:"textKey",value:F}],addChildren:[],modifyTemplateProperty:[]}),this.infoToggle=!1,this.closeButton=null,this.playerProgress=0,this.percentageComplete=0,this.progressSlider=null,this.timer=null,this.infoToggle=U}preprocess(){this.queuePostCreateCallback((()=>{this.openTween(),this.game.broadcaster.addAppListener(oi.RZ.GotTitan,(()=>{this.renderBar()}),this,"TitanProgress",!1),this.closeButton.onClickCallback=this.close.bind(this),this.callTitanHits()}))}close(k){j.Aq$.isDefined(this.timer)&&window.clearInterval(this.timer),j.Aq$.isDefined(k)&&k(),this.game.broadcaster.removeAppListener(oi.RZ.GotTitan,this,"TitanProgress"),super.close()}callTitanHits(){this.infoToggle||K.q.instance.prodigy.titansNetworkHandler.getTitan(K.q.instance.prodigy.titansNetworkHandler.titan.id,"TitanProgress")}renderBar(){K.q.instance.prodigy.titansNetworkHandler.isTitanAlive()?(this.playerProgress=$.get(K.q.instance.prodigy.titansNetworkHandler,"titan.hits",0),this.percentageComplete=this.playerProgress/70,this.setProgress(),this.makeNotches()):this.titanDeadKick()}setProgress(){this.progressSlider.setPercentComplete(this.percentageComplete,!0)}makeNotches(){const k=K.q.instance.prodigy.titansNetworkHandler.titan.increments,B=K.q.instance.prodigy.titansNetworkHandler.titan.rewards;for(let U=0;Uk[U]&&Uk[U]&&U===k.length-1?this.instantiateTemplate("notch",this.progressSlider).notch:this.instantiateTemplate("notchFade",this.progressSlider).notchFade,F.x=this.progressSlider.getPositionAtPercent(Math.min(k[U]/70,.95))+F.width,F.y=F.defaultY=75,F.children[2].setText(B[U].toString())}}titanDeadKick(){const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),B=K.q.instance.prodigy.open.message(k.getText("TITAN_DEFEATED_MESSAGE"),(()=>{this.close((()=>{K.q.instance.prodigy.world.goToZoneHub(K.q.instance.prodigy.world.getCurrentZone())}))}),null,k.getText("TITAN_DEFEATED_TITLE"),null,{isModal:!1});B.queuePostCreateCallback((()=>{B.okayButton.setInputBlockPriority(Ia.z.SYSTEM_INFO)}))}}class Hc extends Ka.W{get ui(){return this._ui}constructor(k,B,U,F,G=!1){super(k,B,200,{},[q._.Ui_buttons_json,q._.Ui_dialogues_json,q._.Ui_store_json,q._.Ui_shared_json,q._.Ui_icons_json,Z.c.Sfx_store_equip,Z.c.Sfx_store_purchase,Z.c.Sfx_ui]),this.prefabRoot=null,this._ui=null,this._dismissalButton=null,this.onDismissalClick=new j.HN0,this._xPosition=0,this._yPosition=0,this._arrowXRelPos=.5,this._arrowYRelPos=.5,this._arrowDirection=Br.i.DOWN,this._tooltipSchema={bodyText:""},this.background.visible=!1,this.isModal=G,this._tooltipPrefabID=U,this._tooltipSchema=F,j.Aq$.isDefined(this._tooltipSchema.xPosition)||(this._tooltipSchema.xPosition=this._xPosition),j.Aq$.isDefined(this._tooltipSchema.yPosition)||(this._tooltipSchema.yPosition=this._yPosition),j.Aq$.isDefined(this._tooltipSchema.arrowXRelPos)||(this._tooltipSchema.arrowXRelPos=this._arrowXRelPos),j.Aq$.isDefined(this._tooltipSchema.arrowYRelPos)||(this._tooltipSchema.arrowYRelPos=this._arrowYRelPos),j.Aq$.isDefined(this._tooltipSchema.arrowDirection)||(this._tooltipSchema.arrowDirection=this._arrowDirection)}create(){super.create(),this.background.visible=!1;const k=K.q.instance.prodigy.gameContainer.get("d0e-64fd");if(this._ui=k.load(Hc.PREFAB_ID),this.prefabRoot.addChild(this._ui.legacyTransform.group),this._dismissalButton=this._ui.findComponentInChildren(ic.$),this._dismissalButton.onClick.add((()=>{this.dismissalClicked()})),this._tooltipPrefabID===uh.A.TOOLTIP_SPEECH)uh.A.displayToolTipSpeech(null,this._ui,this._tooltipSchema);else{let k=null;k=uh.A.displayToolTipCustomManual(k,this._ui,this._tooltipPrefabID,this._tooltipSchema),k.GameObject.findComponentsInChildren(ic.$)[0].onClick.add((()=>{this.dismissalClicked()}))}this.game.broadcaster.addAppListener(oi.Bk.OnMouseWheel,(()=>{this.dismissalClicked()}),this,"Input",!1)}dismissalClicked(){j.Aq$.isDefined(this.game)&&this.game.broadcaster.removeAppListener(oi.Bk.OnMouseWheel,this,"Input"),this.onDismissalClick.dispatch(),this.close()}destroy(k){this.onDismissalClick.dispose(),this._ui&&(this._ui.destroy(),this._ui=null),super.destroy(k)}}Hc.PREFAB_ID=123;class Vc extends Vh{constructor(k,B,U,F,G){const j=Si.c.instance.isPlayerQualified(),$=[Z.c.Sfx_results_screen,q._.Popup_ui_roulette_json,q._.Npc_face_gale_json];j&&$.push(nr.q.Ui_pet_xp_boost_graphic),super(k,B,U,0,0,j?102:61,$,G),this._itemTableID=F}setEntranceTemplate(k,B){if(Si.c.instance.isPlayerQualified())this.setExperimentEntranceMenu();else{const k=this.instantiateTemplate("unusedAttemptsTemplate",this.mainPanelButtons);k.enterButton.onUpCallback=()=>{this.onEnterButtonClick()},k.catalogButton.onUpCallback=()=>{this.onCatalogButtonClick(this._itemTableID)};this.instantiateTemplate("unusedAttemptsContent",this.actionContainer)["unused-titleText1"].setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TOWER_ENTRANCE_WELCOME",this.dungeon.name))}const U=this.dungeon.name.charAt(0).toUpperCase()+this.dungeon.name.slice(1);this.MenuTitle.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TOWER_ENTRANCE_LOCKOUT_TITLE",U))}setExperimentEntranceMenu(){const k=Si.c.instance.getSecondPlusScreenData(),B=this.findUIElement("petXPBoostInfoContainer");B.getChildByName("pet-xp-boost-multiplier").setText(`${Si.c.instance.getBoostMultiplier()}${Vc.BOOST_MULTIPLIER_SUFFIX}`);B.getChildByName("pet-xp-boost-description").setText(k.petXpBoostDescription);this.findUIElement("actionContainer").getChildByName("tower-action-description").setText(k.towerActionDescription);const U=this.findUIElement("CatalogButtonContainer").getChildByName("catalogButton"),F=U.getChildByName("catalogButtonText");U.onUpCallback=()=>{this.onCatalogButtonClick(this._itemTableID)},F.setText(k.leftButtonText);const G=this.findUIElement("EnterButtonContainer").getChildByName("enterButton"),j=G.getChildByName("enterButtonText");G.onUpCallback=()=>{this.onEnterButtonClick()},j.setText(k.rightButtonText)}onEnterButtonClick(){this.dungeon.dungeonNameEvent||K.q.instance.prodigy.gameContainer.get("c47-20b6").playerMovementAndDiscovery.sendTowerRunStartedEvent(this.dungeon.name,!0),super.onEnterButtonClick()}}Vc.BOOST_MULTIPLIER_SUFFIX="x";class Wc extends Ka.W{constructor(k,B,U,F,G,j){super(k,B,59,{},[Z.c.Sfx_results_screen,q._.Ui_shared_json]),this.closeButton=null,this.centerCRButton=null,this.commonRoomButton=null,this.floorButton=null,this.zone=U,this.leaveCallback=G,this.nextfloorCallback=F,this.setCloseCallback(j)}create(){super.create(),this.closeButton.onUpCallback=()=>{this.close()},this.menuTitle.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TOWER_EXIT_TITLE",this.zone.CurrentFloor));const k=this.zone;if(k.CurrentFloor===k.TotalFloors)this.titleText.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(`TOWER_EXIT_${k.Warden.name.toUpperCase}`)),this.centerCRButton.onUpCallback=()=>{this.leaveCallback(),this.close()},this.floorButton.visible=!1,this.commonRoomButton.visible=!1;else{this.centerCRButton.visible=!1,this.commonRoomButton.onUpCallback=()=>{this.leaveCallback(),this.close()},this.floorButtonText.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TOWER_EXIT_TO_FLOOR",this.zone.CurrentFloor+1));this.zone.monstersDefeated===this.zone.goalTotal?this.floorButton.onUpCallback=()=>{this.nextfloorCallback(),this.close()}:this.floorButton.setActive(!1,5789784)}}}class qc extends Ka.W{constructor(k,B,U){super(k,B,65,null,[q._.Popup_member_modular_json,q._.Popup_gohome_json,q._.Ui_social_feed_json]),this.okayButton=null,this.graphicContainer=null,this.setCloseCallback(U)}create(){super.create(),this.okayButton.onUpCallback=()=>{this.close()};const k=this.add(K.q.instance.prodigy.create.sprite(0,0,nr.q.Wheel_twilight_large));k.anchor.set(.5,.5),this.graphicContainer.addChild(k)}}var Kc=U(54422);let zc=class extends j.uAl{constructor(){super(...arguments),this._nameText=null}set text(k){this._nameText.text=k}set align(k){this._nameText.boundsAlignH=k,this._nameText.update()}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,j.Lr6)(0),(0,j.nKb)("nameText"),(0,G.Sn)("design:type",j.EYj)],zc.prototype,"_nameText",void 0),zc=(0,G.Cg)([(0,j.EVk)("WizardNameDisplayPrefab")],zc);var Yc=U(47287);let Qc=class extends j.uAl{constructor(){super(...arguments),this._enableButtonHolding=!0,this._holdScrollIntervalDelay=200,this._lastClickTime=0}set enableButtonHolding(k){this._enableButtonHolding=k}set holdScrollIntervalDelay(k){this._holdScrollIntervalDelay=k}get holdScrollIntervalDelay(){return this._holdScrollIntervalDelay}get positiveButton(){return this._positiveButton}get negativeButton(){return this._negativeButton}get canScrollPositive(){return this._carousel.canScrollPositive}get canScrollNegative(){return this._carousel.canScrollNegative}create(){super.create(),this.setUpButtons(),K.q.instance.prodigy.load.assets([Z.c.Sfx_button_disabled_state,Z.c.Sfx_ui]),this._carousel.allowMouseInput&&(this._carousel.onStartedScrolling.add(this.updateButtonStates,this),this._carousel.onFinishedScrolling.add(this.updateButtonStates,this)),this._heldTimer=K.q.instance.game.time.create(!1),this._heldTimer.loop(this._holdScrollIntervalDelay,(()=>{this.scrollCarousel(this._lastDirection)}),this)}destroy(){var k,B;K.q.instance.game.time.destroy(this._heldTimer),this._heldTimer=null,this._carousel&&(null===(k=this._carousel.onStartedScrolling)||void 0===k||k.removeAll(this),null===(B=this._carousel.onFinishedScrolling)||void 0===B||B.removeAll(this)),super.destroy()}setUpButtons(){this.negativeButton.onInputDown.add((()=>{this.scrollCarousel(-1),this.startHeldTimer()})),this.negativeButton.onInputUp.add((()=>{this.endHeldTimer()})),this.positiveButton.onInputDown.add((()=>{this.scrollCarousel(1),this.startHeldTimer()})),this.positiveButton.onInputUp.add((()=>{this.endHeldTimer()}))}updateButtonStates(){this.canScrollNegative?this.negativeButton.unlockState():this.negativeButton.lockState(Zh.K.Disabled),this.canScrollPositive?this.positiveButton.unlockState():this.positiveButton.lockState(Zh.K.Disabled)}scrollCarousel(k){const B=Date.now();this.debounceTimeMs>0&&B-this._lastClickTime{this.getRandomName()})),this._menuPrefab.GameObject.addComponent(Kc.E).initialize(Mo.D.ENTER,(()=>{this.done()})),this._menuPrefab.GameObject.addComponent(Kc.E).initialize(Mo.D.SPACEBAR,(()=>{this.done()})),this._menuPrefab.GameObject.addComponent(Kc.E).initialize(Mo.D.UP,(()=>{this.enableCarouselHighlighters(),this._activeCarouselInput.scrollCarousel(-1),this._activeCarouselInput.startHeldTimer()})),this._menuPrefab.GameObject.addComponent(Kc.E).initialize(Mo.D.DOWN,(()=>{this.enableCarouselHighlighters(),this._activeCarouselInput.scrollCarousel(1),this._activeCarouselInput.startHeldTimer()})),K.q.instance.game.input.keyboard.addKey(Mo.D.UP).onUp.add(this.endTimerHandler,this),K.q.instance.game.input.keyboard.addKey(Mo.D.DOWN).onUp.add(this.endTimerHandler,this),this._menuPrefab.GameObject.addComponent(Kc.E).initialize(Mo.D.RIGHT,(()=>{this.switchCarousels(1)})),this._menuPrefab.GameObject.addComponent(Kc.E).initialize(Mo.D.LEFT,(()=>{this.switchCarousels(-1)})),this._menuPrefab.GameObject.addComponent(Kc.E).initialize(Mo.D.TAB,(()=>{this.switchCarousels(0)}))}switchCarousels(k){K.q.instance.prodigy.audio.playSFX(18,"pop"),0===k?(this._activateMiddleNameCarousel=!this._activateMiddleNameCarousel,this._activeCarouselInput=this._activateMiddleNameCarousel?this._menuPrefab.middleNameCarouselInput:this._menuPrefab.lastNameCarouselInput):-1!==k||this._activateMiddleNameCarousel?1===k&&this._activateMiddleNameCarousel&&(this._activateMiddleNameCarousel=!1,this._activeCarouselInput=this._menuPrefab.lastNameCarouselInput):(this._activateMiddleNameCarousel=!0,this._activeCarouselInput=this._menuPrefab.middleNameCarouselInput),this._menuPrefab.middleNameHighlighter.active=this._activateMiddleNameCarousel,this._menuPrefab.lastNameHighlighter.active=!this._activateMiddleNameCarousel}disableCarouselHighlighters(){this._menuPrefab.middleNameHighlighter.active=!1,this._menuPrefab.lastNameHighlighter.active=!1}enableCarouselHighlighters(){this._menuPrefab.middleNameHighlighter.active=this._activateMiddleNameCarousel,this._menuPrefab.lastNameHighlighter.active=!this._activateMiddleNameCarousel}endTimerHandler(){this._activeCarouselInput.endHeldTimer()}setUpButtons(){this._menuPrefab.closeButton.onClick.add((()=>{this.close()})),this._menuPrefab.randomButton.onClick.add((()=>{this.disableCarouselHighlighters(),this.getRandomName()})),this._menuPrefab.doneButton.onClick.add((()=>{this.done()})),this._menuPrefab.middleNameCarouselInput.positiveButton.onInputDown.add((()=>{this.disableCarouselHighlighters()})),this._menuPrefab.middleNameCarouselInput.negativeButton.onInputDown.add((()=>{this.disableCarouselHighlighters()})),this._menuPrefab.lastNameCarouselInput.positiveButton.onInputDown.add((()=>{this.disableCarouselHighlighters()})),this._menuPrefab.lastNameCarouselInput.negativeButton.onInputDown.add((()=>{this.disableCarouselHighlighters()})),this._menuPrefab.middleNameCarousel.onStartedScrolling.add(this.updateMiddleName,this),this._menuPrefab.lastNameCarousel.onStartedScrolling.add(this.updateLastName,this)}close(){this._onCloseCallback&&this._onCloseCallback(),this.endTimerHandler(),K.q.instance.game.input.keyboard.addKey(Mo.D.UP).onUp.remove(this.endTimerHandler,this),K.q.instance.game.input.keyboard.addKey(Mo.D.DOWN).onUp.remove(this.endTimerHandler,this),this._menuGameObject.destroy(),super.close()}done(){var k;K.q.instance.prodigy.audio.playSFX(61,"add-pet"),uh.A.displayToolTipAuto(null,null,{bodyText:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NAME_CHANGE_SUCCESS"),xPosition:640,yPosition:100}),this._activePlayer.appearance.getName().setMiddleName(this._selectedMiddleName.ID),this._activePlayer.appearance.getName().setLastName(this._selectedLastName.ID),this._activePlayer.appearance.updated=!0,this._activePlayer.name.init(this._activePlayer.appearance.getName()),null===(k=this._activePlayer.playerContainer)||void 0===k||k.showName(),this._activePlayer.forceSaveCharacter(),this._onDoneCallback&&this._onDoneCallback(),this.close()}}var Jc=U(2272);class td extends Ka.W{constructor(k,B,U){super(k,B,5,U,[q._.Icons_menu_json,q._.Font_black_json,q._.Ui_shared_json]),this.mailPerPage=4,this.currentlyDisplayedMailItems=[],this.currentPage=0,this.closeButton=null,this.pageLeftButton=null,this.pageRightButton=null,this.mailIconEmpty=null,this.mailDisplay=null,this.mailIcon=null,this.mailCount=null,this.leftButtonUnreadIndicator=null,this.rightButtonUnreadIndicator=null,this.arrowLeftGraphic=null,this.arrowRightGraphic=null,this.noMailNotice=null,this.woodBackground=null;const F=K.q.instance.prodigy;this.mailExtensionController=F.gameContainer.get("140-ca43"),this.game.broadcaster.addAppListener(oi.zr.DeleteMailFailure,this.onMailActionFailure,this,oi.HG.Mailer),this.game.broadcaster.addAppListener(oi.zr.CloseList,this.close,this,oi.HG.Mailer),this.currentInterfaceName=ph.B.YourMail,this.networkHandler=F.mailNetworkHandler}create(){super.create(),this.fireInterfaceEvent({originType:bi.$N.ButtonClick,originID:jh.k.Mail})}preprocess(){this.queuePostCreateCallback((()=>{this.buttonSetup(),this.fetchMail()}))}close(k){j.Aq$.isDefined(this.game)&&(this.game.broadcaster.removeAppListener(oi.zr.GiftBoxOpened,this,oi.HG.Mailer),this.game.broadcaster.removeAppListener(oi.zr.DeleteMailFailure,this,oi.HG.Mailer),this.game.broadcaster.removeAppListener(oi.zr.GetAllMailSuccess,this,oi.HG.Mailer),this.game.broadcaster.removeAppListener(oi.zr.GetAllMailFailure,this,oi.HG.Mailer),this.game.broadcaster.removeAppListener(oi.zr.CloseList,this,oi.HG.Mailer),this.removeCachedMailNotificationImages(),j.Aq$.isDefined(k)&&k()),this.fireInterfaceEvent({closeMethod:bi.Lv.CloseButton}),super.close()}buttonSetup(){this.closeButton.onClickCallback=k=>{this.fireButtonEvent({buttonName:jh.k.X,destinationName:K.q.instance.prodigy.world.getCurrentZone()}),this.close(k)},this.pageLeftButton.onClickCallback=this.pageLeft.bind(this),this.pageRightButton.onClickCallback=this.pageRight.bind(this),this.pageLeftButton.scale.x=-1,this.pageLeftButton.visible=!1,this.pageRightButton.visible=!1}fetchMail(){this.mailIconEmpty.visible=!0,this.game.broadcaster.addAppListener(oi.zr.GetAllMailSuccess,this.onFetchMailSuccess,this,oi.HG.Mailer),this.game.broadcaster.addAppListener(oi.zr.GetAllMailFailure,this.onMailActionFailure,this,oi.HG.Mailer),K.q.instance.prodigy.mailNetworkHandler.getAllMail(!0)}onFetchMailSuccess(){this.renderMailItems(this.currentPage),this.updateMailCounter(),this.updatePageButtons(),this.updateNoMailNotice()}onMailActionFailure(){if(j.Aq$.isDefined(this.game)){const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);K.q.instance.prodigy.open.message(k.getText("MAIL_UNAVAILABLE"),(()=>{this.close()}),null,k.getText("MESSAGE_TITLE_OOPS"))}}renderMailItems(k){if(k<0||k+1>this.getNumPages())return;this.currentPage=k,this.clearMailDisplay();const B=this.networkHandler.mailList,U=this.currentPage*this.mailPerPage;let F=0;for(let G=U;G0,this.pageRightButton.visible=this.currentPage0){this.leftButtonUnreadIndicator.visible=!1,this.arrowLeftGraphic.visible=!0;for(let B=this.currentPage*this.mailPerPage-1;B>0;B--)if(!k[B].isOpened){this.leftButtonUnreadIndicator.visible=!0,this.arrowLeftGraphic.visible=!1;break}}if(this.currentPage{this.woodBackground.visible=!0,this.game.broadcaster.removeAppListener(oi.zr.GiftBoxOpened,this,oi.HG.Mailer)}),(()=>this.deleteMail(B,!0))),K.q.instance.prodigy.gameContainer.get("c47-20b6").yourMail.sendOpenMailEvent(B.id,!B.isOpened,B.attachments),Sc.b.isSingleUse(B)?this.game.broadcaster.addAppListener(oi.zr.GiftBoxOpened,this.updateOpenedStatus.bind(this,k,!0),this,oi.HG.Mailer,null):this.updateOpenedStatus(k,!0)}updateOpenedStatus(k,B){this.networkHandler.setRead(k,B),this.currentlyDisplayedMailItems[k%this.mailPerPage].openButtonGraphic.visible=B,this.currentlyDisplayedMailItems[k%this.mailPerPage].unOpenButtonGraphic.visible=!B,this.updateMailCounter(),this.updatePageButtons(),this.updateNoMailNotice(),this.updateMailEntry(k)}deleteMail(k,B=!1){if(k.isOpened||B)this.networkDeleteMailCall(k);else{const B=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);K.q.instance.prodigy.open.petsCustomDialog(new yh.k(B.getText("BUTTON_DELETE_TEAM"),(()=>this.networkDeleteMailCall(k)),B.getText("CANCEL"),void 0,{atlas:q._.Ui_store_json,name:"icon-large-exclamation"},Jc.E.Small,500,B.getText("BUTTON_DELETE_TEAM"),B.getText("MAILBOX_DELETE_MESSAGE")))}}networkDeleteMailCall(k){this.networkHandler.deleteMail(k),this.currentPage>=this.getNumPages()&&(this.currentPage=Math.max(this.currentPage-1,0)),this.clearMailDisplay(),this.updateMailCounter(),this.renderMailItems(this.currentPage),this.updatePageButtons(),this.updateNoMailNotice()}getNumPages(){return Math.ceil(this.networkHandler.mailList.length/this.mailPerPage)}removeCachedMailNotificationImages(){const k=this.networkHandler.mailList;for(let B=0;Bsuper.create}});return(0,G.sH)(this,void 0,void 0,(function*(){k.create.call(this),this._ui=yield this._prefabLoader.loadWithDependenciesFromGUID(Ei.l.AdventureMap_Template).promise,this.addChild(this._ui.legacyTransform.group);const B=this._ui.findComponentInChildren(ed.S);B.hideStartButton=this._isStartAdventure,B.run(),this._ui.findComponentInChildren(id.Z).menu=this}))}close(){var k;null===(k=this._closeCallback)||void 0===k||k.call(this),super.close()}destroy(){this._ui.destroy(),super.destroy()}}var nd=U(67510),ad=U(15521);class rd extends Ka.W{constructor(k,B,U){super(k,B,55,{isModal:!0}),this.onGreenButton=new j.HN0,this.onRedButton=new j.HN0,this.game=k,this.config=U,this.queuePostCreateCallback((()=>{this.configureText(),this.configureButtons()}))}configureText(){this.body.setText(this.config.body),j.Aq$.isDefined(this.config.title)&&(this.title=this.instantiateTemplate("title",this.matte).title,this.title.setText(this.config.title),ad.Z.bringToTop(this.body))}configureButtons(){this.greenButtonText.setText(this.config.greenButton.text),this.greenButton.onUpCallback=()=>{this.onGreenButton.dispatch()};const k=K.q.instance.prodigy.gameContainer.get("2e2-6ee6");if(k.setBlockType(this.greenButton.button.image.input,Ia.z.LOBBY),j.Aq$.isDefined(this.config.greenButton.callback)&&this.onGreenButton.add(this.config.greenButton.callback),this.onGreenButton.add(this.close.bind(this)),j.Aq$.isDefined(this.config.redButton)){const B=this.instantiateTemplate("redButton",this.buttonGroup),U=B.redButton;ad.Z.sendToBack(U),U.onUpCallback=()=>{this.onRedButton.dispatch()},k.setBlockType(U.button.image.input,Ia.z.LOBBY),j.Aq$.isDefined(this.config.redButton.callback)&&this.onRedButton.add(this.config.redButton.callback),this.onRedButton.add(this.close.bind(this));B.redButtonText.setText(this.config.redButton.text)}}destroy(){this.onGreenButton.dispose(),this.onRedButton.dispose(),super.destroy()}}class od extends Ka.W{get OnCreateClicked(){return this.onCreateClicked}get OnJoinClicked(){return this.onJoinClicked}constructor(k,B,U,F){super(k,B,52),this.onCreateClicked=new j.HN0,this.onJoinClicked=new j.HN0,this.hostCards=[],this.shareScrollPercent=0,this.playersInfo=U,this.coOpTeamsHandler=F,this.queuePostCreateCallback((()=>{this.setButtons(),this.renderPlayer(),this.fillView(),this.runTutorial()}))}getTeamList(){const k=this.coOpTeamsHandler.AvailableTeams,B=$.filter(k,(k=>j.Aq$.isDefined(this.playersInfo[k.hostID])));let U=$.filter(K.q.instance.prodigy.friendsListNetworkHandler.friendsList,(k=>0!==k.status));U=U.concat(K.q.instance.prodigy.friendsListNetworkHandler.classList);const F=$.map(B,(k=>this.extractCardInfo(this.playersInfo[k.hostID],k,U)));return F.sort(((k,B)=>k.friend!==B.friend?(B.friend?1:0)-(k.friend?1:0):B.teamSize-k.teamSize)),F}extractCardInfo(k,B,U){return{userID:k.userID,teamSize:B.teamMembers.length,friend:$.some(U,(B=>B.userID===k.userID)),appearance:k.appearance,equipment:k.equipment,isMember:1===k.isMember,icons:[],cell:null}}setButtons(){this.createButton.onUpCallback=()=>{this.onCreateClicked.dispatch(),this.close()},this.closeButton.onClickCallback=super.close.bind(this)}renderPlayer(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=new Oe.a(this.game);B.init({appearance:k.appearance.getData(),equipment:k.equipment.getData()});const U=K.q.instance.prodigy.create.player(this.playerWindowMask,B,1,80,95,!1,{isPreview:!0,hideMount:!0});U.mask=this.playerWindowMask.mask,U.forceWeaponVisual=!0,U.reload()}fillView(){this.hostCards=this.getTeamList();const k=this.hostCards.length<1;this.noTeamsAvailable.visible=k,k||(this.fillFeedGroup(),this.orderFeedCells()),this.feedContents.layoutElement.calculateChildren(),this.feedScrollView.setupVisibleIndices(),this.feedScrollView.calculateMaxScrollDist(),this.setupScrollBar(),this.feedScrollBar.visible=this.hostCards.length>1}setupScrollBar(){j.Aq$.isDefined(this.feedScrollView)&&(this.feedScrollView.linkScrollBar(this.feedScrollBar),this.feedScrollView.setToScrollPercent(this.shareScrollPercent))}fillFeedGroup(){for(let k=0;k=k.teamSize?k.icons[j].setImageFrameName("Images/icon-teammate-off"):k.icons[j].setImageFrameName("Images/icon-teammate-on");const $=new Oe.a(this.game);$.init(k);const H=K.q.instance.prodigy.create.player(F.friendCircle,$,1,80,130,!1,{isPreview:!0,hideMount:!0});H.forceWeaponVisual=!0,H.reload();const V=K.q.instance.prodigy.gameContainer.resolve(La.C);V.init($.appearance.getName());const W=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("CO_OP_PARTY_CELL_FRIEND");F.nameText.setText(`${V.getName()}${k.friend?W:""}`),F.memberIcon.visible=k.isMember,k.teamSize>2?(F.joinButton.visible=!1,F.fullText.visible=!0):F.joinButton.onUpCallback=()=>{this.onJoinClicked.dispatch(k.userID),this.close()},k.cell=F}orderFeedCells(){for(let k=0;k1}runTutorial(){const k=ln.B.FEATURE_COOP_BATTLE,B=ln.B.BREADCRUMB_COOP_PARTY_SELECT;if(!K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(k,B)){let U=new Ti.rD(this.game);U.addEvents([{dialogueData:U.dataProvider.get(291),blockInput:!0},{callback:()=>K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(k,B)}]),U.start(!0,(()=>U=null)),this.onJoinClicked.addOnce((()=>{null==U||U.close()}))}}destroy(){this.onCreateClicked.dispose(),this.onJoinClicked.dispose(),super.destroy()}}od.MAX_HEADCOUNT=3;var hd=U(50348);let cd=class extends j.uAl{constructor(){super(...arguments),this._confirmButton=null,this._dismissButton=null}get confirmButton(){return this._confirmButton}get dismissButton(){return this._dismissButton}};(0,G.Cg)([(0,j.x4W)("ConfirmButton"),(0,G.Sn)("design:type",ic.$)],cd.prototype,"_confirmButton",void 0),(0,G.Cg)([(0,j.x4W)("DismissButton"),(0,G.Sn)("design:type",ic.$)],cd.prototype,"_dismissButton",void 0),cd=(0,G.Cg)([(0,j.EVk)("ConfirmationDialogFooter")],cd);let dd=class extends j.uAl{constructor(){super(...arguments),this._headerText=null,this._headerIcon=null}get headerText(){return this._headerText}get headerIcon(){return this._headerIcon}};(0,G.Cg)([(0,j.x4W)("headerText"),(0,G.Sn)("design:type",j.EYj)],dd.prototype,"_headerText",void 0),(0,G.Cg)([(0,j.x4W)("headerIcon"),(0,G.Sn)("design:type",j._mx)],dd.prototype,"_headerIcon",void 0),dd=(0,G.Cg)([(0,j.EVk)("ConfirmationDialogHeader")],dd);var ld=U(38134);class ud extends ld.u{constructor(k,B,U=new yh.k){super(k,B,U),this._confirmationDialogConfig=null,this._headerPrefabID=Ei.l.ConfirmationDialogHeader,this._bodyPrefabID=Ei.l.ConfirmationDialogBody,this._footerPrefabID=Ei.l.ConfirmationDialogFooter,this._confirmationDialogConfig=U,this.configObj={elements:[]},this.isModal=!1}createHeader(){const k=this._prefabLoader.loadFromGUID(this._headerPrefabID,this._prefabComponent.header).findComponent(dd);j.Aq$.isDefined(this._confirmationDialogConfig.headerTitle)&&(k.headerText.text=this._confirmationDialogConfig.headerTitle),j.Aq$.isDefined(this._confirmationDialogConfig.headerIcon)&&k.headerIcon.legacyTransform.group.addChild(new to._(this.game,0,0,this._confirmationDialogConfig.headerIcon.atlas,this._confirmationDialogConfig.headerIcon.name))}createBody(){this._prefabLoader.loadFromGUID(this._bodyPrefabID,this._prefabComponent.body).findComponentInChildren(j.EYj).text=this._confirmationDialogConfig.bodyMessage}createFooter(){const k=this._prefabLoader.loadFromGUID(this._footerPrefabID,this._prefabComponent.footer),B=k.findComponent(cd);this._confirmationDialogConfig.confirmButtonCallback&&B.confirmButton.onClick.add(this._confirmationDialogConfig.confirmButtonCallback),this._confirmationDialogConfig.dismissButtonCallback&&B.dismissButton.onClick.add(this._confirmationDialogConfig.dismissButtonCallback),B.confirmButton.onClick.add(this.close.bind(this)),B.dismissButton.onClick.add(this.close.bind(this));const U=k.findComponentsInChildren(j.EYj);for(let F=0;F0?G:j,this._creaturePreviews[k].setTransparency(j)}onLoadPreviewHandler(k,B,U){k.GameObject.active=!0,this._gridLayout.updateAll(!1),K.q.instance.prodigy.load.isFileLoaded(_a.M.getAssets(k.renderContainer.source,1)[0])||j.VyI.log("Creature asset is not loaded",j.$bb.Error);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.encounters;F.hasPetBeenEncountered(k.creatureID)?0===F.getPetTimesRescued(k.creatureID)&&k.applyGreyscale(.3):k.applyGreyscale(0),k.setTransparency(U?.7:1),this.carousel.setToIndex(B),++this._finalOnLoadCount>=this._creaturePreviews.length&&this.allPreviewsLoaded()}allPreviewsLoaded(){this._finishedLoadingPreview=!0,this.updateButtonStates()}destroy(){this._creaturePreviews.forEach((k=>{k.OnLoad.removeAll(this)})),this._creaturePreviews.length=0,this._carouselContainer.destroy(),this._carouselContainer=null}}var Rd=U(56461),Pd=U(25930);class Md{get prefabComponent(){return this._petStatsPrefabComponent}constructor(k){this._panelGameObject=null,this._petStatsPrefabComponent=null;const B=K.q.instance.prodigy.gameContainer.get("d0e-64fd");this._panelGameObject=B.loadFromGUID(Ei.l.Pets_RightSideStatsPanel),k.addChild(this._panelGameObject.legacyTransform.group),this._petStatsPrefabComponent=this._panelGameObject.findComponentInChildren(Pd.J)}}class Nd extends Rd.A{constructor(k,B,U,F){super(k,B,200,{},[]),this.prefabRoot=null,this._headerComponent=null,this._gameObject=null,this._statsPanelContainerGO=null,this._statsPanel=null,this._currentPetItemID=0,this._petEvolutions=null,this._previousPetItemIndices=[],this.isModal=!1,this.background.visible=!1,F&&(this._headerComponent=F),this.setDataID(U),this._encounterInfo=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.encounters}create(){super.create();const k=K.q.instance.prodigy.gameContainer.get("d0e-64fd");this._gameObject=k.loadFromGUID(Ei.l.Pets_PetInfoMenu),this.prefabRoot.addChild(this._gameObject.legacyTransform.group),this._headerComponent&&(this._headerComponent.backToPetBookButton.onClick.add(this.close,this),this._headerComponent.backToPetBookButton.GameObject.addComponent(Kc.E).initialize(Mo.D.ESC,(()=>{this.close(),this._headerComponent.onSubMenuClose.dispatch()}))),this.loadStatsPanel(),this.loadEvolutionCarousel(),this.updateDisplay(),K.q.instance.prodigy.audio.playSFX(66,"open-pet-submenu");const B=le.t.getItem("pet",this._currentPetItemID);K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendPetDetailsViewedEvent(B,"pet-info")}loadEvolutionCarousel(){this._petGeneralPanelContainer=new j._mx,this._petGeneralPanelContainer.addComponent(j.K16),this._gameObject.addChild(this._petGeneralPanelContainer),this._petEvolutionsPanel=new Dd(this._petGeneralPanelContainer.legacyTransform.group),this._petEvolutionsPanel.addEvolutions(this._petEvolutions,this._currentPetItemIndex),this._petEvolutionsPanel.carousel.onFinishedScrolling.add(this.finishScrolling,this),this._petEvolutionsPanel.carousel.onScrollingToCompletion.add(this.changeTransparencyWhileScrolling,this);const k=()=>{this.tryToMoveCarousel(this._petEvolutionsPanel.canScrollPositive,1)};this._petEvolutionsPanel.panelPrefab.nextButton.onClick.add(k);const B=()=>{this.tryToMoveCarousel(this._petEvolutionsPanel.canScrollNegative,-1)};this._petEvolutionsPanel.panelPrefab.previousButton.onClick.add(B),this._petEvolutionsPanel.panelPrefab.previousButton.GameObject.addComponent(Kc.E).initialize(Mo.D.LEFT,B),this._petEvolutionsPanel.panelPrefab.nextButton.GameObject.addComponent(Kc.E).initialize(Mo.D.RIGHT,k)}loadStatsPanel(){this._statsPanelContainerGO=new j._mx,this._statsPanelContainerGO.addComponent(j.K16),this._gameObject.addChild(this._statsPanelContainerGO),this._statsPanel=new Md(this._statsPanelContainerGO.legacyTransform.group),this._statsPanel.prefabComponent.aboutToggle.GameObject.active=!0,this._statsPanel.prefabComponent.statsToggle.GameObject.active=!1;const k=this._statsPanel.prefabComponent.statsPanel.findComponentInChildren(j.JTA);k.GameObject.children[1].destroy(),k.GameObject.children[0].destroy(),k.updateAll(),this._statsPanel.prefabComponent.spellsToggle.GameObject.destroy();const B=this._statsPanel.prefabComponent.aboutToggle.GameObject.findComponentsInChildren(j.EYj);for(let $=0;${this.setAboutActive(),K.q.instance.prodigy.audio.playSFX(68,"paper-tab")};this._statsPanel.prefabComponent.aboutToggle.onSelected.add(F);const G=()=>{this.setStatsActive(),K.q.instance.prodigy.audio.playSFX(68,"paper-tab")};this._statsPanel.prefabComponent.statsToggle.onSelected.add(G),this._statsPanel.prefabComponent.aboutToggle.GameObject.addComponent(Kc.E).initialize(Mo.D.TAB,(()=>{const k=this._statsPanel.prefabComponent.aboutToggle.isSelected(),B=this._statsPanel.prefabComponent.GameObject.findComponentInChildren(wd.O);B.setItemSelected(this._statsPanel.prefabComponent.aboutToggle,!k),B.setItemSelected(this._statsPanel.prefabComponent.statsToggle,k),k?G():F()}))}tryToMoveCarousel(k,B){k?(K.q.instance.prodigy.audio.playSFX(18,"pop"),this.changeActiveID(B),this._petEvolutionsPanel.updateButtonStates(),this.updateDisplay()):K.q.instance.prodigy.audio.playSFX(67,"button-disabled")}setDataID(k){this._petEvolutions=Eh.P8.GetEvolutionaryLine(le.t.getItem("pet",k)),this._currentPetItemIndex=this._petEvolutions.findIndex((B=>B===k)),this._currentPetItemID=this._petEvolutions[this._currentPetItemIndex]}changeActiveID(k){this._previousPetItemIndices.push(this._currentPetItemIndex),this._currentPetItemIndex=j.cj9.clamp(this._currentPetItemIndex+k,0,this._petEvolutions.length-1),this._currentPetItemID=this._petEvolutions[this._currentPetItemIndex],this._petEvolutionsPanel.carousel.scrollToNextLocation(k)}finishScrolling(){this._petEvolutionsPanel.setCreaturePedestalTransparent(this._currentPetItemIndex,1),this._previousPetItemIndices.forEach((k=>{this._petEvolutionsPanel.setCreaturePedestalTransparent(k,.7)})),this._previousPetItemIndices=[]}changeTransparencyWhileScrolling(k){this._petEvolutionsPanel.setCreaturePedestalTransparent(this._currentPetItemIndex,1,1,k),this._previousPetItemIndices.forEach((B=>{this._petEvolutionsPanel.setCreaturePedestalTransparent(B,.7,-1,k)}))}setAboutActive(){this._statsPanel.prefabComponent.statsPanel.active=!1,this._encounterInfo.hasPetBeenEncountered(this._currentPetItemID)?(this._statsPanel.prefabComponent.aboutPanel.active=!0,this._statsPanel.prefabComponent.learnMorePanel.active=!1):(this._statsPanel.prefabComponent.learnMorePanel.active=!0,this._statsPanel.prefabComponent.aboutPanel.active=!1)}setStatsActive(){this._statsPanel.prefabComponent.aboutPanel.active=!1,this._encounterInfo.hasPetBeenEncountered(this._currentPetItemID)?(this._statsPanel.prefabComponent.statsPanel.active=!0,this._statsPanel.prefabComponent.learnMorePanel.active=!1):(this._statsPanel.prefabComponent.learnMorePanel.active=!0,this._statsPanel.prefabComponent.statsPanel.active=!1)}updateDisplay(){const k=le.t.getItem("pet",this._currentPetItemID);this._statsPanel.prefabComponent.textAbout.text=(0,Ba.k)(Tn.J.getLocalizationFlavorKey(k)),this._statsPanel.prefabComponent.fillBarAttackAndHearts.fillPercent=.1*k.data.statPower,this.updateElementDisplay(k),this.updateEvolveDisplay(k),this.updateEvolutionDisplay(k,this._currentPetItemIndex,this._petEvolutions.length),this.updateEncounterDisplay(k),this._statsPanel.prefabComponent.statsToggle.isSelected()?this.setStatsActive():this.setAboutActive()}updateElementDisplay(k){this._statsPanel.prefabComponent.textElement.text=rn.$.capitalizeFirstLetter(Eh.P8.getElementType(k));const B=this._statsPanel.prefabComponent.iconContainerElement.findComponent(j.vYh);B&&B.destroy(),cr.l.removeAll(this._statsPanel.prefabComponent.iconContainerElement.legacyTransform.group,!0);const U=this._statsPanel.prefabComponent.iconContainerElement.addComponent(j.vYh,!1);let F;switch(Eh.P8.getElementType(k)){case Td.a.Water:F=this._statsPanel.prefabComponent.elementIconFrameWater;break;case Td.a.Fire:F=this._statsPanel.prefabComponent.elementIconFrameFire;break;case Td.a.Storm:F=this._statsPanel.prefabComponent.elementIconFrameStorm;break;case Td.a.Ice:F=this._statsPanel.prefabComponent.elementIconFrameIce;break;case Td.a.Plant:default:F=this._statsPanel.prefabComponent.elementIconFrameEarth}U.create(),U.updateAsset(this._statsPanel.prefabComponent.elementIconAtlas,F)}updateEvolveDisplay(k){const B=Eh.P8.getEvolutionLVL(k);j.Aq$.isDefined(B)?(this._statsPanel.prefabComponent.rowObjectEvolveLevel.active=!0,this._statsPanel.prefabComponent.textEvolveLevel.text=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("LEVEL_AND_COLON",B)):this._statsPanel.prefabComponent.rowObjectEvolveLevel.active=!1}updateEvolutionDisplay(k,B,U){this._petEvolutionsPanel.panelPrefab.evolutionNumber.text=`Evolution ${B+1} of ${U}`,this._petEvolutionsPanel.panelPrefab.setBackground(Eh.P8.getElementType(k))}updateEncounterDisplay(k){const B=!!this._encounterInfo.hasPetBeenEncountered(k.ID);this._petEvolutionsPanel.panelPrefab.petName.text=B?(0,Ba.k)(Tn.J.getLocalizationNameKey(k)):"???";const U=Eh.P8.hasValidOrdinal(k)?k.data.ordinal:-1;this._petEvolutionsPanel.panelPrefab.petBookNumber.text=`# ${U.toString()}`,this._petEvolutionsPanel.panelPrefab.seenPanel.active=B,this._petEvolutionsPanel.panelPrefab.unseenPanel.active=!B,B&&(this._petEvolutionsPanel.panelPrefab.rescuedTimes.text=`Rescued: ${this._encounterInfo.getPetTimesRescued(k.ID)}`)}close(){var k,B,U,F,G;null===(k=this._petEvolutionsPanel)||void 0===k||k.destroy(),null===(B=this._statsPanel)||void 0===B||B.prefabComponent.aboutToggle.onSelected.dispose(),null===(U=this._statsPanel)||void 0===U||U.prefabComponent.statsToggle.onSelected.dispose(),null===(F=this._statsPanel)||void 0===F||F.prefabComponent.GameObject.destroy(),this._headerComponent&&(this._headerComponent.backToPetBookButton.onClick.remove(this.close,this),null===(G=this._headerComponent.backToPetBookButton.GameObject.findComponent(Kc.E))||void 0===G||G.destroy()),this._statsPanelContainerGO&&this._statsPanelContainerGO.destroy(),this._gameObject&&this._gameObject.destroy(),super.close()}}var xd=U(52382);class Ld extends Rd.A{constructor(k,B,U,F,G,$){super(k,B,200,{},[]),this.onGearMenuOpen=new j.HN0,this.onGearMenuClosed=new j.HN0,this.isModal=!1,this.background.visible=!1,$&&(this._headerComponent=$),this._contentLayer=null!=G?G:this,this._gearType=F,this._currentDataSchema=U}create(){const k=Object.create(null,{create:{get:()=>super.create}});return(0,G.sH)(this,void 0,void 0,(function*(){var B;k.create.call(this);const U=j.Aq$.isDefined(this._headerComponent);this._prefabLoader=K.q.instance.prodigy.gameContainer.get("d0e-64fd");const F=K.q.instance.prodigy.gameContainer.get("d69-defe"),G=j.Aq$.isDefined(null===(B=this._currentDataSchema)||void 0===B?void 0:B.gear)?this._currentDataSchema.gear[this._gearType]:null,$=j.Aq$.isDefined(G)?yield F.getPetGearByUniqueId(this._currentDataSchema.gear[this._gearType]):null;Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Ei.l.Pets_YourPetGearMenu,{[tr._R.PetGearType]:this._gearType,[tr._R.PetGearInitialGearDisplay]:$,[tr._R.PetGearHeaderEnable]:!U,[tr._R.PetGearHeaderClose]:this.close.bind(this),[tr.hi.PetCreatureData]:this._currentDataSchema}).then((k=>this.setUpMenuPrefab(k))).catch((k=>{j.VyI.log("Unable to load Pets - Your Pet Gear Menu prefab",j.$bb.Error)}))}))}setUpMenuPrefab(k){k&&!this.destroyed&&(this._gameObject=k,this._contentLayer&&this._contentLayer.addChild(this._gameObject.findComponentInChildren(j.y4o).getRootContainer()),this._gameObject.transform.setPosition(640,360),this._headerComponent&&(this._headerComponent.setTitleText("PETGEAR_MENU_TITLE"),this._headerComponent.backToYourPetButton.onClick.add(this.close,this),this._headerComponent.backToYourPetButton.GameObject.addComponent(Kc.E).initialize(Mo.D.ESC,(()=>{sh.I.shouldShowPetGearTutorialCached||(this.close(),this._headerComponent.onSubMenuEsc.dispatch(this))}))),K.q.instance.prodigy.audio.playSFX(66,"open-pet-submenu"),sh.I.shouldShowPetGearTutorialCached&&this.displayPetGearFtue(),this.onGearMenuOpen.dispatch())}displayPetGearFtue(){var k;K.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:"Pet_gear_tutorial",funnelType:"tutorial",stepName:Gh.l.PetGearGearMenu},{step_index:4});const B=this._gameObject.findComponentInChildren(j.bE_,!0),U=B.Container.get(tr.oD.PetGearFtueEnabledInputTransform),F=B.Container.get(tr.oD.PetGearFtueOverlayGameObject);null===(k=this._gameObject.findComponentsInChildren(xd.H))||void 0===k||k.forEach((k=>{const B=()=>{var B;if(!j.Aq$.isDefined(F)||F.isDestroyed)return;F.active=!0,k.resetSelection();const G=null===(B=k.getVisibleGearCardByIndex(0))||void 0===B?void 0:B.findComponent(j.XVE);j.Aq$.isDefined(G)&&(U.GameObject.active=!0,U.setPosition(G.worldPosition.x-G.widthDelta*G.pivot.x,G.worldPosition.y-G.heightDelta*G.pivot.y),U.fullWidth=G.fullWidth,U.fullHeight=G.fullHeight)};k.onGridDisplayed.add(B),k.onGridInitialized.add(B),k.onGearCardSelected.add((()=>{j.Aq$.isDefined(F)&&!F.isDestroyed&&(U.GameObject.active=!1)})),k.onEquippedGearChanged.addOnce((()=>{sh.I.updateCachedPetGearTutorialFlag().catch(j.RQr.createHandler("Failed to update cached pet gear tutorial flag")).finally((()=>{F.destroy()}))}))}))}close(){var k;this._headerComponent&&(this._headerComponent.setTitleText(""),this._headerComponent.backToYourPetButton.onClick.remove(this.close,this),null===(k=this._headerComponent.backToYourPetButton.GameObject.findComponent(Kc.E))||void 0===k||k.destroy()),this._gameObject&&this._gameObject.destroy(),this._gearType=null,this._currentDataSchema=null,this.onGearMenuClosed.dispatch(),this.onGearMenuClosed.dispose(),this.onGearMenuOpen.dispose(),super.close()}}var kd=U(38097),Bd=U(52142),Ud=U(3119);class Fd{get rootNode(){return this._root}constructor(k){this._root=k}}class Gd{get tree(){return this._tree}set tree(k){this._tree=k}get currentNode(){return this._currentNode}set currentNode(k){this._currentNode=k}constructor(k){this._currentNode=null,this.visitedNodes=[],this.skipInVisitedStack=[],this._tree=k,this.currentNode=this.tree.rootNode}start(){this.currentNode.onVisited()}getNextChildNode(){return this.currentNode.getAllChildNodes().length>0?this.currentNode.getAllChildNodes()[0]:null}setNodeAsVisited(k){-1===this.skipInVisitedStack.indexOf(k)&&this.visitedNodes.push(k)}nextNode(k){return this.currentNode?this.currentNode.getAllChildNodes().length>0?(j.Aq$.isDefined(k)&&0!==k.length?this.currentNode=this.currentNode.getChildNodeByName(k):this.currentNode=this.currentNode.getAllChildNodes()[0],this.currentNode?j.Aq$.isDefined(this.currentNode.onVisited)&&this.currentNode.onVisited():"exit"===k?this.currentNode=null:j.VyI.log(`Branch not found: ${k}.`,j.$bb.Error)):this.currentNode=null:j.VyI.log("currentNode not defined.",j.$bb.Error),this.currentNode}prevNode(){return this.visitedNodes.length>0?(this.currentNode=this.visitedNodes.pop(),j.Aq$.isDefined(this.currentNode.onVisited)&&this.currentNode.onVisited()):this.currentNode=null,this.currentNode}}var jd=U(1041);class $d extends fr.u{constructor(k,B,U){super(),this.game=k,this.screen=B,this.mapData=U,this.tiledParser=new jd.Z(K.q.instance.prodigy.gameContainer)}create(){super.create()}render(k){j.Aq$.isDefined(k)&&(this.mapData=k),this.below=K.q.instance.prodigy.create.element(this.screen.background,0,0),this.above=K.q.instance.prodigy.create.element(this.screen.foreground,0,0);const B=K.q.instance.prodigy.create.element(this.screen.background,0,0),U=K.q.instance.prodigy.create.element(this.screen.foreground,0,0);this.area=this.tiledParser.init(this.game,B,U,this.screen,this.mapData,(()=>{K.q.instance.prodigy.textureBelow.clear(),K.q.instance.prodigy.textureBelow.renderXY(B,0,0,!0),this.below.add(K.q.instance.prodigy.create.image(0,0,void 0,void 0,K.q.instance.prodigy.textureBelow)),K.q.instance.prodigy.textureAbove.clear(),K.q.instance.prodigy.textureAbove.renderXY(U,0,0,!0),this.above.add(K.q.instance.prodigy.create.image(0,0,void 0,void 0,K.q.instance.prodigy.textureAbove)),this.tiledParser.processAnimations(this.game,this),B.destroy(),U.destroy()}))}update(){super.update()}destroy(){this.screen=null,this.mapData=null,this.tiledParser=null,this.below=null,this.above=null,super.destroy()}}var Hd=U(93833),Vd=U(77302),Wd=U(29738),qd=U(10312);class Kd extends Ka.W{constructor(k,B,U,F){super(k,B,200,{},[q._.General_icons_json,q._.Ui_bam_json,q._.Ui_buttons_json,q._.Ui_store_json,q._.Ui_card_json,q._.Ui_registration_json,q._.Ui_icons_json,q._.Ui_panels_json,Z.c.Sfx_store_equip,Z.c.Sfx_store_purchase,Z.c.Sfx_registration]),this.prefabRoot=null,this._ui=null,this._headerPrefab=null,this._data=null,this._playingSFX=null,this._headerPrefab=F,this._data=U,this._headerPrefab.policyLink.onClicked.add((()=>{this.onPrivacyPolicyClick()})),this._headerPrefab.websiteLink.onClicked.add((()=>{this.onWebsiteLinkClick()})),this.isModal=!1,this.background.visible=!1,this._localizer=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService)}create(){super.create(),this._headerPrefab.nextButton.onClick.add(this.nextClicked,this),this._headerPrefab.backButton.onClick.add(this.backClicked,this)}loadFromPrefab(k,B){const U=K.q.instance.prodigy.gameContainer.get("d0e-64fd");return this._ui="string"==typeof B?U.loadFromGUID(B):U.load(B),0===this._ui.findComponents(Hd.$).length&&this._ui.addComponent(Hd.$),0===this._ui.findComponents(j.jsv).length&&this._ui.addComponent(j.jsv),this.prefabRoot.addChild(this._ui.findComponent(Hd.$).rootContainer),this._ui.findComponentInChildren(k)}changeTitle(k){this._headerPrefab.title.text=this._localizer.getText(k)}initializeAudio(k,B){Wd.O.isEnglishLocale()?(this.changeAudio(k,B),-1===this._data.soundHasBeenPlayed.indexOf(k)&&(this.playAudio(k),this._data.soundHasBeenPlayed.push(k))):this._headerPrefab.soundButton.Active=!1}changeAudio(k,B){this._headerPrefab.soundButton.onClick.removeAll(),this._headerPrefab.soundButton.onClick.add((()=>{this.playAudio(k),B&&("location"===B?this.sendAnalytics("audio",B,null):this.sendAnalytics("audio",B,this._data.isSchool?"school":"home"))}))}playAudio(k){this._playingSFX&&this._playingSFX.stop(),this._playingSFX=K.q.instance.prodigy.audio.playSFX(46,k)}setCharacter(k){this._headerPrefab.faceContainer.active=k}headerVisible(k=!0){this._headerPrefab&&(this._headerPrefab.title.GameObject.active=k,this._headerPrefab.soundButton.GameObject.active=k,this._headerPrefab.nextButton.GameObject.active=k,this._headerPrefab.backButton.GameObject.active=k)}nextClicked(){this._playingSFX&&this._playingSFX.stop(),this._headerPrefab.nextButton.currentState===j.ZIW.Disabled?this.disabledNextClicked():(K.q.instance.prodigy.audio.playSFX(18,"pop"),this.continueNext())}continueNext(){this.saveToData(!0),this.close(),this._headerPrefab.dispatchNext(this._customInputData),this.headerCleanup()}continueBack(){this.saveToData(!1),this.close(),this._headerPrefab.dispatchBack(this._customInputData),this.headerCleanup()}disabledNextClicked(){}backClicked(){this._playingSFX&&this._playingSFX.stop(),K.q.instance.prodigy.audio.playSFX(18,"pop"),this.continueBack()}disableNext(){this._headerPrefab.nextButton.setState(j.ZIW.Disabled)}enableNext(){this._headerPrefab.nextButton.setState(j.ZIW.Default)}static isScreenActive(k,B){return!0}headerCleanup(){this._headerPrefab.nextButton.onClick.remove(this.nextClicked,this),this._headerPrefab.backButton.onClick.remove(this.backClicked,this),this._headerPrefab=null}sendAnalytics(k,B,U,F){j.Aq$.isDefined(F)&&this.metricsManager.sendOnboardingFunnelEvent(F)}onPrivacyPolicyClick(){this.customOnPopupOpen(),this.sendAnalytics("popup","redirect","privacy"),K.q.instance.prodigy.open.confirmationDialog(new yh.k(this._localizer.getText("BUTTON_LEAVE_TEAM"),(()=>{this.customOnPopupClose(),qd.I.openWebsite("www.prodigygame.com/privacy-policy/")}),this._localizer.getText("BUTTON_STAY_TEAM"),(()=>{this.customOnPopupClose()}),{atlas:q._.Ui_store_json,name:"icon-large-exclamation"},Jc.E.Small,500,this._localizer.getText("LOGIN_LEAVE_GAME"),this._localizer.getText("LOGIN_LEAVE_BODY")))}onWebsiteLinkClick(){this.customOnPopupOpen(),this.sendAnalytics("popup","redirect","website"),K.q.instance.prodigy.open.confirmationDialog(new yh.k(this._localizer.getText("BUTTON_LEAVE_TEAM"),(()=>{this.customOnPopupClose(),qd.I.openWebsite("www.prodigygame.com")}),this._localizer.getText("BUTTON_STAY_TEAM"),(()=>{this.customOnPopupClose()}),{atlas:q._.Ui_store_json,name:"icon-large-exclamation"},Jc.E.Small,500,this._localizer.getText("LOGIN_LEAVE_GAME"),this._localizer.getText("LOGIN_LEAVE_BODY")))}customOnPopupOpen(){}customOnPopupClose(){}close(){this._headerPrefab&&(this._headerPrefab.policyLink.onClicked.removeAll(),this._headerPrefab.websiteLink.onClicked.removeAll()),this._playingSFX&&this._playingSFX.stop(),this._ui&&this._ui.destroy(),super.close()}}let zd=class extends j.uAl{constructor(){super(...arguments),this._classCodeElement=null,this._messageSuccess=null,this._messageErrorEmpty=null,this._messageErrorInvalid=null,this._learnMoreText=null,this._footerTextObject=null,this._countryContainerObject=null,this._moreInfoButton=null,this._noCodeButton=null,this._title=null}get classCodeElement(){return this._classCodeElement}get messageSuccess(){return this._messageSuccess}get messageErrorEmpty(){return this._messageErrorEmpty}get messageErrorInvalid(){return this._messageErrorInvalid}get footerText(){return this._footerTextObject}get learnMoreText(){return this._learnMoreText}get countryContainerObject(){return this._countryContainerObject}get moreInfoButton(){return this._moreInfoButton}get noCodeButton(){return this._noCodeButton}get title(){return this._title}};(0,G.Cg)([(0,j.x4W)("classCodeElement"),(0,G.Sn)("design:type",ac.S)],zd.prototype,"_classCodeElement",void 0),(0,G.Cg)([(0,j.x4W)("messageSuccess"),(0,G.Sn)("design:type",j._mx)],zd.prototype,"_messageSuccess",void 0),(0,G.Cg)([(0,j.x4W)("messageErrorEmpty"),(0,G.Sn)("design:type",j._mx)],zd.prototype,"_messageErrorEmpty",void 0),(0,G.Cg)([(0,j.x4W)("messageErrorInvalid"),(0,G.Sn)("design:type",j._mx)],zd.prototype,"_messageErrorInvalid",void 0),(0,G.Cg)([(0,j.x4W)("learnMoreText"),(0,G.Sn)("design:type",j.EYj)],zd.prototype,"_learnMoreText",void 0),(0,G.Cg)([(0,j.x4W)("footerTextObject"),(0,G.Sn)("design:type",j.EYj)],zd.prototype,"_footerTextObject",void 0),(0,G.Cg)([(0,j.x4W)("countryContainerObject"),(0,G.Sn)("design:type",j._mx)],zd.prototype,"_countryContainerObject",void 0),(0,G.Cg)([(0,j.x4W)("moreInfoButton"),(0,G.Sn)("design:type",ic.$)],zd.prototype,"_moreInfoButton",void 0),(0,G.Cg)([(0,j.x4W)("noCodeButton"),(0,G.Sn)("design:type",ic.$)],zd.prototype,"_noCodeButton",void 0),(0,G.Cg)([(0,j.W_S)(),(0,j.nKb)("title"),(0,G.Sn)("design:type",String)],zd.prototype,"_title",void 0),zd=(0,G.Cg)([(0,j.EVk)("RegistrationClassCodePrefab")],zd);class Yd extends Kd{constructor(k,B,U,F){super(k,B,U,F),this._prefabComponent=null,this._submissionError=!1,this._headerPrefab.backButton.GameObject.active=!1}static isScreenActive(k,B){return(!j.Aq$.isDefined(k.curriculumTreeID)||!j.Aq$.isDefined(k.educationData.curriculumTreeID))&&super.isScreenActive(k,B)}create(){super.create(),this._prefabComponent=this.loadFromPrefab(zd,Ei.l.RegistrationClassCode),this.changeTitle(this._prefabComponent.title),this.initializeAudio("classCodeAskTeacher","class_code"),j.Aq$.isDefined(this._data.classCode)||(this._data.classCode=""),this._spinner=this.add(K.q.instance.prodigy.create.sprite(640,350,q._.General_core_json,"loading")),this._spinner.anchor.set(.5,.5),K.q.instance.game.add.tween(this._spinner,this).to({angle:360},2e3,j.GS3.Linear.None,!0,0,Vt.s.MAX_SAFE_INTEGER,!1),this._spinner.visible=!1,this._prefabComponent.messageSuccess.active=!1,this._prefabComponent.messageErrorEmpty.active=!1,this._prefabComponent.messageErrorInvalid.active=!1,this._prefabComponent.footerText.text=this._localizer.getText("REGISTRATION_CLASS_CODE_FIND"),this._prefabComponent.learnMoreText.text=this._localizer.getText("REGISTRATION_LEARN_MORE"),this._prefabComponent.learnMoreText.drawUnderline(0,this._prefabComponent.learnMoreText.text.length),this._prefabComponent.classCodeElement.setStyle("text-align","center"),this._headerPrefab.backButton.GameObject.active=!1,this.disableNext(),this._customInputData="school",this.setCharacter(!0),this._prefabComponent.noCodeButton.onClick.add((()=>{K.q.instance.prodigy.audio.playSFX(18,"pop"),this._customInputData="home",this.continueNext()})),this._prefabComponent.moreInfoButton.onClick.add((()=>{this.sendAnalytics("get_class_code","click_button",null),K.q.instance.prodigy.open.learnMore("HEY_TEACHERS","CLASS_CODE_LEARN_MORE_HEADER","CLASS_CODE_LEARN_MORE_BODY",(()=>{this._prefabComponent.classCodeElement.setVisible(!0)}),(()=>{this._prefabComponent.classCodeElement.text="",this.updateDisplay(),K.q.instance.game.input.keyboard.clearCaptures(),this._prefabComponent.classCodeElement.setVisible(!1)}))})),K.q.instance.game.broadcaster.addAppListener(oi.bS.POST_MESSAGE_RECEIVED,((k,B)=>{"class-code-entry"===B.name&&(K.q.instance.game.input.keyboard.addKeyCapture([Mo.D.BACKSPACE]),this._prefabComponent.classCodeElement.text=B.classCode,"undefined"===this._prefabComponent.classCodeElement.text?this._prefabComponent.classCodeElement.text="":(this.updateDisplay(),this.sendAnalytics("get_class_code","autofill_class_code",null)))}),this,K.q.instance.game),this.addListeners(),this.sendAnalytics("default_signup","class_code","school",Gh.l.EnterClassCode);"clever"===K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.userDataPlatform&&(this._customInputData="home",this.continueNext())}addListeners(){this._prefabComponent.classCodeElement.onFocusChanged.add(this.updateDisplay,this),this._prefabComponent.classCodeElement.enablePerKeyEvents(!0),this._prefabComponent.classCodeElement.onTextChanged.add(this.updateDisplay,this)}updateDisplay(){this.setInputColour(this._prefabComponent.classCodeElement,!1),this._prefabComponent.messageErrorEmpty.active=!1,this._prefabComponent.messageErrorInvalid.active=!1,this._prefabComponent.messageSuccess.active=!1,this._headerPrefab.nextButton.currentState===j.ZIW.Disabled&&this.setCharacter(!0);let k=this._prefabComponent.classCodeElement.text;k=Uh.b.reformatClassCode(k),this._prefabComponent.classCodeElement.text=k,0===k.length?(this.setCharacter(!0),this.disableNext()):Uh.b.isValidClassCode(k)?(this._data.classCode=k,this.enableNext()):this._headerPrefab.nextButton.currentState!==j.ZIW.Disabled&&(this.setCharacter(!0),this.disableNext())}disabledNextClicked(){this.showInvalidClassCodeMessage()}showInvalidClassCodeMessage(){this._spinner.visible=!1,this.setCharacter(!0),this.setInputColour(this._prefabComponent.classCodeElement,!0),this._prefabComponent.messageSuccess.active=!1,this.isEmptyInput(this._prefabComponent.classCodeElement)?this._prefabComponent.messageErrorEmpty.active=!0:(this._prefabComponent.messageErrorInvalid.active=!0,this._submissionError||(this._submissionError=!0,K.q.instance.prodigy.audio.playSFX(46,"classCodeSubmitError")))}saveToData(k){k||(this._data.classCode="")}setInputColour(k,B=!1){B?(k.setStyle("border","2px solid red"),k.setStyle("background-color","#ffcccc")):(k.setStyle("border","1px solid rgb(54, 54, 54)"),k.setStyle("background-color","#ffffff"))}isEmptyInput(k){return!(j.Aq$.isDefined(k.text)&&0!==k.text.length)}customOnPopupOpen(){this._prefabComponent.classCodeElement.setVisible(!1)}customOnPopupClose(){this._prefabComponent.classCodeElement.setVisible(!0)}continueNext(){if("school"===this._customInputData&&this._data.classCode.length>0){this._spinner.visible=!0,this.disableNext();K.q.instance.prodigy.gameContainer.get("c97-bd0d").attachClassCode(this._data.classCode,(()=>this.classCodeAttach(!0)),(()=>this.classCodeAttach(!1))).catch(j.RQr.createHandler("Error attaching class code"))}else{this._customInputData="home",this._spinner.visible=!0;const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.educationData.curriculumTreeID=this._data.curriculumTreeID,k.curriculumTreeID=this._data.curriculumTreeID,this.mutateCurriculumAndContinue(this._data.curriculumTreeID).catch(j.RQr.createHandler("Error setting curriculum"))}}classCodeAttach(k){if(k){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.isClassCodeAttached=!0,k.data.classCodeUpdateTimestamp=Date.now();K.q.instance.prodigy.gameContainer.get("c97-bd0d").getCurriculumAndGrade(k).then((B=>{this._data.grade=B.chosenGrade,this._data.curriculumTreeID=B.curriculumTreeID,this._data.skipNextRequery=!0,k.onEducationLoaded(B),k.setEducation(B.chosenGrade,B.curriculumTreeID),super.continueNext()})).catch((()=>{this.showInvalidClassCodeMessage()}))}else this.showInvalidClassCodeMessage()}mutateCurriculumAndContinue(k){const B=Object.create(null,{continueNext:{get:()=>super.continueNext}});return(0,G.sH)(this,void 0,void 0,(function*(){const U=K.q.instance.prodigy.gameContainer.get("c97-bd0d"),F=(k,B)=>{Tn.J.logSetCurriculumFailed()};j.Aq$.isDefined(k)&&(yield U.setCurriculum({curriculumTreeID:k},void 0,F).catch(j.RQr.createHandler("Error setting curriculum"))),this._spinner.visible=!1,B.continueNext.call(this)}))}removeListeners(){this._prefabComponent.classCodeElement.onFocusChanged.dispose(),this._prefabComponent.classCodeElement.enablePerKeyEvents(!1),this._prefabComponent.classCodeElement.onTextChanged.dispose()}destroy(){this._headerPrefab.backButton.setState(j.ZIW.Default),this._headerPrefab.backButton.inputEnabled=!0,this._headerPrefab.backButton.GameObject.active=!0,K.q.instance.game.broadcaster.removeAppListener(oi.bS.POST_MESSAGE_RECEIVED,this,K.q.instance.game),this._prefabComponent.noCodeButton.onClick.removeAll(),this.removeListeners(),super.destroy()}}var Qd=U(19633),Xd=U(27952);let Zd=class extends j.uAl{constructor(){super(...arguments),this._title=null,this._soundButton=null,this._policyLink=null,this._websiteLink=null,this._nextButton=null,this._backButton=null,this._faceContainer=null,this._onNext=new j.HN0,this._onBack=new j.HN0,this._onDone=new j.HN0}get title(){return this._title}get soundButton(){return this._soundButton}get policyLink(){return this._policyLink}get websiteLink(){return this._websiteLink}get faceContainer(){return this._faceContainer}get nextButton(){return this._nextButton}get backButton(){return this._backButton}get onNext(){return this._onNext}get onBack(){return this._onBack}get onDone(){return this._onDone}dispatchNext(k){this._onNext.dispatch(k)}dispatchBack(k){this._onBack.dispatch(k)}dispatchDone(){this._onDone.dispatch()}destroy(){this._onNext.dispose(),this._onBack.dispose(),this._onDone.dispose(),super.destroy()}};(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],Zd.prototype,"_title",void 0),(0,G.Cg)([(0,j.MnK)(ic.$),(0,G.Sn)("design:type",ic.$)],Zd.prototype,"_soundButton",void 0),(0,G.Cg)([(0,j.MnK)(Xd.t),(0,G.Sn)("design:type",Xd.t)],Zd.prototype,"_policyLink",void 0),(0,G.Cg)([(0,j.MnK)(Xd.t),(0,G.Sn)("design:type",Xd.t)],Zd.prototype,"_websiteLink",void 0),(0,G.Cg)([(0,j.MnK)(Qd.S),(0,G.Sn)("design:type",Qd.S)],Zd.prototype,"_nextButton",void 0),(0,G.Cg)([(0,j.MnK)(Qd.S),(0,G.Sn)("design:type",Qd.S)],Zd.prototype,"_backButton",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],Zd.prototype,"_faceContainer",void 0),Zd=(0,G.Cg)([(0,j.EVk)("RegistrationHeaderPrefab")],Zd);var Jd=U(72937);class tl extends Kd{constructor(k,B,U,F){super(k,B,U,F)}create(){super.create(),this.headerVisible(!1),this._data.showLoaderAtEndOfFlow&&Jd.u.showLoaderIfHidden(),K.q.instance.prodigy.education.loadAndInitEducationData().then((()=>this.doneClicked())).catch((k=>{var B;null===(B=K.q.instance.prodigy.game.state.getCurrentState())||void 0===B||B.onError(Vd.S.makeLoadSkillsError(k))}))}saveToData(k){this._data.loginState=1}doneClicked(){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.forceSaveCharacter(),this.saveToData(!0),this.close(),this._headerPrefab.dispatchDone()}}class el extends class{get branchName(){return this._branchName}get onVisited(){return this._onVisited}set onVisited(k){this._onVisited=k}get isNodeActive(){return this._isNodeActive}constructor(k,B,U){this._children=[],this._onVisited=k,this._isNodeActive=U,this._branchName=B}addChild(k){this._children.push(k)}getAllChildNodes(){return this._children}getChildNodeByName(k){for(let B=0;B(0,G.sH)(this,[k],void 0,(function*([k,B]){if(B){if(this.game)return this._cachedGradeInfo=B,this._prefabComponent?this.populateGradesTiles(this._cachedGradeInfo.data.curriculum):this._data.curriculumGradeInfo=this._cachedGradeInfo.data.curriculum,Promise.resolve();j.VyI.log("Grade info returned but RegistrationChooseGrade has been destroyed.",j.$bb.Warning)}else if(k)throw new Error(k.getErrorMessage())})))).catch((k=>{j.VyI.log(`Failed to get grade data for curriculum with ID ${$} - ${k.message}`,j.$bb.Warning),K.q.instance.prodigy.audio.playSFX(46,"oops"),K.q.instance.prodigy.open.informationDialog(new bd.Z("PARENT_ATTACH_TRY_AGAIN",(()=>{this.continueBack()}),Jc.E.Small,500,"ERROR","ERROR_DIALOG_BODY",void 0,void 0,void 0,Ei.l.ErrorDialogHeader,Ei.l.ErrorDialogFooter))}))}fetchCurriculumGradeResponseData(k){return(0,G.sH)(this,void 0,void 0,(function*(){let B=null,U=null;const F=K.q.instance.prodigy.gameContainer.get("8bb-7057");return yield F.sendRequest(`query CurriculumGrades { curriculum(id:${k}){ id name grades{ nodes { name id number } } } }`).then((k=>{B=k})).catch((k=>{U=new lt._(k)})),[U,B]}))}create(){super.create(),this.disableNext(),this.changeTitle(""),this._prefabComponent=this.loadFromPrefab(il,al.CHOOSE_GRADE_PREFAB_ID),this._prefabComponent.footerTextObject.text=this._localizer.getText("REGISTRATION_WHY_NEED_INFO");const k=this._localizer.getText("REGISTRATION_LEARN_MORE");this._prefabComponent.clickHereTextObject.text=k,this._prefabComponent.clickHereTextObject.drawUnderline(0,k.length),this._prefabComponent.moreInfoButton.onClick.add((()=>{K.q.instance.prodigy.open.informationDialog(new bd.Z("BUTTON_OKAY_CAPITAL",null,Jc.E.Small,500,"REGISTRATION_WHY_NEED_GRADE","REGISTRATION_WHY_NEED_GRADE_REASON")),this.sendAnalytics("popup","information","grade")})),this.hasCorrectGradeInfosForCurriculum(this._data.curriculumTreeID,this._data.curriculumGradeInfo)&&this.populateGradesTiles(this._data.curriculumGradeInfo),this.setCharacter(!0),this.sendAnalytics("default_signup","grade","home",Gh.l.EnterGrade)}populateGradesTiles(k){const B=[],U=this._prefabComponent.GameObject.findComponent(wd.O),F=j.Aq$.isDefined(this._data.grade)?this._data.grade:-1;let G=al.GRADE_LOC_INFOS[al.DEFAULT_GRADE_LOC_INFOS_INDEX];k.grades.nodes.length>0&&(G=al.determineLocInfo(k.grades.nodes[0].name,al.GRADE_LOC_INFOS,G,this._localizer)),this.changeTitle(this._localizer.getText(G.titleKey)),this.initializeAudio(G.audioKey,"grade");const $=this._localizer.getText(G.gradeTextKey);for(let j=0;j{K.q.instance.prodigy.audio.playSFX(18,"pop"),this.onGradeSelected(G.number)})),B.push(V),U.addSelectable(V.toggleObject),G.number===F&&(U.setItemSelected(V.toggleObject,!0),this.onGradeSelected(G.number))}const H=this._prefabComponent.gradeContainerObject.findComponent(j.XVE);this.positionGradeTiles(B,H.widthDelta,H.heightDelta,al.BUTTON_SPACING)}saveToData(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k?(this._data.grade=B.grade=this._selectedGrade,B.updated=!0):(delete this._data.grade,B.grade=null),this._cachedGradeInfo&&(this._data.curriculumGradeInfo=this._cachedGradeInfo.data.curriculum)}positionGradeTiles(k,B,U,F){if(k.length<=0)return void j.VyI.log("positionGradeTiles - no grades to position",j.$bb.Warning);const G=k[0].GameObject.findComponent(j.XVE),$=G.widthDelta+F,H=G.heightDelta+F,V=Math.min(Math.floor(B/$),k.length),W=Math.floor(.5*(B-V*$))+.5*F,q=Math.floor(.5*(U-Math.ceil(k.length/V)*H))+.5*F;for(let j=0;j0}static determineLocInfo(k,B,U,F){let G=U;for(let j=0;jsuper.continueNext}});return(0,G.sH)(this,void 0,void 0,(function*(){const U=K.q.instance.prodigy.gameContainer.get("c97-bd0d"),F=(k,B)=>{Tn.J.logSetInitialGradesFailed()};j.Aq$.isDefined(k)&&(yield U.setInitialGrades({grade:k},void 0,F).catch(j.RQr.createHandler("Error setting init grades"))),B.continueNext.call(this)}))}static isScreenActive(k,B){return(!j.Aq$.isDefined(k.educationData.grade)||!j.Aq$.isDefined(k.educationData.chosenGrade))&&super.isScreenActive(k,B)}}al.CHOOSE_GRADE_PREFAB_ID=64,al.GRADE_BUTTON_PREFAB_ID=65,al.BUTTON_SPACING=20,al.GRADE_LOC_INFOS=[{gradeTextKey:"REGISTRATION_GRADE",titleKey:"REGISTRATION_GRADE_TITLE",audioKey:"whatGrade"},{gradeTextKey:"REGISTRATION_LEVEL",titleKey:"REGISTRATION_LEVEL_TITLE",audioKey:"whatLevel"},{gradeTextKey:"REGISTRATION_YEAR",titleKey:"REGISTRATION_YEAR_TITLE",audioKey:"whatYear"},{gradeTextKey:"REGISTRATION_CLASS",titleKey:"REGISTRATION_CLASS_TITLE",audioKey:"whatClass"}],al.DEFAULT_GRADE_LOC_INFOS_INDEX=0;class rl{static fetchAvailableCurriculumCountries(){return(0,G.sH)(this,void 0,void 0,(function*(){let k=null,B=null;const U=K.q.instance.prodigy.gameContainer.get("8bb-7057");return yield U.sendRequest(rl.FETCH_CURRICULUM_OFFERINGS).then((B=>{k=B})).catch((k=>{B=new lt._(k)})),[B,k]}))}static removeSubdivisionsWithNoDefaultCurriculum(k){k.data.curriculumOfferings.countries.forEach((k=>{k.subdivisions=k.subdivisions.filter((k=>null!==k.defaultCurriculum))}))}}rl.FETCH_CURRICULUM_OFFERINGS="query Find_Countries_With_Offerings {curriculumOfferings { defaultCurriculum(subject:MATH) { name id } countries { name id defaultCurriculum(subject:MATH){ name id } subdivisions{ id name defaultCurriculum(subject:MATH){ name id }}}}}";let ol=class extends j.uAl{constructor(){super(...arguments),this._learnMoreText=null,this._footerTextObject=null,this._countryContainerObject=null,this._moreInfoButton=null}get footerText(){return this._footerTextObject}get learnMoreText(){return this._learnMoreText}get countryContainerObject(){return this._countryContainerObject}get moreInfoButton(){return this._moreInfoButton}};(0,G.Cg)([(0,j.x4W)("learnMoreText"),(0,G.Sn)("design:type",j.EYj)],ol.prototype,"_learnMoreText",void 0),(0,G.Cg)([(0,j.x4W)("footerTextObject"),(0,G.Sn)("design:type",j.EYj)],ol.prototype,"_footerTextObject",void 0),(0,G.Cg)([(0,j.x4W)("countryContainerObject"),(0,G.Sn)("design:type",j._mx)],ol.prototype,"_countryContainerObject",void 0),(0,G.Cg)([(0,j.x4W)("moreInfoButton"),(0,G.Sn)("design:type",ic.$)],ol.prototype,"_moreInfoButton",void 0),ol=(0,G.Cg)([(0,j.EVk)("RegistrationChooseCountryPrefab")],ol);let hl=class extends j.uAl{constructor(){super(...arguments),this._countryTextObjects=[],this._toggleObject=null}get countryText(){return this._countryTextObjects[0].text}set countryText(k){for(let B=0;B(0,G.sH)(this,[k],void 0,(function*([k,B]){return B?(rl.removeSubdivisionsWithNoDefaultCurriculum(B),this._cachedCurriculumLocationInfos=B.data.curriculumOfferings.countries,this._cachedCurriculumLocationInfos.push({name:(0,Ba.k)("ACCOUNT_LOCATION_TITLE_OTHER"),id:"Other",defaultCurriculum:B.data.curriculumOfferings.defaultCurriculum,subdivisions:[]}),this._prefabComponent&&this.populateCountries(this._cachedCurriculumLocationInfos),Promise.resolve()):(j.VyI.log(`Failed to get curriculum country data - ${k.getErrorMessage()}`,j.$bb.Warning),Promise.reject(new Error("No curriculum country data")))})))).catch((()=>{this.game&&(K.q.instance.prodigy.audio.playSFX(46,"oops"),K.q.instance.prodigy.open.informationDialog(new bd.Z("PARENT_ATTACH_TRY_AGAIN",(()=>{this.continueBack()}),Jc.E.Small,500,"ERROR","ERROR_DIALOG_BODY",void 0,void 0,void 0,Ei.l.ErrorDialogHeader,Ei.l.ErrorDialogFooter)))}))}create(){super.create(),this.disableNext(),this._prefabComponent=this.loadFromPrefab(ol,cl.CHOOSE_COUNTRY_PREFAB_ID),this.changeTitle(this._localizer.getText("REGISTRATION_LOCATION_TITLE")),this.initializeAudio("whereYouLive","country"),this._prefabComponent.footerText.text=this._localizer.getText("REGISTRATION_WHY_NEED_INFO"),this._prefabComponent.learnMoreText.text=this._localizer.getText("REGISTRATION_LEARN_MORE"),this._prefabComponent.learnMoreText.drawUnderline(0,this._prefabComponent.learnMoreText.text.length),this._prefabComponent.moreInfoButton.onClick.add((()=>{K.q.instance.prodigy.open.informationDialog(new bd.Z("BUTTON_OKAY_CAPITAL",null,Jc.E.Small,500,"REGISTRATION_LOCATION_DIALOG_TITLE","REGISTRATION_LOCATION_DIALOG_BODY")),this.sendAnalytics("popup","information","location")})),this.hasCurriculumLocationInfos(this._cachedCurriculumLocationInfos)&&this.populateCountries(this._cachedCurriculumLocationInfos),this.setCharacter(!1),this.sendAnalytics("default_signup","country","home",Gh.l.EnterCountry)}populateCountries(k){const B=[],U=K.q.instance.prodigy.gameContainer.get("d0e-64fd"),F=this._prefabComponent.GameObject.findComponent(wd.O);for(let $=0;${K.q.instance.prodigy.audio.playSFX(18,"pop"),this.onCountrySelected(G.id)})),B.push(V),F.addSelectable(V.toggleObject),G.id===H&&(F.setItemSelected(V.toggleObject,!0),this.onCountrySelected(G.id))}const G=this._prefabComponent.countryContainerObject.findComponent(Hd.$).rootContainer;this.positionCountryTiles(B,G.width,G.height,cl.BUTTON_SPACING)}positionCountryTiles(k,B,U,F){if(k.length<=0)return void j.VyI.log("positionCountryTiles - no grades to position",j.$bb.Warning);const G=k[0].GameObject.findComponent(j.XVE),$=G.widthDelta+F,H=G.heightDelta+F,V=Math.min(Math.floor(B/$),k.length),W=Math.floor(.5*(B-V*$))+.5*F,q=Math.floor(.5*(U-Math.ceil(k.length/V)*H))+.5*F;for(let j=0;j0?(this._customInputData="showsub",delete this._data.curriculumTreeID):(this._customInputData="skipsub",this._data.curriculumTreeID=k.defaultCurriculum.id)}else delete this._data.selectedCountryId,delete this._data.curriculumTreeID}hasCurriculumLocationInfos(k){return k&&k.length>0}onCountrySelected(k){this._selectedCountryId=k,this.enableNext()}findCountryInfo(k,B){return B.find((B=>B.id===k))}static isScreenActive(k,B){if(j.Aq$.isDefined(B.selectedCountryId)&&j.Aq$.isDefined(B.curriculumTreeID))return!1;return!j.Aq$.isDefined(k.curriculumTreeID)}}cl.CHOOSE_COUNTRY_PREFAB_ID=67,cl.COUNTRY_BUTTON_PREFAB_ID=66,cl.BUTTON_SPACING=20;var dl=U(47716),ll=U(76501);let ul=class extends j.uAl{constructor(){super(...arguments),this._moreInfoButton=null}get moreInfoButton(){return this._moreInfoButton}};(0,G.Cg)([(0,j.x4W)("moreInfoButton"),(0,G.Sn)("design:type",ic.$)],ul.prototype,"_moreInfoButton",void 0),ul=(0,G.Cg)([(0,j.EVk)("RegistrationChooseSubPrefab")],ul);class fl extends Kd{constructor(){super(...arguments),this._prefabComponent=null,this._selectedCurriculumTreeId=-1,this._selectedSubName="",this._selectedSubLocation=null,this._selectedTextCallback=null}create(){super.create(),this.disableNext();const k=fl.findCountryInfo(this._data.selectedCountryId,this._data.curriculumLocationInfos);k.subdivisions.length>0?(this._prefabComponent=this.loadFromPrefab(ul,fl.CHOOSE_SUB_PREFAB_ID),this.changeTitle(k.name),"US"===k.id?this.initializeAudio("chooseState","sub-country"):this.initializeAudio("whereYouLive","sub-country"),this.sendAnalytics("default_signup","sub-country","home",Gh.l.EnterSubCountry),this._prefabComponent.moreInfoButton.onClick.add((()=>{this.onSubSelected(k.defaultCurriculum.id,"",null,!1),this.continueNext()})),this.populateRegions(k)):j.VyI.log("No sub data found.",j.$bb.Error),this.setCharacter(!1)}populateRegions(k){const B=K.q.instance.prodigy.gameContainer.get("d0e-64fd");this._scrollViewComponent=this.loadFromPrefab(dl.H,Ei.l.RegistrationScrollView),this._scrollViewComponent.GameObject.legacyTransform.group.addChild(this._scrollViewComponent.getCollisionBox()),this._scrollViewComponent.GameObject.legacyTransform.x=250,this._scrollViewComponent.GameObject.legacyTransform.y=210;let U=null;const F=[],G=k.subdivisions.sort(((k,B)=>{const U=k.name.toLowerCase(),F=B.name.toLowerCase();return UF?1:0}));let $="";for(let H=0;HB.loadFromGUID(Ei.l.RegistrationCell,null),this._scrollViewComponent._createSection=()=>B.loadFromGUID(Ei.l.RegistrationSection,null),U.data.length>1&&(this._scrollBarComponent=this.loadFromPrefab(sc.$,Ei.l.RegistrationScrollBar),this._scrollBarComponent._scrollView=this._scrollViewComponent,this._scrollBarComponent.GameObject.legacyTransform.group.addChild(this._scrollBarComponent.getCollisionBox()),this._scrollBarComponent.GameObject.legacyTransform.x=1015,this._scrollBarComponent.GameObject.legacyTransform.y=210,this._scrollViewComponent.verticalScrollBar=this._scrollBarComponent),this._scrollViewComponent.populateContentView()}saveToData(k){k?(this._data.curriculumTreeID=this._selectedCurriculumTreeId,this._data.selectedSubCountryName=this._selectedSubName):(delete this._data.curriculumTreeID,delete this._data.selectedSubCountryName)}onSubSelected(k,B,U,F=!0,G){F&&K.q.instance.prodigy.audio.playSFX(18,"pop"),this._selectedSubLocation&&this._selectedSubLocation!==U&&(this._selectedSubLocation.active=!1,this._selectedTextCallback()),this._selectedSubLocation=U,this._selectedTextCallback=G,this._selectedCurriculumTreeId=k,this._selectedSubName=B,this.enableNext()}static findCountryInfo(k,B){return null==B?void 0:B.find((B=>B.id===k))}static isScreenActive(k,B){if(j.Aq$.isDefined(B.selectedCountryId)&&j.Aq$.isDefined(B.curriculumTreeID))return!1;const U=j.Aq$.isDefined(k.curriculumTreeID),F=fl.findCountryInfo(B.selectedCountryId,B.curriculumLocationInfos);return(null==F?void 0:F.subdivisions.length)>0&&!U}close(){var k,B,U,F,G;super.close(),!1===(null===(k=null==this?void 0:this._prefabComponent.GameObject)||void 0===k?void 0:k.isDestroyed)&&this._prefabComponent.GameObject.destroy(),!1===(null===(U=null===(B=this._scrollViewComponent)||void 0===B?void 0:B.GameObject)||void 0===U?void 0:U.isDestroyed)&&this._scrollViewComponent.GameObject.destroy(),!1===(null===(G=null===(F=this._scrollBarComponent)||void 0===F?void 0:F.GameObject)||void 0===G?void 0:G.isDestroyed)&&this._scrollBarComponent.GameObject.destroy()}}fl.CHOOSE_SUB_PREFAB_ID=68;class bl extends Ka.W{constructor(k,B,U,F=!0,G=!1){super(k,B,200,{},[q._.General_icons_json,q._.Ui_bam_json,q._.Ui_buttons_json,q._.Ui_store_json,q._.Ui_card_json,q._.Ui_registration_json,q._.Ui_icons_json,q._.Ui_panels_json,Z.c.Sfx_store_equip,Z.c.Sfx_store_purchase,Rn.t.Tileset_collisions_png,Rn.t.Tileset_firefly_new_png,"map-forest-b8","map-pathing"]),this.prefabRoot=null,this._data={},this.headerPrefab=null,this._onEndCallback=U,this._createBackdrop=F;const $=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;j.Aq$.isDefined($.curriculumTreeID)&&j.Aq$.isDefined($.educationData.curriculumTreeID)?this._awaitingLocationPromise=Promise.resolve():this._awaitingLocationPromise=this.autoSelectCountryAndSubdivision(),this._data.soundHasBeenPlayed=[],this._data.showLoaderAtEndOfFlow=G,this._activePlayer=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player}create(){super.create(),this._awaitingLocationPromise.finally((()=>{this.initMenu()}))}initMenu(){if(this._createBackdrop){const k=new $d(K.q.instance.game,this.prefabRoot);this.prefabRoot[vh.E.ForegroundLayer]=K.q.instance.game.add.group(this.prefabRoot),this.prefabRoot[vh.E.BackgroundLayer]=K.q.instance.game.add.group(this.prefabRoot),k.render({mapName:"map-forest-b8"}),this.prefabRoot.addChild(k.above)}const k=K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromGUID(Ei.l.RegistrationHeader);this.headerPrefab=k.findComponentInChildren(Zd),this.prefabRoot.addChild(k.findComponent(Hd.$).rootContainer);const B=K.q.instance.prodigy.create.sprite(0,0,q._.Npc_face_noot_json,"face_0");B.scale.x=-1,this.headerPrefab.faceContainer.findComponent(Hd.$).rootContainer.addChild(B),this.headerPrefab.faceContainer.active=!1,this.createFlowTree(),this.flowTreeTraverser.currentNode.isNodeActive(this._activePlayer,this._data)?(this.flowTreeTraverser.currentNode.shouldHideLoader()&&window.hideGameLoader(),this.flowTreeTraverser.start()):this.getNextNode(),this.headerPrefab.onNext.add((()=>{this.flowTreeTraverser.setNodeAsVisited(this.flowTreeTraverser.currentNode),this.setupDataAndGetNextNode()}),this),this.headerPrefab.onBack.add(this.getPrevNode,this),this.headerPrefab.onDone.add(this.setupDataAndGetNextNode,this),this.metricsManager.sendOnboardingFunnelEvent(Gh.l.SignIn),Pt.pF.isDeprecatedIOS()&&K.q.instance.prodigy.open.informationDialog(Pt.pF.PERFORMANCE_WARNING_CONFIG)}createFlowTree(){const k=j.Aq$.isDefined(this._activePlayer.curriculumTreeID),B=this._activePlayer.hasGrade,U=this._activePlayer.classIDs.length>0;let F=null;const G=this.createTreeNode(tl,"success",tl.isScreenActive,!1);if(U&&B&&k)F=G;else{const U=[this.createTreeNode(Yd,"classCode",Yd.isScreenActive,!0),this.createTreeNode(cl,"country",cl.isScreenActive,!0),this.createTreeNode(fl,"subdivision",fl.isScreenActive,!0),this.createTreeNode(al,"grade",al.isScreenActive,!0),G];!B&&k&&(this._data.curriculumTreeID=this._activePlayer.curriculumTreeID),U.forEach(((k,B)=>{BK.q.instance.prodigy.open.registration(k,this._data,this.headerPrefab)),B,U,F)}getNextNode(){this.flowTreeTraverser.getNextChildNode()?this.flowTreeTraverser.getNextChildNode().isNodeActive(this._activePlayer,this._data)?(this.flowTreeTraverser.nextNode(),this.toggleBackVisibility(this.flowTreeTraverser.visitedNodes.length>=1),this.flowTreeTraverser.currentNode.shouldHideLoader()&&window.hideGameLoader()):(this.flowTreeTraverser.currentNode=this.flowTreeTraverser.getNextChildNode(),this.getNextNode()):this.endFlow()}getPrevNode(){this.toggleBackVisibility(this.flowTreeTraverser.visitedNodes.length>1),this.flowTreeTraverser.prevNode()||this.endFlow()}toggleBackVisibility(k){this.headerPrefab.backButton.GameObject.active=k}endFlow(){if(this.headerPrefab.onNext.removeAll(),this.headerPrefab.onBack.removeAll(),this.headerPrefab.onDone.removeAll(),this._onEndCallback){const k=j.Aq$.isDefined(this._data.loginState)?this._data.loginState:0,B={username:this._data.username,password:this._data.password};1===k&&this.metricsManager.sendOnboardingFunnelEvent(Gh.l.FirstLogin),this._onEndCallback(k,B)}this.close()}autoSelectCountryAndSubdivision(){return(0,G.sH)(this,void 0,void 0,(function*(){var k,B,U,F;try{const G=K.q.instance.prodigy.gameContainer.get("fab-547a"),[,$]=yield G.getData(),[,H]=yield rl.fetchAvailableCurriculumCountries();rl.removeSubdivisionsWithNoDefaultCurriculum(H);const V=null===(B=null===(k=null==H?void 0:H.data)||void 0===k?void 0:k.curriculumOfferings)||void 0===B?void 0:B.countries.find((k=>k.id===$.country.iso_code));let W=null,q=null;if((null==$?void 0:$.subdivisions)&&(null==V?void 0:V.subdivisions))for(const k of $.subdivisions){const B=V.subdivisions.find((B=>B.name===k.name));if(W=null==B?void 0:B.defaultCurriculum.id,q=null==B?void 0:B.name,W)break}this._data.selectedCountryId=(null==V?void 0:V.id)||"Other",this._data.curriculumTreeID=W||(null===(U=null==V?void 0:V.defaultCurriculum)||void 0===U?void 0:U.id)||(null===(F=null==H?void 0:H.data)||void 0===F?void 0:F.curriculumOfferings.defaultCurriculum.id),this._data.selectedSubCountryName=q||"";const z=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!Yd.isScreenActive(z,this._data)){const k=K.q.instance.prodigy.gameContainer.get("c97-bd0d");z.educationData.curriculumTreeID=this._data.curriculumTreeID,z.curriculumTreeID=this._data.curriculumTreeID;const B=(k,B)=>{Tn.J.logSetCurriculumFailed()};yield k.setCurriculum({curriculumTreeID:this._data.curriculumTreeID},void 0,B).catch(j.RQr.createHandler("Error setting curriculum"))}}catch(G){j.VyI.log("Error sending first login event",j.$bb.Error)}}))}setupDataAndGetNextNode(){if(this.flowTreeTraverser.getNextChildNode())return this._data.skipNextRequery||this.flowTreeTraverser.getNextChildNode().shouldSkipRequery()?(this._data.skipNextRequery=!1,void this.getNextNode()):void this.setupEducationData().catch((k=>{var B;null===(B=K.q.instance.prodigy.game.state.getCurrentState())||void 0===B||B.onError(k)}));this.endFlow()}setupEducationData(){return(0,G.sH)(this,void 0,void 0,(function*(){try{const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=K.q.instance.prodigy.gameContainer.get("c97-bd0d"),U=yield j.Egh.autoRetry((()=>(0,G.sH)(this,void 0,void 0,(function*(){return B.getCurriculumAndGrade(k)})))),F=Object.assign(Object.assign({},U),{goalId:k.goalId});k.onEducationLoaded(F),this.getNextNode()}catch(e){throw Vd.S.makeLoadSkillsError(e)}}))}close(){this._data.soundHasBeenPlayed=[],this.prefabRoot.destroy(),this.headerPrefab.destroy(),super.close()}}var pl=U(62248);var vl,gl=U(64868),ml=U(43858);!function(k){k.V1="shop_v1_",k.V2="shop_v2_",k.V3="shop_v3_"}(vl||(vl={}));var yl=U(59701),_l=U(45385),El=U(21644),wl=U(88131),Tl=U(90744),Sl=U(10471);class Al extends Ka.W{constructor(k,B,U,F,G){super(k,B,70,{},[q._.Ui_store_json,q._.Ui_card_json,q._.Ui_buttons_json,q._.Ui_raster_icons_json,Z.c.Sfx_store_equip,Z.c.Sfx_store_purchase,Z.c.Sfx_button_disabled_state,Z.c.Sfx_tab_click,q._.Ui_raster_icons_json].concat(null!=F?F:[])),this._closeCallback=null,this.onItemPurchased=new j.HN0,this.storeData=null,this.storeID=-1,this.petPurchaseLevel=1,this._isPurchaseInProgress=!1,this.game=k,this.storeID=U,this._closeCallback=G,this.isFullScreenUI=!0}getStore(){return this.storeData}buyItem(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._isPurchaseInProgress)return wl.Q.success(!1);const B=le.t.getItem(k.getType(),k.getID()),U=k.getCost()[0],F=this.storeData.getName(),G=K.q.instance.prodigy.gameContainer.get("c47-20b6");let $=B;G.shop.sendShopPurchaseCompletedEvent(vl.V2,this.storeData,k);const H=`${vl.V2}${this.storeData.getName()}`,V={sink_id:H,sink_type:gn.C.Shop,instance_type:Ai.N.Interface,instance_id:G.featureCommon.getCurrentInterfaceID(H)};try{if(this._isPurchaseInProgress=!0,yield this._paymentManager.spend({currency:U.getID(),value:U.getAmount(),type:U.getType()},"store",V),j.Aq$.isDefined(B.data)?$=B.data:"pet"===k.getType()&&($={ID:k.getID()}),j.Aq$.isDefined(B.data)&&"pet"===k.getType()){const B=new fa.R(this.game,{ID:k.getID()}).getMaxHearts(this.petPurchaseLevel);$=Object.assign(Object.assign({},$),{hp:B})}Tn.J.bagItem({ID:k.getID(),type:k.getType(),N:1,data:$},this.game,"store",F,{source_type:gn.C.Shop,instance_type:Ai.N.Interface,instance_id:G.featureCommon.getCurrentInterfaceID(H)}),this.sendBuyAnalytics(k,B,U),Sl.B.includes(U.getID())&&this.sendSecureCurrencySpendAnalytics(U,V).catch(j.RQr.createHandler("Error sending secure item spend analytics")),this.onItemPurchased.dispatch(k)}catch(e){return wl.Q.error(e)}finally{this._isPurchaseInProgress=!1}return wl.Q.success(!0)}))}sendBuyAnalytics(k,B,U){const F=j.Aq$.isDefined(B.member)&&1===B.member,G=K.q.instance.prodigy.gameContainer,$=G.get("e20-0fb0").player;if(F&&!$.hasMembership()){let B={};"pet"===k.getType()&&$.kennel.isFull()||(B={conversionFunnelName:Sn.o.FunnelBuyMemberItem,conversionFunnelMetadata:`${k.getType()}-${k.getID()}`});const U=yn.P.shouldUseUnifiedConversionFlow(Sn.o.FunnelBuyMemberItem)?_n.R.UnifiedConversionFlow:Tn.J.showYouTubeMembershipAd(this.game,!0)?_n.R.Video:_n.R.Static;G.get("c47-20b6").purchase.sendFunnelStart({type:"Store-Buy-Member-Item",category:"Store",contentId:`${k.getType()}-${k.getID()}`,adType:U,adVersion:yn.P.getAdVersion(Sn.o.FunnelBuyMemberItem)})}}sendSecureCurrencySpendAnalytics(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U,F;const G=yield le.t.secureGetItem(k.getType(),k.getID());this._segment.item.sendItemRemovedEvent(k.getID(),null!==(F=null===(U=null==G?void 0:G.data)||void 0===U?void 0:U.name)&&void 0!==F?F:"unknown",k.getType(),k.getAmount(),B)}))}close(){this._closeCallback&&this._closeCallback(),super.close()}destroy(){this.onItemPurchased.dispose(),super.destroy()}}(0,G.Cg)([(0,Re.b)("743-fd51"),(0,G.Sn)("design:type",Tl.E)],Al.prototype,"_paymentManager",void 0);var Cl=U(63811);let Ol=class extends j.uAl{initializeComponents(k){this.categoryTabs=[this.categoryTab0,this.categoryTab1,this.categoryTab2,this.categoryTab3,this.categoryTab4,this.categoryTab5,this.categoryTab6];for(let B=0;B{K.q.instance.prodigy.audio.playSFX(18,"pop"),B()})),this._prefabComponent.currencyIconContainer.addComponent(Eo._).setAsset(Ut.E.getIconForType("currency",this.currencyData.ID)).catch(j.RQr.createHandler("Unable to load currency icon for store")),this.updatePlayerCurrency()}updatePlayerCurrency(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;1===this.currencyData.ID?this._prefabComponent.currencyAmount.text=k.getGold().toLocaleString("en-US").replace(/,/g," "):this._prefabComponent.currencyAmount.text=k.backpack.hasItem(this.currencyData.type,this.currencyData.ID).toLocaleString("en-US").replace(/,/g," ")}}class Dl extends Al{constructor(k,B,U,F,G,j){super(k,B,U,[q._.Ui_panels_json],F),this._categories=[],this._currentCategory=0,this._currentPaginationIndex=0,this._categoryPageCount=0,this._merchantDataOverride={},this._sortedPageItems={},this._storePrefabID=null!=G?G:Ei.l.Store,this._overrideInterfaceOpened=null!=j?j:{},this._activePlayer=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player}create(){super.create(),this._hardCurrencyDataProvider=K.q.instance.prodigy.gameContainer.get("5c7-e02d"),this._localizer=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),this._activePlayer.onEquipmentChange.add(this.onEquipmentChanged,this);K.q.instance.prodigy.gameContainer.get("a50-726e").getStore(this.storeID).then((([k,B])=>{k?this.onGetStoreFailure(k):this.onGetStoreSuccess(B)})).catch(j.RQr.createHandler("Unable to load store data"))}onGetStoreSuccess(k){if(j.Aq$.isDefined(this.game)){this.storeData=k,this._categories=this.storeData.getPages();for(const k of this._categories)for(const B of k.getStoreItems()){const k=B.getCost()[0],U=this.getItemData(B);this.applyCostOverrides(U,k)}this.loadFromPrefab()}}onGetStoreFailure(k){j.VyI.log(`Store with ID: ${this.storeID} could not be loaded - ${k.getErrorMessage()}`,j.$bb.Warning),K.q.instance.prodigy.open.message(this._localizer.getText("STORE_OPEN_FAILED_MESSAGE"),this.close.bind(this),null,this._localizer.getText("STORE_OPEN_FAILED_TITLE"))}loadFromPrefab(){const k=new j._mx;k.addComponent(_r.B).getRootContainer().setParent(this);let B=this.storeData.getName();switch(this.storeID){case 62:B="Winterfest Shop";break;case 63:B="Fox Faction";break;case 64:B="Bunny Faction"}if(19===this.storeID&&K.q.instance.prodigy.skin.isFestivalActive("Summerfest")){const k=new mt;k.setAssetFrame("face_3"),k.setAssetTag(q._.Npc_face_merchant_json),k.setPosition(80,160),this.storeData.setMerchantAvatar(k)}k.addComponent(j.bE_).Container.bind(tr.n7.StoreName).toConstantValue(B);K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(this._storePrefabID,k).then((k=>{this._prefab=k,this._prefabComponent=this._prefab.findComponentInChildren(Ol),this._prefabComponent.initializeComponents(this);const B=this.storeData.getName();this.currentInterfaceName=vl.V2+B,this._prefabComponent.sideBar&&(this._prefabComponent.sideBar.shopInterfaceName=this.currentInterfaceName,this._prefabComponent.sideBar.shopId=this.storeID),El.ju.map((k=>(0,El.Bi)(El.p1[k]))).includes(this.storeID)&&(this._prefabComponent.storeName.active=!1,this._prefabComponent.unifiedStoreButtonContainer.active=!0),this._topBar=new Il(this.game,this._prefabComponent),this.initializeStore(),this.setupViewMoreStoresButton()})).catch(j.RQr.createHandler("Unable to load store prefab"))}setupViewMoreStoresButton(){var k;const B=this._activePlayer.getPlayerData().unifiedStore;B&&B.viewMoreStoresButtonClicks<3&&B.viewMoreStoresButtonViews<5?(this._prefabComponent.viewMoreStoresButton.onClick.addOnce((()=>{this._activePlayer.data.unifiedStore.viewMoreStoresButtonClicks++,this._activePlayer.forceSaveCharacter()})),null===(k=this._prefabComponent.spineAnimation.findComponentInChildren(Ir.j))||void 0===k||k.playAnimation("sparkle",!0),this._activePlayer.data.unifiedStore.viewMoreStoresButtonViews++,this._activePlayer.forceSaveCharacter()):this._prefabComponent.spineAnimation.active=!1,this._prefabComponent.viewMoreStoresButton.onClick.addOnce((()=>{this.fireButtonEvent({interfaceName:this.currentInterfaceName,interfaceType:bi.Wm.Menu,buttonName:jh.k.ViewMoreStores,saveClickInfo:jh.k.ViewMoreStores}),this.fireInterfaceEvent({interfaceName:ph.B.UnifiedStoreBase,interfaceType:bi.Wm.Menu,originType:bi.$N.ButtonClick,originID:jh.k.ViewMoreStores})}),this)}setMerchant(k){k&&(this._merchantDataOverride=k)}initializeStore(){var k;this._topBar.initialize({ID:this.storeData.getStoreCurrencyID(),type:this.storeData.getStoreCurrencyType()},this.close.bind(this)),this._currentClickedItemCards=[],this.initializeCategoryTabs(),this.setupPaginationCallbacks(),this.refreshItemDisplay(),this.setMerchant(),this.onItemPurchased.add((k=>{this._topBar.updatePlayerCurrency(),this._prefabComponent.sideBar.renderBottomPanel(),this._prefabComponent.sideBar.renderButtons();const B=this._selectedCard.GameObject.parent.findComponent(ml.j),U=this.generateItemCardData(k);B.setItemData(U),B.updateDisplay()})),this._segment.featureCommon.sendInterfaceEvent(Object.assign({interfaceName:`${vl.V2}${this.storeData.getName()}`,interfaceType:bi.Wm.Menu,originType:null!==(k=this._overrideInterfaceOpened.originType)&&void 0!==k?k:bi.$N.NpcClick},this._overrideInterfaceOpened))}generateItemCardData(k){const B=this.getItemData(k),U=k.getCost()[0];return{item:B,currencyAmount:U.getAmount(),currencyID:U.getID()}}applyCostOverrides(k,B){if(k.data.dynamicStoreBaseCost){const U=k.data.dynamicStoreBaseCost;return B.setType("currency"),B.setID(U.currencyId),void B.setAmount(U.amount)}if("pet"===k.type){const U=this._hardCurrencyDataProvider.petAcquisitionCost(k.ID,pl.l6.Rescue);if(U)return B.setType("currency"),B.setID(U.currency),void B.setAmount(U.value)}}refreshItemDisplay(){this.refreshPagination(),this.getItemsForPage(this._currentPaginationIndex)}initializeCategoryTabs(){let k=0;for(let B=0;B{this._currentCategory!==B&&(K.q.instance.prodigy.audio.playSFX(50,"pop"),this._currentCategory=B,this.refreshItemDisplay(),this._prefabComponent.sideBar.setToDefaultState(),this.game.broadcaster.broadcast(oi.iZ.ToolTipClosed))}));const G=F.findComponentsInChildren(j.EYj),$=F.findComponentInChildren(_l.e);for(let k=0;k0&&this._prefabComponent.categoryFill.transform.setPositionY((this._categories.length+1-k)*this._prefabComponent.categoryTabs[0].transform.rectTransformDimensions.height+5)}hasNewItems(k){var B;const U=(null===(B=this._activePlayer.data.lastStoreVisitLevels)||void 0===B?void 0:B[this.storeID])||1,F=this._activePlayer.getLevel();for(let G=0;GU&&j>U&&j<=F&&-1===this._currentClickedItemCards.indexOf($))return!0}return!1}setupPaginationCallbacks(){this._prefabComponent.nextButton.onClick.add((()=>{K.q.instance.prodigy.audio.playSFX(18,"pop"),this._prefabComponent.backButton.inputEnabled=!0,this._prefabComponent.backButton.currentState=2,this._prefabComponent.backButtonDisabled.active=!1,this._currentPaginationIndex+=1,this._currentPaginationIndex+1>=this._categoryPageCount&&(this._prefabComponent.nextButton.inputEnabled=!1,this._prefabComponent.nextButtonDisabled.active=!0),this._prefabComponent.pageNumber.text=this._localizer.getText("PAGE_NUMBER",this._currentPaginationIndex+1,this._categoryPageCount),this.getItemsForPage(this._currentPaginationIndex),this._prefabComponent.sideBar.setToDefaultState(),this.game.broadcaster.broadcast(oi.iZ.ToolTipClosed),this.updatePaginationBadges()})),this._prefabComponent.backButton.onClick.add((()=>{K.q.instance.prodigy.audio.playSFX(18,"pop"),this._prefabComponent.nextButton.inputEnabled=!0,this._prefabComponent.nextButton.currentState=2,this._prefabComponent.nextButtonDisabled.active=!1,this._currentPaginationIndex-=1,this._currentPaginationIndex-1<0&&(this._prefabComponent.backButton.inputEnabled=!1,this._prefabComponent.backButtonDisabled.active=!0),this._prefabComponent.pageNumber.text=this._localizer.getText("PAGE_NUMBER",this._currentPaginationIndex+1,this._categoryPageCount),this.getItemsForPage(this._currentPaginationIndex),this._prefabComponent.sideBar.setToDefaultState(),this.game.broadcaster.broadcast(oi.iZ.ToolTipClosed),this.updatePaginationBadges()}))}refreshPagination(){this._currentPaginationIndex=0,this._categoryPageCount=Math.ceil(this._categories[this._currentCategory].getStoreItems().length/Dl.NUM_ITEMS_PER_PAGE),this._prefabComponent.backButton.inputEnabled=!1,this._prefabComponent.backButtonDisabled.active=!0;const k=this._prefabComponent.nextButton.GameObject.findComponentInChildren(_l.e);this._prefabComponent.backButton.GameObject.findComponentInChildren(_l.e).setActive(!1),k.setActive(!1),1===this._categoryPageCount?(this._prefabComponent.nextButton.inputEnabled=!1,this._prefabComponent.nextButtonDisabled.active=!0):(this._prefabComponent.nextButton.inputEnabled=!0,this._prefabComponent.nextButton.currentState=2,this._prefabComponent.nextButtonDisabled.active=!1),this._prefabComponent.pageNumber.text=this._localizer.getText("PAGE_NUMBER",1,this._categoryPageCount),this.updatePaginationBadges()}updatePaginationBadges(){this.setupSortedPageItems();const k=Math.max(0,(this._currentPaginationIndex-1)*Dl.NUM_ITEMS_PER_PAGE),B=Math.min(this._sortedPageItems[this._currentCategory].length,this._currentPaginationIndex*Dl.NUM_ITEMS_PER_PAGE),U=Math.max(0,(this._currentPaginationIndex+1)*Dl.NUM_ITEMS_PER_PAGE),F=Math.min(this._sortedPageItems[this._currentCategory].length,(this._currentPaginationIndex+2)*Dl.NUM_ITEMS_PER_PAGE),G=this._sortedPageItems[this._currentCategory].slice(k,B),j=this._sortedPageItems[this._currentCategory].slice(U,F),$=this._prefabComponent.nextButton.GameObject.findComponentInChildren(_l.e);this._prefabComponent.backButton.GameObject.findComponentInChildren(_l.e).setActive(this.hasNewItems(G)),$.setActive(this.hasNewItems(j))}setupSortedPageItems(){if(!this._sortedPageItems[this._currentCategory]){const k=this._categories[this._currentCategory].getStoreItems();this._sortedPageItems[this._currentCategory]=$.orderBy(k,[k=>yl.W.isItemOwned(this._activePlayer,{ID:k.getID(),type:k.getType()})?1:0,k=>this.getItemData(k).data.lockLevel,k=>k.getCost()[0].getID(),k=>k.getCost()[0].getAmount(),k=>this.getItemData(k).data.ID],["asc","asc","asc","asc","asc"])}}getItemsForPage(k){for(const F of $.clone(this._prefabComponent.cardPanel.children))F.destroy();this._selectedCard=null;const B=this._activePlayer.getGearBattleStats();this.setupSortedPageItems();const U=K.q.instance.prodigy.gameContainer.get("d0e-64fd");for(let F=k*Dl.NUM_ITEMS_PER_PAGE;F{var k;this._selectedCard&&(this._selectedCard.setSelected(!1),this._selectedCard.inputEnabled=!0,this._selectedCard.GameObject.findComponentInParent(ml.j).animateArrow(!1)),$.animateArrow(!0),$.setNewBadge(!1);const B=$.getItem().ID;-1===this._currentClickedItemCards.indexOf(B)&&this._currentClickedItemCards.push(B),this._selectedCard=H,H.inputEnabled=!1;const U=this.getItemData(G),F=G.getCost()[0];this._prefabComponent.sideBar.renderSelectedItem({type:G.getType(),id:G.getID(),cost:{type:F.getType(),ID:F.getID(),N:F.getAmount()},member:null===(k=U.data)||void 0===k?void 0:k.member},this.buyItem.bind(this,G)),this._segment.shop.sendShopItemViewedEvent(vl.V2,this.storeData,G),this._prefabComponent.sideBar.onEquipItem.removeAll(this),this._prefabComponent.sideBar.onPurchaseFailure.removeAll(this),this._prefabComponent.sideBar.onEquipItem.add((k=>{this._segment.featureCommon.sendButtonEvent({buttonName:k.member?jh.k.EquipMemberItem:jh.k.EquipItem,destinationName:"equip-shop-item",interfaceType:bi.Wm.Shop,interfaceName:`${this.storeID}`,elementType:G.getType(),elementID:`${G.getID()}`})}),this),this._prefabComponent.sideBar.onPurchaseFailure.add(((k,B)=>{this._segment.shop.sendShopPurchaseFailedEvent(vl.V2,this.storeData,G,B)}),this),this._prefabComponent.sideBar.onPurchaseSuccess.add((k=>{this._segment.featureCommon.sendButtonEvent({buttonName:jh.k.BuyItem,destinationName:"buy-shop-item",interfaceType:bi.Wm.Shop,interfaceName:`${this.storeID}`,elementType:G.getType(),elementID:`${G.getID()}`})}),this),this.game.broadcaster.broadcast(oi.iZ.ToolTipClosed)}));const V=this.generateItemCardData(G);$.setItemData(V),$.setPlayerGearStats(B),$.updateDisplay()}}getItemData(k){return le.t.getItem(k.getType(),k.getID())}shouldCloseAllOpenMenus(k=!1){var B;return null!==(B=K.q.instance.prodigy.world.getCurrentZone()!==hn.A_.TOWERTOWN&&K.q.instance.prodigy.world.getCurrentZone()!==hn.A_.CRYSTALCAVERNS&&!k)&&void 0!==B&&B}onEquipmentChanged(){const k=this._activePlayer.getGearBattleStats();for(const B of this._prefabComponent.cardPanel.children)B.findComponent(ml.j).setPlayerGearStats(k,!0)}close(k=!1){var B,U;const F=this.storeData.getName();this.shouldCloseAllOpenMenus(k)&&K.q.instance.prodigy.open.menuCloseAll(),this._segment.featureCommon.sendInterfaceEvent({interfaceName:`${vl.V2}${F}`,interfaceType:bi.Wm.Menu,closeMethod:bi.Lv.CloseButton}),null!==(B=(U=this._activePlayer.data).lastStoreVisitLevels)&&void 0!==B||(U.lastStoreVisitLevels={}),this._activePlayer.data.lastStoreVisitLevels[this.storeID]=this._activePlayer.getLevel(),this._activePlayer.forceSaveCharacter(),super.close()}destroy(){this._prefab&&this._prefab.destroy(),this._prefab=null,this._prefabComponent=null,this._topBar=null,this._activePlayer.onEquipmentChange.removeAll(this),this.storeData=null,this._categories=[],this._selectedCard=null,this._localizer=null,this._hardCurrencyDataProvider=null,this._sortedPageItems={},this._currentClickedItemCards.length=0,super.destroy()}}Dl.NUM_ITEMS_PER_PAGE=6,Dl.NUM_ITEMS_PER_ROW=3,Dl.ITEM_CARDS_OFFSET=215,Dl.ITEM_ROW_OFFSET=255;var Rl=U(83142),Pl=U(95429);class Ml extends Ka.W{get onCloseClicked(){return this._onCloseClicked}constructor(k,B,U,F){super(k,B,200,null),this._ui=null,this._onCloseClicked=new j.HN0,this._menuComponent=null,this._components=[],this._callToAction=U,this._videoConfig=F}create(){var k;super.create();const B=K.q.instance.prodigy.gameContainer.get("d0e-64fd");this._ui=B.load(null!==(k=this._videoConfig.videoPrefabID)&&void 0!==k?k:121,K.q.instance.prodigy.open.menusGameObject),this._components=this._ui.findComponentsInChildren(Rl.D,!0),this._components.forEach((k=>{k.loadVideoConfig(this._videoConfig)})),this._menuComponent=this._ui.findComponent(Pl.k),this._menuComponent.closeButton.onClick.addOnce((()=>{K.q.instance.prodigy.audio.playSFX(18,"pop"),this._onCloseClicked.dispatch(),this.close()})),this._callToAction?this._menuComponent.callToActionButton.onClick.addOnce((()=>{K.q.instance.prodigy.audio.playSFX(18,"pop"),this._callToAction(),this.close()})):this._menuComponent.callToActionButton.GameObject.active=!1}setActive(k){super.setActive(k),this._menuComponent.videoPlayer.setVisible(k)}destroy(){this._menuComponent.destroy(),this._ui.destroy(),this._onCloseClicked.dispose(),super.destroy()}getPlayer(){return this._menuComponent}}class Nl extends Hh.a{constructor(k,B,U,F){super(k,B,0,0,K.q.instance.prodigy.textureMenu),this.content=null,this.nameText=null,this.bar=null,this.closeBtn=null,this.btns=null,this.selectedBtn=null,this.names=[],this.content=K.q.instance.prodigy.create.element(this),this.onClose=F,this.page=0,U?this.create():this.createAdvanced()}selectNamesList(){this.names=tc.f.getFilteredFirstNames()}create(){this.selectNamesList(),this.addTransparent();const k=K.q.instance.prodigy.create.element(this.background,320,150),B=K.q.instance.prodigy.create.element(k,0,0);K.q.instance.prodigy.create.panel(B,0,0,16,10,"shine"),B.add(new Pr.C(this.game,11,80,618,40,q._.Tiled_sprites_json,"blue-top")),B.add(new Pr.C(this.game,11,120,618,200,q._.Tiled_sprites_json,"blue-mid")),B.add(new Pr.C(this.game,11,320,618,40,q._.Tiled_sprites_json,"blue-top2"));const U=K.q.instance.prodigy.create.panel(B,40,-20,14,2,"banner");super.create(),this.nameText=K.q.instance.prodigy.create.font(this,k.x+U.x,k.y+U.y+15,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NAME_CHANGE_NAME_WIZARD"),{width:U.width,align:"center",size:36,fontID:9}),this.bar=K.q.instance.prodigy.create.slider(this,k.x+30,k.y+80+20,240,!0,!0),this.closeBtn=K.q.instance.prodigy.create.textButton(this,490,k.y+400-25,{text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NAME_CHANGE_BUTTON_DONE"),icon:"yes",size:fo.MED},(()=>{this.close()})),this.closeBtn.setInactive(),this.content=K.q.instance.prodigy.create.element(this,this.bar.x+70,this.bar.y),this.btns=[];for(let F=0;F<12;F++){const k=K.q.instance.prodigy.create.panel(this.content,F%2*260,40*Math.floor(F/2),6,1,"lb");k.text=K.q.instance.prodigy.create.font(k,0,5,"",{width:240,align:"center",size:20}),k.setClickable(this.setName.bind(this,F),null,this.onNameOver.bind(this,k),this.onNameOut.bind(this,k)),this.btns.push(k)}this.bar.reset(Math.ceil(this.names.length/12),1,0,(k=>{this.setPage(k)}))}setPage(k){this.setName(null),j.Aq$.isDefined(this.selectedBtn)&&this.selectedBtn.changePanel("lb"),this.selectedBtn=null,this.page=k;for(let B=0;B<12;B++){const U=this.btns[B];12*k+B>=this.names.length?U.visible=!1:(U.text.setText(this.names[12*k+B].data.value),U.visible=!0)}}setName(k){if(j.Aq$.isDefined(k)){this.onNameDown(k);const B=this.btns[k],U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;U.appearance.getName().setFirstName(this.names[12*this.page+k].ID),U.appearance.updated=!0,this.nameText.setText(B.text.text),this.closeBtn.setActive()}else this.nameText.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NAME_CHANGE_NAME_WIZARD")),this.closeBtn.setInactive()}createAdvanced(){this.addTransparent();const k=K.q.instance.prodigy.create.element(this.background,320,150),B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=K.q.instance.prodigy.create.element(k,0,0);K.q.instance.prodigy.create.panel(U,0,0,16,10,"shine"),U.add(new Pr.C(this.game,11,80,618,40,q._.Tiled_sprites_json,"blue-top")),U.add(new Pr.C(this.game,11,120,618,200,q._.Tiled_sprites_json,"blue-mid")),U.add(new Pr.C(this.game,11,320,618,40,q._.Tiled_sprites_json,"blue-top2"));const F=K.q.instance.prodigy.create.panel(U,40,-20,14,2,"banner");super.create();const G=B.getFirstName();this.nameText=K.q.instance.prodigy.create.font(this,k.x+F.x,k.y+F.y+18,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NAME_CHANGE_CHOOSE_TITLE"),{width:F.width,align:"center",size:30}),this.closeBtn=K.q.instance.prodigy.create.textButton(this,490,k.y+400-25,{text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NAME_CHANGE_BUTTON_DONE"),icon:"yes",size:fo.MED},(()=>{this.close()})),this.closeBtn.setInactive(),this.content=K.q.instance.prodigy.create.element(this,k.x+120,k.y+80+20),this.btns=[];for(let j=0;j<6;j++){const k=K.q.instance.prodigy.create.panel(this.content,0,40*j,12,1,"lb");k.text=K.q.instance.prodigy.create.font(k,0,5,"",{width:480,align:"center",size:20}),k.setClickable(this.setLongName.bind(this,j),null,this.onNameOver.bind(this,k),this.onNameOut.bind(this,k)),this.btns.push(k)}K.q.instance.prodigy.create.button(this,k.x+30,k.y+80+20,q._.General_icons_json,"dice",(()=>{this.randomNames(G)})),this.randomNames(G)}randomNames(k){this.setName(null),j.Aq$.isDefined(this.selectedBtn)&&this.selectedBtn.changePanel("lb"),this.selectedBtn=null;const B=[];let U=0;this.names=[];for(let F=0;F<6;F++)do{const G=$.sample(le.t.getItemsWithFilter("name",(k=>1===k.data.type))),j=$.sample(le.t.getItemsWithFilter("name",(k=>2===k.data.type))),H=$.capitalize(`${G.data.value}${j.data.value}`);this.btns[F].text.setText(`${k} ${H}`),B.indexOf(H)<0&&(B.push(H),this.names.push({middle:G.ID,last:j.ID}),++U)}while(U===F)}setLongName(k){this.onNameDown(k);const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;B.appearance.getName().setMiddleName(this.names[k].middle),B.appearance.getName().setLastName(this.names[k].last),B.appearance.updated=!0,this.nameText.setText(this.btns[k].text.text),this.closeBtn.setActive()}onNameDown(k){j.Aq$.isDefined(this.selectedBtn)&&this.selectedBtn.changePanel("lb"),this.selectedBtn=this.btns[k],this.btns[k].changePanel("lb-green")}onNameOver(k){k.changePanel("lb-green")}onNameOut(k){k!==this.selectedBtn&&k.changePanel("lb")}}class xl extends Nl{constructor(k,B,U,F){super(k,B,U,F),this.previousPlayerName=null;const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.previousPlayerName=G.appearance.getName(),this.setPage(0)}create(){super.create(),K.q.instance.prodigy.create.button(this,930,140,q._.General_icons_json,"close",(()=>{this.closeMenuWithoutSettingName()}))}selectNamesList(){this.names=tc.f.getFilteredFirstNames()}closeMenuWithoutSettingName(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.onClose=null,k.appearance.setName(this.previousPlayerName),this.close()}}var Ll,kl=U(51894),Bl=U(35084),Ul=U(63746);!function(k){k.BackpackCostumesTab="costumes",k.WizardCostumesMenuBackpackTab="backpack"}(Ll||(Ll={}));class Fl extends Hh.a{constructor(k,B,U){super(k,B,0,0,K.q.instance.prodigy.textureMenu),this.player=null,this.content=null,this.bar=null,this._playerContainer=null,this.equip=null,this.itemType=null,this.owned=[],this._pageSize=6,this._itemCards=Array(this._pageSize).fill(new j._mx),this._itemCardsCreatedCount=0,this._buttons=[],this._segment=K.q.instance.prodigy.gameContainer.get("c47-20b6"),this.player=U,this.currentInterfaceName=ph.B.Backpack,this.create(),this.cullable=!0}create(){this.addTransparent(),this.content=K.q.instance.prodigy.create.element(this,560,200);const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this._buttons=[{type:"hat",icon:{type:"hat",ID:5},bot:k.getText("BACKPACK_BUTTON_HATS")},{type:"outfit",icon:{type:"outfit",ID:1},bot:k.getText("BACKPACK_BUTTON_OUTFITS")},{type:"weapon",icon:{type:"weapon",ID:1},bot:k.getText("BACKPACK_BUTTON_WANDS")},{type:"spellRelic",icon:{type:"spellRelic",ID:13},bot:k.getText("BACKPACK_BUTTON_RELICS")},{type:"boots",icon:{type:"boots",ID:7},bot:k.getText("BACKPACK_BUTTON_BOOTS")},{type:"follow",icon:{type:"follow",ID:2},bot:k.getText("BACKPACK_BUTTON_BUDDIES")},{type:"item",icon:{type:"item",ID:5},bot:k.getText("BACKPACK_BUTTON_ITEMS")},{type:"currency",icon:{type:"item",ID:26},bot:k.getText("BACKPACK_BUTTON_CURRENCY")},{type:"mount",icon:{type:"mount",ID:1},bot:k.getText("BACKPACK_BUTTON_MOUNT")}];const B={buttons:{offset:{x:-150,y:0},iconOffset:{x:0,y:0}},banner:{frameName:"banner",atlasID:0,width:29},closeButton:void 0};let U=0;(0,Dt.G)(Zo.q).enabled&&(this._buttons.unshift({type:"costume",atlas:q._.Ui_wizard_costumes_json,icon:"icon-costume-0",bot:k.getText("BACKPACK_BUTTON_COSTUMES"),callback:()=>{this._segment.featureCommon.sendTabEvent({tabName:Ll.BackpackCostumesTab,interfaceName:ph.B.Backpack,interfaceType:bi.Wm.Menu,saveClickInfo:Ll.BackpackCostumesTab}),K.q.instance.prodigy.open.openWizardCostumesMenu(bi.$N.TabClick,Ll.BackpackCostumesTab)}}),B.buttons.spacing=107,U=1);const F=this.createBaseSetup(31,16,"shine",ph.B.Backpack,this._buttons,!0,void 0,B,void 0,!0),G=K.q.instance.prodigy.create.element(F,-20,-40);G.setRenderState(!0),G.add(new Pr.C(this.game,71,200,429,40,q._.Tiled_sprites_json,"blue-top")),G.add(new Pr.C(this.game,71,240,469,380,q._.Tiled_sprites_json,"blue-mid")),G.add(new Pr.C(this.game,71,620,429,40,q._.Tiled_sprites_json,"blue-top2")),G.add(new Pr.C(this.game,500,240,40,380,q._.Tiled_sprites_json,"blue-side2")),G.add(new Pr.C(this.game,60,240,40,380,q._.Tiled_sprites_json,"blue-side")),G.add(K.q.instance.prodigy.create.sprite(500,200,q._.General_core_json,"blue-corner2")),G.add(K.q.instance.prodigy.create.sprite(500,620,q._.General_core_json,"blue-corner3")),G.add(K.q.instance.prodigy.create.sprite(60,200,q._.General_core_json,"blue-corner")),G.add(K.q.instance.prodigy.create.sprite(60,620,q._.General_core_json,"blue-corner4")),K.q.instance.prodigy.create.panel(G,100,230,10,10,"white").alpha=.5,super.create(),this.bar=K.q.instance.prodigy.create.slider(this,1200,240,380,!0,!0),this._playerContainer=K.q.instance.prodigy.create.player(this,this.player,1,300,0,!0,{isPreview:!0,chargeRevealEnabled:!0}),this._playerContainer.scale.set(2,2),(0,Dt.G)(Zo.q).enabled&&(this._playerContainer.clickCallback=()=>K.q.instance.prodigy.open.openWizardCostumesMenu()),this.equip=K.q.instance.prodigy.create.element(this,80,220),this.setMode(U),this.reload()}setActive(k){super.setActive(k),this._itemCards.forEach((B=>B.active=k))}setMode(k){var B,U;super.setMode(k),this.clearContents(),this.itemType=null!==(U=null===(B=this._buttons[k])||void 0===B?void 0:B.type)&&void 0!==U?U:"hat",this._segment.featureCommon.sendTabEvent({tabName:this.itemType,interfaceName:ph.B.Backpack,interfaceType:bi.Wm.Menu}),this.listItemsOfType()}clearContents(){var k;null===(k=this.content)||void 0===k||k.removeAll(!0)}itemSelected(k){var B;K.q.instance.prodigy.open.itemInfo({ID:k.ID,L:k.L,type:null!==(B=k.type)&&void 0!==B?B:this.itemType},this.reload.bind(this),Lr.s.Equip)}reload(k){const B=[];for(let G=0;G{this._segment.featureCommon.sendButtonEvent({buttonName:jh.k.BackpackCostumesSlot,interfaceName:ph.B.Backpack,interfaceType:bi.Wm.Menu,destinationName:ph.B.WizardCostumesMenu,saveClickInfo:jh.k.BackpackCostumesSlot}),K.q.instance.prodigy.open.openWizardCostumesMenu(bi.$N.ButtonClick,jh.k.BackpackCostumesSlot)}),((0,Dt.G)(Zo.q).enabled||("mount"===xr.W[G]&&(F=170),"costume"!==xr.W[G]))&&B.push(K.q.instance.prodigy.create.item(null,F,$,{id:k.ID,type:k.type},Lr.s.Icon,U))}const U=[];B.forEach((k=>U.push(k.onContainerLoaded.asPromise()))),Promise.all(U).then((()=>{this.equip.removeAll(!0),B.forEach((k=>this.equip.addChild(k)))})).catch(j.RQr.createHandler("BackpackMenu: Error loading equipped items")),this.game.input.clearEnterCallback(),this._playerContainer.reload(),this._playerContainer.updateMountAppearance();const F=495+(this.player.equipment.getMount()>0?40:0);this._playerContainer.y=F,this.bar.process(),k&&this.close()}scrollItems(k){var B,U;if(this.page=j.Aq$.isDefined(k)?k:this.page,this.clearContents(),this.owned=this.getItemsOfCurrentType(),kl.H.sortBackpackGearByStats(this.owned),this.owned.length<=0&&"spellRelic"===this.itemType)this._itemCards.forEach((k=>{k&&(k.active=!1)})),K.q.instance.prodigy.create.font(this.content,30,50,"Earn Relics by completing quests in areas all over the island!",{width:480,align:"center"});else{this._itemCards.forEach((k=>{k&&(k.active=!0)}));for(let k=this.page;k=this.owned.length?void 0:{id:j.Aq$.isDefined(this.owned[k].ID)?this.owned[k].ID:this.owned[k].gameID,type:null!==(B=this.owned[k].type)&&void 0!==B?B:this.itemType,L:this.owned[k].L,N:this.owned[k].N,max:this.owned[k].max};if(this._itemCardsCreatedCount{this._itemCards[F]=k})).catch(j.RQr.createHandler("Error creating item card in backpack"));else{const B=this._itemCards[F%this._pageSize];null===(U=null==B?void 0:B.findComponentInChildren(Ul.Z))||void 0===U||U.initializeItemCard(G);const j=B.findComponentInChildren(Bl.n);null==j||j.onClicked.removeAll(),G&&(null==j||j.onClicked.add(this.itemSelected.bind(this,this.owned[k]),this))}}}}listItemsOfType(){this.owned=this.getItemsOfCurrentType(),this.bar.reset(this.owned.length-3,3,-1,this.scrollItems.bind(this))}getItemsOfCurrentType(){const k=this.player.backpack.getBackpackItemsByType(this.itemType),B=K.q.instance.prodigy.gameContainer.get("61f-37d6"),U=B.getAllOfType(this.itemType).map((k=>({ID:k.id,type:k.type,N:k.quantity})));"item"===this.itemType&&U.push(...B.getAllOfType("riftRunKey").map((k=>({ID:k.id,type:k.type,N:k.quantity}))));const F=Gt.R.loadData(Ft.r.BackpackConfiguration_json),G=U.concat(k);return F.hiddenItemIDs[this.itemType]?G.filter((k=>!F.hiddenItemIDs[this.itemType].includes(k.ID))):G}close(){var k;const B=K.q.instance.prodigy.gameContainer;jr.v.overrideSmoothing(null),null===(k=B.get("e20-0fb0").player.playerContainer)||void 0===k||k.reload(),this._segment.featureCommon.sendInterfaceEvent({interfaceName:ph.B.Backpack,interfaceType:bi.Wm.Menu,closeMethod:bi.Lv.CloseButton,instanceType:Ai.N.Interface}),this.clearContents(),this._itemCards.forEach((k=>null==k?void 0:k.destroy())),this._itemCards.length=0,this.game.broadcaster.broadcast(oi.J8.PlayerEditingMenuClosed,this.game,[]),this._playerContainer=null,super.close()}destroy(k={children:!0}){this.owned.length=0,this.bar.destroy(),this.bar=null,this.player=null,super.destroy(k)}}var Gl,jl=U(60654),$l=U(20748),Hl=U(50475),Vl=U(87557),Wl=U(77997),ql=U(29546);class Kl extends Hh.a{constructor(k,B,U,F,G){super(k,B,0,0,K.q.instance.prodigy.textureMenu),this._socialStatusElements={},this._xpBarGameObject=null,this.player=U,this.retrievePlayerFriendStatus();const j=this.loggedInPlayerProvider.player,$=this.player.userID===j.userID;this._allowDuelByDefault=F,this.showFriendSocialStatus=!$&&[1,Kl.IS_CLASSMATE].includes(this._friendStatus),this._socialStatusElements.status=G,k.broadcaster.addAppListener(oi.sd.RequestSent,this.setupFriendRequestButton.bind(this),this,oi.HG.Card,!1),k.broadcaster.addAppListener(oi.sd.RequestCancelled,this.setupFriendRequestButton.bind(this),this,oi.HG.Card,!1),k.broadcaster.addAppListener(oi.sd.RequestAccepted,this.setupFriendRequestButton.bind(this),this,oi.HG.Card,!1),k.broadcaster.addAppListener(oi.sd.RequestRejected,this.setupFriendRequestButton.bind(this),this,oi.HG.Card,!1),k.broadcaster.addAppListener(oi.sd.FriendRemoved,this.setupFriendRequestButton.bind(this),this,oi.HG.Card,!1),k.broadcaster.addAppListener(oi.J8.PlayerAppearanceUpdated,this.updateAppearance.bind(this),this,oi.HG.Card,!1),this.currentInterfaceName=ph.B.PlayerCard,this.create()}create(){if(this.destroyed)return;const k=this.loggedInPlayerProvider.player,B=this.player.userID===k.userID;this.addTransparent();this.base=K.q.instance.prodigy.create.element(this,240,120),K.q.instance.prodigy.create.panel(this.base,0,0,20,2,"card-top"),K.q.instance.prodigy.create.panel(this.base,0,80,20,10,"card-bot"),this.showFriendSocialStatus&&(this.createExtendedPanel(),this._socialStatusIcons=uc.createSocialStatusIcons(12),K.q.instance.prodigy.create.panel(this.base,0,440,20,2,"card-top-extended"));const U=k.equipment.getMount()>0;this.playerContainer=K.q.instance.prodigy.create.player(this.base,this.player,1.65,125,U?360:320,!1,{isPreview:!0,chargeRevealEnabled:!0}),this.playerContainer.reload(),this.playerName=K.q.instance.prodigy.create.font(this.base,10,3,`${this.player.hasMembership()?"[membership] ":""}${this.player.getName()}`,{size:36,fontID:9}),this.setupXpBar(B),K.q.instance.prodigy.create.button(this.base,768,-10,q._.General_icons_json,"close",(()=>{this.segment.featureCommon.sendButtonEvent({buttonName:jh.k.X,interfaceName:this.currentInterfaceName,interfaceType:bi.Wm.Menu}),this.close()})),this.buttons=[],B?this.setupPlayer(this.buttons):this.setupStranger(this.buttons),this.content=K.q.instance.prodigy.create.element(this.base),this.setMode(0,0),super.create(),this.segment.featureCommon.sendInterfaceEvent({interfaceName:this.currentInterfaceName,interfaceType:bi.Wm.Menu,originType:bi.$N.ButtonClick}),this.sendTabClickEvent(this.buttons[0].data.bot)}close(){this.game.broadcaster.broadcast(oi.J8.PlayerEditingMenuClosed,this.game,[]),this.game.broadcaster.removeAppListener(oi.sd.RequestSent,this,oi.HG.Card),this.game.broadcaster.removeAppListener(oi.sd.RequestCancelled,this,oi.HG.Card),this.game.broadcaster.removeAppListener(oi.sd.RequestAccepted,this,oi.HG.Card),this.game.broadcaster.removeAppListener(oi.sd.RequestRejected,this,oi.HG.Card),this.game.broadcaster.removeAppListener(oi.sd.FriendRemoved,this,oi.HG.Card),this.game.broadcaster.removeAppListener(oi.J8.PlayerAppearanceUpdated,this,oi.HG.Card),this.segment.featureCommon.sendInterfaceEvent({interfaceName:this.currentInterfaceName,interfaceType:bi.Wm.Menu,instanceType:Ai.N.Interface,closeMethod:bi.Lv.CloseButton}),super.close()}destroy(k={children:!0}){var B,U;null===(B=this.reportingModalLoader)||void 0===B||B.cancel(),null===(U=this.reportingModalPrefab)||void 0===U||U.destroy(),this._xpBarGameObject&&this._xpBarGameObject.destroy(),this._xpBarGameObject=null,this.exclamationSprite&&(this.game.tweens.removeAllFromOwner(this),this.exclamationSprite.destroy()),this.exclamationSprite=null,this.playerContainer&&this.playerContainer.destroy(),this.playerContainer=null,this.playerName&&this.playerName.destroy(),this.playerName=null,this.base&&this.base.destroy(),this.base=null,this._socialStatusIcons=null,this.content=null,super.destroy(k)}setupPlayer(k){const B=this.loggedInPlayerProvider.player,U=33,F=350,G=B.state.get("zone-lamplight");K.q.instance.prodigy.create.advButton(this.base,U,F,{icon:"move",top:this.localization.getText("PLAYER_CARD_GO_TO_HOUSE_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_GO_TO_HOUSE_BUTTON_BOT")},(()=>{this.toHouse()})).setActive(!j.Aq$.isDefined(G)||!j.Aq$.isDefined(G.quest)||G.quest.ID>1),B.hasCompletedTutorial()&&K.q.instance.prodigy.create.advButton(this.base,161,F,{atlas:q._.Store_stylist_json,icon:"stylist-icon",top:this.localization.getText("PLAYER_CARD_CHANGE_STYLE_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_CHANGE_STYLE_BUTTON_BOT")},(()=>{j.Aq$.isDefined(this.stylistBreadcrumbIndicator)&&(this.stylistBreadcrumbIndicator.destroy(),this.stylistBreadcrumbIndicator=null),K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_STYLIST,ln.B.BREADCRUMB_CLICKED_CARD_STYLIST_BUTTON),K.q.instance.prodigy.open.stylistStore(null,null,null),this.sendTabClickEvent(this.localization.getText("PLAYER_CARD_CHANGE_STYLE_BUTTON_BOT"))})),k.push(K.q.instance.prodigy.create.advButton(this.base,289,F,{icon:"bag",top:this.localization.getText("PLAYER_CARD_GEAR_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_GEAR_BUTTON_BOT")},this.setMode.bind(this,0,0))),k.push(K.q.instance.prodigy.create.advButton(this.base,417,F,{icon:{type:"item",ID:21},bot:this.localization.getText("PLAYER_CARD_GEMS_BUTTON_BOT")},this.setMode.bind(this,1,1))),k.push(K.q.instance.prodigy.create.advButton(this.base,545,F,{icon:{type:"item",ID:75},top:this.localization.getText("PLAYER_CARD_KEY_ITEMS_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_KEY_ITEMS_BUTTON_BOT")},this.setMode.bind(this,2,2))),k.push(K.q.instance.prodigy.create.advButton(this.base,673,F,{icon:"player",top:this.localization.getText("PLAYER_CARD_STATS_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_STATS_BUTTON_BOT")},this.setMode.bind(this,3,3)))}setupStranger(k){var B,U,F;const G=this.loggedInPlayerProvider.player,$=this.player,H=$.getAllowsHouseVisitors()&&this.featureRequirements.meetsRequirementsDeprecated(38),W=33,z=350,Y=null!==(U=null===(B=this.featureFlagProvider.getValue(Wl.v))||void 0===B?void 0:B.playerCardReportButton)&&void 0!==U&&U,Q=K.q.instance.prodigy.gameContainer.get("c97-bd0d"),X=K.q.instance.prodigy.create.advButton(this.base,W,z,{icon:"move",top:this.localization.getText("PLAYER_CARD_VISIT_HOUSE_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_VISIT_HOUSE_BUTTON_BOT")},(()=>{this.toHouse()}));X.setActive(!1),Q.getCharData($.userID.toString(),["system"],(k=>{const B=j.Aq$.isDefined(k)?k[$.userID]:null,U=j.Aq$.isDefined(B)&&j.Aq$.isDefined(B.system)&&B.system.is_house_locked;X.setActive(H&&!U)})),H&&G.hasCompletedTutorial()&&!K.q.instance.prodigy.classModeController.isClassMode()&&(K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_HOUSE_VISITING,ln.B.BREADCRUMB_CLICKED_CARD_VISIT_BUTTON)||(this.exclamationSprite=this.createBreadcrumbIndicator(this.game,this.base,q._.General_icons_json,"exclamation",X))),K.q.instance.prodigy.classModeController.isClassMode()&&X.setActive(!1),this._duelButton=K.q.instance.prodigy.create.advButton(this.base,161,z,{icon:"challenge",top:this.localization.getText("PLAYER_CARD_BATTLE_BUTTON_TOP")},(()=>{this.sendDuelInvite()}));const Z=$.getLevel()>=(null!==(F=ql.X.getLevelRequirement(9))&&void 0!==F?F:5);if(this._duelButton.setActive(this._allowDuelByDefault&&!this.showFriendSocialStatus&&Z),k.push(K.q.instance.prodigy.create.advButton(this.base,W+128*(3+Number(!Y)),z,{icon:"bag",top:this.localization.getText("PLAYER_CARD_GEAR_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_GEAR_BUTTON_BOT")},this.setMode.bind(this,0,0))),k.push(K.q.instance.prodigy.create.advButton(this.base,W+128*(4+Number(!Y)),z,{icon:"player",top:this.localization.getText("PLAYER_CARD_STATS_BUTTON_TOP"),bot:this.localization.getText("PLAYER_CARD_STATS_BUTTON_BOT")},this.setMode.bind(this,3,1))),Y){const k=K.q.instance.prodigy.create.button(this.base,673,400,q._.General_core_json,"btn-mini",(()=>{const k=K.q.instance.prodigy.gameContainer.get("PrefabService").getPrefabFromGuid(Ei.l.ReportPlayerPopup);this.reportingModalLoader=this.prefabLoader.loadFromJSONWithDependencies(k,void 0,void 0,void 0,Ei.l.ReportPlayerPopup),this.reportingModalLoader.then((k=>{this.reportingModalPrefab=k,k.findComponent(Vl.V).setReportedUserID($.userID)}))})),B=this.localization.getText("PLAYER_CARD_REPORT_BUTTON_TEXT");K.q.instance.prodigy.create.font(k.sprite,5,14,B,{size:16,align:"center",width:k.width-10})}const J=new V.Container;J.visible=!1,J.position.set(10,480),this.base.addChild(J);const tt=new V.Sprite;tt.scale.set(1/uc.SOCIAL_STATUS_ICON_RESOLUTION),J.addChild(tt);const et=new V.Text("",{fontFamily:j.dBt.ABeeZee,fontSize:24,fill:3552822});et.position.set(35,-1),J.addChild(et),this._socialStatusElements.container=J,this._socialStatusElements.sprite=tt,this._socialStatusElements.text=et,this.showFriendSocialStatus&&this._socialStatusElements.status&&this.setPlayerSocialStatus(this._socialStatusElements.status),this.setupFriendRequestButton(289,z)}setupXpBar(k=!0){this.prefabLoader.loadWithDependenciesFromGUID(Ei.l.XPBar).then((B=>{if(this.destroyed||B.isDestroyed)return B.destroy(),B;B.transform.setPosition(435,215),B.findComponent(j.y4o).getRootContainer().setParent(this);const U=B.findComponent(Hl.B);U.runOnSetup=!1,U.levelText.text=this.player.getChargedLevelCumulative().toString();const F=this.player.currentMaxLevel,G=this.player.getMaximumChargedLevel(),$=this.player.getChargedLevelCumulative()>=G,H=$||!k,V=this.player.getPlayerData().chargedLevelData;if(j.Aq$.isDefined(V)&&this.player.getChargedLevelCumulative()>=F){const k=H?1:V.chargedLevelXpForCurrentLevel/V.chargedLevelXpRequiredForNextLevel;U.progressBar.setValue(k),this.player.getChargedLevel()>0&&(U.levelText.fill=Sh.Vh,U.showBarWithChargedLevels())}else{const k=this.player.getStars(),B=Rc.e.starsToLevel(this.player.getLevel(),yo.V.Player),F=k-B,G=Rc.e.starsToLevel(this.player.getLevel()+1,yo.V.Player)-B,j=H?1:F/G;U.progressBar.setValue(j)}return $&&U.showBarAtMaxLevel(),this._xpBarGameObject=B,B})).catch(j.RQr.createHandler("[Card]: XPBar Prefab failed to load"))}setupFriendRequestButton(k,B){if(j.Aq$.isDefined(this.game)){if(!K.q.instance.prodigy.friendsListNetworkHandler.hasReceivedFriends)return}else j.VyI.log("Friend Button failed to render",j.$bb.Error);if(this._friendStatus===Kl.IS_CLASSMATE)return;let U,F,G=null,$="delete-friend";1===this._friendStatus?(U=this.localization.getText("PLAYER_CARD_REMOVE_FRIEND_TOP"),F=this.localization.getText("PLAYER_CARD_REMOVE_FRIEND_BOT"),G=oi.sd.RemoveFriend):0===this._friendStatus?(U=this.localization.getText("PLAYER_CARD_CANCEL_FRIEND_TOP"),F=this.localization.getText("PLAYER_CARD_CANCEL_FRIEND_BOT"),G=oi.sd.CancelRequest):(U=this.localization.getText("PLAYER_CARD_ADD_FRIEND_TOP"),F=this.localization.getText("PLAYER_CARD_ADD_FRIEND_BOT"),G=oi.sd.SendRequest,$="add-friend");let H=k,V=B;this.cmdFriendRequest&&(j.Aq$.isDefined(k)&&j.Aq$.isDefined(B)||(H=this.cmdFriendRequest.x,V=this.cmdFriendRequest.y),this.cmdFriendRequest.destroy()),this.cmdFriendRequest=K.q.instance.prodigy.create.advButton(this.base,H,V,{atlas:q._.Icons_menu_json,icon:$,top:U,bot:F},this.onRequestClicked.bind(this,G))}retrievePlayerFriendStatus(){var k,B;if(K.q.instance.prodigy.friendsListNetworkHandler.classList.some((k=>k.userID===this.player.userID)))this._friendStatus=Kl.IS_CLASSMATE;else{const U=K.q.instance.prodigy.friendsListNetworkHandler.friendsList;this._friendStatus=null!==(B=null===(k=U.find((k=>k.userID===this.player.userID)))||void 0===k?void 0:k.status)&&void 0!==B?B:null}}refreshPlayerSocialStatus(){j.Aq$.isDefined(this._playerStatusRefreshPromise)||Date.now()>this._lastPlayerStatusRefresh+3e4||(this._playerStatusRefreshPromise=this._synapse.getFriendsStatuses([`${this.player.userID}`]),this._playerStatusRefreshPromise.then((k=>{const B=this._socialStatusElements,U=k[`${this.player.userID}`];j.Aq$.isDefined(U)&&U!==B.status&&this.setPlayerSocialStatus(U),this._lastPlayerStatusRefresh=Date.now()})).finally((()=>{this._playerStatusRefreshPromise=null})))}setPlayerSocialStatus(k){const B=this._socialStatusElements;B.status=k,B.sprite.texture=this._socialStatusIcons[B.status],B.text.text=uc.getSocialStatusText(B.status),B.container.visible=!0,this._duelButton.setActive(k===lc.a.available)}onRequestClicked(k){k===oi.sd.RemoveFriend?K.q.instance.prodigy.open.messageBoxPrefab({title:this.localization.getText("PLAYER_CARD_CONFIRM_REMOVE_TITLE"),text:"PLAYER_CARD_CONFIRM_REMOVE_BODY",textArgs:[this.player.getName()],buttonState:Sr.D.YesNoButtons,confirmCallback:()=>{this.game.broadcaster.broadcast(k,oi.HG.Card,[this.player.userID])}}):this.game.broadcaster.broadcast(k,oi.HG.Card,[this.player.userID])}setMode(k,B){var U;const F=this.loggedInPlayerProvider.player;if(this.buttons[k]&&this.page!==k&&this.sendTabClickEvent(null===(U=this.buttons[k].data)||void 0===U?void 0:U.bot),this.page=k,super.setMode(B),this.content.removeAll(!0),0===k)for(let G=0;G=hi.s.activePlayerLevelCap&&(k=this.localization.getText("PLAYER_CARD_MAX")),F=K.q.instance.prodigy.create.panel(this.content,500,65,4,2,"stat"),K.q.instance.prodigy.create.font(F,5,5,this.localization.getText("PLAYER_CARD_STARS"),{size:20}),K.q.instance.prodigy.create.font(F,-20,46,k,{fontID:8,align:"center",width:200}),F=K.q.instance.prodigy.create.panel(this.content,330,155,4,2,"stat"),K.q.instance.prodigy.create.font(F,5,5,this.localization.getText("PLAYER_CARD_GOLD"),{size:20}),K.q.instance.prodigy.create.font(F,5,46,`${this.player.getGold()}`,{fontID:8,align:"right",width:145}),F=K.q.instance.prodigy.create.panel(this.content,500,155,4,2,"stat"),K.q.instance.prodigy.create.font(F,5,5,this.localization.getText("PLAYER_CARD_TOWER"),{size:20}),K.q.instance.prodigy.create.font(F,5,46,this.localization.getText("PLAYER_CARD_FLOOR",this.player.getTowerProgress()),{fontID:8,align:"center",width:145})}}toHouse(){const k=this.loggedInPlayerProvider.player;if(this.player.userID!==k.userID){const k=K.q.instance.prodigy.friendsListNetworkHandler.friendsList.length,B=K.q.instance.prodigy.friendsListNetworkHandler.classList.length;this.segment.social.sendHouseVisitedEvent({friends:k,classmates:B,friend_id:this.player.userID})}if(K.q.instance.prodigy.classModeController.isClassMode())K.q.instance.prodigy.open.classModeMessage(this.localization.getText("WORLD_YOUR_HOUSE_CLASS_MODE"),null,null,this.localization.getText("WORLD_YOUR_HOUSE"),"popup-travel-home",{isModal:!0});else{if(!this.featureRequirements.meetsRequirementsDeprecated(38))return void K.q.instance.prodigy.open.lamplightLevelLock("PLAYER_CARD_GO_TO_HOUSE_BUTTON_BOT");{const k=K.q.instance.prodigy.world.getZone(K.q.instance.prodigy.world.getCurrentZone());k?k.handleLeaving(In.j.teleport,(()=>{this.teleportToHouse()})):this.teleportToHouse()}}this.sendTabClickEvent("move")}sendDuelInvite(){K.q.instance.prodigy.loading(!0,!0),Ne.e.invite(De.VB.Standard,this.player).catch(this.duelInviteFailed.bind(this))}sendGift(){K.q.instance.prodigy.open.messageBoxPrefab({title:"SEND_GIFT_FEATURE_SOON_MESSAGE_TITLE",text:"SEND_GIFT_FEATURE_SOON_MESSAGE_BODY"})}update(){super.update(),this.showFriendSocialStatus&&this.refreshPlayerSocialStatus()}updatePlayerContainerOffset(){if(this.playerContainer){const k=this.loggedInPlayerProvider.player.equipment.getMount()>0;this.playerContainer.y=k?360:320}}updatePlayer(k){this.playerContainer.reload(),this.playerContainer.updateMountAppearance(),this.updatePlayerContainerOffset(),this.game.input.clearEnterCallback(),this.setMode(k,k)}updateAppearance(){this.playerContainer&&(this.playerContainer.reload(),this.updatePlayerContainerOffset(),this.playerName.setText(this.player.getName()))}itemSelected(k,B,U,F){j.Aq$.isDefined(k)&&K.q.instance.prodigy.open.itemInfo({ID:k,type:B},this.updatePlayer.bind(this,F),U)}openPouch(k){j.Aq$.isDefined(this.player.equipment.getEquipment(k))?this.itemSelected(this.player.equipment.getEquipment(k),k,Lr.s.Equip,0):K.q.instance.prodigy.open.pouch(k,this.updatePlayer.bind(this,0),null)}createBreadcrumbIndicator(k,B,U,F,G){const $=K.q.instance.prodigy.create.sprite(0,0,U,F);B.addChild($);const H=Tn.J.getOptionalParameter(G,B),V=j.Aq$.getCenteredXY($.width,0,H.x,H.y,H.width,0);return $.x=V.x,$.y=H.y-$.height,k.add.tween($,this).to({y:$.y-10},400,j.GS3.Quadratic.InOut,!0,0,-1,!0),$}teleportToHouse(){j.Aq$.isDefined(this.exclamationSprite)&&(this.exclamationSprite.destroy(),K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_HOUSE_VISITING,ln.B.BREADCRUMB_CLICKED_CARD_VISIT_BUTTON)),K.q.instance.prodigy.loading(!0);const k=k=>{const B=null==k?void 0:k[this.player.userID];(null==B?void 0:B.house)&&(K.q.instance.prodigy.loading(!1),this.player.house.setItems(B.house),K.q.instance.prodigy.world.it(hn.A_.HOUSE,null,null,{player:this.player}))};K.q.instance.prodigy.gameContainer.get("c97-bd0d").getCharData(this.player.userID.toString(),[hn.A_.HOUSE],k,k),this.segment.featureCommon.sendInterfaceEvent({interfaceName:this.currentInterfaceName,interfaceType:bi.Wm.Menu,instanceType:Ai.N.Interface,closeMethod:bi.Lv.TeleportButton})}duelInviteFailed(k){K.q.instance.prodigy.loading(!1),K.q.instance.prodigy.open.messageBoxPrefab({text:"BATTLE_API_MAINTENANCE_MESSAGE"})}sendTabClickEvent(k){this.segment.featureCommon.sendTabEvent({tabName:k,interfaceName:this.currentInterfaceName,interfaceType:bi.Wm.Menu})}createExtendedPanel(){const k=this.game.cache,B=k.getTextureAtlas(q._.General_core_json);if(B.frameData.getFrameByName("card-top-extended-top"))return;const U=B.frameData,F=k.getTexture(q._.General_core_json).baseTexture,G=[["corner","corner4"],["corner2","corner3"],["corner3","corner2"],["corner4","corner"],["top","top2"],["top2","top"]];for(const j of G){const B=U.getFrameByName(`card-top-${j[0]}`),G=B.clone();G.name=`card-top-extended-${j[1]}`,G.y=B.y+B.height,G.height=-B.height,U.addFrame(G);const $=k.getTexture(q._.General_core_json,B.name),H=new V.Texture(F,$.frame.clone());H.frame.y=G.y,H.frame.height=G.height,H.updateUvs(),H.frame.y=B.y,H.frame.height=B.height,k.addImage(q._.General_core_json,H,G.name)}}}Kl.IS_CLASSMATE=2,(0,G.Cg)([(0,j.fFd)("db5-fb6e"),(0,G.Sn)("design:type",Object)],Kl.prototype,"featureRequirements",void 0),(0,G.Cg)([(0,j.fFd)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],Kl.prototype,"localization",void 0),(0,G.Cg)([(0,j.fFd)("e20-0fb0"),(0,G.Sn)("design:type",Wt.E)],Kl.prototype,"loggedInPlayerProvider",void 0),(0,G.Cg)([(0,j.fFd)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Kl.prototype,"prefabLoader",void 0),(0,G.Cg)([(0,j.fFd)("80c-6fa4"),(0,G.Sn)("design:type",Object)],Kl.prototype,"featureFlagProvider",void 0),(0,G.Cg)([(0,j.fFd)("c47-20b6"),(0,G.Sn)("design:type",Ge.Y)],Kl.prototype,"segment",void 0),(0,G.Cg)([(0,j.fFd)("779-a746"),(0,G.Sn)("design:type",Ue.d)],Kl.prototype,"_synapse",void 0),(0,G.Cg)([(0,$l.sg)(2e3),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],Kl.prototype,"sendDuelInvite",null);class zl extends Hh.a{constructor(k,B){super(k,B,0,0,K.q.instance.prodigy.textureMenu),this.panel=null,this.content=null,this.create()}create(){this.addTransparent(),this.panel=K.q.instance.prodigy.create.panel(this,240,80,20,14,"shine"),this.panel.setRenderState(!0),K.q.instance.prodigy.create.button(this,this.panel.x+760,this.panel.y-10,q._.General_icons_json,"close",this.close.bind(this)),this.panel.add(new Pr.C(this.game,11,120,778,40,q._.Tiled_sprites_json,"blue-top")),this.panel.add(new Pr.C(this.game,11,160,778,300,q._.Tiled_sprites_json,"blue-mid")),this.panel.add(new Pr.C(this.game,11,460,778,40,q._.Tiled_sprites_json,"blue-top2")),K.q.instance.prodigy.create.panel(this.panel,200,-10,10,2,"banner"),K.q.instance.prodigy.create.font(this,290,86,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SPELLBOOK_TITLE"),{fontID:9,size:36,width:720,align:"center"}),K.q.instance.prodigy.create.panel(this.panel,240,140,8,4,"white").alpha=.5,K.q.instance.prodigy.create.font(this.panel,250,150,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SPELLBOOK_DESCRIPTION"),{fontID:8,width:318}),this.content=K.q.instance.prodigy.create.element(this,500,170),super.create(),this.updateSpells()}updateSpells(){j.Aq$.isDefined(this.content)&&this.content.destroy(),this.content=K.q.instance.prodigy.create.element(this,290,180);const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getAttacks(),B=[[0,0],[0,1],[1,1],[2,1],[3,1],[3,0]];for(let U=0;U<6;U++)U>=k.length?K.q.instance.prodigy.create.panel(this.content,180*B[U][0],220*B[U][1],4,5,"empty"):K.q.instance.prodigy.prefabFactory.createItemCard(this.content,180*B[U][0],220*B[U][1],{id:k[U],type:"spell"},Lr.s.Inventory,this.spellSelected.bind(this,k[U])).catch(j.RQr.createHandler('Error creating item card for player spells in the "Character" spell menu'))}spellSelected(k){K.q.instance.prodigy.open.pouch("spell",this.updateSpells.bind(this),k)}}!function(k){k.Dance="dance",k.Expression="emote"}(Gl||(Gl={}));var Yl=U(44356),Ql=U(87776);class Xl extends Ar.H{constructor(k,B,U,F,G,$){super(k,B,U,F,$),this.onHide=new j.HN0,this.onIDSelected=new j.HN0,this.buttonData=null,this.currentPage=0,this.iconsPerPage=6,this.emoteButtons=[],this.emotesPanel=null,this.nextPage=null,this.prevPage=null,this.dabIndicatorImage=null,this._fxHandler=null,this.buttonData=G.filter((k=>!(null==k?void 0:k.isEventEmote))),this._fxHandler=K.q.instance.prodigy.gameContainer.get("3b1-0a3d"),this.createPanel()}createPanel(){this.emotesPanel=K.q.instance.prodigy.create.element(this,0,0);this.emotesPanel.add(K.q.instance.prodigy.create.sprite(0,0,q._.General_chat_hud_json,"tabmenu")).inputEnabled=!0,this.nextPage=K.q.instance.prodigy.create.button(this.emotesPanel,366,47,q._.General_chat_hud_json,"arrow",this.loadEmotes.bind(this,1)),this.nextPage.sprite.rotateMiddleBased(0),this.nextPage.name="Next Arrow",this.prevPage=K.q.instance.prodigy.create.button(this.emotesPanel,-7,47,q._.General_chat_hud_json,"arrow",this.loadEmotes.bind(this,-1)),this.prevPage.sprite.rotateMiddleBased(180),this.prevPage.name="Previous Arrow";K.q.instance.prodigy.create.button(this.emotesPanel,165,-5,q._.General_chat_hud_json,"closetabarrow1",this.hide.bind(this),null,null,!0).name="Close Arrow",this.loadEmotes(0)}loadEmotes(k){for(let F=0;F=B&&(this.currentPage=B,this.nextPage.setInactive());const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;for(let F=this.currentPage*this.iconsPerPage;F{const k={bodyText:null,xPosition:720,yPosition:585,arrowXRelPos:.2,arrowDirection:Br.i.DOWN};K.q.instance.prodigy.open.memberAdSuppressionToolTip(k,!0,!1)}),k=K.q.instance.prodigy.create.button(this.emotesPanel,F%this.iconsPerPage*54+45,47,Ut.E.getIconForType(B.type,B.id),null,G,null,null,!1,48,50);const j=this.setButtonIcon.bind(this,k);Tn.J.shouldSuppressAd(U)?(k.sprite.tint=6710886,K.q.instance.prodigy.create.sprite(32,-3,q._.Ui_icons_json,"icon-mini-lock",null,j)):K.q.instance.prodigy.create.sprite(32,-3,nr.q.Icon_mini_member_b,null,null,j)}Tn.J.shouldSuppressAd(U)||K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.BREADCRUMB_CLICKED_DAB,ln.B.BREADCRUMB_CLICKED_DAB_DAB_BUTTON)||(this.dabIndicatorImage=K.q.instance.prodigy.create.image(0,0,q._.General_icons_json,"exclamation"),k.addChild(this.dabIndicatorImage),this.dabIndicatorImage.x+=3,this.dabIndicatorImage.y-=42,k.y+=21,this.game.add.tween(this.dabIndicatorImage,this).to({y:this.dabIndicatorImage.y-10},400,j.GS3.Quadratic.InOut,!0,0,-1,!0))}else k=K.q.instance.prodigy.create.button(this.emotesPanel,F%this.iconsPerPage*54+45,47,Ut.E.getIconForType(B.type,B.id),null,this.sendEmote.bind(this,B.name,B.type),null,null,!1,48,50);k.x-=Math.floor(.5*k.width),k.y-=Math.floor(.5*k.height)}else if("item"===this.buttonData[F].type){const G=this.buttonData[F],j=U.backpack.hasItem(B.type,G.ID),$=q._.General_chat_hud_json,H=`${B.type}-${G.ID}${j<=0?"-grey":""}`;k=K.q.instance.prodigy.create.button(this.emotesPanel,F%this.iconsPerPage*54+45,47,$,H,null,null,null,0===j,48,50),k.x-=Math.floor(.5*k.width),k.y-=Math.floor(.5*k.height);const V=K.q.instance.prodigy.create.sprite(-5,-5,$,"quantitybg");k.sprite.addChild(V);const W=new Ql.b(this.game,V);W.populate({text:`${j}`,style:15,fontSize:15,boundsAlignH:"center",boundsAlignV:"middle"}),W.position.set(11,14),k.callback=()=>{this.useConsumable(B,k,W)}}else{K.q.instance.prodigy.skin.isFestivalActive("Summerfest")&&25===B.id&&(B.id=28),k=K.q.instance.prodigy.create.button(this.emotesPanel,F%this.iconsPerPage*54+45,47,q._.General_chat_hud_json,"backgroundbutton",this.sendEmote.bind(this,B.id,this.buttonData[F].type),null,null,!1,48,50),k.x-=Math.floor(.5*k.width),k.y-=Math.floor(.5*k.height);const U=k.addOverlay(5,5,Ut.E.getIconForType(B.type,B.id),null);B.isDisabled&&(U.tint=5789784)}this.buttonData[F].isDisabled&&(k.sprite.events.onInputDown.add((()=>{K.q.instance.prodigy.audio.playSFX(67,"button-disabled")})),k.setInactive()),k.name=`Chat ${this.buttonData[F].type} ${B.name}`,this.emoteButtons.push(k)}}setButtonIcon(k,B){k.sprite.addChild(B)}danceMemberPrompt(k){const B=K.q.instance.prodigy.gameContainer.get("c47-20b6"),U=yn.P.shouldUseUnifiedConversionFlow(Sn.o.FunnelClickMemberDance)?_n.R.UnifiedConversionFlow:Tn.J.showYouTubeMembershipAd(this.game,!0)?_n.R.Video:_n.R.Static;B.purchase.sendFunnelStart({type:"Click-Member-Dance-Emote",category:"Social",contentId:`${k.type}-${k.id}`,adType:U,adVersion:yn.P.getAdVersion(Sn.o.FunnelClickMemberDance)}),B.playerIdentityAvatar.sendEmoteFailedEvent({emote_name:k.name,emote_type:Yl.H.Dance,fail_reason:"Member Locked"}),K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.BREADCRUMB_CLICKED_DAB,ln.B.BREADCRUMB_CLICKED_DAB_DAB_BUTTON),this.game.broadcaster.broadcast(oi.Y1.HideChatNotif,oi.HG.ChatButton),K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:Sn.o.FunnelClickMemberDance})}sendEmote(k,B){const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(j.Aq$.isDefined(k)){const F=K.q.instance.prodigy.gameContainer.get("c97-bd0d");if("dance"===B){if(this._danceCooldown)return;"dab"===k&&(this.dabIndicatorImage&&this.dabIndicatorImage.destroy(),K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.BREADCRUMB_CLICKED_DAB,ln.B.BREADCRUMB_CLICKED_DAB_DAB_BUTTON),this.game.broadcaster.broadcast(oi.Y1.HideChatNotif,oi.HG.ChatButton)),U.danceID=k,F.emitMessage({action:Pa.x.Chat,data:{danceID:k}}),this._danceCooldown&&clearTimeout(this._danceCooldown),this._danceCooldown=setTimeout((()=>{clearTimeout(this._danceCooldown),this._danceCooldown=null}),Xl.DANCE_COOLDOWN_MS)}else U.emoteID=k,F.emitMessage({action:Pa.x.Chat,data:{emoteID:k}});this.onIDSelected.dispatch(k)}}useConsumable(k,B,U){var F;const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let $=G.backpack.hasItem(k.type,k.ID);$>0&&(this._fxHandler.onFire.addOnce((()=>{G.backpack.consume(k.type,k.ID),$--,U.setText(`${$}`),$<=0&&(B.sprite.frameName=`${k.type}-${k.ID}-grey`,B.setInactive(j.yQ0.WHITE))})),this._fxHandler.doEffect(k),K.q.instance.prodigy.gameContainer.get("c47-20b6").item.sendItemUsedEvent({item_id:k.ID.toString(),item_name:null==k?void 0:k.name,item_type:null===(F=le.t.getItem("fx",k.data.effect.fx))||void 0===F?void 0:F.data.type,item_count:1,instance_type:Ai.N.OpenWorld,instance_id:""}))}hide(){this.visible=!1,this.onHide.dispatch()}destroy(){this.onHide.dispose(),this.onIDSelected.dispose(),super.destroy()}}Xl.DANCE_COOLDOWN_MS=1e3;class Zl extends Ar.H{constructor(k,B,U){super(k,B,null,null,"Chat Menu"),this.textField=null,this.chatIDSelected=new j.HN0,this.HALF_PANEL_WIDTH=178,this.HALF_SUGGESTION_WIDTH=234,this.onClose=null,this.data=[],this.expressions=[],this.dances=[],this.consumables=[],this.currentText="",this.suggestions=[],this.emotesPanel=null,this.emoteButton=null,this.dancesPanel=null,this.danceButton=null,this.consumablesPanel=null,this.currentPanel=null,this.results=[],this.indicatorImage=null,this.rt=null,this._backgroundPanelHeight=80,this.onClose=U,this.rt=K.q.instance.prodigy.gameContainer.get("8c1-3c93"),this.data=this.rt.getPhrases();const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=F.emotes;this.expressions=G.filter((k=>k.type===Gl.Expression)),this.dances=G.filter((k=>k.type===Gl.Dance)),this.consumables=le.t.getItemsWithFilter("item",(k=>j.Aq$.isDefined(k.data.effect)&&j.Aq$.isDefined(k.data.effect.fx)&&F.backpack.hasItem(k.type,k.ID)>0)),this.createMenu()}close(){j.Aq$.isDefined(this.onClose)&&this.onClose(),this.onClose=null,this.suggestions=[],this.emotesPanel=null,this.emoteButton=null,this.dancesPanel=null,this.danceButton=null,this.textField=null,this.results=[],this.indicatorImage=null,K.q.instance.prodigy.open.chatMenu=null,this.rt=null,this.chatIDSelected.dispose(),K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:ph.B.Chat,interfaceType:bi.Wm.DialogBox,closeMethod:bi.Lv.CloseButton,instanceType:Ai.N.Interface}),this.destroy()}destroy(k={children:!0}){this.consumablesPanel.destroy(),this.consumablesPanel=null,super.destroy(k)}createMenu(){K.q.instance.prodigy.notifications.clearNotifications();const k=K.q.instance.prodigy.create.element(this,this.game.width/2,638);for(let G=1;G<=5;G++){const B=K.q.instance.prodigy.create.panel(k,-this.HALF_SUGGESTION_WIDTH,-40*G-8,12,1,"lb"),U={panel:B,text:K.q.instance.prodigy.create.font(B,10,5,""),textID:0};U.panel.setClickable(this.selectItem.bind(this,U)),U.panel.visible=!1,this.suggestions.push(U)}this.emotesPanel=new Xl(this.game,k,this.game.width/2-this.HALF_PANEL_WIDTH,567,this.expressions,"Emotes Panel"),this.emotesPanel.visible=!1,this.emotesPanel.onHide.add((()=>{this.setCurrentPanel(null),this.determineDanceBreadcrumbState()})),this.emoteIDSelected=this.emotesPanel.onIDSelected,this.add(this.emotesPanel),this.dancesPanel=new Xl(this.game,k,this.game.width/2-this.HALF_PANEL_WIDTH,567,this.dances,"Dance Panel"),this.dancesPanel.visible=!1,this.dancesPanel.onHide.add((()=>{this.setCurrentPanel(null),this.determineDanceBreadcrumbState()})),this.danceIDSelected=this.dancesPanel.onIDSelected,this.add(this.dancesPanel),this.consumablesPanel=new Xl(this.game,k,this.game.width/2-this.HALF_PANEL_WIDTH,567,this.consumables,"Consumables Panel"),this.consumablesPanel.visible=!1,this.consumablesPanel.onHide.add((()=>{this.setCurrentPanel(null)})),this.add(this.consumablesPanel);const B=K.q.instance.prodigy.create.element(k,0,0),U=B.add(K.q.instance.prodigy.create.emptySprite(0,0,0,this._backgroundPanelHeight));U.alpha=0;let F=0;B.add(K.q.instance.prodigy.create.sprite(F,0,q._.General_core_json,"HUD-end")),F+=30;for(let G=0;G<7;G++)B.add(K.q.instance.prodigy.create.sprite(F,0,q._.General_core_json,"HUD-mid")),F+=62;F+=30,B.add(K.q.instance.prodigy.create.sprite(F,0,q._.General_core_json,"HUD-end")).scale.x=-1,B.x-=F/2,U.width=F,U.inputEnabled=!0,F=10,this.emoteButton=K.q.instance.prodigy.create.button(B,F,17,q._.General_chat_hud_json,"emotebutton",(()=>{this.togglePanel(this.emotesPanel)})),F+=53,this.danceButton=K.q.instance.prodigy.create.button(B,F,17,q._.General_chat_hud_json,"dancebutton",(()=>{this.togglePanel(this.dancesPanel)})),F+=53,K.q.instance.prodigy.create.button(B,F,17,q._.General_chat_hud_json,"consumablebutton",(()=>{this.togglePanel(this.consumablesPanel)})),F+=53,B.add(K.q.instance.prodigy.create.sprite(F,17,q._.General_chat_hud_json,"chatendcap"));for(let G=0;G<5;G++)F+=40,B.add(K.q.instance.prodigy.create.sprite(F,17,q._.General_chat_hud_json,"chatmiddlebar"));B.add(K.q.instance.prodigy.create.sprite(F+80,17,q._.General_chat_hud_json,"chatendcap")).scale.x=-1,this.textField=new kh.F(this.game,this,"chat-input",null,568,663,230,35,{background:"transparent",border:"none"},"off"),this.textField.input.onkeyup=this.search.bind(this,!0),K.q.instance.prodigy.create.button(B,423,17,q._.General_chat_hud_json,"chatbutton",this.setChatFocus.bind(this),null,null,!0),K.q.instance.prodigy.create.button(B,463,-7,q._.General_chat_hud_json,"closebutton",(()=>{K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:jh.k.X,destinationName:K.q.instance.prodigy.world.getCurrentZone(),interfaceName:ph.B.Chat,interfaceType:bi.Wm.HUD}),this.close()}));K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.isPlayerTransformed()?this.setChatButtons(!1):this.determineDanceBreadcrumbState()}setChatButtons(k){k?(this.emoteButton.setActive(),this.danceButton.setActive()):(this.emoteButton.setInactive(),this.danceButton.setInactive())}togglePanel(k){this.setCurrentPanel(this.currentPanel===k?null:k)}setCurrentPanel(k){this.currentPanel&&(this.currentPanel.visible=!1),this.currentPanel=k,this.currentPanel&&(this.currentPanel.visible=!0,this.clearSearch()),this.textField.setFocus(null===k),this.determineDanceBreadcrumbState()}setChatFocus(){this.setCurrentPanel(null),setTimeout((()=>{this.textField.setFocus(!0)}),100)}selectItem(k){this.clearSearch(),this.sendChat(k.textID)}search(k){const B=this.textField.getValue();k&&this.setCurrentPanel(null),B.length<=0?this.results=[]:B.lengthk.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))).join(".*"),G=new RegExp(F,"i"),j=k=>{const B=k.toLowerCase().trim();return B===U?100:B.startsWith(U)?75:B.includes(U)?50:G.test(B)?25:0};return B.map((k=>({item:k,score:j(k)}))).filter((({score:k})=>k>0)).sort(((k,B)=>B.score-k.score)).map((({item:k})=>k))}}class Jl extends Hh.a{constructor(k,B,U,F){super(k,B,0,0,K.q.instance.prodigy.textureMenu),this.callback=null,this.panel=null,this.callback=F,this.createWithID(U)}createWithID(k){this.panel=K.q.instance.prodigy.create.panel(this,400,200,12,9,"shine"),this.panel.add(new Pr.C(this.game,11,80,458,40,q._.Tiled_sprites_json,"blue-top")),this.panel.add(new Pr.C(this.game,11,120,458,120,q._.Tiled_sprites_json,"blue-mid")),this.panel.add(new Pr.C(this.game,11,240,458,40,q._.Tiled_sprites_json,"blue-top2"));const B={type:"pet",ID:k};this.panel.add(K.q.instance.prodigy.icon.createFromData(B,40,30)),K.q.instance.prodigy.create.font(this.panel,140,35,(0,Ba.k)(Tn.J.getLocalizationNameKey(B)),{size:36,fontID:9}),K.q.instance.prodigy.create.font(this.panel,40,130,(0,Ba.k)(Tn.J.getLocalizationFlavorKey(B)),{width:400,fontID:8}),K.q.instance.prodigy.create.button(this,this.panel.x+440,this.panel.y-10,q._.General_icons_json,"close",(()=>{this.closeWithSuccess(!1)})),K.q.instance.prodigy.create.textButton(this,this.panel.x+65,this.panel.y+290,{icon:"yes",text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("CHOOSE_PET_BUTTON"),size:fo.LG},(()=>{this.closeWithSuccess(!0)})),this.create()}closeWithSuccess(k){k&&this.callback(),super.close()}}var tu=U(86051);class eu extends Bh.b{constructor(k,B,U){if(super(k,B,tu.K.COLISEUM),this.player=null,this.index=0,this.opponentName=null,this.opponentTitle=null,this.description=null,this.itemIcon=null,this.defeat=null,this.scrollRightButton=null,this.scrollLeftButton=null,this.challengeButton=null,this.data=null,this.opponent=null,this.petV=null,this.playerV=null,this.locked=!1,this.player=U,!j.Aq$.isDefined(eu.data[0].title))for(const F of eu.data)Object.defineProperty(F,"title",{get:()=>K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(F.titleKey)}),Object.defineProperty(F,"description",{get:()=>K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(F.descriptionKey)});this.setup()}menuSetup(){super.menuSetup();const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this.index=0;const B=this.game.width,U=K.q.instance.prodigy.create.sprite(120,140,q._.General_core_2_json,"char-container");this.add(U),K.q.instance.prodigy.create.panel(this,B-600-120,140,12,6),K.q.instance.prodigy.create.panel(this,B-300-120,480,6,2),this.opponentName=K.q.instance.prodigy.create.font(this,B-600-120+50,150,"",{size:40}),this.opponentTitle=K.q.instance.prodigy.create.font(this,B-600-120+50,180,"",{width:500,align:"right"}),this.description=K.q.instance.prodigy.create.font(this,B-600-120+30,230,"",{size:20,width:540}),K.q.instance.prodigy.create.font(this,880,490,k.getText("COLISEUM_REWARD"),{size:30}),this.itemIcon=K.q.instance.prodigy.icon.createWithQuantity(this,1020,470,Ut.E.getIconForType("item",26),1),this.defeat=K.q.instance.prodigy.create.sprite(270,460,q._.General_icons_json,"yes"),this.add(this.defeat),this.scrollRightButton=K.q.instance.prodigy.create.button(this,374,430,q._.General_icons_json,"next",this.shift.bind(this,1)),this.scrollLeftButton=K.q.instance.prodigy.create.button(this,164,430,q._.General_icons_json,"back",this.shift.bind(this,-1)),this.challengeButton=K.q.instance.prodigy.create.textButton(this,B-600-120+300-150,410,{text:k.getText("COLISEUM_BUTTON_CHALLENGE"),icon:{type:"weapon",ID:4},size:fo.MED},this.challenge.bind(this)),this.showFrame("leaderboard",k.getText("ARENA_TITLE"),[]);const F=K.q.instance.prodigy.create.textButton(this,0,0,{icon:"close",text:k.getText("BUTTON_CLOSE")},this.close.bind(this));this.showBtns([],[F]);const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.index=Math.min(G.getColiseum(),eu.data.length-1),this.shift(0),this.setupComplete=!0}shift(k){this.index+=k,this.scrollLeftButton.setActive(),this.scrollRightButton.setActive(),this.index<=0&&(this.index=0,this.scrollLeftButton.setInactive()),this.index>=eu.data.length-1&&(this.index=eu.data.length-1,this.scrollRightButton.setInactive()),this.changeOpponent()}changeOpponent(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(this.data=eu.data[this.index],this.opponent=new pa.s(this.game),this.opponent.init(this.data.opponent),j.Aq$.isDefined(this.petV)&&this.petV.destroy(),this.data.pets.length>0){const B=$.first(this.data.pets);this.petV=K.q.instance.prodigy.create.monster(this,new fa.R(this.game,B),1,250,350),k.encounters.onPetEncountered(B.ID),this.petV.reload(),this.petV.OnLoad.addOnce((()=>{this.petV.stand()}))}j.Aq$.isDefined(this.playerV)&&this.playerV.destroy(),this.playerV=K.q.instance.prodigy.create.character(this,this.opponent,1,360,380),this.data.pets.length<=0&&(this.playerV.x-=55),this.playerV.reload();const B=this.data.drops[0];"gold"===B.type?this.itemIcon.setValue(Ut.E.getIconForType("item",26),null,B.N):this.itemIcon.setValue(K.q.instance.prodigy.icon.iconKey(B),null,1);let U="";if(this.index>Math.floor(this.player.getLevel()/5)||this.index>k.getColiseum()){let B=!1,F=!1;this.index>Math.floor(this.player.getLevel()/5)&&(B=!0),this.index>k.getColiseum()&&(F=!0),U=B&&F?1===this.index?K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COLISEUM_PROMPT_REQUIRE_LEVEL_DEFEAT_SINGLE",5*this.index,this.opponent.getName()):K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COLISEUM_PROMPT_REQUIRE_LEVEL_DEFEAT_PLURAL",5*this.index,this.opponent.getName()):B?K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COLISEUM_PROMPT_REQUIRE_LEVEL",5*this.index,this.opponent.getName()):1===this.index?K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COLISEUM_PROMPT_REQUIRE_DEFEAT_SINGLE",this.opponent.getName()):K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COLISEUM_PROMPT_REQUIRE_DEFEAT_PLURAL",this.opponent.getName()),this.locked=!0,this.challengeButton.visible=!0,this.challengeButton.setInactive(),this.defeat.visible=!1}else this.index{j.Aq$.isDefined(B)&&B>U.getColiseum()&&U.setColiseum(B),K.q.instance.prodigy.world.it("lamplight-coliseum")};delete eu.data[k].opponent.data.hp;const G=eu.data[k].pets;if(j.Aq$.isDefined(G))for(let j=0;j{this._segment.featureCommon.sendInterfaceEvent({interfaceName:ph.B.ItemInfo,interfaceType:bi.Wm.InfoPanel,instanceType:Ai.N.Interface,closeMethod:bi.Lv.ButtonClick}),F.apply(this,k)},this.callback=F,K.q.instance.prodigy.load.assets([q._.Font_black_json],this.create.bind(this))}create(){var k;this.addTransparent();const B=new V.Container;this.addChild(B),this.panel=K.q.instance.prodigy.create.panel(B,230,100,21,12,"shine"),this.panel.setRenderState(!0),K.q.instance.prodigy.create.button(this,this.panel.x+800,this.panel.y-10,q._.General_icons_json,"close",(()=>{this.sendButtonEvent(jh.k.X),this.close()}));let U=null,F=null;const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.mode===Lr.s.Buy?(U=K.q.instance.prodigy.create.item(this,270,140,{id:this.item.getID(),type:this.item.getType()},Lr.s.Info),F=le.t.getItem(this.item.getType(),this.item.getID()).data):(U=K.q.instance.prodigy.create.item(this,270,140,{id:this.item.ID,type:this.item.type},Lr.s.Info),F=le.t.getItem(this.item.type,this.item.ID).data);const $=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);switch(this.mode){case Lr.s.Buy:U.containerLoaded?this.createBuyModeUI(U,F):U.onContainerLoaded.addOnce((()=>{this.createBuyModeUI(U,F)}));break;case Lr.s.Equip:{let B="";const U=this.item;1!==U.L||G.hasMembership()||(B=Tn.J.shouldSuppressAd(G)?"[icon-medium-lock] ":"[membership] ");["hat","weapon","outfit","boots","follow","back","spellRelic","mount","costume"].includes(U.type)?G.equipment.getEquipment(U.type)===U.ID?(B=$.getText("ITEM_BUTTON_REMOVE"),K.q.instance.prodigy.create.textButton(this,290,435,{text:B,size:fo.SMALL},(()=>{this.sendButtonEvent(`${B}-button`),this.unequipItem()}))):("follow"===U.type?B+=$.getText("ITEM_BUTTON_SHOW"):"mount"===U.type?B+=$.getText("ITEM_BUTTON_RIDE"):B+=$.getText("ITEM_BUTTON_WEAR"),K.q.instance.prodigy.create.textButton(this,290,435,{text:B,size:fo.SMALL},(()=>{this.sendButtonEvent(`${B}-button`),this.equipItem()}))):j.Aq$.isDefined(null===(k=F.effect)||void 0===k?void 0:k.transform)&&K.q.instance.prodigy.create.textButton(this,290,435,{text:$.getText("ITEM_BUTTON_USE"),icon:"up",size:fo.SMALL},(()=>{this.sendButtonEvent(jh.k.Use),this.checkTransformation(F)}));break}case Lr.s.Item:{let k="";1!==this.item.L||G.hasMembership()||(k="[membership] "),k+=$.getText("ITEM_BUTTON_USE"),K.q.instance.prodigy.create.textButton(this,290,435,{text:k,size:fo.SMALL},(()=>{this.sendButtonEvent(`${k}-button`),this.useItem(this.item)}));break}}super.create(),this._segment.featureCommon.sendInterfaceEvent({interfaceName:ph.B.ItemInfo,interfaceType:bi.Wm.InfoPanel,instanceType:Ai.N.Interface,originType:bi.$N.ButtonClick,originID:jh.k.Item})}createBuyModeUI(k,B){const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("ITEM_BUTTON_BUY"),G="[mail-gold] ";const $=this.item.getCost()[0];"currency"===$.getType()&&1===$.getID()||(G=`[${le.t.getItem($.getType(),$.getID()).data.icon}] `);const H=le.t.getItem(this.item.getType(),this.item.getID()),V=Tn.J.getPurchasePrice(H.data,$);V>0?K.q.instance.prodigy.create.font(this,290,385,`${G}${V}`,{align:"center",width:200,size:30,iconOffsetY:6}):F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("ITEM_TEXT_CHANGE"),1!==B.member||U.hasMembership()||(F=`[membership] ${F}`),K.q.instance.prodigy.create.textButton(this,290,435,{text:F,size:fo.SMALL},(()=>{this.sendButtonEvent(`${F}-button`),this.close(!0)}))}checkTransformation(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;j.Aq$.isDefined(k.effect)&&j.Aq$.isDefined(k.effect.transform)&&(B.isPlayerTransformed()?K.q.instance.prodigy.open.messageBoxPrefab({text:"MORPH_START_NEW",buttonState:Sr.D.YesNoButtons,confirmCallback:()=>{this.useTransformation(k)}}):this.useTransformation(k))}useTransformation(k){var B;const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;null===(B=U.playerContainer)||void 0===B||B.transformToItem(k.effect.transform,k.effect.ID,!0,k.effect.time),U.backpack.consume(this.item.type,this.item.ID),K.q.instance.game.broadcaster.broadcast(oi.J8.MorphMarbleUsed,void 0,[k]),this.close(!0),this._segment.item.sendItemUsedEvent({item_id:this.item.ID.toString(),item_name:null==k?void 0:k.name,item_type:"morph",item_count:1})}useItem(k){var B,U;const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;1!==k.L||F.hasMembership()||(K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:Sn.o.FunnelUseMemberLockedItem}),this._segment.item.sendItemEquipFailedEvent({item_name:null===(U=null===(B=le.t.getItem(this.item.type,this.item.ID))||void 0===B?void 0:B.data)||void 0===U?void 0:U.name,item_type:this.item.type,item_id:this.item.ID,fail_reason:"Member Locked"}))}equipItem(){var k,B;const U=K.q.instance.prodigy.gameContainer,F=U.get("e20-0fb0").player,G=le.t.getItem(this.item.type,this.item.ID).data,$=j.Aq$.isDefined(G.lockLevel)&&F.getLevel(){var k,B;F.hasMembership()||Tn.J.shouldSuppressAd(F)||(this._segment.purchase.sendFunnelStart({type:"Equip-Level-Locked-Item-Backpack",category:"Item-Equip",contentId:$,adType:H,adVersion:yn.P.getAdVersion(Sn.o.FunnelEquipLevelLockedItem)}),this._segment.item.sendItemEquipFailedEvent({item_name:null===(B=null===(k=le.t.getItem(this.item.type,this.item.ID))||void 0===k?void 0:k.data)||void 0===B?void 0:B.name,item_type:this.item.type,item_id:this.item.ID,fail_reason:"Member Locked"}),K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:Sn.o.FunnelEquipLevelLockedItem,conversionFunnelMetadata:$}))}}else F.equip(this.item.ID,this.item.type).then((k=>{k&&(F.appearanceChanged=!0,K.q.instance.prodigy.audio.playSFX(18,"whoosh"))})).catch(j.RQr.createHandler(`ItemInfo:equipItem Error equipping item ${this.item.type}-${this.item.ID}`)).finally((()=>{this.close()}));else{const U={conversionFunnelName:Sn.o.FunnelEquipBackpackLockedItem,conversionFunnelMetadata:`${V.type}-${V.ID}`};this._segment.purchase.sendFunnelStart({type:"Equip-Member-Locked-Item-Backpack",category:"Item-Equip",contentId:`${V.type}-${V.ID}`,adType:H}),this._segment.item.sendItemEquipFailedEvent({item_name:null===(B=null===(k=le.t.getItem(this.item.type,this.item.ID))||void 0===k?void 0:k.data)||void 0===B?void 0:B.name,item_type:this.item.type,item_id:this.item.ID,fail_reason:"Member Locked"}),Tn.J.shouldSuppressAd(F)?K.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:394,yPosition:430,arrowXRelPos:.5,arrowDirection:Br.i.DOWN}):K.q.instance.prodigy.open.membershipInfo(null,U)}}unequipItem(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=this.item;k.unEquip(B.ID,B.type).then((B=>{B&&(k.appearanceChanged=!0,K.q.instance.prodigy.audio.playSFX(18,"blop"))})).catch(j.RQr.createHandler(`ItemInfo:unequipItem Error unequipping item ${B.type}-${B.ID}`)).finally((()=>{this.close()}))}sendButtonEvent(k){this._segment.featureCommon.sendButtonEvent({buttonName:k,interfaceName:ph.B.ItemInfo,interfaceType:bi.Wm.InfoPanel})}}class nu extends su{createBuyModeUI(k,B){super.createBuyModeUI(k,B);const U=K.q.instance.prodigy.create.textButton(this,0,0,{text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("HOUSE_BUTTON_VISIT"),size:fo.SMALL},(()=>{K.q.instance.prodigy.world.getZone(hn.A_.HOUSE).gotoPreview(B.tag)}));U.y=435;const F=k.width/3;U.x=j.Aq$.getCenteredXY(U.width,0,k.x+F,0,2*F,0).x}}var au=U(95130);class ru extends Ka.W{constructor(k,B,U,F,G){super(k,B,34,{},[q._.Popup_ui_roulette_json,q._.Ui_icons_json,q._.Ui_shared_json]),this.buttonList=[],this.nicknames=U,this.user=F,this.zoneID=G,this.nicknameController=K.q.instance.prodigy.gameContainer.get("dcf-fcf7"),this.currentInterfaceName=ph.B.NicknamerMenu}create(){super.create(),this.closeButton.onClickCallback=()=>{this.fireButtonEvent({buttonName:jh.k.X}),this.close()},this.applyButton.onClickCallback=()=>{this.fireButtonEvent({buttonName:jh.k.SaveName}),this.apply()},this.applyButton.setActive(!1),this.populateNicknames(),this.findElement(Ql.b,"titleText").setText(this.nicknameController.getNicknamerTitle(this.zoneID)),this.fireInterfaceEvent({originType:bi.$N.WorldObject})}populateNicknames(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.appearance;this.addNicknameElement(null,k,!1,-1,!j.Aq$.isDefined(k.getName().getNickname()));for(let B=0;B{this.close()})),this.content=K.q.instance.prodigy.create.element(this,260,180),K.q.instance.prodigy.create.panel(this,(this.game.width-880)/2,180,22,10,"white"),K.q.instance.prodigy.create.font(this,290,120,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(`POUCH_CHOOSE_${this.itemType.toUpperCase()}`),{fontID:9,size:36,width:720,align:"center"}),super.create(),this.setMode(0)}setActive(k){super.setActive(k),this._itemCards.forEach((B=>B.active=k))}close(){j.Aq$.isDefined(this.bar)&&this.bar.destroy(),this.player=null,this._itemCards.forEach((k=>null==k?void 0:k.destroy())),this._itemCards.length=0,this.clearContents(),super.close()}setMode(k){super.setMode(k),this.listItemsOfType()}switchSpell(k){k!==this.selected&&this.player.swapSpells(this.selected,k),this.close()}clearContents(){j.Aq$.isDefined(this.content)&&this.content.destroy()}scrollItems(k){var B,U;this.clearContents(),this.content=K.q.instance.prodigy.create.element(this,35,140);let F=0;for(let G=k;G{this.switchSpell(this.owned[G].ID)})).then((k=>{this._itemCards[$]=k})).catch(j.RQr.createHandler("Error creating item card for spell in the pouch"));else{const U=this._itemCards[$%this._pageSize];null===(B=null==U?void 0:U.findComponentInChildren(Ul.Z))||void 0===B||B.initializeItemCard(k);const F=U.findComponentInChildren(Bl.n);null==F||F.onClicked.removeAll(),k&&(null==F||F.onClicked.add((()=>{this.switchSpell(this.owned[G].ID)}),this))}}else{const k=G>=this.owned.length?void 0:{id:this.owned[G].ID,type:this.itemType,N:this.owned[G].N,L:this.owned[G].L};if(this._itemCardsCreatedCount{k&&this.equipItem(this.owned[G])})).then((k=>{this._itemCards[$]=k})).catch(j.RQr.createHandler("Error creating item card for item in the pouch"));else{const B=this._itemCards[$%this._pageSize];null===(U=null==B?void 0:B.findComponentInChildren(Ul.Z))||void 0===U||U.initializeItemCard(k);const F=B.findComponentInChildren(Bl.n);null==F||F.onClicked.removeAll(),k&&(null==F||F.onClicked.add((()=>{this.equipItem(this.owned[G])}),this))}}F++}}listItemsOfType(){if(j.Aq$.isDefined(this.bar)&&this.bar.destroy(),"spell"===this.itemType){const k=this.player.getAllAttacks();this.owned=[];for(let B=0;B{this.scrollItems(k)}))}equipItem(k){const B=K.q.instance.prodigy.gameContainer,U=B.get("c47-20b6"),F=B.get("e20-0fb0").player,G=Tn.J.showYouTubeMembershipAd(this.game,!0)?_n.R.Video:_n.R.Static,$=(this.itemType,k.ID,le.t.getItem(this.itemType,k.ID).data);if(j.Aq$.isDefined($.lockLevel)&&F.getLevel()<$.lockLevel){const H=B.get(j.$Bt.LocalizationService).getText("LEVEL_LOCK_EQUIP",$.name,$.lockLevel);K.q.instance.prodigy.open.message(H).onClose=()=>{var B,j;if(!F.hasMembership()&&!Tn.J.shouldSuppressAd(F)){const F=`${this.itemType}-${k.ID}`;U.purchase.sendFunnelStart({type:"Equip-Level-Locked-Item-Pouch",category:"Item-Equip",contentId:F,adType:G}),U.item.sendItemEquipFailedEvent({item_name:null===(j=null===(B=le.t.getItem(this.itemType,k.ID))||void 0===B?void 0:B.data)||void 0===j?void 0:j.name,item_type:this.itemType,item_id:k.ID,fail_reason:"Member Locked"}),K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:Sn.o.FunnelEquipLevelLockedItem,conversionFunnelMetadata:F})}}}else this.player.equip(k.ID,this.itemType,!0).then((k=>{k&&(F.appearanceChanged=!0,K.q.instance.prodigy.audio.playSFX(18,"whoosh"))})).catch(j.RQr.createHandler(`Pouch:equipItem Error equipping item ${this.itemType}-${k.ID}`)).finally((()=>{this.close()}))}}class hu extends Bh.b{constructor(k,B,U){super(k,B,null,{hideMenu:!0,hideContent:!1}),this.callback=U;try{Pt.pF.appType()===Pt.uC.NATIVE_APP&&window.postMessage(JSON.stringify({type:"REVIEW_APP"}),window.location.origin)}catch(e){j.VyI.log(e,j.$bb.Error)}this.close()}close(k){j.Aq$.isDefined(this.callback)&&this.callback(),super.close()}}var cu=U(73722),du=(U(45373),U(24285));class lu extends Bh.b{constructor(k,B,U){super(k,B,tu.K.SERVER_SELECT,{hideMenu:!0,hideContent:!0}),this.dialogue=null,this.isClosed=!1,this._timeLoadStartedMS=null,this._timeLoadStartedMS=Date.now(),this._serverSelectMode=U,this._serverSelectMode.onServerSelected=this.onServerSelected.bind(this),K.q.instance.prodigy.load.assets([q._.Ui_home_school_server_json],this.setup.bind(this))}setup(){super.setup(),K.q.instance.prodigy.load.assets([q._.Ui_titan_json,q._.Ui_shipwreck_progress_json,q._.Ui_shiverchill_progress_json,nr.q.Bg_generic_outdoor]);const k=K.q.instance.prodigy.gameContainer.get("2a1-fed9");null!==k.timeToPlayMS&&k.timeToPlayMS>0&&(k.timeToPlayMS+=Date.now()-this._timeLoadStartedMS)}menuSetup(){super.menuSetup(),this.add(K.q.instance.prodigy.create.sprite(0,0,nr.q.Bg_generic_outdoor));this.createPanel(40,245,q._.Ui_home_school_server_json,"school-image","PREMISES_SELECT_SCHOOL",this.onSchoolClick.bind(this)),this.createPanel(this.game.width-(40*lu.PANEL_DIMENSIONS.tileNumWidth+40),245,q._.Ui_home_school_server_json,"house-image","PREMISES_SELECT_HOME",this.onHomeClick.bind(this));const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=K.q.instance.prodigy.create.player(this,k,2,640,500);B.reload(),B.showName(),this.createDialogue(),K.q.instance.prodigy.create.panel(this,240,this.game.height-80,20,3,"shine2"),K.q.instance.prodigy.create.textButton(this,260,this.game.height-60,{icon:"back",text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("BUTTON_BACK")},this.onBackClick.bind(this))}onMenuOpen(k){this.isClosed||(this.showDialogue(k),this.visible=!0)}createPanel(k,B,U,F,G,$){const H=K.q.instance.prodigy.create.panel(this,k,B,lu.PANEL_DIMENSIONS.tileNumWidth,lu.PANEL_DIMENSIONS.tileNumHeight,"shine2"),W=K.q.instance.prodigy.create.element(H,0,0),z=40,Y=lu.PANEL_DIMENSIONS.tileNumWidth*z-22,Q=lu.PANEL_DIMENSIONS.tileNumHeight*z-120,X=Q-80;H.add(W),W.add(new Pr.C(this.game,11,36,Y,z,q._.Tiled_sprites_json,"blue-top")),W.add(new Pr.C(this.game,11,76,Y,X,q._.Tiled_sprites_json,"blue-mid")),W.add(new Pr.C(this.game,11,76+X,Y,z,q._.Tiled_sprites_json,"blue-top2"));const Z=K.q.instance.prodigy.create.button(H,0,0,U,F,$);let J=j.Aq$.getCenteredXY(Z.width,Z.height,11,36,Y,Q);Z.x=J.x,Z.y=J.y;const tt=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),et=K.q.instance.prodigy.create.font(H,0,0,tt.getText(G),{fontID:9,size:36}),it=76+X+z;return J=j.Aq$.getCenteredXY(et.width,et.height,11,it,Y,H.height-it-11),et.x=J.x,et.y=J.y-2,H.highlight(!0,40,60),K.q.instance.game.renderer.type===V.RENDERER_TYPE.CANVAS&&du.s.cacheAsBitmap(W),H}onServerSelected(k,B){var U,F;B?this.visible=!0:(null===(F=(U=this._serverSelectMode).onServerSelectedCallback)||void 0===F||F.call(U,k,B),this.close())}onSchoolClick(){!K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasValidatedParentEmail()&&this.canViewParentalLink()?(this.destroyDialogue(),K.q.instance.prodigy.open.parentalLinkAtSchoolPrompt(this.createDialogue.bind(this),this.onSchoolSuccess.bind(this))):(this.destroyDialogue(),this.onSchoolSuccess())}onSchoolSuccess(){this.close(),cu.V.instance.selectedLocation="school",this._serverSelectMode.applyServerSelectMode()}onHomeClick(){this.close(),cu.V.instance.selectedLocation="home",this._serverSelectMode.applyServerSelectMode(),this.visible=!1}onBackClick(){var k,B;if("prodigy"===K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.userDataPlatform)null===(B=(k=this._serverSelectMode).onServerSelectedCallback)||void 0===B||B.call(k,!1,!0),this.close();else{K.q.instance.prodigy.gameContainer.get("c97-bd0d").logout()}}showDialogue(k){this.destroyDialogue(),k&&this.createDialogue()}destroyDialogue(){j.Aq$.isDefined(this.dialogue)&&(this.dialogue.close(),this.dialogue=null)}createDialogue(){this.dialogue=K.q.instance.prodigy.dialogue.create(),this.dialogue.setText(177),this.dialogue.startDeprecated("noot",!0,null,0)}close(){this.destroyDialogue(),this.isClosed=!0,super.close()}canViewParentalLink(k=!1){if(0===Vt.A.get("GameConstants.Features.ParentLink.TIMEOUT"))return!0;const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let U;return U=k?B.data.atHomeTimestamp:B.data.atSchoolTimestamp,!j.Aq$.isDefined(U)||Oc.R.getDateTime()-U>=Vt.A.get("GameConstants.Features.ParentLink.TIMEOUT")}}lu.PANEL_DIMENSIONS={tileNumWidth:11,tileNumHeight:9};var uu=U(39324),fu=U(91160);class bu extends Bh.b{constructor(k,B,U,F,G=!1){super(k,B,tu.K.SERVER),this.callback=null,this.servers=[],this.isAutoSelect=!1,this.backButton=null,this.playOfflineButton=null,this.content=null,this.serverPage=null,this.scroll=null,this._metrics=null,this.name="Server Select";K.q.instance.prodigy.gameContainer.get("afa-b7c5").startTracing(fu.u.ServerMenuSelection),this.callback=F,this.servers=U,this.isAutoSelect=G,this._metrics={offline:!1,openTime:Date.now(),clickTime:null,buttonIndex:null,worldName:null},this.setup()}static getSuggested(k,B,U){if(k.length{F.push(k)})),F}static determineSuggestedWorldsForLoadBalancing(k,B){let U=[],F=bu.groupServersByCluster(k,B);F=F.sort(((k,B)=>bu.determineTotalWorldListFullness(k)-bu.determineTotalWorldListFullness(B)));for(let G=0;GB.full-k.full)),B=bu.getSuggested(k,bu.SUGGESTED_NUM-U.length,G===F.length-1);if(U=U.concat(B),U.length>=bu.SUGGESTED_NUM)break}return U.sort(((k,B)=>B.full-k.full))}menuSetup(){super.menuSetup();const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this.showFrame("map",k.getText("SERVER_CHOOSE_WORLD_TITLE"),[],void 0,48),K.q.instance.prodigy.create.font(this,125,60,k.getText("SERVER_PICK_SAME_WORLD"),{size:20}),this.playOfflineButton=K.q.instance.prodigy.create.textButton(this,930,20,{size:fo.MED,icon:"next",text:k.getText("SERVERS_BUTTON_PLAY_OFFLINE")},(()=>this.playOffline())),this.backButton=K.q.instance.prodigy.create.textButton(this,50,650,{icon:"back",text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("BUTTON_BACK")},this.exitMenu.bind(this,!1,!0)),this.content=K.q.instance.prodigy.create.element(this,0,0),this.showSuggestedServers(),this.setupComplete=!0}showSuggestedServers(){const k=K.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(fu.u.ServerMenuSuggestedServers);const B={},U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),G=K.q.instance.prodigy.gameContainer.get("db5-fb6e");if(this.content.removeAll(!0),!j.Aq$.isDefined(this.servers)){K.q.instance.prodigy.create.font(this.content,0,320,F.getText("SERVER_LOADING_LIST"),{size:30,width:this.game.width,align:"center"});return void K.q.instance.prodigy.gameContainer.get("c97-bd0d").getWorldList(this.showSuggestedServers.bind(this),this.showError.bind(this,F.getText("SERVER_ERROR_FAILED_LOAD"),this.showSuggestedServers.bind(this)))}const $=bu.determineSuggestedWorldsForLoadBalancing(this.servers,K.q.instance.prodigy.gameContainer.get("80c-6fa4"));B.suggested_worlds_count=$.length;for(let V=0;V<$.length;V++){const k=$[V];j.Aq$.isDefined(k)&&this.createButton(k,this.content,V%3*350+140,140*Math.floor(V/3)+210,V+1,null==k?void 0:k.name,this.showSuggestedServers.bind(this))}this.content.add(K.q.instance.prodigy.create.sprite(520,530,q._.General_core_json,"server-icon")).tint=8111468,K.q.instance.prodigy.create.font(this.content,560,540,F.getText("SERVER_WIZARDS_ONLINE"),{size:20}),K.q.instance.prodigy.create.textButton(this.content,880,650,{size:fo.LG,text:F.getText("SERVERS_BUTTON_MORE_WORLDS"),icon:"map"},this.showAllServers.bind(this));let H=un.o.getLatestClassID(U.owners,U.playerTeachers,U.playerParents);if(H<=0&&!U.isClassCodeAttached&&(H=null),this.isAutoSelect)if(j.Aq$.isDefined(H)){const U=this.determineClassWorld(H,this.servers);j.Aq$.isDefined(U)?(B.auto_connect=!0,B.auto_connect_type="class_world",k.endTracing(fu.u.ServerMenuSuggestedServers,B),this.autoConnect(U)):(j.VyI.log("Server.showSuggestedServers - couldn't find a class world for this player. Going to manual select mode",j.$bb.Verbose),B.auto_connect_failed=!0,B.auto_connect_fail_reason="no_class_world",k.endTracing(fu.u.ServerMenuSuggestedServers,B),this.isAutoSelect=!1)}else j.VyI.log("Server.showSuggestedServers - couldn't find a teacher-owned class for this player. Going to manual select mode",j.$bb.Verbose),B.auto_connect_failed=!0,B.auto_connect_fail_reason="no_teacher_class",k.endTracing(fu.u.ServerMenuSuggestedServers,B),this.isAutoSelect=!1;this.isAutoSelect||U.hasCompletedTutorial()&&G.meetsRequirementsDeprecated(9)?(B.manual_selection=!0,k.endTracing(fu.u.ServerMenuSuggestedServers,B)):(this.isAutoSelect=!0,B.auto_connect=!0,B.auto_connect_type="new_player",k.endTracing(fu.u.ServerMenuSuggestedServers,B),this.autoConnect($[0],!0)),this.isAutoSelect||(this._metrics.openTime=j.Aq$.isDefined(this._metrics.openTime)?this._metrics.openTime:Date.now()),this.isAutoSelect=!1}autoConnect(k,B=!1){this.backButton.visible=!1,this.playOfflineButton.visible=!1,this._metrics.clickTime=Date.now(),this._metrics.worldName=k.name,this.sendServerSelectedEvent(0),this.connect(k,this.onAutoConnectFail.bind(this,B))}playOffline(){this._metrics.offline=!0,this._metrics.clickTime=Date.now(),this._metrics.worldName="Offline";const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;delete k.getPlayerData().connectedWorldServerName,k.updated=!0,this.sendServerSelectedEvent(0),this.exitMenu(!0)}onAutoConnectFail(k=!1){this.isAutoSelect=!1,k?this.playOffline():this.showAllServers()}determineClassWorld(k,B){let U=null,F=null;return B.length>0?(F=B.sort(((k,B)=>k.id.toString().localeCompare(B.id.toString()))),U=F[k%F.length]):j.VyI.log("Server.determineClassWorld - worldData array is empty. Could not determine class world",j.$bb.Verbose),U}showAllServers(){const k=K.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(fu.u.ServerMenuShowAllServers);const B={};this._metrics.openTime=j.Aq$.isDefined(this._metrics.openTime)?this._metrics.openTime:Date.now(),this.content.removeAll(!0),this.playOfflineButton.visible=!0,this.backButton.visible=!0;const U=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);if(!j.Aq$.isDefined(this.servers)){K.q.instance.prodigy.create.font(this.content,0,320,U.getText("SERVER_LOADING_LIST"),{size:30,width:this.game.width,align:"center"});return void K.q.instance.prodigy.gameContainer.get("c97-bd0d").getWorldList(this.showAllServers.bind(this),this.showError.bind(this,U.getText("SERVER_ERROR_FAILED_LOAD"),this.showAllServers.bind(this)))}const F=this.servers.sort(((k,B)=>k.name.localeCompare(B.name)));B.total_worlds_count=F.length,this.serverPage=K.q.instance.prodigy.create.element(this.content,200,180),this.scroll=K.q.instance.prodigy.create.scrollBar(this.content,60,180,345,this.setPage.bind(this,F)),this.scroll.setPages(Math.floor((F.length-1)/9+1)),K.q.instance.prodigy.create.textButton(this.content,880,650,{size:fo.LG,text:U.getText("SERVERS_BUTTON_MY_WORLDS"),icon:"star"},this.showSuggestedServers.bind(this)),B.all_servers_displayed=!0,k.endTracing(fu.u.ServerMenuShowAllServers,B)}setPage(k,B){this.serverPage.removeAll(!0);let U=0;for(let F=9*B;F<9*B+9&&F{this._metrics.clickTime=Date.now(),this._metrics.buttonIndex=G,this._metrics.worldName=H,this.sendServerSelectedEvent(G),this.connect(k,V)}),this),j.Aq$.isDefined(k.meta)){let B;if(j.Aq$.isDefined(k.meta.ID)&&"pet"===k.meta.type){const U=le.t.getItem("pet",k.meta.ID);("spine"===$.get(U,"metadata.assets.default.type",null)||$.get(U,"metadata.assets.spine",!1))&&(B={x:-.06,y:.05})}W.add(K.q.instance.prodigy.icon.createFromData(k.meta,0,0,B))}K.q.instance.prodigy.create.font(W,85,-2,k.name);const Y=k.full<=80?8111468:k.full<95?15194464:14307665;for(let j=0;j<5;j++){const B=W.add(K.q.instance.prodigy.create.sprite(39*j+96,36,q._.General_core_json,"server-icon"));B.visible=k.full>0&&k.full>=20*j,B.tint=Y}return W}sendSessionStartMetric(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=this._metrics,U={world:B.offline?"offline":k.world.name,world_availability:B.offline?null:k.world.full,world_position:B.buttonIndex,time:j.Aq$.isDefined(B.openTime)?Math.round((B.clickTime-B.openTime)/1e3):null};j.Aq$.isDefined(k.primaryParentID)&&(U.parentID=k.primaryParentID),this._segment.connection.sendServerConnectedEvent({name:this._metrics.worldName,duration:j.Aq$.isDefined(B.clickTime)?(Date.now()-B.clickTime)/Vt.A.SECONDS_TO_MILLISECONDS_MULTIPLIER:null})}))}sendServerSelectedEvent(k){var B;this._segment.connection.sendServerSelectedEvent({name:this._metrics.worldName,duration:j.Aq$.isDefined(this._metrics.openTime)?(Date.now()-this._metrics.openTime)/Vt.A.SECONDS_TO_MILLISECONDS_MULTIPLIER:null,availability:null===(B=this.servers[k])||void 0===B?void 0:B.full,position:k})}connect(k,B){const U=K.q.instance.prodigy.gameContainer.get("afa-b7c5");U.startTracing(fu.u.ServerMenuConnect);const F={server_name:(null==k?void 0:k.name)||"unknown",server_id:(null==k?void 0:k.id)||"unknown",server_fullness:(null==k?void 0:k.full)||0},G=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);if(!this.isAutoSelect&&k.full>=100)F.error="world_full_before_connect",this.showError(G.getText("SERVER_ERROR_WORLD_SELECTED_FULL"),B);else{this.content.removeAll(!0),K.q.instance.prodigy.create.font(this.content,0,320,G.getText("SERVER_CONNECTING_MESSAGE",j.Aq$.isDefined(k.name)?k.name:"server"),{size:30,width:this.game.width,align:"center"});K.q.instance.prodigy.gameContainer.get("c97-bd0d").joinMultiplayerServer(k,"zone-login",(()=>{const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;B.getPlayerData().connectedWorldServerName=k.name,B.updated=!0,this.connected(!0)}),this.connected.bind(this,!1,B),this.connected.bind(this,!1,B,G.getText("SERVER_ERROR_WORLD_FULL")))}U.endTracing(fu.u.ServerMenuConnect,F)}connected(k,B=$.noop,U){j.Aq$.isDefined(this)&&j.Aq$.isDefined(this.game)&&(this.content.removeAll(!0),k?this.exitMenu(!0):this.showError(j.Aq$.isDefined(U)?U:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SERVER_ERROR_FALLBACK"),B))}showError(k,B){this.content.removeAll(!0),K.q.instance.prodigy.create.panel(this.content,240,260,16,4),K.q.instance.prodigy.create.font(this.content,270,300,k,{size:30,width:740,align:"center"}),K.q.instance.prodigy.create.textButton(this.content,465,430,{size:fo.LG,text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SERVERS_BUTTON_BACK_TO_WORLDS"),icon:"back"},B),this._segment.connection.sendServerConnectionFailedEvent({name:this._metrics.worldName,duration:j.Aq$.isDefined(this._metrics.openTime)?(Date.now()-this._metrics.openTime)/Vt.A.SECONDS_TO_MILLISECONDS_MULTIPLIER:null,fail_reason:k})}exitMenu(k,B){var U,F;B||(Pt.pF.isNativeApp()&&(window.postMessage(JSON.stringify({type:"ENTER_GAME_WORLD"}),window.location.origin),this._gameNativeAppNotificationProvider.triggerNotification({triggerType:uu.$P.EnterGameWorld})),this.sendSessionStartMetric());const G=K.q.instance.prodigy.gameContainer.get("afa-b7c5"),$={success:k,cancelled:!!B,offline_mode:!!(null===(U=this._metrics)||void 0===U?void 0:U.offline)};if(this._metrics.worldName&&($.selected_world=this._metrics.worldName),G.endTracing(fu.u.ServerMenuSelection,$),null===(F=this.callback)||void 0===F||F.call(this,k,B),B)super.close();else{this.playOfflineButton.destroy(),this.backButton.destroy(),this.content.destroy();const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);K.q.instance.prodigy.create.font(this,0,320,k.getText("ENTERING_WORLD"),{size:30,width:this.game.width,align:"center"}),this.parent.on("removed",(()=>super.close()))}}destroy(){K.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(fu.u.ServerMenuSelection,{completed:!1}),super.destroy()}}bu.SUGGESTED_NUM=6,(0,G.Cg)([(0,j.fFd)("c47-20b6"),(0,G.Sn)("design:type",Ge.Y)],bu.prototype,"_segment",void 0),(0,G.Cg)([(0,j.fFd)("5a6-53a5"),(0,G.Sn)("design:type",Object)],bu.prototype,"_gameNativeAppNotificationProvider",void 0);var pu=U(54584);class vu extends Ar.H{constructor(k,B,U,F){super(k,B,U,F,"achievementsPanel"),this._categoryScroll=null,this._categoryIndex=0;const G=le.t.getCategoryItems("achievement"),H=K.q.instance.prodigy.gameContainer.get("db5-fb6e"),V=G.filter((k=>{if(k.data.requirements){const B=H.meetsRequirementsDeprecated(k.data.requirements);return B||j.VyI.log(`Achievement ${k.data.title} does not meet requirements.`,j.$bb.Verbose),B}return!0})),W=$.groupBy(V,(k=>k.data.group)),q=K.q.instance.prodigy.achievements;this._data=le.t.getCategoryItems("achievementGroup").map((k=>Object.assign(Object.assign({},k),{achievements:W[k.ID],unclaimedRewards:q.getUnclaimedRewards(W[k.ID]).length})));const z=Dn.N.getAllTowerData().filter((k=>j.Aq$.isDefined(k.achievementGroupTag))).map((k=>k.achievementGroupTag));z.length>0&&(this._data=this._data.filter((k=>!z.includes(k.data.title)))),K.q.instance.game.broadcaster.addAppListener(oi.f7.ClaimedRewardsUpdated,this.updateUnclaimedRewards,this),this.createAchievementsScrollview().then((()=>{this.createCategoriesScrollview(),this.selectCategory(0)}))}updateUnclaimedRewards(k){var B,U;this._achievementScrollview.init(this._data[this._categoryIndex]);const F=$.groupBy(k,(k=>k.data.group));for(const G of this._data)G.unclaimedRewards=null!==(U=null===(B=F[G.ID])||void 0===B?void 0:B.length)&&void 0!==U?U:0;this.updateBadges(this._categoryScroll.getCurrentIndex())}createCategoriesScrollview(){this._categoryPanels=$.times(9,(k=>this.createCategory(k))),this._categoryScroll=K.q.instance.prodigy.create.slider(this,310,0,360,!0,!1),this._categoryScroll.reset(this._data.length,9,0,(k=>this.updateCategoryPanels(k)))}createCategory(k){const B=K.q.instance.prodigy.create.panel(this,0,40*k,8,1,"lb");return B.category=K.q.instance.prodigy.create.font(B,8,6,"",{}),B.setClickable((()=>this.selectCategory(k))),B}selectCategory(k){const B=this._categoryScroll.getCurrentIndex();this._categoryIndex=B+k,this.updateCategoryPanels(B),this._achievementScrollview.init(this._data[this._categoryIndex])}updateCategoryPanels(k){this._categoryPanels.forEach(((B,U)=>{B.category.setText(K.q.instance.prodigy.achievements.getCategory(this._data[k+U])),B.changePanel(U===this._categoryIndex-k?"lb-green":"lb")})),this.updateBadges(k)}updateBadges(k){this._categoryPanels.forEach(((B,U)=>{var F;null===(F=B.badge)||void 0===F||F.destroy();const G=this._data[k+U].unclaimedRewards;G>0&&(B.badge=K.q.instance.prodigy.create.notificationBadge(B,G),B.badge.position.set(274,4))}))}createAchievementsScrollview(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.prodigy.gameContainer.get("d0e-64fd"),B=k.loadFromGUID(Ei.l.TransformRelayObject),U=B.findComponent(j.y4o).getRootContainer();U.position.set(452,36),this.addChild(U),yield Promise.all([K.q.instance.prodigy.gameContainer.get(j.t5G.AssetLoader).loadAssets([q._.Ui_eg_bountyrun_json]),(()=>(0,G.sH)(this,void 0,void 0,(function*(){this._achievementScrollview=(yield k.loadWithDependenciesFromGUID(Ei.l.AchievementScrollview,B)).findComponent(pu.x)})))()])}))}destroy(k){K.q.instance.game.broadcaster.removeAppListener(oi.f7.ClaimedRewardsUpdated,this),super.destroy(k)}}class gu extends Ar.H{constructor(k,B,U,F){super(k,B,U,F),this.requestsPerPage=3,this.scroll=null,this.content=null,this.lastIndex=0,this._duelInviteService=null,this._duelInviteService=K.q.instance.prodigy.gameContainer.get("636-444c"),this.create()}create(){this.content=K.q.instance.prodigy.create.element(this,320,40),this.scroll=K.q.instance.prodigy.create.slider(this,820,40,380,!0,!0),this.scroll.reset(this._duelInviteService.getInvites().length,1,-1,this.setMail.bind(this)),this._duelInviteService.onInviteRemoved.add(this.process,this),this._duelInviteService.onInviteReceived.add(this.process,this),this._duelInviteService.onInviteCancelled.add(this.process,this)}setMail(k=0){this.lastIndex=k,this.content.removeAll(!0);const B=this._duelInviteService.getInvites();for(let U=0;U{Ne.e.rejectInvite(U)})),K.q.instance.prodigy.create.button(F,340,50,q._.General_icons_json,"yes",(()=>{Ne.e.acceptInvite(De.VB.Standard,U)}))}destroy(k={children:!0}){this._duelInviteService.onInviteRemoved.remove(this.process,this),this._duelInviteService.onInviteReceived.remove(this.process,this),this._duelInviteService.onInviteCancelled.remove(this.process,this),super.destroy(k)}}var mu=U(68231),yu=U(50118);class _u extends Ka.W{constructor(k,B){super(k,B,18,{isModal:!1,backgroundAlpha:0},[q._.Ui_social_feed_json,q._.Ui_education_badges_json]),this.currentCollection=0,this.numberOfCollections=1,this.badgeData=[],this.badgesNames=["Stone","Amber","Garnet","Emerald","Ruby","Topaz","Amethyst","Diamond"],this.topicFillFrames=["gray-large-fill","yellow-large-fill","bronze-large-fill","green-large-fill","pink-large-fill","gold-large-fill","purple-large-fill","blue-large-fill"],this.collectionElements=[],this.game=k,this.name="badgesMenu";try{this.badgeData=K.q.instance.prodigy.education.getAllTopicBadges()}catch(e){this.badgeData=[]}this.numberOfCollections=null!==this.badgeData?this.badgeData.length:0;const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;super.queuePostCreateCallback((()=>{this.collectionElements=[this.badgeProgressSlider,this.badgeProgressText,this.collectionNameText,this.collectionIcon,this.leftButton,this.rightButton]}),(()=>{this.setupArrows()}),(()=>{this.switchCollection(U.grade-1)}),(()=>{this.setupScrollBar()}))}setupScrollBar(){this.topicScrollView.linkScrollBar(this.topicScrollBar)}setupArrows(){this.skillsMasteredText.setText(`Skills Mastered: ${_u.getAllSkillsMastered(this.badgeData)}`),this.badgesEarnedText.setText(`Badges Completed: ${_u.getAllBadgesCompleted(this.badgeData)}`),this.leftButton.onClickCallback=()=>{this.switchCollection(-1)},this.rightButton.onClickCallback=()=>{this.switchCollection(1)},K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_BADGES,ln.B.BREADCRUMB_CLICKED_BADGES_BUTTON)}switchCollection(k){const B=0===this.badgeData.length;for(let G=0;G=this.numberOfCollections?this.currentCollection=0:this.currentCollection<0&&(this.currentCollection=this.numberOfCollections-1),this.collectionIcon.setImageFrameName(`collections-${this.badgeData[this.currentCollection].gameIconAssetId}`),this.collectionNameText.setText(`${this.badgesNames[this.currentCollection]} Badges`),this.checkForBreadcrumbs(this.badgeData[this.currentCollection]);const U=this.badgeData[this.currentCollection].topics;this.fillTopics(U);const F=_u.getBadgesCompleted(this.badgeData[this.currentCollection].topics);this.badgeProgressSlider.setActive3SlicedImage(`scroll-tracks/${this.topicFillFrames[this.currentCollection]}`),this.badgeProgressSlider.setPercentComplete(F/U.length,!0),this.badgeProgressText.setText(`${F}/${U.length} Badges`)}checkForBreadcrumbs(k){let B=!1;const U=K.q.instance.prodigy.education.getRankUpBadges();let F=0;if(j.Aq$.isDefined(U)&&U.length>0)for(let G=0;G=k.topics[F].ranks[k.topics[F].ranks.length-1]);F=G}this.collectionIconBreadcrumb.visible=B,B&&U.splice(F,1)}fillTopics(k){this.topicScrollView.clearScrollView();for(let B=0;B=B.ranks[G]&&k[`progressStar${U[G]}`].setImageFrameName("tier-on");_u.setSkillsProgress(k,B)}static setSkillsProgress(k,B){let U=0;if(B.numSkillsMastered>=B.ranks[B.ranks.length-1])k.topicProgressText.setText("Complete"),U=1;else for(let F=0;F=k[U].ranks[k[U].ranks.length-1]&&B++;return B}static getAllSkillsMastered(k){let B=0;for(let U=0;U=k[U].topics[F].ranks[k[U].topics[F].ranks.length-1]&&B++;return B}addTransparent(k){super.addTransparent(0),this.background.eventMode="none"}}var Eu,wu=U(47878);!function(k){k[k.Leaderboard=0]="Leaderboard",k[k.BattleRequests=1]="BattleRequests",k[k.Bounty=2]="Bounty",k[k.Award=3]="Award",k[k.Badge=4]="Badge"}(Eu||(Eu={}));class Tu extends Hh.a{constructor(k,B){super(k,B,0,0,K.q.instance.prodigy.textureMenu),this.content=null,this.hasPendingBattleRequests=!1,this._duelInviteService=null,this._menuHeader=null,this._activeViewButton=null,this._headerPromise=null,this._duelInviteService=K.q.instance.prodigy.gameContainer.get("636-444c"),this._noRequestsFilter=new Sd.N,this._noRequestsFilter.desaturate(),this._noRequestsFilter.brightness(.45,!0),K.q.instance.prodigy.load.assets([q._.Ui_shipwreck_progress_json],(()=>{this.createMenu()})),this._duelInviteService.onInviteReceived.add(this.updateBattleRequestIndicator,this),this._duelInviteService.onInviteRemoved.add(this.updateBattleRequestIndicator,this),this._duelInviteService.onInviteCancelled.add(this.updateBattleRequestIndicator,this),this.currentInterfaceName=ph.B.Social}createMenu(){this.addTransparent(),this.hasPendingBattleRequests=this._duelInviteService.getInvites().length>0;const k=K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_BADGES,ln.B.BREADCRUMB_CLICKED_BADGES_BUTTON);this.createBaseSetup(30,16,"bases/backgroundwood","awardsBackground",[],!0,null,{closeButton:{key:q._.Ui_shared_json,frameName:"buttons/close",offset:{x:-20,y:-23}},banner:{atlasID:148,frameName:"banner/banner",width:28},buttons:{iconOffset:{x:60,y:0},offset:{x:344,y:0}}},!0);const B=K.q.instance.prodigy.gameContainer.get("d0e-64fd");this._headerPromise=B.loadWithDependenciesFromGUID(Ei.l.SocialMenuHeader).then((B=>{this._menuHeader=B.findComponent(wu.p),B.findComponent(Hd.$).rootContainer.setParent(this),this._menuHeader.leaderboardsButton.onEnabledClick.add(this.setMode.bind(this,Eu.Leaderboard)),this._menuHeader.battleRequestsButton.onEnabledClick.add(this.setMode.bind(this,Eu.BattleRequests)),this._menuHeader.awardsButton.onEnabledClick.add(this.setMode.bind(this,Eu.Award)),this._menuHeader.badgesButton.onEnabledClick.add(this.setMode.bind(this,Eu.Badge)),this.updateBadge(K.q.instance.prodigy.achievements.getUnclaimedRewards()),K.q.instance.game.broadcaster.addAppListener(oi.f7.ClaimedRewardsUpdated,this.updateBadge,this),this.hasPendingBattleRequests?this.setIndicatorActive(this._menuHeader.battleRequestsButton,!0):(this._menuHeader.battleRequestsButton.lockState(Zh.K.Disabled),this.enableButtonFilter(this._menuHeader.battleRequestsButton,!0));let U=Eu.Leaderboard;if(!K.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirementsDeprecated(58)){this._menuHeader.badgesButton.lockState(Zh.K.Disabled),this._menuHeader.leaderboardsButton.lockState(Zh.K.Disabled),this.enableButtonFilter(this._menuHeader.badgesButton,!0),this.enableButtonFilter(this._menuHeader.leaderboardsButton,!0),this._menuHeader.badgesButton.GameObject.active=!1,this._menuHeader.leaderboardsButton.GameObject.active=!1,U=Eu.Bounty;const k=[this._menuHeader.battleRequestsButton,this._menuHeader.awardsButton];let B=-260;k.forEach((k=>{B+=120,k.GameObject.transform.setPositionX(k.GameObject.transform.localPosition.x+B)}))}this.create(),U=this.hasPendingBattleRequests?Eu.BattleRequests:U,this.setMode(U),k||this.setIndicatorActive(this._menuHeader.badgesButton,!0),this._headerPromise=null})).catch((k=>{var B;j.RQr.logError(k,"Failed to load social menu header"),null===(B=this._headerPromise)||void 0===B||B.cancel(),this._headerPromise=null}))}setActive(k){this._menuHeader.GameObject.active=k,super.setActive(k)}setIndicatorActive(k,B){k.GameObject.findComponentInChildren(yu.a).GameObject.parent.active=B}updateBadge(k){const B=k.length;this._menuHeader.awardsButton.GameObject.findComponentInChildren(_l.e).updateNumberedNotificationBadge(B>0,B)}setMode(k){var B,U,F;super.setMode(k),this.content&&this.content instanceof _u?this.content.close():null===(B=this.content)||void 0===B||B.destroy();let G="";switch(null===(U=this._activeViewButton)||void 0===U||U.unlockState(),k){case Eu.BattleRequests:G="BattleRequests",this._activeViewButton=this._menuHeader.battleRequestsButton,this.content=new gu(this.game,this,80,200);break;case Eu.Award:G="Award",this._activeViewButton=this._menuHeader.awardsButton,this.content=new vu(this.game,this,80,200);break;case Eu.Badge:G="Badge",this._activeViewButton=this._menuHeader.badgesButton,this.content=new _u(this.game,this);break;case Eu.Leaderboard:G="Leaderboard_class_vs_class",this._activeViewButton=this._menuHeader.leaderboardsButton,this.content=new mu.Z(this.game,this,0,0)}null===(F=this._activeViewButton)||void 0===F||F.lockState(Zh.K.Disabled),this.page=k,K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendTabEvent({tabName:G,interfaceName:ph.B.Social,interfaceType:bi.Wm.Menu})}updateBattleRequestIndicator(){this.hasPendingBattleRequests=this._duelInviteService.getInvites().length>0,this.enableButtonFilter(this._menuHeader.battleRequestsButton,!this.hasPendingBattleRequests),this.hasPendingBattleRequests?this.page===Eu.BattleRequests?this._menuHeader.battleRequestsButton.lockState(Zh.K.Disabled):this._menuHeader.battleRequestsButton.unlockState():this._menuHeader.battleRequestsButton.lockState(Zh.K.Disabled),this.setIndicatorActive(this._menuHeader.battleRequestsButton,this.hasPendingBattleRequests)}enableButtonFilter(k,B){k.GameObject.findComponentsInChildren(j.y4o).forEach((k=>{k.getRootContainer().filters=B?[this._noRequestsFilter]:null}))}close(){var k,B,U;j.Aq$.isDefined(this.content)&&this.content instanceof _u&&this.content.close(),null===(B=null===(k=this._menuHeader)||void 0===k?void 0:k.GameObject)||void 0===B||B.destroy(),K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:ph.B.Social,interfaceType:bi.Wm.Menu,closeMethod:bi.Lv.X,instanceType:Ai.N.Interface}),null===(U=this._headerPromise)||void 0===U||U.cancel(),this._headerPromise=null,super.close()}destroy(k){var B;this._duelInviteService.onInviteReceived.removeAll(this),this._duelInviteService.onInviteRemoved.removeAll(this),this._duelInviteService.onInviteCancelled.removeAll(this),K.q.instance.game.broadcaster.removeAppListener(oi.f7.ClaimedRewardsUpdated,this),null===(B=this.content)||void 0===B||B.destroy(),this.content=null,this._menuHeader=null,this._activeViewButton=null,super.destroy(k)}}class Su{constructor(k,B,U){this.game=k,this.model=B,this.requestID=U}setUserID(k){this.model.userID=k}getUserID(){return this.model.userID}setUsername(k){this.model.username=k}getUsername(){return this.model.username}acceptRequest(){K.q.instance.prodigy.friendsListNetworkHandler.acceptFriendRequest(this.getUserID(),this.requestID)}rejectRequest(){K.q.instance.prodigy.friendsListNetworkHandler.rejectFriendRequest(this.getUserID(),this.requestID)}}class Au{constructor(){this.userID=-1,this.username=""}}class Cu extends Ar.H{constructor(k,B,U,F,G){super(k,U,0,0);const $=K.q.instance.prodigy.create.panel(this,F+10,G,14,2,"mail"),H=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);$.add(K.q.instance.prodigy.create.sprite(3,3,q._.General_icons_json,"mail-heart")),K.q.instance.prodigy.create.font($,39,8,H.getText("FRIEND_REQUEST_ADD_FRIEND"),{size:16}),this.mainText=K.q.instance.prodigy.create.font($,20,40,"",{fontID:8,size:20});const V=K.q.instance.prodigy.create.button($,490,0,q._.General_icons_json,"close",K.q.instance.prodigy.open.messageBoxPrefab.bind(K.q.instance.prodigy.open,{title:"FRIENDS_LIST_CONFIRM_CANCEL_TITLE",text:"FRIENDS_LIST_CONFIRM_CANCEL_BODY",buttonState:Sr.D.YesNoButtons,confirmCallback:B.rejectRequest.bind(B)}));Tn.J.centreObject(V,null,40,null,V.height);const W=K.q.instance.prodigy.create.button($,V.x-50-20,0,q._.General_icons_json,"yes",B.acceptRequest.bind(B));Tn.J.centreObject(W,null,40,null,W.height)}renderName(k){this.visible=j.Aq$.isDefined(k),this.visible&&this.mainText.setText(k)}}class Ou extends Hh.a{constructor(k,B,U){super(k,B,0,0,K.q.instance.prodigy.textureMenu),this.friendRequests=[],this.requestControllers=[],this.requestViews=[],this.requestsPerPage=4,this.offset=0,this.onClose=U,this.friendRequests=[],this.requestControllers=[],this.requestViews=[],this.create(),k.broadcaster.addAppListener(oi.sd.GotFriendRequestList,this.setupFriendRequests.bind(this),this,"FriendsList",!1),k.broadcaster.addAppListener(oi.sd.RequestAccepted,this.acceptRequestSuccessful.bind(this),this,"FriendsList",!1),k.broadcaster.addAppListener(oi.sd.RequestRejected,this.rejectRequestSuccessful.bind(this),this,"FriendsList",!1),k.broadcaster.broadcast(oi.sd.ClearFriendRequestsCache,"FriendsList",[]),this.loadPage(this.offset)}create(){this.addTransparent();const k=this.game.width/40-14,B=this.game.height/40-1,U=40*k-22,F=40*B-22,G=11,$=K.q.instance.prodigy.create.element(this,.5*(this.game.width-40*k),20),H=K.q.instance.prodigy.create.element($,0,0);let V,W,z;K.q.instance.prodigy.create.panel(H,0,0,k,B,"shine"),H.add(new Pr.C(this.game,G,149,U,40,q._.Tiled_sprites_json,"blue-top")),H.add(new Pr.C(this.game,G,189,U,320,q._.Tiled_sprites_json,"blue-mid")),H.add(new Pr.C(this.game,G,509,U,40,q._.Tiled_sprites_json,"blue-top2")),K.q.instance.prodigy.create.panel(H,40,40,k-2,2,"banner"),K.q.instance.prodigy.create.font(H,0,60,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("FRIEND_REQUESTS_TITLE"),{fontID:9,size:36,width:U,align:"center",lineHeight:38}),K.q.instance.prodigy.create.button($,U-18,-10,q._.General_icons_json,"close",this.close.bind(this));for(let j=0;jthis.requestsPerPage?K.q.instance.prodigy.friendsListNetworkHandler.getFriendRequestList(null,1):this.refreshUI()}renderPaginationButtons(){this.offset>0?this.prevPage.setActive():this.prevPage.setInactive(),j.Aq$.isDefined(this.friendRequests[this.offset+this.requestsPerPage])?this.nextPage.setActive():this.nextPage.setInactive()}loadPage(k){if(this.offset+=k,k<0)this.setupFriendRequests(this.friendRequests);else{const k=0===this.offset?2*this.requestsPerPage:this.requestsPerPage;this.offset+k+1>this.friendRequests.length?K.q.instance.prodigy.friendsListNetworkHandler.getFriendRequestList(this.offset>0?this.offset+this.requestsPerPage:this.offset,0===this.offset?2*this.requestsPerPage:this.requestsPerPage):this.setupFriendRequests(this.friendRequests)}}}class Iu extends Hh.a{constructor(k,B,U,F,G){super(k,B,0,0,K.q.instance.prodigy.textureMenu),this.rewards=null,this.mailData=null,this.segmentData=null,this.content=null,this.randomizedRewardArray=[{item:{type:"item",ID:76,N:5},weight:9.09},{item:{type:"item",ID:77,N:5},weight:9.09},{item:{type:"item",ID:166,N:5},weight:9.09},{item:{type:"item",ID:165,N:5},weight:9.09},{item:{type:"item",ID:160,N:5},weight:9.09},{item:{type:"item",ID:118,N:3},weight:9.09},{item:{type:"item",ID:119,N:3},weight:9.09},{item:{type:"item",ID:121,N:3},weight:9.09},{item:{type:"item",ID:122,N:3},weight:9.09},{item:{type:"item",ID:120,N:3},weight:9.09},{item:{type:"item",ID:117,N:3},weight:9.09}],this.mailData=U,this.rewards=F,this.segmentData=G,k.broadcaster.addAppListener(oi.zr.MarkAsRead,(()=>{this.close()}),this,oi.HG.Mailer),K.q.instance.prodigy.load.assets([J.Q.Spine_parent_reward_json,J.Q.Spine_member_reward_json],(()=>{this.create()}))}create(){super.create(),this.addTransparent(.75);const k=K.q.instance.prodigy.create.element(this,.5*(this.game.width-780),100),B=K.q.instance.prodigy.create.element(k,0,0);this.content=K.q.instance.prodigy.create.element(B,0,0),this.openParentReward()}close(){this.game.broadcaster.removeAppListener(oi.zr.MarkAsReadFailure,this,oi.HG.Mailer),this.game.broadcaster.removeAppListener(oi.zr.MarkAsRead,this,oi.HG.Mailer),super.close()}openParentReward(){const k=K.q.instance.prodigy.event.create(),B=K.q.instance.prodigy.create.element(this.content,310,330);B.visible=!0;const U=this.rewards.length<=0?this.game.add.spine(0,0,J.Q.Spine_parent_reward_json):this.game.add.spine(75,0,J.Q.Spine_member_reward_json);U.setAnimationByName(0,"animation",!1),B.add(U),k.delay(50),k.set(B,"visible",!1),k.delay(150),k.set(B,"visible",!0),k.delay(2e3),k.function(this.receiveReward.bind(this)),k.start()}receiveReward(){var k;this.rewards.length<=0?(K.q.instance.prodigy.open.gotItem(this.getRewards(),this.close.bind(this),null,"parent-reward",null,!1,this.segmentData),this.game.broadcaster.broadcast(oi.zr.MarkAsRead,oi.HG.MailView,[this.markReadSuccess.bind(this),this.mailData])):(K.q.instance.prodigy.open.gotItem(this.rewards,this.close.bind(this),null,"memberBox-reward",null,null,null!==(k=this.segmentData)&&void 0!==k?k:{source_type:gn.C.Container}),this.game.broadcaster.broadcast(oi.zr.MarkAsRead,oi.HG.MailView,[this.markReadSuccess.bind(this),this.mailData]))}markReadSuccess(){j.VyI.log("Mail Read Success",j.$bb.Verbose)}getRewards(){let k=[];const B=$.get(this.mailData,"membership",0);return 0===B?k=[{item:{type:"item",ID:77,N:1},weight:50},{item:{type:"item",ID:76,N:1},weight:50}]:1===B&&(k=this.randomizedRewardArray),[wn.o.weightedArrayElement(k).item]}}var Du,Ru=U(63693),Pu=U(52491),Mu=U(29853),Nu=U(5679),xu=U(52211),Lu=U(8763);!function(k){k[k.DefaultState=0]="DefaultState",k[k.AddingFromTeamCard=1]="AddingFromTeamCard",k[k.AddingFromPetDetails=2]="AddingFromPetDetails"}(Du||(Du={}));class ku extends mh.y{constructor(k,B){super(K.q.instance.game,k,Ei.l.PetBookMenu,B,!0),this._teamCards=[],this._currentPetBookState=Du.DefaultState,this._teamCardSelected=null,this._petAddOperationState={},this.onCardSelected=new j.HN0,this.onTeamSwapped=new j.HN0,this.onTeamChanged=new j.HN0,this._petListIndexToIdMap=new Map,this.isModal=!1,K.q.instance.prodigy.load.assets([Z.c.Sfx_moving_pet_position,Z.c.Sfx_adding_pet_to_team,Z.c.Sfx_open_petinfo_yourpet]),this._kennel=this._loggedInPlayer.player.kennel,this._injectablePropertiesDictionary={[tr.ML.PetBookBackgroundClicked]:this.onBackgroundClicked.bind(this),[tr.ML.UniquePetsTotal]:this.getUniquePetsText()},this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(bh.Eu.PetMergeYourTeam),this.onPrefabLoaded.addOnce((()=>{this._inventoryCardSpawner=j.wa5.getActiveScene().container.get(tr.xO.PetCardPetSpawner),this._inventoryScrollView=j.wa5.getActiveScene().container.get(tr.xO.PetBookScrollView),this._inventoryScrollView.onMouseScrollWheelUsed.add(this.destroyTooltip.bind(this)),this.setUpMenu()})),K.q.instance.prodigy.game.broadcaster.addAppListener(oi.ig.EvolveEnd,(()=>{this.updateAllCards()}),this)}getUniquePetsText(){const k=this._kennel.getNumUniquePets(),B=this._kennel.getTotalUniquePets();return this._localizer.getText("PET_BOOK_DIFFERENT_PETS_TOTAL",k,B)}setUpMenu(){this.setUpTeamCards(),this.setUpInventoryCards();K.q.instance.prodigy.gameContainer.get("12f-4e29").isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_STARTED)&&nh.N.cacheCanShowPetMergeTutorial()&&this.setUpFTUEState(),this._kennel.setPetToTopPosition()}setUpFTUEState(){this.enableCloseButton(!1);const k=nh.N.getChosenPetForMergeRankFTUE(),B=le.t.getItem("pet",k.ID);K.q.instance.game.broadcaster.addAppListener(oi.ki.FtueCompleted,(()=>{K.q.instance.game.broadcaster.removeAppListener(oi.ki.FtueCompleted,this),this.enableCloseButton(!0)}),this),this.openPetDetailsMenu(B,k)}enableCloseButton(k){Ja.d.updateInjectedValues(this.prefabContainer,{[tr.ML.ShowCloseButton]:k})}setUpInventoryCards(){const k=this.buildPetDataList(!1);Ja.d.updateInjectedValues(this.prefabContainer,{[tr.ML.PetDataList]:k})}setUpTeamCards(){const k=j.wa5.getActiveScene().container.get(tr.xO.TeamCardsParent).GameObject;this._teamCards=k.findComponentsInChildren(xu.V),this._teamCards.forEach(((k,B)=>{k.setup(B),k instanceof Mu.J&&k.addListenerToSignal(k.onPetInfoClicked,this.onInfoButtonClicked.bind(this)),k.addListenerToSignal(k.onPetCardClicked,this.onTeamCardClicked.bind(this)),k.addListenerToSignal(k.onPetRemoved,this.onPetRemovedFromTeam.bind(this))}))}buildPetDataList(k){let B=[];const U=Eh.P8.sortPetList(this._kennel.getPrimaryPets()),F=Eh.P8.canPlayerAccessPetMergeFeature(this._loggedInPlayer.player),G=this.isSelecting(),j=U.map((B=>Object.assign({},Lu.j.GetOwnedPetCardInjectionValues(B,((B,U)=>{this.onInventoryCardClicked(B,U,k)}),G,k,F))));if(B.push(...j),this._currentPetBookState===Du.DefaultState){const k=Eh.P8.getExcludedPetIDs(Eh.tA.NoOwnership),U=le.t.getCategoryItems("pet").filter((B=>!this._kennel.hasPet(B.ID)&&!k.includes(B.ID))),F=(0,Dt.G)(oh.J);let[j,$]=[[],[]],[H,V]=[[],[]];const W=k=>k.reduce(((k,B)=>(k[this._loggedInPlayer.player.encounters.hasPetBeenEncountered(B.ID)?0:1].push(B),k)),[[],[]]);F?([H,V]=U.reduce(((k,B)=>(k[Eh.P8.isPetEpic(B.ID)?0:1].push(B),k)),[[],[]]),[j,$]=W(V)):[j,$]=W(U);const q=Eh.P8.sortPetItems(j).map((k=>Lu.j.GetSeenPetCardInjectionValues(k.ID,((k,B)=>{this.onInventoryCardClicked(k,B,!1)}),G)));if(B.push(...q),F&&H.length>0){Eh.P8.sortPetItems(H);const k=new Map,U=B=>(k.has(B)||k.set(B,this._battlePassQuestManager.isPetBattlePassReward(B)),k.get(B));H.sort(((k,B)=>{const F=U(k.ID),G=U(B.ID);return F&&!G?-1:!F&&G?1:0}));const F=H.map((k=>Lu.j.GetSeenPetCardInjectionValues(k.ID,((k,B)=>{this.onInventoryCardClicked(k,B,!1)}),this.isSelecting(),U(k.ID))));B.push(...F)}const K=Eh.P8.sortPetItems($).map((k=>Lu.j.GetUnknownPetCardInjectionValues(k.ID,((k,B)=>{this.showTooltip(k,this._localizer.getText("PET_BOOK_KEEP_PLAYING"))}),G)));B.push(...K);const z=Gt.R.loadData(Ft.r.PetOwnershipRestrictions_json),Y=new Set(z.noOwnership);B=B.filter((k=>!Y.has(k.PET_ID)))}return this._petListIndexToIdMap.clear(),U.forEach(((k,B)=>{this._petListIndexToIdMap.set(k.uniqueID,B)})),B.map((k=>({prefabGuid:Ei.l.PetBook_PetCard,data:k})))}updateSinglePetInventoryCard(k,B){var U;const F=this._petListIndexToIdMap.get(k.uniqueID),G=Eh.P8.canPlayerAccessPetMergeFeature(this._loggedInPlayer.player);j.Aq$.isDefined(F)&&(null===(U=this._inventoryCardSpawner)||void 0===U||U.updateDataAtIndex(F,{prefabGuid:Ei.l.PetBook_PetCard,data:Lu.j.GetOwnedPetCardInjectionValues(k,((k,U)=>{this.onInventoryCardClicked(k,U,B)}),this.isSelecting(),B,G)}))}updateAllCards(){this.updateTeamCards(),this.updateInventoryCards(!1)}setPetBookToSelectionState(k,B){this.setPetBookState(k),this.updateTeamCardsState(),this.updateInventoryCards(B)}updateInventoryCards(k){var B;const U=this.buildPetDataList(k);null===(B=this._inventoryCardSpawner)||void 0===B||B.updateData(U)}updateTeamCardsState(){this._teamCards.forEach((k=>{var B,U;k instanceof Mu.J&&(this._currentPetBookState===Du.DefaultState?k.setCardToDefaultState():k.setCardToSelectionState(k===this._teamCardSelected,null!==(U=null===(B=this._teamCardSelected)||void 0===B?void 0:B.hasData())&&void 0!==U&&U,this._currentPetBookState===Du.AddingFromPetDetails))}))}selectTeamCard(k){this._teamCardSelected!==k&&(this._teamCardSelected=k,this.onCardSelected.dispatch(k))}updateTeamCards(){this._teamCards.forEach((k=>{k.updateCard()}))}addPetFromPetDetails(k){const B=this._kennel.findEmptyTeamIndex();B>=0?(this._kennel.setTeamPosition(k,B),this.onPetSelectionEnded(),this.onTeamChanged.dispatch(),this.updateSinglePetInventoryCard(k,!1),K.q.instance.prodigy.audio.playSFX(Z.c.Sfx_adding_pet_to_team,"add-pet"),K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendTeamUpdatedEvent(le.t.getItem("pet",k.ID).data.name,null,{pet_added_level:k.level,pet_added_rank:Eh.P8.getPetDisplayMergeRank(k.ID,k.uniqueID)})):(this.setInitialData(k,B),this.setPetBookToSelectionState(Du.AddingFromPetDetails,!1),this.onPetSelectionStarted(),this.updateSinglePetInventoryCard(k,!0))}completeAdd(k,B){const U=this._petAddOperationState.petData?this._petAddOperationState.petData:k,F=j.Aq$.isDefined(this._petAddOperationState.position)&&this._petAddOperationState.position>=0?this._petAddOperationState.position:B;if(!U||!j.Aq$.isDefined(F))return void this.onPetSelectionEnded();const G=this._kennel.getTeamPosition(F)?this._kennel.getTeamPosition(F).getName():null;K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendTeamUpdatedEvent(le.t.getItem("pet",U.ID).data.name,G,{pet_added_level:U.level,pet_added_rank:Eh.P8.getPetDisplayMergeRank(U.ID,U.uniqueID)}),j.Aq$.isDefined(U.team)&&this._kennel.removeAtTeamPosition(U.team),this._kennel.setTeamPosition(U,F),this._kennel.setPetToTopPosition(),this.onPetSelectionEnded(),K.q.instance.prodigy.audio.playSFX(61,"add-pet")}onPetRemovedFromTeam(k,B){K.q.instance.prodigy.audio.playSFX(62,"moving-pet"),K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendTeamUpdatedEvent(null,this._kennel.getTeamPosition(B).getName()),this._kennel.removeAtTeamPosition(B),this._kennel.setPetToTopPosition(),this.onPetSelectionEnded(),this.onTeamChanged.dispatch(),this.updateSinglePetInventoryCard(k,!1),this.updateTeamCards()}swapTeam(k,B){var U,F,G,j;const $=k.cardPosition,H=B.cardPosition;K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendTeamPositionChangedEvent({character:(null===(U=this._kennel.getTeamPosition(H))||void 0===U?void 0:U.getName())===this._loggedInPlayer.player.getName()?"player":null===(F=this._kennel.getTeamPosition(H))||void 0===F?void 0:F.getName(),position_new:Object.values(Ru.Io)[$],position_old:Object.values(Ru.Io)[H],character_2:(null===(G=this._kennel.getTeamPosition($))||void 0===G?void 0:G.getName())===this._loggedInPlayer.player.getName()?"player":null===(j=this._kennel.getTeamPosition($))||void 0===j?void 0:j.getName()}),this._kennel.swapTeamPositions($,H),this._currentPetBookState===Du.AddingFromTeamCard&&(this._petAddOperationState.position=$),this.onTeamSwapped.dispatch(k,B),this.onPetSelectionEnded(),K.q.instance.prodigy.audio.playSFX(62,"moving-pet")}onPetSelectionEnded(){this._inventoryScrollView.GameObject.active=!0,this._teamCardSelected=null,this._petAddOperationState={},this.resetTeamAndPetBookToDefaultState(),this.setPetBookToSelectionState(Du.DefaultState,!1),Ja.d.updateInjectedValues(this.prefabContainer,{[tr.ML.IsSelecting]:!1})}onPetSelectionStarted(){Ja.d.updateInjectedValues(this.prefabContainer,{[tr.ML.IsSelecting]:!0})}resetTeamAndPetBookToDefaultState(){this.setPetBookState(this._currentPetBookState),this.updateTeamCardsState(),this.updateTeamCards()}setInitialData(k,B){this._petAddOperationState.petData=k,this._petAddOperationState.position=B}setPetBookState(k){this._currentPetBookState!==k&&(this._currentPetBookState=k)}onTeamCardClicked(k){if(k instanceof Nu.t)this.onPetSelectionEnded();else{if(!this._petAddOperationState.petData)return null===this._teamCardSelected?(this.selectTeamCard(k),this.setPetBookToSelectionState(Du.AddingFromTeamCard,!0),void this.onPetSelectionStarted()):void(this._teamCardSelected!==k?this.swapTeam(this._teamCardSelected,k):this.onPetSelectionEnded());this.completeAdd(this._petAddOperationState.petData,k.cardPosition)}}onInfoButtonClicked(k,B){this.onPetSelectionEnded(),this.openPetDetailsMenu(k,B)}onInventoryCardClicked(k,B,U){if(!this._inventoryScrollView.wasDraggedSinceLastMouseDown)if(this.isSelecting())if(U&&this._teamCardSelected){if(j.Aq$.isDefined(B.team))return void this.showTooltip(B,this._localizer.getText("PET_ALREADY_ON_TEAM"));this.completeAdd(B,this._teamCardSelected.cardPosition)}else this.onPetSelectionEnded();else this.openPetDetailsMenu(k,B)}onBackgroundClicked(){this._inventoryScrollView.wasDraggedSinceLastMouseDown||this._currentPetBookState!==Du.DefaultState&&this.onPetSelectionEnded()}openPetDetailsMenu(k,B){var U;const F=null!=B?B:k,G=null===(U=K.q.instance)||void 0===U?void 0:U.prodigy.open.petDetailsMenu(F,this.onPetDetailsClosed.bind(this,F));G&&(this._segment.featureCommon.sendButtonEvent({buttonName:"pets",destinationName:"pet_details_window",interfaceType:bi.Wm.Window,interfaceName:ph.B.PetsWindow,saveClickInfo:"pet_details_window"}),K.q.instance.prodigy.audio.playSFX(66,"open-pet-submenu"),this._kennel.hasPet(k.ID)&&this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(bh.Eu.PetMergeSelectPet),G.onPrefabLoaded.add((()=>this.prefab.active=!1)),G.onAddPetToTeam.add(this.addPetFromPetDetails.bind(this)),G.onRemovePetFromTeam.add(this.onPetRemovedFromTeam.bind(this)),G.onEvolvePet.add(this.onPetEvolved.bind(this)),G.onPetMerged.add(this.updateAllCards.bind(this)),G.onPetLevelUp.add((k=>{this.updateInventoryCards(!1),this.updateTeamCards()})),G.onPetGearChanged.add((k=>{this.updateInventoryCards(!1),this.updateTeamCards()})))}onPetDetailsClosed(k){this.prefab.active=!0;const B=this.getPetIndex(k);j.Aq$.isDefined(B)&&this._inventoryScrollView.scrollToChild(B,ku.SELECTION_BORDER_OFFSET)}getPetIndex(k){let B;if(j.Aq$.isDefined(k.uniqueID))B=this._petListIndexToIdMap.get(k.uniqueID);else{B=this.buildPetDataList(!1).findIndex((({data:B})=>B.PET_ID&&B.PET_ID===k.ID))}return B}onPetEvolved(){this.updateAllCards(),Ja.d.updateInjectedValues(this.prefabContainer,{[tr.ML.UniquePetsTotal]:this.getUniquePetsText()})}isSelecting(){return this._currentPetBookState===Du.AddingFromTeamCard||this._currentPetBookState===Du.AddingFromPetDetails}showTooltip(k,B){var U,F;const G=this.getPetIndex(k);if(void 0===G)return;const $=null===(F=null===(U=this._inventoryCardSpawner)||void 0===U?void 0:U.getSlotAtIndex(G))||void 0===F?void 0:F.attachedObject;if(!j.Aq$.isDefined($))return;const H={bodyText:B},V=uh.A.displayTooltipTargeted(void 0,this._inventoryScrollView.GameObject,H,$);j.Aq$.isDefined(V)&&(this._tooltip=V.GameObject,this._tooltip.setLayer(Pu.A.LEGACY_MENU_LAYER_NAME,!0))}destroyTooltip(){j.Aq$.isDefined(this._tooltip)&&this._tooltip.destroyDeferred()}destroy(){this.onCardSelected.dispose(),this.onTeamSwapped.dispose(),this.onTeamChanged.dispose(),K.q.instance.game.broadcaster.removeAppListener(oi.ki.FtueCompleted,this),K.q.instance.prodigy.game.broadcaster.removeAppListener(oi.ig.EvolveEnd,this),this.destroyTooltip(),this._teamCards.length=0,this._teamCardSelected=null,this._inventoryCardSpawner=null,this._inventoryScrollView=null,super.destroy()}}ku.SELECTION_BORDER_OFFSET=5,(0,G.Cg)([(0,Re.b)("e20-0fb0"),(0,G.Sn)("design:type",Wt.E)],ku.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,Re.b)("8dc-04eb"),(0,G.Sn)("design:type",Es.R)],ku.prototype,"_battlePassQuestManager",void 0),(0,G.Cg)([(0,Re.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],ku.prototype,"_localizer",void 0);var Bu=U(58182),Uu=U(17446),Fu=U(65732),Gu=U(46855),ju=U(16909);class $u extends mh.y{constructor(k,B,U){super(K.q.instance.game,k,Ei.l.PetDetailsScreen,B,!0),this.onRemovePetFromTeam=new j.HN0,this.onAddPetToTeam=new j.HN0,this.onEvolvePet=new j.HN0,this.onPetMerged=new j.HN0,this.onPetLevelUp=new j.HN0,this.onPetGearChanged=new j.HN0,this.isModal=!1,this.skipRenderTransparencyLayer=!1,this._activePlayer=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,this._segment.featureCommon.sendInterfaceEvent({interfaceName:ph.B.PetsWindow,interfaceType:bi.Wm.Window,originType:bi.$N.ButtonClick,originID:"pet_info_pop_up",instanceType:Ai.N.UI}),this._petData=U,K.q.instance.prodigy.game.broadcaster.addAppListener(oi.ig.Evolved,this.onEvolvePet.dispatch,this.onEvolvePet),K.q.instance.prodigy.game.broadcaster.addAppListener(oi.ig.EvolveEnd,(()=>{Eh.P8.showUniquePetsFeature()&&!this._activePlayer.kennel.isPrimaryPet(this._petData)&&this.close()}),this),this._injectablePropertiesDictionary=this.getInjectedData(),this.onPrefabLoaded.addOnce((()=>{this.populateMenuComponents(),this._mergeWidget.onPetMergeSuccess.add(((k,B)=>{this.onPetMerged.dispatch(k),this.refreshDisplay(),B&&this.onLevelUp()})),this._gearWidget.onGearMenuLoading.add((()=>{this.setLoadingScreenEnabled(!0)})),this._gearWidget.onGearMenuOpen.add((()=>{this.setLoadingScreenEnabled(!1)})),this._gearWidget.onGearMenuClosed.add((()=>{this.refreshDisplay(),this.onPetGearChanged.dispatch(this._petData)})),this.onEvolvePet.add(this.onPetEvolve,this),this.setupMenuComponents();const k={PET_REMOVE_FROM_TEAM_FUNCTION:this.onRemovedFromTeam.bind(this),PET_ADD_TO_TEAM_FUNCTION:this.onPetAddToTeamClicked.bind(this),BACK_TO_ALL_PETS_FUNCTION:this.close.bind(this),ON_LEVEL_UP:this.onLevelUp.bind(this),PET_COUNT:`x${this._activePlayer.kennel.getAllPetsByID(this._petData.ID).length}`};Ja.d.updateInjectedValues(this.prefabContainer,k);K.q.instance.prodigy.gameContainer.get("12f-4e29").isBreadcrumbComplete(ln.B.FEATURE_PET_MERGE,ln.B.BREADCRUMB_PET_MERGE_FTUE_STARTED)&&nh.N.cacheCanShowPetMergeTutorial()&&this.setUpFTUEState()}))}changeDisplayedPet(k){this._petData=k;const B=this.getInjectedData();Ja.d.updateInjectedValues(this.prefabContainer,B),this.setupMenuComponents(),this.onPetGearChanged.dispatch(this._petData)}refreshDisplay(){const k=this.getInjectedData();this._petInfoNavigationTabsController.setup(this._petData),this.injectPetDataIntoGearModule(),Ja.d.updateInjectedValues(this.prefabContainer,k),this.onPetGearChanged.dispatch(this._petData)}setupMenuComponents(){if(!!this._activePlayer.kennel.getPetByUniqueID(this._petData.uniqueID)){this._spellsWidgetController.setup(this._petData);Eh.P8.canPetAccessMergeRanks(this._petData.ID)?(this._mergeWidget.setup(this._petData,this.updatePetInfo.bind(this)),this._epicCounterWidget.active=!1):(this._mergeWidget.GameObject.active=!1,this._epicCounterWidget.active=!0)}else this._spellsWidgetController.GameObject.active=!1,this._mergeWidget.GameObject.active=!1,this._levelUpWidget.active=!1,this._gearWidget.GameObject.active=!1;this._petInfoNavigationTabsController.setup(this._petData),this.setLoadingScreenEnabled(!1),this.updateCurrencyDisplay(),this.injectPetDataIntoGearModule()}populateMenuComponents(){this._magicoinDisplay=j.wa5.getActiveScene().container.get(tr.OP.MagicoinDisplay).GameObject,this._goldDisplay=j.wa5.getActiveScene().container.get(tr.OP.GoldDisplay).GameObject,this._petInfoNavigationTabsController=j.wa5.getActiveScene().container.get(tr.OP.PetInfoWidgetController),this._mergeWidget=j.wa5.getActiveScene().container.get(tr.OP.MergeWidgetController),this._spellsWidgetController=j.wa5.getActiveScene().container.get(tr.OP.SpellsWidgetController),this._loadingDisplaySignal=j.wa5.getActiveScene().container.get(tr.OP.PetLoadingDisplay),this._epicCounterWidget=j.wa5.getActiveScene().container.get(tr.OP.EpicCounterWidget).GameObject,this._levelUpWidget=j.wa5.getActiveScene().container.get(tr.OP.LevelUpWidget).GameObject,this._gearWidget=j.wa5.getActiveScene().container.get(tr.OP.PetInfoPetGearWidget)}setUpFTUEState(){this._mergeWidget.onPetMergeClicked()}isPetCurrentlyCaptured(k){return j.Aq$.isDefined(k.catchDate)}isPetSeen(k){return this._activePlayer.encounters.hasPetBeenEncountered(k.ID)}onLevelUp(){const k=this.getInjectedData();!0===k[tr.hi.YourPetPanelEnableEvolveButton]&&(k[tr.hi.SpinePetEvolveBurst]=!0,k[tr.hi.SpinePetEvolveIdle]=!1),Ja.d.updateInjectedValues(this.prefabContainer,k),this._petInfoNavigationTabsController.updatePetInfo(),this._spellsWidgetController.updateCards(this._petData),this._mergeWidget.updateMergeProperties(),this.onPetLevelUp.dispatch(this._petData)}onPetEvolve(){if((0,Dt.G)(Bu.N)){const k=new fa.R(K.q.instance.prodigy.game,this._petData).getAvailableEvolutions(),B=this._activePlayer.kennel.getPrimaryPetById(k[0].evolveID);this.changeDisplayedPet(B)}else{const k=new j.HN0;Ja.d.updateInjectedValues(this.prefabContainer,{RESET_XP_BAR:k},!0),k.dispatch();const B=this.getInjectedData();this._petInfoNavigationTabsController.setup(this._petData),this._spellsWidgetController.updateCards(this._petData),Ja.d.updateInjectedValues(this.prefabContainer,B);Eh.P8.showUniquePetsFeature()&&this._petData.team&&!this._activePlayer.kennel.isPrimaryPet(this._petData)&&this._activePlayer.kennel.removeAtTeamPosition(this._petData.team)}}updatePetInfo(){this._petInfoNavigationTabsController.updatePetInfo()}getChargedPetInjectionValues(){const k={};if(j.Aq$.isDefined(this._petData.team)){const B=this._activePlayer.getChargedLevel();k[Fu.E.ChargedCreatureEffectTier]=Th.e.getChargedLevelTierFromLevel(B),k[Fu.E.ChargedCreatureEffectDisplayType]=B>0?Sh.X$.IDLE:Sh.X$.HIDDEN}return k}getInjectedData(){const k=le.t.getItem("pet",this._petData.ID),B=this.getPetDetailsData(k),U=this.getEvoLineInjectionValues(k),F=this.getChargedPetInjectionValues();return this._activePlayer.kennel.getPetByUniqueID(this._petData.uniqueID)&&K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendPetDetailsViewedEvent(k,"your-pet",{pet_level:this._petData.level,pet_rank:this._petData.mergeRank,gear_list:this._petData.gear,is_on_team:Eh.P8.isPetOnTeam(this._petData)}),Object.assign(Object.assign(Object.assign({},B),U),F)}getEvoLineInjectionValues(k){var B;const U=Eh.P8.GetEvolutionaryLine(k);for(;U.length>4&&U[0]!==k.ID;)U.shift();const F={[tr.hi.YourPetPanelEvoLineNumStages]:U.length};if(Ah.k.cachedDisabledEvolutionFeature)return F[tr.hi.YourPetHideEvolutionLine]=!0,F[tr.hi.YourPetShowEvolveInfo]=!1,F[tr.hi.YourPetPanelShowEvolveButton]=!1,F[tr.hi.YourPetShowEvolveSparkles]=!1,F;1===U.length&&(F[tr.hi.YourPetHideEvolutionLine]=!0);const G=[{id:tr.hi.YourPetPanelEvoLineStage1Id,seen:tr.hi.YourPetPanelEvoLineStage1Seen,rescued:tr.hi.YourPetPanelEvoLineStage1Rescued},{id:tr.hi.YourPetPanelEvoLineStage2Id,seen:tr.hi.YourPetPanelEvoLineStage2Seen,rescued:tr.hi.YourPetPanelEvoLineStage2Rescued},{id:tr.hi.YourPetPanelEvoLineStage3Id,seen:tr.hi.YourPetPanelEvoLineStage3Seen,rescued:tr.hi.YourPetPanelEvoLineStage3Rescued},{id:tr.hi.YourPetPanelEvoLineStage4Id,seen:tr.hi.YourPetPanelEvoLineStage4Seen,rescued:tr.hi.YourPetPanelEvoLineStage4Rescued}],$=this._activePlayer.encounters;for(let j=0;j0;F[k]=V,F[B]=W||q,F[H]=q}const H=U.findIndex((B=>k.ID===B))+1;F[tr.hi.YourPetPanelEvoLineOwnedStage]=H;const V=new fa.R(K.q.instance.prodigy.game,this._petData),W=(0,Dt.G)(Bu.N)&&(null!==(B=V.data.evolutionCount)&&void 0!==B?B:0)>0,q=Eh.P8.canPetEvolve(V,this._petData.level),z=V.getAvailableEvolutions(hi.s.activePlayerLevelCap),Y=z.length>0,Q=!!this._activePlayer.kennel.getPetByUniqueID(this._petData.uniqueID),X=Q&&Y&&!W,Z=(0,Dt.G)(Qo.y);F[tr.hi.YourPetPanelEnableEvolveButton]=q,F[tr.hi.YourPetPanelShowEvolveButton]=Z?q:X,F[tr.hi.YourPetShowEvolveSparkles]=q,F[tr.hi.YourPetShowEvolveInfo]=!W,F[tr.hi.YourPetShowEvolveSparkles]=q&&!W;const J=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),tt=$.hasPetBeenEncountered(this._petData.ID);let et;return et=Q?q?J.getText("PET_SCREEN_READY_TO_EVOLVE"):U.length>1?Y?J.getText("PET_SCREEN_GET_TO_LEVEL",z[0].lvl):J.getText("PET_SCREEN_MAX_EVOLUTION"):J.getText("PET_SCREEN_HAS_NO_EVOS"):tt?J.getText("PET_SCREEN_NOT_RESCUED"):J.getText("PET_SCREEN_NOT_SEEN"),F[tr.hi.YourPetEvolveInfoText]=et,F[tr.hi.YourPetPetEvolveButtonFunction]=this.openEvolutionMenu.bind(this),F[tr.hi.SpinePetEvolveBurst]=!1,F[tr.hi.SpinePetEvolveIdle]=Z?q:X,F}getPetDetailsData(k){var B,U,F,G,j,$,H;const V=this.isPetCurrentlyCaptured(this._petData),W=this.isPetSeen(this._petData),q=!V&&W,z=!V&&!W,Y=null!==(U=null===(B=k.data)||void 0===B?void 0:B.affinity)&&void 0!==U?U:"",Q=Fc.x.getElementDisplayName(Y),X=Eh.P8.isPetOnTeam(this._petData),Z=null!==(G=null===(F=k.data)||void 0===F?void 0:F.rarity)&&void 0!==G?G:Uu.E.Common,J=Eh.P8.getMaxOwnableLevel(this._petData.ID,this._petData.mergeRank),tt=new Gu.r(this._petData.stars,yo.V.Pet,{baseXp:0,memberXp:0,totalNonMemberXp:0},Math.max(J,this._petData.level));tt.levels=[null!==(j=this._petData.level)&&void 0!==j?j:0];const et=new fa.R(K.q.instance.prodigy.game,this._petData),it=hi.s.activePlayerLevelCap,st=et.getAvailableEvolutions(it).length>0,nt=this._loggedInPlayer.getLevel(),at=this._petData.level>=J,rt=this._petData.level=nt,dt=!st&&at&&!ht,lt=Ah.k.cachedDisabledEvolutionFeature;let ut="";if(ht)ut=lt?"INCREASE_MERGE_RANK_TO_LEVEL_UP":"PET_SCREEN_EVOLVE_NOTICE";else if(ct&&(ut="LEVEL_UP_YOUR_WIZARD_TO_LEVEL_UP_PET",lt&&nt>=it)){let k="";(null===($=this._activePlayer.difficultyUnlocks)||void 0===$?void 0:$.hard)?(null===(H=this._activePlayer.difficultyUnlocks)||void 0===H?void 0:H.expert)||(k=this._localizer.getText("EXPERT_MODE")):k=this._localizer.getText("HARD_MODE"),k.length>0&&(ut=this._localizer.getText("UNLOCK_NEW_MODE_TO_LEVEL_UP",k))}const ft=this._loggedInPlayer.player.getGold(),bt=this._hardCurrencyDataProvider.getBalance(27),pt=this._paymentManager.exchange({currency:27,value:bt},1).value;let[vt,gt]=at?[0,this._petData.level]:ju.M.getLevelPurchaseCost(this._petData.level,ot,ft);vt>ft&&!at&&([vt,gt]=ju.M.getLevelPurchaseCost(this._petData.level,ot,pt));const mt=this._paymentManager.exchange({currency:1,value:vt},27).value;let yt;return yt=W?Eh.P8.getPetDisplayName(this._petData,k):this._localizer.getText("UNKNOWN_QUESTION_MARKS"),{PET_NAME:null!=yt?yt:"",PET_ID:this._petData.ID,PET_DATA:this._petData,YOUR_PET_PANEL_PET_DATA:this._petData,IS_PET_OWNED:V,SHOW_GREYSCALE_FILTER:q,SHOW_SHADOW_FILTER:z,ELEMENTAL_ICON_FRAME:Ch.XP[k.data.affinity],ELEMENTAL_BASE_FRAME:Ch.bf[k.data.affinity],ELEMENTAL_TEXT:Q,SHOW_ON_YOUR_TEAM_BADGE:X,ENABLE_REMOVE_FROM_TEAM_BUTTON:X,ENABLE_ADD_TEAM_BUTTON:!X,PET_RARITY_TEXT:Tn.J.convertRarityToText(Z),PET_RARITY_RIBBON_FRAME:W?Z:-1,XP_BAR_INFO:tt,LEVEL_UP_BUTTON_LEVEL:gt,LEVEL_UP_BUTTON_COST_DIFFERENCE:vt-ft,LEVEL_UP_MAGICOIN_COST_DIFFERENCE:mt-bt,ENABLE_LEVEL_UP_BUTTON:rt,ENABLE_LEVEL_UP_NOTICE:ut.length>0,LEVEL_UP_BUTTON_NOTICE_TEXT:ut,LEVEL_UP_MAX_LEVEL_STATE:at,LEVEL_UP_BUTTON_COST:vt,LEVEL_UP_MAGICOIN_COST:mt,OTP_MISSING_MAGICOIN:mt-bt,MAX_LEVEL_REACHED:dt,SHOW_MAGICOIN_LEVEL_UP_OPTION:!this._hardCurrencyDataProvider.isHardCurrencyMemberLocked(mt)}}setLoadingScreenEnabled(k){this._loadingDisplaySignal.run(k)}injectPetDataIntoGearModule(){const k={[tr.hi.YourPetPanelPetData]:this._petData};Ja.d.updateInjectedValues(this.prefabContainer,k)}updateCurrencyDisplay(){if(this._goldDisplay){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getGold(),B={[tr.$u.CurrencyID]:1,[tr.$u.CurrencyAmount]:k};Ja.d.updateInjectedValues(this._goldDisplay,B)}if(this._magicoinDisplay){const k=this._hardCurrencyDataProvider.getBalance(27),B={[tr.$u.CurrencyID]:27,[tr.$u.CurrencyAmount]:k};Ja.d.updateInjectedValues(this._magicoinDisplay,B)}}onPetAddToTeamClicked(){this.onAddPetToTeam.dispatch(this._petData),this.close()}onRemovedFromTeam(){this.onRemovePetFromTeam.dispatch(this._petData,this._petData.team);const k=Eh.P8.isPetOnTeam(this._petData),B={[tr.hi.YourPetShowOnYourTeamBadge]:k,[tr.hi.YourPetPanelEnableRemoveFromTeamButton]:k,[tr.hi.YourPetEnableAddTeamButton]:!k};Ja.d.updateInjectedValues(this.prefabContainer,B)}destroy(){this.onRemovePetFromTeam.dispose(),this.onAddPetToTeam.dispose(),this.onEvolvePet.dispose(),this.onPetMerged.dispose(),this.onPetLevelUp.dispose(),this.onPetGearChanged.dispose(),K.q.instance.prodigy.game.broadcaster.removeAppListener(oi.ig.Evolved,this.onEvolvePet),K.q.instance.prodigy.game.broadcaster.removeAppListener(oi.ig.EvolveEnd,this),super.destroy()}openEvolutionMenu(){kc.K.openEvolutionPromptIfEligible(new Ad.r(K.q.instance.prodigy.game,this._petData),void 0,!1,bi.k.PetBook).catch(j.RQr.createHandler("Failed to open evolution prompt"))}}(0,G.Cg)([(0,Re.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],$u.prototype,"_localizer",void 0),(0,G.Cg)([(0,Re.b)("e20-0fb0"),(0,G.Sn)("design:type",Wt.E)],$u.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,Re.b)("5c7-e02d"),(0,G.Sn)("design:type",Hi.W)],$u.prototype,"_hardCurrencyDataProvider",void 0),(0,G.Cg)([(0,Re.b)("743-fd51"),(0,G.Sn)("design:type",Tl.E)],$u.prototype,"_paymentManager",void 0);class Hu extends Hh.a{constructor(k,B,U=null,F=null){super(k,B,0,0,K.q.instance.prodigy.textureMenu),this.onItemRecieved=new j.HN0,this.onItemPurchased=new j.HN0,this.purchaseConfirmationConfig=null,this.defaultMemberAd=null,this.storeData=null,this.storeID=-1,this._segment=K.q.instance.prodigy.gameContainer.get("c47-20b6"),this.purchaseConfirmationConfig=U,this.defaultMemberAd=F}getStore(){return this.storeData}itemClicked(k){const B=K.q.instance.prodigy.gameContainer,U=B.get("e20-0fb0").player;if(this._segment.shop.sendShopItemViewedEvent(vl.V1,this.storeData,k),U.isItemOwned({ID:k.getID(),type:k.getType()}))this.showOwnedMessage(k);else if("pet"===k.getType()&&U.kennel.isFull())K.q.instance.prodigy.open.message(B.get(j.$Bt.LocalizationService).getText("PURCHASING_MESSAGE_TOO_MANY_PETS_BODY"),null,null,B.get(j.$Bt.LocalizationService).getText("MESSAGE_TITLE_UH_OH"));else{const B=le.t.getItem(k.getType(),k.getID()).data;"dormbg"===k.getType()?K.q.instance.prodigy.open.houseItemInfo(k,this.onBuyCardClosed.bind(this,k,B),Lr.s.Buy):K.q.instance.prodigy.open.itemInfo(k,this.onBuyCardClosed.bind(this,k,B),Lr.s.Buy)}}showOwnedMessage(k){const B=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);let U="",F=B.getText("MESSAGE_TITLE_UH_OH");switch(k.getType()){case"dorm":U=B.getText("PURCHASING_MESSAGE_TOO_MANY_ITEMS_BODY");break;case"dormbg":U=B.getText("PURCHASING_MESSAGE_ALREADY_LIVE_BODY"),F=null;break;case"hair":case"face":case"eyeColor":case"skinColor":case"hairColor":U=B.getText("PURCHASING_MESSAGE_ALREADY_LOOK_BODY");break;case"pet":U=B.getText("PURCHASING_MESSAGE_HAVE_PET_BODY");break;default:U=B.getText("PURCHASING_MESSAGE_HAVE_ITEM_BODY")}K.q.instance.prodigy.open.message(U,null,null,F)}onBuyCardClosed(k,B,U){if(U){const U=k.getCost()[0];if(this.sendBuyAnalytics(k,B),this.meetsMembershipRequirement(k,B)&&this.meetsCurrencyRequirement(U,B)&&this.meetsLevelRequirements(B)){let F=null;F=j.Aq$.isDefined(this.purchaseConfirmationConfig)?K.q.instance.prodigy.open.messageBoxPrefab.bind(K.q.instance.prodigy.open,{text:this.purchaseConfirmationConfig.message,buttonState:Sr.D.YesNoButtons,confirmCallback:this.buyItem.bind(this,k,B,U)}):this.buyItem.bind(this,k,B,U),F()}else this.meetsLevelRequirements(B,!1)?this.meetsMembershipRequirement(k,B,!1)?this._segment.shop.sendShopPurchaseFailedEvent(vl.V1,this.storeData,k,En.WE.NotEnoughCurrency):this._segment.shop.sendShopPurchaseFailedEvent(vl.V1,this.storeData,k,En.WE.MemberLocked):this._segment.shop.sendShopPurchaseFailedEvent(vl.V1,this.storeData,k,En.WE.LevelLocked)}}buyItem(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=Tn.J.getPurchasePrice(B,U);this._segment.shop.sendShopPurchaseCompletedEvent(vl.V1,this.storeData,k);const $=U.getType(),H=U.getID();"currency"===$&&1===H?F.changeGold(-G):F.backpack.consume($,H,G);const V=`${vl.V1}${this.storeData.getName()}`;this._segment.item.sendItemRemovedEvent(H,le.t.getItem($,H).name,$,U.getAmount(),{sink_id:V,sink_type:gn.C.Shop,instance_type:Ai.N.Interface,instance_id:this._segment.featureCommon.getCurrentInterfaceID(V)});let W=B;j.Aq$.isDefined(B.data)&&(W=B.data);const q=k.getType(),z=k.getID();"pet"===q&&(W={ID:z});const Y=this.getStore().getName(),Q={ID:z,type:q,N:1,data:W},X="store",Z={source_type:gn.C.Shop,instance_id:this._segment.featureCommon.getCurrentInterfaceID(`${vl.V1}${this.storeData.getName()}`),instance_type:Ai.N.Interface};Hu.GOTITEM_EXEMPT_STORES.includes(Y)?Tn.J.bagItem(Q,this.game,X,Y,Z):K.q.instance.prodigy.open.gotItem([Q],(()=>{this.onItemRecieved.dispatch()}),null,X,Y,void 0,Z),this.onItemPurchased.dispatch(k)}meetsMembershipRequirement(k,B,U=!0){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!F.hasMembership()){if("pet"===k.getType()&&F.kennel.isFull())return U&&K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:Sn.o.FunnelCatchMorePets}),!1;if(1===$.get(B,"member",0))return U&&(K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:jh.k.BuyMemberItem,interfaceName:`${vl.V1}${this.storeData.getName()}`,interfaceType:bi.Wm.Menu,saveClickInfo:jh.k.BuyMemberItem}),K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:Sn.o.FunnelBuyMemberItem,conversionFunnelMetadata:`${k.getType()}-${k.getID()}`},jh.k.BuyMemberItem)),!1}return!0}meetsLevelRequirements(k,B=!0){if(j.Aq$.isDefined(k.lockLevel)){const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(U.getLevel(){U.hasMembership()||K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:Sn.o.FunnelEquipLevelLockedItem})}}return!1}}return!0}sendBuyAnalytics(k,B){const U=K.q.instance.prodigy.gameContainer;if(j.Aq$.isDefined(B.member)&&1===B.member){const B=U.get("e20-0fb0").player;if(!B.hasMembership()){let F={};const G=`${k.getType()}-${k.getID()}`;"pet"===k.getType()&&B.kennel.isFull()||(F={conversionFunnelName:Sn.o.FunnelBuyMemberItem,conversionFunnelMetadata:G});const j=Tn.J.showYouTubeMembershipAd(this.game,!0)?_n.R.Video:_n.R.Static;U.get("c47-20b6").purchase.sendFunnelStart({type:"Store-Buy-Member-Item",category:"Store",contentId:G,adType:j})}}}meetsCurrencyRequirement(k,B){const U=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=Tn.J.getPurchasePrice(B,k);if("currency"===k.getType()&&1===k.getID()){if(F.getGold(){this._segment.featureCommon.sendInterfaceEvent({interfaceName:`${vl.V1}${this.storeData.getName()}`,interfaceType:bi.Wm.Menu,closeMethod:bi.Lv.CloseButton}),F()},this.onBuy=G,this.storeSortOrder=V,this._originType=K,this.onItemRecieved.add((()=>{this.scrollbar.process()})),this.onItemPurchased.add((k=>{this.updatePlayerCurrency(),j.Aq$.isDefined(this.onBuy)&&this.onBuy(k)})),this._onLoadStart=q,this._onLoadCompleteCallback=W,this.create()}create(){this.addTransparent();const k=this.createBaseSetup(30,16,"shine",null,null,!0,null),B=K.q.instance.prodigy.create.element(k,-40,-40);B.setRenderState(!0),B.add(new Pr.C(this.game,51,240,1178,40,q._.Tiled_sprites_json,"blue-top")),B.add(new Pr.C(this.game,51,280,1178,300,q._.Tiled_sprites_json,"blue-mid")),B.add(new Pr.C(this.game,51,580,1178,40,q._.Tiled_sprites_json,"blue-top2")),this.spinner=this.add(K.q.instance.prodigy.create.sprite(640,360,q._.General_core_json,"loading")),this.spinner.anchor.set(.5,.5),this.game.add.tween(this.spinner,this).to({angle:360},2e3,j.GS3.Linear.None,!0,0,Vt.s.MAX_SAFE_INTEGER,!1),super.create(),K.q.instance.prodigy.gameContainer.get("a50-726e").getStore(this.storeID).then((([k,B])=>{B?this.onGetStoreSuccess(B):this.onGetStoreFailure(k)}))}createItemCards(k,B){cr.l.removeAll(this.cards,!0);for(let U=B;U=k.length)K.q.instance.prodigy.create.panel(this.cards,G%4*180,220*Math.floor(.25*G),4,5,"empty");else{const k=F.getCost()[0],B=le.t.getItem(F.getType(),F.getID());K.q.instance.prodigy.create.item(this.cards,G%4*180,220*Math.floor(.25*G),{id:F.getID(),type:F.getType(),cost:{ID:k.getID(),type:k.getType(),N:Tn.J.getPurchasePrice(B.data,k)}},Lr.s.Store,(()=>{this.itemClicked(F)}))}}}getItemsForPage(k){const B=this.storeData.getPages()[k].getStoreItems();return j.Aq$.isDefined(this.storeSortOrder[k])?this.storeSortOrder[k](B):B}setMode(k){super.setMode(k);const B=this.getItemsForPage(k);this.scrollbar.reset(B.length-4,4,-1,this.createItemCards.bind(this,B)),this.scrollbar.process(),this.page=k}setupInfoPanel(){this.setupMemberAd()}onGetStoreSuccess(k){var B,U,F;j.Aq$.isDefined(this.game)&&(this.storeData=k,null===(B=this._onLoadStart)||void 0===B||B.call(this,k),this.spinner.destroy(),this.spinner=null,this.setupTabs(),this.setupStoreMerchant(),this.setupCurrencyDisplay(),this.setupInfoPanel(),this.cards=K.q.instance.prodigy.create.element(this,430,220),this.scrollbar=K.q.instance.prodigy.create.slider(this,this.cards.x+540+180,240,380,!0,!0),this.currentInterfaceName=`${vl.V1}${null===(U=this.storeData)||void 0===U?void 0:U.getName()}`,this._segment.featureCommon.sendInterfaceEvent({interfaceName:`${vl.V1}${this.storeData.getName()}`,interfaceType:bi.Wm.Menu,originType:this._originType,originID:null}),this.updatePlayerCurrency(),this.setMode(0),null===(F=this._onLoadCompleteCallback)||void 0===F||F.call(this))}onGetStoreFailure(k){j.VyI.log(`Store with ID: ${this.storeID} could not be loaded - ${k.getErrorMessage()}`,j.$bb.Warning);const B=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);K.q.instance.prodigy.open.message(B.getText("STORE_OPEN_FAILED_MESSAGE"),this.close.bind(this),null,B.getText("STORE_OPEN_FAILED_TITLE"))}setupStoreMerchant(){const k=this.storeData.getMerchantAvatar(),B=this.add(K.q.instance.prodigy.create.sprite(k.getPosition().x,k.getPosition().y,k.getAssetTag(),k.getAssetFrame()));B.scale.x=k.getScale().x,B.scale.y=k.getScale().y}setupTabs(){const k=this.storeData.getPages(),B=K.q.instance.prodigy.create.panel(this,80,80,3*k.length+6,2,"banner");for(let U=0;U{k.get("c47-20b6").purchase.sendFunnelStart({type:"Legacy-Store-Ad",category:"Store",contentId:`store-${this.storeID}`,adType:U}),K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:"Click-Membership-Ad",conversionStage:"Click-Ad"})},G=K.q.instance.prodigy.create.panel(this,80,380,8,5,"member");G.setClickable(F.bind(this,this.game)),K.q.instance.prodigy.create.font(G,10,10,B.getText("STORE_PROMPT_UNLOCK_ALL"),{align:"center",width:300}),K.q.instance.prodigy.create.font(G,10,140,B.getText("BUTTON_CLICK_HERE"),{align:"center",width:300,fontID:9,size:36});const $=G.add(K.q.instance.prodigy.create.sprite(7,75,q._.General_core_json,"overlay-small"));$.width=306,$.height=50,$.alpha=.2;const H=[];for(;H.length<3;){const k=wn.o.integerInRange(0,Vu.memberAdItems.length);-1===H.indexOf(k)&&(H[H.length]=k)}G.addChild(new ur.k(this.game,20,60,Vu.memberAdItems[H[0]],null)),G.addChild(new ur.k(this.game,120,60,Vu.memberAdItems[H[1]],null)),G.addChild(new ur.k(this.game,220,60,Vu.memberAdItems[H[2]],null))}}}Vu.memberAdItems=[Ut.E.getIconForType("follow",144),Ut.E.getIconForType("follow",146),Ut.E.getIconForType("follow",139),Ut.E.getIconForType("follow",140),Ut.E.getIconForType("follow",131),Ut.E.getIconForType("hat",74),Ut.E.getIconForType("hat",100),Ut.E.getIconForType("hat",119),Ut.E.getIconForType("hat",114),Ut.E.getIconForType("hat",116),Ut.E.getIconForType("hat",79),Ut.E.getIconForType("outfit",93),Ut.E.getIconForType("outfit",86),Ut.E.getIconForType("outfit",91),Ut.E.getIconForType("outfit",59),Ut.E.getIconForType("dorm",34),Ut.E.getIconForType("dorm",22),Ut.E.getIconForType("dorm",132),Ut.E.getIconForType("dorm",40),Ut.E.getIconForType("dorm",39),Ut.E.getIconForType("dorm",60),Ut.E.getIconForType("dorm",65),Ut.E.getIconForType("weapon",116),Ut.E.getIconForType("weapon",114),Ut.E.getIconForType("weapon",95),Ut.E.getIconForType("boots",40),Ut.E.getIconForType("boots",36),Ut.E.getIconForType("boots",37),Ut.E.getIconForType("boots",30)];var Wu=U(48982);class qu extends Ar.H{constructor(k,B,U,F,G,j){super(k,B,G,j),this.onIconPressed=null,this.itemIcon=null,this.quantityLabel=null,this.itemID=-1,this.quantityLabel=K.q.instance.prodigy.create.font(this,0,65,"0",{width:80,align:"right"}),this.setItemID(U),this.setQuantity(F)}setItemID(k){this.itemID=k,j.Aq$.isDefined(this.itemIcon)?this.itemIcon.loadNewTexture(Ut.E.getIconForType("dorm",k)):(this.itemIcon=this.add(K.q.instance.prodigy.create.sprite(0,0,Ut.E.getIconForType("dorm",k))),this.itemIcon.inputEnabled=!0,this.itemIcon.events.onInputDown.add(this.iconPressed,this))}setQuantity(k){this.quantityLabel.setText(`${k}`)}iconPressed(k,B){j.Aq$.isDefined(this.onIconPressed)&&this.onIconPressed.dispatch(this.itemID,Math.floor(B.x),Math.floor(B.y))}destroy(k={children:!0}){this.onIconPressed.dispose(),super.destroy(k)}}class Ku extends Ar.H{constructor(k,B,U,F){super(k,B,U,F),this.onIconPressed=new j.HN0,this.houseItems=[],this.pageNumber=0,this.itemIcons=[],this.pageBackground=null,this.prevPageButton=null,this.nextPageButton=null,this.pageBackground=this.add(K.q.instance.prodigy.create.sprite(25,30,q._.General_core_json,"overlay-light")),this.pageBackground.alpha=.2,this.pageBackground.width=670,this.pageBackground.height=50,this.pageBackground.visible=!1,this.prevPageButton=K.q.instance.prodigy.create.button(this,0,30,q._.General_icons_json,"back",this.decreasePageNumber.bind(this)),this.nextPageButton=K.q.instance.prodigy.create.button(this,670,30,q._.General_icons_json,"next",this.increasePageNumber.bind(this)),this.prevPageButton.visible=!1,this.nextPageButton.visible=!1}getItemCount(){return this.houseItems.length}showItems(k){this.houseItems=k.slice(),k.length>0?(this.showItemPages(!0),this.setPage(0),this.updatePrevPageButton(),this.updateNextPageButton()):this.showItemPages(!1)}setPage(k=0){this.pageNumber=j.cj9.clamp(k,0,this.getPageCount());const B=this.houseItems.slice(6*this.pageNumber,6*(this.pageNumber+1));for(let U=0;U-1){this.houseItems[B].N-=1,this.houseItems[B].N<=0&&this.houseItems.splice(B,1);const k=6*this.pageNumber;return B>=k&&B0?(this.pageNumber>this.getPageCount()-1?this.setPage(this.pageNumber-1):this.setPage(this.pageNumber),this.updateNextPageButton()):this.showItemPages(!1)),this.houseItems}return[]}increaseQuantity(k){let B=this.getItemIndex(k);-1===B&&(0===this.houseItems.length&&this.showItemPages(),B=this.houseItems.push({ID:k,N:0})-1),this.houseItems[B].N+=1,this.houseItems.sort(((k,B)=>k.ID-B.ID)),B=this.getItemIndex(k);const U=6*this.pageNumber;return B>=U&&BB.ID===k))}getPageCount(){return Math.ceil(this.houseItems.length/6)}increasePageNumber(){this.setPage(this.pageNumber+1),this.updateNextPageButton(),this.updatePrevPageButton()}decreasePageNumber(){this.setPage(this.pageNumber-1),this.updatePrevPageButton(),this.updateNextPageButton()}updatePrevPageButton(){this.pageNumber<=0?this.prevPageButton.setInactive():this.prevPageButton.isActive()||this.prevPageButton.setActive()}updateNextPageButton(){this.pageNumber>=this.getPageCount()-1?this.nextPageButton.setInactive():this.nextPageButton.isActive()||this.nextPageButton.setActive()}setItemIcon(k,B,U){if(k{this.showCategoryPage("Comfy")},category:"Comfy",title:"HOUSE_ITEM_CATEGORY_COMFY"},{icon:{ID:3,type:"dorm"},callback:()=>{this.showCategoryPage("Surface")},category:"Surface",title:"HOUSE_ITEM_CATEGORY_SURFACE"},{icon:{ID:6,type:"dorm"},callback:()=>{this.showCategoryPage("Plants")},category:"Plants",title:"HOUSE_ITEM_CATEGORY_PLANTS"},{icon:{ID:13,type:"dorm"},callback:()=>{this.showCategoryPage("Storage")},category:"Storage",title:"HOUSE_ITEM_CATEGORY_STORAGE"},{icon:{ID:18,type:"dorm"},callback:()=>{this.showCategoryPage("Wall")},category:"Wall",title:"HOUSE_ITEM_CATEGORY_WALL"},{icon:{ID:41,type:"dorm"},callback:()=>{this.showCategoryPage("Lamps")},category:"Lamps",title:"HOUSE_ITEM_CATEGORY_LAMPS"},{icon:{ID:22,type:"dorm"},callback:()=>{this.showCategoryPage("Items")},category:"Items",title:"HOUSE_ITEM_CATEGORY_ITEMS"}],this.trashIcon=K.q.instance.prodigy.create.button(this,1160,500,q._.General_icons_json,"dorm-trash",K.q.instance.prodigy.open.messageBoxPrefab.bind(K.q.instance.prodigy.open,{text:"HOUSE_EDITOR_CONFIRM_PACK_UP",buttonState:Sr.D.YesNoButtons,confirmCallback:()=>{this.removeAllItems()}})),this.updateTrashIcon(),this.rotateButton=K.q.instance.prodigy.create.button(this,0,0,q._.General_icons_json,"dorm-rotate",(()=>{this.rotateCurrentFocusedItem()})),this.rotateButton.visible=!1,this.rotateButton.sprite.anchor.set(.5,.5),this.game.broadcaster.broadcast(oi.Y1.HideHUD,oi.HG.HUD),this.setup(),this.setEditing(),this.game.input.onUp.add(this.inputReleased,this,-999)}menuSetup(){var k,B;super.menuSetup();const U=K.q.instance.prodigy.game.state.getCurrentState();null===(B=null===(k=U.getParentalConsentBanner)||void 0===k?void 0:k.call(U))||void 0===B||B.then((k=>{k&&(k.active=!1)})).catch(j.RQr.createHandler("Failed to get the parental consent banner when opening the house edit menu"));const F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this.showFrame("map",F.getText("HOUSE_EDITOR_TITLE"),this.categories);const G=K.q.instance.prodigy.create.textButton(this,0,0,{icon:"close",text:F.getText("BUTTON_CLOSE")},this.close.bind(this));this.showBtns([],[G]),this.updateCategoryTabState(),this.itemsScroll=new Ku(this.game,this,190,620),this.itemsScroll.onIconPressed.add(this.spawnHouseItem,this),this.btns[0].isActive()?this.btns[0].onDown():this.showCategoryPage(this.categories[0].category),this.editStartTime=Math.floor(Date.now()/1e3)}close(){var k,B;this.game.broadcaster.broadcast(oi.Y1.ShowHUD,oi.HG.HUD),this.game.broadcaster.broadcast(oi.F0.CloseEditor,this.game),this.setEditing(!1),this.game.input.onUp.remove(this.inputReleased,this);const U=K.q.instance.prodigy.game.state.getCurrentState();null===(B=null===(k=U.getParentalConsentBanner)||void 0===k?void 0:k.call(U))||void 0===B||B.then((k=>{k&&(k.active=!0)})).catch(j.RQr.createHandler("Failed to get the parental consent banner when closing the house edit menu")),super.close()}showCategoryPage(k){j.Aq$.isDefined(this.itemsScroll)&&(this.currentCategory=k,this.itemsScroll.showItems(this.getUnplacedItemsInCategory(k)))}updateCategoryTabState(){for(let k=0;k0?this.btns[k].setActive():this.btns[k].setInactive()}getUnplacedItemsInCategory(k){return K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.house.getUnplacedItems().filter((B=>{var U;const F=null===(U=le.t.getItem("dorm",B.ID))||void 0===U?void 0:U.data;return(null==F?void 0:F.category.toLowerCase())===k.toLowerCase()?F:null}))}getIndexOfCategory(k){return this.categories.findIndex((B=>B.category===k))}spawnHouseItem(k,B,U){this.clearFocusedItem();const F=j.cj9.snapToCeil(B,Or.G.HOUSE_ITEM_GRID_SNAP_INTERVAL),G=j.cj9.snapToFloor(U,Or.G.HOUSE_ITEM_GRID_SNAP_INTERVAL),$=K.q.instance.prodigy.create.houseItem(this.houseMap.content,k,Math.floor(F),Math.floor(G),0,this.houseMap).findComponent(Or.G);$.setEditable();this.game.time.events.addTimer(33,(k=>{const B=k.getRenderer().getInputHandler(),U=this.game.input.activePointer;if(U.isDown&&B){k.gameObject.position.set(0,0);const F=k.getRenderer();F.setPosition(U.position.x,U.position.y-.5*F.getHeight()),B._pointerData[U.id].isDown=!0,B.startDrag(U)}else k.gameObject.destroy()}),this,$),$.onItemDropped.addOnce(this.itemWasPlacedInHouse,this)}itemWasPlacedInHouse(k,B,U){if(this.itemsScroll.reduceQuantity(k.itemID),this.itemsScroll.getItemCount()<1){const k=this.getIndexOfCategory(this.currentCategory);this.resetButton(k),this.btns[k].setInactive(),this.currentBtn=-1}this.houseMap.addHouseItem(k.gameObject),this.registerHouseItemListeners(k);K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.house.setActive(k.itemID,B,U,0,0,0,0,0),k.gameObject.x=B,k.gameObject.y=U,this.updateTrashIcon()}setEditing(k=!0){if(j.Aq$.isDefined(this.houseMap))for(let B=0;B0;)this.removeHouseItem(this.houseMap.houseItems[0].findComponent(Or.G));this.updateTrashIcon()}updateTrashIcon(){this.houseMap.houseItems.length>0?this.trashIcon.setActive():this.trashIcon.setInactive()}removeHouseItem(k){this.clearFocusedItem(),this.houseMap.removeHouseItem(k.gameObject);const B=le.t.getItem("dorm",k.itemID).data.category,U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=U.house.data.active;for(let G=0;G0&&this.renderMenus[this.renderMenus.length-1].setActive(!0),this.closeChat()}setActiveMenu(k=null){j.Aq$.isDefined(k)&&(k.isModal?k instanceof mh.y&&k.obeyMenuStackVisibility?k.onPrefabLoaded.addOnce((()=>{this.pushActiveModal(k)})):this.pushActiveModal(k):this.renderMenus.push(k)),j.Aq$.isDefined(k)&&!k.isModal&&this.closeChat(),this.updateSentryTags()}setMenuInactive(k){let B=this.renderMenus.indexOf(k);-1===B&&(j.VyI.log("Attempted to remove a menu that is not in the renderMenus stack. Removing top menu instead.",j.$bb.Warning),B=this.renderMenus.length-1);const U=B===this.renderMenus.length-1;if(this.renderMenus.splice(B,1),U&&this.renderMenus.length>0)for(let F=this.renderMenus.length-1;F>=0&&(this.renderMenus[F].setActive(!0),j.Aq$.isDefined(this.renderMenus[F].isModal)&&!this.renderMenus[F].isModal);F--);j.Aq$.isDefined(k)&&!k.isModal&&this.closeChat(),this.updateSentryTags()}pushActiveModal(k){for(let B=0;B0&&this.renderMenus[this.renderMenus.length-1]instanceof Hh.a&&this.renderMenus[this.renderMenus.length-1].hideActiveElements(),this.updateSentryTags()}menuOpen(k){this.menuLayer.children.forEach((B=>{B.hide&&B.hide(k),B.onMenuOpen&&B.onMenuOpen(k)})),this.closeChat(),this.updateSentryTags()}close(k){for(let B=this.menus.length-1;B>=0;B--)this.menus[B]===k&&(this.menus.splice(B,1),K.q.instance.game.broadcaster.broadcast(oi.n8.FactoryMenuClosed));this.IsModalMenuOpen()||this.bitmapCacheGameRender(!1),this.updateSentryTags()}menuCloseAll(){if(!this._isClosingMenus){this._isClosingMenus=!0;for(let k=this.menus.length-1;k>=0;k--){const B=this.menus[k];this.isClosable(B)?null==B||B.close():null==B||B.destroy()}this.menus=[],this.bitmapCacheGameRender(!1),this.closeChat(),this._isClosingMenus=!1,this.updateSentryTags()}}menuCloseAllUntil(k=-1){if(!this._isClosingMenus){this._isClosingMenus=!0;for(let B=this.menus.length-1;B>k;B--){const k=this.menus[B];this.isClosable(k)?k.close():k.destroy()}this.IsModalMenuOpen()||this.bitmapCacheGameRender(!1),this._isClosingMenus=!1,this.updateSentryTags()}}menuCloseAllExcept(k){if(!this._isClosingMenus){this._isClosingMenus=!0;for(const B of this.menus)B!==k&&(this.isClosable(B)?B.close():B.destroy());this.IsModalMenuOpen()||this.bitmapCacheGameRender(!1),this._isClosingMenus=!1,this.updateSentryTags()}}menuCloseTopmost(k=1){if(this._isClosingMenus)return;this._isClosingMenus=!0;let B=0;for(let U=this.menus.length-1;U>=0&&B=0;B--){const U=this.menus[B];if(U.visible){if(U instanceof k)return!0;if(U instanceof mh.y&&U.prefab.findComponentInChildren(k))return!0}}return!1}findMenuByType(k,B=!0){return $.findLast(this.menus,(U=>U instanceof k&&(!B||U.visible)))}chat(k){if(K.q.instance.prodigy.world.getCurrentZone()===hn.A_.CRYSTALCAVERNS)return j.Aq$.isDefined(k)&&k(),void K.q.instance.prodigy.open.informationDialog(new bd.Z(this._localizer.getText("BUTTON_OKAY_CAPITAL"),void 0,Jc.E.Small,void 0,this._localizer.getText("MESSAGE_TITLE_OOPS"),this._localizer.getText("FEATURE_UNAVAILABLE_HERE")));this.chatMenu=new Zl(this.game,this.menuLayer,k),this.chatOpened.dispatch()}closeChat(){var k;null===(k=this.chatMenu)||void 0===k||k.close(),this.chatMenu=null}nameChange(k,B){this.openMenu(new Nl(this.game,this.menuLayer,k,B))}advancedNameChange(k,B){this.openMenu(new xl(this.game,this.menuLayer,k,B))}firstNameSelector(k,B){this.openMenu(new dc(this.game,this.menuLayer,k,B))}wizardNameSelector(k,B,U){this.openMenu(new Zc(this.game,this.menuLayer,k,B,U))}rating(k=null){Pt.pF.isNativeApp()?this.openMenu(new hu(this.game,this.menuLayer,k)):j.Aq$.isDefined(k)&&k()}choosePet(k,B){this.openMenu(new Jl(this.game,this.menuLayer,k,B))}server(k,B,U){this.openMenu(new bu(this.game,this.menuLayer,k,B,U))}serverSelectMode(k){this.openMenu(new lu(this.game,this.menuLayer,k))}houseEditorMenu(k,B){const U=new zu(this.game,this.menuLayer,k,B);return this.openMenu(U),U}pets(k){var B;const U=K.q.instance.prodigy.breadcrumbManager,F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(sh.I.shouldShowPetGearTutorialCached||nh.N.shouldShowPetMergeTutorial)sh.I.shouldShowPetGearTutorialCached?K.q.instance.game.broadcaster.broadcast(oi.bI.FtueStarted):nh.N.shouldShowPetMergeTutorial&&K.q.instance.game.broadcaster.broadcast(oi.ki.FtueStarted);else{const k=(null===(B=F.kennel)||void 0===B?void 0:B.getPets().length)>=3,G=U.isBreadcrumbComplete(ln.B.FEATURE_PET_UPGRADE_FTUE,ln.B.BREADCRUMB_SEEN_YOUR_TEAM_MENU);k&&!G&&U.completeBreadcrumb(ln.B.FEATURE_PET_UPGRADE_FTUE,ln.B.BREADCRUMB_SEEN_YOUR_TEAM_MENU)}if((0,Dt.G)(Qo.m)){const B=new ku(this.menuLayer,k);return this.openMenu(B),B}const G=this.isMenuOpen(Ud.o);if(!G){const B=new Ud.o(this.game,this.menuLayer,void 0,k);return this.openMenu(B),B}const j=this.findMenuByType(Ud.o);return G&&j&&k&&(j.closeCallback=k),j}yourTeam(k,B,U){const F=new Bd.Y(this.game,this.menuLayer,k,B,U);return this.openMenu(F),F}yourPet(k,B,U){if(!this.isMenuOpen(kd.O)){const F=new kd.O(this.game,this.menuLayer,k,B,U);return this.openMenu(F),F}return null}petDetailsMenu(k,B){if(this.isMenuOpen($u))return null;const U=new $u(this.menuLayer,B,k);return this.openMenu(U),U}postBattleLossMenu(k,B,U){if(this.isMenuOpen(Rh))return null;const F=new Rh(this.menuLayer,U,B,k);return this.openMenu(F),F}yourPetStandalone(k,B){const U=new Ud.o(K.q.instance.prodigy.game,K.q.instance.prodigy.open.menuLayer,(()=>{const F=K.q.instance.prodigy.open.yourPet(k,U.contentLayer,U.headerPrefab);B&&F.onLoaded.addOnce((()=>{F.petDataProvider.updateInjectedValues(B)})),U.headerPrefab.backToYourTeamButton.GameObject.active=!0,U.headerPrefab.backToYourTeamButton.onClick.addOnce((()=>{F.close(),U.close()}),this)}));return K.q.instance.prodigy.open.menus.push(U),U}yourPetGear(k,B,U,F){if(!this.isMenuOpen(Ld)){const G=new Ld(this.game,this.menuLayer,k,B,U,F);return this.openMenu(G),G}return null}petBook(k){const B=new Ed.M(this.game,this.menuLayer,k);return this.openMenu(B),B}petInfo(k,B){if(!this.isMenuOpen(Nd)){const U=new Nd(this.game,this.menuLayer,k,B);return this.openMenu(U),U}return null}parentalLinkSuccessPrompt(k){const B=new Ic(this.game,this.menuLayer,Cc.SUCCESS_POPUP_CONFIG,k);return this.openMenu(B),B}parentalLinkAtSchoolPrompt(k,B){this.openMenu(new Ic(this.game,this.menuLayer,Cc.AT_SCHOOL_POPUP_CONFIG,k,B))}parentalLoginPopup(){this.openMenu(new Dc(this.game,this.menuLayer))}mailer(k,B,U){const F=new td(this.game,this.menuLayer,U);return F.preprocess(),this.openMenu(F),F}networkError(k){const B=this._localizer.getText("NETWORK_ERROR");return this.messageBoxOkay(B,void 0,k)}openMail(k){const B=new Ac(this.game,this.menuLayer);return B.preprocess(k),this.openMenu(B),B}friendRequests(k){this.openMenu(new Ou(this.game,this.menuLayer,k))}itemInfo(k,B,U,F){const G=this.prefabMenu(Ei.l.ItemDetailsModal);return G.onPrefabLoaded.addOnce((G=>{const j=G.findComponentInChildren(Yu.m);j&&j.setup(k,U,B,F)})),G}houseItemInfo(k,B,U){this.openMenu(new nu(this.game,this.menuLayer,k,B,U))}social(){this.openMenu(new Tu(this.game,this.menuLayer))}boostSelect(k,B){this.openMenu(new jl.i(this.game,this.menuLayer,k,B))}card(k,B,U){{const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=K.q.instance.prodigy.gameContainer.get("c47-20b6"),j=(0,Dt.G)(Zo.q).enabled;G.featureCommon.sendButtonEvent({buttonName:jh.k.WorldPlayerPortrait,interfaceName:ph.B.Overworld,interfaceType:bi.Wm.Overworld,destinationName:j?ph.B.WizardCostumesMenu:ph.B.PlayerCard,saveClickInfo:jh.k.WorldPlayerPortrait}),(0,Dt.G)(Zo.q).enabled&&k===F?this.openWizardCostumesMenu(bi.$N.WorldObject,jh.k.WorldPlayerPortrait):this.openMenu(new Kl(this.game,this.menuLayer,k,B,U))}}arena(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.openMenu(new eu(this.game,this.menuLayer,k))}membershipSuccess(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("c47-20b6");F.featureCommon.sendInterfaceEvent({interfaceName:ph.B.KidsMlpUpgradeComplete,interfaceType:bi.Wm.Popup},U);const G=this.prefabMenu({prefabID:Ei.l.MembershipSuccess});return G.onDestroy.addOnce((()=>{F.featureCommon.sendButtonEvent({buttonName:jh.k.MembershipUpgradeOkay,interfaceType:bi.Wm.Popup,interfaceName:ph.B.KidsMlpUpgradeComplete}),null==B||B()})),G}nicknamer(k,B,U){this.openMenu(new ru(this.game,this.menuLayer,k,B,U))}gotItem(k,B,U,F,G,j=!1,$,H){const V=new iu.u(this.game,this.menuLayer,k,B,U,F,G,j,$,H);return this.openMenu(V),V}reward(k,B){this.openMenu(new Iu(this.game,this.menuLayer,k,B))}gotItemFanfare(k,B,U,F,G,$,H=!1,V){const W=this.gotItem(k,U,F,G,$,H,V);return K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(B).then((k=>{const B=k.findComponent(j.y4o).getRootContainer();B.position.set(W.centerX,W.centerY+50),W.addChildAt(B,W.children.indexOf(W.content)-1)})).catch(j.RQr.createHandler("Unable to load prefab")),W}messageBoxPrefab(k){var B,U,F,G;const $=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),H=k.title?$.getText(k.title,...null!==(B=k.titleArgs)&&void 0!==B?B:[]).toUpperCase():"";return null!==(U=k.buttonState)&&void 0!==U||(k.buttonState=Sr.D.OkayButton),K.q.instance.prodigy.open.prefabMenu({prefabID:Ei.l.MessageBox,runUpdate:!0,isModal:null===(F=k.isModal)||void 0===F||F,skipTransparency:!1,injectablePropertiesDictionary:{MESSAGE_BOX_SHOW_BANNER:!!k.title,MESSAGE_BOX_SHOW_CLOSE_BUTTON:null!==(G=k.showCloseButton)&&void 0!==G&&G,MESSAGE_BOX_SHOW_OKAY_BUTTON:k.buttonState===Sr.D.OkayButton,MESSAGE_BOX_SHOW_YES_NO_BUTTONS:k.buttonState===Sr.D.YesNoButtons,MESSAGE_BOX_BANNER_TEXT_KEY:H,MESSAGE_BOX_CONTENT_TEXT_KEY:k.text,MESSAGE_BOX_CONTENT_TEXT_ARGS:k.textArgs,MESSAGE_BOX_CONFIRM_CALLBACK:k.confirmCallback,MESSAGE_BOX_NO_CALLBACK:k.noCallback,MESSAGE_BOX_CONFIRM_BUTTON_TEXT_KEY:k.confirmButtonTextKey,MESSAGE_BOX_NO_BUTTON_TEXT_KEY:k.noButtonTextKey}})}message(k,B,U,F,G,j){const $=new Tc.p(this.game,this.menuLayer,G,j);return $.preprocess(k,U,F),this.openMenu($),$.queuePostCreateCallback($.setOkay.bind($,null,B)),$}classModeMessage(k,B,U,F,G,j,$){if("WORLD_LAMPLIGHT_TOWN"===$)if(K.q.instance.prodigy.skin.isFestivalActive("Summerfest")){const k=new Kh(this.game,this.menuLayer,j),$=this._localizer.getText("LAMPLIGHT_LOCKED_FESTIVAL");k.preprocess($,U,F,G),this.openMenu(k),k.queuePostCreateCallback(k.setOkay.bind(k,null,B))}else{this.prefabMenu(Ei.l.LamplightLockedPopup,B,!1).setGameRenderState(!0)}else{const $=new Kh(this.game,this.menuLayer,j);$.preprocess(k,U,F,G),this.openMenu($),$.queuePostCreateCallback($.setOkay.bind($,null,B))}}classCodeEntryDialogue(){const k=new Fh(this.game,this.menuLayer);return this.openMenu(k),k}lamplightLevelLock(k){K.q.instance.prodigy.open.message(this._localizer.getText("WORLD_MAP_ZONE_LEVEL_LOCKED",ql.X.getLevelRequirement(37)),null,null,this._localizer.getText(k),null,{isModal:!1})}springfestClassModeMessage(k,B,U,F){const G=new Lc(this.game,this.menuLayer,F);G.preprocess(k,null,U),G.queuePostCreateCallback(G.setOkay.bind(G,null,B)),this.openMenu(G)}twilightWheelPopup(k){const B=new qc(this.game,this.menuLayer,k);return this.openMenu(B),B}messageBox(k,B,U,F,G,j,$){const H=new Tc.p(this.game,this.menuLayer,j,$);return H.preprocess(k,F,G),this.openMenu(H),H.queuePostCreateCallback(H.setConfirm.bind(H,B,U)),H}messageBoxGeneric(k,B,U,F,G,j,$,H){const V=new Tc.p(this.game,this.menuLayer,$,H);return V.preprocess(k,G,j),this.openMenu(V),V.queuePostCreateCallback(V.setConfirmGeneric.bind(V,B,U,F)),V}messageBoxOkay(k,B,U,F,G,$,H,V){const W=new Tc.p(this.game,this.menuLayer,$,H);return W.preprocess(k,F,G),this.openMenu(W),W.queuePostCreateCallback(W.setOkay.bind(W,B,null),j.Aq$.isDefined(V)?()=>{W.okayButton.setInputBlockPriority(V)}:()=>{}),W.setCloseCallback(U),W}messageBoxError(k,B,U,F){(U||F)&&(U?j.RQr.logError(U,null!=F?F:""):j.RQr.logError(new Error(F),"")),this.messageBoxPrefab({text:k,textArgs:B})}titanProgress(k,B="UI_TITAN_SHARDS_INFO"){const U=new $c(this.game,this.menuLayer,k,B);return U.preprocess(),this.openMenu(U),U}adventureMap(k,B){const U=new sd(this.game,this.menuLayer,k,K.q.instance.prodigy.gameContainer.get("d0e-64fd"),B);return this.openMenu(U),U}adventureContinueRestart(k){return this.prefabMenu(Ei.l.RestartDungeon,k,!1)}adventureComplete(){return this.prefabMenu(Ei.l.DungeonCompleted,null,!1)}prefabMenu(k,B=Qu.closeCallback,U=Qu.runUpdate,F=Qu.isModal,G=Qu.skipTransparency,j,$,H=Qu.sendEvents,V=Qu.sendCloseEvent,W,q=Qu.obeyMenuStackVisibility,K=Qu.isFullScreenUI){return"string"==typeof k||"number"==typeof k?this.internalPrefabMenu({prefabID:k,closeCallback:B,runUpdate:U,isModal:F,skipTransparency:G,injectablePropertiesDictionary:j,interfaceEventProps:$,sendEvents:H,sendCloseEvent:V,closeOriginID:W,obeyMenuStackVisibility:q,isFullScreenUI:K}):this.internalPrefabMenu(k)}internalPrefabMenu(k){var B,U,F,G;const{prefabID:$,closeCallback:H,runUpdate:V,isModal:W,skipTransparency:q,injectablePropertiesDictionary:z,interfaceEventProps:Y,customEventProps:Q,sendEvents:X,sendCloseEvent:Z,closeOriginID:J,obeyMenuStackVisibility:tt,isFullScreenUI:et}=Object.assign(Object.assign({},Qu),k);this.closeChat();const it=un.o.isNumber($)?en.T[$]:$,st=new mh.y(this.game,this.menuLayer,it,null!=H?H:()=>null,V,z,tt);if(st.isModal=null!=W&&W,st.isFullScreenUI=null!=et&&et,st.skipRenderTransparencyLayer=null!=q&&q,X){const{gameContainer:k}=K.q.instance.prodigy,{featureCommon:$}=k.get("c47-20b6"),H=null!=Y?Y:{interfaceName:null!==(B=k.get(j.t5G.PrefabDataProvider).getPrefabItem(it).name)&&void 0!==B?B:"",interfaceType:bi.Wm.Menu,closeMethod:bi.Lv.CloseButton},V=Object.assign(Object.assign({prefab_guid:it},null===(U=null==Q?void 0:Q.all)||void 0===U?void 0:U.opened),null===(G=null==Q?void 0:Q[null!==(F=H.originType)&&void 0!==F?F:""])||void 0===G?void 0:G.opened);if($.sendInterfaceEvent(Object.assign(Object.assign({},H),{closeMethod:void 0}),V),Z){const k=null!=J?J:H.originID;st.onDestroy.addOnce((()=>{var B,U,F,G;return $.sendInterfaceEvent(Object.assign(Object.assign({},H),{originID:k}),Object.assign(Object.assign({prefab_guid:it},null===(B=null==Q?void 0:Q.all)||void 0===B?void 0:B.closed),null!==(G=null===(F=null==Q?void 0:Q[null!==(U=H.originType)&&void 0!==U?U:"any"])||void 0===F?void 0:F.closed)&&void 0!==G?G:{}))}))}}return this.openMenu(st),this.onPrefabMenuOpened.dispatch(it),st}friendsList(){const k=new fc(this.game,this.menuLayer);return k.preprocess(),this.openMenu(k),k}membershipParent(k,B,U,F,G=!1){var j,$;let H=Ei.l.MembershipParent,V=ph.B.MembershipParentAd;const W={MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_METADATA:null==B?void 0:B.conversionFunnelMetadata,MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_NAME:null==B?void 0:B.conversionFunnelName,MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_STAGE:null==B?void 0:B.conversionStage,MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_STATIC_OR_VIDEO:null==B?void 0:B.conversionStaticOrVideo,MEMBERSHIP_PURCHASE_MEMBER_PANEL_AD_FLAVOUR_TEXT:null==k?void 0:k.flavourText,MEMBERSHIP_PURCHASE_MEMBER_PANEL_AD_FRAME_NAME:null==k?void 0:k.frameName,MEMBERSHIP_PURCHASE_MEMBER_PANEL_AD_TRACKING_EVENT:null==k?void 0:k.trackingEvent,MEMBERSHIP_PURCHASE_UPGRADE:U},q=Gt.R.loadData(Ft.r.DynamicParentPromptRuleset_json),K=$h.H.evaluate(B.conversionFunnelName,q);if(K){const k=K.assets[0],B=Gt.R.loadData(k);H=B.contentTemplateGuid,V=null!==($=null===(j=B.configurableElements.segmentProperties)||void 0===j?void 0:j.interfaceName)&&void 0!==$?$:ph.B.MembershipParentAd,W[tr.Dw.DynamicPromptContentAssetGuid]=k}const z=this.prefabMenu(H,void 0,void 0,G,!0,W,{interfaceName:V,interfaceType:bi.Wm.Modal,originType:bi.$N.ButtonClick,originID:F,instanceType:Ai.N.Interface,closeMethod:bi.Lv.X},!0,!0,jh.k.X,!0);return z.createContainer=!1,z}membershipInfo(k,B={},U,F=!1,G={}){const $=this.unifiedConversionFlow(k,B,U,G);if(j.Aq$.isDefined($))return $;const H=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return!H.isPlayingAtSchool()||H.hasMembership()&&!F?(this.battlePassUltimateMemberUpsellModal().then((()=>null==k?void 0:k())).catch(j.RQr.createHandler("Error opening ultra upsell from membershipInfo")),null):this.membershipSchoolAd(k)}rewardCloudMountMenu(k,B=null,U=null,F=null,G=null,$=!1){const H=new _c.R(this.game,this.menuLayer,k,G,B,U,!0,F,$);return H.preprocess(),j.Aq$.isDefined(G)&&(H.sourceOverride=G),this.openMenu(H),H}dynamicPrompt(k,B,U,F){var G,j;K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.memberPrompt=!0;const $=Object.assign({[tr.Dw.DynamicPromptContentAssetGuid]:k},B),H=Gt.R.loadData(k),V=this.prefabMenu(null==H?void 0:H.contentTemplateGuid,F,!0,!1,!0,$,{interfaceName:null===(j=null===(G=null==H?void 0:H.configurableElements)||void 0===G?void 0:G.segmentProperties)||void 0===j?void 0:j.interfaceName,interfaceType:bi.Wm.Modal,originType:U.originType,originID:U.originId,instanceType:Ai.N.Interface,closeMethod:bi.Lv.X},!0,!0,jh.k.X,!0);return V.createContainer=!1,V}unifiedConversionFlow(k,B=null,U=null,F={}){var G,$,H,V,W,q,z;const Y=K.q.instance.prodigy.gameContainer.get("c47-20b6"),Q=yn.P.evaluateUnifiedConversionFlowRules(B.conversionFunnelName);if(!j.Aq$.isDefined(null==Q?void 0:Q.assets[0]))return null;K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.memberPrompt=!0;const X=Q.assets[0],Z=Gt.R.loadData(X),J=Y.purchase.getFunnelID(),tt=Object.assign(Object.assign({[tr.Dw.DynamicPromptContentAssetGuid]:X,IS_UNIFIED_CONVERSION_PROMPT:!0},null!==(G=Z.injectableProperties)&&void 0!==G?G:{}),F);let et,it;"object"==typeof U?(et=null==U?void 0:U.id,it=null==U?void 0:U.type):et=U;const st=this.prefabMenu(null==Z?void 0:Z.contentTemplateGuid,k,!0,!1,!0,tt,{interfaceName:null!==(V=null===(H=null===($=null==Z?void 0:Z.configurableElements)||void 0===$?void 0:$.segmentProperties)||void 0===H?void 0:H.interfaceName)&&void 0!==V?V:ph.B.MembershipParentAd,interfaceType:bi.Wm.Modal,originID:et,originType:it,instanceType:null!==(z=null===(q=null===(W=null==Z?void 0:Z.configurableElements)||void 0===W?void 0:W.segmentProperties)||void 0===q?void 0:q.instanceType)&&void 0!==z?z:Ai.N.Interface,closeMethod:bi.Lv.X,custom:{funnel_id:J}},!0,!0,jh.k.X,!0);return st.createContainer=!1,st}staticMemberAd(k,B,U,F,G,j){const $=this.prefabMenu(k?Ei.l.StaticAdCarousel:Ei.l.StaticAd,j,!0,!0,!0,void 0,{interfaceName:k?ph.B.MembershipStaticAdCarousel:ph.B.MembershipStaticAd,interfaceType:bi.Wm.Modal,originType:bi.$N.ButtonClick,originID:U,instanceType:Ai.N.Interface,closeMethod:bi.Lv.X},!0,!0,jh.k.X),H=()=>{$.prefab.findComponent(Mh.j).configure(k,B,U,F,G)};return $.prefab?H():$.onPrefabLoaded.addOnce(H),$}membershipSchoolAd(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0");if(B.areLoginCredentialsValid()){const U={LoginDetailsUsername:B.loginCredentials.username,LoginDetailsPassword:B.loginCredentials.password};return this.prefabMenu(Ei.l.MembershipSchoolAd,k,!0,!0,!1,U)}const U=new Ec(this.game,this.menuLayer,k);return this.openMenu(U),U}membershipYouTubeAd(k,B,U=null,F,G=!1){if(!this.isMenuOpen(wc.v)){const j=new wc.v(this.game,this.menuLayer,k,B,U,F,G);this.openMenu(j)}}memberAdSuppressionToolTip(k,B=!1,U=!0){U&&K.q.instance.prodigy.load.assets(Z.c.Sfx_pets_button_disabled_state,(()=>{K.q.instance.prodigy.audio.playSFX(67,"button-disabled")}));return k.bodyText=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MEMBERSHIP_SUPPRESSION_BODY"),k.headerText=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MEMBERSHIP_SUPPRESSION_HEADER"),this.overlayToolTip(122,k,B)}overlayToolTip(k,B,U=!1){if(!this.isMenuOpen(Hc)){const F=new Hc(this.game,this.menuLayer,k,B,U);return this.menus&&this.openMenu(F),F}return null}socialFeed(k=null,B){const U=new xc.g(this.game,this.menuLayer,k,B);return U.preprocess(),this.openMenu(U),U}coOpTeamSelect(k,B){const U=new od(this.game,this.menuLayer,k,B);return this.openMenu(U),U}PopUpModal(k){const B=new Nc(this.game,this.menuLayer,k);return B.preprocess(),this.openMenu(B),B}coOpModal(k){const B=new rd(this.game,this.menuLayer,k);return this.openMenu(B),B}character(){this.openMenu(new zl(this.game,this.menuLayer))}backpack(){if(this.isMenuOpen(Fl))return null;const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=new Fl(this.game,this.menuLayer,k);return this.openMenu(B),B}pouch(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.openMenu(new ou(this.game,this.menuLayer,F,k,B,U))}map(k={}){this.closeChat();const B=new Ta.i(this.game,this.menuLayer,k);return this.openMenu(B),K.q.instance.game.broadcaster.broadcast(oi.Y1.WorldMapOpened),B}startRegistration(k,B,U=!0,F=!1){const G=new bl(this.game,this.menuLayer,k,U,F);B&&G.queuePostCreateCallback(...B),this.openMenu(G)}registration(k,B,U){const F=new k(this.game,this.menuLayer,B,U);this.openMenu(F)}informationDialog(k,B){const U=new pd(this.game,null!=B?B:this.menuLayer,k);return this.openMenu(U),U}topHeavyInformationDialog(k){const B=new _d(this.game,this.menuLayer,k);return this.openMenu(B),B}supportPageDialog(k){this.openMenu(new md(this.game,this.menuLayer,k))}confirmationDialog(k){const B=new ud(this.game,this.menuLayer,k);return this.openMenu(B),B}confirmationDialogWideButtons(k){const B=new fd(this.game,this.menuLayer,k);return this.openMenu(B),B}confirmationDialogNoIconButtons(k){const B=new vd(this.game,this.menuLayer,k);return this.openMenu(B),B}petsCustomDialog(k){const B=new gd(this.game,this.menuLayer,k);return this.openMenu(B),B}petsLetGoConfirmationDialog(k,B){const U=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),F=le.t.getItem("pet",k.ID);return this.petsCustomDialog(new yh.k(U.getText("LET_GO"),B,U.getText("KEEP"),void 0,{atlas:q._.Ui_store_json,name:"icon-large-exclamation"},Jc.E.Small,500,U.getText("LET_PET_GO_QUESTION"),U.getText("LET_GO_FOREVER_WARNING",Eh.P8.getPetDisplayName(F.data,k))))}bannerDialog(k){this.openMenu(new hd.L(this.game,this.menuLayer,k))}learnMore(k,B,U,F=null,G=null,$=vh.E.OverlayLayer){const H=new bd.Z("BUTTON_OKAY_CAPITAL",F,Jc.E.Medium,600,void 0,U,void 0,void 0,void 0,Ei.l.SubtitleTitleHeader,void 0,Ei.l.LearnMoreBody),V=K.q.instance.prodigy.open.informationDialog(H,j.wa5.getActiveScene().getLayer($));V.onCreate.addOnce((()=>{null==G||G();const U=V.header.findComponentsInChildren(j.EYj);for(let F=0;F{k===Yo.Xx.DefeatedPets&&th.E.recordDefeatedPetsFunnelStep(Gh.l.DynamicStoreLostPetsTab)})),B.onItemSelected.add((k=>{k===Yo.Xx.DefeatedPets&&th.E.recordDefeatedPetsFunnelStep(Gh.l.DynamicStoreLostPetViewed)})),B.onPurchaseFinished.add((k=>{k===Yo.Xx.DefeatedPets&&th.E.recordDefeatedPetsFunnelStep(Gh.l.DynamicStoreLostPetPurchased)}))}))}dynamicStoreModal(k){const B=K.q.instance.prodigy.open.prefabMenu(Ei.l.DynamicStoreModal,void 0,!0,!0,!0,k);this.menus.push(B)}legacyStore(k){const B=new Vu(this.game,this.menuLayer,k);this.openMenu(B)}stylistStore(k,B,U,F){const G=new Vu(this.game,this.menuLayer,20,k,B,U,null,{0:k=>k},null,F,bi.$N.Door);this.openMenu(G)}houseStore(k,B,U){const F=new Vu(this.game,this.menuLayer,12,null,k,B,U,{},null);this.openMenu(F)}resultsMenu(k,B,U,F,G=!1,j,$=!0){const H=Si.c.instance.isPlayerQualified()&&k.filter((k=>k instanceof fa.R&&Si.c.instance.getEligiblePetIDs().includes(k.data.ID))).length>0?new Mc(this.game,this.menuLayer,k,B,U,F,G,j,$):new Pc.k(this.game,this.menuLayer,k,B,U,F,G,void 0,void 0,j,$);return this.openMenu(H),H}evolutionSummary(k,B,U){const F=new kc.K(this.game,this.menuLayer,k,B,U);return this.openMenu(F),F}spellSummary(k,B){const U=new Gc(this.game,this.menuLayer,k,B);return this.openMenu(U),U}heartSummary(k,B){const U=new Uc(this.game,this.menuLayer,k,B);return this.openMenu(U),U}statSummary(k,B){const U=new jc.H(this.game,this.menuLayer,k,B);return this.openMenu(U),U}bossRewards(k,B,U=Ei.l.BossRewardUI,F,G,j,$=!1,H=!0,V={},W){const q=new nd.v(this.game,this.menuLayer,K.q.instance.prodigy.gameContainer.get("d0e-64fd"),k,U,B,F,G,j,$,H,V,W);return this.openMenu(q),q}towerEntranceMenu(k,B,U){const F=new Vc(this.game,this.menuLayer,k,B,U);return this.openMenu(F),F}archiveEntranceMenu(k,B){const U=new Wh(this.game,this.menuLayer,k,B);return this.openMenu(U),U}dungeonPrizesMenu(k,B,U){const F=new Xh(this.game,this.menuLayer,k,B,U);return this.openMenu(F),F}dungeonExitMenu(k,B,U,F=!1,G,j){const $=new Qh(this.game,this.menuLayer,k,B,U,F,G,j);return this.openMenu($),$}towerExitMenu(k,B,U,F){const G=new Wc(this.game,this.menuLayer,k,B,U,F);return this.openMenu(G),G}keystonePedestals(k=null){const B=new vc(this.game,this.menuLayer,k);return this.openMenu(B),B}learningEfficacySkipPopup(k=null,B=null,U){const F=new gc(this.game,this.menuLayer,k,B,U);return this.openMenu(F),F}dailyQuestionsMenu(k=null,B=!1,U="click"){const F=new Yh(this.game,this.menuLayer,k,B,U);return this.openMenu(F),F}characterDialogue(k,B,U){let F=this.menuLayer;if(this.game.state.current===Ie.G.CoOp){const k=this.game.state.getCurrentState().battleLayers[vh.E.MenusLayer];F="legacyTransform"in k?k.legacyTransform.group:k}const G=new qh.a(this.game,F,k,B,U);return this.openMenu(G),G}fromFactory(k){this.openMenu(k())}showVideoPopup(k,B){const U=new Ml(this.game,this.menuLayer,k,B);return this.openMenu(U),U}optionsMenu(k){const B=this.prefabMenu(Ei.l.OptionsMenu,k,!1,!0,!0,void 0,void 0,!0,!0,jh.k.X);this.openMenu(B)}locationDialog(k,B,U){const F=new yc(this.game,this.menuLayer,k,B,U);return this.openMenu(F),F}academyTowerProgress(){return this.prefabMenu(Ei.l.AcademyTowerProgressHUD,null,!1,!1,!0)}parentAttachMenu(k,B,U,F){let G;switch(B){case jh.k.ParentGoalTrackerNotAttached:G=Ei.l.ParentGoalParentAttachModal;break;default:G=Ei.l.ParentAttachModal}return this.prefabMenu(G,k,null,!1,!0,F,{interfaceName:null!=U?U:ph.B.ParentAttach,interfaceType:bi.Wm.Modal,originID:B,originType:bi.$N.ButtonClick},!0,!1)}showFullScreenSpinner(){const k=K.q.instance.prodigy.gameContainer.get("PrefabService").getPrefabFromGuid(Ei.l.FullScreenSpinner);return K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromJSON(k)}battlePassFtue(){return(0,G.sH)(this,arguments,void 0,(function*(k=null,B=bi.$N.AutoSurfaced,U){const F=K.q.instance.prodigy.gameContainer.get("8dc-04eb"),G=yield F.getCurrentBattlePassData(),j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!G||j.isInBattle)return void(null==k||k());let $,H;if(U)H=U,$=U===ph.B.BattlePassSimpleFtueModal?Ei.l.BattlePassSimpleFtueModalWithoutClose:Ei.l.BattlePassComplexFtueModal;else{$=K.q.instance.prodigy.gameContainer.get("12f-4e29").isBreadcrumbComplete(ln.B.FEATURE_BATTLE_PASS,ln.B.BREADCRUMB_BATTLE_PASS_COMPLEX_FTUE_VIEWED)?Ei.l.BattlePassSimpleFtueModalWithoutClose:Ei.l.BattlePassComplexFtueModal}K.q.instance.prodigy.open.prefabMenu($,void 0,!0,!0,!0,{[tr.XU.CloseCallback]:k},{interfaceName:H,interfaceType:bi.Wm.Modal,originType:B},!0)}))}battlePassMembershipModal(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=K.q.instance.prodigy.gameContainer.get("8dc-04eb"),U=yield B.getCurrentBattlePassData(),F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;U&&!F.isInBattle&&K.q.instance.prodigy.open.prefabMenu(Ei.l.BattlePassMembershipModal,void 0,!0,!0,!0,{[tr.XU.ItemTierNumber]:k},{interfaceName:ph.B.BattlePassMembershipModal,interfaceType:bi.Wm.Modal,originType:bi.$N.ButtonClick,closeMethod:bi.Lv.X},!0)}))}dailyLoginCalendar(){return(0,G.sH)(this,void 0,void 0,(function*(){const k={interfaceName:"daily_login_calendar_main",interfaceType:bi.Wm.Window,originType:bi.$N.AutoSurfaced,instanceType:Ai.N.UI};return K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent(k),new Promise((k=>K.q.instance.prodigy.open.prefabMenu(Ei.l.ScreenDailyLoginCalendar,k)))}))}battlePassUltimateMemberUpsellModal(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=new j.bnh;if(k.isPlayingAtSchool())return this.membershipSchoolAd((()=>B.resolve())),B;const U=k.isInBattle,F=K.q.instance.prodigy.gameContainer.get("8dc-04eb"),G=yield F.getCurrentBattlePassData();if(k.isInBattle&&!U)return B.resolve(),B;const $=K.q.instance.prodigy.open.unifiedConversionFlow((()=>B.resolve()),{conversionFunnelName:Sn.o.FunnelBattlePassMemberUnlock,conversionStage:Sn.o.StageClickLockedItemBattlePass},bi.$N.AutoSurfaced);if(j.Aq$.isDefined($))return B;let H;H=G?Pt.pF.eligibleForMembershipPurchaseForMultipleTiers()?Ei.l.BattlePassUltraUpsell:Ei.l.BattlePassMobileUltraUpsell:Ei.l.BattlePassUltraUpsellOffSeason;const V=K.q.instance.prodigy.open.prefabMenu(H,(()=>B.resolve()),!0,!0,!0,{},{interfaceName:ph.B.BattlePassUltimateModal,interfaceType:bi.Wm.Modal,originType:bi.$N.ButtonClick,closeMethod:bi.Lv.CloseButton},!0);return V.isLoaded||(yield V.onPrefabLoaded.asPromise()),B}))}battlePassMenu(k,B,U,F,G,j){K.q.instance.prodigy.notifications.clearNotifications();let $=Ei.l.BattlePassMenuBar;Jo.D.isFeatureEnabled()&&($=Ei.l.RewardsFirstBattlePassMenuBar);const H=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return K.q.instance.prodigy.open.prefabMenu($,void 0,!0,!0,!0,{[tr.XU.CloseCallback]:()=>{K.q.instance.prodigy.notifications.removeQueuedNotificationOfType([F||Za._.BATTLEPASSQUESTGOALCOMPLETED]),null==U||U()},[tr.XU.ToasterNotificationId]:F,[tr.XU.FocusTierOverride]:G,[tr.XU.FocusTabOverride]:j,[tr.$u.CurrencyID]:27,[tr.$u.CurrencyAmount]:H.getCurrencyAmount(27)},{interfaceName:ph.B.BattlePassMenu,interfaceType:bi.Wm.Window,originType:B,originID:k,instanceType:Ai.N.UI,closeMethod:bi.Lv.X},!0)}lootDashMenu(k){K.q.instance.game.state.start(Ie.G.LootDashMenu,!0,k)}petMergeMenu(k,B,U){if(K.q.instance.prodigy.gameContainer.get("c47-20b6").petMerge.mergeSource=B,this.isMenuOpen(Ih))return this.menus.find((k=>k instanceof Ih));const F=new Ih(this.menuLayer,U,k);return this.openMenu(F),F}petMergeUpsellModal(k,B){return K.q.instance.prodigy.open.prefabMenu(k,void 0,!0,!0,!0,B,{interfaceName:ph.B.MembershipInfoAd,interfaceType:bi.Wm.Modal,originType:bi.$N.ButtonClick,closeMethod:bi.Lv.CloseButton},!0)}getTopmostConversionPrefabIndex(){let k=-1;for(let B=this.menus.length-1;B>=0;B--)if(this.menus[B]instanceof mh.y){const U=this.menus[B];if(this._conversionPrefabIds.includes(U.prefabID)){k=B;break}}return k}updateSentryTags(){this.updateSentryTag("menus")}updateSentryTag(k){const B=this[k];if(this[k].length>0){const U=B[B.length-1];let F=U.constructor.name;"PrefabMenu"===F&&(F=`${F}.${null==U?void 0:U.prefabID}`),Ko.setTag(k.substring(0,k.length-1),F)}else Ko.setTag(k.substring(0,k.length-1),void 0)}difficultySelector(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;const U=Ta.i.DIFFICULTY_MODE,F=K.q.instance.prodigy.gameContainer.get("db5-fb6e"),G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,j=(yield F.meetsRequirements(59))||!0===(null===(B=G.difficultyUnlocks)||void 0===B?void 0:B.hard),$={DIFFICULTY_SELECTOR_DATA:[{DIFFICULTY_MODE:ri.i.Regular,SELECTED_STATE:U===ri.i.Regular?Ph.Nx.Current:Ph.Nx.Select,MAX_LEVEL:hi.s.maxLevelConfig.regular,TITLE_COLOR:U===ri.i.Regular?Ph.TQ.RegularSelected:Ph.TQ.Unselected},{DIFFICULTY_MODE:ri.i.Hard,SELECTED_STATE:U===ri.i.Hard?Ph.Nx.Current:j?Ph.Nx.Select:Ph.Nx.Unlock,MAX_LEVEL:hi.s.maxLevelConfig.hard,TITLE_COLOR:U===ri.i.Hard?Ph.TQ.HardSelected:Ph.TQ.Unselected},{DIFFICULTY_MODE:ri.i.Expert,SELECTED_STATE:Ph.Nx.ComingSoon,MAX_LEVEL:hi.s.maxLevelConfig.expert,TITLE_COLOR:U===ri.i.Expert?Ph.TQ.ExpertSelected:Ph.TQ.Unselected}]};K.q.instance.prodigy.open.prefabMenu(Ei.l.DifficultySelectorScreen,k,!0,!1,!1,$)}))}difficultySelectorConfirmationModal(k,B){let U;const F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);switch(k){case ri.i.Regular:U={DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_HEADER_TEXT:F.getText(Ph.fs.RegularHeaderText),DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_BODY_TEXT:F.getText(Ph.fs.RegularBodyText)};break;case ri.i.Hard:U={DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_HEADER_TEXT:F.getText(Ph.fs.HardHeaderText),DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_BODY_TEXT:F.getText(Ph.fs.HardBodyText)};break;case ri.i.Expert:U={DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_HEADER_TEXT:F.getText(Ph.fs.ExpertHeaderText),DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_BODY_TEXT:F.getText(Ph.fs.ExpertBodyText)}}const G=K.q.instance.prodigy.gameContainer.get("ba4-af03");K.q.instance.prodigy.open.prefabMenu(Ei.l.DifficultySelectorConfirmationModal,void 0,!0,!1,!1,Object.assign(Object.assign({},U),{DIFFICULTY_MODE:k,OVERRIDE_CALLBACK:!!B,ON_CONFIRM_CALLBACK:B,UNLOCK_HARD_MODE_CALLBACK:G.unlockDifficultyMode.bind(G,ri.i.Hard),UNLOCK_EXPERT_MODE_CALLBACK:G.unlockDifficultyMode.bind(G,ri.i.Expert)}))}difficultyUnavailableConfirmationModal(k,B){const U=this._localizer.getText(Ph.fs.ZoneUnavailableForDifficultyText,k.getName()),F={DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_HEADER_TEXT:Ph.fs.RegularHeaderText,DIFFICULTY_SELECTOR_CONFIRMATION_MODAL_BODY_TEXT:U};K.q.instance.prodigy.open.prefabMenu(Ei.l.DifficultySelectorConfirmationModal,void 0,!0,!1,!1,Object.assign(Object.assign({},F),{DIFFICULTY_UNAVAILABLE:!0,CONFIRM_GO_TO_CALLBACK:B}))}postBattleMembershipVideoMenu(k,B,U,F,G){const $=K.q.instance.prodigy.gameContainer.get("e20-0fb0");if(F&&(!$.loginCredentials.username||!$.loginCredentials.password)){const k=new Error(`[Post-Battle School Video] Failed to get player login details for username: ${$.loginCredentials.username}.`);Ko.captureException(k),j.RQr.logError(k,"Cannot display login details")}K.q.instance.prodigy.open.prefabMenu(Ei.l.PostBattleMembershipVideoMenu,G,!0,!1,!1,{[tr.Ut.VideoId]:k,[tr.Ut.VideoAtSchool]:F,[tr.Ut.SupportedResolutionIds]:null==B?void 0:B.supportedResolutionIds,[tr.Ut.SizeRatio]:null==U?void 0:U.sizeRatio,[tr.Ut.VideoInstanceType]:F?Ai.N.PlayAtHomeVideo:Ai.N.MembershipVideo,[tr.V8.LoginDetailsUsername]:$.loginCredentials.username,[tr.V8.LoginDetailsPassword]:$.loginCredentials.password})}genericVideoMenu(k){const B=Object.assign(Object.assign({},Wu.h.advanceToNextVideoAndGetInjectionData(k)),k.customInjectionMetadata);B?k.videoMenuGuid?K.q.instance.prodigy.open.prefabMenu({prefabID:k.videoMenuGuid,closeCallback:k.onClose,isModal:!1,injectablePropertiesDictionary:B}):j.VyI.log("[MenuFactory][genericVideoMenu] Cannot open generic video menu with no menu GUID provided.",j.$bb.Error):j.VyI.log(`[MenuFactory][genericVideoMenu] Failed to initialize video injection values for video menu with GUID ${k.videoMenuGuid}. Menu will not be opened.`,j.$bb.Error)}openWizardBank(k,B){var U;const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;K.q.instance.prodigy.open.prefabMenu({prefabID:Ei.l.WizardBankMenuModal,closeCallback:B,sendEvents:!0,sendCloseEvent:!1,interfaceEventProps:{interfaceName:ph.B.WizardBank,interfaceType:bi.Wm.Window,instanceType:Ai.N.UI,originType:k.originType,originID:k.originId},customEventProps:{all:{opened:{instance_id:rn.$.generateUID(),instance_version:null!==(U=Nh.E.get(F.getMemberTier()))&&void 0!==U?U:Xo.D.NonMember}}},injectablePropertiesDictionary:{WIZARD_BANK_ORIGIN_TYPE:k.originType}})}openMemberLockedGoldRiftModal(){const k=K.q.instance.prodigy.open.prefabMenu({prefabID:Ei.l.MemberLockedGoldRiftModal,sendEvents:!0,sendCloseEvent:!1,interfaceEventProps:{interfaceName:ph.B.EnterGoldRiftModal,interfaceType:bi.Wm.Modal,instanceType:Ai.N.RiftRun,originType:bi.$N.AutoSurfaced}});this.menus.push(k)}openWizardCostumesMenu(k=bi.$N.ButtonClick,B){if(this.isMenuOpen(xh.r))return;if(Lh.hD.ftuePopupLoading)return;if(!Lh.hD.isFtueFlowActive()&&Lh.hD.shouldShowFtue())return void this.openWizardCostumesFtuePopup(k,B);const U=K.q.instance.prodigy.open.prefabMenu({prefabID:Ei.l.WizardCostumesMenu,sendEvents:!0,sendCloseEvent:!1,interfaceEventProps:{interfaceName:ph.B.WizardCostumesMenu,interfaceType:bi.Wm.Menu,instanceType:Ai.N.Interface,originType:k,originID:B}});this.menus.push(U)}openWizardCostumesFtuePopup(k=bi.$N.ButtonClick,B){if(Lh.hD.ftuePopupLoading)return;const U=K.q.instance.prodigy.gameContainer.get("6e9-d1dd").getCostumesToDisplayForFtuePopup();U.length<=1?j.VyI.log("[MenuFactory][openWizardCostumesFtuePopup] Cannot set up wizard costumes FTUE popup with 1 or fewer costumes to display.",j.$bb.Error):(Lh.hD.ftuePopupLoading=!0,Lh.hD.initFtue(),Promise.all(U.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return le.t.secureGetItem("costume",k)}))))).then((U=>{var F;U.forEach((k=>{if(!k)throw new Error("A costume in wizard costumes FTUE popup cannot be null")}));const G=null!==(F=U.find((k=>{var B;return null===(B=null==k?void 0:k.data)||void 0===B?void 0:B.member})))&&void 0!==F?F:U[0];if(!G)throw new Error("Main featured costume in wizard costumes FTUE popup cannot be null");const j=U.filter((k=>!!(null==k?void 0:k.ID)&&(null==k?void 0:k.ID)!==(null==G?void 0:G.ID))).map((k=>({[tr.AP.ItemCardData]:{item:k,quantity:1},[tr.AP.ItemCardIsNew]:!0}))),$=K.q.instance.prodigy.open.prefabMenu({prefabID:Ei.l.WizardCostumesFTUEPopup,injectablePropertiesDictionary:{[tr.sv.FtueMainCostumeId]:null==G?void 0:G.ID,[tr.sv.FtueMainCostumeName]:Tn.J.getItemName(G),[tr.sv.FtueAdditionalCostumes]:j,[tr.sv.FtuePopupNextButtonCallback]:()=>this.openWizardCostumesMenu(k,B)}});this.menus.push($),Lh.hD.ftuePopupLoading=!1})).catch((k=>{Lh.hD.ftuePopupLoading=!1,j.RQr.logError(k,"MenuFactory.openWizardCostumesMenu: Failed to load costume items for FTUE popup")})))}isClosable(k){return j.Aq$.isDefined(k)&&"function"==typeof k.close}}var Zu,Ju=U(35997),tf=U(2212);!function(k){k.PIPPET_ENCOUNTER="state_pippet_encounter",k.PIPPET_REMATCH="state_pippet_rematch",k.PIPPET_DEFEATED="state_pippet_defeated"}(Zu||(Zu={}));class ef extends j.s3P{static get arePippetQuestEncountersEnabled(){return this._featureProvider.isOn("pippet-quest-encounters")}}(0,G.Cg)([(0,Re.b)("073-6f3b"),(0,G.Sn)("design:type",Object)],ef,"_featureProvider",void 0);class sf{constructor(k,B){this.canEvolve=!1,this.updateMainCreatureInformation(k,B)}updateMainCreatureInformation(k,B){var U,F,G,j,$,H,V;const W=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,q=B.totalNonMemberXp+(W.hasMembership()?B.memberXp:0),z=k.getLevel(),Y=hi.s.activePlayerLevelCap,Q=Rc.e.levelFromStars(k.getStars()+q,k.creatureType,Y);this.creature=k,this.originalCreature=k.createDataClone();const X=k.getBattleAssetSpecifier(),Z=le.t.getItem(X.type,X.id),tt=Object.assign(Object.assign({},k.data),{stats:null===(U=null==Z?void 0:Z.data)||void 0===U?void 0:U.stats,statGrowth:null===(F=null==Z?void 0:Z.data)||void 0===F?void 0:F.statGrowth});if(k.creatureType===yo.V.Player&&W.getChargedLevel()>0){const k=(null!==(G=W.data.chargedLevelData.newLevelData.levelsGained[0].level)&&void 0!==G?G:0)+z,B=W.getChargedLevel()+Q;this.statIncreases=Rc.e.getStatIncreasesFromLevelUps(tt,k,B)}else this.statIncreases=Rc.e.getStatIncreasesFromLevelUps(tt,z,Q);const et=k.diffAvailableSpellsV2(Q);this.unlockedSpellsDisplayInformation=et.map((k=>Fc.x.getUnlockedSpellDisplayInformation(k)));let it=k.currentMaxLevel;if(k instanceof fa.R){const B=null===($=null===(j=null==Z?void 0:Z.metadata)||void 0===j?void 0:j.assets)||void 0===$?void 0:$.default;this.spineGuid=(null==B?void 0:B.assetKey)?J.Q[B.assetKey]:`spine-${null==B?void 0:B.ID}`;const U=k.createDataClone();U.data.level=Q;const F=Q>=Eh.P8.getMaxOwnableLevel(k.getID(),k.data.mergeRank);if(Eh.P8.canPetEvolve(U,Q)&&F){const k=Eh.P8.findNextEvolution(Z),B=null===(V=null===(H=null==k?void 0:k.metadata)||void 0===H?void 0:H.assets)||void 0===V?void 0:V.default;this.canEvolve=!0,this.evolvedSpineGuid=(null==B?void 0:B.assetKey)?J.Q[B.assetKey]:`spine-${null==B?void 0:B.ID}`}it=Eh.P8.getMaxOwnableLevel(k.getID(),k.data.mergeRank)}this.creatureXpBarInformation=new Gu.r(k.getStars(),k.creatureType,B,Math.max(it,z))}}var nf=U(50508),af=U(98998);class rf{constructor(k){var B,U,F,G;const{creatures:j,barFillSpeed:$,battleRewards:H,nootTipBattleInfo:V,battleType:W}=k;this.rewards=null!==(B=H.rewards)&&void 0!==B?B:[],this.memberRewards=null!==(U=H.memberRewards)&&void 0!==U?U:[],this.xpGained=H.xpGained,this.creatures=j,this.barFillSpeed=$,this.battleType=W,this.rescuablePets=null!==(F=H.rescuablePets)&&void 0!==F?F:[],this.nootTipBattleInfo=V,this.magicoinRewardGranted=null!==(G=H.magicoinRewardGranted)&&void 0!==G&&G,this.magicoinRewardGranted&&(this.rewards=this.rewards.filter((k=>"currency"===k.type&&27===k.ID)),this.memberRewards=this.memberRewards.filter((k=>"currency"===k.type&&27===k.ID))),this.combineCoinRewards(),this._player=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,this._pbfSegment=K.q.instance.prodigy.gameContainer.get("c47-20b6").postBattleFlow,this._starController=new af.b,this.savePostBattleFlowInformation(this.magicoinRewardGranted)}getBattleId(){var k;return null===(k=this._pbfSegment)||void 0===k?void 0:k.getBattleId()}combineCoinRewards(){var k;const B={N:0,type:"gold"},U=[];for(const F of this.rewards)if("gold"===(null==F?void 0:F.type)){const U=F;(null==U?void 0:U.N)&&(B.N+=null!==(k=null==U?void 0:U.N)&&void 0!==k?k:0)}else U.push(F);B.N>0&&(U.push(B),this.rewards=U)}savePostBattleFlowInformation(k){this.awardXp(this.xpGained),k||(this.addNonMemberRewardsToInventory(),this._player.hasMembership()&&this.addMemberRewardsToInventory()),this.saveCharacterData(),this.updateSecureRewards().catch(j.RQr.createHandler("Failed to update client with secure rewards"))}updateSecureRewards(){return(0,G.sH)(this,void 0,void 0,(function*(){(this._player.hasMembership()?this.rewards.concat(this.memberRewards):this.rewards).filter((k=>k.isSecure)).some((k=>nf.p.includes(k.type)))&&(yield K.q.instance.prodigy.gameContainer.get("d69-defe").refreshPetGear()),this._pbfSegment.flushSecureRewards()}))}saveMemberStarsToJar(){this.applyMemberStarsToJar(this.xpGained,this.creatures.length),this.saveCharacterData()}saveCharacterData(){this._player.forceSaveCharacter()}awardXp(k){const B=k.totalNonMemberXp+(this._player.hasMembership()?k.memberXp:0);let U=0;for(const F of this.creatures){let k=hi.s.activePlayerLevelCap;F.creature instanceof fa.R&&(k=Eh.P8.getMaxOwnableLevel(F.creature.getID(),F.creature.data.mergeRank),F.creature.currentMaxLevel=k),F.originalCreature=F.creature.createDataClone(),F.creature.addStars(B);const G=K.q.instance.prodigy.gameContainer.get("c47-20b6");G.playerProgression.sendPlayerProgressionPointsEarnedEvent({pointType:"stars",pointCount:Math.min(B,F.creature.getStarsToMaxLevel()),progressionType:F.creature.creatureType===yo.V.Player?"Player Stars":"Pet Level",creatureName:F.creature.creatureType},{instanceID:G.postBattleFlow.getBattleId(),instanceType:Ai.N.EndOfBattle}),F.creature.getLevel()new sf(k,G.xpGained)));K.q.instance.prodigy.gameContainer.get("c47-20b6").postBattleFlow.init();const V=new rf({creatures:H,barFillSpeed:rf.DEFAULT_BAR_FILL_SPEED,battleRewards:G,nootTipBattleInfo:$,battleType:F}),W={},q=V.creatures[0].creatureXpBarInformation;return W[tr.uo.PostBattleFlowData]=V,W[tr.uo.PostBattleFlowVictory]=U,W[tr.uo.PostBattleFlowBattleType]=F,W[tr.uo.PostBattleFlowWizardWillLevelUp]=q.levels.length>1,W[tr.uo.PostBattleFlowWizardEndLevel]=q.levels[q.levels.length-1],W[tr.uo.PostBattleFlowRewardsScalingInfo]=G.rewardsScalingInfo,tf.J.shouldShowHardModePbfBannerWarning()?W[tr.uo.PostBattleFlowXpWarningLocalizedTextId]="CAMPAIGN_REPLAY_PBF_LEVEL_100_WARNING":hf.R.shouldShowRewardsScalingWarning(G.rewardsScalingInfo)&&(W[tr.uo.PostBattleFlowXpWarningLocalizedTextId]="POST_BATTLE_FLOW_REWARDS_SCALED"),Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this.prefabLoader,Ei.l.PostBattleFlowBase,W).then((k=>{j.wa5.getActiveScene().addGameObject(k.parent)})).catch(j.RQr.createHandler("Error loading Post Battle Flow Base prefab."))}addPrefabNPC(k,B,U,F,$){return(0,G.sH)(this,arguments,void 0,(function*(k,B,U,F,G,$={}){return Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this.prefabLoader,k,$).then((k=>{var $;if(k.transform.setPosition(B,U),F){const B=k.findComponentInChildren(j.v2j);B&&(B.GameObject.transform.localScale.x*=-1)}if(G){const B=k.findComponent(_r.B).getRootContainer();B.alpha=0,null===($=this.game.add.tween(B,this))||void 0===$||$.to({alpha:1},800,j.GS3.Quadratic.In,!0)}}))}))}addWizard(k,B,U,F,$,H){return(0,G.sH)(this,void 0,void 0,(function*(){const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer;return G.playerPrefab||(yield new Promise((k=>G.onFullyLoaded.add(k)))),Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.LegacyMapWizardEncounter,{EncounterMap:k,EncounterSpawnId:F,EncounterAssetId:$,EncounterScale:H?[-1,1]:[1,1],EncounterSpawnPosition:new j.I9Y(B,U)}).then((k=>{k.transform.setPosition(B,U),k.findComponent(j.y4o).getRootContainer().position.set(B,U),k.findComponentInChildren(cf.I).MoveTarget=new j.I9Y(B,U)}))}))}addMonster(k,B,U,F,$){return(0,G.sH)(this,void 0,void 0,(function*(){const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer;return G.playerPrefab||(yield new Promise((k=>G.OnLoad.add(k)))),Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.LegacyMapSpawnPoint,{EncounterMap:k,EncounterSpawnId:F,EncounterSpawnPosition:new j.I9Y(B,U),EncounterOverrideMods:$}).then((k=>{var F;null===(F=k.findComponentInChildren(df.d))||void 0===F||F.GameObject.setLayer(void 0,!0),k.transform.setPosition(B,U),k.findComponent(j.y4o).getRootContainer().position.set(B,U),k.findComponentInChildren(cf.I).MoveTarget=new j.I9Y(B,U)}))}))}loadPippetQuestEncounterData(k){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.assetLoader.loadAssets([k]);return K.q.instance.game.cache.getJSON(k).pippetQuestEncounter}))}createPippetQuestEncounter(k,B,U,F,$){return(0,G.sH)(this,void 0,void 0,(function*(){var G,H,V,W;const q=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,z=k.getMap(K.q.instance.prodigy.world.getCurrentMapTag()),Y=yield this.loadPippetQuestEncounterData(U),Q=j.wa5.getActiveScene().container.get("IS_PREFAB_MAP");return Q||(null===(G=q.playerContainer)||void 0===G?void 0:G.playerPrefab)||(yield null===(H=q.playerContainer)||void 0===H?void 0:H.OnLoad.asPromise()),Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.PippetQuestEncounterCutscene,{EncounterBattleMods:Object.assign({level:q.getLevel(),onEnd:z.zoneName,screen:z.battleBG,onFaint:z.zone.defaultOnFaint},Y),FsmId:B,BenchPet1:Eh.P8.getPetSpineId(null===(V=null==Y?void 0:Y.pets[0])||void 0===V?void 0:V.ID),BenchPet2:Eh.P8.getPetSpineId(null===(W=null==Y?void 0:Y.pets[1])||void 0===W?void 0:W.ID),ForceLegacyPathfinding:!Q}).then((B=>{var U,G,H,V,W;const z=B.findComponentInChildren(pf.u),Y=B.findComponentInChildren(Ju.k),X=k.bgmID;k.getState(Zu.PIPPET_ENCOUNTER)||(k.bgmID=12),z.onComplete.addOnce((()=>{k.getState(Zu.PIPPET_ENCOUNTER)?k.getState(Zu.PIPPET_REMATCH)&&(k.setState(Zu.PIPPET_DEFEATED,!0),null==$||$()):(k.setState(Zu.PIPPET_ENCOUNTER,!0),Y.startBattle())})),z.onStart.addOnce((()=>{k.getState(Zu.PIPPET_REMATCH)&&(null==F||F())}));const Z=null!==(G=null===(U=K.q.instance.prodigy.world.getCurrentMapObject())||void 0===U?void 0:U.getDefaultSpawnPosition())&&void 0!==G?G:{x:of.R.BG_HALF_WIDTH,y:of.R.BG_HALF_HEIGHT};let J;const tt=Q?null===(V=null===(H=j.wa5.getActiveScene().container.get("MainPlayerGameObject"))||void 0===H?void 0:H.transform)||void 0===V?void 0:V.worldPosition:null===(W=q.playerContainer)||void 0===W?void 0:W.position;Y.onBattleStart.addOnce((()=>{J=null!=tt?tt:Z})),Y.onVictory.addOnce((()=>{k.setState(Zu.PIPPET_REMATCH,!0),k.bgmID=X,K.q.instance.prodigy.world.it(K.q.instance.prodigy.world.getCurrentMap(),J.x,J.y)})),Y.onDefeat.addOnce((()=>{K.q.instance.prodigy.world.teleportToCurrentMap(),k.bgmID=X})),z.fsmVariables.zone=k.ID,z.run()})).catch(j.RQr.createHandler("Could not load Pippet Quest Encounter cutscene"))}))}createItemCard(k,B,U,F,j,$){return(0,G.sH)(this,void 0,void 0,(function*(){return Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.ItemCard,{[tr.Tl.Data]:Object.assign(Object.assign({},F),{receivedThroughGotItemFlow:j===Lr.s.GotItem})}).then((F=>{if(k.destroyed)return F.destroy(),F;F.findComponent(_r.B).getRootContainer().setParent(k);const G=F.transform;if(G){const F=G.sizeDelta.getHalfWidth(),j=G.sizeDelta.getHalfHeight();G.setAnchoredPivotOffset(k.getGlobalPosition().x+F+B,k.getGlobalPosition().y+j+U)}if($){F.findComponentInChildren(Bl.n).onClicked.add($,this)}return F}))}))}createIFrame(k,B){return(0,G.sH)(this,arguments,void 0,(function*(k,B,U=Ei.l.IFrameModal){return(yield Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),U,{[tr.n7.IFrameSource]:k,[tr.n7.IFrameClosePostMessage]:B})).findComponent(lf.w)}))}createTooltip(k,B,U){var F,G,$;k.IsActiveInHierarchy||j.VyI.log("PrefabFactory: Tooltip will not display because it was attached to an inactive transform.",j.$bb.Warning);const H=Object.assign(Object.assign({},uf.f),U),V=K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromGUID(Ei.l.SpawnableTooltip_RectTransform,k.GameObject);H.layer&&V.setLayer(H.layer,!0);const W=V.findComponentInChildren(bf);if(W.setArrowAnchor(H.arrowAnchor,H.tooltipAnchor,H.arrowDirection),W.setLocalizationText(B,H.titleKey,H.textArgs,H.titleArgs),W.setupButtons(null===(F=H.useCloseButton)||void 0===F||F,null!==(G=H.useGoButton)&&void 0!==G&&G,H.goButtonCTA),H.offset&&W.setOffset(H.offset),H.iconGUID&&W.setIcon(H.iconGUID,H.useIconText),H.resizeToContainer&&k instanceof j.XVE){const B=k.sizeDelta;W.setSize(B.width,B.height)}return this._tooltips.push(W),W.OnDestroy.add((()=>this._tooltips.splice(this._tooltips.indexOf(W),1)),this),null===($=k.GameObject)||void 0===$||$.addChild(V),V}tooltipsActive(){return this._tooltips.length>0}closeAllTooltips(){this._tooltips.forEach((k=>{k.GameObject.destroyDeferred()}))}}var gf=U(20705);class mf{get sentrySpan(){return this._sentrySpan}constructor(k,B){this._sentrySpan=null,this.onFinish=new j.HN0,this._parent=k,this._config=B,this._pageBackgroundTime={totalPageTimeMs:0,activeTrackedPageTimeMs:void 0},this._pageForegroundTime={totalPageTimeMs:0,activeTrackedPageTimeMs:void 0}}init(){return this._config?this._sentrySpan?(j.VyI.log("Unable to initialize SentryGameTrace because we have initialized already",j.$bb.Error),!1):(this._sentrySpan=Ko.startSpanManual(this.createSpanOptions(),(k=>k)),this._parent&&this._parent.onFinish.addOnce(this.finish,this),!0):(j.VyI.log("Unable to initialize SentryGameTrace because the config is null",j.$bb.Error),!1)}isActive(){return!!this._sentrySpan&&this._sentrySpan.isRecording()}finish(){var k;this._sentrySpan&&(this.assignTimeTrackerDataToSpan(this._pageBackgroundTime,"out_of_window_page_time"),this.assignTimeTrackerDataToSpan(this._pageForegroundTime,"in_window_page_time"),this._sentrySpan.end()),this._sentrySpan=null,null===(k=this._parent)||void 0===k||k.onFinish.removeAll(this),this._parent=null,this.onFinish.dispatch(),this.onFinish.dispose()}setExtraData(k){var B;null===(B=this._sentrySpan)||void 0===B||B.setAttributes(k)}onGameHidden(){this.startTimeTrack(this._pageBackgroundTime),this.endTimeTrack(this._pageForegroundTime)}onGameVisible(){this.startTimeTrack(this._pageForegroundTime),this.endTimeTrack(this._pageBackgroundTime)}startTimeTrack(k){k.activeTrackedPageTimeMs||(k.activeTrackedPageTimeMs=window.performance.now())}endTimeTrack(k){if(!k.activeTrackedPageTimeMs)return;const B=window.performance.now()-k.activeTrackedPageTimeMs;k.totalPageTimeMs+=B,k.activeTrackedPageTimeMs=void 0}assignTimeTrackerDataToSpan(k,B){this.endTimeTrack(k);let U=k.totalPageTimeMs,F="ms";k.totalPageTimeMs>36e5?(U=k.totalPageTimeMs/36e5,F="hrs"):k.totalPageTimeMs>6e4?(U=k.totalPageTimeMs/6e4,F="mins"):k.totalPageTimeMs>1e3&&(U=k.totalPageTimeMs/1e3,F="s"),this._sentrySpan.setAttribute(B,`${U.toFixed(3)} ${F}`),this._sentrySpan.setAttribute(`${B}_in_ms`,k.totalPageTimeMs)}}class yf extends mf{createSpanOptions(){var k;return{op:this._config.operationName,name:this._config.description,parentSpan:null===(k=this._parent)||void 0===k?void 0:k.sentrySpan}}}class _f extends mf{createSpanOptions(){return{op:this._config.operationName,name:this._config.description,forceTransaction:!0}}}class Ef extends yf{constructor(){super(...arguments),this._spanList=new Map}startAssetTrace(k){if(this._spanList.get(k))return;const B={op:`${this._config.operationName}.${fu.u.SingleAssetLoading}`,name:k,parentSpan:this._sentrySpan,attributes:{guid:k}},U=Ko.startSpanManual(B,(k=>k));this._spanList.set(k,U)}endAssetTrace(k,B){const U=this._spanList.get(k);U&&(B&&U.setAttributes(B),U.end(),this._spanList.delete(k))}finish(){for(const k of this._spanList.values())k.isRecording()&&k.setAttribute("failure",!0),k.end();this._spanList.clear(),super.finish()}isActive(){if(super.isActive())return!0;for(const k of this._spanList.values())if(k.isRecording())return!0;return!1}}class wf extends _f{init(){if(this._config.activeTags){const k=Ko.getGlobalScope(),B=k.getScopeData(),U=this._config.activeTags;this._previousTags={};for(const F in U)this._previousTags[F]=null==B?void 0:B.tags[F];k.setTags(U)}return super.init()}finish(){super.finish();const k=Ko.getGlobalScope();this._previousTags&&k.setTags(this._previousTags),this._config.endingTags&&k.setTags(this._config.endingTags)}}class Tf{constructor(k){this._database=new Map,this._manager=k,this.init()}createTrace(k){var B;const U=this._database.get(k);if(!U)return j.VyI.log(`Unable to create sentry tracing object because the key ${k} does not have a configuration`,j.$bb.Error),null;const F=this._manager.retrieveSpan(U.parent);return this.createInternal(null!==(B=U.objectType)&&void 0!==B?B:yf,F,U)}createInternal(k,B,U){return new k(B,U)}init(){const k=[{objectType:_f,operationName:fu.u.Boot,description:"Game Boot Process"},{operationName:fu.u.BootFeatureFlags,description:"Loading feature flags",parent:fu.u.Boot},{operationName:fu.u.BootGameData,description:"Loading game data",parent:fu.u.Boot},{operationName:fu.u.BootFeatureRevision,description:"Loading feature revisions",parent:fu.u.Boot},{operationName:fu.u.BootAssets,description:"Loading assets",parent:fu.u.Boot},{operationName:fu.u.BootLocalization,description:"Loading localization data",parent:fu.u.Boot},{operationName:fu.u.BootRebuildGUID,description:"Restructuring the GUID",parent:fu.u.Boot},{operationName:fu.u.BootStartNextState,description:"Getting data ready for the next state",parent:fu.u.Boot},{operationName:fu.u.Splash,objectType:_f,description:"Game Splash Screen Process"},{operationName:fu.u.SplashCreate,description:"On the splash state create",parent:fu.u.Splash},{operationName:fu.u.SplashLoadGame,description:"Loading user info and game data",parent:fu.u.Splash},{operationName:fu.u.SplashLoadQI,description:"Loading QI",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashLoadQIEducationStatus,description:"Fetching education status",parent:fu.u.SplashLoadQI},{operationName:fu.u.SplashLoadQILoadQuestion,description:"Loading the question renderer",parent:fu.u.SplashLoadQI},{operationName:fu.u.SplashLoadQILoadQuestionInterface,description:"Loading question interface",parent:fu.u.SplashLoadQI},{operationName:fu.u.SplashTitans,description:"Getting the Titans",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashLogin,description:"User Login",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashIapInit,description:"Initializing IAP",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashUpdateFeatureAccess,description:"Updating Feature Access",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashCharacter,description:"Loading Character Data",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashFetchEndGameQuestData,description:"Fetching End Game Quest Data",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashInitFeatureProvider,description:"Initialize Feature Provider",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashSetupFeatureProvider,description:"Setting Up Feature Provider",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashEducation,description:"Loading Education Data",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashParentalConsentService,description:"Initializing parental consent service",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashSegment,description:"Initializing Segment Analytics",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashWorldList,description:"Loading World List",parent:fu.u.SplashLoadGame},{operationName:fu.u.SplashRegistrationMenu,description:"Entering registration menu",parent:fu.u.Splash},{operationName:fu.u.SplashPlayerEducationInit,description:"Initialize player's education data",parent:fu.u.Splash},{operationName:fu.u.SplashPrefabRequest,description:"Requesting Prefabs",parent:fu.u.Splash},{operationName:fu.u.PrefabLoaderScene,objectType:_f,description:"Prefab scene initialization"},{operationName:fu.u.PrefabLoaderSceneAssetPreload,description:"Preloading Assets for Prefabs",parent:fu.u.PrefabLoaderScene},{operationName:fu.u.PrefabLoaderScenePrefabLoading,objectType:Ef,description:"Loading Prefab Objects",parent:fu.u.PrefabLoaderScene},{operationName:fu.u.PrefabLoaderSceneConsentBanner,description:"Initializing Consent Banner",parent:fu.u.PrefabLoaderScene},{operationName:fu.u.ServerMenuSelection,objectType:_f,description:"World Selection Process"},{operationName:fu.u.ServerMenuConnect,description:"Connecting to Server",parent:fu.u.ServerMenuSelection},{operationName:fu.u.ServerMenuShowAllServers,description:"Loading All Servers",parent:fu.u.ServerMenuSelection},{operationName:fu.u.ServerMenuSuggestedServers,description:"Loading Suggested Servers",parent:fu.u.ServerMenuSelection},{operationName:fu.u.World,objectType:wf,description:"Enter world",activeTags:{state:"loading"},endingTags:{state:"ingame"}},{operationName:fu.u.WorldRemotePlayerSpawnLimiterInit,description:"Init remote player spawn limiter",parent:fu.u.World},{operationName:fu.u.WorldSynapseMultiplayerServiceConnection,description:"Connecting to a multiplayer service",parent:fu.u.World},{operationName:fu.u.WorldNetworkHandlerEnterWorld,description:"Connecting to a world server",parent:fu.u.World},{operationName:fu.u.WorldInitProgressDataManager,description:"Progress data manager init",parent:fu.u.World},{operationName:fu.u.WorldSynchedRiftDataInit,description:"Synched rift data init",parent:fu.u.World},{operationName:fu.u.WorldDynamicStoreQuestManagerSetup,description:"Dynamic store quest manager setup",parent:fu.u.World},{operationName:fu.u.WorldHudDataInit,description:"Hud data init",parent:fu.u.World},{operationName:fu.u.WorldSegmentAnalyticsSetup,description:"Quest manager hub setup",parent:fu.u.World},{operationName:fu.u.WorldElementalBoostCache,description:"Elemental boost caching",parent:fu.u.World},{operationName:fu.u.WorldPippetEncounterInit,description:"Pippet encounter init",parent:fu.u.World},{operationName:fu.u.WorldGetTowerData,description:"Tower data retrieval",parent:fu.u.World},{operationName:fu.u.WorldInitTowerData,description:"Tower data init",parent:fu.u.World},{operationName:fu.u.WorldJoinActiveQuiz,description:"Join active quiz",parent:fu.u.World},{operationName:fu.u.WorldPlayerGoalsInit,description:"Player goals init",parent:fu.u.World},{operationName:fu.u.WorldEnterMap,description:"Map enter",parent:fu.u.World},{operationName:fu.u.WorldSegmentedOffersDataInit,description:"Segmented offers data init",parent:fu.u.World},{operationName:fu.u.WorldFeaturedSpawnDataInit,description:"Featured spawn data init",parent:fu.u.World},{operationName:fu.u.WorldWizardCostumeDataInit,description:"Wizard costume data init",parent:fu.u.World},{operationName:fu.u.LoadingState,objectType:_f,description:"Loading state"},{operationName:fu.u.LoadingStateAssetsLoad,description:"Loading state assets load",parent:fu.u.LoadingState},{operationName:fu.u.LoadingStateAdditionalLoadPromise,objectType:_f,description:"Await additional load task"},{operationName:fu.u.QuestManagerHubSetup,objectType:_f,description:"Quest manager hub setup"}];for(const B of k)this._database.set(B.operationName,B);k.length=0}}let Sf=class{constructor(){this._spanCache=new Map,this._factory=new Tf(this),this._onChange=()=>{this.visibilityChange()},document.addEventListener("visibilitychange",this._onChange,!1)}visibilityChange(){const k=this.isGameHidden();this._spanCache.forEach((B=>{k?null==B||B.onGameHidden():null==B||B.onGameVisible()}))}isGameHidden(){return"hidden"===document.visibilityState}startTracing(k){if(!k)return j.VyI.log("In order to create an entry tracker, the operation name is required",j.$bb.Error),null;const B=this._spanCache.get(k);if(B)return B;const U=this._factory.createTrace(k);return U&&U.init()?(this._spanCache.set(k,U),this.isGameHidden()?U.onGameHidden():U.onGameVisible(),U):null}endTracing(k,B){if(!k)return;const U=this.retrieveSpan(k);U?(B&&U.setExtraData(B),U.finish(),this.cleanDeadSpans()):this.cleanDeadSpans()}retrieveSpan(k){if(k)return this._spanCache.get(k)}cleanDeadSpans(){this._spanCache.forEach(((k,B)=>{(null==k?void 0:k.isActive())||this._spanCache.delete(B)}))}assignExtraDataToTrace(k,B){if(!B)return;const U=this.retrieveSpan(k);U&&U.setExtraData(B)}};Sf=(0,G.Cg)([(0,tt.injectable)(),(0,G.Sn)("design:paramtypes",[])],Sf);var Af=U(72042),Cf=U(48813),Of=U(1717);let If=class{constructor(){this.unhandledRequirement={meetsRequirement:()=>(0,G.sH)(this,void 0,void 0,(function*(){return!0}))}}meetsRequirements(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U;const F="object"==typeof k?k:null===(B=this.getFeatureRequirementAsset(k))||void 0===B?void 0:B.data;if(!(null==F?void 0:F.requirements))return this.logError("No data was found for Feature Requirement"+("number"==typeof k?` of asset ID ${k}`:"")),!1;if(0===F.requirements.length)return!0;const j=null!==(U=null==F?void 0:F.evaluationStrategy)&&void 0!==U?U:Of.u.RequireAny,$=yield Promise.all(F.requirements.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return(yield Promise.all(Object.entries(k).map((k=>(0,G.sH)(this,[k],void 0,(function*([k,B]){var U;const F=null!==(U=this.requirementChecks[k])&&void 0!==U?U:this.unhandledRequirement;return F===this.unhandledRequirement&&this.logWarning(`No requirement check implemented for key: ${k}`),F.meetsRequirement(B)})))))).every((k=>!0===k))})))));switch(j){case Of.u.RequireNone:return $.every((k=>!1===k));case Of.u.RequireAll:return $.every((k=>!0===k));case Of.u.RequireAny:default:return $.includes(!0)}}))}};If=(0,G.Cg)([(0,Q.injectable)()],If);var Df=U(57070);class Rf extends Df.w{getCurrentValue(){var k;const B=null!==(k=this.activePlayer.data.startDate)&&void 0!==k?k:0;return 2.7777777777777776e-7*(Date.now()-B)}meetsRequirement(k){return this.getCurrentValue()>=k}getCurrentProgress(k){return[this.getCurrentValue(),k]}}var Pf=U(28344);const Mf=[{isEnabled:()=>(0,Dt.G)(Pf.y).enabled,getOverrideMap:()=>{var k;const B=(0,Dt.G)(Pf.y);return B.enabled&&null!==(k=B.requirementOverrides)&&void 0!==k?k:{}}}];class Nf extends Df.w{getCurrentValue(){const k=this.activePlayer.data,B=Vt.s.get("GameConstants.Features.SplitTests.CHARACTER_CREATION_TIME");let U=0;return B>0?U=B:j.Aq$.isDefined(k.startDate)&&(U=k.startDate),U}getCurrentProgress(k){return[this.getCurrentValue(),{after:j.Aq$.isDefined(k.after)?k.after:0,before:j.Aq$.isDefined(k.before)?k.before:Vt.s.MAX_SAFE_INTEGER}]}meetsRequirement(k){const B=this.getCurrentValue();return j.Aq$.isDefined(k.after)||(k.after=0),j.Aq$.isDefined(k.before)||(k.before=Vt.s.MAX_SAFE_INTEGER),B>=k.after&&B=k}getCurrentProgress(k){return[this.getCurrentValue(),k]}}class kf extends Df.w{getCurrentValue(){return this.activePlayer.getPlayerData().zone}meetsRequirement(k){return this.getCurrentValue()===k}getCurrentProgress(k){return[this.getCurrentValue(),k]}}class Bf extends Df.w{getCurrentValue(k){const B={};return Object.keys(k).forEach((k=>{var U;B[k]=j.o5U[k]?j.o5U[k]():null===(U=Pt.pF[k])||void 0===U?void 0:U.call(Pt.pF)})),B}meetsRequirement(k){const B=Object.keys(k).find((k=>"function"!=typeof j.o5U[k]&&"function"!=typeof Pt.pF[k]));Q.Util.isDefined(B)&&j.VyI.log(`Incorrect DeviceRequirement configuration; Device.${B} is not a valid method.`,j.$bb.Warning);const U=this.getCurrentValue(k);return Object.keys(k).every((B=>U[B]===k[B]))}getCurrentProgress(k){return[this.getCurrentValue(k),k]}}class Uf extends Df.w{getCurrentValue(){return this.activePlayer.highestDifficultyUnlocked}meetsRequirement(k){var B;return!!(null===(B=this.activePlayer.difficultyUnlocks)||void 0===B?void 0:B[k])}getCurrentProgress(k){return[this.getCurrentValue(),k]}}class Ff extends Df.w{getCurrentValue(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B,U;const F=Ot.s.STORE_QUEST_ID,G=yield this._dynamicStoreQuestManager.getRawQuestProgress(F);if(!(null==G?void 0:G.tasks))return 0;const j=G.tasks.find((B=>B.id===k.id));return j?null!==(U=null===(B=j.data)||void 0===B?void 0:B.timesCompleted)&&void 0!==U?U:j.status===ns.t.COMPLETE?1:0:0}))}meetsRequirement(k){return(0,G.sH)(this,void 0,void 0,(function*(){return(yield this.getCurrentValue(k))>=k.purchaseCount}))}getCurrentProgress(k){return j.VyI.log("[DynamicStoreItemPurchaseCountRequirement] getCurrentProgress is not implemented for this requirement type.",j.$bb.Error),[0,k.purchaseCount]}}(0,G.Cg)([(0,Re.b)("7a1-ff33"),(0,G.Sn)("design:type",Ot.s)],Ff.prototype,"_dynamicStoreQuestManager",void 0);class Gf extends Df.w{getCurrentValue(k){try{return ti.U.isStepComplete(k)}catch(e){return!1}}meetsRequirement(k){return this.getCurrentValue(k)}getCurrentProgress(k){return[this.getCurrentValue(k),!0]}}var jf=U(86824);class $f extends Df.w{getCurrentValue(k){return j.Aq$.isDefined(k.override)?k.override:jf.e.areRequirementsMet(k)}meetsRequirement(k){return this.getCurrentValue(k)}getCurrentProgress(k){return[this.getCurrentValue(k),!0]}}class Hf extends Df.w{getCurrentValue(k){return K.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue(k,!1)}meetsRequirement(k){return this.getCurrentValue(k)}getCurrentProgress(k){return[this.getCurrentValue(k),!0]}}class Vf extends Df.w{getCurrentValue(){return K.q.instance.prodigy.friendsListNetworkHandler.friendsList.length}meetsRequirement(k){return this.getCurrentValue()>=k}getCurrentProgress(k){return[this.getCurrentValue(),k]}}class Wf extends Df.w{constructor(k){super(k),K.q.instance.prodigy.gameContainer.get("fab-547a").getData().then((([,k])=>this._data=k)).catch(j.RQr.createHandler("An error occurred while fetching geolocation data."))}getCurrentValue(){return this._data}meetsRequirement(k){var B,U,F;const G=this.getCurrentValue();return!!G&&(null!==(B=k.deny)&&void 0!==B?B:[]).every((k=>!this.isoDoesMatch(k)))&&(null!==(U=k.allow)&&void 0!==U?U:[null===(F=G.country)||void 0===F?void 0:F.iso_code]).some((k=>this.isoDoesMatch(k)))}getCurrentProgress(k){return[this.getCurrentValue(),k]}isoDoesMatch(k){var B,U,F,G;if(!k)return!1;const[j,$]=k.split("-");return j===(null!==(U=null===(B=this._data.country)||void 0===B?void 0:B.iso_code)&&void 0!==U&&U)&&(!$||null!==(G=null===(F=this._data.subdivisions)||void 0===F?void 0:F.some((k=>k.iso_code===$)))&&void 0!==G&&G)}}class qf extends Df.w{getCurrentValue(){return this.activePlayer.hasValidatedParentEmail()}meetsRequirement(k){return this.getCurrentValue()===k}getCurrentProgress(k){return[this.getCurrentValue(),k]}}class Kf extends Df.w{getCurrentValue(){return this.activePlayer.hasValidatedTeacherEmail()}meetsRequirement(k){return this.getCurrentValue()===k}getCurrentProgress(k){return[this.getCurrentValue(),k]}}class zf extends Df.w{getCurrentValue(k){const B={};for(let U=0;UH)return!1}return!0}getCurrentProgress(k){return[this.getCurrentValue(k),k]}}var Yf=U(56735);class Qf extends Df.w{getCurrentValue(k){return K.q.instance.prodigy.world.getZone(k.zone).getQuestState()}meetsRequirement(k){var B,U;const F=K.q.instance.prodigy.world.getZone(k.zone);if(!F)return j.VyI.log(`Invalid Zone ${F} in quest requirement. The requirement is assumed to not have been met.`,j.$bb.Warning),!1;if(!j.Aq$.isDefined(k.questId)||"number"!=typeof k.questId)return j.VyI.log(`Invalid questId ${k.questId} in quest requirement. The requirement is assumed to not have been met.`,j.$bb.Warning),!1;const G=this.getCurrentValue(k),$=null!==(B=null==G?void 0:G.ID)&&void 0!==B?B:0,H=null!==(U=null==G?void 0:G.seq)&&void 0!==U?U:0;return j.Aq$.isDefined(k.questSequence)?"started"===k.questStatus?$>=k.questId&&H>=k.questSequence:$>=k.questId&&H>k.questSequence:"started"===k.questStatus?$>=k.questId:$>k.questId}getCurrentProgress(k){return[this.getCurrentValue(k),k]}}class Xf extends Df.w{getCurrentValue(){return this.activePlayer.getLevel()}meetsRequirement(k){return this.getCurrentValue()>=k}getCurrentProgress(k){return[this.getCurrentValue(),k]}}class Zf extends Df.w{getCurrentValue(){return Wd.O.localeCode}meetsRequirement(k){var B,U;const F=this.getCurrentValue();return(null!==(B=k.deny)&&void 0!==B?B:[]).every((k=>k!==F))&&(null!==(U=k.allow)&&void 0!==U?U:[F]).some((k=>k===F))}getCurrentProgress(k){return[this.getCurrentValue(),k]}}class Jf extends Df.w{getCurrentValue(){return this.activePlayer.getLevel()}meetsRequirement(k){return this.getCurrentValue()<=k}getCurrentProgress(k){return[this.getCurrentValue(),k]}}var tb=U(5018),eb=U(6030);class ib extends Df.w{getCurrentValue(k){const B=eb[k].data;return!!B&&!!this.featureRequirements.meetsRequirementsDeprecated(B)}meetsRequirement(k){return this.getCurrentValue(k)}getCurrentProgress(k){return[this.getCurrentValue(k),!0]}}(0,G.Cg)([(0,Re.b)("db5-fb6e"),(0,G.Sn)("design:type",Object)],ib.prototype,"featureRequirements",void 0);class sb extends Df.w{getCurrentValue(){return K.q.instance.prodigy.gameContainer.get("f1d-f7b1").getSubject()}meetsRequirement(k){var B,U;const F=this.getCurrentValue();return(null!==(B=k.deny)&&void 0!==B?B:[]).every((k=>k!==F))&&(null!==(U=k.allow)&&void 0!==U?U:[F]).some((k=>k===F))}getCurrentProgress(k){return[this.getCurrentValue(),k]}}var nb,ab=U(93054);class rb extends Df.w{getCurrentValue(k){return ab.P.hasPlayerCompletedFinalQuestForZone(k)}meetsRequirement(k){return this.getCurrentValue(k)}getCurrentProgress(k){return[this.getCurrentValue(k),!0]}}let ob=nb=class extends If{constructor(k){super(),this.unhandledRequirement={meetsRequirement:()=>(0,G.sH)(this,void 0,void 0,(function*(){return!1}))},this.requirementChecks={},Object.entries(nb.REQUIREMENT_HANDLERS).forEach((([B,U])=>this.requirementChecks[B]=new U(k)))}logError(k){j.VyI.log(k,j.$bb.Error)}logWarning(k){j.VyI.log(k,j.$bb.Warning)}meetsRequirementsDeprecated(k){var B,U;const F="object"==typeof k?k:null===(B=this.getFeatureRequirementAsset(k))||void 0===B?void 0:B.data;if(F){const k=(null!==(U=null==F?void 0:F.evaluationStrategy)&&void 0!==U?U:Of.u.RequireAny)===Of.u.RequireAll,B=F.requirements;if(0===B.length)return!0;let G=!0;for(let U=0;U{const B={};for(const U of Object.keys(k))B[U]=this.requirementChecks[U].getCurrentValue(k[U]);return B}))}}getProgressForRequirements(k){var B,U;const F="object"==typeof k?k:null===(B=this.getFeatureRequirementAsset(k))||void 0===B?void 0:B.data;if(!ve.A.isDefined(F)){const B="string"==typeof k?k:null!==(U=null==k?void 0:k.name)&&void 0!==U?U:"unknown-name";return void j.VyI.log(`No data was found for Feature Requirement of asset ID ${B}`,j.$bb.Warning)}const{name:G,requirements:$}=F;return{name:G,requirements:$.map((k=>{var B;const U={};for(const F of Object.keys(k)){const G=this.requirementChecks[F];U[F]={text:null===(B=null==G?void 0:G.getDisplayText)||void 0===B?void 0:B.call(G,k[F]),progress:null==G?void 0:G.getCurrentProgress(k[F])}}return U}))}}getFeatureRequirementAsset(k){let B;for(const U of Mf)U.isEnabled()&&(B=U.getOverrideMap()[k]);return B?{data:B}:le.t.getItem("featureRequirements",k)}};ob.REQUIREMENT_HANDLERS={level:Xf,maxLevel:Jf,items:zf,device:Bf,friends:Vf,classmates:Lf,experiment:$f,breadcrumb:xf,geolocation:Wf,featureFlag:Hf,legacyQuest:Qf,packageFeature:tb.G,accountAgeHours:Rf,accountCreationDate:Nf,validatedParentEmail:qf,validatedTeacherEmail:Kf,currentMap:kf,subject:sb,endgameCompletion:Gf,kennel:Yf.p,zonePrerequisite:rb,difficultyUnlocked:Uf,dynamicStoreItemPurchaseCount:Ff,restrictionMet:ib,locale:Zf},ob.ASYNC_REQUIREMENTS_KEYS=new Set(["dynamicStoreItemPurchaseCount"]),ob=nb=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)("51c-03a0")),(0,G.Sn)("design:paramtypes",[an.n])],ob);let hb=class{getStateMachine(k){return le.t.getItem("fsm",k).data}};hb=(0,G.Cg)([(0,tt.injectable)()],hb);var cb=U(4101),db=U(65826),lb=U(78407),ub=U(97200),fb=U(39473);let bb=class{constructor(k,B,U,F){this.httpClient=null,this.authProvider=null,this.currentPlayer=null,this.featureFlags=null,this.httpClient=k,this.authProvider=B,this.currentPlayer=U,this.featureFlags=F}logStat(k,B){if(this.isLoggingEnabled())if(k.isValid()){const U=new j.u1k;U.setRequestURI(`game-cortex-server/v1/stats/${B}`).setMethod(j.iXQ.Post).addRequestInterceptor(this.authProvider.authenticateRequest,this.authProvider).setUseDefaultResponseHandlers(!1).setBody(new j._A9({data:JSON.stringify(k.serialize()),userID:`${this.currentPlayer.player.userID}`})),this.httpClient.sendRequest(U).then((k=>{k.wasSuccessful()||j.VyI.log(`Stats request has failed - ${k.getErrorMessage()}`,j.$bb.Warning)})).catch(j.RQr.createHandler("Stats request has failed"))}else j.VyI.log("Invalid stats data object provided. Request will not be sent",j.$bb.Warning);else j.VyI.log("GameApiRemoteLogger#logStat was called but remote logging is disabled",j.$bb.Verbose)}isLoggingEnabled(){return!this.featureFlags.getValue("remoteLoggingDisabled",!1)}};bb=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)("30b-3020")),(0,G.Qj)(1,(0,tt.inject)("330-3c25")),(0,G.Qj)(2,(0,tt.inject)("e20-0fb0")),(0,G.Qj)(3,(0,tt.inject)("80c-6fa4")),(0,G.Sn)("design:paramtypes",[Object,Object,Wt.E,Object])],bb);class pb{constructor(k){this.game=null,this.game=k}float(k,B,U,F,G=!1){const $=this.game.add.tween(k,this).to({y:`-=${B}`},U,j.GS3.Quadratic.InOut).to({y:`+=${B}`},U,j.GS3.Quadratic.InOut);return F&&$.loop(F),G&&$.start(),$}translate(k,B,U,F,G=0,$=j.GS3.Linear.None,H=!1){const V=this.game.add.tween(k,this).delay(G).to({x:B,y:U},F,$);return H&&V.start(),V}rotate(k,B,U,F=0,G=j.GS3.Linear.None,$=!1){const H=this.game.add.tween(k,this).delay(F).to({angle:B},U,G);return $&&H.start(),H}fade(k,B,U,F=0,G=j.GS3.Linear.None,$=!1){const H=this.game.add.tween(k,this).delay(F).to({alpha:B},U,G);return $&&H.start(),H}hop(k,B,U,F,G,$=!1,H=!1){const V=this.game.add.tween(k,this).to({x:B},G,j.GS3.Linear.None);$&&V.to({alpha:0},10,j.GS3.Linear.None);const W={tween:V,tween2:this.game.add.tween(k,this).to({y:U},G/2,j.GS3.Quadratic.Out).to({y:F},G/2,j.GS3.Quadratic.In),start:()=>(W.tween.start(),W.tween2.start(),W),onTweenComplete:{tween:V,add:k=>{V.onTweenComplete.add(k.bind(this))}}};return H&&W.start(),W}shake(k,B,U,F,G,$,H=0,V=j.GS3.Linear.None,W=!1){const q=.25*$,K=this.game.add.tween(k,this).delay(H).to({x:B,y:U},q,V).to({x:F,y:G},q,V).to({x:B,y:U},q,V).to({x:0,y:0},q,V);return W&&K.start(),K}}let vb=class{getScreenWidth(){return window.screen.availWidth}getScreenHeight(){return window.screen.availHeight}getPlatformName(){let k="Desktop";return j.o5U.isIpadOS()?k="iPadOS":j.o5U.isIOS()?k="iOS":j.o5U.isFireOS()?k="Amazon":j.o5U.isAndroid()&&(k="Android"),`${k}-${Pt.pF.isNativeApp()?"App":"Browser"}`}getConnectionDownlinkSpeed(){const k=this.getConnection();if(j.Aq$.isDefined(k)){const B=k.downlink;if(j.Aq$.isDefined(B))return B}return null}getConnectionRTT(){const k=this.getConnection();if(j.Aq$.isDefined(k)){const B=k.rtt;if(j.Aq$.isDefined(B))return B}return null}getConnectionType(){const k=this.getConnection();if(j.Aq$.isDefined(k)){const B=k.type;if(j.Aq$.isDefined(B))return B}return null}getConnectionEffectiveType(){const k=this.getConnection();if(j.Aq$.isDefined(k)){const B=k.effectiveType;if(j.Aq$.isDefined(B))return B}return null}getConnection(){return j.Aq$.isDefined(navigator.connection)?navigator.connection:null}getDeviceMemory(){return j.Aq$.isDefined(navigator.deviceMemory)?navigator.deviceMemory:null}getHardwareConcurrency(){return j.Aq$.isDefined(navigator.hardwareConcurrency)?navigator.hardwareConcurrency:null}getJSHeapSizeLimit(){return j.Aq$.isDefined(performance.memory)&&j.Aq$.isDefined(performance.memory.jsHeapSizeLimit)?performance.memory.jsHeapSizeLimit:null}getUsedJSHeapSize(){return j.Aq$.isDefined(performance.memory)&&j.Aq$.isDefined(performance.memory.usedJSHeapSize)?performance.memory.usedJSHeapSize:null}isVideoAvailable(){return"Desktop-Browser"===this.getPlatformName()&&(j.o5U.isChrome()||j.o5U.isFirefox())}isWebWorkerAvailable(){return Boolean(window.Worker)}isWebSocketAvailable(){return Boolean(window.WebSocket)}isWebGLAvailable(){let k=!1;const B=document.createElement("canvas");document.body.appendChild(B);const U=B.getContext("webgl")||B.getContext("experimental-webgl");return U&&U instanceof WebGLRenderingContext&&(k=!0),document.body.removeChild(B),k}};vb=(0,G.Cg)([(0,tt.injectable)()],vb);let gb=class{getCurrentEnvironment(){let k=this.getCurrentEnvironmentByHost();const B=W.qg(this.getWindowQueryString()).env;return j.Aq$.isDefined(B)&&("dev"===B?k=$e.h.Dev:"staging"===B?k=$e.h.Staging:"production"===B||"prod"===B?k=$e.h.Production:B.indexOf("-qa")>-1&&(k=$e.h.QABox)),k}getCurrentEnvironmentByHost(){const k=this.getWindowHost();return k.indexOf("-qa")>=0?$e.h.QABox:k.indexOf("dev.prodigygame.org")>=0||k.indexOf("prodigygame.net")>=0?$e.h.Dev:k.indexOf("prodigygame.org")>=0?$e.h.Staging:k.indexOf("prodigygame.com")>=0?$e.h.Production:$e.h.Local}getEnvironmentString(){switch(this.getCurrentEnvironment()){case $e.h.Production:return"production";case $e.h.Staging:return"staging";default:return"dev"}}getWindowHost(){return window.location.host}getWindowQueryString(){return window.location.search}};gb=(0,G.Cg)([(0,tt.injectable)()],gb);var mb={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},yb=function(k){for(var B=[],U=1;U>parseInt(k,10)/4).toString(16):"".concat(1e7,"-").concat(1e3,"-").concat(4e3,"-").concat(8e3,"-").concat(1e11).replace(/[018]/g,kb)}function Bb(k){return 0!==k&&100*Math.random()<=k}function Ub(k,B){return+k.toFixed(B)}function Fb(){}function Gb(k,B,U){if("object"!=typeof k||null===k)return JSON.stringify(k);var F=jb(Object.prototype),G=jb(Array.prototype),j=jb(Object.getPrototypeOf(k)),$=jb(k);try{return JSON.stringify(k,B,U)}catch(me){return""}finally{F(),G(),j(),$()}}function jb(k){var B=k,U=B.toJSON;return U?(delete B.toJSON,function(){B.toJSON=U}):Fb}function $b(k,B){return-1!==k.indexOf(B)}function Hb(k){if(Array.from)return Array.from(k);var B=[];if(k instanceof Set)k.forEach((function(k){return B.push(k)}));else for(var U=0;U=0&&k<=100}function qb(k){return"number"==typeof k}function Kb(k){return Object.keys(k).map((function(B){return k[B]}))}function zb(k){return Object.keys(k).map((function(B){return[B,k[B]]}))}function Yb(k){return 0===Object.keys(k).length}function Qb(k,B){return k.slice(0,B.length)===B}function Xb(){if("object"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get:function(){return this},configurable:!0});var k=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!=typeof k&&(k="object"==typeof self?self:"object"==typeof window?window:{}),k}function Zb(k){if(k.origin)return k.origin;var B=k.host.replace(/(:80|:443)$/,"");return"".concat(k.protocol,"//").concat(B)}function Jb(k,B){var U=new RegExp("(?:^|;)\\s*".concat(B,"\\s*=\\s*([^;]+)")).exec(k);return U?U[1]:void 0}function tp(k,B,U){void 0===U&&(U="");var F=k.charCodeAt(B-1),G=F>=55296&&F<=56319?B+1:B;return k.length<=G?k:"".concat(k.slice(0,G)).concat(U)}function ep(k){return null===k?"null":Array.isArray(k)?"array":typeof k}function ip(k,B,U){if(void 0===U&&(U=function(){if("undefined"!=typeof WeakSet){var k=new WeakSet;return{hasAlreadyBeenSeen:function(B){var U=k.has(B);return U||k.add(B),U}}}var B=[];return{hasAlreadyBeenSeen:function(k){var U=B.indexOf(k)>=0;return U||B.push(k),U}}}()),void 0===B)return k;if("object"!=typeof B||null===B)return B;if(B instanceof Date)return new Date(B.getTime());if(B instanceof RegExp){var F=B.flags||[B.global?"g":"",B.ignoreCase?"i":"",B.multiline?"m":"",B.sticky?"y":"",B.unicode?"u":""].join("");return new RegExp(B.source,F)}if(!U.hasAlreadyBeenSeen(B)){if(Array.isArray(B)){for(var G=Array.isArray(k)?k:[],j=0;j500&&this.buffer.splice(0,1)},k.prototype.drain=function(){this.buffer.forEach((function(k){return k()})),this.buffer.length=0},k}();function fp(k){return{relative:k,timeStamp:bp(k)}}function bp(k){var B=vp()-performance.now();return B>Sp()?Math.round(wp(B,k)):function(k){return Math.round(wp(Sp(),k))}(k)}function pp(k){return qb(k)?Ub(1e6*k,0):k}function vp(){return(new Date).getTime()}function gp(){return vp()}function mp(){return performance.now()}function yp(){return{relative:mp(),timeStamp:gp()}}function _p(){return{relative:0,timeStamp:Sp()}}function Ep(k,B){return B-k}function wp(k,B){return k+B}function Tp(k){return k-Sp()}function Sp(){return void 0===lp&&(lp=performance.timing.navigationStart),lp}var Ap;function Cp(k,B,U,F){var G=new Date;G.setTime(G.getTime()+U);var j="expires=".concat(G.toUTCString()),$=F&&F.crossSite?"none":"strict",H=F&&F.domain?";domain=".concat(F.domain):"",V=F&&F.secure?";secure":"";document.cookie="".concat(k,"=").concat(B,";").concat(j,";path=/;samesite=").concat($).concat(H).concat(V)}function Op(k){return Jb(document.cookie,k)}function Ip(k,B){Cp(k,"",0,B)}var Dp;function Rp(){return Boolean(window._DATADOG_SYNTHETICS_INJECTS_RUM||Op("datadog-synthetics-injects-rum"))}function Pp(){var k=Xb().DatadogEventBridge;if(k)return{getAllowedWebViewHosts:function(){return JSON.parse(k.getAllowedWebViewHosts())},send:function(B,U){k.send(JSON.stringify({eventType:B,event:U}))}}}function Mp(k){var B;void 0===k&&(k=null===(B=Xb().location)||void 0===B?void 0:B.hostname);var U=Pp();return!!U&&U.getAllowedWebViewHosts().some((function(B){return k===B||(U=k,F=".".concat(B),U.slice(-F.length)===F);var U,F}))}function Np(k){return!!Dp&&Dp.has(k)}function xp(){return Dp||new Set}var Lp="?";function kp(k){var B=[],U=Wp(k,"stack"),F=String(k);return U&&Qb(U,F)&&(U=U.slice(F.length)),U&&U.split("\n").forEach((function(k){var U=function(k){var B=Fp.exec(k);if(!B)return;var U=B[2]&&0===B[2].indexOf("native"),F=B[2]&&0===B[2].indexOf("eval"),G=Gp.exec(B[2]);F&&G&&(B[2]=G[1],B[3]=G[2],B[4]=G[3]);return{args:U?[B[2]]:[],column:B[4]?+B[4]:void 0,func:B[1]||Lp,line:B[3]?+B[3]:void 0,url:U?void 0:B[2]}}(k)||function(k){var B=jp.exec(k);if(!B)return;return{args:[],column:B[3]?+B[3]:void 0,func:Lp,line:B[2]?+B[2]:void 0,url:B[1]}}(k)||function(k){var B=$p.exec(k);if(!B)return;return{args:[],column:B[4]?+B[4]:void 0,func:B[1]||Lp,line:+B[3],url:B[2]}}(k)||function(k){var B=Hp.exec(k);if(!B)return;var U=B[3]&&B[3].indexOf(" > eval")>-1,F=Vp.exec(B[3]);U&&F&&(B[3]=F[1],B[4]=F[2],B[5]=void 0);return{args:B[2]?B[2].split(","):[],column:B[5]?+B[5]:void 0,func:B[1]||Lp,line:B[4]?+B[4]:void 0,url:B[3]}}(k);U&&(!U.func&&U.line&&(U.func=Lp),B.push(U))})),{message:Wp(k,"message"),name:Wp(k,"name"),stack:B}}var Bp="((?:file|https?|blob|chrome-extension|native|eval|webpack||\\w+\\.|\\/).*?)",Up="(?::(\\d+))",Fp=new RegExp("^\\s*at (.*?) ?\\(".concat(Bp).concat(Up,"?").concat(Up,"?\\)?\\s*$"),"i"),Gp=new RegExp("\\((\\S*)".concat(Up).concat(Up,"\\)"));var jp=new RegExp("^\\s*at ?".concat(Bp).concat(Up,"?").concat(Up,"??\\s*$"),"i");var $p=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var Hp=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Vp=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Wp(k,B){if("object"==typeof k&&k&&B in k){var U=k[B];return"string"==typeof U?U:void 0}}var qp,Kp="agent",zp="console",Yp="custom",Qp="source",Xp="report";function Zp(k){var B=k.stackTrace,U=k.originalError,F=k.handlingStack,G=k.startClocks,j=k.nonErrorPrefix,$=k.source,H=k.handling;return B&&(void 0!==B.message||U instanceof Error)?{startClocks:G,source:$,handling:H,originalError:U,message:B.message||"Empty message",stack:Jp(B),handlingStack:F,type:B.name,causes:iv(U,$)}:{startClocks:G,source:$,handling:H,originalError:U,message:"".concat(j," ").concat(Gb(U)),stack:"No stack, consider using an instance of Error",handlingStack:F,type:B&&B.name}}function Jp(k){var B=tv(k);return k.stack.forEach((function(k){var U="?"===k.func?"":k.func,F=k.args&&k.args.length>0?"(".concat(k.args.join(", "),")"):"",G=k.line?":".concat(k.line):"",j=k.line&&k.column?":".concat(k.column):"";B+="\n at ".concat(U).concat(F," @ ").concat(k.url).concat(G).concat(j)})),B}function tv(k){return"".concat(k.name||"Error",": ").concat(k.message)}function ev(){var k,B=new Error;if(!B.stack)try{throw B}catch(e){}return Cb((function(){var U=kp(B);U.stack=U.stack.slice(2),k=Jp(U)})),k}function iv(k,B){for(var U=k,F=[];(null==U?void 0:U.cause)instanceof Error&&F.length<10;){var G=kp(U.cause);F.push({message:U.cause.message,source:B,type:null==G?void 0:G.name,stack:G&&Jp(G)}),U=U.cause}return F.length?F:void 0}function sv(k){var B=xb({},k);return["id","name","email"].forEach((function(k){k in B&&(B[k]=String(B[k]))})),B}function nv(k){return rv(k,Zb(window.location)).href}function av(k){return Zb(rv(k))}function rv(k,B){if(function(){if(void 0!==qp)return qp;try{var k=new URL("http://test/path");return qp="http://test/path"===k.href}catch(me){qp=!1}return qp}())return void 0!==B?new URL(k,B):new URL(k);if(void 0===B&&!/:/.test(k))throw new Error("Invalid URL: '".concat(k,"'"));var U=document,F=U.createElement("a");if(void 0!==B){var G=(U=document.implementation.createHTMLDocument("")).createElement("base");G.href=B,U.head.appendChild(G),U.body.appendChild(F)}return F.href=k,F}var ov="datadoghq.com",hv="ap1.datadoghq.com",cv={logs:"logs",rum:"rum",sessionReplay:"session-replay"},dv={logs:"logs",rum:"rum",sessionReplay:"replay"};function lv(k,B,U){var F=function(k,B){var U="/api/v2/".concat(dv[B]),F=k.proxy,G=k.proxyUrl;if(F){var j=nv(F);return function(k){return"".concat(j,"?ddforward=").concat(encodeURIComponent("".concat(U,"?").concat(k)))}}var $=function(k,B){var U=k.site,F=void 0===U?ov:U,G=k.internalAnalyticsSubdomain;if(G&&F===ov)return"".concat(G,".").concat(ov);var j=F.split("."),$=j.pop(),H=F!==hv?"".concat(cv[B],"."):"";return"".concat(H,"browser-intake-").concat(j.join("-"),".").concat($)}(k,B);if(void 0===F&&G){var H=nv(G);return function(k){return"".concat(H,"?ddforward=").concat(encodeURIComponent("https://".concat($).concat(U,"?").concat(k)))}}return function(k){return"https://".concat($).concat(U,"?").concat(k)}}(k,B);return{build:function(G,j,$){var H=function(k,B,U,F,G,j){var $=k.clientToken,H=k.internalAnalyticsSubdomain,V=["sdk_version:".concat("4.35.0"),"api:".concat(F)].concat(U);G&&Np("collect_flush_reason")&&V.push("flush_reason:".concat(G));j&&V.push("retry_count:".concat(j.count),"retry_after:".concat(j.lastFailureStatus));var W=["ddsource=browser","ddtags=".concat(encodeURIComponent(V.join(","))),"dd-api-key=".concat($),"dd-evp-origin-version=".concat(encodeURIComponent("4.35.0")),"dd-evp-origin=browser","dd-request-id=".concat(kb())];"rum"===B&&W.push("batch_time=".concat(gp()));H&&W.reverse();return W.join("&")}(k,B,U,G,j,$);return F(H)},urlPrefix:F(""),endpointType:B}}var uv=/[^a-z0-9_:./-]/;function fv(k,B){var U=200-k.length-1;(B.length>U||uv.test(B))&&yb.warn("".concat(k," value doesn't meet tag requirements and will be sanitized"));var F=B.replace(/,/g,"_");return"".concat(k,":").concat(F)}function bv(k){var B=function(k){var B=k.env,U=k.service,F=k.version,G=k.datacenter,j=[];return B&&j.push(fv("env",B)),U&&j.push(fv("service",U)),F&&j.push(fv("version",F)),G&&j.push(fv("datacenter",G)),j}(k),U=function(k,B){return{logsEndpointBuilder:lv(k,"logs",B),rumEndpointBuilder:lv(k,"rum",B),sessionReplayEndpointBuilder:lv(k,"sessionReplay",B)}}(k,B),F=Kb(U).map((function(k){return k.urlPrefix})),G=function(k,B,U){if(!k.replica)return;var F=xb({},k,{site:ov,clientToken:k.replica.clientToken}),G={logsEndpointBuilder:lv(F,"logs",U),rumEndpointBuilder:lv(F,"rum",U)};return B.push.apply(B,Kb(G).map((function(k){return k.urlPrefix}))),xb({applicationId:k.replica.applicationId},G)}(k,F,B);return xb({isIntakeUrl:function(k){return F.some((function(B){return 0===k.indexOf(B)}))},replica:G,site:k.site||ov},U)}var pv={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"};function vv(k){var B,U,F;if(k&&k.clientToken){var G=null!==(B=k.sessionSampleRate)&&void 0!==B?B:k.sampleRate;if(void 0===G||Wb(G))if(void 0===k.telemetrySampleRate||Wb(k.telemetrySampleRate)){var j;if(void 0===k.telemetryConfigurationSampleRate||Wb(k.telemetryConfigurationSampleRate))return j=k.enableExperimentalFeatures,Array.isArray(j)&&(Dp||(Dp=new Set(j)),j.filter((function(k){return"string"==typeof k})).forEach((function(k){$b(k,"-")&&yb.warn("please use snake case for '".concat(k,"'")),Dp.add(k)}))),xb({beforeSend:k.beforeSend&&_b(k.beforeSend,"beforeSend threw an error:"),cookieOptions:gv(k),sessionSampleRate:null!=G?G:100,telemetrySampleRate:null!==(U=k.telemetrySampleRate)&&void 0!==U?U:20,telemetryConfigurationSampleRate:null!==(F=k.telemetryConfigurationSampleRate)&&void 0!==F?F:5,service:k.service,silentMultipleInit:!!k.silentMultipleInit,batchBytesLimit:16384,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:3e4,batchMessagesLimit:50,messageBytesLimit:262144},bv(k));yb.error("Telemetry Configuration Sample Rate should be a number between 0 and 100")}else yb.error("Telemetry Sample Rate should be a number between 0 and 100");else yb.error("Session Sample Rate should be a number between 0 and 100")}else yb.error("Client Token is not configured, we will not send any data.")}function gv(k){var B={};return B.secure=function(k){return!!k.useSecureSessionCookie||!!k.useCrossSiteSessionCookie}(k),B.crossSite=!!k.useCrossSiteSessionCookie,k.trackSessionAcrossSubdomains&&(B.domain=function(){if(void 0===Ap){for(var k="dd_site_test_".concat(kb()),B=window.location.hostname.split("."),U=B.pop();B.length&&!Op(k);)U="".concat(B.pop(),".").concat(U),Cp(k,"test",Pb,{domain:U});Ip(k,{domain:U}),Ap=U}return Ap}()),B}function mv(k){0!==k.status||k.isAborted||(k.traceId=void 0,k.spanId=void 0,k.traceSampled=void 0)}function yv(k,B,U,F){if(void 0!==_v()&&U.findTrackedSession()){var G,j,$,H,V,W=Vb(k.allowedTracingUrls,(function(k){return rp([k.match],B.url,!0)}));if(W)B.traceId=new Ev,B.spanId=new Ev,B.traceSampled=!qb(k.traceSampleRate)||Bb(k.traceSampleRate),F((G=B.traceId,j=B.spanId,$=B.traceSampled,H=W.propagatorTypes,V={},H.forEach((function(k){switch(k){case"datadog":xb(V,{"x-datadog-origin":"rum","x-datadog-parent-id":j.toDecimalString(),"x-datadog-sampling-priority":$?"1":"0","x-datadog-trace-id":G.toDecimalString()});break;case"tracecontext":xb(V,{traceparent:"00-0000000000000000".concat(G.toPaddedHexadecimalString(),"-").concat(j.toPaddedHexadecimalString(),"-0").concat($?"1":"0")});break;case"b3":xb(V,{b3:"".concat(G.toPaddedHexadecimalString(),"-").concat(j.toPaddedHexadecimalString(),"-").concat($?"1":"0")});break;case"b3multi":xb(V,{"X-B3-TraceId":G.toPaddedHexadecimalString(),"X-B3-SpanId":j.toPaddedHexadecimalString(),"X-B3-Sampled":$?"1":"0"})}})),V))}}function _v(){return window.crypto||window.msCrypto}var Ev=function(){function k(){this.buffer=new Uint8Array(8),_v().getRandomValues(this.buffer),this.buffer[0]=127&this.buffer[0]}return k.prototype.toString=function(k){var B=this.readInt32(0),U=this.readInt32(4),F="";do{var G=B%k*4294967296+U;B=Math.floor(B/k),U=Math.floor(G/k),F=(G%k).toString(k)+F}while(B||U);return F},k.prototype.toDecimalString=function(){return this.toString(10)},k.prototype.toPaddedHexadecimalString=function(){var k=this.toString(16);return Array(17-k.length).join("0")+k},k.prototype.readInt32=function(k){return 16777216*this.buffer[k]+(this.buffer[k+1]<<16)+(this.buffer[k+2]<<8)+this.buffer[k+3]},k}();function wv(k){var B,U,F,G,j,$;if(k.applicationId)if(void 0===k.sessionReplaySampleRate||Wb(k.sessionReplaySampleRate)){var H=null!==(B=k.premiumSampleRate)&&void 0!==B?B:k.replaySampleRate;if(void 0!==H&&void 0!==k.sessionReplaySampleRate&&(yb.warn("Ignoring Premium Sample Rate because Session Replay Sample Rate is set"),H=void 0),void 0===H||Wb(H)){var V=null!==(U=k.traceSampleRate)&&void 0!==U?U:k.tracingSampleRate;if(void 0===V||Wb(V))if(void 0===k.excludedActivityUrls||Array.isArray(k.excludedActivityUrls)){var W=function(k){void 0!==k.allowedTracingUrls&&void 0!==k.allowedTracingOrigins&&yb.warn("Both allowedTracingUrls and allowedTracingOrigins (deprecated) have been defined. The parameter allowedTracingUrls will override allowedTracingOrigins.");if(void 0!==k.allowedTracingUrls){if(!Array.isArray(k.allowedTracingUrls))return void yb.error("Allowed Tracing URLs should be an array");if(0!==k.allowedTracingUrls.length&&void 0===k.service)return void yb.error("Service needs to be configured when tracing is enabled");var B=[];return k.allowedTracingUrls.forEach((function(k){var U;ap(k)?B.push({match:k,propagatorTypes:["datadog"]}):"object"===ep(U=k)&&ap(U.match)&&Array.isArray(U.propagatorTypes)?B.push(k):yb.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",k)})),B}if(void 0!==k.allowedTracingOrigins){if(!Array.isArray(k.allowedTracingOrigins))return void yb.error("Allowed Tracing Origins should be an array");if(0!==k.allowedTracingOrigins.length&&void 0===k.service)return void yb.error("Service needs to be configured when tracing is enabled");var U=[];return k.allowedTracingOrigins.forEach((function(k){var B=function(k){var B;"string"==typeof k?B=k:k instanceof RegExp?B=function(B){return k.test(av(B))}:"function"==typeof k&&(B=function(B){return k(av(B))});if(void 0===B)return void yb.warn("Allowed Tracing Origins parameters should be a string, RegExp or function. Ignoring parameter",k);return{match:B,propagatorTypes:["datadog"]}}(k);B&&U.push(B)})),U}return[]}(k);if(W){var q=vv(k);if(q){var K,z,Y=!!(null!==(F=k.trackUserInteractions)&&void 0!==F?F:k.trackInteractions),Q=!!k.trackFrustrations;return xb({applicationId:k.applicationId,version:k.version,actionNameAttribute:k.actionNameAttribute,sessionReplaySampleRate:null!==(j=null!==(G=k.sessionReplaySampleRate)&&void 0!==G?G:H)&&void 0!==j?j:100,oldPlansBehavior:void 0===k.sessionReplaySampleRate,traceSampleRate:V,allowedTracingUrls:W,excludedActivityUrls:null!==($=k.excludedActivityUrls)&&void 0!==$?$:[],trackUserInteractions:Y||Q,trackFrustrations:Q,trackViewsManually:!!k.trackViewsManually,trackResources:k.trackResources,trackLongTasks:k.trackLongTasks,defaultPrivacyLevel:(K=pv,z=k.defaultPrivacyLevel,Object.keys(K).some((function(k){return K[k]===z}))?k.defaultPrivacyLevel:pv.MASK_USER_INPUT),customerDataTelemetrySampleRate:1},q)}}}else yb.error("Excluded Activity Urls should be an array");else yb.error("Trace Sample Rate should be a number between 0 and 100")}else yb.error("Premium Sample Rate should be a number between 0 and 100")}else yb.error("Session Replay Sample Rate should be a number between 0 and 100");else yb.error("Application ID is not configured, no RUM data will be collected.")}function Tv(k){var B=new Set;return Array.isArray(k.allowedTracingUrls)&&k.allowedTracingUrls.length>0&&k.allowedTracingUrls.forEach((function(k){ap(k)?B.add("datadog"):k.propagatorTypes.forEach((function(k){return B.add(k)}))})),Array.isArray(k.allowedTracingOrigins)&&k.allowedTracingOrigins.length>0&&B.add("datadog"),Hb(B)}function Sv(k,B,U){return{context:k.getContext(),user:B.getContext(),hasReplay:!!U.isRecording()||void 0}}function Av(k,B){var U=window.__ddBrowserSdkExtensionCallback;U&&U({type:k,payload:B})}var Cv=function(){function k(k){this.onFirstSubscribe=k,this.observers=[]}return k.prototype.subscribe=function(k){var B=this;return!this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe()||void 0),this.observers.push(k),{unsubscribe:function(){B.observers=B.observers.filter((function(B){return k!==B})),!B.observers.length&&B.onLastUnsubscribe&&B.onLastUnsubscribe()}}},k.prototype.notify=function(k){this.observers.forEach((function(B){return B(k)}))},k}();function Ov(){for(var k=[],B=0;B"],Lv=["ddog-gov.com"],kv={maxEventsPerPage:0,sentEventCount:0,telemetryEnabled:!1,telemetryConfigurationEnabled:!1};function Bv(k,B){var U,F=new Cv;return kv.telemetryEnabled=!$b(Lv,B.site)&&Bb(B.telemetrySampleRate),kv.telemetryConfigurationEnabled=kv.telemetryEnabled&&Bb(B.telemetryConfigurationSampleRate),Pv=function(B){if(kv.telemetryEnabled){var G=function(k,B){return np({type:"telemetry",date:gp(),service:k,version:"4.35.0",source:"browser",_dd:{format_version:2},telemetry:B,experimental_features:Hb(xp())},void 0!==U?U():{})}(k,B);F.notify(G),Av("telemetry",G)}},Eb=Fv,xb(kv,{maxEventsPerPage:B.maxTelemetryEventsPerPage,sentEventCount:0}),{setContextProvider:function(k){U=k},observable:F,enabled:kv.telemetryEnabled}}function Uv(k,B){Ob(mb.debug,k,B),Gv(xb({type:Mv,message:k,status:"debug"},B))}function Fv(k){Gv(xb({type:Mv,status:"error"},function(k){if(k instanceof Error){var B=kp(k);return{error:{kind:B.name,stack:Jp(jv(B))},message:B.message}}return{error:{stack:"Not an instance of error"},message:"Uncaught ".concat(Gb(k))}}(k)))}function Gv(k){Pv&&kv.sentEventCountk[U])return!1;return!0}function zv(k){var B=Yv(k);if(B){var U=B.startTime,F=B.fetchStart,G=B.redirectStart,j=B.redirectEnd,$=B.domainLookupStart,H=B.domainLookupEnd,V=B.connectStart,W=B.secureConnectionStart,q=B.connectEnd,K=B.requestStart,z=B.responseStart,Y={download:Xv(U,z,B.responseEnd),first_byte:Xv(U,K,z)};return q!==F&&(Y.connect=Xv(U,V,q),Kv(V,W,q)&&(Y.ssl=Xv(U,W,q))),H!==F&&(Y.dns=Xv(U,$,H)),Qv(k)&&(Y.redirect=Xv(U,G,j)),Y}}function Yv(k){if(Kv(k.startTime,k.fetchStart,k.domainLookupStart,k.domainLookupEnd,k.connectStart,k.connectEnd,k.requestStart,k.responseStart,k.responseEnd)){if(!Qv(k))return k;var B=k.redirectStart,U=k.redirectEnd;if(B=0;B-=1){var U,F=k.body.childNodes[B];if(U=cg(F))return U;if(!tg(F))break}}(k);if(!B)return;return hg(Jb(B,"trace-id"),Jb(B,"trace-time"))}(k);if(B&&!(B.traceTime<=vp()-12e4))return B.traceId}function hg(k,B){var U=B&&Number(B);if(k&&U)return{traceId:k,traceTime:U}}function cg(k){if(k&&function(k){return k.nodeType===Node.COMMENT_NODE}(k)){var B=/^\s*DATADOG;(.*?)\s*$/.exec(k.data);if(B)return B[1]}}function dg(){return void 0!==window.performance&&"getEntries"in performance}function lg(k){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes(k)}function ug(k,B){var U;if(U=function(U){bg(k,B,[U])},Hv("interactive",(function(){var k,B={entryType:"resource",initiatorType:Vv,traceId:og(document)};if(lg("navigation")&&performance.getEntriesByType("navigation").length>0)k=xb(performance.getEntriesByType("navigation")[0].toJSON(),B);else{var F=fg();k=xb(F,{decodedBodySize:0,duration:F.responseEnd,name:window.location.href,startTime:0},B)}U(k)})),dg()){var F=performance.getEntries();Db((function(){return bg(k,B,F)}))}if(window.PerformanceObserver){var G=Ab((function(U){return bg(k,B,U.getEntries())})),j=["resource","navigation","longtask","paint"],$=["largest-contentful-paint","first-input","layout-shift"];try{$.forEach((function(k){new PerformanceObserver(G).observe({type:k,buffered:!0})}))}catch(e){j.push.apply(j,$)}new PerformanceObserver(G).observe({entryTypes:j}),dg()&&"addEventListener"in performance&&performance.addEventListener("resourcetimingbufferfull",(function(){performance.clearResourceTimings()}))}lg("navigation")||function(k){function B(){k(xb(fg(),{entryType:"navigation"}))}Hv("complete",(function(){Db(B)}))}((function(U){bg(k,B,[U])})),lg("first-input")||function(k){var B=vp(),U=!1,F=Dv(window,["click","mousedown","keydown","touchstart","pointerdown"],(function(k){if(k.cancelable){var B={entryType:"first-input",processingStart:mp(),startTime:k.timeStamp};"pointerdown"===k.type?G(B):j(B)}}),{passive:!0,capture:!0}).stop;function G(k){Dv(window,["pointerup","pointercancel"],(function(B){"pointerup"===B.type&&j(k)}),{once:!0})}function j(G){if(!U){U=!0,F();var j=G.processingStart-G.startTime;j>=0&&j2500)){var k=Cg[Cg.length-1],B=mp();void 0!==k&&void 0===k.end||Cg.push({start:B})}}function Dg(){if(0!==Cg.length){var k=Cg[Cg.length-1],B=mp();void 0===k.end&&(k.end=B)}}function Rg(k){for(var B=Cg.length-1;B>=0;B--){var U=Cg[B];if(void 0!==U.end&&k>U.end)break;if(k>U.start&&(void 0===U.end||k=G;j--){var $=Cg[j];if(void 0!==$.end&&k>$.end)break;if(!(U<$.start)){var H=k>$.start?k:$.start,V=Ep(k,H),W=Ep(H,void 0===$.end||U<$.end?U:$.end);F.unshift({start:pp(V),duration:pp(W)})}}return F}var Mg,Ng=function(){function k(){this.callbacks={}}return k.prototype.notify=function(k,B){var U=this.callbacks[k];U&&U.forEach((function(k){return k(B)}))},k.prototype.subscribe=function(k,B){var U=this;return this.callbacks[k]||(this.callbacks[k]=[]),this.callbacks[k].push(B),{unsubscribe:function(){U.callbacks[k]=U.callbacks[k].filter((function(k){return B!==k}))}}},k}(),xg=144e5,Lg=9e5,kg=1/0,Bg=function(){function k(k){var B=this;this.expireDelay=k,this.entries=[],this.clearOldContextsInterval=setInterval((function(){return B.clearOldContexts()}),6e4)}return k.prototype.add=function(k,B){var U=this,F={context:k,startTime:B,endTime:kg,remove:function(){var k=U.entries.indexOf(F);k>=0&&U.entries.splice(k,1)},close:function(k){F.endTime=k}};return this.entries.unshift(F),F},k.prototype.find=function(k){void 0===k&&(k=kg);for(var B=0,U=this.entries;B0&&this.entries[this.entries.length-1].endTimeU.bytesLimit}B(void 0,k,$)}!function k(){F.read().then(Ab((function(B){B.done?$():(U.collectStreamBody&&G.push(B.value),(j+=B.value.length)>U.bytesLimit?$():k())})),Ab((function(k){return B(k)})))}()}(U.body,(function(){B(Ep(k.startClocks.timeStamp,gp()))}),{bytesLimit:Number.POSITIVE_INFINITY,collectStreamBody:!1}):B(Ep(k.startClocks.timeStamp,gp()))}(G,(function(B){U.clearTracingIfNeeded(G),k.notify(6,{duration:B,method:G.method,requestIndex:G.requestIndex,responseType:G.responseType,spanId:G.spanId,startClocks:G.startClocks,status:G.status,traceId:G.traceId,traceSampled:G.traceSampled,type:"fetch",url:G.url,response:G.response,init:G.init,input:G.input})}))}}))}(k,B,F)}function Zg(){var k=Qg;return Qg+=1,k}function Jg(k){var B=k.lifeCycle,U=k.isChildEvent,F=k.onChange,G=void 0===F?Fb:F,j={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},$=B.subscribe(11,(function(k){if("view"!==k.type&&U(k))switch(k.type){case"error":j.errorCount+=1,G();break;case"action":j.actionCount+=1,k.action.frustration&&(j.frustrationCount+=k.action.frustration.type.length),G();break;case"long_task":j.longTaskCount+=1,G();break;case"resource":j.resourceCount+=1,G()}}));return{stop:function(){$.unsubscribe()},eventCounts:j}}var tm=100;function em(k,B,U,F,G){return function(k,B,U){var F,G=!1,j=Db(Ab((function(){return W({hadActivity:!1})})),100),$=U&&Db(Ab((function(){return W({hadActivity:!0,end:gp()})})),U),H=k.subscribe((function(k){var B=k.isBusy;Rb(j),Rb(F);var U=gp();B||(F=Db(Ab((function(){return W({hadActivity:!0,end:U})})),100))})),V=function(){G=!0,Rb(j),Rb(F),Rb($),H.unsubscribe()};function W(k){G||(V(),B(k))}return{stop:V}}(function(k,B,U){var F=new Cv((function(){var G,j=[],$=0;j.push(B.subscribe(W),k.subscribe(0,(function(k){k.some((function(k){return"resource"===k.entryType&&!im(U,k.name)}))&&W()})),k.subscribe(5,(function(k){im(U,k.url)||(void 0===G&&(G=k.requestIndex),$+=1,W())})),k.subscribe(6,(function(k){im(U,k.url)||void 0===G||k.requestIndex0})}}));return F}(k,B,U),F,G)}function im(k,B){return rp(k.excludedActivityUrls,B)}var sm=Pb;function nm(k,B){var U,F=[],G=0;function j(k){k.stopObservable.subscribe($),F.push(k),Rb(U),U=Db(H,1e3)}function $(){1===G&&F.every((function(k){return k.isStopped()}))&&(G=2,B(F))}function H(){Rb(U),0===G&&(G=1,$())}return j(k),{tryAppend:function(k){return 0===G&&(F.length>0&&(B=F[F.length-1].event,U=k.event,!(B.target===U.target&&($=B,V=U,Math.sqrt(Math.pow($.clientX-V.clientX,2)+Math.pow($.clientY-V.clientY,2))<=100)&&B.timeStamp-U.timeStamp<=sm))?(H(),!1):(j(k),!0));var B,U,$,V},stop:function(){H()}}}var am="data-dd-action-name";function rm(k,B){return om(k,am)||B&&om(k,B)||um(k,B,dm)||um(k,B,lm)||""}function om(k,B){var U;if(function(){void 0===cm&&(cm="closest"in HTMLElement.prototype);return cm}())U=k.closest("[".concat(B,"]"));else for(var F=k;F;){if(F.hasAttribute(B)){U=F;break}F=F.parentElement}if(U)return bm(fm(U.getAttribute(B).trim()))}var hm,cm,dm=[function(k,B){if(function(){void 0===hm&&(hm="labels"in HTMLInputElement.prototype);return hm}()){if("labels"in k&&k.labels&&k.labels.length>0)return pm(k.labels[0],B)}else if(k.id){var U=k.ownerDocument&&Vb(k.ownerDocument.querySelectorAll("label"),(function(B){return B.htmlFor===k.id}));return U&&pm(U,B)}},function(k){if("INPUT"===k.nodeName){var B=k,U=B.getAttribute("type");if("button"===U||"submit"===U||"reset"===U)return B.value}},function(k,B){if("BUTTON"===k.nodeName||"LABEL"===k.nodeName||"button"===k.getAttribute("role"))return pm(k,B)},function(k){return k.getAttribute("aria-label")},function(k,B){var U=k.getAttribute("aria-labelledby");if(U)return U.split(/\s+/).map((function(B){return function(k,B){return k.ownerDocument?k.ownerDocument.getElementById(B):null}(k,B)})).filter((function(k){return Boolean(k)})).map((function(k){return pm(k,B)})).join(" ")},function(k){return k.getAttribute("alt")},function(k){return k.getAttribute("name")},function(k){return k.getAttribute("title")},function(k){return k.getAttribute("placeholder")},function(k,B){if("options"in k&&k.options.length>0)return pm(k.options[0],B)}],lm=[function(k,B){return pm(k,B)}];function um(k,B,U){for(var F=k,G=0;G<=10&&F&&"BODY"!==F.nodeName&&"HTML"!==F.nodeName&&"HEAD"!==F.nodeName;){for(var j=0,$=U;j<$.length;j++){var H=(0,$[j])(F,B);if("string"==typeof H){var V=H.trim();if(V)return bm(fm(V))}}if("FORM"===F.nodeName)break;F=F.parentElement,G+=1}}function fm(k){return k.replace(/\s+/g," ")}function bm(k){return k.length>100?"".concat(tp(k,100)," [...]"):k}function pm(k,B){if(!k.isContentEditable){if("innerText"in k){var U=k.innerText,F=function(B){for(var F=k.querySelectorAll(B),G=0;G0&&(U=U.replace($,""))}}};return Boolean(document.documentMode)&&F("script, style"),F("[".concat(am,"]")),B&&F("[".concat(B,"]")),U}return k.textContent}}var vm,gm=[am,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],mm=[wm,function(k){if(k.id&&!Em(k.id))return"#".concat(op(k.id))}],ym=[wm,function(k){if("BODY"===k.tagName)return;if(k.classList.length>0)for(var B=0;B").concat(B):k}function Im(){var k=window.getSelection();return!k||k.isCollapsed}function Dm(k){return k.target instanceof Element&&!1!==k.isPrimary}function Rm(k,B){if(function(k){if(k.some((function(k){return k.getUserActivity().selection})))return!1;for(var B=0;B0},get hasPageActivity(){return void 0!==j},getUserActivity:U,addFrustration:function(k){K.push(k)},startClocks:H,isStopped:function(){return 1===q||2===q},clone:function(){return Nm(k,B,U,F,G)},validate:function(B){if(Y(),1===q){var U=W.eventCounts,V=U.resourceCount,z=U.errorCount,Q=U.longTaskCount,X=xb({type:"click",duration:j&&Ep(H.timeStamp,j),startClocks:H,id:$,frustrationTypes:K,counts:{resourceCount:V,errorCount:z,longTaskCount:Q},events:null!=B?B:[G],event:G},F);k.notify(1,X),q=2}},discard:function(){Y(),q=2}}}function xm(k,B){var U=Lm(k)?{action:{id:k.id,loading_time:pp(k.duration),frustration:{type:k.frustrationTypes},error:{count:k.counts.errorCount},long_task:{count:k.counts.longTaskCount},resource:{count:k.counts.resourceCount}},_dd:{action:{target:k.target,position:k.position}}}:void 0,F=Lm(k)?void 0:k.context,G=np({action:{id:kb(),target:{name:k.name},type:k.type},date:k.startClocks.timeStamp,type:"action"},U),j=B.isInForegroundAt(k.startClocks.relative);return void 0!==j&&(G.view={in_foreground:j}),{customerContext:F,rawRumEvent:G,startTime:k.startClocks.relative,domainContext:Lm(k)?{event:k.event,events:k.events}:{}}}function Lm(k){return"custom"!==k.type}var km=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function Bm(k){var B=function(k){return Fg(window,"onerror",{before:function(B,U,F,G,j){var $;if(j)$=kp(j),k($,j);else{var H,V={url:U,column:G,line:F},W=B;if("[object String]"==={}.toString.call(B)){var q=km.exec(W);q&&(H=q[1],W=q[2])}k($={name:H,message:"string"==typeof W?W:void 0,stack:[V]},B)}}})}(k).stop,U=function(k){return Fg(window,"onunhandledrejection",{before:function(B){var U=B.reason||"Empty reason",F=kp(U);k(F,U)}})}(k).stop;return{stop:function(){B(),U()}}}var Um={};function Fm(k){var B=k.map((function(k){return Um[k]||(Um[k]=function(k){var B=new Cv((function(){var U=console[k];return console[k]=function(){for(var F=[],G=0;G=F-j&&Ym(U)<=wp(G,j);var U,F,G,j}));return 1===U.length?U[0]:void 0}}}function Ym(k){return wp(k.startTime,k.duration)}function Qm(k,B,U,F){k.subscribe(6,(function(G){k.notify(10,function(k,B,U,F){var G,j="xhr"===k.type?"xhr":"fetch",$=zm(k),H=$?fp($.startTime):k.startClocks,V=$?Zm($):void 0,W=function(k,B){if(!(k.traceSampled&&k.traceId&&k.spanId))return;return{_dd:{span_id:k.spanId.toDecimalString(),trace_id:k.traceId.toDecimalString(),rule_psr:Jm(B)}}}(k,B),q=ty(U,H),K=pp(k.duration),z=function(k,B){if(!Np("resource_durations"))return;return{_dd:{computed_duration:k,performance_entry_duration:B,override_duration_diff:B?k-B:void 0}}}(K,null==V?void 0:V.resource.duration),Y=ey(F,H,null!==(G=null==$?void 0:$.duration)&&void 0!==G?G:k.duration),Q=np({date:H.timeStamp,resource:{id:kb(),type:j,duration:K,method:k.method,status_code:k.status,url:k.url},type:"resource"},W,V,q,z,Y);return{startTime:H.relative,rawRumEvent:Q,domainContext:{performanceEntry:$&&$,xhr:k.xhr,response:k.response,requestInput:k.input,requestInit:k.init,error:k.error}}}(G,B,U,F))})),k.subscribe(0,(function(G){for(var j=0,$=G;j<$.length;j++){var H=$[j];"resource"===H.entryType&&("xmlhttprequest"!==(V=H).initiatorType&&"fetch"!==V.initiatorType)&&k.notify(10,Xm(H,B,U,F))}var V}))}function Xm(k,B,U,F){var G=qv(k),j=Zm(k),$=fp(k.startTime),H=function(k,B){if(!k.traceId)return;return{_dd:{trace_id:k.traceId,rule_psr:Jm(B)}}}(k,B),V=ty(U,$),W=ey(F,$,k.duration),q=np({date:$.timeStamp,resource:{id:kb(),type:G,url:k.name},type:"resource"},H,j,V,W);return{startTime:$.relative,rawRumEvent:q,domainContext:{performanceEntry:k}}}function Zm(k){return{resource:xb({duration:(B=k,U=B.duration,F=B.startTime,G=B.responseEnd,pp(0===U&&F=0&&G.responseStart<=mp()?G.responseStart:void 0})}})).unsubscribe}}(k,F).stop,j=function(k,B){var U=iy();return{stop:k.subscribe(0,(function(k){var F=Vb(k,(function(k){return"paint"===k.entryType&&"first-contentful-paint"===k.name&&k.startTime=0;U-=1){var F=k[U];if(B(F,U,k))return F}}(k,(function(k){return"largest-contentful-paint"===k.entryType&&k.startTime=0?G:0,firstInputTime:F.startTime})}})).unsubscribe}}(k,(function(k){F({firstInputDelay:k.firstInputDelay,firstInputTime:k.firstInputTime})})).stop;return{stop:function(){G(),j(),$(),H()}}}function ay(k,B,U,F,G,j){var $,H={},V=function(k,B,U,F,G,j){var $="initial_load"===F,H=!0,V=[];function W(){!H&&!$&&V.length>0&&j(Math.max.apply(Math,V))}return{stop:em(k,B,U,(function(k){H&&(H=!1,k.hadActivity&&V.push(Ep(G.timeStamp,k.end)),W())})).stop,setLoadEvent:function(k){$&&($=!1,V.push(k),W())}}}(k,B,U,G,j,(function(k){H.loadingTime=k,F()})),W=V.stop,q=V.setLoadEvent;return lg("layout-shift")?(H.cumulativeLayoutShift=0,$=function(k,B){var U=0,F=function(){var k,B,U=0;return{update:function(F){void 0===k||F.startTime-B>=Pb||F.startTime-k>=5e3?(k=B=F.startTime,U=F.value):(U+=F.value,B=F.startTime)},value:function(){return U}}}();return{stop:k.subscribe(0,(function(k){for(var G=0,j=k;GU&&(U=F.value(),B(Ub(U,4))))}})).unsubscribe}}(k,(function(k){H.cumulativeLayoutShift=k,F()})).stop):$=Fb,{stop:function(){W(),$()},setLoadEvent:q,viewMetrics:H}}function ry(k,B,U,F,G,j,$){var H,V=function(G){var j=oy(B,U,F,k,"initial_load",_p(),G),$=ny(B,(function(k){j.updateTimings(k),j.scheduleUpdate()})).stop;return{initialView:j,stop:$}}($),W=V.stop,q=V.initialView,K=function(){B.subscribe(8,(function(){q.end(),q=z(void 0,{name:q.name,service:q.service,version:q.version})})),B.subscribe(9,(function(k){k.reason!==Rv.UNLOADING&&k.reason!==Rv.PAGEHIDE||(q.end(),q.triggerUpdate())}));var k=window.setInterval(Ab((function(){q.triggerUpdate()})),3e5);return{stop:function(){clearInterval(k)}}}().stop;function z(G,j){return oy(B,U,F,k,"route_change",G,j)}return j&&(H=function(k){return k.subscribe((function(k){var B,U,F,G,j=k.oldLocation,$=k.newLocation;if(U=$,(B=j).pathname!==U.pathname||(F=U.hash,G=F.substr(1),!document.getElementById(G)&&hy(U.hash)!==hy(B.hash)))return q.end(),q.triggerUpdate(),void(q=z())}))}(G)),{addTiming:function(k,B){void 0===B&&(B=gp()),q.addTiming(k,B),q.scheduleUpdate()},startView:function(k,B){q.end(B),q.triggerUpdate(),q=z(B,k)},stop:function(){null==H||H.unsubscribe(),W(),K(),q.end()}}}function oy(k,B,U,F,G,j,$){void 0===j&&(j=yp());var H,V,W,q,K=kb(),z={},Y={},Q=0,X=Lb(F);$&&(V=$.name,W=$.service,q=$.version),k.notify(2,{id:K,name:V,startClocks:j,service:W,version:q});var Z=Nb(ht,3e3,{leading:!1}),J=Z.throttled,tt=Z.cancel,et=ay(k,B,U,J,G,j),it=et.setLoadEvent,st=et.stop,nt=et.viewMetrics,at=function(k,B,U){var F=Jg({lifeCycle:k,isChildEvent:function(k){return k.view.id===B},onChange:U}),G=F.stop;return{scheduleStop:function(){Db(G,3e5)},eventCounts:F.eventCounts}}(k,K,J),rt=at.scheduleStop,ot=at.eventCounts;function ht(){Q+=1;var B=void 0===H?gp():H.timeStamp;k.notify(3,xb({customTimings:Y,documentVersion:Q,id:K,name:V,service:W,version:q,loadingType:G,location:X,startClocks:j,timings:z,duration:Ep(j.timeStamp,B),isActive:void 0===H,eventCounts:ot},nt))}return ht(),{name:V,service:W,version:q,scheduleUpdate:J,end:function(B){void 0===B&&(B=yp()),H=B,k.notify(4,{endClocks:H}),st(),rt()},triggerUpdate:function(){tt(),ht()},updateTimings:function(k){z=k,void 0!==k.loadEvent&&it(k.loadEvent)},addTiming:function(k,B){var U=function(k){return k<31536e6}(B)?B:Ep(j.timeStamp,B);Y[function(k){var B=k.replace(/[^a-zA-Z0-9-_.@$]/g,"_");B!==k&&yb.warn("Invalid timing name: ".concat(k,", sanitized to: ").concat(B));return B}(k)]=U}}}function hy(k){var B=k.indexOf("?");return B<0?k:k.slice(0,B)}function cy(k,B,U,F,G,j,$,H,V){return k.subscribe(3,(function(B){return k.notify(10,function(k,B,U,F){var G=F.getReplayStats(k.id),j=U.findFeatureFlagEvaluations(k.startClocks.relative),$={_dd:{document_version:k.documentVersion,replay_stats:G},date:k.startClocks.timeStamp,type:"view",view:{action:{count:k.eventCounts.actionCount},frustration:{count:k.eventCounts.frustrationCount},cumulative_layout_shift:k.cumulativeLayoutShift,first_byte:pp(k.timings.firstByte),dom_complete:pp(k.timings.domComplete),dom_content_loaded:pp(k.timings.domContentLoaded),dom_interactive:pp(k.timings.domInteractive),error:{count:k.eventCounts.errorCount},first_contentful_paint:pp(k.timings.firstContentfulPaint),first_input_delay:pp(k.timings.firstInputDelay),first_input_time:pp(k.timings.firstInputTime),is_active:k.isActive,name:k.name,largest_contentful_paint:pp(k.timings.largestContentfulPaint),load_event:pp(k.timings.loadEvent),loading_time:dy(pp(k.loadingTime)),loading_type:k.loadingType,long_task:{count:k.eventCounts.longTaskCount},resource:{count:k.eventCounts.resourceCount},time_spent:pp(k.duration),in_foreground_periods:B.selectInForegroundPeriodsFor(k.startClocks.relative,k.duration)},feature_flags:j&&!Yb(j)?j:void 0,session:{has_replay:!!G||void 0}};Yb(k.customTimings)||($.view.custom_timings=function(k,B){for(var U={},F=0,G=Object.keys(k);F=100)yy();else{var F,G=wy();if(gy()){if(G.lock)return void my(k,B);if(F=kb(),G.lock=F,Ey(G,k.options),(G=wy()).lock!==F)return void my(k,B)}var j=k.process(G);if(gy()&&(G=wy()).lock!==F)my(k,B);else{if(j&&_y(j,k.options),gy()&&(!j||!Ty(j))){if((G=wy()).lock!==F)return void my(k,B);delete G.lock,Ey(G,k.options),j=G}null===(U=k.after)||void 0===U||U.call(k,j||G),yy()}}else py.push(k)}function gy(){return!!window.chrome||/HeadlessChrome/.test(window.navigator.userAgent)}function my(k,B){Db((function(){vy(k,B+1)}),10)}function yy(){ly=void 0;var k=py.shift();k&&vy(k)}function _y(k,B){Ty(k)?function(k){Cp(by,"",0,k)}(B):(k.expire=String(vp()+Lg),Ey(k,B))}function Ey(k,B){Cp(by,function(k){return zb(k).map((function(k){var B=k[0],U=k[1];return"".concat(B,"=").concat(U)})).join(fy)}(k),Lg,B)}function wy(){var k=Op(by),B={};return function(k){return void 0!==k&&(-1!==k.indexOf(fy)||uy.test(k))}(k)&&k.split(fy).forEach((function(k){var U=uy.exec(k);if(null!==U){var F=U[1],G=U[2];B[F]=G}})),B}function Ty(k){return Yb(k)}function Sy(k,B,U){var F=new Cv,G=new Cv,j=setInterval(Ab((function(){vy({options:k,process:function(k){return W(k)?void 0:{}},after:H})})),1e3),$=function(){var k=wy();if(W(k))return k;return{}}();function H(k){return W(k)||(k={}),V()&&(!function(k){return $.id!==k.id||$[B]!==k[B]}(k)?$=k:($={},G.notify())),k}function V(){return void 0!==$[B]}function W(k){return(void 0===k.created||vp()-Number(k.created)=this.messageBytesLimit?yb.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit,"KB.")):(this.hasMessageFor(B)&&this.remove(B),this.willReachedBytesLimitWith(G)&&this.flush("batch_bytes_limit"),this.push(F,G,B),this.isFull()&&this.flush("batch_bytes_limit"))},k.prototype.process=function(k){var B=Gb(k);return{processedMessage:B,messageBytesCount:cp(B)}},k.prototype.push=function(k,B,U){this.bufferMessagesCount>0&&(this.bufferBytesCount+=1),void 0!==U?this.upsertBuffer[U]=k:this.pushOnlyBuffer.push(k),this.bufferBytesCount+=B,this.bufferMessagesCount+=1},k.prototype.remove=function(k){var B=this.upsertBuffer[k];delete this.upsertBuffer[k];var U=cp(B);this.bufferBytesCount-=U,this.bufferMessagesCount-=1,this.bufferMessagesCount>0&&(this.bufferBytesCount-=1)},k.prototype.hasMessageFor=function(k){return void 0!==k&&void 0!==this.upsertBuffer[k]},k.prototype.willReachedBytesLimitWith=function(k){return this.bufferBytesCount+k+1>=this.batchBytesLimit},k.prototype.isFull=function(){return this.bufferMessagesCount===this.batchMessagesLimit||this.bufferBytesCount>=this.batchBytesLimit},k.prototype.flushPeriodically=function(){var k=this;Db((function(){k.flush("batch_duration_limit"),k.flushPeriodically()}),this.flushTimeout)},k}(),Ry=3145728;function Py(k,B,U,F,G){0===B.transportStatus&&0===B.queuedPayloads.size()&&B.bandwidthMonitor.canHandle(k)?Ny(k,B,U,{onSuccess:function(){return xy(0,B,U,F,G)},onFailure:function(){B.queuedPayloads.enqueue(k),My(B,U,F,G)}}):B.queuedPayloads.enqueue(k)}function My(k,B,U,F){2===k.transportStatus&&Db((function(){Ny(k.queuedPayloads.first(),k,B,{onSuccess:function(){k.queuedPayloads.dequeue(),k.currentBackoffTime=1e3,xy(1,k,B,U,F)},onFailure:function(){k.currentBackoffTime=Math.min(6e4,2*k.currentBackoffTime),My(k,B,U,F)}})}),k.currentBackoffTime)}function Ny(k,B,U,F){var G=F.onSuccess,j=F.onFailure;B.bandwidthMonitor.add(k),U(k,(function(U){B.bandwidthMonitor.remove(k),!function(k){return"opaque"!==k.type&&(0===k.status&&!navigator.onLine||408===k.status||429===k.status||k.status>=500)}(U)?(B.transportStatus=0,G()):(B.transportStatus=B.bandwidthMonitor.ongoingRequestCount>0?1:2,k.retry={count:k.retry?k.retry.count+1:1,lastFailureStatus:U.status},j())}))}function xy(k,B,U,F,G){0===k&&B.queuedPayloads.isFull()&&!B.queueFullReported&&(G({message:"Reached max ".concat(F," events size queued for upload: ").concat(3,"MiB"),source:Kp,startClocks:yp()}),B.queueFullReported=!0);var j=B.queuedPayloads;for(B.queuedPayloads=Ly();j.size()>0;)Py(j.dequeue(),B,U,F,G)}function Ly(){var k=[];return{bytesCount:0,enqueue:function(B){this.isFull()||(k.push(B),this.bytesCount+=B.bytesCount)},first:function(){return k[0]},dequeue:function(){var B=k.shift();return B&&(this.bytesCount-=B.bytesCount),B},size:function(){return k.length},isFull:function(){return this.bytesCount>=Ry}}}function ky(k,B,U){var F={transportStatus:0,currentBackoffTime:1e3,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(k){return 0===this.ongoingRequestCount||this.ongoingByteCount+k.bytesCount<=81920&&this.ongoingRequestCount<32},add:function(k){this.ongoingRequestCount+=1,this.ongoingByteCount+=k.bytesCount},remove:function(k){this.ongoingRequestCount-=1,this.ongoingByteCount-=k.bytesCount}},queuedPayloads:Ly(),queueFullReported:!1},G=function(U,F){return function(k,B,U,F){var G=U.data,j=U.bytesCount,$=U.flushReason,H=U.retry;if(function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(U){return!1}}()&&j0?Array.from(k.media):void 0}}))}function Z_(k,B,U){return J_(k,{serializationContext:U,parentNodePrivacyLevel:B.defaultPrivacyLevel,configuration:B})}function J_(k,B){var U=function(k,B){switch(k.nodeType){case k.DOCUMENT_NODE:return function(k,B){return{type:r_,childNodes:tE(k,B),adoptedStyleSheets:X_(k.adoptedStyleSheets)}}(k,B);case k.DOCUMENT_FRAGMENT_NODE:return function(k,B){var U=[];k.childNodes.length&&(U=tE(k,B));var F=sg(k);F&&B.serializationContext.shadowRootsController.addShadowRoot(k);return{type:l_,childNodes:U,isShadowRoot:F,adoptedStyleSheets:F?X_(k.adoptedStyleSheets):void 0}}(k,B);case k.DOCUMENT_TYPE_NODE:return{type:o_,name:(U=k).name,publicId:U.publicId,systemId:U.systemId};case k.ELEMENT_NODE:return function(k,B){var U,F=nE(k.tagName),G=($=k,"svg"===$.tagName||$ instanceof SVGElement||void 0),j=U_(F_(k),B.parentNodePrivacyLevel);var $;if(j===M_.HIDDEN){var H=k.getBoundingClientRect(),V=H.width,W=H.height;return{type:h_,tagName:F,attributes:(U={rr_width:"".concat(V,"px"),rr_height:"".concat(W,"px")},U[N_]=x_,U),childNodes:[],isSVG:G}}if(j===M_.IGNORE)return;var q=function(k,B,U){var F;if(B===M_.HIDDEN)return{};for(var G={},j=nE(k.tagName),$=k.ownerDocument,H=0;H1e5&&"data:"===G.slice(0,5)?"data:truncated":G}var iE=1;var sE=/[^a-z1-6-_]/;function nE(k){var B=k.toLowerCase().trim();return sE.test(B)?"div":B}function aE(k){if(!k)return null;var B;try{B=k.rules||k.cssRules}catch(me){}return B?Q_(Array.from(B,rE).join(""),k.href):null}function rE(k){return function(k){return"styleSheet"in k}(k)?aE(k.styleSheet)||"":k.cssText}function oE(k){return Boolean(k.changedTouches)}function hE(k,B){return{data:xb({source:k},B),type:t_,timestamp:gp()}}function cE(k){for(var B=[],U=k;U.parentRule;){var F=Array.from(U.parentRule.cssRules).indexOf(U);B.unshift(F),U=U.parentRule}if(U.parentStyleSheet){var G=Array.from(U.parentStyleSheet.cssRules).indexOf(U);return B.unshift(G),B}}var dE=function(k,B){var U=window.visualViewport,F={layoutViewportX:k,layoutViewportY:B,visualViewportX:k,visualViewportY:B};return U?(!function(){var k=window.visualViewport;return Math.abs(k.pageTop-k.offsetTop-window.scrollY)>25||Math.abs(k.pageLeft-k.offsetLeft-window.scrollX)>25}()?(F.visualViewportX=Math.round(k-U.offsetLeft),F.visualViewportY=Math.round(B-U.offsetTop)):(F.layoutViewportX=Math.round(k+U.offsetLeft),F.layoutViewportY=Math.round(B+U.offsetTop)),F):F},lE=function(){var k=window.visualViewport;return{scale:k.scale,offsetLeft:k.offsetLeft,offsetTop:k.offsetTop,pageLeft:k.pageLeft,pageTop:k.pageTop,height:k.height,width:k.width}};function uE(){var k,B=window.visualViewport;return k=B?B.pageLeft-B.offsetLeft:void 0!==window.scrollX?window.scrollX:window.pageXOffset||0,Math.round(k)}function fE(){var k,B=window.visualViewport;return k=B?B.pageTop-B.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0,Math.round(k)}function bE(k){return!0===k.composed&&ig(k.target)?k.composedPath()[0]:k.target}var pE=new WeakMap,vE=1;function gE(k){return pE.has(k)||pE.set(k,vE++),pE.get(k)}function mE(k){var B=oE(k)?k.changedTouches[0]:k,U=B.clientX,F=B.clientY;if(window.visualViewport){var G=dE(U,F);U=G.visualViewportX,F=G.visualViewportY}if(Number.isFinite(U)&&Number.isFinite(F))return{x:U,y:F};k.isTrusted&&Uv("mouse/touch event without x/y")}var yE;var _E=((yE={}).pointerup=E_,yE.mousedown=w_,yE.click=T_,yE.contextmenu=S_,yE.dblclick=A_,yE.focus=C_,yE.blur=O_,yE.touchstart=I_,yE.touchend=D_,yE);function EE(k,B,U){var F=void 0===U?{}:U,G=F.domEvents,j=void 0===G?["input","change"]:G,$=F.target,H=void 0===$?document:$,V=new WeakMap;function W(k){var U=B_(k,B);if(U!==M_.HIDDEN){var F,G=k.type;if("radio"===G||"checkbox"===G){if(G_(k,U))return;F={isChecked:k.checked}}else{var j=q_(k,U);if(void 0===j)return;F={text:j}}q(k,F);var $,H,V=k.name;"radio"===G&&V&&k.checked&&($=document.querySelectorAll('input[type="radio"][name="'.concat(V,'"]')),H=function(B){B!==k&&q(B,{isChecked:!1})},Array.prototype.forEach.call($,H))}}function q(B,U){if(V_(B)){var F=V.get(B);F&&F.text===U.text&&F.isChecked===U.isChecked||(V.set(B,U),k(xb({id:W_(B)},U)))}}var K=Dv(H,j,(function(k){var B=bE(k);(B instanceof HTMLInputElement||B instanceof HTMLTextAreaElement||B instanceof HTMLSelectElement)&&W(B)}),{capture:!0,passive:!0}).stop,z=[Gg(HTMLInputElement.prototype,"value",W),Gg(HTMLInputElement.prototype,"checked",W),Gg(HTMLSelectElement.prototype,"value",W),Gg(HTMLTextAreaElement.prototype,"value",W),Gg(HTMLSelectElement.prototype,"selectedIndex",W)];return function(){z.forEach((function(k){return k.stop()})),K()}}function wE(k){var B=Fb,U=[];function F(){B(),k(U),U=[]}return{addMutations:function(k){0===U.length&&(B=function(k,B){if(window.requestIdleCallback&&window.cancelIdleCallback){var U=window.requestIdleCallback(Ab(k),B);return function(){return window.cancelIdleCallback(U)}}var F=window.requestAnimationFrame(Ab(k));return function(){return window.cancelAnimationFrame(F)}}(F,{timeout:100})),U.push.apply(U,k)},flush:F,stop:function(){B()}}}function TE(k,B,U,F){var G=$v();if(!G)return{stop:Fb,flush:Fb};var j=wE((function(G){!function(k,B,U,F,G){k.filter((function(k){return"childList"===k.type})).forEach((function(k){k.removedNodes.forEach((function(k){SE(k,F.removeShadowRoot)}))}));var j=k.filter((function(k){return G.contains(k.target)&&function(k){for(var B=k;B;){if(!V_(B)&&!sg(B))return!1;B=ng(B)}return!0}(k.target)&&B_(k.target,U.defaultPrivacyLevel)!==M_.HIDDEN})),$=function(k,B,U){for(var F=new Set,G=new Map,j=function(k){k.addedNodes.forEach((function(k){F.add(k)})),k.removedNodes.forEach((function(B){F.has(B)||G.set(B,k.target),F.delete(B)}))},$=0,H=k;$10&&function(){if(!DE)return;if(DE.keys)DE.delete(DE.keys().next().value);else{var k=!0;DE.forEach((function(B,U){k&&(DE.delete(U),k=!1)}))}}()),B}var xE,LE=0,kE=function(){function k(k,B,U,F,G,j){var $=this;this.worker=k,this.id=LE++;var H=B.view.id;this.metadata=xb({start:F.timestamp,end:F.timestamp,creation_reason:U,records_count:1,has_full_snapshot:F.type===Jy,index_in_view:RE(H),source:"browser"},B),function(k){NE(k).segments_count+=1}(H),PE(H);var V=Ab((function(B){var U=B.data;"errored"!==U.type&&"initialized"!==U.type&&(U.id===$.id?(!function(k,B){NE(k).segments_total_raw_size+=B}(H,U.additionalBytesCount),"flushed"===U.type?(j(U.result,U.rawBytesCount),k.removeEventListener("message",V)):G(U.compressedBytesCount)):U.id>$.id&&(k.removeEventListener("message",V),Uv("Segment did not receive a 'flush' response before being replaced.")))}));k.addEventListener("message",V),Av("record",{record:F,segment:this.metadata}),this.worker.postMessage({data:'{"records":['.concat(JSON.stringify(F)),id:this.id,action:"write"})}return k.prototype.addRecord=function(k){var B;this.metadata.start=Math.min(this.metadata.start,k.timestamp),this.metadata.end=Math.max(this.metadata.end,k.timestamp),this.metadata.records_count+=1,PE(this.metadata.view.id),(B=this.metadata).has_full_snapshot||(B.has_full_snapshot=k.type===Jy),Av("record",{record:k,segment:this.metadata}),this.worker.postMessage({data:",".concat(JSON.stringify(k)),id:this.id,action:"write"})},k.prototype.flush=function(k){this.worker.postMessage({data:"],".concat(JSON.stringify(this.metadata).slice(1),"\n"),id:this.id,action:"flush"}),this.flushReason=k},k}(),BE=6e4;function UE(k,B,U,F,G,j){return function(k,B,U,F){var G={status:0,nextSegmentCreationReason:"init"},j=k.subscribe(2,(function(){H("view_change")})).unsubscribe,$=k.subscribe(9,(function(k){H(k.reason)})).unsubscribe;function H(k){1===G.status&&(G.segment.flush(k),Rb(G.expirationTimeoutId)),G="stop"!==k?{status:0,nextSegmentCreationReason:k}:{status:2}}function V(k,j){var $=B();if($){var V=new kE(F,$,k,j,(function(k){!V.flushReason&&k>BE&&H("segment_bytes_limit")}),(function(k,B){var F,G=OE(k,V.metadata,B);F=V.flushReason,$b(Kb(Rv),F)?U.sendOnExit(G):U.send(G)}));G={status:1,segment:V,expirationTimeoutId:Db((function(){H("segment_duration_limit")}),3e4)}}}return{addRecord:function(k){switch(G.status){case 0:V(G.nextSegmentCreationReason,k);break;case 1:G.segment.addRecord(k)}},stop:function(){H("stop"),j(),$()}}}(k,(function(){return function(k,B,U){var F=B.findTrackedSession(),G=U.findView();if(!F||!G)return;return{application:{id:k},session:{id:F.id},view:{id:G.id}}}(B,U,F)}),G,j)}function FE(){return xE||(xE=URL.createObjectURL(new Blob(["(".concat(GE,")(self)")]))),new Worker(xE)}function GE(){function k(k){return function(){try{return k.apply(this,arguments)}catch(e){try{self.postMessage({type:"errored",error:e})}catch(B){self.postMessage({type:"errored",error:"".concat(e)})}}}}k((function(){var B=function(){var k=4,B=0,U=1,F=2;function G(k){for(var B=k.length;--B>=0;)k[B]=0}var j=0,$=1,H=2,V=3,W=258,q=29,K=256,z=K+1+q,Y=30,Q=19,X=2*z+1,Z=15,J=16,tt=7,et=256,it=16,st=17,nt=18,at=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),rt=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),ot=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),ht=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ct=512,dt=new Array(2*(z+2));G(dt);var lt=new Array(2*Y);G(lt);var ut=new Array(ct);G(ut);var ft=new Array(W-V+1);G(ft);var bt=new Array(q);G(bt);var pt,vt,gt,mt=new Array(Y);function yt(k,B,U,F,G){this.static_tree=k,this.extra_bits=B,this.extra_base=U,this.elems=F,this.max_length=G,this.has_stree=k&&k.length}function _t(k,B){this.dyn_tree=k,this.max_code=0,this.stat_desc=B}G(mt);var Et=function(k){return k<256?ut[k]:ut[256+(k>>>7)]},wt=function(k,B){k.pending_buf[k.pending++]=255&B,k.pending_buf[k.pending++]=B>>>8&255},Tt=function(k,B,U){k.bi_valid>J-U?(k.bi_buf|=B<>J-k.bi_valid,k.bi_valid+=U-J):(k.bi_buf|=B<>>=1,U<<=1}while(--B>0);return U>>>1},Ct=function(k){16===k.bi_valid?(wt(k,k.bi_buf),k.bi_buf=0,k.bi_valid=0):k.bi_valid>=8&&(k.pending_buf[k.pending++]=255&k.bi_buf,k.bi_buf>>=8,k.bi_valid-=8)},Ot=function(k,B){var U,F,G,j,$,H,V=B.dyn_tree,W=B.max_code,q=B.stat_desc.static_tree,K=B.stat_desc.has_stree,z=B.stat_desc.extra_bits,Y=B.stat_desc.extra_base,Q=B.stat_desc.max_length,J=0;for(j=0;j<=Z;j++)k.bl_count[j]=0;for(V[2*k.heap[k.heap_max]+1]=0,U=k.heap_max+1;UQ&&(j=Q,J++),V[2*F+1]=j,F>W||(k.bl_count[j]++,$=0,F>=Y&&($=z[F-Y]),H=V[2*F],k.opt_len+=H*(j+$),K&&(k.static_len+=H*(q[2*F+1]+$)));if(0!==J){do{for(j=Q-1;0===k.bl_count[j];)j--;k.bl_count[j]--,k.bl_count[j+1]+=2,k.bl_count[Q]--,J-=2}while(J>0);for(j=Q;0!==j;j--)for(F=k.bl_count[j];0!==F;)(G=k.heap[--U])>W||(V[2*G+1]!==j&&(k.opt_len+=(j-V[2*G+1])*V[2*G],V[2*G+1]=j),F--)}},It=function(k,B,U){var F,G,j=new Array(Z+1),$=0;for(F=1;F<=Z;F++)j[F]=$=$+U[F-1]<<1;for(G=0;G<=B;G++){var H=k[2*G+1];0!==H&&(k[2*G]=At(j[H]++,H))}},Dt=function(){var k,B,U,F,G,j=new Array(Z+1);for(U=0,F=0;F>=7;F8?wt(k,k.bi_buf):k.bi_valid>0&&(k.pending_buf[k.pending++]=k.bi_buf),k.bi_buf=0,k.bi_valid=0},Mt=function(k,B,U,F){Pt(k),F&&(wt(k,U),wt(k,~U)),k.pending_buf.set(k.window.subarray(B,B+U),k.pending),k.pending+=U},Nt=function(k,B,U,F){var G=2*B,j=2*U;return k[G]>1;U>=1;U--)xt(k,j,U);G=V;do{U=k.heap[1],k.heap[1]=k.heap[k.heap_len--],xt(k,j,1),F=k.heap[1],k.heap[--k.heap_max]=U,k.heap[--k.heap_max]=F,j[2*G]=j[2*U]+j[2*F],k.depth[G]=(k.depth[U]>=k.depth[F]?k.depth[U]:k.depth[F])+1,j[2*U+1]=j[2*F+1]=G,k.heap[1]=G++,xt(k,j,1)}while(k.heap_len>=2);k.heap[--k.heap_max]=k.heap[1],Ot(k,B),It(j,W,k.bl_count)},Bt=function(k,B,U){var F,G,j=-1,$=B[1],H=0,V=7,W=4;for(0===$&&(V=138,W=3),B[2*(U+1)+1]=65535,F=0;F<=U;F++)G=$,$=B[2*(F+1)+1],++H=3&&0===k.bl_tree[2*ht[B]+1];B--);return k.opt_len+=3*(B+1)+5+5+4,B},Gt=function(k,B,U,F){var G;for(Tt(k,B-257,5),Tt(k,U-1,5),Tt(k,F-4,4),G=0;G>>=1)if(1&G&&0!==k.dyn_ltree[2*F])return B;if(0!==k.dyn_ltree[18]||0!==k.dyn_ltree[20]||0!==k.dyn_ltree[26])return U;for(F=32;F0?(B.strm.data_type===F&&(B.strm.data_type=jt(B)),kt(B,B.l_desc),kt(B,B.d_desc),q=Ft(B),V=B.opt_len+3+7>>>3,(W=B.static_len+3+7>>>3)<=V&&(V=W)):V=W=G+5,G+4<=V&&-1!==U?Ht(B,U,G,j):B.strategy===k||W===V?(Tt(B,($<<1)+(j?1:0),3),Lt(B,dt,lt)):(Tt(B,(H<<1)+(j?1:0),3),Gt(B,B.l_desc.max_code+1,B.d_desc.max_code+1,q+1),Lt(B,B.dyn_ltree,B.dyn_dtree)),Rt(B),j&&Pt(B)},Wt={_tr_init:function(k){$t||(Dt(),$t=!0),k.l_desc=new _t(k.dyn_ltree,pt),k.d_desc=new _t(k.dyn_dtree,vt),k.bl_desc=new _t(k.bl_tree,gt),k.bi_buf=0,k.bi_valid=0,Rt(k)},_tr_stored_block:Ht,_tr_flush_block:Vt,_tr_tally:function(k,B,U){return k.pending_buf[k.d_buf+2*k.last_lit]=B>>>8&255,k.pending_buf[k.d_buf+2*k.last_lit+1]=255&B,k.pending_buf[k.l_buf+k.last_lit]=255&U,k.last_lit++,0===B?k.dyn_ltree[2*U]++:(k.matches++,B--,k.dyn_ltree[2*(ft[U]+K+1)]++,k.dyn_dtree[2*Et(B)]++),k.last_lit===k.lit_bufsize-1},_tr_align:function(k){Tt(k,$<<1,3),St(k,et,dt),Ct(k)}},qt=function(k,B,U,F){for(var G=65535&k|0,j=k>>>16&65535|0,$=0;0!==U;){U-=$=U>2e3?2e3:U;do{j=j+(G=G+B[F++]|0)|0}while(--$);G%=65521,j%=65521}return G|j<<16|0},Kt=new Uint32Array(function(){for(var k,B=[],U=0;U<256;U++){k=U;for(var F=0;F<8;F++)k=1&k?3988292384^k>>>1:k>>>1;B[U]=k}return B}()),zt=function(k,B,U,F){var G=Kt,j=F+U;k^=-1;for(var $=F;$>>8^G[255&(k^B[$])];return-1^k},Yt={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Qt={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},Xt=Wt._tr_init,Zt=Wt._tr_stored_block,Jt=Wt._tr_flush_block,te=Wt._tr_tally,ee=Wt._tr_align,ie=Qt.Z_NO_FLUSH,se=Qt.Z_PARTIAL_FLUSH,ne=Qt.Z_FULL_FLUSH,ae=Qt.Z_FINISH,re=Qt.Z_BLOCK,oe=Qt.Z_OK,he=Qt.Z_STREAM_END,ce=Qt.Z_STREAM_ERROR,de=Qt.Z_DATA_ERROR,le=Qt.Z_BUF_ERROR,ue=Qt.Z_DEFAULT_COMPRESSION,fe=Qt.Z_FILTERED,be=Qt.Z_HUFFMAN_ONLY,pe=Qt.Z_RLE,ve=Qt.Z_FIXED,ge=Qt.Z_DEFAULT_STRATEGY,me=Qt.Z_UNKNOWN,ye=Qt.Z_DEFLATED,_e=9,Ee=15,we=8,Te=286,Se=30,Ae=19,Ce=2*Te+1,Oe=15,Ie=3,De=258,Re=De+Ie+1,Pe=32,Me=42,Ne=69,xe=73,Le=91,ke=103,Be=113,Ue=666,Fe=1,Ge=2,je=3,$e=4,He=3,Ve=function(k,B){return k.msg=Yt[B],B},We=function(k){return(k<<1)-(k>4?9:0)},qe=function(k){for(var B=k.length;--B>=0;)k[B]=0},Ke=function(k,B,U){return(B<k.avail_out&&(U=k.avail_out),0!==U&&(k.output.set(B.pending_buf.subarray(B.pending_out,B.pending_out+U),k.next_out),k.next_out+=U,B.pending_out+=U,k.total_out+=U,k.avail_out-=U,B.pending-=U,0===B.pending&&(B.pending_out=0))},Ye=function(k,B){Jt(k,k.block_start>=0?k.block_start:-1,k.strstart-k.block_start,B),k.block_start=k.strstart,ze(k.strm)},Qe=function(k,B){k.pending_buf[k.pending++]=B},Xe=function(k,B){k.pending_buf[k.pending++]=B>>>8&255,k.pending_buf[k.pending++]=255&B},Ze=function(k,B,U,F){var G=k.avail_in;return G>F&&(G=F),0===G?0:(k.avail_in-=G,B.set(k.input.subarray(k.next_in,k.next_in+G),U),1===k.state.wrap?k.adler=qt(k.adler,B,G,U):2===k.state.wrap&&(k.adler=zt(k.adler,B,G,U)),k.next_in+=G,k.total_in+=G,G)},Je=function(k,B){var U,F,G=k.max_chain_length,j=k.strstart,$=k.prev_length,H=k.nice_match,V=k.strstart>k.w_size-Re?k.strstart-(k.w_size-Re):0,W=k.window,q=k.w_mask,K=k.prev,z=k.strstart+De,Y=W[j+$-1],Q=W[j+$];k.prev_length>=k.good_match&&(G>>=2),H>k.lookahead&&(H=k.lookahead);do{if(W[(U=B)+$]===Q&&W[U+$-1]===Y&&W[U]===W[j]&&W[++U]===W[j+1]){j+=2,U++;do{}while(W[++j]===W[++U]&&W[++j]===W[++U]&&W[++j]===W[++U]&&W[++j]===W[++U]&&W[++j]===W[++U]&&W[++j]===W[++U]&&W[++j]===W[++U]&&W[++j]===W[++U]&&j$){if(k.match_start=B,$=F,F>=H)break;Y=W[j+$-1],Q=W[j+$]}}}while((B=K[B&q])>V&&0!=--G);return $<=k.lookahead?$:k.lookahead},ti=function(k){var B,U,F,G,j,$=k.w_size;do{if(G=k.window_size-k.lookahead-k.strstart,k.strstart>=$+($-Re)){k.window.set(k.window.subarray($,$+$),0),k.match_start-=$,k.strstart-=$,k.block_start-=$,B=U=k.hash_size;do{F=k.head[--B],k.head[B]=F>=$?F-$:0}while(--U);B=U=$;do{F=k.prev[--B],k.prev[B]=F>=$?F-$:0}while(--U);G+=$}if(0===k.strm.avail_in)break;if(U=Ze(k.strm,k.window,k.strstart+k.lookahead,G),k.lookahead+=U,k.lookahead+k.insert>=Ie)for(j=k.strstart-k.insert,k.ins_h=k.window[j],k.ins_h=Ke(k,k.ins_h,k.window[j+1]);k.insert&&(k.ins_h=Ke(k,k.ins_h,k.window[j+Ie-1]),k.prev[j&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=j,j++,k.insert--,!(k.lookahead+k.insert=Ie&&(k.ins_h=Ke(k,k.ins_h,k.window[k.strstart+Ie-1]),U=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),0!==U&&k.strstart-U<=k.w_size-Re&&(k.match_length=Je(k,U)),k.match_length>=Ie)if(F=te(k,k.strstart-k.match_start,k.match_length-Ie),k.lookahead-=k.match_length,k.match_length<=k.max_lazy_match&&k.lookahead>=Ie){k.match_length--;do{k.strstart++,k.ins_h=Ke(k,k.ins_h,k.window[k.strstart+Ie-1]),U=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart}while(0!=--k.match_length);k.strstart++}else k.strstart+=k.match_length,k.match_length=0,k.ins_h=k.window[k.strstart],k.ins_h=Ke(k,k.ins_h,k.window[k.strstart+1]);else F=te(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++;if(F&&(Ye(k,!1),0===k.strm.avail_out))return Fe}return k.insert=k.strstart=Ie&&(k.ins_h=Ke(k,k.ins_h,k.window[k.strstart+Ie-1]),U=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart),k.prev_length=k.match_length,k.prev_match=k.match_start,k.match_length=Ie-1,0!==U&&k.prev_length4096)&&(k.match_length=Ie-1)),k.prev_length>=Ie&&k.match_length<=k.prev_length){G=k.strstart+k.lookahead-Ie,F=te(k,k.strstart-1-k.prev_match,k.prev_length-Ie),k.lookahead-=k.prev_length-1,k.prev_length-=2;do{++k.strstart<=G&&(k.ins_h=Ke(k,k.ins_h,k.window[k.strstart+Ie-1]),U=k.prev[k.strstart&k.w_mask]=k.head[k.ins_h],k.head[k.ins_h]=k.strstart)}while(0!=--k.prev_length);if(k.match_available=0,k.match_length=Ie-1,k.strstart++,F&&(Ye(k,!1),0===k.strm.avail_out))return Fe}else if(k.match_available){if((F=te(k,0,k.window[k.strstart-1]))&&Ye(k,!1),k.strstart++,k.lookahead--,0===k.strm.avail_out)return Fe}else k.match_available=1,k.strstart++,k.lookahead--}return k.match_available&&(F=te(k,0,k.window[k.strstart-1]),k.match_available=0),k.insert=k.strstart=Ie&&k.strstart>0&&(F=$[G=k.strstart-1])===$[++G]&&F===$[++G]&&F===$[++G]){j=k.strstart+De;do{}while(F===$[++G]&&F===$[++G]&&F===$[++G]&&F===$[++G]&&F===$[++G]&&F===$[++G]&&F===$[++G]&&F===$[++G]&&Gk.lookahead&&(k.match_length=k.lookahead)}if(k.match_length>=Ie?(U=te(k,1,k.match_length-Ie),k.lookahead-=k.match_length,k.strstart+=k.match_length,k.match_length=0):(U=te(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++),U&&(Ye(k,!1),0===k.strm.avail_out))return Fe}return k.insert=0,B===ae?(Ye(k,!0),0===k.strm.avail_out?je:$e):k.last_lit&&(Ye(k,!1),0===k.strm.avail_out)?Fe:Ge},ni=function(k,B){for(var U;;){if(0===k.lookahead&&(ti(k),0===k.lookahead)){if(B===ie)return Fe;break}if(k.match_length=0,U=te(k,0,k.window[k.strstart]),k.lookahead--,k.strstart++,U&&(Ye(k,!1),0===k.strm.avail_out))return Fe}return k.insert=0,B===ae?(Ye(k,!0),0===k.strm.avail_out?je:$e):k.last_lit&&(Ye(k,!1),0===k.strm.avail_out)?Fe:Ge};function ai(k,B,U,F,G){this.good_length=k,this.max_lazy=B,this.nice_length=U,this.max_chain=F,this.func=G}var ri=[new ai(0,0,0,0,(function(k,B){var U=65535;for(U>k.pending_buf_size-5&&(U=k.pending_buf_size-5);;){if(k.lookahead<=1){if(ti(k),0===k.lookahead&&B===ie)return Fe;if(0===k.lookahead)break}k.strstart+=k.lookahead,k.lookahead=0;var F=k.block_start+U;if((0===k.strstart||k.strstart>=F)&&(k.lookahead=k.strstart-F,k.strstart=F,Ye(k,!1),0===k.strm.avail_out))return Fe;if(k.strstart-k.block_start>=k.w_size-Re&&(Ye(k,!1),0===k.strm.avail_out))return Fe}return k.insert=0,B===ae?(Ye(k,!0),0===k.strm.avail_out?je:$e):(k.strstart>k.block_start&&(Ye(k,!1),k.strm.avail_out),Fe)})),new ai(4,4,8,4,ei),new ai(4,5,16,8,ei),new ai(4,6,32,32,ei),new ai(4,4,16,16,ii),new ai(8,16,32,32,ii),new ai(8,16,128,128,ii),new ai(8,32,128,256,ii),new ai(32,128,258,1024,ii),new ai(32,258,258,4096,ii)],oi=function(k){k.window_size=2*k.w_size,qe(k.head),k.max_lazy_match=ri[k.level].max_lazy,k.good_match=ri[k.level].good_length,k.nice_match=ri[k.level].nice_length,k.max_chain_length=ri[k.level].max_chain,k.strstart=0,k.block_start=0,k.lookahead=0,k.insert=0,k.match_length=k.prev_length=Ie-1,k.match_available=0,k.ins_h=0};function hi(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ye,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(2*Ce),this.dyn_dtree=new Uint16Array(2*(2*Se+1)),this.bl_tree=new Uint16Array(2*(2*Ae+1)),qe(this.dyn_ltree),qe(this.dyn_dtree),qe(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Oe+1),this.heap=new Uint16Array(2*Te+1),qe(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Te+1),qe(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var ci=function(k){if(!k||!k.state)return Ve(k,ce);k.total_in=k.total_out=0,k.data_type=me;var B=k.state;return B.pending=0,B.pending_out=0,B.wrap<0&&(B.wrap=-B.wrap),B.status=B.wrap?Me:Be,k.adler=2===B.wrap?0:1,B.last_flush=ie,Xt(B),oe},di=function(k){var B=ci(k);return B===oe&&oi(k.state),B},li=function(k,B,U,F,G,j){if(!k)return ce;var $=1;if(B===ue&&(B=6),F<0?($=0,F=-F):F>15&&($=2,F-=16),G<1||G>_e||U!==ye||F<8||F>15||B<0||B>9||j<0||j>ve)return Ve(k,ce);8===F&&(F=9);var H=new hi;return k.state=H,H.strm=k,H.wrap=$,H.gzhead=null,H.w_bits=F,H.w_size=1<re||B<0)return k?Ve(k,ce):ce;var G=k.state;if(!k.output||!k.input&&0!==k.avail_in||G.status===Ue&&B!==ae)return Ve(k,0===k.avail_out?le:ce);G.strm=k;var j=G.last_flush;if(G.last_flush=B,G.status===Me)if(2===G.wrap)k.adler=0,Qe(G,31),Qe(G,139),Qe(G,8),G.gzhead?(Qe(G,(G.gzhead.text?1:0)+(G.gzhead.hcrc?2:0)+(G.gzhead.extra?4:0)+(G.gzhead.name?8:0)+(G.gzhead.comment?16:0)),Qe(G,255&G.gzhead.time),Qe(G,G.gzhead.time>>8&255),Qe(G,G.gzhead.time>>16&255),Qe(G,G.gzhead.time>>24&255),Qe(G,9===G.level?2:G.strategy>=be||G.level<2?4:0),Qe(G,255&G.gzhead.os),G.gzhead.extra&&G.gzhead.extra.length&&(Qe(G,255&G.gzhead.extra.length),Qe(G,G.gzhead.extra.length>>8&255)),G.gzhead.hcrc&&(k.adler=zt(k.adler,G.pending_buf,G.pending,0)),G.gzindex=0,G.status=Ne):(Qe(G,0),Qe(G,0),Qe(G,0),Qe(G,0),Qe(G,0),Qe(G,9===G.level?2:G.strategy>=be||G.level<2?4:0),Qe(G,He),G.status=Be);else{var $=ye+(G.w_bits-8<<4)<<8;$|=(G.strategy>=be||G.level<2?0:G.level<6?1:6===G.level?2:3)<<6,0!==G.strstart&&($|=Pe),$+=31-$%31,G.status=Be,Xe(G,$),0!==G.strstart&&(Xe(G,k.adler>>>16),Xe(G,65535&k.adler)),k.adler=1}if(G.status===Ne)if(G.gzhead.extra){for(U=G.pending;G.gzindex<(65535&G.gzhead.extra.length)&&(G.pending!==G.pending_buf_size||(G.gzhead.hcrc&&G.pending>U&&(k.adler=zt(k.adler,G.pending_buf,G.pending-U,U)),ze(k),U=G.pending,G.pending!==G.pending_buf_size));)Qe(G,255&G.gzhead.extra[G.gzindex]),G.gzindex++;G.gzhead.hcrc&&G.pending>U&&(k.adler=zt(k.adler,G.pending_buf,G.pending-U,U)),G.gzindex===G.gzhead.extra.length&&(G.gzindex=0,G.status=xe)}else G.status=xe;if(G.status===xe)if(G.gzhead.name){U=G.pending;do{if(G.pending===G.pending_buf_size&&(G.gzhead.hcrc&&G.pending>U&&(k.adler=zt(k.adler,G.pending_buf,G.pending-U,U)),ze(k),U=G.pending,G.pending===G.pending_buf_size)){F=1;break}F=G.gzindexU&&(k.adler=zt(k.adler,G.pending_buf,G.pending-U,U)),0===F&&(G.gzindex=0,G.status=Le)}else G.status=Le;if(G.status===Le)if(G.gzhead.comment){U=G.pending;do{if(G.pending===G.pending_buf_size&&(G.gzhead.hcrc&&G.pending>U&&(k.adler=zt(k.adler,G.pending_buf,G.pending-U,U)),ze(k),U=G.pending,G.pending===G.pending_buf_size)){F=1;break}F=G.gzindexU&&(k.adler=zt(k.adler,G.pending_buf,G.pending-U,U)),0===F&&(G.status=ke)}else G.status=ke;if(G.status===ke&&(G.gzhead.hcrc?(G.pending+2>G.pending_buf_size&&ze(k),G.pending+2<=G.pending_buf_size&&(Qe(G,255&k.adler),Qe(G,k.adler>>8&255),k.adler=0,G.status=Be)):G.status=Be),0!==G.pending){if(ze(k),0===k.avail_out)return G.last_flush=-1,oe}else if(0===k.avail_in&&We(B)<=We(j)&&B!==ae)return Ve(k,le);if(G.status===Ue&&0!==k.avail_in)return Ve(k,le);if(0!==k.avail_in||0!==G.lookahead||B!==ie&&G.status!==Ue){var H=G.strategy===be?ni(G,B):G.strategy===pe?si(G,B):ri[G.level].func(G,B);if(H!==je&&H!==$e||(G.status=Ue),H===Fe||H===je)return 0===k.avail_out&&(G.last_flush=-1),oe;if(H===Ge&&(B===se?ee(G):B!==re&&(Zt(G,0,0,!1),B===ne&&(qe(G.head),0===G.lookahead&&(G.strstart=0,G.block_start=0,G.insert=0))),ze(k),0===k.avail_out))return G.last_flush=-1,oe}return B!==ae?oe:G.wrap<=0?he:(2===G.wrap?(Qe(G,255&k.adler),Qe(G,k.adler>>8&255),Qe(G,k.adler>>16&255),Qe(G,k.adler>>24&255),Qe(G,255&k.total_in),Qe(G,k.total_in>>8&255),Qe(G,k.total_in>>16&255),Qe(G,k.total_in>>24&255)):(Xe(G,k.adler>>>16),Xe(G,65535&k.adler)),ze(k),G.wrap>0&&(G.wrap=-G.wrap),0!==G.pending?oe:he)},deflateEnd:function(k){if(!k||!k.state)return ce;var B=k.state.status;return B!==Me&&B!==Ne&&B!==xe&&B!==Le&&B!==ke&&B!==Be&&B!==Ue?Ve(k,ce):(k.state=null,B===Be?Ve(k,de):oe)},deflateSetDictionary:function(k,B){var U=B.length;if(!k||!k.state)return ce;var F=k.state,G=F.wrap;if(2===G||1===G&&F.status!==Me||F.lookahead)return ce;if(1===G&&(k.adler=qt(k.adler,B,U,0)),F.wrap=0,U>=F.w_size){0===G&&(qe(F.head),F.strstart=0,F.block_start=0,F.insert=0);var j=new Uint8Array(F.w_size);j.set(B.subarray(U-F.w_size,U),0),B=j,U=F.w_size}var $=k.avail_in,H=k.next_in,V=k.input;for(k.avail_in=U,k.next_in=0,k.input=B,ti(F);F.lookahead>=Ie;){var W=F.strstart,q=F.lookahead-(Ie-1);do{F.ins_h=Ke(F,F.ins_h,F.window[W+Ie-1]),F.prev[W&F.w_mask]=F.head[F.ins_h],F.head[F.ins_h]=W,W++}while(--q);F.strstart=W,F.lookahead=Ie-1,ti(F)}return F.strstart+=F.lookahead,F.block_start=F.strstart,F.insert=F.lookahead,F.lookahead=0,F.match_length=F.prev_length=Ie-1,F.match_available=0,k.next_in=H,k.input=V,k.avail_in=$,F.wrap=G,oe},deflateInfo:"pako deflate (from Nodeca project)"};function fi(k){for(var B=0,U=0,F=k.length;U=252?6:pi>=248?5:pi>=240?4:pi>=224?3:pi>=192?2:1;function vi(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}bi[254]=bi[254]=1;var gi=vi,mi=Object.prototype.toString,yi=Qt.Z_NO_FLUSH,_i=Qt.Z_SYNC_FLUSH,Ei=Qt.Z_FULL_FLUSH,wi=Qt.Z_FINISH,Ti=Qt.Z_OK,Si=Qt.Z_STREAM_END,Ai=Qt.Z_DEFAULT_COMPRESSION,Ci=Qt.Z_DEFAULT_STRATEGY,Oi=Qt.Z_DEFLATED;function Ii(){this.options={level:Ai,method:Oi,chunkSize:16384,windowBits:15,memLevel:8,strategy:Ci};var k=this.options;k.raw&&k.windowBits>0?k.windowBits=-k.windowBits:k.gzip&&k.windowBits>0&&k.windowBits<16&&(k.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new gi,this.strm.avail_out=0;var B=ui.deflateInit2(this.strm,k.level,k.method,k.windowBits,k.memLevel,k.strategy);if(B!==Ti)throw new Error(Yt[B]);if(k.header&&ui.deflateSetHeader(this.strm,k.header),k.dictionary){var U;if(U="[object ArrayBuffer]"===mi.call(k.dictionary)?new Uint8Array(k.dictionary):k.dictionary,(B=ui.deflateSetDictionary(this.strm,U))!==Ti)throw new Error(Yt[B]);this._dict_set=!0}}function Di(k){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(k);var B,U,F,G,j,$=k.length,H=0;for(G=0;G<$;G++)55296==(64512&(U=k.charCodeAt(G)))&&G+1<$&&56320==(64512&(F=k.charCodeAt(G+1)))&&(U=65536+(U-55296<<10)+(F-56320),G++),H+=U<128?1:U<2048?2:U<65536?3:4;for(B=new Uint8Array(H),j=0,G=0;j>>6,B[j++]=128|63&U):U<65536?(B[j++]=224|U>>>12,B[j++]=128|U>>>6&63,B[j++]=128|63&U):(B[j++]=240|U>>>18,B[j++]=128|U>>>12&63,B[j++]=128|U>>>6&63,B[j++]=128|63&U);return B}return Ii.prototype.push=function(k,B){var U,F,G=this.strm,j=this.options.chunkSize;if(this.ended)return!1;for(F=B===~~B?B:!0===B?wi:yi,"[object ArrayBuffer]"===mi.call(k)?G.input=new Uint8Array(k):G.input=k,G.next_in=0,G.avail_in=G.input.length;;)if(0===G.avail_out&&(G.output=new Uint8Array(j),G.next_out=0,G.avail_out=j),(F===_i||F===Ei)&&G.avail_out<=6)this.onData(G.output.subarray(0,G.next_out)),G.avail_out=0;else{if((U=ui.deflate(G,F))===Si)return G.next_out>0&&this.onData(G.output.subarray(0,G.next_out)),U=ui.deflateEnd(this.strm),this.onEnd(U),this.ended=!0,U===Ti;if(0!==G.avail_out){if(F>0&&G.next_out>0)this.onData(G.output.subarray(0,G.next_out)),G.avail_out=0;else if(0===G.avail_in)break}else this.onData(G.output)}return!0},Ii.prototype.onData=function(k){this.chunks.push(k)},Ii.prototype.onEnd=function(k){k===Ti&&(this.result=fi(this.chunks)),this.chunks=[],this.err=k,this.msg=this.strm.msg},{Deflate:Ii,constants:Qt,string2buf:Di}}(),U=B.Deflate,F=B.constants,G=B.string2buf,j=new U,$=0;function H(k){var B=G(k);return j.push(B,F.Z_SYNC_FLUSH),$+=B.length,B.length}self.addEventListener("message",k((function(k){var B=k.data;switch(B.action){case"init":self.postMessage({type:"initialized"});break;case"write":var G=H(B.data);self.postMessage({type:"wrote",id:B.id,compressedBytesCount:j.chunks.reduce((function(k,B){return k+B.length}),0),additionalBytesCount:G});break;case"flush":G=B.data?H(B.data):0;j.push("",F.Z_FINISH),self.postMessage({type:"flushed",id:B.id,result:j.result,additionalBytesCount:G,rawBytesCount:$}),j=new U,$=0}})))}))()}var jE={status:0};function $E(k,B){switch(void 0===B&&(B=FE),jE.status){case 0:jE={status:1,callbacks:[k]},function(k){void 0===k&&(k=FE);try{var B=k();B.addEventListener("error",Ab(HE)),B.addEventListener("message",Ab((function(k){var U,F=k.data;"errored"===F.type?HE(F.error):"initialized"===F.type&&(U=B,1===jE.status&&(jE.callbacks.forEach((function(k){return k(U)})),jE={status:3,worker:U}))}))),B.postMessage({action:"init"})}catch(U){HE(U)}}(B);break;case 1:jE.callbacks.push(k);break;case 2:k();break;case 3:k(jE.worker)}}function HE(k){var B;1===jE.status?(yb.error("Session Replay recording failed to start: an error occurred while creating the Worker:",k),k instanceof Event||k instanceof Error&&($b(B=k.message,"Content Security Policy")||$b(B,"requires 'TrustedScriptURL'"))?yb.error("Please make sure CSP is correctly configured https://docs.datadoghq.com/real_user_monitoring/faq/content_security_policy"):Fv(k),jE.callbacks.forEach((function(k){return k()})),jE={status:2}):Fv(k)}var VE=function(k,B,U){var F=(void 0===U?{}:U).ignoreInitIfSyntheticsWillInjectRum,G=void 0===F||F,j=!1,$=dp(),H=dp(),V=function(){},W=function(){},q=new up,K=function(k,B){void 0===B&&(B=gp()),q.add((function(){return K(k,B)}))},z=function(k,B){void 0===B&&(B=yp()),q.add((function(){return z(k,B)}))},Y=function(k,U){void 0===U&&(U=Sv($,H,B)),q.add((function(){return Y(k,U)}))},Q=function(k,U){void 0===U&&(U=Sv($,H,B)),q.add((function(){return Q(k,U)}))},X=function(k,B){q.add((function(){return X(k,B)}))};function Z(U,F,G){var j=k(U,F,B,$,H,G);z=j.startView,Y=j.addAction,Q=j.addError,K=j.addTiming,X=j.addFeatureFlagEvaluation,V=j.getInternalContext,q.drain(),B.onRumStart(j.lifeCycle,F,j.session,j.viewContexts)}var J,tt,et=Ab((function(k){z("object"==typeof k?k:{name:k})})),it=(J={init:Ab((function(k){if(W=function(){return sp(k)},!G||!Rp()){if(Mp())k=function(k){return xb({},k,{applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100})}(k);else if(!function(k){return function(k){if(void 0===document.cookie||null===document.cookie)return!1;try{var B="dd_cookie_test_".concat(kb()),U="test";Cp(B,U,Mb,k);var F=Op(B)===U;return Ip(B,k),F}catch(G){return yb.error(G),!1}}(gv(k))?"file:"!==window.location.protocol||(yb.error("Execution is not allowed in the current context."),!1):(yb.warn("Cookies are not authorized, we will not send any data."),!1)}(k))return;if(function(k){return!j||(k.silentMultipleInit||yb.error("DD_RUM is already initialized."),!1)}(k)){var B=wv(k);if(B){if(Np("feature_flags")&&(it.addFeatureFlagEvaluation=Ab((function(k,B){X(k,B)}))),B.trackViewsManually){var U=q;q=new up,z=function(U){Z(k,B,U)},U.drain()}else Z(k,B);j=!0}}}})),addRumGlobalContext:Ab($.add),setGlobalContextProperty:Ab($.setContextProperty),removeRumGlobalContext:Ab($.remove),removeGlobalContextProperty:Ab($.removeContextProperty),getRumGlobalContext:Ab($.get),getGlobalContext:Ab($.getContext),setRumGlobalContext:Ab($.set),setGlobalContext:Ab($.setContext),clearGlobalContext:Ab($.clearContext),getInternalContext:Ab((function(k){return V(k)})),getInitConfiguration:Ab((function(){return W()})),addAction:Ab((function(k,B){Y({name:k,context:sp(B),startClocks:yp(),type:"custom"})})),addError:function(k,B){var U=ev();Cb((function(){Q({error:k,handlingStack:U,context:sp(B),startClocks:yp()})}))},addTiming:Ab((function(k,B){K(k,B)})),setUser:Ab((function(k){(function(k){var B="object"===ep(k);return B||yb.error("Unsupported user:",k),B})(k)&&H.setContext(sv(k))})),getUser:Ab(H.getContext),setUserProperty:Ab((function(k,B){var U,F=sv((U={},U[k]=B,U))[k];H.setContextProperty(k,F)})),removeUserProperty:Ab(H.removeContextProperty),removeUser:Ab(H.clearContext),clearUser:Ab(H.clearContext),startView:et,startSessionReplayRecording:Ab(B.start),stopSessionReplayRecording:Ab(B.stop)},tt=xb({version:"4.35.0",onReady:function(k){k()}},J),Object.defineProperty(tt,"_setDebug",{get:function(){return Sb},enumerable:!1}),tt);return it}((function(k,B,U,F,G,j){var $=new Ng;$.subscribe(11,(function(k){return Av("rum",k)}));var H=function(k){var B=Bv("browser-rum-sdk",k);if(Mp()){var U=Pp();B.observable.subscribe((function(k){return U.send("internal_telemetry",k)}))}return B}(B);H.setContextProvider((function(){var k,U;return{application:{id:B.applicationId},session:{id:null===(k=Y.findTrackedSession())||void 0===k?void 0:k.id},view:{id:null===(U=J.findView())||void 0===U?void 0:U.id},action:{id:it.findActionId()}}}));var V,W=function(k){$.notify(12,{error:k})},q=function(k,B){if(void 0===B&&(B=cp),!Np("feature_flags"))return{findFeatureFlagEvaluations:function(){},getFeatureFlagBytesCount:function(){return 0},addFeatureFlagEvaluation:Fb};var U,F=new Bg(144e5);return k.subscribe(4,(function(k){var B=k.endClocks;F.closeActive(B.relative)})),k.subscribe(2,(function(k){var B=k.startClocks;F.add({},B.relative),U=void 0})),{findFeatureFlagEvaluations:function(k){return F.find(k)},getFeatureFlagBytesCount:function(){var k=F.find();return k?(void 0===U&&(U=B(Gb(k))),U):0},addFeatureFlagEvaluation:function(k,B){var G=F.find();G&&(G[k]=sp(B),U=void 0)}}}($);if(Mp())!function(k){var B=Pp();k.subscribe(11,(function(k){B.send("rum",k)}))}($);else{var K=V=new Cv((function(){var k=Np("pagehide"),B=Dv(window,["visibilitychange","freeze","pagehide"],(function(B){"pagehide"===B.type&&k?V.notify({reason:Rv.PAGEHIDE}):"visibilitychange"===B.type&&"hidden"===document.visibilityState?V.notify({reason:Rv.HIDDEN}):"freeze"===B.type&&V.notify({reason:Rv.FROZEN})}),{capture:!0}).stop,U=Fb;return k||(U=Iv(window,"beforeunload",(function(){V.notify({reason:Rv.UNLOADING})})).stop),function(){B(),U()}}));K.subscribe((function(k){$.notify(9,k)}));var z=Fy(B,$,H.observable,W,K);!function(k,B,U,F,G,j,$){B.enabled&&Bb(k.customerDataTelemetrySampleRate)&&(Ky(),zy(),U.subscribe(11,(function(k){Hy=!0,Wy($y.globalContextBytes,Yb(F.get())?0:F.getBytesCount()),Wy($y.userContextBytes,Yb(G.get())?0:G.getBytesCount());var B=j.findFeatureFlagEvaluations(),U=$b(["view","error"],k.type)&&B&&!Yb(B);Wy($y.featureFlagBytes,U?j.getFeatureFlagBytesCount():0)})),$.subscribe((function(k){var B=k.bufferBytesCount,U=k.bufferMessagesCount;Hy&&(jy.batchCount+=1,Wy(jy.batchBytesCount,B),Wy(jy.batchMessagesCount,U),qy(jy.globalContextBytes,$y.globalContextBytes),qy(jy.userContextBytes,$y.userContextBytes),qy(jy.featureFlagBytes,$y.featureFlagBytes),zy())})),setInterval(Ab(Vy),1e4))}(B,H,$,F,G,q,z.flushObservable)}var Y=Mp()?function(){var k={id:"00000000-aaaa-0000-aaaa-000000000000",plan:1,sessionReplayAllowed:!1,longTaskAllowed:!0,resourceAllowed:!0};return{findTrackedSession:function(){return k}}}():Oy(B,$),Q=function(){var k=$v(),B=new Cv((function(){if(k){var U=new k(Ab((function(){return B.notify()})));return U.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),function(){return U.disconnect()}}}));return B}(),X=Gy(location),Z=function(k,B,U,F,G,j,$,H){var V=function(k){var B=new Bg(144e5);return k.subscribe(2,(function(k){B.add(function(k){return{service:k.service,version:k.version,id:k.id,name:k.name}}(k),k.startClocks.relative)})),k.subscribe(4,(function(k){var U=k.endClocks;B.closeActive(U.relative)})),k.subscribe(8,(function(){B.reset()})),{findView:function(k){return B.find(k)},stop:function(){B.stop()}}}(k),W=function(k,B,U){var F,G=new Bg(144e5);k.subscribe(4,(function(k){var B=k.endClocks;G.closeActive(B.relative)})),k.subscribe(2,(function(k){var B=k.startClocks,j=U.href;G.add($({url:j,referrer:F||document.referrer}),B.relative),F=j}));var j=B.subscribe((function(k){var B=k.newLocation,U=G.find();if(U){var F=mp();G.closeActive(F),G.add($({url:B.href,referrer:U.referrer}),F)}}));function $(k){return{url:k.url,referrer:k.referrer}}return{findUrl:function(k){return G.find(k)},stop:function(){j.unsubscribe(),G.stop()}}}(k,G,U),q=Og(),K=function(k,B,U,F){k.subscribe(1,(function(B){return k.notify(10,xm(B,F))}));var G={findActionId:Fb};return U.trackUserInteractions&&(G=Mm(k,B,U).actionContexts),{addAction:function(B,U){k.notify(10,xb({savedCommonContext:U},xm(B,F)))},actionContexts:G}}(k,j,B,q),z=K.addAction,Y=K.actionContexts;return Ag(B,k,F,V,W,Y,$,H),{viewContexts:V,foregroundContexts:q,urlContexts:W,addAction:z,actionContexts:Y,stop:function(){V.stop(),q.stop()}}}($,B,location,Y,X,Q,(function(){return Sv(F,G,U)}),W),J=Z.viewContexts,tt=Z.foregroundContexts,et=Z.urlContexts,it=Z.actionContexts,st=Z.addAction;!function(k){kv.telemetryConfigurationEnabled&&Gv({type:Nv,configuration:k})}(function(k){var B,U,F=function(k){var B,U,F=null!==(B=k.proxy)&&void 0!==B?B:k.proxyUrl;return{session_sample_rate:null!==(U=k.sessionSampleRate)&&void 0!==U?U:k.sampleRate,telemetry_sample_rate:k.telemetrySampleRate,telemetry_configuration_sample_rate:k.telemetryConfigurationSampleRate,use_before_send:!!k.beforeSend,use_cross_site_session_cookie:k.useCrossSiteSessionCookie,use_secure_session_cookie:k.useSecureSessionCookie,use_proxy:void 0!==F?!!F:void 0,silent_multiple_init:k.silentMultipleInit,track_session_across_subdomains:k.trackSessionAcrossSubdomains,track_resources:k.trackResources,track_long_task:k.trackLongTasks}}(k);return xb({premium_sample_rate:k.premiumSampleRate,replay_sample_rate:k.replaySampleRate,session_replay_sample_rate:k.sessionReplaySampleRate,trace_sample_rate:null!==(B=k.traceSampleRate)&&void 0!==B?B:k.tracingSampleRate,action_name_attribute:k.actionNameAttribute,use_allowed_tracing_origins:Array.isArray(k.allowedTracingOrigins)&&k.allowedTracingOrigins.length>0,use_allowed_tracing_urls:Array.isArray(k.allowedTracingUrls)&&k.allowedTracingUrls.length>0,selected_tracing_propagators:Tv(k),default_privacy_level:k.defaultPrivacyLevel,use_excluded_activity_urls:Array.isArray(k.allowedTracingOrigins)&&k.allowedTracingOrigins.length>0,track_frustrations:k.trackFrustrations,track_views_manually:k.trackViewsManually,track_user_interactions:null!==(U=k.trackUserInteractions)&&void 0!==U?U:k.trackInteractions},F)}(k)),function(k,B){k.subscribe(0,(function(U){for(var F=0,G=U;F=0;G--){var j=Qy[G].startTime;if(!(j>=F)&&(U.unshift(Qy[G]),j{this._questManager.getUnclaimedRewardsMail()||U(),B()})).catch(j.RQr.createHandler("Failed to claim battle pass rewards"))}};JE=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)("8dc-04eb")),(0,G.Qj)(1,(0,tt.inject)("aa9-c54b")),(0,G.Sn)("design:paramtypes",[Function,Function])],JE);let tw=class{constructor(k){this.mailExtensions={},k.forEach((k=>{this.mailExtensions[k.Name]=k}))}open(k,B,U=null){var F,G,$,H,V,W;const q=null!==(G=null===(F=null==k?void 0:k.extension)||void 0===F?void 0:F.name)&&void 0!==G?G:null,z=null!==($=this.mailExtensions[q])&&void 0!==$?$:null;if(!z){const F=K.q.instance.prodigy.open.openMail(k);return F.setCloseCallback(B),F.setDeleteMailCallback(U),void j.VyI.log(`No extension found for ${k.subject} or extension '${q}' was empty`,j.$bb.Verbose)}j.VyI.log(`Opening ${k.subject} with extension '${q}'`,j.$bb.Verbose),z.openMailItem(null!==(V=null===(H=null==k?void 0:k.extension)||void 0===H?void 0:H.params)&&void 0!==V?V:[],(null===(W=null==k?void 0:k.extension)||void 0===W?void 0:W.deleteMailOnClose)&&U?()=>{U(),B()}:B,U)}isValid(k){var B;const U=null===(B=null==k?void 0:k.extension)||void 0===B?void 0:B.name,F=this.mailExtensions[U];return U&&!F?(j.VyI.log(`Extension was not valid for mail: ${JSON.stringify(k.extension)}`,j.$bb.Warning),!1):!F||F.isValid(k)}applyTemplate(k,B){const U=$.get(k,"extension.name",null),F=$.get(this.mailExtensions,U,null);F&&F.applyTemplate(k,B)}};tw=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.multiInject)("438-fe2f")),(0,G.Sn)("design:paramtypes",[Array])],tw);let ew=class extends QE{constructor(){super(...arguments),this.name=XE.R.Prefab}isValid(k){var B;const U=null===(B=k.extension.params)||void 0===B?void 0:B[0];return k.extension.name===XE.R.Prefab&&Object.values(Ei.l).includes(U)}applyTemplate(k,B){super.applyTemplate(k,B),this._mailData=k}openMailItem(k,B){const U=k[0];K.q.instance.prodigy.open.prefabMenu(U,B),K.q.instance.game.broadcaster.broadcast(oi.zr.MarkAsRead,oi.HG.MailView,[void 0,this._mailData])}};ew=(0,G.Cg)([(0,tt.injectable)()],ew);let iw=class extends QE{constructor(){super(...arguments),this.name="PopupMailExtension"}isValid(k){var B;const U=(null===(B=k.extension.params)||void 0===B?void 0:B.length)>0?k.extension.params[0]:"";return k.extension.name===XE.R.Popup&&this._externalMethods.doesFunctionExist(U)}openMailItem(k,B,U){const F=(null==k?void 0:k.length)>0?k[0]:"";""!==F&&this._externalMethods.doesFunctionExist(F)?this._externalMethods.runFunction(F,k,void 0,void 0,[B,U]):j.VyI.log("[PopupMailExtension] Missing function name or function does not exist",j.$bb.Error)}};(0,G.Cg)([(0,tt.inject)("eb9-3fdf"),(0,G.Sn)("design:type",be.g)],iw.prototype,"_externalMethods",void 0),iw=(0,G.Cg)([(0,tt.injectable)()],iw);let sw=class extends QE{constructor(){super(...arguments),this.name=XE.R.Titan}isValid(k){return!0}openMailItem(k,B){K.q.instance.prodigy.open.openMail(this._mailData).onClose=B}applyTemplate(k,B){B.openButtonGraphic.y+=8,B.unOpenButtonGraphic.y+=9,super.applyTemplate(k,B),this._mailData=k}};sw=(0,G.Cg)([(0,tt.injectable)()],sw);let nw=class extends zt.D{getBattleStats(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.BattleStats.GetBattleStats,{userId:null==k?void 0:k.toString()},!1)}))}onWeeklyChallengeBattleEnd(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.BattleStats.RecordEnd,{type:k},!1)}))}debugOverrideMatchmakingBattleStreak(k){return(0,G.sH)(this,void 0,void 0,(function*(){0}))}};nw=(0,G.Cg)([(0,tt.injectable)()],nw);class aw extends zt.D{getDailyDuelUses(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.DuelsStadium.GetAllDailyDuelsUsed,{},!0)}))}}let rw=class extends zt.D{getCampaignReplayData(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.CampaignReplay.GetCampaignReplayData,{},!1)}))}setProgress(k){this.makeCloudscriptRequest(qt.D.CampaignReplay.SetFeatureProgress,k,!1).catch(j.RQr.createHandler("CampaignReplayNetworkHandler.setProgress: Failed to set progress"))}unlockDifficultyMode(k){this.makeCloudscriptRequest(qt.D.CampaignReplay.UnlockDifficultyMode,{difficulty:k},!1).catch((()=>{K.q.instance.game.broadcaster.broadcast(oi.oL.DifficultyUnlockRequestFailed),j.RQr.createHandler("CampaignReplayNetworkHandler.unlockDifficultyMode: Failed to unlock difficulty mode")}))}setCurrentDifficulty(k){this.makeCloudscriptRequest(qt.D.CampaignReplay.SetCurrentDifficulty,{difficulty:k},!1).catch((()=>{K.q.instance.game.broadcaster.broadcast(oi.oL.DifficultyModeChangeFailed),j.RQr.createHandler("CampaignReplayNetworkHandler.setCurrentDifficulty: Failed to set current difficulty")}))}debugForceUnlockDifficulty(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.CampaignReplay.Debug.ForceUnlockDifficultyMode,{difficulty:k},!1)}))}debugResetData(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.CampaignReplay.Debug.ResetData,{},!1)}))}};rw=(0,G.Cg)([(0,Q.injectable)()],rw);var ow=U(35571);class hw extends js.D{debugSetCooldownTimestamp(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){return this.call(qt.D.Cooldowns.Debug.SetCooldownTimestamp,{cooldownId:k,timestamp:B},!0)}))}debugClearCooldown(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.call(qt.D.Cooldowns.Debug.ClearCooldown,{cooldownId:k},!0)}))}debugClearAllCooldowns(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.call(qt.D.Cooldowns.Debug.ClearAllCooldowns,{},!0)}))}setCooldownFromNow(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){return this.call(qt.D.Cooldowns.SetCooldownFromNow,{cooldownId:k,durationMs:B},!0)}))}setCooldownFromCategory(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){return this.call(qt.D.Cooldowns.SetCooldownFromCategory,{cooldownId:k,category:B},!0)}))}}var cw=U(55328);let dw=class extends zt.D{get elementalBoost(){return this._elementalBoost}getCurrentElementalBoost(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.ElementalBoosts.GetCurrentElementalBoost,{},!1)}))}cacheElementalBoost(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!j.Aq$.isDefined(this._lastUpdatedTime)||Date.now()>this._lastUpdatedTime+864e5){const k=yield this.getCurrentElementalBoost();this._elementalBoost=k.element,this._lastUpdatedTime=k.lastUpdatedUtcTime}return this._elementalBoost}))}doDebugCommand(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){0}))}};dw=(0,G.Cg)([(0,tt.injectable)()],dw);let lw=class extends js.D{enterWorld(){return(0,G.sH)(this,arguments,void 0,(function*(k=[]){const B=this._player.hasValidatedParentEmail(),U=Oc.R.getTimezoneOffset();return this.call(qt.D.Events.EnterWorld,{experiments:k,parentLinked:B,timezoneOffset:U},!1)}))}};(0,G.Cg)([(0,Re.b)("306-5359"),(0,G.Sn)("design:type",ye.W)],lw.prototype,"_player",void 0),lw=(0,G.Cg)([(0,tt.injectable)()],lw);var uw=U(7001),fw=U(89067);let bw=class{constructor(k){this.game=k}};bw=(0,G.Cg)([(0,tt.injectable)(),(0,G.Sn)("design:paramtypes",[an.n])],bw);class pw extends bw{constructor(k){super(k),this.pendingRequests=null,this.friendsCap=20,this.friendsList=[],this.classList=[],this.friendRequestList=[],this.hasReceivedFriends=!1,this.hasReceivedFriendsAppearance=!1,this.hasReceivedFriendsAppearanceOfActualFriends=!1,this.hasReceivedClass=!1,k.broadcaster.addAppListener(oi.lT.Setup,(()=>{this.setup()}),this,oi.HG.NetworkHandlers,!0),k.broadcaster.addAppListener(oi.AU.PlayerInitialized,(()=>{this.fetchClassmates()}),this,null,!0)}getFriendsCap(){return this.friendsCap}hasPendingRequests(){return this.pendingRequests>0}isFriendsListDownloaded(){return this.hasReceivedFriends}isClassmatesListDownloaded(){return this.hasReceivedClass}getFriend(k){let B=null;for(let U=0;UB.userID===k&&0!==B.status))}isClassmate(k){return this.classList.some((B=>B.userID===k))}getFriendQuestProgress(k){const B=[];for(let U=0;U{this.processClassmates(k)})).catch((k=>{K.q.instance.prodigy.loading(!1),this.showGenericNetworkError()}))}}shouldFetchClassmates(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return k.hasCompletedTutorial()&&k.classIDs.length>0}processClassmates(k){var B,U;K.q.instance.prodigy.loading(!1);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=null!==(U=null===(B=k.data.player.currentClassroom)||void 0===B?void 0:B.students)&&void 0!==U?U:[];for(let j=0;j0){K.q.instance.prodigy.gameContainer.get("c97-bd0d").getCharData(U,["appearance","state"],this.getUserData.bind(this),null).catch(j.RQr.createHandler("Error getting character data"))}}getUserData(k){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;for(const B in k)for(let U=0;U{this.game.broadcaster.broadcast(oi.sd.RequestSent,oi.HG.FriendsList,[k]),this.game.broadcaster.broadcast(oi.sd.RequestSent,oi.HG.Card,[])}}),K.q.instance.prodigy.gameContainer.get("c47-20b6").social.sendFriendRequestSentEvent({friends:this.friendsList.length,classmates:this.classList.length}))}cancelFriendRequest(k){K.q.instance.prodigy.loading(!0);K.q.instance.prodigy.gameContainer.get("c97-bd0d").cancelFriendRequest(k,this.cancelFriendRequestSuccess.bind(this,k),this.networkCallFailure.bind(this)).catch(j.RQr.createHandler("Error cancelling friend request"))}cancelFriendRequestSuccess(k,B){K.q.instance.prodigy.loading(!1),pw.removeUserFromArray(this.friendsList,k),K.q.instance.prodigy.open.messageBoxPrefab({text:"FRIENDS_LIST_CANCEL_MESSAGE_BODY",title:"FRIENDS_LIST_CANCEL_MESSAGE_TITLE",confirmCallback:this.onCancelFriendRequestClose.bind(this,k)})}onCancelFriendRequestClose(k){this.game.broadcaster.broadcast(oi.sd.RequestCancelled,oi.HG.FriendsList,[k]),this.game.broadcaster.broadcast(oi.sd.RequestCancelled,oi.HG.Card,[k])}acceptFriendRequestSuccess(k,B,U,F){K.q.instance.prodigy.loading(!1),this.friendsList.push({userID:k,status:1,isMember:0}),this.getUserAppearance(this.friendsList.slice(this.friendsList.length-1,this.friendsList.length)),pw.removeUserFromArray(this.friendRequestList,k),this.pendingRequests--,this.game.broadcaster.broadcast(oi.sd.RequestAccepted,oi.HG.FriendsList,[k,B]),this.game.broadcaster.broadcast(oi.sd.RequestAccepted,oi.HG.HUD),this.game.broadcaster.broadcast(oi.sd.RequestAccepted,oi.HG.Card,[]),K.q.instance.prodigy.gameContainer.get("c47-20b6").social.sendFriendRequestAcceptedEvent({friends:this.friendsList.length,classmates:this.classList.length,from_request:U,index:B})}getUserAppearance(k,B=!1){this.hasReceivedFriendsAppearance=!1,this.hasReceivedFriendsAppearanceOfActualFriends=!1;let U="",F="";for(let G=0;G0){K.q.instance.prodigy.gameContainer.get("c97-bd0d").getCharData(U,["appearance","isMember","equipment","data","state"],this.onGetUserAppearance.bind(this,B),this.networkCallFailure.bind(this))}}onGetUserAppearance(k,B){const U=k?this.classList:this.friendsList;for(const F in B)for(let k=0;k{var B,U,F,G;const j=null!==(B=k.message)&&void 0!==B?B:null===(U=k.data)||void 0===U?void 0:U.message,$=null!==(G=null===(F=k.data)||void 0===F?void 0:F.image)&&void 0!==G?G:"",H=k.rewards.map((k=>{const B=(null==k?void 0:k.itemID).split("-");return{ID:B[1],type:B[0],N:k.quantity}}));return Object.assign(Object.assign({id:k.ID,isOpened:!!k.openedOn,isCollected:!!k.collectedOn,userName:k.mailFrom,subject:k.subject,attachments:H},k.data),{message:j,image:$})}))}))}markAsRead(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.Mail.ReadMail,{mailId:k.id})}))}deleteMail(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.Mail.DeleteMail,{mailId:k.id})}))}collectMailRewards(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.Mail.CollectMailRewards,{mailId:k.id},!1)}))}};(0,G.Cg)([(0,Re.b)("e20-0fb0"),(0,G.Sn)("design:type",Wt.E)],gw.prototype,"_player",void 0),gw=(0,G.Cg)([(0,tt.injectable)()],gw);class mw{}mw.DATA=[{id:97,subject:"'Arc of Light' - Bronze season rewards!",isOpened:!1,image:"letter-season-end-rewards-bronze",message:"The Arena season 'Arc of Light' has ended! You can now claim the Bronze rewards you've unlocked. Look forward to the next season: 'Food Fight'!",attachments:[{type:"item",ID:20}],gameMethod:{name:"singleUseGotItem",buttonText:"CLAIM YOUR REWARDS"},debug:!0},{id:98,subject:"'Arc of Light' - Silver season rewards!",isOpened:!1,image:"letter-season-end-rewards-silver",message:"The Arena season 'Arc of Light' has ended! You can now claim the Silver rewards you've unlocked. Look forward to the next season: 'Food Fight'!",attachments:[{type:"item",ID:20}],gameMethod:{name:"singleUseGotItem",buttonText:"CLAIM YOUR REWARDS"},debug:!0},{id:99,subject:"'Arc of Light' - Gold season rewards!",isOpened:!1,image:"letter-season-end-rewards-gold",message:"The Arena season 'Arc of Light' has ended! You can now claim the Gold rewards you've unlocked. Look forward to the next season: 'Food Fight'!",attachments:[{type:"item",ID:20}],gameMethod:{name:"singleUseGotItem",buttonText:"CLAIM YOUR REWARDS"},debug:!0},{id:0,subject:"Hello World 0",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42. This text is particularly long so we can figure out what happens when it's very long! Arguably there has to be a logical limit to the size of the text but putting in an entire paragraph is probably a pretty good test of the max size.",attachments:[{type:"item",ID:1},{type:"item",ID:2},{type:"item",ID:3}],debug:!0},{id:1,subject:"SPLIT TEST MAIL",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[{type:"item",ID:1},{type:"item",ID:2},{type:"item",ID:3},{type:"item",ID:4}],gameMethod:{name:"openMembershipSignUp"},debug:!0},{id:2,subject:"Hello World 2",isOpened:!1,image:"noImage",message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[{type:"item",ID:1},{type:"item",ID:2}],debug:!0},{id:3,subject:"Hello World 3",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[{type:"currency",ID:11,N:50}],debug:!0},{id:4,subject:"Hello World 4",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:5,subject:"You have a Reward Goal!",isOpened:!1,membership:0,image:null,message:"Your parent has setup a goal for you! Answer 10 correct questions and your parent will sent you a Reward!",attachments:[],gameMethod:{name:"openGiftBox"},debug:!0},{id:5,subject:"You have a Member Box!",isOpened:!1,membership:2,image:null,message:"Your parent has setup a goal for you! Answer 10 correct questions and your parent will sent you a Reward!",attachments:[{type:"item",ID:1},{type:"item",ID:2},{type:"item",ID:3},{type:"item",ID:4},{type:"item",ID:5}],gameMethod:{name:"openGiftBox"},debug:!0},{id:5,subject:"Sign Up for Membership!",isOpened:!1,membership:1,image:null,message:"Your parent has setup a goal for you! Answer 10 correct questions and your parent will sent you a Reward!",attachments:[],gameMethod:{name:"openMembershipSignUp"},debug:!0},{id:10,subject:"Hello World 10",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:20,subject:"Hello World 20",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:30,subject:"Hello World 30",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:40,subject:"Hello World 40",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:50,subject:"Hello World 50",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:60,subject:"Hello World 60",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:70,subject:"Hello World 70",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:80,subject:"Hello World 80",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:90,subject:"Hello World 90",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:100,subject:"Hello World 100",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:1e3,subject:"Hello World 1000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:2e3,subject:"Hello World 2000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:3e3,subject:"Hello World 3000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:4e3,subject:"Hello World 4000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:5e3,subject:"Hello World 5000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:6e3,subject:"Hello World 6000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:7e3,subject:"Hello World 7000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:8e3,subject:"Hello World 8000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:9e3,subject:"Hello World 9000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0},{id:1e4,subject:"Hello World 10000",isOpened:!1,image:null,message:"The answer to the ultimate question of life, the universe, and everything is 42.",attachments:[],debug:!0}],mw.TOTAL_MAIL={totalUnread:0};class yw{static getAllMail(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=mw.DATA.slice(0,300);return new Promise(((B,U)=>{Vt.s.get("GameConstants.Mailer.TEST_MAIL")?(j.VyI.log("Test get all legacy mail",j.$bb.Verbose),B(k)):B([])}))}))}static markAsRead(k){return(0,G.sH)(this,void 0,void 0,(function*(){return new Promise(((k,B)=>{if(Vt.s.get("GameConstants.Mailer.TEST_MAIL")){mw.TOTAL_MAIL={totalUnread:0};for(let k=0;k{if(Vt.s.get("GameConstants.Mailer.TEST_MAIL")){for(let B=0;B{this.setup()}),this,oi.HG.NetworkHandlers,!0)}setup(){const k=this.game.broadcaster;k.addAppListener(oi.zr.MarkAsRead,this.markAsRead.bind(this),this,oi.HG.MailView,!0),this._cachedPlayer=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;const B=K.q.instance.prodigy.gameContainer.get("8dc-04eb").preloadPreviousUnclaimedRewards(),U=this.awaitAllMail();Promise.all([U,B]).then((k=>{var B;if(!k[0])return void this.getAllMailFailure();const U=k[0][0],F=k[0][1],G=(null!=F?F:[]).concat(null!==(B=null==U?void 0:U.emails)&&void 0!==B?B:[]).sort(this.bySendDate);this.getAllMailSuccess(G)})).catch((()=>{j.VyI.log("Failed to fetch mail promises.",j.$bb.Error)})),k.removeAppListener(oi.lT.Setup,this,oi.HG.NetworkHandlers)}setRead(k,B){const U=this._mailList[k];U.isOpened!==B&&(U.isOpened=B,this.mailTotals.totalRead+=B?1:-1,this.mailTotals.totalUnread+=B?-1:1,this.broadcastMailCount())}broadcastMailCount(){j.Aq$.isDefined(this.mailTotals)&&(this.game.broadcaster.broadcast(oi.zr.UpdateMailCounters,oi.HG.Mailer),this.game.broadcaster.broadcast(oi.zr.UpdateMailCounters,oi.HG.MailerButton,[this.mailTotals]),this._hudService.updateNotificationBadge(fw.ts.YourMail,this.mailTotals.totalUnread))}awaitAllMail(){return(0,G.sH)(this,void 0,void 0,(function*(){return Promise.all([yw.getAllMail(),this._cloudscriptMailNetworkHandler.getAllMail()]).catch((()=>{this.getAllMailFailure()}))}))}bySendDate(k,B){return new Date(B.sendDate).getTime()-new Date(k.sendDate).getTime()}getAllMail(k){const B=K.q.instance.prodigy.timeManager.getServerTimeMs();(B>=this._lastNetworkCheckTime+this.NETWORK_CHECK_MIN_TIME_MS||k)&&(Promise.all([yw.getAllMail(),this._cloudscriptMailNetworkHandler.getAllMail()]).then((([k,B])=>this.getAllMailSuccess(B.concat(k).sort(this.bySendDate)))).catch((()=>this.getAllMailFailure())),this._lastNetworkCheckTime=B)}getAllMailSuccess(k){if(Vt.s.get("GameConstants.Mailer.TEST_MAIL")){this._mailList=null!=k?k:[];const B=this._mailList.length;this.mailTotals={totalRead:0,totalUnread:mw.TOTAL_MAIL.totalUnread,total:B,splitTestKeys:null},this.game.broadcaster.broadcast(oi.zr.GetAllMailSuccess,oi.HG.Mailer)}else k?this.modifyMail(k):this.getAllMailFailure()}modifyMail(k){const B=K.q.instance.prodigy.gameContainer,U=B.get("8dc-04eb").getUnclaimedRewardsMail();j.Aq$.isDefined(U)&&k.unshift(U);const F=B.get("140-ca43"),{validMail:G=[],invalidMail:$=[]}=H().groupBy(k,(k=>F.isValid(k)?this.isMemberSuppressed(k)?"hiddenMail":"validMail":"invalidMail"));if(this._mailList=G,$.length>0){j.VyI.log(`Found ${$.length} mail item(s) that are invalid and will be deleted`,j.$bb.Verbose);for(const k of $)this.deleteMail(k),j.VyI.log(`Removing mail ID ${k.id} with subject '${k.subject}' from inbox`,j.$bb.Verbose)}const V=H().sumBy(G,(k=>k.isOpened?1:0)),W=G.length;this.mailTotals={totalRead:V,totalUnread:W-V,total:W,splitTestKeys:null},this.broadcastMailCount(),this.game.broadcaster.broadcast(oi.zr.GetAllMailSuccess,oi.HG.Mailer)}isMemberSuppressed({membership:k}){return(2===k||1===k)&&Tn.J.shouldSuppressAd(this._cachedPlayer)}getAllMailFailure(){this.game.input.enabled=!0,this.game.broadcaster.broadcast(oi.zr.GetAllMailFailure,oi.HG.Mailer),j.VyI.log("Could not get all mail.",j.$bb.Error)}markAsRead(k,B){Sc.b.isDebugMailData(B)?yw.markAsRead(B).then(k).catch((()=>this.markAsReadFailure(B))):this._cloudscriptMailNetworkHandler.markAsRead(B).then(k).catch((()=>this.markAsReadFailure(B)))}markAsReadFailure(k){this.game.input.enabled=!0,this.game.broadcaster.broadcast(oi.zr.MarkAsReadFailure,oi.HG.Mailer),j.VyI.log("Could not mark as read.",j.$bb.Error)}deleteMail(k){if(k){if(H().remove(this._mailList,(B=>B===k)),this.mailTotals&&(this.mailTotals.total--,k.isOpened?this.mailTotals.totalRead--:this.mailTotals.totalUnread--,this.broadcastMailCount()),Sc.b.isClientInsertedMail(k))return;Sc.b.isDebugMailData(k)?yw.deleteMail(k).catch((()=>this.deleteMailFailure())):this._cloudscriptMailNetworkHandler.deleteMail(k).catch((()=>this.deleteMailFailure()))}else j.VyI.log("Mail model data is not defined.",j.$bb.Error)}deleteMailFailure(){this.game.broadcaster.broadcast(oi.zr.DeleteMailFailure,oi.HG.Mailer),j.VyI.log("Could not delete mail.",j.$bb.Error)}}(0,G.Cg)([(0,Re.b)("535-27b9"),(0,G.Sn)("design:type",gw)],_w.prototype,"_cloudscriptMailNetworkHandler",void 0),(0,G.Cg)([(0,Re.b)("cc9-a3f0"),(0,G.Sn)("design:type",It.W)],_w.prototype,"_hudService",void 0);var Ew=U(2952);let ww=class extends zt.D{getWorldList(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.World.GetWorldList,{},!1)}))}updateCachedAppearance(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.Character.UpdateCachedAppearance,{zoneMapChannel:k,userID:B},!1)}))}sendFXMessage(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){const G={action:Ew.P.FX,zoneMapChannel:k,type:B,data:j.Aq$.isDefined(U)?{x:U,y:F}:void 0};yield this.sendMessage(G)}))}sendChatMessage(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){const G={action:Ew.P.Chat,zoneMapChannel:k,emoteID:B,danceID:U,chatID:F,data:null};this.sendMessage(G)}))}sendCoopHostTeamMessage(k,B,U,F,j){return(0,G.sH)(this,void 0,void 0,(function*(){const G={action:Ew.P.HostTeam,zoneMapChannel:k,data:{hostID:B,teamMembers:U,streak:F,readyMembers:j}};yield this.sendMessage(G)}))}sendTransformMessage(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){const G={action:Ew.P.Transform,zoneMapChannel:k,showEffect:B,transformID:U,transformType:F,data:null};yield this.sendMessage(G)}))}sendCoopTeamDisbandedMessage(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U={action:Ew.P.TeamDisbanded,zoneMapChannel:k,data:{hostID:B}};yield this.sendMessage(U)}))}sendCoopTeamRequestJoinMessage(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F={action:Be.m.RequestJoinTeam,zoneMapChannel:k,target:U,data:{userID:B}};yield this.sendMessage(F)}))}sendCoopJoinTeamMessage(k,B,U,F,j,$){return(0,G.sH)(this,void 0,void 0,(function*(){const G={action:Be.m.JoinTeam,zoneMapChannel:k,target:$,data:{hostID:B,teamMembers:U,streak:F,readyMembers:j}};yield this.sendMessage(G)}))}sendCoopTeamUpdatedMessage(k,B,U,F,j){return(0,G.sH)(this,void 0,void 0,(function*(){const G={action:Ew.P.TeamUpdated,zoneMapChannel:k,data:{hostID:B,teamMembers:U,streak:F,readyMembers:j}};yield this.sendMessage(G)}))}sendCoopPlayerLeftTeamMessage(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F={action:Be.m.PlayerLeftTeam,zoneMapChannel:k,target:U,data:{userID:B}};yield this.sendMessage(F)}))}sendCoopStartCoopTitanMatchMessage(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F={action:Be.m.StartCoOpTitanMatch,zoneMapChannel:k,target:U,data:B};yield this.sendMessage(F)}))}sendCoopHostHeartbeatMessage(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U={action:Ew.P.HostHeartbeat,zoneMapChannel:k,data:B};yield this.sendMessage(U)}))}sendCoopSyncHealthMessage(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F={action:Ew.P.SyncHealth,zoneMapChannel:k,data:{crystalHP:B,titanHP:U}};yield this.sendMessage(F)}))}sendCoopQuestionAnsweredMessage(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){const G={action:Be.m.QuestionAnswered,zoneMapChannel:k,target:B,data:{sourcePlayerID:U,correct:F}};yield this.sendMessage(G)}))}sendCoopPlayerAttackedMessage(k,B,U,F,j,$){return(0,G.sH)(this,void 0,void 0,(function*(){const G={action:Ew.P.PlayerAttacked,zoneMapChannel:k,data:{sourcePlayerID:B,missed:U,titanHealth:F,damage:j,spellID:$}};yield this.sendMessage(G)}))}sendCoopTitanAttackedMessage(k,B,U,F,j){return(0,G.sH)(this,void 0,void 0,(function*(){const G={action:Ew.P.TitanAttacked,zoneMapChannel:k,data:{crystalHealth:U,missed:B,damage:F,spellID:j}};yield this.sendMessage(G)}))}sendCoopTitanDefeatedMessage(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B={action:Ew.P.TitanDefeated,zoneMapChannel:k,data:{}};yield this.sendMessage(B)}))}sendCoopPlayersDefeatedMessage(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B={action:Ew.P.PlayersDefeated,zoneMapChannel:k,data:{}};yield this.sendMessage(B)}))}sendCoopJoinTeamFailedMessage(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F={action:Be.m.JoinTeamFailed,zoneMapChannel:k,target:B,data:{reason:U}};yield this.sendMessage(F)}))}sendCoopRejoinJoinTeamMessage(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F={action:Be.m.PlayerRejoinTeam,zoneMapChannel:k,target:B,data:{userID:U}};yield this.sendMessage(F)}))}sendCoopCatapultMessage(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U={zoneMapChannel:k,action:Ew.P.Catapult,userID:B,data:{}};yield this.sendMessage(U)}))}sendChangeAppearanceMessage(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B={action:Ew.P.Change,zoneMapChannel:k,data:{}};yield this.sendMessage(B)}))}sendCoopTeamMessage(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U={action:Ew.P.CoopTeam,zoneMapChannel:k,data:B};yield this.sendMessage(U)}))}sendMessage(k){return(0,G.sH)(this,void 0,void 0,(function*(){this.makeCloudscriptRequest(qt.D.MultiplayerMessage.SendMessage,k,!0)}))}};ww=(0,G.Cg)([(0,tt.injectable)()],ww);var Tw=U(60126),Sw=U(65933);class Aw extends js.D{bulkUpdatePetMergeRank(k){return(0,G.sH)(this,void 0,void 0,(function*(){0}))}performMergeAction(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){return this.call(qt.D.PetMerge.PerformMergeAction,{basePetUniqueId:k,mergeIngredients:B},!1)}))}}var Cw=U(38560),Ow=U(59219);let Iw=class extends zt.D{setPlayerDebugTime(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.Time.SetPlayerDebugTime,{debugOffset:k,preserveDebugTime:B},!1)}))}getPlayerTimezoneOffsetEntity(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.Time.GetPlayerTimezoneEntity,{},!1)}))}};Iw=(0,G.Cg)([(0,Q.injectable)()],Iw);class Dw extends bw{constructor(k){super(k),this.titan=null,this.isCatapultBattle=!1,k.broadcaster.addAppListener(oi.lT.Setup,(()=>{this.setup()}),this,oi.HG.NetworkHandlers,!0)}getTitans(){return(0,G.sH)(this,void 0,void 0,(function*(){if(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasCompletedTutorial()){const k=K.q.instance.prodigy.timeManager.getServerTimeMs();if(k>=Dw._lastNetworkCheckTime+Dw.TITAN_NETWORK_CHECK_MIN_TIME_MS){Dw._lastNetworkCheckTime=k;const B=null;B?this.getTitansSuccess(B):(K.q.instance.prodigy.loading(!0),yield K.q.instance.prodigy.gameContainer.get("c97-bd0d").getTitans(this.getTitansSuccess.bind(this),this.networkCallFailure.bind(this)))}else this.getTitansSuccess(this.titan)}}))}getTitan(k,B="Titan"){if(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasCompletedTutorial()){let U=null;if(U)this.getTitanSuccess(B,U);else{K.q.instance.prodigy.loading(!0);K.q.instance.prodigy.gameContainer.get("c97-bd0d").getTitan(k,this.getTitanSuccess.bind(this,B),this.getTitanFailure.bind(this,B)).catch(j.RQr.createHandler("Could not get status of Titan"))}}}getTitanUserData(){if(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasCompletedTutorial()){K.q.instance.prodigy.gameContainer.get("c97-bd0d").getTitanUserData(null,null).catch(j.RQr.createHandler("Could not get user titan data"))}}hitTitan(k){if(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasCompletedTutorial()){K.q.instance.prodigy.loading(!0);const B=K.q.instance.prodigy.gameContainer.get("c97-bd0d");B.hitTitan(k,this.hitTitanSuccess.bind(this),this.networkCallFailure.bind(this)).catch(j.RQr.createHandler("Could not do damage to Titan")),this.isCatapultBattle&&B.hitTitan(k,this.hitTitanSuccess.bind(this),this.networkCallFailure.bind(this)).catch(j.RQr.createHandler("Could not do damage to Titan"))}}isTitanAlive(){var k,B,U;return j.Aq$.isDefined(null===(k=this.titan)||void 0===k?void 0:k.id)&&(null===(B=this.titan)||void 0===B?void 0:B.health)>0&&!(null===(U=this.titan)||void 0===U?void 0:U.processed)}isNewTitan(){var k;const B=null===(k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.playerTitanData)||void 0===k?void 0:k.titanID;return j.Aq$.isDefined(this.titan)&&(!j.Aq$.isDefined(B)||B!==this.titan.id)}setup(){this.game.broadcaster.removeAppListener(oi.lT.Setup,this,oi.HG.NetworkHandlers),this.getTitanUserData()}getTitansSuccess(k){K.q.instance.prodigy.loading(!1),this.titan=k,this.game.broadcaster.broadcast(oi.RZ.GotTitans,"Titan",[k])}getTitanSuccess(k,B){K.q.instance.prodigy.loading(!1),this.titan=B,this.game.broadcaster.broadcast(oi.RZ.GotTitan,k,[B])}getTitanFailure(k){K.q.instance.prodigy.loading(!1),j.VyI.log("Error: Titan network call failure",j.$bb.Error),this.titan=null,this.game.broadcaster.broadcast(oi.RZ.GotTitan,k,[null])}hitTitanSuccess(k){K.q.instance.prodigy.loading(!1),this.titan.hits=k.hits}networkCallFailure(){K.q.instance.prodigy.loading(!1),this.titan=null,j.VyI.log("Error: Titan network call failure",j.$bb.Verbose),this.game.broadcaster.broadcast(oi.RZ.GotTitan,"Titan",[null])}}Dw.TITAN_NETWORK_CHECK_MIN_TIME_MS=3e5,Dw._lastNetworkCheckTime=0;var Rw=U(37962),Pw=U(34854),Mw=U(81623),Nw=U(29044);let xw=class{constructor(){this._userID=null}setSessionToken(k,B){this._userID=k,this._token=B;const U=K.q.instance.prodigy.gameContainer.get("00d-b27e");U.setToken("token",this._token,!0,!1),U.setToken("auth-key",this._token,!0,!1),U.setToken("userID",`${this._userID}`,!1,!0)}isLoggedIn(){return j.Aq$.isDefined(this._token)&&this._token.length>0}getSessionToken(){return this._token}authenticateRequest(k){if(k.getMethod()===j.iXQ.Get)k.setQueryParameter("token",this._token),k.setQueryParameter("userID",`${this._userID}`);else if(k.getBody()instanceof j._A9){const B=k.getBody().getJson();B.token=this._token,B["auth-key"]=this._token,B.userID=`${this._userID}`}else if(k.getBody()instanceof te.c){const B=k.getBody().getJson();B.token=this._token,B["auth-key"]=this._token,B.userID=`${this._userID}`}else j.VyI.log("Could not append legacy authentication to web request",j.$bb.Warning)}logout(){this._token=null}getUserID(){return this._userID}};xw=(0,G.Cg)([(0,tt.injectable)()],xw);var Lw=U(57797),kw=U(92240),Bw=U(94310),Uw=U(32259);class Fw{constructor(k,B,U){this._assets=[],this._locations=[],this._overrideNames={},this._game=k,this._assets=B,this._locations=U}getOverrideName(k){var B;return null===(B=this._overrideNames[k])||void 0===B?void 0:B.map}getOverrideBattleBg(k){var B;return null===(B=this._overrideNames[k])||void 0===B?void 0:B.battleBg}getOverrideBgm(){}active(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;for(let U=0;U0}return!1}getButtons(){return[]}getAssets(k){return j.Aq$.isDefined(this.getOverrideName(k))?this._assets.concat(this.getOverrideName(k)):this._assets}init(k,B){return{}}applySkin(k,B){}cleanup(){}}var Gw=U(92946),jw=U(31589),$w=U(30065),Hw=U(47728);class Vw extends Fw{constructor(){super(...arguments),this._festivalHub="lamplight-B3",this.dailyDrops=[{type:"currency",ID:this.getFestivalCurrency(),N:22}],this.canDoDaily=new Map,this.afterBattleSpawn=[640,320],this.dailyEventSize=new j.I9Y(40,40),this.dailyHighlighterOffset=new j.I9Y(-40,0),this.currentWheelName="unknown-wheel"}getBattleDrops(k,B=1,U=0){const F=this.getFestivalCurrency(),G=k*B+U;return hf.R.addDebugMessage(`Festival currency ID ${F}: ${G}`),[{type:"currency",ID:F,N:G,R:1}]}init(k){this.playerDaily=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily;const B=K.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig();return(null==B?void 0:B.festivalDailyData)&&(this.festivalDailyData=B.festivalDailyData,this.festivalDailyData.dailyPlacements&&(this.dailyPlacements=this.festivalDailyData.dailyPlacements),this.festivalDailyData.dailyDrops&&(this.dailyDrops=this.festivalDailyData.dailyDrops)),(null==B?void 0:B.bossBattleModalData)&&(this.bossBattleModalData=B.bossBattleModalData),this.checkToRefreshDaily().catch(j.RQr.createHandler("Error checking the daily refresh")),K.q.instance.game.broadcaster.addAppListener(oi.n8.FestivalVideoClosed,this.onFestivalVideoClosed,this),{}}checkToRefreshDaily(){return(0,G.sH)(this,void 0,void 0,(function*(){this.playerDaily.isExpired(this.festivalName)&&(yield this.refreshDaily()),this.canDoDaily.set(Lw.je.Normal,!this.playerDaily.isDailyBattleComplete(Lw.je.Normal)&&this.checkStateKeyActiveState(Bw.L.DailyBattles)),this.canDoDaily.set(Lw.je.Boss,!this.playerDaily.isDailyBattleComplete(Lw.je.Boss)&&this.checkStateKeyActiveState(Bw.L.DailyBossBattles))}))}checkStateKeyActiveState(k){var B,U;const F=this.getStateDataFromKey(k);return null===(U=null===(B=null==F?void 0:F.active)||void 0===B?void 0:B.isActive)||void 0===U||U}getStateDataFromKey(k){var B,U;const F=K.q.instance.prodigy.gameContainer.get("99d-5e9e"),G=null===(B=F.getCachedFestivalQuestData())||void 0===B?void 0:B.getStates(),j=null===(U=F.getCachedFestivalQuestData())||void 0===U?void 0:U.getTasks().map((k=>k.taskProgress));return kw.h.calculateState(k,null!=G?G:[],null!=j?j:[])}applySkin(k,B){this.applyWheel(k)}spawnBossStatue(k,B,U,F){B.loadWithDependenciesFromGUID(Ei.l.TransformRelayObject,k.contentGameObject).then((j=>(0,G.sH)(this,void 0,void 0,(function*(){const G=yield B.loadWithDependenciesFromGUID(U,j);G.transform.setPosition(F.x,F.y),k.data.addCollisionZone(k,1050,100,150,180),G.findComponentInChildren(Bl.n).onClicked.add((()=>{this.openBossModalPrefabMenu()}))})))).catch(j.RQr.createHandler("Error loading NPC Boss Statue"))}openBossModalPrefabMenu(){const k=K.q.instance.prodigy.open.prefabMenu(Ei.l.BossBattleModal,void 0,!0,!0,!0);k.createContainer=!1,k.onPrefabLoaded.addOnce((k=>{k.findComponentInChildren(Gw.E).startDailyBossBattleCallback=()=>{this.startDailyBossBattle().catch(j.RQr.createHandler("Error starting a daily boss battle from the modal"))}}))}startDailyBossBattle(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!k.daily.getDailyBattleEncounter(Lw.je.Boss)){const B=yield ki.s.sampleRandomEncounter(this.festivalDailyData.bossEncounterEntity);B&&k.daily.setDailyBattleEncounter(Lw.je.Boss,B)}this.startDailyBattle("lamplight-B3",Lw.je.Boss).catch(j.RQr.createHandler("Error starting daily boss battle"))}))}refreshDaily(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const{normalPlacement:U,bossPlacement:F,normalEncounter:G,bossEncounter:j}=yield Hw.x.sampleDailyBattleData(this.festivalDailyData,k,B);if(U&&G||F&&j)this.dailyPlacements=this.dailyPlacements.filter((k=>k!==U||k!==F)),this.playerDaily.start(this.festivalName,this.festivalDailyData.battleCount,new Map([[Lw.je.Normal,U],[Lw.je.Boss,F]]),new Map([[Lw.je.Normal,G],[Lw.je.Boss,j]]),this.festivalDailyData.refreshIntervalHours);else{const k=K.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig();(null==k?void 0:k.festivalDailyData)&&(this.dailyPlacements=k.festivalDailyData.dailyPlacements)}}))}setIntroState(k,B,U=""){j.VyI.log("SetIntroState is Unimplemented",j.$bb.Warning)}signOnInputDown(k,B,U,F,G){var j;const $=K.q.instance.prodigy.gameContainer.get("12b-405a");K.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:"festival-signpost",destinationName:"festival-progression-window",interfaceName:"festival-progression-window",interfaceType:bi.Wm.Modal}),Object.values($w.Q).includes(null===(j=$.getActiveFestival())||void 0===j?void 0:j.type)?Hw.x.openFestivalProgressMenu(bi.$N.SignpostClick):K.q.instance.prodigy.open.message(k,B,U,F,null,G)}placeDaily(k,B,U){var F,G,j,$,H,V,W,q,z,Y,Q,X,Z,tt,et,it,st;const nt=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,at=nt.daily.getDailyBattlePlacement(U);let rt=null;if(null!==(F=this.canDoDaily.get(U))&&void 0!==F&&F&&(null==at?void 0:at.location.includes(B))){const F=at.position[0],ot=at.position[1];if(at.useSpine||U===Lw.je.Boss){let rt=J.Q.Spine_sparkle_2_json;if(U===Lw.je.Boss){const k=null===(j=null===(G=nt.daily.getDailyBattleEncounter(U))||void 0===G?void 0:G.boss)||void 0===j?void 0:j.ID,B=null===($=le.t.getItem("boss",k))||void 0===$?void 0:$.metadata;(null===(V=null===(H=null==B?void 0:B.assets)||void 0===H?void 0:H.battle)||void 0===V?void 0:V.assetKey)&&(rt=J.Q[null===(q=null===(W=null==B?void 0:B.assets)||void 0===W?void 0:W.battle)||void 0===q?void 0:q.assetKey])}else{const k=nt.daily.getDailyBattleEncounter(U),B=null===(z=le.t.getItem("pet",null==k?void 0:k.pets[0].ID))||void 0===z?void 0:z.metadata;(null===(Q=null===(Y=null==B?void 0:B.assets)||void 0===Y?void 0:Y.default)||void 0===Q?void 0:Q.assetKey)?rt=J.Q[null===(Z=null===(X=null==B?void 0:B.assets)||void 0===X?void 0:X.default)||void 0===Z?void 0:Z.assetKey]:(null===(et=null===(tt=null==B?void 0:B.assets)||void 0===tt?void 0:tt.default)||void 0===et?void 0:et.ID)&&(rt=null===(st=null===(it=null==B?void 0:B.assets)||void 0===it?void 0:it.default)||void 0===st?void 0:st.ID)}K.q.instance.prodigy.create.spineNPC(k.content,rt,"idle",F,ot,void 0,void 0,(()=>{this.revealDailyMonster(U,k,B)}),at.flip).name=`${U}Placement`}else rt=K.q.instance.prodigy.create.element(k.foreground,F,ot),rt.highlight(!0,this.dailyHighlighterOffset.x,this.dailyHighlighterOffset.y),rt.arrow.frameName="exclamation",k.addClickableEvent(F,ot,this.dailyEventSize.x,this.dailyEventSize.y,this.revealDailyMonster.bind(this,U,k,B,void 0),void 0,0)}return rt}revealDailyMonster(k,B,U,F){const G=null!=F?F:[0,0],$=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.getDailyBattlePlacement(k);if(!$)return void j.VyI.log(`No daily placement found for location: ${U}`,j.$bb.Warning);const H=$.position,V=K.q.instance.prodigy.event.create();this.afterBattleSpawn=[H[0]+G[0],H[1]+G[1]],V.validPath(B.user,B.path,this.afterBattleSpawn[0],this.afterBattleSpawn[1]),V.function(B.user.faceToward.bind(B.user,H[0])),V.enableInput(!1),V.bgm(null),V.sound(19,"monster"),V.function(B.user.chat.bind(B.user,1)),V.delay(2e3),V.enableInput(!0),V.function((()=>{this.startDailyBattle(U,k).catch(j.RQr.createHandler("Error starting the daily battle"))})),V.start()}startDailyBattle(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U,F,$,H;const V=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,W=V.daily.getDailyBattleEncounter(B);if(!W||!B)return void j.VyI.log(`No encounter or daily battle type found for daily battle at location: ${k}`,j.$bb.Error);const q=B===Lw.je.Boss?this.festivalDailyData.bossEncounterEntity:this.festivalDailyData.encounterEntity;V.daily.isFestivalDailyBattle=!0;const z=B===Lw.je.Boss?Ni.gu.FestivalDailyBoss:Ni.gu.FestivalDailyBattle,Y=W.drops?[...W.drops,...this.dailyDrops]:this.dailyDrops,X=Object.assign(Object.assign({},W),{screen:this.festivalDailyData.screen,pets:[...W.pets],bench:null==q?void 0:q.bench,drops:Y,revampBattleType:z});let Z=k;if(X.boss){const k=K.q.instance.prodigy.gameContainer.get("99d-5e9e"),B={params:{taskEventType:dh.Z7.Unit,unitType:Ni.uj.Boss,id:X.boss.ID,name:X.boss.name,nickname:X.boss.nickname,team:Q.ETeamId.Away}};if(this.festivalDailyData.mapOverrideTasks){const V=yield Promise.all(this.festivalDailyData.mapOverrideTasks.map((U=>(0,G.sH)(this,void 0,void 0,(function*(){return k.willFestivalTaskComplete(U,as.T.DEFEAT_UNIT,B)})))));(null==V?void 0:V.some(Boolean))&&j.Aq$.isDefined(this.festivalDailyData.mapOverrideLocation)&&(Z=null!==(F=null===(U=this.festivalDailyData.mapOverrideLocation)||void 0===U?void 0:U.mapKey)&&void 0!==F?F:Z,this.afterBattleSpawn=null!==(H=null===($=this.festivalDailyData.mapOverrideLocation)||void 0===$?void 0:$.coordinates)&&void 0!==H?H:this.afterBattleSpawn)}}K.q.instance.prodigy.battle.start(X,this.escape.bind(this,k),this.dailyBattleComplete.bind(this,Z,B),null,this._festivalHub),this._game.input.enabled=!0}))}escape(k){K.q.instance.prodigy.world.it(k,this.afterBattleSpawn[0],this.afterBattleSpawn[1])}dailyBattleComplete(k,B){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.playedBattle(B),this.refreshDaily(k,B).then((()=>{K.q.instance.prodigy.world.it(k,this.afterBattleSpawn[0],this.afterBattleSpawn[1])})).catch(j.RQr.createHandler("Error refreshing daily battles"))}openStore(k,B=!1){j.Aq$.isDefined(k)&&(B?K.q.instance.prodigy.open.legacyStore(k):K.q.instance.prodigy.open.store(k))}teleportToEvent(k){K.q.instance.prodigy.world.it(j.Aq$.isDefined(k)?k:this._festivalHub)}createHudButton(k,B){return K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("key",Vw.WORLD_MAP_ID)>0?{key:k,frameName:B,callback:()=>{this.onClickCallback()}}:null}onClickCallback(){Ta.i.isZoneLocked(hn.A_.LAMPLIGHT)?Ta.i.openLockMessage(hn.A_.LAMPLIGHT):K.q.instance.prodigy.open.prefabMenu(Ei.l.StayLeaveModalDialog).onPrefabLoaded.addOnce((k=>{k.findComponent(ff.R).setLocalizationKey("LAMPLIGHT_CONFIRM_TRAVEL");const B=new Uw.e;B.create(),B.configure(k),B.onSuccess.addOnce((()=>{K.q.instance.prodigy.open.menuCloseAll();const k=K.q.instance.prodigy.world.getCurrentZone();K.q.instance.prodigy.world.getZone(k).handleLeaving(In.j.teleport,(()=>{this.teleportToEvent()}))}))}))}getCurrentFestivalWheelId(k=6){const B=K.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig(),U=K.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival();if(!B||!U)return j.VyI.log("No active festival found",j.$bb.Warning),k;const F=Oc.R.getNow();for(const G of B.festivalPrizeWheels){const k=new Date(U.startDate);k.setDate(k.getDate()+G.startDateOffset);const B=new Date(U.startDate);if(B.setDate(B.getDate()+G.endDateOffset),k<=F&&B>=F)return this.playerDaily.currentWheelID=G.wheelId,this.playerDaily.currentWheelEndDate=B,G.wheelId}return k}applyWheel(k){var B,U,F,$,H,V;const W=K.q.instance.prodigy.gameContainer.get("12b-405a"),z=W.getFestivalConfig(),Y=null===(B=null==z?void 0:z.festivalPrizeWheels)||void 0===B?void 0:B.find((k=>k.wheelId===this.getCurrentFestivalWheelId()));if(!z||!Y)return void j.VyI.log("No festival config or wheel data found",j.$bb.Warning);const Q=null!==(U=Y.mapLocation)&&void 0!==U?U:"lamplight-B3",X=null!==(F=Y.position)&&void 0!==F?F:{x:78,y:70},Z=Y.wheelFrame?{atlas:Y.wheelAtlas,frame:Y.wheelFrame}:{atlas:q._.Event_summerfest_json,frame:"wheel-of-sun"};if(k.saveTag===Q){this.currentWheelName=null!==(V=null===(H=null===($=W.getFestivalConfig())||void 0===$?void 0:$.festivalPrizeWheels.find((k=>k.wheelId===this.getCurrentFestivalWheelId())))||void 0===H?void 0:H.name)&&void 0!==V?V:"wheel-of-sun-map-asset";const B=K.q.instance.prodigy.gameContainer.get("d0e-64fd");B.loadWithDependenciesFromGUID(Ei.l.TransformRelayObject,k.contentGameObject).then((U=>(0,G.sH)(this,void 0,void 0,(function*(){var F,G;Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(B,Ei.l.FestivalPrizeWheel,{customWheelId:this.getCurrentFestivalWheelId(),isWheelNewStateActive:null!==(F=this.playerDaily.isNewFestivalWheel)&&void 0!==F&&F,isWheelNpcActive:null===(G=Y.customWheelNpcUsed)||void 0===G||G}).then((B=>{B.parent=U,B.transform.setPosition(X.x,X.y),this.festivalPrizeWheelComponent=B.findComponentInChildren(jw.l),this.festivalPrizeWheelComponent.wheelGraphic.updateAsset(Z.atlas,Z.frame),this.festivalPrizeWheelComponent.wheelGraphic.sizeToSourceImage(),this.festivalPrizeWheelComponent.screen=k,this.updateWheelSparkles(this.festivalPrizeWheelComponent)})).catch(j.RQr.createHandler("Error loading Festival Prize Wheel prefab with injected values"))})))).catch(j.RQr.createHandler("Error loading Festival Prize Wheel prefab"))}}updateWheelSparkles(k){}getDailyElementSizeForSpinePlacements(k,B,U){var F;const G=null===(F=k.findComponent(Wn.v))||void 0===F?void 0:F.getCurrentDimensions();return G?(this.dailyEventSize.x=G.width,this.dailyEventSize.y=G.height,{dailyX:B-this.dailyEventSize.x/2,dailyY:U-this.dailyEventSize.y}):{dailyX:B,dailyY:U}}onFestivalVideoClosed(){this._questManagerHub.setupValidTasks().catch(j.RQr.createHandler("Error setting up quests after festival video closed"))}talkToShopkeeper(k,B,U,F,G){const j=new Ti.rD(this._game),$=K.q.instance.prodigy.breadcrumbManager,H=[],V=$.isBreadcrumbComplete(k,B),W=V?U:F;for(const q of W)H.push({dialogueData:j.dataProvider.get(q),blockInput:!0});V||H.push({callback:()=>{$.completeBreadcrumb(k,B)}}),j.addEvents(H),j.start(!0,(()=>this.openStore(G)))}cleanup(){super.cleanup(),K.q.instance.game.broadcaster.removeAppListener(oi.n8.FestivalVideoClosed,this.onFestivalVideoClosed,this)}}Vw.WORLD_MAP_ID=13,(0,G.Cg)([(0,Re.b)("a25-68f4"),(0,G.Sn)("design:type",As.n)],Vw.prototype,"_questManagerHub",void 0);var Ww=U(20706),qw=U(47101),Kw=U(80494);class zw extends Vw{constructor(k){super(k,[Rn.t.Tileset_town_october_night_png,Rn.t.Tileset_town_november_night_png,Rn.t.Tileset_town_new_night_png,Rn.t.Tileset_generic_new_night_png,Rn.t.Tileset_arena_gold_night_png,Rn.t.Tileset_forest_new_night_png,Rn.t.Tileset_firefly_new_night_png,q._.Event_pumpkinfest_json,q._.Npc_sprite_julia_ghoulia_json,J.Q.Spine_npc_julia_json,X.V.Bgm_pumpkinfest],["lamplight-A2","lamplight-A3","lamplight-A4","lamplight-B0","lamplight-B1","lamplight-B2","lamplight-B3","lamplight-B4","lamplight-B5","lamplight-C2","lamplight-C3","lamplight-C3-arena","lamplight-C4"]),this.festivalName="Pumpkinfest",this.adID=5,this._overrideNames={"lamplight-A2":{map:qw.N.Map_lamplight_a2_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-A3":{map:qw.N.Map_lamplight_a3_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-A4":{map:qw.N.Map_lamplight_a4_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-B0":{map:qw.N.Map_lamplight_b0_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-B1":{map:qw.N.Map_lamplight_b1_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-B2":{map:qw.N.Map_lamplight_b2_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-B3":{map:qw.N.Map_lamplight_b3_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-B4":{map:qw.N.Map_lamplight_b4_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-B5":{map:qw.N.Map_lamplight_b5_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-C2":{map:qw.N.Map_lamplight_c2_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-C3":{map:qw.N.Map_lamplight_c3_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight},"lamplight-C4":{map:qw.N.Map_lamplight_c4_pumpkinfest_json,battleBg:Kw.t.BattleLamplightOutsidePumpkinFestNight}},this.dailyPlacements=[{location:"lamplight-A2",position:[440,440],pathOffset:[-30,80],pumpkin:3,type:Lw.k$.Any},{location:"lamplight-A3",position:[980,292],indicatorOffsetX:-20,pathOffset:[90,140],pumpkin:5,type:Lw.k$.Any},{location:"lamplight-A4",position:[1160,320],pathOffset:[-40,40],pumpkin:4,type:Lw.k$.Any},{location:"lamplight-B2",position:[140,220],indicatorOffsetX:-20,pathOffset:[70,80],pumpkin:5,type:Lw.k$.Any},{location:"lamplight-B3",position:[400,600],indicatorOffsetX:5,pathOffset:[0,-50],pumpkin:2,type:Lw.k$.Any},{location:"lamplight-B4",position:[1080,320],pathOffset:[-40,120],pumpkin:1,type:Lw.k$.Any},{location:"lamplight-B5",position:[480,240],pathOffset:[-40,100],pumpkin:3,type:Lw.k$.Any},{location:"lamplight-C2",position:[760,360],indicatorOffsetX:5,pathOffset:[-30,100],pumpkin:2,type:Lw.k$.Any},{location:"lamplight-C3-arena",position:[280,360],pathOffset:[-30,100],pumpkin:1,type:Lw.k$.Any},{location:"lamplight-C4",position:[1e3,440],pathOffset:[-30,100],pumpkin:4,type:Lw.k$.Any}],this.canDoDaily.set(Lw.je.Normal,!1)}getButtons(){return[this.createHudButton(q._.General_icons_hud_json,"pumpkinfest-0")]}getBattleDrops(k){return super.getBattleDrops(k).concat([{type:"item",ID:126,N:1,R:.33},{type:"item",ID:125,N:1,R:.33}])}getFestivalCurrency(){return 2}init(k){return super.init(k),k.addPostFilter(new Ww.L(1114163,16772812)),{bgmID:26}}getOverrideBgm(){return X.V.Bgm_pumpkinfest}applySkin(k){super.applySkin(k);const B=q._.Event_pumpkinfest_json,U=k.saveTag,F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),$=K.q.instance.prodigy.gameContainer.get("d0e-64fd");if("lamplight-B3"===U){const U=k.background.addChild(K.q.instance.prodigy.create.sprite(640,250,B,"event-sign"));U.anchor.set(.5,1),U.inputEnabled=!0,U.events.onInputDown.add(this.signOnInputDown.bind(this,F.getText("PUMPKINFEST_SIGN_MESSAGE"),null,null,F.getText("PUMPKINFEST_SIGN_TITLE"))),k.data.addCollisionZone(k,600,160,100,80),$.loadWithDependenciesFromGUID(Ei.l.TransformRelayObject,k.foregroundGameObject).then((B=>(0,G.sH)(this,void 0,void 0,(function*(){(yield $.loadWithDependenciesFromGUID(Ei.l.Npc_kandi_korn,B)).transform.setPosition(890,530),k.data.addCollisionZone(k,840,420,120,120)})))).catch(j.RQr.createHandler("Error loading Kandi Korn")),$.loadWithDependenciesFromGUID(Ei.l.TransformRelayObject,k.foregroundGameObject).then((B=>(0,G.sH)(this,void 0,void 0,(function*(){(yield $.loadWithDependenciesFromGUID(Ei.l.Npc_kandi_kart,B)).transform.setPosition(930,390),k.data.addCollisionZone(k,940,420,240,240)})))).catch(j.RQr.createHandler("Error loading Kandi's Kart")),$.loadWithDependenciesFromGUID(Ei.l.TransformRelayObject,k.contentGameObject).then((B=>(0,G.sH)(this,void 0,void 0,(function*(){(yield $.loadWithDependenciesFromGUID(Ei.l.NPCGnomeStylist,B)).transform.setPosition(270,570),k.data.addCollisionZone(k,240,500,90,90)})))).catch(j.RQr.createHandler("Error loading NPC Gnome Stylist")),this.spawnBossStatue(k,$,Ei.l.PumpkinfestBossStatue,new j.I9Y(1105,125))}$.loadWithDependenciesFromGUID(Ei.l.Particle_fog_pumpkinfest,k.uiLayerGameObject).catch(j.RQr.createHandler("Error loading Fog prefab"));const H=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.get("zone-lamplight");j.Aq$.isDefined(H)&&j.Aq$.isDefined(H.quest)&&H.quest.ID>1&&(this.placeDaily(k,K.q.instance.prodigy.world.getCurrentMap(),Lw.je.Normal),this.placeDaily(k,K.q.instance.prodigy.world.getCurrentMap(),Lw.je.Boss))}updateWheelSparkles(k){k.moveSparkleEffect(5,-25)}talkToShopkeeper(){const k=new Ti.rD(this._game),B=K.q.instance.prodigy.breadcrumbManager,U=ln.B.FEATURE_PUMPKINFEST_CUTSCENES,F=ln.B.BREADCRUMB_PUMPKINFEST_INTRO;B.isBreadcrumbComplete(U,F)?k.addEvents([{dialogueData:k.dataProvider.get(910),blockInput:!0}]):k.addEvents([{dialogueData:k.dataProvider.get(905),blockInput:!0},{dialogueData:k.dataProvider.get(906),blockInput:!0},{dialogueData:k.dataProvider.get(907),blockInput:!0},{dialogueData:k.dataProvider.get(908),blockInput:!0},{dialogueData:k.dataProvider.get(909),blockInput:!0},{callback:()=>{B.completeBreadcrumb(U,F)}}]),k.start(!0,(()=>{K.q.instance.prodigy.open.store(14)}))}revealDailyMonster(k,B,U){var F;let G;const j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.getDailyBattlePlacement(k);j&&(G=null!==(F=j.pathOffset)&&void 0!==F?F:[0,0],super.revealDailyMonster(k,B,U,G))}}var Yw=U(45224);class Qw extends Vw{constructor(k){super(k,[Rn.t.Tileset_town_new_png,q._.Event_starlight_festival_json,Rn.t.Tileset_springfest_png,X.V.Bgm_spring_fest],["lamplight-A1","lamplight-A2","lamplight-A3","lamplight-A4","lamplight-B1","lamplight-B2","lamplight-B3","lamplight-B4","lamplight-B5","lamplight-C2","lamplight-C3-arena","lamplight-C3","lamplight-C4","lamplight-D3"]),this.festivalName="Springfest",this.b3FishLayerStates={1:!1,2:!1,3:!1,4:!0},this.adID=100,this._overrideNames={"lamplight-A1":{map:qw.N.Map_lamplight_a1_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest},"lamplight-A2":{map:qw.N.Map_lamplight_a2_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest},"lamplight-A3":{map:qw.N.Map_lamplight_a3_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest},"lamplight-B2":{map:qw.N.Map_lamplight_b2_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest},"lamplight-B3":{map:qw.N.Map_lamplight_b3_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest},"lamplight-B4":{map:qw.N.Map_lamplight_b4_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest},"lamplight-C2":{map:qw.N.Map_lamplight_c2_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest},"lamplight-C3":{map:qw.N.Map_lamplight_c3_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest},"lamplight-C4":{map:qw.N.Map_lamplight_c4_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest},"lamplight-D3":{map:qw.N.Map_lamplight_d3_springfest_json,battleBg:Kw.t.BattleLamplightOutsideSpringfest}},this.dailyPlacements=[{location:"lamplight-A2",position:[1080,640],pathOffset:[0,-60],type:Lw.k$.Any},{location:"lamplight-A3",position:[40,440],pathOffset:[70,30],type:Lw.k$.Any},{location:"lamplight-A4",position:[120,600],pathOffset:[40,-40],type:Lw.k$.Any},{location:"lamplight-B2",position:[440,520],pathOffset:[20,-50],type:Lw.k$.Any},{location:"lamplight-B3",position:[80,680],pathOffset:[50,-50],type:Lw.k$.Any},{location:"lamplight-B4",position:[960,600],pathOffset:[0,-20],type:Lw.k$.Any},{location:"lamplight-B5",position:[40,360],pathOffset:[40,-5],type:Lw.k$.Any},{location:"lamplight-C2",position:[40,520],pathOffset:[90,40],type:Lw.k$.Any},{location:"lamplight-C3-arena",position:[280,600],pathOffset:[90,30],type:Lw.k$.Any},{location:"lamplight-C4",position:[360,120],pathOffset:[-90,68],type:Lw.k$.Any}],this.dailyHighlighterOffset.x=-55,this.dailyHighlighterOffset.y=-15}init(k){return super.init(k),{bgmID:X.V.Bgm_spring_fest}}getFestivalCurrency(){return 17}getOverrideBgm(){return X.V.Bgm_spring_fest}getButtons(){return[this.createHudButton(q._.General_icons_hud_json,"springfest")]}applySkin(k){super.applySkin(k);const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=q._.Event_starlight_festival_json,F=k.saveTag,$=B.state.get("zone-lamplight"),H=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);if(j.Aq$.isDefined($)&&j.Aq$.isDefined($.quest)&&$.quest.ID>1){const B=this.placeDaily(k,F,Lw.je.Normal);j.Aq$.isDefined(B)&&B.add(K.q.instance.prodigy.create.sprite(-14,0,q._.General_icons_json,"eggpile"))}switch(k.saveTag){case Yw.f.TOWN_CENTRE:const B=k.content.addChild(K.q.instance.prodigy.create.sprite(640,250,U,"event-sign-1"));B.anchor.set(.5,1),B.inputEnabled=!0,B.events.onInputDown.add(this.signOnInputDown.bind(this,H.getText("SPRINGFEST_SIGN_MESSAGE"),null,null,H.getText("SPRINGFEST_SIGN_TITLE"),{modifyProperty:[{element:"contentText",property:"horizontalAlignment",value:"center"}]})),B.animations.add("sway",["event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-2","event-sign-3","event-sign-1","event-sign-4","event-sign-5","event-sign-6"],12,!0,!1),B.animations.play("sway",void 0,!0);const F=this._weekendEvents.getActiveFestival(),$=j.Aq$.isDefined(F)?new Date(F.endDate).getTime()-Date.now():0;Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Ei.l.GrottoPortal,{TIME_REMAINING:$},k.contentGameObject).then((k=>(0,G.sH)(this,void 0,void 0,(function*(){k.transform.setPosition(1100,110)})))).catch(j.RQr.createHandler("Error loading Grotto Portal"));break;case Yw.f.BARGO_ZONE:this.addNpc(Ei.l.BargoNPC,320,280,this.talkToBargo);break;case Yw.f.VERNA_ZONE:this.addNpc(Ei.l.VernaNPC,1150,490,this.talkToVerna);break;case Yw.f.HARRIET_ZONE:this.addNpc(Ei.l.HarrietNPC,800,460,this.talkToHarriet),this._game.broadcaster.addAppListener(oi.J8.PlayerEditingMenuClosed,this.bunnyEquipmentUpdate.bind(this),this,this._game);break;case Yw.f.DON_ZORRO_ZONE:this.addNpc(Ei.l.DonZorroNPC,800,420,this.talkToDonZorro),this._game.broadcaster.addAppListener(oi.J8.PlayerEditingMenuClosed,this.foxEquipmentUpdate.bind(this),this,this._game)}}addNpc(k,B,U,F){K.q.instance.prodigy.prefabFactory.addPrefabNPC(k,B,U).then((k=>{k.findComponentInChildren(Bl.n).onClicked.add(F,this)})).catch(j.RQr.createHandler(`Springfest: Unable to load the NPC Prefab: ${k}`))}revealDailyMonster(k,B,U){var F;let G;const j=this.dailyPlacements.find((k=>k.location===U));j&&(G=null!==(F=j.pathOffset)&&void 0!==F?F:[0,0],super.revealDailyMonster(k,B,U,G))}talkToBargo(){const k=new Ti.rD(this._game),B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.equipment.getHat();$.indexOf(Yw.f.BUNNY_HATS,B)>-1?k.addEvents([{dialogueData:k.dataProvider.get(816),blockInput:!0},{callback:()=>{K.q.instance.prodigy.world.it(Yw.f.HARRIET_ZONE,1050,600)}}]):$.indexOf(Yw.f.FOX_HATS,B)>-1?k.addEvents([{dialogueData:k.dataProvider.get(815),blockInput:!0}]):k.addEvents([{dialogueData:k.dataProvider.get(812),blockInput:!0},{dialogueData:k.dataProvider.get(813),blockInput:!0},{dialogueData:k.dataProvider.get(814),blockInput:!0}]),k.start(!0)}talkToVerna(){const k=new Ti.rD(this._game),B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.equipment.getHat();$.indexOf(Yw.f.FOX_HATS,B)>-1?k.addEvents([{dialogueData:k.dataProvider.get(811),blockInput:!0},{callback:()=>{K.q.instance.prodigy.world.it(Yw.f.DON_ZORRO_ZONE,100,460)}}]):$.indexOf(Yw.f.BUNNY_HATS,B)>-1?k.addEvents([{dialogueData:k.dataProvider.get(810),blockInput:!0}]):k.addEvents([{dialogueData:k.dataProvider.get(808),blockInput:!0},{dialogueData:k.dataProvider.get(809),blockInput:!0}]),k.start(!0)}talkToHarriet(){const k=new Ti.rD(this._game),B=K.q.instance.prodigy.breadcrumbManager,U=ln.B.FEATURE_SPRINGFEST_CUTSCENES,F=ln.B.BREADCRUMB_FIRST_SPRINGFEST_HARRIET_HOOD_CLICK;B.isBreadcrumbComplete(U,F)?k.addEvents([{dialogueData:k.dataProvider.get(805),blockInput:!0},{dialogueData:k.dataProvider.get(806),blockInput:!0},{dialogueData:k.dataProvider.get(807),blockInput:!0}]):k.addEvents([{dialogueData:k.dataProvider.get(798),blockInput:!0},{dialogueData:k.dataProvider.get(799),blockInput:!0},{dialogueData:k.dataProvider.get(800),blockInput:!0},{dialogueData:k.dataProvider.get(801),blockInput:!0},{dialogueData:k.dataProvider.get(802),blockInput:!0},{dialogueData:k.dataProvider.get(803),blockInput:!0},{dialogueData:k.dataProvider.get(804),blockInput:!0},{callback:()=>{B.completeBreadcrumb(U,F)}}]);k.start(!0,(()=>{this.openStore(25)}))}talkToDonZorro(){const k=new Ti.rD(this._game),B=K.q.instance.prodigy.breadcrumbManager,U=ln.B.FEATURE_SPRINGFEST_CUTSCENES,F=ln.B.BREADCRUMB_FIRST_SPRINGFEST_DON_ZORRO_CLICK;B.isBreadcrumbComplete(U,F)?k.addEvents([{dialogueData:k.dataProvider.get(792),blockInput:!0},{dialogueData:k.dataProvider.get(793),blockInput:!0},{dialogueData:k.dataProvider.get(794),blockInput:!0}]):k.addEvents([{dialogueData:k.dataProvider.get(785),blockInput:!0},{dialogueData:k.dataProvider.get(786),blockInput:!0},{dialogueData:k.dataProvider.get(787),blockInput:!0},{dialogueData:k.dataProvider.get(788),blockInput:!0},{dialogueData:k.dataProvider.get(789),blockInput:!0},{dialogueData:k.dataProvider.get(790),blockInput:!0},{dialogueData:k.dataProvider.get(791),blockInput:!0},{callback:()=>{B.completeBreadcrumb(U,F)}}]);k.start(!0,(()=>{this.openStore(24)}))}bunnyEquipmentUpdate(){this.checkEquipmentUpdate(Yw.f.BUNNY_HATS,[812,814],Yw.f.BARGO_ZONE,300,300)}foxEquipmentUpdate(){this.checkEquipmentUpdate(Yw.f.FOX_HATS,[808,809],Yw.f.VERNA_ZONE,1050,510)}checkEquipmentUpdate(k,B,U,F,G){const j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.equipment.getHat();-1===$.indexOf(k,j)&&(this._game.broadcaster.removeAppListener(oi.J8.PlayerEditingMenuClosed,this,this._game),this.forceLeaveEvent(B,U,F,G))}forceLeaveEvent(k,B,U,F){const G=new Ti.rD(this._game);G.addEvents([{dialogueData:G.dataProvider.get(k[0]),blockInput:!0},{dialogueData:G.dataProvider.get(k[1]),blockInput:!0}]),G.start(!0,(()=>{K.q.instance.prodigy.world.it(B,U,F)}))}}(0,G.Cg)([(0,Re.b)("12b-405a"),(0,G.Sn)("design:type",Qe.n)],Qw.prototype,"_weekendEvents",void 0),(0,G.Cg)([(0,Re.b)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],Qw.prototype,"_prefabLoader",void 0);class Xw extends Vw{constructor(k){super(k,[Rn.t.Tileset_town_november_png,q._.Event_starlight_festival_json,q._.Npc_sprite_mama_star_json,X.V.Bgm_starlight_festival],["lamplight-A2","lamplight-A3","lamplight-A4","lamplight-B0","lamplight-B1","lamplight-B2","lamplight-B3","lamplight-B4","lamplight-B5","lamplight-C2","lamplight-C3","lamplight-C3-arena","lamplight-C4"]),this.festivalName=Qe.R.StarlightFestival,this.adID=1,this.defaultNames={"lamplight-A2":"map-lamplight-a2","lamplight-A3":"map-lamplight-a3","lamplight-A4":"map-lamplight-a4","lamplight-B0":"map-lamplight-b0","lamplight-B1":"map-lamplight-b1","lamplight-B2":"map-lamplight-b2","lamplight-B3":"map-lamplight-b3","lamplight-B4":"map-lamplight-b4","lamplight-B5":"map-lamplight-b5","lamplight-C2":"map-lamplight-c2","lamplight-C3-arena":"map-lamplight-c3-arena","lamplight-C4":"map-lamplight-c4"},this._overrideNames={"lamplight-A2":{map:qw.N.Map_lamplight_a2_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-A3":{map:qw.N.Map_lamplight_a3_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-A4":{map:qw.N.Map_lamplight_a4_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-B0":{map:qw.N.Map_lamplight_b0_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-B1":{map:qw.N.Map_lamplight_b1_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-B2":{map:qw.N.Map_lamplight_b2_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-B3":{map:qw.N.Map_lamplight_b3_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-B4":{map:qw.N.Map_lamplight_b4_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-B5":{map:qw.N.Map_lamplight_b5_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-C2":{map:qw.N.Map_lamplight_c2_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-C3":{map:qw.N.Map_lamplight_c3_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight},"lamplight-C4":{map:qw.N.Map_lamplight_c4_starlight_festival_json,battleBg:Kw.t.BattleLamplightOutsideStarlight}},this.dailyPlacements=[{location:"lamplight-A2",position:[1080,640],pathOffset:[0,-60],type:Lw.k$.Any},{location:"lamplight-A3",position:[40,440],pathOffset:[70,30],type:Lw.k$.Any},{location:"lamplight-A4",position:[120,600],pathOffset:[40,-40],type:Lw.k$.Any},{location:"lamplight-B2",position:[440,520],pathOffset:[20,-50],type:Lw.k$.Any},{location:"lamplight-B3",position:[80,680],pathOffset:[50,-50],type:Lw.k$.Any},{location:"lamplight-B4",position:[960,600],pathOffset:[0,-20],type:Lw.k$.Any},{location:"lamplight-B5",position:[40,360],pathOffset:[40,-5],type:Lw.k$.Any},{location:"lamplight-C2",position:[40,520],pathOffset:[90,40],type:Lw.k$.Any},{location:"lamplight-C3-arena",position:[280,600],pathOffset:[90,30],type:Lw.k$.Any},{location:"lamplight-C4",position:[360,120],pathOffset:[-90,68],type:Lw.k$.Any}],this.dailyHighlighterOffset.x=-55}getFestivalCurrency(){return 4}getButtons(){return[this.createHudButton(q._.General_icons_hud_json,"starlight-festival")]}init(k){var B,U;super.init(k);const F=k.saveTag.split("-")[1],G="B3"!==F?[1,0]:[2,3],j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,$=(null===(B=this.canDoDaily.get(Lw.je.Normal))||void 0===B||B)&&k.saveTag===(null===(U=j.daily.getDailyBattlePlacement(Lw.je.Normal))||void 0===U?void 0:U.location);return k.zone.getMap(F).enableLayerID(G[0],$),k.zone.getMap(F).enableLayerID(G[1],!$),{bgmID:24}}getOverrideBgm(){return X.V.Bgm_starlight_festival}applySkin(k){super.applySkin(k),this.setCutsceneSpawn(k),this.placeDaily(k,K.q.instance.prodigy.world.getCurrentMap(),Lw.je.Normal),this.placeDaily(k,K.q.instance.prodigy.world.getCurrentMap(),Lw.je.Boss);const B=K.q.instance.prodigy.gameContainer.get("d0e-64fd");B.loadWithDependenciesFromGUID(Ei.l.StarfallController,k.uiLayerGameObject).catch(j.RQr.createHandler("Error loading Starfall prefab")),"lamplight-B3"===k.saveTag&&this.setupLamplightB3(k,B)}setupLamplightB3(k,B){const U=q._.Event_starlight_festival_json,F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),$=k.content.addChild(K.q.instance.prodigy.create.sprite(640,250,U,"event-sign-1"));$.anchor.set(.5,1),$.inputEnabled=!0,$.events.onInputDown.add(this.signOnInputDown.bind(this,F.getText("STARLIGHT_SIGN_MESSAGE"),null,null,F.getText("STARLIGHT_SIGN_TITLE"),{modifyProperty:[{element:"contentText",property:"horizontalAlignment",value:"center"}]})),$.animations.add("sway",["event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-1","event-sign-2","event-sign-3","event-sign-1","event-sign-4","event-sign-5","event-sign-6"],12,!0,!1),$.animations.play("sway",void 0,!0),Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(B,Ei.l.Npc_imani_star,{},k.contentGameObject).then((B=>(0,G.sH)(this,void 0,void 0,(function*(){B.transform.setPosition(872,481),k.data.addCollisionZone(k,822,371,90,132)})))).catch(j.RQr.createHandler("Error loading NPC Imani Star")),Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(B,Ei.l.Npc_milkyway,{},k.contentGameObject).then((B=>(0,G.sH)(this,void 0,void 0,(function*(){B.transform.setPosition(1020,581),k.data.addCollisionZone(k,970,461,140,172)})))).catch(j.RQr.createHandler("Error loading NPC Milkyway")),B.loadWithDependenciesFromGUID(Ei.l.TransformRelayObject,k.contentGameObject).then((U=>(0,G.sH)(this,void 0,void 0,(function*(){(yield B.loadWithDependenciesFromGUID(Ei.l.NPCGnomeStylist,U)).transform.setPosition(270,570),k.data.addCollisionZone(k,240,500,90,90)})))).catch(j.RQr.createHandler("Error loading NPC Gnome Stylist")),this.spawnBossStatue(k,B,Ei.l.NPCBossStatue,new j.I9Y(1100,125))}talkToShopkeeper(){const k=new Ti.rD(this._game),B=K.q.instance.prodigy.breadcrumbManager,U=ln.B.FEATURE_STARLIGHT_CUTSCENES,F=ln.B.BREADCRUMB_STARLIGHT_INTRO;B.isBreadcrumbComplete(U,F)?k.addEvents([{dialogueData:k.dataProvider.get(591),blockInput:!0},{dialogueData:k.dataProvider.get(592),blockInput:!0}]):k.addEvents([{dialogueData:k.dataProvider.get(593),blockInput:!0},{dialogueData:k.dataProvider.get(594),blockInput:!0},{dialogueData:k.dataProvider.get(595),blockInput:!0},{dialogueData:k.dataProvider.get(596),blockInput:!0},{dialogueData:k.dataProvider.get(597),blockInput:!0},{callback:()=>{B.completeBreadcrumb(U,F)}}]),k.start(!0,(()=>{this.openStore(13)}))}revealDailyMonster(k,B,U){var F;let G;const j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.getDailyBattlePlacement(k);j&&(G=null!==(F=j.pathOffset)&&void 0!==F?F:[0,0],super.revealDailyMonster(k,B,U,G))}getOverrideName(k){var B,U,F;const G=K.q.instance.prodigy.gameContainer.get("99d-5e9e"),j=null===(B=G.getCachedFestivalQuestData())||void 0===B?void 0:B.getStates(),$=null===(U=G.getCachedFestivalQuestData())||void 0===U?void 0:U.getTasks().map((k=>k.taskProgress)),H=kw.h.calculateState(Bw.L.MapOverride,null!=j?j:[],null!=$?$:[]);return(null===(F=null==H?void 0:H.active)||void 0===F?void 0:F.isActive)?super.getOverrideName(k):this.defaultNames[k]}setCutsceneSpawn(k){const B=this.getStateDataFromKey(Bw.L.InitialCutsceneSpawn);if(this.applyMapCoordinates(B,k))return;const U=this.getStateDataFromKey(Bw.L.FinalCutsceneSpawn);this.applyMapCoordinates(U,k)}applyMapCoordinates(k,B){return!(!(null==k?void 0:k.mapCoordinates)||B.saveTag!==k.mapCoordinates.mapKey)&&(B.user.position.x=k.mapCoordinates.coordinates[0],B.user.position.y=k.mapCoordinates.coordinates[1],B.user.faceToward(k.mapCoordinates.faceTowards),!0)}}var Zw=U(75214);class Jw extends Vw{constructor(k){super(k,[Rn.t.Tileset_town_new_png,q._.Event_starlight_festival_json,q._.Event_summerfest_json,Rn.t.Tileset_town_summerfest_png,X.V.Bgm_summerfest],["lamplight-A1","lamplight-A2","lamplight-A3","lamplight-A4","lamplight-B1","lamplight-B2","lamplight-B3","lamplight-B4","lamplight-B5","lamplight-C2","lamplight-C3","lamplight-C3-arena","lamplight-C4"]),this.festivalName="Summerfest",this.adID=3,this._overrideNames={"lamplight-A2":{map:qw.N.Map_lamplight_a2_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-A3":{map:qw.N.Map_lamplight_a3_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-A4":{map:qw.N.Map_lamplight_a4_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-B0":{map:qw.N.Map_lamplight_b0_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-B1":{map:qw.N.Map_lamplight_b1_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-B2":{map:qw.N.Map_lamplight_b2_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-B3":{map:qw.N.Map_lamplight_b3_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-B4":{map:qw.N.Map_lamplight_b4_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-B5":{map:qw.N.Map_lamplight_b5_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-C2":{map:qw.N.Map_lamplight_c2_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-C3":{map:qw.N.Map_lamplight_c3_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest},"lamplight-C4":{map:qw.N.Map_lamplight_c4_summerfest_json,battleBg:Kw.t.BattleLamplightOutsideSummerfest}},this.dailyPlacements=[{location:"lamplight-A2",position:[184,350],pathPosition:[180,367],type:Lw.k$.Any},{location:"lamplight-A3",position:[206,614],pathPosition:[275,607],type:Lw.k$.Any},{location:"lamplight-A4",position:[674,352],pathPosition:[747,382],type:Lw.k$.Any},{location:"lamplight-B2",position:[896,264],pathPosition:[822,286],flip:!0,type:Lw.k$.Any},{location:"lamplight-B4",position:[317,378],pathPosition:[296,411],type:Lw.k$.Any},{location:"lamplight-B5",position:[962,265],pathPosition:[911,285],type:Lw.k$.Any},{location:"lamplight-C2",position:[804,450],pathPosition:[730,472],flip:!0,type:Lw.k$.Any},{location:"lamplight-C3-arena",position:[1130,430],pathPosition:[1051,465],flip:!0,type:Lw.k$.Any},{location:"lamplight-C4",position:[1036,475],pathPosition:[958,497],flip:!0,type:Lw.k$.Any}];for(const B of[50,51])for(const k of le.t.getItem("itemTable",B).data.items)le.t.getItem(k.type,k.ID).data.member=0}init(k){return super.init(k),{bgmID:25}}getOverrideBgm(){return X.V.Bgm_summerfest}getFestivalCurrency(){return 20}getButtons(){const k=[];return k.push(this.createHudButton(q._.General_icons_hud_json,"summerfest")),k}applySkin(k,B){super.applySkin(k,B);const U=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);if(this.placeDaily(k),"lamplight-B3"===k.saveTag){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_SUMMERFEST_CUTSCENES,ln.B.BREADCRUMB_SUMMERFEST_INTRO)){if(ti.U.progressData.step===Ze.B.NotStarted&&F.hasFoundAllKeystones())return void jn.E.runAllKeystonesSequenceOnMapSetup((()=>(0,G.sH)(this,void 0,void 0,(function*(){return B.playScene("summerfestIntro")}))));if(tf.J.meetsNarrativeIntroRequirements)return;return void B.playScene("summerfestIntro")}this.addSign(k,U);const j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily,$=new Zw.p(this._game,"NPC_NAME_ATHENA",166,Kn.ac.Merchant,k.content,1096,300,"idle",void 0,void 0,void 0,{instance_id:j.getFestivalInstanceName(),instance_type:37});$.flip(),$.onClick.add(this.openShop,this);new Zw.p(this._game,"NPC_NAME_KOI",167,Kn.ac.WheelGiver,k.content,310,300,"idle",void 0,void 0,void 0,{instance_id:j.getFestivalInstanceName(),instance_type:this.currentWheelName}).onClick.add((()=>{this.openSunWheel()}));new Zw.p(this._game,"NPC_NAME_MIST",168,Kn.ac.Merchant,k.content,594,550,"idle",void 0,void 0,void 0,{instance_id:j.getFestivalInstanceName(),instance_type:38}).onClick.add(this.openStylist,this);const H=new Zw.p(this._game,"NPC_NAME_MIZU",169,Kn.ac.WheelGiver,k.content,686,550,"idle",void 0,void 0,void 0,{instance_id:j.getFestivalInstanceName(),instance_type:38});H.flip(),H.onClick.add(this.openNicknamer,this)}}addSign(k,B){K.q.instance.prodigy.create.spineNPC(k.content,165,"animation",639,258,void 0,void 0,(()=>{this.signOnInputDown(B.getText("SUMMERFEST_SIGN_MESSAGE"),null,null,B.getText("SUMMERFEST_SIGN_TITLE"),{modifyProperty:[{element:"contentText",property:"horizontalAlignment",value:"center"}]})}),!1)}openShop(){const k=new Ti.rD(this._game);k.addEvents([{dialogueData:k.dataProvider.get(902),blockInput:!0}]),k.start(!0,(()=>{this.openStore(37)}))}openSunWheel(){var k,B;const U=ln.B.FEATURE_SUMMERFEST_CUTSCENES,F=ln.B.BREADCRUMB_FIRST_SUMMERFEST_WHEEL_CLICK;if(K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(U,F))null===(B=this.festivalPrizeWheelComponent)||void 0===B||B.openWheel();else{const B=new Ti.rD(this._game);B.addEvents([{dialogueData:B.dataProvider.get(867),blockInput:!0},{dialogueData:B.dataProvider.get(868),blockInput:!0},{dialogueData:B.dataProvider.get(869),blockInput:!0}]),B.start(!0,null===(k=this.festivalPrizeWheelComponent)||void 0===k?void 0:k.openWheel.bind(this.festivalPrizeWheelComponent))}}openStylist(){const k=new Ti.rD(this._game),B=ln.B.FEATURE_SUMMERFEST_CUTSCENES,U=ln.B.BREADCRUMB_FIRST_SUMMERFEST_STYLIST_CLICK;K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(B,U)?k.addEvents([{dialogueData:k.dataProvider.get(882),blockInput:!0}]):k.addEvents([{dialogueData:k.dataProvider.get(878),blockInput:!0},{dialogueData:k.dataProvider.get(879),blockInput:!0},{dialogueData:k.dataProvider.get(880),blockInput:!0},{dialogueData:k.dataProvider.get(881),blockInput:!0},{callback:()=>{K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(B,U)}}]),k.start(!0,(()=>{K.q.instance.prodigy.open.legacyStore(38)}))}openNicknamer(){const k=new Ti.rD(this._game),B=ln.B.FEATURE_SUMMERFEST_CUTSCENES,U=ln.B.BREADCRUMB_FIRST_SUMMERFEST_NICKNAMER_CLICK;K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(B,U)?k.addEvents([{dialogueData:k.dataProvider.get(886),blockInput:!0}]):k.addEvents([{dialogueData:k.dataProvider.get(883),blockInput:!0},{dialogueData:k.dataProvider.get(884),blockInput:!0},{dialogueData:k.dataProvider.get(885),blockInput:!0},{dialogueData:k.dataProvider.get(886),blockInput:!0},{callback:()=>{K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(B,U)}}]),k.start(!0,(()=>{const k="summerfest",B=K.q.instance.prodigy.gameContainer.get("dcf-fcf7"),U=B.isAvailable(k)?B.getNicknameData(k):[],F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer;K.q.instance.prodigy.open.nicknamer(U,F,k)}))}placeDaily(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.getDailyBattlePlacement(Lw.je.Normal);if(B&&B.location===k.saveTag&&this.canDoDaily.get(Lw.je.Normal)){const U=B.position;this.addApplepot(U[0],U[1],k,B.flip)}}addApplepot(k,B,U,F=!1){let G;const $=K.q.instance.prodigy.create.spineNPC(U.content,156,"idle",k,B,void 0,void 0,(()=>{this.moveToApplepot(U,$,G)}));$.name="Applepot",$.legacyTransform.group.scale.x=F?-1:1;const H=$.findComponentInChildren(Wn.v),V=()=>{G=$.legacyTransform.group.addChild(K.q.instance.prodigy.create.sprite(0,-$.legacyTransform.group.height,q._.General_icons_json,"exclamation")),G.anchor.set(.5,1),this._game.add.tween(G,this).to({y:G.y+10},400,j.GS3.Quadratic.InOut,!0,0,-1,!0)};H.isLoaded?V():H.OnLoaded.addOnce(V)}moveToApplepot(k,B,U){var F;const G=this.dailyPlacements.find((B=>B.location===k.saveTag));if(!G)return void j.VyI.log("No daily placement found for this screen",j.$bb.Error);const $=G.position,H=null!==(F=G.pathPosition)&&void 0!==F?F:[0,0];this.afterBattleSpawn=H;const V=K.q.instance.prodigy.event.create();V.validPath(k.user,k.path,H[0],H[1]),V.function(k.user.faceToward.bind(k.user,$[0])),V.function((()=>{this.startApplepotBattle(k,B,U)})),V.start()}startApplepotBattle(k,B,U){K.q.instance.prodigy.audio.pauseBGM(),K.q.instance.prodigy.audio.playSFX(19,"monster"),K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer.evtProc=!0,this._game.input.enabled=!1,U.destroy(),K.q.instance.prodigy.effects.chatBubble(B.legacyTransform.group),this._game.add.tween(B.legacyTransform,this).to({y:B.legacyTransform.group.y-20},300,j.GS3.Quadratic.Out).to({y:B.legacyTransform.group.y},300,j.GS3.Quadratic.In).to({},100,j.GS3.Linear.None,!0).onTweenComplete.addOnce((()=>{this.startDailyBattle(k.saveTag,Lw.je.Normal)}))}}class tT extends Vw{constructor(k){super(k,[Rn.t.Tileset_town_december_png,q._.Event_winterfest_json,q._.Npc_sprite_howard_cornelius_json,X.V.Bgm_winterfest],["lamplight-A2","lamplight-A3","lamplight-A4","lamplight-B1","lamplight-B2","lamplight-B3","lamplight-B4","lamplight-B5","lamplight-C2","lamplight-C3-arena","lamplight-C3","lamplight-C4"]),this.festivalName="Winterfest",this.adID=6,this._overrideNames={"lamplight-A2":{map:qw.N.Map_lamplight_a2_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-A3":{map:qw.N.Map_lamplight_a3_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-A4":{map:qw.N.Map_lamplight_a4_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-B1":{map:qw.N.Map_lamplight_b1_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-B2":{map:qw.N.Map_lamplight_b2_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-B3":{map:qw.N.Map_lamplight_b3_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-B4":{map:qw.N.Map_lamplight_b4_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-B5":{map:qw.N.Map_lamplight_b5_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-C2":{map:qw.N.Map_lamplight_c2_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-C3":{map:qw.N.Map_lamplight_c3_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest},"lamplight-C4":{map:qw.N.Map_lamplight_c4_winterfest_json,battleBg:Kw.t.BattleLamplightOutsideWinterfest}},this.dailyPlacements=[{location:"lamplight-A2",position:[920,160],pathOffset:[120,180],type:Lw.k$.Any},{location:"lamplight-A3",position:[200,520],pathOffset:[155,100],type:Lw.k$.Any},{location:"lamplight-A4",position:[880,80],pathOffset:[130,170],type:Lw.k$.Any},{location:"lamplight-B2",position:[160,120],pathOffset:[130,170],type:Lw.k$.Any},{location:"lamplight-B3",position:[480,120],pathOffset:[-10,170],type:Lw.k$.Any},{location:"lamplight-B4",position:[120,200],pathOffset:[-20,180],type:Lw.k$.Any},{location:"lamplight-B5",position:[1120,240],pathOffset:[-50,140],type:Lw.k$.Any},{location:"lamplight-C2",position:[1040,320],pathOffset:[-30,160],type:Lw.k$.Any},{location:"lamplight-C3-arena",position:[560,520],pathOffset:[-30,80],type:Lw.k$.Any},{location:"lamplight-C4",position:[1040,320],pathOffset:[-10,170],type:Lw.k$.Any}],this.dailyEventSize.x=120,this.dailyEventSize.y=160,this.dailyHighlighterOffset.x=-10}getFestivalCurrency(){return 5}getButtons(){return[this.createHudButton(q._.General_icons_hud_json,"winterfest")]}getOverrideBgm(){return X.V.Bgm_winterfest}init(k){var B,U;super.init(k);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=k.saveTag.split("-")[1],j=(null===(B=this.canDoDaily.get(Lw.je.Normal))||void 0===B||B)&&k.saveTag===(null===(U=F.daily.getDailyBattlePlacement(Lw.je.Normal))||void 0===U?void 0:U.location);return"B3"!==G?k.zone.getMap(G).enableLayerID(1,j):k.zone.getMap(G).enableLayerID(2,j),{bgmID:13}}applySkin(k){super.applySkin(k),K.q.instance.prodigy.create.snow(k.foregroundGameObject);const B=q._.Event_winterfest_json,U=k.saveTag,F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),$=K.q.instance.prodigy.gameContainer.get("d0e-64fd");if("lamplight-B3"===U){const U=k.content.addChild(K.q.instance.prodigy.create.sprite(640,250,B,"event-sign-1"));U.anchor.set(.5,1),U.inputEnabled=!0,U.events.onInputDown.add(this.signOnInputDown.bind(this,F.getText("WINTERFEST_SIGN_MESSAGE"),null,null,F.getText("WINTERFEST_SIGN_TITLE"))),U.animations.add("sway",["event-sign-1","event-sign-2","event-sign-3","event-sign-4","event-sign-5","event-sign-6","event-sign-7","event-sign-8","event-sign-9","event-sign-10","event-sign-11","event-sign-12","event-sign-13","event-sign-14","event-sign-15","event-sign-16"],10,!0,!1),U.animations.play("sway",void 0,!0),$.loadWithDependenciesFromGUID(Ei.l.TransformRelayObject,k.foregroundGameObject).then((B=>(0,G.sH)(this,void 0,void 0,(function*(){(yield Ja.d.loadWithInjectedValuesAndDependenciesFromGUID($,Ei.l.HowardCorneliusNPC,{})).transform.setPosition(1024,540),k.data.addCollisionZone(k,840,420,120,120)})))).catch(j.RQr.createHandler("Error loading Howard Cornelius NPC")),this.spawnBossStatue(k,$,Ei.l.WinterfestBossStatue,new j.I9Y(1105,125))}const H=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.get("zone-lamplight");j.Aq$.isDefined(H)&&j.Aq$.isDefined(H.quest)&&H.quest.ID>1&&(this.placeDaily(k,K.q.instance.prodigy.world.getCurrentMap(),Lw.je.Normal),this.placeDaily(k,K.q.instance.prodigy.world.getCurrentMap(),Lw.je.Boss))}revealDailyMonster(k,B,U){var F;let G;const j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.getDailyBattlePlacement(k);j&&(G=null!==(F=j.pathOffset)&&void 0!==F?F:[0,0],super.revealDailyMonster(k,B,U,G))}}class eT extends Vw{getFestivalCurrency(){return 31}constructor(k){super(k,[Rn.t.Tileset_town_moonfest_night_png,Rn.t.Tileset_generic_moonfest_night_png,Rn.t.Tileset_moonlight_extras_night_png,Rn.t.Tileset_firefly_new_png,Rn.t.Tileset_forest_new_night_png,Rn.t.Tileset_collisions_png,q._.Npc_sprite_gnome_json,q._.Event_moonlightfest_json,q._.Zone_lamplight_json,X.V.Bgm_moonlight_fest,Z.c.Sfx_lamplight],["lamplight-A2","lamplight-A3","lamplight-A4","lamplight-B0","lamplight-B1","lamplight-B2","lamplight-B3","lamplight-B4","lamplight-B5","lamplight-C2","lamplight-C3","lamplight-C3-arena","lamplight-C4"]),this.festivalName=Qe.R.MoonlightFestival,this._overrideNames={"lamplight-A2":{map:qw.N.Map_moonlight_a2_json,battleBg:Kw.t.BattleMoonlight},"lamplight-A3":{map:qw.N.Map_moonlight_a3_json,battleBg:Kw.t.BattleMoonlight},"lamplight-A4":{map:qw.N.Map_moonlight_a4_json,battleBg:Kw.t.BattleMoonlight},"lamplight-B0":{map:qw.N.Map_moonlight_b0_json,battleBg:Kw.t.BattleMoonlight},"lamplight-B1":{map:qw.N.Map_moonlight_b1_json,battleBg:Kw.t.BattleMoonlight},"lamplight-B2":{map:qw.N.Map_moonlight_b2_json,battleBg:Kw.t.BattleMoonlight},"lamplight-B3":{map:qw.N.Map_moonlight_b3_json,battleBg:Kw.t.BattleMoonlight},"lamplight-B4":{map:qw.N.Map_moonlight_b4_json,battleBg:Kw.t.BattleMoonlight},"lamplight-B5":{map:qw.N.Map_moonlight_b5_json,battleBg:Kw.t.BattleMoonlight},"lamplight-C2":{map:qw.N.Map_moonlight_c2_json,battleBg:Kw.t.BattleMoonlight},"lamplight-C3":{map:qw.N.Map_moonlight_c3_json,battleBg:Kw.t.BattleMoonlight},"lamplight-C4":{map:qw.N.Map_moonlight_c4_json,battleBg:Kw.t.BattleMoonlight}},this.dailyPlacements=[]}init(k){return super.init(k),{bgmID:X.V.Bgm_moonlight_fest}}getOverrideBgm(){return X.V.Bgm_moonlight_fest}applySkin(k){super.applySkin(k);const B=k.saveTag;if(this.placeDaily(k,K.q.instance.prodigy.world.getCurrentMap(),Lw.je.Normal),this.placeDaily(k,K.q.instance.prodigy.world.getCurrentMap(),Lw.je.Boss),"lamplight-B3"!==B)return;const U=this._weekendEvents.getActiveFestival(),F=ve.A.isDefined(U)?new Date(U.endDate).getTime()-Date.now():0;Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Ei.l.MoonPortal,{TIME_REMAINING:F},k.contentGameObject).then((k=>(0,G.sH)(this,void 0,void 0,(function*(){k.transform.setPosition(640,130)})))).catch(j.RQr.createHandler("Error loading Moon Portal")),this._prefabLoader.loadWithDependenciesFromGUID(Ei.l.TransformRelayObject,k.contentGameObject).then((B=>(0,G.sH)(this,void 0,void 0,(function*(){(yield this._prefabLoader.loadWithDependenciesFromGUID(Ei.l.NPCGnomeStylist,B)).transform.setPosition(230,570),k.data.addCollisionZone(k,200,500,90,90)})))).catch(j.RQr.createHandler("Error loading NPC Gnome Stylist")),K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.SelenaNPC,970,560).then((B=>{k.data.addCollisionZone(k,920,420,100,160)})).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.SelenaNPC}`)),this.spawnBossStatue(k,this._prefabLoader,Ei.l.MoonlightBossStatue,new j.I9Y(1105,125))}}(0,G.Cg)([(0,Re.b)("12b-405a"),(0,G.Sn)("design:type",Qe.n)],eT.prototype,"_weekendEvents",void 0),(0,G.Cg)([(0,Re.b)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],eT.prototype,"_prefabLoader",void 0);class iT extends Fw{constructor(k){super(k,[],["shipwreck_shore-A2","shipwreck_shore-A3","shipwreck_shore-A5","shipwreck_shore-A7","shipwreck_shore-B5","shipwreck_shore-B6","shipwreck_shore-B7","shipwreck_shore-B8","shipwreck_shore-B10","shipwreck_shore-B13","shipwreck_shore-C6","shipwreck_shore-C7","shipwreck_shore-C8","shipwreck_shore-C9"])}init(k){if(!Tn.J.isAvgFrameRateAboveThreshold(Vt.s.get("GameConstants.Build.SKIN_FOREGROUND_FPS_THRESHOLD_LIMIT")))return{};this.bubbles=[];const B=this._game.width,U=this._game.height;for(let F=0;F<5;F++){const F=k.foreground.addChild(K.q.instance.prodigy.create.sprite(wn.o.integerInRange(0,B),wn.o.integerInRange(0,U),q._.Skin_underwater_json,"tiny-bubble"));this.initBubble(F,!0,B),this.bubbles.push(F)}return{}}initBubble(k,B,U){if(!j.Aq$.isDefined(this._game))return;let F=wn.o.integerInRange(0,2e3)+5e3;k.x=wn.o.integerInRange(0,U),B?(k.y=wn.o.integerInRange(70,770),F-=Math.floor(F/770*k.y)):k.y=770,this._game.add.tween(k,this).to({x:"-=10"},1e3,j.GS3.Sinusoidal.InOut).to({x:"+=10"},1e3,j.GS3.Sinusoidal.InOut).loop(!0).start();const G=this._game.add.tween(k,this).to({y:-50},F,j.GS3.Linear.None);G.onTweenComplete.addOnce(this.initBubble.bind(this,k,!1,U)),G.start()}cleanup(){if(this.bubbles){for(let k=0;k180&&(this.randomizePosition(),this.count=0)}cleanup(){for(let k=0;kK.q.instance.game.broadcaster.broadcast(oi.bv.FestivalInitialized))).catch(j.RQr.createHandler("Error applying festival"))}))}createFestival(k){return new[Qw,Jw,zw,tT,Xw,eT][k](this.game)}getButtons(){let k=[];for(let B=0;B{super.handleLeaving(k,B)}))}else super.handleLeaving(k,B)}teleport(k,B,U,F,G){j.Aq$.isDefined(this.mapConfig)?(this.map=new gT.M(this,this.assets,this.mapConfig),this.maps={[k]:this.map},super.teleport(k,B,U,F,G),this.loadingData.fadeIn=!0,this.loadingData.fadeOut=!0,this.loadingData.time=200):this.enterDungeon()}enterDungeon(k){this.generatorConfig=K.q.instance.prodigy.gameContainer.get("aaa-9186").getDungeon(2),j.Aq$.isDefined(bn.B.getLastDungeonRun(this.game,this.ID))||(this.generatorConfig=K.q.instance.prodigy.gameContainer.get("aaa-9186").getDungeon(3)),this.sendArchivesRunSegmentEvents("Archives Run Started"),super.enterDungeon(k)}exitDungeon(k=null){this.consumeTargetCollectible(k),K.q.instance.prodigy.world.it("academy-GH3",815,480)}consumeTargetCollectible(k=null){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=B.backpack.hasItem("currency",18);B.backpack.consume("currency",18,U),j.Aq$.isDefined(this.generatorConfig)&&this.sendArchivesRunSegmentEvents("Achievement Completed",U)}get goalCollected(){return K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("currency",18)}sendArchivesRunSegmentEvents(k,B=0){const U=K.q.instance.prodigy.gameContainer.get("c47-20b6");switch(k){case"Archives Run Started":U.playerMovementAndDiscovery.sendArchivesRunStartedEvent();break;case"Achievement Completed":U.playerMovementAndDiscovery.sendArchivesRunCompletedEvent(B)}}}mT.RUN_COOLDOWN=36e5;var yT=U(28085);class _T extends $n.Z{constructor(k,B){super(k,"titan",B.concat([q._.Npc_sprite_noot_json,Z.c.Sfx_titan,q._.Boss_titan_json])),this.titanMap="",this._spineContainer=null,this._noot=null,this._titanSpine=null,this._isStarted=!1,this.loadingData.time=1,this.loadingData.fadeIn=!1,this.loadingData.fadeOut=!1}setup(k,B,U){super.setup(k,B,U),B.user.x=250,B.user.y=400,B.user.hideName(),ti.U.isStepComplete(Ze.B.PuppetMasterDefeated)||(this._puppetMaster=new Zw.p(k,"NPC_NAME_PUPPETMASTER",J.Q.Spine_npc_puppetmaster_json,Kn.ac.Boss,B.content,800,350,"idle",null,!0)),this._spineContainer=K.q.instance.prodigy.create.element(B.content,1100,400),this._spineContainer.scale.x*=-1,this._noot=B.addNPC(180,320,q._.Npc_sprite_noot_json),this._noot.float(!0),this._noot.walkSpeed=2,this._noot.visible=!0,pn.K.cacheAsset(this.game,q._.Npc_sprite_noot_json,pn.K.zoneAssetsCached),this.game.broadcaster.addAppListener(oi.RZ.GotTitans,this.gotTitanCallback.bind(this),this,"Titan"),j.Aq$.isDefined(K.q.instance.prodigy.titansNetworkHandler.titan)?this.gotTitanCallback(K.q.instance.prodigy.titansNetworkHandler.titan):K.q.instance.prodigy.titansNetworkHandler.getTitans().catch(j.RQr.createHandler("Error fetching data for titans"))}start(k,B){if(this._isStarted)return;this._isStarted=!0,super.start(k,B);const U=K.q.instance.prodigy.event.create(),F=!ti.U.isStepComplete(Ze.B.PuppetMasterDefeated);if(U.enableInput(!1),U.function(this.enterScene.bind(this,k,B)),U.delay(2e3),K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.BREADCRUMB_TITAN_INTRO,ln.B.BREADCRUMB_TITAN_WATCHED_INTRO)){U.enableInput(!0),F?U.text(13,"puppetmaster"):U.text(290,"noot"),U.enableInput(!1),U.sound(21,"cloud");const G=500,j=12;for(let F=0;F{this.enterTitan(k)})),U.delay(100),U.enableInput(!0),F?U.text(14,"puppetmaster"):U.text(291,"noot"),U.enableInput(!1),F&&U.functionCallback(this.exitMaster.bind(this,k,B,1480,-200)),U.enableInput(!0)}else{F&&(U.enableInput(!0),U.text(10,"puppetmaster"),U.enableInput(!1),U.validPath(this._noot,B.path,530,370),U.hop(this._noot,200,0,100),U.hop(this._noot,200,0,100),U.enableInput(!0),U.text(178,"noot"),U.enableInput(!1),U.enableInput(!0),U.text(11,"puppetmaster"),U.enableInput(!1)),U.sound(21,"cloud");const G=500,j=12;for(let F=0;F{this.enterTitan(k)})),U.delay(100),U.enableInput(!0),F?U.text(12,"puppetmaster"):U.text(291,"noot"),U.enableInput(!1),F&&U.functionCallback(this.exitMaster.bind(this,k,B,1480,-200)),U.validPath(this._noot,B.path,380,320),U.enableInput(!0),U.text(179,"noot"),U.text(180,"noot"),U.text(181,"noot"),U.text(182,"noot"),U.text(183,"noot")}U.function(this.end.bind(this,k)),U.start()}end(k){K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.BREADCRUMB_TITAN_INTRO,ln.B.BREADCRUMB_TITAN_WATCHED_INTRO),K.q.instance.prodigy.world.it(this.titanMap)}enterTitan(k){k.add.tween(this._spineContainer,this).to({alpha:1},200,j.GS3.Linear.None,!0,0,0,!1)}exitMaster(k,B,U,F,G){this._puppetMaster.flip();k.add.tween(this._puppetMaster,this).to({x:U,y:F},1e3,j.GS3.Linear.None).start().onTweenComplete.add(G)}gotTitanCallback(k){const B=le.t.getItem("titan",k.assetID).data;this.titanMap=`${B.zone}-Titan`,this.game.broadcaster.removeAppListener(oi.RZ.GotTitans,this,"Titan"),this._titanSpine=this.game.add.spine(0,0,Ut.E.getTitanSpine(k.assetID)),this._titanSpine.setAnimationByName(0,"idle",!0),this._spineContainer.add(this._titanSpine),this._spineContainer.alpha=0}cleanup(){(0,bc.QQ)(K.q.instance.game,!0),this._noot&&(this._noot.destroy(),this._noot=null),this._puppetMaster&&(this._puppetMaster.destroy(),this._puppetMaster=null),this._spineContainer&&(this._spineContainer.destroy(),this._spineContainer=null),this._titanSpine&&(this._titanSpine.destroy(),this._titanSpine=null),super.cleanup()}}var ET,wT=U(34574);class TT extends Ar.H{constructor(k,B,U,F,G,$,H=!1){super(k,B,U,F),this._nameText=null;const V=K.q.instance.prodigy.gameContainer,W=V.get(j.$Bt.LocalizationService);this.segment=V.get("c47-20b6"),this.clickCallback=$,this.npcSprite=K.q.instance.prodigy.create.sprite(0,0,G.atlasGuid,0,void 0,this.onTextureLoaded.bind(this)),this.npcSprite.inputEnabled=!0,this.npcSprite.anchor.set(.5,1),this.npcSprite.events.onInputDown.add(this.onNPCClick.bind(this,W.getText(G.name)),this),H&&(this.npcSprite.scale.x=-1),this.add(this.npcSprite),this.showIndicator(G),this.showName(G.name),this.segment.gameWorld.sendNpcDiscoveredEvent({npc_name:W.getText(null==G?void 0:G.name),npc_type:this instanceof ST?Kn.ac.Merchant:Kn.ac.QuestGiver,x_coord:U,y_coord:F,npc_animation_id:"idle"})}onNPCClick(k){j.Aq$.isDefined(this.clickCallback)&&(this.segment.gameWorld.sendNpcClickedEvent({npc_name:k,npc_type:this instanceof ST?Kn.ac.Merchant:Kn.ac.QuestGiver}),this.clickCallback())}onTextureLoaded(k){k&&(k.animations.addIfFound("stand",["npc_0","npc_1","npc_2","npc_3","npc_4","npc_5","npc_6","npc_7"],10,!0),k.animations.play("stand",void 0,!0))}showName(k){this._nameText?this._nameText.setText(k):this._nameText=K.q.instance.prodigy.create.nameFont(this,0,0-this.npcSprite.height-20,k)}showIndicator(k){this.indicator=TT.createIndicator(k),this.indicator&&(this.indicator.y=-(this.npcSprite.height+20),this.add(this.indicator),this.game.add.tween(this.indicator,this).to({y:this.indicator.y-20},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0))}static createIndicator(k){if(!k)return null;const B=j.Aq$.isDefined(k.indicator);if(!B&&!k.indicatorBacking)return null;let U=null;if(k.indicatorBacking)for(let F=TT.INDICATOR_BACKING_LAYERS.length;--F>=0;){const B=K.q.instance.prodigy.create.sprite(0,0,q._.General_icons_json,TT.INDICATOR_BACKING_LAYERS[F]);B.anchor.set(.5,1),F===TT.INDICATOR_BACKING_COLORABLE_LAYER&&j.Aq$.isDefined(k.indicatorBackingColor)&&(B.tint=k.indicatorBackingColor),U&&B.addChild(U),U=B}if(B){const B=K.q.instance.prodigy.create.sprite(0,0,q._.General_icons_json,k.indicator);B.anchor.set(.5,1),k.indicatorOffsetY&&(B.y+=k.indicatorOffsetY),U?U.addChild(B):U=B}return U}}TT.INDICATOR_BACKING_LAYERS=["npc-icon-base","npc-icon-square","npc-icon-square-tint"],TT.INDICATOR_BACKING_COLORABLE_LAYER=2;class ST extends TT{constructor(k,B,U,F,G,j,$,H,V=!1){const W=Object.assign({atlasGuid:q._.Npc_sprite_merchant_json,name:"NPC_NAME_MERCHANT"},ST.DEFAULT_INDICATOR_CONFIG);super(k,B,U,F,W,null,V),this.requirementsID=H,this.storeID=G,this.storeName=j,this.currencyID=$,this.clickCallback=()=>{this.showDialogue()},this.showName(this.localization.getText("NPC_NAME_MERCHANT")),this.showIndicator(W)}showDialogue(){const k=le.t.getItem("currency",this.currencyID);if(this.featureRequirements.meetsRequirementsDeprecated(this.requirementsID))this.showPrompt();else{const B=K.q.instance.prodigy.dialogue.create();B.setText({text:this.localization.getText("STORE_CURRENCY_LOCKED",k.data.name),face:0}),B.startDeprecated("merchant")}}showPrompt(){const k=K.q.instance.prodigy.dialogue.create(),B=`${this.storeName}_${ph.B.Dialogue}`;this.segment.featureCommon.sendInterfaceEvent({interfaceName:B,interfaceType:bi.Wm.DialogBox,instanceType:Ai.N.Interface,originType:bi.$N.NpcClick}),k.setText({text:this.localization.getText("STORE_PROMPT_WELCOME",this.localization.getText(this.storeName)),face:0,yes:()=>{this.sendDialogueSegmentEvents(jh.k.Shop,B),k.close(),K.q.instance.prodigy.open.store(this.storeID)},no:()=>{this.sendDialogueSegmentEvents(jh.k.NotNow,B),k.close()},type:Ti.fA.STORE}),k.startDeprecated("merchant")}sendDialogueSegmentEvents(k,B){this.segment.featureCommon.sendButtonEvent({buttonName:k,interfaceName:B,interfaceType:bi.Wm.DialogBox,saveClickInfo:k}),this.segment.featureCommon.sendInterfaceEvent({interfaceName:B,interfaceType:bi.Wm.DialogBox,instanceType:Ai.N.Interface,closeMethod:bi.Lv.ButtonClick})}showIndicator(k){this.requirementsID>=0&&this.featureRequirements.meetsRequirementsDeprecated(this.requirementsID)&&super.showIndicator(k)}}ST.DEFAULT_INDICATOR_CONFIG={indicatorBacking:!0,indicatorBackingColor:16764305,indicator:"merchant-icon",indicatorOffsetY:-25},(0,G.Cg)([(0,j.fFd)("db5-fb6e"),(0,G.Sn)("design:type",Object)],ST.prototype,"featureRequirements",void 0),(0,G.Cg)([(0,j.fFd)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],ST.prototype,"localization",void 0),function(k){k.TitanMapEntered="Titan-Map-Entered",k.TitanCatapultClicked="Titan-Catapult-Clicked",k.TitanClicked="Titan-Clicked",k.TitanSeen="titan_seen",k.CrystalClicked="crystal_clicked",k.TeamInitiated="team_initiated",k.TeamFormed="team_formed",k.TeamJoined="team_joined",k.CoOpBattleStarted="coop_battle_started",k.CoOpBattleHostLeft="coop_battle_host_left"}(ET||(ET={}));var AT=U(65443),CT=U(12676),OT=U(14088);class IT extends OT.h{constructor(k,B,U,F){super(k,54,B),this.onCloseClick=new j.HN0,this.currentTeamHandler=null,this.currentTeamHandler=F,this.hostInfo=U,this.onLoadComplete.add(this.setupButtons,this),this.onLoadComplete.add(this.renderHost,this),this.currentTeamHandler.OnTeamLeft.add(this.destroy,this),this.currentTeamHandler.OnHostDisbanded.add(this.destroy,this)}createUIElements(){super.createUIElements(),this.closeButton=this.getUiElement("closeButton"),this.friendCircle=this.getUiElement("friendCircle"),this.bodyText=this.getUiElement("bodyText")}setupButtons(){this.closeButton.onUpCallback=()=>{this.onCloseClick.dispatch()},this.closeButton.setInputBlockPriority(Ia.z.LOBBY)}renderHost(){const k=this.game.add.graphics(0,0);k.beginFill(0),k.drawCircle(75,75,75),k.endFill(),this.friendCircle.add(k),this.friendCircle.mask=k;const B=new Oe.a(this.game);B.init(this.hostInfo);const U=K.q.instance.prodigy.create.player(this.friendCircle,B,1,80,130,!1,{isPreview:!0,hideMount:!0});U.forceWeaponVisual=!0,U.reload();const F=K.q.instance.prodigy.gameContainer.resolve(La.C);F.init(B.appearance.getName()),this.bodyText.setText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COOP_GUEST_BANNER_BODY",F.getName()))}destroy(){this.onCloseClick.dispose(),this.currentTeamHandler.OnTeamLeft.remove(this.destroy,this),this.currentTeamHandler.OnHostDisbanded.remove(this.destroy,this),super.destroy()}}class DT extends OT.h{constructor(k,B,U,F){super(k,58,B),this.guestID=null,this.currentTeamHandler=null,this.guestID=U,this.currentTeamHandler=F,this.currentTeamHandler.OnTeamLeft.add(this.destroy,this),this.currentTeamHandler.CurrentTeam.OnTeamMemberLeft.add(this.onPlayerLeave,this)}onPlayerLeave(k){k===this.guestID&&this.destroy()}destroy(){this.currentTeamHandler.OnTeamLeft.remove(this.destroy,this),this.currentTeamHandler.IsOnTeam&&this.currentTeamHandler.CurrentTeam.OnTeamMemberLeft.remove(this.onPlayerLeave,this),super.destroy()}}class RT extends OT.h{get OnClose(){return this.onClose}constructor(k,B,U){super(k,53,B),this.onStartClick=new j.HN0,this.onCloseClick=new j.HN0,this.teammateIcons=[],this.onClose=new j.HN0,this.currentTeamHandler=null,this.currentTeam=null,this.currentTeamHandler=U,this.currentTeam=U.CurrentTeam,this.onLoadComplete.add(this.setupButtons,this),this.currentTeamHandler.OnTeamLeft.add(this.teamWasDisbanded,this),this.currentTeam.OnTeamMemberJoined.add(this.updateReadyIcons,this),this.currentTeam.OnTeamMemberLeft.add(this.updateReadyIcons,this),this.currentTeam.OnTeamMemberReady.add(this.updateReadyIcons,this)}createUIElements(){super.createUIElements(),this.startButton=this.getUiElement("startButton"),this.closeButton=this.getUiElement("closeButton"),this.teammateIcons=[this.getUiElement("teammate1"),this.getUiElement("teammate2"),this.getUiElement("teammate3")],this.updateReadyIcons()}setupButtons(){this.startButton.onUpCallback=()=>{this.onStartClick.dispatch()},K.q.instance.prodigy.gameContainer.get("2e2-6ee6").setBlockType(this.startButton.button.image.input,Ia.z.LOBBY),this.closeButton.onUpCallback=()=>{this.onCloseClick.dispatch()},this.closeButton.setInputBlockPriority(Ia.z.LOBBY)}destroy(){this.onStartClick.dispose(),this.onCloseClick.dispose(),this.onClose.dispose(),this.currentTeamHandler.OnTeamLeft.remove(this.teamWasDisbanded,this),this.currentTeam.OnTeamMemberJoined.remove(this.updateReadyIcons,this),this.currentTeam.OnTeamMemberLeft.remove(this.updateReadyIcons,this),this.currentTeam.OnTeamMemberReady.remove(this.updateReadyIcons,this),super.destroy()}teamWasDisbanded(){this.onClose.dispatch(),this.destroy()}updateReadyIcons(){for(let k=0;k=this.currentTeam.ReadyMembers.length?this.teammateIcons[k].setImageFrameName("Images/icon-teammate-off"):this.teammateIcons[k].setImageFrameName("Images/icon-teammate-on");this.startButton.setVisible(this.currentTeam.ReadyMembers.length>1)}}var PT=U(51931);class MT{get OnTeamHosted(){return this.onTeamHosted}get OnTeamJoined(){return this.onTeamJoined}get OnHostDisbanded(){return this.onHostDisbanded}get OnTeamLeft(){return this.onTeamLeft}get OnTeamJoinFailed(){return this.onTeamJoinFailed}get CurrentTeam(){return this.currentTeam}get IsHosting(){return this.isHosting}get IsOnTeam(){return null!==this.currentTeam}get IsJoining(){return this.isJoining}constructor(k,B,U,F){this.ct=null,this.remoteLogger=null,this.onTeamHosted=new j.HN0,this.onTeamJoined=new j.HN0,this.onHostDisbanded=new j.HN0,this.onTeamLeft=new j.HN0,this.onTeamJoinFailed=new j.HN0,this.currentTeam=null,this.player=null,this.isHosting=!1,this.isJoining=!1,this.time=null,this.time=k,this.ct=U,this.player=B,this.remoteLogger=F,this.ct.OnSocketMessage.add(this.handleMessage,this),this.ct.OnPlayerLeftSignal.add(this.handlePlayerLeave,this),this.ct.OnPlayerListSignal.add(this.playerListReceived,this)}hostTeam(){if(null===this.currentTeam){this.currentTeam=new wT.d,this.currentTeam.MaxTeamSize=MT.MAX_CO_OP_TEAM_SIZE,this.currentTeam.HostID=this.player.userID,this.currentTeam.addPlayer(this.player.userID),this.isHosting=!0,this.player.coOpTeam=this.currentTeam,this.onTeamHosted.dispatch(),this.currentTeam.OnTeamMemberJoined.add(this.broadcastTeamUpdate,this),this.currentTeam.OnTeamMemberLeft.add(this.broadcastTeamUpdate,this),this.currentTeam.OnTeamMemberReady.add(this.broadcastTeamUpdate,this);const k={action:Pa.x.HostTeam,data:{hostID:this.currentTeam.HostID,teamMembers:this.currentTeam.TeamMembers,readyMembers:this.currentTeam.ReadyMembers,streak:this.currentTeam.Streak}};this.ct.emitMessage(k)}else j.VyI.log("Active player is in a team. Cannot host another one.",j.$bb.Warning)}joinTeam(k){const B={action:Pa.x.RequestJoinTeam,target:k};this.ct.emitMessage(B),this.isJoining=!0,this.time.events.addTimer(5e3,(()=>{this.isJoining=!1,this.IsOnTeam||this.onTeamJoinFailed.dispatch(wT.T.Timeout)}),this)}rejoinTeam(k,B,U,F){this.IsOnTeam?j.VyI.log("Cannot rejoin a team while being on a team",j.$bb.Warning):(this.currentTeam=new wT.d,this.currentTeam.HostID=k,this.currentTeam.MaxTeamSize=MT.MAX_CO_OP_TEAM_SIZE,this.currentTeam.TeamMembers=B.slice(),this.currentTeam.ReadyMembers=U.slice(),this.currentTeam.Streak=F,this.isHosting=k===this.player.userID,this.player.coOpTeam=this.currentTeam,this.player.userID===k?(this.currentTeam.OnTeamMemberJoined.add(this.broadcastTeamUpdate,this),this.currentTeam.OnTeamMemberLeft.add(this.broadcastTeamUpdate,this),this.currentTeam.OnTeamMemberReady.add(this.broadcastTeamUpdate,this),this.onTeamHosted.dispatch()):this.onTeamJoined.dispatch())}leaveTeam(){if(this.IsOnTeam){if(this.isHosting){const k={action:Pa.x.TeamDisbanded,data:{hostID:this.player.userID}};this.ct.emitMessage(k)}else{const k={action:Pa.x.PlayerLeftTeam,target:this.currentTeam.HostID};this.ct.emitMessage(k)}this.currentTeam.destroy(),this.currentTeam=null,this.isHosting=!1,this.player.coOpTeam=null,this.onTeamLeft.dispatch()}else j.VyI.log("Cannot leave because active player is not in a team",j.$bb.Warning)}startMatch(k,B,U){if(this.IsHosting){const F=this.player.appearance,G=this.player.equipment,j={userID:this.player.userID,level:this.player.data.level,chargedLevelData:this.player.data.chargedLevelData,appearance:{hair:{style:F.getHair().style,color:F.getHair().color},hat:G.getHat(),outfit:G.getOutfit(),weapon:G.getWeapon(),boot:G.getBoots(),costume:G.getCostume(),face:F.getFace(),skin:F.getSkinColor(),eyeColor:F.getEyeColor()},firstName:F.getName().getFirstName(),middleName:F.getName().getMiddleName(),lastName:F.getName().getLastName(),nickname:F.getName().getNickname(),playerTransformation:this.player.getPlayerData().playerTransformation};for(let H=0;H-1?this.CurrentTeam.removePlayer(B):this.currentTeam.HostID===B&&this.teamDisbanded()}}teamDisbanded(){this.currentTeam.destroy(),this.currentTeam=null,this.onHostDisbanded.dispatch(),this.player.coOpTeam=null,this.isHosting=!1}handleMessage(k){switch(k.action){case Pa.x.RequestJoinTeam:{const B=k.data.userID;let U=!1;const F={reason:null};if(this.IsHosting?U=this.currentTeam.addPlayer(B,F):F.reason=wT.T.NotHostingTeam,U){const k={action:Pa.x.JoinTeam,target:B,data:{hostID:this.currentTeam.HostID,teamMembers:this.currentTeam.TeamMembers,readyMembers:this.currentTeam.ReadyMembers,streak:this.currentTeam.Streak}};this.ct.emitMessage(k)}else this.sendTeamJoinFailure(B,F.reason);break}case Pa.x.JoinTeamFailed:this.onTeamJoinFailed.dispatch(k.data.reason),this.isJoining=!1;break;case Pa.x.JoinTeam:this.currentTeam=new wT.d,this.currentTeam.MaxTeamSize=MT.MAX_CO_OP_TEAM_SIZE,this.currentTeam.HostID=k.data.hostID,this.currentTeam.TeamMembers=k.data.teamMembers,this.currentTeam.ReadyMembers=k.data.readyMembers,this.isHosting=!1,this.isJoining=!1,this.onTeamJoined.dispatch();break;case Pa.x.PlayerLeftTeam:if(this.IsHosting){const B=k.data.userID;this.currentTeam.removePlayer(B)}break;case Pa.x.TeamDisbanded:this.IsOnTeam&&this.currentTeam.HostID===k.data.hostID&&this.teamDisbanded();break;case Pa.x.Info:if(this.IsOnTeam){const B=k.data;this.IsHosting?this.currentTeam.TeamMembers.indexOf(B.userID)>-1&&(j.Aq$.isDefined(B.coOpTeam)&&B.coOpTeam.hostID===this.player.userID?-1===this.currentTeam.ReadyMembers.indexOf(B.userID)&&this.currentTeam.readyUpPlayer(B.userID):this.currentTeam.removePlayer(B.userID)):B.userID!==this.currentTeam.HostID||j.Aq$.isDefined(B.coOpTeam)&&-1!==B.coOpTeam.teamMembers.indexOf(this.player.userID)||this.teamDisbanded()}break;case Pa.x.TeamUpdated:this.IsOnTeam&&!this.IsHosting&&k.data.hostID===this.currentTeam.HostID&&(this.currentTeam.ReadyMembers=k.data.readyMembers,this.currentTeam.TeamMembers=k.data.teamMembers,this.currentTeam.Streak=k.data.streak)}}playerListReceived(k){if(this.IsOnTeam){const B=$.map(k,(k=>parseInt(k,10)));if(this.IsHosting)for(let k=0;k-1&&-1===B.indexOf(k)&&this.teamDisbanded()}}}broadcastTeamUpdate(){const k={action:Pa.x.TeamUpdated,data:{hostID:this.currentTeam.HostID,teamMembers:this.currentTeam.TeamMembers,readyMembers:this.currentTeam.ReadyMembers,streak:this.currentTeam.Streak}};this.ct.emitMessage(k)}}MT.MAX_CO_OP_TEAM_SIZE=3,(0,G.Cg)([(0,$l.sg)(500),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],MT.prototype,"broadcastTeamUpdate",null);class NT{get OnTeamCreated(){return this.onTeamCreated}get OnTeamUpdated(){return this.onTeamUpdated}get OnTeamDisbanded(){return this.onTeamDisbanded}get AvailableTeams(){return this.availableTeams}constructor(k){this.ct=null,this.onTeamCreated=new j.HN0,this.onTeamUpdated=new j.HN0,this.onTeamDisbanded=new j.HN0,this.availableTeams=[],this.ct=k,this.ct.OnSocketMessage.add(this.handleMessage,this),this.ct.OnPlayerLeftSignal.add(this.handlePlayerLeave,this)}destroy(){this.ct.OnSocketMessage.remove(this.handleMessage,this),this.ct.OnPlayerLeftSignal.remove(this.handlePlayerLeave,this),this.onTeamCreated.dispose(),this.onTeamDisbanded.dispose(),this.onTeamUpdated.dispose()}handlePlayerLeave(k){const B=parseInt(k,10);this.handleTeamDisband(B)}handleTeamDisband(k){const B=$.findIndex(this.availableTeams,(B=>B.hostID===k));B>-1&&this.onTeamDisbanded.dispatch(this.availableTeams.splice(B,1)[0])}handleMessage(k){switch(k.action){case Pa.x.HostTeam:this.addOrUpdateTeam({hostID:k.data.hostID,teamMembers:[k.data.hostID],readyMembers:[k.data.hostID],streak:0});break;case Pa.x.TeamUpdated:this.addOrUpdateTeam(Object.assign({},k.data));break;case Pa.x.TeamDisbanded:this.handleTeamDisband(k.data.hostID);break;case Pa.x.Info:{const B=k.data;j.Aq$.isDefined(B.coOpTeam)&&B.userID===B.coOpTeam.hostID&&this.addOrUpdateTeam(Object.assign({},B.coOpTeam))}}}addOrUpdateTeam(k){const B=$.find(this.availableTeams,(B=>B.hostID===k.hostID));j.Aq$.isDefined(B)?(B.teamMembers=k.teamMembers,B.readyMembers=k.readyMembers,this.onTeamUpdated.dispatch(B)):(this.availableTeams.push(k),this.onTeamCreated.dispatch(k))}}class xT extends Un.T{constructor(k,B,U){super(k,"Titan","MAP_TITAN_GROUNDS",U.entry.x,U.entry.y,[U.map],B.concat(J.Q.Spine_coop_crystal_json,q._.Npc_face_harvey_json,q._.Boss_titan_json,q._.Ui_titan_json,q._.Ui_coop_json,J.Q.Npc_harvey_json,J.Q.Spine_catapult_json,J.Q.Spine_catapult_impact_json,nr.q.Cannon_ball,Z.c.Sfx_titan_catapult_launch,Z.c.Sfx_titan_catapult_hit,Rn.t.Tileset_generic_snow_png,q._.Ui_shared_json,Ei.l.Overlay_difficulty_hard,Ei.l.Overlay_difficulty_expert)),this.catapultBattle=!1,this.catapultQueue=0,this.isCatapultAnimating=!1,this.titanHealthBar=null,this.titanAsset=null,this.titanMapData=null,this.impactContainer=null,this.impactSpine=null,this.catapultContainer=null,this.crystalContainer=null,this.crystalGuideHand=null,this.catapultSpine=null,this.cannonBallStartPos=null,this.cannonBall=null,this.catapultTweenX=null,this.catapultTweenY=null,this.titanSpine=null,this.spineContainer=null,this.coOpAvailableTeamsHandler=null,this.currentCoOpTeamHandler=null,this.partySelectOpen=!1,this.coOpEnabled=!0,this.popupsEnabled=!1,this.sendTeamJoined=null,this.sessionTalk=!1,this.titanMapData=U,this.sendTeamJoined=()=>{this.sendCoopSegmentEvent(ET.TeamJoined)}}setup(k,B,U){if(super.setup(k,B,U),this.titanHealthBar=null,this.catapultQueue=0,this.isCatapultAnimating=!1,this._titansNetworkHandler=K.q.instance.prodigy.titansNetworkHandler,this._titansNetworkHandler.isCatapultBattle=!1,this.game.broadcaster.addAppListener(oi.RZ.GotTitan,this.startTitanBattle.bind(this),this,"Titan"),this.game.broadcaster.addAppListener(oi.RZ.GotTitans,this.gotTitanCallback.bind(this),this,"Titan"),this.coOpEnabled=!K.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("coOpTitanDisabled",!1),this.popupsEnabled=Vt.s.get("GameConstants.Debug.POPUPS_ENABLED"),this.coOpEnabled){const k=K.q.instance.prodigy.gameContainer.get("c97-bd0d");if(null===this.coOpAvailableTeamsHandler){const k=K.q.instance.prodigy.gameContainer.get("c97-bd0d");this.coOpAvailableTeamsHandler=new NT(k)}if(null===this.currentCoOpTeamHandler){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.currentCoOpTeamHandler=new MT(this.game.time,B,k,K.q.instance.prodigy.gameContainer.get("e59-eea6")),B.coOpTeamHandler=this.currentCoOpTeamHandler,this.currentCoOpTeamHandler.OnTeamHosted.add(this.activePlayerCreatedTeam,this),this.currentCoOpTeamHandler.OnTeamJoined.add(this.activePlayerJoinedTeam,this),this.currentCoOpTeamHandler.OnHostDisbanded.add(this.showCurrentTeamDisbandMessage,this),this.currentCoOpTeamHandler.OnTeamJoinFailed.add(this.showJoinTeamFailedMessage,this),this.currentCoOpTeamHandler.OnHostDisbanded.add(this.setInputBlocking.bind(this,!1)),this.currentCoOpTeamHandler.OnTeamLeft.add(this.setInputBlocking.bind(this,!1)),k.OnSocketMessage.add(this.messageReceived,this)}this.inputBlocker=new Da(this.game),this.inputBlocker.InputMask=Ia.z.LOCOMOTION|Ia.z.LOBBY|Ia.z.SYSTEM_INFO|Ia.z.REAR_OVERLAY,this.inputBlocker.OnDownBlocked.add(this.blockInputModal,this),this.game.broadcaster.addAppListener(oi.u0.PlayerAdded,this.playerAddedToScreen,this)}K.q.instance.prodigy.titansNetworkHandler.getTitans()}start(k,B,U){super.start(k,B,U),this.coOpEnabled}cleanup(){var k,B,U,F,G,j,$,H,V,W,q,z,Y,Q,X;if(this.game.broadcaster.removeAppListener(oi.RZ.GotTitan,this,"Titan"),this.game.broadcaster.removeAppListener(oi.RZ.GotTitans,this,"Titan"),this.game.broadcaster.removeAppListener(oi.RZ.Catapult,this,"Catapult"),this.game.broadcaster.removeAppListener(oi.u0.PlayerAdded,this),this.coOpEnabled){null===(k=this.coOpAvailableTeamsHandler)||void 0===k||k.destroy(),this.coOpAvailableTeamsHandler=null,null===(B=this.currentCoOpTeamHandler)||void 0===B||B.destroy(),this.currentCoOpTeamHandler=null;K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.coOpTeamHandler=null,null===(U=this.inputBlocker)||void 0===U||U.destroy();K.q.instance.prodigy.gameContainer.get("c97-bd0d").OnSocketMessage.remove(this.messageReceived,this),Vt.s.setGameConstant("GameConstants.Debug.POPUPS_ENABLED",this.popupsEnabled)}null===(F=this.titanHealthBar)||void 0===F||F.destroy(),this.titanHealthBar=null,null===(G=this.impactContainer)||void 0===G||G.destroy(),this.impactContainer=null,null===(j=this.impactSpine)||void 0===j||j.destroy(),this.impactSpine=null,null===($=this.catapultContainer)||void 0===$||$.destroy(),this.catapultContainer=null,null===(H=this.crystalContainer)||void 0===H||H.destroy(),this.crystalContainer=null,null===(V=this.crystalGuideHand)||void 0===V||V.destroy(),this.crystalGuideHand=null,null===(W=this.catapultSpine)||void 0===W||W.destroy(),this.catapultSpine=null,null===(q=this.cannonBall)||void 0===q||q.destroy(),this.cannonBall=null,null===(z=this.titanSpine)||void 0===z||z.destroy(),this.titanSpine=null,null===(Y=this.spineContainer)||void 0===Y||Y.destroy(),this.spineContainer=null,this.titanAsset=null,null===(Q=this.catapultTweenX)||void 0===Q||Q.remove(),this.catapultTweenX=null,null===(X=this.catapultTweenY)||void 0===X||X.remove(),this.catapultTweenY=null,super.cleanup()}process(k,B,U){super.process(k,B,U),j.Aq$.isDefined(this.screen.questProgress)&&(this.screen.questProgress.visible=!1),null!==this.currentCoOpTeamHandler&&this.currentCoOpTeamHandler.IsOnTeam&&this.game.broadcaster.broadcast(oi.Y1.HideRightSideHUD,oi.HG.HUD)}gotTitanCallback(){if(this.game.broadcaster.removeAppListener(oi.RZ.GotTitans,this,"Titan"),K.q.instance.prodigy.titansNetworkHandler.isTitanAlive()){const k=K.q.instance.prodigy.titansNetworkHandler.titan.assetID;this.titanAsset=le.t.getItem("titan",k).data,K.q.instance.prodigy.world.getCurrentZone()===this.titanAsset.zone&&(K.q.instance.prodigy.load.assets([Ut.E.getTitanSpine(k)],this.titanLoadComplete.bind(this)),pn.K.cacheAsset(this.game,Ut.E.getTitanSpine(k),pn.K.zoneAssetsCached),this.renderMapElements())}}titanLoadComplete(k,B){B||j.VyI.log("Titan load did not complete successfully.",j.$bb.Error);const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(ti.U.progressData.step===Ze.B.NotStarted&&U.hasFoundAllKeystones())jn.E.runAllKeystonesSequenceOnMapSetup((()=>(0,G.sH)(this,void 0,void 0,(function*(){return this.titanLoadComplete(k,B)}))));else if(this.renderTitan(),K.q.instance.prodigy.titansNetworkHandler.isNewTitan()){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.playerTitanData={titanID:K.q.instance.prodigy.titansNetworkHandler.titan.id,titanBattleProgress:0,seenTitanBattleProgress:0},this.playCutscene()}else this.renderHealthBar(),this.coOpEnabled&&this.featureRequirements.meetsRequirementsDeprecated(8)&&this.playCrystalTutorial()}playCutscene(){K.q.instance.prodigy.world.playScene(this.titanMapData.cutscene),this._firstTimeOnMap=!0}renderMapElements(){const k=new Zw.p(this.game,"NPC_NAME_HARVEY",2,Kn.ac.Merchant,this.screen.content,this.titanMapData.harvey.x-5,this.titanMapData.harvey.y,"idle"),B=K.q.instance.prodigy.create.sprite(20,-110,q._.Boss_titan_json,"harvey-cart");k.add(B),k.onClick.add(this.onHarveyClicked,this);const U=k.add(K.q.instance.prodigy.create.emptySprite(-.5*k.width+80,-k.height,k.width,k.height));if(U.inputEnabled=!0,U.events.onInputDown.add(this.onHarveyClicked.bind(this)),this.featureRequirements.meetsRequirementsDeprecated(8)){const B=TT.createIndicator(ST.DEFAULT_INDICATOR_CONFIG);B.position.set(-5,-105),B.inputEnabled=!0,this.game.add.tween(B,this).to({y:B.y-20},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0),k.add(B)}const F=K.q.instance.prodigy.create.sprite(this.titanMapData.sign.x,this.titanMapData.sign.y,q._.Boss_titan_json,"harveySign");this.screen.content.addChild(F),F.anchor.x=.5,F.anchor.y=1,F.inputEnabled=!0,F.events.onInputDown.add(this.onSignClicked.bind(this)),this.setupCatapult(),this.coOpEnabled&&this.setupCrystal()}setupCatapult(){const k=this.titanMapData.titan.x+this.titanMapData.titan.impactOffset.x,B=this.titanMapData.titan.y+this.titanMapData.titan.impactOffset.y;this.impactContainer=K.q.instance.prodigy.create.element(this.screen.content,k,B),this.impactSpine=this.game.add.spine(0,0,J.Q.Spine_catapult_impact_json),this.impactContainer.add(this.impactSpine),this.impactContainer.visible=!1,this.catapultContainer=K.q.instance.prodigy.create.element(this.screen.content,this.titanMapData.catapult.x,this.titanMapData.catapult.y),this.catapultSpine=this.game.add.spine(0,0,J.Q.Spine_catapult_json),this.catapultContainer.add(this.catapultSpine);const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(Tn.J.shouldSuppressAd(U)){this.catapultSpine.setTint(3355443);const k=K.q.instance.prodigy.create.sprite(0,-65,q._.Ui_icons_json,"icon-medium-lockglow");k.anchor=new V.Point(.5,.5),this.catapultContainer.add(k)}if(this.setupSpineHitbox(this.catapultSpine,this.onCatapultClick.bind(this),-85,-140,130,140),this.cannonBallStartPos={x:this.titanMapData.catapult.x-35,y:this.titanMapData.catapult.y-175},this.cannonBall=K.q.instance.prodigy.create.sprite(this.cannonBallStartPos.x,this.cannonBallStartPos.y,nr.q.Cannon_ball),this.cannonBall.visible=!1,this.screen.above.add(this.cannonBall),this.catapultTweenX=this.game.add.tween(this.cannonBall.position,this,!1),this.catapultTweenX.to({x:this.impactContainer.x},600,j.GS3.Linear.None,!1,867),this.catapultTweenX.onStart.add((()=>{this.cannonBall.visible=!0})),this.catapultTweenX.onTweenComplete.add((()=>{this.cannonBall.visible=!1,this.playImpact()})),this.catapultTweenY=this.game.add.tween(this.cannonBall.position,this,!1),this.catapultTweenY.to({y:this.impactContainer.y-this.titanMapData.catapult.arcHeight},300,j.GS3.Quadratic.Out,!1,867),this.catapultTweenY.to({y:this.impactContainer.y},300,j.GS3.Quadratic.In,!1,867),this.game.broadcaster.addAppListener(oi.RZ.Catapult,this.onShootCatapult.bind(this),this,"Catapult"),this.catapultBattle){this.catapultBattle=!1,this.game.broadcaster.broadcast(oi.RZ.Catapult,"Catapult");K.q.instance.prodigy.gameContainer.get("c97-bd0d").emitMessage({action:Pa.x.Catapult})}this.sendWorldObjectSegmentEvent("World Object Discovered")}renderTitan(){const k=K.q.instance.prodigy.titansNetworkHandler.titan.assetID;this.spineContainer=K.q.instance.prodigy.create.element(this.screen.content,this.titanMapData.titan.x,this.titanMapData.titan.y-60),this.titanSpine=this.game.add.spine(0,0,Ut.E.getTitanSpine(k)),this.titanSpine.scale.x*=-1,this.titanSpine.setAnimationByName(0,"idle",!0),this.spineContainer.add(this.titanSpine),this.spineContainer.scale.x=1.2,this.spineContainer.scale.y=1.2,this.setupSpineHitbox(this.spineContainer,this.onTitanClicked.bind(this),-190,-190)}renderHealthBar(){if(!j.Aq$.isDefined(this.titanHealthBar)){const k=new Tr.c(this.game).createUIElements([{type:"UIElement",name:"healthBarContainer",y:25,x:930,anchorX:.5,anchorY:.5,width:336,height:80,children:[{type:"WebFontText",name:"body",text:this.localization.getText("TITAN_HEARTS"),relativeWidth:1,relativeHeight:1,relativeX:.5,relativeY:.1,style:16,boundsAlignH:"center",boundsAlignV:"middle"},{type:"Slider",name:"healthSlider",relativeX:.5,relativeY:.5,relativeWidth:1,relativeHeight:1,atlasName:q._.Ui_shared_json,activeTrackBaseFrameName:"scroll-tracks/red-large-fill",inactiveTrackBaseFrameName:"scroll-tracks/red-large-track",showHead:!1,isVertical:!1,isInteractive:!1}]}],this.screen.above);for(let B=0;B{this.crystalGuideHand=un.o.highlightObjectOnLayer(this.game,168,-145,this.crystalContainer,this.screen.above)}}),U.setText(280),U.setText({callback:()=>{K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(k,B)}}),U.startDeprecated("noot",!1)}}setupCrystal(){const k=wr.j.createRenderer(J.Q.Spine_coop_crystal_json,{type:"spine"});k.setSkinByName("crystal"),k.playAnimation("enter",!0),this.crystalContainer=new yr._(this.game,this.screen.content,[k],620,455);const B=this.setupSpineHitbox(this.crystalContainer,this.onCrystalClick.bind(this),48,-148,160,165);this.inputBlocker.setBlockType(B.input,Ia.z.LOBBY),this.addCollisionZone(this.screen,700,340,85,135)}setupSpineHitbox(k,B,U,F,G,$){const H=j.Aq$.isDefined(G)?G:k.width,V=j.Aq$.isDefined($)?$:k.height,W=j.Aq$.isDefined(U)?U:-.5*H,q=j.Aq$.isDefined(F)?F:-V,z=K.q.instance.prodigy.create.emptySprite(W,q,H,V);return k.addChild(z),z.alpha=0,z.inputEnabled=!0,z.events.onInputDown.add(B),z}onCrystalClick(){if(this.featureRequirements.meetsRequirementsDeprecated(8)){if(!this.partySelectOpen)if(this.currentCoOpTeamHandler.IsOnTeam)this.currentCoOpTeamHandler.IsHosting?this.showDeleteTeamMessage():this.showLeaveTeamMessage();else if(this.currentCoOpTeamHandler.IsJoining)this.blockInputModal();else{j.Aq$.isDefined(this.crystalGuideHand)&&this.crystalGuideHand.destroy(),this.partySelectOpen=!0;const k=K.q.instance.prodigy.open.coOpTeamSelect(this.screen.playersInfo,this.coOpAvailableTeamsHandler);k.OnCreateClicked.add((()=>{this.setInputBlocking(!0),this.currentCoOpTeamHandler.hostTeam()})),k.OnJoinClicked.add((k=>{this.setInputBlocking(!0);const B=(k,U)=>{U&&this.setInputBlocking(!1),this.currentCoOpTeamHandler.OnTeamJoined.remove(B),this.currentCoOpTeamHandler.OnTeamJoinFailed.remove(B)};this.currentCoOpTeamHandler.OnTeamJoined.add(B,this,0,!1),this.currentCoOpTeamHandler.OnTeamJoinFailed.add(B,this,0,!0),this.currentCoOpTeamHandler.OnTeamJoined.remove(this.sendTeamJoined,this),this.currentCoOpTeamHandler.OnTeamJoined.addOnce(this.sendTeamJoined,this),this.currentCoOpTeamHandler.joinTeam(k)})),k.onDestroy.add((()=>{this.partySelectOpen=!1}))}}else this.titanDeny()}addGuestTag(k){const B=this.screen.playerList[k];j.Aq$.isDefined(B)&&new DT(this.game,B,k,this.currentCoOpTeamHandler)}startCoOpBattle(){const k=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),B=Gt.R.loadData(Ft.r.BattleRevampConstants_json).battleConstants;let U=parseInt(k.getValue("titanCoOpTitanHP",Vt.s.get("GameConstants.CO_OP_TITAN.TITAN_HP")),10),F=parseInt(k.getValue("titanCoOpCrystalHP",Vt.s.get("GameConstants.CO_OP_TITAN.CRYSTAL_HP")),10),G=B.xp.titan;const j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.userID,H=`co_op_battle-${j}-${Date.now()}`,V=this.currentCoOpTeamHandler.CurrentTeam,W=$.filter(V.ReadyMembers,(k=>k!==j)),q=$.map(W,(k=>this.extractCoOpPlayerData(k))),z=K.q.instance.prodigy.titansNetworkHandler.titan.assetID,Y=K.q.instance.prodigy.titansNetworkHandler.titan.id,Q=V.ReadyMembers.length===V.TeamMembers.length?V.Streak:0;this.sendCoopSegmentEvent(ET.CoOpBattleStarted);const X={titanNetworkID:Y,titanHP:U,crystalHP:F,titanXPBounty:G,titanAssetID:z};this.currentCoOpTeamHandler.startMatch(H,q,X),K.q.instance.prodigy.startCoOp({teammates:q,hostID:j,titanAssetID:z,battleMap:this.titanMapData.battleBG,titanNetworkID:Y,isHost:!0,returnToMap:this.zoneName,crystalHP:F,titanHP:U,titanXPBounty:G,multiplayerRoom:H,teamStreak:Q})}extractCoOpPlayerData(k){var B,U,F,G;const $=this.screen.playersInfo[k];let H,V,W,q;return j.Aq$.isDefined($.equipment)&&(H=$.equipment.hat,V=$.equipment.outfit,W=$.equipment.weapon,q=$.equipment.costume),{userID:k,level:$.data.level,chargedLevelData:$.data.chargedLevelData,appearance:{face:$.appearance.face,hair:{style:$.appearance.hair.style,color:$.appearance.hair.color},skin:$.appearance.skinColor,eyeColor:$.appearance.eyeColor,hat:H,outfit:V,weapon:W,costume:q},firstName:null===(B=$.appearance.name)||void 0===B?void 0:B.first,middleName:null===(U=$.appearance.name)||void 0===U?void 0:U.middle,lastName:null===(F=$.appearance.name)||void 0===F?void 0:F.last,nickname:null===(G=$.appearance.name)||void 0===G?void 0:G.nick,playerTransformation:$.data.playerTransformation}}onHarveyClicked(){const k=new Ti.rD(this.game);K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.BREADCRUMB_TITAN_INTRO,ln.B.BREADCRUMB_TITAN_HARVEY_TALKED)?this.sessionTalk||(this.sessionTalk=!0,k.addEvents([{dialogueData:k.dataProvider.get(714),blockInput:!0},{dialogueData:k.dataProvider.get(715),blockInput:!0},{dialogueData:k.dataProvider.get(716),blockInput:!0}])):(K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.BREADCRUMB_TITAN_INTRO,ln.B.BREADCRUMB_TITAN_HARVEY_TALKED),k.addEvents([{dialogueData:k.dataProvider.get(712),blockInput:!0},{dialogueData:k.dataProvider.get(713),blockInput:!0}])),k.addEvents([{callback:()=>{k.close(),K.q.instance.prodigy.open.store(21)}}]),k.start(),this.segment.gameWorld.sendNpcClickedEvent({npc_name:CT.N.Harvey,npc_type:Kn.ac.Merchant})}onSignClicked(){K.q.instance.prodigy.open.titanProgress(!1)}onCatapultClick(){const k=!this.featureRequirements.meetsRequirementsDeprecated(8),B=K.q.instance.prodigy.gameContainer;if(B.get("e20-0fb0").player.hasMembership())k?(this.titanDeny(),this.sendWorldObjectSegmentEvent("World Object Failed",Kn.kN.LevelLocked)):this.moveToCatapult();else{const k=yn.P.shouldUseUnifiedConversionFlow(Sn.o.FunnelFireTitanCatapult)?_n.R.UnifiedConversionFlow:Tn.J.showYouTubeMembershipAd(this.game,!0)?_n.R.Video:_n.R.Static;this.segment.purchase.sendFunnelStart({type:"Fire-Titan-Catapult",category:"World",contentId:K.q.instance.prodigy.world.getCurrentZone(),adType:k,adVersion:yn.P.getAdVersion(Sn.o.FunnelFireTitanCatapult)}),this.sendWorldObjectSegmentEvent("World Object Failed",Kn.kN.MemberLocked);const U=B.get("e20-0fb0").player;Tn.J.shouldSuppressAd(U)?K.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:this.catapultContainer.x,yPosition:this.catapultContainer.y-140,arrowXRelPos:.3,arrowDirection:Br.i.DOWN}):K.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:Sn.o.FunnelFireTitanCatapult},"titanCatapult")}}onShootCatapult(){this.catapultQueue++,this.isCatapultAnimating||this.shootCatapult()}shootCatapult(){if(this.catapultQueue>0){this.catapultQueue--,this.isCatapultAnimating=!0,this.sendWorldObjectSegmentEvent("World Object Used"),this.catapultSpine.setToSetupPose(),this.catapultSpine.setAnimationByName(0,"shoot",!1),this.cannonBall.x=this.cannonBallStartPos.x,this.cannonBall.y=this.cannonBallStartPos.y,this.catapultTweenX.start(),this.catapultTweenY.start();const k=this.game.add.tween(this,this);k.delay(300),k.onTweenComplete.add((()=>{K.q.instance.prodigy.audio.playSFX(27,"launch")})),k.start()}}playImpact(){this.impactContainer.visible=!0,this.impactSpine.setToSetupPose(),this.impactSpine.setAnimationByName(0,"animation",!1),this.impactSpine.onComplete.addOnce((()=>{this.isCatapultAnimating=!1,this.shootCatapult()})),K.q.instance.prodigy.audio.playSFX(28,"hit"),K.q.instance.prodigy.effects.shake(0,300,10,"v"),this.titanSpine.setAnimationByName(0,"attack",!1),this.titanSpine.onComplete.addOnce((()=>{this.titanSpine.setAnimationByName(0,"idle",!0)}))}onTitanClicked(){!this.featureRequirements.meetsRequirementsDeprecated(8)?this.titanDeny():this.moveToTitan()}moveToTitan(){this.screen.path.findPath(this.screen.user.x,this.screen.user.y,this.titanMapData.titan.x-300,this.titanMapData.titan.y+125,!0).then((k=>{k&&this.screen.user.setPath(k,this.callNetworkToStartBattle.bind(this))})).catch(j.RQr.createHandler("Error finding path to Titan"))}moveToCatapult(){this.screen.path.findPath(this.screen.user.x,this.screen.user.y,this.titanMapData.catapult.x+110,this.titanMapData.catapult.y,!0).then((k=>{k&&this.screen.user.setPath(k,this.startCatapultBattle.bind(this))})).catch(j.RQr.createHandler("Error finding path to Catapult"))}titanDeadKick(){const k=K.q.instance.prodigy.open.message(this.localization.getText("TITAN_DEFEATED_MESSAGE"),this.titanDeadTeleport.bind(this),null,this.localization.getText("TITAN_DEFEATED_TITLE"));k.queuePostCreateCallback((()=>{k.okayButton.setInputBlockPriority(Ia.z.SYSTEM_INFO)}))}titanDeadTeleport(){K.q.instance.prodigy.world.goToZoneHub(K.q.instance.prodigy.world.getCurrentZone())}callNetworkToStartBattle(){K.q.instance.prodigy.titansNetworkHandler.getTitan(K.q.instance.prodigy.titansNetworkHandler.titan.id)}startCatapultBattle(){this.catapultBattle=!0,this._titansNetworkHandler.isCatapultBattle=!0,this.callNetworkToStartBattle()}startTitanBattle(){K.q.instance.prodigy.titansNetworkHandler.isTitanAlive()?(this.inputBlocker.pause(),this.coOpEnabled&&this.currentCoOpTeamHandler.IsHosting&&this.currentCoOpTeamHandler.CurrentTeam.ReadyMembers.length>1?this.startCoOpBattle():this.startSoloBattle()):this.titanDeadKick()}startSoloBattle(){K.q.instance.prodigy.battle.battleStats.type="TitanBattle";const k={revampBattleType:Ni.gu.Titan,intro:this.localization.getText("COMBAT_TITAN_BATTLE"),screen:this.titanMapData.battleBG,boss:{name:this.localization.getText("NPC_NAME_TITAN_BARRIER"),starBonus:0,tag:"titan",catapult:this.catapultBattle,ID:K.q.instance.prodigy.titansNetworkHandler.titan.assetID},difficulty:this.titanAsset.difficulty};K.q.instance.prodigy.battle.start(k,void 0,this.onBattleWon.bind(this),this.onBattleLost.bind(this))}onBattleWon(){this.teleportToTitanMap()}onBattleLost(){this.teleportToTitanMap()}teleportToTitanMap(){var k;(null===(k=this.currentCoOpTeamHandler)||void 0===k?void 0:k.IsOnTeam)&&this.currentCoOpTeamHandler.leaveTeam(),this.catapultBattle?(this.catapultBattle=!1,K.q.instance.prodigy.world.it(this.titanMapData.map,this.titanMapData.catapult.x+110,this.titanMapData.catapult.y)):K.q.instance.prodigy.world.it(this.titanMapData.map,this.titanMapData.entry.x,this.titanMapData.entry.y)}sendCoopSegmentEvent(k){const B=this.currentCoOpTeamHandler.CurrentTeam.HostID;switch(k){case ET.TeamFormed:this.segment.battle.sendCoopTeamCreatedEvent(AT.$.Titan,B);break;case ET.TeamJoined:this.segment.battle.sendCoopTeamJoinedEvent(AT.$.Titan,B);break;case ET.CoOpBattleStarted:this.segment.battle.sendCoopBattleStartedEvent(AT.$.Titan,B)}}sendWorldObjectSegmentEvent(k,B){var U,F,G,j;const $=Kn.u_.TitanCatapult;switch(k){case"World Object Discovered":this.segment.gameWorld.sendWorldObjectDiscoveredEvent({object_type:$,x_coord:null===(F=null===(U=this.titanMapData)||void 0===U?void 0:U.catapult)||void 0===F?void 0:F.x,y_coord:null===(j=null===(G=this.titanMapData)||void 0===G?void 0:G.catapult)||void 0===j?void 0:j.y});break;case"World Object Used":this.segment.gameWorld.sendWorldObjectUsedEvent({object_type:$});break;case"World Object Failed":this.segment.gameWorld.sendWorldObjectUsedFailedEvent({object_type:$,fail_reason:B})}}showJoinTeamFailedMessage(k){k!==wT.T.Timeout&&K.q.instance.prodigy.open.coOpModal({body:this.localization.getText(k===wT.T.TeamFull?"PARTY_FULL_ERROR":"PARTY_JOIN_FAILED_ERROR"),greenButton:{text:this.localization.getText("BUTTON_OKAY_CAPITAL")}}),j.VyI.log(`Failed joining team reason: ${k}`,j.$bb.Warning)}activePlayerJoinedTeam(){if(this.currentCoOpTeamHandler.IsOnTeam){const k=new IT(this.game,this.screen.menus,this.screen.playersInfo[this.currentCoOpTeamHandler.CurrentTeam.HostID],this.currentCoOpTeamHandler);ad.Z.sendToBack(k),k.onCloseClick.add(this.showLeaveTeamMessage,this)}}showCurrentTeamDisbandMessage(){K.q.instance.prodigy.open.coOpModal({body:this.localization.getText("PARTY_WAS_CANCELLED"),greenButton:{text:this.localization.getText("BUTTON_OKAY_CAPITAL")}})}showDeleteTeamMessage(){K.q.instance.prodigy.open.coOpModal({title:this.localization.getText("DELETE_TEAM_TITLE"),body:this.localization.getText("DELETE_TEAM_BODY"),greenButton:{text:this.localization.getText("BUTTON_KEEP_TEAM")},redButton:{text:this.localization.getText("BUTTON_DELETE_TEAM"),callback:()=>{this.currentCoOpTeamHandler.leaveTeam()}}})}showLeaveTeamMessage(){const k=K.q.instance.prodigy.open.coOpModal({title:this.localization.getText("LEAVE_TEAM_TITLE"),body:this.localization.getText("LEAVE_TEAM_BODY"),greenButton:{text:this.localization.getText("BUTTON_STAY_TEAM")},redButton:{text:this.localization.getText("BUTTON_LEAVE_TEAM"),callback:()=>{this.currentCoOpTeamHandler.leaveTeam()}}});this.currentCoOpTeamHandler.OnHostDisbanded.addOnce(k.destroy.bind(k))}activePlayerCreatedTeam(){if(this.currentCoOpTeamHandler.IsHosting){const k=new RT(this.game,this.screen.menus,this.currentCoOpTeamHandler);k.onStartClick.add(this.callNetworkToStartBattle,this),k.onCloseClick.add(this.showDeleteTeamMessage,this),this.currentCoOpTeamHandler.CurrentTeam.OnTeamMemberJoined.add(this.addGuestTag,this),this.currentCoOpTeamHandler.CurrentTeam.OnTeamMemberJoined.addOnce((()=>{this.sendCoopSegmentEvent(ET.TeamFormed)}))}}messageReceived(k){if(k.action===Pa.x.StartCoOpTitanMatch&&this.currentCoOpTeamHandler.IsOnTeam&&this.currentCoOpTeamHandler.CurrentTeam.HostID===k.data.hostID){const B=this.currentCoOpTeamHandler.CurrentTeam,U=B.ReadyMembers.length===B.TeamMembers.length?B.Streak:0;this.sendCoopSegmentEvent(ET.CoOpBattleStarted),K.q.instance.prodigy.startCoOp(Object.assign({teammates:k.data.teammates,hostID:k.data.hostID,battleMap:this.titanMapData.battleBG,isHost:!1,returnToMap:this.zoneName,multiplayerRoom:k.data.multiplayerRoom,teamStreak:U},k.data.matchData))}}playerAddedToScreen(k){if(this.currentCoOpTeamHandler.IsHosting){const B=k.source.userID;this.currentCoOpTeamHandler.CurrentTeam.TeamMembers.indexOf(B)>-1&&this.addGuestTag(B)}}setInputBlocking(k){k?this.inputBlocker.start():this.inputBlocker.pause(),k?this.game.broadcaster.broadcast(oi.Y1.HideRightSideHUD,oi.HG.HUD):this.game.broadcaster.broadcast(oi.Y1.ShowRightSideHUD,oi.HG.HUD)}blockInputModal(){const k=K.q.instance.prodigy.open.coOpModal({body:this.localization.getText("CO_OP_INPUT_BLOCKED_MODAL"),greenButton:{text:this.localization.getText("BUTTON_OKAY_CAPITAL")}});this.currentCoOpTeamHandler.IsOnTeam&&this.currentCoOpTeamHandler.OnHostDisbanded.addOnce(k.destroy.bind(k))}titanDeny(){const k=K.q.instance.prodigy.event.create();k.enableInput(!1),k.validPath(this.screen.user,this.screen.path,this.titanMapData.titan.x-300,this.titanMapData.titan.y+125),k.function((()=>{this.titanSpine.setAnimationByName(0,"attack",!1),this.titanSpine.onComplete.addOnce((()=>{this.titanSpine.setAnimationByName(0,"idle",!0)}));const k=this.screen.user;this.game.add.tween(k.position,this).to({x:this.titanMapData.entry.x},300,j.GS3.Quadratic.Out,!0,800),K.q.instance.prodigy.effects.shake(600,600,20,"v")})),k.delay(1500),k.enableInput(!0),k.start()}}(0,G.Cg)([(0,j.fFd)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],xT.prototype,"localization",void 0);var LT=U(95798);class kT extends Un.T{}class BT extends kT{constructor(k,B){super(k,"A1","MAP_BONFIRE_SPIRE_VOLCANO_ENTRANCE",865,482,["bonfire_spire-B1"],B),this.leverNumber=1,this.battleBG="battle-bonfire-outside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:995,y:420,w:120,h:150,rect:!0},"bonfire_spire-B1",160,307.5,null,LT.K.DOWN_RIGHT,!1),B.addClickableMoveEvent(920,322,235,235,1052,506,null,null,0,null),this.addChest(k,B,"chest1",175,275),this.addPippet(k,B,2,650,482)}}class UT extends kT{constructor(k,B){super(k,"A4","MAP_BONFIRE_SPIRE_PITFALL_TERRACE",1020,400,["bonfire_spire-B4"],B.concat(q._.Npc_sprite_slime_worker_json)),this.wasInsideTriggerLastFrame=!1,this.user=null,this.leverNumber=3,this.battleBG="battle-bonfire-outside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.user=B.user,this.addAreaEvent(k,B,{x:1180,y:420,w:200,h:210,rect:!0},"bonfire_spire-B4",140,200,null,LT.K.RIGHT,!1),B.addClickableMoveEvent(1080,315,200,210,1186,492,null,null,0,null),this.addChest(k,B,"chestGuardian",742,236,{type:"item",ID:92}),this.toggleDynamicLayer(k,6,!1,0)}update(k){if(j.Aq$.isDefined(this.user)){const B=j.cj9.distance(this.user.x,this.user.y,100,380)<=80;B!==this.wasInsideTriggerLastFrame&&this.toggleDynamicLayer(k,6,B,500),this.wasInsideTriggerLastFrame=B}super.update(k)}}class FT extends kT{constructor(k,B){super(k,"B1","MAP_BONFIRE_SPIRE_VOLCANO_VILLAGE",160,307,["bonfire_spire-C1","bonfire_spire-B2","bonfire_spire-A1"],B.concat([q._.Npc_sprite_slurpy_json,q._.Npc_sprite_slime_queen_json,q._.Npc_sprite_slime_guard_json,q._.Npc_sprite_merchant_json,J.Q.Spine_npc_slurpy_json])),this.questNPC=null,this.leverNumber=1,this.battleBG="battle-bonfire-inside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1248,y:370,w:64,h:260,rect:!0},"bonfire_spire-C1",170,417.5,null,LT.K.RIGHT,!1),B.addClickableMoveEvent(1216,240,64,260,1265,385,null,null,0,null),1===this.zone.getState("lever1")&&(this.addAreaEvent(k,B,{x:198.5,y:650,w:145,h:60,rect:!0},"bonfire_spire-B2",180,117.5,null,LT.K.DOWN,!1),B.addClickableMoveEvent(126,660,145,60,200,700,null,null,0,null)),this.addAreaEvent(k,B,{x:48,y:277,w:96,h:230,rect:!0},"bonfire_spire-A1",865,482,null,LT.K.UP_LEFT,!1),B.addClickableMoveEvent(0,162,96,230,28,255,null,null,0,null),this.questNPC=B.addConstructedQuestNPC(750,530,"slurpy",!1,FT.onComplete.bind(this,k)),K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.BonfireMerchantNPC,360,310).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.BonfireMerchantNPC}`)),K.q.instance.prodigy.create.nicknamerPedestal(this.game,this.zone.ID,B.user,B.content,1e3,525)}static onComplete(k){const B=K.q.instance.prodigy.event.create();B.text(0,"slurpy"),B.start()}}class GT extends kT{constructor(k,B){super(k,"B2","MAP_BONFIRE_SPIRE_VOLCANIC_CAVERN",180,117.5,["bonfire_spire-B1","bonfire_spire-C3","bonfire_spire-B4"],B),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:198.5,y:39,w:145,h:78,rect:!0},"bonfire_spire-B1",180,500,null,LT.K.UP,!1),B.addClickableMoveEvent(126,0,145,78,200,28,null,null,0,null),this.addAreaEvent(k,B,{x:1190,y:280,w:64,h:180,rect:!0},"bonfire_spire-C3",160,417.5,null,LT.K.RIGHT,!1),B.addClickableMoveEvent(1216,190,64,180,1262,282,null,null,0,null),1===this.zone.getState("lever2")&&(this.addAreaEvent(k,B,{x:1120.5,y:640,w:145,h:160,rect:!0},"bonfire_spire-B4",1040,117.5,null,LT.K.DOWN,!1),B.addClickableMoveEvent(1048,560,145,160,1120,700,null,null,0,null))}}class jT extends kT{constructor(k,B){super(k,"B4","MAP_BONFIRE_SPIRE_VOLCANO_JUNCTION",1080,117.5,["bonfire_spire-A4","bonfire_spire-B2","bonfire_spire-C4","bonfire_spire-B5"],B),this.leverNumber=3,this.battleBG="battle-bonfire-inside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1080,y:40,w:160,h:80,rect:!0},"bonfire_spire-B2",1100,509.5,null,LT.K.UP,!1),this.addAreaEvent(k,B,{x:1250,y:450,w:80,h:160,arrowOffsetY:-20,rect:!0},"bonfire_spire-C4",130,360,null,LT.K.RIGHT,!1),1===this.zone.getState("lever3")&&this.addAreaEvent(k,B,{x:200,y:675,w:160,h:90,rect:!0},"bonfire_spire-B5",160,237.5,null,LT.K.DOWN,!1),this.addAreaEvent(k,B,{x:25,y:180,w:50,h:160,rect:!0},"bonfire_spire-A4",1020,400,null,LT.K.LEFT,!1)}}class $T extends kT{constructor(k,B){super(k,"B5","MAP_BONFIRE_SPIRE_RED_HOT_RIVER",150,210,["bonfire_spire-B4","bonfire_spire-C6"],B),this.battleBG="battle-bonfire-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:160,y:60,w:160,h:120,rect:!0},"bonfire_spire-B4",160,527.5,null,LT.K.UP,!1),B.addClickableMoveEvent(80,0,160,120,160,100,null,null,0,null),this.addAreaEvent(k,B,{x:1230,y:480,w:100,h:180,rect:!0},"bonfire_spire-C6",250,400,null,LT.K.RIGHT,!1),B.addClickableMoveEvent(1180,390,100,180,1200,480,null,null,0,null),this.addChest(k,B,"chest4",740,520)}}class HT extends kT{constructor(k,B){super(k,"C1","MAP_BONFIRE_SPIRE_FIREWATCH_ROAD",180,417.5,["bonfire_spire-D1","bonfire_spire-D2","bonfire_spire-B1"],B),this.leverNumber=1,this.battleBG="battle-bonfire-inside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1272,y:430,w:96,h:150,rect:!1},"bonfire_spire-D1",300,360,null,LT.K.RIGHT,!1),B.addClickableMoveEvent(1170,380,96,150,1235,430,null,null,0,null),this.addAreaEvent(k,B,{x:1254,y:617.5,w:52,h:205,rect:!0},"bonfire_spire-D2",260,382.5,null,LT.K.RIGHT,!1),B.addClickableMoveEvent(1228,515,52,205,1256,602,null,null,0,null),this.addAreaEvent(k,B,{x:31,y:415,w:62,h:200,rect:!1},"bonfire_spire-B1",1120,417.5,null,LT.K.LEFT,!1),B.addClickableMoveEvent(0,315,62,200,22,416,null,null,0,null)}}class VT extends kT{constructor(k,B){super(k,"C2","MAP_BONFIRE_SPIRE_PALM_PATH",1100,597.5,["bonfire_spire-C3"],B),this.leverNumber=2,this.battleBG="battle-bonfire-outside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1080.5,y:680,w:145,h:80,rect:!0},"bonfire_spire-C3",1100,200,null,LT.K.DOWN,!1),B.addClickableMoveEvent(1008,640,145,80,1080,704,null,null,0,null),this.toggleDynamicLayer(k,3,1===this.zone.getState("lever2"),0),this.toggleDynamicLayer(k,4,1!==this.zone.getState("lever2"),0),B.addClickableEvent(200,120,120,100,this.zone.toggleLever.bind(this.zone,B,1,this,{x:260,y:250})),this.zone.sendSegmentEvents("World Object Discovered",{object_type:Kn.u_.LeverSwitch,object_id:"1",x_coord:200,y_coord:120})}}class WT extends kT{constructor(k,B){super(k,"C3","MAP_BONFIRE_SPIRE_SLIME_SHANTY",160,417.5,["bonfire_spire-C2","bonfire_spire-D3","bonfire_spire-B2"],B),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}init(k,B,U,F){return this.zone.processLavaLayers(this),this.enableLayerID(3,!1),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1084,y:60,w:145,h:120,rect:!0},"bonfire_spire-C2",1100,597.5,null,LT.K.UP,!1),B.addClickableMoveEvent(1015,0,145,120,1120,20,null,null,0,null),this.addAreaEvent(k,B,{x:1268,y:519,w:24,h:158,rect:!0},"bonfire_spire-D3",180,377.5,null,LT.K.RIGHT,!1),B.addClickableMoveEvent(1256,440,24,158,1270,520,null,null,0,null),this.addAreaEvent(k,B,{x:32,y:417,w:64,h:210,rect:!0},"bonfire_spire-B2",1060,342.5,null,LT.K.LEFT,!1),B.addClickableMoveEvent(0,312,64,210,22,414,null,null,0,null)}}class qT extends kT{constructor(k,B){super(k,"C4","MAP_BONFIRE_SPIRE_LAVA_PITS",110,397.5,["bonfire_spire-D4","bonfire_spire-B4"],B),this.leverNumber=3,this.battleBG="battle-bonfire-inside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1230,y:480,w:100,h:180,rect:!0},"bonfire_spire-D4",220,467.5,null,LT.K.RIGHT,!1),this.addAreaEvent(k,B,{x:40,y:360,w:80,h:150,arrowOffsetY:-20,rect:!0},"bonfire_spire-B4",1150,450,null,LT.K.LEFT,!1)}canRegularMonsterSpawn(){return!this.zone.isOnQuest(11)}}class KT extends kT{constructor(k,B){super(k,"C6","MAP_BONFIRE_SPIRE_THRONE_ROOM_ENTRANCE",250,400,["bonfire_spire-D5","bonfire_spire-D6","bonfire_spire-B5"],B.concat([q._.Npc_sprite_cebollini_json,q._.Npc_sprite_slime_guard_json])),this.battleBG="battle-bonfire-lava"}init(k,B,U,F){const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("key",12)>0;return this.enableLayerID(1,!G),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1250,y:510,w:60,h:300,rect:!0},"bonfire_spire-D6",350,557.5,null,LT.K.RIGHT,!1),this.addAreaEvent(k,B,{x:100,y:401,w:200,h:250,rect:!0},"bonfire_spire-B5",1120,527.5,null,LT.K.LEFT,!1),B.addClickableMoveEvent(0,276,200,250,160,380,null,null,0,null),this.addAreaEvent(k,B,{x:880,y:211,w:190,h:190,rect:!0},"bonfire_spire-D5",220,480,null,LT.K.UP,!1),B.addClickableMoveEvent(785,116,190,190,880,305,null,null,0,null),this.addChest(k,B,"chest5",400,290)}}class zT extends kT{constructor(k,B){super(k,"D1","MAP_BONFIRE_SPIRE_PALM_TERRACE",260,382.5,["bonfire_spire-C1"],B),this.leverNumber=1,this.battleBG="battle-bonfire-outside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:100,y:359.5,w:200,h:235,rect:!0},"bonfire_spire-C1",1200,430,null,LT.K.LEFT,!1),B.addClickableMoveEvent(0,242,200,235,98,420,null,null,0,null),this.toggleDynamicLayer(k,3,1===this.zone.getState("lever1"),0),this.toggleDynamicLayer(k,4,1!==this.zone.getState("lever1"),0),B.addClickableEvent(840,240,120,100,this.zone.toggleLever.bind(this.zone,B,0,this,{x:800,y:300})),this.zone.sendSegmentEvents("World Object Discovered",{object_type:Kn.u_.LeverSwitch,object_id:"0",x_coord:840,y_coord:240})}}class YT extends kT{constructor(k,B){super(k,"D2","MAP_BONFIRE_SPIRE_VOLCANIC_SANCTUM",180,292.5,["bonfire_spire-C1"],B),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:60,y:242.5,w:120,h:235,rect:!0},"bonfire_spire-C1",1145,657.5,null,LT.K.LEFT,!1),B.addClickableMoveEvent(0,125,120,235,52,280,null,null,0,null),this.addWizard(k,B,725,500,"wizard1",38,!0),this.addChest(k,B,"chest2",800,500)}}class QT extends kT{constructor(k,B){super(k,"D3","MAP_BONFIRE_SPIRE_MOLTEN_ENCLAVE",180,377.5,["bonfire_spire-C3"],B),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:60,y:322.5,w:120,h:235,rect:!0},"bonfire_spire-C3",1100,515,null,LT.K.LEFT,!1),B.addClickableMoveEvent(0,205,120,235,52,360,null,null,0,null),this.addWizard(k,B,740,400,"wizard2",39,!0),this.addChest(k,B,"chest3",840,415)}}class XT extends kT{constructor(k,B){super(k,"D4","MAP_BONFIRE_SPIRE_OUTER_SLIMEBURBIA",220,467.5,["bonfire_spire-C4"],B.concat([q._.Zone_lamplight_json])),this.leverNumber=3,this.battleBG="battle-bonfire-outside"}init(k,B,U,F){return this.zone.processLavaLayers(this),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:100,y:421,w:200,h:210,rect:!0},"bonfire_spire-C4",1120,460,null,LT.K.LEFT,!1),B.addClickableMoveEvent(0,316,200,210,102,500,null,null,0,null),this.toggleDynamicLayer(k,3,1===this.zone.getState("lever3"),0),this.toggleDynamicLayer(k,4,1!==this.zone.getState("lever3"),0),B.addClickableEvent(960,260,120,80,this.zone.toggleLever.bind(this.zone,B,2,this,{x:920,y:320})),this.zone.sendSegmentEvents("World Object Discovered",{object_type:Kn.u_.LeverSwitch,object_id:"2",x_coord:200,y_coord:120})}}class ZT extends kT{constructor(k,B){super(k,"D5","MAP_BONFIRE_SPIRE_THRONE_ROOM",220,480,["bonfire_spire-E6","bonfire_spire-C6"],B.concat([q._.Npc_sprite_slurpy_json,q._.Npc_sprite_cebollini_json,q._.Npc_sprite_slime_worker_json,J.Q.Spine_npc_slimeguard_json,J.Q.Spine_npc_slimequeen_json])),this.queen=null,this.gaurd=null,this.battleBG="battle-bonfire-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1180,y:501,w:200,h:210,rect:!0},"bonfire_spire-E6",180,547.5,null,LT.K.RIGHT,!1),B.addClickableMoveEvent(1080,396,200,210,1210,580,null,null,0,null),this.addAreaEvent(k,B,{x:200,y:635,w:200,h:180,rect:!0},"bonfire_spire-C6",900,355,null,LT.K.DOWN,!1),this.gaurd=new Zw.p(k,"NPC_NAME_GUARD_SLIME",494,Kn.ac.Guard,B.content,570,430,"idle"),this.gaurd.onClick.add(this.talkToGuard,this),this.queen=new Zw.p(k,"NPC_NAME_QUEEN_GOO_LIA",492,Kn.ac.Boss,B.content,645,282,"idle"),this.queen.onClick.add(this.talkToQueen,this)}talkToGuard(){const k=K.q.instance.prodigy.event.create();k.text(5,"slime_guard"),k.start()}talkToQueen(){const k=K.q.instance.prodigy.event.create();k.text(10,"slime_queen"),k.text(),k.text(5,"slime_guard"),k.start()}}class JT extends kT{constructor(k,B){super(k,"D6","MAP_BONFIRE_SPIRE_GARDEN_GETAWAY",330,510,["bonfire_spire-C6"],B.concat([q._.Zone_lamplight_json,q._.Npc_sprite_cebollini_json])),this.battleBG="battle-bonfire-lava"}init(k,B,U,F){const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("key",12)>0;return this.enableLayerID(1,!G),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:70,y:500,w:140,h:250,rect:!0},"bonfire_spire-C6",1080,480,null,LT.K.LEFT,!1)}}class tS extends kT{constructor(k,B){super(k,"E5","MAP_BONFIRE_SPIRE_FIERY_ALCOVE",115,510,["bonfire_spire-E6"],B.concat([q._.Zone_lamplight_json])),this.battleBG="battle-bonfire-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:160,y:655,w:160,h:130,rect:!0},"bonfire_spire-E6",1160,162.5,null,LT.K.DOWN,!1),this.addChest(k,B,"chest6",800,368)}}class eS extends kT{constructor(k,B){super(k,"E6","MAP_BONFIRE_SPIRE_ROYAL_KITCHEN",180,547.5,["bonfire_spire-E5","bonfire_spire-D5"],B.concat([q._.Npc_sprite_cebollini_json])),this.battleBG="battle-bonfire-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1100,y:65,w:160,h:130,rect:!0},"bonfire_spire-E5",120,512.5,null,LT.K.UP,!1),B.addClickableMoveEvent(1e3,0,160,130,1120,120,null,null,0,null),this.addAreaEvent(k,B,{x:50,y:500,w:100,h:170,guideHandPathToX:100,guideHandPathToY:480,rect:!0},"bonfire_spire-D5",1020,500,null,LT.K.LEFT,!1),B.addClickableMoveEvent(0,415,100,170,100,480,null,null,0,null)}}class iS extends Pn.T{constructor(k,B,U){super(k,B,1,"QUESTS_BONFIRE_SPIRE_PULL_LEVER",{type:"seq",N:1},["bonfire_spire-D1"],[511,512,513,514],[],[509],U)}process(k,B,U){super.process(k,B,U),this.zone.isQuestComplete(1)||(this.zone.processLeverRequirements(B,U,[1,null,null]),this.zone.processLeverQuest(B,1))}}class sS extends Pn.T{constructor(k,B,U){super(k,B,10,"QUESTS_BONFIRE_SPIRE_OFFER_DISH",{type:"seq",N:1},["bonfire_spire-C6"],[536,537],[],[509],U)}start(k,B,U){if(super.start(k,B,U),"C6"===U.getTag()&&this.zone.isOnSequence(10,0)){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=U.addConstructedNPC(k,B,885,340,q._.Npc_sprite_cebollini_json,null,"NPC_NAME_CEBOLLINI");G.visible=!1;const j=K.q.instance.prodigy.event.create();j.enableInput(!1),j.set(B.user,"evtProc",!0),j.validPath(B.user,B.path,650,420),j.enableInput(!0),j.text(5,"cebollini"),j.set(G,"visible",!0),j.text(6,"cebollini"),j.text(7,"cebollini"),j.enableInput(!1),j.validPath(G,B.path,650,420),j.function(F.backpack.consume.bind(F.backpack,"item",91,1)),j.path(G,[{x:K.q.instance.game.width,y:510}]),j.set(G,"visible",!1),j.enableInput(!0),j.text(104,"noot"),j.text(105,"noot"),j.text(106,"noot"),j.function(this.zone.completeSequence.bind(U.zone,10,0)),j.function(B.process.bind(B)),j.set(B.user,"evtProc",!1),j.start()}return null}}class nS extends Pn.T{constructor(k,B,U){super(k,B.concat(q._.Npc_sprite_noot_json),11,"QUESTS_BONFIRE_SPIRE_FIND_KEY",{type:"item",ID:92,N:1,K:1},["bonfire_spire-C4"],[538,539,540,541,542,543],[],[509,510],U)}setup(k,B,U){super.setup(k,B,U);const F={randDir:!0,encounter:[{ID:75}],drops:this.hasDefeatedPuck()?[{type:"item",ID:92}]:void 0,difficulty:5,maxTeamSize:1,unique:!0,isQuestEncounter:!0,showGuideHand:!0},G=U.getTag();if("C4"===G&&!this.zone.isQuestComplete(11))return K.q.instance.prodigy.prefabFactory.addMonster(U,480,480,1,F).catch(j.RQr.createHandler("Could not add monster 0 for Bonfire Q11")),K.q.instance.prodigy.prefabFactory.addMonster(U,840,240,2,F).catch(j.RQr.createHandler("Could not add monster 1 for Bonfire Q11")),{enableMonsters:!1};if("A4"===G){const F=U.addChest(k,B,"chestGuardian",742,236,{type:"item",ID:92});return F.chestSprite.events.onInputDown.removeAll(),F.chestSprite.events.onInputDown.add((()=>{const k=K.q.instance.prodigy.event.create();k.text(111,"noot"),k.start()})),{enableChests:!1}}}hasDefeatedPuck(){const k=this.zone.getQuestState().state;return Object.keys(k).some((B=>k[B]>0))}}class aS extends Pn.T{constructor(k,B,U){super(k,B,12,"QUESTS_BONFIRE_SPIRE_UNLOCK_CHEST",{type:"key",ID:12,N:1},["bonfire_spire-A4"],[544,545,546],[],[509],U),this.chest=null,this.chestElement=null}setup(k,B,U){super.setup(k,B,U);return"A4"===U.getTag()&&this.zone.isOnQuest(12)?(this.zone.isOnSequence(12,0)?(this.chest=B.content.addChild(K.q.instance.prodigy.create.sprite(800,225,q._.Tileset_core_json,"chest-B-1")),this.chest.inputEnabled=!0,this.chest.events.onInputDown.add((()=>{this.openTheChest(k,B,U)}),this),this.chest.anchor.set(.5,1),this.chestElement=K.q.instance.prodigy.create.element(B.foreground,745,135),j.Aq$.isDefined(this.chestElement)&&(this.chestElement.highlight(!0),this.chestElement.visible=!0)):this.zone.isOnSequence(12,1)&&U.addChest(k,B,"chestGuardian",800,225,{type:"item",ID:92}),{enableChests:!1}):null}openTheChest(k,B,U){const F=U.addMonster(k,B,0,725,250,!1,{randDir:!1,encounter:[{ID:65}],difficulty:5,maxTeamSize:1},!0);F.visible=!1,F.alpha=0;const G=K.q.instance.prodigy.event.create();G.validPath(B.user,B.path,800,250),G.enableInput(!1),G.set(B.user,"evtProc",!0),G.set(F,"alpha",0),G.function((()=>{F.visible=!0,k.add.tween(F,this).to({alpha:1},1e3,j.GS3.Linear.None).start()})),G.delay(2e3),G.enableInput(!0),G.function((()=>{K.q.instance.prodigy.battle.start({intro:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_DEFEAT_GUARDIAN"),screen:"battle-bonfire-outside",pets:[{ID:65,nickname:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_GUARDIAN")}]},null,(()=>{this.zone.completeSequence(12,0),K.q.instance.prodigy.world.it("bonfire_spire-A4",800,270)}),null,this.zone.defaultOnFaint)})),G.start()}}class rS extends Pn.T{constructor(k,B,U){super(k,B,13,"QUESTS_BONFIRE_SPIRE_DEFEAT_CHEF",{type:"seq",N:2},["bonfire_spire-D6"],[547,548,549],[],[509],U)}setup(k,B,U){if(super.setup(k,B,U),"D6"===U.getTag()){return U.addConstructedNPC(k,B,850,400,q._.Npc_sprite_cebollini_json,(()=>{const k=K.q.instance.prodigy.event.create();k.text(14,"cebollini"),k.text(15,"cebollini"),k.start()}),"NPC_NAME_CEBOLLINI").flip(),{enableMonsters:!1}}return null}start(k,B,U){return super.start(k,B,U),"D6"===U.getTag()&&this.zone.isOnSequence(13,0)?this.bossBattle(k,B,U):"D6"===U.getTag()&&this.zone.isOnSequence(13,1)&&this.postBattle(k,B),null}bossBattle(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),G=F.getValue("cebolliniMaxHP",Vt.s.get("GameConstants.Cebollini.MAX_HP")),$=null===G?void 0:parseInt(G,10),H=K.q.instance.prodigy.event.create();K.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle";const V=this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_BOSS_BATTLE"),{boss:{ID:13,maxHP:$,element:"fire",attacks:[55,58],name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_CEBOLLINI"),tag:"bonfire"},difficulty:parseInt(F.getValue("CebolliniDifficulty",Vt.s.get("GameConstants.Cebollini.DIFFICULTY")),10),drops:[{type:"weapon",ID:16}],starMod:5,screen:"battle-bonfire-lava",events:[{action:"turn",value:1,callback:(k,B)=>{const U=K.q.instance.prodigy.dialogue.create();U.setText(10),U.startDeprecated("cebollini",!1,B)}}]},(()=>{const k=K.q.instance.prodigy.event.create();k.function(this.zone.completeSequence.bind(this.zone,13,0)),k.function(K.q.instance.prodigy.world.it.bind(K.q.instance.prodigy.world,"bonfire_spire-D6")),k.start()}),(()=>{H.function(K.q.instance.prodigy.world.it.bind(K.q.instance.prodigy.world,"bonfire_spire-C6",1060,500)),H.start()}));H.enableInput(!1),H.validPath(B.user,B.path,399,400),H.validPath(B.user,B.path,400,400),H.enableInput(!0),H.text(8,"cebollini"),H.text(9,"cebollini"),H.function(V),H.start()}postBattle(k,B){const U=K.q.instance.prodigy.event.create();U.text(13,"cebollini"),U.text(14,"cebollini"),U.text(),U.text(107,"noot"),U.text(),U.text(15,"cebollini"),U.function(this.zone.completeSequence.bind(this.zone,13,1)),U.function(B.process.bind(B)),U.start()}}class oS extends Pn.T{constructor(k,B,U){super(k,B.concat(J.Q.Spine_npc_slurpy_json,Z.c.Sfx_bonfire_spire_q6_and_q14),14,"QUESTS_BONFIRE_SPIRE_TALK_TO_QUEEN",{type:"seq",N:1},["bonfire_spire-D5"],[550,551],[],[554,555,510,556],U)}start(k,B,U){if(super.start(k,B,U),"D5"===U.getTag()&&this.zone.isOnSequence(14,0)){const F=B.foreground.addChild(K.q.instance.prodigy.create.sprite(690,250,q._.Zone_bonfire_json,"food"));F.visible=!1;const G=U.addConstructedNPC(k,B,720,490,"npc-sprite-worker-slime-red",null,"NPC_NAME_WORKER_SLIME"),j=new Zw.p(k,"NPC_NAME_SLURPY",493,Kn.ac.Boss,B.content,530,310,"animation"),$=U.addConstructedNPC(k,B,835,390,q._.Npc_sprite_cebollini_json,null,"NPC_NAME_CEBOLLINI");$.flip();const H=K.q.instance.prodigy.event.create();H.text(108,"noot"),H.text(),H.text(5,"slime_queen"),H.text(),H.text(16,"cebollini"),H.text(),H.function((()=>{U.queen.flip()})),H.text(6,"slime_queen"),H.enableInput(!1),H.path(G,[{x:730,y:350}],1,!0),H.delay(1e3),H.set(F,"visible",!0),H.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,F,"-70","-200","+100",2e3,!0,!0)),H.delay(2e3),H.sound(10,"eating"),H.delay(2e3),H.enableInput(!0),H.text(7,"slime_queen"),H.function($.chat.bind($,1,100)),H.function((()=>{U.queen.flip()})),H.text(8,"slime_queen"),H.text(),H.text(43,"slurpy"),H.text(44,"slurpy"),H.enableInput(!1),H.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"+100","-100","+250",1e3,!1,!0),!0),H.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"-100","-100","+200",1e3,!1,!0),!0),H.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"-150","-100","+100",1e3,!1,!0),!0),H.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"-120","-150","+150",1e3,!1,!0),!0),H.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"-180","-150","+300",1e3,!0,!0),!0),H.enableInput(!0),H.text(),H.function((()=>{U.queen.flip()})),H.text(17,"cebollini"),H.text(18,"cebollini"),H.text(),H.text(9,"slime_queen"),H.text(),H.text(19,"cebollini"),H.function(this.zone.completeSequence.bind(U.zone,14,0)),H.function(B.process.bind(B)),H.start()}return null}}class hS extends Pn.T{constructor(k,B,U){super(k,B,2,"QUESTS_BONFIRE_SPIRE_PULL_LEVER",{type:"seq",N:1},["bonfire_spire-C2"],[515,516],[],[509],U)}process(k,B,U){super.process(k,B,U),this.zone.isQuestComplete(2)||(this.zone.processLeverRequirements(B,U,[1,1,null]),this.zone.processLeverQuest(B,2))}}class cS extends Pn.T{constructor(k,B,U){super(k,B,3,"QUESTS_BONFIRE_SPIRE_PULL_LEVER",{type:"seq",N:1},["bonfire_spire-D4"],[517,518],[],[509],U)}process(k,B,U){super.process(k,B,U),this.zone.isQuestComplete(3)||(this.zone.processLeverRequirements(B,U,[1,1,1]),this.zone.processLeverQuest(B,3))}}class dS extends Pn.T{constructor(k,B,U){super(k,B,4,"",{type:"item",ID:88,N:1,K:!0},["bonfire_spire-C3"],[519,520,521],[],[509],U,null,"QUESTS_BONFIRE_RETRIEVE_INGREDIENT"),this.collectionMaps={C3:[0]}}setup(k,B,U){return super.setup(k,B,U),"C3"===U.getTag()&&B.addCollect(0,950,250,{type:"item",ID:88,showLoading:!1}),null}}class lS extends Pn.T{constructor(k,B,U){super(k,B.concat([Z.c.Sfx_bonfire_spire_q5]),5,"QUESTS_BONFIRE_SPIRE_ADD_INGREDIENT",{type:"seq",N:1},["bonfire_spire-E6"],[522,523],[],[509,510],U),this.food=null,this.cebollini=null,this.cebollini2=null,this.cookingPot=null,this.caught=!1,this.foodPlaced=!1,this.hover=!1,this.cookingPotHighlight=null,this.visionCone=null,this.button=null,this.buttonIcon=null,this.pot=null}setup(k,B,U){return super.setup(k,B,U),"E6"!==U.getTag()||this.zone.isQuestComplete(5)?null:(this.food=B.foreground.addChild(K.q.instance.prodigy.create.sprite(650,180,Ut.E.getIconForType("item",88))),this.food.visible=!1,this.cebollini=U.addConstructedNPC(k,B,580,370,q._.Npc_sprite_cebollini_json,null,"NPC_NAME_CEBOLLINI"),this.cebollini2=U.addConstructedNPC(k,B,this.cebollini.x,this.cebollini.y,q._.Npc_sprite_cebollini_json,null,"NPC_NAME_CEBOLLINI"),this.cebollini2.visible=!1,this.caught=!1,this.foodPlaced=!1,this.hover=!1,this.cookingPot=B.content.addChild(K.q.instance.prodigy.create.sprite(740,234,q._.Zone_bonfire_json,"pot")),this.cookingPot.anchor.set(.5,1),this.cookingPot.inputEnabled=!0,this.cookingPot.events.onInputDown.add((()=>{this.potClick(k,B)})),this.cookingPotHighlight=un.o.highlightObjectOnLayer(k,810,130,null,B.content),U.toggleDynamicLayer(k,5,!0,0),this.visionCone=B.background.addChild(K.q.instance.prodigy.create.sprite(this.cebollini.x,this.cebollini.y-25,q._.Zone_bonfire_json,"visioncone")),this.visionCone.scale.set(2,2),this.visionCone.anchor.set(.5,.5),this.visionCone.smoothed=!0,this.button=B.content.addChild(K.q.instance.prodigy.create.sprite(B.user.x-40,B.user.y-200,q._.General_icons_json,"icon-base-active")),this.button.inputEnabled=!0,this.button.events.onInputDown.add((()=>{this.hideButtonClick(k,B)}),this),this.buttonIcon=B.content.addChild(K.q.instance.prodigy.create.sprite(B.user.x-40,B.user.y-200,q._.Zone_bonfire_json,"cauldron-icon")),this.button.events.onInputOver.add((()=>{this.hover=!0})),this.button.events.onInputOut.add((()=>{this.hover=!1})),this.pot=B.content.addChild(K.q.instance.prodigy.create.sprite(B.user.x,B.user.y,q._.Zone_bonfire_json,"cauldron")),this.pot.anchor.set(.5,1),this.pot.visible=!1,{enableMonsters:!1})}start(k,B,U){return super.start(k,B,U),"E6"!==U.getTag()||this.zone.isQuestComplete(5)||(this.tutorial(k),this.cebollini.patrol([{x:920,y:260},{x:680,y:400},{x:930,y:450},{x:790,y:300},{x:720,y:490},{x:640,y:300}],.5)),null}update(k,B,U){if("E6"===U.getTag())if(this.zone.isQuestComplete(5))j.Aq$.isDefined(this.visionCone)&&(this.visionCone.visible=!1,delete this.visionCone,j.Aq$.isDefined(this.button)&&this.button.destroy(),j.Aq$.isDefined(this.buttonIcon)&&this.buttonIcon.destroy());else{this.button.x=B.user.x-40,this.button.y=B.user.y-200,this.hover?this.buttonIcon.y=B.user.y-190:this.buttonIcon.y=B.user.y-187,this.buttonIcon.x=B.user.x-27,this.caught?this.visionCone.visible=!1:(this.visionCone.visible=!0,this.visionCone.x=this.cebollini.x,this.visionCone.y=this.cebollini.y-25),this.pot.x===B.user.x&&this.pot.y===B.user.y||(this.pot.visible=!1,this.button.visible=!0,this.buttonIcon.visible=!0,B.user.visible=!0,this.pot.x=B.user.x,this.pot.y=B.user.y);const U=(B.user.x-(this.cebollini.x-5))*(B.user.x-(this.cebollini.x-5))+(B.user.y-(this.cebollini.y-25))*(B.user.y-(this.cebollini.y-25));if(this.caught&&(this.foodPlaced||(this.cebollini.visible=!1,this.cebollini2.visible||(this.cebollini2.scale.x=this.cebollini.scale.x,this.cebollini2.x=this.cebollini.x,this.cebollini2.y=this.cebollini.y,this.cebollini2.visible=!0)),this.visionCone.visible=!1),U<22500&&!this.pot.visible&&!this.caught&&(this.caught=!0,!this.foodPlaced)){const U=new Ti.rD(k);k.input.enabled=!1,B.user.setValidPath(B.path,B.user.x,B.user.y,null),k.input.enabled=!0,U.addEvents([{dialogueData:U.dataProvider.getLegacy("cebollini",0),blockInput:!0},{callback:()=>{K.q.instance.prodigy.world.it("bonfire_spire-E6")}}]),U.start()}}}tutorial(k){if(!j.Aq$.isDefined(this.zone.getState("minigametut"))){this.zone.setState("minigametut",1);const k=K.q.instance.prodigy.event.create();k.text(112,"noot"),k.text(113,"noot"),k.text(114,"noot"),k.text(115,"noot"),k.text(116,"noot"),k.start()}}hideButtonClick(k,B){if(!this.caught){const k=K.q.instance.prodigy.event.create();k.validPath(B.user,B.path,B.user.x,B.user.y),k.delay(50),k.function(K.q.instance.prodigy.audio.playSFX.bind(K.q.instance.prodigy.audio,18,"pop")),k.set(this.pot,"visible",!0),k.set(B.user,"visible",!1),k.set(this.button,"visible",!1),k.set(this.buttonIcon,"visible",!1),k.enableInput(!0),k.start()}}potClick(k,B){if(!this.foodPlaced){const k=K.q.instance.prodigy.event.create(),U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.validPath(B.user,B.path,700,240),k.enableInput(!1),k.set(this.food,"visible",!0),k.set(this,"foodPlaced",!0),k.set(this.button,"visible",!1),k.set(this.buttonIcon,"visible",!1),k.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,this.food,"+50","-200","+100",2e3,!0,!0)),k.function(this.cookingPotHighlight.destroy.bind(this.cookingPotHighlight)),k.delay(2350),k.sound(9,"plop"),k.sound(9,"cooking"),k.enableInput(!0),k.function(U.backpack.consume.bind(U.backpack,"item",88,1)),k.function(this.zone.completeSequence.bind(this.zone,5,0)),k.function(B.process.bind(B)),k.start()}}}class uS extends Pn.T{constructor(k,B,U){super(k,B.concat(Z.c.Sfx_bonfire_spire_q6_and_q14),6,"QUESTS_BONFIRE_SPIRE_ATTEND_DINNER",{type:"seq",N:1},["bonfire_spire-D5"],[524,525],[],[509],U)}start(k,B,U){if(super.start(k,B,U),"D5"===U.getTag()&&this.zone.isOnSequence(6,0)){const F=B.foreground.addChild(K.q.instance.prodigy.create.sprite(690,250,q._.Zone_bonfire_json,"food"));F.visible=!1;const G=U.addConstructedNPC(k,B,720,490,"npc-sprite-worker-slime-red",null,"NPC_NAME_WORKER_SLIME"),j=U.addConstructedNPC(k,B,500,330,q._.Npc_sprite_cebollini_json,null,"NPC_NAME_CEBOLLINI",B.foreground),$=K.q.instance.prodigy.event.create();$.text(0,"slime_guard"),$.function((()=>{U.queen.flip()})),$.enableInput(!1),$.path(G,[{x:730,y:350}],1,!0),$.delay(1e3),$.enableInput(!0),$.text(0,"slime_queen"),$.enableInput(!1),$.enableInput(!0),$.text(1,"cebollini"),$.enableInput(!1),$.set(F,"visible",!0),$.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,F,"-80","-200","+100",2e3,!0,!0)),$.delay(2e3),$.sound(10,"eating"),$.delay(2e3),$.enableInput(!0),$.text(1,"slime_queen"),$.function((()=>{U.queen.flip()})),$.text(2,"slime_queen"),$.enableInput(!1),$.set(F,"alpha",1),$.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,F,"-90","-50","+150",600,!0,!0)),$.delay(1e3),$.enableInput(!0),$.text(2,"cebollini"),$.text(),$.text(3,"slime_queen"),$.text(4,"slime_queen"),$.text(),$.text(3,"cebollini"),$.enableInput(!1),$.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"+200","-100","+220",1e3,!1,!0),!0),$.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"+100","-100","+150",1e3,!1,!0),!0),$.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"+150","-100","+100",1e3,!1,!0),!0),$.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"+200","-200","+230",1e3,!1,!0),!0),$.enableInput(!0),$.text(4,"cebollini"),$.enableInput(!1),$.animation(K.q.instance.prodigy.animation.hop.bind(K.q.instance.prodigy.animation,j,"+60","-100","+200",1e3,!0,!0),!0),$.enableInput(!0),$.text(103,"noot"),$.function(this.zone.completeSequence.bind(U.zone,6,0)),$.function(B.process.bind(B)),$.start()}return null}}class fS extends Pn.T{constructor(k,B,U){super(k,B,7,"",{type:"item",ID:89,N:3},["bonfire_spire-D1","bonfire_spire-C2","bonfire_spire-D4"],[526,527,528,529,530],[],[509],U,null,"QUESTS_BONFIRE_COLLECT_COOKING_SUPPLIES"),this.collectionMaps={D1:[0],C2:[1],D4:[2]}}setup(k,B,U){super.setup(k,B,U);const F=U.getTag();return"D1"===F?B.addCollect(0,640,480,{type:"item",ID:89,showLoading:!1}):"C2"===F?B.addCollect(1,670,265,{type:"item",ID:89,showLoading:!1}):"D4"===F&&B.addCollect(2,640,360,{type:"item",ID:89,showLoading:!1}),null}}var bS=U(25308);class pS extends Pn.T{constructor(k,B,U){super(k,B.concat(X.V.Bgm_puppetmaster),7,"",{type:"item",ID:89,N:3},["bonfire_spire-D1","bonfire_spire-C2","bonfire_spire-D4"],[526,527,528,529,530],[],[509],U,null,"QUESTS_BONFIRE_COLLECT_COOKING_SUPPLIES"),this.collectionMaps={D1:[0],C2:[1],D4:[2]}}setup(k,B,U){super.setup(k,B,U);const F=U.getTag();if("D1"===F)B.addCollect(0,640,480,{type:"item",ID:89,showLoading:!1});else if("C2"===F)B.addCollect(1,670,265,{type:"item",ID:89,showLoading:!1});else if("D4"===F)return U.zone.getState(Zu.PIPPET_DEFEATED)||(k.input.enabled=!1,this.addPippetEncounter(U.zone)),(U.zone.getState(Zu.PIPPET_REMATCH)||U.zone.getState(Zu.PIPPET_DEFEATED))&&B.addCollect(2,640,360,{type:"item",ID:89,showLoading:!1}),{enableMonsters:!1,enableWizards:!1};return null}addPippetEncounter(k){K.q.instance.prodigy.prefabFactory.createPippetQuestEncounter(k,204,bS.e.Bonfire_spire_quests_encounter).catch(j.RQr.createHandler("Error loading Pippet Miniboss Encounter for Bonfire Q7"))}}class vS extends Pn.T{constructor(k,B,U){super(k,B,8,"QUESTS_BONFIRE_SPIRE_TALK_TO_GUARDS",{type:"seq",N:1},["bonfire_spire-C6"],[531,532,533],[],[509],U)}start(k,B,U){if(super.setup(k,B,U),"C6"===U.getTag()&&this.zone.isOnSequence(8,0)){const U=new Ti.rD(k),F=B.addNPC(430,380,q._.Npc_sprite_slime_guard_json,Kn.ac.Guard,null,"NPC_NAME_HANK"),G=B.addNPC(650,520,q._.Npc_sprite_slime_guard_json,Kn.ac.Guard,null,"NPC_NAME_MIKE");F.animate(),G.animate(),U.addEvents([{callback:()=>{F.hop(100,(()=>{F.hop(100,null,0,20)}),0,20)}},{dialogueData:U.dataProvider.get(502),blockInput:!0},{callback:()=>{G.hop(100,(()=>{G.hop(100,null,0,20)}),0,20)}},{dialogueData:U.dataProvider.get(503),blockInput:!0},{callback:()=>{F.hop(100,(()=>{F.hop(100,null,0,20)}),0,20)}},{dialogueData:U.dataProvider.get(504),blockInput:!0},{callback:()=>{G.hop(100,(()=>{G.hop(100,null,0,20)}),0,20)}},{dialogueData:U.dataProvider.get(505),blockInput:!0},{callback:()=>{this.zone.completeSequence(8,0),B.process()}}]),U.start()}return null}}class gS extends Pn.T{constructor(k,B,U){super(k,B.concat(J.Q.Spine_npc_slimeworker_json),9,"QUESTS_BONFIRE_SPIRE_SAVE_GATHERERS",{type:"item",ID:90,N:2},["bonfire_spire-A4"],[534,535],[],[509],U),this.slimeNPCs=[],this.slimeNPCHighlights=[]}setup(k,B,U){super.setup(k,B,U),this.slimeNPCs=[],this.slimeNPCHighlights=[];const F={encounter:[{ID:48}],ignorePathfindingForAlert:!0,difficulty:4,maxTeamSize:1};if("A4"===U.getTag()){const G=70,$=-120;if(this.zone.getState("turnip1"))this.slimeNPCs[0]=new Zw.p(k,"NPC_NAME_WORKER_SLIME",496,Kn.ac.Guard,B.content,825,205,"idle-no-turnip");else{this.slimeNPCs.push(new Zw.p(k,"NPC_NAME_WORKER_SLIME",496,Kn.ac.Guard,B.content,825,205,"idle")),this.slimeNPCs[0].onClick.add((()=>{this.interactSlime(k,B,0)}),this),this.slimeNPCHighlights[0]=un.o.highlightObjectOnLayer(k,G,$,this.slimeNPCs[0],B.foreground);const H=U.addMonster(k,B,3,935,200,!0,F);j.Aq$.isDefined(H)&&H.flip()}if(this.zone.getState("turnip2"))this.slimeNPCs[1]=new Zw.p(k,"NPC_NAME_WORKER_SLIME",496,Kn.ac.Guard,B.content,370,440,"idle-no-turnip");else{this.slimeNPCs.push(new Zw.p(k,"NPC_NAME_WORKER_SLIME",496,Kn.ac.Guard,B.content,370,440,"idle")),this.slimeNPCs[1].onClick.add((()=>{this.interactSlime(k,B,1)}),this),this.slimeNPCHighlights[1]=un.o.highlightObjectOnLayer(k,G,$,this.slimeNPCs[1],B.content);const H=U.addMonster(k,B,4,480,450,!0,F);j.Aq$.isDefined(H)&&H.flip()}}return null}start(k,B,U){if("A4"===U.getTag()&&this.zone.isOnSequence(9,0)){this.zone.completeSequence(9,0);const k=K.q.instance.prodigy.event.create();k.text(0,"slime_worker"),k.start()}return null}interactSlime(k,B,U){if(!this.zone.getState(0===U?"turnip1":"turnip2")){const F=K.q.instance.prodigy.event.create(),G=this.slimeNPCs[U].x,j=this.slimeNPCs[U].y;F.validPath(B.user,B.path,G+81,j),F.validPath(B.user,B.path,G+80,j),F.text(1,"slime_worker"),F.function((()=>{this.slimeNPCHighlights[U].destroy()})),F.function((()=>{this.slimeNPCs[U].destroy(),this.slimeNPCs[U]=new Zw.p(k,"NPC_NAME_WORKER_SLIME",496,Kn.ac.Guard,B.content,G,j,"idle-no-turnip")})),F.function((()=>{K.q.instance.prodigy.open.gotItem([{type:"item",ID:90,N:1}],B.process.bind(B))})),F.function(this.zone.setState.bind(this.zone,0===U?"turnip1":"turnip2",1)),F.start()}}}class mS extends vn.b{constructor(k){super(k),this.questManagerIdentifier="474-b78a",this._assets=[],this.name="Bonfire Spire",this.ID=hn.A_.BONFIRE,this.guardian="BONFIRE_GUARDIAN",this.battleBG="battle-bonfire-outside",this.defaultOnFaint="bonfire_spire-B1",this.questHub="bonfire_spire-B1",this.bgmID=14,this.currency=12,this.zoneIndex=pT.P.Bonfire,this.states=["chest1","chest2","chest3","chest4","chest5","chest6","chestGuardian","wizard1","wizard2","lever1","lever2","lever3","turnip1","turnip2","minigametut",Zu.PIPPET_ENCOUNTER,Zu.PIPPET_REMATCH,Zu.PIPPET_DEFEATED];const B=[Rn.t.Tileset_bonfire_png,Rn.t.Tileset_cloud_png,Rn.t.Tileset_cloud_new_png,Rn.t.Tileset_volcano_new_png,Rn.t.Tileset_generic_png,q._.Npc_sprite_wizard_json,q._.Zone_bonfire_json,Rn.t.Tileset_collisions_png,X.V.Bgm_bonfire_spire],U={map:"bonfire_spire-Titan",cutscene:"bonfire_spire-titanIntro",harvey:{x:240,y:200},sign:{x:150,y:210},catapult:{x:140,y:400,arcHeight:300},titan:{x:1100,y:390,impactOffset:{x:-130,y:0}},entry:{x:400,y:450},battleBG:[nr.q.Battle_bonfire_inside_bg,nr.q.Battle_bonfire_inside_fg]};this.maps={A1:new BT(this,B),A4:new UT(this,B),B1:new FT(this,B),B2:new GT(this,B),B4:new jT(this,B),B5:new $T(this,B),C1:new HT(this,B),C2:new VT(this,B),C3:new WT(this,B),C4:new qT(this,B),C6:new KT(this,B),D1:new zT(this,B),D2:new YT(this,B),D3:new QT(this,B),D4:new XT(this,B),D5:new ZT(this,B),D6:new JT(this,B),E5:new tS(this,B),E6:new eS(this,B),Titan:new xT(this,B,U)},Promise.all([Cf.T.ready,Gt.R.dataBundleLoadPromise]).then((()=>{this.setZoneRewards()})).catch((k=>{K.q.instance.prodigy.open.messageBoxError("ERROR_LOADING_ZONE",["WORLD_BONFIRE_SPIRE"],k,"Error, unable to load Bonfire Spire Zone Rewards JSON")})),this.scenes={titanIntro:new _T(this,[Rn.t.Tileset_interior_general_png,Rn.t.Tileset_wall_collisions_png,X.V.Bgm_tutorial])}}setZoneRewards(){const k=[Rn.t.Tileset_bonfire_png,Rn.t.Tileset_cloud_png,Rn.t.Tileset_cloud_new_png,Rn.t.Tileset_volcano_new_png,Rn.t.Tileset_generic_png,q._.Npc_sprite_wizard_json,q._.Zone_bonfire_json,Rn.t.Tileset_collisions_png,X.V.Bgm_bonfire_spire],B=(0,yT.mg)(Gt.R.loadData(Ft.r.ZoneRewardsBonfireSpire_json));this.quests={1:new iS(this,k,B.quests.BonfireSpireQ1),2:new hS(this,k,B.quests.BonfireSpireQ2),3:new cS(this,k,B.quests.BonfireSpireQ3),4:new dS(this,k,B.quests.BonfireSpireQ4),5:new lS(this,[],B.quests.BonfireSpireQ5),6:new uS(this,[],B.quests.BonfireSpireQ6),7:ef.arePippetQuestEncountersEnabled?new pS(this,k,B.quests.BonfireSpireQ7):new fS(this,k,B.quests.BonfireSpireQ7),8:new vS(this,k,B.quests.BonfireSpireQ8),9:new gS(this,k,B.quests.BonfireSpireQ9),10:new sS(this,k,B.quests.BonfireSpireQ10),11:new nS(this,k,B.quests.BonfireSpireQ11),12:new aS(this,k,B.quests.BonfireSpireQ12),13:new rS(this,k,B.quests.BonfireSpireQ13),14:new oS(this,[],B.quests.BonfireSpireQ14)}}start(k,B,U){super.start(k,B,U),this.showTopLeftNavigationButton()}createTopLeftNavigationButton(){this.showTopLeftNavigationButton()}processLeverRequirements(k,B,U){this.enableLeverElement(!1);const F=this.getCurrentQuest();let G,$;for(let V=0;V<3;V++){const k=this.getState(`lever${V+1}`);if(j.Aq$.isDefined(U[V])&&U[V]!==k){G=V+1,j.VyI.log(`Required Lever: lever${G}`,j.$bb.Verbose);break}}let H="QUESTS_BONFIRE_SPIRE_PULL_LEVER";switch(G){case 1:$=["bonfire_spire-D1"],this.highlightLever(k,B,"D1",960,203);break;case 2:$=["bonfire_spire-C2"],this.highlightLever(k,B,"C2",320,80);break;case 3:$=["bonfire_spire-D4"],this.highlightLever(k,B,"D4",1080,190);break;default:H=F.descCacheKey,$=F.areaCache}F.area!==$&&(F.area=$,F.descKey=H,j.Aq$.isDefined(this.toggle)&&this.toggle&&(this.toggle=!1,j.VyI.log("Toggled",j.$bb.Verbose),k.process())),j.VyI.log(`Quest Target Area: ${String(F.area)}`,j.$bb.Verbose)}enableLeverElement(k){j.Aq$.isDefined(this.leverGuideHand)&&(this.leverGuideHand.visible=k)}highlightLever(k,B,U,F,G){B.getTag()===U&&(this.leverGuideHand=un.o.highlightObjectOnLayer(this.game,F,G,null,k.content),this.enableLeverElement(!0))}isLeverLocked(k){return!(this.getCurrentQuestID()>14)&&1===this.getState(`lever${k+1}`)}toggleLever(k,B,U,F){if(this.isLeverLocked(B))this.sendSegmentEvents("World Object Failed",{object_type:Kn.u_.LeverSwitch,fail_reason:Kn.kN.QuestNotComplete});else{const G=K.q.instance.prodigy.event.create();G.validPath(k.user,k.path,F.x,F.y,!1),G.function(this.faceLever.bind(this,k)),G.enableInput(!1),G.function(this.bonfireSetStates.bind(this,U,B)),G.shake(0,3e3,10,"v"),G.enableInput(!0),G.function(k.process.bind(k)),G.start(),this.sendSegmentEvents("World Object Used",{object_type:Kn.u_.LeverSwitch})}}faceLever(k){k.user.isFacingLeft()&&k.user.flip()}bonfireSetStates(k,B){const U=1!==this.getState(`lever${B+1}`),F=U?B+1:B;this.setState("lever1",null),this.setState("lever2",null),this.setState("lever3",null);for(let G=0;G0;k.enableLayerID(0,!F),k.enableLayerID(1,F&&!G),k.enableLayerID(2,F)}}cleanup(){this.leverGuideHand&&(this.leverGuideHand.destroy(),this.leverGuideHand=null),super.cleanup()}sendSegmentEvents(k,B){const U=K.q.instance.prodigy.gameContainer.get("c47-20b6");switch(k){case"World Object Discovered":U.gameWorld.sendWorldObjectDiscoveredEvent(B);break;case"World Object Used":U.gameWorld.sendWorldObjectUsedEvent(B);break;case"World Object Failed":U.gameWorld.sendWorldObjectUsedFailedEvent(B)}}}class yS extends kT{constructor(k,B){super(k,"A1","MAP_BONFIRE_SPIRE_VOLCANO_ENTRANCE",865,482,["bonfire_spire_hard-B1"],B),this.leverNumber=1,this.battleBG="battle-bonfire-outside"}}class _S extends kT{constructor(k,B){super(k,"A4","MAP_BONFIRE_SPIRE_PITFALL_TERRACE",1020,400,["bonfire_spire_hard-B4"],B.concat(q._.Npc_sprite_slime_worker_json)),this.wasInsideTriggerLastFrame=!1,this.leverNumber=3,this.battleBG="battle-bonfire-outside"}}class ES extends kT{constructor(k,B){super(k,"B1","MAP_BONFIRE_SPIRE_VOLCANO_VILLAGE",160,307,["bonfire_spire_hard-C1","bonfire_spire_hard-B2","bonfire_spire_hard-A1"],B.concat([q._.Npc_sprite_slurpy_json,q._.Npc_sprite_slime_queen_json,q._.Npc_sprite_slime_guard_json,q._.Npc_sprite_merchant_json,J.Q.Spine_npc_slurpy_json])),this.questNPC=null,this.leverNumber=1,this.battleBG="battle-bonfire-inside"}}class wS extends kT{constructor(k,B){super(k,"B2","MAP_BONFIRE_SPIRE_VOLCANIC_CAVERN",180,117.5,["bonfire_spire_hard-B1","bonfire_spire_hard-C3","bonfire_spire_hard-B4"],B),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}}class TS extends kT{constructor(k,B){super(k,"B4","MAP_BONFIRE_SPIRE_VOLCANO_JUNCTION",1080,117.5,["bonfire_spire_hard-A4","bonfire_spire_hard-B2","bonfire_spire_hard-C4","bonfire_spire_hard-B5"],B),this.leverNumber=3,this.battleBG="battle-bonfire-inside"}}class SS extends kT{constructor(k,B){super(k,"B5","MAP_BONFIRE_SPIRE_RED_HOT_RIVER",150,210,["bonfire_spire_hard-B4","bonfire_spire_hard-C6"],B),this.battleBG="battle-bonfire-inside"}}class AS extends kT{constructor(k,B){super(k,"C1","MAP_BONFIRE_SPIRE_FIREWATCH_ROAD",180,417.5,["bonfire_spire_hard-D1","bonfire_spire_hard-D2","bonfire_spire_hard-B1"],B),this.leverNumber=1,this.battleBG="battle-bonfire-inside"}}class CS extends kT{constructor(k,B){super(k,"C2","MAP_BONFIRE_SPIRE_PALM_PATH",1100,597.5,["bonfire_spire_hard-C3"],B),this.leverNumber=2,this.battleBG="battle-bonfire-outside"}}class OS extends kT{constructor(k,B){super(k,"C3","MAP_BONFIRE_SPIRE_SLIME_SHANTY",160,417.5,["bonfire_spire_hard-C2","bonfire_spire_hard-D3","bonfire_spire_hard-B2"],B),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}}class IS extends kT{constructor(k,B){super(k,"C4","MAP_BONFIRE_SPIRE_LAVA_PITS",110,397.5,["bonfire_spire_hard-D4","bonfire_spire_hard-B4"],B),this.leverNumber=3,this.battleBG="battle-bonfire-inside"}}class DS extends kT{constructor(k,B){super(k,"C6","MAP_BONFIRE_SPIRE_THRONE_ROOM_ENTRANCE",250,400,["bonfire_spire_hard-D5","bonfire_spire_hard-D6","bonfire_spire_hard-B5"],B.concat([q._.Npc_sprite_cebollini_json,q._.Npc_sprite_slime_guard_json])),this.battleBG="battle-bonfire-lava"}}class RS extends kT{constructor(k,B){super(k,"D1","MAP_BONFIRE_SPIRE_PALM_TERRACE",260,382.5,["bonfire_spire_hard-C1"],B),this.leverNumber=1,this.battleBG="battle-bonfire-outside"}}class PS extends kT{constructor(k,B){super(k,"D2","MAP_BONFIRE_SPIRE_VOLCANIC_SANCTUM",180,292.5,["bonfire_spire_hard-C1"],B),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}}class MS extends kT{constructor(k,B){super(k,"D3","MAP_BONFIRE_SPIRE_MOLTEN_ENCLAVE",180,377.5,["bonfire_spire_hard-C3"],B),this.leverNumber=2,this.battleBG="battle-bonfire-inside"}}class NS extends kT{constructor(k,B){super(k,"D4","MAP_BONFIRE_SPIRE_OUTER_SLIMEBURBIA",220,467.5,["bonfire_spire_hard-C4"],B.concat([q._.Zone_lamplight_json])),this.leverNumber=3,this.battleBG="battle-bonfire-outside"}}class xS extends kT{constructor(k,B){super(k,"D5","MAP_BONFIRE_SPIRE_THRONE_ROOM",220,480,["bonfire_spire_hard-E6","bonfire_spire_hard-C6"],B.concat([q._.Npc_sprite_slurpy_json,q._.Npc_sprite_cebollini_json,q._.Npc_sprite_slime_worker_json,J.Q.Spine_npc_slimeguard_json,J.Q.Spine_npc_slimequeen_json])),this.queen=null,this.gaurd=null,this.battleBG="battle-bonfire-inside"}}class LS extends kT{constructor(k,B){super(k,"D6","MAP_BONFIRE_SPIRE_GARDEN_GETAWAY",330,510,["bonfire_spire_hard-C6"],B.concat([q._.Zone_lamplight_json,q._.Npc_sprite_cebollini_json])),this.battleBG="battle-bonfire-lava"}}class kS extends kT{constructor(k,B){super(k,"E5","MAP_BONFIRE_SPIRE_FIERY_ALCOVE",115,510,["bonfire_spire_hard-E6"],B.concat([q._.Zone_lamplight_json])),this.battleBG="battle-bonfire-inside"}}class BS extends kT{constructor(k,B){super(k,"E6","MAP_BONFIRE_SPIRE_ROYAL_KITCHEN",180,547.5,["bonfire_spire_hard-E5","bonfire_spire_hard-D5"],B.concat([q._.Npc_sprite_cebollini_json])),this.battleBG="battle-bonfire-inside"}}class US extends mS{constructor(k){super(k),this._assets=[Rn.t.Tileset_bonfire_png,Rn.t.Tileset_cloud_png,Rn.t.Tileset_cloud_new_png,Rn.t.Tileset_volcano_new_png,Rn.t.Tileset_generic_png,q._.Npc_sprite_wizard_json,q._.Zone_bonfire_json,Rn.t.Tileset_collisions_png,X.V.Bgm_bonfire_spire],this.questManagerIdentifier="c82-7848",this.ID=hn.A_.BONFIREHARD,this.defaultOnFaint="bonfire_spire_hard-B1",this.questHub="bonfire_spire_hard-B1",this.zoneIndex=pT.P.BonfireHard,this.difficultyMode=ri.i.Hard,this.states=["chest1","chest2","chest3","chest4","chest5","chest6","chestGuardian","wizard1","wizard2","lever1","lever2","lever3","turnip1","turnip2","minigametut",Zu.PIPPET_ENCOUNTER,Zu.PIPPET_REMATCH,Zu.PIPPET_DEFEATED],this.monsters=[],this.maps={A1:new yS(this,this._assets),A4:new _S(this,this._assets),B1:new ES(this,this._assets),B2:new wS(this,this._assets),B4:new TS(this,this._assets),B5:new SS(this,this._assets),C1:new AS(this,this._assets),C2:new CS(this,this._assets),C3:new OS(this,this._assets),C4:new IS(this,this._assets),C6:new DS(this,this._assets),D1:new RS(this,this._assets),D2:new PS(this,this._assets),D3:new MS(this,this._assets),D4:new NS(this,this._assets),D5:new xS(this,this._assets),D6:new LS(this,this._assets),E5:new kS(this,this._assets),E6:new BS(this,this._assets)},this.scenes={}}}var FS=U(83668);class GS extends Un.T{constructor(k,B){super(k,"DungeonHub","MAP_SHIVERCHILL_DUNGEON_HUB",810,480,[],B.concat([Rn.t.Tileset_icecave_new_png,Rn.t.Tileset_collisions_png,X.V.Bgm_icedungeon_inside,Rn.t.Tileset_generic_snow_png,q._.General_core_json])),this._menuIsOpen=!1}cleanup(){super.cleanup(),j.wa5.destroyActiveScene()}setup(k,B,U){super.setup(k,B,{});const F=j.wa5.getActiveScene().container,G=K.q.instance.prodigy,$=G.gameContainer.get("e20-0fb0").player.state.getDungeonState(FS.o,"crystal_caverns");F.bind("DungeonState").toConstantValue($),F.bind(j.t5G.AssetLoader).toConstantValue(G.gameContainer.get(j.t5G.AssetLoader)),F.bind("e20-0fb0").toConstantValue(G.gameContainer.get("e20-0fb0")),F.bind("Localization").toConstantValue(G.gameContainer.get(j.$Bt.LocalizationService)),this._menuIsOpen=!1,K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer.sprites.scale.x=-1,this.screen.addClickableArea(100,50,200,150,(()=>{this.caveClicked()}));const H=this.screen.background.addChild(K.q.instance.prodigy.create.sprite(0,0,q._.General_core_json,"area-pointer"));H.events.onInputDown.add(this.caveClicked,this),H.inputEnabled=!0,H.position.set(180,180),this.game.add.tween(H,this).to({y:H.y+25},400,j.GS3.Quadratic.InOut,!0,0,-1,!0)}caveClicked(){this._menuIsOpen||(this._menuIsOpen=!0,this.isRenderingToCanvas()?this.showDeviceWarning():this.showAdventureMap())}isRenderingToCanvas(){return j.W$e.instance.game.renderer.type===V.RENDERER_TYPE.CANVAS}showDeviceWarning(){const k=new bd.Z("BUTTON_OKAY_CAPITAL",this.showAdventureMap.bind(this),Jc.E.Medium,500,"WARNING","WARNING_DEVICE_PERFORMANCE_CRYSTAL_CAVERNS",void 0,void 0,void 0,Ei.l.ErrorDialogHeader);K.q.instance.prodigy.open.informationDialog(k)}showAdventureMap(){const k=K.q.instance.prodigy,B=k.gameContainer.get("e20-0fb0").player.state.getDungeonState(FS.o,"crystal_caverns");this._menuIsOpen=!0,k.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_DUNGEONS,ln.B.BREADCRUMB_STARTED_CRYSTAL_CAVERNS);const U=B.isRunStarted();U&&B.isValid()?k.open.adventureContinueRestart((()=>{this._menuIsOpen=!1})):(U&&B.resetRunData(),k.open.adventureMap(!1,(()=>{this._menuIsOpen=!1})))}}class jS extends vn.b{constructor(k){super(k),this.name="Crystal Caverns",this.ID=hn.A_.CRYSTALCAVERNS,this.battleBG="battle-shiverchill-inside",this.questHub="crystal_caverns-DungeonHub",this.bgmID=32,this.currency=15,this.zoneIndex=pT.P.None,this.maps={1:Ei.l.CrystalCaverns_Phase1,2:Ei.l.CrystalCaverns_Phase2,3:Ei.l.CrystalCaverns_Phase3,DungeonHub:new GS(this,[])}}teleport(k,B,U,F,G){K.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableCrystalCaverns",!0)?"DungeonHub"===k?super.teleport(k,B,U,F,G):this.teleportPrefabScene(k,B,U,F):K.q.instance.prodigy.world.it(WR.DEFAULT_ZONE)}sendCrystalCavernsSpawnEvent(){const k=K.q.instance.prodigy.gameContainer,B=k.get("c47-20b6"),U=k.get("e20-0fb0").player;B.playerMovementAndDiscovery.sendCrystalCavernsEnteredEvent(dn.W5.Spawn),U.kennel.petTeam.forEach((k=>{k&&B.playerMovementAndDiscovery.sendCrystalCavernsParticipantsEvent({name:k.getName()===U.getName()?"Player":k.getName(),type:k.getElement(),health:k.getCurrentHearts()})}))}getOnFaintData(){return{mapKey:K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.getDungeonState(FS.o,"crystal_caverns").getCurrentMap()}}}class $S{}$S.FLOOR_MAXIMUM=100;class HS extends Un.T{constructor(k,B){super(k,"A1","MAP_DARK_TOWER_ENTRANCE",200,400,["darktower-A2"],B)}setup(k,B,U={}){super.setup(k,B,U),new TT(k,B.content,900,360,{name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_MIRA_SHADE"),atlasGuid:q._.Npc_sprite_mira_json},(()=>{this.openTower()}));const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(Tn.J.shouldSuppressAd(F)&&F.isBlockedByDarkTowerMemberGate()){const k=K.q.instance.prodigy.create.sprite(900,184,q._.Ui_icons_json,"icon-medium-lockglow");k.anchor=new V.Point(.5,.5),this.screen.background.addChild(k),k.inputEnabled=!0,k.events.onInputDown.add((()=>{this.openTower()}))}this.zone.bgmID=3,F.heal()}openTower(){const k=K.q.instance.prodigy.gameContainer,B=k.get(j.$Bt.LocalizationService),U=k.get("e20-0fb0").player;let F=U.getTowerProgress();if(F=F-F%5+1,F>$S.FLOOR_MAXIMUM&&(F=$S.FLOOR_MAXIMUM),U.isBlockedByDarkTowerMemberGate()){const B={conversionFunnelName:Sn.o.FunnelEnterDarkTower,conversionFunnelMetadata:"towerBase"},U=Tn.J.showYouTubeMembershipAd(this.game,!0)?_n.R.Video:_n.R.Static,F=k.get("e20-0fb0").player;this.segment.purchase.sendFunnelStart({type:"Enter-Dark-Tower",category:"Zone-Lock",contentId:void 0,adType:U}),Tn.J.shouldSuppressAd(F)?K.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:900,yPosition:165,arrowXRelPos:.6,arrowDirection:Br.i.DOWN}):K.q.instance.prodigy.open.membershipInfo(null,B)}else{const k=K.q.instance.prodigy.dialogue.create();if(0===U.getTowerProgress()){for(let U=1;U<6;U++)k.setText(Object.assign(Object.assign({},HS.DIALOGUE[U]),{text:B.getText(HS.DIALOGUE[U].textKey)}));k.setText({text:B.getText("TOWER_PROMPT_START",F),face:0,yes:this.changeTeam.bind(this,F,void 0),audio:HS.AUDIO[0],type:Ti.fA.START})}else if(U.getTowerProgress()>99)for(let U=6;U<8;U++)k.setText(Object.assign(Object.assign({},HS.DIALOGUE[U]),{text:B.getText(HS.DIALOGUE[U].textKey)}));else k.setText({text:B.getText("TOWER_PROMPT_START_GOLD",F),face:0,yes:()=>{this.changeTeam(F,500)},audio:HS.AUDIO[0],type:Ti.fA.START});k.startDeprecated("mira")}}changeTeam(k,B){let U=!0;const F=K.q.instance.prodigy.gameContainer,G=F.get("e20-0fb0").player;if(j.Aq$.isDefined(B))if(G.getGold()>=B)G.changeGold(-500);else{const k=K.q.instance.prodigy.dialogue.create(),B={conversionFunnelName:Sn.o.FunnelEnterDarkTower,conversionFunnelMetadata:"insufficientCurrency"};if(!G.hasMembership()){const k=Tn.J.showYouTubeMembershipAd(this.game,!0)?_n.R.Video:_n.R.Static;this.segment.purchase.sendFunnelStart({type:"Enter-Dark-Tower-Insufficient-Currency",category:"Deprecate",contentId:void 0,adType:k})}const $=G.hasMembership()||Tn.J.shouldSuppressAd(G)?null:K.q.instance.prodigy.open.membershipInfo.bind(K.q.instance.prodigy.open,null,B);k.setText(Object.assign(Object.assign({},HS.DIALOGUE[8]),{text:F.get(j.$Bt.LocalizationService).getText(HS.DIALOGUE[8].textKey)})),k.startDeprecated("mira",null,$),U=!1}U&&this.toFloor(k,!0)}toFloor(k,B){if(!B)return;const U=k<100?"A2":"A3";this.zone.maps[U].floor=k,this.zone.maps[U].updateZoneNameFromCurrentFloor(),this.zone.maps[U].cleared=!1,K.q.instance.prodigy.world.it(`darktower-${U}`,260,550),this.zone.maps[U].sendSegmentEvent("Tower Run Started"),this.zone.maps[U].sendSegmentEvent("Tower Floor Started")}}HS.AUDIO=[{tag:Z.c.Voice_2,s:0,d:1}],HS.DIALOGUE=[{textKey:"DIALOGUE_MIRA_0",face:0,anim:4,audio:{tag:Z.c.Voice_2,s:0,d:1}},{textKey:"DIALOGUE_MIRA_1",face:0,anim:4,audio:{tag:Z.c.Voice_2,s:4,d:2}},{textKey:"DIALOGUE_MIRA_2",face:2,audio:{tag:Z.c.Voice_2,s:9,d:1}},{textKey:"DIALOGUE_MIRA_3",face:2},{textKey:"DIALOGUE_MIRA_4",face:1,anim:4,audio:{tag:Z.c.Voice_2,s:0,d:1}},{textKey:"DIALOGUE_MIRA_5",face:2,audio:{tag:Z.c.Voice_2,s:3,d:1}},{textKey:"DIALOGUE_MIRA_6",face:0,anim:4,audio:{tag:Z.c.Voice_2,s:4,d:2}},{textKey:"DIALOGUE_MIRA_7",face:0},{textKey:"DIALOGUE_MIRA_8",face:0,anim:1,audio:{tag:Z.c.Voice_2,s:0,d:1}}];class VS extends Ar.H{constructor(k,B,U,F,G){super(k,U),this.callback=null,this.mods=null,this.callback=G,this.mods=F,this.game.input.enabled=!1,B.user.setValidPath(B.path,B.user.x,B.user.y),K.q.instance.prodigy.effects.flashText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TOWER_CHANCE_WHEEL"),(()=>{this.createWheel()}))}close(){K.q.instance.prodigy.notifications.startTimer(!0),this.game.input.enabled=!0;this.game.add.tween(this,this).to({alpha:0},1e3,j.GS3.Linear.None).start().onTweenComplete.addOnce(this.callback,this)}createWheel(){K.q.instance.prodigy.notifications.clearNotifications(!0),this.game.broadcaster.broadcast(oi.Y1.HideHUD,oi.HG.HUD,[]);const k=K.q.instance.prodigy.create.sprite(0,0,q._.General_core_json,"overlay-small");k.width=this.game.world.width,k.height=this.game.world.height,k.alpha=.5,this.add(k),k.inputEnabled=!0;const B=this.game.width,U=this.game.height,F=K.q.instance.prodigy.create.sprite((B-490)/2,U/2-275,q._.Zone_tower_json,"wings");F.alpha=0,this.add(F),this.game.add.tween(F,this).to({alpha:1},300,j.GS3.Quadratic.Out).delay(600).start();const G=K.q.instance.prodigy.create.sprite(B/2,U/2,q._.Zone_tower_json,"wheel");G.anchor.set(.5,.5),G.scale.x=G.scale.y=0,this.add(G),this.game.add.tween(G.scale,this).to({x:1.2,y:1.2},400,j.GS3.Quadratic.Out).to({x:1,y:1},200,j.GS3.Quadratic.In).start();const $=K.q.instance.prodigy.create.sprite((B-196)/2,U/2-270,q._.Zone_tower_json,"pointer");$.alpha=0,this.add($);this.game.add.tween($,this).to({alpha:1},300,j.GS3.Quadratic.Out).delay(600).start().onTweenComplete.addOnce((()=>{this.startWheel(G)}),this)}startWheel(k){let B=Math.floor(10*Math.random());const U=36*B+18;this.game.add.tween(k,this).to({angle:2880-U},8e3,j.GS3.Cubic.Out).start().onTweenComplete.addOnce(this.showResult.bind(this,B),this),this.playSound(8e3,100),K.q.instance.prodigy.gameContainer.get("c47-20b6").economy.sendPrizeWheelSpunEvent(mn.U.PrizeWheel)}showResult(k){this.mods.revampRouletteNumber=k;let B="",U=0;const F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);0===k||6===k?(B=F.getText("TOWER_CHANCE_LOSE_HEARTS","10%"),U=-.1):1===k||5===k?(B=F.getText("TOWER_CHANCE_GAIN_HEARTS","10%"),U=.1):2===k?(B=F.getText("TOWER_CHANCE_LOSE_HEARTS","20%"),U=-.2):7===k?(B=F.getText("TOWER_CHANCE_GAIN_HEARTS","20%"),U=.2):3===k?(B=F.getText("TOWER_CHANCE_DAMAGE_INCREASED"),this.mods.dmgMod=.2):8===k?(B=F.getText("TOWER_CHANCE_DAMAGE_REDUCED"),this.mods.dmgMod=-.2):9===k?(B=F.getText("TOWER_CHANCE_DOUBLE_STARS"),this.mods.starMod=2):4===k&&(B=F.getText("TOWER_CHANCE_REDUCED_ORDER"));const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.petTeam;for(let $=0;$0&&(G[$].changeCurrentHeartsPercent(U),G[$].getCurrentHearts()<=0&&G[$].changeCurrentHeartsPercent(.1));K.q.instance.prodigy.effects.flashText(B,(()=>{this.close()}))}playSound(k,B){if(k<=0||!j.Aq$.isDefined(this.game))return;K.q.instance.prodigy.audio.playSFX(19,"tick");const U=B+9e-7*Math.pow(B,3);setTimeout(this.playSound.bind(this,k-U,U),B)}}class WS extends Un.T{constructor(k,B,U,F,G,j,$){super(k,B,U,F,G,j,$.concat([Ei.l.Overlay_difficulty_hard,Ei.l.Overlay_difficulty_expert])),this.floor=void 0,this.cleared=!1,this.exitAreaEvent=null,this.ball=null,this.lockSprite=null,this.mods=null,this._floorsComplete=0}init(k,B,U,F){const G=this.floor%5==0;return this.enableLayerID(0,G),this.enableLayerID(1,!G),this.enableLayerID(2,G&&!this.cleared),this.enableLayerID(3,!G&&!this.cleared),this.enableLayerID(4,G&&this.cleared),this.enableLayerID(5,!G&&this.cleared),super.init(k,B,U,F)}cleanup(){this.ball&&(this.ball.destroy(),this.ball=null),this.lockSprite&&(this.lockSprite.destroy(),this.lockSprite=null),this.mods=null,super.cleanup()}setup(k,B,U={}){super.setup(k,B,U),this.zone.bgmID=4;let F=this.isOnTopFloorAndNotComplete();const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let $=!1;if(this.cleared){let U=!1;for(let k=0;k{this.onFloorComplete()}),null,"dark-tower")}),k.startDeprecated("mira"),U=!0}}U||this.onFloorComplete(),Tn.J.shouldSuppressAd(G)&&this.floor===Vt.s.get("GameConstants.Tower.MAX_FREE_MEMBER_FLOOR")?$=!0:this.floor<$S.FLOOR_MAXIMUM&&this.addAreaEvent(k,B,{x:900,y:200,w:120,h:80},null,null,null,(()=>{this.toFloor(this.floor+1)}),LT.K.UP)}else if(this.floor<$S.FLOOR_MAXIMUM){this.ball=K.q.instance.prodigy.create.sprite(.5*this.game.width,.5*this.game.height,q._.Zone_tower_json,"orb"),this.ball.alpha=.5,this.ball.inputEnabled=!0,this.ball.anchor.set(.5,1),this.ball.events.onInputDown.add(this.battle.bind(this,B,this.ball),this),B.content.addChild(this.ball),this.game.add.tween(this.ball,this).to({y:this.ball.y+10},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0);const k=K.q.instance.prodigy.create.font(B.content,590,295,`${this.floor}`,{size:40,width:100,align:"center"});this.game.add.tween(k,this).to({y:k.y+10},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0);const U=K.q.instance.prodigy.create.sprite(847,65,q._.Zone_tower_json,"barrier"),F=K.q.instance.prodigy.create.sprite(953,65,q._.Zone_tower_json,"barrier");F.scale.x=-1,U.inputEnabled=!0,U.events.onInputDown.add((()=>{this.blockDoor()})),U.alpha=.8,this.game.add.tween(U,this).to({alpha:.3},1500,j.GS3.Linear.None,!0,0,1e4,!0),B.background.addChild(U),F.inputEnabled=!0,F.events.onInputDown.add((()=>{this.blockDoor()})),F.alpha=.8,this.game.add.tween(F,this).to({alpha:.3},1500,j.GS3.Linear.None,!0,0,1e4,!0),B.background.addChild(F)}if(this.floor%5==0){let k={x:810,y:600};if(this.floor<$S.FLOOR_MAXIMUM){const U=this.cleared?"-noglow":"",F=B.content.addChild(K.q.instance.prodigy.create.sprite(400,400,q._.Zone_tower_json,`statue${U}`)),G=B.content.addChild(K.q.instance.prodigy.create.sprite(880,400,q._.Zone_tower_json,`statue${U}`));F.anchor.set(.5,1),G.anchor.set(.5,1),F.scale.x=-1,k={x:750,y:310}}new TT(this.game,B.content,k.x,k.y,{name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_MIRA_SHADE"),atlasGuid:q._.Npc_sprite_mira_json},(()=>{this.onMiraClick(B)})).highlight(F,-80,-150)}if(Tn.J.shouldSuppressAd(G)&&this.floor===Vt.s.get("GameConstants.Tower.MAX_FREE_MEMBER_FLOOR")){this.lockSprite=K.q.instance.prodigy.create.sprite(900,164,q._.Ui_icons_json,"icon-medium-lockglow");const k=K.q.instance.prodigy.create.image(0,0,void 0,0,V.Texture.WHITE);k.x=850,k.y=65,k.width=100,k.height=175,k.alpha=0,k.inputEnabled=$,this.screen.background.addChild(k),this.lockSprite.anchor.set(.5,.5),this.screen.background.addChild(this.lockSprite),k.events.onInputDown.add((()=>this.nonMemberTeleportToEntrance()))}}handleLeaving(k){if(this.game){let B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getTowerProgress();B=B-B%5+1;const U=K.q.instance.prodigy.dialogue.create();U.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(B<$S.FLOOR_MAXIMUM?"TOWER_PROMPT_LEAVE":"TOWER_PROMPT_COMPLETE_LEAVE",B),face:3,anim:1,audio:zS.AUDIO[1],type:Ti.fA.LEAVE,yes:()=>{k()},preserveNextEvent:!0}),U.startDeprecated("mira")}else j.VyI.log("handleLeaving called after DarktowerMap has been destroyed",j.$bb.Warning)}toBase(){let k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getTowerProgress();if(k=k-k%5+1,k<$S.FLOOR_MAXIMUM){const B=K.q.instance.prodigy.dialogue.create();B.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TOWER_PROMPT_LEAVE",k),face:3,anim:1,audio:zS.AUDIO[1],type:Ti.fA.LEAVE,yes:()=>{this.onLeavingDarkTower(850,380)},no:()=>{this.moveAbove()}}),B.startDeprecated("mira")}else K.q.instance.prodigy.world.it("darktower-A1",850,380)}updateZoneNameFromCurrentFloor(){this.zoneName=`darktower-${this.floor<$S.FLOOR_MAXIMUM?"A2-":"A3-"}-${this.floor}`}moveAbove(){if(!this.exitAreaEvent)return;const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer;k.setValidPath(this.screen.path,k.x,this.exitAreaEvent.y-k.height/2)}onLeavingDarkTower(k,B){this._floorsComplete>0&&(this._floorsComplete=0),j.Aq$.isDefined(k)&&j.Aq$.isDefined(B)&&K.q.instance.prodigy.world.it("darktower-A1",k,B),this.sendSegmentEvent("Tower Run Completed")}isOnTopFloorAndNotComplete(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return this.floor===$S.FLOOR_MAXIMUM&&k.getTowerProgress()<$S.FLOOR_MAXIMUM}onMiraClick(k){this.isOnTopFloorAndNotComplete()?this.battle(k):this.npcDialogue()}onFloorComplete(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.completeTower(this.floor),this.sendSegmentEvent("Tower Floor Completed");const B={conversionFunnelName:Sn.o.FunnelEnterDarkTower,conversionFunnelMetadata:"previewEnd"};if(k.isBlockedByDarkTowerMemberGate()){const k=yn.P.shouldUseUnifiedConversionFlow(Sn.o.FunnelEnterDarkTower)?_n.R.UnifiedConversionFlow:Tn.J.showYouTubeMembershipAd(this.game,!0)?_n.R.Video:_n.R.Static;this.segment.purchase.sendFunnelStart({type:"Enter-Dark-Tower",category:"Zone-Lock",contentId:void 0,adType:k,adVersion:yn.P.getAdVersion(Sn.o.FunnelEnterDarkTower)}),this.sendSegmentEvent("Tower Run Completed")}k.isBlockedByDarkTowerMemberGate()&&!Tn.J.shouldSuppressAd(k)&&K.q.instance.prodigy.open.membershipInfo((()=>{k.isBlockedByDarkTowerMemberGate()&&K.q.instance.prodigy.world.it("darktower-A1",200,400)}),B),this._floorsComplete++,this.floor===$S.FLOOR_MAXIMUM&&this.sendSegmentEvent("Tower Run Completed")}blockDoor(){const k=K.q.instance.prodigy.dialogue.create();k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TOWER_PROMPT_MUST_DEFEAT"),face:3,anim:1,audio:zS.AUDIO[1]}),k.startDeprecated("mira")}nonMemberTeleportToEntrance(){const k=new Ti.rD(this.game);k.addEvents([{dialogueData:k.dataProvider.get(1028),blockInput:!0},{callback:()=>K.q.instance.prodigy.world.it("darktower-A1",200,400)}]),k.start()}setPlayerAsOpponent(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U={level:$.get(B.data,"level",100).toString()},F=Tn.J.copyObject(B.appearance.getData());F.name=B.getName();const G={data:U,appearance:F,equipment:B.equipment.getData()};k.wizards=[G],k.pets=[];const H=B.kennel.petTeam;for(let $=0;${const B=this.floor<$S.FLOOR_MAXIMUM?"A2":"A3";this.zone.maps[B].cleared=!0,K.q.instance.prodigy.world.it(`darktower-${B}`,k.x,k.y)};K.q.instance.prodigy.battle.battleStats.type="DarkTowerBattle",K.q.instance.prodigy.battle.start(this.mods,(()=>{this.onLeavingDarkTower(200,400)}),k.bind(this,this.screen.user.position),this.onLeavingDarkTower.bind(this),"darktower-A1")}toFloor(k){if(k>$S.FLOOR_MAXIMUM)return void this.toBase();const B=k<$S.FLOOR_MAXIMUM?"A2":"A3";this.zone.maps[B].floor=k,this.zone.maps[B].updateZoneNameFromCurrentFloor(),this.zone.maps[B].cleared=!1,K.q.instance.prodigy.world.it(`darktower-${B}`,260,550),this.sendSegmentEvent("Tower Floor Started")}sendSegmentEvent(k){const B=this.segment.playerMovementAndDiscovery,U=dn.s2.DarkTower,F=this.floor>=$S.FLOOR_MAXIMUM;switch(k){case"Tower Run Completed":B.sendTowerRunCompletedEvent(U,F);break;case"Tower Floor Completed":B.sendTowerRunFloorCompletedEvent({tower_type:U,floor_id:this.floor,floor_type:dn.ss.Normal});break;case"Tower Floor Started":B.sendTowerRunFloorStartedEvent({tower_type:U,floor_id:this.floor,floor_type:dn.ss.Normal});break;case"Tower Run Started":B.sendTowerRunStartedEvent(U,F)}}}class qS extends WS{constructor(k,B){super(k,"A2","MAP_DARK_TOWER_FLOOR",260,550,["darktower-A1","darktower-A3"],B)}setup(k,B,U={}){super.setup(k,B,U),this.exitAreaEvent=this.addAreaEvent(k,B,{x:240,y:640,w:160,h:80,canReTrigger:!0},null,null,null,(()=>{this.toBase()}),LT.K.DOWN)}getName(){return`${super.getName()}${this.floor}`}}class KS extends WS{constructor(k,B){super(k,"A3","MAP_DARK_TOWER_SHOWDOWN",260,550,["darktower-A2"],B)}setup(k,B,U={}){super.setup(k,B,U),this.exitAreaEvent=this.addAreaEvent(k,B,{x:640,y:280,w:160,h:160,rect:!1,canReTrigger:!0},null,null,null,(()=>{this.toBase()}),LT.K.DOWN),B.addClickableMoveEvent(560,200,160,160,640,340)}updateZoneNameFromCurrentFloor(){super.updateZoneNameFromCurrentFloor();const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.zoneName=`${this.zoneName}-${k.userID}`}}class zS extends vn.b{GetOpponent(k){if(49===k){const B=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),U=B.getValue("grandoffMaxHP",Vt.s.get("GameConstants.Grandoff.MAX_HP"));zS.OPPONENTS[k].boss.maxHP=null===U?void 0:parseInt(U,10),zS.OPPONENTS[k].difficulty=parseInt(B.getValue("grandoffDifficulty",Vt.s.get("GameConstants.Grandoff.DIFFICULTY")),10)}else if(99===k){const B=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),U=B.getValue("miraMaxHP",Vt.s.get("GameConstants.Mira.MAX_HP"));zS.OPPONENTS[k].boss.maxHP=null===U?void 0:parseInt(U,10),zS.OPPONENTS[k].difficulty=parseInt(B.getValue("miraDifficulty",Vt.s.get("GameConstants.Mira.DIFFICULTY")),10)}return zS.OPPONENTS[k]}constructor(k){super(k),this.difficultyModeAgnostic=!0,this._currentMap=null,this.name="Dark Tower",this.ID=hn.A_.DARKTOWER,this.battleBG="battle-tower-inside",this.defaultOnFaint="darktower-A1",this.questHub="darktower-A1",this.zoneIndex=pT.P.Darktower,this.states=[];const B=[Rn.t.Tileset_darktower_png,Rn.t.Tileset_forest_new_png,Rn.t.Tileset_generic_new_png,Rn.t.Tileset_collisions_png,Rn.t.Tileset_forest_new_png,q._.Npc_sprite_mira_json,X.V.Bgm_space];this.maps={A1:new HS(this,B),A2:new qS(this,B),A3:new KS(this,B)}}handleLeaving(k,B){var U;const F=K.q.instance.prodigy.world.getCurrentMap();k!==In.j.mapTeleport?"darktower-A1"===F?super.handleLeaving(k,B):this._currentMap.handleLeaving(B):("darktower-A1"!==F&&(null===(U=this._currentMap)||void 0===U||U.sendSegmentEvent("Tower Run Completed")),super.handleLeaving(k,B))}teleport(k,B,U,F,G={}){this._currentMap=this.maps[k],j.Aq$.isDefined(this.maps[k].floor)?super.teleport(k,260,550,F,G):"A1"!==k?super.teleport("A1",200,400,F,G):super.teleport("A1",B,U,F,G)}getOnFaintData(){return{mapKey:this.defaultOnFaint}}}zS.AUDIO=[{tag:Z.c.Voice_2,s:0,d:1},{tag:Z.c.Voice_2,s:1,d:1},{tag:Z.c.Voice_2,s:2,d:1},{tag:Z.c.Voice_2,s:3,d:1},{tag:Z.c.Voice_2,s:4,d:2},{tag:Z.c.Voice_2,s:6,d:1},{tag:Z.c.Voice_2,s:7,d:2},{tag:Z.c.Voice_2,s:9,d:1}],zS.REWARDS=[{floor:10,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:zS.AUDIO[6]}]},{floor:20,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:zS.AUDIO[6]}]},{floor:30,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:zS.AUDIO[6]}]},{floor:40,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:zS.AUDIO[6]}]},{floor:50,reward:[{type:"gold",N:1e3}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:zS.AUDIO[6]}]},{floor:60,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:zS.AUDIO[6]}]},{floor:70,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:zS.AUDIO[6]}]},{floor:80,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:zS.AUDIO[6]}]},{floor:90,reward:[{type:"gold",N:500}],text:[{textKey:"DIALOGUE_MIRA_REWARD",face:0,audio:zS.AUDIO[6]}]},{floor:100,reward:[{type:"outfit",ID:38},{type:"hat",ID:42},{type:"weapon",ID:68}],text:[{textKey:"DIALOGUE_MIRA_DEFEAT_0",face:3,audio:zS.AUDIO[3]},{textKey:"DIALOGUE_MIRA_DEFEAT_1",face:3},{textKey:"DIALOGUE_MIRA_DEFEAT_2",face:1,audio:zS.AUDIO[6]},{textKey:"DIALOGUE_MIRA_DEFEAT_3",face:2},{textKey:"DIALOGUE_MIRA_DEFEAT_4",face:1,audio:zS.AUDIO[0]}]}],zS.DIALOGUE=[[{textKey:"DIALOGUE_MIRA_9",face:0,audio:zS.AUDIO[2]}],[{textKey:"DIALOGUE_MIRA_10",face:2},{textKey:"DIALOGUE_MIRA_11",face:1,audio:zS.AUDIO[0]}],[{textKey:"DIALOGUE_MIRA_12",face:0},{textKey:"DIALOGUE_MIRA_13",face:0,audio:zS.AUDIO[0]}],[{textKey:"DIALOGUE_MIRA_14",face:2},{textKey:"DIALOGUE_MIRA_15",face:1}],[{textKey:"DIALOGUE_MIRA_16",face:0,audio:zS.AUDIO[6]}],[{textKey:"DIALOGUE_MIRA_17",face:2},{textKey:"DIALOGUE_MIRA_18",face:1,audio:zS.AUDIO[0]}],[{textKey:"DIALOGUE_MIRA_19",face:2},{textKey:"DIALOGUE_MIRA_20",face:2,audio:zS.AUDIO[0]}],[{textKey:"DIALOGUE_MIRA_21",face:1},{textKey:"DIALOGUE_MIRA_22",face:2,audio:zS.AUDIO[1]}],[{textKey:"DIALOGUE_MIRA_23",face:2},{textKey:"DIALOGUE_MIRA_24",face:0}],[{textKey:"DIALOGUE_MIRA_25",face:2,audio:zS.AUDIO[1]},{textKey:"DIALOGUE_MIRA_26",face:0,audio:zS.AUDIO[2]}],[{textKey:"DIALOGUE_MIRA_27",face:3,audio:zS.AUDIO[3]}],[{textKey:"DIALOGUE_MIRA_28",face:2},{textKey:"DIALOGUE_MIRA_29",face:1,audio:zS.AUDIO[0]}],[{textKey:"DIALOGUE_MIRA_30",face:2},{textKey:"DIALOGUE_MIRA_31",face:2}],[{textKey:"DIALOGUE_MIRA_32",face:2},{textKey:"DIALOGUE_MIRA_33",face:2}],[{textKey:"DIALOGUE_MIRA_34",face:2},{textKey:"DIALOGUE_MIRA_35",face:1}],[{textKey:"DIALOGUE_MIRA_36",face:1,audio:zS.AUDIO[2]}],[{textKey:"DIALOGUE_MIRA_37",face:0,audio:zS.AUDIO[1]}],[{textKey:"DIALOGUE_MIRA_38",face:3},{textKey:"DIALOGUE_MIRA_39",face:3,audio:zS.AUDIO[3]}],[{textKey:"DIALOGUE_MIRA_40",face:3},{textKey:"DIALOGUE_MIRA_41",face:3,audio:zS.AUDIO[2]}],[{textKey:"DIALOGUE_MIRA_42",face:3,audio:zS.AUDIO[1]},{textKey:"DIALOGUE_MIRA_43",face:3},{textKey:"DIALOGUE_MIRA_44",face:0,audio:zS.AUDIO[7]},{textKey:"DIALOGUE_MIRA_45",face:1,audio:zS.AUDIO[0]},{textKey:"DIALOGUE_MIRA_46",face:3,audio:zS.AUDIO[2]}]],zS.OPPONENTS=[{pets:[{ID:99,level:5}]},{pets:[{ID:102,level:5}]},{pets:[{ID:100,level:5}]},{pets:[{ID:103,level:5}]},{pets:[{ID:101,level:5},{ID:104,level:5}]},{pets:[{ID:31,level:10}]},{pets:[{ID:55,level:10}]},{pets:[{ID:60,level:10}]},{pets:[{ID:29,level:10}]},{pets:[{ID:92,level:10},{ID:93,level:10}]},{pets:[{ID:27,level:15}]},{pets:[{ID:45,level:15}]},{pets:[{ID:48,level:15}]},{pets:[{ID:96,level:15}]},{pets:[{ID:28,level:15},{ID:49,level:15}]},{pets:[{ID:4,level:20}]},{pets:[{ID:10,level:20}]},{pets:[{ID:5,level:20}]},{pets:[{ID:11,level:20}]},{pets:[{ID:6,level:20},{ID:12,level:20}]},{pets:[{ID:1,level:25}]},{pets:[{ID:52,level:25}]},{pets:[{ID:2,level:25}]},{pets:[{ID:53,level:25}]},{pets:[{ID:3,level:25},{ID:54,level:25}]},{pets:[{ID:78,level:30}]},{pets:[{ID:46,level:30}]},{pets:[{ID:40,level:30}]},{pets:[{ID:79,level:30}]},{pets:[{ID:80,level:30},{ID:47,level:30},{ID:50,level:30}]},{pets:[{ID:94,level:35}]},{pets:[{ID:85,level:35}]},{pets:[{ID:82,level:35}]},{pets:[{ID:76,level:35}]},{pets:[{ID:35,level:35},{ID:36,level:35},{ID:37,level:35}]},{pets:[{ID:87,level:40}]},{pets:[{ID:99,level:40}]},{pets:[{ID:94,level:40}]},{pets:[{ID:102,level:40}]},{pets:[{ID:95,level:40},{ID:80,level:40},{ID:23,level:40}]},{pets:[{ID:16,level:45}]},{pets:[{ID:47,level:45}]},{pets:[{ID:40,level:45}]},{pets:[{ID:80,level:45}]},{pets:[{ID:62,level:45},{ID:26,level:45},{ID:44,level:45}]},{pets:[{ID:63,level:50}]},{pets:[{ID:66,level:50}]},{pets:[{ID:69,level:50}]},{pets:[{ID:72,level:50}]},{boss:{ID:1,level:50,element:"fire",attacks:[56,57,59,60],maxHP:12e3,name:"Grandoff",spriteOffsetY:80,battleOffsetX:80,starBonus:40,difficulty:3}},{pets:[{ID:23,level:55}]},{pets:[{ID:46,level:56}]},{pets:[{ID:23,level:57}]},{pets:[{ID:46,level:58}]},{pets:[{ID:46,level:60},{ID:23,level:60},{ID:47,level:60}]},{pets:[{ID:75,level:65}]},{pets:[{ID:78,level:66}]},{pets:[{ID:81,level:67}]},{pets:[{ID:84,level:68}]},{pets:[{ID:80,level:70},{ID:83,level:70},{ID:86,level:70}]},{pets:[{ID:43,level:75}]},{pets:[{ID:12,level:76}]},{pets:[{ID:54,level:77}]},{pets:[{ID:6,level:78}]},{pets:[{ID:58,level:80},{ID:25,level:80},{ID:61,level:80}]},{pets:[{ID:75,level:85}]},{pets:[{ID:78,level:86}]},{pets:[{ID:81,level:87}]},{pets:[{ID:84,level:88}]},{pets:[{ID:31,level:90},{ID:33,level:90},{ID:31,level:90}]},{pets:[{ID:63,level:50},{ID:64,level:85}]},{pets:[{ID:66,level:55},{ID:67,level:85}]},{pets:[{ID:69,level:60},{ID:70,level:85}]},{pets:[{ID:72,level:65},{ID:73,level:85}]},{pets:[{ID:2,level:95},{ID:5,level:95},{ID:8,level:95},{ID:11,level:95}]},{pets:[{ID:1,level:95}]},{pets:[{ID:4,level:96}]},{pets:[{ID:7,level:97}]},{pets:[{ID:10,level:98}]},{wizards:[{data:{level:50},appearance:{name:"Frozine",hair:{style:11,color:9},skinColor:1,eyeColor:13},equipment:{hat:37,outfit:33,weapon:63}},{data:{level:50},appearance:{name:"Thundane",hair:{style:19,color:16},skinColor:2,eyeColor:9},equipment:{hat:8,outfit:24,weapon:23}},{data:{level:50},appearance:{name:"Sprout",hair:{style:7,color:8},skinColor:3,eyeColor:6},equipment:{hat:33,outfit:29,weapon:24}},{data:{level:50},appearance:{name:"Charcole",hair:{style:18,color:6},skinColor:2,eyeColor:3},equipment:{hat:11,outfit:8,weapon:64}},{data:{level:50},appearance:{name:"Pounce",hair:{style:23,color:5},skinColor:4,eyeColor:14},equipment:{hat:32,outfit:31,weapon:60}}]},{pets:[{ID:38,level:100}]},{pets:[{ID:87,level:100}]},{pets:[{ID:39,level:100}]},{pets:[{ID:72,level:100}]},{pets:[{ID:43,level:100},{ID:26,level:100,evolve:[{ID:25,lvl:53}]},{ID:44,level:100,evolve:[{ID:43,lvl:43}]},{ID:61,level:100}]},{pets:[{ID:57,level:100}]},{pets:[{ID:61,level:100}]},{pets:[{ID:15,level:100}]},{pets:[{ID:98,level:100}]},{},{pets:[{ID:49,level:100}]},{pets:[{ID:50,level:100}]},{pets:[{ID:54,level:100}]},{pets:[{ID:39,level:100,evolve:[{ID:38,lvl:50}]}]},{pets:[{ID:97,level:100},{ID:89,level:100,evolve:[{ID:87,lvl:50},{ID:88,lvl:55}]},{ID:12,level:100,evolve:[{ID:11,lvl:55}]},{ID:42,level:100,evolve:[{ID:40,lvl:58},{ID:41,lvl:60}]}]},{pets:[{ID:63,level:50},{ID:66,level:50},{ID:69,level:50},{ID:72,level:50}]},{pets:[{ID:64,level:75},{ID:67,level:75},{ID:70,level:75},{ID:73,level:75}]},{pets:[{ID:65,level:100},{ID:68,level:100},{ID:71,level:100},{ID:74,level:100}]},{pets:[{ID:63,level:50},{ID:66,level:50},{ID:69,level:50},{ID:72,level:50}]},{boss:{ID:2,level:100,element:"wizard",attacks:[49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86],maxHP:25e3,name:"Mira Shade",spriteOffsetY:100,spriteOffsetX:20,difficulty:3}}];var YS=U(97447),QS=U(42448);class XS extends $n.Z{constructor(k,B){super(k,"A1",B.concat([J.Q.Spine_npc_noot_json,Ei.l.RiftRunPortal])),this._noot=null}setup(k,B,U){super.setup(k,B,U),this._noot=new Zw.p(k,"NPC_NAME_NOOT",J.Q.Spine_npc_noot_json,Kn.ac.QuestGiver,B.content,0,0,"idle"),this._noot.position.x=B.user.position.x=QS.N3.location.x,this._noot.position.y=B.user.position.y=QS.N3.location.y,this._noot.alpha=0,B.user.alpha=0,YS.j.addPortalToScreen(this.screen,QS.N3.location.x,QS.N3.location.y).catch(j.RQr.createHandler("PostFirstRift: Failed to load the Rifts portal"))}start(k,B){const U=Object.create(null,{start:{get:()=>super.start}});return(0,G.sH)(this,void 0,void 0,(function*(){U.start.call(this,k,B);try{B.user.faceToward(0),this._noot.faceToward(0);const k=[];k.push((0,bc.eK)(B.user,{x:YS.j.PLAYER_SPAWN_LOCATION_X,y:YS.j.PLAYER_SPAWN_LOCATION_Y})),yield(0,bc.Qx)(this,B.user,{alpha:1,duration:500,ease:j.GS3.Quadratic.Out}),k.push((0,bc.eK)(this._noot,{x:YS.j.PLAYER_SPAWN_LOCATION_X+150,y:YS.j.PLAYER_SPAWN_LOCATION_Y-100})),yield(0,bc.Qx)(this,this._noot,{alpha:1,duration:500,ease:j.GS3.Quadratic.Out}),yield Promise.all(k),(0,bc.BY)(B.user,this._noot);const U=[1591,1592];yield(0,bc.v$)(U),K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_RIFTS,ln.B.BREADCRUMB_RIFTS_AFTER_FIRST_CUTSCENE_SEEN)}catch(e){j.RQr.logError(e,"Error playing post first rift run cutscene")}K.q.instance.prodigy.world.it(YS.j.MAP_KEY,B.user.position.x,B.user.position.y)}))}cleanup(){this._noot&&(this._noot.destroy(),this._noot=null),super.cleanup()}}(0,G.Cg)([(0,Re.b)("306-5359"),(0,G.Sn)("design:type",ye.W)],XS.prototype,"_player",void 0);const ZS=[297,298,299];class JS extends $n.Z{constructor(k,B){super(k,"A1",B.concat([J.Q.Spine_npc_noot_json,J.Q.Spine_npc_puppetmaster_json,J.Q.Spine_npc_pippet_json,J.Q.Spine_battle_transport_boss_purple_json,J.Q.Spine_pet_240_json,...ZS.map((k=>J.Q[`Default_follow_${k}_json`])),Ei.l.RiftRunPortal,Ei.l.SpinePetLegacyTransform])),this._buddies=[]}setup(k,B,U){function F(k,U,F,G=1){const j=K.q.instance.prodigy.create.follow(B.content,k,G,null,U,F);if(!(j instanceof yr._))throw new Error("Only GameObject-based buddies supported");const $=j.findComponent(pr);return $.walkSpeed=1,$}super.setup(k,B,U);{const k=new j._mx;k.addComponent(j.K16).group.position.set(725,590),k.name="Teleportation Effect",B.content.addChild(k.legacyTransform.group);const U=k.addComponent(Wn.v),F=k.addComponent(Ir.j);U.Active=!1,U.setAsset(J.Q.Spine_battle_transport_boss_purple_json),this._teleportEffect=F}this._noot=new Zw.p(k,"NPC_NAME_NOOT",J.Q.Spine_npc_noot_json,Kn.ac.QuestGiver,B.content,0,0,"idle"),this._puppetMaster=new Zw.p(k,"NPC_NAME_PUPPETMASTER",J.Q.Spine_npc_puppetmaster_json,Kn.ac.QuestGiver,B.content,0,0,"idle"),this._pippet=new Zw.p(k,"NPC_NAME_PIPPET",J.Q.Spine_npc_pippet_json,Kn.ac.QuestGiver,B.content,0,0,"idle"),this._drake=K.q.instance.prodigy.create.monster(B.content,new fa.R(k,{ID:240}),1,660,510),this._buddies.push(F(ZS[2],446,418,.6),F(ZS[1],506,480,.6),F(ZS[2],790,539,.6),F(ZS[0],896,516,.6)),this._drake.startLoad(),this._drake.OnLoad.addOnce((()=>this._drake.stand())),B.user.position.set(110,295),this._noot.position.set(60,300),this._puppetMaster.position.set(695,390),this._pippet.position.set(900,390),YS.j.addPortalToScreen(this.screen,QS.N3.location.x,QS.N3.location.y).catch(j.RQr.createHandler("VisitPrePuppetMasterDefeat: Failed to load the Rifts portal"))}start(k,B){const U=Object.create(null,{start:{get:()=>super.start}});return(0,G.sH)(this,void 0,void 0,(function*(){U.start.call(this,k,B);try{(0,bc.BY)(this._puppetMaster,this._pippet);for(const k of[B.user,this._noot,this._drake])k.faceToward(this._puppetMaster.x);yield(0,bc.v$)([1603,1604,1605,1606,1607]);{const B=H().pick(this._drake,["x","y"]);yield(0,bc.eK)(this._drake,{x:this._puppetMaster.x+50,y:this._puppetMaster.y+10}),this._drake.faceToward(this._puppetMaster.x),this._drake.attack(),yield(0,bc.uk)(k,1e3),this._puppetMaster.playAll("hit",!1),yield Promise.all([(0,bc.v$)([1608]),(0,bc.uk)(k,800).then((()=>(0,G.sH)(this,void 0,void 0,(function*(){return(0,bc.eK)(this._drake,B)}))))]),this._drake.faceToward(this._puppetMaster.x)}{const B=this._buddies[1],U=H().pick(B.gameObject.position,["x","y"]);yield(0,bc.eK)(B,{x:this._puppetMaster.x-10,y:this._puppetMaster.y+10}),yield(0,bc.Qx)(this,B.gameObject.transform.scale,{y:.6,duration:1e3,ease:j.GS3.Bounce.Out},{y:1,duration:1e3,ease:j.GS3.Quadratic.Out}),this._puppetMaster.faceToward(B.gameObject.position.x),yield(0,bc.eK)(B,U),this._puppetMaster.faceToward(this._pippet.x),yield(0,bc.uk)(k,800),this._puppetMaster.faceToward(B.gameObject.position.x),yield(0,bc.uk)(k,1e3),this._puppetMaster.faceToward(this._pippet.x),yield(0,bc.v$)([1609,1610])}{const B=(0,bc.eK)(this._puppetMaster,{x:this._puppetMaster.x+30,y:this._puppetMaster.y+40});yield(0,bc.v$)([1611,1612]),yield B;const U=H().sortBy([...this._buddies,this._pippet,this._drake],(k=>k instanceof pr?k.gameObject.position.x:k.x));U.push(this._puppetMaster),this._puppetMaster.playAll("summon"),yield(0,bc.uk)(k,1800),this._teleportEffect.spine.Active=!0,this._teleportEffect.playAnimation("exit",!1),yield Promise.all(U.map(((k,B)=>(0,G.sH)(this,void 0,void 0,(function*(){return(0,bc.Qx)(this,k instanceof zn.R?k:k.gameObject,{alpha:0,duration:400,ease:j.GS3.Quadratic.Out,delay:100*B})})))))}{yield j.Egh.timeout(1e3);const k=Promise.all([(0,bc.eK)(B.user,{x:YS.j.PLAYER_SPAWN_LOCATION_X,y:YS.j.PLAYER_SPAWN_LOCATION_Y}),(0,bc.eK)(this._noot,{x:YS.j.PLAYER_SPAWN_LOCATION_X+150,y:YS.j.PLAYER_SPAWN_LOCATION_Y-50})]);yield(0,bc.v$)([1613]),yield k,(0,bc.BY)(B.user,this._noot),yield(0,bc.v$)([1614,1615,1616])}K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_RIFTS,ln.B.BREADCRUMB_RIFTS_FIRST_VISIT_PRE_PM_DEFEAT_CUTSCENE_SEEN)}catch(e){j.RQr.logError(e,"Error playing pre-PM-defeat visit cutscene")}K.q.instance.prodigy.world.it(YS.j.MAP_KEY,B.user.position.x,B.user.position.y)}))}cleanup(){var k;for(const B of[this._noot,this._pippet,this._puppetMaster])B.destroy();for(const B of this._buddies)B.gameObject.destroy();this._noot=null,this._pippet=null,this._puppetMaster=null,this._buddies.length=0,null===(k=this._teleportEffect)||void 0===k||k.GameObject.destroyRootDeferred(),this._teleportEffect=null,super.cleanup()}}class tA extends vn.b{constructor(k){super(k),this.difficultyModeAgnostic=!0,this.name="Dragon Isle",this.ID=hn.A_.DRAGONISLE,this.zoneIndex=pT.P.DragonIsle,this.defaultOnFaint=YS.j.MAP_KEY,this.questHub=YS.j.MAP_KEY;const B=[Rn.t.Tileset_dragonisland_exterior_png,Rn.t.Tileset_dragonisland_waterfall_png,Rn.t.Tileset_collisions_png];this._portalHub=new YS.j(this,B),this.maps={A1:this._portalHub},this.scenes={postFirstRift:new XS(this,B),visitPrePuppetMasterDefeat:new JS(this,B)}}init(k,B,U){super.init(k,B,U),U.disabledLayers.push("b7","b8")}setup(k,B,U){return U!==this._portalHub||K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_RIFTS,ln.B.BREADCRUMB_RIFTS_FIRST_VISIT_PRE_PM_DEFEAT_CUTSCENE_SEEN)?super.setup(k,B,U):(this.playScene("visitPrePuppetMasterDefeat"),{quit:!0})}}class eA extends Ar.H{constructor(k,B,U,F,G,$=!1){super(k,B),this.npc=null,this.indicator=null;const H=K.q.instance.prodigy.gameContainer,V=H.get(j.$Bt.LocalizationService),W=H.get("c47-20b6");this.x=U,this.y=F,this.name=V.getText("NPC_NAME_PROFESSOR_SCOOG"),this.npc=K.q.instance.prodigy.create.sprite(0,0,q._.Npc_sprite_scoog_json,0,void 0,this.onTextureLoaded.bind(this)),this.npc.inputEnabled=!0,this.npc.anchor.set(.5,1),this.npc.events.onInputDown.add((()=>{W.gameWorld.sendNpcClickedEvent({npc_name:this.name,npc_type:Kn.ac.Merchant,npc_id:"NPC_NAME_SCOOG"}),G()}),this),$&&(this.npc.scale.x=-1),this.add(this.npc),K.q.instance.prodigy.create.nameFont(this,-15,-this.npc.height-20,this.name),W.gameWorld.sendNpcDiscoveredEvent({npc_name:this.name,npc_type:Kn.ac.Merchant,npc_id:"NPC_NAME_SCOOG",x_coord:U,y_coord:F,npc_animation_id:"idle"})}onTextureLoaded(k){k&&(k.animations.addIfFound("stand",["npc_0","npc_1","npc_2","npc_3","npc_4","npc_5","npc_6","npc_7"],10,!0),k.animations.play("stand",void 0,!0))}setIndicator(k){j.Aq$.isDefined(this.indicator)||(this.indicator=TT.createIndicator(k),this.indicator.y=-(this.npc.height+20),this.add(this.indicator),this.game.add.tween(this.indicator,this).to({y:this.indicator.y-20},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0))}}class iA extends Un.T{constructor(k,B){super(k,"A0","MAP_DYNO_DIG_OASIS",280,440,[],B.concat([q._.Npc_sprite_scoog_json,Rn.t.Tileset_collisions_png,Ei.l.Overlay_difficulty_hard,Ei.l.Overlay_difficulty_expert]))}setup(k,B){super.setup(k,B);new eA(k,B.content,800,450,this.onScoogClicked.bind(this),!1).setIndicator(ST.DEFAULT_INDICATOR_CONFIG),B.addClickableEvent(295,200,50,80,this.toMuseum.bind(this,B),null,0,null);const U=K.q.instance.prodigy.create.element(B.content,975,150),F=U.add(K.q.instance.prodigy.create.sprite(40,40,q._.General_icons_json,"star2"));F.anchor.set(.5,.5),F.inputEnabled=!0,F.angle=-20,F.events.onInputDown.add(this.toDynoDig,this),U.add(K.q.instance.prodigy.create.sprite(0,10,Ut.E.getIconForType("key",1))),K.q.instance.prodigy.create.font(U,-20,0,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_TITLE"),{width:120,size:20,align:"center"}),k.add.tween(F,this).to({angle:20},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0)}onScoogClicked(){const k=K.q.instance.prodigy.dialogue.create(),B=`${CT.N.Scoog}_${ph.B.Dialogue}`;this.segment.featureCommon.sendInterfaceEvent({interfaceName:B,interfaceType:bi.Wm.DialogBox,instanceType:Ai.N.Interface,originType:bi.$N.NpcClick}),k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_SHOP_WELCOME"),face:0,yes:()=>{this.sendDialogueSegmentEvents(jh.k.Shop,B),k.close(),K.q.instance.prodigy.open.store(23)},no:()=>{this.sendDialogueSegmentEvents(jh.k.NotNow,B)},type:Ti.fA.STORE}),k.startDeprecated("scoog")}sendDialogueSegmentEvents(k,B){this.segment.featureCommon.sendButtonEvent({buttonName:k,interfaceName:B,interfaceType:bi.Wm.DialogBox,saveClickInfo:k}),this.segment.featureCommon.sendInterfaceEvent({interfaceName:B,interfaceType:bi.Wm.DialogBox,instanceType:Ai.N.Interface,closeMethod:bi.Lv.ButtonClick})}toMuseum(k){const B=K.q.instance.prodigy.event.create();B.validPath(k.user,k.path,320,300);const U=this.game.state.get(Ie.G.Museum);B.set(U,"startX",634),B.set(U,"startY",560),B.function(K.q.instance.prodigy.start.bind(K.q.instance.prodigy,Ie.G.Museum)),B.start()}toDynoDig(){K.q.instance.prodigy.start(Ie.G.DinoDig,{},{playerPosition:this.screen.user.position})}}class sA extends vn.b{constructor(k){super(k),this.difficultyModeAgnostic=!0,this.store={},this.store={items:[{ID:41,type:"hat"},{ID:67,type:"weapon"},{ID:37,type:"outfit"},{ID:15,type:"pet"},{ID:35,type:"pet"}]},Object.defineProperty(this.store,"name",{get:()=>K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("STORE_NAME_DYNO")}),this.name="Dyno",this.ID=hn.A_.DYNO,this.bgmID=3,this.battleBG="battle-shipwreck-outside",this.defaultOnFaint="dyno-A0",this.questHub="dyno-A0",this.states=["daily"],this.zoneIndex=pT.P.Dyno;const B=["battle-shipwreck-outside",Rn.t.Tileset_generic_png,Rn.t.Tileset_outsidesnow_png,q._.Npc_sprite_wizard_json,Rn.t.Tileset_town_png,q._.Zone_skywatch_json,Rn.t.Tileset_volcano_png,Rn.t.Tileset_generic_new_png,Rn.t.Tileset_ship_exterior_png,Rn.t.Tileset_water_new_png];this.maps={A0:new iA(this,B)}}}sA.AUDIO=[{tag:Z.c.Voice_9,s:0,d:3},{tag:Z.c.Voice_9,s:3,d:2},{tag:Z.c.Voice_9,s:5,d:2},{tag:Z.c.Voice_9,s:7,d:2},{tag:Z.c.Voice_9,s:9,d:2},{tag:Z.c.Voice_9,s:11,d:3}],sA.DATA={ID:6,tag:"dyno-A0",zoneName:"zone-dino",atlas:q._.Zone_dino_json,icon:Ut.E.getIconForType("fossil",1),shopkeeperTag:q._.Npc_face_scoog_json,shopkeeperFrame:"face_0",scaleX:.89,scaleY:.89,battle:{screen:"bg-battle-dino",encounter:[{ID:105},{ID:106},{ID:107},{ID:108},{ID:109},{ID:110},{ID:111},{ID:112}]},quests:[]};var nA=U(92864);class aA extends Un.T{}class rA extends aA{constructor(k,B){super(k,"A3","MAP_FOREST_MOUNTAIN_GATE",1100,580,["forest-A4"],B)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1080,y:630,w:320,h:80},"forest-A4",1080,90,null,null)}}class oA extends aA{constructor(k,B){super(k,"A4","MAP_FOREST_MOUNTAIN_PASS",1080,520,["forest-A3","forest-A5","forest-B5"],B),this.coord=[new j.I9Y(150,430),new j.I9Y(755,400)]}setup(k,B,U){super.setup(k,B,U),K.q.instance.prodigy.prefabFactory.addWizard(this,1046,208,"wizard4",33,!0).catch(j.RQr.createHandler(`Could not load enemy wizard in map ${this.zoneName}`)),this.addAreaEvent(k,B,{x:1080,y:40,w:320,h:80},"forest-A3",1100,580,null,null),this.addAreaEvent(k,B,{x:this.game.width,y:this.game.height,r:200},"forest-B5",200,200,null,null),this.addAreaEvent(k,B,{x:220,y:630,w:280,h:80},"forest-A5",220,90,null,null)}}class hA extends aA{constructor(k,B){super(k,"A5","MAP_FOREST_FIREFLY_CROSSING",220,90,["forest-A4"],B),this.coord=[new j.I9Y(200,600),new j.I9Y(900,510),new j.I9Y(100,420)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:220,y:40,w:280,h:80},"forest-A4",280,580,null,null)}}class cA extends aA{constructor(k,B){super(k,"B5","MAP_FOREST_CROSSROADS",1100,630,["forest-A4","forest-C4","forest-B6"],B),this.coord=[new j.I9Y(1e3,180),new j.I9Y(200,200),new j.I9Y(690,125)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:0,y:0,r:200},"forest-A4",1080,584,null,null),this.addAreaEvent(k,B,{x:1060,y:0,w:300,h:170,rect:!0},"forest-C4",300,520,null,null),this.addAreaEvent(k,B,{x:1100,y:680,w:280,h:80},"forest-B6",1100,90,null,null),this.zone.isOnQuest(8)||K.q.instance.prodigy.prefabFactory.addWizard(this,350,200,"wizard2",34,!1).catch(j.RQr.createHandler(`Could not load enemy wizard in map ${this.zoneName}`))}}class dA extends aA{constructor(k,B){super(k,"B6","MAP_FOREST_GRASSY_CLEARING",200,630,["forest-B5","forest-B7"],B),this.coord=[new j.I9Y(210,390),new j.I9Y(300,130),new j.I9Y(540,260)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1100,y:40,w:280,h:80},"forest-B5",1100,630,null,null),this.addAreaEvent(k,B,{x:200,y:680,w:320,h:80},"forest-B7",200,90,null,null)}}class lA extends aA{constructor(k,B){super(k,"B7","MAP_FOREST_FISHERMANS_POND",1190,240,["forest-B6","forest-C7"],B),this.coord=[new j.I9Y(955,590),new j.I9Y(130,530),new j.I9Y(305,630)]}setup(k,B,U){var F;super.setup(k,B,U);(null===(F=this.zone.getQuestState())||void 0===F?void 0:F.ID)<4||this.addPippet(k,B,2,200,546),this.addAreaEvent(k,B,{x:200,y:40,w:320,h:80},"forest-B6",200,630,null,null),this.addAreaEvent(k,B,{x:1240,y:410,w:80,h:260},"forest-C7",90,240,null,null)}}class uA extends aA{constructor(k,B){super(k,"B8","MAP_FOREST_FIREFLY_CLEARING",1190,480,["forest-C8"],B.concat(q._.Npc_sprite_merchant_json)),this.questNPC=null,this.coord=[new j.I9Y(490,570),new j.I9Y(785,270),new j.I9Y(440,200)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1240,y:400,w:80,h:500},"forest-C8",90,480,null,null)}start(k,B,U){super.start(k,B,U)}}class fA extends aA{constructor(k,B){super(k,"C4","MAP_FOREST_THE_OLD_ROAD",300,520,["forest-B5","forest-D3"],B.concat([q._.Npc_sprite_merchant_json])),this.questNPC=null,this.coord=[new j.I9Y(400,580),new j.I9Y(820,500),new j.I9Y(800,330)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:200,y:640,w:280,h:200,rect:!0},"forest-B5",1080,200,null,null),this.addAreaEvent(k,B,{x:1080,y:0,w:270,h:160,rect:!0},"forest-D3",200,520,null,null),K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.FireflyQuestMerchantNPC,378,313).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.FireflyQuestMerchantNPC}`)),K.q.instance.prodigy.prefabFactory.addWizard(this,925,450,"wizard3",35,!0).catch(j.RQr.createHandler(`Could not load enemy wizard in map ${this.zoneName}`))}chatWithMerchant(k){const B=K.q.instance.prodigy.event.create();B.text(6,"merchant"),B.start()}}class bA extends aA{constructor(k,B){super(k,"C7","MAP_FOREST_STONEFISH_BEACH",200,630,["forest-B7","forest-C8"],B),this.coord=[new j.I9Y(640,500),new j.I9Y(330,170),new j.I9Y(220,260)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:40,y:220,w:80,h:200},"forest-B7",1180,450,null,null),this.addAreaEvent(k,B,{x:200,y:680,w:240,h:80},"forest-C8",200,90,null,null),B.addCollect(1,980,520,{type:"item",ID:51}),K.q.instance.prodigy.prefabFactory.addWizard(this,550,480,"wizard1",36,!1).catch(j.RQr.createHandler(`Could not load enemy wizard in map ${this.zoneName}`))}}class pA extends aA{constructor(k,B){super(k,"C8","MAP_FOREST_BIG_TREE",1190,520,["forest-C7","forest-B8"],B.concat(q._.Npc_sprite_flora_json,q._.Npc_sprite_merchant_json))}setup(k,B,U){super.setup(k,B,U),K.q.instance.prodigy.world.getZone(hn.A_.LAMPLIGHT).completeQuest(2),this.addAreaEvent(k,B,{x:200,y:40,w:240,h:80},"forest-C7",200,630,null,null),this.addAreaEvent(k,B,{x:40,y:480,w:80,h:200},"forest-B8",1190,480,null,null);let F=null;this.featureRequirements.meetsRequirementsDeprecated(37)||K.q.instance.prodigy.classModeController.isClassMode()||(F=()=>{K.q.instance.prodigy.open.lamplightLevelLock("WORLD_LAMPLIGHT_TOWN")}),this.addAreaEvent(k,B,{x:1240,y:520,w:80,h:240,canReTrigger:!0},"lamplight-B1",120,480,F);K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromGUID(Ei.l.FloraNPC).transform.setPosition(560,425),K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.FireflyMerchantNPC,950,390).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.FireflyMerchantNPC}`)),K.q.instance.prodigy.create.nicknamerPedestal(this.game,this.zone.ID,B.user,B.content,125,300)}}var vA,gA=U(76642),mA=U(72326);!function(k){k[k.PLAY_FLUTE=0]="PLAY_FLUTE",k[k.BOSS_FIGHT=1]="BOSS_FIGHT",k[k.OPEN_CHEST=2]="OPEN_CHEST",k[k.GET_KEYSTONE=3]="GET_KEYSTONE",k[k.GO_TO_SHIVERCHILL=4]="GO_TO_SHIVERCHILL"}(vA||(vA={}));class yA extends Pn.T{constructor(k,B,U){super(k,B,yA.QUEST_INDEX,mA.v.Q12,{type:"seq",N:5},[`${hn.A_.FOREST}-D3`],yA.QUEST_START_DIALOGUE_IDS,[],[],null,!1)}setup(k,B,U){return super.setup(k,B,U),U.getTag()===yA.DIALOGUE_MAP_TAG?(K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.FloraNPC,305,410,!1,!0).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.FloraNPC}`)),this.zone.getQuestState().seq>vA.BOSS_FIGHT&&(K.q.instance.prodigy.notifications.pause(this),K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.FlorianNPCLegacyMaps,430,330,!0,!0).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.FlorianNPCLegacyMaps}`))),{enableMonsters:!1}):null}start(k,B,U){if(super.start(k,B,U),!this.zone.isQuestComplete(12)&&U.getTag()===yA.DIALOGUE_MAP_TAG)switch(this.zone.getQuestState().seq){default:case vA.PLAY_FLUTE:case vA.BOSS_FIGHT:this.startIntroCutscene(k,B,U);break;case vA.OPEN_CHEST:case vA.GET_KEYSTONE:K.q.instance.prodigy.notifications.pause(this),this.startPostbattleCutscene(U);break;case vA.GO_TO_SHIVERCHILL:}return null}update(k,B,U){U.getTag()===yA.DIALOGUE_MAP_TAG&&U.update()}startIntroCutscene(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("d0e-64fd"),G=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),$=G.getValue("geraldMaxHP",Vt.s.get("GameConstants.Gerald.MAX_HP")),H=null===$?void 0:parseInt($,10),V=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_BOSS_BATTLE");K.q.instance.prodigy.game.broadcaster.broadcast(oi.Y1.HideHUD,oi.HG.HUD),Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(F,Ei.l.FireflyQ12IntroCutscene,{EncounterBattleMods:{boss:{ID:60,element:"earth",attacks:[68,69,71],name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_GERALD"),tag:hn.A_.FOREST,scale:!0,useShadowAssets:!1,maxHP:H},difficulty:parseInt(G.getValue("geraldDifficulty",Vt.s.get("GameConstants.Gerald.DIFFICULTY")),10),starMod:5,screen:U.zone.battleBG,drops:[{type:"gold",N:100},{type:"weapon",ID:212,N:1},{type:"follow",ID:221,N:1},{type:"dorm",ID:185,N:1},{type:"spellRelic",ID:15,N:1}],intro:V,catch:!1,run:!1}}).then((k=>{var B,F,G;null===(B=k.findComponentInChildren(Ju.k))||void 0===B||B.onVictory.addOnce((()=>{this.zone.setState("gerald",null),K.q.instance.prodigy.world.it("forest-D3",572,342)})),null===(F=k.findComponentInChildren(Ju.k))||void 0===F||F.onDefeat.addOnce((()=>{K.q.instance.prodigy.world.it("forest-C4",1080,200)})),null===(G=k.findComponentInChildren(gA.S))||void 0===G||G.onDispatch.addOnce((()=>U.wakeUp=!0))})).catch(j.RQr.createHandler("Could not load Forest Q12 Gerald Cutscene"))}startPostbattleCutscene(k){this.descKey="Talk to Gerald",k.wakeUp=!0,K.q.instance.prodigy.game.broadcaster.broadcast(oi.Y1.ShowHUD,oi.HG.HUD),K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(Ei.l.FireflyQ12CutscenePost_battle).then((k=>{var B;null===(B=k.findComponentInChildren(gA.S))||void 0===B||B.onDispatch.addOnce((()=>K.q.instance.prodigy.notifications.resume(this)))})).catch(j.RQr.createHandler("Could not load Forest Q12 Gerald Post-battle Cutscene"))}}yA.DIALOGUE_MAP_TAG="D3",yA.QUEST_INDEX=12,yA.QUEST_START_DIALOGUE_IDS=[325,326];class _A extends aA{constructor(k,B){super(k,"D3","MAP_FOREST_OLD_ROAD_REMAINS",200,520,["forest-C4"],B.concat(q._.Boss_gerald_json,J.Q.Spine_boss_marionette_json,J.Q.Spine_music_notes_json)),this.wakeUp=!1,this.tween=[],this.wakeUpTween=[],this.awakeTween=[],this.coord=[new j.I9Y(500,640),new j.I9Y(800,320),new j.I9Y(1100,450)]}setup(k,B,U){super.setup(k,B,U),this.game=k,this.wakeUp=!1,this.addAreaEvent(k,B,{x:180,y:640,w:300,h:200,rect:!0},"forest-C4",1080,200,null,null);const F=k.cache.getJSON(this.file),G=k.cache.getJSON("map-pathing").tilesets;let j=null;for(let $=0;$8&&!this.zone.allQuestsAreComplete}wakeUpGerald(){if(this.wakeUp){this.tween=this.wakeUpTween;for(let k=0;k{K.q.instance.game.broadcaster.broadcast(oi.Y1.HideHUD,oi.HG.HUD),(null==B?void 0:B.questProgress)&&(B.questProgress.visible=!1),k.findComponentInChildren(wA.V).onComplete.addOnce((()=>{K.q.instance.game.broadcaster.broadcast(oi.Y1.ShowHUD,oi.HG.HUD),(null==B?void 0:B.questProgress)&&(B.questProgress.visible=!0),k.destroy()}))}))}))}}SA.QUEST_INDEX=1;class AA extends Pn.T{constructor(k,B,U){super(k,B,10,mA.v.Q10,{type:"seq",N:1},["forest-A5"],[319,320,321],[],[322],U,!1)}setup(k,B,U){return super.setup(k,B,U),"A5"===U.getTag()?{enableMonsters:!1}:null}start(k,B,U){if(super.start(k,B,U),!this.zone.isQuestComplete(10)&&"A5"===U.getTag()){const F=K.q.instance.prodigy.create.element(B.content,490,340),G=F.add(K.q.instance.prodigy.create.sprite(0,0,q._.General_core_json,"overlay-light"));G.alpha=0,G.width=110,G.height=80,F.highlight(!0,0,-20),G.inputEnabled=!0,G.events.onInputDown.add((()=>{this.clickStump(U,k,B,F)}))}return null}clickStump(k,B,U,F){k.questParams={};const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,$=U.content.addChild(K.q.instance.prodigy.icon.createIcon(505,270,Ut.E.getIconForType("item",69)));B.add.tween($,this).to({y:280},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0),$.visible=!1;const H=U.content.addChild(K.q.instance.prodigy.icon.createIcon(505,270,Ut.E.getIconForType("item",70)));B.add.tween(H,this).to({y:280},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0),H.visible=!1;const V=k.addMonster(B,U,99,982,626,!1,{encounter:[{ID:69}],difficulty:5,maxTeamSize:1,showNewIndicator:!1},!0);V.visible=!1;const W=K.q.instance.prodigy.event.create();W.function(F.highlight.bind(F,!1)),W.enableInput(!1),W.path(U.user,[{x:430,y:420}]),W.set(U.user,"evtProc",!0),W.function(G.backpack.consume.bind(G.backpack,"item",69,1)),W.delay(100),W.set($,"visible",!0),W.delay(500),W.explode(505,325,80,80,3),W.set($,"visible",!1),W.set(H,"visible",!0),W.delay(500),W.set(V,"visible",!0),W.path(V,[{x:708,y:383}],1),W.hop(V,500,-140,100),W.set(H,"visible",!1),W.function(U.user.chat.bind(U.user,1,80)),W.sound(18,"dig"),W.hop(V,500,-160,100),W.path(V,[{x:218,y:0}],2),W.set(V,"visible",!1),W.function(V.destroy.bind(V)),W.enableInput(!0),W.text(60,"noot"),W.function(F.destroy.bind(F)),W.function(this.zone.completeSequence.bind(k.zone,10,0)),W.set(U.user,"evtProc",!1),W.function(U.process.bind(U)),W.start()}}class CA extends Pn.T{constructor(k,B,U){super(k,B,11,"",{type:"item",ID:70,N:1},["forest-A3","forest-D3"],[323,324],[],[331],U,!1,mA.v.Q11)}setup(k,B,U){return super.setup(k,B,U),"A3"===U.getTag()?(this.zone.getState("questMonsterDefeated")||this.placeThief(k,B,U),{enableMonsters:!1}):"D3"!==U.getTag()||this.zone.isQuestComplete(11)?null:(this.zone.getState("fakeMonsterDefeated")||this.placeDecoyThief(k,B,U),{enableMonsters:!1})}getRemainingQuestAreas(){const k=["forest-A3"];return j.Aq$.isDefined("fakeMonsterDefeated")&&this.zone.getState("fakeMonsterDefeated")||k.push("forest-D3"),k}placeThief(k,B,U){const F={drops:[{ID:70,type:"item"}],encounter:[{ID:69,nickname:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_FOREST_THIEF")}],difficulty:5,maxTeamSize:1,onEnc:()=>{this.zone.setState("questMonsterDefeated",!0)},unique:!0,isQuestEncounter:!0,showGuideHand:!0};K.q.instance.prodigy.prefabFactory.addMonster(U,384,463,98,F).catch(j.RQr.createHandler("Could not add real thief for quest Q11"))}placeDecoyThief(k,B,U){const F={encounter:[{ID:69}],difficulty:5,maxTeamSize:1,onEnc:()=>{this.zone.setState("fakeMonsterDefeated",!0)},unique:!0,showGuideHand:!0,isQuestEncounter:!0};K.q.instance.prodigy.prefabFactory.addMonster(U,484,463,99,F).catch(j.RQr.createHandler("Could not add decoy thief for quest Q11"))}}var OA,IA,DA=U(92591),RA=U(54336);class PA extends Pn.T{constructor(k,B,U){super(k,B,PA.QUEST_INDEX,"Defeat Monster",{type:"seq",ID:1,N:1},["forest-C7"],[1338,1339,1340],[],[1348,1347,1346],U,!1,mA.v.Q2)}setup(k,B,U){if(super.setup(k,B,U),U.tag===PA.MAP_TAG){if(!this.zone.isQuestComplete(PA.QUEST_INDEX))return this.zone.isOnSequence(PA.QUEST_INDEX,0)&&(B.onStartComplete.addOnce((()=>B.walkEnabled=!1)),K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.FloraNPC,380,640).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.FloraNPC}`))),{enableMonsters:!1,enableWizards:!1};this.startMinibossRunaway(U)}return{enableWizards:!1}}process(k,B,U){U.tag===PA.MAP_TAG&&this.zone.isOnSequence(PA.QUEST_INDEX,0)&&(B.walkEnabled=!1,K.q.instance.prodigy.load.assets(ah.B.Bg_bossbattle_firefly,(()=>{this.startMinibossCutscene(U).catch(j.RQr.createHandler("Could not instantiate Q2 Miniboss prefab"))})))}startMinibossRunaway(k){K.q.instance.prodigy.prefabFactory.addMonster(k,640,360,9,{encounter:[{ID:96}],difficulty:5,maxTeamSize:1,unique:!0,isQuestEncounter:!0}).then((k=>{const B=k.findComponentInChildren(RA.s),U=k.findComponentInChildren(cf.I);k.findComponentInChildren(DA.K).changeState(1),U.MoveTarget=new j.I9Y(400,200),U.onMoveEnd.addOnce((()=>{U.MoveTarget=new j.I9Y(-200,200)})),B&&(B.Active=!1)})).catch(j.RQr.createHandler("Could not load monster running away from Firefly Q2 encounter"))}startMinibossCutscene(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0"),U=B.player.playerContainer;U.playerPrefab||(yield new Promise((k=>U.OnLoad.add(k)))),(new EA.u).get(1341).args=[B.getLevel()+2];const F=Math.min(B.getLevel()+2,hi.s.activePlayerLevelCap),G=-100;return Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.FireflyQ2MinibossEncounter,{EncounterMap:k,EncounterScale:[1,1],EncounterZoneTag:k.zoneName,EncounterSpawnPosition:new j.I9Y(G,200),EncounterBattleMods:{encounter:[{ID:96}],level:F,run:!1,catch:!1,onEnd:k.zoneName,screen:k.battleBG,onFaint:k.zone.defaultOnFaint,backgroundMusic:ah.B.Bg_bossbattle_firefly,revampBattleType:Ni.gu.FireflyQ2Miniboss},EncounterDifficultyIndicatorTier:2,EncounterDifficultyIndicatorLevel:F}).then((k=>{K.q.instance.prodigy.battle.battleStats.type="QuestBattle",k.transform.setPosition(G,200),k.findComponent(j.y4o).getRootContainer().position.set(G,200)}))}))}}PA.MAP_TAG="C7",PA.QUEST_INDEX=2,function(k){k[k.ENEMY_1=100]="ENEMY_1",k[k.ENEMY_2=102]="ENEMY_2",k[k.MINIBOSS=104]="MINIBOSS"}(OA||(OA={})),function(k){k[k.MONSTER_INFO=0]="MONSTER_INFO",k[k.LEVEL_UP=1]="LEVEL_UP",k[k.READY_MINIBOSS=2]="READY_MINIBOSS",k[k.DEFEAT_MINIBOSS=3]="DEFEAT_MINIBOSS"}(IA||(IA={}));class MA extends Pn.T{constructor(k,B,U){super(k,B,MA.QUEST_INDEX,"",{type:"clear",ID:1,N:3},["forest-B7"],[1349],[],[1352,1353],U,!1,mA.v.Q3),this.updateQuestDescription()}setup(k,B,U){return super.setup(k,B,U),"B7"===U.getTag()&&(this.zone.isSequenceComplete(MA.QUEST_INDEX,IA.MONSTER_INFO)||this.showMonsterInfoDialogue(),this.areLesserEnemiesDefeated(U.zone.getQuestState())?(this.zone.completeSequence(MA.QUEST_INDEX,IA.LEVEL_UP),this.updateQuestDescription()):this.placeLesserEnemies(U),this.areAllMonsterDefeated(U.zone.getQuestState())?this.zone.completeSequence(MA.QUEST_INDEX,IA.DEFEAT_MINIBOSS):this.zone.isSequenceComplete(MA.QUEST_INDEX,IA.DEFEAT_MINIBOSS)||this.placeMiniBoss(U).catch(j.RQr.createHandler("Could not add monsters for quest Q3"))),{enableMonsters:!1,enableWizards:!1}}placeMiniBoss(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer;B.playerPrefab||(yield new Promise((k=>B.OnLoad.add(k))));const U=this.getBossLevel(k.zone.getQuestState());return Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.FireflyQ3MinibossEncounter,{EncounterSpawnId:OA.MINIBOSS,EncounterMap:k,EncounterScale:[1,1],EncounterZoneTag:k.zoneName,EncounterSpawnPosition:new j.I9Y(330,300),EncounterBattleMods:{level:U,encounter:[{ID:96}],run:!1,catch:!1,onEnd:k.zoneName,screen:k.battleBG,onFaint:k.zone.defaultOnFaint,unique:!0,revampBattleType:Ni.gu.FireflyQ3Miniboss,isQuestEncounter:!0},EncounterDifficultyIndicatorTier:2,EncounterDifficultyIndicatorLevel:U}).then((k=>{k.transform.setPosition(330,300),k.findComponent(j.y4o).getRootContainer().position.set(330,300)})).catch(j.RQr.createHandler("Could not add miniboss for quest Q#-B"))}))}placeLesserEnemies(k){const B={randDir:!0,encounter:[{ID:20}],difficulty:1,maxTeamSize:1,showGuideHand:!0,isQuestEncounter:!0,unique:!0,range:80};K.q.instance.prodigy.prefabFactory.addMonster(k,900,220,OA.ENEMY_1,B).catch(j.RQr.createHandler(`Could not add monster ${OA.ENEMY_1} for quest Q3`)),K.q.instance.prodigy.prefabFactory.addMonster(k,280,620,OA.ENEMY_2,B).catch(j.RQr.createHandler(`Could not add monster ${OA.ENEMY_2} for quest Q3`))}updateQuestDescription(){this.descKey=this.zone.isSequenceComplete(MA.QUEST_INDEX,IA.LEVEL_UP)?"Defeat Monster":"Level Up"}showMonsterInfoDialogue(){const k=new Ti.rD(K.q.instance.prodigy.game);k.addEvents([{dialogueData:k.dataProvider.get(1350),blockInput:!0},{dialogueData:k.dataProvider.get(1351),blockInput:!0}]),k.start(!0,(()=>{this.zone.completeSequence(MA.QUEST_INDEX,IA.MONSTER_INFO)}))}areLesserEnemiesDefeated(k){return!!j.Aq$.isDefined(k.state)&&(k.seq>IA.LEVEL_UP||1===k.state[OA.ENEMY_1+1]&&1===k.state[OA.ENEMY_2+1])}areAllMonsterDefeated(k){return!!j.Aq$.isDefined(k.state)&&(this.areLesserEnemiesDefeated(k)&&1===k.state[OA.MINIBOSS+1])}getBossLevel(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0");return j.Aq$.isDefined(k)?(j.Aq$.isDefined(k.state[MA.MINIBOSS_LEVEL_STATE_ID])||(k.state[MA.MINIBOSS_LEVEL_STATE_ID]=Math.min(B.getLevel()+2,hi.s.activePlayerLevelCap)),k.state[MA.MINIBOSS_LEVEL_STATE_ID]):Math.min(B.getLevel()+2,hi.s.activePlayerLevelCap)}}MA.QUEST_INDEX=3,MA.MINIBOSS_LEVEL_STATE_ID="forestq3b-miniboss-level";class NA extends Pn.T{constructor(k,B,U){super(k,B,NA.QUEST_INDEX,"Find Florian",{type:"seq",ID:1,N:1},["forest-B6"],[1370,1371],[],[1392,1393,1394],U,!1,mA.v.Q4)}setup(k,B,U){return super.setup(k,B,U),"B6"!==U.getTag()||this.zone.isQuestComplete(NA.QUEST_INDEX)?null:(this.placeFlorian(k,B,U).catch(j.RQr.createHandler("Could not load Florian NPC Prefab")),{enableMonsters:!1})}end(){super.end(),Tn.J.bagItem({type:"spellRelic",ID:13},K.q.instance.prodigy.game,"got-item",void 0)}placeFlorian(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer;k.playerPrefab||(yield new Promise((B=>k.OnLoad.add(B))));const B=new j.I9Y(700,320);return K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.FireflyQ4FlorianNPC,B.x,B.y)}))}}NA.QUEST_INDEX=4;var xA,LA=U(76711),kA=U(23891);!function(k){k[k.RETURN_TO_FIREFLY=0]="RETURN_TO_FIREFLY",k[k.FIGHT_PIPPET=1]="FIGHT_PIPPET",k[k.SAVE_FLORIAN=2]="SAVE_FLORIAN",k[k.CHAT_WITH_MERCHANT=3]="CHAT_WITH_MERCHANT",k[k.CHAT_WITH_NOOT=4]="CHAT_WITH_NOOT",k[k.COLLECT_MANDRAKE=5]="COLLECT_MANDRAKE"}(xA||(xA={}));class BA extends Pn.T{constructor(k,B,U){super(k,B,6,"Save Florian",{type:"pet",ID:32,N:2},["forest-B5"],[],[],[],U,!1,mA.v.Q6)}setup(k,B,U){if(super.setup(k,B,U),K.q.instance.prodigy.world.getCurrentZone()===hn.A_.SHIVERCHILL)return this.zone.isQuestComplete(BA.QUEST_INDEX)&&K.q.instance.prodigy.world.it("forest-D3"),{enableAreaEvents:!1};const F=this.zone.getQuestState().seq;return this.zone.isQuestComplete(BA.QUEST_INDEX)?"D3"===U.getTag()?{enableMonsters:!1,enableWizards:!1}:null:("B5"!==U.getTag()||F!==xA.FIGHT_PIPPET&&F!==xA.SAVE_FLORIAN?F===xA.CHAT_WITH_MERCHANT?this.setQuestGoalChatMerchant():F>=xA.CHAT_WITH_NOOT&&this.setQuestGoalDefeatSprikes():B.onStartComplete.addOnce((()=>B.walkEnabled=!1)),"B5"===this.map.getTag()||"D3"===this.map.getTag()?{enableMonsters:!1,enableWizards:!1}:null)}process(k,B,U){switch(super.process(k,B,U),this.zone.getQuestState().seq){case xA.RETURN_TO_FIREFLY:K.q.instance.prodigy.world.getCurrentZone()===hn.A_.SHIVERCHILL?this.returnToFireflySequence():K.q.instance.prodigy.world.getCurrentZone()===hn.A_.FOREST&&(this.zone.completeSequence(BA.QUEST_INDEX,xA.RETURN_TO_FIREFLY),"B5"===U.getTag()&&this.prebattleCutscene(B));break;case xA.FIGHT_PIPPET:"B5"===U.getTag()&&this.prebattleCutscene(B);break;case xA.SAVE_FLORIAN:"B5"===U.getTag()&&this.postbattleCutscene(k,B,U);break;case xA.CHAT_WITH_MERCHANT:this.setQuestGoalChatMerchant();break;case xA.CHAT_WITH_NOOT:this.setQuestGoalDefeatSprikes(),"D3"===U.getTag()&&this.chatWithNoot(U);case xA.COLLECT_MANDRAKE:"D3"===U.getTag()&&this.placeSprikes(U)}return null}returnToFireflySequence(){const k=new Ti.rD(K.q.instance.game),B=[1372,1373,1375].map((B=>({dialogueData:k.dataProvider.get(B),blockInput:!0})));B.push({dialogueData:k.dataProvider.get(1376),blockInput:!0,yes:()=>{this.zone.completeSequence(BA.QUEST_INDEX,xA.RETURN_TO_FIREFLY),K.q.instance.prodigy.gameContainer.get("985-7051").updateQuestProgress().catch(j.RQr.createHandler("Could not update quest progress for Firefly Forest")).finally((()=>{this.zone.handleLeaving(In.j.teleport,(()=>{K.q.instance.prodigy.world.it("forest-B5")}))}))},yesButtonText:(0,Ba.k)("BUTTON_LETS_GO"),isCancelButtonVisible:!1}),k.addEvents(B),k.start()}prebattleCutscene(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;B.playerContainer.setPath([{x:960,y:360}]),K.q.instance.game.state.get(Ie.G.TileScreen).walkEnabled=!1;const U=this.zone.getMap("B5"),F=K.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("pippetMaxHP",Vt.A.get("GameConstants.Pippet.MAX_HP")),G=null===F?void 0:parseInt(F,10);K.q.instance.prodigy.notifications.pause(this),k.menuBar.active=!1,Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.FireflyQ6Cutscene,{EncounterZoneTag:U.zoneName,EncounterBattleMods:{boss:{ID:37,maxHP:G,element:"shadow",attacks:[73],name:"Pippet",tag:"pippet",pippetBattle:!0},pets:[{ID:117},{ID:71}],level:B.getLevel,run:!1,catch:!1,onEnd:U.zoneName,screen:U.battleBG,onFaint:U.zone.defaultOnFaint,revampBattleType:Ni.gu.QuestPippet}}).then((k=>{null==k||k.findComponentInChildren(Ju.k).onBattleStart.addOnce((()=>{K.q.instance.prodigy.notifications.resume(this)}))})).catch(j.RQr.createHandler("Could not load Firefly Q6B pre battle cutscene"))}postbattleCutscene(k,B,U){B.menuBar&&(B.menuBar.active=!1);const F=K.q.instance.prodigy;F.notifications.pause(this),F.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(Ei.l.FireflyQ6CutscenePost_battle).then((G=>{var j;null===(j=G.findComponentInChildren(kA.f))||void 0===j||j.onComplete.addOnce((()=>{U.zone.completeSequence(BA.QUEST_INDEX,xA.SAVE_FLORIAN),this.setQuestGoalChatMerchant(),k.broadcaster.addAppListener(oi.n8.DialogClosed,(()=>{k.broadcaster.removeAppListener(oi.n8.DialogClosed,this),k.state.get(Ie.G.TileScreen).walkEnabled=!0,F.notifications.resumeAll(),B.menuBar.active=!0,B.process()}),this)}))})).catch(j.RQr.createHandler("Could not load Firefly Q6 post battle cutscene"))}setQuestGoalChatMerchant(){this.descKey=mA.v.Q5,this.area=["forest-C4"]}setQuestGoalDefeatSprikes(){const k=this.descKey===mA.v.Q5;this.descKey="",this.area=["forest-D3"],k&&this.screen.process()}placeSprikes(k){const B={randDir:!0,encounter:[{ID:32}],drops:this.hasDefeatedSprike()?[{type:"item",ID:24,N:1}]:void 0,difficulty:3,maxTeamSize:1,unique:!0,showGuideHand:!0,isQuestEncounter:!0};K.q.instance.prodigy.prefabFactory.addMonster(k,481,239,0,B).catch(j.RQr.createHandler("Could not add monster 0 for quest Q6")),K.q.instance.prodigy.prefabFactory.addMonster(k,940,533,3,B).catch(j.RQr.createHandler("Could not add monster 3 for quest Q6"))}chatWithNoot(k){const B=new Ti.rD(K.q.instance.prodigy.game);B.addEvents([{dialogueData:B.dataProvider.get(64),blockInput:!0},{dialogueData:B.dataProvider.get(65),blockInput:!0}]),B.start(!0,(()=>{this.zone.completeSequence(BA.QUEST_INDEX,xA.CHAT_WITH_NOOT)}))}hasDefeatedSprike(){const k=this.zone.getQuestState().state;return Object.keys(k).some((B=>k[B]>0))}}BA.QUEST_INDEX=6;class UA extends Pn.T{constructor(k,B,U){super(k,B,7,"",{type:"item",ID:24,N:5},["forest-A4","forest-A5"],[310,311,312],[],[331],U,!1,mA.v.Q7),this.collectionMaps={A4:[1,2],A5:[3,4,5]}}setup(k,B,U){if(super.setup(k,B,U),"A4"!==U.getTag()||this.zone.isQuestComplete(7)){if("A5"===U.getTag()&&!this.zone.isQuestComplete(7)){const k={type:"item",ID:24};B.addCollect(3,154,511,k),B.addCollect(4,915,400,k),B.addCollect(5,552,210,k)}}else{const k={type:"item",ID:24};B.addCollect(1,270,460,k),B.addCollect(2,720,350,k)}return null}}var FA=U(61985);class GA extends Pn.T{constructor(k,B,U){super(k,B,8,mA.v.Q8,{type:"seq",N:2},["forest-A3"],[313,314,315],[],[331],U,!1),this._shouldStartIntro=!1}setup(k,B,U){return super.setup(k,B,U),"A3"===U.getTag()?(this.zone.isOnSequence(8,0)&&(this.createTriptropTrio(U).catch(j.RQr.createHandler("Could not create Triptrop Trio Encounter")),k.input.enabled=!1),{enableMonsters:!1}):null}start(k,B,U){return"A3"===U.getTag()&&(this.zone.isOnSequence(8,0)&&this.startIntro(),this.zone.isOnSequence(8,1)&&this.chatWithNoot(k,B,U)),null}createTriptropTrio(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer;B.playerPrefab||(yield new Promise((k=>B.OnLoad.add(k)))),B.x=k.x,B.y=k.y;const U=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);return Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.TriptropTrioEncounter,{EncounterMap:k,EncounterScale:[-1,1],EncounterZoneTag:k.zoneName,EncounterSpawnPosition:new j.I9Y(640,360),EncounterBattleMods:{drops:[{ID:69,type:"item"}],pets:[{ID:59,nickname:U.getText("NPC_NAME_TRIPTROP_TED")},{ID:59,nickname:U.getText("NPC_NAME_TRIPTROP_TOM")},{ID:59,nickname:U.getText("NPC_NAME_TRIPTROP_TAK")}],run:!1,catch:!1,onEnd:k.zoneName,screen:k.battleBG,onFaint:k.zone.defaultOnFaint}}).then((k=>{K.q.instance.prodigy.battle.battleStats.type="QuestBattle",k.transform.setPosition(640,360),k.findComponent(j.y4o).getRootContainer().position.set(640,360),this._prefab=k,this._shouldStartIntro&&this.startIntro()}))}))}startIntro(){this._shouldStartIntro=!0,this._prefab&&this._prefab.findComponentsInChildren(FA.E).forEach((k=>k.startTimer()))}chatWithNoot(k,B,U){const F=new Ti.rD(K.q.instance.prodigy.game);F.addEvents([{dialogueData:F.dataProvider.get(67),blockInput:!0}]),F.start(!0,(()=>{this.zone.completeSequence(GA.QUEST_INDEX,1),B.process()}))}}GA.QUEST_INDEX=8;class jA extends Pn.T{constructor(k,B,U){super(k,B,9,mA.v.Q9,{type:"seq",N:1},["forest-D3"],jA.QUEST_START_DIALOGUE_IDS,[],[],U,!1)}start(k,B,U){if(super.start(k,B,U),"D3"===U.getTag()&&this.zone.isOnSequence(jA.QUEST_INDEX,0)){const k=new Ti.rD(K.q.instance.game);k.addEvents([1427,1428].map((B=>({dialogueData:k.dataProvider.get(B),blockInput:!0})))),k.addEvents([{callback:()=>{this.zone.completeSequence(jA.QUEST_INDEX,0),this.screen.process()}}]),k.start()}return null}}jA.QUEST_INDEX=9,jA.QUEST_START_DIALOGUE_IDS=[316,317];class $A extends vn.b{constructor(k){super(k),this.questManagerIdentifier="985-7051",this._assets=[Rn.t.Tileset_firefly_new_png,q._.Npc_sprite_wizard_json,q._.Zone_forest_json,Rn.t.Tileset_collisions_png,X.V.Bgm_firefly_forest],this.name="Firefly Forest",this.ID=hn.A_.FOREST,this.guardian="FOREST_GUARDIAN",this.battleBG="battle-forest-outside",this.defaultOnFaint="forest-C8",this.questHub="forest-C8",this.bgmID=15,this.currency=13,this.zoneIndex=pT.P.Firefly,this.states=["chest1","chest2","chest3","chest4","wizard1","wizard2","wizard3","wizard4","daily","hasdaily","fakeMonsterDefeated","questMonsterDefeated","chest5","chest6",Zu.PIPPET_ENCOUNTER,Zu.PIPPET_REMATCH,Zu.PIPPET_DEFEATED,"flutePlayed"],this.monsters=[25,29,32,52,55,59,69,81];const B={map:"forest-Titan",cutscene:"forest-titanIntro",harvey:{x:330,y:270},sign:{x:240,y:280},catapult:{x:200,y:430,arcHeight:300},titan:{x:1100,y:390,impactOffset:{x:-130,y:0}},entry:{x:550,y:450},battleBG:[nr.q.Battle_forest_outside_bg,nr.q.Battle_forest_outside_fg]};this.maps={A3:new rA(this,this._assets),A4:new oA(this,this._assets),A5:new hA(this,this._assets),B5:new cA(this,this._assets),B6:new dA(this,this._assets),B7:new lA(this,this._assets),B8:new uA(this,this._assets),C4:new fA(this,this._assets),C7:new bA(this,this._assets),C8:new pA(this,this._assets),D3:new _A(this,this._assets),Titan:new xT(this,this._assets,B)},Promise.all([Cf.T.ready,Gt.R.dataBundleLoadPromise]).then((()=>{this.setZoneRewards()})).catch((k=>{K.q.instance.prodigy.open.messageBoxError("ERROR_LOADING_ZONE",["WORLD_FIREFLY_FOREST"],k,"Error, unable to load Firefly Zone Rewards JSON")})),this.scenes={titanIntro:new _T(this,[Rn.t.Tileset_interior_general_png,Rn.t.Tileset_wall_collisions_png,X.V.Bgm_tutorial])}}setZoneRewards(){const k=(0,yT.mg)(Gt.R.loadData(Ft.r.ZoneRewardsFireflyForest_json));this.quests=Object.keys(this.quests).length>0?this.quests:{1:new SA(this,this._assets,k.quests.ForestQ1),2:new PA(this,this._assets,k.quests.ForestQ2),3:new MA(this,this._assets,k.quests.ForestQ3),4:new NA(this,this._assets,k.quests.ForestQ4),5:new LA.c(this,this._assets,k.quests.ForestQ5),6:new BA(this,this._assets,k.quests.ForestQ6),7:new UA(this,this._assets,k.quests.ForestQ7),8:new GA(this,this._assets,k.quests.ForestQ8),9:new jA(this,this._assets,k.quests.ForestQ9),10:new AA(this,this._assets,k.quests.ForestQ10),11:new CA(this,this._assets,k.quests.ForestQ11),12:new yA(this,this._assets,k.quests.ForestQ12)}}migrateQuestProgress(){const k=this.getCurrentQuestID();switch(k){default:case 1:case 2:this.startQuest(1,!0);break;case 3:case 4:case 5:this.startQuest(4,!0);break;case 6:case 7:this.startQuest(7,!0);break;case 8:this.startQuest(8,!0);break;case 9:this.startQuest(9,!0);break;case 10:this.startQuest(10,!0);break;case 11:this.startQuest(11,!0);break;case 12:this.startQuest(12,!0);break;case 13:}this.awardMissingQuestItems(k)}awardMissingQuestItems(k){const B=[],U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k>5&&!U.kennel.hasPet(LA.c.PET_AWARD_ID)&&B.push({type:"pet",ID:LA.c.PET_AWARD_ID,N:1,data:{level:U.getLevel(),stars:hi.s.xpRequiredForLevel(U.getLevel(),yo.V.Pet)}}),k>6&&B.push({type:"spell",ID:13},{type:"item",ID:67}),k>8&&B.push({type:"spell",ID:14},{type:"item",ID:69});const F=Tn.J.filterDuplicateItems(this.game,B);if(F.length>0)for(const G of F)Tn.J.bagItem(G,this.game,"pet"===G.type?"got-pet":"got-item",void 0,{source_type:gn.C.QuestReward});k>10&&U.backpack.consume("item",69,1)}start(k,B,U){super.start(k,B,U),this.showTopLeftNavigationButton()}createTopLeftNavigationButton(){this.showTopLeftNavigationButton()}placeDaily(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;(1===this.getState("hasdaily")||j.Aq$.isDefined(this.getQuestState())&&this.getQuestState().ID>1&&this.getQuestState().ID>1)&&F.backpack.hasItem("item",78)<99&&(this.firefly=U.addFireflyEvent(1260*Math.random(),700*Math.random(),150,150,this.fireflyOnClick.bind(this,U,k),null,0))}fireflyOnClick(k,B){const U=K.q.instance.prodigy.event.create();U.validPath(k.user,k.path,this.firefly.x+75,this.firefly.y+115),U.set(k.user,"evtProc",!0),U.function(this.interactFirefly.bind(this,k,B)),U.set(k.user,"evtProc",!1),U.start()}interactFirefly(k,B){if(!this.firefly.moving&&Math.abs(k.user.x-this.firefly.x)<150&&Math.abs(this.firefly.y+100-k.user.y)<150){this.firefly.destroy(),K.q.instance.prodigy.open.gotItem([{type:"item",ID:78}],null,null,"firefly");const k=[];for(const B in this.maps)k.push(B);const U=new nA.t(this.getState("daily").date);for(let F=0;F<5;F++)if(k[Math.floor(U.jumpFromStart(F)*(k.length-1))]===B.tag){const k=this.getState("daily").flags;k[F]=0,this.setState("daily",{date:this.getState("daily").date,flags:k,rewards:this.getState("daily").rewards})}}}teleport(k,B,U,F,G){tf.J.meetsNarrativeIntroRequirements?K.q.instance.prodigy.world.it("lamplight-B3"):super.teleport(k,B,U,F,G)}}class HA extends aA{constructor(k,B){super(k,"A3","MAP_FOREST_MOUNTAIN_GATE",1100,580,["forest_hard-A4"],B)}}class VA extends aA{constructor(k,B){super(k,"A4","MAP_FOREST_MOUNTAIN_PASS",1080,520,["forest_hard-A3","forest_hard-A5","forest_hard-B5"],B)}}class WA extends aA{constructor(k,B){super(k,"A5","MAP_FOREST_FIREFLY_CROSSING",220,90,["forest_hard-A4"],B)}}class qA extends aA{constructor(k,B){super(k,"B5","MAP_FOREST_CROSSROADS",1100,630,["forest_hard-A4","forest_hard-C4","forest_hard-B6"],B)}}class KA extends aA{constructor(k,B){super(k,"B6","MAP_FOREST_GRASSY_CLEARING",200,630,["forest_hard-B5","forest_hard-B7"],B)}}class zA extends aA{constructor(k,B){super(k,"B7","MAP_FOREST_FISHERMANS_POND",1190,240,["forest_hard-B6","forest_hard-C7"],B)}}class YA extends aA{constructor(k,B){super(k,"B8","MAP_FOREST_FIREFLY_CLEARING",1190,480,["forest_hard-C8"],B.concat(q._.Npc_sprite_merchant_json))}}class QA extends aA{constructor(k,B){super(k,"C4","MAP_FOREST_THE_OLD_ROAD",300,520,["forest_hard-B5","forest_hard-D3"],B.concat([q._.Npc_sprite_merchant_json]))}}class XA extends aA{constructor(k,B){super(k,"C7","MAP_FOREST_STONEFISH_BEACH",200,630,["forest_hard-B7","forest_hard-C8"],B)}}class ZA extends aA{constructor(k,B){super(k,"C8","MAP_FOREST_BIG_TREE",1190,520,["forest_hard-C7","forest_hard-B8"],B.concat(q._.Npc_sprite_flora_json,q._.Npc_sprite_merchant_json))}}class JA extends aA{constructor(k,B){super(k,"D3","MAP_FOREST_OLD_ROAD_REMAINS",200,520,["forest_hard-C4"],B.concat(q._.Boss_gerald_json,J.Q.Spine_boss_marionette_json,J.Q.Spine_music_notes_json))}}class tC extends $A{constructor(k){super(k),this.questManagerIdentifier="123-14b6",this._assets=[Rn.t.Tileset_firefly_new_png,q._.Npc_sprite_wizard_json,q._.Zone_forest_json,Rn.t.Tileset_collisions_png,X.V.Bgm_firefly_forest],this.name="Firefly Forest",this.ID=hn.A_.FORESTHARD,this.guardian="FOREST_GUARDIAN",this.battleBG="battle-forest-outside",this.defaultOnFaint="forest_hard-C8",this.questHub="forest_hard-C8",this.bgmID=15,this.currency=13,this.zoneIndex=pT.P.Firefly,this.difficultyMode=ri.i.Hard,this.states=["chest1","chest2","chest3","chest4","wizard1","wizard2","wizard3","wizard4","daily","hasdaily","fakeMonsterDefeated","questMonsterDefeated","chest5","chest6","chest7",Zu.PIPPET_ENCOUNTER,Zu.PIPPET_REMATCH,Zu.PIPPET_DEFEATED,"flutePlayed"],this.monsters=[],this.maps={A3:new HA(this,this._assets),A4:new VA(this,this._assets),A5:new WA(this,this._assets),B5:new qA(this,this._assets),B6:new KA(this,this._assets),B7:new zA(this,this._assets),B8:new YA(this,this._assets),C4:new QA(this,this._assets),C7:new XA(this,this._assets),C8:new ZA(this,this._assets),D3:new JA(this,this._assets)}}}var eC,iC=U(75017),sC=U(93375);class nC extends Un.T{constructor(k,B){super(k,"exterior","MAP_HOUSE_EXTERIOR",685,420,["house-exit","suburbs"],B.concat(Rn.t.Tileset_exterior_general_png,X.V.Bgm_fun))}setup(k,B,U){super.setup(k,B,U);K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasCompletedTutorial()&&(this.addAreaEvent(k,B,{x:1240,y:480,w:80,h:240,rect:!0},"house-exit",120,580,null,LT.K.RIGHT),this.addAreaEvent(k,B,{x:685,y:300,w:100,h:160,rect:!0},"suburbs",null,null,null,LT.K.UP))}}class aC extends Un.T{constructor(k,B,U,F,G){super(k,U,"",B.houses[U].entryPoint.x,B.houses[U].entryPoint.y,F,G.concat(B.assets)),this.content=null,this.houseItems=[],this.player=null,this.houseData=null,this.houseTag=null,this.houseData=B.houses[U],this.houseTag=this.houseData.tag}setup(k,B,U){return super.setup(k,B,U),this.content=B.content,this.game=k,{}}setOwner(k){this.player=k,this.zoneName=`house-${this.player.userID}`}cleanup(){this.houseItems=[],this.content=null,super.cleanup()}loadHouseItems(k){for(let B=0;B-1&&this.houseItems.splice(B,1)}canPlaceItem(k){const B=k.getRenderer();if(!this.isValidSpace(B.getWorld(),B.getWidth(),B.getHeight()))return!1;for(let U=0;U0?1:0)),q=Math.floor(F-.5*$-($>0?1:0));return!(q>64||V>32||W<0||H<0)&&((1===this.screen.area[H][W]&&1===this.screen.area[H][q]||6===this.screen.area[H][W]&&6===this.screen.area[H][q])&&(1===this.screen.area[V][W]&&1===this.screen.area[V][q]||6===this.screen.area[V][W]&&6===this.screen.area[V][q]))}checkOverlap(k,B){if(k.getWorld().y>B.getWorld().y)return!1;const U=k.getBounds(),F=B.getBounds();return U.x+=2,U.y+=2,U.width-=4,U.height-=4,F.x+=2,F.y+=2,F.width-=4,F.height-=4,j.M_G.intersects(U,F)}getName(){const k=le.t.getCategoryItems("dormbg");for(let B=0;B!k._game)).forEach((k=>{this.removeHouseItem(k)})),this.player.house.snapDormItems(),this.loadHouseItems(this.player.house.getSortedActive()),null}start(k,B,U){return super.start(k,B,U),this.game.broadcaster.addAppListener(oi.F0.OpenEditor,this.openedEditor.bind(this),this),this.game.broadcaster.addAppListener(oi.F0.CloseEditor,this.closedEditor.bind(this),this),null}cleanup(){this.game.broadcaster.removeAppListener(oi.F0.OpenEditor,this),this.game.broadcaster.removeAppListener(oi.F0.CloseEditor,this),super.cleanup()}openedEditor(){K.q.instance.prodigy.open.houseEditorMenu(this,this.screen),this.screen.walkEnabled=!1,this.screen.user.stopTweens(),this.screen.user.stand();for(const k in this.screen.playerList)this.fadeOutPlayerContainer(this.screen.playerList[k]);this.fadeOutPlayerContainer(this.screen.user),this.game.broadcaster.addAppListener(oi.u0.PlayerAdded,this.playerEnteredHouse.bind(this),this)}fadeOutPlayerContainer(k){if(this.setInputEnabled(k,!1),j.Aq$.isDefined(k.follow)&&(this.game.add.tween(k.follow,this).to({alpha:0},300,j.GS3.Cubic.Out).start(),k.follow instanceof yr._)){const B=k.follow.findComponent(Er);j.Aq$.isDefined(B)&&B.fade(0,300)}return this.game.add.tween(k,this).to({alpha:0},300,j.GS3.Cubic.Out).start()}closedEditor(){for(const k in this.screen.playerList)this.fadeInPlayerContainer(this.screen.playerList[k]);this.game.broadcaster.addAppListener(oi.pm.StopPlayer,(()=>{this.fadeInPlayerContainerImmediately(this.screen.user),this.screen.walkEnabled=!0,this.game.broadcaster.removeAppListener(oi.pm.StopPlayer,this)}),this),this.fadeInPlayerContainer(this.screen.user).onTweenComplete.addOnce((()=>{this.screen.walkEnabled=!0,this.game.broadcaster.removeAppListener(oi.pm.StopPlayer,this)}),this),this.game.broadcaster.removeAppListener(oi.u0.PlayerAdded,this)}fadeInPlayerContainer(k){if(this.setInputEnabled(k,!0),j.Aq$.isDefined(k.follow)&&(this.game.add.tween(k.follow,this).to({alpha:1},300,j.GS3.Cubic.In).start(),k.follow instanceof yr._)){const B=k.follow.findComponent(Er);j.Aq$.isDefined(B)&&B.fade(1,300)}return this.game.add.tween(k,this).to({alpha:1},300,j.GS3.Cubic.In).start()}fadeInPlayerContainerImmediately(k){if(this.setInputEnabled(k,!0),j.Aq$.isDefined(k.follow)&&(k.follow.alpha=1,k.follow instanceof yr._)){const B=k.follow.findComponent(Er);j.Aq$.isDefined(B)&&B.setAlpha(1)}k.alpha=1}playerEnteredHouse(k){k.alpha=0,this.setInputEnabled(k,!0)}setInputEnabled(k,B){const U=k.sprites.children;for(let F=0;F=this.sprites.children.length&&(this.visible=!0,this.stand())}update(){super.update();const k=Date.now();for(let B=0;B{if(B){let k=null;for(let U=0;U{U.inputEnabled=!0,U.events.onInputDown.add((()=>{B.sendNpcClickedEvent(),this.onMozzaEllaClick(k)}))}))}else j.VyI.log(`Could not find house with ID: ${this.houseID} in store`,j.$bb.Error)}else j.VyI.log(`Could not place Mozza Ella due to error with store - ${k.getErrorMessage()}`,j.$bb.Error)}))}onMozzaEllaClick(k){const B=K.q.instance.prodigy.event.create();B.text(11,"mozza-ella"),B.function(this.showPurchasePopup.bind(this,k)),B.start()}showPurchasePopup(k){const B=le.t.getCategoryItems("dormbg");let U=null;for(let j=0;j0?String(F):G.getText("ITEM_FREE"),H=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,V=U.data.member>0&&!H.hasMembership();K.q.instance.prodigy.open.messageBoxGeneric(G.getText("HOUSE_PREVIEW_PURCHASE_MESSAGE"),(()=>{this.onBuyButtonClick(U,k)}),(()=>{K.q.instance.prodigy.world.it(hn.A_.HOUSE)}),null,null,null,7,{modifyProperty:[{element:"yesText",property:"text",value:$},{element:"membershipGraphic",property:"visible",value:V},{element:"houseGraphic",property:"atlasName",value:le.t.getIconAtlas({ID:j.Aq$.isDefined(U)?U.ID:0,type:"dormbg",cost:k})},{element:"houseGraphic",property:"frameName",value:le.t.getIconFrame({ID:j.Aq$.isDefined(U)?U.ID:0,type:"dormbg",cost:k})}],addChildren:[]})}onBuyButtonClick(k,B){const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=Tn.J.getPurchasePrice(k.data,B);1!==k.data.member||U.hasMembership()?U.getGold()-1?k=[0]:this.houseTag.indexOf("medium")>-1?k=[1,2]:this.houseTag.indexOf("large")>-1?k=[3,4]:"forest"===this.houseTag?k=[5,6]:"coolCave"===this.houseTag?k=[7,8]:"firePit"===this.houseTag&&(k=[9,10]),k[Math.floor(Math.random()*k.length)]}}class cC extends Un.T{constructor(k,B){super(k,"warden","Academy Entrance",160,600,["house-exterior"],[Rn.t.Tileset_generic_new_png,Rn.t.Tileset_town_new_png,Rn.t.Tileset_forest_new_png,Rn.t.Tileset_collisions_png,q._.Npc_sprite_gnome_json,q._.Zone_lamplight_json,X.V.Bgm_tutorial,X.V.Bgm_puppetmaster,X.V.Bgm_lamplight,Z.c.Sfx_lamplight,q._.Npc_sprite_scoog_json],"map-lamplight-B0")}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:160,y:680,w:240,h:80,rect:!0},"house-exterior",160,120,null,LT.K.DOWN);const F=[];F.push(B.content.addChild(K.q.instance.prodigy.create.sprite(400,360,q._.Zone_lamplight_json,"pedestal"))),F.push(B.content.addChild(K.q.instance.prodigy.create.sprite(640,360,q._.Zone_lamplight_json,"pedestal"))),F.push(B.content.addChild(K.q.instance.prodigy.create.sprite(880,360,q._.Zone_lamplight_json,"pedestal"))),F.push(B.content.addChild(K.q.instance.prodigy.create.sprite(520,440,q._.Zone_lamplight_json,"pedestal"))),F.push(B.content.addChild(K.q.instance.prodigy.create.sprite(760,440,q._.Zone_lamplight_json,"pedestal")));for(let G=0;G{Ta.i.openLockMessage(hn.A_.HOUSE)});let G=null;return this.featureRequirements.meetsRequirementsDeprecated(37)||(G=()=>{Ta.i.openLockMessage(hn.A_.LAMPLIGHT)}),this.addAreaEvent(k,B,{x:40,y:580,w:80,h:240,rect:!0},"suburbs",null,null,F,LT.K.LEFT),this.addAreaEvent(k,B,{x:1240,y:380,w:80,h:240,rect:!0},"lamplight-A4",120,500,G,LT.K.RIGHT),null}}class lC extends $n.Z{constructor(k){super(k,"exterior",[q._.Npc_sprite_noot_json,"monster-reduced-38",Rn.t.Tileset_collisions_png,Rn.t.Tileset_generic_new_png,Rn.t.Tileset_forest_new_png,X.V.Bgm_fun]),this.loadingData.time=1}setup(k,B,U){super.setup(k,B,U),B.user.x=600,B.user.y=480,this.exit=this.addAreaEvent(k,B,{x:1240,y:480,w:80,h:240,rect:!0},null,120,500,this.end.bind(this,k),LT.K.RIGHT),this.noot=B.addNPC(770,480,q._.Npc_sprite_noot_json),this.noot.float(!0),this.noot.walkSpeed=2}start(k,B){super.start(k,B,11);const U=B.foreground.addChild(K.q.instance.prodigy.create.sprite(this.noot.x,this.noot.y-50,q._.General_core_json,"area-pointer"));U.anchor.set(.5,.5),U.visible=!1,U.angle=90,U.scale.x=U.scale.y=0;const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;j.Aq$.isDefined(F.backpack.data.hat)&&(F.backpack.data.hat=F.backpack.data.hat.filter((k=>12!==k.ID)));const G=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),$=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);G.execute($.getStateMachine(45),{scene:this,game:k,screen:B,pointer:U,exit:this.exit,noot:this.noot},null)}jumpHand(k,B,U){B.visible=!0,k.add.tween(B.scale,this).to({x:1,y:1},800,j.GS3.Quadratic.Out).start(),k.add.tween(B,this).to({y:B.y-100},1e3,j.GS3.Quadratic.Out).to({y:B.y+50},1e3,j.GS3.Quadratic.In).start();const F=k.add.tween(B,this).to({x:1180},2e3,j.GS3.Linear.None);j.Aq$.isDefined(U)&&F.onTweenComplete.add(U),F.start()}end(k){K.q.instance.prodigy.world.it("house-exit",480,320),this.zone.completeSequence(1,2)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),this.exit&&(this.exit.destroy(),this.exit=null),super.cleanup()}}class uC extends $n.Z{constructor(k){super(k,"exterior",[q._.Npc_sprite_noot_json,"monster-reduced-38",Rn.t.Tileset_collisions_png,Rn.t.Tileset_generic_new_png,Rn.t.Tileset_forest_new_png,X.V.Bgm_fun]),this.loadingData.time=1}setup(k,B,U){super.setup(k,B,U),this.noot=B.addNPC(770,480,q._.Npc_sprite_noot_json),this.noot.float(!0),this.noot.walkSpeed=2,B.user.x=600,B.user.y=480,B.user.hideName()}start(k,B){super.start(k,B,11);const U=this.addMonster(k,B,1,this.game.width+100,480,!1,{encounter:[{ID:59}]},!0),F=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),G=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);F.execute(G.getStateMachine(44),{scene:this,game:k,screen:B,player:B.user,open:K.q.instance.prodigy.open,noot:this.noot,monster:U,path:B.path,pathfinder:B.path},null)}battle(k){const B={revampBattleType:Ni.gu.Tutorial1,intro:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_WIZARD_BATTLE"),screen:"battle-forest-generic",encounter:[{ID:59}],difficulty:2,dropsDisabled:!0,drops:[{type:"gold",N:50}]};this.technicalMetricsManager.sendOnboardingFunnelEvent(Gh.l.FirstTutorialBattleStarted),K.q.instance.prodigy.battle.battleStats.type="FirstTutorialBattle",K.q.instance.prodigy.battle.start(B,this.end.bind(this,k),this.end.bind(this,k),this.end.bind(this,k),"house-exit")}end(k){this.technicalMetricsManager.sendOnboardingFunnelEvent(Gh.l.FirstTutorialBattleWon),K.q.instance.prodigy.world.it("house-exterior",450,400),this.zone.completeSequence(1,1)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),super.cleanup()}}class fC extends $n.Z{constructor(k,B){super(k,"exterior",[q._.Npc_sprite_noot_json,"monster-reduced-38",Rn.t.Tileset_collisions_png,Rn.t.Tileset_generic_new_png,Rn.t.Tileset_forest_new_png,X.V.Bgm_fun]),this.noot=null,this.loadingData.time=1}setup(k,B,U){super.setup(k,B,U),this.game=k,B.user.x=1500,B.user.y=480,this.noot=B.addNPC(1500,500,q._.Npc_sprite_noot_json),this.noot.float(!0)}start(k,B){super.start(k,B,9);const U=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),F=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);U.execute(F.getStateMachine(191),{game:k,screen:B,scene:this,player:B.user,noot:this.noot,open:K.q.instance.prodigy.open,path:B.path,pathfinder:B.path},null)}end(k){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasCompletedTutorial()||K.q.instance.prodigy.world.getZone(hn.A_.HOUSE).completeQuest(1),K.q.instance.prodigy.world.it("forest-C8")}cleanup(){this.technicalMetricsManager.sendOnboardingFunnelEvent(Gh.l.TutorialComplete);const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.data.isPostTutorialBattleTime=!0,k.forceSaveCharacter(),k.saveEnabled=!1,this.noot&&(this.noot.destroy(),this.noot=null),super.cleanup()}}class bC extends $n.Z{constructor(k,B){super(k,"suburbs",B.concat([q._.Npc_sprite_noot_json,Z.c.Sfx_house_intro,X.V.Bgm_fun])),this.loadingData.time=1}setup(k,B,U){super.setup(k,B,U),B.user.x=480,B.user.y=280,B.user.hideName(),B.user.setWeaponHidden(!0),K.q.instance.prodigy.create.houseItem(B.background,17,480,160),B.foreground.addChild(K.q.instance.prodigy.create.sprite(420,160,nr.q.Sheets_dorm_17)),K.q.instance.prodigy.create.houseItem(B.background,3,400,160),K.q.instance.prodigy.create.houseItem(B.background,18,440,100),K.q.instance.prodigy.create.houseItem(B.background,18,840,100),K.q.instance.prodigy.create.houseItem(B.background,14,880,240),K.q.instance.prodigy.create.houseItem(B.background,1,880,140),K.q.instance.prodigy.create.houseItem(B.background,13,640,80)}start(k,B){super.start(k,B,11),this.technicalMetricsManager.sendOnboardingFunnelEvent(Gh.l.TutorialStart),this.houseIntro(k,B)}houseIntro(k,B){const U=B.addNPC(820,540,q._.Npc_sprite_noot_json);U.float(!0),U.walkSpeed=2,U.visible=!1;const F=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),G=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);F.execute(G.getStateMachine(56),{scene:this,game:k,screen:B,zone:this.zone,player:B.user,noot:U,path:B.path,pathfinder:B.path},null)}}class pC extends $n.Z{constructor(k,B){super(k,"exit",[q._.Npc_sprite_noot_json,Z.c.Sfx_house_intro,X.V.Bgm_fun,Z.c.Sfx_lamplight,Z.c.Sfx_lamplight_pets]),this.noot=null,this.loadingData.time=1}setup(k,B,U){super.setup(k,B,U),B.user.x=-100,B.user.y=600,this.monsters=[],this.monsters.push(this.makeMonster(136,1,k,B)),this.monsters.push(this.makeMonster(139,2,k,B)),this.monsters.push(this.makeMonster(145,3,k,B)),this.monsters.push(this.makeMonster(142,4,k,B)),this.monsters.push(this.makeMonster(148,5,k,B))}start(k,B){super.start(k,B,11),this.noot=B.addNPC(340,500,q._.Npc_sprite_noot_json),this.noot.float(!0),this.noot.visible=!1;const U=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),F=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);U.execute(F.getStateMachine(46),{game:k,screen:B,scene:this,player:B.user,monsterOne:this.monsters[0],monsterTwo:this.monsters[1],monsterThree:this.monsters[2],monsterFour:this.monsters[3],monsterFive:this.monsters[4],noot:this.noot,path:B.path,pathfinder:B.path,controller:U,service:F},null)}end(){K.q.instance.prodigy.world.it("academy-GH3",640,700,null,{fadeIn:!0,time:200,fadeOut:!1})}endBattle(){const k=K.q.instance.prodigy.dialogue.create();k.setText({index:199}),k.setText({callback:()=>{this.end()}}),k.startDeprecated("noot",!1),this.zone.completeSequence(1,3)}choosePet(k,B,U){this.technicalMetricsManager.sendOnboardingFunnelEvent(Gh.l.InspectPet),K.q.instance.prodigy.open.choosePet(U,(()=>{this.petsLeave(k,B,U)}))}rescueBattle(k,B){const U={revampBattleType:Ni.gu.Tutorial2,intro:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_WIZARD_BATTLE"),starOverride:20,screen:"battle-forest-generic",dropsDisabled:!0,drops:[{type:"gold",N:50}],encounter:[{ID:B.monsterData.ID}],difficulty:3};K.q.instance.prodigy.battle.battleStats.type="RescueTutorialBattle",K.q.instance.prodigy.battle.start(U,(()=>{this.endBattle()}),(()=>{this.endBattle()}),(()=>{this.endBattle()}),"house-exit")}petsLeave(k,B,U){const F=$.remove(this.monsters,(k=>k.getSource().getID()===U))[0],G=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),H=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);G.execute(H.getStateMachine(47),{game:k,screen:B,scene:this,noot:this.noot,player:B.user,chosenMonster:F,monsterOne:this.monsters[0],monsterTwo:this.monsters[1],monsterThree:this.monsters[2],monsterFour:this.monsters[3],path:B.path,pathfinder:B.path,controller:G,service:H},null)}makeMonster(k,B,U,F){const G=this.addMonster(U,F,B,500,200,!1,{encounter:[{ID:k}]},!0,this.choosePet.bind(this,U,F,k));return G.alpha=0,G.walkSpeed=2,G}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null);for(let k=0;k-1||k.indexOf("exterior")>-1||k.indexOf("warden")>-1)return void super.teleport(k,B,U,F,G);K.q.instance.prodigy.loading(!0);const H=j.Aq$.isDefined($)?$:K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.player=H;const V=B=>{this.teleportResponseCallback(B,k,H,F,G)};K.q.instance.prodigy.gameContainer.get("c97-bd0d").getCharData(H.userID.toString(),["system"],V,V)}teleportResponseCallback(k,B,U,F,G={}){const $=j.Aq$.isDefined(k)?k[U.userID]:null;if(K.q.instance.prodigy.loading(!1),j.Aq$.isDefined($)&&j.Aq$.isDefined($.system)&&$.system.is_house_locked){const k=K.q.instance.prodigy.classModeController.getInClassDisabledZones();k.includes("WORLD_YOUR_HOUSE")||k.push("WORLD_YOUR_HOUSE"),K.q.instance.prodigy.open.messageBoxPrefab({text:"SYSTEM_LOCKED_HOUSE",confirmButtonTextKey:"BUTTON_OKAY_UPPERCASE"})}else{let k=B;if(G.assets=j.Aq$.isDefined(G.assets)?G.assets:[],G.autoStart=!0,-1===k.indexOf("preview")){let B=this.getHouseMapFromTag(U.house.getCurrentHouseTag());if(j.Aq$.isDefined(B)||(B=this.getHouseMapFromTag("suburbs")),!j.Aq$.isDefined(this.maps[B]))return void j.VyI.log(`House was not found: ${B}`,j.$bb.Verbose);k=B}this.maps[k].setOwner(U),super.teleport(k,null,null,F,G)}}openHouseStore(){K.q.instance.prodigy.open.houseStore((()=>{K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.house.setAllInactive(),this.teleport("")}),{message:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MOVE_HOUSE_CONFIRM")},iC.p.NEW_HOUSE)}getDailyMaps(){return[]}onWorldMapHouseIconClick(){this.game.broadcaster.removeAppListener(oi.F0.ClickedHouseIcon,this,"UI"),K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_HOUSE_MOVING,ln.B.BREADCRUMB_CLICKED_WORLD_MAP_HOUSE)||K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_HOUSE_MOVING,ln.B.BREADCRUMB_CLICKED_WORLD_MAP_HOUSE),K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_HOUSE_VISITING,ln.B.BREADCRUMB_CLICKED_WORLD_MAP_HOUSE)||K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_HOUSE_VISITING,ln.B.BREADCRUMB_CLICKED_WORLD_MAP_HOUSE)}intializeHouseMaps(){this.game.broadcaster.removeAppListener(oi.fP.Loaded,this);const k=[Rn.t.Tileset_collisions_png,Rn.t.Tileset_wall_collisions_png,Rn.t.Tileset_firefly_new_png,Rn.t.Tileset_generic_new_png,Rn.t.Tileset_minecarts_png,X.V.Bgm_tutorial,Rn.t.Tileset_exterior_general_png,X.V.Bgm_lamplight];this.maps={exit:new dC(this,k),exterior:new nC(this,k),warden:new cC(this,k)};const B=le.t.getCategoryItems("dormbg");for(const U in vC.HOUSES){const F=vC.HOUSES[U];for(const U in F.houses){let G=-1;for(let k=0;k{this.openHarveyStore()}),this);const V=this.screen.content.addChild(K.q.instance.prodigy.create.sprite(385,380,q._.Boss_titan_json,"harveySign"));V.anchor.x=.5,V.anchor.y=1,V.inputEnabled=!0,V.events.onInputDown.add((()=>{K.q.instance.prodigy.open.titanProgress(!0)})),B.addDoor({x:560,y:240,w:120,h:160,targetX:620,targetY:400},K.q.instance.prodigy.open.store.bind(K.q.instance.prodigy.open,3,void 0,void 0,{originType:bi.$N.Door})),B.addDoor({x:1e3,y:160,w:120,h:160,targetX:1060,targetY:320},K.q.instance.prodigy.open.stylistStore.bind(K.q.instance.prodigy.open,null,null,null,K.q.instance.prodigy.skin.isFestivalActive("Summerfest")?k=>{$.times(2,(B=>{const U=0===B?50:51,F=k.getPages()[B];F.setStoreItems($.differenceWith(F.getStoreItems(),le.t.getItem("itemTable",U).data.items,((k,B)=>k.getType()===B.type&&k.getID()===B.ID)))}))}:null))}openHarveyStore(){const k=new Ti.rD(this.game);k.addEvents([{callback:()=>{k.close(),K.q.instance.prodigy.open.store(21)}}]),k.start()}setIndicator(k){this.indicator=TT.createIndicator(k),this.indicator.position.set(-5,-105),this.indicator.inputEnabled=!0,this.game.add.tween(this.indicator,this).to({y:this.indicator.y-20},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0)}}const IC={x:40,y:500},DC={x:1120,y:60},RC={x:1240,y:420};class PC extends mC{constructor(k,B){super(k,"A4","MAP_LAMPLIGHT_PET_PARK",1120,180,["house-exit","lamplight-A3","lamplight-B4"],B,[{targetMapTag:"house-exit",position:IC,angle:eC.Left},{targetMapTag:"lamplight-A3",position:DC,angle:eC.Up},{targetMapTag:"lamplight-B4",position:RC,angle:eC.Right}])}setup(k,B,U={}){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1150,y:700,w:340,h:80,rect:!0},"lamplight-B2",320,340,null,LT.K.DOWN),K.q.instance.prodigy.world.getZone(hn.A_.HOUSE).completeQuest(1);const F=$.get(U,"distractCallback",null);this.addAreaEvent(k,B,Object.assign(Object.assign({},IC),{w:80,h:160,rect:!0}),"house-exit",1160,380,$.get(U,"blockDirectionCallbacks.left",null),LT.K.LEFT),this.addAreaEvent(k,B,Object.assign(Object.assign({},DC),{w:160,h:120,rect:!0}),"lamplight-A3",1120,540,$.get(U,"blockDirectionCallbacks.up",null),LT.K.UP),this.addAreaEvent(k,B,Object.assign(Object.assign({},RC),{w:80,h:200,rect:!0}),"lamplight-B4",120,457.5,$.get(U,"blockDirectionCallbacks.right",F),LT.K.RIGHT),B.addDoor({x:280,y:240,w:120,h:160,targetX:340,targetY:400},(()=>{K.q.instance.prodigy.open.store(1)}))}}class MC extends mC{constructor(k,B){super(k,"B0","MAP_LAMPLIGHT_ACADEMY_ENTRANCE",-500,600,["lamplight-B1"],B.concat([q._.Zone_lamplight_json,Rn.t.Tileset_firefly_new_png,X.V.Bgm_puppetmaster,Z.c.Sfx_academy_portal_open,Z.c.Sfx_academy_portal_close,X.V.Bgm_academy_greathall]),[])}setup(k,B,U={}){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;ti.U.progressData.step===Ze.B.NotStarted&&F.hasFoundAllKeystones()?jn.E.runAllKeystonesSequenceOnMapSetup((()=>(0,G.sH)(this,void 0,void 0,(function*(){this.setup(k,B,U)})))):K.q.instance.prodigy.world.zones.academy.playScene("introPt1")}}const NC={x:40,y:480},xC={x:1100,y:680};class LC extends mC{constructor(k,B){super(k,"B1","MAP_LAMPLIGHT_ACADEMY_CROSSROADS",160,600,["forest-C8","lamplight-B2"],B,[{targetMapTag:"forest-C8",position:NC,angle:eC.Left},{targetMapTag:"lamplight-B2",position:xC,angle:eC.Down}])}setup(k,B,U={}){super.setup(k,B);let F=null;F=this.featureRequirements.meetsRequirementsDeprecated(32)?$.get(U,"distractCallback",null):()=>{Ta.i.openLockMessage(hn.A_.FOREST)},this.addAreaEvent(k,B,Object.assign(Object.assign({},xC),{w:240,h:80,rect:!0,canReTrigger:!0}),"lamplight-B2",640,260,null,LT.K.DOWN);let G;switch(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.currentDifficulty){case ri.i.Expert:G="forest_expert-C8";break;case ri.i.Hard:G="forest_hard-C8";break;default:G="forest-C8"}this.addAreaEvent(k,B,Object.assign(Object.assign({},NC),{w:80,h:240,rect:!0}),G,1160,520,F,LT.K.LEFT)}}const kC={x:640,y:40},BC={x:1240,y:440},UC={x:40,y:320};class FC extends mC{constructor(k,B){super(k,"B2","MAP_LAMPLIGHT_OUTSKIRTS",640,220,["lamplight-A2","lamplight-B1","lamplight-C2"],B,[{targetMapTag:"lamplight-B1",position:kC,angle:eC.Up},{targetMapTag:"lamplight-C2",position:BC,angle:eC.Right},{targetMapTag:"lamplight-A2",position:UC,angle:eC.Left}])}setup(k,B,U={}){super.setup(k,B),this.addAreaEvent(k,B,Object.assign(Object.assign({},kC),{w:240,h:200,rect:!0}),"lamplight-B1",1100,600,null,LT.K.UP),this.addAreaEvent(k,B,Object.assign(Object.assign({},BC),{w:80,h:160,rect:!0}),"lamplight-C2",120,320,null,LT.K.RIGHT),this.addAreaEvent(k,B,Object.assign(Object.assign({},UC),{w:80,h:160,rect:!0}),"lamplight-A2",1160,360,null,LT.K.LEFT)}}const GC={x:1240,y:380},jC={x:40,y:380},$C={x:650,y:300};class HC extends mC{constructor(k,B){super(k,"B3","MAP_LAMPLIGHT_TOWN_SQUARE",120,417.5,["lamplight-A3","lamplight-C3"],B.concat(q._.Zone_lamplight_json,q._.Npc_sprite_merchant_json,J.Q.Spine_npc_slimerella_json),[{targetMapTag:"lamplight-C3",position:GC,angle:eC.Right},{targetMapTag:"lamplight-A3",position:jC,angle:eC.Left},{targetMapTag:"moon-A1",position:$C,angle:eC.Up}])}init(k,B,U,F){if(K.q.instance.prodigy.skin.isFestivalActive(Qe.R.Springfest)){const k=K.q.instance.prodigy.skin.active.find((k=>k instanceof Qw));if(j.Aq$.isDefined(k))for(const[B,U]of Object.entries(k.b3FishLayerStates))this.enableLayerID(Number(B),U)}else Tn.J.isNightTime()?(this.enableLayerID(1,!0),this.enableLayerID(0,!1)):(this.enableLayerID(1,!1),this.enableLayerID(0,!0));return super.init(k,B,U,F)}setup(k,B,U={}){super.setup(k,B),this.setupAsync(k,B,U).catch(j.RQr.createHandler("Error setting up LamplightB3"))}setupAsync(k,B){return(0,G.sH)(this,arguments,void 0,(function*(k,B,U={}){if(this.addAreaEvent(k,B,Object.assign(Object.assign({},GC),{w:80,h:240,rect:!0}),"lamplight-C3",120,437.5,null,LT.K.RIGHT),this.addAreaEvent(k,B,Object.assign(Object.assign({},jC),{w:80,h:240,rect:!0}),"lamplight-A3",1160,437.5,null,LT.K.LEFT),tf.J.meetsNarrativeIntroRequirements)return K.q.instance.game.input.enabled=!1,void this.zone.playScene("campaignReplayNarrativeIntro");if(tf.J.meetsNarrativeCatchupRequirements)return K.q.instance.game.input.enabled=!1,void this.zone.playScene("campaignReplayNarrativeCatchup");const F=K.q.instance.prodigy.gameContainer.get("d0e-64fd");if(K.q.instance.prodigy.skin.isFestivalActive(Qe.R.Summerfest))this.slimerella=new Zw.p(this.game,"NPC_NAME_SCIENTIST_SLIME",491,Kn.ac.Merchant,B.content,950,570,"idle",B.foreground);else if(K.q.instance.prodigy.skin.isFestivalActive(Qe.R.StarlightFestival)||K.q.instance.prodigy.skin.isFestivalActive(Qe.R.Pumpkinfest)||K.q.instance.prodigy.skin.isFestivalActive(Qe.R.Winterfest)||K.q.instance.prodigy.skin.isFestivalActive(Qe.R.MoonlightFestival));else if(K.q.instance.prodigy.skin.isFestivalActive())this.slimerella=new Zw.p(this.game,"NPC_NAME_SCIENTIST_SLIME",491,Kn.ac.Merchant,B.content,260,575,"idle",B.foreground);else{B.content.addChild(K.q.instance.prodigy.create.image(987,80,q._.Zone_lamplight_json,Tn.J.isNightTime()?"twilight-wheel":"twilight-wheel-off")),B.addDoor({x:1e3,y:80,w:200,h:200,targetX:1100,targetY:280,disableSound:!0},(()=>{this.openTwilightWheel(this.game,B)}));const k={gnomeWheelerNpcOnClick:(...k)=>{this.openTwilightWheel(this.game,B)}},U={gnomeSpinnerNpcOnClick:(...k)=>{this.openDayWheel(this.game,B)}};Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(F,Ei.l.NPCGnomeWheeler,k,B.contentGameObject).then((k=>(0,G.sH)(this,void 0,void 0,(function*(){k.transform.setPosition(960,300),B.data.addCollisionZone(B,940,230,90,90)})))).catch(j.RQr.createHandler("Error loading NPC Gnome Wheeler")),B.content.addChild(K.q.instance.prodigy.create.image(95,80,q._.Zone_lamplight_json,"wheel-of-wonder")),B.addDoor({x:100,y:80,w:160,h:200,targetX:180,targetY:280,disableSound:!0},(()=>{this.openDayWheel(this.game,B)})),Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(F,Ei.l.NPCGnomeSpinner,U,B.contentGameObject).then((k=>(0,G.sH)(this,void 0,void 0,(function*(){k.transform.setPosition(310,300),B.data.addCollisionZone(B,280,230,90,90)})))).catch(j.RQr.createHandler("Error loading NPC Gnome Spinner")).then(),this.slimerella=new Zw.p(this.game,"NPC_NAME_SCIENTIST_SLIME",491,Kn.ac.Merchant,B.content,260,575,"idle",B.foreground)}if(this.slimerella){const k=!0===this.zone.getState("firstPotion");this.slimerella.onClick.add((()=>{const B=new Ti.rD(this.game);k&&B.addEvents([{dialogueData:B.dataProvider.get(645),blockInput:!0},{dialogueData:B.dataProvider.get(646),blockInput:!0},{callback:()=>{this.zone.setState("firstPotion",!1)}}]),B.addEvents([{dialogueData:B.dataProvider.get(651),blockInput:!0},{dialogueData:B.dataProvider.get(652),blockInput:!0}]),B.addEvents([{callback:()=>{B.close(),K.q.instance.prodigy.open.store(4)}}]),B.start()}),this)}}))}openTwilightWheel(k,B){if(Tn.J.isNightTime()){const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;new An.Q(k,B.menus,U,B,2)}else this.segment.economy.sendPrizeWheelSpinFailedEvent(mn.U.TwilightWheel,En.WE.OutsideOfHours),K.q.instance.prodigy.open.messageBoxOkay(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TWILIGHT_WHEEL_COME_BACK_LATER"),K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("BUTTON_OKAY"),null)}openDayWheel(k,B){const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;new An.Q(k,B.menus,U,B,1)}}const VC={x:1240,y:420},WC={x:40,y:420},qC={x:160,y:680};class KC extends mC{constructor(k,B){super(k,"B4","MAP_LAMPLIGHT_LOWER_INTERSECTION",160,600,["lamplight-A4","lamplight-C4","lamplight-B5"],B,[{targetMapTag:"lamplight-C4",position:VC,angle:eC.Right},{targetMapTag:"lamplight-A4",position:WC,angle:eC.Left},{targetMapTag:"lamplight-B5",position:qC,angle:eC.Down}])}setup(k,B,U={}){super.setup(k,B,U),this.addAreaEvent(k,B,Object.assign(Object.assign({},VC),{w:80,h:200,rect:!0}),"lamplight-C4",180,457.5,null,LT.K.RIGHT),this.addAreaEvent(k,B,Object.assign(Object.assign({},WC),{w:80,h:200,rect:!0}),"lamplight-A4",1160,457.5,null,LT.K.LEFT),this.addAreaEvent(k,B,Object.assign(Object.assign({},qC),{w:160,h:80,rect:!0}),"lamplight-B5",200,120,null,LT.K.DOWN),B.addDoor({x:600,y:240,w:120,h:160,targetX:660,targetY:400},(()=>{K.q.instance.prodigy.start(Ie.G.DanceDance)}))}}const zC={x:200,y:40};class YC extends mC{constructor(k,B){super(k,"B5","MAP_LAMPLIGHT_SOUTHERN_DOCK",200,120,["lamplight-B4"],B,[{targetMapTag:"lamplight-B4",position:zC,angle:eC.Up}])}setup(k,B,U={}){super.setup(k,B,U),this.addAreaEvent(k,B,Object.assign(Object.assign({},zC),{w:160,h:80,rect:!0}),"lamplight-B4",160,600,null,LT.K.UP)}}const QC={x:40,y:320},XC={x:200,y:680};class ZC extends mC{constructor(k,B){super(k,"C2","MAP_LAMPLIGHT_HISTORY_DISTRICT",200,600,["lamplight-B2","lamplight-C3"],B.concat([q._.Npc_sprite_noot_json]),[{targetMapTag:"lamplight-B2",position:QC,angle:eC.Left},{targetMapTag:"lamplight-C3",position:XC,angle:eC.Down}])}setup(k,B,U={}){super.setup(k,B,U),this.addAreaEvent(k,B,Object.assign(Object.assign({},QC),{w:80,h:160,rect:!0}),"lamplight-B2",1160,440,null,LT.K.LEFT),this.addAreaEvent(k,B,Object.assign(Object.assign({},XC),{w:160,h:80,rect:!0}),"lamplight-C3",200,240,null,LT.K.DOWN)}}const JC={x:40,y:400},tO={x:200,y:80},eO={x:160,y:660};class iO extends mC{constructor(k,B){super(k,"C3-arena","MAP_LAMPLIGHT_COLISEUM",160,540,["lamplight-B3","lamplight-C2","lamplight-C4"],B.concat([Rn.t.Tileset_arena_gold_png,q._.Npc_sprite_noot_json]),[{targetMapTag:"lamplight-B3",position:JC,angle:eC.Left},{targetMapTag:"lamplight-C2",position:tO,angle:eC.Up},{targetMapTag:"lamplight-C4",position:eO,angle:eC.Down}])}setup(k,B,U={}){super.setup(k,B,U),this.addAreaEvent(k,B,Object.assign(Object.assign({},JC),{w:80,h:240,rect:!0}),"lamplight-B3",1160,417.5,null,LT.K.LEFT),this.addAreaEvent(k,B,Object.assign(Object.assign({},tO),{w:160,h:160,rect:!0}),"lamplight-C2",200,600,null,LT.K.UP),this.addAreaEvent(k,B,Object.assign(Object.assign({},eO),{w:160,h:120,rect:!0}),"lamplight-C4",200,180,null,LT.K.DOWN);const F=sr.loadWithInjectedValues(this.prefabLoader,Ei.l.PVPArenaOutsideTrophyCase,{TROPHY_CASE_GUID:K.q.instance.prodigy.skin.isFestivalActive(Qe.R.Pumpkinfest)?nr.q.Trophy_exterior_00_night:nr.q.Trophy_exterior_00});B.contentGameObject.addChild(F),F.transform.setPosition(510,36),B.addDoor({x:520,y:200,w:120,h:160,targetX:580,targetY:360},(()=>{this.onArenaEnterGameDiscoveryEvent(),K.q.instance.prodigy.world.it("lamplight-coliseum")}))}onArenaEnterGameDiscoveryEvent(){this.segment.featureCommon.sendInterfaceEvent({interfaceName:ph.B.HiArenaHub,interfaceType:bi.Wm.Screen,originType:bi.$N.Door})}}(0,G.Cg)([(0,j.fFd)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],iO.prototype,"prefabLoader",void 0);class sO extends zn.R{constructor(k,B,U,F){const G=new qn.s(k);G.init({npc_name:"NPC_NAME_TOY_MERCHANT",npc_type:Kn.ac.Merchant,x_coord:U,y_coord:F,npc_animation_id:"idle"}),super(k,B,G,null,U,F),this._tweens=[],this.setup()}setup(){this._standTween=[];const k=q._.Npc_sprite_toy_json,B="machav2-";pn.K.cacheAsset(this.game,k,pn.K.zoneAssetsCached),this._spriteContainer=K.q.instance.prodigy.create.element(this.sprites,0,0),this._shadow=this._spriteContainer.add(K.q.instance.prodigy.create.sprite(19,19,k,`${B}shadow`)),this._shadow.anchor.set(.5,.5),this._body=this._spriteContainer.add(K.q.instance.prodigy.create.sprite(-4,-43,k,`${B}body1`)),this._spriteContainer.add(K.q.instance.prodigy.create.sprite(-17,-107,k,`${B}head1`,null,this.createStandTween.bind(this,B))),this._spriteContainer.add(K.q.instance.prodigy.create.sprite(50,-150,k,"toy-merchant-cart"));for(let U=0;U{k.close(),K.q.instance.prodigy.open.store(46)}}]),k.start(),this.sendNpcClickedEvent()}}const nO={x:60,y:420},aO={x:200,y:60};class rO extends mC{constructor(k,B){super(k,"C4","MAP_LAMPLIGHT_MARKET",200,180,["lamplight-B4","lamplight-C3"],B.concat([q._.Npc_sprite_noot_json,q._.Npc_sprite_toy_json]),[{targetMapTag:"lamplight-B4",position:nO,angle:eC.Left},{targetMapTag:"lamplight-C3",position:aO,angle:eC.Up}])}setup(k,B,U={}){super.setup(k,B,U),this.addAreaEvent(k,B,Object.assign(Object.assign({},nO),{w:120,h:200,rect:!0}),"lamplight-B4",1160,457.5,$.get(U,"distractCallback",null),LT.K.LEFT),this.addAreaEvent(k,B,Object.assign(Object.assign({},aO),{w:160,h:120,rect:!0}),"lamplight-C3",160,540,null,LT.K.UP),B.addDoor({x:840,y:280,w:120,h:160,targetX:900,targetY:440},K.q.instance.prodigy.open.store.bind(K.q.instance.prodigy.open,2)),new sO(k,B.content,430,370)}}var oO;!function(k){k[k.ArenaMaster=0]="ArenaMaster",k[k.ArenaGate=1]="ArenaGate",k[k.TrophyCase=2]="TrophyCase",k[k.Signpost=3]="Signpost"}(oO||(oO={}));class hO extends Un.T{constructor(k,B){super(k,"arena-lobby","MAP_LAMPLIGHT_COLISEUM",640,520,[],B.concat([Rn.t.Tileset_darktower_png,Rn.t.Tileset_town_new_png,q._.Npc_sprite_clankboot_json,q._.Npc_sprite_gnome_json,Rn.t.Tileset_water_new_png,nr.q.Parallax_tier1_front_small,nr.q.Parallax_tier2_front_small,nr.q.Parallax_tier3_front_small,nr.q.Parallax_tier1_back_small,nr.q.Parallax_tier2_back_small,nr.q.Parallax_tier3_back_small,nr.q.Blur_tier1_tier2_front_small,nr.q.Blur_tier2_tier3_front_small,nr.q.Blur_tier1_tier2_back_small,nr.q.Blur_tier2_tier3_back_small,"references",Rn.t.Tileset_arena_gold_png,Rn.t.Tileset_ancient_ruins_png,Rn.t.Tileset_arena_bronze_png,X.V.Bgm_arena_lobby,q._.Tileset_core_json,q._.Ui_battle_arena_json,q._.Ui_coop_json,q._.Ui_store_json,q._.Ui_icons_json,q._.General_map_json,q._.Ui_guide_hands_json,J.Q.Spine_shadowportal_json,J.Q.Spine_arena_shield_bronze1_json,J.Q.Spine_arena_shield_bronze2_json,J.Q.Spine_arena_shield_bronze3_json,J.Q.Spine_arena_shield_silver1_json,J.Q.Spine_arena_shield_silver2_json,J.Q.Spine_arena_shield_silver3_json,J.Q.Spine_arena_shield_gold1_json,J.Q.Spine_arena_shield_gold2_json,J.Q.Spine_arena_shield_gold3_json,J.Q.Spine_arena_shield_bronze3_small_json,J.Q.Spine_arena_shield_bronze2_small_json,J.Q.Spine_arena_shield_bronze1_small_json,J.Q.Spine_arena_shield_silver3_small_json,J.Q.Spine_arena_shield_silver2_small_json,J.Q.Spine_arena_shield_silver1_small_json,J.Q.Spine_arena_shield_gold3_small_json,J.Q.Spine_arena_shield_gold2_small_json,J.Q.Spine_arena_shield_gold1_small_json,J.Q.Spine_arena_torch_bronze_json,J.Q.Spine_arena_torch_silver_json,J.Q.Spine_arena_torch_gold_json,J.Q.Spine_arena_fountain_parallax_json,Z.c.Sfx_arena_gate_open,Z.c.Sfx_arena_gate_close])),this._isGateOpen=!1,this._targetPrefabConfig=null,this._loadingPrefabs=[],this._coliseumPrefabs=[{prefab:Ei.l.PVPArenaNPCArenaMaster,position:new V.Point(700,280),actionParameters:{x:620,y:300,w:10,h:10,rect:!0,canReTrigger:!0},parentGameObject:null,gameObject:null,areaEvent:null,inputEnabled:!0},{prefab:Ei.l.PVPArenaGate,position:new V.Point(640,250),actionParameters:{x:620,y:300,w:10,h:10,rect:!0,canReTrigger:!0},parentGameObject:null,gameObject:null,areaEvent:null,inputEnabled:!0},{prefab:Ei.l.PVPArenaTrophyCase,position:new V.Point(303,263),actionParameters:{x:300,y:300,w:10,h:10,rect:!0,canReTrigger:!0},parentGameObject:null,gameObject:null,areaEvent:null,inputEnabled:!0},{prefab:Ei.l.PVPArenaSignpost,position:new V.Point(1e3,268),actionParameters:{x:1e3,y:295,w:10,h:10,rect:!0,canReTrigger:!0},parentGameObject:null,gameObject:null,areaEvent:null,inputEnabled:!0}]}setup(k,B,U={}){super.setup(k,B,U),this.addScenePrefabs()}cleanup(){this._loadingPrefabs.forEach((k=>{k.cancel()})),this._loadingPrefabs=[],super.cleanup()}addScenePrefabs(){this.addArenaGate(),this.addTrophyCase(),Promise.all(this._loadingPrefabs.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k.promise}))))).then((()=>{this.exitDoor()})).catch((k=>{j.VyI.log(`One or more of the scene prefabs did load correctly; ${k.message}`,j.$bb.Warning),this.exitDoor()}))}addPrefab(k){const B=this._prefabLoader.loadWithDependenciesFromGUID(k.prefab,k.parentGameObject);B.then((B=>{var U;k.gameObject=B,B.transform.setPosition(k.position.x,k.position.y);const F=B.findComponentInChildren(Bl.n);j.Aq$.isDefined(F)&&F.onClicked.add(this.conditionalWalk.bind(this,k)),j.Aq$.isDefined(null===(U=k.actionParameters)||void 0===U?void 0:U.callback)&&(k.areaEvent=this.addAreaEvent(this.game,this.screen,k.actionParameters,null,k.actionParameters.x,k.actionParameters.y,this.runLamplightPrefabCallback.bind(this,k),LT.K.LEFT,!1,!1))})).catch((B=>(j.VyI.log(`WARNING: Could not load prefab ${k.prefab} due to ${B.message}`,j.$bb.Warning),null))),this._loadingPrefabs.push(B)}conditionalWalk(k){j.Aq$.isDefined(k.actionParameters.callback)&&k.inputEnabled&&(this._targetPrefabConfig=k,this.validPathTo(this.game,this.screen,k.actionParameters.x,k.actionParameters.y))}addArenaMaster(){const k=this._coliseumPrefabs[oO.ArenaMaster];k.parentGameObject=this.screen.contentGameObject,this.addPrefab(k)}addArenaGate(){const k=this._coliseumPrefabs[oO.ArenaGate];k.parentGameObject=this.screen.contentGameObject,this.addPrefab(k)}addTrophyCase(){const k=this._coliseumPrefabs[oO.TrophyCase];k.parentGameObject=this.screen.contentGameObject,this.addPrefab(k)}addSignpost(){const k=this._coliseumPrefabs[oO.Signpost];k.parentGameObject=this.screen.contentGameObject,this.addPrefab(k)}runLamplightPrefabCallback(k){j.Aq$.isDefined(k.actionParameters.callback)&&k===this._targetPrefabConfig&&k.inputEnabled&&k.actionParameters.callback()}exitDoor(){const k=K.q.instance.prodigy.classModeController.isClassMode();this.screen.addDoor({x:560,y:540,w:240,h:150,targetX:640,targetY:600},(()=>{k?K.q.instance.prodigy.open.map():this.backToLampLight()}))}backToLampLight(){this.zone.bgmID=9,K.q.instance.prodigy.world.it("lamplight-C3",580,440)}forceInteraction(k){this._coliseumPrefabs.forEach((B=>{B.inputEnabled=k.includes(B.prefab)}))}openInteraction(){this._coliseumPrefabs.forEach((k=>{k.inputEnabled=!0}))}openGateAnimation(k){const B=this._coliseumPrefabs[oO.ArenaGate].gameObject.findComponentInChildren(Ir.j);B.stopAnimation(),B.playAnimation("lift",!1),K.q.instance.prodigy.audio.playSFX(115,"play"),B.spine.getSpine().onComplete.addOnce(k),this._isGateOpen=!0,this.forceInteraction([]),this.screen.walkEnabled=!1,this.game.broadcaster.broadcast(oi.Y1.HideRightSideHUD,oi.HG.HUD)}closeGateAnimation(){if(this._isGateOpen){const k=this._coliseumPrefabs[oO.ArenaGate].gameObject.findComponentInChildren(Ir.j);k.stopAnimation(),k.playAnimation("close",!1),K.q.instance.prodigy.audio.playSFX(116,"play"),this._isGateOpen=!1}this.screen.walkEnabled=!0,this.openInteraction(),K.q.instance.prodigy.audio.playBGM(38,!0),K.q.instance.prodigy.audio.resumeBGM(),K.q.instance.prodigy.notifications.resume(this),this.walkAway(),this.game.broadcaster.broadcast(oi.Y1.ShowRightSideHUD,oi.HG.HUD)}walkAway(k=!1){const B=k?-hO.AFTER_WALK.x:hO.AFTER_WALK.x,U=k?-hO.AFTER_WALK.y:hO.AFTER_WALK.y;this.validPathTo(this.game,this.screen,this.screen.user.position.x+B,this.screen.user.position.y+U)}setLobbyActive(k=!0){this.screen.backgroundGameObject.active=this.screen.contentGameObject.active=this.screen.foregroundGameObject.active=k}}hO.AFTER_WALK=new j.I9Y(-30,30),(0,G.Cg)([(0,j.fFd)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],hO.prototype,"_prefabLoader",void 0);const cO={x:0,y:460};class dO extends mC{constructor(k,B){super(k,"D3","MAP_LAMPLIGHT_FORT_FOX",100,460,["lamplight-C3"],B,[{targetMapTag:"lamplight-C3",position:cO,angle:eC.Left}])}setup(k,B,U={}){super.setup(k,B),this.addAreaEvent(k,B,Object.assign(Object.assign({},cO),{w:80,h:260,rect:!0}),"lamplight-C3",1050,510,null,LT.K.LEFT)}}class lO extends Pn.T{constructor(k,B){super(k,B,1,"",{type:"seq",N:7},["lamplight-A3"],[],[],[10],[],!1)}setup(k,B,U){return super.setup(k,B,U),this.zone.completeQuest(1),null}}var uO,fO,bO=U(90817),pO=U(97651);class vO extends $n.Z{constructor(k,B){super(k,"B3",B.concat(),"map-lamplight-B3")}setup(k,B,U){super.setup(k,B,U),K.q.instance.prodigy.notifications.pause(this),B.user.position.set(120,415),B.input.enabled=!1}start(k,B){super.start(k,B),this.playCutscene().catch((k=>{j.RQr.logError(k,"Error playing Campaign Replay Narrative Intro cutscene"),this.endCutscene()}))}playCutscene(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=new j._mx;j.wa5.getActiveScene().addGameObject(k),this.cutsceneLoadPromise=Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.CampaignReplayNarrativeCatchupCutscene,{HAS_CHARGED_LEVELS:Th.e.activePlayerHasChargedLevels,SHOW_CHARGED_LOST:this.chargedLostAnimation.bind(this),END_CUTSCENE:this.endCutscene.bind(this)},k),yield this.cutsceneLoadPromise,bO.gz.instance.sendAnalyticsStepEvent(Gh.l.CampaignReplayFtuePuppetMasterCutSceneStart,1),j.VyI.log("Narrative catchup cutscene prefab loaded",j.$bb.Info)}))}chargedLostAnimation(){var k,B,U,F;const G=null!==(F=null===(U=null===(B=null===(k=K.q.instance.prodigy.gameContainer.get("e20-0fb0"))||void 0===k?void 0:k.player)||void 0===B?void 0:B.playerContainer)||void 0===U?void 0:U.playerPrefab)&&void 0!==F?F:j.wa5.getActiveScene().container.get("MainPlayerGameObject"),$=null==G?void 0:G.findComponentInChildren(pO.e);$.showChargeLostEffect(),$.bindLevel(0)}endCutscene(){K.q.instance.prodigy.gameContainer.get("ba4-af03").setProgress({step:ni.q6.HardModeIntroduced}),K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_CAMPAIGN_REPLAY,ln.B.BREADCRUMB_CAMPAIGN_REPLAY_CATCHUP_SEEN),K.q.instance.prodigy.open.menuCloseAll(),bO.gz.instance.sendAnalyticsStepEvent(Gh.l.CampaignReplayFtueChargedLevelsRemoved,2),K.q.instance.prodigy.gameContainer.get("306-5359").updateChargedLevelsData().then((()=>K.q.instance.prodigy.world.teleportToCurrentMap())).catch(j.RQr.createHandler("CampaignReplayNarrativeCatchup.endCutscene: Failed to updated charged levels data"))}cleanup(){var k;K.q.instance.prodigy.notifications.resume(this),null===(k=this.cutsceneLoadPromise)||void 0===k||k.cancel(),super.cleanup()}}class gO extends $n.Z{constructor(k,B){super(k,"B3",B.concat(),"map-lamplight-B3")}setup(k,B,U){super.setup(k,B,U),K.q.instance.prodigy.notifications.pause(this),B.user.position.set(120,415),ti.U.shouldShowPuppetMasterDefeatCelebration()&&gC.E.addConfetti(this.screen.foregroundGameObject)}start(k,B){super.start(k,B),this.playCutscene().catch((k=>{j.RQr.logError(k,"Error playing Campaign Replay Narrative Intro cutscene"),this.endCutscene()}))}playCutscene(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=new j._mx;j.wa5.getActiveScene().addGameObject(k),this.cutsceneLoadPromise=Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(K.q.instance.prodigy.gameContainer.get("d0e-64fd"),Ei.l.CampaignReplayNarrativeIntroCutscene,{HAS_CHARGED_LEVELS:Th.e.activePlayerHasChargedLevels,SHOW_CHARGED_LOST:this.chargedLostAnimation.bind(this),END_CUTSCENE:this.endCutscene.bind(this)},k),yield this.cutsceneLoadPromise,bO.gz.instance.sendAnalyticsStepEvent(Gh.l.CampaignReplayFtuePuppetMasterCutSceneStart,1),j.VyI.log("Narrative intro cutscene prefab loaded",j.$bb.Info)}))}chargedLostAnimation(){var k,B,U,F;const G=null!==(F=null===(U=null===(B=null===(k=K.q.instance.prodigy.gameContainer.get("e20-0fb0"))||void 0===k?void 0:k.player)||void 0===B?void 0:B.playerContainer)||void 0===U?void 0:U.playerPrefab)&&void 0!==F?F:j.wa5.getActiveScene().container.get("MainPlayerGameObject"),$=null==G?void 0:G.findComponentInChildren(pO.e);$.showChargeLostEffect(),$.bindLevel(0)}endCutscene(){K.q.instance.prodigy.gameContainer.get("ba4-af03").setProgress({step:ni.q6.HardModeIntroduced}),K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_CAMPAIGN_REPLAY,ln.B.BREADCRUMB_CAMPAIGN_REPLAY_HARD_INTRO_SEEN),K.q.instance.prodigy.open.menuCloseAll(),bO.gz.instance.sendAnalyticsStepEvent(Gh.l.CampaignReplayFtuePuppetMasterCutSceneEnd,2),K.q.instance.prodigy.open.map({disableClose:!0,onClose:this.onWorldMapClosed,forceUnlock:["WORLD_FIREFLY_FOREST"],disableZoneGoals:!0})}onWorldMapClosed(){tf.J.featureDataHealthCheck(),K.q.instance.prodigy.world.it("lamplight-B3",580,360)}cleanup(){var k;K.q.instance.prodigy.notifications.resume(this),null===(k=this.cutsceneLoadPromise)||void 0===k||k.cancel(),super.cleanup()}}class mO extends $n.Z{constructor(k,B){super(k,"B3",B.concat([J.Q.Spine_npc_harriet_json,J.Q.Spine_npc_don_zorro_json])),this.loadingData.time=1}start(k,B){K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.HarrietNPC,590,415).catch(j.RQr.createHandler(`SpringfestIntro: Unable to load the NPC Prefab: ${Ei.l.HarrietNPC}`)),K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.DonZorroNPC,700,390).catch(j.RQr.createHandler(`SpringfestIntro: Unable to load the NPC Prefab: ${Ei.l.DonZorroNPC}`)),this.enterScene(k,B,(()=>{this.introDialogue(k,B)}))}introDialogue(k,B){const U=new Ti.rD(k);U.addEvents([{dialogueData:U.dataProvider.get(780),blockInput:!0},{dialogueData:U.dataProvider.get(795),blockInput:!0},{dialogueData:U.dataProvider.get(781),blockInput:!0},{dialogueData:U.dataProvider.get(796),blockInput:!0},{dialogueData:U.dataProvider.get(782),blockInput:!0},{dialogueData:U.dataProvider.get(797),blockInput:!0},{callback:()=>{this.addSpringfestHat(126)}},{dialogueData:U.dataProvider.get(783),blockInput:!0},{dialogueData:U.dataProvider.get(784),blockInput:!0},{callback:()=>{this.addSpringfestHat(123,(()=>{this.end(k,B,!0)}))}}]),U.start(!0)}addSpringfestHat(k,B){const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily,F=126===k?Yw.f.HARRIET_NAME_SEGMENT:Yw.f.DON_ZORRO_NAME_SEGMENT;K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("hat",k)<=0?K.q.instance.prodigy.open.gotItem([{type:"hat",ID:k,N:1}],B,void 0,void 0,void 0,void 0,{source_type:gn.C.Npc,source_id:F,instance_type:U.festivalType,instance_id:U.getFestivalInstanceName()}):B&&B()}end(k,B,U){K.q.instance.prodigy.notifications.resumeAll(),U&&(K.q.instance.prodigy.world.it(Yw.f.TOWN_CENTRE,120,420,void 0,{fadeIn:!0,time:500,fadeOut:!0}),K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_SPRINGFEST_CUTSCENES,ln.B.BREADCRUMB_SPRINGFEST_INTRO))}}class yO extends $n.Z{constructor(k,B){super(k,"B3",B,"map-lamplight-b3-summerfest"),this.loadingData.time=1}start(k,B){B.user.x=590,B.user.y=322,B.content.addChild(K.q.instance.prodigy.create.image(78,75,q._.Event_summerfest_json,"wheel-of-sun-map-asset"));const U=new Zw.p(k,"NPC_NAME_ATHENA",166,Kn.ac.Merchant,B.content,728,314,"idle");U.flip();const F=new Zw.p(k,"NPC_NAME_MIST",168,Kn.ac.Merchant,B.content,568,506,"idle"),G=new Zw.p(k,"NPC_NAME_MIZU",169,Kn.ac.Nicknamer,B.content,712,506,"idle");G.flip();const $=this.addMonster(k,B,151,-100,360,!0,{encounter:[{ID:151}],range:0}),H=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),V=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService);H.execute(V.getStateMachine(109),{scene:this,game:k,screen:B,player:B.user,athena:U,koi:new Zw.p(k,"NPC_NAME_KOI",167,Kn.ac.WheelGiver,B.content,310,300,"idle"),mist:F,mizu:G,applepot:$},null)}}class _O extends vn.b{constructor(k){super(k),this.difficultyModeAgnostic=!0,this.monsters={randDir:!0,encounter:[{ID:59},{ID:52},{ID:36}]},this.name="Lamplight",this.ID=hn.A_.LAMPLIGHT,this.game=k,this.bgmID=9,this.currency=1,this.minLevel=1,this.maxLevel=4,this.battleBG="battle-lamplight-outside",this.defaultOnFaint="lamplight-B3",this.questHub="lamplight-B3",this.zoneIndex=pT.P.Lamplight,this.states=["event","1stpresent","bounty","daily","firstPotion"];const B=[Rn.t.Tileset_generic_new_png,Rn.t.Tileset_town_new_png,Rn.t.Tileset_forest_new_png,Rn.t.Tileset_collisions_png,q._.Npc_sprite_gnome_json,q._.Zone_lamplight_json,X.V.Bgm_lamplight,Z.c.Sfx_lamplight,q._.Npc_sprite_scoog_json];this.maps={A1:new _C(this,B),A2:new TC(this,B),A3:new OC(this,B),A4:new PC(this,B),B0:new MC(this,B),B1:new LC(this,B),B2:new FC(this,B),B3:new HC(this,B),B4:new KC(this,B),B5:new YC(this,B),C2:new ZC(this,B),C3:new iO(this,B),C4:new rO(this,B),D3:new dO(this,B),coliseum:new hO(this,B)},this.quests={1:new lO(this,B)},this.scenes={springfestIntro:new mO(this,B),summerfestIntro:new yO(this,B),campaignReplayNarrativeIntro:new gO(this,B),campaignReplayNarrativeCatchup:new vO(this,B)}}init(k,B,U){super.init(k,B,U),j.Aq$.isDefined(this.getCurrentQuest())||this.startQuest(1)}teleport(k,B,U,F,G){var j;if(ti.U.shouldShowPuppetMasterDefeatCelebration()){const[k]=K.q.instance.prodigy.world.getCurrentMap().split("-");if(k!==this.ID){const k=K.q.instance.prodigy.gameContainer.get("306-5359");k.data.endgameCelebrationViews=(null!==(j=k.data.endgameCelebrationViews)&&void 0!==j?j:0)+1,k.updated=!0}}super.teleport(k,B,U,F,G)}}class EO extends Un.T{constructor(k,B){super(k,"A3","MAP_SPRINGFEST_GROTTO",270,430,["springfest-grotto-A3"],B),this.battleBG=Kw.t.BattleGrotto}}class wO extends Un.T{constructor(k,B){super(k,"A9","MAP_SPRINGFEST_GROTTO",170,430,["springfest-grotto-A9"],B),this.battleBG=Kw.t.BattleGrotto}}class TO extends Un.T{constructor(k,B){super(k,"B2","MAP_SPRINGFEST_GROTTO",170,430,["springfest-grotto-B2"],B),this.battleBG=Kw.t.BattleGrotto}}class SO extends Un.T{constructor(k,B){super(k,"B7","MAP_SPRINGFEST_GROTTO",170,430,["springfest-grotto-B7"],B),this.battleBG=Kw.t.BattleGrotto}}class AO extends vn.b{constructor(k){super(k),this.difficultyModeAgnostic=!0,this.mapEnteredFestivalContext=!0,this.bgmID=X.V.Bgm_spring_fest;const B=[Rn.t.Tileset_collisions_png,Rn.t.Tileset_grotto_springfest_png,X.V.Bgm_spring_fest];this.maps={A3:new EO(this,B),A9:new wO(this,B),B2:new TO(this,B),B7:new SO(this,B)}}}class CO extends AO{constructor(k){super(k),this.name="springfest_grotto_bunny",this.ID=hn.A_.SPRINGFESTGROTTO_BUNNY,this.defaultOnFaint="springfest_grotto_bunny-A3";const B=this.maps;Object.keys(B).forEach((k=>{B[k].zoneName=`${this.ID}-${k}`}))}}class OO extends AO{constructor(k){super(k),this.name="springfest_grotto_fox",this.ID=hn.A_.SPRINGFESTGROTTO_FOX,this.defaultOnFaint="springfest_grotto_fox-A3";const B=this.maps;Object.keys(B).forEach((k=>{B[k].zoneName=`${this.ID}-${k}`}))}}class IO extends Un.T{constructor(k,B){super(k,"A1","MAP_MOON_ENTRANCE",170,430,["moon-A1"],B),this.battleBG=Kw.t.BattleMoon}}class DO extends Un.T{constructor(k,B){super(k,"B1","MAP_MOON_ENTRANCE",170,330,["moon-B1"],B),this.battleBG=Kw.t.BattleMoon}}class RO extends Un.T{constructor(k,B){super(k,"C1","MAP_MOON_ENTRANCE",160,380,["moon-C1"],B),this.battleBG=Kw.t.BattleMoon}}class PO extends Un.T{constructor(k,B){super(k,"D1","MAP_MOON_ENTRANCE",1080,340,["moon-D1"],B),this.battleBG=Kw.t.BattleMoon}}class MO extends vn.b{constructor(k){super(k),this.difficultyModeAgnostic=!0,this.name="Moon",this.ID=hn.A_.MOON,this.zoneIndex=pT.P.None,this.bgmID=X.V.Bgm_moonlight_fest,this.defaultOnFaint="moon-A1",this.maps={A1:new IO(this,[]),B1:new DO(this,[]),C1:new RO(this,[]),D1:new PO(this,[])}}}class NO extends Ar.H{constructor(k,B){super(k,B,0,0),this.tween=null,this.add(K.q.instance.prodigy.create.sprite(0,0,q._.General_core_2_json,"bubble-1",void 0,((k,U)=>{k.anchor.set(.5,.5),B?k.y-=.44*B.height-.5*B.parent.nameText.TextHeight:(k.scale.set(8,8),k.y+=250),this.tween=new ro.s(k),this.tween.set("frameName",["bubble-1","bubble-2","bubble-3"],150,9999),this.tween.start()}))),this.game.broadcaster.addAppListener(oi.AU.Update,this.update,this)}update(){super.update(),this.tween&&this.tween.update(Date.now())}destroy(){this.game.broadcaster.removeAppListener(oi.AU.Update,this),super.destroy()}}class xO extends Ar.H{constructor(k,B,U,F,G){super(k,B,U,F),this.graphic=null,this.vanishTween=null,this.activeTween=null,this.updateEnabled=!0,this.graphic=this.add(K.q.instance.prodigy.create.sprite(0,0,q._.Zone_shipwreck_json,"ink-idle-1")),this.graphic.anchor.set(.5,1),this.graphic.x+=.5*this.graphic.width,this.graphic.y+=this.graphic.height;const j=new ro.s(this.graphic);j.set("frameName",["ink-idle-1","ink-idle-2","ink-idle-3","ink-idle-4"],150,9999),this.vanishTween=new ro.s(this.graphic),this.vanishTween.delay(G),this.vanishTween.set("frameName",["ink-vanish-1","ink-vanish-2","ink-vanish-3","ink-vanish-4","ink-vanish-5"],150,9999),this.vanishTween.end((()=>{this.onEnd()})),this.activeTween=j,this.activeTween.start()}onClicked(){this.activeTween=this.vanishTween,this.activeTween.start()}update(){super.update(),this.updateEnabled&&this.activeTween.update(Date.now())}onEnd(){this.visible=!1,this.updateEnabled=!1,this.game.broadcaster.broadcast(oi.gJ.InkBlasted,this.parent,[])}}class LO extends Ar.H{set callbacks(k){this.onClickCallbacks=k}constructor(k,B,U,F,G,H){super(k,B.above,0,0),this.inkGroup=[],this.pathTarget=null,this.onClickCallbacks=null,this.pathTarget=G,this.onClickCallbacks=H.concat(B.process.bind(B));let V=null,W=null,q=[0,250,500,750];q=$.shuffle(q);for(let $=0;$0&&B>4)for(U.sound(20,"clear-ink",null),F=0;F{this.activeTween=this.vanishTween,this.activeTween.start()})),B.start()}}onEnd(k){k.setState("squeak",4),this.visible=!1,this.updateEnabled=!1}}class BO extends Ar.H{constructor(k,B,U,F){super(k,B,U,F),this.tween=null;const G=this.add(K.q.instance.prodigy.create.sprite(0,0,q._.Zone_shipwreck_json,"tornado-1"));this.tween=new ro.s(G),this.tween.set("frameName",["tornado-1","tornado-2","tornado-3","tornado-4"],100,9999),this.tween.start()}update(){super.update(),this.tween.update(Date.now())}}class UO extends Ar.H{constructor(k,B,U,F){super(k,B,U,F),this.tween=null;const G=this.add(K.q.instance.prodigy.create.sprite(0,0,q._.Zone_shipwreck_json,"whirlpool-1"));this.tween=new ro.s(G),this.tween.set("frameName",["whirlpool-1","whirlpool-2","whirlpool-3","whirlpool-4"],100,9999),this.tween.start()}update(){super.update(),this.tween.update(Date.now())}}class FO extends Un.T{constructor(k,B){super(k,"A1","MAP_SHIPWRECK_SHORE_FAR_BEACH",1160,400,["shipwreck_shore-B2","shipwreck_shore-A2"],B.concat(q._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-outside"}setup(k,B,U){super.setup(k,B,U),this.zone.addWhirlpool(B,this,200,600,{target:"shipwreck_shore-A2",x:160,y:200,callback:null,handRotation:LT.K.DOWN}),this.addAreaEvent(k,B,{x:1240,y:400,w:80,h:240,rect:!0},"shipwreck_shore-B2",200,300,null,LT.K.DOWN_RIGHT,!1)}}class GO extends Un.T{constructor(k,B){super(k,"A2","MAP_SHIPWRECK_SHORE_SEAWEED_SKYSCRAPERS",160,200,["shipwreck_shore-A1","shipwreck_shore-A3"],B.concat(q._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.zone.addWhirlpool(B,this,160,120,{target:"shipwreck_shore-A1",x:60,y:560,callback:null,handRotation:LT.K.UP}),this.addAreaEvent(k,B,{x:1020,y:680,w:280,h:80,rect:!0},"shipwreck_shore-A3",1e3,120,null,LT.K.DOWN,!1)}}class jO extends Un.T{constructor(k,B){super(k,"A3","MAP_SHIPWRECK_SHORE_SECRET_SHORE_SPACE",1e3,120,["shipwreck_shore-A2"],B),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1e3,y:40,w:320,h:80,rect:!0},"shipwreck_shore-A2",1e3,600,null,LT.K.UP,!1),this.addChest(k,B,"chestA3",360,370,null,"A")}}class $O extends Un.T{constructor(k,B){super(k,"A4","MAP_SHIPWRECK_SHORE_SECLUDED_SHORE",1160,320,["shipwreck_shore-B4","shipwreck_shore-A5"],B.concat(q._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-outside"}setup(k,B,U){super.setup(k,B,U),this.zone.addWhirlpool(B,this,60,560,{target:"shipwreck_shore-A5",x:180,y:200,callback:null,handRotation:LT.K.DOWN}),this.addAreaEvent(k,B,{x:1280,y:440,w:80,h:240,rect:!0},"shipwreck_shore-B4",120,380,null,LT.K.RIGHT,!1)}}class HO extends Un.T{constructor(k,B){super(k,"A5","MAP_SHIPWRECK_SHORE_UNDERWATER_ALCOVE",180,200,["shipwreck_shore-A4"],B.concat(q._.Npc_sprite_wizard_json,q._.Zone_shipwreck_json,Z.c.Sfx_shipwreck_shore)),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U);const F=this.zone;F.addWhirlpool(B,this,180,120,{target:"shipwreck_shore-A4",x:200,y:600,callback:null,handRotation:LT.K.UP}),F.addUnderwaterWizard(B,this,575,305,"wizardA5",40);const G=F.addInkGroup(B,this,[{x:960,y:280},{x:1040,y:280},{x:940,y:320},{x:1020,y:320},{x:1100,y:320},{x:960,y:360},{x:1040,y:360},{x:1100,y:360},{x:960,y:400},{x:1040,y:400},{x:1100,y:400},{x:1e3,y:440},{x:1080,y:440}],{x:985,y:255},[]),j=this.addChest(this.game,B,"chestA5",1e3,500,null,"A");1!==this.zone.getState(`ink${this.getTag()}`)&&(j.visible=!1,this.game.broadcaster.addAppListener(oi.gJ.InkBlasted,this.revealChest.bind(this,B,G,j),this,G))}revealChest(k,B,U){this.game.broadcaster.removeAppListener(oi.gJ.InkBlasted,this,B),U.visible=!0}}class VO extends Un.T{constructor(k,B){super(k,"A7","MAP_SHIPWRECK_SHORE_LOWER_DECK_HALL",1160,520,["shipwreck_shore-B6","shipwreck_shore-B7"],B.concat([q._.Zone_shipwreck_json,Z.c.Sfx_shipwreck_shore])),this.inkGroups=[],this.battleBG="battle-shipwreck-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:440,y:40,w:320,h:80,rect:!0},"shipwreck_shore-B6",280,540,null,LT.K.UP,!1),this.addAreaEvent(k,B,{x:1240,y:440,w:80,h:240,rect:!0},"shipwreck_shore-B7",160,180,null,LT.K.UP_RIGHT,!1);const F=this.zone.addInkGroup(B,this,[{x:520,y:360},{x:640,y:400},{x:560,y:400},{x:520,y:440},{x:600,y:440},{x:640,y:440},{x:520,y:480},{x:600,y:480},{x:560,y:520},{x:480,y:520}],{x:740,y:500},[]);this.inkGroups.push(F)}}class WO extends Un.T{constructor(k,B){super(k,"B10","MAP_SHIPWRECK_SHORE_SEAWEED_SANCTUARY",1020,420,["shipwreck_shore-B11"],B.concat(q._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.zone.addWhirlpool(B,this,1020,560,{target:"shipwreck_shore-B11",x:260,y:180,callback:null,handRotation:LT.K.DOWN}),this.addChest(k,B,"chestB10",380,475,null,"A")}}class qO extends Un.T{constructor(k,B){super(k,"B11","MAP_SHIPWRECK_SHORE_SECRET_SHORE",1160,300,["shipwreck_shore-B10","shipwreck_shore-C11"],B.concat(q._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-outside"}setup(k,B,U){super.setup(k,B,U),this.zone.addWhirlpool(B,this,260,110,{target:"shipwreck_shore-B10",x:1020,y:420,callback:null,handRotation:LT.K.UP}),this.addAreaEvent(k,B,{x:1240,y:440,w:80,h:240,rect:!0},"shipwreck_shore-C11",120,360,null,LT.K.RIGHT,!1)}}class KO extends Un.T{constructor(k,B){super(k,"B12","MAP_SHIPWRECK_SHORE_SHORELINE",990,435,["shipwreck_shore-B13","shipwreck_shore-C12"],B.concat(q._.Npc_sprite_windsail_json,q._.Zone_shipwreck_json,q._.Npc_sprite_fishthing_json,q._.Npc_sprite_merchant_json)),this.questNPC=null}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1240,y:480,w:80,h:320,rect:!0},"shipwreck_shore-C12",100,420,null,LT.K.RIGHT,!1),this.zone.addWhirlpool(B,this,180,640,{target:"shipwreck_shore-B13",x:220,y:260,callback:null,handRotation:LT.K.DOWN}),this.questNPC=B.addConstructedQuestNPC(800,450,"eve",!1,this.zoneComplete.bind(this,k)),B.user.faceToward(this.questNPC.x);const F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);if(K.q.instance.prodigy.create.nicknamerPedestal(this.game,this.zone.ID,B.user,B.content,1050,350),B.user.faceToward(this.questNPC.x),K.q.instance.prodigy.skin.isFestivalActive("Summerfest"))K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.ShipwreckMerchantNPC,330,460).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.ShipwreckMerchantNPC}`));else{const k=()=>{const k=new Ti.rD(this.game),B=`${CT.N.Athena}_${ph.B.Dialogue}`,U=this.featureRequirements.meetsRequirementsDeprecated(36);U&&this.segment.featureCommon.sendInterfaceEvent({interfaceName:B,interfaceType:bi.Wm.DialogBox,instanceType:Ai.N.Interface,originType:bi.$N.NpcClick}),k.addEvents([U?{dialogueData:k.dataProvider.get(904),type:Ti.fA.STORE,yes:()=>{this.sendDialogueSegmentEvents(jh.k.Shop,B),K.q.instance.prodigy.open.store(19)},no:()=>{this.sendDialogueSegmentEvents(jh.k.NotNow,B)},blockInput:!0}:{dialogueData:k.dataProvider.get(903),blockInput:!0}]),k.start(!0)},U=K.q.instance.prodigy.create.spineNPC(B.content,166,"idle",330,460,{text:F.getText("NPC_NAME_ATHENA")},{npcType:Kn.ac.Merchant,npcXCoord:330,npcYCoord:460},k),G=U.findComponentInChildren(Wn.v),$=()=>{if(this.featureRequirements.meetsRequirementsDeprecated(36)){const k=TT.createIndicator(ST.DEFAULT_INDICATOR_CONFIG);k.position.set(10+(j.J6z.getCenterX(U.legacyTransform.group)>>1),-U.legacyTransform.group.height-20),U.legacyTransform.group.addChild(k),this.game.add.tween(k,this).to({y:k.y-20},1e3,j.GS3.Quadratic.InOut,!0,0,Vt.s.MAX_SAFE_INTEGER,!0)}};G.isLoaded?$():G.OnLoaded.addOnce($)}}sendDialogueSegmentEvents(k,B){this.segment.featureCommon.sendButtonEvent({buttonName:k,interfaceName:B,interfaceType:bi.Wm.DialogBox,saveClickInfo:k}),this.segment.featureCommon.sendInterfaceEvent({interfaceName:B,interfaceType:bi.Wm.DialogBox,instanceType:Ai.N.Interface,closeMethod:bi.Lv.ButtonClick})}zoneComplete(k){const B=K.q.instance.prodigy.event.create();B.text(45,"eve"),B.start()}cleanup(){this.questNPC&&(this.questNPC.destroy(),this.questNPC=null),super.cleanup()}}class zO extends Un.T{constructor(k,B){super(k,"B13","MAP_SHIPWRECK_SHORE_SUNKEN_SECRET",220,260,["shipwreck_shore-B12"],B.concat(q._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.zone.addWhirlpool(B,this,220,200,{target:"shipwreck_shore-B12",x:140,y:540,callback:null,handRotation:LT.K.UP}),this.addChest(k,B,"chestB13",1020,350)}}class YO extends Un.T{constructor(k,B){super(k,"B2","MAP_SHIPWRECK_SHORE_CROWS_NEST",1080,620,["shipwreck_shore-B4","shipwreck_shore-A1"],B),this.battleBG="battle-shipwreck-outside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:120,y:200,r:80},"shipwreck_shore-A1",1160,400,null,LT.K.UP_LEFT,!1),this.addAreaEvent(k,B,{x:1080,y:680,w:160,h:80,rect:!0},"shipwreck_shore-B4",1080,120,null,LT.K.DOWN,!1)}}class QO extends Un.T{constructor(k,B){super(k,"B4","MAP_SHIPWRECK_SHORE_UPPER_DECK",1120,520,["shipwreck_shore-B5","shipwreck_shore-A4","shipwreck_shore-B2"],B),this.battleBG="battle-shipwreck-outside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1080,y:40,w:160,h:80,rect:!0},"shipwreck_shore-B2",1080,620,null,LT.K.UP,!1),this.addAreaEvent(k,B,{x:40,y:380,w:80,h:280,rect:!0},"shipwreck_shore-A4",1160,320,null,LT.K.LEFT,!1),this.addAreaEvent(k,B,{x:1120,y:600,w:160,h:80,rect:!0},"shipwreck_shore-B5",240,100,null,LT.K.DOWN,!1)}}class XO extends Un.T{constructor(k,B){super(k,"B5","MAP_SHIPWRECK_SHORE_CARGO_HOLD",1e3,560,["shipwreck_shore-B6","shipwreck_shore-B4"],B.concat(q._.Zone_shipwreck_json,Z.c.Sfx_shipwreck_shore)),this.battleBG="battle-shipwreck-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:240,y:40,w:160,h:80,rect:!0},"shipwreck_shore-B4",1120,520,null,LT.K.UP,!1),this.addAreaEvent(k,B,{x:1e3,y:640,w:160,h:80,rect:!0},"shipwreck_shore-B6",1040,140,null,LT.K.DOWN,!1),this.zone.addInkGroup(B,this,[{x:400,y:320},{x:400,y:400},{x:360,y:280},{x:360,y:360},{x:360,y:440},{x:320,y:320},{x:320,y:400},{x:280,y:360},{x:280,y:440},{x:240,y:400}],{x:520,y:480},[]),this.addChest(k,B,"chestB5",500,325)}}class ZO extends Un.T{constructor(k,B){super(k,"B6","MAP_SHIPWRECK_SHORE_LOWER_DECK",280,540,["shipwreck_shore-A7","shipwreck_shore-C6","shipwreck_shore-B5"],B.concat(q._.Zone_shipwreck_json,Z.c.Sfx_shipwreck_shore)),this.battleBG="battle-shipwreck-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1040,y:80,w:160,h:80,rect:!0},"shipwreck_shore-B5",1e3,560,null,LT.K.UP,!1);const F=j.Aq$.isDefined(U)&&j.Aq$.isDefined(U.doorIsLockedCallback)?U.doorIsLockedCallback:this.doorIsLocked.bind(this,k),G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.addAreaEvent(k,B,{x:1180,y:360,w:80,h:160,rect:!0},"shipwreck_shore-C6",120,320,0===G.backpack.hasItem("item",114)?F:null,LT.K.RIGHT,!1),this.addAreaEvent(k,B,{x:280,y:600,w:160,h:80,rect:!0},"shipwreck_shore-A7",440,120,null,LT.K.DOWN,!1),this.zone.addInkGroup(B,this,[{x:960,y:40},{x:960,y:80},{x:1040,y:40},{x:1e3,y:120},{x:1e3,y:80},{x:1e3,y:200},{x:1040,y:200},{x:1e3,y:160},{x:960,y:240},{x:1040,y:240}],{x:1040,y:400},[])}doorIsLocked(k){const B=K.q.instance.prodigy.event.create();B.text(174,"noot"),B.start()}}class JO extends Un.T{constructor(k,B){super(k,"B7","MAP_SHIPWRECK_SHORE_SECOND_SHIP_RAMP",1160,420,["shipwreck_shore-A7","shipwreck_shore-C7"],B.concat(q._.Zone_shipwreck_json,Z.c.Sfx_shipwreck_shore)),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:160,y:240,w:160,h:80,rect:!0},"shipwreck_shore-A7",1160,520,null,LT.K.DOWN,!1),this.addAreaEvent(k,B,{x:1240,y:420,w:80,h:320,rect:!0},"shipwreck_shore-C7",120,280,null,LT.K.RIGHT,!1);const F=this.zone;F.addShortcut(B,1060,560),this.enableShortcut(k,B),F.addInkGroup(B,this,[{x:1e3,y:520},{x:1040,y:560},{x:1040,y:520},{x:1e3,y:560}],{x:1060,y:480},[k.broadcaster.addAppListener.bind(k.broadcaster,oi.gJ.InkGroupDestroyed,this.enableShortcut.bind(this,k,B),this)]),F.addSqueak(B,this,840,440,!0)}enableShortcut(k,B){k.broadcaster.removeAppListener(oi.gJ.InkGroupDestroyed,this);const U=this.zone.enableShortcut(B,this,1060,560,{target:"shipwreck_shore-C9",x:780,y:420,callback:null,handRotation:LT.K.DOWN});j.Aq$.isDefined(U)&&this.locations.push("shipwreck_shore-C9")}}class tI extends Un.T{constructor(k,B){super(k,"B8","MAP_SHIPWRECK_SHORE_BROKEN_SHIP_BED",1160,540,["shipwreck_shore-C8"],B),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1240,y:500,w:80,h:280,rect:!0},"shipwreck_shore-C8",140,460,null,LT.K.RIGHT,!1)}}class eI extends Un.T{constructor(k,B){super(k,"C10","MAP_SHIPWRECK_SHORE_DIVE_DOCK",180,600,["shipwreck_shore-C9","shipwreck_shore-C11"],B.concat(q._.Zone_shipwreck_json)),this.battleBG="battle-shipwreck-outside"}setup(k,B,U){super.setup(k,B,U),this.zone.addWhirlpool(B,this,1100,200,{target:"shipwreck_shore-C9",x:180,y:380,callback:null,handRotation:LT.K.UP}),this.addAreaEvent(k,B,{x:160,y:680,w:280,h:80,rect:!0},"shipwreck_shore-C11",780,220,null,LT.K.DOWN,!1)}}class iI extends Un.T{constructor(k,B){super(k,"C11","MAP_SHIPWRECK_SHORE_DESOLATE_DECK",1080,620,["shipwreck_shore-C12","shipwreck_shore-B11","shipwreck_shore-C10"],B),this.battleBG="battle-shipwreck-outside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:780,y:120,w:200,h:80,rect:!0},"shipwreck_shore-C10",180,600,null,LT.K.UP,!1),this.addAreaEvent(k,B,{x:40,y:320,w:80,h:320,rect:!0},"shipwreck_shore-B11",1160,300,null,LT.K.LEFT,!1),this.addAreaEvent(k,B,{x:1080,y:680,w:160,h:80,rect:!0},"shipwreck_shore-C12",1080,100,null,LT.K.DOWN,!1)}}class sI extends Un.T{constructor(k,B){super(k,"C12","MAP_SHIPWRECK_SHORE_BROKEN_BOWSPRIT",100,420,["shipwreck_shore-B12","shipwreck_shore-C11"],B),this.battleBG="battle-shipwreck-outside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1080,y:40,w:160,h:80,rect:!0},"shipwreck_shore-C11",1080,620,null,LT.K.UP,!1),this.addAreaEvent(k,B,{x:40,y:440,w:80,h:400,rect:!0},"shipwreck_shore-B12",1160,500,null,LT.K.LEFT,!1),this.addPippet(k,B,2,275,214)}}class nI extends Un.T{constructor(k,B){super(k,"C6","MAP_SHIPWRECK_SHORE_CAPNS_QUARTERS",120,320,["shipwreck_shore-B6"],B),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:40,y:320,w:80,h:240,rect:!0},"shipwreck_shore-B6",1120,360,null,LT.K.LEFT,!1)}}class aI extends Un.T{constructor(k,B){super(k,"C7","MAP_SHIPWRECK_SHORE_SAND_CITY",1040,580,["shipwreck_shore-C8","shipwreck_shore-B7"],B.concat(q._.Zone_shipwreck_json,Z.c.Sfx_shipwreck_shore)),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:40,y:300,w:80,h:280,rect:!0},"shipwreck_shore-B7",1160,420,null,LT.K.LEFT,!1),this.addAreaEvent(k,B,{x:1160,y:680,r:120},"shipwreck_shore-C8",1120,100,null,LT.K.DOWN,!1),this.zone.addSqueak(B,this,640,480,!1)}}class rI extends Un.T{constructor(k,B){super(k,"C8","MAP_SHIPWRECK_SHORE_DEEP_WATER",260,620,["shipwreck_shore-C9","shipwreck_shore-B8","shipwreck_shore-C7"],B.concat(q._.Npc_sprite_wizard_json,q._.Zone_shipwreck_json,Z.c.Sfx_shipwreck_shore)),this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1120,y:40,w:320,h:80,rect:!0},"shipwreck_shore-C7",1040,580,null,LT.K.UP,!1),this.addAreaEvent(k,B,{x:40,y:440,w:80,h:360,rect:!0},"shipwreck_shore-B8",1160,540,null,LT.K.LEFT,!1),this.addAreaEvent(k,B,{x:260,y:680,w:280,h:80,rect:!0},"shipwreck_shore-C9",950,120,null,LT.K.DOWN,!1),this.zone.addUnderwaterWizard(B,this,400,300,"wizardC8",41),this.zone.addSqueak(B,this,560,480,!1)}}class oI extends Un.T{constructor(k,B){super(k,"C9","MAP_SHIPWRECK_SHORE_SAND_TOWN",180,380,["shipwreck_shore-C8","shipwreck_shore-C10"],B.concat(q._.Npc_sprite_jim_json,q._.Zone_shipwreck_json,Z.c.Sfx_shipwreck_shore)),this.questNPC=null,this.battleBG="battle-shipwreck-underwater"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:950,y:40,w:220,h:80,rect:!0},"shipwreck_shore-C8",260,620,null,LT.K.UP,!1),this.zone.addWhirlpool(B,this,180,520,{target:"shipwreck_shore-C10",x:1120,y:320,callback:null,handRotation:LT.K.DOWN}),this.questNPC=this.addConstructedNPC(k,B,1e3,300,q._.Npc_sprite_jim_json,null,"NPC_NAME_JELLY_JIM"),this.questNPC.setup(this.zone,!1),this.questNPC.addOnClick(this.interactWithJellyJim.bind(this,k)),this.zone.addShortcut(B,780,480),this.enableShortcut(k,B),this.zone.addInkGroup(B,this,[{x:720,y:440},{x:760,y:480},{x:760,y:440},{x:720,y:480}],{x:780,y:400},[k.broadcaster.addAppListener.bind(k.broadcaster,oi.gJ.InkGroupDestroyed,this.enableShortcut.bind(this,k,B),this)]),this.zone.addSqueak(B,this,760,280,!1)}enableShortcut(k,B){k.broadcaster.removeAppListener(oi.gJ.InkGroupDestroyed,this);const U=this.zone.enableShortcut(B,this,780,480,{target:"shipwreck_shore-B7",x:1060,y:500,callback:null,handRotation:LT.K.DOWN});j.Aq$.isDefined(U)&&this.locations.push("shipwreck_shore-B7")}interactWithJellyJim(k){const B=K.q.instance.prodigy.event.create(),U=this.zone.getCurrentQuestID();U>1&&U<6?(B.text(2,"jim"),B.text(3,"jim")):B.text(7,"jim"),B.start()}cleanup(){this.questNPC&&(this.questNPC.destroy(),this.questNPC=null),super.cleanup()}}class hI extends Pn.T{constructor(k,B,U){super(k,B.concat([q._.Npc_sprite_windsail_json,X.V.Bgm_fun]),1,"",{type:"key",ID:14,N:1},["shipwreck_shore-C10"],[659,660,661,662,663,664,665,666,667],[],[658],U,!1,"QUESTS_SHIPWRECK_FIND_BREATHING_BUBBLE","eve","eve",[]),this.mimic1=null,this.mimic2=null}setup(k,B,U){if(super.setup(k,B,U),this.screen=B,this.map=U,"C10"===U.getTag()){U.addChest(k,B,"chestBreathingBubble",210,260);const F={randDir:!0,encounter:[{ID:98}],difficulty:2,maxTeamSize:1,screen:this.zone.battleBG};1===this.zone.getState("mimic1")||(this.mimic1=B.addMimic("mimic1",360,240,"A",F,U.zoneName));return 1===this.zone.getState("mimic2")||(this.mimic2=B.addMimic("mimic2",120,400,"A",F,U.zoneName)),{enableMonsters:!1}}return{}}process(k,B,U){if(super.process(k,B,U),"C10"===U.getTag()){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("key",14)>0?(j.Aq$.isDefined(this.mimic1)&&this.mimic1.highlight(!1),j.Aq$.isDefined(this.mimic2)&&this.mimic2.highlight(!1)):(j.Aq$.isDefined(this.mimic1)&&this.mimic1.highlight(1!==this.zone.getState("mimic1"),-80,-90),j.Aq$.isDefined(this.mimic2)&&this.mimic2.highlight(1!==this.zone.getState("mimic2"),-80,-90))}}end(){this.zone.addWhirlpool(this.screen,this.map,1100,200,{target:"shipwreck_shore-C9",x:180,y:380,callback:null,handRotation:LT.K.UP}),this.map.toggleDynamicLayer(K.q.instance.prodigy.game,0,!1)}}class cI extends Pn.T{constructor(k,B,U){super(k,B,10,"",{type:"item",ID:114,N:1,K:1},["shipwreck_shore-B7"],[700],[],[],U,!1,"QUESTS_SHIPWRECK_DEFEAT_MONSTERS","eve","eve",[]),this.bossKey=null}setup(k,B,U){super.setup(k,B,U),this.updateDialogue(k);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return"B7"===U.getTag()&&0===F.backpack.hasItem("item",114)&&(this.bossKey=B.addClickableEvent(800,100,80,80,this.collectBossKey.bind(this,k,B),null,0),this.bossKey.highlight(!0)),{}}collectBossKey(k,B){if(0===K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("item",114)){const k=K.q.instance.prodigy.event.create();k.validPath(B.user,B.path,this.bossKey.x+.5*this.bossKey.width,this.bossKey.y+this.bossKey.height+10),k.reward([{type:"item",ID:114}]),k.function(this.bossKey.highlight.bind(this.bossKey,!1)),k.function(this.zone.completeQuest.bind(this.zone,10)),k.function(this.zone.startQuest.bind(this.zone,11)),k.function(B.process.bind(B)),k.start()}}updateDialogue(k){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("item",114)>0&&(this.onStart=[43])}}class dI extends Pn.T{constructor(k,B,U){super(k,B.concat(Z.c.Sfx_shipwreck_shore,q._.Zone_shipwreck_json,J.Q.Default_boss_15_json),11,"QUESTS_SHIPWRECK_DEFEAT_BOSS",{type:"seq",N:1},["shipwreck_shore-C6"],[701],[],[658,675,702],U,!1,null,"eve","eve",[]),this.squeak=null}setup(k,B,U){return super.setup(k,B,U),this.screen=B,"C6"===U.getTag()&&this.zone.isOnSequence(11,0)&&this.createSqueak(),{}}start(k,B,U){return super.start(k,B,U),"C6"===U.getTag()&&this.zone.isOnSequence(11,0)&&this.startSequenceA(k,B,U),null}startSequenceA(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),G=F.getValue("oldOneMaxHP",Vt.s.get("GameConstants.OldOne.MAX_HP")),$=null===G?void 0:parseInt(G,10);K.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle";const H=this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_BOSS_BATTLE"),{boss:{ID:15,element:"water",attacks:[82,83,85,87],name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_OLD_ONE"),tag:"shipwreck",maxHP:$},starMod:5,difficulty:parseInt(F.getValue("oldOneDifficulty",Vt.s.get("GameConstants.OldOne.DIFFICULTY")),10),screen:"battle-shipwreck-inside"},this.endSequenceA.bind(this,k)),V=K.q.instance.prodigy.event.create();V.enableInput(!1),V.validPath(B.user,B.path,this.squeak.x-500,this.squeak.y),V.delay(250),V.shake(0,3e3,12,"h",!0);let W=4;V.tween(this.squeak,{y:this.squeak.y-40*W},2e3,j.GS3.Linear.None,!0),V.sound(20,"boss-monster",!1);for(let j=0;j<4;j++){const U=wn.o.integerInRange(4,8);V.function(this.sandCloud.bind(this,k,B,this.squeak.x-.5*U*40,this.squeak.y,U,W--)),V.delay(400)}V.delay(750),V.enableInput(!0),V.function(H),V.start()}endSequenceA(k){this.squeak[ur.k.DESTROYED]&&this.createSqueak();const B=K.q.instance.prodigy.event.create();B.function(this.zone.setState.bind(this.zone,"squeak",4)),B.function(this.zone.completeSequence.bind(this.zone,11,0)),B.function(K.q.instance.prodigy.world.it.bind(K.q.instance.prodigy.world,"shipwreck_shore-C6",this.squeak.x-500,this.squeak.y)),B.start()}sandCloud(k,B,U,F,G,$){let H=null;for(let V=0;V0?j.Aq$.isDefined(this.ink)&&this.ink.highlight(!1):(null!==(F=this.ink)&&void 0!==F||(this.ink=K.q.instance.prodigy.create.element(B.above,560,440)),this.ink.highlight(!0),U.inkGroups.forEach((F=>{F.callbacks=[this.collectInk.bind(this,k,B,U)]})))}}collectInk(k,B,U){var F;const G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;0===G.backpack.hasItem("item",112)&&G.backpack.add("item",112,!1,1),null===(F=this.ink)||void 0===F||F.highlight(!1),U.zone.completeQuest(3),B.process()}}class fI extends Pn.T{constructor(k,B,U){super(k,B,4,"",{type:"key",ID:15,N:1},["shipwreck_shore-B7"],[676,677,678,679,680,681,682,683],[],[658],U,!1,"QUESTS_SHIPWRECK_ACQUIRE_INK_SAMPLE","eve","eve",[]),this.sonicBlaster=null}setup(k,B,U){return super.setup(k,B,U),"B7"===U.getTag()&&(this.sonicBlaster=B.addClickableEvent(320,80,80,80,this.collectSonicBlaster.bind(this,k,B),null,0)),{}}process(k,B,U){if(super.process(k,B,U),"B7"===U.getTag()){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.sonicBlaster.highlight(0===k.backpack.hasItem("key",15))}}collectSonicBlaster(k,B){if(0===K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("key",15)){const k=K.q.instance.prodigy.event.create();k.validPath(B.user,B.path,this.sonicBlaster.x+.5*this.sonicBlaster.width,this.sonicBlaster.y+this.sonicBlaster.height+10),k.reward([{type:"key",ID:15}]),k.function(B.process.bind(B)),k.start()}}}class bI extends Pn.T{constructor(k,B,U){super(k,B,5,"QUESTS_SHIPWRECK_CLEAR_INK",{type:"seq",N:1},["shipwreck_shore-A7"],[684,685],[],[658],U),this.inkHighlighter=null}setup(k,B,U){super.setup(k,B,U),this.updateQuestArea();let F=this.updateQuestArea.bind(this);return"A5"===U.getTag()&&(F=this.startSequenceA.bind(this,k,B,U)),k.broadcaster.addAppListener(oi.gJ.InkGroupDestroyed,F,this),{}}process(k,B,U){super.process(k,B,U),this.showInkHighlighter(k,B,U)}updateQuestArea(){this.zone.isOnSequence(5,0)&&(1!==this.zone.getState("inkA7")?this.area=["shipwreck_shore-A7"]:1!==this.zone.getState("inkB6")?this.area=["shipwreck_shore-B6"]:1!==this.zone.getState("inkB5")?this.area=["shipwreck_shore-B5"]:1!==this.zone.getState("inkA5")?this.area=["shipwreck_shore-A5"]:this.zone.completeSequence(5,0))}startSequenceA(k,B,U){const F=B.addNPC(985,255,q._.Npc_sprite_noot_json);F.visible=!1,F.float(!0);const G=K.q.instance.prodigy.event.create();G.function((()=>{k.broadcaster.removeAppListener(oi.gJ.InkGroupDestroyed,this)})),G.validPath(B.user,B.path,985,255),G.set(F,"visible",!0),G.hop(F,375,-75,70),G.function(B.user.faceToward.bind(B.user,F.x-75)),G.text(172,"noot"),G.text(173,"noot"),G.hop(F,375,75,70),G.set(F,"visible",!1),G.function(this.zone.completeSequence.bind(this.zone,5,0)),G.function(B.process.bind(B)),G.start()}showInkHighlighter(k,B,U){const F=U.getTag();let G=0,$=0;if(j.Aq$.isDefined(this.inkHighlighter)&&this.inkHighlighter.highlight(!1),1!==this.zone.getState(`ink${U.getTag()}`)){let k=!1;"A7"===F?(G=560,$=440,k=!0):"B6"===F?(G=1020,$=220,k=!0):"B5"===F?(G=320,$=400,k=!0):"A5"===F&&(G=1040,$=360,k=!0),k&&(this.inkHighlighter=K.q.instance.prodigy.create.element(B.above,G,$),this.inkHighlighter.highlight(!0))}}}class pI extends Pn.T{constructor(k,B,U){super(k,B.concat(X.V.Bgm_puppetmaster),5,"QUESTS_SHIPWRECK_CLEAR_INK",{type:"seq",N:1},["shipwreck_shore-A7"],[684,685],[],[658],U),this.inkHighlighter=null}setup(k,B,U){if(super.setup(k,B,U),this.updateQuestArea(),"A5"===U.getTag()){if(k.broadcaster.addAppListener(oi.gJ.InkGroupDestroyed,this.startSequenceA.bind(this,k,B,U),this),!U.zone.getState(Zu.PIPPET_DEFEATED))return k.input.enabled=!1,this.addPippetEncounter(k,B,U),{enableMonsters:!1,enableWizards:!1}}else k.broadcaster.addAppListener(oi.gJ.InkGroupDestroyed,this.updateQuestArea.bind(this),this);return{}}process(k,B,U){super.process(k,B,U),("A5"!==U.getTag()||U.zone.getState(Zu.PIPPET_DEFEATED))&&this.showInkHighlighter(k,B,U)}updateQuestArea(){this.zone.isOnSequence(5,0)&&(1!==this.zone.getState("inkA7")?this.area=["shipwreck_shore-A7"]:1!==this.zone.getState("inkB6")?this.area=["shipwreck_shore-B6"]:1!==this.zone.getState("inkB5")?this.area=["shipwreck_shore-B5"]:1!==this.zone.getState("inkA5")?this.area=["shipwreck_shore-A5"]:this.zone.completeSequence(5,0))}startSequenceA(k,B,U){const F=B.addNPC(985,255,q._.Npc_sprite_noot_json);F.visible=!1,F.float(!0);const G=K.q.instance.prodigy.event.create();G.function((()=>{k.broadcaster.removeAppListener(oi.gJ.InkGroupDestroyed,this)})),G.validPath(B.user,B.path,985,255),G.set(F,"visible",!0),G.hop(F,375,-75,70),G.function(B.user.faceToward.bind(B.user,F.x-75)),G.text(172,"noot"),G.text(173,"noot"),G.hop(F,375,75,70),G.set(F,"visible",!1),G.function(this.zone.completeSequence.bind(this.zone,5,0)),G.function(B.process.bind(B)),G.start()}showInkHighlighter(k,B,U){const F=U.getTag();let G=0,$=0;if(j.Aq$.isDefined(this.inkHighlighter)&&this.inkHighlighter.highlight(!1),1!==this.zone.getState(`ink${U.getTag()}`)){let k=!1;"A7"===F?(G=560,$=440,k=!0):"B6"===F?(G=1020,$=220,k=!0):"B5"===F?(G=320,$=400,k=!0):"A5"===F&&(G=1040,$=360,k=!0),k&&(this.inkHighlighter=K.q.instance.prodigy.create.element(B.above,G,$),this.inkHighlighter.highlight(!0))}}addPippetEncounter(k,B,U){K.q.instance.prodigy.prefabFactory.createPippetQuestEncounter(U.zone,205,bS.e.Shipwreck_quests_encounter).then((k=>{if(U.zone.getState(Zu.PIPPET_REMATCH)){k.findComponentInChildren(pf.u).onComplete.addOnce((()=>{this.showInkHighlighter(K.q.instance.game,B,U)}))}})).catch(j.RQr.createHandler("Error loading Pippet Miniboss Encounter for Bonfire Q7"))}}class vI extends Pn.T{constructor(k,B,U){super(k,B.concat(q._.Zone_shipwreck_json,Z.c.Sfx_shipwreck_shore),6,"QUESTS_SHIPWRECK_FIND_JIM",{type:"seq",N:2},["shipwreck_shore-C9"],[686,687,688,689],[],[658],U,!1,null,"eve","eve",[]),this.cameraButton=null}setup(k,B,U){return super.setup(k,B,U),this.updateQuestArea(),"C9"===U.getTag()&&this.zone.isOnSequence(6,0)?{enableMonsters:!1}:{}}start(k,B,U){return super.start(k,B,U),"C9"===U.getTag()&&this.zone.isOnSequence(6,0)?this.startSequenceA(k,B,U):"A5"===U.getTag()&&this.zone.isOnSequence(6,1)&&(this.cameraButton=K.q.instance.prodigy.create.button(B.menus,1040,240,q._.Zone_shipwreck_json,"camera-map",this.takePictureOfTunnel.bind(this,k,B)),this.cameraButton.highlight(!0)),null}updateQuestArea(){this.zone.isOnSequence(6,1)&&(this.area=["shipwreck_shore-A5"],this.descKey="QUESTS_SHIPWRECK_TAKE_PHOTO")}startSequenceA(k,B,U){const F=B.addNPC(U.questNPC.x-100,U.questNPC.y,q._.Npc_sprite_noot_json);F.visible=!1,F.float(!0);const G=K.q.instance.prodigy.event.create();G.enableInput(!1),G.validPath(B.user,B.path,U.questNPC.x-100,U.questNPC.y-10),G.set(F,"visible",!0),G.hop(F,500,-100,70),G.enableInput(!0),G.text(5,"jim"),G.text(6,"jim"),G.reward([{type:"key",ID:16}]),G.text(4,"jim"),G.text(),G.reward([{type:"gold",N:200}]),G.function(B.user.faceToward.bind(B.user,F.x-100)),G.text(175,"noot"),G.hop(F,500,100,70),G.set(F,"visible",!1),G.function(this.zone.completeSequence.bind(this.zone,6,0)),G.function(this.updateQuestArea.bind(this)),G.function(B.process.bind(B)),G.start()}takePictureOfTunnel(k,B){const U=K.q.instance.prodigy.event.create();U.validPath(B.user,B.path,1e3,280),U.enableInput(!1),U.cameraFlash(),U.function(this.cameraButton.destroy.bind(this.cameraButton)),U.function(this.zone.completeSequence.bind(this.zone,6,1)),U.function(B.process.bind(B)),U.enableInput(!0),U.start()}}class gI extends Pn.T{constructor(k,B,U){super(k,B.concat(Ut.E.getIconForType("item",113)),7,"",{type:"item",ID:113,N:3},["shipwreck_shore-A2"],[690,691,692],[],[658,675],U,!1,"QUESTS_SHIPWRECK_GET_CAMERA","eve","eve",[])}setup(k,B,U){return super.setup(k,B,U),"A2"===U.getTag()?(B.addCollect(1,880,480,{type:"item",ID:113}),B.addCollect(2,960,320,{type:"item",ID:113}),B.addCollect(3,400,520,{type:"item",ID:113}),{enableMonsters:!1}):{}}}class mI extends Pn.T{constructor(k,B,U){super(k,B,8,"",{type:"pet",ID:119,N:4},["shipwreck_shore-B8"],[693,694,695],[],[696,658],U,!1,"QUESTS_SHIPWRECK_TAKE_PICTURE","eve","eve",[]),this.questParams={}}setup(k,B,U){super.setup(k,B,U),this.updateQuestArea(!1);const F=U.getTag(),G={randDir:!0,encounter:[{ID:119}],difficulty:4,maxTeamSize:1,onEnc:this.updateQuestArea.bind(this,!0),isQuestEncounter:!0,showGuideHand:!0,unique:!0};if(-1!==this.area.indexOf(U.zoneName)){if("B8"===F)return K.q.instance.prodigy.prefabFactory.addMonster(U,775,325,0,G),K.q.instance.prodigy.prefabFactory.addMonster(U,420,485,1,G),{enableMonsters:!1};if("B7"===F)return K.q.instance.prodigy.prefabFactory.addMonster(U,926,305,2,G),K.q.instance.prodigy.prefabFactory.addMonster(U,650,475,3,G),{enableMonsters:!1}}if(j.Aq$.isDefined(this.questParams.enableMonsters))return this.questParams={},{enableMonsters:!1}}updateQuestArea(k){this.isMapB7Cleared()?(this.area=["shipwreck_shore-B12"],k&&(this.questParams.enableMonsters=!1)):this.isMapB8Cleared()&&-1===this.area.indexOf("shipwreck_shore-B7")&&(this.area=["shipwreck_shore-B7"])}isMapB8Cleared(){const k=this.zone.getQuestState();return!(!j.Aq$.isDefined(k)||!j.Aq$.isDefined(k.req))&&(1===k.state[1]&&1===k.state[2])}isMapB7Cleared(){const k=this.zone.getQuestState();return!(!j.Aq$.isDefined(k)||!j.Aq$.isDefined(k.req))&&(1===k.state[3]&&1===k.state[4])}}class yI extends Pn.T{constructor(k,B,U){super(k,B,9,"QUESTS_SHIPWRECK_OPEN_DOOR",{type:"seq",N:1},["shipwreck_shore-B6"],[697,698,699],[],[],U,!1,null,"eve","eve",[]),this.door=null}setup(k,B,U){return super.setup(k,B,U),"B6"===U.getTag()&&this.zone.isOnSequence(9,0)?(this.door=K.q.instance.prodigy.create.element(B.above,1160,340),this.door.highlight(!0,0,0),{doorIsLockedCallback:this.startSequenceA.bind(this,k,B)}):{}}startSequenceA(k,B){const U=K.q.instance.prodigy.event.create();U.function(this.door.highlight.bind(this.door,!1)),U.text(176,"noot"),U.function(this.zone.completeSequence.bind(this.zone,9,0)),U.function(B.process.bind(B)),U.start()}}class _I extends vn.b{constructor(k){super(k),this.questManagerIdentifier="3e8-8772",this.guardian="Eve",this.name="Shipwreck Shore",this.ID=hn.A_.SHIPWRECK,this.guardian="SHIPWRECK_GUARDIAN",this.battleBG="battle-shipwreck-outside",this.defaultOnFaint="shipwreck_shore-B12",this.questHub="shipwreck_shore-B12",this.bgmID=16,this.currency=14,this.zoneIndex=pT.P.Shipwreck,this.states=["wizardC8","wizardA5","chestA3","chestA5","chestB5","chestB13","chestB10","chestBreathingBubble","mimic1","mimic2","inkA7","inkB6","inkB5","inkA5","inkC9","inkB7","squeak",Zu.PIPPET_ENCOUNTER,Zu.PIPPET_REMATCH,Zu.PIPPET_DEFEATED];const B=[Rn.t.Tileset_water_new_png,Rn.t.Tileset_generic_new_png,Rn.t.Tileset_collisions_png,Rn.t.Tileset_ship_exterior_png,Rn.t.Tileset_ship_interior_png,X.V.Bgm_shipwreck_shore],U={map:"shipwreck_shore-Titan",cutscene:"shipwreck_shore-titanIntro",harvey:{x:175,y:200},sign:{x:100,y:200},catapult:{x:200,y:430,arcHeight:300},titan:{x:1100,y:400,impactOffset:{x:-130,y:0}},entry:{x:550,y:400},battleBG:[nr.q.Battle_shipwreck_outside_bg,nr.q.Battle_shipwreck_outside_fg]};this.maps={A1:new FO(this,B),A2:new GO(this,B),A3:new jO(this,B),A4:new $O(this,B),A5:new HO(this,B),A7:new VO(this,B),B2:new YO(this,B),B4:new QO(this,B),B5:new XO(this,B),B6:new ZO(this,B),B7:new JO(this,B),B8:new tI(this,B),B10:new WO(this,B),B11:new qO(this,B),B12:new KO(this,B),B13:new zO(this,B),C6:new nI(this,B),C7:new aI(this,B),C8:new rI(this,B),C9:new oI(this,B),C10:new eI(this,B),C11:new iI(this,B),C12:new sI(this,B),Titan:new xT(this,B,U)},Promise.all([Cf.T.ready,Gt.R.dataBundleLoadPromise]).then((()=>{this.setZoneRewards()})).catch((k=>{K.q.instance.prodigy.open.messageBoxError("ERROR_LOADING_ZONE",["WORLD_SHIPWRECK_SHORE"],k,"Error, unable to load Shipwreck Shore Zone Rewards JSON")})),this.scenes={titanIntro:new _T(this,[Rn.t.Tileset_interior_general_png,Rn.t.Tileset_wall_collisions_png,X.V.Bgm_tutorial])}}setZoneRewards(){const k=(0,yT.mg)(Gt.R.loadData(Ft.r.ZoneRewardsShipwreckShore_json));this.quests={1:new hI(this,[],k.quests.ShipwreckShoreQ1),2:new lI(this,[],k.quests.ShipwreckShoreQ2),3:new uI(this,[],k.quests.ShipwreckShoreQ3),4:new fI(this,[],k.quests.ShipwreckShoreQ4),5:ef.arePippetQuestEncountersEnabled?new pI(this,[],k.quests.ShipwreckShoreQ5):new bI(this,[],k.quests.ShipwreckShoreQ5),6:new vI(this,[],k.quests.ShipwreckShoreQ6),7:new gI(this,[],k.quests.ShipwreckShoreQ7),8:new mI(this,[],k.quests.ShipwreckShoreQ8),9:new yI(this,[],k.quests.ShipwreckShoreQ9),10:new cI(this,[],k.quests.ShipwreckShoreQ10),11:new dI(this,[],k.quests.ShipwreckShoreQ11)}}start(k,B,U){super.start(k,B,U),this.showTopLeftNavigationButton()}createTopLeftNavigationButton(){this.showTopLeftNavigationButton()}init(k,B,U){super.init(k,B,U);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=this.isUnderwaterMap(U.getTag()),j=F.backpack.hasItem("key",14)>0;if(G&&k.broadcaster.addAppListener(oi.ig.PlayerLoaded,this.addBreathingBubbleToPlayerContainer.bind(this),this,this.game),(this.getCurrentQuestID()>1||j&&"B12"===U.getTag())&&(G?(this.battleBG="battle-shipwreck-underwater",U.enableLayerID(0,!(j&&G))):(this.battleBG="battle-shipwreck-outside",U.enableLayerID(0,!(j&&this.hasWhirlpool(U.getTag()))))),"C9"===U.getTag()||"B7"===U.getTag()){const k=this.getState("inkC9"),B=this.getState("inkB7");U.enableLayerID(1,1!==k&&1!==B)}else U.enableLayerID(1,1!==this.getState(`ink${U.getTag()}`))}addBreathingBubbleToPlayerContainer(k){var B;j.Aq$.isDefined(k)&&!k.appearanceConfig.isPreview&&(null===(B=k.getSlotContainer("hip"))||void 0===B||B.addChild(new NO(this.game,null)))}startQuest(k){const B=super.startQuest(k);return j.Aq$.isDefined(B)&&k>2?(this.setState("squeak",wn.o.integerInRange(0,4)),B):null}cleanup(){this.game.broadcaster.removeAppListener(oi.u0.PlayerAdded,this,this.game),this.game.broadcaster.removeAppListener(oi.ig.PlayerLoaded,this,this.game),super.cleanup()}isUnderwaterMap(k){return"A2"===k||"A3"===k||"A5"===k||"A7"===k||"B5"===k||"B6"===k||"B7"===k||"B8"===k||"B10"===k||"B13"===k||"C6"===k||"C7"===k||"C8"===k||"C9"===k}hasWhirlpool(k){return"A1"===k||"A4"===k||"B11"===k||"B12"===k||"C10"===k}addUnderwaterWizard(k,B,U,F,G,$){const H=B.addWizard(this.game,k,U,F,G,$,!1);if(j.Aq$.isDefined(H)){new NO(this.game,H.sprites).y+=24}}addShortcut(k,B,U){const F=k.background.addChild(K.q.instance.prodigy.create.sprite(B,U,q._.Zone_shipwreck_json,"sand-shortcut"));F.y-=.5*F.height,F.x-=.5*F.width}enableShortcut(k,B,U,F,G){if(1===this.getState("inkC9")&&1===this.getState("inkB7")){const j=this.createAreaEvent(k,B,U,F,3,2,G,!1);return j.process(this,B),j}}addWhirlpool(k,B,U,F,G){let j,$,H,V=F;this.isUnderwaterMap(B.getTag())?(j=new BO(this.game,k.background,U,F),j.y-=.75*j.height,$=3,H=4,V-=40):(j=new UO(this.game,k.background,U,F),j.y-=.5*j.height,$=3,H=2),j.x-=.5*j.width,this.createAreaEvent(k,B,U,V,$,H,G,this.isUnderwaterMap(B.getTag()))}createAreaEvent(k,B,U,F,G,j,$,H){const V=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!V.isZoneQuestEnabled||V.backpack.hasItem("key",14)>0){const V=this.getArrowOffsetFromHandRotation($.handRotation,H);return B.addAreaEvent(this.game,k,{x:U,y:F,w:40*G,h:40*j,rect:!0,arrowOffsetX:V.x,arrowOffsetY:V.y},$.target,$.x,$.y,$.callback,$.handRotation,!1)}}getArrowOffsetFromHandRotation(k,B){const U={x:0,y:0};switch(k){case LT.K.UP:U.y=40+(B?40:0);break;case LT.K.RIGHT:U.x=-40;break;case LT.K.DOWN:U.y=(B?-40:0)-40;break;case LT.K.LEFT:U.x=40;break;default:U.x=0,U.y=0}return U}addInkGroup(k,B,U,F,G){const $=`ink${B.getTag()}`;let H=G;if(1!==this.getState($)){const G=this.getCurrentQuestID();return K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("key",15)>0&&G>0&&(H.push(this.sonicBlastInk.bind(this,k,B,$)),H.push(this.game.broadcaster.broadcast.bind(this.game.broadcaster,oi.gJ.InkGroupDestroyed,this.game,[]))),j.Aq$.isDefined(B.questParams)&&j.Aq$.isDefined(B.questParams.inkCallbacks)&&(H=H.concat(B.questParams.inkCallbacks)),new LO(this.game,k,G,U,F,H)}return null}sonicBlastInk(k,B,U){this.setState(U,1),"inkC9"===U?B.enableLayerID(1,1!==this.getState("inkB7")):"inkB7"===U?B.enableLayerID(1,1!==this.getState("inkC9")):(B.enableLayerID(1,!1),B.skipPrefabInitialization=!0,k.area=B.init(this.game,B.below,B.above,k),k.path.init(k.area,k.tileSize))}getCompletedStatesCount(k){let B=0;for(let U=0;U{const B=K.q.instance.prodigy.event.create();B.text(0,"bok"),B.start()}).bind(this,k),!1,H),K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.ShiverchillMerchantNPC,400,350).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.ShiverchillMerchantNPC}`)),K.q.instance.prodigy.create.nicknamerPedestal(this.game,this.zone.ID,B.user,B.content,150,300),this.setCrossoverQuestSequenceComplete(),this.isPrerequisiteComplete()||(this.addSnowStorm(),F.disable(),$.disable(),G.disable((()=>this.showSnowstormDialogue())))}isPrerequisiteComplete(){const k=hn.A_.FOREST,B=yA.QUEST_INDEX,U=K.q.instance.prodigy.world.getZone(k),F=U.getCurrentQuestID();return U.getCurrentQuestID()>B||F===B&&U.isOnSequence(B,vA.GO_TO_SHIVERCHILL)}setCrossoverQuestSequenceComplete(){const k=hn.A_.FOREST,B=LA.c.QUEST_INDEX,U=LA.p.TALK_TO_FLORIAN,F=K.q.instance.prodigy.world.getZone(k);F.isOnSequence(B,U)&&F.completeSequence(B,U)}showSnowstormDialogue(){const k=new Ti.rD(K.q.instance.prodigy.game);k.addEvents([{dialogueData:k.dataProvider.get(1400),blockInput:!0}]),k.start(!0)}addSnowStorm(){const k=new j._mx,B=k.addComponent(j.dLy),U=k.addComponent(j.okU),F=new j._mx,G=k.addComponent(j.dLy),$=k.addComponent(j.okU),H=new WI;H.atlas=q._.Shiverchill_snow_particle_json,H.frameNames=["snowflake-sml","snowflake-med","snowflake-inverted-sml","snowflake-inverted-med"];const V=new WI;V.atlas=q._.Shiverchill_snow_particle_json,V.frameNames=["cloud-sml","cloud-lrg"];const W=new j.ZxM;W.life.setMinMax(.6,1),W.life.type=j.UvC.Random;const K=new j.ZxM;K.life.setMinMax(4,6),K.life.type=j.UvC.Random;const z=new j.U8B;z.angle.setMinMax(.6*j.cj9.RAD_TO_DEG,.6*j.cj9.RAD_TO_DEG),z.angle.type=j.UvC.PhasePerSample,z.speed.setMinMax(180,220);const Y=new j.U8B;Y.angle.setMinMax(0,0),Y.angle.type=j.UvC.PhasePerSample,Y.speed.setMinMax(10,20);const Q=new j.mYY;Q.point1.setTo(0,0),Q.point2.setTo(260,0);const X=new j.Lzo;X.speed.setMinMax(-40,40);const Z=new j.m$y;Z.endAlpha=0,Z.startAtLifePercentage=.5,U.emitPerSecond.setMinMax(15,20),U.initializers=[H,W,z,Q,X],U.behaviours=[Z],$.emitPerSecond.setMinMax(5,10),$.initializers=[V,K,Y,Q],$.behaviours=[Z],G.setPosition(120,-40),B.setPosition(50,-40),this.screen.contentGameObject.addChild(k),this.screen.contentGameObject.addChild(F)}}class zI extends qI{constructor(k,B){super(k,"A11","MAP_SHIVERCHILL_BORDERLAND",1100,220,["shiverchill-A10"],B.concat([q._.Npc_sprite_wizard_json,Rn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside",this.coord=[new j.I9Y(640,560),new j.I9Y(785,230),new j.I9Y(350,400)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1100,y:130,w:160,h:100},"shiverchill-A10",125,650,null,LT.K.UP),this.addWizard(k,B,474,414,"wizard1",44,!1),this.addPippet(k,B,1,838,543)}}class YI extends qI{constructor(k,B){super(k,"A2","MAP_SHIVERCHILL_THE_CHASM",1150,360,["shiverchill-A3"],B.concat([Rn.t.Tileset_generic_snow_png,q._.Npc_sprite_wizard_json])),this.battleBG="battle-shiverchill-outside",this.dailyCoordinates=[{x:840,y:320},{x:565,y:450}]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1060,y:280,r:80},"shiverchill-A3",100,230,null,LT.K.UP),this.addChest(k,B,"chest3",530,370,null,"A"),this.addWizard(k,B,460,360,"wizard4",42,!1)}}class XI extends qI{constructor(k,B){super(k,"A3","MAP_SHIVERCHILL_FROZEN_PASS",280,550,["shiverchill-A2","shiverchill-A4","shiverchill-B3"],B.concat([q._.Zone_shiverchill_json,Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(700,380),new j.I9Y(1150,300)],this.dailyCoordinates=[{x:1100,y:210},{x:485,y:240},{x:390,y:540}]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1275,y:595,w:150,h:240},"shiverchill-B3",100,290,null,null),this.addAreaEvent(k,B,{x:222,y:650,w:240,h:75},"shiverchill-A4",220,80,null,null),this.checkFurnaces(k,B)}checkFurnaces(k,B){this.zone.getState("furnace")>=3?(this.zone.smoke(B,13,3),this.addAreaEvent(k,B,{x:120,y:100,w:150,h:150},"shiverchill-A2",1150,360,null,null)):(B.addBlock(135,240,{x:.5,y:1,atlas:q._.Zone_shiverchill_json,tag:"ice-cubes"}),this.addCollisionZone(B,60,60,120,100))}}class ZI extends qI{constructor(k,B){super(k,"A4","MAP_SHIVERCHILL_WORMS_REST",1160,610,["shiverchill-A3","shiverchill-A5"],B.concat([q._.Zone_shiverchill_json])),this.battleBG="battle-shiverchill-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:220,y:0,w:240,h:75},"shiverchill-A3",280,550,null,null),this.addAreaEvent(k,B,{x:1160,y:510,r:60},"shiverchill-A5",160,200,null,LT.K.UP)}}class JI extends qI{constructor(k,B){super(k,"A5","MAP_SHIVERCHILL_MOUNTAIN_VALLEY",1180,650,["shiverchill-A4","shiverchill-A6"],B.concat([Rn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside",this.coord=[new j.I9Y(100,540),new j.I9Y(700,350),new j.I9Y(1025,150)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1160,y:530,r:60},"shiverchill-A6",160,330,null,LT.K.UP),this.addAreaEvent(k,B,{x:130,y:100,w:100,h:90},"shiverchill-A4",1160,610,null,LT.K.UP),this.addChest(k,B,"chest4",560,320,null,"C")}}class tD extends qI{constructor(k,B){super(k,"A6","MAP_SHIVERCHILL_RAIL_RUINS",1170,400,["shiverchill-A5","shiverchill-B6"],B.concat([q._.Zone_shiverchill_json,Rn.t.Tileset_minecarts_png,Rn.t.Tileset_iceruins_png,q._.Npc_sprite_wizard_json])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(645,330),new j.I9Y(920,555)],this.dailyCoordinates=[{x:1010,y:480},{x:300,y:480},{x:520,y:220}]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:this.game.width,y:400,w:120,h:280},"shiverchill-B6",110,400,null,null);B.addCollect(1,674,245,{type:"item",ID:71}),this.addWizard(k,B,350,370,"wizard2",43,!1),this.checkFurnaces(k,B)}checkFurnaces(k,B){this.zone.getState("furnace")>=2?(this.zone.smoke(B,12,13),B.addClickableEvent(120,160,120,80,this.zone.doorClick.bind(this,B,160,260),null),this.addAreaEvent(k,B,{x:160,y:170,w:80,h:190,rect:!0},"shiverchill-A5",1180,650,null,LT.K.UP),B.addClickableEvent(960,200,80,80,this.zone.doorClick.bind(this,B,1e3,260),null),this.addAreaEvent(k,B,{x:980,y:240,w:70,h:72,rect:!0},"shiverchill-A9",145,170,null,LT.K.UP)):(B.addBlock(160,300,{x:.5,y:1,atlas:q._.Zone_shiverchill_json,tag:"ice-cubes"}),B.addBlock(983,327,{x:.5,y:1,atlas:q._.Zone_shiverchill_json,tag:"ice-cubes"}),this.addCollisionZone(B,80,80,160,200),this.addCollisionZone(B,920,200,100,100))}}class eD extends qI{constructor(k,B){super(k,"A7","MAP_SHIVERCHILL_RUINED_ENTRANCE",189,650,["shiverchill-B7","shiverchill-B8"],B.concat([q._.Npc_sprite_merchant_json,q._.Zone_shiverchill_json,Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(1e3,360),new j.I9Y(720,600)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:160,y:520,r:100},"shiverchill-B8",1100,200,null,LT.K.UP),this.addAreaEvent(k,B,{x:this.game.width,y:450,w:120,h:280},"shiverchill-B7",110,220,null,null),this.setupNPC(k,B);const F=this.zone.getQuestState();j.Aq$.isDefined(this.zone)&&(!j.Aq$.isDefined(F)||F.ID<7&&!this.zone.isQuestComplete(6))&&(this.block=B.addBlock(385,325,{x:.5,y:1,atlas:q._.Zone_shiverchill_json,tag:"ice-small",content:!0}),this.addCollisionZone(B,340,280,100,60))}setupNPC(k,B){this.npc=B.addNPC(378,313,q._.Npc_sprite_merchant_json,Kn.ac.Merchant,this.chatWithMerchant.bind(this,k,B),"NPC_NAME_MINER"),this.npc.flip(),this.npc.animate("stand"),this.npc.showName();const U=B.content.addChild(K.q.instance.prodigy.create.sprite(350,100,q._.General_icons_json,"map-quest"));K.q.instance.prodigy.animation.float(U,20,1400,!0,!0)}chatWithMerchant(k,B){const U=new Ti.rD(this.game),F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.zone.isOnQuest(4)||this.zone.isOnQuest(5)?(U.addEvents([{callback:()=>{this.game.input.enabled=!1;for(let k=0;k{this.npc.highlight(!1)}},{dialogueData:U.dataProvider.get(379),blockInput:!0},{dialogueData:U.dataProvider.get(380),blockInput:!0},{callback:()=>{this.zone.completeSequence(4,1),B.process()}}]):U.addEvents([{dialogueData:U.dataProvider.get(380),blockInput:!0}])):this.zone.isOnQuest(6)?U.addEvents([{dialogueData:U.dataProvider.get(384),blockInput:!0}]):this.zone.getQuestState().ID>=6&&(0===F.backpack.hasItem("item",80)?U.addEvents([{dialogueData:U.dataProvider.get(399),blockInput:!0},{dialogueData:U.dataProvider.get(402),blockInput:!0},{dialogueData:U.dataProvider.get(403),blockInput:!0},{dialogueData:U.dataProvider.get(404),blockInput:!0}]):F.backpack.hasItem("item",80)<5?(U.addEvents([{dialogueData:U.dataProvider.get(399),blockInput:!0},{dialogueData:U.dataProvider.get(391),blockInput:!0}]),4===F.backpack.hasItem("item",80)&&U.addEvents([{dialogueData:U.dataProvider.get(397),blockInput:!0}])):F.backpack.hasItem("item",80)>4&&this.zone.getState("daily").rewards<5?U.addEvents([{dialogueData:U.dataProvider.get(398),blockInput:!0},{callback:()=>{F.saveEnabled=!1,this.zone.setState("daily",{date:this.zone.getState("daily").date,flags:this.zone.getState("daily").flags,rewards:5}),K.q.instance.prodigy.open.gotItem([{type:"item",ID:76,N:5}],null,null,null,null,null,{source_type:gn.C.Npc})}},{dialogueData:U.dataProvider.get(392),blockInput:!0},{callback:()=>{F.saveEnabled=!0}}]):F.backpack.hasItem("item",80)>4&&F.backpack.hasItem("item",80)<10&&this.zone.getState("daily").rewards>4?(U.addEvents([{dialogueData:U.dataProvider.get(399),blockInput:!0},{dialogueData:U.dataProvider.get(392),blockInput:!0}]),9===F.backpack.hasItem("item",80)&&U.addEvents([{dialogueData:U.dataProvider.get(397),blockInput:!0}])):F.backpack.hasItem("item",80)>9&&this.zone.getState("daily").rewards<10?U.addEvents([{dialogueData:U.dataProvider.get(398),blockInput:!0},{callback:()=>{F.saveEnabled=!1,this.zone.setState("daily",{date:this.zone.getState("daily").date,flags:this.zone.getState("daily").flags,rewards:10}),K.q.instance.prodigy.open.gotItem([{type:"item",ID:77,N:10}],null,null,null,null,null,{source_type:gn.C.Npc})}},{dialogueData:U.dataProvider.get(393),blockInput:!0},{callback:()=>{F.saveEnabled=!0}}]):F.backpack.hasItem("item",80)>9&&F.backpack.hasItem("item",80)<25&&this.zone.getState("daily").rewards>9?(U.addEvents([{dialogueData:U.dataProvider.get(399),blockInput:!0},{dialogueData:U.dataProvider.get(393),blockInput:!0}]),24===F.backpack.hasItem("item",80)&&U.addEvents([{dialogueData:U.dataProvider.get(397),blockInput:!0}])):F.backpack.hasItem("item",80)>24&&this.zone.getState("daily").rewards<25?U.addEvents([{dialogueData:U.dataProvider.get(398),blockInput:!0},{callback:()=>{F.saveEnabled=!1,this.zone.setState("daily",{date:this.zone.getState("daily").date,flags:this.zone.getState("daily").flags,rewards:25}),K.q.instance.prodigy.open.gotItem([{type:"hat",ID:10}],null,null,null,null,null,{source_type:gn.C.Npc})}},{dialogueData:U.dataProvider.get(394),blockInput:!0},{callback:()=>{F.saveEnabled=!0}}]):F.backpack.hasItem("item",80)>24&&F.backpack.hasItem("item",80)<50&&this.zone.getState("daily").rewards>24?(U.addEvents([{dialogueData:U.dataProvider.get(399),blockInput:!0},{dialogueData:U.dataProvider.get(394),blockInput:!0}]),49===F.backpack.hasItem("item",80)&&U.addEvents([{dialogueData:U.dataProvider.get(397),blockInput:!0}])):F.backpack.hasItem("item",80)>49&&this.zone.getState("daily").rewards<50?U.addEvents([{dialogueData:U.dataProvider.get(398),blockInput:!0},{callback:()=>{F.saveEnabled=!1,this.zone.setState("daily",{date:this.zone.getState("daily").date,flags:this.zone.getState("daily").flags,rewards:50}),K.q.instance.prodigy.open.gotItem([{type:"outfit",ID:6}],null,null,null,null,null,{source_type:gn.C.Npc})}},{dialogueData:U.dataProvider.get(395),blockInput:!0},{callback:()=>{F.saveEnabled=!0}}]):F.backpack.hasItem("item",80)>49&&F.backpack.hasItem("item",80)<75&&this.zone.getState("daily").rewards>49?(U.addEvents([{dialogueData:U.dataProvider.get(399),blockInput:!0},{dialogueData:U.dataProvider.get(395),blockInput:!0}]),74===F.backpack.hasItem("item",80)&&U.addEvents([{dialogueData:U.dataProvider.get(397),blockInput:!0}])):F.backpack.hasItem("item",80)>74&&this.zone.getState("daily").rewards<75?U.addEvents([{dialogueData:U.dataProvider.get(398),blockInput:!0},{callback:()=>{F.saveEnabled=!1,this.zone.setState("daily",{date:this.zone.getState("daily").date,flags:this.zone.getState("daily").flags,rewards:75}),K.q.instance.prodigy.open.gotItem([{type:"weapon",ID:13}],null,null,null,null,null,{source_type:gn.C.Npc})}},{dialogueData:U.dataProvider.get(396),blockInput:!0},{callback:()=>{F.saveEnabled=!0}}]):F.backpack.hasItem("item",80)>74&&F.backpack.hasItem("item",80)<99&&this.zone.getState("daily").rewards>74?(U.addEvents([{dialogueData:U.dataProvider.get(399),blockInput:!0},{dialogueData:U.dataProvider.get(396),blockInput:!0}]),98===F.backpack.hasItem("item",80)&&U.addEvents([{dialogueData:U.dataProvider.get(397),blockInput:!0}])):F.backpack.hasItem("item",80)>98&&this.zone.getState("daily").rewards<99?U.addEvents([{dialogueData:U.dataProvider.get(398),blockInput:!0},{callback:()=>{F.saveEnabled=!1,this.zone.setState("daily",{date:this.zone.getState("daily").date,flags:this.zone.getState("daily").flags,rewards:99}),K.q.instance.prodigy.open.gotItem([{type:"hat",ID:56}],null,null,null,null,null,{source_type:gn.C.Npc}),F.saveEnabled=!0}}]):U.addEvents([{dialogueData:U.dataProvider.get(408),blockInput:!0}])),U.start()}}class iD extends qI{constructor(k,B){super(k,"A9","MAP_SHIVERCHILL_TREASURE_ROOM",200,490,["shiverchill-A10","shiverchill-B8"],B.concat([q._.Zone_shiverchill_json,Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.dailyCoordinates=[{x:125,y:510},{x:925,y:260},{x:620,y:340}]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:200,y:this.game.height-60,w:280,h:200},"shiverchill-A10",221,200,null,LT.K.DOWN),this.setupFrozenLoot(k,B),this.checkFurnace(k,B)}setupFrozenLoot(k,B){const U=B.content.addChild(K.q.instance.prodigy.create.image(1050,550,q._.Zone_shiverchill_json,"frozen-loot"));U.anchor.set(.5,1),U.visible=!1,this.zone.getState("furnace")>=4?(this.zone.smoke(B,22,12),this.zone.smoke(B,16,14),this.addChest(k,B,"chest6",1050,550,null,"A")):U.visible=!0}checkFurnace(k,B){this.zone.getState("furnace")>=1&&(this.zone.smoke(B,31,4),this.addAreaEvent(k,B,{x:1090,y:130,w:150,h:80},"shiverchill-B8",100,550,null,LT.K.UP)),B.addClickableEvent(160,40,80,80,this.zone.doorClick.bind(this,B,200,100),null),this.zone.getState("furnace")>=2&&(this.zone.smoke(B,12,7),this.addAreaEvent(k,B,{x:150,y:75,w:100,h:80,rect:!0},"shiverchill-A6",980,335,null,LT.K.UP)),this.zone.getState("furnace")<=1&&(B.addBlock(150,150,{x:.5,y:1,atlas:q._.Zone_shiverchill_json,tag:"ice-cubes"}),this.addCollisionZone(B,80,0,120,80)),this.zone.getState("furnace")<1&&(B.addBlock(1070,250,{x:.5,y:1,atlas:q._.Zone_shiverchill_json,tag:"ice-cubes"}),B.addBlock(1155,285,{x:.5,y:1,atlas:q._.Zone_shiverchill_json,tag:"ice-cubes"}),this.addCollisionZone(B,1e3,80,180,140))}}class sD extends qI{constructor(k,B){super(k,"B1","MAP_SHIVERCHILL_GATE",200,630,["shiverchill-B3"],B.concat([q._.Npc_sprite_wizard_json,Rn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:130,y:420,r:80},"shiverchill-B3",1160,230,null,LT.K.UP),this.addWizard(k,B,960,500,"wizard3",45,!0)}}class nD extends qI{constructor(k,B){super(k,"B10","MAP_SHIVERCHILL_FURNACE_ROOM",255,545,["shiverchill-A10","shiverchill-B9"],B.concat([Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:200,y:660,w:120,h:90,rect:!0},"shiverchill-A10",1080,230,null,null),this.addAreaEvent(k,B,{x:660,y:200,w:60,h:72,rect:!0},"shiverchill-B9",645,500,null,null);const F=[[200,120],[440,240],[720,200],[1e3,240]],G=[];for(let j=0;j0&&this.highlightFurnace(G),this.processFurnaces(B)}highlightFurnace(k){const B=this.zone.getState("furnace");j.Aq$.isDefined(B)?B{const F=B.content.addChild(K.q.instance.prodigy.icon.createIcon(B.user.x,B.user.y,U));F.anchor.set(.5,1),k.add.tween(F,this).to({x:"+=70"},2e3,j.GS3.Linear.None).to({alpha:0},10,j.GS3.Linear.None).start(),k.add.tween(F,this).to({y:"-=200"},1e3,j.GS3.Quadratic.Out).to({y:"+=100"},1e3,j.GS3.Quadratic.In).start()};if($>=U)if(V.backpack.hasItem("item",79)>0){const U=[{type:"item",ID:76},{type:"item",ID:2},{type:"item",ID:77}],F=.5*Math.random()+.5,G=[],j=Math.floor(1.5*Math.random()+1);for(let k=0;k$+1?H.popup(G.getText("SHIVERCHILL_FURNACE_IN_ORDER")):V.backpack.hasItem("item",71)>0?(H.enableInput(!1),H.enableSave(!1),H.function(V.backpack.consume.bind(V.backpack,"item",71,1)),H.function(this.zone.setState.bind(this.zone,"furnace",U)),H.function(F.highlight.bind(F,!1)),H.function(W.bind(this,k,B,Ut.E.getIconForType("item",71))),H.delay(2e3),H.function(this.processFurnaces.bind(this,B)),H.enableSave(!0),H.enableInput(!0),H.function(B.process.bind(B))):H.popup(G.getText("SHIVERCHILL_FURNACE_FUEL"));H.start()}processFurnaces(k){const B=this.zone.getState("furnace");if(j.Aq$.isDefined(B)){const U=[[5,4],[11,7],[18,6],[25,7]];for(let F=0;F=F+1&&(k.floor.add(this.getTile(809,40*G,40*$,k.path,k.area,null,!0,!0)),k.floor.add(this.getTile(810,40*(G+1),40*$,k.path,k.area,null,!0,!0)),k.floor.add(this.getTile(j.DXe.flippedHorizontally+809,40*(G+2),40*$,k.path,k.area,null,!0,!0)))}}}}class aD extends qI{constructor(k,B){super(k,"B2","MAP_BONFIRE_SPIRE_THRONE_ROOM",640,500,["shiverchill-B3"],B),this.battleBG="battle-shiverchill-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:675,y:625,w:250,h:200,rect:!0},"shiverchill-B3",560,415,null,LT.K.DOWN)}}class rD extends qI{constructor(k,B){super(k,"B3","MAP_SHIVERCHILL_ROYAL_PASSAGE",110,280,["shiverchill-B1","shiverchill-A3","shiverchill-B2"],B.concat([q._.Zone_shiverchill_json,q._.Npc_sprite_noot_json,Rn.t.Tileset_iceruins_png,Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.dailyCoordinates=[{x:980,y:250},{x:970,y:400},{x:255,y:490}]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:0,y:350,w:150,h:275},"shiverchill-A3",1160,530,null,null),this.checkFurnaces(k,B)}checkFurnaces(k,B){this.zone.getState("furnace")>=3?(this.zone.smoke(B,1,16),this.zone.smoke(B,27,16),this.zone.smoke(B,26,12),B.addClickableEvent(520,270,80,120,this.zone.doorClick.bind(this,B,560,370),null),this.addAreaEvent(k,B,{x:520,y:285,w:90,h:80,rect:!0},"shiverchill-B2",640,500,null,LT.K.UP),this.addAreaEvent(k,B,{x:1060,y:90,w:180,h:60},"shiverchill-B1",200,630,null,LT.K.UP)):(B.addBlock(520,368,{x:.5,y:1,atlas:q._.Zone_shiverchill_json,tag:"ice-cubes"}),B.addBlock(1080,175,{x:.5,y:1,atlas:q._.Zone_shiverchill_json,tag:"ice-cubes"}),this.addCollisionZone(B,460,60,160,220),this.addCollisionZone(B,1060,40,180,120))}}class oD extends qI{constructor(k,B){super(k,"B6","MAP_SHIVERCHILL_RUINED_STEPS",1100,530,["shiverchill-A6","shiverchill-B7"],B.concat([Rn.t.Tileset_minecarts_png,Rn.t.Tileset_iceruins_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(315,635),new j.I9Y(650,600),new j.I9Y(1100,230)],this.dailyCoordinates=[{x:1100,y:420},{x:1015,y:110},{x:185,y:400}]}init(k,B,U,F){return this.enableLayerID(0,!1),this.enableLayerID(1,!0),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1e3,y:this.game.height-70,w:280,h:120},"shiverchill-B7",1060,110,null,null),this.addAreaEvent(k,B,{x:0,y:400,w:170,h:280},"shiverchill-A6",1170,400,null,null),this.addChest(k,B,"chest1",545,280,{type:"item",ID:75},"B")}}class hD extends qI{constructor(k,B){super(k,"B7","MAP_SHIVERCHILL_RUINED_PASSAGE",110,220,["shiverchill-A7","shiverchill-B6"],B.concat([Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(320,260),new j.I9Y(380,620)],this.dailyCoordinates=[{x:370,y:540},{x:955,y:400},{x:1190,y:330}]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1050,y:0,w:480,h:120},"shiverchill-B6",1100,530,null,null),this.addAreaEvent(k,B,{x:0,y:250,w:120,h:280},"shiverchill-A7",1170,430,null,null)}}class cD extends qI{constructor(k,B){super(k,"B8","MAP_SHIVERCHILL_MOUNTAIN_PASS",100,550,["shiverchill-A9","shiverchill-A7"],B.concat([q._.Zone_shiverchill_json,Rn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside",this.coord=[new j.I9Y(1200,530),new j.I9Y(820,400),new j.I9Y(445,280)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:90,y:410,r:80},"shiverchill-A9",1125,225,null,LT.K.UP),this.addAreaEvent(k,B,{x:1090,y:100,w:100,h:70},"shiverchill-A7",189,650,null,LT.K.UP),this.addChest(k,B,"chest2",750,200,null,"C")}canRegularMonsterSpawn(){return!this.zone.isOnQuest(7)}}class dD extends qI{constructor(k,B){super(k,"B9","MAP_SHIVERCHILL_HIDDEN_ROOM",645,500,["shiverchill-B10"],B.concat([q._.Zone_shiverchill_json])),this.battleBG="battle-shiverchill-inside",this.dailyCoordinates=[{x:680,y:250},{x:280,y:320},{x:945,y:380}]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:645,y:650,r:140},"shiverchill-B10",670,250,null,LT.K.DOWN),this.addChest(k,B,"chest5",850,275)}}class lD extends Pn.T{constructor(k,B,U){super(k,B,1,"",{type:"pet",ID:122,N:3},["shiverchill-B10"],[1464,1465,1466],[],[332],U,!1,"QUESTS_SHIVERCHILL_CLEAR_FURNACE")}setup(k,B,U){if(super.setup(k,B,U),"B10"===U.getTag()){const F={randDir:!0,encounter:[{ID:122}],difficulty:1,maxTeamSize:1,isQuestEncounter:!0};U.addMonster(k,B,1,128,255,!0,F),U.addMonster(k,B,2,1150,480,!0,F),U.addMonster(k,B,3,417,408,!0,F)}return null}start(k,B,U){if("B10"===U.getTag()&&this.zone.isOnSequence(1,0)){const k=K.q.instance.prodigy.event.create();k.text(67,"noot"),k.function(this.zone.completeSequence.bind(U.zone,1,0)),k.start()}return null}}class uD extends Pn.T{constructor(k,B,U){super(k,B,10,"QUESTS_SHIVERCHILL_ACTIVATE_FURNACE",{type:"zgteState",ID:"furnace",N:2},["shiverchill-B10"],[342,343],[],[332,333],U,!1)}}class fD extends Pn.T{constructor(k,B,U){super(k,B.concat(J.Q.Default_boss_16_json),11,"QUESTS_SHIVERCHILL_CHECK_THRONE",{type:"seq",N:1},["shiverchill-B3"],[359,360],[],[361],U,!1)}setup(k,B,U){return super.setup(k,B,U),"B3"===U.getTag()?{enableMonsters:!1}:{}}start(k,B,U){return this.zone.isOnSequence(11,0)&&"B3"===U.getTag()&&this.cutscene(k,B,U),{}}cutscene(k,B,U){U.boss=k.add.spine(930,440,J.Q.Default_boss_16_json,B.content),U.boss.visible=!1,U.boss.scale.set(.65,.65),U.boss.setAnimationByName(0,"idle",!0);const F=B.content.addChild(K.q.instance.prodigy.icon.createIcon(770,400,Ut.E.getIconForType("item",71))),G=B.addNPC(250,400,q._.Npc_sprite_noot_json);G.visible=!1,G.float(!0);const j=K.q.instance.prodigy.event.create();j.enableInput(!1),j.path(B.user,[{x:250,y:400}]),j.set(G,"visible",!0),j.hop(G,300,50,50),j.text(74,"noot"),j.delay(500),j.function(G.chat.bind(G,1,100)),j.delay(500),j.path(G,[{x:550,y:450}]),j.text(75,"noot"),j.path(G,[{x:750,y:500}]),j.shake(0,3e3,10,"v",!0),j.function(G.chat.bind(G,1,100)),j.explode(810,350,200,150,1,!0),j.delay(500),j.hop(G,110,-140,100,!0),j.delay(700),j.explode(810,200,200,250,2,!0),j.delay(1e3),j.set(U.boss,"visible",!0),j.explode(810,350,150,150,1),j.delay(1e3),j.shake(0,3e3,10,"v",!0),j.explode(810,350,200,150,1,!0),j.delay(700),j.explode(810,200,200,250,2,!0),j.delay(700),j.set(U.boss,"visible",!1),j.set(F,"visible",!1),j.explode(810,350,150,150,1),j.text(76,"noot"),j.path(G,[{x:300,y:400}]),j.hop(G,300,-50,50),j.set(G,"visible",!1),j.enableInput(!0),j.function(this.zone.completeSequence.bind(U.zone,11,0)),j.function(B.process.bind(B)),j.start()}}class bD extends Pn.T{constructor(k,B,U){super(k,B,12,"",{type:"item",ID:74,N:5,K:!0},["shiverchill-A3","shiverchill-B3"],[362,334,363,364,365],[],[332],U,!1,"QUESTS_SHIVERCHILL_COLLECT_CRYSTALS"),this.collectionMaps={A3:[1,2,3],B3:[4,5]}}setup(k,B,U){if(super.setup(k,B,U),"B3"===U.getTag()){const k={type:"item",ID:74};B.addCollect(4,530,550,k),B.addCollect(5,860,525,k)}else if("A3"===U.getTag()){const k={type:"item",ID:74};B.addCollect(1,980,160,k),B.addCollect(2,180,450,k),B.addCollect(3,670,370,k)}return null}}class pD extends Pn.T{constructor(k,B,U){super(k,B.concat(J.Q.Default_boss_16_json),13,"QUESTS_SHIVERCHILL_DEFEAT_ICE_WORM",{type:"seq",N:1},["shiverchill-A4"],[366,334,367],[],[332],U,!1)}setup(k,B,U){return super.setup(k,B,U),"A4"===U.getTag()?{enableMonsters:!1}:null}start(k,B,U){return this.zone.isOnSequence(13,0)&&"A4"===U.getTag()&&(this.zone.hideFollow(B),this.bossBattle(k,B,U)),null}endBattle(k){this.zone.completeSequence(13,0),K.q.instance.prodigy.world.it("shiverchill-A4",300,460)}bossBattle(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),G=F.getValue("iceWyrm2MaxHP",Vt.s.get("GameConstants.IceWyrm2.MAX_HP")),$=null===G?void 0:parseInt(G,10),H=this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_BOSS_BATTLE"),{boss:{ID:16,element:"ice",attacks:[62,63,65],name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_ICE_WORM"),tag:hn.A_.SHIVERCHILL,maxHP:$},difficulty:parseInt(F.getValue("iceWyrm2Difficulty",Vt.s.get("GameConstants.IceWyrm2.DIFFICULTY")),10),starMod:5,screen:"battle-shiverchill-inside",drops:[{ID:71,type:"item"}]},this.endBattle.bind(this,k)),V=(k,B,U)=>{const F=B.background.addChild(K.q.instance.prodigy.create.sprite(B.user.x,B.user.y,q._.General_icons_json,"crystal"));F.anchor.set(.5,1),k.add.tween(F,this).to({x:U},500,j.GS3.Linear.None).start(),k.add.tween(F,this).to({y:"-=50"},250,j.GS3.Quadratic.Out).to({y:"+=50"},250,j.GS3.Quadratic.In).start()},W=K.q.instance.prodigy.event.create(),z=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;W.set(B.user,"evtProc",!0),W.enableInput(!1),W.path(B.user,[{x:640,y:530}]),W.function(z.backpack.consume.bind(z.backpack,"item",74,5)),W.function(V.bind(U,k,B,"-=50")),W.delay(500),W.path(B.user,[{x:310,y:600}]),W.function(V.bind(U,k,B,"-=50")),W.delay(500),W.path(B.user,[{x:200,y:430}]),W.function(V.bind(U,k,B,"-=50")),W.delay(500),W.path(B.user,[{x:250,y:340}]),W.function(V.bind(U,k,B,"+=50")),W.delay(500),W.path(B.user,[{x:470,y:380}]),W.function(V.bind(U,k,B,"+=50")),W.delay(500),W.path(B.user,[{x:300,y:460}]),W.path(B.user,[{x:301,y:460}]),W.delay(500),W.shake(0,3e3,10,"v",!0),W.function(B.user.chat.bind(B.user,1,100)),W.explode(360,410,150,150,1,!0),W.delay(700),W.explode(360,260,150,250,2,!0),W.delay(1e3),W.function((()=>{const U=k.add.spine(500,510,J.Q.Default_boss_16_json,B.content);U.scale.set(-.65,.65),U.setAnimationByName(0,"idle",!0)})),W.explode(360,410,150,150,1),W.delay(1500),W.enableInput(!0),W.function((()=>{K.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle"})),W.function(H),W.start()}}class vD extends Pn.T{constructor(k,B,U){super(k,B,14,"QUESTS_SHIVERCHILL_ACTIVATE_FURNACE",{type:"zgteState",ID:"furnace",N:3},["shiverchill-B10"],[342,343],[],[332,333],U,!1)}}!function(k){k[k.GetShiverchillGemSeq=0]="GetShiverchillGemSeq",k[k.PlaceShiverchillGemSeq=1]="PlaceShiverchillGemSeq",k[k.FinishQuestSeq=2]="FinishQuestSeq",k[k.QuestID=15]="QuestID"}(uO||(uO={}));class gD extends Pn.T{constructor(k,B,U){super(k,B,15,"",{type:"seq",N:uO.FinishQuestSeq},[`${hn.A_.SHIVERCHILL}-B2`],[368,369],[],[1252],U,!1,"QUESTS_SHIVERCHILL_GET_GEM"),this.collectionMaps={B2:[1]}}setup(k,B,U){super.setup(k,B,U);const F=U.getTag(),G=`zone-${this.zone.ID}-quest`,$=this.zone.getQuestState(),H=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,V=K.q.instance.prodigy.world.getZone(hn.A_.ACADEMY).getKeystoneState(hn.A_.SHIVERCHILL)===Dn.s.Placed,W=H.backpack.hasItem("key",4)>0;return j.Aq$.isDefined($.state)||V||W?V&&"seq"!==H.state.get(`${G}-req-type`)&&H.state.set(`${G}-req`,this.req):H.state.set(G,Object.assign(Object.assign({},$),{state:{},seq:uO.GetShiverchillGemSeq})),W&&(this.collectionMaps={}),F===fO.ThroneRoom&&this.zone.isOnSequence(this.ID,uO.GetShiverchillGemSeq)?(k.input.enabled=!1,H.playerContainer.visible=!0,B.user.x=700,B.user.y=850,K.q.instance.prodigy.world.playScene("shiverchill-receiveShiverchillGem")):F===fO.BoksCave&&(W&&(this.onStart=[1251]),V&&(this.zone.completeSequence(this.ID,uO.GetShiverchillGemSeq),this.zone.completeSequence(this.ID,uO.PlaceShiverchillGemSeq))),null}process(k,B,U){super.process(k,B,U);K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("key",4)>0&&j.Aq$.isDefined(B.questProgress)&&!ti.U.shouldShowEndgameQuestBanner(hn.A_.SHIVERCHILL)&&(B.questProgress.visible=!1)}}class mD extends Pn.T{constructor(k,B,U){super(k,B,2,"",{type:"item",N:1,ID:71,K:!0},["shiverchill-A9"],[339,334,340,341],[],[332],U,!1,"QUESTS_SHIVERCHILL_GET_FUEL")}setup(k,B,U){return super.setup(k,B,U),"A9"===U.getTag()?(K.q.instance.prodigy.prefabFactory.addMonster(U,490,510,mD.QUEST_SPAWN_IDS[0],this.getSpawnMods(mD.QUEST_SPAWN_IDS[0])).catch(j.RQr.createHandler("Could not add monster 1 for ShiverchillQ2")),K.q.instance.prodigy.prefabFactory.addMonster(U,720,200,mD.QUEST_SPAWN_IDS[1],this.getSpawnMods(mD.QUEST_SPAWN_IDS[1])).catch(j.RQr.createHandler("Could not add monster 2 for ShiverchillQ2")),K.q.instance.prodigy.prefabFactory.addMonster(U,1150,460,mD.QUEST_SPAWN_IDS[2],this.getSpawnMods(mD.QUEST_SPAWN_IDS[2])).catch(j.RQr.createHandler("Could not add monster 3 for ShiverchillQ2")),K.q.instance.prodigy.prefabFactory.addMonster(U,200,230,mD.QUEST_SPAWN_IDS[3],this.getSpawnMods(mD.QUEST_SPAWN_IDS[3])).catch(j.RQr.createHandler("Could not add monster 4 for ShiverchillQ2")),{enableMonsters:!1}):null}getSpawnMods(k){this.spawnPetIds||(this.spawnPetIds={},mD.QUEST_SPAWN_IDS.forEach((k=>{this.spawnPetIds[k]=Math.random()<.5?78:122})));let B=[];return 1===this.getQuestMonstersRemaining()&&(B=[{type:"item",ID:71,N:1}]),{randDir:!0,showGuideHand:!0,encounter:[{ID:this.spawnPetIds[k]}],drops:B,difficulty:2,maxTeamSize:1,isQuestEncounter:!0,unique:!0}}getQuestMonstersRemaining(){const k=this.zone.getQuestState().state;return mD.QUEST_SPAWN_IDS.filter((B=>!k[B+1])).length}}mD.QUEST_SPAWN_IDS=[1,2,3,4];class yD extends Pn.T{constructor(k,B,U){super(k,B,3,"QUESTS_SHIVERCHILL_ACTIVATE_FURNACE",{type:"zgteState",ID:"furnace",N:1},["shiverchill-B10"],[342,343],[],[332,333],U,!1)}}class _D extends Pn.T{constructor(k,B,U){super(k,B,4,"QUESTS_SHIVERCHILL_EXPLORE_CAVES",{type:"seq",N:2},["shiverchill-A7"],[344,345],[69],[346,347,334,348],U,!1)}start(k,B,U){if(this.zone.isOnSequence(4,0)&&"B8"===U.getTag()){const k=K.q.instance.prodigy.event.create();k.enableInput(!1),k.path(B.user,[{x:250,y:640}]),k.function(B.user.chat.bind(B.user,1,100)),k.shake(0,3e3,10,"v"),k.enableInput(!0),k.text(68,"noot"),k.function(this.zone.completeSequence.bind(U.zone,4,0)),k.start()}else"A7"===U.getTag()&&(this.zone.isQuestComplete(4)||U.npc.highlight(!0,-60,-100));return null}}class ED extends Pn.T{constructor(k,B,U){super(k,B,5,"QUESTS_SHIVERCHILL_FIND_SHOVEL",{type:"item",ID:73,N:1},["shiverchill-B6"],[349],[70],[350,334,351],U,!1)}}class wD extends Pn.T{constructor(k,B,U){super(k,B,6,"QUESTS_SHIVERCHILL_HELP_MINER",{type:"seq",N:2},["shiverchill-A7"],[352],[],[332],U,!1)}start(k,B,U){return this.zone.isOnSequence(6,0)&&"A7"===U.getTag()?this.ambush(k,B,U):this.zone.isOnSequence(6,1)&&"A7"===U.getTag()&&this.talkToMerchant(k,B,U),null}endBattle(k){this.zone.completeSequence(6,0),K.q.instance.prodigy.world.it("shiverchill-A7",328,343)}ambush(k,B,U){const F=U.addMonster(k,B,1,0,0,!1,{encounter:[{ID:87}],difficulty:1,maxTeamSize:1},!0),G=U.addMonster(k,B,1,0,0,!1,{encounter:[{ID:87}],difficulty:1,maxTeamSize:1},!0),$=U.addMonster(k,B,1,0,0,!1,{encounter:[{ID:87}],difficulty:1,maxTeamSize:1},!0),H=(k,B,U)=>{U.x=k,U.y=B},V=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),W=this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_SNOWBALL_FIGHT"),{pets:[{ID:87,nickname:V.getText("NPC_NAME_CHILLY")},{ID:87,nickname:V.getText("NPC_NAME_FROSTY")},{ID:87,nickname:V.getText("NPC_NAME_FREEZY")}]},this.endBattle.bind(this,k)),q=K.q.instance.prodigy.event.create();q.enableInput(!1),q.set(B.user,"evtProc",!0),q.path(B.user,[{x:450,y:550},{x:430,y:600}]),q.delay(500),q.function(H.bind(U,900,600,F)),q.function(H.bind(U,950,650,G)),q.function(H.bind(U,950,550,$)),q.function(B.user.chat.bind(B.user,1,80)),q.path(F,[{x:600,y:333}],1,!0),q.path(G,[{x:650,y:333}],1,!0),q.path($,[{x:600,y:283}],1,!1),q.hop(F,575,-140,100,!0),q.hop(G,575,-140,100,!0),q.hop($,575,-140,100,!1),q.enableInput(!0),q.function((()=>{K.q.instance.prodigy.battle.battleStats.type="QuestBattle"})),q.function(W),q.start()}talkToMerchant(k,B,U){j.Aq$.isDefined(U.block)&&(U.block.visible=!1);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=new Ti.rD(k);G.addEvents([{dialogueData:G.dataProvider.get(381),blockInput:!0},{dialogueData:G.dataProvider.get(81),blockInput:!0},{dialogueData:G.dataProvider.get(382),blockInput:!0},{dialogueData:G.dataProvider.get(383),blockInput:!0},{dialogueData:G.dataProvider.get(82),blockInput:!0},{dialogueData:G.dataProvider.get(384),blockInput:!0},{dialogueData:G.dataProvider.get(407),blockInput:!0},{dialogueData:G.dataProvider.get(402),blockInput:!0},{dialogueData:G.dataProvider.get(403),blockInput:!0},{dialogueData:G.dataProvider.get(404),blockInput:!0},{callback:()=>{F.saveEnabled=!1}},{callback:()=>{F.backpack.consume("item",72,1)}},{callback:()=>{this.zone.completeSequence(6,1)}},{callback:()=>{F.saveEnabled=!0}},{callback:()=>{B.process()}}]),G.start()}}class TD extends Pn.T{constructor(k,B,U){super(k,B.concat(J.Q.Default_boss_16_json),7,"QUESTS_SHIVERCHILL_UNKNOWN",{type:"seq",N:1},["shiverchill-B8"],[353,354],[69],[332],U,!1,"QUESTS_SHIVERCHILL_DEFEAT_MINI_BOSS")}setup(k,B,U){return super.setup(k,B,U),this.zone.isOnSequence(7,0)&&"B8"===U.getTag()&&(k.input.enabled=!1,this.screen.user.x=290,this.screen.user.y=640),{}}start(k,B,U){return this.zone.isOnSequence(7,0)&&"B8"===U.getTag()&&this.bossBattle(k,B,U),{}}endBattle(k){this.zone.completeSequence(7,0),K.q.instance.prodigy.world.it("shiverchill-B8",480,320)}bossBattle(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),G=F.getValue("iceWyrm1MaxHP",Vt.s.get("GameConstants.IceWyrm1.MAX_HP")),$=null===G?void 0:parseInt(G,10),H=this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_SCARY_WORM"),{boss:{ID:16,element:"ice",attacks:[62,64],name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_UNKNOWN"),difficulty:3,tag:hn.A_.SHIVERCHILL,maxHP:$},difficulty:parseInt(F.getValue("iceWyrm1Difficulty",Vt.s.get("GameConstants.IceWyrm1.DIFFICULTY")),10),starMod:2,screen:"battle-shiverchill-outside"},this.endBattle.bind(this,k)),V=K.q.instance.prodigy.event.create();V.enableInput(!1),V.path(B.user,[{x:425,y:326},{x:420,y:530},{x:290,y:640}]),V.shake(0,3e3,10,"v",!0),V.function(B.user.chat.bind(B.user,1,100)),V.explode(540,250,150,150,1,!0),V.delay(700),V.explode(540,100,150,250,2,!0),V.delay(1e3),V.function((()=>{const U=k.add.spine(605,315,J.Q.Default_boss_16_json,B.foreground);U.scale.set(-.65,.65),U.setAnimationByName(0,"idle",!0)})),V.explode(540,250,150,150,1),V.delay(1500),V.enableInput(!0),V.text(73,"noot"),V.function((()=>{K.q.instance.prodigy.battle.battleStats.type="QuestBattle"})),V.function(H),V.start()}}class SD extends Pn.T{constructor(k,B,U){super(k,B,8,"",{type:"pet",ID:90,N:3},["shiverchill-B7","shiverchill-B6"],[355,356,334,357],[],[332],U,!1,"QUESTS_SHIVERCHILL_DEFEAT_SPECTERS")}setup(k,B,U){super.setup(k,B,U);const F={randDir:!0,encounter:[{ID:90}],difficulty:3,maxTeamSize:1,isQuestEncounter:!0},G={randDir:!0,encounter:[{ID:90}],difficulty:2,maxTeamSize:1,isQuestEncounter:!0};return"B6"===U.tag?(U.addMonster(k,B,11,700,160,!1,G,!1),U.addMonster(k,B,10,325,325,!1,F,!1),{enableMonsters:!1}):"B7"===U.tag?(U.addMonster(k,B,11,800,500,!1,F,!1),U.addMonster(k,B,10,675,285,!1,G,!1),{enableMonsters:!1}):null}}class AD extends Pn.T{constructor(k,B,U){super(k,B.concat(X.V.Bgm_puppetmaster),8,"",{type:"pet",ID:90,N:3},["shiverchill-B7","shiverchill-B6"],[355,356,334,357],[],[332],U,!1,"QUESTS_SHIVERCHILL_DEFEAT_SPECTERS")}setup(k,B,U){super.setup(k,B,U);const F={randDir:!0,encounter:[{ID:90}],difficulty:3,maxTeamSize:1,isQuestEncounter:!0},G={randDir:!0,encounter:[{ID:90}],difficulty:2,maxTeamSize:1,isQuestEncounter:!0};return"B6"===U.tag?(U.addMonster(k,B,11,700,160,!1,G,!1),U.addMonster(k,B,10,325,325,!1,F,!1),{enableMonsters:!1}):"B7"===U.tag?(U.addMonster(k,B,11,800,500,!1,F,!1),U.addMonster(k,B,10,675,285,!1,G,!1),{enableMonsters:!1}):"A7"!==U.tag||U.zone.getState(Zu.PIPPET_DEFEATED)?null:(K.q.instance.prodigy.prefabFactory.createPippetQuestEncounter(U.zone,202,bS.e.Shiverchill_quests_encounter).catch(j.RQr.createHandler(`Could not load the Pippet Encounter from guid: ${bS.e.Shiverchill_quests_encounter}`)),k.input.enabled=!1,{enableMonsters:!1,enableWizards:!1})}}class CD extends Pn.T{constructor(k,B,U){super(k,B,9,"",{type:"item",ID:71,N:1,K:!0},["shiverchill-A6"],[358],[],[332],U,!1,"QUESTS_SHIVERCHILL_GET_FUEL")}}class OD extends $n.Z{constructor(k,B){super(k,"B2",[...B,...[q._.Npc_sprite_noot_json,J.Q.Spine_shadowportal_json,Z.c.Sfx_academy_portal_open,Z.c.Sfx_academy_portal_close,J.Q.Spine_academygh_addkeystone_json,"key-4",X.V.Bgm_fun,qw.N.Map_shiverchill_b2_json,Rn.t.Tileset_shiverchill_interior_png]])}start(k,B){var U;K.q.instance.game.input.enabled=!1,super.start(k,B,11),B.user.x=700,B.user.y=850;const F=B.addNPC(630,800,q._.Npc_sprite_noot_json);F.float(!0),F.walkSpeed=2,F.visible=!0;const G=k.add.spine(845,250,J.Q.Spine_shadowportal_json);G.setToSetupPose(),B.content.addChild(G);const $=k.add.spine(695,300,J.Q.Spine_academygh_addkeystone_json);$.setToSetupPose(),$.setAnimationByName(0,"keystone-idle-shiverchill"),B.content.addChild($);const H=K.q.instance.prodigy.gameContainer.get(j.$Bt.IFSMController),V=K.q.instance.prodigy.gameContainer.get(j.$Bt.FSMService),W=[1246];(null===(U=K.q.instance.prodigy.world.getCurrentZoneObject())||void 0===U?void 0:U.difficultyMode)===ri.i.Regular&&W.push(1247),H.execute(V.getStateMachine(186),{game:k,screen:B,scene:this,zone:this.zone,player:B.user,noot:F,path:B.path,pathfinder:B.path,portal:G,keystone:$,map:`${this.zone.ID}-B2`,nootDialogues:W},(()=>K.q.instance.game.input.enabled=!0))}}!function(k){k.BoksCave="A10",k.ThroneRoom="B2"}(fO||(fO={}));class ID extends vn.b{constructor(k){super(k),this.questManagerIdentifier="c16-888b",this._assets=[Rn.t.Tileset_icecave_new_png,Rn.t.Tileset_collisions_png,Rn.t.Tileset_ship_exterior_png,Rn.t.Tileset_water_new_png,X.V.Bgm_shiverchill_mountain],this.name="Shiverchill Mountains",this.ID=hn.A_.SHIVERCHILL,this.guardian="SHIVERCHILL_GUARDIAN",this.battleBG="battle-shiverchill-inside",this.defaultOnFaint="shiverchill-A10",this.questHub="shiverchill-A10",this.bgmID=17,this.currency=15,this.zoneIndex=pT.P.Shiverchill,this.states=["chest1","chest2","chest3","chest4","chest5","wizard1","wizard2","wizard3","wizard4","furnace","chest6","daily",Zu.PIPPET_ENCOUNTER,Zu.PIPPET_REMATCH,Zu.PIPPET_DEFEATED],this.monsters=[16,50,122,78,87];const B=[Rn.t.Tileset_icecave_new_png,Rn.t.Tileset_collisions_png,Rn.t.Tileset_ship_exterior_png,Rn.t.Tileset_water_new_png,X.V.Bgm_shiverchill_mountain,Rn.t.Tileset_shiverchill_exterior_png,Rn.t.Tileset_shiverchill_interior_png,Rn.t.Tileset_shiverchill_rails_png],U={map:"shiverchill-Titan",cutscene:"shiverchill-titanIntro",harvey:{x:240,y:200},sign:{x:150,y:210},catapult:{x:140,y:400,arcHeight:300},titan:{x:1100,y:390,impactOffset:{x:-130,y:0}},entry:{x:400,y:450},battleBG:[nr.q.Battle_shiverchill_outside_bg,nr.q.Battle_shiverchill_outside_fg]};this.maps={A11:new zI(this,B),A10:new KI(this,B),A9:new iD(this,B),A7:new eD(this,B),A6:new tD(this,B),A5:new JI(this,B),B3:new rD(this,B),B6:new oD(this,B),B7:new hD(this,B),B8:new cD(this,B),B9:new dD(this,B),B10:new nD(this,B),A4:new ZI(this,B),A2:new YI(this,B),A3:new XI(this,B),B2:new aD(this,B),B1:new sD(this,B),Titan:new xT(this,B,U)},Promise.all([Cf.T.ready,Gt.R.dataBundleLoadPromise]).then((()=>{this.setZoneRewards()})).catch((k=>{K.q.instance.prodigy.open.messageBoxError("ERROR_LOADING_ZONE",["WORLD_SHIVERCHILL_MOUNTAINS"],k,"Error, unable to load Shiverchill Zone Rewards JSON")})),this.scenes={receiveShiverchillGem:new OD(this,B),titanIntro:new _T(this,[Rn.t.Tileset_interior_general_png,Rn.t.Tileset_wall_collisions_png,X.V.Bgm_tutorial])}}setZoneRewards(){const k=(0,yT.mg)(Gt.R.loadData(Ft.r.ZoneRewardsShiverchill_json));this.quests={1:new lD(this,[],k.quests.ShiverchillQ1),2:new mD(this,[],k.quests.ShiverchillQ2),3:new yD(this,[],k.quests.ShiverchillQ3),4:new _D(this,[],k.quests.ShiverchillQ4),5:new ED(this,[],k.quests.ShiverchillQ5),6:new wD(this,[],k.quests.ShiverchillQ6),7:new TD(this,[],k.quests.ShiverchillQ7),8:ef.arePippetQuestEncountersEnabled?new AD(this,[],k.quests.ShiverchillQ8):new SD(this,[],k.quests.ShiverchillQ8),9:new CD(this,[],k.quests.ShiverchillQ9),10:new uD(this,[],k.quests.ShiverchillQ10),11:new fD(this,[],k.quests.ShiverchillQ11),12:new bD(this,[],k.quests.ShiverchillQ12),13:new pD(this,[],k.quests.ShiverchillQ13),14:new vD(this,[],k.quests.ShiverchillQ14),15:new gD(this,[],k.quests.ShiverchillQ15)}}start(k,B,U){super.start(k,B,U),this.showTopLeftNavigationButton()}meetsQuestPrerequisite(){const k=K.q.instance.prodigy.world.zones[ID.QUEST_PREREQUISITE.zoneId].getQuestState();return!((null==k?void 0:k.ID)<=ID.QUEST_PREREQUISITE.questId)}createTopLeftNavigationButton(){this.showTopLeftNavigationButton()}placeDaily(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(j.Aq$.isDefined(this.getQuestState())&&this.getQuestState().ID>6&&F.backpack.hasItem("item",80)<99){let B,F;const G=this.getDailyMaps(),$=new nA.t(this.getState("daily").date);for(let U=0;U<5;U++)if(G[Math.floor($.jumpFromStart(U)*(G.length-1))]===k.tag){const k=this.getState("daily").flags;j.Aq$.isDefined(k[U].x)&&(B=k[U].x,F=k[U].y)}if(!j.Aq$.isDefined(B)){const U=k.dailyCoordinates[Math.floor(Math.random()*k.dailyCoordinates.length)];B=U.x,F=U.y;for(let j=0;j<5;j++)if(G[Math.floor($.jumpFromStart(j)*(G.length-1))]===k.tag){const k=this.getState("daily").flags;k[j]={x:B,y:F},this.setState("daily",{date:this.getState("daily").date,flags:k,rewards:this.getState("daily").rewards})}}this.ice=U.addClickableEvent(B,F,60,60,this.frozenSomethingOnClick.bind(this,U,k),null),this.ice.add(K.q.instance.prodigy.create.sprite(-10,-10,q._.Zone_shiverchill_json,"frozen-something"))}}frozenSomethingOnClick(k,B){const U=K.q.instance.prodigy.event.create();U.validPath(k.user,k.path,this.ice.x+20,this.ice.y+40),U.set(k.user,"evtProc",!0),U.function(this.interactFrozenSomething.bind(this,B)),U.set(k.user,"evtProc",!1),U.start()}interactFrozenSomething(k){const B=this.getDailyMaps();this.ice.destroy(),K.q.instance.prodigy.open.gotItem([{type:"item",ID:79}]);const U=new nA.t(this.getState("daily").date);for(let F=0;F<5;F++)if(B[Math.floor(U.jumpFromStart(F)*(B.length-1))]===k.tag){const k=this.getState("daily").flags;k[F]=0,this.setState("daily",{date:this.getState("daily").date,flags:k,rewards:this.getState("daily").rewards})}}getDailyMaps(){const k=[];for(const B in this.maps)j.Aq$.isDefined(this.maps[B].dailyCoordinates)&&k.push(B);return k}smoke(k,B,U){for(let F=0;F<4;F++){const G=K.q.instance.prodigy.create.sprite(40*B+20,40*U+20,q._.General_core_2_json,"smoke");k.foreground.addChild(G),G.anchor.set(.5,.5),G.scale.x=G.scale.y=.1,G.alpha=1,this.game.add.tween(G,this).to({y:G.y-150,alpha:0},2e3,j.GS3.Linear.None,!1,0,1e3,!1).delay(500*F).start(),this.game.add.tween(G.scale,this).to({x:.75,y:.75},2e3,j.GS3.Linear.None,!1,0,1e3,!1).delay(500*F).start()}}doorClick(k,B,U){k.user.setValidPath(k.path,B,U,null)}cleanup(){this.ice&&(this.ice.destroy(),this.ice=null),super.cleanup()}}ID.QUEST_PREREQUISITE={zoneId:hn.A_.FOREST,questId:12};class DD extends qI{constructor(k,B){super(k,"A10","MAP_SHIVERCHILL_BOKS_CAVE",125,650,["shiverchill_hard-B10","shiverchill_hard-A11","shiverchill_hard-A9"],B.concat([q._.Npc_sprite_merchant_json,q._.Npc_sprite_bok_json,Rn.t.Tileset_shiverchill_png,q._.Shiverchill_snow_particle_json]))}}class RD extends qI{constructor(k,B){super(k,"A11","MAP_SHIVERCHILL_BORDERLAND",1100,220,["shiverchill_hard-A10"],B.concat([q._.Npc_sprite_wizard_json,Rn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside",this.coord=[new j.I9Y(640,560),new j.I9Y(785,230),new j.I9Y(350,400)]}}class PD extends qI{constructor(k,B){super(k,"A2","MAP_SHIVERCHILL_THE_CHASM",1150,360,["shiverchill_hard-A3"],B.concat([Rn.t.Tileset_generic_snow_png,q._.Npc_sprite_wizard_json])),this.battleBG="battle-shiverchill-outside",this.dailyCoordinates=[{x:840,y:320},{x:565,y:450}]}}class MD extends qI{constructor(k,B){super(k,"A3","MAP_SHIVERCHILL_FROZEN_PASS",280,550,["shiverchill_hard-A2","shiverchill_hard-A4","shiverchill_hard-B3"],B.concat([q._.Zone_shiverchill_json,Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(700,380),new j.I9Y(1150,300)],this.dailyCoordinates=[{x:1100,y:210},{x:485,y:240},{x:390,y:540}]}}class ND extends qI{constructor(k,B){super(k,"A4","MAP_SHIVERCHILL_WORMS_REST",1160,610,["shiverchill_hard-A3","shiverchill_hard-A5"],B.concat([q._.Zone_shiverchill_json])),this.battleBG="battle-shiverchill-inside"}}class xD extends qI{constructor(k,B){super(k,"A5","MAP_SHIVERCHILL_MOUNTAIN_VALLEY",1180,650,["shiverchill_hard-A4","shiverchill_hard-A6"],B.concat([Rn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside",this.coord=[new j.I9Y(100,540),new j.I9Y(700,350),new j.I9Y(1025,150)]}}class LD extends qI{constructor(k,B){super(k,"A6","MAP_SHIVERCHILL_RAIL_RUINS",1170,400,["shiverchill_hard-A5","shiverchill_hard-B6"],B.concat([q._.Zone_shiverchill_json,Rn.t.Tileset_minecarts_png,Rn.t.Tileset_iceruins_png,q._.Npc_sprite_wizard_json])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(645,330),new j.I9Y(920,555)],this.dailyCoordinates=[{x:1010,y:480},{x:300,y:480},{x:520,y:220}]}}class kD extends qI{constructor(k,B){super(k,"A7","MAP_SHIVERCHILL_RUINED_ENTRANCE",189,650,["shiverchill_hard-B7","shiverchill_hard-B8"],B.concat([q._.Npc_sprite_merchant_json,q._.Zone_shiverchill_json,Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(1e3,360),new j.I9Y(720,600)]}}class BD extends qI{constructor(k,B){super(k,"A9","MAP_SHIVERCHILL_TREASURE_ROOM",200,490,["shiverchill_hard-A10","shiverchill_hard-B8"],B.concat([q._.Zone_shiverchill_json,Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.dailyCoordinates=[{x:125,y:510},{x:925,y:260},{x:620,y:340}]}}class UD extends qI{constructor(k,B){super(k,"B10","MAP_SHIVERCHILL_FURNACE_ROOM",255,545,["shiverchill_hard-A10","shiverchill_hard-B9"],B.concat([Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside"}}class FD extends qI{constructor(k,B){super(k,"B1","MAP_SHIVERCHILL_GATE",200,630,["shiverchill_hard-B3"],B.concat([q._.Npc_sprite_wizard_json,Rn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside"}}class GD extends qI{constructor(k,B){super(k,"B2","MAP_BONFIRE_SPIRE_THRONE_ROOM",640,500,["shiverchill_hard-B3"],B),this.battleBG="battle-shiverchill-inside"}}class jD extends qI{constructor(k,B){super(k,"B3","MAP_SHIVERCHILL_ROYAL_PASSAGE",110,280,["shiverchill_hard-B1","shiverchill_hard-A3","shiverchill_hard-B2"],B.concat([q._.Zone_shiverchill_json,q._.Npc_sprite_noot_json,Rn.t.Tileset_iceruins_png,Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.dailyCoordinates=[{x:980,y:250},{x:970,y:400},{x:255,y:490}]}}class $D extends qI{constructor(k,B){super(k,"B6","MAP_SHIVERCHILL_RUINED_STEPS",1100,530,["shiverchill_hard-A6","shiverchill_hard-B7"],B.concat([Rn.t.Tileset_minecarts_png,Rn.t.Tileset_iceruins_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(315,635),new j.I9Y(650,600),new j.I9Y(1100,230)],this.dailyCoordinates=[{x:1100,y:420},{x:1015,y:110},{x:185,y:400}]}}class HD extends qI{constructor(k,B){super(k,"B7","MAP_SHIVERCHILL_RUINED_PASSAGE",110,220,["shiverchill_hard-A7","shiverchill_hard-B6"],B.concat([Rn.t.Tileset_minecarts_png])),this.battleBG="battle-shiverchill-inside",this.coord=[new j.I9Y(320,260),new j.I9Y(380,620)],this.dailyCoordinates=[{x:370,y:540},{x:955,y:400},{x:1190,y:330}]}}class VD extends qI{constructor(k,B){super(k,"B8","MAP_SHIVERCHILL_MOUNTAIN_PASS",100,550,["shiverchill_hard-A9","shiverchill_hard-A7"],B.concat([q._.Zone_shiverchill_json,Rn.t.Tileset_generic_snow_png])),this.battleBG="battle-shiverchill-outside",this.coord=[new j.I9Y(1200,530),new j.I9Y(820,400),new j.I9Y(445,280)]}}class WD extends qI{constructor(k,B){super(k,"B9","MAP_SHIVERCHILL_HIDDEN_ROOM",645,500,["shiverchill_hard-B10"],B.concat([q._.Zone_shiverchill_json])),this.battleBG="battle-shiverchill-inside",this.dailyCoordinates=[{x:680,y:250},{x:280,y:320},{x:945,y:380}]}}class qD extends ID{constructor(k){super(k),this._assets=[Rn.t.Tileset_icecave_new_png,Rn.t.Tileset_collisions_png,Rn.t.Tileset_ship_exterior_png,Rn.t.Tileset_water_new_png,X.V.Bgm_shiverchill_mountain],this.questManagerIdentifier="246-64db",this.ID=hn.A_.SHIVERCHILLHARD,this.defaultOnFaint="shiverchill_hard-C8",this.questHub="shiverchill_hard-C8",this.zoneIndex=pT.P.ShiverchillHard,this.difficultyMode=ri.i.Hard,this.monsters=[],this.maps={A2:new PD(this,this._assets),A3:new MD(this,this._assets),A4:new ND(this,this._assets),A5:new xD(this,this._assets),A6:new LD(this,this._assets),A7:new kD(this,this._assets),A9:new BD(this,this._assets),A10:new DD(this,this._assets),A11:new RD(this,this._assets),B1:new FD(this,this._assets),B2:new GD(this,this._assets),B3:new jD(this,this._assets),B6:new $D(this,this._assets),B7:new HD(this,this._assets),B8:new VD(this,this._assets),B9:new WD(this,this._assets),B10:new UD(this,this._assets)}}}class KD extends Un.T{}class zD extends KD{constructor(k,B){super(k,"A0","MAP_SKYWATCH_LOWER_BEANOVATOR",1100,450,["skywatch-A1","shiverchill-B1"],B),this.battleBG="battle-skywatch-outside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1020,y:410,w:1,h:1,rect:!0},"skywatch-A1",650,360,null,LT.K.UP,!1,!1),this.addChest(k,B,"chest1",720,360,null,"A"),B.addClickableEvent(953,320,134,140,this.zone.elevator.bind(this.zone,B,[{x:1020,y:460},{x:1020,y:440}],{x:960,y:320},{target:"skywatch-A1",x:null,y:null}),null,0),this.addWizard(k,B,240,340,"wizard1",46,!1),this.addPippet(k,B,1,578,413)}}class YD extends KD{constructor(k,B){super(k,"A1","MAP_SKYWATCH_UPPER_BEANOVATOR",620,350,["skywatch-A0","skywatch-B1","skywatch-C1","skywatch-D1"],B.concat([q._.Zone_lamplight_json,q._.Npc_sprite_broccolina_json,q._.Npc_sprite_merchant_json,J.Q.Spine_npc_benni_json]))}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:50,y:50,r:120},"skywatch-B1",1140,560,null,LT.K.UP_LEFT,!1),this.addAreaEvent(k,B,{x:110,y:510,w:220,h:100,rect:!0},"skywatch-C1",1120,430,null,LT.K.LEFT,!1);const F=B.addConstructedQuestNPC(760,500,"benni",!1,YD.zoneComplete.bind(this,k)),G=B.content.addChild(K.q.instance.prodigy.create.sprite(1110,336,q._.Zone_skywatch_json,"cart-horizontal"));this.addAreaEvent(k,B,{x:1100,y:440,w:1,h:1},"skywatch-D1",0,0,null,LT.K.RIGHT,!1,!0),this.addAreaEvent(k,B,{x:653,y:187,w:1,h:1,rect:!0},"skywatch-A0",650,360,null,LT.K.DOWN,!1,!0),K.q.instance.prodigy.prefabFactory.addPrefabNPC(Ei.l.SkywatchMerchantNPC,430,360).catch(j.RQr.createHandler(`Unable to load the NPC Prefab: ${Ei.l.SkywatchMerchantNPC}`)),B.addClickableEvent(1115,400,80,80,this.zone.interactTrolley.bind(this.zone,B,[{x:1140,y:480},{x:1165,y:460}],{trolley:G,x:"+=200",y:"+=0",duration:3e3,target:"skywatch-D1",targetX:null,targetY:null}),null,0),B.addClickableEvent(593,200,134,140,this.zone.elevator.bind(this.zone,B,[{x:660,y:340},{x:660,y:320}],{x:600,y:200},{target:"skywatch-A0",x:1100,y:450}),null,0);const $=this.addConstructedNPC(k,B,440,500,q._.Npc_sprite_broccolina_json,F.process.bind(F,this.zone,null,!0),"NPC_NAME_BROCCOLINA",null);j.Aq$.isDefined($)&&($.flip(),$.nameText.GameObject.legacyTransform.x-=55),j.Aq$.isDefined(this.zone.getState("eugene_A1"))&&this.addConstructedNPC(k,B,685,390,q._.Npc_sprite_eugene_json,F.process.bind(F,this.zone,null,!0),"NPC_NAME_EUGENE",null),K.q.instance.prodigy.create.nicknamerPedestal(this.game,this.zone.ID,B.user,B.content,270,300)}static zoneComplete(k){const B=new Ti.rD(k);B.addEvents([{dialogueData:B.dataProvider.get(415),blockInput:!0},{dialogueData:B.dataProvider.get(414),blockInput:!0},{dialogueData:B.dataProvider.get(459),blockInput:!0}]),B.start()}}class QD extends KD{constructor(k,B){super(k,"B1","MAP_SKYWATCH_GARDENERS_HUT_EXTERIOR",1140,549,["skywatch-A1","skywatch-B2","skywatch-B3"],B),this.battleBG="battle-skywatch-outside",this.coord=[new j.I9Y(460,530),new j.I9Y(200,560)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1150,y:710,r:120},"skywatch-A1",120,190,null,LT.K.DOWN),this.addAreaEvent(k,B,{x:740,y:340,w:80,h:80,rect:!0},"skywatch-B2",640,510,null,LT.K.UP),this.addAreaEvent(k,B,{x:150,y:0,r:120},"skywatch-B3",1030,530,null,LT.K.UP),B.addClickableEvent(700,240,80,120,this.validPathTo.bind(this,k,B,740,370),null),this.addChest(k,B,"chest2",620,420,null,"A")}}class XD extends KD{constructor(k,B){super(k,"B2","MAP_SKYWATCH_GARDENERS_HUT_INNER",640,510,["skywatch-B1"],B.concat([q._.Npc_sprite_noot_json])),this.battleBG="battle-skywatch-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:660,y:550,w:130,h:70,rect:!0},"skywatch-B1",760,390,null,LT.K.DOWN)}}class ZD extends KD{constructor(k,B){super(k,"B3","MAP_SKYWATCH_GREAT_GRATERS",1030,530,["skywatch-B1"],B.concat([q._.Boss_skywatch_json])),this.battleBG="battle-skywatch-outside"}init(k,B,U,F){return j.Aq$.isDefined(this.zone.getState("plug-B3"))?this.plugOut():(this.plugIn(),this.createIceBlocks(k,F)),this.enableLayerID(2,j.Aq$.isDefined(this.zone.getState("vines-B3"))),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1035,y:650,w:230,h:100,rect:!0},"skywatch-B1",170,150,null,LT.K.DOWN)}plugIn(){this.enableLayerID(0,!1),this.enableLayerID(1,!0)}plugOut(){this.enableLayerID(1,!1),this.enableLayerID(0,!0)}createIceBlocks(k,B){const U=K.q.instance.prodigy.event.create();U.delay(Math.floor(3e3*Math.random())),U.function(this.createIceBlock.bind(this,k,B,0)),U.delay(Math.floor(3e3*Math.random())),U.function(this.createIceBlock.bind(this,k,B,1)),U.delay(Math.floor(3e3*Math.random())),U.function(this.createIceBlock.bind(this,k,B,2)),U.delay(Math.floor(3e3*Math.random())),U.function(this.createIceBlock.bind(this,k,B,3)),U.start()}createIceBlock(k,B,U){const F=[{x:575,y:430},{x:90,y:430},{x:575,y:550},{x:90,y:550}],G=[],$=K.q.instance.prodigy.event.create();$.delay(Math.floor(5e3*Math.random())+2e3),$.function(this.createIceBlock.bind(this,k,B,U)),$.start();const H=[{start:{x:483,y:105},path:[{x:483,y:320},{x:560,y:320}],end:{x:715,y:380},angle:"+=20"},{start:{x:322,y:105},path:[{x:322,y:320},{x:240,y:320}],end:{x:80,y:380},angle:"-=20"},{start:{x:483,y:740},path:[{x:483,y:440},{x:560,y:440}],end:{x:715,y:500},angle:"+=20"},{start:{x:322,y:740},path:[{x:322,y:440},{x:240,y:440}],end:{x:80,y:500},angle:"-=20"}][U],V=B.foreground.addChild(K.q.instance.prodigy.create.sprite(H.start.x,H.start.y,q._.Zone_skywatch_json,"ice-cube"));V.anchor.set(.5,1),V.alpha=0,G.push(k.add.tween(V,this).to({x:H.path[0].x,y:H.path[0].y},3e3,j.GS3.Linear.None,!0).to({x:H.path[1].x,y:H.path[1].y},1500,j.GS3.Linear.None,!0).to({x:H.end.x,y:H.end.y},3e3,j.GS3.Linear.None,!0)),G.push(k.add.tween(V.scale,this).to({x:.1,y:.1},3e3,j.GS3.Linear.None,!0,4900)),G.push(k.add.tween(V,this).to({alpha:1},250,j.GS3.Linear.None,!0)),G.push(k.add.tween(V,this).to({angle:H.angle},500,j.GS3.Linear.None,!0,4700)),G[1].onTweenComplete.add(this.makeSnow.bind(this,k,B,F[U].x,F[U].y)),G[1].onTweenComplete.add((()=>{V.destroy()}))}makeSnow(k,B,U,F){const G=B.background;if(!j.Aq$.isDefined(this.snows)){this.snows=[];for(let k=0;k<20;k++)this.snows[k]=G.addChild(K.q.instance.prodigy.create.sprite(U,F,q._.Font_general_json,"42-30"))}for(let j=0;j<20;j++)this.snows[j].x=U,this.snows[j].y=F,ZD.newFlake(k,this.snows[j],!0,U,F)}static newFlake(k,B,U,F,G){if(!j.Aq$.isDefined(k))return;let $=Math.floor(2e3*Math.random())+2e3;B.frameName=Math.random()<.5?"42-16":"42-30",B.x=F+Math.floor(140*Math.random()),U?$-=Math.floor($/K.q.instance.game.height*B.y):B.y=G,K.q.instance.prodigy.animation.translate(B,B.x,K.q.instance.game.height,$,null,null,!0)}cleanup(){for(let k=0;k<(j.Aq$.isDefined(this.snows)?this.snows.length:0);k++)this.snows[k].destroy();this.snows=null,super.cleanup()}}class JD extends KD{constructor(k,B){super(k,"C1","MAP_SKYWATCH_SCREWBALL_SHACK",1120,430,["skywatch-A1","skywatch-C2","skywatch-C3"],B.concat([q._.Zone_lamplight_json])),this.battleBG="battle-skywatch-outside",this.coord=[new j.I9Y(370,580),new j.I9Y(590,350)]}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1205,y:430,w:150,h:100,rect:!0},"skywatch-A1",240,610,null,LT.K.RIGHT),this.addAreaEvent(k,B,{x:205,y:620,w:100,h:200,rect:!0},"skywatch-C3",1080,210,null,LT.K.DOWN),this.addAreaEvent(k,B,{x:220,y:268,w:90,h:140,rect:!0},"skywatch-C2",625,520,null,LT.K.UP),B.addClickableEvent(180,190,80,120,this.validPathTo.bind(this,k,B,195,320),null)}}class tR extends KD{constructor(k,B){super(k,"C2","MAP_SKYWATCH_INNER_SCREWBALL_SHACK",625,520,["skywatch-C1"],B.concat([q._.Npc_sprite_noot_json])),this.battleBG="battle-skywatch-inside"}setup(k,B,U){this.addAreaEvent(k,B,{x:620,y:560,w:160,h:70,rect:!0},"skywatch-C1",200,360,null,LT.K.DOWN)}}class eR extends KD{constructor(k,B){super(k,"C3","MAP_SKYWATCH_CLOUDY_PASS",1160,210,["skywatch-C1","skywatch-C4"],B),this.battleBG="battle-skywatch-outside"}init(k,B,U,F){return this.enableLayerID(0,!1),this.enableLayerID(1,!0),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1080,y:100,w:100,h:200,rect:!0},"skywatch-C1",205,510,null,LT.K.UP),this.addAreaEvent(k,B,{x:120,y:100,w:100,h:200,rect:!0},"skywatch-C4",1160,540,null,LT.K.UP),this.addChest(k,B,"chest3",325,250,null,"A")}}class iR extends KD{constructor(k,B){super(k,"C4","MAP_SKYWATCH_SKY_SHOWER",1160,550,["skywatch-C3"],B.concat([q._.Npc_sprite_noot_json,q._.Npc_sprite_flora_json,q._.Boss_skywatch_json])),this.battleBG="battle-skywatch-outside"}init(k,B,U,F){return this.plugIn(!j.Aq$.isDefined(this.zone.getState("plug-C4"))),this.enableLayerID(2,j.Aq$.isDefined(this.zone.getState("vines-C4"))),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1150,y:660,w:100,h:200,rect:!0},"skywatch-C3",120,210,null,LT.K.DOWN)}canRegularMonsterSpawn(){return!this.zone.isOnSequence(2,3)&&!this.zone.isOnQuest(9)}plugIn(k){this.enableLayerID(0,!k),this.enableLayerID(1,k)}}class sR extends KD{constructor(k,B){super(k,"D1","MAP_SKYWATCH_FACTORY_ENTRANCE",189,549,["skywatch-A1","skywatch-D2","skywatch-E1"],B.concat(q._.Npc_sprite_noot_json)),this.trolley2=null,this.battleBG="battle-skywatch-outside",this.coord=[new j.I9Y(400,540),new j.I9Y(780,570)]}init(k,B,U,F){return this.enableLayerID(2,!j.Aq$.isDefined(this.zone.getState("vines-D1"))),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U);if(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("item",81)>0)this.addAreaEvent(k,B,{x:620,y:280,w:120,h:80,rect:!0},"skywatch-E1",1120,520,null,LT.K.UP),B.addClickableEvent(580,140,80,140,this.validPathTo.bind(this,k,B,680,290),null);else{const U=k=>{const B=K.q.instance.prodigy.event.create();B.popup(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SKYWATCH_REQUIRE_FACTORY_KEY")),B.start()};B.addClickableEvent(580,140,80,140,U.bind(this,k),null,null)}this.addAreaEvent(k,B,{x:190,y:420,w:1,h:1},"skywatch-A1",0,0,null,LT.K.LEFT,!1,!0),this.addAreaEvent(k,B,{x:1075,y:440,w:1,h:1},"skywatch-D2",0,0,null,LT.K.RIGHT,!1,!0);const F=B.content.addChild(K.q.instance.prodigy.create.sprite(75,296,q._.Zone_skywatch_json,"cart-horizontal"));this.trolley2=B.content.addChild(K.q.instance.prodigy.create.sprite(1075,296,q._.Zone_skywatch_json,"cart-horizontal")),this.trolley2.alpha=0,j.Aq$.isDefined(this.zone.getState("vines-D1"))&&(this.trolley2.alpha=1,B.addClickableEvent(1080,360,80,80,this.zone.interactTrolley.bind(this.zone,B,[{x:1130,y:450},{x:1120,y:420}],{trolley:this.trolley2,x:"+=200",y:"+=0",duration:3e3,target:"skywatch-D2",targetX:140,targetY:290}),null,0)),B.addClickableEvent(80,360,80,80,this.zone.interactTrolley.bind(this.zone,B,[{x:130,y:450},{x:120,y:420}],{trolley:F,x:"-=200",y:"+=0",duration:3e3,target:"skywatch-A1",targetX:1100,targetY:500}),null,0)}}class nR extends KD{constructor(k,B){super(k,"D2","MAP_SKYWATCH_BREEZY_PASS",140,290,["skywatch-D1","skywatch-D3"],B.concat([q._.Zone_lamplight_json])),this.trolley2=null,this.battleBG="battle-skywatch-outside",this.coord=[new j.I9Y(280,450),new j.I9Y(780,330)]}init(k,B,U,F){return this.enableLayerID(2,!j.Aq$.isDefined(this.zone.getState("vines-D2"))),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:210,y:182,w:1,h:1},"skywatch-D1",0,0,null,LT.K.LEFT,!1,!1),this.addAreaEvent(k,B,{x:1e3,y:575,w:1,h:1},"skywatch-D3",0,0,null,LT.K.LEFT,!1,!1);const F=B.content.addChild(K.q.instance.prodigy.create.sprite(100,96,q._.Zone_skywatch_json,"cart-horizontal"));this.trolley2=B.content.addChild(K.q.instance.prodigy.create.sprite(1e3,515,q._.Zone_skywatch_json,"cart-vertical")),this.trolley2.scale.x=-this.trolley2.scale.x,B.addClickableEvent(105,160,80,80,this.zone.interactTrolley.bind(this.zone,B,[{x:145,y:250},{x:155,y:220}],{trolley:F,x:"-=300",y:"+=0",duration:3e3,target:"skywatch-D1",targetX:1100,targetY:540}),null),j.Aq$.isDefined(this.zone.getState("vines-D2"))&&B.addClickableEvent(925,555,90,90,this.zone.interactTrolley.bind(this.zone,B,[{x:1040,y:600},{x:965,y:600}],{trolley:this.trolley2,x:"+=0",y:"+=300",duration:3e3,target:"skywatch-D3",targetX:300,targetY:250}),null),this.addChest(k,B,"chest4",640,200,null,"A")}}class aR extends KD{constructor(k,B){super(k,"D3","MAP_SKYWATCH_WIND_TUNNEL",270,250,["skywatch-D2"],B.concat([q._.Zone_lamplight_json,q._.Boss_skywatch_json])),this.battleBG="battle-skywatch-outside"}init(k,B,U,F){return this.enableLayerID(2,j.Aq$.isDefined(this.zone.getState("vines-D3"))),j.Aq$.isDefined(this.zone.getState("plug-D3"))?this.unplug(k):this.plugIn(k),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:260,y:240,w:1,h:1},"skywatch-D2",0,0,null,LT.K.LEFT,!1,!0);const F=B.content.addChild(K.q.instance.prodigy.create.sprite(240,175,q._.Zone_skywatch_json,"cart-vertical"));F.scale.x=-F.scale.x,B.addClickableEvent(160,210,100,100,this.zone.interactTrolley.bind(this.zone,B,[{x:265,y:280},{x:200,y:270}],{trolley:F,x:"+=0",y:"-=300",duration:3e3,target:"skywatch-D2",targetX:1020,targetY:580}),null)}displayStationaryFanribbons(k,B){this.enableLayerID(2,!1),this.toggleDynamicLayer(k,2,!1,0)}plugIn(k){this.enableLayerID(0,!1),this.toggleDynamicLayer(k,0,!1,0),this.enableLayerID(1,!0),this.toggleDynamicLayer(k,1,!0,0)}unplug(k){this.enableLayerID(1,!1),this.toggleDynamicLayer(k,1,!1,0),this.enableLayerID(0,!0),this.toggleDynamicLayer(k,0,!0,0)}}class rR extends KD{constructor(k,B){super(k,"E1","MAP_SKYWATCH_FACTORY_MAIN_HALL",1120,520,["skywatch-D1","skywatch-E2","skywatch-E3"],B),this.battleBG="battle-skywatch-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1100,y:this.game.height-60,w:210,h:120,rect:!0},"skywatch-D1",550,290,null,LT.K.DOWN,!1),this.addAreaEvent(k,B,{x:160,y:0,r:120},"skywatch-E3",1060,530,null,LT.K.UP,!1),this.addAreaEvent(k,B,{x:1102,y:320,w:100,h:80,rect:!0},"skywatch-E2",230,530,null,LT.K.UP,!1),B.addClickableEvent(1060,200,80,120,this.validPathTo.bind(this,k,B,1120,350),null)}}class oR extends KD{constructor(k,B){super(k,"E2","MAP_SKYWATCH_OLD_MANS_ROOM",230,530,["skywatch-E1"],B.concat([q._.Npc_sprite_eugene_json])),this.battleBG="battle-skywatch-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:200,y:this.game.height-60,w:210,h:120,rect:!0},"skywatch-E1",1120,370,null,LT.K.DOWN,!1),this.addWizard(k,B,965,530,"wizard2",47,!0)}}class hR extends KD{constructor(k,B){super(k,"E3","MAP_SKYWATCH_BLAST_DOORS",1060,530,["skywatch-E1","skywatch-E4"],B),this.battleBG="battle-skywatch-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1120,y:this.game.height-60,w:240,h:120,rect:!0},"skywatch-E1",160,160,null,LT.K.DOWN,!1);if(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("item",83)>0)this.addAreaEvent(k,B,{x:620,y:360,w:120,h:80,rect:!0},"skywatch-E4",640,380,null,LT.K.UP,!1),B.addClickableEvent(560,240,120,160,this.validPathTo.bind(this,k,B,620,390),null);else{const U=k=>{const B=K.q.instance.prodigy.event.create();B.popup(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("SKYWATCH_REQUIRE_MASTER_KEY")),B.start()};B.addClickableEvent(520,200,160,120,U.bind(this,k),null)}this.addChest(k,B,"chest5",950,325,null,"A")}}class cR extends KD{constructor(k,B){super(k,"E4","MAP_SKYWATCH_END_CHAMBER",640,380,["skywatch-E3","skywatch-E5"],B.concat([q._.Boss_skywatch_json])),this.battleBG="battle-skywatch-inside"}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:640,y:550,w:160,h:100,rect:!0},"skywatch-E3",600,480,null,LT.K.DOWN,!1),this.addAreaEvent(k,B,{x:340,y:340,w:80,h:40,rect:!0},"skywatch-E5",1024,515,null,LT.K.UP,!1),B.addClickableEvent(300,200,80,120,this.validPathTo.bind(this,k,B,360,340),null)}}class dR extends KD{constructor(k,B){super(k,"E5","MAP_SKYWATCH_OUTSKIRTS",1024,515,["skywatch-E4"],B),this.insideTrigger=!1,this.lastFrameInsideTrigger=!1,this.user=null,this.battleBG="battle-skywatch-outside"}init(k,B,U,F){return this.enableLayerID(3,!1),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:1010,y:this.game.height-60,w:260,h:120,rect:!0},"skywatch-E4",360,380,null,LT.K.DOWN,!1),this.user=B.user}update(k){j.Aq$.isDefined(this.user)&&(this.insideTrigger=j.cj9.distance(this.user.x,this.user.y,430,490)<=100,this.insideTrigger!==this.lastFrameInsideTrigger&&this.toggleDynamicLayer(k,3,this.insideTrigger,500),this.lastFrameInsideTrigger=this.insideTrigger),super.update(k)}}class lR extends Pn.T{constructor(k,B,U){super(k,B,1,"",{type:"pet",ID:72,N:3},["skywatch-B2"],[416,417,418,419,420,421],[],[414,422],U,null,"QUESTS_SKYWATCH_TRIM_VINES")}setup(k,B,U){if(super.setup(k,B,U),"B2"===U.tag){const F={randDir:!0,encounter:[{ID:72}],difficulty:1,maxTeamSize:1,isQuestEncounter:!0};return U.addMonster(k,B,0,400,400,!0,F,!1),U.addMonster(k,B,1,810,360,!0,F,!1),U.addMonster(k,B,2,920,415,!0,F,!1),{enableMonsters:!1}}return null}}class uR extends Pn.T{constructor(k,B,U){super(k,B,10,"QUESTS_SKYWATCH_TRIM_VINES",{type:"seq",N:1},["skywatch-D3"],[444],[],[415,460],U)}setup(k,B,U){return super.setup(k,B,U),"skywatch-D3"===U.zoneName?{enableMonsters:!1}:null}start(k,B,U){if(super.start(k,B,U),this.zone.isOnSequence(10,0)&&"skywatch-D3"===U.zoneName){const k=K.q.instance.prodigy.create.element(B.foreground,740,140);k.highlight(!0);const F=()=>{const F=B.content.addChild(K.q.instance.prodigy.create.sprite(850,-100,q._.Boss_skywatch_json,"ice_cloud",new j.I9Y(.5,1))),G=B.foreground.addChild(K.q.instance.prodigy.create.sprite(840,-150,q._.Boss_skywatch_json,"med_face_0",new j.I9Y(.5,1))),$=()=>{const k=B.user.x,F=B.user.y,G=()=>{this.zone.completeSequence(10,0),this.zone.setState("plug-D3",null),this.zone.setState("vines-D3",null),K.q.instance.prodigy.world.it("skywatch-D3",k,F)};K.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle";const $=K.q.instance.prodigy.event.create();$.enableInput(!1),$.delay(2e3),$.enableInput(!0);const H=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),V=H.getValue("frostyStormMaxHP",Vt.s.get("GameConstants.FrostyStorm.MAX_HP")),W=null===V?void 0:parseInt(V,10);$.function(this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_CLOUD_FIGHT"),{boss:{ID:51,element:"ice",attacks:[62],name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_FROSTY_STORM"),tag:hn.A_.SKYWATCH,maxHP:W},difficulty:parseInt(H.getValue("frostyStormDifficulty",Vt.s.get("GameConstants.FrostyStorm.DIFFICULTY")),10),starMod:2,screen:"battle-skywatch-outside"},(()=>{G()}))),$.start()},H=K.q.instance.prodigy.event.create();H.validPath(B.user,B.path,580,270),H.enableInput(!1),H.fire(655,45,290,290,2,!1,!0),H.function(k.highlight.bind(k,!1)),H.function(this.zone.shrinkVines.bind(this.zone,U)),H.delay(3e3),H.sound(17,"wind"),H.function((()=>{const k=K.q.instance.prodigy.animation.translate(F,850,200,2e3,0,null,!0);K.q.instance.prodigy.animation.translate(G,840,150,2e3,0,null,!0),k.onTweenComplete.add((()=>{this.zone.changePosition(F,G),$()}))}).bind(this)),H.start()};B.addClickableEvent(630,30,250,250,F.bind(this),null,0)}return null}}class fR extends Pn.T{constructor(k,B,U){super(k,B,11,"QUESTS_SKYWATCH_FIND_EUGENE",{type:"seq",N:2},["skywatch-E2"],[445,446,447],[],[415],U)}setup(k,B,U){super.setup(k,B,U);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return"skywatch-E2"===U.zoneName?(U.addConstructedNPC(k,B,710,415,q._.Npc_sprite_eugene_json,null,"NPC_NAME_EUGENE"),this.zone.isOnSequence(11,0)?(F.playerContainer.visible=!0,this.monstersAmbushEugene(k,B,U)):this.zone.isOnSequence(11,1)&&this.rescuedEugene(k,B),{enableMonsters:!1}):null}monstersAmbushEugene(k,B,U){const F=K.q.instance.prodigy.event.create();U.addMonster(k,B,1,380,380,!1,{encounter:[{ID:115}],difficulty:1}),U.addMonster(k,B,3,520,515,!1,{encounter:[{ID:115}],difficulty:1});U.addMonster(k,B,2,900,380,!1,{encounter:[{ID:115}],difficulty:1}).flip(),F.enableInput(!1),F.delay(500),F.enableInput(!0),F.text(0,"eugene"),F.text(),F.text(100,"noot"),F.enableInput(!1),F.set(B.user,"evtProc",!0),F.function(B.user.chat.bind(B.user,1,80)),F.enableInput(!1),F.delay(1e3),F.enableInput(!1),F.path(B.user,[{x:635,y:560}]),F.path(B.user,[{x:640,y:420}]),F.delay(500),F.enableInput(!0),F.function((()=>{K.q.instance.prodigy.battle.battleStats.type="QuestBattle"})),F.function(this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_SAVE_EUGENE"),{pets:[{ID:115},{ID:115},{ID:115},{ID:115}]},(()=>{this.zone.completeSequence(11,0),K.q.instance.prodigy.world.it("skywatch-E2",640,420)}))),F.start()}rescuedEugene(k,B){const U=K.q.instance.prodigy.event.create();U.text(1,"eugene"),U.text(2,"eugene"),U.text(3,"eugene"),U.text(4,"eugene"),U.text(5,"eugene"),U.text(6,"eugene"),U.function(this.zone.completeSequence.bind(this.zone,11,1)),U.function(B.process.bind(B)),U.start()}}class bR extends Pn.T{constructor(k,B,U){super(k,B,12,"",{type:"item",ID:82,N:2},["skywatch-C3","skywatch-D3"],[448,449,450],[],[414],U,null,"QUESTS_SKYWATCH_FIND_KEY"),this.collectionMaps={C3:[1],D3:[2]}}setup(k,B,U){super.setup(k,B,U);const F=U.getTag();if("C3"===F)B.addCollect(1,260,450,{type:"item",ID:82});else if("D3"===F)return B.addCollect(2,640,350,{type:"item",ID:82}),{enableMonsters:!1};return null}}class pR extends Pn.T{constructor(k,B,U){super(k,B,13,"QUESTS_SKYWATCH_DEFEAT_BOSS",{type:"seq",N:1},["skywatch-E4"],[451,452],[],[453,454,455],U)}setup(k,B,U){if(super.setup(k,B,U),this.zone.isOnSequence(13,0)&&"skywatch-E4"===U.zoneName){const k=B.content.addChild(K.q.instance.prodigy.create.sprite(1045,-100,q._.Boss_skywatch_json,"main_cloud",new j.I9Y(.5,1))),F=B.foreground.addChild(K.q.instance.prodigy.create.sprite(1035,-150,q._.Boss_skywatch_json,"main_eyes_1",new j.I9Y(.5,1)));K.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle";const G=K.q.instance.prodigy.event.create();G.enableInput(!1),G.validPath(B.user,B.path,399,400),G.validPath(B.user,B.path,400,400),G.sound(17,"wind"),G.function((()=>{const B=K.q.instance.prodigy.animation.translate(k,800,400,2e3,0,null,!0);K.q.instance.prodigy.animation.translate(F,790,350,2e3,0,null,!0),B.onTweenComplete.add((()=>{this.zone.changePosition(k,F)}))})),G.delay(5e3),G.enableInput(!0);const $=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),H=$.getValue("stormyStormMaxHP",Vt.s.get("GameConstants.StormyStorm.MAX_HP")),V=null===H?void 0:parseInt(H,10);G.function(this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_CLOUD_FIGHT"),{boss:{ID:12,element:"storm",attacks:[76,77,79],name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_STORMY_STORM"),tag:hn.A_.SKYWATCH,maxHP:V},difficulty:parseInt($.getValue("stormyStormDifficulty",Vt.s.get("GameConstants.StormyStorm.DIFFICULTY")),10),starMod:5,drops:[{type:"weapon",ID:23}]},(()=>{this.zone.completeSequence(13,0),this.zone.setState("eugene_A1",1),K.q.instance.prodigy.world.it("skywatch-E4")}))),G.start()}return null}}class vR extends Pn.T{constructor(k,B,U){super(k,B,2,"QUESTS_SKYWATCH_GET_DEVICE",{type:"item",ID:93,N:1},["skywatch-C2"],[423,424,425,426],[],[415],U),this.thief=null}start(k,B,U){super.start(k,B,U);const F=U.getTag();if("C2"===F&&this.zone.isOnSequence(2,0))this.thiefStealsTheWeatherometre(k,B,U);else if("C1"===F&&this.zone.isOnSequence(2,1))this.thiefFlees(k,B,U,115,560,115,850,"skywatch-C3",1);else if("C3"===F&&this.zone.isOnSequence(2,2))this.thiefFlees(k,B,U,120,210,120,-20,"skywatch-C4",2);else if("C4"===F&&this.zone.isOnSequence(2,3))return this.thiefFailsEscape(k,B,U),{enableMonsters:!1};return null}setup(k,B,U){super.setup(k,B,U);return"A1"===U.getTag()&&this.zone.isOnSequence(2,4)?{hiddenNPCs:[q._.Npc_sprite_broccolina_json]}:{}}process(k,B,U){this.zone.isOnSequence(2,0)?this.area=["skywatch-C2"]:this.zone.isOnSequence(2,1)?this.area=["skywatch-C1"]:this.zone.isOnSequence(2,2)?this.area=["skywatch-C3"]:this.zone.isOnSequence(2,3)&&(this.area=["skywatch-C4"])}thiefStealsTheWeatherometre(k,B,U){this.thief=U.addMonster(k,B,0,688,335,!1,{randDir:!1,encounter:[{ID:84}],difficulty:2,maxTeamSize:1},!0),this.thief.visible=!0;const F=B.content.addChild(K.q.instance.prodigy.icon.createIcon(695,275,Ut.E.getIconForType("item",93))),G=B.addNPC(600,550,q._.Npc_sprite_noot_json);G.visible=!1,G.float(!0);const j=K.q.instance.prodigy.event.create();j.enableInput(!1),j.set(G,"visible",!0),j.hop(G,300,-55,50),j.enableInput(!0),j.function(this.thief.chat.bind(this.thief,1,100)),j.delay(1500),j.set(F,"visible",!1),j.enableInput(!1),j.delay(500),j.path(this.thief,[{x:800,y:230}],1),j.function((()=>{this.zone.states.windowBroken=!0})),j.set(this.thief,"visible",!1),j.enableInput(!0),j.function(G.chat.bind(G,1,100)),j.text(95,"noot"),j.enableInput(!1),j.hop(G,300,55,50),j.set(G,"visible",!1),j.enableInput(!0),j.set(this,"area",["skywatch-C1"]),j.function(this.zone.completeSequence.bind(this.zone,2,0)),j.function(B.process.bind(B)),j.set(this.thief,"visible",!1),j.start()}thiefFlees(k,B,U,F,G,j,$,H,V){this.thief=U.addMonster(k,B,0,F,G,!1,{randDir:!1,encounter:[{ID:84}],difficulty:2,maxTeamSize:1},!0),this.thief.visible=!0;const W=K.q.instance.prodigy.event.create();W.enableInput(!1),W.set(B.user,"evtProc",!0),W.path(this.thief,[{x:j,y:$}],1,!1),W.set(this.thief,"visible",!1),W.set(B.user,"evtProc",!1),W.enableInput(!0),W.set(this,"area",[H]),W.function(this.zone.completeSequence.bind(this.zone,2,V)),W.function(B.process.bind(B)),W.start()}thiefFailsEscape(k,B,U){this.thief=U.addMonster(k,B,0,850,500,!1,{randDir:!1,encounter:[{ID:84}],difficulty:2,maxTeamSize:1},!0),this.thief.visible=!1;const F=B.addNPC(959,500,q._.Npc_sprite_noot_json);F.flip(),F.visible=!1,F.float(!0);const G=K.q.instance.prodigy.event.create();G.validPath(B.user,B.path,1159,550),G.set(B.user,"evtProc",!0),G.enableInput(!1),G.set(this.thief,"visible",!0),G.path(this.thief,[{x:700,y:500}],1,!0),G.path(B.user,[{x:1e3,y:520}],1.2),G.set(F,"visible",!0),G.hop(F,300,-55,50),G.enableInput(!0),G.text(96,"noot"),G.enableInput(!1),G.delay(500),G.enableInput(!0),G.function(this.thiefBattle.bind(this,k)),G.start()}thiefBattle(k){K.q.instance.prodigy.battle.start({intro:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_WEATHER_METER"),screen:"battle-skywatch-outside",pets:[{ID:84,nickname:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_THIEF")}],drops:[{type:"item",ID:87}]},null,(()=>{this.thiefDefeated(k)}),null,this.zone.defaultOnFaint)}thiefDefeated(k){const B={type:"item",ID:87,N:1};this.zone.setState("quest",{ID:2,req:B,seq:4,state:{}}),this.req=B,this.zone.completeSequence(2,3),K.q.instance.prodigy.world.it("skywatch-C4",1160,540)}}class gR extends Pn.T{constructor(k,B,U){super(k,B,3,"QUESTS_SKYWATCH_FIND_BROCCOLINA",{type:"seq",N:2},["skywatch-B2"],[427,428,429],[],[415],U)}setup(k,B,U){super.setup(k,B,U);const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=U.getTag();if("B2"===G&&this.zone.isOnSequence(3,0))this.nootFindsTheNote(k,B,U);else if("A0"===G&&this.zone.isOnSequence(3,1))F.playerContainer.visible=!0,this.foundBroccolina(k,B,U);else if("A1"===G&&!this.zone.isQuestComplete(3))return{hiddenNPCs:[q._.Npc_sprite_broccolina_json]};return{}}process(k,B,U){this.zone.isOnSequence(3,0)?this.area=["skywatch-B2"]:this.zone.isOnSequence(3,1)&&(this.area=["skywatch-A0"])}nootFindsTheNote(k,B,U){const F=B.addNPC(640,535,q._.Npc_sprite_noot_json);F.visible=!1,F.float(!0);const G=K.q.instance.prodigy.event.create();G.enableInput(!1),G.set(F,"visible",!0),G.hop(F,300,-55,50),G.enableInput(!1),G.path(F,[{x:540,y:365}]),G.enableInput(!0),G.text(97,"noot"),G.enableInput(!1),G.path(F,[{x:585,y:535}]),G.hop(F,300,55,50),G.set(F,"visible",!1),G.set(this.zone.quests[3],"area",["skywatch-A0"]),G.function(this.zone.completeSequence.bind(this.zone,3,0)),G.function(B.process.bind(B)),G.enableInput(!0),G.start()}foundBroccolina(k,B,U){U.addConstructedNPC(k,B,440,500,q._.Npc_sprite_broccolina_json,null,"NPC_NAME_BROCCOLINA").nameText.GameObject.legacyTransform.x+=60;const F=K.q.instance.prodigy.event.create();F.text(0,"broccolina"),F.function(this.zone.completeSequence.bind(this.zone,3,1)),F.function(B.process.bind(B)),F.start()}}class mR extends Pn.T{constructor(k,B,U){super(k,B,4,"QUESTS_SKYWATCH_TRIM_VINES",{type:"seq",N:3},["skywatch-D1"],[430,431,432],[],[415,460],U),this.eyes=null,this.boss=null,this.element=null}setup(k,B,U){return"skywatch-D3"===U.zoneName&&(k.input.enabled=!1),super.setup(k,B,U)}start(k,B,U){return super.start(k,B,U),this.zone.isOnSequence(4,2)&&"skywatch-D3"===U.zoneName?this.cutsceneD3(k,B,U):this.zone.isOnSequence(4,1)&&"skywatch-D2"===U.zoneName?this.highlightD2(k,B,U):this.zone.isOnSequence(4,0)&&"skywatch-D1"===U.zoneName&&this.highlightD1(k,B,U),{}}process(k,B,U){this.zone.isOnSequence(4,0)?this.area=["skywatch-D1"]:this.zone.isOnSequence(4,1)?this.area=["skywatch-D2"]:this.zone.isOnSequence(4,2)&&(this.area=["skywatch-D3"])}cutsceneD3(k,B,U){this.boss=B.content.addChild(K.q.instance.prodigy.create.sprite(850,-100,q._.Boss_skywatch_json,"ice_cloud",new j.I9Y(.5,1))),this.eyes=B.foreground.addChild(K.q.instance.prodigy.create.sprite(840,-150,q._.Boss_skywatch_json,"med_face_0",new j.I9Y(.5,1)));const F=K.q.instance.prodigy.event.create();F.set(this,"descKey","QUESTS_SKYWATCH_INSPECT_MACHINE"),F.enableInput(!1),F.sound(17,"wind"),F.delay(2e3),F.function(this.bossEnter.bind(this,k)),F.delay(600),F.text(98,"noot"),F.sound(17,"wind"),F.function(this.zone.setState.bind(this.zone,"vines-D3",1)),F.function(this.zone.setState.bind(this.zone,"vines-B3",1)),F.function(this.zone.setState.bind(this.zone,"vines-C4",1)),F.function(this.zone.setState.bind(this.zone,"plug-D3",1)),F.function(this.zone.setState.bind(this.zone,"plug-B3",1)),F.function(this.zone.setState.bind(this.zone,"plug-C4",1)),F.function(this.bossExit.bind(this,k,B,U)),F.explode(670,60,200,200,3,!0),F.delay(2e3),F.function(this.zone.createVines.bind(this.zone,U)),F.delay(600),F.enableInput(!0),F.text(99,"noot"),F.function(this.zone.completeSequence.bind(this.zone,4,2)),F.function(B.process.bind(B)),F.start()}bossEnter(k){k.add.tween(this.boss,this).to({x:850,y:200},2e3,j.GS3.Linear.None).to({y:"-=20"},1400,j.GS3.Quadratic.InOut).to({y:"+=20"},1400,j.GS3.Quadratic.InOut).start(),k.add.tween(this.eyes,this).to({x:840,y:150},2e3,j.GS3.Linear.None).to({y:"-=20"},1400,j.GS3.Quadratic.InOut).to({y:"+=20"},1400,j.GS3.Quadratic.InOut).start()}bossExit(k,B,U){U.unplug(k),U.displayStationaryFanribbons(k,B);const F=k.add.tween(this.boss,this).to({x:950,y:-200},1400,j.GS3.Linear.None).start();k.add.tween(this.eyes,this).to({x:940,y:-250},1400,j.GS3.Linear.None).start(),F.onTweenComplete.add(this.hideBoss.bind(this))}hideBoss(){this.boss.visible=!1,this.eyes.visible=!1}clearVinesD2(k,B,U){if(this.zone.isOnSequence(4,1)){const k=K.q.instance.prodigy.event.create();k.validPath(B.user,B.path,1150,550),k.fire(990,415,200,300,2,!0,!0),k.function(this.zone.shrinkVines.bind(this.zone,U)),k.function(this.element.highlight.bind(this.element,!1)),k.function(this.zone.completeSequence.bind(this.zone,4,1)),k.function(this.zone.setState.bind(this.zone,"vines-D2","off")),k.set(this.zone.quests[4],"area",["skywatch-D3"]),k.enableInput(!0),k.function(B.addClickableEvent.bind(B,925,555,90,90,this.zone.interactTrolley.bind(this.zone,B,[{x:1040,y:600},{x:965,y:600}],{trolley:U.trolley2,x:"+=0",y:"+=300",duration:3e3,target:"skywatch-D3",targetX:300,targetY:250}))),k.function(B.process.bind(B)),k.start()}}highlightD2(k,B,U){j.Aq$.isDefined(this.zone.getState("vines-D2"))||(this.element=K.q.instance.prodigy.create.element(B.foreground,1020,500),this.element.highlight(!0),B.addClickableEvent(1e3,410,100,260,this.clearVinesD2.bind(this,k,B,U),null))}clearVinesD1(k,B,U){if(this.zone.isOnSequence(4,0)){const F=K.q.instance.prodigy.event.create();F.validPath(B.user,B.path,915,440),F.enableInput(!1),F.fire(960,330,230,185,2,!0,!0),F.function(this.enableD1Trolley2.bind(this,k,U)),F.function(this.element.highlight.bind(this.element,!1)),F.function(this.zone.completeSequence.bind(this.zone,4,0)),F.function(this.zone.setState.bind(this.zone,"plug-B3","off")),F.function(this.zone.setState.bind(this.zone,"plug-C4","off")),F.function(this.zone.setState.bind(this.zone,"vines-D1","off")),F.set(this.zone.quests[4],"area",["skywatch-D2"]),F.function(B.addClickableEvent.bind(B,1080,360,80,80,this.zone.interactTrolley.bind(this.zone,B,[{x:1130,y:450},{x:1120,y:420}],{trolley:U.trolley2,x:"+=200",y:"+=0",duration:3e3,target:"skywatch-D2",targetX:140,targetY:290}),null,0)),F.function(B.process.bind(B)),F.enableInput(!0),F.start()}}enableD1Trolley2(k,B){this.zone.shrinkVines(B),k.add.tween(B.trolley2,this).to({alpha:1},3e3,j.GS3.Linear.None).start()}highlightD1(k,B,U){this.element=K.q.instance.prodigy.create.element(B.foreground,1020,390),this.element.highlight(!0),B.addClickableEvent(950,320,260,190,this.clearVinesD1.bind(this,k,B,U),null,0)}}class yR extends Pn.T{constructor(k,B,U){super(k,B,5,"",{type:"item",ID:56,N:3},["skywatch-B3","skywatch-C3","skywatch-D2"],[433,434,435,436],[],[415],U,null,"QUESTS_SKYWATCH_FIND_FACTORY_KEY"),this.collectionMaps={B3:[0],C3:[1],D2:[2]}}setup(k,B,U){super.setup(k,B,U);const F=U.getTag();return"B3"===F?B.addCollect(0,900,380,{type:"item",ID:56}):"C3"===F?B.addCollect(1,260,450,{type:"item",ID:56}):"D2"===F&&B.addCollect(2,1150,530,{type:"item",ID:56}),null}}class _R extends Pn.T{constructor(k,B,U){super(k,B,6,"QUESTS_SKYWATCH_GET_KEY",{type:"seq",N:1},["skywatch-D1"],[437,438],[],[415],U),this.ambusher1=null,this.ambusher2=null,this.ambusher3=null}setup(k,B,U){if(super.setup(k,B,U),"D1"===U.getTag()&&this.zone.isOnSequence(6,0)){const F={randDir:!1,encounter:[{ID:120}],difficulty:1,maxTeamSize:1};this.ambusher1=U.addMonster(k,B,0,560,-50,!1,F,!0),this.ambusher2=U.addMonster(k,B,4,500,-50,!1,F,!0),this.ambusher3=U.addMonster(k,B,2,830,-50,!1,F,!0),this.ambusher1.visible=!1,this.ambusher2.visible=!1,this.ambusher3.visible=!1;K.q.instance.prodigy.create.element(B.content,700,190).highlight(!0),B.addClickableEvent(700,190,80,80,this.ambush.bind(this,k,B,U),null,0)}return null}ambush(k,B,U){const F=this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_DEFEAT_AMBUSHERS"),{pets:[{ID:120},{ID:120},{ID:120}],screen:"battle-skywatch-outside"},(()=>{this.zone.completeSequence(6,0),K.q.instance.prodigy.world.it("skywatch-D1",640,360)})),G=K.q.instance.prodigy.event.create();G.validPath(B.user,B.path,740,350),G.reward([{type:"item",ID:81}]),G.enableInput(!1),G.set(B.user,"evtProc",!0),G.function(this.zone.hideFollow.bind(this.zone,B)),G.set(this.ambusher1,"visible",!0),G.set(this.ambusher2,"visible",!0),G.set(this.ambusher3,"visible",!0),G.path(this.ambusher1,[{x:640,y:350}],1,!0),G.path(this.ambusher2,[{x:690,y:390}],1,!0),G.path(this.ambusher3,[{x:800,y:390}],1),G.delay(1e3),G.enableInput(!0),G.function((()=>{K.q.instance.prodigy.battle.battleStats.type="QuestBattle"})),G.function(F),G.start()}}class ER extends Pn.T{constructor(k,B,U){super(k,B.concat(X.V.Bgm_puppetmaster),6,"QUESTS_SKYWATCH_GET_KEY",{type:"seq",N:1},["skywatch-D1"],[437,438],[],[415],U),this.ambusher1=null,this.ambusher2=null,this.ambusher3=null}setup(k,B,U){if(super.setup(k,B,U),"D1"===U.getTag()&&this.zone.isOnSequence(6,0)){if(!U.zone.getState(Zu.PIPPET_DEFEATED)&&(k.input.enabled=!1,K.q.instance.prodigy.prefabFactory.createPippetQuestEncounter(U.zone,206,bS.e.Skywatch_quests_encounter).catch(j.RQr.createHandler(`Could not load the Pippet Encounter from guid: ${bS.e.Skywatch_quests_encounter}`)),!U.zone.getState(Zu.PIPPET_REMATCH)))return{enableMonsters:!1};const F={randDir:!1,encounter:[{ID:120}],difficulty:1,maxTeamSize:1};this.ambusher1=U.addMonster(k,B,0,560,-50,!1,F,!0),this.ambusher2=U.addMonster(k,B,4,500,-50,!1,F,!0),this.ambusher3=U.addMonster(k,B,2,830,-50,!1,F,!0),this.ambusher1.visible=!1,this.ambusher2.visible=!1,this.ambusher3.visible=!1;K.q.instance.prodigy.create.element(B.content,700,190).highlight(!0),B.addClickableEvent(700,190,80,80,this.ambush.bind(this,k,B,U),null,0)}return null}ambush(k,B,U){const F=this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_DEFEAT_AMBUSHERS"),{pets:[{ID:120},{ID:120},{ID:120}],screen:"battle-skywatch-outside"},(()=>{this.zone.completeSequence(6,0),K.q.instance.prodigy.world.it("skywatch-D1",640,360)})),G=K.q.instance.prodigy.event.create();G.validPath(B.user,B.path,740,350),G.reward([{type:"item",ID:81}]),G.enableInput(!1),G.set(B.user,"evtProc",!0),G.function(this.zone.hideFollow.bind(this.zone,B)),G.set(this.ambusher1,"visible",!0),G.set(this.ambusher2,"visible",!0),G.set(this.ambusher3,"visible",!0),G.path(this.ambusher1,[{x:640,y:350}],1,!0),G.path(this.ambusher2,[{x:690,y:390}],1,!0),G.path(this.ambusher3,[{x:800,y:390}],1),G.delay(1e3),G.enableInput(!0),G.function((()=>{K.q.instance.prodigy.battle.battleStats.type="QuestBattle"})),G.function(F),G.start()}}class wR extends Pn.T{constructor(k,B,U){super(k,B,7,"",{type:"item",ID:49,N:5},["skywatch-E1","skywatch-E3"],[439],[],[415],U,null,"QUESTS_SKYWATCH_UPGRADE_VINECINERATOR")}setup(k,B,U){super.setup(k,B,U),this.updateQuestArea();const F={randDir:!0,encounter:[{ID:120}],drops:[{type:"item",ID:49,N:1}],difficulty:3,maxTeamSize:1,unique:!0,isQuestEncounter:!0,showGuideHand:!0},G=U.getTag();return"E1"===G?(this.zone.isQuestComplete(7)||(K.q.instance.prodigy.prefabFactory.addMonster(U,942,400,0,F).catch(j.RQr.createHandler("Could not add Aracute 0 for Skywatch Q7")),K.q.instance.prodigy.prefabFactory.addMonster(U,400,400,1,F).catch(j.RQr.createHandler("Could not add Aracute 1 for Skywatch Q7"))),{enableMonsters:!1}):"E3"===G?(this.zone.isQuestComplete(7)||(K.q.instance.prodigy.prefabFactory.addMonster(U,725,480,2,F).catch(j.RQr.createHandler("Could not add Aracute 2 for Skywatch Q7")),K.q.instance.prodigy.prefabFactory.addMonster(U,300,280,3,F).catch(j.RQr.createHandler("Could not add Aracute 3 for Skywatch Q7")),K.q.instance.prodigy.prefabFactory.addMonster(U,290,520,4,F).catch(j.RQr.createHandler("Could not add Aracute 4 for Skywatch Q7"))),{enableMonsters:!1}):{}}updateQuestArea(){const k=[],B=this.zone.getQuestState();j.Aq$.isDefined(B.state)&&(B.state[1]&&B.state[2]||k.push("skywatch-E1"),B.state[2]&&B.state[3]&&B.state[4]||k.push("skywatch-E3"),this.area=k)}}class TR extends Pn.T{constructor(k,B,U){super(k,B,8,"QUESTS_SKYWATCH_TRIM_VINES",{type:"seq",N:1},["skywatch-B3"],[440,441,442],[],[415],U)}setup(k,B,U){if(super.setup(k,B,U),this.zone.isOnSequence(8,0)&&"skywatch-B3"===U.zoneName){const k=K.q.instance.prodigy.create.element(B.foreground,1020,140);k.highlight(!0),B.addClickableEvent(920,20,290,260,(()=>{const F=B.content.addChild(K.q.instance.prodigy.create.sprite(1045,-100,q._.Boss_skywatch_json,"water_cloud",new j.I9Y(.5,1))),G=B.foreground.addChild(K.q.instance.prodigy.create.sprite(1035,-150,q._.Boss_skywatch_json,"med_face_1",new j.I9Y(.5,1))),$=K.q.instance.prodigy.event.create();$.validPath(B.user,B.path,860,270),$.validPath(B.user,B.path,861,270),$.enableInput(!1),$.fire(935,45,290,290,2,!1,!0),$.function(k.highlight.bind(k,!1)),$.function(this.zone.shrinkVines.bind(this.zone,U)),$.delay(3e3),$.sound(17,"wind"),$.function((()=>{const k=K.q.instance.prodigy.animation.translate(F,1045,200,2e3,null,null,!0);K.q.instance.prodigy.animation.translate(G,1035,150,2e3,null,null,!0),k.onTweenComplete.add(this.zone.changePosition.bind(this.zone,F,G)),k.onTweenComplete.add((()=>{K.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle";const k=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),F=k.getValue("rainyStormMaxHP",Vt.s.get("GameConstants.RainyStorm.MAX_HP")),G=null===F?void 0:parseInt(F,10),$=B.user.x,H=B.user.y,V=this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_CLOUD_FIGHT"),{boss:{ID:50,element:"water",attacks:[82],name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_RAINY_STORM"),tag:hn.A_.SKYWATCH,maxHP:G},difficulty:parseInt(k.getValue("rainyStormDifficulty",Vt.s.get("GameConstants.RainyStorm.DIFFICULTY")),10),starMod:2,screen:"battle-skywatch-outside"},(()=>{this.zone.completeSequence(8,0),this.zone.setState("plug-B3",null),this.zone.setState("vines-B3",null),K.q.instance.prodigy.world.it("skywatch-B3",$,H)})),W=K.q.instance.prodigy.event.create();W.enableInput(!1),W.delay(2e3),W.enableInput(!0),W.function(V),W.start()}))})),$.start()}),null,0)}return null}}class SR extends Pn.T{constructor(k,B,U){super(k,B,9,"QUESTS_SKYWATCH_TRIM_VINES",{type:"seq",N:1},["skywatch-C4"],[443],[],[414],U)}setup(k,B,U){if(super.setup(k,B,U),this.zone.isOnSequence(9,0)&&"skywatch-C4"===U.zoneName){const F=K.q.instance.prodigy.create.element(B.foreground,160,220);F.highlight(!0);const G=()=>{const G=B.content.addChild(K.q.instance.prodigy.create.sprite(150,-100,q._.Boss_skywatch_json,"earth_cloud",new j.I9Y(.5,1))),$=B.foreground.addChild(K.q.instance.prodigy.create.sprite(140,-150,q._.Boss_skywatch_json,"med_face_2",new j.I9Y(.5,1))),H=()=>{const k=B.user.x,F=B.user.y,G=()=>{this.zone.completeSequence(9,0),this.zone.setState("plug-C4",null),this.zone.setState("vines-C4",null),K.q.instance.prodigy.world.it("skywatch-C4",k,F)};K.q.instance.prodigy.battle.battleStats.type="ZoneBossBattle";const $=K.q.instance.prodigy.event.create();$.enableInput(!1),$.delay(2e3),$.enableInput(!0);const H=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),V=H.getValue("sandyStormMaxHP",Vt.s.get("GameConstants.SandyStorm.MAX_HP")),W=null===V?void 0:parseInt(V,10);$.function(this.zone.getBattle(U,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("COMBAT_CLOUD_FIGHT"),{boss:{ID:49,element:"earth",attacks:[68],name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_SANDY_STORM"),difficulty:3,tag:hn.A_.SKYWATCH,maxHP:W},difficulty:parseInt(H.getValue("sandyStormDifficulty",Vt.s.get("GameConstants.SandyStorm.DIFFICULTY")),10),starMod:2,screen:"battle-skywatch-outside"},(()=>{G()}))),$.start()},V=K.q.instance.prodigy.event.create();V.validPath(B.user,B.path,220,400),V.enableInput(!1),V.fire(115,165,290,290,2,!1,!0),V.function(F.highlight.bind(F,!1)),V.function(this.zone.shrinkVines.bind(this.zone,U)),V.delay(3e3),V.sound(17,"wind"),V.function((()=>{const B=k.add.tween(G,this).to({x:150,y:300},2e3,j.GS3.Linear.None).start();k.add.tween($,this).to({x:140,y:250},2e3,j.GS3.Linear.None).start(),B.onTweenComplete.add((()=>{this.zone.changePosition(G,$),H()}))}).bind(this,k,B)),V.start()};B.addClickableEvent(90,120,270,280,G.bind(this,k,B),null)}return null}}class AR extends vn.b{constructor(k){super(k),this.questManagerIdentifier="496-af48",this.name="Skywatch",this.ID=hn.A_.SKYWATCH,this.guardian="SKYWATCH_GUARDIAN",this.battleBG="battle-skywatch-inside",this.defaultOnFaint="skywatch-A1",this.questHub="skywatch-A1",this.bgmID=18,this.currency=16,this.zoneIndex=pT.P.Skywatch,this.states=["chest1","chest2","chest3","chest4","chest5","wizard1","wizard2","daily","windowBroken","plug-D3","plug-B3","plug-C4","eugene_A1","vines-D1","vines-D2","vines-D3","vines-B3","vines-C4",Zu.PIPPET_ENCOUNTER,Zu.PIPPET_REMATCH,Zu.PIPPET_DEFEATED],this.monsters=[13,15,18,20,35,40,43,56,72,84,113,115,120];const B=[q._.Npc_sprite_wizard_json,Rn.t.Tileset_town_new_png,q._.Zone_skywatch_json,q._.Npc_sprite_benni_json,q._.Npc_sprite_broccolina_json,q._.Npc_sprite_eugene_json,Z.c.Sfx_skywatch,Rn.t.Tileset_skywatch_png,Rn.t.Tileset_skywatch_buildings_png,Rn.t.Tileset_collisions_png,Rn.t.Tileset_skywatch_factory_png,Rn.t.Tileset_generic_snow_png,Rn.t.Tileset_icecave_new_png,Rn.t.Tileset_cloud_new_png,Rn.t.Tileset_cloud_png,Rn.t.Tileset_interior_png,X.V.Bgm_skywatch],U={map:"skywatch-Titan",cutscene:"skywatch-titanIntro",harvey:{x:240,y:200},sign:{x:150,y:210},catapult:{x:140,y:400,arcHeight:300},titan:{x:1100,y:390,impactOffset:{x:-130,y:0}},entry:{x:400,y:450},battleBG:[nr.q.Battle_skywatch_outside_bg,nr.q.Battle_skywatch_outside_fg]};this.maps={A0:new zD(this,B),A1:new YD(this,B),B1:new QD(this,B),B2:new XD(this,B),B3:new ZD(this,B),C1:new JD(this,B),C2:new tR(this,B),C3:new eR(this,B),C4:new iR(this,B),D1:new sR(this,B),D2:new nR(this,B),D3:new aR(this,B),E1:new rR(this,B),E2:new oR(this,B),E3:new hR(this,B),E4:new cR(this,B),E5:new dR(this,B),Titan:new xT(this,B,U)},Promise.all([Cf.T.ready,Gt.R.dataBundleLoadPromise]).then((()=>{this.setZoneRewards()})).catch((k=>{K.q.instance.prodigy.open.messageBoxError("ERROR_LOADING_ZONE",["WORLD_SKYWATCH"],k,"Error: unable to load Skywatch Zone Rewards JSON")})),this.scenes={titanIntro:new _T(this,[Rn.t.Tileset_interior_general_png,Rn.t.Tileset_wall_collisions_png,X.V.Bgm_tutorial])}}setZoneRewards(){const k=[q._.Npc_sprite_wizard_json,Rn.t.Tileset_town_new_png,q._.Zone_skywatch_json,q._.Npc_sprite_benni_json,q._.Npc_sprite_broccolina_json,q._.Npc_sprite_eugene_json,Z.c.Sfx_skywatch,Rn.t.Tileset_skywatch_png,Rn.t.Tileset_skywatch_buildings_png,Rn.t.Tileset_collisions_png,Rn.t.Tileset_skywatch_factory_png,Rn.t.Tileset_generic_snow_png,Rn.t.Tileset_icecave_new_png,Rn.t.Tileset_cloud_new_png,Rn.t.Tileset_cloud_png,Rn.t.Tileset_interior_png,X.V.Bgm_skywatch],B=(0,yT.mg)(Gt.R.loadData(Ft.r.ZoneRewardsSkywatch_json));this.quests={1:new lR(this,k,B.quests.SkywatchQ1),2:new vR(this,k,B.quests.SkywatchQ2),3:new gR(this,k,B.quests.SkywatchQ3),4:new mR(this,k,B.quests.SkywatchQ4),5:new yR(this,k,B.quests.SkywatchQ5),6:ef.arePippetQuestEncountersEnabled?new ER(this,[],B.quests.SkywatchQ6):new _R(this,[],B.quests.SkywatchQ6),7:new wR(this,k,B.quests.SkywatchQ7),8:new TR(this,k,B.quests.SkywatchQ8),9:new SR(this,k,B.quests.SkywatchQ9),10:new uR(this,k,B.quests.SkywatchQ10),11:new fR(this,k,B.quests.SkywatchQ11),12:new bR(this,k,B.quests.SkywatchQ12),13:new pR(this,k,B.quests.SkywatchQ13)}}start(k,B,U){super.start(k,B,U),this._elevatorEvent=K.q.instance.prodigy.event.create(),this._trolleyAnimationEvent=K.q.instance.prodigy.event.create(),this._trolleyInteractionEvent=K.q.instance.prodigy.event.create(),this.showTopLeftNavigationButton()}createTopLeftNavigationButton(){this.showTopLeftNavigationButton()}getDailyMaps(){return[]}interactTrolley(k,B,U){const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=this._trolleyInteractionEvent;G.end(),G.validPath(k.user,k.path,B[0].x,B[0].y),G.function(k.removeFollow.bind(k,F.userID)),G.path(k.user,[{x:B[1].x,y:B[1].y}]),G.sound(17,"machines"),G.function(this.animateTrolley.bind(this,k,U.trolley,U.x,U.y,U.duration,U.target,U.targetX,U.targetY)),G.start()}animateTrolley(k,B,U,F,G,$,H,V){this.game.add.tween(B,this).to({x:U,y:F},G,j.GS3.Linear.None).start(),this.game.add.tween(k.user,this).to({x:U,y:F},G,j.GS3.Linear.None).start();const W=this._trolleyAnimationEvent;W.enableInput(!1),W.delay(3e3),W.enableInput(!0),W.function(K.q.instance.prodigy.world.it.bind(K.q.instance.prodigy.world,$,H,V)),W.start()}shrinkVines(k){k.toggleDynamicLayer(this.game,2,!1,3e3)}createVines(k){k.toggleDynamicLayer(this.game,2,!0,0)}changePosition(k,B){K.q.instance.prodigy.animation.float(k,20,1400,!0,!0),K.q.instance.prodigy.animation.float(B,20,1400,!0,!0)}elevator(k,B,U,F){const G=this._elevatorEvent;j.Aq$.isDefined(G)&&(G.end(),G.validPath(k.user,k.path,B[0].x,B[0].y),G.function(this.hideFollow.bind(this,k)),G.enableInput(!1),G.delay(200),G.sound(17,"elevator"),G.function(this.animateElevatorOpen.bind(this,k.content,U.x,U.y)),G.delay(1e3),G.path(k.user,[{x:B[1].x,y:B[1].y}]),G.delay(1e3),G.function(this.animateElevatorClose.bind(this,k.foreground,U.x,U.y)),G.function((()=>{k.user.visible=!1})),G.delay(1e3),G.enableInput(!0),G.function(K.q.instance.prodigy.world.it.bind(K.q.instance.prodigy.world,F.target,F.x,F.y)),G.start())}animateElevatorOpen(k,B,U){k.addChild(K.q.instance.prodigy.create.sprite(B,U,q._.Zone_skywatch_json,"elevator-0",new j.I9Y(.5,1),(k=>{k.animations.add("stand",["elevator-0","elevator-1","elevator-2","elevator-3","elevator-4"],10,!1,!1),k.animations.play("stand",void 0,!1)}))).anchor.set(0,0)}animateElevatorClose(k,B,U){const F=k.addChild(K.q.instance.prodigy.create.sprite(B,U,q._.Zone_skywatch_json,"elevator-2",new j.I9Y(.5,1)));F.anchor.set(0,0),F.animations.add("stand",["elevator-4","elevator-3","elevator-2","elevator-1","elevator-0"],10,!1,!1),F.animations.play("stand")}cleanup(){var k,B,U;super.cleanup(),null===(k=this._elevatorEvent)||void 0===k||k.end(),this._elevatorEvent=null,null===(B=this._trolleyAnimationEvent)||void 0===B||B.end(),this._trolleyAnimationEvent=null,null===(U=this._trolleyInteractionEvent)||void 0===U||U.end(),this._trolleyInteractionEvent=null}}class CR extends KD{constructor(k,B){super(k,"A0","MAP_SKYWATCH_LOWER_BEANOVATOR",1100,450,["skywatch-A1","shiverchill-B1"],B),this.battleBG="battle-skywatch-outside"}}class OR extends KD{constructor(k,B){super(k,"A1","MAP_SKYWATCH_UPPER_BEANOVATOR",620,350,["skywatch-A0","skywatch-B1","skywatch-C1","skywatch-D1"],B.concat([q._.Zone_lamplight_json,q._.Npc_sprite_broccolina_json,q._.Npc_sprite_merchant_json,J.Q.Spine_npc_benni_json]))}}class IR extends KD{constructor(k,B){super(k,"B1","MAP_SKYWATCH_GARDENERS_HUT_EXTERIOR",1140,549,["skywatch-A1","skywatch-B2","skywatch-B3"],B),this.battleBG="battle-skywatch-outside",this.coord=[new j.I9Y(460,530),new j.I9Y(200,560)]}}class DR extends KD{constructor(k,B){super(k,"B2","MAP_SKYWATCH_GARDENERS_HUT_INNER",640,510,["skywatch-B1"],B.concat([q._.Npc_sprite_noot_json])),this.battleBG="battle-skywatch-inside"}}class RR extends KD{constructor(k,B){super(k,"B3","MAP_SKYWATCH_GREAT_GRATERS",1030,530,["skywatch-B1"],B.concat([q._.Boss_skywatch_json])),this.battleBG="battle-skywatch-outside"}}class PR extends KD{constructor(k,B){super(k,"C1","MAP_SKYWATCH_SCREWBALL_SHACK",1120,430,["skywatch-A1","skywatch-C2","skywatch-C3"],B.concat([q._.Zone_lamplight_json])),this.battleBG="battle-skywatch-outside",this.coord=[new j.I9Y(370,580),new j.I9Y(590,350)]}}class MR extends KD{constructor(k,B){super(k,"C2","MAP_SKYWATCH_INNER_SCREWBALL_SHACK",625,520,["skywatch-C1"],B.concat([q._.Npc_sprite_noot_json])),this.battleBG="battle-skywatch-inside"}}class NR extends KD{constructor(k,B){super(k,"C3","MAP_SKYWATCH_CLOUDY_PASS",1160,210,["skywatch-C1","skywatch-C4"],B),this.battleBG="battle-skywatch-outside"}}class xR extends KD{constructor(k,B){super(k,"C4","MAP_SKYWATCH_SKY_SHOWER",1160,550,["skywatch-C3"],B.concat([q._.Npc_sprite_noot_json,q._.Npc_sprite_flora_json,q._.Boss_skywatch_json])),this.battleBG="battle-skywatch-outside"}}class LR extends KD{constructor(k,B){super(k,"D1","MAP_SKYWATCH_FACTORY_ENTRANCE",189,549,["skywatch-A1","skywatch-D2","skywatch-E1"],B.concat(q._.Npc_sprite_noot_json)),this.trolley2=null,this.battleBG="battle-skywatch-outside",this.coord=[new j.I9Y(400,540),new j.I9Y(780,570)]}}class kR extends KD{constructor(k,B){super(k,"D2","MAP_SKYWATCH_BREEZY_PASS",140,290,["skywatch-D1","skywatch-D3"],B.concat([q._.Zone_lamplight_json])),this.trolley2=null,this.battleBG="battle-skywatch-outside",this.coord=[new j.I9Y(280,450),new j.I9Y(780,330)]}}class BR extends KD{constructor(k,B){super(k,"D3","MAP_SKYWATCH_WIND_TUNNEL",270,250,["skywatch-D2"],B.concat([q._.Zone_lamplight_json,q._.Boss_skywatch_json])),this.battleBG="battle-skywatch-outside"}}class UR extends KD{constructor(k,B){super(k,"E1","MAP_SKYWATCH_FACTORY_MAIN_HALL",1120,520,["skywatch-D1","skywatch-E2","skywatch-E3"],B),this.battleBG="battle-skywatch-inside"}}class FR extends KD{constructor(k,B){super(k,"E2","MAP_SKYWATCH_OLD_MANS_ROOM",230,530,["skywatch-E1"],B.concat([q._.Npc_sprite_eugene_json])),this.battleBG="battle-skywatch-inside"}}class GR extends KD{constructor(k,B){super(k,"E3","MAP_SKYWATCH_BLAST_DOORS",1060,530,["skywatch-E1","skywatch-E4"],B),this.battleBG="battle-skywatch-inside"}}class jR extends KD{constructor(k,B){super(k,"E4","MAP_SKYWATCH_END_CHAMBER",640,380,["skywatch-E3","skywatch-E5"],B.concat([q._.Boss_skywatch_json])),this.battleBG="battle-skywatch-inside"}}class $R extends KD{constructor(k,B){super(k,"E5","MAP_SKYWATCH_OUTSKIRTS",1024,515,["skywatch-E4"],B),this.user=null,this.battleBG="battle-skywatch-outside"}}class HR extends AR{constructor(k){super(k),this._assets=[q._.Npc_sprite_wizard_json,Rn.t.Tileset_town_new_png,q._.Zone_skywatch_json,q._.Npc_sprite_benni_json,q._.Npc_sprite_broccolina_json,q._.Npc_sprite_eugene_json,Z.c.Sfx_skywatch,Rn.t.Tileset_skywatch_png,Rn.t.Tileset_skywatch_buildings_png,Rn.t.Tileset_collisions_png,Rn.t.Tileset_skywatch_factory_png,Rn.t.Tileset_generic_snow_png,Rn.t.Tileset_icecave_new_png,Rn.t.Tileset_cloud_new_png,Rn.t.Tileset_cloud_png,Rn.t.Tileset_interior_png,X.V.Bgm_skywatch],this.questManagerIdentifier="38d-437e",this.ID=hn.A_.SKYWATCHHARD,this.defaultOnFaint="skywatch_hard-C8",this.questHub="skywatch_hard-C8",this.zoneIndex=pT.P.SkywatchHard,this.difficultyMode=ri.i.Hard,this.states=["chest1","chest2","chest3","chest4","chest5","wizard1","wizard2","daily","windowBroken","plug-D3","plug-B3","plug-C4","eugene_A1","vines-D1","vines-D2","vines-D3","vines-B3","vines-C4",Zu.PIPPET_ENCOUNTER,Zu.PIPPET_REMATCH,Zu.PIPPET_DEFEATED],this.monsters=[],this.maps={A0:new CR(this,this._assets),A1:new OR(this,this._assets),B1:new IR(this,this._assets),B2:new DR(this,this._assets),B3:new RR(this,this._assets),C1:new PR(this,this._assets),C2:new MR(this,this._assets),C3:new NR(this,this._assets),C4:new xR(this,this._assets),D1:new LR(this,this._assets),D2:new kR(this,this._assets),D3:new BR(this,this._assets),E1:new UR(this,this._assets),E2:new FR(this,this._assets),E3:new GR(this,this._assets),E4:new jR(this,this._assets),E5:new $R(this,this._assets)},this.scenes={}}}var VR=U(51979);class WR{constructor(k,B){this._previousMap="",this._currentMap="",this.mapChanged=new j.HN0,this.game=k,this._metricsManager=B,this.zones={[hn.A_.FOREST]:new $A(k),[hn.A_.SHIVERCHILL]:new ID(k),[hn.A_.SKYWATCH]:new AR(k),[hn.A_.LAMPLIGHT]:new _O(k),[hn.A_.DYNO]:new sA(k),[hn.A_.BONFIRE]:new mS(k),[hn.A_.HOUSE]:new vC(k),[hn.A_.SHIPWRECK]:new _I(k),[hn.A_.DARKTOWER]:new zS(k),[hn.A_.ACADEMY]:new Dn.N(k),[hn.A_.ARCHIVES]:new mT(k),[hn.A_.TOWERTOWN]:new dT.m(k),[hn.A_.CRYSTALCAVERNS]:new jS(k),[hn.A_.DRAGONISLE]:new tA(k),[hn.A_.MOON]:new MO(k),[hn.A_.SPRINGFESTGROTTO_BUNNY]:new CO(k),[hn.A_.SPRINGFESTGROTTO_FOX]:new OO(k),[hn.A_.EARTHTOWER]:new Xn(k,1),[hn.A_.ICETOWER]:new Xn(k,3),[hn.A_.STORMTOWER]:new Xn(k,4),[hn.A_.FIRETOWER]:new Xn(k,5),[hn.A_.WATERTOWER]:new Xn(k,6),[hn.A_.ASTRALTOWER]:new Xn(k,7),[hn.A_.ACADEMYHARD]:new vT(k),[hn.A_.FORESTHARD]:new tC(k),[hn.A_.SHIVERCHILLHARD]:new qD(k),[hn.A_.BONFIREHARD]:new US(k),[hn.A_.SHIPWRECKHARD]:new VI(k),[hn.A_.SKYWATCHHARD]:new HR(k),[hn.A_.ACADEMYEXPERT]:new vC(k),[hn.A_.FORESTEXPERT]:new vC(k),[hn.A_.SHIVERCHILLEXPERT]:new vC(k),[hn.A_.BONFIREEXPERT]:new vC(k),[hn.A_.SHIPWRECKEXPERT]:new vC(k),[hn.A_.SKYWATCHEXPERT]:new vC(k)},this.pippetEncounterDaily=null,this.pippetEncounterSpawn=null}inRestrictedSocialZone(k){return!!k&&$.includes(WR.SINGLE_PLAYER_ZONES,k)}enter(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;const B=K.q.instance.prodigy.gameContainer.get("afa-b7c5");B.startTracing(fu.u.World);const U=K.q.instance.prodigy.gameContainer;B.startTracing(fu.u.WorldRemotePlayerSpawnLimiterInit),U.get("d77-66fb").init(),B.endTracing(fu.u.WorldRemotePlayerSpawnLimiterInit),B.startTracing(fu.u.WorldSynapseMultiplayerServiceConnection);U.get("779-a746").connect().catch(j.RQr.createHandler("Unable to connect to Synapse"));const F=U.get("173-db8a");let G;B.endTracing(fu.u.WorldSynapseMultiplayerServiceConnection),B.startTracing(fu.u.WorldNetworkHandlerEnterWorld);do{try{G=yield F.enterWorld([])}catch(e){j.RQr.logError(e,"Error entering world"),yield new Promise((B=>{const U="500"===(e instanceof Error?e.name:"500")?"ENTER_WORLD_ERROR_RETRY":"ENTER_WORLD_ERROR";K.q.instance.prodigy.open.messageBoxPrefab({text:U,confirmCallback:B})})),yield j.Egh.timeout(5e3)}}while(!G);B.endTracing(fu.u.WorldNetworkHandlerEnterWorld),B.startTracing(fu.u.WorldInitProgressDataManager);const{chargedLevelProgress:$,timezoneOffset:H,riftsSyncedData:V,resumeBattleData:W,hudData:q,initialInventoryContents:z,afterSchoolWidgetStatus:Y}=G;U.get("54c-b7de").setup().catch(j.RQr.createHandler("World: Could not set up Universal Team Selection Service"));const Q=U.get("62e-110e");$&&Q.init($),B.endTracing(fu.u.WorldInitProgressDataManager),j.Aq$.isDefined(H)&&(Oc.R.SERVER_PLAYER_TIMEZONE_OFFSET=H),B.startTracing(fu.u.WorldSynchedRiftDataInit),yield uT.L.setUpIconGuidOverrides(),V&&(U.get("9ac-9677").init(V),(null==V?void 0:V.currentRiftRunProgress)&&K.q.instance.game.state.get(Ie.G.Rifts).setRiftRunProgress(V.currentRiftRunProgress)),B.endTracing(fu.u.WorldSynchedRiftDataInit),B.startTracing(fu.u.WorldFeaturedSpawnDataInit);const X=U.get("a2e-a635");yield X.cacheData(G.featuredSpawnData),B.endTracing(fu.u.WorldFeaturedSpawnDataInit),B.startTracing(fu.u.WorldWizardCostumeDataInit);const Z=U.get("6e9-d1dd");yield Z.initializeCostumeData(G.costumeData),B.endTracing(fu.u.WorldWizardCostumeDataInit),B.startTracing(fu.u.WorldHudDataInit),q&&U.get("446-72a7").initialize(q),B.startTracing(fu.u.WorldSegmentedOffersDataInit);const J=U.get("a02-c2b2");yield J.loadOffersFromData(),B.endTracing(fu.u.WorldSegmentedOffersDataInit);const tt=U.get("a94-4ba3");if(yield tt.isFeatureAvailable()){const k=U.get("0f9-dd7b"),B=U.get("43a-6f08");if(j.Aq$.isDefined(k.lastClassCodeFetched)){yield k.initialize(),yield B.sendClassCodeQuestEvent();const U=yield fT.b.getData();j.Aq$.isDefined(U)&&(U.IS_CURRENT_CHALLENGE_STARTED||(yield B.sendPreviousChallengeStartedEvent()))}yield B.setup(),yield tt.setupHudButton()}(0,Dt.G)(rT.K).enabled&&U.get("e94-c727").setData(Y),(0,Dt.G)(Xo.d).enabled&&(0,bT.Ug)().catch(j.RQr.createHandler("World: Error updating wizard bank hud button notifications")),B.endTracing(fu.u.WorldHudDataInit),B.startTracing(fu.u.WorldInventoryInit),z&&U.get("61f-37d6").initialize(z),K.q.instance.prodigy.gameContainer.get(Hs.T).initialize(),B.endTracing(fu.u.WorldInventoryInit),yield U.get("a25-68f4").managerSetupPromise,B.startTracing(fu.u.WorldSegmentAnalyticsSetup);const et=U.get("c47-20b6");et.item.beginSecureInventoryTracking(),et.session.sendServerSessionStartedEvents(),B.endTracing(fu.u.WorldSegmentAnalyticsSetup),B.startTracing(fu.u.WorldElementalBoostCache),U.get("ce9-b630").cacheElementalBoost().catch(j.RQr.createHandler("Could not cache the daily elemental boost!")),B.endTracing(fu.u.WorldElementalBoostCache),U.get("098-b402").setCooldowns(null!==(k=G.cooldownsData)&&void 0!==k?k:{});const it=K.q.instance.game.state.get(Ie.G.Loading);it?it.onAdditionalLoadPromisesFinishSignal.addOnce(this.onWorldLoadingFinished.bind(this)):this.game.state.onStateLoaded.add(this.onStateLoaded,this);const st=U.get("e20-0fb0").player,nt=K.q.instance.prodigy.classModeController;if(B.startTracing(fu.u.WorldPippetEncounterInit),this.pippetEncounterDaily=new hT.e(this.game,st),!this.pippetEncounterDaily.isInitialized()||this.pippetEncounterDaily.hasDateIdChanged()?(this.pippetEncounterDaily.init(),this.pippetEncounterSpawn=this.pippetEncounterDaily.getSpawn()):this.pippetEncounterDaily.isComplete()||(this.pippetEncounterSpawn=this.pippetEncounterDaily.getSpawn()),B.endTracing(fu.u.WorldPippetEncounterInit),this.isMathTowerEnabledForPlayer(this.game,st)&&nt.isClassMode()&&st.hasCompletedTutorial())return void this.it("tower_town-A1");B.startTracing(fu.u.WorldGetTowerData);const at=Dn.N.getAllTowerData();B.endTracing(fu.u.WorldGetTowerData);const rt=this.zones[hn.A_.ACADEMY],ot=this.zones[hn.A_.ACADEMY].maps.CR1;B.startTracing(fu.u.WorldInitTowerData);for(let K=0;KNumber(k.taskID)<=2)))?B.sendQuestEvent(as.T.START_QUEST,{id:"zone-quest-ftue"}).then((()=>{this.it(VR.W,WR.TUTORIAL_MAP_STARTING_POSITION.x,WR.TUTORIAL_MAP_STARTING_POSITION.y)})).catch(j.RQr.createHandler("[World] Failed to send the quest event: zone-quest-ftue")):this.enterMap()}))}enterMap(){var k;const B=this.zones[hn.A_.HOUSE].getQuestState(),U=Tn.J.isDefined(B)&&1===$.get(B,"ID",0)?$.get(B,"seq",0):void 0,F=this.zones[hn.A_.ACADEMY].getQuestState(),G=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let H=$.get(G.data,"zone","");const V=K.q.instance.prodigy.gameContainer.get("fc2-cb0a");if(V.waitingToTransport||j.Aq$.isDefined(V.currentQuickQuizId))this.setCurrentMap(H);else if(va.p.resumeBattle())this.setCurrentMap(H);else if(tf.J.canShowNarrativeIntro(null===(k=null==G?void 0:G.data)||void 0===k?void 0:k.zone)&&this.setCurrentMap("lamplight-B3"),U>4)j.Aq$.isDefined(G.state.data.zone.academy)&&(G.state.data.zone.academy.quest=null),this.it("academy-GH3");else if(!G.hasCompletedTutorial()&&"academy-GH1"===H&&F&&F.ID>=2||U<=4&&H.startsWith(hn.A_.TOWERTOWN))this.it("house-exterior");else{if(H.includes(hn.A_.TOWERTOWN)&&!this.isMathTowerEnabledForPlayer(this.game,G)){const k=G.hasCompletedTutorial()?WR.DEFAULT_ZONE:hn.A_.HOUSE;G.data.zone=k,H=k}if(H=K.q.instance.prodigy.skin.checkForExclusiveMap(H),this.setCurrentMap(H),this.inDeprecatedZone())j.VyI.log("Teleporting to default zone because this zone is deprecated.",j.$bb.Info),this.it(WR.DEFAULT_ZONE);else if(G.hasCompletedTutorial()&&K.q.instance.prodigy.classModeController.isLockedZone(H))j.VyI.log("Teleporting to default zone because student is at school and this zone is locked.",j.$bb.Info),this.it(WR.DEFAULT_ZONE);else if(Tn.J.isDefined(H)&&H.indexOf("-")>0){const[k,B]=H.split("-"),U=this.zones[k];U instanceof On?"WR"===B||"CR"===B?this.it(H):U.exitDungeon():(Cf.T.sendFestivalTravelEvent(k).catch(j.RQr.createHandler("[World] Unable to send FestivalTravel event")),this.it(H)),U instanceof jS&&"DungeonHub"!==B&&U.sendCrystalCavernsSpawnEvent()}else j.VyI.log("Teleporting to house zone because playerZone was not defined or does not have a dash.",j.$bb.Info),this.it(hn.A_.HOUSE)}}isMathTowerEnabledForPlayer(k,B){try{return K.q.instance.prodigy.gameContainer.get(cT.G.MathTower).isEnabledForPlayer(B)}catch(e){return j.VyI.log(e,j.$bb.Error),!1}}isValidLocation(k){const B=k.split("-");return this.zones[B[0]]instanceof On||j.Aq$.isDefined(this.zones[B[0]])&&j.Aq$.isDefined(this.zones[B[0]].maps[B[1]])}it(k,B,U,F,G={}){var $,H,V,W,q,z,Y;let Q=String(k);Q=Q.replace("tower-0","darktower-A1"),G.assets=j.Aq$.isDefined(G.assets)?G.assets:[],G.assets=G.assets.concat(Z.c.Sfx_world);const X=this.game.state.get(Ie.G.TileScreen);G.timeWhenPreviousZoneLoaded=null!==(H=null===($=null==X?void 0:X.zone)||void 0===$?void 0:$.timeWhenZoneLoaded)&&void 0!==H?H:null,K.q.instance.prodigy.gameContainer.rebind("RespawnEnabled").toConstantValue(void 0===(null==F?void 0:F.battleResult));const J=tf.J.isZoneMapDifficultyModeAgnostic(Q),tt=Q.split("-"),et=J?Ta.i.DIFFICULTY_MODE:null!==(W=null===(V=this.zones[tt[0]])||void 0===V?void 0:V.difficultyMode)&&void 0!==W?W:ri.i.Regular,it=J||et===ri.i.Regular||ei.R.isFeatureEnabled()&&j.Aq$.isDefined(null===(z=null===(q=ei.R.getVariables())||void 0===q?void 0:q.maps)||void 0===z?void 0:z[Q]);if(Q!==hn.A_.HOUSE&&it)if(j.Aq$.isDefined(this.zones[tt[0]])&&this.isValidLocation(Q))this.getCurrentZone()!==tt[0]&&Cf.T.sendFestivalTravelEvent(tt[0]).catch(j.RQr.createHandler("[World] Unable to send FestivalTravel event")),this.zones[tt[0]].teleport(tt[1],B,U,F,G);else{let k;switch(j.Aq$.isDefined(B)&&j.Aq$.isDefined(U)&&(k={playerPosition:{x:B,y:U}}),Q){case"dyno-A1":K.q.instance.prodigy.start(Ie.G.Museum,G,k);break;default:this.zones.house.teleport(hn.A_.HOUSE,B,U,F,G)}}else this.zones.house.teleport(hn.A_.HOUSE,B,U,F,G);null===(Y=this.mapChanged)||void 0===Y||Y.dispatch()}teleportToCurrentMap(){this.it(this.getCurrentMap())}playScene(k){const B=k.split("-");j.Aq$.isDefined(this.zones[B[0]])&&this.zones[B[0]].playScene(B[1])}getPreviousMap(){return this._previousMap}getCurrentMap(){return this._currentMap}setCurrentMap(k){var B;this._previousMap=null!==(B=this._currentMap)&&void 0!==B?B:"",this._currentMap=k,this._metricsManager.setLastMapLoadStarted(k)}getCurrentMapObject(){var k;const B=this._currentMap.split("-");return null===(k=this.zones[B[0]])||void 0===k?void 0:k.maps[B[1]]}isZoneSinglePlayer(k){return $.indexOf(WR.SINGLE_PLAYER_ZONES,k)>-1}getCurrentZone(){return this._currentMap.split("-")[0]}getCurrentZoneObject(){return this.zones[this.getCurrentZone()]}getCurrentMapTag(){return this._currentMap.split("-")[1]}getCurrentCurrency(){var k;return null===(k=this.zones[this.getCurrentZone()])||void 0===k?void 0:k.currency}getZone(k){return this.zones[k]}goToZoneHub(k){this.it(this.getZoneHub(k))}getZoneHub(k){switch(k){case this.zones.forest.ID:return this.zones.forest.questHub;case this.zones.shiverchill.ID:return this.zones.shiverchill.questHub;case this.zones.skywatch.ID:return this.zones.skywatch.questHub;case this.zones.lamplight.ID:return this.zones.lamplight.questHub;case this.zones.bonfire_spire.ID:return this.zones.bonfire_spire.questHub;case this.zones.shipwreck_shore.ID:return this.zones.shipwreck_shore.questHub;default:return this.zones.house.questHub}}inZoneHub(){return this.getCurrentMap()===this.getZoneHub(this.getCurrentZone())}inDeprecatedZone(){return[...WR.DEPRECATED_ZONES,...(0,Dt.G)(oT.m).enabled?[hn.A_.DYNO]:[]].includes(this.getCurrentZone())}onStateLoaded(k){k instanceof of.R||(this.onWorldLoadingFinished(),this.game.state.onStateLoaded.removeAll(this))}onWorldLoadingFinished(){var k;K.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(fu.u.World,{finished_loading:!0,zone:null!==(k=this._currentMap)&&void 0!==k?k:"none"})}}WR.DEFAULT_ZONE="forest-C8",WR.TUTORIAL_MAP_STARTING_POSITION=new j.I9Y(685,385),WR.DEPRECATED_ZONES=["activity_zone","toyzone","elemental_guardian",hn.A_.EARTHTOWER,hn.A_.ICETOWER,hn.A_.CRYSTALCAVERNS],WR.SINGLE_PLAYER_ZONES=[hn.A_.TOWERTOWN];var qR=U(95925),KR=U(9591),zR=U(18741);let YR=class{get PendingTints(){return this.pendingTints}get OnImageTinted(){return this.onImageTinted}constructor(k){this.assetLoader=null,this.game=null,this.pendingTints=[],this.onImageTinted=new j.HN0,this.assetLoader=k,this.game=K.q.instance.game}tintImage(k,B,U,F){if(this.assetLoader.assignAssetData(B,{type:"sprite"}),this.assetLoader.isLoaded(B,qR.i.Image))this.OnImageTinted.dispatch(B);else if(U.length===F.length){if(-1===this.pendingTints.indexOf(B))if(this.pendingTints.push(B),this.assetLoader.isLoaded(k,qR.i.Image)){const G=this.assetLoader.getAsset(k,qR.i.Image),j=new KR.w(this.game,null,G.width,G.height),H=K.q.instance.prodigy.create.image(0,0,k);j.draw(H),j.update(),j.processPixelRGB((k=>{const B=$.findIndex(U,(B=>k.r===B[0]&&k.g===B[1]&&k.b===B[2]));return B>-1?Object.assign(Object.assign({},k),{r:F[B][0],g:F[B][1],b:F[B][2]}):k})),j.generateTexture(B,(k=>{H.destroy(),j.clear(),zR.f.removeByCanvas(j.canvas),j.destroy(),$.remove(this.pendingTints,(k=>k===B)),pn.K.cacheAsset(this.game,B,pn.K.commonAssetsCached),this.OnImageTinted.dispatch(B)}))}else j.VyI.log(`Image with source ${k} was not loaded for tinting`,j.$bb.Warning)}else j.VyI.log("Color array length must match",j.$bb.Warning)}};YR=(0,G.Cg)([(0,tt.injectable)(),(0,G.Qj)(0,(0,tt.inject)(j.t5G.AssetLoader)),(0,G.Sn)("design:paramtypes",[Object])],YR);var QR=U(66572),XR=U(18344);class ZR{get gameContainer(){return this.game.rootContainer}constructor(k){this.version=null,this.game=null,this.breadcrumbManager=null,this.updateCount=0,this.assets=null,this.load=null,this.audio=null,this.battle=null,this.achievements=null,this.colorReplaceController=null,this.notifications=null,this.open=null,this.prefabFactory=null,this.effects=null,this.event=null,this.dialogue=null,this.education=null,this.skin=null,this.create=null,this.icon=null,this.animation=null,this.mailNetworkHandler=null,this.friendsListNetworkHandler=null,this.titansNetworkHandler=null,this.world=null,this.dialogues=null,this.hints=null,this.previousNow=0,this.textureBelow=null,this.textureAbove=null,this.textureMenu=null,this.spinner=null,this._inputBlocker=null,this.timeManager=null,this.urlProvider=null,this.game=k,K.q.instance.prodigy=this,this.version=`${Vt.s.get("GameConstants.Build.VERSION")}`,this.initializeInjectionContainer(),this.postCacheInit(),this.timeManager=this.gameContainer.get("a03-308f"),this.metricsManager=this.gameContainer.get("2a1-fed9"),this.urlProvider=this.gameContainer.get("be9-3278"),this.game.versioned=window.location.href.indexOf("feature")>-1||window.location.href.indexOf("release")>-1,this.game.clientVersion=this.game.versioned?"undefined":Tn.J.validateVersion(Vt.s.get("GameConstants.Build.VERSION"));const B=new ye.W(this.game);this.gameContainer.get("e20-0fb0").initialize(B),this.breadcrumbManager=this.gameContainer.get("12f-4e29"),this.breadcrumbManager.init(B.state,new At.C),this.assets=this.gameContainer.get("c9c-9511"),this.load=this.gameContainer.get("aa9-c54b"),this.audio=new Jn.R(k),this.battle=new wa(k,this.metricsManager),this.achievements=this.gameContainer.get("b07-2890"),this.colorReplaceController=new Aa.m(k),this.notifications=new rr(k),this.classModeController=new Sa,this.effects=this.gameContainer.get("6b2-06ce"),this.open=new Xu(k),this.prefabFactory=new vf(k),this.event=new Po(k),this.dialogue=new Io(k),this.education=new Fo(k),this.skin=new aT(k),this.create=new go(k),this.icon=new Wo(k),this.animation=new pb(k),this.attacks=new ue,this.mailNetworkHandler=new _w(k),this.friendsListNetworkHandler=new pw(k),this.titansNetworkHandler=new Dw(k),this.world=new WR(k,this.metricsManager),this.dialogues=new fe(k),this.hints=new pe.R,this.game.broadcaster.addAppListener(oi.AU.PlayerInitialized,(()=>{this.initializeBreadcrumbs(),this.game.broadcaster.removeAppListener(oi.AU.PlayerInitialized,this)}),this,null,!0);const U=k=>{try{this.game.broadcaster.broadcast(oi.bS.POST_MESSAGE_RECEIVED,this.game,[k.origin,JSON.parse(k.data)])}catch(e){}};if(Pt.pF.isNativeApp()){Pt.pF.isNativeIOSApp()||Pt.pF.isNativeAndroidApp()&&Pt.pF.eligibleVersionForMobileMembershipPurchase()?window.addEventListener("message",U):document.addEventListener("message",U);["log","error","info","debug","warn"].forEach((k=>{console[k]=B=>{const U={logType:k,message:B},F=JSON.stringify({type:"LOG_MESSAGE",payload:U});window.postMessage(F,window.location.origin)}}))}else window.addEventListener("message",U);const F=[`%c ♥ Prodigy Game v${this.version} ♥ `,"color: #FFFFFF; background: #1484a3"];console.log.apply(console,F)}init(){j.VyI.setLogLevel(Vt.s.get("GameConstants.Build.FRAMEWORK_LOG_LEVEL"));const k=this.game.width,B=this.game.height;this.textureBelow=this.game.add.renderTexture(k,B),this.textureAbove=this.game.add.renderTexture(k,B),this.textureMenu=this.game.add.renderTexture(k,B),this.previousNow=this.game.time.timeMS}update(){this.updateCount++,this.game.broadcaster.broadcast(oi.AU.Update,this.game,null)}cleanup(){this.open.cleanup(),this.game.broadcaster.clear()}bindToAlias(k,B){for(const U of B)this.gameContainer.bind(k).toDynamicValue((k=>k.get(U)))}start(k,B={},U=null){if(B.target=k,B.assets=$.get(B,"assets",[]),B.assets=B.assets.concat(this.game.state.get(k).assets),this.game.state.get(k).screenData=U,this.game.state.get(this.game.state.current)instanceof gf.f)if(this.game.state.get(this.game.state.current).fadeOut(B.fadeOut,this.game.state.get(Ie.G.Loading).startLoading.bind(this.game.state.get(Ie.G.Loading),B)),k===Ie.G.TileScreen){const k={mapName:B.title};this.metricsManager.createLoadingMetricEvent(Sn.o.FunnelTileScreen,Sn.o.StageLoadStart,!1,k)}else k===Ie.G.CharSelect&&this.metricsManager.createLoadingMetricEvent(Sn.o.FunnelCharSelect,Sn.o.StageLoadStart);else this.game.state.get(Ie.G.Loading).startLoading(B)}startCoOp(k){const B=[Ut.E.getTitanSpine(k.titanAssetID),q._.Boss_titan_barrier_json,q._.Boss_titan_barrier_break_json,q._.Boss_titan_spark_json,J.Q.Spine_academy_window_light_horizontal_json,Z.c.Sfx_bar_fill,Z.c.Sfx_results_screen,Z.c.Sfx_battle,X.V.Bgm_victory,X.V.Bgm_battle,...k.battleMap,J.Q.Spine_coop_multi1_json,J.Q.Spine_coop_single1_json,J.Q.Spine_coop_crystal_json,Ut.E.getIconForType("currency",11),"ui-shared",J.Q.Spine_xpbar_json,J.Q.Spine_character_shine_json,q._.General_battle_json,q._.General_core_json,q._.Font_battle_json,q._.Ui_bam_json,Z.c.Sfx_house_intro];pn.K.cacheAssets(this.game,B,pn.K.zoneAssetsCached),this.game.state.get(Ie.G.Loading).startLoading({assets:B,target:Ie.G.CoOp,autoStart:!1,callback:()=>{this.game.state.start(Ie.G.CoOp,!1,k)}})}startPrefabScene(k,B={}){this.game.state.start(Ie.G.PrefabScene,!0,Object.assign(Object.assign({},B),{prefabIDs:k}))}loading(k,B=!1){k?(j.Aq$.isDefined(this.spinner)&&!this.spinner[ur.k.DESTROYED]||(this.spinner=this.create.sprite(640,360,q._.General_core_json,"loading"),this.game.broadcaster.broadcast(oi.lc.AddChild,this.game,[this.spinner,vh.E.OverlayLayer])),B&&!j.Aq$.isDefined(this._inputBlocker)&&(this._inputBlocker=this.create.emptySprite(640,360,this.game.width,this.game.height),this.game.broadcaster.broadcast(oi.lc.AddChild,this.game,[this._inputBlocker,vh.E.OverlayLayer]),this._inputBlocker.anchor.set(.5,.5),this._inputBlocker.alpha=0,this._inputBlocker.inputEnabled=!0),this.spinner.alpha=1,this.spinner.anchor.set(.5,.5),this.game.add.tween(this.spinner,this.spinner).to({angle:360},1500,j.GS3.Linear.None,!0,0,Vt.s.MAX_SAFE_INTEGER,!1),this.game.add.tween(this.spinner,this.spinner).to({alpha:1},500,j.GS3.Linear.None,!0,300)):(j.Aq$.isDefined(this.spinner)&&(this.game.tweens.removeAllFromOwner(this.spinner),this.spinner.destroy(),this.spinner=null),j.Aq$.isDefined(this._inputBlocker)&&(this._inputBlocker.destroy(),this._inputBlocker=null))}initializeBreadcrumbs(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.breadcrumbManager.init(k.state,new At.C)}initializeInjectionContainer(){this.gameContainer.bind("51c-03a0").toConstantValue(this.game),this.gameContainer.bind(j.t5G.FrameWorkManager).toConstantValue(this.game.frameWorkManager),this.gameContainer.bind(j.$Bt.LocalizationService).to(j.Oap).asSingleton(),this.gameContainer.bind("80c-6fa4").to(He).asSingleton(),this.gameContainer.bind("11d-01b8").to(KE).asSingleton(),this.gameContainer.bind("6b2-06ce").to(Do.M).asSingleton(),this.gameContainer.bind("6a1-4b92").to(gb).asSingleton(),this.gameContainer.bind("be9-3278").to(re.p).asSingleton(),this.gameContainer.bind("c9c-9511").to(de.s).asSingleton(),this.gameContainer.bind("aa9-c54b").to(QR.a).asSingleton();const k=this.gameContainer.resolve(j.zL);k.init(this.gameContainer.sourceContainer),this.gameContainer.bind(j.$Bt.IFSMController).to(j.rPI).asSingleton(),this.gameContainer.bind(j.$Bt.FSMFactories).toConstantValue(k),this.gameContainer.bind(j.$Bt.FSMService).to(j.CQn).asSingleton(),this.gameContainer.bind(j.$Bt.FSMDataProvider).to(hb).asSingleton(),this.gameContainer.bind(F.CacheExpirationStrategy).to(St),this.gameContainer.bind(F.CacheStorageStrategy).to(Tt),this.gameContainer.bind(F.StoreDataProvider).to(Yt).asSingleton(),this.gameContainer.get(F.CacheExpirationStrategy).setExpiryTimeInMinutes(5),this.gameContainer.bind("8c1-3c93").to(fb.S).asSingleton(),this.gameContainer.bind("a50-726e").to(wt).asSingleton(),this.gameContainer.bind("a03-308f").to(ne.V).asSingleton(),this.gameContainer.bind("2a1-fed9").to(Af.U).asSingleton(),this.gameContainer.bind("afa-b7c5").to(Sf).asSingleton(),this.gameContainer.bind("330-3c25").to(ae).asSingleton(),this.gameContainer.bind("f7c-2e57").to(xw).asSingleton(),this.gameContainer.bind("aaa-9186").to(ct).asSingleton(),this.gameContainer.bind(F.DungeonDataProvider).to(_i).asSingleton(),this.gameContainer.bind("84d-05d4").to(Di.I).asSingleton(),this.gameContainer.bind("b5b-6fa4").to(Ca.Z).asSingleton(),this.gameContainer.bind("c97-bd0d").to(qd.I).asSingleton(),this.gameContainer.bind("40f-f847").to(Bo).asSingleton(),this.gameContainer.bind("8bb-7057").to(YE.K).asSingleton(),this.gameContainer.bind("313-bcd5").to(Mw.u).asSingleton(),this.gameContainer.get("313-bcd5").init(),this.gameContainer.bind("23d-f8f6").to(Nw.F).asSingleton(),this.gameContainer.bind("a6a-6157").to(Ns.$).asSingleton(),this.gameContainer.bind("e50-b09b").to(Ds).asSingleton(),this.gameContainer.bind("f91-8211").to(Ps.k).asSingleton(),this.gameContainer.bind("d65-d7bb").to(Ss.n).asSingleton(),this.gameContainer.bind("8dc-04eb").to(Es.R).asSingleton(),this.gameContainer.bind("4ba-bb34").to(si).asSingleton(),this.gameContainer.bind("615-fbad").to(Gi.p).asSingleton(),this.gameContainer.bind("b26-31af").to(Xe.k).asSingleton(),this.gameContainer.bind("4fd-fef7").to(Ct.v).asSingleton(),this.gameContainer.bind("23e-f53d").to(ji.C).asSingleton(),this.gameContainer.bind("0f1-c356").to(nw).asSingleton(),this.gameContainer.bind("173-db8a").to(lw).asSingleton(),this.gameContainer.bind("e5b-e931").to(Wi.e).asSingleton(),this.gameContainer.bind("62e-110e").to(li.g).asSingleton(),this.gameContainer.bind("097-a053").to(Yi.S).asSingleton(),this.gameContainer.bind("358-48b9").to(Ki.C).asSingleton(),this.gameContainer.bind("f32-d326").to(Sw.Y).asSingleton(),this.gameContainer.bind("8b9-bad1").to(es.n).asSingleton(),this.gameContainer.bind("a71-dfcf").to(ws.k).asSingleton(),this.gameContainer.bind("cfe-9c2c").to(qi.K).asSingleton(),this.gameContainer.bind("7a1-ff33").to(Ot.s).asSingleton(),this.gameContainer.bind("99d-5e9e").to(Ts.q).asSingleton(),this.gameContainer.bind("a25-68f4").to(As.n).asSingleton(),this.gameContainer.bind("43a-6f08").to(Cs.C).asSingleton(),this.gameContainer.bind("b73-c131").to(ks.X).asSingleton(),this.gameContainer.bind("54c-b7de").to(Qs.O).asSingleton(),this.gameContainer.bind("88d-8cb1").to(Xs.V).asSingleton();const B=new j.rrh;B.parent=this.gameContainer,B.bind("a6a-6157").to(_s).asSingleton(),B.bind("a78-11c7").toDynamicValue((()=>{const k=K.q.instance.prodigy.world.getCurrentZone(),B=Ms.n[k];if(B)return this.gameContainer.get(B.injectionKey)})),Object.entries(Ms.n).forEach((([k,{injectionKey:U,manager:F}])=>{B.bind(U).to(F).asSingleton(),this.gameContainer.bind(U).toDynamicValue((()=>B.get(U))).asSingleton()})),this.bindToAlias(Xi._,["4ba-bb34","615-fbad","99d-5e9e"]),this.gameContainer.bind("47d-8c3c").to($a).asSingleton(),this.gameContainer.bind("dcf-fcf7").to(ka).asSingleton(),this.gameContainer.bind("537-28ff").to(Ha).asSingleton(),this.gameContainer.bind("537-28ff").to(Ga).asSingleton(),this.gameContainer.bind("537-28ff").to(Fa).asSingleton(),this.gameContainer.bind("537-28ff").to(Va).asSingleton(),this.gameContainer.bind("537-28ff").to(Wa).asSingleton(),this.gameContainer.bind("537-28ff").to(qa).asSingleton(),this.gameContainer.bind("880-55b2").to(vb),this.gameContainer.bind("33a-f3ca").to(j.xTJ),this.gameContainer.bind("e2e-64d8").to(j.xTJ).asSingleton(),this.gameContainer.bind("03c-6e1e").to(j.xTJ).asSingleton(),this.gameContainer.bind("2e6-0f71").to(on.H).asSingleton(),this.gameContainer.bind("e20-0fb0").to(Wt.E).asSingleton(),this.gameContainer.bind("306-5359").toDynamicValue((()=>this.gameContainer.get("e20-0fb0").player)),this.gameContainer.bind("f1d-f7b1").to(Qt.W).asSingleton(),this.gameContainer.bind("f51-26f1").toConstantValue(new Bt.C),this.gameContainer.bind("3a0-8003").to(_e.F).asSingleton(),this.gameContainer.bind("c47-20b6").to(Ge.Y).asSingleton(),this.gameContainer.bind("b07-2890").to(Zn).asSingleton(),this.gameContainer.bind("b50-4670").to(fi).asSingleton(),this.gameContainer.bind("a05-0e85").to(yi),this.gameContainer.bind("d16-1cb5").to(Ii),this.gameContainer.bind("eb9-3fdf").to(be.g).asSingleton(),this.gameContainer.bind("535-27b9").to(gw).asSingleton(),this.gameContainer.bind("140-ca43").to(tw).asSingleton(),this.gameContainer.bind("438-fe2f").to(sw).asSingleton(),this.gameContainer.bind("438-fe2f").to(JE).asSingleton(),this.gameContainer.bind("438-fe2f").to(iw).asSingleton(),this.gameContainer.bind("438-fe2f").to(ew).asSingleton(),this.gameContainer.bind("1f0-d3d9").to(dt.x).asSingleton(),this.gameContainer.bind("d77-66fb").to(cb.Z).asSingleton(),this.gameContainer.bind("2e2-6ee6").to(Da).asSingleton(),this.gameContainer.bind("3b1-0a3d").to(Na).asSingleton(),this.gameContainer.bind("e59-eea6").to(bb),this.gameContainer.bind(j.t5G.PrefabService).to(j.iNH).asSingleton(),this.gameContainer.bind(j.t5G.PrefabDataProvider).to(sn).asSingleton(),this.gameContainer.bind("d0e-64fd").toConstantValue(new j.wNP(this.gameContainer)),this.gameContainer.bind("b2a-9519").to(Ee.S).asSingleton(),this.gameContainer.bind("db5-fb6e").to(ob).asSingleton(),this.gameContainer.bind("12f-4e29").to(xo.F).asSingleton(),this.gameContainer.bind("30a-d191").toConstantValue(le.t),this.gameContainer.bind("30b-3020").to(j.myN).asSingleton(),this.gameContainer.bind("779-a746").to(Ue.d).asSingleton(),this.gameContainer.bind("636-444c").to(Ye).asSingleton(),this.gameContainer.bind("8ca-a222").to(j.xTJ).asSingleton(),this.gameContainer.bind("ba8-cb5e").to(Le).asSingleton(),this.gameContainer.get("30b-3020").setBaseURI(this.gameContainer.get("be9-3278").getAPIRootUrl()),this.gameContainer.bind("fab-547a").to(zE.O).asSingleton(),this.gameContainer.bind("efb-f022").to(qe).asSingleton(),this.gameContainer.bind("200-7dc0").to(Ys.m).asSingleton(),this.gameContainer.bind("2fb-aa75").to(Fs.u).asSingleton(),this.gameContainer.bind("737-e070").to(Ae).asSingleton(),this.gameContainer.bind("935-4e8b").to(Gs.T).asSingleton(),this.gameContainer.bind("12b-405a").to(Qe.n).asSingleton(),this.gameContainer.bind("7d7-b2cc").to(ce).asSingleton(),this.gameContainer.bind("00d-b27e").to(nn.X).asSingleton(),this.gameContainer.bind("bbf-3165").to(Ls).asSingleton(),this.gameContainer.bind("580-3bea").to(db.b).asSingleton(),this.gameContainer.bind("fa6-b1fc").to(is.m).asSingleton(),this.gameContainer.bind("c35-2f95").to(ww).asSingleton(),this.gameContainer.bind(Ji.Y).to(Ji.F).asSingleton(),this.gameContainer.bind("d1f-4da3").to(Ht.h).asSingleton(),Cf.T.ready.then((()=>{const k=$i.A.useRevisedDifficulty?jt:$t;this.gameContainer.bind("cd4-b78f").to(k).asSingleton()})),this.gameContainer.bind("df9-0276").to(Ri.p).asSingleton(),this.gameContainer.bind("af7-15ba").to(Ui.p).asSingleton(),this.gameContainer.bind("074-dd58").to(Bi).asSingleton(),this.bindToAlias(Fi.A,["af7-15ba","074-dd58"]),this.gameContainer.bind("b1f-9a70").to(Vi.x).asSingleton(),this.gameContainer.bind("639-22b8").to(ow.e).asSingleton(),this.gameContainer.bind("ce9-b630").to(dw).asSingleton(),this.gameContainer.bind("56f-1ccb").to(aw).asSingleton(),this.gameContainer.bind("1e8-b306").to(Tw.L).asSingleton(),this.gameContainer.bind("d69-defe").to(ts.q).asSingleton(),this.gameContainer.bind("2a4-9266").to(Aw).asSingleton(),this.gameContainer.bind("eee-e872").to(qs.U).asSingleton(),this.gameContainer.bind("a02-c2b2").to(Ws.D).asSingleton(),this.gameContainer.bind("8f8-d5bc").to(Cw.B).asSingleton(),this.gameContainer.bind("9ac-9677").to(Bs.M).asSingleton(),this.gameContainer.bind("196-d3a5").to(Us.Q).asSingleton(),this.gameContainer.bind("743-fd51").to(Tl.E).asSingleton(),this.gameContainer.bind("231-9111").to(vw.b).asSingleton(),this.gameContainer.bind("5c7-e02d").to(Hi.W).asSingleton(),this.gameContainer.bind("61f-37d6").to(Vs.U).asSingleton(),this.gameContainer.bind("f45-d827").to($s).asSingleton(),this.gameContainer.bind(Hs.T).to(Hs.T).asSingleton(),this.gameContainer.bind("9ea-3f44").to(cw.v),this.gameContainer.bind("152-d9b2").to(Pw.J),this.gameContainer.bind("295-41dc").to(Lt.o).asSingleton(),this.gameContainer.bind("e03-b0a9").to(Zi.x).asSingleton(),this.gameContainer.bind("ba4-af03").to(rw).asSingleton(),this.gameContainer.bind("5dd-7e25").to(ci).asSingleton(),this.gameContainer.bind("def-6d14").to(Iw).asSingleton(),this.gameContainer.bind("b94-d1b1").to(kt.j).asSingleton(),this.gameContainer.bind("6e9-d1dd").to(Js.W).asSingleton(),this.gameContainer.bind("b58-8066").to(tn.z).asSingleton(),this.gameContainer.get("b58-8066").initListeners(),this.bindToAlias(Se.Gq,["61f-37d6","9ac-9677","8b9-bad1","737-e070","5dd-7e25","098-b402"]),this.gameContainer.bind("48b-b777").to(Se.zj).asSingleton(),this.gameContainer.bind("fc2-cb0a").toConstantValue(new xs.w),this.gameContainer.bind("446-72a7").to(lb._).asSingleton(),this.gameContainer.bind("091-489f").to(ub.J).asSingleton(),this.gameContainer.bind("cc9-a3f0").to(It.W).asSingleton(),this.gameContainer.bind("0f9-dd7b").to(Ks.v).asSingleton(),this.gameContainer.bind("a96-1470").to(Ow.E).asSingleton(),this.gameContainer.bind("a94-4ba3").to(zs.z).asSingleton(),this.gameContainer.bind(Q.SpellLevelDataProvider).to(ge).asSingleton(),this.gameContainer.bind("98d-7b90").to(Q.SpellLevelBonusConstants).asSingleton(),this.gameContainer.bind("e9c-fde5").to(Qi.Z).asSingleton(),this.gameContainer.bind("dce-fce4").to(Te.Z).asSingleton(),this.gameContainer.bind("2a3-4b97").to(xt.Z).asSingleton(),this.gameContainer.bind("e94-c727").to(we.e).asSingleton(),this.gameContainer.bind("4fc-916d").to(Zs.C).asSingleton(),this.gameContainer.bind("7c8-742f").to(Rw.j).asSingleton(),this.gameContainer.bind("e67-6525").to(hw).asSingleton(),this.gameContainer.bind("098-b402").to(ui.m).asSingleton(),this.gameContainer.bind("525-1c48").to(uw.W).asSingleton(),this.gameContainer.bind("a2e-a635").to(Mi.J).asSingleton(),Pt.pF.isNativeApp()?this.gameContainer.bind("5a6-53a5").to(Mt).asSingleton():this.gameContainer.bind("5a6-53a5").to(Nt).asSingleton();try{(new zi.k).installBindings()}catch(e){j.VyI.log(e,j.$bb.Error)}}postCacheInit(){this.gameContainer.bind("05c-8928").toConstantValue(this.game.cache),this.gameContainer.bind(j.t5G.AssetLoader).to(XR.A).asSingleton(),this.gameContainer.bind("784-6416").to(YR).asSingleton(),this.gameContainer.bind("142-6aaf").to(Oo).asSingleton()}}var JR=U(19850);class tP extends Ar.H{constructor(k,B,U,F){super(k,B,U,F),this.robot=null,this.robot=this.add(K.q.instance.prodigy.create.sprite(-100,-200,q._.Game_dancedance_json,"pose1-1",void 0,this.onTextureLoaded.bind(this))),this.setPose(-3)}onTextureLoaded(k){k&&(k.animations.add("-3",["pose2-1"],1,!0,!1),k.animations.add("-2",["poseSuccess"],1,!0,!1),k.animations.add("-1",["poseFail"],1,!0,!1),k.animations.add("0",["pose0-1","pose0-2"],1,!0,!1),k.animations.add("1",["pose1-1","pose1-2"],1,!0,!1),k.animations.add("2",["pose2-1","pose2-2"],1,!0,!1),k.animations.add("3",["pose3-1","pose3-2"],1,!0,!1),k.animations.add("4",["pose4-1","pose4-2"],1,!0,!1),k.animations.add("5",["pose5-1","pose5-2"],1,!0,!1),k.animations.add("6",["pose6-1","pose6-2"],1,!0,!1),k.animations.add("7",["pose7-1","pose7-2"],1,!0,!1),k.animations.add("8",["pose8-1","pose8-2"],1,!0,!1),k.animations.add("9",["pose9-1","pose9-2"],1,!0,!1))}setPose(k){this.robot.animations.play(`${k}`,2.15,!0),-1===k&&this.game.add.tween(this.robot,this).to({x:-105},100,j.GS3.Linear.None).to({x:-95},100,j.GS3.Linear.None).to({x:-105},100,j.GS3.Linear.None).to({x:-95},100,j.GS3.Linear.None).to({x:-105},100,j.GS3.Linear.None).to({x:-95},100,j.GS3.Linear.None).to({x:-100},100,j.GS3.Linear.None).start(),-2===k&&this.game.add.tween(this.robot,this).to({y:-230},250,j.GS3.Linear.None,!0,0,1,!0)}}class eP extends Ar.H{constructor(k,B,U,F,G){super(k,B),this.startCallback=null,this.instructionsCallback=null,this.cancelCallback=null,this.menu=null,this.yes=null,this.difficulty=null,this.startCallback=U,this.cancelCallback=G,this.instructionsCallback=F;const j=this.add(K.q.instance.prodigy.create.sprite(0,0,q._.General_core_json,"overlay-small"));j.alpha=.5,j.width=this.game.width,j.height=this.game.height;K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("key",2)>0?this.createMenu():this.giveItem()}giveItem(){const k=K.q.instance.prodigy.dialogue.create();k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_GET_ROBOT_0"),face:4,anim:4}),k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_GET_ROBOT_1"),face:2}),k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_GET_ROBOT_2"),face:1,audio:{tag:Z.c.Voice_0,s:8,d:2}}),k.setText({callback:()=>{K.q.instance.prodigy.open.gotItem([{type:"key",ID:2,lvl:1}],(()=>{const k=K.q.instance.prodigy.dialogue.create();k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_GET_ROBOT_3"),face:1}),k.setText({callback:()=>{this.createMenu()}}),k.startDeprecated("boombox")}))}}),k.startDeprecated("boombox")}createMenu(){j.Aq$.isDefined(this.menu)&&this.menu.destroy(),this.menu=K.q.instance.prodigy.create.element(this,465,220),K.q.instance.prodigy.create.panel(this.menu,0,0,7,5),K.q.instance.prodigy.create.textButton(this.menu,25,20,{size:fo.MED,icon:{type:"key",ID:2},text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MINI_GAME_BUTTON_START")},(()=>{this.createDifficulty()})),K.q.instance.prodigy.create.textButton(this.menu,25,100,{size:fo.MED,icon:"star",text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MINI_GAME_BUTTON_HOW_TO")},(()=>{this.instructionsCallback()})),K.q.instance.prodigy.create.textButton(this.menu,25,180,{size:fo.MED,icon:"back",text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MINI_GAME_BUTTON_CANCEL")},(()=>{this.cancelCallback()}))}createDifficulty(){const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;j.Aq$.isDefined(this.menu)&&this.menu.destroy(),this.menu=K.q.instance.prodigy.create.element(this,390,220);let U=B.backpack.getKeyItemData(2,"lvl");j.Aq$.isDefined(U)||(U=1),K.q.instance.prodigy.create.panel(this.menu,0,0,10,6),K.q.instance.prodigy.create.font(this.menu,110,20,k.getText("DANCE_DANCE_CHOOSE_DIFFICULTY"),{size:36,fontID:9}),K.q.instance.prodigy.create.font(this.menu,110,60,k.getText("DANCE_DANCE_HIGHER_LEVEL")),this.menu.add(K.q.instance.prodigy.create.sprite(10,10,Ut.E.getIconForType("key",2)));for(let F=0;F<5;F++){const B=90*F+30;U>=F+1?K.q.instance.prodigy.create.stackButton(this.menu,B,110,[{tag:"star2"},{text:`${F+1}`,y:20,size:30}],(()=>{this.chooseDifficulty(F+1)})):K.q.instance.prodigy.create.stackButton(this.menu,B,110,[{tag:"empty",x:15,y:15},{text:`${F+1}`,y:20,size:30}],(()=>{K.q.instance.prodigy.open.message(k.getText("DANCE_DANCE_MESSAGE_LEVEL_BODY"),null,null,k.getText("MESSAGE_TITLE_UH_OH"))}))}K.q.instance.prodigy.create.textButton(this.menu,40,230,{size:fo.SMALL,icon:"back",text:k.getText("DANCE_DANCE_BUTTON_BACK")},(()=>{this.createMenu()})),K.q.instance.prodigy.create.textButton(this.menu,260,230,{size:fo.SMALL,icon:"yes",text:k.getText("DANCE_DANCE_BUTTON_GO")},(()=>{this.tryStart()})),this.yes=this.menu.add(K.q.instance.prodigy.create.sprite(0,170,q._.General_icons_json,"yes")),this.yes.width=this.yes.height=25,this.chooseDifficulty(Math.min(U,5))}chooseDifficulty(k){this.difficulty=k,this.yes.x=90*k-10}tryStart(){j.Aq$.isDefined(this.menu)&&this.menu.destroy();const k=K.q.instance.prodigy.dialogue.create();k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_READY_TO_START"),face:4,yes:this.openBoosts.bind(this,200),no:this.createMenu.bind(this),type:Ti.fA.START}),k.startDeprecated("boombox")}openBoosts(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!j.Aq$.isDefined(k)||B.getGold()>=k){if(j.Aq$.isDefined(k)){B.changeGold(-k);const U=K.q.instance.prodigy.gameContainer.get("c47-20b6");U.economy.sendMinigameEvent("dance-dance",!0);const F={item_id:"0",item_name:"Gold",item_type:"currency",item_count:k,instance_type:Ai.N.Interface,instance_id:""};U.item.sendItemRemovedEvent(0,F.item_name,F.item_type,F.item_count,{sink_id:U.economy.getCurrentMinigameInstanceID(),sink_type:gn.C.MiniGame,instance_type:Ai.N.Interface,instance_id:""})}const U=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),F=[{icon:{type:"item",ID:47},d:U.getText("BOOST_DESCRIPTION_MORE_GEARS")},{icon:{type:"fossil",ID:1},d:U.getText("BOOST_DESCRIPTION_SLOW_TIME")},{icon:"star2",d:U.getText("BOOST_DESCRIPTION_MULTIPLIER")}];K.q.instance.prodigy.open.boostSelect(F,(k=>{this.startCallback(this.difficulty,k)}))}else{const k=K.q.instance.prodigy.dialogue.create();k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MINI_GAME_NOT_ENOUGH_GOLD"),face:3,anim:1,audio:{tag:Z.c.Voice_0,s:10,d:2}}),k.setText({callback:()=>{this.createMenu()}}),k.startDeprecated("boombox")}}}class iP extends Ar.H{constructor(k,B,U,F,G){super(k,B,U,F),this.currentPose=1,this._isDancePoseShown=!0,this.onSelect=null,this.frame=null,this.sprite=null,this.currentTint=14080234,this.onSelect=G,this.frame=this.add(K.q.instance.prodigy.create.sprite(0,0,q._.Game_dancedance_json,"pose-card")),this.frame.events.onInputDown.add(this.select.bind(this)),this.sprite=this.add(K.q.instance.prodigy.create.sprite(10,10,q._.Game_dancedance_json,"card0")),this.sprite.width=0,this.sprite.x=50,this.sprite.alpha=.9}randomPose(k,B){const U=k<3?4:3===k?6:4===k?8:10;this.currentTint=14080234;for(let F=0;F<100;F++){this.currentPose=Math.floor(Math.random()*U),this.currentTint=iP.TINTS[Math.floor(Math.random()*iP.TINTS.length)];let k=!1;for(let U=0;U{this.frame.inputEnabled=!0}),this),k.start()}equals(k){return j.Aq$.isDefined(k)&&(k.currentPose===this.currentPose||k.currentTint===this.currentTint&&14080234!==k.currentTint)}select(){j.Aq$.isDefined(this.onSelect)&&(K.q.instance.prodigy.audio.playSFX(18,"pop"),this.onSelect(),this.frame.y=-15,this.sprite.y=-5)}}iP.TINTS=[14254209,9946096,8444311,16755318,15788439,13080560];class sP extends Ar.H{constructor(k,B,U,F){super(k,B,U,F),this.pose=null,this.bar1=null,this.bar2=null,this.callback=null,this.startTime=null,this.targetTime=null,this.pose=new iP(this.game,this,0,0),this.pose.flip(),this.bar1=this.add(K.q.instance.prodigy.create.sprite(0,34,q._.General_core_json,"overlay-light")),this.bar1.anchor.set(1,0),this.bar2=this.add(K.q.instance.prodigy.create.sprite(100,34,q._.General_core_json,"overlay-light")),this.bar1.height=this.bar2.height=30,this.bar1.width=this.bar2.width=244,this.bar1.alpha=this.bar2.alpha=.7,this.bar1.tint=this.bar2.tint=8768643}start(k,B,U){this.pose.randomPose(k,[]),this.callback=U;let F=2.5-.35*(k-1);F+=B,F*=1e3,this.bar1.width=this.bar2.width=244;const G=this.game.add.tween(this.pose,this).to({y:-10},250,j.GS3.Quadratic.Out).to({y:0},250,j.GS3.Quadratic.In);return G.onTweenComplete.addOnce(this.beginTimer.bind(this,F),this),G.start(),this.pose}update(){if(super.update(),j.Aq$.isDefined(this.bar1)&&j.Aq$.isDefined(this.bar2)&&j.Aq$.isDefined(this.targetTime)){const k=(new Date).getTime();if(k>=this.targetTime)this.bar1.width=this.bar2.width=0,this.targetTime=null,this.callback();else{const B=(this.targetTime-k)/(this.targetTime-this.startTime),U=Math.floor(244*B);this.bar1.width=this.bar2.width=U}}}beginTimer(k){this.startTime=(new Date).getTime(),this.targetTime=(new Date).getTime()+k}}class nP extends gf.f{constructor(){super("The Stage",q._.Game_dancedance_json,[q._.Game_dancedance_json,X.V.Bgm_dance1,X.V.Bgm_dance2,Z.c.Sfx_dance_dance]),this.startedSpeed=!1,this.danceBots=[],this.menu=null,this.timer=null,this.gearBar=null,this.bonusBar=null,this.scoreText=null,this.highScoreText=null,this.multiplier=null,this.gearBonus=null,this.maxMultiplier=null,this.speedOffset=null,this.currentScore=0,this.startTime=null,this.finishTime=null,this.speedTime=null,this.timeDelay=null,this.poses=[],this.processLightEvent=null,this.difficulty=null,this.poseContainer=null,this.correctPose=null,this.correct=null,this.answerID=null,this.lights=null}create(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;K.q.instance.prodigy.audio.pauseBGM(),k.saveEnabled=!1,super.create([q._.Game_dancedance_json,X.V.Bgm_dance1,X.V.Bgm_dance2])}screenSetup(){super.screenSetup(),this.background.addChild(K.q.instance.prodigy.create.sprite(0,0,q._.Game_dancedance_json,"bg")),this.danceBots=[],this.danceBots.push(new tP(this.prodigyGame,this.content,260,285)),this.danceBots.push(new tP(this.prodigyGame,this.content,640,420)),this.danceBots.push(new tP(this.prodigyGame,this.content,1030,285)),this.danceBots[0].scale.x=this.danceBots[0].scale.y=.5,this.danceBots[2].scale.x=this.danceBots[2].scale.y=.5,this.danceBots[0].setPose(1),this.danceBots[2].setPose(1),this.menu=new eP(this.prodigyGame,this.content,((k,B)=>{this.startGame(k,B)}),(()=>{this.showInstructions()}),(()=>{this.returnToLamplight()}))}shutdown(){this.prodigyGame.time.events.remove(this.processLightEvent),this.danceBots=[],this.menu=null,this.timer=null,this.gearBar=null,this.bonusBar=null,this.scoreText=null,this.highScoreText=null,this.poses=[],this.processLightEvent=null,this.lights=null,super.shutdown()}showInstructions(){this.menu.visible=!1;const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),B=K.q.instance.prodigy.dialogue.create();B.setText({text:k.getText("DANCE_DANCE_INSTRUCTIONS_0"),face:0,anim:4}),B.setText({text:k.getText("DANCE_DANCE_INSTRUCTIONS_1"),face:1,anim:0}),B.setText({text:k.getText("DANCE_DANCE_INSTRUCTIONS_2"),face:2,anim:0}),B.setText({callback:()=>{this.menu.visible=!0}}),B.startDeprecated("boombox")}createUI(k){const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.timer=new sP(this.prodigyGame,this.content,590,30),this.gearBar=K.q.instance.prodigy.create.fillBar(this.content,65,415,34,250,1,(k=>{let B=50;for(let U=2;U<=k;U++)B+=Math.max(0,Math.floor(U/9*5*100));return k>=10&&(B=-1),{target:B,text:`${k}`}}),15975263,"star2",.7,!0);const U=B.backpack.getKeyItemData(2,"gears");this.gearBar.setValue(j.Aq$.isDefined(U)?U:0);const F=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService);this.bonusBar=K.q.instance.prodigy.create.fillBar(this.content,1181,415,34,250,1,(B=>{let U=15975263,G=Math.max(0,5*B);return B>=k&&(G=-1),B<=1&&(U=15157320),{target:G,color:U,text:B<=1?F.getText("DANCE_DANCE_UH_OH"):"x"+(B-1)}}),15314234,{type:"item",ID:47},.7,!0,(k=>{this.setMultiplier(k)})),this.bonusBar.setValue(5);const G=K.q.instance.prodigy.create.element(this.content,20,20);G.addChild(new ur.k(K.q.instance.game,0,0,Ut.E.getIconForType("item",47),null)),this.scoreText=K.q.instance.prodigy.create.font(G,80,0,"0",{size:36,fontID:9});const $=B.backpack.getKeyItemData(2,"score"),H=K.q.instance.prodigy.create.element(this.content,this.game.width-300-20,20);H.addChild(new ur.k(K.q.instance.game,220,0,Ut.E.getIconForType("item",47),null)),this.highScoreText=K.q.instance.prodigy.create.font(H,0,0,`${j.Aq$.isDefined($)?$:0}`,{size:36,fontID:9,align:"center",width:300}),K.q.instance.prodigy.create.font(H,0,40,K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_BEST_SCORE"),{size:16,width:220,align:"right"})}setMultiplier(k){k>1?K.q.instance.prodigy.audio.playSFX(11,"yay"):j.Aq$.isDefined(this.multiplier)&&this.multiplier!==k&&K.q.instance.prodigy.audio.playSFX(11,"aw"),this.multiplier=k}startGame(k,B){this.menu.visible=!1,this.gearBonus=0===B?1:0,this.speedOffset=1===B?.25:0,this.maxMultiplier=2===B?5:4,this.createUI(this.maxMultiplier),this.processLightEvent=this.prodigyGame.time.events.loop(500,this.processLights,this,[]),this.startTime=(new Date).getTime(),this.finishTime=this.startTime+7e4,this.speedTime=this.startTime+4e4,this.timeDelay=1500,this.currentScore=0,this.setDifficulty(k),K.q.instance.prodigy.audio.playBGM(6,!0),K.q.instance.prodigy.audio.playSFX(11,"ready"),K.q.instance.prodigy.effects.flashText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_READY"),(()=>{K.q.instance.prodigy.audio.playSFX(11,"go"),K.q.instance.prodigy.effects.flashText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_START")),this.nextPose()}))}endGame(k){this.timer.visible=!1;for(let B=0;B{this.finalize(k)}))}finalize(k){const B=K.q.instance.prodigy.dialogue.create(),U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(k){const k=U.backpack.getKeyItemData(2,"score");(!j.Aq$.isDefined(k)||k1?B.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_LOWER_DIFFICULTY"),face:3,audio:{tag:Z.c.Voice_0,s:10,d:2}}):B.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_TRY_AGAIN"),face:3,audio:{tag:Z.c.Voice_0,s:10,d:2}}),B.setText({callback:()=>{this.returnToLamplight()}});B.startDeprecated("boombox")}finishFill(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=k.backpack.getKeyItemData(2,"lvl"),U=this.gearBar.getLevel(),F=K.q.instance.prodigy.dialogue.create();if(k.backpack.setKeyItemData(2,"gears",this.gearBar.getValue()),U>B){const G=[{type:"gold",N:500*(U-B)}];k.backpack.setKeyItemData(2,"lvl",U),U<5?F.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_LEVEL_UP_UNDER_5",U),face:4,anim:4,audio:{tag:Z.c.Voice_0,s:5,d:3}}):U<10?F.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_LEVEL_UP_UNDER_10"),face:4,anim:4,audio:{tag:Z.c.Voice_0,s:5,d:3}}):(F.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_LEVEL_UP_MAX"),face:4,anim:4,audio:{tag:Z.c.Voice_0,s:8,d:2}}),G.push({type:"hat",ID:47}),G.push({type:"outfit",ID:42})),F.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_REWARD"),face:1}),F.setText({callback:()=>{K.q.instance.prodigy.open.gotItem(G,(()=>{this.returnToLamplight()}),null,"dance-dance",null,null,{source_type:gn.C.MiniGame})}})}else B<10?F.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_TRY_NEW_DIFFICULTY"),face:4}):F.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_MAX_LEVEL"),face:4,anim:4,audio:{tag:Z.c.Voice_0,s:8,d:2}}),F.setText({callback:()=>{this.returnToLamplight()}});F.startDeprecated("boombox")}setDifficulty(k){this.difficulty=k,this.poseContainer=K.q.instance.prodigy.create.element(this.content,0,600);const B=k<3?3:k<5?4:5;this.poses=[];for(let U=0;U{this.pose()}));this.correctPose=k.currentPose,this.correct=Math.floor(Math.random()*this.poses.length);const B=[k];for(let U=0;U5)this.bonusBar.setValue(5);else{if(this.bonusBar.addValue(-1)<=0)return void this.endGame(!1)}const B=(new Date).getTime();B>this.finishTime?this.endGame(!0):(B>this.speedTime&&(this.startedSpeed||(this.startedSpeed=!0,this.speedOffset-=.25,K.q.instance.prodigy.effects.flashText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DANCE_DANCE_SPEED_UP")),K.q.instance.prodigy.audio.playBGM(7,!0)),this.timeDelay=Math.max(500,this.timeDelay-150)),this.prodigyGame.time.events.addTimer(this.timeDelay,this.nextPose,this))}processLights(){if(!j.Aq$.isDefined(this.lights)){this.lights=[];for(let k=0;k<3;k++)this.lights.push(this.background.addChild(K.q.instance.prodigy.create.sprite(0,0,q._.General_icons_json,"empty"))),this.lights[k].alpha=.25;this.lights[0].tint=14492708,this.lights[1].tint=15396941,this.lights[2].tint=5107440}const k=[$.sample(nP.RED_LIGHTS),$.sample(nP.YELLOW_LIGHTS),$.sample(nP.BLUE_LIGHTS)];for(let B=0;B<3;B++)this.lights[B].x=k[B].x-25,this.lights[B].y=k[B].y-25}returnToLamplight(){K.q.instance.prodigy.world.it("lamplight-B4",660,400)}}nP.RED_LIGHTS=[{x:192,y:65},{x:403,y:40},{x:613,y:68},{x:791,y:83},{x:908,y:88},{x:408,y:539},{x:887,y:538}],nP.YELLOW_LIGHTS=[{x:118,y:47},{x:318,y:78},{x:376,y:164},{x:744,y:79},{x:1103,y:139},{x:1129,y:49},{x:1232,y:39},{x:305,y:474},{x:746,y:572}],nP.BLUE_LIGHTS=[{x:66,y:37},{x:338,y:119},{x:396,y:183},{x:652,y:72},{x:1039,y:97},{x:1071,y:38},{x:548,y:571},{x:984,y:476}];var aP=U(46);class rP extends Ar.H{constructor(k,B,U,F,G){super(k,B,440,150),this.startCallback=U,this.instructionsCallback=F,K.q.instance.prodigy.create.panel(this,25,25,7,6),K.q.instance.prodigy.create.textButton(this,50,50,{size:fo.MED,atlas:Ut.E.getIconForType("key",1),singleImage:!0,text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MINI_GAME_BUTTON_START")},this.tryStart.bind(this)),K.q.instance.prodigy.create.textButton(this,50,130,{size:fo.MED,icon:"star",text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MINI_GAME_BUTTON_HOW_TO")},this.instructions.bind(this)),K.q.instance.prodigy.create.textButton(this,50,250,{size:fo.MED,icon:"back",text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MINI_GAME_BUTTON_CANCEL")},G)}tryStart(){this.visible=!1;const k=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),B=K.q.instance.prodigy.dialogue.create(),U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;oP.getNewFossils(U.backpack).length<=0?(B.setText({text:k.getText("DYNO_DIG_START_NO_MORE_FOSSILS"),face:3,yes:this.start.bind(this,200),no:()=>{this.visible=!0},type:Ti.fA.START}),B.startDeprecated("scoog")):(B.setText({text:k.getText("DYNO_DIG_READY_TO_START"),face:3,yes:this.start.bind(this,300),no:()=>{this.visible=!0},type:Ti.fA.START}),B.startDeprecated("scoog"))}start(k){this.visible=!0;const B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!j.Aq$.isDefined(k)||B.getGold()>=k){if(j.Aq$.isDefined(k)){B.changeGold(-k);const U=K.q.instance.prodigy.gameContainer.get("c47-20b6");U.economy.sendMinigameEvent("dino-dig",!0);const F={item_id:"0",item_name:"Gold",item_type:"currency",item_count:k,instance_type:Ai.N.Interface,instance_id:""};U.item.sendItemRemovedEvent(0,F.item_name,F.item_type,F.item_count,{sink_id:U.economy.getCurrentMinigameInstanceID(),sink_type:gn.C.MiniGame,instance_type:Ai.N.Interface,instance_id:""})}this.startCallback()}else{const k=K.q.instance.prodigy.dialogue.create();k.setText({callback:()=>{this.visible=!1}}),k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MINI_GAME_NOT_ENOUGH_GOLD"),face:3}),k.setText({callback:()=>{this.visible=!0}}),k.startDeprecated("scoog")}}instructions(){j.Aq$.isDefined(this.instructionsCallback)&&this.instructionsCallback()}}class oP extends gf.f{constructor(){super("game-dino",q._.Game_dinodig_json,[q._.Game_dinodig_json,X.V.Bgm_game,q._.Npc_sprite_scoog_json,"reduced-outfit-male-39","reduced-outfit-female-39",Z.c.Sfx_dino_dig]),this.area=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],this.digging=!1,this.walkSpeed=1,this.fossilOff=0,this.power=0,this.targetDigs=0,this.digs=0}create(){super.create();const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;K.q.instance.prodigy.audio.pauseBGM(),k.saveEnabled=!1}screenSetup(){super.screenSetup(),this.path=new aP.C(this.area),this.bg=K.q.instance.prodigy.create.sprite(0,0,q._.Game_dinodig_json,"bg"),this.bg.inputEnabled=!0,this.bg.events.onInputDown.add(this.listener,this),this.background.addChild(this.bg),this.npc=new TT(this.prodigyGame,this.content,130,640,{atlasGuid:q._.Npc_sprite_scoog_json,name:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("NPC_NAME_SCOOG")});const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.playerContainer=K.q.instance.prodigy.create.player(this.content,k,1,600,350,!1,{hideMount:!0}),this.playerContainer.setup(),this.playerContainer.hideName(),this.playerContainer.OnLoad.addOnce((()=>this.playerContainer.forceOutfit({weapon:96})));for(let F=0;Fthis.onPathFound(k))).catch(j.RQr.createHandler("Unable to find path"))}}shutdown(){this.targetCoords=null,this.menu=null,this.item=null,this.text=null,this.playerContainer=null,this.npc=null,this.digBtn=null,this.timer=null,this.botPanel=null,this.rewards=[],this.bg=null,this.path=null,super.shutdown()}showUI(k){this.npc.visible=this.playerContainer.visible=this.timer.visible=this.botPanel.visible=k,this.menu.visible=!k}onPathFound(k){if(j.Aq$.isDefined(k)){const B=Math.floor(k[0].x/20),U=Math.floor(k[0].y/20);this.digBtn.visible=!1,1===this.area[U][B]&&this.playerContainer.setPath(k,this.askDig.bind(this,!0,B,U),this.walkSpeed)}}showInstructions(){this.showUI(!0);const k=K.q.instance.prodigy.dialogue.create();k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_INSTRUCTIONS_0"),face:0,anim:4}),k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_INSTRUCTIONS_1"),face:2}),k.setText({callback:this.dig.bind(this)}),k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_INSTRUCTIONS_2"),face:0}),k.setText({callback:this.showDigButton.bind(this)}),k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_INSTRUCTIONS_3"),face:0}),k.setText({callback:this.dig.bind(this)}),k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_INSTRUCTIONS_4"),face:1}),k.setText({callback:this.timer.blink.bind(this.timer)}),k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_INSTRUCTIONS_5"),face:1,anim:2}),k.setText({callback:this.showUI.bind(this,!1)}),k.startDeprecated("scoog")}showDigButton(){this.digBtn.visible=!0}showBoosts(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=oP.getNewFossils(k.backpack);this.showUI(!0);const U=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),F=[{icon:{type:"boots",ID:7},d:U.getText("BOOST_DESCRIPTION_WALK_FASTER")},B.length>0?{icon:{type:"fossil",ID:1},d:U.getText("BOOST_DESCRIPTION_MORE_FOSSILS")}:null,{icon:{type:"key",ID:1},d:U.getText("BOOST_DESCRIPTION_DIG_FASTER")}];K.q.instance.prodigy.open.boostSelect(F,this.startGame.bind(this))}static getNewFossils(k){const B=[],U=le.t.getCategoryItems("fossil"),F=k.getBackpackItemsByType("fossil");for(let G=0;G0)continue;let H=$.data.count;for(let k=0;k=this.targetDigs){K.q.instance.prodigy.audio.playSFX(18,"heart"),this.rewards.push(this.item),this.timer.setMsg(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_ITEMS_RECOVERED",this.rewards.length));const k=K.q.instance.prodigy.icon.createFromData(this.item,20*this.digX+10,20*this.digY+10,{x:0,y:0});this.uiLayer.addChild(k),k.scale.x=k.scale.y=0;const B=(this.rewards.length-1)%5*60+995,U=50*Math.floor((this.rewards.length-1)/5)+630;this.prodigyGame.add.tween(k.scale,k).to({x:1.2,y:1.2},1e3,j.GS3.Quadratic.Out).to({x:.8,y:.8},1e3,j.GS3.Quadratic.In).start(),this.prodigyGame.add.tween(k,k).to({x:B,y:U},2e3,j.GS3.Quadratic.Out).start(),this.rewards.length%3==0&&this.extendTime(),this.digging=!1,this.setNextDig()}else this.digBtn.x=this.playerContainer.x-40,this.digBtn.y=this.playerContainer.y<160?this.playerContainer.y:this.playerContainer.y-160,this.digBtn.visible=!0;else this.digging=!1}extendTime(){this.timer.addTime(15e3),this.timer.pause();const k=K.q.instance.prodigy.dialogue.create();k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_EXTEND_TIME"),face:1,anim:4,audio:sA.AUDIO[1]}),k.setText({callback:this.resumeTimer.bind(this)}),k.startDeprecated("scoog")}resumeTimer(){this.timer.resume()}endGame(){K.q.instance.prodigy.audio.playSFX(12,"bell"),K.q.instance.prodigy.audio.pauseBGM(),this.digBtn.visible=!1,this.playGame=!1,K.q.instance.prodigy.effects.flashText(K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_TIMES_UP"),this.end.bind(this)),K.q.instance.prodigy.gameContainer.get("c47-20b6").economy.sendMinigameEvent("dino-dig",!1)}end(){const k=K.q.instance.prodigy.dialogue.create();this.rewards.length>0?(k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_TIMES_UP_REWARD"),face:1,anim:2}),k.setText({callback:K.q.instance.prodigy.open.gotItem.bind(K.q.instance.prodigy.open,this.rewards,this.examineResults.bind(this),null,"dino-dig",null,null,{source_type:gn.C.MiniGame})})):(k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("DYNO_DIG_TIMES_UP_TRY_AGAIN"),face:2}),k.setText({callback:this.toDino.bind(this)})),k.startDeprecated("scoog")}examineResults(){let k=!1;for(let U=0;U{var k;K.q.instance.prodigy.gameContainer.get("cfe-9c2c").setState(hP.zM.None),(null===(k=this._lootDashMenuData)||void 0===k?void 0:k.matchType)!==hP.B1.QuickQuiz&&K.q.instance.prodigy.world.teleportToCurrentMap()}}}var lP=U(52551),uP=U(43333);class fP extends gf.f{init(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){j.C1c.markTextureGarbageCollectionFrame();j.wa5.getActiveScene().container.parent=K.q.instance.prodigy.gameContainer,this._backgroundSprite=k,this._playerProgress=B}))}create(){super.create(),this._backgroundSprite?this.background.addChild(this._backgroundSprite):this.background.addChild((new V.Graphics).beginFill(16755387).drawRect(0,0,this.game.width,this.game.height).endFill());let k=lP.w.getConfig(hP.B1.QuickQuiz).quickQuizConfigs.transportModalDurationMs;const B=K.q.instance.prodigy.open.prefabMenu(Ei.l.LootDashTransportModal,void 0,!0,!0,void 0,{[tr.n7.TimeRemainingMs]:k},{interfaceName:ph.B.LootDashTransportModal,interfaceType:bi.Wm.Modal,originType:bi.$N.AutoSurfaced,instanceType:Ai.N.UI},!0),U=K.q.instance.prodigy.gameContainer.get("cfe-9c2c");B.onPrefabLoaded.addOnce((k=>{const B=k.findComponentInChildren(uP.U);U.transportModalTimer=B,B.onTimerCompleted.addOnce((()=>{U.transportModalTimer=void 0,k.destroyDeferred(),K.q.instance.prodigy.open.lootDashMenu({immediateStart:!0,matchType:hP.B1.QuickQuiz,playerProgress:this._playerProgress})}))}))}}var bP=U(64794),pP=U(81670),vP=U(39785);class gP{static shouldRollForMagicoinBattleRewards(k,B,U){return!!k&&(!U&&!!gP.ELIGIBLE_BATTLE_TYPES.includes(B))}}gP.ELIGIBLE_BATTLE_TYPES=[Ni.gu.Basic,Ni.gu.MatchmakingDuel,Ni.gu.MatchmakingBotDuel,Ni.gu.NormalRiftRun,Ni.gu.BossRiftRun,Ni.gu.DarkTower];var mP=U(88059),yP=U(75172),_P=U(61468),EP=U(24047),wP=U(38340),TP=U(96711),SP=U(60155);class AP extends SP.V{getBattlePrefab(){return Ei.l.RevampTutorialBattleScene}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k),this._tutorialControllerComponent=this._prefabRoot.findComponentInChildren(TP.K)}))}}var CP,OP=U(63046),IP=U(95807);class DP extends IP.Z{constructor(k){super(),this._dialogue=k}enter(){Ti.rD.runDialogueSequence(this._dialogue,(()=>this.stateMachine.goToState(OP.B)))}}class RP extends IP.Z{constructor(k){super(),this._promise=k}enter(){this._promise.then((()=>this.stateMachine.goToState(OP.B))).catch((k=>{j.RQr.logError(k,"Error waiting for promise"),this.stateMachine.showThrownErrorDialog(k)}))}}!function(k){k.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_1="DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_1",k.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_2="DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_2",k.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_3="DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_3",k.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_4="DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_4"}(CP||(CP={}));const PP={[CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_1]:ah.B.Voice_theo_ftue_status_effect_battle_1,[CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_2]:ah.B.Voice_theo_ftue_status_effect_battle_2,[CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_3]:ah.B.Voice_theo_ftue_status_effect_battle_3,[CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_4]:ah.B.Voice_theo_ftue_status_effect_battle_4};var MP,NP,xP;!function(k){k[k.Initialize=0]="Initialize",k[k.HighlightSpellCardWithStatusEffect=1]="HighlightSpellCardWithStatusEffect",k[k.HighlightTarget=2]="HighlightTarget",k[k.TargetClicked=3]="TargetClicked",k[k.InvestigateStatusEffect=4]="InvestigateStatusEffect",k[k.ViewTooltip=5]="ViewTooltip",k[k.EnemyTakesSpellEffectDamage=6]="EnemyTakesSpellEffectDamage",k[k.EnemyPetFiresBack=7]="EnemyPetFiresBack",k[k.FinalDialogue=8]="FinalDialogue",k[k.End=9]="End"}(MP||(MP={})),function(k){k[k.Step0PositionX=260]="Step0PositionX",k[k.Step0PositionY=520]="Step0PositionY",k[k.Step1PositionX=965]="Step1PositionX",k[k.Step1PositionY=345]="Step1PositionY"}(NP||(NP={})),function(k){k[k.PositionX=720]="PositionX",k[k.PositionY=325]="PositionY",k[k.Width=360]="Width",k[k.Height=200]="Height"}(xP||(xP={}));const LP=44,kP=-48;var BP=U(5885);class UP extends SP.V{initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k),this._bossID=this.rightTeam.units.find((k=>k.type===Ni.uj.Boss||k.type===Ni.uj.Wizard)).data.asset.id}))}onVictory(k,B,U){const F=Object.create(null,{onVictory:{get:()=>super.onVictory}});return(0,G.sH)(this,void 0,void 0,(function*(){yield this.showBossChest(),yield this.showRouletteMenu(),yield F.onVictory.call(this,k,B,U)}))}showBossChest(){return(0,G.sH)(this,void 0,void 0,(function*(){this.rightTeam.units.forEach((k=>{k.creature.creatureGameObject.active=!1,k.uiContent.active=!1}));const k=yield K.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(Ei.l.BossChest,this._prefabRoot);k.legacyTransform.x=UP.BOSS_CHEST_POSITION_X,k.legacyTransform.y=UP.BOSS_CHEST_POSITION_Y,yield k.findComponentInChildren(BP.E).onOpenComplete.asPromise(),k.active=!1}))}showRouletteMenu(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=this._gameDataProvider.getItem("boss",this._bossID).data;if(!k)return j.VyI.log("Boss data not found for the roulette menu",j.$bb.Error),Promise.reject();const B=k.adventureRewards,U=new j.bnh;return K.q.instance.prodigy.open.bossRewards(B,Ai.N.EndOfBattle,void 0,void 0,void 0,(()=>{U.resolve()})),U}))}}UP.BOSS_CHEST_POSITION_X=900,UP.BOSS_CHEST_POSITION_Y=390;var FP,GP=U(24652),jP=U(8394);!function(k){k.Start="Start",k.Taunt="Taunt",k.Win="Win",k.Lose="Lose"}(FP||(FP={}));var $P=U(16495),HP=U(74958),VP=U(90614),WP=U(40671),qP=U(8693),KP=U(63761),zP=U(92611),YP=U(52855),QP=U(42430);function XP(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=new j._mx(k).addComponent(QP.o);return U.spellGUID=B,yield U.preloadAssets(),U}))}function ZP(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){var F,j,$;const H=B.data,V=null!==(j=null===(F=B.creature)||void 0===F?void 0:F.teleportType)&&void 0!==j?j:KP.H0.Astral,W=B.controllerUnit,q=B.scale;return B.creature instanceof zP.N&&(null===($=B.creature.followContainer)||void 0===$||$.destroy()),B.setData(Object.assign(Object.assign({teamId:k.id,element:Q.EElementType.Shadow,level:1,stats:{[Q.EStat.Hp]:1,[Q.EStat.Mp]:1,[Q.EStat.Power]:1,[Q.EStat.Defence]:1,[Q.EStat.Speed]:1,[Q.EStat.Accuracy]:1,[Q.EStat.Dodge]:1,[Q.EStat.CritChance]:1,[Q.EStat.Initiative]:5},spells:[],health:{current:1,max:1},mp:{current:1,max:1},catchChance:0,unitId:U},H),{type:Ni.uj.Object,asset:{type:"spine",id:U}}),KP.H0.Shadow,W,.5),yield B.loadPromise,()=>(0,G.sH)(this,void 0,void 0,(function*(){B.setData(H,V,W,q),yield B.loadPromise,B.creature instanceof zP.N&&B.creature.followContainer&&(B.creature.followContainer.alpha=0)}))}))}function JP(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){return j.Aq$.isDefined(B.creature.castSpellSfx)?K.q.instance.prodigy.audio.playSFXFromGUID(B.creature.castSpellSfx):K.q.instance.prodigy.audio.playSFX(8,qP.J.Cast),yield k.begin({caster:{unitId:B.battleId,gameObject:B.creature.creatureGameObject,statusEffectContainer:B.statusEffectContainer},targets:[{unitId:U.battleId,gameObject:U.creature.creatureGameObject,statusEffectContainer:U.statusEffectContainer}],manager:k,multiHit:1}),new Promise((k=>{YP.a.createHitInfoText(U,F,void 0,k)}))}))}var tM,eM=U(24227);!function(k){k.Neutral="Neutral",k.Shocked="Shocked",k.Sad="Sad"}(tM||(tM={}));const iM={[GP.ts.AstralDragon]:0,[GP.ts.FireDragon]:20,[GP.ts.IceDragon]:0,[GP.ts.IceWyrm]:0,[GP.ts.PhysicalDragon]:14,[GP.ts.ShadowDragon]:0};class sM{static make(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=new sM;B._bossType=k;const U=K.q.instance.prodigy.gameContainer.get(j.t5G.AssetLoader);B._barkData=yield U.loadSingleAsset(Ft.r.BossBarks_json,qR.i.JSON);const F=K.q.instance.prodigy.gameContainer.get("9ac-9677").getRiftsEntityPortalEntryData();for(let G=Object.keys(B._phaseUnlockConditions).length;G>0;G--)if(B._phaseUnlockConditions[G](null==F?void 0:F.metaProgress.bossDefeats[k])){B._phase=G;break}return B}))}constructor(){this._phase=0,this._phaseUnlockConditions={1:k=>!j.Aq$.isDefined(k),2:k=>0===k,3:k=>k>0&&k<15,4:k=>k>=15&&k<50,5:k=>k>=50}}advanceBark(k){var B,U,F,G,j,$;const H=null!==(B=($=this._activePlayer.data).rifts)&&void 0!==B?B:$.rifts={};null!==(U=H.bossBarkProgress)&&void 0!==U||(H.bossBarkProgress={});let V=H.bossBarkProgress[this._bossType];V||(this.initializeBarkProgress(this._bossType,this._phase),V=H.bossBarkProgress[this._bossType]);const W=null===(G=null===(F=this._barkData[this._bossType])||void 0===F?void 0:F[this._phase])||void 0===G?void 0:G[k];if(!(null==W?void 0:W.length))return;V.index[k]=(V.index[k]+1)%W.length,this._activePlayer.updated=!0;const K=W[V.index[k]];let z=K.filename?ah.B[rn.$.capitalizeFirstLetter(K.filename)]:"";z||(z=K.filename?ah.B[K.filename]:"");const Y=this._baseLocalizer.getText(K.dialogueLocalizationKey);return Y?{dialogueData:{nameKey:`NPC_NAME_DRAGON_${eM.j.getBossElementFromBossType(this._bossType).toUpperCase()}`,text:Y,avatar:{atlas:q._[`Npc_face_${this._bossType.toLowerCase()}_json`],frameName:sM.FACE_FRAME[K.portrait],offsetY:null!==(j=iM[this._bossType])&&void 0!==j?j:0},audio:{tag:null!=z?z:""}},blockInput:!0}:void 0}initializeBarkProgress(k,B){var U,F,G,j,$,H;const V=null===(U=this._barkData[k])||void 0===U?void 0:U[B];if(!V)return;const W=null!==(F=($=this._activePlayer.data).rifts)&&void 0!==F?F:$.rifts={};null!==(G=W.bossBarkProgress)&&void 0!==G||(W.bossBarkProgress={}),null!==(j=(H=W.bossBarkProgress)[k])&&void 0!==j||(H[k]={index:Object.entries(V).reduce(((k,[B,U])=>(k[B]=wn.o.integerInRange(0,U.length),k)),{})}),this._activePlayer.updated=!0}}sM.FACE_FRAME={[tM.Neutral]:"face_0",[tM.Shocked]:"face_1",[tM.Sad]:"face_2"},(0,G.Cg)([(0,Re.b)("306-5359"),(0,G.Sn)("design:type",ye.W)],sM.prototype,"_activePlayer",void 0),(0,G.Cg)([(0,Re.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],sM.prototype,"_baseLocalizer",void 0);var nM,aM,rM,oM,hM,cM=U(1551),dM=U(68836),lM=U(13302),uM=U(64019);!function(k){k.MovingBackground="movingBackground",k.MovingMidground1="movingMidground1",k.MovingMidground2="movingMidground2",k.MovingRocksBackground="movingRocksBackground",k.MovingRocksMidground="movingRocksMidground",k.MovingMountainsBackground="movingMountainsBackground",k.MovingMountainsMidground="movingMountainsMidground",k.MovingTallMountainsMidground="movingTallMountainsMidground",k.MovingCloudsForeground="movingCloudsForeground"}(nM||(nM={})),function(k){k[k.NotStarted=0]="NotStarted",k[k.PlayedAttack=1]="PlayedAttack",k[k.AddedAffix=2]="AddedAffix",k[k.Finished=3]="Finished"}(aM||(aM={}));class fM extends SP.V{getAssetList(){return[...this._baseAssets,q._.Rift_run_shadow_dragon_battle_map_1_json,q._.Rift_run_shadow_dragon_battle_map_2_json,q._.Rift_run_shadow_dragon_battle_map_3_json,ah.B.Sfx_dragonisle_dragon_defeat]}constructor(k){var B;super(k),this._firstBossDefeatedCutsceneFinished=new j.bnh,this._fakeWeightDividend=5,this._firstBossRiftCutscene=null,this._bossType=GP.ts.PhysicalDragon,this._hasTauntPlayedThisRound=!0,this._roundShieldAttackAnimationStep=aM.NotStarted,this._useParallaxBackground=!0,this._riftsDataProvider=K.q.instance.prodigy.gameContainer.get("196-d3a5");const U=null===(B=this._riftsDataProvider.riftsTierTotalData)||void 0===B?void 0:B[dM.T.riftTier];(null==U?void 0:U.type)===GP.cn.Boss&&(this._bossType=U.bossType),this._localConfig.backgroundID.length>0?this._useParallaxBackground=!1:this._objectPool=new j.iyL(this.createMovingBackgroundObject.bind(this))}getUnitDataForTeam(k,B){const U=super.getUnitDataForTeam(k,B);if(this._useParallaxBackground&&B===Q.ETeamId.Home)for(const G of U)G.scale=.5;const F=U.find((k=>k.unitId===fM.BOSS_BATTLE_ID));return F&&(F.unitSlot=5),U}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){var U;const F=K.q.instance.prodigy,$=F.gameContainer.get(j.t5G.AssetLoader),V=yield $.loadSingleAsset(Ft.r.ShadowBattleBackgroundConfig_json,qR.i.JSON);this._useParallaxBackground&&(this._movingLandscapesData=V.movingLandscapes,this._randomMovingBackgroundData=V.movingObjects,this._playerPlatformAssets=V.playerPlatforms,this._objectPool.allocate(this._randomMovingBackgroundData.map((k=>k.maxObjects)).reduce(((k,B)=>k+B))));const W=B.initBattlePrefab.call(this,k);yield W,this._boss=this.rightTeam.units.find((k=>k.type===Ni.uj.Boss)),this.leftTeam.units.forEach((k=>{this._useParallaxBackground&&k.GameObject.transform.setPosition(k.GameObject.transform.localPosition.x-100,k.GameObject.transform.localPosition.y-35),k.setupUnitTooltip()})),this.configureBossUnit(this._boss),this._barkManager=yield sM.make(this._bossType),this.setUnitTooltipLock(!0),this._firstBossRiftCutscene=yield function(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){if(U!==GP.ts.PhysicalDragon||F!==QS.ni.Portal1||K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_RIFTS,ln.B.BREADCRUMB_RIFTS_FIRST_PHYSICAL_BATTLE_CUTSCENE_SEEN))return()=>(0,G.sH)(this,void 0,void 0,(function*(){return{shouldLeftTeamTeleportIn:!1}}));const $=new j._mx(k.mapRoot);let V,W,q,z,Y;$.layer="content",$.addComponent(j.dLy);const X=[()=>(0,G.sH)(this,void 0,void 0,(function*(){return $.destroyDeferred()}))];try{W=k.leftTeam.wizard,V=H().chain(k.leftTeam.rawUnits).filter((k=>k!==W)).maxBy((k=>k.GameObject.transform.worldPosition.y)).value(),yield Promise.all([k.addUnitPlatform(V,2),ZP(k.leftTeam,W,J.Q.Spine_npc_puppetmaster_json).then(X.push.bind(X)),ZP(k.leftTeam,V,J.Q.Spine_npc_pippet_json).then(X.push.bind(X))]),[Y,q,z]=yield Promise.all([XP($,WP.z.Spell_shadow_shadowshock_single_spell),XP($,WP.z.Spell_physical_slash_single_spell),XP($,WP.z.Spell_physical_pierce_giant_spell)])}catch(Z){j.RQr.logError(Z,"Failed to create First Dragon Rift cutscene"),yield Promise.all(X.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k()})))))}return()=>(0,G.sH)(this,void 0,void 0,(function*(){try{yield Promise.all([B.enterBattle(!1,!1),W.enterBattle(!0,!1),V.enterBattle(!0,!1)]),yield(0,bc.v$)([1647,1648,1649]),yield Promise.all([(0,$P.ib)(V.creature.animator,["attack","idle"],!0),JP(Y,V,B,{damage:.001,damageInformation:Q.EDamageInformation.Ineffective})]),yield(0,bc.v$)([1650]),yield JP(q,B,V,{damage:9999,damageInformation:Q.EDamageInformation.CriticalHit}),yield V.playDefeated(),yield(0,bc.v$)([1651]),B.creature.animator.playAnimation("taunt",!0),yield(0,bc.v$)([1652]);const k=W.playDefeated();yield(0,bc.uk)(K.q.instance.game,500),yield JP(z,B,W,{damage:0,damageInformation:Q.EDamageInformation.Missed}),yield k}catch(Z){j.RQr.logError(Z,"Failed playing the First Dragon Rift cutscene")}finally{yield Promise.all(X.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k()})))))}return K.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_RIFTS,ln.B.BREADCRUMB_RIFTS_FIRST_PHYSICAL_BATTLE_CUTSCENE_SEEN),{shouldLeftTeamTeleportIn:!0}}))}))}(this,this._boss,this._bossType,null!==(U=this._riftsDataProvider.selectedPortalId)&&void 0!==U?U:QS.ni.Portal1),this._skipVictoryBark=this._bossType===GP.ts.PhysicalDragon&&this._riftsDataProvider.selectedPortalId===QS.ni.Portal1&&!F.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_RIFTS,ln.B.BREADCRUMB_RIFTS_DEFEATED_FIRST_BOSS),this._boss.creature.defeated=()=>(0,G.sH)(this,void 0,void 0,(function*(){}))}))}processBattleStateUpdates(k){for(const B of k)B.type===Q.EBattleStateUpdate.CustomEvent&&B.name===QS.wJ.RewardDetermined&&(dM.T.reward=B.data.reward);return k}configureBossUnit(k){k.GameObject.transform.setPositionY(-100),this._useParallaxBackground?(this._boss.size=lM.X.Huge,k.targetComponent.GameObject.parent.transform.setPositionY(200),k.uiContent.transform.setPosition(-25,50),k.turnIndicatorOffset={x:0,y:200}):(this._boss.size=lM.X.Medium,k.GameObject.transform.setPositionX(-100)),this._boss.targetComponent.configureTarget()}setupBattleBackgrounds(){const k=Object.create(null,{setupBattleBackgrounds:{get:()=>super.setupBattleBackgrounds}});return(0,G.sH)(this,void 0,void 0,(function*(){return this._useParallaxBackground?(this._movingLandscapesData.forEach((k=>{const B=k.pixelSpeed?{MOVE_DURATION:this.calculateDuration(0,fM.MOVING_BACKGROUND_IMAGE_WIDTH,k.pixelSpeed),MOVE_X:fM.MOVING_BACKGROUND_IMAGE_WIDTH,ADJACENT_BACKGROUND_IMAGE:[k.atlas,k.frames[0]],ADJACENT_BACKGROUND_POSITION:[-fM.MOVING_BACKGROUND_IMAGE_WIDTH,0]}:{},U=!!k.pixelSpeed;Ja.d.loadWithInjectedValuesFromGUID(this._prefabLoader,Ei.l.RepeatingUnidirectionalBackground,Object.assign(Object.assign({},B),{BACKGROUND_IMAGE:[k.atlas,k.frames[0]],BACKGROUND_POSITION:[of.R.BG_HALF_WIDTH+k.initialPosition[0].x,of.R.BG_HALF_HEIGHT+k.initialPosition[0].y],BACKGROUND_LAYER:[k.layer,k.depth,U]}),this._prefabRoot)})),Promise.all([...this.leftTeam.units.map(this.addUnitPlatform.bind(this)),...this._randomMovingBackgroundData.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){for(let B=0;BB.layer===k.layer)).length;k.randomizeAsset?yield q.setAsset(k.atlas,k.frames[wn.o.integerInRange(0,k.frames.length)]):W.hasMoved||k.maxObjects!==k.frames.length||(yield q.setAsset(k.atlas,k.frames[K])),W.onComplete.addOnce((()=>{V.active=!1,this.configureMovingBackgroundObject(k).catch(j.RQr.createHandler("Failed to configure moving background object"))}));const z=W.hasMoved?null:null===(B=k.initialPosition)||void 0===B?void 0:B[K],Y=1e3*wn.o.integerInRange(null!==(F=null===(U=k.delay)||void 0===U?void 0:U.min)&&void 0!==F?F:0,null!==($=null===(G=k.delay)||void 0===G?void 0:G.max)&&void 0!==$?$:0),Q={x:k.scale?-q.getWidth()*k.scale:-q.getWidth(),y:k.yRange?of.R.BG_HALF_HEIGHT+wn.o.integerInRange(k.yRange.min,k.yRange.max):V.transform.localPosition.y};z&&(Q.x=of.R.BG_HALF_WIDTH+z.x,Q.y=of.R.BG_HALF_HEIGHT+z.y),Ja.d.updateInjectedValues(V,{MOVING_IMAGE_SET_POSITION:[Q.x,Q.y],MOVING_IMAGE_SET_TARGET:[of.R.BG_WIDTH,Q.y],MOVING_IMAGE_SET_DURATION:this.calculateDuration(Q.x,of.R.BG_WIDTH,k.pixelSpeed),MOVING_IMAGE_SET_DELAY:W.hasMoved||!z?Y:0,MOVING_IMAGE_ADD_LAYER:[k.layer,k.depth,!0],MOVING_IMAGE_SET_LAYER:[k.layer,!0],MOVING_IMAGE_SET_SCALE:null!==(H=k.scale)&&void 0!==H?H:1}),W.startTween()}))}addUnitPlatform(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U="BossRiftDynamicallyCreatedBackground";if(k.GameObject.children.some((k=>k.name===U)))return;const F=new j._mx(k.GameObject);F.name=U,F.setLayer("background"),F.sendToBack();const G=F.addComponent(j.XVE),$=F.addComponent(Eo._);yield $.setAsset(this._playerPlatformAssets.atlas,this._playerPlatformAssets.assetNames[B]),$.sizeToSourceImage(),G.setPositionY(20)}))}calculateDuration(k,B,U){return Math.abs(k-B)/(U/1e3)}onStartBattle(){const k=Object.create(null,{onStartBattle:{get:()=>super.onStartBattle}});return(0,G.sH)(this,arguments,void 0,(function*(B=!0){var U;const F=yield null===(U=this._firstBossRiftCutscene)||void 0===U?void 0:U.call(this);F.shouldLeftTeamTeleportIn&&(this.leftTeam.teleportInBehaviour=uM.pV.NonWizardUnits),yield this.leftTeam.units.find((k=>(null==k?void 0:k.type)===Ni.uj.Wizard)).enterBattle(F.shouldLeftTeamTeleportIn,!1),yield this.rightTeam.units.find((k=>(null==k?void 0:k.type)===Ni.uj.Boss)).enterBattle(!1,!1);const G=this._barkManager.advanceBark(FP.Start);G&&(yield j.Egh.timeout(1e3),yield bc.v$([G])),this._modifierGridPrefab=yield cM.Q.addModifierGridPrefab(cM.Q.MODIFIER_GRID_X_IN_BATTLE,cM.Q.MODIFIER_GRID_Y_IN_BATTLE),this.setUnitTooltipLock(!1),yield k.onStartBattle.call(this,B)}))}onEndGame(k){const B=Object.create(null,{onEndGame:{get:()=>super.onEndGame}});return(0,G.sH)(this,void 0,void 0,(function*(){if(this._modifierGridPrefab.destroy(),this._modifierGridPrefab=null,k){if(!this._skipVictoryBark){const k=this._barkManager.advanceBark(FP.Win);k&&(yield bc.v$([k]))}yield Promise.all([this._boss.fadeUi(0),(()=>(0,G.sH)(this,void 0,void 0,(function*(){this._boss.creature.animator.playAnimation("defeat",!1),K.q.instance.prodigy.audio.playSFXFromGUID(ah.B.Sfx_dragonisle_dragon_defeat),yield this._boss.creature.animator.OnAnimationComplete.asPromise()})))()])}else{const k=this._barkManager.advanceBark(FP.Lose);k&&(yield bc.v$([k]))}yield B.onEndGame.call(this,k)}))}onDefeat(){const k=Object.create(null,{onDefeat:{get:()=>super.onDefeat}});return(0,G.sH)(this,void 0,void 0,(function*(){return k.onDefeat.call(this,!0)}))}showSpellCards(k,B=!0){if(super.showSpellCards(k,B),this._useParallaxBackground){const k=this.spellCardsController.targetController.battleTargets.find((k=>k.isMultiTarget&&k.teamId===Q.ETeamId.Home));k&&k.groundTarget.transform.setPosition(-50,-35)}}getStateOverride(k){var B;if(this._roundShieldAttackAnimationStep===aM.AddedAffix){if(!k||k.type!==Q.EBattleStateUpdate.AddAffix||k.affix.type!==Q.EAffixType.Shield||k.affix.unitId!==fM.BOSS_BATTLE_ID)return++this._roundShieldAttackAnimationStep,[RP,j.Egh.timeout(1e3)]}switch(null==k?void 0:k.type){case Q.EBattleStateUpdate.NewRound:1!==k.round&&(this._hasTauntPlayedThisRound=!1,this._roundShieldAttackAnimationStep=aM.NotStarted);break;case Q.EBattleStateUpdate.CastSpell:if(!this._hasTauntPlayedThisRound&&(null===(B=this._activeUnit)||void 0===B?void 0:B.creature.isOpponent)){this._hasTauntPlayedThisRound=!0;const k=this._barkManager.advanceBark(FP.Taunt);if(k)return(0,$P.ib)(this._boss.creature.animator,["taunt","idle"],!0).catch(j.RQr.createHandler("BossRiftBattleController: Failed to play boss taunt animation")),[DP,[k]]}break;case Q.EBattleStateUpdate.EndBattle:const U=K.q.instance.prodigy.gameContainer.get("196-d3a5");if(this._boss.isDefeated()&&this._bossType===GP.ts.PhysicalDragon&&U.selectedPortalId===QS.ni.Portal1&&!K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_RIFTS,ln.B.BREADCRUMB_RIFTS_DEFEATED_FIRST_BOSS))return this.playFirstPhysicalDragonDefeatedCutscene().catch(j.RQr.createHandler("BossRiftBattleController: Error showing first boss defeat sequence")),[RP,this._firstBossDefeatedCutsceneFinished];break;case Q.EBattleStateUpdate.AddAffix:switch(this._roundShieldAttackAnimationStep){case aM.NotStarted:const B=k.affix;if(B.type===Q.EAffixType.Shield&&B.unitId===fM.BOSS_BATTLE_ID)return++this._roundShieldAttackAnimationStep,this._boss.creature.attack(),[RP,j.Egh.timeout(1e3)];break;case aM.PlayedAttack:++this._roundShieldAttackAnimationStep}}return super.getStateOverride(k)}showBattleResult(k,B,U,F){const $=Object.create(null,{showBattleResult:{get:()=>super.showBattleResult}});return(0,G.sH)(this,arguments,void 0,(function*(k,B,U,F,G=!0){var V,W,q,z;if(!G)return;let Y=null!==(W=null===(V=K.q.instance.prodigy.gameContainer.get("196-d3a5").riftsTierTotalData)||void 0===V?void 0:V[dM.T.riftTier].rewards)&&void 0!==W?W:[];const Q=K.q.instance.prodigy.gameContainer.get("306-5359");Y.forEach((k=>{if(!QS._u.includes(k.type)&&Q.getItemCount(k.type,k.id)>0){const B=Y.filter((B=>!QS._u.includes(B.type)&&B!==k));for(const U of B)U.weight+=Math.ceil(k.weight/B.length);Y=Y.filter((B=>B!==k))}}));const X=Y.reduce(((k,B)=>k+B.weight),0),Z=uT.L.visuallyAdjustDragonRouletteRewards(Y),J=[],tt=dM.T.reward;if(tt){const k=null===(q=le.t.getItem(tt.type,tt.id))||void 0===q?void 0:q.data;if(J.push({type:tt.type,ID:tt.id,N:tt.quantity,data:{name:k?Tn.J.getLocalizationNameKey(tt):"",flavorText:k?Tn.J.getLocalizationFlavorKey(tt):"",rarity:null!==(z=null==k?void 0:k.rarity)&&void 0!==z?z:0}}),"petHat"!==tt.type&&"petRelic"!==tt.type||K.q.instance.prodigy.gameContainer.get("d69-defe").refreshPetGear().catch(j.RQr.createHandler("RiftRunBattleController: Failed to refresh pet gear after being awarded it after a rift run")),H().find(Z,(k=>k.id===tt.id&&k.type===tt.type&&k.quantity===tt.quantity))||Z.push({type:tt.type,ID:tt.id,N:tt.quantity,R:X/this._fakeWeightDividend}),(0,jP.p)(tt.type,tt.id)){K.q.instance.prodigy.gameContainer.get("c47-20b6").postBattleFlow.itemTransaction.setIndividualData(tt.type,tt.id,{instance_type:Ai.N.BossRift,source_type:gn.C.PrizeWheel})}}yield new Promise((k=>{K.q.instance.prodigy.open.bossRewards([],Ai.N.BossRift,Ei.l.BossRewardUIwithnorespin,J,Z,k,!0,!tt||!(0,jP.p)(tt.type,tt.id))})),yield $.showBattleResult.call(this,k,B,U,F,G)}))}playFirstPhysicalDragonDefeatedCutscene(){return(0,G.sH)(this,void 0,void 0,(function*(){yield(0,bc.v$)([1634,1635,1636,1637,1638,1639,1640,1641,1642,1643,1645]);const k=K.q.instance.prodigy;k.gameContainer.get("c47-20b6").rifts.sendRiftsFunnelAdvancedEvent(HP.fk.RiftsCompleteBossRift),k.breadcrumbManager.completeBreadcrumb(ln.B.FEATURE_RIFTS,ln.B.BREADCRUMB_RIFTS_DEFEATED_FIRST_BOSS),this._firstBossDefeatedCutsceneFinished.resolve()}))}}fM.BOSS_BATTLE_ID="boss",fM.MOVING_BACKGROUND_IMAGE_WIDTH=1440,function(k){k.Visible="up",k.Hidden="down",k.Stunned="stun",k.Taunt="taunt"}(rM||(rM={})),function(k){k.Start="start",k.Element1="element1",k.Element2="element2",k.Element3="element3",k.Stunned="stun"}(oM||(oM={})),function(k){k.Idle="idle",k.Death="death",k.CrystalMound="crystalMound",k.ChangeOut="changeOut",k.ChangeIn="changeIn",k.Reveal="reveal"}(hM||(hM={}));class bM extends UP{constructor(){super(...arguments),this._golemState=oM.Start,this._stateOverrideStep=0}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k),this._golem=this.rightTeam.units.find((k=>k.type===Ni.uj.Boss)),this._golem.creature.teleportType=KP.H0.None,this._golem.creature.shouldFadeOnDefeat=!1,this._golem.onDefeatAnimationFinished.add((()=>{this._golemState!==oM.Stunned&&this._golemAnimator.playAnimation(hM.Death,!1)}));const U=new j._mx(this._golem.GameObject);U.active=!1,U.addComponent(j.dLy).setPosition(bM.FLASH_OFFSET.x,bM.FLASH_OFFSET.y),this._flashSpine=U.addComponent(Wn.v),this._flashSpine.setAsset(J.Q.Spine_flash_json)}))}getStateOverride(k){var B;switch(null!==(B=this._golemAnimator)&&void 0!==B||(this._golemAnimator=this._golem.creature.animator),null==k?void 0:k.type){case Q.EBattleStateUpdate.CustomEvent:switch(this._golemState=k.name,k.name){case oM.Element1:if(0==this._stateOverrideStep++)return[RP,this.switchElement(k.data,!0)];break;case oM.Stunned:if(0==this._stateOverrideStep++)return this._golemAnimator.OnAnimationComplete.removeAll(),this._golemAnimator.spine.addAnimationRemap(hM.Idle,hM.CrystalMound),[RP,(0,$P.ib)(this._golemAnimator,[hM.Death,hM.CrystalMound],!0)];break;case oM.Start:if(0==this._stateOverrideStep++)return this._golemAnimator.spine.addAnimationRemap(hM.Idle,hM.Idle),[RP,this.switchElement(Q.EElementType.Shadow,!1)]}break;case Q.EBattleStateUpdate.EndBattle:if(0==this._stateOverrideStep++&&this._golemState!==oM.Stunned)return[RP,Promise.race([this._golemAnimator.OnAnimationComplete.asPromise(),j.Egh.timeout(3e3)])]}return this._stateOverrideStep=0,super.getStateOverride(k)}switchElement(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.changeOut(B),yield Promise.all([new Promise((B=>{this._golemAnimator.spine.setAsset(bM.BOSS_ELEMENT_ASSETS[k],B)})),j.Egh.timeout(500)]),this._golem.element=k,yield this.changeIn(B)}))}changeOut(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=[];k&&(this._golemAnimator.playAnimation(hM.ChangeOut,!1),B.push(this._golemAnimator.OnAnimationComplete.asPromise())),this._flashSpine.GameObject.layer=vh.E.ForegroundLayer,this._flashSpine.setAnimationByName(0,hM.ChangeOut,!1),this._flashSpine.GameObject.active=!0,B.push(this._flashSpine.getSpine().onComplete.asPromise()),yield Promise.all(B)}))}changeIn(k){return(0,G.sH)(this,void 0,void 0,(function*(){this._flashSpine.setAnimationByName(0,hM.ChangeIn,!1),this._flashSpine.getSpine().onComplete.addOnce((()=>{this._flashSpine.GameObject.active=!1})),yield(0,$P.ib)(this._golemAnimator,[k?hM.ChangeIn:hM.Reveal,hM.Idle],!0)}))}}bM.FLASH_OFFSET={x:0,y:-150},bM.BOSS_ELEMENT_ASSETS={[Q.EElementType.Shadow]:J.Q.Default_boss_18_json,[Q.EElementType.Fire]:J.Q.Fire_boss_18_json,[Q.EElementType.Water]:J.Q.Water_boss_18_json,[Q.EElementType.Plant]:J.Q.Plant_boss_18_json,[Q.EElementType.Ice]:J.Q.Ice_boss_18_json,[Q.EElementType.Storm]:J.Q.Storm_boss_18_json};var pM,vM,gM=U(34234);class mM extends SP.V{requestBattleStart(k){const B=Object.create(null,{requestBattleStart:{get:()=>super.requestBattleStart}});return(0,G.sH)(this,void 0,void 0,(function*(){var U;const F=yield B.requestBattleStart.call(this,k);if(k.currentFloor===mM.MIRROR_BATTLE_FLOOR){const k=Object.values(F.state.units).find((k=>k.teamId===Q.ETeamId.Away&&k.type===Ni.uj.Wizard));if(null===(U=null==k?void 0:k.appearance)||void 0===U?void 0:U.name){const B=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),U=k.appearance.name;k.appearance.name=B.getText(mM.MIRROR_WIZARD_KEY,tc.f.getFullNameByID(null,U.middle,U.last))}}return F}))}}mM.MIRROR_WIZARD_KEY="NPC_NAME_DARK_TOWER_MIRROR_WIZARD",mM.MIRROR_BATTLE_FLOOR=90,mM.ROULETTE_STAR_BONUS_INDEX=9,mM.ROULETTE_STAR_BONUS_MULTIPLIER_VALUE=2,(0,G.Cg)([(0,gM.d)("RemoteConfig"),(0,G.Sn)("design:type",Object)],mM.prototype,"_remoteConfig",void 0),function(k){k.InitialBattleState="initialState",k.StateUpdate="update",k.GuestValidated="guestValidated"}(pM||(pM={})),function(k){k.NextUnits="nextUnits",k.Thinking="thinking",k.ShowElementBoost="showElementBoost"}(vM||(vM={}));var yM=U(14335),_M=U(52516),EM=U(27488),wM=U(58203);let TM=class extends wM.m{joinDuel(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U={host:k,guestRoomId:B};yield this.makeCloudscriptRequest(qt.D.Battle.Duel.Join,U)}))}sendWaitPing(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(qt.D.Battle.Duel.WaitPing,{battleId:k},!1)}))}onOpponentDisconnect(k){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(qt.D.Battle.Duel.OpponentDisconnect,{battleId:k},!0)}))}};TM=(0,G.Cg)([(0,tt.injectable)()],TM);class SM extends IP.Z{enter(){this._waitForUpdatePromise=this.waitForUpdate().catch((k=>{this._waitForUpdatePromise.cancel(),j.RQr.logError(k,"Error waiting for state updates"),this.stateMachine.showThrownErrorDialog(k)}))}exit(){var k;null===(k=this._waitForUpdatePromise)||void 0===k||k.cancel()}waitForUpdate(){const k=new j.kBN(((B,U)=>{(()=>(0,G.sH)(this,void 0,void 0,(function*(){const B=this.battleController.activeUnit;(null==B?void 0:B.data.mp.current)>0?B.showOpponentWaitingMessage("DUEL_WAIT_CHOOSING_SPELL"):this.hasUpdate(Q.EBattleStateUpdate.ModifyMp)||this.battleController.textLog.showPinnedMessage("DUEL_WAIT_OTHER_PLAYER");const F=this.performWaitPings();for(F.catch(U);!SM.UNBLOCKING_UPDATE_TYPES.some((k=>this.hasUpdate(k)));){if(yield this.battleController.onMessageReceived.asPromise(),k.cancelled)return;this.hasUpdate(Q.EBattleStateUpdate.ModifyMp)&&(null==B||B.showOpponentWaitingMessage("DUEL_WAIT_CHOOSING_SPELL"))}F.cancel(),null==B||B.hideWaitingMessage(),this.battleController.textLog.unpinMessage(),this.stateMachine.goToState(OP.B)})))().then(B).catch(U)}));return k}performWaitPings(){const k=new j.kBN(((B,U)=>{(()=>(0,G.sH)(this,void 0,void 0,(function*(){for(yield j.Egh.timeout(SM.WAIT_PING_START_DELAY_MS);!k.cancelled;){if((yield this._networkHandler.sendWaitPing(this.battleController.battleId)).wait)yield j.Egh.timeout(SM.WAIT_PING_INTERVAL_MS);else if(yield j.Egh.timeout(SM.WAIT_PING_DESYNC_CONFIRM_DELAY_MS),!k.cancelled)throw new EM.r(409,"Duel desync occurred")}})))().catch(U)}));return k}hasUpdate(k){return this.stateMachine.stateUpdateQueue.some((B=>B.type===k))}}SM.WAIT_PING_START_DELAY_MS=2e4,SM.WAIT_PING_INTERVAL_MS=15e3,SM.WAIT_PING_DESYNC_CONFIRM_DELAY_MS=5e3,SM.UNBLOCKING_UPDATE_TYPES=[Q.EBattleStateUpdate.CastSpell,Q.EBattleStateUpdate.ModifyMp,Q.EBattleStateUpdate.SkipTurn],(0,G.Cg)([(0,gM.d)("NetworkHandler"),(0,G.Sn)("design:type",TM)],SM.prototype,"_networkHandler",void 0);var AM=U(6719),CM=U(64007),OM=U(630),IM=U(60668),DM=U(74640);class RM extends IP.Z{enter(){this.run().catch((k=>{j.RQr.logError(k,"Error handling opponent exit"),this.stateMachine.showThrownErrorDialog(k)}))}run(){return(0,G.sH)(this,void 0,void 0,(function*(){this.battleController.wonByDefault=!0,this.battleController.textLog.clearMessageQueue(),this.battleController.textLog.showMessage("DUEL_OPPONENT_LEFT"),yield Promise.all([this.battleController.setActiveUnit(null),this.battleController.rightTeam.teleportOut(),(()=>(0,G.sH)(this,void 0,void 0,(function*(){this.battleController.type===Ni.gu.MatchmakingDuel&&(yield this._networkHandler.onOpponentDisconnect(this.battleController.battleId))})))()]),this.stateMachine.goToState(DM.G,{battleResult:Ni.XK.Victory})}))}}(0,G.Cg)([(0,gM.d)("NetworkHandler"),(0,G.Sn)("design:type",TM)],RM.prototype,"_networkHandler",void 0);var PM=U(21945);class MM extends SP.V{constructor(){super(...arguments),this.allowVideoLessons=!1,this.onMessageReceived=new j.HN0,this._opponentExited=!1,this.wonByDefault=!1,this._messagePromises=new Set,this._stateOverrideStep=0,this.hideMergeRank=!1,this._modifierGridPrefab=null}destroy(){for(const k of Array.from(this._messagePromises.values()))k.reject("Exited state");this._messagePromises.clear(),this.onMessageReceived.dispose(),super.destroy()}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k);for(const k of this.getUnits())k.creature.teleportType=KP.H0.Astral,Ja.d.updateInjectedValues(k.petMergeUi,{[OM.GH.PetMergeBadge]:AM.y.toInjectionParams({atlas:q._.Ui_battle_revamp_json,frame:`${OM.Xc.PET_MERGE_BADGE_PREFIX}-default`})}),k.petMergeUi.active=k.petMergeUi.active&&!this.hideMergeRank}))}bindNetworkHandler(){j.wa5.getActiveScene().container.bind("NetworkHandler").to(TM).asSingleton()}onStartBattle(){const k=Object.create(null,{onStartBattle:{get:()=>super.onStartBattle}});return(0,G.sH)(this,void 0,void 0,(function*(){this.rightTeam.teleportInBehaviour=uM.pV.NonWizardUnits,this.useTurnTimer();for(const k of this.rightTeam.units)k.mpBar.GameObject.active=!0;return k.onStartBattle.call(this)}))}handleBattleStartError(k){return(0,G.sH)(this,void 0,void 0,(function*(){return k instanceof Error&&k.message&&(yield new Promise((B=>{K.q.instance.prodigy.open.messageBoxOkay(k.message,void 0,B)}))),!0}))}onPlayerAction(k){const B=Object.create(null,{onPlayerAction:{get:()=>super.onPlayerAction}});return(0,G.sH)(this,void 0,void 0,(function*(){var U;if(k.type===Q.EBattleAction.PowerUp){const B=(null===(U=this.activeUnit)||void 0===U?void 0:U.data.teamId)===this.leftTeam.id;if(k.correctAnswer)for(const k of this.leftTeam.units.filter((k=>k.isAlive()&&!k.missedTurnX.active)))this._stateMachine.stateUpdateQueue.unshift({type:Q.EBattleStateUpdate.ModifyMp,unitId:k.battleId,mpResult:1});else{const k=B?this.activeUnit:this.leftTeam.units.find((k=>this._nextUnitsInRound.includes(k.battleId)));k?k.missedTurnX.active=!0:j.VyI.log("Could not find first unit to skip",j.$bb.Error)}if(!B)return this._queuedAction=k,[]}return B.onPlayerAction.call(this,k)}))}alertActiveUnitMpEmpty(){return(0,G.sH)(this,void 0,void 0,(function*(){yield Promise.all(this.leftTeam.units.filter((k=>k.isAlive()&&!k.missedTurnX.active)).map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k.alertMpEmpty()})))))}))}getStateOverride(k){switch(null==k?void 0:k.type){case Q.EBattleStateUpdate.CustomEvent:if(k.name===vM.NextUnits)this._nextUnitsInRound=k.data;else if(k.name===vM.ShowElementBoost){const B=k.data,U=CM._.ELEMENT_BOOST_TEXT_CONFIG[B];U&&(Ja.d.loadWithInjectedValuesFromGUID(this._prefabLoader,Ei.l.ElementalBoostPopupText,{TEXT:this._localizer.getText(U.localizationKey),TEXT_COLOR:U.textColor,TEXT_STROKE_COLOR:U.textStrokeColor}),this.createModifierGridPrefab(B).then((k=>{this._modifierGridPrefab=k})).catch((k=>{j.VyI.log(`Failed to create modifier grid prefab: ${k}`,j.$bb.Error)})))}break;case Q.EBattleStateUpdate.CastSpell:k.id===this.battleConstants.fumbleSpellId&&(this.activeUnit.missedTurnX.active=!0,this.activeUnit.updateMp(0));break;case Q.EBattleStateUpdate.NewRound:if(0==this._stateOverrideStep++){this._showIndicator=!1,this._inRoundStart=!0,this.getUnits().filter((k=>k.isAlive())).forEach((k=>k.missedTurnX.active=!1));const B=[this.setActiveUnit(null),this.textLog.waitForMessageForMs(1e3,"BATTLE_ROUND_X",k.round)];return[RP,Promise.all(B)]}this._stateOverrideStep=0;break;case Q.EBattleStateUpdate.SetActiveUnit:if(this._inRoundStart)switch(this._stateOverrideStep++){case 0:return[IM.o];case 1:if(this.getUnits().find((B=>B.battleId===k.unitId)).data.teamId!==this.leftTeam.id){if(this._opponentExited){return this._stateMachine.stateUpdateQueue.find((k=>k.type===Q.EBattleStateUpdate.EndBattle))?super.getStateOverride():[RM]}return[SM]}default:this._showIndicator=!0,this._inRoundStart=!1,this._stateOverrideStep=0}break;case void 0:if(this._opponentExited)return[RM];if(this.activeUnit.data.teamId!==this.leftTeam.id)return[SM];if(this._queuedAction){const k=this._queuedAction;return this._queuedAction=null,[PM.N,k]}}return super.getStateOverride(k)}onVictory(){return(0,G.sH)(this,arguments,void 0,(function*(k=[],B=[]){const U=K.q.instance.prodigy.gameContainer.get("3a0-8003").refreshMembership();yield this.textLog.waitForMessage("COMBAT_WON"),yield U;const F=K.q.instance.prodigy.gameContainer.get("306-5359");yield F.updateChargedLevelsData();const G=K.q.instance.game.state.get(Ie.G.DuelMatchmaking);if(G.roomConfig){const U=Array.isArray(G.roomConfig.prize)?G.roomConfig.prize:[G.roomConfig.prize];k.push(...U.map((k=>({ID:k.id,quantity:k.amount,type:k.type})))),B&&B.push(...U.map((k=>({ID:k.id,quantity:Math.ceil(k.amount/2),type:k.type}))))}const j=k.length>0&&B.length>0;yield this.showBattleResult(!j,k,B)}))}onDefeat(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.textLog.waitForMessage("COMBAT_LOST");const k=K.q.instance.prodigy.gameContainer.get("306-5359");yield k.updateChargedLevelsData(),yield this.showBattleResult(!0,void 0,void 0,void 0,this.showVictoryBanner)}))}get showVictoryBanner(){return this.getEarnedXP().baseXp>0}completeBattle(k,B,U){const F="win"===k&&this.wonByDefault?"win (default)":k;super.completeBattle(F,B,U)}canBattleEndInstantly(){let k=!0;for(const B of this._stateMachine.stateUpdateQueue)if(B.type!==Q.EBattleStateUpdate.SetActiveUnit){k=!1;break}return k&&!this.isAnsweringQuestion}getEarnedXP(){const k=this._playerDataProvider.player,B=this.battleStats.spellsCast*Vt.s.get("GameConstants.PVP.STARS_PER_QUESTION"),U=k.hasMembership()?B*Vt.s.get("GameConstants.Battle.MEMBER_STARS_PERCENTAGE"):0,F=k.hasValidatedParentEmail()?B*Vt.s.get("GameConstants.Battle.VALID_PARENT_EMAIL_STARS_PERCENTAGE"):0;return{baseXp:B,memberXp:Math.ceil(U),totalNonMemberXp:Math.ceil(B+F),gainInPvp:!0}}createModifierGridPrefab(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=yield Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Ei.l.ModifierBar,{MODIFIERS:[xe.d.getElementalBoostModifierIconInjectionData(k)]});return B.transform.setPosition(cM.Q.MODIFIER_GRID_X_IN_BATTLE,cM.Q.MODIFIER_GRID_Y_IN_BATTLE),B}))}onEndGame(k){const B=Object.create(null,{onEndGame:{get:()=>super.onEndGame}});return(0,G.sH)(this,void 0,void 0,(function*(){var U;null===(U=this._modifierGridPrefab)||void 0===U||U.destroy(),this._modifierGridPrefab=null,yield B.onEndGame.call(this,k)}))}getUnitsToAward(){return this.leftTeam.units.map((k=>k.battleId))}getScalableBattleDrops(){return[]}getNonScalableBattleDrops(){return[]}getScalableMemberBattleDrops(){return[]}getNonScalableMemberBattleDrops(){return[]}}(0,G.Cg)([(0,Re.b)("e20-0fb0"),(0,G.Sn)("design:type",Wt.E)],MM.prototype,"_playerDataProvider",void 0),(0,G.Cg)([(0,Re.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],MM.prototype,"_localizer",void 0),(0,G.Cg)([(0,Re.b)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],MM.prototype,"_prefabLoader",void 0);class NM extends MM{get leftTeamId(){return this._isHost?Q.ETeamId.Home:Q.ETeamId.Away}get rightTeamId(){return this._isHost?Q.ETeamId.Away:Q.ETeamId.Home}constructor(k){super(k),this.onOpponentJoined=new j.HN0,this._closeButtonPromise=new Promise((()=>{})),this._inviteRejectionPromise=new j.bnh,this.hideMergeRank=!0,this._localUserId=`${this._playerDataProvider.player.getID()}`,this._isHost=this._remoteConfig.hostUserId===this._localUserId,this._duelInviteService.onInviteCancelled.addOnce(this.handleInviteFailed,this),this._duelInviteService.onInviteFailed.addOnce(this.handleInviteFailed,this),this._duelInviteService.onInviteRejected.addOnce(this.handleInviteFailed,this)}destroy(){this._multiplayer.leaveLocationChannel().catch(j.RQr.createHandler("Error leaving channel")),this._duelInviteService.onInviteCancelled.remove(this.handleInviteFailed,this),this._duelInviteService.onInviteFailed.remove(this.handleInviteFailed,this),this._duelInviteService.onInviteRejected.remove(this.handleInviteFailed,this),this.onOpponentJoined.dispose(),super.destroy()}getLoadingScreen(k){const B=new yM.P(this._playerDataProvider.player,this._localConfig.opponent);return B.data=Object.assign(Object.assign(Object.assign({},B.data),k),{showCancel:this._isHost}),this._closeButtonPromise=new Promise(((k,U)=>{B.onCloseClicked.addOnce((()=>U()))})),this.onOpponentJoined.addOnce((()=>{B.hideCancelButton()})),B}requestBattleStart(k){const B=Object.create(null,{requestBattleStart:{get:()=>super.requestBattleStart}});return(0,G.sH)(this,void 0,void 0,(function*(){const U=`${this._localConfig.opponent.getID()}`,F=this._featureFlagsProvider.getValue("pvpInviteTimeout",Vt.s.get("GameConstants.PVP.INVITE_TIMEOUT")),$=parseInt(F,10),H=j.Egh.timeout($).then((()=>{throw new Error("Timed out waiting for "+(this._isHost?"guest":"host"))}));if(this._isHost){const U=`${this._localConfig.opponent.getID()}`,F=this.waitForMessage((k=>"playerJoined"===k.type&&k.playerInfo.userID===U||"userList"===k.type&&!!k.userList.find((k=>k.userID===U))));yield this._multiplayer.joinLocationChannel(this._localConfig.channelName,this.processMessage.bind(this),this.processSocketError.bind(this));try{yield Promise.race([F,H,this._closeButtonPromise,this._inviteRejectionPromise]).catch((k=>(0,G.sH)(this,void 0,void 0,(function*(){return j.VyI.log(`Cancelling invite: ${j.RQr.stringify(k)}`,j.$bb.Verbose),this._duelInviteService.cancelInvite(this._localConfig.opponent.getID()),Promise.reject(new Error(k))})))),this.onOpponentJoined.dispatch();const U=B.requestBattleStart.call(this,k),$=this.waitForMessage((k=>"broadcastAction"===k.type&&k.actionInfo.type===pM.GuestValidated));return yield Promise.all([U,Promise.race([H,$])]),yield U}catch(e){throw this._multiplayer.leaveLocationChannel().catch(j.RQr.createHandler("Error leaving channel")),e}}else{const B=this.waitForMessage((k=>"broadcastAction"===k.type&&k.actionInfo.type===pM.InitialBattleState));yield this._multiplayer.joinLocationChannel(this._localConfig.channelName,this.processMessage.bind(this),this.processSocketError.bind(this));try{yield Promise.race([B,H]);const F=(yield B).actionInfo.data;return yield this._networkHandler.joinDuel(U,k.roomId),F}catch(e){throw this._multiplayer.leaveLocationChannel().catch(j.RQr.createHandler("Error leaving channel")),e}}}))}waitForMessageType(k){return(0,G.sH)(this,void 0,void 0,(function*(){return this.waitForMessage((B=>B.type===k))}))}waitForMessage(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=new j.bnh;this._messagePromises.add(B);const U=F=>{"broadcastAction"===F.type&&F.actionInfo.toUserId&&F.actionInfo.toUserId!==this._localUserId||k(F)&&(this._messagePromises.delete(B),this.onMessageReceived.remove(U),B.resolve(F))};return this.onMessageReceived.add(U),B}))}processMessage(k){var B,U;if("playerLeft"===k.type){for(const k of Array.from(this._messagePromises.values()))k.reject("Opponent left");this._messagePromises.clear(),this._opponentExited=!0,((null===(B=this._stateMachine)||void 0===B?void 0:B.currentState)instanceof _M.W||(null===(U=this._stateMachine)||void 0===U?void 0:U.currentState)instanceof SM)&&this._stateMachine.goToState(OP.B)}else"broadcastAction"!==k.type||k.actionInfo.toUserId&&k.actionInfo.toUserId!==this._localUserId||k.actionInfo.type!==pM.StateUpdate||this._stateMachinePromise.then((()=>{this._stateMachine.stateUpdateQueue.push(...this.processBattleStateUpdates(k.actionInfo.data))})).catch(j.RQr.createHandler("Error adding message to state update queue"));this.onMessageReceived.dispatch(k)}processSocketError(k){var B;j.RQr.logError(k,"Error from multiplayer socket"),null===(B=this._stateMachine)||void 0===B||B.showThrownErrorDialog(k)}handleInviteFailed(){this._inviteRejectionPromise.reject()}}(0,G.Cg)([(0,Re.b)("80c-6fa4"),(0,G.Sn)("design:type",He)],NM.prototype,"_featureFlagsProvider",void 0),(0,G.Cg)([(0,gM.d)("RemoteConfig"),(0,G.Sn)("design:type",Object)],NM.prototype,"_remoteConfig",void 0),(0,G.Cg)([(0,Re.b)("779-a746"),(0,G.Sn)("design:type",Ue.d)],NM.prototype,"_multiplayer",void 0),(0,G.Cg)([(0,Re.b)("636-444c"),(0,G.Sn)("design:type",Object)],NM.prototype,"_duelInviteService",void 0);var xM=U(65725);class LM extends IP.Z{constructor(k,B,U){super(),this._targetUnit=k,this._replacementUnit=B,this._cloudRadius=U}enter(){this.transform().then((()=>this.stateMachine.goToState(OP.B))).catch(j.RQr.createHandler("Error transforming unit"))}transform(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.game,B=this._targetUnit.getHitboxCenter(),U=()=>{Do.M.radialCloud(k,this._targetUnit.creature.rootContainer.parent,B.x,B.y,this._cloudRadius,q._.Boss_aspen_extras_json,"purple-cloud")};for(let F=6;F>0;--F)U(),yield j.Egh.timeout(200);U(),this._targetUnit.creature.creatureGameObject.destroy(),this._targetUnit.setData(this._replacementUnit,this._targetUnit.creature.teleportType,this._targetUnit.controllerUnit),yield this._targetUnit.loadPromise,this._targetUnit.creature.creatureGameObject.active=!0}))}}var kM,BM,UM=U(80313);class FM extends IP.Z{constructor(k){super(),this._waitTimeMs=k}enter(){window.setTimeout((()=>this.stateMachine.goToState(OP.B)),this._waitTimeMs)}}!function(k){k[k.NotStarted=0]="NotStarted",k[k.ClearActiveUnit=1]="ClearActiveUnit",k[k.Wait=2]="Wait",k[k.Smoke=3]="Smoke",k[k.Dialogue=4]="Dialogue"}(kM||(kM={}));class GM extends UP{constructor(){super(...arguments),this._endSequenceStep=kM.NotStarted,this._lastSoundTime=0}getAssetList(){return[...super.getAssetList(),Z.c.Sfx_crystalbreak,Z.c.Sfx_crystalclumpdestroy]}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k),this._yeti=this.rightTeam.units.find((k=>k.type===Ni.uj.Boss)),this._yeti.loadPromise.then((()=>{this._yeti.creature.addBarrier(KP.HW.LegacySprite,null,0,-50)})).catch(j.RQr.createHandler("Error adding yeti barrier"));const U=this.rightTeam.units.filter((k=>k.type===Ni.uj.Object));for(const k of U){const B=k.creature;B.teleportType=KP.H0.None,B.shouldFadeOnDefeat=!1,B.animator.spine.addAnimationRemap("idle","idle-1"),B.animator.playAnimation("idle-1",!0),k.onHpSet.add(((U,F)=>{if(U{B.animator.playAnimation(`idle-${$+1}`,!0)}));const k=Date.now(),U=k-this._lastSoundTime,F=U{K.q.instance.prodigy.audio.playSFXFromGUID(Z.c.Sfx_crystalbreak),$>=GM.CRYSTAL_BREAK_THRESHOLDS.length-1&&j.Egh.timeout(GM.CRYSTAL_DESTROY_DELAY_MS).then((()=>{K.q.instance.prodigy.audio.playSFXFromGUID(Z.c.Sfx_crystalclumpdestroy)}))}))}}}))}}))}getStateOverride(k){if(this._endSequenceStepk>B))}}GM.CRYSTAL_BREAK_THRESHOLDS=[.95,.5,0,-1],GM.CRYSTAL_DESTROY_DELAY_MS=2700,GM.MULTIPLE_CRYSTAL_SFX_DELAY_MS=100,function(k){k.WaveStart="WaveStart",k.WaveEnd="WaveEnd",k.StageStart="StageStart",k.StageEnd="StageEnd",k.HomeTeamRevived="HomeTeamRevived",k.MathStreakUpdated="MathStreakUpdated"}(BM||(BM={}));var jM=U(12022),$M=U(86283),HM=U(18332),VM=U(54174),WM=U(61895);class qM extends IP.Z{enter(){this.battleController.attemptEscape().catch((k=>{j.RQr.logError(k,"Error in EscapeBattleState"),this.stateMachine.showThrownErrorDialog(k)}))}}class KM extends IP.Z{enter(){WM.B.openQuickQuizCancelledPopup((()=>{this.stateMachine.goToState(qM)}),!1)}}var zM=U(78355),YM=U(69297),QM=U(28496),XM=U(73032);class ZM extends XM.o{constructor(){super(...arguments),this._matchFinishedMenuOpened=new j.bnh,this._noMoreRevivesModalShownOrSkipped=new j.bnh}destroy(){this._matchFinishedMenu=void 0}setStateMachine(k){this._stateMachine=k}mayShowPostBattleMenus(){if(!j.Aq$.isDefined(this._stateMachine))return!1;const k=[QM.u,zM.$,DM.G,YM.L].some((k=>this._stateMachine.currentState instanceof k)),B=this._stateMachine.stateUpdateQueue.some((k=>k.type===Q.EBattleStateUpdate.EndBattle));return k||B}enable(k){const B=Object.create(null,{enable:{get:()=>super.enable}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.enable.call(this,k),this.mayShowPostBattleMenus()&&(yield this._noMoreRevivesModalShownOrSkipped,this.forceCloseNoMoreRevivesModal(),yield this._matchFinishedMenuOpened,this.forceCloseMatchFinishedMenu())}))}onMatchFinishedMenuOpened(k,B){this._resolveMatchFinishedMenu=B,this._matchFinishedMenu=k,this._matchFinishedMenuOpened.resolve()}onNoMoreRevivesModalOpenedOrSkipped(){this._noMoreRevivesModalShownOrSkipped.resolve()}onNoMoreRevivesModalOpened(k){this._noMoreRevivesModal=k,this._noMoreRevivesModalShownOrSkipped.resolve()}forceCloseNoMoreRevivesModal(){j.Aq$.isDefined(this._noMoreRevivesModal)&&(this._noMoreRevivesModal.destroy(),this._noMoreRevivesModal=void 0)}forceCloseMatchFinishedMenu(){var k;j.Aq$.isDefined(this._matchFinishedMenu)&&(null===(k=this._matchFinishedMenu)||void 0===k||k.destroyDeferred(),this._resolveMatchFinishedMenu())}}class JM extends SP.V{get battleUI(){return this._battleUI}constructor(k){super(k),this.type=Ni.gu.LootDash,this._paintedBackgroundZoomConfigs=Object.assign(Object.assign({},SP.Y),{fgStartScale:1,fgEndScale:1.5}),this._hasSeenStageIntro=!1,this.postBattleExpressModeController=new ZM,this._lootDashManager=K.q.instance.prodigy.gameContainer.get("cfe-9c2c"),this._lootDashManager.setup(),this._matchController=this._lootDashManager.matchController,this._baseLocalizer=K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),this._lootDashSegment=K.q.instance.prodigy.gameContainer.get("c47-20b6").lootDash}destroy(){var k;this._battleUIPrefabRoot.destroy(),this._lootDashManager.cleanupMatch(this._matchController),null===(k=this.postBattleExpressModeController)||void 0===k||k.destroy(),super.destroy()}getAssetList(){return[...super.getAssetList(),ah.B.Loot_dash_endgame_placing_screen,ah.B.Loot_dash_endgame_match_completed,ah.B.Loot_dash_stage_intro,ah.B.Loot_dash_revive,ah.B.Loot_dash_matchboard_done,ah.B.Loot_dash_matchboard_move,ah.B.Loot_dash_loot_bag_added,ah.B.Loot_dash_math_streak_complete,ah.B.Loot_dash_math_streak_increased,ah.B.Loot_dash_math_streak_reset]}playIntroSequence(){return(0,G.sH)(this,void 0,void 0,(function*(){}))}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){var U;const F=k.state,G=F.allStageConfigs;this._matchController.setStageData(G),this._lootDashSegment.sendRunStartedEvent(),this._matchController.onBattleDataChanged.active=!1,this._matchController.setCurrentStageData(G[F.currentStageIndex]),this._matchController.setCurrentWaveIndex(F.currentWaveIndex),(null===(U=F.mathStreak)||void 0===U?void 0:U.currentStreak)&&this._matchController.setCurrentMathStreak(F.mathStreak.currentStreak),F.lootBags&&this._matchController.setLootBagData(F.lootBags),this._matchController.revivesRemaining=F.revivesAvailable,this._matchController.onBattleDataChanged.active=!0,yield B.initBattlePrefab.call(this,k),this.postBattleExpressModeController.setStateMachine(this._stateMachine);for(const k of this.rightTeam.units)k.cleanUpOnDefeat=!0,k.onUnitDefeated.add((()=>{this.onRightTeamUnitDefeated(k)}));this._battleUIPrefabRoot=yield Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Ei.l.LootDashBattleUI,{[tr.eV.ExitButtonCallback]:()=>{this._exitDialogueMenu=K.q.instance.prodigy.open.confirmationDialog(new yh.k(this._baseLocalizer.getText("DIALOG_LEAVE"),(()=>{this._exitDialogueMenu=void 0,this.beginEndingBattleAndGotoState([qM])}),this._baseLocalizer.getText("DIALOG_STAY"),(()=>K.q.instance.prodigy.open.menuCloseAll()),void 0,Jc.E.Small,void 0,this._baseLocalizer.getText("LOOT_DASH_EXIT_PROMPT_TITLE"),this._baseLocalizer.getText("LOOT_DASH_EXIT_PROMPT_BODY")))}},this._prefabRoot),this._battleUI=this._battleUIPrefabRoot.findComponentInChildren(HM.I)}))}getStateOverride(k){if(this.isLootDashBattleStateUpdate(k))switch(k.name){case BM.WaveStart:this._matchController.setCurrentWaveIndex(k.data.waveIndex),this._lootDashSegment.sendWaveStartedEvent();break;case BM.WaveEnd:return this._stateMachine.stateUpdateQueue.shift(),this._matchController.setLootBagData(k.data.lootBagData),this._lootDashSegment.sendWaveCompletedEvent(),$M.D.clearNewlyRescuableUnitsSeen(),this.sendLootDashQuestEvent(),[RP,this._battleUI.showWaveCompletedLootBagAnimation(this._latestDefeatedRightUnitPosition)];case BM.StageStart:this._stateMachine.stateUpdateQueue.shift(),this._matchController.setCurrentStageData(k.data.stageData);const B=this._battleUI.showStageIntro(k.data.stageData.stageType);B.then((()=>{this._forceEndBattle||(this._matchController.stageIntroComplete(),this._hasSeenStageIntro||(this.highlightRescuableUnits().catch(j.RQr.createHandler("Error highlighting rescuable units")),this._hasSeenStageIntro=!0))})).catch(j.RQr.createHandler("Failed to play stage intro sequence")),this.setupCustomSequence(B),this._lootDashSegment.sendStageStartedEvent();break;case BM.StageEnd:this._lootDashSegment.sendStageCompletedEvent();break;case BM.HomeTeamRevived:return this._stateMachine.stateUpdateQueue.shift(),this.setupCustomSequence(this._battleUI.showReviveSequence(k.data.revivesRemaining)),this._lootDashManager.matchController.revivesRemaining=k.data.revivesRemaining,this._lootDashSegment.sendReviveUsedEvent(),[FM,1500];case BM.MathStreakUpdated:this._matchController.setCurrentMathStreak(k.data.currentStreak,k.data.lootBagData)}return 0===this._stateMachine.stateUpdateQueue.length&&j.Aq$.isDefined(this._customSequencePromise)?[RP,this._customSequencePromise]:super.getStateOverride(k)}handleStateChange(k){super.handleStateChange(k),this._battleUI.setExitButtonEnabled(this.isChoosingSpell)}sendLootDashQuestEvent(){const k=K.q.instance.prodigy.gameContainer.get("a25-68f4"),B={params:{taskEventType:dh.Z7.Battle,battleType:Ni.gu.LootDash,allies:this.leftTeam.units.map((k=>k.data)),enemies:this.rightTeam.units.map((k=>k.data))}};k.sendQuestEventViaHub(as.T.PLAY_ANY_BATTLE,B).catch(j.RQr.createHandler("Failed to send Loot Dash battle quest event for Loot Dash wave"))}onRightTeamUnitDefeated(k){this._latestDefeatedRightUnitPosition=k.GameObject.transform.worldPosition}setupCustomSequence(k){this._customSequencePromise=k,this._customSequencePromise.catch(j.RQr.createHandler("Failed to play custom sequence")).finally((()=>this._customSequencePromise=void 0))}isLootDashBattleStateUpdate(k){return(null==k?void 0:k.type)===Q.EBattleStateUpdate.CustomEvent&&(null==k?void 0:k.name)in BM}onEndGame(k){const B=Object.create(null,{onEndGame:{get:()=>super.onEndGame}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.onEndGame.call(this,k,!1),this._matchController.completeMatch(k),k&&(yield this._battleUI.movePlayerPinToEndOfMatchboard()),yield this._battleUI.hideAll(),this._matchController.lootDashMatchData.matchCompletionState===hP.Cr.Win?this.showConfetti():this._matchController.lootDashMatchData.matchCompletionState===hP.Cr.Loss&&(yield this.showNoMoreRevivesModal()),this.postBattleExpressModeController.onNoMoreRevivesModalOpenedOrSkipped(),yield this._battleUI.showMatchFinished(),this._battleUIPrefabRoot.destroy()}))}showConfetti(){this._confetti||(this._confetti=new j._mx,this._confetti.addComponent(j.dLy),this._confetti.layer=vh.E.Ui,gC.E.addConfetti(this._confetti),j.wa5.getActiveScene().addGameObject(this._confetti))}hideConfetti(){var k;null===(k=this._confetti)||void 0===k||k.destroy()}endLootDashQuickQuiz(){this.beginEndingBattleAndGotoState([KM])}showNoMoreRevivesModal(){return(0,G.sH)(this,void 0,void 0,(function*(){if(K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.isPlayingAtSchool())return;const k=yield WM.B.getInjectedValuesForNoMoreRevivesModal(this._matchController.config);if(!k)return;const B=yield Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Ei.l.LootDashNoMoreRevivesModal,k);this.postBattleExpressModeController.onNoMoreRevivesModalOpened(B),yield B.onDestroy.asPromise()}))}onVictory(k,B,U){const F=Object.create(null,{onVictory:{get:()=>super.onVictory}});return(0,G.sH)(this,void 0,void 0,(function*(){yield this.loadMatchFinishedMenu(),yield F.onVictory.call(this,this._matchController.getLootBagRewards(),this._matchController.getMemberLootBagRewards(),U)}))}onDefeat(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.onUnfinishedRun()}))}onEscape(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.onUnfinishedRun()}))}onUnfinishedRun(){const k=Object.create(null,{onDefeat:{get:()=>super.onDefeat}});return(0,G.sH)(this,void 0,void 0,(function*(){jM.G.hasMetMinimumVictoryRequirement(this._matchController.lootDashMatchData.lootBagData)?yield this.onVictory():(yield this.loadMatchFinishedMenu(),yield k.onDefeat.call(this,!0))}))}onNewRound(){}loadMatchFinishedMenu(){return(0,G.sH)(this,void 0,void 0,(function*(){for(;!this._matchController.lootDashMatchData.placement;)yield this._matchController.onBattleDataChanged.asPromise();const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").isMember(),B=this.getEarnedXP();this._lootDashSegment.sendRunCompletedEvent(B.totalNonMemberXp+(k?B.memberXp:0),this._matchController.lootDashMatchData.placement);const U=this.getInjectedValuesForMatchFinishedMenu(),F=K.q.instance.prodigy.world.getZone(K.q.instance.prodigy.world.getCurrentZone()).bgmID;return U[tr.eV.MatchFinishedRewardsEarned]?K.q.instance.prodigy.audio.playSFXFromGUID(ah.B.Loot_dash_endgame_placing_screen,(()=>{K.q.instance.prodigy.audio.playBGM(F,!0)})):K.q.instance.prodigy.audio.playBGM(F,!0),new Promise((k=>{Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Ei.l.LootDashMatchFinishedMenu,Object.assign(Object.assign({},U),{[tr.eV.MatchFinishedButtonCallback]:()=>{this.hideConfetti(),k()}})).then((B=>{this.postBattleExpressModeController.onMatchFinishedMenuOpened(B,k)})).catch(j.RQr.createHandler("LootDashBattleController: Failed to load the loot dash match finished menu"))}))}))}getInjectedValuesForMatchFinishedMenu(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0"),B=jo.E.createMockPlayerDataProvider(),U=this._matchController.lootDashMatchData,F=U.matchCompletionState===hP.Cr.Win,G=U.placement>=1&&U.placement<=3,j=jM.G.getLootBagsCount(U.lootBagData),$=F?G?this._baseLocalizer.getText("LOOT_DASH_MATCH_FINISHED_TOP_THREE_INFO_TEXT"):this._baseLocalizer.getText("LOOT_DASH_MATCH_FINISHED_NOT_TOP_THREE_INFO_TEXT"):j>0?this._baseLocalizer.getText("LOOT_DASH_MATCH_UNFINISHED_REWARDS_INFO_TEXT"):this._baseLocalizer.getText("LOOT_DASH_MATCH_UNFINISHED_NO_REWARDS_INFO_TEXT"),H=F?G?VM._c.Fireworks:VM._c.FireworksLess:j>0?VM._c.FireworksSingle:VM._c.None,V=F?this._baseLocalizer.getText("LOOT_DASH_MATCH_FINISHED_NOT_TOP_THREE_PLACEMENT_TEXT"):this._baseLocalizer.getText("LOOT_DASH_MATCH_UNFINISHED_REWARDS_PLACEMENT_TEXT"),W={"377-3e7b":B,[tr.n7.WizardInjectionConfiguredAppearance]:k.getAppearance(),[tr.eV.MatchFinishedLootBagAmountText]:`x${j}`,[tr.eV.MatchFinishedShowNumberedPlacement]:G,[tr.eV.MatchFinishedInfoText]:$,[tr.eV.MatchFinishedPlacementReplacementText]:V,[tr.eV.MatchFinishedRewardsEarned]:j>0,[tr.eV.MatchFinishedMatchCompleted]:F,[tr.eV.MatchFinishedFireworkAnimationName]:H};if(F){const k=1===U.placement?"st":2===U.placement?"nd":"rd";W[tr.eV.MatchFinishedPlacement]=U.placement,W[tr.eV.MatchFinishedPlacementSuffix]=k}return W}setLootDashInfoWidgetsVisibility(k){this.battleUI.setInfoWidgetsVisibility(k).catch((k=>j.RQr.logError(k,"Failed to set Wizard Dash info widgets visibility for rescue flow.")))}getScalableBattleDrops(){return[]}getNonScalableBattleDrops(){return[]}getScalableMemberBattleDrops(){return[]}getNonScalableMemberBattleDrops(){return[]}beginEndingBattleAndGotoState(k,B={}){this.forceCloseExitConfirmationMenuIfOpen(),super.beginEndingBattleAndGotoState(k,B)}forceCloseExitConfirmationMenuIfOpen(){j.Aq$.isDefined(this._exitDialogueMenu)&&(this._exitDialogueMenu.close(),this._exitDialogueMenu=void 0)}canBattleEndInstantly(){return super.canBattleEndInstantly()&&!j.Aq$.isDefined(this._exitDialogueMenu)}showSpellCards(k,B){var U,F;super.showSpellCards(k,B),null===(U=this.spellCardsController)||void 0===U||U.targetController.onRescueCurrencyBalanceHidden.add((()=>this.setLootDashInfoWidgetsVisibility(!0))),null===(F=this.spellCardsController)||void 0===F||F.targetController.onRescueCurrencyBalanceShown.add((()=>this.setLootDashInfoWidgetsVisibility(!1)))}}var tN=U(26460);class eN extends IP.Z{enter(){this.play().catch((k=>{j.RQr.logError(k,"Error running shell game"),this.stateMachine.showThrownErrorDialog(k)}))}play(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.game.add.tween.bind(K.q.instance.game.add),B=this.stateMachine.awayTeam.units,U=B.length>2?350:250,F=wn.o.integerInRange(9,12);for(let G=0;G{q.setPosition(X.x+et.x,X.y+et.y),K.setPosition(Z.x-et.x,Z.y-et.y),!et.swapped&&et.value>.5&&([V.layerLevel,W.layerLevel]=[W.layerLevel,V.layerLevel],[V.GameObject.layer,W.GameObject.layer]=[W.GameObject.layer,V.GameObject.layer],[V.creature.creatureGameObject.layer,W.creature.creatureGameObject.layer]=[W.creature.creatureGameObject.layer,V.creature.creatureGameObject.layer],et.swapped=!0)})),yield it.onTweenComplete.asPromise()}this.stateMachine.goToState(OP.B)}))}}let iN=class extends wM.m{joinDuel(){return(0,G.sH)(this,void 0,void 0,(function*(){}))}sendWaitPing(){return(0,G.sH)(this,void 0,void 0,(function*(){return{wait:!0}}))}};iN=(0,G.Cg)([(0,tt.injectable)()],iN);class sN extends SM{enter(){const k=this.stateMachine.stateUpdateQueue[0];k.type===Q.EBattleStateUpdate.CustomEvent&&k.name===vM.Thinking?(this._thinkingEvent=k,this.stateMachine.stateUpdateQueue.shift(),this._withheldUpdates=this.stateMachine.stateUpdateQueue.splice(0,this.stateMachine.stateUpdateQueue.length),super.enter()):this.stateMachine.goToState(OP.B)}performWaitPings(){const{botConfig:k}=j.wa5.getActiveScene().container.get("LocalConfig");return new j.kBN(((B,U)=>{(()=>(0,G.sH)(this,void 0,void 0,(function*(){if(this._thinkingEvent.data.roundStartQuestion){const B=Date.now()-j.wa5.getActiveScene().container.get("84a-1738"),U=j.cj9.clamp(this._thinkingEvent.data.delay-B,0,1e3*k.timings.questionAnswer.maxTimeOverPlayer);yield j.Egh.timeout(U)}else yield j.Egh.timeout(this._thinkingEvent.data.delay);this.stateMachine.stateUpdateQueue.push(...this._withheldUpdates),this.battleController.onMessageReceived.dispatch()})))().catch(U)}))}}var nN;!function(k){k[k.None=0]="None",k[k.MpGain=1]="MpGain",k[k.MpUsage=2]="MpUsage",k[k.SpellCast=3]="SpellCast",k[k.NewRound=4]="NewRound",k[k.SpellCooldown=5]="SpellCooldown"}(nN||(nN={}));class aN extends MM{constructor(){super(...arguments),this.hideMergeRank=!1,this._isNewRound=!1}get leftTeamId(){return Q.ETeamId.Home}get rightTeamId(){return Q.ETeamId.Away}bindNetworkHandler(){j.wa5.getActiveScene().container.bind("NetworkHandler").to(iN).asSingleton()}getLoadingScreen(){return K.q.instance.game.state.get(Ie.G.DuelMatchmaking)}requestBattleStart(k){const B=Object.create(null,{requestBattleStart:{get:()=>super.requestBattleStart}});return(0,G.sH)(this,void 0,void 0,(function*(){const U=yield B.requestBattleStart.call(this,k);return this.getLoadingScreen().consumeStadiumRoomEntryCost(),yield new Promise((k=>this._activePlayer.forceSaveCharacter(k))),U}))}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){const U=H().find(k.state.units,(k=>k.teamId===this.rightTeamId&&k.type===Ni.uj.Wizard)),F=new Oe.a(K.q.instance.game);F.appearance.init(Object.assign(Object.assign({},U.appearance),{name:U.appearance.name})),F.equipment.init(Object.assign({},U.equipment)),F.data.level=U.level,j.Aq$.isDefined(U.chargedLevel)&&(F.data.chargedLevelData={chargedLevel:U.chargedLevel,chargedLevelCap:U.chargedLevel,chargedLevelsEnabled:U.chargedLevel>0}),U.appearance.morph&&F.setData({playerTransformation:{transformType:U.appearance.morph.type,transformID:U.appearance.morph.ID}}),yield this.getLoadingScreen().showOpponent(F,k.state.botConfig.streakModifiers.streakOffset),yield B.initBattlePrefab.call(this,k)}))}onStartBattle(){const k=Object.create(null,{onStartBattle:{get:()=>super.onStartBattle}});return(0,G.sH)(this,void 0,void 0,(function*(){const B=this.rightTeam.wizard;return B&&(B.unitNameForSegment=this._stateMachine.segment.duelsStadium.botPersonality),k.onStartBattle.call(this)}))}destroy(){super.destroy(),this.getLoadingScreen().shutdown()}processBattleStateUpdates(k){var B;const{botConfig:U}=j.wa5.getActiveScene().container.get("LocalConfig");let F=null===(B=this.activeUnit)||void 0===B?void 0:B.data.teamId,G=nN.None;for(let j=0;j0?($=nN.MpGain,F=G!==nN.MpGain):($=nN.MpUsage,F=G!==nN.MpUsage&&G!==nN.NewRound):B.type===Q.EBattleStateUpdate.ModifySpellCooldown&&($=nN.SpellCooldown),F){const F=B.type===Q.EBattleStateUpdate.CastSpell&&B.id===this.battleConstants.fumbleSpellId,G=$===nN.MpGain||F,H=G?U.timings.questionAnswer.timings:U.timings.spellChoiceTimings,V=this.getDelayTimeWithVarianceInMilliseconds(H.average,H.variance),W=G&&this._isNewRound,q={type:Q.EBattleStateUpdate.CustomEvent,name:vM.Thinking,data:{delay:V,roundStartQuestion:W}};k.splice(j,0,q),this._isNewRound=!1,++j}$!==nN.SpellCooldown&&(G=$)}}return k}getStateOverride(k){if((null==k?void 0:k.type)===Q.EBattleStateUpdate.CustomEvent&&k.name===vM.Thinking)return[sN];const B=super.getStateOverride(k);return(null==B?void 0:B[0])===SM?[sN]:B}getDelayTimeWithVarianceInMilliseconds(k,B){return k*(1+j.cj9.random(-B,B))*1e3}}(0,G.Cg)([(0,Re.b)("306-5359"),(0,G.Sn)("design:type",ye.W)],aN.prototype,"_activePlayer",void 0);class rN extends NM{constructor(){super(...arguments),this.hideMergeRank=!1}getLoadingScreen(){return K.q.instance.game.state.get(Ie.G.DuelMatchmaking)}requestBattleStart(k){const B=Object.create(null,{requestBattleStart:{get:()=>super.requestBattleStart}});return(0,G.sH)(this,void 0,void 0,(function*(){const U=yield B.requestBattleStart.call(this,k);return this.getLoadingScreen().consumeStadiumRoomEntryCost(),yield new Promise((k=>this._activePlayer.forceSaveCharacter(k))),U}))}destroy(){super.destroy(),this.getLoadingScreen().shutdown()}}(0,G.Cg)([(0,Re.b)("306-5359"),(0,G.Sn)("design:type",ye.W)],rN.prototype,"_activePlayer",void 0);class oN extends SP.V{getScalableBattleDrops(){var k;return this._localConfig.scaleGuaranteedDrops&&null!==(k=this._localConfig.guaranteedDrops)&&void 0!==k?k:[]}getNonScalableBattleDrops(){var k;return this._localConfig.scaleGuaranteedDrops?[]:null!==(k=this._localConfig.guaranteedDrops)&&void 0!==k?k:[]}}class hN extends SP.V{initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k),this._pumpkinfestBoss=this.rightTeam.units.find((k=>k.battleId===hN.PUMPKINFEST_BOSS_BATTLE_ID)),this._pumpkinfestBoss.size=lM.X.Medium}))}getUnitDataForTeam(k,B){const U=super.getUnitDataForTeam(k,B),F=U.find((k=>k.unitId===hN.PUMPKINFEST_BOSS_BATTLE_ID));return F&&(F.unitSlot=3),U}}hN.PUMPKINFEST_BOSS_BATTLE_ID="pumpkinfestBoss";var cN=U(90351),dN=U(68607),lN=U(90804),uN=U(94596),fN=U(61404);class bN extends V.Filter{constructor(k=0,B=0,U=20,F=.3){super(V.defaultFilterVertex,fN.Q.getWaveFadeFragment(),{time:k,fade:B,frequency:U,amplitude:F}),this.timeSeconds=k}apply(k,B,U,F){this.uniforms.time=this.timeSeconds,this.uniforms.fade=this.fadeAmount,this.uniforms.frequency=this.frequency,this.uniforms.amplitude=this.amplitude,k.applyFilter(this,B,U,F)}}let pN=class extends uN.b{constructor(){super(...arguments),this.DEFAULT_FADE_DURATION_MS=2e3,this.waveAmplitude=.1,this.waveFrequency=6,this.waveSpeed=2*Math.PI,this._fadeInDurationMs=this.DEFAULT_FADE_DURATION_MS,this._fadeOutDurationMs=this.DEFAULT_FADE_DURATION_MS,this.useAlpha=!0,this._fadeInEase=cN.i.LinearNone,this._fadeOutEase=cN.i.LinearNone}initialize(){super.initialize(),this._transitionFilter=new bN(K.q.instance.game.time.timeMS/1e3*this.waveSpeed,this.fadeValue,this.waveFrequency,this.waveAmplitude),this._filterList.push(this._transitionFilter)}fadeIn(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.fade(0,1,this._fadeInDurationMs,this._fadeInEase)}))}fadeOut(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.fade(1,0,this._fadeOutDurationMs,this._fadeOutEase)}))}fade(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){if(this._tween)return void j.VyI.log("Cannot start fade, a fade is already in progress.",j.$bb.Warning);this.fadeValue=k;const G={fade:k};this._tween=K.q.instance.game.add.tween(G,this).to({fade:B},U,cN.K.getEasingFunctionFromEnum(F),!0),this._tween.onUpdate.add((()=>{this.fadeValue=G.fade})),yield this._tween.onTweenComplete.asPromise(),this.fadeValue=B,this._tween=null}))}update(){super.update(),this._transitionFilter&&(this._transitionFilter.timeSeconds=K.q.instance.game.time.timeMS/1e3*this.waveSpeed,this._transitionFilter.fadeAmount=this.useAlpha?this.fadeValue:1,this._transitionFilter.amplitude=(1-this.fadeValue)*this.waveAmplitude,this._transitionFilter.frequency=this.waveFrequency*Math.PI*2)}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],pN.prototype,"waveAmplitude",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],pN.prototype,"waveFrequency",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],pN.prototype,"waveSpeed",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],pN.prototype,"_fadeInDurationMs",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],pN.prototype,"_fadeOutDurationMs",void 0),(0,G.Cg)([(0,j.gfw)(cN.i),(0,G.Sn)("design:type",String)],pN.prototype,"_fadeInEase",void 0),(0,G.Cg)([(0,j.gfw)(cN.i),(0,G.Sn)("design:type",String)],pN.prototype,"_fadeOutEase",void 0),pN=(0,G.Cg)([(0,j.EVk)("BattleBackgroundTransitionFilter",rc.Y.effect)],pN);var vN,gN=U(45855);!function(k){k[k.OldBackgroundsOut=0]="OldBackgroundsOut",k[k.NewBackgroundsLoaded=1]="NewBackgroundsLoaded"}(vN||(vN={}));class mN{static swapBackgrounds(k,B){return(0,G.sH)(this,arguments,void 0,(function*(k,B,U=[],F=[],$){const H=_P.l.guaranteeArray(B);(0,rs.v)(k.length===H.length);const V=[];k.forEach(((k,B)=>{const U=k.GameObject.addComponent(pN);U.fadeValue=1,U.applyFilter(),U.useAlpha=B>0,V.push(U)})),U.forEach((k=>{const B=k.addComponent(pN);B.fadeValue=1,B.applyFilter(),B.useAlpha=!1,V.push(B)}));const W=yield this.createFilteredImage(nr.q.Battle_interstitial_bg,"interstitial",gN.g),q=[];q.push(...V.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k.fadeOut()}))))),q.push(W.fadeIn()),yield Promise.all(q),yield null==$?void 0:$(vN.OldBackgroundsOut),V.forEach((k=>{k.destroy()})),V.length=0;const z=k.map((k=>{const B=k.GameObject,U=k.sprite.key;return k.destroy(),pn.K.safeUnloadImage(U),B}));for(const G of U)G.destroy();const Y=new Promise((k=>{K.q.instance.prodigy.load.assets(H,k)})),Q=j.Egh.timeout(mN.MINIMUM_TRANSITION_WAIT_TIME_MS);yield Promise.all([Y,Q]),yield Promise.all(z.map(((k,B)=>(0,G.sH)(this,void 0,void 0,(function*(){const U=k.addComponent(Eo._);yield U.setAsset(H[B]),U.sizeToSourceImage();const F=U.GameObject.addComponent(pN);F.fadeValue=0,F.applyFilter(),F.useAlpha=B>0,V.push(F)}))))),F.forEach((k=>{k.active=!0;const B=k.addComponent(pN);B.fadeValue=0,B.applyFilter(),B.useAlpha=!1,V.push(B)})),yield null==$?void 0:$(vN.NewBackgroundsLoaded);const X=[];X.push(...V.map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k.fadeIn()}))))),X.push(W.fadeOut()),yield Promise.all(X),V.forEach((k=>{k.destroy()})),W.GameObject.destroy()}))}static createFilteredImage(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){const F=new j._mx;F.layer=B,j.wa5.getActiveScene().addGameObject(F);const G=F.addComponent(j.XVE);G.pivot.set(0,0),G.setAnchoredPivotOffset(0,0),G.fullWidth=K.q.instance.game.width,G.fullHeight=K.q.instance.game.height;const $=F.addComponent(Eo._);yield $.setAsset(k);const H=F.addComponent(U);return H.applyFilter(),H}))}}mN.MINIMUM_TRANSITION_WAIT_TIME_MS=2e3;class yN extends SP.V{constructor(){super(...arguments),this._stateOverrideStep=0,this._puppetMasterDefeatSequenceEnd=new j.bnh,this._activeUnitIndicatorStep=0,this._unitMpDrainSpines=new Map}getAssetList(){return[...this._baseAssets,ah.B.Sfx_large_explosion_with_glass,ah.B.Sfx_short_explosion_with_rubble_A,ah.B.Sfx_short_explosion_with_rubble_B,ah.B.Sfx_medium_explosion_with_rubble_A,ah.B.Sfx_medium_explosion_with_rubble_B,ah.B.Sfx_long_explosion_with_rubble_A,ah.B.Sfx_long_explosion_with_rubble_B,ah.B.Sfx_puppet_master_spell_cast,ah.B.Sfx_puppet_master_spell_map_transition,ah.B.Sfx_puppet_master_spell_downpour,ah.B.Sfx_puppet_master_spell_mp_drain,ah.B.Sfx_puppet_master_spell_beam_travel,ah.B.Sfx_puppet_master_spell_beam_impact,ah.B.Sfx_puppet_master_spell_pet_steal_travel,ah.B.Sfx_puppet_master_spell_volcano,ah.B.Sfx_puppet_master_battle_ground_rumble,ah.B.Sfx_puppet_master_battle_heavenly_harmonic,ah.B.Sfx_puppet_master_battle_keystone_flash,ah.B.Sfx_puppet_master_defeat_animation,ah.B.Bgm_puppet_master_ambient_loop,ah.B.Bgm_puppet_master_victory_loop,J.Q.Spine_battle_mp_drain_json]}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){this._finalBackgrounds=this._localConfig.backgroundID,this._localConfig.backgroundID=[nr.q.Battle_academy_gh_pedestal_bg,nr.q.Battle_academy_gh_pedestal_fg],yield B.initBattlePrefab.call(this,k);for(const k of this.getUnits())k.uiContent.active=!1;this.setUnitTooltipLock(!0);const U=yield this._prefabLoader.loadWithDependenciesFromGUID(Ei.l.GuardianBattleFog);this._battleFogAnimator=U.findComponentInChildren(Ir.j),this._battleFogAnimator.GameObject.active=!1;const F=yield this._prefabLoader.loadWithDependenciesFromGUID(Ei.l.PuppetMasterBattleEnvironmentFX);this._prefabRoot.addChild(F),this._battleBackgroundFX=F.findComponent(dN.n),this._fxAnimatorObjects=this._battleBackgroundFX.getAnimators().map((k=>k.GameObject));for(const k of this._fxAnimatorObjects)k.active=!1;this._keystoneAnimator=j.wa5.getActiveScene().container.get("KEYSTONE_ANIMATOR"),this._keystoneAnimator.GameObject.active=!1,this._puppetMaster=this.rightTeam.units.find((k=>k.battleId===yN.PUPPET_MASTER_BATTLE_ID)),this._puppetMaster.size=lM.X.Medium,this._puppetMaster.creature.teleportType=KP.H0.None,this._pmSpellCastSfx=this._puppetMaster.creature.castSpellSfx,this._puppetMaster.creature.defeated=()=>(0,G.sH)(this,void 0,void 0,(function*(){})),this._puppetMaster.onDefeatAnimationFinished.add((()=>{this.runPuppetMasterDefeatSequence().catch((k=>{Ko.captureException(k),j.RQr.logError(k,"Error showing puppet master defeat sequence")}))}));for(const k of this.getTeam(lM.h.Home).units){const B=k.mpBar.mpAnimators.map((k=>{const B=new j._mx(k.GameObject);B.active=!1;const U=B.addComponent(Wn.v);return U.setAsset(J.Q.Spine_battle_mp_drain_json),U}));this._unitMpDrainSpines.set(k.data.unitId,B)}}))}getStateOverride(k){switch(null==k?void 0:k.type){case Q.EBattleStateUpdate.NewRound:switch(this._stateOverrideStep++){case 0:const B=yN.ROUND_DIALOGUES[k.round];if(B)return B.shouldTaunt&&(0,$P.ib)(this._puppetMaster.creature.animator,["taunt","idle"],!0),B.isNPCSpellCast&&(this._activeUnitIndicatorStep=1,this._showIndicator=!1,this._puppetMaster.creature.castSpellSfx=null),[DP,B.dialogues];break;case 1:if(1===k.round)return[RP,this.playBackgroundTransitionSequence()]}break;case Q.EBattleStateUpdate.SetActiveUnit:1===this._activeUnitIndicatorStep?this._activeUnitIndicatorStep++:2===this._activeUnitIndicatorStep&&(this._activeUnitIndicatorStep=0,this._showIndicator=!0,this._puppetMaster.creature.castSpellSfx=this._pmSpellCastSfx);break;case Q.EBattleStateUpdate.CastSpell:for(const B of k.targets)B.hits.some((k=>k.mpDamage>0))&&this.playMpDrain(B.unitId,1300).catch(j.RQr.createHandler("Error playing MP drain animation"));break;case Q.EBattleStateUpdate.EndBattle:if(0==this._stateOverrideStep++&&this._puppetMaster.isDefeated())return[RP,this._puppetMasterDefeatSequenceEnd]}return this._stateOverrideStep=0,super.getStateOverride(k)}getScalableBattleDrops(){return[...super.getScalableBattleDrops(),...lN.p.PUPPET_MASTER_GEAR_DROPS]}getUnitDataForTeam(k,B){const U=super.getUnitDataForTeam(k,B),F=U.find((k=>k.unitId===yN.PUPPET_MASTER_BATTLE_ID));return F&&(F.unitSlot=3),U}playBackgroundTransitionSequence(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=[];K.q.instance.prodigy.audio.playSFXFromGUID(ah.B.Sfx_puppet_master_spell_map_transition),yield j.Egh.timeout(250),k.push((0,$P.ib)(this._puppetMaster.creature.animator,["summon","throw-down"],!0)),yield j.Egh.timeout(1700),this._battleFogAnimator.GameObject.active=!0;const B=(0,$P.ib)(this._battleFogAnimator,["fade-in","idle"],!0),U=this._prefabRoot.children.find((k=>"backgroundImage"===k.layer)),F=this._prefabRoot.children.find((k=>"foregroundImage"===k.layer)),$=U.findComponentInChildren(Eo._),H=F.findComponentInChildren(Eo._);k.push(mN.swapBackgrounds([$,H],this._finalBackgrounds,void 0,this._fxAnimatorObjects,(k=>(0,G.sH)(this,void 0,void 0,(function*(){k===vN.NewBackgroundsLoaded&&(this._keystoneAnimator.GameObject.active=!0,yield B,this._battleFogAnimator.playAnimation("fade-out",!1))}))))),yield Promise.all(k),this._battleFogAnimator.GameObject.destroy(),yield(0,$P.ib)(this._puppetMaster.creature.animator,["taunt","idle"],!0),yield Promise.all(this.getUnits().map((k=>(0,G.sH)(this,void 0,void 0,(function*(){k.uiContent.active=!0,yield k.fadeUi(1,0)}))))),this.setUnitTooltipLock(!1),yield this.setSpellBookVisible(!0)}))}playMpDrain(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){const U=this._unitMpDrainSpines.get(k),F=this.getUnits().find((B=>B.battleId===k));if(F&&U){yield j.Egh.timeout(B);const k=[];for(let B=0;B0&&(yield j.Egh.timeout(300)),G.GameObject.active=!0,k.push(bc.qb(G.getSpine(),"mp-drain",!1).then((()=>G.GameObject.active=!1)))}yield Promise.all(k)}}))}runPuppetMasterDefeatSequence(){return(0,G.sH)(this,void 0,void 0,(function*(){K.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(16,De.jT.PuppetMasterBattleWon),this.setUnitTooltipLock(!0);const k=j.wa5.getActiveScene().container,B=K.q.instance.prodigy.audio;B.playBGM(ah.B.Bgm_puppet_master_ambient_loop,!0),this._puppetMaster.uiContent.active=!0,yield j.Egh.timeout(1e3),(()=>(0,G.sH)(this,void 0,void 0,(function*(){yield this.setActiveUnit(null),yield this.setSpellBookVisible(!1)})))().catch(j.RQr.createHandler("Error clearing active unit")),this._ignoreUnitEntranceUIWhenMoving=!0,yield Promise.all(this.getUnits().map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return k.fadeUi(0)}))))),yield bc.v$([1479]),B.playSFXFromGUID(ah.B.Sfx_puppet_master_battle_ground_rumble);const U=k.get("LETTERBOX");U.start();const F=B.playSFXFromGUID(ah.B.Sfx_puppet_master_battle_heavenly_harmonic);yield K.q.instance.game.add.tween(j.i7d.main.GameObject.transform.localPosition,this).to({x:"+=34",y:"-=69"},2e3,cN.K.getEasingFunctionFromEnum(cN.i.SinusoidalInOut),!0).onTweenComplete.asPromise();const $=k.get("SCREEN_SHAKE");$.durationMS=6e3,$.buildupDuration=2e3,$.falloffDuration=3e3,$.cycles=80,$.amplitude=3,$.run(),yield j.Egh.timeout(3e3),B.playSFXFromGUID(ah.B.Sfx_puppet_master_battle_keystone_flash),yield new Promise(((k,B)=>{(0,$P.ib)(this._keystoneAnimator,["keystone-active-cast-battle","keystone-spent-idle-battle"],!0).then(k).catch(B),this._keystoneAnimator.spine.onEvent.addOnce(k)})),K.q.instance.game.add.tween(F.instances[0],this).to({volume:0},2500,j.GS3.Linear.None,!0);const H=k.get("KEYSTONE_GLOWS");H.getRootContainer().alpha=0,H.GameObject.active=!0,yield Promise.race([K.q.instance.game.add.tween(H.getRootContainer(),this).to({alpha:1},1e3,cN.K.getEasingFunctionFromEnum(cN.i.SinusoidalInOut),!1).to({alpha:1},2e3,void 0,!1).to({alpha:0},1e3,cN.K.getEasingFunctionFromEnum(cN.i.SinusoidalInOut),!1).start().onTweenComplete.asPromise().then((()=>H.GameObject.active=!1)),j.Egh.timeout(2e3)]),this._puppetMaster.creature.animator.playAnimation("defeat",!1),B.playSFXFromGUID(ah.B.Sfx_puppet_master_defeat_animation),yield this._puppetMaster.creature.animator.OnAnimationComplete.asPromise(),yield j.Egh.timeout(3250);const V=No.B.musicVolume.addSmoothedLensMultiplier(0);yield j.Egh.timeout(750);const W=yield this._prefabLoader.loadWithDependenciesFromGUID(Ei.l.EndgameIllustrationPuppetMasterDefeat);B.playBGM(this._localConfig.victoryMusicID,!0),V.remove();const q=W.findComponentInChildren(wA.V);this.battleResult.onOpened.addOnce((()=>{null==W||W.destroy()})),yield j.Egh.timeout(1e3),K.q.instance.game.add.tween(j.i7d.main.GameObject.transform.localPosition,this).to({x:"-=34",y:"+=69"},1e3,cN.K.getEasingFunctionFromEnum(cN.i.SinusoidalInOut),!0),U.end(),yield q.onComplete.asPromise(),K.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(17,De.jT.PostPuppetMasterVisualsShown),this._puppetMasterDefeatSequenceEnd.resolve()}))}onStartBattle(){const k=Object.create(null,{onStartBattle:{get:()=>super.onStartBattle}});return(0,G.sH)(this,arguments,void 0,(function*(B=!1){yield k.onStartBattle.call(this,B)}))}}yN.PUPPET_MASTER_BATTLE_ID="puppetmaster",yN.ROUND_DIALOGUES={1:{dialogues:[1441]},2:{dialogues:[1442],shouldTaunt:!0},3:{dialogues:[1443],shouldTaunt:!0},4:{dialogues:[1444],isNPCSpellCast:!0},5:{dialogues:[1446]},6:{dialogues:[1445],shouldTaunt:!0},7:{dialogues:[1447,1448,1449],shouldTaunt:!0},8:{dialogues:[1450],shouldTaunt:!0},9:{dialogues:[1451]}};class _N extends SP.V{constructor(){super(...arguments),this._fakeWeightDividend=5}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k),this._modifierGridPrefab=yield cM.Q.addModifierGridPrefab(cM.Q.MODIFIER_GRID_X_IN_BATTLE,cM.Q.MODIFIER_GRID_Y_IN_BATTLE)}))}processBattleStateUpdates(k){for(const B of k)B.type===Q.EBattleStateUpdate.CustomEvent&&B.name===QS.wJ.RewardDetermined&&(dM.T.reward=B.data.reward);return k}onEndGame(k){const B=Object.create(null,{onEndGame:{get:()=>super.onEndGame}});return(0,G.sH)(this,void 0,void 0,(function*(){this._modifierGridPrefab.destroy(),this._modifierGridPrefab=null,yield B.onEndGame.call(this,k)}))}showBattleResult(k,B,U,F){const $=Object.create(null,{showBattleResult:{get:()=>super.showBattleResult}});return(0,G.sH)(this,arguments,void 0,(function*(k,B,U,F,G=!0){var V,W,q,z;if(!G)return;if(!dM.T.isFinalBattle)return void(yield $.showBattleResult.call(this,k,B,U,F,G));const Y=K.q.instance.prodigy.gameContainer.get("196-d3a5"),Q=K.q.instance.prodigy.gameContainer.get("306-5359"),X=null===(V=Y.riftsTierTotalData)||void 0===V?void 0:V[dM.T.riftTier],Z=null!==(W=null==X?void 0:X.rewards)&&void 0!==W?W:[];let J=Z.map((k=>({type:k.type,ID:k.id,N:k.quantity,R:k.weight})));J=J.filter((k=>QS._u.includes(k.type)||Q.getItemCount(k.type,k.ID)<=0));const tt=Z.reduce(((k,B)=>k+B.weight),0);let et;if(!et){const k=dM.T.reward;if(k){const B=null===(q=le.t.getItem(k.type,k.id))||void 0===q?void 0:q.data;et={type:k.type,ID:k.id,N:k.quantity,data:{name:B?Tn.J.getLocalizationNameKey(k):"",flavorText:B?Tn.J.getLocalizationFlavorKey(k):"",rarity:null!==(z=null==B?void 0:B.rarity)&&void 0!==z?z:0}}}}if(et&&(H().find(J,(k=>k.id===et.ID&&k.type===et.type&&k.quantity===et.N))||J.push({type:et.type,ID:et.ID,N:et.N,R:Math.round(tt/this._fakeWeightDividend)}),"petHat"!==et.type&&"petRelic"!==et.type||K.q.instance.prodigy.gameContainer.get("d69-defe").refreshPetGear().catch(j.RQr.createHandler("RiftRunBattleController: Failed to refresh pet gear after being awarded it after a rift run")),(0,jP.p)(et.type,et.ID))){K.q.instance.prodigy.gameContainer.get("c47-20b6").postBattleFlow.itemTransaction.setIndividualData(et.type,et.ID,{instance_type:Ai.N.RiftRun,source_type:gn.C.PrizeWheel})}yield new Promise((k=>{K.q.instance.prodigy.open.bossRewards([],Ai.N.RiftRun,Ei.l.BossRewardUIwithnorespin,et?[et]:void 0,J,k,!0,!et||!(0,jP.p)(et.type,et.ID))})),yield $.showBattleResult.call(this,k,B,U,F,G)}))}}var EN,wN,TN,SN,AN,CN,ON,IN,DN,RN,PN=U(87539);!function(k){k[k.PreBattleDialogue=0]="PreBattleDialogue",k[k.TeleportSwap=1]="TeleportSwap",k[k.NPCDialogueStart=2]="NPCDialogueStart",k[k.NPCDialoguePlayed=3]="NPCDialoguePlayed"}(EN||(EN={}));class MN extends SP.V{constructor(){super(...arguments),this._activeUnitIndicatorStep=0,this._cachedLastRound=0}getAssetList(){return[...this._baseAssets,ah.B.Sfx_puppet_master_spell_map_transition]}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){this._localConfig.backgroundID=[nr.q.Battle_academy_gh_pedestal_bg,nr.q.Battle_academy_gh_pedestal_fg],yield B.initBattlePrefab.call(this,k);for(const k of this.getUnits())k.uiContent.active=!1;this._battleData=PN.m.getGuardianData(this.type);const U=yield this._prefabLoader.loadWithDependenciesFromGUID(Ei.l.GuardianBattleFog);this._battleFogAnimator=U.findComponentInChildren(Ir.j),this._battleFogAnimator.GameObject.active=!1,this.setUnitTooltipLock(!0);const F=this.getUnits().find((k=>"guardian"===k.battleId)),G=F.name,j=Object.assign(Object.assign({},F.data),{asset:{type:Ni.uj.Boss,id:59}});F.creature.creatureGameObject.destroy(),F.setData(j,KP.H0.ShadowBig,F.controllerUnit),F.name=G,yield F.loadPromise,F.creature.creatureGameObject.active=!0,F.uiContent.active=!1,this._swapUnit=F,this._overrideStep=EN.PreBattleDialogue}))}onStartBattle(){const k=Object.create(null,{onStartBattle:{get:()=>super.onStartBattle}});return(0,G.sH)(this,arguments,void 0,(function*(B=!1){yield k.onStartBattle.call(this,B)}))}getStateOverride(k){switch(null==k?void 0:k.type){case Q.EBattleStateUpdate.NewRound:switch(this._cachedLastRound=k.round,this._overrideStep){case EN.PreBattleDialogue:return this._overrideStep=EN.TeleportSwap,[DP,this._battleData.puppetMasterDialogueSequence];case EN.TeleportSwap:return this._overrideStep=EN.NPCDialogueStart,[RP,this.playTeleportSwapSequence()];case EN.NPCDialogueStart:const k=this._battleData.npcHelperData.find((k=>k.entranceRound===this._cachedLastRound));if(k)return this._activeUnitIndicatorStep=1,this._showIndicator=!1,this._overrideStep=EN.NPCDialoguePlayed,[DP,k.dialogueSequence];break;case EN.NPCDialoguePlayed:this._overrideStep=EN.NPCDialogueStart}break;case Q.EBattleStateUpdate.SetActiveUnit:if(1===this._activeUnitIndicatorStep)this._activeUnitIndicatorStep++;else if(2===this._activeUnitIndicatorStep){this._activeUnitIndicatorStep=0,this._showIndicator=!0;const k=this._battleData.npcHelperData.find((k=>k.entranceRound===this._cachedLastRound));if(null==k?void 0:k.dialogueSequenceReprise)return[DP,k.dialogueSequenceReprise]}break;case Q.EBattleStateUpdate.CustomEvent:this._swapUnit.creature.breakBarrier()}return null}playTeleportSwapSequence(){return(0,G.sH)(this,void 0,void 0,(function*(){K.q.instance.prodigy.audio.playSFXFromGUID(ah.B.Sfx_puppet_master_spell_map_transition),yield j.Egh.timeout(250),this._swapUnit.creature.animator.playAnimation("summon",!1),yield j.Egh.timeout(1500),yield this._swapUnit.playDefeated();const k=this._prefabRoot.children.find((k=>"backgroundImage"===k.layer)),B=this._prefabRoot.children.find((k=>"foregroundImage"===k.layer)),U=k.findComponentInChildren(Eo._),F=B.findComponentInChildren(Eo._),$=mN.swapBackgrounds([U,F],[nr.q[this._battleData.backgroundImageKey],nr.q[this._battleData.foregroundImageKey]]),H=Object.assign(Object.assign({},this._swapUnit.data),{asset:{type:Ni.uj.Boss,id:this._battleData.bossID}});this._swapUnit.creature.creatureGameObject.destroy(),this._swapUnit.setData(H,KP.H0.ShadowBig,this._swapUnit.controllerUnit),this._swapUnit.uiContent.active=!1,this._swapUnit.onDefeatAnimationStarted.add((()=>this._battleFogAnimator.playAnimation("fade-out",!1)),this),this._battleFogAnimator.GameObject.active=!0,this._battleFogAnimator.playAnimation("fade-in",!1),yield this._battleFogAnimator.OnAnimationComplete.asPromise(),this._battleFogAnimator.playAnimation("idle",!0),yield Promise.all([$,this._swapUnit.loadPromise]),yield this._swapUnit.enterBattle(!0),this._battleData.displayShield&&this._swapUnit.loadPromise.then((()=>{this._swapUnit.creature.addBarrier(KP.HW.Spine,J.Q.Spine_shadow_boss_shield_json,0,-50)})).catch(j.RQr.createHandler("Error adding guardian barrier")),yield Promise.all(this.getUnits().map((k=>(0,G.sH)(this,void 0,void 0,(function*(){k.uiContent.active=!0,yield k.fadeUi(1,0)}))))),yield j.Egh.timeout(MN.POST_BG_TRANSITION_DELAY_MS),this.setUnitTooltipLock(!1),yield this.setSpellBookVisible(!0)}))}}MN.POST_BG_TRANSITION_DELAY_MS=1e3;class NN extends SP.V{initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k);const U=this.rightTeam.units.find((k=>k.type===Ni.uj.Titan));U&&this.repositionTitanUnit(U)}))}repositionTitanUnit(k){k.GameObject.transform.setPositionY(-200),k.targetComponent.GameObject.parent.transform.setPosition(-50,172),k.uiContent.transform.setPosition(-50,172),k.turnIndicatorOffset={x:0,y:200}}onVictory(k,B,U){const F=Object.create(null,{onVictory:{get:()=>super.onVictory}});return(0,G.sH)(this,void 0,void 0,(function*(){const G=K.q.instance.prodigy.titansNetworkHandler;G.hitTitan(G.titan.id),yield this.textLog.waitForMessage("COMBAT_TITAN_HIT"),yield F.onVictory.call(this,k,B,U)}))}onDefeat(){return(0,G.sH)(this,void 0,void 0,(function*(){}))}getNonScalableBattleDrops(){const k=super.getNonScalableBattleDrops(),B=K.q.instance.prodigy.titansNetworkHandler,U=Math.floor(B.isCatapultBattle?2:1);return k.push(NN.getTitanShardDrop(U)),k}getNonScalableMemberBattleDrops(){const k=super.getNonScalableMemberBattleDrops();return k.push(NN.getTitanShardDrop(1)),k}static getTitanShardDrop(k){return{ID:11,type:"currency",N:k*K.q.instance.prodigy.gameContainer.get("12b-405a").getTitanShardMultiplier()}}}!function(k){k[k.Initialize=0]="Initialize",k[k.FirstClickOnSpellCard=1]="FirstClickOnSpellCard",k[k.FirstTargetConfirmed=2]="FirstTargetConfirmed",k[k.MagicPointsEmptyAlert=3]="MagicPointsEmptyAlert",k[k.MagicPointsFilled=4]="MagicPointsFilled",k[k.Complete=5]="Complete"}(wN||(wN={})),function(k){k[k.Step0PositionX=260]="Step0PositionX",k[k.Step0PositionY=520]="Step0PositionY",k[k.Step1PositionX=965]="Step1PositionX",k[k.Step1PositionY=275]="Step1PositionY",k[k.Step2PositionX=547]="Step2PositionX",k[k.Step2PositionY=610]="Step2PositionY"}(TN||(TN={})),function(k){k[k.PositionX=720]="PositionX",k[k.PositionY=150]="PositionY",k[k.Width=360]="Width",k[k.Height=360]="Height"}(SN||(SN={}));!function(k){k[k.Initialize=0]="Initialize",k[k.FirstClickOnSpellCard=1]="FirstClickOnSpellCard",k[k.FirstTargetConfirmed=2]="FirstTargetConfirmed",k[k.MagicPointsEmptyAlert=3]="MagicPointsEmptyAlert",k[k.MagicPointsFilled=4]="MagicPointsFilled",k[k.SecondClickOnSpellCard=5]="SecondClickOnSpellCard",k[k.SecondTargetConfirmed=6]="SecondTargetConfirmed",k[k.EndBattleDialogue=7]="EndBattleDialogue",k[k.Complete=8]="Complete"}(AN||(AN={})),function(k){k[k.Step0PositionX=260]="Step0PositionX",k[k.Step0PositionY=520]="Step0PositionY",k[k.Step1PositionX=965]="Step1PositionX",k[k.Step1PositionY=115]="Step1PositionY",k[k.Step2PositionX=547]="Step2PositionX",k[k.Step2PositionY=610]="Step2PositionY"}(CN||(CN={})),function(k){k[k.PositionX=720]="PositionX",k[k.PositionY=150]="PositionY",k[k.Width=360]="Width",k[k.Height=360]="Height"}(ON||(ON={}));!function(k){k[k.Initialize=0]="Initialize",k[k.RescueAvailable=1]="RescueAvailable",k[k.ClickOnRescueButton=2]="ClickOnRescueButton",k[k.RescueTargetConfirmed=3]="RescueTargetConfirmed"}(IN||(IN={})),function(k){k[k.Step0PositionX=1220]="Step0PositionX",k[k.Step0PositionY=525]="Step0PositionY",k[k.Step1PositionX=965]="Step1PositionX",k[k.Step1PositionY=275]="Step1PositionY"}(DN||(DN={})),function(k){k[k.PositionX=720]="PositionX",k[k.PositionY=150]="PositionY",k[k.Width=360]="Width",k[k.Height=360]="Height"}(RN||(RN={}));class xN extends AP{constructor(){super(...arguments),this._currentTutorialStep=IN.Initialize}getAssetList(){return[...this._baseAssets,ah.B.Voice_10_105_rescue_charfoal,ah.B.Voice_10_108_rescue_sproot,ah.B.Voice_10_109_rescue_wott,ah.B.Voice_10_106_rescue_mermina,ah.B.Voice_10_107_rescue_snowfluff]}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this.shouldNotifyWhenRescueAvailable=!1}))}showSpellCards(k,B=!0){super.showSpellCards(k,B),this.spellCardsController.onUiReady.add((()=>{this._currentTutorialStep===IN.Initialize&&this.isRescueAvailable()&&setTimeout((()=>{var k;const B=null===(k=this.spellCardsController)||void 0===k?void 0:k.petRescueCard.findComponentInChildren(j.XVE);B&&this._currentTutorialStep===IN.Initialize&&(this._currentTutorialStep++,this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!1),this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new V.Point(0,0),new j.or0(0,0)),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(DN.Step0PositionX,DN.Step0PositionY)),this._tutorialControllerComponent.setDialogueTextKey("BATTLE_REVAMP_TUTORIAL_5",this.rightTeam.units[0].name),this._tutorialControllerComponent.playNootWidgetIn(!0,this.getStarterPetSoundAsset()),this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByTransform(B),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(DN.Step0PositionX,DN.Step0PositionY)))}),0)}));const U=this.spellCardsController.targetController;U.onActionChange.add((k=>{this._currentTutorialStep===IN.RescueAvailable&&(this._currentTutorialStep++,this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new V.Point(RN.PositionX,RN.PositionY),new j.or0(RN.Width,RN.Height)),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(DN.Step1PositionX,DN.Step1PositionY)))})),U.onTargetConfirmed.add((()=>{this._currentTutorialStep===IN.ClickOnRescueButton&&(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.playNootWidgetOut(),this._tutorialControllerComponent.playFadeOutDialogue(),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!0))}))}setActiveUnit(k){const B=Object.create(null,{setActiveUnit:{get:()=>super.setActiveUnit}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.setActiveUnit.call(this,k),this._currentTutorialStep===IN.Initialize&&this.isRescueAvailable()&&(this.textLog.GameObject.active=!1)}))}getStarterPetSoundAsset(){var k;switch(null===(k=this.rightTeam.units[0])||void 0===k?void 0:k.data.asset.id){case xN.STARTER_PET_CHARFOAL:return ah.B.Voice_10_105_rescue_charfoal;case xN.STARTER_PET_SPROOT:return ah.B.Voice_10_108_rescue_sproot;case xN.STARTER_PET_WOTT:return ah.B.Voice_10_109_rescue_wott;case xN.STARTER_PET_MERMINA:return ah.B.Voice_10_106_rescue_mermina;case xN.STARTER_PET_SNOWFLUFF:return ah.B.Voice_10_107_rescue_snowfluff;default:return null}}}xN.STARTER_PET_SNOWFLUFF=148,xN.STARTER_PET_MERMINA=145,xN.STARTER_PET_WOTT=142,xN.STARTER_PET_SPROOT=139,xN.STARTER_PET_CHARFOAL=136;var LN,kN=U(21001);!function(k){k[k.Initialize=0]="Initialize",k[k.Dialogue=1]="Dialogue",k[k.RescueAvailable=2]="RescueAvailable",k[k.ClickOnRescueButton=3]="ClickOnRescueButton",k[k.RescueTargetConfirmed=4]="RescueTargetConfirmed"}(LN||(LN={}));const BN=new V.Point(965,275),UN=new V.Point(799,360);var FN,GN,jN,$N;!function(k){k[k.PositionX=720]="PositionX",k[k.PositionY=150]="PositionY",k[k.Width=360]="Width",k[k.Height=360]="Height"}(FN||(FN={}));!function(k){k[k.Initialize=0]="Initialize",k[k.ClickAOESpellCard=1]="ClickAOESpellCard",k[k.ClickTargetConfirmed=2]="ClickTargetConfirmed",k[k.PlayNootDialogue=3]="PlayNootDialogue",k[k.Complete=4]="Complete"}(GN||(GN={})),function(k){k[k.Step0PositionX=260]="Step0PositionX",k[k.Step0PositionY=520]="Step0PositionY",k[k.Step1PositionOffsetX=230]="Step1PositionOffsetX",k[k.Step1PositionOffsetY=27]="Step1PositionOffsetY",k[k.Step1Rotation=-90]="Step1Rotation"}(jN||(jN={})),function(k){k[k.PositionX=0]="PositionX",k[k.PositionY=0]="PositionY",k[k.Width=1280]="Width",k[k.Height=550]="Height"}($N||($N={}));class HN extends SP.V{initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k);const U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=yield this._ultimatesDataProvider.getCurrentQuestData();this.currentQuestData=F.find((k=>k.questID===U.ultimateQuestId))}))}}(0,G.Cg)([(0,Re.b)("200-7dc0"),(0,G.Sn)("design:type",Ys.m)],HN.prototype,"_ultimatesDataProvider",void 0);class VN{static getBattleController(k){const B=this._battleControllerMap[k.battleType];return B?new B(k):(j.VyI.log(`No battle controller found for battle type: ${k.battleType}. Using basic battle controller as a fallback`,j.$bb.Warning),new SP.V(k))}}VN._battleControllerMap={[Ni.gu.Basic]:SP.V,[Ni.gu.Ultimates]:HN,[Ni.gu.Duel]:NM,[Ni.gu.MatchmakingDuel]:rN,[Ni.gu.MatchmakingBotDuel]:aN,[Ni.gu.DarkTower]:mM,[Ni.gu.NormalRiftRun]:_N,[Ni.gu.LootDash]:JM,[Ni.gu.FestivalDailyBattle]:SP.V,[Ni.gu.FeaturedSpawn]:SP.V,[Ni.gu.Tutorial1]:class extends AP{constructor(){super(...arguments),this._currentTutorialStep=wN.Initialize}getAssetList(){return[...this._baseAssets,ah.B.Voice_10_103_magic_refilled]}showSpellCards(k,B=!0){super.showSpellCards(k,B),this.spellCardsController.onUiReady.add(((k,B)=>{if(this._currentTutorialStep===wN.Initialize){this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!1);const k=this.spellCardsController.getSpellCardAtIndex(0).findComponentInChildren(j.XVE);this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByTransform(k),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(TN.Step0PositionX,TN.Step0PositionY))}else if(this._currentTutorialStep===wN.FirstTargetConfirmed&&k)this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!0,TP.W.StraightIdle,new V.Point(TN.Step2PositionX,TN.Step2PositionY));else if(this._currentTutorialStep===wN.MagicPointsEmptyAlert&&k)this._tutorialControllerComponent.enableGuideHand(!0,TP.W.StraightIdle,new V.Point(TN.Step2PositionX,TN.Step2PositionY));else if(this._currentTutorialStep===wN.MagicPointsEmptyAlert&&!k&&B)this._tutorialControllerComponent.enableGuideHand(!1);else if(this._currentTutorialStep===wN.MagicPointsEmptyAlert&&!k&&!B){this._currentTutorialStep++;setTimeout((()=>{this._currentTutorialStep===wN.MagicPointsFilled&&(this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.setDialogueTextKey("BATTLE_REVAMP_TUTORIAL_4"),this._tutorialControllerComponent.playNootWidgetIn(!0,ah.B.Voice_10_103_magic_refilled))}),2400)}}));const U=this.spellCardsController.targetController;U.onActionChange.add((k=>{this._currentTutorialStep===wN.Initialize?(this._currentTutorialStep++,this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new V.Point(SN.PositionX,SN.PositionY),new j.or0(SN.Width,SN.Height)),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(TN.Step1PositionX,TN.Step1PositionY))):this._currentTutorialStep===wN.MagicPointsFilled&&k&&(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.playNootWidgetOut(),this._tutorialControllerComponent.playFadeOutDialogue(),this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!0))})),U.onTargetConfirmed.add((()=>{this._currentTutorialStep===wN.FirstClickOnSpellCard&&(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen())}))}alertActiveUnitMpEmpty(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.activeUnit.alertMpEmpty(!0)}))}},[Ni.gu.Tutorial2]:xN,[Ni.gu.Tutorial3]:class extends AP{constructor(){super(...arguments),this._currentTutorialStep=GN.Initialize}getAssetList(){return[...this._baseAssets,ah.B.Voice_10_104_powerful_hit]}showSpellCards(k,B=!0){super.showSpellCards(k,B),this.spellCardsController.onUiReady.add(((k,B)=>{if(this._currentTutorialStep===GN.Initialize){this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!1);const k=this.spellCardsController.getSpellCardAtIndex(0).findComponentInChildren(j.XVE);this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByTransform(k),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(jN.Step0PositionX,jN.Step0PositionY))}else this._currentTutorialStep===GN.Complete&&this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!0)}));const U=this.spellCardsController.targetController;U.onActionChange.add((()=>{if(this._currentTutorialStep===GN.Initialize){this._currentTutorialStep++;const k=this.rightTeam.units.find((k=>this.battleConstants.getElementalWeakness(k.data.element)===this.activeUnit.data.element));this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new V.Point($N.PositionX,$N.PositionY),new j.or0($N.Width,$N.Height));const B=k.GameObject.transform.worldPosition.x+jN.Step1PositionOffsetX,U=k.GameObject.transform.worldPosition.y+jN.Step1PositionOffsetY;this._tutorialControllerComponent.enableGuideHand(!0,TP.W.StraightIdle,new V.Point(B,U),jN.Step1Rotation)}else this._currentTutorialStep===GN.PlayNootDialogue&&(this._currentTutorialStep++,this._tutorialControllerComponent.playNootWidgetOut(),this._tutorialControllerComponent.playFadeOutDialogue(),this.textLog.GameObject.active=!0)})),U.onTargetConfirmed.add((()=>{this._currentTutorialStep===GN.ClickAOESpellCard&&(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen())}))}castActionResultsDisplayTriggered(){this._currentTutorialStep===GN.ClickTargetConfirmed&&(this._currentTutorialStep++,this.textLog.GameObject.active=!1,this._tutorialControllerComponent.setDialogueTextKey("BATTLE_REVAMP_TUTORIAL_6"),this._tutorialControllerComponent.playNootWidgetIn(!0,ah.B.Voice_10_104_powerful_hit))}},[Ni.gu.Tutorial1Revised]:class extends AP{constructor(){super(...arguments),this._currentTutorialStep=AN.Initialize}getAssetList(){return[...this._baseAssets,ah.B.Voice_10_103_magic_refilled,ah.B.Voice_noot_ftue_choose_spell,ah.B.Voice_noot_ftue_choose_target,ah.B.Voice_noot_ftue_magic_1,ah.B.Voice_noot_ftue_magic_2]}showSpellCards(k,B=!0){super.showSpellCards(k,B),this.spellCardsController.onUiReady.add(((k,B)=>{if(this._currentTutorialStep===AN.Initialize){this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!1);const k=this.spellCardsController.getSpellCardAtIndex(0).findComponentInChildren(j.XVE);this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByTransform(k),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(CN.Step0PositionX,CN.Step0PositionY)),this._tutorialControllerComponent.setDialogueTextKey("BATTLE_REVAMP_TUTORIAL_1"),this._tutorialControllerComponent.playNootWidgetIn(!0,ah.B.Voice_noot_ftue_choose_spell)}else if(this._currentTutorialStep===AN.FirstTargetConfirmed&&k){this._currentTutorialStep++;const k=2400;this._tutorialControllerComponent.enableGuideHand(!0,TP.W.StraightIdle,new V.Point(CN.Step2PositionX,CN.Step2PositionY)),setTimeout((()=>{this._tutorialControllerComponent.setDialogueTextKey("BATTLE_REVAMP_TUTORIAL_3"),this._tutorialControllerComponent.playNootWidgetIn(!0,ah.B.Voice_noot_ftue_magic_1),this._tutorialControllerComponent.enableGuideHand(!1)}),k)}else if(this._currentTutorialStep===AN.SecondTargetConfirmed&&k){this._currentTutorialStep++;setTimeout((()=>{this._tutorialControllerComponent.enableGuideHand(!1)}),2400)}else if(this._currentTutorialStep===AN.MagicPointsEmptyAlert&&k){const k=2400;this._tutorialControllerComponent.enableGuideHand(!0,TP.W.StraightIdle,new V.Point(CN.Step2PositionX,CN.Step2PositionY)),setTimeout((()=>{this._tutorialControllerComponent.enableGuideHand(!1)}),k)}else if(this._currentTutorialStep===AN.MagicPointsEmptyAlert&&!k&&B)this._tutorialControllerComponent.enableGuideHand(!1);else if(this._currentTutorialStep===AN.MagicPointsEmptyAlert&&!k&&!B){this._currentTutorialStep++;const k=2400;this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new V.Point(0,0),new j.or0(0,0)),this.sendProgress(Gh.l.FirstQuestionAnswered),setTimeout((()=>{this._currentTutorialStep===AN.MagicPointsFilled&&(this._currentTutorialStep++,this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(CN.Step0PositionX,CN.Step0PositionY)),this._tutorialControllerComponent.updateDialogue("BATTLE_REVAMP_TUTORIAL_4",ah.B.Voice_noot_ftue_magic_2))}),k)}}));const U=this.spellCardsController.targetController;U.onActionChange.add((k=>{var B;if(this._currentTutorialStep===AN.Initialize){this._currentTutorialStep++;const k=null===(B=this.spellCardsController.getSpellCardAtIndex(0))||void 0===B?void 0:B.findComponentInChildren(sl.l);j.Aq$.isDefined(k)&&(k.inputEnabled=!1),this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new V.Point(ON.PositionX,ON.PositionY),new j.or0(ON.Width,ON.Height)),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(CN.Step1PositionX,CN.Step1PositionY)),this._tutorialControllerComponent.updateDialogue("BATTLE_REVAMP_TUTORIAL_2",ah.B.Voice_noot_ftue_choose_target)}else this._currentTutorialStep===AN.SecondClickOnSpellCard&&k&&(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(CN.Step1PositionX,CN.Step1PositionY)),this._tutorialControllerComponent.playNootWidgetOut(),this._tutorialControllerComponent.playFadeOutDialogue())})),U.onTargetConfirmed.add((()=>{var k;this._currentTutorialStep===AN.FirstClickOnSpellCard?(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this._tutorialControllerComponent.playFadeOutDialogue()):this._currentTutorialStep===AN.SecondTargetConfirmed&&(this._currentTutorialStep++,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen());const B=null===(k=this.spellCardsController.getSpellCardAtIndex(0))||void 0===k?void 0:k.findComponentInChildren(sl.l);j.Aq$.isDefined(B)&&(B.inputEnabled=!0)}))}alertActiveUnitMpEmpty(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.activeUnit.alertMpEmpty(!0)}))}getStateOverride(k){if(this._currentTutorialStep===AN.EndBattleDialogue&&(null==k?void 0:k.type)===Q.EBattleStateUpdate.EndBattle&&(null==k?void 0:k.victoriousTeamId)===Q.ETeamId.Home)return this._currentTutorialStep++,[DP,[1571]]}onPlayerAction(k){const B=Object.create(null,{onPlayerAction:{get:()=>super.onPlayerAction}});return(0,G.sH)(this,void 0,void 0,(function*(){const U=yield B.onPlayerAction.call(this,k);if(k.type===Q.EBattleAction.CastSpell&&2===U.filter((k=>k.id===this.battleConstants.fumbleSpellId)).length){const k=U.findIndex((k=>k.type===Q.EBattleStateUpdate.CastSpell)),B=U.find((k=>k.type===Q.EBattleStateUpdate.EndBattle));return[...U.slice(0,k+1),B]}return U}))}sendProgress(k){K.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:"Onboarding",funnelType:"tutorial",stepName:k})}},[Ni.gu.Tutorial2Revised]:class extends AP{constructor(){super(...arguments),this._currentTutorialStep=LN.Initialize}getAssetList(){return[...this._baseAssets,ah.B.Voice_noot_ftue_pet_rescue]}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.initBattlePrefab.call(this,k),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this.shouldNotifyWhenRescueAvailable=!1}))}getStateOverride(k){const B=this.getUnits().filter((k=>k.data.teamId===Q.ETeamId.Home)).map((k=>k.data.unitId));return this._currentTutorialStep===LN.Initialize&&k.type===Q.EBattleStateUpdate.SetActiveUnit&&B.includes(k.unitId)?(this._currentTutorialStep++,[DP,[1572,1573]]):null}showSpellCards(k,B=!0){super.showSpellCards(k,B);const U=this.getTeamById(Q.ETeamId.Away).units[0];this.spellCardsController.onUiReady.add((()=>{this._currentTutorialStep===LN.Dialogue&&this.isRescueAvailable()&&setTimeout((()=>{var k;const B=null===(k=this.spellCardsController)||void 0===k?void 0:k.petRescueCard.findComponentInChildren(j.XVE),F=new V.Point(1100,600),G=new j.or0(180,180);B&&this._currentTutorialStep===LN.Dialogue&&(this._currentTutorialStep++,this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!1),this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new V.Point(0,0),new j.or0(0,0)),this._tutorialControllerComponent.setGuideHandLayer(vh.E.Ui),U.unitTooltipIsShowing?(this._currentTutorialStep=LN.ClickOnRescueButton,this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,UN)):this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,BN),this._tutorialControllerComponent.setDialogueTextKey("BATTLE_REVAMP_TUTORIAL_5",(0,Ba.k)("BATTLE_REVAMP_TUTORIAL_5_PET")),this._tutorialControllerComponent.playNootWidgetIn(!0,ah.B.Voice_noot_ftue_pet_rescue),this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(F,G),this._activeUnit.spells.forEach((k=>{k.spellId!==this.battleConstants.rescueSpellId&&(k.isLocked=!0)})),this.spellCardsController.getSpellCards().forEach((k=>{var B;null===(B=k.findComponentInChildren(kN.y))||void 0===B||B.initialize();const U=k.findComponentInChildren(sl.l);U&&(U.currentState=Zh.K.Up)})))}),0)})),U.onInfoTooltipShown.removeAll(this),U.onInfoTooltipShown.add((()=>{this._currentTutorialStep===LN.RescueAvailable&&(this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,UN),this.grantTutorialCurrency(),this._currentTutorialStep=LN.ClickOnRescueButton)}),this),U.onInfoTooltipHidden.removeAll(this),U.onInfoTooltipHidden.add((()=>{this._currentTutorialStep===LN.ClickOnRescueButton&&(this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,BN),this._currentTutorialStep=LN.RescueAvailable)}),this);this.spellCardsController.targetController.onActionChange.add((k=>{this._currentTutorialStep===LN.RescueAvailable&&(this.grantTutorialCurrency(),this._currentTutorialStep++,this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new V.Point(FN.PositionX,FN.PositionY),new j.or0(FN.Width,FN.Height)),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,BN))})),this._stateMachine.onStateChange.add((k=>{k instanceof PM.N&&(this._currentTutorialStep!==LN.RescueAvailable&&this._currentTutorialStep!==LN.ClickOnRescueButton||(this._currentTutorialStep=LN.RescueTargetConfirmed,this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.playNootWidgetOut(),this._tutorialControllerComponent.playFadeOutDialogue(),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!0)))}))}grantTutorialCurrency(){K.q.instance.prodigy.gameContainer.get("5c7-e02d").grantCaptureTutorialMagicoin({source_id:"TutorialCaptureCoin"}).catch(j.RQr.createHandler("Error granting the capture tutorial magicoin"))}setActiveUnit(k){const B=Object.create(null,{setActiveUnit:{get:()=>super.setActiveUnit}});return(0,G.sH)(this,void 0,void 0,(function*(){yield B.setActiveUnit.call(this,k),this._currentTutorialStep===LN.Dialogue&&this.isRescueAvailable()&&(this.textLog.GameObject.active=!1)}))}},[Ni.gu.StatusEffectsTutorial]:class extends AP{constructor(){super(...arguments),this.currentTutorialStep=MP.Initialize}getBattlePrefab(){return Ei.l.StatusEffectsTutorialBattleScene}getAssetList(){return[...this._baseAssets,PP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_1,PP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_2,PP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_3,PP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_4]}gotoStep(k){switch(this.currentTutorialStep=k,k){case MP.HighlightSpellCardWithStatusEffect:this.highlightSpellCardWithStatusEffect();break;case MP.HighlightTarget:this.highlightTarget();break;case MP.TargetClicked:this.targetClicked();break;case MP.InvestigateStatusEffect:this.investigateAppliedBurn();break;case MP.ViewTooltip:this.viewTooltip();break;case MP.EnemyTakesSpellEffectDamage:this.enemyTakesSpellEffectDamage();break;case MP.EnemyPetFiresBack:case MP.FinalDialogue:case MP.End:break;default:j.VyI.log(`Unhandled tutorial step in Status Effects Tutorial: ${this.currentTutorialStep}`,j.$bb.Error)}}showSpellCards(k,B=!0){super.showSpellCards(k,B),this.onChoosingSpell.addOnce((()=>{this.currentTutorialStep===MP.Initialize&&this.gotoStep(MP.HighlightSpellCardWithStatusEffect)}));const U=this.spellCardsController.targetController;U.onActionChange.add((k=>{this.currentTutorialStep===MP.HighlightSpellCardWithStatusEffect&&k&&this.gotoStep(MP.HighlightTarget)})),U.onTargetConfirmed.add((()=>{this.currentTutorialStep===MP.HighlightTarget&&this.gotoStep(MP.TargetClicked)}))}getStateOverride(k){return this.currentTutorialStep===MP.TargetClicked&&(null==k?void 0:k.type)===Q.EBattleStateUpdate.TriggerStatusEffect?(this.gotoStep(MP.InvestigateStatusEffect),[RP,this.waitForTooltipClosedAndDelay()]):this.currentTutorialStep===MP.EnemyTakesSpellEffectDamage&&(null==k?void 0:k.type)===Q.EBattleStateUpdate.SetActiveUnit?(this.gotoStep(MP.EnemyPetFiresBack),[DP,[1825]]):this.currentTutorialStep!==MP.EnemyPetFiresBack||(null==k?void 0:k.type)!==Q.EBattleStateUpdate.SetActiveUnit?this.currentTutorialStep===MP.FinalDialogue&&(null==k?void 0:k.type)===Q.EBattleStateUpdate.EndBattle?(this.gotoStep(MP.End),[DP,[1826]]):void 0:void this.gotoStep(MP.FinalDialogue)}highlightSpellCardWithStatusEffect(){this._tutorialControllerComponent.dismissalOverlay&&(this._tutorialControllerComponent.dismissalOverlay.active=!1),this._tutorialControllerComponent.focusOverlay.setFocusLayer("overlay-top");const k=this.spellCardsController.getSpellCardAtIndex(0),B=this._tutorialControllerComponent.guideHandAnimator.GameObject;this._tutorialControllerComponent.setDialogueTextKey(CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_1),this._tutorialControllerComponent.playNootWidgetIn(!0,PP[CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_1]),this.runFocusAnimation(k,B).then((()=>{const B=k.findComponentInChildren(j.XVE);this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByTransform(B),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(NP.Step0PositionX,NP.Step0PositionY))})).catch((k=>{j.VyI.log(`Error showing focus overlay in Status Effects Tutorial: ${k}`,j.$bb.Error)}))}runFocusAnimation(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){this._tutorialControllerComponent.focusOverlay.addFocusableGameObject(k,void 0,!0,{applyGlow:!0,position:{x:k.transform.worldPosition.x+LP,y:k.transform.worldPosition.y+kP}}),this._tutorialControllerComponent.focusOverlay.addFocusableGameObject(B),yield this._tutorialControllerComponent.focusOverlay.showOverlay(),yield this._tutorialControllerComponent.focusOverlay.playGlowAnimations(),yield this._tutorialControllerComponent.focusOverlay.hideOverlay()}))}highlightTarget(){var k;const B=null===(k=this.spellCardsController.getSpellCardAtIndex(0))||void 0===k?void 0:k.findComponentInChildren(sl.l);j.Aq$.isDefined(B)&&(B.inputEnabled=!1),this._tutorialControllerComponent.overlayInputBlocker.setEnabledAreaByValue(new V.Point(xP.PositionX,xP.PositionY),new j.or0(xP.Width,xP.Height)),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(NP.Step1PositionX,NP.Step1PositionY)),this._tutorialControllerComponent.updateDialogue(CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_2,PP[CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_2])}targetClicked(){this.cleanUpDialogueAndHideGuideHand()}investigateAppliedBurn(){this._tutorialControllerComponent.setDialogueTextKey(CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_3),this._tutorialControllerComponent.playNootWidgetIn(!0,PP[CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_3]),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(NP.Step1PositionX,NP.Step1PositionY)),this.getEnemyPetUnit().updateIdleStatusEffect(!0),this.getTooltipOpenenedPromise().then((()=>{this.gotoStep(MP.ViewTooltip)})).catch((k=>{j.VyI.log(`Error waiting for tooltip open in Status Effects Tutorial: ${k}`,j.$bb.Error)}))}viewTooltip(){this._tutorialControllerComponent.updateDialogue(CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_4,PP[CP.DIALOGUE_THEO_FTUE_STATUS_EFFECT_BATTLE_4]),this._tutorialControllerComponent.enableGuideHand(!0,TP.W.Click,new V.Point(NP.Step1PositionX,NP.Step1PositionY)),this._tutorialControllerComponent.setGuideHandLayer(vh.E.Ui)}enemyTakesSpellEffectDamage(){this.cleanUpDialogueAndHideGuideHand()}cleanUpDialogueAndHideGuideHand(){this._tutorialControllerComponent.enableGuideHand(!1),this._tutorialControllerComponent.overlayInputBlocker.enableFullScreen(),this._tutorialControllerComponent.playNootWidgetOut(),this._tutorialControllerComponent.playFadeOutDialogue()}getEnemyPetUnit(){return this.getTeamById(Q.ETeamId.Away).units.find((k=>k.type===Ni.uj.Pet))}getTooltipOpenenedPromise(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.getEnemyPetUnit().onInfoTooltipShown.asPromise()}))}waitForTooltipClosedAndDelay(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.getEnemyPetUnit().onInfoTooltipHidden.asPromise(),this.gotoStep(MP.EnemyTakesSpellEffectDamage),yield un.o.wait(1e3)}))}onClickUnitTooltip(k){this.currentTutorialStep!==MP.InvestigateStatusEffect&&this.currentTutorialStep!==MP.ViewTooltip?super.onClickUnitTooltip(k):this.showUnitTooltip(k)}},[Ni.gu.Titan]:NN,[Ni.gu.CrystalCavernsGrumpyYeti]:GM,[Ni.gu.CrystalCavernsCrystalThief]:UP,[Ni.gu.CrystalCavernsGlacias]:UP,[Ni.gu.CrystalCavernsMakalu]:class extends UP{constructor(){super(...arguments),this._phase=rM.Visible,this._stateOverrideStep=0}initBattlePrefab(k){const B=Object.create(null,{initBattlePrefab:{get:()=>super.initBattlePrefab}});return(0,G.sH)(this,void 0,void 0,(function*(){var U;yield B.initBattlePrefab.call(this,k),this.rightTeam.units.forEach((k=>{k.size=lM.X.Medium})),this._makalu=this.rightTeam.units.find((k=>k.type===Ni.uj.Boss)),this._makalu.creature.teleportType=KP.H0.None,this._makalu.creature.shouldFadeOnDefeat=!1,this._makalu.onApplyDamage.add((k=>{var B;return(B=this._makalu.uiContent).active||(B.active=k.damage>0)})),this._makalu.onDefeatAnimationStarted.add((()=>{this.setActiveUnit(null).catch(j.RQr.createHandler("Error setting active unit"))})),this._makalu.onDefeatAnimationFinished.add((()=>{(()=>(0,G.sH)(this,void 0,void 0,(function*(){this._makalu.uiContent.active=!0,this.isBossAboveGround()?(this._makalu.creature.animator.playAnimation("hide",!1),yield this._makalu.creature.animator.OnAnimationComplete.asPromise()):yield j.Egh.timeout(1e3),yield this._makalu.fadeOut(!1)})))().catch(j.RQr.createHandler("Error fading Makalu"))})),this._makaluFullHitbox=Object.assign({},this._makalu.hitbox),this._piles=this.rightTeam.units.filter((k=>k.type===Ni.uj.Object));for(const k of this._piles){k.uiContent.active=!1,k.isTargetable=!1;const B=k.creature;B.teleportType=KP.H0.None,this.playUnitIdle(B,"mound-blue"),B.shouldFadeOnDefeat=!1,k.onApplyDamage.add((()=>{this.playUnitIdle(B,"mound-blue"),k.data.health.current=0}))}const F=null===(U=this.getSpellComponentById("1071"))||void 0===U?void 0:U.steps.find((k=>k instanceof tN.D));F&&(F.play=()=>(0,G.sH)(this,void 0,void 0,(function*(){return Promise.resolve()})))}))}onStartBattle(){const k=Object.create(null,{onStartBattle:{get:()=>super.onStartBattle}});return(0,G.sH)(this,void 0,void 0,(function*(){yield k.onStartBattle.call(this);for(const k of this._piles)k.creature.recalculateHitbox(),k.targetComponent.configureTarget()}))}setupUnitTooltip(){}showUnitTooltip(k){}getStateOverride(k){var B;if(null!==(B=this._makaluAnimator)&&void 0!==B||(this._makaluAnimator=this._makalu.creature.animator),this._needsShellGame&&(this._needsShellGame=!1,k.type!==Q.EBattleStateUpdate.EndBattle))return this.setHiddenBossTargetMode(!0),[eN];switch(null==k?void 0:k.type){case Q.EBattleStateUpdate.CastSpell:this.activeUnit.data.teamId===Q.ETeamId.Away&&[rM.Hidden,rM.Taunt].includes(this._phase)&&(this._makaluAnimator.spine.addAnimationRemap("attack","hide"),this._makaluAnimator.spine.addAnimationRemap("idle","mound-purple"),this._needsShellGame=!0,this.setActiveUnit(null).catch(j.RQr.createHandler("Error setting active unit")));break;case Q.EBattleStateUpdate.CustomEvent:switch(k.name){case rM.Hidden:for(const k of this._piles)k.data.health.current=1,this.playUnitIdle(k.creature,"mound-purple");this._phase=rM.Hidden;break;case rM.Visible:if(0==this._stateOverrideStep++){this._makaluAnimator.spine.addAnimationRemap("attack","attack");let k=Promise.resolve();return this._phase===rM.Hidden?(this._makaluAnimator.playAnimation("emerge",!1),this._makaluAnimator.OnAnimationComplete.addOnce((()=>this.playUnitIdle(this._makalu.creature,"idle"))),k=this._makaluAnimator.OnAnimationComplete.asPromise()):this.playUnitIdle(this._makalu.creature,"idle"),this._phase=rM.Visible,this.setHiddenBossTargetMode(!1),[RP,k]}break;case rM.Stunned:if(0==this._stateOverrideStep++)return this._makaluAnimator.playAnimation("stun-hit",!1),this._makaluAnimator.OnAnimationComplete.addOnce((()=>this.playUnitIdle(this._makalu.creature,"idle-stun"))),this._phase=rM.Stunned,this.setHiddenBossTargetMode(!1),[RP,this._makaluAnimator.OnAnimationComplete.asPromise()];break;case rM.Taunt:if(0==this._stateOverrideStep++){const k=(()=>(0,G.sH)(this,void 0,void 0,(function*(){this._makaluAnimator.playAnimation("emerge",!1),yield this._makaluAnimator.OnAnimationComplete.asPromise(),this._makaluAnimator.playAnimation("taunt",!1),yield this._makaluAnimator.OnAnimationComplete.asPromise()})))();return[RP,k]}}break;case Q.EBattleStateUpdate.EndBattle:if(0==this._stateOverrideStep++)return this.setActiveUnit(null).catch(j.RQr.createHandler("Error setting active unit")),this.setHiddenBossTargetMode(!1),[FM,this.isBossAboveGround?2e3:200]}return this._stateOverrideStep=0,super.getStateOverride(k)}playUnitIdle(k,B){const U=k.animator;U instanceof Ir.j&&U.spine.addAnimationRemap("idle",B),U.playAnimation(B,!0)}setHiddenBossTargetMode(k){if(this._inHiddenTargetMode!==k){this._inHiddenTargetMode=k,this._makalu.uiContent.active=!k;for(const B of this._piles)B.isTargetable=k,this.playUnitIdle(B.creature,k?"mound-purple":"mound-blue");k?(this.playUnitIdle(this._makalu.creature,"mound-purple"),H().merge(this._makalu.hitbox,this._piles[0].hitbox)):H().merge(this._makalu.hitbox,this._makaluFullHitbox),this._makalu.targetComponent.configureTarget()}}isBossAboveGround(){return[rM.Stunned,rM.Visible].includes(this._phase)}},[Ni.gu.CrystalCavernsCrystalGolem]:bM,[Ni.gu.EndgamePippet]:SP.V,[Ni.gu.FireflyQ2Miniboss]:SP.V,[Ni.gu.ZoneMiniboss]:oN,[Ni.gu.PumpkinfestBoss]:hN,[Ni.gu.EndGamePuppetMaster]:yN,[Ni.gu.EndGameGuardianBonfire]:MN,[Ni.gu.EndGameGuardianFirefly]:MN,[Ni.gu.EndGameGuardianShipwreck]:MN,[Ni.gu.EndGameGuardianShiverchill]:MN,[Ni.gu.EndGameGuardianSkywatch]:MN,[Ni.gu.QuestPippet]:SP.V,[Ni.gu.QuestPippetDefeatable]:SP.V,[Ni.gu.FireflyQ3Miniboss]:SP.V,[Ni.gu.FireflyQ8TriptropTrio]:SP.V,[Ni.gu.FireflyQ12Gerald]:SP.V,[Ni.gu.SkywatchCloudMiniboss]:SP.V,[Ni.gu.SkywatchCloudBoss]:SP.V,[Ni.gu.SkywatchQ11Bitbots]:SP.V,[Ni.gu.SkywatchQ6Swarm]:SP.V,[Ni.gu.ShiverchillQ6Ghosts]:SP.V,[Ni.gu.ShiverchillQ7IceWyrm]:SP.V,[Ni.gu.ShiverchillQ13IceWyrm]:SP.V,[Ni.gu.BonfireQ12Guardian]:SP.V,[Ni.gu.BonfireQ13Cebollini]:SP.V,[Ni.gu.ShipwreckQ11OldOne]:SP.V,[Ni.gu.BossRiftRun]:fM,[Ni.gu.FestivalDailyBoss]:xM.R};var WN=U(81531);class qN extends gf.f{startBattleRequest(k,B){var U;this._config=B,this._synapse.setUserStatus(lc.a.unavailable).catch(j.RQr.createHandler("Unable to set social status")),K.q.instance.game.state.start(Ie.G.SecureBattleRevamp,null===(U=B.clearWorld)||void 0===U||U,k)}clearBattle(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this._battleController){const B=null!=k?k:{battleType:Ni.gu.Basic,opponents:{units:{}},difficulty:1};this._battleController=VN.getBattleController(B),this._battleController.bindNetworkHandler()}const B=j.wa5.getActiveScene().container.get("NetworkHandler");yield B.clearBattleState()}))}resumeBattleRequest(k,B){var U;this._config=B,this._synapse.setUserStatus(lc.a.unavailable).catch(j.RQr.createHandler("Unable to set social status")),K.q.instance.game.state.start(Ie.G.SecureBattleRevamp,null===(U=null==B?void 0:B.clearWorld)||void 0===U||U,{battleType:k.battleType,clientState:k.clientState},!0),this._loggedInPlayerDataProvider.player.battleResumeData=void 0}init(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=!1){var U,F,G,$,H;try{j.C1c.markTextureGarbageCollectionFrame();const V=j.wa5.getActiveScene(),W=V.container;W.parent=K.q.instance.prodigy.gameContainer,W.bind("BattleState").toConstantValue(this),W.bind("RemoteConfig").toConstantValue(k),W.bind("LocalConfig").toConstantValue(this._config),W.bind("DifficultyMode").toConstantValue(this._loggedInPlayerDataProvider.player.currentDifficulty),this._battleController=VN.getBattleController(k),W.bind("BattleController").toConstantValue(this._battleController),this._battleController.bindNetworkHandler();const q={target:Ie.G.SecureBattle,title:this._localizer.getText("LOADING_CAPITALIZE"),autoStart:!1,fadeIn:!1,save:!1,useIdleAnimation:!0,shutdownLoadState:!1},z=this._battleController.getLoadingScreen(q),Y="Loading";if(z){z.create();V.addLayer(Y,1e6).addChild(z.element)}const Q=this.preloadLocalAssets(),X=!!(null===(U=this._loggedInPlayerDataProvider.player.difficultyUnlocks)||void 0===U?void 0:U.hard),Z=hi.s.xpRequiredForLevel(X?hi.s.maxLevelConfig.expert:hi.s.maxLevelConfig.regular,yo.V.Player);null!==(F=k.userDetails)&&void 0!==F||(k.userDetails={starsToMaxLevel:Z-this._loggedInPlayerDataProvider.player.getStars()});const J=this._loggedInPlayerDataProvider.player;yield new Promise((k=>J.forceSaveCharacter(k))),ma.k.useRevisedDifficulty&&(k.experiments=[{experimentKey:"difficulty-scaling",variationKey:""}]),k.cannotDropMagicoin=!!(null===(G=this._config.guaranteedDrops)||void 0===G?void 0:G.filter(j.Aq$.isDefined).length),k.battleType===Ni.gu.NormalRiftRun&&(k.cannotDropMagicoin=!1);const tt=B?yield this._battleController.requestBattleResume():yield this._battleController.requestBattleStart(k);if(this._battleController.battleId=tt.battleId,this._battleController.showQiBadgeAnimations=this._config.showQiBadgeAnimations,this._battleController.hasMpOverrides=Object.keys(null!==($=tt.state.config.maxMPPerUnitTypeOverrides)&&void 0!==$?$:{}).length>0,W.bind("Modifiers").toConstantValue(null!==(H=tt.modifiers)&&void 0!==H?H:[]),W.bind("GameDataProvider").toConstantValue(this._gameDataProvider=new WN.q(tt.dataOverride)),this.checkPetGearFtueState(tt.state.units),yield Promise.all([Q,this.preloadRemoteAssets(tt)]),K.q.instance.prodigy.effects.setSource(this),yield this._battleController.initBattlePrefab(tt),z&&(z.nextStateLoaded(),V.destroyLayer(Y)),B){const k=tt.resumedSegmentData;this._battleController.resumeLastBattleState(k)}else{gP.shouldRollForMagicoinBattleRewards((0,Dt.G)(mP.s).enabled,k.battleType,k.cannotDropMagicoin)&&K.q.instance.prodigy.gameContainer.get("c47-20b6").funnel.sendStep(EP.F.MagicoinBattleRewardsIntro,"feature",yP.T.EligibleBattleStarted,yP.h.EligibleBattleStarted),this._battleController.startStateMachine()}}catch(e){j.RQr.logError(e,"An error occurred while creating a secure battle.");let B=!0;try{B=yield this._battleController.handleBattleStartError(e)}catch(V){j.RQr.logError(V,"An error occurred while handling an error in a secure battle.")}B&&this.handleFatalBattleError()}}))}handleFatalBattleError(){this._config.onFatalError?this._config.onFatalError():this._config.onEscape?this._config.onEscape():K.q.instance.prodigy.world.teleportToCurrentMap()}preloadLocalAssets(){return(0,G.sH)(this,void 0,void 0,(function*(){this._config.backgroundID=yield this.getBackgroundId(this._config.backgroundID);const k=K.q.instance.prodigy.game,B=$.merge(this._battleController.getAssetList(),_P.l.guaranteeArray(this._config.backgroundID));j.Aq$.isDefined(this._config.backgroundMusicID)&&B.push(`bgm-${this._config.backgroundMusicID}`),pn.K.cacheAssets(k,B,pn.K.zoneAssetsCached);const U=K.q.instance.prodigy.load.assetsAsPromise(B),F=[Ei.l.RevampSpellHitInfo,Ei.l.RevampSpellTooltip,Ei.l.RevampActionMenu].map((k=>(0,G.sH)(this,void 0,void 0,(function*(){return this._prefabLoader.preloadFromGUIDWithDependencies(k).promise}))));F.push(U),yield Promise.all(F)}))}preloadRemoteAssets(k){return(0,G.sH)(this,void 0,void 0,(function*(){j.VyI.log("SecureBattleRevamp.onStartSuccess - SUCCESS",j.$bb.Verbose);let B=this.getUnitAssets(k.state.units);k.preload&&(B=$.chain(k.preload).keys().flatMap((B=>k.preload[B].map((k=>this.getAsset(B,k))))).compact().union(B).value());const U=K.q.instance.prodigy.game;pn.K.cacheAssets(U,B,pn.K.zoneAssetsCached),yield K.q.instance.prodigy.load.assetsAsPromise(B)}))}getBackgroundId(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;const F=U(79259);return F?"string"==typeof k&&null!==(B=F[k])&&void 0!==B?B:k:(j.VyI.log("Revamp background replacement data not loaded",j.$bb.Error),k)}))}getUnitAssets(k){const B=[];for(const U of Object.values(k))if(!U.appearance&&j.Aq$.isDefined(U.asset.id)){const k=this.getAsset(U.asset.type,U.asset.id);k&&B.push(k)}return B}getAsset(k,B){var U;const F=this._gameDataProvider.getItem(k,B),G=null===(U=null==F?void 0:F.metadata)||void 0===U?void 0:U.assets;switch(k){case Ni.uj.Pet:return this.getPetAsset(G,B);case Ni.uj.Boss:case Ni.uj.Titan:return wP.H.getBossSpineId(G,B);case Ni.uj.Object:case"guid":return`${B}`;case"spellV2":return;default:j.VyI.log(`Unable to get asset of ${k} ${B}`,j.$bb.Warning)}}getPetAsset(k,B){var U,F,G;return"spine"===(null===(U=k.default)||void 0===U?void 0:U.type)?k.default.ID?`spine-${k.default.ID}`:J.Q[k.default.assetKey]:"spritesheet"===(null===(F=k.default)||void 0===F?void 0:F.type)?`default-pet-${B}`:"spritesheet"===(null===(G=k.reduced)||void 0===G?void 0:G.type)?`reduced-pet-${B}`:void j.VyI.log("Unable to get pet asset guid",j.$bb.Warning)}checkPetGearFtueState(k){const B=K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(ln.B.FEATURE_PET_GEAR,ln.B.BREADCRUMB_PET_GEAR_FTUE_STEP_START),U=Object.values(null!=k?k:{}).some((k=>{var B;return Object.values(null!==(B=k.petGear)&&void 0!==B?B:{}).some((k=>j.Aq$.isDefined(k)))}));if(B&&U){const k=K.q.instance.prodigy.gameContainer.get("c47-20b6");k.playerProgression.sendFunnelAdvancedEvent({funnelName:"Pet_gear_tutorial",funnelType:"tutorial",stepName:Gh.l.PetGearGearUsedInBattle},{step_index:6}),k.playerProgression.sendFunnelAdvancedEvent({funnelName:"Pet_gear_tutorial",funnelType:"tutorial",stepName:Gh.l.PetGearTutorialComplete},{step_index:7})}}start(){super.start(),j.C1c.garbageCollectTextures()}update(){j.wa5.getActiveScene().update()}shutdown(){this._synapse.setUserStatus(lc.a.available).catch(j.RQr.createHandler("Unable to set social status")),K.q.instance.prodigy.load.removeAssets(),this._battleController&&this._battleController.destroy(),this._battleController=null,this._config=null,this._gameDataProvider=null,super.shutdown()}}(0,G.Cg)([(0,Re.b)("e20-0fb0"),(0,G.Sn)("design:type",Wt.E)],qN.prototype,"_loggedInPlayerDataProvider",void 0),(0,G.Cg)([(0,Re.b)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],qN.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,Re.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],qN.prototype,"_localizer",void 0),(0,G.Cg)([(0,Re.b)("779-a746"),(0,G.Sn)("design:type",Ue.d)],qN.prototype,"_synapse",void 0);class KN{constructor(k){this.game=k,j.o5U.isDesktop()&&j.o5U.isFirefox()&&this.game.input.keyboard.addKeyCapture([Mo.D.BACKSPACE]),k.input.mouse.addMouseWheelCallback(this.dispatchMouseEvent.bind(this,oi.Bk.OnMouseWheel)),k.input.keyboard.onDownCallback=this.dispatchKeyboardEvent.bind(this,"Prodigy.Events.Input.ON_KEY_DOWN_"),k.input.keyboard.onUpCallback=this.dispatchKeyboardEvent.bind(this,"Prodigy.Events.Input.ON_KEY_UP_"),k.input.keyboard.onPressCallback=this.dispatchKeyPressEvent.bind(this,"Prodigy.Events.Input.ON_KEY_PRESS_")}dispatchMouseEvent(k,B){this.game.broadcaster.broadcast(k,"Input",[B])}dispatchKeyboardEvent(k,B){let U="";j.Aq$.isDefined(B.key)&&(U=B.key.toUpperCase()),this.game.broadcaster.broadcast(k+U,"Input",[B])}dispatchKeyPressEvent(k,B,U){this.game.broadcaster.broadcast(`${k}_${U.keyCode}`,"Input",[U])}}var zN=U(48757);class YN extends zN.c{constructor(){super({zoneName:"zone-museum",atlas:q._.Zone_museum_json},[q._.Zone_museum_json]),this.area=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0],[0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0],[0,0,0,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,0,0],[0,0,0,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,0,0],[0,0,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0],[0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0],[0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0],[0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0],[0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0],[0,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,0],[0,0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,0],[0,0,0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,0,0],[0,0,0,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,0,0,0],[0,0,0,0,0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0],[1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]],this.startX=640,this.startY=545}create(k="dyno-A1"){super.create("dyno-A1")}screenSetup(){super.screenSetup(),this.content.addChild(K.q.instance.prodigy.create.sprite(196,522,q._.Zone_museum_json,"rail",new j.I9Y(0,1)));this.content.addChild(K.q.instance.prodigy.create.sprite(this.game.width-196,522,q._.Zone_museum_json,"rail",new j.I9Y(0,1))).scale.x=-1,this.path.addCallback(3,this.toDino.bind(this),!0);const k=K.q.instance.prodigy.dialogue.create(),B=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;oP.getNewFossils(B.backpack).length>0&&k.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MUSEUM_INTRO"),face:0});const U=[{ID:13,x:916,y:506,nx:949,ny:490},{ID:14,x:362,y:511,nx:331,ny:490},{ID:15,x:1192,y:707,nx:1216,ny:690},{ID:16,x:85,y:688,nx:65,ny:690},{ID:17,x:290,y:145},{ID:18,x:390,y:145},{ID:19,x:490,y:145},{ID:20,x:590,y:145},{ID:21,x:690,y:145},{ID:22,x:790,y:145},{ID:23,x:890,y:145},{ID:24,x:990,y:145}];let F;for(let G=0;G0){const B=K.q.instance.prodigy.dialogue.create();B.setText({text:K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("MUSEUM_COLLECTED_ALL_FOSSILS"),face:1,audio:sA.AUDIO[1]}),B.setText({callback:K.q.instance.prodigy.open.gotItem.bind(K.q.instance.prodigy.open,k,null,null,"museum")}),B.startDeprecated("scoog")}}}unlockFossil(k){K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.craft("fossil",k.ID),this.processFossil(k,!0)}processFossil(k,B=!1){let U;const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(F.backpack.hasItem("fossil",k.ID)>0)return k.type="fossil",k.full.removeAll(!0),k.ID<17?(U=k.full.add(K.q.instance.prodigy.create.sprite(0,0,q._.Zone_museum_json,k.ID)),U.x=-U.width/2,U.y=-U.height):k.full.add(K.q.instance.prodigy.icon.createFromData(k,0,0,new j.I9Y(.5,1))),k.full.visible=!0,k.empty.visible=!1,B&&this.prodigyGame.add.tween(k.full.scale,this).to({x:1.2,y:1.2},500,j.GS3.Quadratic.Out).to({x:1,y:1},500,j.GS3.Quadratic.In).start(),!0;{k.empty.removeAll(!0),U=k.empty.add(K.q.instance.prodigy.create.sprite(0,0,q._.Zone_museum_json,"empty")),U.x=-U.width/2,U.y=-U.height;const B=le.t.getItem("fossil",k.ID).data.recipe[0],G=F.backpack.hasItem(B.type,B.ID);return K.q.instance.prodigy.create.font(k.empty,U.x-50,U.y+27,`${G}/${B.N}`,{width:180,align:"center"}),k.empty.visible=!0,k.full.visible=!1,!1}}toDino(){K.q.instance.prodigy.world.it("dyno-A0")}}var QN=U(8083),XN=U(59685);const ZN=5;var JN,tx=U(23506),ex=U(39070),ix=U(56520),sx=U(28080);!function(k){k.PlayerCurrentWinStreak="DUELS_WIN_STREAK_NUMBER",k.PlayerBestWinStreak="DUELS_BEST_STREAK_NUMBER",k.PlayerCurrentWinStreakFlourish="DUELS_WIN_STREAK_NUMBER_FLOURISH",k.PlayerBestWinStreakFlourish="DUELS_BEST_STREAK_NUMBER_FLOURISH",k.OpponentCurrentWinStreak="DUELS_WIN_STREAK_NUMBER_OPPONENT",k.OpponentBestWinStreak="DUELS_BEST_STREAK_NUMBER_OPPONENT",k.OpponentCurrentWinStreakFlourish="DUELS_WIN_STREAK_NUMBER_FLOURISH_OPPONENT",k.OpponentBestWinStreakFlourish="DUELS_BEST_STREAK_NUMBER_FLOURISH_OPPONENT"}(JN||(JN={}));class nx extends yM.P{get _prefabGuid(){return Ei.l.DuelsMatchmakingScreen}constructor(){super(null,null),this._preBattleDuelMatchmakingStats=null,this.roomConfig=null,this.matchmakingFailurePopup=null}init(k,B){const U=Object.create(null,{init:{get:()=>super.init}});return(0,G.sH)(this,void 0,void 0,(function*(){U.init.call(this),this._playerPosition=k,this._matchFound=!1,this._isShowingLoadingScreen=!1,B&&(this.roomConfig=(yield ex.i.getValidatedRoomsConfig()).rooms.find((k=>k.id===B)))}))}create(){var k,B;if(null!==(B=null===(k=this._prefabRoot)||void 0===k?void 0:k.isDestroyed)&&void 0!==B&&!B)return;K.q.instance.game.broadcaster.addAppListener(oi.pm.GetTarget,(()=>this._playerPosition),this,K.q.instance.game,!1),this._segment.duelsStadium.sendInterfaceOpenedEvent();const U=K.q.instance.prodigy.gameContainer.get("306-5359");this.data.playerA=U,super.create(),this._matchmakingService.onMatched.add(this.onMatchFound,this),this._matchmakingService.onWaitTimeExhausted.add(this.onWaitTimeExhausted,this),this._matchmakingService.onMatchmakingFailure.add(this.onMatchmakingFailure,this),K.q.instance.prodigy.audio.playBGM(K.q.instance.prodigy.world.getZone(K.q.instance.prodigy.world.getCurrentZone()).bgmID,!0),K.q.instance.prodigy.audio.resumeBGM(),this.onCloseClicked.add((()=>{var k;this._segment.duelsStadium.sendCloseButtonClickedEvent(),this._matchmakingService.quitMatchmaking(),K.q.instance.prodigy.open.menuLayer=this.element.addChild(new j.mcf),this.data.shutdownLoadState=!0,K.q.instance.prodigy.open.map({onCloseButtonClicked:()=>{var k,B;K.q.instance.prodigy.world.it(U.data.zone,null===(k=this._playerPosition)||void 0===k?void 0:k.x,null===(B=this._playerPosition)||void 0===B?void 0:B.y)}}),null===(k=this._prefabRoot)||void 0===k||k.destroy()}))}loadPrefab(){const k=Object.create(null,{loadPrefab:{get:()=>super.loadPrefab}});return(0,G.sH)(this,arguments,void 0,(function*(B={}){const U=new j._mx;U.active=!1;const F=yield this._prefabLoader.loadWithDependenciesFromGUID(Ei.l.DuelMatchmakingOpponent,U);this._opponentSlotMachineAnimation=j.Uoy.getInjectedValue(F,"SLOT_MACHINE_ANIMATION"),this.data.showCancel=!1;const $=yield k.loadPrefab.call(this,Object.assign(Object.assign({PLAYER_2_AVATAR:F,FIND_MATCH_ON_CLICK:()=>(0,G.sH)(this,void 0,void 0,(function*(){yield this.findMatch()}))},B),yield xe.d.getElementalBoostInjectionDictionary()));return this._findMatchButton=j.Uoy.getInjectedValue($,"FIND_MATCH_BUTTON"),U.destroy(),yield this.injectWinStreakBadgeData(),$}))}findMatch(){return(0,G.sH)(this,void 0,void 0,(function*(){this._segment.duelsStadium.sendMatchmakingQueuedEvent(),this._findMatchButton.lockState(Zh.K.Disabled),this._opponentSlotMachineAnimation.startSpin(),this._minimumSpinTimePromise=j.Egh.timeout(nx.MINIMUM_SPIN_TIME_MS+ix.L.SPIN_LEAD_IN_TIME_MS);const k=yield this.getPlayerBattleStats();this._preBattleDuelMatchmakingStats=k,k.battleStreak<=nx.LOSE_STREAK_BOT_BATTLE_LIMIT?yield this.startBotBattle():yield this._matchmakingService.startMatchmaking(this.getBucketId())}))}getBucketId(){return(this.roomConfig?this.roomConfig.matchmakingBucket:1)+ZN}showOpponent(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U;const F=j.Aq$.isDefined(B);this._closeButton.lockState(Zh.K.Disabled);const G=sx.D.createWizardObject(k,!1);yield this._minimumSpinTimePromise,this._opponentObject=yield G,this._opponentSlotMachineAnimation.isSpinning&&(this._opponentSlotMachineAnimation.stopSpin(),yield this._opponentSlotMachineAnimation.onSpinComplete.asPromise());const $=j.Uoy.getInjectedValue(this._opponentSlotMachineAnimation.GameObject,"OPPONENT_PLAYER_CONTAINER").GameObject;$.addChild(this._opponentObject),$.setLayer($.parent.layer,!0),this._opponentObject.transform.setScale(-2,2),this._opponentSlotMachineAnimation.GameObject.parent.active=!1,this._isShowingLoadingScreen=!0,[["DUEL_HEADER_TEXT",!1],["DUEL_FOOTER_TEXT",!1],["FIND_MATCH_BUTTON",!1],["CLOSE_BUTTON",!1],["PLAYER_1_BANNER",!0],["PLAYER_2_BANNER",!0]].forEach((([k,B])=>{j.Uoy.getInjectedValue(this._prefabRoot,k).GameObject.active=B}));const H=null===(U=j.Uoy.getInjectedValue(this._prefabRoot,"ELEMENTAL_BOOST_DISPLAY"))||void 0===U?void 0:U.GameObject;null==H||H.destroy();const V=K.q.instance.prodigy.gameContainer.resolve(La.C),W=[this.data.playerA,k],[q,z]=W.map((k=>(V.init(k.appearance.getName()),V.getName())));Ja.d.updateInjectedValues(this._prefabRoot,{PLAYER_1_NAME:q,PLAYER_2_NAME:z}),F?yield this.injectWinStreakBadgeData(void 0,B):yield this.injectWinStreakBadgeData(k.userID),F&&(yield j.Egh.timeout(nx.ON_MATCH_FOUND_DELAY_MS))}))}onMatchFound(k){this._matchFound=!0,this._segment.duelsStadium.sendMatchFoundEvent(k.opponent.userID);(k=>(0,G.sH)(this,void 0,void 0,(function*(){yield this.showOpponent(k.opponent),yield this._matchmakingService.startDuel(k)})))(k).catch((k=>{this.onMatchmakingFailure(k instanceof Error?k:new Error(String(k)))}))}getPlayerBattleStats(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!j.Aq$.isDefined(this._playerBattleStats)){this._playerBattleStats=this._battleStatsHandler.getBattleStats();try{yield this._playerBattleStats}catch(e){throw this._playerBattleStats=null,e}}return(yield this._playerBattleStats).duelMatchmakingStats}))}injectWinStreakBadgeData(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){var U,F;let G,$;if(k){const B=(yield this._battleStatsHandler.getBattleStats(k)).duelMatchmakingStats;G=B.highestStreak,$=B.battleStreak}else{const k=yield this.getPlayerBattleStats();G=k.highestStreak,$=k.battleStreak,B&&(G+=B,$+=B)}const H=!j.Aq$.isDefined(k)&&!j.Aq$.isDefined(B),V=Object.assign(Object.assign({},this.getWinStreakInjectionDictionary(!1,G,H,null===(U=this._preBattleDuelMatchmakingStats)||void 0===U?void 0:U.highestStreak)),this.getWinStreakInjectionDictionary(!0,$,H,null===(F=this._preBattleDuelMatchmakingStats)||void 0===F?void 0:F.battleStreak));H&&(this._preBattleDuelMatchmakingStats=null),Ja.d.updateInjectedValues(this._prefabRoot,V)}))}getWinStreakInjectionDictionary(k,B,U,F){const G={};return B>1&&(U&&F+1===B?(F>1&&(G[k?JN.PlayerCurrentWinStreak:JN.PlayerBestWinStreak]=F),G[k?JN.PlayerCurrentWinStreakFlourish:JN.PlayerBestWinStreakFlourish]=B):k?G[U?JN.PlayerCurrentWinStreak:JN.OpponentCurrentWinStreak]=B:G[U?JN.PlayerBestWinStreak:JN.OpponentBestWinStreak]=B),G}onWaitTimeExhausted(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this.startBotBattle()}))}startBotBattle(){return(0,G.sH)(this,void 0,void 0,(function*(){var k;this._matchFound=!0;const B=()=>{this.roomConfig=null,xe.d.openDuelsStadiumMenu().catch(j.RQr.createHandler("Error opening duels stadium menu"))},U=yield K.q.instance.prodigy.gameContainer.get("a25-68f4").getBattleStartQuestData(Ni.gu.MatchmakingBotDuel),F=(yield this.getPlayerBattleStats()).battleStreak,G=XN.D.Elementalist,$=tx.V.getBotPersonalityInstanceConfig(G,F),H={battleType:Ni.gu.MatchmakingBotDuel,botConfig:$,roomId:null===(k=this.roomConfig)||void 0===k?void 0:k.id,activeQuestIDs:U.questIDs,questEventsToSend:U.questEvents};this._segment.duelsStadium.sendMatchFoundEvent(null,G),this._segment.duelsStadium.setBotDifficultyEvent(F);const V={backgroundID:[nr.q.Battle_coliseum_outside_bg,nr.q.Battle_coliseum_outside_fg],onVictory:B,onEscape:B,onDefeat:B,clearWorld:!1,botConfig:$,defeatData:{preventDefaultTeleport:!0}};K.q.instance.game.state.states.get(Ie.G.SecureBattleRevamp).startBattleRequest(H,V)}))}onMatchmakingFailure(k){Ko.captureException(k),j.RQr.logError(k,"Matchmaking failure"),this._matchmakingService.quitMatchmaking();const B={TITLE:this._localizationService.getText("DUELS_MATCHMAKING_ERROR_TITLE"),MESSAGE:this._localizationService.getText("DUELS_MATCHMAKING_ERROR_BODY"),VISUAL_OVERLAY_ACTIVE:!0,CTA_BUTTON_ENABLED:!0,CTA_BUTTON_FUNCTION:this.tryAgainButtonClicked.bind(this)};Ja.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,Ei.l.PaperDialogInjectionConfigured,B).then((k=>(0,G.sH)(this,void 0,void 0,(function*(){var B;this._opponentSlotMachineAnimation.isSpinning&&(this._opponentSlotMachineAnimation.stopSpin(),yield this._opponentSlotMachineAnimation.onSpinComplete.asPromise()),this.matchmakingFailurePopup=k,this._opponentSlotMachineAnimation.GameObject.parent.active=!0,null===(B=this._opponentObject)||void 0===B||B.destroy(),this._findMatchButton.unlockState(),this._closeButton.unlockState()})))).catch((k=>{j.RQr.logError(k,"Error showing matchmaking failure message")}))}tryAgainButtonClicked(){var k;this._isShowingLoadingScreen&&(this.shutdown(),K.q.instance.game.state.start(Ie.G.DuelMatchmaking,!1,this._playerPosition,null===(k=this.roomConfig)||void 0===k?void 0:k.id))}consumeStadiumRoomEntryCost(){var k;if(null===(k=this.roomConfig)||void 0===k?void 0:k.entryCost){(Array.isArray(this.roomConfig.entryCost)?this.roomConfig.entryCost:[this.roomConfig.entryCost]).forEach((k=>{"gold"===k.type&&K.q.instance.prodigy.gameContainer.get("306-5359").changeGold(-1*k.amount)}))}}start(){this._playerBattleStats=this._battleStatsHandler.getBattleStats(),j.Egh.timeout(500).then((()=>(0,G.sH)(this,void 0,void 0,(function*(){yield this.findMatch()})))).catch(j.RQr.createHandler("Timeout error, Find Match did not run"))}shutdown(){var k;if(K.q.instance.prodigy.open.cleanup(),this._matchmakingService.quitMatchmaking(),this._matchmakingService.onMatched.removeAll(this),this._matchmakingService.onWaitTimeExhausted.removeAll(this),this._matchmakingService.onMatchmakingFailure.removeAll(this),null===(k=this.matchmakingFailurePopup)||void 0===k||k.destroy(),this._playerBattleStats=null,this._matchFound){this._matchFound=!1,this.data.shutdownLoadState=!1;const k=K.q.instance.game.tweens.getAll();this._managedTweens=$.clone(k),k.length=0}else K.q.instance.game.broadcaster.removeAppListener(oi.pm.GetTarget,this,K.q.instance.game),this._managedTweens&&(K.q.instance.game.tweens.getAll().push(...this._managedTweens),this._managedTweens=null),super.shutdown()}}nx.MINIMUM_SPIN_TIME_MS=2e3,nx.ON_MATCH_FOUND_DELAY_MS=3e3,nx.LOSE_STREAK_BOT_BATTLE_LIMIT=-2,(0,G.Cg)([(0,Re.b)("d0e-64fd"),(0,G.Sn)("design:type",j.wNP)],nx.prototype,"_prefabLoader",void 0),(0,G.Cg)([(0,Re.b)("ba8-cb5e"),(0,G.Sn)("design:type",Object)],nx.prototype,"_matchmakingService",void 0),(0,G.Cg)([(0,Re.b)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],nx.prototype,"_localizationService",void 0),(0,G.Cg)([(0,Re.b)("c47-20b6"),(0,G.Sn)("design:type",Ge.Y)],nx.prototype,"_segment",void 0),(0,G.Cg)([(0,Re.b)("0f1-c356"),(0,G.Sn)("design:type",nw)],nx.prototype,"_battleStatsHandler",void 0);var ax=U(1559),rx=U(49334),ox=U(26022);class hx extends z.U{constructor(){super(...arguments),this._isAssetsLoaded=!1,this._isDataLoaded=!1,this._isBootLoaded=!1,this._localizedTextLoaded=!1,this._gameData=null,this._featureRevisionsData={},this._waitingOnFeatureRevisionsData=0}get game(){return K.q.instance.game}static init(){hx.createGame(),hx.logAntiTamperingWarning()}static createGame(){const k=V.ENV.WEBGL2;V.settings.PREFER_ENV=k,V.settings.MIPMAP_TEXTURES=0;const B={forceCanvas:!1,clearBeforeRender:!0,backgroundAlpha:1,resolution:1,preserveDrawingBuffer:!0,antialias:!1},U=new an.n({width:1280,height:720,parent:"game-container",roundPixels:!1,failIfMajorPerformanceCaveat:!1},B);U.init(),new j.W$e(U),new K.q(U),new ZR(U);const F=new XR.A(K.q.instance.prodigy.load,U.cache,K.q.instance.prodigy.assets);j.W$e.instance.loader=F,j.W$e.instance.prefabLoaderInstance=K.q.instance.prodigy.gameContainer.get("d0e-64fd"),j.W$e.instance.getWorkerURL=K.q.instance.prodigy.gameContainer.get("be9-3278").getWorkerPath.bind(K.q.instance.prodigy.gameContainer.get("be9-3278")),U.state.add(Ie.G.Boot,new hx),U.state.add(Ie.G.Loading,new of.R),U.state.add(Ie.G.TileScreen,new ox.b),U.state.add(Ie.G.SplashScreen,new Vd.S),U.state.add(Ie.G.Faint,new ax.v),U.state.add(Ie.G.Museum,new YN),U.state.add(Ie.G.DinoDig,new oP),U.state.add(Ie.G.DanceDance,new nP),U.state.add(Ie.G.CoOp,new QN.w),U.state.add(Ie.G.SecureBattleRevamp,new qN),U.state.add(Ie.G.PrefabScene,new rx.Q),U.state.add(Ie.G.DuelMatchmaking,new nx),U.state.add(Ie.G.Rifts,new vP.n),U.state.add(Ie.G.LootDashTransport,new fP),U.state.add(Ie.G.LootDashMenu,new dP),U.state.start(Ie.G.Boot),window.clearInput=()=>{for(let k=0;k{this.featureFlagsLoaded(this.addFeatureFlagDebugData(k))})):this.featureFlagsLoaded(this.addFeatureFlagDebugData(U))}addFeatureFlagDebugData(k){let B=k;W.qg(window.location.search);return B}featureFlagsLoaded(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;const U=K.q.instance.prodigy.gameContainer.get("afa-b7c5");U.endTracing(fu.u.BootFeatureFlags,{flags_count:Object.keys(k).length});const F=K.q.instance.prodigy.gameContainer,G={},$=F.get("80c-6fa4");$.initializeWithJson(k),K.q.instance.prodigy.load.flagProvider=$,U.startTracing(fu.u.BootGameData);const H={},V=[];V.push(hx.loadJSONFromXHR($.getItemsDataURI(),"game-metadata").then((k=>{this._gameData=k,H.game_metadata_loaded=!0})).catch((k=>{H.game_metadata_error=!0,this.createPromiseError("Failed to load game metadata.")(k)}))),V.push(hx.loadJSONFromXHR($.getDependencyMapURI(),"dependencyMap").then((k=>{F.get("d0e-64fd").initDependencyMapper(k),Ut.E.dependencyMapper=new j.nvu(k),H.dependency_map_loaded=!0})).catch((k=>{H.dependency_map_error=!0,this.createPromiseError("Failed to load dependency map.")(k)})));const W=K.q.instance.prodigy.gameContainer.get("2e6-0f71").getUUID();K.q.instance.prodigy.gameContainer.get("11d-01b8").setUser(W),U.startTracing(fu.u.BootFeatureRevision);const q={},z=$.getFeatureRevisionsURIs();if(this._waitingOnFeatureRevisionsData=null!==(B=null==z?void 0:z.length)&&void 0!==B?B:0,q.revision_count=this._waitingOnFeatureRevisionsData,this._waitingOnFeatureRevisionsData>0){const k=$.getValue("gameDataPath"),B=z.length;for(let U=0;U{--this._waitingOnFeatureRevisionsData;const B=["audio","atlas","bgm","prefab","sfx","singleImage","streamedMap","tiledMap","tileset"],U={};for(const F in k)B.includes(F)?j.VyI.log(`Attempting to load an item of type : ${F} as a feature revision. This is not supported`,j.$bb.Warning):U[F]=k[F];this.mergeWithGameData(this._featureRevisionsData,U)})).catch((()=>{--this._waitingOnFeatureRevisionsData}));V.push(F)}}yield Promise.all(V),U.endTracing(fu.u.BootGameData,H),this._waitingOnFeatureRevisionsData<=0&&(q.revisions_loaded=!0),U.endTracing(fu.u.BootFeatureRevision,q);for(let k=0;k{var k,B,U;const G=F.get(j.$Bt.LocalizationService),$=[];for(let F=1;;++F){const k=`LOADER_FLAVOUR_${F}`;if(!G.hasText(k))break;$.push(G.getText(k))}null===(U=null===(B=null===(k=window.SW)||void 0===k?void 0:k.Load)||void 0===B?void 0:B.addFlavourMessages)||void 0===U||U.call(B,$)}))];{const k=K.q.instance.prodigy.gameContainer.get("80c-6fa4").getPrefabsURIs(),B={};for(const[F,G]of Object.entries(en.T))B[G]=Number.parseInt(F);const U=k=>{if(!k)throw new Error("No data present in loaded prefabs.");k.forEach((k=>{B[k.guid]&&(k.ID=B[k.guid])})),G.prefab=G.prefab.concat(k)};for(const F of k){const k=hx.loadJSONFromXHR(F,"prefab").then(U);Y.push(k)}}yield Promise.all(Y),U.endTracing(fu.u.BootAssets,{assets_loaded:!0});const Q=$.getValue("gameConstants");for(const k in Q)Vt.s.setGameConstant(k,Q[k]);this.cacheGeolocationData(),yield this.loadedData(this._gameData,this._featureRevisionsData,G),this._gameData&&this._waitingOnFeatureRevisionsData<=0&&this.loadedLocalizedData()}))}cacheGeolocationData(){K.q.instance.prodigy.gameContainer.get("fab-547a").getData().then((([k,B])=>{j.VyI.log(`Geolocation result: ${JSON.stringify(B)} ${k?k.getErrorMessage():""}`,j.$bb.Verbose)}))}createPromiseError(k){return B=>{j.VyI.log(k,j.$bb.Error),console.error(B)}}loadAndTraceLocalizationData(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(fu.u.BootLocalization);const B={};yield this.fetchLocalizationData().catch((k=>{B.localization_error=!0,this.createPromiseError("Failed to load localization data.")(k)})),this._localizedTextLoaded=!0,B.localization_loaded=!0,k.endTracing(fu.u.BootLocalization,B)}))}fetchLocalizationData(){return(0,G.sH)(this,void 0,void 0,(function*(){yield Wd.O.determineLocale();const k=new JR.K(Wd.O.localeCode);K.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).setDataSource(k),yield k.dataLoadPromise}))}loadedData(k,B,U){return(0,G.sH)(this,void 0,void 0,(function*(){let F;const G=k.emote;for(F=0;Fk.ID?k.ID:k.legacyID?k.legacyID:k.guid?k.guid:void 0))}loadNonLocalAssets(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.prodigy.gameContainer.get("80c-6fa4").getAssetsDataURI();return hx.loadJSONFromXHR(k,"assets-metadata").then((k=>{var B,U,F,G,$,H,V,W,q,z,Y,Q,X,Z,J,tt,et,it,st,nt;const at={},rt=k;for(const K in rt){const k=rt[K];for(const rt in k){const ot=k[rt],ht=ot.hash;let ct,dt;if(j.Aq$.isDefined(null===(F=null===(U=null===(B=ot.metadata)||void 0===B?void 0:B.assets)||void 0===U?void 0:U.default)||void 0===F?void 0:F.v)?ct=ot.metadata.assets.default.v:j.Aq$.isDefined(ot.v)?ct=ot.v:j.Aq$.isDefined(null===(V=null===(H=null===($=null===(G=ot.data)||void 0===G?void 0:G.metadata)||void 0===$?void 0:$.assets)||void 0===H?void 0:H.default)||void 0===V?void 0:V.v)&&(ct=ot.data.metadata.assets.default.v),"json"===K){const k=ot.data.filename;dt={type:K,base:`${de.s.ASSET_FOLDER}/${null!==(W=ot.data.originalType)&&void 0!==W?W:K}/`,url:`${null!==(q=ot.data.originalFilename)&&void 0!==q?q:k}/${ot.hash}/${k}.${ot.assetType}`,data:ot.data}}else if("tileset"===K){const k=`${de.s.ASSET_FOLDER}/tilesets/`;let B;B=(null===(z=ot.data)||void 0===z?void 0:z.filename)?ot.data.filename:ot.nameID;dt={type:"spritesheet",base:k,url:`${B}/${ct||ht}/${B}.png`,w:null!==(Q=null===(Y=null==ot?void 0:ot.data)||void 0===Y?void 0:Y.w)&&void 0!==Q?Q:40,h:null!==(Z=null===(X=null==ot?void 0:ot.data)||void 0===X?void 0:X.h)&&void 0!==Z?Z:40}}else if("tiledMap"===K){let k;k=hx._tiledNameMappings[ot.nameID]?hx._tiledNameMappings[ot.nameID]:ot.nameID?ot.nameID:null===(J=ot.data)||void 0===J?void 0:J.filename;dt={type:"json",base:`${de.s.ASSET_FOLDER}/tiled-data/`,url:`${k}/${ct||ht}/${k}.json`}}else dt={type:K,fullURL:ot.fullURL,data:ot.data},"spine"===K&&this.setupFloatling(ot);"spine"===K&&(null===(it=null===(et=null===(tt=ot.metadata)||void 0===tt?void 0:tt.assets)||void 0===et?void 0:et.default)||void 0===it?void 0:it.hitbox)&&(dt.data.hitbox=ot.metadata.assets.default.hitbox),(null===(st=ot.atlasLink)||void 0===st?void 0:st.guid)&&j.W$e.instance.game.cache.addAtlasAlias(ot.guid,ot.atlasLink.guid,ot.atlasLink.frame),ot.sliceData&&j.W$e.instance.game.cache.addSliceData(ot.guid,ot.sliceData),ct?("sfx"===K&&18===ot.ID&&(ct=1),dt.v=ct):ht&&(dt.hash=ht),j.Aq$.isDefined(ct)||j.Aq$.isDefined(ht)||dt.fullURL||j.VyI.log(`No full url and no version, this asset will not load: ${K}-${null!==(nt=ot.ID)&&void 0!==nt?nt:ot.legacyID}`,j.$bb.Error),ot.guid&&(at[ot.guid]=dt),ot.ID&&(at[`${K}-${ot.ID}`]=dt),ot.nameID&&(at[ot.nameID]=dt)}}K.q.instance.prodigy.assets.assignAssets(at);const ot=this.getDuplicateLegacyMappings(at);K.q.instance.prodigy.assets.assignAssets(ot),this.loadAssets()}))}))}loadAssets(){K.q.instance.prodigy.load.assets([q._.General_core_json,q._.Tiled_sprites_json],this.loadedAssets.bind(this))}setupFloatling(k){var B,U;const F=null===(B=k.data)||void 0===B?void 0:B.filename;if(F&&0===F.indexOf(pP.s.FLOATLING_PREFIX))for(let G=0;G-1){const B=null!==(U=k.ID)&&void 0!==U?U:k.data.ID;pP.s.floatlingSpineIDs[G][F.charAt(F.length-1)]=B;break}}}static loadJSONFromXHR(k,B){return(0,G.sH)(this,void 0,void 0,(function*(){return new Promise(((U,F)=>{let G=3;const $=()=>{const H=new XMLHttpRequest;H.onreadystatechange=()=>{H.readyState===XMLHttpRequest.DONE&&(200===H.status?U(H.response):G>0?(G--,$()):(j.VyI.log(`Failed to load ${B} data.`,j.$bb.Error),F()))},H.responseType="json",H.open("GET",k,!0),H.send("")};$()}))}))}loadLocalAssets(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=K.q.instance.prodigy.gameContainer.get("6a1-4b92").getCurrentEnvironmentByHost()===$e.h.Local?"":"/game",B=`${window.location.origin}${k}`,U=`${B}/projectConfig/assetPathConfig.json`;return hx.loadJSONFromXHR(U,"assetPathConfig").then((k=>{var U;const F=k,G={},$=Object.keys(F.assetData);for(let V=0;V<$.length;V++){const k=$[V],H=F.assetData[k];"spine"===H.type&&this.setupFloatling(H),(null===(U=H.atlasLink)||void 0===U?void 0:U.guid)&&j.W$e.instance.game.cache.addAtlasAlias(H.guid,H.atlasLink.guid,H.atlasLink.frame),H.sliceData&&j.W$e.instance.game.cache.addSliceData(H.guid,H.sliceData),"prefab"!==H.type&&(G[k]={type:H.type,fullURL:`${B}/${F.assetData[$[V]].path}`,data:H.data})}K.q.instance.prodigy.assets.assignAssets(G);const H=this.getDuplicateLegacyMappings(G);K.q.instance.prodigy.assets.assignAssets(H),this.loadAssets()}))}))}getDuplicateLegacyMappings(k){const B={};if(!window.legacyDuplicateAssetMappings)return B;for(const U in window.legacyDuplicateAssetMappings){const F=window.legacyDuplicateAssetMappings[U];for(const G in F){const j=F[G],$=`${U}-${G}`,H="string"!=typeof j||0!==j.indexOf(U)?`${U}-${j}`:`${j}`,V=window.legacyAssetMappings[$],W=window.legacyAssetMappings[H],q=k[V],K=k[W];q&&!K?W&&(B[W]=q):!q&&K&&V&&(B[V]=K)}}return B}loadLocalPrefabData(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=K.q.instance.prodigy.gameContainer.get("6a1-4b92").getCurrentEnvironmentByHost()===$e.h.Local,U=B?"":"/game",F=`${window.location.origin}${U}`,G=new j.H12,$={};$.serverURL=B?"http://localhost:32220":F,yield G.loadProjectConfigData(`${F}/projectConfig/assetPathConfig.json`,`${F}/projectConfig/dependencyMap.json`,$),yield hx.loadJSONFromXHR(`${F}/projectConfig/dependencyMap.json`,"local dependencyMap").then((k=>{K.q.instance.prodigy.gameContainer.get("d0e-64fd").initDependencyMapper(k),Ut.E.dependencyMapper=new j.nvu(k)}));const H={},V=new Set,W=k=>{if(!k)throw new Error("No data present in loaded prefabs.");const B={};k.forEach((k=>{B[k.guid]={data:{prefab:k.data.prefab},name:k.data.filename,key:k.guid,local:!0}}));const U=Object.keys(B);for(let F=0;F{const B=Object.keys(en.T);for(let U=0;U{let U=!1;k.prefab.forEach((k=>{k.guid===B&&(k.data.prefab=H[B],U=!0)})),U||k.prefab.push({guid:B,ID:B,data:{prefab:H[B],name:B},type:"Prefab"})}))}))}))}loadedLocalizedData(){window.updateGameLoaderProgress(75,"loadedLocalizedData - begin");const k=["boots","follow","hat","mount","outfit","weapon","pet"],B=K.q.instance.prodigy.gameContainer.get("8c1-3c93");B.addPhrases(U(60675).H,!0);for(let U=0;Uk.data.name)));window.addEventListener("message",(k=>{if(k.origin===window.location.origin){const B=k.data;try{B.cmd&&(B.cmd.indexOf("T2C_")>=0||B.cmd.indexOf("C2T_")>=0)&&(B.prodigy||window.postMessage(JSON.stringify({cmd:"T2C_Result",param:[["Cheating is BAD!","Stop doing it!"]],prodigy:!0}),window.location.origin))}catch(e){}}}),!1),j.o5U.isAndroid()&&K.q.instance.game.device.rotationEvent.add((k=>{k?(this.game.scale.fullScreenScaleMode=Y.y.EXACT_FIT,this.game.scale.fullScreenTarget=document.body,this.game.scale.startFullScreen().catch(j.RQr.createHandler("Failed to start fullscreen."))):this.game.scale.stopFullScreen()})),this._metricsManager.checkForCrash()}loadedAssets(k,B){this._isAssetsLoaded=B}create(){super.create(),K.q.instance.prodigy.init(),this.game.scale.scaleMode=Vt.s.get("GameConstants.Build.SCALE_MODE"),this.game.scale.refresh(),this.input.maxPointers=1,this.game.stage.disableVisibilityChange=!0,j.o5U.isDesktop()?this.game.scale.pageAlignHorizontally=!0:this.game.scale.forceOrientation(!0),this.extendInput()}extendInput(){const k=K.q.instance.game;k.inputDispatcher=new KN(k),k.input.setEnterCallback=B=>{k.input.enterCallback=B},k.input.clearEnterCallback=()=>{delete this.game.input.enterCallback},document.addEventListener("keyup",(B=>{13===B.keyCode&&j.Aq$.isDefined(k.input.enterCallback)&&k.input.enterCallback()}))}update(){if(super.update(),!this._isBootLoaded&&this._isAssetsLoaded&&this._isDataLoaded&&this._localizedTextLoaded){this._isBootLoaded=!0;const k=K.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(fu.u.BootRebuildGUID),pn.K.addLocalGuidsToCommonAssetsCached(),K.q.instance.game.broadcaster.broadcast(oi.fP.Loaded,null,[]);K.q.instance.prodigy.gameContainer.get(j.t5G.PrefabDataProvider).rebuildPrefabGuidMap(),k.endTracing(fu.u.BootRebuildGUID),k.startTracing(fu.u.BootStartNextState),K.q.instance.game.state.start(Ie.G.SplashScreen),k.endTracing(fu.u.BootStartNextState),k.endTracing(fu.u.Boot,{asset_loaded:this._isAssetsLoaded,data_loaded:this._isDataLoaded,localized_text_loaded:this._localizedTextLoaded,boot_loaded:this._isBootLoaded})}}shutdown(){K.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(fu.u.Boot,{completed:!1,shutdown_before_completion:!0}),super.shutdown()}static logAntiTamperingWarning(){console.log("\n%c WARNING! %c\n\nThis is a browser feature for developers only. If someone told you to copy-paste something here, it is a scam and may provide others with access to your account and/or your computer. This may result in your account being deleted and/or you may be banned from Prodigy.\n","background: #F00; font-family: Arial; color: #FFF; font-size: 12pt; font-weight: 500; padding: 5px; margin-bottom: 5px","background: none; font-family: Arial; font-size: 10pt; line-height: 20px;")}}hx._tiledNameMappings={"map-crystal_caverns-dungeonhub":"crystal-caverns-hub","map-skywatch-a0":"map-cloudzone-a0","map-skywatch-a1":"map-cloudzone-a1","map-skywatch-b1":"map-cloudzone-b1","map-skywatch-b2":"map-cloudzone-b2","map-skywatch-b3":"map-cloudzone-b3","map-skywatch-c1":"map-cloudzone-c1","map-skywatch-c2":"map-cloudzone-c2","map-skywatch-c3":"map-cloudzone-c3","map-skywatch-c4":"map-cloudzone-c4","map-skywatch-c5":"map-cloudzone-c5","map-skywatch-d1":"map-cloudzone-d1","map-skywatch-d2":"map-cloudzone-d2","map-skywatch-d3":"map-cloudzone-d3","map-skywatch-e1":"map-cloudzone-e1","map-skywatch-e2":"map-cloudzone-e2","map-skywatch-e3":"map-cloudzone-e3","map-skywatch-e4":"map-cloudzone-e4","map-skywatch-e5":"map-cloudzone-e5","map-academy-cr1":"map-academy-gh-landing2","map-academy-cr2":"map-academy-gh-landing1","map-earthtower-cr":"map-earthtower-common","map-earthtower-wr":"map-earthtower-warden","map-earth-tower-end":"map-earthtower-entrance-exit","map-icetower-cr":"map-icetower-common","map-icetower-wr":"map-icetower-warden","map-ice-tower-end":"map-icetower-entrance-exit","map-lamplight-c3-arena-pumpkinfest":"map-lamplight-c3-pumpkinfest","map-lamplight-c3-arena-springfest":"map-lamplight-c3-springfest","map-lamplight-c3-arena-starlight_festival":"map-lamplight-c3-starlight_festival","map-lamplight-c3-arena-summerfest":"map-lamplight-c3-summerfest","map-lamplight-c3-arena-winterfest":"map-lamplight-c3-winterfest","towertown-default-1":"towertown-1up","towertown-default-2":"towertown-2up","towertown-tutorial":"towertown-1up-tut-sub","crystal-caverns-phase-1-farback":"crystal-caverns-phase-1-parallax"},window.Boot=hx},8083:(k,B,U)=>{"use strict";U.d(B,{w:()=>_s});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(92579),V=U(35120),W=U(29569),q=U(91207),K=U(77938),z=U(98400),Y=U(99625),Q=U(82209),X=U(129),Z=U(27812),J=U(63115),tt=U(47389),et=U(71857),it=U(53885),st=U(80060),nt=U(83441);class at extends G.uAl{constructor(){super(...arguments),this.currentValue=0,this.onHealthChanged=new G.HN0}get CurrentValue(){return this.currentValue}set CurrentValue(k){this.currentValue!==k&&(this.currentValue=k,this.onHealthChanged.dispatch(this.currentValue))}get OnHealthChanged(){return this.onHealthChanged}get InitialValue(){return this.initialValue}set InitialValue(k){this.initialValue=k}reset(){this.CurrentValue=this.initialValue}destroy(){this.onHealthChanged.dispose(),super.destroy()}}class rt extends G.JTX{constructor(){super(...arguments),this.battleTeam=null}get DamageReceiver(){return this.damageReceiver}get DamageSource(){return this.damageSource}get BattleTeam(){return this.battleTeam}set BattleTeam(k){null!==this.battleTeam&&this.battleTeam.removeMember(this),this.battleTeam=k,this.battleTeam.addMember(this)}get Health(){return this.health}get EnterBattleAnimationState(){return this.enterBattleAnimationState}get IdleAnimationState(){return this.idleAnimationState}get AttackAnimationState(){return this.attackAnimationState}get TakeDamageAnimationState(){return this.takeDamageAnimationState}get DefeatAnimationState(){return this.defeatAnimationState}get VictoryAnimationState(){return this.victoryAnimationState}get NameProvider(){return this.name}get Level(){return this.level}get Element(){return this.element}get CastPoint(){return this.castPoint}get ImpactSize(){return this.impactSize}get ImpactOffset(){return this.impactOffset}destroy(){null!==this.battleTeam&&this.battleTeam.removeMember(this),super.destroy()}setAsActiveTeamMember(){this.battleTeam.ActiveMember=this}}(0,F.Cg)([(0,G.fFd)("DamageReceiver"),(0,F.Sn)("design:type",Object)],rt.prototype,"damageReceiver",void 0),(0,F.Cg)([(0,G.fFd)("DamageSource"),(0,F.Sn)("design:type",Object)],rt.prototype,"damageSource",void 0),(0,F.Cg)([(0,G.fFd)("Health"),(0,F.Sn)("design:type",at)],rt.prototype,"health",void 0),(0,F.Cg)([(0,G.fFd)("EnterBattleAnimationState"),(0,F.Sn)("design:type",Object)],rt.prototype,"enterBattleAnimationState",void 0),(0,F.Cg)([(0,G.fFd)("IdleAnimationState"),(0,F.Sn)("design:type",Object)],rt.prototype,"idleAnimationState",void 0),(0,F.Cg)([(0,G.fFd)("AttackAnimationState"),(0,F.Sn)("design:type",Object)],rt.prototype,"attackAnimationState",void 0),(0,F.Cg)([(0,G.fFd)("TakeDamageAnimationState"),(0,F.Sn)("design:type",Object)],rt.prototype,"takeDamageAnimationState",void 0),(0,F.Cg)([(0,G.fFd)("DefeatAnimationState"),(0,F.Sn)("design:type",Object)],rt.prototype,"defeatAnimationState",void 0),(0,F.Cg)([(0,G.fFd)("VictoryAnimationState"),(0,F.Sn)("design:type",Object)],rt.prototype,"victoryAnimationState",void 0),(0,F.Cg)([(0,G.fFd)("Name"),(0,F.Sn)("design:type",Object)],rt.prototype,"name",void 0),(0,F.Cg)([(0,G.fFd)("Level"),(0,F.Sn)("design:type",Number)],rt.prototype,"level",void 0),(0,F.Cg)([(0,G.fFd)("Element"),(0,F.Sn)("design:type",String)],rt.prototype,"element",void 0),(0,F.Cg)([(0,G.fFd)("CastPoint",!1),(0,F.Sn)("design:type",Object)],rt.prototype,"castPoint",void 0),(0,F.Cg)([(0,G.fFd)("ImpactSize",!1),(0,F.Sn)("design:type",Object)],rt.prototype,"impactSize",void 0),(0,F.Cg)([(0,G.fFd)("ImpactOffset",!1),(0,F.Sn)("design:type",Object)],rt.prototype,"impactOffset",void 0);var ot=U(16495);class ht extends G.JTX{constructor(){super(...arguments),this.walkTarget=null,this.movement=null,this.animationPlayed=!1,this.onComplete=new G.HN0}get WalkTarget(){return this.walkTarget}set WalkTarget(k){this.walkTarget=k}get MovementComponent(){return this.movement}set MovementComponent(k){this.movement=k}get OnComplete(){return this.onComplete}play(){(0,ot.sR)(this.animators,et.$.WALK,!0),this.movement.onMoveEnd.addOnce((()=>{(0,ot.sR)(this.animators,this.idleAnimationName,!0),this.animationPlayed=!0,this.onComplete.dispatch()})),this.movement.MoveTarget=this.walkTarget}hasFinishedPlaying(){return this.animationPlayed}destroy(){this.onComplete.dispose(),super.destroy()}}(0,F.Cg)([(0,G.fFd)("Animators"),(0,F.Sn)("design:type",Object)],ht.prototype,"animators",void 0),(0,F.Cg)([(0,G.fFd)("IdleAnimationName"),(0,F.Sn)("design:type",String)],ht.prototype,"idleAnimationName",void 0);class ct extends G.s3P{constructor(){super(...arguments),this.onComplete=new G.HN0,this.animationName=null,this.loop=!1,this.animationPlayed=!1}get OnComplete(){return this.onComplete}get AnimationName(){return this.animationName}set AnimationName(k){this.animationName=k}get LoopAnimation(){return this.loop}set LoopAnimation(k){this.loop=k}play(){if(Array.isArray(this.animators)){const k=this.animators.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return new Promise((B=>{k.OnAnimationComplete.addOnce(B),k.playAnimation(this.animationName,this.loop)}))}))));Promise.all(k).then((()=>{this.animationPlayed=!0,this.onComplete.dispatch()})).catch((()=>{G.VyI.log("PlayInjectAnimatorsState - Warning: Could not play all animations",G.$bb.Warning)}))}else this.animators.OnAnimationComplete.addOnce((()=>{this.onComplete.dispatch()})),this.animators.playAnimation(this.animationName,this.loop)}hasFinishedPlaying(){return this.animationPlayed}}(0,F.Cg)([(0,G.fFd)("Animators"),(0,F.Sn)("design:type",Object)],ct.prototype,"animators",void 0);class dt extends G.PQK{set idleAnimationName(k){this._idleAnimationName=k}installBindings(){const k=new ct(this.Container);k.AnimationName=this._idleAnimationName,k.LoopAnimation=!0,this.Container.bind("IdleAnimationState").toConstantValue(k);const B=new ct(this.Container);B.AnimationName=et.$.ATTACK,B.LoopAnimation=!1,this.Container.bind("AttackAnimationState").toConstantValue(B),this.Container.bind("IdleAnimationName").toConstantValue(this._idleAnimationName),this.Container.bind("CastPoint").toConstantValue({x:60,y:-40}),this.Container.bind("ImpactSize").toConstantValue({x:0,y:0}),this.Container.bind("ImpactOffset").toConstantValue({x:0,y:0})}}class lt{constructor(k){this.game=null,this.game=k}createPlayer(k,B,U,j){return(0,F.sH)(this,void 0,void 0,(function*(){return new Promise(($=>(0,F.sH)(this,void 0,void 0,(function*(){const F=B.getAvailableSlot();if(null!==F){F.IsOccupied=!0;const B=new X.a(V.q.instance.game);let H;U&&(H={type:U.transformType,ID:U.transformID}),B.init({data:{chargedLevelData:j},appearance:{morph:H}});const W=new Q.z;W.initialize(B);const q={"377-3e7b":W},K=V.q.instance.prodigy.gameContainer.get("d0e-64fd"),z=yield st.d.loadWithInjectedValuesAndDependenciesFromGUID(K,Y.l.RemotePlayer,q);z.setLayer(void 0,!0);const at=z.findComponentInChildren(tt.b),ot=z.findComponent(it.u).getRootContainer();F.GameObject.parent.addChild(z),F.GameObject.parent.legacyTransform.group.addChild(ot),ot.visible=!1,ot.transform.position.set(F.OffScreenStartPosition.x,F.OffScreenStartPosition.y);const ct=z.addComponent(G.bE_),lt=new dt;lt.idleAnimationName=U?et.$.STAND:et.$.STOP_HEAVY,ct.Installers.push(lt),ct.runInstallers();const ut=z.addComponent(G.Fid);ut.Identifier="Animators",ut.Components=[z.findComponentInChildren(nt.O).spineAnimator];const ft=z.addComponent(Z.I);ft.MoveSpeed=220;const bt=z.addComponent(ht);bt.MovementComponent=ft,bt.WalkTarget=new G.I9Y(F.GameObject.legacyTransform.x,F.GameObject.legacyTransform.y);const pt=z.addComponent(G.Fid);pt.Identifier="EnterBattleAnimationState",pt.Components=[bt];const vt=z.addComponent(Z.I);vt.MoveSpeed=450;const gt=z.addComponent(ht);gt.MovementComponent=vt,gt.WalkTarget=new G.I9Y(F.OffScreenStartPosition.x,F.OffScreenStartPosition.y);const mt=z.addComponent(G.Fid);mt.Identifier="DefeatAnimationState",mt.Components=[gt];const yt=z.addComponent(rt),_t=z.addComponent(G.Fid);_t.Identifier="BattleTeamMember",_t.Components=[yt];const Et=()=>{const B=z.findComponentInChildren(J.T),U=new Promise((k=>{at.onAppearanceLoaded.addOnce(k)}));at.setAppearance(k).catch(G.RQr.createHandler("Failed to set player appearance for battle player"));const F=B?B.updateMountAppearance().catch(G.RQr.createHandler("Failed to load battle player mount")):Promise.resolve();Promise.all([U,F]).then((()=>{ot.visible=!0,$(z)})).catch(G.RQr.createHandler("Failed in onAppearanceReady for player creation"))},wt=z.findComponentInChildren(nt.O).spineAnimator.spine;wt.isLoaded?Et():wt.OnLoaded.addOnce(Et)}else G.VyI.log("No available slots on screen to create player",G.$bb.Warning),$(null)}))))}))}}var ut=U(34829);class ft extends G.s3P{constructor(){super(...arguments),this.stars=0}getStars(){return this.stars}addStars(k){let B=k;this.currentPlayer.hasParentLinkedEmail()&&(B+=Math.ceil(B*ut.s.get("GameConstants.Battle.VALID_PARENT_EMAIL_STARS_PERCENTAGE"))),this.currentPlayer.isMember()&&(B+=Math.ceil(B*ut.s.get("GameConstants.Battle.MEMBER_STARS_PERCENTAGE"))),this.stars+=B}}(0,F.Cg)([(0,G.fFd)("CurrentPlayer"),(0,F.Sn)("design:type",Object)],ft.prototype,"currentPlayer",void 0);class bt extends G.PQK{constructor(k){super(),this.game=null,this.game=k}installBindings(){this.Container.bind("PlayerFactory").toConstantValue(new lt(this.game)),this.Container.bind("CombatBounty").toConstantValue(new ft(this.Container)),this.Container.bind("QuestionInterface").toConstantValue(new z.w(V.q.instance.prodigy.education))}}class pt extends G.JTX{constructor(){super(...arguments),this.teamID=0,this.activeMember=null,this.onActiveMemberChanged=new G.HN0,this.onDefeated=new G.HN0,this.teamMembers=[],this.onScreenSlots=[]}get ID(){return this.teamID}set ID(k){this.teamID=k}get ActiveMember(){return this.activeMember}set ActiveMember(k){this.activeMember=k,this.onActiveMemberChanged.dispatch()}get OnActiveMemberChanged(){return this.onActiveMemberChanged}get OnDefeated(){return this.onDefeated}get Members(){return this.teamMembers}get OnScreenSlots(){return this.onScreenSlots}set OnScreenSlots(k){this.onScreenSlots=k}getAvailableSlot(){for(let k=0;kB===k));this.teamMembers=this.teamMembers.filter((B=>B!==k)),B.forEach((k=>{k.DamageReceiver.OnDefeated.remove(this.teamMemberDefeated,this)}))}teamMemberDefeated(){let k=!0;for(let B=0;BB.ID===k));null!==this.teamID&&(B.OnScreenSlots=B.OnScreenSlots.filter((k=>k!==this))),this.teamID=k,B.OnScreenSlots.push(this)}}(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],vt.prototype,"battleTeams",void 0);var gt=U(34603),mt=U(95925),yt=U(85313);class _t extends G.JTX{constructor(){super(...arguments),this.font=null,this.currentText=""}setFontAttributes(k){null!==this.font&&(this.font.destroy(),this.font=null);const B=`atlas-${k.fontID}`;this.assetLoader.isLoaded(B,mt.i.Image)?this.font=new yt.B(V.q.instance.game,this.GameObject.legacyTransform.group,0,0,this.currentText,k):this.assetLoader.loadAssets([B]).then((()=>{this.setFontAttributes(k)}))}setText(k){this.currentText=k,null!==this.font&&this.font.setText(k)}destroy(){null!==this.font&&this.font.destroy(),super.destroy()}}(0,F.Cg)([(0,G.fFd)(G.t5G.AssetLoader),(0,F.Sn)("design:type",Object)],_t.prototype,"assetLoader",void 0);class Et extends G.JTX{constructor(){super(...arguments),this.tileSprite=null,this.width=0,this.height=0,this.source=null,this.frame=null}get Width(){return this.width}set Width(k){this.width=k}get Height(){return this.height}set Height(k){this.height=k}destroy(){null!==this.tileSprite&&this.tileSprite.destroy(),super.destroy()}setAsset(k,B){this.source=k,this.frame=B,this.assetLoader.isLoaded(this.source,mt.i.Image)?this.regenerateTiledTexture():this.assetLoader.loadAssets([this.source]).then((()=>{this.regenerateTiledTexture()}))}regenerateTiledTexture(){null!==this.tileSprite&&this.tileSprite.destroy(),this.tileSprite=V.q.instance.game.add.tileSprite(.5*-this.width,.5*-this.height,this.width,this.height,this.source,this.frame,this.GameObject.legacyTransform.group)}}(0,F.Cg)([(0,G.fFd)(G.t5G.AssetLoader),(0,F.Sn)("design:type",Object)],Et.prototype,"assetLoader",void 0);class wt{get OnComplete(){return this.onComplete}constructor(k=[]){this.animationClips=[],this.onComplete=new G.HN0;for(let B=0;B{this.hasFadedIn=!0})),k.onTweenComplete.addOnce((()=>{this.hasFadedOut=!0,this.onComplete.dispatch()})),B.chain(k)}hasFinishedPlaying(){return this.hasFadedIn&&this.hasFadedOut}destroy(){super.destroy()}}class St extends G.uAl{constructor(){super(...arguments),this.onComplete=new G.HN0,this.moveComplete=!1,this.fadeComplete=!1,this.moveAmount=0,this.fadeDelay=0,this.moveTime=0,this.fadeTime=0}get OnComplete(){return this.onComplete}get MoveAmount(){return this.moveAmount}set MoveAmount(k){this.moveAmount=k}get FadeDelay(){return this.fadeDelay}set FadeDelay(k){this.fadeDelay=k}get MoveTime(){return this.moveTime}set MoveTime(k){this.moveTime=k}get FadeTime(){return this.fadeTime}set FadeTime(k){this.fadeTime=k}play(){const k=this.GameObject.legacyTransform.y+this.moveAmount;V.q.instance.game.add.tween(this.GameObject.legacyTransform.group,this).to({y:k},this.moveTime,G.GS3.Quadratic.Out,!0).onTweenComplete.addOnce((()=>{this.moveComplete=!0,this.hasFinishedPlaying()&&this.onComplete.dispatch()})),V.q.instance.game.add.tween(this.GameObject.legacyTransform.group,this).to({alpha:0},this.fadeTime,G.GS3.Quadratic.Out,!0,this.fadeDelay).onTweenComplete.addOnce((()=>{this.fadeComplete=!0,this.hasFinishedPlaying()&&this.onComplete.dispatch()}))}hasFinishedPlaying(){return this.moveComplete&&this.fadeComplete}destroy(){this.onComplete.dispose(),super.destroy()}}var At=U(50118),Ct=U(88022);class Ot extends G.JTX{showStatusText(k,B){if("missed"===k.toLowerCase()){const k=new G._mx(this.GameObject);return k.name="MissedText",k.addComponent(G.K16).group.position.set(B.x,B.y),k.addComponent(G.bE_),this.createFloatingTextImage(Ct._.General_battle_json,"text-miss",k),k}if("too late"===k.toLowerCase()){const k=new G._mx(this.GameObject);return k.name="TooLateText",k.addComponent(G.K16).group.position.set(B.x,B.y),k.addComponent(G.bE_),this.createFloatingTextImage(Ct._.General_battle_json,"text-toolate",k),k}if("critical hit"===k.toLowerCase()){const k=new G._mx(this.GameObject);return k.name="CriticalHitText",k.addComponent(G.K16).group.position.set(B.x,B.y),k.addComponent(G.bE_),this.createFloatingTextImage(Ct._.General_battle_json,"text-critical-hit",k),k}}showDamageText(k,B){const U=new G._mx(this.GameObject);return U.name="DamageText",U.addComponent(G.K16).group.position.set(B.x,B.y),U.addComponent(G.bE_),this.createFloatingText(`-${k}`,12,1,44,U),U}showAttackInfo(k,B){const U=new G._mx(this.GameObject);U.name="AttackInfo",U.addComponent(G.K16).group.position.set(640,360),U.addComponent(G.bE_);const F=new G._mx(U);F.name="Background",F.addComponent(G.K16),F.legacyTransform.group.alpha=0;const j=F.addComponent(Et);j.Width=V.q.instance.game.width,j.Height=100,j.setAsset(Ct._.Tiled_sprites_json,"dialogue");const $=F.addComponent(Tt);$.FadeInAlpha=.5,$.FadeInTime=125,$.FadeOutTime=125,$.FadeOutDelay=1e3;const H=new G._mx(U);H.name="AttackLabel",H.addComponent(G.K16).group.position.set(V.q.instance.game.width/-2,-20),H.legacyTransform.group.alpha=0;const W=H.addComponent(_t);W.setFontAttributes({fontID:10,align:"center",width:V.q.instance.game.width,size:40}),W.setText(this.localizer.getText("COMBAT_ATTACK_USED",k,B));const q=H.addComponent(Tt);q.FadeInTime=125,q.FadeOutTime=125,q.FadeOutDelay=1e3;const K=U.addComponent(G.Fid);K.Identifier="Animations",K.Components=[$,q];const z=new wt([$,q]);return z.OnComplete.addOnce((()=>{U.destroy()}),this,-99),z.playAll(),U}showFloatingBanner(k){const B=V.q.instance.game.width,U=new G._mx(this.GameObject);U.name="FloatingTextBanner",U.addComponent(G.K16).group.position.set(640,380),U.addComponent(G.bE_);const F=new G._mx(U);F.name="Background",F.addComponent(G.K16),F.legacyTransform.group.alpha=0;const j=F.addComponent(Et);j.Width=B,j.Height=200,j.setAsset(Ct._.Tiled_sprites_json,"dialogue");const $=F.addComponent(Tt);$.FadeInAlpha=.5,$.FadeInTime=250,$.FadeOutTime=250,$.FadeOutDelay=2700;const H=new G._mx(U);H.name="BannerLabel",H.addComponent(G.K16).group.position.set(0,-40);const W=H.addComponent(_t);W.setFontAttributes({fontID:10,align:"center",width:B,size:80}),W.setText(k);const q=V.q.instance.game.add.tween(H.legacyTransform.group,this);q.to({x:-615},250,G.GS3.Linear.None,!1),q.to({x:-660},2700,G.GS3.Linear.None,!1),q.to({x:-B},250,G.GS3.Linear.None,!1);const K=this.GameObject.addComponent(At.a);K.Tween=q;const z=U.addComponent(G.Fid);z.Identifier="Animations",z.Components=[$,K];const Y=new wt([$,K]);return Y.OnComplete.addOnce((()=>{U.destroy()}),this,-99),Y.playAll(),U}createFloatingTextImage(k,B,U){const F=U.addComponent(gt._);F.setAsset(k,B),F.setAnchor(.5,.5),this.addFloatAnimations(U)}createFloatingText(k,B,U,F,G){const j=G.addComponent(_t);j.setFontAttributes({size:U,fontID:B,mono:F}),j.setText(k),G.legacyTransform.x-=.5*j.font.width,this.addFloatAnimations(G)}addFloatAnimations(k){const B=k.addComponent(St);B.FadeDelay=1300,B.FadeTime=200,B.MoveAmount=-100,B.MoveTime=1500,B.OnComplete.addOnce((()=>{k.destroy()}),this,-99),B.play();const U=k.addComponent(G.Fid);U.Identifier="Animations",U.Components=[B]}}(0,F.Cg)([(0,G.fFd)("Localization"),(0,F.Sn)("design:type",G.dTp)],Ot.prototype,"localizer",void 0);const It={startOverride:null,endSizeOverride:null,endOffsetOverride:{x:0,y:0},travelStraight:!0};var Dt=U(52239),Rt=U(74452),Pt=U(47315),Mt=U(93709);class Nt{constructor(k){this.game=k}animateCharacters(k,B,U,F){for(let G=0;G0){this.game.time.events.addTimer(F,this.animateCharacters.bind(this,k,B,U,0),this);break}this[k].apply(this,[U[G],B])}}damage(k,B){const U=this.game.add.tween(k,this),F=this.game.add.tween(k,this);U.to({x:k.x+5},B,Nt._customWiggle,!0,0),F.to({y:k.y+5},B,Nt._customWiggle,!0,0);const G=k.x,j=k.y;U.onTweenComplete.addOnce((()=>{k.x=G})),F.onTweenComplete.addOnce((()=>{k.y=j}))}vibrate(k,B){const U=k.x,F=k.x-5,j=k.x+5,$=100,H=Math.round((B-200)/$*.5),V=this.game.add.tween(k,this),W=this.game;V.to({x:F},$,G.GS3.Linear.None,!0).onTweenComplete.add((()=>{const B=W.add.tween(k,this);B.to({x:j},$,G.GS3.Linear.None,!1,0,H,!0),B.onTweenComplete.add((()=>{W.add.tween(k,this).to({x:U},$,G.GS3.Linear.None,!0)}))}))}}Nt._customWiggle={value:k=>{const B=k*Math.PI*6;return Math.sin(B+Math.PI*Math.random())*(1-k)}};var xt=U(29949);class Lt{get OnCharacterImpactAnimationComplete(){return this.onCharacterImpactAnimationComplete}constructor(k,B){this.numSpineInstances=0,this.onImpact=new G.HN0,this.onSpellComplete=new G.HN0,this.onLoaded=new G.HN0,this.hasLoaded=!1,this.spellCharacterAnimation=null,this._create2AnimationName="create2",this.overrideStartPosition=null,this.overrideEndSize=null,this.overrideEndOffset=null,this.travelStraight=!1,this.targetTeamSource=null,this.onCharacterImpactAnimationComplete=new G.HN0,this.game=k,this.target=B.target,this.targetTeam=B.targetTeam,this.targetFrom=B.targetFrom,this.targetTeamSource=B.targetTeamSource;const U=K.t.getItem("spell",B.spellID);this.spellDataParser=new xt.I(B.spellID),this.animationData=U.metadata.animationData,this.targetType=U.data.targetType,this.spellAssetKey=U.metadata.assets[0],this.parent=B.parent,this.spellCharacterAnimation=new Nt(k),this.overrideStartPosition=B.startOverride,this.overrideEndSize=B.endSizeOverride,this.overrideEndOffset=B.endOffsetOverride,this.travelStraight=B.travelStraight,V.q.instance.prodigy.load.assets([this.spellAssetKey],(()=>{this.onLoaded.dispatch()})),this.onLoaded.addOnce(this.instantiate,this),this.onLoaded.addOnce((()=>{this.hasLoaded=!0}),this)}getName(){return this.spellDataParser.getName()}play(){this.hasLoaded?this.create():this.onLoaded.addOnce(this.create,this)}setAnimation(k,B,U){this.animationExists(k)?(this.spineMain.setAnimationByName(0,k,B),U&&this.spineMain.onComplete.addOnce(U)):U&&U()}tweenToTarget(k){const B=this.getEndPosition(),U=this.game.add.tween(this.spineMain,this);U.to(B,this.spellDataParser.getInt("travelDuration"),this.spellDataParser.getEasing("travelEasing")),U.start(),k&&U.onTweenComplete.add(k)}animationExists(k){var B;return G.Aq$.isDefined(null===(B=this.spineMain.skeleton)||void 0===B?void 0:B.data.findAnimation(k))}getAnimationLength(k){var B,U;if(!(null===(B=this.spineMain.skeleton)||void 0===B?void 0:B.data))return G.VyI.log(`Cannot find skeleton data for ${k}`,G.$bb.Warning),0;const F=this.spineMain.skeleton.data.findAnimation(k);return null!==(U=null==F?void 0:F.duration)&&void 0!==U?U:0}getFacingAngle(){const k=this.getEndPosition(),B=this.getStartPosition();return Math.atan2(k.y-B.y,k.x-B.x)*(180/Math.PI)}destroy(){this.dimScreen(!1),this.onSpellComplete.dispatch(),this.onSpellComplete.dispose(),this.onLoaded.dispose()}spellCreate2Animation(){if(this.animationExists(this._create2AnimationName)){const k=this.getStartPosition(),B=this.makeClone(this._create2AnimationName,k.x,k.y);!0===this.spellDataParser.getValue("createRotates")&&(B.angle=this.getFacingAngle(),this.isTravellingRight()||(B.angle-=180))}}spellImpact2Animation(){if(this.animationExists("impact2")){this.numSpineInstances++;const k=()=>{this.numSpineInstances--;const k=this.getEndPosition();this.makeClone("impact2",k.x,k.y)},B=this.spellDataParser.getInt("impact2Delay");B>0?setTimeout(k,B):k()}}spellCharacterCreateAnimation(){const k=this.spellDataParser.getValue("charFromAnimation");G.Aq$.isDefined(k)&&k!==Lt._noneAnimation&&this.spellCharacterAnimation.animateCharacters(k,this.getAnimationLength(Lt._CREATEANIMATIONNAME),[this.targetFrom],0)}spellCharacterImpactAnimation(){const k=this.spellDataParser.getValue("charToAnimation"),B=this.spellDataParser.getValue("charToAnimationDelay"),U=this.spellDataParser.getValue("charToAnimationLength");k!==Lt._noneAnimation&&G.Aq$.isDefined(k)&&G.Aq$.isDefined(B)&&G.Aq$.isDefined(U)?(this.game.time.events.addTimer(B+U,(()=>{this.onCharacterImpactAnimationComplete.dispatch()}),this),this.spellCharacterAnimation.animateCharacters(k,U,this.targetType===Pt.X.Single?[this.target]:this.targetTeam,B)):this.onCharacterImpactAnimationComplete.dispatch()}makeClone(k,B,U,F=!1){const G=this.game.add.spine(B,U,this.spellAssetKey);return G.setAnimationByName(0,k,F),G.scale.x=this.isTravellingRight()?1:-1,this.numSpineInstances++,G.onDestroy.add(this.onSpineInstanceDestroy.bind(this,G)),F||G.onComplete.add((()=>{G.pendingDestroy=!0})),G}onSpineInstanceDestroy(k){k.renderable=!1,k.parent&&k.parent.removeChild(k),this.numSpineInstances--,this.numSpineInstances<=0&&this.destroy()}getStartPosition(){const k=this.isTravellingRight()?1:-1,B={x:this.targetFrom.x,y:this.targetFrom.y};if(null!==this.overrideStartPosition)B.x+=this.overrideStartPosition.x,B.y+=this.overrideStartPosition.y;else{const U=this.targetFrom;B.x+=Math.round(.5*U.getHitboxWidth()*k),B.y-=Math.round(.5*U.getHitboxHeight()),U instanceof Mt.H&&(B.x=820,B.y=450)}const U=this.animationData.createLocation;return U&&(B.x+=j.defaultTo(U.createOffsetX,0)*k,B.y+=j.defaultTo(U.createOffsetY,0)),B}getEndPosition(){const k=this.animationData.impactLocation;if(null!==this.overrideEndSize){const B={x:this.target.x+this.overrideEndOffset.x,y:this.target.y+this.overrideEndOffset.y};let U=k.impactx*this.overrideEndSize.x,F=k.impacty*this.overrideEndSize.y;return F-=Math.round(.5*this.overrideEndSize.y),this.target.x<=640&&(U*=-1),B.x+=U,B.y+=F,this.travelStraight&&this.animationData.travelStraight&&(B.y=this.getStartPosition().y),B}{let B=.5,U=.5,F=0,G=0;k&&(B=j.defaultTo(k.impactx,B),U=j.defaultTo(k.impacty,U),F=j.defaultTo(k.offsetx,F),G=j.defaultTo(k.offsety,G));const $=this.target,H=this.calculateHitboxPoint($.x,$.getHitboxLeft(),$.getHitboxWidth(),B,F,!this.isTravellingRight());let V;return V=this.travelStraight&&this.animationData.travelStraight?this.getStartPosition().y:this.calculateHitboxPoint($.y,$.getHitboxTop(),$.getHitboxHeight(),U,G,!1),{x:H,y:V}}}calculateHitboxPoint(k,B,U,F,G=0,j=!1){let $=F,H=G;return j&&($=1-$,H=-H),k+B+U*$+H}dimScreen(k){if(k){this.dimOverlay=this.game.add.graphics(0,0),this.game.state.getCurrentState().groupDim.addChild(this.dimOverlay),this.dimOverlay.beginFill(0,1),this.dimOverlay.drawRect(0,0,this.game.width,this.game.height),this.dimOverlay.endFill(),this.dimOverlay.alpha=0;this.game.add.tween(this.dimOverlay,this).to({alpha:.4},300,G.GS3.Linear.None,!0)}else if(this.dimOverlay){this.game.add.tween(this.dimOverlay,this).to({alpha:0},300,G.GS3.Linear.None,!0)}}isTravellingRight(){return this.targetFrom.x<=640}instantiate(){this.spineMain=V.q.instance.prodigy.create.spine(0,0,this.spellAssetKey,this.parent),this.addToProperLayer(this.spineMain),this.spineMain.visible=!1,this.spineMain.onDestroy.add(this.onSpineInstanceDestroy.bind(this,this.spineMain)),this.numSpineInstances++}addToProperLayer(k){const B=this.game.state.getCurrentState();switch(this.targetTeamSource?this.targetTeamSource.getTeamPositionForContainer(this.target):this.targetTeam.indexOf(this.target)){case Rt.I.Front:B.groupFront.addChild(k);break;case Rt.I.Back:B.groupMiddle.addChildAt(k,0);break;case Rt.I.Middle:default:B.groupMiddle.addChild(k)}}create(){!0===this.spellDataParser.getValue("screenDim")&&this.dimScreen(!0);const k=this.getStartPosition();this.spineMain.position.set(k.x,k.y),this.spineMain.visible=!0,this.spellCharacterCreateAnimation()}impact(){this.spellCharacterImpactAnimation();const k=this.spellDataParser.getValue("charToAnimationDelay");G.Aq$.isDefined(k)&&k>0?this.game.time.events.addTimer(k,this.onImpact.dispatch,this.onImpact):this.onImpact.dispatch()}}Lt._CREATEANIMATIONNAME="create",Lt._noneAnimation="none";class kt extends Lt{getCreateDuration(){const k=G.E3R.getAnimationEventTime(this.spineMain,Lt._CREATEANIMATIONNAME,"cast");return k<0?this.getAnimationLength(Lt._CREATEANIMATIONNAME):k}create(){super.create(),this.spellCreate2Animation(),this.animationExists(Lt._CREATEANIMATIONNAME)?(this.isTravellingRight()||(this.spineMain.scale.x*=-1),this.spellDataParser.getValue("createRotates")&&(this.spineMain.angle=this.getFacingAngle(),this.isTravellingRight()||(this.spineMain.angle-=180)),this.setAnimation(Lt._CREATEANIMATIONNAME,!1,(()=>{setTimeout(this.travel.bind(this))}))):this.travel()}travel(){this.animationExists("travel")&&this.getAnimationLength("travel")>0?(this.spellDataParser.getValue("travelRotates")&&(this.spineMain.angle=this.getFacingAngle(),this.isTravellingRight()||(this.spineMain.angle-=180)),this.isTravellingRight()||(this.spineMain.scale.x=-1),this.setAnimation("travel",!0),this.tweenToTarget(this.impact.bind(this))):(this.spineMain.x=this.getEndPosition().x,this.spineMain.y=this.getEndPosition().y,this.impact())}impact(){super.impact(),this.animationExists("impact")?(this.spellDataParser.getValue("impactRotates")&&(this.spineMain.angle=this.getFacingAngle(),this.isTravellingRight()||(this.spineMain.angle-=180)),this.doLayeredAnimation("impact"),this.setAnimation("impact",!1,(()=>{this.spineMain.pendingDestroy=!0})),this.spellImpact2Animation()):(this.doLayeredAnimation("impact"),this.spellImpact2Animation(),this.spineMain.pendingDestroy=!0)}doLayeredAnimation(k){const B=this.game.state.getCurrentState();let U,F=this.targetTeam.indexOf(this.target);if(this.targetTeamSource){const k=this.targetTeamSource.team.find((k=>G.cj9.fuzzyEqual(k.x,this.target.x)&&G.cj9.fuzzyEqual(k.y,this.target.y)));k&&(F=this.targetTeamSource.getTeamPositionForContainer(k))}switch(F){case Rt.I.Middle:U=[B.groupFront,B.groupMiddle,B.groupBack];break;case Rt.I.Back:U=[B.groupMiddle,B.groupBack,B.groupFarBack];break;case Rt.I.Front:U=[B.groupFarFront,B.groupFront,B.groupMiddle]}const j=this.getEndPosition();for(let G=0;G{F.pendingDestroy=!0}))}else G.VyI.log(`Unsupported cast animation type: ${B.type}`,G.$bb.Warning)}}class Ft extends Lt{constructor(){super(...arguments),this.mask=null,this.beamGroup=null,this.startLocation=null,this.endLocation=null,this.distanceBetweenPoints=0,this.spineCap=null,this.spineSummon=null,this.animationWidth=1}getCreateDuration(){const k=G.E3R.getAnimationEventTime(this.spineMain,"Summon-create","cast");return k<0?this.getAnimationLength("Summon-create"):k}create(){super.create(),this.startLocation=this.getStartPosition(),this.endLocation=this.getEndPosition(),this.makeGroup(),this.setAnimation("beam-travel",!0),this.makeMask(),this.stretchBetweenPoints(),this.summonCreate(),this.capCreate(),this.doTween(),this.beamGroup.updateTransform(),this.beamGroup.angle=this.getFacingAngle()}stretchBetweenPoints(){this.distanceBetweenPoints=G.cj9.distance(this.startLocation.x,this.startLocation.y,this.endLocation.x,this.endLocation.y),this.beamGroup.scale.x=this.distanceBetweenPoints/this.animationWidth}makeGroup(){this.beamGroup=V.q.instance.prodigy.create.group(),this.beamGroup.pivot.y=.5,this.beamGroup.x=this.startLocation.x,this.beamGroup.y=this.startLocation.y,this.addToProperLayer(this.beamGroup)}makeMask(){this.beamGroup.addChild(this.spineMain),this.animationWidth=this.beamGroup.width;const k=this.animationWidth;this.mask=this.game.add.graphics(0,0),this.mask.beginFill(16777215),this.mask.drawRect(0,-100,k,200),this.mask.endFill(),this.mask.scale.x=.001,this.beamGroup.addChild(this.mask),this.spineMain.x=0,this.spineMain.y=0,this.spineMain.mask=this.mask}capCreate(){this.spineCap=this.makeClone("cap-impact",0,0,!0),this.spineCap.scale.x=this.spineCap.scale.y=.5,this.beamGroup.addChild(this.spineCap)}capImpact(){this.spineCap.scale.x=this.spineCap.scale.y=1,this.impact(),this.game.time.events.addTimer(this.spellDataParser.getInt("sustainDuration"),this.doEnd,this)}capEnd(){this.spineCap.setAnimationByName(0,"cap-end",!1),this.spineCap.setToSetupPose()}beamEnd(){this.setAnimation("beam-end",!0)}summonCreate(){this.spellCharacterCreateAnimation(),this.spineSummon=this.makeClone("summon-create",0,0),this.beamGroup.addChild(this.spineSummon),this.spineSummon.onComplete.add(this.summonTravel,this)}summonTravel(){this.spineSummon.pendingDestroy=!0,this.spineSummon=this.makeClone("summon-travel",0,0,!0),this.beamGroup.addChild(this.spineSummon)}summonEnd(){this.spineSummon.pendingDestroy=!0,this.spineSummon=this.makeClone("summon-end",0,0),this.beamGroup.addChild(this.spineSummon)}doTween(){const k=this.spellDataParser.getInt("travelDuration"),B=this.spellDataParser.getEasing("travelEasing"),U=this.spellDataParser.getInt("createBeamDelay");this.game.add.tween(this.mask.scale,this).to({x:1},k,B,!0,U,0),this.game.add.tween(this.spineCap,this).to({x:this.animationWidth},k,B,!0,U,0).onTweenComplete.add(this.capImpact.bind(this))}doEnd(){this.summonEnd(),this.capEnd(),this.beamEnd();const k=this.spellDataParser.getInt("endDuration"),B=this.spellDataParser.getEasing("endEasing");let U=this.spellDataParser.getValue("endingMask");G.Aq$.isDefined(U)||(U=!0),U?this.game.add.tween(this.spineMain,this).to({x:this.animationWidth+10},k,B,!0).onTweenComplete.add(this.doneEverything.bind(this)):this.game.time.events.addTimer(k,this.doneEverything,this)}doneEverything(){this.spineSummon.pendingDestroy=!0,this.spineCap.pendingDestroy=!0,this.spineMain.pendingDestroy=!0}travel(){}destroy(){super.destroy(),this.mask.destroy(),this.beamGroup.destroy(),this.spineSummon.destroy(),this.spineCap.destroy()}}class Gt{static makeSpell(k,B){const U=K.t.getItem("spell",B.spellID).metadata.animationData.animationType;return j.defaults(B,It),U===Dt.i.projectile?new kt(k,B):U===Dt.i.aoe?new Bt(k,B):U===Dt.i.beam?new Ft(k,B):U===Dt.i.aoa?new Ut(k,B):(G.VyI.log(`No spell of type ${U} supported!`,G.$bb.Verbose),null)}}class jt{get OnStart(){return this.onStart}get OnImpact(){return this.onImpact}get OnEnd(){return this.onEnd}get OnComplete(){return this.onComplete}get Name(){return this.name}constructor(k,B,U,F,j){this.onStart=new G.HN0,this.onImpact=new G.HN0,this.onEnd=new G.HN0,this.onComplete=new G.HN0,this.name="",this.game=null,this.parent=null,this.spellID=null,this.from=null,this.to=null,this.game=k,this.parent=B,this.spellID=U,this.from=F,this.to=j}cast(){if(K.t.getItem("spell",this.spellID).metadata.animationData.animationType===Dt.i.beam){const k={x:this.to.x,y:this.to.y},B=Gt.makeSpell(this.game,{parent:this.parent.legacyTransform.group,spellID:this.spellID,targetFrom:{x:this.from.x,y:this.from.y},target:k,targetTeam:[k],targetTeamSource:null,castingTeam:[],startOverride:{x:0,y:0},endSizeOverride:{x:0,y:0},endOffsetOverride:{x:0,y:0}});this.name=B.getName(),B.play(),B.onLoaded.addOnce((()=>{this.onStart.dispatch()})),B.onImpact.addOnce((()=>{this.onImpact.dispatch()})),B.onSpellComplete.addOnce((()=>{this.destroy()}))}else this.destroy()}destroy(){this.onComplete.dispatch(),this.onEnd.dispatch(),this.onStart.dispose(),this.onImpact.dispose(),this.onEnd.dispose(),this.onComplete.dispose()}}class $t{get OnStart(){return this.onStart}get OnImpact(){return this.onImpact}get OnEnd(){return this.onEnd}get OnComplete(){return this.onComplete}get Name(){return this.name}constructor(k,B,U,F,j){this.onStart=new G.HN0,this.onImpact=new G.HN0,this.onEnd=new G.HN0,this.onComplete=new G.HN0,this.name="",this.game=null,this.parent=null,this.spellID=null,this.originMember=null,this.targetMembers=null,this.spellCompleted=!1,this.impactAnimationCompleted=!1,this.game=k,this.parent=B,this.spellID=U,this.originMember=F,this.targetMembers=j,this.name=K.t.getItem("spell",this.spellID).data.name}cast(){const k=Gt.makeSpell(this.game,{parent:this.parent.legacyTransform.group,spellID:this.spellID,targetFrom:this.originMember.GameObject.legacyTransform.group,target:this.targetMembers[0].GameObject.legacyTransform.group,targetTeamSource:null,targetTeam:this.targetMembers.map((k=>k.GameObject.legacyTransform.group)),castingTeam:[],startOverride:this.originMember.CastPoint,endSizeOverride:this.targetMembers[0].ImpactSize,endOffsetOverride:this.targetMembers[0].ImpactOffset});k.play(),k.onLoaded.addOnce((()=>{this.onStart.dispatch()})),k.onImpact.addOnce((()=>{this.onImpact.dispatch()})),k.onSpellComplete.addOnce((()=>{this.spellCompleted=!0,this.onComplete.dispatch(),this.checkSpellEnd()})),k.OnCharacterImpactAnimationComplete.addOnce((()=>{this.impactAnimationCompleted=!0,this.checkSpellEnd()}))}checkSpellEnd(){this.spellCompleted&&this.impactAnimationCompleted&&this.onEnd.dispatch()}}class Ht extends G.uAl{constructor(){super(...arguments),this.game=null,this.battleContent=null}get Game(){return this.game}set Game(k){this.game=k}get BattleContent(){return this.battleContent}set BattleContent(k){this.battleContent=k}createSpell(k,B,U){return new $t(this.game,this.battleContent,k,B,U)}createBeam(k,B,U){return new jt(this.game,this.battleContent,k,B,U)}}class Vt extends G.JTX{constructor(){super(...arguments),this.activePlayerName=null,this.isAnimating=!1,this.battleHealth=null,this.battleTeam=null}get TeamID(){return null!==this.battleTeam?this.battleTeam.ID:null}set TeamID(k){this.battleTeam=j.find(this.battleTeams,(B=>B.ID===k)),this.battleTeam&&(this.battleTeam.OnActiveMemberChanged.add(this.activeMemberChanged,this),this.battleTeam.ActiveMember&&this.activeMemberChanged())}get NameLabel(){return this.activePlayerName}set NameLabel(k){this.activePlayerName=k,this.updateNameLabel()}get IsAnimating(){return this.isAnimating}set IsAnimating(k){this.isAnimating=k}get SlideInAnimation(){return this.slideInAnimation}get SlideOutAnimation(){return this.slideOutAnimation}create(){super.create(),this.nameProvider.OnChanged.add(this.updateNameLabel,this)}destroy(){this.battleTeam&&this.battleTeam.OnActiveMemberChanged.remove(this.activeMemberChanged,this),this.battleHealth&&this.battleHealth.OnHealthChanged.remove(this.healthChanged,this),this.nameProvider.OnChanged.remove(this.updateNameLabel,this),super.destroy()}updateNameLabel(){this.activePlayerName.setText(this.nameProvider.getName())}healthChanged(){this.isAnimating=!0,this.healthBar.OnHealthChangeComplete.addOnce((()=>{this.isAnimating=!1})),this.healthBar.setCurrentHealth(this.battleHealth.CurrentValue)}activeMemberChanged(){null!==this.slideInAnimation&&null!==this.slideOutAnimation?(this.slideOutAnimation.OnComplete.addOnce((()=>{this.updateActiveMember(),this.slideInAnimation.play()})),this.slideOutAnimation.play()):this.updateActiveMember()}updateActiveMember(){null!==this.battleHealth&&this.battleHealth.OnHealthChanged.remove(this.healthChanged,this),this.battleHealth=this.battleTeam.ActiveMember.Health,this.battleHealth.OnHealthChanged.add(this.healthChanged,this),this.healthBar.setMaxHealth(this.battleHealth.InitialValue),this.healthBar.setCurrentHealth(this.battleHealth.CurrentValue)}}(0,F.Cg)([(0,G.fFd)("SlideInHealthBar"),(0,F.Sn)("design:type",Object)],Vt.prototype,"slideInAnimation",void 0),(0,F.Cg)([(0,G.fFd)("SlideOutHealthBar"),(0,F.Sn)("design:type",Object)],Vt.prototype,"slideOutAnimation",void 0),(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],Vt.prototype,"battleTeams",void 0),(0,F.Cg)([(0,G.fFd)("HealthBar"),(0,F.Sn)("design:type",Object)],Vt.prototype,"healthBar",void 0),(0,F.Cg)([(0,G.fFd)("Name"),(0,F.Sn)("design:type",Object)],Vt.prototype,"nameProvider",void 0);var Wt=U(87490),qt=U(32389),Kt=U(76277);class zt extends G.uAl{constructor(){super(...arguments),this.onChanged=new G.HN0,this._firstNameID=0,this._middleNameID=0,this._lastNameID=0,this._nicknameID=0}get OnChanged(){return this.onChanged}get firstNameID(){return this._firstNameID}set firstNameID(k){this._firstNameID=k}get middleNameID(){return this._middleNameID}set middleNameID(k){this._middleNameID=k}get lastNameID(){return this._lastNameID}set lastNameID(k){this._lastNameID=k}get nicknameID(){return this._nicknameID}set nicknameID(k){this._nicknameID=k}getName(){return G.Aq$.isDefined(this._nicknameID)&&0!==this._nicknameID?K.t.getItem("nickname",this._nicknameID).data.value.replace("{first}",K.t.getItem("name",this._firstNameID).data.value).replace("{middle}",K.t.getItem("name",this._middleNameID).data.value).replace("{last}",K.t.getItem("name",this._lastNameID).data.value):this.getFullName()}getFullName(){var k;const B=null===(k=K.t.getItem("name",this._firstNameID))||void 0===k?void 0:k.data.value;if(G.Aq$.isDefined(B)){if(G.Aq$.isDefined(this._middleNameID)&&G.Aq$.isDefined(this._lastNameID)){const k=`${K.t.getItem("name",this._middleNameID).data.value}${K.t.getItem("name",this._lastNameID).data.value}`;return`${B} ${j.capitalize(k)}`}return B}return V.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("FALLBACK_NAME_WIZARD")}destroy(){this.onChanged.dispose(),super.destroy()}}var Yt=U(79687);let Qt=class{constructor(){this.onQueueComplete=new G.HN0,this.actions=[],this.isActionQueuePlaying=!1}get OnQueueComplete(){return this.onQueueComplete}get Actions(){return this.actions}get IsActionQueuePlaying(){return this.isActionQueuePlaying}playAllActions(){this.isActionQueuePlaying||(this.isActionQueuePlaying=!0,this.runNextAction())}addAction(k){this.actions.push(k)}hasQueuedActions(){return this.actions.length>0}runNextAction(){const k=this.actions[0];k.OnComplete.addOnce((()=>{this.actions.shift(),this.actions.length>0?this.runNextAction():(this.isActionQueuePlaying=!1,this.onQueueComplete.dispatch())})),k.run()}};Qt=(0,F.Cg)([(0,Yt.injectable)()],Qt);class Xt{constructor(){this.onComplete=new G.HN0}get OnComplete(){return this.onComplete}}var Zt=U(8693);class Jt extends Xt{constructor(k,B,U,F){super(),this.player=null,this.crystal=null,this.battleUIFactory=null,this.audioPlayer=null,this.player=k,this.crystal=B,this.battleUIFactory=U,this.audioPlayer=F}run(){this.audioPlayer.playSoundEffectClip(8,Zt.J.Cast);const k=this.player.AttackAnimationState;null!==k&&(k.OnComplete.addOnce((()=>{const k=this.player.IdleAnimationState;null!==k&&k.play(),this.audioPlayer.playSoundEffectClip(8,Zt.J.Miss);let B=this.battleUIFactory.showStatusText("too late",{x:this.crystal.GameObject.legacyTransform.x,y:this.crystal.GameObject.legacyTransform.y-80}).findComponent(G.bE_).getInjectedValue("Animations");Array.isArray(B)||(B=[B]);new wt(B).OnComplete.addOnce(this.onComplete.dispatch,this.onComplete)})),k.play())}}class te extends Xt{get DamageAmount(){return this.damage}constructor(k,B,U,F,G,j,$,H){super(),this.spellFactory=null,this.spellSource=null,this.spellTarget=null,this.spellID=null,this.crystal=null,this.battleUIFactory=null,this.audioPlayer=null,this.damage=null,this.spellFactory=U,this.spellSource=k,this.spellTarget=B,this.spellID=G,this.crystal=j,this.battleUIFactory=$,this.audioPlayer=H,this.damage=F}run(){const k=this.spellFactory.createSpell(this.spellID,this.crystal,[this.spellTarget]);null!==this.spellSource.AttackAnimationState&&(this.spellSource.AttackAnimationState.OnComplete.addOnce((()=>{this.spellSource.IdleAnimationState.play()})),this.audioPlayer.playSoundEffectClip(8,Zt.J.Cast),this.spellSource.AttackAnimationState.play()),null!==this.spellTarget.TakeDamageAnimationState&&k.OnImpact.addOnce((()=>{this.audioPlayer.playSoundEffectClip(8,Zt.J.Hit),this.spellTarget.TakeDamageAnimationState.play(),this.spellTarget.DamageReceiver.applyDamage(this.damage),this.damage=0})),k.OnStart.addOnce((()=>{this.battleUIFactory.showAttackInfo(this.spellSource.NameProvider.getName(),k.Name)})),k.OnComplete.addOnce((()=>{this.onComplete.dispatch()})),setTimeout((()=>{const B=this.spellFactory.createBeam(89,{x:this.spellSource.GameObject.transform.localPosition.x+this.spellSource.CastPoint.x,y:this.spellSource.GameObject.transform.localPosition.y+this.spellSource.CastPoint.y},{x:this.crystal.GameObject.legacyTransform.x-20,y:this.crystal.GameObject.legacyTransform.y-40});B.OnImpact.addOnce((()=>{k.cast(),null!==this.crystal.AttackAnimationState&&(this.crystal.AttackAnimationState.OnComplete.addOnce(this.crystal.IdleAnimationState.play,this.crystal.IdleAnimationState),this.crystal.AttackAnimationState.play())})),B.cast()}),te.BEAM_DELAY_MS)}}te.BEAM_DELAY_MS=800;var ee=U(63693);class ie extends Xt{get Target(){return this.targetTeamMember}get DamageAmount(){return this.damage}constructor(k,B,U,F,G,j,$){super(),this.sourceTeamMember=null,this.targetTeamMember=null,this.spellFactory=null,this.spellID=null,this.battleUIFactory=null,this.audioPlayer=null,this.damage=null,this.targetTeamMember=B,this.sourceTeamMember=k,this.spellFactory=U,this.spellID=G,this.battleUIFactory=j,this.audioPlayer=$,this.damage=F}run(){const k=this.spellFactory.createSpell(this.spellID,this.sourceTeamMember,[this.targetTeamMember]),B=this.sourceTeamMember.AttackAnimationState;null!==B&&k.OnStart.addOnce((()=>{B.play(),this.audioPlayer.playSoundEffectClip(8,Zt.J.Cast),B.OnComplete.addOnce(this.returnToIdle,this,0,this.sourceTeamMember)})),k.OnImpact.addOnce((()=>{this.applyDamage(),this.audioPlayer.playSoundEffectClip(8,Zt.J.Hit)})),k.OnEnd.addOnce((()=>{this.onComplete.dispatch()})),k.cast(),this.battleUIFactory.showAttackInfo(this.sourceTeamMember.NameProvider.getName(),k.Name),this.trackSpellEvent(k)}trackSpellEvent(k){const B=K.t.getItem("spell",this.spellID);V.q.instance.prodigy.gameContainer.get("c47-20b6").battle.sendBattleSpellCastEvent({team:ee.B1.Player,spell_name:k.Name,spell_type:B.data.type,spell_level:B.data.level,spell_damage:this.damage,caster_name:this.sourceTeamMember.NameProvider.getName(),caster_level:this.sourceTeamMember.Level,target_name:this.targetTeamMember.NameProvider.getName(),target_type:this.targetTeamMember.Element,target_level:this.targetTeamMember.Level,target_health:this.targetTeamMember.Health.CurrentValue,energy_cost:B.data.energyCost,duration:void 0,success:!0})}applyDamage(){this.targetTeamMember.DamageReceiver.applyDamage(this.damage),this.damage=0;const k=this.targetTeamMember.TakeDamageAnimationState;null!==k?(k.OnComplete.addOnce((()=>{this.returnToIdle(this.targetTeamMember)})),k.play()):this.onComplete.dispatch()}returnToIdle(k){const B=k.IdleAnimationState;null!==B&&B.play()}}var se=U(89360);class ne extends Xt{constructor(k,B,U,F,G){super(),this.battleTeams=null,this.spellFactory=null,this.timer=null,this.endDelay=0,this.audioPlayer=null,this.battleTeams=k,this.spellFactory=B,this.timer=U,this.endDelay=F,this.audioPlayer=G}run(){const k=j.find(this.battleTeams,(k=>0===k.ID)),B=j.find(this.battleTeams,(k=>1===k.ID)),U=this.spellFactory.createSpell(73,B.ActiveMember,[k.ActiveMember]);U.OnImpact.addOnce((()=>{k.ActiveMember.DamageReceiver.applyDamage(k.ActiveMember.Health.CurrentValue),k.ActiveMember.DefeatAnimationState.OnComplete.addOnce(this.timer.addTimer,this.timer,0,this.endDelay,this.onComplete.dispatch,this.onComplete),k.ActiveMember.DefeatAnimationState.play(),this.audioPlayer.playSoundEffectClip(8,Zt.J.Hit)}));const F=B.ActiveMember.AttackAnimationState,$=B.ActiveMember.IdleAnimationState;F.OnComplete.addOnce((()=>{$.play()})),F.play(),U.cast(),this.audioPlayer.playSoundEffectClip(8,Zt.J.Cast),V.q.instance.prodigy.gameContainer.get("0f1-c356").onWeeklyChallengeBattleEnd("TitanBattle").then((()=>{se.h.instance.updateData()})).catch((k=>{G.VyI.log(`BattleStats update failed at titan co-op battle end: ${G.RQr.stringify(k)}`,G.$bb.Warning)}))}}class ae{get OnComplete(){return this.onComplete}constructor(k){this.onComplete=new G.HN0,this.spell=null,this.hasCompleted=!1,this.spell=k,this.spell.OnComplete.addOnce((()=>{this.hasCompleted=!0,this.onComplete.dispatch()}))}play(){this.spell.cast()}hasFinishedPlaying(){return this.hasCompleted}}class re extends Xt{constructor(k,B,U,F,G){super(),this.battleTeams=null,this.spellFactory=null,this.timer=null,this.audioPlayer=null,this.battleUIFactory=null,this.battleTeams=k,this.spellFactory=B,this.timer=U,this.audioPlayer=F,this.battleUIFactory=G}run(){const k=j.find(this.battleTeams,(k=>0===k.ID)),B=k.ActiveMember,U=k.Members,F=new wt;for(let G=0;G{F.playAll()}),te.BEAM_DELAY_MS),V.q.instance.prodigy.gameContainer.get("0f1-c356").onWeeklyChallengeBattleEnd("TitanBattle").then((()=>{se.h.instance.updateData()})).catch((k=>{G.VyI.log(`BattleStats update failed at titan co-op battle end: ${G.RQr.stringify(k)}`,G.$bb.Warning)}))}onPartialBeamsComplete(){const k=j.find(this.battleTeams,(k=>0===k.ID)),B=j.find(this.battleTeams,(k=>1===k.ID)),U=k.ActiveMember,F=this.spellFactory.createSpell(90,U,[B.ActiveMember]);F.OnImpact.addOnce((()=>{B.ActiveMember.DamageReceiver.applyDamage(B.ActiveMember.Health.CurrentValue),this.audioPlayer.playSoundEffectClip(8,Zt.J.CriticalHit),this.showDamage()})),F.OnComplete.addOnce((()=>{const k=B.ActiveMember.DefeatAnimationState;null!==k&&k.play()}));const G=k.ActiveMember.getInjectedValue("Animators");G.OnAnimationComplete.addOnce((()=>{U.IdleAnimationState.play()})),G.playAnimation("teamattack",!1),this.timer.addTimer(1e3,F.cast,F)}returnToIdle(k){null!==k.IdleAnimationState&&k.IdleAnimationState.play()}showDamage(){const k=j.find(this.battleTeams,(k=>1===k.ID)).ActiveMember;let B=this.battleUIFactory.showDamageText(9999,{x:k.GameObject.legacyTransform.x+k.ImpactOffset.x,y:k.GameObject.legacyTransform.y-70}).findComponent(G.bE_).getInjectedValue("Animations");Array.isArray(B)||(B=[B]);new wt(B).OnComplete.addOnce(this.showCriticalHit,this)}showCriticalHit(){const k=j.find(this.battleTeams,(k=>1===k.ID)).ActiveMember;let B=this.battleUIFactory.showStatusText("critical hit",{x:k.GameObject.legacyTransform.x+k.ImpactOffset.x,y:k.GameObject.legacyTransform.y-70}).findComponent(G.bE_).getInjectedValue("Animations");Array.isArray(B)||(B=[B]);new wt(B).OnComplete.addOnce(this.onComplete.dispatch,this.onComplete)}}class oe extends G.JTX{getRemainingTitanHP(){if(j.findIndex(this.actionQueue.Actions,(k=>k instanceof re))>-1)return 0;{const k=j.find(this.teams,(k=>1===k.ID)),B=j.filter(this.actionQueue.Actions,(k=>k instanceof te));let U=0;for(let F=0;Fk instanceof ne))>-1)return 0;{const k=j.find(this.teams,(k=>0===k.ID)),B=j.filter(this.actionQueue.Actions,(k=>k instanceof ie));let U=0;for(let F=0;F0===k.ID)).ActiveMember,this.battleUI,this.audioPlayer))}}(0,F.Cg)([(0,G.fFd)("QuestionInterface"),(0,F.Sn)("design:type",Object)],he.prototype,"questionInterface",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamInfo"),(0,F.Sn)("design:type",oe)],he.prototype,"teamInfo",void 0),(0,F.Cg)([(0,G.fFd)("BattleActionQueue"),(0,F.Sn)("design:type",Qt)],he.prototype,"actionQueue",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamMember"),(0,F.Sn)("design:type",rt)],he.prototype,"teamMember",void 0),(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],he.prototype,"teams",void 0),(0,F.Cg)([(0,G.fFd)("BattleUIFactory"),(0,F.Sn)("design:type",Object)],he.prototype,"battleUI",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],he.prototype,"audioPlayer",void 0);var ce=U(48129),de=U(79422),le=U(35564);class ue extends Xt{constructor(k,B,U,F,G,j,$){super(),this.spellFactory=null,this.spellSource=null,this.spellTarget=null,this.spellID=null,this.crystal=null,this.battleUIFactory=null,this.audioPlayer=null,this.spellFactory=U,this.spellSource=k,this.spellTarget=B,this.spellID=F,this.crystal=G,this.battleUIFactory=j,this.audioPlayer=$}run(){const k=this.spellFactory.createSpell(this.spellID,this.crystal,[this.spellTarget]);null!==this.spellSource.AttackAnimationState&&(this.spellSource.AttackAnimationState.OnComplete.addOnce((()=>{this.spellSource.IdleAnimationState.play()})),this.spellSource.AttackAnimationState.play(),this.audioPlayer.playSoundEffectClip(8,Zt.J.Cast)),k.OnImpact.addOnce((()=>{let B=this.battleUIFactory.showStatusText("missed",{x:this.spellTarget.GameObject.legacyTransform.x+this.spellTarget.ImpactOffset.x,y:this.spellTarget.GameObject.legacyTransform.y-50}).findComponent(G.bE_).getInjectedValue("Animations");Array.isArray(B)||(B=[B]),B.push(new ae(k));new wt(B).OnComplete.addOnce((()=>{this.onComplete.dispatch()})),this.audioPlayer.playSoundEffectClip(8,Zt.J.Miss)})),k.OnStart.addOnce((()=>{this.battleUIFactory.showAttackInfo(this.spellSource.NameProvider.getName(),k.Name)})),setTimeout((()=>{const B=this.spellFactory.createBeam(89,{x:this.spellSource.GameObject.transform.localPosition.x+this.spellSource.CastPoint.x,y:this.spellSource.GameObject.transform.localPosition.y+this.spellSource.CastPoint.y},{x:this.crystal.GameObject.legacyTransform.x-20,y:this.crystal.GameObject.legacyTransform.y-40});B.OnImpact.addOnce((()=>{k.cast(),null!==this.crystal.AttackAnimationState&&(this.crystal.AttackAnimationState.OnComplete.addOnce(this.crystal.IdleAnimationState.play,this.crystal.IdleAnimationState),this.crystal.AttackAnimationState.play())})),B.cast()}),te.BEAM_DELAY_MS)}}class fe extends ce.${constructor(){super(...arguments),this.listeningUserID=null}get UserID(){return this.listeningUserID}set UserID(k){this.listeningUserID=k}receivedMessage(k){if(k.action!==le.x.PlayerAttacked||k.data.sourcePlayerID!==this.listeningUserID)return;const B=j.find(this.battleTeams,(k=>0===k.ID)),U=j.find(this.battleTeams,(k=>1===k.ID));this.coOpSocketLogger.logMessage(`Receiving attack message for player with ID ${this.listeningUserID} and name ${this.battleTeamMember.NameProvider.getName()}\n \nAttack missed? ${k.data.missed?"YES":"NO"}. Host sending titan HP as ${k.data.titanHealth}`),k.data.missed?this.battleActionQueue.addAction(new ue(this.battleTeamMember,U.ActiveMember,this.spellFactory,k.data.spellID,B.ActiveMember,this.battleUIFactory,this.audioPlayer)):this.battleActionQueue.addAction(new te(this.battleTeamMember,U.ActiveMember,this.spellFactory,k.data.damage,k.data.spellID,B.ActiveMember,this.battleUIFactory,this.audioPlayer))}}(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],fe.prototype,"battleTeams",void 0),(0,F.Cg)([(0,G.fFd)("BattleActionQueue"),(0,F.Sn)("design:type",Qt)],fe.prototype,"battleActionQueue",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamMember"),(0,F.Sn)("design:type",rt)],fe.prototype,"battleTeamMember",void 0),(0,F.Cg)([(0,G.fFd)("SpellFactory"),(0,F.Sn)("design:type",Object)],fe.prototype,"spellFactory",void 0),(0,F.Cg)([(0,G.fFd)("BattleUIFactory"),(0,F.Sn)("design:type",Object)],fe.prototype,"battleUIFactory",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],fe.prototype,"audioPlayer",void 0),(0,F.Cg)([(0,G.fFd)("CoOpSocketLogging"),(0,F.Sn)("design:type",de.h)],fe.prototype,"coOpSocketLogger",void 0);class be{constructor(k){this.container=null,this.container=k}createCoOpTeam(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U;const F=[];F.push(yield this.createPlayer({appearance:k.getAppearance(),chargedLevelData:k.getChargedLevelData(),userID:k.getUserID(),level:k.player.data.level,firstName:k.getFirstName(),middleName:k.getMiddleName(),lastName:k.getLastName(),nickname:k.getNickname(),playerTransformation:k.player.getPlayerData().playerTransformation})),F[0].addComponent(he);const G=(0,Kt.G)(qt.q).enabled;for(let k=0;k0===k.ID)),$=yield B.createPlayer(k.appearance,F,k.playerTransformation,k.chargedLevelData);$.name="Player";const H=$.findComponent(G.bE_),V=F.GameObject.findComponent(G.bE_);H.Container.bind("DamageReceiver").toConstantValue(V.getInjectedValue("DamageReceiver")),H.Container.bind("Health").toConstantValue(V.getInjectedValue("Health")),$.findComponent(rt).BattleTeam=F;$.addComponent(fe).UserID=k.userID;const W=$.addComponent(zt);return W.firstNameID=k.firstName,W.middleNameID=k.middleName,W.lastNameID=k.lastName,W.nicknameID=k.nickname,H.Container.bind("Name").toConstantValue(W),H.Container.bind("Level").toConstantValue(k.level),H.Container.bind("Element").toConstantValue(Wt.ELegacyElementType.Wizard),$}))}}(0,F.Cg)([G.IJn,(0,F.Qj)(1,(0,G.vQZ)("PlayerFactory")),(0,F.Qj)(2,(0,G.vQZ)("Teams")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Object,Object,Array]),(0,F.Sn)("design:returntype",Promise)],be.prototype,"createPlayer",null);class pe extends G.PQK{installBindings(){const k=this.Container.get("FeatureFlags");this.Container.bind("CoOpTeamInitializer").toConstantValue(new be(this.Container)),this.Container.bind("ClientHeartbeatDisconnectTime").toConstantValue(parseInt(k.getValue("coOpClientHeartbeatTimeout",ut.s.get("GameConstants.CO_OP_TITAN.CLIENT_HEARTBEAT_TIMEOUT")),10))}}class ve extends Xt{constructor(k,B,U,F,G,j){super(),this.sourceTeamMember=null,this.targetTeamMember=null,this.spellFactory=null,this.spellID=null,this.battleUIFactory=null,this.audioPlayer=null,this.targetTeamMember=B,this.sourceTeamMember=k,this.spellFactory=U,this.spellID=F,this.battleUIFactory=G,this.audioPlayer=j}run(){const k=this.spellFactory.createSpell(this.spellID,this.sourceTeamMember,[this.targetTeamMember]),B=this.sourceTeamMember.AttackAnimationState;null!==B&&k.OnStart.addOnce((()=>{B.play(),this.audioPlayer.playSoundEffectClip(8,Zt.J.Cast),B.OnComplete.addOnce(this.returnToIdle,this,0,this.sourceTeamMember)})),k.OnImpact.addOnce((()=>{this.showMiss(k),this.audioPlayer.playSoundEffectClip(8,Zt.J.Miss)})),k.cast(),this.battleUIFactory.showAttackInfo(this.sourceTeamMember.NameProvider.getName(),k.Name),this.trackSpellEvent(k)}trackSpellEvent(k){const B=K.t.getItem("spell",this.spellID);V.q.instance.prodigy.gameContainer.get("c47-20b6").battle.sendBattleSpellCastEvent({team:ee.B1.Player,spell_name:k.Name,spell_type:B.data.type,spell_level:B.data.level,spell_damage:0,caster_name:this.sourceTeamMember.NameProvider.getName(),caster_level:this.sourceTeamMember.Level,target_name:this.targetTeamMember.NameProvider.getName(),target_type:this.targetTeamMember.Element,target_level:this.targetTeamMember.Level,target_health:this.targetTeamMember.Health.CurrentValue,energy_cost:B.data.energyCost,duration:void 0,success:!1})}showMiss(k){let B=this.battleUIFactory.showStatusText("missed",{x:this.targetTeamMember.GameObject.legacyTransform.x,y:this.targetTeamMember.GameObject.legacyTransform.y-40}).findComponent(G.bE_).getInjectedValue("Animations");Array.isArray(B)||(B=[B]),B.push(new ae(k));new wt(B).OnComplete.addOnce((()=>{this.onComplete.dispatch()}))}returnToIdle(k){const B=k.IdleAnimationState;null!==B&&B.play()}}class ge extends ce.${receivedMessage(k){if(k.action===le.x.TitanAttacked){this.coOpSocketLogger.logMessage(`Received titan attacking message. Missed? ${k.data.missed?"YES":"NO"}. Host crystal HP: ${k.data.crystalHealth}`);const B=j.find(this.battleTeams,(k=>0===k.ID));k.data.missed?this.actionQueue.addAction(new ve(this.battleTeamMember,B.ActiveMember,this.spellFactory,k.data.spellID,this.battleUIFactory,this.audioPlayer)):this.actionQueue.addAction(new ie(this.battleTeamMember,B.ActiveMember,this.spellFactory,k.data.damage,k.data.spellID,this.battleUIFactory,this.audioPlayer))}}}(0,F.Cg)([(0,G.fFd)("BattleActionQueue"),(0,F.Sn)("design:type",Qt)],ge.prototype,"actionQueue",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamMember"),(0,F.Sn)("design:type",rt)],ge.prototype,"battleTeamMember",void 0),(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],ge.prototype,"battleTeams",void 0),(0,F.Cg)([(0,G.fFd)("SpellFactory"),(0,F.Sn)("design:type",Object)],ge.prototype,"spellFactory",void 0),(0,F.Cg)([(0,G.fFd)("BattleUIFactory"),(0,F.Sn)("design:type",Object)],ge.prototype,"battleUIFactory",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],ge.prototype,"audioPlayer",void 0),(0,F.Cg)([(0,G.fFd)("CoOpSocketLogging"),(0,F.Sn)("design:type",de.h)],ge.prototype,"coOpSocketLogger",void 0);var me=U(69698);class ye extends G.JTX{constructor(){super(...arguments),this.correctAnswers=0,this.incorrectAnswers=0,this.teamSize=null,this.isHost=null}get CorrectAnswers(){return this.correctAnswers}get IncorrectAnswers(){return this.incorrectAnswers}get Won(){return j.find(this.teams,(k=>1===k.ID)).IsDefeated()}get TeamSize(){return this.teamSize}get IsHost(){return this.isHost}getTimeSinceStart(){return this.timeManager.getLocalTimeMs()-this.startTime}create(){super.create(),this.teamSize=this.teamInfo.getTeam().TeamMembers.length,this.isHost=this.teamInfo.isHost(),this.startTime=this.timeManager.getLocalTimeMs(),this.questionInterface.OnQuestionAnswered.add(this.questionWasAnswered,this)}destroy(){this.questionInterface.OnQuestionAnswered.remove(this.questionWasAnswered,this),super.destroy()}questionWasAnswered(k){k?++this.correctAnswers:++this.incorrectAnswers}}(0,F.Cg)([(0,G.fFd)("QuestionInterface"),(0,F.Sn)("design:type",Object)],ye.prototype,"questionInterface",void 0),(0,F.Cg)([(0,G.fFd)("a03-308f"),(0,F.Sn)("design:type",me.V)],ye.prototype,"timeManager",void 0),(0,F.Cg)([(0,G.fFd)("CurrentCoOpTeam"),(0,F.Sn)("design:type",Object)],ye.prototype,"teamInfo",void 0),(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],ye.prototype,"teams",void 0);class _e extends G.JTX{constructor(){super(...arguments),this.onDefeated=new G.HN0}get OnDefeated(){return this.onDefeated}applyDamage(k){this.health.CurrentValue-=k,this.isDefeated()&&this.OnDefeated.dispatch()}isDefeated(){return this.health.CurrentValue<=0}destroy(){this.onDefeated.dispose(),super.destroy()}}(0,F.Cg)([(0,G.fFd)("Health"),(0,F.Sn)("design:type",at)],_e.prototype,"health",void 0);class Ee extends G.uAl{getDamageAmount(){return 1}}var we=U(28628),Te=U(5491),Se=U(39984),Ae=U(67665),Ce=U(85515),Oe=U(55122),Ie=U(68788),De=U(73032),Re=U(2221);class Pe extends G.JTX{constructor(){super(...arguments),this.onClose=new G.HN0,this.currentMenu=null,this.starsGained=0,this.xpBarDelay=500,this.battleDuration=null}get OnClose(){return this.onClose}get StarsGained(){return this.starsGained}set StarsGained(k){this.starsGained=k}get XPBarDelay(){return this.xpBarDelay}set XPBarDelay(k){this.xpBarDelay=k}open(){const k=this.prizeTiers.getShardCount();this.openNewPostBattleFlow(k)}openNewPostBattleFlow(k){var B,U,F,j,$,H;const W=G.wa5.getActiveScene().addLayer(Ce.E.MenusLayer,500,!0);V.q.instance.prodigy.game.state.getCurrentState().battleLayers[Ce.E.MenusLayer]=W;const q=[];k>0&&q.push({type:"currency",ID:11,N:k});const z=[];z.push({type:"currency",ID:11,N:1});const Y=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;(null===(j=null===(F=null===(U=null===(B=Y.data)||void 0===B?void 0:B.chargedLevelData)||void 0===U?void 0:U.newLevelData)||void 0===F?void 0:F.levelsGained)||void 0===j?void 0:j.length)>0&&(Y.data.chargedLevelData.newLevelData.levelsGained=[null===($=Y.data.chargedLevelData.newLevelData.levelsGained)||void 0===$?void 0:$.pop()],Y.data.chargedLevelData.newLevelData.startingLevelRelativeXp=Y.data.chargedLevelData.chargedLevelXpForCurrentLevel,Y.data.chargedLevelData.newLevelData.xpGained=0);const Q=Se.e.starsToLevel(Oe.s.activePlayerLevelCap,Te.V.Player)-Y.getStars();this.StarsGained=Math.min(Q,this.StarsGained),this.StarsGained=Math.max(0,this.StarsGained);const X=K.t.getItem("titan",this.titanInfo.getAssetID());V.q.instance.prodigy.prefabFactory.openPostBattleFlow({currentTeamCreatures:[Y],victory:this.battleStats.Won,battleType:_s.INSECURE_BATTLE_TYPE,postBattleRewards:{xpGained:{memberXp:0,totalNonMemberXp:this.StarsGained,baseXp:this.StarsGained},rewards:q,memberRewards:z},nootTipInfo:{enemyElementWeakness:null===(H=null==X?void 0:X.data)||void 0===H?void 0:H.element}}).promise.then((k=>{const B=k.findComponentInChildren(Ie.D);B.OnDestroy.addOnce((()=>this.returnToMap())),this._postBattleExpressModeController.setPostBattleFlowManager(B)})).catch(G.RQr.createHandler("Error with post battle flow menu"))}returnToMap(){var k;const B=this.createBattleEventMetadata();this.sendBattleCompleteEvent(B.success?"win":"loss");const U={battleResult:B.success?we.XK.Victory:we.XK.Defeat};V.q.instance.prodigy.world.it(this.afterBattleMap,void 0,void 0,U),null===(k=this.currentMenu)||void 0===k||k.close()}sendBattleCompleteEvent(k){this.segment.battle.sendBattleCompleteEvent({outcome:k,battle_type:_s.INSECURE_BATTLE_TYPE,enemy_attacks_made:void 0,enemy_attacks_succeeded:void 0,player_attacks_made:this.battleStats.CorrectAnswers+this.battleStats.IncorrectAnswers,player_attacks_succeeded:this.battleStats.CorrectAnswers,energy:void 0});const B=this.currentPlayer.player.getCurrentHearts();if(this.segment.battle.sendBattleParticipantsOutcomesEvent({health:B,team:ee.B1.Player,name:ee.B1.Player,type:Wt.ELegacyElementType.Wizard,status:B>0?ee.rW.Conscious:ee.rW.Unconscious}),this.battleStats.IsHost){const k=K.t.getItem("titan",this.titanInfo.getAssetID());k&&this.segment.battle.sendBattleParticipantsOutcomesEvent({health:0,team:ee.B1.Opponent,name:k.name,type:k.data.element,status:this.battleStats.Won?ee.rW.Unconscious:ee.rW.Conscious})}}createBattleEventMetadata(){return{type:"TitanBattle",action:"end",success:this.battleStats.Won,duration:this.battleDuration,coop_role:this.battleStats.IsHost?"leader":"participant",num_players:this.battleStats.TeamSize,custom:{questions_answered_correct:this.battleStats.CorrectAnswers,questions_answered_incorrect:this.battleStats.IncorrectAnswers,shard_payout:this.prizeTiers.getShardCount()}}}destroy(){this.onClose.dispose(),super.destroy()}}(0,F.Cg)([(0,G.fFd)(G.t5G.AssetLoader),(0,F.Sn)("design:type",Object)],Pe.prototype,"assetLoader",void 0),(0,F.Cg)([(0,G.fFd)("c47-20b6"),(0,F.Sn)("design:type",Ae.Y)],Pe.prototype,"segment",void 0),(0,F.Cg)([(0,G.fFd)("BattleStats"),(0,F.Sn)("design:type",Object)],Pe.prototype,"battleStats",void 0),(0,F.Cg)([(0,G.fFd)("PrizeProvider"),(0,F.Sn)("design:type",Re.f)],Pe.prototype,"prizeTiers",void 0),(0,F.Cg)([(0,G.fFd)("SummaryPlayer"),(0,F.Sn)("design:type",Object)],Pe.prototype,"currentPlayer",void 0),(0,F.Cg)([(0,G.fFd)("TitanInfo"),(0,F.Sn)("design:type",Object)],Pe.prototype,"titanInfo",void 0),(0,F.Cg)([(0,G.fFd)("SummaryPopUps"),(0,F.Sn)("design:type",Object)],Pe.prototype,"availablePopups",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],Pe.prototype,"audioPlayer",void 0),(0,F.Cg)([(0,G.fFd)("AfterBattleDestination"),(0,F.Sn)("design:type",String)],Pe.prototype,"afterBattleMap",void 0),(0,F.Cg)([(0,G.fFd)("PostBattleExpressModeController"),(0,F.Sn)("design:type",De.o)],Pe.prototype,"_postBattleExpressModeController",void 0);class Me{constructor(k,B){this.titanID=null,this.assetID=null,this.titanID=k,this.assetID=B}getTitanID(){return this.titanID}getAssetID(){return this.assetID}}class Ne extends G.PQK{constructor(k){super(),this.initializationData=null,this.initializationData=k}installBindings(){this.Container.bind("BattleActionQueue").to(Qt).asSingleton(),this.Container.bind("CoOpTeammateData").toConstantValue(this.initializationData.teammates),this.Container.bind("AfterBattleDestination").toConstantValue(this.initializationData.returnToMap),this.Container.bind("TitanInfo").toConstantValue(new Me(this.initializationData.titanNetworkID,this.initializationData.titanAssetID));const k=this.Container.get("FeatureFlags");this.Container.bind("ENABLE_CO_OP_TITAN_LOGGING").toConstantValue(k.getValue("verboseCoOpLogging",!1)),this.Container.bind("ENABLE_CO_OP_SOCKET_LOGGING").toConstantValue(k.getValue("verboseCoOpSocketLogging",!1));const B=new de.h(this.Container);B.setTag("CO_OP_TITAN"),this.Container.bind("CoOpLogging").toConstantValue(B);const U=new de.h(this.Container);U.setTag("CO_OP_SOCKET"),this.Container.bind("CoOpSocketLogging").toConstantValue(U),this.Container.bind("TitanHP").toConstantValue(this.initializationData.titanHP),this.Container.bind("CrystalHP").toConstantValue(this.initializationData.crystalHP),this.Container.bind("TitanBountyXP").toConstantValue(this.initializationData.titanXPBounty),this.Container.bind("LosingPrizeTiers").toConstantValue([{questionsCorrect:3,shards:1}]),this.Container.bind("WinningPrizeTiers").toConstantValue([{questionsCorrect:5,shards:4},{questionsCorrect:3,shards:2},{questionsCorrect:1,shards:1}])}}let xe=class extends G.JTX{create(){super.create(),this.currentPlayer.setSavingEnabled(!1)}destroy(){this.currentPlayer.setSavingEnabled(!0),super.destroy()}};(0,F.Cg)([(0,G.fFd)("CurrentPlayer"),(0,F.Sn)("design:type",Object)],xe.prototype,"currentPlayer",void 0),xe=(0,F.Cg)([(0,G.EVk)("DisableCurrentPlayerSaving")],xe);var Le=U(50503);class ke extends G.JTX{constructor(){super(...arguments),this.questionStreak=0}increaseStreak(){++this.questionStreak}resetStreak(){this.questionStreak=0}getCurrentSpell(){return this.spellIDs[Math.min(this.questionStreak,this.spellIDs.length-1)]}}(0,F.Cg)([(0,G.fFd)("PlayerSpells"),(0,F.Sn)("design:type",Array)],ke.prototype,"spellIDs",void 0);class Be extends G.JTX{doAttack(k,B){const U=j.find(this.battleTeams,(k=>1===k.ID)),F=j.find(this.battleTeams,(k=>0===k.ID)),G=this.teamInfo.getRemainingTitanHP();this.teamInfo.isTitanTeamDefeated()||this.teamInfo.isPlayerTeamDefeated()?this.coOpSocketLogger.logMessage("Received an attack message but a team is defeated. Will not be processed."):B?this.queueMissedAttackAction(k,G,F.ActiveMember,U.ActiveMember):G<=1?this.queueTitanDefeatAction(U.ActiveMember):this.queueAttackAction(k,G,F.ActiveMember,U.ActiveMember),B?this.spellSelector.resetStreak():this.spellSelector.increaseStreak()}queueMissedAttackAction(k,B,U,F){const G={action:le.x.PlayerAttacked,data:{missed:!0,sourcePlayerID:k,titanHealth:B,damage:0,spellID:this.spellSelector.getCurrentSpell()}};this.socketService.broadcastMessage(G),this.coOpSocketLogger.logMessage(`Broadcasting missed attack message for player with ID ${k} and name ${this.battleTeamMember.NameProvider.getName()}.`),this.battleActionsQueue.addAction(new ue(this.battleTeamMember,F,this.spellFactory,this.spellSelector.getCurrentSpell(),U,this.battleUIFactory,this.audioPlayer))}queueAttackAction(k,B,U,F){const G=this.battleTeamMember.DamageSource.getDamageAmount(),j={action:le.x.PlayerAttacked,data:{missed:!1,sourcePlayerID:k,damage:G,titanHealth:B,spellID:this.spellSelector.getCurrentSpell()}};this.socketService.broadcastMessage(j),this.coOpSocketLogger.logMessage(`Broadcasting successful attack message for player with ID ${k} and name ${this.battleTeamMember.NameProvider.getName()}.`),this.battleActionsQueue.addAction(new te(this.battleTeamMember,F,this.spellFactory,G,this.spellSelector.getCurrentSpell(),U,this.battleUIFactory,this.audioPlayer))}queueTitanDefeatAction(k){const B={action:le.x.TitanDefeated};this.socketService.broadcastMessage(B),this.coOpSocketLogger.logMessage("Broadcasting message that the titan has been defeated"),this.battleActionsQueue.addAction(new re(this.battleTeams,this.spellFactory,V.q.instance.game.time.events,this.audioPlayer,this.battleUIFactory))}}(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],Be.prototype,"battleTeams",void 0),(0,F.Cg)([(0,G.fFd)("SpellSelector"),(0,F.Sn)("design:type",ke)],Be.prototype,"spellSelector",void 0),(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],Be.prototype,"socketService",void 0),(0,F.Cg)([(0,G.fFd)("BattleActionQueue"),(0,F.Sn)("design:type",Qt)],Be.prototype,"battleActionsQueue",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamMember"),(0,F.Sn)("design:type",rt)],Be.prototype,"battleTeamMember",void 0),(0,F.Cg)([(0,G.fFd)("SpellFactory"),(0,F.Sn)("design:type",Object)],Be.prototype,"spellFactory",void 0),(0,F.Cg)([(0,G.fFd)("BattleUIFactory"),(0,F.Sn)("design:type",Object)],Be.prototype,"battleUIFactory",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamInfo"),(0,F.Sn)("design:type",oe)],Be.prototype,"teamInfo",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],Be.prototype,"audioPlayer",void 0),(0,F.Cg)([(0,G.fFd)("CoOpSocketLogging"),(0,F.Sn)("design:type",de.h)],Be.prototype,"coOpSocketLogger",void 0);class Ue extends G.JTX{constructor(){super(...arguments),this.playerAttackHandler=null}get AttackHandler(){return this.playerAttackHandler}set AttackHandler(k){this.playerAttackHandler=k}create(){super.create(),this.questionInterface.OnQuestionAnswered.add(this.questionWasAnswered,this)}destroy(){this.questionInterface.OnQuestionAnswered.remove(this.questionWasAnswered,this),super.destroy()}questionWasAnswered(k){this.playerAttackHandler.doAttack(this.currentPlayer.getUserID(),!k)}}(0,F.Cg)([(0,G.fFd)("QuestionInterface"),(0,F.Sn)("design:type",Object)],Ue.prototype,"questionInterface",void 0),(0,F.Cg)([(0,G.fFd)("CurrentPlayer"),(0,F.Sn)("design:type",Object)],Ue.prototype,"currentPlayer",void 0);class Fe extends ce.${constructor(){super(...arguments),this.userID=null,this.playerAttackHandler=null}get UserID(){return this.userID}set UserID(k){this.userID=k}get AttackHandler(){return this.playerAttackHandler}set AttackHandler(k){this.playerAttackHandler=k}receivedMessage(k){k.action===le.x.QuestionAnswered&&k.data.sourcePlayerID===this.userID&&(this.playerAttackHandler.doAttack(this.UserID,!k.data.correct),this.coOpSocketLogger.logMessage(`Received message that user with id ${this.userID} has answered a question ${k.data.correct?"correctly":"incorrectly"}`))}}(0,F.Cg)([(0,G.fFd)("CoOpSocketLogging"),(0,F.Sn)("design:type",de.h)],Fe.prototype,"coOpSocketLogger",void 0);class Ge extends G.s3P{createCoOpTeam(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U;const F=[],G=yield this.createPlayer({appearance:k.getAppearance(),firstName:k.getFirstName(),middleName:k.getMiddleName(),lastName:k.getLastName(),nickname:k.getNickname(),userID:k.getUserID(),level:k.player.data.level,playerTransformation:k.player.getPlayerData().playerTransformation,chargedLevelData:k.getChargedLevelData()}),$=G.addComponent(Ue),H=G.addComponent(Be);$.AttackHandler=H,G.addComponent(he),F.push(G);const V=(0,Kt.G)(qt.q).enabled;for(let k=0;kk.userID)).join(",")}`),F}))}createPlayer(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=j.find(U,(k=>0===k.ID)),$=yield B.createPlayer(k.appearance,F,k.playerTransformation,k.chargedLevelData);$.name="Player";const H=$.findComponent(G.bE_),V=F.GameObject.findComponent(G.bE_);H.Container.bind("DamageReceiver").toConstantValue(V.getInjectedValue("DamageReceiver")),H.Container.bind("DamageSource").toConstantValue(V.getInjectedValue("DamageSource")),H.Container.bind("Health").toConstantValue(V.getInjectedValue("Health")),H.Container.bind("Level").toConstantValue(k.level),H.Container.bind("Element").toConstantValue(Wt.ELegacyElementType.Wizard),$.findComponent(rt).BattleTeam=F;const W=$.addComponent(G.Fid);W.Identifier="SpellSelector",W.Components=[$.addComponent(ke)];const q=$.addComponent(zt);return q.firstNameID=k.firstName,q.middleNameID=k.middleName,q.lastNameID=k.lastName,q.nicknameID=k.nickname,H.Container.bind("Name").toConstantValue(q),$}))}}(0,F.Cg)([(0,G.fFd)("CoOpLogging"),(0,F.Sn)("design:type",de.h)],Ge.prototype,"logger",void 0),(0,F.Cg)([G.IJn,(0,F.Qj)(1,(0,G.vQZ)("PlayerFactory")),(0,F.Qj)(2,(0,G.vQZ)("Teams")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Object,Object,Array]),(0,F.Sn)("design:returntype",Promise)],Ge.prototype,"createPlayer",null);class je extends G.PQK{installBindings(){this.Container.bind("CoOpTeamInitializer").toConstantValue(new Ge(this.Container));const k=this.Container.get("FeatureFlags");this.Container.bind("TitanAttackFrequency").toConstantValue(parseInt(k.getValue("titanCoOpAttackFrequency",ut.s.get("GameConstants.CO_OP_TITAN.ATTACK_FREQUENCY")),10)),this.Container.bind("TitanDifficultyLevel").toConstantValue(parseInt(k.getValue("titanCoOpDifficulty",ut.s.get("GameConstants.CO_OP_TITAN.TITAN_DIFFICULTY")),10)),this.Container.bind("HostHeartbeatTime").toConstantValue(parseInt(k.getValue("coOpHostHeartbeatTime",ut.s.get("GameConstants.CO_OP_TITAN.HOST_HEARTBEAT_TIME")),10)),this.Container.bind("PlayerSpells").toConstantValue(this.getPlayerSpells())}getPlayerSpells(){const k=[],B=K.t.getRawItems("spell");for(let j=0;j0;){const B=F.pop(),U=[];for(let F=1;F<4;++F){const G=j.find(k,(k=>k.data.element===B&&k.data.tier===F&&k.data.targetType===Pt.X.Single));G&&U.push(G.ID);const $=j.find(k,(k=>k.data.element===B&&k.data.tier===F&&k.data.targetType===Pt.X.AOE));$&&U.push($.ID)}6===U.length&&($[B]=U)}const H=j.keys($);if(H.length>0){const k=[];for(let B=0;B<$[H[0]].length;++B){const U=j.sample(H);k.push($[U][B])}return this.Container.get("CoOpLogging").logMessage(`Titan combat loaded with spells of types (${H.join(", ")}) and difficulty ${String(this.Container.get("TitanDifficultyLevel"))}`),k}return G.VyI.log("Co-op spells could not be selected!",G.$bb.Error),[49]}}class $e extends G.JTX{constructor(){super(...arguments),this.attacks=0,this.defeatDelay=800,this.noMissStreak=0,this.maxNoMissStreak=5}get DefeatDelay(){return this.defeatDelay}set DefeatDelay(k){this.defeatDelay=k}get MaxNoMissStreak(){return this.maxNoMissStreak}set MaxNoMissStreak(k){this.maxNoMissStreak=k}create(){super.create(),this.questionInterface.OnQuestionAnswered.add(this.increaseAttackCounter,this,-1),this.socket.onMessage.add(this.socketMessageReceived,this,-1),this.logger.logMessage(`Titan will attack when players cast ${this.attackFrequency} spell(s)`)}destroy(){this.questionInterface.OnQuestionAnswered.remove(this.increaseAttackCounter,this),this.socket.onMessage.remove(this.socketMessageReceived,this),super.destroy()}socketMessageReceived(k){k.action===le.x.QuestionAnswered&&this.increaseAttackCounter()}increaseAttackCounter(){if(++this.attacks,this.attacks>=this.attackFrequency)if(this.attacks=0,this.teamInfo.isPlayerTeamDefeated()||this.teamInfo.isTitanTeamDefeated())this.coOpSocketLogger.logMessage("Titan should attack, but a team is defeated. Not processing this message.");else{let k=Le.A.rollMissChance(this.titanDifficulty);const B=j.find(this.battleTeams,(k=>0===k.ID)),U=this.teamInfo.getRemainingPlayerHP();this.coOpSocketLogger.logMessage(`Titan is attacking. No miss streak is currently at ${this.noMissStreak}.`),k?this.noMissStreak=0:(++this.noMissStreak,this.noMissStreak>=this.maxNoMissStreak&&(this.noMissStreak=0,k=!0)),k?this.queueMissedAttackAction(U,B.ActiveMember):U<=1?this.queuePlayerDefeatAction(B.ActiveMember):this.queueAttackAction(U,B.ActiveMember)}}queueMissedAttackAction(k,B){const U={action:le.x.TitanAttacked,data:{crystalHealth:k,missed:!0,damage:0,spellID:73}};this.socket.broadcastMessage(U),this.coOpSocketLogger.logMessage(`Broadcasting missed attack message for the titan. Crystal is at ${k} HP.`),this.battleQueue.addAction(new ve(this.battleTeamMember,B,this.spellFactory,73,this.battleUIFactory,this.audioPlayer))}queueAttackAction(k,B){const U=this.battleTeamMember.DamageSource.getDamageAmount(),F={action:le.x.TitanAttacked,data:{crystalHealth:k,missed:!1,damage:U,spellID:73}};this.socket.broadcastMessage(F),this.coOpSocketLogger.logMessage(`Broadcasting attack message for the titan. Crystal is at ${k} HP.`),this.battleQueue.addAction(new ie(this.battleTeamMember,B,this.spellFactory,U,73,this.battleUIFactory,this.audioPlayer))}queuePlayerDefeatAction(k){const B={action:le.x.PlayersDefeated};this.socket.broadcastMessage(B),this.coOpSocketLogger.logMessage("Broadcasting titan defeated message. Battle should resolve in player victory."),this.battleQueue.addAction(new ne(this.battleTeams,this.spellFactory,V.q.instance.game.time.events,this.defeatDelay,this.audioPlayer))}}(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],$e.prototype,"socket",void 0),(0,F.Cg)([(0,G.fFd)("TitanAttackFrequency"),(0,F.Sn)("design:type",Number)],$e.prototype,"attackFrequency",void 0),(0,F.Cg)([(0,G.fFd)("QuestionInterface"),(0,F.Sn)("design:type",Object)],$e.prototype,"questionInterface",void 0),(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],$e.prototype,"battleTeams",void 0),(0,F.Cg)([(0,G.fFd)("BattleActionQueue"),(0,F.Sn)("design:type",Qt)],$e.prototype,"battleQueue",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamMember"),(0,F.Sn)("design:type",rt)],$e.prototype,"battleTeamMember",void 0),(0,F.Cg)([(0,G.fFd)("TitanDifficultyLevel"),(0,F.Sn)("design:type",Number)],$e.prototype,"titanDifficulty",void 0),(0,F.Cg)([(0,G.fFd)("SpellFactory"),(0,F.Sn)("design:type",Object)],$e.prototype,"spellFactory",void 0),(0,F.Cg)([(0,G.fFd)("BattleUIFactory"),(0,F.Sn)("design:type",Object)],$e.prototype,"battleUIFactory",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamInfo"),(0,F.Sn)("design:type",oe)],$e.prototype,"teamInfo",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],$e.prototype,"audioPlayer",void 0),(0,F.Cg)([(0,G.fFd)("CoOpLogging"),(0,F.Sn)("design:type",de.h)],$e.prototype,"logger",void 0),(0,F.Cg)([(0,G.fFd)("CoOpSocketLogging"),(0,F.Sn)("design:type",de.h)],$e.prototype,"coOpSocketLogger",void 0);var He=U(87761),Ve=U(28152);let We=class extends G.JTX{constructor(){super(...arguments),this._autoJoin=!0}create(){super.create(),this._autoJoin&&this.join()}destroy(){this.leave(),super.destroy()}join(k){this.canJoinRoom().then((B=>{var U;if(!B)return;const F=null!==(U=null!=k?k:this._roomID)&&void 0!==U?U:this.removeHardOrExpertIdentifierFromZoneMapTag(this.getInjectedValue("ZONE_MAP_TAG"));F&&(this._multiplayerSocket.isDisconnected||F!==this._roomID)&&(this._multiplayerSocket.joinRoom(F),this._roomID=F)})).catch((k=>{G.RQr.logError(k,"Failed to check if player can join room")}))}canJoinRoom(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=yield null===(k=this._localZoneQuestManager)||void 0===k?void 0:k.getTasksInProgress();if(!B||0===B.length)return!0;const U=$().uniq($().flatMap(B,(k=>{var B,U;return null!==(U=null===(B=k.taskDefinition.metadata)||void 0===B?void 0:B.locations)&&void 0!==U?U:[]}))),F=V.q.instance.prodigy.world.getCurrentMap();return void 0!==F&&!U.some((k=>("string"==typeof k?k:k.location)===F))}))}removeHardOrExpertIdentifierFromZoneMapTag(k){return k?k.replace(/_(hard|expert)/,""):null}leave(){this._roomID&&(this._multiplayerSocket.leaveRoom(),this._roomID=void 0)}};(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],We.prototype,"_multiplayerSocket",void 0),(0,F.Cg)([(0,G.Cdj)("a78-11c7"),(0,F.Sn)("design:type",He.B)],We.prototype,"_localZoneQuestManager",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],We.prototype,"_roomID",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],We.prototype,"_autoJoin",void 0),We=(0,F.Cg)([(0,G.EVk)("JoinMultiplayerRoom",Ve.Y.multiplayer)],We);class qe extends G.uAl{constructor(){super(...arguments),this.startPosition=null,this.endPosition=null,this.slideDuration=0,this.onComplete=new G.HN0,this.animationPlayed=!1}get StartPosition(){return this.startPosition}set StartPosition(k){this.startPosition=k}get EndPosition(){return this.endPosition}set EndPosition(k){this.endPosition=k}get SlideDuration(){return this.slideDuration}set SlideDuration(k){this.slideDuration=k}get OnComplete(){return this.onComplete}play(){this.GameObject.legacyTransform.group.position.set(this.startPosition.x,this.startPosition.y);V.q.instance.game.add.tween(this.GameObject.legacyTransform.group.position,this).to(Object.assign({},this.endPosition),this.slideDuration,G.GS3.Quadratic.Out,!0).onTweenComplete.addOnce((()=>{this.animationPlayed=!0,this.onComplete.dispatch()}))}hasFinishedPlaying(){return this.animationPlayed}destroy(){this.onComplete.dispose(),super.destroy()}}class Ke extends G.JTX{constructor(){super(...arguments),this.isHorizontal=!0,this.requestedSize=0,this.startImage=null,this.endImage=null,this.fillTexture=null,this.fillImage=null,this.sourceAtlas=null,this.fillFrame=null}get IsHorizontal(){return this.isHorizontal}set IsHorizontal(k){this.isHorizontal=k}get Size(){return this.requestedSize}set Size(k){this.requestedSize=k,this.updatePositionAndSize()}create(){super.create(),this.startImage=V.q.instance.prodigy.create.image(0,0,null,null),this.GameObject.legacyTransform.group.addChild(this.startImage),this.endImage=V.q.instance.prodigy.create.image(0,0,null,null),this.GameObject.legacyTransform.group.addChild(this.endImage),this.fillTexture=V.q.instance.game.add.renderTexture(),this.fillImage=V.q.instance.prodigy.create.image(0,0,null,null,this.fillTexture),this.GameObject.legacyTransform.group.addChild(this.fillImage),this.startImage.anchor.set(.5,.5),this.endImage.anchor.set(.5,.5),this.fillImage.anchor.set(.5,.5)}destroy(){this.fillTexture.destroy(!0),this.startImage.destroy(),this.endImage.destroy(),this.fillImage.destroy(),super.destroy()}setAsset(k,B,U=null,F=null){this.assetLoader.isLoaded(k,mt.i.Image)?(null===U?(this.startImage.loadTexture(k,F),this.endImage.loadTexture(k,F),this.endImage.scale.set(1,1),this.isHorizontal?this.startImage.scale.set(-1,1):this.startImage.scale.set(1,-1)):null===F?(this.startImage.loadTexture(k,U),this.endImage.loadTexture(k,U),this.startImage.scale.set(1,1),this.isHorizontal?this.endImage.scale.set(-1,1):this.endImage.scale.set(1,-1)):(this.startImage.loadTexture(k,U),this.endImage.loadTexture(k,F),this.startImage.scale.set(1,1),this.endImage.scale.set(1,1)),this.sourceAtlas=k,this.fillFrame=B,this.updatePositionAndSize()):this.assetLoader.loadAssets([k]).then((()=>{this.setAsset(k,U,B,F)}))}applyMask(k){this.startImage.mask=k.getGraphicSource(),this.fillImage.mask=k.getGraphicSource(),this.endImage.mask=k.getGraphicSource()}removeMask(){this.startImage.mask=null,this.fillImage.mask=null,this.endImage.mask=null}updatePositionAndSize(){if(null!==this.sourceAtlas){const k=this.assetLoader.getAsset(this.sourceAtlas,mt.i.Atlas).getFrameByName(this.fillFrame);if(this.isHorizontal){const B=Math.abs(this.startImage.width),U=Math.abs(this.endImage.width),F=Math.max(0,Math.ceil(this.requestedSize-(B+U))+2),G=.5*this.requestedSize;this.startImage.position.set(Math.ceil(-G+Math.round(.5*B)),0),this.fillImage.position.set(.5*(B-U),0),this.endImage.position.set(Math.floor(G-Math.round(.5*U)),0);const j=V.q.instance.prodigy.create.image(0,0,this.sourceAtlas,this.fillFrame),$=Math.ceil(F/j.width),H=F>0&&k.sourceSizeH>0;if(this.fillTexture.resize(F,k.sourceSizeH,H),H){this.fillTexture.clear();for(let k=0;k<$;++k)this.fillTexture.renderXY(j,k*j.width,0)}j.destroy(),this.startImage.y=Math.round(.5*(this.startImage.height-k.sourceSizeH)),this.endImage.y=Math.round(.5*(this.endImage.height-k.sourceSizeH))}else{const B=Math.abs(this.startImage.height),U=Math.abs(this.endImage.height),F=Math.max(0,Math.ceil(this.requestedSize-(B+U))+2),G=.5*this.requestedSize;this.startImage.position.set(0,Math.ceil(-G+Math.round(.5*B))),this.fillImage.position.set(0,.5*(B-U)),this.endImage.position.set(0,Math.floor(G-Math.round(.5*U)));const j=V.q.instance.prodigy.create.image(0,0,this.sourceAtlas,this.fillFrame),$=Math.ceil(F/j.height),H=this.startImage.width>0&&F>0;if(this.fillTexture.resize(this.startImage.width,F,H),H){this.fillTexture.clear();for(let k=0;k<$;++k)this.fillTexture.renderXY(j,0,k*j.height)}j.destroy(),this.startImage.x=Math.round(.5*(this.startImage.width-k.sourceSizeW)),this.endImage.x=Math.round(.5*(this.endImage.width-k.sourceSizeW))}}}}(0,F.Cg)([(0,G.fFd)(G.t5G.AssetLoader),(0,F.Sn)("design:type",Object)],Ke.prototype,"assetLoader",void 0);class ze extends G.uAl{constructor(){super(...arguments),this.segmentCount=0,this.gapSize=0,this.isHorizontal=!0,this.totalBarSize=0,this.fillFrame=null,this.barStartCapFrame=null,this.barEndCapFrame=null,this.barSegmentStartFrame=null,this.barSegmentEndFrame=null,this.barAtlas=null,this.segments=[],this.currentMask=null}get Segments(){return this.segmentCount}set Segments(k){this.segmentCount=k,this.updateSegments()}get GapSize(){return this.gapSize}set GapSize(k){this.gapSize=k,this.updateSegments()}get IsHorizontal(){return this.isHorizontal}set IsHorizontal(k){this.isHorizontal=k,this.updateSegments()}get BarSize(){return this.totalBarSize}set BarSize(k){this.totalBarSize=k,this.updateSegments()}get FillFrame(){return this.fillFrame}set FillFrame(k){this.fillFrame=k,this.updateSegments()}get BarStartCapFrame(){return this.barStartCapFrame}set BarStartCapFrame(k){this.barStartCapFrame=k,this.updateSegments()}get BarEndCapFrame(){return this.barEndCapFrame}set BarEndCapFrame(k){this.barEndCapFrame=k,this.updateSegments()}get SegmentStartFrame(){return this.barSegmentStartFrame}set SegmentStartFrame(k){this.barSegmentStartFrame=k,this.updateSegments()}get SegmentEndFrame(){return this.barSegmentEndFrame}set SegmentEndFrame(k){this.barSegmentEndFrame=k,this.updateSegments()}get Atlas(){return this.barAtlas}set Atlas(k){this.barAtlas=k,this.updateSegments()}applyMask(k){this.currentMask=k;for(let B=0;Bthis.segmentCount;)this.segments.pop().GameObject.destroy();for(;this.segments.length0){const k=Math.round((this.totalBarSize-(this.gapSize*this.segmentCount-1))/this.segmentCount);let B=.5*this.gapSize-.5*this.totalBarSize+.5*k;for(let U=0;U3e3){this.lastLogTime=U;let F=`QuestionAnsweredDecision\nTransition to ${this.NextState}? ${B?"YES":"NO"}\n`;F+=`\t - Question interface closed? ${B?"YES":"NO"}\n`,null===(k=this.logger)||void 0===k||k.logMessage(F)}return B}}class ei extends Xe{get Name(){return Ye.AnsweringQuestion}constructor(k,B){super(),this.logger=null,this.Decisions=[new ti(k,B)],this.logger=B}enter(){this.logger.logMessage("Entering AnsweringQuestionState - Question interface is open")}exit(){}}class ii extends G.uAl{constructor(){super(...arguments),this.menu=null,this.onFadeComplete=new G.HN0}get TargetMenu(){return this.menu}set TargetMenu(k){this.menu=k}get OnFadeComplete(){return this.onFadeComplete}fadeMenu(){if(null!==this.TargetMenu){V.q.instance.game.add.tween(this.TargetMenu.uiRoot,this).to({alpha:0},200,G.GS3.Linear.None,!0).onTweenComplete.addOnce((()=>{this.onFadeComplete.dispatch()}))}}destroy(){this.onFadeComplete.dispose(),super.destroy()}}var si=U(82680),ni=U(5365),ai=U(87776);class ri extends G.bE_{constructor(){super(...arguments),this.redirectContext=null}get RedirectContext(){return this.redirectContext}set RedirectContext(k){this.redirectContext=k}get Container(){return this.redirectContext.Container}getInjectedValue(k){return this.redirectContext.getInjectedValue(k)}}var oi=U(70215);class hi extends G.JTX{constructor(){super(...arguments),this.onClose=new G.HN0,this.heartsGained=0,this.menu=null}get OnClose(){return this.onClose}open(){null===this.menu&&(this.menu=new si.W(V.q.instance.game,this.GameObject.legacyTransform.group,21,{isModal:!1}),this.menu.queuePostCreateCallback((()=>{this.updateUI(),this.menu.openTween(),this.audioPlayer.playSoundEffectClip(32,"popUpDisplay")})))}create(){super.create(),this.targetPlayer.onStatChanged.add(this.playerStatChanged,this)}destroy(){this.targetPlayer.onStatChanged.remove(this.playerStatChanged,this),this.onClose.dispose(),super.destroy()}shouldOpen(){return this.heartsGained>0}playerStatChanged(k,B,U){k===oi.$.MaxHearts&&(this.heartsGained+=B-U)}updateUI(){this.menu.findElement(ai.b,"resultsTitle").setText(this.localizer.getText("SUMMARY_POPUP_NEW_HEARTS"));const k=new G._mx;k.addComponent(G.K16),this.menu.findUIElement("spriteHolder").add(k.legacyTransform.group),k.addComponent(ri).RedirectContext=this.GameObject.findComponentInParent(G.bE_);const B=k.addComponent(gt._);B.OnLoaded.addOnce((()=>{V.q.instance.game.add.tween(B.sprite.scale,this).from({x:0,y:0},1e3,G.GS3.Elastic.Out,!0)})),B.setAnchor(.5,.5),B.setAsset(Ct._.General_battle_json,"icon-heart"),this.menu.findElement(ai.b,"actionText").setText(this.localizer.getText("SUMMARY_POPUP_HEARTS_EARNED",K.t.getItem("name",this.targetPlayer.getFirstName()).data.value,this.heartsGained));const U=this.menu.findElement(ni.Z,"okayButton");U.onUpCallback=()=>{U.setActive(!1);const k=this.GameObject.findComponent(ii);k.TargetMenu=this.menu,k.OnFadeComplete.addOnce(this.closePopUp,this),k.fadeMenu()}}closePopUp(){this.menu.close(),this.onClose.dispatch()}}(0,F.Cg)([(0,G.fFd)("SummaryPlayer"),(0,F.Sn)("design:type",Object)],hi.prototype,"targetPlayer",void 0),(0,F.Cg)([(0,G.fFd)("Localization"),(0,F.Sn)("design:type",G.dTp)],hi.prototype,"localizer",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],hi.prototype,"audioPlayer",void 0);var ci=U(24536),di=U(22023),li=U(30226);class ui extends G.JTX{constructor(){super(...arguments),this.onClose=new G.HN0,this.spellsToShow=[],this.menu=null,this.actionText=null,this.spellImage=null,this.okButton=null,this.backgroundOrb=null}get OnClose(){return this.onClose}create(){super.create(),this.summaryPlayer.onStatChanged.add(this.playerStatChanged,this)}destroy(){this.summaryPlayer.onStatChanged.remove(this.playerStatChanged,this),this.onClose.dispose(),super.destroy()}shouldOpen(){return this.spellsToShow.length>0}open(){null===this.menu&&(this.menu=new si.W(V.q.instance.game,this.GameObject.legacyTransform.group,21,{isModal:!1}),this.menu.queuePostCreateCallback((()=>{this.updateUI(),this.showNextSpell(),this.menu.openTween(),this.audioPlayer.playSoundEffectClip(32,"popUpDisplay")})))}playerStatChanged(k,B,U){k===oi.$.Spell&&this.spellsToShow.push({newSpellID:B,oldSpellID:U})}showNextSpell(){this.okButton.setActive(!1);const k=this.spellsToShow.shift(),B=K.t.getItem("spell",k.newSpellID);let U="";if(null===k.oldSpellID)U=this.localization.getText("SUMMARY_POPUP_SPELL_UNLOCKED",K.t.getItem("name",this.summaryPlayer.getFirstName()).data.value,B.data.name);else{const F=K.t.getItem("spell",k.oldSpellID);U=this.localization.getText("SUMMARY_POPUP_SPELL_EVOLVED",F.data.name,B.data.name)}this.actionText.setText(U);const F=li.J.convertLegacyElements(B.data.element);this.spellImage.setAsset(Ct._.Ui_bam_json,`icons/icon-${F}-ss`),this.backgroundOrb.image.frameName=di.P8.getAtlasElementBackerPath(F)}updateUI(){this.menu.findElement(ai.b,"resultsTitle").setText(this.localization.getText("SUMMARY_POPUP_NEW_SPELL")),this.okButton=this.menu.findElement(ni.Z,"okayButton"),this.okButton.onUpCallback=()=>{if(this.okButton.setActive(!1),this.spellsToShow.length>0)this.showNextSpell();else{const k=this.GameObject.findComponent(ii);k.TargetMenu=this.menu,k.OnFadeComplete.addOnce(this.closePopUp,this),k.fadeMenu()}},this.actionText=this.menu.findElement(ai.b,"actionText"),this.backgroundOrb=this.menu.findElement(ci.v,"ballDisplay");const k=new G._mx;k.addComponent(G.K16).group.position.set(0,15),this.menu.findUIElement("spriteHolder").add(k.legacyTransform.group),k.addComponent(ri).RedirectContext=this.GameObject.findComponentInParent(G.bE_),this.spellImage=k.addComponent(gt._),this.spellImage.OnLoaded.add((()=>{this.spellImage.setAlpha(1),V.q.instance.game.add.tween(this.spellImage.sprite.scale,this).from({x:0,y:0},1e3,G.GS3.Elastic.Out,!0),this.okButton.setActive(!0)})),this.spellImage.setAnchor(.5,.5),this.spellImage.setAlpha(0)}closePopUp(){this.menu.close(),this.OnClose.dispatch()}}(0,F.Cg)([(0,G.fFd)("SummaryPlayer"),(0,F.Sn)("design:type",Object)],ui.prototype,"summaryPlayer",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],ui.prototype,"audioPlayer",void 0),(0,F.Cg)([(0,G.fFd)("Localization"),(0,F.Sn)("design:type",G.dTp)],ui.prototype,"localization",void 0);class fi extends Xe{get Name(){return Ye.SummaryOpen}constructor(k,B,U,F,G,j,$,H){super(),this.menuTarget=null,this.mainPlayer=null,this.combatBounty=null,this.playerWon=!1,this.titanInfo=null,this.logger=null,this.menuTarget=B,this.mainPlayer=U,this.combatBounty=F,this.playerWon=G,this.audioPlayer=j,this.titanInfo=$,this.logger=H}enter(){const k=new G._mx(this.menuTarget);k.name="CoOpSummary",k.addComponent(G.K16);k.addComponent(G.bE_).Container.bind("SummaryPlayer").toConstantValue(this.mainPlayer);const B=class{constructor(){}static create(k){const B=new G._mx(k);B.addComponent(G.K16),B.name="SummaryMenu";const U=B.addComponent(Pe),F=new G._mx(k);F.addComponent(G.K16),F.name="HeartsPopUp",F.addComponent(ii);const j=new G._mx(k);j.addComponent(G.K16),j.name="SpellsPopUp",j.addComponent(ii);const $=k.addComponent(G.Fid);return $.Identifier="SummaryPopUps",$.Components=[F.addComponent(hi),j.addComponent(ui)],U}}.create(k);B.StarsGained=this.combatBounty.getStars(),B.open();const U=this.titanInfo.getTitanID();this.playerWon&&(this.audioPlayer.playMusic(1),U>0&&V.q.instance.prodigy.titansNetworkHandler.hitTitan(U)),this.logger.logMessage(`CoOpTitanSummaryScreenState#enter - Player has ${this.playerWon?"won":"lost"} the battle.\n Titan-api will ${U<=0?"NOT":""} register the hit for titan ${U}`)}exit(){}}class bi extends Je{get NextState(){return Ye.InBattle}constructor(k,B){super(),this.healthBarsEntered=0,this.targetHealthBarsEntered=0,this.logger=null,this.lastLogTime=Date.now(),this.targetHealthBarsEntered=k.length,this.logger=B;for(let U=0;U{++this.healthBarsEntered}))}shouldTransition(){const k=this.healthBarsEntered===this.targetHealthBarsEntered,B=Date.now();if(k||B-this.lastLogTime>3e3){this.lastLogTime=B;let U=`EnterBattleAfterHealthBarsDecision\nTransition to ${this.NextState}? ${k?"YES":"NO"}\n`;U+=`\t - All Health bars entered? ${this.healthBarsEntered===this.targetHealthBarsEntered?"YES":"NO"} (${this.healthBarsEntered} / ${this.targetHealthBarsEntered})`,this.logger.logMessage(U)}return k}}class pi extends Xe{get Name(){return Ye.EnterHealthBars}constructor(k,B){super(),this.healthBars=[],this.logger=null,this.healthBars=k,this.logger=B,this.Decisions=[new bi(k,B)]}enter(){for(let k=0;k{this.animationsCompleted=!0}))}shouldTransition(){const k=this.breadcrumbService.isComplete(vi.B.FEATURE_COOP_BATTLE,vi.B.BREADCRUMB_COOP_BATTLE_START),B=this.animationsCompleted&&k,U=Date.now();if(B||U-this.lastLogTime>3e3){this.lastLogTime=U;let F=`BattleAfterEnteringDecision\nTransition to ${this.NextState}? ${B?"YES":"NO"}\n`;F+=`\t - Animations complete? ${this.animationsCompleted?"YES":"NO"}\n`,F+="\t - BREADCRUMB_COOP_BATTLE_START completed? "+(k?"YES":"NO"),this.logger.logMessage(F)}return B}}class mi extends Je{get NextState(){return Ye.NootBattleTutorial}constructor(k,B,U){super(),this.breadcrumbService=null,this.playersEntered=!1,this.logger=null,this.lastLogTime=Date.now(),this.breadcrumbService=k,this.logger=U,B.OnComplete.addOnce((()=>{this.playersEntered=!0}))}shouldTransition(){const k=this.breadcrumbService.isComplete(vi.B.FEATURE_COOP_BATTLE,vi.B.BREADCRUMB_COOP_BATTLE_START),B=this.playersEntered&&!k,U=Date.now();if(B||U-this.lastLogTime>3e3){this.lastLogTime=U;let F=`GoToTutorialDecision\nTransition to ${this.NextState}? ${B?"YES":"NO"}\n`;F+=`\t - Players have entered? ${this.playersEntered?"YES":"NO"}\n`,F+="\t - BREADCRUMB_COOP_BATTLE_START incomplete? "+(k?"NO":"YES"),this.logger.logMessage(F)}return B}}class yi extends Xe{get Name(){return Ye.EnterPlayers}constructor(k,B,U,F,G){super(),this.playerTeam=null,this.battleUIFactory=null,this.breadcrumbService=null,this.localization=null,this.logger=null,this.playerTeam=k,this.battleUIFactory=U,this.breadcrumbService=B,this.localization=F,this.logger=G}enter(){let k=this.battleUIFactory.showFloatingBanner(this.localization.getText("COMBAT_TITAN_BATTLE")).findComponent(G.bE_).getInjectedValue("Animations");Array.isArray(k)||(k=[k]);const B=[],U=this.playerTeam.Members;for(let G=0;G3e3){this.lastLogTime=k;let B=`OpenQuestionInterfaceDecision\nTransition to ${this.NextState}? ${this.questionOpened?"YES":"NO"}\n`;B+=`\t - Interface is open? ${this.questionOpened?"YES":"NO"}\n`,this.logger.logMessage(B)}return this.questionOpened}markQuestionOpened(){this.questionOpened=!0}handleEasyMode(){0}destroy(){this.questionInterface.OnQuestionOpened.remove(this.markQuestionOpened,this)}}class Ei extends Je{get NextState(){return Ye.PlayActionQueue}constructor(k,B){super(),this.battleActionQueue=null,this.logger=null,this.lastLogTime=Date.now(),this.battleActionQueue=k,this.logger=B}shouldTransition(){const k=this.battleActionQueue.hasQueuedActions(),B=Date.now();if(k||B-this.lastLogTime>3e3){this.lastLogTime=B;let U=`PlayActionQueueDecision\nTransition to ${this.NextState}? ${k?"YES":"NO"}\n`;U+=`\t - Actions are queued? ${k?"YES":"NO"}\n`,this.logger.logMessage(U)}return k}}class wi extends Xe{get Name(){return Ye.InBattle}constructor(k,B,U,F){super(),this.logger=null,this.logger=F,this.Decisions=[new Ei(B,F),new _i(k,F)]}enter(){this.logger.logMessage("InBattleState#enter - Entering the battle state")}exit(){}}class Ti extends Je{get NextState(){return Ye.EnterPlayers}constructor(k,B,U,F,G){super(),this.playersLoaded=!1,this.logger=null,this.lastLogTime=Date.now(),this.currentPlayer=null,this.hostID=null,this.socket=null,this.logger=B,k.then((k=>(this.playersLoaded=!0,k))),this.hostID=U,this.currentPlayer=F,this.socket=G}shouldTransition(){const k=Date.now(),B=this.currentPlayer.getUserID()===this.hostID,U=this.socket.playerList.indexOf(this.hostID)>-1,F=(B||U)&&this.playersLoaded;if(F||k-this.lastLogTime>3e3){this.lastLogTime=k;let G=`PlayersHaveLoadedDecision\nTransition to ${this.NextState}? ${F?"YES":"NO"}\n`;G+=`\t - Players have loaded? ${this.playersLoaded?"YES":"NO"}\n`,G+=`\t - Player is host? ${B?"YES":"NO"}\n`,G+=`\t - Host in room? ${U?"YES":"NO"}\n`,this.logger.logMessage(G)}return F}}class Si extends Je{get NextState(){return Ye.WaitForHost}constructor(k,B,U,F,G){super(),this.playersLoaded=!1,this.logger=null,this.lastLogTime=Date.now(),this.currentPlayer=null,this.hostID=null,this.socket=null,this.logger=B,k.then((k=>(this.playersLoaded=!0,k))),this.hostID=U,this.currentPlayer=F,this.socket=G}shouldTransition(){const k=Date.now(),B=this.currentPlayer.getUserID()!==this.hostID,U=-1===this.socket.playerList.indexOf(this.hostID),F=B&&U&&this.playersLoaded;if(F||k-this.lastLogTime>3e3){this.lastLogTime=k;let G=`PlayersHaveLoadedDecision\nTransition to ${this.NextState}? ${F?"YES":"NO"}\n`;G+=`\t - Players have loaded? ${this.playersLoaded?"YES":"NO"}\n`,G+=`\t - Host is not in the room? ${U?"YES":"NO"}\n`,G+=`\t - Player is host? ${B?"YES":"NO"}\n`,this.logger.logMessage(G)}return F}}class Ai extends Xe{get Name(){return Ye.LoadingPlayers}constructor(k,B,U,F,G,j){super(),this.teamInitializer=null,this.currentPlayer=null,this.teammateData=null,this.logger=null,this.hostID=null,this.socket=null,this.teamInitializer=k,this.currentPlayer=B,this.teammateData=U,this.logger=F,this.hostID=G,this.socket=j}enter(){const k=this.teamInitializer.createCoOpTeam(this.currentPlayer,this.teammateData);this.Decisions=[new Ti(k,this.logger,this.hostID,this.currentPlayer,this.socket),new Si(k,this.logger,this.hostID,this.currentPlayer,this.socket)],this.logger.logMessage(`LoadingPlayerState#enter - Loading data for ${this.teammateData.length+1} player(s)`)}exit(){}}var Ci=U(77078);class Oi extends Je{get NextState(){return Ye.WaitForAction}constructor(k,B){super(),this.questionAnswered=!1,this.logger=null,this.lastLogTime=Date.now(),k.OnQuestionAnswered.addOnce((()=>{this.questionAnswered=!0})),this.logger=B}shouldTransition(){const k=Date.now();if(this.questionAnswered||k-this.lastLogTime>3e3){this.lastLogTime=k;let B=`QuestionAnsweredDecision\nTransition to ${this.NextState}? ${this.questionAnswered?"YES":"NO"}\n`;B+=`\t - Question has been answered? ${this.questionAnswered?"YES":"NO"}\n`,this.logger.logMessage(B)}return this.questionAnswered}}class Ii extends Xe{get Name(){return Ye.NootBattleTutorial}constructor(k,B,U,F,G,j,$,H){super(),this.breadcrumbService=null,this.battleLayer=null,this.game=null,this.tutorialHand=null,this.tutorialHandTween=null,this.dialogueFactory=null,this.logger=null,this.healthBars=[],this.crystalSpine=null,this.breadcrumbService=B,this.battleLayer=U,this.game=k,this.dialogueFactory=F,this.logger=H,this.healthBars=G,this.crystalSpine=j,this.Decisions=[new Oi($,H)]}enter(){this.tutorialHand=new G._mx(this.battleLayer),this.tutorialHand.addComponent(G.K16).group.position.set(550,320),this.tutorialHand.name="TutorialHand";const k=this.tutorialHand.addComponent(gt._);k.setAsset(Ct._.General_icons_json,"help"),k.setAnchor(.5,.5),this.tutorialHandTween=this.game.add.tween(this.tutorialHand.legacyTransform.group,this).to({y:"-=30"},400,G.GS3.Quadratic.InOut,!0,0,-1,!0),this.dialogueFactory.playDialogue("noot",[275,276,277]).then((()=>{this.nootDialogueCompleted()})),this.logger.logMessage("NootTutorialState#enter - Showing co-op titan tutorial dialogue")}exit(){this.tutorialHandTween.destroy(),this.tutorialHand.destroy(),this.breadcrumbService.completeBreadcrumb(vi.B.FEATURE_COOP_BATTLE,vi.B.BREADCRUMB_COOP_BATTLE_START),this.logger.logMessage("NootTutorialState#exit - Completing the BREADCRUMB_COOP_BATTLE_START")}nootDialogueCompleted(){for(let k=0;k{this.allActionsPlayed=!0}))}shouldTransition(){let k=!1;for(let j=0;j3e3){this.lastLogTime=G;let j=`ActionQueueToBannerDecision\nTransition to ${this.NextState}? ${F?"YES":"NO"}\n`;j+=`\t - Any team defeated? ${k?"YES":"NO"}\n`,j+="\t - Action queue is playing? "+(U?"YES":"NO"),j+="\t - Action queue finished playing? "+(B?"NO":"YES"),this.logger.logMessage(j)}return F}}class Ri extends Je{get NextState(){return Ye.InBattle}constructor(k,B,U){super(),this.actionQueue=null,this.battleTeams=null,this.logger=null,this.lastLogTime=Date.now(),this.allActionsPlayed=!1,this.actionQueue=k,this.battleTeams=B,this.logger=U,this.actionQueue.OnQueueComplete.addOnce((()=>{this.allActionsPlayed=!0}))}shouldTransition(){let k=!1;for(let j=0;j3e3){this.lastLogTime=G;let j=`ActionQueueToBannerDecision\nTransition to ${this.NextState}? ${F?"YES":"NO"}\n`;j+=`\t - Any team defeated? ${k?"YES":"NO"}\n`,j+="\t - Action queue is playing? "+(U?"YES":"NO"),j+="\t - Action queue finished playing? "+(B?"NO":"YES"),this.logger.logMessage(j)}return F}}class Pi extends Xe{get Name(){return Ye.PlayActionQueue}constructor(k,B,U){super(),this.battleActionQueue=null,this.logger=null,this.Decisions=[new Ri(k,B,U),new Di(k,B,U)],this.battleActionQueue=k,this.logger=U}enter(){this.battleActionQueue.playAllActions(),this.logger.logMessage(`PlayingActionQueueState#enter - Playing ${this.battleActionQueue.Actions.length} queued actions`)}exit(){}}class Mi extends Je{get NextState(){return Ye.SummaryOpen}constructor(k,B){super(),this.animationCompleted=!1,this.logger=null,this.lastLogTime=Date.now(),this.logger=B;new wt(k).OnComplete.addOnce((()=>{this.animationCompleted=!0}))}shouldTransition(){const k=Date.now();if(this.animationCompleted||k-this.lastLogTime>3e3){this.lastLogTime=k;let B=`GoToSummaryScreenDecision\nTransition to ${this.NextState}? ${this.animationCompleted?"YES":"NO"}\n`;B+=`\t - Animations complete? ${this.animationCompleted?"YES":"NO"}\n`,this.logger.logMessage(B)}return this.animationCompleted}}class Ni extends Xe{get Name(){return Ye.ShowEndGameBanner}constructor(k,B,U,F,G){super(),this.battleUIFactory=null,this.playerWon=!1,this.localization=null,this.healthBars=null,this.logger=null,this.playerWon=U,this.battleUIFactory=k,this.localization=B,this.healthBars=F,this.logger=G}enter(){let k="";k=this.playerWon?this.localization.getText("COMBAT_TITAN_HIT"):this.localization.getText("COMBAT_LOST");let B=this.battleUIFactory.showFloatingBanner(k).findComponent(G.bE_).getInjectedValue("Animations");Array.isArray(B)||(B=[B]),B=B.slice();for(let U=0;U-1}}class ki extends Xe{get Name(){return Ye.WaitForHost}constructor(k,B,U){super(),this.spinner=null,this.battleLayer=null,this.battleLayer=k,this.Decisions=[new Li(B,U)]}enter(){this.spinner=new G._mx(this.battleLayer),this.spinner.addComponent(G.K16).group.position.set(250,420),this.spinner.name="LoadingSpinner";const k=this.spinner.addComponent(gt._);k.setAnchor(.5,.5),k.setAsset(Ct._.General_core_json,"loading"),V.q.instance.game.add.tween(this.spinner.legacyTransform.group,this.spinner).to({angle:360},2e3,G.GS3.Linear.None,!0,0,-1)}exit(){this.spinner&&(V.q.instance.game.tweens.removeAllFromOwner(this.spinner),this.spinner.destroy(),this.spinner=null)}}class Bi extends Ze{constructor(){super(...arguments),this.battleLayer=null}get InitialState(){return Ye.LoadingPlayers}get BattleLayer(){return this.battleLayer}set BattleLayer(k){this.battleLayer=k}createState(k){switch(k){case Ye.LoadingPlayers:return this.createLoadingPlayersState();case Ye.WaitForHost:return this.createWaitForHostState();case Ye.EnterPlayers:return this.createEnterPlayersState();case Ye.NootBattleTutorial:return this.createNootTutorialState();case Ye.EnterHealthBars:return this.createEnterHealthBarsState();case Ye.InBattle:return this.createInBattleState();case Ye.AnsweringQuestion:return this.createAnswerQuestionState();case Ye.WaitForAction:return this.createWaitForActionState();case Ye.PlayActionQueue:return this.createPlayActionQueueState();case Ye.ShowEndGameBanner:return this.createEndGameBannerState();case Ye.SummaryOpen:return this.createSummaryOpenState();default:return null}}createLoadingPlayersState(k,B,U,F,G,j,$){return new Ai(B,U,F,G,$,j)}createWaitForHostState(k,B){return new ki(this.battleLayer,k,B)}createEnterPlayersState(k,B,U,F,G){return new yi(j.find(k,(k=>0===k.ID)),B,F,U,G)}createNootTutorialState(k,B,U,F,G,$){const H=j.find(G,(k=>0===k.ID)).ActiveMember.GameObject.findComponent(Qe.j);return new Ii(V.q.instance.game,k,this.battleLayer,B,F,H,U,$)}createInBattleState(k,B,U,F){return new wi(k,B,U,F)}createAnswerQuestionState(k,B){return new ei(k,B)}createWaitForActionState(k,B){return new xi(k,B)}createPlayActionQueueState(k,B,U){return new Pi(k,B,U)}createEndGameBannerState(k,B,U,F,G){const $=j.find(B,(k=>1===k.ID));return new Ni(k,U,$.IsDefeated(),F,G)}createSummaryOpenState(k,B,U,F,G,$,H){const W=j.find(F,(k=>1===k.ID));return new fi(V.q.instance.game,k,B,U,W.IsDefeated(),G,$,H)}createEnterHealthBarsState(k,B){return new pi(k,B)}}(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("Teams")),(0,F.Qj)(1,(0,G.vQZ)("CoOpTeamInitializer")),(0,F.Qj)(2,(0,G.vQZ)("CurrentPlayer")),(0,F.Qj)(3,(0,G.vQZ)("CoOpTeammateData")),(0,F.Qj)(4,(0,G.vQZ)("CoOpLogging")),(0,F.Qj)(5,(0,G.vQZ)("c5f-aceb")),(0,F.Qj)(6,(0,G.vQZ)("HostID")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Array,Object,Object,Array,de.h,Object,Number]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createLoadingPlayersState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("c5f-aceb")),(0,F.Qj)(1,(0,G.vQZ)("HostID")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Object,Number]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createWaitForHostState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("Teams")),(0,F.Qj)(1,(0,G.vQZ)("BreadcrumbService")),(0,F.Qj)(2,(0,G.vQZ)("Localization")),(0,F.Qj)(3,(0,G.vQZ)("BattleUIFactory")),(0,F.Qj)(4,(0,G.vQZ)("CoOpLogging")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Array,Object,G.dTp,Object,de.h]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createEnterPlayersState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("BreadcrumbService")),(0,F.Qj)(1,(0,G.vQZ)("DialogueFactory")),(0,F.Qj)(2,(0,G.vQZ)("QuestionInterface")),(0,F.Qj)(3,(0,G.vQZ)("ActiveHealthBars")),(0,F.Qj)(4,(0,G.vQZ)("Teams")),(0,F.Qj)(5,(0,G.vQZ)("CoOpLogging")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Object,Object,Object,Array,Array,de.h]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createNootTutorialState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("QuestionInterface")),(0,F.Qj)(1,(0,G.vQZ)("BattleActionQueue")),(0,F.Qj)(2,(0,G.vQZ)("Teams")),(0,F.Qj)(3,(0,G.vQZ)("CoOpLogging")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Object,Qt,Array,de.h]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createInBattleState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("QuestionInterface")),(0,F.Qj)(1,(0,G.vQZ)("CoOpLogging")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Object,de.h]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createAnswerQuestionState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("BattleActionQueue")),(0,F.Qj)(1,(0,G.vQZ)("CoOpLogging")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Qt,de.h]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createWaitForActionState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("BattleActionQueue")),(0,F.Qj)(1,(0,G.vQZ)("Teams")),(0,F.Qj)(2,(0,G.vQZ)("CoOpLogging")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Qt,Array,de.h]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createPlayActionQueueState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("BattleUIFactory")),(0,F.Qj)(1,(0,G.vQZ)("Teams")),(0,F.Qj)(2,(0,G.vQZ)("Localization")),(0,F.Qj)(3,(0,G.vQZ)("ActiveHealthBars")),(0,F.Qj)(4,(0,G.vQZ)("CoOpLogging")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Object,Array,G.dTp,Array,de.h]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createEndGameBannerState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("MenuLayer")),(0,F.Qj)(1,(0,G.vQZ)("CurrentPlayer")),(0,F.Qj)(2,(0,G.vQZ)("CombatBounty")),(0,F.Qj)(3,(0,G.vQZ)("Teams")),(0,F.Qj)(4,(0,G.vQZ)("AudioPlayer")),(0,F.Qj)(5,(0,G.vQZ)("TitanInfo")),(0,F.Qj)(6,(0,G.vQZ)("CoOpLogging")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[G._mx,Object,Object,Array,Object,Object,de.h]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createSummaryOpenState",null),(0,F.Cg)([G.IJn,(0,F.Qj)(0,(0,G.vQZ)("ActiveHealthBars")),(0,F.Qj)(1,(0,G.vQZ)("CoOpLogging")),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Array,de.h]),(0,F.Sn)("design:returntype",Xe)],Bi.prototype,"createEnterHealthBarsState",null);var Ui=U(34574);class Fi extends G.JTX{constructor(){super(...arguments),this.coOpTeam=new Ui.d,this.hostDisbanded=!1}getTeam(){return this.coOpTeam}getTeamStreak(){return this.teamStreak}hasDisbanded(){return this.hostDisbanded}isHost(){return!1}create(){super.create(),this.socket.onMessage.add(this.messageReceived,this)}destroy(){this.socket.onMessage.remove(this.messageReceived,this),super.destroy()}leaveTeam(){const k={action:le.x.PlayerLeftTeam,target:this.hostID};this.socket.broadcastMessage(k)}rejoinTeam(){const k={action:le.x.PlayerRejoinTeam,target:this.hostID};this.socket.broadcastMessage(k),null!==this.coOpTeam&&this.coOpTeam.readyUpPlayer(this.currentPlayer.getUserID())}messageReceived(k){k.action===le.x.TeamDisbanded?(this.coOpTeam.destroy(),this.coOpTeam=null,this.hostDisbanded=!0):k.action===le.x.TeamUpdated&&(this.coOpTeam.TeamMembers=k.data.teamMembers.slice(),this.coOpTeam.ReadyMembers=k.data.readyMembers.slice())}}(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],Fi.prototype,"socket",void 0),(0,F.Cg)([(0,G.fFd)("CurrentPlayer"),(0,F.Sn)("design:type",Object)],Fi.prototype,"currentPlayer",void 0),(0,F.Cg)([(0,G.fFd)("HostID"),(0,F.Sn)("design:type",Number)],Fi.prototype,"hostID",void 0),(0,F.Cg)([(0,G.fFd)("TeamStreak"),(0,F.Sn)("design:type",Number)],Fi.prototype,"teamStreak",void 0);class Gi extends ce.${constructor(){super(...arguments),this.endDelay=800}get EndDelay(){return this.endDelay}set EndDelay(k){this.endDelay=k}receivedMessage(k){k.action===le.x.TitanDefeated?(this.coOpSocketLogger.logMessage("Received the titan defeat message. Battle should resolve with the players being victorious."),this.actionQueue.addAction(new re(this.battleTeams,this.spellFactory,V.q.instance.game.time.events,this.audioPlayer,this.uiFactory))):k.action===le.x.PlayersDefeated&&(this.coOpSocketLogger.logMessage("Received the player defeat message. Battle should resolve with the players being defeated."),this.actionQueue.addAction(new ne(this.battleTeams,this.spellFactory,V.q.instance.game.time.events,this.endDelay,this.audioPlayer)))}}(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],Gi.prototype,"battleTeams",void 0),(0,F.Cg)([(0,G.fFd)("BattleActionQueue"),(0,F.Sn)("design:type",Qt)],Gi.prototype,"actionQueue",void 0),(0,F.Cg)([(0,G.fFd)("SpellFactory"),(0,F.Sn)("design:type",Object)],Gi.prototype,"spellFactory",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],Gi.prototype,"audioPlayer",void 0),(0,F.Cg)([(0,G.fFd)("BattleUIFactory"),(0,F.Sn)("design:type",Object)],Gi.prototype,"uiFactory",void 0),(0,F.Cg)([(0,G.fFd)("CoOpSocketLogging"),(0,F.Sn)("design:type",de.h)],Gi.prototype,"coOpSocketLogger",void 0);class ji extends G.JTX{constructor(){super(...arguments),this.titanHP=null,this.titanDamage=0,this.crystalHP=null,this.crystalDamage=0}create(){super.create(),this.socket.onMessage.add(this.handleMessage,this),this.questionInterface.OnQuestionOpened.add(this.questionOpened,this),this.stateMachine.OnStateChange.add(this.stateChanged,this)}destroy(){this.socket.onMessage.remove(this.handleMessage,this),this.questionInterface.OnQuestionOpened.remove(this.questionOpened,this),this.stateMachine.OnStateChange.remove(this.stateChanged,this),super.destroy()}handleMessage(k){switch(k.action){case le.x.SyncHealth:{const B=j.find(this.battleTeams,(k=>0===k.ID)),U=j.find(this.battleTeams,(k=>1===k.ID));if(k.data.titanHP!==U.ActiveMember.Health.CurrentValue&&(this.titanHP=k.data.titanHP),k.data.crystalHP!==B.ActiveMember.Health.CurrentValue&&(this.crystalHP=k.data.crystalHP),this.coOpSocketLogger.logMessage(`Received HP sync message.\n \n\tTitan value should be ${k.data.titanHP}. Titan value is ${U.ActiveMember.Health.CurrentValue}. HP will sync? ${null===this.titanHP?"NO":"YES"}\n \n\tCrystal value should be ${k.data.crystalHP}. Crystal value is ${B.ActiveMember.Health.CurrentValue}. HP will sync? ${null===this.crystalHP?"NO":"YES"}\n `),null===this.crystalHP&&null===this.titanHP)return void this.destroy();this.questionInterface.isOpen()&&(this.coOpSocketLogger.logMessage("Received sync message with question open. Will adjust immediately."),this.questionOpened());break}case le.x.PlayerAttacked:this.titanDamage+=k.data.damage,this.coOpSocketLogger.logMessage(`Player attacked message received. Pending titan damage is now ${this.titanDamage}`);break;case le.x.TitanAttacked:this.crystalDamage+=k.data.damage,this.coOpSocketLogger.logMessage(`Titan attacked message received. Pending crystal damage is now ${this.crystalDamage}`)}}stateChanged(){this.stateMachine.CurrentState===Ye.PlayActionQueue&&(null!==this.crystalHP&&(this.crystalHP-=this.crystalDamage,this.coOpSocketLogger.logMessage(`Action queue is being played. Applying ${this.crystalDamage} pending crystal damage to sync HP. New value is ${this.crystalHP}`)),null!==this.titanHP&&(this.titanHP-=this.titanDamage,this.coOpSocketLogger.logMessage(`Action queue is being played. Applying ${this.titanDamage} pending titan damage to sync HP. New value is ${this.titanHP}`)),this.titanDamage=0,this.crystalDamage=0)}questionOpened(){null!==this.titanHP&&(this.coOpSocketLogger.logMessage(`Applying HP sync to titan. Sync HP is ${this.titanHP}. Pending damage is ${this.titanDamage}. Will fix HP to new value ${this.titanHP-this.titanDamage}`),this.updateCurrentHealth(1,this.titanHP-this.titanDamage),this.titanHP=null),null!==this.crystalHP&&(this.coOpSocketLogger.logMessage(`Applying HP sync to crystal. Sync HP is ${this.crystalHP}. Pending damage is ${this.crystalDamage}. Will fix HP to new value ${this.crystalHP-this.crystalDamage}`),this.updateCurrentHealth(0,this.crystalHP-this.crystalDamage),this.crystalHP=null),this.destroy()}updateCurrentHealth(k,B){const U=j.find(this.battleTeams,(B=>B.ID===k)).ActiveMember.Health;U.CurrentValue!==B&&(U.CurrentValue=B)}}(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],ji.prototype,"socket",void 0),(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],ji.prototype,"battleTeams",void 0),(0,F.Cg)([(0,G.fFd)("QuestionInterface"),(0,F.Sn)("design:type",Object)],ji.prototype,"questionInterface",void 0),(0,F.Cg)([(0,G.fFd)("BattleStateMachine"),(0,F.Sn)("design:type",Bi)],ji.prototype,"stateMachine",void 0),(0,F.Cg)([(0,G.fFd)("CoOpSocketLogging"),(0,F.Sn)("design:type",de.h)],ji.prototype,"coOpSocketLogger",void 0);class $i extends G.JTX{create(){super.create(),this.questionInterface.OnQuestionAnswered.add(this.questionWasAnswered,this)}destroy(){this.questionInterface.OnQuestionAnswered.remove(this.questionWasAnswered,this),super.destroy()}questionWasAnswered(k){const B={action:le.x.QuestionAnswered,target:this.hostID,data:{sourcePlayerID:this.currentPlayer.getUserID(),correct:k}};this.socket.sendMessage(B)}}(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],$i.prototype,"socket",void 0),(0,F.Cg)([(0,G.fFd)("CurrentPlayer"),(0,F.Sn)("design:type",Object)],$i.prototype,"currentPlayer",void 0),(0,F.Cg)([(0,G.fFd)("HostID"),(0,F.Sn)("design:type",Number)],$i.prototype,"hostID",void 0),(0,F.Cg)([(0,G.fFd)("QuestionInterface"),(0,F.Sn)("design:type",Object)],$i.prototype,"questionInterface",void 0);var Hi=U(95066),Vi=U(36525),Wi=U(65443);class qi extends G.JTX{constructor(){super(...arguments),this.heartbeatExpiryTime=null,this.hostDisconnected=!1,this.hasReceivedHeartbeat=!1}create(){super.create(),this.socketService.onPlayerDisconnect.add(this.playerDisconnected,this),this.socketService.onMessage.add(this.socketMessageReceived,this),this.heartbeatExpiryTime=Date.now()+this.hostDisconnectTimer}update(){if(super.update(),Date.now()>this.heartbeatExpiryTime&&null!==this.heartbeatExpiryTime&&this.canShowDialogue()){const k=new Vi.i;k.setKey("prodigy_game.coOp.hostHeartbeatTimeout"),k.setValue(1),this.dataDogLogger.logStat(k,Hi.d.Increment),this.showHostDisconnectMessage()}}destroy(){this.socketService.onPlayerDisconnect.remove(this.playerDisconnected,this),this.socketService.onMessage.remove(this.socketMessageReceived,this),super.destroy()}playerDisconnected(k){k===this.hostID&&this.hasReceivedHeartbeat&&this.canShowDialogue()&&this.showHostDisconnectMessage()}socketMessageReceived(k){k.action===le.x.HostHeartbeat&&null!==this.hostDisconnectTimer&&(this.heartbeatExpiryTime=Date.now()+this.hostDisconnectTimer,this.hasReceivedHeartbeat=!0)}showHostDisconnectMessage(){this.hostDisconnected=!0,this.socketService.leaveRoom();const k=this.menuFactory.showMessage("HOST_DISCONNECTED_MESSAGE","","BUTTON_OKAY_CAPITAL");k.OnClose.addOnce((()=>{V.q.instance.prodigy.world.it(this.afterBattleMap)})),k.open(),V.q.instance.prodigy.gameContainer.get("c47-20b6").battle.sendCoopTeamHostLeftEvent(Wi.$.Titan,this.hostID)}canShowDialogue(){return!this.hostDisconnected&&null!==this.teamInfo&&!(this.teamInfo.isPlayerTeamDefeated()||this.teamInfo.isTitanTeamDefeated())}}(0,F.Cg)([(0,G.fFd)("ClientHeartbeatDisconnectTime"),(0,F.Sn)("design:type",Number)],qi.prototype,"hostDisconnectTimer",void 0),(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],qi.prototype,"socketService",void 0),(0,F.Cg)([(0,G.fFd)("HostID"),(0,F.Sn)("design:type",Number)],qi.prototype,"hostID",void 0),(0,F.Cg)([(0,G.fFd)("d30-0043"),(0,F.Sn)("design:type",Object)],qi.prototype,"menuFactory",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamInfo"),(0,F.Sn)("design:type",oe)],qi.prototype,"teamInfo",void 0),(0,F.Cg)([(0,G.fFd)("AfterBattleDestination"),(0,F.Sn)("design:type",String)],qi.prototype,"afterBattleMap",void 0),(0,F.Cg)([(0,G.fFd)("DataDogLogger"),(0,F.Sn)("design:type",Object)],qi.prototype,"dataDogLogger",void 0);class Ki extends G.JTX{constructor(){super(...arguments),this.onComplete=new G.HN0,this.hasCrystalShattered=!1,this.shatterSkinningDelay=0}get OnComplete(){return this.onComplete}get ShatterSkinningDelay(){return this.shatterSkinningDelay}set ShatterSkinningDelay(k){this.shatterSkinningDelay=k}play(){this.animator.OnAnimationComplete.addOnce((()=>{this.hasCrystalShattered=!0,this.onComplete.dispatch()})),V.q.instance.game.time.events.addTimer(this.shatterSkinningDelay,(()=>{this.animator.applySkin("finalbreak")}),this),this.animator.playAnimation("final_break",!1)}hasFinishedPlaying(){return this.hasCrystalShattered}destroy(){this.onComplete.dispose(),super.destroy()}}(0,F.Cg)([(0,G.fFd)("Animators"),(0,F.Sn)("design:type",Qe.j)],Ki.prototype,"animator",void 0);class zi extends G.uAl{constructor(){super(...arguments),this.animationPlayed=!1,this.onComplete=new G.HN0}get OnComplete(){return this.onComplete}create(){super.create()}play(){this.animationPlayed=!0,this.onComplete.dispatch()}hasFinishedPlaying(){return this.animationPlayed}destroy(){this.onComplete.dispose(),super.destroy()}}class Yi extends G.JTX{constructor(){super(...arguments),this.crystalInput=null}create(){super.create(),this.crystalInput=this.GameObject.findComponent(Ci.p),this.battleStateMachine.OnStateChange.add(this.battleStateChanged,this),this.crystalInput.onClicked.add(this.crystalClicked,this)}destroy(){this.battleStateMachine.OnStateChange.remove(this.battleStateChanged,this),this.crystalInput.onClicked.remove(this.crystalClicked,this),super.destroy()}battleStateChanged(){this.crystalInput.InputEnabled=this.battleStateMachine.CurrentState===Ye.InBattle,this.battleStateMachine.CurrentState!==Ye.InBattle&&this.battleStateMachine.CurrentState!==Ye.PlayActionQueue&&this.battleStateMachine.CurrentState!==Ye.AnsweringQuestion||(0,ot.sR)(this.animators,this.crystalInput.InputEnabled?"idle_sparkle":"idle",!0)}crystalClicked(){this.audioPlayer.playSoundEffectClip(18,"pop"),this.questionInterface.open({revampBattleOverride:!1})}}(0,F.Cg)([(0,G.fFd)("BattleStateMachine"),(0,F.Sn)("design:type",Ze)],Yi.prototype,"battleStateMachine",void 0),(0,F.Cg)([(0,G.fFd)("QuestionInterface"),(0,F.Sn)("design:type",Object)],Yi.prototype,"questionInterface",void 0),(0,F.Cg)([(0,G.fFd)("Animators"),(0,F.Sn)("design:type",Array)],Yi.prototype,"animators",void 0),(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],Yi.prototype,"audioPlayer",void 0);class Qi extends G.uAl{constructor(){super(...arguments),this.onComplete=new G.HN0,this.glowDuration=0,this.spineAnimator=null,this.glowDurationElapsed=!1}get OnComplete(){return this.onComplete}get GlowDuration(){return this.glowDuration}set GlowDuration(k){this.glowDuration=k}get SpineAnimator(){return this.spineAnimator}set SpineAnimator(k){this.spineAnimator=k}play(){this.spineAnimator.applySkin("glow"),V.q.instance.game.time.events.addTimer(this.glowDuration,(()=>{this.onComplete.dispatch(),this.glowDurationElapsed=!0}),this)}hasFinishedPlaying(){return this.glowDurationElapsed}destroy(){this.onComplete.dispose(),super.destroy()}}class Xi extends G.JTX{constructor(){super(...arguments),this.onComplete=new G.HN0,this.spineAnimator=null,this.wasPlayed=!1}get OnComplete(){return this.onComplete}get SpineAnimator(){return this.spineAnimator}set SpineAnimator(k){this.spineAnimator=k}play(){this.spineAnimator.applySkin("crystal"),this.spineAnimator.OnAnimationComplete.addOnce((()=>{this.onComplete.dispatch(),this.wasPlayed=!0})),this.spineAnimator.playAnimation("idle",!0)}hasFinishedPlaying(){return this.wasPlayed}destroy(){this.onComplete.dispose(),super.destroy()}}class Zi extends G.JTX{constructor(){super(...arguments),this.localizationKey="",this.onChange=new G.HN0}get LocalizationKey(){return this.localizationKey}set LocalizationKey(k){this.localizationKey=k,this.onChange.dispatch()}get OnChanged(){return this.onChange}getName(){return this.localizer.getText(this.localizationKey)}destroy(){this.onChange.dispose(),super.destroy()}}(0,F.Cg)([(0,G.fFd)("Localization"),(0,F.Sn)("design:type",G.dTp)],Zi.prototype,"localizer",void 0);var Ji=U(28402),ts=U(56942);class es extends G.uAl{constructor(){super(...arguments),this.segmentedBar=null,this.fillMask=null,this.changeSpeed=0,this.onChangeComplete=new G.HN0,this.previousHealth=null}get SegmentedBar(){return this.segmentedBar}set SegmentedBar(k){this.segmentedBar=k}get FillMask(){return this.fillMask}set FillMask(k){this.fillMask=k}get HealthChangeSpeed(){return this.changeSpeed}set HealthChangeSpeed(k){this.changeSpeed=k}get OnHealthChangeComplete(){return this.onChangeComplete}setMaxHealth(k){this.segmentedBar.Segments=k}setCurrentHealth(k){if(null===this.previousHealth)this.fillMask.setFillPercent(k/this.segmentedBar.Segments),this.OnHealthChangeComplete.dispatch();else{const B=k/this.segmentedBar.Segments,U={percent:this.previousHealth/this.segmentedBar.Segments};V.q.instance.game.add.tween(U,this).to({percent:B},this.changeSpeed,G.GS3.Quadratic.Out,!0).onUpdateCallback((()=>{this.fillMask.setFillPercent(U.percent)})).onTweenComplete.addOnce((()=>{this.fillMask.setFillPercent(B),this.OnHealthChangeComplete.dispatch()}))}this.previousHealth=k}destroy(){this.onChangeComplete.dispose(),super.destroy()}}var is=U(50873),ss=U(18280),ns=U(47332),as=U(9976);class rs{constructor(){}static create(k,B,U){const F=new G._mx(k);F.addComponent(G.K16),F.name="HealthBar",F.addComponent(G.bE_);const j=new G._mx(F);j.addComponent(G.K16),j.legacyTransform.y=j.legacyTransform.y+2,j.name="Background";const $=j.addComponent(Ke);$.Size=400,$.setAsset(Ct._.Ui_bam_json,"scroll-tracks/scroll-hpbar-middle",null,"scroll-tracks/scroll-hpbar-right");const H=new G._mx(F);H.addComponent(G.K16),H.name="Health";const V=H.addComponent(ze);V.GapSize=1,V.Atlas=Ct._.Ui_bam_json,V.BarStartCapFrame="scroll-tracks/scroll-hpbar-fill-end-left",V.BarEndCapFrame="scroll-tracks/scroll-hpbar-fill-right",V.SegmentStartFrame="scroll-tracks/scroll-hpbar-fill-trim-left",V.SegmentEndFrame="scroll-tracks/scroll-hpbar-fill-trim-right",V.FillFrame="scroll-tracks/scroll-hpbar-fill-middle",V.BarSize=400;const W=new G._mx(H);W.addComponent(G.K16),W.name="Mask";const q=W.addComponent(ss.n),z=W.addComponent(is.k);z.Width=400,z.Height=47,V.applyMask(q);const Y=F.addComponent(es);Y.HealthChangeSpeed=700,Y.FillMask=z,Y.SegmentedBar=V;const Q=F.addComponent(G.Fid);Q.Identifier="HealthBar",Q.Components=[Y];const X=F.addComponent(Zi);X.LocalizationKey=B;const Z=F.addComponent(G.Fid);Z.Identifier="Name",Z.Components=[X];const J=new G._mx(F);J.addComponent(G.K16),J.name="ActiveMemberName",J.legacyTransform.y=-45,J.legacyTransform.x=U?-82:-77;const tt=J.addComponent(as.E);tt.TextConfig=K.t.getItem("fontStyle",16).data,tt.Alignment=ns.T.MiddleCenter;return F.addComponent(Vt).NameLabel=tt,F}}class os extends G.JTX{constructor(){super(...arguments),this.coOpTeam=new Ui.d,this.hostDisbanded=!1}getTeam(){return this.coOpTeam}getTeamStreak(){return this.teamStreak}hasDisbanded(){return this.hostDisbanded}isHost(){return!0}create(){super.create(),this.socket.onMessage.add(this.messageReceived,this),this.coOpTeam.OnTeamMemberLeft.add(this.broadcastTeamUpdate,this),this.coOpTeam.OnTeamMemberReady.add(this.broadcastTeamUpdate,this)}destroy(){this.socket.onMessage.remove(this.messageReceived,this),this.coOpTeam.destroy(),super.destroy()}leaveTeam(){const k={action:le.x.TeamDisbanded,data:{hostID:this.currentPlayer.getUserID()}};this.socket.broadcastMessage(k)}rejoinTeam(){var k;null===(k=this.coOpTeam)||void 0===k||k.readyUpPlayer(this.currentPlayer.getUserID())}messageReceived(k){switch(k.action){case le.x.PlayerLeftTeam:this.coOpTeam.removePlayer(k.data.userID);break;case le.x.PlayerRejoinTeam:this.coOpTeam.readyUpPlayer(k.data.userID)}}broadcastTeamUpdate(){const k={action:le.x.TeamUpdated,data:{hostID:this.coOpTeam.HostID,teamMembers:this.coOpTeam.TeamMembers,readyMembers:this.coOpTeam.ReadyMembers,streak:this.coOpTeam.Streak}};this.socket.broadcastMessage(k)}}(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],os.prototype,"socket",void 0),(0,F.Cg)([(0,G.fFd)("CurrentPlayer"),(0,F.Sn)("design:type",Object)],os.prototype,"currentPlayer",void 0),(0,F.Cg)([(0,G.fFd)("TeamStreak"),(0,F.Sn)("design:type",Number)],os.prototype,"teamStreak",void 0);class hs extends G.JTX{constructor(){super(...arguments),this.currentTimer=null}create(){super.create(),this.battleStateMachine.OnStateChange.add(this.battleStateChanged,this),this.currentTimer=window.setInterval((()=>{this.broadcastHeartbeat()}),this.heartbeatTime),this.logger.logMessage(`Host will send heartbeat every ${this.heartbeatTime/1e3} second(s)`)}destroy(){null!==this.currentTimer&&window.clearInterval(this.currentTimer),this.battleStateMachine.OnStateChange.remove(this.battleStateChanged,this),super.destroy()}broadcastHeartbeat(){this.socketService.broadcastMessage({action:le.x.HostHeartbeat})}battleStateChanged(){this.battleStateMachine.CurrentState===Ye.SummaryOpen&&this.destroy()}}(0,F.Cg)([(0,G.fFd)("HostHeartbeatTime"),(0,F.Sn)("design:type",Number)],hs.prototype,"heartbeatTime",void 0),(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],hs.prototype,"socketService",void 0),(0,F.Cg)([(0,G.fFd)("BattleStateMachine"),(0,F.Sn)("design:type",Ze)],hs.prototype,"battleStateMachine",void 0),(0,F.Cg)([(0,G.fFd)("CoOpLogging"),(0,F.Sn)("design:type",de.h)],hs.prototype,"logger",void 0);class cs extends G.JTX{create(){super.create(),this.socket.onPlayerJoined.add(this.playerJoined,this)}destroy(){this.socket.onPlayerJoined.remove(this.playerJoined,this),super.destroy()}playerJoined(k){const B=this.battleTeamInfo.getRemainingTitanHP(),U=this.battleTeamInfo.getRemainingPlayerHP();this.coOpSocketLogger.logMessage(`Sending HP sync to player ${k}. Titan: ${B}. Crystal: ${U}`);const F={action:le.x.SyncHealth,target:k,data:{titanHP:B,crystalHP:U}};this.socket.sendMessage(F)}}(0,F.Cg)([(0,G.fFd)("c5f-aceb"),(0,F.Sn)("design:type",Object)],cs.prototype,"socket",void 0),(0,F.Cg)([(0,G.fFd)("BattleTeamInfo"),(0,F.Sn)("design:type",oe)],cs.prototype,"battleTeamInfo",void 0),(0,F.Cg)([(0,G.fFd)("CoOpSocketLogging"),(0,F.Sn)("design:type",de.h)],cs.prototype,"coOpSocketLogger",void 0);class ds extends G.JTX{constructor(){super(...arguments),this.onComplete=new G.HN0,this.barrierAnimator=null,this.barrierSpark=null,this.animationPlayed=!1}get OnComplete(){return this.onComplete}get BarrierAnimator(){return this.barrierAnimator}set BarrierAnimator(k){this.barrierAnimator=k}get BarrierSpark(){return this.barrierSpark}set BarrierSpark(k){this.barrierSpark=k}play(){const k=[];k.push(new Promise((k=>{const B=this.barrierAnimator.GameObject.findComponent(gt._);B.setAlpha(1),this.barrierAnimator.OnAnimationComplete.addOnce((()=>{B.setAlpha(0),k()})),this.barrierAnimator.playAnimation("break",!1)}))),k.push(new Promise((k=>{const B=this.barrierSpark.GameObject.findComponent(gt._);B.setAlpha(1),this.barrierSpark.OnAnimationComplete.addOnce((()=>{B.setAlpha(0),k()})),this.barrierSpark.playAnimation("spark",!1)}))),Promise.all(k).then((()=>(0,F.sH)(this,void 0,void 0,(function*(){return(0,ot.ye)(this.animators,"knockout")})))).then((()=>(0,F.sH)(this,void 0,void 0,(function*(){this.animationPlayed=!0,this.onComplete.dispatch()})))).catch((()=>{G.VyI.log("TitanDefeatAnimationState - Warning: Could not play all animations",G.$bb.Warning)}))}hasFinishedPlaying(){return this.animationPlayed}destroy(){this.onComplete.dispose(),super.destroy()}}(0,F.Cg)([(0,G.fFd)("Animators"),(0,F.Sn)("design:type",Object)],ds.prototype,"animators",void 0);class ls extends G.JTX{constructor(){super(...arguments),this.onComplete=new G.HN0,this.titanBarrier=null,this.titanSpark=null,this.hasPlayed=!1}get OnComplete(){return this.onComplete}get TitanBarrier(){return this.titanBarrier}set TitanBarrier(k){this.titanBarrier=k}get TitanSpark(){return this.titanSpark}set TitanSpark(k){this.titanSpark=k}play(){const k=[];k.push(new Promise((k=>{const B=this.titanSpark.GameObject.findComponent(gt._);B.setAlpha(1),this.titanSpark.OnAnimationComplete.addOnce((()=>{B.setAlpha(0),k()})),this.titanSpark.playAnimation("spark",!1)}))),k.push(new Promise((k=>{const B=this.titanBarrier.GameObject.findComponent(gt._);B.setAlpha(1),this.titanBarrier.OnAnimationComplete.addOnce((()=>{B.setAlpha(0),k()})),this.titanBarrier.playAnimation("deflect",!1)}))),Promise.all(k).then((()=>{this.hasPlayed=!0,this.onComplete.dispatch()})).catch((()=>{G.VyI.log("TitanTakeDamageAnimationState - Warning: Could not play all animations",G.$bb.Warning)}))}hasFinishedPlaying(){return this.hasPlayed}destroy(){this.onComplete.dispose(),super.destroy()}}var us=U(94393);class fs extends G.JTX{constructor(){super(...arguments),this.teamID=null}get TeamID(){return this.teamID}set TeamID(k){null!==this.teamID&&j.find(this.battleTeams,(k=>k.ID===this.teamID)).OnDefeated.remove(this.titanTeamDefeated,this),this.teamID=k,j.find(this.battleTeams,(k=>k.ID===this.teamID)).OnDefeated.add(this.titanTeamDefeated,this)}destroy(){j.find(this.battleTeams,(k=>k.ID===this.teamID)).OnDefeated.add(this.titanTeamDefeated,this),super.destroy()}titanTeamDefeated(){const k=V.q.instance.prodigy.world.getCurrentZone(),B=V.q.instance.prodigy.gameContainer.get("12b-405a").getMultiplier(k,us.R.Xp),U=this.titanXP*B;this.combatBounty.addStars(U)}}(0,F.Cg)([(0,G.fFd)("CombatBounty"),(0,F.Sn)("design:type",Object)],fs.prototype,"combatBounty",void 0),(0,F.Cg)([(0,G.fFd)("TitanBountyXP"),(0,F.Sn)("design:type",Number)],fs.prototype,"titanXP",void 0),(0,F.Cg)([(0,G.fFd)("Teams"),(0,F.Sn)("design:type",Array)],fs.prototype,"battleTeams",void 0);class bs extends G.PQK{installBindings(){const k=new ct(this.Container);k.AnimationName="idle",k.LoopAnimation=!0,this.Container.bind("IdleAnimationState").toConstantValue(k);const B=new ct(this.Container);B.AnimationName="attack",B.LoopAnimation=!1,this.Container.bind("AttackAnimationState").toConstantValue(B),this.Container.bind("CastPoint").toConstantValue({x:-100,y:100}),this.Container.bind("ImpactSize").toConstantValue({x:157.5,y:430}),this.Container.bind("ImpactOffset").toConstantValue({x:-175,y:0})}}var ps=U(38042);let vs=class extends G.JTX{constructor(){super(...arguments),this.hideDelay=0}get HideDelay(){return this.hideDelay}set HideDelay(k){this.hideDelay=k}create(){super.create(),this.questionInterface?(this.questionInterface.OnQuestionOpened.add(this.hideGameObject,this),this.questionInterface.OnQuestionAnswered.add(this.showGameObject,this,0,!0)):G.VyI.log("HideWhenQuestionOpen#questionInterface was nullish",G.$bb.Warning)}destroy(){this.questionInterface&&(this.questionInterface.OnQuestionOpened.remove(this.hideGameObject,this),this.questionInterface.OnQuestionAnswered.remove(this.showGameObject,this)),super.destroy()}setVisibility(k){this.GameObject.active=k}hideGameObject(){this.hideDelay>0?V.q.instance.game.time.events.addTimer(this.hideDelay,this.setVisibility,this,!1):this.setVisibility(!1)}showGameObject(){this.setVisibility(!0)}};(0,F.Cg)([(0,G.fFd)("976-9e42"),(0,F.Sn)("design:type",Object)],vs.prototype,"questionInterface",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],vs.prototype,"hideDelay",void 0),vs=(0,F.Cg)([(0,G.EVk)("HideWhenQuestionOpen",G.YH6.ui)],vs);var gs=U(38268),ms=U(86730),ys=U(97071);class _s extends W.U{constructor(){super(...arguments),this.battleLayers=null,this.rootContext=null,this._currentScene=null,this.postBattleExpressModeController=new De.o}get type(){return _s.INSECURE_BATTLE_TYPE}get stateMachine(){return this.rootContext.getInjectedValue("BattleStateMachine")}update(){this._currentScene.update(),V.q.instance.prodigy.update()}init(k){this._currentScene=G.wa5.getActiveScene(),this.setupLayers(),V.q.instance.prodigy.gameContainer.get("12b-405a").awaitLoad().catch(G.RQr.createHandler("Error loading Weekend Event Data for Battle")),this.rootContext=this.battleLayers.root.addComponent(G.bE_),this.rootContext.Container.bind("MenuLayer").toConstantValue(this.battleLayers.menus),this.rootContext.Container.bind("HostID").toConstantValue(k.hostID),this.rootContext.Container.bind("TeamStreak").toConstantValue(k.teamStreak);const B=this.battleLayers.battleUI.addComponent(G.Fid);B.Identifier="BattleUIFactory",B.Components=[this.battleLayers.battleUI.addComponent(Ot)],this.rootContext.Installers.push(new ys.p(this.game)),this.rootContext.Installers.push(new bt(this.game)),this.rootContext.Installers.push(new Ne(k)),k.isHost?(this.rootContext.Installers.push(new je),this.rootContext.runInstallers()):(this.rootContext.Installers.push(new pe),this.rootContext.runInstallers());this.battleLayers.content.addComponent(vs).HideDelay=500;this.battleLayers.battleUI.addComponent(vs).HideDelay=500;this.battleLayers.root.addComponent(ms.a).BackgroundMusicID=2,this.battleLayers.root.addComponent(xe),this.battleLayers.root.addComponent(gs.R);const U=this.battleLayers.content.addComponent(Bi),$=this.battleLayers.content.addComponent(G.Fid);U.BattleLayer=this.battleLayers.content,$.Identifier="BattleStateMachine",$.Components=[U];const W=new G._mx(this.battleLayers.root);W.addComponent(G.K16),W.name="SummaryScreen",W.active=!1;const q=this.battleLayers.root.addComponent(G.Fid);q.Identifier="SummaryScreen",q.Components=[W.addComponent(Pe)];const K=this.battleLayers.root.addComponent(Ht);K.Game=this.game,K.BattleContent=this.battleLayers.content;const z=this.battleLayers.root.addComponent(G.Fid);z.Identifier="SpellFactory",z.Components=[K],k.isHost?class{constructor(){}static create(k){const B=new G._mx(k);B.addComponent(G.K16),B.name="CoOpHost",B.addComponent(hs),B.addComponent(cs);const U=B.addComponent(G.Fid);return U.Identifier="CurrentCoOpTeam",U.Components=[B.addComponent(os)],B}}.create(this.battleLayers.root):class{constructor(){}static create(k){const B=new G._mx(k);B.addComponent(G.K16),B.name="CoOpClient",B.addComponent($i),B.addComponent(Gi),B.addComponent(qi),B.addComponent(ji);const U=B.addComponent(G.Fid);return U.Identifier="CurrentCoOpTeam",U.Components=[B.addComponent(Fi)],B}}.create(this.battleLayers.root);const Y=this.rootContext.getInjectedValue("CurrentCoOpTeam");Y.getTeam().HostID=k.hostID,Y.getTeam().TeamMembers=j.map(k.teammates,(k=>k.userID)),Y.getTeam().TeamMembers.push(this.rootContext.getInjectedValue("CurrentPlayer").getUserID());const Q=this.battleLayers.root.addComponent(G.Fid);Q.Identifier="BattleStats",Q.Components=[this.battleLayers.root.addComponent(ye)],this.rootContext.Container.bind("PostBattleExpressModeController").toConstantValue(this.postBattleExpressModeController),V.q.instance.prodigy.gameContainer.get("779-a746").setUserStatus(H.a.unavailable).catch(G.RQr.createHandler("Unable to set social status")),Promise.all(k.battleMap.map(((k,B)=>(0,F.sH)(this,void 0,void 0,(function*(){const U=new G._mx(0===B?this.battleLayers.background:this.battleLayers.foreground),F=U.addComponent(gt._);yield F.setAsset(k);const j=U.addComponent(G.K16);j.x=this.game.width>>1,j.y=this.game.height>>1,j.width=F.getWidth(),j.height=F.getHeight(),j.anchorX=.5,j.anchorY=.5}))))).then((()=>{this.createBattleEntities(k)})).catch(G.RQr.createHandler("Error loading map"))}shutdown(){var k;V.q.instance.prodigy.gameContainer.get("779-a746").setUserStatus(H.a.available).catch(G.RQr.createHandler("Unable to set social status")),null===(k=this.postBattleExpressModeController)||void 0===k||k.destroy(),super.shutdown()}setupLayers(){const k=new G._mx;k.name="Scene",k.addComponent(G.K16);const B=new G._mx(k);B.name="Map",B.addComponent(G.K16);const U=new G._mx(k);U.name="Menus",U.addComponent(G.K16);const F=new G._mx(B);F.name="Background",F.addComponent(G.K16);const j=new G._mx(B);j.name="Content",j.addComponent(G.K16);const $=new G._mx(j);$.name="Dim",$.addComponent(G.K16);const H=new G._mx(j);H.name="FarBack",H.addComponent(G.K16);const V=new G._mx(j);V.name="Background",V.addComponent(G.K16);const W=new G._mx(j);W.name="Middle",W.addComponent(G.K16);const q=new G._mx(j);q.name="Foreground",q.addComponent(G.K16);const K=new G._mx(j);K.name="FarFront",K.addComponent(G.K16);const z=new G._mx(B);z.name="Foreground",z.addComponent(G.K16);const Y=new G._mx(B);Y.name="BattleUI",Y.addComponent(G.K16),this.battleLayers={root:k,map:B,background:F,content:j,foreground:z,menus:U,battleUI:Y,battleDim:$,battleFarBack:H,battleBackground:V,battleMid:W,battleForeground:q,battleFarFront:K},this.groupFarBack=H.legacyTransform.group,this.groupFront=q.legacyTransform.group,this.groupMiddle=W.legacyTransform.group,this.groupBack=V.legacyTransform.group,this.groupDim=$.legacyTransform.group,this.groupFarFront=K.legacyTransform.group}createBattleEntities(k){const B=new G._mx(this.battleLayers.content);B.name="PlayerTeamContext",B.addComponent(G.K16),B.addComponent(G.bE_);const U=B.addComponent(pt);U.ID=0;const F=B.addComponent(at);F.InitialValue=this.rootContext.getInjectedValue("CrystalHP"),F.reset();const j=B.addComponent(G.Fid);j.Identifier="Health",j.Components=[F];const $=B.addComponent(G.Fid);$.Identifier="DamageReceiver",$.Components=[B.addComponent(_e)];const H=B.addComponent(G.Fid);H.Identifier="DamageSource",H.Components=[B.addComponent(Ee)];const V=new G._mx(this.battleLayers.content);V.name="TitanTeamContext",V.addComponent(G.K16),V.addComponent(G.bE_);const W=V.addComponent(pt);W.ID=1;const q=V.addComponent(at);q.InitialValue=this.rootContext.getInjectedValue("TitanHP"),q.reset();const K=V.addComponent(G.Fid);K.Identifier="Health",K.Components=[q];const z=V.addComponent(G.Fid);z.Identifier="DamageReceiver",z.Components=[V.addComponent(_e)];const Y=V.addComponent(G.Fid);Y.Identifier="DamageSource",Y.Components=[V.addComponent(Ee)];const Q=this.battleLayers.content.addComponent(G.Fid);Q.Identifier="Teams",Q.Components=[U,W],this.createPlayerTeam(),this.createTitanTeam(k),this.setupHealthBars();const X=this.battleLayers.content.addComponent(G.Fid);X.Identifier="BattleTeamInfo",X.Components=[this.battleLayers.content.addComponent(oe)];this.battleLayers.root.addComponent(We).join(k.multiplayerRoom),this.sendBattleStartEvent(),this.rootContext.getInjectedValue("BattleStateMachine").run()}setupHealthBars(){const k=rs.create(this.battleLayers.battleUI,"CO_OP_CRYSTAL_HEALTH_NAME",!0);k.name="PlayerHealthBar",k.active=!1;const B=k.findComponent(Vt);B.TeamID=0,k.legacyTransform.group.position.set(-220,80);const U=k.addComponent(qe);U.StartPosition={x:-220,y:80},U.EndPosition={x:250,y:80},U.SlideDuration=800;const F=k.addComponent(G.Fid);F.Identifier="SlideInHealthBar",F.Components=[U];const j=k.addComponent(qe);j.StartPosition={x:250,y:80},j.EndPosition={x:250,y:-80},j.SlideDuration=500;const $=k.addComponent(G.Fid);$.Identifier="SlideOutHealthBar",$.Components=[j];const H=rs.create(this.battleLayers.battleUI,"CO_OP_TITAN_HEALTH_NAME",!1);H.name="TitanHealthBar",H.active=!1,H.findComponentInChildren(ze).GameObject.legacyTransform.group.scale.x=-1;const V=H.findComponent(Vt);V.TeamID=1;const W=H.addComponent(qe);W.StartPosition={x:1490,y:80},W.EndPosition={x:1030,y:80},W.SlideDuration=800;const q=H.addComponent(G.Fid);q.Identifier="SlideInHealthBar",q.Components=[W];const K=H.addComponent(qe);K.StartPosition={x:1030,y:80},K.EndPosition={x:1030,y:-80},K.SlideDuration=500;const z=H.addComponent(G.Fid);z.Identifier="SlideOutHealthBar",z.Components=[K];const Y=this.battleLayers.root.addComponent(G.Fid);Y.Identifier="ActiveHealthBars",Y.Components=[B,V]}createPlayerTeam(){const k=class{constructor(){}static create(k){const B=new G._mx(k);B.addComponent(G.K16),B.legacyTransform.x=520,B.legacyTransform.y=420,B.name="Crystal",B.addComponent(rt);const U=B.addComponent(G.bE_);U.Container.bind("CastPoint").toConstantValue({x:140,y:-60}),U.Container.bind("ImpactSize").toConstantValue({x:150,y:200}),U.Container.bind("ImpactOffset").toConstantValue({x:205,y:0});const F=B.addComponent(Ji.v),j=B.addComponent(Qe.j);F.OnLoaded.addOnce((()=>{j.applySkin("crystal"),j.playAnimation("idle",!0)})),F.setAsset(ts.Q.Spine_coop_crystal_json);const $=new G._mx(B);$.addComponent(G.K16),$.legacyTransform.x=50,$.legacyTransform.y=-65,$.name="Input";const H=$.addComponent(Ci.p);H.Width=200,H.Height=250,H.InputEnabled=!1,$.addComponent(Yi);const V=B.addComponent(G.Fid);V.Identifier="Animators",V.Components=[j];const W=B.addComponent(Zi);W.LocalizationKey="CO_OP_CRYSTAL_NAME";const q=B.addComponent(G.Fid);q.Identifier="Name",q.Components=[W];const K=B.addComponent(Xi);K.SpineAnimator=j,U.Container.bind("IdleAnimationState").toConstantValue(K);const z=B.addComponent(G.Fid);z.Identifier="TakeDamageAnimationState",z.Components=[B.addComponent(zi)];const Y=B.addComponent(Ki);Y.ShatterSkinningDelay=500;const Q=B.addComponent(G.Fid);Q.Identifier="DefeatAnimationState",Q.Components=[Y];const X=B.addComponent(Qi);X.GlowDuration=1500,X.SpineAnimator=j;const Z=B.addComponent(G.Fid);return Z.Identifier="AttackAnimationState",Z.Components=[X],B}}.create(this.battleLayers.battleMid),B=k.findComponent(rt),U=j.find(this.rootContext.getInjectedValue("Teams"),(k=>0===k.ID)),F=k.findComponent(G.bE_),$=U.GameObject.findComponent(G.bE_);F.Container.bind("DamageReceiver").toConstantValue($.getInjectedValue("DamageReceiver")),F.Container.bind("DamageSource").toConstantValue($.getInjectedValue("DamageSource")),F.Container.bind("Health").toConstantValue($.getInjectedValue("Health")),B.BattleTeam=U,B.setAsActiveTeamMember();const H=new G._mx(this.battleLayers.battleMid),V=H.addComponent(G.K16);V.x=270,V.y=420;const W=H.addComponent(vt);H.name="Middle",W.TeamID=0,W.OffScreenStartPosition={x:-200,y:420};const q=new G._mx(this.battleLayers.battleBackground),K=q.addComponent(G.K16);K.x=375,K.y=320;const z=q.addComponent(vt);q.name="Top",z.TeamID=0,z.OffScreenStartPosition={x:-200,y:320};const Y=new G._mx(this.battleLayers.battleForeground),Q=Y.addComponent(G.K16);Q.x=375,Q.y=520;const X=Y.addComponent(vt);Y.name="Bottom",X.TeamID=0,X.OffScreenStartPosition={x:-200,y:520}}createTitanTeam(k){const B=K.t.getItem("titan",k.titanAssetID),U=class{constructor(){}static create(k,B){const U=new G._mx(k);U.name="Titan",U.addComponent(G.K16);const F=U.addComponent(G.bE_);F.Installers.push(new bs),F.runInstallers();const j=new G._mx(U);j.name="Spine",j.addComponent(G.K16).group.scale.set(-1.75,1.75);const $=j.addComponent(Ji.v),H=j.addComponent(Qe.j);$.OnLoaded.addOnce((()=>{H.playAnimation("idle",!0)})),$.setAsset(B);const V=U.addComponent(G.Fid);V.Identifier="Animators",V.Components=[H];const W=U.addComponent(rt),q=U.addComponent(G.Fid);q.Identifier="BattleTeamMember",q.Components=[W];const K=new G._mx(U);K.addComponent(G.K16),K.legacyTransform.x=-95,K.legacyTransform.y=15,K.name="Barrier";const z=K.addComponent(gt._),Y=K.addComponent(ps.p);z.OnLoaded.addOnce((()=>{z.setAnchor(.5,.5),Y.createAnimationSequence("deflect",[],10,!1),z.setScale(2.33,2.33),z.sprite.smoothed=!1,z.setAlpha(0)})),z.setAsset(Ct._.Boss_titan_barrier_json,"1");const Q=new G._mx(U);Q.addComponent(G.K16),Q.legacyTransform.x=-115,Q.legacyTransform.y=15,Q.name="Barrier Break";const X=Q.addComponent(gt._),Z=Q.addComponent(ps.p);X.OnLoaded.addOnce((()=>{X.setAnchor(.5,.5),Z.createAnimationSequence("break",[],10,!1),X.setScale(2.33,2.33),X.sprite.smoothed=!1,X.setAlpha(0)})),X.setAsset(Ct._.Boss_titan_barrier_break_json,"1");const J=new G._mx(U);J.addComponent(G.K16),J.legacyTransform.x=-500,J.legacyTransform.y=60,J.name="Barrier Spark";const tt=J.addComponent(gt._),et=J.addComponent(ps.p);tt.OnLoaded.addOnce((()=>{tt.setAnchor(.5,.5),et.createAnimationSequence("spark",[],10,!1),tt.setScale(2.33,2.33),tt.sprite.smoothed=!1,tt.setAlpha(0)})),tt.setAsset(Ct._.Boss_titan_spark_json,"1");const it=U.addComponent(ls);it.TitanBarrier=Y,it.TitanSpark=et;const st=U.addComponent(G.Fid);st.Identifier="TakeDamageAnimationState",st.Components=[it];const nt=U.addComponent(ds);nt.BarrierAnimator=Z,nt.BarrierSpark=et;const at=U.addComponent(G.Fid);at.Identifier="DefeatAnimationState",at.Components=[nt],U.addComponent(fs).TeamID=1;const ot=U.addComponent(Zi);ot.LocalizationKey="TITAN_NAME";const ht=U.addComponent(G.Fid);return ht.Identifier="Name",ht.Components=[ot],U}}.create(this.battleLayers.battleMid,q.E.getTitanSpine(k.titanAssetID)),F=U.findComponent(rt),$=j.find(this.rootContext.getInjectedValue("Teams"),(k=>1===k.ID));U.legacyTransform.group.position.set(1110,325);const H=U.findComponent(G.bE_),V=$.GameObject.findComponent(G.bE_);H.Container.bind("DamageReceiver").toConstantValue(V.getInjectedValue("DamageReceiver")),H.Container.bind("Health").toConstantValue(V.getInjectedValue("Health")),H.Container.bind("Level").toConstantValue(void 0),H.Container.bind("Element").toConstantValue(B.data.element),k.isHost&&H.Container.bind("DamageSource").toConstantValue(V.getInjectedValue("DamageSource")),F.BattleTeam=$,F.setAsActiveTeamMember(),k.isHost?U.addComponent($e):U.addComponent(ge)}sendBattleStartEvent(){V.q.instance.prodigy.gameContainer.get("c47-20b6").battle.sendBattleStartEvent(_s.INSECURE_BATTLE_TYPE,{battle_type:_s.INSECURE_BATTLE_TYPE})}enablePostBattleExpressMode(k){this.rootContext.getInjectedValue("PostBattleExpressModeController").enable(k).catch(G.RQr.createHandler("Failed to enable express mode on post-battle menus"))}canBattleEndInstantly(){const k=this.stateMachine.CurrentState,B=this.rootContext.getInjectedValue("BattleActionQueue");return k===Ye.InBattle&&!B.IsActionQueuePlaying&&0===B.Actions.length}beginEndingBattle(k,B={}){if(B.enablePostBattleFlowExpressMode&&this.enablePostBattleExpressMode(B.forceEndMessageText),this.canBattleEndInstantly())k();else{if(G.Aq$.isDefined(this.forceEndCallback))return;this.forceEndCallback=k,this.rootContext.getInjectedValue("PostBattleExpressModeController").onPostBattleExpressModeComplete.addOnce((()=>{this.callForceEndCallbackIfExists()}));this.rootContext.getInjectedValue("BattleActionQueue").OnQueueComplete.add((()=>{this.attemptToEndBattle()})),this.stateMachine.OnStateChange.add((k=>{this.attemptToEndBattle()}))}}attemptToEndBattle(){this.canBattleEndInstantly()&&this.callForceEndCallbackIfExists()}callForceEndCallbackIfExists(){G.Aq$.isDefined(this.forceEndCallback)&&(this.forceEndCallback(),this.forceEndCallback=void 0)}}_s.INSECURE_BATTLE_TYPE="Titan"},23082:(k,B,U)=>{"use strict";var F;U.d(B,{G:()=>F}),function(k){k.Battle="Battle",k.Boot="Boot",k.CharCreate="CharCreate",k.CharSelect="CharSelect",k.CoOp="CoOp",k.DanceDance="DanceDance",k.DinoDig="DinoDig",k.DuelMatchmaking="DuelMatchmaking",k.Faint="Faint",k.Loading="Loading",k.LootDashMenu="LootDashMenu",k.LootDashTransport="LootDashTransport",k.Museum="Museum",k.PrefabScene="PrefabScene",k.Registration="Registration",k.Rifts="Rifts",k.SecureBattle="SecureBattle",k.SecureBattleRevamp="SecureBattleRevamp",k.SplashScreen="SplashScreen",k.TileScreen="TileScreen",k.Tower="Tower"}(F||(F={}))},1559:(k,B,U)=>{"use strict";U.d(B,{v:()=>q});var F=U(62459),G=U(28628),j=U(35120),$=U(24190),H=U(88022),V=U(73678),W=U(20705);class q extends W.f{constructor(){super("zone-faint","",[]),this.targetZone="",this.showMenu=!1,this.targetZone=""}create(){super.create();const k=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=j.q.instance.game;k.saveEnabled=!1,this.element=j.q.instance.prodigy.create.element(this.uiLayer),this.element.add(new $.C(this.prodigyGame,0,0,B.width,B.height,H._.Tiled_sprites_json,"load"))}start(){this.onDialogueEndOverride?this.onDialogueEndOverride():this.toZone(),super.start()}toZone(){const k={battleResult:G.XK.Defeat};if(F.Aq$.isDefined(this.targetZone)&&0!==this.targetZone.length)if(this.targetZone.indexOf("-")>-1)this._targetPos?j.q.instance.prodigy.world.it(this.targetZone,this._targetPos.x,this._targetPos.y,k):j.q.instance.prodigy.world.it(this.targetZone,void 0,void 0,k);else{const B=this.prodigyGame.state.get(this.targetZone);"startX"in B&&delete B.startX,"startY"in B&&delete B.startY,j.q.instance.prodigy.start(this.targetZone,k)}else j.q.instance.prodigy.world.it(V.A_.HOUSE)}updateTeleportData(k){this.targetZone=k.mapKey,this._targetPos=k.coordinates}shutdown(){var k;this.onDialogueEndOverride=void 0,null===(k=this.element)||void 0===k||k.destroy(),super.shutdown()}}},81617:(k,B,U)=>{"use strict";U.d(B,{R:()=>J});var F=U(8674),G=U(62459),j=U(88022),$=U(35120),H=U(29569),V=U(24190),W=U(34829),q=U(36545),K=U(73797),z=U(91160),Y=U(87776),Q=U(91315),X=U(45716),Z=U(23082);class J extends H.U{get isLoadingAdditional(){return this._additionalLoadPromises.length>0}constructor(){super(),this.timeLoadStartedMS=null,this.isHintPanelShown=!1,this._hint=null,this._mapName=null,this._hintContent=null,this._errorMessageBox=null,this._additionalLoadPromises=[],this.onAdditionalLoadPromisesFinishSignal=new G.HN0,this.prodigyGame=$.q.instance.game,this.initData()}startLoading(k={}){this._additionalLoadPromises.length=0,this.prodigyGame.tweens.removeAll(),this.resetData(),$.q.instance.game.fps.record=!1;for(const B in k)this.data[B]=k[B];this.prodigyGame.state.start(Z.G.Loading)}initData(k=""){this.data={title:k,time:0,fadeIn:!0,fadeOut:!0,callback:null,assets:[],target:Z.G.SplashScreen,autoStart:!0,save:!0}}resetData(){this.initData($.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("LOADING_CAPITALIZE"))}create(){if($.q.instance.prodigy.gameContainer.get("afa-b7c5").startTracing(z.u.LoadingState),super.create(),this.startTime=(new Date).getTime(),this.complete=!1,this.isLoaded=!1,this.isHintPanelShown=!1,this.timeLoadStartedMS=Date.now(),this.element=$.q.instance.prodigy.create.element(void 0),!this.isTargetingInitialScreen()){const k=new V.C(this.prodigyGame,0,0,J.BG_WIDTH,J.BG_HEIGHT,j._.Tiled_sprites_json,"load");k.inputEnabled=!0,this.element.add(k);const B=this.element.add($.q.instance.prodigy.create.sprite(1220,660,j._.General_core_json,"loading"));B.anchor.set(.5,.5),this._spinnerTween=new G.Kak(B,this.game,this).to({angle:360},2e3,G.GS3.Linear.None,!0,0,W.s.MAX_SAFE_INTEGER,!1)}this.element.onDestroy.addOnce(this.cleanUpResources,this),$.q.instance.game.app.ticker.add(this.tick,this),this.start()}start(){$.q.instance.prodigy.game.input.enabled=!0,this.prodigyGame.broadcaster.removeAppListener(K.bv.WorkerLoadComplete,this,"loading");$.q.instance.prodigy.gameContainer.get("afa-b7c5").startTracing(z.u.LoadingStateAssetsLoad);const k=G.Aq$.isDefined(this.data.assets)?this.data.assets:[];if($.q.instance.prodigy.load.assets(k,this.loaded.bind(this)),this.data.save){const k=$.q.instance.prodigy.gameContainer.get("c97-bd0d");if(k.loggedIn&&k.characterProcessed){$.q.instance.prodigy.gameContainer.get("e20-0fb0").player.saveEnabled=!0}}}loaded(k,B){if(!G.Aq$.isDefined(this.prodigyGame))return;$.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(z.u.LoadingStateAssetsLoad,{isLoaded:B,assets:G.Aq$.isDefined(this.data.assets)?this.data.assets:[]}),B?this.isLoaded=!0:this.showErrorPopup($.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(X.l.CheckNetworkConnection))}tick(){var k,B;null===(B=null===(k=this.element)||void 0===k?void 0:k.parent)||void 0===B||B.setChildIndex(this.element,this.element.parent.children.length-1),!this.complete&&this.isLoadingComplete()?this.handleLoadingComplete():!this.isTargetingInitialScreen()&&null!==this.timeLoadStartedMS&&!this.isHintPanelShown&&Date.now()-this.timeLoadStartedMS>=J.MIN_LOAD_TO_SHOW_HINT_PANEL_MS&&this.showHintPanel()}handleLoadingComplete(){var k;this.complete=!0,G.Aq$.isDefined(this.data.callback)&&this.data.callback(),this.data.target!==Z.G.SplashScreen&&($.q.instance.game.fps.record=!0);const B=this.prodigyGame.state;if(B.onStateLoaded.addOnce(this.nextStateLoaded,this),this.data.autoStart&&this.data.target&&!this._errorMessageBox){B.get(this.data.target).fadeInSet=this.data.fadeIn,B.start(this.data.target,!1,...null!==(k=this.data.targetInitArgs)&&void 0!==k?k:[]);$.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(z.u.LoadingState)}const U=$.q.instance.prodigy.gameContainer.get("2a1-fed9");if(null!==U.timeToPlayMS&&U.timeToPlayMS>0){const k=Date.now()-this.timeLoadStartedMS;U.timeInLoadingMS+=k,U.timeToPlayMS+=k}}waitFor(k,B=!1){this._additionalLoadPromises.push({promise:k,isCritical:B})}nextStateLoaded(){this.awaitAdditionalLoadPromises().then((()=>{try{this.onAdditionalLoadPromisesFinishSignal.dispatch(),this.cleanUpResources()}catch(k){G.RQr.logError(k,"Error during loading completion cleanup")}})).catch((()=>{this.onAdditionalLoadPromisesFinishSignal.dispatch(),this._additionalLoadPromises.length=0,this.showErrorPopup($.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(X.l.CheckNetworkConnection))}))}awaitAdditionalLoadPromises(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=$.q.instance.prodigy.gameContainer.get("afa-b7c5");for(const{promise:U,isCritical:F}of this._additionalLoadPromises){const j={"promiseInfo.isCritical":F,"promiseInfo.success":!0};try{k.startTracing(z.u.LoadingStateAdditionalLoadPromise),yield U,k.endTracing(z.u.LoadingStateAdditionalLoadPromise,j)}catch(B){if(G.RQr.logError(B,"Error waiting for additional load promise"),j["promiseInfo.success"]=!1,k.endTracing(z.u.LoadingStateAdditionalLoadPromise,j),F)throw new Error("An error occurred while loading resources.")}}}))}isLoadingComplete(){return!this.complete&&Date.now()-this.startTime>=this.data.time&&this.isLoaded}showHintPanel(){const k=$.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);this.data.time=J.MIN_SHOW_HINT_PANEL_MS,this.isHintPanelShown=!0,this._hintContent=$.q.instance.prodigy.create.element(this.element),this._hintContent.visible=!1,this._hintContent.alpha=0,$.q.instance.prodigy.create.panel(this._hintContent,160,340,24,5,"shine"),this._hintContent.add(new V.C(this.prodigyGame,171,380,J.BG_WIDTH-320-22,40,j._.Tiled_sprites_json,"blue-top")),this._hintContent.add(new V.C(this.prodigyGame,171,420,J.BG_WIDTH-320-22,40,j._.Tiled_sprites_json,"blue-mid")),this._hintContent.add(new V.C(this.prodigyGame,171,460,J.BG_WIDTH-320-22,40,j._.Tiled_sprites_json,"blue-top2")),this._hintContent.add($.q.instance.prodigy.create.sprite(590,310,j._.General_core_json,"award-frame"));const B=k.getText(q.R.getRandomHint("none").textKey);this._hint=new Y.b(this.prodigyGame,this._hintContent);const U=J.BG_WIDTH-420;this._hint.width=U,this._hint.populate({text:B,style:9,fontSize:28,boundsAlignH:"center",boundsAlignV:"middle",color:"#ffffff",wordWrap:!0,wordWrapWidth:U,align:"center"},U),this._hint.position.set(206,442),$.q.instance.prodigy.create.panel(this._hintContent,440,560,10,2,"shine"),this._mapName=new Y.b(this.prodigyGame,this._hintContent),this._mapName.populate({text:this.data.title,style:6,fontSize:24,boundsAlignH:"center",boundsAlignV:"middle",color:"#ffffff"}),this._mapName.position.set(J.BG_HALF_WIDTH,this._mapName.height+564);const F=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player,H=()=>{this._hintContent&&!this._hintContent.destroyed&&(this._hintContent.visible=!0,this.game.add.tween(this._hintContent,this).to({alpha:1},J.HINT_FADE_IN_MS,G.GS3.Linear.None,!0))};if(!$.q.instance.prodigy.gameContainer.get("c97-bd0d").loggedIn)return void H();const W=$.q.instance.prodigy.create.player(this._hintContent,F,1,J.BG_HALF_WIDTH,J.BG_HALF_HEIGHT);W.reload((this.data.useIdleAnimation?W.stopHeavy:W.walk).bind(W));const K=setTimeout(H,J.HINT_REVEAL_FALLBACK_MS);W.onFullyLoaded.addOnce((()=>{clearTimeout(K),H()}),this)}showErrorPopup(k){window.prodigyLoaderHidden?(this._errorMessageBox=new Q.p(this.prodigyGame,this.element),this._errorMessageBox.preprocess(k,void 0,void 0),this._errorMessageBox.queuePostCreateCallback(this._errorMessageBox.setOkay.bind(this._errorMessageBox,$.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("SETTINGS_LOGOUT"),null)),this._errorMessageBox.setCloseCallback(this.onErrorMessageClose)):window.SW.Load.setErrorScreen("Loading Failed",void 0,k,window.SW.Errors.ERROR_CODE_MENU_ASSETS);$.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(z.u.LoadingState,{load_failure:k})}onErrorMessageClose(){$.q.instance.prodigy.gameContainer.get("c97-bd0d").logout(!0),this._errorMessageBox=null}cleanUpResources(){var k,B;$.q.instance.game.app.ticker.remove(this.tick,this),this._additionalLoadPromises.length=0,this.onAdditionalLoadPromisesFinishSignal.dispose(),null===(k=this._spinnerTween)||void 0===k||k.destroy(),this._spinnerTween=void 0,this.element&&(this.element.onDestroy.removeAll(this),this.element.destroyed||this.element.destroy(),this.element=null),this._errorMessageBox=null,this._hint=null,this._mapName=null,this._hintContent=null,(null===(B=this.data.shutdownLoadState)||void 0===B||B)&&$.q.instance.prodigy.notifications.resumeAll()}shutdown(){$.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(z.u.LoadingState,{shutdown:!0})}isTargetingInitialScreen(){return this.data.target===Z.G.SplashScreen||this.data.target===Z.G.CharCreate||this.data.target===Z.G.CharSelect}}J.BG_WIDTH=1280,J.BG_HEIGHT=720,J.BG_HALF_WIDTH=.5*J.BG_WIDTH,J.BG_HALF_HEIGHT=.5*J.BG_HEIGHT,J.MIN_SHOW_HINT_PANEL_MS=3500,J.MIN_LOAD_TO_SHOW_HINT_PANEL_MS=500,J.HINT_REVEAL_FALLBACK_MS=5e3,J.HINT_FADE_IN_MS=100},49334:(k,B,U)=>{"use strict";U.d(B,{Q:()=>Y});var F=U(8674),G=U(62459),j=U(95891),$=U(88022),H=U(99625),V=U(35120),W=U(29569),q=U(24190),K=U(91160),z=U(23082);class Y extends W.U{get prefabGameAssets(){return this._prefabGameAssets}init(k){const B=V.q.instance.prodigy.gameContainer.get("afa-b7c5");B.startTracing(K.u.PrefabLoaderScene);const U={},F=k.prefabIDs.map((k=>k.toString()));U.prefab_ids=F.join(",");const j=new q.C(this.game,0,0,this.game.width,this.game.height,$._.Tiled_sprites_json,"load");this.game.world.addChild(j),this._currentScene=G.wa5.getActiveScene(),this._prefabGameAssets=k.prefabIDs.filter((k=>Object.values(H.l).includes(k)));const W=this._currentScene.container;for(const G in k)W.bind(`InitData-${G}`).toConstantValue(k[G]);if(k.layers){const B=k.layers.length;for(let U=0;U{j.destroy(),U.error=!1,B.endTracing(K.u.PrefabLoaderScene,U)})).catch((k=>{throw U.error=!0,U.error_message=(null==k?void 0:k.message)||"Unknown error",B.endTracing(K.u.PrefabLoaderScene,U),G.RQr.logError(k,"Error loading prefab scene"),k})),!0)}loadScene(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=V.q.instance.prodigy.gameContainer.get("afa-b7c5");B.startTracing(K.u.PrefabLoaderSceneAssetPreload);const U={};if(k.preloadAssets){U.asset_count=k.preloadAssets.length,U.assets=k.preloadAssets;try{yield V.q.instance.prodigy.load.assetsAsPromise(k.preloadAssets),U.assets_loaded=!0}catch(q){throw U.asset_load_error=!0,q}finally{B.endTracing(K.u.PrefabLoaderSceneAssetPreload,U)}}B.endTracing(K.u.PrefabLoaderSceneAssetPreload,U);const F=B.startTracing(K.u.PrefabLoaderScenePrefabLoading),G={},$=[],H=V.q.instance.prodigy.gameContainer.get("d0e-64fd");k.prefabIDs.forEach((k=>{const B=k.toString();let U;F.startAssetTrace(B),U=(0,j.isNumber)(k)?H.loadWithDependencies(k).promise:H.loadWithDependenciesFromGUID(k).promise,$.push(U.then((k=>(F.endAssetTrace(B,{loaded:!0}),k))).catch((k=>{throw F.endAssetTrace(B,{error:!0,error_message:(null==k?void 0:k.message)||"Unknown error"}),k})))}));try{const k=yield Promise.all($);for(const B of k)this._currentScene.addGameObject(B);G.prefabs_loaded_count=k.length,G.success=!0}catch(q){throw G.error=!0,q}finally{B.endTracing(K.u.PrefabLoaderScenePrefabLoading,G)}B.startTracing(K.u.PrefabLoaderSceneConsentBanner);const W={};try{this.initConsentBanner(k.hideParentalConsentBanner),W.hidden=!!k.hideParentalConsentBanner,W.success=!0}catch(q){throw W.error=!0,q}finally{B.endTracing(K.u.PrefabLoaderSceneConsentBanner,W)}}))}initConsentBanner(k=!1){const B=new G._mx;B.layer="ui",B.addComponent(G.dLy),this._currentScene.addGameObject(B),k?this.hideParentalConsentBanner():this.showParentalConsentBanner(B)}update(){this._currentScene.update(),V.q.instance.prodigy.update()}shutdown(){V.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(K.u.PrefabLoaderScene,{completed:!1}),this.hideParentalConsentBanner(),V.q.instance.prodigy.cleanup(),this._currentScene=null,this._prefabGameAssets=null,V.q.instance.prodigy.load.removeAssets(),super.shutdown()}}},20705:(k,B,U)=>{"use strict";U.d(B,{f:()=>J});var F=U(8674),G=U(62459),j=U(68910),$=U(35120),H=U(29569),V=U(83133),W=U(24190),q=U(73797),K=U(88022),z=U(24110),Y=U(85515),Q=U(98252),X=U(81617),Z=U(21134);class J extends H.U{get background(){return this._background?this._background.legacyTransform.group:null}get backgroundGameObject(){return this._background}get contentGameObject(){return this._content}get content(){return this._content?this._content.legacyTransform.group:null}get foreground(){return this._foreground?this._foreground.legacyTransform.group:null}get foregroundGameObject(){return this._foreground}get difficultyOverlay(){return this._difficultyOverlay?this._difficultyOverlay.legacyTransform.group:null}get uiLayer(){return this._uiLayer?this._uiLayer.legacyTransform.group:null}get uiLayerGameObject(){return this._uiLayer}get menusGameObject(){return this._menus}get menus(){return this._menus?this._menus.legacyTransform.group:null}get dialogue(){return this._dialogue?this._dialogue.legacyTransform.group:null}get overlayGameObject(){return this._overlay}get overlay(){return this._overlay?this._overlay.legacyTransform.group:null}get opaque(){return this._opaque?this._opaque.legacyTransform.group:null}get debugOverlay(){return this._debugOverlay?this._debugOverlay:null}get gameRenderCache(){return this._gameRenderCache?this._gameRenderCache.legacyTransform.group:null}constructor(k="zero",B="",U=[]){super(),this._currentScene=null,this._modalFilters=null,this._modalRenderTexture=null,this.screenData=null,this.isCutscenePlaying=!1,this.showMenu=!1,this.prodigyGame=$.q.instance.game,this.screenName=B,this.zoneName=k,this.assets=U}initListeners(){this.prodigyGame.broadcaster.addAppListener(q.lc.AddChild,this.onAddChild.bind(this),this,this.prodigyGame),this.prodigyGame.broadcaster.addAppListener(q.lc.GetLayer,this.onGetLayer.bind(this),this,this.prodigyGame),this.prodigyGame.broadcaster.addAppListener(q.lc.EnableBackground,this.onEnableBackground.bind(this),this,this.prodigyGame),this.prodigyGame.broadcaster.addAppListener(q.lc.EnableContent,this.onEnableContent.bind(this),this,this.prodigyGame)}stopListeners(){this.prodigyGame.broadcaster.removeAppListener(q.lc.AddChild,this,this.prodigyGame),this.prodigyGame.broadcaster.removeAppListener(q.lc.GetLayer,this,this.prodigyGame),this.prodigyGame.broadcaster.removeAppListener(q.lc.EnableBackground,this,this.prodigyGame),this.prodigyGame.broadcaster.removeAppListener(q.lc.EnableContent,this,this.prodigyGame)}onEnableBackground(k){this.background.visible=k,this.foreground.visible=k,this.uiLayer.visible=k}onEnableContent(k){this.content.visible=k}onAddChild(k,B,U){this.stage&&this[B]&&(G.Aq$.isDefined(U)?this[B].addChildAt(k,U):this[B].addChild(k))}onGetLayer(k){return G.Aq$.isDefined(this.stage)&&G.Aq$.isDefined(this[k])?this[k]:null}shutdown(){var k;$.q.instance.prodigy.cleanup(),this.stopListeners();$.q.instance.prodigy.gameContainer.get("c97-bd0d").stopInactiveTimer(),this._disableConsentBanner||this.hideParentalConsentBanner(),this._camera&&(null===(k=this._camera.GameObject)||void 0===k||k.destroy(),this._camera=null),this._background&&(this._background.destroy(),this._background=null),this._content&&(this._content.destroy(),this._content=null),this._foreground&&(this._foreground.destroy(),this._foreground=null),this._difficultyOverlay&&(this._difficultyOverlay.destroy(),this._difficultyOverlay=null),this._uiLayer&&(this._uiLayer.destroy(),this._uiLayer=null),this._consentUiLayer&&(this._consentUiLayer.destroy(),this._consentUiLayer=null),this._gameRenderCache&&(this._gameRenderCache.destroy(),this._gameRenderCache=null),this._menus&&(this._menus.destroy(),this._menus=null),this._dialogue&&(this._dialogue.destroy(),this._dialogue=null),this._overlay&&(this._overlay.destroy(),this._overlay=null),this._opaque&&(this._opaque.destroy(),this._opaque=null),this.rearOverlay=null,this.msg=null,this.questProgress&&(this.questProgress.destroy(),this.questProgress=null),this._debugOverlay&&(this._debugOverlay.destroy(),this._debugOverlay=null),this.menuBar=null,this._root=null,this._currentScene=null,super.shutdown()}preload(){this._currentScene=G.wa5.getActiveScene(),this._root=new G._mx,this._root.name="root",this._root.addComponent(G.K16),this.prodigyGame.stage.addChild(this._root.legacyTransform.group);const k=new G._mx(this._root);k.name="camera",k.addComponent(G.dLy).setPosition(X.R.BG_HALF_WIDTH,X.R.BG_HALF_HEIGHT),this._camera=k.addComponent(G.YPZ),this._camera.setViewportSize(X.R.BG_WIDTH,X.R.BG_HEIGHT),this._camera.reset=()=>{},this._background=new G._mx(this._root),this._background.name=Y.E.BackgroundLayer,this._background.addComponent(G.K16),this._background.addComponent(z.B),this._content=new G._mx(this._root),this._content.name=Y.E.ContentLayer,this._content.addComponent(G.K16),this._content.addComponent(z.B),this._foreground=new G._mx(this._root),this._foreground.name=Y.E.ForegroundLayer,this._foreground.addComponent(G.K16),this._foreground.addComponent(z.B),this._difficultyOverlay=new G._mx(this._root),this._difficultyOverlay.name=Y.E.DifficultyModeOverlay,this._difficultyOverlay.addComponent(G.K16),this._difficultyOverlay.addComponent(z.B),this._uiLayer=new G._mx(this._root),this._uiLayer.name=Y.E.UiLayer,this._uiLayer.addComponent(G.K16),this._uiLayer.addComponent(z.B),this._consentUiLayer=new G._mx(this._root),this._consentUiLayer.name=Y.E.ConsentLayer,this._consentUiLayer.addComponent(G.K16),this._consentUiLayer.addComponent(z.B),this._currentScene.getLayer(this._consentUiLayer.layer).attachToCamera=!0,this._gameRenderCache=new G._mx(this._root),this._gameRenderCache.name=Y.E.GameRenderCacheLayer,this._gameRenderCache.addComponent(G.K16),this._gameRenderCache.addComponent(z.B),this._menus=new G._mx(this._root),this._menus.name=Y.E.MenusLayer,this._menus.addComponent(G.K16),this._menus.addComponent(z.B),this.menus.fixedToCamera=!0,this._dialogue=new G._mx(this._root),this._dialogue.name=Y.E.DialogueLayer,this._dialogue.addComponent(G.K16),this._dialogue.addComponent(z.B),this._overlay=new G._mx(this._root),this._overlay.name=Y.E.OverlayLayer,this._overlay.addComponent(G.K16),this._overlay.addComponent(z.B),this._opaque=new G._mx(this._root),this._opaque.name=Y.E.OpaqueLayer,this._opaque.addComponent(G.K16),this._opaque.addComponent(z.B),this._debugOverlay=new G._mx(this._root),this._debugOverlay.name=Y.E.Debug,this._debugOverlay.addComponent(G.dLy),this._debugOverlay.addComponent(z.B),this.clearAndResetCachedContainer(this.gameRenderCache);this.opaque.addChild(new W.C(this.prodigyGame,0,0,this.game.width,this.game.height,K._.Tiled_sprites_json,"load")).inputEnabled=!0,$.q.instance.prodigy.open.menuLayer=this.menus,$.q.instance.prodigy.open.menusGameObject=this._menus,$.q.instance.prodigy.effects.setSource(this),super.preload(),this.initListeners();$.q.instance.prodigy.gameContainer.get("c97-bd0d").startInactiveTimer();const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player;!this._disableConsentBanner&&B.hasCompletedTutorial()&&this.showParentalConsentBanner(this._consentUiLayer)}triggerElementClick(k){if(this.callFunctionOrSignal(k,"onDown"),this.callFunctionOrSignal(k,"onInputDown"),this.callFunctionOrSignal(k,"onUp"),this.callFunctionOrSignal(k,"onInputUp"),this.callFunctionOrSignal(k,"onClick"),k instanceof V.l){const B=k;this.callFunctionOrSignal(B,"onSelected"),B.setSelected(!B.isSelected())}}callFunctionOrSignal(k,B){G.Aq$.isDefined(k[B])&&(k[B].dispatch?k[B].dispatch():k[B]instanceof Function&&k[B]())}create(k){super.create(),this.screenSetup(),this.complete=!0}fadeIn(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.fadeInSet){const k=this.prodigyGame.add.tween(this.opaque,this).to({alpha:0},1e3,G.GS3.Quadratic.Out).start();yield k.onTweenComplete.asPromise().catch((k=>G.VyI.log("Fading in cancelled before completion",G.$bb.Warning)))}else this.opaque.visible=!1}))}fadeOut(k,B){if(this.opaque&&(this.opaque.visible=!0),$.q.instance.prodigy.notifications.notificationPlayed(),k){this.prodigyGame.add.tween(this.opaque,this).to({alpha:1},1e3,G.GS3.Quadratic.Out).start().onTweenComplete.add(B)}else B()}fadeOutCachedContainer(k){if(!this.gameRenderCache.visible)return;this.prodigyGame.add.tween(this.gameRenderCache,this).to({alpha:0},100,G.GS3.Quadratic.Out).start().onTweenComplete.add(this.clearAndResetCachedContainer.bind(this,k))}clearAndResetCachedContainer(k){k.filters=null,k.visible=!1,k.removeChildren()}setUpModalTransition(k,B){var U,F;this.clearAndResetCachedContainer(k);const H=$.q.instance.game.renderer;if(null===this._modalFilters){const k=new j.filters.BlurFilter;this._modalFilters=[k]}const V=j.RenderTexture.create({width:$.q.instance.game.width,height:$.q.instance.game.height});null===this._modalRenderTexture&&(this._modalRenderTexture=j.RenderTexture.create({width:$.q.instance.game.width,height:$.q.instance.game.height}));const W={renderTexture:V,clear:!0,transform:null,skipUpdateTransform:!1},q=Object.assign(Object.assign({},W),{clear:!1}),K=Object.assign(Object.assign({},W),{renderTexture:this._modalRenderTexture});H.render(this.background,W),H.render(this.content,q),H.render(this.foreground,q),B&&H.render(this.menus,q);const z=null===(F=null===(U=this.menuBar)||void 0===U?void 0:U.findComponent(G.y4o))||void 0===F?void 0:F.getRootContainer();z&&H.render(z,q);const Y=new j.Container;Y.addChild(new j.Sprite(V)),Y.filters=this._modalFilters,H.render(Y,K),Y.destroy(),k.addChild(new j.Sprite(this._modalRenderTexture)),k.alpha=1,k.visible=!0}bitmapCacheContainer(k,B,U){var F,j;const $=null!=B?B:this.gameRenderCache;k?this.setUpModalTransition($,U):this.fadeOutCachedContainer($),this.background.visible=!k,this.content.visible=!k,this.foreground.visible=!k;const H=null===(j=null===(F=this.menuBar)||void 0===F?void 0:F.findComponent(G.y4o))||void 0===j?void 0:j.getRootContainer();H&&(H.alpha=k?0:1)}start(){this.opaque.visible=!1}update(){super.update(),this.complete&&(this.screenUpdate(),this._currentScene.update())}screenSetup(){this.start()}screenUpdate(){$.q.instance.prodigy.update()}showMessage(k,B){G.Aq$.isDefined(this.msg)||(this.msg=new Z.Y(this.prodigyGame,this.overlay,140,10)),this.msg.setMsg(k,B)}enableOverlay(k=.5){G.Aq$.isDefined(this.rearOverlay)&&(this.rearOverlay.visible=!1),this.rearOverlay=this.uiLayer.addChild($.q.instance.prodigy.create.sprite(-10,-10,K._.General_core_json,"overlay-small")),this.rearOverlay.width=1300,this.rearOverlay.height=740,this.rearOverlay.alpha=k,this.rearOverlay.inputEnabled=!0,this.prodigyGame.add.tween(this.rearOverlay,this).from({alpha:0},500,G.GS3.Linear.None,!0)}disableOverlay(k){if(G.Aq$.isDefined(this.rearOverlay)){const B=this.prodigyGame.add.tween(this.rearOverlay,this).to({alpha:0},500,G.GS3.Linear.None);B.onTweenComplete.add((()=>{this.rearOverlay.visible=!1,G.Aq$.isDefined(k)&&k()}),this),B.start()}}addPostFilter(k){G.VyI.log("Post filters disabled",G.$bb.Verbose)}removePostFilter(k){Q.pF.isDeprecatedIOS()||(this.removePostFilterFromLayer(this.foreground,k),this.removePostFilterFromLayer(this.background,k),this.removePostFilterFromLayer(this.content,k))}addPostFilterToLayer(k,B){var U;null!==(U=k.filters)&&void 0!==U||(k.filters=[]),k.filters.push(B)}removePostFilterFromLayer(k,B){if(!k.filters)return;const U=k.filters.indexOf(B);U>=0&&k.filters.splice(U,1)}}},21134:(k,B,U)=>{"use strict";U.d(B,{Y:()=>$});var F=U(62459),G=U(35120),j=U(98623);class $ extends j.H{constructor(k,B,U,F){super(k,B),this.ID=0,this.text=null,this.x=U,this.y=F,this.text=G.q.instance.prodigy.create.font(this,0,5)}setMsg(k,B){this.visible=!0,this.ID++,this.alpha=0,this.game.add.tween(this,this).to({alpha:1},400,F.GS3.Quadratic.Out).start(),this.text.setText(k);this.game.time.events.addTimer(B,(k=>{k===this.ID&&(this.visible=!1)}).bind(this,this.ID),this)}}},77302:(k,B,U)=>{"use strict";U.d(B,{S:()=>Rt});var F=U(8674);const G=window.prodigyExperiments;var j=U(62459),$=U(99625),H=U(40295),V=U(35120),W=U(34829),q=U(96535),K=U(73722),z=U(80974),Y=(U(45373),U(88022)),Q=U(51742),X=U(39324),Z=U(95066),J=U(36525),tt=U(90633),et=U(15821);class it{constructor(k,B){this._inner=k,this._manager=B}isOn(k){return this._inner.isOn(k)&&function(k){if(!et.A.isDefined(k))return!1;if("object"==typeof k&&"enabled"in k&&"boolean"==typeof k.enabled)return k.enabled;return!!k}(this._manager.evaluate(k))}isInExperiment(k){return this._inner.isInExperiment(k)}getFeatureValue(k,B){const U=this._manager.evaluate(k);return!et.A.isDefined(U)&&et.A.isDefined(B)?B:U}loadFeatures(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this._inner.loadFeatures(k)}))}setAttributes(k){return this._inner.setAttributes(k)}setAttribute(k,B){return this._inner.setAttribute(k,B)}getVariation(k){return this._inner.getVariation(k)}evalFeature(k){const B=this._inner.evalFeature(k),{value:U}=B,G=(0,F.Tt)(B,["value"]);return Object.assign(Object.assign({},G),{value:this._manager.evaluate(k)})}forceVariation(k,B){return this._inner.forceVariation(k,B)}getAttributes(){return this._inner.getAttributes()}destroy(){return this._inner.destroy()}}var st=U(77601);class nt{constructor(k){this._initialExperimentVariations=new Map,this._inner=k}setIsTestAccount(k,B=!1){if(B){const B=this.getAttributes();this.setAttributes(Object.assign(Object.assign({},B),{is_test_account:k}))}this.refreshExperimentVariations()}isOn(k){return this._inner.isOn(k)}isInExperiment(k){return this._inner.isInExperiment(k)}getFeatureValue(k){const B=this._inner.evalFeature(k);return this.initExperimentGroup(k,B),this._inner.evalFeature(k).value}loadFeatures(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this._inner.loadFeatures(k)}))}setAttributes(k){this._inner.setAttributes(k)}setAttribute(k,B){this._inner.setAttribute(k,B)}getVariation(k){return this._inner.getVariation(k)}evalFeature(k){const B=this._inner.evalFeature(k);return this.initExperimentGroup(k,B),B}initExperimentGroup(k,B){var U,F;if("experiment"!==B.source||!B.experiment||!B.experimentResult)return;if(1===(null===(U=B.experiment.weights)||void 0===U?void 0:U.filter((k=>1===k)).length))return;if(this._initialExperimentVariations.has(k)||this._initialExperimentVariations.set(k,B.experimentResult.variationId),!(null===(F=this.getAttributes())||void 0===F?void 0:F.is_test_account))return;0!==B.experimentResult.variationId&&(console.log(`Feature "${k}" in experiment "${B.experiment.key}" was changed from variation ${B.experimentResult.variationId}, to control variation 0`),this.forceVariation(B.experiment.key,0))}forceVariation(k,B){this._inner.forceVariation(k,B)}getAttributes(){return this._inner.getAttributes()}destroy(){this._inner.destroy()}refreshExperimentVariations(){this._initialExperimentVariations.forEach(((k,B)=>{var U,F;if(null===(U=this.getAttributes())||void 0===U?void 0:U.is_test_account){const k=this.evalFeature(B);console.log(`Set feature "${B}" in experiment "${null===(F=k.experiment)||void 0===F?void 0:F.key}" to control variation`)}else{const U=this._inner.evalFeature(B);U.experiment?(this.forceVariation(U.experiment.key,k),console.log(`Reset feature "${B}" in experiment "${U.experiment.key}" to initial variation ${k}`)):console.log(`Experiment for feature "${B}" not found; cannot reset to initial variation ${k}`)}}))}}var at=U(13956),rt=U(29738),ot=U(23029);class ht{constructor(k,B){this._overrides={},this._inner=k,this.ot=B}isOn(k){return this._inner.isOn(k)}isInExperiment(k){return this._inner.isInExperiment(k)}getFeatureValue(k,B){return this.applyOverride(k,this._inner.getFeatureValue(k,B))}loadFeatures(k){return(0,F.sH)(this,void 0,void 0,(function*(){const[B]=yield Promise.all([this.ot.loadOverrides(this.getAttributes()),this._inner.loadFeatures(k)]);this._overrides=B}))}setAttributes(k){this._inner.setAttributes(k)}setAttribute(k,B){this._inner.setAttribute(k,B)}getVariation(k){return this._inner.getVariation(k)}evalFeature(k){const B=this._inner.evalFeature(k);return Object.assign(Object.assign({},B),{value:this.applyOverride(k,B.value)})}forceVariation(k,B){this._inner.forceVariation(k,B)}getAttributes(){return this._inner.getAttributes()}destroy(){this._inner.destroy()}applyOverride(k,B){const U=this._overrides[k];return j.Aq$.isDefined(U)?U:B}}var ct=U(93867),dt=U(73797),lt=U(91160),ut=U(10670),ft=U(95891);let bt=null;class pt{constructor(k){ft.isEmpty(k)&&j.VyI.log(`Expected the education question interface but got ${k} instead!`,j.$bb.Error),this.learningEngineManager=k.LearningEngineManager}static getInstance(k){const B=!ft.isEmpty(k),U=ft.isEmpty(window.QI||k),F=ft.isEmpty(bt),G=k||window.QI||{};return ft.isEmpty(G.LearningEngineManager)?null:U&&F&&!B?(j.VyI.log("Expected to find the education question interface but did not!",j.$bb.Error),null):((F||B)&&(bt=new pt(G)),bt)}init(k){const B=k.identityProviderFunction();ft.isEmpty(B)&&j.VyI.log(`Expected an identity object but got ${B}`,j.$bb.Error);const U=B.accessToken;this.initEducationNetworkManager(U)||j.VyI.log("The initialization of the Learning Engine Network Manager Failed",j.$bb.Error),this.initEducationGamePlayerManager(k)||j.VyI.log("The initialization of the Learning Engine Player Context Manager Failed",j.$bb.Error)}getEducationStudentContextManagerInstance(){return this.learningEngineManager.getEducationStudentContextManagerInstance()}getGamePlayerContextManagerInstance(){return this.learningEngineManager.getGamePlayerContextManagerInstance()}initEducationNetworkManager(k){return this.learningEngineManager.getNetworkManagerInstance().initWithParams({authAccessToken:k}),!0}initEducationGamePlayerManager(k){const B=ft.isFunction(k.identityProviderFunction)?k.identityProviderFunction():{},U=ft.isFunction(k.playerProviderFunction)?k.playerProviderFunction:()=>null,F=B.uuid?B.uuid:null;return this.learningEngineManager.getGamePlayerContextManagerInstance().setContext((()=>{const k=U(),G=k.getPlayerData(),j=V.q.instance.prodigy.gameContainer.get("f7c-2e57"),$=k.hasMembership();return{userId:F,deprecatedUserId:k.userID,playerParents:k.playerParents,playerTeachers:k.playerTeachers,parentEmail:k.parentEmail,registerDate:k.registerDate.toDateString(),owners:k.owners,classIDs:k.classIDs,membership:$?{start:k.memberStartDate,end:k.memberEndDate}:null,playerClass:k.getPlayerClass()?k.getPlayerClass():null,playerDevicePlatform:k.userDataPlatform,playerPlayLocation:k.locationSelectionType,goalId:k.goalId,playerSessionId:j.getSessionToken(),identityProviderLabel:B.identityProvider,optionalData:{playerMetadata:ft.cloneDeep(G)}}})),!0}}var vt=U(48813),gt=U(29887),mt=U(5018),yt=U(98252),_t=U(30226),Et=U(72937),wt=U(325),Tt=U(45716),St=U(48417),At=U(76546);class Ct extends At.D{loadOverrides(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(St.D.Experiment.LoadOverrides,{growthbookUserAttributes:k},!0)}))}}var Ot=U(23082),It=U(20705);class Dt extends Error{constructor(k,B,U,F,G,j,$){super(F),this.errorID=k,this.codeMap=B,this.debugMessage=U,this.error=F,this.code=G,this.innerError=j,this.userFacingMessage=$,Object.setPrototypeOf(this,Dt.prototype)}static make(k){var B;return new Dt(k.errorID,k.codeMap,k.debugMessage,null!==(B=k.error)&&void 0!==B?B:j.RQr.stringify(k.innerError),k.code,k.innerError,k.userFacingMessage)}}class Rt extends It.f{constructor(){super("login","login",[Y._.Ui_shared_json,Y._.Ui_buttons_json,Y._.Ui_store_json,Y._.Ui_registration_json]),this._loadingSteps=28,this._loadingStepWeight=[3,6,7,9,12,20,23,26,28],this._loadingStepIndex=0,this._baseLoadingBarPercent=.75,this._timer=null,this._loadingStartTime=null,this._loadingEndTime=null,this._loginStartTimeMS=null,this._loginTimeMS=null,this._servers=[],this._technicalMetricsManager=null,this.UNITED_STATES_ISO="US",this._loadingBarPercent=0,this._technicalMetricsManager=V.q.instance.prodigy.gameContainer.get("2a1-fed9"),this.showMenu=!1,this._loadingStartTime=window.loadStartTime,this._disableConsentBanner=!0,this.startLogin()}create(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.Splash),this.prodigyGame.broadcaster.addAppListener(dt.lT.LoginError,this.onError.bind(this),this),k.startTracing(lt.u.SplashCreate),this.prepLogin();try{yt.pF.isNativeApp()&&yt.pF.appType()===yt.uC.IOS_APP&&webkit.messageHandlers.setGameVisible.postMessage(0)}catch(e){}super.create(),k.endTracing(lt.u.SplashCreate)}prepLogin(){const k=new q.W(this.prodigyGame);V.q.instance.prodigy.gameContainer.get("e20-0fb0").initialize(k)}screenSetup(){this.setLoadingBarProgress("Setting up screen"),V.q.instance.prodigy.load.assets([Q.c.Sfx_ui,Q.c.Sfx_registration]),j.VyI.log(`Expo Release Channel: ${window.expoReleaseChannel}`,j.$bb.Verbose),super.screenSetup(),j.Aq$.isDefined(this._loadingEndTime)||(this._loadingEndTime=Date.now(),this._technicalMetricsManager.timeToPlayMS=this._loadingEndTime-this._loadingStartTime),Rt._firstLogin&&V.q.instance.prodigy.gameContainer.get("fab-547a").getData().then((([k,B])=>{k&&j.VyI.log(`Error fetching geolocation information: ${k.getErrorMessage()}`,j.$bb.Error),setTimeout((()=>{const k=this._loadingEndTime-this._loadingStartTime;j.VyI.log(`TTI: ${k}ms`,j.$bb.Verbose),Rt._firstLogin=!1}),100)})).catch(j.RQr.createHandler("Error sending first login information")),this.loadGame().catch(this.onError.bind(this))}loadQuestionRenderer(k){return(0,F.sH)(this,void 0,void 0,(function*(){return new Promise(((B,U)=>{const F=document.createElement("script");F.type="text/javascript",F.src=k,F.async=!1,F.onload=()=>{B()},F.onerror=k=>{k instanceof Error?U(k):U("string"==typeof k?new Error(k):new Error(JSON.stringify(k)))},document.head.appendChild(F)}))}))}loadQuestionInterface(k){return(0,F.sH)(this,void 0,void 0,(function*(){return new Promise(((B,U)=>{const F=document.createElement("script");F.type="text/javascript",F.src=k,F.async=!1,F.onload=()=>{window.ELA_QI&&(window.QI=window.ELA_QI),window.QI?B():U(new Error("Question Interface not found on window"))},F.onerror=k=>{k instanceof Error?U(k):U("string"==typeof k?new Error(k):new Error(JSON.stringify(k)))},document.head.appendChild(F)}))}))}loadQI(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.SplashLoadQI);const B=V.q.instance.prodigy.gameContainer.get("f1d-f7b1").getSubject();j.VyI.log(`Using subject '${B}' for QI session.`,j.$bb.Info);const U=B===wt.Q.Science?"science":"math";k.startTracing(lt.u.SplashLoadQIEducationStatus);const{questionInterfaceURL:G,questionRendererURL:$}=window.SW.Load.getEducationStatus(U);k.endTracing(lt.u.SplashLoadQIEducationStatus),G||this.throwEducationError(`Splash Screen: Error showing education because questionInterfaceURL (${G}) not provided.`,window.SW.Errors.ERROR_CODE_QI);const H=Date.now();this._loginTimeMS=null!==this._loginStartTimeMS?H-this._loginStartTimeMS:0,j.VyI.log(`Login load time: ${this._loginTimeMS}ms`,j.$bb.Verbose),this.setLoadingBarProgress("Loading education"),k.startTracing(lt.u.SplashLoadQILoadQuestion);try{$&&(yield j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){return this.loadQuestionRenderer($)})))))}catch(q){j.RQr.logError(q,"Splash Screen: Unable to load Question Renderer"),this.throwEducationError("Splash Screen: Unable to load Question Renderer",window.SW.Errors.ERROR_CODE_EDUCATION_QUESTION_RENDERER)}k.endTracing(lt.u.SplashLoadQILoadQuestion),this.setLoadingBarProgress("Loading QI"),k.startTracing(lt.u.SplashLoadQILoadQuestionInterface);try{yield j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){return this.loadQuestionInterface(G)}))))}catch(q){j.RQr.logError(q,"Splash Screen: Unable to load Question Interface");const k=j.RQr.stringify(q);this.throwEducationError(`Splash Screen: Unable to load Question Interface: ${k}`,window.SW.Errors.ERROR_CODE_EDUCATION_QUESTION_INTERFACE)}k.endTracing(lt.u.SplashLoadQILoadQuestionInterface);const W=Date.now()-H;j.VyI.log(`Education load time: ${W}ms`,j.$bb.Verbose),null!==this._technicalMetricsManager.timeToPlayMS&&this._technicalMetricsManager.timeToPlayMS>0&&(this._technicalMetricsManager.timeToPlayMS+=W+this._loginTimeMS),k.endTracing(lt.u.SplashLoadQI)}))}loadGame(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B;const U=V.q.instance.prodigy.gameContainer.get("afa-b7c5");U.startTracing(lt.u.SplashLoadGame);const F=this.loadBundledData(),G=yield this._loginDataPromise,$=this.loadQI();yield this.initIap(),yield this.initializeMembershipPurchases(),yield this.updateFeatureAccess(),yield this.getCharacter(G),yield F,this._endgameDataLoad=this.fetchEndgameQuestData(),yield this.initFeatureProvider(),rt.O.tryApplyLocaleOverrideFromFeatureProvider(),yield this.setupEducationData(G.goalId),this.initParentalConsentService(),yield this.initSegment(),yield this.setUpFeatureProvider(),this._gameNativeAppNotificationProvider.triggerNotification({triggerType:X.$P.AppStart}),U.startTracing(lt.u.SplashTitans),yield V.q.instance.prodigy.titansNetworkHandler.getTitans(),U.endTracing(lt.u.SplashTitans),U.startTracing(lt.u.QuestManagerHubSetup);const H=V.q.instance.prodigy.gameContainer.get("a25-68f4"),W={sucess:!0};H.init().catch((k=>{j.RQr.logError(k,"Error setting up quest manager hub"),W.sucess=!1,W.error=j.RQr.stringify(k)})).finally((()=>{W.quest_managers_set_up=Array.from(H.questManagerMap.keys()),U.endTracing(lt.u.QuestManagerHubSetup,W)})),yield V.q.instance.prodigy.gameContainer.get("d69-defe").refreshPetGear(),yield $,yield this.finishLoad(),V.q.instance.prodigy.gameContainer.get("5c7-e02d").postProcessPets();const q=V.q.instance.prodigy.gameContainer.get("c47-20b6");V.q.instance.prodigy.gameContainer.get("e03-b0a9").queueUncollectedTransactions(...null!==(B=null===(k=G.uncollectedOTPTransactions)||void 0===k?void 0:k.map((k=>Object.assign(Object.assign({},k),{analyticsTransactionID:q.purchase.getFunnelID()}))))&&void 0!==B?B:[]),V.q.instance.prodigy.gameContainer.get("c47-20b6").connection.sendGameLoadingEndedEvent(this._loadingStartTime,!0,this._loadingBarPercent),V.q.instance.prodigy.gameContainer.get("c47-20b6").session.sendSessionStartedEvent(),U.endTracing(lt.u.SplashLoadGame)}))}loadBundledData(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B;try{yield j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){yield ot.R.initialize()}))))}catch(U){throw Dt.make({errorID:null===(B=null===(k=window.SW)||void 0===k?void 0:k.Errors)||void 0===B?void 0:B.ERROR_CODE_DATA_BUNDLE,codeMap:Rt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: data bundle load failed",innerError:U})}}))}startLogin(){this._loginDataPromise=this.login()}login(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.SplashLogin);try{let B;for(;!B;)yield j.Egh.timeout(0),B=window.SW.Load.userInfo?JSON.parse(window.SW.Load.userInfo()):null;const U=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let G;switch(U.username=B.name,B.identity_provider){case"clever":G="clever";break;default:G="prodigy"}if(U.userDataPlatform=G,!B)throw Dt.make({errorID:window.SW.Errors.ERROR_CODE_NO_USER,codeMap:Rt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: login failed because no identity user found"});const $=V.q.instance.prodigy.gameContainer.get("c97-bd0d");return yield j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){return new Promise(((F,G)=>{$.login(B.uuid,B.accessToken,B.name,B.email,U,(B=>{k.endTracing(lt.u.SplashLogin,{login_success:!0}),F(B)}),((B,U)=>{k.endTracing(lt.u.SplashLogin,{login_error:!0,error_code:U});const F=U===Rt.READ_ONLY_STATUS_CODE;G(Dt.make({errorID:F?window.SW.Errors.ERROR_CODE_READ_ONLY_CHARACTER:window.SW.Errors.ERROR_CODE_LOGIN_GAME_AUTH_API,codeMap:Rt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: login failed",error:B,code:U,userFacingMessage:F?window.SW.Load.ERROR_DESCRIPTION_READ_ONLY_CHARACTER:void 0}))}))}))}))))}catch(e){throw this.isLoadError(e)?e:Dt.make({errorID:window.SW.Errors.ERROR_CODE_NO_USER,codeMap:Rt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: login failed",innerError:e})}}))}initIap(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.SplashIapInit),new K.V,k.endTracing(lt.u.SplashIapInit)}))}initializeMembershipPurchases(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U;if((yt.pF.isNativeAndroidApp()||yt.pF.isNativeIOSApp())&&yt.pF.eligibleVersionForMobileMembershipPurchase()){const F=V.q.instance.prodigy.gameContainer.get("f7c-2e57");yield null===(U=null===(B=null===(k=window.SW)||void 0===k?void 0:k.MOBILE_MEMBERSHIP_PURCHASES)||void 0===B?void 0:B.initMobileMembershipPurchase)||void 0===U?void 0:U.call(B,F.getUserID(),F.getSessionToken()).then((()=>{j.VyI.log("Mobile membership purchase initialized",j.$bb.Info)})).catch(j.RQr.createHandler("Mobile membership purchase initialization failed"))}}))}updateFeatureAccess(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.SplashUpdateFeatureAccess);try{this.setLoadingBarProgress("Updating Character Feature Data");const k=V.q.instance.prodigy.gameContainer.get("3a0-8003");yield j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){return k.updateFeatureAccess()})))).then((()=>{}))}catch(e){throw k.endTracing(lt.u.SplashUpdateFeatureAccess),Dt.make({errorID:window.SW.Errors.ERROR_CODE_CHARACTER,codeMap:Rt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: initializeCharacter failed",innerError:e})}k.endTracing(lt.u.SplashUpdateFeatureAccess)}))}getCharacter(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=V.q.instance.prodigy.gameContainer.get("afa-b7c5");B.startTracing(lt.u.SplashCharacter),this.setLoadingBarProgress("Getting character");const U=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=V.q.instance.prodigy.gameContainer.get("c97-bd0d");return new Promise(((G,j)=>{F.getCharacter(k,U,(()=>{B.endTracing(lt.u.SplashCharacter,{character_loaded:!0}),G()}),((k,U)=>{B.endTracing(lt.u.SplashCharacter,{character_error:!0,error_code:U}),j(Dt.make({errorID:window.SW.Errors.ERROR_CODE_CHARACTER,codeMap:Rt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: Get character failed",error:k,code:U}))})).catch((k=>{B.endTracing(lt.u.SplashCharacter,{character_error:!0}),j(Dt.make({errorID:window.SW.Errors.ERROR_CODE_CHARACTER,codeMap:Rt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: Get character failed",innerError:k}))}))}))}))}fetchEndgameQuestData(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.SplashFetchEndGameQuestData);try{yield ct.U.fetchProgress();const k=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;ct.U.progressData.step===H.B.NotStarted&&k.hasFoundAllKeystones()&&V.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(1,ut.jT.AllGemsPreviouslyCollected,tt.B.BREADCRUMB_ENDGAME_QUEST_SAW_NOOT_ACADEMY_DIALOGUE)}catch(e){throw k.endTracing(lt.u.SplashFetchEndGameQuestData),Dt.make({errorID:window.SW.Errors.ERROR_CODE_SECURE_CHARACTER,codeMap:Rt.LOGIN_ERROR_KEYS,debugMessage:"Splash Screen: fetchEndgameQuestData failed",innerError:e})}k.endTracing(lt.u.SplashFetchEndGameQuestData)}))}initFeatureProvider(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.SplashInitFeatureProvider);try{const k=V.q.instance.prodigy.gameContainer,B=k.get("306-5359"),U=k.get("c47-20b6");let $=window.gameEnvironmentVariables.experimentsClientKey;0;const H=G.FeatureFactory.createFeatureProvider(G.EFeatureProvider.growthBook,{apiHost:window.gameEnvironmentVariables.experimentsAPIHost,clientKey:$,backgroundSync:!1,attributes:{id:B.userID.toString()}}),W=new ht(H,k.resolve(Ct)),q=new nt(W),K=new st.mq({contextBase:{get onMobileApp(){return yt.pF.isNativeApp()},get isMember(){return k.get("306-5359").hasMembership()},get isSchoolHours(){return k.get("306-5359").isPlayingAtSchool()}},get:k=>q.evalFeature(k),activate(k){U.create.experimentVariationAssigned(k.experimentResult.featureId,k.experiment.key,k.experimentResult.key,W.getAttributes()).send()}}),z=new it(q,K);k.bind("073-6f3b").toConstantValue(z),k.bind("4aa-ea56").toConstantValue(q),k.bind("6b4-590f").toConstantValue(K),k.bind("47f-ab6a").toConstantValue(new gt.p(z,U)),yield j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){return z.loadFeatures()}))))}catch(e){throw k.endTracing(lt.u.SplashInitFeatureProvider),Dt.make({errorID:window.SW.Errors.ERROR_CODE_EXPERIMENT_PROVIDER,codeMap:{0:"NETWORK_ERROR"},debugMessage:"Error initializing experiment provider",code:0,innerError:e})}k.endTracing(lt.u.SplashInitFeatureProvider)}))}setupEducationData(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=V.q.instance.prodigy.gameContainer.get("afa-b7c5");B.startTracing(lt.u.SplashEducation);try{this.setLoadingBarProgress("Getting curriculum and grade");const U=V.q.instance.prodigy.gameContainer,G=U.get("e20-0fb0").player,$=U.get("c97-bd0d"),H=yield j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){return $.getCurriculumAndGrade(G)})))),W={login_source:"prodigy",user_agent:navigator.userAgent};j.Aq$.isDefined(this._loadingStartTime)&&j.Aq$.isDefined(this._loadingEndTime)&&(W.load_time=this._loadingEndTime-this._loadingStartTime);const q=window.eventData.trackingCookie;q&&(W.identity_track_id=q);const K=Object.assign(Object.assign({},H),{goalId:k});j.Aq$.isDefined(G.primaryParentID)&&(W.parentID=G.primaryParentID),G.onEducationLoaded(K),B.endTracing(lt.u.SplashEducation,{education_loaded:!0})}catch(e){throw B.endTracing(lt.u.SplashEducation,{education_error:!0}),Dt.make({errorID:window.SW.Errors.ERROR_CODE_EDUCATION_API,codeMap:Rt.SKILLS_ERROR_KEYS,debugMessage:"Splash Screen: Load skills failed",innerError:e})}}))}static makeLoadSkillsError(k,B="Splash Screen: Load skills failed"){return Dt.make({errorID:window.SW.Errors.ERROR_CODE_EDUCATION_API,codeMap:Rt.SKILLS_ERROR_KEYS,debugMessage:B,innerError:k})}initParentalConsentService(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.SplashParentalConsentService),V.q.instance.prodigy.gameContainer.get("580-3bea"),k.endTracing(lt.u.SplashParentalConsentService)}initSegment(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.SplashSegment);const B=V.q.instance.prodigy.gameContainer,U=B.get("e20-0fb0").player,F=B.get("c47-20b6");yield F.identify(),F.connection.sendGameLoadingStartedEvent(),U.hasMembership()&&F.purchase.hasSavedFunnelData()&&F.purchase.sendFunnelComplete(),this.prodigyGame.broadcaster.broadcast(dt.bv.AnalyticsInitialized),k.endTracing(lt.u.SplashSegment,{segment_initialized:!0})}))}setUpFeatureProvider(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U,G,$,H;const q=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!(null==q?void 0:q.registerDate))throw Dt.make({errorID:window.SW.Errors.ERROR_CODE_MISSING_PLAYER_DATA,codeMap:{0:"NETWORK_ERROR"},debugMessage:"Missing player data from GraphQL",code:0});const K=V.q.instance.prodigy.gameContainer.get("afa-b7c5");try{K.startTracing(lt.u.SplashSetupFeatureProvider);const z=V.q.instance.prodigy.gameContainer,Y=z.get("073-6f3b"),Q=V.q.instance.prodigy.gameContainer.get("3a0-8003"),X={id:q.userID.toString(),browser:j.o5U.getBrowserType(),device:j.o5U.getDeviceModel(),environment:_t.J.getEnvironment(),is_native_app:yt.pF.isNativeApp(),locale:rt.O.localeCode,registered_date:null!==(k=q.registerDate.getTime())&&void 0!==k?k:(new Date).getTime(),has_started:j.Aq$.isDefined(null===(B=q.data)||void 0===B?void 0:B.startDate),client_version:W.s.get("GameConstants.Build.VERSION"),is_member:q.hasMembership(),can_upgrade_membership:(yield q.getMembershipUpsellData()).upgradeOptions.length>0,member_features:Q.data.features,is_test_account:null===(U=q.data)||void 0===U?void 0:U.isTestAccount,experiment_eligibility:q.data.experimentEligibilityList};z.get("4aa-ea56").setIsTestAccount(!0===X.is_test_account);const[,Z]=yield z.get("fab-547a").getData();q.geolocationData=Z,(null===(G=Z.country)||void 0===G?void 0:G.name)&&(X.country=Z.country.name),(null===($=Z.country)||void 0===$?void 0:$.iso_code)===this.UNITED_STATES_ISO&&(null===(H=Z.subdivisions[0])||void 0===H?void 0:H.iso_code)?X.usState=Z.subdivisions[0].iso_code:X.usState="",Y.setAttributes(X),yield j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){return Y.loadFeatures()})))),vt.T.sendDecisionEvents(),vt.T.forceExperimentVariation(),yield j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){return vt.T.mergeUserExperimentAssetData(q.userID.toString())})))),this._packageFeatureRequirementLoad=mt.G.loadFeatures(),K.endTracing(lt.u.SplashSetupFeatureProvider,{feature_provider_setup:!0})}catch(e){throw K.endTracing(lt.u.SplashSetupFeatureProvider,{feature_provider_error:!0}),Dt.make({errorID:window.SW.Errors.ERROR_CODE_EXPERIMENT_PROVIDER,codeMap:{0:"NETWORK_ERROR"},debugMessage:"Error initializing experiment provider",code:0,innerError:e})}}))}finishLoad(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this.loadWorldList();yield Promise.all([k,V.q.instance.prodigy.skin.applyFestival().then((()=>this.prodigyGame.broadcaster.broadcast(dt.bv.FestivalInitialized))),this._packageFeatureRequirementLoad,this._endgameDataLoad]),(yield k)()}))}loadWorldList(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=V.q.instance.prodigy.gameContainer.get("afa-b7c5");k.startTracing(lt.u.SplashWorldList),this.setLoadingBarProgress("Getting worlds");const B=V.q.instance.prodigy.gameContainer;const U=B.get("c97-bd0d"),F=new j.bnh;U.getWorldList(F.resolve,(()=>F.resolve(null))).catch((k=>{j.RQr.createHandler("Error getting world list")(k),F.resolve(null)})),this._servers=yield F,k.endTracing(lt.u.SplashWorldList,{worlds_loaded:!0});const G=B.get("e20-0fb0").player,$=G.data,H=!j.Aq$.isDefined(G.curriculumTreeID)||!j.Aq$.isDefined(G.educationData.curriculumTreeID),W=!j.Aq$.isDefined($.school)||""===$.school,q=!G.hasGrade||H;return k.assignExtraDataToTrace(lt.u.Splash,{requires_user_setup:q||W}),window.QI&&window.SW.Load.userInfo&&this.initializeEducationLearningEngine(window.QI,JSON.parse(window.SW.Load.userInfo())),delete window.SW.Load.userInfo,()=>{q?(G.classIDs=[],this.setLoadingBarProgress("Starting registration"),k.startTracing(lt.u.SplashRegistrationMenu),V.q.instance.prodigy.open.startRegistration((()=>{k.endTracing(lt.u.SplashRegistrationMenu),W?(this.setLoadingBarProgress("Starting character creation"),this.loadCharacterCreateScreen()):(this.setLoadingBarProgress("Starting character selection"),this.loadCharacterSelectScreen())}),void 0,!0,!W)):this.initializeEducation(W).catch((k=>{var B;null===(B=V.q.instance.prodigy.game.state.getCurrentState())||void 0===B||B.onError(k)}))}}))}initializeEducation(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=V.q.instance.prodigy.gameContainer.get("afa-b7c5");B.startTracing(lt.u.SplashPlayerEducationInit),this.setLoadingBarProgress("Loading skills"),j.Egh.autoRetry((()=>(0,F.sH)(this,void 0,void 0,(function*(){return V.q.instance.prodigy.education.loadAndInitEducationData()})))).then((()=>{B.endTracing(lt.u.SplashPlayerEducationInit,{success:!0}),k?(this.setLoadingBarProgress("Starting character creation"),this.loadCharacterCreateScreen()):(this.setLoadingBarProgress("Starting character selection"),this.loadCharacterSelectScreen())})).catch((k=>{throw B.endTracing(lt.u.SplashPlayerEducationInit,{success:!1}),Rt.makeLoadSkillsError(k)}))}))}loadCharacterCreateScreen(){this.loadInitialScreenPrefabScene([$.l.CharacterCreateScreen])}loadCharacterSelectScreen(){this.loadInitialScreenPrefabScene([$.l.CharSelectScreen])}loadInitialScreenPrefabScene(k){const B=V.q.instance.prodigy.gameContainer.get("afa-b7c5");B.startTracing(lt.u.SplashPrefabRequest);const U={requested_prefabs:k.join(",")},F=k.includes($.l.CharacterCreateScreen),G=k.includes($.l.CharSelectScreen);F?U.screen_type="character_creation":G&&(U.screen_type="character_selection");const j=V.q.instance.game.state.states.get(Ot.G.Loading);j&&(j.data.target=Ot.G.PrefabScene),V.q.instance.prodigy.load.assets([Y._.General_core_2_json,Y._.General_icons_json,Y._.Ui_common_neutral_json,Y._.Font_button_json,Y._.Font_general_json],(()=>{U.assets_loaded=!0,V.q.instance.prodigy.startPrefabScene(k,{servers:this._servers,hideParentalConsentBanner:!0}),U.prefab_scene_started=!0,B.endTracing(lt.u.SplashPrefabRequest,U)}))}autoLoginSelectWorld(){V.q.instance.prodigy.open.serverSelectMode(new z.H(this._servers,(()=>{window.hideGameLoader(),V.q.instance.prodigy.loading(!1),V.q.instance.prodigy.world.enter().catch(j.RQr.createHandler("Error entering world"))}),null,null))}initializeEducationLearningEngine(k,B){const U=pt.getInstance(k);if(!U)return;const F={identityProviderFunction:()=>B,playerProviderFunction:()=>V.q.instance.prodigy.gameContainer.get("e20-0fb0").player};U.init(F)}onError(k){if(this.isLoadError(k)){const{debugMessage:B,codeMap:U,errorID:F,error:G,code:$,innerError:H,userFacingMessage:W}=k,q=`Login: onError: ${G}, error code[${$}], debugMessage: ${B}`;j.VyI.log(q,j.$bb.Error),this._loginStartTimeMS=null;const K=V.q.instance.prodigy.gameContainer.get("c97-bd0d").getErrorMessage($,U)||"Unknown error";V.q.instance.prodigy.gameContainer.get("c47-20b6").connection.sendGameLoadingEndedEvent(this._loadingStartTime,!1,this._loadingBarPercent);const z=new J.i;z.setKey(`prodigy_game.game_loading_error_${F}`),z.setValue(1),V.q.instance.prodigy.gameContainer.get("e59-eea6").logStat(z,Z.d.Increment),Et.u.showLoaderIfHidden();const Y=(null!=W?W:K).trim();window.SW.Load.setErrorScreen(B,void 0,Y,F)}else this.isError(k)?(j.VyI.log(`SplashScreen.onError: Error: ${k.message}`,j.$bb.Error),window.SW.Load.setErrorScreen(k.stack,k.name,k.message,void 0)):(j.VyI.log(`SplashScreen.onError: Unknown error type: ${JSON.stringify(null!=k?k:{})}`,j.$bb.Error),window.SW.Load.setErrorScreen(void 0,void 0,void 0,void 0))}isLoadError(k){return k instanceof Dt}isError(k){return k instanceof Error}shutdown(){this.clear(),this.prodigyGame.broadcaster.removeAppListener(dt.lT.LoginError,this);V.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(lt.u.Splash,{completed:!1}),super.shutdown()}clear(){null!==this._timer&&(window.clearTimeout(this._timer),this._timer=null)}throwEducationError(k,B){throw this._loginStartTimeMS=null,Dt.make({errorID:B,codeMap:{500:"EDUCATION_NOT_LOADED"},debugMessage:k,error:"ERROR",code:500})}setLoadingBarProgress(k){this._loadingStepWeight.length<=this._loadingStepIndex&&(j.VyI.log("SplashScreen.setLoadingBarProgress; more steps than defined.",j.$bb.Warning),this._loadingStepIndex=this._loadingStepWeight.length-1),this._loadingBarPercent=100*(this._loadingStepWeight[this._loadingStepIndex++]/this._loadingSteps*(1-this._baseLoadingBarPercent)+this._baseLoadingBarPercent),window.updateGameLoaderProgress(this._loadingBarPercent,k)}}Rt._firstLogin=!0,Rt.LOGIN_ERROR_KEYS={200:Tt.l.AllGood,400:Tt.l.WrongUsernameOrPassword,401:Tt.l.WrongUsernameOrPassword,403:Tt.l.WrongUsernameOrPassword,408:Tt.l.CheckNetworkConnection,409:Tt.l.CheckNetworkConnection,502:Tt.l.NetworkOffline,503:Tt.l.NetworkOffline,500:Tt.l.NetworkOffline,0:Tt.l.NetworkOffline},Rt.SKILLS_ERROR_KEYS={0:"NETWORK_ERROR_SKILLS"},Rt.READ_ONLY_STATUS_CODE=13,(0,F.Cg)([(0,at.b)("5a6-53a5"),(0,F.Sn)("design:type",Object)],Rt.prototype,"_gameNativeAppNotificationProvider",void 0)},26022:(k,B,U)=>{"use strict";U.d(B,{b:()=>re});var F=U(8674),G=U(62459),j=U(88022),$=U(99625),H=U(90633),V=U(35120),W=U(98013),q=U(34829),K=U(48975),z=U(10592),Y=U(93867),Q=U(33359),X=U(37155),Z=U(52322),J=U(13367),tt=U(78703),et=U(95798),it=U(98623);class st extends it.H{constructor(k,B,U,F,G,j){super(k,B,U,F),this.iceBlockSprite=null,this.iceBlockSprite=this.add(V.q.instance.prodigy.create.sprite(0,0,j.atlas,j.tag)),this.iceBlockSprite.anchor.set(j.x,j.y);const $=Math.floor(this.iceBlockSprite.width/G.size),H=Math.floor((U-this.iceBlockSprite.width*j.x)/G.size),W=Math.floor(this.iceBlockSprite.height/G.size),q=Math.floor((F-this.iceBlockSprite.height*j.y)/G.size);for(let V=H;V=500&&(this.chestType="C")}}const X=U.getState(this.chestID);G.Aq$.isDefined(X)&&0!==X?(this.chestSprite=this.add(V.q.instance.prodigy.create.sprite(0,0,j._.Tileset_core_json,`chest-${this.chestType}-2`)),this.chestSprite.inputEnabled=!1):(this.chestSprite=this.add(V.q.instance.prodigy.create.sprite(0,0,j._.Tileset_core_json,`chest-${this.chestType}-1`)),this.chestSprite.inputEnabled=!0),this.chestSprite.events.onInputDown.add((()=>{this.clicked()}),this),this.chestSprite.x-=Math.floor(.5*this.chestSprite.width),this.chestSprite.y=-this.chestSprite.height;const Z=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(ut.J.shouldSuppressAd(Z)&&"C"===this.chestType){this.chestSprite.tint=3355443;const k=V.q.instance.prodigy.create.sprite(0,.5*-this.chestSprite.height,j._.Ui_icons_json,"icon-medium-lockglow");k.anchor=new nt.Point(.5,.5),this.add(k)}this.path=W,this._segment.container.sendContainerDiscoveredEvent("A"===this.chestType?ct.ZF.WorldChest:ct.ZF.WorldMemberChest,this.chestID,this.chestSprite.x,this.chestSprite.y)}process(k){this.highlight(!1);const B=k.getState(this.chestID);G.Aq$.isDefined(B)&&0!==B&&(this.chestSprite.inputEnabled=!1,this.chestSprite.frameName=`chest-${this.chestType}-2`);const U=k.getQuestState();if(!G.Aq$.isDefined(U)||!G.Aq$.isDefined(U.req))return;const F=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;for(let G=0;GF.backpack.hasItem(U.req.type,U.req.ID)&&this.highlight(!0,-80,-90)}}clicked(){this.path.findPath(this.user.x,this.user.y,this.x-20,this.y+20,!0).then((k=>{k&&this.user.setPath(k,this.collect.bind(this))})).catch(G.RQr.createHandler("Unable to find path to chest"))}collect(){if(!this.user.evtProc&&G.cj9.distance(this.user.x,this.user.y,this.x,this.y)>50)return;const k=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if("C"===this.chestType&&!k.hasMembership()){const B={conversionFunnelName:ft.o.FunnelOpenMemberChestWorld,conversionFunnelMetadata:V.q.instance.prodigy.world.getCurrentMap()},U=ut.J.showYouTubeMembershipAd(this.game,!0)?dt.R.Video:dt.R.Static;if(this._segment.purchase.sendFunnelStart({type:"Open-Member-Chest-World",category:"World",contentId:V.q.instance.prodigy.world.getCurrentMap(),adType:U}),this._segment.container.sendContainerOpenedFailedEvent(ct.ZF.WorldMemberChest,this.chestID,lt.WE.MemberLocked,ht.N.OpenWorld),ut.J.shouldSuppressAd(k)){let k,B,U;k=this.x>640?.75:.25,this.y>360?(B=this.y+10,U=ot.i.UP):(B=this.y-this.chestSprite.height-10,U=ot.i.DOWN),V.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:this.x,yPosition:B,arrowXRelPos:k,arrowDirection:U})}else V.q.instance.prodigy.open.membershipInfo(null,B);return}if(G.Aq$.isDefined(this._chestKey)&&0===k.backpack.hasItem(this._chestKey.type,this._chestKey.ID))return void V.q.instance.prodigy.open.messageBoxPrefab({text:"CHEST_LOCKED_MESSAGE",textArgs:[this._chestKey.type,this._chestKey.ID]});"A"!==this.chestType&&"C"!==this.chestType||this._segment.container.sendContainerOpenedEvent("A"===this.chestType?ct.ZF.WorldChest:ct.ZF.WorldMemberChest,this.chestID,ht.N.OpenWorld),k.saveEnabled=!1,this.game.input.enabled=!1,this.chestSprite.inputEnabled=!1,this.user.evtProc=!0,V.q.instance.prodigy.audio.playSFX(18,"whoosh");this.game.add.tween(this.chestSprite,this).to({x:"-=5"},50,G.GS3.Linear.None).to({x:"+=10"},150,G.GS3.Linear.None).to({x:"-=10"},150,G.GS3.Linear.None).to({x:"+=5"},50,G.GS3.Linear.None).to({y:"-=50"},200,G.GS3.Quadratic.Out).to({y:"+=50"},200,G.GS3.Quadratic.In).to({y:"-=20"},100,G.GS3.Quadratic.Out).to({y:"+=20"},100,G.GS3.Quadratic.In).start().onTweenComplete.add(this.openChest,this,1)}openChest(){V.q.instance.prodigy.audio.playSFX(18,"dig"),V.q.instance.prodigy.audio.playSFX(19,"item"),this.chestSprite.frameName=`chest-${this.chestType}-2`,this.game.input.enabled=!0,V.q.instance.prodigy.open.gotItem(this.reward,(()=>{this.setOpenedState()}),null,"open-chest",void 0,void 0,{source_type:"B"!==this.chestType?"A"===this.chestType?at.C.WorldChest:at.C.WorldMemberChest:null})}setOpenedState(){const k=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.zone.setState(this.chestID,1),G.Aq$.isDefined(this.key)&&k.backpack.consume(this._chestKey.type,this._chestKey.ID,1),this.user.evtProc=!1,k.saveEnabled=!0,this.callback()}}class pt extends it.H{constructor(k,B,U,F,G,$,H,W,q=0){super(k,B,U,F),this._overlayImg=null,this._overlayImg=this.add(V.q.instance.prodigy.create.image(0,0,j._.General_core_json,"overlay-light")),this._overlayImg.width=G,this._overlayImg.height=$,this._overlayImg.inputEnabled=!0,this._overlayImg.alpha=q,this.onProcess=W,this.onClick=H,this._overlayImg.events.onInputDown.add(this.clicked.bind(this))}clicked(k,B){G.Aq$.isDefined(this.onClick)&&this.onClick(this)}process(k,B){G.Aq$.isDefined(this.onProcess)&&this.onProcess(k,B)}cleanup(){this._overlayImg&&(this._overlayImg.destroy(),this._overlayImg=null),this.onClick=null,this.onProcess=null}}var vt=U(95891),gt=U(73797);class mt extends pt{constructor(k,B,U,F,G,j,$,H,V,W){super(k,B,U,F,G,j,H,V,W),this.moveToX=null,this.moveToY=null,this.moveToX=vt.get($,"moveToX",U),this.moveToY=vt.get($,"moveToY",F),this.addPathingIconFunction=vt.get($,"addPathingIconFunction",null)}clicked(k,B){super.clicked(k,B),this.game.broadcaster.broadcast(gt.pm.MovePlayer,null,[this.moveToX,this.moveToY])&&(G.Aq$.isDefined(this.addPathingIconFunction)?this.addPathingIconFunction(B.x,B.y):G.VyI.log("ClickableMoveEvent.clicked - pathing was successful, but parent does not have addPathingIcon function. No pathing star shown.",G.$bb.Error))}}class yt extends it.H{constructor(k,B,U,F,j,$,H,W,q){super(k,B,U,F),this.user=null,this.path=null,this.ID=null,this.callback=null,this.collected=!1,this.allowCollect=!1,this.data=null,this.questState=null,this.user=j,this.path=$,this.ID=H,this.callback=q,this.data=G.Aq$.isDefined(W)?W:{range:30},G.Aq$.isDefined(W.range)||(this.data.range=30),this.allowCollect=!1,this.visible=!1,this.highlight(!1);const K=this.add(V.q.instance.prodigy.icon.createFromData(W,0,0,null,null,null,null,vt.get(W,"showLoading",!0)));K.inputEnabled=!0,K.events.onInputDown.add(this.clicked.bind(this),this),K.x-=Math.floor(.5*K.width),K.y=-K.height}process(k){this.allowCollect=!1,this.visible=!1,this.highlight(!1);const B=k.getQuestState();if(G.Aq$.isDefined(B)&&G.Aq$.isDefined(B.req)&&(this.questState=B.state,1!==B.state[this.ID]&&("item"===B.req.type||"key"===B.req.type)&&B.req.ID===this.data.ID&&!this.collected)){this.visible=!0;const k=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;B.req.N>k.backpack.hasItem(B.req.type,B.req.ID)&&(this.allowCollect=!0,this.highlight(!0,-80,-90))}}clicked(){this.path.findPath(this.user.x,this.user.y,this.x,this.y,!0).then((k=>this.clickedCallback(k))).catch(G.RQr.createHandler("Unable to find a path to the collectable"))}clickedCallback(k){k&&this.user.setPath(k,(()=>{this.collect()}))}collect(){if(!this.allowCollect||G.cj9.distance(this.user.x,this.user.y,this.x,this.y)>this.data.range)return;const k=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.collected=!0,this.questState[this.ID]=1,k.state.updated=!0,V.q.instance.prodigy.audio.playSFX(18,"dig"),k.backpack.add(this.data.type,this.data.ID),this.callback()}}const _t=U(56942).Q.Spine_npc_firefly_json;class Et extends pt{constructor(k,B,U,F,G,j,$,H,W=0){super(k,B,U,F,G,j,$,H,W),this.moving=!1,this._dir=1,V.q.instance.prodigy.load.assets([_t],(()=>{this._spine=this.add(V.q.instance.prodigy.create.spine(.5*G,.5*j+40,_t)),this.delay()}))}move(){if(this.game){this.moving=!0;const k=1080*Math.random()+100,B=520*Math.random()+100;kthis.x&&-1===this._dir&&(this._spine.scale.x*=-1,this._dir=1),this._spine.setAnimationByName(0,"walk",!0).mixDuration=.2,this._tween=this.game.add.tween(this,this,!0).to({x:k,y:B},2500,G.GS3.Quadratic.InOut),this._tween.start(),this._tween.onTweenComplete.add(this.delay,this)}}delay(){if(this._spine.setAnimationByName(0,"idle",!0).mixDuration=.2,this.game){this.moving=!1;const k=V.q.instance.prodigy.event.create();k.delay(3e3*Math.random()+2e3),k.function(this.move.bind(this)),k.start()}}cleanup(){this._spine&&(this._spine.destroy(),this._spine=null),this._tween&&(V.q.instance.game.tweens.remove(this._tween),this._tween=null),super.cleanup()}}var wt=U(79421);class Tt extends it.H{constructor(k,B,U,F,G,$,H,W,q,K){super(k,B,U,F),this.ID=null,this.user=null,this.chestType=null,this.mods=null,this.zoneName="",this.path=null,this.sprite=null,this.zone=null,this.ID=H,this.user=G,this.chestType=W,this.mods=q,this.zoneName=K,this.sprite=this.add(V.q.instance.prodigy.create.animatedSprite(0,0,j._.Tileset_core_json,[`chest-${this.chestType}-1`,`chest-${this.chestType}-2`])),this.sprite.inputEnabled=!0,this.sprite.events.onInputDown.add((()=>{this.clicked()}),this),this.sprite.x-=Math.floor(.5*this.sprite.width),this.sprite.y=-this.sprite.height,this.path=$}process(k){this.zone=k,this.highlight(!1);const B=k.getState(this.ID);G.Aq$.isDefined(B)&&0!==B&&(this.sprite.inputEnabled=!1,this.sprite.frameName=`chest-${this.chestType}-2`)}clicked(){this.path.findPath(this.user.x,this.user.y,this.x-20,this.y+20,!0).then((k=>{k&&this.user.setPath(k,(()=>{this.collect()}))})).catch(G.RQr.createHandler("Unable to find path to mimic"))}collect(){if(!this.user.evtProc&&G.cj9.distance(this.user.x,this.user.y,this.x,this.y)>50)return;V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.saveEnabled=!1,this.sprite.inputEnabled=!1,this.user.evtProc=!0,this.openChest()}openChest(){const k=V.q.instance.prodigy.event.create();k.sound(18,"dig"),k.function(this.user.chat.bind(this.user,1)),k.delay(1e3),k.enableInput(!0),k.function(this.startMimicBattle.bind(this)),k.start()}startMimicBattle(){V.q.instance.prodigy.battle.start(this.mods,this.afterBattle.bind(this,this.game,this.zoneName,this.x,this.y),this.afterBattle.bind(this,this.game,this.zoneName,this.x,this.y),null,this.zone.defaultOnFaint)}afterBattle(k,B,U,F){V.q.instance.prodigy.world.it(B,U-20,F+20,null,{callback:this.zone.setState.bind(this.zone,this.ID,1)})}}var St=U(59968);class At extends St.R{constructor(k,B,U,F,$,H,W){super(k,B,W,null,U,F),this._tag=$,this.sprite=this.sprites.addChild(V.q.instance.prodigy.create.sprite(0,0,$,0,void 0,this.onTextureLoaded.bind(this))),this.sprite.anchor.set(.5,1),G.Aq$.isDefined(H)&&(this.sprite.inputEnabled=!0,this.sprite.events.onInputDown.add((()=>{H(),this.sendNpcClickedEvent()}))),this.showName(),$!==j._.Npc_sprite_slurpy_json&&$!==j._.Npc_sprite_slime_guard_json||(this.nameText.GameObject.legacyTransform.y+=40)}animate(k="stand"){this.sprite.animations.play(k,void 0,!0)}onTextureLoaded(k){k&&(this._tag.indexOf("monster")>-1?(k.animations.add("walk",[0,1,2,3,4,5,6,7],10,!0,!1),k.animations.add("stand",[8,9,10,11,12,13,14,15],10,!0,!1)):k.animations.addIfFound("stand",["npc_0","npc_1","npc_2","npc_3","npc_4","npc_5","npc_6","npc_7"],10,!0))}stand(){1!==this.mode&&(this.mode=1,this.animate("stand"))}walk(){0!==this.mode&&(this.mode=0,this.animate("walk"))}}class Ct extends St.R{constructor(k,B,U,F,$,H,W,q=!1){super(k,B,W,null,U,F),this._fadeIn=q,this.alpha=q?0:this.alpha,this._body=this.add(V.q.instance.prodigy.create.sprite(0,-60,j._.Npc_sprite_broccolina_json,"body_0",void 0,this.onBodyLoaded.bind(this))),this._head=this.add(V.q.instance.prodigy.create.sprite(9,-108,j._.Npc_sprite_broccolina_json,"head_0",void 0,this.onHeadLoaded.bind(this))),this.sprites.addChild(this._body),this.sprites.addChild(this._head),k.add.tween(this._head,this).to({y:"-=1"},100,G.GS3.Linear.None).to({y:"+=2"},400,G.GS3.Linear.None).to({y:this._head.y},300,G.GS3.Linear.None).loop(!0).start(),G.Aq$.isDefined(H)&&this.addOnClick(H.bind(this)),this.nameText.GameObject.legacyTransform.y+=20,this.showName()}onBodyLoaded(k){var B;k.animations.add("stand",["body_0","body_1","body_2"],4,!0,!1),k.animations.play("stand",void 0,!0),this._fadeIn&&(null===(B=this.game.add.tween(this,this))||void 0===B||B.to({alpha:1},800,G.GS3.Quadratic.In,!0))}onHeadLoaded(k){k.animations.add("stand",["head_0","head_1","head_2"],5,!0,!1),k.animations.play("stand",void 0,!0)}}var Ot=U(18916);class It extends St.R{constructor(k,B,U,F,$,H,W){super(k,B,W,null,U,F),this.nameText.GameObject.legacyTransform.group.position.set(26,-140);const q=this.add(V.q.instance.prodigy.create.sprite(-20,-75,j._.Npc_sprite_eugene_json,"right_arm"));this._body=this.add(V.q.instance.prodigy.create.sprite(0,-80,j._.Npc_sprite_eugene_json,"body_0",void 0,this.onTextureLoaded.bind(this)));const K=this.add(V.q.instance.prodigy.create.sprite(40,-75,j._.Npc_sprite_eugene_json,"left_arm_0")),z=this.add(V.q.instance.prodigy.create.sprite(0,-110,j._.Npc_sprite_eugene_json,"head"));this.sprites.addChild(q),this.sprites.addChild(this._body),this.sprites.addChild(z),this.sprites.addChild(K),k.add.tween(z,this).to({y:"-=1"},200,G.GS3.Linear.None).to({y:"+=2"},500,G.GS3.Linear.None).to({y:z.y},400,G.GS3.Linear.None).loop(!0).start(),k.add.tween(K,this).to({y:"+=2"},800,G.GS3.Linear.None).delay(600).to({y:K.y},800,G.GS3.Linear.None).loop(!0).start(),k.add.tween(q,this).to({y:"+=2",x:"-=1"},800,G.GS3.Linear.None).delay(600).to({y:q.y,x:q.x},800,G.GS3.Linear.None).loop(!0).start(),G.Aq$.isDefined(H)&&this.addOnClick(H.bind(this)),this.showName()}onTextureLoaded(k){k&&(k.animations.add("stand",["body_0","body_1","body_2","body_2","body_2","body_2","body_1"],5,!0,!1),k.animations.play("stand",void 0,!1))}}var Dt=U(26657);class Rt extends St.R{constructor(k,B,U,F,G,j){super(k,B,j,null,U,F),this.tween=null,this.nameText.GameObject.legacyTransform.group.position.set(-10,-150)}setup(k,B){const U=j._.Npc_sprite_jim_json,F="jelly-idle-",G=this.add(V.q.instance.prodigy.create.sprite(0,0,U,`${F}1`));G.anchor.set(.5,1),this.sprites.addChild(G),B&&(this.sprites.scale.x=-1),this.tween=new Dt.s(G),this.tween.set("frameName",[`${F}1`,`${F}2`,`${F}3`,`${F}4`,`${F}5`,`${F}6`,`${F}7`,`${F}8`],150,9999),this.stand()}update(){G.Aq$.isDefined(this.tween)&&this.tween.update(Date.now())}walk(){this.stand()}stand(){this.tween.start()}flipJim(k){this.sprites.scale.x=k?-1:1}}class Pt extends St.R{constructor(k,B,U,F,$,H,W,q,K){if(super(k,B,W,null,U,F),this.radish=null,this.nameText.GameObject.legacyTransform.group.position.set(q,K),$===j._.Npc_sprite_slime_worker_json)this.body=this.add(V.q.instance.prodigy.create.sprite(0,-60,j._.Npc_sprite_slime_worker_json,"body_0")),this.face=this.add(V.q.instance.prodigy.create.sprite(12,-45,j._.Npc_sprite_slime_worker_json,"face",void 0,this.onBodyALoaded.bind(this))),this.radish=this.add(V.q.instance.prodigy.create.sprite(20,-80,j._.Npc_sprite_slime_worker_json,"radish_0",void 0,this.onRadishLoaded.bind(this))),this.faceTween=k.add.tween(this.face,this).to({y:"-=1"},300,G.GS3.Linear.None).to({y:this.face.y},300,G.GS3.Linear.None).delay(100).loop(!0).start(),this.sprites.addChild(this.radish),this.sprites.addChild(this.body),this.sprites.addChild(this.face),G.Aq$.isDefined(H)&&(this.body.inputEnabled=!0,this.body.events.onInputDown.add(H)),this.nameText.GameObject.legacyTransform.y-=100;else{this.body=this.add(V.q.instance.prodigy.create.sprite(-30,-63,j._.Npc_sprite_slime_worker_json,"red_0",void 0,this.onBodyBLoaded.bind(this)));const B=this.add(V.q.instance.prodigy.create.sprite(-55,-110,j._.Zone_bonfire_json,"pot"));this.face=this.add(V.q.instance.prodigy.create.sprite(-18,-45,j._.Npc_sprite_slime_worker_json,"face_red")),k.add.tween(this.face,this).to({y:"-=1"},300,G.GS3.Linear.None).to({y:this.face.y},300,G.GS3.Linear.None).delay(100).loop(!0).start(),this.sprites.addChild(B),this.sprites.addChild(this.body),this.sprites.addChild(this.face),this.nameText.GameObject.legacyTransform.y-=100}this.showName()}idle(){this.body.animations.play("idle",void 0,!1),this.face.frameName="stand_face",this.face.x-=7,this.body.y-=15,V.q.instance.game.tweens.remove(this.faceTween),this.face.y=-60,this.faceTween=this.game.add.tween(this.face,this).to({y:"-=1"},300,G.GS3.Linear.None).to({y:this.face.y},300,G.GS3.Linear.None).delay(100).loop(!0).start()}onBodyALoaded(k){k===this.body&&(this.body.animations.add("stand",["body_0","body_1","body_2"],8,!0,!1),this.body.animations.add("idle",["stand_0","stand_1","stand_2"],8,!0,!1),this.body.animations.play("stand",void 0,!1))}onBodyBLoaded(k){k===this.body&&(this.body.animations.add("stand",["red_0","red_0","red_1","red_1","red_2","red_2"],10,!0,!1),this.body.animations.play("stand",void 0,!1))}onRadishLoaded(k){k===this.radish&&this.radish.animations.add("stand",["radish_0","radish_1","radish_2"],10,!0,!1)}}var Mt=U(43531),Nt=U(87337),xt=U(12676);class Lt extends it.H{constructor(k,B,U,F,G,j,$,H,V=!1){super(k,B,U,F),this.SPRITE_ALIAS={slurpy:88,bok:62},this.dialogueController=null,this.npcTag=G,this.onComplete=H,this.updateCallback=$,this.fadeIn=V,V&&(this.alpha=0)}setup(k,B,U,F){const G=F||["npc_0","npc_1","npc_2","npc_3","npc_4","npc_5","npc_6","npc_7"];this.npc=this.add(V.q.instance.prodigy.create.sprite(0,0,`atlas-${this.SPRITE_ALIAS[B]}`,0)),this.npc.animations.addIfFound("stand",G,10,!0),this.npc.animations.play("stand",10,!0),this.npc.inputEnabled=!0,this.npc.anchor.set(.5,1),this.npc.events.onInputDown.add(this.process.bind(this,k,null,!0),this),U&&(this.npc.scale.x=-1),V.q.instance.prodigy.create.nameFont(this,0,0-this.npc.height-20,B.charAt(0).toUpperCase()+B.slice(1))}process(k,B,U){this.dialogueController&&this.dialogueController.close();if(!V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.isZoneQuestEnabled)return;if(this.dialogueController=new Mt.rD(this.game),!G.Aq$.isDefined(k.getQuestState())){if(k.startQuest(1),!G.Aq$.isDefined(k.getQuest(1)))return;return this.queueEventText(k,"onStart",1,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{this.updateCallback()}}]),this.dialogueController.start(),null}const F=k.getQuestState().ID,j=k.getQuest(F);if(k.isQuestComplete(F)&&!j.chain){const B=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.queueEventText(k,"onComplete",F,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{B.saveEnabled=!1,j.end(),G.Aq$.isDefined(j.reward)&&j.reward.length>0?(k.completeQuest(F),V.q.instance.prodigy.open.gotItem(j.reward,(()=>{B.saveEnabled=!0,this.updateCallback()}),null,"advanced-quest-event-reward",null,null,{source_type:at.C.QuestReward})):(k.completeQuest(F),B.saveEnabled=!0,this.updateCallback())}}]),this.dialogueController.start()}else!k.isQuestStarted(F)&&G.Aq$.isDefined(j)?(this.queueEventText(k,"onStart",F,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{k.startQuest(F),this.updateCallback()}}]),this.dialogueController.start()):U&&G.Aq$.isDefined(j)?(this.queueEventText(k,"onStart",F,this.dialogueController),this.dialogueController.start()):U&&this.onComplete()}queueEventText(k,B,U,F){const j=k.getQuest(U);if(G.Aq$.isDefined(null==j?void 0:j[B]))for(let G=0;Gj.x),this.fadeIn&&this.fade(),this.dialogueController&&this.dialogueController.close();if(!V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.isZoneQuestEnabled)return;if(this.dialogueController=new Mt.rD(this.game),U&&this._segment.gameWorld.sendNpcClickedEvent({npc_name:xt.N.Eve,npc_type:Nt.ac.QuestGiver,npc_id:"NPC_NAME_EVE"}),!G.Aq$.isDefined(k.getQuestState()))return void((null===(F=k.getQuest(1))||void 0===F?void 0:F.questGiver)===this.npcTag&&(k.startQuest(1),this.queueEventText(k,"onStart",1,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{this.updateCallback()}}]),this.dialogueController.start()));const $=k.getQuestState().ID,H=k.getQuest($),W=G.Aq$.isDefined(H)&&G.Aq$.isDefined(H.questGiver)?H.questGiver:this.npcTag,q=G.Aq$.isDefined(H)&&G.Aq$.isDefined(H.questReceiver)?H.questReceiver:this.npcTag;if(k.isQuestComplete($)&&!H.chain)if(q===this.npcTag){const B=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.queueEventText(k,"onComplete",$,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{B.saveEnabled=!1,H.end(),G.Aq$.isDefined(H.reward)&&H.reward.length>0?(k.completeQuest($),V.q.instance.prodigy.open.gotItem(H.reward,(()=>{B.saveEnabled=!0,this.updateCallback()}),null,"advanced-quest-event-reward",null,null,{source_type:at.C.QuestReward})):(k.completeQuest($),B.saveEnabled=!0,this.updateCallback())}}]),this.dialogueController.start()}else W===this.npcTag&&(this.queueEventText(k,"onStart",$,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{this.updateCallback()}}]),this.dialogueController.start());else!k.isQuestStarted($)&&G.Aq$.isDefined(H)&&W===this.npcTag?(this.queueEventText(k,"onStart",$,this.dialogueController),this.dialogueController.addEvents([{callback:()=>{k.startQuest($),this.updateCallback()}}]),this.dialogueController.start()):U&&G.Aq$.isDefined(H)?(this.queueEventText(k,W===this.npcTag?"onStart":"alternateOnStart",$,this.dialogueController),this.dialogueController.start()):U&&this.onComplete()}update(){super.update();const k=Date.now();for(let B=0;B100*Math.random()+10&&(this.tweens=this.standTween2,this.stand(),this.idleCounter=0)}resetToDefaultIdle(){this.tweens=this.standTween1,this.stand()}}var Bt=U(52437),Ut=U(85604),Ft=U(23082),Gt=U(73678);class jt extends it.H{constructor(k,B,U){super(k,B,440,5),this.user=null,this.banner=null,this.icon=null,this.state=null,this.text=null,this.user=U,this.banner=V.q.instance.prodigy.create.panel(this,0,0,10,2,"banner"),this.banner.visible=!1,this.icon=this.add(V.q.instance.prodigy.create.sprite(50,5,j._.General_icons_json,"quest")),this.state=this.add(V.q.instance.prodigy.create.sprite(50,5,j._.General_icons_json,"quest")),this.icon.visible=!1,this.state.visible=!1,this.arrow=this.add(V.q.instance.prodigy.create.sprite(175,0,j._.General_icons_json,"up")),this.arrow.visible=!1}process(k,B){const U=V.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);this.visible=!1;let F=null;if(G.Aq$.isDefined(this.text)&&(F=this.text.text,this.text.destroy()),this.state.frameName="quest",this.icon.loadNewTexture(j._.General_icons_json,"quest"),this.state.visible=this.icon.visible=!0,G.Aq$.isDefined(k.getState("dailyQuest"))){if(k.hasDailyQuestExpired()||k.isDailyQuestComplete()&&k.getState("handedOverQuest"))return;const B=k.getDailyQuestDescription(0);if(k.isDailyQuestComplete())this.icon.destroy(),this.icon=this.add(V.q.instance.prodigy.create.sprite(50,5,j._.General_icons_json,"quest-complete")),this.icon.x=350-this.icon.width,this.state.frameName="quest-complete",this.text=V.q.instance.prodigy.create.font(this,98,24,U.getText("QUEST_JOB_COMPLETE"),{align:"center",width:204,size:20});else if("pet"===B.type){this.icon.destroy();const k=k=>{k.x=350-k.width,k.onTextureLoaded=null};this.icon=this.add(V.q.instance.prodigy.icon.createFromData(B,300,5,null,k.bind(this))),this.state.visible=!1,this.text=V.q.instance.prodigy.create.font(this,50,24,U.getText("QUEST_PROGRESS_DEFEAT_MORE",B.N),{size:20})}this.banner.visible=!0,this.visible=!0}else if(Y.U.shouldShowEndgameQuestBanner(k.ID))return this.x-=20,this.icon.x=390-this.icon.width,this.text=V.q.instance.prodigy.create.font(this,98,24,U.getText("ENDGAME_QUEST_BANNER_GO_TO_ACADEMY"),{align:"center",width:244,size:20}),this.banner.destroy(),this.banner=V.q.instance.prodigy.create.panel(this,0,0,11,2,"banner"),this.banner.parent.setChildIndex(this.banner,0),void(this.visible=!0);const $=k.getQuestState();if(!G.Aq$.isDefined($)||!G.Aq$.isDefined($.req))return;const H=k.getQuest($.ID);if(!G.Aq$.isDefined(H))return;const W=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(k.isQuestComplete($.ID)){if(this.icon.destroy(),this.icon=this.add(V.q.instance.prodigy.create.sprite(50,5,j._.General_icons_json,"quest-complete")),this.state.frameName="quest-complete",this.text=V.q.instance.prodigy.create.font(this,98,24,U.getText("QUEST_JOB_COMPLETE"),{align:"center",width:204,size:20}),!H.chain&&!B.isQuestHub&&!k.isQuestProcessed($.ID)){$.ID===k.finalQuestId?this.processLegacyQuestFlow(k,H,$):this.processSimpleQuestFlow(k)}}else if(G.Aq$.isDefined(H.area)&&!ut.J.inArray(H.area,W.data.zone))this.text=V.q.instance.prodigy.create.font(this,98,24,U.getText("QUEST_FOLLOW_PATH"),{align:"center",width:204,size:20});else{const k=$.req;G.Aq$.isDefined(H.descKey)&&vt.size(H.descKey)>0?this.text=V.q.instance.prodigy.create.font(this,98,24,U.getText(H.descKey),{align:"center",width:204,size:20}):ut.J.inArray(["item","weapon","hat","outfit","boots","key"],k.type)?(this.remove(this.icon),this.icon=this.add(V.q.instance.prodigy.icon.createFromData(k,50,5,null,(k=>{this.icon.x=350-k.width}))),this.state.visible=!1,this.text=V.q.instance.prodigy.create.font(this,50,24,U.getText("QUEST_PROGRESS_COLLECT_MORE",Math.max(0,k.N-W.backpack.hasItem(k.type,k.ID))),{size:20}),112===k.ID&&"item"===k.type&&(this.icon.y-=10)):"pet"===k.type?(this.remove(this.icon),this.icon=this.add(V.q.instance.prodigy.icon.createFromData(k,50,5,null,(k=>{this.icon.x=350-k.width}))),this.state.visible=!1,this.text=V.q.instance.prodigy.create.font(this,50,24,U.getText("QUEST_PROGRESS_DEFEAT_MORE",k.N),{size:20})):"clear"===k.type&&(this.state.visible=!1,this.text=V.q.instance.prodigy.create.font(this,50,24,U.getText("QUEST_CLEAR",k.T),{size:20}))}if(this.banner.visible=!0,this.icon.x=350-this.icon.width,G.Aq$.isDefined(this.text)&&F!==this.text.text&&G.Aq$.isDefined(F)){this.arrow.visible=!0,this.arrow.y=50,this.arrow.alpha=1;this.game.add.tween(this.arrow,this).to({y:30,alpha:0},1e3,G.GS3.Linear.None).start().onTweenComplete.add((()=>{this.arrow.visible=!1}),this)}this.visible=!0}destroy(k={children:!0}){this.banner&&(this.banner.destroy(),this.banner=null),this.user=null,this.icon=null,this.state=null,this.text=null,super.destroy(k)}processSimpleQuestFlow(k){var B;const U=jt.ZONE_NPC_CONFIG_MAP[k.ID],F=this.game.state.get(Ft.G.TileScreen),j=175,$=this.user.position.x+j>this.game.width,H=$?this.user.position.x-j:this.user.position.x+j,W=!$&&!U.isRightFacing||$&&U.isRightFacing;if(Object.values(Ut.y).find((k=>k===U.asset))){const B=V.q.instance.prodigy.event.create();B.text(39,U.asset);const G=()=>{B.start()};F.addConstructedQuestNPC(H,this.user.position.y,U.asset,W,G.bind(this),!0).process(k,null,!0)}else V.q.instance.prodigy.prefabFactory.addPrefabNPC(U.asset,H,this.user.position.y,W,!0).then((k=>{k.findComponent(Bt.$).process()})).catch(G.RQr.createHandler(`Unable process the quest for NPC: ${U.asset} in ${k.ID}`));null===(B=U.secondaryAssets)||void 0===B||B.forEach(((B,U)=>{const H=20*(U+1),q=$?this.user.position.x-j-H:this.user.position.x+j+H;Object.values(Ut.y).find((k=>k===B))?F.addConstructedQuestNPC(q,this.user.position.y,B,W,(()=>null),!0):V.q.instance.prodigy.prefabFactory.addPrefabNPC(B,q,this.user.position.y,W,!0).catch(G.RQr.createHandler(`Error loading additional NPC asset: ${B} in ${k.ID}`))}))}processLegacyQuestFlow(k,B,U){const F=V.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),j=V.q.instance.prodigy.event.create();if(j.set(this.user,"evtProc",!0),G.Aq$.isDefined(B.onProc)&&B.onProc.length>0)for(let G=0;G=0&&j.text(B.onProc[G],"noot");else j.text(41,"noot");j.function((()=>{const B=V.q.instance.prodigy.dialogue.create(),G={text:F.getText("DIALOGUE_NOOT_282",F.getText(k.Guardian)),yes:()=>{k.processQuest(U.ID),V.q.instance.prodigy.world.it(k.questHub)},no:()=>{k.processQuest(U.ID)},face:1,anim:2};B.setText(G),B.startDeprecated("noot")})),j.set(this.user,"evtProc",!1),j.start()}}jt.ZONE_NPC_CONFIG_MAP={[Gt.A_.SKYWATCH]:{asset:Ut.y.Benni,isRightFacing:!0,secondaryAssets:[Ut.y.Broccolina]},[Gt.A_.SHIVERCHILL]:{asset:Ut.y.Bok,isRightFacing:!0},[Gt.A_.SHIPWRECK]:{asset:Ut.y.Eve},[Gt.A_.FOREST]:{asset:$.l.FloraNPC},[Gt.A_.BONFIRE]:{asset:Ut.y.Slurpy}};var $t=U(28628),Ht=U(129),Vt=U(47223),Wt=U(76945);class qt extends St.R{constructor(k,B,U,F,$,H,W,q,K){const z=new Vt.s(k);z.init(q.opponent[0]),super(k,B,z,null,U,F),this.ID=W,this.user=$,this.path=H,G.Aq$.isDefined(q.range)||(q.range=qt.DEFAULT_MOD_DISTANCE),this.mods=q;const Y=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player,Q=new Ht.a(this.game);let X=Y.getLevel();X=Wt.o.integerInRange(Math.max(1,X-2),Math.min(X+2,100)),G.Aq$.isDefined(this.mods.opponent[0].data)&&G.Aq$.isDefined(this.mods.opponent[0].data.level)&&(X=this.mods.opponent[0].data.level),this.mods.opponent=this.mods.opponent||[{data:{level:X},appearance:Q.appearance.getData(),equipment:Q.equipment.getData()}];const Z=[],J=Math.min(4,Y.kennel.petTeam.length-2+3*Math.random());for(let G=0;G{this.onStartComplete.dispatch()})).catch(G.RQr.createHandler("Error starting TileScreen"))}startAsync(){const k=Object.create(null,{start:{get:()=>super.start}});return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._loadCompleteSent){this._loadCompleteSent=!0;const k={mapName:this.data.name};this.metricsManager.createLoadingMetricEvent(ft.o.FunnelTileScreen,ft.o.StageLoadEnd,!1,k);V.q.instance.prodigy.gameContainer.get("afa-b7c5").endTracing(Kt.u.World,{successfully_loaded:!0,zone:this.zoneName})}const B=this.fadeIn();this.walkEnabled=!1;const U=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(ee.F.shouldShowLinearCampaignZoneLockTransition())return ee.F.activateLinearCampaignTransitionCutscene(),void k.start.call(this);const F=V.q.instance.prodigy.gameContainer.get("a25-68f4");this.isCutscenePlaying=yield F.isCutsceneTaskInProgress().catch((()=>(G.RQr.createHandler("[TileScreen] Error checking for cutscene tasks"),!1))),(this.isCutscenePlaying||this.data.isMultiplayerDisabled)&&V.q.instance.prodigy.gameContainer.get("c97-bd0d").leaveZone();const j=this.zone.getQuestState(),$=ie.x.arePopupsEnabled&&!this.data.arePopupsDisabled,W=this.isCutscenePlaying||!$||this.zone.isQuestComplete(null==j?void 0:j.ID)&&j.ID!==this.zone.finalQuestId,q=V.q.instance.prodigy.gameContainer.get("62e-110e");if(this.isMapScreen&&!W||q.shouldShowRetention){k.start.call(this);const B=k=>{this._initiallySeenPopupIDs.push(k)};V.q.instance.prodigy.open.onPrefabMenuOpened.add(B),yield new Promise((k=>{this.processPopups(k)})).then((()=>{V.q.instance.game.broadcaster.broadcast(gt.Y1.CheckForHUDAttention),this.popupsProcessed=!0})).catch(G.RQr.createHandler("TileScreen start error on processPopups")),V.q.instance.prodigy.open.onPrefabMenuOpened.remove(B)}if(this._questTasksSetup||(yield this.setupQuestTasks().catch(G.RQr.createHandler("[TileScreen]: Error setting up zone quests"))),W||(yield this.acknowledgeOtp().catch(G.RQr.createHandler("[TileScreen]: Error setting up OTP"))),U.justLeveled){const k=V.q.instance.prodigy.gameContainer.get("c47-20b6"),B=[H.B.BREADCRUMB_REACHED_LEVEL_2,H.B.BREADCRUMB_REACHED_LEVEL_3,H.B.BREADCRUMB_REACHED_LEVEL_4,H.B.BREADCRUMB_REACHED_LEVEL_5],F=[Qt.l.ReachedLevel2,Qt.l.ReachedLevel3,Qt.l.ReachedLevel4,Qt.l.ReachedLevel5],G=U.getLevel(),j=2,$=5;for(let U=j;U<=$;U++)if(G>=U){const G=B[U-j];this.breadcrumbManager.isBreadcrumbComplete(H.B.FEATURE_PROGRESSION_EVENTS,G)||(this.breadcrumbManager.completeBreadcrumb(H.B.FEATURE_PROGRESSION_EVENTS,G),k.playerProgression.sendFunnelAdvancedEvent({funnelName:"Onboarding",funnelType:"tutorial",stepName:F[U-j]}))}}this.user.evtProc=!1,this.zone.start(this.prodigyGame,this,this.data),this.data.start(this.prodigyGame,this),this.process(),V.q.instance.prodigy.skin.applySkin(this,this.zone),k.start.call(this),yield B,this.walkEnabled=!0}))}setupQuestTasks(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this._questTasksSetup)return;this._questTasksSetup=!0;const k=V.q.instance.prodigy.gameContainer.get("f91-8211");yield k.setupValidTasks().catch(G.RQr.createHandler("[TileScreen] Unable to load zone quests"));const B=V.q.instance.prodigy.gameContainer.get("a25-68f4");yield B.setupValidTasks().catch(G.RQr.createHandler("[TileScreen] Unable to setup tasks via QuestManagerHub"))}))}acknowledgeOtp(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this._otpAcknowledgeAttempted)return;const k=V.q.instance.prodigy.gameContainer.get("e03-b0a9");k.hasUncollectedTransactions&&(this._otpAcknowledgeAttempted=!0,yield k.acknowledgeUncollectedTransactions())}))}createBackground(){this._bgSprite&&this._bgSprite.destroy(),this.below&&this.below.destroy(),this.above&&this.above.destroy(),this.floor&&this.floor.destroy(),this._bgSprite=this.background.addChild(V.q.instance.prodigy.create.sprite(0,0,null)),this._bgSprite.width=this.game.width,this._bgSprite.height=this.game.height,this._bgSprite.alpha=0,this._bgSprite.inputEnabled=!0,this._bgSprite.events.onInputDown.add(this.listener.bind(this),this),V.q.instance.prodigy.gameContainer.get("2e2-6ee6").setBlockType(this._bgSprite.input,te.z.LOCOMOTION),this.below=V.q.instance.prodigy.create.element(this.background,0,0),this.above=V.q.instance.prodigy.create.element(this.foreground,0,0),this.floor=V.q.instance.prodigy.create.element(this.background,0,0)}screenUpdate(){if(super.screenUpdate(),this.data){const k=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.zone&&k&&this.zone.update(this.prodigyGame,this,this.data),this.data.update(this.prodigyGame)}}addAreaEvent(k,B,U,F,G){const j=new et.o(this.prodigyGame,this.floor,k,this.user,this.path,B,U,F,G);this.events.push(j);return F&&this.above.add(j.getOverlay()),j}addQuestNPC(k,B,U,F,G,j){const $=new Lt(this.prodigyGame,this.content,k,B,U,F,this.process.bind(this),G);return $.setup(this.zone,U,F,j),this.events.push($),$}addConstructedQuestNPC(k,B,U,F,G,$,H){let V,W;switch(U){case Ut.y.Benni:W=new zt.p(this.prodigyGame,"NPC_NAME_BENNI",488,Nt.ac.QuestGiver,this.content,k,B,"idle",void 0,F,$),V=new Lt(this.prodigyGame,this.content,k,B,U,F,this.process.bind(this),G),W.onClick.add((()=>{V.process(this.zone,null,!0)}),this);break;case Ut.y.Broccolina:W=this.addConstructedNPC(k,B,j._.Npc_sprite_broccolina_json,G,"NPC_NAME_BROCCOLINA",this.content,$),W.nameText.GameObject.legacyTransform.x+=50,W.scale.x=F?-W.scale.x:W.scale.x,W.nameText.GameObject.legacyTransform.scaleX=F?-1:1;break;case Ut.y.Flora:W=new zt.p(this.prodigyGame,"NPC_NAME_FLORA",489,Nt.ac.QuestGiver,this.content,k,B,"idle",void 0,F,$),V=new Lt(this.prodigyGame,this.content,k,B,U,F,this.process.bind(this),G),W.onClick.add((()=>{V.process(this.zone,null,!0)}),this);break;case Ut.y.Eve:V=new kt(this.prodigyGame,this.content,k,B,U,F,this.process.bind(this),G,$),V.setup(this.zone,U,F);break;case Ut.y.Bok:W=new zt.p(this.prodigyGame,"SHIVERCHILL_GUARDIAN",490,Nt.ac.QuestGiver,this.content,k,B,"idle",void 0,F,$),V=new Lt(this.prodigyGame,this.content,k,B,U,F,this.process.bind(this),G),W.onClick.add((()=>{H?H():V.process(this.zone,null,!0)}),this);break;case Ut.y.Slurpy:W=new zt.p(this.prodigyGame,"NPC_NAME_SLURPY",493,Nt.ac.QuestGiver,this.content,k,B,"animation",void 0,F,$),V=new Lt(this.prodigyGame,this.content,k,B,U,F,this.process.bind(this),G),W.onClick.add((()=>{V.process(this.zone,null,!0)}),this)}return this.events.push(V),V}addClickableEvent(k,B,U,F,G,j,$,H){const V=new pt(this.prodigyGame,H||this.content,k,B,U,F,G,j,$);return this.events.push(V),V}addClickableMoveEvent(k,B,U,F,G,j,$,H,V,W){const q={moveToX:G,moveToY:j,addPathingIconFunction:(k,B)=>{this.addPathingIcon(k,B)}},K=new mt(this.prodigyGame,W||this.content,k,B,U,F,q,$,H,V);return this.events.push(K),K}addClickableArea(k,B,U,F,G){const j={x:k,y:B,w:U,h:F,callback:G};this.clickAreas.push(j)}addFireflyEvent(k,B,U,F,G,j,$){const H=new Et(this.prodigyGame,this.foreground,k,B,U,F,G,j,$);return this.events.push(H),H}addChest(k,B,U,F,G,j){const $=new bt(this.prodigyGame,this.content,this.zone,B,U,this.user,this.path,k,F,G,this.process.bind(this),j);return this.events.push($),$}addMimic(k,B,U,F,G,j){const $=new Tt(this.prodigyGame,this.content,B,U,this.user,this.path,k,F,G,j);return this.events.push($),$}addCollect(k,B,U,F){const G=new yt(this.prodigyGame,this.content,B,U,this.user,this.path,k,F,this.processAddCollect.bind(this,k));return this.events.push(G),G}processAddCollect(k){this.preprocess();for(let B=0;Bthis.user.x&&U.flip(),U.onClick.addOnce((()=>{this.path.findPath(this.user.x,this.user.y,k+(k>this.user.x?-50:50),B+(B>this.user.y?-50:50),!0).then((k=>{k&&this.user.setPath(k,(()=>{U.alert()}))})).catch(G.RQr.createHandler("Error finding path to Pippet"))})),V.q.instance.prodigy.world.pippetEncounterDaily.isComplete()&&U.alert(),this.events.push(U),U}addWizard(k,B,U,F){const j=this.zone.getState(U);if(!(G.Aq$.isDefined(j)&&0!==j||!1)){const G=new qt(this.prodigyGame,this.content,k,B,this.user,this.path,U,F,this);return G.reload(),this.events.push(G),G}return null}addNPC(k,B,U,F=Nt.ac.CareGiver,G,j,$){const H=new K.s(this.prodigyGame);H.init({npc_name:j,npc_type:F,x_coord:k,y_coord:B,npc_animation_id:"idle"});const V=new At(this.prodigyGame,$||this.content,k,B,U,G,H);return this.events.push(V),V}addGnome(k,B,U,F,G,j,$){const H=new K.s(this.prodigyGame);H.init({npc_name:U,npc_type:F,x_coord:k,y_coord:B,npc_animation_id:"idle"});const V=new wt.N(this.prodigyGame,this.content,this.user,this.path,k,B,H,G,j,$);return this.events.push(V),V}addConstructedNPC(k,B,U,F,$,H,V=!1){const W=new K.s(this.prodigyGame);let q;switch(W.init({npc_name:$,npc_type:Nt.ac.QuestGiver,x_coord:k,y_coord:B,npc_animation_id:"idle"}),U){case j._.Npc_sprite_jim_json:q=new Rt(this.prodigyGame,this.content,k,B,U,W);break;case j._.Npc_sprite_broccolina_json:q=new Ct(this.prodigyGame,this.content,k,B,U,F,W,V);break;case j._.Npc_sprite_eugene_json:q=new It(this.prodigyGame,this.content,k,B,U,F,W);break;case j._.Npc_sprite_cebollini_json:q=new Ot.U(this.prodigyGame,H||this.content,k,B,U,F,W);break;case j._.Npc_sprite_slime_worker_json:case"npc-sprite-worker-slime-red":q=new Pt(this.prodigyGame,this.content,k,B,U,F,W);break;default:G.VyI.log("Add Constructed NPC failed: Tag not found",G.$bb.Error)}return this.events.push(q),q}addBlock(k,B,U){const F=new st(this.prodigyGame,U.content?this.content:this.background,k,B,this.path,U);return this.events.push(F),F}addUltimate(k,B,U){this.addPrefabToScreen($.l.UltimatePet,B,U).then((B=>{const U=this.game.time.events.loop(q.s.TARGET_FPS_40_MS,(()=>B.update()),this);B.onDestroy.addOnce((()=>this.game.time.events.remove(U)));B.findComponent(X.i).init(k)})).catch(G.RQr.createHandler("[TileScreen][addUltimate] Error loading the Ultimate prefab from GUID."))}addPrefabToScreen(k,B,U,j){return(0,F.sH)(this,void 0,void 0,(function*(){const F=V.q.instance.prodigy.gameContainer.get("d0e-64fd"),$=yield se.d.loadWithInjectedValuesAndDependenciesFromGUID(F,k,null!=j?j:{});$.transform.setPosition(B,U);const H=$.findComponent(G.y4o).getRootContainer();return this.content.addChild(H),H.x=$.transform.worldPosition.x,H.y=$.transform.worldPosition.y,$}))}preprocess(){var k;const B=this.zone.getQuestState(),U=G.Aq$.isDefined(B)?this.zone.getQuest(B.ID):null,F=G.Aq$.isDefined(U)&&this.zone.isQuestComplete(B.ID),j=G.Aq$.isDefined(U)&&this.zone.isQuestStarted(B.ID),$=[];let H=[];j&&(H=F&&!U.chain&&G.Aq$.isDefined(this.zone.questHub)?[this.zone.questHub]:this.zone.getRemainingQuestAreas(B.ID));for(let G=0;G0)for(let k=0;kk.distance-B.distance));let V=9999999;for(let W=0;W<$.length&&!($[W].distance>V);W++)V=$[W].distance,G.Aq$.isDefined($[W].event)&&G.Aq$.isDefined($[W].event.setClosest)&&$[W].distance>1&&$[W].event.setClosest()}process(k=!1){var B;k||this.preprocess(),this.openHUD();const U=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.isMapScreen&&U.isZoneQuestEnabled&&(null===(B=this.questProgress)||void 0===B||B.process(this.zone,this.data)),this.zone.process(this.prodigyGame,this,this.data),this.data.process(this.prodigyGame,this,this.zone)}showCollisions(k){if(G.Aq$.isDefined(this.menus)&&(W.l.removeAll(this.menus,!0),k)){const k=V.q.instance.game.add.container(),B=this.game.width,U=this.game.height;for(let F=0;F{const U=Z.v.getUltimatesPetLocation(B).split("-"),F=`${U[0]}-${U[1]}`,j=new G.I9Y(parseInt(U[2]),parseInt(U[3]));this.generateTamingUI(B,F),this.generateUltimateTrail(F,k),this.data.zoneName===F&&this.addUltimate(B,j.x,j.y)})).catch(G.RQr.createHandler("[TileScreen][processUltimatesIndicators] Could not get current petID for ultimate UI generation"))}}findTargetEvent(k){if(this.data.locations.includes(k)){return this.events.find((B=>B instanceof et.o&&B.getTarget()===k))}return null}generateUltimateTrail(k,B){const U=this.findTargetEvent(k);U?(0,ne.Ks)().loadWithDependenciesFromGUID($.l.UltimateTrail,this.contentGameObject).then((k=>{this._ultimatesElements.push(k);k.findComponent(tt.o).fireTrail(U),B.onSessionStatusChange.add(this.handleSessionStatusChange,this)})).catch(G.RQr.createHandler("[TileScreen][generateUltimateTrail] Error generating the Ultimate Trail. Reason:")):G.VyI.log(`[TileScreen][generateUltimateTrail] Could not find location ${k} in targetEvent list - probably the user does not have access to it`,G.$bb.Warning)}generateNPCTrail(k){const B=J.m.getSeededLocation().split("-"),U=`${B[0]}-${B[1]}`,F=this.findTargetEvent(U);F?(0,ne.Ks)().loadWithDependenciesFromGUID($.l.WanderingNPCTrail,this.contentGameObject).then((B=>{this._ultimatesElements.push(B);B.findComponent(tt.o).fireTrail(F),k.onSessionStatusChange.add(this.handleSessionStatusChange,this)})).catch((k=>{G.VyI.log(`[TileScreen][generateNPCTrail] Error generating the NPC Trail. Reason: ${k}`,G.$bb.Warning)})):G.VyI.log(`[TileScreen][generateNPCTrail] Could not find location ${U} in targetEvent list - probably the user does not have access to it`,G.$bb.Warning)}handleSessionStatusChange(k,B){if(k===z.n.None||k===z.n.Transition){for(const k of this._ultimatesElements)k.destroy();this._ultimatesElements.length=0,V.q.instance.prodigy.world.inZoneHub()||V.q.instance.prodigy.world.goToZoneHub(V.q.instance.prodigy.world.getCurrentZone())}}generateTrackingUI(){const k=J.m.getSeededLocation(),B=k.split("-")[0],U=k.split("-")[1];if(V.q.instance.prodigy.world.getZone(B).getMap(U).locations.find((k=>k===this.data.zoneName))){const k=new G._mx;k.addComponent(Xt.B).getRootContainer().setParent(this.uiLayer),(0,ne.Ks)().loadWithDependenciesFromGUID($.l.UltimateTaskUI,k).then((k=>{this._ultimatesElements.push(k);const B=V.q.instance.prodigy.gameContainer.get("580-3bea");Zt.b.statusRequiresConsent(B.consentStatus)&&k.transform.setPositionY(k.transform.localPosition.y+Jt.R.HUD_RESERVE_HEIGHT)})).catch((k=>{G.VyI.log(`[TileScreen] Error generating the UltimateTaskUI. Reason: ${k}`,G.$bb.Error)}))}}generateTamingUI(k,B){const U=B.split("-")[0];if(this.zone.ID===U&&this.zoneName!==B){const B=new G._mx;B.addComponent(Xt.B).getRootContainer().setParent(this.uiLayer),(0,ne.Ks)().loadWithDependenciesFromGUID($.l.UltimateTaskUI,B).then((B=>{this._ultimatesElements.push(B);B.findComponent(Q.P).setupTamingUI(k);const U=V.q.instance.prodigy.gameContainer.get("580-3bea");Zt.b.statusRequiresConsent(U.consentStatus)&&B.transform.setPositionY(B.transform.localPosition.y+Jt.R.HUD_RESERVE_HEIGHT)})).catch(G.RQr.createHandler("[TileScreen] Error generating the UltimateTaskUI."))}}onDoorClick(k,B){B||V.q.instance.prodigy.audio.playSFX(15,"door"),G.Aq$.isDefined(k)&&k()}endFX(){this.user.evtProc=!1,this.prodigyGame.input.enabled=!0,this.hideChat(!1)}startFX(){this.hideChat(!0)}hideChat(k){this.questProgress.visible=!k,this.isMapScreen&&this.questProgress.visible&&this.questProgress.process(this.zone,this.data);const B=V.q.instance.prodigy.open.chatMenu;(null==B?void 0:B.textField)&&B.textField.setVisible(!k)}}re.DEBUG_DRAW_AREA_EVENTS=!1},48757:(k,B,U)=>{"use strict";U.d(B,{c:()=>te});var F=U(8674),G=U(62459),j=U(95891),$=U(88022),H=U(85855),V=U(24521),W=U(99625),q=U(28628),K=U(97495),z=U(2090),Y=U(32389),Q=U(40295),X=U(94310),Z=U(58776),J=U(43516),tt=U(66582),et=U(92579),it=U(73678),st=U(81137),nt=U(47728),at=U(35120),rt=U(34829),ot=U(23029),ht=U(77938),ct=U(129),dt=U(2212),lt=U(43518),ut=U(76016),ft=U(93867),bt=U(75781),pt=U(64868),vt=U(70399),gt=U(36811),mt=U(55080),yt=U(43503),_t=U(96797),Et=U(19145),wt=U(19506),Tt=U(41012),St=U(73797),At=U(35084),Ct=U(85056),Ot=U(24981),It=U(31029),Dt=U(96810),Rt=U(41674),Pt=U(96494),Mt=U(76277),Nt=U(13956),xt=U(24110),Lt=U(46);var kt=U(65088),Bt=U(64353),Ut=U(85515),Ft=U(28962),Gt=U(95057),jt=U(40392),$t=U(93375),Ht=U(5075),Vt=U(98252),Wt=U(24695),qt=U(84642),Kt=U(80060),zt=U(30226),Yt=U(47255),Qt=U(35564),Xt=U(38454),Zt=U(15804),Jt=U(20705);class te extends Jt.f{constructor(k,B=[]){super(k.zoneName,k.atlas,B.concat([H.V.Bgm_intro])),this.showMenu=!0,this.tileSize=20,this.hideHex=!1,this.playersInfo={},this.playerList={},this.clickAreas=[],this.walkEnabled=!0,this.saveTag="",this.startX=500,this.startY=300,this.pendingPlayers=null,this.pendingCoordinates=new Map,this.frameUntilAddNextPlayer=-te.FRAMES_BETWEEN_ADDING_PLAYERS,this.hasBroadcastedInfo=!1,this._hasSeenSegmentedOffer=!1,this._hasCheckedForPetOffersPopup=!1,this._initiallySeenPopupIDs=[],this.canStartAddingPlayers=!1,this._world=at.q.instance.prodigy.world}shutdown(){var k,B;this._battlePassDataPromise&&(this._battlePassDataPromise.cancel(),this._battlePassDataPromise=null),G.Aq$.isDefined(this._friendListLoadTimeoutID)&&(window.clearTimeout(this._friendListLoadTimeoutID),this._friendListLoadTimeoutID=null),this.prodigyGame.broadcaster.removeAppListener(St.sd.GotFriendsListAppearance,this,"FriendsListOfActualFriends"),this.prodigyGame.broadcaster.removeAppListener(St.Y1.ShowHUD,this,St.HG.HUD),this.prodigyGame.broadcaster.removeAppListener(St.Y1.HideHUD,this,St.HG.HUD),this.prodigyGame.broadcaster.removeAppListener(St.pm.MovePlayer,this),this.difficultyOverlayPromise&&(this.difficultyOverlayPromise.cancel(),this.difficultyOverlayPromise=null);for(const U in this.playerList)this.playerList.hasOwnProperty(U)&&this.playerList[U].destroy();this.user&&(this.user.clickCallback=null,this.user.destroy(),this.user=null,at.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer=null);for(let U=0;U>1),this.user.enableLocomotion(this,this.user),this.user.reload(),this.user.onFullyLoaded.add((()=>{this.canStartAddingPlayers=!0,this.user.showName()})),at.q.instance.prodigy.world.inRestrictedSocialZone(at.q.instance.prodigy.world.getCurrentZone())||(this.user.clickCallback=at.q.instance.prodigy.open.card.bind(at.q.instance.prodigy.open,F,!0,et.a.available)),at.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer=this.user,this.addFollow(F.userID,F.equipment.getFollow()),this.prodigyGame.broadcaster.addAppListener(St.pm.MovePlayer,this.updateOnFaintData.bind(this),this),this.showMenu&&(this.menuBar=new G._mx,this.menuBar.addComponent(xt.B).getRootContainer().setParent(this.menus),null===(B=this.menuBarCreationPromise)||void 0===B||B.cancel(),this.menuBarCreationPromise=null,at.q.instance.game.broadcaster.addAppListener(St.Y1.ShowHUD,(()=>{this.menuBar.active=!0}),this,St.HG.HUD),at.q.instance.game.broadcaster.addAppListener(St.Y1.HideHUD,(()=>{this.menuBar.active=!1}),this,St.HG.HUD),-1===this.zoneName.indexOf("scene-")&&this.prodigyGame.broadcaster.broadcast(St.lT.Setup,St.HG.NetworkHandlers,[])),this.setupDifficultyOverlay(),super.create()}createBackground(){this.bg=at.q.instance.prodigy.create.sprite(0,0,this.screenName,"bg"),this.bg.inputEnabled=!0,this.bg.events.onInputDown.add(this.listener.bind(this),this),this.background.addChild(this.bg),at.q.instance.prodigy.gameContainer.get("2e2-6ee6").setBlockType(this.bg.input,Ft.z.LOCOMOTION)}screenSetup(){var k,B;if(G.Aq$.isDefined(this.bgmID)&&at.q.instance.prodigy.audio.autoplay&&(at.q.instance.prodigy.audio.playBGM(this.bgmID,!0),at.q.instance.prodigy.audio.resumeBGM()),!(null===(k=this.screenData)||void 0===k?void 0:k.doNotJoinNetworkZone)){at.q.instance.prodigy.gameContainer.get("c97-bd0d").joinZone(this)}if(null===(B=this.screenData)||void 0===B?void 0:B.runFSMOnLoad){const k=new G._mx,B=k.addComponent(It.u);B.assetId=this.screenData.runFSMOnLoad.ID,B.fsmVariables=this.screenData.runFSMOnLoad.variables,B.onComplete.addOnce((()=>{k.destroy()})),B.run()}super.screenSetup()}setupDifficultyOverlay(){var k;const B=at.q.instance.prodigy.world.getCurrentZoneObject(),U=(0,Mt.G)(z.u).enabled&&dt.J.isZoneMapDifficultyModeAgnostic(this.zoneName),F=null!==(k=at.q.instance.prodigy.gameContainer.get("306-5359").currentDifficulty)&&void 0!==k?k:K.i.Regular,G=(null==B?void 0:B.ID)===it.A_.LAMPLIGHT&&at.q.instance.prodigy.skin.isFestivalActive();U&&!G&&F!==K.i.Regular&&(this.difficultyOverlayPromise=Kt.d.loadWithInjectedValuesAndDependenciesFromGUID(at.q.instance.prodigy.gameContainer.get("d0e-64fd"),F===K.i.Hard?W.l.Overlay_difficulty_hard:W.l.Overlay_difficulty_expert,{}))}start(){this.user.evtProc=!1,super.start()}shouldSkipPopups(){if(!qt.x.arePopupsEnabled)return!0;const k=at.q.instance.prodigy.gameContainer.get("fc2-cb0a");return!!(null==k?void 0:k.waitingToTransport)}processPopups(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,j,$,H,z,Y,et,it,st;if(this.shouldSkipPopups())return void(null==k||k());const ht=at.q.instance.prodigy.gameContainer,ct=ht.get("e20-0fb0").player;if(dt.J.canShowNarrativeIntro(null===(B=null==ct?void 0:ct.data)||void 0===B?void 0:B.zone))return void at.q.instance.prodigy.world.it("lamplight-B3");if(dt.J.shouldShowWorldMapHardModeFtue()&&(yield new Promise((k=>{at.q.instance.prodigy.open.map({disableClose:!0,onClose:k})}))),(yield lt.M.canAutoSurfaceDailyLoginCalendar())&&(yield at.q.instance.prodigy.open.dailyLoginCalendar().catch(G.RQr.createHandler("Failed to open Daily Login Calendar on startup"))),ct.hasCompletedTutorial())try{yield gt.V.openPlayerGoalsIfPrizeReady(Rt.$N.AutoSurfaced)}catch(Nt){G.VyI.log(`Error opening player goals: ${Nt}`,G.$bb.Error)}if(!this._hasCheckedForPetOffersPopup&&pt._.isFeatureEnabled()){this._hasCheckedForPetOffersPopup=!0;const B=null!==(F=null===(U=this.screenData)||void 0===U?void 0:U.battleResult)&&void 0!==F&&F,G=null!==($=null===(j=this.screenData)||void 0===j?void 0:j.didRiftBattle)&&void 0!==$&&$;if(B||G){const B=ht.get("0f1-c356"),{sessionBattles:U}=yield B.getBattleStats(),F=ct.isPlayingAtSchool(),G=null!==(Y=null===(z=null===(H=pt._.getVariables())||void 0===H?void 0:H.defeatedPetStore)||void 0===z?void 0:z.battlesToPrompt)&&void 0!==Y?Y:3,j=U.length%G==0,$=0!==U.length&&U[U.length-1].battleType===q.gu.NormalRiftRun,V=ht.get("7a1-ff33"),{resetTime:K,defeatedPetOffers:Q}=yield V.updateDefeatedPetOffers();if(F||j||$){const B=[...Q].filter((k=>k.progress.status===Z.t.IN_PROGRESS));if(B.length>0)return void at.q.instance.prodigy.open.prefabMenu(W.l.LostPetModal,k,!0,!0,!1,{LOST_PETS_OFFER_DATA:B,LOST_PETS_RESET_TIME:K})}}}const ut=at.q.instance.prodigy.achievements.updateAchievementsCompletion(),mt=ht.get("a02-c2b2");if(this.dynamicStoreQuestManager.canTriggerOffer())return void this.dynamicStoreQuestManager.triggerCurrentOffer().catch(G.RQr.createHandler("Error triggering offer"));const Et=ht.get("62e-110e");if(Et.shouldShowRetention)return void Et.showChargedLevelsRetentionModal(k);if(Et.shouldShowDecayImmunityModal)return void Et.showChargedLevelsDecayImmunityModal(k);if(Et.shouldShowConversionModal)return void Et.showChargedLevelsConversionModal(k);if(Zt.h.shouldShowEntryIllustration(this.zoneName))return this.setupContentInputBlocker(),void this.openZoneEntryIllustration((()=>{null==k||k()}));if(ft.U.progressData.step===Q.B.NotStarted&&ct.hasFoundAllKeystones())return void bt.E.runAllKeystonesSequenceOnMapSetup(this.processPopups.bind(this,k));if(dt.J.shouldShowHardModeUnlockedPopup())return void dt.J.showDifficultyUnlockedPopup(K.i.Hard,k);if(dt.J.shouldShowExpertModeUnlockedPopup())return void dt.J.showDifficultyUnlockedPopup(K.i.Expert,k);if(wt.J.canShowUniquePetsIntro())return void wt.J.runUniquePetsIntroSequence(k);if(ct.justLeveled&&Ht.H.canShowEntryPopup())return void at.q.instance.prodigy.open.prefabMenu(W.l.ZoneUnlockedPopup,(()=>{Ht.H.completeEntryBreadcrumb(),null==k||k()}),void 0,void 0,void 0,{ZONE_STATUS_MODAL_TYPE:Ht.A.UNLOCKED,ZONE_STATUS_POPUP_TARGET_ID:jt.i.getHighestAvailableZoneData().zone});const At=mt.currentOfferStatus!==J.v.NO_ACTIVE_OFFER,It=mt.shouldAutoSurfaceSegmentedOffers()&&mt.userCanReceiveSegmentedOffers();if(!this._hasSeenSegmentedOffer&&At&&It){const B=ht.get("c47-20b6");if(mt.userHasLastChance())return B.playerProgression.sendFunnelAdvancedEvent({funnelName:mt.activeOffer.id,funnelType:"segmented_offers",stepName:Dt.l.SegmentedOffersGotExpired},{step_index:5}),this._hasSeenSegmentedOffer=!0,void _t.P.openConfiguredModal(k);if(mt.activeOffer&&G.Aq$.isDefined(null===(et=this.screenData)||void 0===et?void 0:et.battleResult)&&!mt.userHasSeenFirstOffer())return B.playerProgression.sendFunnelAdvancedEvent({funnelName:mt.activeOffer.id,funnelType:"segmented_offers",stepName:Dt.l.SegmentedOffersViewed},{step_index:2}),void _t.P.openConfiguredModal((()=>{this._hasSeenSegmentedOffer=!0,mt.setBreadcrumbHasSeenFirstOffer(),null==k||k()}));if(mt.activeOffer&&(null===(it=this.screenData)||void 0===it?void 0:it.battleResult)===q.XK.Defeat&&!mt.userHasSeenFirstBattleLost())return void _t.P.openConfiguredModal((()=>{this._hasSeenSegmentedOffer=!0,mt.setBreadcrumbHasSeenFirstBattleLost(),null==k||k()}));if(mt.activeOffer&&ct.justLeveled&&mt.userHasChangedSegment())return mt.resetSurfacingBreadcrumbs(),void _t.P.openConfiguredModal((()=>{this._hasSeenSegmentedOffer=!0,mt.setBreadcrumbHasSeenFirstOffer(),null==k||k()}))}if(yield yt.L.shouldShowRiftsCycleModal(this._world.getCurrentZone()))return void yt.L.openRiftsCycleModal(k);if(ct.hasCompletedTutorial()&&nt.x.shouldShowCurrencyDrainPopup(X.L.CurrencyDrainPopup))return void nt.x.openCurrencyDrainModal(Rt.$N.AutoSurfaced,k);if(ct.hasCompletedTutorial()&&!Ot.S.openedThisSession){let B=!1;const U=ht.get(vt.G.MathTower);if(U.isEnabledForPlayer(ct))U.redirectTowerTownPopup();else if(ct.tutorialCompletedThisSession)null==k||k();else{const U=(new Date).getTime();(G.Aq$.isDefined(ct.data.wwCooldownTime)?U-ct.data.wwCooldownTime:rt.s.DAY_IN_MS)>=2*rt.s.HOURS_IN_MS&&(ct.data.wwCooldownTime=U,B=!0),(yield Tt.e.hasWizardWatchAccess())||(B=!1);const F=()=>{const U=ht.get("8dc-04eb");this._battlePassDataPromise=new G.kBN(((k,B)=>{U.getCurrentBattlePassData().then(k).catch(B)})),this._battlePassDataPromise.promise.then((U=>{if(B){const B=()=>{ht.get("d0e-64fd").loadWithDependenciesFromGUID(W.l.PushNotificationPermission).catch((k=>{G.VyI.log("Error loading push notification permission prefab",G.$bb.Error)})),null==k||k()};this.openFeed(B)}else null==k||k()})).catch(G.RQr.createHandler("Walkable Screen: Error retrieving battle pass data"))},j=k=>{k||window.clearTimeout(this._friendListLoadTimeoutID),this._friendListLoadTimeoutID=null,this.prodigyGame.broadcaster.removeAppListener(St.sd.GotFriendsListAppearance,this,"FriendsListOfActualFriends"),F()};at.q.instance.prodigy.friendsListNetworkHandler.hasReceivedFriendsAppearanceOfActualFriends?F():(at.q.instance.game.broadcaster.addAppListener(St.sd.GotFriendsListAppearance,j.bind(this,!1),this,"FriendsListOfActualFriends",!1),this._friendListLoadTimeoutID=window.setTimeout(j.bind(this,!0),2e3))}return void(B||this.showSpellStatusEffectTutorialIfNeeded())}if(ct.hasUnclaimedMembershipRewards())return void(yield ct.rewardMembershipPrizes(k));if(ct.hasCompletedTutorial()&&!(ct.memberPrompt||!ct.hasMembership()&&zt.J.isSchoolHours()||ct.hasMembership()&&ct.backpack.hasItem("mount",1)>0)&&(!ct.isPlayingAtSchool()||ct.hasUnclaimedMembershipRewards())&&(ct.getMemberTier()===tt._$.NonMember&&Vt.pF.isNativeApp()||!Vt.pF.isNativeApp())){if(ct.seenMapTransitionPromptThisSession=!0,Bt.P.shouldUseUnifiedConversionFlow(Yt.o.FunnelTransitMap))return void at.q.instance.prodigy.open.unifiedConversionFlow(k,{conversionFunnelName:Yt.o.FunnelTransitMap,conversionStage:Yt.o.StageTransitMap},Rt.$N.AutoSurfaced);const B=ht.get("c47-20b6").purchase,U=ot.R.loadData(V.r.LevelBasedPromptsRuleset_json),F=kt.H.evaluate(Yt.o.FunnelTransitMap,U);if(F){const U=class{static selectLevelBasedAdAtRandomButNotTwiceInARow(k){const B=at.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=B.data.lastSeenLevelBasedMemberPrompt,F=U?k.filter((k=>k!==U)):k,G=Math.floor(Math.random()*F.length);return B.data.lastSeenLevelBasedMemberPrompt=F[G],B.updated=!0,F[G]}}.selectLevelBasedAdAtRandomButNotTwiceInARow(F.assets);at.q.instance.prodigy.open.dynamicPrompt(U,{MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_NAME:Yt.o.FunnelTransitMap},{originType:Rt.$N.AutoSurfaced},k);const G=Bt.P.shouldUseUnifiedConversionFlow(Yt.o.FunnelTransitMap)?Gt.R.UnifiedConversionFlow:Gt.R.DynamicMemberPrompt,j=null===(st=ot.R.loadData(U))||void 0===st?void 0:st.name;B.sendFunnelStart({adType:G,category:"Map-Transition",contentId:j,type:"Map-Transition",adVersion:Bt.P.getAdVersion(Yt.o.FunnelTransitMap)})}return}if(yield Wt.N.shouldShowFeaturedPetPopup())return void Wt.N.openFeaturedPetPopup((()=>null==k?void 0:k()));if(ut.length>0){for(let k=0;kB!==k.userID))}this.hasBroadcastedInfo=!1,G.VyI.log(`Pending players are of size: ${this.pendingPlayers.length}`,G.$bb.Verbose)}}onPlayerJoined(k){if(!G.Aq$.isDefined(this.content)||this._world.isZoneSinglePlayer(this._world.getCurrentZone()))return;k!==at.q.instance.prodigy.gameContainer.get("e20-0fb0").player.userID&&(G.Aq$.isDefined(this.playersInfo[k])&&(null===this.pendingPlayers||0===this.pendingPlayers.length?(this.addPlayer(this.playersInfo[k]),G.Aq$.isDefined(this.pendingCoordinates[k])&&this.movePlayer(this.pendingCoordinates[k])):(this.pendingPlayers.push(k),this.hasBroadcastedInfo=!1)),G.Aq$.isDefined(this.user)&&this.user.broadcastPlayerFullInfo(k))}onPlayerLeft(k){this.removePlayer(k)}removePlayer(k){G.Aq$.isDefined(this.playerList[k])&&G.Aq$.isDefined(this.content)&&(this.removeFollow(k),this.content.removeChild(this.playerList[k]),this.playerList[k].destroy(),delete this.playerList[k])}canAddUsersToScreen(){const k=j.size(this.playerList);return zt.J.isAvgFrameRateAboveThreshold(rt.s.get("GameConstants.Build.ADD_PLAYER_FPS_THRESHOLD_LIMIT"))?zt.J.isAvgFrameRateAboveThreshold(rt.s.get("GameConstants.Build.ADD_PLAYER_FPS_THRESHOLD_RENABLE"))&&rt.s.resetMaxPlayerLimit():rt.s.setMaxPlayerLimit(Math.max(k,rt.s.get("GameConstants.Build.MAX_ON_SCREEN_FPS_LIMITED"))),k0){const B=this.playerList[k.userID].position,U=ht.t.getItem("fx",k.type).data;let F=U.projectileCount;do{window.setTimeout((()=>{at.q.instance.prodigy.effects.playFX(k.type,B.x,B.y,k.x,k.y)}),U.delay*F),F--}while(F>0)}}movePlayer(k){G.Aq$.isDefined(this.playerList)&&G.Aq$.isDefined(this.playerList[k.userID])&&G.Aq$.isDefined(k.target)&&this.playerList[k.userID].setNewTarget(k.target.x,k.target.y)}handlePlayerChatMessage(k){if(G.Aq$.isDefined(this.playerList)&&G.Aq$.isDefined(this.playerList[k.userID])){const B=this.playerList[k.userID];G.Aq$.isDefined(k.emoteID)?B.emote(k.emoteID):G.Aq$.isDefined(k.chatID)?B.startChat(k.chatID):G.Aq$.isDefined(k.danceID)&&B.dance(k.danceID)}}transformPlayer(k){G.Aq$.isDefined(this.playerList)&&G.Aq$.isDefined(this.playerList[k.userID])&&(k.transformID?this.playerList[k.userID].transformToItem(k.transformType,k.transformID,G.Aq$.isDefined(k.showEffect)&&k.showEffect,null):this.playerList[k.userID].resetItemTransformation(G.Aq$.isDefined(k.showEffect)&&k.showEffect))}removeFollow(k){const B=k===at.q.instance.prodigy.gameContainer.get("e20-0fb0").player.userID?this.user:this.playerList[k];G.Aq$.isDefined(B)&&G.Aq$.isDefined(B.follow)&&(this.content.removeChild(B.follow),B.follow.destroy(),delete B.follow)}addFollow(k,B){if(!G.Aq$.isDefined(this.content))return;const U=k===at.q.instance.prodigy.gameContainer.get("e20-0fb0").player.userID?this.user:this.playerList[k];if(G.Aq$.isDefined(U)&&(this.removeFollow(k),G.Aq$.isDefined(B))){const k=at.q.instance.prodigy.create.follow(this.content,B,1,U);G.Aq$.isDefined(k)&&G.Aq$.isDefined(k.reload)&&k.reload(),U.follow=k}}screenUpdate(){if(super.screenUpdate(),null!==this.pendingPlayers&&this.pendingPlayers.length>0&&this.canStartAddingPlayers)if(this.frameUntilAddNextPlayer>te.FRAMES_BETWEEN_ADDING_PLAYERS){this.frameUntilAddNextPlayer=0;const k=this.pendingPlayers.pop();k!==at.q.instance.prodigy.gameContainer.get("e20-0fb0").player.userID&&G.Aq$.isDefined(this.playersInfo[k])&&(this.addPlayer(this.playersInfo[k]),G.Aq$.isDefined(this.pendingCoordinates[k])&&this.movePlayer(this.pendingCoordinates[k])),G.Aq$.isDefined(this.user)&&!this.hasBroadcastedInfo&&(this.user.broadcastPlayerFullInfo(),this.hasBroadcastedInfo=!0)}else this.frameUntilAddNextPlayer++;0===at.q.instance.prodigy.open.menus.length&&0===at.q.instance.prodigy.open.renderMenus.length&&null===at.q.instance.prodigy.open.chatMenu&&null===at.q.instance.prodigy.notifications.notificationTimer&&at.q.instance.prodigy.notifications.startTimer(),G.Nj.insertion(this.content.children,G.I6z.Y_SORT);const k=at.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(null==k?void 0:k.appearanceChanged){k.appearanceChanged=!1,this.user.reload(),this.user.showName(),this.addFollow(k.userID,this.hideHex?null:k.equipment.getFollow());at.q.instance.prodigy.gameContainer.get("c97-bd0d").emitMessage({action:Qt.x.Change})}}listener(k,B){if(!this.walkEnabled)return;const U=G.Aq$.isDefined(B)?B.x:Math.round(this.prodigyGame.input.x),F=G.Aq$.isDefined(B)?B.y:Math.round(this.prodigyGame.input.y);for(let G=0;G=k.x&&U<=k.x+k.w&&F>=k.y&&F<=k.y+k.h)return void k.callback()}this.prodigyGame.broadcaster.broadcast(St.pm.MovePlayer,null,[U,F])&&this.addPathingIcon(U,F)}addPathingIcon(k,B){const U=at.q.instance.prodigy.create.sprite(k,B,$._.General_icons_json,"star-small");U.scale.set(0,0),U.anchor.set(.5,.5),this.content.addChild(U),this.prodigyGame.add.tween(U,this).to({alpha:0},600,G.GS3.Cubic.In,!0);this.prodigyGame.add.tween(U.scale,this).to({x:1,y:1},600,G.GS3.Linear.None,!0).onTweenComplete.add((()=>{U.destroy()}))}getInjectedValue(k){return at.q.instance.prodigy.gameContainer.get(k)}hideOtherPlayer(k){const B=at.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return k.userID===B.userID||!k||!this.content||this._world.isZoneSinglePlayer(this._world.getCurrentZone())}openHUD(){if(G.Aq$.isDefined(this.menuBarCreationPromise))return;const k=at.q.instance.prodigy.gameContainer.get("d0e-64fd");this.menuBarCreationPromise=k.loadWithDependenciesFromGUID(st.x.isFeatureEnabled()?W.l.HUDMenuBar2025:this.hudMenuStyle),this.menuBarCreationPromise.then((k=>this.hudLoaded(k)))}hudLoaded(k){k.parent=this.menuBar;const B=at.q.instance.prodigy.game.time.events.loop(rt.s.TARGET_FPS_40_MS,k.update,k);k.onDestroy.addOnce((()=>at.q.instance.prodigy.game.time.events.remove(B))),Kt.d.updateInjectedValues(k,{[ut.P.WantsAttention]:this._hasSeenSegmentedOffer,[ut.P.JustSeenSegmentedOfferPopup]:[W.l.LostPetModal,W.l.SegmentedOffersModal].some((k=>this._initiallySeenPopupIDs.includes(k)))})}updateOnFaintData(){var k;const B=at.q.instance.prodigy.gameContainer.get("e20-0fb0").player;(null===(k=B.onFaintData)||void 0===k?void 0:k.mapKey)!==this._world.getCurrentMap()&&(B.onFaintData={mapKey:this._world.getCurrentMap(),coordinates:{x:this.user.position.x,y:this.user.position.y}})}openZoneEntryIllustration(k){Zt.h.openZoneEntryIllustrationPrefabForZone(this.zoneName.split("-")[0]).then((B=>{at.q.instance.game.broadcaster.broadcast(St.Y1.HideHUD,St.HG.HUD),this.destroyContentInputBlocker(),B.findComponentInChildren(Xt.V).onComplete.addOnce((()=>{at.q.instance.game.broadcaster.broadcast(St.Y1.ShowHUD,St.HG.HUD),null==k||k(),B.destroy()}))})).catch(G.RQr.createHandler("Could not load the zone entry illustration prefab"))}setupContentInputBlocker(){if(G.Aq$.isDefined(this._contentInputBlocker))return;this._contentInputBlocker=new G._mx,this._contentInputBlocker.addComponent(G.dLy);this._contentInputBlocker.addComponent(At.n).setSize(this.game.width,this.game.height),this.contentGameObject.addChild(this._contentInputBlocker),this._contentInputBlocker.setLayer(Ut.E.ForegroundLayer)}destroyContentInputBlocker(){var k;null===(k=this._contentInputBlocker)||void 0===k||k.destroy(),this._contentInputBlocker=null}}te.FRAMES_BETWEEN_ADDING_PLAYERS=5,(0,F.Cg)([(0,G.fFd)("db5-fb6e"),(0,F.Sn)("design:type",Object)],te.prototype,"featureRequirements",void 0),(0,F.Cg)([(0,G.fFd)("12f-4e29"),(0,F.Sn)("design:type",Pt.F)],te.prototype,"breadcrumbManager",void 0),(0,F.Cg)([(0,Nt.b)("7a1-ff33"),(0,F.Sn)("design:type",mt.s)],te.prototype,"dynamicStoreQuestManager",void 0)},14335:(k,B,U)=>{"use strict";U.d(B,{P:()=>X});var F=U(8674),G=U(62459),j=U(35120),$=U(76974),H=U(99625),V=U(129),W=U(21492),q=U(24110),K=U(80060),z=U(45716),Y=U(28080),Q=U(81617);class X extends Q.R{get _prefabGuid(){return H.l.DuelsLoadingScreen}constructor(k,B){super(),this.onCloseClicked=new G.HN0,this.data.playerA=k,G.Aq$.isDefined(B)&&(this.data.playerB=V.a.fromCharacter(j.q.instance.game,B))}create(){this._playerA=this.data.playerA,this._playerB=this.data.playerB;j.q.instance.prodigy.gameContainer.get("c97-bd0d").leaveZone(),this.startTime=Date.now(),this.complete=!1,this.isLoaded=!1,this.element=j.q.instance.prodigy.create.element(void 0),this.loadPrefab().then((()=>{this.start()})).catch((k=>{G.RQr.logError(k,"Failed to load duel loading screen"),this.showErrorPopup(j.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(z.l.CheckNetworkConnection))}))}loadPrefab(){return(0,F.sH)(this,arguments,void 0,(function*(k={}){var B,U;const $=j.q.instance.prodigy.gameContainer.resolve(W.C),H=[this._playerA,this._playerB].filter((k=>k)),[V,z]=H.map((k=>($.init(k.appearance.getName()),$.getName()))),Q=yield Promise.all(H.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){const B=new G._mx;B.active=!1,B.addComponent(G.dLy);const U=yield Y.D.createWizardObject(k,!1);return B.addChild(U),U.setLayer(void 0,!0),B})))));Q[1]&&(Q[1].transform.localScale.x=-1);const X=this._prefabRoot=new G._mx;X.addComponent(G.dLy),j.q.instance.game.add.graphics(0,0,this.element).beginFill(16703937).drawRect(0,0,j.q.instance.game.width,j.q.instance.game.height),this.element.addChild(X.addComponent(q.B).getRootContainer()),yield K.d.loadWithInjectedValuesAndDependenciesFromGUID(j.q.instance.prodigy.gameContainer.get("d0e-64fd"),this._prefabGuid,Object.assign({PLAYER_1_NAME:V,PLAYER_2_NAME:z,PLAYER_1_LEVEL:this._playerA.getLevel(),PLAYER_2_LEVEL:null===(B=this._playerB)||void 0===B?void 0:B.getLevel(),PLAYER_1_AVATAR:Q[0],PLAYER_2_AVATAR:Q[1],CLOSE_ON_CLICK:()=>this.onCloseClicked.dispatch()},k),X),this._closeButton=G.Uoy.getInjectedValue(X,"CLOSE_BUTTON"),this._closeButton.GameObject.active=null===(U=this.data.showCancel)||void 0===U||U;for(const F of Q)F.active=!0;return X}))}hideCancelButton(){var k;null===(k=this._closeButton)||void 0===k||k.lockState($.K.Disabled)}update(){var k;super.update(),null===(k=this._prefabRoot)||void 0===k||k.update()}shutdown(){var k;this.onCloseClicked.dispose(),null===(k=this._prefabRoot)||void 0===k||k.destroy(),super.shutdown()}}},76277:(k,B,U)=>{"use strict";U.d(B,{G:()=>j,_:()=>$});var F=U(77601);(0,F.gb)({key:"regional-bundle-triggers",default:!1,activateAssociatedExperiments:0}),(0,F.gb)({key:"use-membership-for-magicoin-out-of-magicoin-prompt",default:!1,activateAssociatedExperiments:0}),(0,F.gb)({key:"vanity-gear-sale",default:!1,activateAssociatedExperiments:0}),(0,F.gb)({key:"reward-scaling",default:{enabled:!1},activateAssociatedExperiments:0}),(0,F.gb)({key:"respawn-timers",default:{enabled:!1}});var G=U(35120);(0,F.gb)({key:"shorten-placement-test-game",activateAssociatedExperiments:0,default:{enabled:!1}});function j(k){return G.q.instance.prodigy.gameContainer.get("073-6f3b").getFeatureValue(k.key)}function $(k){return G.q.instance.prodigy.gameContainer.get("073-6f3b").isOn(k.key)}},65443:(k,B,U)=>{"use strict";var F;U.d(B,{$:()=>F}),function(k){k.Titan="titan",k.TitanMemberBonus="Titan-Member-Bonus"}(F||(F={}))},72042:(k,B,U)=>{"use strict";U.d(B,{U:()=>X});var F,G,j=U(8674),$=U(62459),H=U(79687),V=U(95891),W=U(68910),q=U(35120),K=U(51477),z=U(34829),Y=U(30405),Q=U(47255);!function(k){k.Image="image",k.Pixel="pixel",k.Sound="sound",k.Text="text",k.Json="json"}(G||(G={}));let X=F=class{constructor(k,B){this.loadingMetricProperties={},this.objectCountProperties={},this.deviceInfoProvider=null,this.crashedLastLogin=!1,this._totalAssetDownloadSize=0,this._totalAssetDownloadTime=0,this._totalAssetsDownloaded=0,this._averageDownloadSpeed=0,this._networkRequestCount=0,this._supportsWasm=!1,this.timeToPlayMS=0,this.timeInLoadingMS=0,this.pingMetricsIndex=0,this.game=k,this.deviceInfoProvider=B,this._supportsWasm="object"==typeof window.WebAssembly&&"function"==typeof window.WebAssembly.instantiate}createPingMetricEvent(k,B,U,G){const j=q.q.instance.prodigy.gameContainer,$=j.get("e20-0fb0").player;if(z.s.get("GameConstants.Build.ENABLE_FRAMERATE_METRICS")&&Y.o.inTestGroups($,F.TEST_GROUPS)){j.get("c47-20b6").technical.sendPingEvent(++this.pingMetricsIndex,k,B,U,G)}}createLoadingMetricEvent(k,B,U=!1,G={}){const j=q.q.instance.prodigy.gameContainer,H=j.get("e20-0fb0").player;let W=!1;if(z.s.get("GameConstants.Build.ENABLE_LOADING_METRICS")&&(Y.o.inTestGroups(H,F.TEST_GROUPS)||k===Q.o.FunnelCharSelect)){const U=q.q.instance.prodigy.timeManager.getServerTimeMs(),F=V.merge(G,this.getCustomMetrics()),H=this.loadingMetricProperties[k];let K=U,z=0,Y=!0;if(H&&(z=H.loadingMetricsIndex,B===Q.o.StageLoadEnd&&(K=H.loadingTimeStartMS)),B===Q.o.StageLoadStart)z++,this.loadingMetricProperties[k]={loadingMetricsIndex:z,loadingTimeStartMS:K};else if(B===Q.o.StageLoadEnd){H||$.VyI.log("Stage load end found without stage load start.",$.$bb.Warning);const k=U-K;F.loadTime=k}else $.VyI.log(`Unsupported loading metric type ${B}`,$.$bb.Warning),Y=!1;if(Y){const U=this.getLoadingEventData(F),G=B===Q.o.StageLoadStart?"Technical Loading Started":"Technical Loading Completed";j.get("c47-20b6").technical.sendLoadingEvent(G,k,z,U),W=!0}}return W}getLoadingEventData(k){if(!z.s.get("GameConstants.Build.ENABLE_ADVANCED_METRICS"))return{};const B={};$.Aq$.isDefined(this.objectCountProperties.Element)&&(B.elements_created=this.objectCountProperties.Element.createdCount,B.elements_destroyed=this.objectCountProperties.Element.destroyedCount),$.Aq$.isDefined(this.objectCountProperties.GameObject)&&(B.objects_created=this.objectCountProperties.GameObject.createdCount,B.objects_destroyed=this.objectCountProperties.GameObject.destroyedCount),$.Aq$.isDefined(this.objectCountProperties.UIElement)&&(B.ui_elements_created=this.objectCountProperties.UIElement.createdCount,B.ui_elements_destroyed=this.objectCountProperties.UIElement.destroyedCount),B.connection_downlink_speed=this.deviceInfoProvider.getConnectionDownlinkSpeed(),B.connection_rtt=this.deviceInfoProvider.getConnectionRTT(),B.connection_type=this.deviceInfoProvider.getConnectionType(),B.effective_connection_type=this.deviceInfoProvider.getConnectionEffectiveType(),B.device_memory=this.deviceInfoProvider.getDeviceMemory(),B.hardware_concurrency=this.deviceInfoProvider.getHardwareConcurrency(),B.js_heap_size_limit=this.deviceInfoProvider.getJSHeapSizeLimit(),B.js_heap_size_used=this.deviceInfoProvider.getUsedJSHeapSize(),B.crashed_last_login=this.crashedLastLogin,B.crashed_time=this.crashedLastTime,B.api_request_count=this._networkRequestCount,B.total_asset_bytes_downloaded=this._totalAssetDownloadSize,B.total_asset_time_downloading=this._totalAssetDownloadTime,B.average_download_speed=this.getAverageDownloadSpeedMBps();const U=this.getRenderInfo();B.render_type=U.renderType,B.webgl_version=U.webGLVersion,B.web_worker_support=this.deviceInfoProvider.isWebWorkerAvailable(),B.web_assembly=this._supportsWasm,B.web_socket=this.deviceInfoProvider.isWebSocketAvailable();const F=this.getAssetCounts();return B.image_count=F[G.Image],B.pixel_count=F[G.Pixel],B.sound_count=F[G.Sound],B.text_count=F[G.Text],B.json_count=F[G.Json],B}getAverageDownloadSpeedMBps(){return this._averageDownloadSpeed/1e6*8}getRenderInfo(){switch(q.q.instance.game.renderer.type){case W.RENDERER_TYPE.WEBGL:return{renderType:"webGL",webGLVersion:String(this.game.renderer.context.webGLVersion)};case W.RENDERER_TYPE.CANVAS:return{renderType:"canvas",webGLVersion:"NA"};default:return{renderType:"unknown",webGLVersion:"NA"}}}getAssetCounts(){const k=this.game.cache,B={[G.Image]:0,[G.Pixel]:0,[G.Sound]:0,[G.Text]:0,[G.Json]:0};for(const U in $.r05)if(isNaN(Number(U))){const F=$.r05[U],j=k.getKeys(F),H=j.length;let V=null;switch(F){case $.r05.IMAGE:V=G.Image;let U=0;for(let B=0;B{localStorage.setItem("prodigy_browser_status","unloaded")}));const k=localStorage.getItem("prodigy_browser_status");this.crashedLastLogin=$.Aq$.isDefined(k)&&"unloaded"!==k,this.crashedLastLogin&&(this.crashedLastTime=localStorage.getItem("prodigy_browser_time"),$.Aq$.isDefined(this.crashedLastTime)||(this.crashedLastTime=null)),localStorage.setItem("prodigy_browser_status","loaded"),this.setLastMapLoadStarted("none"),setInterval((()=>{localStorage.setItem("prodigy_browser_time",(new Date).toISOString())}),1e3)}}catch(e){$.VyI.log("checkForCrash failed",$.$bb.Error)}}setLastMapLoadStarted(k){$.o5U.hasLocalStorageSupport()&&localStorage&&localStorage.setItem("prodigy_browser_map_load",k)}setInBattle(k){$.VyI.log(`setInBattle(${k})`,$.$bb.Verbose),$.o5U.hasLocalStorageSupport()&&localStorage&&($.Aq$.isDefined(k)?localStorage.setItem("prodigy_browser_in_battle",k):localStorage.removeItem("prodigy_browser_in_battle"))}objectCreated(k){const B=this.objectCountProperties[k];$.Aq$.isDefined(B)?B.createdCount=B.createdCount+1:this.objectCountProperties[k]={createdCount:1,destroyedCount:0}}objectDestroyed(k){const B=this.objectCountProperties[k];$.Aq$.isDefined(B)?B.destroyedCount=B.destroyedCount+1:($.VyI.log("object destroyed before created",$.$bb.Warning),this.objectCountProperties[k]={createdCount:0,destroyedCount:1})}setLastGameSessionStartTime(k){this.lastGameSessionStartTime=k}getLastGameSessionStartTime(){return this.lastGameSessionStartTime}assetDownloaded(k,B){this._totalAssetDownloadSize+=k,this._totalAssetDownloadTime+=B,++this._totalAssetsDownloaded;const U=k/B;this._averageDownloadSpeed+=(U-this._averageDownloadSpeed)/this._totalAssetsDownloaded}increaseNetworkRequestCount(){++this._networkRequestCount}sendOnboardingFunnelEvent(k){q.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:"Onboarding",funnelType:"tutorial",stepName:k})}};X.TEST_GROUPS=[5],X.loadEventsSent={},X=F=(0,j.Cg)([(0,H.injectable)(),(0,j.Qj)(0,(0,H.inject)("51c-03a0")),(0,j.Qj)(1,(0,H.inject)("880-55b2")),(0,j.Sn)("design:paramtypes",[K.n,Object])],X)},98193:(k,B,U)=>{"use strict";U.d(B,{z:()=>J});var F,G=U(62459),j=U(28628),$=U(90633);!function(k){k[k.None=0]="None",k[k.CriticalHit=1]="CriticalHit",k[k.Effective=2]="Effective",k[k.Ineffective=4]="Ineffective",k[k.Missed=8]="Missed",k[k.Heal=16]="Heal",k[k.Fumble=32]="Fumble",k[k.Absorb=64]="Absorb",k[k.Reflected=128]="Reflected",k[k.Dodge=256]="Dodge"}(F||(F={}));var H=U(35120),V=U(34829),W=U(22023),q=U(10670),K=U(24047),z=U(65050),Y=U(25089),Q=U(67665);const X={critical:F.CriticalHit,effective:F.Effective,ineffective:F.Ineffective,heal:F.Heal,absorbed:F.Absorb,reflected:F.Reflected,dodged:F.Dodge},Z=new Set([j.gu.StatusEffectsTutorial]);class J extends Y.v{get battleId(){var k;return null===(k=this._baseData)||void 0===k?void 0:k.battle_id}setupBattleData(k){var B,U,F,G;const j=k.resumedData;this._baseData={battle_id:k.battle_id,battle_type:k.battle_type,battle_variant:k.battle_variant},this._questionData={questions_answered_correctly:null!==(B=null==j?void 0:j.questionsAnsweredCorrectly)&&void 0!==B?B:0,questions_asked:null!==(U=null==j?void 0:j.questionsAnswered)&&void 0!==U?U:0},this._numberOfRounds=null!==(F=null==j?void 0:j.numberOfRounds)&&void 0!==F?F:0,this._turn=null!==(G=null==j?void 0:j.turn)&&void 0!==G?G:0,this._battleStartTimeMs=Date.now(),this._numberOfClicks=0,this._battleInstanceAndId={instance_id:k.instance_id,instance_type:k.instance_type}}sendBattleStartEvent(k,B=null){if(this.setupBattleData(k),this.shouldSuppressBattleEvents())return;const U=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{boss:k.battle_variant.includes(q.VB.Boss)||!1,pvp:k.battle_type===j.gu.Duel&&k.battle_variant!==q.VB.DuelsStadiumBot,coop:!1}),k),B),this.getCommonEventDataProperties());Q.Y.track("Battle Started",U)}sendBattleResumedEvent(k,B=null){if(this.setupBattleData(k),this.shouldSuppressBattleEvents())return;const U=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{boss:k.battle_variant.includes(q.VB.Boss)||!1,pvp:k.battle_type===j.gu.Duel&&k.battle_variant!==q.VB.DuelsStadiumBot,coop:!1}),k),B),this.getCommonEventDataProperties());Q.Y.track("Battle Resumed",U)}sendBattleCompleteEvent(k,B=null){var U;if(!(null===(U=this._baseData)||void 0===U?void 0:U.battle_id))return void G.VyI.log("Error: Battle Complete event cannot be sent before Battle Start or Resume event",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const F=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),this._questionData),this._battleInstanceAndId),{rounds:this._numberOfRounds,turn:this._turn,duration:(Date.now()-this._battleStartTimeMs)/V.s.SECONDS_TO_MILLISECONDS_MULTIPLIER}),k),B),this.getCommonEventDataProperties());Q.Y.track("Battle Completed",F)}sendBattleParticipantEnteredEvent(k,B=null){var U;if(!(null===(U=this._baseData)||void 0===U?void 0:U.battle_id))return void G.VyI.log("Error: Battle Participant Entered event cannot be sent before Battle Start or Resume event",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const F=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{entry_round:this._numberOfRounds,turn:this._turn}),k),B),this.getCommonEventDataProperties());Q.Y.track("Battle Participant Entered",F)}sendBattleParticipantOutcomesEvent(k,B=null){var U;if(!(null===(U=this._baseData)||void 0===U?void 0:U.battle_id))return void G.VyI.log("Error: Battle Participant Outcomes event cannot be sent before Battle Start or Resume event",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const F=Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),k),B),this.getCommonEventDataProperties());Q.Y.track("Battle Participant Outcomes",F)}sendBattlePetCapturedEvent(k,B=null){var U;if(!(null===(U=this._baseData)||void 0===U?void 0:U.battle_id))return void G.VyI.log("Error: Pet Captured Event cannot be sent before Battle Start or Resume event.",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const F=Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{pet_name:k.petName,pet_element:k.petElement,pet_type:k.petType,pet_level:k.petLevel,pet_rarity:k.petRarity,pet_rank:k.petRank,prev_pet_copies:k.previousPetCopies,capture_source:k.captureSource}),B),this.getCommonEventDataProperties());Q.Y.track("Pet Captured",F)}sendBattlePetRescueAvailableEvent(k,B=null){var U;if(!(null===(U=this._baseData)||void 0===U?void 0:U.battle_id))return void G.VyI.log("Error: Pet Rescue Available Event cannot be sent before Battle Start or Resume event.",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const F=Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),k),B),this.getCommonEventDataProperties());Q.Y.track("Pet Rescue Available",F)}sendBattlePetCaptureFailedEvent(k,B=null){var U;if(!(null===(U=this._baseData)||void 0===U?void 0:U.battle_id))return void G.VyI.log("Error: Pet Capture Failed Event cannot be sent before Battle Start or Resume event.",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const F=Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{pet_name:k.petName,pet_element:k.petElement,pet_type:k.petType,pet_level:k.petLevel,pet_rarity:k.petRarity,fail_reason:k.failReason,prev_pet_copies:k.previousPetCopies,funnel_id:"Member Locked"===k.failReason?this._segment.purchase.getFunnelID():null,capture_source:k.captureSource}),B),this.getCommonEventDataProperties());Q.Y.track("Pet Capture Failed",F)}sendBattleActionPerformedEvent(k){var B;if(!(null===(B=this._baseData)||void 0===B?void 0:B.battle_id))return void G.VyI.log("Error: Battle Action Performed event cannot be sent before Battle Start or Resume event",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const U=Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{round:this._numberOfRounds,turn:this._turn}),k),this.getCommonEventDataProperties());Q.Y.track("Battle Action Performed",U)}sendBattleMpRecoveryAttemptedEvent(k){var B;if(!(null===(B=this._baseData)||void 0===B?void 0:B.battle_id))return void G.VyI.log("Error: Battle MP Recovery Attempted event cannot be sent before Battle Start or Resume event",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const U=Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{round:this._numberOfRounds,turn:this._turn,question_uuid:this._recentQuestionUuid}),k),this.getCommonEventDataProperties());Q.Y.track("Battle MP Recovery Attempted",U)}sendBattleInterfaceClickedEvent(k,B=null){var U;if(!(null===(U=this._baseData)||void 0===U?void 0:U.battle_id))return void G.VyI.log("Error: Battle Interface Clicked event cannot be sent before Battle Start or Resume event",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const F=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this._baseData),{round:this._numberOfRounds,turn:this._turn,clicks:++this._numberOfClicks}),k),B),this.getCommonEventDataProperties());Q.Y.track("Battle Interface Clicked",F)}sendBattleFunnelAdvancedEvent(k,B=null){if(this.shouldSuppressBattleEvents())return;const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Q.Y.track("Funnel Advanced",U)}sendEndGameFunnelAdvancedEvent(k,B,U){if(this.shouldSuppressBattleEvents())return;const F=H.q.instance.prodigy.breadcrumbManager;U&&F.isBreadcrumbComplete($.B.FEATURE_ENDGAME_QUEST,U)||(U&&F.completeBreadcrumb($.B.FEATURE_ENDGAME_QUEST,U),this.sendBattleFunnelAdvancedEvent({funnel_name:K.F.EndGame,funnel_type:K.M.Chapter,step_index:k,step_name:B}))}sendSpellStatusEffectAppliedEvent(k){var B;if(!(null===(B=this._baseData)||void 0===B?void 0:B.battle_id))return void G.VyI.log("Error: Spell Status Effect Applied event cannot be sent before Battle Start or Resume event",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const U=Object.assign(Object.assign(Object.assign({},k),this._baseData),this.getCommonEventDataProperties());Q.Y.track("Spell Status Effect Applied",U)}sendSpellStatusEffectTriggeredEvent(k){var B;if(!(null===(B=this._baseData)||void 0===B?void 0:B.battle_id))return void G.VyI.log("Error: Spell Status Effect Triggered event cannot be sent before Battle Start or Resume event",G.$bb.Error);if(this.shouldSuppressBattleEvents())return;const U=Object.assign(Object.assign(Object.assign({},k),this._baseData),this.getCommonEventDataProperties());Q.Y.track("Spell Status Effect Triggered",U)}getSegmentBattleType(k){switch(k){case j.gu.Tutorial1:case j.gu.Tutorial2:case j.gu.Tutorial3:case j.gu.Titan:return q.ju.Titan;case j.gu.EndgamePippet:case j.gu.EndGameGuardianFirefly:case j.gu.EndGameGuardianShiverchill:case j.gu.EndGameGuardianBonfire:case j.gu.EndGameGuardianShipwreck:case j.gu.EndGameGuardianSkywatch:return q.ju.EndGame;case j.gu.EndGamePuppetMaster:return q.ju.PuppetMaster;case j.gu.MatchmakingDuel:case j.gu.MatchmakingBotDuel:return j.gu.Duel}return k}getBattleVariant(k,B){var U,F;let G=q.VB.Standard;switch(k){case j.gu.Basic:case j.gu.FestivalDailyBoss:null===(U=B.units)||void 0===U||U.forEach((k=>{37===k.creature.id?G=q.VB.Pippet:k.type===j.uj.Wizard?G=q.VB.CloakedWizard:k.type===j.uj.Boss&&(G=q.VB.Boss)}));break;case j.gu.Ultimates:G=this.getUltimatesBattleVariant(B.questData);break;case j.gu.Tutorial1:G=q.VB.Tutorial1;break;case j.gu.Tutorial2:G=q.VB.Tutorial2;break;case j.gu.Tutorial3:G=q.VB.Tutorial3;break;case j.gu.Titan:G=q.VB.Titan;break;case j.gu.MatchmakingDuel:G=q.VB.DuelsStadium;break;case j.gu.MatchmakingBotDuel:G=q.VB.DuelsStadiumBot;break;case j.gu.EndgamePippet:case j.gu.EndGameGuardianFirefly:case j.gu.EndGameGuardianShiverchill:case j.gu.EndGameGuardianBonfire:case j.gu.EndGameGuardianShipwreck:case j.gu.EndGameGuardianSkywatch:case j.gu.EndGamePuppetMaster:case j.gu.PumpkinfestBoss:G=q.VB.Boss;break;case j.gu.NormalRiftRun:G=q.VB.RiftRun;break;case j.gu.BossRiftRun:G=q.VB.DragonRift}switch(B.instanceType){case z.N.CrystalCaverns:(null===(F=B.units)||void 0===F?void 0:F.some((k=>k.type===j.uj.Wizard)))&&(G=q.VB.Boss)}return G}getUltimatesBattleVariant(k){switch(H.q.instance.prodigy.gameContainer.get("e20-0fb0").player.ultimateTaskId>0?k.getTamingLevel()+1:1){case 1:return q.VB.Stage1;case 2:return q.VB.Stage2;case 3:return q.VB.Stage3}}getBattleCharacterType(k,B,U){let F;return F=k?q.Xn.Wizard:this._baseData.battle_type===j.gu.Ultimates?q.Xn.Mythic:U?W.P8.getPetEvolutionType(B):q.Xn.Uncapturable,F}updateQuestionData(k,B){this._recentQuestionUuid=B,this._questionData.questions_asked++,k&&this._questionData.questions_answered_correctly++}setRoundNumber(k){this._numberOfRounds=k}setTurn(k){this._turn=k}getCurrentBattleID(){var k;return null===(k=this._baseData)||void 0===k?void 0:k.battle_id}getUnitRarity(k,B){let U=k?-1:null!=B?B:-1;return this._baseData.battle_variant===q.VB.DuelsStadiumBot&&(U=this._segment.duelsStadium.botDifficulty),U}getUnitName(k,B){return k?J.PLAYER_SEGMENT_ID:G.Aq$.isDefined(B.unitNameForSegment)?B.unitNameForSegment:B.name}getUnitPosition(k,B){return k?k.creature.isOpponent?B.rightTeam.rawUnits.findIndex((B=>B.battleId===k.battleId)):B.leftTeam.rawUnits.findIndex((B=>B.battleId===k.battleId)):-1}getHitInformation(k){return k.map((k=>{const B={damage:k.damage};return Object.keys(X).forEach((U=>{const F=X[U];k.damageInformation&F&&(B[U]=!0)})),B}))}shouldSuppressBattleEvents(){var k;return Z.has(null===(k=this._baseData)||void 0===k?void 0:k.battle_type)}}J.PLAYER_SEGMENT_ID="Player"},10670:(k,B,U)=>{"use strict";var F,G,j,$,H,V,W,q,K;U.d(B,{B1:()=>H,VB:()=>G,Xn:()=>j,jT:()=>K,ju:()=>F,rW:()=>$,z2:()=>q,zA:()=>W}),function(k){k.Tutorial="tutorial",k.Titan="titan",k.EndGame="EndGameBossBattle",k.PuppetMaster="EndGamePuppetMasterBattle"}(F||(F={})),function(k){k.Standard="Standard",k.CloakedWizard="Cloaked Wizard",k.Pippet="Pippet",k.Boss="Boss",k.Stage1="Stage1",k.Stage2="Stage2",k.Stage3="Stage3",k.Tutorial1="Tutorial1",k.Tutorial2="Tutorial2",k.Tutorial3="Tutorial3",k.Titan="Titan",k.DarkTower="Dark Tower",k.DuelsStadium="Duels Stadium",k.DuelsStadiumBot="Duels Stadium (Bot)",k.RiftRun="Rift Run",k.DragonRift="Dragon Rift"}(G||(G={})),function(k){k.Wizard="wizard",k.Mythic="mythic",k.Uncapturable="uncapturable"}(j||(j={})),function(k){k.Unconscious="Unconscious",k.Conscious="Conscious",k.Fled="Fled"}($||($={})),function(k){k.Player="Player",k.Opponent="Opponent"}(H||(H={})),function(k){k.Field="Field",k.Reserve="Reserve"}(V||(V={})),function(k){k.Action="action",k.Spell="spell",k.Self="self",k.Ally="ally",k.Enemy="enemy"}(W||(W={})),function(k){k.InBattle="in-battle",k.PostBattle="post-battle",k.PostBattleAuto="post-battle-auto-rescued"}(q||(q={})),function(k){k.AllGemsCollected="All Gems Collected",k.AllGemsPreviouslyCollected="All Gems Previously Collected",k.AllGemsFirstAcademyVisit="All Gems First Academy Visit",k.PippetFirstTimeBattleStart="Pippet 1st Time Battle Start",k.PippetBattleWon="Pippet Battle Won",k.IllusionBoss1FirstTimeBattleStart="Illusion Boss 1 1st Time Battle Start",k.IllusionBoss1BattleWon="Illusion Boss 1 Battle Won",k.IllusionBoss2FirstTimeBattleStart="Illusion Boss 2 1st Time Battle Start",k.IllusionBoss2BattleWon="Illusion Boss 2 Battle Won",k.IllusionBoss3FirstTimeBattleStart="Illusion Boss 3 1st Time Battle Start",k.IllusionBoss3BattleWon="Illusion Boss 3 Battle Won",k.IllusionBoss4FirstTimeBattleStart="Illusion Boss 4 1st Time Battle Start",k.IllusionBoss4BattleWon="Illusion Boss 4 Battle Won",k.IllusionBoss5FirstTimeBattleStart="Illusion Boss 5 1st Time Battle Start",k.IllusionBoss5BattleWon="Illusion Boss 5 Battle Won",k.PuppetMasterFirstTimeBattleStart="Puppet Master 1st Time Battle Start",k.PuppetMasterBattleWon="Puppet Master Battle Won",k.PostPuppetMasterVisualsShown="Post Puppet Master Visuals Shown",k.PostPuppetMasterPedestalClicked="Post Puppet Master Pedestal Clicked"}(K||(K={}))},63693:(k,B,U)=>{"use strict";var F,G,j,$;U.d(B,{B1:()=>j,Io:()=>F,Zj:()=>$,rW:()=>G}),function(k){k.Front="front",k.Top="top",k.bottom="bottom"}(F||(F={})),function(k){k.Unconscious="unconscious",k.Conscious="conscious",k.Fled="fled"}(G||(G={})),function(k){k.Player="Player",k.Opponent="Opponent"}(j||(j={})),function(k){k.Base="base pet",k.Evolution1="evolution1",k.Evolution2="evolution2",k.Evolution3="evolution3",k.Mythic="Mythic"}($||($={}))},16887:(k,B,U)=>{"use strict";var F,G;U.d(B,{f:()=>G,g:()=>F}),function(k){k[k.StepOne=1]="StepOne",k[k.StepTwo=2]="StepTwo",k[k.StepThree=3]="StepThree"}(F||(F={})),function(k){k.PermissionNeeded="Permission Needed",k.WaitingOnPermission="Waiting on Permission",k.PermissionGranted="Permission Granted"}(G||(G={}))},35569:(k,B,U)=>{"use strict";var F;U.d(B,{D:()=>F}),function(k){k.ElementGem="{0}_gem",k.AcademyTeleport="academy_teleport",k.PedestalRoom="pedestal_room",k.AcademyTowerLobby="academy_tower_lobby",k.TowerCommonRoom="tower_common_room",k.TowerComplete="tower_complete",k.FirstKeystonePlaced="{0}_first_gem"}(F||(F={}))},13093:(k,B,U)=>{"use strict";var F,G;U.d(B,{T:()=>G,l:()=>F}),function(k){k.FirstEligible="arcadia_first_eligible",k.WorldMapSeen="arcadia_world_map_seen",k.FirstTap="arcadia_first_tap",k.FirstExit="arcadia_first_exit"}(F||(F={})),function(k){k[k.FirstEligible=0]="FirstEligible",k[k.WorldMapSeen=1]="WorldMapSeen",k[k.FirstTap=2]="FirstTap",k[k.FirstExit=3]="FirstExit"}(G||(G={}))},96073:(k,B,U)=>{"use strict";var F,G;U.d(B,{j:()=>F,t:()=>G}),function(k){k.FirstLogin="costumes_first_login",k.MenuOpen="costumes_menu_open",k.TutorialVideoStarted="costumes_tutorial_video_started",k.TutorialVideoFinished="costumes_tutorial_video_finished",k.CostumePreview="costume_preview",k.CostumeEquipped="costume_equipped"}(F||(F={})),function(k){k[k.FirstLogin=0]="FirstLogin",k[k.MenuOpen=1]="MenuOpen",k[k.TutorialVideoStarted=2]="TutorialVideoStarted",k[k.TutorialVideoFinished=3]="TutorialVideoFinished",k[k.CostumePreview=4]="CostumePreview",k[k.CostumeEquipped=5]="CostumeEquipped"}(G||(G={}))},65050:(k,B,U)=>{"use strict";var F;U.d(B,{N:()=>F}),function(k){k.Academy="academy",k.Archives="archives",k.BattlePass="treasure_track",k.BattleRestriction="battle_restriction",k.CrystalCaverns="crystal-caverns",k.DuelsStadium="Duels Stadium",k.BossRift="boss-rift",k.EndOfBattle="end-of-battle",k.FestivalDaily="festival-daily",k.FestivalDailyBossRouletteSpin="festival-daily-boss-roulette-spin",k.FestivalChestRouletteSpin="festival-chest-roulette-spin",k.FestivalProgressionWindow="festival-progression-window",k.Interface="interface",k.KidsMlpUpgrade="kids_mlp_upgrade",k.KidsMlpUpgradeComplete="kids_mlp_upgrade_complete",k.KidsMlpUpgradeFail="kids_mlp_upgrade_fail",k.LootDash="wizard_dash",k.LootDashQuickQuiz="wizard_dash_assignment",k.MembershipVideo="membership_video",k.OpenWorld="open-world",k.PlayAtHomeVideo="play_at_home_video",k.RiftRun="rift-run",k.ShopVisit="shop-visit",k.StateChallenge="state_challenge",k.TowerRun="tower-run",k.UI="ui",k.UniversalTeamSelection="universal_team_selection",k.WizardDash="WizardDash",k.WhiteGloveOffer="white_glove_offer",k.ElderWhiteGloveOffer="elder_player_white_glove_offer"}(F||(F={}))},96810:(k,B,U)=>{"use strict";var F,G;U.d(B,{h:()=>G,l:()=>F}),function(k){k.SignIn="Sign In",k.EnterClassCode="Enter Class Code",k.EnterCountry="Enter Country",k.EnterSubCountry="Enter Sub-Country",k.EnterGrade="Enter Grade",k.FirstLogin="First Login",k.LoadGame="Load Game",k.CreateCharacter="Create Character",k.CustomizeCharacter="Customize Character",k.SelectLocation="Select Location",k.CompleteSignup="Complete Signup",k.TutorialStart="Tutorial Start",k.FrontYardDialogue1="Front Yard Dialogue 1",k.AcademyDialogue1="Academy Dialogue 1",k.FirstTutorialBattleStarted="First Tutorial Battle Started",k.FirstQuestionAnswered="First Question Answered",k.FirstTutorialBattleWon="First Tutorial Battle Won",k.ReachedLevel2="Reached Level 2",k.PalletPassDialogue1="Pallet Pass Dialogue 1",k.InspectPet="Inspect Pet",k.PalletPassDialogue2="Pallet Pass Dialogue 2",k.PetCaptured1="Pet Captured 1",k.AcademyDialogue2="Academy Dialogue 2",k.MinionBattleStarted="Minion Battle Started",k.PetCaptured2="Pet Captured 2",k.MinionBattleWon="Minion Battle Won",k.ReachedLevel3="Reached Level 3",k.EscapedDialogue1="Escaped Dialogue 1",k.SelectName="Select Name",k.SelectNickname="Select Nickname",k.TutorialComplete="Tutorial Complete",k.FirstPostTutorialBattleStarted="First Post-Tutorial Battle Started",k.ReachedLevel4="Reached Level 4",k.FirstPostTutorialBattleWon="First Post-Tutorial Battle Won",k.ReachedLevel5="Reached Level 5",k.PostBattleFlowChestDisplay="post_battle_chest",k.PostBattleFlowRewardsDisplay="post_battle_rewards",k.PostBattleFlowStarJar="post_battle_star_jar",k.PlayerGoalsFirstBattleWon="first_battle_won",k.PlayerGoalsFirstRewardReceived="received_first_reward",k.PlayerGoalsSecondBattleWon="second_battle_won",k.PlayerGoalsSecondRewardReceived="received_second_reward",k.PlayerGoalsHomeSession="home_session",k.PlayerGoalsHomeSessionRewardReceived="received_home_reward",k.PlayerGoalsParentAttachStarted="parent_attach_started",k.PlayerGoalsParentAttachCompleted="parent_attach_completed",k.PlayerGoalsParentAttachRewardReceived="received_parent_reward",k.PlayerGoalsTeacherAttachStarted="teacher_attach_started",k.PlayerGoalsTeacherAttachComplete="teacher_attach_completed",k.PlayerGoalsTeacherAttachRewardReceived="received_teacher_attach_reward",k.PlayerGoalsProfileQuizComplete="profile_quiz_completed",k.PlayerGoalsProfileQuizRewardReceived="received_profile_quiz_reward",k.DynamicStoreDefeatedPet="dynamic_store_defeated_pet",k.DynamicStoreLostPetsMain="dynamic_store_lost_pets_main",k.DynamicStoreLostPetPurchased="dynamic_store_lost_pet_purchased",k.DynamicStoreLostPetsTab="dynamic_store_lost_pets_tab",k.DynamicStoreLostPetViewed="dynamic_store_lost_pet_viewed",k.PetGearStart="Pet Gear Tutorial Started",k.PetGearTeamMenu="Your Team screen of the PetBook is opened",k.PetGearPetMenu="Your Pet screen of the PetBook is opened",k.PetGearGearMenu="Pet Gear Equip Menu Opened",k.PetGearGearEquipped="Pet Gear Item Equipped",k.PetGearGearUsedInBattle="Pet Gear Item used in battle",k.PetGearTutorialComplete="Pet Gear Tutorial Complete",k.PetHardCurrencyImpression="Pet Hard Currency Impression",k.PetHardCurrencyIntention="Pet Hard Currency Intention",k.PetHardCurrencyTransactionComplete="Pet Hard Currency Transaction Complete",k.DailyLoginCalendarAssigned="daily_login_calendar_assigned",k.DailyLoginCalendarViewed="daily_login_calendar_viewed",k.DailyLoginCalendarFirstReward="daily_login_calendar_first_reward_received",k.DailyLoginCalendarNthReward="daily_login_calendar_N_reward_received",k.DailyLoginCalendarLoopingReward="daily_login_calendar_looping_reward_received",k.DailyLoginCalendarComplete="daily_login_calendar_calendar_complete",k.SegmentedOffersAssigned="segmented_offer_assigned",k.SegmentedOffersViewed="segmented_offer_viewed",k.SegmentedOffersClicked="segmented_offer_clicked",k.SegmentedOffersGotMembership="segmented_offer_got_membership",k.SegmentedOffersGotExpired="segmented_offer_expired",k.CampaignReplayFtueChargedLevelsRemoved="charged levels full removal",k.CampaignReplayFtuePuppetMasterCutSceneStart="Puppet Master cut scene start",k.CampaignReplayFtuePuppetMasterCutSceneEnd="Puppet Master cut scene end",k.CampaignReplayFtueMapScreenOpened="Map screen opened",k.CampaignReplayFtueModal="Campaign replay modal",k.CampaignReplayFtueRestrictions="Campaign replay restrictions",k.CampaignReplayFtueQualifyForHardMode="Qualify for Hard Mode",k.CampaignReplayFtueEnterHardMode="Entered Hard Mode"}(F||(F={})),function(k){k.AfterSchoolWidgetHUDButtonHighlighted="HUD button highlighted",k.AfterSchoolWidgetHUDButtonClicked="HUD button clicked",k.AfterSchoolWidgetNootExplainsDailyGift='Noot explains "daily gift" feature',k.AfterSchoolWidgetPlayerAdvancesToRewardScreen="Player advances to reward screen",k.AfterSchoolWidgetPlayerCollectsSchoolReward="Player collects School Reward",k.AfterSchoolWidgetNootExplainsHowToGetMagicoin="Noot explains how to get Magicoin",k.AfterSchoolWidgetPlayerReturnsToRewardScreen="Player returns to reward screen",k.AfterSchoolWidgetPlayerClicksCollectAtHomeButton='Player clicks the "Collect at Home" button',k.AfterSchoolWidgetNootOopsDialog='Noot "Oops" dialog',k.AfterSchoolWidgetCollectMagicoinTooltipShown="Collect Magicoin tool-tip shown",k.AfterSchoolWidgetNootRemindsPlayersToReturnAfterSchool="Noot reminds players to come back after school",k.AfterSchoolWidgetPlayerCollectsHomeReward="Player collects Home Reward",k.AfterSchoolWidgetNootRemindsPlayersToReturnDaily="Noot reminds players to come back every day",k.AfterSchoolWidgetCollectMagicoinTooltipShownAtHome="Collect Magicoin tool-tip shown",k.AfterSchoolWidgetTutorialComplete="Tutorial Complete"}(G||(G={}))},17642:(k,B,U)=>{"use strict";var F;U.d(B,{V:()=>F}),function(k){k.Start="ftue_start",k.OpenMythicDetailView="open_mythic_detail_view"}(F||(F={}))},23283:(k,B,U)=>{"use strict";var F;U.d(B,{U:()=>F}),function(k){k.WheelOfWonder="Wheel of Wonder",k.TwilightWheel="Twilight Wheel",k.LuckyLoot="Lucky Loot",k.PrizeWheel="Prize Wheel"}(F||(F={}))},41674:(k,B,U)=>{"use strict";var F,G,j,$,H,V,W,q,K,z;U.d(B,{$N:()=>G,Lv:()=>j,No:()=>W,Wm:()=>F,ZF:()=>$,jR:()=>K,k:()=>z,oi:()=>q,ss:()=>H,yO:()=>V}),function(k){k.ClickableSprite="clickable_image",k.Menu="menu",k.Popup="pop_up",k.DialogBox="dialog_box",k.PetBook="pet_book",k.PetDetailsView="pet_details_view",k.InfoPanel="info_panel",k.HUD="hud",k.Screen="screen",k.ScreenBanner="screen_banner",k.Modal="modal",k.Settings="settings",k.Shop="shop",k.Window="window",k.BattlePass="treasure_track_main",k.VideoPlayer="video_player",k.Overworld="overworld"}(F||(F={})),function(k){k.None="none",k.Mail="mail",k.HudClick="hud_click",k.AutoSurfaced="auto_surfaced",k.Npc="npc",k.NpcClick="npc_click",k.Door="door",k.ButtonClick="button_click",k.ButtonClickBadged="button_click_badged",k.TabClick="tab_click",k.QuestComplete="quest_complete",k.MouseHover="mouse_hover",k.SignpostClick="signpost_click",k.WorldObject="world_object_click",k.Battle="battle",k.BattleCompleted="battle_completed",k.Toaster="toast_notification",k.MembershipUpgrade="membership_upgrade",k.MembershipPurchase="membership_purchase",k.PrizeWheel="prize_wheel",k.RestrictedBattle="restricted_battle",k.ElderPlayerTopUp="elder_player_top_up",k.BattleRestrictionsMet="battle_restrictions_met",k.FestivalBossBattleRematch="festival_boss_battle_rematch",k.WizardWatch="wizard_watch",k.PostBattle="post-battle",k.Cutscene="cutscene",k.WizardBank="wizard_bank",k.WizardCostumes="wizard_costumes",k.HudWidget="hud_widget"}(G||(G={})),function(k){k.None="",k.CloseButton="close_button",k.CloseClicked="close-clicked",k.ButtonClick="button_click",k.CloseDialog="close_dialog",k.Done="done",k.KeystonePlaced="keystone_placed",k.TeleportButton="x_teleport",k.X="x_button",k.EvolveNow="evolve_now",k.EvolveLater="evolve_later",k.TeacherAttach="player_goals_teacher_attach",k.LoginCredentials="player_goals_hide_credentials",k.Toggle="toggle"}(j||(j={})),function(k){k.Interactable="interactable",k.Snowpile="crystal-caverns-snowpile",k.Crate="crystal-caverns-crate",k.WorldChest="world-chest",k.WorldMemberChest="world-member-chest",k.BattleChest="battle-chest",k.BattleMemberChest="battle-member-chest",k.MonthlyMemberBox="monthly-member-box"}($||($={})),function(k){k.FtueGoals="ftue_goals",k.BattlePass="Treasure Track",k.Festivals="Festivals",k.FestivalsHidden="hidden-festival-data"}(H||(H={})),function(k){k.Ftue="ftue"}(V||(V={})),function(k){k.Purchased="add_pet_slots_header",k.MemberGiftAwarded="membership",k.AwardedFreeWithPet="awarded_pet",k.TreasureTrack="treasure_track",k.PetRoster="pet_roster"}(W||(W={})),function(k){k.Partial="partial",k.Full="full"}(q||(q={})),function(k){k.Manual="manual",k.Automatic="automatic"}(K||(K={})),function(k){k.PetBook="pet_book",k.PostBattleWin="post_battle_win",k.PostBattleLose="post_battle_lose",k.Other="other"}(z||(z={}))},25089:(k,B,U)=>{"use strict";U.d(B,{v:()=>$});var F=U(35120),G=U(29738),j=U(30226);class ${constructor(k,B,U){this._segment=k,this._activePlayer=U,this._uuidProvider=B,this._subjectProvider=F.q.instance.prodigy.gameContainer.get("f1d-f7b1"),this.setup()}setup(){}getCommonEventDataProperties(){var k;const B=F.q.instance.prodigy.world,U=B.getCurrentZone();return{session_uuid:this._uuidProvider.getUUID(),level:this._activePlayer.getLevel(),zone:U,map:B.getCurrentMapTag(),charged_level:this._activePlayer.getChargedLevel(),subject:this._subjectProvider.getSubject().toUpperCase(),difficulty_tier:null===(k=B.getZone(U))||void 0===k?void 0:k.difficultyMode,is_school_hours:j.J.isDateWithinSchoolDayAndHours(),game_locale:G.O.localeCode}}}},99134:(k,B,U)=>{"use strict";U.d(B,{e:()=>Q,v:()=>F});var F,G=U(24522),j=U(35120),$=U(38156),H=U(53037),V=U(21097),W=U(44094),q=U(41674),K=U(25089),z=U(67665);!function(k){k.FestivalStage1="festival_complete_first_stage",k.FestivalStage2="festival_complete_second_stage",k.FestivalStage3="festival_complete_third_stage",k.FestivalStage4="festival_complete_fourth_stage",k.FestivalStage5="festival_complete_fifth_stage",k.FestivalStage6="festival_complete_sixth_stage",k.FestivalStage7="festival_complete_seventh_stage"}(F||(F={}));const Y="unknown";class Q extends K.v{constructor(){super(...arguments),this._currentFestivalTransactionID=new Map}getCurrentFestivalTransactionID(k){var B;return null!==(B=this._currentFestivalTransactionID.get(k))&&void 0!==B?B:W.$.generateUID()}getCurrentFestivalSpinID(){var k;return null!==(k=this._currentFestivalSpinID)&&void 0!==k?k:W.$.generateUID()}getFestivalInstanceName(){return j.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.getFestivalInstanceName()}sendQuestGoalCompleteEvent(k){var B,U,F,G,j,$,V,K,X,Z,J,tt,et,it,st;const nt=W.$.generateUID();this._currentFestivalTransactionID.set(`${k.questID}-${k.taskID}-${H.q.FESTIVAL_CLAIM_STRING}`,nt);const at=0!==k.getTimeUntilUnlock()||0!==k.getTimeUntilExpiry();let rt=null!==(U=null===(B=k.taskDefinition.metadata)||void 0===B?void 0:B.goalSystemOverride)&&void 0!==U?U:q.ss.Festivals,ot=`${k.questID}-${null!==(G=null===(F=k.taskDefinition.metadata)||void 0===F?void 0:F.questGoalType)&&void 0!==G?G:Y}-${k.taskID}${null!==(j=Q.getQuestDatePrecondition(k.taskDefinition))&&void 0!==j?j:""}`,ht=Q.getQuestDescriptionFromDefinition(k.taskDefinition);(null===($=k.taskDefinition.metadata)||void 0===$?void 0:$.isHiddenQuest)&&(rt=null!==(K=null===(V=k.taskDefinition.metadata)||void 0===V?void 0:V.goalSystemOverride)&&void 0!==K?K:q.ss.FestivalsHidden,ot=k.taskID,ht=null!==(Z=null===(X=k.taskDefinition.metadata)||void 0===X?void 0:X.questName)&&void 0!==Z?Z:"unknown");const ct=Object.assign({goal_system:rt,goal_season:k.questID,goal_name:ht,goal_id:ot,is_repeatable:null!==(J=k.taskDefinition.repeatable)&&void 0!==J&&J,difficulty_level:null!==(et=null===(tt=k.taskDefinition.metadata)||void 0===tt?void 0:tt.difficultyLevel)&&void 0!==et?et:"unknown",is_member_locked:null!==(st=null===(it=k.taskDefinition.metadata)||void 0===it?void 0:it.isMemberLocked)&&void 0!==st&&st,is_time_locked:at,is_goal_locked:!!k.getPrerequisites(),transaction_id:nt},this.getCommonEventDataProperties());z.Y.track("Goal Achieved",ct)}sendQuestGoalUpdatedEvent(k,B,U){var F,G,j,$,H,V;const W=Object.assign({goal_system:null!==(G=null===(F=k.taskDefinition.metadata)||void 0===F?void 0:F.goalSystemOverride)&&void 0!==G?G:q.ss.Festivals,goal_season:k.questID,goal_name:Q.getQuestDescriptionFromDefinition(k.taskDefinition),goal_id:`${k.questID}-${null!==($=null===(j=k.taskDefinition.metadata)||void 0===j?void 0:j.questGoalType)&&void 0!==$?$:Y}-${k.taskID}${null!==(H=Q.getQuestDatePrecondition(k.taskDefinition))&&void 0!==H?H:""}`,deadline:U,target_type:k.type,goal_progress:B,goal_current_progress:null===(V=k.taskProgress.data)||void 0===V?void 0:V.progress,goal_target:k.taskDefinition.completionRequirements.data.target},this.getCommonEventDataProperties());z.Y.track("Goal Progress Updated",W)}sendFestivalPrizeWheelSpunEvent(k,B,U,F,G){const j=W.$.generateUID(),$=W.$.generateUID();this._currentFestivalSpinID=$,this._currentFestivalTransactionID.set(`${F}-${B}`,j),this._currentFestivalTransactionID.set($,j);const H=Object.assign({wheel_type:k,wheel_id:B,instance_id:U,instance_type:F,is_respin:G,spin_id:$,transaction_id:j},this.getCommonEventDataProperties());z.Y.track("Festival Prize Wheel Spun",H)}sendFestivalPrizeWheelSpinFailedEvent(k,B,U,F,G){const j=Object.assign({wheel_type:k,wheel_id:B,fail_reason:U,funnel_id:U===V.WE.MemberLocked?this._segment.purchase.getFunnelID():null,instance_id:F,instance_type:G,spin_id:W.$.generateUID(),transaction_id:W.$.generateUID()},this.getCommonEventDataProperties());z.Y.track("Festival Prize Wheel Spin Failed",j)}static getQuestDescriptionFromDefinition(k){var B;return $.n.getQuestDescription(k.completionRequirements.type,null!==(B=k.completionRequirements.data.target)&&void 0!==B?B:0,k.localizationKey)}static getQuestDatePrecondition(k){var B;if(!k.preconditions)return;let U;return null===(B=k.preconditions)||void 0===B||B.forEach((k=>{k.type!==G.n.DATE_AFTER&&k.type!==G.n.DATE_BEFORE||(U=`-[${k.data.date.split("T")[0]}]`)})),U}sendFestivalFunnelAdvancedEvent(k,B){const U=Object.values(F).indexOf(k)+1,G=Object.assign(Object.assign({funnel_name:"Festival Progress",funnel_type:"festival",funnel_id:j.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.getFestivalInstanceName(),step_name:k,step_index:U},B),this.getCommonEventDataProperties());z.Y.track("Funnel Advanced",G)}}},24047:(k,B,U)=>{"use strict";var F,G;U.d(B,{F:()=>F,M:()=>G}),function(k){k.EndGame="end_game",k.ArcadiaLink="arcadia_link",k.Costumes="costumes",k.MagicoinBattleRewardsIntro="battle_magicoin_intro"}(F||(F={})),function(k){k.Chapter="chapter"}(G||(G={}))},87337:(k,B,U)=>{"use strict";var F,G,j,$,H,V;U.d(B,{J$:()=>G,NM:()=>F,ac:()=>$,iQ:()=>j,kN:()=>V,u_:()=>H}),function(k){k.Interactable="interactable-cooldown",k.SpawnPoint="spawn-point-cooldown"}(F||(F={})),function(k){k.Battle="battle"}(G||(G={})),function(k){k.Walk="Walk",k.FastTravel="Fast-Travel",k.Teleported="Teleported",k.FeaturedSpawnFastTravel="featured-spawn-Fast-Travel"}(j||(j={})),function(k){k.Merchant="Merchant",k.QuestGiver="Quest-Giver",k.Warden="Warden",k.Boss="Boss",k.Pet="pet",k.CareGiver="Care-Giver",k.WheelGiver="Wheel-Giver",k.Nicknamer="Nicknamer",k.Guard="Guard",k.Bouncer="Bouncer"}($||($={})),function(k){k.TitanCatapult="Titan Catapult",k.MinecartBridge="Minecart Bridge",k.Teleporter="Teleporter",k.Nicknamer="Nicknamer",k.HealStone="HealStone",k.LeverSwitch="LeverSwitch"}(H||(H={})),function(k){k.MemberLocked="MEMBER_LOCKED",k.LevelLocked="LEVEL_LOCKED",k.QuestNotComplete="QUEST_NOT_COMPLETE",k.AnswerWrong="ANSWER_WRONG"}(V||(V={}))},215:(k,B,U)=>{"use strict";U.d(B,{Eu:()=>F,S4:()=>G,nu:()=>Q});var F,G,j=U(62459),$=U(90633),H=U(35120),V=U(77938),W=U(22023),q=U(44094),K=U(41674),z=U(25089),Y=U(67665);!function(k){k.PetMergeYourTeam="pet_merge_your_team",k.PetMergeSelectPet="pet_merge_select_pet",k.PetMergeSelectMerge="pet_merge_select_merge_option",k.PetMergeFinalizeMerge="pet_merge_select_finalize_merge",k.PetMergeConfirm="pet_merge_confirmation_popup",k.PetMergeCompleted="pet_merge_completed",k.PetMergeMagicoin="pet_merge_with_magicoin"}(F||(F={})),function(k){k.TutorialUnlocked="unlock_pet_merge",k.TutorialViewed="pet_merge_tutorial_viewed",k.TutorialTriggered="pet_merge_tutorial_triggered",k.HudSelect="pet_merge_tutorial_pet_palm",k.SelectPet="pet_merge_tutorial_pick_a_pet",k.YourPetMergeButton="pet_merge_tutorial_select_merge_option",k.SelectMergeNow="pet_merge_tutorial_select_merge_now",k.TutorialComplete="pet_merge_tutorial_complete"}(G||(G={}));class Q extends z.v{constructor(){super(...arguments),this._tutorialStepIndexCache=[],this.mergeSource=K.k.Other}get petMergeId(){return this._petMergeId}get petMergeTransactionId(){return this._petMergeTransactionId}sendPetMergedEvent(k,B){var U;const F=null===(U=V.t.getItem("pet",k.ID))||void 0===U?void 0:U.data,G=W.P8.getPetDisplayMergeRank(k.ID,k.uniqueID);F?Y.Y.track("Pet Merged",Object.assign({ingredient_name:F.name,ingredient_id:k.ID,ingredient_type:F.type,ingredient_element:F.affinity,ingredient_level:k.level,previous_pet_rank:null!=B?B:G,merged_pet_rank:j.Aq$.isDefined(B)?G:void 0,is_target_pet:j.Aq$.isDefined(B),ingredient_bypass:0,merge_id:this._petMergeId,transaction_id:this._petMergeTransactionId,merge_source:this.mergeSource},this.getCommonEventDataProperties())):j.VyI.log(`Pet item data not found for pet ID ${k.ID}`,j.$bb.Warning)}sendPetsMergedEvents(k){if(k.ingredients){this._petMergeId=q.$.generateUID(),this._petMergeTransactionId=q.$.generateUID(),this.sendPetMergedEvent(k.basePetData,k.previousRank);for(const B of k.ingredients)this.sendPetMergedEvent(B);this.mergeSource=K.k.Other}}sendPetMergedUpsellEvents(k){var B;this._petMergeId=q.$.generateUID(),this._petMergeTransactionId=q.$.generateUID();const U=null===(B=V.t.getItem("pet",k.basePetData.ID))||void 0===B?void 0:B.data;U?(this.sendPetMergedEvent(k.basePetData,k.previousRank),Y.Y.track("Pet Merged",Object.assign({ingredient_name:U.name,ingredient_type:U.type,ingredient_element:U.affinity,ingredient_level:k.basePetData.level,previous_pet_rank:k.previousRank,is_target_pet:!1,ingredient_bypass:k.ingredientBypass,merge_id:this._petMergeId,transaction_id:this._petMergeTransactionId,merge_source:this.mergeSource},this.getCommonEventDataProperties())),this.mergeSource=K.k.Other):j.VyI.log(`Pet item data not found for pet ID ${k.basePetData.ID}`,j.$bb.Warning)}sendPetMergedMagicoinEvents(k){var B;this._petMergeId=q.$.generateUID(),this._petMergeTransactionId=q.$.generateUID();const U=null===(B=V.t.getItem("pet",k.basePetData.ID))||void 0===B?void 0:B.data;if(U){if(this.sendPetMergedEvent(k.basePetData,k.previousRank),Y.Y.track("Pet Merged",Object.assign({ingredient_name:U.name,ingredient_id:k.basePetData.ID,ingredient_type:U.type,ingredient_element:U.affinity,ingredient_level:k.basePetData.level,previous_pet_rank:k.previousRank,is_target_pet:!1,ingredient_bypass:k.ingredientBypass,merge_id:this._petMergeId,transaction_id:this._petMergeTransactionId,merge_source:this.mergeSource},this.getCommonEventDataProperties())),k.ingredients&&k.ingredients.length>0)for(const B of k.ingredients)this.sendPetMergedEvent(B);this.mergeSource=K.k.Other}else j.VyI.log(`Pet item data not found for pet ID ${k.basePetData.ID}`,j.$bb.Warning)}sendPetMergeFunnelAdvancedEvent(k,B){const U=!H.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete($.B.FEATURE_PET_MERGE,$.B.BREADCRUMB_PET_MERGE_FTUE_COMPLETED)&&H.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete($.B.FEATURE_PET_MERGE,$.B.BREADCRUMB_PET_MERGE_FTUE_STARTED);if(!W.P8.canPlayerAccessPetMergeFeature()||U)return;const G=null!=B?B:Object.values(F).indexOf(k)+1;G<1||Y.Y.track("Funnel Advanced",Object.assign({funnel_name:"pet_merge",funnel_type:"feature",step_name:k,step_index:G},this.getCommonEventDataProperties()))}sendPetMergeTutorialFunnelAdvancedEvent(k){const B=Object.values(G).indexOf(k)+1,U=this._tutorialStepIndexCache.includes(B);B<1||U||(this._tutorialStepIndexCache.push(B),Y.Y.track("Funnel Advanced",Object.assign({funnel_name:"pet_merge_tutorial",funnel_type:"tutorial",step_name:k,step_index:B},this.getCommonEventDataProperties())))}sendPetMergeCancelledEvent(k,B,U){var F;const G=null===(F=V.t.getItem("pet",k.ID))||void 0===F?void 0:F.data,$=W.P8.getPetDisplayMergeRank(k.ID,k.uniqueID);G?(Y.Y.track("Pet Merged Cancelled",Object.assign({ingredient_name:G.name,ingredient_id:k.ID,ingredient_type:G.type,ingredient_level:k.level,pet_rank:$,ingredient_required:B,game_phase:U?"tutorial":"game",merge_id:this._petMergeId,transaction_id:this._petMergeTransactionId,merge_source:this.mergeSource},this.getCommonEventDataProperties())),this.mergeSource=K.k.Other):j.VyI.log(`Pet item data not found for pet ID ${k.ID}`,j.$bb.Warning)}}},44356:(k,B,U)=>{"use strict";var F;U.d(B,{H:()=>F}),function(k){k.Dance="Dance",k.Emote="Emote"}(F||(F={}))},19464:(k,B,U)=>{"use strict";var F,G,j,$,H,V;U.d(B,{W5:()=>j,Yj:()=>F,lT:()=>$,s2:()=>H,ss:()=>V}),function(k){k.Exit="exit",k.Restart="Restart",k.Success="Success",k.Fail="Fail",k.Abandon="Abandon"}(F||(F={})),function(k){k.Easy="Easy",k.Hard="Hard",k.None="None"}(G||(G={})),function(k){k.New="New",k.Continue="Continue",k.Restart="Restart",k.Spawn="Spawn"}(j||(j={})),function(k){k.Healstone="Healstone",k.Bridge="Bridge",k.Boss="Boss",k.Complete="Complete"}($||($={})),function(k){k.DarkTower="Dark Tower",k.EarthTower="Earth Tower",k.IceTower="Ice Tower"}(H||(H={})),function(k){k.Normal="Normal",k.Random="Random"}(V||(V={}))},47632:(k,B,U)=>{"use strict";U.d(B,{s:()=>$,w:()=>F});var F,G=U(25089),j=U(67665);!function(k){k.Adults="adults"}(F||(F={}));class $ extends G.v{sendQrCodeViewedEvent(k,B,U=null,F=null){const G=Object.assign(Object.assign(Object.assign({name:k,type:B,parameters:U},this._segment.gameWorld.getCurrentInstanceTypeAndID()),F),this.getCommonEventDataProperties());j.Y.track("QR Code Viewed",G)}}},74958:(k,B,U)=>{"use strict";U.d(B,{Aj:()=>nt,fk:()=>F,zE:()=>st});var F,G=U(8674),j=U(62459),$=U(24652),H=U(42448),V=U(90633),W=U(35120),q=U(68836),K=U(14117),z=U(22023),Y=U(44094),Q=U(13956),X=U(23283),Z=U(46784),J=U(65050),tt=U(41674),et=U(25089),it=U(67665);!function(k){k.RiftsReceiveFirstRiftKey="rifts_receive_first_rift_key",k.RiftsOpenRiftSelectionMenu="rifts_open_rift_selection_menu",k.RiftsStartFirstRiftRun="rifts_start_first_rift_run",k.RiftsCompleteFirstRiftRunRound="rifts_complete_first_rift_run_round",k.RiftsCompleteRiftRunWinOrLose="rifts_complete_rift_run_win_or_lose",k.RiftsCompleteRiftRunWin="rifts_complete_rift_run_win",k.RiftsStartBossRift="rifts_start_boss_rift",k.RiftsCompleteBossRift="rifts_complete_boss_rift"}(F||(F={}));const st={[H.ni.Portal1]:Z.B.RiftsPortal1Menu,[H.ni.Portal2]:Z.B.RiftsPortal2Menu,[H.ni.Portal3]:Z.B.RiftsPortal3Menu};class nt extends et.v{constructor(k,B,U){super(k,B,U),this._riftsInstanceToRewardSpinUuidMap={},this._riftsInstanceToRewardSpinTransactionUuidMap={},this._riftsDataProvider=W.q.instance.prodigy.gameContainer.get("196-d3a5")}get riftInstanceUuid(){return j.Aq$.isDefined(this._riftInstanceUuid)||(this._riftInstanceUuid=Y.$.generateUID()),this._riftInstanceUuid}set riftInstanceUuid(k){this._riftInstanceUuid=k}get riftRunUuid(){var k;return null!==(k=this._riftRunUuid)&&void 0!==k?k:"Failed to retrieve the rift run UUID for the ongoing run"}set riftRunUuid(k){this._riftRunUuid=k}get riftRunRoundUuid(){var k;return null!==(k=this._riftRunRoundUuid)&&void 0!==k?k:"Failed to retrieve the rift run round UUID for the ongoing run"}set riftRunRoundUuid(k){this._riftRunRoundUuid=k}getRiftsRewardSpinUuid(){if(!this._riftInstanceUuid)return;let k=this._riftsInstanceToRewardSpinUuidMap[this._riftInstanceUuid];return k||(k=Y.$.generateUID(),this._riftsInstanceToRewardSpinUuidMap[this._riftInstanceUuid]=k),k}getRiftsRewardSpinTransactionUuid(){if(!this._riftInstanceUuid)return;let k=this._riftsInstanceToRewardSpinTransactionUuidMap[this._riftInstanceUuid];return k||(k=Y.$.generateUID(),this._riftsInstanceToRewardSpinTransactionUuidMap[this._riftInstanceUuid]=k),k}sendRiftsSelectionMenuOpenedEvent(){var k;const B=this._riftsSyncedDataStore.getRiftsEntityPortalEntryData();it.Y.track("Rift Selection Menu Opened",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(k=this._riftsDataProvider.getRiftsPortalConfig())||void 0===k?void 0:k.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE,max_rift_tier_unlocked:B.metaProgress.maxRiftTier,max_tier_completions:B.metaProgress.riftTierUnlockData.maxTierCompletions,boss_defeats:B.metaProgress.bossDefeats},this.getCommonEventDataProperties()))}generateRiftRunUuids(){this._riftRunUuid=Y.$.generateUID(),this.riftRunRoundUuid=Y.$.generateUID()}sendRiftRunStartedEvent(k,B,U,F){var G;it.Y.track("Rift Run Started",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(G=this._riftsDataProvider.getRiftsPortalConfig())||void 0===G?void 0:G.tierDataGlobalEntityId,rift_run_id:this._riftRunUuid,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE,rift_tier:k,number_of_rounds:H.vP,cost:B,is_magicoin_boosted:U,transaction_id:F},this.getCommonEventDataProperties()))}sendRiftRunOpponentSelectionMenuOpenedEvent(){var k;const B=this._riftsSyncedDataStore.cache.currentRiftRunProgress;B&&B.type===$.cn.Normal?it.Y.track("Rift Run Opponent Selection Menu Opened",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(k=this._riftsDataProvider.getRiftsPortalConfig())||void 0===k?void 0:k.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE,rift_tier:null==B?void 0:B.currentRiftTier,round_id:this.riftRunRoundUuid,round_number:null==B?void 0:B.round,number_of_rounds:H.vP,pets_used_in_previous_rounds:null==B?void 0:B.usedPetUids.map((k=>nt.getPetDataFromUniqueId(k))),buff_modifier:null==B?void 0:B.buffModifier,previous_rounds_nerf_modifiers:null==B?void 0:B.chosenNerfModifiers,next_opponent_team_options:null==B?void 0:B.nextOpponentTeamOptions},this.getCommonEventDataProperties())):j.VyI.log(`RiftsSegment: Not firing sendRiftRunOpponentSelectionMenuOpenedEvent due to missing rift run progress or the rift type not being ${$.cn.Normal}`,j.$bb.Warning)}sendRiftRunRoundStartedEvent(){var k,B;this.cachedCurrentNormalRiftProgress?it.Y.track("Rift Run Round Started",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(k=this._riftsDataProvider.getRiftsPortalConfig())||void 0===k?void 0:k.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE,rift_tier:this.cachedCurrentNormalRiftProgress.currentRiftTier,round_id:this.riftRunRoundUuid,round_number:this.cachedCurrentNormalRiftProgress.round,number_of_rounds:H.vP,pets_used_in_previous_rounds:this.cachedCurrentNormalRiftProgress.usedPetUids.filter((k=>{var B;return!(null===(B=q.T.chosenHomeTeamPetUids)||void 0===B?void 0:B.includes(k))})).map((k=>nt.getPetDataFromUniqueId(k))),buff_modifier:this.cachedCurrentNormalRiftProgress.buffModifier,nerf_modifiers:this.cachedCurrentNormalRiftProgress.chosenNerfModifiers,chosen_opponent_team_option:null===(B=this.cachedCurrentNormalRiftProgress.nextOpponentTeamOptions)||void 0===B?void 0:B[q.T.chosenOpponentTeamIndex]},this.getCommonEventDataProperties())):j.VyI.log("RiftsSegment: Not firing sendRiftRunRoundStartedEvent due to missing cached current rift run progress",j.$bb.Warning)}sendRiftRunRoundCompletedEvent(k){var B,U;this.cachedCurrentNormalRiftProgress?it.Y.track("Rift Run Round Completed",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(B=this._riftsDataProvider.getRiftsPortalConfig())||void 0===B?void 0:B.tierDataGlobalEntityId,rift_run_id:this._riftRunUuid,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE,rift_tier:this.cachedCurrentNormalRiftProgress.currentRiftTier,round_id:this.riftRunRoundUuid,round_number:this.cachedCurrentNormalRiftProgress.round,number_of_rounds:H.vP,pets_used:this.cachedCurrentNormalRiftProgress.usedPetUids.map((k=>nt.getPetDataFromUniqueId(k))),buff_modifier:this.cachedCurrentNormalRiftProgress.buffModifier,nerf_modifiers:this.cachedCurrentNormalRiftProgress.chosenNerfModifiers,chosen_opponent_team_option:null===(U=this.cachedCurrentNormalRiftProgress.nextOpponentTeamOptions)||void 0===U?void 0:U[q.T.chosenOpponentTeamIndex],outcome:k},this.getCommonEventDataProperties())):j.VyI.log("RiftsSegment: Not firing sendRiftRunRoundCompletedEvent due to missing cached current rift run progress",j.$bb.Warning)}sendRiftRunCompletedEvent(){var k;this.cachedCurrentNormalRiftProgress?it.Y.track("Rift Run Completed",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(k=this._riftsDataProvider.getRiftsPortalConfig())||void 0===k?void 0:k.tierDataGlobalEntityId,rift_run_id:this._riftRunUuid,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE,rift_tier:this.cachedCurrentNormalRiftProgress.currentRiftTier,number_of_rounds:H.vP,pets_used:this.cachedCurrentNormalRiftProgress.usedPetUids.map((k=>nt.getPetDataFromUniqueId(k))),buff_modifier:this.cachedCurrentNormalRiftProgress.buffModifier,nerf_modifiers:this.cachedCurrentNormalRiftProgress.chosenNerfModifiers},this.getCommonEventDataProperties())):j.VyI.log("RiftsSegment: Not firing sendRiftRunCompletedEvent due to missing cached current rift run progress",j.$bb.Warning)}sendBossRiftStartedEvent(){var k;const B=this._riftsSyncedDataStore.cache.currentRiftRunProgress;B&&B.type===$.cn.Boss?it.Y.track("Boss Rift Started",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(k=this._riftsDataProvider.getRiftsPortalConfig())||void 0===k?void 0:k.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE,boss_type:B.bossType,rift_tier:B.currentRiftTier},this.getCommonEventDataProperties())):j.VyI.log(`RiftsSegment: Not firing sendBossRiftStartedEvent due to missing rift run progress or the rift type not being ${$.cn.Boss}`,j.$bb.Warning)}sendBossRiftCompletedEvent(k){var B,U;this.cachedCurrentBossRiftProgress?it.Y.track("Boss Rift Completed",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(B=this._riftsDataProvider.getRiftsPortalConfig())||void 0===B?void 0:B.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE,boss_type:this.cachedCurrentBossRiftProgress.bossType,rift_tier:this.cachedCurrentBossRiftProgress.currentRiftTier,pets_used:null===(U=q.T.chosenHomeTeamPetUids)||void 0===U?void 0:U.map((k=>nt.getPetDataFromUniqueId(k))),nerf_modifiers:this.cachedCurrentBossRiftProgress.bossRiftModifiers,outcome:k},this.getCommonEventDataProperties())):j.VyI.log("RiftsSegment: Not firing sendBossRiftCompletedEvent due to missing cached current boss rift progress",j.$bb.Warning)}sendRiftsFunnelAdvancedEvent(k){const B=Object.values(F).indexOf(k)+1;it.Y.track("Funnel Advanced",Object.assign({funnel_id:this._riftsDataProvider.getCurrentRiftsId(),funnel_name:"rifts",funnel_type:"feature",step_name:k,step_index:B},this.getCommonEventDataProperties()))}sendRiftsPrizeWheelSpunEvent(k,B=!1){var U;it.Y.track("Prize Wheel Spun",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(U=this._riftsDataProvider.getRiftsPortalConfig())||void 0===U?void 0:U.tierDataGlobalEntityId,wheel_type:X.U.LuckyLoot,instance_type:k,instance_id:this.riftInstanceUuid,spin_id:this.getRiftsRewardSpinUuid(),transaction_id:this.getRiftsRewardSpinTransactionUuid(),is_respin:B},this.getCommonEventDataProperties()))}sendRiftsPrizeWheelSpinFailedEvent(k,B){var U;it.Y.track("Prize Wheel Spin Failed",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(U=this._riftsDataProvider.getRiftsPortalConfig())||void 0===U?void 0:U.tierDataGlobalEntityId,wheel_type:X.U.LuckyLoot,instance_type:k,instance_id:this.riftInstanceUuid,fail_reason:B},this.getCommonEventDataProperties()))}getRiftTransactionData(){return Object.assign({transaction_id:Y.$.generateUID(),sink_type:nt.RIFT_INSTANCE_TYPE,sink_id:J.N.RiftRun},this._segment.gameWorld.getCurrentInstanceTypeAndID(J.N.Interface))}static sendFunnelAdvancedEventIfBreadcrumbNotComplete(k,B){W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_RIFTS,B)||(W.q.instance.prodigy.gameContainer.get("c47-20b6").rifts.sendRiftsFunnelAdvancedEvent(k),W.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(V.B.FEATURE_RIFTS,B))}static getPetDataFromUniqueId(k){var B,U;return{assetId:null!==(B=z.P8.getAssetIdFromUniqueId(k))&&void 0!==B?B:`Failed to retrieve pet asset ID from unique ID: ${k}`,uniqueId:k,level:null!==(U=z.P8.getLevelFromUniqueId(k))&&void 0!==U?U:`Failed to retrieve pet level from unique ID: ${k}`}}sendOpenPetReuseInterface(){it.Y.track("Interface Opened",Object.assign({interface_name:"rift_pet_cooldown_bypass",interface_type:"menu",origin_type:tt.$N.ButtonClick,instance_type:nt.RIFT_INSTANCE_TYPE,instance_id:this.riftInstanceUuid},this.getCommonEventDataProperties()))}sendPetCooldownStarted(k,B,U){var F;it.Y.track("Cooldown Timer Started",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(F=this._riftsDataProvider.getRiftsPortalConfig())||void 0===F?void 0:F.tierDataGlobalEntityId,cooldown_type:"rifts-pet-cooldown",cooldown_id:B,cooldown_target_type:"pets",cooldown_target_id:k,cooldown_length:U,cooldown_trigger_type:"rift-run",cooldown_trigger_id:this.riftRunUuid,instance_type:nt.RIFT_INSTANCE_TYPE,instance_id:this.riftInstanceUuid},this.getCommonEventDataProperties()))}sendPetCooldownStartedEvents(k){var B,U,F;const G=null===(U=null===(B=W.q.instance.prodigy.gameContainer.get("196-d3a5").getRiftsPortalConfig())||void 0===B?void 0:B.options)||void 0===U?void 0:U.petReuseData,j=Object.keys(k).sort(((B,U)=>k[U].timestamp-k[B].timestamp)),$=null!==(F=null==G?void 0:G.petCooldownMs)&&void 0!==F?F:0;j.slice(0,2).forEach((B=>{var U;this._segment.rifts.sendPetCooldownStarted(B,null!==(U=k[B].cooldownID)&&void 0!==U?U:"",$/1e3)}))}sendCooldownTimeSkipped(k,B,U,F,G,j){var $;it.Y.track("Cooldown Timer Bypassed",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===($=this._riftsDataProvider.getRiftsPortalConfig())||void 0===$?void 0:$.tierDataGlobalEntityId,cooldown_type:"rifts-pet-cooldown",cooldown_id:k,cooldown_target_type:"pets",cooldown_target_id:B,cooldown_length:U,time_remaining:F,currency:"magicoin",price:G,transaction_id:j,cooldown_trigger_type:"rift-run",sink_type:nt.RIFT_INSTANCE_TYPE,sink_id:this.riftRunUuid,instance_type:nt.RIFT_INSTANCE_TYPE,instance_id:this.riftInstanceUuid},this.getCommonEventDataProperties()))}sendCooldownTimerEnded(k,B,U){var F;it.Y.track("Cooldown Timer Ended",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(F=this._riftsDataProvider.getRiftsPortalConfig())||void 0===F?void 0:F.tierDataGlobalEntityId,cooldown_type:"rifts-pet-cooldown",cooldown_id:k,cooldown_target_type:"pets",cooldown_target_id:B,cooldown_length:U,cooldown_trigger_type:"rift-run",cooldown_trigger_id:this.riftRunUuid,instance_type:nt.RIFT_INSTANCE_TYPE,instance_id:this.riftInstanceUuid},this.getCommonEventDataProperties()))}sendRiftRunBonusOffered(k){var B;this._modifierofferId=Y.$.generateUID(),it.Y.track("Rift Run Bonus Offered",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(B=this._riftsDataProvider.getRiftsPortalConfig())||void 0===B?void 0:B.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE,offer_id:this._modifierofferId,modifier:{name:k.caption,description:k.description}},this.getCommonEventDataProperties()))}sendRiftRunBonusRerolled(k,B,U,F,G){var j;const $=this._modifierofferId;this._modifierofferId=G,it.Y.track("Rift Run Bonus Rerolled",Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(j=this._riftsDataProvider.getRiftsPortalConfig())||void 0===j?void 0:j.tierDataGlobalEntityId,modifier:{name:k.caption,description:k.description},offer_id:this._modifierofferId,previous_modifier:{name:B.caption,description:B.description},previous_offer_id:$,currency:"magicoin",price:U,transaction_id:F,instance_type:nt.RIFT_INSTANCE_TYPE,instance_id:this.riftInstanceUuid},this.getCommonEventDataProperties()))}createRiftRunEncounterEventParams(k,B){return(0,G.sH)(this,arguments,void 0,(function*(k,B,U={}){var F,G;const j=Object.assign(Object.assign({rift_id:this._riftsDataProvider.getCurrentRiftsId(),rift_tier_data_entity_id:null===(F=this._riftsDataProvider.getRiftsPortalConfig())||void 0===F?void 0:F.tierDataGlobalEntityId,instance_id:this.riftInstanceUuid,instance_type:nt.RIFT_INSTANCE_TYPE},this.getCommonEventDataProperties()),U);let $=100;const H=W.q.instance.prodigy.gameContainer.get("196-d3a5"),V=null===(G=null==H?void 0:H.riftsTierTotalData)||void 0===G?void 0:G[B],q=null==V?void 0:V.opponentLevelCap;if(q){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getLevel();$=k?Math.min(k,q):q}return j.encounters=k.map(((k,B)=>({position:B+1,enemies:k.petIds.map((k=>({petId:k,level:$}))),modifier:{name:k.nerfModifier.caption,description:k.nerfModifier.description,bonus:k.nerfModifier.goldReward},member_locked:2===B}))),j}))}sendRiftRunEncounterOffered(k,B){this._encounterOfferId=Y.$.generateUID(),this.createRiftRunEncounterEventParams(k,B,{offer_id:this._encounterOfferId}).then((k=>it.Y.track("Rift Run Encounters Offered",k))).catch(j.RQr.createHandler("RiftsSegment: Failed to create rift run encounter event params"))}sendRiftRunEncounterRerolled(k,B,U,F,G){const $=this._encounterOfferId;this._encounterOfferId=G,this.createRiftRunEncounterEventParams(k,B,{offer_id:this._encounterOfferId,previous_offer_id:$,price:U,currency:"magicoin",transaction_id:F}).then((k=>it.Y.track("Rift Run Encounters Rerolled",k))).catch(j.RQr.createHandler("RiftsSegment: Failed to create rift run encounter event params"))}}nt.RIFT_INSTANCE_TYPE="rifts",nt.RIFT_BONUS_REROLL_TYPE="bonus-reroll",nt.RIFT_ENCOUNTER_REROLL_TYPE="encounter-reroll",(0,G.Cg)([(0,Q.b)("9ac-9677"),(0,G.Sn)("design:type",K.M)],nt.prototype,"_riftsSyncedDataStore",void 0)},67665:(k,B,U)=>{"use strict";U.d(B,{r:()=>ke,Y:()=>Be});var F=U(8674),G=U(62459),j=U(88225),$=U(79687),H=U(95891),V=U.n(H),W=U(44751),q=U(88059),K=U(75172),z=U(32389),Y=U(35120),Q=U(34829),X=U(1195),Z=U(65240),J=U(46784),tt=U(65050),et=U(41674),it=U(25089),st=U(95057),nt=U(44094);class at extends it.v{get chestTransactionId(){return this._chestTransactionId}get memberChestTransactionId(){return this._memberChestTransactionId}get currentPbfId(){return this._currentPbfId}get itemTransaction(){return this._itemTransaction}init(){var k;this._currentPbfId=nt.$.generateUID(),null!==(k=this._itemTransaction)&&void 0!==k||(this._itemTransaction=this._segment.item.beginSecureItemTransaction()),this._chestTransactionId=nt.$.generateUID(),this._memberChestTransactionId=nt.$.generateUID(),G.VyI.log(`PBF InstanceId: ${this._currentPbfId}\nBattle Id: ${this.getBattleId()}\nChest Transaction Id: ${this._chestTransactionId}\nMember Chest Transaction Id: ${this._memberChestTransactionId}`,G.$bb.Verbose)}getBattleId(){const k=this._segment.battleRevamp.getCurrentBattleID();return k||this._segment.battle.currentBattleID}getItemReceivedMetadata(){const k=Y.q.instance.prodigy.gameContainer.get("cfe-9c2c");let B=this._chestTransactionId,U=Z.C.BattleChest,F=this.getBattleId(),G=tt.N.UI,j=this._currentPbfId;if(this._activePlayer.isMember()&&(B=this._memberChestTransactionId,F=`${this.getBattleId()}-M`),k.matchController){const k=this._segment.lootDash.getInstanceData();U=Z.C.WizardDashLootBag,G=k.instanceType,j=k.instanceId}return{transaction_id:B,source_type:U,source_id:F,instance_id:j,instance_type:G}}flushSecureRewards(){this._itemTransaction.flush(this.getItemReceivedMetadata()),this._itemTransaction=null}sendPostBattleFlowOpensEvent(){this._timeSincePBFStart=Date.now();const k={event:"Interface Opened",interface_name:J.B.PostBattleFlow,interface_type:et.Wm.Screen,origin_type:et.$N.Battle,origin_id:this.getBattleId(),instance_id:this._currentPbfId,instance_type:tt.N.UI};window.analytics.track("Interface Opened",k)}sendButtonEvent(k,B){this._segment.featureCommon.sendButtonEvent({buttonName:B,interfaceName:k,interfaceType:et.Wm.ScreenBanner},{interface_name:k,instance_type:tt.N.UI,instance_id:this._currentPbfId})}sendPBFClosedEvent(){const k=Date.now()-this._timeSincePBFStart,B={event:"Interface Closed",interface_name:"post_battle",interface_type:"screen",instance_id:this._currentPbfId,instance_type:"ui",duration:k,close_method:"button_click"};window.analytics.track("Interface Closed",B)}sendChestOpenEvent(k){const B=Object.assign({container_type:k?et.ZF.BattleMemberChest:et.ZF.BattleChest,container_id:k?`${this.getBattleId()}-M`:this.getBattleId(),instance_id:this._currentPbfId,instance_type:tt.N.UI,transaction_id:k?this._memberChestTransactionId:this._chestTransactionId},this.getCommonEventDataProperties());window.analytics.track("Container Opened",B)}sendChestFailedToOpenEvent(k,B){k&&this._segment.purchase.sendFunnelStart({type:"Open-Member-Chest-Battle",category:"Reward",contentId:this.getBattleId(),adType:st.R.PostBattleBanner});const U=Object.assign({container_type:k?et.ZF.BattleMemberChest:et.ZF.BattleChest,container_id:k?`${this.getBattleId()}-M`:this.getBattleId(),instance_id:this._currentPbfId,instance_type:tt.N.UI,fail_reason:B,funnel_id:this._segment.purchase.getFunnelID()},this.getCommonEventDataProperties());window.analytics.track("Container Opened Failed",U)}}var rt=U(20952),ot=U(76277),ht=U(90633),ct=U(25531),dt=U(73797),lt=U(68152),ut=U(85126),ft=U(35569);class bt extends it.v{constructor(k,B,U){super(k,B,U),this._funnelNamesAndStepIDs=[],Y.q.instance.game.broadcaster.addAppListener(dt.bv.AnalyticsInitialized,this.onAnalyticsInitialized,this),this._activePlayer.player.backpack.onKeyAddedToBackpack.add((k=>{var B;const U=null===(B=ut.N.getAllTowerData().find((B=>B.keystone.itemID===k)))||void 0===B?void 0:B.element;G.Aq$.isDefined(U)&&(Y.q.instance.prodigy.breadcrumbManager.resetBreadcrumb(ht.B.FEATURE_ACADEMY_TOWERS,ht.B.BREADCRUMB_ACADEMY_VISITED_AFTER_RECIEVING_KEYSTONE),Y.q.instance.prodigy.breadcrumbManager.resetBreadcrumb(ht.B.FEATURE_ACADEMY_TOWERS,ht.B.BREADCRUMB_ACADEMY_PEDESTAL_ROOM_VISITED_AFTER_RECIEVING_KEYSTONE),Y.q.instance.prodigy.gameContainer.get("c47-20b6").academyTowers.sendFunnelEvent({funnelName:ct.w.format("{0}_tower",U),funnelType:"feature",step:ft.D.ElementGem},U))}))}onAnalyticsInitialized(){this.loadAcademyTowersFunnelData()}sendFunnelEvent(k,...B){var U,F;if(window.analytics){const j=Object.values(ft.D).indexOf(k.step),$=null===(U=this._funnelNamesAndStepIDs.find((B=>B.funnelName===k.funnelName)))||void 0===U?void 0:U.stepOrdinalValue;if(!G.Aq$.isDefined($)||j>$){let U=null===(F=this._funnelNamesAndStepIDs.find((B=>B.funnelName===k.funnelName)))||void 0===F?void 0:F.stepIndex;G.Aq$.isDefined(U)?U++:U=1;let $=k.step;B.length>0&&($=ct.w.format($,...B));const H=Object.assign({funnel_name:k.funnelName,funnel_type:k.funnelType,step_index:U,step_name:$},this.getCommonEventDataProperties());Be.track("Funnel Advanced",H),this.saveAcademyTowersFunnelData(k.funnelName,U,j)}}}saveAcademyTowersFunnelData(k,B,U){var F,G;(0,lt.v)(!!this._funnelNamesAndStepIDs,"Segment academy towers funnel is undefined");const j=this._activePlayer.player,$=this._funnelNamesAndStepIDs.findIndex((B=>B.funnelName===k));if(null!==(F=(G=j.data).academyTowersFunnelsData)&&void 0!==F||(G.academyTowersFunnelsData=[]),$<0){const F={funnelName:k,stepIndex:B,stepOrdinalValue:U};this._funnelNamesAndStepIDs.push(F),j.data.academyTowersFunnelsData.push(F)}else this._funnelNamesAndStepIDs[$].stepIndex=B,j.data.academyTowersFunnelsData[$].stepIndex=B,this._funnelNamesAndStepIDs[$].stepOrdinalValue=U,j.data.academyTowersFunnelsData[$].stepOrdinalValue=U;j.forceSaveCharacter(),j.saveEnabled=!1}loadAcademyTowersFunnelData(){const k=this._activePlayer.player.data.academyTowersFunnelsData;k&&k.length>0?k.forEach((k=>{this._funnelNamesAndStepIDs.push(k)})):this._activePlayer.player.data.academyTowersFunnelsData=[]}}var pt=U(38156);class vt extends it.v{get rewardClaimedTransactionId(){return this._rewardClaimedTransactionId}get goalCompleteTransactionId(){return this._goalCompleteTransactionId}generateRewardClaimedTransactionId(){this._rewardClaimedTransactionId=nt.$.generateUID()}sendQuestGoalCompleteEvent(k){var B;this._goalCompleteTransactionId=nt.$.generateUID(),Be.track("Goal Achieved",{goal_system:et.ss.BattlePass,goal_name:pt.n.getQuestDescriptionFromDefinition(k.taskDefinition),goal_id:this.segmentGoalIdFor(k),is_repeatable:null!==(B=k.taskDefinition.repeatable)&&void 0!==B&&B,transaction_id:this._goalCompleteTransactionId})}sendQuestGoalUpdatedEvent(k,B,U){var F;Be.track("Goal Progress Updated",{goal_system:et.ss.BattlePass,goal_name:pt.n.getQuestDescriptionFromDefinition(k.taskDefinition),goal_id:this.segmentGoalIdFor(k),deadline:U,target_type:k.type,goal_progress:B,goal_current_progress:null===(F=k.taskProgress.data)||void 0===F?void 0:F.progress,goal_target:k.taskDefinition.completionRequirements.data.target})}segmentGoalIdFor(k){return`${k.questID}-${k.taskID}`}}var gt=U(98193);class mt extends it.v{get currentBattleID(){return this._currentBattleID}sendBattleStartEvent(k,B,U=null){this._currentBattleID=nt.$.generateUID(),this._battleStartTimeMS=Date.now();const F=Object.assign(Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID,energy:this._activePlayer.player.getEnergy(),pvp:!1,boss:!0,coop:!0},this._segment.gameWorld.getCurrentInstanceTypeAndID()),B),U),this.getCommonEventDataProperties());Be.track("Battle Started",F)}sendBattleCompleteEvent(k,B=null){if(!this._currentBattleID)return void G.VyI.log("An error occurred while sending battle complete segment event: Complete Event cannot be sent before Start Event.",G.$bb.Error);const U=Object.assign(Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID,energy:this._activePlayer.player.getEnergy(),duration:(Date.now()-this._battleStartTimeMS)/Q.s.SECONDS_TO_MILLISECONDS_MULTIPLIER},this._segment.gameWorld.getCurrentInstanceTypeAndID()),k),B),this.getCommonEventDataProperties());Be.track("Battle Completed",U)}sendBattleParticipantsEvent(k,B=null){if(!this._currentBattleID)return void G.VyI.log("An error occurred while sending battle participants segment event: Participants Event cannot be sent before Start Event.",G.$bb.Error);const U=Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID},k),B),this.getCommonEventDataProperties());Be.track("Battle Participants",U)}sendBattleParticipantsOutcomesEvent(k,B=null){if(!this._currentBattleID)return void G.VyI.log("An error occurred while sending battle participant outcomes segment event: Participant Outcomes Event cannot be sent before Start Event.",G.$bb.Error);const U=Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID},k),B),this.getCommonEventDataProperties());Be.track("Battle Participant Outcomes",U)}sendBattlePositionChangedEvent(k,B=null){if(!this._currentBattleID)return void G.VyI.log("An error occurred while sending position changed segment event: Postion Changed Event cannot be sent before Start Event.",G.$bb.Error);const U=Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID},k),B),this.getCommonEventDataProperties());Be.track("Battle Position Changed",U)}sendBattleItemUsedEvent(k,B=null){if(!this._currentBattleID)return void G.VyI.log("An error occurred while sending item used segment event: Item Used Event cannot be sent before Start Event.",G.$bb.Error);const U=Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID},k),B),this.getCommonEventDataProperties());Be.track("Battle Item Used",U)}sendBattlePetCapturedEvent(k,B=null){if(!this._currentBattleID)return void G.VyI.log("An error occurred while sending pet captured segment event: Pet Captured Event cannot be sent before Start Event.",G.$bb.Error);const U=Object.assign(Object.assign({battle_id:this._currentBattleID,pet_name:k.petName,pet_element:k.petElement,pet_type:k.petType,pet_level:k.petLevel,pet_rarity:k.petRarity},B),this.getCommonEventDataProperties());Be.track("Pet Captured",U)}sendBattlePetCaptureFailedEvent(k,B=null){if(!this._currentBattleID)return void G.VyI.log("An error occurred while sending pet capture failed segment event: Pet Capture Failed Event cannot be sent before Start Event.",G.$bb.Error);const U=Object.assign(Object.assign({battle_id:this._currentBattleID,pet_name:k.petName,pet_element:k.petElement,pet_type:k.petType,pet_level:k.petLevel,pet_rarity:k.petRarity,fail_reason:k.failReason,funnel_id:"Member Locked"===k.failReason?this._segment.purchase.getFunnelID():null},B),this.getCommonEventDataProperties());Be.track("Pet Capture Failed",U)}sendBattleSpellCastEvent(k,B=null){if(!this._currentBattleID)return void G.VyI.log("An error occurred while sending spell cast segment event: Spell Cast Event cannot be sent before Start Event.",G.$bb.Error);const U=Object.assign(Object.assign(Object.assign({battle_id:this._currentBattleID},k),B),this.getCommonEventDataProperties());Be.track("Battle Spell Cast",U)}sendCoopTeamCreatedEvent(k,B,U=null){const F=Object.assign(Object.assign({team_type:k,team_id:B},U),this.getCommonEventDataProperties());Be.track("Coop Team Created",F)}sendCoopTeamJoinedEvent(k,B,U=null){const F=Object.assign(Object.assign({team_type:k,team_id:B},U),this.getCommonEventDataProperties());Be.track("Coop Team Joined",F)}sendCoopTeamHostLeftEvent(k,B,U=null){const F=Object.assign(Object.assign({team_type:k,team_id:B},U),this.getCommonEventDataProperties());Be.track("Coop Team Host Left",F)}sendCoopBattleStartedEvent(k,B,U=null){this._currentBattleID=nt.$.generateUID();const F=Object.assign(Object.assign({team_type:k,team_id:B,battle_id:this._currentBattleID},U),this.getCommonEventDataProperties());Be.track("Coop Battle Started",F)}}var yt=U(20404);class _t extends it.v{constructor(){super(...arguments),this._currentGameLoadingInstanceID="",this._currentServerInstanceID=""}get CurrentGameLoadingInstanceID(){return this._currentGameLoadingInstanceID}get CurrentServerInstanceID(){return this._currentServerInstanceID}sendGameLoadingStartedEvent(k=null){this._currentGameLoadingInstanceID=nt.$.generateUID();const B="Notification"in window?Notification.permission:null,U=yt.b.isQueryParameterSetForSession(4);let F=null;if(U){const k=yt.b.getQueryParameterKeyFromID(4);F=yt.b.getQueryParameterByName(k)}const G=Object.assign(Object.assign({instance_id:this.CurrentGameLoadingInstanceID,notification_consent:B,launched_from_notification:U,notification_id:F},k),{session_uuid:this._uuidProvider.getUUID()});Be.track("Game Loading Started",G)}sendGameLoadingEndedEvent(k,B,U,F=null){const G=Object.assign(Object.assign({instance_id:this.CurrentGameLoadingInstanceID,success:B,completion_percent:U,duration:(Date.now()-k)/Q.s.SECONDS_TO_MILLISECONDS_MULTIPLIER},F),{session_uuid:this._uuidProvider.getUUID()});Be.track("Game Loading Ended",G)}sendServerSelectedEvent(k,B=null){this._currentServerInstanceID=nt.$.generateUID();const U=Object.assign(Object.assign(Object.assign({instance_id:this.CurrentServerInstanceID},k),B),{session_uuid:this._uuidProvider.getUUID()});Be.track("Server Selected",U)}sendServerConnectedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({instance_id:this.CurrentServerInstanceID},k),B),this.getCommonEventDataProperties());Be.track("Server Connected",U)}sendServerReconnectedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({instance_id:this.CurrentServerInstanceID},k),B),this.getCommonEventDataProperties());Be.track("Server Reconnected",U)}sendServerConnectionFailedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({instance_id:this.CurrentServerInstanceID},k),B),this.getCommonEventDataProperties());Be.track("Server Connection Failed",U)}}class Et extends it.v{sendFunnelAdvancedSegmentEvent(k,B,U=null){const F=Object.assign(Object.assign({funnel_name:"Permission",funnel_type:"Permission",step_index:k,step_name:B},U),this.getCommonEventDataProperties());Be.track("Funnel Advanced",F)}}var wt=U(21097);class Tt extends it.v{getCurrentContainerInstanceID(){return this._currentContainerData?this._currentContainerData.instanceID:""}getCurrentContainerTransactionID(){return this._currentContainerData?this._currentContainerData.transactionID:""}constructor(k,B,U){super(k,B,U),this._currentContainerData=null,this._discoveredContainers=[],this._currentContainerData={instanceID:"",transactionID:""}}sendContainerDiscoveredEvent(k,B,U,F,G){if(!window.analytics||this._discoveredContainers.includes(null!=G?G:k))return;this._discoveredContainers.push(null!=G?G:k);const j=Object.assign(Object.assign({container_type:k,container_id:B,x_coord:U.toString(),y_coord:F.toString()},this._segment.gameWorld.getCurrentInstanceTypeAndID()),this.getCommonEventDataProperties());Be.track("Container Discovered",j)}sendContainerOpenedEvent(k,B,U=tt.N.OpenWorld,F){this._currentContainerData={instanceID:`${k}-${B}`,transactionID:nt.$.generateUID()};const G=Object.assign(Object.assign(Object.assign({container_type:k,container_id:B},this._segment.gameWorld.getCurrentInstanceTypeAndID(U,F)),{transaction_id:this.getCurrentContainerTransactionID()}),this.getCommonEventDataProperties());Be.track("Container Opened",G)}sendContainerOpenedFailedEvent(k,B,U,F=tt.N.OpenWorld,G){const j=Object.assign(Object.assign(Object.assign({container_type:k,container_id:B},this._segment.gameWorld.getCurrentInstanceTypeAndID(F,G)),{fail_reason:U,funnel_id:U===wt.WE.MemberLocked?this._segment.purchase.getFunnelID():null}),this.getCommonEventDataProperties());Be.track("Container Opened Failed",j)}}var St=U(77938),At=U(34616);class Ct extends it.v{sendConversionJarUpdated(k){var B,U;const F=Object.assign({battle_id:k.battleId,jar_id:k.jarId,update_type:k.updateType,current_count:k.currentCount,capacity:k.capacity,transaction_id:k.transactionId,time_until_reset:k.timeUntilReset,contents:k.contents.map(Ot),contents_added:(null!==(B=k.added)&&void 0!==B?B:[]).map(Ot),contents_removed:(null!==(U=k.removed)&&void 0!==U?U:[]).map(Ot)},this.getCommonEventDataProperties());Be.track("Conversion Jar Updated",F)}memberJarUpdate(k){return{jarId:"Member Jar",currentCount:k.savedBattleCount,capacity:At.N.maximumSavedBattleCount,timeUntilReset:null,contents:k.savedRewards.map((k=>({type:k.itemType,ID:k.itemId,N:k.quantity})))}}starJarUpdate(k){var B,U;return{jarId:"Star Jar",currentCount:null!==(B=k.storedMemberStars)&&void 0!==B?B:0,capacity:1/0,timeUntilReset:((null!==(U=k.memberStarsExpirationDate)&&void 0!==U?U:0)-Date.now())/Q.s.SECONDS_TO_MILLISECONDS_MULTIPLIER,contents:[]}}}function Ot(k){var B,U,F,G,j;return{item_type:k.type,item_id:null===(B=k.ID)||void 0===B?void 0:B.toString(),item_name:null!==(F=null===(U=St.t.getItem(k.type,k.ID))||void 0===U?void 0:U.name)&&void 0!==F?F:"unknown",count:null!==(j=null===(G=k.N)||void 0===G?void 0:G.toString())&&void 0!==j?j:"1"}}var It=U(23506);class Dt extends it.v{get botDifficulty(){return this._botDifficulty}get botPersonality(){return this._botPersonality}sendInterfaceOpenedEvent(){this._segment.featureCommon.sendInterfaceEvent({interfaceName:J.B.DuelsStadium,interfaceType:et.Wm.Screen,instanceType:tt.N.Interface,originType:et.$N.ButtonClick})}sendMatchmakingQueuedEvent(){this._matchmakingQueuedTime=Date.now();const k=Object.assign(Object.assign({},this._segment.gameWorld.getCurrentInstanceTypeAndID(tt.N.Interface,J.B.DuelsStadium)),this.getCommonEventDataProperties());Be.track("Duels Stadium Matchmaking Queued",k)}sendMatchFoundEvent(k,B){G.Aq$.isDefined(B)&&(this._botPersonality=B);const U=Object.assign(Object.assign(Object.assign({},this._segment.gameWorld.getCurrentInstanceTypeAndID(tt.N.Interface,J.B.DuelsStadium)),{time_in_queue:Date.now()-this._matchmakingQueuedTime,player_id:this._activePlayer.getUserID(),opponent_id:null!=B?B:k}),this.getCommonEventDataProperties());Be.track("Duels Stadium Start",U)}sendCloseButtonClickedEvent(){this._segment.featureCommon.sendButtonEvent({interfaceName:J.B.DuelsStadium,interfaceType:et.Wm.Screen,buttonName:"close-duels-stadium",destinationName:J.B.WorldMap})}setBotDifficultyEvent(k){const B=It.V.globalDuelBotPersonalityConfig.streakConfig.sort(((k,B)=>k.playerStreak-B.playerStreak)).map((k=>k.playerStreak)),U=G.cj9.clamp(k,B[0],B[B.length-1]);return this._botDifficulty=B.indexOf(U)+1,this._botDifficulty}sendRoomSelectedEvent(k){const B=Array.isArray(k.entryCost)?k.entryCost[0]:k.entryCost,U=Array.isArray(k.prize)?k.prize[0]:k.prize,F=Object.assign(Object.assign({instance_id:nt.$.generateUID()},this.getCommonEventDataProperties()),{room_name:k.name,entry_fee_amount:B?B.amount:0,entry_fee_currency:B?B.type:"Free",reward_amount:U.amount,reward_currency:U.type});Be.track("Room Selected",F)}}class Rt extends it.v{getCurrentMinigameInstanceID(){return this._currentMinigameData?this._currentMinigameData.instanceID:""}getCurrentMinigameTransactionID(){return this._currentMinigameData?this._currentMinigameData.transactionID:""}getCurrentPrizeWheelInstanceID(){return this._currentPrizeWheelData?this._currentPrizeWheelData.instanceID:""}getCurrentPrizeWheelTransactionID(){return this._currentPrizeWheelData?this._currentPrizeWheelData.transactionID:""}getCurrentPrizeWheelSpinID(){return this._currentPrizeWheelData.spinID?this._currentPrizeWheelData.spinID:""}getCurrentGoalRewardInstanceID(){return this._currentGoalRewardTransactionData?this._currentGoalRewardTransactionData.instanceID:""}getCurrentGoalRewardTransactionID(){return this._currentGoalRewardTransactionData?this._currentGoalRewardTransactionData.transactionID:""}constructor(k,B,U){super(k,B,U),this._currentMinigameData=null,this._currentPrizeWheelData=null,this._currentGoalRewardTransactionData=null,this._currentMinigameData={instanceID:"",transactionID:""},this._currentPrizeWheelData={instanceID:"",transactionID:""},this._currentGoalRewardTransactionData={instanceID:"",transactionID:""}}sendMinigameEvent(k,B,U=null){B&&(this._currentMinigameData={instanceID:nt.$.generateUID(),transactionID:nt.$.generateUID()});let F=Object.assign(Object.assign({minigame:k,instance_id:this._currentMinigameData.instanceID},U),this.getCommonEventDataProperties());B?Be.track("Minigame Started",F):(F=Object.assign(Object.assign({},F),{transaction_id:this._currentMinigameData.transactionID}),Be.track("Minigame Completed",F))}sendPrizeWheelSpunEvent(k,B=tt.N.OpenWorld,U={}){var F;this._currentPrizeWheelData={instanceID:nt.$.generateUID(),transactionID:nt.$.generateUID(),spinID:null!==(F=U.spin_id)&&void 0!==F?F:nt.$.generateUID()};const G=Object.assign(Object.assign(Object.assign(Object.assign({wheel_type:k},this._segment.gameWorld.getCurrentInstanceTypeAndID(B)),{transaction_id:this.getCurrentPrizeWheelTransactionID()}),U),this.getCommonEventDataProperties());Be.track("Prize Wheel Spun",G)}sendPrizeWheelSpinFailedEvent(k,B,U=tt.N.OpenWorld,F=null){const G=Object.assign(Object.assign(Object.assign({wheel_type:k,fail_reason:B,funnel_id:B===wt.WE.MemberLocked?this._segment.purchase.getFunnelID():null},this._segment.gameWorld.getCurrentInstanceTypeAndID(U)),F),this.getCommonEventDataProperties());Be.track("Prize Wheel Spin Failed",G)}sendGoalAchievedEvent(k,B,U,F,G=!1,j=null){this._currentPrizeWheelData={instanceID:nt.$.generateUID(),transactionID:nt.$.generateUID()};const $=Object.assign(Object.assign({goal_name:k,goal_id:B,goal_type:U,goal_system:F,is_repeatable:G,transaction_id:this.getCurrentGoalRewardTransactionID()},j),this.getCommonEventDataProperties());Be.track("Goal Achieved",$)}}var Pt=U(30405);class Mt extends it.v{constructor(k,B,U){super(k,B,U)}handleNewClassAssignment(k){if(k.skills.some((k=>k.correct+k.incorrect>0)))return;const B=k.skills.reduce(((k,B)=>k+B.questions.length),0);Be.track("Class Assignment Received",Object.assign({event_text:"Class Assignment Received",class_id:this.getClassId(),assignment_id:k.homeworkID,questions:B},this.getCommonEventDataProperties()))}handleClassAssignmentCompleted(k){const B=k.skills.reduce(((k,B)=>k+B.correct+B.incorrect),0);Be.track("Class Assignment Completed",Object.assign({event_text:"Class Assignment Completed",class_id:this.getClassId(),assignment_id:k.homeworkID,questions_completed:B},this.getCommonEventDataProperties()))}handleRemovedClassAssignment(k){if(k.skills.every((k=>0===k.questions.length)))return;const B=k.skills.reduce(((k,B)=>k+B.correct+B.incorrect),0);Be.track("Class Assignment Ended",Object.assign({event_text:"Class Assignment Ended",class_id:this.getClassId(),assignment_id:k.homeworkID,questions_completed:B},this.getCommonEventDataProperties()))}getClassId(){return Pt.o.getLatestClassID(this._activePlayer.player.owners,this._activePlayer.player.playerTeachers,this._activePlayer.player.playerParents)}}var Nt=U(13093),xt=U(96073),Lt=U(22023);class kt extends it.v{constructor(){super(...arguments),this._currentInterfaceIDAndDuration=new Map,this._postOpenTime=0,this._currentButtonID=new Map}get currentInterfaceName(){return this._currentInterfaceName}getCurrentInterfaceID(k){var B;return null===(B=this._currentInterfaceIDAndDuration.get(k))||void 0===B?void 0:B.ID}getCurrentButtonID(k){var B;return null===(B=this._currentButtonID.get(k))||void 0===B?void 0:B.ID}sendInterfaceEvent(k,B=null){if(!window.analytics)return;const U=!!k.closeMethod;this._currentInterfaceName=k.interfaceName;let F=k.originID;k.originType===et.$N.ButtonClick||k.originType===et.$N.TabClick?F=this.getCurrentButtonID(k.originID):k.originType===et.$N.NpcClick&&(F=this._segment.gameWorld.getCurrentNpcTransactionID());let G=Object.assign(Object.assign(Object.assign({interface_name:k.interfaceName,interface_type:k.interfaceType,origin_type:k.originType,origin_id:F,instance_type:k.instanceType},k.custom),B),this.getCommonEventDataProperties());U?U&&this._currentInterfaceIDAndDuration.has(k.interfaceName)&&(G=Object.assign(Object.assign({},G),{instance_id:this._currentInterfaceIDAndDuration.get(k.interfaceName).ID,close_method:k.closeMethod,duration:((new Date).getTime()-this._currentInterfaceIDAndDuration.get(k.interfaceName).duration)/Q.s.SECONDS_TO_MILLISECONDS_MULTIPLIER}),this._currentInterfaceIDAndDuration.delete(k.interfaceName),Be.track("Interface Closed",G)):(this._currentInterfaceIDAndDuration.set(k.interfaceName,{ID:nt.$.generateUID(),duration:(new Date).getTime()}),G=Object.assign(Object.assign({},G),{instance_id:this._currentInterfaceIDAndDuration.get(k.interfaceName).ID}),Be.track("Interface Opened",G))}getInstanceId(k){var B;if(window.analytics)return null===(B=this._currentInterfaceIDAndDuration.get(k))||void 0===B?void 0:B.ID}sendScreenTransitionEvent(k){if(window.analytics){const B=Object.assign({duration:k.duration,previous_screen_id:k.previousScreenID,screen_id:k.screenID,transition_type:k.transitionType},this.getCommonEventDataProperties());Be.track("Screen Transitioned",B)}}sendButtonEvent(k,B=null){var U,F;const G=nt.$.generateUID(),j=null!==(U=k.interfaceName)&&void 0!==U?U:this._currentInterfaceName;let $=Object.assign(Object.assign({button_name:k.buttonName,destination_name:k.destinationName,click_id:G,interface_name:j,interface_type:k.interfaceType,element_type:k.elementType,element_id:k.elementID,transation_id:k.transactionId,instance_type:k.instanceType},B),this.getCommonEventDataProperties());j&&""!==j?$=Object.assign({instance_id:null===(F=this._currentInterfaceIDAndDuration.get(j))||void 0===F?void 0:F.ID},$):k.instanceId&&($=Object.assign({instance_id:k.instanceId},$)),k.saveClickInfo&&""!==k.saveClickInfo&&this._currentButtonID.set(k.saveClickInfo,{ID:G}),Be.track("Button Clicked",$)}sendTabEvent(k,B=null){var U,F;const G=nt.$.generateUID(),j=null!==(U=k.interfaceName)&&void 0!==U?U:this._currentInterfaceName;let $=Object.assign(Object.assign({tab_name:k.tabName,click_id:G,interface_name:j,interface_type:k.interfaceType,instance_type:k.instanceType},B),this.getCommonEventDataProperties());k.interfaceName&&""!==k.interfaceName&&($=Object.assign({instance_id:null===(F=this._currentInterfaceIDAndDuration.get(k.interfaceName))||void 0===F?void 0:F.ID,instance_type:k.instanceType},$)),k.saveClickInfo&&""!==k.saveClickInfo&&this._currentButtonID.set(k.saveClickInfo,{ID:G}),Be.track("Tab Clicked",$)}sendPostOpenedEvent(k,B=null){var U;this._postOpenTime=Date.now();let F=Object.assign(Object.assign({interface_name:this._currentInterfaceName,post_id:k},B),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(F=Object.assign({instance_id:null===(U=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===U?void 0:U.ID},F)),Be.track("Post Opened",F)}sendPostViewedEvent(k,B=null){var U;let F=Object.assign(Object.assign({interface_name:k.interfaceName,interface_type:k.interfaceType,post_title:k.postTitle,post_id:k.postID,post_rank:k.postRank},B),this.getCommonEventDataProperties());k.interfaceName&&""!==k.interfaceName&&(F=Object.assign({instance_id:null===(U=this._currentInterfaceIDAndDuration.get(k.interfaceName))||void 0===U?void 0:U.ID},F)),Be.track("Post Viewed",F)}sendPostClosedEvent(k,B,U=null){var F;let G=Object.assign(Object.assign({post_id:k,video_loaded:B,interface_name:this._currentInterfaceName,duration:(Date.now()-this._postOpenTime)/Q.s.SECONDS_TO_MILLISECONDS_MULTIPLIER},U),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(G=Object.assign({instance_id:null===(F=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===F?void 0:F.ID},G)),Be.track("Post Closed",G)}sendPetBookViewedEvent(k){var B;let U=Object.assign({book_name:k.bookName,book_page:k.bookPage},this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(U=Object.assign({instance_id:null===(B=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===B?void 0:B.ID},U)),Be.track("Page Viewed",U)}sendPetDetailsViewedEvent(k,B,U=null){var F;let G=Object.assign(Object.assign({pet_name:k.data.name,pet_id:k.ID,pet_type:k.data.type,pet_element:k.data.affinity,pet_rarity:k.data.rarity,origin_name:B},U),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(G=Object.assign({instance_id:null===(F=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===F?void 0:F.ID},G)),Be.track("Pet Details Viewed",G)}sendPetReleasedEvent(k,B,U=null){var F;let G=Object.assign(Object.assign({pet_name:k,pet_level:B},U),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(G=Object.assign({instance_id:null===(F=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===F?void 0:F.ID},G)),Be.track("Pet Released",G)}sendPetUpgradedEvent(k,B,U,F,G,j=null){var $;let H=Object.assign(Object.assign({progression_type:"Pet Level",progression_value:U,previous_value:B,name:k,point_type:G,point_amount:F,transaction_id:nt.$.generateUID()},j),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(H=Object.assign({instance_id:null===($=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===$?void 0:$.ID},H)),Be.track("Player Progression Advanced",H)}sendPetSlotUnlockedEvent(k,B,U,F=nt.$.generateUID(),G=null){const j=Object.assign(Object.assign({source_type:k,slots_unlocked:B-U,slots_available:B,slots_filled:this._activePlayer.player.kennel.getNumPets(),transaction_id:F},G),this.getCommonEventDataProperties());Be.track("Pet Slot Unlocked",j)}sendTeamUpdatedEvent(k,B,U=null){var F;let G=Object.assign(Object.assign({pet_added:k,pet_removed:B},U),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(G=Object.assign({instance_id:null===(F=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===F?void 0:F.ID},G)),Be.track("Team Updated",G)}sendTeamPositionChangedEvent(k,B=null){var U;let F=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());this._currentInterfaceName&&""!==this._currentInterfaceName&&(F=Object.assign({instance_id:null===(U=this._currentInterfaceIDAndDuration.get(this._currentInterfaceName))||void 0===U?void 0:U.ID},F)),Be.track("Team Position Changed",F)}sendFetchPetRosterEvent(k,B){const U=k.map((k=>{var B;const U=null===(B=St.t.getItem("pet",k.ID))||void 0===B?void 0:B.data,F=Lt.P8.getPetDisplayMergeRank(k.ID,k.uniqueID);return{pet_name:null==U?void 0:U.name,pet_id:k.ID,pet_level:k.level,pet_rank:F,pet_gear:k.gear}}));Be.track("Fetch Pet Roster",Object.assign(Object.assign({pet_roster:U},B),this.getCommonEventDataProperties()))}sendBadgeUpdatedEvent(k){const B=Object.assign({button_name:k.button_name,badge_value:k.badge_value,previous_badge_value:k.previous_badge_value},this.getCommonEventDataProperties());Be.track("Badge Updated",B)}sendCrossPlatformEvent(k){const B=Object.assign(Object.assign({},k),this.getCommonEventDataProperties());Be.track("Cross Product Navigation Initiated",B)}}var Bt=U(99134);class Ut extends it.v{constructor(k,B,U){super(k,B,U),this._loginSteps=[],Y.q.instance.game.broadcaster.addAppListener(dt.bv.AnalyticsInitialized,this.onAnalyticsInitialized,this)}registerLoginStep(k){this._loginSteps.push(k)}sendStep(k,B,U,F){var G,j;if(!window.analytics)return;const $=null!==(G=this._activePlayer.player.data.featureFunnelProgress)&&void 0!==G?G:{};F<=(null!==(j=$[k])&&void 0!==j?j:-1)||(Be.track("Funnel Advanced",Object.assign({funnel_name:k,funnel_type:B,step_name:U,step_index:F},this.getCommonEventDataProperties())),this._activePlayer.player.data.featureFunnelProgress=Object.assign(Object.assign({},$),{[k]:F}),this._activePlayer.player.forceSaveCharacter())}onAnalyticsInitialized(){for(const k of this._loginSteps)k.condition()&&this.sendStep(k.funnelName,k.funnelType,k.stepName,k.stepIndex)}reset(k){var B;const U=null!==(B=this._activePlayer.player.data.featureFunnelProgress)&&void 0!==B?B:{};return void 0!==U[k]&&(delete U[k],this._activePlayer.player.data.featureFunnelProgress=U,this._activePlayer.player.forceSaveCharacter(),!0)}}var Ft=U(24047),Gt=U(73678),jt=U(30065),$t=U(47728),Ht=U(87337);class Vt extends it.v{constructor(){super(...arguments),this._currentMapStartTime=0,this._discoveredNpcList=[],this._discoveredWorldObjectList=[],this._currentNpcData=null,this.currentOpenWorldInstanceId=""}getCurrentNpcInstanceID(){return this._currentNpcData?this._currentNpcData.instanceID:""}getCurrentNpcOriginID(){return this._currentNpcData?this._currentNpcData.npc_id:""}getCurrentNpcTransactionID(){return this._currentNpcData?this._currentNpcData.transactionID:""}sendMapEnteredEvent(k,B,U,F=null,G=!1){var j;this.currentOpenWorldInstanceId=nt.$.generateUID();const $=Object.assign(Object.assign(Object.assign({previous_map:k,previous_zone:B,transition_type:U,duration:(Date.now()-this._currentMapStartTime)/Q.s.SECONDS_TO_MILLISECONDS_MULTIPLIER},this.getCurrentInstanceTypeAndID(tt.N.OpenWorld,null,{previousZone:B,previousMap:k})),F),this.getCommonEventDataProperties());if("A1"===$.map||"D3"===$.map){if((null===(j=Y.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival())||void 0===j?void 0:j.type)===jt.Q.Springfest){const k=$t.x.getFestivalSegmentContext();$.instance_type=k.instance_type,$.instance_id=k.instance_id}}if(G){const k=$t.x.getFestivalSegmentContext();$.instance_type=k.instance_type,$.instance_id=k.instance_id}this._currentMapStartTime=Date.now(),Be.track("Map Entered",$)}sendWorldObjectDiscoveredEvent(k,B=null){if(!window.analytics||this._discoveredWorldObjectList.includes(k.object_type))return;this._discoveredWorldObjectList.push(k.object_type);const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),this.getCurrentInstanceTypeAndID()),B),this.getCommonEventDataProperties());this._currentMapStartTime=Date.now(),Be.track("World Object Discovered",U)}sendWorldObjectUsedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),this.getCurrentInstanceTypeAndID()),B),this.getCommonEventDataProperties());this._currentMapStartTime=Date.now(),Be.track("World Object Used",U)}sendWorldObjectUsedFailedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},k),{funnel_id:k.fail_reason===Ht.kN.MemberLocked?this._segment.purchase.getFunnelID():null}),this.getCurrentInstanceTypeAndID()),B),this.getCommonEventDataProperties());this._currentMapStartTime=Date.now(),Be.track("World Object Failed",U)}sendNpcClickedEvent(k,B=null){this._currentNpcData=Object.assign(Object.assign({},k),{instanceID:`${k.npc_name}-${k.npc_type}`,transactionID:nt.$.generateUID()});const U=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},k),{click_id:this.getCurrentNpcTransactionID()}),this.getCurrentInstanceTypeAndID()),B),this.getCommonEventDataProperties());Be.track("Npc Clicked",U)}sendNpcDiscoveredEvent(k,B=null){if(!window.analytics||this._discoveredNpcList.includes(k.npc_name))return;this._discoveredNpcList.push(k.npc_name);const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),this.getCurrentInstanceTypeAndID()),B),this.getCommonEventDataProperties());Be.track("Npc Discovered",U)}sendEnemyDiscoveredEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),this.getCurrentInstanceTypeAndID()),B),this.getCommonEventDataProperties());this._currentMapStartTime=Date.now(),Be.track("Enemy Discovered",U)}sendCooldownTimerStartedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),this.getCurrentInstanceTypeAndID()),B),this.getCommonEventDataProperties());Be.track("Cooldown Timer Started",U)}getCurrentInstanceTypeAndID(k=tt.N.OpenWorld,B,U){var F;const[G,j]=U?[U.previousZone,U.previousMap]:Y.q.instance.prodigy.world.getCurrentMap().split("-");let $,H=k;if(!["WR","CR","A1","DungeonHub","hub"].includes(j))switch(G){case Gt.A_.ICETOWER:case Gt.A_.EARTHTOWER:case Gt.A_.DARKTOWER:H=tt.N.TowerRun;break;case Gt.A_.CRYSTALCAVERNS:H=tt.N.CrystalCaverns;break;case Gt.A_.ARCHIVES:H=tt.N.Archives;break;case Gt.A_.ACADEMY:H=tt.N.Academy}return k===tt.N.EndOfBattle?(H=tt.N.EndOfBattle,$=null===(F=this._segment.battle)||void 0===F?void 0:F.currentBattleID):k===tt.N.Interface?$=this._segment.featureCommon.getCurrentInterfaceID(B):k===tt.N.RiftRun||k===tt.N.BossRift?$=this._segment.rifts.riftInstanceUuid:($=this._segment.playerMovementAndDiscovery.getCurrentRunInstanceID(H),$||k!==tt.N.OpenWorld||($=this.currentOpenWorldInstanceId)),{instance_type:H,instance_id:$}}}var Wt=U(62886),qt=U(60157);class Kt extends it.v{constructor(){super(...arguments),this._ongoingTransactions=[]}sendItemRemovedEvent(k,B,U,F,G){const j=Object.assign(Object.assign(Object.assign({item_id:k,item_name:B,item_type:U,item_count:F,item_balance:this._activePlayer.player.getItemCount(U,k),transaction_id:this.getCustomItemRemovedTransactionID(U,G)},this._segment.gameWorld.getCurrentInstanceTypeAndID()),G),this.getCommonEventDataProperties());this.sendItemQuestEvent(Wt.T.REMOVE_ITEM,Wt.T.REMOVE_MULTIPLE_ITEM,j,U,k),Be.track("Item Removed",j)}sendItemReceivedEvent(k,B,U,F,G={}){var j,$;const H=St.t.getItem(U,k),V=this._activePlayer.player.getItemCount(U,k),W=Object.assign(Object.assign(Object.assign(Object.assign({item_id:k,item_name:B,item_type:U,item_count:F,item_balance:V,player_equipment:this._activePlayer.player.equipment.getData(),item_unlock_level:null!==($=null===(j=null==H?void 0:H.data)||void 0===j?void 0:j.lockLevel)&&void 0!==$?$:1},this._segment.gameWorld.getCurrentInstanceTypeAndID(null==G?void 0:G.instance_type,null==G?void 0:G.interface_name)),G),this.getSourceTransactionData(null==G?void 0:G.source_type,null==G?void 0:G.source_id)),this.getCommonEventDataProperties());this.sendItemQuestEvent(Wt.T.RECEIVE_ITEM,Wt.T.RECEIVE_MULTIPLE_ITEM,W,U,k),Y.q.instance.game.broadcaster.broadcast(dt.ib.ItemReceived,void 0,[{ID:k,type:U,N:F,balance:V}]),Be.track("Item Received",W)}sendItemUsedEvent(k,B={}){this._currentItemUsedTransactionID=nt.$.generateUID();const U=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this._segment.gameWorld.getCurrentInstanceTypeAndID()),k),{transaction_id:this._currentItemUsedTransactionID}),B),this.getCommonEventDataProperties());this.sendItemQuestEvent(Wt.T.USE_ITEM,void 0,U,k.item_type,k.item_id),Be.track("Item Used",U)}sendItemEquippedEvent(k,B=null,U={}){const F=Object.assign(Object.assign(Object.assign(Object.assign({},k),{interaction_id:B}),U),this._segment.featureCommon.getCommonEventDataProperties());this.sendItemQuestEvent(Wt.T.EQUIP_ITEM,void 0,F,k.item_type,k.item_id),Be.track("Item Equipped",F)}sendItemEquipFailedEvent(k,B={}){const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),{funnel_id:"Member Locked"===k.fail_reason?this._segment.purchase.getFunnelID():null}),B),this._segment.featureCommon.getCommonEventDataProperties());Be.track("Item Equip Failed",U)}sendItemUnequippedEvent(k,B=null,U={}){const F=Object.assign(Object.assign(Object.assign(Object.assign({},k),{interaction_id:B}),U),this._segment.featureCommon.getCommonEventDataProperties());Be.track("Item Unequipped",F)}getSourceTransactionData(k,B){var U,F;let j,$=null,H=k;if(!H)return null;switch(H){case Z.C.Container:case Z.C.Interactable:case Z.C.WorldChest:case Z.C.WorldMemberChest:$=this._segment.container.getCurrentContainerInstanceID(),j=this._segment.container.getCurrentContainerTransactionID();break;case Z.C.MiniGame:$=this._segment.economy.getCurrentMinigameInstanceID(),j=this._segment.economy.getCurrentMinigameTransactionID();break;case Z.C.PrizeWheel:this._segment.rifts.riftInstanceUuid?($=null!==(U=this._segment.rifts.getRiftsRewardSpinUuid())&&void 0!==U?U:"",j=null!==(F=this._segment.rifts.getRiftsRewardSpinTransactionUuid())&&void 0!==F?F:""):($=this._segment.economy.getCurrentPrizeWheelInstanceID(),j=this._segment.economy.getCurrentPrizeWheelTransactionID());break;case Z.C.Shop:$=this._segment.shop.getCurrentShopInstanceID(),j=this._segment.shop.getCurrentShopTransactionID();break;case Z.C.QuestReward:$=this._segment.playerProgression.getCurrentQuestInstanceID(),j=this._segment.playerProgression.getCurrentQuestTransactionID();break;case Z.C.Npc:$=this._segment.gameWorld.getCurrentNpcInstanceID(),j=this._segment.gameWorld.getCurrentNpcTransactionID();break;case Z.C.Battle:$=this._segment.battle.currentBattleID,j=nt.$.generateUID();break;case Z.C.BattlePass:j=this._segment.battlePass.rewardClaimedTransactionId;break;case Z.C.Festival:case Z.C.FestivalPrizeWheel:j=this._segment.festival.getCurrentFestivalTransactionID(null!=B?B:"");break;case Z.C.FestivalCurrencyConversion:j=nt.$.generateUID();break;case Z.C.FestivalBossLootWheel:$=this._segment.economy.getCurrentPrizeWheelSpinID(),j=this._segment.economy.getCurrentPrizeWheelTransactionID();break;case Z.C.DailyLoginCalendar:const k="daily-login-calendar-collect-button";$="Daily-login-Calendar-Reward",j=this._segment.featureCommon.getCurrentButtonID(k);break;case Z.C.DynamicStore:const G=Y.q.instance.prodigy.gameContainer.get("7a1-ff33").getLastTransactionStore();$=this._segment.shop.getDynamicStoreSourceId(G),j=this._segment.shop.getCurrentShopTransactionID(),H=Z.C.Shop;break;default:return null}const V={source_type:H};return G.Aq$.isDefined($)&&(V.source_id=$),G.Aq$.isDefined(B)&&""===$&&(V.source_id=B),G.Aq$.isDefined(j)&&(V.transaction_id=j),V}beginSecureInventoryTracking(){const k=Y.q.instance.prodigy.gameContainer.get("61f-37d6");k.onChange.removeAll(this),k.onChange.add(((k,B)=>{const U=this._ongoingTransactions[this._ongoingTransactions.length-1];U?U.add({current:k,previous:B,customData:{}}):G.VyI.log("Received secure inventory changes with no associated segment transaction",G.$bb.Error)}),this)}beginSecureItemTransaction(){let k=[];const B={add:B=>{k?k.push(B):G.VyI.log("Attempted to add item to flushed segment transaction",G.$bb.Error)},take:()=>{const B=null!=k?k:[];return k=void 0,B},setIndividualData:(B,U,F)=>{for(const G of null!=k?k:[])G.current.type===B&&G.current.id===U&&(G.customData=F)},flush:U=>{if(!k)return;const F=this._ongoingTransactions.indexOf(B),j=this._ongoingTransactions.splice(F,1/0);for(const k of j)for(const{previous:B,current:F,customData:j}of k.take())St.t.secureGetItem(F.type,F.id).then((k=>{var G,$,H;const V=null!==(G=null==B?void 0:B.quantity)&&void 0!==G?G:0,W=F.quantity,q=null!==(H=null===($=null==k?void 0:k.data)||void 0===$?void 0:$.name)&&void 0!==H?H:"undefined",K=Object.assign(Object.assign({},U),j);W>V&&this._segment.item.sendItemReceivedEvent(F.id,q,F.type,W-V,K),W",currency_balance:this._activePlayer.player.getCurrencyAmount(H,$),item_cost:V}),B),{sink_id:null===(j=B.sink_id)||void 0===j?void 0:j.toString()}))}sendCostumePreviewedEvent(k,B,U,F){Be.track("Costume Previewed",Object.assign({costume_id:k,costume_name:B,is_member_locked:U,rarity:F},this.getCommonEventDataProperties()))}}var zt=U(70156),Yt=U(78746),Qt=U(4764);class Xt extends it.v{get currentLootDashMatchId(){return this._currentLootDashMatchId}constructor(k,B,U){super(k,B,U),this._lootDashManager=Y.q.instance.prodigy.gameContainer.get("cfe-9c2c")}sendMatchmakingStartedEvent(){if(!this.lootDashMatchController)return;const{instanceType:k,instanceId:B}=this.getInstanceData(!0);Be.track("Wizard Dash Matchmaking Started",Object.assign({event_text:"Wizard Dash Matchmaking Started",instance_type:k,instance_id:B,match_type:this.lootDashMatchController.matchType,matchmaking_type:this.lootDashMatchController.matchmakingType},this.getCommonEventDataProperties()))}sendBotDataRetrievedEvent(k){if(!k)return;const{instanceType:B,instanceId:U}=this.getInstanceData();Be.track("Wizard Dash Bot Data Retrieved",Object.assign({event_text:"Wizard Dash Bot Data Retrieved",instance_type:B,instance_id:U,bot_type:k.difficulty,bots:k},this.getCommonEventDataProperties()))}sendRunStartedEvent(){if(!this.lootDashMatchController)return;this._currentLootDashMatchId=nt.$.generateUID();const{instanceType:k,instanceId:B}=this.getInstanceData(!0);Be.track("Wizard Dash Run Started",Object.assign({event_text:"Wizard Dash Run Started",instance_type:k,instance_id:B,match_type:this.lootDashMatchController.matchType,matchmaking_type:this.lootDashMatchController.matchmakingType,number_of_opponents:this.lootDashMatchController.numBotOpponents+this.lootDashMatchController.numLiveOpponents,number_of_bots:this.lootDashMatchController.numBotOpponents,number_of_live_players:this.lootDashMatchController.numLiveOpponents,featured_content_available:0,featured_content_filled:0,total_stages:this.lootDashMatchController.totalStages,revives_remaining:this.filterRevivesRemaining(this._lootDashManager.getNumberOfStartingRevives())},this.getCommonEventDataProperties()))}sendRunCompletedEvent(k,B){var U;if(!this.lootDashMatchController)return;const F=this._activePlayer.player.educationData,{instanceType:G,instanceId:j}=this.getInstanceData();Be.track("Wizard Dash Run Completed",Object.assign({event_text:"Wizard Dash Run Completed",instance_type:G,instance_id:j,outcome:this.lootDashMatchController.lootDashMatchData.matchCompletionState,loot_bags:this.lootDashMatchController.lootDashMatchData.lootBagData,stars_earned:k,place_finished:B,winning_streak:this.lootDashMatchController.lootDashMatchData.currentStreak,revives_remaining:this.filterRevivesRemaining(this.lootDashMatchController.revivesRemaining),questions_answered:this.lootDashMatchController.lootDashMatchData.questionsAnsweredData.totalQuestionsAnswered,questions_correct:this.lootDashMatchController.lootDashMatchData.questionsAnsweredData.totalQuestionsAnsweredCorrectly,grade:null!==(U=F.grade)&&void 0!==U?U:F.chosenGrade},this.getCommonEventDataProperties()))}sendStageStartedEvent(){if(!this.lootDashMatchController)return;const k=this.lootDashMatchController.lootDashMatchData.stageData[this.lootDashMatchController.currentStageIndex+1];this._currentLootDashStageId=nt.$.generateUID();const{instanceType:B,instanceId:U}=this.getInstanceData();Be.track("Wizard Dash Stage Started",Object.assign({event_text:"Wizard Dash Stage Started",instance_type:B,instance_id:U,stage_id:this._currentLootDashStageId,stage_number:this.lootDashMatchController.currentStageIndex+1,stage_type:this.lootDashMatchController.lootDashMatchData.currentStage.stageType,next_stage:k?k.stageIndex+1:"last_stage",total_stages:this.lootDashMatchController.totalStages,total_waves:this.lootDashMatchController.numWavesInCurrentStage,revives_remaining:this.filterRevivesRemaining(this.lootDashMatchController.revivesRemaining)},this.getCommonEventDataProperties()))}sendStageCompletedEvent(){if(!this.lootDashMatchController)return;const{instanceType:k,instanceId:B}=this.getInstanceData();Be.track("Wizard Dash Stage Completed",Object.assign({event_text:"Wizard Dash Stage Completed",instance_type:k,instance_id:B,stage_id:this._currentLootDashStageId,stage_number:this.lootDashMatchController.currentStageIndex+1,stage_type:this.lootDashMatchController.lootDashMatchData.currentStage.stageType,total_stages:this.lootDashMatchController.totalStages,total_waves:this.lootDashMatchController.numWavesInCurrentStage,loot_bags:this.lootDashMatchController.lootDashMatchData.lootBagData,revives_remaining:this.filterRevivesRemaining(this.lootDashMatchController.revivesRemaining),questions_answered:this.lootDashMatchController.lootDashMatchData.questionsAnsweredData.questionsAnsweredThisStage,questions_correct:this.lootDashMatchController.lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisStage},this.getCommonEventDataProperties()))}sendWaveStartedEvent(){if(!this.lootDashMatchController)return;this._currentLootDashWaveId=nt.$.generateUID();const{instanceType:k,instanceId:B}=this.getInstanceData();Be.track("Wizard Dash Wave Started",Object.assign({event_text:"Wizard Dash Wave Started",instance_type:k,instance_id:B,stage_id:this._currentLootDashStageId,stage_number:this.lootDashMatchController.currentStageIndex+1,wave_id:this._currentLootDashWaveId,wave_number:this.lootDashMatchController.currentWaveIndex+1,total_waves:this.lootDashMatchController.numWavesInCurrentStage,revives_remaining:this.filterRevivesRemaining(this.lootDashMatchController.revivesRemaining)},this.getCommonEventDataProperties()))}sendWaveCompletedEvent(){if(!this.lootDashMatchController)return;const{instanceType:k,instanceId:B}=this.getInstanceData();Be.track("Wizard Dash Wave Completed",Object.assign({event_text:"Wizard Dash Wave Completed",instance_type:k,instance_id:B,stage_id:this._currentLootDashStageId,stage_number:this.lootDashMatchController.currentStageIndex+1,wave_id:this._currentLootDashWaveId,wave_number:this.lootDashMatchController.currentWaveIndex+1,total_waves:this.lootDashMatchController.numWavesInCurrentStage,loot_bags:this.lootDashMatchController.lootDashMatchData.lootBagData,revives_remaining:this.filterRevivesRemaining(this.lootDashMatchController.revivesRemaining),questions_answered:this.lootDashMatchController.lootDashMatchData.questionsAnsweredData.questionsAnsweredThisWave,questions_correct:this.lootDashMatchController.lootDashMatchData.questionsAnsweredData.questionsAnsweredCorrectlyThisWave},this.getCommonEventDataProperties()))}sendMathStreakContinuedEvent(k){if(!this.lootDashMatchController)return;const{instanceType:B,instanceId:U}=this.getInstanceData();Be.track("Wizard Dash Math Streak Continued",Object.assign({event_text:"Wizard Dash Math Streak Continued",instance_type:B,instance_id:U,stage_number:this.lootDashMatchController.currentStageIndex+1,wave_number:this.lootDashMatchController.currentWaveIndex+1,current_streak:k,loot_bags:this.lootDashMatchController.lootDashMatchData.lootBagData},this.getCommonEventDataProperties()))}sendMathStreakResetEvent(k){if(!this.lootDashMatchController)return;const{instanceType:B,instanceId:U}=this.getInstanceData();Be.track("Wizard Dash Math Streak Reset",Object.assign({event_text:"Wizard Dash Math Streak Reset",instance_type:B,instance_id:U,stage_number:this.lootDashMatchController.currentStageIndex+1,wave_number:this.lootDashMatchController.currentWaveIndex+1,previous_streak:k,loot_bags:this.lootDashMatchController.lootDashMatchData.lootBagData},this.getCommonEventDataProperties()))}sendReviveUsedEvent(){if(!this.lootDashMatchController)return;const{instanceType:k,instanceId:B}=this.getInstanceData();Be.track("Wizard Dash Revive Used",Object.assign({event_text:"Wizard Dash Revive Used",instance_type:k,instance_id:B,stage_number:this.lootDashMatchController.currentStageIndex+1,wave_number:this.lootDashMatchController.currentWaveIndex+1,revives_remaining:this.filterRevivesRemaining(this.lootDashMatchController.revivesRemaining)},this.getCommonEventDataProperties()))}sendNoMoreRevivesEvent(){if(!this.lootDashMatchController)return;const{instanceType:k,instanceId:B}=this.getInstanceData();Be.track("Wizard Dash No More Revives",Object.assign({event_text:"Wizard Dash No More Revives",instance_type:k,instance_id:B,stage_number:this.lootDashMatchController.currentStageIndex+1,wave_number:this.lootDashMatchController.currentWaveIndex+1},this.getCommonEventDataProperties()))}getInstanceData(k=!1){var B;const U=this.lootDashMatchController.matchType;let F=tt.N.LootDash,G=this._currentLootDashMatchId;return k&&(G=this._segment.featureCommon.getInstanceId(J.B.LootDashMenu)),U===Yt.B1.QuickQuiz&&(F=tt.N.LootDashQuickQuiz,G=null===(B=Qt.w.instance().currentAssignmentId)||void 0===B?void 0:B.toString()),{instanceType:F,instanceId:G}}filterRevivesRemaining(k){return k===zt.eA?void 0:k}}var Zt=U(215);class Jt extends it.v{get currentTransactionID(){return this._currentTransactionID}constructor(k,B,U){super(k,B,U)}sendPlayerNameUpdatedEvent(k,B,U=null){const F=Object.assign(Object.assign({player_name:k,selected_from:B},U),this.getCommonEventDataProperties());Be.track("Player Name Updated",F)}sendPlayerAvatarUpdatedEvent(k,B,U=null){this._currentTransactionID=nt.$.generateUID();const F=Object.assign(Object.assign({feature:k,selection:B,transaction_id:this.currentTransactionID},U),this.getCommonEventDataProperties());Be.track("Player Avatar Updated",F)}sendEmoteUsedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("Emote Used",U)}sendEmoteFailedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),{funnel_id:"Member Locked"===k.fail_reason?this._segment.purchase.getFunnelID():null}),B),this.getCommonEventDataProperties());Be.track("Emote Failed",U)}}var te=U(83668),ee=U(19464);class ie extends it.v{getCurrentRunInstanceID(k){var B;return null!==(B=this._currentRunInstanceID.get(k))&&void 0!==B?B:""}constructor(k,B,U){super(k,B,U),this._currentRunInstanceID=new Map,this._currentTowerRunData=null,this._currentTowerRunData={towerRunStartTime:0,towerRunFloorStartTime:0,numberOfCompletedFloors:0}}sendCrystalCavernsEnteredEvent(k,B=null){this._currentRunInstanceID.set(tt.N.CrystalCaverns,nt.$.generateUID());const U=Object.assign(Object.assign({instance_id:this._currentRunInstanceID.get(tt.N.CrystalCaverns),instance_origin:k},B),this.getCommonEventDataProperties());Be.track("Crystal Caverns Entered",U)}sendCrystalCavernsParticipantsEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({instance_id:this._currentRunInstanceID.get(tt.N.CrystalCaverns)},k),B),this.getCommonEventDataProperties());Be.track("Crystal Caverns Participants",U)}sendCrystalCavernsMilestoneReachedEvent(k,B=null){const U=this._activePlayer.player.state.getDungeonState(te.o,"crystal_caverns"),F=Object.assign(Object.assign({instance_id:this._currentRunInstanceID.get(tt.N.CrystalCaverns),milestone_type:k,milestone:k===ee.lT.Complete?k:null==U?void 0:U.getCurrentMap()},B),this.getCommonEventDataProperties());Be.track("Crystal Caverns Milestone Reached",F)}sendCrystalCavernsCompletedEvent(k,B=null){const U=Object.assign(Object.assign({instance_id:this._currentRunInstanceID.get(tt.N.CrystalCaverns),outcome:k},B),this.getCommonEventDataProperties());Be.track("Crystal Caverns Completed",U)}sendArchivesRunStartedEvent(k=null){this._currentRunInstanceID.set(tt.N.Archives,nt.$.generateUID());const B=Object.assign(Object.assign({instance_id:this._currentRunInstanceID.get(tt.N.Archives)},k),this.getCommonEventDataProperties());Be.track("Archives Run Started",B)}sendArchivesRunCompletedEvent(k,B=null){const U=Object.assign(Object.assign({instance_id:this._currentRunInstanceID.get(tt.N.Archives),golden_pages:k},B),this.getCommonEventDataProperties());Be.track("Archives Run Completed",U)}sendTowerRunStartedEvent(k,B,U=null){this._currentRunInstanceID.set(tt.N.TowerRun,nt.$.generateUID()),this._currentTowerRunData={towerRunStartTime:Date.now(),towerRunFloorStartTime:0,numberOfCompletedFloors:0};const F=Object.assign(Object.assign({tower_type:k,is_complete:B,instance_id:this._currentRunInstanceID.get(tt.N.TowerRun)},U),this.getCommonEventDataProperties());Be.track("Tower Run Started",F)}sendTowerRunFloorStartedEvent(k,B=null){if(void 0===this._currentRunInstanceID.get(tt.N.TowerRun))return;this._currentTowerRunData.towerRunFloorStartTime=Date.now();const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),{instance_id:this._currentRunInstanceID.get(tt.N.TowerRun)}),B),this.getCommonEventDataProperties());Be.track("Tower Floor Started",U)}sendTowerRunFloorCompletedEvent(k,B=null){if(void 0===this._currentRunInstanceID.get(tt.N.TowerRun))return;this._currentTowerRunData.numberOfCompletedFloors++;const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),{instance_id:this._currentRunInstanceID.get(tt.N.TowerRun),duration:(Date.now()-this._currentTowerRunData.towerRunFloorStartTime)/Q.s.SECONDS_TO_MILLISECONDS_MULTIPLIER}),B),this.getCommonEventDataProperties());Be.track("Tower Floor Completed",U)}sendTowerRunCompletedEvent(k,B,U=null){if(void 0===this._currentRunInstanceID.get(tt.N.TowerRun))return;const F=Object.assign(Object.assign({tower_type:k,is_complete:B,floors_completed:this._currentTowerRunData.numberOfCompletedFloors,duration:(Date.now()-this._currentTowerRunData.towerRunStartTime)/Q.s.SECONDS_TO_MILLISECONDS_MULTIPLIER,instance_id:this._currentRunInstanceID.get(tt.N.TowerRun)},U),this.getCommonEventDataProperties());Be.track("Tower Run Completed",F)}}var se=U(96810);class ne extends it.v{constructor(k,B,U){super(k,B,U)}sendFloatlingTowerCreatedEvent(k,B=null){const U=Object.assign(Object.assign({tower_id:k},B),this.getCommonEventDataProperties());Be.track("Floatling Tower Created",U)}sendFloatlingTowerCompletedEvent(k,B,U=null){const F=Object.assign(Object.assign({tower_id:k,floors:B},U),this.getCommonEventDataProperties());Be.track("Floatling Tower Completed",F)}sendFloatlingFloorCreatedEvent(k,B=null){const U=Object.assign(Object.assign({tower_id:k.towerID,floor_id:k.floorID,infinity_floor:k.isInfinityFloor,algorithm:k.isInfinityFloor?k.algorithmType:"NULL"},B),this.getCommonEventDataProperties());Be.track("Floatling Floor Created",U)}sendFloatlingRoomBuiltEvent(k,B=null){const U=Object.assign(Object.assign({tower_id:k.towerID,floor_id:k.floorID,room_id:k.roomID,room_type:k.roomType,room_border:k.roomBorder,decoration1:k.decorations[0],decoration2:k.decorations[1],decoration3:k.decorations[2],decoration4:k.decorations[3],decoration5:k.decorations[4]},B),this.getCommonEventDataProperties());Be.track("Floatling Room Built",U)}sendFloatlingCreatedEvent(k,B,U=null){const F=Object.assign(Object.assign({floatling_type:k,count:B},U),this.getCommonEventDataProperties());Be.track("Floatling Created",F)}}class ae extends it.v{getCurrentQuestInstanceID(){return this._currentQuestData?this._currentQuestData.instanceID:""}getCurrentQuestTransactionID(){return this._currentQuestData?this._currentQuestData.transactionID:""}constructor(k,B,U){super(k,B,U),this._funnelNamesAndStepIDs=[],this._currentQuestData=null,this.towerTownEvents=new ne(this._segment,this._uuidProvider,this._activePlayer),this._currentQuestData={instanceID:"",transactionID:""}}clearPlayerProgressionDataForFunnelName(k){this._funnelNamesAndStepIDs=this._funnelNamesAndStepIDs.filter((B=>B.funnelName!==k))}sendFunnelAdvancedEvent(k,B=null,U=!1){var F;const j=Object.values(se.l).indexOf(k.stepName),$=null===(F=this._funnelNamesAndStepIDs.find((B=>B.funnelName===k.funnelName)))||void 0===F?void 0:F.stepIndex.includes(j);if(!G.Aq$.isDefined($)||!$||U){const U=Object.assign(Object.assign({funnel_name:k.funnelName,funnel_type:k.funnelType,funnel_id:k.funnelId,step_name:k.stepName,step_index:j},B),this.getCommonEventDataProperties());Be.track("Funnel Advanced",U),this.savePlayerProgressionFunnelData(k.funnelName,j)}}sendAfterSchoolWidgetFunnelAdvancedEvent(k){const B=Object.assign({funnel_name:k.funnelName,funnel_type:k.funnelType,funnel_id:k.funnelId,step_name:k.stepName,step_index:k.stepIndex},this.getCommonEventDataProperties());Be.track("Funnel Advanced",B),this.savePlayerProgressionFunnelData(k.funnelName,k.stepIndex)}sendPetHardCurrencyFunnelAdvancedEventIfApplicable(k,B,U){G.Aq$.isDefined(U)&&!Y.q.instance.prodigy.gameContainer.get("5c7-e02d").petAcquisitionCost(U,k)||this.sendFunnelAdvancedEvent({funnelType:"feature",funnelName:"pet_hard_currency",stepName:B,funnelId:k})}savePlayerProgressionFunnelData(k,B){(0,lt.v)(!!this._funnelNamesAndStepIDs,"Segment player progression funnel is undefined");const U=this._funnelNamesAndStepIDs.findIndex((B=>B.funnelName===k));if(U<0){const U={funnelName:k,stepIndex:[B]};this._funnelNamesAndStepIDs.push(U)}else this._funnelNamesAndStepIDs[U].stepIndex.push(B)}sendPlayerProgressionPointsEarnedEvent(k,B,U=null){const F=Object.assign(Object.assign({point_type:k.pointType,point_count:k.pointCount,progression_type:k.progressionType,name:k.creatureName,instance_type:B.instanceType,instance_id:B.instanceID},U),this.getCommonEventDataProperties());Be.track("Player Progression Points Earned",F)}sendPlayerProgressionAdvancedEvent(k,B,U=null){const F=Object.assign(Object.assign({progression_type:k.progressionType,progression_subtype:k.progressionSubType,progression_value:k.progressionNewValue,previous_value:k.progressionPreviousValue,name:k.creatureName,transaction_id:k.transactionId,point_type:null==B?void 0:B.pointType,point_amount:null==B?void 0:B.pointCount},U),this.getCommonEventDataProperties());Be.track("Player Progression Advanced",F)}sendPlayerProgressionRestrictedEvent(k,B,U=null){const F=Object.assign(Object.assign({progression_type:k.progressionType,progression_action:k.progressionAction,progression_value:k.progressionValue,name:k.creatureName,point_type:null==B?void 0:B.pointType,point_amount:null==B?void 0:B.pointCount,currency:k.currencyType,price:k.currencyAmount},U),this.getCommonEventDataProperties());Be.track("Player Progression Restricted",F)}sendQuestProgressionAdvancedEvent(k,B=null){this._currentQuestData={instanceID:`${k.quest_type}-${k.quest_id}`,transactionID:nt.$.generateUID()};const U=Object.assign(Object.assign(Object.assign(Object.assign({},k),{transaction_id:this.getCurrentQuestTransactionID()}),B),this.getCommonEventDataProperties());Be.track("Quest Progression Advanced",U)}sendPetEvolvedEvent(k,B=null){const U=Object.assign(Object.assign({name:k.petName,old_name:k.petOldName,pet_level:k.petLevel,pet_type:k.petType,pet_rank:k.petRank,evolution_source:k.evolutionSource},B),this.getCommonEventDataProperties());Be.track("Pet Evolved",U)}sendPetEvolutionCancelledEvent(k,B=null){const U=Object.assign(Object.assign({name:k.petName,type:k.petElement,pet_level:k.petLevel,pet_rank:k.petRank,evolution_source:k.evolutionSource},B),this.getCommonEventDataProperties());Be.track("Pet Evolution Cancelled",U)}sendGoalProgressUpdatedEvent(k,B=null){const U=Object.assign(Object.assign({goal_name:k.goalName,goal_id:k.goalId,deadline:k.deadline,target_type:k.targetType,goal_progress:k.goalProgress,goal_target:k.goalTarget},B),this.getCommonEventDataProperties());Be.track("Goal Progress Updated",U)}sendFeatureUnlockedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("Feature Unlocked",U)}}var re,oe=U(47632);!function(k){k.Q1="QUESTS_BONFIRE_SPIRE_PULL_LEVER",k.Q2="QUESTS_BONFIRE_SPIRE_PULL_LEVER",k.Q3="QUESTS_BONFIRE_SPIRE_PULL_LEVER",k.Q4="QUESTS_BONFIRE_RETRIEVE_INGREDIENT",k.Q5="QUESTS_BONFIRE_SPIRE_ADD_INGREDIENT",k.Q6="QUESTS_BONFIRE_SPIRE_ATTEND_DINNER",k.Q7="QUESTS_BONFIRE_COLLECT_COOKING_SUPPLIES",k.Q8="QUESTS_BONFIRE_SPIRE_TALK_TO_GUARDS",k.Q9="QUESTS_BONFIRE_SPIRE_SAVE_GATHERERS",k.Q10="QUESTS_BONFIRE_SPIRE_OFFER_DISH",k.Q11="QUESTS_BONFIRE_SPIRE_FIND_KEY",k.Q12="QUESTS_BONFIRE_SPIRE_UNLOCK_CHEST",k.Q13="QUESTS_BONFIRE_SPIRE_DEFEAT_CHEF",k.Q14="QUESTS_BONFIRE_SPIRE_TALK_TO_QUEEN"}(re||(re={}));var he,ce,de,le=U(72326);!function(k){k.Q1="QUESTS_SHIPWRECK_FIND_BREATHING_BUBBLE",k.Q2="QUESTS_SHIPWRECK_FIND_JIM",k.Q3="QUESTS_SHIPWRECK_FIND_MONSTER",k.Q4="QUESTS_SHIPWRECK_ACQUIRE_INK_SAMPLE",k.Q5="QUESTS_SHIPWRECK_CLEAR_INK",k.Q6="QUESTS_SHIPWRECK_FIND_JIM",k.Q7="QUESTS_SHIPWRECK_GET_CAMERA",k.Q8="QUESTS_SHIPWRECK_TAKE_PICTURE",k.Q9="QUESTS_SHIPWRECK_OPEN_DOOR",k.Q10="QUESTS_SHIPWRECK_DEFEAT_MONSTERS",k.Q11="QUESTS_SHIPWRECK_DEFEAT_BOSS"}(he||(he={})),function(k){k.Q1="QUESTS_SHIVERCHILL_CLEAR_FURNACE",k.Q2="QUESTS_SHIVERCHILL_GET_FUEL",k.Q3="QUESTS_SHIVERCHILL_ACTIVATE_FURNACE",k.Q4="QUESTS_SHIVERCHILL_EXPLORE_CAVES",k.Q5="QUESTS_SHIVERCHILL_FIND_SHOVEL",k.Q6="QUESTS_SHIVERCHILL_HELP_MINER",k.Q7="QUESTS_SHIVERCHILL_UNKNOWN",k.Q8="QUESTS_SHIVERCHILL_DEFEAT_MINI_BOSS",k.Q9="QUESTS_SHIVERCHILL_DEFEAT_SPECTERS",k.Q10="QUESTS_SHIVERCHILL_GET_FUEL",k.Q11="QUESTS_SHIVERCHILL_ACTIVATE_FURNACE",k.Q12="QUESTS_SHIVERCHILL_CHECK_THRONE",k.Q13="QUESTS_SHIVERCHILL_COLLECT_CRYSTALS",k.Q14="QUESTS_SHIVERCHILL_DEFEAT_ICE_WORM",k.Q15="QUESTS_SHIVERCHILL_ACTIVATE_FURNACE",k.Q16="QUESTS_SHIVERCHILL_GET_GEM"}(ce||(ce={})),function(k){k.Q1="QUESTS_SKYWATCH_TRIM_VINES",k.Q2="QUESTS_SKYWATCH_GET_DEVICE",k.Q3="QUESTS_SKYWATCH_FIND_BROCCOLINI",k.Q4="QUESTS_SKYWATCH_TRIM_VINES",k.Q5="QUESTS_SKYWATCH_FIND_FACTORY_KEY",k.Q6="QUESTS_SKYWATCH_GET_KEY",k.Q7="QUESTS_SKYWATCH_UPGRADE_VINECERATOR",k.Q8="QUESTS_SKYWATCH_TRIM_VINES",k.Q9="QUESTS_SKYWATCH_TRIM_VINES",k.Q10="QUESTS_SKYWATCH_TRIM_VINES",k.Q11="QUESTS_SKYWATCH_FIND_EUGENE",k.Q12="QUESTS_SKYWATCH_FIND_KEY",k.Q13="QUESTS_SKYWATCH_DEFEAT_BOSS"}(de||(de={}));class ue extends it.v{setup(){super.setup()}get questEventTransaction(){var k;return null!==(k=this._questEventTransaction)&&void 0!==k?k:{flush(){G.VyI.log("Attempted to flush non-existing quest event transaction",G.$bb.Error)},setIndividualData(){}}}beginQuestEventTransaction(){return this._questEventTransaction=this._segment.item.beginSecureItemTransaction(),this._questEventTransaction}sendZoneQuestStartedEvent(k,B){var U,F;const j=this.getQuestStep(k,B);j?null===(F=null===(U=this._segment)||void 0===U?void 0:U.playerProgression)||void 0===F||F.sendQuestProgressionAdvancedEvent({quest_id:String(B),quest_type:"zone_mission",quest_step:j,zone_complete:!1}):G.VyI.log(`No quest analytics key found for zone quest ${k}`,G.$bb.Warning)}sendZoneQuestlineCompleteEvent(k){var B,U,F;const G=null===(B=Y.q.instance.prodigy.world.getZone(k))||void 0===B?void 0:B.finalQuestId;null===(F=null===(U=this._segment)||void 0===U?void 0:U.playerProgression)||void 0===F||F.sendQuestProgressionAdvancedEvent({quest_id:String(G),quest_type:"zone_mission",quest_step:"Quest Complete",zone_complete:!0})}getQuestStep(k,B){switch(k){case Gt.A_.FOREST:case Gt.A_.FORESTHARD:case Gt.A_.FORESTEXPERT:return le.v[`Q${B}`];case Gt.A_.SHIVERCHILL:case Gt.A_.SHIVERCHILLHARD:case Gt.A_.SHIVERCHILLEXPERT:return ce[`Q${B}`];case Gt.A_.BONFIRE:case Gt.A_.BONFIREHARD:case Gt.A_.BONFIREEXPERT:return re[`Q${B}`];case Gt.A_.SHIPWRECK:case Gt.A_.SHIPWRECKHARD:case Gt.A_.SHIPWRECKEXPERT:return he[`Q${B}`];case Gt.A_.SKYWATCH:case Gt.A_.SKYWATCHHARD:case Gt.A_.SKYWATCHEXPERT:return de[`Q${B}`];default:return G.VyI.log(`No quest step found for zone ${k} and task ${B}`,G.$bb.Warning),null}}}var fe=U(74958);class be extends it.v{sendSegmentedOfferAssignedEvent(k,B){var U;Be.track("Segmented Offer Received",Object.assign({event_text:"Segmented Offer Received",event_type:"segmented_offer_received",offer_name:null!==(U=k.campaignId)&&void 0!==U?U:k.id,offer_type:this._activePlayer.isMember()?"upsell":"non_member",offer_segment:JSON.stringify(k.segments[B].featureRequirements),offers_received:this._activePlayer.player.encounters.getResolvedOffers().length},this.getCommonEventDataProperties()))}}class pe{constructor(k,B){this._data={},this._name=k,this._data=B}setData(k){return this._data=Object.assign(Object.assign({},this._data),k),this}send(){(0,lt.v)(!V().some(this._data,V().isNil),`Metric '${this._name}' has null/undefined values for required properties "${V()(this._data).pickBy(V().isNil).keys().value().join('", "')}".`),Be.track(this._name,this._data)}}class ve{constructor(k){this._segment=k}achievementComplete(k){return this.event("Achievement Completed",k)}experimentVariationAssigned(k,B,U,F){const G=Object.assign(Object.assign({experiment_id:k,feature_key:k,experiment_key:B,variation_id:U,user_id:Y.q.instance.prodigy.gameContainer.get("e20-0fb0").getUserID().toString()},F),this._segment.featureCommon.getCommonEventDataProperties());return this.event("Experiment Variation Assigned",H.omitBy(G,H.isNil))}event(k,B){return new pe(k,B)}}class ge extends it.v{constructor(k,B,U){super(k,B,U)}sendStart(){const k=nt.$.generateUID();this._currentPostBattleEvent={id:k,startTime:(0,H.now)()};const B=Object.assign(Object.assign({},this._currentPostBattleEvent),this.getCommonEventDataProperties());Be.track("Post-Battle-Flow-Started",B)}sendEnd(){this._currentPostBattleEvent.endTime=(0,H.now)(),this._currentPostBattleEvent.durationInSeconds=(this._currentPostBattleEvent.endTime-this._currentPostBattleEvent.startTime)/1e3;const k=Object.assign(Object.assign({},this._currentPostBattleEvent),this.getCommonEventDataProperties());Be.track("Post-Battle-Flow-Ended",k)}}var me=U(223);class ye extends it.v{constructor(k,B,U){super(k,B,U),this._funnelQuitPaused=!1;const F=this._activePlayer.player.data.segmentPurchaseFunnel;this._currentPurchaseFunnel="string"==typeof F?{id:F,trigger:void 0,steps:[]}:F}sendFunnelTriggerImpression(k){if(this.shouldSuppressFunnelEvents(k.type,k.category))return;const B=this.generateNewFunnel(k);return Be.track("Game Purchase Funnel Trigger Impression",this.getCommonFunnelEventProperties(B)),B}sendFunnelStart(k,B){this.shouldSuppressFunnelEvents(k.type,k.category)||(Be.track("Game Purchase Funnel Entered",this.getCommonFunnelEventProperties(null!=B?B:this.generateNewFunnel(k))),this.saveFunnelData())}sendFunnelStep(k){this.isFunnelInvalid()||Be.track("Game Purchase Funnel Step Advanced",Object.assign(Object.assign({},this.getCommonFunnelEventProperties(this._currentPurchaseFunnel)),{funnel_step:k,funnel_index:this.setFunnelCurrentStep(k)}))}sendFunnelError(k,B,U){if(this.isFunnelInvalid())return;let F="";switch(typeof U){case"string":F=U;break;case"object":"string"==typeof(null==U?void 0:U.message)&&(F=U.message)}Be.track("Game Purchase Funnel Step Error",Object.assign(Object.assign({},this.getCommonFunnelEventProperties(this._currentPurchaseFunnel)),{funnel_step:k,funnel_index:this.setFunnelCurrentStep(k),error_code:B,error_reason:F}))}sendFunnelQuit(k,B){this.isFunnelInvalid()||this._funnelQuitPaused||(Be.track("Game Purchase Funnel Quit",Object.assign(Object.assign({},this.getCommonFunnelEventProperties(this._currentPurchaseFunnel)),{funnel_step:k,funnel_index:this.setFunnelCurrentStep(k),exit_cause:B})),this.clearFunnelData())}sendFunnelHandoff(k,B){var U,F,G,j;this.isFunnelInvalid()||((0,lt.v)(this._currentPurchaseFunnel,"Funnel should exist if it is valid"),null!==(U=(j=this._currentPurchaseFunnel).purchase)&&void 0!==U||(j.purchase=B),Be.track("Game Purchase Funnel Hand Off",Object.assign(Object.assign({},this.getCommonFunnelEventProperties(this._currentPurchaseFunnel)),{trigger_tier:null===(F=this._currentPurchaseFunnel.purchase)||void 0===F?void 0:F.triggerTier,purchase_order:null===(G=this._currentPurchaseFunnel.purchase)||void 0===G?void 0:G.purchaseOrder,target:k})))}sendFunnelComplete(k){var B,U,F,G,j,$;if(this.detectFunnelCallError(!1))return;const H=this.getCommonEventDataProperties();Be.track("Game Purchase Funnel Complete",{difficulty_tier:H.difficulty_tier,funnel_id:null===(B=this._currentPurchaseFunnel)||void 0===B?void 0:B.id,session_uuid:this._segment.getSessionUUID(),trigger_tier:null!==(U=null==k?void 0:k.triggerTier)&&void 0!==U?U:null===(G=null===(F=this._currentPurchaseFunnel)||void 0===F?void 0:F.purchase)||void 0===G?void 0:G.triggerTier,purchase_order:(null==k?void 0:k.purchaseOrder)&&k.purchaseOrder.length>1?k.purchaseOrder:null===($=null===(j=this._currentPurchaseFunnel)||void 0===j?void 0:j.purchase)||void 0===$?void 0:$.purchaseOrder}),this.clearFunnelData()}clearFunnelData(){this._activePlayer.player.data.segmentPurchaseFunnel=void 0,this._currentPurchaseFunnel=void 0,this._funnelQuitPaused=!1}hasSavedFunnelData(){return!!this._currentPurchaseFunnel}generateNewFunnel(k){var B;return this._currentPurchaseFunnel={id:nt.$.generateUID(),trigger:k,steps:[],impressionId:null!==(B=null==k?void 0:k.impressionId)&&void 0!==B?B:nt.$.generateUID()}}setFunnelCurrentStep(k){(0,lt.v)(this._currentPurchaseFunnel,"Segment purchase funnel is undefined");const B=this._currentPurchaseFunnel.steps,U=B.indexOf(k);return U>=0?B.length=U+1:B.push(k)}getFunnelID(){var k;return null===(k=this._currentPurchaseFunnel)||void 0===k?void 0:k.id}pauseFunnelQuit(k){this._funnelQuitPaused=k}getCommonFunnelEventProperties(k){var B,U,F,G,j,$;return Object.assign(Object.assign({},this.getCommonEventDataProperties()),{funnel_id:null==k?void 0:k.id,trigger:null===(B=null==k?void 0:k.trigger)||void 0===B?void 0:B.type,trigger_category:null===(U=null==k?void 0:k.trigger)||void 0===U?void 0:U.category,trigger_content_type:null===(F=null==k?void 0:k.trigger)||void 0===F?void 0:F.contentType,trigger_content_id:null===(G=null==k?void 0:k.trigger)||void 0===G?void 0:G.contentId,ad_type:null===(j=null==k?void 0:k.trigger)||void 0===j?void 0:j.adType,ad_version:null===($=null==k?void 0:k.trigger)||void 0===$?void 0:$.adVersion,impression_id:null==k?void 0:k.impressionId})}detectFunnelCallError(k=!0){return!(this._currentPurchaseFunnel&&(!k||this._currentPurchaseFunnel.trigger))&&(G.VyI.log("Segment purchase funnel tracking call sent outside of a purchase funnel",G.$bb.Error),!0)}saveFunnelData(){(0,lt.v)(this._currentPurchaseFunnel,"Segment purchase funnel is undefined");const k=this._activePlayer.player;k.data.segmentPurchaseFunnel=this._currentPurchaseFunnel,k.forceSaveCharacter()}shouldSuppressFunnelEvents(k,B){const U=this._activePlayer.player;if(U.isPlayingAtSchool())return!0;switch(k){case"magicoin_currency_button":return!(0,ot.G)(me.l).enabled;case"visited_mythics_pet_book_upgrade":return!1;default:return U.hasMembership()}}isFunnelInvalid(){var k,B,U,F;return this.shouldSuppressFunnelEvents(null===(B=null===(k=this._currentPurchaseFunnel)||void 0===k?void 0:k.trigger)||void 0===B?void 0:B.type,null===(F=null===(U=this._currentPurchaseFunnel)||void 0===U?void 0:U.trigger)||void 0===F?void 0:F.category)||this.detectFunnelCallError()}}var _e=U(71586),Ee=U(13956),we=U(80105);class Te extends it.v{sendServerSessionStartedEvents(){this.sendPetRosterEvent(),this.sendCurrencyEvent()}sendSessionStartedEvent(k=null){var B,U,F;const j=this._playerProvider.player,$=Y.q.instance.prodigy.gameContainer.get("313-bcd5"),H=Y.q.instance.prodigy.gameContainer.get("c47-20b6"),V={clientVersion:Y.q.instance.prodigy.version,device_hardware_type:G.o5U.getDeviceHardwareType(),device_height:H.getDeviceInfoProvider().getScreenHeight(),device_width:H.getDeviceInfoProvider().getScreenWidth(),device_platform:H.getDeviceInfoProvider().getPlatformName(),device_os_version:G.o5U.getOsName(),timezone_offset:_e.R.SERVER_PLAYER_TIMEZONE_OFFSET,geo_country:null===(B=j.geolocationData.country)||void 0===B?void 0:B.name,geo_state:null===(F=null===(U=j.geolocationData.subdivisions)||void 0===U?void 0:U[0])||void 0===F?void 0:F.name,equipped_gear:j.equipment.getData(),pet_slots_used:j.kennel.getNumPets(),is_pwa:$.isPWAInstalled(),is_mobile_app:G.o5U.isMobile(),currency:this.formatCurrencyValues(j),pet_team:this.formatPetTeam(j),device_pixel_ratio:window.devicePixelRatio},W=Object.assign(Object.assign(Object.assign({},V),k),this.getCommonEventDataProperties());Be.track("Session Started",W)}sendPetRosterEvent(){const k=this._playerProvider.player.kennel.getPets(),B=new Set,U=new Set;let F=0;k.forEach((k=>{var j;if(G.Aq$.isDefined(k.ID)){B.add(k.ID);const G=null!==(j=k.mergeRank)&&void 0!==j?j:0;F+=G,G>=1&&U.add(k.ID)}}));const j=Object.assign({roster_size:k.length,roster_size_unique:B.size,roster_merge_rank:F,roster_merge_unique:U.size},this.getCommonEventDataProperties());Be.track("Session Start Pet Roster",j)}sendCurrencyEvent(){var k,B;const U=this._playerProvider.player,F={};U.backpack.getBackpackItemsByType("currency").forEach((k=>{F[k.ID]=U.getCurrencyAmount(k.ID)})),this._secureInventory.getAllOfType("currency").forEach((k=>{F[k.id]=k.quantity})),F[1]=U.getCurrencyAmount(1,"gold");const G=Object.assign({magicoin_balance:null!==(k=F[27])&&void 0!==k?k:0,gold_balance:F[1],titan_shard_balance:null!==(B=F[11])&&void 0!==B?B:0,summary_balance:F},this.getCommonEventDataProperties());Be.track("Session Start Currency",G)}formatCurrencyValues(k){const B=k.backpack.getBackpackItemsByType("currency"),U=[];return B.forEach((k=>{const B=St.t.itemMap[`currency-${k.ID}`].name;U.push({currencyName:B,currencyID:k.ID,currencyValue:k.N})})),U}formatPetTeam(k){let B=k.kennel.petTeam;B=B.filter((k=>null!==k));const U=[];return B.forEach((k=>{"player"!==k.creatureType&&U.push({petID:k.data.ID,creatureType:k.creatureType,level:k.getLevel(),maxHearts:k.getMaxHearts()})})),U}}(0,F.Cg)([(0,Ee.b)("e20-0fb0"),(0,F.Sn)("design:type",X.E)],Te.prototype,"_playerProvider",void 0),(0,F.Cg)([(0,Ee.b)("61f-37d6"),(0,F.Sn)("design:type",we.U)],Te.prototype,"_secureInventory",void 0);class Se extends it.v{getCurrentShopInstanceID(){return this._currentShopData?this._currentShopData.instanceID:""}getCurrentShopTransactionID(){return this._currentShopData?this._currentShopData.transactionID:""}getDynamicStoreSourceId(k){return`shop_v3_${k}`}constructor(k,B,U){super(k,B,U),this._currentShopData=null,this._currentShopData={instanceID:"",transactionID:""}}sendShopPurchaseCompletedEvent(k,B,U,F=!1,G={}){var j,$,H,V,W,q,K;const z=`${k}${B.getName()}`,Y=St.t.getItem(U.getType(),U.getID()),Q=U.getCost()[0];this._currentShopData={instanceID:z,transactionID:nt.$.generateUID()};const X=St.t.getItem(null!==(j=Q.getType())&&void 0!==j?j:"currency",Q.getID()),Z=Object.assign(Object.assign({shop_name:B.getName(),shop_id:z,item_id:U.getID(),item_name:null!==($=null==Y?void 0:Y.name)&&void 0!==$?$:"",item_type:U.getType(),item_unlock_level:null!==(V=null===(H=null==Y?void 0:Y.data)||void 0===H?void 0:H.lockLevel)&&void 0!==V?V:1,currency:null!==(q=null===(W=null==X?void 0:X.data)||void 0===W?void 0:W.name)&&void 0!==q?q:Q.getType(),price:Q.getAmount(),is_member_lock:!!(null===(K=null==Y?void 0:Y.data)||void 0===K?void 0:K.member),is_magicoin_boosted:F,instance_type:tt.N.Interface,instance_id:this._segment.featureCommon.getCurrentInterfaceID(z),transaction_id:this.getCurrentShopTransactionID()},G),this.getCommonEventDataProperties());this.sendShopQuestEvent(Wt.T.PURCHASE_ITEM,Z),Be.track("Shop Purchase Completed",Z)}startDynamicStoreTransaction(k){return this._currentShopData={instanceID:k,transactionID:nt.$.generateUID()},this._currentShopData.transactionID}sendDynamicStorePurchaseCompletedEvent(k){var B;const U=St.t.getItem(k.itemType,k.itemId),F=Object.assign(Object.assign(Object.assign({},this.extractCommonStoreData(k)),{is_member_locked:!!(null===(B=null==U?void 0:U.data)||void 0===B?void 0:B.member),transaction_id:this.getCurrentShopTransactionID()}),this.getCommonEventDataProperties());this.sendShopQuestEvent(Wt.T.PURCHASE_ITEM,k),Be.track("Shop Purchase Completed",F)}sendShopItemViewedEvent(k,B,U,F={}){var G,j,$,H,V;const W=`${k}${B.getName()}`,q=St.t.getItem(U.getType(),U.getID()),K=U.getCost()[0],z=St.t.getItem(null!==(G=K.getType())&&void 0!==G?G:"currency",K.getID()),Y=Object.assign(Object.assign({shop_name:B.getName(),shop_id:W,item_id:U.getID(),item_name:null==q?void 0:q.name,item_type:U.getType(),instance_type:tt.N.Interface,instance_id:this._segment.featureCommon.getCurrentInterfaceID(W),item_unlock_level:null===(j=null==q?void 0:q.data)||void 0===j?void 0:j.lockLevel,is_owned:this._activePlayer.player.backpack.hasItem(U.getType(),U.getID()),currency:null!==(H=null===($=null==z?void 0:z.data)||void 0===$?void 0:$.name)&&void 0!==H?H:K.getType(),price:K.getAmount(),is_member_lock:!!(null===(V=null==q?void 0:q.data)||void 0===V?void 0:V.member)},F),this.getCommonEventDataProperties());Be.track("Shop Item Viewed",Y)}sendDynamicStoreItemViewedEvent(k){const B=Object.assign(Object.assign(Object.assign({},this.extractCommonStoreData(k)),{is_owned:k.isOwned}),this.getCommonEventDataProperties());Be.track("Shop Item Viewed",B)}sendShopPurchaseFailedEvent(k,B,U,F,G={}){var j,$,H,V,W,q;const K=`${k}${B.getName()}`,z=St.t.getItem(U.getType(),U.getID()),Y=U.getCost()[0],Q=St.t.getItem(null!==(j=Y.getType())&&void 0!==j?j:"currency",Y.getID()),X=Object.assign(Object.assign({shop_name:B.getName(),shop_id:K,fail_reason:F,item_id:U.getID(),item_name:null!==($=null==z?void 0:z.name)&&void 0!==$?$:"",item_type:U.getType(),item_unlock_level:null===(H=null==z?void 0:z.data)||void 0===H?void 0:H.lockLevel,is_member_lock:!!(null===(V=null==z?void 0:z.data)||void 0===V?void 0:V.member),currency:null!==(q=null===(W=null==Q?void 0:Q.data)||void 0===W?void 0:W.name)&&void 0!==q?q:Y.getType(),price:Y.getAmount(),funnel_id:this._segment.purchase.getFunnelID(),instance_type:tt.N.Interface,instance_id:this._segment.featureCommon.getCurrentInterfaceID(K)},G),this.getCommonEventDataProperties());Be.track("Shop Purchase Failed",X)}sendDynamicStorePurchaseFailedEvent(k){k.failReason===wt.WE.NotEnoughCurrency&&this._segment.item.sendInsufficientCurrencyEvent(k.cost,{sink_type:k.itemType,sink_id:k.itemId,transaction_id:this._segment.shop.getCurrentShopTransactionID()});const B=Object.assign(Object.assign(Object.assign({},this.extractCommonStoreData(k)),{fail_reason:k.failReason,funnel_id:k.funnelId}),this.getCommonEventDataProperties());Be.track("Shop Purchase Failed",B)}sendShopQuestEvent(k,B){var U,F,j;const $={params:{taskEventType:qt.Z7.Shop,shopID:null!==(U=B.shop_id)&&void 0!==U?U:B.storeKey,shopName:null!==(F=B.shop_name)&&void 0!==F?F:B.storeKey,shopCategory:null!==(j=B.categoryId)&&void 0!==j?j:B.category}};Y.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(k,$).catch(G.RQr.createHandler(`Error sending ${k} event`))}extractCommonStoreData(k){var B,U,F,G,j,$,H,V,W,q;const K=St.t.getItem(k.itemType,k.itemId),z=St.t.getItem(null!==(B=k.cost.type)&&void 0!==B?B:"currency",k.cost.currency);return{shop_name:k.storeKey,shop_id:this.getDynamicStoreSourceId(k.storeKey),category:k.category,is_member_locked:(null!==(F=null===(U=null==K?void 0:K.data)||void 0===U?void 0:U.member)&&void 0!==F?F:0)>0,item_name:null!==(j=null===(G=k.bundleData)||void 0===G?void 0:G.bundleName)&&void 0!==j?j:null!==($=null==K?void 0:K.name)&&void 0!==$?$:"",item_type:k.itemType,item_id:k.itemId,item_unlock_level:null!==(V=null===(H=null==K?void 0:K.data)||void 0===H?void 0:H.lockLevel)&&void 0!==V?V:1,item_cost:k.cost.value,currency:null!==(q=null===(W=null==z?void 0:z.data)||void 0===W?void 0:W.name)&&void 0!==q?q:"",currency_id:k.cost.currency,currency_balance:this._activePlayer.player.getCurrencyAmount(k.cost.currency,k.cost.type),price:k.cost.value,instance_type:tt.N.ShopVisit,instance_id:k.instanceId}}}class Ae extends it.v{sendFriendRequestAcceptedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("Friend Request Accepted",U)}sendFriendRequestRejectedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("Friend Request Rejected",U)}sendFriendRequestSentEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("Friend Request Sent",U)}sendToastNotificationGeneratedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("Toast Notification Generated",U)}sendHouseVisitedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("House Visited",U)}sendDuelRequestSentEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("Duel Request Sent",U)}sendDuelRequestReceivedEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("Duel Request Received",U)}sendDuelRequestAnsweredEvent(k,B=null){const U=Object.assign(Object.assign(Object.assign({},k),B),this.getCommonEventDataProperties());Be.track("Duel Request Answered",U)}}var Ce=U(77578);class Oe extends it.v{sendLoadingEvent(k,B,U,F){const G=Object.assign(Object.assign({screen_type:B,views:U},F),this.getCommonEventDataProperties());Be.track(k,G)}sendPingEvent(k,B,U,F,G){const j=Object.assign({n_pings:k,frames:B,standardDeviation:U,minimumFPS:F,currentGameState:G},this.getCommonEventDataProperties());Be.track("Technical Ping",j)}}var Ie=U(17642);class De extends it.v{constructor(k,B,U){super(k,B,U),this._funnelNamesAndStepIDs=[]}sendFunnelEvent(k,...B){var U,F;if(this.loadUltimatesFTUEFunnelData(),window.analytics){const j=Object.values(Ie.V).indexOf(k.step),$=null===(U=this._funnelNamesAndStepIDs.find((B=>B.funnelName===k.funnelName)))||void 0===U?void 0:U.stepOrdinalValue;if(!G.Aq$.isDefined($)||j>$){let U=null===(F=this._funnelNamesAndStepIDs.find((B=>B.funnelName===k.funnelName)))||void 0===F?void 0:F.stepIndex;G.Aq$.isDefined(U)?U++:U=1;let $=k.step;B.length>0&&($=ct.w.format($,...B));const H=Object.assign({funnel_name:k.funnelName,funnel_type:k.funnelType,step_index:U,step_name:$},this.getCommonEventDataProperties());Be.track("Funnel Advanced",H),this.saveUltimatesFTUEFunnelData(k.funnelName,U,j)}}}saveUltimatesFTUEFunnelData(k,B,U){(0,lt.v)(!!this._funnelNamesAndStepIDs,"Segment ultimates FTUE funnel is undefined");const F=this._activePlayer.player,G=this._funnelNamesAndStepIDs.findIndex((B=>B.funnelName===k));if(G<0){const G={funnelName:k,stepIndex:B,stepOrdinalValue:U};this._funnelNamesAndStepIDs.push(G),F.data.ultimatesFTUEFunnelData.push(G)}else this._funnelNamesAndStepIDs[G].stepIndex=B,F.data.ultimatesFTUEFunnelData[G].stepIndex=B,this._funnelNamesAndStepIDs[G].stepOrdinalValue=U,F.data.ultimatesFTUEFunnelData[G].stepOrdinalValue=U;F.forceSaveCharacter(),F.saveEnabled=!1}loadUltimatesFTUEFunnelData(){if(this._funnelNamesAndStepIDs.length>0)return;const k=this._activePlayer.player.data.ultimatesFTUEFunnelData;k&&k.length>0?k.forEach((k=>{this._funnelNamesAndStepIDs.push(k)})):this._activePlayer.player.data.ultimatesFTUEFunnelData=[]}}var Re=U(76253);class Pe extends it.v{constructor(){super(...arguments),this._instanceType=tt.N.MembershipVideo,this._instanceId=nt.$.generateUID()}getGenericVideoSegmentData(){return Object.assign({instance_type:this._instanceType,instance_id:this._instanceId,video_id:this._selectedVideoId,video_type:this._videoType,loading_id:this._videoLoadingId},this.getCommonEventDataProperties())}setNetworkTestStartedTimestamp(){this._videoLoadingStartTimeMS=Date.now()}sendVideoLoadingStartedEvent(k,B,U){this._videoLoadingId=nt.$.generateUID(),this._selectedVideoId=k,this._videoType=B,this._instanceType=U,Be.track("Video Loading Started",this.getGenericVideoSegmentData())}sendVideoLoadingCompletedEvent(k){if(this._videoSizeBytes=k,!this._videoLoadingId||!this._selectedVideoId)return void G.VyI.log("VideoSegment: An error occurred while sending video loading completed segment event: Video Loading Completed Event cannot be sent before Video Loading Started Event.",G.$bb.Error);const B=(Date.now()-this._videoLoadingStartTimeMS)/1e3;Be.track("Video Loading Completed",Object.assign(Object.assign({},this.getGenericVideoSegmentData()),{loading_time:B,video_size:this._videoSizeBytes}))}sendVideoPlayedEvent(k){this._videoLoadingId&&this._selectedVideoId?Be.track("Video Played",Object.assign(Object.assign({},this.getGenericVideoSegmentData()),{video_length:k,video_timestamp:0})):G.VyI.log("VideoSegment: An error occurred while sending video played segment event: Video Played Event cannot be sent before Video Loading Started Event.",G.$bb.Error)}sendVideoStoppedEvent(k){this._videoLoadingId&&this._selectedVideoId&&this._videoSizeBytes?Be.track("Video Stopped",Object.assign(Object.assign({},this.getGenericVideoSegmentData()),{video_size:this._videoSizeBytes,video_timestamp:k})):G.VyI.log("VideoSegment: An error occurred while sending video stopped segment event: Video Stopped Event cannot be sent before Video Loading Completed Event.",G.$bb.Error)}sendVideoErrorEvent(k,B,U){this._videoLoadingId&&this._selectedVideoId||(this._videoLoadingId=nt.$.generateUID(),this._selectedVideoId=k),Be.track("Video Error",Object.assign(Object.assign({},this.getGenericVideoSegmentData()),{error_type:B,video_timestamp:null!=U?U:0}))}sendFunnelTriggerImpressionEvent(k){let B;switch(k){case Re.B.PostBattleFlow:B={type:"post-battle-video",category:"battles",contentId:this._segment.postBattleFlow.getBattleId(),adType:st.R.Video};break;case Re.B.FestivalPortal:B={type:"Festival-Portal-Video",category:"festival",contentId:this._segment.festival.getFestivalInstanceName(),adType:st.R.Video,impressionId:this._instanceId}}B?this._purchaseFunnel=this._segment.purchase.sendFunnelTriggerImpression(B):k!==Re.B.WizardBank&&G.VyI.log(`VideoSegment: Unsupported video event type ${k} for sendFunnelTriggerImpressionEvent.`,G.$bb.Warning)}sendFunnelStartEvent(k){var B;const U=Object.assign(Object.assign({},k),{adType:null!==(B=k.adType)&&void 0!==B?B:st.R.Video});this._segment.purchase.sendFunnelStart(U,this._purchaseFunnel)}sendInterfaceOpenEvent(k,B,U=""){var F;const j=et.Wm.VideoPlayer;let $,H={};switch(k){case Re.B.PostBattleFlow:$={interfaceType:j,instanceType:B,interfaceName:J.B.PostBattleVideo,originType:et.$N.PostBattle,originID:this._segment.postBattleFlow.getBattleId()},H={instance_id:this._instanceId};break;case Re.B.FestivalPortal:$={interfaceType:j,instanceType:tt.N.UI,interfaceName:J.B.FestivalPortalVideo,originType:et.$N.ButtonClick,originID:U};break;case Re.B.WizardBank:$={interfaceType:j,instanceType:B,interfaceName:J.B.WizardBank,originType:et.$N.WizardBank};break;case Re.B.WizardCostumes:$={interfaceType:j,instanceType:B,interfaceName:J.B.WizardCostumesMenu,originType:et.$N.WizardCostumes};break;case Re.B.MemberLockedRifts:$={interfaceType:j,instanceType:B,interfaceName:J.B.RiftsPortalVideo,originType:et.$N.AutoSurfaced};break;case Re.B.MemberLockedRiftsPlay:$={interfaceType:j,instanceType:B,interfaceName:J.B.RiftsPortalVideoWelcome,originType:et.$N.AutoSurfaced}}$?this._segment.featureCommon.sendInterfaceEvent($,H):G.VyI.log(`VideoSegment: Unsupported video event type ${k} for sendInterfaceOpenEvent.`,G.$bb.Warning),k===Re.B.FestivalPortal&&(this._instanceId=null!==(F=this._segment.featureCommon.getInstanceId(J.B.FestivalPortalVideo))&&void 0!==F?F:this._instanceId)}}const Me=["Restrictions screen opened","White Glove Service screen opened","Noot explains free section","Noot explains paid section","Player uses White Glove Service","Restricted battle unlocked","Restricted battle started"];class Ne extends it.v{beginTransaction(){return this._segment.item.beginSecureItemTransaction()}setCurrentRestrictionData(k){this._currentRestrictionData=k}sendHelperScreenOpenEvent(k,B,U=!1){const F={interfaceName:`${J.B.WhiteGloveScreen}_${k}`,interfaceType:et.Wm.Modal,originType:et.$N.RestrictedBattle,instanceType:U?tt.N.ElderWhiteGloveOffer:tt.N.WhiteGloveOffer},G=this._segment.gameWorld.getCurrentInstanceTypeAndID(tt.N.OpenWorld),j={item_list:Object.assign({restrictions:this._currentRestrictionData},B),map_entered_instance_type:G.instance_type,map_entered_instance_id:G.instance_id};this._segment.featureCommon.sendInterfaceEvent(F,j),this._helperScreenInstanceId=this._segment.featureCommon.getCurrentInterfaceID(F.interfaceName)}sendBundlePurchaseEvent(k,B,U,F,G){var j,$;const H=nt.$.generateUID(),V={pets:U.map((k=>{var B,U,F,G;const j=St.t.getItem("pet",k);return{id:k,name:null!==(U=null===(B=null==j?void 0:j.data)||void 0===B?void 0:B.name)&&void 0!==U?U:"unknown",element:null!==(G=null===(F=null==j?void 0:j.data)||void 0===F?void 0:F.element)&&void 0!==G?G:"unknown"}}))},W=St.t.getItem("currency",F);return Be.track("White Glove Bundle Purchased",Object.assign({offer_type:0===G?et.$N.ElderPlayerTopUp:et.$N.RestrictedBattle,offer_id:this._helperScreenInstanceId,trigger_id:k,bundle_name:B,bundle_contents:V,transaction_id:H,currency_name:null!==($=null===(j=null==W?void 0:W.data)||void 0===j?void 0:j.name)&&void 0!==$?$:"unknown",currency_id:F,cost:G},this.getCommonEventDataProperties())),{offerId:this._helperScreenInstanceId,transactionId:H}}sendRestrictionFTUEEvent(k){if(!this._ftueFunnelId)return;const B=Object.assign({funnel_name:"restrictions_ftue",funnel_type:"tutorial",step_index:Me.indexOf(k)+1,step_name:k,funnel_id:this._ftueFunnelId},this.getCommonEventDataProperties());Be.track("Funnel Advanced",B)}initFTUEFunnelId(){return this._ftueFunnelId=nt.$.generateUID(),this._ftueFunnelId}clearFTUEFunnelId(){this._ftueFunnelId=void 0}}class xe extends it.v{sendOpenMailEvent(k,B,U){Be.track("Mail Opened",Object.assign({mail_id:k,is_unread:B,attachments:U},this.getCommonEventDataProperties()))}sendOpenEpicSelectorEvent(k){this._segment.featureCommon.sendInterfaceEvent({interfaceName:J.B.EpicSelection,interfaceType:et.Wm.DialogBox,originType:et.$N.Mail,originID:k.toString(),instanceType:tt.N.Interface})}sendClosedEpicSelectorEvent(k,B){let U;const F=[];k.forEach((k=>{const G=St.t.getItem("pet",k);U=G.ID===B?G.name:U,F.push(G.name)})),this._segment.featureCommon.sendInterfaceEvent({interfaceName:J.B.EpicSelection,interfaceType:et.Wm.DialogBox,instanceType:tt.N.Interface,closeMethod:et.Lv.Done},{selection_options:F,selection:U})}}var Le,ke;!function(k){k.MembershipBundleModalInstanceId="MEMBERSHIP_BUNDLE_MODAL_INSTANCE_ID"}(ke||(ke={}));let Be=Le=class{static track(k,B,U,F){var $,H,V,W;try{const W="analyticsEventBlockList",q=null!==(H=null===($=Y.q.instance.prodigy.gameContainer.get("80c-6fa4"))||void 0===$?void 0:$.getValue(W,[]))&&void 0!==H?H:[];if(q.includes(k)||q.some((U=>"object"==typeof U&&Object.keys(U).every((F=>"event"===F&&U[F]===k||(null==B?void 0:B[F])===U[F])))))return G.VyI.log(`[Analytics] Event '${k}' was blocked to prevent overages. Remove this event from the "analyticsEventBlockList" feature flag if you need to track it.`,G.$bb.Verbose),void(null==F||F());null===(V=window.analytics)||void 0===V||V.track(k,B,U,F),j.addBreadcrumb({category:"Segment",data:Object.assign({event:k},B)})}catch(e){G.RQr.logError(e,`An error occurred while tracking an event, ${k}`),null===(W=window.analytics)||void 0===W||W.track(k,B,U,F)}}constructor(k,B,U,F){this.segmentDataCache={},this._uuidProvider=k,this._activePlayer=B,this._deviceInfoProvider=U,this._geolocationService=F,this.featureCommon=new kt(this,this._uuidProvider,this._activePlayer),this.academyTowers=new bt(this,this._uuidProvider,this._activePlayer),this.battle=new mt(this,this._uuidProvider,this._activePlayer),this.battleRevamp=new gt.z(this,this._uuidProvider,this._activePlayer),this.duelsStadium=new Dt(this,this._uuidProvider,this._activePlayer),this.yourMail=new xe(this,this._uuidProvider,this._activePlayer),this.shop=new Se(this,this._uuidProvider,this._activePlayer),this.container=new Tt(this,this._uuidProvider,this._activePlayer),this.quests=new ue(this,this._uuidProvider,this._activePlayer),this.ultimatesFTUE=new De(this,this._uuidProvider,this._activePlayer),this.funnel=new Ut(this,this._uuidProvider,this._activePlayer),this.registerFunnelLoginSteps(),this.item=new Kt(this,this._uuidProvider,this._activePlayer),this.qrCode=new oe.s(this,this._uuidProvider,this._activePlayer),this.consent=new Et(this,this._uuidProvider,this._activePlayer),this.create=new ve(this),this.playerProgression=new ae(this,this._uuidProvider,this._activePlayer),this.economy=new Rt(this,this._uuidProvider,this._activePlayer),this.playerMovementAndDiscovery=new ie(this,this._uuidProvider,this._activePlayer),this.playerIdentityAvatar=new Jt(this,this._uuidProvider,this._activePlayer),this.gameWorld=new Vt(this,this._uuidProvider,this._activePlayer),this.social=new Ae(this,this._uuidProvider,this._activePlayer),this.connection=new _t(this,this._uuidProvider,this._activePlayer),this.technical=new Oe(this,this._uuidProvider,this._activePlayer),this.purchase=new ye(this,this._uuidProvider,this._activePlayer),this.legacyPostBattleFlow=new ge(this,this._uuidProvider,this._activePlayer),this.postBattleFlow=new at(this,this._uuidProvider,this._activePlayer),this.battlePass=new vt(this,this._uuidProvider,this._activePlayer),this.festival=new Bt.e(this,this._uuidProvider,this._activePlayer),this.conversionJar=new Ct(this,this._uuidProvider,this._activePlayer),this.rifts=new fe.Aj(this,this._uuidProvider,this._activePlayer),this.segmentedOffers=new be(this,this._uuidProvider,this._activePlayer),this.session=new Te(this,this._uuidProvider,this._activePlayer),this.statusEffects=new Ce.e(this,this._uuidProvider,this._activePlayer),this.lootDash=new Xt(this,this._uuidProvider,this._activePlayer),this.educationData=new Mt(this,this._uuidProvider,this._activePlayer),this.petMerge=new Zt.nu(this,this._uuidProvider,this._activePlayer),this.whiteGlove=new Ne(this,this._uuidProvider,this._activePlayer),this.videos=new Pe(this,this._uuidProvider,this._activePlayer)}getSessionUUID(){return this._uuidProvider.getUUID()}identify(){return(0,F.sH)(this,void 0,void 0,(function*(){var k,B,U,F;if(!window.analytics)return void G.VyI.log("window.analytics is undefined",G.$bb.Warning);const[,j]=yield this._geolocationService.getData(),$={device_platform:this._deviceInfoProvider.getPlatformName(),device_width:this._deviceInfoProvider.getScreenWidth(),device_height:this._deviceInfoProvider.getScreenHeight(),device_model:G.o5U.getDeviceModel(),device_hardware_type:G.o5U.getDeviceHardwareType(),grade:this._activePlayer.player.educationData.chosenGrade,level:this._activePlayer.getLevel(),curriculum_id:this._activePlayer.player.curriculumTreeID,client_version:Q.s.get("GameConstants.Build.VERSION"),is_member:this._activePlayer.player.hasMembership(),parent_ids:null===(k=this._activePlayer.player.playerParents)||void 0===k?void 0:k.map((k=>k.id)),teacher_ids:null===(B=this._activePlayer.player.playerTeachers)||void 0===B?void 0:B.map((k=>k.id)),register_date:Math.floor((null===(U=this._activePlayer.player.registerDate)||void 0===U?void 0:U.getTime())/1e3),country:null===(F=null==j?void 0:j.country)||void 0===F?void 0:F.name,state:H.get(j,"subdivisions[0].name")};window.analytics.identify(this._activePlayer.getUserID().toString(),$)}))}sendCustomEvent(k,B={}){Le.track(k,Object.assign(Object.assign({},this.featureCommon.getCommonEventDataProperties()),B))}getDeviceInfoProvider(){return this._deviceInfoProvider}registerFunnelLoginSteps(){this.funnel.registerLoginStep({condition:()=>(0,ot.G)(W.m).enabled,funnelName:Ft.F.ArcadiaLink,funnelType:"feature",stepName:Nt.l.FirstEligible,stepIndex:Nt.T.FirstEligible}),this.funnel.registerLoginStep({condition:()=>(0,ot.G)(z.q).enabled,funnelName:Ft.F.Costumes,funnelType:"feature",stepName:xt.j.FirstLogin,stepIndex:xt.t.FirstLogin}),this.funnel.registerLoginStep({condition:()=>(0,ot.G)(q.s).enabled,funnelName:Ft.F.MagicoinBattleRewardsIntro,funnelType:"feature",stepName:K.T.FeatureUnlocked,stepIndex:K.h.FeatureUnlocked})}};Be=Le=(0,F.Cg)([(0,$.injectable)(),(0,F.Qj)(0,(0,$.inject)("2e6-0f71")),(0,F.Qj)(1,(0,$.inject)("e20-0fb0")),(0,F.Qj)(2,(0,$.inject)("880-55b2")),(0,F.Qj)(3,(0,$.inject)("fab-547a")),(0,F.Sn)("design:paramtypes",[rt.H,X.E,Object,Object])],Be)},84786:(k,B,U)=>{"use strict";U.d(B,{S:()=>F,k:()=>H});var F,G=U(8674),j=U(62459),$=U(99246);!function(k){k.None="",k.Zone="zone",k.Map="map",k.Battle="battle"}(F||(F={}));let H=class extends j.uAl{constructor(){super(...arguments),this._defaultTriggerData=F.None,this._propertiesProviders=[],this._customPropertiesProviders=[]}getPropertiesObject(){let k={};if(this._propertiesProviders.length>0)for(const B of this._propertiesProviders)k=Object.assign(Object.assign({},k),B.getPropertiesObject());return k}getCustomPropertiesObject(){let k={};if(this._customPropertiesProviders.length>0)for(const B of this._customPropertiesProviders)k=Object.assign(Object.assign({},k),B.getPropertiesObject());return k}};(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",Function)],H.prototype,"_segment",void 0),(0,G.Cg)([(0,j.gfw)(F),(0,G.Sn)("design:type",String)],H.prototype,"_defaultTriggerData",void 0),(0,G.Cg)([(0,j.MnK)($.I),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],H.prototype,"_propertiesProviders",void 0),(0,G.Cg)([(0,j.MnK)($.I),(0,j.SZi)(),(0,G.Sn)("design:type",Array)],H.prototype,"_customPropertiesProviders",void 0),H=(0,G.Cg)([(0,j.EVk)("SegmentAnalyticsBase (abstract)")],H)},70548:(k,B,U)=>{"use strict";U.d(B,{S:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(84786);let H=class extends $.k{sendInterfaceEvent(){this._segment.featureCommon.sendInterfaceEvent(this.getPropertiesObject())}};H=(0,F.Cg)([(0,G.EVk)("SegmentAnalyticsUiInterface",j.Y.analytics)],H)},7910:(k,B,U)=>{"use strict";U.d(B,{a:()=>K});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(21097),V=U(23283),W=U(65050),q=U(84786);let K=class extends q.k{constructor(){super(...arguments),this.wheelType=V.U.LuckyLoot,this.failedReason=H.WE.MemberLocked,this.instanceType=W.N.EndOfBattle}sendPrizeWheelSpinFailedEvent(){const k=j.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let B;this.instanceId&&(B={instance_id:this.instanceId}),k.hasMembership()||this._segment.economy.sendPrizeWheelSpinFailedEvent(this.wheelType,this.failedReason,this.instanceType,B)}sendPrizeWheelSpunEvent(){let k;this.instanceId&&(k={instance_id:this.instanceId}),this._segment.economy.sendPrizeWheelSpunEvent(this.wheelType,this.instanceType,k)}};(0,F.Cg)([(0,G.gfw)(V.U),(0,F.Sn)("design:type",String)],K.prototype,"wheelType",void 0),(0,F.Cg)([(0,G.gfw)(H.WE),(0,F.Sn)("design:type",String)],K.prototype,"failedReason",void 0),(0,F.Cg)([(0,G.gfw)(W.N),(0,F.Sn)("design:type",String)],K.prototype,"instanceType",void 0),K=(0,F.Cg)([(0,G.EVk)("SegmentAnalyticsWheel",$.Y.analytics)],K)},99246:(k,B,U)=>{"use strict";U.d(B,{I:()=>j});var F=U(8674),G=U(62459);let j=class extends G.uAl{getPropertiesObject(){return{}}};j=(0,F.Cg)([(0,G.EVk)("SegmentPropertiesObjectProvider (abstract)")],j)},18206:(k,B,U)=>{"use strict";U.d(B,{y:()=>V});var F=U(8674),G=U(62459),j=U(28152),$=U(41674),H=U(99246);let V=class extends H.I{getPropertiesObject(){const k={interfaceName:this.interfaceName,interfaceType:this._interfaceType,originType:this.originType===$.$N.None?void 0:this.originType,originID:this.originID,instanceType:this._instanceType};return G.Aq$.isDefined(this._closeMethod)&&this._closeMethod!==$.Lv.None&&(k.closeMethod=this._closeMethod),k}setOriginID(k){this.originID=k}setInterfaceName(k){this.interfaceName=k}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],V.prototype,"interfaceName",void 0),(0,F.Cg)([(0,G.gfw)($.Wm),(0,F.Sn)("design:type",String)],V.prototype,"_interfaceType",void 0),(0,F.Cg)([(0,G.gfw)($.Lv),(0,F.Sn)("design:type",String)],V.prototype,"_closeMethod",void 0),(0,F.Cg)([(0,G.gfw)($.$N),(0,F.Sn)("design:type",String)],V.prototype,"originType",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],V.prototype,"originID",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],V.prototype,"_instanceType",void 0),V=(0,F.Cg)([(0,G.EVk)("SegmentUiInterfacePropertiesProvider",j.Y.analytics)],V)},77578:(k,B,U)=>{"use strict";U.d(B,{K:()=>F,e:()=>q});var F,G=U(90633),j=U(35120),$=U(63693),H=U(25089),V=U(67665);!function(k){k.StatusEffectFTUEDialogueStarted="Theo's dialogue started",k.StatusEffectFTUEBattleStarted="Spell effects tutorial battle started",k.StatusEffectFTUEBattleCompleted="Spell effects tutorial battle completed",k.StatusEffectFTUECompleted="Spell effects tutorial finished",k.StatusEffectFirstCast="User cast a spell with effect in battle"}(F||(F={}));const W=[F.StatusEffectFTUEDialogueStarted,F.StatusEffectFTUEBattleStarted,F.StatusEffectFTUEBattleCompleted,F.StatusEffectFTUECompleted,F.StatusEffectFirstCast];class q extends H.v{sendStatusEffectFtueEvent(k){const B=Object.assign({funnel_name:"status_effects",funnel_type:"feature",step_index:W.indexOf(k)+1,step_name:k},this.getCommonEventDataProperties());V.Y.track("Funnel Advanced",B)}handleSpellCastWithStatusEffect(k){if(k!==$.B1.Player)return;const B=j.q.instance.prodigy.breadcrumbManager,U=B.isBreadcrumbComplete(G.B.FEATURE_STATUS_EFFECTS,G.B.BREADCRUMB_STATUS_EFFECTS_FTUE_COMPLETED),H=B.isBreadcrumbComplete(G.B.FEATURE_STATUS_EFFECTS,G.B.BREADCRUMB_STATUS_EFFECT_CAST_IN_BATTLE);U&&!H&&(B.completeBreadcrumb(G.B.FEATURE_STATUS_EFFECTS,G.B.BREADCRUMB_STATUS_EFFECT_CAST_IN_BATTLE),this.sendStatusEffectFtueEvent(F.StatusEffectFirstCast))}}},15485:(k,B,U)=>{"use strict";var F;U.d(B,{k:()=>F}),function(k){k.AccountDeletionLink="accountDeletionLink-button",k.AddToTeam="addToTeam-button",k.AttachParentWw="attachAParentWw-button",k.Back="back-button",k.Backpack="backpack-button",k.BackpackCostumesSlot="backpackCostumesSlot-button",k.BecomeAMember="becomeAMember-button",k.Battle="battle-button",k.BattlePassClaimInfiniteTierButton="treasureTrackClaimInfiniteTierReward-button",k.BattlePassClaimQuestButton="treasureTrackClaimQuest-button",k.BattlePassClaimRewardButton="treasureTrackClaimReward-button",k.BattlePassHudButton="treasureTrackHud-button",k.BattlePassQuestGoButton="treasureTrackQuestGo-button",k.BattlePassToasterButton="treasureTrackToaster-button",k.BattlePassWizardWatchButton="treasureTrackWwLaunch",k.BonusStars="bonusStars-button",k.BuyMemberItem="buyMemberItem-button",k.BuyItem="buyItem-button",k.CostumesHowItWorks="costumesHowItWorks-button",k.CostumesHudButton="costumesHud-button",k.CostumesItemCardButton="costumesItemCard-button",k.Continue="continue-button",k.ChangePasswordLink="chnagePasswordLink-button",k.Chat="chat-button",k.CheckItOut="checkItOut-button",k.Close="close-button",k.CrystalCaverns="crystalCaverns-button",k.Delete="delete-button",k.Download="download-button",k.DynamicStoreModalButton="dynamicStoreModal-button",k.EquipItem="equipItem-button",k.EquipMemberItem="equipMemberItem-button",k.EvolveNow="evolveNow-button",k.Feed="feed-button",k.Festival="festival-button",k.Friend="friend-button",k.GoBattle="goBattle-button",k.Item="item-button",k.Later="later-button",k.Leaderboard="leaderboard-button",k.Leave="leave-button",k.LeftArrow="leftArrow-button",k.Like="like-button",k.LinkParent="linkParentSettings-button",k.LootDashHudButton="wizardDashHud-button",k.LootDashGetMoreRevivesButton="lootDashGetMoreRevives-button",k.LootDashWizardWatchButton="wizardDashWizardWatch-button",k.LostPetsButton="lost_pets_button",k.Mail="mail-button",k.Map="map-button",k.MemberHudButton="member-button",k.MembershipUpgradeOkay="membership-upgrade-okay",k.Next="next-button",k.No="no-button",k.NotNow="notNow-button",k.Okay="okay-button",k.Options="options-button",k.ParentGoalTracker="parent-goal-tracker-button",k.ParentGoalTrackerCollectReward="parent-goal-hud-collect-reward",k.ParentGoalTrackerInProgress="parent-goal-hud-goal-status",k.ParentGoalTrackerNeedReward="parent-goal-hud-need-reward",k.ParentGoalTrackerNoGoal="parent-goal-hud-need-goal",k.ParentGoalTrackerNotAttached="parent-goal-hud-attach-parent",k.UnifiedStoreToDynamicStore="dynamic_store_unified_store",k.PetLevelUp="pets-level-up-button",k.PetRescuePayMagicoin="pet_rescue_pay_magicoin",k.Pets="pets-button",k.Play="play-button",k.PostBattleFlowMagicoinCollectAllRewards="postBattleFlowMagicoinCollectAllRewards-button",k.PostBattleFlowMagicoinGetFreeRewards="postBattleFlowMagicoinGetFreeRewards-button",k.PostBattleFlowMagicoinGetMemberRewards="postBattleFlowMagicoinGetMemberRewards-button",k.Rescue="rescue-button",k.RemoveFromTeam="removeFromTeam-button",k.RestrictionsPurchase="restrictionsPurchase-button",k.RevealCredentials="revealCredentialsParentAttach-button",k.RiftsMenuStoreButton="riftsMenuStore-button",k.RightArrow="rightArrow-button",k.SaveName="saveName-button",k.SeasonRewards="seasonRewards-button",k.Share="share-button",k.Shop="shop-button",k.Shuffle="shuffle-button",k.SignUpForMembership="signUpForMembership-button",k.Social="social-button",k.StateChallengesTab="state-challenges-tab",k.StateChallengesViewMilestonesButton="view_milestone_rewards-button",k.StateChallengesCollectMilestonesButton="collect_milestone_rewards-button",k.Stay="stay-button",k.Stop="stop-button",k.Titan="titan-button",k.TryABattle="tryABattle-button",k.UnifiedStore="unifiedStore-button",k.UnifiedStoreCardButton="unifiedStoreCard-button",k.Use="use-button",k.ViewMoreStores="viewMoreStores-button",k.WorldPlayerPortrait="worldPlayerPortrait-button",k.WizardBackpackButton="wizard-backpack-button",k.WizardWatchButton="wizard-watch-button",k.X="x-button",k.Yes="yes-button",k.ZoneGoalsCta="zoneGoalsCta-button"}(F||(F={}))},46784:(k,B,U)=>{"use strict";var F;U.d(B,{B:()=>F}),function(k){k.AfterSchoolWidget="after_school_widget",k.ArcadiaConfirmationModal="arcadia_confirmation_modal",k.Backpack="backpack",k.BattlePassComplexFtueModal="treasure_track_complex_ftue_modal",k.BattlePassFtue="treasure_track_ftue",k.BattlePassMenu="treasure_track_main",k.BattlePassMembershipModal="treasure_track_membership_modal",k.BattlePassUltimateModal="treasure_track_ultimate_prompt",k.BattlePassHomeScreen="treasure_track_home_screen",k.BattlePassQuestsScreen="treasure_track_quests_tab",k.BattlePassRewardsScreen="treasure_track_rewards_tab",k.BattlePassSimpleFtueModal="treasure_track_simple_ftue_modal",k.BattlePetInfoWidget="battle_pet_info_widget",k.BattlePotionSelect="battle_potion_select",k.Chat="chat",k.Dialogue="dialogue",k.DuelsStadium="duels_stadium",k.DynamicPromptMembershipInfoAd="dynamic_prompt_membership_info_ad",k.DynamicStoreBundle="dynamic_store_bundle",k.DynamicStoreModal="dynamic_store_modal",k.EnterGoldRiftModal="enter_gold_rift_modal",k.EpicSelection="epic_selection",k.FeaturedPetModal="featured_spawn_modal",k.FestivalProgressionWindow="festival_progression_window",k.FestivalAboutWindow="festival_about_window",k.FestivalCurrencyDrainPopup="festival_currency_drain_popup",k.FestivalLaunchPopup="festival_zone_entry_popup_lamplight",k.FestivalHudLaunchPopup="festival_hud_launch_popup_lamplight",k.FestivalPortalVideo="festival_portal_video",k.FriendsList="friends_list",k.HiArenaHub="hi_arena_hub",k.HUD="HUD",k.HUDMenuBar="hud_menu_bar",k.ItemInfo="item_info",k.KeystonePopup="keystone_popup",k.KidsMlpModalNonMember="kids_mlp_modal",k.KidsMlpModalLevelUpMember="kids_mlp_upgrade_ultimate_modal",k.KidsMlpModalUltimateMathMember="kids_mlp_upgrade_ultimate_bundle_modal",k.KidsMlpUpgradeComplete="kids_mlp_upgrade_congratulations",k.KidsMlpUpgradeFail="kids_mlp_upgrade_fail",k.LeaveGameDialog="leave_game_dialog",k.LootDashMenu="wizard_dash_lobby",k.LootDashTransportModal="wizard_dash_assignment_transport_modal",k.LostPetsMain="lost_pets_main",k.MemberAd="member_ad",k.MembershipInfoAd="membership_info_ad",k.MembershipParentAd="membership_parent_ad",k.MembershipStaticAd="membership_static_ad",k.MembershipStaticAdCarousel="membership_static_ad_carousel",k.MembershipYouTubeAd="membership_youTube_ad",k.NicknamerMenu="nicknamer_menu",k.NewOtherEvolutions="NEW_other_evolutions",k.OptionsMenu="options_menu",k.OtpAd="otp_modal",k.Overworld="overworld",k.ParentAttach="parent_attachment_qr",k.ParentGoalAttachModal="parent_goal_attach_modal",k.ParentGoalsTracker="parent_goals_tracker",k.PedestalsClicked="pedestals_clicked",k.PetMergePowerUpModal="pet_power_up_window",k.PetMergePowerUpWarning="pet_power_up_warning",k.PetStackDrawer="pet_stack_drawer",k.PetsWindow="pets_window",k.PetRescueAttempt="pet_rescue_attempt",k.PetRescueWindow="pet_rescue_window",k.PlayerCard="player_card",k.PlayerGoals="player_goals",k.PostBattleFlow="post_battle",k.PostBattleFlowMagicoinRewardDisplay="post_battle_magicoin_reward_display",k.PostBattleFlowMemberJarRewardDisplay="post_battle_member_jar_reward_display",k.PostBattleFlowStandardRewardDisplay="post_battle_standard_reward_display",k.PostBattleVideo="post_battle_video",k.PreBattleScreen="pre_battle_screen",k.ProdigyChallenge="prodigy_challenge",k.ProdigyChallengeClassCode="prodigy_challenge_class_code",k.ProdigyChallengeMilestoneRewards="prodigy_challenge_milestone_rewards",k.ProdigyChallengeResult="prodigy_challenge_result",k.PumpkinfestAboutWindow="pumpkinfest_about_window",k.RestrictedBattleCallbackScreen="restricted_battle_call_back_screen",k.ResultsMenu="results_menu",k.RiftsCycleModal="rifts_cycle_modal",k.RiftsPortal1Menu="rifts_portal_1_menu",k.RiftsPortal2Menu="rifts_portal_2_menu",k.RiftsPortal3Menu="rifts_portal_3_menu",k.RiftsPortalVideo="member_locked_rift_video_gate",k.RiftsPortalVideoWelcome="member_locked_rift_welcome_video",k.Shiverchill="shiverchill",k.SirVey="sir_vey",k.Social="social",k.SpringfestAboutWindow="springfest_about_window",k.SpringfestGrottoSelectModal="springfest_grotto_select_modal",k.StadiumRoomsMenu="stadium_rooms_menu",k.StoreBundlesPopup="store_bundles_popup",k.StarlightAboutWindow="starlight_about_window",k.SummerfestAboutWindow="summerfest_about_window",k.TitanProgressionWindow="titan_progression_window",k.UnifiedStore="unified_store_main",k.UnifiedStoreBase="unified_store",k.UniversalTeamSelection="universal_team_screen",k.WhiteGloveScreen="white_glove",k.WinterfestAboutWindow="winterfest_about_window",k.WizardBank="wb_modal",k.WizardCostumesMenu="costumes_menu",k.WizardWatch="wizard_watch",k.WorldMap="world_map",k.YourMail="your_mail",k.YourTeam="your_team",k.ZoneGoals="zone_goals"}(F||(F={}))},12676:(k,B,U)=>{"use strict";var F;U.d(B,{N:()=>F}),function(k){k.Athena="Athena",k.Boardy="Boardy",k.Eve="Eve",k.Harvey="Harvey",k.Merchant="Merchant",k.Noot="Noot",k.Scoog="Scoog",k.UltimatesPlinth="ultimates_plinth",k.Ulla="Ulla"}(F||(F={}))},70703:(k,B,U)=>{"use strict";U.d(B,{x:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(90351);let V=class extends G.uAl{constructor(){super(...arguments),this._fadeDurationMS=500,this._useComponentAlpha=!1,this._startDelay=0,this._repeatCount=0,this._yoyoAlpha=!1,this._autoStart=!1,this.onComplete=new G.HN0,this._easingType=H.i.LinearNone}create(){super.create(),this._autoStart&&this.startTween()}destroy(){this._activeTween&&(j.q.instance.game.tweens.remove(this._activeTween),this._activeTween=null),this.onComplete.dispose(),super.destroy()}startTween(k=this._targetAlpha,B=(this._useComponentAlpha?this.targetComponent.getRootContainer().alpha:this._initialAlpha),U=this._startDelay,F=this._fadeDurationMS){{const G={value:B},$=this.targetComponent.getRootContainer();$?($.alpha=B,this._activeTween=j.q.instance.game.add.tween(G,this).to({value:k},F,H.K.getEasingFunctionFromEnum(this._easingType),!0,U,this._repeatCount,this._yoyoAlpha).onUpdateCallback((()=>{$.alpha=G.value})),this._activeTween.onTweenComplete.addOnce((()=>{j.q.instance.game.tweens.remove(this._activeTween),this._activeTween=null,$.alpha=k,this.onComplete.dispatch()}))):this.targetComponent.onRootContainerSet.addOnce(this.startTween,this)}}stopTween(){this._activeTween&&!this._activeTween.isDestroyed&&this._activeTween.stop(!0)}};(0,F.Cg)([(0,G.MnK)(G.y4o),(0,F.Sn)("design:type",G.y4o)],V.prototype,"targetComponent",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_fadeDurationMS",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_useComponentAlpha",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_initialAlpha",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_targetAlpha",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_startDelay",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_repeatCount",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_yoyoAlpha",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_autoStart",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onComplete",void 0),(0,F.Cg)([(0,G.gfw)(H.i),(0,F.Sn)("design:type",String)],V.prototype,"_easingType",void 0),V=(0,F.Cg)([(0,G.EVk)("AlphaFadeTween",$.Y.animation)],V)},66998:(k,B,U)=>{"use strict";U.d(B,{s:()=>V});var F,G,j=U(8674),$=U(62459),H=U(28152);!function(k){k.RunningInTween="RunningInTween",k.RunningOutTween="RunningOutTween",k.IdleAtEndOfInTween="IdleAtEndOfInTween",k.IdleAtEndOfOutTween="IdleAtEndOfOutTween"}(F||(F={})),function(k){k.DoNothing="DoNothing",k.PlayInTween="PlayInTween",k.PlayOutTween="PlayOutTween",k.GoToEndOfInTween="GoToEndOfInTween",k.GoToEndOfOutTween="GoToEndOfOutTween"}(G||(G={}));let V=class extends $.uAl{constructor(){super(...arguments),this._onCreate=G.DoNothing}create(){super.create(),this._inTween.onTweenComplete.add((()=>this._currentState=F.IdleAtEndOfInTween)),this._outTween.onTweenComplete.add((()=>this._currentState=F.IdleAtEndOfOutTween)),this.runAction(this._onCreate)}runAction(k){if(k!==G.DoNothing)switch(k){case G.GoToEndOfInTween:this.runInTween(!0);break;case G.GoToEndOfOutTween:this.runOutTween(!0);break;case G.PlayInTween:this._outTween.onTweenComplete.addOnce((()=>this.runInTween())),this.runOutTween(!0);break;case G.PlayOutTween:this._inTween.onTweenComplete.addOnce((()=>this.runOutTween())),this.runInTween(!0)}}runInTween(k=!1){this._currentState!==F.IdleAtEndOfInTween&&this._currentState!==F.RunningInTween&&(this._currentState===F.RunningOutTween&&this._outTween.pauseAnimation(),k?this._inTween.completeAnimation():(this._currentState=F.RunningInTween,this._inTween.playAnimation()))}runOutTween(k=!1){this._currentState!==F.IdleAtEndOfOutTween&&this._currentState!==F.RunningOutTween&&(this._currentState===F.RunningInTween&&this._inTween.pauseAnimation(),k?this._outTween.completeAnimation():(this._currentState=F.RunningOutTween,this._outTween.playAnimation()))}};(0,j.Cg)([(0,$.MnK)($.bTj),(0,j.Sn)("design:type",$.bTj)],V.prototype,"_inTween",void 0),(0,j.Cg)([(0,$.MnK)($.bTj),(0,j.Sn)("design:type",$.bTj)],V.prototype,"_outTween",void 0),(0,j.Cg)([(0,$.gfw)(G),(0,j.Sn)("design:type",String)],V.prototype,"_onCreate",void 0),V=(0,j.Cg)([(0,$.EVk)("InOutEasyTweenController",H.Y.animation,'Given an "In" and "Out" tween, handles transitioning between them so they never run at the same time.')],V)},79009:(k,B,U)=>{"use strict";U.d(B,{F:()=>j});var F=U(62459),G=U(95891);class j{constructor(k){this.animations={},this.animationNames=[],G.transform(k,((k,B,U)=>{this.animationNames.push(U);const G=Object.keys(B);for(let j=0;j-1}getAnimationDataForProperty(k,B){return G.get(this.animations,`${B}.${k}`,null)}}},80110:(k,B,U)=>{"use strict";U.d(B,{g:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(84938);let V=class extends G.JTX{constructor(){super(...arguments),this.durationMS=1e3,this.amplitude=20,this.cycles=10,this.buildupDuration=0,this.falloffDuration=500,this.onComplete=new G.HN0,this._shakeTime=null}run(){this._mainPlayer&&(this._loadAreaCameraFollowController=this._mainPlayer.findComponentInChildren(G.mZY),this._loadAreaCameraFollowController&&(this._loadAreaCameraFollowController.Active=!1)),this._cameraTransform=G.i7d.main.GameObject.transform,this._shakeTime=0,this._cameraInitialX=this._cameraTransform.localPosition.x,this._cameraInitialY=this._cameraTransform.localPosition.y}destroy(){this.onComplete.dispose(),super.destroy()}isRunning(){return null!==this._shakeTime}forceCompletion(){this.isRunning()&&(this._shakeTime=this.durationMS,this.update())}update(){if(super.update(),this.isRunning())if(this._shakeTime+=j.q.instance.game.time.deltaMS,this._shakeTime0?Math.min(1,k*(this.durationMS/this.buildupDuration)):1,U=this.falloffDuration>0?Math.min(1,(1-k)*(this.durationMS/this.falloffDuration)):1,F=this.amplitude*B*U*H.B.screenShake.value;this._cameraTransform.setPosition(this._cameraInitialX,Math.floor(this._cameraInitialY+Math.sin(k*Math.PI*2*this.cycles)*F))}else this._cameraTransform.setPosition(this._cameraInitialX,this._cameraInitialY),this._loadAreaCameraFollowController&&(this._loadAreaCameraFollowController.Active=!0),this._shakeTime=null,this.onComplete.dispatch()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"durationMS",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"amplitude",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"cycles",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"buildupDuration",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"falloffDuration",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onComplete",void 0),(0,F.Cg)([(0,G.Cdj)("MainPlayerGameObject"),(0,F.Sn)("design:type",G._mx)],V.prototype,"_mainPlayer",void 0),V=(0,F.Cg)([(0,G.EVk)("ScreenShake",$.Y.motion)],V)},74846:(k,B,U)=>{"use strict";U.d(B,{Q:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(29834);let H=class extends G.uAl{constructor(){super(...arguments),this.animator=null,this.animationName=null,this.loop=!1,this._finished=!0,this._onComplete=new G.HN0}get OnComplete(){return this._onComplete}destroy(){this._onComplete.dispose(),super.destroy()}play(k=!1){this._finished=!1,this.animator.OnAnimationComplete.addOnce((()=>{this._finished=!0,this._onComplete.dispatch()})),this.animator.playAnimation(this.animationName,this.loop,k)}hasFinishedPlaying(){return this._finished}};(0,F.Cg)([(0,G.MnK)($.j),(0,F.Sn)("design:type",$.j)],H.prototype,"animator",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"animationName",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"loop",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"_onComplete",void 0),H=(0,F.Cg)([(0,G.EVk)("SpineAnimationClip",j.Y.animation)],H)},50118:(k,B,U)=>{"use strict";U.d(B,{a:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._autoStart=!1,this.tween=null,this.tweenPlayed=!1,this._onComplete=new G.HN0}get OnComplete(){return this._onComplete}get Tween(){return this.tween}set Tween(k){this.tween=k}create(){var k,B;if(super.create(),this._target&&!((null!==(B=null===(k=this._tweenData)||void 0===k?void 0:k.length)&&void 0!==B?B:0)<=0)){this.tween=j.q.instance.game.add.tween(this._target,this);for(const k of this._tweenData)this.tween.to(k.properties,1e3*k.duration,{value:k.ease.value},this._autoStart,k.delay,k.repeat,k.yoyo)}}play(){this.tween&&!this.tween.isDestroyed?(this.tween.onTweenComplete.addOnce((()=>{this.tweenPlayed=!0,this._onComplete.dispatch()})),this.tween.start()):G.VyI.log("Tween could not play because it has been destroyed.",G.$bb.Warning)}stop(){this.tween&&!this.tween.isDestroyed?this.tween.stop():G.VyI.log("Tween could not be stopped because it has been destroyed.",G.$bb.Warning)}hasFinishedPlaying(){return this.tweenPlayed}destroy(){this.stop(),j.q.instance.game.tweens.removeAllFromOwner(this),this._onComplete.dispose(),this.tween=null,super.destroy()}};(0,F.Cg)([(0,G.SZi)(),(0,G.vCS)(),(0,F.Sn)("design:type",Array)],H.prototype,"_tweenData",void 0),(0,F.Cg)([(0,G.MnK)(G.uAl),(0,F.Sn)("design:type",G.uAl)],H.prototype,"_target",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_autoStart",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"_onComplete",void 0),H=(0,F.Cg)([(0,G.EVk)("TweenAnimationClip",$.Y.animation)],H)},92591:(k,B,U)=>{"use strict";U.d(B,{K:()=>H});var F=U(8674),G=U(62459),j=U(95891),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._onStateChanged=new G.HN0,this._currentState=null,this._animationStates={}}get onStateChanged(){return this._onStateChanged}get currentState(){return this._currentState}destroy(){this._currentState=null;const k=[];for(const B in this._animationStates){const U=this._animationStates[B];k.indexOf(U)<0&&(k.push(U),U.destroy())}k.length=0,this._animationStates=null,this._onStateChanged.dispose(),this._onStateChanged=null,super.destroy()}update(){var k;super.update(),null===(k=this._currentState)||void 0===k||k.update()}changeState(k){const B=this._animationStates[k];this.setCurrentAnimation(B)}setCurrentAnimation(k){var B;this._currentState!==k&&(null===(B=this._currentState)||void 0===B||B.exit(),null==k||k.enter(),this._currentState=k,this._onStateChanged.dispatch())}setAnimationState(k,B){const U=this._animationStates[k];1===j.sumBy(Object.values(this._animationStates),(k=>k===U?1:0))&&U.destroy(),this._animationStates[k]=B}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"_onStateChanged",void 0),H=(0,F.Cg)([(0,G.EVk)("AnimationController",$.Y.animation)],H)},22637:(k,B,U)=>{"use strict";U.d(B,{k:()=>W});var F=U(8674),G=U(62459),j=U(51742),$=U(35120),H=U(28152),V=U(34603);let W=class extends G.uAl{constructor(){super(...arguments),this.preloadSFX=j.c.Sfx_ui,this.onFxComplete=new G.HN0,this._tweens=[]}playEffect(k,B,U){this.gameObject.transform.setPosition(k-20,B+100),U&&this.onFxComplete.add(U);const F=Math.random()+1;this._confettiImage.sprite.animations.add("confetti",["confetti1","confetti2","confetti3","confetti4"],10,!0,!1),this._confettiImage.sprite.animations.play("confetti",void 0,!0),this._confettiImage.sprite.anchor.set(.5,.5),this._confettiImage.sprite.scale.x=.1,this._confettiImage.sprite.scale.y=.1;const j=$.q.instance.game.add.tween(this.gameObject.transform.localPosition,this).to({y:"-=25"},500,G.GS3.Linear.None,!0,0);this._tweens.push(j),this._tweens.push($.q.instance.game.add.tween(this._confettiImage.sprite.scale,this).to({x:F,y:F},500,G.GS3.Quadratic.In,!0,0));const H=$.q.instance.game.add.tween(this.gameObject.transform.localPosition,this).to({y:"+=100"},2e3,G.GS3.Sinusoidal.Out,!1,250);this._tweens.push(H);const V=$.q.instance.game.add.tween(this._confettiImage.sprite,this).to({alpha:0},1e3,G.GS3.Linear.None,!0,2500);this._tweens.push(V),$.q.instance.prodigy.audio.playSFX(18,"dig"),j.chain(H),V.onTweenComplete.addOnce((()=>{this.onFxComplete.dispatch(),this.gameObject.destroy()}))}destroy(){this._tweens.forEach((k=>{$.q.instance.game.tweens.remove(k)})),this.onFxComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.Bak)(),(0,F.Sn)("design:type",String)],W.prototype,"preloadSFX",void 0),(0,F.Cg)([(0,G.MnK)(V._),(0,G.Lr6)(0),(0,G.nKb)("confetti"),(0,F.Sn)("design:type",V._)],W.prototype,"_confettiImage",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],W.prototype,"onFxComplete",void 0),W=(0,F.Cg)([(0,G.EVk)("Confetti",H.Y.effect)],W)},99898:(k,B,U)=>{"use strict";U.d(B,{F:()=>V});var F=U(8674),G=U(62459),j=U(28152),$=U(29834),H=U(71554);let V=class extends G.uAl{constructor(){super(...arguments),this.onFxCompleted=new G.HN0,this.onImpact=new G.HN0}playEffect(k,B,U,F,G,j){const $=B-50;this.gameObject.transform.setPosition(k,$),this.gameObject.setLayer(G,!0),this._parabolicTween.startTween(k,$,U,F),j&&this.onFxCompleted.add(j)}impact(){this.onImpact.dispatch(),this._spineAnimator.OnAnimationComplete.addOnce((()=>{this.completeFx()}))}completeFx(){this.onFxCompleted.dispatch(),setTimeout((()=>{this.gameObject.destroy()}),1)}destroy(){this.onFxCompleted.dispose(),this.onImpact.dispose(),super.destroy()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onFxCompleted",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onImpact",void 0),(0,F.Cg)([(0,G.MnK)(H.L),(0,F.Sn)("design:type",H.L)],V.prototype,"_parabolicTween",void 0),(0,F.Cg)([(0,G.MnK)($.j),(0,F.Sn)("design:type",$.j)],V.prototype,"_spineAnimator",void 0),V=(0,F.Cg)([(0,G.EVk)("FXProjectile",j.Y.effect)],V)},44977:(k,B,U)=>{"use strict";U.d(B,{e:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this.onFxCompleted=new G.HN0}playEffect(k,B,U,F){this.gameObject.transform.setPosition(k,B+200),this.gameObject.setLayer(U,!0),F&&this.onFxCompleted.add(F)}completeFx(){this.onFxCompleted.dispatch(),setTimeout((()=>{this.gameObject.destroy()}),1)}destroy(){this.onFxCompleted.dispose(),super.destroy()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onFxCompleted",void 0),$=(0,F.Cg)([(0,G.EVk)("FXStatic",j.Y.effect)],$)},37854:(k,B,U)=>{"use strict";U.d(B,{v:()=>W});var F=U(8674),G=U(62459),j=U(51742),$=U(35120),H=U(28152),V=U(34603);let W=class extends G.uAl{constructor(){super(...arguments),this.preloadSFX=j.c.Sfx_ui,this.onFxComplete=new G.HN0,this._tweens=[]}playEffect(k,B,U,F=0){this.gameObject.transform.setPosition(k-20,B+100),U&&this.onFxComplete.add(U);const j=75*Math.random()+25,H=Math.random(),V=100*H-50,W=Math.random()+1;this._rocketImage.sprite.anchor.set(.5,.5),this._explosionImage.sprite.anchor.set(.5,.5),this._explosionImage.sprite.angle=360*Math.random(),this._explosionImage.GameObject.transform.setPosition(V,-j-100);const q=$.q.instance.game.add.tween(this._rocketImage.GameObject.transform.localPosition,this).to({y:-j-100},500,G.GS3.Quadratic.Out,!0,F);this._tweens.push(q),this._tweens.push($.q.instance.game.add.tween(this._rocketImage.GameObject.transform.localPosition,this).to({x:V},500,G.GS3.Quadratic.Out,!0,F)),this._tweens.push($.q.instance.game.add.tween(this._rocketImage.sprite,this).to({angle:35*(2*H-1)},500,G.GS3.Linear.None,!0)),this._tweens.push($.q.instance.game.add.tween(this._explosionImage.GameObject.transform.localScale,this).to({x:W,y:W},500,G.GS3.Back.Out,!0,F+500));const K=$.q.instance.game.add.tween(this._explosionImage.sprite,this).to({alpha:0},1e3,G.GS3.Linear.None,!0,F+1e3);this._tweens.push(K),q.onTweenComplete.addOnce((()=>{$.q.instance.prodigy.audio.playSFX(18,"dig")}),this),q.onTweenComplete.addOnce((()=>{this._rocketImage.GameObject.active=!1})),K.onTweenComplete.addOnce((()=>{this.onFxComplete.dispatch(),this.GameObject.destroy()}))}destroy(){this._tweens.forEach((k=>{$.q.instance.game.tweens.remove(k)})),this.onFxComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.Bak)(),(0,F.Sn)("design:type",String)],W.prototype,"preloadSFX",void 0),(0,F.Cg)([(0,G.MnK)(V._),(0,G.Lr6)(0),(0,G.nKb)("rocket"),(0,F.Sn)("design:type",V._)],W.prototype,"_rocketImage",void 0),(0,F.Cg)([(0,G.MnK)(V._),(0,G.Lr6)(0),(0,G.nKb)("explosion"),(0,F.Sn)("design:type",V._)],W.prototype,"_explosionImage",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],W.prototype,"onFxComplete",void 0),W=(0,F.Cg)([(0,G.EVk)("Firework",H.Y.effect)],W)},16184:(k,B,U)=>{"use strict";U.d(B,{J:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(1823);let H=class extends $.k{create(){super.create(),this._color=this._possibleColors[Math.floor(Math.random()*this._possibleColors.length)],this._splashAnimator.playAnimation(`idle-${this._color}`,!1),this._ballonImage.GameObject.active=!1,this._animationOffsetMS=0}playSplash(){this._splashAnimator.playAnimation(`impact-${this._color}`,!1),this._splashAnimator.OnAnimationComplete.addOnce(this.completeFX,this)}};(0,F.Cg)([(0,G.SZi)(),(0,G.W_S)(),(0,F.Sn)("design:type",Array)],H.prototype,"_possibleColors",void 0),H=(0,F.Cg)([(0,G.EVk)("PaintBalloon",j.Y.effect)],H)},54001:(k,B,U)=>{"use strict";U.d(B,{y:()=>$});var F=U(8674),G=U(62459),j=U(35120);let $=class extends G.uAl{constructor(){super(...arguments),this.startPosition=new G.I9Y(0,0),this.endPosition=new G.I9Y(0,0),this.time=1e3,this.height=200,this.onTweenComplete=new G.HN0}startTween(k=this.startPosition.x,B=this.startPosition.y,U=this.endPosition.x,F=this.endPosition.y,$=this.time,H){var V,W;if(!this.targetTransform)throw new Error("ParabolicTween2dComponent: targetTransform is not set.");const q=null!==(V=this.startPosition)&&void 0!==V?V:new G.I9Y(this.targetTransform.localPosition.x,this.targetTransform.localPosition.y),K=null!==(W=this.endPosition)&&void 0!==W?W:new G.I9Y(this.targetTransform.localPosition.x,this.targetTransform.localPosition.y);void 0!==k&&(q.x=k),void 0!==B&&(q.y=B),void 0!==U&&(K.x=U),void 0!==F&&(K.y=F),this.targetTransform.setPosition(q.x,q.y),H&&this.onTweenComplete.add(H),this._horizontalTween=j.q.instance.game.add.tween(this.targetTransform.localPosition,this).to({x:K.x},$,G.GS3.Linear.None,!0),this._verticalTween=j.q.instance.game.add.tween(this.targetTransform.localPosition,this).to({y:Math.min(q.y,K.y)-this.height},$/2,G.GS3.Quadratic.Out).to({y:K.y},$/2,G.GS3.Quadratic.In,!0),this._verticalTween.onTweenComplete.add((()=>{this.targetTransform.setPosition(K.x,K.y),this.onTweenComplete.dispatch()}))}stopTween(){var k,B;null===(k=this._horizontalTween)||void 0===k||k.stop(),null===(B=this._verticalTween)||void 0===B||B.stop()}destroy(){this.stopTween(),j.q.instance.game.tweens.remove(this._horizontalTween),j.q.instance.game.tweens.remove(this._verticalTween),this.onTweenComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.MnK)(G.dLy),(0,F.Sn)("design:type",G.dLy)],$.prototype,"targetTransform",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],$.prototype,"startPosition",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],$.prototype,"endPosition",void 0),(0,F.Cg)([(0,G.g11)({toolTip:"Time in milliseconds for the tween to go between the start and end positions"}),(0,F.Sn)("design:type",Number)],$.prototype,"time",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],$.prototype,"height",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onTweenComplete",void 0),$=(0,F.Cg)([(0,G.EVk)("ParabolicTween2d")],$)},71554:(k,B,U)=>{"use strict";U.d(B,{L:()=>$});var F=U(8674),G=U(62459),j=U(35120);let $=class extends G.uAl{constructor(){super(...arguments),this.onTweenComplete=new G.HN0}startTween(k,B,U,F,$=600,H=.5*G.cj9.distance(k,B,U,F),V){const W=H+$,q={x:k,z:B,y:0};V&&this.onTweenComplete.add(V),this._parabolicTween=j.q.instance.game.add.tween(q,this).to({y:-$/5},W/2,G.GS3.Quadratic.Out).to({y:0},W/2,G.GS3.Quadratic.In,!0),this._linearTween=j.q.instance.game.add.tween(q,this).to({x:U,z:F},W,G.GS3.Linear.None,!0),this._linearTween.onUpdateCallback((()=>{this.targetTransform.setPositionX(q.x),this.targetTransform.setPositionY(q.z+q.y)})),this._linearTween.onTweenComplete.addOnce((()=>{this.targetTransform.setPositionX(U),this.targetTransform.setPositionY(F),this.onTweenComplete.dispatch()}))}stopTween(){var k,B;null===(k=this._linearTween)||void 0===k||k.stop(),null===(B=this._parabolicTween)||void 0===B||B.stop()}destroy(){this.stopTween(),j.q.instance.game.tweens.remove(this._linearTween),j.q.instance.game.tweens.remove(this._parabolicTween),this.onTweenComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.MnK)(G.dLy),(0,F.Sn)("design:type",G.dLy)],$.prototype,"targetTransform",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onTweenComplete",void 0),$=(0,F.Cg)([(0,G.EVk)("ParabolicTween3d")],$)},1823:(k,B,U)=>{"use strict";U.d(B,{k:()=>z});var F=U(8674),G=U(62459),j=U(51742),$=U(35120),H=U(28152),V=U(34603),W=U(29834),q=U(12408),K=U(54001);let z=class extends G.uAl{constructor(){super(...arguments),this.preloadSFX=j.c.Sfx_water_balloon,this.onFxComplete=new G.HN0,this._travelTimeMS=2e3,this._animationOffsetMS=400}playEffect(k,B,U,F,G,j=0){this.gameObject.transform.setPosition(k-20,B+100);const H=B-50;G&&this.onFxComplete.add(G),this._parabolicTween.startTween(k,H,U,F,2e3,(()=>{this._ballonImage.setAlpha(0),this._rotateTween.destroyTween(),$.q.instance.prodigy.audio.playSFX(45,"splash")})),this._rotateTween.startTween(),$.q.instance.game.time.events.addTimer(this._travelTimeMS-this._animationOffsetMS,(()=>{this.playSplash()}),[],this)}playSplash(){this._splashAnimator.playAnimation("impact",!1),this._splashAnimator.OnAnimationComplete.addOnce(this.completeFX,this)}completeFX(){setTimeout((()=>{this.gameObject.destroy()}),1),this.onFxComplete.dispatch()}destroy(){this._parabolicTween.stopTween(),this.onFxComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.Bak)(),(0,F.Sn)("design:type",String)],z.prototype,"preloadSFX",void 0),(0,F.Cg)([(0,G.MnK)(V._),(0,F.Sn)("design:type",V._)],z.prototype,"_ballonImage",void 0),(0,F.Cg)([(0,G.MnK)(W.j),(0,F.Sn)("design:type",W.j)],z.prototype,"_splashAnimator",void 0),(0,F.Cg)([(0,G.MnK)(K.y),(0,F.Sn)("design:type",K.y)],z.prototype,"_parabolicTween",void 0),(0,F.Cg)([(0,G.MnK)(q.Z),(0,F.Sn)("design:type",q.Z)],z.prototype,"_rotateTween",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],z.prototype,"onFxComplete",void 0),z=(0,F.Cg)([(0,G.EVk)("WaterBalloon",H.Y.effect)],z)},79825:(k,B,U)=>{"use strict";var F;U.d(B,{h:()=>F}),function(k){k[k.VoiceClip=0]="VoiceClip",k[k.Sfx=1]="Sfx",k[k.Bgm=2]="Bgm",k[k.BgmSfx=3]="BgmSfx"}(F||(F={}))},27842:(k,B,U)=>{"use strict";U.d(B,{J:()=>q,c:()=>F});var F,G=U(8674),j=U(62459),$=U(35120),H=U(28152),V=U(79825);class W extends j.$KW{generate(k,B){return j.XRp.createVertical([j.Gme.filePickerGroup({id:"audioGUID",labelValue:"Audio",path:k.audioGUID,allowedExtensions:["wav","ogg"],onChange:k=>{const B=this._editorAPI.readFileSync(`${k}.meta`).toString(),U=JSON.parse(B);this._editorAPI.modifyComponent(this._componentGuid,{audioGUID:U.guid})}}),j.Gme.enumGroup({id:"audioPreload",labelValue:"Audio Preload",selectValue:k.audioPreload},F),j.Gme.enumGroup({id:"audioType",labelValue:"Audio Type",selectValue:k.audioType},V.h),j.Gme.numberGroup({id:"start",labelValue:"Start",inputValue:k.start}),j.Gme.numberGroup({id:"duration",labelValue:"Duration",inputValue:k.duration}),j.Gme.numberGroup({id:"fadeInDuration",labelValue:"Fade In Duration",inputValue:k.fadeInDuration}),j.NyS.create({id:"onPlaybackComplete",label:"On Playback Complete",signalValue:k.onPlaybackComplete,componentGUID:this._componentGuid}),j.Gme.checkboxGroup({id:"playOnCreate",labelValue:"Play On Create",inputValue:k.playOnCreate}),j.Gme.checkboxGroup({id:"stopOnDestroy",labelValue:"Stop On Destroy",inputValue:k.stopOnDestroy}),j.Gme.checkboxGroup({id:"loop",labelValue:"Loop",inputValue:k.loop}),j.Gme.checkboxGroup({id:"onlyPlayIfActive",labelValue:"Only Play If Active",inputValue:k.onlyPlayIfActive}),j.X9M.create({id:"testPlay",buttonText:"Play",buttonIcon:j.a2l.Smiley,onClick:()=>{this._editorAPI.getComponent(this._componentGuid).play()}}),j.X9M.create({id:"testStop",buttonText:"Stop",buttonIcon:j.a2l.Cut,onClick:()=>{this._editorAPI.getComponent(this._componentGuid).stop()}})])}}!function(k){k[k.None=0]="None",k[k.OnCreate=1]="OnCreate",k[k.Dependency=2]="Dependency"}(F||(F={}));let q=class extends j.uAl{constructor(){super(...arguments),this._start=0,this._duration=-1,this._fadeInDuration=0,this.onPlaybackComplete=new j.HN0}postDeserialize(){super.postDeserialize(),this._audioPreload===F.Dependency&&(this._preloadTag=this._audioGUID)}postCreate(){super.postCreate(),this._playOnCreate&&this._audioPreload===F.Dependency?this.play():this._audioPreload===F.OnCreate&&this._assetLoader.loadAssets([this._audioGUID]).then((()=>{this._playOnCreate&&this.play()})).catch(j.RQr.createHandler("Error preloading audio"))}destroy(){var k;this._stopOnDestroy&&(null===(k=this._sound)||void 0===k||k.stop()),this.onPlaybackComplete.dispose(),super.destroy()}play(){if(this._onlyPlayIfActive&&!this.GameObject.activeInHierarchy)return;const k=$.q.instance.prodigy.audio.getVolumeForType(this._audioType);let B=!0;switch(this._audioType){case V.h.VoiceClip:this._sound=$.q.instance.prodigy.audio.playVoice(this._audioGUID,(()=>this.onPlaybackComplete.dispatch()),this._start,this._duration);break;case V.h.Sfx:this._sound=$.q.instance.prodigy.audio.playSFXFromGUID(this._audioGUID,(()=>this.onPlaybackComplete.dispatch()),this._start,this._duration,this._loop);break;case V.h.Bgm:$.q.instance.prodigy.audio.playBGM(this._audioGUID,this._loop);break;case V.h.BgmSfx:this._sound=$.q.instance.prodigy.audio.playSound(this._audioGUID,this._loop,k);break;default:B=!1,j.VyI.log("Invalid AudioType. Cannot play sound",j.$bb.Error)}B&&this.applyFadeIn(k)}stop(){var k;null===(k=this._sound)||void 0===k||k.stop()}isPlaying(){return!!this._sound&&this._sound.isPlaying}setGUID(k){this._audioGUID=k,this._assetLoader.loadAssets([this._audioGUID]).catch(j.RQr.createHandler("Error preloading audio"))}preload(){return(0,G.sH)(this,void 0,void 0,(function*(){yield this._assetLoader.loadAssets([this._audioGUID])}))}applyFadeIn(k){this._fadeInDuration>0&&(this._sound.volume=0,$.q.instance.game.add.tween(this._sound,this).to({volume:k},1e3*this._fadeInDuration,j.GS3.Linear.None,!0))}};(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],q.prototype,"_audioGUID",void 0),(0,G.Cg)([(0,j.Bak)(),(0,G.Sn)("design:type",String)],q.prototype,"_preloadTag",void 0),(0,G.Cg)([(0,j.gfw)(F),(0,G.Sn)("design:type",Number)],q.prototype,"_audioPreload",void 0),(0,G.Cg)([(0,j.gfw)(V.h),(0,G.Sn)("design:type",Number)],q.prototype,"_audioType",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],q.prototype,"_start",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],q.prototype,"_duration",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],q.prototype,"_fadeInDuration",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],q.prototype,"onPlaybackComplete",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"_playOnCreate",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"_stopOnDestroy",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"_loop",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"_onlyPlayIfActive",void 0),(0,G.Cg)([(0,j.Cdj)(j.t5G.AssetLoader),(0,G.Sn)("design:type",Object)],q.prototype,"_assetLoader",void 0),q=(0,G.Cg)([(0,j.EVk)("PlayAudioGUID",H.Y.audio),(0,j.WR4)(W)],q)},2224:(k,B,U)=>{"use strict";U.d(B,{Y:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(17425);let V=class extends G.uAl{constructor(){super(...arguments),this._playOnCreate=!1,this._pauseOnDestroy=!1,this._overrideMapBGM=!1}create(){super.create(),j.q.instance.prodigy.audio.autoplay=!this._overrideMapBGM,this._playOnCreate&&this.startBgm()}startBgm(){this.playBgmID(this._bgmGUID?this._bgmGUID:this._bgmID)}playBgmID(k){var B;if(G.Aq$.isDefined(k)){this._bgmID=k;const U=j.q.instance.prodigy,F=H.K.getAssetID("bgm",k),G=null===(B=U.audio.currentBgm)||void 0===B?void 0:B.key;G!==F?(H.K.cacheAsset(j.q.instance.game,F,H.K.zoneAssetsCached),U.load.assets(F,(()=>{U.audio.playBGM(this._bgmID,!0)}))):U.audio.isBGMPlaying(G)||U.audio.resumeBGM()}}pauseBgm(){j.q.instance.prodigy.audio.pauseBGM()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Object)],V.prototype,"_bgmID",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],V.prototype,"_bgmGUID",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_playOnCreate",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_pauseOnDestroy",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],V.prototype,"_overrideMapBGM",void 0),V=(0,F.Cg)([(0,G.EVk)("PlayBGM",$.Y.audio)],V)},86730:(k,B,U)=>{"use strict";U.d(B,{a:()=>j});var F=U(8674),G=U(62459);class j extends G.JTX{constructor(){super(...arguments),this.backgroundMusicID=null}get BackgroundMusicID(){return this.backgroundMusicID}set BackgroundMusicID(k){this.backgroundMusicID=k,this.audioPlayer.playMusic(this.BackgroundMusicID)}destroy(){this.audioPlayer.stopMusic(),super.destroy()}}(0,F.Cg)([(0,G.fFd)("AudioPlayer"),(0,F.Sn)("design:type",Object)],j.prototype,"audioPlayer",void 0)},37807:(k,B,U)=>{"use strict";U.d(B,{N:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this.onBreadcrumbComplete=new G.HN0}destroy(){this.onBreadcrumbComplete.dispose(),super.destroy()}markCompleted(){j.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(this._featureName,this._breadcrumbName),this.onBreadcrumbComplete.dispatch()}resetBreadcrumb(){j.q.instance.prodigy.breadcrumbManager.resetBreadcrumb(this._featureName,this._breadcrumbName)}resetBreadcrumbs(){j.q.instance.prodigy.breadcrumbManager.resetBreadcrumbs(this._featureName)}isCompleted(){return j.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(this._featureName,this._breadcrumbName)}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onBreadcrumbComplete",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"_featureName",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"_breadcrumbName",void 0),H=(0,F.Cg)([(0,G.EVk)("BreadcrumbFeature",$.Y.utility)],H)},96494:(k,B,U)=>{"use strict";U.d(B,{F:()=>W});var F=U(8674),G=U(62459),j=U(79687),$=U(90661),H=U(15821),V=U(7408);let W=class{constructor(){this.breadcrumbConfig=null,this._onBreadcrumbCompleted=new G.HN0,this.dataSource=null}get onBreadcrumbCompleted(){return this._onBreadcrumbCompleted}init(k,B){this.dataSource=k,this.breadcrumbConfig=B}completeBreadcrumb(k,B){const U=`breadcrumbs-${k}`;if(this.isBreadcrumbComplete(k,B))return;const F=this.breadcrumbConfig.features[k];if(G.Aq$.isDefined(F)){const j=F.breadcrumbs[B];if(G.Aq$.isDefined(j)){let B=this.dataSource.get(U);if(G.Aq$.isDefined(B)||this.dataSource.set(U,0),B=this.dataSource.get(U),this.dataSource.set(U,$.O.setBit(B,j.index)),G.Aq$.isDefined(j.completes)&&j.completes.length>0)for(const U of j.completes)this.completeBreadcrumb(k,U)}else G.VyI.log(`BreadcrumbManager.completeBreadcrumb - Couldn't find breadcrumb named: ${B} for feature: ${k}. No action taken.`,G.$bb.Error)}else G.VyI.log(`BreadcrumbManager.completeBreadcrumb - Couldn't find feature named: ${k}. No action taken.`,G.$bb.Error);this._onBreadcrumbCompleted.dispatch()}resetBreadcrumb(k,B,U=!1){const F=`breadcrumbs-${k}`;if(!this.isBreadcrumbComplete(k,B))return;const j=this.breadcrumbConfig.features[k];if(G.Aq$.isDefined(j)){const H=j.breadcrumbs[B];if(G.Aq$.isDefined(H)){let B=this.dataSource.get(F);if(G.Aq$.isDefined(B)||this.dataSource.set(F,0),B=this.dataSource.get(F),this.dataSource.set(F,$.O.clearBit(B,H.index)),U&&G.Aq$.isDefined(H.completes)&&H.completes.length>0)for(const F of H.completes)this.resetBreadcrumb(k,F,U)}else G.VyI.log(`BreadcrumbManager.resetBreadcrumb - Couldn't find breadcrumb named: ${B} for feature: ${k}. No action taken.`,G.$bb.Error)}else G.VyI.log(`BreadcrumbManager.resetBreadcrumb - Couldn't find feature named: ${k}. No action taken.`,G.$bb.Error)}isBreadcrumbDefined(k,B){const U=this.breadcrumbConfig.features[k];if(G.Aq$.isDefined(U)){const k=U.breadcrumbs[B];return G.Aq$.isDefined(k)}return!1}isBreadcrumbComplete(k,B){const U=this.dataSource.get(`breadcrumbs-${k}`),F=this.breadcrumbConfig.features[k];return class{static getBreadcrumbFeature(k,B){return(null!=B?B:new V.C).features[k]}static isBreadcrumbComplete(k,B,U){if(H.A.isDefined(B)){const F=B.breadcrumbs[U];if(H.A.isDefined(F)){const B=Math.pow(2,F.index);return $.O.areBitsSet(k,B)}}return!1}}.isBreadcrumbComplete(U,F,B)}resetBreadcrumbs(k){const B=`breadcrumbs-${k}`,U=this.breadcrumbConfig.features[k];if(G.Aq$.isDefined(U)){const k=this.dataSource.get(B);G.Aq$.isDefined(k)&&this.dataSource.set(B,0)}}};W=(0,F.Cg)([(0,j.injectable)()],W)},90744:(k,B,U)=>{"use strict";U.d(B,{E:()=>Y});var F=U(8674),G=U(79687),j=U(99625),$=U(10471),H=U(13381),V=U(35120),W=U(1195),q=U(77938),K=U(43754),z=U(13956);let Y=class{exchange(k,B){const U=H.V.from(k.currency).to(B);return{currency:B,value:H.V.applyExchangeRate(k.value,U)}}canAfford(k){return this.isHardCurrencyValue(k)?this._hardCurrencyDataProvider.canAfford(k):this._playerDataProvider.player.getCurrencyAmount(k.currency,k.type)>=k.value}spend(k){return(0,F.sH)(this,arguments,void 0,(function*(k,B="default",U={}){var F;if(k.value=Math.abs(k.value),!this.canAfford(k))throw new Error(`Insufficient funds. Attempting to spend ${k.value} currency-${k.currency}`);if(this.isHardCurrencyValue(k)){const B=V.q.instance.prodigy.open.prefabMenu(j.l.LoadingOverlay,void 0,void 0,!1);try{yield this._hardCurrencyDataProvider.spend(k,U)}finally{B.close()}}else this.isGoldCurrencyValue(k)?this._playerDataProvider.player.changeGold(-k.value):this._playerDataProvider.player.backpack.consume(null!==(F=k.type)&&void 0!==F?F:"currency",k.currency,k.value);this.sendAnalyticsEvents(k,B,U)}))}sendAnalyticsEvents(k,B,U){var F,G,j;const $=k.currency,H=null!==(F=k.type)&&void 0!==F?F:"currency",V=null===(j=null===(G=q.t.getItem(H,$))||void 0===G?void 0:G.data)||void 0===j?void 0:j.name;this.isHardCurrencyValue(k)||this._analytics.item.sendItemRemovedEvent($,V,H,k.value,U)}isStandardCurrencyValue(k){var B;return"currency"===(null!==(B=k.type)&&void 0!==B?B:"currency")}isHardCurrencyValue(k){return this.isStandardCurrencyValue(k)&&$.B.includes(k.currency)}isGoldCurrencyValue(k){return"gold"===k.type||this.isStandardCurrencyValue(k)&&1===k.currency}};(0,F.Cg)([(0,z.b)("5c7-e02d"),(0,F.Sn)("design:type",K.W)],Y.prototype,"_hardCurrencyDataProvider",void 0),(0,F.Cg)([(0,z.b)("e20-0fb0"),(0,F.Sn)("design:type",W.E)],Y.prototype,"_playerDataProvider",void 0),(0,F.Cg)([(0,z.b)("c47-20b6"),(0,F.Sn)("design:type",Function)],Y.prototype,"_analytics",void 0),Y=(0,F.Cg)([(0,G.injectable)()],Y)},2519:(k,B,U)=>{"use strict";U.d(B,{E:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(90744);let H=class extends G.uAl{constructor(){super(...arguments),this.onStartedSpend=new G.HN0,this.onFinishedSpend=new G.HN0,this.onSuccess=new G.HN0,this.onFailure=new G.HN0,this.customData={},this.isProcessingSpend=!1}spend(){this.isProcessingSpend||(this.isProcessingSpend=!0,this.onStartedSpend.dispatch(),this._paymentManager.spend({currency:this.currencyId,value:this.amount},"default",Object.assign({is_magicoin_boosted:27===this.currencyId},this.customData)).then((()=>{this.onSuccess.dispatch(this.currencyId,this.amount)})).catch((k=>{G.RQr.logError(k,"[MakePaymentComponent] Failed to make payment"),this.onFailure.dispatch()})).finally((()=>{this.isProcessingSpend=!1,this.onFinishedSpend.dispatch()})))}destroy(){this.onSuccess.dispose(),this.onFailure.dispose(),this.onStartedSpend.dispose(),this.onFinishedSpend.dispose()}};(0,F.Cg)([(0,G.Cdj)("743-fd51"),(0,F.Sn)("design:type",$.E)],H.prototype,"_paymentManager",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"currencyId",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"amount",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onStartedSpend",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onFinishedSpend",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onSuccess",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onFailure",void 0),(0,F.Cg)([(0,G.vCS)(),(0,G.YLv)("Optional custom data for analytics purposes"),(0,F.Sn)("design:type",Object)],H.prototype,"customData",void 0),H=(0,F.Cg)([(0,G.EVk)("MakePayment",j.Y.economy)],H)},98400:(k,B,U)=>{"use strict";U.d(B,{w:()=>G});var F=U(62459);U(34829);class G{constructor(k){this.questionInterface=null,this.isOverlayOpen=!1,this.onQuestionOpened=new F.HN0,this.onQuestionAnswered=new F.HN0,this.questionInterface=k}get OnQuestionOpened(){return this.onQuestionOpened}get OnQuestionAnswered(){return this.onQuestionAnswered}open(k){this.isOverlayOpen||(this.isOverlayOpen=!0,this.onQuestionOpened.dispatch(),this.questionInterface.question(((k,B,U,F,G,j,$)=>{this.isOverlayOpen=!1,this.onQuestionAnswered.dispatch(k,B,U,F,G,j,$)}),Object.assign({forceAnswerBonus:this.isNFactorEnabled()},k)))}isOpen(){return this.isOverlayOpen}isNFactorEnabled(){return!1}}},76599:(k,B,U)=>{"use strict";var F,G;U.d(B,{w:()=>F}),function(k){k.DEFAULT="default",k.DEFAULT_STRAND_CLUSTERS="default-strand-clusters",k.HOMEWORK="assignment",k.PLACEMENT="placement-test",k.PLACEMENT_BY_STRAND="placement-by-strand-test",k.PLAN="plan",k.GAME_CHALLENGE="game-challenge",k.BACKEND_DEFAULT="default-backend",k.BACKEND_DEFAULT_STRAND_CLUSTERS="default-strand-clusters-backend",k.BACKEND_HOMEWORK="assignment-backend",k.BACKEND_PLACEMENT_BY_STRAND="placement-by-strand-test-backend",k.BACKEND_PLAN="plan-backend"}(F||(F={})),function(k){k.mc="mc",k.tb="tb",k.dd="dd",k["cp-1"]="cp-1",k["cp-2"]="cp-2",k["cp-3"]="cp-3",k["bbc-1"]="bbc-1",k["bbc-2"]="bbc-2",k["bbt-1"]="bbt-1",k["bbt-2"]="bbt-2",k.fc="fc",k["nl-1"]="nl-1",k.clock="clock",k.hc="hc",k["fs-1"]="fs-1",k["fs-2"]="fs-2",k["tf-1"]="tf-1",k["tf-2"]="tf-2",k.bg="bg",k.lp="lp",k.sp="sp",k.grid="grid"}(G||(G={}))},86824:(k,B,U)=>{"use strict";U.d(B,{e:()=>$});var F=U(62459),G=U(15821),j=U(35120);class ${static areRequirementsMet(k){const B=j.q.instance.prodigy.gameContainer.get("073-6f3b");let U=!0;if(G.A.isDefined(k.requireExperiment)&&(G.A.isDefined(k.requireExperimentGroup)?B.getVariation(k.requireExperiment)!==parseInt(k.requireExperimentGroup,10)&&(U=!1):B.isInExperiment(k.requireExperiment)||(U=!1)),G.A.isDefined(k.requireFeature)&&(B.isOn(k.requireFeature)||(U=!1),G.A.isDefined(k.requireFeatureVariables)))for(const[F,j]of Object.entries(k.requireFeatureVariables)){const $=B.getFeatureValue(k.requireFeature),H=G.A.traverseIfObject($,F);G.A.isDefined(H)&&H===j||(U=!1)}return k.invert&&(U=!U),U}static processExperimentVariables(k){const B=j.q.instance.prodigy.gameContainer.get("073-6f3b");if(B){for(const[U,F]of Object.entries(k))if(this.isCompatible(F)){const j=B.getFeatureValue(F.featureName),$=G.A.traverseIfObject(j,F.variableName);k[U]=null!=$?$:F.defaultValue}}else F.VyI.log("Could not find experiment provider",F.$bb.Warning)}static isCompatible(k){return!("object"!=typeof k||!k)&&("string"==typeof k.featureName&&"string"==typeof k.variableName&&"defaultValue"in k)}}},48813:(k,B,U)=>{"use strict";U.d(B,{T:()=>nt});var F=U(8674),G=U(62459);var j=U(77601);const $=(0,j.gb)({key:"active-entity-overrides",activateAssociatedExperiments:1,default:[]});var H=U(15821),V=U(35120),W=U(84399),q=U(13381),K=U(29887),z=U(13956),Y=U(44367);class Q extends Y.z{static sendActivationEvent(){var k;this._segmentExperimentTracker.track("pet-levelup-magicoin-cost"),(null===(k=Q.getVariables())||void 0===k?void 0:k.exchangeRates)&&q.V.setOverrideRates(Q.getVariables().exchangeRates)}static getVariables(){return super.getFeatureVariables()}static isFeatureEnabled(){var k;return super.isFeatureEnabled()&&(null===(k=this.getFeatureVariables())||void 0===k?void 0:k.enabled)}}Q._featureName="pet-levelup-magicoin-cost",(0,F.Cg)([(0,z.b)("47f-ab6a"),(0,F.Sn)("design:type",K.p)],Q,"_segmentExperimentTracker",void 0);var X=U(36233),Z=U(76277),J=U(73678),tt=U(79600),et=U(37251),it=U(77938);class st{constructor(k){this._userID=k}getExperimentVariations(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this._sdkWrapper.gameAssetsExperiments.getAllExperimentsWithCustomData(this._userID);if(!k.isOK())throw new tt.CatalystSdkError(tt.EErrorCode.Unknown,"Error retrieving asset experiment data",`${k.status}: ${JSON.stringify(k.data)}`);const B=new Map;return k.data.result.experiments.forEach((k=>{var U,F,j;for(const $ of k.linkedFeatures){let H;if(G.Aq$.isDefined(k.variation))H={experimentKey:k.variation.experimentKey,featureKey:k.variation.featureKey,variationKey:k.variation.variationKey,variationIndex:k.variation.variationIndex};else{const B=this._featureProvider.evalFeature($);H={experimentKey:k.experimentKey,featureKey:null===(U=B.experimentResult)||void 0===U?void 0:U.featureId,variationKey:null===(F=B.experimentResult)||void 0===F?void 0:F.key,variationIndex:null===(j=B.experimentResult)||void 0===j?void 0:j.variationId}}if(G.Aq$.isDefined(H.variationKey)&&G.Aq$.isDefined(H.featureKey)&&G.Aq$.isDefined(H.variationIndex)){const{experimentKey:k,featureKey:U,variationKey:F}=H,G=`${k}-${U}-${F}`;B.set(G,H)}}})),Array.from(B.values())}))}mergeExperimentAssetData(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.getExperimentVariations();if(k.length>0){const B=yield this._sdkWrapper.gameAssetsExperiments.getAssetsForExperimentsVariations(tt.SourceType.CMS,this._userID,k);if(!B.isOK())throw new tt.CatalystSdkError(tt.EErrorCode.Unknown,"Error retrieving asset experiments",`${B.status}: ${JSON.stringify(B.data)}`);for(const k of B.data.result.assets){const B=it.t.getItem(k.assetType,k.id);B&&k.data.data&&(B.data=k.data.data,G.Aq$.isDefined(k.data.metadata)&&(B.metadata=k.data.metadata))}}}))}}(0,F.Cg)([(0,z.b)("00d-b27e"),(0,F.Sn)("design:type",et.X)],st.prototype,"_sdkWrapper",void 0),(0,F.Cg)([(0,z.b)("073-6f3b"),(0,F.Sn)("design:type",Object)],st.prototype,"_featureProvider",void 0);class nt{static sendFestivalTravelEvent(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(k===J.A_.LAMPLIGHT&&V.q.instance.prodigy.skin.getActiveFestivals().length>0){V.q.instance.prodigy.gameContainer.get("47f-ab6a").track("game-visit-festival")}}))}static sendDecisionEvents(){const k=V.q.instance.prodigy.gameContainer.get("47f-ab6a"),B=V.q.instance.prodigy.gameContainer.get("6b4-590f"),U=["pippet-quest-encounters","difficulty-progression","difficulty-scaling","zone-entry-illustrations-v2","web-push-notification","member-jar","game-overlay-checkout","treasure-track-ux","store-revamp","contextual-offers","pet-capture-and-evo-costs","rifts-v2","prefab-scenes","regional-currency-changes","hud-revamp-2025"];W.R.sendActivationEvent(),X.p.sendActivationEvent(),Q.sendActivationEvent();for(const G of U)k.track(G);const F=(0,Z.G)($);for(const G of F)(0,j.gb)({key:G,default:{},activateAssociatedExperiments:0});B.setup(),nt._onGrowthbookResolved()}static forceExperimentVariation(){const k=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;Array.isArray(k.data.forceExperiment)?k.data.forceExperiment.forEach((k=>{nt._featureProvider.forceVariation(k.experimentKey,parseInt(k.variationKey,10))})):H.A.isDefined(k.data.forceExperiment)&&G.VyI.log("Experiment data was the incorrect type",G.$bb.Error)}static mergeUserExperimentAssetData(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=new st(k);yield B.mergeExperimentAssetData()}))}}nt.ready=new Promise((k=>{nt._onGrowthbookResolved=k})),(0,F.Cg)([(0,z.b)("073-6f3b"),(0,F.Sn)("design:type",Object)],nt,"_featureProvider",void 0)},29887:(k,B,U)=>{"use strict";U.d(B,{p:()=>G});var F=U(62459);class G{constructor(k,B){this._featureProvider=k,this._segment=B}track(k){const{experimentResult:B,experiment:U}=this._featureProvider.evalFeature(k);(null==B?void 0:B.inExperiment)&&U&&F.Aq$.isDefined(B.variationId)&&this._segment.create.experimentVariationAssigned(k,U.key,B.key,this._featureProvider.getAttributes()).send()}}},57070:(k,B,U)=>{"use strict";U.d(B,{w:()=>H});var F=U(8674),G=U(62459);var j=U(35120),$=U(1195);class H extends class{meetsRequirement(k){return!0}}{get activePlayer(){return this._loggedInPlayer.player}constructor(k){super(),this.game=null,this.game=k}getInjectedValue(k){return j.q.instance.prodigy.gameContainer.get(k)}}(0,F.Cg)([(0,G.fFd)("e20-0fb0"),(0,F.Sn)("design:type",$.E)],H.prototype,"_loggedInPlayer",void 0),(0,F.Cg)([(0,G.fFd)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],H.prototype,"_localizer",void 0)},56735:(k,B,U)=>{"use strict";U.d(B,{p:()=>K});var F=U(62459),G=U(37016),j=U(15821),$=U(77938),H=U(22023),V=U(57070),W=U(30226),q=U(9579);class K extends V.w{getDisplayText(k){const{petCount:B,mergeRank:U,evolutionTier:F,level:G,rarity:$}=k,H=q.a.getRuleDescriptionKey(k);return j.A.isDefined(U)?this._localizer.getText(H,B,U):j.A.isDefined(F)?this._localizer.getText(H,B,F):j.A.isDefined(G)?this._localizer.getText(H,B,G):j.A.isDefined($)?this._localizer.getText(H,B,W.J.convertRarityToText(null!=$?$:0)):this._localizer.getText(H,B)}getCurrentValue(k){return K.getPetsSchema(k,this.activePlayer).length}getCurrentProgress(k){return[this.getCurrentValue(k),k.petCount]}meetsRequirement(k){return this.getCurrentValue(k)>=k.petCount}static checkIfMeetsRequirement(k,B){if(!j.A.isDefined(null==k?void 0:k.petCount))return F.VyI.log('Required parameter: "petCount" is not found.',F.$bb.Error),!1;return this.getPetsSchema(k,B).length>=k.petCount}static getPetsSchema(k,B){let U=B.kennel.getPets();return j.A.isDefined(null==k?void 0:k.mergeRank)&&(U=U.filter((B=>{var U,F,j,$;return(null!==(j=H.P8.getPetDisplayMergeRank(null!==(U=B.ID)&&void 0!==U?U:0,null!==(F=B.uniqueID)&&void 0!==F?F:""))&&void 0!==j?j:G.qd.MIN)>=(null!==($=null==k?void 0:k.mergeRank)&&void 0!==$?$:-1)}))),(null==k?void 0:k.affinity)&&(U=U.filter((B=>{var U,F;return(null===(F=null===(U=$.t.getItem("pet",B.ID))||void 0===U?void 0:U.data)||void 0===F?void 0:F.affinity)===k.affinity}))),(null==k?void 0:k.evolutionTier)&&(U=U.filter((B=>{var U,F,G,j,H;return(null!==(j=null===(G=null===(F=null===(U=$.t.getItem("pet",B.ID))||void 0===U?void 0:U.data)||void 0===F?void 0:F.evolution)||void 0===G?void 0:G.tier)&&void 0!==j?j:0)>=(null!==(H=null==k?void 0:k.evolutionTier)&&void 0!==H?H:0)}))),(null==k?void 0:k.unique)&&(U=U.filter(((k,B,U)=>U.findIndex((B=>B.ID===k.ID))===B))),(null==k?void 0:k.level)&&(U=U.filter((B=>{var U,F;return(null!==(U=B.level)&&void 0!==U?U:0)>=(null!==(F=null==k?void 0:k.level)&&void 0!==F?F:0)}))),(null==k?void 0:k.rarity)&&(U=U.filter((B=>{var U,F;return(null===(F=null===(U=$.t.getItem("pet",B.ID))||void 0===U?void 0:U.data)||void 0===F?void 0:F.rarity)===k.rarity}))),U}}},5018:(k,B,U)=>{"use strict";U.d(B,{G:()=>V});var F=U(8674),G=U(79600),j=U(62459),$=U(35120),H=(U(34829),U(57070));class V extends H.w{getCurrentValue(){return V._features}meetsRequirement(k){return this.getCurrentValue().includes(k)}getCurrentProgress(k){return[this.getCurrentValue(),k]}static loadFeatures(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=$.q.instance.prodigy.gameContainer.get("00d-b27e");try{const B=yield k.featureAccess.getFeatures();this._features=B.data.features}catch(B){const k=B;k.code===G.EErrorCode.RequestError?j.VyI.log(`getFeatureAccess Request Error: ${k.name} - ${k.message}`,j.$bb.Error):j.VyI.log(`getFeatureAccess Unexpected Error: ${j.RQr.stringify(B)}`,j.$bb.Error)}}))}}V._features=[]},20706:(k,B,U)=>{"use strict";U.d(B,{L:()=>G});var F=U(68910);class G extends F.Filter{get color1(){return F.Color.shared.setValue(this.uniforms.color1).toNumber()}set color1(k){this.uniforms.color1=F.Color.shared.setValue(k).toRgbArray()}get color2(){return F.Color.shared.setValue(this.uniforms.color2).toNumber()}set color2(k){this.uniforms.color2=F.Color.shared.setValue(k).toRgbArray()}constructor(k,B){super(null,G.FRAGMENT_SHADER,{color1:F.Color.shared.setValue(k).toRgbArray(),color2:F.Color.shared.setValue(B).toRgbArray()})}}G.FRAGMENT_SHADER="\n precision mediump float;\n varying vec2 vTextureCoord;\n uniform sampler2D uSampler;\n uniform vec4 color1;\n uniform vec4 color2;\n \n void main() {\n vec4 c = texture2D( uSampler, vTextureCoord );\n gl_FragColor.rgb = mix(color1.rgb, color2.rgb, c.rgb/c.a);\n gl_FragColor.a = c.a;\n gl_FragColor.rgb *= c.a;\n }"},44357:(k,B,U)=>{"use strict";U.d(B,{BY:()=>ft,EK:()=>Z,GP:()=>Y,MQ:()=>Q,QQ:()=>lt,Qx:()=>dt,Ry:()=>et,Vy:()=>nt,Wf:()=>st,XL:()=>ct,ce:()=>K,dD:()=>q,dU:()=>X,eK:()=>rt,lz:()=>J,pf:()=>it,qb:()=>z,qe:()=>ot,uk:()=>ut,v$:()=>tt,x:()=>at,yH:()=>ht});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(65240),V=U(35120),W=U(43531);G.Egh.timeout;const q=k=>{V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.saveEnabled=k},K=(k,B,U=!1)=>{k.setAnimationByName(0,B,U)},z=(k,B,...U)=>(0,F.sH)(void 0,[k,B,...U],void 0,(function*(k,B,U=!1){return new Promise((F=>{K(k,B,U),k.onComplete.addOnce(F)}))})),Y=(k,B=null,U=H.C.Interactable,F=null,G=null)=>{V.q.instance.prodigy.open.gotItem(k,null,!0,B,void 0,void 0,{source_type:U,source_id:F,transaction_id:G})},Q=(k,...B)=>(0,F.sH)(void 0,[k,...B],void 0,(function*(k,B=null,U=H.C.Interactable,F=null,G=null,j){return new Promise(($=>{k.length>0?V.q.instance.prodigy.open.gotItem(k,$,!0,B,void 0,!0===j,{source_type:U,source_id:F,transaction_id:G}):$()}))})),X=(k,B)=>{const U=V.q.instance.prodigy.notifications;U.pause(B),U.clearNotifications(),k&&(k.Active=!1)},Z=(k,B)=>{V.q.instance.prodigy.notifications.resume(B),k&&(k.Active=!0)},J=(k,B,...U)=>(0,F.sH)(void 0,[k,B,...U],void 0,(function*(k,B,U=1e3,F=!1,j){return new Promise(($=>{const H=new G.I9Y;H.copyFrom(k.localPosition);const W=new G.I9Y;W.copyFrom(B.worldPosition),W.subtract(k.worldPosition);const q={percent:0};j&&(j.shouldFollow=!1),V.q.instance.game.add.tween(q,this).to({percent:1},U,G.GS3.Quadratic.InOut,!0).onUpdateCallback((()=>{k.setPosition(H.x+W.x*q.percent,H.y+W.y*q.percent)})).onTweenComplete.addOnce((()=>{k.setPosition(H.x+W.x,H.y+W.y),F&&j&&(j.shouldFollow=!0),$()}))}))})),tt=k=>(0,F.sH)(void 0,void 0,void 0,(function*(){return new Promise((B=>{W.rD.runDialogueSequence(k,B)}))})),et=(k,B)=>{k.active=B},it=(k,B)=>{k.Active=B},st=(k,B)=>{k.setPosition(B.x,B.y)},nt=(k,B,U,G)=>(0,F.sH)(void 0,void 0,void 0,(function*(){return new Promise((F=>{const j=B.GameObject.transform,$=k.findPath(j.worldPosition,U),H=()=>{G&&j.setScale(j.worldPosition.x{G.Aq$.isDefined(k)||B.setPath([{x:U,y:j}],F),k.findPath(B.x,B.y,U,j,!0).then((k=>{k?F(k):$()})).catch((()=>$()))}));yield rt(B,...F)}))}function rt(k,...B){return(0,F.sH)(this,void 0,void 0,(function*(){yield new Promise((U=>{B.reverse(),k.setPath(B,U)}))}))}const ot=(k,B,U,G,j)=>(0,F.sH)(void 0,void 0,void 0,(function*(){return new Promise((F=>{let $;$=G?{x:G.x,y:G.y}:{x:k.worldPosition.x,y:k.worldPosition.y};const H=V.q.instance.game.add.tween($,this),W=()=>{V.q.instance.game.tweens.remove(H)};H.to({x:B.x,y:B.y},U,j,!0).onUpdateCallback((()=>{k.setPosition($.x,$.y)})),H.onTweenComplete.addOnce((()=>{k.OnDestroy.remove(W,this),k.setPosition(B.x,B.y),F()})),k.OnDestroy.addOnce(W,this)}))})),ht=(k,B,U,j)=>(0,F.sH)(void 0,void 0,void 0,(function*(){return new Promise((F=>{let $;$=j?{x:j.x,y:j.y}:{x:k.worldScale.x,y:k.worldScale.y};const H=V.q.instance.game.add.tween($,this),W=()=>{V.q.instance.game.tweens.remove(H)};H.to({x:B.x,y:B.y},U,G.GS3.Quadratic.InOut,!0).onUpdateCallback((()=>{k.setScale($.x,$.y)})),H.onTweenComplete.addOnce((()=>{k.OnDestroy.remove(W,this),k.setScale(B.x,B.y),F()})),k.OnDestroy.addOnce(W,this)}))})),ct=(k,B,U,j,$)=>(0,F.sH)(void 0,void 0,void 0,(function*(){let F=null!=$?$:B.anchoredPivotOffset;if(F={x:F.x,y:F.y},!(new G.I9Y(U.x,U.y).getDistanceSq(new G.I9Y(F.x,F.y))<=0))return new Promise(($=>{const H=k.add.tween(F,this),W=()=>{V.q.instance.game.tweens.remove(H)};H.to({x:U.x,y:U.y},j,G.GS3.Quadratic.InOut,!0).onUpdateCallback((()=>{B.setAnchoredPivotOffset(F.x,F.y)})),H.onTweenComplete.addOnce((()=>{B.OnDestroy.remove(W,this),B.setAnchoredPivotOffset(U.x,U.y),$()})),B.OnDestroy.addOnce(W,this)}))}));function dt(k,B,...U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=V.q.instance.game.add.tween(B,k,!0);for(const k of U)F.to($().omit(k,"duration","ease","delay"),k.duration,k.ease,!0,k.delay);yield F.onTweenComplete.asPromise()}))}const lt=(k,B)=>{if(k.input.enabled=B,!B){k.input.reset();for(let B=0;B(0,F.sH)(void 0,void 0,void 0,(function*(){return new Promise((U=>{k.time.events.addTimer(B,U,this)}))}));function ft(k,B){k.faceToward(B.x),B.faceToward(k.x)}},13956:(k,B,U)=>{"use strict";U.d(B,{b:()=>G});var F=U(35120);function G(k,B=!0){return(U,G)=>{Object.defineProperty(U,G,{get(){const U=F.q.instance.prodigy.gameContainer.get(k);return B&&null!==U&&Object.defineProperty(this,G,{get:()=>U}),U},configurable:!0})}}},34234:(k,B,U)=>{"use strict";U.d(B,{d:()=>G});var F=U(62459);const G=(k,B=!0)=>(U,G)=>{Object.defineProperty(U,G,{get(){const U=F.wa5.getActiveScene().container.get(k);return B&&null!==U&&Object.defineProperty(this,G,{get:()=>U}),U},configurable:!0})}},26932:(k,B,U)=>{"use strict";U.d(B,{z:()=>$});var F=U(8674),G=U(62459),j=U(26004);class $ extends G.uAl{bindContext(){}unbindContext(){}updateValue(k,B,U){const F=null!=U?U:this._context,G=F.Container;F.getInjectedValue(k)!==B&&(G.rebind(k).toConstantValue(B),this.consumeInjection(F,k))}consumeInjection(k,B){var U;try{k.GameObject.findComponentsInChildren(j.B).filter((k=>k.id===B)).forEach((k=>k.consume()))}catch(F){let j=`Error updating value for identifier: ${B}`;j+=`\n in context: ${null===(U=null==k?void 0:k.GameObject)||void 0===U?void 0:U.name}`,G.VyI.log(`${j}\n${String(F)}`,G.$bb.Error)}}}(0,F.Cg)([(0,G.Pqz)(G.bE_),(0,F.Sn)("design:type",G.bE_)],$.prototype,"_context",void 0)},26004:(k,B,U)=>{"use strict";U.d(B,{B:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this.onCreated=new G.HN0,this.onInject=new G.HN0,this.onInjectNoParams=new G.HN0,this._isSpreadArray=!1,this._consumeOnCreate=!0,this.consumeOnUpdatedInjectedValue=!0}get id(){return this._id}create(){super.create(),this._consumeOnCreate&&this.consume(),this.onCreated.dispatch()}consume(){const k=this.getInjectedValue(this.id);G.Aq$.isDefined(k)&&(this._targetProperty&&(Array.isArray(this._targetComponent[this._targetProperty])?this._isSpreadArray?this._targetComponent[this._targetProperty].push(...k):this._targetComponent[this._targetProperty].push(k):this._isSpreadArray?G.VyI.log("Value has not been set!",G.$bb.Error):this._targetComponent[this._targetProperty]=k),this._isSpreadArray&&Array.isArray(k)?this.onInject.dispatch(...k):this.onInject.dispatch(k),this.onInjectNoParams.dispatch())}destroy(){this.onCreated.dispose(),this.onInject.dispose(),this.onInjectNoParams.dispose(),super.destroy()}};(0,F.Cg)([(0,G.W_S)(),(0,G.YLv)("A unique ID to use for injection"),(0,F.Sn)("design:type",String)],$.prototype,"_id",void 0),(0,F.Cg)([(0,G.MnK)(G.uAl),(0,G.YLv)("The component to which the injected value should be assigned"),(0,F.Sn)("design:type",G.uAl)],$.prototype,"_targetComponent",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.YLv)("The name of the property that should receive the injected value"),(0,F.Sn)("design:type",String)],$.prototype,"_targetProperty",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,G.YLv)("Fired after `consume()` being run on creation"),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onCreated",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onInject",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onInjectNoParams",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_isSpreadArray",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_consumeOnCreate",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"consumeOnUpdatedInjectedValue",void 0),$=(0,F.Cg)([(0,G.EVk)("InjectionConsume",j.Y.injection,"Consumes the injected value and assigns the value to the referenced property")],$)},97071:(k,B,U)=>{"use strict";U.d(B,{p:()=>J});var F=U(62459),G=U(35120),j=U(2221),$=U(8674),H=U(67255);class V{constructor(k){this.game=null,this.game=k}playDialogue(k,B){return(0,$.sH)(this,void 0,void 0,(function*(){return new Promise((U=>{const F=new H.Z(this.game);for(let k=0;k{U()}))}))}))}}class W extends F.JTX{constructor(){super(...arguments),this.onClose=new F.HN0,this.titleKey="",this.messageKey="",this.confirmButtonKey=""}get OnClose(){return this.onClose}get TitleKey(){return this.titleKey}set TitleKey(k){this.titleKey=k}get MessageKey(){return this.messageKey}set MessageKey(k){this.messageKey=k}get ConfirmButtonKey(){return this.confirmButtonKey}set ConfirmButtonKey(k){this.confirmButtonKey=k}open(){const k=G.q.instance.prodigy.open.coOpModal({title:""===this.titleKey?null:this.localization.getText(this.titleKey),body:this.localization.getText(this.messageKey),greenButton:{text:this.localization.getText(this.confirmButtonKey),callback:()=>{this.onClose.dispatch()}}});this.GameObject.legacyTransform.group.addChild(k)}destroy(){this.onClose.dispose(),super.destroy()}}(0,$.Cg)([(0,F.fFd)("Localization"),(0,$.Sn)("design:type",F.dTp)],W.prototype,"localization",void 0);class q extends F.s3P{constructor(k){super(k)}showMessage(k,B,U){const G=new F._mx(this.menuLayer);G.addComponent(F.K16);const j=G.addComponent(W);return j.TitleKey=B,j.MessageKey=k,j.ConfirmButtonKey=U,j}}(0,$.Cg)([(0,F.fFd)("MenuLayer"),(0,$.Sn)("design:type",F._mx)],q.prototype,"menuLayer",void 0);var K=U(5668),z=U(79009),Y=U(95925),Q=U(17425);class X extends F.s3P{constructor(k,B){super(k),this.audioPlayer=null,this.audioPlayer=B}playSoundEffectClip(k,B){const U=Q.K.getAssetID("sfx",k);return this.assetLoader.isLoaded(U,Y.i.Sound)?this.audioPlayer.playSFX(k,B):(this.assetLoader.loadAssets([U]).then((()=>{this.playSoundEffectClip(k,B)})),null)}playSoundEffect(k,B){const U=Q.K.getAssetID("sfx",k);return this.assetLoader.isLoaded(U,Y.i.Sound)?this.audioPlayer.playSound(k,B):(this.assetLoader.loadAssets([U]).then((()=>{this.playSoundEffect(k,B)})),null)}playMusic(k){const B=`bgm-${k}`;this.assetLoader.isLoaded(B,Y.i.Music)?this.audioPlayer.playBGM(k,!0):this.assetLoader.loadAssets([B]).then((()=>{this.playMusic(k)}))}stopMusic(){this.audioPlayer.pauseBGM()}}(0,$.Cg)([(0,F.fFd)(F.t5G.AssetLoader),(0,$.Sn)("design:type",Object)],X.prototype,"assetLoader",void 0);class Z{constructor(k){this.breadcrumbManager=null,this.breadcrumbManager=k}isComplete(k,B){return this.breadcrumbManager.isBreadcrumbComplete(k,B)}completeBreadcrumb(k,B){this.breadcrumbManager.completeBreadcrumb(k,B)}}class J extends F.PQK{constructor(k){super(),this.game=k}installBindings(){const k=G.q.instance.prodigy.gameContainer,B=k.get(F.t5G.AssetLoader),$=k.get("784-6416");this.Container.bind(F.t5G.AssetLoader).toConstantValue(B),this.Container.bind("ImageTinter").toConstantValue($),this.Container.bind("AnimationData").toConstantValue(new z.F(U(34500))),this.Container.bind("BreadcrumbService").toConstantValue(new Z(G.q.instance.prodigy.breadcrumbManager)),this.Container.bind("DialogueFactory").toConstantValue(new V(this.game)),this.Container.bind("Localization").toConstantValue(k.get(F.$Bt.LocalizationService)),this.Container.bind("c5f-aceb").toConstantValue(new K.D(this.Container,G.q.instance.prodigy.gameContainer.get("c97-bd0d"))),this.Container.bind("CurrentPlayer").toConstantValue(k.get("e20-0fb0")),this.Container.bind("AudioPlayer").toConstantValue(new X(this.Container,G.q.instance.prodigy.audio)),this.Container.bind("FeatureFlags").toConstantValue(k.get("80c-6fa4")),this.Container.bind("d30-0043").toConstantValue(new q(this.Container)),this.Container.bind("PrizeProvider").toConstantValue(new j.f(this.Container)),this.Container.bind("DataDogLogger").toConstantValue(k.get("e59-eea6"))}}},46:(k,B,U)=>{"use strict";U.d(B,{C:()=>$});var F=U(8674),G=U(62459);const j=window.EasyStar;U(34829);class ${constructor(k,B=20){this.callbacks=[],this.lowPriorityPathfinderInUse=!1,this.init(k,B)}addCallback(k,B,U){this.callbacks.push({ID:k,callback:B,mainPlayerRequired:U})}init(k,B=20){this.area=k,this.size=B}getCallback(k,B,U){for(const F of this.callbacks)if(F.ID===this.getNodeValue(k,B)&&(!G.Aq$.isDefined(F.mainPlayerRequired)||!F.mainPlayerRequired||U))return F.callback;return null}xyToTile(k,B){return new G.I9Y(Math.floor(k/this.size),Math.floor(B/this.size))}tileToXY(k,B){return new G.I9Y(Math.floor((k+.5)*this.size),Math.floor((B+.5)*this.size))}findPath(k,B,U,G){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U,F,G=!0){return new Promise((j=>{this.findPathInternal(k,B,U,F,j,G,!1)}))}))}findPathSync(k,B,U,F){let G=null;return this.findPathInternal(k,B,U,F,(k=>{G=k}),!0,!0),G}findPathInternal(k,B,U,F,$,H,V){if(this.lowPriorityPathfinderInUse&&!H)return void G.VyI.log("findPath failed. Already finding a path.",G.$bb.Warning);H||(this.lowPriorityPathfinderInUse=!0);let W=Math.floor(k/this.size),q=Math.floor(B/this.size),K=Math.floor(U/this.size),z=Math.floor(F/this.size);W=W>63?63:W<0?0:W,K=K>63?63:K<0?0:K,q=q>35?35:q<0?0:q,z=z>35?35:z<0?0:z;const Y=new j.js;Y.setGrid(this.area),Y.setAcceptableTiles([1,2,3,4,5]),Y.findPath(W,q,K,z,this.processPath.bind(this,U,F,$,H)),V?Y.enableSync():Y.disableSync(),Y.calculate()}processPath(k,B,U,F,j){let $=null;if(G.Aq$.isDefined(j)){const U=[];U.push(j[0]);for(let k=j.length-1;k>0&&U[U.length-1]!==j[k];k--){this.findNodeBetween(U[U.length-1],j[k])||(U.push(j[k]),k=j.length)}$=[];for(let k=U.length-1;k>0;k--)U[k].x*=this.size,U[k].y*=this.size,$.push(U[k]);$[0]=new G.I9Y(k,B)}G.Aq$.isDefined(U)&&U($),F||(this.lowPriorityPathfinderInUse=!1)}findNodeBetween(k,B){let U=B.x-k.x,F=B.y-k.y;const j=Math.abs(U)>=Math.abs(F)?Math.abs(U):Math.abs(F);if(0===j)return k;U/=j,F/=j;let $=k.x,H=k.y,V=k;for(;$!==B.x||H!==B.y;){if($+=U,H+=F,(U>0&&$>B.x||U<0&&$0&&H>B.y||F<0&&H0&&6!==U}getNodeValue(k,B){return B=0&&k=0?this.area[B][k]:-1}isPathBlocked(k,B,U,F){const j=this.findNodeBetween(new G.I9Y(Math.floor(k/this.size),Math.floor(B/this.size)),new G.I9Y(Math.floor(U/this.size),Math.floor(F/this.size)));return G.Aq$.isDefined(j)}reset(){this.lowPriorityPathfinderInUse=!1}}},24110:(k,B,U)=>{"use strict";U.d(B,{B:()=>H});var F=U(8674),G=U(62459),j=U(72055),$=U(28152);let H=class extends j.Q{};H=(0,F.Cg)([(0,G.EVk)("SortingAnchor",$.Y.map,"Deprecated use BaseRenderComponent instead")],H)},53885:(k,B,U)=>{"use strict";U.d(B,{u:()=>V});var F=U(8674),G=U(62459),j=U(68910),$=U(72055),H=U(28152);let V=class extends $.Q{create(){super.create(),this._updateTicker=j.Ticker.shared.add(this.gameObject.update,this.gameObject),this._groupContainer.onDestroy.addOnce((()=>{var k;null===(k=this.gameObject)||void 0===k||k.destroy()}),this)}destroy(){this._updateTicker&&this.gameObject&&this._updateTicker.remove(this.gameObject.update,this.gameObject),this._updateTicker=null,this._groupContainer.onDestroy.removeAll(this),super.destroy()}overridePIXIUpdateFunction(){}resetPIXIUpdateFunction(){}};V=(0,F.Cg)([(0,G.EVk)("GroupRelay",H.Y.root)],V)},68370:(k,B,U)=>{"use strict";U.d(B,{b:()=>W});var F,G=U(8674),j=U(62459),$=U(35120),H=U(34829),V=U(28152);let W=F=class extends j.y4o{constructor(){super(...arguments),this._parentGroup=null}static make(k,B){const U=k.addComponent(F,!1);return U._legacyTransformTarget=B,U.create(),U}create(){super.create(),this._parentGroup=$.q.instance.game.add.group(null,`${this.GameObject.name} - LegacyTransformRelay`),this.setRootContainer(this._parentGroup),this._legacyTransformTarget&&(this.reParentLegacyTransform(),this._legacyTransformTarget.GameObject.onHierarchyChanged.add(this.reParentLegacyTransform,this,-H.s.MAX_SAFE_INTEGER))}destroy(){var k;this._legacyTransformTarget&&(this._parentGroup.removeChild(this._legacyTransformTarget.group),null===(k=this._legacyTransformTarget.GameObject)||void 0===k||k.onHierarchyChanged.remove(this.reParentLegacyTransform,this)),this._parentGroup.destroy(),super.destroy()}getDimensions(){return new j.or0(this._legacyTransformTarget.width,this._legacyTransformTarget.height)}reParentLegacyTransform(){this._parentGroup.addChild(this._legacyTransformTarget.group)}};(0,G.Cg)([(0,j.MnK)(j.K16),(0,G.Sn)("design:type",j.K16)],W.prototype,"_legacyTransformTarget",void 0),W=F=(0,G.Cg)([(0,j.EVk)("LegacyTransformRelay",V.Y.root)],W)},73402:(k,B,U)=>{"use strict";U.d(B,{N:()=>W});var F,G=U(8674),j=U(62459),$=U(68910),H=U(28152),V=U(53885);let W=F=class extends j.dLy{constructor(){super(...arguments),this._displayObject=null,this._initialValues={}}get localPosition(){return this.worldPosition}set localPosition(k){this._initialValues?this._initialValues.position=k:this._displayObject.position.set(k.x,k.y)}get localScale(){return this.worldScale}set localScale(k){this._initialValues?this._initialValues.scale=k:this._displayObject.scale.set(k.x,k.y)}get localRotation(){var k,B;return null!==(B=null===(k=this._displayObject)||void 0===k?void 0:k.rotation)&&void 0!==B?B:0}set localRotation(k){this._initialValues?this._initialValues.rotation=k:this._displayObject.rotation=k}get localMatrix(){return this.worldMatrix}get worldMatrix(){var k,B;return null!==(B=null===(k=this._displayObject)||void 0===k?void 0:k.worldTransform)&&void 0!==B?B:new $.Matrix}getReadonlyWorldMatrix(){var k,B;const U=null!==(B=null===(k=this._displayObject)||void 0===k?void 0:k.worldTransform)&&void 0!==B?B:new $.Matrix;return new j.E1D(U.a,U.c,U.b,U.d,U.tx,U.ty)}get worldPosition(){var k,B;const U=null!==(B=null===(k=this._displayObject)||void 0===k?void 0:k.worldTransform)&&void 0!==B?B:new $.Matrix;return new j.I9Y(U.tx,U.ty)}get worldScale(){var k,B;const U=null!==(B=null===(k=this._displayObject)||void 0===k?void 0:k.worldTransform)&&void 0!==B?B:new $.Matrix;return new j.I9Y(U.a,U.d)}static make(k,B){const U=k.addComponent(F,!1);return U._groupRelayComponent=B,U.create(),U}create(){super.create();const k=this._groupRelayComponent.getRootContainer();k?(this._displayObject=k,this.applyInitialValues()):this._groupRelayComponent.onRootContainerSet.addOnce((()=>{this._displayObject=this._groupRelayComponent.getRootContainer(),this.applyInitialValues()}))}applyInitialValues(){this._initialValues&&(this._initialValues.position&&this._displayObject.position.set(this._initialValues.position.x,this._initialValues.position.y),this._initialValues.scale&&this._displayObject.scale.set(this._initialValues.scale.x,this._initialValues.scale.y),void 0!==this._initialValues.rotation&&(this._displayObject.rotation=this._initialValues.rotation),this._initialValues=void 0)}recalculateWorldTransform(){const k=this._displayObject.transform._worldID;k!==this._pixiTransform._worldID&&(this._pixiTransform.worldTransform.copyFrom(this._displayObject.worldTransform),this._pixiTransform._worldID=k)}recalculateTransform(){const k=this._displayObject.transform._localID;k!==this._pixiTransform._localID&&(this._pixiTransform.localTransform.copyFrom(this._displayObject.localTransform),this._pixiTransform._localID=k)}};(0,G.Cg)([(0,j.Pqz)(V.u),(0,G.Sn)("design:type",V.u)],W.prototype,"_groupRelayComponent",void 0),W=F=(0,G.Cg)([(0,j.EVk)("TransformRelay",H.Y.root)],W)},65165:(k,B,U)=>{"use strict";U.d(B,{k:()=>K});var F=U(8674),G=U(62459),j=U(10044),$=U(35120),H=U(77801),V=U(28152),W=U(88060),q=U(23082);let K=class extends G.JTX{constructor(){super(...arguments),this._tooCloseThresholdPixels=20,this.onComplete=new G.HN0,this._alwaysCompletes=!1,this._forceLegacyPathfinding=!1}run(){var k;const B=this.GameObject.transform.worldPosition;if(!this._playerPathfinder||this._forceLegacyPathfinding)return this._tileScreen=$.q.instance.game.state.get(q.G.TileScreen),void((null===(k=this._tileScreen)||void 0===k?void 0:k.user)&&this._tileScreen.user.setValidPath(this._tileScreen.path,B.x,B.y,(()=>this.pathCompleted())));const U=this._playerPathfinder.pathTo(B.x,B.y);if(U||this._beelineOnFailure)U||this._playerLocomotion.setPath([this._playerLocomotion.GameObject.transform.worldPosition,B]),this._playerLocomotion.onPathStart.add(this.clearPathListeners,this),this._alwaysCompletes?this._playerLocomotion.onPathEnd.add(this.ensureCompletion,this):this._playerLocomotion.onPathComplete.add(this.pathCompleted,this);else if(!U){const k=this._playerLocomotion.GameObject.transform.worldPosition,U=B;G.cj9.distance(k.x,k.y,U.x,U.y){"use strict";U.d(B,{Z:()=>W});var F,G=U(8674),j=U(62459),$=U(79687),H=U(95891),V=U(35120);let W=F=class{constructor(){var k,B,U;this._nextLimitLower=Number.MAX_SAFE_INTEGER,this._nextLimitRaise=0,this._recentFramerates=[],this._lastFramerateMeasure=0,this._fpsTimer=V.q.instance.game.fps;const G=V.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("remotePlayerDisplayLimit");this._playerLimitMin=null!==(k=null==G?void 0:G.min)&&void 0!==k?k:F.PLAYER_LIMIT_MIN,this._playerLimitMax=null!==(B=null==G?void 0:G.max)&&void 0!==B?B:F.PLAYER_LIMIT_MAX,this._evaluateIntervalMs=null!==(U=null==G?void 0:G.interval)&&void 0!==U?U:F.EVALUATE_INTERVAL_MS}init(){const k=Math.min(this._playerLimitMax,F.INITIAL_PLAYER_LIMIT_MAX);this._currentPlayerLimit=j.cj9.clamp(Math.floor(j.cj9.mapLinear(this._fpsTimer.getAverageFramerate(),F.INITIAL_FPS_INDICATION_MIN,F.INITIAL_FPS_INDICATION_MAX,this._playerLimitMin,k)),this._playerLimitMin,k)}enteredZone(){this._nextLimitLower=Date.now()+F.FPS_STABILIZATION_TIME_MS,this.resetFpsAverage()}evaluateLimit(k,B){const U=this.getFramerate(),G=Date.now(),$=this._currentPlayerLimit;return U=this._nextLimitLower&&(this._currentPlayerLimit=Math.max(this._playerLimitMin,Math.floor(k*U/F.FPS_ADJUST_LOWER_THRESHOLD)),this._nextLimitLower=G+this._evaluateIntervalMs,this._nextLimitRaise=G+F.PLAYER_LIMIT_LOWER_BACKOFF_MS,this.resetFpsAverage()):this._nextLimitLower=G+this._evaluateIntervalMs,k>=this._currentPlayerLimit&&U>F.FPS_ADJUST_UPPER_THRESHOLD&&B>k*F.FPS_ADJUST_VISIBLE_PLAYER_RATIO&&G>=this._nextLimitRaise&&(this._currentPlayerLimit=Math.min(this._playerLimitMax,Math.ceil(k*U/F.FPS_ADJUST_UPPER_THRESHOLD)),this._nextLimitRaise=G+this._evaluateIntervalMs,this.resetFpsAverage()),this._currentPlayerLimit!==$&&j.VyI.log(`Changing player limit from ${$} to ${this._currentPlayerLimit}. Average FPS: ${U}. Visible Players: ${B}`,j.$bb.Verbose),this._currentPlayerLimit}getFramerate(){const k=Date.now();return k>=this._lastFramerateMeasure+1e3&&(this._recentFramerates.length>=F.FPS_AVERAGE_TIME_S&&this._recentFramerates.shift(),this._recentFramerates.push(this._fpsTimer.getFramerate()),this._averageFramerate=H.sum(this._recentFramerates)/this._recentFramerates.length,this._lastFramerateMeasure=k),this._averageFramerate}resetFpsAverage(){this._lastFramerateMeasure=Date.now(),this._recentFramerates.length=0}};W.FPS_ADJUST_LOWER_THRESHOLD=25,W.FPS_ADJUST_UPPER_THRESHOLD=40,W.FPS_ADJUST_VISIBLE_PLAYER_RATIO=.8,W.FPS_STABILIZATION_TIME_MS=2e3,W.EVALUATE_INTERVAL_MS=5e3,W.FPS_AVERAGE_TIME_S=10,W.PLAYER_LIMIT_MIN=5,W.PLAYER_LIMIT_MAX=30,W.INITIAL_FPS_INDICATION_MIN=20,W.INITIAL_FPS_INDICATION_MAX=60,W.INITIAL_PLAYER_LIMIT_MAX=30,W.PLAYER_LIMIT_LOWER_BACKOFF_MS=3e4,W=F=(0,G.Cg)([(0,$.injectable)(),(0,G.Sn)("design:paramtypes",[])],W)},65116:(k,B,U)=>{"use strict";U.d(B,{$:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(40392);let H=class extends G.uAl{constructor(){super(...arguments),this._onAllowed=new G.HN0}check(){const k=this.mapTag.split("-")[0];$.i.isZoneLocked(k)?$.i.openLockMessage(k):this._onAllowed.dispatch()}destroy(){this._onAllowed.dispose(),super.destroy()}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"mapTag",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"_onAllowed",void 0),H=(0,F.Cg)([(0,G.EVk)("CanTeleport",j.Y.MapTeleport)],H)},49037:(k,B,U)=>{"use strict";U.d(B,{q:()=>q});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(40392),V=U(4631),W=U(73678);let q=class extends G.uAl{constructor(){super(...arguments),this.mapTag="",this.goToDefaultMap=!1}teleport(){const k=j.q.instance.prodigy.world.getCurrentZone(),B=j.q.instance.prodigy.world.getZone(k||W.A_.HOUSE),U=this.mapTag.split("-")[0],F=H.i.getZoneData(U),G=this.goToDefaultMap?H.i.getDefaultMapForZone(F):this.mapTag;B.handleLeaving(V.j.teleport,(()=>j.q.instance.prodigy.world.it(G)))}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],q.prototype,"mapTag",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],q.prototype,"goToDefaultMap",void 0),q=(0,F.Cg)([(0,G.EVk)("TeleportToZone",$.Y.MapTeleport)],q)},54336:(k,B,U)=>{"use strict";U.d(B,{s:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(30488);let H=class extends $.E{constructor(){super(...arguments),this.radius=160}containsTarget(){const k=this.GameObject.transform.worldPosition,B=this.target.transform.worldPosition,U=G.C1c.getDistanceSq(k,B);return 0!==U&&U<=this.radius*this.radius}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"radius",void 0),H=(0,F.Cg)([(0,G.EVk)("CircleTrigger",j.Y.trigger)],H)},30488:(k,B,U)=>{"use strict";U.d(B,{E:()=>j});var F=U(8674),G=U(62459);class j extends G.y4o{constructor(){super(...arguments),this.onEnter=new G.HN0,this.onExit=new G.HN0,this._isTargetInBounds=!1,this._allowTriggerOnCreate=!0}create(){var k;super.create(),!this._allowTriggerOnCreate&&(null===(k=this.target)||void 0===k?void 0:k.active)&&this.containsTarget()&&(this._isTargetInBounds=!0)}update(){var k;if(super.update(),null===(k=this.target)||void 0===k?void 0:k.active){const k=this.containsTarget();this._isTargetInBounds?k||this.onExit.dispatch(this.target.transform.worldPosition):k&&this.onEnter.dispatch(this.target.transform.worldPosition),this._isTargetInBounds=k}}destroy(){this.onEnter.dispose(),this.onExit.dispose(),super.destroy()}getDimensions(){return G.or0.ZERO}}(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"onEnter",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],j.prototype,"onExit",void 0),(0,F.Cg)([(0,G.Cdj)("TriggerTarget"),(0,F.Sn)("design:type",G._mx)],j.prototype,"target",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],j.prototype,"_allowTriggerOnCreate",void 0)},65826:(k,B,U)=>{"use strict";U.d(B,{P:()=>G,b:()=>Q});var F,G,j=U(8674),$=U(62459),H=U(79687),V=U(35120),W=U(73722),q=U(73797),K=U(64582),z=U(80403),Y=U(16887);!function(k){k.NotRequired="NOT_REQUIRED",k.NotRequested="NOT_REQUESTED",k.Requested="REQUESTED",k.Approved="GRANTED",k.Denied="DENIED",k.Revoked="REVOKED"}(G||(G={}));let Q=F=class{get consentStatus(){return this._consentStatus}get gracePeriodDaysLeft(){if(!this._gracePeriodEndDate)return 0;const k=new Date(V.q.instance.prodigy.timeManager.getServerTimeMs()),B=Date.UTC(k.getUTCFullYear(),k.getUTCMonth(),k.getUTCDate()),U=new Date(this._gracePeriodEndDate),F=Date.UTC(U.getUTCFullYear(),U.getUTCMonth(),U.getUTCDate());return Math.max(0,1.1574074074074074e-8*Math.round(F-B))}get gracePeriodMsLeft(){var k;return Math.max(0,(null!==(k=this._gracePeriodEndDate)&&void 0!==k?k:0)-Date.now())}constructor(k,B,U,F,G){this.onConsentStatusChange=new $.HN0,this.onGracePeriodDaysLeftSet=new $.HN0,this.onGracePeriodMsLeftSet=new $.HN0,this._graphQl=k,this._localizer=B,this._segment=U,this._featureRequirements=G,V.q.instance.prodigy.game.broadcaster.addAppListener(q.H3.MembershipResponseReceived,this.handleMembershipChange,this),F.getData().then((()=>this.scheduleNextFetch(0))).catch((k=>{$.VyI.log(`Could not get geolocation while checking consent status, ${k.message}`,$.$bb.Error),this.scheduleNextFetch(0)}))}sendConsentRequest(k){return(0,j.sH)(this,void 0,void 0,(function*(){let B;try{const U=yield this._graphQl.sendRequest(F.SEND_CONSENT_REQUEST_MUTATION,{parentEmail:k});if(!z.K.responseIsGraphQLError(U))return void this.setConsentStatus(G.Requested);const j=`GRAPHQL_ERROR_${z.K.getGraphQLErrorCode(U)}`,$=this._localizer.getText(j);$!==j&&(B=$)}catch(e){$.VyI.log(`Error sending consent request: ${$.RQr.stringify(e)}`,$.$bb.Error)}return Promise.reject(new Error(null!=B?B:this._localizer.getText("GRAPHQL_ERROR_DEFAULT")))}))}static getConsentStatusMessage(k){return V.q.instance.prodigy.gameContainer.get($.$Bt.LocalizationService).getText(F.CONSENT_STATUS_ACTION_MESSAGES[k])}static statusRequiresConsent(k){return[G.NotRequested,G.Requested].includes(k)}handleMembershipChange(k){"success"===k&&(this.setConsentStatus(G.NotRequired),V.q.instance.prodigy.game.broadcaster.removeAppListener(q.H3.MembershipResponseReceived,this.handleMembershipChange))}scheduleNextFetch(k=F.STATUS_UPDATE_CHECK_INTERVAL_MS){this._fetchTimeout||("school"!==W.V.instance.selectedLocation&&this._featureRequirements.meetsRequirementsDeprecated(28)?this._fetchTimeout=window.setTimeout((()=>{this.fetchStatus().catch((k=>{$.VyI.log(`Error fetching consent status: ${$.RQr.stringify(k)}. Retrying.`,$.$bb.Error),this.scheduleNextFetch()}))}),k):this.setConsentStatus(G.NotRequired))}cancelNextFetch(){this._fetchTimeout&&(window.clearTimeout(this._fetchTimeout),this._fetchTimeout=null)}fetchStatus(){return(0,j.sH)(this,void 0,void 0,(function*(){var k,B,U,G,j,H,V;this._fetchTimeout=null;const W=yield this._graphQl.sendRequest(F.CONSENT_STATUS_QUERY),q=null===(U=null===(B=null===(k=null==W?void 0:W.data)||void 0===k?void 0:k.viewer)||void 0===B?void 0:B.parentalConsent)||void 0===U?void 0:U.inGameDialogStatus,K=new Date(null===(V=null===(H=null===(j=null===(G=null==W?void 0:W.data)||void 0===G?void 0:G.viewer)||void 0===j?void 0:j.parentalConsent)||void 0===H?void 0:H.gracePeriod)||void 0===V?void 0:V.expiresAt).getTime();return q&&this.setConsentStatus(q),$.Aq$.isDefined(K)&&this.setGracePeriodEndDate(K),q}))}setConsentStatus(k){switch(this._consentStatus!==k&&(this._consentStatus=k,this.onConsentStatusChange.dispatch(k)),this._consentStatus){case G.Approved:this._segment.consent.sendFunnelAdvancedSegmentEvent(Y.g.StepThree,Y.f.PermissionGranted);case G.NotRequired:case G.NotRequested:this.cancelNextFetch();break;case G.Requested:default:this.scheduleNextFetch()}}setGracePeriodEndDate(k){this._gracePeriodEndDate=k,this.onGracePeriodDaysLeftSet.dispatch(this.gracePeriodDaysLeft),this.onGracePeriodMsLeftSet.dispatch(this.gracePeriodMsLeft)}};Q.STATUS_UPDATE_CHECK_INTERVAL_MS=6e5,Q.CONSENT_STATUS_ACTION_MESSAGES={[G.NotRequired]:"PARENTAL_CONSENT_NOT_REQUIRED",[G.NotRequested]:"PARENTAL_CONSENT_NOT_REQUESTED",[G.Requested]:"PARENTAL_CONSENT_REQUESTED",[G.Approved]:"PARENTAL_CONSENT_APPROVED",[G.Denied]:"",[G.Revoked]:""},Q.CONSENT_STATUS_QUERY="\n query getParentalConsent {\n viewer {\n parentalConsent {\n inGameDialogStatus,\n gracePeriod {\n expiresAt\n }\n }\n }\n }\n ",Q.SEND_CONSENT_REQUEST_MUTATION="\n mutation createParentalConsentRequest($parentEmail: EmailAddress!) {\n createParentalConsentRequest(input: { parentEmail: $parentEmail }) {\n parentalConsentRequest {\n id\n }\n }\n }\n ",Q=F=(0,j.Cg)([(0,H.injectable)(),(0,j.Qj)(0,(0,H.inject)("8bb-7057")),(0,j.Qj)(1,(0,H.inject)($.$Bt.LocalizationService)),(0,j.Qj)(2,(0,H.inject)("c47-20b6")),(0,j.Qj)(3,(0,H.inject)("fab-547a")),(0,j.Qj)(4,(0,H.inject)("db5-fb6e")),(0,j.Sn)("design:paramtypes",[z.K,$.dTp,Function,K.O,Object])],Q)},15016:(k,B,U)=>{"use strict";U.d(B,{R:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(99625),H=U(73722),V=U(65826);class W{showBanner(k){const B=new G.kBN(((U,F)=>{this.loadBanner().then((U=>{B.cancelled||!U||U.isDestroyed||k.addChild(U)})).catch((k=>{F(k)}))}));return B}hideBanner(){this._gameObject&&(this._gameObject.destroy(),this._gameObject=null),G.Aq$.isDefined(this._gameObjectLoadPromise)&&(this._gameObjectLoadPromise.cancel(),this._gameObjectLoadPromise=null)}getBannerGameObject(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;return null===(k=this._gameObjectLoadPromise)||void 0===k?void 0:k.promise}))}loadBanner(){return(0,F.sH)(this,void 0,void 0,(function*(){if(G.Aq$.isDefined(this._gameObjectLoadPromise))return this._gameObjectLoadPromise;if("school"===H.V.instance.selectedLocation)return Promise.resolve(this._gameObject);switch(this._parentalConsentService||(this._parentalConsentService=j.q.instance.prodigy.gameContainer.get("580-3bea")),this._parentalConsentService.consentStatus){case V.P.NotRequired:case V.P.Approved:return Promise.resolve(this._gameObject)}return this._gameObjectLoadPromise=j.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID($.l.ParentalConsentBanner).then((k=>this._gameObject=k)).catch(G.RQr.createHandler("Unable to load consent banner")),this._gameObjectLoadPromise}))}}W.HUD_RESERVE_HEIGHT=70},20597:(k,B,U)=>{"use strict";U.d(B,{B:()=>V});var F=U(8674),G=U(62459),j=U(51941),$=U(131);class H extends $.w{constructor(){super(...arguments),this.fileExtension="petgear"}}let V=class extends j.c{};(0,F.Cg)([(0,G.SZi)(),(0,G.tW2)("petgear"),(0,F.Sn)("design:type",Array)],V.prototype,"gear",void 0),V=(0,F.Cg)([(0,G.WR4)(H),(0,G.EVk)("PetGearManager",G.YH6.animation)],V)},32500:(k,B,U)=>{"use strict";U.d(B,{h:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this.emotes=[],this.emoteAssets=[]}postCreate(){super.postCreate(),this._playerData&&(j.q.instance.prodigy.load.assets(this.emotes,this.loadEmotes.bind(this)),this.emoteAssets&&this._playerData.isActivePlayer()&&(j.q.instance.prodigy.gameContainer.get("e20-0fb0").player.emotes=this.emoteAssets))}loadEmotes(){for(const k of this.emotes)if(G.Aq$.isDefined(k)&&0!==k.length){const B=j.q.instance.game.cache.getJSON(k);B&&this.emoteAssets.push(B)}}};(0,F.Cg)([(0,G.Cdj)("377-3e7b"),(0,F.Sn)("design:type",Object)],H.prototype,"_playerData",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.tW2)("emote"),(0,F.Sn)("design:type",Array)],H.prototype,"emotes",void 0),H=(0,F.Cg)([(0,G.EVk)("EmoteManager",$.Y.animation)],H)},62889:(k,B,U)=>{"use strict";U.d(B,{M:()=>V});var F=U(8674),G=U(57975),j=U.n(G),$=U(62459),H=U(35120);class V{static loadGearElementFromGuid(k){return(0,F.sH)(this,void 0,void 0,(function*(){H.q.instance.game.cache.checkJSONKey(k)||(yield H.q.instance.prodigy.load.assetsAsPromise([k]));const B=H.q.instance.game.cache.getJSON(k);return B?$.KDe.fromGearFile(B):($.RQr.createHandler(`[GearFileUtil] No content for ${k}`),null)}))}static makeGear(k,B,U){const F=new $.KDe;let G=B;if(U.isDir(k)){U.readdirSync(k,!0).filter((k=>k.endsWith(".meta"))).forEach((B=>{const G=JSON.parse(U.readFileSync(j().join(k,B)).toString());let $=j().basename(B);$=$.substring(0,$.indexOf(".")),F.attachments.push({imageGuid:G.guid,name:$})}))}else{G=`${j().join(j().dirname(B),j().basename(B).split(".")[0])}.gear`;const $=`${k}.meta`,H=JSON.parse(U.readFileSync($).toString());F.attachments.push({imageGuid:H.guid,name:"weapon"})}U.writeToPath(G,$.KDe.toGearFile(F))}static generateGearHelperNode(k,B){const U=[$._Lw.halfBlankLine()],F=j().join(k.getAssetsPath(),B),G=k.getChildFolders(F,!1);let H=0,V=0,W=0;G.forEach((G=>{const q=j().join(F,G,B),K=j().join(F,G,"images"),z=k.readdirSync(q).map((k=>j().basename(k,`.${B}`))),Y=k.readdirSync(K);H+=z.length;const Q=this.findGearMissingImageFolder(z,Y,j().join(F,G),k,B),X=this.findImageFolderMissingGear(z,Y,q,K,k,B);0===Q.length&&0===X.length?U.push($.ly.create({id:`found-${B}-${G}`,labelValue:`✅ Found ${z.length} ${G} .${B} files.`})):(0!==X.length&&(V+=X.length,U.push($.ly.create({id:`missing-${B}-${G}`,labelValue:`⚠️ Found ${X.length} missing ${G} .${B} files.`})),U.push($.XRp.createVertical(X,{isCollapsible:!0,startCollapsed:!0,title:`Missing ${G} ${B} info`}))),0!==Q.length&&(W+=Q.length,U.push($.ly.create({id:`missing-image-${G}`,labelValue:`⚠️ Found ${Q.length} missing ${G} image refs in .${B} files.`})),U.push($.XRp.createVertical(Q,{isCollapsible:!0,startCollapsed:!0,title:`Missing ${G} image info`}))))}));let q="";return V>0&&(q=` ${V} .${B} files missing!`),W>0&&(q+=` ${W} images missing!`),q.length||(q=` ${H} .${B} files in project.`),$.XRp.createVerticalContainer(U,{isCollapsible:!0,startCollapsed:!0,title:`Global Gears -${q}`})}static findGearMissingImageFolder(k,B,U,F,G){const H=[];return k.forEach((k=>{if(-1===B.indexOf(k)&&-1===B.indexOf(`${k}.png`)&&-1===B.indexOf(`${k}.svg`))H.push($.XRp.createHorizontal([$.ly.create({labelValue:`Cant find image/folder for ${k}.`,id:`missing-${k}`}),$.X9M.create({buttonText:"Open Gear Folder",id:`open-gear-${k}`,buttonIcon:$.a2l.Gear,onClick:()=>{F.externalOpenFolder(j().join(U,G))}}),$.X9M.create({buttonText:"Open Image Folder",id:`open-image-${k}`,buttonIcon:$.a2l.Image,onClick:()=>{F.externalOpenFolder(j().join(U,"images"))}})]));else{const B=j().join(U,G,`${k}.${G}`),V=$.KDe.fromGearFile(JSON.parse(F.readFileSync(B).toString()));V?V.attachments.forEach(((G,W)=>{!!F.getFilePath(G.imageGuid)||H.push($.XRp.createVertical([$.ly.create({id:`missing-${k}-image-guid-${G.name}`,labelValue:`⚠️ ${k} can't find ${G.name} guid ${G.imageGuid} in project`}),$.X9M.create({buttonText:"Open Image Folder",id:`open-image-${k}`,buttonIcon:$.a2l.Image,onClick:()=>{F.externalOpenFolder(j().join(U,"images",k))}}),$.X9M.create({buttonText:"Remove Gear Attachment",id:`remove-attachment-${k}`,buttonIcon:$.a2l.Eraser,onClick:()=>{V.attachments.splice(W,1),F.writeToPath(B,$.KDe.toGearFile(V))}})]))})):H.push($.ly.create({id:`failed-to-load-gear-${k}`,labelValue:`⚠️ Failed to parse ${k}`}))}})),H}static findImageFolderMissingGear(k,B,U,F,G,H){const W=[];for(let q=0;q{G.externalOpenFolder(k)}})])):W.push($.XRp.createHorizontal([$.ly.create({id:"missing-gear-label",labelValue:`${B[q]} imageSets missing .${H}.`}),$.X9M.create({id:"missing-gear-fix",buttonText:"Create Gear",buttonIcon:$.a2l.Gear,onClick:()=>{const k=j().join(U,`${B[q]}.${H}`);V.makeGear(j().join(F,B[q]),k,G),G.setEditorBrowserPath(k)}})]))}return W}}},51941:(k,B,U)=>{"use strict";U.d(B,{c:()=>K});var F=U(8674),G=U(62459),j=U(68910),$=U(88818),H=U(35120),V=U(17425),W=U(131),q=U(8900);let K=class extends G.a5k{create(){super.create(),this.attachmentToSlotMap=new Map($.e9),this.slotToAttachmentMap=new Map($.$6),this.initialAtlasFrames=$.yG}refresh(){const k=Object.create(null,{refresh:{get:()=>super.refresh}});return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,j;if((null===(B=this.spine)||void 0===B?void 0:B.pendingDestroy)||(null===(U=this.spine)||void 0===U?void 0:U.destroyed)){const k=null!==(j=null===(F=this.gameObject.findComponent(G.v2j))||void 0===F?void 0:F.getSpine())&&void 0!==j?j:null;if(!k)return void G.VyI.log(`[GearManagerComponent] Spine was destroyed, and could not be found on gameobject ${this.gameObject.name}`,G.$bb.Warning);this.spine=k}this.gear.length&&(yield this.applyGearFiles()),yield k.refresh.call(this),this.cacheCurrentAssets()}))}applyGearFiles(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.loadGearFiles(this.gear);const k=[];this.gear.forEach((B=>{if(null==B?void 0:B.length){const U=G.W$e.instance.game.cache.getJSON(B);if(U){const F=G.KDe.fromGearFile(U);F?k.push(this.addGear(F,!1)):G.VyI.log(`[GearManagerComponent] could not find gear element json ${B}`,G.$bb.Warning)}}})),yield Promise.all(k)}))}cacheCurrentAssets(){V.K.cacheAssets(H.q.instance.game,this.gear,V.K.zoneAssetsCached),V.K.cacheAssets(H.q.instance.game,this._allCurrentImageGuids,V.K.zoneAssetsCached)}getSizeForAttachment(k,B){var U,F;const G=k.name;if(q.M.instance.faceAttachments.includes(G))return new j.Rectangle(4*B.x,4*B.y,4*B.width,4*B.height);if(q.M.instance.eyeAttachments.includes(G))return new j.Rectangle(4*B.x,4*B.y,4*B.width*(null!==(U=k.scaleX)&&void 0!==U?U:1),4*B.height*(null!==(F=k.scaleY)&&void 0!==F?F:1));if(0===k.type){const B=k;return new j.Rectangle(B.x,B.y,B.width,B.height)}return super.getSizeForAttachment(k,B)}loadGearFiles(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=k.filter((k=>null==k?void 0:k.length));return B.every((k=>H.q.instance.game.cache.checkJSONKey(k)))?Promise.resolve():this.loadAssets(B)}))}loadImages(k){return(0,F.sH)(this,void 0,void 0,(function*(){return k.filter((k=>null==k?void 0:k.length)).every((k=>(null==k?void 0:k.length)&&H.q.instance.game.cache.checkImageKey(k)))?Promise.resolve():this.loadAssets(k)}))}loadAssets(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=new G.bnh;return H.q.instance.prodigy.load.assets(k,((k,U)=>{U?B.resolve():B.reject()})),B}))}};K=(0,F.Cg)([(0,G.WR4)(W.w),(0,G.EVk)("GearManager",G.YH6.animation)],K)},131:(k,B,U)=>{"use strict";U.d(B,{w:()=>j});var F=U(62459),G=U(62889);class j extends F.$KW{constructor(){super(...arguments),this.fileExtension="gear"}generate(k,B){const U=[];return U.push(G.M.generateGearHelperNode(this._editorAPI,this.fileExtension)),U.push(F._Lw.line()),U.push(F.X9M.create({id:"from-current",buttonText:"Set stored gear to seen gear",buttonIcon:F.a2l.FloppyDisk,onClick:()=>{this._editorAPI.modifyComponent(this._componentGuid,{gear:this._editorAPI.getComponent(this._componentGuid).gear})}})),U.push(F.Gme.checkboxGroup({id:"autoRefresh",labelValue:"Auto Refresh",inputValue:k.autoRefresh})),U.push(F.IqD.create({id:"gear",label:"Gear",arrayType:F.bJb.JSONFile,value:k.gear,isReorderable:!0})),U.push(F.NyS.create({id:"onLoadComplete",label:"On Load Complete",signalValue:k.onLoadComplete,componentGUID:this._componentGuid})),F.XRp.createVertical(U)}}},36164:(k,B,U)=>{"use strict";U.d(B,{R:()=>F});class F{}F.bootMap=[null,"9b23f418-b0f1-4caf-8d48-7747f536d843","be0532e2-6ec0-41da-bc07-a4f56e1f0a14","3b505d42-998e-404a-bda8-987150c9e5c0","f290cdd8-ce7f-4591-9891-8a1b62480ceb","88b0ee52-e5b8-481d-bc05-bcfc50138ccc","e76d1209-5de2-49e0-90bb-77631418b7f4","8291490a-2fcc-493d-90d9-1d45506c3452","01974512-4dd8-4dc5-a608-dcf1f35ad9e9","06e67157-a93f-41da-a737-4237b1f1fc40","18f3cfe9-72a5-4734-ab0e-980770cfbd07","80105eb9-8c26-4084-93e9-40436181b7d2","fdca1530-e5c4-489a-bc73-c4b725ac6c07","46cdfbd4-d8bc-460a-a104-06dbdcfa636d","fd430113-2fae-437d-9bde-df7340f9d50f","4cc687fa-7ab7-4a96-9ea0-adbee3598a1d","ac867e17-4a3b-4a15-89f0-1332375b3fcf","195c3d1e-f252-49fd-961c-a83e4ed0dced","4950fb58-7988-47a1-8375-b712f3cd60d6","f10f518e-e978-425e-b130-741f5899ed44","0aef9759-acc3-40e0-aaab-01d29347edf4","3f4ac484-e21c-4cc5-99db-c59759da61dd","6b6ad85f-05d7-4cef-886e-39fe9e4725db","fba6e2a0-2240-417f-82ba-be08a5c61ece","cc4aee55-ad28-4b6c-b7ca-8774db40aad4","703ab37e-3f42-40ce-951b-d898c8e2e9af","d5169702-eab6-4df5-a2f3-f789d63310d1","8f5e4dd3-6115-4292-b35e-986e3c96b8f3","6773c695-3b26-47b6-adbb-d93514883674","3dc1629e-1817-4bdc-a60a-0ec264f57b1e","91fe9a67-ed25-49be-a804-b1b6e5e28ec7","e2e9689c-67a8-4081-9eba-c7181549e887","24123a91-4a85-4a18-8c51-e78924d7388e","2745aefc-6a39-4143-9070-e9044f7f8f21","c4258995-bfcd-45ca-893a-fec26c3cda64","ce1b746e-ad96-47b1-86b9-6a5164702346","cbc2a038-826b-4f4a-8bf7-9f02ce158507","65a73de4-10e4-4b66-b62d-288af996a877","d5b1c815-52db-4cd4-b924-7c91296f1150",null,"185e46b4-cd22-4619-9a25-5ba13e425496","449cfff2-ded0-4f44-b030-a6e6a02f7ea8","3c679598-4717-46f5-b619-7afc6e97d4e4","584276b1-6457-4e52-8647-74b8781409e5","24e2aff7-c838-4ec4-a719-a64bef6a472b","a059c886-2117-4e52-8ef0-74f0f9b87ead","13955743-cade-4475-9c20-5dcc3c9aff9d","225f4e07-48ef-4bad-bb62-57335e94c137","a00655fc-3a2e-4774-9995-150926446ff4","d7d387d8-c986-4317-bd1d-41edc7d55b2e","05b7b955-b9c2-4243-a3be-b3c18b7212ed","7925c800-7659-4b70-9a1c-92c5f9373bb2","d71da1c3-9eb3-4d12-946c-c4a98ae9fc1d","45fcb32d-567e-4a5a-97ae-2e85d9c909f7","a9ff1de5-727c-4e34-a91e-cd1e9d200881","f89da926-e3ff-4180-bea7-272804ba85e7",null,"1ca59a0e-7bbe-4827-973f-5d7ca20ce6eb","15952221-c14d-47ea-869e-69431bbe17bb","0aeb50cf-6f43-4b99-9c51-f4ca83c4e475",null,"7dfcc871-c063-4578-b105-9128a2402725",null,null,null,null,null,null,null,"6ee2fe88-32f9-44b6-8ee0-db774ed09211",null,null,null,null,null,null,null,null,null,"3619c3ee-ae04-42ed-a420-e4925462de24","89f1ccf7-4ae6-40be-aeb2-c113d309cdda","10bbd0ab-136a-49b3-be11-f0a7adf03404","b5931c7d-f864-4333-b202-d9e135be0031","4a4892d5-7bb6-4c9f-855f-987112ad9f50","80d80b66-ead8-4a5e-93be-00398349d636","8a57f5a6-c841-495c-8784-a6f8d8ed3d7f","457d6ace-a891-4eb0-aa7a-999ea0d53d32","4898ef23-23be-4d0b-bdc7-19a82918103b","a740279d-997c-4881-a942-ed551062aa3b","cfe754e9-7450-4b46-9335-23d5cded5c98","ada44228-7f1c-4ac6-9f4d-d1debb96d3a8","f487e290-61d1-4094-9b6a-b7c12eb4fc68","f71122a0-16e5-4e59-8245-505d0cb06a8e","8e2c3891-c330-4a21-b27f-43a4329de362","4049d341-ee70-40f0-9cb0-77096a00d53c",null,null,null,null,null,null,null,"5a032a4d-b87a-46ba-9468-aea45995ca8a",null,null,"f9733b3d-c797-4506-ab02-55bc047cf743",null,"4451af13-f78a-48f0-a89d-c0766ffb24a6","22901e67-6507-49f7-ba3f-c3a3b89f0a39","489f2045-bcad-435f-9f67-5acaf75f281b",null,"0a73cdfb-aa6b-4f15-80b3-4cc25cc0c753","f9e61c40-48fc-4f3c-87d3-a6873519b94e","1c7825ef-1d0d-410a-b58c-d5d7b36febf2",null,"fab552ba-caa5-4846-b0e8-b7fa9481effc","d4c31a01-52cb-41b1-be2b-cdce89a99f0c","f76ff7a8-da83-444a-8cfb-e6bbff11428b","d937671c-78bf-4a7b-837a-12d518d0a084","d1187e0c-abf3-47e6-9c03-7fc9c744024e","af819033-d9e1-4639-961b-bd138131e021","4d8fe963-55a8-418e-b883-d544f20ba00a","22c4ea64-7d4d-4dcd-ab09-0e37b128ce42","fbbf8435-1d6d-4b4e-977c-54036903d3ed","7d7d6ac1-d363-4743-90c7-f98692991ae1","6d9a275f-0597-4c52-a431-022b2f2fde79",null,null,null,null,"ccf1752b-e743-46bd-a704-6a55c42a5187","10128200-2750-4532-aa09-95b146fbec4b","f4d514b8-344f-4742-9ae3-c7f47f560a16","18ba2923-7cf6-4bea-a333-a8a7d6a7f475","9596050d-27ba-45d9-bac9-1caafaa821a4",null,"41bf81f1-f627-4d15-bb88-0ca8ffe8f11c",null,null,"f650873d-1fcd-405b-9fa5-3d7a70ebbde6","a7280f42-f1d5-423f-8410-3ba5439fd9d6","9c803051-841f-4a17-8fef-ba11c17399e5","8deb5fe0-cffb-40b9-b08b-06160407e413","f8cb917f-1b8c-4a55-90a0-865648ff1ac3","2e69b782-0ce5-42d6-aeed-0acea3e19953","0f7cc291-2252-49e5-8640-f518ee80e286","f9ae24c1-a56a-4366-ad6a-0fc206cfefd5","55474e0d-24ee-4970-8b04-13bd7f53e335","86866bb1-9b75-4aa1-a103-ea99271ac935","9008f09c-c52e-4322-8699-c0f9678cfd20","3c27276d-5c0e-4b88-b09c-2efe11852cb7","662969bf-1777-4969-9f10-bd0e96246cfb","1593aac8-9e91-4ca0-8b09-6b32fd8cbcb6","a294cd42-bc9e-4096-806f-89f105a839e1","bebdfa20-6884-4d3d-85e3-1e8692bfb87c","8fef84f3-3261-4931-a650-5647e7bc5235","5db6f2b0-d2cd-4b27-90a3-e3c30ceed27d","be302dac-53d6-4d07-a896-d5d89b3358ac","ecbc977b-5f50-4f38-9ef3-4a2e7b4b23e3","63e0ad07-8e05-4d1e-a318-498120e68754","39e0deb3-06de-422d-840e-797466a69b14","93683764-f1d8-4b97-9e27-6bc5100969ee","f27333fe-3108-4bf5-bb36-7e5f5c0b66a4","490bc74d-4f68-4a7d-a8f7-b5f2473f04bd","6f217862-e537-4847-acd0-a3c1d1174b1f","d418593c-21de-4c1f-8d6e-2d594872a9e1","addbaed5-62af-42f4-85ff-02d0867708af","211fdc93-cf34-4857-a5af-d66f537788c8","dfcde975-952a-43fa-b31b-8f141eb1fbd0","6bdc9ff1-b357-49ee-ab6b-18908f83ce99","acc5f2fc-ea80-4e10-93d1-face68b598b3","d7c691c9-7b1f-400b-867b-629bc132acc1","34157ee5-0fbc-494c-bbf6-afe731cd8608","2b0b2208-9906-47b2-a722-f7dfeaf4388f","d647832a-bea1-4555-a266-ef32694ccf6e","0c1c54b6-65fc-4a5c-ab1c-37d83dd144bc","aa43b3ad-f7cb-4697-b251-e0f505c8c3e7","7626acfc-b8ea-4685-aa06-ddd675ed8870","ac713c01-4fa9-4654-87a7-35d98577d98c","4b04c6de-f501-4b74-8dbf-a7c49dfa105d"],F.bootUpscaledMap=[null,"df75c613-c0af-4257-9866-07b31b617349"],F.costumeMap=[null,"1b859ced-9819-479f-b00c-456e1009f5fc","e1fb79a2-41f1-4013-af4a-9623cf6534e9","2db0c39c-8fcc-47c1-8a60-b9b72c4d352f","967f95ef-88d3-453f-85a6-23c348c02bfa","44230432-098e-4cf4-b4d3-9efc07f1984b","058e018f-ef9c-4161-aa5b-822d9c63cfda","2daf28f9-9a6b-4db1-862e-470d6973df26"],F.faceMap=[null,"c9061655-2a68-4dcc-8f51-549b52ee450c","6548d5d4-1a1d-46b1-80c0-8ddd094cfbea","b596337b-c25e-4966-9646-af9144c75ef0","ec08daeb-2d82-4455-ad7c-6526075c3ebf","0780a14b-b8a3-4f67-84aa-bbc248c4ea89","b648467a-2ca5-4bb3-a256-65c06cae76a5","a7fd169b-7f00-4398-b239-cab46f7258c1","ec3223d7-d4fa-469f-9b34-c20c4087715e","adb927ec-a8fc-4089-b14f-b6cf5529af42","e4e0506d-8f24-4a5f-be22-7e8366a0e211","5c046140-a88d-49ca-8fd0-56acf50d917a","a5c1fa0a-72ee-4c96-9874-188837dfae71","b2e6bbc5-16d6-46dd-9586-9ee4f801263e","1d1d53e7-1b4e-4132-9b06-714105bad06c","72c00425-a3b1-448e-a4e9-ef71512d65d3","ca919e57-7c52-4fb9-ae58-faed3d5aed16","2af0a5d4-5e39-4b34-94bf-5b9cc32a53d6","63f0d439-2017-4266-ba6e-bf80e8cfd1ad","5b45bf9f-fa1d-4964-ad7f-f43d38c81255","e174a819-fa9f-4741-8141-1b9881d6588d"],F.faceUpscaledMap=[null,"ff6e114a-1785-4a49-826f-4befec76e513"],F.hairMap=[null,"8dfe2b54-d037-493f-902c-057a04e26a5b","ad92f9aa-c7af-47d8-89db-a8e22761fddc","5a1df131-1f90-48ed-b44b-861bdbcf6590","e2df1d1b-cf80-4060-81d0-a69af0f08c2b","005227a0-92f9-4b97-81a2-829986b7169f","ecf27096-e440-4b17-b37e-1fa41fe5dd90","cbd74c3d-c13a-4ac9-984c-c82707f57480","afdd9023-64bb-449a-bf1e-d2ec974852d1","f1607715-b2f3-465f-a427-b39f893397b2","7955c22d-2fdc-4de6-8a19-248cfb8fbe46","f90ce3ff-bb7c-4bb2-9e13-c473415c3f8b","6e7e94f4-5d11-4dd1-9a17-7982b82967f6","2f383d1d-c118-4234-af55-2ddc883c6832","97fdaf21-1a33-44bb-8e21-371c1fcc6e64","47ef11fb-0c8c-4961-9a0c-84ce109739d3","b4ba41e3-d5aa-4b22-8d30-af393a8fa623","a01c6408-48dd-4329-8c25-9d840e05f5ee","7b5a9b30-6ceb-41ab-90a4-a5d8de4bc9c2","948b6c85-9c39-4420-8a0b-9ea63251782d","29b3828f-4ca5-4db5-8bc9-8030f563b58c","b786edff-75db-4d99-b570-2de9bfad0eec","4408cfa9-3ec7-4269-a4ea-76ef701cf012","4717c262-b4ca-406a-a440-07f67dd161a6","c6a5b2e7-b3da-44b5-9dc6-4d4ff51e9d64","e162844c-0583-45fc-ae8f-627ca85e4939","90e0d8bd-2998-4cf7-8bd9-2559a55a9d69","eb8c47a7-acea-4bbd-8bf8-211ae79f1d23","af033f6a-b785-4976-9608-7e3ba6c6e1a5","221c6e68-1184-42f8-ac35-7bef09a7f819","483e08b8-a67d-45b7-9e29-d8e350b07077","c4307640-d3ac-4ec3-8d56-c1f0ac0715a7","89fe5f36-ba13-4fbf-b266-60ddd66a3887","da1c939d-a8bf-4f79-8d94-3eadfe4ece0b","448d057b-3b71-48cb-8716-540f56050bd2","1f8293f7-e5f9-442a-8cbd-5ac9edf46317","b7a66004-d694-4dc7-be27-09c6f92cc68f","4d846387-35fd-42c2-8878-ca4e8d434b78","deb9e7b0-dc73-407e-b0a4-f91a38553760","be6e4f00-91ad-4806-86f4-bd0665c78e5a","55d76f5a-3dfd-435a-be95-6e0f860e8a71","acf32a2c-cd89-42a3-aaca-a2e075742e10","9b10f66f-bb15-4225-a495-c286df7d7f5d","2dfcbc0b-1bcf-440b-b362-1f41b0625c2b","1cbe0731-708d-4763-b98f-20e512ce6bb6","ac15c812-fc57-4701-b30b-c17789b9257a","824d20ab-7338-4e63-ba64-779470be32af","2f48a7e9-1453-4bd2-ab00-1545671ef01b","9d300b6b-9823-455a-9007-f8265178cee3","5c58c5e6-2a77-4525-9e20-76bd25d32760","c9b54217-7744-4e99-b232-e582c98ac0b3","435790eb-46d3-4603-aeea-7b171959f23e","02b3e0d3-154a-4776-961a-24f6398957b6",null,"2a044c4b-d722-48af-8add-de6cbaaa922b","7d390558-af96-46b4-8e3b-8d113331a0b8","ceb34e8c-1ed0-4c9f-b8b4-cce0d1ab37ce","916d987d-784d-459c-83bf-2abdd12832cc","94ccb602-e683-4e74-aaa3-8705b620907f","5dfba483-2538-4aab-a3ca-1bb52b0794e8"],F.hairUpscaledMap=[null,null,null,null,null,"dc697ab7-8c53-443b-ad8f-85a30d20b89b",null,null,null,null,"e344980e-4bb5-4c14-9cbe-d401d3a3c3ce",null,null,null,null,null,null,null,null,null,"cbf3c878-db67-421a-8364-f5c44f901462",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"5e303603-fefd-4b91-81c6-7655c952374f",null,null,null,"f6940105-9e08-4ac8-a05f-2bebed5ad262"],F.hatMap=[null,"db18ca1d-53e6-4a8a-8545-d3bea48926c2","7389327d-111a-42cd-964a-5c2a569e968f","2cbf703b-46aa-4890-ac64-62cb8f6c51c1","5d62ca11-a192-4d85-b759-942b77e18774","f0a232fd-3cb2-40ff-a878-c832b5377a65","e79f6aa5-b852-490f-b834-1ca2a4e47100","274ea8c3-6505-41ad-8ccb-334f0485ffe4","d6c741bd-6101-4306-a18e-b2ea8e3d8356","553ae1fb-05e7-4f7b-80d6-f123684fb0b8","e6c0c48d-9fca-46b2-b6cb-22cddba85acb","56c93c2d-32b0-4203-9ac0-4a7493d9f97e","5b6e69df-90f0-419f-b8cc-11216d4526ae","4995fd6e-b799-4042-a721-6d69a6a8a183","d5c33d74-aa16-46d9-ac98-7dae4591d7f2","70c7725d-69df-4a1a-8842-6712c469be80","8f2b6b09-f2bc-47f3-92cd-5dd9b4c165a5","6709c737-473a-4a10-b393-38d9038e5bd4","b44de21a-3a63-471b-abfc-c5f998f97177","836eb80a-8763-4d53-813c-04823260dbe7","8943b5b5-f75e-4c8f-bd87-a113768e2c96","488ce48b-f9d2-4107-82cc-ee369bc8e52f","a4062ddf-a1cb-4b50-bc7d-93017fef885a","a633b8ce-4e0b-4da0-af22-bd79c339157c","edc129d1-aab5-46cb-9853-f87e72aee046","5c9a1881-68f0-4686-89bc-e09a8fbebc10","e9a1efb6-2f80-45a1-905c-e68c19597a57","cdcabe12-14af-474d-a8ea-7b1b0651a47c","8d0316ca-8ddb-464f-901a-3c5c081ac499","8e1e82f0-07bb-46ad-bbd5-d5469d9f8590","90a7764f-1ac5-41ac-9e8a-3ed5bf980561","3c8d2422-a591-482d-acc4-aa9f1a8292aa","f97e80f2-f911-4f16-ba82-c7e1991b74af","d959d262-f91e-4020-88f5-ec9a0e219e6d","4d174773-98e4-432c-8e53-ceba62e64911","e2ba2827-5bf1-4eb6-9d01-dc476be16f4f","4b259e15-a8dc-40a1-b269-da8f0ab9685c","9995f06f-921e-475b-9946-23b734f13fb4","2bbc6eb4-8813-4d87-859e-9d75ab9d335e","af3e7791-7bcc-4236-9ab0-0c727d2c1899","6e9c82a3-aa8b-4bff-9654-86d770f23d83","ca8507dc-df36-459c-b385-b90b967b88ee","26a71cc0-b51f-4f72-a734-bd9cc810a6ea","87c8f836-9227-401f-a208-84078b71c021","b674368f-c7ec-4c85-808b-d727a045bf3a","d15fb78f-d3f8-401e-93b3-b029344ee45f","ae9b39bc-6f8e-49ee-bea6-cdd8295fd5bc","c97cccf4-42ae-4f94-ad02-c6d9895ed58e","8a9ad6bb-d8ed-4ba8-a159-f614cd865ed3","f48cbcdf-c5ad-4c98-b6a5-6aaa2f07e91a","61decef9-d38c-4712-81c9-391679b2b553","baa6266f-d6d5-446f-b75b-e8487cf31a63","47ecec61-13f5-4e2e-a9d2-06c9958174ef","ac384de9-776d-4eb8-8f1d-8084f1a44171","fe0fa775-a9c1-41cd-873d-aa2b86b9d7ca","d638e043-1282-45e5-9e6c-4170520c62c7","e88803b0-1c89-4f8a-a3bb-936e321ec0ce","16ac5120-9d38-4688-b83c-de8d148fee49","c10e33d9-c772-4917-89bb-19a4b2df4627","f5fdaf46-fbfd-41b0-b1d9-1934962d93ce","ac09155a-685e-4b23-914f-aa2f58df51ef","6a110c0e-97b0-4819-b7c4-6f2ffb2ffe17","54165677-2bca-44ac-9dfe-42db98b3c446","7cd87b12-88c4-477e-81a8-bdb3ce708b94","1b5ec853-d63f-4371-979e-ab2595258c8c","f030353f-ebaa-44bd-90ad-cee6de61d60e","96ccb2c5-cb8d-4fce-af20-e1834fea7c09","0be6c419-5c35-48ba-8012-43cbf274f2d8","ba8197e7-91a7-4f8e-9382-cb7b929516b7","1e674199-ba8a-44ca-89ac-10862c60735a","74b76909-1a34-431c-a37e-fd206b41f6bc","aaed306d-8613-484b-9756-d60bba895782","149d2c18-f327-40e3-88d7-a1937cd85535","8d545242-598e-4a04-9e2f-6dc43c18a11e","ba713937-f5fc-4ef2-acd6-cba4ad1460e6","33b93ca1-246c-40bb-be34-99eecce5a66d","b98e4724-9312-4347-8d58-7d086e1f5447","5be7d445-a501-4ba2-8b90-5b9622872a44","36073ba5-c38e-4b68-a5d6-f45190220079","c7975916-8104-4dae-9b7c-772f8ddecd37","dddefdba-4fe3-486e-abef-12c4e3399f08","86f24c92-9565-4f07-b480-e0727e21c8f8","1970bc93-30c8-4440-b62e-7f279780609f","ce569108-dee3-464d-ac1b-251e785f1f12","5e052b7e-4d03-4fb5-966a-251a07bbf5c0","434d6799-8745-427d-9c6d-d8e18c5480b4","c2563391-4174-4bca-a43e-7e90a1a7a636","2abcc418-9d6b-4fc3-b1b1-9cc55e10c21b","e13f4f0c-2e3f-46fd-a4e8-691930fda189","040cfc7e-1ed7-48ad-90e7-68bd5078549f","53509002-1476-48d4-9bd3-077ea25fb334",null,"352241e1-c7c1-4933-b40e-b773f24694d3","1c620fa9-e932-49e0-af95-e87a53206850","f3a513be-25af-46a3-bd23-2ef1a85bf1d1","d5cc8ca3-59fa-4302-bc93-249e0ab71eef","7fcfa3b3-d007-4be1-9c6a-2251453d39b9","e888dcfe-cfef-4a46-a55b-0128944656d3","b5f4fed4-457d-4056-bd20-759a94430bac","961dc65c-e7b2-4d0e-ad97-9f17eb3fe54f","6c993978-29fa-4d64-a01f-3ee0b10d9697","83b0961a-fbf3-4488-8cbf-d8b5ad5ae5ce","4a73a58e-28a8-4993-9633-833847087365","a0b32393-62c3-4714-90d7-7c98ad8258e7","e873a633-66dc-4955-a744-6ccce63b5f38","01da1228-fb6b-41df-8333-53abf77d2c16","fb099962-6b51-4b19-b1a9-41aca1823e73","c28c7c97-b9d2-49eb-b3e7-11345dc1cd77","582a395d-7e25-4916-86d0-2768a3dc7bad","3734c3b3-3991-4837-ba8a-66abfbd1cc34","e05220f7-8c8c-412c-99f3-0275113f8286","085ac0a5-7c07-4311-a181-f8910812bd10","34dbb94b-384e-4eaf-bb33-87bde2b66a9e","bbcaeac7-449c-4efa-8267-28a7097b4284","06b35e5d-13b4-4781-86d5-27d737735cb7","2783e01e-9819-4626-87e7-3d61fb3b712f","c2e91dc6-6099-4757-bd58-2f1ec492126d","e0ed3992-4b81-48bf-ba9f-6ed36a0dd3eb","b75dd2a1-e4a9-48a8-81eb-e1a49ba4f0ae","909d5b14-feb3-4696-8544-d86fd5e70128","73a992ad-d68b-4686-a12f-b09a37261626","d48d6d62-bbf3-4f1e-aa5b-84e09ac7913a","2d1eb47b-9c29-4c79-ae85-7ab56a7fc4fc","baac1bb4-cde0-4467-b71e-af725852309d","07e8d944-e5d9-4f0d-b0d6-385d8783175f","719835ce-5602-40d4-b5d2-fe6ba7c3d5ce","41c6b986-c80b-4977-83ef-8e89b9dfcb8c","365c2e7a-a710-4b75-a543-034fad76414f","105e6b8a-4ab2-4ea0-9421-cbc9a93d98db","557ad5ef-2b25-4e90-9e94-ffe01b33e0a4","e4daf0d8-7045-4c9c-ae07-2d31a884113f","f7a68408-101b-4095-9c01-9564fd3e687b","ae4bd80c-45f0-4cab-bdbf-ff39ef7a6d6b","58e3ebda-8e5e-43d5-92a8-e590da8e8415","d33ce612-2630-408f-b44c-74c0faf9f118","bb9e4294-ad13-4abc-af4f-dacf49fed9bd","07bff02f-cb9f-4acc-808c-32ff4fd4ea71","5c338ab0-f163-4315-bcdc-fd35d8059532","47a0fc8c-9a54-4b29-bbd8-275b27b026e1","b7ea522e-a5b2-4419-acd2-c83d03fc4761","8889582d-3ef1-4024-bd56-eb043d18e9ff","4eb906fe-33d9-4a56-9f09-bfa141bad1f1","debd58c4-1f8f-46be-9c9f-173114f8c9fa","811e5f51-6d5b-4104-b6e1-3ac4e97f485f","e03e9f72-e4d6-40a2-8c05-5de72ea70b70","6798ed67-ac2e-48d5-916b-467d4616e7cd","bfb5d764-e0b6-46c8-ac5e-058b0dc8295c","8d8c0e92-1697-4aff-869b-33c3a44b6fa4","1ab04d26-abff-4483-9ef3-45c9f7719d77","cb6bc2a1-d540-44b1-82d9-6d0ec59ed5f3","93b50095-4b55-4d31-a562-b969b8c099cd",null,"b69c63bc-ad58-4809-9308-a8897b07edb1","05460579-d75a-4adc-b178-53076466077e","046fb18b-fbcc-4dd4-b2b6-f176a13a2581","f0b0ad7f-7a8c-46b5-8782-2cc5dcb7110f","fa8f0633-6609-4a8a-900d-438bdf6df746","04a0f4ef-794c-4b0a-ba08-130e4fbace47","293e3ab4-1265-4519-82e1-e51db758dcf2",null,null,"69d681ad-a8eb-4a3e-b9a0-a7bb578ea52a","cfae53e8-ddd2-4677-ab95-289669adeb2f","7762d8b4-5299-43f8-982c-ffce8f3395ee","9103a474-2aa7-4469-b4e5-502eb1c9979a","9a1f2f8e-a101-4648-9455-18c35fe3bfc1","111d1631-4578-4971-90c5-a198df832a3e","f001779c-42c8-43e3-8cf1-f6f33deb2571",null,null,null,"19a7f114-b128-484c-be67-78baf5c87106","2490f3ed-105a-49ce-a630-11ee6912ad67","438508ec-4811-4b9e-8d92-ab18ff776057","d16b3091-a6fd-4b00-8e41-02ffef728d85","16525015-c413-465e-86be-ddfbcbe5aafa","587a9c09-e48a-4c79-ba38-3c16f1b14525","40dc3406-4921-4f9e-ab27-db6e5113ef1d","3732bfda-d9f6-4e23-bf57-faf381ce7ebb",null,"d6c9e03d-88aa-44f1-8f7e-16e29d705769","fadec8f3-03a0-456e-819d-363111004604",null,null,"26acfb4f-6ee1-40cc-8697-50660e8dd7c2","d5d8f2f4-e1fe-4068-9a76-60d508d436dc","e380813a-b1c7-431c-bc0f-408a38853cf9","93e160c7-43a9-42c7-99a0-13c16efeb5f9","ffd9d964-94cf-4773-acc1-cfdb2c160957","568ea19c-6bfd-44c2-949d-459b1ce05df9","9c073a11-bfb1-46b6-98c2-64e9ff15cfa5","e9d4cace-4382-482c-9c61-8ae18d1faa73","a4fca37c-c275-4571-a4e7-e91ddf8c7d97","d7f3aa1c-3a4b-4ea5-83a9-aafecad2dd98","643bf355-1bf2-45b7-a1dd-b45c6e8b9d03","c1e44c39-b32c-42aa-9703-7e0727e6e61f","44da787d-da3d-4c30-9e29-e8f75c73ab99","f6ba2fd0-5c4a-4653-96f9-138374246627","0b997443-48b3-4d55-bce0-2ebb35ad5c59","7e62e5e7-671e-4bbc-af8f-b906c856a4fa","3e1fe707-42e9-4a72-9085-62fb1725b7da","49eb9679-c7ed-4c2d-b677-4f0f17f84f83","127c2fca-9e6f-404e-8f80-59fc7338d686","a5320ea3-5d5b-40c4-9fc5-4a063d65c849","63d5ebb9-8549-42a2-bd91-0e708c565732","e49a8607-d251-4774-83f8-a6f44bb58741","53fed226-8b66-4e12-9a2f-d295c9a04b42","0ce0a471-6eb3-4043-8591-79c59bcefd2d","883c760a-5c0d-4a7c-bbc8-bc90c19d8bab","0744229c-02c8-4d0e-8af5-3a459f9ccc91","0c2c2c13-d502-45f9-9d95-a061be67d8ad","e257d9a6-3d21-45cf-8f5b-f8ae5493a5a8","c9dfe5de-a3e6-4810-b736-e67bdc5a1384","0c72006a-14ed-4b9e-9e11-253f60642ff0","359d792c-2c42-4e62-822d-73b952adb182","b7ba9461-7613-40fa-bb2c-6e1b7a8d1df5","8a34694a-ac36-4d82-8dad-4ccb5b983186","cf32cccb-2858-4a1c-ac2f-18569a9e4306","1f0330fa-2405-4852-8177-87934bbf3d8b","f0ad7f21-c598-4bc2-b219-9aa70f950909","b4e3cf67-15c5-4042-805c-89ab90e8f2d3","d7fa9700-8146-4336-a320-eca13ea59695","5425e2ad-8f30-429d-83e2-cecce4c5c95b","d73c17cb-bc65-4376-ab61-1a1485eeac49","2f8f136c-93a2-46a3-bf37-c2e4a92d2c0a",null,"3252876b-b451-4429-9ae7-1df419d4526a","1d0a0f67-9760-42cf-b11a-fff7f163030b","ca5a2e59-2967-45f6-854a-8aef4ef41fdd","360db781-a14d-4373-88a0-4292f51a75f3","4157f181-25a5-4dec-986f-d179606403c2","5af849b4-b957-49d7-8774-31b66d85c55f","924e9719-aa02-478e-aa1d-fb54fed5ef36","f7568327-245c-4582-b9f5-c582843ad913","ccf2b938-0e80-46e9-82cd-6ec4648d18b0","0bbcdd4f-fafd-4de9-aaf7-1dc39e2c09d1","cb6a471f-0a5a-4987-b3dd-8b7f5e926d1a","ab229c23-8823-401d-a931-962349d4558c","7a4855f6-3a44-4e2c-b46f-0317370a6dca","8cd6fd61-702c-43f6-8f93-30b2fc125c51","7b4e5b09-9f30-42db-9225-72e00fb67b78",null,"211ae5b2-96f2-49db-8c55-3a66cdfdc452","2cb4706c-43c6-48f2-b10d-5938f4216404","071dc712-e5a7-45fa-8796-341a80458bdf","1970cf63-c86d-4325-8f46-d63adc63f4b9","4cd4d7b8-7a5d-4e9c-89f4-e895025e0079","fd6f1194-3311-41da-9319-6cbcef174558","44374320-2a8a-4814-965f-aba11ec0ae61","dad45f9d-3ed7-40ec-9494-cf5c7930f77b","e2344933-24bf-4ddd-b807-5185d6b89758","dd493f01-a5a3-4482-b95e-0e91f2e1d4d1","311805eb-33f1-4979-9fd2-ad7172fa9676","6eff9aff-7346-4d07-80f7-b1eca5f1d5a3","3c46ef52-1f62-432e-bed7-038be1e9348a",null,"c1be3e04-891b-4da9-9619-cb40edfd27cc","10c7dc75-0f91-40a5-8ac4-a773f7af6dcb","212e27aa-debc-428d-865e-82ecad51315c","5a909a6f-1827-4945-82ea-b7b08cd7b43f","15d7adff-1ec2-44ac-9ae9-279c9c327e35","a2b61f5d-997c-4205-a58e-2e6b43544fa5","772818ff-8adb-4065-88e6-b8a6e4455501","2120c898-697c-42bc-a60d-d5c5d098b9b3","e0354f34-4ab3-40e0-b8e0-0d8100c38211","67688885-c5f7-4035-bab9-b575ebe09f3f","0899df99-ef8d-4a16-9681-99ebaaacb655","3692b02a-33e0-4a30-8a56-96fb642d9044","9225a03b-1bd2-4fb5-961b-8bd437370a74","4e672ea2-101c-4796-bbd2-54ef20275272","1265fb74-8450-4138-82e0-7c9f64ac19a2","22451af7-8059-47cb-92d0-bfde76bdf5f6","32c020db-8d57-4d8f-82b3-e8acf9913602","0e8b6ce2-223c-4623-9cc9-2faef9e2fcac","1149be1b-15f3-45cf-80e3-40c7b8d6ceae","e7e205fe-63c7-4d8e-bea6-f7bcb3c9df1a",null,"b0f62f7e-f6e0-4ee6-93b2-97243d1ddf88","2e7f0886-c916-42dd-b8e3-a05be0a50d9b","2d9d6419-76ec-466d-88ab-a018cb17a8d6","b72760ce-507e-4040-8839-33cd342b6560","80c9d8b5-bf88-48c5-86c7-f595ce70a542","8e191019-600f-418a-bc79-a2858b06e1da","79db3189-317d-439b-b622-aa626f9a7999","7e313a10-bed2-45e3-9325-88feb9020b84","dfc5eccf-e77c-4967-b690-2757e4fcd1ee"],F.hatUpscaledMap=[null,"3a2e9ab6-5a35-4f96-b404-38553c933b86",null,null,null,null,null,null,null,null,null,null,"7bec0f43-4ec3-48ba-9d1f-113189021896"],F.outfitMap=[null,"edd10623-53df-40fd-ad77-2f43d8e8481f","a64512d6-efc2-4111-b8fc-b343e6e91d54","098d0ae8-673d-4650-96bd-5e67976480a9","ca45da21-9914-46f7-ba4f-7dd646c4f47c","80a34e92-7fe7-4861-9967-0daf7cc9a181","88a284ff-a51f-4b85-80b5-08f6acb5b11b","f35ef825-5197-48b8-b4cf-1222a39d1263","9ce0daff-43ee-4ca3-b3e2-eea271ce998b","9e3ae004-cb14-466a-a2d3-eaeed5897822","88c9f6c2-e0aa-437a-97a8-0119ac878d2c","3afc0327-f1e8-461f-bb0a-d5d3eb227e79","8aa00362-959f-47b0-a482-efa991e87e39","034afba6-c852-456f-9c8a-4af1d8dffb18","959f5456-f022-42c6-b23f-24a2b19c9733","5b3b6fc4-4d58-41ec-8e3b-f8b236365a27","331f4f97-9623-4680-80c7-ce6c26cca185","67d638fc-b82f-4509-a75c-7251ac55f2ec","f258b6f0-9db3-4eb3-97ac-e6c7cfb0b902","37fdab08-2e11-4bfd-ae6a-aadf88791d30","5bf0249d-d700-45cd-8591-2cb8c4b8d885","20999087-d202-48e8-9944-f15ca294cd47","c9c85cbc-6c4a-41d2-83d4-fd312d7f9819","0a534c5e-d2d2-4a8b-bb19-e4e02febb1b3","34d287b6-29e6-4c47-80c7-170f174a8c07","c70524ab-bd03-4da9-8166-6fcd0b21735c","54d2f338-ab52-4360-a590-1bdc38445d1b","45e873c0-b9f4-4cdf-a017-c69dd4040229","9bbf3785-85dc-465d-974e-a3a91ee54582","5c35e250-ab4b-4f97-990a-71c541d79e2a","be14e0dd-8ea7-4d06-9c97-349f8098fff8","487fc777-435f-4b7a-98e6-620bcf22b6e4","6fedbc84-6025-4a3f-86b8-814249542c3a","c688c70d-a83b-4361-89a5-7f519cc8a090","3d5f2771-a0b3-4c96-a8f9-2a3a0cf9c1b8","90eea86d-d1be-4a95-8662-f75a9eea9e7d","c7ead47c-6c94-437c-b1f6-408e68a8a010","be4582e4-72fd-4dcd-877a-a552174aa65b","eb48891b-6688-43a4-816e-9af886723f52","0479f791-fd55-4796-ad12-24980ad054bd","1cf13d81-8032-4e5b-b9df-932d68af4552","3720b757-1f39-4ce5-b380-1ba0ffedbfb0","8e22738d-2f75-44a4-a9a3-362b7d43fb3f","326c15ab-64d1-4d90-86ef-51a027e00b4f","a4584d7d-26aa-47ae-bc74-c6087f6e10c0","b5115dbd-2ebd-4791-98ab-1d27c12d5b61","ec7e67dc-940e-48bf-ae94-41f4a4a22599","9ca421b8-7051-47c2-bfe7-f9ae51ebf206","48db52c4-cc71-4397-9103-7dca73c23742","f80d77b4-9296-49e6-b8b9-75c44e6ad25b","b0aabf10-f476-4203-a1c4-fb9acc0ce796","ac78daf8-22b3-43d0-b96c-8acbc579d52f","68fb51e0-d96a-46e0-bedd-87d7a0bb342a","3aa5af5b-5f6e-4a0a-b996-9cd4252cfbfd","2189afd5-57e9-432f-b682-3a9994cf2961","5e5b6236-78d9-4746-bcf7-f030b6b38cde","aea7833c-ec4b-4dc0-b32d-3dc0f8a52892","cc2003b5-f1ef-49f5-a573-c9179d03aa9b","24036ed0-89c0-4391-9123-5e9f8da88632","c07c87a9-562b-41e8-843d-52c401925d53","995d7c84-365f-4d2b-801c-7e9233cc0ee9","355596ad-7eb6-4246-8aac-20eece07eab7","3471fe3b-9c0f-4d91-b2ee-61de014f1657","4aa7b98c-8d6b-48de-909d-e73060d020d7","7c9972cf-9613-4ff4-b857-a79291b10e22","922567e4-5642-464f-9e7d-d8f145cc1352","3cb5fcba-1fff-4b05-ad3a-02d66059d119","2f2ca3d3-3418-4c21-b818-908b2a272b10","cb50c28c-90ee-43b7-8899-2cf9381292ed",null,null,null,"7a9275a3-9a6c-4a0c-833c-e5db4feee992","1774d42f-ed93-47dc-b489-6a768c6acd8a","9a1e04d8-3791-45c3-8dff-3f37e3000d48","3230bba4-3bf8-4d46-9370-e918ac4d04c9","a11d2ddf-d43f-4bb8-96da-38cb8aa1de65",null,"3fd3cec7-49f9-4417-b5f0-07ab3fe02e5b","af1ac1e7-fcd3-4f52-9f4a-68415622b514","3180fa94-710b-455e-abcd-0380d25186aa","f8fdd0d1-9a43-4dc0-b0e1-f5e424bbd2d7","de2e62a3-3804-4750-8ee3-527e4454b651","d560ffe9-3ee5-46c5-8f9f-41604cc596ad","baa36927-1ce6-4c84-88de-bf888d4d720a","fa8386d0-7b28-4765-a20d-07e1e75909a6","ab9fd7b4-54c8-413b-87d1-ab96e2108c83","9ca15b96-9079-4804-9c23-d2caeef42e5e","5951bc4e-3ef6-446d-b6fb-d920a8bddac8","964ed978-1567-43b0-aa5f-a8f51244eb6c","fa3d7607-30bc-4dcc-8824-ddc8603523a5","7b04738c-8881-481c-b95d-7cfb09b72dfc","e6f88b68-8939-420d-ab31-f0c2db0bf5b1","ad0cb732-d166-4a4a-9957-9ec0791e91af","580ab5e7-de69-42ee-aa70-a25581ae0629","d6e41a25-0ec5-4d9d-8b70-1d8c19c8af2f","269d67cc-fa28-4a8a-a71c-9278666ddc36","a6e98a32-e3a6-40d2-8a59-e91a9739ef98","e8830e01-92c7-4b45-83cc-1e7f310b453f","9f811740-a6ec-4acf-a294-e352f2445f06",null,"7909c471-040a-4e1e-a856-6128aba020a1","47ae845a-0e29-4b83-936f-544fc678f937","f22e0aa7-ca49-4350-a96b-40390999dfb6","fef9be16-d26b-4082-b952-cae8672713e0","3d23e05c-6262-4199-bcd0-249f704050dc","f398272a-4a99-4e78-ab5a-97d503b9ed90","62e479bc-d643-465e-b822-5bc92dcef8a4","cc5e532f-dc3b-4d64-b5ab-e9fb66876fa5","2bb0f757-950d-43ea-afd0-5cff16cbb73a","688a8899-0efc-4fa9-985c-ba2ecb9fbd4d","5999ab47-c666-4158-8a75-ae15ec312e75","2bf5d6b0-fd7a-4c13-8707-3b455326a9d8","777fdcad-abad-4d90-abba-76ea209b427c","a0c469de-c0c4-4db6-9962-16b4ecb27ff8","d963d0aa-3ebc-40a5-9cd0-73d17923f394","58b98e92-c091-41db-9917-198fe03913ed","f4989e1d-8a4c-46e5-94b0-2e184f0c4ebd",null,null,null,null,"bd659cfd-b96e-4d28-bde4-f4e20225d80e","24d49340-553c-451e-a0a5-d92bf29e5aba","f4a46535-92cb-490a-86a5-52e459792ac4","4d89f45a-cfd3-4837-a117-d2754b785f13","e958a21d-134b-4208-8a84-d903ef8dfa59",null,"67a8386c-4dd9-489c-80ca-23ee20add54c","edc207f2-6fb0-49c7-a5bf-45d0761188bf","53dec287-351d-4412-87b3-e3dbea73a1e5","bbca3517-04cb-4d1a-a01a-a3516f990620","e90b12b4-6bff-4006-a3de-a8bcd6941886",null,null,null,"55e273ce-d8f4-42d5-a542-aba094b9b91e","d16b3719-af8b-4123-b707-ffffc81dea41","f8ee42ec-911b-4395-b0ad-dd3ba4f9e2ce","3e5f47e3-4ced-4773-a00c-9ac6ce718daf","6c12d23a-02c2-40bb-82f1-88da0ba26586","ab1f6d33-b494-43ff-9a69-4151b932d518","32009ac1-e055-48ed-8ed4-dd0967aa4e8d","24022d2c-4353-43e1-a8e5-869a0f127071","83dbbd6f-970b-48f7-8403-ad01b0d7c32c","9da8cf5b-0c34-4517-b286-47ccefaf1781","34e9fe75-ab9a-43f1-8944-dc595803e7c8","de220f46-652b-4b1b-95c0-db82152912cf","1301ce98-e99d-450d-b717-51b96fc9c79b","afc994cc-0903-4f92-b138-e6c47056c41e","c058bf9b-d94a-4f0c-944b-8454c343b4f6","a0a999ac-9f78-4433-8bd4-d73062a44c1a","2791ca02-1502-496d-8af8-abc0891393ac","fa921c03-a953-4cd3-9b30-be07d8fbf734","bf281071-65c2-4c94-af4c-cf0b709e3cb9","d7650f98-48f0-4513-91c8-efc9265e265c","3a24b217-b0bb-4f24-8c81-c6b5e1aca834","875d0393-d21d-40cb-8054-5b2e5a450b96","f0ebedfc-7765-47f5-bc14-b15fe987b736","578a45e6-1bbd-48fd-9561-900faa3537fe","0f7f65d4-bf53-4f78-963c-f338cfe6b8ca","84fdc403-f0ac-4e7d-81a9-e2d887c1ac37","54029518-1634-4d54-9f90-76de697e196b","ab257659-3c39-445b-9221-0b38d35247fd","ac1c17c2-9c1e-45a8-9f55-50d3d54ac83d","b9a95efc-845f-4cc5-9610-ef7bdb9b5cc8","8201b178-aa26-401f-84e5-f1589814f7fc","78f25e89-7615-49e1-b2b4-7b44aea8683d","13ecd25c-8da4-41ef-8b57-2ceac6b9e8bb","74af95ac-2175-4a24-b78b-ca14edbfd517","d107ac84-013a-4c2a-b6bc-693d6c824dbc","ba2e0fd3-a8d5-4aec-8ed8-c7454f64d2a2","7837b8d0-f2c0-4777-b19c-4e5a478243d2","f3f9b5e2-a951-4b94-8f46-9277591f9875","ec0ad977-f8f1-4228-8d1c-c0185b3af278","165b81ac-a0d7-4325-be81-60c59b012879","d399c720-1e0d-4aee-9903-f1ee4d319aef","c6e4a6f1-d5a4-4fdd-8353-ab86e688358c","cedab087-38f5-433d-b0bf-74bebab4f1ee","383d3e35-5f78-4531-9be4-843baed472ef","d04ce7f3-c9e6-40ee-bab1-93c6365ee162",null,"77e1b710-ac30-40b4-aa36-3c9bbfe57590","5ac73c62-eabb-4ec5-80dc-4f1f964c2f73","fc853655-7fff-412d-89a6-ff8092a5267e","c20852b3-59b8-4338-9084-208bf79e102d","036e72e2-1138-459f-8a98-77eb42eb383d","5ef7e4d2-223c-4ca8-abce-775f7b8c5eb0","5cda9a33-1085-41ea-9bd7-ccef7af83f62","6f6caa11-ad3c-4f66-befd-9a1a09ceab46","57f695a0-ee64-455b-ae26-01cde6907c62","3328bdc0-8091-443c-aa38-303121eeba0f","b8715c07-43a3-46c3-a65c-e7e23ba5d189","5db0d9bf-85e7-411b-83df-0fe6285ec8cf","879e5476-1691-4272-aa14-5e275af924a4",null,"a6eb434b-f2c0-4b73-8883-7d600e0ad4bb","6a08af56-02ba-41eb-9629-5d3f09675caf","13a9ca5c-78d1-49bd-85de-17b1cb646470",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"3643c343-da18-4075-9e83-b21ed7703779","dcc94e6b-c8fb-4013-ad0d-40638fb7482f","63df99c6-9836-4d63-aedb-425687d44f71","16f9203d-1b03-4459-8060-98d1173a7ccf","864adf8b-dcaa-4e63-b431-37fccb0ecbb4","da72a99a-afc3-4a6e-a81d-75b9bc994089","ac33e829-2af5-4695-998c-8a25b83223df","3f76c7b5-f204-4a13-8816-43ea38e744b7","b53585e4-1383-431a-bee9-c2e8c724f523","61b96a3b-7cc9-4ca0-83ad-f53385e1ae1c","f88298fd-f572-4d23-ad17-8b67e8d29c3e","f2ae57ed-0502-4568-94c2-0303d3ea8d99","a431f88b-6500-4d77-b66f-97d451fed345","ffcd9e53-617c-4af6-8e17-a6e71f561131","de7e22fc-0604-453f-b1dd-29e6a5feaf7a","f59f5f0f-d730-4d71-96b4-cd3e71280f80","40b251a8-b289-4f5c-a4ed-a649ecb986d0","17ed2b86-3782-4290-9b3b-353964a07a2c","f59a68d1-74cb-42ee-a23d-3cb0aae637fb","0b700fd0-7714-4c29-9cfd-5ec202aa8fbc","443c5cd7-cd19-4c5e-a45b-74b4bf1dac5b","bb097a76-4d53-4293-84f9-5bc13979ca9d","69037be9-698e-477d-9b49-bb0cb07a4050","314cd99c-55d0-4506-9d41-3afc98ebbc01","8f06a4e3-a7f4-46b5-9aa5-37a243d541a4","9696cde2-bf4a-4fbf-a999-3e47a1dfd209","0d3d6329-18dc-4299-88e1-1a97b228187f","ac61b46f-ed19-435e-ae09-574c6f467c75","54f45e0f-399e-43e6-b0bf-684b7ea1c38c","34852ebc-0fd9-40a0-8816-96d4de885c7b","55ce92a6-faca-4212-ad2e-931ae85b8eaf","9a2f8617-ed56-4093-b60b-c882d15549d7","8907027e-edc2-4084-8660-ad66b3ebf69e","9460c4e0-3e19-4022-af69-fd1947aa882f","2d7b9632-f144-4662-bb71-347a1b1812d1","7a0f25ce-8b6b-4cad-8ebc-6745be931582"],F.outfitUpscaledMap=[null,"3f05fb83-d48e-4b42-bd76-494872e92a2b"],F.weaponMap=[null,"11878a2e-0c68-4cb5-a548-8e7cef3e679c","7dad9b15-4d35-4f3e-98f8-5cdc6bd88b95","595043fa-50f9-4b1b-b38d-ed87cfebeece","af5e6ff2-830d-4e8d-bb20-9a100a740860","53e0a07b-f911-4701-b006-3445483f6d7a","ab5c3b87-a0aa-4e4c-8a1b-700068cb7ec0","812046bb-02cf-4e18-8315-e98f2a97b8fa","e95b3e46-b73a-43a7-816f-0d6cfe1d39ed","1b44276e-a25f-48f1-b59a-a872643da288","533a42de-6948-422e-9327-84a28a962105","ce880839-d88a-4c15-8ef9-936ba6a1c0f2","87508d36-fdde-4493-8b9a-20069fffe302","71c93c49-9591-465d-841d-4c5897edc11b","eb66feb0-cbbe-426a-8bf4-21711b9dee1e","179729af-0e7b-4e09-b342-8d6bea1891f3","62f6f1f7-ebc0-4486-9ec7-52096c770106","900412e2-b85f-435c-85e1-aeab7a05aadb","f90a4c4d-6b49-41eb-a1d6-bf0184671cdc","c408634f-f116-45f8-8050-c6ae7631b333","90cd1579-529d-4533-abb7-bb48b60895be","6fba4fe4-5d9a-43d3-b7c8-d0a9680f9164","2a078d77-bb0f-4feb-b0ff-62d23108f6df","cb16fc74-7ac8-4792-9f56-2f9c00d3f42f","b0978c92-479c-47d2-9ee8-fbb6439a7b44","14ce706d-2296-42fb-ac96-1dbee2da12b8","42af54fd-81ac-48c0-b2af-08adf032b30d","4770f842-a01a-465e-95cd-c3de8256c6cc","1272cbbc-df16-4dbc-b054-484ee6965c94","47bbc901-5fbc-4105-a84d-3ed4f32ce647","a475f844-a67d-4d75-9f26-48628ddccc82","0dcd2f4b-eca1-4371-9c3c-e21820d980b2","728e51d5-178f-45fa-b00b-5dc90dc3395d","d4cdc841-6cf2-439b-be68-e8154add9619","2053dbdc-b9af-4170-b18a-2db791378813","16026e9b-7de1-4851-8b7c-c505937285bc","0e340e59-57d0-498a-b695-ae7626b8fba5","0ce2b425-b2af-4d4b-8b48-d57b0a3eee8f","653810ae-e7fa-4609-b728-799f26e14df5","90cec00f-4b7c-4436-a39b-1a51b69ea02f","bcbffdcd-97e7-41fc-9ad9-33cc1e93c4ec","d68a66b9-8ec5-424d-831f-541271f0121e","71ce696a-7db8-4774-bea5-13b6986ce12a","4c604b18-6db1-4329-ab60-f23d28139b49","a086442d-0570-4f62-a338-3e79f9ae81b0","7f761da7-1094-40e8-a1ae-d352bbc1bf39","c492dcea-1f39-4872-aa0e-f70ae11af14a","b8eb95d7-68c6-4192-9c87-a8148278f3c0","897533de-e2c1-4ac1-8ada-1efd1b0d7354","4ceb1c65-643a-4517-88fd-ed93f0f2402e","e76e24fe-cd41-4b7e-861e-6bb6adb31d40","b3293c7e-1668-41d4-97b4-272f3bcdc5a6","f39378e8-adb3-45b8-8d9c-10cc83096818","6bec7e66-f724-452b-95c5-6b4358bb65b7","c9cfd49c-10be-46b4-965f-6a98dbfc0106","f40220dc-2783-4b16-b94a-3b7485c8d510","47ab1796-e337-4bda-ad70-266e6c1a8026","7a79766e-0ddf-418d-80d8-b78443fd6c20","a226fb36-408b-4904-92f2-5b9b146c0879","81c8c4b1-fdea-43e0-b12c-437df05087ef","196b257d-2ad6-4d13-aa18-c7da92eb4d8f","1f255cc0-ffcc-4e6d-83b4-be54c9d2e039","cd30d9ea-1b42-4d78-a6e4-6d8d15c5757e","23ec66bb-bac5-4884-aa35-65eb3d40450d","400eb6ff-72ca-4825-a576-5f014549c8ad","25148d72-ba48-458e-a4e0-01450161ee28","c9f237a1-e8cc-492c-8737-3605bcc02258","bcb391fe-1a92-452c-9b0f-e360fdbd45ff","4d6d28e1-dddd-4bad-bb52-436dda18fffb","d08769d6-ab31-4541-8c7a-b2fd3a71beec","f940d04f-f293-4bf1-9fdc-3936011d2435","3ac421e2-bff3-4164-895d-39873a9a186d","0c5dddfe-0eb0-4ba0-a2b7-bf1bf11a0264","cd814a09-8808-42cf-92f5-b266a979058e","353652d4-1c7d-45ca-a785-1ef252d597bc","f78ecfe2-2152-44f1-b242-ed71d10d86a3","0941c73c-ebb2-46cf-92b0-20c1da439dd8","e7e73593-49b2-4184-ac58-0d62c1ab1cf6","c298f21c-e8bf-4754-b61e-645537f5b156","51115c6b-9093-4cf4-a67f-84cbd6b00362","bc7da8c5-00dd-41f1-a48f-6b87eb3aed3b","3ed99de2-db84-473c-9549-509cbf7e02f7","bd6945c1-1bc5-46b1-9148-46f3cad35734","9ac0240d-d57c-411a-a970-01a5a009fec9","1bb66c9c-998a-45a1-9595-90c9919cbb28","e2443c0a-ee06-4e91-af53-ec2531c82c5a","af417a05-7308-452a-9897-ee459a1eaebf","437d5d0c-9c59-4815-b4c0-07e84bbda1e2","3a4295de-5a93-48ce-b465-a7b680635d90","3cd2b9c5-e2f8-45a8-8613-dff6dfed75b5","10c2ee66-aeb1-44e6-b678-8cff79cfeadd","f872b493-61aa-4fe7-9027-32093be30340","17984954-a491-4eb6-89e1-2a2943435ea9","b70e8bfb-e85a-4f08-8b99-322bc1f95c46","5d762252-e5bd-41b6-b696-6949ea90af47","1395d0d5-8b14-45d9-bf5f-1e64dbf04674","a0bbe93a-31e7-4101-bd9c-7c84c9684644","dcfc5c6a-04f9-4bb8-870a-cbb20995bf4c","71298639-a8d2-4c21-b170-ae75f568b3a4","7b1b16d3-d15d-47a3-b3c1-257296bba928","3771eb30-ee63-43e8-80b9-205679365c19","a8b265f5-ae54-4ff0-955f-3f20e6882cd0","bb08e1cb-6477-4d28-b6ec-2dc60dc41fff","d22d961c-d268-435f-b051-8bcd7bec19c7","db679490-7136-42b0-8301-5d80f992082f","755dabbd-438c-4778-a428-97e79df476e3","19f9f491-d908-4537-87c7-4735b3706273","3d6b35ba-4ab7-4d05-9423-cb4676a8ff95","787b2888-54dc-4699-ac54-4191df8f8021","e566bc86-6632-49f0-86b9-0f788372d62a",null,"7aa30389-b8b0-4082-a741-0a72c633a9ae","0f40116b-727c-4bcb-8cf5-75f28d2ca09d","1c975f85-aabc-4d37-898b-44045bef5d2a","9fb4c1fb-3e9a-4507-8a87-59475cc5fde2","90513516-6e98-4b13-a449-6f77ed6a3705","f70b5ed1-d43f-4674-ae08-984b45b39773",null,"92e3b847-9520-4518-aa0c-fc5782443f6a","bb676bf3-cc5c-4949-80d7-e564cf5d2dc7","2dfd6021-4890-4d75-8167-5f3b24889b58","77726824-010e-4843-b3e2-ed8f0e37d46b","08529b60-42dc-4d2b-aa6f-118df5e75bee","37586eb4-49d9-4641-806d-e66e6801c61f","7b579fb0-1787-4cef-9a0e-c182ebf81580","657f7ec7-f16b-4d5f-967b-0a81cdf6be65","2fff2342-9383-4f2b-b7ce-1362b772ee9c","4a7afcac-2ba7-4e27-8a70-a08b8956d60f","076d5950-797d-4793-84ed-8895d69cb007","7c548c3f-2540-40c1-9af3-059516120ecd","1a5e0b77-2e51-4f22-9eaa-cce7c0510198","bbb018a5-6e25-4f9e-bebd-868215f83a32","14e24d9c-bbd4-4513-9ae4-51d024bdffe4","d9664b11-9334-46b1-a55c-c6eb1ef94f22","4ba252b9-8fb0-43b3-9e02-6dcca88eb466","8f3b88a8-76b2-407f-906a-fb977ee7b489","bd098f14-e6cb-4dce-bda5-c09ebaf8762a",null,"82d6ae51-4a5d-4ad5-bda4-0c184bb70ce7","0e11d794-54db-4ad5-a09b-01115c932d3f","d74fb899-e782-4a20-a163-965dcfdf5afb","cf1e7405-fc42-4493-b1d1-2a5c56fd40dd","9ed5875a-0464-42a5-94a2-8c7a41b27d5a","46a6167a-7f44-4f4e-ac1e-e8033b635379","4a2c5620-70bb-45aa-98c1-43a9710b0505",null,null,null,"41583903-baff-4c6c-b1d3-e1f17f840e08",null,"7c473e64-ecc2-415c-b7e6-bfcedbbb77ee","51e04c54-2a6e-4b26-b547-8e00a26e2b6e","401e7f85-fbf4-4d34-b3d7-462ca9a3cf36","c34c82a9-7684-45d1-acbe-84a1804f8dd4","0b42243e-1a91-4ca5-9347-33e79e00d7fa","04991883-24ee-4256-ae49-d287dc85f08c","ccf46aac-14af-4531-b759-7a0558841d26","cbb27a25-fd32-4620-949c-7c615bf19424","c90aec2d-ca08-4c9f-862f-c794c1860dbf","7d00cd3a-113a-4ca6-97f2-51920cf1eaea","870802b0-19da-4d0c-ac6c-f25e65396578","83513bda-4420-4b84-b285-6817ddc45d3f","cdd3d998-6ca1-4d9a-9957-2bc7a1e6013a","b1edb6cc-9790-4d1a-ac32-5b5ce35256c7","3f299941-81f6-4f64-be3c-1c09ce2034b7","a8e88a70-3325-4564-a363-7237f9b6b2e3",null,null,null,"7335a481-3685-413d-8560-8486af27093f","d8389d32-a340-4889-a7e9-23945b895863","84ca9e88-453d-49ef-8aef-c93f7074b275","30a0c416-9a2f-49b6-a9a8-9f05200374d4","98c92b6f-9c21-4bd4-b638-b4dd43d1623f","8d7ff62b-997e-4eb5-a672-2ff25ca85db6","63e89734-0b75-445f-88cb-c4eff6d25085","c359f486-624d-4189-86de-aee56dd72605","b556baf3-6e6a-4f43-a376-d66bb72c90fd","d4a82868-fdec-4681-9245-9997b8bedaaa","31e59a50-8acc-4698-9912-a7ffc5115236","625ef6d9-5529-412c-a9e6-fddeba5565df","0d01a341-a33e-4e9c-a9ca-e0d6b090f1bf","2b7cf6d7-4d9a-46fe-9e24-b87e4f93387a","9438f652-82bf-4760-bca8-020cc03b0bf8","50623f55-aaf4-41da-9d16-22f2a744013f","9ad277c2-3c1a-4bf1-9d7c-9434152adf7b",null,"a8644f8d-3f47-44dd-a3e3-e78f73178e05","4c44b9dd-9f05-4ba3-8f3c-379ef7135aa8","f74f0f41-47bd-44de-9c64-c263eca4ecd7","60472b75-a0cf-4709-bc13-b9c06194fea4","59ac9ba8-93ee-4e7c-b619-c02d702651fe","0bf90012-ec05-4e72-b3da-4342ea007d5c","2bcc9aa8-9ea3-494a-ac1d-e77d5d60ef8d","0dc754d5-a62b-4311-a325-27f56b3503c0","6393fd93-9674-4f80-a9dc-aa415bf9c5e7","0ea0335f-bfcf-49d3-8952-54a664110bd6","7ed75172-205d-4257-8f57-b1421e7bf468","868ba3df-b19b-4551-b2b7-348091217601","a46e050d-20c2-4e52-b6ca-fdd81e18d344","d1048577-a23a-4222-86ed-91f2f02c636b","79fca6c4-9f46-4dad-8800-aaa78fe4d7ff","79a516d3-e929-4fd8-82e8-627507dae3b8","568850a1-8e46-4846-9d57-31ac4ffaa26f","371d86dc-a596-42f3-9df4-6f0e0fd95b3b","47821a75-78a8-4c09-8888-c3e69a09db3f","6591e9fc-f201-4f81-929d-b481a7e5b9d3","aaaa2dec-6e1d-41f5-90ca-a9a8daf04155","19e88149-d163-44e7-bff6-1d1a884b0cdd","2001b1e9-fc74-4d45-9ca4-31973068cd55","c2684516-d123-4e44-a27d-d7d239ddb2e6","52c3ff75-7135-4270-ae7a-0a6ab48bd9c8","828971d7-3632-4406-a3aa-ae66667b745a","2c75ebd5-f2ca-49a8-b39f-68a804faed8a","588f1289-8e6e-4901-92f3-1eb327189f5c","aba98ead-de81-47c8-ab86-ca50ecd5fa4a","26615f01-169a-4ff2-934a-8b560929f8eb","f4103474-c1ef-46af-a5a5-386d78ce4b1d","27649a61-6bf4-4c96-be10-b76009350621","83d57fd2-c154-44da-a072-737976d0806a",null,"a9c9279b-6d37-4aa1-af95-1b2beb443b13","70072d78-31f0-4962-9568-d7770e5c3286","68f42243-d374-4c52-a8cb-93ae06f0357c","e9d39910-1e8e-453e-99da-911f6aa23257",null,"e8088038-ba5f-469f-a981-a30cfff03aea","ff0729c5-bca9-4230-8989-15965caf6c12","bcedc636-2745-496f-ada7-ad407e323f53","71edfb59-2e64-45dd-b7e3-993831579a4a","b4fe65ca-ed5d-41a2-b5fc-03fe60fa8781","6f04a6e5-3b48-43ee-9e92-e828561750ff",null,"c3386047-6ad9-4a07-999d-20c15a148003","5023c61e-52b7-47e7-8408-dbb66b67b4a6","6d306a60-baaa-4318-8d5f-a8fb11c57804","e9e5deb8-7322-4313-ad6c-bc81ddb555fa","432e064d-2c87-4282-bc83-88ea238eae90","347326c3-ded1-4e2f-8849-ad00298fbd4c","e97bb403-00b5-402a-b743-ad15c01edc0b","9892ae33-cb22-43b2-aae9-9b20efc535cf","3b2ecfc8-7582-4ef9-983c-dc8f53bd8088","76cbf819-7488-4316-adb5-4ef0320187f9","d0c5445e-fb56-40be-ac15-f7390327a944","59c2c773-81a9-465f-9a62-e4bb453b2e7a","57dce699-46cf-4046-954e-d2f88d17d832","7a9671e3-e195-4c18-8d0a-c79001df8733","1041dc9b-0aac-4ada-b7cf-dc6c5a3517eb","a44fbe1e-0b28-4427-ac92-5d138d3bc8a4",null,"3b9a027f-c744-4db5-8cb0-bdbdb65d415a","1adade9a-b1a9-4c73-a190-f5fafbf0cbc1",null,"6a808f1e-749f-4dca-8b0f-c985ddc88b72","f4b775cd-3463-497c-800e-858394d14ea8","1d94cabd-395b-4ee8-b0a7-1db8933fd16d","1c2cca00-583b-42e7-b534-9481634f8a54","36fc5f65-eb0b-40c8-b7d3-ac80de2d0e6e","46d1dadc-4982-4cb9-9c6f-b36c7cc16b12","c66d6f4e-8366-4c00-abb2-cacd4972be8b","1a315b73-e9e4-40c4-b9f8-f42b12e1a95f","672693eb-0d9b-4b42-b686-434e5a88747b","b3304b37-5ef3-47c4-873d-4a961885a0b5","c4b4ec9a-e759-40b5-8ead-6d7f844325cb","1856ffca-4793-47f6-96f2-74855cd299aa","0a8affd5-06d5-4a9a-9855-ea23416eb154","ac4859a7-ff0f-4d4c-8651-a58f5bb7082b","a9717a24-ba25-4138-922a-ecc50b71e4aa","cd03b4f9-43da-4c34-ae22-07046f68adb7","b9bfa27a-5c10-4c98-a330-15509e6e2405","a072cd77-0d65-4548-b518-b8747acf3fcf","e0813013-2628-4fb8-88f7-4341e0999adb","9df38cc3-6a39-45a8-9c1c-137eb5030cf1","9730671e-84f1-4768-b416-4a3cc1f39403","08ff3834-24a4-4dc6-a758-4917fa5882fa","8e054a97-c226-4ea2-a161-295a7443d8ab","93bc38ad-5a5f-413c-a329-003f659d4c62","f330d928-bb2a-4ac1-ab63-cc1c34cc4837","3df12f64-5f9a-4218-91e4-3380f8dd8ee9","67f382c0-577b-4ded-ba3d-89a5c07b6b2a","76bf1f96-ee33-4fe1-902b-7e5397a187f0",null,"44ebf44a-34c3-4acf-8f2a-135cfb0a363f","025c3c5c-90c1-40f6-b8d2-c7a3670d7084","66b4fa93-f2c6-4622-89b4-22efdaf1603a","b18bf303-1c58-409c-8d37-0d31404466a4","c5437ee7-6a37-450d-806f-439580edf2a1","f3cba0fe-d9af-4aed-bdee-c380b1eef586","587cf90b-02db-4f6e-919b-307dce05c9b2","d6d6a9b9-4320-4735-bd44-b7d38ab4d4b0","3cebe611-65bd-4435-9dda-42d1b9748e70","c779f4ed-29f8-4a10-8687-51d058d74c5d","4d18ec5e-a9b7-4348-9976-bc6134fbf3c2","81526c8c-7e2e-4503-ba3f-b55bda51d85a","28ed63d8-db9f-4bd2-a67d-8d73128dc704","747a4a01-35e6-44c9-94b5-efa3c92e1af7","8aca553e-4415-4f9a-8d2d-67e27d1f3b26","dda4f1e7-c5b8-4aef-887b-048c9253f03e","24899ce6-938f-42e7-a782-c02b625287df","73c8b71d-5af9-4e08-878a-9ae94dbea86e","2aea1c3a-add2-42b8-963c-834278952e7a","c2996c0b-6ae1-48e8-9450-49c7d8dd4265","e622b759-a64b-424b-90b6-a96602057dbf","463927bc-d7cc-4a94-8782-aa2412670925","f202895f-d3de-42ba-8fc2-26415e43c485","101e089e-98a4-498c-87ba-7f0f9c739e39","5fa218ad-9972-4d81-975c-8b8fee3a22cd","e0a05c21-a30c-494f-8519-f8be17bbb8cb","28d1f548-3458-4b34-b84c-db1fc433df3a","5b4fc6ff-70c2-41ef-b6f1-88085f3a2165","70b06004-1599-4116-9884-76abf9e599e2",null,null,null,"949eeb0b-5d58-4e72-a960-b84424694ca3","b4f3f074-a7ae-412f-ae6e-dc5b10eb8f36","e8d599f7-7023-4568-886d-7fb56748a874","fe63e1ab-d5d1-4852-a9fa-d6e8c6b990bb","c471548e-2fac-46ca-aea8-e500ae4e503d","2fb3b149-9d99-4153-9f53-98a13c1247a7","62691a9a-a6dd-4d83-82f7-716d70230f53","2a3d2c03-94ff-47f5-8916-7ea6bc439c4f","64b4233c-1034-4ac1-88da-2c14767ee80b","d64b8f02-1580-4ea0-bfd8-bae7c410b696"],F.weaponUpscaledMap=[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"237a530b-307b-498f-bb21-cb49621ae5e8"]},8900:(k,B,U)=>{"use strict";U.d(B,{M:()=>G});var F=U(88818);class G{constructor(){this.eyeAttachments=[F.VE.EyeLIris,F.VE.EyeLWhite,F.VE.EyeRIris,F.VE.EyeRWhite],this.hairAttachments=[F.VE.HairLPigtails,F.VE.HairRPigtails,F.VE.HairInfront,F.VE.HairShort,F.VE.HairBun,F.VE.HairBackLong,F.VE.HairBack,F.VE.HairBehind],this.faceAttachments=[F.VE.EyeLOutline,F.VE.EyeLBlink,F.VE.EyeROutline,F.VE.EyeRBlink,F.VE.EyebrowL,F.VE.EyebrowR,F.VE.FaceLower,F.VE.FaceUpper,F.VE.Nose,F.VE.Neck,F.VE.MouthSmile,F.VE.MouthClose,F.VE.MouthA,F.VE.MouthYeah,F.VE.EyebrowR,F.VE.EyebrowL],this.skinAttachments=[F.VE.BootRSkin,F.VE.BootLSkin,F.VE.LegRSkin,F.VE.LegLSkin,F.VE.SleeveRSkin,F.VE.SleeveLSkin,F.VE.GloveRSkin,F.VE.GloveLFingersSkin,F.VE.GloveLHandSkin]}static get instance(){return G._instance||(G._instance=new G),G._instance}}},57993:(k,B,U)=>{"use strict";U.d(B,{A:()=>G});var F=U(68910);class G extends F.Filter{get y(){return this.uniforms.ySample}set y(k){this.uniforms.ySample=k}get LUT(){return this.uniforms.uLUT}set LUT(k){this.uniforms.uLUT=k}constructor(k,B=.5){super(null,G.fragmentShader,{ySample:B,uLUT:null!=k?k:F.Texture.WHITE})}}G.fragmentShader="\n varying vec2 vTextureCoord;\n uniform sampler2D uSampler;\n uniform sampler2D uLUT;\n uniform float ySample;\n \n void main() {\n vec4 c = texture2D( uSampler, vTextureCoord );\n vec4 l = texture2D( uLUT, vec2(c.r/c.a, ySample) );\n c.rgb = l.rgb;\n c.rgb *= c.a;\n gl_FragColor = c;\n }"},1492:(k,B,U)=>{"use strict";U.d(B,{N:()=>tt});var F,G,j=U(8674),$=U(62459),H=U(68910),V=U(88818),W=U(35120),q=U(38443),K=U(73797),z=U(55741),Y=U(29834),Q=U(28402),X=U(6287),Z=U(63068);!function(k){k[k.Foreground=0]="Foreground",k[k.Background=1]="Background"}(G||(G={}));const J={[G.Foreground]:"front",[G.Background]:"back"};let tt=F=class extends $.uAl{constructor(){super(...arguments),this._foregroundSpineAnimator=null,this._backgroundSpineAnimator=null,this.mountReady=new $.HN0,this._isMountReady=!1,this._cachedVisibilityTuple=null,this._hiddenSlots=[]}get isMountReady(){return this._isMountReady}create(){super.create(),F.mountGear||(F.mountGear=new $.KDe,F.mountGear.hiddenSlots=[V.Cj.Shadow]),this._foregroundSpineAnimator=this._foregroundObject.findComponent(Y.j),this._backgroundSpineAnimator=this._backgroundObject.findComponent(Y.j),this._foregroundSpineAnimator?this._backgroundSpineAnimator?W.q.instance.game.broadcaster.addAppListener(K.B.SlotVisibilityChanged,this.onSlotVisibilityChanged.bind(this),this,"SlotVisibility"):$.VyI.log("No background spine animation found for background",$.$bb.Error):$.VyI.log("No foreground spine animation found for foreground",$.$bb.Error)}postCreate(){const k=Object.create(null,{postCreate:{get:()=>super.postCreate}});return(0,j.sH)(this,void 0,void 0,(function*(){if(k.postCreate.call(this),this.mount)try{yield this.setMount(this.mount)}catch(B){$.RQr.logError(B,"Could not set mount.")}else $.VyI.log("No mount specified for mount component",$.$bb.Verbose)}))}update(){var k;super.update(),(null===(k=this._particleRoot)||void 0===k?void 0:k.transform)&&this._particleRoot.transform.setScale(this.GameObject.transform.worldScale.x<0?-1:1,1)}onSlotVisibilityChanged(k,B,U){var F,G,j;if(!(null===(G=null===(F=null==k?void 0:k.parent)||void 0===F?void 0:F.name)||void 0===G?void 0:G.includes("ChargedLevelEffect")))return;const $=this._backgroundObject.findComponent(Q.v);(null===(j=null==$?void 0:$.getSpine())||void 0===j?void 0:j.pixiSpine)?U?this.unhideMountSlot(B):this.hideMountSlot(B):this._cachedVisibilityTuple=[B,U]}setMount(k){return(0,j.sH)(this,void 0,void 0,(function*(){if((!k||this.mount&&this.mount!==k)&&(yield this.clearMount(),!k))return;const B=$.W$e.instance.game.cache.getJSON(k);let U,F,j;if(B){const k=X.u.fromMountFile(B);U=Promise.resolve(k)}else U=new Promise((B=>{W.q.instance.prodigy.load.assets([k],(()=>{const U=X.u.fromMountFile($.W$e.instance.game.cache.getJSON(k));B(U)}))}));if(this._mountElem=yield U,F=$.W$e.instance.game.cache.checkSpineKey(this._mountElem.spineGuid)?Promise.resolve():new Promise((k=>{W.q.instance.prodigy.load.assets([this._mountElem.spineGuid],(()=>{k()}))})),this._mountElem.particlesGuid){j=W.q.instance.prodigy.gameContainer.get("d0e-64fd").preloadFromGUIDWithDependencies(this._mountElem.particlesGuid).promise}else j=Promise.resolve();yield Promise.all([F,j]),yield Promise.all([this.setupAnimationObject(G.Background,this._mountElem.spineGuid),this.setupAnimationObject(G.Foreground,this._mountElem.spineGuid)]),this.playAnimation("idle"),this.setupPlayerFollow(),this._isMountReady=!0,this.mount=k,this.mountReady.dispatch(),this._cachedVisibilityTuple&&(this._cachedVisibilityTuple[1]?this.unhideMountSlot(this._cachedVisibilityTuple[0]):this.hideMountSlot(this._cachedVisibilityTuple[0]),this._cachedVisibilityTuple=null)}))}hideMountSlot(k){var B,U;if(!this._hiddenSlots.includes(k)){this._hiddenSlots.push(k);const F=this._backgroundObject.findComponent(Q.v);null===(U=null===(B=null==F?void 0:F.getSpine())||void 0===B?void 0:B.pixiSpine)||void 0===U||U.hackTextureBySlotName(k,H.Texture.EMPTY)}}unhideMountSlot(k){var B,U;if(this._hiddenSlots.includes(k)){const F=this._backgroundObject.findComponent(Q.v);null===(U=null===(B=null==F?void 0:F.getSpine())||void 0===B?void 0:B.pixiSpine)||void 0===U||U.hackTextureBySlotName(k,null),this._hiddenSlots.splice(this._hiddenSlots.indexOf(k),1)}}addParticleEffectByID(k,B=-20,U=-35){var F;this.removeParticleEffect(),this._particle=q.d.createParticleEmitter(this.gameObject,k,new $.I9Y(B,U)),this._particle.worldSpaceScaling=!1,null===(F=this._particle.GameObject)||void 0===F||F.sendToBack(),this._particleRoot=this._particle.GameObject}addInternalParticleEffect(){return(0,j.sH)(this,void 0,void 0,(function*(){var k,B,U,F;if(!this.hasInternalParticleEffect())throw new Error("No internal particle effect defined for mount, cannot add");const G=null!==(B=null===(k=this._mountElem.particleOffset)||void 0===k?void 0:k.x)&&void 0!==B?B:0,j=null!==(F=null===(U=this._mountElem.particleOffset)||void 0===U?void 0:U.y)&&void 0!==F?F:0;return this.addParticleEffectByGUID(this._mountElem.particlesGuid,G,j)}))}addParticleEffectByGUID(k,B,U){return(0,j.sH)(this,void 0,void 0,(function*(){var F;this.removeParticleEffect();try{const F=W.q.instance.prodigy.gameContainer.get("d0e-64fd");return this._particleRoot=yield F.loadWithDependenciesFromGUID(k,this.gameObject,!1),this._particleRoot.transform.setPosition(B,U),this._particle=this._particleRoot.findComponentInChildren($.okU),this._particle.worldSpaceScaling=!1,this._particleRoot.sendToBack(),this._particle}catch(G){throw $.RQr.logError(G,`Could not load particle effect ${k} in mount ${null!==(F=this.mount)&&void 0!==F?F:"unknown"}`),this._particleRoot=null,this._particle=null,G}}))}removeParticleEffect(){this._particleRoot&&(this._particleRoot.destroy(),this._particle=null,this._particleRoot=null)}pauseParticles(){this._particle&&(this._particle.pauseEmission=!0)}resumeParticles(){this._particle&&(this._particle.pauseEmission=!1)}hasInternalParticleEffect(){return!!this._mountElem.particlesGuid}clearMount(){return(0,j.sH)(this,void 0,void 0,(function*(){this.stopAnimation(),this.clearPlayerFollow(),this.removeParticleEffect(),yield Promise.all([this.setupAnimationObject(G.Background,null),this.setupAnimationObject(G.Foreground,null)]),this.mount=null,this.mountReady.dispatch()}))}setupPlayerFollow(){var k,B,U,G,j;null===(k=this.playerObject.findComponentInChildren(Z.n,!0))||void 0===k||k.addExtraGear(F.mountGear);let H=this.playerObject.findComponent(z.l);H||(H=this.playerObject.addComponent(z.l));const V=this._backgroundObject.findComponent(Q.v);V?(H.setup({spineComponent:V,boneName:"character",slotName:"character",followAxis:3,followRotation:!1,followScale:4,boneFollowerTransform:this.playerObject.transform}),H.localOffset=new $.I9Y(null!==(U=null===(B=this._mountElem)||void 0===B?void 0:B.offset.x)&&void 0!==U?U:0,null!==(j=null===(G=this._mountElem)||void 0===G?void 0:G.offset.y)&&void 0!==j?j:0)):$.VyI.log("No spine component found on the background object",$.$bb.Error)}clearPlayerFollow(){var k;const B=this.playerObject.findComponent(z.l);B&&(this.playerObject.transform.setPosition(0,0),B.destroy()),null===(k=this.playerObject.findComponentInChildren(Z.n,!0))||void 0===k||k.removeExtraGear(F.mountGear)}stopAnimation(){this._foregroundSpineAnimator&&this._backgroundSpineAnimator?(this._foregroundSpineAnimator.stopAnimation(),this._backgroundSpineAnimator.stopAnimation()):$.VyI.log("No spine animator found for mount",$.$bb.Error)}playAnimation(k,B=0){this._foregroundSpineAnimator&&this._backgroundSpineAnimator?(this._foregroundSpineAnimator.playAnimation(`${k}-${J[G.Foreground]}`,!0,!1,!1,B),this._backgroundSpineAnimator.playAnimation(`${k}-${J[G.Background]}`,!0,!1,!1,B)):$.VyI.log("No spine animator found for mount",$.$bb.Error)}setupAnimationObject(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){const U=J[k],F=k===G.Foreground?this._foregroundObject:this._backgroundObject;if(!F)return void $.VyI.log(`No layer object found for layer ${U}`,$.$bb.Error);const j=F.findComponent(Q.v);if(!j)return void $.VyI.log(`No spine component found on the mount object for layer ${U}`,$.$bb.Warning);const H=new Promise((k=>{j.setAsset(null!=B?B:"",(()=>{k()}))}));yield H}))}destroy(){this.clearPlayerFollow(),this.removeParticleEffect(),this.mount=null,this._foregroundSpineAnimator=null,this._backgroundSpineAnimator=null,this.mountReady.dispose(),W.q.instance.game.broadcaster.removeAppListener(K.B.SlotVisibilityChanged,this,"SlotVisibility"),super.destroy()}};(0,j.Cg)([(0,$.ERr)(),(0,j.Sn)("design:type",$._mx)],tt.prototype,"_foregroundObject",void 0),(0,j.Cg)([(0,$.ERr)(),(0,j.Sn)("design:type",$._mx)],tt.prototype,"_backgroundObject",void 0),(0,j.Cg)([(0,$.ERr)(),(0,j.Sn)("design:type",$._mx)],tt.prototype,"playerObject",void 0),(0,j.Cg)([(0,$.tW2)("mount"),(0,j.Sn)("design:type",String)],tt.prototype,"mount",void 0),tt=F=(0,j.Cg)([(0,$.EVk)("Mount",$.YH6.animation)],tt)},6287:(k,B,U)=>{"use strict";U.d(B,{u:()=>G});var F=U(62459);class G{static fromMountFile(k){const B=new G;return B.offset=new F.I9Y(k.playerOffset.x,k.playerOffset.y),B.spineGuid=k.mountSpine,k.mountParticlesGuid&&(B.particlesGuid=k.mountParticlesGuid),k.particleOffset&&(B.particleOffset=new F.I9Y(k.particleOffset.x,k.particleOffset.y)),B}static toMountFile(k){const B={playerOffset:{x:k.offset.x,y:k.offset.y},mountSpine:k.spineGuid};return k.particlesGuid&&(B.mountParticlesGuid=k.particlesGuid),k.particleOffset&&(B.particleOffset={x:k.particleOffset.x,y:k.particleOffset.y}),`${JSON.stringify(B,null,4)}\n`}}},97651:(k,B,U)=>{"use strict";U.d(B,{e:()=>Y});var F=U(8674),G=U(62459),j=U(82209),$=U(72379),H=U(37773),V=U(97317),W=U(65732),q=U(28152),K=U(26932),z=U(26004);let Y=class extends K.z{constructor(){super(...arguments),this.bindOnCreate=!0,this.ignoreLosingLevels=!1}create(){super.create(),G.Aq$.isDefined(this._playerDataProvider)||G.VyI.log("[PlayerChargedLevelDataProviderComponent] No PlayerDataProvider found in context",G.$bb.Verbose),this.bindOnCreate&&this.bindContext()}bindContext(){var k,B,U,F;if(!this._playerDataProvider)return;if(this._playerDataProvider.getLevel()0)return this._context.Container.rebind(W.E.ChargeRevealEffectEnabled).toConstantValue(!1),void this.bindLevel(this._playerDataProvider.getLevel()+F)}const G=(null===(F=this._playerDataProvider)||void 0===F?void 0:F.getChargedLevel())>0?this._playerDataProvider.getLevel()+this._playerDataProvider.getChargedLevel():this._playerDataProvider.getLevel();this.bindLevel(G)}showChargeKeptEffect(){this._context.Container.rebind(W.E.ChargedCreatureEffectDisplayType).toConstantValue(V.X$.CHARGE_KEPT),this.gameObject.findComponentsInChildren(z.B).forEach((k=>k.consume()))}showChargeLostEffect(){this._context.Container.rebind(W.E.ChargedCreatureEffectDisplayType).toConstantValue(V.X$.CHARGE_LOST),this.gameObject.findComponentsInChildren(z.B).forEach((k=>k.consume()))}bindChargedLevelTier(k){this._context.Container.rebind(W.E.ChargedCreatureEffectTier).toConstantValue(H.e.getChargedLevelTierFromLevel(k))}bindLevel(k){var B;if(k>this._playerDataProvider.player.currentMaxLevel){const U=k-this._playerDataProvider.player.currentMaxLevel;this._context.Container.rebind(W.E.PlayerChargedLevel).toConstantValue(this._playerDataProvider.getChargedLevel()),this._context.Container.rebind(W.E.ChargedCreatureEffectTier).toConstantValue(H.e.getChargedLevelTierFromLevel(U)),this._context.Container.rebind(W.E.PlayerChargedLevelCap).toConstantValue(this._playerDataProvider.getChargedLevelCap());const F=null!==(B=this._context.getInjectedValue(W.E.ChargeRevealEffectEnabled))&&void 0!==B&&B?V.X$.REVEAL_TO_IDLE:V.X$.IDLE;this._context.Container.rebind(W.E.ChargedCreatureEffectDisplayType).toConstantValue(F)}else this._context.Container.rebind(W.E.PlayerChargedLevel).toConstantValue(0),this._context.Container.rebind(W.E.PlayerChargedLevelCap).toConstantValue(0),this._context.Container.rebind(W.E.ChargedCreatureEffectTier).toConstantValue(V.Bv.NO_CHARGE),this._context.Container.rebind(W.E.ChargedCreatureEffectDisplayType).toConstantValue(V.X$.HIDDEN);this.gameObject.findComponentsInChildren(z.B).forEach((k=>k.consume()))}};(0,F.Cg)([(0,G.Cdj)("377-3e7b"),(0,F.Sn)("design:type",j.z)],Y.prototype,"_playerDataProvider",void 0),(0,F.Cg)([(0,G.Cdj)("62e-110e"),(0,F.Sn)("design:type",$.g)],Y.prototype,"_chargedLevelsProgressManager",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"bindOnCreate",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"ignoreLosingLevels",void 0),Y=(0,F.Cg)([(0,G.EVk)("PlayerChargedLevelDataProvider",q.Y.player)],Y)},55950:(k,B,U)=>{"use strict";U.d(B,{y:()=>nt});var F,G,j,$,H=U(8674),V=U(62459),W=U(95891),q=U(68910),K=U(88818);!function(k){k.Attack="attack",k.Attack2="attack2",k.DanceDab="dance-dab",k.DanceMoonwalk="dance-moonwalk",k.DanceRunningman="dance-runningman",k.Dig="dig",k.Idle="idle",k.IdleHeavy="idle-heavy",k.IdlePose="idle-pose",k.IdleToPetInteract="idle-to-pet-interact",k.PetInteract="pet-interact",k.Static="static",k.Walk="walk"}(F||(F={})),function(k){k.Cast="cast"}(G||(G={})),function(k){k.Shadow="shadow",k.HairLPigtails="hair-L-pigtails",k.HatBack="hat-back",k.HairBun="hair-bun",k.HairBackLong="hair-back-long",k.HairBack="hair-back",k.Cape="cape",k.SleeveLSkin="sleeve-L-skin",k.SleeveL="sleeve-L",k.GloveLHandSkin="glove-L-hand-skin",k.GloveLHand="glove-L-hand",k.HairBehind="hair-behind",k.Weapon="weapon",k.Tail="tail",k.Back="back",k.GloveLFingersSkin="glove-L-fingers-skin",k.GloveLFingers="glove-L-fingers",k.LegLSkin="leg-L-skin",k.LegL="leg-L",k.BootLSkin="boot-L-skin",k.BootL="boot-L",k.Hip="hip",k.LegRSkin="leg-R-skin",k.LegR="leg-R",k.BootRSkin="boot-R-skin",k.BootR="boot-R",k.PauldronL="pauldron-L",k.HatMiddle="hat-middle",k.Neck="neck",k.Torso="torso",k.Belt="belt",k.Chest="chest",k.SleeveRSkin="sleeve-R-skin",k.SleeveR="sleeve-R",k.Collar="collar",k.GloveRSkin="glove-R-skin",k.GloveRWrist="glove-R-wrist",k.GloveRHand="glove-R-hand",k.Necklace="necklace",k.FaceLower="face-lower",k.FaceUpper="face-upper",k.EyeLWhite="eye-L-white",k.EyeLIris="eye-L-iris",k.EyeLOutline="eye-L-outline",k.EyeLBlink="eye-L-blink",k.EyeRWhite="eye-R-white",k.EyeRIris="eye-R-iris",k.EyeROutline="eye-R-outline",k.EyeRBlink="eye-R-blink",k.Mouth="mouth",k.Nose="nose",k.EyebrowR="eyebrow-R",k.EyebrowL="eyebrow-L",k.ExpressionFace="expression-face",k.HairInfront="hair-infront",k.HairShort="hair-short",k.HatFace="hat-face",k.HairRPigtails="hair-R-pigtails",k.PauldronR="pauldron-R",k.HatFront="hat-front",k.ExpressionUpper="expression-upper"}(j||(j={})),function(k){k.Back="back",k.Belt="belt",k.BootL="boot-L",k.BootLSkin="boot-L-skin",k.BootR="boot-R",k.BootRSkin="boot-R-skin",k.Cape="cape",k.Chest="chest",k.Collar="collar",k.ExpressionFace="expression-face",k.ExpressionUpper="expression-upper",k.EyeLBlink="eye-L-blink",k.EyeLIris="eye-L-iris",k.EyeLOutline="eye-L-outline",k.EyeLWhite="eye-L-white",k.EyeRBlink="eye-R-blink",k.EyeRIris="eye-R-iris",k.EyeROutline="eye-R-outline",k.EyeRWhite="eye-R-white",k.EyebrowL="eyebrow-L",k.EyebrowR="eyebrow-R",k.FaceLower="face-lower",k.FaceUpper="face-upper",k.GloveLFingers="glove-L-fingers",k.GloveLFingersSkin="glove-L-fingers-skin",k.GloveLHand="glove-L-hand",k.GloveLHandSkin="glove-L-hand-skin",k.GloveRHand="glove-R-hand",k.GloveRSkin="glove-R-skin",k.GloveRWrist="glove-R-wrist",k.HairBack="hair-back",k.HairBackLong="hair-back-long",k.HairBehind="hair-behind",k.HairBun="hair-bun",k.HairInfront="hair-infront",k.HairLPigtails="hair-L-pigtails",k.HairRPigtails="hair-R-pigtails",k.HairShort="hair-short",k.HatBack="hat-back",k.HatFace="hat-face",k.HatFront="hat-front",k.HatMiddle="hat-middle",k.Hip="hip",k.LegL="leg-L",k.LegLSkin="leg-L-skin",k.LegR="leg-R",k.LegRSkin="leg-R-skin",k.MouthA="mouth-A",k.MouthClose="mouth-Close",k.MouthSmile="mouth-smile",k.MouthYeah="mouth-yeah",k.Neck="neck",k.Necklace="necklace",k.Nose="nose",k.PauldronL="pauldron-L",k.PauldronR="pauldron-R",k.Shadow="shadow",k.SleeveL="sleeve-L",k.SleeveLSkin="sleeve-L-skin",k.SleeveR="sleeve-R",k.SleeveRSkin="sleeve-R-skin",k.Tail="tail",k.Torso="torso",k.Weapon="weapon"}($||($={}));const z=new Map([["back",[963,782,353,313]],["belt",[484,25,234,65]],["boot-L",[1883,72,112,113]],["boot-L-skin",[1883,298,113,113]],["boot-R",[1568,18,112,113]],["boot-R-skin",[1888,419,113,113]],["cape",[1587,820,243,275]],["chest",[1766,699,123,120]],["collar",[1038,213,274,105]],["expression-face",[878,1096,398,450]],["expression-upper",[1277,1096,398,450]],["eye-L-blink",[123,31,56,27]],["eye-L-iris",[1676,1100,60,60]],["eye-L-outline",[878,845,69,90]],["eye-L-white",[926,3,57,87]],["eye-R-blink",[520,1392,67,29]],["eye-R-iris",[1737,1100,60,60]],["eye-R-outline",[719,0,104,90]],["eye-R-white",[824,3,101,87]],["eyebrow-L",[520,1422,80,75]],["eyebrow-R",[1156,7,99,70]],["face-lower",[1568,132,314,254]],["face-upper",[1313,42,254,188]],["glove-L-fingers",[1205,319,105,99]],["glove-L-fingers-skin",[1205,419,105,99]],["glove-L-hand",[1831,1041,120,119]],["glove-L-hand-skin",[277,1388,113,109]],["glove-R-hand",[1587,699,121,120]],["glove-R-skin",[1766,412,121,120]],["glove-R-wrist",[1883,186,113,111]],["hair-L-pigtails",[0,1387,276,659]],["hair-R-pigtails",[601,838,276,659]],["hair-back",[1317,675,269,420]],["hair-back-long",[878,1547,431,499]],["hair-behind",[0,375,526,462]],["hair-bun",[1316,231,215,443]],["hair-infront",[0,59,358,315]],["hair-short",[963,519,352,262]],["hat-back",[0,838,600,548]],["hat-face",[1310,1596,398,450]],["hat-front",[277,1498,600,548]],["hat-middle",[527,289,435,548]],["hip",[1156,78,137,134]],["leg-L",[1890,713,115,163]],["leg-L-skin",[1831,877,115,163]],["leg-R",[1881,533,114,165]],["leg-R-skin",[1766,533,114,165]],["mouth-A",[59,21,63,37]],["mouth-Close",[180,35,53,23]],["mouth-smile",[234,37,44,21]],["mouth-yeah",[0,9,58,49]],["neck",[878,1011,79,84]],["necklace",[391,1389,128,108]],["nose",[878,936,75,74]],["pauldron-L",[359,206,147,168]],["pauldron-R",[1709,1632,188,177]],["shadow",[507,91,530,197]],["sleeve-L",[359,5,124,200]],["sleeve-L-skin",[963,319,123,199]],["sleeve-R",[1038,21,117,191]],["sleeve-R-skin",[1087,327,117,191]],["tail",[1709,1810,288,236]],["torso",[1532,387,233,287]],["weapon",[1676,1161,216,434]]]);var Y,Q,X=U(35120),Z=U(34829),J=U(30705),tt=U(51941),et=U(8900),it=U(57993),st=U(97252);!function(k){k.Skin="skin",k.Face="face",k.Hair="hair",k.Eyes="eyes"}(Q||(Q={}));let nt=Y=class extends V.uAl{constructor(){super(...arguments),this.autoRefresh=!1,this.lutGuid="e918c892-6a34-4bc0-8f2d-2d91b3a4e91b",this.skinIndex=0,this.hairIndex=0,this.eyeIndex=0,this.attachmentTextureIdMap=new Map,this.onColorRefreshed=new V.HN0}get initialAtlasFrames(){return this._scaling===st.M.UPSCALED_4x?z:K.yG}postCreate(){super.postCreate(),this.postCreate=super.postCreate.bind(this),Y.lutTexture||(Y.lutTexture=X.q.instance.game.cache.getTexture(this.lutGuid)),this._gear||(this._gear=this.gameObject.findComponent(tt.c)),Z.A.get("GameConstants.Debug.SHOW_PLAYER_COLOR_DEBUG_MENU")&&J.b.debugGUI("player",this,[{parameter:"skinIndex",min:1,max:Y.SKIN_TONES-1,step:1},{parameter:"hairIndex",min:1,max:Y.HAIR_TONES-1,step:1},{parameter:"eyeIndex",min:1,max:Y.EYE_TONES-1,step:1}],void this.refresh.bind(this)),this.autoRefresh&&(this._spineComponent.isLoaded?this.refresh().catch(V.RQr.createHandler("Could not refresh PlayerColorComponent with preloaded spine")):this._spineComponent.OnLoaded.addOnce((()=>{this.refresh().catch(V.RQr.createHandler("Could not refresh PlayerColorComponent with post-loaded spine"))})))}destroy(){Z.A.get("GameConstants.Debug.SHOW_PLAYER_COLOR_DEBUG_MENU")&&J.b.removeDebugGUI("player"),this.onColorRefreshed.dispose(),super.destroy()}validateFilters(){Y.lutTexture?(this.validateLUTFilter(Y.HAIR_FILTERS,this.hairIndex,Y.SKIN_TONES),this.validateLUTFilter(Y.SKIN_FILTERS,this.skinIndex,0),this.validateLUTFilter(Y.EYE_FILTERS,this.eyeIndex,Y.SKIN_TONES+Y.HAIR_TONES)):V.VyI.log("no global lut set for PlayerColorComponent",V.$bb.Warning)}validateLUTFilter(k,B,U){k.has(B)||k.set(B,new it.A(Y.lutTexture,(B+.5+U)/Y.lutTexture.height))}refresh(){return(0,H.sH)(this,void 0,void 0,(function*(){var k;this.postCreate(),this._spine||(this._spine=this._spineComponent.getSpine()),yield this._gear.refresh().catch((k=>{V.RQr.createHandler(`Could not refresh gear from player color\n${k}`)})),this.skinIndex=Math.max(this.skinIndex,0),this.eyeIndex=Math.max(this.eyeIndex,0),this.hairIndex=Math.max(this.hairIndex,0),this.attachmentTextureIdMap=this._gear.attachmentTextureIdMap,Y.lutTexture&&(null===(k=this._spine)||void 0===k?void 0:k.pixiSpine)&&(this.validateFilters(),this.applyFiltersToSlots(Y.SKIN_FILTERS.get(this.skinIndex),et.M.instance.skinAttachments,Q.Skin,this.skinIndex),this.applyFiltersToSlots(Y.SKIN_FILTERS.get(this.skinIndex),et.M.instance.faceAttachments,Q.Face,this.skinIndex),this.applyFiltersToSlots(Y.HAIR_FILTERS.get(this.hairIndex),et.M.instance.hairAttachments,Q.Hair,this.hairIndex),this.applyFiltersToSlots(Y.EYE_FILTERS.get(this.eyeIndex),et.M.instance.eyeAttachments,Q.Eyes,this.eyeIndex),this._gear.updateSkin(),this.onColorRefreshed.dispatch())}))}applyFiltersToSlots(k,B,U,F){var G;const j=null===(G=this._spine)||void 0===G?void 0:G.skeleton;if(!j)return void V.VyI.log("Could not apply filter; spine skeleton not found",V.$bb.Error);const $=[];let H=B.filter((k=>{for(let B=0;B{this._gear.getSlotNames(B).forEach((G=>{var $,H;if(this._gear.isHiddenSlot(G))return;const K=j.findSlot(G),z=j.getAttachment(K.data.index,B);if(!z)return;if(!this._gear.shouldRecolorSlot(z.name))return;const Q=this.attachmentTextureIdMap.get(B),Z=V.Aq$.isDefined(this._scaling)?this._scaling===st.M.DEFAULT_1X?"defaultScale":"upscaled":"default",J=`${Q}-${U}-${F}-${B}-${Z}`;let tt;if(Q&&X.q.instance.game.cache.checkImageKey(Q))Y._sprite.texture=X.q.instance.game.cache.getTexture(Q),tt=this.getCachedFilterTexture(k,Y._sprite,J);else{Y._sprite.texture=new q.Texture(V.a5k.defaultTextures.get(this._spine.name).baseTexture,new q.Rectangle(...this.initialAtlasFrames.get(B)));const F=`${U}-base-${B}-${Z}`,G=this.getBaseTexture(Y._sprite,F);Y._sprite.texture=G,tt=this.getCachedFilterTexture(k,Y._sprite,J)}if(0===z.type||2===z.type){const k=z.copy(),U=(0,W.clone)(k.region);U.names=k.region.names,U.values=k.region.values,U.texture=tt,k.region=U,null===($=this._gear.skin)||void 0===$||$.removeAttachment(K.data.index,B),null===(H=this._gear.skin)||void 0===H||H.setAttachment(K.data.index,B,k)}}))}))}getBaseTexture(k,B){const U=X.q.instance.game.cache.getRenderTexture(B);if(U)return U;const F=X.q.instance.game.renderer.generateTexture(k);return V.qFr.setSmoothed(F,!0),X.q.instance.game.cache.addRenderTexture(B,F),F}getCachedFilterTexture(k,B,U){const F=X.q.instance.game.cache.getRenderTexture(U);if(F)return F;B.filters=Array.isArray(k)?k:[k];const G=X.q.instance.game.renderer.generateTexture(B);return V.qFr.setSmoothed(G,!0),X.q.instance.game.cache.addRenderTexture(U,G),B.filters=null,G}};nt._sprite=new q.Sprite,nt.SKIN_TONES=6,nt.HAIR_TONES=44,nt.EYE_TONES=15,nt.SKIN_FILTERS=new Map,nt.HAIR_FILTERS=new Map,nt.EYE_FILTERS=new Map,(0,H.Cg)([(0,V.vkK)(),(0,H.Sn)("design:type",Boolean)],nt.prototype,"autoRefresh",void 0),(0,H.Cg)([(0,V.Bak)(),(0,V.W_S)(),(0,V.i0J)(V.Z$z.Image),(0,H.Sn)("design:type",String)],nt.prototype,"lutGuid",void 0),(0,H.Cg)([(0,V.Pqz)(V.v2j),(0,H.Sn)("design:type",V.v2j)],nt.prototype,"_spineComponent",void 0),(0,H.Cg)([(0,V.g11)(),(0,H.Sn)("design:type",Number)],nt.prototype,"skinIndex",void 0),(0,H.Cg)([(0,V.g11)(),(0,H.Sn)("design:type",Number)],nt.prototype,"hairIndex",void 0),(0,H.Cg)([(0,V.g11)(),(0,H.Sn)("design:type",Number)],nt.prototype,"eyeIndex",void 0),(0,H.Cg)([(0,V.Cdj)("PLAYER_APPEARANCE_SCALING"),(0,H.Sn)("design:type",Number)],nt.prototype,"_scaling",void 0),(0,H.Cg)([(0,V.bbQ)(),(0,H.Sn)("design:type",V.HN0)],nt.prototype,"onColorRefreshed",void 0),(0,H.Cg)([(0,V.GO0)(),(0,H.Sn)("design:type",Function),(0,H.Sn)("design:paramtypes",[]),(0,H.Sn)("design:returntype",Promise)],nt.prototype,"refresh",null),nt=Y=(0,H.Cg)([(0,V.EVk)("PlayerColor",V.YH6.animation)],nt)},63068:(k,B,U)=>{"use strict";U.d(B,{n:()=>Y});var F=U(8674),G=U(62459),j=U(35120),$=U(34829),H=U(30705),V=U(51941),W=U(36164),q=U(55950),K=U(97252);const z=Object.values(K.EQ).filter((k=>"number"==typeof k)).length;let Y=class extends G.uAl{constructor(){super(...arguments),this._extraGear=[],this.onAppearanceLoaded=new G.HN0,this.onFirstAppearanceLoaded=new G.HN0}create(){if(super.create(),$.s.get("GameConstants.Debug.SHOW_PLAYER_OUTFIT_DEBUG_MENU")){const k={face:1,outfit:1,boot:1,weapon:1,haircut:1,hat:1,skin:1,hair:1,eye:1,scale:1};H.b.debugGUI("outfit",k,[{parameter:"face",step:1,min:1,max:W.R.faceMap.length},{parameter:"outfit",step:1,min:1,max:W.R.outfitMap.length},{parameter:"boot",step:1,min:1,max:W.R.bootMap.length},{parameter:"weapon",step:1,min:1,max:W.R.weaponMap.length},{parameter:"haircut",step:1,min:0,max:W.R.hairMap.length},{parameter:"hat",step:1,min:0,max:W.R.hatMap.length},{parameter:"skin",step:1,min:1,max:q.y.SKIN_TONES},{parameter:"hair",step:1,min:1,max:q.y.HAIR_TONES},{parameter:"eye",step:1,min:1,max:q.y.EYE_TONES},{parameter:"scale",min:1,max:2}],(()=>{this.fromPlayerAppearanceData({weapon:k.weapon,outfit:k.outfit,boot:k.boot,skin:k.skin,hair:{color:k.hair,style:k.haircut},face:k.face,hat:k.hat,eyeColor:k.eye}).catch((k=>{G.RQr.createHandler("Failed to set player outfit from debug gui.")})),this.gameObject.transform.setScale(.125*k.scale,.125*k.scale)}))}this.onAppearanceLoaded.addOnce((()=>{this.onFirstAppearanceLoaded.dispatch()}))}fromPlayerAppearanceData(k){return(0,F.sH)(this,void 0,void 0,(function*(){this._spineComponent.isLoaded||(yield this._spineComponent.OnLoaded.asPromise());try{k.costume?yield Promise.all([this._gearManager.setGearAt(K.EQ.FACE,null,!1),this._gearManager.setGearAt(K.EQ.BOOTS,null,!1),this._gearManager.setGearAt(K.EQ.OUTFIT,null,!1),this._gearManager.setGearAt(K.EQ.HAIR,null,!1),this._gearManager.setGearAt(K.EQ.HAT,null,!1),this.setGearOfType(K.EQ.COSTUME,k.costume,"costume"),this.setGearOfType(K.EQ.WEAPON,k.weapon,"weapon")]):yield Promise.all([this._gearManager.setGearAt(K.EQ.COSTUME,null,!1),this.setGearOfType(K.EQ.FACE,k.face,"face"),this.setGearOfType(K.EQ.BOOTS,k.boot,"boot"),this.setGearOfType(K.EQ.OUTFIT,k.outfit,"outfit"),this.setGearOfType(K.EQ.WEAPON,k.weapon,"weapon"),this.setGearOfType(K.EQ.HAIR,k.hair.style,"hair"),this.setGearOfType(K.EQ.HAT,k.hat,"hat")]);for(let k=0;k{let V=F[B];if(V||k!==K.EQ.OUTFIT||(V=F[1],G.VyI.log(`Asset ${B} of type ${U} could not be found, falling back to default outfit.`,G.$bb.Warning)),!V){if(this._gearManager.setGearAt(k,null,!1).catch(G.RQr.createHandler("setGearAt failed with no guid in PlayerDataAppearanceComponent")),G.Aq$.isDefined(B)){k===K.EQ.HAIR&&53===B||G.VyI.log(`Asset ${B} of type ${U} could not be found`,G.$bb.Warning)}return void $()}const W=()=>{const B=j.q.instance.game.cache.getJSON(V);if(!B)return void H(new Error(`No content for ${V} of type ${U}`));const F=G.KDe.fromGearFile(B);F?(this._gearManager.setGearAt(k,F,!1).catch(G.RQr.createHandler("setGearAt failed with gearElement in PlayerDataAppearanceComponent")),$()):H(new Error(`Failed to parse GearElement from file for ${V} of type ${U}`))};j.q.instance.game.cache.checkJSONKey(V)?W():j.q.instance.prodigy.load.assets([V],W)}))}))}getGearMapByCategory(k){const B=this._scaling===K.M.UPSCALED_4x;switch(k){case K.EQ.FACE:return B?W.R.faceUpscaledMap:W.R.faceMap;case K.EQ.BOOTS:return B?W.R.bootUpscaledMap:W.R.bootMap;case K.EQ.OUTFIT:return B?W.R.outfitUpscaledMap:W.R.outfitMap;case K.EQ.WEAPON:return B?W.R.weaponUpscaledMap:W.R.weaponMap;case K.EQ.HAIR:return B?W.R.hairUpscaledMap:W.R.hairMap;case K.EQ.HAT:return B?W.R.hatUpscaledMap:W.R.hatMap;case K.EQ.COSTUME:return W.R.costumeMap}}addExtraGear(k,B=!0){if(this._extraGear.includes(k))return;const U=this._extraGear.push(k)-1;this._gearManager.setGearAt(z+U,this._extraGear[U],!1).catch(G.RQr.createHandler("PlayerDataAppearanceComponent: Error setting extra gear in addExtraGear")),B&&this._color.refresh().catch(G.RQr.createHandler("PlayerDataAppearanceComponent: Error refreshing color when adding extra gear in addExtraGear"))}removeExtraGear(k,B=!0){const U=this._extraGear.indexOf(k);-1!==U&&(this._gearManager.removeGear(this._extraGear[U],!1),this._extraGear.splice(U,1),B&&this._color.refresh().catch(G.RQr.createHandler("PlayerDataAppearanceComponent: Error refreshing color when removing extra gear in removeExtraGear")))}destroy(){this.onAppearanceLoaded.dispose(),this.onFirstAppearanceLoaded.dispose(),super.destroy()}};(0,F.Cg)([(0,G.Pqz)(G.v2j),(0,F.Sn)("design:type",G.v2j)],Y.prototype,"_spineComponent",void 0),(0,F.Cg)([(0,G.Pqz)(V.c),(0,F.Sn)("design:type",V.c)],Y.prototype,"_gearManager",void 0),(0,F.Cg)([(0,G.Pqz)(q.y),(0,F.Sn)("design:type",q.y)],Y.prototype,"_color",void 0),(0,F.Cg)([(0,G.Cdj)("PLAYER_APPEARANCE_SCALING"),(0,F.Sn)("design:type",Number)],Y.prototype,"_scaling",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onAppearanceLoaded",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onFirstAppearanceLoaded",void 0),Y=(0,F.Cg)([(0,G.EVk)("PlayerDataAppearance",G.YH6.animation)],Y)},47734:(k,B,U)=>{"use strict";U.d(B,{z:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(63068);let H=class extends G.uAl{constructor(){super(...arguments),this.WEAPON_SPINE_SLOT="weapon",this.HAT_SPINE_SLOT="hat-face",this.OUTFIT_SPINE_SLOT="torso",this._loadActivePlayer=!1}postCreate(){super.postCreate(),this.removeSlots(),this._loadActivePlayer&&this.loadPlayerAppearance()}loadPlayerAppearance(){var k,B,U;const F=null!==(U=null===(B=null===(k=this.gameObject.parent.findComponentInChildren(G.bE_))||void 0===k?void 0:k.Container.get("377-3e7b"))||void 0===B?void 0:B.getAppearance())&&void 0!==U?U:j.q.instance.prodigy.gameContainer.get("e20-0fb0").getAppearance();this.updatePlayerAppearance(F)}removeSlots(){const k={hiddenSlots:this._disabledSlots,attachments:[],slotsToNotRecolor:[]};this._playerDataAppearance.addExtraGear(k)}updatePlayerAppearance(k){k&&(k.outfit||(k.outfit=1),this.filterEnabledAppearanceAssets(k),this._playerDataAppearance.fromPlayerAppearanceData(Object.assign({},k)).catch(G.RQr.createHandler("fromPlayerAppearanceData failed in PlayerSpineAppearanceSelectorComponent")))}filterEnabledAppearanceAssets(k){this._disabledSlots.includes(this.WEAPON_SPINE_SLOT)&&(k.weapon=null),this._disabledSlots.includes(this.OUTFIT_SPINE_SLOT)&&(k.outfit=null),this._disabledSlots.includes(this.HAT_SPINE_SLOT)&&(k.hat=null)}};(0,F.Cg)([(0,G.MnK)($.n),(0,F.Sn)("design:type",$.n)],H.prototype,"_playerDataAppearance",void 0),(0,F.Cg)([(0,G.MnK)(G.v2j),(0,F.Sn)("design:type",G.v2j)],H.prototype,"_spine",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_loadActivePlayer",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.W_S)(),(0,F.Sn)("design:type",Array)],H.prototype,"_disabledSlots",void 0),H=(0,F.Cg)([(0,G.EVk)("PlayerSpineAppearanceSelector",G.YH6.animation)],H)},97252:(k,B,U)=>{"use strict";var F,G,j;U.d(B,{At:()=>G,EQ:()=>F,M:()=>j}),function(k){k[k.BOOTS=0]="BOOTS",k[k.OUTFIT=1]="OUTFIT",k[k.WEAPON=2]="WEAPON",k[k.HAIR=3]="HAIR",k[k.HAT=4]="HAT",k[k.FACE=5]="FACE",k[k.COSTUME=6]="COSTUME"}(F||(F={})),function(k){k.Boots="boots",k.Outfit="outfit",k.Weapon="weapon",k.SpellRelic="spellRelic",k.Mount="mount",k.Costume="costume"}(G||(G={})),function(k){k[k.DEFAULT_1X=0]="DEFAULT_1X",k[k.UPSCALED_4x=1]="UPSCALED_4x"}(j||(j={}))},39571:(k,B,U)=>{"use strict";var F;U.d(B,{a:()=>F}),function(k){k.ActiveSideBack="unit-activeSide-back-",k.ActiveSideCast="unit-activeSide-cast-",k.ActiveSideFront="unit-activeSide-front-",k.InactiveSide="unit-inactiveSide-"}(F||(F={}))},77409:(k,B,U)=>{"use strict";U.d(B,{q:()=>G});var F=U(62459);class G extends F.uAl{create(){super.create(),this._filters=[],this.renderComponent||(this.renderComponent=this.gameObject.findComponentInChildren(F.y4o,!0))}addFilter(k){this._filters.push(k),this.refreshFilters()}removeFilter(k){const B=this._filters.indexOf(k);B>-1&&this._filters.splice(B,1),this.refreshFilters()}refreshFilters(){var k;const B=null===(k=this.renderComponent)||void 0===k?void 0:k.getRootContainer();B&&(B.filters=this._filters)}}},76724:(k,B,U)=>{"use strict";U.d(B,{t:()=>H});var F,G=U(8674),j=U(62459),$=U(91016);let H=F=class extends $.lL{constructor(){super(...arguments),this.id="multihit"}play(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=k.manager.steps.indexOf(this);let U=-1;for(let F=B;F{"use strict";U.d(B,{o:()=>St});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(35120),V=U(91016);let W=class extends V.lL{constructor(){super(...arguments),this.target=V.Wo.Caster,this.delayPerTarget=0,this.isHidden=!1}play(k){return(0,F.sH)(this,void 0,void 0,(function*(){this._timeouts=[],this.getTargets(k,this.target,((B,U)=>{this._timeouts.push(window.setTimeout((()=>{k.manager.onApplyDamage.dispatch(B,this.isHidden)}),1e3*this.delayPerTarget*U))}))}))}destroy(){if(this._timeouts)for(const k of this._timeouts)clearTimeout(k)}};W=(0,F.Cg)([(0,G.s0Z)("ApplyDamageStep")],W);var q=U(90351);class K extends V.lL{constructor(){super(...arguments),this.blockSpell=!1}play(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.blockSpell)return new Promise(((k,B)=>{this._resolve||(this._resolve=[]),this._resolve.push(k),this._reject=k}))}))}}let z=class extends K{constructor(){super(...arguments),this.target=V.Wo.Caster,this.delayPerTarget=0,this.movePositionX=0,this.movePositionY=0,this.scaleAmountX=1,this.scaleAmountY=1,this.rotationAmount=0,this.moveTime=.5,this.returnTime=.5,this.positionChangeEase=q.i.ExponentialInOut,this.positionReturnEase=q.i.ExponentialInOut,this.scaleChangeEase=q.i.ExponentialInOut,this.scaleReturnEase=q.i.ExponentialInOut,this.rotationChangeEase=q.i.ExponentialInOut,this.rotationReturnEase=q.i.ExponentialInOut}play(k){const B=Object.create(null,{play:{get:()=>super.play}});return(0,F.sH)(this,void 0,void 0,(function*(){var U,F;const G=B.play.call(this,k),j=[];this.getTargets(k,this.target,((k,B)=>{j.push(this.animate(k,this.delayPerTarget*B*1e3))}));const $=(null===(U=this._resolve)||void 0===U?void 0:U.length)>0?this._resolve.shift():void 0;return Promise.all(j).then(null==$?void 0:$.bind(this),null===(F=this._reject)||void 0===F?void 0:F.bind(this)),G}))}animate(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=Math.sign(k.transform.localScale.x),F=Math.sign(k.transform.localScale.y),j={x:k.transform.localScale.x,y:k.transform.localScale.y},$={x:k.transform.localPosition.x,y:k.transform.localPosition.y},V=k.transform.localRotation;return yield G.Egh.timeout(B),yield new Promise((B=>{H.q.instance.game.add.tween(k.transform.localPosition,this,!0).to({x:$.x-this.movePositionX*U,y:$.y-this.movePositionY*F},1e3*this.moveTime,q.K.getEasingFunctionFromEnum(this.positionChangeEase)).start();const G={x:k.transform.localScale.x,y:k.transform.localScale.y},j=H.q.instance.game.add.tween(G,this,!0);j.to({x:this.scaleAmountX*U,y:this.scaleAmountY*F},1e3*this.moveTime,q.K.getEasingFunctionFromEnum(this.scaleChangeEase)),j.onUpdate.add((()=>{k.transform.setScale(G.x,G.y)})),j.start();const V=H.q.instance.game.add.tween(k.transform,this,!0);V.to({localRotation:this.rotationAmount},1e3*this.moveTime,q.K.getEasingFunctionFromEnum(this.rotationChangeEase)),V.onTweenComplete.addOnce(B),V.start()})),yield new Promise((B=>{H.q.instance.game.add.tween(k.transform.localPosition,this,!0).to({x:$.x,y:$.y},1e3*this.returnTime,q.K.getEasingFunctionFromEnum(this.positionReturnEase)).start();const U={x:k.transform.localScale.x,y:k.transform.localScale.y},F=H.q.instance.game.add.tween(U,this,!0);F.to({x:j.x,y:j.y},1e3*this.returnTime,q.K.getEasingFunctionFromEnum(this.scaleReturnEase)),F.onUpdate.add((()=>{k.transform.setScale(U.x,U.y)})),F.start();const G=H.q.instance.game.add.tween(k.transform,this,!0);G.to({localRotation:V},1e3*this.returnTime,q.K.getEasingFunctionFromEnum(this.rotationReturnEase)),G.onTweenComplete.addOnce(B),G.start()})),Promise.resolve()}))}};var Y;z=(0,F.Cg)([(0,G.s0Z)("GenericMotionStep")],z);let Q=Y=class extends K{constructor(){super(...arguments),this.target=V.Wo.Targets,this.delayPerTarget=0,this.knockbackDistance=35,this.knockbackAngle=0,this.knockbackTime=.1,this.returnTime=.9,this.knockbackEase=q.i.CircularOut,this.returnEase=q.i.ExponentialOut}play(k){const B=Object.create(null,{play:{get:()=>super.play}});return(0,F.sH)(this,void 0,void 0,(function*(){var U,F;const G=B.play.call(this,k),j=[];this.getTargets(k,this.target,((B,U)=>{j.push(this.animate(k,B,this.delayPerTarget*U*1e3))}));const $=(null===(U=this._resolve)||void 0===U?void 0:U.length)>0?this._resolve.shift():void 0;return Promise.all(j).then(null==$?void 0:$.bind(this),null===(F=this._reject)||void 0===F?void 0:F.bind(this)),G}))}animate(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){var k,F;const j=H.q.instance.game.tweens.getAll();for(const U of j)if((null===(k=U.owner)||void 0===k?void 0:k.step)instanceof Y&&(null===(F=U.owner)||void 0===F?void 0:F.target)===B){U.stop(!0);break}const $=Math.sign(B.transform.localScale.x),V={x:B.transform.localPosition.x,y:B.transform.localPosition.y},W=this.knockbackAngle*G.cj9.DEG_TO_RAD+Math.PI,K={x:V.x+Math.cos(W)*this.knockbackDistance*$,y:V.y+Math.sin(W)*this.knockbackDistance};return yield G.Egh.timeout(U),yield new Promise((k=>{const U=H.q.instance.game.add.tween(B.transform.localPosition,{step:this,target:B},!0);U.to(K,1e3*this.knockbackTime,q.K.getEasingFunctionFromEnum(this.knockbackEase)).to(V,1e3*this.returnTime,q.K.getEasingFunctionFromEnum(this.returnEase)),U.onTweenComplete.addOnce(k),U.start()})),Promise.resolve()}))}};Q=Y=(0,F.Cg)([(0,G.s0Z)("KnockbackStep")],Q);let X=class extends V.lL{constructor(){super(...arguments),this.id="multihit"}};X=(0,F.Cg)([(0,G.s0Z)("MultiHitEndStep")],X);var Z=U(76724),J=U(83441),tt=U(29834);let et=class extends K{constructor(){super(...arguments),this.target=V.Wo.Caster,this.animation="attack",this.returnToLoop="idle"}play(k){const B=Object.create(null,{play:{get:()=>super.play}});return(0,F.sH)(this,void 0,void 0,(function*(){var U,F;let j;switch(this._animators=[],this.target){case V.Wo.Caster:if(!k.caster)return;j=[k.caster.gameObject];break;case V.Wo.Centre:j=[k.manager.GameObject];break;default:j=k.targets.map((k=>k.gameObject))}for(let k=0;k{var k;B.playAnimation(this.returnToLoop,!0),(null===(k=this._resolve)||void 0===k?void 0:k.length)>0&&this._resolve.shift()()}))}else this._reject&&this._reject("target animator not found, skipping spell")}yield B.play.call(this,k)}))}};et=(0,F.Cg)([(0,G.s0Z)("PlayAnimationStep")],et);var it,st=U(68910),nt=U(56942),at=U(28402);!function(k){k.SpellSlotBack="spell-slot-back-",k.SpellSlotFront="spell-slot-front-"}(it||(it={}));let rt=class extends K{constructor(){super(...arguments),this.target=V.Wo.Caster,this.isBelow=!1,this.layerOverride=V.Cr.None,this.spineID=nt.Q.Default_follow_172_json,this.animation="idle",this.scale=1,this.offset={x:0,y:0},this.delayPerTarget=0,this.rotateTowards=!1,this.rotateOffset={x:0,y:0},this.allowMultipleSpineInstances=!1,this._spineCount=[],this._activeSpines=[]}play(k){const B=Object.create(null,{play:{get:()=>super.play}});return(0,F.sH)(this,void 0,void 0,(function*(){var U,F,j,$;this._activeSpines=[],this._timeouts=[];const H=Math.sign(null!==(F=null===(U=k.caster)||void 0===U?void 0:U.gameObject.transform.localScale.x)&&void 0!==F?F:1),W=this.target===V.Wo.Caster&&k.spellOriginOffset?k.spellOriginOffset:{x:0,y:0},q=[V.Wo.Caster,V.Wo.Targets,V.Wo.TargetsAverage].includes(this.target)&&null!==($=null===(j=k.caster)||void 0===j?void 0:j.gameObject.transform.worldScale.y)&&void 0!==$?$:1;let K=0;this.getTargets(k,this.target,((B,U)=>{let F=this.getOppositeTargets(k,this.target);!this.allowMultipleSpineInstances&&(null==F?void 0:F.length)>1&&(F=[F[0]]);const j=Math.max(F.length,1);for(let k=0;k{var U,j,$;const K=this.target===V.Wo.Caster?q:this.target===V.Wo.Targets?B.transform.worldScale.y:1,z=new G._mx;z.name=`PlaySpineStep_${k}`;const Y=this.isBelow&&null!==(j=null===(U=B.parent)||void 0===U?void 0:U.children.length)&&void 0!==j?j:0;null===($=B.parent)||void 0===$||$.addChildAt(z,Y);const Q=new st.Point(B.transform.worldPosition.x+(this.offset.x+W.x)*K*H,B.transform.worldPosition.y+(this.offset.y+W.y)*K);z.addComponent(G.dLy).worldPosition=Q;const X=q/z.transform.worldScale.y;if(z.transform.localScale=new st.Point(this.scale*X*H,this.scale*X),this.layerOverride!==V.Cr.None)z.layer=this.layerOverride;else if(this.target===V.Wo.Caster||this.target===V.Wo.Targets){const k=this.isBelow?it.SpellSlotBack:it.SpellSlotFront,U=B.layer.charAt(B.layer.length-1);z.layer=`${k}${U}`}else z.layer=this.isBelow?"background":"foreground";const Z=z.addComponent(at.v),J=z.addComponent(tt.j);if(Z.setAsset(this.spineID,this.onSpineLoaded.bind(this,J)),Z.isLoaded&&this.onSpineLoaded(J),this.rotateTowards){const B=null==F?void 0:F[k].transform;if(B){let k=Math.atan2(B.worldPosition.y+this.rotateOffset.y-Q.y,B.worldPosition.x+this.rotateOffset.x*Math.sign(B.localScale.x)-Q.x);H<0&&(k+=Math.PI),J.GameObject.transform.setRotation(k/Math.PI*180)}}}),1e3*this.delayPerTarget*(U+k))),K++})),K<=0||(this._spineCount||(this._spineCount=[]),this._spineCount.push(K),yield B.play.call(this,k))}))}onSpineLoaded(k){this._activeSpines.includes(k)||(this._activeSpines.push(k),k.playAnimation(this.animation,!1),k.spine.getSpine().onComplete.add((()=>{this.cleanupSpine(k)}),this),k.spine.getSpine().updateMethod=G.ba$.Spine)}cleanupSpine(k){var B;this._activeSpines&&(k.spine.getSpine().onComplete.removeAll(this),k.GameObject.destroyDeferred(),this._activeSpines.splice(this._activeSpines.indexOf(k),1),this._spineCount.length>0&&(this._spineCount[0]--,0===this._spineCount[0]&&(this._spineCount.shift(),(null===(B=this._resolve)||void 0===B?void 0:B.length)>0&&this._resolve.shift()())))}finish(){return(0,F.sH)(this,void 0,void 0,(function*(){yield Promise.all(this._activeSpines.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return k.spine.getSpine().onComplete.asPromise()})))))}))}destroy(){if(this._timeouts)for(let k=0;ksuper.play}});return(0,F.sH)(this,void 0,void 0,(function*(){yield B.play.call(this,k),this._activePrefabs=[],this._promises=[],this.getTargets(k,this.target,((k,B)=>(0,F.sH)(this,void 0,void 0,(function*(){const U=G.Egh.cancelableTimeout(this.delayPerTarget*B*1e3);this._promises.push(U),yield U.promise,this.destroyPrefabsOnDestroy&&U.cancelled||this.loadPrefab(k)}))))}))}loadPrefab(k){const B=H.q.instance.prodigy.gameContainer.get("d0e-64fd"),U=ht.d.loadWithInjectedValuesAndDependenciesFromGUID(B,this.prefabID,{},k).then((k=>{this.destroyPrefabsOnDestroy&&U.cancelled?k.destroyDeferred():(this._activePrefabs.push(k),k.transform.localPosition=this.offset)}));this._promises.push(U)}destroy(){for(let k=0;ksuper.play}});return(0,F.sH)(this,void 0,void 0,(function*(){this.destroyPrefabsOnDestroy=!1,yield B.play.call(this,k)}))}loadPrefab(k){var B,U,F,G;const j=this._spellData.targets.find((B=>B.gameObject===k)),$=null===(B=this._spellData.manager.battleController)||void 0===B?void 0:B.getUnitById(null!==(U=null==j?void 0:j.unitId)&&void 0!==U?U:"");this._spellData.manager.statusEffectAnimationController.queueAnimationAction(this.prefabID,null!==(F=null==j?void 0:j.statusEffectContainer)&&void 0!==F?F:k,this.statusEffectAnimation,this.blockStatusEffectAnimationQueue,null!==(G=null==$?void 0:$.size)&&void 0!==G?G:ot.X.Normal)}destroy(){this._statusEffectAnimations.length=0,super.destroy()}getOverrideInspectorNode(k,B,U){return"statusEffectAnimation"===k?G.Gme.enumGroup({id:B,labelValue:k,selectValue:this[k],onChange:k=>{U("",k)}},dt.l):"destroyPrefabsOnDestroy"!==k}};lt=(0,F.Cg)([(0,G.s0Z)("PlayStatusEffectStep")],lt);let ut=class extends K{constructor(){super(...arguments),this.spineID=nt.Q.Default_follow_172_json,this.animation="idle",this.scale=1,this.startOffset={x:0,y:0},this.endOffset={x:0,y:0},this.delayPerTarget=0,this.travelTime=1,this.syncAnimation=!0,this.rotateTowards=!0,this.isBelow=!1,this._spineCount=[]}play(k){const B=Object.create(null,{play:{get:()=>super.play}});return(0,F.sH)(this,void 0,void 0,(function*(){var U,F,j;if(!k.caster)return void G.VyI.log("Spells with PlayTravelingSpineStep require a caster",G.$bb.Error);this._activeSpines=[],this._activeTweens=[],this._timeouts=[],this._positionScale=Math.sign(k.caster.gameObject.transform.localScale.x);const $=null!==(U=k.spellOriginOffset)&&void 0!==U?U:{x:0,y:0},H=(this.startOffset.x+$.x)*this._positionScale,V=this.startOffset.y+$.y,W=this.endOffset.x*this._positionScale,q=this.endOffset.y,K=null!==(j=null===(F=k.caster)||void 0===F?void 0:F.gameObject.transform.worldScale.y)&&void 0!==j?j:1;let z=0;for(let B=0;B{const U=k.targets[B].gameObject,F=new G._mx(k.caster.gameObject.parent),j=this.isBelow?it.SpellSlotBack:it.SpellSlotFront,$=U.layer.charAt(U.layer.length-1);F.layer=`${j}${$}`,F.addComponent(G.dLy);const z=K/F.transform.worldScale.y;F.transform.localScale=new st.Point(this.scale*z*this._positionScale,this.scale*z);const Y=F.addComponent(at.v),Q=F.addComponent(tt.j);Y.setAsset(this.spineID,this.onSpineLoaded.bind(this,Q)),Y.isLoaded&&this.onSpineLoaded(Q);const X={x:k.caster.gameObject.transform.worldPosition.x+H*K,y:k.caster.gameObject.transform.worldPosition.y+V*K},Z={x:U.transform.worldPosition.x+W*U.transform.worldScale.y,y:U.transform.worldPosition.y+q*U.transform.worldScale.y};this.doTween(X,Z,Q)}),1e3*this.delayPerTarget*B)),z++;this._spineCount||(this._spineCount=[]),this._spineCount.push(z),yield B.play.call(this,k)}))}doTween(k,B,U){if(U.GameObject.transform.worldPosition=k,this.rotateTowards){let F=Math.atan2(B.y-k.y,B.x-k.x);this._positionScale<0&&(F+=Math.PI),U.GameObject.transform.setRotation(F/Math.PI*180)}U.GameObject.update();const F=H.q.instance.game.add.tween(k,this,!0).to(B,1e3*this.travelTime,G.GS3.Linear.None,!1);F.onUpdate.add((()=>{U.GameObject.transform.worldPosition=k}),this),F.onTweenComplete.addOnce((()=>{this.cleanupSpine(U)})),F.start(),this._activeTweens.push(F)}onSpineLoaded(k){if(-1!==this._activeSpines.indexOf(k))return;this._activeSpines.push(k);const B=k.spine.getSpine().setAnimationByName(0,this.animation,!this.syncAnimation).animationEnd;this.syncAnimation&&(k.spine.getSpine().state.timeScale=B/this.travelTime),k.spine.getSpine().updateMethod=G.ba$.Spine}cleanupSpine(k){var B;k.spine.getSpine().onComplete.removeAll(this),k.GameObject.destroyDeferred(),this._activeSpines.splice(this._activeSpines.indexOf(k),1),this._spineCount.length>0&&(this._spineCount[0]--,0===this._spineCount[0]&&(this._spineCount.shift(),(null===(B=this._resolve)||void 0===B?void 0:B.length)>0&&this._resolve.shift()()))}finish(){return(0,F.sH)(this,void 0,void 0,(function*(){yield Promise.race([Promise.all(this._activeTweens.filter((k=>!k.isDestroyed)).map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return k.onTweenComplete.asPromise()}))))),G.Egh.timeout(5e3)])}))}destroy(){for(let k=0;k{H.q.instance.game.tweens.remove(k)})),this._activeSpines.length=0,this._activeTweens.length=0,this._timeouts.length=0}getLoadDependencies(){return[this.spineID]}};ut=(0,F.Cg)([(0,G.s0Z)("PlayTravelingSpineStep")],ut);var ft,bt=U(84938);let pt=ft=class extends K{constructor(){super(...arguments),this.target=V.Wo.Camera,this.delayPerTarget=0,this.xShakeDistance=15,this.yShakeDistance=15,this.attackTime=.1,this.holdTime=0,this.returnTime=.5,this.attackEase=q.i.CircularOut,this.returnEase=q.i.ExponentialOut}play(k){const B=Object.create(null,{play:{get:()=>super.play}});return(0,F.sH)(this,void 0,void 0,(function*(){var U,F;const G=B.play.call(this,k),j=[];this.getTargets(k,this.target,((B,U)=>{j.push(this.animate(k,B,this.delayPerTarget*U*1e3))}));const $=(null===(U=this._resolve)||void 0===U?void 0:U.length)>0?this._resolve.shift():void 0;return Promise.all(j).then(null==$?void 0:$.bind(this),null===(F=this._reject)||void 0===F?void 0:F.bind(this)),G}))}animate(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){var k,F;const j=H.q.instance.game.tweens.getAll();for(const U of j)if((null===(k=U.owner)||void 0===k?void 0:k.step)instanceof ft&&(null===(F=U.owner)||void 0===F?void 0:F.target)===B){U.stop(!0);break}yield G.Egh.timeout(U);const $={x:B.transform.localPosition.x,y:B.transform.localPosition.y},V={strength:0};return yield new Promise((k=>{const U=H.q.instance.game.add.tween(V,{step:this,target:B},!0);U.to({strength:1},1e3*this.attackTime,q.K.getEasingFunctionFromEnum(this.attackEase)).to({strength:1},1e3*this.holdTime).to({strength:0},1e3*this.returnTime,q.K.getEasingFunctionFromEnum(this.returnEase)),U.onUpdate.add((()=>{B.transform.setPosition($.x+(2*Math.random()-1)*V.strength*this.xShakeDistance*bt.B.screenShake.value,$.y+(2*Math.random()-1)*V.strength*this.yShakeDistance*bt.B.screenShake.value)})),U.onTweenComplete.addOnce((()=>{B.transform.setPosition($.x,$.y),k()})),U.start()})),Promise.resolve()}))}};pt=ft=(0,F.Cg)([(0,G.s0Z)("ShakeStep")],pt);var vt=U(51742);let gt=class extends K{constructor(){super(...arguments),this.target=V.Wo.Caster,this.delayPerTarget=0,this.volume=1,this.startTime=0,this.duration=-1,this.soundGUID=vt.c.Sfx_ancient_teleport}play(k){const B=Object.create(null,{play:{get:()=>super.play}});return(0,F.sH)(this,void 0,void 0,(function*(){var U,F;const G=B.play.call(this,k),j=[];this.getTargets(k,this.target,((k,B)=>{j.push(this.playSound(k,this.delayPerTarget*B*1e3))}));const $=(null===(U=this._resolve)||void 0===U?void 0:U.length)>0?this._resolve.shift():void 0;return Promise.all(j).then(null==$?void 0:$.bind(this),null===(F=this._reject)||void 0===F?void 0:F.bind(this)),G}))}playSound(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){yield G.Egh.timeout(B);const k=bt.B.effectVolume.value,U=H.q.instance.game.sound.add(this.soundGUID);return U.addMarker("play",this.startTime,this.duration>0?this.duration:U.duration,this.volume*k),yield new Promise((k=>{U.play("play",k)})),Promise.resolve()}))}getLoadDependencies(){return[this.soundGUID]}};gt=(0,F.Cg)([(0,G.s0Z)("SoundStep")],gt);U(3583);var mt,yt=U(77409);let _t=mt=class extends K{constructor(){super(...arguments),this.target=V.Wo.Caster,this.color="FF0000",this.intensity=1,this.attack=.3,this.sustain=.3,this.release=.3,this.blend=G.PzZ.Multiply,this.delayPerTarget=0}play(k){const B=Object.create(null,{play:{get:()=>super.play}});return(0,F.sH)(this,void 0,void 0,(function*(){var U,F;const G=B.play.call(this,k),j=[];this.getTargets(k,this.target,((k,B)=>{j.push(this.animateTint(k,this.delayPerTarget*B*1e3))}));const $=(null===(U=this._resolve)||void 0===U?void 0:U.length)>0?this._resolve.shift():void 0;return Promise.all(j).then(null==$?void 0:$.bind(this),null===(F=this._reject)||void 0===F?void 0:F.bind(this)),G}))}animateTint(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U,F;const j=H.q.instance.game.tweens.getAll();for(const B of j)if((null===(U=B.owner)||void 0===U?void 0:U.step)instanceof mt&&(null===(F=B.owner)||void 0===F?void 0:F.target)===k){B.stop(!0);break}let $=k.findComponent(yt.q);$||($=k.addComponent(yt.q));const V=new G.oWr({color:Number.parseInt(this.color,16),tintIntensity:0,blend:this.blend});return yield G.Egh.timeout(B),$.addFilter(V),yield new Promise((B=>{const U=H.q.instance.game.add.tween(V,{step:this,target:k},!0);U.to({tintIntensity:this.intensity},1e3*this.attack).to({tintIntensity:this.intensity},1e3*this.sustain).to({tintIntensity:0},1e3*this.release),U.onTweenComplete.addOnce(B),U.start()})),$.removeFilter(V),Promise.resolve()}))}};_t=mt=(0,F.Cg)([(0,G.s0Z)("TintSpineStep")],_t);var Et=U(26460);let wt=class extends V.lL{constructor(){super(...arguments),this.delay=1}play(k){return(0,F.sH)(this,void 0,void 0,(function*(){return G.Egh.timeout(1e3*this.delay)}))}};var Tt;wt=(0,F.Cg)([(0,G.s0Z)("WaitStep")],wt);let St=Tt=class extends G.uAl{constructor(){super(...arguments),this.steps=[],this.index=0,this.subThreads=[],this._loadPromise=new G.bnh,this.assetIDs=[]}static createSpell(k){const B=new k;return B.__type=B.constructor.name,B}get loadPromise(){return this._loadPromise}create(){var k;super.create(),this.onApplyDamage=new G.HN0,this.battleController=G.wa5.getActiveScene().container.get("BattleController"),this.statusEffectAnimationController=null===(k=this.battleController)||void 0===k?void 0:k.statusEffectAnimationController}begin(k){return(0,F.sH)(this,void 0,void 0,(function*(){for(k.multiHit>1&&this.ensureMultihits(k),this.index=0;this.index{throw G.RQr.logError(k,""),k}))}this.subThreads.length>0&&(yield Promise.all(this.subThreads)),yield Promise.all(this.steps.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){return k.finish()})))));for(let k=0;k=B?G.VyI.log("Invalid index range.",G.$bb.Error):"MultiHitStartStep"===(null===($=this.steps[k])||void 0===$?void 0:$.__type)?"MultiHitEndStep"===(null===(H=this.steps[B])||void 0===H?void 0:H.__type)?this.subThreads.push((()=>(0,F.sH)(this,void 0,void 0,(function*(){yield G.Egh.timeout(U);const F=[];for(let U=k+1;U{throw G.RQr.logError(k,""),k})):G.VyI.log("Nested multihit ranges are not supported.",G.$bb.Error)}for(let k=0;k"MultiHitStartStep"===k.__type)),U=this.steps.find((k=>"MultiHitEndStep"===k.__type));if(!B){const k=Tt.createSpell(Z.t);k.__type="MultiHitStartStep",this.steps.unshift(k),this._rawSpellStepData.unshift({__type:"MultiHitStartStep"}),G.VyI.log("MultiHitStartStep was added for compatibility. Please include this step for multihit functionality.",G.$bb.Warning)}if(!U){const k=Tt.createSpell(X);k.__type="MultiHitEndStep",this.steps.push(k),this._rawSpellStepData.push({__type:"MultiHitEndStep"}),G.VyI.log("MultiHitEndStep was added for compatibility. Please include this step for multihit functionality.",G.$bb.Warning)}}deserializeSpell(){const k=H.q.instance.game.cache.getJSON(this.spellGUID);if(k){this._rawSpellStepData=k.steps;for(let k=0;k{k[U]=$().cloneDeep(B[U])})),k}}preloadAssets(){return(0,F.sH)(this,void 0,void 0,(function*(){if(this.spellGUID){H.q.instance.game.cache.checkJSONKey(this.spellGUID)?this.deserializeSpell():yield new Promise(((k,B)=>{H.q.instance.prodigy.load.assets([this.spellGUID],((U,F)=>{F?(this.deserializeSpell(),k(void 0)):B(new Error(`App.instance.prodigy.load failed for assets ${this.spellGUID}`))}))}));for(const k of this.steps)this.assetIDs.push.apply(this.assetIDs,k.getLoadDependencies());return new Promise(((k,B)=>{H.q.instance.prodigy.load.assets(this.assetIDs,((U,F)=>{F?(this._loadPromise.resolve(),k()):B(new Error(`App.instance.prodigy.load failed for assets ${this.assetIDs.join(", ")}`))}))}))}G.VyI.log("Please set spellGUID before calling SpellComponent. Exiting the function, nothing was loaded.",G.$bb.Error)}))}destroy(){super.destroy(),this.onApplyDamage.dispose()}};St.spellConstructors=new Map([[V.dZ.ApplyDamage,Tt.createSpell.bind(Tt,W)],[V.dZ.Knockback,Tt.createSpell.bind(Tt,Q)],[V.dZ.MultiHitStart,Tt.createSpell.bind(Tt,Z.t)],[V.dZ.MultiHitEnd,Tt.createSpell.bind(Tt,X)],[V.dZ.PlayAnimation,Tt.createSpell.bind(Tt,et)],[V.dZ.PlaySpine,Tt.createSpell.bind(Tt,rt)],[V.dZ.PlayStatusEffect,Tt.createSpell.bind(Tt,lt)],[V.dZ.PlayTravelingSpine,Tt.createSpell.bind(Tt,ut)],[V.dZ.Shake,Tt.createSpell.bind(Tt,pt)],[V.dZ.Sound,Tt.createSpell.bind(Tt,gt)],[V.dZ.SpawnPrefab,Tt.createSpell.bind(Tt,ct)],[V.dZ.TintSpineStep,Tt.createSpell.bind(Tt,_t)],[V.dZ.Wait,Tt.createSpell.bind(Tt,wt)],[V.dZ.WaitForAnimationEvent,Tt.createSpell.bind(Tt,Et.D)],[V.dZ.GenericMotion,Tt.createSpell.bind(Tt,z)]]),(0,F.Cg)([(0,G.tW2)("spell"),(0,F.Sn)("design:type",String)],St.prototype,"spellGUID",void 0),St=Tt=(0,F.Cg)([(0,G.EVk)("Spell",G.YH6.animation)],St)},91016:(k,B,U)=>{"use strict";U.d(B,{Cr:()=>j,Wo:()=>F,dZ:()=>G,lL:()=>V});var F,G,j,$=U(8674),H=U(62459);!function(k){k[k.Caster=0]="Caster",k[k.Targets=1]="Targets",k[k.Centre=2]="Centre",k[k.TargetsAverage=3]="TargetsAverage",k[k.Camera=4]="Camera"}(F||(F={})),function(k){k.ApplyDamage="ApplyDamage",k.ApplyStatus="ApplyStatus",k.GenericMotion="GenericMotion",k.Knockback="Knockback",k.MultiHitStart="MultiHitStart",k.MultiHitEnd="MultiHitEnd",k.PlayAnimation="PlayAnimation",k.PlaySpine="PlaySpine",k.PlayStatusEffect="PlayStatusEffect",k.PlayTravelingSpine="PlayTravelingSpine",k.Shake="Shake",k.Sound="Sound",k.SpawnPrefab="SpawnPrefab",k.TintSpineStep="TintSpine",k.WaitForAnimationEvent="WaitForAnimationEvent",k.Wait="Wait"}(G||(G={})),function(k){k.None="none",k.Content="content",k.Background="background",k.Foreground="foreground",k.AboveForeground="above-foreground"}(j||(j={}));class V{play(k){return(0,$.sH)(this,void 0,void 0,(function*(){this._spellData=k,this._spellComponent=k.manager}))}getTargets(k,B,U){let G;const j=k.targets.map((k=>k.gameObject));switch(B){case F.Caster:G=k.caster?[k.caster.gameObject]:[];break;case F.Centre:G=[k.manager.GameObject];break;case F.TargetsAverage:this._targetsAverage=new H._mx,this._targetsAverage.addComponent(H.dLy);const B=new H.I9Y;for(let k=0;kk.gameObject))}return[]}finish(){return(0,$.sH)(this,void 0,void 0,(function*(){}))}destroy(){this._targetsAverage&&(this._targetsAverage.destroy(),this._targetsAverage=null)}getLoadDependencies(){return[]}getOverrideInspectorNode(k,B,U){return!0}}},90076:(k,B,U)=>{"use strict";U.d(B,{l:()=>F,r:()=>W});var F,G=U(8674),j=U(62459),$=U(35120),H=U(28152),V=U(29834);!function(k){k.Apply="apply",k.Trigger="trigger",k.Idle1TurnRemaining="idle4",k.Idle2TurnsRemaining="idle3",k.Idle3TurnsRemaining="idle2",k.Idle4TurnsRemaining="idle1",k.Exit="exit",k.Hide="hide"}(F||(F={}));let W=class extends j.uAl{constructor(){super(...arguments),this._showApplyAnimation=new j.HN0,this._showTriggerAnimation=new j.HN0,this._showDefaultOr1TurnRemainingIdle=new j.HN0,this._show2TurnRemainingIdle=new j.HN0,this._show3TurnRemainingIdle=new j.HN0,this._show4TurnRemainingIdle=new j.HN0,this._showExitAnimation=new j.HN0,this._ignoreSameAnimation=!1,this.onAnimationComplete=new j.HN0,this.onStatusEffectHidden=new j.HN0}testApplyAnimation(){this.playAnimation(F.Apply)}testTriggerAnimation(){this.playAnimation(F.Trigger)}testIdle1Animation(){this.playAnimation(F.Idle1TurnRemaining)}testIdle2Animation(){this.playAnimation(F.Idle2TurnsRemaining)}testIdle3Animation(){this.playAnimation(F.Idle3TurnsRemaining)}testIdle4Animation(){this.playAnimation(F.Idle4TurnsRemaining)}testExitAnimation(){this.playAnimation(F.Exit)}create(){super.create(),this._rootRenderComponent=this.gameObject.findComponent(j.y4o),this._rootRenderComponent||(this._rootRenderComponent=this.gameObject.addComponent(j.jsv));const k={alpha:1};this._fadeOutTween=$.q.instance.game.add.tween(k,this,!1),this._fadeOutTween.to({alpha:0},500),this._fadeOutTween.onUpdate.add((()=>{this._rootRenderComponent.getRootContainer().alpha=k.alpha})),this._fadeOutTween.onTweenComplete.add((()=>{this.disableAllRenderComponents(),k.alpha=1,this._rootRenderComponent.getRootContainer().alpha=1,this.onStatusEffectHidden.dispatch(),this.onAnimationComplete.dispatch()}))}playAnimation(k){var B,U;if(this._ignoreSameAnimation&&this.shouldIgnore(k))return!1;let G;switch(this._currentAnimation=k,k){case F.Apply:G=this._showApplyAnimation;break;case F.Trigger:G=this._showTriggerAnimation;break;case F.Idle1TurnRemaining:G=this.getIdleSignal(1);break;case F.Idle2TurnsRemaining:G=this.getIdleSignal(2);break;case F.Idle3TurnsRemaining:G=this.getIdleSignal(3);break;case F.Idle4TurnsRemaining:G=this.getIdleSignal(4);break;case F.Exit:G=this._showExitAnimation;break;case F.Hide:return void((null===(B=this._fadeOutTween)||void 0===B?void 0:B.isRunning)||null===(U=this._fadeOutTween)||void 0===U||U.start());default:throw new Error(`StatusEffectComponent: Trying to set invalid animation state: ${k}`)}this.disableAllRenderComponents();const $=[];return G._bindings.forEach((k=>{var B;if(void 0===(null===(B=k.context)||void 0===B?void 0:B.GameObject))return;k.context.GameObject.active=!0;const U=k.context.GameObject.findComponentInChildren(V.j);U&&$.push(U.OnAnimationComplete.asPromise());const F=k.context.GameObject.findComponentInChildren(j.okU);F&&$.push(F.onAllParticlesDead.asPromise())})),Promise.race([j.Egh.timeout(2e3),Promise.all($)]).then((()=>this.onAnimationComplete.dispatch())).catch(j.RQr.createHandler("StatusEffectAnimationComponent.playAnimation Error waiting for animation to complete")),G.dispatch(),!0}disableAllRenderComponents(){this.gameObject.findComponentsInChildren(V.j).forEach((k=>{k.GameObject.active=!1})),this.gameObject.findComponentsInChildren(j.okU).forEach((k=>{k.GameObject.active=!1}))}getIdleSignal(k){return k>=4&&this._show4TurnRemainingIdle.getBindingsCount()>0?this._show4TurnRemainingIdle:k>=3&&this._show3TurnRemainingIdle.getBindingsCount()>0?this._show3TurnRemainingIdle:k>=2&&this._show2TurnRemainingIdle.getBindingsCount()>0?this._show2TurnRemainingIdle:this._showDefaultOr1TurnRemainingIdle}destroy(){this._showApplyAnimation.dispose(),this._showTriggerAnimation.dispose(),this._showDefaultOr1TurnRemainingIdle.dispose(),this._show2TurnRemainingIdle.dispose(),this._show3TurnRemainingIdle.dispose(),this._show4TurnRemainingIdle.dispose(),this._showExitAnimation.dispose(),this.onAnimationComplete.dispose(),this.onStatusEffectHidden.dispose(),this._fadeOutTween&&$.q.instance.game.tweens.remove(this._fadeOutTween),super.destroy()}shouldIgnore(k){return(k===F.Idle1TurnRemaining||k===F.Idle2TurnsRemaining||k===F.Idle3TurnsRemaining||k===F.Idle4TurnsRemaining)&&this._currentAnimation===k}};(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Signal to fire when the status effect is first applied to the unit"),(0,G.Sn)("design:type",j.HN0)],W.prototype,"_showApplyAnimation",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Signal to fire when the status effect is triggered (e.g. for a DOT effect)"),(0,G.Sn)("design:type",j.HN0)],W.prototype,"_showTriggerAnimation",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Signal to show the 1 turn remaining idle animation, which also serves as the default idle animation"),(0,G.Sn)("design:type",j.HN0)],W.prototype,"_showDefaultOr1TurnRemainingIdle",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Signal to show the 2 turn remaining idle animation"),(0,G.Sn)("design:type",j.HN0)],W.prototype,"_show2TurnRemainingIdle",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Signal to show the 3 turn remaining idle animation"),(0,G.Sn)("design:type",j.HN0)],W.prototype,"_show3TurnRemainingIdle",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Signal to show the 4 turn remaining idle animation"),(0,G.Sn)("design:type",j.HN0)],W.prototype,"_show4TurnRemainingIdle",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,j.YLv)("Signal to fire when the status effect is removed from the unit"),(0,G.Sn)("design:type",j.HN0)],W.prototype,"_showExitAnimation",void 0),(0,G.Cg)([(0,j.vkK)(),(0,j.YLv)("Whether to ignore playAnimation when the animation specified is already playing"),(0,G.Sn)("design:type",Boolean)],W.prototype,"_ignoreSameAnimation",void 0),(0,G.Cg)([(0,j.GO0)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],W.prototype,"testApplyAnimation",null),(0,G.Cg)([(0,j.GO0)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],W.prototype,"testTriggerAnimation",null),(0,G.Cg)([(0,j.GO0)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],W.prototype,"testIdle1Animation",null),(0,G.Cg)([(0,j.GO0)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],W.prototype,"testIdle2Animation",null),(0,G.Cg)([(0,j.GO0)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],W.prototype,"testIdle3Animation",null),(0,G.Cg)([(0,j.GO0)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],W.prototype,"testIdle4Animation",null),(0,G.Cg)([(0,j.GO0)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],W.prototype,"testExitAnimation",null),W=(0,G.Cg)([(0,j.EVk)("StatusEffectAnimation",H.Y.animation)],W)},3583:(k,B,U)=>{"use strict";U.d(B,{c:()=>Z});var F=U(8674),G=U(87490),j=U(62459),$=U(99625),H=U(35120),V=U(77938),W=U(13302),q=U(68152),K=U(80060),z=U(30226),Y=U(90076);const Q={[W.X.Small]:1,[W.X.Medium]:1,[W.X.Normal]:1,[W.X.Large]:2,[W.X.Huge]:2},X={[G.EStatusEffectType.Bomb]:1};class Z{constructor(){this._statusEffectPool=[],this._queuedUnitActions=new Map,this._prefabGuidToTypeMap={},V.t.data.statusEffect.map((k=>k.data)).forEach((k=>{var B;if(null===(B=k.animationData)||void 0===B?void 0:B.statusEffectPrefab){const B=$.l[k.animationData.statusEffectPrefab];if(!j.Aq$.isDefined(B))return void j.VyI.log(`"${k.animationData.statusEffectPrefab}" is not a valid prefab name (ID "${k.id}")`,j.$bb.Error);this._prefabGuidToTypeMap[B]=k.type}else j.VyI.log(`StatusEffectAnimationController: Required status effect animation data missing for ID ${k.id}`,j.$bb.Warning)}))}getStatusEffectAnimation(k,B){let U;(0,q.v)(z.J.isGuid(k),"prefabGuid must be a valid GUID");for(const F of this._statusEffectPool)if(F.prefabGuid===k){if(F.gameObject.parent===B){U=F;break}F.gameObject.parent||(U=F)}return U?(B.addChild(U.gameObject),new j.kBN((k=>k(U.gameObject)))):this.createNewStatusEffect(k,B)}createNewStatusEffect(k,B){(0,q.v)(z.J.isGuid(k),"prefabGuid must be a valid GUID");const U=H.q.instance.prodigy.gameContainer.get("d0e-64fd"),F=K.d.loadWithInjectedValuesAndDependenciesFromGUID(U,k,{}).then((U=>{const G=U.findComponentInChildren(Y.r,!0);if(!G)throw new Error(`StatusEffectAnimationComponent not found on prefab ${k}`);G.onStatusEffectHidden.add((()=>U.parent=void 0)),this._statusEffectPool.push({prefabGuid:k,gameObject:U}),F.cancelled||B.addChild(U)}));return F}hideAnimationOfType(k,B,U){U&&(0,q.v)(z.J.isGuid(U),"prefabGuidToIgnore must be a valid GUID");const F=this._queuedUnitActions.get(B);if(!F)return;const G=F.filter((B=>k===this._prefabGuidToTypeMap[B.prefabGuid])),j=G.length>0&&G[G.length-1].animation!==Y.l.Hide?G[G.length-1]:void 0;j&&j.prefabGuid!==U&&F.push({prefabGuid:j.prefabGuid,parent:B,animation:Y.l.Hide,state:"queued",blocking:!1})}queueAnimationAction(k,B,U,F,G){(0,q.v)(z.J.isGuid(k),"prefabGuid must be a valid GUID");let j=this._queuedUnitActions.get(B);j||(j=[],this._queuedUnitActions.set(B,j)),this.hideAnimationOfType(this._prefabGuidToTypeMap[k],B,k),j.push({prefabGuid:k,parent:B,animation:U,state:"queued",blocking:F,targetSize:G}),this._queuedUnitActions.set(B,j.filter(((k,B)=>{const U=j[B+1];return"queued"!==k.state||k.animation!==Y.l.Hide||(null==U?void 0:U.animation)===Y.l.Hide||k.prefabGuid!==(null==U?void 0:U.prefabGuid)})))}update(){this._queuedUnitActions.forEach((k=>{this.playNextQueuedAnimation(k).catch(j.RQr.createHandler("Error playing queued status effect animations"))}))}playNextQueuedAnimation(k){return(0,F.sH)(this,void 0,void 0,(function*(){let B;for(const G of k){if("active"===G.state)break;if("queued"===G.state){B=G;break}}if(!B)return;B.state=B.blocking?"active":"complete";const U=yield this.getStatusEffectAnimation(B.prefabGuid,B.parent);this._prefabGuidToTypeMap[B.prefabGuid]===G.EStatusEffectType.Bomb?U.bringToFront():U.sendToBack(),this.setStatusEffectScale(U,B.targetSize,this._prefabGuidToTypeMap[B.prefabGuid]);const F=U.findComponent(Y.r);F&&(F.onAnimationComplete.addOnce((()=>B.state="complete")),F.playAnimation(B.animation)||(B.state="complete"))}))}setStatusEffectScale(k,B,U){let F=B?Q[B]:k.transform.localScale.x;const G=X[U];void 0!==G&&(F=G),k.transform.worldScale={x:F,y:F};const j=Math.sign(k.transform.localScale.x),$=Math.sign(k.transform.localScale.y);k.transform.localScale.x*=j,k.transform.localScale.y*=$}destroy(){H.q.instance.game.app.ticker.remove(this.update,this),this._statusEffectPool.forEach((k=>{k.gameObject&&!k.gameObject.isDestroyed&&k.gameObject.destroy()})),this._statusEffectPool.length=0}static getIdleAnimation(k){switch(k){case 4:return Y.l.Idle4TurnsRemaining;case 3:return Y.l.Idle3TurnsRemaining;case 2:return Y.l.Idle2TurnsRemaining;default:return Y.l.Idle1TurnRemaining}}}},26460:(k,B,U)=>{"use strict";U.d(B,{D:()=>V});var F,G=U(8674),j=U(62459),$=U(76724),H=U(91016);let V=F=class extends H.lL{constructor(){super(...arguments),this.eventName="cast"}play(k){return(0,G.sH)(this,void 0,void 0,(function*(){var B;let U;for(let F=k.manager.steps.indexOf(this)-1;F>=0;F--)if("PlayAnimationStep"===k.manager.steps[F].__type){U=k.manager.steps[F];break}(null===(B=null==U?void 0:U._animators)||void 0===B?void 0:B.length)&&(yield Promise.race([U._animators[0].spine.waitForEvent(this.eventName),j.Egh.timeout(F.MAX_WAIT_TIME_MS)]))}))}};V.MAX_WAIT_TIME_MS=5*$.t.delay*1e3,V=F=(0,G.Cg)([(0,j.s0Z)("WaitForAnimationEventStep")],V)},37394:(k,B,U)=>{"use strict";U.d(B,{D:()=>W});var F=U(8674),G=U(62459),j=U(68910),$=U(35120),H=U(59231),V=U(30442);class W extends G.uAl{constructor(){super(...arguments),this.allowScrollWheel=!0,this.alwaysScrollWheel=!1,this.onMouseScrollWheelUsed=new G.HN0,this.contentDraggingEnabled=!0,this._contentClicked=!1,this._contentDragged=!1,this._dragThreshold=10,this._maximumMouseWheelSpeed=100,this._wasDraggedSinceLastMouseDown=!1}get wasDraggedSinceLastMouseDown(){return this._wasDraggedSinceLastMouseDown}create(){super.create(),this.rectTransform=this.GameObject.findComponent(G.XVE),this.beginDragDetection=this.beginDragDetection.bind(this),this.onDragEnd=this.onDragEnd.bind(this),this.scrollWheelBounds||(this.scrollWheelBounds=this.rectTransform),this.onMouseWheel=this.onMouseWheel.bind(this),$.q.instance.game.input.mouse.addMouseWheelCallback(this.onMouseWheel),$.q.instance.game.input.onDown.add(this.beginDragDetection),$.q.instance.game.input.onUp.add(this.onDragEnd)}postCreate(){super.postCreate(),this._dragInputSprite=new V.k($.q.instance.game),this._dragInputSprite.visible=!1,this._dragInputHandler=new H.l(this._dragInputSprite),this._dragInputSprite.inputEnabled=!1}destroy(){super.destroy(),this._dragInputHandler.destroy(),this._dragInputSprite.destroy(),$.q.instance.game.input.mouse.removeMouseWheelCallback(this.onMouseWheel),$.q.instance.game.input.onDown.remove(this.beginDragDetection),$.q.instance.game.input.onUp.remove(this.onDragEnd),this.onMouseScrollWheelUsed.dispose()}onMouseWheel(k){this.allowScrollWheel&&this.IsActiveInHierarchy&&(this.alwaysScrollWheel||this.containsPoint(this.scrollWheelBounds,$.q.instance.game.input.activePointer.x,$.q.instance.game.input.activePointer.y))&&(k.stopPropagation(),this.onMouseScrollWheelUsed.dispatch(k))}beginDragDetection(k){if(!this.contentDraggingEnabled)return;const B=$.q.instance.game.input.position;this.containsPoint(this.dragTransform,B.x,B.y)&&(this._dragInputPointer=k,this._contentClicked=!0,this._lastDragMousePosition=new G.I9Y($.q.instance.game.input.activePointer.x,$.q.instance.game.input.activePointer.y),this._wasDraggedSinceLastMouseDown=!1)}onDragEnd(){var k;this._contentDragged&&(null===(k=this._dragInputPointer)||void 0===k||k.swapTarget(null)),this._dragInputPointer=null,this._contentClicked=!1,this._contentDragged=!1}checkDragStartHorizontal(){const k=$.q.instance.game.input.activePointer.x-this._lastDragMousePosition.x;Math.abs(k)>this._dragThreshold&&(this.startDrag(),this.dragContentHorizontal())}checkDragStartVertical(){const k=$.q.instance.game.input.activePointer.y-this._lastDragMousePosition.y;Math.abs(k)>this._dragThreshold&&(this.startDrag(),this.dragContentVertical())}startDrag(){this._contentDragged=!0,this._wasDraggedSinceLastMouseDown=!0,this._dragInputPointer.swapTarget(this._dragInputHandler)}dragContentHorizontal(){this._lastDragMousePosition.x=$.q.instance.game.input.activePointer.x}dragContentVertical(){this._lastDragMousePosition.y=$.q.instance.game.input.activePointer.y}containsPoint(k,B,U){const F=k.getBounds();let G=new j.Point(B,U);return G=k.worldMatrix.applyInverse(G),G.x+=k.fullWidth*k.pivot.x,G.y-=k.fullHeight*(1-k.pivot.y),G.x+=F.left,G.y+=F.bottom,G.xF.left&&G.yF.top}getVisibleLocalRange(){return new G.I9Y(-this.contentArea.posY,-this.contentArea.posY+this.contentArea.fullHeight)}}(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],W.prototype,"allowScrollWheel",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],W.prototype,"alwaysScrollWheel",void 0),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],W.prototype,"scrollWheelBounds",void 0),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],W.prototype,"contentArea",void 0),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],W.prototype,"dragTransform",void 0)},47287:(k,B,U)=>{"use strict";U.d(B,{g:()=>Y});var F=U(8674),G=U(62459),j=U(68910),$=U(35120),H=U(49237),V=U(76974),W=U(56163),q=U(82366),K=U(5269),z=U(28152);let Y=class extends W.t{constructor(){super(...arguments),this._moveDirection=K.H.Horizontal,this.allowMouseInput=!1,this.slide=!0,this.slideTime=500,this.lockInput=!1,this._centerAdjust=new G.I9Y(.5,.5),this.easeType=G.GS3.Linear.None,this.contentView=null,this.useMask=!0,this.maskOverride=null,this.indexMoveOverride=1,this._limitScrollToOverride=!1,this._hideOffscreenObjects=!1,this.onMouseScroll=new G.HN0,this.onScrollingToCompletion=new G.HN0,this.onStartedScrolling=new G.HN0,this.onFinishedScrolling=new G.HN0,this.onTargetSet=new G.HN0,this.onScrollingLocked=new G.HN0,this.onScrollingUnlocked=new G.HN0,this._atTargetLocation=!0,this._targetIndex=0,this._currentIndex=0,this._carouselObjects=[],this._moveToPoint=new G.I9Y,this._renderComponentDimensions=new G.or0,this._reverseNavigation=!1}get moveDirection(){return this._moveDirection}set horizontal(k){this._moveDirection=k?this._moveDirection|K.H.Horizontal:this._moveDirection&~K.H.Horizontal}get canMoveHorizontal(){return(this._moveDirection&K.H.Horizontal)===K.H.Horizontal}set vertical(k){this._moveDirection=k?this._moveDirection|K.H.Vertical:this._moveDirection&~K.H.Vertical}get canMoveVertical(){return(this._moveDirection&K.H.Vertical)===K.H.Vertical}set targetIndex(k){if(this._targetIndex!==k){const B=this.canScrollPositive,U=this.canScrollNegative;this._targetIndex=k,this.scrollingLockUpdated(B,U)}}get canScrollPositive(){if(this._reverseNavigation)return 0!==this._targetIndex;return this._targetIndex+this.indexMoveOverride<=this._carouselObjects.length-1}get canScrollNegative(){return this._reverseNavigation?this._targetIndex!==this._carouselObjects.length-this.indexMoveOverride:0!==this._targetIndex}get carouselObjects(){return this._carouselObjects}get progress(){return this._progress}get isScrolling(){return!this._atTargetLocation}postCreate(){super.postCreate(),this.allowMouseInput&&$.q.instance.game.input.addMoveCallback(this.mouseDragScroll,this),this.createMask(),this.gameObject.transform instanceof G.XVE&&this.gameObject.transform.onRecalculatedBounds.add(this.createMask,this),this.easeType={value:this._easeString},this._centerPoint=this.getCenterPoint(),this._mouseStart=new G.I9Y,this._mouseVelocity=new G.I9Y,this._moveToPoint=new G.I9Y,this._moveTween=$.q.instance.game.add.tween(this.getLocalPositionObject(this.contentView),this),this._carouselObjects.length>0&&this.setToIndex(0)}destroy(){var k;this.gameObject.transform instanceof G.XVE&&(null===(k=this.gameObject.transform.onRecalculatedBounds)||void 0===k||k.remove(this.createMask,this)),$.q.instance.game.input.deleteMoveCallback(this.mouseDragScroll,this),$.q.instance.game.tweens.remove(this._moveTween),this.onFinishedScrolling.dispose(),this.onStartedScrolling.dispose(),this.onScrollingToCompletion.dispose(),this.onMouseScroll.dispose(),this.onTargetSet.dispose(),this.onScrollingLocked.dispose(),this.onScrollingUnlocked.dispose(),this._pressedDown=!1;for(let B=0;BG):this.canMoveVertical&&(H.active=!(k.y$))}}mouseDragScroll(k,B,U){if(this._pressedDown){const k=$.q.instance.game.time.deltaMS;let F;this.canMoveHorizontal&&(F=B-this._mouseStart.x,this._mouseStart.x=B,this._mouseVelocity.x=F/(k+1),this.getLocalPositionObject(this.contentView).x+=F),this.canMoveVertical&&(F=U-this._mouseStart.y,this._mouseStart.y=U,this._mouseVelocity.y=F/(k+1),this.getLocalPositionObject(this.contentView).y+=F),this.onMouseScroll.getBindingsCount()>0&&(this.findNearestIndex(),this.onMouseScroll.dispatch(this._targetIndex))}}setToIndex(k){this.findScrollDistance(k),this.finishedScroll()}scrollToNextLocation(k){const B=this._reverseNavigation?-k:k;this.scrollToTargetLocation(this._targetIndex+B*(this.indexMoveOverride>=1?this.indexMoveOverride:1))}scrollToTargetLocation(k){this.slide?(this.findScrollDistance(k),this.startScroll()):this.setToIndex(k)}scrollToNearestLocation(){this.findNearestIndex(),this.findScrollDistance(this._targetIndex),this.startScroll()}findNearestIndex(){const k=this.getLocalPositionObject(this.contentView),B={x:k.x,y:k.y};B.x+=this._mouseVelocity.x*this.slideTime*2/3,B.y+=this._mouseVelocity.y*this.slideTime*2/3;let U=this._currentIndex;const F=this.getLocalPositionObject(this._carouselObjects[U]),j=new G.I9Y(F.x+B.x,F.y+B.y);let $=this.findPointDistance(this._centerPoint,j);for(let H=0;H{k.transform.setPosition(U.x,U.y)}),this,B.x,B.y);return U}return B}getSize(k){var B,U;return null!==(U=null===(B=k.legacyTransform)||void 0===B?void 0:B.group)&&void 0!==U?U:k.transform.rectTransformDimensions}updateScrollButtons(){this.scrollNegativeButton&&(this.canScrollNegative?this.scrollNegativeButton.unlockState():this.scrollNegativeButton.lockState(V.K.Disabled)),this.scrollPositiveButton&&(this.canScrollPositive?this.scrollPositiveButton.unlockState():this.scrollPositiveButton.lockState(V.K.Disabled))}scrollingLockUpdated(k,B){this.canScrollPositive!==k&&(this.canScrollPositive?this.onScrollingUnlocked.dispatch(1):this.onScrollingLocked.dispatch(1)),this.canScrollNegative!==B&&(this.canScrollNegative?this.onScrollingUnlocked.dispatch(-1):this.onScrollingLocked.dispatch(-1))}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"allowMouseInput",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"slide",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Y.prototype,"slideTime",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"lockInput",void 0),(0,F.Cg)([(0,G.vkK)(),(0,G.Lr6)(0),(0,G.nKb)("horizontalScrolling"),(0,F.Sn)("design:type",Boolean),(0,F.Sn)("design:paramtypes",[Boolean])],Y.prototype,"horizontal",null),(0,F.Cg)([(0,G.vkK)(),(0,G.Lr6)(0),(0,G.nKb)("verticalScrolling"),(0,F.Sn)("design:type",Boolean),(0,F.Sn)("design:paramtypes",[Boolean])],Y.prototype,"vertical",null),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],Y.prototype,"_centerAdjust",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.Lr6)(0),(0,G.nKb)("easeType"),(0,F.Sn)("design:type",String)],Y.prototype,"_easeString",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Y.prototype,"contentView",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"useMask",void 0),(0,F.Cg)([(0,G.MnK)(G.Lom),(0,F.Sn)("design:type",G.Lom)],Y.prototype,"maskOverride",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Y.prototype,"indexMoveOverride",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_limitScrollToOverride",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_hideOffscreenObjects",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onTargetSet",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onScrollingLocked",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"onScrollingUnlocked",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],Y.prototype,"_carouselObjects",void 0),(0,F.Cg)([(0,G.MnK)(H.$),(0,F.Sn)("design:type",H.$)],Y.prototype,"scrollNegativeButton",void 0),(0,F.Cg)([(0,G.MnK)(H.$),(0,F.Sn)("design:type",H.$)],Y.prototype,"scrollPositiveButton",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"_reverseNavigation",void 0),Y=(0,F.Cg)([(0,G.EVk)("Carousel",z.Y.ui)],Y)},16043:(k,B,U)=>{"use strict";U.d(B,{a:()=>V});var F=U(8674),G=U(62459),j=U(49237),$=U(76974),H=U(28152);let V=class extends G.uAl{constructor(){super(...arguments),this._pageChangeDelta=1,this._maxPage=1,this._onPageChanged=new G.HN0,this._onMaxPageChanged=new G.HN0}get onPageChanged(){return this._onPageChanged}get onMaxPageChanged(){return this._onMaxPageChanged}get currentPage(){return this._currentPage}get maximumPage(){return this._maxPage}create(){super.create(),this._increasePageButton.onClick.add(this.applyPageChangeDelta,this,0,this._pageChangeDelta),this._decreasePageButton.onClick.add(this.applyPageChangeDelta,this,0,-this._pageChangeDelta),this.setCurrentPage(1)}postCreate(){super.postCreate(),this.setCurrentPage(this._currentPage,!0)}destroy(){this._increasePageButton.onClick.remove(this.applyPageChangeDelta,this),this._decreasePageButton.onClick.remove(this.applyPageChangeDelta,this),this._onPageChanged.dispose(),this._onMaxPageChanged.dispose(),super.destroy()}applyPageChangeDelta(k){this.setCurrentPage(this._currentPage+k)}setCurrentPage(k,B=!1){{const U=Math.max(1,Math.min(k,this._maxPage));(this._currentPage!==U||B)&&(1===U?this._decreasePageButton.isStateLocked()||this._decreasePageButton.lockState($.K.Disabled):this._decreasePageButton.isStateLocked()&&this._decreasePageButton.unlockState(),U===this._maxPage?this._increasePageButton.isStateLocked()||this._increasePageButton.lockState($.K.Disabled):this._increasePageButton.isStateLocked()&&this._increasePageButton.unlockState(),this._currentPage=U,this._onPageChanged.dispatch())}}setMaximumPage(k){this._maxPage!==k&&(this._maxPage=k,this._onMaxPageChanged.dispatch(),this._currentPage>k&&this.setCurrentPage(this._maxPage))}};(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],V.prototype,"_increasePageButton",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],V.prototype,"_decreasePageButton",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_pageChangeDelta",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_maxPage",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"_onPageChanged",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"_onMaxPageChanged",void 0),V=(0,F.Cg)([(0,G.EVk)("ChangePageButtons",H.Y.uiPagination)],V)},71041:(k,B,U)=>{"use strict";U.d(B,{Eo:()=>tt,RA:()=>X,n3:()=>Z});var F=U(8674),G=U(62459),j=U(68910),$=U(88022),H=U(91207),V=U(28152),W=U(90744),q=U(38920),K=U(31125),z=U(19633),Y=U(15284);class Q extends Y.T{constructor(){super(...arguments),this.validators=[{validate:k=>{if(/[^0-9,.]/g.test(k.text))return"Text should be some numeric value; eg. 9,999. Change it now?"},fix:k=>{k.text="9,999"}}]}getStandardButtonSettings(k,B){const U=[G.Gme.enumGroup({id:"type",labelValue:"Type",selectValue:k.type},K.vX),G.Gme.enumGroup({id:"size",labelValue:"Size",selectValue:k.size},K.YT)];return k.actionTextPosition===X.NONE?U.push(G.Gme.enumGroup({id:"iconPosition",labelValue:"Icon Position",selectValue:k.iconPosition},z.d)):U.push(G.Gme.enumGroup({id:"iconPosition",labelValue:"Icon Position",selectValue:k.iconPosition},Z)),k.iconPosition!==z.d.ICON_ONLY?U.push(G.Gme.enumGroup({id:"actionTextPosition",labelValue:"Action Text Position",selectValue:k.actionTextPosition},X)):k.actionTextPosition=X.NONE,k.iconPosition!==z.d.NONE&&U.push(G.Gme.numberGroup({id:"currency",labelValue:"Currency ID",inputValue:k.currency})),U.push(G.Gme.colorPickerGroup({id:"insufficientFundsColor",labelValue:"Insufficient Funds Color",inputValue:k.insufficientFundsColor}),G.Gme.numberGroup({id:"debounceTimeMs",labelValue:"Debounce Time (ms)",inputValue:k.debounceTimeMs}),G.Gme.numberGroup({id:"amount",labelValue:"Currency Amount",inputValue:k.amount})),k.actionTextPosition!==X.NONE?U.push(G.Gme.textGroup({id:"actionTextLocKey",labelValue:"Action Text Loc Key",inputValue:k.actionTextLocKey})):k.actionTextLocKey="",U.push(G.Gme.checkboxGroup({id:"fitToContents",labelValue:"Fit to Contents",inputValue:k.fitToContents})),U.push(G.Gme.checkboxGroup({id:"suppressSound",labelValue:"Suppress SFX",inputValue:k.suppressSound})),G.XRp.createVertical(U,{isCollapsible:!0,startCollapsed:!1,title:"Button Style"})}}var X,Z,J=U(97518);!function(k){k[k.NONE=0]="NONE",k[k.LEFT=1]="LEFT",k[k.RIGHT=2]="RIGHT"}(X||(X={})),function(k){k[k.NONE=0]="NONE",k[k.CENTER=1]="CENTER",k[k.ICON_ONLY=3]="ICON_ONLY"}(Z||(Z={}));let tt=class extends z.S{constructor(){super(...arguments),this._customIcons={1:{atlas:$._.General_icons_json,frame:"mail-gold"},27:{atlas:$._.Ui_hard_currency_json,frame:"icon-currency-27-small"}},this.currency=1,this._amount=9999,this.insufficientFundsColor=16711680,this.actionTextPosition=X.NONE,this.actionTextLocKey="",this._actionText=""}get amount(){return this._amount}set amount(k){this._amount=k,this.regenerateButton()}get buttonSizeSpecs(){return Object.assign({},K.Eo[this.size])}get buttonTypeSpecs(){let k=K.jN[this.type].textColor;return this._paymentManager.canAfford({currency:this.currency,value:this.amount})||(k=this.insufficientFundsColor),Object.assign(Object.assign({},K.jN[this.type]),{textColor:k})}updateIcon(k){var B;const U=null!==(B=this._customIcons[this.currency])&&void 0!==B?B:{atlas:H.E.getIconForType("currency",this.currency)};if(!G.Aq$.isDefined(U)||!G.Aq$.isDefined(this._iconComponent))return;this._iconComponent.updateAsset(U.atlas,U.frame),this._iconComponent.tint=16777215;const F=k&&"object"==typeof k?k.iconSize:this.buttonSizeSpecs.iconSize;this._iconTransform.setSizeDelta(F,F)}regenerateButton(){G.Aq$.isDefined(this.amount)&&G.Aq$.isDefined(this._textComponent)&&(this.text=(0,q.Hk)(this.amount,0,","),super.regenerateButton())}populateTextComponents(){var k,B,U,F;this._textComponent=null===(k=this.gameObject.findChildByName("Text"))||void 0===k?void 0:k.findComponentInChildren(G.EYj),this._textTransform=null===(B=this._textComponent)||void 0===B?void 0:B.GameObject.transform,this._actionTextComponent=null===(U=this.gameObject.findChildByName("ActionText"))||void 0===U?void 0:U.findComponentInChildren(J.R),this._actionTextTransform=null===(F=this._actionTextComponent)||void 0===F?void 0:F.GameObject.transform}updateComponentsFromSpecs(k,B){G.Aq$.isDefined(this._actionTextComponent)&&(this._actionTextComponent.localizedText.TextObject.style.fontFamily=k.fontFamily,this._actionTextComponent.localizedText.TextObject.style.fontSize=k.fontSize,this._actionTextComponent.localizedText.fontSize=k.fontSize,this._actionTextComponent.localizedText.TextObject.style.fill=K.jN[this.type].textColor),super.updateComponentsFromSpecs(k,B)}regenerateIconOnlyButton(k){G.Aq$.isDefined(this._actionTextComponent)&&(this._actionTextComponent.GameObject.active=!1),super.regenerateIconOnlyButton(k)}regenerateButtonText(k){if(G.Aq$.isDefined(this._actionTextComponent))if(this.actionTextPosition===X.NONE)this._actionTextComponent.GameObject.active=!1,super.regenerateButtonText(k);else{this._actionTextComponent.GameObject.active=!0,this._textComponent.GameObject.active=!0,this._actionTextComponent.setLocalizationKey(this.actionTextLocKey),this._actionText=this._actionTextComponent.localizedText.text;const B=Math.ceil(j.TextMetrics.measureText(this.text,this._textComponent.TextObject.style).width),U=Math.ceil(j.TextMetrics.measureText(this._actionText,this._actionTextComponent.localizedText.TextObject.style).width);this._textTransform.widthDelta=B,this._actionTextTransform.widthDelta=U,this._buttonWidth=B+U+2*k.margin;const F=this.actionTextPosition===X.LEFT?k.actionTextPadding:k.padding;let G=this.actionTextPosition===X.RIGHT?k.actionTextPadding:k.padding,$=0;this.iconPosition===z.d.NONE?(this._iconComponent.GameObject.active=!1,G=0):(this._iconComponent.GameObject.active=!0,this.updateIcon(this.buttonSizeSpecs),$=this._iconTransform.fullWidth,this._buttonWidth+=$+F+G);const H=Math.ceil(this._buttonWidth/2),V=this.actionTextPosition===X.LEFT?this._actionTextTransform:this._textTransform,W=this.actionTextPosition===X.RIGHT?this._actionTextTransform:this._textTransform,q=Math.ceil(V.widthDelta/2),K=Math.ceil(W.widthDelta/2),Y=Math.ceil($/2);V.posX=-H+k.margin+q,this._iconTransform.posX=V.posX+q+F+Y,W.posX=this._iconTransform.posX+Y+G+K,this._buttonWidth=Math.max(k.minWidth,this._buttonWidth),this._textTransform.top=0,this._textTransform.bottom=0,this._textTransform.posY=-Math.abs(k.yOffset),this._actionTextTransform.top=0,this._actionTextTransform.bottom=0,this._actionTextTransform.posY=-Math.abs(k.yOffset)}else super.regenerateButtonText(k)}};(0,F.Cg)([(0,G.Cdj)("743-fd51"),(0,F.Sn)("design:type",W.E)],tt.prototype,"_paymentManager",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],tt.prototype,"currency",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],tt.prototype,"_amount",void 0),(0,F.Cg)([(0,G.iEU)(),(0,F.Sn)("design:type",Number)],tt.prototype,"insufficientFundsColor",void 0),(0,F.Cg)([(0,G.gfw)(X),(0,F.Sn)("design:type",Number)],tt.prototype,"actionTextPosition",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],tt.prototype,"actionTextLocKey",void 0),tt=(0,F.Cg)([(0,G.EVk)("CurrencyButton",V.Y.ui),(0,G.WR4)(Q)],tt)},85515:(k,B,U)=>{"use strict";var F;U.d(B,{E:()=>F}),function(k){k.Default="default",k.BackgroundLayer="background",k.ContentLayer="content",k.ForegroundLayer="foreground",k.DifficultyModeOverlay="difficultyModeOverlay",k.UiLayer="uiLayer",k.ConsentLayer="consentLayer",k.GameRenderCacheLayer="gameRenderCache",k.MenusLayer="menus",k.DialogueLayer="dialogueLayer",k.OverlayLayer="overlay",k.OpaqueLayer="opaque",k.Result="result",k.Ui="ui",k.Debug="debug"}(F||(F={}))},28829:(k,B,U)=>{"use strict";U.d(B,{q:()=>H});var F=U(8674),G=U(62459),j=U(29834),$=U(99625);let H=class extends G.uAl{constructor(){super(...arguments),this.glowSpinePrefabGuid=$.l.GlowHighlightAnimation,this.numberOfGlowToPreload=1,this._focusGameObjects=new Map}create(){super.create(),this.GameObject.active=!1,this._glowPool=new G.iyL((()=>this._prefabLoader.loadFromGUID(this.glowSpinePrefabGuid,this.GameObject))),this.numberOfGlowToPreload>0&&this._glowPool.allocate(this.numberOfGlowToPreload)}showOverlay(){return(0,F.sH)(this,void 0,void 0,(function*(){this.GameObject.active=!0,this.moveAllToFocusLayer(),yield this._fadeInOverlay()}))}hideOverlay(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this._fadeOutOverlay(),this.restoreAllToOriginalLayers(),this.GameObject.active=!1}))}playGlowAnimations(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=[];this._glowPool.aliveList.forEach((B=>{const U=B.findComponent(j.j);U.playAnimation("idle",!1,!0),k.push(U.OnAnimationComplete.asPromise())})),yield Promise.all(k)}))}setFocusLayer(k){this._focusLayer=k}addFocusableGameObject(k,B,U=!1,F){var G,j,$;if(null==F?void 0:F.applyGlow){const U=this._glowPool.getObject(),$=null!==(G=null==F?void 0:F.position)&&void 0!==G?G:{x:k.transform.worldPosition.x,y:k.transform.worldPosition.y};U.transform.setPosition($.x,$.y),this._focusGameObjects.set(U,{originalLayer:U.layer,focusLayer:null!==(j=null!=B?B:this._focusLayer)&&void 0!==j?j:this.GameObject.layer,applyToChildren:!1})}this._focusGameObjects.set(k,{originalLayer:k.layer,focusLayer:null!==($=null!=B?B:this._focusLayer)&&void 0!==$?$:this.GameObject.layer,applyToChildren:U})}moveAllToFocusLayer(){this._focusGameObjects.forEach(((k,B)=>{B.setLayer(k.focusLayer,k.applyToChildren)}))}restoreAllToOriginalLayers(){this._focusGameObjects.forEach(((k,B)=>{B.setLayer(k.originalLayer,k.applyToChildren)})),this._focusGameObjects.clear(),this._glowPool.aliveList.forEach((k=>{this._glowPool.recycleObject(k)}))}_fadeInOverlay(){return(0,F.sH)(this,void 0,void 0,(function*(){this._inAnimation.playAnimation(),yield this._inAnimation.onTweenComplete.asPromise()}))}_fadeOutOverlay(){return(0,F.sH)(this,void 0,void 0,(function*(){this._outAnimation.playAnimation(),yield this._outAnimation.onTweenComplete.asPromise()}))}};(0,F.Cg)([(0,G.MnK)(G.bTj),(0,F.Sn)("design:type",G.bTj)],H.prototype,"_inAnimation",void 0),(0,F.Cg)([(0,G.MnK)(G.bTj),(0,F.Sn)("design:type",G.bTj)],H.prototype,"_outAnimation",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"_focusLayer",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"glowSpinePrefabGuid",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"numberOfGlowToPreload",void 0),(0,F.Cg)([(0,G.Cdj)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],H.prototype,"_prefabLoader",void 0),H=(0,F.Cg)([(0,G.EVk)("FocusOverlay",G.YH6.ui)],H)},69811:(k,B,U)=>{"use strict";U.d(B,{y:()=>V});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(28152);let V=class extends G.uAl{constructor(){super(...arguments),this._graphicsChildren=[],this._selectedGraphicIndex=0}set selectedGraphicIndex(k){this.selectGraphicAtIndex(k)}get selectedGraphicIndex(){return this._selectedGraphicIndex}postCreate(){super.postCreate(),this._graphicsChildren=this.gameObject.findComponentsInChildren(G.vYh),this.selectGraphicAtIndex(this._selectedGraphicIndex)}selectGraphicAtIndex(k){this._selectedGraphicIndex=$().clamp(k,0,this._graphicsChildren.length-1);for(let B=0;B{"use strict";U.d(B,{P:()=>V});var F,G=U(8674),j=U(62459),$=U(99625),H=(U(70005),U(19690));let V=F=class extends j.uAl{spawnGuideHand(){return(0,G.sH)(this,arguments,void 0,(function*(k=this.gameObject.transform.worldPosition,B){var U;if(!this._spawnedGuideHand){if(!j.Aq$.isDefined(k.x)||!j.Aq$.isDefined(k.y))return j.VyI.log("GuideHandSpawnerComponent: Invalid position provided for guide hand spawn - guide hand was not created",j.$bb.Warning),null;const F={x:k.x,y:k.y},G=yield(0,H.Ks)().loadWithDependenciesFromGUID($.l.NavigationGuideHand);j.Aq$.isDefined(B)&&(G.layer=B),G.parent=this.gameObject,G.transform.worldPosition=F,G.transform.setRotation(null!==(U=this.angle)&&void 0!==U?U:this.getGuideHandDefaultAngle(F)),this._spawnedGuideHand=G}return this._spawnedGuideHand}))}despawnGuideHand(){var k;null===(k=this._spawnedGuideHand)||void 0===k||k.destroy(),this._spawnedGuideHand=void 0}getGuideHandDefaultAngle(k){const{width:B,height:U}=j.W$e.instance.game,G=k.xB-F.SCREEN_EDGE_PADDING,H=k.yU-F.SCREEN_EDGE_PADDING;return G?H?225:V?135:180:$?H?315:V?45:0:H?270:90}toggleGuideHand(){return(0,G.sH)(this,void 0,void 0,(function*(){}))}};V.SCREEN_EDGE_PADDING=40,(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],V.prototype,"angle",void 0),(0,G.Cg)([(0,j.GO0)(),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",Promise)],V.prototype,"toggleGuideHand",null),V=F=(0,G.Cg)([(0,j.EVk)("GuideHandSpawner")],V)},96304:(k,B,U)=>{"use strict";U.d(B,{j:()=>$});var F=U(8674),G=U(62459),j=U(93171);let $=class extends G.uAl{constructor(){super(...arguments),this.DefaultPunchStrength=.1,this.StrongPunchStrength=.25,this.SuperStrongPunchStrength=.6,this.LowHealthPercent=.2,this.MediumHealthPercent=.8,this.MagicEffectPointsBackgroundArray=[],this.BGFillerGraphicsArray=[],this.BGFillerTransformsArray=[],this.MagicEffectPointsEnabledArray=[],this.MagicEffectPointsEffectArray=[],this.HealthBarTimeline=null,this.LowHealthTimeline=null,this._viewAllUI=!0,this.GameObjectsToShowOnPreview=[],this.AnimatedObjects={}}DebugSetProgress100(){this.restartTimeline(1)}DebugSetProgress10(){this.restartTimeline(.1)}DebugSetProgress20(){this.restartTimeline(.2)}DebugSetProgress50(){this.restartTimeline(.5)}SetVisibleAllUIElements(k){this._viewAllUI}create(){super.create(),this.GameObject&&(this.SetVisibleAllUIElements(!0),this.HealthBarTimeline=new G.Kfn,this.AnimatedObjects.DynamicProgressBar=this.HealthBarTimeline.addGameObject(this.DynamicProgressBar),this.AnimatedObjects.StarGraphic=this.HealthBarTimeline.addGameObject(this.StarGraphic),this.AnimatedObjects.LevelUI=this.HealthBarTimeline.addGameObject(this.LevelUI),this.AnimatedObjects.MergeRankUI=this.HealthBarTimeline.addGameObject(this.MergeRankUI),this.AnimatedObjects.BuffsBackground=this.HealthBarTimeline.addGameObject(this.BuffsBackground),this.AnimatedObjects.TopUI=this.HealthBarTimeline.addGameObject(this.TopUI),this.AnimatedObjects.SpriteGraphic=this.HealthBarTimeline.addGameObject(this.SpriteGraphic),this.AnimatedObjects.MagicEffectPointsBackgroundArray=this.HealthBarTimeline.addGameObjects(this.MagicEffectPointsBackgroundArray),this.AnimatedObjects.MagicEffectPointsEnabledArray=this.HealthBarTimeline.addGameObjects(this.MagicEffectPointsEnabledArray),this.AnimatedObjects.MagicEffectPointsEffectArray=this.HealthBarTimeline.addGameObjects(this.MagicEffectPointsEffectArray),this.LowHealthTimeline=new G.Kfn,this.AnimatedObjects.BGFillerGraphicsArray=this.LowHealthTimeline.addGameObjects(this.BGFillerGraphicsArray),this.AnimatedObjects.BGFillerTransformsArray=this.LowHealthTimeline.addGameObjects(this.BGFillerTransformsArray),this.IsActiveInHierarchy||this.SetVisibleAllUIElements(!1))}destroy(){var k,B;null===(k=this.HealthBarTimeline)||void 0===k||k.destroyTimeline(),null===(B=this.LowHealthTimeline)||void 0===B||B.destroyTimeline(),this.SetVisiblePulseElements(!1),this.SetVisibleAllUIElements(!1),super.destroy()}restartTimeline(k){this._progressBar&&(this._progressBar.setValue(k),this.triggerShake(k))}SetVisiblePulseElements(k){this.BGFillerGraphicsArray&&this.BGFillerGraphicsArray.forEach((B=>{B&&(B.active=k)}))}attachLevelSequence(k){this.AnimatedObjects.StarGraphic&&this.AnimatedObjects.LevelUI&&this.HealthBarTimeline.to(this.AnimatedObjects.LevelUI,.1,{y:11},G.GS3.Quintic.Out,k).to(this.AnimatedObjects.LevelUI,.83,{y:0},G.GS3.generateCustomElasticEase(1.4,.8,!1,!0),k+.1).from(this.AnimatedObjects.StarGraphic,1.73,{rotation:-135,y:0},G.GS3.Quintic.Out,k)}attachMergeRankSequence(k){this.AnimatedObjects.MergeRankUI&&this.HealthBarTimeline.to(this.AnimatedObjects.MergeRankUI,.1,{y:14},G.GS3.Quintic.Out,k).to(this.AnimatedObjects.MergeRankUI,.83,{y:3},G.GS3.generateCustomElasticEase(1.4,.8,!1,!0),k+.1)}attachShieldSequence(k){this.AnimatedObjects.spriteGraphic&&this.HealthBarTimeline.from(this.AnimatedObjects.spriteGraphic,1.1,{x:-11,rotation:-5,scaleX:.94,scaleY:.94},G.GS3.Quintic.Out,k+.1)}attachMagicEffectsSequence(k){if(this.AnimatedObjects.MagicEffectPointsBackgroundArray&&this.AnimatedObjects.MagicEffectPointsEnabledArray&&this.AnimatedObjects.MagicEffectPointsEffectArray){const B={y:14,scaleX:.01,scaleY:.01,stagger:-.065},U={rotation:20,stagger:-.065},F=G.GS3.generateCustomElasticEase(.7,.6,!1,!0);this.HealthBarTimeline.from(this.AnimatedObjects.MagicEffectPointsBackgroundArray,.7,U,F,k).from(this.AnimatedObjects.MagicEffectPointsBackgroundArray,.7,B,F,k).from(this.AnimatedObjects.MagicEffectPointsEnabledArray,.7,U,F,k).from(this.AnimatedObjects.MagicEffectPointsEnabledArray,.7,B,F,k).from(this.AnimatedObjects.MagicEffectPointsEffectArray,.7,U,F,k).from(this.AnimatedObjects.MagicEffectPointsEffectArray,.7,B,F,k)}}CreateLowHealthPulseSequence(k){if(this.SetVisiblePulseElements(!0),this.AnimatedObjects.BGFillerGraphicsArray&&this.AnimatedObjects.BGFillerTransformsArray){this.LowHealthTimeline.new({startDelay:2,loopCount:-1,loopDelay:.4});const B=.5;this.LowHealthTimeline.to(this.AnimatedObjects.BGFillerTransformsArray,.01,{scaleX:1,scaleY:1},G.GS3.Sinusoidal.In,k).to(this.AnimatedObjects.BGFillerTransformsArray,1.4,{scaleX:1+.196*B,scaleY:1+1.232*B,stagger:.3},G.GS3.Exponential.Out,k+.3).fromTo(this.AnimatedObjects.BGFillerGraphicsArray,.3,{alpha:0},{alpha:1,stagger:.3},G.GS3.Sinusoidal.In,k).to(this.AnimatedObjects.BGFillerGraphicsArray,1.6,{alpha:0,stagger:.3},G.GS3.Cubic.Out,k+.3),this.LowHealthTimeline.play()}}attachTopNavigationSequence(k){this.AnimatedObjects.TopUI&&this.HealthBarTimeline.to(this.AnimatedObjects.TopUI,.1,{y:-14},G.GS3.Quartic.Out,k).to(this.AnimatedObjects.TopUI,1.13,{y:5},G.GS3.generateCustomElasticEase(.6,.345,!1,!0),k+.1)}attachTopRightNavigationSequence(k){this.AnimatedObjects.BuffsBackground&&this.HealthBarTimeline.to(this.AnimatedObjects.BuffsBackground,.1,{y:-15},G.GS3.Quartic.Out,k).to(this.AnimatedObjects.BuffsBackground,2.3,{y:0},G.GS3.generateCustomElasticEase(1.13,.3,!1,!0),k+.1)}triggerShake(k){this.setupPulse(k),this.setupSequence(k)}setupPulse(k){k{"use strict";U.d(B,{W:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.y4o{constructor(){super(...arguments),this._collisionBox=null,this._root=null,this._onInputDown=new G.HN0,this._onInputUp=new G.HN0,this._onInputOver=new G.HN0,this._onInputOut=new G.HN0}get inputEnabled(){var k;return!!(null===(k=this._collisionBox)||void 0===k?void 0:k.inputEnabled)}set inputEnabled(k){const B=this.getCollisionBox();B.inputEnabled=k,this.applyUseHandCursorSetting(B,this.useHandCursor)}get useHandCursor(){var k,B,U;return null!==(U=null===(B=null===(k=this._collisionBox)||void 0===k?void 0:k.input)||void 0===B?void 0:B.useHandCursor)&&void 0!==U&&U}set useHandCursor(k){this.applyUseHandCursorSetting(this.getCollisionBox(),k)}get onInputDown(){return this._onInputDown}get onInputUp(){return this._onInputUp}get onInputOver(){return this._onInputOver}get onInputOut(){return this._onInputOut}create(){super.create();const k=this.getCollisionBox().events;k.onInputDown.add(this.onDown,this),k.onInputUp.add(this.onUp,this),k.onInputOver.add(this.onOver,this),k.onInputOut.add(this.onOut,this),this.updateCollisionBox()}setInputPriority(k){const B=this.getCollisionBox();B&&(B.input.priorityID=k)}destroy(){var k;const B=this.getCollisionBox().events;B.onInputDown.remove(this.onDown,this),B.onInputUp.remove(this.onUp,this),B.onInputOver.remove(this.onOver,this),B.onInputOut.remove(this.onOut,this),this._onInputDown.dispose(),this._onInputUp.dispose(),this._onInputOut.dispose(),this._onInputOver.dispose(),null===(k=this._root)||void 0===k||k.destroy(),super.destroy()}getDimensions(){return new G.or0(this._collisionBox?this._collisionBox.width:0,this._collisionBox?this._collisionBox.height:0)}getCollisionBox(k=!0){return k&&!this._collisionBox&&this.createInternalCollisionBox(),this._collisionBox}onDown(k,B){this._onInputDown.dispatch()}onUp(k,B){this._onInputUp.dispatch()}onOver(k,B){this._onInputOver.dispatch()}onOut(k,B){this._onInputOut.dispatch()}applyUseHandCursorSetting(k,B){(null==k?void 0:k.input)&&(k.input.useHandCursor=B)}createInternalCollisionBox(){this._root=j.q.instance.game.add.group(),this.setRootContainer(this._root),this._collisionBox=j.q.instance.game.add.sprite(0,0,"","",this._root),this._collisionBox.width=10,this._collisionBox.height=10,this._collisionBox.alpha=0,this._collisionBox.inputEnabled=!0}updateCollisionBox(){const k=this.getCollisionBox(),B=this.GameObject.findComponent(G.XVE);B&&(k.width=B.widthDelta,k.height=B.heightDelta),k.inputEnabled=this.inputEnabled,this.applyUseHandCursorSetting(k,this.useHandCursor)}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean),(0,F.Sn)("design:paramtypes",[Boolean])],H.prototype,"inputEnabled",null),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean),(0,F.Sn)("design:paramtypes",[Boolean])],H.prototype,"useHandCursor",null),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0),(0,F.Sn)("design:paramtypes",[])],H.prototype,"onInputDown",null),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0),(0,F.Sn)("design:paramtypes",[])],H.prototype,"onInputUp",null),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0),(0,F.Sn)("design:paramtypes",[])],H.prototype,"onInputOver",null),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0),(0,F.Sn)("design:paramtypes",[])],H.prototype,"onInputOut",null),H=(0,F.Cg)([(0,G.EVk)("InteractableRectTransform",$.Y.input)],H)},79424:(k,B,U)=>{"use strict";U.d(B,{D:()=>$});var F=U(8674),G=U(62459),j=U(83133);let $=class extends G.uAl{constructor(){super(...arguments),this.isTab=!1}register(k){const B=this.getInjectedValue(this.stateId);this.isTab?B.registerTab(k,this.gameObject.findComponent(j.l)):B.registerContent(k,this.gameObject)}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],$.prototype,"stateId",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"isTab",void 0),$=(0,F.Cg)([(0,G.EVk)("LinkedScrollItem",void 0,"Use with LinkedScrollState!")],$)},89192:(k,B,U)=>{"use strict";U.d(B,{V:()=>V});var F=U(8674),G=U(62459),j=U(94566),$=U(11647),H=U(94325);let V=class extends((0,$.o)(G.uAl)){constructor(){super(...arguments),this._inset=0,this.onGroupChanged=this.createTidySignal(),this._tabs={},this._contents={},this._toCleanup=new WeakMap,this._selectionDirty=!1,this._skipTargetGroup=!1}get contextId(){return this._contextId}create(){super.create(),this._context.Container.rebind(this._contextId).toConstantValue(this)}update(){if(super.update(),!this._selectionDirty)return;let k,B;const{x:U,y:F}=this._scroll.getVisibleLocalRange();for(const[j,$]of Object.entries(this._contents))for(const H of $){const $=H.top+this._inset;$<=U||$>=F||(!G.Aq$.isDefined(k)||$this.scrollToGroup(k))),this._toCleanup.set(B.GameObject,[B.GameObject.onDestroy.add((()=>{this._tabs[k]===B&&delete this._tabs[k],this.cleanupObject(B.GameObject)}),this)])}registerContent(k,B){var U,F;if(!(B.transform instanceof G.XVE))throw new Error("LinkedScrollState only works with RectTransforms");const j=B.transform,$=null!==(U=(F=this._contents)[k])&&void 0!==U?U:F[k]=[];$.push(j),this._selectionDirty=!0,this._toCleanup.set(B,[B.onDestroy.add((()=>{const U=$.indexOf(j);U>=0&&$.splice(U,1),0===$.length&&delete this._contents[k],this.cleanupObject(B)}),this),j.onWorldMatrixChanged.add((()=>this._selectionDirty=!0),this)])}scrollToGroup(k){const B=this._contents[k];if(!B)return void G.VyI.log("Attempted to scroll to unknown group",G.$bb.Warning,k);let U=1/0;for(const F of B)U=Math.min(F.top,U);isFinite(U)&&(this._skipTargetGroup=!0,this._scroll.setScrollPosition(-U))}scrollToTop(){this._scroll.setScrollPosition(0)}cleanupObject(k){var B;if(!k)return;const U=null!==(B=this._toCleanup.get(k))&&void 0!==B?B:[];for(const F of U)F.destroy();this._toCleanup.delete(k)}};(0,F.Cg)([(0,G.MnK)(H.C),(0,F.Sn)("design:type",H.C)],V.prototype,"_scroll",void 0),(0,F.Cg)([(0,G.MnK)(G.bE_),(0,F.Sn)("design:type",G.bE_)],V.prototype,"_context",void 0),(0,F.Cg)([(0,G.MnK)(j.O),(0,F.Sn)("design:type",j.O)],V.prototype,"_toggles",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],V.prototype,"_contextId",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_inset",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onGroupChanged",void 0),V=(0,F.Cg)([(0,G.EVk)("LinkedScrollState",void 0)],V)},56617:(k,B,U)=>{"use strict";U.d(B,{i:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this.onLoadingUIHidden=new G.HN0,this.onLoadingUIShown=new G.HN0,this._loadingShowGameObjects=[],this._loadingHideGameObjects=[],this._delayToShowLoadGameObjectsMS=0,this._isShowingLoadingUI=!1,this._startLoadingTimestamp=0,this._loadingUIVisible=!1}get minimumLoadingDurationMS(){return this._minimumLoadDurationMS}get delayToShowLoadGameObjectsMS(){return this._delayToShowLoadGameObjectsMS}showLoadingUI(){this._isShowingLoadingUI||(this._delayToShowLoadGameObjectsMS<=0&&this.setVisibleState(!0),this._isShowingLoadingUI=!0,this._startLoadingTimestamp=Date.now())}hideLoadingUI(){this._isShowingLoadingUI&&(this._isShowingLoadingUI=!1,(!G.Aq$.isDefined(this._minimumLoadDurationMS)||Date.now()-this._startLoadingTimestamp>=this._minimumLoadDurationMS)&&this.setVisibleState(!1))}forceHideLoadingUI(){this._isShowingLoadingUI&&(this._isShowingLoadingUI=!1,this.setVisibleState(!1))}update(){super.update(),this._isShowingLoadingUI?!this._loadingUIVisible&&Date.now()-this._startLoadingTimestamp>this._delayToShowLoadGameObjectsMS&&this.setVisibleState(!0):this._loadingUIVisible&&Date.now()-this._startLoadingTimestamp>=this._minimumLoadDurationMS&&this.setVisibleState(!1)}setVisibleState(k){k!==this._loadingUIVisible&&(this._loadingHideGameObjects.forEach((B=>{B.active=!k})),this._loadingShowGameObjects.forEach((B=>{B.active=k})),this._loadingUIVisible=k,this._loadingUIVisible?this.onLoadingUIShown.dispatch():this.onLoadingUIHidden.dispatch())}destroy(){this.onLoadingUIHidden.dispose(),this.onLoadingUIShown.dispose(),super.destroy()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onLoadingUIHidden",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onLoadingUIShown",void 0),(0,F.Cg)([(0,G.ERr)(),(0,G.SZi)(),(0,F.Sn)("design:type",Array)],$.prototype,"_loadingShowGameObjects",void 0),(0,F.Cg)([(0,G.ERr)(),(0,G.SZi)(),(0,F.Sn)("design:type",Array)],$.prototype,"_loadingHideGameObjects",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],$.prototype,"_minimumLoadDurationMS",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],$.prototype,"_delayToShowLoadGameObjectsMS",void 0),$=(0,F.Cg)([(0,G.EVk)("LoadingUI",j.Y.ui)],$)},97518:(k,B,U)=>{"use strict";U.d(B,{R:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._args=[],this._acceptUnlocalized=!1,this._dontRunOnCreate=!1}get localizedText(){return this._localizedText}set localizationKey(k){this.setLocalizationKey(k)}get localizationKey(){return this._localizationKey}create(){super.create(),this._localizationKey&&!this._dontRunOnCreate&&this.setLocalizationKey(this._localizationKey)}setLocalizationKey(k){this._localizationKey=k,this.getLocalizedText()}setTextArguments(...k){this._args=k,this.getLocalizedText()}getLocalizedText(){{const k=j.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);this._localizedText.text=this._acceptUnlocalized&&!k.hasText(this._localizationKey)?this._localizationKey:k.getText(this._localizationKey,...this._args)}}};(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_localizedText",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"_localizationKey",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.W_S)(),(0,F.Sn)("design:type",Array)],H.prototype,"_args",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_acceptUnlocalized",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_dontRunOnCreate",void 0),H=(0,F.Cg)([(0,G.EVk)("LocalizationKeyText",$.Y.ui)],H)},31125:(k,B,U)=>{"use strict";U.d(B,{Eo:()=>q,Se:()=>W,XN:()=>F,YT:()=>j,jN:()=>K,vX:()=>G});var F,G,j,$=U(62459),H=U(88022),V=U(19631);!function(k){k.Left="left",k.Right="right",k.Up="up",k.Down="down",k.Check="check",k.Close="close",k.Info="info",k.Spin="spin",k.Shop="shop",k.Build="build",k.Gift="gift",k.Lock="lock",k.Music="music",k.Play="play",k.Plus="plus",k.Sparkle="sparkle",k.Delete="delete",k.Unspecified="unspecified",k.Custom="custom"}(F||(F={})),function(k){k.Sapphire="sapphire",k.Emerald="emerald",k.Marble="marble",k.Ruby="ruby"}(G||(G={})),function(k){k.Small="small",k.Medium="medium",k.Large="large"}(j||(j={}));const W={[j.Small]:{height:48,minWidth:44,fontFamily:$.dBt.PaytoneOne,fontSize:18,margin:12,padding:4,iconSize:20,iconOnlySize:20,iconOnlyWidth:44,atlasGuid:H._.Ui_library_json,yOffset:2},[j.Medium]:{height:60,minWidth:100,fontFamily:$.dBt.PaytoneOne,fontSize:18,margin:16,padding:4,iconSize:20,iconOnlySize:32,iconOnlyWidth:56,atlasGuid:H._.Ui_library_json,yOffset:3},[j.Large]:{height:68,minWidth:100,fontFamily:$.dBt.PaytoneOne,fontSize:24,margin:16,padding:4,iconSize:20,iconOnlySize:32,iconOnlyWidth:64,atlasGuid:H._.Ui_library_json,yOffset:-4}},q={[j.Small]:Object.assign(Object.assign({},W[j.Small]),{iconSize:32,actionTextPadding:16,padding:8,margin:16}),[j.Medium]:Object.assign(Object.assign({},W[j.Medium]),{iconSize:32,actionTextPadding:16,padding:8}),[j.Large]:Object.assign(Object.assign({},W[j.Large]),{iconSize:32,actionTextPadding:16,padding:8,margin:24})},K={[G.Sapphire]:{textColor:16777215,defaultGuid:V.B.Sapphire_medium_default,activeGuid:V.B.Sapphire_medium_active,hoverGuid:V.B.Sapphire_medium_hover,disabledGuid:V.B.Stone_medium_disabled},[G.Emerald]:{textColor:16777215,defaultGuid:V.B.Emerald_medium_default,activeGuid:V.B.Emerald_medium_active,hoverGuid:V.B.Emerald_medium_hover,disabledGuid:V.B.Stone_medium_disabled},[G.Marble]:{textColor:3552822,defaultGuid:V.B.Marble_medium_default,activeGuid:V.B.Marble_medium_active,hoverGuid:V.B.Marble_medium_hover,disabledGuid:V.B.Stone_medium_disabled},[G.Ruby]:{textColor:16777215,defaultGuid:V.B.Ruby_medium_default,activeGuid:V.B.Ruby_medium_active,hoverGuid:V.B.Ruby_medium_hover,disabledGuid:V.B.Stone_medium_disabled}}},90614:(k,B,U)=>{"use strict";U.d(B,{P:()=>q});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(68152),V=U(90351),W=U(95865);let q=class extends W.A{constructor(){super(...arguments),this._useOffset=!0,this._moveDurationMS=1e3,this._movementX=0,this._movementY=0,this._repeatCount=0,this._hasMoved=!1,this._disabled=!1}get hasMoved(){return this._hasMoved}set disabled(k){this._disabled=k}startTween(){if(super.startTween(),!this._tween&&!this._disabled){const k=this._targetGameObject.transform;(0,H.v)(!!k,"Cannot be attached to a GameObject without a transform");const B=this._useOffset?this._movementX+k.localPosition.x:this._movementX,U=this._useOffset?this._movementY+k.localPosition.y:this._movementY,F={x:k.localPosition.x,y:k.localPosition.y};this._tween=j.q.instance.game.add.tween(F,this).to({x:B,y:U},this._moveDurationMS,V.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._repeatCount,this._yoyo),this._tween.onUpdate.add((()=>{k.setPosition(F.x,F.y)})),this._tween.onTweenComplete.addOnce((()=>{this.destroyTween(),this._hasMoved=!0,this.onComplete.dispatch()}))}}setTransformTarget(k,B){this._movementX=k,this._movementY=B}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],q.prototype,"_useOffset",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_moveDurationMS",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_movementX",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_movementY",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_repeatCount",void 0),q=(0,F.Cg)([(0,G.EVk)("MoveTransform",$.Y.motion)],q)},43714:(k,B,U)=>{"use strict";U.d(B,{x:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(90351),V=U(95865);let W=class extends V.A{constructor(){super(...arguments),this._movementX=0,this._movementY=0,this._repeatCount=0,this._moveDurationMS=1e3}setMovement(k,B){this._movementX=k,this._movementY=B}startTween(){super.startTween();const k=this.GameObject.transform,B=k.worldPosition;this._tween=j.q.instance.game.add.tween(B,this).to({x:this._movementX,y:this._movementY},this._moveDurationMS,H.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._repeatCount,this._yoyo),this._tween.onUpdate.add((()=>{k.worldPosition={x:B.x,y:B.y}})),this._tween.onTweenComplete.addOnce((()=>{this.destroyTween(),this.onComplete.dispatch()}))}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_movementX",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_movementY",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_repeatCount",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_moveDurationMS",void 0),W=(0,F.Cg)([(0,G.EVk)("MoveTransformToWorldPosition",$.Y.motion)],W)},45385:(k,B,U)=>{"use strict";U.d(B,{e:()=>W});var F,G=U(8674),j=U(62459),$=U(88022),H=U(43846),V=U(31125);!function(k){k.Icon="icon",k.Numeric="number",k.Text="text",k.Empty="empty"}(F||(F={}));let W=class extends j.uAl{constructor(){super(...arguments),this.SIZE_OFFSET=4,this._mode=F.Icon,this._icon=V.XN.Info,this._badgeText="!",this._numberedMaxValue=99,this.minWidth=25}get mode(){return this._mode}set mode(k){this._mode!==k&&(this._mode=k,this.refresh())}get icon(){return this._icon}set icon(k){var B;this._icon!==k&&(this._icon=k,null===(B=this._iconComponent)||void 0===B||B.updateAsset($._.Ui_library_json,k))}postCreate(){this.refresh()}refresh(){var k;switch(this.mode){case F.Numeric:this.updateNumberedNotificationBadge(this.GameObject.active,parseInt(this._badgeText));break;case F.Text:this.updateNonNumberedNotificationBadge(this.GameObject.active);break;case F.Icon:null===(k=this._iconComponent)||void 0===k||k.updateAsset($._.Ui_library_json,this._icon)}this.updateEnabled()}setActive(k){this.GameObject.active=k}updateNumberedNotificationBadge(k,B){this.GameObject.active=k,this._mode=F.Numeric,this.updateEnabled(),B>this._numberedMaxValue?this._badgeText=`${this._numberedMaxValue}+`:this._badgeText=`${B}`,this._textToUpdate.text=this._badgeText,this.updateBackgroundWidthToText()}updateBackgroundWidthToText(){var k;const B=null===(k=this._textToUpdate)||void 0===k?void 0:k.GameObject.transform;B instanceof j.XVE&&(this._backgroundTransform.widthDelta=Math.max(B.widthDelta-this.SIZE_OFFSET,this.minWidth))}updateBackgroundWidthToIcon(){j.Aq$.isDefined(this._backgroundTransform)&&(this._backgroundTransform.widthDelta=this.minWidth)}updateNonNumberedNotificationBadge(k){this.GameObject.active=k,this._mode=F.Text,this._textToUpdate.text=(0,H.k)(this._badgeText),this.updateEnabled()}updateEmptyNotificationBadge(k){this.GameObject.active=k,this._mode=F.Empty,this._textToUpdate.text="",this.updateEnabled()}updateEnabled(){if(j.Aq$.isDefined(this._iconComponent)&&j.Aq$.isDefined(this._textToUpdate))switch(this._mode){case F.Icon:this.updateBackgroundWidthToIcon(),this._iconComponent.GameObject.active=!0,this._textToUpdate.GameObject.active=!1;break;case F.Numeric:case F.Text:this.updateBackgroundWidthToText(),this._iconComponent.GameObject.active=!1,this._textToUpdate.GameObject.active=!0;break;case F.Empty:this.updateBackgroundWidthToText(),this._iconComponent.GameObject.active=!1,this._textToUpdate.GameObject.active=!1}}};(0,G.Cg)([(0,j.gfw)(F),(0,j.YLv)("The mode the badge should be in."),(0,G.Sn)("design:type",String),(0,G.Sn)("design:paramtypes",[String])],W.prototype,"mode",null),(0,G.Cg)([(0,j.gfw)(V.XN),(0,j.YLv)("The icon to display on the badge."),(0,j.okD)((k=>k.mode===F.Icon)),(0,G.Sn)("design:type",String),(0,G.Sn)("design:paramtypes",[String])],W.prototype,"icon",null),(0,G.Cg)([(0,j.W_S)(),(0,j.okD)((k=>k.mode!==F.Icon)),(0,G.Sn)("design:type",String)],W.prototype,"_badgeText",void 0),(0,G.Cg)([(0,j.g11)(),(0,j.okD)((k=>k.mode===F.Numeric)),(0,G.Sn)("design:type",Number)],W.prototype,"_numberedMaxValue",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],W.prototype,"minWidth",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,j.Lr6)(10),(0,G.Sn)("design:type",j.vYh)],W.prototype,"_iconComponent",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,j.Lr6)(10),(0,G.Sn)("design:type",j.EYj)],W.prototype,"_textToUpdate",void 0),(0,G.Cg)([(0,j.MnK)(j.XVE),(0,j.Lr6)(10),(0,G.Sn)("design:type",j.XVE)],W.prototype,"_backgroundTransform",void 0),W=(0,G.Cg)([(0,j.EVk)("NotificationBadge")],W)},33744:(k,B,U)=>{"use strict";U.d(B,{N:()=>H});var F=U(8674),G=U(62459),j=U(68910),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this._inputOverlays=[],this._inputEnabledWorldPositionX=0,this._inputEnabledWorldPositionY=0,this._inputEnabledWidth=0,this._inputEnabledHeight=0}create(){super.create(),this._inputEnabledAreaTransform?this.updateEnabledAreaByTransform():this._inputEnabledWidth>0&&this._inputEnabledHeight>0&&this.updateEnabledAreaByValue()}setEnabledAreaByTransform(k){this._inputEnabledAreaTransform=k,this.updateEnabledAreaByTransform()}updateEnabledAreaByTransform(){const k=this._inputEnabledAreaTransform.rectTransformDimensions.width,B=this._inputEnabledAreaTransform.rectTransformDimensions.height,U=this._inputEnabledAreaTransform.worldPosition.x-this._inputEnabledAreaTransform.pivot.x*k,F=this._inputEnabledAreaTransform.worldPosition.y-this._inputEnabledAreaTransform.pivot.y*B;this.setEnabledAreaByValue(new j.Point(U,F),new G.or0(k,B))}setEnabledAreaByValue(k,B){this._inputEnabledWorldPositionX=k.x,this._inputEnabledWorldPositionY=k.y,this._inputEnabledWidth=B.width,this._inputEnabledHeight=B.height,this.updateEnabledAreaByValue()}enableFullScreen(){this.setEnabledAreaByValue(new j.Point(0,0),new G.or0(1280,720))}updateEnabledAreaByValue(){const k=this._inputEnabledWorldPositionX+this._inputEnabledWidth,B=this._inputEnabledWorldPositionY+this._inputEnabledHeight;this._inputOverlays[0].setSizeDelta(G.Zt2.DEFAULT_WIDTH,this._inputEnabledWorldPositionY),this._inputOverlays[1].setSizeDelta(this._inputEnabledWorldPositionX,G.Zt2.DEFAULT_HEIGHT),this._inputOverlays[2].setSizeDelta(G.Zt2.DEFAULT_WIDTH-k,G.Zt2.DEFAULT_HEIGHT),this._inputOverlays[3].setSizeDelta(G.Zt2.DEFAULT_WIDTH,G.Zt2.DEFAULT_HEIGHT-B),this._inputOverlays[0].localMatrix,this._inputOverlays[1].localMatrix,this._inputOverlays[2].localMatrix,this._inputOverlays[3].localMatrix,this._inputOverlays[0].worldPosition=new j.Point(0,0),this._inputOverlays[1].worldPosition=new j.Point(0,0),this._inputOverlays[2].worldPosition=new j.Point(k,0),this._inputOverlays[3].worldPosition=new j.Point(0,B)}};(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",Array)],H.prototype,"_inputOverlays",void 0),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],H.prototype,"_inputEnabledAreaTransform",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_inputEnabledWorldPositionX",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_inputEnabledWorldPositionY",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_inputEnabledWidth",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_inputEnabledHeight",void 0),H=(0,F.Cg)([(0,G.EVk)("OverlayInputBlocking",$.Y.ui)],H)},87821:(k,B,U)=>{"use strict";U.d(B,{o:()=>et});var F,G=U(8674),j=U(62459),$=U(17446),H=U(35120),V=U(77938),W=U(95946),q=U(87239),K=U(37773),z=U(34578),Y=U(97317),Q=U(72772),X=U(28152),Z=U(26932),J=U(26004),tt=U(22023);let et=F=class extends Z.z{constructor(){super(...arguments),this._elementMap={[W.a.Fire]:"PET_RESCUE_ELEMENT_FIRE",[W.a.Plant]:"PET_RESCUE_ELEMENT_PLANT",[W.a.Water]:"PET_RESCUE_ELEMENT_WATER",[W.a.Ice]:"PET_RESCUE_ELEMENT_ICE",[W.a.Storm]:"PET_RESCUE_ELEMENT_STORM",[W.a.Astral]:"PET_RESCUE_ELEMENT_ASTRAL",[W.a.Shadow]:"PET_RESCUE_ELEMENT_SHADOW",[W.a.Physical]:"PET_RESCUE_ELEMENT_PHYSICAL"},this._rarityMap={[$.E.Common]:"PET_RESCUE_RARITY_COMMON",[$.E.Uncommon]:"PET_RESCUE_RARITY_UNCOMMON",[$.E.Rare]:"PET_RESCUE_RARITY_RARE",[$.E.Heroic]:"PET_RESCUE_RARITY_HEROIC",[$.E.Legendary]:"PET_RESCUE_RARITY_LEGENDARY"}}get petLevel(){return this._petSchema.level}get petName(){var k;return null!==(k=this._petSchema.nickname)&&void 0!==k?k:this._petSchema.name}bindContext(){var k,B;const U=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player,G=this.getPetDataAsset(),$=tt.P8.isPetOnTeam(this._petSchema),V=$&&U.getChargedLevel()>0?K.e.getActivePlayerChargedLevelTier():Y.Bv.NO_CHARGE,W=U.getGrowthBattleStats(this._petSchema),Q=null!==(B=null===(k=G.data)||void 0===k?void 0:k.affinity)&&void 0!==B?B:"",X=G.data.rarity;let Z=this._elementMap[Q],et=this._rarityMap[X];Z||(Z="PET_RESCUE_ELEMENT_PHYSICAL",j.VyI.log(`[${this.getProviderName()}] Element type from pet data is not valid - defaulting to Physical element`,j.$bb.Error)),this._context.Container.rebind(Z).toConstantValue(!0),et||(et="PET_RESCUE_RARITY_HEROIC",j.VyI.log(`[${this.getProviderName()}] Rarity type from pet data is not valid - defaulting to Heroic rarity`,j.$bb.Error)),this._context.Container.rebind(et).toConstantValue(!0),this._context.Container.rebind("PET_CARD_ELEMENT_NAME").toConstantValue(q.x.getElementDisplayName(Q)),this._context.Container.rebind("PET_RESCUE_NAME").toConstantValue(this.petName),this._context.Container.rebind("PET_RESCUE_LEVEL").toConstantValue(this.petLevel.toString()),this._context.Container.rebind("PET_RESCUE_HEALTH").toConstantValue(W.hp.toString()),this._context.Container.rebind("PET_RESCUE_POWER").toConstantValue(W.power.toString()),this._context.Container.rebind("PET_RESCUE_DEFENCE").toConstantValue(W.defence.toString()),this._context.Container.rebind("PET_RESCUE_SPEED").toConstantValue(W.speed.toString()),this._context.Container.rebind("PET_RESCUE_INITIATIVE").toConstantValue(W.initiative.toString()),this._context.Container.rebind("PET_CARD_LABEL_COLOR").toConstantValue(F.TEXT_COLOR_MAP[X]),this._context.Container.rebind(z.m.ChargedLevelAnimationTier).toConstantValue(V),this._context.Container.rebind("PET_CARD_STAT_TEXT_COLOR").toConstantValue($&&U.getChargedLevel()>0?F.CHARGED_STAT_COLOR_MAP[X]:F.TEXT_COLOR_MAP[X]),this.resolvePetGear().finally((()=>{var k;null===(k=this.gameObject)||void 0===k||k.findComponentsInChildren(J.B).forEach((k=>k.consume()))}))}resolvePetGear(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=yield Q.I.getStatsOfEquippedGearForPet(this._petSchema.gear);this._context.Container.rebind("PET_RESCUE_GEAR_HEALTH").toConstantValue(k.hp>0?`+${k.hp}`:""),this._context.Container.rebind("PET_RESCUE_GEAR_POWER").toConstantValue(k.power>0?`+${k.power}`:""),this._context.Container.rebind("PET_RESCUE_GEAR_DEFENCE").toConstantValue(k.defence>0?`+${k.defence}`:""),this._context.Container.rebind("PET_RESCUE_GEAR_SPEED").toConstantValue(k.speed>0?`+${k.speed}`:""),this._context.Container.rebind("PET_RESCUE_GEAR_INITIATIVE").toConstantValue(k.initiative>0?`+${k.initiative}`:"")}))}rebindContext(){this.bindContext()}unbindContext(){}getPetDataAsset(){return V.t.getItem("pet",this._petSchema.ID)}getProviderName(){return"PetCardDataProvider"}};et.TEXT_COLOR_MAP={[$.E.Common]:"#363636",[$.E.Uncommon]:"#363636",[$.E.Rare]:"#FFFFFF",[$.E.Heroic]:"#FFFFFF",[$.E.Legendary]:"#363636"},et.CHARGED_STAT_COLOR_MAP={[$.E.Common]:"#6BE04C",[$.E.Uncommon]:"#6BE04C",[$.E.Rare]:"#6BE04C",[$.E.Heroic]:"#6BE04C",[$.E.Legendary]:"#6BE04C"},(0,G.Cg)([(0,j.Cdj)("PET_RESCUE_CREATURE_DATA",!1),(0,G.Sn)("design:type",Object)],et.prototype,"_petSchema",void 0),et=F=(0,G.Cg)([(0,j.EVk)("PetCardDataProvider",X.Y.uiPet)],et)},93171:(k,B,U)=>{"use strict";U.d(B,{a:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.uAl{constructor(){super(...arguments),this.fillSpeedMS=500,this.reverse=!1,this.onStart=new G.HN0,this.onComplete=new G.HN0,this.onProgress=new G.HN0,this.onToggleAnchors=new G.HN0}get fillValue(){return this._fillValue}set fillValue(k){this._fillValue=Math.min(Math.max(k,0),1)}get fillTransform(){return this._fillTransform}create(){var k,B;super.create();const U=null===(B=null===(k=this._fillGraphic)||void 0===k?void 0:k.GameObject)||void 0===B?void 0:B.transform;U&&U instanceof G.XVE&&(this._fillTransform=U),this.setValue(this._fillValue)}setValue(k){if(!this.GameObject)return;const B=this._fillValue;this._fillValue=Math.min(Math.max(k,0),1),this._fillTransform&&(this.reverse?(this._fillTransform.setAnchorMin(1-this._fillValue,this._fillTransform.anchorMin.y),this._fillTransform.setAnchorMax(1,this._fillTransform.anchorMax.y)):(this._fillTransform.setAnchorMin(0,this._fillTransform.anchorMin.y),this._fillTransform.setAnchorMax(this._fillValue,this._fillTransform.anchorMax.y))),this.onProgress.dispatch(this,B,this._fillValue),1===this._fillValue&&this.toggleAnchorContainers(!1)}tweenValue(k,B=0){var U;null===(U=this._tween)||void 0===U||U.stop().remove();const F=Math.min(Math.max(k,0),1),$=this._fillValue,H={percentage:this._fillValue};this._tween=j.q.instance.game.add.tween(H,H),this._tween.to({percentage:k},this.fillSpeedMS,G.GS3.Linear.None,!1).delay(B).onUpdateCallback((()=>{this.setValue(H.percentage)})),this._tween.onTweenComplete.addOnce((()=>{this.setValue(F),this._tween.stop().remove(),this._tween=null,this.onComplete.dispatch(this,$,F)})),this._tween.onStart.addOnce((()=>{this.onStart.dispatch(this,$,F)})),this._tween.start(),F!==H.percentage&&this.toggleAnchorContainers(!0)}toggleAnchorContainers(k){this.onToggleAnchors.dispatch(k)}setFillColor(k){this._fillGraphic&&(this._fillGraphic.tint="number"==typeof k?k:G.Q1f.hexToColor(k).color)}setInnerColor(k){this._innerGraphic&&(this._innerGraphic.tint="number"==typeof k?k:G.Q1f.hexToColor(k).color)}setOuterColor(k){this._outerGraphic&&(this._outerGraphic.tint="number"==typeof k?k:G.Q1f.hexToColor(k).color)}destroy(){this.onToggleAnchors.dispose(),this.onProgress.dispose(),this.onComplete.dispose(),this.onStart.dispose(),j.q.instance.game.tweens.remove(this._tween),super.destroy()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"_fillValue",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],H.prototype,"fillSpeedMS",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"reverse",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],H.prototype,"_fillGraphic",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],H.prototype,"_outerGraphic",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],H.prototype,"_innerGraphic",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onStart",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onComplete",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onProgress",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onToggleAnchors",void 0),H=(0,F.Cg)([(0,G.EVk)("ProgressBarComponent",$.Y.ui)],H)},34958:(k,B,U)=>{"use strict";U.d(B,{P:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(93171);let H=class extends $.a{tweenValue(k){this._tweenFrom=this.fillValue,this._tweenTo=Math.min(Math.max(k,0),1),this._tweenStartTime=Date.now(),this.onStart.dispatch(this,this._tweenFrom,this._tweenTo),this._tweenFrom!==this._tweenTo&&this.toggleAnchorContainers(!0)}update(){if(this._tweenStartTime){const k=Math.min(1,(Date.now()-this._tweenStartTime)/this.fillSpeedMS),B=this._tweenFrom+(this._tweenTo-this._tweenFrom)*k;this.setValue(B),k>=1&&(this._tweenStartTime=null,this.onComplete.dispatch(this,B,B))}super.update()}};H=(0,F.Cg)([(0,G.EVk)("RealTimeProgressBar",j.Y.ui)],H)},12408:(k,B,U)=>{"use strict";U.d(B,{Z:()=>q});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(68152),V=U(90351),W=U(95865);let q=class extends W.A{constructor(){super(...arguments),this._rotationDurationMS=1,this._rotationCount=-1,this._rotationDegrees=360}startTween(){if(super.startTween(),!this._tween){const k=this._targetGameObject.transform;(0,H.v)(!!k,"Cannot be attached to a GameObject without a transform");const B={value:k.localRotation};this._tween=j.q.instance.game.add.tween(B,this).to({value:this._rotationDegrees},this._rotationDurationMS,V.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._rotationCount,this._yoyo),this._tween.onUpdate.add((()=>{k.setRotation(B.value)})),this._tween.onTweenComplete.addOnce((()=>{k.setRotation(0),this.destroyTween(),this.onComplete.dispatch()}))}}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_rotationDurationMS",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_rotationCount",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_rotationDegrees",void 0),q=(0,F.Cg)([(0,G.EVk)("RotateTransform",$.Y.motion)],q)},46459:(k,B,U)=>{"use strict";U.d(B,{_:()=>W});var F=U(8674),G=U(62459),j=U(28152),$=U(68152),H=U(90351),V=U(95865);let W=class extends V.A{constructor(){super(...arguments),this._durationMS=1,this._repeatCount=-1,this._xScaleFinal=1,this._yScaleFinal=1}startTween(){if(super.startTween(),!this._tween){const k=this._targetGameObject.transform;(0,$.v)(!!k,"Cannot be attached to a GameObject without a transform");const B={x:k.localScale.x,y:k.localScale.y};this._tween=G.W$e.instance.game.add.tween(B,this).to({x:this._xScaleFinal,y:this._yScaleFinal},this._durationMS,H.K.getEasingFunctionFromEnum(this._easing),!0,this._tweenDelay,this._repeatCount,this._yoyo),this._tween.onUpdate.add((()=>{k.setScale(B.x,B.y)})),this._tween.onTweenComplete.addOnce((()=>{this.destroyTween(),this.onComplete.dispatch()}))}}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_durationMS",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_repeatCount",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_xScaleFinal",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_yScaleFinal",void 0),W=(0,F.Cg)([(0,G.EVk)("ScaleTransform",j.Y.motion)],W)},41365:(k,B,U)=>{"use strict";U.d(B,{Q:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(5269),H=U(68239);let V=class extends H.W{constructor(){super(...arguments),this._start=0,this._pressed=!1,this.direction=$.H.Vertical,this.nib=null,this._scrollView=null,this._rectTransform=null}get start(){return this._start}get pressed(){return this._pressed}set horizontal(k){this.direction=k?$.H.Horizontal:$.H.Vertical}set scrollView(k){this._scrollView=k}get RectTransform(){return this._rectTransform}create(){super.create(),j.q.instance.game.input.addMoveCallback(this.moveNib,this),this._rectTransform=this.GameObject.findComponent(G.XVE)}onDown(k,B){this._pressed=!0,this._start=this.direction===$.H.Vertical?B.y:B.x}onUp(k,B){this._pressed=!1}moveNib(k,B,U){var F,G;if(this._pressed){const k=this.direction===$.H.Vertical?U-this._start:B-this._start;if(this._start=this.direction===$.H.Vertical?U:B,this.direction===$.H.Vertical){this.nib.posY+=k;const B=this.minNibY(),U=this.maxNibY();null===(F=this._scrollView)||void 0===F||F.scrollBarListener.dispatch(1-(this.nib.posY-B)/(U-B),this.direction)}else{this.nib.posX+=k;const B=this.minNibX(),U=this.maxNibX();null===(G=this._scrollView)||void 0===G||G.scrollBarListener.dispatch(1-(this.nib.posX-B)/(U-B),this.direction)}this.limitMovement()}}limitMovement(){if(this.direction===$.H.Vertical){const k=this.maxNibY(),B=this.minNibY();this.nib.posYk&&(this.nib.posY=k)}else{const k=this.maxNibX(),B=this.minNibX();this.nib.posXk&&(this.nib.posX=k)}}scrollToPercent(k){this.direction===$.H.Vertical?this.nib.posY=G.cj9.linear(this.maxNibY(),this.minNibY(),k):this.nib.posX=G.cj9.linear(this.minNibX(),this.maxNibX(),k),this.limitMovement()}maxNibY(){return this._rectTransform.fullHeight/2-this.nib.pivot.y*this.nib.fullHeight}maxNibX(){return this._rectTransform.fullWidth/2+this.nib.pivot.x*this.nib.fullWidth}minNibY(){return-this._rectTransform.fullHeight/2+this.nib.pivot.y*this.nib.fullHeight}minNibX(){return-this._rectTransform.fullWidth/2+this.nib.pivot.x*this.nib.fullWidth}destroy(){j.q.instance.game.input.deleteMoveCallback(this.moveNib,this),super.destroy()}};(0,F.Cg)([(0,G.vkK)(),(0,G.Lr6)(0),(0,G.nKb)("isHorizontal"),(0,F.Sn)("design:type",Boolean),(0,F.Sn)("design:paramtypes",[Boolean])],V.prototype,"horizontal",null),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],V.prototype,"nib",void 0),V=(0,F.Cg)([(0,G.EVk)("ScrollBarRectTransform")],V)},2385:(k,B,U)=>{"use strict";U.d(B,{I:()=>K});var F,G=U(8674),j=U(62459),$=U(35120),H=U(5269),V=U(28152),W=U(68239),q=U(41365);let K=F=class extends W.W{constructor(){super(...arguments),this._direction=0,this._isKinematic=!0,this._verticalScrollBar=null,this._horizontalScrollBar=null,this._contentView=null,this._wheelStep=40,this._wheelOnOver=!1,this._allowMouseWheel=!0,this._allowTouch=!0,this._scrollBarListener=new j.HN0,this._pressedDown=!1,this._timestamp=0,this._startX=0,this._startY=0,this._velocityX=0,this._velocityY=0,this._velocityWheel=0,this._rectTransform=null}get direction(){return this._direction}set vertical(k){this._direction=k?this._direction|H.H.Vertical:this._direction&H.H.Vertical}set horizontal(k){this._direction=k?this._direction|H.H.Horizontal:this._direction&H.H.Horizontal}get scrollBarListener(){return this._scrollBarListener}create(){super.create(),this._scrollBarListener.add(this.scrollToPercent.bind(this),this),this._allowTouch&&$.q.instance.game.input.addMoveCallback(this.moveCanvas,this),this._allowMouseWheel&&(this._mouseWheelCallback=this.mouseWheel.bind(this),$.q.instance.game.input.mouse.addMouseWheelCallback(this._mouseWheelCallback)),this._rectTransform=this.GameObject.findComponent(j.XVE),this._verticalScrollBar&&(this._verticalScrollBar.scrollView=this)}update(){super.update(),this._isKinematic&&(this._direction&H.H.Vertical)===H.H.Vertical&&Math.abs(this._velocityWheel)>F.VELOCITY_THRESHOLD&&(this._contentView.posY+=this._velocityWheel,this.limitMovement(),this._velocityWheel*=F.DECELERATION)}onDown(k,B){this._startX=B.x,this._startY=B.y,this._pressedDown=!0,this._timestamp=Date.now(),this._velocityY=this._velocityX=0}onUp(k,B){this._pressedDown=!1}moveCanvas(k,B,U){if(this._pressedDown){const k=Date.now(),G=k-this._timestamp;this._timestamp=k;let j=0;(this._direction&H.H.Horizontal)===H.H.Horizontal&&(j=B-this._startX,this._startX=B,this._velocityX=j*F.DISPLACEMENT/(G+1)*F.INITIAL_ACCELERATION+this._velocityX*F.FINAL_ACCELERATION,this._contentView.posX+=j,this.limitMovement()),(this._direction&H.H.Vertical)===H.H.Vertical&&(j=U-this._startY,this._startY=U,this._velocityY=j*F.DISPLACEMENT/(G+1)*F.INITIAL_ACCELERATION+this._velocityY*F.FINAL_ACCELERATION,this._contentView.posY+=j,this.limitMovement())}}mouseWheel(k){k.preventDefault();const B=this.getCollisionBox();if(!this._wheelOnOver||null!==B.transform&&j.M_G.containsRaw(B.getGlobalPosition().x,B.getGlobalPosition().y,B.width,B.height,$.q.instance.game.input.activePointer.x,$.q.instance.game.input.activePointer.y)){const k=120*$.q.instance.game.input.mouse.wheelDelta/this._wheelStep;this._isKinematic?this._velocityWheel+=k:(this._contentView.posY+=k,this.limitMovement())}}getTopLimit(){if(.5===this._contentView.anchorMin.y&&.5===this._contentView.anchorMax.y){const k=-this._rectTransform.fullHeight/2+this._contentView.pivot.y*this._contentView.fullHeight;return this._contentView.fullHeight>this._rectTransform.fullHeight?k-(this._contentView.fullHeight-this._rectTransform.fullHeight):k}return 0===this._contentView.anchorMin.y&&0===this._contentView.anchorMax.y?Math.min(this._rectTransform.fullHeight-this._contentView.fullHeight,0):(j.VyI.log(`Unexpected value for content anchor y values (min ${this._contentView.anchorMin.y} and max ${this._contentView.anchorMax.y}) they should both be 0 or 0.5`,j.$bb.Error),0)}getBottomLimit(){if(.5===this._contentView.anchorMin.y&&.5===this._contentView.anchorMax.y){const k=this._rectTransform.fullHeight/2-(1-this._contentView.pivot.y)*this._contentView.fullHeight;return this._contentView.fullHeight>this._rectTransform.fullHeight?k+(this._contentView.fullHeight-this._rectTransform.fullHeight):k}return 0===this._contentView.anchorMin.y&&0===this._contentView.anchorMax.y||j.VyI.log(`Unexpected value for content anchor y values (min ${this._contentView.anchorMin.y} and max ${this._contentView.anchorMax.y}) they should both be 0 or 0.5`,j.$bb.Error),0}getRightLimit(){if(.5===this._contentView.anchorMin.x&&.5===this._contentView.anchorMax.x){const k=this._rectTransform.fullWidth/2-this._contentView.pivot.x*this._contentView.fullWidth;return this._contentView.fullWidth>this._rectTransform.fullWidth?k+(this._contentView.fullWidth-this._rectTransform.fullWidth):k}return 0===this._contentView.anchorMin.x&&0===this._contentView.anchorMax.x||j.VyI.log(`Unexpected value for content anchor x values (min ${this._contentView.anchorMin.x} and max ${this._contentView.anchorMax.x}) they should both be 0 or 0.5`,j.$bb.Error),0}getLeftLimit(){if(.5===this._contentView.anchorMin.x&&.5===this._contentView.anchorMax.x){const k=-this._rectTransform.fullWidth/2+this._contentView.pivot.x*this._contentView.fullWidth;return this._contentView.fullWidth>this._rectTransform.fullWidth?k-(this._contentView.fullWidth-this._rectTransform.fullWidth):k}return 0===this._contentView.anchorMin.x&&0===this._contentView.anchorMax.x?this._rectTransform.fullWidth-this._contentView.fullWidth:(j.VyI.log(`Unexpected value for content anchor x values (min ${this._contentView.anchorMin.x} and max ${this._contentView.anchorMax.x}) they should both be 0 or 0.5`,j.$bb.Error),0)}limitMovement(){if((this._direction&H.H.Vertical)===H.H.Vertical){const k=this.getTopLimit(),B=this.getBottomLimit();if(this._contentView.posY>B&&(this._contentView.posY=B),this._contentView.posYk?(this._contentView.posY-k)/(B-k):100,this._verticalScrollBar.scrollToPercent(U)}}if((this._direction&H.H.Horizontal)===H.H.Horizontal){const k=this.getRightLimit(),B=this.getLeftLimit();if(this._contentView.posX>k&&(this._contentView.posX=k),this._contentView.posX{"use strict";U.d(B,{S:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(97518);let H=class extends G.uAl{run(k){k.findComponent($.R).setLocalizationKey(this.key)}};(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"key",void 0),H=(0,F.Cg)([(0,G.EVk)("SetLocalizedText",j.Y.uiDialog)],H)},19633:(k,B,U)=>{"use strict";U.d(B,{d:()=>z,S:()=>Y});var F=U(8674),G=U(62459),j=U(68910),$=U(35120),H=U(93690),V=U(28152),W=U(31125),q=U(15284);let K=class extends G.zFe{constructor(){super(...arguments),this.length=.5,this.overrideTransform=void 0,this.updatePosition=!1,this.transitions={[G.ZIW.Default]:{tint:16777215,alpha:1,position:{x:0,y:0},scale:{x:1,y:1},imageID:"d97071f6-18c9-4ca7-8c21-c9af9751af39"},[G.ZIW.Down]:{tint:16777215,alpha:1,position:{x:0,y:0},scale:{x:1,y:1},imageID:"d10ec19a-5675-4176-b604-2682fd5a46c4"},[G.ZIW.Over]:{tint:16777215,alpha:1,position:{x:0,y:0},scale:{x:1,y:1},imageID:"39aeccae-f28c-4520-9135-27c855b39566"},[G.ZIW.Disabled]:{tint:16777215,alpha:1,position:{x:0,y:0},scale:{x:1,y:1},imageID:"6d5b86f3-7e04-43e3-ba99-9ec8e19178b9"},[G.ZIW.Focus]:{tint:16777215,alpha:1,position:{x:0,y:0},scale:{x:1,y:1},imageID:"d97071f6-18c9-4ca7-8c21-c9af9751af39"}},this._defaultRenderComponent=null,this._tween=null,this._defaultPosition=new G.I9Y(0,0)}create(){var k,B,U,F,j,$,H,V,W,q;this._targetTransform=null!==(B=null===(k=this.overrideTransform)||void 0===k?void 0:k.transform)&&void 0!==B?B:this.gameObject.transform,this._defaultPosition=new G.I9Y(this._targetTransform.localPosition.x,this._targetTransform.localPosition.y),super.create(),this.onTweenUpdate=this.onTweenUpdate.bind(this),this._targetState=this.transitions[G.ZIW.Default],this._currentState={alpha:this._targetState.alpha,tint:`#${this._targetState.tint.toString(16)}`,scaleX:null!==(F=null===(U=this._targetState.scale)||void 0===U?void 0:U.x)&&void 0!==F?F:1,scaleY:null!==($=null===(j=this._targetState.scale)||void 0===j?void 0:j.y)&&void 0!==$?$:1,positionX:null!==(V=null===(H=this._targetState.position)||void 0===H?void 0:H.x)&&void 0!==V?V:0,positionY:null!==(q=null===(W=this._targetState.position)||void 0===W?void 0:W.y)&&void 0!==q?q:0,imageID:this._targetState.imageID},this._defaultRenderComponent instanceof G.vYh?(this._updateImageFunction=this.updateGraphicImage,this._updateValuesFunction=this.updateGraphicValues):this._defaultRenderComponent instanceof G.CxD?(this._updateImageFunction=this.updateSlicePlaneGraphicImage,this._updateValuesFunction=this.updateSlicePlaneGraphicValues):this._defaultRenderComponent instanceof G.EYj?this._updateValuesFunction=this.updateTextValues:this._defaultRenderComponent instanceof G.pH6?this._updateValuesFunction=this.updateRoundedRectanglePrimitiveComponentValues:this._updateValuesFunction=this.updateRenderValues}destroy(){this._tween&&!this._tween.isDestroyed&&(this._tween.stop(),G.W$e.instance.game.tweens.remove(this._tween)),this._tween=null,super.destroy()}setState(k){var B,U,F,j,$,H,V,W,q,K,z;const Y=this.transitions[k];if(!Y)return void G.VyI.log(`No transition found for state: ${k}`,G.$bb.Warning);if(Y===this._targetState)return;this._targetTransform=null!==(U=null===(B=this.overrideTransform)||void 0===B?void 0:B.transform)&&void 0!==U?U:this.gameObject.transform;const Q=null!==(F=Y.imageID)&&void 0!==F?F:this.transitions[G.ZIW.Default].imageID;this.updateImageID(Q),this._targetState=Y;const X={};X.alpha=Y.alpha,X.tint=`#${Y.tint.toString(16)}`,X.scaleX=null!==($=null===(j=Y.scale)||void 0===j?void 0:j.x)&&void 0!==$?$:1,X.scaleY=null!==(V=null===(H=Y.scale)||void 0===H?void 0:H.y)&&void 0!==V?V:1,X.positionX=null!==(q=null===(W=Y.position)||void 0===W?void 0:W.x)&&void 0!==q?q:0,X.positionY=null!==(z=null===(K=Y.position)||void 0===K?void 0:K.y)&&void 0!==z?z:0,this._tween&&!this._tween.isDestroyed&&(this._tween.stop(),G.W$e.instance.game.tweens.remove(this._tween)),this._tween=G.W$e.instance.game.tweens.create(this._currentState,this,!0),this._tween.onUpdate.add(this.onTweenUpdate,this),this._tween.to(X,1e3*this.length,G.GS3.Sinusoidal.Out),this._tween.start()}onTweenUpdate(){if(!this._currentState)return;let k=16777215;if(this._currentState.tint.startsWith("rgba")){const B=this._currentState.tint.match(/\d+/g);k=(parseInt(B[0])<<16)+(parseInt(B[1])<<8)+parseInt(B[2])}else k=parseInt(this._currentState.tint.replace("#","0x"));this.applyTransitionValues(this._currentState,Math.round(k))}updateImageID(k){var B;null===(B=this._updateImageFunction)||void 0===B||B.call(this,k)}applyTransitionValues(k,B){var U;this._targetTransform.setScale(k.scaleX,k.scaleY),this.updatePosition&&this._targetTransform.setPosition(this._defaultPosition.x+k.positionX,this._defaultPosition.y+k.positionY),null===(U=this._updateValuesFunction)||void 0===U||U.call(this,B,k.alpha)}updateGraphicValues(k,B){const U=this._defaultRenderComponent;(null==U?void 0:U.isValid())&&(U.tint=k,U.setAlpha(B))}updateSlicePlaneGraphicValues(k,B){const U=this._defaultRenderComponent;U.slicedImage.tint=k,U.slicedImage.alpha=B}updateTextValues(k,B){const U=this._defaultRenderComponent;U.tint=k,U.alpha=B}updateRoundedRectanglePrimitiveComponentValues(k,B){const U=this._defaultRenderComponent;U.setColor(G.TZp.decimalToHex(k)),U.alpha=B}updateRenderValues(k,B){const U=this._defaultRenderComponent.getRootContainer();U&&(U.alpha=B)}updateGraphicImage(k){if((null==k?void 0:k.length)>0){const B=this._defaultRenderComponent,U=G.W$e.instance.game.cache.getTexture(k);U&&(null==B?void 0:B.isValid())&&(B.image.texture=U)}}updateSlicePlaneGraphicImage(k){var B;if((null==k?void 0:k.length)>0){const U=this._defaultRenderComponent;if(!(null===(B=null==U?void 0:U.slicedImage)||void 0===B?void 0:B.shader))return;U.setSlicedImage(k)}}};var z;(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],K.prototype,"length",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],K.prototype,"overrideTransform",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],K.prototype,"updatePosition",void 0),(0,F.Cg)([(0,G.npj)(),(0,F.Sn)("design:type",Object)],K.prototype,"transitions",void 0),(0,F.Cg)([(0,G.Pqz)(G.y4o),(0,F.Sn)("design:type",G.y4o)],K.prototype,"_defaultRenderComponent",void 0),K=(0,F.Cg)([(0,G.EVk)("TweenedTransitions",V.Y.transition)],K),function(k){k[k.NONE=0]="NONE",k[k.LEFT=1]="LEFT",k[k.RIGHT=2]="RIGHT",k[k.ICON_ONLY=3]="ICON_ONLY"}(z||(z={}));let Y=class extends G.Eci{constructor(){super(),this.text="BUTTON_OKAY_CAPITAL",this.type=W.vX.Sapphire,this.size=W.YT.Medium,this.useMaxWidth=!1,this.maxWidth=0,this.iconPosition=z.NONE,this.icon=W.XN.Left,this.customIconGuid="",this.customIconSize=new G.I9Y(W.Se[W.YT.Medium].iconSize),this.customIconTinting=!0,this.suppressSound=!1,this._buttonWidth=0,this.fitToContents=!0,this.disableWhileAwaitingListeners=!0}create(){super.create(),this.localizeButtonText()}postCreate(){var k;super.postCreate(),this.populateTextComponents(),this.populateIconComponents(),this.renderComponent=null!==(k=this.gameObject.findComponentInChildren(G.y4o))&&void 0!==k?k:this.gameObject.addComponent(G.jsv),this._backgroundComponent=this.gameObject.findChildByName("Button").findComponent(G.vYh),this._tweenedTransition=this.gameObject.findComponentInChildren(K),this.regenerateButton(),this.setButtonEnabled(this._inputEnabled),this.useHandCursor=this._inputEnabled,this.onInputEnabledChanged.add((()=>{this.setButtonEnabled(this._inputEnabled),this.useHandCursor=this._inputEnabled}));const B=this.renderComponent.getRootContainer();if(B){H.p.patchPhaserInteraction(B,!0);for(const k of B.children)H.p.patchPhaserInteraction(k,!0)}this.onClick.add((()=>{this.suppressSound||(this._inputEnabled?$.q.instance.prodigy.audio.playSFX(18,"pop"):$.q.instance.prodigy.audio.playSFX(67,"button-disabled"))}),this,10)}destroy(){super.destroy()}updateIcon(k){if(this.icon===W.XN.Custom)return this._iconComponent.updateAsset(this.customIconGuid),void this._iconTransform.setSizeDelta(this.customIconSize.x,this.customIconSize.y);const B=this.icon.toString();B&&this.icon!==W.XN.Unspecified&&(this._iconComponent.updateAsset(k.atlasGuid,B),this._iconTransform.setSizeDelta(k.iconSize,k.iconSize))}getIconSize(k){return this.icon===W.XN.Custom?this.customIconSize:this.iconPosition===z.NONE?new G.I9Y(0,0):new G.I9Y(k.iconSize,k.iconSize)}updateButton(){const k=W.jN[this.type];G.W$e.instance.game.cache.getTexture(k.defaultGuid)?this.setBackgroundImages(k):this._assetLoader.loadAssets([k.defaultGuid,k.activeGuid,k.hoverGuid,k.disabledGuid]).then((()=>{this.setBackgroundImages(k)})).catch((k=>{G.VyI.log(`[StandardButton] Failed to load button textures for ${this.type} - ${this.size}`,G.$bb.Error)}))}setBackgroundImages(k){var B;this._tweenedTransition&&(this._tweenedTransition.transitions[G.ZIW.Default].imageID=k.defaultGuid,this._tweenedTransition.transitions[G.ZIW.Over].imageID=k.hoverGuid,this._tweenedTransition.transitions[G.ZIW.Down].imageID=k.activeGuid,this._tweenedTransition.transitions[G.ZIW.Disabled].imageID=k.disabledGuid);const U=this.inputEnabled?k.defaultGuid:k.disabledGuid;null===(B=this._backgroundComponent)||void 0===B||B.updateAsset(U)}get buttonSizeSpecs(){return W.Se[this.size]}get buttonTypeSpecs(){return W.jN[this.type]}regenerateButton(){if(!this._textComponent||!this._iconComponent)return;this._textComponent.text=this.text;const k=this.buttonSizeSpecs,B=this.buttonTypeSpecs;this.updateComponentsFromSpecs(k,B),this.iconPosition===z.ICON_ONLY?this.regenerateIconOnlyButton(k):this.regenerateButtonText(k),this.updateButton(),this.fitToContents&&(this._rectTransform.fullWidth=this._buttonWidth),this._rectTransform.fullHeight=k.height}populateTextComponents(){this._textComponent=this.gameObject.findComponentInChildren(G.EYj),this._textTransform=this._textComponent.GameObject.transform}populateIconComponents(){this._iconComponent=this.gameObject.findChildByName("Icon").findComponentInChildren(G.vYh),this._iconTransform=this._iconComponent.GameObject.transform}updateComponentsFromSpecs(k,B){this._textComponent.TextObject.style.fontFamily=k.fontFamily,this._textComponent.TextObject.style.fontSize=k.fontSize,this._textComponent.fontSize=k.fontSize,this._textComponent.TextObject.style.fill=B.textColor,this.icon!==W.XN.Custom||!0===this.customIconTinting?this._iconComponent.tint=B.textColor:this._iconComponent.tint=16777215}regenerateIconOnlyButton(k){this._buttonWidth=k.iconOnlyWidth,this._textComponent.GameObject.active=!1,this._iconComponent.GameObject.active=!0,this._iconTransform.posX=0,this._iconTransform.setSizeDelta(k.iconOnlySize,k.iconOnlySize),this.updateIcon(k)}regenerateButtonText(k){this._textComponent.GameObject.active=!0;const B=j.TextMetrics.measureText(this.text,this._textComponent.TextObject.style),U=Math.ceil(B.width),F=this.getIconSize(k),$=this.iconPosition!==z.NONE,H=($?F.x+k.padding:0)+2*k.margin,V=U+H;if(this.useMaxWidth&&this.maxWidth>0&&V>this.maxWidth){const B=this.maxWidth-H,F=B/U;this._textTransform.widthDelta=B,this._textComponent.fontSize=k.fontSize*F,this._buttonWidth=this.maxWidth}else this._textTransform.widthDelta=U,this._buttonWidth=U+2*k.margin,$&&(this._buttonWidth+=F.x+k.padding);if(this.iconPosition===z.NONE)this._textTransform.posX=0,this._iconComponent.GameObject.active=!1;else{this._iconComponent.GameObject.active=!0,this.updateIcon(k);const B=this._iconTransform.fullWidth;this.iconPosition===z.LEFT?(this._textTransform.posX=.5*(B+k.padding),this._iconTransform.posX=.5*-this._buttonWidth+(B/2+k.margin)):this.iconPosition===z.RIGHT&&(this._textTransform.posX=.5*-(B+k.padding),this._iconTransform.posX=.5*this._buttonWidth-(B/2+k.margin))}this.useMaxWidth?this._buttonWidth=G.cj9.clamp(this._buttonWidth,k.minWidth,this.maxWidth):this._buttonWidth=Math.max(k.minWidth,this._buttonWidth),this._textTransform.top=0,this._textTransform.bottom=0,this._textTransform.posY=-Math.abs(k.yOffset)}localizeButtonText(){var k;if(this.text)try{const k=this.getInjectedValue(G.$Bt.LocalizationService);if(!k)throw new Error("No localization service available");const B=k.getText(this.text);B&&B!==this.text&&(this.text=B)}catch(B){G.RQr.logError(B,`StandardButton Component on GameObject '${null===(k=this.GameObject)||void 0===k?void 0:k.name}' failed to localize text '${this.text}'`)}}setButtonText(k,B=!0){this.text=k,B&&this.localizeButtonText(),this.regenerateButton()}};(0,F.Cg)([(0,G.Cdj)(G.t5G.AssetLoader),(0,F.Sn)("design:type",Object)],Y.prototype,"_assetLoader",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],Y.prototype,"text",void 0),(0,F.Cg)([(0,G.gfw)(W.vX),(0,F.Sn)("design:type",String)],Y.prototype,"type",void 0),(0,F.Cg)([(0,G.gfw)(W.YT),(0,F.Sn)("design:type",String)],Y.prototype,"size",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"useMaxWidth",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Y.prototype,"maxWidth",void 0),(0,F.Cg)([(0,G.gfw)(z),(0,F.Sn)("design:type",Number)],Y.prototype,"iconPosition",void 0),(0,F.Cg)([(0,G.gfw)(W.XN),(0,F.Sn)("design:type",String)],Y.prototype,"icon",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],Y.prototype,"customIconGuid",void 0),(0,F.Cg)([(0,G._Hz)(),(0,F.Sn)("design:type",G.I9Y)],Y.prototype,"customIconSize",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"customIconTinting",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"suppressSound",void 0),(0,F.Cg)([(0,G.Pqz)(G.XVE),(0,F.Sn)("design:type",G.XVE)],Y.prototype,"_rectTransform",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],Y.prototype,"fitToContents",void 0),Y=(0,F.Cg)([(0,G.EVk)("StandardButton",V.Y.ui),(0,G.WR4)(q.T),(0,F.Sn)("design:paramtypes",[])],Y)},15284:(k,B,U)=>{"use strict";U.d(B,{T:()=>$});var F=U(62459),G=U(31125),j=U(19633);class $ extends F.$KW{constructor(){super(...arguments),this.validButtonText=["Not now","Leave","Later","Remove","Okay","Go","Start","Next","See","Done","Choose","Collect now"],this.bannedWords=["Cancel","Delete","Confirm","View","Finished","Select"],this.validators=[{validate:k=>{if(0===k.text.length&&k.iconPosition!==j.d.ICON_ONLY)return"Text must not be empty. Convert to icon only?"},fix:k=>{k.iconPosition=j.d.ICON_ONLY}},{validate:k=>{if(k.text.charAt(0)!==k.text.charAt(0).toUpperCase())return"Text should start with a capital letter. Convert to capital?"},fix:k=>{k.text=k.text.charAt(0).toUpperCase()+k.text.slice(1)}},{validate:k=>{if(!k.text.length||k.text===k.text.toUpperCase())return"Text should not be all caps. Convert to title case?"},fix:k=>{k.text=k.text.toLowerCase().replace(/\b\w/g,(k=>k.toUpperCase()))}},{validate:k=>{if(!this.validButtonText.includes(k.text))return"Text is not one of our standard texts. Click fix to see the confluence page for more info"},fix:k=>{window.open("https://prodigygame.atlassian.net/wiki/spaces/GD/pages/548634641/Buttons#Buttons-ButtonLanguage","_blank")}},{validate:k=>{if(this.bannedWords.includes(k.text))return`${k.text} is explicitly banned. Click fix to see the confluence page for more info`},fix:k=>{window.open("https://prodigygame.atlassian.net/wiki/spaces/GD/pages/548634641/Buttons#Buttons-ButtonLanguage","_blank")}}]}generate(k,B){const U=[this.getStandardButtonSettings(k,B)],G=this.getWarnings(k,B);G&&U.push(G);const j=this.getInputSettings(k,B),$=this.getInputButtonNodes(k,B);return j.elements.push(...$),U.push(j,this.getSignalTerminals(k,B)),F.XRp.createVertical(U)}getWarnings(k,B){const U=[];for(let G=0;G{B.fix(k),this._editorAPI.modifyComponent(this._componentGuid,k)},buttonText:"Fix"})),$.push(F._Lw.line()),U.push(F.XRp.createVertical($))}if(0!==U.length)return F.XRp.createVertical(U,{title:"Warnings"})}getStandardButtonSettings(k,B){const U=[F.Gme.textGroup({id:"text",labelValue:"Text",inputValue:k.text}),F.Gme.enumGroup({id:"type",labelValue:"Type",selectValue:k.type},G.vX),F.Gme.enumGroup({id:"size",labelValue:"Size",selectValue:k.size},G.YT),F.Gme.enumGroup({id:"iconPosition",labelValue:"Icon Position",selectValue:k.iconPosition},j.d)];if(k.iconPosition!==j.d.NONE&&(U.push(F.Gme.enumGroup({id:"icon",labelValue:"Icon",selectValue:k.icon},G.XN)),k.icon===G.XN.Custom)){const B=[F.Gme.imagePickerGroup({id:"customIconGuid",labelValue:"Icon Image",guid:k.customIconGuid}),F.Gme.vectorGroup({id:"customIconSize",labelValue:"Custom Icon Size",vectorValue:k.customIconSize}),F.Gme.checkboxGroup({id:"customIconTinting",labelValue:"Match Custom Icon To Text Color",inputValue:k.customIconTinting})],G=F.XRp.createVertical(B,{isCollapsible:!0,startCollapsed:!1,title:"Custom Icon Settings"});U.push(G)}return U.push(F.Gme.checkboxGroup({id:"fitToContents",labelValue:"Fit to Contents",inputValue:k.fitToContents})),U.push(F.Gme.checkboxGroup({id:"useMaxWidth",labelValue:"Use Max Width",inputValue:k.useMaxWidth})),k.useMaxWidth&&U.push(F.Gme.numberGroup({id:"maxWidth",labelValue:"Max Width",inputValue:k.maxWidth})),U.push(F.Gme.checkboxGroup({id:"suppressSound",labelValue:"Suppress SFX",inputValue:k.suppressSound})),F.XRp.createVertical(U,{isCollapsible:!0,startCollapsed:!1,title:"Button Style"})}getInputButtonNodes(k,B){return[F.Gme.checkboxGroup({id:"allowDisabledInput",labelValue:"Allow Disabled Input",inputValue:k.allowDisabledInput}),F.Gme.checkboxGroup({id:"alwaysTransition",labelValue:"Always Transition",inputValue:k.alwaysTransition}),F.Gme.numberGroup({id:"debounceTimeMs",labelValue:"Debounce Time (ms)",inputValue:k.debounceTimeMs})]}getInputSettings(k,B){return F.XRp.createVertical([F.Gme.checkboxGroup({id:"inputEnabled",labelValue:"Input Enabled",inputValue:k.inputEnabled}),F.Gme.checkboxGroup({id:"attachToCamera",labelValue:"Attach To Camera",inputValue:k.attachToCamera,onChange:(k,B)=>{this._editorAPI.modifyComponent(this._componentGuid,{attachToCamera:B})}}),F.Gme.checkboxGroup({id:"awaitListeners",labelValue:"Await Listeners",inputValue:k.disableWhileAwaitingListeners,onChange:(k,B)=>{this._editorAPI.modifyComponent(this._componentGuid,{disableWhileAwaitingListeners:B})}})],{isCollapsible:!0,startCollapsed:!1,title:"Settings"})}getSignalTerminals(k,B){return F.XRp.createVertical([F.NyS.create({id:"onClick",label:"On Input Click",signalValue:k.onClick,componentGUID:this._componentGuid}),F.NyS.create({id:"onDown",label:"On Input Down",signalValue:k.onDown,componentGUID:this._componentGuid}),F.NyS.create({id:"onRelease",label:"On Input Release",signalValue:k.onRelease,componentGUID:this._componentGuid}),F.NyS.create({id:"onReleaseOutside",label:"On Input Release Outside",signalValue:k.onReleaseOutside,componentGUID:this._componentGuid}),F.NyS.create({id:"onHoverEnter",label:"On Input Hover Enter",signalValue:k.onHoverEnter,componentGUID:this._componentGuid}),F.NyS.create({id:"onHoverExit",label:"On Input Hover Exit",signalValue:k.onHoverExit,componentGUID:this._componentGuid}),F.NyS.create({id:"onHoverMove",label:"On Input Hover Move",signalValue:k.onHoverMove,componentGUID:this._componentGuid}),F.NyS.create({id:"onHold",label:"On Input Hold",signalValue:k.onHold,componentGUID:this._componentGuid}),F.NyS.create({id:"onInputEnabledChanged",label:"On Input Enabled Changed",signalValue:k.onInputEnabledChanged,componentGUID:this._componentGuid})],{isCollapsible:!0,startCollapsed:!0,title:"Event Signals"})}}},94325:(k,B,U)=>{"use strict";U.d(B,{C:()=>X});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(15821),V=U(35120),W=U(5269),q=U(11647),K=U(37394),z=U(19633),Y=U(44564),Q=U(88217);let X=class extends((0,q.o)(K.D)){constructor(){super(...arguments),this.showButtonArrows=!0,this.hideSliderWhenContentFits=!1,this.autoUpdateOnContentResize=!0,this.lockScrollWheel=!1}create(){super.create(),this._sliderTransform=this.slider.GameObject.findComponent(G.XVE),this.onContentSizeChanged=this.onContentSizeChanged.bind(this),this.updateSliderTransform=this.updateSliderTransform.bind(this),this.upButton.onClick.add(this.slider.stepUp.bind(this.slider),this),this.downButton.onClick.add(this.slider.stepDown.bind(this.slider),this),this.scrollWheelBounds||(this.scrollWheelBounds=this.rectTransform),this.addListenerToSignal(this.contentTransform.onWorldMatrixChanged,(()=>this.offsetStickyItems()))}postCreate(){super.postCreate(),this.contentTransform||G.VyI.log("No content transform found for Scroll View, consider adding a RectTransform to the content transform field in the inspector.",G.$bb.Warning),this.updateContent(this.contentTransform),this.updateSliderTransform(),this.rectTransform.onDimensionsChanged.add(this.updateSliderTransform,this)}destroy(){var k,B;super.destroy(),null===(k=this.contentTransform)||void 0===k||k.onDimensionsChanged.remove(this.onContentSizeChanged),null===(B=this.rectTransform)||void 0===B||B.onDimensionsChanged.remove(this.updateSliderTransform,this),this.upButton.onClick.removeAll(this),this.downButton.onClick.removeAll(this)}update(){if(super.update(),this.contentDraggingEnabled)if(this._contentClicked&&!this._contentDragged){if(Y.H.dragTarget)return void this.onDragEnd();this.checkDragStart()}else this._contentDragged&&this.dragContent()}onMouseWheel(k){this.lockScrollWheel||this.contentFitsScrollView()&&this.hideSliderWhenContentFits||(super.onMouseWheel(k),this.slider.value-=$().clamp(k.deltaY,-this._maximumMouseWheelSpeed,this._maximumMouseWheelSpeed))}beginDragDetection(k){Y.H.dragTarget||super.beginDragDetection(k)}checkDragStart(){switch(this.slider.direction){case W.H.Horizontal:this.checkDragStartHorizontal();break;default:case W.H.Vertical:this.checkDragStartVertical()}}dragContent(){switch(this.slider.direction){case W.H.Horizontal:this.dragContentHorizontal();break;default:case W.H.Vertical:this.dragContentVertical()}}dragContentHorizontal(){const k=V.q.instance.game.input.activePointer.x-this._lastDragMousePosition.x;this.slider.value+=k,super.dragContentHorizontal()}dragContentVertical(){const k=V.q.instance.game.input.activePointer.y-this._lastDragMousePosition.y;this.slider.value+=k,super.dragContentVertical()}hideSlider(){this.GameObject&&!this.GameObject.isDestroyed&&(this.upButton.GameObject.active=!1,this.downButton.GameObject.active=!1,this.slider.GameObject.active=!1,this.allowScrollWheel=!1,this.contentDraggingEnabled=!1)}showSlider(){this.GameObject&&!this.GameObject.isDestroyed&&(this.slider.GameObject.active=!0,this.upButton.GameObject.active=this.showButtonArrows,this.downButton.GameObject.active=this.showButtonArrows,this.allowScrollWheel=!0,this.contentDraggingEnabled=!0)}updateSliderTransform(){switch(this.slider.direction){case W.H.Horizontal:this.fitSliderHorizontal();break;default:case W.H.Vertical:this.fitSliderVertical()}}fitSliderVertical(){this.showButtonArrows?this._sliderTransform.fullWidth=this.rectTransform.fullHeight-this.upButton.GameObject.transform.fullHeight-this.downButton.GameObject.transform.fullHeight:this._sliderTransform.fullWidth=this.rectTransform.fullHeight}fitSliderHorizontal(){this.showButtonArrows?this._sliderTransform.fullWidth=this.rectTransform.fullWidth-this.upButton.GameObject.transform.fullHeight-this.downButton.GameObject.transform.fullHeight:this._sliderTransform.fullWidth=this.rectTransform.fullWidth}updateContent(k,B=!1){if(this.contentTransform&&(this.contentTransform.onDimensionsChanged.remove(this.onContentSizeChanged),B?this.contentTransform.GameObject.destroy():this.contentTransform.GameObject.parent=null),this.contentTransform=k,this.updateSliderRange(),!this.contentTransform)return;this.contentArea.GameObject.addChild(this.contentTransform.GameObject);const U=this.contentTransform.GameObject.parent,F=U?U.findComponent(G.XVE):null,j=F?F.rectTransformDimensions:G.or0.ZERO,$=new G.I9Y(this.contentTransform.anchorMin.x*j.width,this.contentTransform.anchorMin.y*j.height),H=new G.I9Y(this.contentTransform.anchorMax.x*j.width,this.contentTransform.anchorMax.y*j.height),V=new G.or0(H.x-$.x,H.y-$.y);switch(this.slider.direction){case W.H.Horizontal:this.contentTransform.setPivot(0,.5),this.contentTransform.setAnchoredPivotOffset(0,.5*(this.contentArea.fullHeight-V.height));break;default:case W.H.Vertical:this.contentTransform.setPivot(.5,0),this.contentTransform.setAnchoredPivotOffset(.5*(this.contentArea.fullWidth-V.width),0)}this.contentTransform.onDimensionsChanged.add(this.onContentSizeChanged)}onContentSizeChanged(){if(this.autoUpdateOnContentResize){const k=this.slider.value;this.updateSliderRange(),this.setScrollPosition(Math.max(this.slider.maxValue,k))}}updateSliderRange(){if(H.A.isDefined(this.rectTransform)){if(H.A.isDefined(this.contentTransform))switch(this.slider.direction){case W.H.Horizontal:this.slider.maxValue=Math.min(.01,this.rectTransform.fullWidth-this.contentTransform.fullWidth);break;default:case W.H.Vertical:this.slider.maxValue=Math.min(.01,this.rectTransform.fullHeight-this.contentTransform.fullHeight)}else this.slider.maxValue=.01;!this.hideSliderWhenContentFits||H.A.isDefined(this.contentTransform)&&!this.contentFitsScrollView()?this.showSlider():this.hideSlider()}}contentFitsScrollView(){switch(this.slider.direction){case W.H.Vertical:return this.contentTransform.fullHeight<=this.rectTransform.fullHeight;case W.H.Horizontal:return this.contentTransform.fullWidth<=this.rectTransform.fullWidth;default:return!1}}scrollToPercent(k=0){this.slider.normalizedValue=G.cj9.clamp(k,0,1)}setScrollPosition(k){this.slider.value=k}scrollToChild(k,B=0){const U=this.contentTransform.GameObject.children.length;if(k<0||k>=U)return;const F=this.contentTransform.GameObject.children[k];if(F)switch(this.slider.direction){case W.H.Horizontal:const k=F.transform.localPosition.x;this.setScrollPosition(-k+B);break;case W.H.Vertical:default:const U=F.transform.localPosition.y;this.setScrollPosition(-U+B)}}offsetStickyItems(){const k=this.contentArea.localPosition.y,B=[];for(const U of this.contentTransform.GameObject.children){const k=U.findComponent(Q.B);H.A.isDefined(k)&&B.push(k)}for(const[U,F]of B.entries()){if(!H.A.isDefined(F))continue;if(k+F.transform.posY<=0){const G=-k-F.transform.posY;let j=0;const $=B[U+1];if(H.A.isDefined($)){const B=k+$.transform.posY-F.transform.fullHeight;j=Math.min(0,B)}F.setContentsOffset(G+j)}else F.setContentsOffset(0)}}};(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],X.prototype,"contentTransform",void 0),(0,F.Cg)([(0,G.MnK)(Y.H),(0,F.Sn)("design:type",Y.H)],X.prototype,"slider",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],X.prototype,"showButtonArrows",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],X.prototype,"hideSliderWhenContentFits",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],X.prototype,"autoUpdateOnContentResize",void 0),(0,F.Cg)([(0,G.MnK)(z.S),(0,F.Sn)("design:type",z.S)],X.prototype,"upButton",void 0),(0,F.Cg)([(0,G.MnK)(z.S),(0,F.Sn)("design:type",z.S)],X.prototype,"downButton",void 0),X=(0,F.Cg)([(0,G.EVk)("StandardScrollView",G.YH6.ui)],X)},44564:(k,B,U)=>{"use strict";U.d(B,{H:()=>K,c:()=>G});var F,G,j=U(8674),$=U(62459),H=U(5269),V=U(35120),W=U(93690),q=U(57103);!function(k){k.DEFAULT="default"}(G||(G={}));let K=F=class extends $.uAl{constructor(){super(...arguments),this.attachToCamera=!0,this.onValueChanged=new $.HN0,this.onSteppedValueChanged=new $.HN0,this.onNormalizedValueChanged=new $.HN0,this.onFinalValue=new $.HN0,this.stepValue=10,this.snapDrag=!1,this.snapRelease=!0,this.minValue=0,this.maxValue=100,this._value=0,this.direction=H.H.Horizontal,this.type=G.DEFAULT,this.lastMousePosition={x:0,y:0},this.smoothing=.8,this.movementMultiplier=1,this.handlePadding=2}get value(){return this._value}set value(k){if(k===this._value)return void this.updateHandle();const B=this._value;this._value=$.cj9.clampArbitrary(k,this.minValue,this.maxValue),this.updateHandle(),this.onValueChanged.dispatch(this._value),this.onNormalizedValueChanged.dispatch(this.normalizedValue);const U=this.valueToSnapped(this._value);U!==this.valueToSnapped(B)&&this.onSteppedValueChanged.dispatch(U)}get normalizedValue(){return $.cj9.inverseLerp(this.minValue,this.maxValue,this.value)}set normalizedValue(k){this.value=$.cj9.clampedLerp(this.minValue,this.maxValue,k)}postCreate(){super.postCreate(),this.handleTransform=this.handle.GameObject.findComponent($.XVE),this.trackTransform=this.track.GameObject.findComponent($.XVE),this.onHandleUp=this.onHandleUp.bind(this),this.onHandleDown=this.onHandleDown.bind(this),this.onTrackDown=this.onTrackDown.bind(this),this.handle.onRelease.add(this.onHandleUp,this),this.handle.onReleaseOutside.add(this.onHandleUp,this),this.handle.onDown.add(this.onHandleDown,this),this.track.onDown.add(this.onTrackDown,this),this.track.onRelease.add(this.onHandleUp,this),this.track.onReleaseOutside.add(this.onHandleUp,this);const k=this.handle.renderComponent.getRootContainer();k&&W.p.patchPhaserInteraction(k,!0);const B=this.track.renderComponent.getRootContainer();B&&W.p.patchPhaserInteraction(B,!0),this.handle.attachToCamera=this.attachToCamera,this.track.attachToCamera=this.attachToCamera,this.gameObject.transform.localRotation=this.direction===H.H.Horizontal?0:90,this.updateHandle()}destroy(){var k,B,U;super.destroy(),null===(k=this.onValueChanged)||void 0===k||k.dispose(),null===(B=this.onNormalizedValueChanged)||void 0===B||B.dispose(),null===(U=this.onFinalValue)||void 0===U||U.dispose(),V.q.instance.game.input.deleteMoveCallback(this.onMouseDrag,this),this.handle.onRelease.removeAll(this),this.handle.onReleaseOutside.removeAll(this),this.handle.onDown.removeAll(this),this.track.onDown.removeAll(this),this.track.onRelease.removeAll(this),this.track.onReleaseOutside.removeAll(this),this.onValueChanged.dispose(),this.onFinalValue.dispose(),this.onNormalizedValueChanged.dispose(),this.onSteppedValueChanged.dispose()}onTrackDown(){const k=this.getSlideableBounds();let B={x:V.q.instance.game.input.activePointer.x,y:V.q.instance.game.input.activePointer.y};this.attachToCamera||(B=$.i7d.main.viewMatrix.applyInverse(B)),B.x-=this.gameObject.transform.worldPosition.x,B.y-=this.gameObject.transform.worldPosition.y,this.direction===H.H.Vertical?this.value=this.positionToValue(B.y,k):this.value=this.positionToValue(B.x,k),this.onHandleDown()}onHandleDown(){this._dragging=!0,F.dragTarget=this,this.lastMousePosition.x=V.q.instance.game.input.activePointer.x,this.lastMousePosition.y=V.q.instance.game.input.activePointer.y,this._handleDragTarget=this.handleTransform.posX,V.q.instance.game.input.addMoveCallback(this.onMouseDrag,this)}onHandleUp(){this._dragging=!1,F.dragTarget=void 0,V.q.instance.game.input.deleteMoveCallback(this.onMouseDrag,this),this.snapRelease&&(this.value=this.valueToSnapped(this.value)),this.onFinalValue.dispatch(this.value)}updateHandle(){this.handleTransform&&(this.handleTransform.posX=this.getHandlePosition())}onMouseDrag(){if(this._dragging){const k=this.getSlideableBounds(),B={x:V.q.instance.game.input.activePointer.x-this.lastMousePosition.x,y:V.q.instance.game.input.activePointer.y-this.lastMousePosition.y};this.lastMousePosition.x=V.q.instance.game.input.activePointer.x,this.lastMousePosition.y=V.q.instance.game.input.activePointer.y,this.direction===H.H.Horizontal?this._handleDragTarget+=B.x*this.movementMultiplier:this._handleDragTarget+=B.y*this.movementMultiplier,this.snapDrag?this.handleTransform.posX=this.snapPosition(this._handleDragTarget,k):this.handleTransform.posX=this._handleDragTarget,this.normalizedValue=$.cj9.inverseLerp(k.left,k.right,this.handleTransform.posX)}}snapPosition(k,B){let U=this.positionToValue(k,B);return U=this.valueToSnapped(U),this.valueToPosition(U,B)}positionToValue(k,B){return $.cj9.clampedLerp(this.minValue,this.maxValue,$.cj9.inverseLerp(B.left,B.right,k))}valueToPosition(k,B){return $.cj9.clampedLerp(B.left,B.right,$.cj9.inverseLerp(this.minValue,this.maxValue,k))}valueToSnapped(k){return Math.round(k/this.stepValue)*this.stepValue}getHandlePosition(){const k=this.getSlideableBounds();return $.cj9.clampedLerp(k.left,k.right,this.normalizedValue)}getSlideableBounds(){const k=this.trackTransform.getBounds();return k.left+=this.handleTransform.fullWidth/2+this.handlePadding,k.right-=this.handleTransform.fullWidth/2+this.handlePadding,k}stepUp(){this.value+=this.stepValue}stepDown(){this.value-=this.stepValue}};K.dragTarget=void 0,(0,j.Cg)([(0,$.vkK)(),(0,j.Sn)("design:type",Boolean)],K.prototype,"attachToCamera",void 0),(0,j.Cg)([(0,$.bbQ)(),(0,j.Sn)("design:type",$.HN0)],K.prototype,"onValueChanged",void 0),(0,j.Cg)([(0,$.bbQ)(),(0,j.Sn)("design:type",$.HN0)],K.prototype,"onSteppedValueChanged",void 0),(0,j.Cg)([(0,$.bbQ)(),(0,j.Sn)("design:type",$.HN0)],K.prototype,"onNormalizedValueChanged",void 0),(0,j.Cg)([(0,$.bbQ)(),(0,j.Sn)("design:type",$.HN0)],K.prototype,"onFinalValue",void 0),(0,j.Cg)([(0,$.g11)(),(0,j.Sn)("design:type",Number)],K.prototype,"stepValue",void 0),(0,j.Cg)([(0,$.vkK)(),(0,j.Sn)("design:type",Boolean)],K.prototype,"snapDrag",void 0),(0,j.Cg)([(0,$.vkK)(),(0,j.Sn)("design:type",Boolean)],K.prototype,"snapRelease",void 0),(0,j.Cg)([(0,$.g11)(),(0,j.Sn)("design:type",Number)],K.prototype,"minValue",void 0),(0,j.Cg)([(0,$.g11)(),(0,j.Sn)("design:type",Number)],K.prototype,"maxValue",void 0),(0,j.Cg)([(0,$.g11)(),(0,j.Sn)("design:type",Number)],K.prototype,"_value",void 0),(0,j.Cg)([(0,$.gfw)(H.H),(0,j.Sn)("design:type",Number)],K.prototype,"direction",void 0),(0,j.Cg)([(0,$.MnK)($.Eci),(0,j.Sn)("design:type",$.Eci)],K.prototype,"handle",void 0),(0,j.Cg)([(0,$.MnK)($.Eci),(0,j.Sn)("design:type",$.Eci)],K.prototype,"track",void 0),(0,j.Cg)([(0,$.MnK)($.XVE),(0,j.Sn)("design:type",$.XVE)],K.prototype,"fill",void 0),(0,j.Cg)([(0,$.gfw)(G),(0,j.Sn)("design:type",String)],K.prototype,"type",void 0),(0,j.Cg)([(0,$.g11)(),(0,j.Sn)("design:type",Number)],K.prototype,"smoothing",void 0),(0,j.Cg)([(0,$.g11)(),(0,j.Sn)("design:type",Number)],K.prototype,"movementMultiplier",void 0),(0,j.Cg)([(0,$.g11)(),(0,j.Sn)("design:type",Number)],K.prototype,"handlePadding",void 0),K=F=(0,j.Cg)([(0,$.EVk)("StandardSlider"),(0,$.WR4)(q.s)],K)},57103:(k,B,U)=>{"use strict";U.d(B,{s:()=>$});var F=U(62459),G=U(5269),j=U(44564);class $ extends F.$KW{generate(k,B){const U=[this.getStandardSliderSettings(k,B)],G=this.getInputSettings(k,B),j=this.getInputSliderNodes(k,B);return G.elements.push(...j),U.push(G,this.getSignalTerminals(k,B)),F.XRp.createVertical(U)}getStandardSliderSettings(k,B){const U=[F.Gme.numberGroup({id:"minValue",labelValue:"Min Value",inputValue:k.minValue}),F.Gme.numberGroup({id:"maxValue",labelValue:"Max Value",inputValue:k.maxValue}),F.Gme.numberGroup({id:"value",labelValue:"Init Value",inputValue:k.value}),F.Gme.numberGroup({id:"stepValue",labelValue:"Step Value",inputValue:k.stepValue}),F.Gme.checkboxGroup({id:"snapDrag",labelValue:"Snap on Drag",inputValue:k.snapDrag}),F.Gme.checkboxGroup({id:"snapRelease",labelValue:"Snap on Release",inputValue:k.snapRelease}),F.Gme.numberGroup({id:"handlePadding",labelValue:"Padding",inputValue:k.handlePadding}),F.Gme.enumGroup({id:"direction",labelValue:"Direction",selectValue:k.direction,onChange:k=>{var B,U;const j=null===(U=null===(B=this._editorAPI.getComponent(this._componentGuid))||void 0===B?void 0:B.GameObject)||void 0===U?void 0:U.findComponent(F.dLy);j?k===G.H.Horizontal?j.localRotation=0:j.localRotation=90:console.error("Transform not found on Slider component.")}},G.H),F.Gme.enumGroup({id:"type",labelValue:"Type",selectValue:k.type},j.c),F.Gme.componentPickerGroup({id:"handle",labelValue:"Handle",componentType:F.Eci,componentGuid:k.handle}),F.Gme.componentPickerGroup({id:"track",labelValue:"Track",componentType:F.Eci,componentGuid:k.track}),F.NyS.create({id:"onValueChanged",label:"On Value Changed",signalValue:k.onValueChanged,componentGUID:this._componentGuid}),F.NyS.create({id:"onSteppedValueChanged",label:"On Stepped Value Changed",signalValue:k.onSteppedValueChanged,componentGUID:this._componentGuid}),F.NyS.create({id:"onNormalizedValueChanged",label:"On Normalized Value Changed",signalValue:k.onNormalizedValueChanged,componentGUID:this._componentGuid}),F.NyS.create({id:"onFinalValue",label:"On Value Finalized",signalValue:k.onFinalValue,componentGUID:this._componentGuid})];return F.XRp.createVertical(U,{isCollapsible:!0,startCollapsed:!1,title:"Slider Style"})}getInputSliderNodes(k,B){return[F.Gme.checkboxGroup({id:"_useHandCursor",labelValue:"Use Hand Cursor",inputValue:k._useHandCursor}),F.Gme.checkboxGroup({id:"allowDisabledInput",labelValue:"Allow Disabled Input",inputValue:k.allowDisabledInput}),F.Gme.checkboxGroup({id:"alwaysTransition",labelValue:"Always Transition",inputValue:k.alwaysTransition})]}getInputSettings(k,B){const U=F.XRp.createVertical([F.Gme.checkboxGroup({id:"_inputEnabled",labelValue:"Input Enabled",inputValue:k._inputEnabled}),F.Gme.checkboxGroup({id:"attachToCamera",labelValue:"Attach to Camera",inputValue:k.attachToCamera}),F.Gme.checkboxGroup({id:"allowContinuousHold",labelValue:"Allow Continuous Hold",inputValue:k.allowContinuousHold})],{isCollapsible:!0,startCollapsed:!1,title:"Settings"});return k.allowContinuousHold&&U.elements.push(F.Gme.numberGroup({id:"_holdDelay",labelValue:"Hold Delay",inputValue:k._holdDelay})),U}getSignalTerminals(k,B){return F.XRp.createVertical([F.NyS.create({id:"onClick",label:"On Input Click",signalValue:k.onClick,componentGUID:this._componentGuid}),F.NyS.create({id:"onDown",label:"On Input Down",signalValue:k.onDown,componentGUID:this._componentGuid}),F.NyS.create({id:"onRelease",label:"On Input Release",signalValue:k.onRelease,componentGUID:this._componentGuid}),F.NyS.create({id:"onReleaseOutside",label:"On Input Release Outside",signalValue:k.onReleaseOutside,componentGUID:this._componentGuid}),F.NyS.create({id:"onHoverEnter",label:"On Input Hover Enter",signalValue:k.onHoverEnter,componentGUID:this._componentGuid}),F.NyS.create({id:"onHoverExit",label:"On Input Hover Exit",signalValue:k.onHoverExit,componentGUID:this._componentGuid}),F.NyS.create({id:"onHoverMove",label:"On Input Hover Move",signalValue:k.onHoverMove,componentGUID:this._componentGuid}),F.NyS.create({id:"onHold",label:"On Input Hold",signalValue:k.onHold,componentGUID:this._componentGuid}),F.NyS.create({id:"onInputEnabledChanged",label:"On Input Enabled Changed",signalValue:k.onInputEnabledChanged,componentGUID:this._componentGuid})],{isCollapsible:!0,startCollapsed:!0,title:"Event Signals"})}}},31818:(k,B,U)=>{"use strict";U.d(B,{tX:()=>X});var F,G=U(8674),j=U(62459),$=U(19631),H=U(35084),V=U(51972),W=U(19633),q=U(59503);!function(k){k.None="none",k.Warning="warning",k.Check="check"}(F||(F={}));const K={[F.None]:"",[F.Warning]:$.B.Circle_warning,[F.Check]:$.B.Circle_checkmark};var z;!function(k){k.Default="default",k.Paper="paper"}(z||(z={}));const Y={[z.Default]:{background:$.B.Tooltip_background,arrow:$.B.Tooltip_arrow,arrowDistance:-4,arrowBoundSlice:!0},[z.Paper]:{background:$.B.Paper_small,arrow:$.B.Paper_small_arrow,arrowDistance:-10,arrowBoundSlice:!0}};var Q;!function(k){k.Body="BODY",k.Title="TITLE",k.Icon="ICON",k.ShowTitle="SHOW_TITLE",k.ShowIcon="SHOW_ICON",k.BodyWrapWidth="BODY_WRAP_WIDTH",k.OnClose="ON_CLOSE",k.UseCloseUnderlay="USE_CLOSE_UNDERLAY"}(Q||(Q={}));let X=class extends j.uAl{constructor(){super(...arguments),this._style=z.Default,this._body="BODY",this._title="TITLE",this._icon=F.None,this.destroyOnClose=!0,this.onClose=new j.HN0,this._useInputOverlay=!0,this._arrowDistance=-5}get body(){return this._body}set body(k){this._body=k,this._textComponent.text=k,this._rectTransform.fullWidth=this.width}get width(){return this._textComponent.getDimensions().width+(this.icon===F.None?131:195)}get title(){return this._title}set title(k){this._title=k,this._titleComponent.text=k,this._title.length>0?(this._titleComponent.GameObject.active=!0,this._textTransform.top=50):(this._titleComponent.GameObject.active=!1,this._textTransform.top=20)}get icon(){return this._icon}set icon(k){this._icon=k}create(){this._rectTransform=this.gameObject.findComponent(j.XVE),this._textTransform=this._textComponent.GameObject.findComponent(j.XVE),this._titleTransform=this._titleComponent.GameObject.findComponent(j.XVE),this.body=this._body,this.title=this._title,this._fitToTarget=this.gameObject.findComponent(q.f),this.getInjectedValue(Q.Body)?this.applyInjection():this.title=this._title,this.icon===F.None?(this._iconGraphic.GameObject.active=!1,this._textTransform.left=20,this._titleTransform.left=20):(this._iconGraphic.GameObject.active=!0,this._textTransform.left=100,this._titleTransform.left=100),this._arrowTransform&&(this._fitToTarget?this._fitToTarget.onPostFit.add(this.updateTagPosition.bind(this)):this._arrowTransform.GameObject.active=!1),this.close=this.close.bind(this),this._closeButton.onClick.add(this.close),this._inputOverlay.onClicked.add(this.close),this._inputOverlay.GameObject.active=this._useInputOverlay}postCreate(){this.updateStyle(this._style)}destroy(){this.onClose.dispose()}updateStyle(k){const B=Y[k],U=()=>{var k,U;this._backgroundGraphic.updateAsset(B.background),this._arrowGraphic.updateAsset(B.arrow),this._arrowGraphic.sizeToSourceImage(),this._arrowDistance=null!==(k=B.arrowDistance)&&void 0!==k?k:this._arrowDistance,B.arrowBoundSlice&&(this._sliceData=this._backgroundGraphic.sliceData),null===(U=this._fitToTarget)||void 0===U||U.fit(),this.icon!==F.None&&this._iconGraphic.updateAsset(K[this.icon])};j.W$e.instance.game.cache.getTexture(B.background)?U():this._assetLoader.loadAssets([B.background,B.arrow,K[this.icon]]).then(U).catch((k=>{j.VyI.log(`[StandardTooltip] Failed to load textures for ${this._style}`,j.$bb.Error)}))}close(){this&&this.gameObject&&(this.onClose.dispatch(),this.destroyOnClose?this.gameObject.destroy():this.gameObject.active=!1)}applyInjection(){var k,B;this.body=null!==(k=this.getInjectedValue(Q.Body))&&void 0!==k?k:this._body,this.title=null!==(B=this.getInjectedValue(Q.Title))&&void 0!==B?B:this._title;const U=this.getInjectedValue(Q.ShowTitle);void 0!==U&&(this.title=U?this._title:"");const G=this.getInjectedValue(Q.ShowIcon);void 0!==G&&(this.icon=G?this._icon:F.None),this._iconGraphic.updateAsset(this.getInjectedValue(Q.Icon)),this._textComponent.wordWrapWidth=this.getInjectedValue(Q.BodyWrapWidth);const j=this.getInjectedValue(Q.OnClose);this._closeButton&&j&&(this._closeButton.onClick.add(j),this._inputOverlay.onClicked.add(j));const $=this.getInjectedValue(Q.UseCloseUnderlay);void 0!==$&&(this._inputOverlay.GameObject.active=$)}updateTagPosition(k,B=.5){var U;if(!(null===(U=this._arrowTransform)||void 0===U?void 0:U.GameObject))return;let F=B;if(this._sliceData&&this._rectTransform){const B=this._rectTransform.fullWidth,U=this._rectTransform.fullHeight,G=.5*this._arrowTransform.fullWidth;if(k===q.H.Left||k===q.H.Right){const k=this._sliceData.top+G,B=this._sliceData.bottom+G;F=k+B>=U?.5:Math.max(k/U,Math.min(F,1-B/U))}else{const k=this._sliceData.left+G,U=this._sliceData.right+G;F=k+U>=B?.5:Math.max(k/B,Math.min(F,1-U/B))}}switch(this._arrowTransform.GameObject.active=!0,k){case q.H.Top:this._arrowTransform.localRotation=0,this._arrowTransform.anchorMin.set(F,1),this._arrowTransform.anchorMax.set(F,1),this._arrowTransform.setPosition(0,this._arrowDistance);break;case q.H.Bottom:this._arrowTransform.localRotation=180,this._arrowTransform.anchorMin.set(F,0),this._arrowTransform.anchorMax.set(F,0),this._arrowTransform.setPosition(0,-this._arrowDistance);break;case q.H.Left:this._arrowTransform.localRotation=270,this._arrowTransform.anchorMin.set(1,F),this._arrowTransform.anchorMax.set(1,F),this._arrowTransform.setPosition(this._arrowDistance,0);break;case q.H.Right:this._arrowTransform.localRotation=90,this._arrowTransform.anchorMin.set(0,F),this._arrowTransform.anchorMax.set(0,F),this._arrowTransform.setPosition(-this._arrowDistance,0);break;default:this._arrowTransform.GameObject.active=!1}}setTarget(k,B){this.gameObject.active=!0,this._fitToTarget?(!B||B.transform instanceof j.XVE?this._fitToTarget.setBounds(null==B?void 0:B.transform,!1):j.VyI.log("Bounds must be a RectTransform",j.$bb.Warning),this._fitToTarget.setTarget(k)):(this._rectTransform.setPosition(k.legacyTransform.group.position.x,k.legacyTransform.group.position.y),this._arrowTransform.GameObject.active=!1)}setFromSchema(k){var B,U;this.gameObject.active=!0,this.title=null!==(B=k.headerText)&&void 0!==B?B:"",this.body=k.bodyText,"number"==typeof k.xPosition&&(this._rectTransform.posX=k.xPosition),"number"==typeof k.yPosition&&(this._rectTransform.posY=k.yPosition);const F=null!==(U=k.arrowDirection)&&void 0!==U?U:V.i.UP;let G;F===V.i.DOWN?G=q.H.Top:F===V.i.UP?G=q.H.Bottom:F===V.i.RIGHT?G=q.H.Left:F===V.i.LEFT&&(G=q.H.Right);let j=.5;"number"==typeof k.arrowXRelPos?j=k.arrowXRelPos:"number"==typeof k.arrowYRelPos&&(j=k.arrowYRelPos),this.updateTagPosition(G,j)}};(0,G.Cg)([(0,j.Cdj)(j.t5G.AssetLoader),(0,G.Sn)("design:type",Object)],X.prototype,"_assetLoader",void 0),(0,G.Cg)([(0,j.gfw)(z),(0,G.Sn)("design:type",String)],X.prototype,"_style",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],X.prototype,"_body",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],X.prototype,"_title",void 0),(0,G.Cg)([(0,j.gfw)(F),(0,G.Sn)("design:type",String)],X.prototype,"_icon",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],X.prototype,"_textComponent",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],X.prototype,"_titleComponent",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],X.prototype,"_iconGraphic",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],X.prototype,"_backgroundGraphic",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],X.prototype,"_arrowGraphic",void 0),(0,G.Cg)([(0,j.MnK)(j.XVE),(0,G.Sn)("design:type",j.XVE)],X.prototype,"_arrowTransform",void 0),(0,G.Cg)([(0,j.MnK)(W.S),(0,G.Sn)("design:type",W.S)],X.prototype,"_closeButton",void 0),(0,G.Cg)([(0,j.MnK)(H.n),(0,G.Sn)("design:type",H.n)],X.prototype,"_inputOverlay",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],X.prototype,"destroyOnClose",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],X.prototype,"onClose",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],X.prototype,"_useInputOverlay",void 0),X=(0,G.Cg)([(0,j.EVk)("StandardTooltip",j.YH6.ui)],X)},43333:(k,B,U)=>{"use strict";U.d(B,{U:()=>H});var F,G=U(8674),j=U(62459),$=U(28152);let H=F=class extends j.uAl{constructor(){super(...arguments),this._offsetAmount=0,this._onTimerUpdated=new j.HN0,this._onTimerCompleted=new j.HN0,this._nextUpdateTimestamp=null,this._lastUpdateTime=null,this._isTimerRunning=!1,this._timerValues=new Map([["w",0],["d",0],["h",0],["m",0],["s",0]])}get weekRemaining(){return this.offset(this._timerValues.get("w"))}get daysRemaining(){return this.offset(this._timerValues.get("d"))}get hoursRemaining(){return this.offset(this._timerValues.get("h"))}get minutesRemaining(){return this.offset(this._timerValues.get("m"))}get secondsRemaining(){return this.offset(this._timerValues.get("s"))}get timeRemainingMS(){return this._timeRemainingMS}get onTimerUpdated(){return this._onTimerUpdated}get onTimerCompleted(){return this._onTimerCompleted}get countdownText(){return this._countdownText}offset(k){return k>0?k+this._offsetAmount:0}get smallestTimeGroup(){return this._groupSecondsRemaining?"s":this._groupMinutesRemaining?"m":this._groupHoursRemaining?"h":this._groupDaysRemaining?"d":this._groupWeeksRemaining?"w":void 0}create(){super.create(),j.Aq$.isDefined(this._countdownFromTimeMS)&&this._countdownFromTimeMS>0&&this.setCountdownTimeMS(this._countdownFromTimeMS)}destroy(){this._onTimerUpdated.dispose(),this._onTimerCompleted.dispose(),super.destroy()}update(){if(super.update(),this._isTimerRunning){const k=Date.now();this._timeRemainingMS=Math.max(this._timeRemainingMS-(k-this._lastUpdateTime),0),this._lastUpdateTime=k,k>this._nextUpdateTimestamp&&(this._timeRemainingMS>0?this.updateTimer():(this._timerValues.forEach(((k,B)=>{this._timerValues[B]=0})),this._isTimerRunning=!1,this._onTimerCompleted.dispatch()))}}setCountdownTimeMS(k){this._countdownFromTimeMS=k,this._timeRemainingMS=k,this._isTimerRunning=k>0,this._isTimerRunning&&(this._lastUpdateTime=Date.now(),this._nextUpdateTimestamp=null,this.updateTimer())}stopTimer(){this._isTimerRunning=!1}setTemplateString(k){this._countdownTemplateString=k,this._countdownText.text=this.getTemplatedTimeString()}updateTimer(){let k=0;k=this._groupSecondsRemaining?1e3:this._groupMinutesRemaining?6e4:this._groupHoursRemaining?36e5:this._groupDaysRemaining?864e5:6048e5;let B=this._timeRemainingMS+(this.allowZeroTime?0:k);this._groupWeeksRemaining&&(B=this.updateTimeValue(B,6048e5,"w")),this._groupDaysRemaining&&(B=this.updateTimeValue(B,864e5,"d")),this._groupHoursRemaining&&(B=this.updateTimeValue(B,36e5,"h")),this._groupMinutesRemaining&&(B=this.updateTimeValue(B,6e4,"m")),this._groupSecondsRemaining&&(B=this.updateTimeValue(B,1e3,"s")),this._nextUpdateTimestamp=Date.now()+Math.min(B,k),this._countdownText.text=this.getTemplatedTimeString(),this._onTimerUpdated.dispatch()}updateTimeValue(k,B,U){const F=Math.floor(k/B);return this._timerValues.set(U,F),k-F*B}getTemplatedTimeString(){return this._countdownTemplateString.replace(RegExp(`{(${F.TIME_SEGMENTS_REGEX})(?:,([0-9])?)?}`,"g"),((k,B,U="1")=>{var F;const G=parseInt(U,10),j=`${null!==(F=this.offset(this._timerValues.get(B)))&&void 0!==F?F:0}`;return`${"0".repeat(Math.max(G-j.length,0))}${j}`}))}};H.TIME_SEGMENTS_REGEX=`[${["w","d","h","m","s"].join("|")}]`,(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],H.prototype,"_countdownText",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],H.prototype,"_countdownTemplateString",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],H.prototype,"_countdownFromTimeMS",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],H.prototype,"_offsetAmount",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],H.prototype,"_onTimerUpdated",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],H.prototype,"_onTimerCompleted",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],H.prototype,"_groupWeeksRemaining",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],H.prototype,"_groupDaysRemaining",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],H.prototype,"_groupHoursRemaining",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],H.prototype,"_groupMinutesRemaining",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],H.prototype,"_groupSecondsRemaining",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],H.prototype,"allowZeroTime",void 0),H=F=(0,G.Cg)([(0,j.EVk)("TimerText",$.Y.ui)],H)},23365:(k,B,U)=>{"use strict";U.d(B,{s:()=>$});var F=U(8674),G=U(62459),j=U(90351);let $=class extends G.uAl{constructor(){super(...arguments),this._autoStart=!1,this._yoyo=!1,this._tweenDelay=0,this._easing=j.i.LinearNone,this.onStart=new G.HN0,this.onComplete=new G.HN0}create(){super.create(),this._autoStart&&(this.startTween(),this.IsActiveInHierarchy||this._tween.pause())}startTween(){this.onStart.dispatch()}destroyTween(){this._tween&&(this._tween.stop(),this._tween.remove(),this._tween=null)}destroy(){this.destroyTween(),this.onStart.dispose(),this.onComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_autoStart",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_yoyo",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],$.prototype,"_tweenDelay",void 0),(0,F.Cg)([(0,G.gfw)(j.i),(0,F.Sn)("design:type",String)],$.prototype,"_easing",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onStart",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onComplete",void 0),$=(0,F.Cg)([(0,G.EVk)("TweenBase (abstract)")],$)},95865:(k,B,U)=>{"use strict";U.d(B,{A:()=>$});var F=U(8674),G=U(62459),j=U(23365);let $=class extends j.s{create(){var k;this._targetGameObject=null!==(k=this._targetGameObject)&&void 0!==k?k:this.GameObject,this._targetGameObject.onActiveInHierarchyChanged.add(this.onActiveStateChanged,this),super.create()}onActiveStateChanged(){var k,B;this.IsActiveInHierarchy?null===(k=this._tween)||void 0===k||k.resume():null===(B=this._tween)||void 0===B||B.pause()}destroy(){var k,B;super.destroy(),null===(B=null===(k=this._targetGameObject)||void 0===k?void 0:k.onActiveInHierarchyChanged)||void 0===B||B.remove(this.onActiveStateChanged,this)}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],$.prototype,"_targetGameObject",void 0),$=(0,F.Cg)([(0,G.EVk)("TweenTransformBase (abstract)")],$)},45902:(k,B,U)=>{"use strict";U.d(B,{_:()=>bt});var F=U(8674),G=U(62459),j=U(88022),$=U(97495),H=U(40295),V=U(42448),W=U(35120),q=U(49237),K=U(43846),z=U(1195),Y=U(93867),Q=U(73797),X=U(28152),Z=U(11624),J=U(59599),tt=U(15485),et=U(46784),it=U(41674),st=U(70548),nt=U(23748),at=U(22023),rt=U(73678),ot=U(40392),ht=U(97518),ct=U(77938);class dt{constructor(){this._currentTitanAsset=null,this.letsGoLocalization="BUTTON_LETS_GO",this._player=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player,this.updateTitanAsset(W.q.instance.prodigy.titansNetworkHandler.titan,!1),W.q.instance.game.broadcaster.addAppListener(Q.RZ.GotTitans,this.updateTitanAsset.bind(this),this,"Titan"),W.q.instance.prodigy.titansNetworkHandler.getTitans().catch(G.RQr.createHandler("WorldMap: Could not get active Titan data"))}updateTitanAsset(k,B=!0){var U;k?(B&&W.q.instance.game.broadcaster.removeAppListener(Q.RZ.GotTitans,this,"Titan"),this._currentTitanAsset=null===(U=ct.t.getItem("titan",k.assetID))||void 0===U?void 0:U.data):G.VyI.log("ZoneGoalsDataProvider.updateTitanAsset: Received no Titan data",G.$bb.Warning)}static isInteractionStarted(){return dt._sessionInteractionStart}static setInteractionStart(){dt._sessionInteractionStart=!0}getZoneName(k){return ot.i.getZoneData(k).getName()}getTitanAsset(){return this._currentTitanAsset}getZoneProgress(k){return this._player.state.getCompletedQuests(k)/Object.keys(W.q.instance.prodigy.world.getZone(k).quests).length}getMapTag(k){return ot.i.getZoneData(k).target}hasFirstQuestStarted(k){return W.q.instance.prodigy.world.getZone(k).isQuestStarted(1)}isQuestCompleted(k,B){return this._player.state.getCompletedQuests(k)>=B}getQuestGiver(k){const B=W.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);switch(k){case rt.A_.BONFIRE:case rt.A_.BONFIREHARD:case rt.A_.BONFIREEXPERT:return B.getText("NPC_NAME_SLURPY");case rt.A_.FOREST:case rt.A_.FORESTHARD:case rt.A_.FORESTEXPERT:return B.getText("NPC_NAME_FLORA");case rt.A_.SHIPWRECK:case rt.A_.SHIPWRECKHARD:case rt.A_.SHIPWRECKEXPERT:return B.getText("NPC_NAME_EVE");case rt.A_.SHIVERCHILL:case rt.A_.SHIVERCHILLHARD:case rt.A_.SHIVERCHILLEXPERT:return B.getText("SHIVERCHILL_GUARDIAN");case rt.A_.SKYWATCH:case rt.A_.SKYWATCHHARD:case rt.A_.SKYWATCHEXPERT:return`${B.getText("NPC_NAME_BENNI")} and ${B.getText("NPC_NAME_BROCCOLINA")}`;default:return null}}getQuestGiverCount(k){switch(k){case rt.A_.SKYWATCH:case rt.A_.SKYWATCHHARD:case rt.A_.SKYWATCHEXPERT:return 2;default:return 1}}getLastVisitedZone(){const k=W.q.instance.prodigy.world.getCurrentZone();return-1!==dt.ZONE_PRIORITY_ORDER.indexOf(k)?k:null}}dt._sessionInteractionStart=!1,dt.ZONE_PRIORITY_ORDER=[rt.A_.FOREST,rt.A_.SHIVERCHILL,rt.A_.SKYWATCH,rt.A_.BONFIRE,rt.A_.SHIPWRECK,rt.A_.FORESTHARD,rt.A_.SHIVERCHILLHARD,rt.A_.SKYWATCHHARD,rt.A_.BONFIREHARD,rt.A_.SHIPWRECKHARD,rt.A_.FORESTEXPERT,rt.A_.SHIVERCHILLEXPERT,rt.A_.SKYWATCHEXPERT,rt.A_.BONFIREEXPERT,rt.A_.SHIPWRECKEXPERT];var lt,ut,ft=U(72849);!function(k){k[k.HoverMode=0]="HoverMode",k[k.DisplayMode=1]="DisplayMode"}(ut||(ut={}));let bt=lt=class extends G.uAl{constructor(){super(...arguments),this.petCollectionCompletionRecord={},this._zonePanels=[],this._booleanStates=[],this._zoneIDFromPanels=[],this._hardModeZoneIDFromPanels=[],this._expertModeZoneIDFromPanels=[],this.onZonePanelActivated=new G.HN0,this._currentMode=ut.HoverMode,this.onApplyCustomDisplay=new G.HN0,this.onClearCustomDisplay=new G.HN0}initialize(){this._dataProvider=new dt,this._zonePanels.forEach(((k,B)=>this.initializePanel(k,B))),W.q.instance.game.broadcaster.addAppListener(Q.n8.WorldMapDifficultyModeChanged,(()=>{this._zonePanels.forEach(((k,B)=>this.initializePanel(k,B)))}),this)}initializePanel(k,B){const U=this.getZoneIdForPanelIndex(B);this.updatePanel(k,U);const F=k.GameObject.findComponentsInChildren(q.$);for(const G of F)G.onInputOver.removeAll(),G.onInputOver.add((()=>{this._booleanStates[B].setValue(!0),this.toggleBubbleVisibility(!0)}),this),G.onInputOut.removeAll(),G.onInputOut.add((()=>{this._currentMode===ut.HoverMode&&(this._booleanStates[B].setValue(!1),this.toggleBubbleVisibility(!1))}),this),G.onClick.removeAll(),G.onClick.add((()=>{this.onZonePanelActivated.dispatch(B),W.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:tt.k.ZoneGoalsCta,interfaceType:it.Wm.DialogBox,interfaceName:et.B.ZoneGoals,destinationName:this._dataProvider.getMapTag(U),elementType:"zone_goals_tooltip",elementID:"destination_zone"})}))}setPanelActive(k,B,U,F=!1){if(U&&this._currentMode===ut.DisplayMode)return;lt.PERMANENT_NOOT_WIDGET_ZONE_INDEXES.includes(k)&&U&&this._currentMode===ut.HoverMode&&(this.toggleBubbleVisibility(B),B&&this.updateWidgetHUD(ot.i.BUTTONS_CONFIG.find((B=>B.prefabIndex===k)).zone)),Y.U.isEndgameQuestActive()&&k===lt.ACADEMY_LOCATION_INDEX&&(this.toggleBubbleVisibility(B),B&&this.updateWidgetHUD(rt.A_.ACADEMY));const G=ot.i.DIFFICULTY_MODE===$.i.Regular&&Y.U.isStepComplete(H.B.PippetDefeated);k>=0&&kB.prefabIndex===k)).zone))}updatePanel(k,B){k.isGemFound=this._playerDataProvider.player.hasFoundKeystone(B),k.updateHeader(this._dataProvider.getZoneName(B),`${lt.ICON_PREFIX}${B.replace(/_hard|_expert/,"")}`),k.setProgressBarIcon(B);const U=k.isGemFound?1:nt.z.roundToNearestMultiplier(this._dataProvider.getZoneProgress(B),.05);k.setProgressBarValue(U,!1),this._dataProvider.hasFirstQuestStarted(B)||this._dataProvider.isQuestCompleted(B,1)||(k.isFirstQuestStarted=!1),k.updateProgressBarText()}showGemAwardSequence(k,B){const U=this.getZoneIdForPanelsByDifficulty().indexOf(k),F=this._zonePanels[U];F.cacheAsBitmap=!1,this.hideWidget(),this._currentMode===ut.HoverMode&&this.toggleDisplayMode(),this.toggleBubbleVisibility(!1),this.setPanelActive(U,!0,!1,!0),F.isGemFound=!1,F.hideBarText(),F.setProgressBarValue(0,!1),F.setProgressBarValue(1,!0),F.onTweenValueComplete.addOnce((()=>{F.isGemFound=!0,F.showBarText(),F.updateProgressBarText(),F.bounceBarIcon(),F.onBarIconBounceComplete.addOnce((()=>{F.cacheAsBitmap=!0,this.setPanelActive(U,!1,!1),this.dismiss(),null==B||B()}))}))}setWidget(k){k!==this._currentWidgetState&&(this._nootIcon.updateAsset(j._.Ui_widget_icon_json,`noot_face_${k}`),this._currentWidgetState=k)}showWidget(){this._nootIcon.GameObject.parent.active=!0}hideWidget(){this._nootIcon.GameObject.parent.active=!1}setSpeechBubbleText(k,...B){k!==this._currentSpeechBubbleText&&(this._speechBubbleText.setLocalizationKey(k),this._currentSpeechBubbleText=k),this._speechBubbleText.setTextArguments(...B)}updateWidgetHUD(k){if(!G.Aq$.isDefined(k))return this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_OVERVIEW"),void this.setWidget(0);if(k===rt.A_.DRAGONISLE)return void this.updateWidgetHudForDragonIsle();if(Y.U.isStepComplete(H.B.PuppetMasterDefeated))return void this.updateWidgetHUDForPostEndgame(k);if(k===rt.A_.ACADEMY)return this.setSpeechBubbleText("WORLD_MAP_SPEECH_BUBBLE_ENDGAME"),void this.setWidget(0);const B=this._dataProvider.getZoneName(k),U=this._dataProvider.getQuestGiver(k),F=this._dataProvider.getZoneProgress(k);if(F>=1)this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_7",B),this.setWidget(3);else if(F>=.9&&F<1)this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_5",B),this.setWidget(2);else if(F>=.75&&F<.9)this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_4",B),this.setWidget(3);else if(F>=.5&&F<.75)this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_3",B),this.setWidget(0);else if(F>=.26&&F<.5)this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_2",B),this.setWidget(4);else if(this._dataProvider.isQuestCompleted(k,2))this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_1",U,B),this.setWidget(4);else if(this._dataProvider.isQuestCompleted(k,1))this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_0",B,U),this.setWidget(2);else if(F<=0){const B=(0,K.k)("GENERAL_PLURAL","",this._dataProvider.getQuestGiverCount(k)>1?"":"s");this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_PROGRESS_6",U,B),this.setWidget(4)}}getZoneIdForPanelsByDifficulty(){switch(ot.i.DIFFICULTY_MODE){case $.i.Expert:return this._expertModeZoneIDFromPanels;case $.i.Hard:return this._hardModeZoneIDFromPanels;default:case $.i.Regular:return this._zoneIDFromPanels}}getZoneIdForPanelIndex(k){return this.getZoneIdForPanelsByDifficulty()[k]}updateWidgetHUDForPostEndgame(k){if(lt.PET_COLLECTION_ZONE_IDS.includes(k))this.ownsAllPetsFromZone(k).then((B=>{var U;const F=(null===(U=this._dataProvider.getTitanAsset())||void 0===U?void 0:U.zone)===k;this.setSpeechBubbleText(F?"ZONE_GOALS_SPEECH_BUBBLE_POSTENDGAME_TITAN":B?"ZONE_GOALS_SPEECH_BUBBLE_POSTENDGAME_FOUND_ALL_PETS":"ZONE_GOALS_SPEECH_BUBBLE_POSTENDGAME_PET_COLLECTION"),this.setWidget(F?4:B?2:0)})).catch(G.RQr.createHandler("ZoneGoalsController: Could not determine if the player owns all pets in a regular zone"));else{if(k===rt.A_.ACADEMY)return this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_POSTENDGAME_GALE_ARCHIVES"),void this.setWidget(3);if(k===rt.A_.LAMPLIGHT)return this.setSpeechBubbleText("ZONE_GOALS_SPEECH_BUBBLE_POSTENDGAME_LAMPLIGHT_DUEL"),void this.setWidget(0)}}updateWidgetHudForDragonIsle(){W.q.instance.prodigy.gameContainer.get("196-d3a5").getActiveRiftsPortalIds().then((k=>{k.filter((k=>k!==V.ni.Portal1)).length>0?(this.setSpeechBubbleText("WORLD_MAP_SPEECH_BUBBLE_NEW_RIFTS_PORTAL"),this.setWidget(4)):(this.setSpeechBubbleText("WORLD_MAP_SPEECH_BUBBLE_NO_NEW_RIFTS_PORTAL"),this.setWidget(0))})).catch(G.RQr.createHandler("ZoneGoalsControllerComponent: Failed to fetch the player's active rifts portal IDs"))}ownsAllPetsFromZone(k){return(0,F.sH)(this,void 0,void 0,(function*(){if(G.Aq$.isDefined(this.petCollectionCompletionRecord[k]))return this.petCollectionCompletionRecord[k];{const B=yield at.P8.ownsAllPetsFromZone(k);return this.petCollectionCompletionRecord[k]=B,B}}))}toggleBubbleVisibility(k=!this._speechBubbleBooleanState.getValue()){this._speechBubbleBooleanState.getValue()!==k&&this._speechBubbleBooleanState.setValue(k)}tryAutoTrigger(){dt.isInteractionStarted()||(dt.setInteractionStart(),this.toggleDisplayMode(),this.setDismissalButtonActive(),this.sendPanelInterfaceOpenedEvent(),this.sendWidgetInterfaceOpenedEvent(!0))}toggleDisplayMode(){this.updateWidgetHUD(),this._currentMode===ut.HoverMode?(this._currentMode=ut.DisplayMode,this.applyCustomDisplay(),this.toggleBubbleVisibility(!0),this.sendWidgetInterfaceOpenedEvent(!1)):this._currentMode===ut.DisplayMode&&(this._currentMode=ut.HoverMode,this.toggleBubbleVisibility(!1),this.onClearCustomDisplay.dispatch())}setDismissalButtonActive(k=!0){this._overlayObject.active=k}dismiss(){this._currentMode===ut.DisplayMode&&(this.toggleDisplayMode(),this.setDismissalButtonActive(!1))}applyCustomDisplay(){let k=null;if(k=Y.U.isEndgameQuestActive()?rt.A_.ACADEMY:this._dataProvider.getLastVisitedZone(),G.Aq$.isDefined(k))this.updateWidgetHUD(k),this.onApplyCustomDisplay.dispatch([this.mapZoneIDToLocationID(k)]);else{const k=[],B=W.q.instance.prodigy.gameContainer.get("db5-fb6e");(ot.i.DIFFICULTY_MODE===$.i.Expert?this._expertModeZoneIDFromPanels:ot.i.DIFFICULTY_MODE===$.i.Hard?this._hardModeZoneIDFromPanels:this._zoneIDFromPanels).forEach((U=>{var F;const G=null===(F=ot.i.BUTTONS_CONFIG.find((k=>U===k.zone)))||void 0===F?void 0:F.requirementsID;B.meetsRequirementsDeprecated(G)&&k.push(this.mapZoneIDToLocationID(U))})),this.onApplyCustomDisplay.dispatch(k)}}mapZoneIDToLocationID(k){switch(k){case rt.A_.FOREST:return Z.P.Firefly;case rt.A_.SHIVERCHILL:return Z.P.Shiverchill;case rt.A_.SKYWATCH:return Z.P.Skywatch;case rt.A_.BONFIRE:return Z.P.Bonfire;case rt.A_.SHIPWRECK:return Z.P.Shipwreck;case rt.A_.ACADEMY:return Z.P.Academy;case rt.A_.FORESTHARD:return Z.P.FireflyHard;case rt.A_.SHIVERCHILLHARD:return Z.P.ShiverchillHard;case rt.A_.SKYWATCHHARD:return Z.P.SkywatchHard;case rt.A_.BONFIREHARD:return Z.P.BonfireHard;case rt.A_.SHIPWRECKHARD:return Z.P.ShipwreckHard;case rt.A_.ACADEMYHARD:return Z.P.AcademyHard;default:return null}}sendPanelInterfaceOpenedEvent(){var k,B;this._currentMode===ut.HoverMode?null===(k=this._panelInterfaceOpenHover)||void 0===k||k.sendInterfaceEvent():null===(B=this._panelInterfaceOpenAuto)||void 0===B||B.sendInterfaceEvent()}sendWidgetInterfaceOpenedEvent(k){var B,U;k?null===(B=this._widgetInterfaceOpenAuto)||void 0===B||B.sendInterfaceEvent():null===(U=this._widgetInterfaceOpenClicked)||void 0===U||U.sendInterfaceEvent()}getCurrentActivePanels(){const k=[];return this._booleanStates.forEach(((B,U)=>{B.getValue()&&k.push(this.getZoneIdForPanelIndex(U))})),k}destroy(){W.q.instance.game.broadcaster.removeAppListener(Q.n8.WorldMapDifficultyModeChanged,this),this.onZonePanelActivated.dispose(),this.onApplyCustomDisplay.dispose(),this.onClearCustomDisplay.dispose(),super.destroy()}};bt.ICON_PREFIX="icon-small-",bt.ACADEMY_LOCATION_INDEX=5,bt.POSTENDGAME_NOOT_WIDGET_ZONE_INDEXES=[Z.P.Bonfire,Z.P.Firefly,Z.P.Shipwreck,Z.P.Shiverchill,Z.P.Skywatch,Z.P.Academy,Z.P.Lamplight],bt.PERMANENT_NOOT_WIDGET_ZONE_INDEXES=[Z.P.DragonIsle],bt.PET_COLLECTION_ZONE_IDS=[rt.A_.BONFIRE,rt.A_.SHIVERCHILL,rt.A_.FOREST,rt.A_.SKYWATCH,rt.A_.SHIPWRECK,rt.A_.BONFIREHARD,rt.A_.SHIVERCHILLHARD,rt.A_.FORESTHARD,rt.A_.SKYWATCHHARD,rt.A_.SHIPWRECKHARD,rt.A_.BONFIREEXPERT,rt.A_.SHIVERCHILLEXPERT,rt.A_.FORESTEXPERT,rt.A_.SKYWATCHEXPERT,rt.A_.SHIPWRECKEXPERT],(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",z.E)],bt.prototype,"_playerDataProvider",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],bt.prototype,"_nootIcon",void 0),(0,F.Cg)([(0,G.MnK)(ht.R),(0,F.Sn)("design:type",ht.R)],bt.prototype,"_speechBubbleText",void 0),(0,F.Cg)([(0,G.MnK)(J.f),(0,F.Sn)("design:type",J.f)],bt.prototype,"_speechBubbleBooleanState",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],bt.prototype,"_overlayObject",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(ft.M),(0,F.Sn)("design:type",Array)],bt.prototype,"_zonePanels",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(J.f),(0,F.Sn)("design:type",Array)],bt.prototype,"_booleanStates",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.W_S)(),(0,F.Sn)("design:type",Array)],bt.prototype,"_zoneIDFromPanels",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.W_S)(),(0,F.Sn)("design:type",Array)],bt.prototype,"_hardModeZoneIDFromPanels",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.W_S)(),(0,F.Sn)("design:type",Array)],bt.prototype,"_expertModeZoneIDFromPanels",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],bt.prototype,"onZonePanelActivated",void 0),(0,F.Cg)([(0,G.MnK)(st.S),(0,F.Sn)("design:type",st.S)],bt.prototype,"_panelInterfaceOpenHover",void 0),(0,F.Cg)([(0,G.MnK)(st.S),(0,F.Sn)("design:type",st.S)],bt.prototype,"_panelInterfaceOpenAuto",void 0),(0,F.Cg)([(0,G.MnK)(st.S),(0,F.Sn)("design:type",st.S)],bt.prototype,"_widgetInterfaceOpenAuto",void 0),(0,F.Cg)([(0,G.MnK)(st.S),(0,F.Sn)("design:type",st.S)],bt.prototype,"_widgetInterfaceOpenClicked",void 0),bt=lt=(0,F.Cg)([(0,G.EVk)("ZoneGoalsController",X.Y.ui)],bt)},72849:(k,B,U)=>{"use strict";U.d(B,{M:()=>K});var F,G=U(8674),j=U(62459),$=U(35120),H=U(49237),V=U(37468),W=U(24110),q=U(88022);let K=F=class extends j.uAl{constructor(){super(...arguments),this.onTweenValueComplete=new j.HN0,this.onBarIconBounceComplete=new j.HN0,this.isGemFound=!1,this._isFirstQuestStarted=!0}set isFirstQuestStarted(k){this._isFirstQuestStarted=k}set cacheAsBitmap(k){const B=this.gameObject.transform;k?(B.setPosition(this.originalTransformPosition.x/2,this.originalTransformPosition.y/2),B.setPivot(.25,.25)):(B.setPosition(this.originalTransformPosition.x,this.originalTransformPosition.y),B.setPivot(.5,.5));this.gameObject.findComponent(W.B).getRootContainer().cacheAsBitmap=k}postCreate(){super.postCreate();const k=this.gameObject.transform;this._button.GameObject.parent=this.GameObject.parent;this._button.GameObject.transform.setPosition(k.anchoredPivotOffset.x,k.anchoredPivotOffset.y),this.originalTransformPosition=new j.I9Y(k.posX,k.posY),this.cacheAsBitmap=!0}destroy(){this.onTweenValueComplete.dispose(),this.onBarIconBounceComplete.dispose(),super.destroy()}updateHeader(k,B){this._headerText.text=k,this._headerIcon.updateAsset(this._headerIcon.atlasKey,B);const U=this._headerIcon.GameObject.findComponent(j.XVE),F=this._headerText.GameObject.findComponent(j.XVE);U.setPositionX(F.localPosition.x+F.fullWidth/2)}setProgressBarIcon(k){this._barIcon.updateAsset(q._.Ui_widget_modal_json,`gem-${k.replace(/_hard|_expert/,"")}`)}bounceBarIcon(){this._barIconBounceTween.playAnimation(),this._barIconBounceTween.onTweenComplete.addOnce((()=>this.onBarIconBounceComplete.dispatch()))}setProgressBarValue(k,B){j.Aq$.isDefined(this._progressBar)&&(B?(this._progressBar.setValue(k,!0),this._progressBar.onTweenValueComplete.addOnce((()=>this.onTweenValueComplete.dispatch()))):this._progressBar.setValue(k,!1))}hideBarText(){this._progressBar.hideBarText()}showBarText(){this._progressBar.showBarText()}updateProgressBarText(){this._isFirstQuestStarted?this.isGemFound&&this._progressBar.setBarText($.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(F.GEM_FOUND_KEY)):this._progressBar.setBarText($.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText(F.NOT_STARTED_KEY))}};K.NOT_STARTED_KEY="ZONE_GOALS_NOT_STARTED",K.GEM_FOUND_KEY="GEM_FOUND",(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],K.prototype,"_headerText",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],K.prototype,"_headerIcon",void 0),(0,G.Cg)([(0,j.MnK)(V.z),(0,G.Sn)("design:type",V.z)],K.prototype,"_progressBar",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],K.prototype,"_barIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.bTj),(0,G.Sn)("design:type",j.bTj)],K.prototype,"_barIconBounceTween",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],K.prototype,"onTweenValueComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],K.prototype,"onBarIconBounceComplete",void 0),(0,G.Cg)([(0,j.MnK)(H.$),(0,G.Sn)("design:type",H.$)],K.prototype,"_button",void 0),K=F=(0,G.Cg)([(0,j.EVk)("ZoneGoalsPanelController",j.YH6.ui)],K)},25983:(k,B,U)=>{"use strict";U.d(B,{s:()=>$});var F=U(8674),G=U(62459),j=U(49237);let $=class extends G.uAl{constructor(){super(...arguments),this.onClose=new G.HN0,this.onConfirm=new G.HN0}create(){super.create(),this.gameObject.active=!1,this._closeButton.onClick.add(this.close,this),this._okButton.onClick.add(this.close,this),this._noButton.onClick.add(this.close,this),this._yesButton.onClick.add((()=>{this.onConfirm.dispatch()}),this)}destroy(){this._closeButton.onClick.removeAll(this),this._noButton.onClick.removeAll(this),this._okButton.onClick.removeAll(this),this._yesButton.onClick.removeAll(this),this.onClose.dispose(),this.onConfirm.dispose(),super.destroy()}showOneButton(k,B,U,F,j=!1){this.configure(k,B,U,j,!0);for(const $ of this._okButton.GameObject.findComponentsInChildren(G.EYj))$.text=F;this.gameObject.active=!0}showTwoButton(k,B,U,F,j,$=!1){this.configure(k,B,U,$,!1);for(const H of this._noButton.GameObject.findComponentsInChildren(G.EYj))H.text=F;for(const H of this._yesButton.GameObject.findComponentsInChildren(G.EYj))H.text=j;this.gameObject.active=!0}close(){this.gameObject.active=!1,this.onClose.dispatch()}configure(k,B,U,F,G){this._splashGraphic.updateAsset(k.atlas,k.frame),this._titleText.text=B,this._descriptionText.text=U,this._lockIcon.active=F,this._okButton.GameObject.active=G,this._yesButton.GameObject.active=!G,this._noButton.GameObject.active=!G}};(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],$.prototype,"_splashGraphic",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],$.prototype,"_titleText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],$.prototype,"_descriptionText",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],$.prototype,"_closeButton",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],$.prototype,"_okButton",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],$.prototype,"_noButton",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],$.prototype,"_yesButton",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],$.prototype,"_lockIcon",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onClose",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onConfirm",void 0),$=(0,F.Cg)([(0,G.EVk)("LocationDialogPrefab")],$)},55237:(k,B,U)=>{"use strict";U.d(B,{X:()=>Q});var F=U(8674),G=U(62459),j=U(17446),$=U(28152),H=U(6190),V=U(63746),W=U(29834),q=U(65050),K=U(67665),z=U(30226),Y=U(34374);let Q=class extends G.uAl{constructor(){super(...arguments),this._maximumRewardCount=2,this._currentRewardCount=0,this.skipAward=!1,this._menuChangesDelayMs=1300}run(){var k;const B=this._rouletteComponent.getMiddlemostChild().findComponentInChildren(V.Z);B.GameObject.parent.addChild(B.GameObject);const U=B.itemCardData,F=B.itemData;this._cardComponent.initializeItemCard({id:U.id,type:U.type,N:U.N,data:U.data,receivedThroughGotItemFlow:!1});const $=z.J.getItemName(U),H=G.Aq$.isDefined(U.N)&&U.N>1?`${U.N} ${$}`:$;this._titleText.text=H,this._bodyText.text=this._localizer.getText(z.J.getLocalizationFlavorKey(U));const W=z.J.convertRarityToText(null!==(k=F.rarity)&&void 0!==k?k:j.E.Common).toLowerCase(),K=this._localizer.getText(F.rarity===j.E.Uncommon?"YOU_GOT_AN_REWARD":"YOU_GOT_A_REWARD",W);this.skipAward||(this._itemAward.items=[{ID:U.id,type:U.type,N:U.N}],this._itemAward.instanceType=this._rouletteComponent.instanceTypeForSegmentEvent,this._rouletteComponent.sourceTypeForSegmentEvent&&(this._itemAward.awardSourceType=this._rouletteComponent.sourceTypeForSegmentEvent),this._rouletteComponent.instanceTypeForSegmentEvent===q.N.RiftRun||this._rouletteComponent.instanceTypeForSegmentEvent===q.N.BossRift?this._itemAward.instanceId=this._segment.rifts.riftInstanceUuid:this._rouletteComponent.instanceTypeForSegmentEvent!==q.N.FestivalDaily&&this._rouletteComponent.instanceTypeForSegmentEvent!==q.N.FestivalChestRouletteSpin&&this._rouletteComponent.instanceTypeForSegmentEvent!==q.N.FestivalDailyBossRouletteSpin||(this._itemAward.instanceId=this._segment.festival.getFestivalInstanceName(),this._itemAward.instanceType=this._rouletteComponent.instanceTypeForSegmentEvent),this._itemAward.run()),this._cardTransform.setAnchoredPivotOffset(0,this._cardTransform.anchoredPivotOffset.y),this._displayFinalRewardTween.onTweenComplete.addOnce((()=>{this._currentRewardCount++,this._currentRewardCount{this._rouletteComponent.headerText.text=K,this._rouletteObject.active=!1,this._cardComponent.GameObject.active=!0}),this._menuChangesDelayMs)}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Q.prototype,"_rouletteObject",void 0),(0,F.Cg)([(0,G.MnK)(Y.i),(0,F.Sn)("design:type",Y.i)],Q.prototype,"_rouletteComponent",void 0),(0,F.Cg)([(0,G.MnK)(H.q),(0,F.Sn)("design:type",H.q)],Q.prototype,"_itemAward",void 0),(0,F.Cg)([(0,G.MnK)(W.j),(0,F.Sn)("design:type",W.j)],Q.prototype,"_shineAnimator",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],Q.prototype,"_titleText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],Q.prototype,"_bodyText",void 0),(0,F.Cg)([(0,G.MnK)(G.XVE),(0,F.Sn)("design:type",G.XVE)],Q.prototype,"_cardTransform",void 0),(0,F.Cg)([(0,G.MnK)(V.Z),(0,F.Sn)("design:type",V.Z)],Q.prototype,"_cardComponent",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Q.prototype,"_nextButtonContainer",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Q.prototype,"_okayButtonContainer",void 0),(0,F.Cg)([(0,G.MnK)(G.bTj),(0,F.Sn)("design:type",G.bTj)],Q.prototype,"_displayFinalRewardTween",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Q.prototype,"_maximumRewardCount",void 0),(0,F.Cg)([(0,G.Cdj)(G.$Zn.Localization),(0,F.Sn)("design:type",G.dTp)],Q.prototype,"_localizer",void 0),(0,F.Cg)([(0,G.Cdj)("c47-20b6"),(0,F.Sn)("design:type",K.Y)],Q.prototype,"_segment",void 0),Q=(0,F.Cg)([(0,G.EVk)("BossRewardDetermined",$.Y.adventureUi)],Q)},96268:(k,B,U)=>{"use strict";U.d(B,{a:()=>j});var F=U(8674),G=U(62459);let j=class extends G.uAl{get width(){return this._width}get height(){return this._height}create(){var k,B;super.create(),this._width=(null!==(k=this._width)&&void 0!==k?k:this.gameObject.transform.sizeDelta.width)*this.gameObject.transform.localScale.x,this._height=null!==(B=this._height)&&void 0!==B?B:this.gameObject.transform.sizeDelta.height*this.gameObject.transform.localScale.y}};(0,F.Cg)([(0,G.g11)(),(0,G.Lr6)(0),(0,G.nKb)("overrideWidth"),(0,F.Sn)("design:type",Number)],j.prototype,"_width",void 0),(0,F.Cg)([(0,G.g11)(),(0,G.Lr6)(0),(0,G.nKb)("overrideHeight"),(0,F.Sn)("design:type",Number)],j.prototype,"_height",void 0),j=(0,F.Cg)([(0,G.EVk)("RouletteChild")],j)},34374:(k,B,U)=>{"use strict";U.d(B,{i:()=>Q});var F=U(8674),G=U(62459),j=U(95891),$=U(35120),H=U(28152),V=U(63746),W=U(23283),q=U(65050),K=U(53661),z=U(44094),Y=U(96268);let Q=class extends G.uAl{constructor(){super(...arguments),this.padding=20,this.maxVelocity=-2e3,this.initialVelocity=-60,this.spinTime=4,this.decelerationTime=3,this.spinningHeaderTextKey="SPINNING_FOR_YOUR_REWARD",this.onStart=new G.HN0,this.onComplete=new G.HN0,this.onTick=new G.HN0,this._velocity=this.initialVelocity,this._children=new Set,this.isRespin=!1}get width(){return this._width}get height(){return this._height}create(){var k;super.create(),this._width=this.gameObject.transform.sizeDelta.width,this._height=this.gameObject.transform.sizeDelta.height,this.reset(),this.instanceTypeForSegmentEvent=null!==(k=this.getInjectedValue(K.Co.InstanceType))&&void 0!==k?k:q.N.OpenWorld,this._cardSpacing=this._tail.width+this.padding}reset(){for(const k of this.gameObject.children)k.active=!1;for(this._tail=this.getCard(),this._tailTransform=this._tail.GameObject.transform,this._tailTransform.setAnchoredPivotOffset(-this._width/2,this._tailTransform.anchoredPivotOffset.y);this._tailTransform.anchoredPivotOffset.x0&&Math.abs(F+this._winningCardOffset)<.25*B.width){const k=this.forcedRewards.shift();B.GameObject.findComponentInChildren(V.Z,!0).initializeItemCard({id:k.ID,type:k.type,N:k.N,data:k.data})}}getCard(){const k=this.pool.getObject().findComponentInChildren(Y.a);return this._children.add(k),this.gameObject.addChild(k.GameObject),k}update(){super.update(),0!==this._velocity&&this.offsetChildren(this._velocity*($.q.instance.game.time.deltaMS/1e3))}offsetChildren(k){for(const B of Array.from(this._children)){const U=B.GameObject.transform;U.posX+=k,U.anchoredPivotOffset.x+.5*B.width<-.5*this._width&&(B.GameObject.active=!1,this._children.delete(B))}if(this._tailTransform)for(;this._tailTransform.anchoredPivotOffset.x+.5*this._tail.width+this.padding{this._winningCardOffset=U-j.x,this.offsetChildren(j.x-F),F=j.x})).onTweenComplete.add((()=>{this._winningCardOffset=0,this.offsetChildren(U-F),this.onComplete.dispatch()}))}getMiddlemostChild(){return j.minBy(this.gameObject.children,(k=>Math.abs(k.transform.anchoredPivotOffset.x)))}destroy(){this.onStart.dispose(),this.onComplete.dispose(),this.onTick.dispose(),this.pool.destroy(),super.destroy()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Q.prototype,"padding",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Q.prototype,"maxVelocity",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Q.prototype,"initialVelocity",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Q.prototype,"spinTime",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],Q.prototype,"decelerationTime",void 0),(0,F.Cg)([(0,G.MnK)(G.uAl),(0,F.Sn)("design:type",Object)],Q.prototype,"pool",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],Q.prototype,"headerText",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],Q.prototype,"spinningHeaderTextKey",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Q.prototype,"onComplete",void 0),(0,F.Cg)([(0,G.Cdj)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],Q.prototype,"_baseLocalizer",void 0),Q=(0,F.Cg)([(0,G.EVk)("Roulette",H.Y.adventureUi)],Q)},65088:(k,B,U)=>{"use strict";U.d(B,{H:()=>rt});var F,G,j,$=U(62459),H=U(24521),V=U(23029),W=U(35120),q=U(98252),K=U(76277),z=U(223),Y=U(92661),Q=U(77981);!function(k){k.Equals="equals",k.DoesNotEqual="doesNotEqual",k.GreaterThan="greaterThan",k.GreaterThanOrEqualTo="greaterThanOrEqualTo",k.LessThan="lessThan",k.LessThanOrEqualTo="lessThanOrEqualTo",k.IncludedIn="includedIn",k.NotIncludedIn="notIncludedIn"}(F||(F={})),function(k){k.FeatureVariable="featureVariable",k.isFeatureEnabled="isFeatureEnabled",k.PlayerLevel="playerLevel",k.WasTriggeredBy="wasTriggeredBy",k.IsMember="isMember",k.IsPlayingAtSchool="isPlayingAtSchool",k.IsPlayingOnMobileApp="isPlayingOnMobileApp",k.MembershipTier="membershipTier",k.IsBattlePassActive="isBattlePassActive",k.isOTPEnabled="isOTPEnabled",k.HasMembershipCategory="hasMembershipCategory",k.membershipThreeTierEligible="membershipThreeTierEligible",k.Locale="locale"}(G||(G={})),function(k){k.Any="any",k.All="all"}(j||(j={}));const X=Y.RZV((()=>Y.KCZ([Y.YjP(),Y.aig(),Y.zMY(),Y.YOg(X)]))),Z=Y.Ikc({featureName:Y.YjP().optional(),featureVariableName:Y.YjP().optional(),membershipCategory:Y.k5n(Q.r).optional()}),J=Y.Ikc({condition:Y.k5n(G),operator:Y.k5n(F),value:X,params:Z.optional()}),tt=Y.RZV((()=>Y.Ikc({matchesAny:Y.YOg(tt).optional(),matchesAll:Y.YOg(tt).optional(),conditions:Y.YOg(J).optional()}))),et=Y.Ikc({assets:Y.YOg(Y.k5n(H.r))}),it=Y.Ikc({id:Y.KCZ([Y.Whr().min(0),Y.YjP()]),description:Y.YjP().optional(),toEvaluate:tt,success:et});Y.Ikc({name:Y.YjP(),sets:Y.YOg(it)});var st=U(89305),nt=U(29738);class at{static checkConditions(k,B,U){return B===j.Any?k.some((k=>this.operatorEvaluate(this.getLeftComparand(k,U),k.value,k.operator))):k.every((k=>this.operatorEvaluate(this.getLeftComparand(k,U),k.value,k.operator)))}static getLeftComparand(k,B){var U,F;let j;const H=W.q.instance.prodigy.gameContainer.get("073-6f3b"),V=W.q.instance.prodigy.gameContainer.get("e20-0fb0");switch(k.condition){case G.FeatureVariable:j=null===(U=H.getFeatureValue(k.params.featureName))||void 0===U?void 0:U[k.params.featureVariableName];break;case G.isFeatureEnabled:j=H.isOn(k.params.featureName);break;case G.PlayerLevel:j=V.player.getLevel();break;case G.WasTriggeredBy:j=B;break;case G.IsMember:j=V.player.hasMembership();break;case G.IsPlayingAtSchool:j=V.player.isPlayingAtSchool();break;case G.IsPlayingOnMobileApp:j=q.pF.isNativeApp();break;case G.MembershipTier:j=V.getMembershipUpsell().tier;break;case G.IsBattlePassActive:const Y=W.q.instance.prodigy.gameContainer.get("8dc-04eb").getCachedBattlePassData();j=$.Aq$.isDefined(Y);break;case G.isOTPEnabled:j=(0,K.G)(z.l).enabled;break;case G.HasMembershipCategory:const Q=null===(F=k.params)||void 0===F?void 0:F.membershipCategory;j=!!$.Aq$.isDefined(Q)&&(0,st.nO)(Q);break;case G.membershipThreeTierEligible:j=q.pF.eligibleForMembershipPurchaseForMultipleTiers();break;case G.Locale:j=nt.O.localeCode;break;default:$.VyI.log(`The specified dynamic prompt condition: '${k.condition}' is not a valid condition.`,$.$bb.Error)}return j}static operatorEvaluate(k,B,U){return at.getOperatorFunction(U)(k,B)}static getOperatorFunction(k){let B;switch(k){case F.Equals:B=(k,B)=>k===B;break;case F.DoesNotEqual:B=(k,B)=>k!==B;break;case F.GreaterThan:B=(k,B)=>k>B;break;case F.GreaterThanOrEqualTo:B=(k,B)=>k>=B;break;case F.LessThan:B=(k,B)=>kk<=B;break;case F.IncludedIn:B=(k,B)=>(Array.isArray(B)?B:[B]).includes(k);break;case F.NotIncludedIn:B=(k,B)=>!(Array.isArray(B)?B:[B]).includes(k);break;default:$.VyI.log(`Invalid operator string: '${k}'.`,$.$bb.Error)}return B}}class rt{static evaluate(k,B){const U=null!=B?B:V.R.loadData(H.r.DynamicPromptRuleset_json);let F;if($.Aq$.isDefined(U))for(const G of U.sets)if(G.toEvaluate.matchesAny?G.toEvaluate.matchesAny.some((B=>this.match(B,j.Any,k)))&&(F=G.success):G.toEvaluate.matchesAll&&G.toEvaluate.matchesAll.every((B=>this.match(B,j.All,k)))&&(F=G.success),F)return F;return this.failureMessage()}static match(k,B,U){return B===j.Any?this.matchAny(k,B,U)||this.matchAll(k,B,U)||this.matchConditions(k,B,U):this.matchAny(k,B,U)&&this.matchAll(k,B,U)&&this.matchConditions(k,B,U)}static matchAny(k,B,U){return k.matchesAny?k.matchesAny.some((k=>this.match(k,j.Any,U))):B!==j.Any}static matchAll(k,B,U){return k.matchesAll?k.matchesAll.every((k=>this.match(k,j.All,U))):B!==j.Any}static matchConditions(k,B,U){return k.conditions?at.checkConditions(k.conditions,B,U):B!==j.Any}static failureMessage(){$.VyI.log("The rules engine failed to determine a success output.",$.$bb.Error)}}},58707:(k,B,U)=>{"use strict";U.d(B,{b:()=>X});var F=U(8674),G=U(62459),j=U(10471),$=U(223),H=U(66582),V=U(35120),W=U(28559),q=U(67665),K=U(76277),z=U(13956),Y=U(95057),Q=U(64353);let X=class extends G.uAl{constructor(){super(...arguments),this._tooltipConfig=W.f}destroy(){this.tryDismissTooltip(),super.destroy()}setTooltipConfig(k){this._tooltipConfig=k}setMemberAdConfig(k){this._memberAdConfig=k}handleNotEnoughCurrency(k,B,U){const F=this._loggedInPlayer.player.getMemberTier(),G=this._loggedInPlayer.player.getCurrencyAmount(k.currency,k.type),W=k.value-G;if(this._segment.item.sendInsufficientCurrencyEvent(k,{sink_type:B,sink_id:U}),!j.h.includes(k.currency)||this._loggedInPlayer.player.isPlayingAtSchool()||!(0,K.G)($.l).enabled&&H.kG.includes(F)){const B=this._tooltipContainer.transform,U=Object.assign(Object.assign({},this._tooltipConfig),{textArgs:[W]}),F=27===k.currency?"YOU_NEED_MORE_MAGICOIN":"YOU_NEED_MORE_CURRENCY";this._tooltipObject=V.q.instance.prodigy.prefabFactory.createTooltip(B,F,U)}else this._segment.purchase.sendFunnelStart({type:this._memberAdConfig.funnelTriggerType,category:this._memberAdConfig.funnelCategory,contentId:U,adType:Y.R.UnifiedConversionFlow,adVersion:Q.P.getAdVersion(this._memberAdConfig.funnelName)}),V.q.instance.prodigy.open.membershipInfo(void 0,{conversionFunnelName:this._memberAdConfig.funnelName,conversionStage:this._memberAdConfig.conversionStage,conversionStaticOrVideo:Y.R.Static})}tryDismissTooltip(){var k;(null===(k=this._tooltipObject)||void 0===k?void 0:k.activeInHierarchy)&&(this._tooltipObject.destroyDeferred(),this._tooltipObject=void 0)}};(0,F.Cg)([(0,z.b)("c47-20b6"),(0,F.Sn)("design:type",q.Y)],X.prototype,"_segment",void 0),(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",Object)],X.prototype,"_loggedInPlayer",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],X.prototype,"_tooltipContainer",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],X.prototype,"_tooltipConfig",void 0),(0,F.Cg)([(0,G.vCS)(),(0,F.Sn)("design:type",Object)],X.prototype,"_memberAdConfig",void 0),X=(0,F.Cg)([(0,G.EVk)("NotEnoughCurrencyResponseComponent",G.YH6.ui)],X)},64353:(k,B,U)=>{"use strict";U.d(B,{P:()=>W});var F,G=U(62459),j=U(24521),$=U(35120),H=U(23029),V=U(65088);!function(k){k.SchoolCTAGate="School CTA Gate",k.UnifiedConversionFlowTTUpsell="Unified Conversion Flow TT Upsell"}(F||(F={}));class W{static get unifiedConversionFlowRuleset(){return H.R.loadData(j.r.UnifiedConversionFlowRuleset_json)}static getAdVersion(k){const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(this.shouldUseUnifiedConversionFlow(k))return B.isPlayingAtSchool()?F.SchoolCTAGate:F.UnifiedConversionFlowTTUpsell}static getAdVersionFromTriggerCategory(k){const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(this.shouldUseUnifiedConversionFlowForTriggerCategory(k))return B.isPlayingAtSchool()?F.SchoolCTAGate:F.UnifiedConversionFlowTTUpsell}static shouldUseUnifiedConversionFlow(k){return G.Aq$.isDefined(this.evaluateUnifiedConversionFlowRules(k))}static shouldUseUnifiedConversionFlowForTriggerCategory(k){switch(k){case"daily-login-calendar":case"Item-Equip":case"Bounty":case"Daily":case"Duels":case"HUD":case"Loot-Dash":case"Mailbox":case"Map-Transition":case"Member-Jar":case"Minigame-Boost":case"mythics":case"Pet-Gear":case"Pet-Merge":case"Reward":case"Rifts":case"segmented-offers":case"Social":case"Star-Jar":case"Store":case"World":case"Zone-Lock":case"Treasure-Track":return!0;case"Deprecate":case"Pet-Slots":case"Pet":default:return!1}}static evaluateUnifiedConversionFlowRules(k){return V.H.evaluate(k,this.unifiedConversionFlowRuleset)}}},7259:(k,B,U)=>{"use strict";U.d(B,{y:()=>W});var F=U(8674),G=U(78465),j=U.n(G),$=U(35120),H=U(34829),V=U(23034);class W{static showPrompt(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=W.addCustomCSS(),{value:F}=yield j().fire({titleText:k,input:"text",inputValue:B,showCancelButton:!0,position:"bottom",buttonsStyling:!1,reverseButtons:!0,customClass:{popup:"externalPromptPopup",confirmButton:"externalPromptConfirm",cancelButton:"externalPromptCancel",actions:"externalPromptActions",title:"externalPromptTitle",input:"externalPromptInput"}});return W.removeCustomCSS(U),F}))}static showTextareaPrompt(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=W.addCustomCSS(),{value:G}=yield j().fire({titleText:k,allowOutsideClick:!1,input:"textarea",inputAttributes:{maxlength:`${U}`,resize:"none"},inputValue:B,showCancelButton:!0,position:"bottom",buttonsStyling:!1,reverseButtons:!0,customClass:{popup:"externalPromptPopup",confirmButton:"externalPromptConfirm",cancelButton:"externalPromptCancel",actions:"externalPromptActions",title:"externalPromptTitle",input:"externalPromptInput"}});return W.removeCustomCSS(F),G}))}static getSingleImageURL(k){const B=$.q.instance.prodigy.assets.getAsset(`singleImage-${k}`),U=B.filename;return`${H.s.get("GameConstants.Build.ASSETS_LOCATION")}${V.s.ASSET_FOLDER}/single-images/${U}/${B.v}/${U}.png`}static addCustomCSS(){const k=document.createElement("style");return k.innerHTML=`\n .externalPromptPopup {\n border-image: url('${this.getSingleImageURL(337)}');\n border-image-slice: 50 fill;\n border-image-width: 50px;\n background-color: transparent;\n height: 279px;\n width: 466px;\n }\n\n .externalPromptTitle {\n font: 400 24px 'ABeeZee';\n color: #363636;\n margin: 0;\n }\n\n .externalPromptInput {\n height: 56px;\n border-radius: 8px !important;\n border: 1px solid #363636 !important;\n font: 400 18px 'ABeeZee' !important;\n color: #363636 !important;\n }\n\n .externalPromptActions {\n margin-top: 5px;\n }\n\n .externalPromptConfirm {\n border-image: url('${this.getSingleImageURL(332)}');\n border-image-slice: ${this.BUTTON_HEIGHT/2} fill;\n border-image-width: ${this.BUTTON_HEIGHT/2}px;\n width: ${this.BUTTON_WIDTH}px;\n height: ${this.BUTTON_HEIGHT}px;\n font: 400 18px 'Paytone One';\n color: #FFFFFF;\n margin: 0px 8px 0px 8px;\n padding-bottom: 9px;\n }\n\n .externalPromptCancel {\n border-image: url('${this.getSingleImageURL(335)}');\n border-image-slice: ${this.BUTTON_HEIGHT/2} fill;\n border-image-width: ${this.BUTTON_HEIGHT/2}px;\n width: ${this.BUTTON_WIDTH}px;\n height: ${this.BUTTON_HEIGHT}px;\n font: 400 18px 'Paytone One';\n color: #363636;\n margin: 0px 8px 0px 8px;\n padding-bottom: 9px;\n }\n `,document.getElementsByTagName("head")[0].appendChild(k),k}static removeCustomCSS(k){document.getElementsByTagName("head")[0].removeChild(k)}}W.BUTTON_WIDTH=96,W.BUTTON_HEIGHT=60},78407:(k,B,U)=>{"use strict";U.d(B,{_:()=>H});var F=U(8674),G=U(79687),j=U(13956),$=U(97200);let H=class{constructor(){this._hudData=void 0}getHudData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this._hudData||(this._hudData=yield this._networkHandler.getHudData()),this._hudData}))}initialize(k){this._hudData=k}};(0,F.Cg)([(0,j.b)("091-489f"),(0,F.Sn)("design:type",$.J)],H.prototype,"_networkHandler",void 0),H=(0,F.Cg)([(0,G.injectable)()],H)},97200:(k,B,U)=>{"use strict";U.d(B,{J:()=>$});var F=U(8674),G=U(48417),j=U(76546);class $ extends j.D{getHudData(){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(G.D.Hud.GetHudData,{})).buttonData}))}}},40579:(k,B,U)=>{"use strict";U.d(B,{W:()=>W});var F=U(8674),G=U(79687),j=U(89067),$=U(35120),H=U(73797),V=U(60228);let W=class{constructor(){this._cachedButtonBreadcrumbs={},this._cachedButtonLabels={},this._demandingExclusiveAttention=new Set,this._cachedButtonAlternateLabels={},this._broadcaster=$.q.instance.game.broadcaster,this.updateCachedLabelData(j.ts.NonMember,{labelValue:(0,V.Bz)(j.ts.NonMember)}),this.updateCachedLabelData(j.ts.CoreMember,{labelValue:(0,V.Bz)(j.ts.CoreMember)}),this.updateCachedLabelData(j.ts.PlusMember,{labelValue:(0,V.Bz)(j.ts.PlusMember)}),this.updateCachedLabelData(j.ts.UltraMember,{labelValue:(0,V.Bz)(j.ts.UltraMember)})}postConstruct(){this._broadcaster.addAppListener(H.Y1.HighlightMapButton,(()=>{this.updateDemandsExclusiveAttention(j.ts.Map,!0)}),this,H.HG.HUD,!0),this._broadcaster.addAppListener(H.Y1.HUDRevampDemandAttention,(k=>{this.updateDemandsExclusiveAttention(k,!0)}),this,void 0,!0),this._broadcaster.addAppListener(H.Y1.HUDRevampEndOperation,(()=>{const k=[...this._demandingExclusiveAttention];this._demandingExclusiveAttention.clear();for(const B of k)this._broadcaster.broadcast(H.Y1.HUDRevampButtonDataUpdated,void 0,[B]);this._broadcaster.broadcast(H.Y1.HUDRevampExclusiveAttentionChanged,void 0,[!1])}),this,void 0,!0)}getCachedButtonData(k){return{demandsExclusiveAttention:this._demandingExclusiveAttention.has(k),notificationData:this._cachedButtonBreadcrumbs[k],alternateLabel:this._cachedButtonAlternateLabels[k],labelData:this.formatLabelDataAsConfig(this._cachedButtonLabels[k])}}formatLabelDataAsConfig(k){return"object"==typeof k?{labelValue:k.labelValue,pillColour:k.pillColour}:{labelValue:k}}updateNotificationBadge(k,B){this._cachedButtonBreadcrumbs[k]=B,this._broadcaster.broadcast(H.Y1.HUDRevampButtonDataUpdated,void 0,[k])}updateCachedLabelData(k,B){this._cachedButtonLabels[k]=B,this._broadcaster.broadcast(H.Y1.HUDRevampButtonDataUpdated,void 0,[k])}updateDemandsExclusiveAttention(k,B){const U=this._demandingExclusiveAttention.size>0;B?this._demandingExclusiveAttention.add(k):this._demandingExclusiveAttention.delete(k);const F=this._demandingExclusiveAttention.size>0;this._broadcaster.broadcast(H.Y1.HUDRevampButtonDataUpdated,void 0,[k]),U!==F&&this._broadcaster.broadcast(H.Y1.HUDRevampExclusiveAttentionChanged,void 0,[F])}updateSecondaryLabel(k,B){this._cachedButtonAlternateLabels[k]=B,$.q.instance.game.broadcaster.broadcast(H.Y1.HUDRevampButtonDataUpdated,void 0,[k])}};(0,F.Cg)([(0,G.postConstruct)(),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],W.prototype,"postConstruct",null),W=(0,F.Cg)([(0,G.injectable)(),(0,F.Sn)("design:paramtypes",[])],W)},67818:(k,B,U)=>{"use strict";U.d(B,{i:()=>q});var F=U(8674),G=U(62459),j=U(91207),$=U(77938),H=U(28152),V=U(34603),W=U(29834);let q=class extends G.uAl{constructor(){super(...arguments),this.onIconLoaded=new G.HN0,this._updateHasBeenCalled=!1}get itemID(){return this._itemID}get isLoaded(){return this._iconTarget.isLoaded}create(){super.create(),this._updateHasBeenCalled||this.updateIconImage()}setItem(k,B,U=!1){this._itemAssetType!==k||this._itemID!==B?(this._itemAssetType=k,this._itemID=B,this.updateIconImage()):U&&this.onIconLoaded.dispatch()}setItemAssetType(k){this._itemAssetType!==k&&(this._itemAssetType=k,this.updateIconImage())}setItemID(k){this._itemID!==k&&(this._itemID=k,this.updateIconImage())}setIconTarget(k){this._iconTarget=k,this.updateIconImage()}updateIconImage(){if(this._updateHasBeenCalled=!0,G.Aq$.isDefined(this._itemAssetType)&&("gold"===this._itemAssetType||G.Aq$.isDefined(this._itemID)))switch(this._morphMarbleSpine&&(this._morphMarbleSpine.GameObject.active=!1),this._iconTarget.OnLoaded.addOnce(this.onIconLoaded.dispatch,this.onIconLoaded),this._itemAssetType){case"gold":this._iconTarget.setAsset(j.E.getIconForType("currency",1)).catch(G.RQr.createHandler("Could not set gold asset"));break;case"item":const k=$.t.getItem(this._itemAssetType,this._itemID).data;k.effect&&G.Aq$.isDefined(k.effect.transform)?(this._iconTarget.setAsset(j.E.getIconForType(k.effect.transform,k.effect.ID)).catch(G.RQr.createHandler("Could not set item asset")),this._morphMarbleSpine&&(this._morphMarbleSpine.GameObject.active=!0,this._morphMarbleSpine.playAnimation("idle",!0))):this._iconTarget.setAsset(j.E.getIconForType(this._itemAssetType,this._itemID)).catch(G.RQr.createHandler("Could not set item asset"));break;default:this._iconTarget.setAsset(j.E.getIconForType(this._itemAssetType,this._itemID)).catch(G.RQr.createHandler("Could not set item asset"))}}destroy(){this.onIconLoaded.dispose(),super.destroy()}};(0,F.Cg)([(0,G.MnK)(V._),(0,F.Sn)("design:type",V._)],q.prototype,"_iconTarget",void 0),(0,F.Cg)([(0,G.MnK)(W.j),(0,F.Sn)("design:type",W.j)],q.prototype,"_morphMarbleSpine",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],q.prototype,"_itemAssetType",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],q.prototype,"_itemID",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],q.prototype,"onIconLoaded",void 0),q=(0,F.Cg)([(0,G.EVk)("ItemAssetIcon",H.Y.ui)],q)},98762:(k,B,U)=>{"use strict";U.d(B,{U:()=>V});var F=U(8674),G=U(62459),j=U(77938),$=U(28152),H=U(67818);let V=class extends G.uAl{get itemID(){return this._itemID}get itemType(){return this._itemType}create(){super.create(),this._itemID&&this._itemType&&this.updateItemInfo()}init(k,B){this._itemType=k,this._itemID=B,this.updateItemInfo()}updateItemInfo(){var k;const B=null===(k=j.t.getItem(this._itemType,this._itemID))||void 0===k?void 0:k.data;B?(this._name.text=B.name,this._icon.setItem(this._itemType,this._itemID)):G.VyI.log(`Invalid or missing item data found for itemType ${this._itemType}, itemID ${this._itemID}`,G.$bb.Warning)}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_itemID",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],V.prototype,"_itemType",void 0),(0,F.Cg)([(0,G.MnK)(H.i),(0,F.Sn)("design:type",H.i)],V.prototype,"_icon",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],V.prototype,"_name",void 0),V=(0,F.Cg)([(0,G.EVk)("ItemIconAndName",$.Y.ui)],V)},57324:(k,B,U)=>{"use strict";U.d(B,{m:()=>V});var F=U(8674),G=U(62459),j=U(83133),$=U(28152),H=U(98762);let V=class extends G.uAl{constructor(){super(...arguments),this._itemCards=[],this.itemSelected=new G.HN0}create(){super.create(),this._itemCards.forEach((k=>{const B=k.findComponent(H.U);k.findComponent(j.l).onSelected.add((()=>{this.itemSelected.dispatch(B.itemType,B.itemID)}))}))}setItems(k){this._itemCards.length===k.length?this._itemCards.forEach(((B,U)=>{B.findComponent(H.U).init(k[U].type,k[U].ID)})):G.VyI.log(`Attempted to set ${k.length} items for ${this._itemCards.length} cards`,G.$bb.Error)}destroy(){this.itemSelected.dispose(),super.destroy()}};(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],V.prototype,"_itemCards",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"itemSelected",void 0),V=(0,F.Cg)([(0,G.EVk)("ItemSelector",$.Y.ui)],V)},59503:(k,B,U)=>{"use strict";U.d(B,{H:()=>G,f:()=>H});var F,G,j=U(8674),$=U(62459);!function(k){k.Top="top",k.Bottom="bottom",k.Left="left",k.Right="right"}(G||(G={}));let H=F=class extends $.uAl{constructor(){super(...arguments),this._direction=G.Top,this._offset=0,this._fitOnCreate=!0,this._considerTargetBounds=!1,this.onPostFit=new $.HN0}postCreate(){var k;super.postCreate(),this._rectTransform=this.gameObject.findComponent($.XVE),this._rectTransform?(this._fitOnCreate&&this._target&&this.fit(),null===(k=this._target)||void 0===k||k.transform.onWorldMatrixChanged.add(this.fit,this)):$.VyI.log(`FitToTargetComponent: No RectTransform found on ${this.gameObject.name}`,$.$bb.Error)}destroy(){var k;this.onPostFit.dispose(),super.destroy(),null===(k=this._target)||void 0===k||k.transform.onWorldMatrixChanged.remove(this.fit,this)}fit(){var k,B,U;if(!this._target)return void $.VyI.log(`FitToTargetComponent: No target set on ${this.gameObject.name}`,$.$bb.Warning);if(!this._rectTransform)return void $.VyI.log(`FitToTargetComponent: No RectTransform found on ${this.gameObject.name}`,$.$bb.Error);if((null===(k=this.gameObject.parent)||void 0===k?void 0:k.transform)instanceof $.XVE){const k=this.gameObject.parent.transform;this._rectTransform.setAnchorMin(k.pivot.x,k.pivot.y),this._rectTransform.setAnchorMax(k.pivot.x,k.pivot.y)}const j=this._target.transform.worldPosition,H=this._offset,V=null!==(U=null===(B=this._bounds)||void 0===B?void 0:B.getBounds())&&void 0!==U?U:F.defaultBounds,W=new $.or0(this._rectTransform.fullWidth,this._rectTransform.fullHeight);let q;if(this._considerTargetBounds){const k=this._target.findComponent($.XVE);if(k){q=k.getBounds();const B=k.localMatrix.applyInverse({x:q.right,y:q.bottom});B.x+=j.x,B.y+=j.y,q.bottom=B.y,q.right=B.x;const U=k.localMatrix.applyInverse({x:q.left,y:q.top});U.x+=j.x,U.y+=j.y,q.top=U.y,q.left=U.x}}const{x:K,y:z,pivot:Y,finalDirection:Q}=this.findBestFitPosition(j,this._direction,H,V,W,q);this._rectTransform.pivot.set(Y.x,Y.y);const X=this.gameObject.parent.transform.worldMatrix.applyInverse({x:K,y:z});this._rectTransform.setPosition(X.x,X.y);const Z=Q===G.Top||Q===G.Bottom?Y.x:Y.y;this.onPostFit.dispatch(Q,Z)}findBestFitPosition(k,B,U,F,G,j){let $=0,H=0,V={x:.5,y:.5};const W=this.getPositionForDirection(k,B,U,V,j);if($=W.x,H=W.y,V=W.pivot,this.fitsInBounds($,H,G,V,F))return{x:$,y:H,pivot:V,finalDirection:B};const q=this.tryPerpendicularAdjustment(k,B,U,F,G,j);if(q.fits)return Object.assign(Object.assign({},q),{finalDirection:B});const K=this.getAlternateDirections(B);for(const z of K){const B=this.getPositionForDirection(k,z,U,V,j);if(this.fitsInBounds(B.x,B.y,G,B.pivot,F))return Object.assign(Object.assign({},B),{finalDirection:z});const $=this.tryPerpendicularAdjustment(k,z,U,F,G,j);if($.fits)return Object.assign(Object.assign({},$),{finalDirection:z})}return{x:$,y:H,pivot:V,finalDirection:B}}getPositionForDirection(k,B,U,F,j){let H;return B===G.Top?H=j?{x:.5*(j.left+j.right),y:(null==j?void 0:j.top)-U,pivot:{x:.5,y:1}}:{x:k.x,y:k.y-U,pivot:{x:.5,y:1}}:B===G.Left?H=j?{x:(null==j?void 0:j.left)-U,y:.5*(j.top+j.bottom),pivot:{x:1,y:.5}}:{x:k.x-U,y:k.y,pivot:{x:1,y:.5}}:B===G.Right?H=j?{x:(null==j?void 0:j.right)+U,y:.5*(j.top+j.bottom),pivot:{x:0,y:.5}}:{x:k.x+U,y:k.y,pivot:{x:0,y:.5}}:B===G.Bottom&&(H=j?{x:.5*(j.left+j.right),y:(null==j?void 0:j.bottom)+U,pivot:{x:.5,y:0}}:{x:k.x,y:k.y+U,pivot:{x:.5,y:0}}),H||($.VyI.log(`FitToTargetComponent: Unknown direction ${B} on ${this.gameObject.name}`,$.$bb.Error),{x:k.x,y:k.y,pivot:Object.assign({},F)})}fitsInBounds(k,B,U,F,G){const j=k-U.width*F.x,$=k+U.width*(1-F.x),H=B-U.height*F.y,V=B+U.height*(1-F.y);return j>=G.left&&$<=G.right&&H>=G.top&&V<=G.bottom}tryPerpendicularAdjustment(k,B,U,F,j,$){const H=this.getPositionForDirection(k,B,U,{x:.5,y:.5},$),V=H.x,W=H.y,q=Object.assign({},H.pivot);if(B===G.Top||B===G.Bottom){const k=V-j.width*q.x,B=V+j.width*(1-q.x);if(kF.right){const k=B-F.right;q.x=Math.max(0,Math.min(1,q.x+k/j.width))}}else{const k=W-j.height*q.y,B=W+j.height*(1-q.y);if(kF.bottom){const k=B-F.bottom;q.y=Math.max(0,Math.min(1,q.y+k/j.height))}}return{x:V,y:W,pivot:q,fits:this.fitsInBounds(V,W,j,q,F)}}getAlternateDirections(k){return F._DIRECTION_ALTERNATES[k]||[G.Top,G.Bottom,G.Left,G.Right]}setTarget(k,B=!0){this._target=k,B&&this.fit()}setBounds(k,B=!0){this._bounds=k,B&&this.fit()}};H.defaultBounds={left:0,right:$.Zt2.DEFAULT_WIDTH,top:0,bottom:$.Zt2.DEFAULT_HEIGHT},H._DIRECTION_ALTERNATES={[G.Top]:[G.Bottom,G.Left,G.Right],[G.Bottom]:[G.Top,G.Left,G.Right],[G.Left]:[G.Right,G.Top,G.Bottom],[G.Right]:[G.Left,G.Top,G.Bottom]},(0,j.Cg)([(0,$.ERr)(),(0,j.Sn)("design:type",$._mx)],H.prototype,"_target",void 0),(0,j.Cg)([(0,$.MnK)($.XVE),(0,j.Sn)("design:type",$.XVE)],H.prototype,"_bounds",void 0),(0,j.Cg)([(0,$.gfw)(G),(0,j.Sn)("design:type",String)],H.prototype,"_direction",void 0),(0,j.Cg)([(0,$.g11)(),(0,j.Sn)("design:type",Number)],H.prototype,"_offset",void 0),(0,j.Cg)([(0,$.vkK)(),(0,j.Sn)("design:type",Boolean)],H.prototype,"_fitOnCreate",void 0),(0,j.Cg)([(0,$.vkK)(),(0,j.Sn)("design:type",Boolean)],H.prototype,"_considerTargetBounds",void 0),(0,j.Cg)([(0,$.bbQ)(),(0,j.Sn)("design:type",$.HN0)],H.prototype,"onPostFit",void 0),(0,j.Cg)([(0,$.GO0)(),(0,j.Sn)("design:type",Function),(0,j.Sn)("design:paramtypes",[]),(0,j.Sn)("design:returntype",void 0)],H.prototype,"fit",null),H=F=(0,j.Cg)([(0,$.EVk)("FitToTarget")],H)},86050:(k,B,U)=>{"use strict";U.d(B,{$:()=>H});var F=U(62459),G=U(35120),j=U(5365),$=U(95130);class H extends $.D{get state(){return this._state}constructor(k,B){super(k,B),this.onClickCallback=null,this.onUpCallback=null,this.onOverCallback=null,this.onOutCallback=null,this.onClickDisabled=new F.HN0,this.defaultY=0,this.hoverLiftDistance=3,this.internalHoverHitArea=new F.M_G(0,0,80,80),this.broadcasts=[],this.collisionBlock=null,this.disableInput=!1,this._state=j.w.up,this.isActive=!0,this.onDestroy.add((()=>{this.handleDestroy()}))}populate(k){super.populate(k),this.onClickCallback=null,this.onUpCallback=null,this.onOverCallback=null,this.onOutCallback=null,this.defaultY=this.y,this.hoverLiftDistance=F.Aq$.isDefined(k.hoverLiftDistance)?k.hoverLiftDistance:3,this.internalHoverHitArea.height=H.internalHitArea.height+this.hoverLiftDistance,this.broadcasts=k.broadcasts,this.setupCollisionBlock(k)}setActive(k){super.setActive(k),this.y=this.defaultY,this.collisionBlock.hitArea=H.internalHitArea}setDisableInput(k){this.disableInput=k}onDown(){this.disableInput||this.visible&&(this.isActive?(this.y=this.defaultY,G.q.instance.prodigy.audio.playSFX(18,"pop"),F.Aq$.isDefined(this.onClickCallback)&&this.onClickCallback(),this.broadcastAll(),this._state=j.w.down):this.onClickDisabled.dispatch())}setInputBlockPriority(k){G.q.instance.prodigy.gameContainer.get("2e2-6ee6").setBlockType(this.collisionBlock.input,k)}setupCollisionBlock(k){this.collisionBlock=this.add(G.q.instance.prodigy.create.emptySprite(0,0,k.width,k.height)),this.collisionBlock.alpha=0,this.collisionBlock.hitArea=H.internalHitArea,this.collisionBlock.inputEnabled=!0,this.collisionBlock.events.onInputDown.add((()=>{this.onDown()})),this.collisionBlock.events.onInputUp.add((()=>{this.onUp()})),this.collisionBlock.events.onInputOver.add((()=>{this.onOver()})),this.collisionBlock.events.onInputOut.add((()=>{this.onOut()}))}broadcastAll(){F.Aq$.isDefined(this.broadcasts)&&this.broadcasts.forEach((k=>{this.game.broadcaster.broadcast(k.type,G.q.instance.prodigy.open.menus[G.q.instance.prodigy.open.menus.length-1],k.params)}))}onUp(){this.disableInput||this.visible&&this.isActive&&(this.y=this.defaultY-this.hoverLiftDistance,F.Aq$.isDefined(this.onUpCallback)&&this.onUpCallback(),this._state=j.w.up)}onOver(){this.disableInput||this.visible&&this.isActive&&(this.y=this.defaultY-this.hoverLiftDistance,this.collisionBlock.hitArea=this.internalHoverHitArea,F.Aq$.isDefined(this.onOverCallback)&&this.onOverCallback(),this._state=j.w.over)}onOut(){this.visible&&this.isActive&&(this.y=this.defaultY,this.collisionBlock.hitArea=H.internalHitArea,F.Aq$.isDefined(this.onOutCallback)&&this.onOutCallback())}handleDestroy(){this.onClickDisabled.dispose()}}H.internalHitArea=new F.M_G(0,0,80,80)},28962:(k,B,U)=>{"use strict";var F;U.d(B,{z:()=>F}),function(k){k[k.DEFAULT=1]="DEFAULT",k[k.LOCOMOTION=2]="LOCOMOTION",k[k.LOBBY=4]="LOBBY",k[k.SYSTEM_INFO=8]="SYSTEM_INFO",k[k.REAR_OVERLAY=16]="REAR_OVERLAY",k[k.AIMING_OVERLAY=32]="AIMING_OVERLAY"}(F||(F={}))},57128:(k,B,U)=>{"use strict";var F;U.d(B,{h:()=>F}),function(k){k.Top="-top",k.Bottom="-bottom",k.Left="-left",k.Right="-right",k.Middle="-middle",k.TopLeft="-topLeft",k.TopRight="-topRight",k.BottomLeft="-bottomLeft",k.BottomRight="-bottomRight"}(F||(F={}))},31091:(k,B,U)=>{"use strict";U.d(B,{g:()=>V});var F=U(8674),G=U(62459),j=U(35120),$=U(25456),H=U(28152);let V=class extends $.l{updateContentView(k){this._data=k,this._base.GameObject.findComponentsInChildren(G.EYj).forEach((B=>B.text=k.title)),k.alreadySelected&&(this.setSelected(!0),k.onClick(this)),this.onClick.add((()=>{k.onClick(this),j.q.instance.prodigy.audio.playSFX(18,"pop")}))}getName(){return this._data.title}};V=(0,F.Cg)([(0,G.EVk)("FirstNameCellPrefab",H.Y.ui)],V)},24536:(k,B,U)=>{"use strict";U.d(B,{v:()=>H});var F=U(62459),G=U(35120),j=U(88022),$=U(42413);class H extends $.g{constructor(k,B){super(k,B),this.image=null}populate(k){const B=F.Aq$.isDefined(k.frameName)?k.frameName:"";let U=k.atlasName;F.Aq$.isDefined(k.singleImageID)?U=`singleImage-${k.singleImageID}`:F.Aq$.isDefined(k.atlasName)||(U=F.Aq$.isDefined(k.atlasID)?`atlas-${k.atlasID}`:j._.Ui_shared_json),this.createImage(U,B),super.populate(k),F.Aq$.isDefined(k.tint)&&(this.image.tint=k.tint),F.Aq$.isDefined(k.horizontalFlip)&&k.horizontalFlip&&this.flipHorizontally()}createImage(k,B){this.image=this.add(G.q.instance.prodigy.create.image(0,0,k,B)),F.Aq$.isDefined(this.image.animations.frameData)||F.VyI.log(`Image atlas ${k}, frame ${B} could not be loaded properly!`,F.$bb.Warning)}setImageFrameName(k){this.image.animations.frameData.getFrameByName(k)?this.image.frameName=k:F.VyI.log(`Could not set frame ${k}. The old frame ${this.image.frameName} will be kept.`,F.$bb.Warning)}flipHorizontally(){this.image.pivot.set(this.image.width,0),this.image.scale.x*=-1}setActive(k){this.image.tint=k?16777215:5789784,super.setActive(k)}}},42413:(k,B,U)=>{"use strict";U.d(B,{g:()=>G});var F=U(95130);class G extends F.D{constructor(k,B){super(k,B)}createImage(k,B){}}},3788:(k,B,U)=>{"use strict";U.d(B,{B:()=>G});var F=U(62459);const G={"8-20":{fontFamily:F.dBt.ABeeZee,fontSize:20,fontWeight:"bold",fill:"#000000"},"9-48":{fontFamily:F.dBt.PaytoneOne,fontSize:36,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:4,padding:4,forceCaps:!0,paddingTop:3},"9-36":{fontFamily:F.dBt.PaytoneOne,fontSize:24,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:4,padding:4,forceCaps:!0,paddingTop:3},"10-16":{fontFamily:F.dBt.ABeeZee,fontSize:16,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:4,letterSpacing:1,padding:4},"10-20":{fontFamily:F.dBt.ABeeZee,fontSize:20,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:3,padding:3,letterSpacing:1},"10-30":{fontFamily:F.dBt.ABeeZee,fontSize:30,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:4,padding:4},"10-40":{fontFamily:F.dBt.ABeeZee,fontSize:40,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:5,padding:5},"10-80":{fontFamily:F.dBt.ABeeZee,fontSize:80,fontWeight:"bold",fill:"#ffffff",stroke:"#363636",lineJoin:"round",strokeThickness:6,padding:6},"157-0":{fontFamily:F.dBt.PaytoneOne,fontSize:32,fill:"#ffffff",stroke:"#555555",lineJoin:"round",strokeThickness:3,dropShadow:!0,dropShadowColor:"#555555",dropShadowDistance:3,dropShadowAngle:Math.PI/4,dropShadowBlur:0,padding:3,paddingTop:-4},"157-1":{fontFamily:F.dBt.PaytoneOne,fontSize:64,fill:"#ffffff",stroke:"#800000",lineJoin:"round",strokeThickness:3,dropShadow:!0,dropShadowColor:"#800000",dropShadowDistance:6,dropShadowAngle:Math.PI/4,dropShadowBlur:0,padding:3},"157-20":{fontFamily:F.dBt.PaytoneOne,fontSize:20,fill:"#ffffff",stroke:"#555555",lineJoin:"round",strokeThickness:3,dropShadow:!0,dropShadowColor:"#555555",dropShadowDistance:3,dropShadowAngle:Math.PI/4,dropShadowBlur:0,padding:3,paddingTop:-4}}},14088:(k,B,U)=>{"use strict";U.d(B,{h:()=>V});var F=U(62459),G=U(35120),j=U(77938),$=U(95130),H=U(48951);class V extends $.D{constructor(k,B,U,j=[]){super(k,U),this.uiJsonId=B,this.onLoadComplete=new F.HN0,null!==B&&G.q.instance.prodigy.load.assets(j,this.renderMenu.bind(this))}getUiElement(k){let B=null;for(let U=0;U{"use strict";U.d(B,{w:()=>H,Z:()=>q});var F=U(62459),G=U(35120),j=U(30442);class ${get image(){return this._image}constructor(k,B=0,U=0,G,$,H,V,W,q,K){this.type=1,this.physicsType=0,this.onOverSound=null,this.onOutSound=null,this.onDownSound=null,this.onUpSound=null,this.onOverSoundMarker="",this.onOutSoundMarker="",this.onDownSoundMarker="",this.onUpSoundMarker="",this.onInputOver=new F.HN0,this.onInputOut=new F.HN0,this.onInputDown=new F.HN0,this.onInputUp=new F.HN0,this.onOverMouseOnly=!0,this.justReleasedPreventsOver=2,this.freezeFrames=!1,this.forceOut=!1;const z=null!=H?H:this;this.forceOut=!1,this._image=new j.k(k,B,U,G,W),this._image.inputEnabled=!0,this._image.input.start(0,!0),this._image.input.useHandCursor=!0,this.setFrames(V,W,q,K),$&&this.onInputUp.add($,z),this._image.events.onInputOver.add(this.onInputOverHandler,this),this._image.events.onInputOut.add(this.onInputOutHandler,this),this._image.events.onInputDown.add(this.onInputDownHandler,this),this._image.events.onInputUp.add(this.onInputUpHandler,this)}getBounds(){var k;return null===(k=this._image)||void 0===k?void 0:k.getBounds()}clearFrames(){this.setFrames(null,null,null,null)}setStateFrame(k,B,U){const F=`on${k}Frame`;null!==B?(this[F]=B,U&&this.changeStateFrame(k)):this[F]=null}changeStateFrame(k){if(this.freezeFrames)return!1;const B=this[`on${k}Frame`];return!!F.Aq$.isDefined(B)&&(this._image.setTexture(null,B),!0)}setFrames(k,B,U,F){this.setStateFrame($.STATE_OVER,k,this._image.input.pointerOver()),this.setStateFrame($.STATE_OUT,B,!this._image.input.pointerOver()),this.setStateFrame($.STATE_DOWN,U,this._image.input.pointerDown()),this.setStateFrame($.STATE_UP,F,this._image.input.pointerUp())}setStateSound(k,B,U=""){const F=`on${k}Sound`,G=`on${k}SoundMarker`;B?(this[F]=B,this[G]="string"==typeof U?U:""):(this[F]=null,this[G]="")}playStateSound(k){const B=this[`on${k}Sound`];if(B){const U=this[`on${k}SoundMarker`];return B.play(U),!0}return!1}setSounds(k,B,U,F,G,j,H,V){this.setStateSound($.STATE_OVER,k,B),this.setStateSound($.STATE_OUT,G,j),this.setStateSound($.STATE_DOWN,U,F),this.setStateSound($.STATE_UP,H,V)}setOverSound(k,B){this.setStateSound($.STATE_OVER,k,B)}setOutSound(k,B){this.setStateSound($.STATE_OUT,k,B)}setDownSound(k,B){this.setStateSound($.STATE_DOWN,k,B)}setUpSound(k,B){this.setStateSound($.STATE_UP,k,B)}onInputOverHandler(k,B){B.justReleased()&&(this.justReleasedPreventsOver&B.pointerMode)===B.pointerMode||(this.changeStateFrame($.STATE_OVER),this.onOverMouseOnly&&!B.isMouse||(this.playStateSound($.STATE_OVER),this.onInputOver&&this.onInputOver.dispatch(this,B)))}onInputOutHandler(k,B){this.changeStateFrame($.STATE_OUT),this.playStateSound($.STATE_OUT),this.onInputOut&&this.onInputOut.dispatch(this,B)}onInputDownHandler(k,B){this.changeStateFrame($.STATE_DOWN),this.playStateSound($.STATE_DOWN),this.onInputDown&&this.onInputDown.dispatch(this,B)}onInputUpHandler(k,B,U){if(this.playStateSound($.STATE_UP),this.onInputUp&&this.onInputUp.dispatch(this,B,U),!this.freezeFrames)if(!0===this.forceOut||(1&B.pointerMode)===B.pointerMode)this.changeStateFrame($.STATE_OUT);else{this.changeStateFrame($.STATE_UP)||(U?this.changeStateFrame($.STATE_OVER):this.changeStateFrame($.STATE_OUT))}}cleanUp(){this.onInputOver.dispose(),this.onInputOut.dispose(),this.onInputDown.dispose(),this.onInputUp.dispose()}}$.STATE_OVER="Over",$.STATE_OUT="Out",$.STATE_DOWN="Down",$.STATE_UP="Up";var H,V=U(24536),W=U(95130);!function(k){k.up="up",k.down="down",k.over="over"}(H||(H={}));class q extends W.D{constructor(){super(...arguments),this.button=null,this.onUpCallback=null,this.onDownCallback=null,this.onOverCallback=null,this.onOutCallback=null,this.upStateGraphic=null,this.overStateGraphic=null,this.downStateGraphic=null,this.buttonTextGraphic=null,this.isActive=!0,this._state=H.up,this.defaultY=0,this.downStateName=null,this.overStateName=null,this.upStateName=null,this.buttonTextName=null,this.hoverLiftDistance=0,this.textOffset=3,this.isToggle=!1}get state(){return this._state}populate(k){super.populate(k),this.defaultY=this.y,this.downStateName=k.downStateName,this.overStateName=k.overStateName,this.upStateName=k.upStateName,this.buttonTextName=k.buttonTextName,this.hoverLiftDistance=k.hoverLiftDistance,F.Aq$.isDefined(k.textOffset)&&(this.textOffset=k.textOffset),this.isToggle=k.toggle,this.renderMenu(k)}getStateGraphics(){for(const k of this.children){const B=k.name;F.Aq$.isDefined(B)&&(B===this.upStateName&&(this.upStateGraphic=k,this.upDefaultY=this.upStateGraphic.y),B===this.downStateName&&(this.downStateGraphic=k,this.downDefaultY=this.downStateGraphic.y),B===this.overStateName&&(this.overStateGraphic=k,this.overDefaultY=this.overStateGraphic.y),B===this.buttonTextName&&(this.buttonTextGraphic=k,this.textDefaultY=this.buttonTextGraphic.y))}}postPopulate(){this.getStateGraphics(),this.setButtonState(H.up)}renderMenu(k){this.button=new $(this.game,0,0,k.ImageKey,null,this,k.overFrame,k.outFrame,k.downFrame,k.upFrame),this.button.image.width=k.width,this.button.image.height=k.height,this.button.onInputDown.add(this.onDown.bind(this)),this.button.onInputUp.add(this.onUp.bind(this)),this.button.onInputOver.add(this.onOver.bind(this)),this.button.onInputOut.add(this.onOut.bind(this)),this.button.setSounds(k.overSound,"",k.downSound,"",k.outSound,"",k.upSound,""),this.add(this.button.image)}setButtonState(k){this._state=k;let B=k;if(this.downStateGraphic||k!==H.down||(B=H.up),this.overStateGraphic||k!==H.over||(B=H.up),this.upStateGraphic&&this.upStateGraphic.exists)switch(this.upStateGraphic.visible=B===H.up,this.downStateGraphic&&(this.downStateGraphic.visible=B===H.down),this.overStateGraphic&&(this.overStateGraphic.visible=B===H.over),this.upStateGraphic.y=this.upDefaultY,this.downStateGraphic&&(this.downStateGraphic.y=this.downDefaultY),this.overStateGraphic&&(this.overStateGraphic.y=this.overDefaultY),this.buttonTextGraphic.y=this.textDefaultY,k){case H.down:this.downStateGraphic&&(this.downStateGraphic.y-=this.hoverLiftDistance,this.buttonTextGraphic.y+=this.textOffset);break;case H.over:this.buttonTextGraphic.y-=this.hoverLiftDistance,this.upStateGraphic.y-=this.hoverLiftDistance,this.overStateGraphic&&(this.overStateGraphic.y-=this.hoverLiftDistance)}}toggleActive(){this.isActive=!this.isActive,this.exists&&(this.y=this.defaultY)}onDown(){this.visible&&this.isActive&&(G.q.instance.prodigy.audio.playSFX(18,"pop"),F.Aq$.isDefined(this.onDownCallback)&&(this.onDownCallback(),this.isToggle&&this.toggleActive()),this.setButtonState(H.down))}onDownDisabled(){this.visible&&this.isActive&&this.setButtonState(H.down)}onUp(){this.visible&&this.isActive&&(F.Aq$.isDefined(this.onUpCallback)&&this._state===H.down&&(this.onUpCallback(),this.isToggle&&this.toggleActive()),this.setButtonState(H.up))}onOver(){this.visible&&this.isActive&&(F.Aq$.isDefined(this.onOverCallback)&&this.onOverCallback(),this.setButtonState(H.over))}onOut(){this.visible&&this.isActive&&(F.Aq$.isDefined(this.onOutCallback)&&this.onOutCallback(),this.setButtonState(H.up))}setActive(k,B=null){if(this.button.image.inputEnabled=k,F.Aq$.isDefined(B)){if(this.upStateGraphic instanceof V.v)this.upStateGraphic.image.tint=B;else{const k=this.upStateGraphic.images;for(let U=0;U{"use strict";U.d(B,{A:()=>V});var F=U(62459),G=U(35120),j=U(50664),$=U(57128),H=U(95130);class V extends H.D{set enableMask(k){this._enableMask=k,this.activeTrackMask.visible=k,this.activeTrack.mask=k?this.activeTrackMask:null}get enableMask(){return this._enableMask}constructor(k,B){super(k,B),this.maxThumbPositionOffset=0,this._enableMask=!0,this.activeTrackMask=null,this.onScrollChangeCallback=null}populate(k){const B=!F.Aq$.isDefined(k.isInteractive)||k.isInteractive;this.thumbFrameName=F.Aq$.isDefined(k.thumbFrameName)?k.thumbFrameName:"",this.activeTrackBaseFrameName=F.Aq$.isDefined(k.activeTrackBaseFrameName)?k.activeTrackBaseFrameName:"",this.inactiveTrackBaseFrameName=F.Aq$.isDefined(k.inactiveTrackBaseFrameName)?k.inactiveTrackBaseFrameName:"",this.endCapAtlasID=F.Aq$.isDefined(k.endCapAtlasID)?k.endCapAtlasID:"",this.endCapFrameName=F.Aq$.isDefined(k.endCapFrameName)?k.endCapFrameName:"",this.arrowFrameName=F.Aq$.isDefined(k.arrowFrameName)?k.arrowFrameName:"",this.isVertical=!!F.Aq$.isDefined(k.isVertical)&&k.isVertical,this.atlasID=F.Aq$.isDefined(k.atlasID)?k.atlasID:144,this.clickPercentageMovement=F.Aq$.isDefined(k.clickPercentageMovement)?k.clickPercentageMovement:.05,this.eventMode=B?"static":"none",this.hideInactive=!!F.Aq$.isDefined(k.hideInactive)&&k.hideInactive,this.showHead=!!F.Aq$.isDefined(k.showHead)&&k.showHead,this.thumbAnchor=F.Aq$.isDefined(k.thumbAnchor)?k.thumbAnchor:{x:0,y:0};const U=F.Aq$.isDefined(k.trackPadding)?k.trackPadding:0;super.populate(k);const G={width:0,height:0};let j=1;const H=this.game.cache.getFrameData(`atlas-${this.atlasID}`);if(F.Aq$.isDefined(H)){if(this.arrowFrameName){const k=H.getFrameByName(this.arrowFrameName);F.Aq$.isDefined(k)&&(G.width=k.width,G.height=k.height)}if(this.activeTrackBaseFrameName){const k=H.getFrameByName(`${this.activeTrackBaseFrameName}${$.h.Middle}`);F.Aq$.isDefined(k)&&(j=k.height)}}F.Aq$.isDefined(k.children)||(k.children=[],G.width>0&&G.height>0&&k.children.push({type:"Button",name:"lessButton",anchorX:this.isVertical?.5:0,anchorY:this.isVertical?1:.5,relativeX:this.isVertical?.5:0,relativeY:this.isVertical?1:.5,width:G.width,height:G.height,children:[{type:"Graphic",name:"lessButtonGraphic",atlasID:this.atlasID,frameName:this.arrowFrameName}]},{type:"Button",name:"moreButton",anchorX:this.isVertical?.5:1,anchorY:this.isVertical?0:.5,relativeX:this.isVertical?.5:1,relativeY:this.isVertical?0:.5,width:G.width,height:G.height,children:[{type:"Graphic",name:"moreButtonGraphic",atlasID:this.atlasID,frameName:this.arrowFrameName}]}),k.children.push({type:"SlicedGraphic",name:"inactiveTrack",anchorX:this.isVertical?.5:0,anchorY:this.isVertical?0:.5,x:this.isVertical?0:G.width+U,y:this.isVertical?G.height+U:null,relativeX:this.isVertical?.5:null,relativeY:this.isVertical?null:.5,sliceType:"threeScale",isVertical:this.isVertical,atlasID:this.atlasID,baseFrameName:this.inactiveTrackBaseFrameName,width:this.isVertical?j:this.width-2*(G.width+U),height:this.isVertical?this.height-2*(G.height+U):j},{type:"SlicedGraphic",name:"activeTrack",anchorX:this.isVertical?.5:0,anchorY:this.isVertical?0:.5,x:this.isVertical?0:G.width+U,y:this.isVertical?G.height+U:0,relativeX:this.isVertical?.5:null,relativeY:this.isVertical?null:.5,sliceType:"threeScale",isVertical:this.isVertical,atlasID:this.atlasID,baseFrameName:this.activeTrackBaseFrameName,width:this.isVertical?j:this.width-2*(G.width+U),height:this.isVertical?this.height-2*(G.height+U):j}))}postPopulate(){if(this.children.forEach((k=>{"activeTrack"===k.name?this.activeTrack=k:"inactiveTrack"===k.name&&(this.inactiveTrack=k)})),this.isInteractive){this.setupButtons();const k=this.add(G.q.instance.prodigy.create.emptySprite(0,0,this.activeTrack.width,this.activeTrack.height));k.alpha=0,k.x=this.activeTrack.x,k.y=this.activeTrack.y,k.inputEnabled=!0,k.events.onInputDown.add(this.onTrackClick.bind(this))}if(this.hideInactive&&(this.inactiveTrack.visible=!1),""===this.thumbFrameName?this.thumbSprite=G.q.instance.prodigy.create.emptySprite(0,0):this.thumbSprite=G.q.instance.prodigy.create.sprite(0,0,`atlas-${this.atlasID}`,this.thumbFrameName,this.thumbAnchor),this.thumbSprite.name="thumbSprite",this.thumbSprite.y=F.Aq$.getCenteredXY(0,this.thumbSprite.height,0,this.activeTrack.y,0,this.activeTrack.height).y,""!==this.endCapAtlasID){const k=this.getMaxThumbPosition();this.add(G.q.instance.prodigy.create.sprite(k.x,k.y,`atlas-${this.endCapAtlasID}`,this.endCapFrameName))}if(this.add(this.thumbSprite),this.showHead){const k=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.playerHead=G.q.instance.prodigy.create.player(this.thumbSprite,k,1,25,105,!1,{isPreview:!0,headOnly:!0,hideMount:!0}),this.playerHead.startLoad()}this.clampThumbWithinTrack();const k=this.getMinThumbPosition(),B=this.getMaxThumbPosition(),U=new F.M_G(this.isVertical?B.x:k.x,this.isVertical?B.y:k.y,this.isVertical?this.thumbSprite.width:this.activeTrack.width+this.thumbSprite.width,this.isVertical?this.activeTrack.height+this.thumbSprite.height:this.thumbSprite.height),$=j.F.createBox(this.game,0,0,this.activeTrack.width,this.activeTrack.height,0,1);this.thumbSprite.addChild($),$.x=this.isVertical?this.activeTrack.x-this.thumbSprite.x:-this.activeTrack.width,$.y=this.isVertical?0:this.activeTrack.y-this.thumbSprite.y,$.x+=this.isVertical?0:.5*this.thumbSprite.width,$.y+=this.isVertical?.5*this.thumbSprite.height:0,this.activeTrack.mask=$,this.activeTrackMask=$,this.isInteractive&&(this.thumbSprite.inputEnabled=!0,this.thumbSprite.input.enableDrag(),this.thumbSprite.input.boundsRect=U,this.thumbSprite.events.onDragStop.add(this.onDragStop,this))}getActiveTrack(){return this.activeTrack}setupButtons(){let k,B;if(this.children.forEach((U=>{"lessButton"===U.name?k=U:"moreButton"===U.name&&(B=U)})),F.Aq$.isDefined(k)){k.children.find((k=>"lessButtonGraphic"===k.name)).flipHorizontally(),k.onClickCallback=()=>{this.onLessButtonClick()}}F.Aq$.isDefined(B)&&(B.onClickCallback=()=>{this.onMoreButtonClick()})}setPercentComplete(k,B=!1){this.setPercentCompleteOffset(k,0,B)}setPercentCompleteOffset(k,B,U=!1){this.maxThumbPositionOffset=B;const G=this.isVertical?this.getMinThumbPosition().y:this.getMinThumbPosition().x,j=this.isVertical?this.getMaxThumbPosition().y:this.getMaxThumbPosition().x,$=F.cj9.linear(G,j,k);if(this.thumbSprite.x=this.isVertical?this.thumbSprite.x:$,this.thumbSprite.y=this.isVertical?$:this.thumbSprite.y,!this.enableMask)if(this.isVertical){const B=F.cj9.linear(0,this.inactiveTrack.height,k);this.activeTrack.height=B}else{const B=F.cj9.linear(0,this.inactiveTrack.width,k);this.activeTrack.width=B}this.clampThumbWithinTrack(),this.thumbSprite.alpha=k>0||this.showHead?1:0,U||this.onScrollChange()}getPositionAtPercent(k){const B=this.isVertical?this.getMinThumbPosition().y:this.getMinThumbPosition().x,U=this.isVertical?this.getMaxThumbPosition().y:this.getMaxThumbPosition().x;return F.cj9.linear(B,U,k)}adjustThumbPosition(k,B){this.thumbSprite.x+=k,this.thumbSprite.y+=B,this.clampThumbWithinTrack()}clampThumbWithinTrack(){const k=this.getMaxThumbPosition(!0),B=this.getMinThumbPosition();this.thumbSprite.x=F.cj9.clamp(this.thumbSprite.x,B.x,k.x),this.thumbSprite.y=F.cj9.clamp(this.thumbSprite.y,k.y,B.y)}onDragStop(){this.onScrollChange()}onTrackClick(k,B){const U=this.isVertical?B.y:B.x,F=this.isVertical?k.world.y:k.world.x,G=this.isVertical?k.y:k.x,j=this.isVertical?k.height:k.width,$=this.isVertical?this.thumbSprite.height:this.thumbSprite.width,H=(U-F)/j,V=Math.floor(G+j*H-.5*$);this.isVertical?this.thumbSprite.y=V:this.thumbSprite.x=V,this.clampThumbWithinTrack(),this.onScrollChange()}onMoreButtonClick(){this.adjustThumbPosition(this.isVertical?0:this.activeTrack.width*this.clickPercentageMovement,this.isVertical?-this.activeTrack.height*this.clickPercentageMovement:0),this.onScrollChange()}onLessButtonClick(){this.adjustThumbPosition(this.isVertical?0:-this.activeTrack.width*this.clickPercentageMovement,this.isVertical?this.activeTrack.height*this.clickPercentageMovement:0),this.onScrollChange()}onScrollChange(){F.Aq$.isDefined(this.onScrollChangeCallback)&&this.onScrollChangeCallback(this.getPercentageComplete())}getPercentageComplete(){const k=this.isVertical?this.thumbSprite.y:this.thumbSprite.x,B=this.isVertical?this.getMinThumbPosition().y:this.getMinThumbPosition().x,U=(this.isVertical?this.getMaxThumbPosition().y:this.getMaxThumbPosition().x)-B;let F=1;return 0!==U&&(F=(k-B)/U),F}getMaxThumbPosition(k=!1){let B,U;return this.isVertical?(B=F.Aq$.getCenteredXY(this.thumbSprite.width,0,this.activeTrack.x,0,this.activeTrack.width,0).x,U=this.activeTrack.y-.5*this.thumbSprite.height):(B=this.activeTrack.x+(this.enableMask?this.activeTrack.width:this.inactiveTrack.width)-.5*this.thumbSprite.width,U=F.Aq$.getCenteredXY(0,this.thumbSprite.height,0,this.activeTrack.y,0,this.activeTrack.height).y),k||(B+=this.maxThumbPositionOffset,U+=this.maxThumbPositionOffset),{x:B,y:U}}getMinThumbPosition(){let k=0,B=0;return this.isVertical?(k=F.Aq$.getCenteredXY(this.thumbSprite.width,0,this.activeTrack.x,0,this.activeTrack.width,0).x,B=this.activeTrack.y+(this.enableMask?this.activeTrack.height:this.inactiveTrack.height)-.5*this.thumbSprite.height):(k=this.activeTrack.x-.5*this.thumbSprite.width,B=F.Aq$.getCenteredXY(0,this.thumbSprite.height,0,this.activeTrack.y,0,this.activeTrack.height).y),{x:k,y:B}}setActive3SlicedImage(k){this.activeTrack.images[0].frameName=`${k}${$.h.Left}`,this.activeTrack.images[1].frameName=`${k}${$.h.Right}`,this.activeTrack.images[2].frameName=`${k}${$.h.Middle}`}destroy(k){F.W$e.instance.game.tweens.removeAllFromOwner(this),super.destroy(k)}}},27625:(k,B,U)=>{"use strict";U.d(B,{I:()=>H});var F=U(62459),G=U(19273),j=U(70123),$=U(95130);class H extends $.D{populate(k){if(super.populate(k),this.spineRenderer=j.j.createRenderer(k.spineKey,{type:"spine"}),F.Aq$.isDefined(k.animation)&&""!==k.animation){const B=!!F.Aq$.isDefined(k.loop)&&k.loop;this.playAnimation(k.animation,B,null)}new G._(this.game,this,[this.spineRenderer],0,0)}playAnimation(k,B=!1,U=null,G=null){this.spineRenderer.playAnimation(k,B),F.Aq$.isDefined(U)&&(F.Aq$.isDefined(this.spineRenderer.spine)?this.spineRenderer.spine.onComplete.addOnce(U,G):this.spineRenderer.onLoaded.addOnce((()=>{this.spineRenderer.spine.onComplete.addOnce(U,G)})))}}},95130:(k,B,U)=>{"use strict";U.d(B,{D:()=>q});var F=U(62459),G=U(68910),j=U(35120),$=U(34829),H=U(73797),V=U(88022),W=U(26480);class q extends W.g{constructor(k,B){super(k,B),this.name="",this.layoutElement=null,this.dimensionPlaceholderImage=null,this.game=k,this.metricsManager=j.q.instance.prodigy.gameContainer.get("2a1-fed9"),this.metricsManager.objectCreated("UIElement"),this.onDestroy.add(this.handleUIDestroy.bind(this))}handleUIDestroy(){this.metricsManager.objectDestroyed("UIElement")}processRelativeFields(k,B){F.Aq$.isDefined(k.relativeWidth)&&(k.width=Math.floor(B.width*k.relativeWidth)),F.Aq$.isDefined(k.relativeHeight)&&(k.height=Math.floor(B.height*k.relativeHeight)),F.Aq$.isDefined(k.relativeX)?k.x=Math.floor(B.width*k.relativeX):F.Aq$.isDefined(k.x)||(k.x=0),F.Aq$.isDefined(k.relativeY)?k.y=Math.floor(B.height*k.relativeY):F.Aq$.isDefined(k.y)||(k.y=0),F.Aq$.isDefined(k.scaleX)&&(this.scale.x=k.scaleX),F.Aq$.isDefined(k.scaleY)&&(this.scale.y=k.scaleY),F.Aq$.isDefined(k.visible)&&(this.visible=k.visible)}populate(k){let B=0,U=0;F.Aq$.isDefined(k.name)&&(this.name=k.name),(F.Aq$.isDefined(k.width)&&k.width>this.width||F.Aq$.isDefined(k.height)&&k.height>this.height)&&(F.Aq$.isDefined(this.dimensionPlaceholderImage)&&this.dimensionPlaceholderImage.destroy(),this.dimensionPlaceholderImage=j.q.instance.prodigy.create.image(0,0,void 0,void 0,G.Texture.EMPTY),this.dimensionPlaceholderImage.width=this.dimensionPlaceholderImage.height=80,this.dimensionPlaceholderImage.alpha=0,this.add(this.dimensionPlaceholderImage),F.Aq$.isDefined(k.width)&&(this.dimensionPlaceholderImage.width=k.width),F.Aq$.isDefined(k.height)&&(this.dimensionPlaceholderImage.height=k.height)),F.Aq$.isDefined(k.anchorX)&&(B=-Math.floor(k.anchorX*this.width)),F.Aq$.isDefined(k.anchorY)&&(U=-Math.floor(k.anchorY*this.height)),F.Aq$.isDefined(k.x)&&(this.x=k.x),F.Aq$.isDefined(k.y)&&(this.y=k.y),this.x+=B,this.y+=U}postPopulate(){}setActive(k){this.isActive=k;for(let B=0;B{"use strict";U.d(B,{c:()=>wt});var F=U(62459),G=U(86824),j=U(86050);class $ extends j.${constructor(){super(...arguments),this.currentToggleState=0,this.stateGraphics=[],this.buttonToggleGraphic=null}populate(k){super.populate(k);const B={anchorX:0,anchorY:0,relativeX:0,relativeY:0,type:"Graphic",name:"buttonToggleGraphic",atlasID:k.atlasID,frameName:0===k.defaultToggleState?k.frameNameOff:k.frameNameOn};F.Aq$.isDefined(k.children)?k.children.unshift(B):k.children=[B],this.currentToggleState=k.defaultToggleState,this.stateGraphics=[{frameName:k.frameNameOff},{frameName:k.frameNameOn}]}postPopulate(){super.postPopulate(),this.updateToggleImage()}setOnClickCallback(k){this.onClickCallback=()=>{this.toggleState(),this.updateToggleImage(),F.Aq$.isDefined(k)&&k(this.currentToggleState)}}toggleState(){this.currentToggleState=1-this.currentToggleState}toggleAndUpdateImage(){this.toggleState(),this.updateToggleImage()}updateToggleImage(){this.setGraphicFrameName(this.stateGraphics[this.currentToggleState])}setGraphicFrameName(k){F.Aq$.isDefined(this.buttonToggleGraphic)||(this.buttonToggleGraphic=this.children.find((k=>"buttonToggleGraphic"===k.name))),this.buttonToggleGraphic.setImageFrameName(k.frameName)}}var H=U(24536),V=U(35120),W=U(63119),q=U(95130);class K extends q.D{constructor(k,B){super(k,B),this.autoComplete=!1,this.onLostFocus=new F.HN0,this.onTextChanged=new F.HN0,this.isActive=!0,this.onDestroy.add(this.handleDestroy.bind(this))}populate(k){super.populate(k);const B=V.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService);F.Aq$.isDefined(k.textKey)&&(k.label=B.getText(k.textKey));const U=F.Aq$.isDefined(k.isPassword)&&k.isPassword?"password":void 0;this.input=W.F.createInputField(this.game,this.parent,k.name,k.placeholderText,k.x,k.y,k.width,k.height,U),this.input.setLabel(this.parent,k.label),this.autoComplete||this.input.setAutoComplete(!1),this.input.enablePerKeyEvents(!0),this.input.onFocusChanged=k=>{k||this.onLostFocus.dispatch()},this.input.onTextChanged=()=>{this.onTextChanged.dispatch()},F.Aq$.isDefined(k.forceUpperCase)&&k.forceUpperCase&&this.input.setAttribute("autocapitalize","on"),F.Aq$.isDefined(k.fieldColour)&&this.input.setStyle("background-color",k.fieldColour)}handleDestroy(){this.onLostFocus.dispose(),this.onTextChanged.dispose()}setValue(k){this.input.setValue(k)}setVisible(k){this.input.setVisible(k),super.setVisible(k)}getValue(){return this.input.getValue()}}var z=U(73797);class Y extends F.mcf{constructor(k,B,U){super(),this.dirty=!0,this.layoutType=null,this.alignment="top",this.spacing=0,this.startOffset=0,this.ignoreInvisible=!1,this.game=k,B&&B.addChild(this),this.layoutType=U.type,F.Aq$.isDefined(U.alignment)&&(this.alignment=U.alignment),F.Aq$.isDefined(U.spacing)&&(this.spacing=U.spacing),F.Aq$.isDefined(U.offset)&&(this.startOffset=U.offset),F.Aq$.isDefined(U.ignoreInvisible)&&(this.ignoreInvisible=U.ignoreInvisible),V.q.instance.game.broadcaster.addAppListener(z.n8.ChildAdded,this.parentModified.bind(this),this,this.parent,!1),V.q.instance.game.broadcaster.addAppListener(z.n8.ChildRemoved,this.parentModified.bind(this),this,this.parent,!1),this.calculateChildren()}calculateChildren(){this.dirty=!1,"vertical"===this.layoutType?this.alignVertical():"horizontal"===this.layoutType&&this.alignHorizontal()}alignVertical(){let k=this.startOffset;"center"===this.alignment?k+=Math.round((this.parent.height-this.getContentHeight())/2):"bottom"===this.alignment&&(k+=Math.round(this.parent.height-this.getContentHeight()));for(let B=0;B!0===k.visible));if(B){const U=B.gameObjects;if(U&&U.length>0)for(let B=0;B0&&F.y<=G.fullHeight&&(k.push(U[B]),this.objectsViewed.add(U[B]))}}}this.objectsInViewport=k}setElementVisibility(k,B){k.visible=B;const U=k.gameObjects;if(U)for(const F of U)F.active=B}stopDrag(k){et.l.prototype.stopDrag.call(this.inputHandler.input,k),this.scrollStartPos=null,this.maxDistanceThisScroll<=this.clickDragThreshold&&(this.simulateMouseAction(k,1),this.simulateMouseAction(k,2)),this.maxDistanceThisScroll=0}checkOverlap(k,B){return F.M_G.intersects(k,B)}setupMask(){this.rectMask=this.game.add.graphics(this.x,this.y),this.add(this.rectMask),this.rectMask.beginFill(0),this.rectMask.drawRect(0,0,this.viewWidth,this.viewHeight),this.rectMask.endFill(),this.inputHandler=this.game.add.graphics(this.x,this.y),this.add(this.inputHandler),this.inputHandler.beginFill(0,.001),this.inputHandler.drawRect(0,0,this.viewWidth,this.viewHeight),this.inputHandler.endFill(),this.contents.mask=this.rectMask,this.inputHandler.inputEnabled=!0;const k=this.inputHandler.input;k.enableDrag(!1),k.allowVerticalDrag=!0,k.updateDrag=this.dragView.bind(this),k.stopDrag=this.stopDrag.bind(this)}dragView(k){if(this.maxScrollDist<=0)return;F.Aq$.isDefined(this.scrollStartPos)||(this.scrollStartPos=this.contents.y);const B=k.y-k.positionDown.y;let U=this.scrollStartPos+B;this.maxDistanceThisScroll=Math.max(this.maxDistanceThisScroll,Math.abs(B)),U<-1*this.maxScrollDist?U=-1*this.maxScrollDist:U>0&&(U=0),this.contents.y=Math.round(U),F.Aq$.isDefined(this.scrollBar)&&this.scrollBar.setPercent(Math.abs(this.contents.y)/this.maxScrollDist),this.dirty=!0}simulateMouseAction(k,B){var U,F;if(this.worldVisible){if(this.simulateElementsClick(k,B,this.contentsArray),this.overButton){const B=null===(U=this.overButton.getRootContainer())||void 0===U?void 0:U.children.find((k=>k.inputEnabled));B&&!this.elementContains(B,k.position)&&(this.overButton=null,B.events.onInputOut.dispatch(B,k))}for(const U of this.frameworkButtonsArray){const G=null===(F=U.getRootContainer())||void 0===F?void 0:F.children.find((k=>k.inputEnabled));if(G&&this.elementContains(G,k.position)){const F=U.currentState;2===B&&2===this.lastPointerAction&&F!==it.K.Over?(this.overButton=U,G.events.onInputOver.dispatch(G,k)):1===B&&2===this.lastPointerAction?G.events.onInputDown.dispatch(G,k):2===B&&1===this.lastPointerAction&&G.events.onInputUp.dispatch(G,k),this.lastPointerAction=B}}}}simulateElementsClick(k,B,U){for(const F of U){const U=F instanceof j.$||F instanceof X.Z?F:null;if(null==U?void 0:U.visible){const G=this.elementContains(F,k.position),j=U.state;if(!G){U.onOut();continue}2===B&&2===this.lastPointerAction&&j!==X.w.over?U.onOver():1===B&&2===this.lastPointerAction&&j!==X.w.down?U.onDown():2===B&&1===this.lastPointerAction&&j!==X.w.up&&U.onUp(),this.lastPointerAction=B}else F.alpha>0&&F.children&&this.simulateElementsClick(k,B,F.children)}}elementContains(k,B){const U=k.getBounds();return F.M_G.contains(U,B)}destroy(k={children:!0}){this.objectsInViewport.length=0,this.objectsViewed.clear(),this.clearScrollView(),super.destroy(k)}}var nt,at,rt=U(24285),ot=U(42413),ht=U(88022),ct=U(91207),dt=U(3788),lt=U(57750);!function(k){k.Top="top",k.Center="center",k.Bottom="bottom"}(nt||(nt={}));class ut extends q.D{constructor(){super(...arguments),this.sprites=[],this.fontSize=20,this.textAlignment=F.If$.Center,this.fontID=10,this.fontName="",this.lineHeight=null,this.monoSpace=10,this.iconOffsetY=0,this.forceUpperCase=!1,this.numberOfLines=1,this.verticalAlign=nt.Top,this.tint=16777215,this.icon=null}populate(k){super.populate(k),this.sprites=[],this.boundsWidth=F.Aq$.isDefined(k.width)?k.width:this.game.width,this.fontSize=F.Aq$.isDefined(k.fontSize)?k.fontSize:20,this.textAlignment=F.Aq$.isDefined(k.horizontalAlignment)?k.horizontalAlignment:F.If$.Center,this.fontID=F.Aq$.isDefined(k.fontID)?k.fontID:10,this.fontName=`atlas-${this.fontID}`,this.lineHeight=k.lineHeight,this.monoSpace=k.monoSpace,this.iconOffsetY=F.Aq$.isDefined(k.iconOffsetY)?k.iconOffsetY:0,this.forceUpperCase=!!F.Aq$.isDefined(k.forceUpperCase)&&k.forceUpperCase,this.numberOfLines=1,this.verticalAlign=F.Aq$.isDefined(k.verticalAlignment)?k.verticalAlignment:nt.Top,this.tint=F.Aq$.isDefined(k.tint)?parseInt(k.tint):16777215,F.Aq$.isDefined(k.text)?this.setText(k.text):F.Aq$.isDefined(k.textKey)&&this.setText(V.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText(k.textKey))}setText(k){if(!F.Aq$.isDefined(this.game))return;let B=k;this.forceUpperCase&&(B=B.toUpperCase());let U=0,G=null,j=0,$=0,H=0;const W=[];let q=0;for(;qk===k.toLowerCase()))&&(k.fontSize=k.lowerSize),B=B.toUpperCase()),this._pixiText?(this._pixiText.style=k,this._pixiText.text=B):(this._pixiText=new tt.Text(B,k),this._pixiText.roundPixels=!0,this.addChild(this._pixiText)),this._pixiText.style.wordWrap=!0,this._pixiText.style.wordWrapWidth=this.boundsWidth,this.textAlignment){case F.If$.Center:this._pixiText.anchor.set(.5,0),this._pixiText.x=this.boundsWidth/2;break;case F.If$.Right:this._pixiText.anchor.set(1,0),this._pixiText.x=this.boundsWidth;break;default:this._pixiText.anchor.set(0,0),this._pixiText.x=0}switch(this.verticalAlign){case nt.Center:this._pixiText.anchor.set(this._pixiText.anchor.x,.5),this._pixiText.y=this.height/2;break;case nt.Bottom:this._pixiText.anchor.set(this._pixiText.anchor.x,1),this._pixiText.y=this.height;break;default:this._pixiText.anchor.set(this._pixiText.anchor.x,0),this._pixiText.y=0}return this._pixiText.y-=k.fontSize>>2,void(k.paddingTop&&(this._pixiText.y+=k.paddingTop))}F.VyI.log(`[Legacy Font][Text] No legacy text style found for font key ${K}, falling back to sprite-based bitmap font to render "${B}".`,F.$bb.Warning),this.numberOfLines=1;for(let z=0;z=this.sprites.length?(Q=V.q.instance.prodigy.create.sprite(j,$,this.fontName),this.add(Q),this.sprites.push(Q)):(Q=this.sprites[K],Q.visible=!0),Q.tint=this.tint,Q.x=j,Q.y=$,F.Aq$.isDefined(q)){if(-1!==q.indexOf("icon-")){Q.destroy();const k=q.split("-"),B=ct.E.getIconForType(k[1],parseInt(k[2]));this.icon=V.q.instance.prodigy.icon.createIcon(j,$,B,null,null,40,40),Q=this.icon,this.add(this.icon),this.sprites[K]=this.icon,tt.Ticker.shared.addOnce((()=>this.icon.smoothed=!0))}else Q.key!==ht._.General_icons_json&&Q.loadTexture(ht._.General_icons_json),Q.frameName=q;Q.y+=this.iconOffsetY}else if(Q.key!==this.fontName&&Q.loadTexture(this.fontName),10!==k){let U=`${k}-${this.fontSize}`;const G=V.q.instance.game.cache.getFrameData(this.fontName);(null==G?void 0:G.checkFrameName(U))||(F.VyI.log(`Text: Frame name '${U}', character '${B[z]}' does not exist in font '${this.fontName}'`,F.$bb.Error),U=`63-${this.fontSize}`),Q.frameName=U}if(32===k||z===B.length-1||10===k){const B=0===this.fontSize?26:this.fontSize,U=F.Aq$.isDefined(this.lineHeight)?this.lineHeight:B+5;if(j>=this.boundsWidth&&10!==k){const k=j;j=0,$+=U;for(let U=H;U<=K;U++){const k=this.sprites[U];k.x=j,k.y=$,k.key===ht._.General_icons_json&&(k.y+=(k.height-B)/2),j+=F.Aq$.isDefined(this.monoSpace)?this.monoSpace:k.width}W.push(k-j),this.numberOfLines++,this.textAlignment===F.If$.Center&&(j-=Y)}else 10===k&&(Q.visible=!1,$+=U,j=0,this.numberOfLines++);H=K+1,32===k&&(j+=Y)}10!==k&&(j+=F.Aq$.isDefined(this.monoSpace)?this.monoSpace:Q.width),z===B.length-1&&W.push(j)}if(this.textAlignment!==F.If$.Left){let k=-1,B=0,U=-1;for(let G=0;G{this.game.broadcaster.removeAppListener(z.n8.TabSelected,this,B)}))}onTabSelected(k,B){this.setActive(!(this.groupID===k&&this.tabID===B))}}var Et=U(87776);class wt{constructor(k){this.game=null,this.game=k}static parseJSON(k){try{return JSON.parse(k)}catch(e){F.VyI.log("Error parsing config file",F.$bb.Error)}}createUIElements(k,B){let U=null,j=null,$=null,H=[];const V=B.width,W=B.height;for(let q=0;q{"use strict";U.d(B,{b:()=>V});var F=U(62459),G=U(68910),j=U(35120),$=U(77938),H=U(95130);class V extends H.D{constructor(k,B){super(k,B),this.boundsAlignH="left",this.boundsAlignV="top",this.textBounds=new G.Rectangle,this._padding=new F.I9Y,this.isActive=!0}populate(k,B){var U,H,V,W,q,K,z,Y,Q,X,Z,J,tt,et;super.populate(k);const it=j.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService);F.Aq$.isDefined(k.textKey)&&(k.text=it.getText(k.textKey)),F.Aq$.isDefined(k.forceUpperCase)&&k.forceUpperCase&&(k.text=k.text.toUpperCase()),this.textBounds=new G.Rectangle(0,0,null!=B?B:this.width,this.height);const st=new G.TextStyle,nt=F.Aq$.isDefined(k.style)?$.t.getItem("fontStyle",k.style):$.t.getItem("fontStyle",1);if(F.Aq$.isDefined(nt)){const k=nt.data;st.fontFamily=k.font,st.fontSize=k.fontSize,st.fill=k.fill,st.fontStyle=null!==(U=k.fontStyle)&&void 0!==U?U:st.fontStyle,st.fontWeight=null!==(H=k.fontWeight)&&void 0!==H?H:"normal",k.stroke&&(st.stroke=k.stroke),st.strokeThickness=null!==(V=k.strokeThickness)&&void 0!==V?V:st.strokeThickness,k.shadowColor&&(st.dropShadow=!0,st.dropShadowColor=null!==(W=k.shadowColor)&&void 0!==W?W:st.dropShadowColor,st.dropShadowDistance=null!==(q=k.shadowDistance)&&void 0!==q?q:st.dropShadowDistance),this._padding=null!==(K=k.padding)&&void 0!==K?K:this._padding}st.wordWrap=null!==(z=k.wordWrap)&&void 0!==z&&z,st.wordWrapWidth=null!==(Y=k.wordWrapWidth)&&void 0!==Y?Y:this.width,st.align=null!==(Q=k.align)&&void 0!==Q?Q:"center",st.fontSize=null!==(X=k.fontSize)&&void 0!==X?X:st.fontSize,st.fill=null!==(Z=k.color)&&void 0!==Z?Z:st.fill,st.lineHeight=null!==(J=k.lineSpacing)&&void 0!==J?J:st.lineHeight,st.padding=3,this.textObject=new G.Text(k.text,st),this.textObject.roundPixels=!0,this.boundsAlignH=null!==(tt=k.boundsAlignH)&&void 0!==tt?tt:"left",this.boundsAlignV=null!==(et=k.boundsAlignV)&&void 0!==et?et:"top",this.calculateAlignment(),this.add(this.textObject)}calculateAlignment(){const k=new F.I9Y(0,0),B=new G.Rectangle;this.textObject.getLocalBounds(B),"right"===this.boundsAlignH?k.x+=this.textBounds.width-B.width/this.textObject.resolution-this._padding.x:"center"===this.boundsAlignH&&(k.x+=.5*(this.textBounds.width-B.width/this.textObject.resolution-this._padding.x)),"bottom"===this.boundsAlignV?k.y+=this.textBounds.height-3-B.height/this.textObject.resolution-this._padding.y:"middle"===this.boundsAlignV&&(k.y+=.5*(this.textBounds.height-6-B.height/this.textObject.resolution-this._padding.y)),this.textObject.pivot.x=-k.x,this.textObject.pivot.y=-k.y}setText(k){this.textObject.text!==k&&(this.textObject.text=k,this.textObject.updateText(!0),this.calculateAlignment())}applyTint(k){this.textObject.tint=k}}},85313:(k,B,U)=>{"use strict";U.d(B,{B:()=>z});var F=U(62459),G=U(68910),j=U(88022),$=U(66582),H=U(35120),V=U(98013),W=U(37193),q=U(3788),K=U(26480);class z extends K.g{constructor(k,B,U,j,$,V={}){var W,K;super(k,B),this.lines=0,this.text="",this.sprites=[],this.scaleToFit=!1,this.fontSize=20,this._defaultFontSize=26,this.horizontalAlignment=null,this.fontID=10,this.fontName=null,this.lineHeight=0,this.monoSpace=0,this.iconOffsetY=0,this.numberOfLines=1,this.boundsWidth=H.q.instance.game.width,this.x=U,this.y=j,this.letters=H.q.instance.prodigy.create.element(this,0,0),F.Aq$.isDefined(V.width)&&(this.boundsWidth=V.width,V.scaleToFit&&(this.scaleToFit=!0)),F.Aq$.isDefined(V.size)&&(this.fontSize=V.size),this.horizontalAlignment=V.align,F.Aq$.isDefined(V.fontID)&&(this.fontID=V.fontID),this.fontName=`atlas-${this.fontID}`,this.lineHeight=V.lineHeight,this.monoSpace=V.mono,F.Aq$.isDefined(V.iconOffsetY)&&(this.iconOffsetY=V.iconOffsetY);const z=`${null!==(W=V.fontID)&&void 0!==W?W:10}-${null!==(K=V.size)&&void 0!==K?K:20}`;if(q.B[z]){switch(this._pixiTextStyle=Object.assign({},q.B[z]),this._pixiText=new G.Text("",this._pixiTextStyle),this.addChild(this._pixiText),this._pixiText.roundPixels=!0,F.Aq$.isDefined(this.boundsWidth)&&!this.scaleToFit&&(this._pixiTextStyle.wordWrap=!0,this._pixiTextStyle.wordWrapWidth=this.boundsWidth),this.horizontalAlignment){case F.If$.Center:this._pixiText.anchor.set(.5,0),this._pixiText.x=this.boundsWidth>>1;break;case F.If$.Right:this._pixiText.anchor.set(1,0),this._pixiText.x=this.boundsWidth;break;default:this._pixiText.anchor.set(0,0),this._pixiText.x=0}this._pixiTextStyle.paddingTop&&(this._pixiText.y+=this._pixiTextStyle.paddingTop),this.setPixiText($)}else F.Aq$.isDefined($)&&(F.VyI.log(`[Legacy Font][BitmapFont] No legacy text style found for font key ${z}, falling back to sprite-based bitmap font to render "${$}".`,F.$bb.Warning),this.setText($))}setText(k){if(!F.Aq$.isDefined(this._game)||this.text===k)return;if(this._pixiText)return this.setPixiText(k),void(this.text=k);V.l.toggleDisplayObjSettings(this.letters,!0),this.letters.removeAll(!1),this.text=k;let B=0,U=0,G=0;const $=[];let W=0,q=null,K=!1;for(let F=0;F=this.sprites.length?(Z=H.q.instance.prodigy.create.sprite(B,U,this.fontName),this.sprites.push(Z)):(Z=this.sprites[Q],Z.visible=!0),this.letters.add(Z),Z.x=B,Z.y=U,F.Aq$.isDefined(Y)){const k=Y.split(":");if(k.length>=2&&"single-image"===k[0]){const G=k[1],j=k[2],$=k[3],V=k[4],W=k[5];if(Z.key!==G){let k,q,K;this.remove(Z),Z.visible=!1,H.q.instance.prodigy.load.assets([G],(()=>{Z.visible=!0})),F.Aq$.isDefined(j)&&F.Aq$.isDefined($)&&(k={x:parseFloat(j),y:parseFloat($)}),F.Aq$.isDefined(V)&&(q=parseInt(V)),F.Aq$.isDefined(W)&&(K=parseInt(W)),Z=H.q.instance.prodigy.icon.createIcon(B,U,G,k,void 0,q,K,!1),this.letters.add(Z),this.sprites.splice(Q,1,Z)}}else Z.key!==j._.General_icons_json&&Z.loadTexture(j._.General_icons_json),Z.frameName=Y;Z.y+=this.iconOffsetY}else Z.key!==this.fontName&&Z.loadTexture(this.fontName),10!==z&&(Z.frameName=`${z}-${this.fontSize}`);if(32===z||V===k.length-1||10===z){const k=0===this.fontSize?this._defaultFontSize:this.fontSize,H=F.Aq$.isDefined(this.lineHeight)?this.lineHeight:k+5;if(B>=this.boundsWidth){const V=B;B=0,U+=H;for(let $=G;$<=Q;$++)this.sprites[$].x=B,this.sprites[$].y=U,this.sprites[$].key===j._.General_icons_json&&(this.sprites[$].y+=(this.sprites[$].height-k)/2),B+=F.Aq$.isDefined(this.monoSpace)?this.monoSpace:this.sprites[$].width;$.push(V-B),this.numberOfLines++}else 10===z&&(Z.visible=!1,U+=H,B=0,this.numberOfLines++);G=Q+1,32===z&&(B+=X)}10!==z&&(F.Aq$.isDefined(this.monoSpace)?B+=this.monoSpace:B+=Z.width),V===k.length-1&&$.push(B)}if(this.lines=$.length,F.Aq$.isDefined(this.horizontalAlignment)&&this.horizontalAlignment!==F.If$.Left){let k=-1,B=0,U=-1;for(let G=0;G>1),F.atlas,F.frame)),k=" "),G=G.replace("[membership]",k)}for(const F of["mail-gold","mail-heart","mail-star","mail-tower"])G.includes(`[${F}]`)&&(this.addChild(H.q.instance.prodigy.create.sprite(0,(null!==(U=this._pixiTextStyle.paddingTop)&&void 0!==U?U:0)+(this._pixiTextStyle.fontSize-24>>1),j._.General_icons_json,F)),G=G.replace(`[${F}]`," "));switch(this._pixiTextStyle.forceCaps&&(this._pixiTextStyle.lowerSize&&[...G].some((k=>k===k.toLowerCase()))&&(this._pixiTextStyle.fontSize=this._pixiTextStyle.lowerSize),G=G.toUpperCase()),this.horizontalAlignment){case F.If$.Center:this._pixiText.anchor.set(.5,0),this._pixiText.x=this.boundsWidth>>1;break;case F.If$.Right:this._pixiText.anchor.set(1,0),this._pixiText.x=this.boundsWidth;break;default:this._pixiText.anchor.set(0,0),this._pixiText.x=0}if(this._pixiTextStyle.paddingTop&&(this._pixiText.y+=this._pixiTextStyle.paddingTop),this._pixiText.text=G,this._pixiText.style=this._pixiTextStyle,this.scaleToFit&&this._pixiText.width>this.boundsWidth){const k=this.boundsWidth/this._pixiText.width;this._pixiText.scale.set(k,k),F.Aq$.toggleDisplayObjSmooth(this._pixiText,!0)}}addClickCallback(k,B,U){const F=this.add(H.q.instance.prodigy.create.sprite(0,0,j._.General_core_json,"overlay-light"));F.width=B,F.height=U,F.alpha=0,F.inputEnabled=!0,F.events.onInputDown.add(k)}destroy(k={children:!0}){F.W$e.instance.game.tweens.removeAllFromOwner(this),super.destroy(k)}}},98623:(k,B,U)=>{"use strict";U.d(B,{H:()=>V});var F=U(62459),G=U(88022),j=U(35120),$=U(34829),H=U(26480);class V extends H.g{get isModalWithTransparency(){return this._isModalWithTransparency}constructor(k,B,U,F,G){super(k,B,null,null,null,null,U,F,G),this._isModalWithTransparency=!1,this.game=k,this.metricsManager=j.q.instance.prodigy.gameContainer.get("2a1-fed9"),this.metricsManager.objectCreated("Element")}setRenderState(k,B){this.renderOnly=k,this.tintElement=B}showTooltip(k,B){if(this.hasTooltip()&&(this.tooltip.destroy(),this.tooltip=null),F.Aq$.isDefined(k)){this.tooltip=j.q.instance.prodigy.create.element(this,B);let U=this.tooltip.add(j.q.instance.prodigy.create.sprite(30,0,G._.General_core_json,"tooltip"));U.scale.x=-1,U.alpha=.9,U.width=300,U.height=50,j.q.instance.prodigy.create.font(this.tooltip,90,11,k,{width:230,align:"center"}),U=this.tooltip.add(j.q.instance.prodigy.create.sprite(0,0,G._.General_icons_json,"type")),this.game.add.tween(U,this).to({x:10},1e3,F.GS3.Quadratic.InOut,!0,0,$.s.MAX_SAFE_INTEGER,!0)}}hasTooltip(){return F.Aq$.isDefined(this.tooltip)}highlight(k,B=0,U=0,H=400){this.isHighlighted()&&(this.arrow.destroy(),this.arrow=null),k&&(this.arrow=this.add(j.q.instance.prodigy.create.sprite(0,0,G._.General_icons_json,"help")),this.arrow.x=B+Math.floor(this.width/2),this.arrow.y=U-this.arrow.height+10,this.game.add.tween(this.arrow,this).to({y:this.arrow.y+25},H,F.GS3.Quadratic.InOut,!0,0,$.s.MAX_SAFE_INTEGER,!0))}isHighlighted(){return F.Aq$.isDefined(this.arrow)}setElementAsModal(k){this._isModalWithTransparency=k,j.q.instance.prodigy.open.bitmapCacheGameRender(k,this)}destroy(k={children:!0}){this.cacheAsBitmap=!1,this.metricsManager&&(this.metricsManager.objectDestroyed("Element"),this.metricsManager=null),this.tooltip=null,this.arrow=null,super.destroy(k),this.game=null}getInjectedValue(k){return j.q.instance.prodigy.gameContainer.get(k)}}},63119:(k,B,U)=>{"use strict";U.d(B,{F:()=>H});var F=U(62459),G=U(35120),j=U(60881),$=U(98623);class H extends $.H{static createInputField(k,B,U,G,j,$,V=this.WIDTH_MEDIUM,W=this.HEIGHT_MEDIUM,q="textProdigy123"){const K=document.getElementById(U);F.Aq$.isDefined(K)&&K.remove();const z=new H(k,B,U,G,j,$,V-15,W);return z.setAttribute("type",q),z}constructor(k,B,U,G,j,$,H,V,W=null,q="on"){super(k,B),this.onFocusChanged=null,this.onTextChanged=null,this.input=null,this.style={},this.canvas=null,this.allowEvents=!1,this.inputWidth=0,this.inputHeight=0,this.label=null,this._fadeTween=null,this.input=document.createElement("input"),this.input.setAttribute("value",""),this.input.setAttribute("id",U),this.input.setAttribute("class","game-input"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("autocomplete",q),this.input.setAttribute("placeholder",F.Aq$.isDefined(G)?G:""),this.style=W;document.getElementById("external-ui").appendChild(this.input),this.canvas=document.getElementById("game-container").getElementsByTagName("canvas")[0],this.x=j,this.y=$,this.inputWidth=H,this.inputHeight=V,this.allowEvents=!0,this.textChanged=this.textChanged.bind(this),this.input.addEventListener("focus",(k=>{this.handleFocusChanged(!0)})),this.input.addEventListener("blur",(k=>{this.handleFocusChanged(!1)}))}setStyle(k,B){this.input.style.setProperty(k,B)}setAttribute(k,B){this.input.setAttribute(k,B)}setAutoComplete(k){this.setAttribute("autocomplete",k?"on":"off")}setFocus(k){k?this.input.focus():this.input.blur()}clearEvents(k){this.allowEvents=k}getValue(){return this.input.value}setValue(k){this.input.value=k}setVisible(k){this.setStyle("display",k?"":"none")}hide(k){this.visible=!1,this.fade(0,k),F.Aq$.isDefined(this.label)&&(this.label.alpha=0),this.setFocus(!1)}show(k,B=0){this.visible=!0,this.fade(1,k,B),F.Aq$.isDefined(this.label)&&(this.label.alpha=1)}setEnabled(k){this.input.disabled=!k}enablePerKeyEvents(k){k?this.input.addEventListener("keyup",this.textChanged):this.input.removeEventListener("keyup",this.textChanged)}setLabel(k,B=null,U=!1,j=null){F.Aq$.isDefined(this.label)?this.label.setText(B):this.label=G.q.instance.prodigy.create.font(k,F.Aq$.isDefined(j)?j:this.x+10,this.y-30,B,{size:20})}update(){super.update();const k=this.canvas.clientHeight/this.game.world.height;F.Aq$.setOuterHeight(this.input,k*this.inputHeight);const B=this.canvas.clientWidth/this.game.world.width;F.Aq$.setOuterWidth(this.input,B*this.inputWidth);const U=k*this.y+(this.input.style.marginTop?parseInt(this.input.style.marginTop):0),G=B*this.x+(this.canvas.style.marginLeft?parseInt(this.canvas.style.marginLeft):0)+(this.input.style.marginLeft?parseInt(this.input.style.marginLeft):0),j=k*this.inputHeight*.5;if(this.setStyle("top",`${U}px`),this.setStyle("left",`${G}px`),this.setStyle("font-size",`${j}px`),F.Aq$.isDefined(this.style))for(const F in this.style)this.style.hasOwnProperty(F)&&this.setStyle(F,this.style[F])}destroy(){this.setFocus(!1),this.input.remove(),G.q.instance.game.tweens.remove(this._fadeTween),super.destroy()}handleFocusChanged(k){this.allowEvents&&(k?this.game.input.keyboard.clearCaptures():this.game.input.keyboard.addKeyCapture([j.D.BACKSPACE]),F.Aq$.isDefined(this.onFocusChanged)&&this.onFocusChanged(k))}fade(k,B,U=0){if(this._fadeTween&&this._fadeTween.stop(),k>0&&this.setVisible(!0),0===B)this.input.style.opacity=`${k}`,this.onFadeTweenComplete(k);else{const F={opacity:parseInt(this.input.style.opacity)};isNaN(F.opacity)&&(F.opacity=1),this._fadeTween=this.game.add.tween(F,this).to({opacity:k},B,null,null,U).onUpdateCallback((()=>{this.input.style.opacity=`${F.opacity}`})),this._fadeTween.onTweenComplete.add((()=>{this.onFadeTweenComplete(k)})),this._fadeTween.start()}}onFadeTweenComplete(k){this.input.style.opacity=`${k}`,0===k&&this.setVisible(!1)}textChanged(){F.Aq$.isDefined(this.onTextChanged)&&this.onTextChanged()}}H.HEIGHT_MEDIUM=47,H.WIDTH_MEDIUM=320},17291:(k,B,U)=>{"use strict";U.d(B,{b:()=>q});var F=U(62459),G=U(88022),j=U(35120),$=U(24190),H=U(77938),V=U(73797),W=U(98623);class q extends W.H{constructor(k,B,U,$={hideMenu:!0,hideContent:!0,tile:"bg-tile-brown"}){super(k,B),this.menuTutorial=null,this.style=null,this.btns=[],this.currentBtn=null,this.setupComplete=!1,this.overlay=null,this.isHidden=!1,this.spinner=null,this.bg=null,this.fg=null,this.title=null,this.bar=null,this.barSpeedX=0,this.barSpeedY=0,this.menuTutorial=U,this.style=$,j.q.instance.prodigy.open.menuOpen(!this.style.hideMenu),F.Aq$.isDefined(j.q.instance.prodigy.notifications)&&j.q.instance.prodigy.notifications.clearNotifications(),this.style.hideOverlay||(this.overlay=j.q.instance.prodigy.create.sprite(0,0,G._.General_core_json,"overlay-small"),this.overlay.width=this.game.world.width,this.overlay.height=this.game.world.height,this.overlay.alpha=0,this.overlay.inputEnabled=!0,this.add(this.overlay))}hide(k=!1){k?(this.isHidden=!0,this.visible=!1):this.isHidden&&(this.isHidden=!1,this.visible=!0)}onMenuOpen(k){}setup(){this.loadComplete()}update(){super.update(),this.setupComplete&&this.menuUpdate()}loadComplete(){this.game&&(F.Aq$.isDefined(this.spinner)&&this.spinner.destroy(),this.menuSetup())}menuSetup(){F.Aq$.isDefined(this.style.open)&&this.style.open(),this.bg=j.q.instance.prodigy.create.element(this,0,0),F.Aq$.isDefined(this.style.tile)&&this.setBackgroundTile(G._.Tiled_sprites_json,this.style.tile,.25,.25,this.style.full),this.fg=j.q.instance.prodigy.create.element(this,0,0),this.style.hideContent&&(this.game.broadcaster.broadcast(V.lc.EnableBackground,this,[!1]),this.game.broadcaster.broadcast(V.lc.EnableContent,this,[!1]))}close(){if(F.Aq$.isDefined(this.game)){if(this.style.hideContent&&(this.game.broadcaster.broadcast(V.lc.EnableBackground,this,[!0]),this.game.broadcaster.broadcast(V.lc.EnableContent,this,[!0])),j.q.instance.prodigy.open.menuOpen(!0),F.Aq$.isDefined(this.style.close)&&this.style.close(),this.btns)for(let k=0;k=0;U--)B[U].y=650,k+=B[U].width,B[U].x=1230-k,k+=30}if(F.Aq$.isDefined(k)){let B=0;for(let U=0;U{"use strict";U.d(B,{g:()=>j});var F=U(95891),G=U(57308);class j extends G.Y{constructor(k,B,U,G,j,$,H,V,W){super(k,B,U),F.isNil(W)||(this.name=W),F.isNil(H)||(this.x=H),F.isNil(V)||(this.y=V)}destroy(k={children:!0}){super.destroy(k)}}},35452:(k,B,U)=>{"use strict";U.d(B,{a:()=>q});var F=U(62459),G=U(88022),j=U(35120),$=U(73797),H=U(41674),V=U(15485),W=U(98623);class q extends W.H{constructor(k,B,U,G,$){super(k,B,U,G),this.buttons=[],this.renderTexture=null,this.background=null,this.renderImage=null,this.page=0,this.disableModeSet=!1,this._shouldClose=!1,this._currentInterfaceName="",F.Aq$.isDefined(j.q.instance.prodigy.notifications)&&j.q.instance.prodigy.notifications.clearNotifications(),this.renderTexture=$,this.background=j.q.instance.prodigy.create.element(this),this.renderTexture.clear(),this.renderImage=this.add(j.q.instance.prodigy.create.image(0,0,void 0,void 0,this.renderTexture)),this.renderImage.inputEnabled=!0}set currentInterfaceName(k){this._currentInterfaceName=k}get currentInterfaceName(){return this._currentInterfaceName}create(){j.q.instance.prodigy.open.setActiveRenderMenu(this),this.process(),this.game.broadcaster.broadcast($.pm.StopPlayer)}setMode(k){if(F.Aq$.isDefined(this.buttons))for(let B=0;B0&&(st=3*W.length+6),F.Aq$.isDefined(z)&&F.Aq$.isDefined(z.banner)&&(et=z.banner.frameName,it={atlasID:z.banner.atlasID},st=z.banner.width),F.Aq$.isDefined(W)&&W.length>0)j.q.instance.prodigy.create.panel(Z,40,40,st,2,et,it);else if(F.Aq$.isDefined(K)){const k=j.q.instance.prodigy.create.panel(Z,40,40,18,2,et);j.q.instance.prodigy.create.font(k,200,15,K,{size:36,fontID:9})}let nt={x:-40,y:-10};if(F.Aq$.isDefined(z)&&F.Aq$.isDefined(z.closeButton)?(J=z.closeButton.key,tt=z.closeButton.frameName,nt=z.closeButton.offset):(J=G._.General_icons_json,tt="close"),j.q.instance.prodigy.create.button(this,Z.x+40*k+nt.x,Z.y+nt.y,J,tt,(()=>{j.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:V.k.X,interfaceName:this.currentInterfaceName,interfaceType:H.Wm.Menu}),this.close()})),this.buttons=[],F.Aq$.isDefined(W)&&W.length>0){let k={x:0,y:0},B={x:0,y:0},U=120;F.Aq$.isDefined(z)&&F.Aq$.isDefined(z.buttons)&&(k=z.buttons.offset,B=z.buttons.iconOffset,U=null!==(X=z.buttons.spacing)&&void 0!==X?X:U),F.Aq$.isDefined($)&&!Q&&(Z.add(j.q.instance.prodigy.create.sprite(B.x+80,-10,G._.General_icons_json,"menu-crest")),""===$||Y||j.q.instance.prodigy.create.font(Z,B.x+80,70,$,{width:140,align:"center"}));for(let F=0;F{"use strict";U.d(B,{k:()=>V});var F=U(62459),G=U(88022),j=U(35120),$=U(92150),H=U(34829);class V extends $._{get isLoaded(){return!this._loadingAsset}constructor(k,B,U,$,V,W=null,q,K,z,Y){let Q=G._.General_core_json,X="empty";const Z=j.q.instance.prodigy.load.isFileLoaded($);Z?(Q=$,X=V):Y&&(X="icon-loading"),super(k,B,U,Q,X),this.forcedWidth=K,this.forcedHeight=z,this.onTextureLoaded=q,this.loadingTween=null;let J=!1;Z?(this.checkSpriteDimension(),J=!0,F.Aq$.isDefined(W)&&this.anchor.set(W.x,W.y)):(F.Aq$.isDefined(Y)&&Y&&(this.anchor.set(.5,.5),this.x+=40,this.y+=40,this.loadingTween=this.game.add.tween(this,this).to({angle:360},2e3,F.GS3.Linear.None,!0,0,H.s.MAX_SAFE_INTEGER,!1)),this.checkSpriteDimension(),this._loadingAsset={source:$,frame:V},j.q.instance.prodigy.load.assets($,this.onSourceAssetLoaded.bind(this,B,U,$,V,W))),J&&this.checkCallback()}setActive(k){this.tint=k?16777215:5789784}loadNewTexture(k,B,U=null,$=!1){F.Aq$.isDefined(this.loadingTween)&&(j.q.instance.game.tweens.remove(this.loadingTween),this.loadingTween=null,this.anchor.set(0,0),this.x-=40,this.y-=40,this.angle=0),this._loadingAsset={source:k,frame:B},this._updateFrame=null,j.q.instance.prodigy.load.isFileLoaded(k)?this.onSourceAssetLoaded(this.x,this.y,k,B,U):($?(this.loadTexture(G._.General_core_json,"icon-loading"),this.anchor.set(.5,.5),this.x+=40,this.y+=40,this.loadingTween=this.game.add.tween(this,this).to({angle:360},2e3,F.GS3.Linear.None,!0,0,H.s.MAX_SAFE_INTEGER,!1)):this.loadTexture(G._.General_core_json,"empty"),j.q.instance.prodigy.load.assets(k,this.onSourceAssetLoaded.bind(this,this.x,this.y,k,B,U)))}checkSpriteDimension(){F.Aq$.isDefined(this.forcedWidth)&&(this.width=this.forcedWidth),F.Aq$.isDefined(this.forcedHeight)&&(this.height=this.forcedHeight)}rotateMiddleBased(k){this.middleRotatedAngle=k,this.anchor.set(.5,.5),this.angle=this.middleRotatedAngle}onSourceAssetLoaded(k,B,U,G,$=null){var H;if(this.game&&this.exists&&this._loadingAsset&&this._loadingAsset.source===U&&this._loadingAsset.frame===G){if(F.Aq$.isDefined(this.loadingTween)&&(j.q.instance.game.tweens.remove(this.loadingTween),this.loadingTween=null,this.anchor.set(0,0),this.x-=40,this.y-=40,this.angle=0),this.key=U,null!==this.key){let k=null!==(H=this._updateFrame)&&void 0!==H?H:G;0===U.indexOf("icon-")&&(k=void 0),this.loadTexture(U,k)}this._loadingAsset=null,this._updateFrame=null,this.cameraOffset=new F.I9Y(k,B),F.Aq$.isDefined(this.middleRotatedAngle)?this.rotateMiddleBased(this.middleRotatedAngle):F.Aq$.isDefined($)&&this.anchor.set($.x,$.y),this.checkSpriteDimension(),this.checkCallback()}}updateFrame(k){this.isLoaded?super.updateFrame(k):this._updateFrame=k}checkCallback(){var k;null===(k=this.onTextureLoaded)||void 0===k||k.call(this,this)}destroy(){this.onTextureLoaded=null,j.q.instance.game.tweens.remove(this.loadingTween),this.loadingTween=null,super.destroy()}}V.DESTROYED="_destroyed"},8096:(k,B,U)=>{"use strict";U.d(B,{a:()=>J});var F,G=U(62459),j=U(88022),$=U(35120),H=U(60881),V=U(98013),W=U(17425),q=U(8674),K=U(49237),z=U(43531),Y=U(16847);!function(k){k.Default="default",k.NoPortrait="noPortrait",k.NoCancel="noCancel"}(F||(F={}));let Q=class extends G.uAl{constructor(){super(...arguments),this.rootObject=null,this.faceContainer=null,this.nameBackground=null,this.textName=null,this.textBody=null,this.noPortraitTextBody=null,this._cancelButton=null,this.nextButton=null,this.followButton=null,this.wearButton=null,this.startButton=null,this.shopButton=null,this.spinButton=null,this.yesButton=null,this.stayButton=null,this.leaveButton=null,this.keepButton=null,this.changeButton=null,this.currencyButton=null,this.goNowButton=null,this.notNowButton=null,this.iconImageContainer=null,this.currencyDisplay=null,this.infoTextContainer=null,this.confirmButton=null,this.noCancelTextBody=null,this.textBoxMode=F.Default}get cancelButton(){return this._cancelButton}initializeComponents(k){switch(this.followButton.GameObject.active=!1,this.wearButton.GameObject.active=!1,this.startButton.GameObject.active=!1,this.shopButton.GameObject.active=!1,this.spinButton.GameObject.active=!1,this.yesButton.GameObject.active=!1,this.leaveButton.GameObject.active=!1,this.stayButton.GameObject.active=!1,this.changeButton.GameObject.active=!1,this.keepButton.GameObject.active=!1,this.currencyButton.GameObject.active=!1,this._cancelButton.GameObject.active=!1,this.iconImageContainer.GameObject.active=!1,this.infoTextContainer.active=!1,this.textBoxMode=F.Default,this.currencyDisplay&&(this.currencyDisplay.GameObject.active=!1),k){case z.fA.EQUIP:this.confirmButton=this.wearButton;break;case z.fA.START:this.confirmButton=this.startButton;break;case z.fA.STORE:this.confirmButton=this.shopButton;break;case z.fA.WHEEL:this.confirmButton=this.spinButton;break;case z.fA.FOLLOW:this.confirmButton=this.followButton;break;case z.fA.LEAVE:this.confirmButton=this.leaveButton,this._cancelButton=this.stayButton;break;case z.fA.CHANGE:this.confirmButton=this.changeButton,this._cancelButton=this.keepButton;break;case z.fA.CURRENCY:this.confirmButton=this.currencyButton,this._cancelButton=this.stayButton;break;default:this.confirmButton=this.yesButton}}setWindowPosition(k){G.Aq$.isDefined(k)&&(k===z.DG.Bottom?this.rootObject.transform.setPositionY($.q.instance.game.height):k===z.DG.Middle?this.rootObject.transform.setPositionY(555):this.rootObject.transform.setPositionY(236))}setNameWithKey(k){this.textName.text=k,this.textName.TextObject.visible=!0,this.nameBackground.active=!0}setTextBoxMode(k,B=!1){B&&this.textBoxMode!==F.Default||(this.textBoxMode=k,this.textBody.GameObject.active=k===F.Default,this.noPortraitTextBody.GameObject.active=k===F.NoPortrait,this.noCancelTextBody.GameObject.active=k===F.NoCancel,k===F.NoPortrait?this.noPortraitTextBody.text=this.textBody.text:k===F.NoCancel&&(this.noCancelTextBody.text=this.textBody.text))}setItemIcon(k,B){this.iconImageContainer.updateAsset(k,B),this.iconImageContainer.GameObject.active=!0}setCurrency(k){G.Aq$.isDefined(this.currencyDisplay)&&(this.currencyDisplay.GameObject.active=G.Aq$.isDefined(k),this.currencyDisplay.GameObject.active&&this.currencyDisplay.updateCurrencyID(k))}setInfoTextContainer(k){this.infoTextContainer.active=k}};(0,q.Cg)([(0,G.ERr)(),(0,q.Sn)("design:type",G._mx)],Q.prototype,"rootObject",void 0),(0,q.Cg)([(0,G.MnK)(G.y4o),(0,q.Sn)("design:type",G.y4o)],Q.prototype,"faceContainer",void 0),(0,q.Cg)([(0,G.ERr)(),(0,q.Sn)("design:type",G._mx)],Q.prototype,"nameBackground",void 0),(0,q.Cg)([(0,G.MnK)(G.EYj),(0,q.Sn)("design:type",G.EYj)],Q.prototype,"textName",void 0),(0,q.Cg)([(0,G.MnK)(G.EYj),(0,q.Sn)("design:type",G.EYj)],Q.prototype,"textBody",void 0),(0,q.Cg)([(0,G.MnK)(G.EYj),(0,q.Sn)("design:type",G.EYj)],Q.prototype,"noPortraitTextBody",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"_cancelButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"nextButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"followButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"wearButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"startButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"shopButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"spinButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"yesButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"stayButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"leaveButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"keepButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"changeButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"currencyButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"goNowButton",void 0),(0,q.Cg)([(0,G.MnK)(K.$),(0,q.Sn)("design:type",K.$)],Q.prototype,"notNowButton",void 0),(0,q.Cg)([(0,G.MnK)(G.vYh),(0,q.Sn)("design:type",G.vYh)],Q.prototype,"iconImageContainer",void 0),(0,q.Cg)([(0,G.MnK)(Y.n),(0,q.Sn)("design:type",Y.n)],Q.prototype,"currencyDisplay",void 0),(0,q.Cg)([(0,G.ERr)(),(0,q.Sn)("design:type",G._mx)],Q.prototype,"infoTextContainer",void 0),(0,q.Cg)([(0,G.MnK)(G.EYj),(0,q.Sn)("design:type",G.EYj)],Q.prototype,"noCancelTextBody",void 0),Q=(0,q.Cg)([(0,G.EVk)("CharacterDialoguePrefab")],Q);var X,Z=U(82680);!function(k){k[k.None=1]="None",k[k.Yes=2]="Yes",k[k.No=4]="No",k[k.Next=8]="Next"}(X||(X={}));class J extends Z.W{constructor(k,B,U,F,G){super(k,B,70,{},G.concat([j._.Ui_dialogues_json,j._.Ui_buttons_json])),this.dialogueConfig={},this.nextEvent=null,this.currentSound=null,this.dialogueContainer=null,this.confirmCallback=null,this.cancelCallback=null,this.prefabObj=null,this.prefabComponent=null,this.game=k,this.dialogueConfig=U,this.nextEvent=F,this.isModal=!1}create(){super.create();const k=$.q.instance.prodigy.gameContainer.get("d0e-64fd");this.prefabObj=k.load(1,void 0,this.getInjectionData(this.dialogueConfig.dialogueData)),this.dialogueContainer.addChild(this.prefabObj.findComponent(G.y4o).getRootContainer()),this.prefabComponent=this.prefabObj.findComponentInChildren(Q),this.prefabComponent.initializeComponents(this.dialogueConfig.type),this.prefabComponent.nextButton.onClick.add(this.dialogueCallback.bind(this)),setTimeout((()=>{this.game.input.enabled=!0,this.game.input.reset();for(let k=0;k"INFO_TEXT"===k.injectionName)))||void 0===B?void 0:B.data)&&this.prefabComponent.setInfoTextContainer(!0),j.avatar.dimmed&&(q.tint=4605510),j.avatar.silhouetted&&(q.tint=0),this.prefabComponent.setCurrency(null===(U=j.currencyButton)||void 0===U?void 0:U.currencyId),""!==j.avatar.atlas||G.Aq$.isDefined(j.nameKey)?this.prefabComponent.setTextBoxMode(F.Default):this.prefabComponent.setTextBoxMode(F.NoPortrait)}if(G.Aq$.isDefined(this.dialogueConfig.text)&&(this.prefabComponent.textBody.text=this.dialogueConfig.text),G.Aq$.isDefined(this.dialogueConfig.blockInput)&&this.dialogueConfig.blockInput?this.setButtonVisibility(X.Next):(this.background.visible=!1,this.setButtonVisibility(X.None)),(G.Aq$.isDefined(this.dialogueConfig.yes)||G.Aq$.isDefined(this.dialogueConfig.no))&&this.setButtonVisibility(X.Yes|X.No),this.dialogueConfig.hideNext&&(this.prefabComponent.nextButton.GameObject.active=!1),!1===this.dialogueConfig.isCancelButtonVisible&&(this.prefabComponent.cancelButton.GameObject.active=!1),G.Aq$.isDefined(this.dialogueConfig.nextButtonText)){this.prefabComponent.nextButton.GameObject.findComponentsInChildren(G.EYj).forEach((k=>{k.text=this.dialogueConfig.nextButtonText}))}if(G.Aq$.isDefined(this.dialogueConfig.yesButtonText)){this.prefabComponent.confirmButton.GameObject.findComponentsInChildren(G.EYj).forEach((k=>{k.text=this.dialogueConfig.yesButtonText}))}if(G.Aq$.isDefined(this.dialogueConfig.noButtonText)){this.prefabComponent.cancelButton.GameObject.findComponentsInChildren(G.EYj).forEach((k=>{k.text=this.dialogueConfig.noButtonText}))}this.prefabComponent.cancelButton.GameObject.active||this.prefabComponent.setTextBoxMode(F.NoCancel,!0);const W=this.game.input.keyboard.addKey(H.D.ENTER);this.prefabComponent.nextButton.GameObject.active?W.onDown.add(this.onEnterKey,this):W.onDown.remove(this.onEnterKey,this)}setButtonVisibility(k){this.prefabComponent.confirmButton.GameObject.active=(k&X.Yes)===X.Yes,this.prefabComponent.cancelButton.GameObject.active=(k&X.No)===X.No,this.prefabComponent.nextButton.GameObject.active=(k&X.Next)===X.Next}updateSchema(k,B){if(G.Aq$.isDefined(this.game))if(this.dialogueConfig=k,this.prefabComponent.confirmButton.onClick.removeAll(),this.prefabComponent.cancelButton.onClick.removeAll(),this.prefabComponent.nextButton.onClick.removeAll(),this.prefabComponent.initializeComponents(this.dialogueConfig.type),this.prefabComponent.nextButton.onClick.add(this.dialogueCallback.bind(this)),B.length>0){for(let k=0;k-1&&W.K.cacheAsset(this.game,U,W.K.zoneAssetsCached)}$.q.instance.prodigy.load.assets(B,this.renderDialogue.bind(this))}else this.renderDialogue()}onEnterKey(){this.dialogueCallback(null)}dialogueCallback(k){$.q.instance.prodigy.audio.playSFX(18,"pop");let B=null;G.Aq$.isDefined(k)&&(this.nextEvent&&this.dialogueConfig.preserveNextEvent&&(B=this.nextEvent),k()),this.nextEvent?this.nextEvent():B?B():G.VyI.log("Dialogue callback nextEvent not found.",G.$bb.Warning)}stopSound(){G.Aq$.isDefined(this.currentSound)&&(this.currentSound.stop(),this.currentSound.destroy())}close(){if(this.stopSound(),this.currentSound=null,this.prefabComponent&&(this.prefabComponent.nextButton.onClick.dispose(),this.prefabComponent.confirmButton.onClick.dispose(),this.prefabComponent.cancelButton.onClick.dispose(),this.prefabComponent=null,this.prefabObj.destroy()),this.nextEvent=null,this.dialogueContainer=null,this.confirmCallback=null,this.cancelCallback=null,this.prefabObj=null,this.game){this.game.input.keyboard.addKey(H.D.ENTER).onDown.remove(this.onEnterKey,this)}super.close()}}J.FACE_X=0,J.FACE_Y=198},95057:(k,B,U)=>{"use strict";var F;U.d(B,{R:()=>F}),function(k){k.Alternative="alternative",k.BattlePass="treasure-track",k.BattlePassUpsell="TT-Upsell",k.Contextual="contextual-ad",k.DynamicMemberPrompt="dynamicMemberPrompt",k.Modal="modal",k.Mythics21Q4="mythics21Q4",k.None="",k.Pet="pet",k.PostBattleBanner="post-battle-banner",k.Static="static",k.UnifiedConversionFlow="unified-upsell",k.Video="video"}(F||(F={}))},11117:(k,B,U)=>{"use strict";U.d(B,{R:()=>at});var F=U(62459),G=U(95891),j=U(88022),$=U(35120),H=U(29738),V=U(35757),W=U(77938),q=U(75017),K=U(65050),z=U(41674),Y=U(15485),Q=U(46784),X=U(76945),Z=U(30226),J=U(21418),tt=U(48951),et=U(95057),it=U(86050),st=U(82680);class nt extends st.W{constructor(k,B,U,F,G,j,H=0){super(k,B,U,G,j),this.currentPageNum=-1,this.pageSets=[],this.pages=[],this.buttonCallbacks={},this.firstPage=0,this.firstPage=H,this.pageSets=F,this.segment=$.q.instance.prodigy.gameContainer.get("c47-20b6")}preprocess(){this.queuePostCreateCallback(this.setCallbacks.bind(this),this.setup.bind(this))}setup(){this.pages=[];for(let k=0;k=0&&B.push(F)}return B.length<1&&F.VyI.log(`Could not find any templates with prefix ${k}`,F.$bb.Verbose),B}setCallbacks(){F.Aq$.isDefined(this.leftArrowButton)&&(this.leftArrowButton.onClickCallback=this.prevPage.bind(this)),F.Aq$.isDefined(this.rightArrowButton)&&(this.rightArrowButton.onClickCallback=this.nextPage.bind(this))}nextPage(){this.setPage(this.currentPageNum+1)}prevPage(){this.setPage(this.currentPageNum-1)}setPage(k){var B;const U=F.cj9.clamp(k,0,this.pages.length-1);U!==this.currentPageNum&&(F.Aq$.isDefined(this.page)&&(this.page[this.pageName].destroy(),this.page=null),this.currentPageNum=U,F.Aq$.isDefined(this.leftArrowButton)&&(this.leftArrowButton.visible=this.currentPageNum>0),F.Aq$.isDefined(this.rightArrowButton)&&(this.rightArrowButton.visible=this.currentPageNum{$.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelQuit("Click-Membership","Close-Clicked"),this.fireButtonEvent({buttonName:Y.k.X,interfaceType:z.Wm.InfoPanel}),this.fireInterfaceEvent({interfaceType:z.Wm.InfoPanel,originType:z.$N.ButtonClick,originID:Y.k.X,closeMethod:z.Lv.X}),this.close()},Z.J.shouldSuppressAd(k)?this.buttonCallbacks.signUpButton=this.buttonCallbacks.closeButton:this.buttonCallbacks.signUpButton=this.onMembershipButtonClick.bind(this,F.Aq$.isDefined(this.sourceOverride)?this.sourceOverride:"MemberButton"),super.setCallbacks()}shouldShowSignupButton(k=!1){const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=$.q.instance.prodigy.gameContainer.get("db5-fb6e"),F=U.meetsRequirementsDeprecated(17)&&!U.meetsRequirementsDeprecated(15);return!B.hasMembership()||k&&F}loadAds(){if(this.availableIndices=this.getFilteredIconArray().map(((k,B)=>B)),F.Aq$.isDefined(this.promotedAd))for(let k=0;k{$.q.instance.prodigy.audio.playVoice(U.tag,null,U.s,U.d)}))}}onMembershipButtonClick(k){const B=$.q.instance.prodigy.gameContainer;this.shouldShowSignupButton(!0)&&(F.Aq$.isDefined(this.analyticEvents)&&(this.fireButtonEvent({buttonName:Y.k.BecomeAMember,interfaceType:z.Wm.InfoPanel}),this.fireInterfaceEvent({interfaceName:Q.B.MembershipParentAd,interfaceType:z.Wm.InfoPanel,originType:z.$N.ButtonClick,originID:Y.k.BecomeAMember})),B.get("c47-20b6").purchase.sendFunnelStep("Click-Membership"),$.q.instance.prodigy.audio.stopVoice(),$.q.instance.prodigy.open.membershipParent(this.promotedAd,this.analyticEvents,this.isUpgradePath))}onPageLoaded(){if(super.onPageLoaded(),this.hideSignup&&F.Aq$.isDefined(this.page.signUpButton)&&(this.page.signUpButton.visible=!1),"playAtHome"===this.pageName||"playMemberAtHome"===this.pageName?F.Aq$.isDefined(this.promotedAd)&&this.page[this.pageName].children[5].setText(this.getFlavourText()):"amazingThings0"===this.pageName?this.renderFeatureIcons(0,this.page[this.pageName].children[4]):"amazingThings1"===this.pageName?(this.renderFeatureIcons(3,this.page[this.pageName].children[4]),this.renderFeatureIcons(6,this.page[this.pageName].children[5])):"amazingThings2"===this.pageName&&(this.renderFeatureIcons(9,this.page[this.pageName].children[4]),this.renderFeatureIcons(12,this.page[this.pageName].children[5])),"amazingThings0"===this.pageName){const k=this.page[this.pageName].children[3];this.generateGearIcons(6,k)}if("memberLockedPets"===this.pageName&&F.Aq$.isDefined(this.spineMonsterConfig)){new tt.c(this.game).createUIElements([this.spineMonsterConfig],this.page.spineBG)}$.q.instance.prodigy.audio.stopVoice()}generateGearIcons(k,B){let U=null;const F=[{category:"boots",count:0},{category:"hat",count:0},{category:"outfit",count:0},{category:"weapon",count:0}],j=[];for(let $=0;${"use strict";U.d(B,{v:()=>Z});var F=U(62459),G=U(88022),j=U(51742),$=U(35120),H=U(60881),V=U(11682),W=U(65050),q=U(41674),K=U(15485),z=U(46784),Y=U(95057),Q=U(29281),X=U(82680);class Z extends X.W{get prefabGameObject(){return this._prefabGameObject}constructor(k,B,U,$,H,V,W=!1){super(k,B,200,{},[G._.Ui_buttons_json,G._.Ui_shared_json,j.c.Sfx_store_equip,j.c.Sfx_store_purchase,G._.Ui_member_jar_json]),this.prefabRoot=null,this._prefabComponent=null,this._youtubeVideoComponent=null,this._isVideoLoaded=!1,this._isPlayerError=!1,this._minThresholdReached=-1,this._showUpgrade=!1,this._youtubeID=V,this._analyticSource=U,this._analyticEvents=F.Aq$.isDefined(H)?H:{conversionFunnelName:"",conversionFunnelMetadata:""},this._analyticEvents.conversionStaticOrVideo=void 0===this._analyticEvents.conversionStaticOrVideo||""===this._analyticEvents.conversionStaticOrVideo?Y.R.Video:this._analyticEvents.conversionStaticOrVideo,this._showUpgrade=W,this.currentInterfaceName=z.B.MembershipYouTubeAd,this.setCloseCallback($)}create(){var k;super.create();const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=$.q.instance.prodigy.gameContainer.get("d0e-64fd");this._prefabGameObject=U.load(Z.MEMBERSHIP_YOUTUBE_AD_PREFAB),this.prefabRoot.addChild(this._prefabGameObject.legacyTransform.group),this._prefabComponent=this._prefabGameObject.findComponentInChildren(Q.X),this._prefabComponent.closeButton.onClick.add(this.closeClicked,this),this._prefabComponent.memberButton.onClick.add(this.memberClicked,this),B.hasMembership()&&(this._prefabComponent.memberButton.GameObject.active=this._showUpgrade),this._youtubeVideoComponent=this._prefabComponent.ytVideo,this._youtubeVideoComponent.onPlayerReady.add(this.playerReadyHandler,this),this._youtubeVideoComponent.onPlayerError.add(this.playerErrorHandler,this),this._youtubeVideoComponent.onPlayerStateChange.add(this.playerStateChangeHandler,this),(null===(k=this._youtubeID)||void 0===k?void 0:k.length)>0&&this._youtubeVideoComponent.applyVideoURL(this._youtubeID),B.updateMembershipVideoAdData(this._youtubeID),this.fireInterfaceEvent({interfaceType:q.Wm.InfoPanel,originID:this._analyticSource,originType:q.$N.ButtonClick,instanceType:W.N.Interface})}playerReadyHandler(){this._isVideoLoaded=!0,this._minThresholdReached=0;this.game.input.keyboard.addKey(H.D.SPACEBAR).onDown.add(this.onKeyDown,this),this.visible||this.setYTVideoActive(!1)}onKeyDown(){if(this._youtubeVideoComponent&&this._youtubeVideoComponent.getPlayerState()===V.w.Playing){this._youtubeVideoComponent.stopVideo(!1);this.game.input.keyboard.addKey(H.D.SPACEBAR).onDown.remove(this.onKeyDown,this)}}playerErrorHandler(){this._isPlayerError=!0}playerStateChangeHandler(){this._youtubeVideoComponent&&this._youtubeVideoComponent.getPlayerState()===V.w.Playing&&!this.visible&&this._youtubeVideoComponent.stopVideo(!0)}closeClicked(){this._segment.purchase.sendFunnelQuit("Click-Membership","Close-Clicked"),this.fireButtonEvent({buttonName:K.k.X,interfaceType:q.Wm.InfoPanel}),this.fireInterfaceEvent({interfaceType:q.Wm.InfoPanel,originType:q.$N.ButtonClick,originID:K.k.X,closeMethod:q.Lv.X},{duration:this._minThresholdReached.toString()}),this.close()}memberClicked(){const k=$.q.instance.prodigy.gameContainer,B=k.get("e20-0fb0").player;B.hasMembership()&&!B.hasLegacyMembership()||(k.get("c47-20b6").purchase.sendFunnelStep("Click-Membership"),this.fireButtonEvent({buttonName:K.k.BecomeAMember,interfaceType:q.Wm.InfoPanel}),$.q.instance.prodigy.audio.stopVoice(),$.q.instance.prodigy.open.membershipParent(void 0,this._analyticEvents,this._showUpgrade,void 0,!0))}setActive(k){super.setActive(k),this.setYTVideoActive(k),this._prefabComponent.memberJar.active=k}setYTVideoActive(k){this._youtubeVideoComponent&&(this._youtubeVideoComponent.setVisible(k),k?this._youtubeVideoComponent.playVideo():this._youtubeVideoComponent.stopVideo(!0))}update(){if(super.update(),this._youtubeVideoComponent&&this._minThresholdReached<100)if(this._youtubeVideoComponent.getPlayerState()===V.w.Playing){const k=this._youtubeVideoComponent.getPercentPlayed();k>this._minThresholdReached&&(this._minThresholdReached=k)}else this._youtubeVideoComponent.getPlayerState()===V.w.Ended&&(this._minThresholdReached=100)}destroy(){this.game.input.keyboard.addKey(H.D.SPACEBAR).onDown.remove(this.onKeyDown,this),this._prefabComponent&&(this._prefabComponent.closeButton.onClick.dispose(),this._prefabComponent.memberButton.onClick.dispose()),this._prefabGameObject&&this._prefabGameObject.destroy(),this._youtubeVideoComponent&&(this._youtubeVideoComponent.onPlayerReady.dispose(),this._youtubeVideoComponent.onPlayerError.dispose(),this._youtubeVideoComponent.onPlayerStateChange.dispose(),this._youtubeVideoComponent.destroy()),this._prefabGameObject=null,this._prefabComponent=null,this._youtubeVideoComponent=null,super.destroy()}}Z.MEMBERSHIP_YOUTUBE_AD_PREFAB=134},29281:(k,B,U)=>{"use strict";U.d(B,{X:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(11682);let H=class extends G.uAl{constructor(){super(...arguments),this.closeButton=null,this.memberButton=null,this.memberButtonDownText=null,this.memberButtonOverText=null,this.memberButtonUpText=null,this.titleText=null,this.ytVideo=null,this.memberJar=null}};(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],H.prototype,"closeButton",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],H.prototype,"memberButton",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],H.prototype,"memberButtonDownText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],H.prototype,"memberButtonOverText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],H.prototype,"memberButtonUpText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],H.prototype,"titleText",void 0),(0,F.Cg)([(0,G.MnK)($.H),(0,F.Sn)("design:type",$.H)],H.prototype,"ytVideo",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],H.prototype,"memberJar",void 0),H=(0,F.Cg)([(0,G.EVk)("MembershipYouTubeAdPrefab")],H)},82680:(k,B,U)=>{"use strict";U.d(B,{W:()=>J});var F=U(62459),G=U(95891),j=U.n(G),$=U(88022),H=U(35120),V=U(77938),W=U(52491),q=U(73797),K=U(65050),z=U(41674),Y=U(85515),Q=U(28962),X=U(95130),Z=U(48951);class J extends X.D{get isModalWithTransparency(){return this._isModalWithTransparency}get onCreate(){return this._onCreate}set pendingClose(k){this._pendingClose=k}set currentInterfaceName(k){this._currentInterfaceName=k}constructor(k,B,U=null,G,j=[]){super(k,B),this.isModal=!0,this.isFullScreenUI=!1,this.isLoaded=!1,this.assetID=null,this.isNotificationCell=!1,this.skipStopPlayer=!1,this.skipSetActiveMenuOnClose=!1,this.skipRenderTransparencyLayer=!1,this.background=null,this.uiElementTemplates=[],this._isModalWithTransparency=!1,this.onClose=null,this.uiElements=[],this.uiRoot=null,this.configModifiers=null,this.onLoadCallbacks=[],this.configObj=null,this._onCreate=new F.HN0,this._pendingClose=!1,this._currentInterfaceName="",this._pendingInputReenable=!1,this._segment=H.q.instance.prodigy.gameContainer.get("c47-20b6"),F.Aq$.isDefined(H.q.instance.prodigy.notifications)&&H.q.instance.prodigy.notifications.clearNotifications(),this.background=H.q.instance.prodigy.create.element(this),this.configModifiers=F.Aq$.isDefined(G)?G:{},F.Aq$.isDefined(this.configModifiers.isModal)&&(this.isModal=this.configModifiers.isModal),F.Aq$.isDefined(U)&&(this.assetID=U),F.Aq$.isDefined(this.assetID)?(H.q.instance.game.input.enabled=!1,this._pendingInputReenable=!0,this.startLoad(j.concat($._.Font_ui_json),this.startLoadComplete.bind(this))):F.VyI.log("Config file for this UI has not been specified",F.$bb.Error),this.onLoadCallbacks=[]}init(k){k.addChild(this),this.process()}close(){H.q.instance.game&&H.q.instance.prodigy&&!this.skipSetActiveMenuOnClose&&H.q.instance.prodigy.open.setMenuInactive(this);try{F.Aq$.isDefined(this.onClose)&&this.onClose.apply(this)}catch(e){F.VyI.log(`Error in Menu Callback: ${e}`,F.$bb.Error)}F.Aq$.isDefined(H.q.instance.game)&&(this._pendingInputReenable&&(this._pendingInputReenable=!1,H.q.instance.game.input.enabled=!0),H.q.instance.prodigy.open.close(this)),this.isFullScreenUI&&this.setGameRenderState(!0),this.destroy()}processConfigObj(){if(F.Aq$.isDefined(this.assetID)&&(this.configObj=j().cloneDeep(V.t.getItem("ui",this.assetID).data)),F.Aq$.isDefined(this.configModifiers)&&F.Aq$.isDefined(this.configObj.elements)){if(F.Aq$.isDefined(this.configModifiers.modifyProperty))for(let k=0;k{"function"==typeof k&&k()})),this.onLoadCallbacks=[]}startLoadComplete(){this.isLoaded=!0}startLoad(k,B){H.q.instance.prodigy.load.assets(k,B)}createUIElements(k,B){const U=new Z.c(H.q.instance.game);F.Aq$.isDefined(k.elements)&&(this.uiRoot=new X.D(H.q.instance.game,B),this.uiRoot.populate({type:"UIElement",width:B.width,height:B.height}),this.uiElements=U.createUIElements(k.elements,this.uiRoot)),F.Aq$.isDefined(k.templates)&&(this.uiElementTemplates=k.templates)}getInjectedValue(k){return H.q.instance.prodigy.gameContainer.get(k)}setElementAsModal(k){this._isModalWithTransparency=k,H.q.instance.prodigy.open.bitmapCacheGameRender(k,this)}destroy(k){this._onCreate.dispose(),this.uiElements.length=0,super.destroy(k)}addInterfaceEventCommonProperties(k){var B,U;return null!==(B=k.interfaceName)&&void 0!==B||(k.interfaceName=this._currentInterfaceName),null!==(U=k.interfaceType)&&void 0!==U||(k.interfaceType=z.Wm.Menu),k}fireInterfaceEvent(k,B){const U=Object.assign({instanceType:K.N.Interface},this.addInterfaceEventCommonProperties(k));this._segment.featureCommon.sendInterfaceEvent(U,B)}fireButtonEvent(k,B){const U=Object.assign(Object.assign({},this.addInterfaceEventCommonProperties(k)),{saveClickInfo:k.buttonName});this._segment.featureCommon.sendButtonEvent(U,B)}fireTabEvent(k,B){this._segment.featureCommon.sendTabEvent(this.addInterfaceEventCommonProperties(k),B)}}},91315:(k,B,U)=>{"use strict";U.d(B,{p:()=>H});var F=U(62459),G=U(88022),j=U(35120),$=U(82680);class H extends $.W{constructor(k,B,U,j){super(k,B,F.Aq$.isDefined(U)?U:3,j,[G._.Ui_shared_json,G._.Font_general_json]),this.timer=null,this.contentText=null,this.currentText=null,this.okayButton=null,this.okayText=null,this.yesButton=null,this.noButton=null,this.closeButton=null}preprocess(k,B=null,U=null){let G=B;(!F.Aq$.isDefined(B)||"pumpkin"!==B&&"star-shard-small"!==B&&"snowflake-small"!==B)&&(G=null),this.currentText=k;const j=F.Aq$.isDefined(G)?`[${B}] ${U}`:U;this.updateConfigModifierProperty("titleBanner","text",j),this.updateConfigModifierProperty("titleBanner","visible",F.Aq$.isDefined(U)),this.updateConfigModifierProperty("contentText","text",k),this.queuePostCreateCallback(this.setTimerText.bind(this,k),this.openTween.bind(this))}close(k){F.Aq$.isDefined(this.timer)&&window.clearInterval(this.timer),super.close(),F.Aq$.isDefined(k)&&k()}setOkay(k=null,B){this.okayButton.visible=!0,this.okayText.setText(F.Aq$.isDefined(k)?k:j.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("BUTTON_OKAY_UPPERCASE")),this.okayButton.onClickCallback=()=>{this.close(B)}}setConfirm(k,B){this.yesButton.visible=!0,this.yesButton.onClickCallback=()=>{this.close(k)},this.noButton.visible=!0,this.noButton.onClickCallback=()=>{this.close(B)}}setConfirmGeneric(k,B,U){this.yesButton.visible=!0,this.yesButton.onClickCallback=()=>{this.close(k)},this.noButton.visible=!0,this.noButton.onClickCallback=()=>{this.close(B)},this.closeButton.visible=!0,this.closeButton.onClickCallback=()=>{this.close(U)}}setTimerText(k){F.Aq$.isDefined(this.timer)&&window.clearInterval(this.timer),F.Aq$.isDefined(k)&&this.setText(k,(new Date).getTime())}setText(k,B){if(F.Aq$.isDefined(this.game))if(F.Aq$.isDefined(this.contentText))if(k.indexOf("XTIMERX")>=0){const U=(new Date).getTime(),F=this.processTime(U-B);this.currentText=k,this.contentText.setText(k.replace("XTIMERX",F)),this.timer=window.setTimeout(this.setText.bind(this,k,B),500)}else this.currentText!==k&&(this.currentText=k,this.contentText.setText(k));else F.VyI.log("ERROR: Attempting to set text before finished loading message.",F.$bb.Error)}setCloseButton(k,B=null){this.closeButton.visible=k,this.closeButton.onClickCallback=()=>{this.close(B)}}processTime(k){if(k<=0)return"00:00";const B=Math.floor(k/36e5),U=Math.floor((k-36e5*B)/6e4),F=Math.floor((k-36e5*B-6e4*U)/1e3);let G="",j="",$="";return G=0===B?"00":B<10?`0${B}`:`${B}`,j=0===U?"00":U<10?`0${U}`:`${U}`,$=0===F?"00":F<10?`0${F}`:`${F}`,"00"===G?`${j}:${$}`:B<24?`${G}:${j}:${$}`:`${Math.floor(B/24)} days`}}},21738:(k,B,U)=>{"use strict";U.d(B,{y:()=>V});var F=U(62459),G=U(35120),j=U(71134),$=U(24110),H=U(82680);class V extends H.W{get prefab(){return this._prefab}get prefabContainer(){var k;return null!==(k=this._prefabContainer)&&void 0!==k?k:this._prefab}constructor(k,B,U,G,j=!0,$,H=!1){super(k,B,200,void 0,[]),this.onPrefabLoaded=new F.HN0,this.onClosed=new F.HN0,this._closeCallback=null,this.createContainer=!0,this._closeCallback=G,this.prefabID=U,this._updateGameObject=j,this._injectablePropertiesDictionary=$,this.obeyMenuStackVisibility=H}create(){super.create();const k=[];if(this.createContainer||this._injectablePropertiesDictionary){if(this._prefabContainer=new F._mx,this._prefabContainer.addComponent(F.dLy),this.createContainer){this._prefabContainer.addComponent($.B).getRootContainer().setParent(this)}if(this._injectablePropertiesDictionary){const B=this._prefabContainer.addComponent(F.bE_);for(const U in this._injectablePropertiesDictionary)B.Container.bind(U).toConstantValue(this._injectablePropertiesDictionary[U]),k.push({injectionName:U,data:this._injectablePropertiesDictionary[U]})}}G.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(this.prefabID,this._prefabContainer,void 0,k).then((k=>{var B;this._prefab=k,k.legacyTransform?this.addChild(k.legacyTransform.group):null===(B=this._rearOverlay)||void 0===B||B.destroy(),k.onDestroy.add(this.close,this);const U=k.findComponentInChildren(j.l,!0);U&&U.onClose.add(this.close.bind(this)),this.onPrefabLoaded.dispatch(k)})).catch((k=>{F.VyI.log(`Failed to load prefab menu: ${F.RQr.stringify(k)}`,F.$bb.Error)}))}update(){super.update(),this._updateGameObject&&this.prefabContainer&&!this.prefabContainer.parent&&this.prefabContainer.update()}setActive(k){this.prefabContainer.active!==k&&this.obeyMenuStackVisibility&&(this.prefabContainer.active=k,super.setActive(k))}close(){var k,B,U,F;this._prefab&&(this._prefab.active=!1),null===(k=this._prefab)||void 0===k||k.onDestroy.remove(this.close,this),this._prefabContainer?null===(B=this._prefabContainer)||void 0===B||B.destroyDeferred():null===(U=this._prefab)||void 0===U||U.destroyDeferred(),null===(F=this._closeCallback)||void 0===F||F.call(this),this._closeCallback=null,this.onClosed.dispatch(),this._prefabContainer=null,this._prefab=null,this.onClosed.dispose(),this.onPrefabLoaded.dispose(),super.close()}}},99183:(k,B,U)=>{"use strict";U.d(B,{k:()=>Lt});var F=U(62459),G=U(95891),j=U(88022),$=U(99625),H=U(51742),V=U(65240),W=U(35120),q=U(15521),K=U(91207),z=(U(34829),U(77938)),Y=U(39984),Q=U(55734),X=U(129),Z=U(47223),J=U(95946),tt=U(55122),et=U(73797),it=U(51790),st=U(79512),nt=U(59599),at=U(65050),rt=U(41674),ot=U(98623),ht=U(95057),ct=U(21097),dt=U(30226),lt=U(47255);class ut extends ot.H{constructor(k,B,U,F,G,j){super(k,B),this.levelUp=!1,this.openCallback=null,this.chests=[],this.locked=!1,this.chestOpened=null,this.rewards=null;const $=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(this.openCallback=j,Math.random()>.6&&$.getLevel()>=-5&&U){const k=0===Math.floor(2*Math.random()),B=110;this.chests.push(this.createChest(k?B:-B,F)),this.chests.push(this.createChest(k?-B:B,F.concat(G),!0))}else this.chests.push(this.createChest(0,F));this.rewards=W.q.instance.prodigy.create.element(this,0,0),this.initListeners()}createChest(k,B,U=!1){let F=null,G=null,$=null;F=W.q.instance.prodigy.create.element(this,k,0),G=W.q.instance.prodigy.create.sprite(0,95,j._.General_battle_json,U?"member-chest-bottom":"chest-bottom"),$=W.q.instance.prodigy.create.sprite(0,U?-25:0,j._.General_battle_json,U?"member-chest-closed":"chest-closed"),G.inputEnabled=!0,F.add(G),$.inputEnabled=!0,F.add($);const H={element:F,reward:B,specialChest:U,chestId:U?2:1,box:G,lid:$},V=()=>{this.onDown(H)};return $.events.onInputDown.add(V,this),G.events.onInputDown.add(V,this),H}initListeners(){this.game.broadcaster.addAppListener(et.cN.ShowMemberStars,(()=>{this.game.broadcaster.broadcast(et.hw.MemberStarsDone,this.game,[this.levelUp])}),this),this.onDestroy.add(this.stopListeners,this)}stopListeners(){F.Aq$.isDefined(this.chestOpened)&&F.Aq$.isDefined(this.chestOpened.box)&&this.chestOpened.box.destroy(),this.game.broadcaster.removeAppListener(et.cN.ShowMemberStars,this)}onDown(k){var B,U;if(this.locked)return;const G=W.q.instance.prodigy.gameContainer,j=G.get("e20-0fb0").player;if(this.chestOpened=k,k.specialChest&&!j.hasMembership()){const U={conversionFunnelName:lt.o.FunnelOpenMemberChestBattle},F=dt.J.showYouTubeMembershipAd(this.game,!0)?ht.R.Video:ht.R.Static;return G.get("c47-20b6").purchase.sendFunnelStart({type:"Open-Member-Chest-Battle",category:"Reward",contentId:W.q.instance.prodigy.world.getCurrentZone(),adType:F}),G.get("c47-20b6").container.sendContainerOpenedFailedEvent(rt.ZF.BattleMemberChest,null===(B=k.chestId)||void 0===B?void 0:B.toString(),ct.WE.MemberLocked,at.N.EndOfBattle),void W.q.instance.prodigy.open.membershipInfo(void 0,U)}k.lid.y=-30,k.lid.frameName=k.specialChest?"member-chest-open":"chest-open",this.locked=!0,G.get("c47-20b6").container.sendContainerOpenedEvent(k.specialChest?rt.ZF.BattleMemberChest:rt.ZF.BattleChest,null===(U=k.chestId)||void 0===U?void 0:U.toString(),at.N.EndOfBattle),this.animateIconPopcorn(k),F.Aq$.isDefined(this.openCallback)&&(W.q.instance.prodigy.audio.playSFX(32,k.specialChest?"chestOpenMember":"chestOpen",null,.6),setTimeout((()=>{this.openCallback(k.specialChest)}),2500))}animateIconPopcorn(k){const B=[];for(let U=0;U{this.visible=!0};j.onStart.add($,B[U]),j.to({y:400},600,F.GS3.Quadratic.In),j.start(),this.game.add.tween(B[U],this).to({x:F.cj9.between(-500,500),angle:Math.floor(360*Math.random())},1200,F.GS3.Linear.None).delay(G).to({alpha:0},100,F.GS3.Linear.None).start()}}}var ft=U(43531),bt=U(98998),pt=U(94236);class vt{constructor(k,B,U,F,G){this.currentCreature=k,this.originalCreatureCopy=B,this.menuFactory=U,this.onFinalSummaryClosed=G,this.onPopupCreated=F}launchSummaryPopups(){pt.K.openEvolutionPromptIfEligible(this.currentCreature,this.originalCreatureCopy).then((()=>{const k=this.menuFactory.statSummary(this.currentCreature,this.originalCreatureCopy);k.setOnCreateCallback(this.onPopupCreated),k.setCloseCallback((()=>{const k=this.menuFactory.spellSummary(this.currentCreature,this.originalCreatureCopy);k.setOnCreateCallback(this.onPopupCreated),k.setCloseCallback(this.onFinalSummaryClosed)}))}),F.RQr.createHandler("Failed to show summary screen"))}}var gt,mt=U(15485),yt=U(46784),_t=U(90633),Et=U(17425),wt=U(23748),Tt=U(22023),St=U(57750),At=U(68910),Ct=U(56942),Ot=U(19273),It=U(70123);class Dt{constructor(k,B,U,F,G=1){this._explodeDelayTimer=null,this._glitterDelayTimer=null,this.starComponent=It.j.createRenderer(Ct.Q.Spine_member_star_explode_json,{type:"spine"}),this.starComponent.onLoaded.add((()=>{const k=245*(0===G?1:G);this._explodeDelayTimer=window.setTimeout(W.q.instance.prodigy.audio.playSound.bind(W.q.instance.prodigy.audio,23),k);const B=1633*(0===G?1:G);this._glitterDelayTimer=window.setTimeout(W.q.instance.prodigy.audio.playSound.bind(W.q.instance.prodigy.audio,24),B)})),new Ot._(k,B,[this.starComponent],U,F),0===G||1===G?this.starComponent.playAnimation(Dt.ANIMATION_NAME):this.starComponent.playAnimationWithTimeScale(Dt.ANIMATION_NAME,1/G)}stopAnimation(){var k;null===(k=this.starComponent)||void 0===k||k.setVisibility(!1),window.clearTimeout(this._explodeDelayTimer),window.clearTimeout(this._glitterDelayTimer),this._explodeDelayTimer=null,this._glitterDelayTimer=null}}Dt.ANIMATION_NAME="animation";class Rt extends F.mcf{constructor(k,B){super(),B&&(B.addChild(this),this.zIndex=B.children.length),this.game=k,this.jarBack=W.q.instance.prodigy.create.group(this),this.jarMiddle=W.q.instance.prodigy.create.group(this),this.jarFront=W.q.instance.prodigy.create.group(this),this.spriteParentLoadWrap(0,0,j._.Popup_star_jar_json,"jar-back",this.jarBack),this.spriteParentLoadWrap(0,0,j._.Popup_star_jar_json,"jar-front",this.jarFront),this.cork=this.spriteParentLoadWrap(40,0,j._.Popup_star_jar_json,"cork",this.jarMiddle)}spriteParentLoadWrap(k,B,U,F,G){return W.q.instance.prodigy.create.sprite(k,B,U,F,null,(k=>{G.addChild(k)}))}fillJar(k){if(k>=1){this.jarFillLevel=k;const B=this.getSpriteFillFrame(k);W.q.instance.prodigy.create.sprite(0,0,j._.Popup_star_jar_json,B,null,(k=>{this.jarMiddle.addChildAt(k,0),this.filledStars=k}))}else k<0&&W.q.instance.prodigy.create.sprite(0,0,j._.Popup_star_jar_json,"dust",null,(k=>{this.jarMiddle.addChildAt(k,0)}))}fillJarAnimate(k,B,U=0){if(k>=1&&k!==this.jarFillLevel){this.jarFillLevel=k;const G=this.getSpriteFillFrame(k);W.q.instance.prodigy.create.sprite(0,0,j._.Popup_star_jar_json,G,null,(k=>{this.jarMiddle.addChildAt(k,0);const G=this.game.add.tween(k,this).from({alpha:0},B,F.GS3.Linear.None,!1,U);G.onStart.add((()=>{W.q.instance.prodigy.audio.playSound(22)})),G.onTweenComplete.add((()=>{F.Aq$.isDefined(this.filledStars)&&this.filledStars.destroy(),this.filledStars=k})),G.start()}))}}openJar(){W.q.instance.prodigy.audio.playSound(26);this.game.add.tween(this.cork,this).to({y:this.cork.y-100,alpha:0},1e3,F.GS3.Cubic.Out,!0),this.doStarFlyOutAnimation(),this.doStarFadeAnimation()}doStarFadeAnimation(){let k=0;const B=[this.filledStars];for(k=this.jarFillLevel-1;k>0;k--){const U=W.q.instance.prodigy.create.sprite(0,0,j._.Popup_star_jar_json,`stars-fill-${k}`,null,(k=>{this.jarMiddle.addChildAt(k,0)}));B.push(U)}const U=2500/B.length;let G=0;for(G=0;G=this.DAY?(U=Math.floor(k/this.DAY),B=gt.Day):k>=this.HOUR?(U=Math.floor(k/this.HOUR),B=gt.Hour):k>=this.MINUTE?(U=Math.floor(k/this.MINUTE),B=gt.Minute):(U=Math.floor(k/this.SECOND),B=gt.Second),this.tickCallback(U,B)}}class Mt{constructor(k,B,U=null){this.showingMembership=!1,this._fillMemberJarComplete=!1,this._fadeDisplayComplete=!1,this.game=k,this.parentMenu=B,this.starController=new bt.b,this.openCallback=U,B.onDestroy.add(this.destroy.bind(this))}beginAnimation(k){this.parentMenu.memberSectionContents.alpha=0;let B=2700;const U=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.starController.hasExpired()&&!U.hasMembership()&&this.starController.getNumberOfStoredStars()>0?B=700:setTimeout(this.showMemberStar.bind(this),700),this._fillMemberJarDelayHandler=()=>{this.fillMemberJar(k)},this._fadeDisplayDelayHandler=()=>{this.fadeDisplay(!0)},setTimeout(this._fillMemberJarDelayHandler,B),setTimeout(this._fadeDisplayDelayHandler,B)}forceMemberStarComplete(){var k,B;return!(!this._memberStarAnimation||this._fillMemberJarComplete||this._fadeDisplayComplete)&&(null===(k=this._fillMemberJarDelayHandler)||void 0===k||k.call(this),null===(B=this._fadeDisplayDelayHandler)||void 0===B||B.call(this),this._memberStarAnimation.stopAnimation(),!0)}createMemberStarsGain(){this.parentMenu.memberStarsGot.visible=!0,this.parentMenu.memberStarsGot.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText(this.parentMenu.getTeamSize()>1?"GAINED_MEMBER_STARS_EACH":"GAINED_MEMBER_STARS",this.parentMenu.xpGained.memberXp)),this.parentMenu.starJarTimer.visible=!1,this.parentMenu.wizardLevels.visible=!1,this.parentMenu.wizardLevelsWorth.visible=!1,this.parentMenu.starsInJarLabel.visible=!1,this.parentMenu.bonusStarsButton.visible=!1,setTimeout(this.openCallback.bind(this.parentMenu,this.parentMenu.xpGained.memberXp,!1),1e3)}createExpiredJar(){this.starJar.fillJar(-1),this.parentMenu.starJarTimer.visible=!1,this.parentMenu.bonusStarsButton.visible=!1,this.parentMenu.wizardLevels.visible=!1,this.parentMenu.bottomMemberTitleText.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("JAR_EXPIRED")),this.parentMenu.starsInJarLabel.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("JAR_BECOME_MEMBER")),this.parentMenu.wizardLevelsWorth.visible=!1,this.parentMenu.starsInJarLabel.x+=70,this.starJar.x+=125,this.starJar.y+=10,this.starController.doLoseStars(),setTimeout(this.parentMenu.showCloseButton.bind(this.parentMenu,!0),1500)}createRegularJar(k,B){const U=700,G=1e3;this.starJar.fillJar(this.starController.calculateStarJarTier(this.starController.getNumberOfStoredStars()-B)),this.starJar.fillJarAnimate(this.starController.getStarJarTier(),G,U),this.parentMenu.wizardLevelsValue.setText(k),this.parentMenu.starsInJarValue.setText(this.starController.getNumberOfStoredStars()-B),k<=0?(this.parentMenu.wizardLevels.visible=!1,this.parentMenu.wizardLevelsWorth.visible=!1,this.parentMenu.wizardLevelsValue.visible=!1):1===k&&this.parentMenu.wizardLevels.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("WIZARD_LEVEL"));const j={number:this.starController.getNumberOfStoredStars()-B},$=this.game.add.tween(j,this).to({number:this.starController.getNumberOfStoredStars()},G,F.GS3.Quadratic.Out,!0,U),H=this.parentMenu.starsInJarValue;$.onUpdate.add((()=>{H[St.k.DESTROYED]||H.setText(Math.round(j.number))})),$.onTweenComplete.add((()=>{H[St.k.DESTROYED]||H.setText(j.number)})),this.createCountdownTimer(),this.setupJarClickables();const V=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(this.starController.getNumberOfStoredStars()>0&&V.hasMembership()){const k=800;this.parentMenu.bottomDisplayBlueStar.image.inputEnabled=!1,this.parentMenu.starJarTimer.visible=!1,this.parentMenu.bonusStarsButton.visible=!1,setTimeout(this.openJar.bind(this),1700+k),this.parentMenu.bonusStarsButton.visible=!1}else setTimeout(this.parentMenu.showCloseButton.bind(this.parentMenu,!0),1700);for(let W=0;W{switch(this.parentMenu.jarTimeValue.setText(k.toString()),B){case gt.Day:this.parentMenu.jarTimeLeft.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText(1===k?"COUNTDOWN_DAY_LEFT":"COUNTDOWN_DAYS_LEFT"));break;case gt.Hour:this.parentMenu.jarTimeLeft.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText(1===k?"COUNTDOWN_HOUR_LEFT":"COUNTDOWN_HOURS_LEFT"));break;case gt.Minute:this.parentMenu.jarTimeLeft.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText(1===k?"COUNTDOWN_MINUTE_LEFT":"COUNTDOWN_MINUTES_LEFT"));break;case gt.Second:k>0&&this.parentMenu.jarTimeValue.setText("1"),this.parentMenu.jarTimeLeft.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText(0===k?"COUNTDOWN_MINUTES_LEFT":"COUNTDOWN_MINUTE_LEFT"))}}))}setupJarClickables(){this.parentMenu.bottomDisplayBlueStar.image.inputEnabled=!0,this.parentMenu.bottomDisplayBlueStar.image.events.onInputUp.add(this.onStarJarMembershipClick.bind(this)),this.parentMenu.bonusStarsButton.onUpCallback=this.onStarJarMembershipClick.bind(this)}onStarJarMembershipClick(){if(this.showingMembership)return;this.showingMembership=!0;const k=W.q.instance.prodigy.gameContainer,B={conversionFunnelName:lt.o.FunnelStarJar,conversionStage:"Member-Converted",conversionFunnelMetadata:null},U=dt.J.showYouTubeMembershipAd(this.game,!0)?ht.R.Video:ht.R.Static;k.get("c47-20b6").purchase.sendFunnelStart({type:"NonMember-Star-Jar",category:"Reward",contentId:void 0,adType:U}),this.parentMenu.fireButtonEvent({buttonName:mt.k.BonusStars}),W.q.instance.prodigy.open.membershipInfo((()=>{this.showingMembership=!1;k.get("e20-0fb0").player.hasMembership()&&(this.parentMenu.showCloseButton(!1),this.openJar())}),B)}openJar(){this.parentMenu.bottomDisplayBlueStar.image.inputEnabled=!1,this.parentMenu.starJarTimer.visible=!1,this.parentMenu.bonusStarsButton.visible=!1,this.starJar.openJar(),this.parentMenu.starsInJarLabel.setText("Gained Stars:");const k=this.starController.claimStarJar()/this.parentMenu.getTeamSize(),B=W.q.instance.prodigy.gameContainer.get("c47-20b6");B.playerProgression.sendPlayerProgressionPointsEarnedEvent({pointType:"stars",pointCount:k},{instanceID:B.battle.currentBattleID,instanceType:at.N.EndOfBattle}),setTimeout(this.openCallback.bind(this.parentMenu,k,!0),1e3)}}var Nt=U(73678),xt=U(82680);class Lt extends xt.W{constructor(k,B,U,G,V,q,K,z,Y=[],Q,X=!0){var Z;super(k,B,F.Aq$.isDefined(z)?z:19,Q?Object.assign({modifyProperty:[{element:"resultsTitle",property:"textKey",value:Q},{element:"titleBanner",property:"relativeWidth",value:.6}]},Lt.configModifiers):Lt.configModifiers,[j._.Ui_pvp_seasons_json,j._.Popup_star_jar_json,j._.Ui_education_badges_json,j._.Npc_face_noot_json,H.c.Sfx_results_screen,H.c.Sfx_jar_fill_ancient_game_gift_bundle_positive_open,H.c.Sfx_star_explode_ancient_game_magic_achievement_1,H.c.Sfx_star_appear_ancient_game_star_glitter,H.c.Sfx_jar_open_ancient_game_magic_bubble_open,H.c.Sfx_bar_fill,j._.Ui_battle_revamp_legacy_json].concat(Y)),this.originalCreatures=[],this.summaryPopupControllers=[],this.drops=[],this.memberDrops=[],this.creatureDisplays=[],this.eventQueue=[],this.choseMemberChest=!1,this._timer=null,this._tweenInProgress=null,this.game=k,this.currentCreatures=U,this.xpGained=G,this.drops=V,this.memberDrops=q,this._skipChests=K,this._afterBattle=X,this.currentInterfaceName=yt.B.ResultsMenu,this.currentCreatures&&(this.starController=new bt.b,this.starXP=this.calculateStarXP(null===(Z=this.xpGained)||void 0===Z?void 0:Z.memberXp,null==U?void 0:U.length),this.setupListeners(),this.cloneCreatures(),F.Aq$.isDefined(z)||this.queuePostCreateCallback(this.createCreatureDisplays.bind(this),this.setupUIElements.bind(this),this.buildEventsQueue.bind(this),this.buildCommonEventsQueue.bind(this),this.animateDropIn.bind(this)));W.q.instance.prodigy.gameContainer.get("PrefabService").getPrefabFromGuid($.l.ResultsSkipInteractable);this.fireInterfaceEvent({originType:rt.$N.AutoSurfaced}),this._segment.legacyPostBattleFlow.sendStart()}calculateStarXP(k,B){return Math.ceil(k*B)}getTeamSize(){return this.currentCreatures.length}showCloseButton(k){this.closeButton.visible=k}bottomSectionFadeOutAnimation(k,B=null){if(k&&!k[St.k.DESTROYED]){const U=k.x,G=()=>{k.x=U,this._tweenInProgress=null,F.Aq$.isDefined(B)&&B()};this._tweenInProgress=this.game.add.tween(k,this),this._tweenInProgress.to({x:k.x-50,alpha:0},500,F.GS3.Cubic.Out,!0).onTweenComplete.add(G,this)}else F.VyI.log("bottomSectionFadeOutAnimation no target specified.",F.$bb.Error),F.Aq$.isDefined(B)&&B()}bottomSectionFadeInAnimation(k,B=null){k.visible=!0,k.alpha=1,q.Z.bringToTop(k),this.game.add.tween(k,this).from({x:k.x+50,alpha:0},500,F.GS3.Cubic.Out,!0).onTweenComplete.add((()=>{F.Aq$.isDefined(B)&&B()}),this)}buildCommonEventsQueue(){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=k.hasCompletedTutorial();k.hasMembership()?(this.eventQueue.push(this.createJar.bind(this),this.bottomSectionFadeInAnimation.bind(this,this.bottomDisplayContainerMember)),this._skipChests?this.eventQueue.push(this.showCloseButton.bind(this,!0)):this.eventQueue.push(this.bottomSectionFadeOutAnimation.bind(this,this.bottomDisplayContainerMember,this.runNextEvent.bind(this)),...this.buildChestsEvent(!0,this.drops,this.memberDrops))):!B||dt.J.shouldSuppressAd(k,void 0)?(this._skipChests?dt.J.shouldSuppressAd(k,void 0)&&this.eventQueue.pop():B?this.eventQueue.push(...this.buildChestsEvent(!dt.J.shouldSuppressAd(k,void 0),this.drops,this.memberDrops)):this.eventQueue.push(...this.buildChestsEvent(!1,this.drops,[])),dt.J.shouldSuppressAd(k,void 0)&&this.starController.hasExpired()&&this.eventQueue.push((()=>{this.starController.doLoseStars(),this.runNextEvent()})),this.eventQueue.push(this.showCloseButton.bind(this,!0))):(this._skipChests||this.eventQueue.push(...this.buildChestsEvent(!dt.J.shouldSuppressAd(k,void 0),this.drops,this.memberDrops)),this.eventQueue.push(this.bottomSectionFadeOutAnimation.bind(this,this.bottomDisplayContainer,this.runNextEvent.bind(this)),this.createJar.bind(this),this.bottomSectionFadeInAnimation.bind(this,this.bottomDisplayContainerMember,this.runNextEvent.bind(this,4e3))))}buildEventsQueue(){this.eventQueue.push(this.runNextEvent.bind(this,300),this.showStarsEarned.bind(this),this.applyXPGainToTeam.bind(this,this.currentCreatures,this.xpGained.totalNonMemberXp),this.ftueNootEvolvePetsDialogue.bind(this),this.unlockAcademyDialogue.bind(this),this.unlockNootTowerDialogue.bind(this),...this.buildPopupEvents(),this.runNextEvent.bind(this,1500),this.bottomSectionFadeOutAnimation.bind(this,this.bottomDisplayContainer,this.runNextEvent.bind(this)))}runNextEvent(k=0){k>0?this._timer=window.setTimeout(this.runNextEvent.bind(this,0),k):this.eventQueue.length>0&&this.eventQueue.shift()()}buildPopupEvents(){const k=[];return G.times(this.currentCreatures.length,(B=>{k.push(this.playShineAnimation.bind(this,B),this.launchSummaries.bind(this,B))})),k}buildChestsEvent(k=!0,B=[],U=[]){return[this.createChests.bind(this,k,B,U),this.awardDrops.bind(this)]}cloneCreatures(){this.originalCreatures=[];for(let k=0;kthis.originalCreatures[k].getLevel()){if(this.currentCreatures[k].getAvailableEvolutions().length>0)return!0;if(this.originalCreatures[k].diffAttackSlots(this.currentCreatures[k].getLevel()).length>0)return!0;if(this.currentCreatures[k].getBaseMaxHearts()-this.originalCreatures[k].getBaseMaxHearts()>0)return!0}return!1}createCreatureDisplays(){let k=!0,B=0;const U=W.q.instance.prodigy.gameContainer.get("e20-0fb0").isMember();for(const F of this.currentCreatures)this.creatureDisplays.push(this.createCreatureDisplay(F)),k&&Y.e.levelFromStars(F.getStars()+this.xpGained.totalNonMemberXp,F.creatureType,tt.s.activePlayerLevelCap)=100&&F.xpBar.setPercentCompleteOffset(1,-20),k instanceof X.a){F.creatureName.setText(k.getFirstName());const B=k.getPlayerData().playerTransformation;if(B)F.spriteHolder.add(W.q.instance.prodigy.create.sprite(0,0,K.E.getIconForType(B.transformType,B.transformID),null,{x:.5,y:.5}));else{const k=W.q.instance.prodigy.create.player(F.spriteHolder,G,1,0,50,!1,{isPreview:!0,hideMount:!0});k.reload((()=>{k.standStill()}))}}else if(k instanceof Z.s){F.creatureName.setText(k.getFirstName());const B=W.q.instance.prodigy.create.character(F.spriteHolder,k,1,0,50,!1,{isPreview:!0,hideMount:!0});B.reload((()=>{B.standStill()}))}else F.creatureName.setText(k.source.name),this.loadPetIcon(F,k.data.ID);const $=F.creatureDisplay.image;let H;return k instanceof Q.R&&(H=null===(U=null===(B=z.t.getItem("pet",k.getID()))||void 0===B?void 0:B.data)||void 0===U?void 0:U.affinity),$.loadTexture(j._.Ui_battle_revamp_legacy_json,`pet-icon-backers-${null!=H?H:J.a.Astral}`),F}close(){this.removeListeners(),window.clearTimeout(this._timer),this.fireInterfaceEvent({closeMethod:rt.Lv.CloseButton}),this._segment.legacyPostBattleFlow.sendEnd(),super.close()}setupListeners(){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;for(const B of this.currentCreatures)if(B.data===k.data){this.game.broadcaster.addAppListener(et.ig.LevelUp,this.onMainPlayerLevelUp.bind(this),this,B);break}}removeListeners(){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;for(const B of this.currentCreatures)if(B.data===k.data){this.game.broadcaster.removeAppListener(et.ig.LevelUp,this,B);break}}onMainPlayerLevelUp(){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getLevel();k<=Lt.MAX_LEVEL_TO_SEND_TUTORIAL_SEGMENT_EVENTS&&this.metricsManager.sendOnboardingFunnelEvent(`Reached Level ${k}`)}createChests(k=!0,B=[],U=[]){0===B.length&&0===U.length?this.runNextEvent():(this.chestGoldBackground.visible=!0,this.battleStarsEarned.visible=!1,this.bottomTitleText.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("OPEN_CHEST")),new ut(this.game,this.chestContainer,k,B,U,(k=>{this.choseMemberChest=k,this.runNextEvent()})),this.bottomSectionFadeInAnimation(this.bottomDisplayContainer))}createJar(){if(this.starJar){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.starController.hasExpired()&&this.starController.getNumberOfStoredStars()>0&&!k.hasMembership()&&this.bottomMemberTitleText.setText(W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("JAR_EXPIRED")),this.starJar.beginAnimation(this.starXP),this.runNextEvent()}}loadPetIcon(k,B){for(let F=0;F{this.runNextEvent(200)}))):this.runNextEvent()}launchSummaries(k){this.summaryPopupControllers.push(new vt(this.currentCreatures[k],this.originalCreatures[k],W.q.instance.prodigy.open,(()=>{this.enableOverlay(!0)}),this.processSummaryPopupController.bind(this))),this.processSummaryPopupController()}showStarsEarned(){this.battleStarsEarned.visible=!0,this._tweenInProgress=this.game.add.tween(this.battleStarsEarned.scale,this),this._tweenInProgress.from({x:0,y:0},1e3,F.GS3.Back.Out,!0).onTweenComplete.add((()=>{this._tweenInProgress=null,this.runNextEvent()}),this)}animateDropIn(){this._tweenInProgress=this.game.add.tween(this.woodBackground,this),this._tweenInProgress.from({y:this.woodBackground.y-1e3},1e3,F.GS3.Cubic.Out,!0).onTweenComplete.add((()=>{this._tweenInProgress=null,this.runNextEvent()}),this)}processSummaryPopupController(){if(this.handleEvolutions(),this.summaryPopupControllers.length>0){this.summaryPopupControllers.shift().launchSummaryPopups()}else this.enableOverlay(!1),this.runNextEvent()}handleEvolutions(){for(let k=0;k0){let k=this.drops;this.choseMemberChest&&(k=k.concat(this.memberDrops)),W.q.instance.prodigy.open.gotItem(k,this.runNextEvent.bind(this),null,"battle-victory-drops",null,null,{source_type:V.C.Container,instance_type:at.N.EndOfBattle}),this.drops=[],this.memberDrops=[]}else this.runNextEvent()}setupUIElements(){this.closeButton.onClickCallback=()=>{this.fireButtonEvent({buttonName:mt.k.X})};W.q.instance.prodigy.gameContainer.get("e20-0fb0").isMember()?this.starJar=new Mt(this.game,this,this.memberXPGained.bind(this)):this.showCloseButton(!0)}memberXPGained(k,B=!1){if(this.showCloseButton(!1),this.cloneCreatures(),B)this.eventQueue.push(...this.buildPopupEvents(),this.unlockAcademyDialogue.bind(this),this.unlockNootTowerDialogue.bind(this),this.showCloseButton.bind(this,!0));else{for(let k=this.currentCreatures.length-1;k>=0;k--)this.eventQueue.unshift(this.playShineAnimation.bind(this,k),this.launchSummaries.bind(this,k));F.Aq$.isDefined(this.xpGained.gainInPvp)&&(this.eventQueue.length=0,this.eventQueue.unshift(this.showCloseButton.bind(this,!0)))}this.applyXPGainToTeam(this.currentCreatures,k,!0)}applyXPGainToTeam(k,B,U=!1){let F=0;const G=W.q.instance.prodigy.audio.playSound(33,!0),j=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player,$=()=>{++F>=k.length&&(G.stop(),this.runNextEvent())};for(let H=0;HG&&(j.hasCompletedTutorial()||j.kennel.isCreatureCurrentPlayer(F)||(this._leveledUpCreature=F),F.changeCurrentHearts(k[H].getMaxHearts()))}}doStarsGainAnimation(k,B,U){const G=this.currentCreatures.indexOf(k),j=this.creatureDisplays[G],$=k.getLevel(),H=Y.e.levelFromStars(k.getStars()+B,k.creatureType,k.currentMaxLevel);let V=Y.e.getLevelPercent(k.getStars()+B,k.creatureType,k.currentMaxLevel);V=wt.z.clampedLerp(.085,1,V);const q={percent:wt.z.clampedLerp(.085,1,Y.e.getLevelPercent(k.getStars(),k.creatureType,tt.s.activePlayerLevelCap)),level:$};let K=q.percent;if($>=100||H<$)return void U();j.xpBarGlow.playAnimation("idle",!0),W.q.instance.prodigy.audio.playSFX(32,"highlight");const z=this.game.add.tween(q,this);z.onUpdate.add((()=>{j.xpBar.setPercentCompleteOffset(q.percent,-20),K>q.percent&&(j.xpBarExplode.playAnimation("levelup"),q.level++,F.Aq$.isDefined(this.levelUpSound)&&this.levelUpSound.stop(),this.levelUpSound=W.q.instance.prodigy.audio.playSFX(32,"levelUp"),setTimeout((()=>{j.levelNumberText.setText(q.level.toString())}),400)),K=q.percent}));const Q=1e3;for(let W=$;W<=H&&W<=100;W++)if(100===W)z.to({percent:1},Q,F.GS3.Quadratic.Out);else if(W===H){const k=Q;z.to({percent:V},k,F.GS3.Quadratic.Out)}else z.to({percent:1},Q,F.GS3.Quadratic.Out),z.to({percent:0},1,F.GS3.Linear.None);z.onTweenComplete.add(U),z.onTweenComplete.add((()=>{j.xpBarGlow.playAnimation("idle",!1)})),z.start()}unlockAcademyDialogue(){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(k.hasCompletedTutorial()&&!W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(_t.B.BREADCRUMB_UNLOCK_ACADEMY,_t.B.BREADCRUMB_UNLOCK_ACADEMY_NOOT_DIALOGUE)&&W.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirementsDeprecated(12)&&k.backpack.hasItem("key",22)<=0){const k=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),B=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);k.execute(B.getStateMachine(57),{game:this.game,menu:this},null)}else this.runNextEvent()}unlockNootTowerDialogue(){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(!W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(_t.B.FEATURE_TOWERS_PROMPT,_t.B.NOOT_TOWER_PROMPT)&&F.Aq$.isDefined(k.state.get("zone-academy"))&&W.q.instance.prodigy.world.getCurrentZone()!==Nt.A_.EARTHTOWER&&k.getLevel()>=25){const k=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),B=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);k.execute(B.getStateMachine(190),{game:W.q.instance.game,menu:this,open:W.q.instance.prodigy.open,text:W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("DIALOGUE_GALE_17")},null),W.q.instance.prodigy.breadcrumbManager.resetBreadcrumbs(_t.B.FEATURE_ACADEMY_TOWERS)}else this.runNextEvent()}ftueNootEvolvePetsDialogue(){const k=W.q.instance.prodigy.gameContainer,B=k.get("e20-0fb0").player;if(!B.hasMembership()&&!B.hasCompletedTutorial()&&void 0!==this._leveledUpCreature){const B=z.t.getItem("pet",this._leveledUpCreature.data.ID),U=Tt.P8.findNextEvolution(B);if(!U)return void this.runNextEvent();const G=k.get("PrefabService").getPrefabFromGuid($.l.PetEvolutionPanel);W.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromJSONWithDependencies(G,void 0,void 0,void 0,$.l.PetEvolutionPanel).then((k=>{k.layer="legacyMenuLayer",this.configureEvolutionPrefab(k,B,U)})).catch((k=>{F.VyI.log(`Error loading evolution FTUE prefab; ${k.message}`,F.$bb.Error),this.runNextEvent()}))}else this.runNextEvent()}configureEvolutionPrefab(k,B,U){const G="one_time_evolution_ftue_dialogue",j=new ft.rD(this.game),$=k.findComponentInChildren(nt.f),H=$.GameObject.findComponentInChildren(F.EYj),V=k.findComponentInChildren(it.s),[W,q]=k.findComponentsInChildren(st.o),K=Tt.P8.getPetEvolutionGiftThreshold();k.transform.setPositionX(this.game.width/2),k.transform.setPositionY(this.game.height/3),V.setElementalBanner(this._leveledUpCreature.getElement()),W.init(B),q.init(U),$.setValue(!0),H.text+=K.toString(),this.fireInterfaceEvent({interfaceName:G,interfaceType:rt.Wm.DialogBox,originType:rt.$N.AutoSurfaced}),j.addEvents([{dialogueData:j.dataProvider.get(1296),type:ft.fA.DEFAULT,blockInput:!0}]),j.start(!0,(()=>{this.fireInterfaceEvent({interfaceName:G,interfaceType:rt.Wm.DialogBox,closeMethod:rt.Lv.CloseDialog}),k.destroy(),this.runNextEvent()}))}}Lt.MAX_LEVEL_TO_SEND_TUTORIAL_SEGMENT_EVENTS=5,Lt.configModifiers={}},25286:(k,B,U)=>{"use strict";U.d(B,{g:()=>ut});var F=U(8674),G=U(62459),j=U(88022),$=U(99625),H=U(56942),V=U(35120),W=U(49237),q=U(32259),K=U(17737),z=U(65116),Y=U(49037),Q=U(97518),X=U(59347),Z=U(28152),J=U(34603),tt=U(71072);let et=class extends G.uAl{init(k){var B,U,F;const j=k.adConfig;let $="";G.Aq$.isDefined(j.thumbnailURL)?$=`singleImage-${j.thumbnailURL}`:G.Aq$.isDefined(j.thumbnailGUID)&&($=j.thumbnailGUID),null===(B=this._thumbnail)||void 0===B||B.setAsset($),null===(U=this._thumbnail2)||void 0===U||U.setAsset($),this._titleKey.setLocalizationKey(j.title),this._bodyKey.setLocalizationKey(j.body),this._canTeleportComponent&&(this._canTeleportComponent.mapTag=j.travelZone),this._teleportComponent&&(this._teleportComponent.mapTag=j.travelZone),j.travelZone&&(this._teleportMessage.key=this._localizer.getText("TRAVEL_CONFIRM_MESSAGE",V.q.instance.prodigy.world.getZone(j.travelZone.split("-")[0]).name)),null===(F=this._openVideo)||void 0===F||F.loadVideoConfig(k.videoConfig),this.Id=k.videoConfig.adID}};(0,F.Cg)([(0,G.MnK)(J._),(0,F.Sn)("design:type",J._)],et.prototype,"_thumbnail",void 0),(0,F.Cg)([(0,G.MnK)(J._),(0,F.Sn)("design:type",J._)],et.prototype,"_thumbnail2",void 0),(0,F.Cg)([(0,G.MnK)(Q.R),(0,F.Sn)("design:type",Q.R)],et.prototype,"_titleKey",void 0),(0,F.Cg)([(0,G.MnK)(Q.R),(0,F.Sn)("design:type",Q.R)],et.prototype,"_bodyKey",void 0),(0,F.Cg)([(0,G.MnK)(z.$),(0,F.Sn)("design:type",z.$)],et.prototype,"_canTeleportComponent",void 0),(0,F.Cg)([(0,G.MnK)(Y.q),(0,F.Sn)("design:type",Y.q)],et.prototype,"_teleportComponent",void 0),(0,F.Cg)([(0,G.MnK)(X.S),(0,F.Sn)("design:type",X.S)],et.prototype,"_teleportMessage",void 0),(0,F.Cg)([(0,G.MnK)(tt.V),(0,F.Sn)("design:type",tt.V)],et.prototype,"_openVideo",void 0),(0,F.Cg)([(0,G.Cdj)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],et.prototype,"_localizer",void 0),et=(0,F.Cg)([(0,G.EVk)("TemplateAd",Z.Y.uiAd)],et);var it=U(83142),st=U(15485),nt=U(46784),at=U(41674),rt=U(90633),ot=U(56903),ht=U(69698),ct=U(95130),dt=U(80060),lt=U(82680);class ut extends lt.W{constructor(k,B,U,F){super(k,B,22,ut.configModifiers,[j._.Ui_shared_json,j._.Ui_social_feed_json,j._.Ui_towertown_misc_json,j._.Ui_towertown_samples_json]),this._adCellList=[],this._sharingTimeoutTimer=null,this._deletingTimeoutTimer=null,this._activePlayer=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player,super.setCloseCallback(U),this._openedWith=F,this._openedAtTime=this._timeManager.getServerTimeMs(),this.currentInterfaceName=nt.B.WizardWatch}preprocess(){if(!V.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(rt.B.FEATURE_SOCIAL_FEED,rt.B.BREADCRUMB_SOCIAL_FEED_OPENED)){V.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(rt.B.FEATURE_SOCIAL_FEED,rt.B.BREADCRUMB_SOCIAL_FEED_OPENED);const k="voice-10-85";V.q.instance.prodigy.load.assets([k],V.q.instance.prodigy.audio.playVoice.bind(V.q.instance.prodigy.audio,k,null,18,4))}const k=ot.A.getWizardWatchData().catch(G.RQr.createHandler("Error loading data for Wizard Watch ads")).then((k=>(0,F.sH)(this,void 0,void 0,(function*(){return new Promise((k=>{this._adData=ot.A.getActiveEntityAds();const B=[H.Q.Spine_socialfeed_poof_json];for(const U of this._adData)G.Aq$.isDefined(U.thumbnailURL)?B.push(`singleImage-${U.thumbnailURL}`):G.Aq$.isDefined(U.thumbnailGUID)&&B.push(`singleImage-${U.thumbnailGUID}`);V.q.instance.prodigy.load.assets(B,k)}))})))),B=V.q.instance.prodigy.titansNetworkHandler.getTitans(),U=new Promise((k=>{this.queuePostCreateCallback(k)})),j=V.q.instance.prodigy.gameContainer.get("12b-405a").awaitLoad().catch(G.RQr.createHandler("Error loading Weekend Event Data for WW ad"));Promise.all([k,B,U,j]).then((()=>{this.fillView(),this.setButtons();const k=this._adData.map(((k,B)=>({post_id:k.ID,post_name:k.title,post_rank:B+1})));this.fireInterfaceEvent({interfaceType:at.Wm.DialogBox,originType:"from-menu"===this._openedWith?at.$N.ButtonClick:at.$N.AutoSurfaced,originID:st.k.Feed},{item_list:k})}))}setButtons(){this.closeButton.onClickCallback=(k,B=!1)=>{this.sendButtonClickedEvent(st.k.X),this.close(k,B)}}setupScrollBar(){G.Aq$.isDefined(this.feedScrollView)&&(this.feedScrollView.linkScrollBar(this.feedScrollBar),this.feedScrollView.setToScrollPercent(0))}fillView(){this.destroyed||(this.setupAds(),this.noFeedAll.visible=this._adCellList.length<=0,this.feedContents.layoutElement.calculateChildren(),this.feedScrollView.setupVisibleIndices(),this.feedScrollView.calculateMaxScrollDist(),this.setupScrollBar(),this.feedScrollBar.visible=this._adCellList.length>0,ot.A.getUnseenActiveAdCount()>0&&this._adCellList.length>0&&!this._activePlayer.encounters.hasSeenAd(this._adData[0].ID)&&this._adCellList[0].findComponentInChildren(K.n).run(),ot.A.markActiveAdsSeen())}fillAdGroup(k,B){const U=V.q.instance.prodigy.gameContainer.get("d0e-64fd");let F=0;for(let j=0;jthis.close(null,!0)));const F=k.findComponentInChildren(et);if(F)F.init(this.createFullAdConfig(H));else for(const U of k.findComponentsInChildren(it.D))U.loadVideoConfig({adID:H.ID})}catch(e){G.VyI.log(String(e),G.$bb.Error),V=null}V&&(B.addChild(K),B.gameObjects.push(V),this.feedScrollView.frameworkButtonsArray.push(...z),this._adCellList.push(V),K.y=F*ut.AD_HEIGHT,F++)}}createFullAdConfig(k){return{adConfig:{thumbnailGUID:k.thumbnailGUID,thumbnailURL:k.thumbnailURL,title:k.title,body:k.body,travelZone:k.travelZone},videoConfig:{adID:k.ID,videoID:k.videoConfig.videoID,header:k.videoConfig.videoCaption?k.videoConfig.videoTitle:void 0,message:k.videoConfig.videoCaption?k.videoConfig.videoBody:void 0}}}clearScrollView(){G.Aq$.isDefined(this.feedScrollBar)&&(this.feedScrollBar.visible=!1),G.Aq$.isDefined(this.feedScrollView)&&this.feedScrollView.clearScrollView();for(let k=0;k0){const k=new ct.D(this.game,this.feedContents);k.gameObjects=[],k.rect=new G.M_G(0,0,ut.AD_WIDTH,this._adData.length*ut.AD_HEIGHT),this.fillAdGroup(this._adData,k)}}sendCloseEvent(k=!1){const B=(this._timeManager.getServerTimeMs()-this._openedAtTime)/1e3;this.fireInterfaceEvent({interfaceName:nt.B.WizardWatch,interfaceType:at.Wm.DialogBox,closeMethod:k?at.Lv.TeleportButton:at.Lv.CloseButton},{duration:B})}sendPostViewedEvents(){var k;G.Aq$.isDefined(null===(k=this.feedScrollView)||void 0===k?void 0:k.objectsViewed)?this.feedScrollView.objectsViewed.forEach((k=>{const B=k.findComponentInChildren(et);if(B){const k=this._adData.find((k=>k.ID===B.Id)),U=this._adData.findIndex((k=>k.ID===B.Id));k&&U>=0&&V.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendPostViewedEvent({interfaceName:nt.B.WizardWatch,interfaceType:at.Wm.DialogBox,postTitle:k.title,postID:k.ID.toString(),postRank:U+1})}})):G.VyI.log("SocialFeed.sendPostViewedEvents: Scroll view objectsViewed is not defined",G.$bb.Warning)}sendButtonClickedEvent(k,B){this.fireButtonEvent({interfaceType:at.Wm.DialogBox,buttonName:k},{notification_id:B})}destroy(k){this.clearScrollView(),G.Aq$.isDefined(this.allButton)&&(this.allButton.onUpCallback=null,this.allButton=null),G.Aq$.isDefined(this.closeButton)&&(this.closeButton.onClickCallback=null,this.closeButton=null),this._adData=[],this.allTab=null,this.allBadge=null,this.allBadgeNumber=null,this.inactiveAllBadge=null,this.inactiveAllBadgeNumber=null,this.feedScrollView=null,this.feedScrollBar=null,this.noFeedAll=null,this.feedContents=null,super.destroy(k)}}ut.AD_HEIGHT=335,ut.AD_WIDTH=875,ut.configModifiers={modifyProperty:[{element:"allButton",property:"visible",value:!1},{element:"allTab",property:"visible",value:!1},{element:"allBadge",property:"visible",value:!1},{element:"allBadgeNumber",property:"visible",value:!1},{element:"inactiveAllBadge",property:"visible",value:!1},{element:"inactiveAllBadgeNumber",property:"visible",value:!1},{element:"meButton",property:"visible",value:!1},{element:"meTab",property:"visible",value:!1},{element:"friendButton",property:"visible",value:!1},{element:"friendTab",property:"visible",value:!1},{element:"noFeedMe",property:"visible",value:!1},{element:"noFeedFriend",property:"visible",value:!1}]},(0,F.Cg)([(0,G.fFd)("a03-308f"),(0,F.Sn)("design:type",ht.V)],ut.prototype,"_timeManager",void 0)},94236:(k,B,U)=>{"use strict";U.d(B,{K:()=>ut});var F=U(8674),G=U(62459),j=U(62248),$=U(99625),H=U(62886),V=U(60157),W=U(90633),q=U(65240),K=U(73797),z=U(80060),Y=U(35120),Q=U(91207),X=U(77938),Z=U(55734),J=U(88038),tt=U(80711),et=U(51972),it=U(41674),st=U(15485),nt=U(46784),at=U(22023),rt=U(30226),ot=U(47255),ht=U(95057),ct=U(37941),dt=U(76277),lt=U(58347);class ut extends ct.l{constructor(k,B,U,F,G){super(k,B,U,F,20),this.evolutionTime=5e3,this.modalContainerNames=["stopButtonContainer","okayButtonContainer","evolveButtonContainer"],this.queuePostCreateCallback(this.sparkle.bind(this),this.fillElements.bind(this),this.setupButtons.bind(this),this.sendSubsequentEvolutionInterfaceEvent.bind(this)),this._evolutionSource=G,this.startEvolutionLevel=F.getLevel(),this.availableEvolutions=U.getAvailableEvolutions()}isRequired(){return this.currentCreature.getLevel()>this.startEvolutionLevel&&this.availableEvolutions.length>0}getBannerLocKey(){return"SUMMARY_POPUP_EVOLUTION"}showButtonSet(k){for(let B=0;B{this.sendAnalyticsFunnelStage1(),this.fireButtonEvent({buttonName:st.k.EvolveNow}),Y.q.instance.prodigy.open.memberAdSuppressionToolTip({bodyText:null,xPosition:525,yPosition:500,arrowXRelPos:.5,arrowDirection:et.i.DOWN})}):this.evolveButton.onUpCallback=()=>{this.fireButtonEvent({buttonName:st.k.EvolveNow}),this.performEvolution()},this.stopButton.onUpCallback=()=>{this.fireButtonEvent({buttonName:st.k.Stop}),this.stopEvolution()},this.okayButton.onUpCallback=()=>{this.fireButtonEvent({buttonName:st.k.Okay}),this.onOkayButtonPress()},this.closeButton.onUpCallback=()=>{this.fireButtonEvent({buttonName:st.k.Later}),this.closeTween()}}fillElements(){Y.q.instance.prodigy.audio.playSFX(32,"popUpDisplay");const k=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.hasMembership()?this.setActionText(Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("CREATURE_IS_EVOLVING",this.originalCreatureCopy.getFirstName())):this.setActionText(Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("CREATURE_TRYING_TO_EVOLVE",this.originalCreatureCopy.getFirstName())),this.currentCreature.getLevel()>=100&&this.evolveLaterText.setText(Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("DO_NOT_EVOLVE")),k.hasMembership()?(this.showButtonSet("stopButtonContainer"),this.startEvolutionTimer()):this.showButtonSet("evolveButtonContainer"),this.loadMonsterSprite(this.originalCreatureCopy.getID());let B=this.originalCreatureCopy.getElement();B=rt.J.convertLegacyElements(B),this.ballDisplay.image.frameName=at.P8.getAtlasElementBackerPath(B)}performEvolution(){const k=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(k.hasMembership())this.evolveSuccess();else{let B=Y.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("enableMembershipVideoAd",!1);const U=k.isPlayingAtSchool();(G.o5U.isIOS()||G.o5U.isAndroid()||G.o5U.isSafari()||G.o5U.isEdge()||G.o5U.isOpera()||U)&&(B=!1),B=!1,Y.q.instance.prodigy.open.membershipInfo(this.memberConverted.bind(this),{conversionFunnelName:ot.o.FunnelEvolutionMemberLock,conversionStage:ot.o.StageEvolutionConverted},"evolveNow-button"),this.sendAnalyticsFunnelStage1()}}sendAnalyticsFunnelStage1(){const k=rt.J.showYouTubeMembershipAd(this.game,!0)?ht.R.Video:ht.R.Static;this._segment.purchase.sendFunnelStart({type:"Pet-Evolution-Member-Lock",category:"Pet",contentId:`pet-${this.currentCreature.getID()}`,adType:k})}sendSubsequentEvolutionInterfaceEvent(){Y.q.instance.prodigy.gameContainer.get("12f-4e29").isBreadcrumbComplete(W.B.FEATURE_PET_EVOLUTION,W.B.BREADCRUMB_NONMEMBER_FIRST_PET_EVOLUTION)&&this._segment.featureCommon.sendInterfaceEvent({interfaceName:nt.B.NewOtherEvolutions,interfaceType:it.Wm.DialogBox,originType:it.$N.AutoSurfaced,eventName:"interface_opened"})}memberConverted(){Y.q.instance.prodigy.audio.resumeBGM();Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasMembership()&&setTimeout(this.evolveSuccess.bind(this),100)}stopEvolution(){this.setActionText(Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("CREATURE_STOPPED_EVOLVING",this.originalCreatureCopy.getFirstName())),clearTimeout(this.evolutionTimerID),this.okayButton.onUpCallback=this.closeTween.bind(this),this.evolutionEffect.alpha=0,this.showButtonSet("okayButtonContainer"),this._segment.playerProgression.sendPetEvolutionCancelledEvent({petName:this.currentCreature.getName(),petLevel:this.currentCreature.getLevel(),petElement:this.currentCreature.getElement(),petRank:at.P8.getPetDisplayMergeRank(this.currentCreature.data.ID,this.currentCreature.data.uniqueID),evolutionSource:this._evolutionSource})}startEvolutionTimer(){this.evolutionTimerID=window.setTimeout(this.performEvolution.bind(this),this.evolutionTime)}evolveSuccess(){if(Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasMembership()){const k=this.availableEvolutions[0],B=G.Aq$.isDefined(k.evolveID)?k.evolveID:k.e,U=this.currentCreature.getName();this.currentCreature.evolve(B).then((()=>{this._segment.playerProgression.sendPetEvolvedEvent({petName:this.currentCreature.getName(),petLevel:this.currentCreature.getLevel(),petRank:at.P8.getPetDisplayMergeRank(this.currentCreature.data.ID,this.currentCreature.data.uniqueID),petOldName:U,petType:at.P8.getPetEvolutionType(this.currentCreature.getID()),evolutionSource:this._evolutionSource}),this.sendQuestEvolveEvent(),this.doEvolveAnimation()})).catch(G.RQr.createHandler(`Error evolving creature with ID ${this.currentCreature.getID()}`))}}doEvolveAnimation(){const k=Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("CREATURE_IS_EVOLVING",this.originalCreatureCopy.getFirstName());this.actionText.textObject.text!==k&&this.setActionText(k),this.showButtonSet(""),setTimeout(this.loadMonsterSprite.bind(this,this.currentCreature.getID()),2e3),this.evolutionEffect.playAnimation("sparkle mask",!1,this.doneEvolveAnimation.bind(this))}doneEvolveAnimation(){Y.q.instance.prodigy.audio.playSFX(32,"popUpDisplay"),this.setActionText(`${this.currentCreature.getFirstName()}!`),this.showButtonSet("okayButtonContainer")}loadMonsterSprite(k){G.Aq$.isDefined(this.monsterIcon)&&(this.monsterIcon.destroy(),this.monsterIcon=null),this.monsterIcon=Y.q.instance.prodigy.create.sprite(0,0,Q.E.getIconForType("pet",k),null,new G.I9Y(.5,.5),(k=>{G.Aq$.isDefined(this.spriteHolder)&&this.spriteHolder.add(k)}))}onOkayButtonPress(){this.availableEvolutions=this.currentCreature.getAvailableEvolutions(),this.availableEvolutions.length>0?(this.originalCreatureCopy=this.currentCreature.createDataClone(),this.fillElements()):this.closeTween()}static openEvolutionPromptIfEligible(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){let F;const j=Y.q.instance.prodigy.gameContainer.get("e20-0fb0"),$=at.P8.getEvolutionGiftState(j.isMember());return F=k instanceof Z.R&&at.P8.canPetEvolve(k,k.getLevel())&&$!==at.O2.GIFT_UNAVAILABLE&&!U?yield this.openEvolutionScreen(k,j,null!=G?G:it.k.Other):Y.q.instance.prodigy.open.evolutionSummary(k,null!=B?B:k,null!=G?G:it.k.Other),void 0!==F&&(yield F.onDestroy.asPromise(),this._menu=void 0,!0)}))}static openEvolutionScreen(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const B=Y.q.instance.prodigy;if(B.open.isMenuOpen(tt.l)||ut.isOpening)return;ut.isOpening=!0;const F=$.l.EvolutionScreen,H={},V=B.gameContainer.get("5c7-e02d"),W=V.getBalance(27),q=V.petAcquisitionCost(k.getID(),j.l6.Evolution),K=X.t.getItem("pet",k.getID()),Q=at.P8.findNextEvolution(K),Z=B.gameContainer.get(G.$Bt.LocalizationService);H.PET_EVOLUTION_REACHED_MAX_LEVEL=Z.getText("EVOLUTION_SCREEN_REACHED_MAX_LEVEL",K.data.name),H.PET_EVOLUTION_EVOLVE_TO_GET_STRONGER=Z.getText("EVOLUTION_SCREEN_EVOLVE_TO_GET_STRONGER",Q.data.name),H.PRE_EVOLUTION_CARD_PET_ID=K.ID,H.POST_EVOLUTION_CARD_PET_ID=Q.ID,this.setMembershipInjectableProperties(H,q,W);const et=B.open.prefabMenu(F,null,!0,!1,!0,H,void 0,void 0,void 0,void 0,!0);return et.onPrefabLoaded.addOnce((B=>{this._menu=B.findComponentInChildren(tt.l,!0),this._menu.init(k,U),ut.isOpening=!1,z.d.updateInjectedValues(B,{PET_EVOLUTION_CARD_ANIMATE_BALANCE:W}),J._.anyEvolutionPromptShown()})),et}))}static setMembershipInjectableProperties(k,B,U){var F;const G=Y.q.instance.prodigy.gameContainer.get("e20-0fb0"),j=G.isMember(),$=(0,dt.G)(lt.F),H=G.player.canPurchaseMembershipInGame(),V=B.value<=U,W=Y.q.instance.prodigy.gameContainer.get("5c7-e02d"),q=!V&&(!H||$),z=!$&&!V&&H||W.isHardCurrencyMemberLocked(B.value);k.SHOW_NOT_ENOUGH_MAGICOIN_BUTTON=q,k.SHOW_MEMBERSHIP_BUTTON=z,k.CURRENCY_COST=null!==(F=null==B?void 0:B.value)&&void 0!==F?F:0,k.MAGICOIN_PRICE=B.value,k.UPDATE_MAGICOIN_BUDGET=U,k.SHOW_BUTTON_SPARKLES=V||H,k.IS_MEMBER=j,k.MEMBERSHIP_BUTTON_ENABLED=!0,z&&(Y.q.instance.prodigy.game.broadcaster.addAppListener(K.H3.MembershipResponseReceived,this.handleMembershipChange,this),Y.q.instance.prodigy.game.broadcaster.addAppListener(K.H3.MembershipRewardsFlowComplete,this.handleMembershipRewardsFlowComplete,this))}static handleMembershipChange(k){"success"!==k?z.d.updateInjectedValues(this._menu.GameObject,{MEMBERSHIP_BUTTON_ENABLED:!0}):Y.q.instance.prodigy.game.broadcaster.removeAppListener(K.H3.MembershipResponseReceived,this)}static handleMembershipRewardsFlowComplete(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;Y.q.instance.prodigy.game.broadcaster.removeAppListener(K.H3.MembershipRewardsFlowComplete,this),null===(k=this._menu)||void 0===k||k.startEvolutionFromMembershipPurchase().catch(G.RQr.createHandler("Error starting evolution after membership purchase"))}))}static attemptToForceSkip(){var k,B;G.Aq$.isDefined(this._menu)&&(null===(k=this._menu.skipButton)||void 0===k||k.onClick.dispatch(),null===(B=this._menu.skipButton)||void 0===B||B.onEnabledClick.dispatch())}sendQuestEvolveEvent(){const k=X.t.getItem("pet",this.currentCreature.data.ID).data,B={params:{taskEventType:V.Z7.Pet,rarity:k.rarity,itemType:"pet",source:q.C.PetEvolution,id:k.ID,element:k.affinity,level:k.level}};Y.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(H.T.EVOLVE_PET,B).catch(G.RQr.createHandler("Error sending a quest event for evolving a pet"))}destroy(){super.destroy(),Y.q.instance.prodigy.game.broadcaster.removeAppListener(K.H3.MembershipResponseReceived,this),Y.q.instance.prodigy.game.broadcaster.removeAppListener(K.H3.MembershipRewardsFlowComplete,this),ut.isOpening=!1}}ut.isOpening=!1},47717:(k,B,U)=>{"use strict";U.d(B,{H:()=>K});var F=U(62459),G=U(95359),j=U(88022),$=U(35120),H=U(77938),V=U(39984),W=U(15485),q=U(37941);class K extends q.l{constructor(k,B,U,F){super(k,B,U,F,21),this._statIncreases=[];const G=U.getBattleAssetSpecifier(),j=H.t.getItem(G.type,G.id).data,$=V.e.getStatIncreasesFromLevelUps(j,F.getLevel(),U.getLevel());this._statIncreases=Object.entries($),this.queuePostCreateCallback(this.showNextStatIncrease.bind(this),this.setupButton.bind(this))}isRequired(){var k;return(null===(k=this._statIncreases)||void 0===k?void 0:k.length)>0}getBannerLocKey(){return null}showNextStatIncrease(){this._statIncreases.length<=0?this.close():($.q.instance.prodigy.audio.playSFX(32,"popUpDisplay"),this.setUpUi(...this._statIncreases.shift()))}setBannerTitle(k){this.setBannerTitleLocKey(K.BANNER_LOC_KEY[k])}setUpUi(k,B){var U;this.setBannerTitle(k),this.okayButton.visible=!1,null===(U=this._statIcon)||void 0===U||U.destroy(),this._statIcon=$.q.instance.prodigy.create.sprite(0,0,j._.Ui_battle_revamp_json,K.ICON_FRAMES[k],new F.I9Y(.5,.5),(k=>{F.Aq$.isDefined(this.spriteHolder)&&(this.spriteHolder.add(k),this.game.add.tween(k.scale,this).from({x:0,y:0},1e3,F.GS3.Elastic.Out,!0),$.q.instance.prodigy.audio.playSFX(32,"popUpDisplay"),this.okayButton.visible=!0)}));const G=K.STAT_EARNED_KEY[k],H=1===B&&G.length>1?G[1]:G[0];this.setActionText($.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText(H,this.currentCreature.getFirstName(),B))}setupButton(){this.okayButton.onUpCallback=()=>{this.fireButtonEvent({buttonName:W.k.Okay}),this.showNextStatIncrease()}}}K.ICON_FRAMES={[G.IE.Power]:"icon-levelup-power",[G.IE.Defence]:"icon-levelup-defense",[G.IE.Speed]:"icon-levelup-dodge",[G.IE.Hp]:"icon-levelup-heart"},K.BANNER_LOC_KEY={[G.IE.Power]:"SUMMARY_POPUP_INCREASED_POWER",[G.IE.Defence]:"SUMMARY_POPUP_INCREASED_DEFENSE",[G.IE.Speed]:"SUMMARY_POPUP_INCREASED_SPEED",[G.IE.Hp]:"SUMMARY_POPUP_INCREASED_HP"},K.STAT_EARNED_KEY={[G.IE.Power]:["SUMMARY_POPUP_EARNED_POWER"],[G.IE.Defence]:["SUMMARY_POPUP_EARNED_DEFENSE"],[G.IE.Speed]:["SUMMARY_POPUP_EARNED_SPEED"],[G.IE.Hp]:["SUMMARY_POPUP_EARNED_HP_MULTIPLE","SUMMARY_POPUP_EARNED_HP"]}},37941:(k,B,U)=>{"use strict";U.d(B,{l:()=>W});var F=U(62459),G=U(35120),j=U(15485),$=U(41674),H=U(82680),V=U(51742);class W extends H.W{constructor(k,B,U,F,G){super(k,B,G,{isModal:!1},[V.c.Sfx_results_screen]),this.currentCreature=U,this.originalCreatureCopy=F,this.currentInterfaceName=this.getBannerLocKey(),this.queuePostCreateCallback(this.openTween.bind(this),(()=>{this.okayButton.onUpCallback=()=>{this.closeTween(),this.fireButtonEvent({buttonName:j.k.Okay})},this.setBannerTitleLocKey(this.getBannerLocKey())}))}create(){this.isRequired()?(super.create(),this.background.visible=!1,F.Aq$.isDefined(this.onCreateCallback)&&this.onCreateCallback(),this.fireInterfaceEvent({originType:$.$N.AutoSurfaced})):this.close()}setOnCreateCallback(k){this.onCreateCallback=k}openTween(){if(F.Aq$.isDefined(this.uiRoot)){const k=this.uiRoot;k.pivot.x=k.width/2,k.pivot.y=k.height/2,k.x+=k.pivot.x,k.y+=k.pivot.y,k.scale.x=.1,k.scale.y=.1,k.alpha=0,this.game.add.tween(k.scale,this).to({x:1,y:1},200,F.GS3.Back.Out,!0),this.game.add.tween(k,this).to({alpha:1},120,F.GS3.Linear.None,!0)}}closeTween(){if(F.Aq$.isDefined(this.uiRoot)){this.okayButton.setActive(!1);this.game.add.tween(this.uiRoot,this).to({alpha:0},200,F.GS3.Linear.None,!0).onTweenComplete.add(this.close.bind(this))}}setActionText(k){this.actionText.setText(k),this.game.add.tween(this.actionText,this).from({x:this.actionText.x+20,alpha:0},300,F.GS3.Quadratic.Out,!0)}setBannerTitleLocKey(k){this.resultsTitle.setText(G.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText(k))}close(){this.fireInterfaceEvent({closeMethod:$.Lv.ButtonClick}),super.close()}}},67510:(k,B,U)=>{"use strict";U.d(B,{v:()=>X});var F=U(8674),G=U(62459),j=U(88022),$=U(35120),H=U(88552),V=U(6190),W=U(65050),q=U(7910),K=U(80060),z=U(55237),Y=U(34374),Q=U(82680);class X extends Q.W{constructor(k,B,U,F,G,j,$,H,V,W=!1,q=!0,K,z){super(k,B,200),this._weightedRewards=F,this._prefabLoader=U,this._prefabGuid=G,$&&(this._forceRewards=[...$]),this._instanceType=j,V&&(this._closeCallback=V),H&&(this._fallbackRewards=H),this._immediatelyAwardForcedReward=W,this._awardItems=q,K&&(this._injectableProperties=K),(null==z?void 0:z.instanceId)&&(this._instanceId=z.instanceId),(null==z?void 0:z.sourceType)&&(this._sourceType=z.sourceType)}create(){const k=Object.create(null,{create:{get:()=>super.create}});return(0,F.sH)(this,void 0,void 0,(function*(){k.create.call(this),yield Promise.all([K.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,this._prefabGuid,Object.assign({WEIGHTED_REWARDS:this._weightedRewards,FALLBACK_REWARDS:this._fallbackRewards,INSTANCE_TYPE:this._instanceType},this._injectableProperties)).promise.then((k=>{this._ui=k})),new Promise((k=>{$.q.instance.prodigy.load.assets(j._.Ui_raster_pets_menu_json,k)}))]),this.update=()=>{this._ui.update()};const B=this._ui.findComponentInChildren(G.jsv);this.addChild(B.getRootContainer()),this._ui.findComponentInChildren(H.Z).menu=this,this._roulette=this._ui.findComponentInChildren(Y.i),this._roulette.reset(),this._roulette.forcedRewards=this._forceRewards,this._roulette.instanceTypeForSegmentEvent=this._instanceType,this._roulette.sourceTypeForSegmentEvent=this._sourceType,this._ui.findComponentInChildren(q.a)&&(this._ui.findComponentInChildren(q.a).instanceType=this._instanceType,this._ui.findComponentInChildren(q.a).instanceId=this._instanceId);const U=this._ui.findComponentInChildren(V.q);if(this._immediatelyAwardForcedReward&&this._awardItems){this._ui.findComponentInChildren(z.X).skipAward=!0,U.items=this._forceRewards,U.instanceType=this._instanceType,this._sourceType&&(U.awardSourceType=this._sourceType),this._instanceId&&(U.instanceId=this._instanceId),this._roulette.instanceTypeForSegmentEvent!==W.N.RiftRun&&this._roulette.instanceTypeForSegmentEvent!==W.N.BossRift||(U.instanceId=this._segment.rifts.riftInstanceUuid),U.run();$.q.instance.prodigy.gameContainer.get("306-5359").forceSaveCharacter()}else this._awardItems||(U.awardItems=!1)}))}close(){var k;null===(k=this._closeCallback)||void 0===k||k.call(this),super.close()}destroy(){this._ui.destroy(),super.destroy()}}},50348:(k,B,U)=>{"use strict";U.d(B,{L:()=>q});var F=U(62459),G=U(35120),j=U(49237),$=U(8674);let H=class extends F.uAl{constructor(){super(...arguments),this._footerText=null,this._hyperlinkText=null,this._hyperlinkButton=null}get footerText(){return this._footerText}get hyperlinkText(){return this._hyperlinkText}get hyperlinkButton(){return this._hyperlinkButton}};(0,$.Cg)([(0,F.x4W)("FooterText"),(0,$.Sn)("design:type",F.EYj)],H.prototype,"_footerText",void 0),(0,$.Cg)([(0,F.x4W)("HyperlinkText"),(0,$.Sn)("design:type",F.EYj)],H.prototype,"_hyperlinkText",void 0),(0,$.Cg)([(0,F.x4W)("HyperlinkButton"),(0,$.Sn)("design:type",j.$)],H.prototype,"_hyperlinkButton",void 0),H=(0,$.Cg)([(0,F.EVk)("BannerDialogHyperlink")],H);var V=U(21457),W=U(38134);class q extends W.u{constructor(k,B,U=new V.Z){super(k,B,U),this._bannerDialogConfig=null,this._headerPrefabID=101,this._bodyPrefabID=98,this._footerPrefabID=99,this._bannerDialogConfig=U,this.isModal=!1,this._bannerDialogConfig.hasHyperlink&&(this._footerPrefabID=100)}createHeader(){if(F.Aq$.isDefined(this._bannerDialogConfig.bannerSource)){const k=G.q.instance.prodigy.create.sprite(0,0,this._bannerDialogConfig.bannerSource,F.Aq$.isDefined(this._bannerDialogConfig.bannerFrame)?this._bannerDialogConfig.bannerFrame:null);this._prefabComponent.header.legacyTransform.group.addChild(k)}if(this._bannerDialogConfig.closeButton){const k=this._prefabLoader.load(94,this._prefabComponent.header);this._bannerDialogConfig.closeButtonCallback&&k.findComponentInChildren(j.$).onClick.add(this._bannerDialogConfig.closeButtonCallback),k.findComponentInChildren(j.$).onClick.add(this.close.bind(this))}this._bannerDialogConfig.hasHyperlink&&this._prefabLoader.load(this._headerPrefabID,this._prefabComponent.header)}createBody(){const k=this._prefabLoader.load(this._bodyPrefabID,this._prefabComponent.body).findComponentsInChildren(F.EYj);k[0].text=this._bannerDialogConfig.headerTitle,k[1].text=this._bannerDialogConfig.bodyMessage}createFooter(){const k=this._prefabLoader.load(this._footerPrefabID,this._prefabComponent.footer),B=k.findComponentInChildren(H);if(F.Aq$.isDefined(B))F.Aq$.isDefined(this._bannerDialogConfig.buttonCallback)&&B.hyperlinkButton.onClick.add(this._bannerDialogConfig.buttonCallback),B.hyperlinkText.text=this._bannerDialogConfig.buttonText,B.hyperlinkText.drawUnderline(0,this._bannerDialogConfig.buttonText.length),B.footerText.text=this._bannerDialogConfig.footerMessage;else{F.Aq$.isDefined(this._bannerDialogConfig.buttonCallback)&&k.findComponentInChildren(j.$).onClick.add(this._bannerDialogConfig.buttonCallback),k.findComponentInChildren(j.$).onClick.add(this.close.bind(this));const B=k.findComponentsInChildren(F.EYj);for(let k=0;k{"use strict";U.d(B,{Z:()=>$});var F=U(35120),G=U(49967),j=U(2272);class $ extends G.P{get buttonText(){return this._buttonText}get buttonCallback(){return this._buttonCallback}get bannerSource(){return this._bannerSource}get bannerFrame(){return this._bannerFrame}get closeButton(){return this._closeButton}get closeButtonCallback(){return this._closeButtonCallback}get hasHyperlink(){return this._hasHyperlink}get footerMessage(){return this._footerMessage}constructor(k="DEFAULT",B,U,G,$,H,V,W,q,K,z,Y){super(j.E.Banner,U,G,$,H),this._buttonText=k,this._buttonCallback=()=>{F.q.instance.prodigy.audio.playSFX(18,"pop"),null==B||B()},this._bannerSource=V,this._bannerFrame=W,this._closeButton=q,this._closeButtonCallback=()=>{F.q.instance.prodigy.audio.playSFX(18,"pop"),null==K||K()},this._hasHyperlink=z,this._footerMessage=Y}}},642:(k,B,U)=>{"use strict";U.d(B,{k:()=>$});var F=U(35120),G=U(43846),j=U(49967);class $ extends j.P{get confirmButtonText(){return this._confirmButtonText}get confirmButtonCallback(){return this._confirmButtonCallback}get dismissButtonText(){return this._dismissButtonText}get dismissButtonCallback(){return this._dismissButtonCallback}get headerIcon(){return this._headerIcon}constructor(k=(0,G.k)("BUTTON_QUIT_CAPITAL"),B=null,U=(0,G.k)("DIALOG_STAY"),j=null,$=null,H,V,W,q,K){super(H,V,W,q,K),this._confirmButtonText=k,this._confirmButtonCallback=()=>{F.q.instance.prodigy.audio.playSFX(18,"pop"),null==B||B()},this._dismissButtonText=U,this._dismissButtonCallback=()=>{F.q.instance.prodigy.audio.playSFX(18,"pop"),null==j||j()},this._headerIcon=$}}},38134:(k,B,U)=>{"use strict";U.d(B,{u:()=>q});var F=U(35120),G=U(82680),j=U(88022),$=U(8674),H=U(62459);let V=class extends H.uAl{constructor(){super(...arguments),this._rootObject=null,this._header=null,this._body=null,this._footer=null}get rootObject(){return this._rootObject}get header(){return this._header}get body(){return this._body}get footer(){return this._footer}};(0,$.Cg)([(0,H.x4W)("rootObject"),(0,$.Sn)("design:type",H._mx)],V.prototype,"_rootObject",void 0),(0,$.Cg)([(0,H.x4W)("header"),(0,$.Sn)("design:type",H._mx)],V.prototype,"_header",void 0),(0,$.Cg)([(0,H.x4W)("body"),(0,$.Sn)("design:type",H._mx)],V.prototype,"_body",void 0),(0,$.Cg)([(0,H.x4W)("footer"),(0,$.Sn)("design:type",H._mx)],V.prototype,"_footer",void 0),V=(0,$.Cg)([(0,H.EVk)("DialogBasePrefab")],V);var W=U(49967);class q extends G.W{get prefabComponent(){return this._prefabComponent}constructor(k,B,U=new W.P){super(k,B,200,{},[j._.Ui_buttons_json,j._.Ui_dialogues_json,j._.Ui_store_json]),this._dialogConfig=null,this.prefabRoot=null,this._prefabComponent=null,this._prefabLoader=null,this._dialogConfig=U,this.isModal=!0,this._prefabLoader=F.q.instance.prodigy.gameContainer.get("d0e-64fd")}create(){super.create();const k=this._prefabLoader.loadFromGUID(this._dialogConfig.size);this._prefabComponent=k.findComponentInChildren(V),this.prefabRoot.addChild(k.legacyTransform.group),this.background.visible=this._dialogConfig.bgTransparency,this._prefabComponent.rootObject.legacyTransform.group.width=this._dialogConfig.width,this.createHeader(),this.createBody(),this.createFooter()}}},49967:(k,B,U)=>{"use strict";U.d(B,{P:()=>$});var F=U(62459),G=U(2272);const j={[G.E.Small]:550,[G.E.Medium]:600,[G.E.Large]:700,[G.E.Banner]:700};class ${get size(){return this._size}get width(){return this._width}set width(k){switch(this._size){case G.E.Small:this._width=F.cj9.clamp(k,500,600);break;case G.E.Medium:this._width=F.cj9.clamp(k,600,700);break;case G.E.Large:case G.E.Banner:this._width=F.cj9.clamp(k,700,800);break;default:F.VyI.log("Invalid dialog width, setting to default: 500px",F.$bb.Error),this._width=500}}get headerTitle(){return this._headerTitle}get bodyMessage(){return this._bodyMessage}get bgTransparency(){return this._bgTransparency}constructor(k=G.E.Small,B,U="Default Title Please Fix",F="Default Message Please Fix",$=!0){this._size=k,this.width=null!=B?B:j[k],this._headerTitle=U,this._bodyMessage=F,this._bgTransparency=$}}},2272:(k,B,U)=>{"use strict";var F;U.d(B,{E:()=>F}),function(k){k.Small="223de309-a870-4aed-adaa-5cbe162c5659",k.Medium="69bad6cf-14b6-412e-a50c-292cc979727a",k.Large="e19ecfda-8a24-4a40-92bd-035c7c7e79f2",k.Banner="d17a542f-7dd9-43cb-ba9d-9fa34eb31e22"}(F||(F={}))},75329:(k,B,U)=>{"use strict";U.d(B,{Z:()=>$});var F=U(99625),G=U(35120),j=U(49967);class $ extends j.P{get buttonText(){return this._buttonText}get buttonCallback(){return this._buttonCallback}get graphicSource(){return this._graphicSource}get graphicFrame(){return this._graphicFrame}get headerPrefabID(){return void 0!==this._headerPrefabID?this._headerPrefabID:F.l.DefaultHeader}get footerPrefabID(){return void 0!==this._footerPrefabID?this._footerPrefabID:F.l.DefaultFooter}get bodyPrefabID(){return void 0!==this._bodyPrefabID?this._bodyPrefabID:F.l.DefaultBody}constructor(k="DEFAULT",B,U,F,j,$,H,V,W,q,K,z){super(U,F,j,$,H),this._buttonText=k,this._buttonCallback=()=>{G.q.instance.prodigy.audio.playSFX(18,"pop"),null==B||B()},this._graphicSource=V,this._graphicFrame=W,this._headerPrefabID=q,this._footerPrefabID=K,this._bodyPrefabID=z}}},99429:(k,B,U)=>{"use strict";U.d(B,{K:()=>et});var F,G=U(8674),j=U(62459),$=U(20748),H=U(88022),V=U(35120),W=U(38181),q=U(15485),K=U(46784),z=U(65050),Y=U(41674),Q=U(67665),X=U(10312),Z=U(642),J=U(2272),tt=U(49237);let et=F=class extends j.uAl{constructor(){super(...arguments),this._signOutScrollViewButton=null,this._changePasswordScrollViewButton=null,this._deleteAccountScrollViewButton=null,this._userIDInput=null,this._localization=null}get signOutScrollViewButton(){return this._signOutScrollViewButton}get changePasswordScrollViewButton(){return this._changePasswordScrollViewButton}get deleteAccountScrollViewButton(){return this._deleteAccountScrollViewButton}get userIDInput(){return this._userIDInput}create(){super.create(),this._localization=V.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),this.setUpButtons()}postCreate(){super.postCreate(),this._activePlayer=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player,this.userIDInput.text=this._activePlayer.userID.toString(),this.userIDInput.setDisabled(!0)}destroy(){this.userIDInput.destroy(),super.destroy()}setInputVisibility(k){document.getElementById("external-ui").style.display=k?"unset":"none"}setUpButtons(){var k,B,U;null===(k=this.signOutScrollViewButton)||void 0===k||k.onClick.add(this.onSignOutClicked,this),null===(B=this.changePasswordScrollViewButton)||void 0===B||B.onClick.add(this.onChangePasswordClicked,this),null===(U=this.deleteAccountScrollViewButton)||void 0===U||U.onClick.add(this.onDeleteAccountClicked,this)}onSignOutClicked(){V.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!1);V.q.instance.prodigy.open.confirmationDialogWideButtons(new Z.k(this._localization.getText("SIGN_OUT_BUTTON"),(()=>{V.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!0),V.q.instance.prodigy.gameContainer.get("c97-bd0d").logout()}),this._localization.getText("KEEP_PLAYING_BUTTON"),(()=>{V.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!0)}),{atlas:H._.Ui_store_json,name:"icon-large-exclamation"},J.E.Small,F.CONFIRM_WIDTH,this._localization.getText("SIGN_OUT_TITLE"),this._localization.getText("SIGN_OUT_MESSAGE")))}onChangePasswordClicked(){V.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!1);const k=`${V.q.instance.prodigy.gameContainer.get("be9-3278").getIdentityUrl()}/update_password`;this.leaveGame(k,"update_password",!0,!1),this.sendOpenDialogueSegmentEvents(q.k.ChangePasswordLink)}onDeleteAccountClicked(){V.q.instance.prodigy.audio.playSFX(18,"pop");this.leaveGame("prodigygame.zendesk.com/hc/en-us/articles/206242636-How-Do-I-Delete-My-Account-","cs_support_page"),this.sendOpenDialogueSegmentEvents(q.k.AccountDeletionLink)}leaveGame(k,B,U=!0,G=!0){this.setInputVisibility(!1);V.q.instance.prodigy.open.confirmationDialog(new Z.k(this._localization.getText("BUTTON_LEAVE_TEAM"),(()=>{V.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!0),this.sendCloseDialogueSegmentEvents(q.k.Leave,K.B.LeaveGameDialog,B),X.I.openWebsite(k,U,G)}),this._localization.getText("BUTTON_STAY_TEAM"),(()=>{V.q.instance.prodigy.audio.playSFX(18,"pop"),this.setInputVisibility(!0),this.sendCloseDialogueSegmentEvents(q.k.Stay,K.B.LeaveGameDialog,K.B.OptionsMenu)}),{atlas:H._.Ui_store_json,name:"icon-large-exclamation"},J.E.Small,F.CONFIRM_WIDTH,this._localization.getText("LOGIN_LEAVE_GAME"),this._localization.getText("LOGIN_LEAVE_BODY")))}sendOpenDialogueSegmentEvents(k){this._segment.featureCommon.sendButtonEvent({buttonName:k,interfaceType:Y.Wm.Settings,interfaceName:K.B.OptionsMenu,destinationName:K.B.LeaveGameDialog,elementType:"text_link",saveClickInfo:k}),this._segment.featureCommon.sendInterfaceEvent({interfaceName:K.B.LeaveGameDialog,interfaceType:Y.Wm.DialogBox,instanceType:z.N.Interface,originType:Y.$N.ButtonClick,originID:k})}sendCloseDialogueSegmentEvents(k,B,U){this._segment.featureCommon.sendButtonEvent({buttonName:k,interfaceName:B,interfaceType:Y.Wm.DialogBox,destinationName:U,saveClickInfo:k}),this._segment.featureCommon.sendInterfaceEvent({interfaceName:B,interfaceType:Y.Wm.DialogBox,instanceType:z.N.Interface,closeMethod:Y.Lv.ButtonClick})}};et.CONFIRM_WIDTH=550,et.DEBOUNCE_MS=500,(0,G.Cg)([(0,j.MnK)(j.Sjx),(0,G.Sn)("design:type",j.Sjx)],et.prototype,"_signOutScrollViewButton",void 0),(0,G.Cg)([(0,j.MnK)(tt.$),(0,G.Sn)("design:type",tt.$)],et.prototype,"_changePasswordScrollViewButton",void 0),(0,G.Cg)([(0,j.MnK)(tt.$),(0,G.Sn)("design:type",tt.$)],et.prototype,"_deleteAccountScrollViewButton",void 0),(0,G.Cg)([(0,j.MnK)(W.S),(0,G.Sn)("design:type",W.S)],et.prototype,"_userIDInput",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",Q.Y)],et.prototype,"_segment",void 0),(0,G.Cg)([(0,$.sg)(et.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],et.prototype,"onSignOutClicked",null),(0,G.Cg)([(0,$.sg)(et.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],et.prototype,"onChangePasswordClicked",null),(0,G.Cg)([(0,$.sg)(et.DEBOUNCE_MS),(0,G.Sn)("design:type",Function),(0,G.Sn)("design:paramtypes",[]),(0,G.Sn)("design:returntype",void 0)],et.prototype,"onDeleteAccountClicked",null),et=F=(0,G.Cg)([(0,j.EVk)("InfoSection")],et)},12696:(k,B,U)=>{"use strict";U.d(B,{L:()=>$});var F=U(8674),G=U(62459),j=U(35120);let $=class extends G.uAl{constructor(){super(),this._coinCountText=null,this.coinCountNumber=0,this._activePlayer=j.q.instance.prodigy.gameContainer.get("e20-0fb0")}create(){super.create(),this.updateCoinValue(),this.updateCoinCountText()}animateNewCoinCount(){var k,B,U;this._coinValueTween=j.q.instance.prodigy.game.add.tween(this,this).to({coinCountNumber:null===(U=null===(B=null===(k=this._activePlayer)||void 0===k?void 0:k.player)||void 0===B?void 0:B.data)||void 0===U?void 0:U.gold},1500,G.GS3.Quadratic.Out),this._coinValueTween.onUpdate.add(this.updateCoinCountText,this),this._coinValueTween.start()}updateCoinValue(){var k,B,U;const F=null===(U=null===(B=null===(k=this._activePlayer)||void 0===k?void 0:k.player)||void 0===B?void 0:B.data)||void 0===U?void 0:U.gold;F&&(this.coinCountNumber=F)}updateCoinCountText(){this._coinCountText.text=Math.round(this.coinCountNumber).toLocaleString()}destroy(){j.q.instance.game.tweens.remove(this._coinValueTween),super.destroy()}};(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],$.prototype,"_coinCountText",void 0),$=(0,F.Cg)([(0,G.EVk)("CoinDisplayComponent",G.YH6.ui),(0,F.Sn)("design:paramtypes",[])],$)},91033:(k,B,U)=>{"use strict";U.d(B,{M:()=>ht});var F=U(99625),G=U(35120),j=U(73797),$=U(62459),H=U(95891),V=U(60881),W=U(76974),q=U(54422),K=U(77938),z=U(8674),Y=U(58268),Q=U(49237),X=U(98013),Z=U(22023),J=U(28152),tt=U(12861),et=U(65231);let it=class extends et.s{constructor(){super(...arguments),this._rescuedContainer=null,this._amountRescued=null,this._petBookOrdinal=null,this._iconEffect=null}get cardClicked(){return this._cardClicked}get isCardValid(){return!!this._item}get ordinal(){return!this.itemIsImageItemDrop(this._item)&&Z.P8.hasValidOrdinal(this._item)?this._item.data.ordinal:-1}create(){super.create(),this._cardClicked=new $.HN0,this._interactable.onClick.add((()=>{this.onCardClick()}))}setData(k,B,U,F){super.setItemData(k),this._seenPet=B,this._ownedPet=U||F>0,this._numberOwned=F}updateCard(){this.setTimesRescued(this._numberOwned>0,this._numberOwned),this.setPetBookOrdinal(this.ordinal.toString()),this.setIcon(this._seenPet,this._ownedPet)}resetCard(){super.resetCard(),this.clearCardEffect()}setTimesRescued(k,B){this._rescuedContainer.active=k,k&&(this._amountRescued.text=B.toString())}setPetBookOrdinal(k){this._petBookOrdinal.text=`#${k}`}setIcon(k,B){k?(this._iconContainer.active=!0,this._unseenContainer.active=!1,B?this.updateIcon():this.updateIcon((k=>{this.applyCardEffect(k)}))):(this._iconContainer.active=!1,this._unseenContainer.active=!0)}applyCardEffect(k){H.delay((()=>{if(this.GameObject&&!this.GameObject.isDestroyed){if(this._petBookOrdinal.text="",this.clearCardEffect(),k){const B=new Y.N;B.desaturate(),k.filters=[B]}this.setPetBookOrdinal(this.ordinal.toString())}}),0)}clearCardEffect(){X.l.removeAll(this._iconEffect.GameObject.legacyTransform.group)}onCardClick(){this._cardClicked.dispatch(this._item.ID)}destroy(){this._interactable.onClick.dispose(),this._cardClicked.dispose(),super.destroy()}};(0,z.Cg)([(0,$.ERr)(),(0,$.Lr6)(0),(0,$.nKb)("iconContainer"),(0,z.Sn)("design:type",$._mx)],it.prototype,"_iconContainer",void 0),(0,z.Cg)([(0,$.ERr)(),(0,$.Lr6)(0),(0,$.nKb)("unseenContainer"),(0,z.Sn)("design:type",$._mx)],it.prototype,"_unseenContainer",void 0),(0,z.Cg)([(0,$.ERr)(),(0,$.Lr6)(0),(0,$.nKb)("rescuedContainer"),(0,z.Sn)("design:type",$._mx)],it.prototype,"_rescuedContainer",void 0),(0,z.Cg)([(0,$.MnK)($.EYj),(0,$.Lr6)(0),(0,$.nKb)("amountRescued"),(0,z.Sn)("design:type",$.EYj)],it.prototype,"_amountRescued",void 0),(0,z.Cg)([(0,$.MnK)($.EYj),(0,$.Lr6)(0),(0,$.nKb)("petBookOrdinal"),(0,z.Sn)("design:type",$.EYj)],it.prototype,"_petBookOrdinal",void 0),(0,z.Cg)([(0,$.MnK)(tt.A),(0,$.Lr6)(0),(0,$.nKb)("iconEffect"),(0,z.Sn)("design:type",tt.A)],it.prototype,"_iconEffect",void 0),(0,z.Cg)([(0,$.MnK)(Q.$),(0,$.Lr6)(0),(0,$.nKb)("interactable"),(0,z.Sn)("design:type",Q.$)],it.prototype,"_interactable",void 0),it=(0,z.Cg)([(0,$.EVk)("PetBookCard",J.Y.uiPet)],it);var st=U(41674);class nt{get infoSignal(){return this._infoSignal}get currentPage(){return this._currentPage}get currentDisplayPage(){return this._currentPage+1}get hasPreviousPage(){return this._currentPage>0}get hasNextPage(){return this._currentPage{this.tryToChangePage(this.hasNextPage,this._totalPageNumber-this.pagesPerScreen)})),this._petBookPrefab.firstPageButton.onClick.add((()=>{this.tryToChangePage(this.hasPreviousPage,0)}));const j=()=>{this.tryToChangePage(this.hasPreviousPage,this._currentPage-this.pagesPerScreen)},H=()=>{this.tryToChangePage(this.hasNextPage,this._currentPage+this.pagesPerScreen)};this._petBookPrefab.previousPageButton.onClick.add(j),this._petBookPrefab.nextPageButton.onClick.add(H),this._petBookPrefab.previousPageButton.GameObject.addComponent(q.E).initialize(V.D.LEFT,j),this._petBookPrefab.nextPageButton.GameObject.addComponent(q.E).initialize(V.D.RIGHT,H),this.paginatePets(),this.setupRecuseProgressBar(),this.updateCurrentPageDisplay()}paginatePets(){const k=K.t.getCategoryItems("pet");this._petBookPets=k.filter((k=>Z.P8.isValidForPetBook(k))).sort(((k,B)=>k.data.ordinal-B.data.ordinal)),this._petPagination=[];const B=Math.ceil(this._petBookPets.length/this.gridSize);for(let U=1;U<=B;U++){const k=this._petBookPets.slice((U-1)*this.gridSize,U*this.gridSize);this._petPagination.push(k)}this._totalPageNumber=B+B%2}setupRecuseProgressBar(){const k=this._encounters.getAllTotalPetsRescued();this.setProgressBar(k/this._petBookPets.length),this.setProgressText($.cj9.clamp(k,0,this._petBookPets.length),this._petBookPets.length)}updateCurrentPageDisplay(){this.changePage(this._currentPage)}tryToChangePage(k,B){k?(this.changePage(B),G.q.instance.prodigy.audio.playSFX(65,"book-pagination"),this.sendPageChangeAnalytics()):this._audio.playSFX(67,"button-disabled")}changePage(k){this._currentPage=k,this.setPageText(this._currentPage,this._currentPage+1,this._totalPageNumber),this.updateButtonStates(),this.populateGrids(this._petPagination[this._currentPage],this._petPagination[this._currentPage+1])}sendPageChangeAnalytics(){G.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendPetBookViewedEvent({bookName:"Pet Book",bookPage:this.currentDisplayPage,interfaceType:st.Wm.PetBook})}openPetInfoMenu(k){this._infoSignal.dispatch(k)}updateButtonStates(){this.hasPreviousPage?(this._petBookPrefab.previousPageButton.unlockState(),this._petBookPrefab.firstPageButton.unlockState()):(this._petBookPrefab.previousPageButton.lockState(W.K.Disabled),this._petBookPrefab.firstPageButton.lockState(W.K.Disabled)),this.hasNextPage?(this._petBookPrefab.nextPageButton.unlockState(),this._petBookPrefab.lastPageButton.unlockState()):(this._petBookPrefab.nextPageButton.lockState(W.K.Disabled),this._petBookPrefab.lastPageButton.lockState(W.K.Disabled))}populateGrids(k,B){this.populateGrid(this._petBookPrefab.leftGridview,k),this.populateGrid(this._petBookPrefab.rightGridview,B)}populateGrid(k,B){for(;!k.isEmpty();)this.removePetBookCard(k);null==B||B.forEach((B=>{B.data.name,B.data.ordinal;const U=this._petBookCardPool.getObject().findComponentInChildren(it);this.updatePetBookCard(U,B),k.GameObject.addChild(U.GameObject)}))}removePetBookCard(k){const B=H.last(k.GameObject.children);B&&(B.parent=null,this._petBookCardPool.recycleObject(B))}setProgressBar(k){this._petBookPrefab.progressBar.fillPercent=k}setProgressText(k,B){this._petBookPrefab.rescuedText.text=`${k} of ${B} rescued`}setPageText(k,B,U){this._petBookPrefab.leftPageText.text=`Page ${k+1} of ${U}`,this._petBookPrefab.rightPageText.text=`Page ${B+1} of ${U}`}createPetBookCard(){const k=this._prefabLoader.loadFromGUID(F.l.Pets_PetBookCard);return k.findComponentInChildren(it).cardClicked.add(this.openPetInfoMenu,this),k}updatePetBookCard(k,B){k.setData(B,this._encounters.hasPetBeenEncountered(B.ID),this._encounters.getPetTimesRescued(B.ID)>0,this._kennel.amountOfPet(B.ID)),k.updateDisplay()}recyclePetBookCard(k){k.findComponentInChildren(it,!0).clearCard(),k.legacyTransform.x=0,k.legacyTransform.y=0,this._unusedPetBookCardContainer.addChild(k)}enableController(k){const B=this._petBookPrefab.GameObject.findComponentsInChildren(q.E,!0);for(let U=0;U{"use strict";U.d(B,{A:()=>j});var F=U(62459),G=U(82680);class j extends G.W{constructor(){super(...arguments),this.onSubMenuLaunched=new F.HN0,this.onSubMenuLeft=new F.HN0,this._isPaused=!1}resumeMenu(){this._isPaused=!1}pauseMenu(){this._isPaused=!0}launchSubMenu(k){this.onSubMenuLaunched.dispatch(k)}leaveSubMenu(){this.onSubMenuLeft.dispatch()}destroy(){this.onSubMenuLaunched.dispose(),this.onSubMenuLeft.dispose(),super.destroy()}}},25930:(k,B,U)=>{"use strict";U.d(B,{J:()=>H});var F=U(8674),G=U(62459),j=U(83133),$=U(42838);let H=class extends G.uAl{constructor(){super(...arguments),this._aboutToggle=null,this._statsToggle=null,this._spellsToggle=null,this._aboutPanel=null,this._statsPanel=null,this._spellsPanel=null,this._learnMorePanel=null,this._tabsGridLayout=null,this._elementIconAtlas=null,this._elementIconFrameWater=null,this._elementIconFrameFire=null,this._elementIconFrameStorm=null,this._elementIconFrameEarth=null,this._elementIconFrameIce=null,this._lockedIconAtlas=null,this._lockedIconFrame=null,this._fillBarAttackAndHearts=null,this._fillBarHearts=null,this._textAttack=null,this._textHearts=null,this._textElement=null,this._iconContainerElement=null,this._textEvolveLevel=null,this._rowObjectEvolveLevel=null,this._textSpellsTitles=[],this._textSpellsLevel=[],this._textSpellsRange=[],this._gridSpellsLevel=[],this._gridSpellsRange=[],this._gridSpellsLevelOff=[],this._gridSpellsRangeOff=[],this._iconContainerSpells=[],this._textAbout=null}get elementIconAtlas(){return this._elementIconAtlas}get elementIconFrameWater(){return this._elementIconFrameWater}get elementIconFrameFire(){return this._elementIconFrameFire}get elementIconFrameStorm(){return this._elementIconFrameStorm}get elementIconFrameEarth(){return this._elementIconFrameEarth}get elementIconFrameIce(){return this._elementIconFrameIce}get lockedIconAtlas(){return this._lockedIconAtlas}get lockedIconFrame(){return this._lockedIconFrame}get fillBarAttackAndHearts(){return this._fillBarAttackAndHearts}get fillBarHearts(){return this._fillBarHearts}get textAttack(){return this._textAttack}get textHearts(){return this._textHearts}get textElement(){return this._textElement}get iconContainerElement(){return this._iconContainerElement}get textEvolveLevel(){return this._textEvolveLevel}get rowObjectEvolveLevel(){return this._rowObjectEvolveLevel}get textSpellsTitles(){return this._textSpellsTitles}get textSpellsLevel(){return this._textSpellsLevel}get textSpellsRange(){return this._textSpellsRange}get gridSpellsLevel(){return this._gridSpellsLevel}get gridSpellsRange(){return this._gridSpellsRange}get gridSpellsLevelOff(){return this._gridSpellsLevelOff}get gridSpellsRangeOff(){return this._gridSpellsRangeOff}get iconContainerSpells(){return this._iconContainerSpells}get textAbout(){return this._textAbout}get aboutToggle(){return this._aboutToggle}get statsToggle(){return this._statsToggle}get spellsToggle(){return this._spellsToggle}get aboutPanel(){return this._aboutPanel}get statsPanel(){return this._statsPanel}get spellsPanel(){return this._spellsPanel}get learnMorePanel(){return this._learnMorePanel}get tabsGridLayout(){return this._tabsGridLayout}create(){super.create(),this._aboutToggle&&(this._aboutToggle.GameObject.active=!1),this._statsToggle&&(this._statsToggle.GameObject.active=!1),this._spellsToggle&&(this._spellsToggle.GameObject.active=!1),this._aboutPanel&&(this._aboutPanel.active=!1),this._statsPanel&&(this._statsPanel.active=!1),this._spellsPanel&&(this._spellsPanel.active=!1),this._learnMorePanel&&(this._learnMorePanel.active=!1)}};(0,F.Cg)([(0,G.x4W)("aboutToggle"),(0,F.Sn)("design:type",j.l)],H.prototype,"_aboutToggle",void 0),(0,F.Cg)([(0,G.x4W)("statsToggle"),(0,F.Sn)("design:type",j.l)],H.prototype,"_statsToggle",void 0),(0,F.Cg)([(0,G.x4W)("spellsToggle"),(0,F.Sn)("design:type",j.l)],H.prototype,"_spellsToggle",void 0),(0,F.Cg)([(0,G.x4W)("aboutPanel"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_aboutPanel",void 0),(0,F.Cg)([(0,G.x4W)("statsPanel"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_statsPanel",void 0),(0,F.Cg)([(0,G.x4W)("spellsPanel"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_spellsPanel",void 0),(0,F.Cg)([(0,G.x4W)("learnMorePanel"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_learnMorePanel",void 0),(0,F.Cg)([(0,G.x4W)("tabsGridLayout"),(0,F.Sn)("design:type",G.JTA)],H.prototype,"_tabsGridLayout",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.nKb)("elementIconAtlas"),(0,F.Sn)("design:type",String)],H.prototype,"_elementIconAtlas",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.nKb)("elementIconFrameWater"),(0,F.Sn)("design:type",String)],H.prototype,"_elementIconFrameWater",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.nKb)("elementIconFrameFire"),(0,F.Sn)("design:type",String)],H.prototype,"_elementIconFrameFire",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.nKb)("elementIconFrameStorm"),(0,F.Sn)("design:type",String)],H.prototype,"_elementIconFrameStorm",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.nKb)("elementIconFrameEarth"),(0,F.Sn)("design:type",String)],H.prototype,"_elementIconFrameEarth",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.nKb)("elementIconFrameIce"),(0,F.Sn)("design:type",String)],H.prototype,"_elementIconFrameIce",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.nKb)("lockedIconAtlas"),(0,F.Sn)("design:type",String)],H.prototype,"_lockedIconAtlas",void 0),(0,F.Cg)([(0,G.W_S)(),(0,G.nKb)("lockedIconFrame"),(0,F.Sn)("design:type",String)],H.prototype,"_lockedIconFrame",void 0),(0,F.Cg)([(0,G.x4W)("fillBarAttackAndHearts"),(0,F.Sn)("design:type",$.s)],H.prototype,"_fillBarAttackAndHearts",void 0),(0,F.Cg)([(0,G.x4W)("fillBarHearts"),(0,F.Sn)("design:type",$.s)],H.prototype,"_fillBarHearts",void 0),(0,F.Cg)([(0,G.x4W)("textAttack"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_textAttack",void 0),(0,F.Cg)([(0,G.x4W)("textHearts"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_textHearts",void 0),(0,F.Cg)([(0,G.x4W)("textElement"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_textElement",void 0),(0,F.Cg)([(0,G.x4W)("iconContainerElement"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_iconContainerElement",void 0),(0,F.Cg)([(0,G.x4W)("textEvolveLevel"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_textEvolveLevel",void 0),(0,F.Cg)([(0,G.x4W)("rowObjectEvolveLevel"),(0,F.Sn)("design:type",G._mx)],H.prototype,"_rowObjectEvolveLevel",void 0),(0,F.Cg)([(0,G.x4W)("textSpellsTitles"),(0,F.Sn)("design:type",Array)],H.prototype,"_textSpellsTitles",void 0),(0,F.Cg)([(0,G.x4W)("textSpellsLevel"),(0,F.Sn)("design:type",Array)],H.prototype,"_textSpellsLevel",void 0),(0,F.Cg)([(0,G.x4W)("textSpellsRange"),(0,F.Sn)("design:type",Array)],H.prototype,"_textSpellsRange",void 0),(0,F.Cg)([(0,G.x4W)("gridSpellsLevel"),(0,F.Sn)("design:type",Array)],H.prototype,"_gridSpellsLevel",void 0),(0,F.Cg)([(0,G.x4W)("gridSpellsRange"),(0,F.Sn)("design:type",Array)],H.prototype,"_gridSpellsRange",void 0),(0,F.Cg)([(0,G.x4W)("gridSpellsLevelOff"),(0,F.Sn)("design:type",Array)],H.prototype,"_gridSpellsLevelOff",void 0),(0,F.Cg)([(0,G.x4W)("gridSpellsRangeOff"),(0,F.Sn)("design:type",Array)],H.prototype,"_gridSpellsRangeOff",void 0),(0,F.Cg)([(0,G.x4W)("iconContainerSpells"),(0,F.Sn)("design:type",Array)],H.prototype,"_iconContainerSpells",void 0),(0,F.Cg)([(0,G.x4W)("textAbout"),(0,F.Sn)("design:type",G.EYj)],H.prototype,"_textAbout",void 0),H=(0,F.Cg)([(0,G.EVk)("PetStatsPanelPrefab")],H)},38097:(k,B,U)=>{"use strict";U.d(B,{O:()=>bt});var F=U(8674),G=U(62459),j=U(99625),$=U(35120),H=U(60881),V=U(49237),W=U(54422),q=U(43754),K=U(19592),z=U(72772),Y=U(91020),Q=U(11848),X=U(52894),Z=U(77065),J=U(65050),tt=U(96810),et=U(41674),it=U(215),st=U(46784),nt=U(13956),at=U(80060),rt=U(87821),ot=U(53661),ht=U(16847),ct=U(12696),dt=U(56461),lt=U(74951),ut=U(56345);const ft="Merge";class bt extends dt.A{get petDataProvider(){return this._petDataProvider}constructor(k,B,U,F,j){super(k,B,200,{},[]),this.prefabRoot=null,this._headerComponent=null,this._gameObject=null,this._headerGameObject=null,this._petDataProvider=null,this._petsMenuSetupCancelablePromises=[],this._levelPurchase=null,this._currentDataSchema=null,this.onLoaded=new G.HN0,this.isModal=!1,this.background.visible=!1,j&&(this._headerComponent=j),this._contentLayer=F,this._currentDataSchema=U}create(){super.create(),this._segment.featureCommon.sendInterfaceEvent({interfaceName:st.B.PetsWindow,interfaceType:et.Wm.Window,originType:et.$N.ButtonClick,originID:"pet_info_pop_up",instanceType:J.N.UI}),this._prefabLoader=$.q.instance.prodigy.gameContainer.get("d0e-64fd");const k=at.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,j.l.Pets_YourPetMenu,{PET_RESCUE_CREATURE_DATA:this._currentDataSchema,[ot.hi.YourPetPanelPetData]:this._currentDataSchema,[ot.oD.PetGearFtueOverlayEnabled]:z.I.shouldShowPetGearTutorialCached,[ot.hi.YourPetPanelMergeOnClick]:()=>this.showPetMergeSubMenu()});this._petsMenuSetupCancelablePromises.push(k),k.then((B=>{k.cancelled||this.setUpMenuPrefab(B)})).catch(G.RQr.createHandler("Unable to load Pets - Your Pet Menu prefab"));const B=at.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,j.l.Pets_YourPetMenuHeader,{});this._petsMenuSetupCancelablePromises.push(B),B.then((k=>{B.cancelled||this.setUpMenuHeaderPrefab(k)})).catch(G.RQr.createHandler("Unable to load Pets - Your Pet Menu Header prefab"))}setUpMenuPrefab(k){var B,U,F,j;k&&!this.destroyed&&(this._gameObject=k,this._contentLayer.addChild(this._gameObject.findComponentInChildren(G.y4o).getRootContainer()),this._petDataProvider=this._gameObject.findComponentInChildren(lt.z),null===(B=this._petDataProvider)||void 0===B||B.onLetPetGo.add(this.letPetGoConfirm,this),null===(U=this._petDataProvider)||void 0===U||U.onAddToTeam.add(this.addPetToTeamContinue,this),null===(F=this._petDataProvider)||void 0===F||F.onEvolvePet.add(this.onPetEvolved,this),this._levelPurchase=this._gameObject.findComponentInChildren(ut.R),null===(j=this._levelPurchase)||void 0===j||j.onLevelUpPurchased.add(this.onPetLevelledUp,this),this.setUpGearSubMenu(),$.q.instance.prodigy.audio.playSFX(66,"open-pet-submenu"),this.bindCoinDisplayToLevelPurchase(),Q.N.shouldShowPetMergeTutorial&&this.displayPetMergeFTUE(),this.onLoaded.dispatch())}setUpMenuHeaderPrefab(k){var B;if(!k||this.destroyed)return;this._headerGameObject=k,this._headerComponent&&(this._headerComponent.backToYourTeamButton.onClick.add(this.close,this),this._headerComponent.backToYourTeamButton.GameObject.addComponent(W.E).initialize(H.D.ESC,(()=>{var k;z.I.shouldShowPetGearTutorialCached||(null===(k=this._headerComponent)||void 0===k||k.onSubMenuEsc.dispatch(this),this.close())})));const U=this._headerGameObject.findComponentInChildren(G.y4o);null===(B=this.prefabRoot)||void 0===B||B.addChild(U.getRootContainer()),this.bindCoinDisplayToLevelPurchase()}bindCoinDisplayToLevelPurchase(){var k;if(!this._headerGameObject||!this._gameObject)return;const B=this._headerGameObject.findComponentInChildren(ct.L),U=this._gameObject.findComponentInChildren(ut.R);null==U||U.onLevelUpPurchased.add(B.animateNewCoinCount,B);const F=this._hardCurrencyDataProvider.getBalance(27),G=this._headerGameObject.findComponentInChildren(ht.n),j=this._headerGameObject.findComponentInChildren(Z.B);null==G||G.updateAmount(F),j&&(j.initialNumber=F,null===(k=this._hardCurrencyDataProvider)||void 0===k||k.onBalanceChanged.add((()=>{j.targetNumber=this._hardCurrencyDataProvider.getBalance(27),j.startCounter()}),this));const $=this._gameObject.findComponentInChildren(X.u);null==$||$.onMenuClose.add((()=>{const k=this._hardCurrencyDataProvider.getBalance(27);null==G||G.updateAmount(k),j.initialNumber=k}))}setUpGearSubMenu(){var k,B;if(!this._gameObject)return void G.VyI.log("[YourPetMenu]: Unable to set up gear sub menu, game object is null",G.$bb.Error);const U=this._gameObject.findComponentInChildren(G.bE_),F=U.Container.get("PetHatSlotContainer"),j=U.Container.get("PetRelicSlotContainer");null===(k=null==F?void 0:F.GameObject.findComponentInChildren(V.$))||void 0===k||k.onEnabledClick.add((()=>this.launchSubMenu("petHat"))),null===(B=null==j?void 0:j.GameObject.findComponentInChildren(V.$))||void 0===B||B.onEnabledClick.add((()=>this.launchSubMenu("petRelic"))),z.I.shouldShowPetGearTutorialCached&&this.displayPetGearFtue().catch(G.RQr.createHandler("[YourPetMenu] Error displaying pet gear ftue"))}displayPetGearFtue(){return(0,F.sH)(this,void 0,void 0,(function*(){if(!this._gameObject)return void G.VyI.log("[YourPetMenu]: Unable to display pet gear ftue, game object is null",G.$bb.Error);$.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:"Pet_gear_tutorial",funnelType:"tutorial",stepName:tt.l.PetGearPetMenu},{step_index:3});const k=(yield z.I.getEquippablePetGears()).sort(((k,B)=>K.R[k.data.asset.type]-K.R[B.data.asset.type])),B=this._gameObject.findComponentInChildren(G.bE_),U=B.Container.get(ot.oD.PetGearFtueEnabledInputTransform),F=B.Container.get(Y.t.GEAR_TYPE_TO_SLOT_IDENTIFIER_MAP[k[0].data.asset.type]).GameObject.findComponent(G.XVE);U.GameObject.parent.setLayer("newHandLayer",!0),U.setPosition(F.worldPosition.x-F.widthDelta*F.pivot.x,F.worldPosition.y-F.heightDelta*F.pivot.y),U.fullWidth=F.fullWidth,U.fullHeight=F.fullHeight}))}displayPetMergeFTUE(){this.showPetMergeSubMenu()}letPetGoConfirm(){var k;null===(k=this._headerComponent)||void 0===k||k.onPetRelease.dispatch(this._currentDataSchema),this._headerComponent&&(this._headerComponent.startAutoTooltip($.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("PET_WAS_LET_GO")),this._headerComponent.onLetPetGo.dispatch()),this.close()}addPetToTeamContinue(){this._headerComponent&&this._headerComponent.onAddPetToTeam.dispatch(this._currentDataSchema),this.close()}onPetEvolved(){this._headerComponent&&this._headerComponent.onPetUpgraded.dispatch()}onPetLevelledUp(){this._headerComponent&&this._headerComponent.onPetUpgraded.dispatch()}showPetMergeSubMenu(){this.launchSubMenu(ft)}onPetMergeSubMenuClosed(){this.closeSubMenu()}launchSubMenu(k){var B;this._gameObject?this._headerComponent?(super.launchSubMenu(k),this.pauseMenu(),this._headerComponent.closeButton.GameObject.active=!1,this._headerComponent.yourTeamToggle.GameObject.parent.active=!1,k===ft?($.q.instance.prodigy.open.petMergeMenu(this._currentDataSchema,et.k.PetBook,(()=>{this.onPetMergeSubMenuClosed()})),this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(it.Eu.PetMergeSelectMerge)):(this._gameObject.active=!1,this._headerGameObject.active=!1,this._headerComponent.backToYourTeamButton.GameObject.active=!1,this._headerComponent.backToYourPetButton.GameObject.active=!0,$.q.instance.prodigy.open.yourPetGear(this._currentDataSchema,k,this._contentLayer,this._headerComponent)),null===(B=this._headerComponent.backToYourTeamButton.GameObject.findComponent(W.E))||void 0===B||B.destroy(),this._headerComponent.backToYourPetButton.onClick.add(this.closeSubMenu,this),this._headerComponent.onSubMenuClose.add(this.closeSubMenu,this),this._headerComponent.onSubMenuEsc.add(this.closeSubMenu,this)):G.VyI.log("[YourPetMenu]: Unable to launch sub menu, header component is not set up",G.$bb.Error):G.VyI.log("[YourPetMenu]: Unable to launch sub menu, game object is null",G.$bb.Error)}closeSubMenu(){return(0,F.sH)(this,void 0,void 0,(function*(){this.resumeMenu(),this.leaveSubMenu(),yield z.I.updateCachedPetGearTutorialFlag(),this._headerComponent&&(this._headerComponent.backToYourTeamButton.GameObject.active=!0,this._headerComponent.backToYourPetButton.GameObject.active=!1,this._headerComponent.backToYourPetButton.onClick.remove(this.closeSubMenu,this),this._headerComponent.onSubMenuClose.remove(this.closeSubMenu,this),this._headerComponent.onSubMenuEsc.remove(this.closeSubMenu,this),this._headerComponent.backToYourTeamButton.GameObject.addComponent(W.E).initialize(H.D.ESC,(()=>{var k;z.I.shouldShowPetGearTutorialCached||(null===(k=this._headerComponent)||void 0===k||k.onSubMenuClose.dispatch(this),this.close())}))),this._headerGameObject&&(this._headerGameObject.active=!0),this._gameObject&&(this._gameObject.active=!0,at.d.updateInjectedValues(this._gameObject,{PET_RESCUE_CREATURE_DATA:this._currentDataSchema,[ot.oD.PetGearFtueOverlayEnabled]:z.I.shouldShowPetGearTutorialCached}),this._gameObject.findComponentInChildren(lt.z).bindContext(),this._gameObject.findComponentInChildren(rt.o).bindContext())}))}cancelPetMenuLoading(){this._petsMenuSetupCancelablePromises.forEach((k=>k.cancel())),this.close()}destroy(){var k,B,U,F,G;this.onLoaded.dispose(),null===(k=this._hardCurrencyDataProvider)||void 0===k||k.onBalanceChanged.removeAll(this),this._petsMenuSetupCancelablePromises.forEach((k=>k.cancel())),this._petsMenuSetupCancelablePromises.length=0,this._headerComponent&&(this._headerComponent.backToYourPetButton.onClick.dispose(),this._headerComponent.onSubMenuClose.dispose(),this._headerComponent.onSubMenuEsc.dispose(),this._headerComponent.backToYourTeamButton.onClick.dispose(),null===(U=null===(B=this._headerComponent.backToYourTeamButton.GameObject)||void 0===B?void 0:B.findComponent(W.E))||void 0===U||U.destroy()),null===(F=this._gameObject)||void 0===F||F.destroy(),null===(G=this._headerGameObject)||void 0===G||G.destroy(),this._currentDataSchema=null,super.destroy()}}(0,F.Cg)([(0,nt.b)("5c7-e02d"),(0,F.Sn)("design:type",q.W)],bt.prototype,"_hardCurrencyDataProvider",void 0)},52142:(k,B,U)=>{"use strict";U.d(B,{Y:()=>$t});var F,G=U(8674),j=U(62459),$=U(88022),H=U(99625),V=U(35120),W=U(49237),q=U(72772),K=U(16383),z=U(11848),Y=U(73797),Q=U(96810),X=U(215),Z=U(80060),J=U(53661),tt=U(60881),et=U(54422),it=U(12420),st=U(11472),nt=U(5269),at=U(77938),rt=U(28152),ot=U(65231),ht=U(29834);let ct=F=class extends ot.s{hideContainer(){this._mainContainer?this._mainContainer.active=!1:j.VyI.log("EmptyPetCardComponent: Main container not set.",j.$bb.Warning)}resetToDefaultState(){this._mainContainer?this._animator?(this._mainContainer.active=!0,this._animator.GameObject.active=!1):j.VyI.log("EmptyPetCardComponent: Animator not set.",j.$bb.Warning):j.VyI.log("EmptyPetCardComponent: Main container not set.",j.$bb.Warning)}playUnlockAnimationAfterDelay(k){return(0,G.sH)(this,void 0,void 0,(function*(){this._animator?(yield j.Egh.timeout(k),this._animator.GameObject.active=!0,this._animator.playAnimation(F.UNLOCK_ANIMATION_STRING,!1,!0)):j.VyI.log("EmptyPetCardComponent: Animator not set.",j.$bb.Warning)}))}};ct.UNLOCK_ANIMATION_STRING="unlock-text",(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ct.prototype,"_mainContainer",void 0),(0,G.Cg)([(0,j.MnK)(ht.j),(0,G.Sn)("design:type",ht.j)],ct.prototype,"_animator",void 0),ct=F=(0,G.Cg)([(0,j.EVk)("EmptyPetCard",rt.Y.uiPet)],ct);var dt=U(16815),lt=U(90633),ut=U(22023),ft=U(89400);class bt extends ft.B{constructor(){super(...arguments),this._data=null}get data(){return this._data}updateContentView(k){this._data=k,this.onClick.add(k.callback)}resetData(){this.onClick.removeAll(),this._data=null}destroy(){this.onClick.dispose(),this._data=null,super.destroy()}}var pt=U(35189),vt=U(51972),gt=U(48199),mt=U(41674),yt=U(46784),_t=U(68370);class Et{constructor(k,B,U){this._isHighlightOn=!1,this._alphaEnabledOnDefaultCard=!1,this._alphaEnabledOnCurrentTeamPet=!1,this.onYourPetAdd=new j.HN0,this.onYourPetInfo=new j.HN0,this.onYourPetRelease=new j.HN0,this.onYourPetClicked=new j.HN0,this.onYourPetHighlightClicked=new j.HN0,this.onCellStateChanged=new j.HN0,this.clearState=new j.HN0,this.clearPetSelection=new j.HN0,this.onStackDrawerOpened=new j.HN0,this._tweenDrawerInSignal=new j.HN0,this._tweenDrawerOutSignal=new j.HN0,this._resetScrollSignal=new j.HN0,this._parentContainer=k,this._tooltip=B,this._scrollView=U,this._tooltipStartX=U.GameObject.legacyTransform.x,this._tooltipStartY=U.GameObject.legacyTransform.y;const F=V.q.instance.prodigy;this._segment=F.gameContainer.get("c47-20b6"),this._tooltip.displayTooltip({bodyText:"",arrowDirection:vt.i.RIGHT,arrowYRelPos:.5},null,!1,[()=>{this.onYourPetInfo.dispatch(this._tooltip.currentCreatureData),this.hideTooltip()},()=>{this._tooltip.toolTipComponent.GameObject.findComponentInChildren(j.JTA,!0).GameObject.children[0].findComponent(W.$).isStateLocked()?(F.open.overlayToolTip(gt.A.TOOLTIP_MANUAL,{bodyText:F.gameContainer.get(j.$Bt.LocalizationService).getText("PET_ALREADY_ON_TEAM"),xPosition:this._tooltip.toolTipComponent.GameObject.legacyTransform.x-74,yPosition:this._tooltip.toolTipComponent.GameObject.legacyTransform.y-79}),F.audio.playSFX(67,"button-disabled"),this.highlightAll(!1)):this.onYourPetAdd.dispatch(this._tooltip.currentCreatureData),this.hideTooltip()}]),this._tooltipParent=new j._mx,this._tooltipParent.layer="tooltip",this._tooltipParent.addComponent(j.dLy),this._tooltip.toolTipComponent.GameObject.parent=this._tooltipParent,_t.b.make(this._tooltipParent,this._tooltip.toolTipComponent.GameObject.legacyTransform)}initPetCardCell(k,B){const U=k.findComponentInChildren(dt.Z,!0),F=B?at.t.getItem("pet",B[0].ID):null;U.setPetData(B,F),U.updateDisplay(),k.findComponentInChildren(pt.e).SecondState=this._isHighlightOn,this.updatePetCardDisabledState(k);const G=k.findComponentInChildren(bt);G.onOver.add((k=>U.onInputOver.dispatch(null,k))),G.onOut.add((k=>U.onInputOut.dispatch(null,k)));const j={creatureData:B,callback:()=>{const F=k.findComponentInChildren(pt.e);if(U.getDisabledState())if(F.SecondState){const k=this._tooltipStartX+G.GameObject.legacyTransform.x+G.GameObject.legacyTransform.width-74,B=this._tooltipStartY+G.GameObject.legacyTransform.y+5+this._scrollView.contentView.legacyTransform.y;this.showAlreadyOnTeamTooltip(k,B)}else this.clearState.dispatch();else if(F.SecondState&&this._tooltip.isActive())this.highlightAll(!1);else if(F.SecondState&&!this._tooltip.isActive())this.onYourPetHighlightClicked.dispatch(B[0]);else{const k=this._tooltipStartX+G.GameObject.legacyTransform.x+20,F=this._tooltipStartY+G.GameObject.legacyTransform.y+G.GameObject.legacyTransform.height/2+this._scrollView.contentView.legacyTransform.y;this.showCreatureContextTooltip(k,F,B[0]),U.setSelectable(!0)}}};G.updateContentView(j)}resetPetCardCell(k){const B=k.findComponentInChildren(bt);B&&B.resetData()}highlightAll(k,B=!0){this._isHighlightOn=k,this.onCellStateChanged.dispatch((k=>{k.findComponentInChildren(pt.e,!0).SecondState=this._isHighlightOn})),B&&this.hideTooltip()}setAlphaState(k,B){this._alphaEnabledOnDefaultCard=k,this._alphaEnabledOnCurrentTeamPet=B,this.onCellStateChanged.dispatch((k=>{this.updatePetCardDisabledState(k)}))}updatePetCardDisabledState(k){const B=k.findComponentInChildren(dt.Z,!0);(this._alphaEnabledOnDefaultCard&&!k.findComponentInChildren(pt.e,!0).SecondState||this._alphaEnabledOnCurrentTeamPet&&B.isOnTeam())&&1===B.creatureData.length?B.setDisabledState(!0):B.setDisabledState(!1)}showCreatureContextTooltip(k,B,U){this._segment.featureCommon.sendButtonEvent({buttonName:"pet",destinationName:"pet_info_pop_up",interfaceType:mt.Wm.Popup,interfaceName:yt.B.PetsWindow,saveClickInfo:"pet_info_pop_up"}),this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(X.Eu.PetMergeSelectPet),this.onYourPetClicked.dispatch(),this.onYourPetInfo.dispatch(U),this.highlightAll(!1,!1)}showAlreadyOnTeamTooltip(k,B){const U=V.q.instance.prodigy;U.audio.playSFX(67,"button-disabled");const F=U.open.overlayToolTip(gt.A.TOOLTIP_MANUAL,{bodyText:U.gameContainer.get(j.$Bt.LocalizationService).getText("PET_ALREADY_ON_TEAM"),xPosition:Math.floor(k),yPosition:Math.floor(B)});F.onCreate.addOnce((()=>{F.ui.parent=this._tooltipParent}))}hideTooltip(){this._tooltip.hideTooltip()}cleanup(){this.onYourPetAdd.dispose(),this.onYourPetInfo.dispose(),this.onYourPetRelease.dispose(),this.onYourPetClicked.dispose(),this.onCellStateChanged.dispose(),this.clearState.dispose(),this.clearPetSelection.dispose(),this.onStackDrawerOpened.dispose(),this.onYourPetHighlightClicked.dispose(),this._tweenDrawerInSignal.dispose(),this._tweenDrawerOutSignal.dispose(),this._resetScrollSignal.dispose(),this._tooltip=null,this._tooltipParent.destroy()}}class wt{get toolTipComponent(){return this._toolTipComponent}get currentCreatureData(){return this._currentCreatureData}set dismissCallback(k){this._tooltipCancelAction=k}constructor(k,B){this._tooltipCancelAction=null,this._currentCreatureData=null,this.onTooltipDisplayed=new j.HN0,this._parentGameObject=k,this._prefabID=B}initCloseArea(k,B){this._tooltipButtonContainer=k,this._tooltipButtonContainer.findComponent(W.$).onClick.add(this.closeAreaClicked,this),this._tooltipButtonContainer.active=!1,B&&(this._tooltipCancelAction=B),this._tooltipButtonContainer.findComponent(W.$).inputEnabled=!1}displayTooltip(k,B,U=!0,F){this._currentCreatureData=B,this._toolTipComponent=gt.A.displayToolTipButtonGrid(this._toolTipComponent,this._parentGameObject,k,this._prefabID,U,F),this._tooltipButtonContainer.active=U,U&&this.onTooltipDisplayed.dispatch()}hideTooltip(){this._tooltipButtonContainer.active=!1,this._toolTipComponent.close(),this._currentCreatureData=null}closeAreaClicked(){this.hideTooltip(),this._tooltipCancelAction&&this._tooltipCancelAction()}isActive(){return!!this._toolTipComponent&&this._toolTipComponent.GameObject.active}cleanup(){this._tooltipButtonContainer&&(this._tooltipButtonContainer.findComponent(W.$).onClick.dispose(),this._tooltipButtonContainer=null),this._tooltipCancelAction=null,this._currentCreatureData=null,this.onTooltipDisplayed.dispose()}}class Tt{get panelGameObject(){return this._panelGameObject}get cardStateManager(){return this._cardStateManager}constructor(k,B,U){this._allocatedPetCardPoolSize=12,this._allocatedEmptySlotPoolSize=12,this._maxActiveSize=0,this._petScrollList=[],this._panelGameObject=null,this._scrollView=null,this._scrollBar=null,this._gridLayout=null,this._scrollUpdater=new j._mx,this._trashContainerGO=null,this._noPetsMessageGameObject=null,this._upInputObject=new j._mx,this._downInputObject=new j._mx,this._startIndexOfCurrentRange=0,this._cachedContentViewLastY=0,this._nextContentViewY=0,this._prevContentViewY=0,this._minContentViewY=180,this._maxRowIndex=0,this._isLoading=!0,this.tooltipContainer=null,this._numEmptySlotsToAnimateOnNextUpdate=0,this._inputScrollLocked=!1,this._player=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;const F=V.q.instance.prodigy.gameContainer.get("d0e-64fd");this._panelGameObject=F.loadFromGUID(H.l.Pets_OwnedPetsScrollviewPanel),k.addChild(this._panelGameObject.legacyTransform.group),this._gridLayout=this._panelGameObject.findComponentInChildren(j.JTA),this._scrollView=this._panelGameObject.findComponentInChildren(st.B),this._scrollBar=this._panelGameObject.findComponentInChildren(it.$),this._trashContainerGO=new j._mx,this._trashContainerGO.addComponent(j.K16),this._panelGameObject.addChild(this._trashContainerGO),this._trashContainerGO.legacyTransform.x=0,this._trashContainerGO.legacyTransform.y=730,this._petCardPool=new j.iyL(this.createPetCard.bind(this),null,this.recyclePetCard.bind(this)),this._petCardPool.allocate(this._allocatedPetCardPoolSize),this._emptySlotPool=new j.iyL(this.createEmptySlotCard.bind(this),null,this.recycleEmptySlotCard.bind(this)),this._emptySlotPool.allocate(this._allocatedEmptySlotPoolSize),this._maxActiveSize=this._allocatedPetCardPoolSize,this._startIndexOfCurrentRange=0,this._nextContentViewY=this.calcNextYThreshold(),this._prevContentViewY=this.calcPrevYThreshold(),this._noPetsMessageGameObject=this._panelGameObject.findComponentInChildren(j.EYj).GameObject.parent,this._noPetsMessageGameObject.active=!1,this.tooltipParent=new j._mx,this.tooltipParent.addComponent(j.K16);const G=H.l.Pets_ButtonTooltipOwnedPanel;this.tooltipContainer=new wt(this.tooltipParent,G),this.tooltipContainer.initCloseArea(this._panelGameObject.findComponentInChildren(W.$).GameObject),this._cardStateManager=new Et(k,this.tooltipContainer,this._scrollView),this._cardStateManager.onCellStateChanged.add(this.cellStateChangedHandler,this),this.tooltipContainer.dismissCallback=()=>{this._cardStateManager.highlightAll(!1)},this._scrollUpdater.update=()=>{this.update()},this._panelGameObject.addChild(this._scrollUpdater),this.setPetList(U),this.cardStateManager.onYourPetHighlightClicked.add(B.sendData,B),this.cardStateManager.clearState.add(B.clearStates,B),this.cardStateManager.clearPetSelection.add(B.clearPetSelection,B),this.cardStateManager.onYourPetAdd.add(B.dispatchAddSignal,B),this.cardStateManager.onYourPetClicked.add(B.reportClick,B),this._scrollBar.onInputUp.add(this.scrollBarClickedHandler,this),this._panelGameObject.addChild(this._upInputObject),this._panelGameObject.addChild(this._downInputObject),this._upInputObject.addComponent(et.E).initialize(tt.D.UP,this.onKeyboardUp.bind(this),!0),this._downInputObject.addComponent(et.E).initialize(tt.D.DOWN,this.onKeyboardDown.bind(this),!0)}onKeyboardUp(){!this._inputScrollLocked&&this._panelGameObject.active&&this._scrollView.scrollByPixels(15,nt.H.Vertical)}onKeyboardDown(){!this._inputScrollLocked&&this._panelGameObject.active&&this._scrollView.scrollByPixels(-15,nt.H.Vertical)}setInputScrollEnabled(k=!0){this._inputScrollLocked=k,this._scrollView.allowMouseWheel=k,this._scrollView.allowTouch=k}createPetCard(){const k=V.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromGUID(H.l.Pets_OwnedPetCardwithmergerank);return k.addComponent(bt),k}createEmptySlotCard(){return V.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromGUID(H.l.Pets_EmptySlotCard)}recyclePetCard(k){k.findComponentInChildren(dt.Z,!0).clearCard(),k.legacyTransform.x=0,k.legacyTransform.y=0,this._trashContainerGO.addChild(k)}recycleEmptySlotCard(k){k.legacyTransform.x=0,k.legacyTransform.y=0,this._trashContainerGO.addChild(k)}setPetList(k,B=0){for(this._isLoading=!0,this.scrollToPercent(0),this._startIndexOfCurrentRange=0,this._nextContentViewY=this.calcNextYThreshold(),this._prevContentViewY=this.calcPrevYThreshold(),this._numEmptySlotsToAnimateOnNextUpdate=B;!this._gridLayout.isEmpty();)this.removeCard();if(k){const B=ut.P8.sortPetList(k).map((k=>[k]));this._petScrollList=B.map((k=>({petData:k,addCardMethod:this.addPetCard.bind(this,k),removeCardMethod:this.onPetCardRemoved.bind(this),gridLayoutIndex:-1})))}this._maxRowIndex=Math.ceil((this._petScrollList.length-this._maxActiveSize)/this._gridLayout.fixedColumnCount);const U=Math.ceil(this._petScrollList.length/this._gridLayout.fixedColumnCount);this._scrollView.contentView.legacyTransform.dimensionPlaceholder.height=this._gridLayout.yPositionOffset+U*this._gridLayout.rowSpacing,this._noPetsMessageGameObject.active=this._petScrollList.length<=0,this.addActivePetCardRange()}addCardFromScrollList(k,B=!1){this._petScrollList[k].addCardMethod(B),B&&this._petScrollList.forEach((k=>{k.gridLayoutIndex>=0&&(k.gridLayoutIndex+=1)})),this._petScrollList[k].gridLayoutIndex=B?0:this._gridLayout.GameObject.children.length-1}addActivePetCardRange(){for(let k=0;k=this._maxActiveSize);k++)this.addCardFromScrollList(k);this._gridLayout.indexOffset=this._startIndexOfCurrentRange,this._gridLayout.updateAll(!1),this._isLoading=!1}hideFtueGuideHands(){var k;(null===(k=this._ftuePetCard)||void 0===k?void 0:k.ftueGuideHand)&&(this._ftuePetCard.ftueGuideHand.active=!1)}addPetCard(k,B=!1){const U=this._petCardPool.getObject().findComponentInChildren(dt.Z,!0);this._cardStateManager.initPetCardCell(U.GameObject,k),B?this._gridLayout.GameObject.addChildAt(U.GameObject,0):this._gridLayout.GameObject.addChild(U.GameObject),!q.I.shouldShowPetGearTutorialCached&&this.petEligibleForUpgradeTutorial(k)&&(this._ftuePetCard=U,this._ftuePetCard.ftueGuideHand.active=!0)}petEligibleForUpgradeTutorial(k){return!V.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(lt.B.FEATURE_PET_UPGRADE_FTUE,lt.B.BREADCRUMB_LEVELLED_UP_PET_FIRST_TIME)&&!this._ftuePetCard&&k.some((k=>k.levelk.gridLayoutIndex===U));G&&(G.gridLayoutIndex=-1,G.removeCardMethod(F),k&&this._petScrollList.forEach((k=>{k.gridLayoutIndex>=1&&(k.gridLayoutIndex-=1)})))}onPetCardRemoved(k){this._cardStateManager.resetPetCardCell(k),this._petCardPool.recycleObject(k)}onEmptySlotRemoved(k){this._emptySlotPool.recycleObject(k)}updateAllActiveCards(){this._petCardPool.aliveList.forEach((k=>{k.findComponentInChildren(dt.Z,!0).updateDisplay()}))}cellStateChangedHandler(k){this._petCardPool.aliveList.forEach(k)}scrollToPercent(k){this._scrollView.scrollToPercent(k,nt.H.Vertical),this.tooltipContainer.isActive()&&this._cardStateManager.highlightAll(!1)}scrollToPet(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=!0){const U=this._petScrollList.indexOf(k);if(U<0)return void j.VyI.log("[OwnedPetsPanel.scrollToPet] Pet scroll card not found",j.$bb.Warning,k);const F=Math.floor(U/this._gridLayout.fixedColumnCount)/Math.ceil(this._petScrollList.length/this._gridLayout.fixedColumnCount);this._scrollView.update(),B&&(yield this._scrollView.scrollToPercentTween(F,nt.H.Vertical,300)),this._scrollView.scrollToPercent(F,nt.H.Vertical)}))}getFirstGearEnabledPet(){return this._petScrollList.find((k=>{var B;return(null===(B=at.t.getItem("pet",k.petData[0].ID).data.gearEquipSlots)||void 0===B?void 0:B.length)>0}))}findCardForPet(k){return this._petScrollList.find((B=>B.petData[0].ID===k.ID))}scrollBarClickedHandler(){this.tooltipContainer.isActive()&&this._cardStateManager.highlightAll(!1)}update(){if(this._scrollView.contentView.legacyTransform.y!==this._cachedContentViewLastY&&!this._isLoading){this._cachedContentViewLastY=this._scrollView.contentView.legacyTransform.y;const k=Math.abs(this._cachedContentViewLastY);if(k>this._nextContentViewY)if(this._isLoading=!0,this._startIndexOfCurrentRange+this._maxActiveSize>=this._petScrollList.length)this._nextContentViewY=this._scrollView.contentView.legacyTransform.height,this._prevContentViewY=this.calcPrevYThreshold(),this._isLoading=!1;else{let B=k-this._minContentViewY;B<0&&(B=0);let U=Math.ceil(B/this._gridLayout.rowSpacing);U>this._maxRowIndex&&(U=this._maxRowIndex);const F=U*this._gridLayout.fixedColumnCount;let G=F-this._startIndexOfCurrentRange;if(this._startIndexOfCurrentRange=F,this._nextContentViewY=this.calcNextYThreshold(),this._prevContentViewY=this.calcPrevYThreshold(),G>0){G>this._maxActiveSize&&(G=this._maxActiveSize);for(let B=0;Bthis._maxRowIndex&&(U=this._maxRowIndex);const F=U*this._gridLayout.fixedColumnCount;let G=this._gridLayout.GameObject.children.length%this._gridLayout.fixedColumnCount;0===G&&(G=this._gridLayout.fixedColumnCount);let j=this._startIndexOfCurrentRange-F-this._gridLayout.fixedColumnCount;j>this._maxActiveSize-this._gridLayout.fixedColumnCount&&(j=this._maxActiveSize-this._gridLayout.fixedColumnCount);const $=j+G;for(let k=0;k<$;k++)this.removeCard();let H=this._startIndexOfCurrentRange-F;H>this._maxActiveSize&&(H=this._maxActiveSize),this._startIndexOfCurrentRange=F;for(let k=H-1;k>=0;k--)this._startIndexOfCurrentRange+k0&&this.playNewEmptySlotAnimations()}calcNextYThreshold(){return this._minContentViewY+Math.floor(this._startIndexOfCurrentRange/this._gridLayout.fixedColumnCount)*this._gridLayout.rowSpacing}calcPrevYThreshold(){if(0===this._startIndexOfCurrentRange)return 0;return this._minContentViewY+Math.floor((this._startIndexOfCurrentRange-1)/this._gridLayout.fixedColumnCount)*this._gridLayout.rowSpacing}pause(){this._cardStateManager.highlightAll(!1),this._cardStateManager.setAlphaState(!1,!1),this._panelGameObject.active=!1}resume(){var k;this._panelGameObject.active=!0,null===(k=this._scrollView)||void 0===k||k.updateScrollEnabled(nt.H.Vertical)}destroyPanel(){const k=k=>{k.findComponentInChildren(dt.Z,!0).cleanupCacheAsBitmap()};this._petCardPool.aliveList.forEach(k),this._petCardPool.deadList.forEach(k),this._petCardPool.destroy(!0),this._emptySlotPool.destroy(!0),this._upInputObject.destroy(),this._downInputObject.destroy(),this._cardStateManager.cleanup(),this._cardStateManager.onCellStateChanged.remove(this.cellStateChangedHandler,this),this.tooltipContainer.cleanup(),this._scrollBar.onInputUp.remove(this.scrollBarClickedHandler,this),this._scrollBar.destroy(),this._scrollView.destroy(),this._cardStateManager=null}playNewEmptySlotAnimations(){const k=this._gridLayout.GameObject.children;if(k.length>this._numEmptySlotsToAnimateOnNextUpdate){k.slice(-this._numEmptySlotsToAnimateOnNextUpdate).forEach(((k,B)=>{const U=k.findComponentInChildren(ct,!0);U&&(U.hideContainer(),U.playUnlockAnimationAfterDelay((B+1)*Tt.EMPTY_PET_SLOTS_ANIMATION_STAGGER_TIME))}))}this._numEmptySlotsToAnimateOnNextUpdate=0}}Tt.EMPTY_PET_SLOTS_ANIMATION_STAGGER_TIME=100;var St,At=U(56461),Ct=U(129),Ot=U(63693);class It{}It.LEADER_TOOLTIP_SHOWN=!1,function(k){k[k.NoState=1]="NoState",k[k.AddFromTeamCard=2]="AddFromTeamCard",k[k.AddFromPetCard=4]="AddFromPetCard",k[k.EditingTeamCard=8]="EditingTeamCard",k[k.EditingPlayerCard=16]="EditingPlayerCard",k[k.AddingToTeamCard=10]="AddingToTeamCard",k[k.CanAdd=14]="CanAdd",k[k.EditMode=24]="EditMode"}(St||(St={}));class Dt{get petTeam(){return this._kennel.petTeam}get sendCardUpdateSignal(){return this._sendCardUpdateSignal}get sendStateSignal(){return this._sendStateSignal}get addPetToTeamComplete(){return this._addPetToTeamComplete}get mustHaveLeaderSignal(){return this._mustHaveLeaderSignal}constructor(k){this._kennel=k,this._sendStateSignal=new j.HN0,this._sendCardUpdateSignal=new j.HN0,this._addPetToTeamComplete=new j.HN0,this._mustHaveLeaderSignal=new j.HN0,this._kennel.setPlayerToFrontPosition(),this._kennel.setPetToTopPosition()}addStateReceiver(k){this.sendStateSignal.add(k.receivePanelStates,k)}sendStateUpdate(k){this.sendStateSignal.dispatch(k)}addCardUpdateReceiver(k){this.sendCardUpdateSignal.add(k.receiveCardUpdates,k)}sendCardUpdates(){this.sendCardUpdateSignal.dispatch()}receivePetData(k,B){0!=(this._currentActionState&St.CanAdd)&&this.completeAdd(k,B)}onCardClicked(){this.clearActionState(),this.addCancelAction()}add(k,B=null){const U=this._kennel.findEmptyTeamIndex();!j.Aq$.isDefined(B)&&U>=0?(this._kennel.setTeamPosition(k,U),this.completeAction(),this.addPetToTeamComplete.dispatch(),V.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendTeamUpdatedEvent(at.t.getItem("pet",k.ID).data.name,null,{pet_added_level:k.level,pet_added_rank:ut.P8.getPetDisplayMergeRank(k.ID,k.uniqueID)})):(this.setInitialData(k,B),this._currentActionState=j.Aq$.isDefined(B)?St.AddFromTeamCard:St.AddFromPetCard,this.sendStateUpdate(this._currentActionState))}completeAdd(k,B){const U=0!=(this._currentActionState&St.AddingToTeamCard),F=U?k:this._initialPetAddData;let G=U?this._initialPosition:B;const $=this._kennel.getTeamPosition(G)?this._kennel.getTeamPosition(G).getName():null;F&&j.Aq$.isDefined(G)?(j.Aq$.isDefined(F.team)&&this._kennel.removeAtTeamPosition(F.team),this._kennel.setTeamPosition(F,G),this._kennel.setPetToTopPosition(),G=1,V.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendTeamUpdatedEvent(at.t.getItem("pet",F.ID).data.name,$,{pet_added_level:F.level,pet_added_rank:ut.P8.getPetDisplayMergeRank(F.ID,F.uniqueID)}),this._currentActionState===St.EditingTeamCard?(this.setInitialData(F,G),this.updateDisplays()):this.completeAction(),this.addPetToTeamComplete.dispatch()):this.clearActionState()}editStart(k,B){this.petTeam[B]instanceof Ct.a?this._currentActionState=St.EditingPlayerCard:(this.setInitialData(k,B),this._currentActionState=St.EditingTeamCard),this.sendStateUpdate(this._currentActionState)}editFinish(){this.completeAction()}swap(k,B){var U,F,G,j;const $=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player;V.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendTeamPositionChangedEvent({character:(null===(U=this._kennel.getTeamPosition(B))||void 0===U?void 0:U.getName())===$.getName()?"player":null===(F=this._kennel.getTeamPosition(B))||void 0===F?void 0:F.getName(),position_new:Object.values(Ot.Io)[k],position_old:Object.values(Ot.Io)[B],character_2:(null===(G=this._kennel.getTeamPosition(k))||void 0===G?void 0:G.getName())===$.getName()?"player":null===(j=this._kennel.getTeamPosition(k))||void 0===j?void 0:j.getName()}),this._kennel.swapTeamPositions(k,B),this._currentActionState===St.EditingTeamCard&&(this._initialPosition=k),this.updateDisplays(),V.q.instance.prodigy.audio.playSFX(62,"moving-pet")}remove(k){V.q.instance.prodigy.audio.playSFX(62,"moving-pet"),V.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendTeamUpdatedEvent(null,this._kennel.getTeamPosition(k).getName()),this._kennel.removeAtTeamPosition(k),0===k&&(this._kennel.swapTeamPositions(k,this._kennel.findFirstFilledIndex()),It.LEADER_TOOLTIP_SHOWN||(It.LEADER_TOOLTIP_SHOWN=!0,this.mustHaveLeaderSignal.dispatch())),this._kennel.setPetToTopPosition(),this.completeAction()}release(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=k.team,U=ut.P8.getPetDisplayMergeRank(k.ID,k.uniqueID);yield this._kennel.removePet(k),0===B&&(this._kennel.swapTeamPositions(B,this._kennel.findFirstFilledIndex()),It.LEADER_TOOLTIP_SHOWN||(It.LEADER_TOOLTIP_SHOWN=!0,this.mustHaveLeaderSignal.dispatch()));const F=at.t.getItem("pet",k.ID);V.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendPetReleasedEvent(F.name,k.level,{pet_rank:U}),this.completeAction()}))}updateDisplays(){this.sendCardUpdates(),this.sendStateUpdate(this._currentActionState)}completeAction(){this.clearStoredData(),this.updateDisplays()}setInitialData(k,B){this._initialPetAddData=k,this._initialPosition=B}clearActionState(){this.clearStoredData(),this.sendStateUpdate(this._currentActionState)}clearPetSelection(){this._currentActionState===St.NoState&&this.clearActionState()}addCancelAction(){this.cancelButton.onClick.addOnce(this.clearActionState,this)}removeCancelAction(){this.cancelButton.onClick.removeAll(this)}clearStoredData(){this._initialPetAddData=null,this._initialPosition=null,this.removeCancelAction(),this._currentActionState=St.NoState}clearSignals(){this._sendCardUpdateSignal.dispose(),this._sendStateSignal.dispose(),this._addPetToTeamComplete.dispose(),this._mustHaveLeaderSignal.dispose()}}var Rt,Pt=U(46168),Mt=U(6413),Nt=U(57349),xt=U(41851),Lt=U(19690);class kt{static createEmptyTeamCard(k,B){const U=(0,Lt.Ks)().loadFromGUID(H.l.Pets_EmptyTeamCard),F=U.findComponentInChildren(Nt.$);return F.addSignal.add(k.dispatchAddSignal,k),F.addClickListener(k),F.addDataReceiver(k),F.teamPosition=B,U.active=!1,F}static createFilledTeamCard(k,B){const U=(0,Lt.Ks)().loadFromGUID(H.l.Pets_FilledTeamCard),F=U.findComponentInChildren(Pt.Q);return F.editSignal.add(k.openToolTip,k),F.addClickListener(k),F.addDataReceiver(k),F.teamPosition=B,U.active=!1,F}static createTeamSwapPanel(k,B,U){const F=(0,Lt.Ks)().loadFromGUID(H.l.Pets_TeamSwapUI);k.addChild(F.legacyTransform.group);const G=F.findComponentInChildren(xt.v);return G.finishEditingSignal.add(B.dispatchEditFinishSignal,B),G.swapSignal.add(B.dispatchSwapSignal,B,1),G.swapSignal.add(U.moveTeamSwapPanel,U,0),G.failedSwapSignal.add(B.openTeamMustHaveALeaderTooltip,B),G.setActive(!1),G}static createPetMenuToolTip(k,B){const U=new wt(B,k);return U.initCloseArea(B.findComponentInChildren(W.$).GameObject),U}static createTeamCardToolTip(k,B){const U=kt.createPetMenuToolTip(H.l.Pets_RevampButtonTooltipTeamPanel,k);return U.displayTooltip({bodyText:"",arrowDirection:vt.i.LEFT,arrowYRelPos:.5},null,!1,[()=>B.startEditing(U.currentCreatureData,U.currentCreatureData.team),()=>B.launchReleaseConfirmation(U.currentCreatureData),()=>B.dispatchRemoveSignal(U.currentCreatureData.team)]),U}static openTeamMustHaveALeaderTooltip(k){V.q.instance.prodigy.open.overlayToolTip(gt.A.TOOLTIP_MANUAL,{bodyText:V.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("TEAM_MUST_HAVE_A_LEADER"),xPosition:k.legacyTransform.x+42,yPosition:k.legacyTransform.y+200})}}!function(k){k[k.WIZARD_FRONT=0]="WIZARD_FRONT",k[k.WIZARD_BACK=1]="WIZARD_BACK"}(Rt||(Rt={}));class Bt{get onYourPetMove(){return this._onYourPetMove}get onYourPetRemove(){return this._onYourPetRemove}get anchorCard(){return this.filledTeamCards[1].GameObject}constructor(k,B){this._panelGameObject=null,this._layout=null,this._tooltipContainer=null,this._teamSwapPanel=null,this._onYourPetMove=new j.HN0,this._onYourPetRemove=new j.HN0;const U=V.q.instance.prodigy.gameContainer.get("e20-0fb0").player,F=V.q.instance.prodigy.gameContainer.get("d0e-64fd");this._panelGameObject=F.loadFromGUID(H.l.Pets_TeamPanel),k.addChild(this._panelGameObject.legacyTransform.group);const G=this._panelGameObject.findComponentsInChildren(j.BKH);this._layout=G[Rt.WIZARD_BACK],this.createTeamCards(B),this.updateTeamCards(U.kennel.petTeam),this._teamSwapPanel=kt.createTeamSwapPanel(k,B,this),this._tooltipContainer=kt.createTeamCardToolTip(this._panelGameObject,B),this._tooltipParent=new j._mx,this._tooltipParent.layer="tooltip",this._tooltipParent.addComponent(j.dLy),this._tooltipContainer.toolTipComponent.GameObject.parent=this._tooltipParent,_t.b.make(this._tooltipParent,this._tooltipContainer.toolTipComponent.GameObject.legacyTransform),this.setInputEnableAll(!0,!1),this.localizeTeamPanel()}updateTeamCards(k){for(const B of[...this._layout.GameObject.children])B.parent=null;for(let B=0;B!k.isSelected))),B.forEach((k=>{k.containsPlayer?k.setPlayerState():k.setDefaultState()}))}setAddModeAll(k){let B=this.activeTeamCards;k&&(B=this.activeTeamCards.filter((k=>!k.containsPlayer))),B.forEach((k=>{k instanceof Pt.Q&&k.setAddMode()}))}setAlphaAll(k,B){this.activeTeamCards.forEach((U=>{U.containsPlayer?U.enableTransparency(B):U.enableTransparency(k)}))}setInputEnableAll(k,B){this.activeTeamCards.forEach((U=>{U.containsPlayer?U.enableCardInput(B):U.enableCardInput(k)}))}setTeamSwapPanelActive(k){this._teamSwapPanel.setActive(k)}hideToolTip(){this._tooltipContainer.hideTooltip()}noState(){this.setTeamSwapPanelActive(!1),this.hideToolTip(),this.setAllToDefaultState()}addFromPetCard(){this.setTeamSwapPanelActive(!1),this.hideToolTip(),this.setAddModeAll(!0),this.setAlphaAll(!1,!0),this.setInputEnableAll(!0,!1)}pause(){this.noState(),this._panelGameObject.active=!1}resume(){this._panelGameObject.active=!0}destroyPanel(){this.activeTeamCards.forEach((k=>{var B;null===(B=k.GameObject)||void 0===B||B.destroy()})),this.emptyTeamCards.forEach((k=>{var B;null===(B=k.GameObject)||void 0===B||B.destroy()})),this.filledTeamCards.forEach((k=>{var B;null===(B=k.GameObject)||void 0===B||B.destroy()})),this._tooltipContainer.cleanup(),this._tooltipParent.destroy(),this._onYourPetMove.dispose(),this._onYourPetRemove.dispose()}}var Ut=U(38097);class Ft{get sendDataSignal(){return this._sendDataSignal}get sendClickSignal(){return this._sendClickSignal}get addSignal(){return this._addSignal}get clearSignal(){return this._clearSignal}get clearPetSelectionSignal(){return this._clearPetSelectionSignal}get onYourPetInfo(){return this._onYourPetInfo}constructor(k){this._sendDataSignal=new j.HN0,this._addSignal=new j.HN0,this._clearSignal=new j.HN0,this._clearPetSelectionSignal=new j.HN0,this._onYourPetInfo=new j.HN0,this.createSignals(),this.addDataReceiver(k),this.addClickListener(k),this.addKennelListener(k),k.addCardUpdateReceiver(this),k.addStateReceiver(this),this.clearSignal.add(k.clearActionState,k),this.clearPetSelectionSignal.add(k.clearPetSelection,k)}createSignals(){this._sendDataSignal=new j.HN0,this._addSignal=new j.HN0,this._sendClickSignal=new j.HN0,this._clearSignal=new j.HN0,this._clearPetSelectionSignal=new j.HN0}addDataReceiver(k){this.sendDataSignal.add(k.receivePetData,k)}addKennelListener(k){this.addSignal.add(k.add,k)}addClickListener(k){this.sendClickSignal.add(k.onCardClicked,k)}reportClick(){this.sendClickSignal.dispatch()}clearStates(){this.clearSignal.dispatch()}clearPetSelection(){this.clearPetSelectionSignal.dispatch()}sendData(k,B){this.sendDataSignal.dispatch(k,B)}dispatchAddSignal(k,B){this.addSignal.dispatch(k,B)}receiveCardUpdates(){this.updateCards()}receivePanelStates(k){this.updatePanelState(k)}updateCards(){throw new Error("Method not implemented.")}updatePanelState(k){throw new Error("Method not implemented.")}disposeController(){this._sendClickSignal.dispose(),this._onYourPetInfo.dispose(),this._sendDataSignal.dispose(),this._addSignal.dispose(),this._clearSignal.dispose(),this._clearPetSelectionSignal.dispose()}}class Gt extends Ft{set ownedPetsPanel(k){this._ownedPetsPanel=k}get ownedPetsPanel(){return this._ownedPetsPanel}constructor(k){super(k),this._teamController=k}updateCards(){this._ownedPetsPanel.updateAllActiveCards()}updatePanelState(k){switch(k){case St.NoState:this.noState();break;case St.AddFromTeamCard:case St.EditingTeamCard:this.addFromTeamCard();break;case St.AddFromPetCard:this.addFromPetCard()}}noState(){this.ownedPetsPanel.cardStateManager.highlightAll(!1),this.ownedPetsPanel.cardStateManager.setAlphaState(!1,!1)}addFromTeamCard(){this.ownedPetsPanel.cardStateManager.highlightAll(!0),this.ownedPetsPanel.cardStateManager.setAlphaState(!0,!0)}addFromPetCard(){this.ownedPetsPanel.cardStateManager.setAlphaState(!0,!0)}}class jt extends Ft{get swapSignal(){return this._swapSignal}get removeSignal(){return this._removeSignal}get editStartSignal(){return this._editStartSignal}get editFinishSignal(){return this._editFinishSignal}set teamPanel(k){this._teamPanel=k}get teamPanel(){return this._teamPanel}constructor(k){super(k),this.releaseSignal=new j.HN0,this.infoSignal=new j.HN0,this._teamController=k,this._teamController.mustHaveLeaderSignal.add(this.openTeamMustHaveALeaderTooltip,this)}createSignals(){super.createSignals(),this._swapSignal=new j.HN0,this._removeSignal=new j.HN0,this._editStartSignal=new j.HN0,this._editFinishSignal=new j.HN0}addKennelListener(k){super.addKennelListener(k),this.swapSignal.add(k.swap,k),this.removeSignal.add(k.remove,k),this.editStartSignal.add(k.editStart,k),this.editFinishSignal.add(k.editFinish,k)}updateCards(){this.teamPanel.updateTeamCards(this._teamController.petTeam)}updatePanelState(k){switch(k){case St.NoState:this.teamPanel.noState();break;case St.AddFromPetCard:this.teamPanel.addFromPetCard();break;case St.EditingPlayerCard:case St.EditingTeamCard:this.teamPanel.hideToolTip(),this.teamPanel.setAlphaAll(!1,!1),this.teamPanel.setInputEnableAll(!1,!1)}}startEditing(k,B){V.q.instance.prodigy.audio.playSFX(18,"pop"),this.teamPanel.setTeamSwapPanelActive(!0),this.teamPanel.moveTeamSwapPanel(B),this.dispatchEditStartSignal(k,B)}openToolTip(k,B,U){k.containsPlayer?this.startEditing(B,U):(V.q.instance.prodigy.audio.playSFX(18,"pop"),this.teamPanel.positionToolTip(k,B,U))}openTeamMustHaveALeaderTooltip(){var k;(null===(k=this.teamPanel)||void 0===k?void 0:k.anchorCard)&&kt.openTeamMustHaveALeaderTooltip(this.teamPanel.anchorCard)}receivePetData(k,B){this.sendData(k,B)}onCardClicked(){this.reportClick()}dispatchSwapSignal(k,B){this.swapSignal.dispatch(k,B)}dispatchRemoveSignal(k){this.removeSignal.dispatch(k)}dispatchInfoSignal(k){this.infoSignal.dispatch(k)}launchReleaseConfirmation(k){V.q.instance.prodigy.open.petsLetGoConfirmationDialog(k,(()=>{this._teamController.release(k).then((()=>{this.releaseSignal.dispatch(k)})).catch(j.RQr.createHandler("Error releasing a pet"))}))}dispatchEditStartSignal(k,B){this.editStartSignal.dispatch(k,B)}dispatchEditFinishSignal(){this.editFinishSignal.dispatch()}disposeController(){super.disposeController(),this._teamController.mustHaveLeaderSignal.remove(this.openTeamMustHaveALeaderTooltip,this),this._editFinishSignal.dispose(),this._editStartSignal.dispose(),this._swapSignal.dispose(),this._removeSignal.dispose(),this.releaseSignal.dispose(),this.infoSignal.dispose()}}class $t extends At.A{constructor(k,B,U,F,G){super(k,B,200,{},[$._.Ui_petslots_json,$._.Ui_library_json,$._.Ui_pet_gear_json,$._.Ui_hard_currency_json]),this.prefabRoot=null,this._headerComponent=null,this._teamPanel=null,this._ownedPetsPanel=null,this.onPetListUpdated=new j.HN0,this.isModal=!1,this.background.visible=!1,G&&(this._headerComponent=G),this._contentLayer=U;const H=V.q.instance.prodigy.gameContainer.get("e20-0fb0");this._teamController=new Dt(H.player.kennel),this._teamPanelController=new jt(this._teamController),this._ownedPetsPanelController=new Gt(this._teamController),this._petFilterList=F,this._segment.petMerge.sendPetMergeFunnelAdvancedEvent(X.Eu.PetMergeYourTeam),this.cullable=!0}create(){super.create();const k=V.q.instance.prodigy.gameContainer.get("d0e-64fd");if(this._yourTeamGameObject=k.loadFromGUID(H.l.Pets_YourTeamMenu),Z.d.updateInjectedValues(this._yourTeamGameObject,{ON_ADD_PET_SLOTS_CLICKED:()=>{this._teamController.clearActionState()}}),this._backgroundButton=this._yourTeamGameObject.findComponentInChildren(W.$),this._teamController.cancelButton=this._backgroundButton,this._ownedPetsPanel=new Tt(this,this._ownedPetsPanelController,this._petFilterList),this._teamPanel=new Bt(this,this._teamPanelController),this.prefabRoot.addChild(this._yourTeamGameObject.legacyTransform.group),this.addChild(this._ownedPetsPanel.tooltipParent.legacyTransform.group),this._teamPanelController.teamPanel=this._teamPanel,this._ownedPetsPanelController.ownedPetsPanel=this._ownedPetsPanel,this._isPaused&&this.pauseMenu(),this._ownedPetsPanel.cardStateManager.onYourPetInfo.add(this.launchSubMenu,this),this._ownedPetsPanel.cardStateManager.onYourPetRelease.add(this.launchPetLetGoConfirmation,this),this._teamPanelController.infoSignal.add(this.launchSubMenu,this),this._teamPanelController.releaseSignal.add(this.updateAfterLetPetGo,this),this._headerComponent){V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.onPetRemoved.add(this.updateAfterLetPetGo,this),this._headerComponent.onPetRelease.add(this.releasePet,this),this._headerComponent.onAddPetToTeam.add(this.startAddPetToTeam,this),this._teamController.addPetToTeamComplete.add(this.addPetToTeamCompleted,this),this._headerComponent.onPetUpgraded.add(this.onPetUpgradeComplete,this)}this._petInventoryController=this._yourTeamGameObject.findComponentInChildren(K.l,!0),q.I.shouldShowPetGearTutorialCached&&(V.q.instance.game.input.enabled=!1,this.displayPetGearFtue().catch(j.RQr.createHandler("Failed to display pet gear tutorial"))),z.N.shouldShowPetMergeTutorial&&this.displayPetMergeFtue().catch(j.RQr.createHandler("Failed to display pet merge tutorial")),V.q.instance.game.broadcaster.addAppListener(Y.ig.EvolveEnd,(()=>{this.updatePetList()}),this)}focusPet(k){const B=()=>{const B=this._ownedPetsPanel.findCardForPet(k);this._ownedPetsPanel.scrollToPet(B,!1).catch(j.RQr.createHandler("Could not scroll to selected pet"))};this._ownedPetsPanel?B():this.onCreate.addOnce(B)}launchSubMenu(k){super.launchSubMenu(k),this.pauseMenu(),this._headerComponent.closeButton.GameObject.active=!1,this._headerComponent.yourTeamToggle.GameObject.parent.active=!1,this._yourPetMenu=V.q.instance.prodigy.open.yourPet(k,this._contentLayer,this._headerComponent),this._headerComponent.backToYourTeamButton.GameObject.active=!0,this._headerComponent.backToYourTeamButton.onClick.add(this.closeClicked,this),this._headerComponent.onSubMenuClose.add(this.closeClicked,this),this._headerComponent.onSubMenuEsc.add(this.onEscPressed,this)}launchPetLetGoConfirmation(k){this.leaveSubMenu(),V.q.instance.prodigy.open.petsLetGoConfirmationDialog(k,(()=>{this.releasePet(k),this.updateAfterLetPetGo(k)}))}onEscPressed(k){k instanceof Ut.O&&this.closeClicked()}closeClicked(){V.q.instance.prodigy.audio.playSFX(18,"pop"),this.leaveSubMenu()}leaveSubMenu(){super.leaveSubMenu(),this._yourPetMenu&&(this._yourPetMenu.cancelPetMenuLoading(),this._yourPetMenu=void 0),this._headerComponent.closeButton.GameObject.active=!0,this._headerComponent.yourTeamToggle.GameObject.parent.active=!0,this._headerComponent.backToYourTeamButton.onClick.remove(this.closeClicked,this),this._headerComponent.onSubMenuClose.remove(this.closeClicked,this),this._headerComponent.onSubMenuEsc.remove(this.onEscPressed,this),this._headerComponent.backToYourTeamButton.GameObject.active=!1,this._headerComponent.closeButton.GameObject.active=!0,this._teamController.updateDisplays(),this.resumeMenu()}updatePetList(k,B=0){this.leaveSubMenu(),this._ownedPetsPanel.setPetList(null!=k?k:this._petFilterList,B),this._teamPanelController.receiveCardUpdates(),this.onPetListUpdated.dispatch()}updateAfterLetPetGo(k){V.q.instance.prodigy.open.isMenuOpen(Ut.O)||this.leaveSubMenu(),this._ownedPetsPanel.setPetList(this._petFilterList.filter((B=>B!==k))),this._teamPanelController.receiveCardUpdates()}startAddPetToTeam(k){this.leaveSubMenu(),this._ownedPetsPanelController.dispatchAddSignal(k,k.team)}releasePet(k){this._headerComponent.backToYourTeamButton.GameObject.active=!1,V.q.instance.prodigy.loading(!0),this._teamController.release(k).then((()=>{var k;V.q.instance.prodigy.loading(!1),this.leaveSubMenu(),null===(k=this._petInventoryController)||void 0===k||k.updateDisplay()})).catch(j.RQr.createHandler("Error releasing a pet"))}addPetToTeamCompleted(){this._headerComponent.startAutoTooltip(V.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService).getText("PET_ADDED_TO_TEAM")),V.q.instance.prodigy.audio.playSFX(61,"add-pet")}onPetUpgradeComplete(){this._ownedPetsPanel.hideFtueGuideHands(),this._ownedPetsPanel.setPetList(this._petFilterList),this._teamPanelController.receiveCardUpdates()}displayPetGearFtue(){return(0,G.sH)(this,void 0,void 0,(function*(){V.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:"Pet_gear_tutorial",funnelType:"tutorial",stepName:Q.l.PetGearTeamMenu},{step_index:2}),this._ownedPetsPanel.setInputScrollEnabled(!1),V.q.instance.game.broadcaster.addAppListener(Y.bI.FtueCompleted,this.onPetGearFtueCompleted.bind(this),this),Z.d.updateInjectedValues(this._yourTeamGameObject,{[J.oD.PetGearFtueOverlayEnabled]:!0},!1);const k=this._yourTeamGameObject.findComponentInChildren(j.bE_);yield j.Egh.timeout(1e3);const B=this._ownedPetsPanel.getFirstGearEnabledPet();yield this._ownedPetsPanel.scrollToPet(B);const U=k.Container.get(J.oD.PetGearFtueEnabledInputTransform),F=this._ownedPetsPanel.panelGameObject.findComponentInChildren(j.JTA).GameObject.children[B.gridLayoutIndex].findComponent(j.K16);U.setPosition(F.group.worldTransform.tx,F.group.worldTransform.ty),U.fullWidth=F.group.width,U.fullHeight=F.group.height,j.wa5.getActiveScene().addLayer("newHandLayer",1e3),U.GameObject.parent.setLayer("newHandLayer",!0),V.q.instance.game.input.enabled=!0,this._ownedPetsPanel.cardStateManager.onStackDrawerOpened.addOnce((()=>(0,G.sH)(this,void 0,void 0,(function*(){U.setPosition(-500,-500),yield j.Egh.timeout(1e3);const k=j.wa5.getActiveScene().container.get(J.oX.PetCardPetSpawner).placeholders[0].transform;U.setPosition(k.worldPosition.x,k.worldPosition.y),U.fullWidth=k.fullWidth,U.fullHeight=k.fullHeight})))),this._ownedPetsPanel.tooltipContainer.onTooltipDisplayed.addOnce((()=>{const B=k.Container.get(J.oD.OwnedPanelTooltipPetInfoButtonTransform),F=B.group.worldTransform.tx,G=B.group.worldTransform.ty;U.setPosition(F,G),U.fullWidth=B.group.width,U.fullHeight=B.group.height}))}))}onPetGearFtueCompleted(){V.q.instance.prodigy.gameContainer.get("c47-20b6").playerProgression.sendFunnelAdvancedEvent({funnelName:"Pet_gear_tutorial",funnelType:"tutorial",stepName:Q.l.PetGearGearEquipped},{step_index:5}),this._ownedPetsPanel.setInputScrollEnabled(!0),V.q.instance.game.broadcaster.removeAppListener(Y.bI.FtueCompleted,this)}displayPetMergeFtue(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=z.N.getChosenPetForMergeRankFTUE();this.launchSubMenu(k),V.q.instance.game.broadcaster.broadcast(Y.ki.FtuePetMenuOpened)}))}resumeMenu(){super.resumeMenu(),this._ownedPetsPanel&&this._ownedPetsPanel.resume(),this._teamPanel&&this._teamPanel.resume(),this._yourTeamGameObject&&(this._yourTeamGameObject.active=!0)}pauseMenu(){super.pauseMenu(),this._ownedPetsPanel&&this._ownedPetsPanel.pause(),this._teamPanel&&this._teamPanel.pause(),this._yourTeamGameObject&&(this._yourTeamGameObject.active=!1)}close(){var k;null===(k=this._yourTeamGameObject)||void 0===k||k.destroy(),this.onPetListUpdated.dispose(),super.close()}destroy(){var k,B,U,F,G,j,$,H,W,q;V.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.onPetRemoved.remove(this.updateAfterLetPetGo,this),this._headerComponent&&(this._headerComponent.onLetPetGo.remove(this.updateAfterLetPetGo,this),this._headerComponent.onPetRelease.remove(this.releasePet,this),this._headerComponent.onAddPetToTeam.remove(this.startAddPetToTeam,this),this._headerComponent.onPetUpgraded.remove(this.onPetUpgradeComplete,this)),null===(k=this._ownedPetsPanel)||void 0===k||k.cardStateManager.onYourPetInfo.remove(this.launchSubMenu,this),null===(B=this._teamPanelController)||void 0===B||B.infoSignal.remove(this.launchSubMenu,this),null===(U=this._teamPanelController)||void 0===U||U.releaseSignal.remove(this.updateAfterLetPetGo,this),null===(F=this._teamController)||void 0===F||F.addPetToTeamComplete.remove(this.addPetToTeamCompleted,this),null===(G=this._teamController)||void 0===G||G.clearSignals(),null===(j=this._teamPanelController)||void 0===j||j.disposeController(),null===($=this._ownedPetsPanelController)||void 0===$||$.disposeController(),null===(H=this._ownedPetsPanel)||void 0===H||H.destroyPanel(),null===(W=this._teamPanel)||void 0===W||W.destroyPanel(),null===(q=this._backgroundButton)||void 0===q||q.onClick.dispose(),V.q.instance.game.broadcaster.removeAppListener(Y.ig.EvolveEnd,this),super.destroy()}}},74951:(k,B,U)=>{"use strict";U.d(B,{z:()=>dt});var F=U(8674),G=U(62459),j=U(37016),$=U(5491),H=U(35120),V=U(1195),W=U(77938),q=U(55734),K=U(37773),z=U(97317),Y=U(65732),Q=U(43754),X=U(55122),Z=U(10674),J=U(46855),tt=U(99979),et=U(73797),it=U(28152),st=U(90744),nt=U(26932),at=U(26004),rt=U(22023),ot=U(80060),ht=U(53661),ct=U(16909);let dt=class extends nt.z{constructor(){super(...arguments),this.onLetPetGo=new G.HN0,this.onAddToTeam=new G.HN0,this.onEvolvePet=new G.HN0,this._processJustLeveledUpOnNextRebind=!1}bindContext(){var k,B,U;const F=W.t.getItem("pet",this._petData.ID),V=new q.R(H.q.instance.prodigy.game,this._petData),Q=rt.P8.getMaxOwnableLevel(this._petData.ID),Z=new J.r(this._petData.stars,$.V.Pet,{baseXp:0,memberXp:0,totalNonMemberXp:0},Math.max(Q,this._petData.level));Z.levels=[this._petData.level],this._context.Container.rebind(ht.hi.PetCreatureData).toConstantValue(this._petData),this._context.Container.rebind(ht.hi.YourPetPanelPetId).toConstantValue(this._petData.ID);const it=!!this._petData.nickname;this._context.Container.rebind(ht.hi.YourPetPanelPetName).toConstantValue(it?this._petData.nickname:null!==(k=F.data.name)&&void 0!==k?k:F.name),this._context.Container.rebind(ht.hi.YourPetPanelPetHasNickname).toConstantValue(it),it&&this._context.Container.rebind(ht.hi.YourPetPanelPetSpecies).toConstantValue(null!==(B=F.data.name)&&void 0!==B?B:F.name),this._context.Container.rebind(ht.hi.YourPetElementalBaseFrame).toConstantValue(tt.bf[F.data.affinity]),this._context.Container.rebind(ht.hi.YourPetPanelXpBarInfo).toConstantValue(Z),this._context.Container.rebind(ht.hi.YourPetPanelEnableReleaseButton).toConstantValue(!rt.P8.isPetEpic(this._petData.ID)),this._context.Container.rebind(ht.hi.YourPetPanelEnableAddTeamButton).toConstantValue(!rt.P8.isPetOnTeam(this._petData)),this._context.Container.rebind(ht.hi.YourPetPanelReleasePetFunction).toConstantValue(H.q.instance.prodigy.open.petsLetGoConfirmationDialog.bind(H.q.instance.prodigy.open,this._petData,(()=>this.onLetPetGo.dispatch(this._petData)))),this._context.Container.rebind(ht.hi.YourPetPanelAddToTeamFunction).toConstantValue(this.onAddToTeam.dispatch.bind(this.onAddToTeam,this._petData));if(rt.P8.canPlayerAccessPetMergeFeature(this._loggedInPlayer.player)){const k=rt.P8.canPetAccessMergeRanks(this._petData.ID),B=null!==(U=rt.P8.getPetDisplayMergeRank(this._petData.ID,this._petData.uniqueID))&&void 0!==U?U:j.qd.MIN,F=B>=j.qd.MAX,G=k&&!F;this._context.Container.rebind(ht.hi.YourPetPanelDisplayMergeButton).toConstantValue(G),this._context.Container.rebind(ht.hi.YourPetPanelDisplayMergeRankBadge).toConstantValue(k),k&&this._context.Container.rebind(ht.hi.YourPetPanelPetMergeRank).toConstantValue(B)}const st=rt.P8.GetEvolutionaryLine(F);for(;st.length>4&&st[0]!==F.ID;)st.shift();const nt=[{id:ht.hi.YourPetPanelEvoLineStage1Id,seen:ht.hi.YourPetPanelEvoLineStage1Seen,rescued:ht.hi.YourPetPanelEvoLineStage1Rescued},{id:ht.hi.YourPetPanelEvoLineStage2Id,seen:ht.hi.YourPetPanelEvoLineStage2Seen,rescued:ht.hi.YourPetPanelEvoLineStage2Rescued},{id:ht.hi.YourPetPanelEvoLineStage3Id,seen:ht.hi.YourPetPanelEvoLineStage3Seen,rescued:ht.hi.YourPetPanelEvoLineStage3Rescued},{id:ht.hi.YourPetPanelEvoLineStage4Id,seen:ht.hi.YourPetPanelEvoLineStage4Seen,rescued:ht.hi.YourPetPanelEvoLineStage4Rescued}],ot=this._loggedInPlayer.player.encounters;this._context.Container.rebind(ht.hi.YourPetPanelEvoLineNumStages).toConstantValue(st.length);for(let G=0;G0,V=j===F.ID;this._context.Container.rebind(k).toConstantValue(st[G]),this._context.Container.rebind(B).toConstantValue($||H||V),this._context.Container.rebind(U).toConstantValue(H||V)}const dt=st.findIndex((k=>F.ID===k))+1;this._context.Container.rebind(ht.hi.YourPetPanelEvoLineOwnedStage).toConstantValue(dt);const lt=rt.P8.canPetEvolve(V,this._petData.level),ut=V.getAvailableEvolutions(X.s.activePlayerLevelCap).length>0;this._context.Container.rebind(ht.hi.YourPetPanelShowEvolveButton).toConstantValue(ut),this._context.Container.rebind(ht.hi.YourPetPanelEnableEvolveButton).toConstantValue(lt),H.q.instance.prodigy.game.broadcaster.addAppListener(et.ig.Evolved,this.onEvolvePet.dispatch,this.onEvolvePet),this._context.Container.rebind(ht.hi.YourPetPanelEvolveButtonWithHC).toConstantValue(lt),this._context.Container.rebind(ht.hi.YourPetPanelShowLevelUp).toConstantValue(!lt),this._context.Container.rebind(ht.hi.YourPetPanelShowEvolveButton).toConstantValue(lt);const ft=this._loggedInPlayer.getLevel(),bt=this._petData.level>=Q,pt=this._petData.levelgt&&!bt&&([_t,Et]=ct.M.getLevelPurchaseCost(this._petData.level,vt,yt));const wt=_t<=gt,Tt=wt?"PET_MAX_LEVEL_UP_TO_SAME_LEVEL_ONLY":"PET_LEVEL_UP_NOT_ENOUGH_GOLD",St=this._paymentManager.exchange({currency:1,value:_t},27).value;if(this._context.Container.rebind(ht.hi.YourPetPanelShouldShowCurrencyConversion).toConstantValue(!0),this._context.Container.rebind(ht.hi.YourPetPanelLevelUpButtonDisabledMessage).toConstantValue(Tt),this._context.Container.rebind(ht.hi.YourPetPanelLevelUpMaxLevelState).toConstantValue(bt),this._context.Container.rebind(ht.hi.YourPetPanelEnableLevelUpButton).toConstantValue(pt&&wt),this._context.Container.rebind(ht.hi.YourPetPanelLevelUpButtonLevel).toConstantValue(Et),this._context.Container.rebind(ht.hi.YourPetPanelLevelUpButtonCost).toConstantValue(_t),this._context.Container.rebind(ht.hi.YourPetPanelLevelUpButtonCostDifference).toConstantValue(_t-gt),this._context.Container.rebind(ht.hi.YourPetPanelLevelUpButtonCostText).toConstantValue(_t.toLocaleString()),this._context.Container.rebind(ht.hi.YourPetPanelLevelUpMagicoinCost).toConstantValue(St),this._context.Container.rebind(ht.hi.YourPetPanelLevelUpMagicoinCostDifference).toConstantValue(St-mt),this._context.Container.rebind(ht.FK.OtpMissingMagicoin).toConstantValue(St-mt),this._context.Container.rebind(ht.hi.YourPetPanelLevelUpConversionButtonEnabled).toConstantValue(pt),G.Aq$.isDefined(this._petData.team)){const k=this._loggedInPlayer.getChargedLevel();this._context.Container.rebind(Y.E.ChargedCreatureEffectTier).toConstantValue(K.e.getChargedLevelTierFromLevel(k)),this._context.Container.rebind(Y.E.ChargedCreatureEffectDisplayType).toConstantValue(k>0?z.X$.IDLE:z.X$.HIDDEN)}const At=rt.P8.getPetDisplayMergeRank(this._petData.ID,this._petData.uniqueID);H.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendPetDetailsViewedEvent(F,"your-pet",{pet_level:this._petData.level,pet_rank:At,gear_list:this._petData.gear,is_on_team:rt.P8.isPetOnTeam(this._petData)}),this._context.Container.rebind(ht.hi.SpinePetEvolveBurst).toConstantValue(this._processJustLeveledUpOnNextRebind&<),this._context.Container.rebind(ht.hi.SpinePetEvolveIdle).toConstantValue(!this._processJustLeveledUpOnNextRebind&<),this._processJustLeveledUpOnNextRebind=!1,this.resolvePetGear(F).finally((()=>{var k;null===(k=this.gameObject)||void 0===k||k.findComponentsInChildren(at.B,!1).forEach((k=>k.consume()))}))}onPetLeveledUp(){this._processJustLeveledUpOnNextRebind=!0}resolvePetGear(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F,G,j;const $=!((null===(B=k.data.gearEquipSlots)||void 0===B?void 0:B.length)>0);if(this._context.Container.rebind(ht.hi.YourPetPanelPetGearShowGearPanel).toConstantValue(!0),this._context.Container.rebind(ht.hi.YourPetPanelPetGearSlotsDisabled).toConstantValue($),$)return;const H=yield this._gearManager.getPetGearByUniqueId(null===(U=this._petData.gear)||void 0===U?void 0:U.petHat),V=yield this._gearManager.getPetGearByUniqueId(null===(F=this._petData.gear)||void 0===F?void 0:F.petRelic);null===(G=this._context.Container.get("PetHatSlotContainer"))||void 0===G||G.Container.rebind("PetGearSlotData").toConstantValue(null!=H?H:{}),null===(j=this._context.Container.get("PetRelicSlotContainer"))||void 0===j||j.Container.rebind("PetGearSlotData").toConstantValue(null!=V?V:{})}))}updateInjectedValues(k){ot.d.updateInjectedValues(this.gameObject,k)}destroy(){this.onLetPetGo.dispose(),this.onAddToTeam.dispose(),this.onEvolvePet.dispose(),H.q.instance.prodigy.game.broadcaster.removeAppListener(et.ig.Evolved,this.onEvolvePet),super.destroy()}};(0,F.Cg)([(0,G.Cdj)("d69-defe"),(0,F.Sn)("design:type",Z.q)],dt.prototype,"_gearManager",void 0),(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",V.E)],dt.prototype,"_loggedInPlayer",void 0),(0,F.Cg)([(0,G.Cdj)("5c7-e02d"),(0,F.Sn)("design:type",Q.W)],dt.prototype,"_hardCurrencyProvider",void 0),(0,F.Cg)([(0,G.Cdj)("743-fd51"),(0,F.Sn)("design:type",st.E)],dt.prototype,"_paymentManager",void 0),(0,F.Cg)([(0,G.Cdj)(ht.hi.YourPetPanelPetData),(0,F.Sn)("design:type",Object)],dt.prototype,"_petData",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],dt.prototype,"onLetPetGo",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],dt.prototype,"onAddToTeam",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],dt.prototype,"onEvolvePet",void 0),dt=(0,F.Cg)([(0,G.EVk)("YourPetDataProvider",it.Y.uiPet)],dt)},3119:(k,B,U)=>{"use strict";U.d(B,{o:()=>dt});var F=U(8674),G=U(62459),j=U(88022),$=U(99625),H=U(51742),V=U(36648),W=U(90633),q=U(35120),K=U(60881),z=U(54422),Y=U(94566),Q=U(72772),X=U(73797),Z=U(41674),J=U(15485),tt=U(46784),et=U(82680),it=U(91033),st=U(56461),nt=U(49237),at=U(83133),rt=U(48199),ot=U(97518);let ht=class extends G.uAl{constructor(){super(...arguments),this._closeButton=null,this._yourTeamToggle=null,this._petBookToggle=null,this._backToYourTeam=null,this._backToYourPet=null,this._backToPetBook=null,this._autoTooltipContainer=null,this._titleText=null,this._autoToolTip=null,this._onLetPetGo=new G.HN0,this._onAddPetToTeam=new G.HN0,this._onPetRelease=new G.HN0,this.onPetUpgraded=new G.HN0,this._onSubMenuClose=new G.HN0,this._onSubMenuEsc=new G.HN0}set autoToolTip(k){this._autoToolTip=k}get autoToolTip(){return this._autoToolTip}get closeButton(){return this._closeButton}get yourTeamToggle(){return this._yourTeamToggle}get petBookToggle(){return this._petBookToggle}get backToYourTeamButton(){return this._backToYourTeam}get backToYourPetButton(){return this._backToYourPet}get backToPetBookButton(){return this._backToPetBook}get autoTooltipContainer(){return this._autoTooltipContainer}get onLetPetGo(){return this._onLetPetGo}get onAddPetToTeam(){return this._onAddPetToTeam}get onPetRelease(){return this._onPetRelease}get onSubMenuClose(){return this._onSubMenuClose}get onSubMenuEsc(){return this._onSubMenuEsc}create(){super.create(),this._closeButton&&(this._closeButton.GameObject.active=!1),this._yourTeamToggle&&(this._yourTeamToggle.GameObject.active=!1),this._petBookToggle&&(this._petBookToggle.GameObject.active=!1),this._backToYourTeam&&(this._backToYourTeam.GameObject.active=!1),this._backToYourPet&&(this._backToYourPet.GameObject.active=!1),this._backToPetBook&&(this._backToPetBook.GameObject.active=!1)}startAutoTooltip(k){this._autoToolTip=rt.A.displayToolTipAuto(this._autoToolTip,this._autoTooltipContainer,{bodyText:k,xPosition:640,yPosition:100}),this._autoTooltipContainer.legacyTransform.group.setParent(q.q.instance.game.stage)}setTitleText(k){this._titleText.setLocalizationKey(k)}destroy(){this._onLetPetGo.dispose(),this._onAddPetToTeam.dispose(),this._onPetRelease.dispose(),this._onSubMenuClose.dispose(),this._onSubMenuEsc.dispose(),this.onPetUpgraded.dispose(),super.destroy()}};(0,F.Cg)([(0,G.x4W)("closeButton"),(0,F.Sn)("design:type",nt.$)],ht.prototype,"_closeButton",void 0),(0,F.Cg)([(0,G.x4W)("yourTeamToggle"),(0,F.Sn)("design:type",at.l)],ht.prototype,"_yourTeamToggle",void 0),(0,F.Cg)([(0,G.x4W)("petBookToggle"),(0,F.Sn)("design:type",at.l)],ht.prototype,"_petBookToggle",void 0),(0,F.Cg)([(0,G.x4W)("backToYourTeam"),(0,F.Sn)("design:type",nt.$)],ht.prototype,"_backToYourTeam",void 0),(0,F.Cg)([(0,G.x4W)("backToYourPet"),(0,F.Sn)("design:type",nt.$)],ht.prototype,"_backToYourPet",void 0),(0,F.Cg)([(0,G.x4W)("backToPetBook"),(0,F.Sn)("design:type",nt.$)],ht.prototype,"_backToPetBook",void 0),(0,F.Cg)([(0,G.x4W)("autoTooltipContainer"),(0,F.Sn)("design:type",G._mx)],ht.prototype,"_autoTooltipContainer",void 0),(0,F.Cg)([(0,G.MnK)(ot.R),(0,F.Sn)("design:type",ot.R)],ht.prototype,"_titleText",void 0),ht=(0,F.Cg)([(0,G.EVk)("PetsMenuHeaderPrefab")],ht);var ct=U(52142);class dt extends et.W{get headerPrefab(){return this._headerPrefab}get contentLayer(){return this._contentLayer}constructor(k,B,U,F){super(k,B,200,{},[j._.Ui_raster_bars_json,j._.Ui_raster_icons_json,j._.Ui_raster_panels_json,j._.Ui_raster_pets_menu_json,j._.Ui_buttons_json,j._.Ui_store_json,j._.Ui_registration_json,j._.Ui_icons_json,j._.Ui_raster_pet_card_json,j._.Ui_postbattle_json,j._.Ui_battle_revamp_json,H.c.Sfx_ui,H.c.Sfx_adding_pet_to_team,H.c.Sfx_moving_pet_position,H.c.Sfx_book_close,H.c.Sfx_book_open,H.c.Sfx_petbook_pagination,H.c.Sfx_open_petinfo_yourpet,H.c.Sfx_pets_button_disabled_state,H.c.Sfx_paper_tab,V.q.Merge_rank_badge_small]),this.prefabRoot=null,this._headerPrefab=null,this._backgroundContainer=null,this._yourTeamMidGroundGO=null,this._petBookMidGroundGO=null,this._currentMenu=[],this._onInitialize=U,this.closeCallback=F,this.currentInterfaceName=tt.B.PetsWindow}create(){super.create(),this.name="PetsMenuController";const k=q.q.instance.prodigy.gameContainer.get("d0e-64fd");this._backgroundContainer=k.loadFromGUID($.l.Pets_Background),this.prefabRoot.addChild(this._backgroundContainer.legacyTransform.group),this._contentLayer=new G.mcf,this._contentLayer.name="ContentLayer",this.prefabRoot.addChild(this._contentLayer);const B=k.loadFromGUID($.l.Pets_MenuHeader);this._headerPrefab=B.findComponentInChildren(ht),this.prefabRoot.addChild(B.legacyTransform.group),this._yourTeamSelectHandler=()=>{this.showYourTeam(),q.q.instance.prodigy.audio.playSFX(63,"book-close")},this._headerPrefab.yourTeamToggle.onSelected.add(this._yourTeamSelectHandler),this._petBookSelectHandler=()=>{this.showPetBook(k),q.q.instance.prodigy.audio.playSFX(64,"book-open")},this._headerPrefab.petBookToggle.onSelected.add(this._petBookSelectHandler),this._petsMenuCloseHandler=()=>{q.q.instance.prodigy.audio.playSFX(18,"pop"),this.clearCurrentMenu(),this.fireButtonEvent({buttonName:J.k.Close}),this.fireInterfaceEvent({interfaceType:Z.Wm.DialogBox,closeMethod:Z.Lv.CloseDialog}),this.close()},this._headerPrefab.closeButton.onClick.add(this._petsMenuCloseHandler),this._onInitialize&&this._onInitialize(),this.setDefaultMenu()}setDefaultMenu(){const k=this._headerPrefab.GameObject.findComponentInChildren(Y.O);k.setItemSelected(this._headerPrefab.yourTeamToggle,!1),k.setItemSelected(this._headerPrefab.petBookToggle,!1),k.setItemSelected(this._headerPrefab.yourTeamToggle,!0),this.showYourTeam(),this._headerPrefab.closeButton.GameObject.active=!0,this._headerPrefab.yourTeamToggle.GameObject.active=!0,this._headerPrefab.petBookToggle.GameObject.active=!0,this._headerPrefab.closeButton.GameObject.addComponent(z.E).initialize(K.D.ESC,this.onEscPressed.bind(this)),this._headerPrefab.yourTeamToggle.GameObject.addComponent(z.E).initialize(K.D.TAB,this.onTabPressed.bind(this))}onEscPressed(){Q.I.shouldShowPetGearTutorialCached||this.isTopMenu()&&this._petsMenuCloseHandler()}onTabPressed(){if(Q.I.shouldShowPetGearTutorialCached)return;if(!this.isTopMenu())return;const k=this._headerPrefab.GameObject.findComponentInChildren(Y.O);this._headerPrefab.yourTeamToggle.isSelected()?(k.setItemSelected(this._headerPrefab.yourTeamToggle,!1),k.setItemSelected(this._headerPrefab.petBookToggle,!0),this._petBookSelectHandler()):this._headerPrefab.petBookToggle.isSelected()?(k.setItemSelected(this._headerPrefab.petBookToggle,!1),k.setItemSelected(this._headerPrefab.yourTeamToggle,!0),this._yourTeamSelectHandler()):(k.setItemSelected(this._headerPrefab.yourTeamToggle,!0),this._yourTeamSelectHandler())}toggleKeyController(k){const B=this._headerPrefab.GameObject.findComponentsInChildren(z.E,!0);for(let U=0;Uk instanceof ct.Y));F?(F.updatePetList(U),F.resumeMenu()):(F=q.q.instance.prodigy.open.yourTeam(this._contentLayer,U,this._headerPrefab),this._currentMenu.push(F)),this._currentMenu.forEach(this.pauseMenuIfInactive.bind(this,F)),this.loadYourTeamMidground(B),F.onSubMenuLaunched.add((()=>{this._yourTeamMidGroundGO.active=!1})),F.onSubMenuLeft.add((()=>{this._yourTeamMidGroundGO.active=!0})),this._petBookMidGroundGO&&(this._petBookMidGroundGO.active=!1),k&&F.focusPet(k);this._headerPrefab.yourTeamToggle.GameObject.findComponentInParent(Y.O).setSelected(this._headerPrefab.yourTeamToggle),this._headerPrefab.yourTeamToggle.setSelected(!0)}showPetBook(k){let B=this._currentMenu.find((k=>k instanceof it.M));B?B.resumeMenu():(B=q.q.instance.prodigy.open.petBook(this._headerPrefab),this._currentMenu.push(B)),this._currentMenu.forEach(this.pauseMenuIfInactive.bind(this,B)),this.loadPetBookMidground(k),this._yourTeamMidGroundGO&&(this._yourTeamMidGroundGO.active=!1)}checkPetGearFtue(){return(0,F.sH)(this,void 0,void 0,(function*(){return!q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(W.B.FEATURE_PET_GEAR,W.B.BREADCRUMB_EQUIP_PET_GEAR_FTUE)&&Q.I.updateCachedPetGearTutorialFlag()}))}pauseMenuIfInactive(k,B){k.onSubMenuLeft.removeAll(),k.onSubMenuLaunched.removeAll(),k.onSubMenuLeft.add((()=>this.toggleKeyController(!0))),k.onSubMenuLaunched.add((()=>this.toggleKeyController(!1))),B!==k&&(B.onSubMenuLeft.removeAll(),B.onSubMenuLaunched.removeAll(),B.pauseMenu())}loadYourTeamMidground(k){G.Aq$.isDefined(this._yourTeamMidGroundGO)||(this._yourTeamMidGroundGO=k.loadFromGUID($.l.Pets_BackgroundYourTeam),this._backgroundContainer.addChild(this._yourTeamMidGroundGO)),this._yourTeamMidGroundGO.active=!0}loadPetBookMidground(k){G.Aq$.isDefined(this._petBookMidGroundGO)||(this._petBookMidGroundGO=k.loadFromGUID($.l.Pets_BackgroundPetBook),this._petBookMidGroundGO.findComponentInChildren(G.V09).elementsGroup.scale.x=-1,this._backgroundContainer.addChild(this._petBookMidGroundGO)),this._petBookMidGroundGO.active=!0}forceClose(){this.clearCurrentMenu(),this.close()}clearCurrentMenu(){if(this._currentMenu.length>0){for(let k=0;k{"use strict";U.d(B,{R:()=>rt});var F,G=U(8674),j=U(62459),$=U(5491),H=U(65050);!function(k){k.PetTeamLevelUp="my-team-pet-level-up"}(F||(F={}));var V=U(35120),W=U(1195),q=U(39984),K=U(87239),z=U(55122),Y=U(28152),Q=U(25809),X=U(95913),Z=U(62886),J=U(60157),tt=U(65240),et=U(77938),it=U(63834),st=U(2519),nt=U(44094),at=U(53661);let rt=class extends j.uAl{constructor(){super(...arguments),this.onLevelUpPurchased=new j.HN0}get purchaseCost(){return this._purchaseCost}get purchaseLevel(){return this._purchaseLevel}purchaseLevels(){if(!j.Aq$.isDefined(this._purchaseLevel)||!j.Aq$.isDefined(this._purchaseCost))return void j.VyI.log("Cannot purchase levels without a purchase level and cost set.",j.$bb.Error);const k=new it.r(V.q.instance.prodigy.game,this._petData);this._petData.stats=k.source.stats,this._petData.statGrowth=k.source.statGrowth;const B=k.getStars(),U=Math.max(0,B-z.s.xpRequiredForLevel(this._purchaseLevel,$.V.Pet)),F=z.s.xpRequiredForLevel(this._purchaseLevel,$.V.Pet)-B+U,G=k.diffAvailableSpellsV2(this._purchaseLevel),H=q.e.getStatIncreasesFromLevelUps(this._petData,this._petData.level,this._purchaseLevel);k.addStars(F);V.q.instance.prodigy.gameContainer.get("8dc-04eb").sendGainPetXpEvent(F).catch(j.RQr.createHandler("Error sending a battle pass quest event for gaining pet XP")),this._loggedInPlayer.player.kennel.updated=!0,this._loggedInPlayer.player.forceSaveCharacter(),this.sendLevelPurchasedSegmentEvents(k),this.sendPurchasePetLevelQuestEvent(k.data),this.showLevelUpPopups(H,G),V.q.instance.prodigy.audio.playSound(33,!1),this.onLevelUpPurchased.dispatch(k.data)}setPurchaseLevel(k){this._purchaseLevel=k}setPurchaseCost(k){this._purchaseCost=k}sendPurchasePetLevelQuestEvent(k){const B=et.t.getItem("pet",k.ID).data,U={params:{taskEventType:J.Z7.Pet,rarity:B.rarity,itemType:"pet",source:tt.C.LevelUp,id:B.ID,element:B.affinity,level:B.level}};V.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(Z.T.PURCHASE_PET_LEVEL,U).catch(j.RQr.createHandler("Error sending a quest event for purchasing a pet level up"))}sendLevelPurchasedSegmentEvents(k){this._segment.featureCommon.sendPetUpgradedEvent(k.getName(),k.getLevel(),this._purchaseLevel,this._purchaseCost,this._currentCurrencyId.toString(),{transaction_id:this._segmentTransactionId})}updateItemRemovedCustomData(k){this._segmentTransactionId=nt.$.generateUID(),this._currentCurrencyId=k;const B={transaction_id:this._segmentTransactionId,sink_type:tt.C.LevelUp,sink_id:F.PetTeamLevelUp,instance_type:H.N.Interface,instance_id:this._segment.featureCommon.getInstanceId(this._segment.featureCommon.currentInterfaceName)};27===k&&this._magicoinPaymentComponent?this._magicoinPaymentComponent.customData=B:1===k&&this._goldPaymentComponent&&(this._goldPaymentComponent.customData=B)}showLevelUpPopups(k,B){var U;const F=[];F.push(X.v4.levelUp()),F.push(...X.v4.battleStats(k)),B.forEach((k=>{const B=X.v4.spell(K.x.getUnlockedSpellDisplayInformation(k));F.push(B)})),null===(U=this._popupMessageManager)||void 0===U||U.playPopupMessageAnimations(F).catch(j.RQr.createHandler("Failed to play popup message animations."))}destroy(){this.onLevelUpPurchased.dispose(),super.destroy()}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",W.E)],rt.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.Cdj)("c47-20b6"),(0,G.Sn)("design:type",Function)],rt.prototype,"_segment",void 0),(0,G.Cg)([(0,j.Cdj)(at.hi.YourPetPanelPopupMessageManager),(0,G.Sn)("design:type",Q.g)],rt.prototype,"_popupMessageManager",void 0),(0,G.Cg)([(0,j.Cdj)(at.hi.YourPetPanelPetData),(0,G.Sn)("design:type",Object)],rt.prototype,"_petData",void 0),(0,G.Cg)([(0,j.MnK)(st.E),(0,G.Sn)("design:type",st.E)],rt.prototype,"_magicoinPaymentComponent",void 0),(0,G.Cg)([(0,j.MnK)(st.E),(0,G.Sn)("design:type",st.E)],rt.prototype,"_goldPaymentComponent",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rt.prototype,"onLevelUpPurchased",void 0),rt=(0,G.Cg)([(0,j.EVk)("LevelPurchase",Y.Y.uiPet)],rt)},16909:(k,B,U)=>{"use strict";U.d(B,{M:()=>$});var F=U(5491),G=U(39984),j=U(23748);class ${static getLevelPurchaseCost(k,B,U){let $=k,H=0;do{const k=30+(G.e.starsToLevel($+1,F.V.Pet)-G.e.starsToLevel($,F.V.Pet))/1.568+$+1,B=j.z.ceilToNearestMultiplier(H+k,5);if(H>0&&B>U)break;H=B,$++}while(${"use strict";U.d(B,{h:()=>F,n:()=>rt});var F,G=U(8674),j=U(62459),$=U(10471),H=U(223),V=U(13956),W=U(59701),q=U(35120),K=U(49237),z=U(1195),Y=U(77938),Q=U(43754),X=U(73797),Z=U(28152),J=U(77065),tt=U(76277),et=U(38920),it=U(11647),st=U(30226),nt=U(97518),at=U(90614);!function(k){k[k.ByItem=0]="ByItem",k[k.ByType=1]="ByType",k[k.ByTypeForStore=2]="ByTypeForStore"}(F||(F={}));let rt=class extends((0,it.o)(j.uAl)){constructor(){super(...arguments),this._iconMode=F.ByItem,this._maxAbbreviatedDigits=1/0,this._forceDisableClickables=!1,this.onBudgetInvalid=new j.HN0,this.onBudgetValid=new j.HN0,this._onItemIdStringChanged=new j.HN0,this.onCurrencyUpdateComplete=new j.HN0,this.onAddClicked=new j.HN0,this._automaticallyUpdate=!0,this._abbreviate=!0}get currencyID(){return this._currencyID}set currencyID(k){this._currencyID=k}create(){super.create(),this._addIcon&&(this._addIcon.active=!1),this._button&&(this.addListenerToSignal(this._button.onEnabledClick,(()=>{this._addIcon.active&&this.onAddClicked.dispatch()})),this.addListenerToSignal(this._button.onInputOver,(()=>{this._abbreviate=!1,this.updateAmount(this._currentAmount,this._currentBudget)})),this.addListenerToSignal(this._button.onInputOut,(()=>{this._abbreviate=!0,this.updateAmount(this._currentAmount,this._currentBudget)}))),j.Aq$.isDefined(this._currencyID)&&(this.updateIcon(),this.updateMagicoinElements()),this._automaticallyUpdate&&this._currencyID&&this.updateAmount(this._currentPlayer.player.getCurrencyAmount(this._currencyID)),this.addAutoUpdateListeners(),$.h.includes(this._currencyID)&&this._hardCurrency.isHardCurrencyMemberLocked()&&(this.gameObject.active=!1)}destroy(){this.onBudgetInvalid.dispose(),this.onBudgetValid.dispose(),this.onCurrencyUpdateComplete.dispose(),this.onAddClicked.dispose(),this._hardCurrency.onBalanceChanged.remove(this.handleHardCurrencyBalanceChanged,this),q.q.instance.game.broadcaster.removeAppListener(X.ib.ItemReceived,this),q.q.instance.game.broadcaster.removeAppListener(X.ib.ItemConsumed,this),this._onItemIdStringChanged.dispose(),super.destroy()}updateAmount(k,B){this._currencyText.text=(0,et.cC)(k,this._abbreviate?this._maxAbbreviatedDigits:1/0),this._currentAmount=k,(j.Aq$.isDefined(B)||j.Aq$.isDefined(this._currentBudget))&&(this._currentBudget=null!=B?B:this._currentBudget,this.updateBudgetDifference(k-this._currentBudget))}updateBudget(k){this._currentBudget=k,j.Aq$.isDefined(this._currentAmount)&&this.updateBudgetDifference(this._currentAmount-k)}updateBudgetFromNewAmount(k){j.Aq$.isDefined(this._currentBudget)&&(this.updateBudgetDifference(this._currentBudget-k),this._currentBudget=k)}updateBudgetDifference(k){var B,U;const F=j.Aq$.isDefined(k)&&k>0;j.Aq$.isDefined(this._insufficientFundsColor)&&(this._currencyText.fill=F?j.Q1f.numberToHexString(this._insufficientFundsColor):j.Q1f.numberToHexString(this._sufficientFundsColor)),this._currencyText.updateText();const G=Y.t.getItem("currency",this._currencyID);null===(B=this._missingAmountPrompt)||void 0===B||B.setTextArguments(null!==(U=F?k:void 0)&&void 0!==U?U:0,st.J.getItemName(G));(F?this.onBudgetInvalid:this.onBudgetValid).dispatch()}updateCurrencyID(k){-1===k||$.h.includes(k)&&this._hardCurrency.isHardCurrencyMemberLocked()?this.gameObject.active=!1:(this.gameObject.active=!0,k!==this._currencyID&&(this._currencyID=k,this._onItemIdStringChanged.dispatch(`currency-${k}`),this.updateIcon(),this._automaticallyUpdate&&this.updateAmount(this._currentPlayer.player.getCurrencyAmount(k)),this.updateMagicoinElements()))}setIconVisible(k){this._currencyIcon&&(this._currencyIcon.Active=k)}playEarnEffect(k){this._currentAmount>=k?j.VyI.log("Attempted to play earn effect with an invalid initial amount",j.$bb.Warning):(this.animateCurrencyChangeIndicator(k-this._currentAmount,"+",this._currencyGainMove),this.startCurrencyCounter(k))}playSpendEffect(k){this._currentAmount<=k?j.VyI.log("Attempted to play spend effect with an invalid initial amount",j.$bb.Warning):(this.animateCurrencyChangeIndicator(this._currentAmount-k,"-",this._currencySpendMove),this.startCurrencyCounter(k))}animateCurrencyChangeIndicator(k,B,U){this._currencyChangeText&&(this._currencyChangeText.text=`${B}${(0,et.cC)(k)}`),null==U||U.startTween()}startCurrencyCounter(k){const B=this._counterTextObject.findComponent(J.B);B.initialNumber=this._currentAmount,B.targetNumber=k;const U=k-this._currentAmount;B.onComplete.addOnce((()=>this.onCurrencyUpdateComplete.dispatch(U<0)),this),this._currentAmount=k,B.startCounter()}enableAutomaticUpdates(k,B){if(this._automaticallyUpdate=k,!k)return;if(!j.Aq$.isDefined(this.currencyID))return;const U=this._currentPlayer.player.getCurrencyAmount(this._currencyID,1===this._currencyID?"gold":"currency");B?this.handleHardCurrencyBalanceChanged({value:U,currency:this._currencyID}):this.updateAmount(U)}updateIcon(){if(!this._currencyIcon)return;const k=this._currencyID,{atlas:B,frame:U}=W.W.getCurrencyIcon(this._iconMode,k);q.q.instance.prodigy.load.assetsAsPromise(B).then((()=>{var G,j,H,V;if(null!==(j=null===(G=this.gameObject)||void 0===G?void 0:G.isDestroyed)&&void 0!==j&&!j&&k===this._currencyID){(null===(H=this._currencyIcon)||void 0===H?void 0:H.GameObject)&&($.h.includes(this._currencyID)&&!this._hardCurrency.isHardCurrencyMemberLocked()&&(this._currencyIcon.GameObject.active=!0),this._currencyIcon.updateAsset(B,U));const G=W.W.getCurrencyIcon(F.ByTypeForStore,k);null===(V=this._currencyChangeIcon)||void 0===V||V.updateAsset(G.atlas,G.frame)}}),j.RQr.createHandler("Failed to load currency icon"))}handleHardCurrencyBalanceChanged(k){!this._automaticallyUpdate||!$.B.includes(this._currencyID)||k.currency!==this._currencyID||$.h.includes(this._currencyID)&&this._hardCurrency.isHardCurrencyMemberLocked()||(k.valuethis._currentAmount&&this.playEarnEffect(k.value))}handleItemReceived(k){var B;if(!this._automaticallyUpdate||this._currencyID!==k.ID||"currency"!==k.type&&"gold"!==k.type)return;const U=null!==(B=k.balance)&&void 0!==B?B:this._currentAmount+k.N;this.playEarnEffect(U)}handleItemConsumed(k){var B;if(!this._automaticallyUpdate||this._currencyID!==k.ID||"currency"!==k.type&&"gold"!==k.type)return;const U=null!==(B=k.balance)&&void 0!==B?B:this._currentAmount-Math.abs(k.N);this.playSpendEffect(U)}updateMagicoinElements(){this._addIcon&&this._button&&!this._forceDisableClickables&&(this._addIcon.active=(0,tt.G)(H.l).enabled&&27===this._currencyID&&!this._currentPlayer.player.isPlayingAtSchool())}addAutoUpdateListeners(){this._hardCurrency.onBalanceChanged.add(this.handleHardCurrencyBalanceChanged,this),q.q.instance.game.broadcaster.addAppListener(X.ib.ItemReceived,this.handleItemReceived,this),q.q.instance.game.broadcaster.addAppListener(X.ib.ItemConsumed,this.handleItemConsumed,this)}};(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",z.E)],rt.prototype,"_currentPlayer",void 0),(0,G.Cg)([(0,V.b)("5c7-e02d"),(0,G.Sn)("design:type",Q.W)],rt.prototype,"_hardCurrency",void 0),(0,G.Cg)([(0,j.Cdj)(j.$Bt.LocalizationService),(0,G.Sn)("design:type",j.dTp)],rt.prototype,"_baseLocalizer",void 0),(0,G.Cg)([(0,j.gfw)(F),(0,G.Sn)("design:type",Number)],rt.prototype,"_iconMode",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number),(0,G.Sn)("design:paramtypes",[Number])],rt.prototype,"currencyID",null),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],rt.prototype,"_currencyIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],rt.prototype,"_currencyChangeIcon",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],rt.prototype,"_currencyText",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],rt.prototype,"_maxAbbreviatedDigits",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",Number)],rt.prototype,"_insufficientFundsColor",void 0),(0,G.Cg)([(0,j.iEU)(),(0,G.Sn)("design:type",Number)],rt.prototype,"_sufficientFundsColor",void 0),(0,G.Cg)([(0,j.MnK)(nt.R),(0,G.Sn)("design:type",nt.R)],rt.prototype,"_missingAmountPrompt",void 0),(0,G.Cg)([(0,j.MnK)(at.P),(0,G.Sn)("design:type",at.P)],rt.prototype,"_currencyGainMove",void 0),(0,G.Cg)([(0,j.MnK)(at.P),(0,G.Sn)("design:type",at.P)],rt.prototype,"_currencySpendMove",void 0),(0,G.Cg)([(0,j.MnK)(j.EYj),(0,G.Sn)("design:type",j.EYj)],rt.prototype,"_currencyChangeText",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],rt.prototype,"_counterTextObject",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],rt.prototype,"_addIcon",void 0),(0,G.Cg)([(0,j.MnK)(K.$),(0,G.Sn)("design:type",K.$)],rt.prototype,"_button",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],rt.prototype,"_forceDisableClickables",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rt.prototype,"onBudgetInvalid",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rt.prototype,"onBudgetValid",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rt.prototype,"_onItemIdStringChanged",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rt.prototype,"onCurrencyUpdateComplete",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],rt.prototype,"onAddClicked",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],rt.prototype,"_automaticallyUpdate",void 0),rt=(0,G.Cg)([(0,j.EVk)("CurrencyDisplay",Z.Y.ui)],rt)},63811:(k,B,U)=>{"use strict";U.d(B,{H:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this._openingUnifiedStore=!1}close(){this.store.close(this._openingUnifiedStore)}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"_openingUnifiedStore",void 0),$=(0,F.Cg)([(0,G.EVk)("StoreClose",j.Y.ui)],$)},25317:(k,B,U)=>{"use strict";U.d(B,{D:()=>X});var F=U(8674),G=U(87490),j=U(62459),$=U(95359),H=U(88022),V=U(35120),W=U(43846),q=U(34603),K=U(47717);const z={[$.IE.Defence]:"ITEM_BONUS_DEFENCE",[$.IE.Hp]:"ITEM_BONUS_HP",[$.IE.Power]:"ITEM_BONUS_POWER",[$.IE.Speed]:"ITEM_BONUS_SPEED"},Y={[G.EElementType.Astral]:"icon-32x32-astral",[G.EElementType.Fire]:"icon-32x32-fire",[G.EElementType.Ice]:"icon-32x32-ice",[G.EElementType.Physical]:"icon-32x32-physical",[G.EElementType.Plant]:"icon-32x32-earth",[G.EElementType.Shadow]:"icon-32x32-shadow",[G.EElementType.Storm]:"icon-32x32-storm",[G.EElementType.Water]:"icon-32x32-water",[G.EElementType.Neutral]:"icon-32x32-neutral"},Q={[G.EElementType.Astral]:"ELEMENT_ASTRAL",[G.EElementType.Fire]:"ELEMENT_FIRE",[G.EElementType.Ice]:"ELEMENT_ICE",[G.EElementType.Physical]:"ELEMENT_PHYSICAL",[G.EElementType.Plant]:"ELEMENT_PLANT",[G.EElementType.Shadow]:"ELEMENT_SHADOW",[G.EElementType.Storm]:"ELEMENT_STORM",[G.EElementType.Water]:"ELEMENT_WATER",[G.EElementType.Neutral]:"ELEMENT_NEUTRAL"};let X=class extends j.uAl{constructor(){super(...arguments),this._positiveDiffColor=4717145,this._negativeDiffColor=15953264,this._neutralDiffColor=16777215}create(){super.create(),this.hideAll()}setGearStatData(k,B,U){this.hideAll(),this.setLabel((0,W.k)(z[k])),this.setStatDiff(U),this.setStatValue(B),this.setIconAsset(H._.Ui_battle_revamp_json,K.H.ICON_FRAMES[k]),this._statValue.GameObject.transform.setPositionX(-(this._statDiff.getDimensions().width+5))}setSpellStatData(k){this.hideAll(),this.setLabel(k.name),this.setIconAsset(k.iconGuid),this.setElementAsset(H._.Ui_raster_icons_json,Y[k.element])}setPetElementData(k){this.hideAll(),this.setIconAsset(H._.Ui_raster_icons_json,Y[k]),this.setLabel((0,W.k)(Q[k]))}setLabel(k){this._label.text=k,this._label.GameObject.active=!0,this.gameObject.active=!0}setStatValue(k){this._statValue.text=`${k}`,this._statValue.GameObject.active=!0,this.gameObject.active=!0}setStatDiff(k){if(!j.Aq$.isDefined(k))return void(this._statDiff.GameObject.active=!1);const B=k<0?"":"+";let U=this._neutralDiffColor;k<0?U=this._negativeDiffColor:k>0&&(U=this._positiveDiffColor),this._statDiff.text=`(${B}${k})`,this._statDiff.fill=j.Q1f.numberToHexString(U),this._statDiff.GameObject.active=!0,this.gameObject.active=!0}setIconAsset(k,B){this._icon.setAsset(k,B).then((()=>{this._icon.GameObject.active=!0,this.gameObject.active=!0})).catch(j.RQr.createHandler("Error loading gear stat icon"))}setElementAsset(k,B){this._spellElement.setAsset(k,B).then((()=>{this._spellElement.GameObject.active=V.q.instance.game.cache.getFrameData(k).checkFrameName(B),this.gameObject.active=!0})).catch(j.RQr.createHandler("Error loading spell element icon"))}hideAll(){this._icon.GameObject.active=!1,this._label.GameObject.active=!1,this._statValue.GameObject.active=!1,this._statDiff.GameObject.active=!1,this._spellElement.GameObject.active=!1,this.gameObject.active=!1}};(0,F.Cg)([(0,j.MnK)(q._),(0,F.Sn)("design:type",q._)],X.prototype,"_icon",void 0),(0,F.Cg)([(0,j.MnK)(j.EYj),(0,F.Sn)("design:type",j.EYj)],X.prototype,"_label",void 0),(0,F.Cg)([(0,j.MnK)(j.EYj),(0,F.Sn)("design:type",j.EYj)],X.prototype,"_statValue",void 0),(0,F.Cg)([(0,j.MnK)(j.EYj),(0,F.Sn)("design:type",j.EYj)],X.prototype,"_statDiff",void 0),(0,F.Cg)([(0,j.MnK)(q._),(0,F.Sn)("design:type",q._)],X.prototype,"_spellElement",void 0),(0,F.Cg)([(0,j.iEU)(),(0,F.Sn)("design:type",Number)],X.prototype,"_positiveDiffColor",void 0),(0,F.Cg)([(0,j.iEU)(),(0,F.Sn)("design:type",Number)],X.prototype,"_negativeDiffColor",void 0),(0,F.Cg)([(0,j.iEU)(),(0,F.Sn)("design:type",Number)],X.prototype,"_neutralDiffColor",void 0),X=(0,F.Cg)([(0,j.EVk)("StoreGearStats")],X)},21097:(k,B,U)=>{"use strict";U.d(B,{Dq:()=>It,NL:()=>Dt,WE:()=>Ot});var F=U(8674),G=U(62459),j=U(95359),$=U(88022),H=U(51742),V=U(36648),W=U(10471),q=U(223),K=U(17446),z=U(64868),Y=U(59701),Q=U(35120),X=U(49237),Z=U(76974),J=U(91207),tt=U(77938),et=U(55734),it=U(73797),st=U(31427),nt=U(99617),at=U(13693),rt=U(85540),ot=U(51972),ht=U(48199),ct=U(76277),dt=U(41674),lt=U(15485),ut=U(46784),ft=U(24110),bt=U(30405),pt=U(44094),vt=U(30226),gt=U(47255),mt=U(64353),yt=U(21418),_t=U(53661),Et=U(95057),wt=U(16847),Tt=U(25317);const St=1.55,At={pet:1,dorm:1.25,mathTownFrame:.75,mathTownInterior:.75,mathTownDecor:.75,follow:St,item:St,spellRelic:St,weapon:St,hat:St,outfit:St,boots:St,hair:St,hairColor:St,costume:St},Ct=[37,15,14,13,25,24,38,62,64,63,66,68,71,70,69];var Ot;!function(k){k.MemberLocked="MEMBER_LOCKED",k.LevelLocked="LEVEL_LOCKED",k.NotEnoughCurrency="NOT_ENOUGH_CURRENCY",k.NotEnoughUnsecureCurrency="NOT_ENOUGH_UNSECURE_CURRENCY",k.ServerPurchaseFailed="SERVER_PURCHASE_FAILED",k.OutsideOfHours="Outside of Hours",k.NetworkFailure="Network Failure",k.OfferExpired="Offer is expired",k.NoData="Item card does not have dynamicStoreData",k.AllPurchased="All offers of this card group have been purchased"}(Ot||(Ot={}));const It=["costume","weapon","mount","follow"];let Dt=class extends G.uAl{constructor(){super(...arguments),this._rarityBanners=[],this.onEquipItem=new G.HN0,this.onPurchaseSuccess=new G.HN0,this.onPurchaseFailure=new G.HN0,this._oneLineItemNameRarityBanners=[],this._twoLineItemNameRarityBanners=[],this._autoTooltipPosition={x:640,y:100,arrowDirection:ot.i.DOWN},this._secureCurrencyTooltipPosition={x:1065,y:72,arrowDirection:ot.i.UP},this._buttonLevelLockTooltipPosition={x:1040,y:635,arrowDirection:ot.i.DOWN},this.overrideCurrencyTooltipPosition={x:0,y:0,arrowDirection:ot.i.UP,isOverriding:!1},this._renderOnly=!1,this._renderSelectedItemCount=0}create(){super.create(),Q.q.instance.prodigy.load.assets([H.c.Sfx_button_disabled_state,H.c.Sfx_store_equip,H.c.Sfx_store_purchase,H.c.Sfx_tab_click]),Q.q.instance.game.broadcaster.addAppListener(it.iZ.ToolTipClosed,(()=>{var k;null===(k=this._manualToolTip)||void 0===k||k.close()}),this),this._activePlayer.player.onEquipmentChange.add(this.onEquipmentChanged,this),this.setToDefaultState()}onEquipmentChanged(){var k;(null===(k=this._currentItemData)||void 0===k?void 0:k.data)&&this.renderItemPreview(this._currentItemData.data)}renderSelectedItem(k,B,U=!1){this._purchaseCallback=U?void 0:B,this._renderOnly=U,"currencyID"in k?(this._storeItemCardData=k,this._currentItemData={id:k.item.ID,type:k.item.type,cost:{type:"currency",ID:k.currencyID,N:k.currencyAmount},data:tt.t.getItem(k.item.type,k.item.ID)}):this._currentItemData=Object.assign(Object.assign({},k),{data:tt.t.getItem(k.type,k.id)});const F=++this._renderSelectedItemCount;tt.t.secureGetItem(this._currentItemData.type,this._currentItemData.id).then((k=>{var B,U;if(this.GameObject.isDestroyed||F!==this._renderSelectedItemCount)return;const j=null===(B=k.data)||void 0===B?void 0:B.rarity,$=vt.J.getItemName(k);this.renderItemPreview(k),this.renderBottomPanel(),this._rarityBanners.forEach((k=>k.active=!1)),G.Aq$.isDefined(j)&&(this._rarityBanners[j].active=!0),this.renderItemNameRarityBanner($,null!=j?j:K.E.Common),this.renderButtons(),this.renderItemOwnedCount(),null===(U=this._manualToolTip)||void 0===U||U.close()})).catch(G.RQr.createHandler("StoreItemDetailPreviewComponent: Error fetching item data when attempting to render selected item"))}renderItemOwnedCount(){const k=this._currentItemData.data;if(this._quantityParent.active=!1,!G.Aq$.isDefined(null==k?void 0:k.type)||!G.Aq$.isDefined(null==k?void 0:k.ID))return;const B=this._activePlayer.player.getItemCount(k.type,k.ID);this._quantityParent.active=!0,this._quantityText.text=B.toString()}renderItemNameRarityBanner(k,B){var U;this._itemName.text=k,this._oneLineItemNameRarityBanners.forEach((k=>k.active=!1)),this._twoLineItemNameRarityBanners.forEach((k=>k.active=!1)),this._itemName.wordWrap=!1,(null===(U=this._itemName.GameObject)||void 0===U?void 0:U.transform).sizeDelta.width<=300?this._oneLineItemNameRarityBanners[null!=B?B:0].active=!0:(this._twoLineItemNameRarityBanners[null!=B?B:0].active=!0,this._itemName.wordWrap=!0,this._itemName.updateText()),B===K.E.Rare||B===K.E.Heroic?this._itemName.fill="#ffffff":this._itemName.fill="#363636"}renderBottomPanel(){var k,B;this._bottomSectionLines.active=!1,this._defaultDescription.active=!1,this._spellStats.GameObject.active=!1,this._gearStats.GameObject.active=!1;const U=this._currentItemData.type,F=null===(B=null===(k=this._currentItemData)||void 0===k?void 0:k.data)||void 0===B?void 0:B.data;switch(U){case"pet":this._gearStats.GameObject.active=!0,this._gearStats.setPetElementData(null==F?void 0:F.affinity);break;case"weapon":this.setSpellData(),this.setGearStatData(!0);break;case"hat":case"outfit":case"boots":case"mount":case"follow":this.setGearStatData(!0);break;case"petHat":case"petRelic":this.setGearStatData(!1);break;case"spellRelic":this.setSpellData()}}setSpellData(){var k,B,U,F,j,$,H,W,q;const K=null===(B=null===(k=this._currentItemData)||void 0===k?void 0:k.data)||void 0===B?void 0:B.data;if(!G.Aq$.isDefined(K))return;const z=tt.t.getItem("spellV2",K.spellID);if(!G.Aq$.isDefined(z))return;this._spellStats.GameObject.active=!0;const Y=V.q[pt.$.capitalizeFirstLetter(null!==($=null===(j=null===(F=null===(U=z.metadata)||void 0===U?void 0:U.assets)||void 0===F?void 0:F.icon)||void 0===j?void 0:j.assetKey)&&void 0!==$?$:"")];this._spellStats.setSpellStatData({name:null!==(W=null===(H=z.data)||void 0===H?void 0:H.name)&&void 0!==W?W:"",iconGuid:Y,element:null===(q=z.data)||void 0===q?void 0:q.element})}setGearStatData(k){var B,U,F;const $=this._currentItemData.type,H=null===(U=null===(B=this._currentItemData)||void 0===B?void 0:B.data)||void 0===U?void 0:U.data;if(!G.Aq$.isDefined(null==H?void 0:H.stats))return void G.VyI.log("Could not update gear stat data because itemData is undefined.",G.$bb.Warning);let V=j.IE.Defence,W=0;for(const G of Object.values(j.IE)){const k=H.stats[G];k>W&&(V=G,W=k)}if(W>0)if(this._gearStats.GameObject.active=!0,k){const k=null!==(F=this._activePlayer.player.getGearBattleStats()[$][V])&&void 0!==F?F:0;this._gearStats.setGearStatData(V,W,W-k)}else this._gearStats.setGearStatData(V,W)}setToDefaultState(){var k;this._bottomSectionLines.active=!0,this._defaultDescription.active=!0,this._characterPreview.GameObject.active=!0,this._spellStats.GameObject.active=!1,this._gearStats.GameObject.active=!1,this._itemName.text="",this._quantityParent.active=!1,this._rarityBanners.forEach((k=>k.active=!1)),this._oneLineItemNameRarityBanners.forEach((k=>k.active=!1)),this._twoLineItemNameRarityBanners.forEach((k=>k.active=!1)),this.renderDefaultButtons(),this.cleanUpPreview(),this._characterPreview.addCharacter(this._activePlayer.player),this._characterPreview.setInputEnabled(!1),this._previewContainer.transform.setScale(St,St),null===(k=this._manualToolTip)||void 0===k||k.close()}renderItemPreview(k){var B;this.cleanUpPreview();const U=At[k.type]||1;switch(this._previewContainer.transform.setScale(U,U),k.type){case"pet":this.createPetPreview(k.ID);break;case"follow":this.createFollowPreview(k.ID);break;case"dorm":this.createDormItemPreview(k.ID);break;case"mathTownFrame":this.createTowerTownFrame(k);break;case"mathTownInterior":this.createTowerTownInterior(k);break;case"mathTownDecor":this.createTowerTownDecoration(k);break;case"weapon":case"hat":case"outfit":case"boots":case"costume":case"mount":this._characterPreview.addCharacter(this._activePlayer.player),this._characterPreview.setInputEnabled(!1),this._characterPreview.setEquipment(k.type,k.ID);break;case"item":if(null===(B=k.data.effect)||void 0===B?void 0:B.transform){this._previewContainer.transform.setScale(1,1),this._characterPreview.addCharacter(this._activePlayer.player),this._characterPreview.setInputEnabled(!1),this._characterPreview.transformEffect(k.data.effect);break}case"hair":case"hairColor":this._characterPreview.addCharacter(this._activePlayer.player),this._characterPreview.setAppearance(k.type,k.ID),this._characterPreview.setInputEnabled(!1),this._characterPreview.setEquipment("hat",null);break;default:this.createIconPreview(k)}It.includes(k.type)||this._characterPreview.setEquipment("costume",null)}createPetPreview(k){const B=Q.q.instance.prodigy.create.monster(this.createPreviewContainer(),new et.R(Q.q.instance.game,{ID:k}),1,0,0);B.loadedCallback=()=>B.walk(),B.startLoad(),this._activePlayer.player.encounters.onPetEncountered(k)}createFollowPreview(k){var B;const U=Q.q.instance.prodigy.create.follow(this.createPreviewContainer(),k,1,null,null);null===(B=U.reload)||void 0===B||B.call(U,(()=>{var k;return null===(k=U.walk)||void 0===k?void 0:k.call(U)}))}createDormItemPreview(k){Q.q.instance.prodigy.create.houseItem(this.createPreviewContainer(),k,0,0).findComponent(st.A).setAnchor(.5,1)}createIconPreview(k){const B=Q.q.instance.prodigy.create.item(this.createPreviewContainer(),null,null,{id:k.ID,type:k.type},yt.s.IconNoBackground);B.onContainerLoaded.addOnce((()=>{B.centerX=0,B.bottom=-40}))}createTowerTownFrame(k){const B=J.E.getTowerTownImage(k.data.tag);Q.q.instance.prodigy.load.assets([B],(()=>{this.createPreviewContainer().addChild(Q.q.instance.prodigy.create.sprite(0,0,B,void 0,{x:1,y:1}),Q.q.instance.prodigy.create.sprite(0,0,B,void 0,{x:1,y:1})).scale.x=-1}))}createTowerTownInterior(k){const B=J.E.getTowerTownImage(k.data.tag),U=$._.Ui_towertown_misc_json;Q.q.instance.prodigy.load.assets([U,B],(()=>{this.createPreviewContainer().addChild(Q.q.instance.prodigy.create.sprite(0,0,B,void 0,{x:.5,y:1}),Q.q.instance.prodigy.create.sprite(0,0,U,"interior-ui-mask",{x:.5,y:1}))}))}createTowerTownDecoration(k){const B=J.E.getTowerTownImage(k.data.tag),U=$._.Ui_towertown_misc_json;Q.q.instance.prodigy.load.assets([U,B],(()=>{this.createPreviewContainer().addChild(Q.q.instance.prodigy.create.sprite(0,0,U,"pre-floor-placer",{x:.5,y:1}),Q.q.instance.prodigy.create.sprite(0,0,U,"interior-ui-mask",{x:.5,y:1}),Q.q.instance.prodigy.create.sprite(0,-110,B,void 0,{x:.5,y:1}))}))}createPreviewContainer(){return new G._mx(this._itemPreviewContainer).addComponent(ft.B).getRootContainer()}cleanUpPreview(){this._characterPreview.removeCharacter();for(const k of this._itemPreviewContainer.children)k!==this._characterPreview.GameObject&&k.destroy()}destroy(){var k,B;Q.q.instance.game.broadcaster.removeAppListener(it.iZ.ToolTipClosed,this),this._activePlayer.player.onEquipmentChange.removeAll(this),this.cleanUpPreview(),this.onEquipItem.dispose(),this.onPurchaseFailure.dispose(),this.onPurchaseSuccess.dispose(),null===(k=this._autoToolTip)||void 0===k||k.close(),null===(B=this._manualToolTip)||void 0===B||B.close(),super.destroy()}onBuyButtonClicked(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=Q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),B=this._currentItemData.data;if(Q.q.instance.prodigy.audio.playSFX(43,"purchase"),this._purchaseCallback)try{const U=yield this._purchaseCallback(this._storeItemCardData);if(!U.isSuccess())return void this.onPurchaseFailure.dispatch(this._currentItemData,U.error);if(!U.get())return;this.onPurchaseSuccess.dispatch(this._currentItemData),this._autoToolTip=ht.A.displayToolTipAuto(this._autoToolTip,this._tooltipContainer,{bodyText:k.getText("STORE_TOOLTIP_MESSAGE_0",B.data.name),xPosition:this._autoTooltipPosition.x,yPosition:this._autoTooltipPosition.y}),this.renderButtons(),this.renderItemOwnedCount()}catch(U){G.RQr.logError(U,"Error confirming store purchase"),Q.q.instance.prodigy.open.message(k.getText("NETWORK_ERROR"))}}))}showOtpMlp(){const k=this._currentItemData.cost;if(null!=k&&null!=this._unifiedConversionOpener){const B=gt.o.FunnelNotEnoughCurrency,U=mt.P.shouldUseUnifiedConversionFlow(B)?Et.R.UnifiedConversionFlow:vt.J.showYouTubeMembershipAd(Q.q.instance.game,!0)?Et.R.Video:Et.R.Static,F=Q.q.instance.prodigy.gameContainer.get("c47-20b6");F.featureCommon.sendButtonEvent({buttonName:lt.k.BuyItem,interfaceName:this.shopInterfaceName,interfaceType:dt.Wm.DialogBox,destinationName:(0,ct.G)(q.l).enabled?ut.B.OtpAd:ut.B.MemberAd,saveClickInfo:lt.k.BuyItem});const j=Ct.includes(this.shopId);F.purchase.sendFunnelStart({type:j?"Festival-Store-Hard-Currency-Insufficient-Resources":"Dynamic-Store-Hard-Currency-Insufficient-Resources",category:j?"Festival-Store":"Store",contentId:`${this._currentItemData.type}-${this._currentItemData.id}`,adType:U,adVersion:mt.P.getAdVersion(B)}),this._unifiedConversionOpener.open({[_t.FK.OtpMissingMagicoin]:this.getCurrencyDiff(k)}).catch((k=>{G.VyI.log("There was an error attempting to load the unified conversion flow. Using default behaviour.",G.$bb.Error)}))}}onLockedButtonClicked(){const k=Q.q.instance.prodigy,B=this._activePlayer.player,U="pet"===this._currentItemData.type&&B.kennel.isFull();k.audio.playSFX(49,"pop"),this.getIsOwned()?this.showTooltip("STORE_TOOLTIP_MESSAGE_5",this._buyLockButton.GameObject):B.hasMembership()&&U?this.showTooltip("PURCHASING_MESSAGE_TOO_MANY_PETS_BODY",this._buyLockButton.GameObject):!B.hasMembership()&&U?k.open.battlePassUltimateMemberUpsellModal().catch(G.RQr.createHandler("Could not open MLP.")):this.handleInsufficientCurrency(),this.renderButtons()}handleInsufficientCurrency(){const k=this._currentItemData.cost;if(this.meetsCurrencyRequirement(k))return;if(!("currency"===k.type&&W.h.includes(k.ID)))return void this.showInsufficientCurrencyTooltip();const B=this._activePlayer.player;(0,ct.G)(q.l).enabled?this.showOtpMlp():!B.hasMembership()||B.hasMembershipUpgradeOptions()?this.onMemberBuyButtonClicked(gt.o.FunnelNotEnoughCurrency,"Dynamic-Store-Hard-Currency-Insufficient-Resources","Dynamic-Store-Hard-Currency-Insufficient-Resources-Store",Ot.NotEnoughCurrency):this.showInsufficientCurrencyTooltip()}showInsufficientCurrencyTooltip(){const k=this._currentItemData.cost,B=tt.t.getItem(k.type,k.ID),U=this.getCurrencyDiff(k),F=this.overrideCurrencyTooltipPosition.isOverriding,G=W.h.includes(k.ID)?this._secureCurrencyTooltipPosition:void 0;this.onPurchaseFailure.dispatch(this._currentItemData,Ot.NotEnoughCurrency),this.showTooltip("STORE_TOOLTIP_MESSAGE_3",this._buyLockButton.GameObject,[U,(null==B?void 0:B.data)?vt.J.getItemName(B,U>1):""],F?this.overrideCurrencyTooltipPosition:G)}onDynamicStoreMemberBuyButtonClicked(){let k,B,U,F;const G=this._currentItemData.cost;!this.meetsCurrencyRequirement(G)&&(k=gt.o.FunnelNotEnoughCurrency,B="Dynamic-Store-Hard-Currency-Insufficient-Resources",U="Dynamic-Store-Hard-Currency-Insufficient-Resources-Store",F=Ot.NotEnoughCurrency),this.onMemberBuyButtonClicked(k,B,U,F)}onMemberBuyButtonClicked(k=gt.o.FunnelBuyMemberItem,B="Store-Buy-Member-Item",U="Store",F=Ot.MemberLocked){var G;const j=this._currentItemData.data,$=Q.q.instance.prodigy.gameContainer;Q.q.instance.prodigy.audio.playSFX(18,"pop");const H=mt.P.shouldUseUnifiedConversionFlow(k)?Et.R.UnifiedConversionFlow:vt.J.showYouTubeMembershipAd(Q.q.instance.game,!0)?Et.R.Video:Et.R.Static;$.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:lt.k.BuyMemberItem,interfaceName:this.shopInterfaceName,interfaceType:dt.Wm.DialogBox,saveClickInfo:lt.k.BuyMemberItem}),$.get("c47-20b6").purchase.sendFunnelStart({type:B,category:U,contentId:`${j.type}-${j.ID}`,adType:H,adVersion:mt.P.getAdVersion(k)}),null===(G=this._manualToolTip)||void 0===G||G.close(),Q.q.instance.prodigy.open.membershipInfo(null,{conversionFunnelName:k,conversionFunnelMetadata:`${j.type}-${j.ID}`},lt.k.BuyMemberItem),this.onPurchaseFailure.dispatch(this._currentItemData,F),this.renderButtons()}onEquipButtonPressed(){const k=this._currentItemData.data,B=Q.q.instance.prodigy.gameContainer;Q.q.instance.prodigy.audio.playSFX(42,"equip"),this._activePlayer.player.equip(k.ID,k.type).then((U=>{U&&(this._activePlayer.player.appearanceChanged=!0,this.onEquipItem.dispatch(k),Q.q.instance.game.broadcaster.broadcast(it.J8.PlayerAppearanceUpdated),this._autoToolTip=ht.A.displayToolTipAuto(this._autoToolTip,this._tooltipContainer,{bodyText:B.get(G.$Bt.LocalizationService).getText("STORE_TOOLTIP_MESSAGE_1",k.data.name),xPosition:this._autoTooltipPosition.x,yPosition:this._autoTooltipPosition.y}))})).catch(G.RQr.createHandler(`StoreItemDetailPreviewComponent:onEquipButtonPressed Error equipping item ${k.type}-${k.ID}`)).finally((()=>this.renderButtons()))}onUnequipButtonPressed(){const k=this._currentItemData.data;Q.q.instance.prodigy.audio.playSFX(42,"equip"),this._activePlayer.player.unEquip(k.ID,k.type).then((k=>{k&&(this._activePlayer.player.appearanceChanged=!0,Q.q.instance.game.broadcaster.broadcast(it.J8.PlayerAppearanceUpdated)),this.renderButtons()})).catch(G.RQr.createHandler(`StoreItemDetailPreviewComponent:onUnequipButtonPressed Error unequipping item ${k.type}-${k.ID}`))}onLevelLockedButtonPressed(){const k=this._currentItemData.data;if(!G.Aq$.isDefined(k))return;const B=bt.o.isEquipableType(k.type),U=this._activePlayer.player.isItemOwned({type:k.type,ID:k.ID});this.showTooltip(U&&B?"STORE_TOOLTIP_MESSAGE_6":"STORE_TOOLTIP_MESSAGE_7",this._levelLockButton.GameObject,[k.data.lockLevel,this._activePlayer.player.data.level],this._buttonLevelLockTooltipPosition),this.onPurchaseFailure.dispatch(this._currentItemData,Ot.LevelLocked),this.renderButtons()}showTooltip(k,B,U,F){var j;const $=Q.q.instance.prodigy.gameContainer;Q.q.instance.prodigy.audio.playSFX(49,"pop"),this._manualToolTip=ht.A.displayTooltipTargeted(this._manualToolTip,this._tooltipContainer,{bodyText:$.get(G.$Bt.LocalizationService).getText(k,...null!=U?U:[]),arrowDirection:null!==(j=null==F?void 0:F.arrowDirection)&&void 0!==j?j:ot.i.DOWN},B)}renderDefaultButtons(){this._unequipButton.GameObject.active=!1,this._memberBuyButton.GameObject.active=!1,this._buyButton.GameObject.active=!1,this._wearButton.GameObject.active=!1,this._memberWearButton.GameObject.active=!1,this._levelLockButton.GameObject.active=!1,this._buyLockButton.GameObject.active=!1}getIsOwned(){if(this._storeItemCardData&&z._.isFeatureEnabled())return(0,rt.w)(this._storeItemCardData);const k=this._currentItemData.data;return this._activePlayer.player.isItemOwned({type:k.type,ID:k.ID})}renderButtons(){var k,B;const U=this._currentItemData.data;if(!G.Aq$.isDefined(U)||this._renderOnly)return;const F=bt.o.isEquipableType(U.type),j=Q.q.instance.prodigy.gameContainer.get("5c7-e02d"),$=this._activePlayer.player.hasMembership(),H=!$||this._activePlayer.player.hasMembershipUpgradeOptions(),V="pet"===U.type&&this._activePlayer.player.kennel.isFull(),q=bt.o.isLevelLocked(this._activePlayer.player,null!==(B=null===(k=null==U?void 0:U.data)||void 0===k?void 0:k.lockLevel)&&void 0!==B?B:0),K=this._activePlayer.player.equipment.getEquipment(U.type)===U.ID,z=this.meetsCurrencyRequirement(this._currentItemData.cost),Y="dorm"===U.type&&this._activePlayer.player.house.getOwned(U.ID)>=9,X=this.getIsOwned();let Z=!$&&this.isCurrentItemMemberLocked();"currency"===this._currentItemData.cost.type&&W.h.includes(this._currentItemData.cost.ID)&&!this.isCurrentItemMemberLocked()&&(Z=j.isHardCurrencyMemberLocked(this._currentItemData.cost.N)||H&&!z),this.renderDefaultButtons(),X&&!q?F?(Z?this._memberWearButton.GameObject.active=!K:this._wearButton.GameObject.active=!K,this._unequipButton.GameObject.active=K):this._buyLockButton.GameObject.active=!0:V?this._buyLockButton.GameObject.active=!0:q?(this._levelLockButton.GameObject.findComponentsInChildren(G.EYj).forEach((k=>k.text=`Level ${U.data.lockLevel}`)),this._levelLockButton.GameObject.active=!0):Z?this._memberBuyButton.GameObject.active=!0:!z||Y?this._buyLockButton.GameObject.active=!0:this._buyButton.GameObject.active=!0,this.updateBuyButtonAppearance(this._buyButton.GameObject),this.updateBuyButtonAppearance(this._buyLockButton.GameObject)}lockBuyButton(){this._buyButton.lockState(Z.K.Disabled)}unlockBuyButton(){this._buyButton.unlockState()}updateBuyButtonAppearance(k){const B=this._currentItemData.cost;if(!G.Aq$.isDefined(B.N)||!G.Aq$.isDefined(B.ID))return G.VyI.log("Cost is not correctly defined for this item.",G.$bb.Warning),void(k.active=!1);k.findComponentsInChildren(G.EYj).forEach((k=>{k.text=B.N.toString()}));const U=Y.W.getCurrencyIcon(wt.h.ByTypeForStore,B.ID);Q.q.instance.prodigy.load.assetsAsPromise(U.atlas).then((()=>{k.findComponentsInChildren(G.vYh).forEach((k=>{k.updateAsset(U.atlas,U.frame),k.GameObject.active=!0}))}),G.RQr.createHandler("Failed to load currency icon"))}isCurrentItemMemberLocked(){var k,B,U,F,G;return 1===(null!==(U=null!==(k=this._currentItemData.member)&&void 0!==k?k:null===(B=this._currentItemData.data)||void 0===B?void 0:B.member)&&void 0!==U?U:null===(G=null===(F=this._currentItemData.data)||void 0===F?void 0:F.data)||void 0===G?void 0:G.member)}meetsCurrencyRequirement(k){if(1===k.ID)return this._activePlayer.player.getGold()>=k.N;if("currency"===k.type&&W.B.includes(k.ID)){return Q.q.instance.prodigy.gameContainer.get("5c7-e02d").getBalance(k.ID)>=k.N}return this._activePlayer.player.backpack.hasItem(k.type,k.ID)>=k.N}getCurrencyDiff(k){if("currency"===k.type&&1===k.ID)return k.N-this._activePlayer.player.getGold();if("currency"===k.type&&W.B.includes(k.ID)){const B=Q.q.instance.prodigy.gameContainer.get("5c7-e02d");return k.N-B.getBalance(k.ID)}return k.N-this._activePlayer.player.backpack.hasItem(k.type,k.ID)}};(0,F.Cg)([(0,G.MnK)(nt.I),(0,F.Sn)("design:type",nt.I)],Dt.prototype,"_unifiedConversionOpener",void 0),(0,F.Cg)([(0,G.Cdj)("e20-0fb0"),(0,F.Sn)("design:type",Object)],Dt.prototype,"_activePlayer",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Dt.prototype,"_bottomSectionLines",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Dt.prototype,"_defaultDescription",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Dt.prototype,"_previewContainer",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Dt.prototype,"_itemPreviewContainer",void 0),(0,F.Cg)([(0,G.MnK)(at.Y),(0,F.Sn)("design:type",at.Y)],Dt.prototype,"_characterPreview",void 0),(0,F.Cg)([(0,G.MnK)(Tt.D),(0,F.Sn)("design:type",Tt.D)],Dt.prototype,"_gearStats",void 0),(0,F.Cg)([(0,G.MnK)(Tt.D),(0,F.Sn)("design:type",Tt.D)],Dt.prototype,"_spellStats",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],Dt.prototype,"_rarityBanners",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Dt.prototype,"_tooltipContainer",void 0),(0,F.Cg)([(0,G.MnK)(X.$),(0,F.Sn)("design:type",X.$)],Dt.prototype,"_buyButton",void 0),(0,F.Cg)([(0,G.MnK)(X.$),(0,F.Sn)("design:type",X.$)],Dt.prototype,"_buyLockButton",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Dt.prototype,"onEquipItem",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Dt.prototype,"onPurchaseSuccess",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Dt.prototype,"onPurchaseFailure",void 0),(0,F.Cg)([(0,G.MnK)(X.$),(0,F.Sn)("design:type",X.$)],Dt.prototype,"_wearButton",void 0),(0,F.Cg)([(0,G.MnK)(X.$),(0,F.Sn)("design:type",X.$)],Dt.prototype,"_unequipButton",void 0),(0,F.Cg)([(0,G.MnK)(X.$),(0,F.Sn)("design:type",X.$)],Dt.prototype,"_memberBuyButton",void 0),(0,F.Cg)([(0,G.MnK)(X.$),(0,F.Sn)("design:type",X.$)],Dt.prototype,"_memberWearButton",void 0),(0,F.Cg)([(0,G.MnK)(X.$),(0,F.Sn)("design:type",X.$)],Dt.prototype,"_levelLockButton",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],Dt.prototype,"_oneLineItemNameRarityBanners",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],Dt.prototype,"_twoLineItemNameRarityBanners",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],Dt.prototype,"_itemName",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Dt.prototype,"_quantityParent",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],Dt.prototype,"_quantityText",void 0),Dt=(0,F.Cg)([(0,G.EVk)("StoreItemDetailPreview")],Dt)},40392:(k,B,U)=>{"use strict";U.d(B,{i:()=>ne});var F=U(8674),G=U(58268),j=U(62459),$=U(95891),H=U.n($),V=U(113),W=U(88022),q=U(99625),K=U(51742),z=U(36648),Y=U(56942),Q=U(47708),X=U(97495),Z=U(40295);class J{}J.DEFAULT_ICON_SCALE=.8,J.DEFAULT_ICON_OFFET={x:3,y:-12},J.SUB_ICON_SCALE=.8,J.SUB_ICON_OFFSET={x:30,y:20},J.ICON_BASE_FRAME="Map-Pin-FeaturedPet",J.SUB_ICON_FRAME="FeaturedPet-Paw-Icon";var tt=U(28344),et=U(42448),it=U(90633),st=U(73678),nt=U(61468),at=U(35120),rt=U(49237),ot=U(91207),ht=U(34829),ct=U(77938),dt=U(86051),lt=U(10592),ut=U(90817),ft=U(2212),bt=U(93867),pt=U(84399),vt=U(35488),gt=U(17740),mt=U(52322),yt=U(13367),_t=U(73797),Et=U(11624),wt=U(46548),Tt=U(17509),St=U(42749),At=U(43531),Ct=U(15485),Ot=U(46784),It=U(65050),Dt=U(41674),Rt=U(96494),Pt=U(76277),Mt=U(44357),Nt=U(68152),xt=U(29546),Lt=U(24285),kt=U(80060),Bt=U(64271),Ut=U(47728),Ft=U(85126),Gt=U(4631),jt=U(76711),$t=U(25983),Ht=U(85515),Vt=U(48842),Wt=U(5075),qt=U(41968),Kt=U(26691),zt=U(45902),Yt=U(82680),Qt=U(74208),Xt=U(32456),Zt=U(13751),Jt=U(3785),te=U(15989);const ee=(0,U(77601).gb)({key:"arcadia-branding-in-math-rpg",activateAssociatedExperiments:0,default:!1});var ie=U(93054);class se{constructor(k){var B;this.isForceLocked=!1,Object.assign(this,k),k.difficultyModeAgnostic||null!==(B=this.difficultyMode)&&void 0!==B||(this.difficultyMode=X.i.Regular)}getLocalizer(){var k;return null!==(k=this._localizer)&&void 0!==k?k:this._localizer=at.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService)}meetsRequirements(){const k=this.getRequirementsID();return!this.isUnreleased&&(!j.Aq$.isDefined(k)||at.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirementsDeprecated(k))}getRequiredLevel(){var k;return null!==(k=this._requiredLevel)&&void 0!==k?k:this._requiredLevel=xt.X.getLevelRequirement(this.getRequirementsID())}getDeniedSubjects(){return xt.X.getDeniedSubjectRequirement(this.getRequirementsID())}isCurrentSubjectDenied(){const k=this.getDeniedSubjects();if(k){const B=at.q.instance.prodigy.gameContainer.get("f1d-f7b1").getSubject();if(k.includes(B))return!0}return!1}isCurrentProgressDenied(){const k=this.getZonePrerequisites();if(!k||0===k.length)return!1;return k.some((k=>!ie.P.hasPlayerCompletedFinalQuestForZone(k)))}isHidden(){return!!this.hideEvaluationFunc&&this.hideEvaluationFunc()}getRequirementsID(){return this.requirementsID}getGenericLockMessage(){return this.getLocalizer().getText("ZONE_LEVEL_REQUIREMENT",this.getRequiredLevel(),this.getName())}getLockMessage(){var k;const B=at.q.instance.prodigy.gameContainer.get("db5-fb6e").getFeatureRequirementAsset(this.getRequirementsID()),U=null===(k=null==B?void 0:B.metadata)||void 0===k?void 0:k.textKey,F=(null==U?void 0:U.length)>0;if(F&&(this.lockKey=U),F){const k=ne.getHighestAvailableZoneData().getName();return k?this.getLocalizer().getText(this.lockKey,k,this.getName()):this.getGenericLockMessage()}return this.getLocalizer().getText(this.lockKey,this.getRequiredLevel())}getName(){return"arcadia"!==this.zone||(0,Pt.G)(ee)?this.nameKey?this.getLocalizer().getText(this.nameKey):null:this.getLocalizer().getText("GAME_ISLAND_MAP")}getLockName(){return this.lockNameKey?this.getLocalizer().getText(this.lockNameKey):null}getSummary(){return this.summaryKeyOverrideFunc?this.getLocalizer().getText(this.summaryKeyOverrideFunc()):this.summaryKey?this.getLocalizer().getText(this.summaryKey):null}getGoButtonText(){return this.goButtonKey?this.getLocalizer().getText(this.goButtonKey):null}isVisited(){return!this.shouldTrackVisits||j.Aq$.isDefined(at.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.get(`zone-${this.zone}`))}getZonePrerequisites(){return xt.X.getZonePrerequisiteRequirement(this.getRequirementsID())}}class ne extends Yt.W{get prefab(){return this._prefabComponent}get forceLockedZoneIds(){var k;return null!==(k=this._forceLock)&&void 0!==k?k:[]}static setNextVisitParameters(k){Object.assign(this._nextVisitOverrides,k)}constructor(k,B,U={}){var F;const{disableClose:G=!1,forceLock:$=[],assets:W=[],forceUnlock:q=[],disableZoneGoals:K=!1,injectedValues:z={},disableDifficultyModeSelect:Y=!1,difficultyMode:Q,autoOpenDialogueForZoneID:Z,onClose:J=H().noop,onCloseButton:tt=H().noop,onInitialized:et}=Object.assign(Object.assign({},U),ne._nextVisitOverrides);if(super(k,B,70,{},ne.BASE_ASSETS.concat(W).concat(ne.getNonDependencyAssetsForPreload())),this.dialogueContainer=null,this._prefabComponent=null,this._prefabObj=null,this._strokeObjects=[],this._puppetMasterIndicator=null,this._gameObjectCreationPromises=[],this._isZoneGoalsActive=!0,this._isZoneLockCutsceneActive=!1,this.onWorldMapInitialized=new j.HN0,this._destroyZoneGoalsLayerOnClose=!1,this._isFestivalActive=!!at.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival(),this._festivalTravelModalEnabled=(0,Pt.G)(gt.t),this._notificationBlockedZones=[],this.game=k,this._disableClose=G,this._disableDifficultyModeSelect=Y,this._autoOpenDialogueForZoneID=Z,this._disableZoneGoals=K,this._forceUnlock=q,this._forceLock=[...$,...at.q.instance.prodigy.classModeController.getInClassDisabledZones()],this._injectedValues=z,this._injectedValues[Jt.z.WorldMapMenuInstanceLockedZones]=[...this._forceLock],this.onClose=J,this.isFullScreenUI=!0,this._closeButtonCallback=tt,ne.DIFFICULTY_MODE=null!==(F=null!=Q?Q:this.playerData.player.currentDifficulty)&&void 0!==F?F:X.i.Regular,at.q.instance.prodigy.gameContainer.get("12f-4e29").isBreadcrumbComplete(it.B.FEATURE_FIREFLY_QUEST_REVISIONS,it.B.BREADCRUMB_SHIVERCHILL_UNLOCKED)){const k=ne.BUTTONS_CONFIG.find((k=>k.tag===V.O.Shiverchill));k&&(k.requirementsID=32)}ne._nextVisitOverrides={},et&&this.onWorldMapInitialized.addOnce(et)}create(){super.create();const k=at.q.instance.prodigy.gameContainer.get("d0e-64fd");if(this._prefabObj=kt.d.loadWithInjectedValuesFromGUID(k,q.l.WorldMap,this._injectedValues),this._prefabComponent=this._prefabObj.findComponentInChildren(Zt.n),this._difficultyModeComponent=this._prefabObj.findComponentInChildren(Qt.k),this._difficultyModeComponent.setDifficultyMode(ne.DIFFICULTY_MODE),this.dialogueContainer.addChild(this._prefabObj.legacyTransform.group),at.q.instance.game.broadcaster.addAppListener(_t.n8.WorldMapDifficultyModeChanged,(()=>{this.onDifficultyModeChanged()}),this),this._isZoneLockCutsceneActive||this._showZoneLockCutsceneLinearCampaignTransition)return void this.loadZoneLockingExperience().catch((()=>j.VyI.log("Failed to load zone locking experience",j.$bb.Error)));let B=!this._disableZoneGoals&&this.isZoneGoalsEnabled();this.initializePrefab(B).suppressInteractions&&(B=!1),B?this.loadZoneGoalsUI().catch((()=>j.VyI.log("Failed to load zone goals UI",j.$bb.Error))):this.sendInterfaceOpenEvent(),this._prefabComponent.difficultySelectorButtonText&&this.setDifficultyButtonText(),this._prefabComponent.difficultySelectorButtonNotificationBadge&&(this._prefabComponent.difficultySelectorButtonNotificationBadge.active=!this.breadcrumbManager.isBreadcrumbComplete(it.B.FEATURE_CAMPAIGN_REPLAY,it.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_HARD_MODE)),this._prefabComponent.onEnableZoneGoals.add((k=>{this.enableZoneGoals(k)}),this)}onDifficultyModeChanged(){var k;if(!ft.J.shouldShowWorldMapHardModeFirstEntryDialogue()||ut.gz.initialized){for(const k of this._prefabObj.findComponentsInChildren(qt.P))k.run();this._notificationBlockedZones=[],this.setupAllLocations(),this.setDifficultyButtonText(),this._forceLock.indexOf("DISABLE_TITAN")<0&&this.fetchTitanData(),null===(k=this._zoneGoalsController)||void 0===k||k.dismiss(),this._prefabComponent.closeButton.GameObject.active=!1}else this.startHigherDifficultyFTUE(X.i.Hard)}startHigherDifficultyFTUE(k){at.q.instance.game.broadcaster.addAppListener(_t.sn.HardModeFtueStepAdvanced,this.hardModeFtueStepEventHandler.bind(this),this),ut.gz.instance.beginHardModeFirstEntryExperience();const B=k===X.i.Hard?st.A_.FORESTHARD:st.A_.FORESTEXPERT;for(const U of this._prefabObj.findComponentsInChildren(qt.P))U._zoneId!==B&&U.showGuideHand(!1)}setActive(k){super.setActive(k),ut.gz.initialized&&(j.wa5.getActiveScene().getLayer(Ht.E.OverlayLayer).visible=!0)}static getNonDependencyAssetsForPreload(){return[...Ut.x.getAllFestivalMapButtonImages(),Xt.u.getDailyElementalBoostSpineGUID()]}addOrMakeZoneGoalsLayerVisible(){j.wa5.getActiveScene().hasLayer(ne.ZONE_GOALS_LAYER_NAME)?j.wa5.getActiveScene().getLayer(ne.ZONE_GOALS_LAYER_NAME).visible=!0:(this._destroyZoneGoalsLayerOnClose=!0,j.wa5.getActiveScene().addLayer(ne.ZONE_GOALS_LAYER_NAME,ne.ZONE_GOALS_LAYER_DEPTH,!0))}showGemAwardedSequence(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;yield this.loadZoneGoalsUI();const F=Bt.N.getCoreZonesInOrder(ne.DIFFICULTY_MODE),G=F[F.findIndex((B=>B.zone===k))+1],$=j.Aq$.isDefined(G)&&!ne.isZoneLockedParams(G,this.featureRequirements,this._forceLock,this._forceUnlock);if(this._prefabObj&&!this._prefabObj.isDestroyed){(null!==(B=this.prefab.GameObject.findComponentsInChildren(qt.P,!0))&&void 0!==B?B:[]).forEach((k=>{k.showGuideHand(!1),k._zoneId!==(null==G?void 0:G.zone)&&k.onShowGuideHand.removeAll()})),this._indicatorContainer.visible=!1,this.addOrMakeZoneGoalsLayerVisible(),null===(U=this._zoneGoalsController)||void 0===U||U.showGemAwardSequence(k,(()=>{var k;this._indicatorContainer.visible=!1,$&&(null===(k=this._prefabObj.findComponentsInChildren(qt.P).find((k=>k._zoneId===(null==G?void 0:G.zone))))||void 0===k||k.onShowGuideHand.dispatch(!0)),this.enableZoneGoals(!1)}))}}))}loadZoneLockingExperience(){return(0,F.sH)(this,void 0,void 0,(function*(){this.initializePrefab(!1),this._prefabComponent.GameObject.findComponentsInChildren(rt.$).forEach((k=>{k.inputEnabled=!1})),this.game.broadcaster.addAppListener(_t._D.PuppetmasterWorldMapSpell,(()=>this.onPuppetMasterZoneLockSpell()),this),this.game.broadcaster.addAppListener(_t._D.PuppetmasterCutsceneComplete,(()=>this.onZoneLockCutsceneComplete()),this),this.game.broadcaster.addAppListener(_t.n8.WorldMapZoneSelected,(()=>this.completeZoneLockExperienceSeenBreadcrumb()),this);const k=at.q.instance.prodigy.gameContainer.get("d0e-64fd"),B=yield k.loadWithDependenciesFromGUID(q.l.ZoneLockedSequence);this._prefabObj&&!this._prefabObj.isDestroyed&&(j.wa5.getActiveScene().addGameObject(B),this.addOrMakeZoneGoalsLayerVisible(),B.setLayer(ne.ZONE_GOALS_LAYER_NAME,!0),this.sendInterfaceOpenEvent())}))}onPuppetMasterZoneLockSpell(){var k;for(let B=0;B{k.inputEnabled=!0}));const B=null===(k=ne.getHighestAvailableZoneData())||void 0===k?void 0:k.prefabIndex;if(j.Aq$.isDefined(B)){const k=this._prefabComponent.getIconContainer(B),U=at.q.instance.prodigy.gameContainer.get("d0e-64fd").loadWithDependenciesFromGUID(q.l.GuideHandSortingAnchor).then((B=>{var U,F;this.dialogueContainer.addChild(B.findComponent(j.jsv).getRootContainer()),null===(U=B.findComponent(j.XVE))||void 0===U||U.setPositionX(k.legacyTransform.x-50),null===(F=B.findComponent(j.XVE))||void 0===F||F.setPositionY(k.legacyTransform.y-100)})).catch((()=>j.VyI.log("Failed to load Guide Hand prefab",j.$bb.Error)));this._gameObjectCreationPromises.push(U)}}completeZoneLockExperienceSeenBreadcrumb(){at.q.instance.prodigy.gameContainer.get("12f-4e29").completeBreadcrumb(it.B.FEATURE_ZONE_LOCK_CUTSCENE,it.B.BREADCRUMB_PUPPETMASTER_WORLD_MAP_SEQUENCE),this.game.broadcaster.removeAppListener(_t.n8.WorldMapZoneSelected,this)}activateLinearCampaignTransition(){this._showZoneLockCutsceneLinearCampaignTransition=!0}isZoneGoalsEnabled(){const k=at.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return k.ultimateSessionStatus===lt.n.None&&k.hasCompletedTutorial()}loadZoneGoalsUI(){return(0,F.sH)(this,void 0,void 0,(function*(){if(j.Aq$.isDefined(this._zoneGoalsPromise))return this._zoneGoalsPromise;const k=at.q.instance.prodigy.gameContainer.get("d0e-64fd");return this._zoneGoalsPromise=k.loadWithDependenciesFromGUID(q.l.ZoneGoalsMain).then((k=>{this._prefabObj&&!this._prefabObj.isDestroyed&&(this._zoneGoalsObject=k,j.wa5.getActiveScene().addGameObject(this._zoneGoalsObject),this.addOrMakeZoneGoalsLayerVisible(),this._zoneGoalsObject.setLayer(ne.ZONE_GOALS_LAYER_NAME,!0),this._zoneGoalsController=this._zoneGoalsObject.findComponentInChildren(zt._),this._zoneGoalsController.onApplyCustomDisplay.add(this.applyCustomHighlight,this),this._zoneGoalsController.onClearCustomDisplay.add(this.clearCustomHighlight,this),this._zoneGoalsController.onZonePanelActivated.add((k=>{const B=this.buttonConfigByQuestIndexAndDifficulty(k,ne.DIFFICULTY_MODE),U=ne.isZoneLockedParams(B,this.featureRequirements,this._forceLock);this.openLocation(B,U)})),this._isZoneGoalsActive?bt.U.shouldShowEndgameNootWorldMapDialogue()||bt.U.isStepComplete(Z.B.PuppetMasterDefeated)||this._zoneGoalsController.tryAutoTrigger():this.enableZoneGoals(!1),this.sendInterfaceOpenEvent(this._zoneGoalsController.getCurrentActivePanels()))})).catch((()=>{j.VyI.log("Failed to load zone goals UI",j.$bb.Error)})),this._zoneGoalsPromise}))}initializePrefab(k){var B;const U={suppressInteractions:!1};if(this._prefabComponent.GameObject.legacyTransform.group.updateTransform(),this._indicatorContainer=at.q.instance.game.add.container(),this._prefabObj.legacyTransform.group.addChild(this._indicatorContainer),this._prefabComponent.menuTitle.text=this.localizer.getText("WORLD_MAP_TITLE"),this._disableClose?this._prefabComponent.closeButton.GameObject.active=!1:this.setupCloseButton(),pt.R.isFeatureEnabled()&&bt.U.isStepComplete(Z.B.PuppetMasterDefeated)&&(this._prefabComponent.difficultySelectorButton.GameObject.active=!this._disableDifficultyModeSelect),this._isZoneLockCutsceneActive||this._showZoneLockCutsceneLinearCampaignTransition){for(const k of ne.BUTTONS_CONFIG)this.setupLocation(k,null===(B=k.shouldLockForPuppetMasterZoneLockSpell)||void 0===B?void 0:B.call(k),!1,!1);return this._indicatorContainer.visible=!1,this.setupStrokeObjects(!1),this.onWorldMapInitialized.dispatch(this),U}if(U.suppressInteractions||(U.suppressInteractions=this.startDialogue()),this.setupAllLocations(U.suppressInteractions),this.setupStrokeObjects(k),!U.suppressInteractions)for(const j of this._prefabObj.findComponentsInChildren(qt.P))j.run()&&(U.suppressInteractions=!0,U.activeZoneUnlockComponent=j);const F=this._prefabObj.findComponentInChildren(Xt.u);U.suppressInteractions?F.blockReveal=!0:F.attemptReveal();const G=this.playerData.player;if(G.tutorial.getMenuValue(dt.K.WORLD_MAP.INTRO)<1){G.tutorial.setMenuValue(dt.K.WORLD_MAP.INTRO,1);const k=new At.rD(this.game);k.addEvents([{dialogueData:k.dataProvider.get(28),blockInput:!0}]),k.start()}if(G.ultimateSessionStatus===lt.n.TrackingNPC&&this._forceLock.indexOf("DISABLE_ULTIMATES_QUEST")<0&&this.setupNPCLocation(),G.ultimateSessionStatus===lt.n.TamingUltimate&&this._forceLock.indexOf("DISABLE_ULTIMATES_QUEST")<0&&this.setupUltimateLocation(),this._forceLock.indexOf("DISABLE_TITAN")<0&&this.fetchTitanData(),this._forceLock.indexOf("DISABLE_DUNGEON")<0&&this.featureRequirements.meetsRequirementsDeprecated(43)&&!ne.isZoneLockedParams(ne.BUTTONS_CONFIG[Et.P.Shiverchill],this.featureRequirements)&&ne.isInDifficultyMode(X.i.Regular)&&this.setupDungeonIcons(),bt.U.isEndgameQuestActive()&&this.setupPuppetMasterIndicator(),this._indicatorTween=this.game.add.tween(this._indicatorContainer,this._indicatorContainer).to({y:10},400,j.GS3.Quadratic.InOut,!0,0,ht.s.MAX_SAFE_INTEGER,!0),this.game.broadcaster.broadcast(_t.sd.GetTotalFriendRequests,"FriendsList",[!1]),j.Aq$.isDefined(this._autoOpenDialogueForZoneID)){const k=ne.BUTTONS_CONFIG.find((k=>k.zone===this._autoOpenDialogueForZoneID));if(k){const B=ne.isZoneLockedParams(k,this.featureRequirements,this._forceLock);U.activeZoneUnlockComponent?U.activeZoneUnlockComponent.onShowGuideHand.addOnce((()=>this.openLocation(k,B)),this):this.openLocation(k,B)}else j.VyI.log("WorldMapMenu: Auto-open dialogue zone not found",j.$bb.Warning)}return this.onWorldMapInitialized.dispatch(this),U}setupStrokeObjects(k){if(this._strokeObjects=this._prefabComponent.menuContainer.findComponentsInChildren(wt.t),j.o5U.isDesktop())for(let B=0;B{var k;const U=ne.ZONE_GOALS_STROKE_OBJECT_MAPPING[B];-1!==U&&(null===(k=this._zoneGoalsController)||void 0===k||k.setPanelActive(U,this._strokeObjects[B].GameObject.active,!0))}))}setupCloseButton(){this._prefabComponent.closeButton.onClick.getBindingsCount()>0&&j.VyI.log("WorldMapMenu: Close button already has a click binding",j.$bb.Warning),this._prefabComponent.closeButton.onClick.add((()=>{var k;null===(k=this._closeButtonCallback)||void 0===k||k.call(this),ne.sendButtonClickedEvent(Ct.k.X,at.q.instance.prodigy.world.getCurrentZone(),Ot.B.WorldMap),at.q.instance.prodigy.audio.playSFX(18,"pop"),at.q.instance.prodigy.world.getZone(at.q.instance.prodigy.world.getCurrentZone()).createTopLeftNavigationButton(),ut.gz.initialized&&ut.gz.instance.completeFtue(!1),this.close()}))}setupAllLocations(k=!1){this._indicatorContainer.removeChildren();for(const B of ne.BUTTONS_CONFIG){const U=at.q.instance.prodigy.breadcrumbManager,F=k&&U.isBreadcrumbDefined(...this.getZoneUnlockAnimationBreadcrumb(B))&&!U.isBreadcrumbComplete(...this.getZoneUnlockAnimationBreadcrumb(B)),G=!this._isZoneLockCutsceneActive&&ne.isZoneLockedParams(B,this.featureRequirements,this._forceLock,this._forceUnlock)||F;this.setupLocation(B,G)}}setupLocation(k,B,U=!0,G=!0){var $,H,V;if(k.isHidden())return this.prefab.getDisabledLocation(k.prefabIndex).active=!1,this.prefab.getLockTransition(k.prefabIndex).active=!1,this.prefab.getLockObject(k.prefabIndex).active=!1,this.prefab.getMapLocation(k.prefabIndex).active=!1,void(this.prefab.getIconContainer(k.prefabIndex).active=!1);const q=k.useLocationDialogPrefab?()=>this.openLocationDialogPrefab(k,B):()=>this.openLocation(k,B),K=this._prefabComponent.getMapLocation(k.prefabIndex),z=K.findComponentsInChildren(rt.$);for(let F=0;F{q(),k.analyticsClickOverride?k.analyticsClickOverride():(ne.sendButtonClickedEvent(`${k.target.split("-")[0]}-button`,k.target,Ot.B.WorldMap,{elementType:"map_screen"}),this.sendZoneProgressInterfaceEvent(k))})));const Y=this.getZonePinOffsets(k,B);if(!B&&Y.hasFeaturedPet&&this.setupFeaturedSpawnNotification(k,Y.pinOffsetValues[0]),Y.festivalButton&&(this.game.cache.checkImageKey(Y.festivalButton)?K.findComponentsInChildren(j.vYh).forEach((k=>{k.updateAsset(Y.festivalButton)})):j.VyI.log(`WorldMap: Festival button image not loaded: ${Y.festivalButton}`,j.$bb.Error)),Y.hasFestivalNotification){const B=Ut.x.getFestivalMapIconImage();B?this.createNotificationIcon(k,B,void 0,1,{x:Y.pinOffsetValues[1],y:0}):this.createNotificationIcon(k,W._.General_icons_json,"exclamation",1,{x:Y.pinOffsetValues[1],y:0})}const Q=this._prefabComponent.getDisabledLocation(k.prefabIndex);Q.active=B,this._prefabComponent.getLockTransition(k.prefabIndex).active=B;const X=this._prefabComponent.getLockObject(k.prefabIndex);X.active=B;const Z=X.findComponent(rt.$);if(Z.inputEnabled=B,B)if(Z.onClick.removeAll(),Z.onClick.add((()=>{q(),ne.sendButtonClickedEvent(`${k.target.split("-")[0]}-button`,"Locked",Ot.B.WorldMap,{elementType:"map_screen"}),this.fireInterfaceEvent({interfaceName:k.target.split("-")[0],originType:Dt.$N.ButtonClick,originID:`${k.target.split("-")[0]}-button`})})),k.hideZoneOnLocked)K.active=!1;else if(St.m.useFilter(this.game))this.tintLockedZoneGameObject(K);else{const B=Q.findComponentInChildren(Tt.e),U=ne.BUTTONS_CONFIG.indexOf(k);B.Active=!0,B.initialize(`world-map-disable-tint-${U}`)}if(!B&&ne.isInDifficultyMode(null==k?void 0:k.difficultyMode)&&(U&&(null===($=null==k?void 0:k.showNotificationIcon)||void 0===$?void 0:$.call(k))?this.createNotificationIcon(k):U&&k.zone===st.A_.DRAGONISLE&&this.breadcrumbManager.isBreadcrumbComplete(it.B.FEATURE_ZONE_UNLOCKED_POPUP,it.B.BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE)&&(()=>(0,F.sH)(this,void 0,void 0,(function*(){var B,U,F;const G=at.q.instance.prodigy.gameContainer.get("196-d3a5"),[j,$]=yield Promise.all([G.getActiveRiftsPortalIds(),G.fetchRiftsConfig()]),H=null==j?void 0:j.filter((k=>k!==et.ni.Portal1));if(!$||!j||!H||0===(null==H?void 0:H.length))return;const V=(null!==(B=(F=this.playerData.player.data).rifts)&&void 0!==B?B:F.rifts={}).dragonIsleNotificationLastSeenTimestampMs;if(V)for(const W of H){const B=null===(U=$[W])||void 0===U?void 0:U.dragonIsleNotificationCooldownMs;if(!B||Date.now()-V>B)return void this.createNotificationIcon(k)}else this.createNotificationIcon(k)})))().catch(j.RQr.createHandler("WorldMapMenu: Failed to set up notifications based on active rift portals")),G&&!1===(null===(H=null==k?void 0:k.isVisited)||void 0===H?void 0:H.call(k))&&this.createSparkles(k.tag,X),St.m.useFilter(this.game)?this.untintLockedZoneGameObject(K):Q.findComponentInChildren(Tt.e).Active=!1),!(B||k.zone!==st.A_.LAMPLIGHT||this._isZoneLockCutsceneActive||ft.J.shouldShowWorldMapHardModeFtue()||this._showZoneLockCutsceneLinearCampaignTransition))for(const F of this._prefabObj.findComponentsInChildren(qt.P))F._zoneId===st.A_.LAMPLIGHT&&this._isFestivalActive&&this._festivalTravelModalEnabled&&F.showGuideHand(!0);null===(V=k.onSetupLocation)||void 0===V||V.call(k)}setupFeaturedSpawnNotification(k,B=0){var U,F,G,j,$,H;const V=this._featuredSpawnService.getCachedData();if(this._featuredSpawnService.shouldShowMapPin(k.zone)&&V){const q=ot.E.getIconForType("pet",V.petId),K=null!==(F=null===(U=V.iconData)||void 0===U?void 0:U.offset)&&void 0!==F?F:J.DEFAULT_ICON_OFFET;this.createNotificationIcon(k,W._.Ui_featured_pet_json,J.ICON_BASE_FRAME,1,{x:B,y:0}),this.createNotificationIcon(k,q,void 0,null!==(j=null===(G=V.iconData)||void 0===G?void 0:G.scale)&&void 0!==j?j:J.DEFAULT_ICON_SCALE,{x:(null!==($=K.x)&&void 0!==$?$:0)+B,y:K.y}),this.createNotificationIcon(k,W._.Ui_featured_pet_json,J.SUB_ICON_FRAME,J.SUB_ICON_SCALE,{x:(null!==(H=J.SUB_ICON_OFFSET.x)&&void 0!==H?H:0)+B,y:J.SUB_ICON_OFFSET.y})}}getZonePinOffsets(k,B){const U=[],F=Ut.x.getFestivalMapButtonImage(k.zone),G=this._featuredSpawnService.getCachedData(),$=j.Aq$.isDefined(G),H=this._isFestivalActive&&k.zone===st.A_.LAMPLIGHT&&!ne.isZoneLocked(k.zone);H&&U.push("festival"),!B&&$&&this._featuredSpawnService.shouldShowMapPin(k.zone)&&U.push("featuredPet");const V=k=>{const B=U.indexOf(k);return-1===B?0:(B-(U.length-1)/2)*ne.NOTIFICATION_PIN_SPACING};return{pinOffsetValues:[V("featuredPet"),V("festival")],festivalButton:F,hasFeaturedPet:$,hasFestivalNotification:H}}applyCustomHighlight(k){var B,U;for(let F=0;F{k.visible=!1})),this._puppetMasterIndicator.visible=!0):this._indicatorContainer.visible=!1}clearCustomHighlight(){var k;for(let B=0;B{k.visible=!0}))}tintLockedZoneGameObject(k){const B=new G.N;B.tint(10388653,!0),k.legacyTransform.group.filters=[B],Lt.s.cacheAsBitmap(k.legacyTransform.group)}untintLockedZoneGameObject(k){k.legacyTransform.group.filters=[],k.legacyTransform.group.cacheAsBitmap=!1}sendInterfaceOpenEvent(k){this.fireInterfaceEvent({interfaceName:Ot.B.WorldMap,interfaceType:Dt.Wm.Screen,instanceType:It.N.Interface,originType:Dt.$N.ButtonClick,originID:Ct.k.Map},{item_list:null!=k?k:[]})}static sendButtonClickedEvent(k,B,U,F){at.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent(Object.assign({buttonName:k,destinationName:B,interfaceName:U,interfaceType:Dt.Wm.Menu,saveClickInfo:k},F))}sendZoneProgressInterfaceEvent(k,B){this._festivalTravelModalEnabled&&this._isFestivalActive&&k.zone===st.A_.LAMPLIGHT||this.fireInterfaceEvent({interfaceName:`zone_entry_popup_${k.zone}`,interfaceType:Dt.Wm.Modal,originType:Dt.$N.ButtonClick,originID:B?Ct.k.X:`${k.zone}-button`,closeMethod:B?Dt.Lv.ButtonClick:void 0})}setupDungeonIcons(){const k=ne.BUTTONS_CONFIG.length,B=at.q.instance.prodigy.gameContainer.get("80c-6fa4"),U=this.playerData.player;for(let F=0;FB.zone===k)),at.q.instance.prodigy.gameContainer.get("db5-fb6e"),at.q.instance.prodigy.gameContainer.get(j.$Bt.LocalizationService),!1,B)}static getZoneName(k){var B;const U=ne.BUTTONS_CONFIG.find((B=>B.zone===k));return null!==(B=null==U?void 0:U.getName())&&void 0!==B?B:""}static getZoneTagForZoneId(k){var B;const U=ne.BUTTONS_CONFIG.find((B=>B.zone===k));return null!==(B=null==U?void 0:U.tag)&&void 0!==B?B:""}static openLockMessageParams(k,B,U,F,G=null){var $,H,W;if(k.isForceLocked)at.q.instance.prodigy.open.message(U.getText("WORLD_MAP_ZONE_LOCKED"),G,k.icon,null!==($=k.getLockName())&&void 0!==$?$:k.getName(),null,{isModal:!1});else if(j.Aq$.isDefined(k.requirementsID)&&!B.meetsRequirementsDeprecated(k.requirementsID)&&26===k.requirementsID)at.q.instance.prodigy.open.message(U.getText("WORLD_MAP_ZONE_LOCKED"),G,k.icon,k.getName(),null,{isModal:!1});else if(this.checkFeatureRequirementsForLock(B,k)){let B;B=k.isCurrentSubjectDenied()?Wt.A.LOCKEDSUBJECT:k.isCurrentProgressDenied()||"arcadia"===k.zone?Wt.A.LOCKEDPREREQUISITE:Wt.A.LOCKEDLEVEL,at.q.instance.prodigy.open.prefabMenu(q.l.ZoneLockedPopup,G,void 0,!1,void 0,{ZONE_STATUS_MODAL_TYPE:B,ZONE_STATUS_POPUP_TARGET_ID:k.zone})}else ne.getZoneData(k.zone).isUnreleased&&this.getZoneTagForZoneId(k.zone)!==V.O.Shiverchill?at.q.instance.prodigy.open.prefabMenu(q.l.ZoneComingSoonPopup,G,void 0,!1,void 0,{ZONE_STATUS_MODAL_TYPE:Wt.A.COMINGSOON,ZONE_STATUS_POPUP_TARGET_ID:k.zone}):!F&&j.Aq$.isDefined(null==k?void 0:k.classCodeKey)&&at.q.instance.prodigy.classModeController.isClassMode()?at.q.instance.prodigy.open.classModeMessage(U.getText(k.classCodeKey),G,null,k.getName(),k.classModeFrame,{isModal:!0},k.nameKey):at.q.instance.prodigy.open.message(U.getText(null!==(H=k.lockKey)&&void 0!==H?H:"WORLD_MAP_ZONE_LOCKED"),G,k.icon,null!==(W=k.getLockName())&&void 0!==W?W:k.getName(),null,{isModal:!1})}openLocation(k,B){var U;if(at.q.instance.prodigy.audio.playSFX(18,"pop"),this.enableZoneGoals(!1),B)ne.openLockMessageParams(k,this.featureRequirements,this.localizer,this._disableClose,(()=>{this.enableZoneGoals(!0),ne.sendButtonClickedEvent(Ct.k.Okay,null,k.target.split("-")[0]),this.fireInterfaceEvent({interfaceName:k.target.split("-")[0],closeMethod:Dt.Lv.ButtonClick})}));else if(this._festivalTravelModalEnabled&&k.zone===st.A_.LAMPLIGHT&&this._isFestivalActive)Ut.x.openTravelModal(Dt.$N.ButtonClick,void 0,(()=>{this.close()}));else if(pt.R.isFeatureEnabled()&&ne.DIFFICULTY_MODE!==X.i.Regular&&k.difficultyMode===X.i.Regular){const B=()=>{j.Aq$.isDefined(k.onClickOverride)?k.onClickOverride(this):ne.goTo(k.target,null==k?void 0:k.clickEventName)};at.q.instance.prodigy.open.difficultyUnavailableConfirmationModal(k,B)}else if(k.onClickOverride)k.onClickOverride(this);else if(!j.Aq$.isDefined(k.tag)||k.tag&&!k.msgKeys){const B=[st.A_.BONFIRE,st.A_.FOREST,st.A_.SHIPWRECK,st.A_.SHIVERCHILL,st.A_.SKYWATCH],F=at.q.instance.prodigy.gameContainer.get("e20-0fb0"),G=at.q.instance.prodigy.world.zones[k.zone],j=(null==G?void 0:G.allQuestsAreComplete)||(null==G?void 0:G.isKeystonePlaced)||!B.includes(null==G?void 0:G.ID)?k.target:null!==(U=F.player.getLastVisitedMapForZone(k.zone))&&void 0!==U?U:k.target;at.q.instance.prodigy.open.messageBoxPrefab({text:"WORLD_MAP_CONFIRM_TRAVEL",textArgs:[k.getSummary()],buttonState:Kt.D.YesNoButtons,confirmCallback:()=>{ne.goTo(j,k.clickEventName,null,Ct.k.Yes),this.fireInterfaceEvent({interfaceName:k.target.split("-")[0],closeMethod:Dt.Lv.ButtonClick})},noCallback:()=>{this.enableZoneGoals(!0),ne.sendButtonClickedEvent(Ct.k.No,k.target,k.target.split("-")[0]),this.fireInterfaceEvent({interfaceName:k.target.split("-")[0],closeMethod:Dt.Lv.ButtonClick})},title:k.getName(),isModal:!1})}else{if((0,Pt.G)(tt.y).enabled&&!this.featureRequirements.meetsRequirementsDeprecated(8))return void ne.goTo(ne.getDefaultMapForZone(k),k.clickEventName,!0,Ct.k.Play,`zone_entry_popup_${k.zone}`);ne.openZoneProgressDialog(this._titanAsset,k,this.playerData.player,this._ultimateQuestTarget,!this.featureRequirements.meetsRequirementsDeprecated(43)||this._forceLock.includes("DISABLE_DUNGEON"),(()=>{this.enableZoneGoals(!0),this.sendZoneProgressInterfaceEvent(k,!0)}))}}static getDefaultMapForZone(k){var B;const U=at.q.instance.prodigy.gameContainer.get("e20-0fb0"),F=at.q.instance.prodigy.world.zones[k.zone];return(null==F?void 0:F.allQuestsAreComplete)||(null==F?void 0:F.isKeystonePlaced)?k.target:null!==(B=U.player.getLastVisitedMapForZone(k.zone))&&void 0!==B?B:k.target}static openZoneProgressDialog(k,B,U,F,G=!1,$){let H="";j.Aq$.isDefined(k)&&(H=`${k.zone}-Titan`);const V=ne.generateZoneData(B);let W=Vt.SB.WorldMap,K=!0,z=ne.getDefaultMapForZone(B);U.ultimateSessionStatus===lt.n.TrackingNPC&&(null==F?void 0:F.startsWith(B.zone))&&(W=Vt.SB.TrackingNPC,V.npcAtlasID=229,V.npcFrameName="icon-npc-loc-assembled",V.zoneActionText="UI_ZONE_TRADE",z=this.getQuestLocation(F),K=!1),U.ultimateSessionStatus===lt.n.TamingUltimate&&(null==F?void 0:F.startsWith(B.zone))&&(W=Vt.SB.TrackingMythic,V.npcAtlasID=229,V.npcFrameName="icon-epics-loc-assembled",V.zoneActionText="UI_ZONE_TAME",z=at.q.instance.prodigy.world.getZone(F.split("-")[0]).questHub,K=!1),G&&(V.dungeonAvailable=!1);const Y=at.q.instance.prodigy.gameContainer.get("fa6-b1fc"),Q=`zone_entry_popup_${B.zone}`,Z=ne.goTo.bind(this,z,B.clickEventName,K,Ct.k.Play,Q),J=this.isInDifficultyMode(X.i.Regular)?ne.goTo.bind(this,H,B.clickEventName,null,Ct.k.Titan,Q):()=>at.q.instance.prodigy.open.difficultySelectorConfirmationModal(X.i.Regular,ne.goTo.bind(this,H,B.clickEventName,null,Ct.k.Titan,Q)),tt=ne.enterDungeon.bind(this,B.dungeon,B.clickEventName,Q);Promise.all([Y.getPetsInZone(V.zone),Y.getMinMaxEnemyLevelsForZone(V.zone)]).then((([U,F])=>{at.q.instance.prodigy.open.prefabMenu(q.l.Pets_ZoneUI,(()=>null),void 0,void 0,void 0,{PET_ZONE_ID:B.prefabIndex,PET_ZONE_MENU_STATE:W,PET_ZONE_PLAY_BUTTON:Z,PET_ZONE_TITAN_BUTTON:k&&k.zone===B.zone.replace(/(_hard|_expert)/g,"")?J:null,PET_ZONE_DUNGEON_BUTTON:B.dungeon&&!G?tt:null,GRID_VIEW_DATA:U.map((k=>k.ID)),PET_ZONE_ENEMY_MIN_MAX_LEVEL:F}).onDestroy.add($)})).catch(j.RQr.createHandler("Could not fetch pets for current zone"))}static generateZoneData(k){const B=at.q.instance.prodigy.gameContainer.get("80c-6fa4");return{zone:k.zone,msgKeys:k.msgKeys,summary:k.getSummary(),tag:k.tag,dungeonAvailable:j.Aq$.isDefined(k.dungeon)&&B.getValue(k.dungeon.featureFlagName,!0)}}static getQuestLocation(k){const B=k.split("-")[0],U=k.split("-")[1],F=at.q.instance.prodigy.world.getZone(B).getMap(U);return nt.l.getRandomItem(F.locations)}openLocationDialogPrefab(k,B){if(at.q.instance.prodigy.audio.playSFX(18,"pop"),(0,Nt.v)(!!k.splashImage,`No splash image defined for ${k.getName()}`),this.enableZoneGoals(!1),ne.isZoneFeatureFlagLocked(k))at.q.instance.prodigy.open.messageBoxPrefab({title:"FEATURE_DISABLED",confirmCallback:()=>{this.enableZoneGoals(!0)}});else{const U=at.q.instance.prodigy.gameContainer.get("d0e-64fd").loadFromGUID(q.l.MapLocationDialog);this.dialogueContainer.addChild(U.legacyTransform.group);const F=U.findComponent($t.s);B?F.showOneButton(k.splashImage,k.getLockName(),k.getLockMessage(),this.localizer.getText("BUTTON_OKAY_CAPITAL"),B):F.showTwoButton(k.splashImage,k.getName(),k.getSummary(),this.localizer.getText("NOT_NOW"),k.getGoButtonText(),B);const G=U.findComponentsInChildren(rt.$);for(let B=0;B{this.fireInterfaceEvent({interfaceName:k.zone,closeMethod:Dt.Lv.ButtonClick}),U.destroy()}));F.onClose.addOnce((()=>{this.enableZoneGoals(!0)})),F.onConfirm.addOnce((()=>{ne.goTo(k.target,k.clickEventName)}))}}static enterDungeon(k,B,U){ne.goTo(k.dungeonHub,B,null,Ct.k.CrystalCaverns,null!=U?U:Ot.B.Shiverchill)}static goTo(k,B,U=!0,F,G){j.Aq$.isDefined(B)&&at.q.instance.game.broadcaster.broadcast(B,"UI"),ut.gz.initialized&&ut.gz.instance.completeFtue(!0);const $=at.q.instance.prodigy.gameContainer.get("e20-0fb0").player,H=k.split("-")[0];F&&ne.sendButtonClickedEvent(F,H,null!=G?G:H),at.q.instance.prodigy.open.menuCloseAll();const V=at.q.instance.prodigy.world.getCurrentZone(),W=at.q.instance.prodigy.world.getZone(V);U&&$.isTrackingQuestEnabled&&V!==H&&$.setUltimateSessionStatus(lt.n.None,"",0),j.Aq$.isDefined(W)?W.handleLeaving(Gt.j.mapTeleport,(()=>{ne.startZone(k)})):ne.startZone(k)}static startZone(k){at.q.instance.game.broadcaster.broadcast(_t.n8.WorldMapZoneSelected);const B=at.q.instance.prodigy.gameContainer.get("e20-0fb0").player;"Dorm"===k?(at.q.instance.game.state[k].player=B,at.q.instance.prodigy.start(k)):k.indexOf("-")>0?at.q.instance.prodigy.world.it(k):at.q.instance.prodigy.start(k)}setupNPCLocation(){this._ultimateQuestTarget=yt.m.getSeededLocation();const k=ne.getZoneData(this._ultimateQuestTarget.split("-")[0]);this.createUltimateQuestIndicator(k,at.q.instance.prodigy.create.npcIndicator.bind(this,k.ultimatesQuestIconOffset.x,k.ultimatesQuestIconOffset.y))}setupUltimateLocation(){const k=at.q.instance.prodigy.gameContainer.get("e20-0fb0").player;at.q.instance.prodigy.gameContainer.get("e50-b09b").getQuestMetaData(k.ultimateQuestId).then((k=>{const B=k.petID;this._ultimateQuestTarget=mt.v.getUltimatesPetLocation(B);const U=ne.getZoneData(this._ultimateQuestTarget.split("-")[0]);this.createUltimateQuestIndicator(U,at.q.instance.prodigy.create.ultimatesIndicator.bind(this,U.ultimatesQuestIconOffset.x,U.ultimatesQuestIconOffset.y))})).catch((k=>{j.VyI.log(`Error getting quest data ${k.message}`,j.$bb.Error)}))}createUltimateQuestIndicator(k,B){if(k){const U=B(k.ultimatesQuestIconOffset.x,k.ultimatesQuestIconOffset.y),F=this._prefabComponent.getIconContainer(k.prefabIndex).legacyTransform.group;U.anchor.set(.5,.5),this._indicatorContainer.addChild(U),U.position.x+=F.getGlobalPosition().x,U.position.y+=F.getGlobalPosition().y}else j.VyI.log("Unable to retrieve Zone Data from target string. Indicator creation aborted.",j.$bb.Error)}fetchTitanData(){this.game.broadcaster.addAppListener(_t.RZ.GotTitans,this.setupTitan.bind(this),this,"Titan"),at.q.instance.prodigy.titansNetworkHandler.getTitans().catch(j.RQr.createHandler("WorldMap: Could not get active Titan data"))}setupTitan(k){if(this.game.broadcaster.removeAppListener(_t.RZ.GotTitans,this,"Titan"),k&&j.Aq$.isDefined(k.assetID)&&at.q.instance.prodigy.titansNetworkHandler.isTitanAlive()){const B=ct.t.getItem("titan",k.assetID);if(j.Aq$.isDefined(B)){let k,U=!1;for(let G=0;G{var k;at.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(it.B.FEATURE_ENDGAME_QUEST,it.B.BREADCRUMB_ENDGAME_QUEST_SAW_WORLD_MAP_DIALOGUE),this._isZoneGoalsActive&&(null===(k=this._zoneGoalsController)||void 0===k||k.tryAutoTrigger())})).catch(j.RQr.createHandler("Error showing pippet dialogue")),!1}hardModeFtueStepEventHandler(k){var B;switch(k){case ut.cM.STEP_1_NOOT_DIALOGUE_INTRO:for(let U=0;U{ut.gz.instance.advanceFtueStep()})).catch(j.RQr.createHandler("Error showing Campaign Replay Intro dialogue"));break;case ut.cM.STEP_5A_CLOSE_DIFFICULTY_SELECTOR:this.setupCloseButton(),this._prefabComponent.closeButton.GameObject.active=!0;break;case ut.cM.STEP_6A_RESUME_WORLD_MAP_NORMAL:ut.gz.initialized&&ut.gz.instance.completeFtue(!1);break;case ut.cM.STEP_7B_NOOT_HARD_MODE_INTRO:const k=ne.BUTTONS_CONFIG.find((k=>k.zone===st.A_.FORESTHARD));if(!k){j.VyI.log("Error finding forest hard mode zone info during Hard Mode FTUE",j.$bb.Error);break}this._prefabComponent.GameObject.findComponentsInChildren(rt.$).forEach((k=>{k.inputEnabled=!1})),this._prefabComponent.getMapLocation(k.prefabIndex).findComponentsInChildren(rt.$).forEach((k=>k.inputEnabled=!0)),this._indicatorContainer.removeChildren(),Mt.v$([1687,1688]).then((()=>{ut.gz.instance.advanceFtueStep()})).catch(j.RQr.createHandler("Error showing Campaign Replay Intro dialogue"))}}startTitanUnlockedDialogue(){this.enableZoneGoals(!1);const k=new At.rD(this.game);k.addEvents([{dialogueData:k.dataProvider.get(862),blockInput:!0},{dialogueData:k.dataProvider.get(863),blockInput:!0},{dialogueData:k.dataProvider.get(864),blockInput:!0},{dialogueData:k.dataProvider.get(865),blockInput:!0},{callback:()=>{this.breadcrumbManager.completeBreadcrumb(it.B.FEATURE_TITAN_UNLOCKED,it.B.BREADCRUMB_TITAN_UNLOCKED_DIALOGUE),this.enableZoneGoals(!0)}}]),k.start()}enableZoneGoals(k){this._isZoneGoalsActive=k,this._zoneGoalsObject&&(this._zoneGoalsObject.active=k,j.wa5.getActiveScene().getLayer(ne.ZONE_GOALS_LAYER_NAME).visible=k)}activateZoneLockCutscene(){this._isZoneLockCutsceneActive=!0}static get highestZoneLevelRequirement(){return ne.BUTTONS_CONFIG.map((k=>xt.X.getLevelRequirement(k.requirementsID))).reduce(((k,B)=>k>B?k:B))}destroy(){var k,B,U;if(this._titanAsset=null,at.q.instance.game.broadcaster.removeAppListener(_t.n8.WorldMapDifficultyModeChanged,this),at.q.instance.game.broadcaster.removeAppListener(_t.sn.HardModeFtueStepAdvanced,this),this._indicatorTween&&at.q.instance.game.tweens.remove(this._indicatorTween),this._indicatorTween=null,this._strokeObjects&&this._strokeObjects.length>0)for(let F=0;Fk.cancel())),this._zoneGoalsObject&&(j.wa5.getActiveScene().removeGameObject(this._zoneGoalsObject),this._destroyZoneGoalsLayerOnClose&&j.wa5.getActiveScene().destroyLayer(ne.ZONE_GOALS_LAYER_NAME),this._zoneGoalsObject.destroy(),this._zoneGoalsObject=null),this._prefabObj&&this._prefabObj.destroy(),this._prefabObj=null,this._prefabComponent=null,this._difficultyModeComponent=null,this.fireInterfaceEvent({interfaceName:Ot.B.WorldMap,interfaceType:Dt.Wm.Screen,instanceType:It.N.Interface,closeMethod:Dt.Lv.CloseButton}),ut.gz.initialized&&ut.gz.instance.cancelSession(),this.completeZoneLockExperienceSeenBreadcrumb(),this.onWorldMapInitialized.dispose(),super.destroy()}static getTeleportMapTag(k){return k===st.A_.CRYSTALCAVERNS?at.q.instance.prodigy.world.getZone(k).questHub:at.q.instance.prodigy.world.getZone(k).defaultOnFaint}static getZoneData(k){return ne.BUTTONS_CONFIG.find((B=>B.zone===k))}static getHighestAvailableZoneData(k){var B,U;const F=at.q.instance.prodigy.gameContainer.get("306-5359").highestDifficultyUnlocked,G=Bt.N.getCoreZonesInOrder(null!==(B=null!=k?k:F)&&void 0!==B?B:this.DIFFICULTY_MODE),j=H().findLast(G,(k=>k.meetsRequirements()));if(!j||j.zone===st.A_.SHIVERCHILLEXPERT)return G[0];if(j.tag===V.O.Shiverchill){const k=at.q.instance.prodigy.world.getZone(G[0].zone);return(null===(U=k.getQuestState())||void 0===U?void 0:U.ID)>k.finalQuestId?j:G[0]}return j}static getZoneDataFromDungeon(k){return ne.BUTTONS_CONFIG.find((B=>{var U;return(null===(U=B.dungeon)||void 0===U?void 0:U.zone)===k}))}static isZoneLocked(k){const B=ne.BUTTONS_CONFIG.find((B=>{var U;return B.zone===k||(null===(U=B.dungeon)||void 0===U?void 0:U.zone)===k}));let U=!1;return U=B?at.q.instance.prodigy.classModeController.isLockedZone(k)||this.isZoneLockedParams(B,at.q.instance.prodigy.gameContainer.get("db5-fb6e")):!Ft.N.getAllTowerData().find((B=>B.towerID===k)),U}static isZoneLockedParams(k,B,U,F){var G,$;const H=null!==(G=null==F?void 0:F.includes(k.nameKey))&&void 0!==G&&G,V=null!==($=null==U?void 0:U.includes(k.nameKey))&&void 0!==$&&$,W=j.Aq$.isDefined(k.isLocked)&&k.isLocked(),q=ne.isZoneFeatureFlagLocked(k),K=!!k.isUnreleased,z=ne.DIFFICULTY_MODE!==k.difficultyMode&&W,Y=V||W||K||z||this.checkFeatureRequirementsForLock(B,k)||q;return k.isForceLocked=V,!H&&Y}static checkFeatureRequirementsForLock(k,B){return j.Aq$.isDefined(B.requirementsID)&&!k.meetsRequirementsDeprecated(B.requirementsID)}static isZoneFeatureFlagLocked(k){return j.Aq$.isDefined(k.featureFlagLock)&&!at.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue(k.featureFlagLock,!0)}static applyZoneLocking(k,B,U,F){let G=this.getZoneData(k);if(j.Aq$.isDefined(G)||(G=this.getZoneDataFromDungeon(k)),j.Aq$.isDefined(G)){if(ne.isZoneLockedParams(G,U)){const k=G.getLockMessage(),U=F.getText(G.nameKey);B.action=()=>at.q.instance.prodigy.open.message(k,null,G.icon,U,null,{isModal:!1}),B.configModifiers={modifyProperty:[{element:"actionButton",property:"toggle",value:!1}]}}}else j.VyI.log(`Error getting zone map config for zone ${k}. Zone locking check not applied.`,j.$bb.Warning)}createNotificationIcon(k,B=W._.General_icons_json,U="exclamation",F=1,G){var j,$;if(this._notificationBlockedZones.includes(k.zone))return;const H=k.iconOffset?k.iconOffset:{x:0,y:10},V=this._indicatorContainer.addChild(at.q.instance.prodigy.create.sprite(H.x,H.y,B,U));V.anchor.set(.5,.5);const q=this._prefabComponent.getIconContainer(k.prefabIndex).legacyTransform.group;V.position.x=V.position.x+q.getGlobalPosition().x+(null!==(j=null==G?void 0:G.x)&&void 0!==j?j:0),V.position.y=V.position.y+q.getGlobalPosition().y+(null!==($=null==G?void 0:G.y)&&void 0!==$?$:0),V.scale.x=F,V.scale.y=F}createSparkles(k,B){const U=B.legacyTransform.group,F=this.game.add.spine(U.getGlobalPosition().x,U.getGlobalPosition().y,Y.Q.Spine_sparkle_worldmap_json);F.setAnimationByName(0,k,!0),this.dialogueContainer.addChild(F)}getZoneUnlockAnimationBreadcrumb(k){var B;return[it.B.FEATURE_ZONE_UNLOCKED_POPUP,`BREADCRUMB_ZONE_UNLOCKED_ANIM_${(null!==(B=k.tag)&&void 0!==B?B:k.zone).toUpperCase()}`]}static setDifficultyMode(k){ne.DIFFICULTY_MODE!==k&&(ne.DIFFICULTY_MODE=k,at.q.instance.game.broadcaster.broadcast(_t.n8.WorldMapDifficultyModeChanged))}static getDifficultyMode(){return ne.DIFFICULTY_MODE}static isInDifficultyMode(k){return j.Aq$.isDefined(k)&&k===ne.getDifficultyMode()}setDifficultyButtonText(){const k=ne.DIFFICULTY_MODE===X.i.Expert?Q.K_.Expert:ne.DIFFICULTY_MODE===X.i.Hard?Q.K_.Hard:Q.K_.Regular;this._prefabComponent.difficultySelectorButtonText.text=this.localizer.getText(k)}buttonConfigByQuestIndexAndDifficulty(k,B){switch(B){case X.i.Expert:return ne.BUTTONS_CONFIG_BY_QUEST_INDEX_EXPERT_MODE[k];case X.i.Hard:return ne.BUTTONS_CONFIG_BY_QUEST_INDEX_HARD_MODE[k];case X.i.Regular:return ne.BUTTONS_CONFIG_BY_QUEST_INDEX[k];default:j.RQr.logError(null,`Invalid difficulty mode: ${B}`)}}}ne.BASE_ASSETS=[Y.Q.Spine_sparkle_worldmap_json,W._.General_icons_json,W._.General_map_json,W._.Ui_buttons_json,W._.Ui_cc_adventure_map_json,W._.Ui_icons_json,W._.Ui_store_json,W._.Ui_titan_json,W._.Ui_shipwreck_progress_json,W._.Ui_shiverchill_progress_json,W._.Ui_dialogues_json,W._.Ui_raster_epicsv2_json,W._.Ui_library_json,W._.Ui_guide_hands_json,K.c.Sfx_store_equip,K.c.Sfx_store_purchase,z.q.Lock_glow_purple,z.q.Lock_glow_blue,z.q.Lock_glow_magenta,Y.Q.Spine_duels_matchmaking_unlock_json,Y.Q.Spine_dragon_isle_unlock_json,Y.Q.Spine_dragon_isle_whirlpool_json,z.q.Vignette_general_map_hard,z.q.Vignette_general_map_expert,W._.Ui_replay_campaign_json,Y.Q.Spine_game_island_json],ne.ZONE_GOALS_LAYER_NAME="zonegoals",ne.ZONE_GOALS_LAYER_DEPTH=110,ne.ZONE_GOALS_STROKE_OBJECT_MAPPING=[Et.P.Dyno,Et.P.DragonIsle,Et.P.Firefly,Et.P.Shiverchill,Et.P.Skywatch,Et.P.Bonfire,Et.P.Shipwreck,Et.P.Academy,Et.P.Firefly,Et.P.Shiverchill,Et.P.Skywatch,Et.P.Bonfire,Et.P.Shipwreck,Et.P.Academy,Et.P.House,Et.P.Lamplight,Et.P.Darktower,Et.P.TowerTown],ne.BRIGHTNESS_VALUE_LOCATION=.2,ne.BRIGHTNESS_VALUE_BACKGROUND=.5,ne.NOTIFICATION_PIN_SPACING=75,ne.DIFFICULTY_MODE=X.i.Regular,ne._nextVisitOverrides={},ne.BUTTONS_CONFIG=[new se(te.Ne),new se(te.kO),new se(te.Hg),new se(te.di),new se(te.Rk),new se(te.II),new se(te.y6),new se(te.fO),new se(te.F9),new se(te.DD),new se(te.Ih),new se(te.ZS),new se(te.bk),new se(te.uO),new se(te.bI),new se(te.Sl),new se(te.OE),new se(te.BT),new se(te.IM),new se(te.kw)],ne.BUTTONS_CONFIG_BY_QUEST_INDEX=[ne.BUTTONS_CONFIG[0],ne.BUTTONS_CONFIG[1],ne.BUTTONS_CONFIG[2],ne.BUTTONS_CONFIG[4],ne.BUTTONS_CONFIG[5]],ne.BUTTONS_CONFIG_BY_QUEST_INDEX_HARD_MODE=[ne.BUTTONS_CONFIG[13],ne.BUTTONS_CONFIG[14],ne.BUTTONS_CONFIG[15],ne.BUTTONS_CONFIG[16],ne.BUTTONS_CONFIG[17]],ne.BUTTONS_CONFIG_BY_QUEST_INDEX_EXPERT_MODE=[],(0,F.Cg)([(0,j.fFd)("db5-fb6e"),(0,F.Sn)("design:type",Object)],ne.prototype,"featureRequirements",void 0),(0,F.Cg)([(0,j.fFd)("12f-4e29"),(0,F.Sn)("design:type",Rt.F)],ne.prototype,"breadcrumbManager",void 0),(0,F.Cg)([(0,j.fFd)(j.$Bt.LocalizationService),(0,F.Sn)("design:type",j.dTp)],ne.prototype,"localizer",void 0),(0,F.Cg)([(0,j.fFd)("e20-0fb0"),(0,F.Sn)("design:type",Object)],ne.prototype,"playerData",void 0),(0,F.Cg)([(0,j.fFd)("a2e-a635"),(0,F.Sn)("design:type",vt.J)],ne.prototype,"_featuredSpawnService",void 0)},74208:(k,B,U)=>{"use strict";U.d(B,{k:()=>Y});var F=U(8674),G=U(62459),j=U(97495),$=U(35120),H=U(73797),V=U(28152),W=U(96494),q=U(90633),K=U(40392),z=U(13751);let Y=class extends G.uAl{constructor(){super(...arguments),this._onRegularMode=new G.HN0,this._onHardMode=new G.HN0,this._onExpertMode=new G.HN0}create(){super.create(),$.q.instance.game.broadcaster.addAppListener(H.n8.WorldMapDifficultyModeChanged,this.onWorldMapDifficultyModeChanged,this)}destroy(){this._onHardMode.dispose(),this._onExpertMode.dispose(),this._onRegularMode.dispose(),$.q.instance.game.broadcaster.removeAppListener(H.n8.WorldMapDifficultyModeChanged,this),super.destroy()}onWorldMapDifficultyModeChanged(){this.setDifficultyMode(K.i.getDifficultyMode())}setDifficultyMode(k){switch(k){case j.i.Expert:this._breadcrumbManager.isBreadcrumbComplete(q.B.FEATURE_CAMPAIGN_REPLAY,q.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_EXPERT_MODE)||this._breadcrumbManager.completeBreadcrumb(q.B.FEATURE_CAMPAIGN_REPLAY,q.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_EXPERT_MODE),this._onExpertMode.dispatch();break;case j.i.Hard:this._breadcrumbManager.isBreadcrumbComplete(q.B.FEATURE_CAMPAIGN_REPLAY,q.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_HARD_MODE)||this._breadcrumbManager.completeBreadcrumb(q.B.FEATURE_CAMPAIGN_REPLAY,q.B.BREADCRUMB_CAMPAIGN_REPLAY_HAS_ENTERED_HARD_MODE),this._onHardMode.dispatch();break;default:case j.i.Regular:this._onRegularMode.dispatch()}}};(0,F.Cg)([(0,G.Pqz)(z.n),(0,F.Sn)("design:type",z.n)],Y.prototype,"_worldMapComponent",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"_onRegularMode",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"_onHardMode",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],Y.prototype,"_onExpertMode",void 0),(0,F.Cg)([(0,G.Cdj)("12f-4e29"),(0,F.Sn)("design:type",W.F)],Y.prototype,"_breadcrumbManager",void 0),Y=(0,F.Cg)([(0,G.EVk)("WorldMapDifficultyMode",V.Y.ui)],Y)},32456:(k,B,U)=>{"use strict";U.d(B,{u:()=>Z});var F,G=U(8674),j=U(87490),$=U(62459),H=U(56942),V=U(90633),W=U(35120),q=U(28152),K=U(29834),z=U(30226),Y=U(40392),Q=U(3785),X=U(15989);let Z=F=class extends $.uAl{constructor(){super(...arguments),this.onPrepReveal=new $.HN0,this.onStartReveal=new $.HN0,this._hasBattledInDuelsStadium=null,this._blockReveal=!1}set blockReveal(k){this._blockReveal=k}create(){super.create(),W.q.instance.prodigy.gameContainer.get("0f1-c356").getBattleStats().then((k=>{this._hasBattledInDuelsStadium=(null==k?void 0:k.duelMatchmakingStats)&&(k.duelMatchmakingStats.losses>0||k.duelMatchmakingStats.wins>0),this.attemptReveal()})).catch((()=>{this._hasBattledInDuelsStadium=!1})),this.applyElementalBoostSpine()}attemptReveal(){var k;if(null===(k=this._worldMapMenuInstanceLockedZoneKeys)||void 0===k?void 0:k.includes(X.ZS.nameKey))return;if(!Y.i.getZoneData("duels_stadium").meetsRequirements()||Y.i.isZoneLocked("duels_stadium")||this._blockReveal)return;if(null===this._hasBattledInDuelsStadium)return;const B=W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_ZONE_UNLOCKED_POPUP,V.B.BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM),U=W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_ZONE_UNLOCKED_POPUP,V.B.BREADCRUMB_ZONE_UNLOCKED_ANIM_DARKTOWER);B||!this._hasBattledInDuelsStadium?(B||this.onPrepReveal.dispatch(),!B&&U&&(this._timeoutId=window.setTimeout((()=>{this.onStartReveal.dispatch()}),500))):this.markRevealComplete()}markRevealComplete(){W.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(V.B.FEATURE_ZONE_UNLOCKED_POPUP,V.B.BREADCRUMB_ZONE_UNLOCKED_ANIM_DUELS_STADIUM)}applyElementalBoostSpine(){const k=W.q.instance.prodigy.gameContainer.get("ce9-b630"),B=k.elementalBoost;k.cacheElementalBoost().then((k=>{k!==B&&this.applyElementalBoostSpine()})).catch($.RQr.createHandler("Error caching elemental boost"));const U=this._spineGameObject.findComponent($.v2j),G=this._spineGameObject.findComponent(K.j);U&&G&&(U.setAsset(F.getDailyElementalBoostSpineGUID()),G.playAnimation("idle",!0))}static getDailyElementalBoostSpineGUID(){const k=W.q.instance.prodigy.gameContainer.get("ce9-b630").elementalBoost;return F.ELEMENTAL_BOOST_WORLD_MAP_SPINE_GUIDS[null!=k?k:j.EElementType.Fire]}destroy(){this.onPrepReveal.dispose(),this.onStartReveal.dispose(),z.J.isDefined(this._timeoutId)&&window.clearTimeout(this._timeoutId),super.destroy()}};Z.ELEMENTAL_BOOST_WORLD_MAP_SPINE_GUIDS={[j.EElementType.Plant]:H.Q.Spine_duels_matchmaking_plant_boost_json,[j.EElementType.Fire]:H.Q.Spine_duels_matchmaking_fire_boost_json,[j.EElementType.Water]:H.Q.Spine_duels_matchmaking_water_boost_json,[j.EElementType.Storm]:H.Q.Spine_duels_matchmaking_storm_boost_json,[j.EElementType.Ice]:H.Q.Spine_duels_matchmaking_ice_boost_json,[j.EElementType.Physical]:H.Q.Spine_duels_matchmaking_physical_boost_json},(0,G.Cg)([(0,$.bbQ)(),(0,G.Sn)("design:type",$.HN0)],Z.prototype,"onPrepReveal",void 0),(0,G.Cg)([(0,$.bbQ)(),(0,G.Sn)("design:type",$.HN0)],Z.prototype,"onStartReveal",void 0),(0,G.Cg)([(0,$.ERr)(),(0,G.Sn)("design:type",$._mx)],Z.prototype,"_spineGameObject",void 0),(0,G.Cg)([(0,$.Cdj)(Q.z.WorldMapMenuInstanceLockedZones),(0,G.Sn)("design:type",Array)],Z.prototype,"_worldMapMenuInstanceLockedZoneKeys",void 0),Z=F=(0,G.Cg)([(0,$.EVk)("WorldMapDuelsStadium",q.Y.worldMapDuelsStadium)],Z)},13751:(k,B,U)=>{"use strict";U.d(B,{n:()=>$});var F=U(8674),G=U(62459),j=U(49237);let $=class extends G.uAl{constructor(){super(...arguments),this._menuContainer=null,this._backgroundContainer=null,this._menuTitle=null,this._closeButton=null,this._mapLocations=[],this._disabledLocations=[],this._lockObjects=[],this._lockTransition=[],this._iconContainer=[],this.onEnableZoneGoals=new G.HN0}get menuContainer(){return this._menuContainer}get backgroundContainer(){return this._backgroundContainer}get menuTitle(){return this._menuTitle}get closeButton(){return this._closeButton}get difficultySelectorButtonText(){return this._difficultySelectorButtonText}get difficultySelectorButtonNotificationBadge(){return this._difficultySelectorButtonNotificationBadge}getMapLocation(k){return this._mapLocations[k]}getDisabledLocation(k){return this._disabledLocations[k]}getLockObject(k){return this._lockObjects[k]}getLockTransition(k){return this._lockTransition[k]}getIconContainer(k){return this._iconContainer[k]}enableZoneGoals(k){this.onEnableZoneGoals.dispatch(k)}destroy(){this.onEnableZoneGoals.dispose(),super.destroy()}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],$.prototype,"_menuContainer",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],$.prototype,"_backgroundContainer",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],$.prototype,"_menuTitle",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],$.prototype,"_closeButton",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],$.prototype,"difficultySelectorButton",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],$.prototype,"_difficultySelectorButtonText",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],$.prototype,"_difficultySelectorButtonNotificationBadge",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],$.prototype,"_mapLocations",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],$.prototype,"_disabledLocations",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],$.prototype,"_lockObjects",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],$.prototype,"_lockTransition",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],$.prototype,"_iconContainer",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onEnableZoneGoals",void 0),$=(0,F.Cg)([(0,G.EVk)("WorldMapPrefab")],$)},3785:(k,B,U)=>{"use strict";var F;U.d(B,{z:()=>F}),function(k){k.WorldMapMenuInstanceLockedZones="WorldMapMenuInstanceLockedZones"}(F||(F={}))},15989:(k,B,U)=>{"use strict";U.d(B,{F9:()=>Mt,IM:()=>Nt,kw:()=>jt,Rk:()=>It,OE:()=>Dt,y6:()=>Lt,bk:()=>Gt,ZS:()=>Ft,di:()=>xt,Ne:()=>wt,uO:()=>Tt,DD:()=>Bt,fO:()=>kt,II:()=>Rt,BT:()=>Pt,kO:()=>St,bI:()=>At,Hg:()=>Ct,Sl:()=>Ot,Ih:()=>Ut,NJ:()=>yt});var F=U(87490),G=U(62459),j=U(113),$=U(44751),H=U(97495),V=U(2090),W=U(40295),q=U(90633),K=U(73678),z=U(35120),Y=U(29738),Q=U(93867),X=U(75408),Z=U(73797),J=U(11624),tt=U(24047),et=U(46784),it=U(13093),st=U(76277),nt=U(31478),at=U(40392),rt=U(8674),ot=U(95891),ht=U.n(ot),ct=U(99625),dt=U(4903),lt=U(3374),ut=U(41674),ft=U(84415),bt=U(73722),pt=U(37251),vt=U(98252),gt=U(10312);class mt{static launch(){return(0,rt.sH)(this,void 0,void 0,(function*(){const k=yield mt.executeHandoff();return z.q.instance.prodigy.game.broadcaster.broadcast(k?Z.lT.ArcadiaHandoffSuccess:Z.lT.ArcadiaHandoffFailure),k}))}static executeHandoff(){return(0,rt.sH)(this,void 0,void 0,(function*(){var k;const B=z.q.instance.prodigy.gameContainer,U=B.get("c97-bd0d"),F=B.get("f7c-2e57"),j=B.get("be9-3278"),$=B.get("00d-b27e"),H=B.get("30b-3020"),V=F.getSessionToken();if(!G.Aq$.isDefined(V)||0===V.length)return this.onHandoffResult.dispatch(!1,""),!1;let W;try{W=yield H.sendRequest((new G.u1k).setBaseURI(j.getCortexRootURL()).setRequestURI("game-cortex-server/v1/coreGame.setSession").setMethod(G.iXQ.Post).setBody(new G._A9({clientId:pt.X.CLIENT_ID,identityUri:j.getIdentityUrl(),identity_token:null===(k=$.authHandler)||void 0===k?void 0:k.getIdentityToken(),refresh_token:U.api.getRefreshToken(),profile:{premises:bt.V.instance.selectedLocation}})).addResponseInterceptor(G.XKG.convertToJson))}catch(Q){return this.onHandoffResult.dispatch(!1,""),!1}if(!W.wasSuccessful())return this.onHandoffResult.dispatch(!1,""),!1;const q=W.getData();if(!(null==q?void 0:q.code))return this.onHandoffResult.dispatch(!1,""),!1;yield new Promise((k=>{z.q.instance.prodigy.gameContainer.get("306-5359").forceSaveCharacter(k)}));const K=`${j.getArcadiaLauncherUrl()}/?launcher=true&code=${q.code}`;this.onHandoffResult.dispatch(!0,K);const Y=vt.pF.isNativeApp();return gt.I.openWebsite(K,Y,!1),!0}))}}mt.onHandoffResult=new G.HN0;var yt,_t=U(53661);function Et(){return(0,rt.sH)(this,void 0,void 0,(function*(){var k,B,U,F;const G=z.q.instance.prodigy.gameContainer.get("306-5359"),j=z.q.instance.prodigy.gameContainer.get("c47-20b6"),$=lt.C.getVideosDataProvider(),H=yield $.getVideosDataByType(dt.s.ArcadiaLink),V=ht().sample(Object.keys(null!==(B=null===(k=null==H?void 0:H.data)||void 0===k?void 0:k.videos)&&void 0!==B?B:{})),W=null===(U=null==H?void 0:H.data)||void 0===U?void 0:U.videos[null!=V?V:""],q=!ft.a.doesFeatureTimestampExist(G,dt.s.ArcadiaLink)&&void 0!==V;z.q.instance.prodigy.open.prefabMenu({prefabID:ct.l.GoingToArcadiaModal,isModal:!1,injectablePropertiesDictionary:{GO_TO_ARCADIA_MODAL_CALLBACK:()=>(0,rt.sH)(this,void 0,void 0,(function*(){return function(k){return(0,rt.sH)(this,void 0,void 0,(function*(){mt.onHandoffResult.addOnce(((B,U)=>{B&&(k.funnel.sendStep(tt.F.ArcadiaLink,"feature",it.l.FirstExit,it.T.FirstExit),k.featureCommon.sendCrossPlatformEvent({source_product:"math_game",destination_product:"arcadia",navigation_type:"modal_confirm",entry_surface:"world_map_arcadia_icon",interaction_id:k.featureCommon.getCurrentButtonID("arcadia-zone-button"),instance_type:"navigation",target_url:U,instance_id:k.featureCommon.getCurrentInterfaceID("arcadia_confirmation_modal")}))})),yield mt.launch()}))}(j)})),PLAY_ARCADIA_FEATURE_VIDEO:q,[_t.Ut.VideoId]:V,[_t.Ut.SupportedResolutionIds]:null==W?void 0:W.supportedResolutionIds,[_t.Ut.SizeRatio]:null===(F=null==H?void 0:H.metadata)||void 0===F?void 0:F.sizeRatio},sendEvents:!0,interfaceEventProps:{interfaceName:et.B.ArcadiaConfirmationModal,interfaceType:ut.Wm.Modal,originType:ut.$N.ButtonClick,originID:j.featureCommon.getCurrentButtonID("arcadia-zone-button")}}),q&&ft.a.saveTimestampData(dt.s.ArcadiaLink)}))}!function(k){k.FireflyForest="WORLD_FIREFLY_FOREST",k.ShiverchillMountains="WORLD_SHIVERCHILL_MOUNTAINS",k.Skywatch="WORLD_SKYWATCH",k.BonfireSpire="WORLD_BONFIRE_SPIRE",k.ShipwreckShore="WORLD_SHIPWRECK_SHORE",k.TheAcademy="WORLD_THE_ACADEMY",k.DynoDigOasis="WORLD_DYNO_DIG_OASIS",k.DarkTower="WORLD_DARK_TOWER",k.LamplightTown="WORLD_LAMPLIGHT_TOWN",k.YourHouse="WORLD_YOUR_HOUSE",k.TowerTown="TOWER_TOWN_MAP",k.DuelsStadium="DUELS_MATCHMAKING_MAP",k.DragonIsle="DRAGON_ISLE_MAP",k.Arcadia="ARCADIA_MAP"}(yt||(yt={}));const wt={prefabIndex:J.P.Firefly,nameKey:yt.FireflyForest,zone:K.A_.FOREST,tag:j.O.Firefly,target:"forest-C8",summaryKey:"WORLD_FIREFLY_FOREST_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:32,titanIconOffset:{x:-70,y:10},ultimatesQuestIconOffset:{x:0,y:10},msgKeys:{1:"WORLD_MAP_FOREST_QUEST_0",2:"WORLD_MAP_FOREST_QUEST_1",3:"WORLD_MAP_FOREST_QUEST_2",4:"WORLD_MAP_FOREST_QUEST_3",5:"WORLD_MAP_FOREST_QUEST_4",6:"WORLD_MAP_FOREST_QUEST_5",7:"WORLD_MAP_FOREST_QUEST_6",8:"WORLD_MAP_FOREST_QUEST_7",9:"WORLD_MAP_FOREST_QUEST_8",10:"WORLD_MAP_FOREST_QUEST_9",11:"WORLD_MAP_FOREST_QUEST_10",12:"WORLD_MAP_FOREST_QUEST_11"},shouldTrackVisits:!0},Tt=Object.assign(Object.assign({},wt),{prefabIndex:J.P.FireflyHard,zone:K.A_.FORESTHARD,target:"forest_hard-C8",difficultyMode:H.i.Hard,requirementsID:32}),St={prefabIndex:J.P.Shiverchill,nameKey:yt.ShiverchillMountains,zone:K.A_.SHIVERCHILL,tag:j.O.Shiverchill,target:"shiverchill-A10",summaryKey:"WORLD_SHIVERCHILL_MOUNTAINS_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:33,titanIconOffset:{x:-60,y:-20},ultimatesQuestIconOffset:{x:-70,y:10},msgKeys:{1:"WORLD_MAP_SHIVERCHILL_QUEST_0",2:"WORLD_MAP_SHIVERCHILL_QUEST_1",3:"WORLD_MAP_SHIVERCHILL_QUEST_2",4:"WORLD_MAP_SHIVERCHILL_QUEST_3",5:"WORLD_MAP_SHIVERCHILL_QUEST_4",6:"WORLD_MAP_SHIVERCHILL_QUEST_5",7:"WORLD_MAP_SHIVERCHILL_QUEST_6",8:"WORLD_MAP_SHIVERCHILL_QUEST_7",9:"WORLD_MAP_SHIVERCHILL_QUEST_8",10:"WORLD_MAP_SHIVERCHILL_QUEST_9",11:"WORLD_MAP_SHIVERCHILL_QUEST_10",12:"WORLD_MAP_SHIVERCHILL_QUEST_11",13:"WORLD_MAP_SHIVERCHILL_QUEST_12",14:"WORLD_MAP_SHIVERCHILL_QUEST_13",15:"WORLD_MAP_SHIVERCHILL_QUEST_14"},shouldTrackVisits:!0},At=Object.assign(Object.assign({},St),{isUnreleased:!1,prefabIndex:J.P.ShiverchillHard,zone:K.A_.SHIVERCHILLHARD,target:"shiverchill_hard-A10",difficultyMode:H.i.Hard,dungeon:void 0,requirementsID:61}),Ct={prefabIndex:J.P.Skywatch,nameKey:yt.Skywatch,zone:K.A_.SKYWATCH,tag:j.O.Skywatch,target:"skywatch-A1",summaryKey:"WORLD_SKYWATCH_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:34,titanIconOffset:{x:0,y:-65},ultimatesQuestIconOffset:{x:-20,y:20},msgKeys:{1:"WORLD_MAP_SKYWATCH_QUEST_0",2:"WORLD_MAP_SKYWATCH_QUEST_1",3:"WORLD_MAP_SKYWATCH_QUEST_2",4:"WORLD_MAP_SKYWATCH_QUEST_3",5:"WORLD_MAP_SKYWATCH_QUEST_4",6:"WORLD_MAP_SKYWATCH_QUEST_5",7:"WORLD_MAP_SKYWATCH_QUEST_6",8:"WORLD_MAP_SKYWATCH_QUEST_7",9:"WORLD_MAP_SKYWATCH_QUEST_8",10:"WORLD_MAP_SKYWATCH_QUEST_9",11:"WORLD_MAP_SKYWATCH_QUEST_10",12:"WORLD_MAP_SKYWATCH_QUEST_11",13:"WORLD_MAP_SKYWATCH_QUEST_12"},shouldTrackVisits:!0},Ot=Object.assign(Object.assign({},Ct),{isUnreleased:!1,prefabIndex:J.P.SkywatchHard,zone:K.A_.SKYWATCHHARD,target:"skywatch_hard-A1",difficultyMode:H.i.Hard,requirementsID:62}),It={prefabIndex:J.P.Bonfire,nameKey:yt.BonfireSpire,zone:K.A_.BONFIRE,tag:j.O.Bonfire,target:"bonfire_spire-B1",summaryKey:"WORLD_BONFIRE_SPIRE_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:35,titanIconOffset:{x:-45,y:-20},ultimatesQuestIconOffset:{x:25,y:-20},msgKeys:{1:"WORLD_MAP_BONFIRE_QUEST_0",2:"WORLD_MAP_BONFIRE_QUEST_1",3:"WORLD_MAP_BONFIRE_QUEST_2",4:"WORLD_MAP_BONFIRE_QUEST_3",5:"WORLD_MAP_BONFIRE_QUEST_4",6:"WORLD_MAP_BONFIRE_QUEST_5",7:"WORLD_MAP_BONFIRE_QUEST_6",8:"WORLD_MAP_BONFIRE_QUEST_7",9:"WORLD_MAP_BONFIRE_QUEST_8",10:"WORLD_MAP_BONFIRE_QUEST_9",11:"WORLD_MAP_BONFIRE_QUEST_10",12:"WORLD_MAP_BONFIRE_QUEST_11",13:"WORLD_MAP_BONFIRE_QUEST_12",14:"WORLD_MAP_BONFIRE_QUEST_13"},shouldTrackVisits:!0},Dt=Object.assign(Object.assign({},It),{isUnreleased:!1,prefabIndex:J.P.BonfireHard,zone:K.A_.BONFIREHARD,target:"bonfire_spire_hard-B1",difficultyMode:H.i.Hard,requirementsID:63}),Rt={prefabIndex:J.P.Shipwreck,nameKey:yt.ShipwreckShore,zone:K.A_.SHIPWRECK,tag:j.O.Shipwreck,icon:"zone-water",target:"shipwreck_shore-B12",summaryKey:"WORLD_SHIPWRECK_SHORE_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:36,titanIconOffset:{x:-50,y:40},ultimatesQuestIconOffset:{x:20,y:40},msgKeys:{1:"WORLD_MAP_SHIPWRECK_QUEST_0",2:"WORLD_MAP_SHIPWRECK_QUEST_1",3:"WORLD_MAP_SHIPWRECK_QUEST_2",4:"WORLD_MAP_SHIPWRECK_QUEST_3",5:"WORLD_MAP_SHIPWRECK_QUEST_4",6:"WORLD_MAP_SHIPWRECK_QUEST_5",7:"WORLD_MAP_SHIPWRECK_QUEST_6",8:"WORLD_MAP_SHIPWRECK_QUEST_7",9:"WORLD_MAP_SHIPWRECK_QUEST_8",10:"WORLD_MAP_SHIPWRECK_QUEST_9",11:"WORLD_MAP_SHIPWRECK_QUEST_10"},shouldTrackVisits:!0},Pt=Object.assign(Object.assign({},Rt),{isUnreleased:!1,prefabIndex:J.P.ShipwreckHard,zone:K.A_.SHIPWRECKHARD,target:"shipwreck_shore_hard-B12",difficultyMode:H.i.Hard,requirementsID:64}),Mt={prefabIndex:J.P.Academy,nameKey:yt.TheAcademy,zone:K.A_.ACADEMY,target:"academy-GH3",summaryKey:"WORLD_THE_ACADEMY_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:12,puppetMasterIconOffset:{x:-3,y:-190},showNotificationIcon:()=>z.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("key",22)<=0||!z.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(q.B.FEATURE_ACADEMY_TOWERS,q.B.BREADCRUMB_ACADEMY_VISITED)},Nt=Object.assign(Object.assign({},Mt),{isUnreleased:!0,prefabIndex:J.P.AcademyHard,zone:K.A_.ACADEMYHARD,target:"academy_hard-GH3",difficultyMode:H.i.Hard,requirementsID:65}),xt={prefabIndex:J.P.Dyno,nameKey:yt.DynoDigOasis,zone:K.A_.DYNO,target:"dyno-A0",summaryKey:"WORLD_DYNO_DIG_OASIS_DESC",lockKey:"WORLD_MAP_ZONE_LEVEL_LOCKED",classCodeKey:"WORLD_DYNO_DIG_OASIS_CLASS_MODE",classModeFrame:"popup-travel-dinodig",requirementsID:44,hideEvaluationFunc:()=>(0,st.G)($.m).enabled},Lt={prefabIndex:J.P.Darktower,nameKey:yt.DarkTower,zone:K.A_.DARKTOWER,target:"darktower-A1",summaryKey:"WORLD_DARK_TOWER_DESC",lockKey:"WORLD_MAP_DARK_TOWER_LEVEL_LOCKED",requirementsID:40},kt={prefabIndex:J.P.Lamplight,nameKey:yt.LamplightTown,zone:K.A_.LAMPLIGHT,target:"lamplight-B3",summaryKey:"WORLD_LAMPLIGHT_TOWN_DESC",classCodeKey:"WORLD_LAMPLIGHT_TOWN_CLASS_MODE",classModeFrame:"popup-travel-lamplight",lockKey:"WORLD_MAP_ZONE_LEVEL_LOCKED",requirementsID:37,iconOffset:{x:10,y:-90},ultimatesQuestIconOffset:{x:-70,y:10}},Bt={prefabIndex:J.P.House,nameKey:yt.YourHouse,zone:K.A_.HOUSE,target:"house-suburbs",summaryKey:"WORLD_YOUR_HOUSE_DESC",lockKey:"WORLD_MAP_ZONE_LEVEL_LOCKED",classCodeKey:"WORLD_YOUR_HOUSE_CLASS_MODE",classModeFrame:"popup-travel-home",clickEventName:Z.F0.ClickedHouseIcon,requirementsID:38},Ut={prefabIndex:J.P.TowerTown,nameKey:yt.TowerTown,zone:K.A_.TOWERTOWN,tag:j.O.TowerTown,target:"tower_town-A1",summaryKey:"TOWER_TOWN_MAP_DESC",lockKey:"WORLD_MAP_ZONE_LOCKED",requirementsID:41,isLocked:()=>{if(!Y.O.isEnglishLocale())return!0;return z.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("lockTowerTown",!1)},shouldTrackVisits:!0,summaryKeyOverrideFunc:()=>Q.U.isStepComplete(W.B.PuppetMasterDefeated)?"TOWER_TOWN_MAP_DESC_POST_ENDGAME":"TOWER_TOWN_MAP_DESC"},Ft={prefabIndex:J.P.DuelsStadium,nameKey:yt.DuelsStadium,zone:"duels_stadium",target:"duels_stadium",requirementsID:54,onClickOverride:()=>{var k;const B=at.i.BUTTONS_CONFIG.find((k=>"duels_stadium"===k.zone));F.Util.isDefined(B)?((0,st.G)(V.u).enabled||at.i.DIFFICULTY_MODE===B.difficultyMode||(z.q.instance.prodigy.gameContainer.get("ba4-af03").setCurrentDifficulty(H.i.Regular),at.i.setDifficultyMode(null!==(k=B.difficultyMode)&&void 0!==k?k:H.i.Regular)),X.d.openDuelsStadiumMenu().catch(G.RQr.createHandler("Error opening duels stadium menu"))):G.VyI.log("DuelsStadiumConfig.onClickOverride: Duels Stadium info not found",G.$bb.Error)}},Gt={prefabIndex:J.P.DragonIsle,nameKey:yt.DragonIsle,lockNameKey:"UNKNOWN_QUESTION_MARKS",zone:K.A_.DRAGONISLE,target:"dragon_isle-A1",summaryKey:"WORLD_DRAGON_ISLE_DESC",lockKey:"DRAGON_ISLE_WORLD_MAP_LOCKED",shouldLockForPuppetMasterZoneLockSpell:()=>0===(0,nt.k)(),isLocked:()=>0===(0,nt.k)(),tintLockOnZoneGoals:!0,hideZoneOnLocked:!0},jt={prefabIndex:J.P.Arcadia,nameKey:yt.Arcadia,zone:"arcadia",target:"arcadia",requirementsID:74,difficultyModeAgnostic:!0,onSetupLocation(){(0,st.G)($.m).enabled&&z.q.instance.prodigy.gameContainer.get("c47-20b6").funnel.sendStep(tt.F.ArcadiaLink,"feature",it.l.WorldMapSeen,it.T.WorldMapSeen)},onClickOverride:()=>{Et().catch(G.RQr.createHandler("Error handling Arcadia zone button click"))},analyticsClickOverride(){at.i.sendButtonClickedEvent("arcadia-zone-button","arcadia_confirmation_modal",et.B.WorldMap,{elementType:"map_screen",interfaceType:"overworld"}),z.q.instance.prodigy.gameContainer.get("c47-20b6").funnel.sendStep(tt.F.ArcadiaLink,"feature",it.l.FirstTap,it.T.FirstTap)},hideEvaluationFunc:()=>!(0,st.G)($.m).enabled}},60654:(k,B,U)=>{"use strict";U.d(B,{i:()=>X});var F=U(62459),G=U(88022),j=U(35120),$=U(77938),H=U(86051),V=U(52491),W=U(23082),q=U(30226),K=U(47255),z=U(64353),Y=U(17291),Q=U(95057);class X extends Y.b{constructor(k,B,U,F){super(k,B,H.K.BOOST_SELECT,{hideMenu:!0,hideContent:!1,hideClose:!0}),this.boosts=U,this.callback=F,this.setup()}menuSetup(){super.menuSetup();const k=j.q.instance.prodigy.create.panel(this,340,160,13,6);k.add(j.q.instance.prodigy.create.sprite(-15,-15,G._.General_icons_json,"member")),j.q.instance.prodigy.create.font(k,-310,15,j.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("BOOST_MENU_TITLE"),{align:"center",size:30});for(let B=0;B{"use strict";var F;U.d(B,{s:()=>F}),function(k){k[k.Key=0]="Key",k[k.View=1]="View",k[k.Icon=2]="Icon",k[k.IconNoBackground=3]="IconNoBackground",k[k.Store=4]="Store",k[k.Inventory=5]="Inventory",k[k.Card=6]="Card",k[k.Info=7]="Info",k[k.StylistCard=8]="StylistCard",k[k.Buy=9]="Buy",k[k.Equip=10]="Equip",k[k.Item=11]="Item",k[k.GotItem=12]="GotItem",k[k.WizardCostumesMenu=13]="WizardCostumesMenu"}(F||(F={}))},25480:(k,B,U)=>{"use strict";U.d(B,{u:()=>st});var F=U(8674),G=U(62459),j=U(95891),$=U(88022),H=U(35120),V=U(77938),W=U(13729),q=U(73797),K=U(35084),z=U(63746),Y=U(43531),Q=U(70703),X=U(30226),Z=U(47255),J=U(64353),tt=U(35452),et=U(95057),it=U(21418);class st extends tt.a{get content(){return this._content}constructor(k,B,U,F,j,$,V,W=!1,K={},z){super(k,B,0,0,H.q.instance.prodigy.textureMenu),this.storeName=null,this._itemCards=[],this.enableItemInput=!0,this._equippingItemInProgress=!1,this._deferredPromiseResolve=null,this.game=k,this.items=st.mergeItems(U),this.onClose=()=>{H.q.instance.game.broadcaster.broadcast(q.n8.GotItemClosed),null==F||F()},this.shouldStartDialogueOnCreate=!G.Aq$.isDefined(j)||j,this.eventType=$,this.storeName=V,this.fakeAward=W,this._segmentItemMetadata=K,this._additionalDialogueIds=z,this.create(),G.VyI.log("GotItem------------------------------------",G.$bb.Verbose)}create(){var k;for(super.create();st._menuIsOpen&&!H.q.instance.prodigy.open.isClosingMenus;)H.q.instance.prodigy.open.menuCloseTopmost(1),0===H.q.instance.prodigy.open.menus.length&&(st._menuIsOpen=!1);if(st._menuIsOpen=!0,this.dialogue=H.q.instance.prodigy.dialogue.create(),this._content=H.q.instance.prodigy.create.element(this,0,0),this.overlay=H.q.instance.prodigy.create.element(this,0,0),null===(k=this._additionalDialogueIds)||void 0===k?void 0:k.precedingDialogue)return this.addDialogueToQueue(this._additionalDialogueIds.precedingDialogue),void this.dialogue.start(!0,this.startGotItemSequence.bind(this),!0,!1);this.startGotItemSequence()}startGotItemSequence(){this.addTransparent(),this.shouldStartDialogueOnCreate?(this.getDialogue(),this.dialogue.startDeprecated("noot")):this.getItems(this.items.length,0,!0,void 0)}addDialogueToQueue(k){k.forEach((k=>{this.dialogue.addEvents([{dialogueData:this.dialogue.dataProvider.get(k),blockInput:!0,hideNext:!1}])}))}startDialogue(){G.Aq$.isDefined(this.dialogue)?this.dialogue.startDeprecated("noot"):G.VyI.log("GotItem.startDialogue - dialogue was null. Cannot start",G.$bb.Error)}getItems(k,B,U,F){var j;const $=[],H=[];for(let V=0;V{var U;X.J.awardXpToActiveTeam(k.N,null===(U=this._segmentItemMetadata)||void 0===U?void 0:U.source_type,B)}}}for(;H.length>0;){const k=H.splice(0,5);this.dialogue.addEvents([{callback:this.showBatchOfItems.bind(this,k)}]),F&&this.dialogue.setText(F)}for(const G of $)X.J.bagItem(G,this.game,this.eventType,this.storeName,this._segmentItemMetadata)}showBatchOfItems(k){this.clearItems();const B=(this.game.width-200*k.length-10*(k.length-1))/2;k.forEach(((k,U)=>{const F=B+210*U;this.revealItem(F,k,400*U)}))}static mergeItems(k){const B=[];let U,F=0;const $=[];for(let G=0;G"currency"===B.type&&B.ID===k[G].ID));let F=0;j.forEach(U,(k=>F+="N"in k?k.N:1)),k[G].N=F,B.push(k[G]),$.push(k[G].ID)}}else B.push(k[G]);return 0!==F&&B.unshift({type:"gold",N:F}),G.Aq$.isDefined(U)&&B.unshift(U),G.VyI.log(JSON.stringify(B),G.$bb.Verbose),B}getDialogue(){if(1===this.items.length)this.getSingleDialogue(this.items[0],0,!0),this.dialogue.setText({callback:this.processClose.bind(this)});else if("memberBox-reward"===this.eventType){const k=this.game.rnd.integerInRange(191,197),B=H.q.instance.prodigy.dialogues.get("noot",k);this.getItems(this.items.length,0,!0,B),this.dialogue.setText({callback:this.processClose.bind(this)})}else{const k=H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);let B=k.getText("GOT_ITEM_YOU_GOT_SOMETHING");G.Aq$.isDefined(this.eventType)&&("combat-drop"===this.eventType?B=k.getText("GOT_ITEM_AWESOME_STUFF"):"mystery-bag"===this.eventType&&(B=k.getText("GOT_ITEM_YOU_GOT_MYSTERY_BAG"))),this.getItems(this.items.length,0,!0,{text:B,face:2,anim:1}),(()=>{(0,F.sH)(this,void 0,void 0,(function*(){yield new Promise((k=>{this.dialogue.setText({callback:k})}));for(let k=0;k{this._deferredPromiseResolve=k,this.dialogue.setText({callback:()=>{this._equippingItemInProgress||(k(),this._deferredPromiseResolve=null)}}),this.dialogue.startDeprecated("noot")})))}this._equippingItemInProgress||this.processClose()}))})()}}getSingleDialogue(k,B,U=!0){this.clearItems();const F=H.q.instance.prodigy.gameContainer.get("e20-0fb0").player,j=H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);if("pet"===k.type)this.getItems(1,B,U,{text:j.getText("GOT_ITEM_YOU_GOT_PET"),face:2,anim:1});else if("dorm"===k.type)this.getItems(1,B,U,{text:j.getText("GOT_ITEM_YOU_GOT_FURNITURE"),face:2,anim:1});else if("dormbg"===k.type)this.getItems(1,B,U,{text:j.getText("GOT_ITEM_MOVED_HOUSE"),face:2,anim:1});else if("gold"===k.type)this.getItems(1,B,U,{text:j.getText("GOT_ITEM_GOLD"),face:2,anim:1});else if("spell"===k.type)this.getItems(1,B,U,{text:j.getText("GOT_ITEM_SPELL"),face:2,anim:1});else if("hat"===k.type||"outfit"===k.type||"weapon"===k.type||"boots"===k.type||"follow"===k.type){let $=!1;const H=V.t.getItem(k.type,k.ID).data;!F.hasMembership()&&(1===H.member&&!G.Aq$.isDefined(k.isGift)||G.Aq$.isDefined(H.lockLevel)&&F.getLevel(){const B=k.findComponent(z.Z);B.revealOverlay.active=!0;B.revealOverlay.findComponent(Q.x).startTween(void 0,void 0,U+500),this.setItemInput(k),this._itemCards.push(k)})).catch(G.RQr.createHandler("Error creating an item card")),this.shootStars(U+500,k+100)}setInputEnabled(k){this.enableItemInput=k,this._itemCards.forEach((k=>{this.setItemInput(k)}))}setItemInput(k){k.findComponentInChildren(K.n).InputEnabled=this.enableItemInput}clearItems(){G.Aq$.isDefined(this._content)&&(this._content.destroy(),this._content=H.q.instance.prodigy.create.element(this,0,0)),G.Aq$.isDefined(this.overlay)&&(this.overlay.destroy(),this.overlay=H.q.instance.prodigy.create.element(this,0,0))}skip(){G.Aq$.isDefined(this.overlay)&&this.overlay.destroy(),this.overlay=H.q.instance.prodigy.create.element(this,0,0)}wearItem(k){var B,U;this._equippingItemInProgress=!0;const F=H.q.instance.prodigy.gameContainer,j=F.get("e20-0fb0").player,$=V.t.getItem(k.type,k.ID).data;if(j.hasMembership()||1!==$.member||G.Aq$.isDefined(k.isGift))if(G.Aq$.isDefined($.lockLevel)&&j.getLevel()<$.lockLevel){const B=F.get(G.$Bt.LocalizationService).getText("LEVEL_LOCK_EQUIP",$.name,$.lockLevel);H.q.instance.prodigy.open.message(B).onClose=this.showLevelLockMembershipAd.bind(this,`${k.type}-${k.ID}`)}else j.equip(k.ID,k.type).then((k=>{k&&(j.appearanceChanged=!0,H.q.instance.game.broadcaster.broadcast(q.J8.PlayerAppearanceUpdated)),this.handleEquipFlowCompletion()})).catch(G.RQr.createHandler(`GotItem:wearItem Error equipping item ${k.type}-${k.ID}`));else{const G={conversionFunnelName:Z.o.FunnelEquipNewLockedItem,conversionFunnelMetadata:`${k.type}-${k.ID}`},j=J.P.shouldUseUnifiedConversionFlow(Z.o.FunnelUseMemberLockedItem)?et.R.UnifiedConversionFlow:X.J.showYouTubeMembershipAd(this.game,!0)?et.R.Video:et.R.Static;F.get("c47-20b6").purchase.sendFunnelStart({type:"Equip-Member-Locked-Item-Reward",category:"Item-Equip",contentId:`${k.type}-${k.ID}`,adType:j,adVersion:J.P.getAdVersion(Z.o.FunnelUseMemberLockedItem)}),F.get("c47-20b6").item.sendItemEquipFailedEvent({item_name:null===(U=null===(B=V.t.getItem(k.type,k.ID))||void 0===B?void 0:B.data)||void 0===U?void 0:U.name,item_type:k.type,item_id:k.ID,fail_reason:"Member Locked"}),H.q.instance.prodigy.open.membershipInfo(this.handleEquipFlowCompletion.bind(this),G)}}showLevelLockMembershipAd(k){var B,U;if(!H.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasMembership()){const F=H.q.instance.prodigy.gameContainer.get("c47-20b6"),G=k.split("-"),j=J.P.shouldUseUnifiedConversionFlow(Z.o.FunnelEquipLevelLockedItem)?et.R.UnifiedConversionFlow:X.J.showYouTubeMembershipAd(this.game,!0)?et.R.Video:et.R.Static;F.purchase.sendFunnelStart({type:"Equip-Level-Locked-Item-Reward",category:"Item-Equip",contentId:k,adType:j,adVersion:J.P.getAdVersion(Z.o.FunnelEquipLevelLockedItem)}),F.item.sendItemEquipFailedEvent({item_name:null===(U=null===(B=V.t.getItem(G[0],parseInt(G[1])))||void 0===B?void 0:B.data)||void 0===U?void 0:U.name,item_type:G[0],item_id:parseInt(G[1]),fail_reason:"Member Locked"}),H.q.instance.prodigy.open.membershipInfo(this.handleEquipFlowCompletion.bind(this),{conversionFunnelName:Z.o.FunnelEquipLevelLockedItem})}}handleEquipFlowCompletion(){this._equippingItemInProgress=!1,this._deferredPromiseResolve?(this._deferredPromiseResolve(),this._deferredPromiseResolve=null):this.processClose()}shootStars(k,B){const U=H.q.instance.prodigy.create.element(this.overlay);for(let F=0;F<5;F++){const j=B-100+50*F;let V=(this.game.height>>1)-100-150;0===F||4===F?V+=120:1!==F&&3!==F||(V+=50);const W=H.q.instance.prodigy.create.sprite(B,(this.game.height>>1)-100,$._.General_icons_json,"star");U.add(W),W.anchor.set(.5,.5),W.alpha=0;const q=this.game.add.tween(W,this).to({alpha:.5},1,G.GS3.Linear.None).delay(k),K=this.game.add.tween(W,this).to({x:j,y:V,alpha:0},1e3,G.GS3.Quadratic.Out);q.onTweenComplete.add((()=>{K.start()})),q.start()}}processClose(){var k;if(null===(k=this._additionalDialogueIds)||void 0===k?void 0:k.succeedingDialogue)return this.addDialogueToQueue(this._additionalDialogueIds.succeedingDialogue),this.clearItems(),this.background.destroy(),void this.dialogue.start(!0,this.close.bind(this),!0,!1);st._menuIsOpen=!1,this.close()}destroy(){st._menuIsOpen=!1,G.Aq$.isDefined(this._content)&&this._content.destroy(),G.Aq$.isDefined(this.overlay)&&this.overlay.destroy(),this._itemCards.forEach((k=>k.destroy())),super.destroy()}}},93375:(k,B,U)=>{"use strict";var F;U.d(B,{f:()=>F}),function(k){k.Standard="bfea05f6-bb3d-472d-ad13-2601f2f565e1",k.House="3e8bba0f-fc57-4411-8180-ac8948aa48ed"}(F||(F={}))},53661:(k,B,U)=>{"use strict";function F(k){return k}var G,j,$,H,V,W,q,K,z,Y,Q,X,Z,J,tt,et,it,st,nt,at,rt,ot,ht,ct,dt,lt,ut,ft,bt,pt,vt,gt,mt,yt,_t,Et,wt,Tt;U.d(B,{$u:()=>pt,$z:()=>rt,AP:()=>_t,Co:()=>bt,Dw:()=>$,Eh:()=>H,F:()=>F,FK:()=>V,FO:()=>K,Fm:()=>X,G9:()=>gt,ML:()=>tt,OA:()=>et,OP:()=>it,R$:()=>Q,Tl:()=>j,Ut:()=>Et,V8:()=>ft,Wg:()=>J,Wr:()=>wt,XU:()=>ot,YM:()=>yt,ZE:()=>mt,_R:()=>nt,bL:()=>vt,eV:()=>dt,fM:()=>ht,hi:()=>Y,ht:()=>lt,iu:()=>ut,jP:()=>ct,n7:()=>G,oD:()=>at,oX:()=>Z,sD:()=>q,sv:()=>Tt,uo:()=>W,xO:()=>st,zw:()=>z}),function(k){k.BattleProgressPointsAwarded="BATTLE_PROGRESS_POINTS_AWARDED",k.IFrameClosePostMessage="I_FRAME_CLOSE_POST_MESSAGE",k.IFrameSource="I_FRAME_SOURCE",k.InsufficientResource="INSUFFICIENT_RESOURCE",k.StoreName="STORE_NAME",k.ShowTimeRemaining="SHOW_TIME_REMAINING",k.TimeRemainingMs="TIME_REMAINING_MS",k.TimeRemainingText="TIME_REMAINING_TEXT",k.TitleText="TITLE_TEXT",k.WizardInjectionConfiguredAppearance="APPEARANCE",k.WizardInjectionConfiguredInputEnabled="INPUT_ENABLED"}(G||(G={})),function(k){k.Data="ITEM_CARD_DATA",k.OnClick="ITEM_CARD_ON_CLICK"}(j||(j={})),function(k){k.DynamicPromptContentAssetGuid="DYNAMIC_PROMPT_CONTENT_ASSET_GUID"}($||($={})),function(k){k.MembershipPurchaseConversionFunnelMetadata="MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_METADATA",k.MembershipPurchaseConversionFunnelName="MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_NAME",k.MembershipPurchaseConversionFunnelStage="MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_STAGE",k.MembershipPurchaseConversionFunnelStaticOrVideo="MEMBERSHIP_PURCHASE_CONVERSION_FUNNEL_STATIC_OR_VIDEO",k.MembershipPurchaseMemberPanelAdFlavourText="MEMBERSHIP_PURCHASE_MEMBER_PANEL_AD_FLAVOUR_TEXT",k.MembershipPurchaseMemberPanelAdFrameName="MEMBERSHIP_PURCHASE_MEMBER_PANEL_AD_FRAME_NAME",k.MembershipPurchaseMemberPanelAdTrackingEvent="MEMBERSHIP_PURCHASE_MEMBER_PANEL_AD_TRACKING_EVENT",k.MembershipPurchaseUpgrade="MEMBERSHIP_PURCHASE_UPGRADE"}(H||(H={})),function(k){k.OtpMissingMagicoin="OTP_MISSING_MAGICOIN"}(V||(V={})),function(k){k.PostBattleFlowData="POST_BATTLE_FLOW_DATA",k.PostBattleFlowBattleType="POST_BATTLE_FLOW_BATTLE_TYPE",k.PostBattleFlowRewardCardAmountText="POST_BATTLE_FLOW_REWARD_CARD_AMOUNT_TEXT",k.PostBattleFlowRewardCardAssetId="POST_BATTLE_FLOW_REWARD_CARD_ASSET_ID",k.PostBattleFlowRewardCardAssetType="POST_BATTLE_FLOW_REWARD_CARD_ASSET_TYPE",k.PostBattleFlowRewardCardFrame="POST_BATTLE_FLOW_REWARD_CARD_FRAME",k.PostBattleFlowRewardCardIsLocked="POST_BATTLE_FLOW_REWARD_CARD_LOCKED",k.PostBattleFlowRewardCardMemberItem="POST_BATTLE_FLOW_REWARD_CARD_MEMBER_ITEM",k.PostBattleFlowRewardCardMoreThanOneItem="POST_BATTLE_FLOW_REWARD_CARD_MORE_THAN_ONE_ITEM",k.PostBattleFlowRewardsScalingInfo="POST_BATTLE_FLOW_REWARDS_SCALING_INFO",k.PostBattleFlowNumberOfRegularRewardCards="POST_BATTLE_FLOW_NUMBER_OF_REGULAR_REWARD_CARDS",k.PostBattleFlowNumberOfMemberRewardCards="POST_BATTLE_FLOW_NUMBER_OF_MEMBER_REWARD_CARDS",k.PostBattleFlowVictory="POST_BATTLE_FLOW_VICTORY",k.PostBattleFlowWizardWillLevelUp="POST_BATTLE_FLOW_WIZARD_WILL_LEVEL_UP",k.PostBattleFlowWizardEndLevel="POST_BATTLE_FLOW_WIZARD_LEVEL",k.PostBattleFlowContinueCallback="POST_BATTLE_FLOW_CONTINUE_CALLBACK",k.PostBattleFlowMemberChestActive="POST_BATTLE_FLOW_MEMBER_CHEST_ACTIVE",k.PostBattleFlowXpWarningLocalizedTextId="POST_BATTLE_FLOW_XP_WARNING_LOCALIZED_TEXT_ID",k.EnableRescueButtonInput="ENABLE_RESCUE_BUTTON_INPUT",k.PetRescued="PET_RESCUED",k.PostBattleFlowRescueContinueButtonText="RESCUE_CONTINUE_BUTTON_TEXT",k.PostBattleFlowRescueTitle="POST_BATTLE_FLOW_RESCUE_TITLE",k.PostBattleFlowShowClouds="POST_BATTLE_FLOW_SHOW_CLOUDS",k.ShowFreeRescueButton="SHOW_FREE_RESCUE_BUTTON",k.ShowMagicoinButton="SHOW_MAGICOIN_RESCUE_BUTTON",k.ShowMembershipButton="SHOW_MEMBERSHIP_RESCUE_BUTTON"}(W||(W={})),function(k){k.RescuablePetsContainer="RESCUABLE_PETS_CONTAINER"}(q||(q={})),function(k){k.PopupMessageAtlasFrameName="POPUP_MESSAGE_ATLAS_FRAME_NAME",k.PopupMessageAtlasGuid="POPUP_MESSAGE_ATLAS_GUID",k.PopupMessageText="POPUP_MESSAGE_TEXT",k.PopupMessageTextFill="POPUP_MESSAGE_TEXT_FILL",k.PopupMessageTextStroke="POPUP_MESSAGE_TEXT_STROKE",k.PopupMessageTextStrokeThickness="POPUP_MESSAGE_TEXT_STROKE_THICKNESS"}(K||(K={})),function(k){k.UnifiedStoreButton="UNIFIED_STORE_BUTTON",k.UnifiedStoreButtonIconFrame="UNIFIED_STORE_BUTTON_ICON_FRAME",k.UnifiedStoreButtonImageFrame="UNIFIED_STORE_BUTTON_IMAGE_FRAME",k.UnifiedStoreButtonName="UNIFIED_STORE_BUTTON_NAME",k.UnifiedStoreSegmentButtonName="UNIFIED_STORE_SEGMENT_BUTTON_NAME",k.UnifiedStoreSegmentDestinationName="UNIFIED_STORE_SEGMENT_DESTINATION_NAME"}(z||(z={})),function(k){k.CanPurchaseSlots="CAN_PURCHASE_SLOTS",k.PetCreatureData="PET_DATA",k.PetSlotMemberBonus="PET_SLOT_MEMBER_BONUS",k.PetSlotMemberMaximumLimit="PET_SLOT_MEMBER_MAXIMUM_LIMIT",k.PurchasePetSlotTransactionId="PURCHASE_PET_SLOT_TRANSACTION_ID",k.PurchasePetSlotCompleteCallback="PURCHASE_PET_SLOT_COMPLETE_CALLBACK",k.SpinePetEvolveBurst="SPINE_PET_EVOLVE_BURST",k.SpinePetEvolveIdle="SPINE_PET_EVOLVE_IDLE",k.YourPetPanelPetId="YOUR_PET_PANEL_PET_ID",k.YourPetPanelPetData="YOUR_PET_PANEL_PET_DATA",k.YourPetPanelPetName="YOUR_PET_PANEL_PET_NAME",k.YourPetPanelPetHasNickname="YOUR_PET_PANEL_PET_HAS_NICKNAME",k.YourPetPanelPetSpecies="YOUR_PET_PANEL_PET_SPECIES",k.YourPetPanelXpBarInfo="YOUR_PET_PANEL_XP_BAR_INFO",k.YourPetElementalBaseFrame="YOUR_PET_ELEMENTAL_BASE_FRAME",k.YourPetPanelEvoLineNumStages="PET_EVO_LINE_NUM_STAGES",k.YourPetPanelEvoLineOwnedStage="PET_EVO_LINE_OWNED_STAGE",k.YourPetPanelEvoLineStage1Id="PET_EVO_LINE_STAGE_1_ID",k.YourPetPanelEvoLineStage1Seen="PET_EVO_LINE_STAGE_1_SEEN",k.YourPetPanelEvoLineStage1Rescued="PET_EVO_LINE_STAGE_1_RESCUED",k.YourPetPanelEvoLineStage2Id="PET_EVO_LINE_STAGE_2_ID",k.YourPetPanelEvoLineStage2Seen="PET_EVO_LINE_STAGE_2_SEEN",k.YourPetPanelEvoLineStage2Rescued="PET_EVO_LINE_STAGE_2_RESCUED",k.YourPetPanelEvoLineStage3Id="PET_EVO_LINE_STAGE_3_ID",k.YourPetPanelEvoLineStage3Seen="PET_EVO_LINE_STAGE_3_SEEN",k.YourPetPanelEvoLineStage3Rescued="PET_EVO_LINE_STAGE_3_RESCUED",k.YourPetPanelEvoLineStage4Id="PET_EVO_LINE_STAGE_4_ID",k.YourPetPanelEvoLineStage4Seen="PET_EVO_LINE_STAGE_4_SEEN",k.YourPetPanelEvoLineStage4Rescued="PET_EVO_LINE_STAGE_4_RESCUED",k.YourPetPanelEvolveButtonWithHC="YOUR_PET_ENABLE_EVOLVE_BUTTON_WITH_HC",k.YourPetPanelShowEvolveButton="YOUR_PET_PANEL_SHOW_EVOLVE_BUTTON",k.YourPetPanelEnableEvolveButton="YOUR_PET_PANEL_ENABLE_EVOLVE_BUTTON",k.YourPetPanelEnableReleaseButton="YOUR_PET_PANEL_ENABLE_RELEASE_BUTTON",k.YourPetPanelEnableAddTeamButton="YOUR_PET_PANEL_ENABLE_ADD_TEAM_BUTTON",k.YourPetPanelAddToTeamFunction="YOUR_PET_PANEL_ADD_TO_TEAM_FUNCTION",k.YourPetPanelReleasePetFunction="YOUR_PET_PANEL_RELEASE_PET_FUNCTION",k.YourPetPanelLevelUpButtonDisabledMessage="YOUR_PET_PANEL_LEVEL_UP_BUTTON_DISABLED_MESSAGE",k.YourPetPanelLevelUpMaxLevelState="YOUR_PET_PANEL_LEVEL_UP_MAX_LEVEL_STATE",k.YourPetPanelEnableLevelUpButton="YOUR_PET_PANEL_ENABLE_LEVEL_UP_BUTTON",k.YourPetPanelLevelUpButtonLevel="YOUR_PET_PANEL_LEVEL_UP_BUTTON_LEVEL",k.YourPetPanelLevelUpButtonCost="YOUR_PET_PANEL_LEVEL_UP_BUTTON_COST",k.YourPetPanelLevelUpButtonCostDifference="YOUR_PET_PANEL_LEVEL_UP_BUTTON_COST_DIFFERENCE",k.YourPetPanelLevelUpButtonCostText="YOUR_PET_PANEL_LEVEL_UP_BUTTON_COST_TEXT",k.YourPetPanelLevelUpMagicoinCost="YOUR_PET_PANEL_LEVEL_UP_MAGICOIN_COST",k.YourPetPanelLevelUpMagicoinCostDifference="YOUR_PET_PANEL_LEVEL_UP_MAGICOIN_COST_DIFFERENCE",k.YourPetPanelLevelUpConversionButtonEnabled="YOUR_PET_PANEL_LEVEL_UP_CONVERSION_BUTTON_ENABLED",k.YourPetPanelShouldShowCurrencyConversion="SHOULD_SHOW_CURRENCY_CONVERSION",k.YourPetPanelPopupMessageManager="YOUR_PET_PANEL_POPUP_MESSAGE_MANAGER",k.YourPetPanelShowLevelUp="YOUR_PET_PANEL_SHOW_LEVEL_UP",k.YourPetPanelShowRightSideButtons="YOUR_PET_PANEL_SHOW_RIGHT_SIDE_BUTTONS",k.YourPetPanelPetGearShowGearPanel="PET_GEAR_SHOW_GEAR_PANEL",k.YourPetPanelPetGearSlotsDisabled="PET_GEAR_SLOTS_DISABLED",k.YourPetPanelDisplayMergeButton="YOUR_PET_PANEL_DISPLAY_MERGE_BUTTON",k.YourPetPanelDisplayMergeRankBadge="YOUR_PET_PANEL_DISPLAY_MERGE_RANK_BADGE",k.YourPetPanelPetMergeRank="YOUR_PET_PANEL_PET_MERGE_RANK",k.YourPetPanelMergeOnClick="YOUR_PET_PANEL_MERGE_ON_CLICK",k.YourPetPanelEnableRemoveFromTeamButton="ENABLE_REMOVE_FROM_TEAM_BUTTON",k.YourPetShowOnYourTeamBadge="SHOW_ON_YOUR_TEAM_BADGE",k.YourPetEnableAddTeamButton="ENABLE_ADD_TEAM_BUTTON",k.YourPetInfoLoreText="PET_INFO_LORE_TEXT",k.YourPetShowEvolveSparkles="SHOW_EVOLVE_SPARKLES",k.YourPetShowEvolveInfo="SHOW_EVOLVE_INFO",k.YourPetEvolveInfoText="EVOLVE_INFO_TEXT",k.YourPetPetEvolveButtonFunction="PET_EVOLVE_BUTTON_FUNCTION",k.YourPetHideEvolutionLine="HIDE_EVOLUTION_LINE"}(Y||(Y={})),function(k){k.TeamCardData="TEAM_CARD_DATA",k.TeamCardId="TEAM_CARD_ID",k.TeamCardPetGear="TEAM_CARD_PET_GEAR",k.PetRarityText="PET_RARITY_TEXT",k.PetRarity="PET_RARITY"}(Q||(Q={})),function(k){k.ShowRestrictionBadge="SHOW_RESTRICTION_BADGE",k.RestrictionBadgeTest="RESTRICTION_BADGE_TEXT"}(X||(X={})),function(k){k.PetCardPetSpawner="PET_SPAWNER"}(Z||(Z={})),function(k){k.RarityGraphic="RARITY_GRAPHIC",k.RarityTint="RARITY_TINT",k.RarityStroke="RARITY_STROKE",k.IconEnabled="RARITY_ICON_ENABLED",k.BackgroundEnabled="RARITY_BACKGROUND_ENABLED"}(J||(J={})),function(k){k.Disabled="DISABLED",k.InputEnabled="INPUT_ENABLED",k.Selected="SELECTED",k.PetID="PET_ID",k.PetIconID="PET_ICON_ID",k.PetElementID="PET_ELEMENT_ID",k.PetData="PET_DATA",k.Pet="PET",k.Name="NAME",k.NameAlignH="NAME_ALIGN_H",k.Level="LEVEL",k.MergeRank="MERGE_RANK",k.ReadyToMerge="READY_TO_MERGE",k.IconTint="ICON_TINT",k.ShowUpgrade="SHOW_UPGRADE",k.ShowEvolve="SHOW_EVOLVE",k.ShowStaticEvolve="SHOW_STATIC_EVOLVE",k.ShowOnTeam="SHOW_ON_TEAM",k.ShowGuideHand="SHOW_GUIDE_HAND",k.OverlayText="OVERLAY_TEXT",k.ShowElementIcon="SHOW_ELEMENT_ICON",k.ShowMemberLock="SHOW_MEMBERLOCK_ICON",k.ShowStatIcon="SHOW_STAT_ICON",k.ShowLevelIcon="SHOW_LEVEL_ICON",k.ShowPetGear="SHOW_PET_GEAR",k.ShowMergeRankBadge="SHOW_MERGE_RANK_BADGE",k.ShowTimeRemaining="SHOW_TIME_REMAINING",k.TimeRemainingMs="TIME_REMAINING_MS",k.DisabledIcon="DISABLED_ICON",k.ShowMergeBar="SHOW_MERGE_BAR",k.PetRarity="PET_RARITY",k.PetRarityBackground="PET_BACKROUND_RARITY",k.ApplyGreyScale="APPLY_GREYSCALE",k.ShowUnknownBackground="SHOW_UNKNOWN_BACKGROUND",k.ShowRarityBackground="SHOW_RARITY_BACKGROUND",k.ShowTreasureTrackBadge="SHOW_TREASURE_TRACK_BADGE",k.ShowNotificationBadge="SHOW_NOTIFICATION_BADGE",k.ShowNotificationText="SHOW_NOTIFICATION_TEXT",k.NotificationText="NOTIFICATION_TEXT",k.OnClick="ON_CLICK",k.PetDataList="PET_DATA_LIST",k.WhiteOverlay="WHITE_OVERLAY",k.AlphaMode="ALPHA_MODE",k.ShowSelectionAvailableOutline="SHOW_SELECTION_AVAILABLE_OUTLINE",k.PetBookBackgroundClicked="PET_BOOK_BACKGROUND_CLICKED",k.PetRarityText="PET_RARITY_TEXT",k.ShowPetRarity="SHOW_PET_RARITY",k.ShowCloseButton="SHOW_CLOSE_BUTTON",k.ApplyColorFilter="APPLY_COLOR_FILTER",k.UniquePetsTotal="UNIQUE_PETS_TOTAL",k.IsSelecting="IS_SELECTING"}(tt||(tt={})),function(k){k.IngredientCardSpawner="INGREDIENT_CARD_SPAWNER",k.PetSpineComponent="PET_SPINE",k.MergeRankBadge="MERGE_RANK_BADGE",k.MergeFanfare="MERGE_FANFARE",k.MiddlePanelBacking="MIDDLE_PANEL_BACKING",k.IngredientWidget="INGREDIENT_WIDGET",k.MergeBar="MERGE_BAR"}(et||(et={})),function(k){k.MagicoinDisplay="MAGICOIN_DISPLAY",k.GoldDisplay="GOLD_DISPLAY",k.PetInfoPetGearWidget="PET_INFO_PET_GEAR_WIDGET",k.PetLoadingDisplay="PET_INFO_LOADING_DISPLAY",k.LevelUpWidget="LEVEL_UP_WIDGET",k.PetInfoNavigationTabsController="PET_INFO_NAVIGATION_TABS_CONTROLLER",k.PetInfoWidgetController="PET_INFO_WIDGET_CONTROLLER",k.MergeWidgetController="MERGE_WIDGET_CONTROLLER",k.SpellsWidgetController="SPELLS_WIDGET_CONTROLLER",k.EpicCounterWidget="EPIC_COUNTER_WIDGET"}(it||(it={})),function(k){k.TeamCardsParent="TEAM_CARDS_PARENT",k.PetCardPetSpawner="PET_CARD_SPAWNER",k.PetBookScrollView="PET_BOOK_SCROLL_VIEW",k.PetBookFlexContainer="PET_BOOK_FLEX_CONTAINER"}(st||(st={})),function(k){k.PetGearBonusStatAmountText="PET_GEAR_BONUS_STAT_AMOUNT_TEXT",k.PetGearBonusStatAppliedAmount="PET_GEAR_BONUS_STAT_APPLIED_AMOUNT",k.PetGearBonusStatEnabled="PET_GEAR_BONUS_STAT_ENABLED",k.PetGearBonusStatIcon="PET_GEAR_BONUS_STAT_ICON",k.PetGearBonusStatTextKey="PET_GEAR_BONUS_STAT_TEXT_KEY",k.PetGearCategoryLabel="PET_GEAR_CATEGORY_LABEL",k.PetGearFlavourText="PET_GEAR_FLAVOUR_TEXT",k.PetGearInitialGearDisplay="PET_GEAR_INITIAL_GEAR_DISPLAY",k.PetGearItemData="PET_GEAR_ITEM_DATA",k.PetGearItemEquipped="PET_GEAR_ITEM_EQUIPPED",k.PetGearItemIcon="PET_GEAR_ITEM_ICON",k.PetGearItemInfoDataProvider="PET_GEAR_ITEM_INFO_DATA_PROVIDER",k.PetGearItemMember="PET_GEAR_ITEM_MEMBER",k.PetGearItemName="PET_GEAR_ITEM_NAME",k.PetGearItemNew="PET_GEAR_ITEM_NEW",k.PetGearItemSelected="PET_GEAR_ITEM_SELECTED",k.PetGearItemRarity="PET_GEAR_ITEM_RARITY",k.PetGearItemRarityLabel="PET_GEAR_ITEM_RARITY_LABEL",k.PetGearMenuHatGridManager="PET_GEAR_MENU_HAT_GRID_MANAGER",k.PetGearMenuRelicGridManager="PET_GEAR_MENU_RELIC_GRID_MANAGER",k.PetGearPetIcon="PET_GEAR_PET_ICON",k.PetGearPetPreviewDataProvider="PET_GEAR_PET_PREVIEW_DATA_PROVIDER",k.PetGearPreviewLoadout="PET_GEAR_PREVIEW_LOADOUT",k.PetGearShowPetIcon="PET_GEAR_SHOW_PET_ICON",k.PetGearType="PET_GEAR_TYPE",k.PetGearHeaderEnable="PET_GEAR_HEADER_ENABLE",k.PetGearHeaderClose="PET_GEAR_HEADER_CLOSE"}(nt||(nt={})),function(k){k.OwnedPanelTooltipPetInfoButtonTransform="OWNED_PANEL_TOOLTIP_PET_INFO_BUTTON_TRANSFORM",k.PetGearFtueEnabledInputTransform="PET_GEAR_FTUE_INPUT_TRANSFORM",k.PetGearFtueOverlayGameObject="PET_GEAR_FTUE_OVERLAY_GAMEOBJECT",k.PetGearFtueOverlayEnabled="PET_GEAR_FTUE_OVERLAY_ENABLED"}(at||(at={})),function(k){k.PetMergeFtueOverlayEnabled="PET_MERGE_FTUE_OVERLAY_ENABLED",k.PetMergeModalFTUECloseButtonEnabled="PET_MERGE_MODAL_FTUE_CLOSE_BUTTON_ENABLED",k.PetMergeModalFTUEEnabled="PET_MERGE_MODAL_FTUE_ENABLED",k.PetMergeModalCloseButton="PET_MERGE_MODAL_CLOSE_BUTTON"}(rt||(rt={})),function(k){k.CloseCallback="BATTLE_PASS_CLOSE_CALLBACK",k.DestroyBattlePassMenuCallback="BATTLE_PASS_DESTROY_BATTLE_PASS_MENU",k.FocusTabOverride="BATTLE_PASS_FOCUS_TAB_OVERRIDE",k.FocusTierOverride="BATTLE_PASS_FOCUS_TIER_OVERRIDE",k.GoalCompleteToasterDescription="BATTLE_PASS_GOAL_COMPLETE_TOASTER_DESCRIPTION",k.GoalCompleteToasterTitle="BATTLE_PASS_GOAL_COMPLETE_TOASTER_TITLE",k.ItemCardClaimableBorderAtlasGuid="BATTLE_PASS_ITEM_CARD_CLAIMABLE_BORDER_ATLAS_GUID",k.ItemCardClaimableBorderFrameName="BATTLE_PASS_ITEM_CARD_CLAIMABLE_BORDER_FRAME_NAME",k.ItemCardOffSeasonStateAtlasGuid="BATTLE_PASS_ITEM_CARD_OFF_SEASON_STATE_ATLAS_GUID",k.ItemCardOffSeasonStateFrameName="BATTLE_PASS_ITEM_CARD_OFF_SEASON_STATE_FRAME_NAME",k.ItemCardOffSeasonStateIsEnabled="BATTLE_PASS_ITEM_CARD_OFF_SEASON_STATE_IS_ENABLED",k.ItemCardClaimableBorderFrameSizeDelta="BATTLE_PASS_ITEM_CARD_CLAIMABLE_BORDER_FRAME_SIZE_DELTA",k.ItemCardCollectedTextBackingColour="BATTLE_PASS_ITEM_CARD_COLLECTED_TEXT_BACKING_COLOUR",k.ItemCardCollectedTextBackingStrokeColour="BATTLE_PASS_ITEM_CARD_COLLECTED_TEXT_BACKING_STROKE_COLOUR",k.ItemCardCollectedTextColour="BATTLE_PASS_ITEM_CARD_COLLECTED_TEXT_COLOUR",k.ItemCardRarityBackgroundAtlasGuid="BATTLE_PASS_ITEM_CARD_RARITY_BACKGROUND_ATLAS_GUID",k.ItemCardRarityBackgroundFrameName="BATTLE_PASS_ITEM_CARD_RARITY_BACKGROUND_FRAME_NAME",k.ItemRewardId="BATTLE_PASS_ITEM_REWARD_ID",k.ItemTierNumber="BATTLE_PASS_ITEM_TIER_NUMBER",k.ItemRewardType="BATTLE_PASS_ITEM_REWARD_TYPE",k.IsMysteryReward="BATTLE_PASS_IS_MYSTERY_REWARD",k.IsLevelupMemberReward="BATTLE_PASS_IS_LEVELUP_MEMBER_REWARD",k.IsUltimateMemberReward="BATTLE_PASS_IS_ULTIMATE_MEMBER_REWARD",k.MenuBarQuestsTabOpenCallback="BATTLE_PASS_MENU_BAR_QUESTS_TAB_OPEN",k.MenuBarRewardTabOpenCallback="BATTLE_PASS_MENU_BAR_REWARD_TAB_OPEN",k.MythicGuid="BATTLE_PASS_MYTHIC_GUID",k.LevelupMythicGuid="BATTLE_PASS_LEVELUP_MYTHIC_GUID",k.UltimateMemberPetGuid="BATTLE_PASS_ULTIMATE_MEMBER_PET_GUID",k.PremiumTrackIconAtlasGuid="BATTLE_PASS_PREMIUM_TRACK_ICON_ATLAS_GUID",k.PremiumTrackIconFrameName="BATTLE_PASS_PREMIUM_TRACK_ICON_FRAME_NAME",k.PremiumTrackName="BATTLE_PASS_PREMIUM_TRACK_NAME",k.QuestDescription="BATTLE_PASS_QUEST_DESCRIPTION",k.QuestType="BATTLE_PASS_QUEST_TYPE",k.Reward="BATTLE_PASS_REWARD",k.RewardAmount="BATTLE_PASS_REWARD_AMOUNT",k.RewardClaimable="BATTLE_PASS_REWARD_CLAIMABLE",k.RewardClaimed="BATTLE_PASS_REWARD_CLAIMED",k.RewardClaimedAnimationGuid="BATTLE_PASS_REWARD_CLAIMED_ANIMATION_GUID",k.RewardClaimedAnimationName="BATTLE_PASS_REWARD_CLAIMED_ANIMATION_NAME",k.RewardMovementAnimationName="BATTLE_PASS_REWARD_MOVEMENT_ANIMATION_NAME",k.ShouldHighlightCard="BATTLE_PASS_SHOULD_HIGHLIGHT_CARD",k.ShowRewardAmount="BATTLE_PASS_SHOW_REWARD_AMOUNT",k.ShowRewardClaimableAnimation="BATTLE_PASS_SHOW_REWARD_CLAIMABLE_ANIMATION",k.RewardClaimableAnimationName="BATTLE_PASS_REWARD_CLAIMABLE_ANIMATION_NAME",k.TierComplete="BATTLE_PASS_TIER_COMPLETE",k.ToasterNotificationId="BATTLE_PASS_TOASTER_NOTIFICATION_ID",k.MagicoinAmount="MAGICOIN_AMOUNT"}(ot||(ot={})),function(k){k.ChaseItemCorePrefix="CHASE_ITEM_CORE_",k.ChaseItemCoreQuantityPrefix="CHASE_ITEM_CORE_QUANTITY_",k.ChaseItemCoreTextPrefix="CHASE_ITEM_CORE_TEXT_",k.ChaseItemPlusPrefix="CHASE_ITEM_PLUS_",k.ChaseItemPlusQuantityPrefix="CHASE_ITEM_PLUS_QUANTITY_",k.ChaseItemPlusTextPrefix="CHASE_ITEM_PLUS_TEXT_",k.ChaseItemUltraPrefix="CHASE_ITEM_ULTRA_",k.ChaseItemUltraQuantityPrefix="CHASE_ITEM_ULTRA_QUANTITY_",k.ChaseItemUltraTextPrefix="CHASE_ITEM_ULTRA_TEXT_",k.IsPlayerCoreMember="BATTLE_PASS_UPSELL_IS_CORE",k.IsPlayerPlusMember="BATTLE_PASS_UPSELL_IS_PLUS",k.IsPlayerUltraMember="BATTLE_PASS_UPSELL_IS_ULTRA",k.ShowCoreCta="BATTLE_PASS_UPSELL_SHOW_CORE_CTA",k.ShowCorePanel="BATTLE_PASS_UPSELL_SHOW_CORE_PANEL",k.ShowPlusCta="BATTLE_PASS_UPSELL_SHOW_PLUS_CTA",k.ShowPlusPanel="BATTLE_PASS_UPSELL_SHOW_PLUS_PANEL",k.ShowUltraCta="BATTLE_PASS_UPSELL_SHOW_ULTRA_CTA"}(ht||(ht={})),function(k){k.ShouldShowMemberJar="DLC_SHOULD_SHOW_MEMBER_JAR",k.ThresholdPrizePackageFeatureKey="DLC_THRESHOLD_PRIZE_PACKAGE_FEATURE_KEY",k.ThresholdPrizeMembershipTier="DLC_THRESHOLD_PRIZE_MEMBERSHIP_TIER",k.UltimateTrackProgressBarFillData="DLC_ULTIMATE_TRACK_PROGRESS_BAR_FILL_DATA",k.UltimateTrackRewardAvailable="DLC_ULTIMATE_TRACK_REWARD_AVAILABLE",k.UltimateTrackRewardClaimed="DLC_ULTIMATE_TRACK_REWARD_CLAIMED",k.UltimateTrackRewardDisplayConfig="DLC_ULTIMATE_TRACK_REWARD_DISPLAY_CONFIG",k.UltimateTrackTimeRemaining="DLC_ULTIMATE_TRACK_TIME_REMAINING"}(ct||(ct={})),function(k){k.ExitButtonCallback="LOOT_DASH_EXIT_BUTTON_CALLBACK",k.FeatureItemCardAssetId="LOOT_DASH_FEATURED_ITEM_CARD_ASSET_ID",k.FeaturedItemCardAssetType="LOOT_DASH_FEATURED_ITEM_CARD_ASSET_TYPE",k.FeaturedItemCardItemName="LOOT_DASH_FEATURED_ITEM_CARD_ITEM_NAME",k.FeaturedItemCardLocked="LOOT_DASH_FEATURED_ITEM_CARD_LOCKED",k.FeaturedItemConfirmationModalHeaderText="LOOT_DASH_FEATURED_ITEM_CONFIRMATION_MODAL_HEADER_TEXT",k.FeaturedItemConfirmationModalBodyText="LOOT_DASH_FEATURED_ITEM_CONFIRMATION_MODAL_BODY_TEXT",k.FeaturedItemConfirmationModalYesButtonCallback="LOOT_DASH_FEATURED_ITEM_CONFIRMATION_MODAL_YES_BUTTON_CALLBACK",k.FeaturedItemConfirmationModalNoButtonCallback="LOOT_DASH_FEATURED_ITEM_CONFIRMATION_MODAL_NO_BUTTON_CALLBACK",k.MatchBoardPieceHeadTexture="LOOT_DASH_MATCH_BOARD_PIECE_HEAD_TEXTURE",k.MatchBoardPieceName="LOOT_DASH_MATCH_PIECE_NAME",k.MatchFinishedButtonCallback="LOOT_DASH_MATCH_FINISHED_BUTTON_CALLBACK",k.MatchFinishedFireworkAnimationName="LOOT_DASH_MATCH_FINISHED_FIREWORK_ANIMATION_NAME",k.MatchFinishedInfoText="LOOT_DASH_MATCH_FINISHED_INFO_TEXT",k.MatchFinishedLootBagAmountText="LOOT_DASH_MATCH_FINISHED_LOOT_BAG_AMOUNT_TEXT",k.MatchFinishedMatchCompleted="LOOT_DASH_MATCH_FINISHED_MATCH_COMPLETED",k.MatchFinishedPlacement="LOOT_DASH_MATCH_FINISHED_PLACEMENT",k.MatchFinishedPlacementSuffix="LOOT_DASH_MATCH_FINISHED_PLACEMENT_SUFFIX",k.MatchFinishedPlacementReplacementText="LOOT_DASH_MATCH_FINISHED_PLACEMENT_REPLACEMENT_TEXT",k.MatchFinishedRewardsEarned="LOOT_DASH_MATCH_FINISHED_REWARDS_EARNED",k.MatchFinishedShowNumberedPlacement="LOOT_DASH_MATCH_FINISHED_SHOW_NUMBERED_PLACEMENT",k.NoMoreRevivesBannerTextCore="LOOT_DASH_NO_MORE_REVIVES_BANNER_TEXT_CORE",k.NoMoreRevivesBannerTextPlus="LOOT_DASH_NO_MORE_REVIVES_BANNER_TEXT_PLUS",k.NoMoreRevivesBannerTextUltra="LOOT_DASH_NO_MORE_REVIVES_BANNER_TEXT_ULTRA",k.NoMoreRevivesReviveAmountTextCore="LOOT_DASH_NO_MORE_REVIVES_REVIVE_AMOUNT_TEXT_CORE",k.NoMoreRevivesReviveAmountTextPlusAndUltra="LOOT_DASH_NO_MORE_REVIVES_REVIVE_AMOUNT_TEXT_PLUS_AND_ULTRA",k.NoMoreRevivesShowCoreAndPlus="LOOT_DASH_NO_MORE_REVIVES_SHOW_CORE_AND_PLUS",k.NoMoreRevivesShowCoreAndUltra="LOOT_DASH_NO_MORE_REVIVES_SHOW_CORE_AND_ULTRA",k.NoMoreRevivesShowPlusOnly="LOOT_DASH_NO_MORE_REVIVES_SHOW_PLUS_ONLY",k.NoMoreRevivesShowUltraOnly="LOOT_DASH_NO_MORE_REVIVES_SHOW_ULTRA_ONLY",k.NoMoreRevivesLineOneText="LOOT_DASH_NO_MORE_REVIVES_LINE_ONE_TEXT",k.NoMoreRevivesLineTwoText="LOOT_DASH_NO_MORE_REVIVES_LINE_TWO_TEXT",k.StageCompleted="LOOT_DASH_STAGE_COMPLETED",k.StageCurrent="LOOT_DASH_STAGE_CURRENT",k.StageFuture="LOOT_DASH_STAGE_FUTURE",k.StageInfoWidgetActionProgress="LOOT_DASH_STAGE_INFO_WIDGET_ACTION_PROGRESS",k.StageInfoWidgetActionTitle="LOOT_DASH_STAGE_INFO_WIDGET_ACTION_TITLE",k.StageInfoWidgetCurrentStageIcon="LOOT_DASH_STAGE_INFO_WIDGET_CURRENT_STAGE_ICON",k.StageInfoWidgetNextStageIcon="LOOT_DASH_STAGE_INFO_WIDGET_NEXT_STAGE_ICON",k.StageInfoWidgetShowFinishLine="LOOT_DASH_STAGE_INFO_WIDGET_SHOW_FINISH_LINE",k.ShowStageIcon="LOOT_DASH_SHOW_STAGE_ICON",k.StageType="LOOT_DASH_STAGE_TYPE",k.StageHasMultiplePlayers="LOOT_DASH_STAGE_HAS_MULTIPLE_PLAYERS"}(dt||(dt={})),function(k){k.SegmentedOfferCurrentOfferStatus="SEGMENTED_OFFERS_CURRENT_OFFER_STATUS",k.SegmentedOffersEnding="SEGMENTED_OFFERS_ENDING",k.SegmentedOffersItemIcon="OFFER_ITEM_ICON_",k.SegmentedOffersItemId="OFFER_ITEM_ID_",k.SegmentedOffersItemName="OFFER_ITEM_NAME_",k.SegmentedOffersItemQuantity="OFFER_ITEM_QUANTITY_",k.SegmentedOffersRejected="SEGMENTED_OFFERS_REJECTED",k.SegmentedOffersTimeRemainingMS="SEGMENTED_OFFERS_TIME_REMAINING",k.SegmentedOffersFunnelAdvancedCTA="SEGMENTED_OFFERS_FUNNEL_ADVANCED_CTA",k.SegmentedOffersFunnelAdvancedGotMembership="SEGMENTED_OFFERS_FUNNEL_ADVANCED_GOT_MEMBERSHIP",k.SegmentedOffersModalInjectableProperties="SEGMENTED_OFFERS_MODAL_INJECTABLE_PROPERTIES"}(lt||(lt={})),function(k){k.ClassCodeSubmitSuccess="CLASS_CODE_SUBMIT_SUCCESS"}(ut||(ut={})),function(k){k.LoginDetailsUsername="LoginDetailsUsername",k.LoginDetailsPassword="LoginDetailsPassword"}(ft||(ft={})),function(k){k.CurrencyId="CURRENCY_ID",k.FallbackRewards="FALLBACK_REWARDS",k.InstanceType="INSTANCE_TYPE",k.WeightedRewards="WEIGHTED_REWARDS",k.RespinCost="RESPIN_COST"}(bt||(bt={})),function(k){k.CurrencyID="CURRENCY_DISPLAY_ID",k.CurrencyAmount="CURRENCY_DISPLAY_AMOUNT"}(pt||(pt={})),function(k){k.CanRerollOpponents="CAN_REROLL_OPPONENTS",k.HeaderTitle="HEADER_TITLE",k.MenuInterfaceName="MENU_INTERFACE_NAME",k.OnBack="ON_BACK",k.OnClose="ON_CLOSE",k.OpponentsRerollCost="OPPONENTS_REROLL_COST",k.RiftCurrencyId="RIFT_CURRENCY_ID",k.RiftKeyAmount="RIFT_KEY_AMOUNT",k.RiftKeyIcon="RIFT_KEY_ICON",k.ShowHeaderText="SHOW_HEADER_TEXT",k.ShowMagicoin="SHOW_MAGICOIN_COUNT",k.ShowMagicoinText="SHOW_MAGICOIN_TEXT",k.ShowRerollMagicoinCost="SHOW_REROLL_MC_COST",k.ShowRerollMemberIcon="SHOW_REROLL_MEMBER_ICON",k.ShowRiftKeys="SHOW_RIFT_KEYS",k.ShowTooltip="SHOW_TOOLTIP",k.StoreEnabled="STORE_ENABLED",k.StoreKey="STORE_KEY",k.BackgroundHex="BACKGROUND_HEX",k.DiamondsHex="DIAMONDS_HEX",k.DiamondsAlpha="DIAMONDS_ALPHA",k.GradientHex="GRADIENT_HEX"}(vt||(vt={})),function(k){k.OpenRiftsPortalCallback="OPEN_RIFTS_PORTAL_CALLBACK",k.SelectedRiftId="SELECTED_RIFT_ID"}(gt||(gt={})),function(k){k.Title="TITLE",k.Message="MESSAGE",k.CTAButtonEnabled="CTA_BUTTON_ENABLED",k.CTAButtonFunction="CTA_BUTTON_FUNCTION"}(mt||(mt={})),function(k){k.BodyText="DYNAMIC_STORE_BODY_TEXT",k.HeaderText="DYNAMIC_STORE_HEADER_TEXT",k.OfferData="DYNAMIC_STORE_OFFER_DATA",k.OfferReadById="DYNAMIC_STORE_OFFER_READ_BY_ID",k.ShowTimer="DYNAMIC_STORE_SHOW_TIMER",k.StoreKey="DYNAMIC_STORE_STORE_KEY"}(yt||(yt={})),function(k){k.ItemCardData="STORE_ITEM_CARD_DATA",k.ItemCardIsNew="STORE_ITEM_CARD_IS_NEW"}(_t||(_t={})),function(k){k.FunnelStartTrigger="VIDEO_FUNNEL_START_TRIGGER",k.SizeRatio="VIDEO_SIZE_RATIO",k.SupportedResolutionIds="VIDEO_SUPPORTED_RESOLUTION_IDS",k.VideoAtSchool="VIDEO_AT_SCHOOL",k.VideoCountdownEnabled="VIDEO_COUNTDOWN_ENABLED",k.VideoEventType="VIDEO_EVENT_TYPE",k.VideoId="VIDEO_ID",k.VideoInstanceType="VIDEO_INSTANCE_TYPE",k.VideoMember="VIDEO_MEMBER"}(Et||(Et={})),function(k){k.FollowupPrefabCloseSignal="FOLLOWUP_PREFAB_CLOSE_SIGNAL",k.HomeImageGuid="HOME_IMAGE_GUID",k.MemberFollowupPrefabGuid="MEMBER_FOLLOWUP_PREFAB_GUID",k.MemberImageGuid="MEMBER_IMAGE_GUID",k.OriginId="ORIGIN_ID",k.SchoolImageGuid="SCHOOL_IMAGE_GUID",k.TargetMapTag="TARGET_MAP_TAG",k.TargetPosition="TARGET_POSITION"}(wt||(wt={})),function(k){k.FtueMainCostumeId="MAIN_COSTUME_ID",k.FtueMainCostumeName="MAIN_COSTUME_NAME",k.FtueAdditionalCostumes="ADDITIONAL_COSTUMES",k.FtuePopupNextButtonCallback="FTUE_POPUP_NEXT_BUTTON_CALLBACK"}(Tt||(Tt={}))},88217:(k,B,U)=>{"use strict";U.d(B,{B:()=>V});var F=U(8674),G=U(62459),j=U(15821),$=U(11647),H=U(61917);let V=class extends((0,$.o)(H.d)){constructor(){super(...arguments),this._depth=100}get transform(){var k;return j.A.isDefined(this._transform)||(this._transform=null!==(k=this.gameObject.findComponent(G.XVE))&&void 0!==k?k:this.gameObject.addComponent(G.XVE)),this._transform}setContentsOffset(k){this.gameObject.children.forEach((B=>{B.transform.setPositionY(k)}))}destroy(){this.gameObject.children.forEach((k=>{k.transform.setPositionY(0)})),super.destroy()}};(0,F.Cg)([(0,G.Pqz)(G.XVE),(0,F.Sn)("design:type",G.XVE)],V.prototype,"_transform",void 0),V=(0,F.Cg)([(0,G.EVk)("StickyScrollItem")],V)},47878:(k,B,U)=>{"use strict";U.d(B,{p:()=>H});var F=U(8674),G=U(62459),j=U(49237),$=U(28152);let H=class extends G.uAl{};(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],H.prototype,"leaderboardsButton",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],H.prototype,"battleRequestsButton",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],H.prototype,"awardsButton",void 0),(0,F.Cg)([(0,G.MnK)(j.$),(0,F.Sn)("design:type",j.$)],H.prototype,"badgesButton",void 0),H=(0,F.Cg)([(0,G.EVk)("SocialMenuHeader",$.Y.ui)],H)},28832:(k,B,U)=>{"use strict";U.d(B,{O5:()=>z});var F,G=U(8674),j=U(62459),$=U(35120),H=U(91207),V=U(77938),W=U(10674),q=U(28152);!function(k){k.Weapon="weapon",k.Hat="hat",k.Outfit="outfit",k.Relic="spellRelic",k.Boots="boots",k.Mount="mount",k.Buddy="follow",k.PetHat="petHat",k.PetRelic="petRelic"}(F||(F={}));const K={[F.Weapon]:"948ea863-fc01-4492-bba4-6c4c918bf334",[F.Hat]:"138d6852-a1e1-42c5-9457-bdef12678314",[F.Outfit]:"adfa2804-c0df-4158-8ea8-bf69d1715b6d",[F.Relic]:"c6a5ccbb-7c55-49ba-bf5c-eeec195008d9",[F.Boots]:"0b178835-e2fc-432a-9728-b6fbfea6091e",[F.Mount]:"09344c5c-9c34-421b-842c-ad3d02861879",[F.Buddy]:"82322c96-1611-479f-abb5-9bf8e7d3b65e",[F.PetHat]:"8adc1ca8-607e-43fe-98a3-e2d0a6137e3c",[F.PetRelic]:"b8caf254-84cc-4c09-8e19-6064377ca580"};let z=class extends j.uAl{constructor(){super(...arguments),this._rarityBackgrounds=[]}postCreate(){super.postCreate(),this._activeRarityBackground=this._unequippedBackground}setupPlayerGear(k){this._activeRarityBackground.active=!1;const B=k.getEquipment(this._equipmentType);B?V.t.secureGetItem(this._equipmentType,B).then((k=>{var B;this._activeRarityBackground=this._rarityBackgrounds[null!==(B=k.data.rarity)&&void 0!==B?B:0],this._activeRarityBackground.active=!0;const U=H.E.getIconForType(k.type,k.ID);this.loadGearIcon(U)})).catch(j.RQr.createHandler(`Error fetching item for equipment type ${this._equipmentType} with ID ${B}:`)):this.setupUnequippedItem()}setupPetGear(k){var B,U;this._activeRarityBackground.active=!1;const G=this._equipmentType===F.PetHat?null!==(B=null==k?void 0:k.petHat)&&void 0!==B?B:null:null!==(U=null==k?void 0:k.petRelic)&&void 0!==U?U:null;G?this._gearManager.getPetGearByUniqueId(G).then((k=>{V.t.secureGetItem(k.data.asset.type,k.data.asset.id).then((k=>{var B;this._rarityBackgrounds[null!==(B=k.data.rarity)&&void 0!==B?B:0].active=!0;const U=H.E.getIconForType(k.type,k.ID);this.loadGearIcon(U)})).catch(j.RQr.createHandler(`Error fetching item for equipment type ${this._equipmentType} with ID ${k.data.asset.id}:`))})).catch(j.RQr.createHandler(`Error fetching pet gear item for type ${this._equipmentType} with ID ${G}:`)):this.setupUnequippedItem()}setupUnequippedItem(){return(0,G.sH)(this,void 0,void 0,(function*(){this._rarityBackgrounds.forEach((k=>{k.active=!1})),this._activeRarityBackground=this._unequippedBackground,this._activeRarityBackground.active=!0,yield this.loadGearIcon(K[this._equipmentType])}))}loadGearIcon(k){return(0,G.sH)(this,void 0,void 0,(function*(){return $.q.instance.prodigy.gameContainer.get(j.t5G.AssetLoader).loadAssets([k]).then((()=>{this._gearIcon.updateAsset(k)}))}))}};(0,G.Cg)([(0,j.gfw)(F),(0,G.Sn)("design:type",String)],z.prototype,"_equipmentType",void 0),(0,G.Cg)([(0,j.SZi)(),(0,j.ERr)(),(0,G.Sn)("design:type",Array)],z.prototype,"_rarityBackgrounds",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],z.prototype,"_unequippedBackground",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],z.prototype,"_gearIcon",void 0),(0,G.Cg)([(0,j.Cdj)("d69-defe"),(0,G.Sn)("design:type",W.q)],z.prototype,"_gearManager",void 0),z=(0,G.Cg)([(0,j.EVk)("GearSlot",q.Y.uiPetMenu)],z)},29853:(k,B,U)=>{"use strict";U.d(B,{J:()=>J});var F=U(8674),G=U(62459),j=U(21574),$=U(17446),H=U(77938),V=U(28152),W=U(22023),q=U(80060),K=U(30226),z=U(53661),Y=U(53671),Q=U(11647),X=U(28832),Z=U(52211);let J=class extends((0,Q.o)(Z.V)){constructor(){super(...arguments),this._gearSlots=[],this.onPetInfoClicked=this.createTidySignal()}setupCard(){var k,B,U;const F=W.P8.canPlayerAccessPetMergeFeature(this._activePlayer),G=W.P8.canPetAccessMergeRanks(this.petData.ID);if(this._mergeBar.GameObject.active=F&&G,this._mergeUnlockText.GameObject.active=!F&&G,G)if(F)this._mergeBar.setup(this.petData,!0);else{const B=null!==(k=j.g.config.minimumPlayerLevel)&&void 0!==k?k:0;this._mergeUnlockText.text=this._localizer.getText("PET_BOOK_UNLOCK_MERGE",B)}const V=H.t.getItem("pet",this.petData.ID),Y=null!==(U=null===(B=V.data)||void 0===B?void 0:B.rarity)&&void 0!==U?U:$.E.Common;this.updateGearSlots(V),q.d.updateInjectedValues(this.gameObject,{[z.R$.PetRarityText]:K.J.convertRarityToText(Y),[z.R$.PetRarity]:Y})}updateCard(){this.petData&&this._mergeBar.setup(this.petData,!0),this.updateCardCreature()}updateCardCreature(){var k,B;if(super.updateCardCreature(),this.setCardToDefaultState(),this.petData){const U=H.t.getItem("pet",this.petData.ID),F=null!==(B=null===(k=U.data)||void 0===k?void 0:k.rarity)&&void 0!==B?B:$.E.Common;q.d.updateInjectedValues(this.gameObject,{[z.R$.PetRarityText]:K.J.convertRarityToText(F),[z.R$.PetRarity]:F}),this.updateGearSlots(U)}}updateGearSlots(k){var B;const U=(null===(B=k.data.gearEquipSlots)||void 0===B?void 0:B.length)>0;this._gearContainer.active=U,U&&this._gearSlots.forEach((k=>{k.setupPetGear(this.petData.gear)}))}onCardClicked(){this.onPetCardClicked.dispatch(this)}setCardToDefaultState(){this._petSelectionContainer.active=!1,this._emptyCardContainer.active=!this.hasData(),this._cardContainer.active=this.hasData(),this._inputButton.inputEnabled=!0,this._infoButton.active=this.hasData()}setCardToSelectionState(k,B,U=!1){if(this._inputButton.inputEnabled=!0,U)this._selectionText.text=this._localizer.getText("PET_BOOK_CLICK_TO_ADD"),this._petSelectionContainer.active=!0,this._removeButton.active=!1;else if(k)this._removeButton.active=this.hasData(),this._petSelectionContainer.active=!0,this._selectionText.text=this._localizer.getText("PET_BOOK_CHOOSE_PET"),this._infoButton.active=this.hasData();else{if(!B||!this.hasData())return void(this._inputButton.inputEnabled=!1);this._selectionText.text=this._localizer.getText("PET_BOOK_SWAP"),this._petSelectionContainer.active=!0,this._removeButton.active=!1}}onInfoButtonClicked(){const k=H.t.getItem("pet",this.petData.ID);this.onPetInfoClicked.dispatch(k,this.petData)}setName(){const k=H.t.getItem("pet",this.petData.ID);this._nameText.text=W.P8.getPetDisplayName(k,this.petData,15)}setLevel(){const k=W.P8.getPetLevel(this.petData);this._levelText.text=k.toString()}};(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_emptyCardContainer",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_cardContainer",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_petSelectionContainer",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],J.prototype,"_selectionText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],J.prototype,"_mergeUnlockText",void 0),(0,F.Cg)([(0,G.MnK)(Y.J),(0,F.Sn)("design:type",Y.J)],J.prototype,"_mergeBar",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.MnK)(X.O5),(0,F.Sn)("design:type",Array)],J.prototype,"_gearSlots",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],J.prototype,"_removeButton",void 0),(0,F.Cg)([(0,G.Cdj)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],J.prototype,"_localizer",void 0),(0,F.Cg)([(0,G.MnK)(G.Eci),(0,F.Sn)("design:type",G.Eci)],J.prototype,"_inputButton",void 0),J=(0,F.Cg)([(0,G.EVk)("PetTeamCard",V.Y.uiPetMenu)],J)},5679:(k,B,U)=>{"use strict";U.d(B,{t:()=>Z});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(15485),V=U(41674),W=U(67665),q=U(13956),K=U(47734),z=U(94325),Y=U(11647),Q=U(28832),X=U(52211);let Z=class extends((0,Y.o)(X.V)){setupCard(){this._gearContainer.findComponentsInChildren(Q.O5).forEach((k=>{k.setupPlayerGear(this._activePlayer.equipment)})),this._activePlayer.onEquipmentChange.add(this.updateCard,this)}updateCard(){this._gearContainer.findComponentsInChildren(Q.O5).forEach((k=>{k.setupPlayerGear(this._activePlayer.equipment)})),this._playerSpineAppearanceSelector.loadPlayerAppearance()}onCardClicked(){super.onCardClicked();const k=j.q.instance.prodigy.open.backpack();k&&this._inventoryScrollView&&(this._inventoryScrollView.lockScrollWheel=!0,this._inventoryScrollView.contentDraggingEnabled=!1,k.onDestroy.add((()=>{this._inventoryScrollView.lockScrollWheel=!1,this._inventoryScrollView.contentDraggingEnabled=!0}),this)),this._segment.featureCommon.sendButtonEvent({buttonName:H.k.WizardBackpackButton,interfaceName:"wizard_backpack_window",interfaceType:V.Wm.Menu,destinationName:"wizard_backpack_window"})}destroy(){this._activePlayer.onEquipmentChange.remove(this.updateCard,this)}setName(){var k;this._nameText.text=null===(k=this._activePlayer)||void 0===k?void 0:k.getName()}setLevel(){const k=this._activePlayer.getLevel()+this._activePlayer.getChargedLevel();this._levelText.text=k.toString()}};(0,F.Cg)([(0,G.MnK)(K.z),(0,F.Sn)("design:type",K.z)],Z.prototype,"_playerSpineAppearanceSelector",void 0),(0,F.Cg)([(0,G.MnK)(z.C),(0,F.Sn)("design:type",z.C)],Z.prototype,"_inventoryScrollView",void 0),(0,F.Cg)([(0,q.b)("c47-20b6"),(0,F.Sn)("design:type",W.Y)],Z.prototype,"_segment",void 0),Z=(0,F.Cg)([(0,G.EVk)("PlayerTeamCard",$.Y.uiPetMenu)],Z)},52211:(k,B,U)=>{"use strict";U.d(B,{V:()=>Y});var F=U(8674),G=U(62459),j=U(37773),$=U(65732),H=U(97317),V=U(13956),W=U(96535),q=U(80060),K=U(11647),z=U(53661);class Y extends((0,K.o)(G.uAl)){constructor(){super(...arguments),this.onPetCardClicked=this.createTidySignal(),this.onPetRemoved=this.createTidySignal(),this._petData=null,this._cardPosition=-1}get petData(){return this._petData}get cardPosition(){return this._cardPosition}setup(k){this._kennel=this._activePlayer.kennel,this._cardPosition=k,this.updateCardCreature()}updateCardCreature(){const k=this._kennel.getTeamPosition(this._cardPosition);if(!!!k){this._petData=null;const k={[z.hi.PetCreatureData]:this.petData,[z.R$.TeamCardId]:null,[z.R$.TeamCardPetGear]:null};return void q.d.updateInjectedValues(this.gameObject,k)}const B={},U=this.getInjectedValue(z.R$.TeamCardId),F=G.Aq$.isDefined(this._petData)&&this._petData.uniqueID===k.data.uniqueID&&U!==k.getID();if(this.petData&&this._petData.uniqueID===k.data.uniqueID&&!F||(this._petData=k.data,this.setupCard(),B[z.R$.TeamCardId]=this.petData.ID),this.setName(),this.setLevel(),B[z.hi.PetCreatureData]=this.petData,B[z.R$.TeamCardPetGear]=this.petData.gear,G.Aq$.isDefined(this.petData.team)){const k=this._activePlayer.getChargedLevel();B[$.E.ChargedCreatureEffectTier]=j.e.getChargedLevelTierFromLevel(k),B[$.E.ChargedCreatureEffectDisplayType]=k>0?H.X$.IDLE:H.X$.HIDDEN}q.d.updateInjectedValues(this.gameObject,B)}hasData(){return!!this.petData}onRemoveButtonClicked(){this.onPetRemoved.dispatch(this.petData,this.cardPosition)}destroy(){this.onPetRemoved.dispose(),this.onPetCardClicked.dispose()}onCardClicked(){this.onPetCardClicked.dispatch(this)}}(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Y.prototype,"_gearContainer",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],Y.prototype,"_nameText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],Y.prototype,"_levelText",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],Y.prototype,"_infoButton",void 0),(0,F.Cg)([(0,V.b)("306-5359"),(0,F.Sn)("design:type",W.W)],Y.prototype,"_activePlayer",void 0)},53671:(k,B,U)=>{"use strict";U.d(B,{J:()=>K});var F=U(8674),G=U(62459),j=U(79998),$=U(37016),H=U(15821),V=U(12472),W=U(37468),q=U(29834);let K=class extends G.uAl{constructor(){super(...arguments),this._showBadge=!0,this._animateFill=!1,this._animationDelay=0,this._requiredIngredientsCount=0,this._validPetIngredientCount=0}get isFull(){return this._validPetIngredientCount>=this._requiredIngredientsCount}create(){super.create(),this.mergeRankBadgeGraphic.Active=this._showBadge}setup(k,B,U=!1){var F;const G=null!==(F=k.mergeRank)&&void 0!==F?F:$.qd.MIN;this.mergeRankBadgeText.text=B?G.toString():"0",this.progressBar.GameObject.active=B,this._barGlow.GameObject.active=B,B?(this.progressBar.showBarText(),this.setProgressBarProperties(G,k,U)):this.progressBar.hideBarText()}setProgressBarProperties(k,B,U=!1){const F=k>=$.qd.MAX;if(F)return this._barFill.updateAsset(j.u.Merge_bar_max),this.progressBar.setFromValues(1,1,this._animateFill,this._animationDelay),this.progressBar.progressBar.GameObject.active=!0,void(this._barGlow.GameObject.active=!1);let G={requiredIngredientsCount:0,validPetIngredientCount:0,mergeRecipe:void 0};F||(G=V.r.getMergeIngredientInfo(B),H.A.isDefined(G))?(this._requiredIngredientsCount=G.requiredIngredientsCount,this._validPetIngredientCount=U?this._requiredIngredientsCount:G.validPetIngredientCount,this.progressBar.progressBar.GameObject.active=!this.isFull,this._barGlow.GameObject.active=this.isFull,this._barFill.updateAsset(this.isFull?j.u.Merge_bar_full:j.u.Merge_bar_progress),this.progressBar.setFromValues(this._validPetIngredientCount,this._requiredIngredientsCount,!this.isFull&&this._animateFill,this.isFull?0:this._animationDelay),this.progressBar.setBarText(`${this._validPetIngredientCount} / ${this._requiredIngredientsCount}`)):this.progressBar.GameObject.active=!1}};(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],K.prototype,"mergeRankBadgeText",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],K.prototype,"mergeRankBadgeGraphic",void 0),(0,F.Cg)([(0,G.MnK)(W.z),(0,F.Sn)("design:type",W.z)],K.prototype,"progressBar",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],K.prototype,"_barFill",void 0),(0,F.Cg)([(0,G.MnK)(q.j),(0,F.Sn)("design:type",q.j)],K.prototype,"_barGlow",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],K.prototype,"_showBadge",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],K.prototype,"_animateFill",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],K.prototype,"_animationDelay",void 0),K=(0,F.Cg)([(0,G.EVk)("MergeBar")],K)},63086:(k,B,U)=>{"use strict";U.d(B,{Zb:()=>G});var F,G,j=U(8674),$=U(62459),H=U(28152),V=U(80060);!function(k){k.AlphaContainerEnable="ALPHA_CONTAINER_ENABLE",k.AlphaFilterEnable="ALPHA_FILTER_ENABLE"}(F||(F={})),function(k){k.Container="Container",k.Filter="Filter"}(G||(G={}));let W=class extends $.uAl{constructor(){super(...arguments),this.alphaMode=G.Container,this.alphaEnabledValue=.35}create(){super.create(),$.Aq$.isDefined(this._injectionTarget)||(this._injectionTarget=this.gameObject),Object.values(G).forEach((k=>{var B;this.setUpAlphaFunctions(k),null===(B=this._enableAlphaFunction)||void 0===B||B.call(this,!1)})),this.setUpAlphaFunctions(this.alphaMode)}setAlphaMode(k){var B;this.alphaMode=k,null===(B=this._enableAlphaFunction)||void 0===B||B.call(this,!1),this.setUpAlphaFunctions(this.alphaMode),this.enableAlpha(this.alphaEnabled)}enableAlpha(k){var B;this.alphaEnabled=k,null===(B=this._enableAlphaFunction)||void 0===B||B.call(this,this.alphaEnabled)}setUpAlphaFunctions(k){switch(k){case G.Container:this._enableAlphaFunction=this.enableContainerAlpha;break;case G.Filter:this._enableAlphaFunction=this.enableFilterAlpha;break;default:$.VyI.log("Invalid Alpha Mode Selected",$.$bb.Error)}}enableContainerAlpha(k){V.d.updateInjectedValues(this._injectionTarget,{[F.AlphaContainerEnable]:k?this.alphaEnabledValue:1})}enableFilterAlpha(k){V.d.updateInjectedValues(this._injectionTarget,{[F.AlphaFilterEnable]:k?this.alphaEnabledValue:1})}};(0,j.Cg)([(0,$.ERr)(),(0,j.Sn)("design:type",$._mx)],W.prototype,"_injectionTarget",void 0),(0,j.Cg)([(0,$.gfw)(G),(0,j.Sn)("design:type",String)],W.prototype,"alphaMode",void 0),(0,j.Cg)([(0,$.vkK)(),(0,j.Sn)("design:type",Boolean)],W.prototype,"alphaEnabled",void 0),(0,j.Cg)([(0,$.g11)(),(0,j.Sn)("design:type",Number)],W.prototype,"alphaEnabledValue",void 0),W=(0,j.Cg)([(0,$.EVk)("PetCardAlphaMode",H.Y.uiPetMenu)],W)},8763:(k,B,U)=>{"use strict";U.d(B,{j:()=>z});var F=U(58182),G=U(17446),j=U(15821),$=U(30226),H=U(77938),V=U(76277),W=U(22023),q=U(53661),K=U(63086);class z{static GetOwnedPetCardInjectionValues(k,B,U,z,Y){var Q,X,Z,J;const tt=H.t.getItem("pet",k.ID),et=null!==(X=null===(Q=tt.data)||void 0===Q?void 0:Q.rarity)&&void 0!==X?X:G.E.Common,it=W.P8.getUpgradeSuggestion(k),st=(null===(Z=tt.data.gearEquipSlots)||void 0===Z?void 0:Z.length)>0,nt=j.A.isDefined(k.team),at=U&&z&&!nt,rt=!U||U&&z&&!nt,ot=(0,V.G)(F.N)&&(null!==(J=k.evolutionCount)&&void 0!==J?J:0)>0;return{[q.ML.PetData]:[k,!0],[q.ML.PetID]:tt.ID,[q.ML.ShowLevelIcon]:!0,[q.ML.Level]:k.level,[q.ML.ShowOnTeam]:nt,[q.ML.ShowEvolve]:it===W.Tc.ShowEvolve&&!ot,[q.ML.ShowUpgrade]:it===W.Tc.ShowUpgrade,[q.ML.ShowStaticEvolve]:it===W.Tc.ShowStaticEvolve&&!ot,[q.ML.Name]:W.P8.getPetDisplayName(tt,k),[q.ML.ShowElementIcon]:!0,[q.ML.ShowMergeBar]:W.P8.canPetAccessMergeRanks(k.ID)&&Y,[q.ML.PetRarity]:et,[q.ML.PetRarityBackground]:et,[q.ML.ShowPetGear]:st,[q.ML.ShowRarityBackground]:!0,[q.ML.ShowUnknownBackground]:!1,[q.ML.IconTint]:16777215,[q.ML.InputEnabled]:rt,[q.ML.ShowNotificationBadge]:!1,[q.ML.ShowNotificationText]:!1,[q.ML.ShowTreasureTrackBadge]:!1,[q.ML.WhiteOverlay]:!1,[q.ML.AlphaMode]:K.Zb.Filter,[q.ML.OnClick]:()=>B(tt,k),[q.ML.ShowSelectionAvailableOutline]:at,[q.ML.PetRarityText]:$.J.convertRarityToText(et),[q.ML.ShowPetRarity]:!0,[q.ML.ApplyColorFilter]:!!U&&nt,[q.ML.ApplyGreyScale]:!1}}static GetSeenPetCardInjectionValues(k,B,U,F=!1){var j,V,W;const K=H.t.getItem("pet",k),z=null!==(V=null===(j=K.data)||void 0===j?void 0:j.rarity)&&void 0!==V?V:G.E.Common,Y=!U;return{[q.ML.PetID]:[K.ID,!0],[q.ML.ShowPetGear]:!1,[q.ML.ShowMergeBar]:!1,[q.ML.ShowLevelIcon]:!1,[q.ML.ShowOnTeam]:!1,[q.ML.ShowEvolve]:!1,[q.ML.ShowUpgrade]:!1,[q.ML.ShowStaticEvolve]:!1,[q.ML.Name]:null===(W=K.data)||void 0===W?void 0:W.name,[q.ML.PetRarity]:-1,[q.ML.PetRarityBackground]:z,[q.ML.ApplyGreyScale]:!0,[q.ML.ShowRarityBackground]:!0,[q.ML.ShowElementIcon]:!0,[q.ML.ShowUnknownBackground]:!1,[q.ML.IconTint]:14540253,[q.ML.InputEnabled]:Y,[q.ML.ShowNotificationBadge]:!1,[q.ML.ShowNotificationText]:!1,[q.ML.ShowTreasureTrackBadge]:F,[q.ML.WhiteOverlay]:!0,[q.ML.OnClick]:()=>B(K,void 0),[q.ML.ShowSelectionAvailableOutline]:!1,[q.ML.PetRarityText]:$.J.convertRarityToText(z),[q.ML.ShowPetRarity]:!0}}static GetUnknownPetCardInjectionValues(k,B,U){var F,j;const $=H.t.getItem("pet",k),V=null!==(j=null===(F=$.data)||void 0===F?void 0:F.rarity)&&void 0!==j?j:G.E.Common;return{[q.ML.PetID]:$.ID,[q.ML.ShowPetGear]:!1,[q.ML.ShowMergeBar]:!1,[q.ML.ShowLevelIcon]:!1,[q.ML.ShowOnTeam]:!1,[q.ML.ShowEvolve]:!1,[q.ML.ShowUpgrade]:!1,[q.ML.ShowStaticEvolve]:!1,[q.ML.Name]:"???",[q.ML.PetRarity]:V,[q.ML.ShowElementIcon]:!1,[q.ML.ApplyGreyScale]:!1,[q.ML.ShowRarityBackground]:!1,[q.ML.ShowUnknownBackground]:!0,[q.ML.IconTint]:0,[q.ML.InputEnabled]:!1,[q.ML.ShowNotificationBadge]:!1,[q.ML.ShowNotificationText]:!1,[q.ML.ShowTreasureTrackBadge]:!1,[q.ML.WhiteOverlay]:!1,[q.ML.AlphaMode]:K.Zb.Container,[q.ML.ShowSelectionAvailableOutline]:!1,[q.ML.ShowPetRarity]:!1,[q.ML.OnClick]:()=>B($,void 0)}}}},63546:(k,B,U)=>{"use strict";U.d(B,{$:()=>H});var F=U(8674),G=U(62459),j=U(67665),$=U(13956);class H{constructor(k){this._stateMachine=k}enter(k){return(0,F.sH)(this,void 0,void 0,(function*(){}))}exit(){return(0,F.sH)(this,void 0,void 0,(function*(){}))}}(0,F.Cg)([(0,$.b)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],H.prototype,"_prefabLoader",void 0),(0,F.Cg)([(0,$.b)(G.$Bt.LocalizationService),(0,F.Sn)("design:type",G.dTp)],H.prototype,"_localizer",void 0),(0,F.Cg)([(0,$.b)("c47-20b6"),(0,F.Sn)("design:type",j.Y)],H.prototype,"_segment",void 0)},54865:(k,B,U)=>{"use strict";U.d(B,{w:()=>G});var F=U(8674);class G{constructor(k){this.currentState=new k(this)}start(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.currentState.enter()}))}stop(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.currentState.exit()}))}goToState(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U;yield null===(U=this.currentState)||void 0===U?void 0:U.exit(),this.currentState=new k(this),yield this.currentState.enter(B)}))}}},48842:(k,B,U)=>{"use strict";U.d(B,{J8:()=>at,SB:()=>G});var F,G,j,$=U(8674),H=U(87490),V=U(62459),W=U(113),q=U(88022),K=U(35120),z=U(49237),Y=U(95946),Q=U(28152),X=U(11624),Z=U(34603),J=U(93991),tt=U(15485),et=U(41674),it=U(26932),st=U(16043),nt=U(97518);!function(k){k[k.InZone=0]="InZone",k[k.WorldMap=1]="WorldMap",k[k.TrackingNPC=2]="TrackingNPC",k[k.TrackingMythic=3]="TrackingMythic"}(G||(G={})),function(k){k.FireFly="0x00914a",k.Shiverchill="0x0086eb",k.Skywatch="0x976cd1",k.Bonfire="0xd93525",k.Shipwreck="0x009fa2"}(j||(j={}));let at=F=class extends it.z{postCreate(){super.postCreate(),this._config=F.ZONE_TYPE_CONFIGURATION_MAPPING[this._zoneId],this.updateValue("PET_ZONE_TAG",this._config.zoneTag),this.configureBanner(),this.configureButtons(),this.setPetRescuedCount(),this.setMinMaxEnemyLevels()}configureBanner(){this.setContainerText(this._bannerContainer,this._config.zoneName),this.setTintColor(this._bannerContainer,this._config.hexCode)}configureButtons(){this._inZoneFooter.active=this._zoneMenuState===G.InZone,this._inWorldMapFooter.active=!this._inZoneFooter.active,this._leftButton.active=this._zoneMenuState===G.WorldMap&&!!this._onTitanClick,this._rightButton.active=this._zoneMenuState===G.WorldMap&&!!this._onDungeonClick,this._middleButton.active=this._zoneMenuState===G.WorldMap,this._trackingButton.active=this._zoneMenuState===G.TrackingMythic||this._zoneMenuState===G.TrackingNPC,this.setContainerSignal(this._leftButton,this._onTitanClick),this.setContainerSignal(this._rightButton,this._onDungeonClick),this.setContainerSignal(this._middleButton,this._onPlayClick),this.setContainerSignal(this._trackingButton,this._onPlayClick);const[k,B]=this._zoneMenuState===G.TrackingNPC?["UI_ZONE_GO_TRADE","icon-npc-loc-assembled"]:["UI_ZONE_TRACK_MYTHIC","icon-epics-loc-assembled"];this.setContainerText(this._trackingButton,k),this.setContainerIcons(this._trackingButton,q._.Ui_raster_epicsv2_json,B),this.setContainerIcons(this._middleButton,q._.Ui_raster_pet_zone_menu_json,`button-npc-${this._config.zoneTag}`)}setContainerIcons(k,B,U){k.findComponentsInChildren(Z._).forEach((k=>{k.setAsset(B,U).then((()=>{k.sizeToSourceImage()})).catch(V.RQr.createHandler(`[ZoneMenuConfigurationComponent] Error loading the image: ${U}`))}))}setContainerText(k,B){k.findComponentsInChildren(nt.R).forEach((k=>{k.setLocalizationKey(B)}))}setContainerSignal(k,B){B&&k.findComponentInChildren(z.$).onEnabledClick.add(B)}setTintColor(k,B){const U=k.findComponentInChildren(J.w);U.hexTintColor=B,U.enableTint()}setPetRescuedCount(){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=this._petIdsInZone.filter((B=>k.encounters.getPetTimesRescued(B)>0)).length;this._rescuedText.setTextArguments(B,this._petIdsInZone.length)}setMinMaxEnemyLevels(){this._minMaxText.setTextArguments(this._enemyMinMaxLevel.minLevel,this._enemyMinMaxLevel.maxLevel)}clearNewlyRescuedPets(){if(this._zoneMenuState===G.InZone){const k=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k.newPetRescueData.clearNewestRescuesByAmount(F.PET_CARDS_PER_PAGE,K.q.instance.prodigy.world.getCurrentZone()),k.forceSaveCharacter()}}sendPageViewedEvent(){this._config&&this._segment.featureCommon.sendPetBookViewedEvent({bookName:this._zoneMenuState===G.InZone?`zone_pet_menu_${this._config.zoneTag}`:`zone_entry_popup_${this._config.zoneTag}`,bookPage:this.gameObject.findComponentInChildren(st.a).currentPage,interfaceType:et.Wm.Modal})}sendCloseEvent(){this._config&&this._segment.featureCommon.sendButtonEvent({buttonName:tt.k.X,interfaceName:this._zoneMenuState===G.InZone?`zone_pet_menu_${this._config.zoneTag}`:`zone_entry_popup_${this._config.zoneTag}`,interfaceType:et.Wm.Modal})}};at.PET_CARDS_PER_PAGE=15,at.ZONE_TYPE_CONFIGURATION_MAPPING={[X.P.Firefly]:{zoneName:"UI_ZONE_FIREFLY_FOREST_CAPITAL",zoneTag:W.O.Firefly,elementAsset:H.ELegacyElementType.Earth,hexCode:j.FireFly},[X.P.Shiverchill]:{zoneName:"UI_ZONE_SHIVERCHILL_MOUNTAINS_CAPITAL",zoneTag:W.O.Shiverchill,elementAsset:Y.a.Ice,hexCode:j.Shiverchill},[X.P.Skywatch]:{zoneName:"UI_ZONE_SKYWATCH_CAPITAL",zoneTag:W.O.Skywatch,elementAsset:Y.a.Storm,hexCode:j.Skywatch},[X.P.Bonfire]:{zoneName:"UI_ZONE_BONFIRE_SPIRE_CAPITAL",zoneTag:W.O.Bonfire,elementAsset:Y.a.Fire,hexCode:j.Bonfire},[X.P.Shipwreck]:{zoneName:"UI_ZONE_SHIPWRECK_SHORE_CAPITAL",zoneTag:W.O.Shipwreck,elementAsset:Y.a.Water,hexCode:j.Shipwreck},[X.P.FireflyHard]:{zoneName:"UI_ZONE_FIREFLY_FOREST_CAPITAL",zoneTag:W.O.Firefly,elementAsset:H.ELegacyElementType.Earth,hexCode:j.FireFly},[X.P.ShiverchillHard]:{zoneName:"UI_ZONE_SHIVERCHILL_MOUNTAINS_CAPITAL",zoneTag:W.O.Shiverchill,elementAsset:Y.a.Ice,hexCode:j.Shiverchill},[X.P.SkywatchHard]:{zoneName:"UI_ZONE_SKYWATCH_CAPITAL",zoneTag:W.O.Skywatch,elementAsset:Y.a.Storm,hexCode:j.Skywatch},[X.P.BonfireHard]:{zoneName:"UI_ZONE_BONFIRE_SPIRE_CAPITAL",zoneTag:W.O.Bonfire,elementAsset:Y.a.Fire,hexCode:j.Bonfire},[X.P.ShipwreckHard]:{zoneName:"UI_ZONE_SHIPWRECK_SHORE_CAPITAL",zoneTag:W.O.Shipwreck,elementAsset:Y.a.Water,hexCode:j.Shipwreck}},(0,$.Cg)([(0,V.Cdj)("PET_ZONE_ID"),(0,$.Sn)("design:type",Number)],at.prototype,"_zoneId",void 0),(0,$.Cg)([(0,V.Cdj)("PET_ZONE_MENU_STATE"),(0,$.Sn)("design:type",Number)],at.prototype,"_zoneMenuState",void 0),(0,$.Cg)([(0,V.Cdj)("PET_ZONE_PLAY_BUTTON"),(0,$.Sn)("design:type",Function)],at.prototype,"_onPlayClick",void 0),(0,$.Cg)([(0,V.Cdj)("PET_ZONE_TITAN_BUTTON"),(0,$.Sn)("design:type",Function)],at.prototype,"_onTitanClick",void 0),(0,$.Cg)([(0,V.Cdj)("PET_ZONE_DUNGEON_BUTTON"),(0,$.Sn)("design:type",Function)],at.prototype,"_onDungeonClick",void 0),(0,$.Cg)([(0,V.Cdj)("GRID_VIEW_DATA"),(0,$.Sn)("design:type",Array)],at.prototype,"_petIdsInZone",void 0),(0,$.Cg)([(0,V.Cdj)("PET_ZONE_ENEMY_MIN_MAX_LEVEL"),(0,$.Sn)("design:type",Object)],at.prototype,"_enemyMinMaxLevel",void 0),(0,$.Cg)([(0,V.Cdj)("c47-20b6"),(0,$.Sn)("design:type",Function)],at.prototype,"_segment",void 0),(0,$.Cg)([(0,V.ERr)(),(0,$.Sn)("design:type",V._mx)],at.prototype,"_bannerContainer",void 0),(0,$.Cg)([(0,V.ERr)(),(0,$.Sn)("design:type",V._mx)],at.prototype,"_inZoneFooter",void 0),(0,$.Cg)([(0,V.ERr)(),(0,$.Sn)("design:type",V._mx)],at.prototype,"_inWorldMapFooter",void 0),(0,$.Cg)([(0,V.ERr)(),(0,$.Sn)("design:type",V._mx)],at.prototype,"_leftButton",void 0),(0,$.Cg)([(0,V.ERr)(),(0,$.Sn)("design:type",V._mx)],at.prototype,"_middleButton",void 0),(0,$.Cg)([(0,V.ERr)(),(0,$.Sn)("design:type",V._mx)],at.prototype,"_rightButton",void 0),(0,$.Cg)([(0,V.ERr)(),(0,$.Sn)("design:type",V._mx)],at.prototype,"_trackingButton",void 0),(0,$.Cg)([(0,V.MnK)(nt.R),(0,$.Sn)("design:type",nt.R)],at.prototype,"_rescuedText",void 0),(0,$.Cg)([(0,V.MnK)(nt.R),(0,$.Sn)("design:type",nt.R)],at.prototype,"_minMaxText",void 0),at=F=(0,$.Cg)([(0,V.EVk)("ZoneMenuConfiguration",Q.Y.uiPetsInZones)],at)},5075:(k,B,U)=>{"use strict";U.d(B,{A:()=>Y,H:()=>J});var F=U(8674),G=U(62459),j=U(113),$=U(97495),H=U(35120),V=U(28152),W=U(90633),q=U(26932),K=U(325);var z,Y,Q=U(30226),X=U(73678),Z=U(40392);!function(k){k.LOCKEDLEVEL="locked-level",k.LOCKEDSUBJECT="locked-subject",k.LOCKEDPREREQUISITE="locked-prerequisite",k.UNLOCKED="unlocked",k.COMINGSOON="comingsoon"}(Y||(Y={}));let J=z=class extends q.z{create(){super.create(),this.bindContext()}bindContext(){this.modalType===Y.COMINGSOON?this.bindZoneComingSoonPopup():this.modalType===Y.UNLOCKED?this.bindZoneUnlockedPopup():this.bindZoneLockedPopup()}bindZoneLockedPopup(){const k=Z.i.getZoneName(this._targetZoneId),B=Z.i.getZoneTagForZoneId(this._targetZoneId),U=Z.i.getHighestAvailableZoneData().zone,F=Z.i.getZoneName(U),j=Z.i.getZoneTagForZoneId(U),$=z.lockTextConfig[this.modalType];if(this._context.Container.rebind("ZONE_STATUS_POPUP_TITLE_KEY").toConstantValue($.title),this._context.Container.rebind("ZONE_STATUS_POPUP_DESCRIPTION_KEY").toConstantValue($.description),this.modalType===Y.LOCKEDLEVEL){const k=Z.i.getZoneData(this._targetZoneId).getRequiredLevel().toString();this._context.Container.rebind("ZONE_STATUS_POPUP_TITLE_ARGS").toConstantValue([k]),this._context.Container.rebind("ZONE_STATUS_POPUP_DESCRIPTION_ARGS").toConstantValue([F])}else if(this.modalType===Y.LOCKEDSUBJECT){const B=class{static getSubjectDisplay(){const k=H.q.instance.prodigy.gameContainer.get("f1d-f7b1").getSubject();switch(k){default:return k;case K.Q.ELA:return H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("SUBJECT_NAME_ENGLISH");case K.Q.Math:return H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("SUBJECT_NAME_MATH");case K.Q.Science:return H.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText("SUBJECT_NAME_SCIENCE")}}}.getSubjectDisplay();this._context.Container.rebind("ZONE_STATUS_POPUP_TITLE_ARGS").toConstantValue([k]),this._context.Container.rebind("ZONE_STATUS_POPUP_DESCRIPTION_ARGS").toConstantValue([k,B])}else this.modalType===Y.LOCKEDPREREQUISITE&&(this._context.Container.rebind("ZONE_STATUS_POPUP_TITLE_ARGS").toConstantValue([k]),this._context.Container.rebind("ZONE_STATUS_POPUP_DESCRIPTION_ARGS").toConstantValue([F]));this._context.Container.rebind("ZONE_STATUS_POPUP_CURRENT_ZONE_ICON").toConstantValue(`icon-zone-${j}`),this._context.Container.rebind("ZONE_STATUS_POPUP_TELEPORT_MAP_TAG").toConstantValue(U),this._context.Container.rebind("ZONE_STATUS_POPUP_SEGMENT_BUTTON_INTERFACE_NAME").toConstantValue(`zone_locked_popup_${j}`),this._context.Container.rebind("ZONE_STATUS_POPUP_TARGET_NAME").toConstantValue(k),this._context.Container.rebind("ZONE_STATUS_POPUP_BANNER").toConstantValue(Q.J.isCoreZone(this._targetZoneId)?`hdr-${B}`:"hdr-generic")}bindZoneUnlockedPopup(){const k=Z.i.getZoneData(this._targetZoneId),B=Z.i.getZoneTagForZoneId(this._targetZoneId),{puppetmasterText:U,description:F}=z.unlockedTextConfig[B];this._context.Container.rebind("ZONE_STATUS_POPUP_TARGET_NAME").toConstantValue(k.getName()),this._context.Container.rebind("ZONE_STATUS_POPUP_BANNER").toConstantValue(`hdr-${B}-unlocked`),this._context.Container.rebind("ZONE_STATUS_POPUP_PUPPETMASTER_TEXT").toConstantValue(U),this._context.Container.rebind("ZONE_STATUS_POPUP_TARGET_ZONE_ICON").toConstantValue(`icon-zone-${B}`),this._context.Container.rebind("ZONE_STATUS_POPUP_DESCRIPTION_KEY").toConstantValue(F),this._context.Container.rebind("ZONE_STATUS_POPUP_SEGMENT_BUTTON_INTERFACE_NAME").toConstantValue(`zone_unlocked_popup_${B}`),this._context.Container.rebind("ZONE_STATUS_POPUP_DIFFICULTY").toConstantValue(k.difficultyMode)}bindZoneComingSoonPopup(){var k;const B=null===(k=z.zoneRequirementsMap[this._targetZoneId])||void 0===k?void 0:k.showZoneInjectionId,U=Z.i.getZoneName(this._targetZoneId),F=Z.i.getZoneTagForZoneId(this._targetZoneId);B&&this._context.Container.rebind(B).toConstantValue(!0),this._context.Container.rebind("ZONE_STATUS_POPUP_BANNER").toConstantValue(Q.J.isCoreZone(this._targetZoneId)?`gamemode-lock-${F}`:"gamemode-lock-generic"),this._context.Container.rebind("ZONE_STATUS_POPUP_TARGET_NAME").toConstantValue(U)}openDifficultyConfirmationPopup(){H.q.instance.prodigy.open.difficultySelectorConfirmationModal($.i.Regular)}static canShowEntryPopup(k){var B,U;const F=H.q.instance.prodigy.gameContainer.get("306-5359").highestDifficultyUnlocked,G=z.zoneUnlockedBreadcrumbFeature[F],j=null!=k?k:Z.i.getHighestAvailableZoneData(F).zone,$=z.zoneRequirementsMap[j].entryBreadcrumb,V=j===X.A_.SHIVERCHILL,W=(null===(U=null===(B=H.q.instance.prodigy.world.getZone(j))||void 0===B?void 0:B.getQuestState())||void 0===U?void 0:U.ID)>1,q=H.q.instance.prodigy.world.getCurrentZone()===j,K=H.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(G,$);return $&&!V&&!W&&!q&&!K}static completeEntryBreadcrumb(k){const B=H.q.instance.prodigy.gameContainer.get("306-5359").highestDifficultyUnlocked,U=z.zoneUnlockedBreadcrumbFeature[B],F=null!=k?k:Z.i.getHighestAvailableZoneData(B).zone,G=z.zoneRequirementsMap[F].entryBreadcrumb;H.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(U,G)}};J.lockTextConfig={[Y.LOCKEDLEVEL]:{title:"UNLOCK_ZONE_AT",description:"CONTINUE_EXPLORING_X"},[Y.LOCKEDSUBJECT]:{title:"ZONE_LOCKED",description:"CHANGE_SUBJECTS_TO_UNLOCK"},[Y.LOCKEDPREREQUISITE]:{title:"ZONE_LOCKED",description:"CONTINUE_EXPLORING_X"}},J.unlockedTextConfig={[j.O.Shiverchill]:{description:"ZONE_UNLOCKED_EXPLORE_SHIVERCHILL",puppetmasterText:"PUPPETMASTER_ZONE_UNLOCKED_SHIVERCHILL"},[j.O.Bonfire]:{description:"ZONE_UNLOCKED_EXPLORE_BONFIRE",puppetmasterText:"PUPPETMASTER_ZONE_UNLOCKED_BONFIRE"},[j.O.Shipwreck]:{description:"ZONE_UNLOCKED_EXPLORE_SHIPWRECK",puppetmasterText:"PUPPETMASTER_ZONE_UNLOCKED_SHIPWRECK"},[j.O.Skywatch]:{description:"ZONE_UNLOCKED_EXPLORE_SKYWATCH",puppetmasterText:"PUPPETMASTER_ZONE_UNLOCKED_SKYWATCH"}},J.zoneRequirementsMap={[X.A_.FOREST]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_FIREFLY"},[X.A_.SHIVERCHILL]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SHIVERCHILL",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL},[X.A_.BONFIRE]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_BONFIRE",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE},[X.A_.SHIPWRECK]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SHIPWRECK",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK},[X.A_.SKYWATCH]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SKYWATCH",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH},[X.A_.ACADEMY]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_ACADEMY"},[X.A_.FORESTHARD]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_FIREFLY"},[X.A_.SHIVERCHILLHARD]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SHIVERCHILL",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL_HARD},[X.A_.BONFIREHARD]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_BONFIRE",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE_HARD},[X.A_.SHIPWRECKHARD]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SHIPWRECK",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK_HARD},[X.A_.SKYWATCHHARD]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SKYWATCH",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH_HARD},[X.A_.ACADEMYHARD]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_ACADEMY"},[X.A_.FORESTEXPERT]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_FIREFLY"},[X.A_.SHIVERCHILLEXPERT]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SHIVERCHILL",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIVERCHILL_EXPERT},[X.A_.BONFIREEXPERT]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_BONFIRE",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_BONFIRE_EXPERT},[X.A_.SHIPWRECKEXPERT]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SHIPWRECK",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SHIPWRECK_EXPERT},[X.A_.SKYWATCHEXPERT]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_SKYWATCH",entryBreadcrumb:W.B.BREADCRUMB_ZONE_UNLOCKED_POPUP_SKYWATCH_EXPERT},[X.A_.ACADEMYEXPERT]:{showZoneInjectionId:"ZONE_STATUS_POPUP_SHOW_ACADEMY"}},J.zoneUnlockedBreadcrumbFeature={[$.i.Regular]:W.B.FEATURE_ZONE_UNLOCKED_POPUP,[$.i.Hard]:W.B.FEATURE_ZONE_UNLOCKED_POPUP_HARD,[$.i.Expert]:W.B.FEATURE_ZONE_UNLOCKED_POPUP_EXPERT},(0,F.Cg)([(0,G.Cdj)("ZONE_STATUS_MODAL_TYPE"),(0,F.Sn)("design:type",String)],J.prototype,"modalType",void 0),(0,F.Cg)([(0,G.Cdj)("ZONE_STATUS_POPUP_TARGET_ID"),(0,F.Sn)("design:type",String)],J.prototype,"_targetZoneId",void 0),J=z=(0,F.Cg)([(0,G.EVk)("ZoneStatusPopupDataProvider",V.Y.uiDialog)],J)},41968:(k,B,U)=>{"use strict";U.d(B,{P:()=>J});var F=U(8674),G=U(62459),j=U(97495),$=U(35120),H=U(28152),V=U(37807),W=U(31478),q=U(73678),K=U(3785),z=U(15989),Y=U(40392),Q=U(76277),X=U(17740),Z=U(47728);let J=class extends G.uAl{constructor(){super(...arguments),this._zoneId=q.A_.FOREST,this.runOnCreate=!1,this._isNonZoneLocation=!1,this.onUnlockPopupEnabled=new G.HN0,this.onUnlockPopupDisabled=new G.HN0,this.onShowGuideHand=new G.HN0}create(){super.create(),this.runOnCreate&&this.run()}destroy(){this.onUnlockPopupEnabled.dispose(),this.onUnlockPopupDisabled.dispose(),this.onShowGuideHand.dispose(),super.destroy()}run(){var k;if(this._isNonZoneLocation)return!1;const B=$.q.instance.prodigy.world.getZone(this._zoneId),U=Y.i.getZoneData(this._zoneId),F=!U.isHidden()&&U.meetsRequirements()&&!this._breadcrumb.isCompleted()&&!Y.i.isZoneLocked(this._zoneId)&&!1===(null===(k=this._worldMapMenuInstanceLockedZoneKeys)||void 0===k?void 0:k.includes(U.nameKey))&&((null==B?void 0:B.difficultyModeAgnostic)||Y.i.isInDifficultyMode(U.difficultyMode));return(F?this.onUnlockPopupEnabled:this.onUnlockPopupDisabled).dispatch(),F}showGuideHand(k=!0){var B;if(this._isNonZoneLocation)return;if(!k)return void this.onShowGuideHand.dispatch(k);const U=Y.i.BUTTONS_CONFIG.find((k=>k.zone===this._zoneId));if(Y.i.isInDifficultyMode(null==U?void 0:U.difficultyMode))if((null===(B=this._worldMapMenuInstanceLockedZoneKeys)||void 0===B?void 0:B.includes(z.NJ.DragonIsle))||1!==(0,W.k)()||(null==U?void 0:U.difficultyMode)!==j.i.Regular){if(Y.i.getHighestAvailableZoneData().zone!==this._zoneId&&this._zoneId!==q.A_.ACADEMY||this.onShowGuideHand.dispatch(!0),this._zoneId===q.A_.LAMPLIGHT){const k=(0,Q.G)(X.t),B=Z.x.hasFestivalBeenSeen();this.onShowGuideHand.dispatch(k&&!B)}}else this._zoneId===q.A_.DRAGONISLE&&this.onShowGuideHand.dispatch(!0)}};(0,F.Cg)([(0,G.MnK)(V.N),(0,F.Sn)("design:type",V.N)],J.prototype,"_breadcrumb",void 0),(0,F.Cg)([(0,G.gfw)(q.A_),(0,F.Sn)("design:type",String)],J.prototype,"_zoneId",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],J.prototype,"runOnCreate",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],J.prototype,"_isNonZoneLocation",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],J.prototype,"onUnlockPopupEnabled",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],J.prototype,"onUnlockPopupDisabled",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],J.prototype,"onShowGuideHand",void 0),(0,F.Cg)([(0,G.Cdj)(K.z.WorldMapMenuInstanceLockedZones),(0,F.Sn)("design:type",Array)],J.prototype,"_worldMapMenuInstanceLockedZoneKeys",void 0),J=(0,F.Cg)([(0,G.EVk)("ZoneUnlockPopupGuard",H.Y.utility)],J)},26691:(k,B,U)=>{"use strict";var F;U.d(B,{D:()=>F}),function(k){k[k.OkayButton=0]="OkayButton",k[k.YesNoButtons=1]="YesNoButtons"}(F||(F={}))},21644:(k,B,U)=>{"use strict";U.d(B,{Bi:()=>q,Uh:()=>F,ju:()=>K,p1:()=>z});var F,G=U(113),j=U(64270),$=U(35120),H=U(15485),V=U(46784),W=U(41674);function q(k){if(k)return"storeId"in k?k.storeId:void 0}!function(k){k.OpenFireflyOutfitters="Open Firefly Outfitters",k.OpenHotHotThreads="Open Hot Hot Threads",k.OpenOceanOutfitters="Open Ocean Outfitters",k.OpenSnowdaySales="Open Snowday Sales",k.OpenSkyHighValues="Open Sky High Values",k.OpenPetStore="Open Pet Store",k.OpenWandStore="Open Wand Store",k.OpenPotionShop="Open Potion Shop",k.OpenDynamicStore="Open Dynamic Store"}(F||(F={}));const K=[F.OpenFireflyOutfitters,F.OpenSnowdaySales,F.OpenHotHotThreads,F.OpenOceanOutfitters,F.OpenSkyHighValues],z={[F.OpenDynamicStore]:{name:"Pet Center",imageFrame:"unified-store-pet-store",iconFrame:"icon-currency-unified",customCallback:()=>{$.q.instance.prodigy.open.dynamicStore({storeKey:j.GA.PetShop,origin:{originType:W.$N.ButtonClick,originId:H.k.UnifiedStoreToDynamicStore}})},segmentData:{UNIFIED_STORE_SEGMENT_BUTTON_NAME:H.k.UnifiedStoreToDynamicStore,UNIFIED_STORE_SEGMENT_DESTINATION_NAME:V.B.UnifiedStore}},[F.OpenFireflyOutfitters]:{name:"Firefly Outfitters",imageFrame:"unified-store-firefly-outfitters",iconFrame:"mail-floran",storeId:7,zone:G.O.Firefly},[F.OpenHotHotThreads]:{name:"Hot Hot Threads",imageFrame:"unified-store-hot-hot-threads",iconFrame:"mail-hot-hot",storeId:6,zone:G.O.Bonfire},[F.OpenOceanOutfitters]:{name:"Ocean Outfitters",imageFrame:"unified-store-ocean-outfitters",iconFrame:"mail-yar",storeId:19,zone:G.O.Shipwreck},[F.OpenSnowdaySales]:{name:"Snowday Sales",imageFrame:"unified-store-snowday-sales",iconFrame:"mail-shiver",storeId:8,zone:G.O.Shiverchill},[F.OpenSkyHighValues]:{name:"Sky-High Values",imageFrame:"unified-store-sky-high-values",iconFrame:"mail-aero",storeId:5,zone:G.O.Skywatch},[F.OpenPetStore]:{name:"Pet Store",imageFrame:"unified-store-pet-store",iconFrame:"small-icon-gold",storeId:1},[F.OpenWandStore]:{name:"Wand Store",imageFrame:"unified-store-wand-store",iconFrame:"small-icon-gold",storeId:2},[F.OpenPotionShop]:{name:"Potion Shop",imageFrame:"unified-store-potion-store",iconFrame:"small-icon-gold",storeId:4}}},56903:(k,B,U)=>{"use strict";U.d(B,{A:()=>K});var F=U(8674),G=U(62459),j=U(95891),$=U(35120),H=U(73797),V=U(13956),W=U(34854),q=U(30226);class K{static setWizardWatchData(k){this._wizardWatchData=k}static clearWizardWatchData(){this._wizardWatchData=null}static getWizardWatchData(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=new G.bnh;return G.Aq$.isDefined(this._wizardWatchData)?(k.resolve({items:this._wizardWatchData}),k):(yield K._networkHandler.getWizardWatchData().catch((()=>{k.reject("Failed to fetch wizard watch data")})).then((B=>{var U;this.setWizardWatchData(B.items),k.resolve({items:null!==(U=this._wizardWatchData)&&void 0!==U?U:[]})})),k)}))}static getActiveEntityAds(){return G.Aq$.isDefined(this._wizardWatchData)?(this._activeAds=K.getActiveEntityAdsFromList(this._wizardWatchData),this._activeAds):(G.VyI.log("[WizardWatch] Error: Wizard watch ads have not been fetched",G.$bb.Error),[])}static getActiveEntityAdsFromList(k){const B=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=$.q.instance.prodigy.gameContainer.get("073-6f3b"),F=Date.now(),j=$.q.instance.prodigy.gameContainer.get("db5-fb6e");return k.filter((k=>{const $=k.conditions.requirementsID;if(G.Aq$.isDefined($)&&!j.meetsRequirementsDeprecated($))return!1;const H=k.conditions.growthbook;if(H.feature){const k=U.getFeatureValue(H.feature),B=k?k.enabled:null;if(!U.isOn(H.feature)||!1===B)return!1}if(k.conditions.memberSuppression&&(B.hasMembership()||q.J.shouldSuppressAd(B)))return!1;if(k.conditions.nonMemberSuppression&&!B.hasMembership())return!1;const V=new Date(Date.now());if(k.conditions.hideDuringSchoolHours&&q.J.isDateWithinSchoolDayAndHours(V)||k.conditions.hideDuringHomeHours&&!q.J.isDateWithinSchoolDayAndHours(V))return!1;k.body=K.fixEscapeCharacters(k.body);const W=k.sendDate?new Date(k.sendDate):null,z=k.removeDate?new Date(k.removeDate):null;if(W&&isNaN(W.getTime()))return G.VyI.log(`[WizardWatch] Bad send date ${k.sendDate}.`,G.$bb.Warning),!1;if(z&&isNaN(z.getTime()))return G.VyI.log(`[WizardWatch] Bad expiry date ${k.removeDate}.`,G.$bb.Warning),!1;const Y=null===W||F>W.getTime(),Q=k.noExpiry||null===z||Fk.ID))}static getUnseenActiveAdCount(){const k=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return j.difference(this.getActiveAdIDs(),k.encounters.getSeenAds()).length}static markActiveAdsSeen(){$.q.instance.prodigy.gameContainer.get("e20-0fb0").player.encounters.setSeenAds(K.getActiveAdIDs()),$.q.instance.prodigy.game.broadcaster.broadcast(H.Y1.RefreshWizardWatchAdCount,H.HG.HUD)}static fixEscapeCharacters(k){return k.replace(/\\n/g,"\n").replace(/\\t/g,"\t")}}(0,F.Cg)([(0,V.b)("152-d9b2"),(0,F.Sn)("design:type",W.J)],K,"_networkHandler",void 0)},68152:(k,B,U)=>{"use strict";U.d(B,{v:()=>F});const F=(k,B)=>{0}},39473:(k,B,U)=>{"use strict";U.d(B,{S:()=>H});var F=U(8674),G=U(62459),j=U(79687),$=U(30226);let H=class{constructor(k){this._localizer=null,this.ut=[],this._localizer=k}addPhrases(k,B=!1){for(let U=0;Uk?this.ut[k]:null}getPhraseIndex(k){for(let B=0;B{"use strict";U.d(B,{b:()=>F});class F{static isValidClassCode(k){const B=`^[A-F0-9]{${this.CLASS_CODE_LENGTH}}$`;return RegExp(B).test(k)}static reformatClassCode(k){return k.toUpperCase().replace(/[^A-F0-9]/gi,"").substring(0,this.CLASS_CODE_LENGTH)}}F.CLASS_CODE_LENGTH=7,F.CLASSCODE_COOLDOWN_MONTH=7,F.CLASSCODE_COOLDOWN_DATE=15},8770:(k,B,U)=>{"use strict";U.d(B,{Hh:()=>$,TZ:()=>V,wB:()=>H});var F=U(62459),G=U(17446),j=U(23748);const $={[G.E.Legendary]:16745216,[G.E.Heroic]:12984810,[G.E.Rare]:2664440,[G.E.Uncommon]:1890938,[G.E.Common]:8296667},H={[G.E.Legendary]:"#C32300",[G.E.Heroic]:"#690BC9",[G.E.Rare]:"#0B43B1",[G.E.Uncommon]:"#0B6C57",[G.E.Common]:"#363636"};class V{static convertPixelToGreyscale(k,B,U){return.3*k+.59*B+.11*U}static lerpRgb(k,B,U){return j.z.clampedLerp(k>>16&255,B>>16&&255,U)<<16|j.z.clampedLerp(k>>8&255,B>>8&&255,U)<<8|255&j.z.clampedLerp(255&k,B&&255,U)}static generateRgbColorReplacementPairs(k,B){const U=[];k.length!==B.length&&F.VyI.log("WARNING Color replacement arrays not of same length. Not all colors will be replaced correctly.",F.$bb.Warning);for(let F=0;F{"use strict";U.d(B,{o:()=>$});var F=U(8674),G=U(62459),j=U(68152);class ${constructor(){this._counter=0,this._callback=null,this._counterPromise=null,this._resolveFunction=null}get counter(){return this._counter}init(k,B){(0,j.v)(B>0,"Semaphore counter must be greater than 0"),this._callback=k,this._counter=B,this.resolvePendingPromise(!1),this._counterPromise=new Promise((k=>{this._resolveFunction=k}))}wait(){return(0,F.sH)(this,void 0,void 0,(function*(){return(0,j.v)(null!==this._counterPromise,"Cannot await a semaphore before it is initialized"),this._counterPromise}))}decrement(){--this._counter,0===this._counter&&(this._callback?this._callback():G.VyI.log("Semaphore callback was null.",G.$bb.Warning),this.resolvePendingPromise(!0),this._callback=null)}increment(){++this._counter}destroy(){this._resolveFunction&&this.resolvePendingPromise(!1),this._callback=null}resolvePendingPromise(k){this._resolveFunction&&(this._resolveFunction(k),this._resolveFunction=null,this._counterPromise=null)}}},88253:(k,B,U)=>{"use strict";U.d(B,{M:()=>G});var F=U(35120);class G{static getCutsceneDeterminers(){return{isNotificationsPaused:F.q.instance.prodigy.notifications.isPaused(),isInputEnabled:F.q.instance.prodigy.game.input.enabled}}static isCutscenePlaying(){const{isNotificationsPaused:k,isInputEnabled:B}=G.getCutsceneDeterminers();return k||!B}}},98252:(k,B,U)=>{"use strict";U.d(B,{pF:()=>K,uC:()=>F});var F,G,j=U(62459),$=U(99625),H=(U(34829),U(2272)),V=U(75329);!function(k){k[k.NONE=0]="NONE",k[k.IOS_APP=1]="IOS_APP",k[k.NATIVE_APP=2]="NATIVE_APP"}(F||(F={})),function(k){k.WEB="WEB",k.APPLE="APPLE",k.GOOGLE="GOOGLE"}(G||(G={}));const W=["requestFullscreen","requestFullScreen","webkitRequestFullscreen","webkitRequestFullScreen","msRequestFullscreen","msRequestFullScreen","mozRequestFullScreen","mozRequestFullscreen"],q=["cancelFullScreen","exitFullscreen","webkitCancelFullScreen","webkitExitFullscreen","msCancelFullScreen","msExitFullscreen","mozCancelFullScreen","mozExitFullscreen"];class K{static getMetricsPlatformName(){let k="web";return j.o5U.isIOS()?k="ios":j.o5U.isMobile()&&(k="android"),k}static appType(){if("1"===j.Aq$.getUrlVariable("iosApp"))return F.IOS_APP;const k=j.Aq$.getUrlVariable("nativeApp");return parseInt(k,10)>=1?F.NATIVE_APP:F.NONE}static isNativeApp(){return this.appType()!==F.NONE}static isNewMobileLogin(){const k=j.Aq$.getUrlVariable("nativeApp");return parseInt(k,10)>=2}static getNativeAppVersion(){return this.isNativeApp()?j.Aq$.getUrlVariable("nativeVersion"):null}static eligibleVersionForMobileOtpPurchase(){const k=this.getNativeAppVersion();if(!k)return!1;const B=k.split(".").map(Number),U=K.isNativeIOSApp()?[4,9,3]:[4,9,0];return this.compareVersion(B,U)}static eligibleVersionForMobileMembershipPurchase(){const k=this.getNativeAppVersion();if(!k)return!1;const B=k.split(".").map(Number);return this.compareVersion(B,this.isNativeIOSApp()?this._minimumSupportedVersionForIosRevenueCatMembershipPurchase:this._minimumSupportedVersionForMobileMembershipPurchase)}static eligibleVersionForMobileMembershipPurchaseForMultipleTiers(k){const B=this.getNativeAppVersion();if(!B)return!1;const U=B.split(".").map(Number),F=k?k.split(".").map(Number):void 0;return(this.isNativeAndroidApp()||this.isNativeIOSApp())&&this.compareVersion(U,null!=F?F:this._minimumSupportedVersionForMobileMembershipPurchaseMultipleTiers)}static eligibleForMembershipPurchaseForMultipleTiers(){return!this.isNativeApp()||this.eligibleVersionForMobileMembershipPurchaseForMultipleTiers()}static compareVersion(k,B){for(let U=0;UB[U])return!0}return!0}static isNativeIOSApp(){return this.isNativeApp()&&(j.o5U.isIOS()||j.o5U.isIpadOS()||"OS X"===j.o5U.getOsName())}static isNativeAndroidApp(){return this.isNativeApp()&&j.o5U.isAndroid()&&!this.isNativeAmazonApp()}static getDeviceSource(){return this.isNativeApp()?this.isNativeIOSApp()?G.APPLE:G.GOOGLE:G.WEB}static isNativeAmazonApp(){const k=window.expoReleaseChannel;return j.Aq$.isDefined(k)&&k.indexOf("amazon")>-1}static isDeprecatedIOS(){let k=!1;const B=screen.availWidth,U=screen.availHeight;return j.o5U.isIOS()&&((B<=768&&U<=1024||B<=1024&&U<=768)&&window.devicePixelRatio<2&&(k=!0),(B<=320&&U<=480||B<=480&&U<=320)&&(k=!0)),k}static getWheelEventName(){let k=null;return"onwheel"in window?k="wheel":"onmousewheel"in window?k="mousewheel":j.o5U.isFirefox()&&"MouseScrollEvent"in window&&(k="DOMMouseScroll"),k}static hasMSPointerSupport(){return navigator.msPointerEnabled||navigator.pointerEnabled||!1}static hasPointerLockSupport(){return"pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document}static hasTouchSupport(){return"ontouchstart"in window}static isFullscreenSupported(){return null!==this.getFullscreenRequestMethod()}static isFullscreenKeyboardSupported(){var k;return(null===(k=window.Element)||void 0===k?void 0:k.ALLOW_KEYBOARD_INPUT)||!1}static getFullscreenRequestMethod(){if(void 0!==this._requestFullscreenMethod)return this._requestFullscreenMethod;this._requestFullscreenMethod=null;const k=document.createElement("div");for(const B of W)if(k[B]){this._requestFullscreenMethod=B;break}return this._requestFullscreenMethod}static getFullscreenCancelMethod(){if(void 0!==this._cancelFullscreenMethod)return this._cancelFullscreenMethod;this._cancelFullscreenMethod=null;for(const k of q)if(document[k]){this._cancelFullscreenMethod=k;break}return this._cancelFullscreenMethod}}K._minimumSupportedVersionForMobileMembershipPurchase=[4,9,1],K._minimumSupportedVersionForIosRevenueCatMembershipPurchase=[4,9,4],K._minimumSupportedVersionForMobileMembershipPurchaseMultipleTiers=[4,9,6],K.PERFORMANCE_WARNING_CONFIG=new V.Z("BUTTON_OKAY_CAPITAL",null,H.E.Medium,500,"WARNING","WARNING_DEVICE_PERFORMANCE",void 0,void 0,void 0,$.l.ErrorDialogHeader)},50664:(k,B,U)=>{"use strict";U.d(B,{F:()=>j});var F=U(68910),G=U(82366);class j{static createBox(k,B,U,F,G,j,$,H){const V=k.add.graphics(0,0,H);return V.beginFill(j,$),V.lineTo(F,0),V.lineTo(F,G),V.lineTo(0,G),V.lineTo(0,0),V.x=B,V.y=U,V.endFill(),V}static drawBounds(k,B,U=B.getLocalBounds(),j=16711680){const $=new G.A(k,0,0);$.name="debugBounds",$.lineStyle(2,j,.5);return $.drawPolygon([new F.Point(-8,-8),new F.Point(8,8),new F.Point(0,0),new F.Point(8,-8),new F.Point(-8,8)]),$.drawRect(U.x,U.y,U.width,U.height),B.addChild($),$}}},3862:(k,B,U)=>{"use strict";U.d(B,{B:()=>$});var F=U(95891),G=U(35120),j=U(5898);class ${static setLastDungeonRun(k,B,U){const j=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let $=j.data.dungeonRunsTimeStamps;if($){const k=F.find($,["dungeonName",B]);k?k.lastRunTimeStamp=U:$.push({dungeonName:B,lastRunTimeStamp:U})}else $=[{dungeonName:B,lastRunTimeStamp:U}];j.data.dungeonRunsTimeStamps=$}static getLastDungeonRun(k,B){const U=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(U.data.dungeonRunsTimeStamps){const k=F.find(U.data.dungeonRunsTimeStamps,["dungeonName",B]);if(k)return k}return null}static setDungeonRunCompleteTime(k,B,U){const $=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let H=$.data.dungeonRunsCompleteTimeStamps;if(H){const k=F.find(H,["dungeonName",B]);k?k.lastRunTimeStamp=U:H.push({dungeonName:B,lastRunTimeStamp:U})}else H=[{dungeonName:B,lastRunTimeStamp:U}];$.data.dungeonRunsCompleteTimeStamps=H,$.achievements.increment(j.f.ArchivesRuns,1)}static getDungeonRunComplete(k){return G.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.dungeonRunsCompleteTimeStamps}}},10711:(k,B,U)=>{"use strict";U.d(B,{$U:()=>Z,H9:()=>X,K8:()=>q,KQ:()=>Y,Nx:()=>z,_m:()=>Q,ty:()=>J,uA:()=>W});var F=U(62459),G=U(34656),j=U(35120),$=U(77938);const H={hat:0,outfit:1,boots:2,weapon:3,spellRelic:4,pet:5,petHat:6,petRelic:7,follow:8,mount:9,dorm:10,item:11,currency:12},V={27:0,1:1,12:2,13:3,14:4,15:5,16:6,19:7,11:8};function W(k,B){var U;return null!==(U=k.finalPrice)&&void 0!==U?U:G.j.calculateFinalCost(k.task,B)}function q(k,B){const U=k.reduce(((k,B)=>{var U;const j=G.j.getItemRewards(B.task);if(!F.Aq$.isDefined(j[0].ID))return k;const $=`${j[0].type}-${j[0].ID}`;return null!==(U=k[$])&&void 0!==U||(k[$]=[]),k[$].push(B),k}),{});return Object.keys(U).map((k=>{const j=U[k][0],H=!!B&&!0!==B[j.task.id],V=W(j,((k,B)=>{var U;return null===(U=$.t.getItem(k,B))||void 0===U?void 0:U.data})),q=G.j.getItemRewards(j.task),K=q[0],z=new Map;q.slice(1).forEach((k=>{const B=z.get(k.ID);F.Aq$.isDefined(B)?B.N+=k.N:z.set(k.ID,k)}));const Y=U[k].reduce((k=>k+ +(j.task.repeatable||1)),0);return{item:$.t.getItem(K.type,K.ID),additionalItems:Array.from(z.values()),currencyID:V.currency,currencyAmount:V.value,dynamicStoreData:{itemQuantity:Y,offers:U[k],isNew:H,title:j.task.metadata.displayName,subtitle:j.task.metadata.displaySubtitle}}})).sort(K)}function K(k,B){var U,j,W,q,K,z,Y,Q,X,Z,J,tt;if(!F.Aq$.isDefined(k.dynamicStoreData)||!F.Aq$.isDefined(B.dynamicStoreData))return F.VyI.log("DynamicStoreUtils: Trying to sort something undefined.",F.$bb.Warning),0;const et=G.j.getItemRewards(k.dynamicStoreData.offers[0].task)[0],it=G.j.getItemRewards(B.dynamicStoreData.offers[0].task)[0],st=$.t.getItem(et.type,et.ID),nt=$.t.getItem(it.type,it.ID);if(!F.Aq$.isDefined(st)||!F.Aq$.isDefined(nt))return F.VyI.log("DynamicStoreUtils: Trying to sort a null item.",F.$bb.Warning),0;const at=(null!==(U=H[st.type])&&void 0!==U?U:Number.MAX_SAFE_INTEGER)-(null!==(j=H[nt.type])&&void 0!==j?j:Number.MAX_SAFE_INTEGER);if(0!==at)return at;if("currency"===st.type){const k=(null!==(W=V[st.ID])&&void 0!==W?W:Number.MAX_SAFE_INTEGER)-(null!==(q=V[nt.ID])&&void 0!==q?q:Number.MAX_SAFE_INTEGER);if(0!==k)return k}const rt=null!==(z=null===(K=null==st?void 0:st.data)||void 0===K?void 0:K.rarity)&&void 0!==z?z:Number.MAX_SAFE_INTEGER,ot=(null!==(Q=null===(Y=null==nt?void 0:nt.data)||void 0===Y?void 0:Y.rarity)&&void 0!==Q?Q:Number.MAX_SAFE_INTEGER)-rt;if(0!==ot)return ot;const ht=(null!==(X=V[k.currencyID])&&void 0!==X?X:Number.MAX_SAFE_INTEGER)-(null!==(Z=V[B.currencyID])&&void 0!==Z?Z:Number.MAX_SAFE_INTEGER);if(0!==ht)return ht;const ct=B.currencyAmount-k.currencyAmount;return 0!==ct?ct:(null!==(J=st.ID)&&void 0!==J?J:Number.MAX_SAFE_INTEGER)-(null!==(tt=nt.ID)&&void 0!==tt?tt:Number.MAX_SAFE_INTEGER)}function z(k){const B=k.task.repeatable;return"boolean"==typeof B&&B?Number.MAX_SAFE_INTEGER:"number"==typeof B?B:1}function Y(k){const B=j.q.instance.prodigy.gameContainer.get("306-5359");return B.data.dynamicStoreModalLastSeenDateMap||(B.data.dynamicStoreModalLastSeenDateMap={}),B.data.dynamicStoreModalLastSeenDateMap[k]}function Q(k){const B=j.q.instance.prodigy.gameContainer.get("306-5359");B.data.dynamicStoreModalLastSeenDateMap||(B.data.dynamicStoreModalLastSeenDateMap={}),B.data.dynamicStoreModalLastSeenDateMap[k]=Date.now()}function X(k){return k.some((k=>{var B,U;const G=$.t.getItem(k.type,k.ID);return F.Aq$.isDefined(G)&&(null!==(U=null===(B=G.data)||void 0===B?void 0:B.member)&&void 0!==U?U:0)>0}))}function Z(k,B){return k.some((k=>{var U,G;const j=$.t.getItem(k.type,k.ID);return F.Aq$.isDefined(j)&&(null!==(G=null===(U=j.data)||void 0===U?void 0:U.lockLevel)&&void 0!==G?G:0)>B}))}function J(k){return(!F.Aq$.isDefined(k.emptySectionInfo)||0===k.emptySectionInfo.title.length||0===k.emptySectionInfo.subtitle.length)&&0===k.offers.length}},14726:(k,B,U)=>{"use strict";var F;U.d(B,{T:()=>F}),function(k){k[k.Day=864e5]="Day",k[k.Week=6048e5]="Week",k[k.Month=2592e6]="Month",k[k.Year=31556952e3]="Year"}(F||(F={}))},52498:(k,B,U)=>{"use strict";var F;U.d(B,{h:()=>F}),function(k){k[k.Local=0]="Local",k[k.QABox=1]="QABox",k[k.Dev=2]="Dev",k[k.Staging=3]="Staging",k[k.Production=4]="Production"}(F||(F={}))},90351:(k,B,U)=>{"use strict";U.d(B,{K:()=>j,i:()=>F});var F,G=U(62459);!function(k){k.LinearNone="linearNone",k.BackIn="backIn",k.BackOut="backOut",k.BackInOut="backInOut",k.BounceIn="bounceIn",k.BounceOut="bounceOut",k.BounceInOut="bounceInOut",k.CircularIn="circularIn",k.CircularOut="circularOut",k.CircularInOut="circularInOut",k.CubicIn="cubicIn",k.CubicOut="cubicOut",k.CubicInOut="cubicInOut",k.ElasticIn="elasticIn",k.ElasticOut="elasticOut",k.ElasticInOut="elasticInOut",k.ExponentialIn="exponentialIn",k.ExponentialOut="exponentialOut",k.ExponentialInOut="exponentialInOut",k.QuadraticIn="quadraticIn",k.QuadraticOut="quadraticOut",k.QuadraticInOut="quadraticInOut",k.QuinticIn="quinticIn",k.QuinticOut="quinticOut",k.QuinticInOut="quinticInOut",k.QuarticIn="quarticIn",k.QuarticOut="quarticOut",k.QuarticInOut="quarticInOut",k.SinusoidalIn="sinusoidalIn",k.SinusoidalOut="sinusoidalOut",k.SinusoidalInOut="sinusoidalInOut"}(F||(F={}));class j{static getEasingFunctionFromEnum(k){switch(k){case F.BackIn:return G.GS3.Back.In;case F.BackOut:return G.GS3.Back.Out;case F.BackInOut:return G.GS3.Back.InOut;case F.BounceIn:return G.GS3.Bounce.In;case F.BounceOut:return G.GS3.Bounce.Out;case F.BounceInOut:return G.GS3.Bounce.InOut;case F.CircularIn:return G.GS3.Circular.In;case F.CircularOut:return G.GS3.Circular.Out;case F.CircularInOut:return G.GS3.Circular.InOut;case F.CubicIn:return G.GS3.Cubic.In;case F.CubicOut:return G.GS3.Cubic.Out;case F.CubicInOut:return G.GS3.Cubic.InOut;case F.ElasticIn:return G.GS3.Elastic.In;case F.ElasticOut:return G.GS3.Elastic.Out;case F.ElasticInOut:return G.GS3.Elastic.InOut;case F.ExponentialIn:return G.GS3.Exponential.In;case F.ExponentialOut:return G.GS3.Exponential.Out;case F.ExponentialInOut:return G.GS3.Exponential.InOut;case F.QuadraticIn:return G.GS3.Quadratic.In;case F.QuadraticOut:return G.GS3.Quadratic.Out;case F.QuadraticInOut:return G.GS3.Quadratic.InOut;case F.QuinticIn:return G.GS3.Quintic.In;case F.QuinticOut:return G.GS3.Quintic.Out;case F.QuinticInOut:return G.GS3.Quintic.InOut;case F.QuarticIn:return G.GS3.Quartic.In;case F.QuarticOut:return G.GS3.Quartic.Out;case F.QuarticInOut:return G.GS3.Quartic.InOut;case F.SinusoidalIn:return G.GS3.Sinusoidal.In;case F.SinusoidalOut:return G.GS3.Sinusoidal.Out;case F.SinusoidalInOut:return G.GS3.Sinusoidal.InOut;case F.LinearNone:default:return G.GS3.Linear.None}}}},29546:(k,B,U)=>{"use strict";U.d(B,{X:()=>$});var F=U(62459),G=U(35120),j=U(77938);class ${static isMathSubjectRequirementMet(){return G.q.instance.prodigy.gameContainer.get("db5-fb6e").meetsRequirementsDeprecated(58)}static getFeatureRequirementData(k){var B;return null===(B=j.t.getItem("featureRequirements",k))||void 0===B?void 0:B.data}static getLevelRequirement(k){const B=this.getFeatureRequirementData(k);if(B)for(let U=0;U{"use strict";U.d(B,{N:()=>Rn});var F=U(8674);class G extends Error{}class j extends G{constructor(k){super(`Invalid DateTime: ${k.toMessage()}`)}}class $ extends G{constructor(k){super(`Invalid Interval: ${k.toMessage()}`)}}class H extends G{constructor(k){super(`Invalid Duration: ${k.toMessage()}`)}}class V extends G{}class W extends G{constructor(k){super(`Invalid unit ${k}`)}}class q extends G{}class K extends G{constructor(){super("Zone is an abstract class")}}const z="numeric",Y="short",Q="long",X={year:z,month:z,day:z},Z={year:z,month:Y,day:z},J={year:z,month:Y,day:z,weekday:Y},tt={year:z,month:Q,day:z},et={year:z,month:Q,day:z,weekday:Q},it={hour:z,minute:z},st={hour:z,minute:z,second:z},nt={hour:z,minute:z,second:z,timeZoneName:Y},at={hour:z,minute:z,second:z,timeZoneName:Q},rt={hour:z,minute:z,hourCycle:"h23"},ot={hour:z,minute:z,second:z,hourCycle:"h23"},ht={hour:z,minute:z,second:z,hourCycle:"h23",timeZoneName:Y},ct={hour:z,minute:z,second:z,hourCycle:"h23",timeZoneName:Q},dt={year:z,month:z,day:z,hour:z,minute:z},lt={year:z,month:z,day:z,hour:z,minute:z,second:z},ut={year:z,month:Y,day:z,hour:z,minute:z},ft={year:z,month:Y,day:z,hour:z,minute:z,second:z},bt={year:z,month:Y,day:z,weekday:Y,hour:z,minute:z},pt={year:z,month:Q,day:z,hour:z,minute:z,timeZoneName:Y},vt={year:z,month:Q,day:z,hour:z,minute:z,second:z,timeZoneName:Y},gt={year:z,month:Q,day:z,weekday:Q,hour:z,minute:z,timeZoneName:Q},mt={year:z,month:Q,day:z,weekday:Q,hour:z,minute:z,second:z,timeZoneName:Q};class yt{get type(){throw new K}get name(){throw new K}get ianaName(){return this.name}get isUniversal(){throw new K}offsetName(k,B){throw new K}formatOffset(k,B){throw new K}offset(k){throw new K}equals(k){throw new K}get isValid(){throw new K}}let _t=null;class Et extends yt{static get instance(){return null===_t&&(_t=new Et),_t}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(k,{format:B,locale:U}){return je(k,B,U)}formatOffset(k,B){return We(this.offset(k),B)}offset(k){return-new Date(k).getTimezoneOffset()}equals(k){return"system"===k.type}get isValid(){return!0}}const wt=new Map;const Tt={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};const St=new Map;class At extends yt{static create(k){let B=St.get(k);return void 0===B&&St.set(k,B=new At(k)),B}static resetCache(){St.clear(),wt.clear()}static isValidSpecifier(k){return this.isValidZone(k)}static isValidZone(k){if(!k)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:k}).format(),!0}catch(e){return!1}}constructor(k){super(),this.zoneName=k,this.valid=At.isValidZone(k)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(k,{format:B,locale:U}){return je(k,B,U,this.name)}formatOffset(k,B){return We(this.offset(k),B)}offset(k){if(!this.valid)return NaN;const B=new Date(k);if(isNaN(B))return NaN;const U=function(k){let B=wt.get(k);return void 0===B&&(B=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:k,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),wt.set(k,B)),B}(this.name);let[F,G,j,$,H,V,W]=U.formatToParts?function(k,B){const U=k.formatToParts(B),F=[];for(let G=0;G=0?K:1e3+K,(Be({year:F,month:G,day:j,hour:24===H?0:H,minute:V,second:W,millisecond:0})-q)/6e4}equals(k){return"iana"===k.type&&k.name===this.name}get isValid(){return this.valid}}let Ct={};const Ot=new Map;function It(k,B={}){const U=JSON.stringify([k,B]);let F=Ot.get(U);return void 0===F&&(F=new Intl.DateTimeFormat(k,B),Ot.set(U,F)),F}const Dt=new Map;const Rt=new Map;let Pt=null;const Mt=new Map;function Nt(k){let B=Mt.get(k);return void 0===B&&(B=new Intl.DateTimeFormat(k).resolvedOptions(),Mt.set(k,B)),B}const xt=new Map;function Lt(k,B,U,F){const G=k.listingMode();return"error"===G?null:"en"===G?U(B):F(B)}class kt{constructor(k,B,U){this.padTo=U.padTo||0,this.floor=U.floor||!1;const{padTo:F,floor:G,...j}=U;if(!B||Object.keys(j).length>0){const B={useGrouping:!1,...U};U.padTo>0&&(B.minimumIntegerDigits=U.padTo),this.inf=function(k,B={}){const U=JSON.stringify([k,B]);let F=Dt.get(U);return void 0===F&&(F=new Intl.NumberFormat(k,B),Dt.set(U,F)),F}(k,B)}}format(k){if(this.inf){const B=this.floor?Math.floor(k):k;return this.inf.format(B)}return De(this.floor?Math.floor(k):Ne(k,3),this.padTo)}}class Bt{constructor(k,B,U){let F;if(this.opts=U,this.originalZone=void 0,this.opts.timeZone)this.dt=k;else if("fixed"===k.zone.type){const B=k.offset/60*-1,U=B>=0?`Etc/GMT+${B}`:`Etc/GMT${B}`;0!==k.offset&&At.create(U).valid?(F=U,this.dt=k):(F="UTC",this.dt=0===k.offset?k:k.setZone("UTC").plus({minutes:k.offset}),this.originalZone=k.zone)}else"system"===k.zone.type?this.dt=k:"iana"===k.zone.type?(this.dt=k,F=k.zone.name):(F="UTC",this.dt=k.setZone("UTC").plus({minutes:k.offset}),this.originalZone=k.zone);const G={...this.opts};G.timeZone=G.timeZone||F,this.dtf=It(B,G)}format(){return this.originalZone?this.formatToParts().map((({value:k})=>k)).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const k=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?k.map((k=>{if("timeZoneName"===k.type){const B=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...k,value:B}}return k})):k}resolvedOptions(){return this.dtf.resolvedOptions()}}class Ut{constructor(k,B,U){this.opts={style:"long",...U},!B&&Te()&&(this.rtf=function(k,B={}){const{base:U,...F}=B,G=JSON.stringify([k,F]);let j=Rt.get(G);return void 0===j&&(j=new Intl.RelativeTimeFormat(k,B),Rt.set(G,j)),j}(k,U))}format(k,B){return this.rtf?this.rtf.format(k,B):function(k,B,U="always",F=!1){const G={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},j=-1===["hours","minutes","seconds"].indexOf(k);if("auto"===U&&j){const U="days"===k;switch(B){case 1:return U?"tomorrow":`next ${G[k][0]}`;case-1:return U?"yesterday":`last ${G[k][0]}`;case 0:return U?"today":`this ${G[k][0]}`}}const $=Object.is(B,-0)||B<0,H=Math.abs(B),V=1===H,W=G[k],q=F?V?W[1]:W[2]||W[1]:V?G[k][0]:k;return $?`${H} ${q} ago`:`in ${H} ${q}`}(B,k,this.opts.numeric,"long"!==this.opts.style)}formatToParts(k,B){return this.rtf?this.rtf.formatToParts(k,B):[]}}const Ft={firstDay:1,minimalDays:4,weekend:[6,7]};class Gt{static fromOpts(k){return Gt.create(k.locale,k.numberingSystem,k.outputCalendar,k.weekSettings,k.defaultToEN)}static create(k,B,U,F,G=!1){const j=k||ne.defaultLocale,$=j||(G?"en-US":Pt||(Pt=(new Intl.DateTimeFormat).resolvedOptions().locale,Pt)),H=B||ne.defaultNumberingSystem,V=U||ne.defaultOutputCalendar,W=Oe(F)||ne.defaultWeekSettings;return new Gt($,H,V,W,j)}static resetCache(){Pt=null,Ot.clear(),Dt.clear(),Rt.clear(),Mt.clear(),xt.clear()}static fromObject({locale:k,numberingSystem:B,outputCalendar:U,weekSettings:F}={}){return Gt.create(k,B,U,F)}constructor(k,B,U,F,G){const[j,$,H]=function(k){const B=k.indexOf("-x-");-1!==B&&(k=k.substring(0,B));const U=k.indexOf("-u-");if(-1===U)return[k];{let B,F;try{B=It(k).resolvedOptions(),F=k}catch(e){const j=k.substring(0,U);B=It(j).resolvedOptions(),F=j}const{numberingSystem:G,calendar:j}=B;return[F,G,j]}}(k);this.locale=j,this.numberingSystem=B||$||null,this.outputCalendar=U||H||null,this.weekSettings=F,this.intl=function(k,B,U){return U||B?(k.includes("-u-")||(k+="-u"),U&&(k+=`-ca-${U}`),B&&(k+=`-nu-${B}`),k):k}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=G,this.fastNumbersCached=null}get fastNumbers(){var k;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(k=this).numberingSystem||"latn"===k.numberingSystem)&&("latn"===k.numberingSystem||!k.locale||k.locale.startsWith("en")||"latn"===Nt(k.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const k=this.isEnglish(),B=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return k&&B?"en":"intl"}clone(k){return k&&0!==Object.getOwnPropertyNames(k).length?Gt.create(k.locale||this.specifiedLocale,k.numberingSystem||this.numberingSystem,k.outputCalendar||this.outputCalendar,Oe(k.weekSettings)||this.weekSettings,k.defaultToEN||!1):this}redefaultToEN(k={}){return this.clone({...k,defaultToEN:!0})}redefaultToSystem(k={}){return this.clone({...k,defaultToEN:!1})}months(k,B=!1){return Lt(this,k,Qe,(()=>{const U="ja"===this.intl||this.intl.startsWith("ja-"),F=(B&=!U)?{month:k,day:"numeric"}:{month:k},G=B?"format":"standalone";if(!this.monthsCache[G][k]){const B=U?k=>this.dtFormatter(k,F).format():k=>this.extract(k,F,"month");this.monthsCache[G][k]=function(k){const B=[];for(let U=1;U<=12;U++){const F=en.utc(2009,U,1);B.push(k(F))}return B}(B)}return this.monthsCache[G][k]}))}weekdays(k,B=!1){return Lt(this,k,ti,(()=>{const U=B?{weekday:k,year:"numeric",month:"long",day:"numeric"}:{weekday:k},F=B?"format":"standalone";return this.weekdaysCache[F][k]||(this.weekdaysCache[F][k]=function(k){const B=[];for(let U=1;U<=7;U++){const F=en.utc(2016,11,13+U);B.push(k(F))}return B}((k=>this.extract(k,U,"weekday")))),this.weekdaysCache[F][k]}))}meridiems(){return Lt(this,void 0,(()=>ei),(()=>{if(!this.meridiemCache){const k={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[en.utc(2016,11,13,9),en.utc(2016,11,13,19)].map((B=>this.extract(B,k,"dayperiod")))}return this.meridiemCache}))}eras(k){return Lt(this,k,ai,(()=>{const B={era:k};return this.eraCache[k]||(this.eraCache[k]=[en.utc(-40,1,1),en.utc(2017,1,1)].map((k=>this.extract(k,B,"era")))),this.eraCache[k]}))}extract(k,B,U){const F=this.dtFormatter(k,B).formatToParts().find((k=>k.type.toLowerCase()===U));return F?F.value:null}numberFormatter(k={}){return new kt(this.intl,k.forceSimple||this.fastNumbers,k)}dtFormatter(k,B={}){return new Bt(k,this.intl,B)}relFormatter(k={}){return new Ut(this.intl,this.isEnglish(),k)}listFormatter(k={}){return function(k,B={}){const U=JSON.stringify([k,B]);let F=Ct[U];return F||(F=new Intl.ListFormat(k,B),Ct[U]=F),F}(this.intl,k)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||Nt(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Se()?function(k){let B=xt.get(k);if(!B){const U=new Intl.Locale(k);B="getWeekInfo"in U?U.getWeekInfo():U.weekInfo,"minimalDays"in B||(B={...Ft,...B}),xt.set(k,B)}return B}(this.locale):Ft}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(k){return this.locale===k.locale&&this.numberingSystem===k.numberingSystem&&this.outputCalendar===k.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let jt=null;class $t extends yt{static get utcInstance(){return null===jt&&(jt=new $t(0)),jt}static instance(k){return 0===k?$t.utcInstance:new $t(k)}static parseSpecifier(k){if(k){const B=k.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(B)return new $t($e(B[1],B[2]))}return null}constructor(k){super(),this.fixed=k}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${We(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${We(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(k,B){return We(this.fixed,B)}get isUniversal(){return!0}offset(){return this.fixed}equals(k){return"fixed"===k.type&&k.fixed===this.fixed}get isValid(){return!0}}class Ht extends yt{constructor(k){super(),this.zoneName=k}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Vt(k,B){if(_e(k)||null===k)return B;if(k instanceof yt)return k;if("string"==typeof k){const U=k.toLowerCase();return"default"===U?B:"local"===U||"system"===U?Et.instance:"utc"===U||"gmt"===U?$t.utcInstance:$t.parseSpecifier(U)||At.create(k)}return Ee(k)?$t.instance(k):"object"==typeof k&&"offset"in k&&"function"==typeof k.offset?k:new Ht(k)}const Wt={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},qt={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Kt=Wt.hanidec.replace(/[\[|\]]/g,"").split("");const zt=new Map;function Yt({numberingSystem:k},B=""){const U=k||"latn";let F=zt.get(U);void 0===F&&(F=new Map,zt.set(U,F));let G=F.get(B);return void 0===G&&(G=new RegExp(`${Wt[U]}${B}`),F.set(B,G)),G}let Qt,Xt=()=>Date.now(),Zt="system",Jt=null,te=null,ee=null,ie=60,se=null;class ne{static get now(){return Xt}static set now(k){Xt=k}static set defaultZone(k){Zt=k}static get defaultZone(){return Vt(Zt,Et.instance)}static get defaultLocale(){return Jt}static set defaultLocale(k){Jt=k}static get defaultNumberingSystem(){return te}static set defaultNumberingSystem(k){te=k}static get defaultOutputCalendar(){return ee}static set defaultOutputCalendar(k){ee=k}static get defaultWeekSettings(){return se}static set defaultWeekSettings(k){se=Oe(k)}static get twoDigitCutoffYear(){return ie}static set twoDigitCutoffYear(k){ie=k%100}static get throwOnInvalid(){return Qt}static set throwOnInvalid(k){Qt=k}static resetCaches(){Gt.resetCache(),At.resetCache(),en.resetCache(),zt.clear()}}class ae{constructor(k,B){this.reason=k,this.explanation=B}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const re=[0,31,59,90,120,151,181,212,243,273,304,334],oe=[0,31,60,91,121,152,182,213,244,274,305,335];function he(k,B){return new ae("unit out of range",`you specified ${B} (of type ${typeof B}) as a ${k}, which is invalid`)}function ce(k,B,U){const F=new Date(Date.UTC(k,B-1,U));k<100&&k>=0&&F.setUTCFullYear(F.getUTCFullYear()-1900);const G=F.getUTCDay();return 0===G?7:G}function de(k,B,U){return U+(xe(k)?oe:re)[B-1]}function le(k,B){const U=xe(k)?oe:re,F=U.findIndex((k=>kFe(F,B,U)?(V=F+1,W=1):V=F,{weekYear:V,weekNumber:W,weekday:H,...qe(k)}}function be(k,B=4,U=1){const{weekYear:F,weekNumber:G,weekday:j}=k,$=ue(ce(F,1,B),U),H=Le(F);let V,W=7*G+j-$-7+B;W<1?(V=F-1,W+=Le(V)):W>H?(V=F+1,W-=Le(F)):V=F;const{month:q,day:K}=le(V,W);return{year:V,month:q,day:K,...qe(k)}}function pe(k){const{year:B,month:U,day:F}=k;return{year:B,ordinal:de(B,U,F),...qe(k)}}function ve(k){const{year:B,ordinal:U}=k,{month:F,day:G}=le(B,U);return{year:B,month:F,day:G,...qe(k)}}function ge(k,B){if(!_e(k.localWeekday)||!_e(k.localWeekNumber)||!_e(k.localWeekYear)){if(!_e(k.weekday)||!_e(k.weekNumber)||!_e(k.weekYear))throw new V("Cannot mix locale-based week fields with ISO-based week fields");return _e(k.localWeekday)||(k.weekday=k.localWeekday),_e(k.localWeekNumber)||(k.weekNumber=k.localWeekNumber),_e(k.localWeekYear)||(k.weekYear=k.localWeekYear),delete k.localWeekday,delete k.localWeekNumber,delete k.localWeekYear,{minDaysInFirstWeek:B.getMinDaysInFirstWeek(),startOfWeek:B.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function me(k){const B=we(k.year),U=Ie(k.month,1,12),F=Ie(k.day,1,ke(k.year,k.month));return B?U?!F&&he("day",k.day):he("month",k.month):he("year",k.year)}function ye(k){const{hour:B,minute:U,second:F,millisecond:G}=k,j=Ie(B,0,23)||24===B&&0===U&&0===F&&0===G,$=Ie(U,0,59),H=Ie(F,0,59),V=Ie(G,0,999);return j?$?H?!V&&he("millisecond",G):he("second",F):he("minute",U):he("hour",B)}function _e(k){return void 0===k}function Ee(k){return"number"==typeof k}function we(k){return"number"==typeof k&&k%1==0}function Te(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function Se(){try{return"undefined"!=typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Ae(k,B,U){if(0!==k.length)return k.reduce(((k,F)=>{const G=[B(F),F];return k&&U(k[0],G[0])===k[0]?k:G}),null)[1]}function Ce(k,B){return Object.prototype.hasOwnProperty.call(k,B)}function Oe(k){if(null==k)return null;if("object"!=typeof k)throw new q("Week settings must be an object");if(!Ie(k.firstDay,1,7)||!Ie(k.minimalDays,1,7)||!Array.isArray(k.weekend)||k.weekend.some((k=>!Ie(k,1,7))))throw new q("Invalid week settings");return{firstDay:k.firstDay,minimalDays:k.minimalDays,weekend:Array.from(k.weekend)}}function Ie(k,B,U){return we(k)&&k>=B&&k<=U}function De(k,B=2){let U;return U=k<0?"-"+(""+-k).padStart(B,"0"):(""+k).padStart(B,"0"),U}function Re(k){return _e(k)||null===k||""===k?void 0:parseInt(k,10)}function Pe(k){return _e(k)||null===k||""===k?void 0:parseFloat(k)}function Me(k){if(!_e(k)&&null!==k&&""!==k){const B=1e3*parseFloat("0."+k);return Math.floor(B)}}function Ne(k,B,U="round"){const F=10**B;switch(U){case"expand":return k>0?Math.ceil(k*F)/F:Math.floor(k*F)/F;case"trunc":return Math.trunc(k*F)/F;case"round":return Math.round(k*F)/F;case"floor":return Math.floor(k*F)/F;case"ceil":return Math.ceil(k*F)/F;default:throw new RangeError(`Value rounding ${U} is out of range`)}}function xe(k){return k%4==0&&(k%100!=0||k%400==0)}function Le(k){return xe(k)?366:365}function ke(k,B){const U=function(k,B){return k-B*Math.floor(k/B)}(B-1,12)+1;return 2===U?xe(k+(B-U)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][U-1]}function Be(k){let B=Date.UTC(k.year,k.month-1,k.day,k.hour,k.minute,k.second,k.millisecond);return k.year<100&&k.year>=0&&(B=new Date(B),B.setUTCFullYear(k.year,k.month-1,k.day)),+B}function Ue(k,B,U){return-ue(ce(k,1,B),U)+B-1}function Fe(k,B=4,U=1){const F=Ue(k,B,U),G=Ue(k+1,B,U);return(Le(k)-F+G)/7}function Ge(k){return k>99?k:k>ne.twoDigitCutoffYear?1900+k:2e3+k}function je(k,B,U,F=null){const G=new Date(k),j={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};F&&(j.timeZone=F);const $={timeZoneName:B,...j},H=new Intl.DateTimeFormat(U,$).formatToParts(G).find((k=>"timezonename"===k.type.toLowerCase()));return H?H.value:null}function $e(k,B){let U=parseInt(k,10);Number.isNaN(U)&&(U=0);const F=parseInt(B,10)||0;return 60*U+(U<0||Object.is(U,-0)?-F:F)}function He(k){const B=Number(k);if("boolean"==typeof k||""===k||!Number.isFinite(B))throw new q(`Invalid unit value ${k}`);return B}function Ve(k,B){const U={};for(const F in k)if(Ce(k,F)){const G=k[F];if(null==G)continue;U[B(F)]=He(G)}return U}function We(k,B){const U=Math.trunc(Math.abs(k/60)),F=Math.trunc(Math.abs(k%60)),G=k>=0?"+":"-";switch(B){case"short":return`${G}${De(U,2)}:${De(F,2)}`;case"narrow":return`${G}${U}${F>0?`:${F}`:""}`;case"techie":return`${G}${De(U,2)}${De(F,2)}`;default:throw new RangeError(`Value format ${B} is out of range for property format`)}}function qe(k){return function(k,B){return B.reduce(((B,U)=>(B[U]=k[U],B)),{})}(k,["hour","minute","second","millisecond"])}const Ke=["January","February","March","April","May","June","July","August","September","October","November","December"],ze=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ye=["J","F","M","A","M","J","J","A","S","O","N","D"];function Qe(k){switch(k){case"narrow":return[...Ye];case"short":return[...ze];case"long":return[...Ke];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Xe=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ze=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Je=["M","T","W","T","F","S","S"];function ti(k){switch(k){case"narrow":return[...Je];case"short":return[...Ze];case"long":return[...Xe];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const ei=["AM","PM"],ii=["Before Christ","Anno Domini"],si=["BC","AD"],ni=["B","A"];function ai(k){switch(k){case"narrow":return[...ni];case"short":return[...si];case"long":return[...ii];default:return null}}function ri(k,B){let U="";for(const F of k)F.literal?U+=F.val:U+=B(F.val);return U}const oi={D:X,DD:Z,DDD:tt,DDDD:et,t:it,tt:st,ttt:nt,tttt:at,T:rt,TT:ot,TTT:ht,TTTT:ct,f:dt,ff:ut,fff:pt,ffff:gt,F:lt,FF:ft,FFF:vt,FFFF:mt};class hi{static create(k,B={}){return new hi(k,B)}static parseFormat(k){let B=null,U="",F=!1;const G=[];for(let j=0;j0||F)&&G.push({literal:F||/^\s+$/.test(U),val:""===U?"'":U}),B=null,U="",F=!F):F||$===B?U+=$:(U.length>0&&G.push({literal:/^\s+$/.test(U),val:U}),U=$,B=$)}return U.length>0&&G.push({literal:F||/^\s+$/.test(U),val:U}),G}static macroTokenToFormatOpts(k){return oi[k]}constructor(k,B){this.opts=B,this.loc=k,this.systemLoc=null}formatWithSystemDefault(k,B){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(k,{...this.opts,...B}).format()}dtFormatter(k,B={}){return this.loc.dtFormatter(k,{...this.opts,...B})}formatDateTime(k,B){return this.dtFormatter(k,B).format()}formatDateTimeParts(k,B){return this.dtFormatter(k,B).formatToParts()}formatInterval(k,B){return this.dtFormatter(k.start,B).dtf.formatRange(k.start.toJSDate(),k.end.toJSDate())}resolvedOptions(k,B){return this.dtFormatter(k,B).resolvedOptions()}num(k,B=0,U){if(this.opts.forceSimple)return De(k,B);const F={...this.opts};return B>0&&(F.padTo=B),U&&(F.signDisplay=U),this.loc.numberFormatter(F).format(k)}formatDateTimeFromString(k,B){const U="en"===this.loc.listingMode(),F=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,G=(B,U)=>this.loc.extract(k,B,U),j=B=>k.isOffsetFixed&&0===k.offset&&B.allowZ?"Z":k.isValid?k.zone.formatOffset(k.ts,B.format):"",$=()=>U?function(k){return ei[k.hour<12?0:1]}(k):G({hour:"numeric",hourCycle:"h12"},"dayperiod"),H=(B,F)=>U?function(k,B){return Qe(B)[k.month-1]}(k,B):G(F?{month:B}:{month:B,day:"numeric"},"month"),V=(B,F)=>U?function(k,B){return ti(B)[k.weekday-1]}(k,B):G(F?{weekday:B}:{weekday:B,month:"long",day:"numeric"},"weekday"),W=B=>{const U=hi.macroTokenToFormatOpts(B);return U?this.formatWithSystemDefault(k,U):B},q=B=>U?function(k,B){return ai(B)[k.year<0?0:1]}(k,B):G({era:B},"era");return ri(hi.parseFormat(B),(B=>{switch(B){case"S":return this.num(k.millisecond);case"u":case"SSS":return this.num(k.millisecond,3);case"s":return this.num(k.second);case"ss":return this.num(k.second,2);case"uu":return this.num(Math.floor(k.millisecond/10),2);case"uuu":return this.num(Math.floor(k.millisecond/100));case"m":return this.num(k.minute);case"mm":return this.num(k.minute,2);case"h":return this.num(k.hour%12==0?12:k.hour%12);case"hh":return this.num(k.hour%12==0?12:k.hour%12,2);case"H":return this.num(k.hour);case"HH":return this.num(k.hour,2);case"Z":return j({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return j({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return j({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return k.zone.offsetName(k.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return k.zone.offsetName(k.ts,{format:"long",locale:this.loc.locale});case"z":return k.zoneName;case"a":return $();case"d":return F?G({day:"numeric"},"day"):this.num(k.day);case"dd":return F?G({day:"2-digit"},"day"):this.num(k.day,2);case"c":return this.num(k.weekday);case"ccc":return V("short",!0);case"cccc":return V("long",!0);case"ccccc":return V("narrow",!0);case"E":return this.num(k.weekday);case"EEE":return V("short",!1);case"EEEE":return V("long",!1);case"EEEEE":return V("narrow",!1);case"L":return F?G({month:"numeric",day:"numeric"},"month"):this.num(k.month);case"LL":return F?G({month:"2-digit",day:"numeric"},"month"):this.num(k.month,2);case"LLL":return H("short",!0);case"LLLL":return H("long",!0);case"LLLLL":return H("narrow",!0);case"M":return F?G({month:"numeric"},"month"):this.num(k.month);case"MM":return F?G({month:"2-digit"},"month"):this.num(k.month,2);case"MMM":return H("short",!1);case"MMMM":return H("long",!1);case"MMMMM":return H("narrow",!1);case"y":return F?G({year:"numeric"},"year"):this.num(k.year);case"yy":return F?G({year:"2-digit"},"year"):this.num(k.year.toString().slice(-2),2);case"yyyy":return F?G({year:"numeric"},"year"):this.num(k.year,4);case"yyyyyy":return F?G({year:"numeric"},"year"):this.num(k.year,6);case"G":return q("short");case"GG":return q("long");case"GGGGG":return q("narrow");case"kk":return this.num(k.weekYear.toString().slice(-2),2);case"kkkk":return this.num(k.weekYear,4);case"W":return this.num(k.weekNumber);case"WW":return this.num(k.weekNumber,2);case"n":return this.num(k.localWeekNumber);case"nn":return this.num(k.localWeekNumber,2);case"ii":return this.num(k.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(k.localWeekYear,4);case"o":return this.num(k.ordinal);case"ooo":return this.num(k.ordinal,3);case"q":return this.num(k.quarter);case"qq":return this.num(k.quarter,2);case"X":return this.num(Math.floor(k.ts/1e3));case"x":return this.num(k.ts);default:return W(B)}}))}formatDurationFromString(k,B){const U="negativeLargestOnly"===this.opts.signMode?-1:1,F=k=>{switch(k[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},G=hi.parseFormat(B),j=G.reduce(((k,{literal:B,val:U})=>B?k:k.concat(U)),[]),$=k.shiftTo(...j.map(F).filter((k=>k)));return ri(G,((k,B)=>G=>{const j=F(G);if(j){const F=B.isNegativeDuration&&j!==B.largestUnit?U:1;let $;return $="negativeLargestOnly"===this.opts.signMode&&j!==B.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(k.get(j)*F,G.length,$)}return G})($,{isNegativeDuration:$<0,largestUnit:Object.keys($.values)[0]}))}}const ci=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function di(...k){const B=k.reduce(((k,B)=>k+B.source),"");return RegExp(`^${B}$`)}function li(...k){return B=>k.reduce((([k,U,F],G)=>{const[j,$,H]=G(B,F);return[{...k,...j},$||U,H]}),[{},null,1]).slice(0,2)}function ui(k,...B){if(null==k)return[null,null];for(const[U,F]of B){const B=U.exec(k);if(B)return F(B)}return[null,null]}function fi(...k){return(B,U)=>{const F={};let G;for(G=0;Gvoid 0!==k&&(B||k&&q)?-k:k;return[{years:z(Pe(U)),months:z(Pe(F)),weeks:z(Pe(G)),days:z(Pe(j)),hours:z(Pe($)),minutes:z(Pe(H)),seconds:z(Pe(V),"-0"===V),milliseconds:z(Me(W),K)}]}const Di={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ri(k,B,U,F,G,j,$){const H={year:2===B.length?Ge(Re(B)):Re(B),month:ze.indexOf(U)+1,day:Re(F),hour:Re(G),minute:Re(j)};return $&&(H.second=Re($)),k&&(H.weekday=k.length>3?Xe.indexOf(k)+1:Ze.indexOf(k)+1),H}const Pi=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Mi(k){const[,B,U,F,G,j,$,H,V,W,q,K]=k,z=Ri(B,G,F,U,j,$,H);let Y;return Y=V?Di[V]:W?0:$e(q,K),[z,new $t(Y)]}const Ni=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,xi=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Li=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function ki(k){const[,B,U,F,G,j,$,H]=k;return[Ri(B,G,F,U,j,$,H),$t.utcInstance]}function Bi(k){const[,B,U,F,G,j,$,H]=k;return[Ri(B,H,U,F,G,j,$),$t.utcInstance]}const Ui=di(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,gi),Fi=di(/(\d{4})-?W(\d\d)(?:-?(\d))?/,gi),Gi=di(/(\d{4})-?(\d{3})/,gi),ji=di(vi),$i=li((function(k,B){return[{year:wi(k,B),month:wi(k,B+1,1),day:wi(k,B+2,1)},null,B+3]}),Ti,Si,Ai),Hi=li(mi,Ti,Si,Ai),Vi=li(yi,Ti,Si,Ai),Wi=li(Ti,Si,Ai);const qi=li(Ti);const Ki=di(/(\d{4})-(\d\d)-(\d\d)/,Ei),zi=di(_i),Yi=li(Ti,Si,Ai);const Qi="Invalid Duration",Xi={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},Zi={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...Xi},Ji=365.2425,ts=30.436875,es={years:{quarters:4,months:12,weeks:52.1775,days:Ji,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:ts,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...Xi},is=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],ss=is.slice(0).reverse();function ns(k,B,U=!1){const F={values:U?B.values:{...k.values,...B.values||{}},loc:k.loc.clone(B.loc),conversionAccuracy:B.conversionAccuracy||k.conversionAccuracy,matrix:B.matrix||k.matrix};return new hs(F)}function as(k,B){let U=B.milliseconds??0;for(const F of ss.slice(1))B[F]&&(U+=B[F]*k[F].milliseconds);return U}function rs(k,B){const U=as(k,B)<0?-1:1;is.reduceRight(((F,G)=>{if(_e(B[G]))return F;if(F){const j=B[F]*U,$=k[G][F],H=Math.floor(j/$);B[G]+=H*U,B[F]-=H*$*U}return G}),null),is.reduce(((U,F)=>{if(_e(B[F]))return U;if(U){const G=B[U]%1;B[U]-=G,B[F]+=G*k[U][F]}return F}),null)}function os(k){const B={};for(const[U,F]of Object.entries(k))0!==F&&(B[U]=F);return B}class hs{constructor(k){const B="longterm"===k.conversionAccuracy||!1;let U=B?es:Zi;k.matrix&&(U=k.matrix),this.values=k.values,this.loc=k.loc||Gt.create(),this.conversionAccuracy=B?"longterm":"casual",this.invalid=k.invalid||null,this.matrix=U,this.isLuxonDuration=!0}static fromMillis(k,B){return hs.fromObject({milliseconds:k},B)}static fromObject(k,B={}){if(null==k||"object"!=typeof k)throw new q("Duration.fromObject: argument expected to be an object, got "+(null===k?"null":typeof k));return new hs({values:Ve(k,hs.normalizeUnit),loc:Gt.fromObject(B),conversionAccuracy:B.conversionAccuracy,matrix:B.matrix})}static fromDurationLike(k){if(Ee(k))return hs.fromMillis(k);if(hs.isDuration(k))return k;if("object"==typeof k)return hs.fromObject(k);throw new q(`Unknown duration argument ${k} of type ${typeof k}`)}static fromISO(k,B){const[U]=function(k){return ui(k,[Oi,Ii])}(k);return U?hs.fromObject(U,B):hs.invalid("unparsable",`the input "${k}" can't be parsed as ISO 8601`)}static fromISOTime(k,B){const[U]=function(k){return ui(k,[Ci,qi])}(k);return U?hs.fromObject(U,B):hs.invalid("unparsable",`the input "${k}" can't be parsed as ISO 8601`)}static invalid(k,B=null){if(!k)throw new q("need to specify a reason the Duration is invalid");const U=k instanceof ae?k:new ae(k,B);if(ne.throwOnInvalid)throw new H(U);return new hs({invalid:U})}static normalizeUnit(k){const B={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[k?k.toLowerCase():k];if(!B)throw new W(k);return B}static isDuration(k){return k&&k.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(k,B={}){const U={...B,floor:!1!==B.round&&!1!==B.floor};return this.isValid?hi.create(this.loc,U).formatDurationFromString(this,k):Qi}toHuman(k={}){if(!this.isValid)return Qi;const B=!1!==k.showZeros,U=is.map((U=>{const F=this.values[U];return _e(F)||0===F&&!B?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...k,unit:U.slice(0,-1)}).format(F)})).filter((k=>k));return this.loc.listFormatter({type:"conjunction",style:k.listStyle||"narrow",...k}).format(U)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let k="P";return 0!==this.years&&(k+=this.years+"Y"),0===this.months&&0===this.quarters||(k+=this.months+3*this.quarters+"M"),0!==this.weeks&&(k+=this.weeks+"W"),0!==this.days&&(k+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(k+="T"),0!==this.hours&&(k+=this.hours+"H"),0!==this.minutes&&(k+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(k+=Ne(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===k&&(k+="T0S"),k}toISOTime(k={}){if(!this.isValid)return null;const B=this.toMillis();if(B<0||B>=864e5)return null;k={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...k,includeOffset:!1};return en.fromMillis(B,{zone:"UTC"}).toISOTime(k)}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?as(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(k){if(!this.isValid)return this;const B=hs.fromDurationLike(k),U={};for(const F of is)(Ce(B.values,F)||Ce(this.values,F))&&(U[F]=B.get(F)+this.get(F));return ns(this,{values:U},!0)}minus(k){if(!this.isValid)return this;const B=hs.fromDurationLike(k);return this.plus(B.negate())}mapUnits(k){if(!this.isValid)return this;const B={};for(const U of Object.keys(this.values))B[U]=He(k(this.values[U],U));return ns(this,{values:B},!0)}get(k){return this[hs.normalizeUnit(k)]}set(k){if(!this.isValid)return this;return ns(this,{values:{...this.values,...Ve(k,hs.normalizeUnit)}})}reconfigure({locale:k,numberingSystem:B,conversionAccuracy:U,matrix:F}={}){return ns(this,{loc:this.loc.clone({locale:k,numberingSystem:B}),matrix:F,conversionAccuracy:U})}as(k){return this.isValid?this.shiftTo(k).get(k):NaN}normalize(){if(!this.isValid)return this;const k=this.toObject();return rs(this.matrix,k),ns(this,{values:k},!0)}rescale(){if(!this.isValid)return this;return ns(this,{values:os(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...k){if(!this.isValid)return this;if(0===k.length)return this;k=k.map((k=>hs.normalizeUnit(k)));const B={},U={},F=this.toObject();let G;for(const j of is)if(k.indexOf(j)>=0){G=j;let k=0;for(const B in U)k+=this.matrix[B][j]*U[B],U[B]=0;Ee(F[j])&&(k+=F[j]);const $=Math.trunc(k);B[j]=$,U[j]=(1e3*k-1e3*$)/1e3}else Ee(F[j])&&(U[j]=F[j]);for(const j in U)0!==U[j]&&(B[G]+=j===G?U[j]:U[j]/this.matrix[G][j]);return rs(this.matrix,B),ns(this,{values:B},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const k={};for(const B of Object.keys(this.values))k[B]=0===this.values[B]?0:-this.values[B];return ns(this,{values:k},!0)}removeZeros(){if(!this.isValid)return this;return ns(this,{values:os(this.values)},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(k){if(!this.isValid||!k.isValid)return!1;if(!this.loc.equals(k.loc))return!1;for(const F of is)if(B=this.values[F],U=k.values[F],!(void 0===B||0===B?void 0===U||0===U:B===U))return!1;var B,U;return!0}}const cs="Invalid Interval";class ds{constructor(k){this.s=k.start,this.e=k.end,this.invalid=k.invalid||null,this.isLuxonInterval=!0}static invalid(k,B=null){if(!k)throw new q("need to specify a reason the Interval is invalid");const U=k instanceof ae?k:new ae(k,B);if(ne.throwOnInvalid)throw new $(U);return new ds({invalid:U})}static fromDateTimes(k,B){const U=sn(k),F=sn(B),G=function(k,B){return k&&k.isValid?B&&B.isValid?Bk}isBefore(k){return!!this.isValid&&this.e<=k}contains(k){return!!this.isValid&&(this.s<=k&&this.e>k)}set({start:k,end:B}={}){return this.isValid?ds.fromDateTimes(k||this.s,B||this.e):this}splitAt(...k){if(!this.isValid)return[];const B=k.map(sn).filter((k=>this.contains(k))).sort(((k,B)=>k.toMillis()-B.toMillis())),U=[];let{s:F}=this,G=0;for(;F+this.e?this.e:k;U.push(ds.fromDateTimes(F,j)),F=j,G+=1}return U}splitBy(k){const B=hs.fromDurationLike(k);if(!this.isValid||!B.isValid||0===B.as("milliseconds"))return[];let U,{s:F}=this,G=1;const j=[];for(;Fk*G)));U=+k>+this.e?this.e:k,j.push(ds.fromDateTimes(F,U)),F=U,G+=1}return j}divideEqually(k){return this.isValid?this.splitBy(this.length()/k).slice(0,k):[]}overlaps(k){return this.e>k.s&&this.s=k.e)}equals(k){return!(!this.isValid||!k.isValid)&&(this.s.equals(k.s)&&this.e.equals(k.e))}intersection(k){if(!this.isValid)return this;const B=this.s>k.s?this.s:k.s,U=this.e=U?null:ds.fromDateTimes(B,U)}union(k){if(!this.isValid)return this;const B=this.sk.e?this.e:k.e;return ds.fromDateTimes(B,U)}static merge(k){const[B,U]=k.sort(((k,B)=>k.s-B.s)).reduce((([k,B],U)=>B?B.overlaps(U)||B.abutsStart(U)?[k,B.union(U)]:[k.concat([B]),U]:[k,U]),[[],null]);return U&&B.push(U),B}static xor(k){let B=null,U=0;const F=[],G=k.map((k=>[{time:k.s,type:"s"},{time:k.e,type:"e"}])),j=Array.prototype.concat(...G).sort(((k,B)=>k.time-B.time));for(const $ of j)U+="s"===$.type?1:-1,1===U?B=$.time:(B&&+B!=+$.time&&F.push(ds.fromDateTimes(B,$.time)),B=null);return ds.merge(F)}difference(...k){return ds.xor([this].concat(k)).map((k=>this.intersection(k))).filter((k=>k&&!k.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:cs}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(k=X,B={}){return this.isValid?hi.create(this.s.loc.clone(B),k).formatInterval(this):cs}toISO(k){return this.isValid?`${this.s.toISO(k)}/${this.e.toISO(k)}`:cs}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:cs}toISOTime(k){return this.isValid?`${this.s.toISOTime(k)}/${this.e.toISOTime(k)}`:cs}toFormat(k,{separator:B=" – "}={}){return this.isValid?`${this.s.toFormat(k)}${B}${this.e.toFormat(k)}`:cs}toDuration(k,B){return this.isValid?this.e.diff(this.s,k,B):hs.invalid(this.invalidReason)}mapEndpoints(k){return ds.fromDateTimes(k(this.s),k(this.e))}}class ls{static hasDST(k=ne.defaultZone){const B=en.now().setZone(k).set({month:12});return!k.isUniversal&&B.offset!==B.set({month:6}).offset}static isValidIANAZone(k){return At.isValidZone(k)}static normalizeZone(k){return Vt(k,ne.defaultZone)}static getStartOfWeek({locale:k=null,locObj:B=null}={}){return(B||Gt.create(k)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:k=null,locObj:B=null}={}){return(B||Gt.create(k)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:k=null,locObj:B=null}={}){return(B||Gt.create(k)).getWeekendDays().slice()}static months(k="long",{locale:B=null,numberingSystem:U=null,locObj:F=null,outputCalendar:G="gregory"}={}){return(F||Gt.create(B,U,G)).months(k)}static monthsFormat(k="long",{locale:B=null,numberingSystem:U=null,locObj:F=null,outputCalendar:G="gregory"}={}){return(F||Gt.create(B,U,G)).months(k,!0)}static weekdays(k="long",{locale:B=null,numberingSystem:U=null,locObj:F=null}={}){return(F||Gt.create(B,U,null)).weekdays(k)}static weekdaysFormat(k="long",{locale:B=null,numberingSystem:U=null,locObj:F=null}={}){return(F||Gt.create(B,U,null)).weekdays(k,!0)}static meridiems({locale:k=null}={}){return Gt.create(k).meridiems()}static eras(k="short",{locale:B=null}={}){return Gt.create(B,null,"gregory").eras(k)}static features(){return{relative:Te(),localeWeek:Se()}}}function us(k,B){const U=k=>k.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),F=U(B)-U(k);return Math.floor(hs.fromMillis(F).as("days"))}function fs(k,B,U,F){let[G,j,$,H]=function(k,B,U){const F=[["years",(k,B)=>B.year-k.year],["quarters",(k,B)=>B.quarter-k.quarter+4*(B.year-k.year)],["months",(k,B)=>B.month-k.month+12*(B.year-k.year)],["weeks",(k,B)=>{const U=us(k,B);return(U-U%7)/7}],["days",us]],G={},j=k;let $,H;for(const[V,W]of F)U.indexOf(V)>=0&&($=V,G[V]=W(k,B),H=j.plus(G),H>B?(G[V]--,(k=j.plus(G))>B&&(H=k,G[V]--,k=j.plus(G))):k=H);return[k,G,H,$]}(k,B,U);const V=B-G,W=U.filter((k=>["hours","minutes","seconds","milliseconds"].indexOf(k)>=0));0===W.length&&($0?hs.fromMillis(V,F).shiftTo(...W).plus(q):q}function bs(k,B=(k=>k)){return{regex:k,deser:([k])=>B(function(k){let B=parseInt(k,10);if(isNaN(B)){B="";for(let U=0;U=U&&F<=G&&(B+=F-U)}}return parseInt(B,10)}return B}(k))}}const ps=`[ ${String.fromCharCode(160)}]`,vs=new RegExp(ps,"g");function gs(k){return k.replace(/\./g,"\\.?").replace(vs,ps)}function ms(k){return k.replace(/\./g,"").replace(vs," ").toLowerCase()}function ys(k,B){return null===k?null:{regex:RegExp(k.map(gs).join("|")),deser:([U])=>k.findIndex((k=>ms(U)===ms(k)))+B}}function _s(k,B){return{regex:k,deser:([,k,B])=>$e(k,B),groups:B}}function Es(k){return{regex:k,deser:([k])=>k}}const ws={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let Ts=null;function Ss(k,B){return Array.prototype.concat(...k.map((k=>function(k,B){if(k.literal)return k;const U=Os(hi.macroTokenToFormatOpts(k.val),B);return null==U||U.includes(void 0)?k:U}(k,B))))}class As{constructor(k,B){if(this.locale=k,this.format=B,this.tokens=Ss(hi.parseFormat(B),k),this.units=this.tokens.map((B=>function(k,B){const U=Yt(B),F=Yt(B,"{2}"),G=Yt(B,"{3}"),j=Yt(B,"{4}"),$=Yt(B,"{6}"),H=Yt(B,"{1,2}"),V=Yt(B,"{1,3}"),W=Yt(B,"{1,6}"),q=Yt(B,"{1,9}"),K=Yt(B,"{2,4}"),z=Yt(B,"{4,6}"),Y=k=>{return{regex:RegExp((B=k.val,B.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([k])=>k,literal:!0};var B},Q=(Q=>{if(k.literal)return Y(Q);switch(Q.val){case"G":return ys(B.eras("short"),0);case"GG":return ys(B.eras("long"),0);case"y":return bs(W);case"yy":return bs(K,Ge);case"yyyy":return bs(j);case"yyyyy":return bs(z);case"yyyyyy":return bs($);case"M":return bs(H);case"MM":return bs(F);case"MMM":return ys(B.months("short",!0),1);case"MMMM":return ys(B.months("long",!0),1);case"L":return bs(H);case"LL":return bs(F);case"LLL":return ys(B.months("short",!1),1);case"LLLL":return ys(B.months("long",!1),1);case"d":return bs(H);case"dd":return bs(F);case"o":return bs(V);case"ooo":return bs(G);case"HH":return bs(F);case"H":return bs(H);case"hh":return bs(F);case"h":return bs(H);case"mm":return bs(F);case"m":case"q":return bs(H);case"qq":return bs(F);case"s":return bs(H);case"ss":return bs(F);case"S":return bs(V);case"SSS":return bs(G);case"u":return Es(q);case"uu":return Es(H);case"uuu":return bs(U);case"a":return ys(B.meridiems(),0);case"kkkk":return bs(j);case"kk":return bs(K,Ge);case"W":return bs(H);case"WW":return bs(F);case"E":case"c":return bs(U);case"EEE":return ys(B.weekdays("short",!1),1);case"EEEE":return ys(B.weekdays("long",!1),1);case"ccc":return ys(B.weekdays("short",!0),1);case"cccc":return ys(B.weekdays("long",!0),1);case"Z":case"ZZ":return _s(new RegExp(`([+-]${H.source})(?::(${F.source}))?`),2);case"ZZZ":return _s(new RegExp(`([+-]${H.source})(${F.source})?`),2);case"z":return Es(/[a-z_+-/]{1,256}?/i);case" ":return Es(/[^\S\n\r]/);default:return Y(Q)}})(k)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return Q.token=k,Q}(B,k))),this.disqualifyingUnit=this.units.find((k=>k.invalidReason)),!this.disqualifyingUnit){const[k,B]=[`^${(U=this.units).map((k=>k.regex)).reduce(((k,B)=>`${k}(${B.source})`),"")}$`,U];this.regex=RegExp(k,"i"),this.handlers=B}var U}explainFromTokens(k){if(this.isValid){const[B,U]=function(k,B,U){const F=k.match(B);if(F){const k={};let B=1;for(const G in U)if(Ce(U,G)){const j=U[G],$=j.groups?j.groups+1:1;!j.literal&&j.token&&(k[j.token.val[0]]=j.deser(F.slice(B,B+$))),B+=$}return[F,k]}return[F,{}]}(k,this.regex,this.handlers),[F,G,j]=U?function(k){let B,U=null;return _e(k.z)||(U=At.create(k.z)),_e(k.Z)||(U||(U=new $t(k.Z)),B=k.Z),_e(k.q)||(k.M=3*(k.q-1)+1),_e(k.h)||(k.h<12&&1===k.a?k.h+=12:12===k.h&&0===k.a&&(k.h=0)),0===k.G&&k.y&&(k.y=-k.y),_e(k.u)||(k.S=Me(k.u)),[Object.keys(k).reduce(((B,U)=>{const F=(k=>{switch(k){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(U);return F&&(B[F]=k[U]),B}),{}),U,B]}(U):[null,null,void 0];if(Ce(U,"a")&&Ce(U,"H"))throw new V("Can't include meridiem when specifying 24-hour format");return{input:k,tokens:this.tokens,regex:this.regex,rawMatches:B,matches:U,result:F,zone:G,specificOffset:j}}return{input:k,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Cs(k,B,U){return new As(k,U).explainFromTokens(B)}function Os(k,B){if(!k)return null;const U=hi.create(B,k).dtFormatter((Ts||(Ts=en.fromMillis(1555555555555)),Ts)),F=U.formatToParts(),G=U.resolvedOptions();return F.map((B=>function(k,B,U){const{type:F,value:G}=k;if("literal"===F){const k=/^\s+$/.test(G);return{literal:!k,val:k?" ":G}}const j=B[F];let $=F;"hour"===F&&($=null!=B.hour12?B.hour12?"hour12":"hour24":null!=B.hourCycle?"h11"===B.hourCycle||"h12"===B.hourCycle?"hour12":"hour24":U.hour12?"hour12":"hour24");let H=ws[$];if("object"==typeof H&&(H=H[j]),H)return{literal:!1,val:H}}(B,k,G)))}const Is="Invalid DateTime",Ds=864e13;function Rs(k){return new ae("unsupported zone",`the zone "${k.name}" is not supported`)}function Ps(k){return null===k.weekData&&(k.weekData=fe(k.c)),k.weekData}function Ms(k){return null===k.localWeekData&&(k.localWeekData=fe(k.c,k.loc.getMinDaysInFirstWeek(),k.loc.getStartOfWeek())),k.localWeekData}function Ns(k,B){const U={ts:k.ts,zone:k.zone,c:k.c,o:k.o,loc:k.loc,invalid:k.invalid};return new en({...U,...B,old:U})}function xs(k,B,U){let F=k-60*B*1e3;const G=U.offset(F);if(B===G)return[F,B];F-=60*(G-B)*1e3;const j=U.offset(F);return G===j?[F,G]:[k-60*Math.min(G,j)*1e3,Math.max(G,j)]}function Ls(k,B){const U=new Date(k+=60*B*1e3);return{year:U.getUTCFullYear(),month:U.getUTCMonth()+1,day:U.getUTCDate(),hour:U.getUTCHours(),minute:U.getUTCMinutes(),second:U.getUTCSeconds(),millisecond:U.getUTCMilliseconds()}}function ks(k,B,U){return xs(Be(k),B,U)}function Bs(k,B){const U=k.o,F=k.c.year+Math.trunc(B.years),G=k.c.month+Math.trunc(B.months)+3*Math.trunc(B.quarters),j={...k.c,year:F,month:G,day:Math.min(k.c.day,ke(F,G))+Math.trunc(B.days)+7*Math.trunc(B.weeks)},$=hs.fromObject({years:B.years-Math.trunc(B.years),quarters:B.quarters-Math.trunc(B.quarters),months:B.months-Math.trunc(B.months),weeks:B.weeks-Math.trunc(B.weeks),days:B.days-Math.trunc(B.days),hours:B.hours,minutes:B.minutes,seconds:B.seconds,milliseconds:B.milliseconds}).as("milliseconds"),H=Be(j);let[V,W]=xs(H,U,k.zone);return 0!==$&&(V+=$,W=k.zone.offset(V)),{ts:V,o:W}}function Us(k,B,U,F,G,j){const{setZone:$,zone:H}=U;if(k&&0!==Object.keys(k).length||B){const F=B||H,G=en.fromObject(k,{...U,zone:F,specificOffset:j});return $?G:G.setZone(H)}return en.invalid(new ae("unparsable",`the input "${G}" can't be parsed as ${F}`))}function Fs(k,B,U=!0){return k.isValid?hi.create(Gt.create("en-US"),{allowZ:U,forceSimple:!0}).formatDateTimeFromString(k,B):null}function Gs(k,B,U){const F=k.c.year>9999||k.c.year<0;let G="";if(F&&k.c.year>=0&&(G+="+"),G+=De(k.c.year,F?6:4),"year"===U)return G;if(B){if(G+="-",G+=De(k.c.month),"month"===U)return G;G+="-"}else if(G+=De(k.c.month),"month"===U)return G;return G+=De(k.c.day),G}function js(k,B,U,F,G,j,$){let H=!U||0!==k.c.millisecond||0!==k.c.second,V="";switch($){case"day":case"month":case"year":break;default:if(V+=De(k.c.hour),"hour"===$)break;if(B){if(V+=":",V+=De(k.c.minute),"minute"===$)break;H&&(V+=":",V+=De(k.c.second))}else{if(V+=De(k.c.minute),"minute"===$)break;H&&(V+=De(k.c.second))}if("second"===$)break;!H||F&&0===k.c.millisecond||(V+=".",V+=De(k.c.millisecond,3))}return G&&(k.isOffsetFixed&&0===k.offset&&!j?V+="Z":k.o<0?(V+="-",V+=De(Math.trunc(-k.o/60)),V+=":",V+=De(Math.trunc(-k.o%60))):(V+="+",V+=De(Math.trunc(k.o/60)),V+=":",V+=De(Math.trunc(k.o%60)))),j&&(V+="["+k.zone.ianaName+"]"),V}const $s={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Hs={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Vs={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ws=["year","month","day","hour","minute","second","millisecond"],qs=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Ks=["year","ordinal","hour","minute","second","millisecond"];function zs(k){const B={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[k.toLowerCase()];if(!B)throw new W(k);return B}function Ys(k){switch(k.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return zs(k)}}function Qs(k,B){const U=Vt(B.zone,ne.defaultZone);if(!U.isValid)return en.invalid(Rs(U));const F=Gt.fromObject(B);let G,j;if(_e(k.year))G=ne.now();else{for(const U of Ws)_e(k[U])&&(k[U]=$s[U]);const B=me(k)||ye(k);if(B)return en.invalid(B);const F=function(k){if(void 0===Js&&(Js=ne.now()),"iana"!==k.type)return k.offset(Js);const B=k.name;let U=tn.get(B);return void 0===U&&(U=k.offset(Js),tn.set(B,U)),U}(U);[G,j]=ks(k,F,U)}return new en({ts:G,zone:U,loc:F,o:j})}function Xs(k,B,U){const F=!!_e(U.round)||U.round,G=_e(U.rounding)?"trunc":U.rounding,j=(k,j)=>{k=Ne(k,F||U.calendary?0:2,U.calendary?"round":G);return B.loc.clone(U).relFormatter(U).format(k,j)},$=F=>U.calendary?B.hasSame(k,F)?0:B.startOf(F).diff(k.startOf(F),F).get(F):B.diff(k,F).get(F);if(U.unit)return j($(U.unit),U.unit);for(const H of U.units){const k=$(H);if(Math.abs(k)>=1)return j(k,H)}return j(k>B?-0:0,U.units[U.units.length-1])}function Zs(k){let B,U={};return k.length>0&&"object"==typeof k[k.length-1]?(U=k[k.length-1],B=Array.from(k).slice(0,k.length-1)):B=Array.from(k),[U,B]}let Js;const tn=new Map;class en{constructor(k){const B=k.zone||ne.defaultZone;let U=k.invalid||(Number.isNaN(k.ts)?new ae("invalid input"):null)||(B.isValid?null:Rs(B));this.ts=_e(k.ts)?ne.now():k.ts;let F=null,G=null;if(!U){if(k.old&&k.old.ts===this.ts&&k.old.zone.equals(B))[F,G]=[k.old.c,k.old.o];else{const j=Ee(k.o)&&!k.old?k.o:B.offset(this.ts);F=Ls(this.ts,j),U=Number.isNaN(F.year)?new ae("invalid input"):null,F=U?null:F,G=U?null:j}}this._zone=B,this.loc=k.loc||Gt.create(),this.invalid=U,this.weekData=null,this.localWeekData=null,this.c=F,this.o=G,this.isLuxonDateTime=!0}static now(){return new en({})}static local(){const[k,B]=Zs(arguments),[U,F,G,j,$,H,V]=B;return Qs({year:U,month:F,day:G,hour:j,minute:$,second:H,millisecond:V},k)}static utc(){const[k,B]=Zs(arguments),[U,F,G,j,$,H,V]=B;return k.zone=$t.utcInstance,Qs({year:U,month:F,day:G,hour:j,minute:$,second:H,millisecond:V},k)}static fromJSDate(k,B={}){const U=(F=k,"[object Date]"===Object.prototype.toString.call(F)?k.valueOf():NaN);var F;if(Number.isNaN(U))return en.invalid("invalid input");const G=Vt(B.zone,ne.defaultZone);return G.isValid?new en({ts:U,zone:G,loc:Gt.fromObject(B)}):en.invalid(Rs(G))}static fromMillis(k,B={}){if(Ee(k))return k<-Ds||k>Ds?en.invalid("Timestamp out of range"):new en({ts:k,zone:Vt(B.zone,ne.defaultZone),loc:Gt.fromObject(B)});throw new q(`fromMillis requires a numerical input, but received a ${typeof k} with value ${k}`)}static fromSeconds(k,B={}){if(Ee(k))return new en({ts:1e3*k,zone:Vt(B.zone,ne.defaultZone),loc:Gt.fromObject(B)});throw new q("fromSeconds requires a numerical input")}static fromObject(k,B={}){k=k||{};const U=Vt(B.zone,ne.defaultZone);if(!U.isValid)return en.invalid(Rs(U));const F=Gt.fromObject(B),G=Ve(k,Ys),{minDaysInFirstWeek:j,startOfWeek:$}=ge(G,F),H=ne.now(),W=_e(B.specificOffset)?U.offset(H):B.specificOffset,q=!_e(G.ordinal),K=!_e(G.year),z=!_e(G.month)||!_e(G.day),Y=K||z,Q=G.weekYear||G.weekNumber;if((Y||q)&&Q)throw new V("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(z&&q)throw new V("Can't mix ordinal dates with month/day");const X=Q||G.weekday&&!Y;let Z,J,tt=Ls(H,W);X?(Z=qs,J=Hs,tt=fe(tt,j,$)):q?(Z=Ks,J=Vs,tt=pe(tt)):(Z=Ws,J=$s);let et=!1;for(const V of Z){_e(G[V])?G[V]=et?J[V]:tt[V]:et=!0}const it=(X?function(k,B=4,U=1){const F=we(k.weekYear),G=Ie(k.weekNumber,1,Fe(k.weekYear,B,U)),j=Ie(k.weekday,1,7);return F?G?!j&&he("weekday",k.weekday):he("week",k.weekNumber):he("weekYear",k.weekYear)}(G,j,$):q?function(k){const B=we(k.year),U=Ie(k.ordinal,1,Le(k.year));return B?!U&&he("ordinal",k.ordinal):he("year",k.year)}(G):me(G))||ye(G);if(it)return en.invalid(it);const st=X?be(G,j,$):q?ve(G):G,[nt,at]=ks(st,W,U),rt=new en({ts:nt,zone:U,o:at,loc:F});return G.weekday&&Y&&k.weekday!==rt.weekday?en.invalid("mismatched weekday",`you can't specify both a weekday of ${G.weekday} and a date of ${rt.toISO()}`):rt.isValid?rt:en.invalid(rt.invalid)}static fromISO(k,B={}){const[U,F]=function(k){return ui(k,[Ui,$i],[Fi,Hi],[Gi,Vi],[ji,Wi])}(k);return Us(U,F,B,"ISO 8601",k)}static fromRFC2822(k,B={}){const[U,F]=function(k){return ui(function(k){return k.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(k),[Pi,Mi])}(k);return Us(U,F,B,"RFC 2822",k)}static fromHTTP(k,B={}){const[U,F]=function(k){return ui(k,[Ni,ki],[xi,ki],[Li,Bi])}(k);return Us(U,F,B,"HTTP",B)}static fromFormat(k,B,U={}){if(_e(k)||_e(B))throw new q("fromFormat requires an input string and a format");const{locale:F=null,numberingSystem:G=null}=U,j=Gt.fromOpts({locale:F,numberingSystem:G,defaultToEN:!0}),[$,H,V,W]=function(k,B,U){const{result:F,zone:G,specificOffset:j,invalidReason:$}=Cs(k,B,U);return[F,G,j,$]}(j,k,B);return W?en.invalid(W):Us($,H,U,`format ${B}`,k,V)}static fromString(k,B,U={}){return en.fromFormat(k,B,U)}static fromSQL(k,B={}){const[U,F]=function(k){return ui(k,[Ki,$i],[zi,Yi])}(k);return Us(U,F,B,"SQL",k)}static invalid(k,B=null){if(!k)throw new q("need to specify a reason the DateTime is invalid");const U=k instanceof ae?k:new ae(k,B);if(ne.throwOnInvalid)throw new j(U);return new en({invalid:U})}static isDateTime(k){return k&&k.isLuxonDateTime||!1}static parseFormatForOpts(k,B={}){const U=Os(k,Gt.fromObject(B));return U?U.map((k=>k?k.val:null)).join(""):null}static expandFormat(k,B={}){return Ss(hi.parseFormat(k),Gt.fromObject(B)).map((k=>k.val)).join("")}static resetCache(){Js=void 0,tn.clear()}get(k){return this[k]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ps(this).weekYear:NaN}get weekNumber(){return this.isValid?Ps(this).weekNumber:NaN}get weekday(){return this.isValid?Ps(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Ms(this).weekday:NaN}get localWeekNumber(){return this.isValid?Ms(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Ms(this).weekYear:NaN}get ordinal(){return this.isValid?pe(this.c).ordinal:NaN}get monthShort(){return this.isValid?ls.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ls.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ls.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ls.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const k=864e5,B=6e4,U=Be(this.c),F=this.zone.offset(U-k),G=this.zone.offset(U+k),j=this.zone.offset(U-F*B),$=this.zone.offset(U-G*B);if(j===$)return[this];const H=U-j*B,V=U-$*B,W=Ls(H,j),q=Ls(V,$);return W.hour===q.hour&&W.minute===q.minute&&W.second===q.second&&W.millisecond===q.millisecond?[Ns(this,{ts:H}),Ns(this,{ts:V})]:[this]}get isInLeapYear(){return xe(this.year)}get daysInMonth(){return ke(this.year,this.month)}get daysInYear(){return this.isValid?Le(this.year):NaN}get weeksInWeekYear(){return this.isValid?Fe(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Fe(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(k={}){const{locale:B,numberingSystem:U,calendar:F}=hi.create(this.loc.clone(k),k).resolvedOptions(this);return{locale:B,numberingSystem:U,outputCalendar:F}}toUTC(k=0,B={}){return this.setZone($t.instance(k),B)}toLocal(){return this.setZone(ne.defaultZone)}setZone(k,{keepLocalTime:B=!1,keepCalendarTime:U=!1}={}){if((k=Vt(k,ne.defaultZone)).equals(this.zone))return this;if(k.isValid){let F=this.ts;if(B||U){const B=k.offset(this.ts),U=this.toObject();[F]=ks(U,B,k)}return Ns(this,{ts:F,zone:k})}return en.invalid(Rs(k))}reconfigure({locale:k,numberingSystem:B,outputCalendar:U}={}){return Ns(this,{loc:this.loc.clone({locale:k,numberingSystem:B,outputCalendar:U})})}setLocale(k){return this.reconfigure({locale:k})}set(k){if(!this.isValid)return this;const B=Ve(k,Ys),{minDaysInFirstWeek:U,startOfWeek:F}=ge(B,this.loc),G=!_e(B.weekYear)||!_e(B.weekNumber)||!_e(B.weekday),j=!_e(B.ordinal),$=!_e(B.year),H=!_e(B.month)||!_e(B.day),W=$||H,q=B.weekYear||B.weekNumber;if((W||j)&&q)throw new V("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(H&&j)throw new V("Can't mix ordinal dates with month/day");let K;G?K=be({...fe(this.c,U,F),...B},U,F):_e(B.ordinal)?(K={...this.toObject(),...B},_e(B.day)&&(K.day=Math.min(ke(K.year,K.month),K.day))):K=ve({...pe(this.c),...B});const[z,Y]=ks(K,this.o,this.zone);return Ns(this,{ts:z,o:Y})}plus(k){if(!this.isValid)return this;return Ns(this,Bs(this,hs.fromDurationLike(k)))}minus(k){if(!this.isValid)return this;return Ns(this,Bs(this,hs.fromDurationLike(k).negate()))}startOf(k,{useLocaleWeeks:B=!1}={}){if(!this.isValid)return this;const U={},F=hs.normalizeUnit(k);switch(F){case"years":U.month=1;case"quarters":case"months":U.day=1;case"weeks":case"days":U.hour=0;case"hours":U.minute=0;case"minutes":U.second=0;case"seconds":U.millisecond=0}if("weeks"===F)if(B){const k=this.loc.getStartOfWeek(),{weekday:B}=this;B=3&&(H+="T"),H+=js(this,$,B,U,F,G,j),H}toISODate({format:k="extended",precision:B="day"}={}){return this.isValid?Gs(this,"extended"===k,zs(B)):null}toISOWeekDate(){return Fs(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:k=!1,suppressSeconds:B=!1,includeOffset:U=!0,includePrefix:F=!1,extendedZone:G=!1,format:j="extended",precision:$="milliseconds"}={}){if(!this.isValid)return null;return $=zs($),(F&&Ws.indexOf($)>=3?"T":"")+js(this,"extended"===j,B,k,U,G,$)}toRFC2822(){return Fs(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Fs(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Gs(this,!0):null}toSQLTime({includeOffset:k=!0,includeZone:B=!1,includeOffsetSpace:U=!0}={}){let F="HH:mm:ss.SSS";return(B||k)&&(U&&(F+=" "),B?F+="z":k&&(F+="ZZ")),Fs(this,F,!0)}toSQL(k={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(k)}`:null}toString(){return this.isValid?this.toISO():Is}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(k={}){if(!this.isValid)return{};const B={...this.c};return k.includeConfig&&(B.outputCalendar=this.outputCalendar,B.numberingSystem=this.loc.numberingSystem,B.locale=this.loc.locale),B}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(k,B="milliseconds",U={}){if(!this.isValid||!k.isValid)return hs.invalid("created by diffing an invalid DateTime");const F={locale:this.locale,numberingSystem:this.numberingSystem,...U},G=(H=B,Array.isArray(H)?H:[H]).map(hs.normalizeUnit),j=k.valueOf()>this.valueOf(),$=fs(j?this:k,j?k:this,G,F);var H;return j?$.negate():$}diffNow(k="milliseconds",B={}){return this.diff(en.now(),k,B)}until(k){return this.isValid?ds.fromDateTimes(this,k):this}hasSame(k,B,U){if(!this.isValid)return!1;const F=k.valueOf(),G=this.setZone(k.zone,{keepLocalTime:!0});return G.startOf(B,U)<=F&&F<=G.endOf(B,U)}equals(k){return this.isValid&&k.isValid&&this.valueOf()===k.valueOf()&&this.zone.equals(k.zone)&&this.loc.equals(k.loc)}toRelative(k={}){if(!this.isValid)return null;const B=k.base||en.fromObject({},{zone:this.zone}),U=k.padding?thisk.valueOf()),Math.min)}static max(...k){if(!k.every(en.isDateTime))throw new q("max requires all arguments be DateTimes");return Ae(k,(k=>k.valueOf()),Math.max)}static fromFormatExplain(k,B,U={}){const{locale:F=null,numberingSystem:G=null}=U;return Cs(Gt.fromOpts({locale:F,numberingSystem:G,defaultToEN:!0}),k,B)}static fromStringExplain(k,B,U={}){return en.fromFormatExplain(k,B,U)}static buildFormatParser(k,B={}){const{locale:U=null,numberingSystem:F=null}=B,G=Gt.fromOpts({locale:U,numberingSystem:F,defaultToEN:!0});return new As(G,k)}static fromFormatParser(k,B,U={}){if(_e(k)||_e(B))throw new q("fromFormatParser requires an input string and a format parser");const{locale:F=null,numberingSystem:G=null}=U,j=Gt.fromOpts({locale:F,numberingSystem:G,defaultToEN:!0});if(!j.equals(B.locale))throw new q(`fromFormatParser called with a locale of ${j}, but the format parser was created for ${B.locale}`);const{result:$,zone:H,specificOffset:V,invalidReason:W}=B.explainFromTokens(k);return W?en.invalid(W):Us($,H,U,`format ${B.format}`,k,V)}static get DATE_SHORT(){return X}static get DATE_MED(){return Z}static get DATE_MED_WITH_WEEKDAY(){return J}static get DATE_FULL(){return tt}static get DATE_HUGE(){return et}static get TIME_SIMPLE(){return it}static get TIME_WITH_SECONDS(){return st}static get TIME_WITH_SHORT_OFFSET(){return nt}static get TIME_WITH_LONG_OFFSET(){return at}static get TIME_24_SIMPLE(){return rt}static get TIME_24_WITH_SECONDS(){return ot}static get TIME_24_WITH_SHORT_OFFSET(){return ht}static get TIME_24_WITH_LONG_OFFSET(){return ct}static get DATETIME_SHORT(){return dt}static get DATETIME_SHORT_WITH_SECONDS(){return lt}static get DATETIME_MED(){return ut}static get DATETIME_MED_WITH_SECONDS(){return ft}static get DATETIME_MED_WITH_WEEKDAY(){return bt}static get DATETIME_FULL(){return pt}static get DATETIME_FULL_WITH_SECONDS(){return vt}static get DATETIME_HUGE(){return gt}static get DATETIME_HUGE_WITH_SECONDS(){return mt}}function sn(k){if(en.isDateTime(k))return k;if(k&&k.valueOf&&Ee(k.valueOf()))return en.fromJSDate(k);if(k&&"object"==typeof k)return en.fromObject(k);throw new q(`Unknown datetime argument: ${k}, of type ${typeof k}`)}var nn,an,rn=U(62459),on=U(35120),hn=U(35488),cn=U(99625),dn=U(77938),ln=U(28085),un=U(88131),fn=U(15821);function bn(k){return(0,ln.Um)(k,nn)}function pn(k){const B=parseInt(k);return!isNaN(B)&&B>=1&&B<=31}function vn(k){const B=parseInt(k);return!isNaN(B)&&B>0}function gn(k){switch(k){case nn.Monday:return 1;case nn.Tuesday:return 2;case nn.Wednesday:return 3;case nn.Thursday:return 4;case nn.Friday:return 5;case nn.Saturday:return 6;case nn.Sunday:return 7;default:return 1}}function mn(k,B,U){var F,G;if(!function(k){if(!k||"string"!=typeof k)return!1;const B=k.toLocaleLowerCase().split(".");if(0===B.length||B.length>4)return!1;const[U,F,G,j]=B,$=(0,ln.Um)(U,an),H=(0,ln.Um)(U,nn);if(!$&&!H)return!1;if(1===B.length)return!0;if("every"!==F)return!1;if(3===B.length)return"other"===G||U===an.Daily&&vn(G)||U===an.Monthly&&pn(G)||U===an.Weekly&&(bn(G)||vn(G));if(U===an.Daily)return!1;const V="other"===G||vn(G),W=H&&!fn.A.isDefined(j)||U===an.Weekly&&bn(j)||U===an.Monthly&&pn(j);return V&&W}(k))return un.Q.error("invalid-pattern");const[j,$,H,V]=k.split("."),W=parseInt(null!=H?H:""),q=parseInt(null!=V?V:""),{hour:K,minute:z}=B,Y=U>=B?U:B,Q=Y.hour1){const k=12*(Y.year-B.year)+(Y.month-B.month),U=k%J;if(0===U&&Y.day===tt&&Q){X=Object.assign(Object.assign({},Y.toObject()),{hour:K,minute:z});break}const F=J-U;X=Object.assign(Object.assign({},B.plus({months:k+F}).toObject()),{day:tt,hour:K,minute:z})}else{if(Y.day===tt&&Q){X=Object.assign(Object.assign({},Y.toObject()),{hour:K,minute:z});break}if(Y.day=U.year&&fn.A.isDefined(J)&&J>0&&J<=12&&fn.A.isDefined(tt)&&(X=Object.assign(Object.assign({},X),{day:Math.min(null!==(G=en.local(Z,J).daysInMonth)&&void 0!==G?G:-1,tt)}));const et=en.fromObject(X);return et.isValid?un.Q.success(et):un.Q.error("invalid-pattern")}!function(k){k.Monday="monday",k.Tuesday="tuesday",k.Wednesday="wednesday",k.Thursday="thursday",k.Friday="friday",k.Saturday="saturday",k.Sunday="sunday"}(nn||(nn={})),function(k){k.Daily="daily",k.Weekly="weekly",k.Monthly="monthly"}(an||(an={}));var yn=U(40392),_n=U(73678),En=U(13956),wn=U(46784),Tn=U(41674),Sn=U(65050),An=U(36648),Cn=U(12596),On=U(80060),In=U(84415),Dn=U(87490);class Rn{static shouldShowFeaturedPetPopup(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;const B=on.q.instance.prodigy.gameContainer.get("db5-fb6e");if(!(yield B.meetsRequirements(72)))return!1;const U=yn.i.getZoneData(_n.A_.LAMPLIGHT);if(yn.i.isZoneLockedParams(U,B,on.q.instance.prodigy.classModeController.getInClassDisabledZones()))return!1;const F=this._featuredSpawnService.getCachedData();if(Rn.getMapName(F)===this._loggedInPlayer.player.data.zone)return!1;const G=In.a.getTimestampData(this.MODAL_NAME),j=rn.Aq$.isDefined(null==G?void 0:G.timestamp),$=!this._featuredSpawnService.isOnCooldown()&&this._featuredSpawnService.isActive();if(!j||rn.Aq$.isDefined(null==G?void 0:G.id)&&G.id!==(null==F?void 0:F.petId))return $;if(!rn.Aq$.isDefined(null==G?void 0:G.id)&&In.a.isFeatureReadyForNextInteraction(this.MODAL_NAME,0))return $;const H=Cn.R.parseDateToTimestamp(null==F?void 0:F.startDate);if((null==F?void 0:F.popupRecurrence)&&H){const B=null!==(k=null==G?void 0:G.timestamp)&&void 0!==k?k:0,U=mn(F.popupRecurrence,en.fromMillis(B),en.now());if(U.isSuccess()&&en.now()>=U.expect())return $}return!1}))}static openFeaturedPetPopup(k){var B,U;const F=this._featuredSpawnService.getCachedData();if(F){const G=on.q.instance.prodigy.gameContainer.get(rn.$Bt.LocalizationService),j=dn.t.getItem("pet",F.petId),$=Rn.getMapName(F);let H=new rn.I9Y(0,0);const[V,W]=$.split("-"),q=on.q.instance.prodigy.world.getZone(V).getMap(W).getDefaultSpawnPosition();q&&(H=new rn.I9Y(q.x,q.y));const K={TIME_LEFT_TEXT:this._featuredSpawnService.getTimeUntilExpiry(),RESCUE_TEXT:G.getText("FEATURED_PET_MODAL_DESCRIPTION",null!==(U=null===(B=null==j?void 0:j.data)||void 0===B?void 0:B.name)&&void 0!==U?U:""),PET_SPINE_GUID:F.petId.toString(),MAP_NAME:$,MAP_LOCATION:H},z=on.q.instance.prodigy.gameContainer.get("d0e-64fd");On.d.loadWithInjectedValuesAndDependenciesFromGUID(z,cn.l.FeaturedPetModal,K).then((B=>{In.a.saveTimestampData(this.MODAL_NAME,{id:F.petId});on.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:wn.B.FeaturedPetModal,interfaceType:Tn.Wm.Modal,instanceType:Sn.N.Interface,originType:Tn.$N.AutoSurfaced}),rn.Aq$.isDefined(k)&&B.onDestroy.addOnce(k)})).catch((k=>{rn.VyI.log("Error loading push notification permission prefab",rn.$bb.Error)}))}}static getMapName(k){var B,U;return null!==(U=null===(B=null==k?void 0:k.maps)||void 0===B?void 0:B[0])&&void 0!==U?U:this.SPAWN_MAP}}Rn.ELEMENT_TO_WIDGET_BG_MAP={[Dn.EElementType.Astral]:An.q.FeaturedPet_HUD_BG_Astral,[Dn.EElementType.Fire]:An.q.FeaturedPet_HUD_BG_Fire,[Dn.EElementType.Ice]:An.q.FeaturedPet_HUD_BG_Ice,[Dn.EElementType.Neutral]:An.q.FeaturedPet_HUD_BG_Physical,[Dn.EElementType.Physical]:An.q.FeaturedPet_HUD_BG_Physical,[Dn.EElementType.Plant]:An.q.FeaturedPet_HUD_BG_Plant,[Dn.EElementType.Shadow]:An.q.FeaturedPet_HUD_BG_Shadow,[Dn.EElementType.Storm]:An.q.FeaturedPet_HUD_BG_Storm,[Dn.EElementType.Water]:An.q.FeaturedPet_HUD_BG_Water},Rn.MODAL_NAME="FeaturedPetModal",Rn.SPAWN_MAP="lamplight-C3",(0,F.Cg)([(0,En.b)("a2e-a635"),(0,F.Sn)("design:type",hn.J)],Rn,"_featuredSpawnService",void 0),(0,F.Cg)([(0,En.b)("e20-0fb0"),(0,F.Sn)("design:type",Object)],Rn,"_loggedInPlayer",void 0)},56625:(k,B,U)=>{"use strict";U.d(B,{s:()=>$});var F=U(35120),G=U(5075),j=U(73678);class ${static canShowFtue(){const k=F.q.instance.prodigy.gameContainer.get("306-5359"),B=!F.q.instance.prodigy.notifications.isPaused(),U=k.hasCompletedTutorial(),j=k.justLeveled&&G.H.canShowEntryPopup();return B&&U&&!j&&!$.isOnBlockedQuest()}static isOnBlockedQuest(){const k=F.q.instance.prodigy.world.getCurrentZone(),B=F.q.instance.prodigy.world.getCurrentMapTag();return[{zoneId:j.A_.FOREST,questId:3,sequenceId:3,mapId:"B7"},{zoneId:j.A_.FOREST,questId:3,sequenceId:4,mapId:"B7"},{zoneId:j.A_.FOREST,questId:4,sequenceId:0,mapId:"B7"},{zoneId:j.A_.FOREST,questId:4,sequenceId:1,mapId:"B7"},{zoneId:j.A_.FOREST,questId:5,sequenceId:1,mapId:"B6"},{zoneId:j.A_.FOREST,questId:6,sequenceId:5,mapId:"D3"},{zoneId:j.A_.FOREST,questId:12,sequenceId:4,mapId:"D3"}].some((U=>{const G=F.q.instance.prodigy.world.getZone(U.zoneId);return k===U.zoneId&&B===U.mapId&&G.isOnSequence(U.questId,U.sequenceId)}))}}},6719:(k,B,U)=>{"use strict";U.d(B,{y:()=>j});var F=U(8674);var G=U(35120);class j extends class{static getAsset(k){return"string"==typeof k?k:k.atlas}static isImageSpecifierCompatible(k){return"string"==typeof k||"object"==typeof k&&null!==k&&"atlas"in k&&"frame"in k}}{static toInjectionParams(k){return"string"==typeof k?[k]:[k.atlas,k.frame]}static loadAssets(...k){return(0,F.sH)(this,void 0,void 0,(function*(){yield G.q.instance.prodigy.load.assetsAsPromise(k.map((k=>this.getAsset(k))))}))}}},87331:(k,B,U)=>{"use strict";U.d(B,{G:()=>F});class F{static shouldShowMemberLockIcon(k,B){if(("follow"===k.type||"mount"===k.type)&&1===k.data.member){return 1===B.backpack.getItem(k.type,k.ID).L}return!1}}},34612:(k,B,U)=>{"use strict";U.d(B,{F:()=>$});var F=U(90633),G=U(35120),j=U(3032);class ${static validateZoneProgressionType(){var k;const B=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=G.q.instance.prodigy.gameContainer.get("12f-4e29"),H=G.q.instance.prodigy.gameContainer.get("db5-fb6e");if(B.getQuestSystem("zoneUnlockType")!==j.p.ZoneUnlockedLinearCampaign){if(B.getLevel()<$.LOWEST_LEVEL_FIRST_ZONE_UNLOCK||H.meetsRequirementsDeprecated(12)||!0===(null===(k=null==B?void 0:B.difficultyUnlocks)||void 0===k?void 0:k.hard))return B.setQuestSystem("zoneUnlockType",j.p.ZoneUnlockedLinearCampaign),void U.completeBreadcrumb(F.B.FEATURE_ZONE_LOCK_CUTSCENE,F.B.BREADCRUMB_PUPPETMASTER_WORLD_MAP_SEQUENCE);B.setQuestSystem("zoneUnlockType",j.p.ZoneUnlockedLinearCampaign),U.resetBreadcrumb(F.B.FEATURE_ZONE_LOCK_CUTSCENE,F.B.BREADCRUMB_PUPPETMASTER_WORLD_MAP_SEQUENCE)}}static shouldShowLinearCampaignZoneLockTransition(){return!G.q.instance.prodigy.gameContainer.get("12f-4e29").isBreadcrumbComplete(F.B.FEATURE_ZONE_LOCK_CUTSCENE,F.B.BREADCRUMB_PUPPETMASTER_WORLD_MAP_SEQUENCE)}static activateLinearCampaignTransitionCutscene(){G.q.instance.prodigy.open.map({disableClose:!0,forceLock:[]}).activateLinearCampaignTransition()}}$.LOWEST_LEVEL_FIRST_ZONE_UNLOCK=25},17425:(k,B,U)=>{"use strict";U.d(B,{K:()=>K});var F=U(88022),G=U(85855),j=U(99625),$=U(51742),H=U(36648),V=U(56942),W=U(35120),q=U(91207);class K{static cacheAssets(k,B,U){for(let F=0;F{"use strict";U.d(B,{b:()=>F});class F{static mailHasGameMethod(k,B){var U;return(null===(U=k.gameMethod)||void 0===U?void 0:U.name)===B}static isSingleUse(k){return F.SINGLE_USE_MAIL_METHODS.some((B=>F.mailHasGameMethod(k,B)))}static isDebugMailData(k){return!0===(null==k?void 0:k.debug)}static isClientInsertedMail(k){return!k.id||null===k.id}static mergeSecureUnsecure(k,B){var U,F;const G=null!==(U=null==k?void 0:k.map((k=>({ID:k.id,type:k.type,N:k.quantity,isSecure:!0}))))&&void 0!==U?U:[],j=null!==(F=null==B?void 0:B.map((k=>({ID:k.id,type:k.type,N:k.quantity}))))&&void 0!==F?F:[];return G.concat(j)}}F.SINGLE_USE_MAIL_METHODS=["openGiftBox","openPromoPetEgg","singleUseGotItem"]},23748:(k,B,U)=>{"use strict";U.d(B,{z:()=>G});var F=U(62459);class G{static validateInt(k,B=0){if("number"!=typeof k){const U=parseInt(k,10);return Number.isNaN(U)?B:U}return Number.isNaN(k)?B:k}static getWorldPosition(k){let B=0,U=0;if(F.Aq$.isDefined(k)){B=k.position.x,U=k.position.y;let G=k.parent;for(;F.Aq$.isDefined(G);)B+=G.position.x,U+=G.position.y,G=G.parent}return{x:B,y:U}}static convertWorldToScreenPosition(k){let B=k.x,U=k.y;return F.i7d.main&&(B=B-F.i7d.main.GameObject.transform.worldPosition.x+F.i7d.main.viewportSize.getHalfWidth(),U=U-F.i7d.main.GameObject.transform.worldPosition.y+F.i7d.main.viewportSize.getHalfHeight()),{x:B,y:U}}static convertScreenToWorldPosition(k){let B=k.x,U=k.y;return F.i7d.main&&(B=B+F.i7d.main.GameObject.transform.worldPosition.x-F.i7d.main.viewportSize.getHalfWidth(),U=U+F.i7d.main.GameObject.transform.worldPosition.y-F.i7d.main.viewportSize.getHalfHeight()),{x:B,y:U}}static normalizeRange(k,B,U){return B>k?(U-k)/(B-k):B1?1:F,k+(B-k)*F}static roundToNearestMultiplier(k,B){return Math.round(k/B)*B}static ceilToNearestMultiplier(k,B){return 0===B?k:Math.ceil(k/B)*B}static selectRandomWeightedSelection(k){const B=k.reduce(((k,B)=>k+B),0);let U=Math.random()*B;for(let F=0;F{"use strict";U.d(B,{o:()=>Q});var F,G=U(8674),j=U(62459),$=U(95891),H=U(88022),V=U(50654),W=U(35120),q=U(34829),K=U(77938),z=U(24110),Y=U(23748);!function(k){k[k.UserID=0]="UserID",k[k.ClassID=1]="ClassID",k[k.Grade=2]="Grade"}(F||(F={}));class Q{static isEmptyObject(k){if(!j.Aq$.isDefined(k))return!0;for(const B in k)if(k.hasOwnProperty(B))return!1;return!0}static inTestGroups(k,B,U=Q.LANE_SIZE,G=Q.TOTAL_LANES,j=F.UserID){for(let F=0;FG-1||B<0)return j.VyI.log(`Lane ${B} is invalid for totalLanes ${G}`,j.$bb.Error),!1;switch($){case F.UserID:H=k.userID;break;case F.ClassID:H=Q.getLatestClassID(k.owners,k.playerTeachers,k.playerParents);break;case F.Grade:H=k.grade;break;default:return j.VyI.log(`Invalid type ${$}`,j.$bb.Error),!1}return j.Aq$.isDefined(H)?Math.floor(H/U)%G===B:(j.VyI.log(`Invalid ID being used. type = ${$} player = ${JSON.stringify(k)}`,j.$bb.Error),!1)}static getTestLane(k,B=Q.LANE_SIZE,U=Q.TOTAL_LANES,G=F.UserID){let $=null;const H=q.s.get("GameConstants.Features.SplitTests.DEBUG_LANE");if(j.Aq$.isDefined(H))return H;switch(G){case F.UserID:$=k.userID;break;case F.ClassID:$=Q.getLatestClassID(k.owners,k.playerTeachers,k.playerParents);break;case F.Grade:$=k.grade;break;default:return j.VyI.log(`Invalid type ${G}`,j.$bb.Error),-1}return j.Aq$.isDefined($)?Math.floor($/B)%U:(j.VyI.log(`Invalid ID being used. type = ${G} player = ${JSON.stringify(k)}`,j.$bb.Error),-1)}static getLatestClassID(k,B,U){let F=[],G=null,$=null,H=null;j.Aq$.isDefined(U)&&U.length>0&&(F=U),j.Aq$.isDefined(B)&&B.length>0&&(F=B);for(let j=0;jH.startDate)&&(H=G)}return j.Aq$.isDefined(H)?H.id:0}static highlightObjectOnLayer(k,B=0,U=0,F,G){const $=j.Aq$.isDefined(G)?G:F,V=$.addChild(W.q.instance.prodigy.create.sprite(B,U,H._.General_icons_json,"help"));return V.anchor.set(.5,1),j.Aq$.isDefined(F)&&(V.x+=Y.z.getWorldPosition(F).x-Y.z.getWorldPosition($).x,V.y+=Y.z.getWorldPosition(F).y-Y.z.getWorldPosition($).y),k.add.tween(V,this).to({y:V.y+25},400,j.GS3.Quadratic.InOut,!0,0,q.s.MAX_SAFE_INTEGER,!0),V}static isLevelLocked(k,B){return k.getLevel()0&&(j.cost=U?B.price:$[0].getAmount(),j.currency=null===(G=null===(F=K.t.getItem($[0].getType(),$[0].getID()))||void 0===F?void 0:F.data)||void 0===G?void 0:G.name)}return j}static isNumber(k){return!isNaN(parseFloat(k))&&isFinite(k)}static wrapPrefabForPixiObject(k,B){const U=new j._mx;U.layer="default",U.addComponent(j.dLy);return U.addComponent(z.B).getRootContainer().setParent(B),k.parent=U,U}static recursiveItemDrops(k){if(k.length>7){const B=k.slice(0,7);W.q.instance.prodigy.open.gotItem(B,this.recursiveItemDrops.bind(this,k.slice(7)))}else{if(!(k.length>0))return;W.q.instance.prodigy.open.gotItem(k)}}static wait(k){return(0,G.sH)(this,void 0,void 0,(function*(){return new Promise((B=>window.setTimeout(B,k)))}))}}Q.LANE_SIZE=1e3,Q.TOTAL_LANES=10},87392:(k,B,U)=>{"use strict";U.d(B,{f:()=>j});var F=U(95891),G=U(77938);class j{static getFilteredFirstNames(){return F.orderBy(G.t.getItemsWithFilter("name",(k=>0===k.data.type&&!k.data.deprecated)),["data.value"])}static getFullNameByID(k,B,U){var F,j,$,H,V,W,q,K,z,Y;const Q=null!==($=null===(j=null===(F=G.t.getItem("name",k))||void 0===F?void 0:F.data)||void 0===j?void 0:j.value)&&void 0!==$?$:"",X=null!==(W=null===(V=null===(H=G.t.getItem("name",B))||void 0===H?void 0:H.data)||void 0===V?void 0:V.value)&&void 0!==W?W:"",Z=null!==(z=null===(K=null===(q=G.t.getItem("name",U))||void 0===q?void 0:q.data)||void 0===K?void 0:K.value)&&void 0!==z?z:" ";return`${Q} ${X}${null===(Y=Z[0])||void 0===Y?void 0:Y.toLowerCase()}${Z.slice(1)}`.replace(/\s\s+/g," ").trim()}static getFilteredMiddleNames(){return G.t.getItemsWithFilter("name",(k=>1===k.data.type&&!k.data.deprecated))}static getFilteredLastNames(){return G.t.getItemsWithFilter("name",(k=>2===k.data.type&&!k.data.deprecated))}}},38920:(k,B,U)=>{"use strict";U.d(B,{Hk:()=>j,RL:()=>$,cC:()=>H});var F=U(62459);const G=[[1e6,"M"],[1e3,"k"]],j=(k,B=0,U=" ")=>null==k?void 0:k.toFixed(B).replace(/\B(?=(\d{3})+(?!\d))/g,U),$=(k,B)=>`${j(k)} / ${j(B)}`;function H(k,B=0){if(!F.Aq$.isDefined(k))return"?";let U=k,j="";const $=Math.log10(k);if($>B)for(const[F,W]of G)if(k>=F){U=k/F,j=W;break}let H=2;U%1<1/Math.pow(10,H)&&(H=1);const V=Math.log10(U)+H+j.length;return Math.floor(V)>Math.floor($)?k.toFixed(0):`${U.toFixed(H-1)}${j}`}},39938:(k,B,U)=>{"use strict";U.d(B,{n:()=>$});var F=U(62459),G=U(41170),j=U(40743);function $(k,B){(0,F.EVk)(`${B}StateManager`)(class extends j.r{set state(k){0}constructor(){super(),(0,F.gfw)(k)(this,"_state")}}),(0,F.EVk)(`${B}State`)(class extends G.A{constructor(){super(),(0,F.gfw)(k)(this,"state"),(0,F.gfw)(k)(this,"blendStates"),(0,F.SZi)()(this,"blendStates")}})}},24285:(k,B,U)=>{"use strict";U.d(B,{s:()=>G});var F=U(62459);class G{static resetCacheAsBitmap(k){k.cacheAsBitmap&&(k.cacheAsBitmap=!1,k.cacheAsBitmap=!0)}static cacheAsBitmap(k,B=!0){k&&(k.cacheAsBitmap=!1,k.cacheAsBitmap=B)}static setLayerCacheAsBitmap(k,B=!0){if(!F.wa5.getActiveScene().hasLayer(k))return void F.VyI.log(`Tried to set cacheAsBitmap on layer ${k} but it doesn't exist`,F.$bb.Warning);const U=F.wa5.getActiveScene().getLayer(k);U.cacheAsBitmap!==B&&(U.cacheAsBitmap=!1,U.cacheAsBitmap=B)}}},22023:(k,B,U)=>{"use strict";U.d(B,{O2:()=>it,tA:()=>nt,Tc:()=>st,P8:()=>Tt});var F=U(8674),G=U(87490),j=U(62459),$=U(95891),H=U.n($),V=U(62248),W=U(24521),q=U(56942),K=U(58182),z=U(77601);const Y=(0,z.gb)({key:"fab_remove_evolution_level_cap",activateAssociatedExperiments:0,default:!1});var Q=U(21574),X=U(50788),Z=U(37016),J=U(96989),tt=U(90156);const et=(0,z.gb)({key:"show-unique-pets",activateAssociatedExperiments:1,default:!1});var it,st,nt,at=U(90633),rt=U(35120),ot=U(34829),ht=U(23029),ct=U(77938),dt=U(39984),lt=U(50503),ut=U(15218),ft=U(17148),bt=U(55122),pt=U(12472),vt=U(76277),gt=U(63693),mt=U(6413),yt=U(43846),_t=U(68152),Et=U(14726),wt=U(30226);!function(k){k[k.GIFT_UNAVAILABLE=0]="GIFT_UNAVAILABLE",k[k.GIFT_AVAILABLE=1]="GIFT_AVAILABLE",k[k.GIFT_REDEEMED=2]="GIFT_REDEEMED"}(it||(it={})),function(k){k[k.None=0]="None",k[k.ShowEvolve=1]="ShowEvolve",k[k.ShowStaticEvolve=2]="ShowStaticEvolve",k[k.ShowUpgrade=3]="ShowUpgrade"}(st||(st={})),function(k){k[k.None=0]="None",k[k.NoOwnership=1]="NoOwnership",k[k.NoMerge=2]="NoMerge",k[k.NoPurchase=4]="NoPurchase",k[k.NoCapture=8]="NoCapture",k[k.NoEvolution=16]="NoEvolution",k[k.All=31]="All"}(nt||(nt={}));class Tt{static getPetEvolutionGiftThreshold(){const k=parseInt(rt.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("petEvolutionGiftThreshold"));return isNaN(k)?Tt.DEFAULT_PET_EVOLUTION_GIFT_THRESHOLD:k}static getEvolutionLVL(k){var B,U;if(ft.k.cachedDisabledEvolutionFeature)return;const F=null===(U=null===(B=null==k?void 0:k.data)||void 0===B?void 0:B.curve)||void 0===U?void 0:U.find((k=>k.evolveID));return null==F?void 0:F.lvl}static getEvolutionID(k){var B,U;if(ft.k.cachedDisabledEvolutionFeature)return;const F=null===(U=null===(B=null==k?void 0:k.data)||void 0===B?void 0:B.curve)||void 0===U?void 0:U.find((k=>k.evolveID));return null==F?void 0:F.evolveID}static hasEvolutionID(k,B){if(ft.k.cachedDisabledEvolutionFeature)return!1;return!!(null==B?void 0:B.data.curve.find((B=>B.evolveID===k)))}static findPreviousEvolution(k,B){return B.find((B=>this.hasEvolutionID(null==k?void 0:k.ID,B)))}static findNextEvolution(k){const B=this.getEvolutionID(k);return j.Aq$.isDefined(B)?ct.t.getItem("pet",B):null}static GetEvolutionaryLine(k){const B=ct.t.getCategoryItems("pet"),U=[k.ID];let F=this.findNextEvolution(k);for(;F;)U.push(F.ID),F=this.findNextEvolution(F);for(F=this.findPreviousEvolution(k,B);F;)U.unshift(F.ID),F=this.findPreviousEvolution(F,B);return U}static hasValidOrdinal(k){var B;return j.Aq$.isDefined(null===(B=k.data)||void 0===B?void 0:B.ordinal)&&k.data.ordinal>0}static isValidForPetBook(k){return this.hasValidOrdinal(k)&&this.isValidForUltimatesExperiment(k)}static isValidForUltimatesExperiment(k){const B=rt.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("ultimates"),U=this.isUltimate(k.ID);return!U||U&&B}static isUltimatesFollow(k){const B=ct.t.getItem("follow",k).metadata.petID;return this.isUltimate(B)}static isPetOnTeam(k){return j.Aq$.isDefined(k.team)}static getElementType(k){return k.data.affinity}static getPetDisplayName(k,B,U){var F;let G=null!==(F=null==B?void 0:B.nickname)&&void 0!==F?F:wt.J.getLocalizationNameKey({ID:k.ID,type:"pet"});return G=(0,yt.k)(G),j.Aq$.isDefined(U)&&G.length>U&&(G=`${G.substr(0,U)}...`),G}static canPlayerAccessPetMergeFeature(k){var B;if((0,vt.G)(X.J))return!0;return(null!=k?k:rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player).getLevel()>=(null!==(B=Q.g.config.minimumPlayerLevel)&&void 0!==B?B:0)}static getPetDisplayMergeRank(k,B){var U,F;if(Tt.canPlayerAccessPetMergeFeature()&&this.canPetAccessMergeRanks(k))return null!==(F=null===(U=rt.q.instance.prodigy.gameContainer.get("306-5359").kennel.getPetByUniqueID(B))||void 0===U?void 0:U.mergeRank)&&void 0!==F?F:Z.qd.MIN}static canPetAccessMergeRanks(k){const B=ht.R.loadData(W.r.PetOwnershipRestrictions_json),U=Array.from(new Set([...B.noOwnership,...B.noMerge]));return!(!(0,vt.G)(X.J)&&this.isPetEpic(+k)||U.includes(+k))}static getExcludedPetIDs(k){const B=ht.R.loadData(W.r.PetOwnershipRestrictions_json),U=[];k&nt.NoCapture&&U.push(...B.noCapture),k&nt.NoEvolution&&U.push(...B.noEvolution),k&nt.NoMerge&&U.push(...B.noMerge),k&nt.NoOwnership&&U.push(...B.noOwnership),k&nt.NoPurchase&&U.push(...B.noPurchase);return Array.from(new Set([...U]))}static getRequiredPetMergeIngredient(k,B){var U;if(!j.Aq$.isDefined(null===(U=null==k?void 0:k.data)||void 0===U?void 0:U.evolution))return;let F=k;if(J.Y.isMerge1Recipe(B)){if(k.data.evolution.tier===B.evolutionTier)return F;if(k.data.evolution.tier>B.evolutionTier){const B=ct.t.getCategoryItems("pet");F=Tt.findPreviousEvolution(k,B)}else k.data.evolution.tier=125&&k<=133||B&&this.isUltimate(k))}static isUltimate(k){return ht.R.loadData(W.r.UltimatesPetLocationConfig_json).ultimatesData.some((B=>B.id===+k))}static isPetStater(k){return mt.h.STARTER_PETS.includes(k)}static isPetEvolvedStarter(k){return mt.h.STARTER_PETS.map((k=>ct.t.getItem("pet",k))).map((k=>Tt.GetEvolutionaryLine(k))).reduce(((k,B)=>k.concat(B))).includes(k)}static isPetACrystalMonster(k){return mt.h.CRYSTAL_MONSTERS.includes(k)}static getPetLevel(k){return j.Aq$.isDefined(k.level)?j.cj9.clamp(k.level,1,bt.s.activePlayerLevelCap):1}static getPetChargedLevelCumulative(k){if(!Tt.isPetOnTeam(k))return Tt.getPetLevel(k);const B=rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return Tt.getPetLevel(k)+B.getChargedLevel()}static getPetsEffectiveLevel(k){var B;const U=ht.R.loadData(W.r.BattleRevampConstants_json).battleConstants,F=this.getPetChargedLevelCumulative(k)*(1+(null!==(B=k.mergeRank)&&void 0!==B?B:Z.qd.MIN)/U.divisors[G.EDivisor.MergeRank]);return Math.trunc(F)}static getTeamsEffectiveLevels(){return rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPetTeam(!1).map((k=>this.getPetsEffectiveLevel(k.data)))}static getPetMaxHealth(k,B){const U=ct.t.getItem("pet",k.ID);return lt.A.getHPFromParams(null!=B?B:Tt.getPetLevel(k),U.data.statHealth)}static getPetCurrentHealth(k){return j.Aq$.isDefined(null==k?void 0:k.hp)?k.hp:this.getPetMaxHealth(k)}static getAtlasElementBackerPath(k){return`pet-icon-backers/pet-icon-backers-${"plant"===k?"earth":k}`}static getAllOwnedPetsFromList(k){return rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPets().filter((B=>k.find((k=>B.ID===k.ID))))}static getAllOwnedPetsFromExcludeList(k){return rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPets().filter((B=>!k.some((k=>B.ID===k.ID))))}static ownsAllPetsFromList(k){const B=rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPets();return k.every((k=>B.some((B=>B.ID===k.ID))))}static ownsAllPetsFromZone(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=rt.q.instance.prodigy.gameContainer.get("fa6-b1fc"),U=yield B.getPetsInZone(k);return Tt.ownsAllPetsFromList(U)}))}static getAllOwnedEpicPetIDs(k=!0){const B=ot.A.get("GameConstants.Debug.OVERRIDE_OWNED_EPIC_IDS"),U=rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return null!=B?B:U.kennel.getPets().map((k=>k.ID)).filter(((B,U,F)=>Tt.isPetEpic(B,k)&&F.indexOf(B)===U))}static getAllOwnedUltimatePetIDs(){return rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPets().map((k=>k.ID)).filter(((k,B,U)=>Tt.isUltimate(k)&&U.indexOf(k)===B))}static getAllUltimatesPetData(){const k=ht.R.loadData(W.r.UltimatesPetLocationConfig_json),B=[];return k.ultimatesData.forEach((k=>{B.push({ID:k.id})})),B}static isUltimateLeavingSoon(k,B=Et.T.Week){return rt.q.instance.prodigy.gameContainer.get("a03-308f").getServerTimeMs()+B>=k.valueOf()}static getPetEvolutionType(k){let B=gt.Zj.Base;const U=ct.t.getItem("pet",k);if(!U)return j.VyI.log(`Pet ID ${k} could not be found`,j.$bb.Error),null;const F=this.GetEvolutionaryLine(U);return 1===F.length||F.forEach(((U,F)=>{U===k&&(B=`evolution${F+1}`)})),B}static getPetBench(k){var B,U,F,G;const j=ht.R.loadData(W.r.PetBenchVariationConfig_json).benchData,$=ct.t.getItem("pet",k);return j&&ut.A.useRevisedDifficulty?null!==(F=null!==(U=null===(B=j.find((B=>B.petID===k)))||void 0===B?void 0:B.bench)&&void 0!==U?U:$.data.bench)&&void 0!==F?F:[]:null!==(G=$.data.bench)&&void 0!==G?G:[]}static canPetEvolve(k,B){var U;if(ft.k.cachedDisabledEvolutionFeature)return!1;if((0,vt.G)(K.N)&&(null!==(U=k.data.evolutionCount)&&void 0!==U?U:0)>0)return!1;const F=k.getAvailableEvolutions(),G=B>=Tt.getPetEvolutionGiftThreshold(),j=F.length>0;return G&&j}static getEvolutionGiftState(k){const B=!rt.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(at.B.FEATURE_PET_EVOLUTION,at.B.BREADCRUMB_NONMEMBER_FIRST_PET_EVOLUTION);return k||B?it.GIFT_AVAILABLE:it.GIFT_REDEEMED}static getBattleStats(k,B,U,F=0){var G,$,V;const W=rt.q.instance.prodigy.gameContainer.get("306-5359");(0,_t.v)(k.data,`Pet ${k.ID} does not have data`);const q=dt.e.getBattleStats(k.data,B),K=H().mergeWith({},k.data.stats,q);if(!U)return K;const z=W.kennel.getPetByUniqueID(U);if(!z)return K;let Y=null!==(G=z.mergeRank)&&void 0!==G?G:Z.qd.MIN;Y=j.cj9.clamp(Y+F,Z.qd.MIN,Z.qd.MAX);const X=null!==(V=null===($=Q.g.config.statScalers)||void 0===$?void 0:$[Y])&&void 0!==V?V:{};if(X)for(const[j,H]of Object.entries(X))K[j]=Math.round(K[j]*H);return K}static getPetSpineId(k){var B,U,F;const G=ct.t.getItem("pet",k).metadata.assets;return j.Aq$.isDefined(G.default)&&"spine"===G.default.type?(null===(B=G.default)||void 0===B?void 0:B.assetKey)?q.Q[null===(U=G.default)||void 0===U?void 0:U.assetKey]:`spine-${null===(F=G.default)||void 0===F?void 0:F.ID}`:(j.VyI.log(`Could not retrieve spine asset data from pet Id: ${k}`,j.$bb.Error),null)}static getMaxOwnableLevel(k,B=Z.qd.MIN){var U,F;const G=ct.t.getItem("pet",k);if(ft.k.cachedDisabledEvolutionFeature){if(B===Z.qd.MAX)return bt.s.activePlayerLevelCap;const k=J.Y.getMerge2RecipeForPet(G.ID,G.data.rarity,B);return null!==(U=null==k?void 0:k.levelCap)&&void 0!==U?U:bt.s.activePlayerLevelCap}return(0,vt.G)(Y)?bt.s.activePlayerLevelCap:null!==(F=this.getEvolutionLVL(G))&&void 0!==F?F:bt.s.activePlayerLevelCap}static getAssetIdFromUniqueId(k){var B;return null===(B=rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPets().find((B=>B.uniqueID===k)))||void 0===B?void 0:B.ID}static getLevelFromUniqueId(k){var B;return null===(B=rt.q.instance.prodigy.gameContainer.get("e20-0fb0").player.kennel.getPets().find((B=>B.uniqueID===k)))||void 0===B?void 0:B.level}static getUpgradeSuggestion(k){const B=rt.q.instance.prodigy.gameContainer,U=B.get("5c7-e02d"),F=Tt.getPetLevel(k),G=F=$,W=U.canAfford(U.petAcquisitionCost(k.ID,V.l6.Evolution));return H?W?st.ShowEvolve:st.ShowStaticEvolve:G?st.ShowUpgrade:st.None}static createItemDataFromPet(k,B){const U=ct.t.getItem("pet",k);return{ID:k,hp:this.getPetMaxHealth(U,B)}}static isPetReadyToMerge(k){const B=Tt.getPetRecipeData(k);if(!j.Aq$.isDefined(B))return!1;return pt.r.getOwnedIngredientsForRecipe(k,(k=>ct.t.getItem("pet",k)),B).length>=B.ingredientCount}static getPetRecipeData(k,B){const U=ct.t.getItem("pet",k.ID),F=null!=B?B:k.mergeRank;return(0,vt.G)(X.J)?J.Y.getMerge2RecipeForPet(U.ID,U.data.rarity,F):J.Y.getRecipeForPet(U.data.evolution.totalEvos,F)}static sortPetList(k){const B=[k=>Tt.getPetLevel(k),k=>{var B;return null!==(B=k.mergeRank)&&void 0!==B?B:0},k=>ct.t.getItem("pet",k.ID).data.rarity,k=>ct.t.getItem("pet",k.ID).data.ordinal],U=["desc","desc","desc","asc"];return Tt.showUniquePetsFeature()&&(B.unshift((k=>!Tt.isPetEpic(k.ID,!0)&&Tt.isPetReadyToMerge(k))),U.unshift("desc")),H().orderBy(k,B,U)}static sortPetItems(k){return H().orderBy(k,[k=>k.data.ordinal],["asc"])}static getPrimaryPet(k,B){const U=B.filter((B=>B.ID===k));if(!(U.length<1))return 1===U.length?U[0]:H().orderBy(U,[k=>{var B;return null!==(B=k.mergeRank)&&void 0!==B?B:0},k=>k.level,k=>k.catchDate],["desc","desc","asc"])[0]}static filterPrimaryPets(k){if(!Tt.showUniquePetsFeature())return k;const B=H().uniq(k.map((k=>k.ID))),U=[];for(const F of B){const B=this.getPrimaryPet(F,k);B&&U.push(B)}return U}static showUniquePetsFeature(){return(0,vt.G)(et)&&(0,vt.G)(tt.m)}static canPetMerge(k){if(k.mergeRank>=Z.qd.MAX)return!1;const B=ct.t.getItem("pet",k.ID),U=(0,vt.G)(X.J),F=U?J.Y.getMerge2RecipeForPet(B.ID,B.data.rarity,k.mergeRank):J.Y.getRecipeForPet(B.data.evolution.totalEvos,k.mergeRank);if(!j.Aq$.isDefined(F))return!1;const G=pt.r.getOwnedIngredientsForRecipe(k,(k=>ct.t.getItem("pet",k)),F);return!(U&&k.level{"use strict";U.d(B,{E:()=>W});var F=U(95891),G=U.n(F),j=U(35120),$=U(82209),H=U(77938),V=U(129);class W{static renderFriendAndClassmateFace(k,B,U){const F=j.q.instance.prodigy.friendsListNetworkHandler.classList;let G=j.q.instance.prodigy.friendsListNetworkHandler.friendsList;G=G.concat(F);for(let $=0;${"use strict";U.d(B,{x:()=>H});var F=U(62459),G=U(35120),j=U(34829),$=U(91315);class H{static showErrorMessage(k){const B=G.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService),U=new $.p(G.q.instance.game,G.q.instance.prodigy.game.state.getCurrentState().stage);return U.preprocess(k,void 0,void 0),U.queuePostCreateCallback(U.setOkay.bind(U,B.getText("SETTINGS_LOGOUT"),null)),U.setCloseCallback((()=>{G.q.instance.prodigy.gameContainer.get("c97-bd0d").logout(!0)})),U}static showErrorMessageThenReturnToCurrentMap(){G.q.instance.prodigy.open.messageBoxPrefab({text:"STUCK_POPUP_TEXT",confirmCallback:()=>{G.q.instance.prodigy.world.teleportToCurrentMap()}})}static get arePopupsEnabled(){return j.A.get("GameConstants.Debug.POPUPS_ENABLED")&&!G.q.instance.prodigy.notifications.isPaused()&&!G.q.instance.prodigy.world.inRestrictedSocialZone(G.q.instance.prodigy.world.getCurrentZone())}}},80060:(k,B,U)=>{"use strict";U.d(B,{d:()=>$});var F=U(8674),G=U(62459),j=U(26004);class ${static loadWithInjectedValuesAndDependenciesFromGUID(k,B,U,F,j=!1){const $=new G._mx(F);$.addComponent(G.dLy);const H=$.addComponent(G.bE_);for(const G in U)H.Container.bind(G).toConstantValue(U[G]);const V=Object.keys(null!=U?U:{}).map((k=>({injectionName:k,data:U[k]})));return k.loadWithDependenciesFromGUID(B,$,j,V)}static preloadWithInjectedValuesAndDependenciesFromGUID(k,B,U,F=!1){const j=new G._mx;j.addComponent(G.dLy);const $=j.addComponent(G.bE_);for(const G in U)$.Container.bind(G).toConstantValue(U[G]);return k.preloadFromGUIDWithDependencies(B,F,this.getDataForInjection(U))}static getDataForInjection(k){return Object.keys(null!=k?k:{}).map((B=>({injectionName:B,data:k[B]})))}static loadWithInjectedValuesFromGUID(k,B,U,F){const j=new G._mx(F);j.addComponent(G.dLy);const $=j.addComponent(G.bE_);for(const G in U)$.Container.bind(G).toConstantValue(U[G]);const H=Object.keys(null!=U?U:{}).map((k=>({injectionName:k,data:U[k]})));return k.loadFromGUID(B,j,H)}static updateInjectedValues(k,B,U=!0){let F=k.findComponent(G.bE_);const $=!F;$&&(F=k.addComponent(G.bE_));for(const G in B)F.Container.rebind(G).toConstantValue(B[G]);let H=k.findComponentsInChildren(j.B,U);const V=Object.keys(B);H=H.filter((k=>V.includes(k.id)));for(const G of H)G.consumeOnUpdatedInjectedValue&&G.consume();$&&F.destroy()}static updateInjectedValuesWithDelay(k,B){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U=!0,F=0){yield G.Egh.timeout(F).then((()=>$.updateInjectedValues(k,B,U)))}))}}},19690:(k,B,U)=>{"use strict";U.d(B,{Ks:()=>j,mD:()=>G,vt:()=>$});var F=U(35120);const G=()=>F.q.instance.prodigy.icon,j=()=>F.q.instance.prodigy.gameContainer.get("d0e-64fd"),$=()=>F.q.instance.prodigy.create},20404:(k,B,U)=>{"use strict";U.d(B,{b:()=>j});var F=U(62459),G=U(77938);class j{static getQueryParameterByName(k,B=window.location.href){const U=new RegExp(`[?&]${k}(=([^&#]*)|&|#|$)`).exec(B);return U?U[2]?decodeURIComponent(U[2].replace(/\+/g," ")):"":null}static getQueryParameterAssetID(k,B){if(F.Aq$.isDefined(B)&&0!==B.length){const U=G.t.getCategoryItems("queryParameter").filter((U=>U.data.key===k&&new RegExp(U.data.value).test(B)));if(U.length>0)return U.length>1&&F.VyI.log("Multiple assetIDs found. Multiple assets for the same query parameter is not supported.",F.$bb.Warning),U[0].ID}}static isQueryParameterSetForSession(k){const B=G.t.getItem("queryParameter",k),U=B.data.key;return new RegExp(B.data.value).test(j.getQueryParameterByName(U))}static getQueryParameterKeyFromID(k){return G.t.getItem("queryParameter",k).data.key}}},76945:(k,B,U)=>{"use strict";U.d(B,{o:()=>H});var F=U(62459),G=U(95891),j=U(43924),$=U.n(j);class H{static integerInRange(k,B){return Math.floor(H.realInRange(k,B))}static realInRange(k,B,U){if(F.Aq$.isDefined(U)){return new F.bsf([U]).realInRange(k,B)}return Math.random()*(B-k)+k}static seededRandom(k){return $()(k.toString())()}static seededRange(k,B,U){return Math.floor(this.seededRandom(U)*(B-k+1)+k)}static normalDistribution(k,B){let U=0;for(let F=0;F<6;F++)U+=Math.random();return U/=6,k+U*(B-k+1)}static weightedArrayElement(k,B){let U=0;const j=[];if(!F.Aq$.isDefined(G.find(k,(k=>k.weight<=0)))&&k.length>0){const $=Math.round(1/(G.minBy(k,"weight").weight/100));for(let B=0;B{"use strict";U.d(B,{R:()=>$});var F=U(87490),G=U(62459),j=U(34829);class ${static applyRewardsScalar(k,B=1){return Math.ceil(k*B)}static addDebugMessage(k){this._debugBuffer.add(k)}static outputDebugMessages(){this._debugBuffer.flush()}static bucketRewards(k){let B=[];const U=new Map;return k.forEach((k=>{if("gold"===k.type||"currency"===k.type){let B=k.ID;"currency"===k.type&&1===k.ID?k.type="gold":"gold"===k.type&&(B=1),U.has(B)?U.get(B).push(k):U.set(B,[k])}else B.push(k)})),B=[...B,...Array.from(U.values()).map((k=>{var B;const U=k.reduce(((k,B)=>k+B.N),0);return $.addDebugMessage(`${k[0].type} ${null!==(B=k[0].ID)&&void 0!==B?B:""} with values [${k.map((k=>k.N)).join(", ")}] has been bucketed to ${U}`),Object.assign(Object.assign({},k[0]),{N:U})}))],B}static scaleRewards(k,B){return k.map((k=>{var U;if("gold"===k.type||"currency"===k.type){const F=$.applyRewardsScalar(k.N,B);return $.addDebugMessage(`Scaling ${k.type} ${null!==(U=k.ID)&&void 0!==U?U:""} from ${k.N} x ${B} = ${F}`),Object.assign(Object.assign({},k),{N:F})}return k}))}static bucketAndScaleRewards(k,B){const U=$.bucketRewards(k);return $.scaleRewards(U,B)}static shouldShowRewardsScalingWarning(k){return!!(G.Aq$.isDefined(k)&&G.Aq$.isDefined(k.rewardsScalar)&&G.Aq$.isDefined(k.levelDelta))&&(k.rewardsScalar<1&&k.levelDelta>=5)}}$._debugBuffer=new class{constructor(k,B=25,U=G.$bb.Info){this._buffer=[],this._typeListConstant="GameConstants.Debug.DISPLAY_CLIENT_DEBUG_MESSAGES",this._type=k,this._maxLength=B,this._logLevel=U}add(k){this.isSubscribed()&&(this._buffer.length>=this._maxLength&&this.flush(),this._buffer.push(k))}getBuffer(){return this._buffer.join("\n")}flush(){this.getBuffer();this.clear()}clear(){this._buffer=[]}isSubscribed(){const k=j.s.get(this._typeListConstant);return!!G.Aq$.isDefined(k)&&k.includes(this._type)}}(F.EDebugMessageType.RewardScaling)},92864:(k,B,U)=>{"use strict";U.d(B,{t:()=>G});var F=U(62459);class G{constructor(k){this.seed=k,this.currentSeed=k}next(){return this.currentSeed=this.currentSeed+G.CONSTANT,this.generate(this.currentSeed)}jumpFromStart(k){let B=0;for(let U=0;U<=k;U++)B=this.generate(this.seed+U*G.CONSTANT);return B}jump(k){let B=this.generate();for(let U=0;U{"use strict";U.d(B,{o:()=>G});var F=U(62459);function G(k){return class extends k{addListenerToSignal(k,B){k.add(B);this.OnDestroy.addOnce((()=>{k.remove(B)}))}addOneTimeListenerToSignal(k,B){k.addOnce(B);this.OnDestroy.addOnce((()=>{k.remove(B)}))}addListenerToObservable(k,B,U){k.addListener(B,U);this.OnDestroy.addOnce((()=>{k.removeListener(B,U)}))}addListenerToPromise(k,B,U){const G=this.createTidySignal();this.addOneTimeListenerToSignal(G,B),k.then((k=>{null==G||G.dispatch(k)})).catch(null!=U?U:F.RQr.createHandler)}createTidySignal(){const k=new F.HN0;return this.OnDestroy.addOnce((()=>{k.dispose()})),k}}}},67462:(k,B,U)=>{"use strict";U.d(B,{U:()=>F,x:()=>H});var F,G=U(62459),j=U(95891),$=U(77938);!function(k){k.Native="native",k.Foreign="foreign",k.Weapon="weapon",k.SpellRelic="spellRelic"}(F||(F={}));class H{static getSpellTierAtLevel(k,B){const U=j.sortBy(B);return j.sortedLastIndex(U,k)}static getNextTierSpell(k,B){let U=$.t.getItem("spell",k);for(let F=0;F{"use strict";U.d(B,{f:()=>$});var F=U(62459),G=U(68910),j=U(35120);class ${static resizeSpriteMaintainingAspectRatio(k,B,U){k.width>k.height?k.scale.x=k.scale.y=B/k.width:k.scale.x=k.scale.y=U/k.height}static trimTransparentPixels(k,B,U=0){if(!(null==k?void 0:k.texture))return k;const F=k.texture,j=F.frame,$=B.extract.pixels(k),H=Math.floor(k.width),V=Math.floor(k.height);if(!$||H<=1||V<=1)return k;let W=H,q=V,K=0,z=0;for(let G=0;GU&&(W=Math.min(W,k),K=Math.max(K,k),q=Math.min(q,G),z=Math.max(z,G))}if(W>K||q>z)return k;const Y=K-W+1,Q=z-q+1;if(0===W&&0===q&&Y===H&&Q===V)return k;const X=new G.Sprite(new G.Texture(F.baseTexture,new G.Rectangle(j.x+W,j.y+q,Y,Q)));return X.anchor.copyFrom(k.anchor),X.position.copyFrom(k.position),X.scale.copyFrom(k.scale),X.rotation=k.rotation,X.alpha=k.alpha,X.tint=k.tint,X}static getScaledTextureFromSpriteWithAspectRatio(k,B,U){let $=B,H=U;(!F.Aq$.isDefined(B)||!F.Aq$.isDefined(U)||B<=0||U<=0)&&(F.VyI.log("SpriteUtils: Invalid maxWidth or maxHeight provided for SpriteUtils#getScaledTextureFromSpriteWithAspectRatio(). Falling back to the sprite's original dimensions",F.$bb.Error),$=k.width,H=k.height);const V=k.texture.width,W=k.texture.height,q=V>W?$/V:H/W,K=($-V*q)/2,z=(H-W*q)/2,Y=(new G.Matrix).scale(q,q).translate(K,z),Q=G.RenderTexture.create({width:$,height:H});return j.q.instance.game.renderer.render(k,{renderTexture:Q,transform:Y}),F.qFr.setSmoothed(Q,!0),Q}}},59701:(k,B,U)=>{"use strict";U.d(B,{W:()=>K});var F=U(95891),G=U.n(F),j=U(88022),$=U(91207),H=U(77938),V=U(16847),W=U(64794),q=U(30405);class K{static getItemOwnedQuantity(k,B){return"item"===B.type?k.backpack.hasItem(B.type,B.ID):"dorm"===B.type?k.house.getOwned(B.ID):K.isMathTowerConsumableItem(B.type)?k.backpack.hasItem(B.type,B.ID):-1}static isItemLevelLocked(k,B){return q.o.isLevelLocked(k,B.data.lockLevel)}static isItemOwned(k,B){return k.isItemOwned({type:B.type,ID:B.ID})}static isItemMemberLocked(k){return 1===k.data.member}static isMathTowerConsumableItem(k){return k===W.D.ASSET_TYPE_FRAME||k===W.D.ASSET_TYPE_DECORATION||k===W.D.ASSET_TYPE_STREET_FURNITURE}static isPrimaryMajorZoneStore(k){return[5,6,7,8,19].includes(k)}}K.getCurrencyIcon=G().memoize(((k,B)=>{var U,F;let G,W;switch(k){case V.h.ByItem:const k=$.P[`Icon_currency_${B}`];if(k){G=k;break}27!==B?(G=j._.General_icons_json,W=null===(F=null===(U=H.t.getItem("currency",B))||void 0===U?void 0:U.data)||void 0===F?void 0:F.icon):(G=j._.Ui_hard_currency_json,W="icon-currency-27-small");break;case V.h.ByType:G=$.E.getIconForType("currency",B);break;case V.h.ByTypeForStore:G=$.E.getIconForType("currency",B,"_store"),G===$.E.MISSING_ASSET_GUID&&(G=$.E.getIconForType("currency",B))}return{atlas:G,frame:W}}),((...k)=>k.join()))},44094:(k,B,U)=>{"use strict";U.d(B,{$:()=>j});var F=U(62459),G=U(29738);class j{static toKebabCase(k){return k?String(k).match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g).map((k=>k.toLowerCase())).join("-"):""}static toTitleCase(k){return k.replace(/([a-z])([A-Z])/g,"$1 $2").split(" ").map((k=>k.charAt(0).toUpperCase()+k.slice(1))).join(" ").trim()}static replaceAll(k,B,U){return k?String(k).split(B).join(U):""}static stringsToPath(k){return k.filter((k=>k)).map((k=>this.toKebabCase(k))).join(".")}static capitalizeFirstLetter(k){return k.charAt(0).toUpperCase()+k.slice(1).toLowerCase()}static intToNth(k){if(G.O.isEnglishLocale()){if(!(k<1||k>99))return k<5?this.onesExceptions[k-1]:k<10?`${this.prefix[k-2]}h`:k<13?this.tensExceptions[k-10]:14===k?"fourteenth":k<19?`${this.prefix[k-12]}eenth`:19===k?"nineteenth":k%10==0?`${this.prefix[Math.floor(k/10)-2]}ieth`:`${this.prefix[Math.floor(k/10)-2]}y-${this.intToNth(k%10)}`;F.VyI.log("Unsupported integer range",F.$bb.Error)}return k.toString()}static isString(k){return"string"==typeof k||k instanceof String}static isTruthy(k){return this.isString(k)?!["","0","false","null","undefined","nan"].includes(k.toLowerCase()):!!k}static generateUID(k="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"){let B=(new Date).getTime();"undefined"!=typeof performance&&"function"==typeof performance.now&&(B+=performance.now());return k.replace(/[xy]/g,(k=>{const U=(B+16*Math.random())%16|0;return B=Math.floor(B/16),("x"===k?U:3&U|8).toString(16)}))}static addOrdinalSuffix(k){if(!F.Aq$.isDefined(k)||k<=0)return F.VyI.log("Unsupported integer",F.$bb.Warning),null;if(G.O.isEnglishLocale()){const B=k%10,U=k%100;return 1===B&&11!==U?`${k}st`:2===B&&12!==U?`${k}nd`:3===B&&13!==U?`${k}rd`:`${k}th`}return k.toString()}static truncate(k,B,U){if(k.length<=B)return k;let F=k.slice(0,B);return U&&(F=F.slice(0,F.length-2).concat("...")),F}static containsURL(k){return/(https?:\/\/[^\s]+)/g.test(k)}static normalizeStringAndToLowercase(k){return k.toLowerCase().replace(/[^a-z0-9]+/g,"")}static isValidHex(k){let B=!1;if("string"==typeof k){const U=parseInt(k.replace("#",""),16);B=!isNaN(U)}else B="number"==typeof k&&k>=0;return B||F.VyI.log(`isValidHex: ${k} is not a valid hex string or number`,F.$bb.Warning),B}}j.onesExceptions=["first","second","third","fourth"],j.tensExceptions=["tenth","eleventh","twelfth"],j.prefix=["twent","thirt","fort","fift","sixt","sevent","eight","nint"]},79422:(k,B,U)=>{"use strict";U.d(B,{h:()=>G});var F=U(62459);class G extends F.s3P{constructor(){super(...arguments),this.loggingTag=null}setTag(k){this.loggingTag=k}logMessage(k){if(null!==this.loggingTag){this.getInjectedValue(`ENABLE_${this.loggingTag}_LOGGING`)&&F.VyI.log(`(${this.loggingTag}) - ${k}`,F.$bb.Verbose)}}}},71586:(k,B,U)=>{"use strict";U.d(B,{R:()=>G});var F=U(35120);class G{static getNow(){return new Date(Date.now())}static isNowInRange(k,B){const U=F.q.instance.prodigy.timeManager.getServerTimeMs(),G=!k||new Date(k).getTime()U;return G&&j}static getISOWeekNumber(k){const B=new Date(k);B.setHours(0,0,0,0),B.setDate(B.getDate()+3-(B.getDay()+6)%7);const U=new Date(B.getFullYear(),0,4);return 1+Math.round(((B.getTime()-U.getTime())/864e5-3+(U.getDay()+6)%7)/7)}static getCurrentMonthName(){return(new Date).toLocaleString("en-US",{month:"long"})}static getISOYearNumber(k){const B=new Date(k);return B.setDate(B.getDate()+3-(B.getDay()+6)%7),B.getFullYear()}static getTimezoneOffset(){return-(new Date).getTimezoneOffset()}static getNowWithServerTimezoneOffset(){return new Date(Date.now()-6e4*G.getTimezoneOffset()+6e4*G.SERVER_PLAYER_TIMEZONE_OFFSET)}static getDaysUntilNextMonth(){const k=new Date,B=new Date(k.getFullYear(),k.getMonth()+1,1).getTime()-k.getTime();return Math.ceil(B/864e5)}static findPreviousMonthWithYear(k){const B=k.getUTCMonth(),U=k.getUTCFullYear();return{month:0===B?11:B-1,year:0===B?U-1:U}}static getDateTime(){const k=new Date(Date.now());return new Date(k.getUTCFullYear(),k.getUTCMonth(),k.getUTCDate()).getTime()}static getDateTimeLocal(){const k=G.getNowWithServerTimezoneOffset();return new Date(k.getFullYear(),k.getMonth(),k.getDate()).getTime()}static getDateTimeTomorrowLocal(){const k=G.getNowWithServerTimezoneOffset();return new Date(k.getFullYear(),k.getMonth(),k.getDate()+1).getTime()}}G.SERVER_PLAYER_TIMEZONE_OFFSET=G.getTimezoneOffset()},84415:(k,B,U)=>{"use strict";U.d(B,{a:()=>j});var F=U(35120),G=U(15821);class j{static isFeatureReadyForNextInteraction(k,B){var U,G;if(B<0)return!1;const j=1e3*B,$=null===(G=null===(U=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.featureInteractionTimestamps)||void 0===U?void 0:U[k])||void 0===G?void 0:G.timestamp;return Date.now()-j>=(null!=$?$:0)}static saveTimestampData(k,B){const U=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player;U.data.featureInteractionTimestamps=Object.assign(Object.assign({},U.data.featureInteractionTimestamps),{[k]:Object.assign({timestamp:Date.now()},B)}),U.updated=!0}static getTimestampData(k){var B;return null===(B=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.featureInteractionTimestamps)||void 0===B?void 0:B[k]}static doesFeatureTimestampExist(k,B){var U,F;const j=null===(F=null===(U=k.data.featureInteractionTimestamps)||void 0===U?void 0:U[B])||void 0===F?void 0:F.timestamp;return G.A.isDefined(j)}static doesAnyFeatureTimestampExist(k,B){var U,F;for(const j of B){const B=null===(F=null===(U=k.data.featureInteractionTimestamps)||void 0===U?void 0:U[j])||void 0===F?void 0:F.timestamp;if(G.A.isDefined(B))return!0}return!1}static getMostRecentFeatureTimestamp(k,B){var U,F;let j=0;for(const $ of B){const B=null===(F=null===(U=k.data.featureInteractionTimestamps)||void 0===U?void 0:U[$])||void 0===F?void 0:F.timestamp;G.A.isDefined(B)&&B>j&&(j=B)}return j}static clearFeatureTimestamp(k,B=!1){const U=F.q.instance.prodigy.gameContainer.get("306-5359");U.data.featureInteractionTimestamps&&(delete U.data.featureInteractionTimestamps[k],B?U.forceSaveCharacter():U.updated=!0)}}},13021:(k,B,U)=>{"use strict";U.d(B,{w:()=>G});var F=U(35120);class G{static isTitanMap(k){return k.toLowerCase().endsWith("-titan")}static isInTitanParty(){var k,B;return null!==(B=null===(k=F.q.instance.prodigy.gameContainer.get("e20-0fb0").player.coOpTeamHandler)||void 0===k?void 0:k.IsOnTeam)&&void 0!==B&&B}}},67238:(k,B,U)=>{"use strict";U.d(B,{D:()=>j});var F=U(8674),G=U(76546);class j extends G.D{makeCloudscriptRequest(k,B){const U=Object.create(null,{makeCloudscriptRequest:{get:()=>super.makeCloudscriptRequest}});return(0,F.sH)(this,arguments,void 0,(function*(k,B,F=!0){return U.makeCloudscriptRequest.call(this,k,B,F)}))}call(k,B,U){const G=Object.create(null,{makeCloudscriptRequest:{get:()=>super.makeCloudscriptRequest}});return(0,F.sH)(this,void 0,void 0,(function*(){return G.makeCloudscriptRequest.call(this,k,B,U)}))}}},20952:(k,B,U)=>{"use strict";U.d(B,{H:()=>H});var F=U(8674),G=U(62459),j=U(79687),$=U(44094);let H=class{constructor(){this._uuid="",this._identitySID="";const k=window.eventData;(null==k?void 0:k.uuid)?this._uuid=k.uuid:this._uuid=$.$.generateUID("xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx");{const k=window.SW.Load.userInfo?JSON.parse(window.SW.Load.userInfo()):window.userInfo;(null==k?void 0:k.sid)?this._identitySID=k.sid:G.VyI.log("Identity UUID not set",G.$bb.Warning)}}getUUID(){return this._uuid}getIdentitySID(){return this._identitySID}};H=(0,F.Cg)([(0,j.injectable)(),(0,F.Sn)("design:paramtypes",[])],H)},30226:(k,B,U)=>{"use strict";U.d(B,{J:()=>nt});var F=U(8674),G=U(62459),j=U(95891),$=U(95066),H=U(36525),V=U(17446),W=U(65240),q=U(73678),K=U(35120),z=(U(34829),U(77938)),Y=U(50503),Q=U(73797),X=U(52156),Z=U(62430),J=U(23082),tt=U(41674),et=U(98252),it=U(44094),st=U(71586);class nt{static capitalize(k){return G.Aq$.isDefined(k)?k.charAt(0).toUpperCase()+k.slice(1):""}static getDate(){const k=new Date,B=k.getDate(),U=k.getMonth()+1;let F=`${B}`,G=`${U}`;return B<10&&(F=`0${B}`),U<10&&(G=`0${U}`),`${G}${F}${k.getFullYear()}`}static getDateId(){return Math.floor((new Date).getTime()/864e5)}static getDayName(k,B){return K.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(`WEEKDAY_NAME_${B}`)}static addDays(k,B){const U=new Date(k);return U.setDate(U.getDate()+B),U}static convertItemToIcon(k){return"gold"===k.type?"item/26":"spell"===k.type?(k.data=G.Aq$.isDefined(k.data)?k.data:z.t.getItem(k.type,k.ID).data,k.data.element):"boss"===k.type?"boss":"player"===k.type?"player":"dorm"===k.type?`${k.ID}`:G.Aq$.isDefined(k.metadata)&&G.Aq$.isDefined(k.metadata.icon)?String(k.metadata.icon):G.Aq$.isDefined(k.type)&&G.Aq$.isDefined(k.ID)?`${k.type}/${k.ID}`:G.Aq$.isDefined(k.tag)?k.tag:"string"==typeof k?k:"empty"}static numberToString(k){const B=`${k}`;let U="",F=1;for(let G=B.length-1;G>=0;G--)U=`${B.charAt(G)}${U}`,F%3==0&&F>0&&G>0&&(U=`,${U}`),F++;return U}static isSchoolHours(){const k=st.R.getNow().getHours(),B=nt.getSchoolStartHour(),U=nt.getSchoolEndHour();return k>=B&&k<=U-1}static isDateWithinSchoolHours(k){const B=k.getHours(),U=nt.getSchoolStartHour(),F=nt.getSchoolEndHour();return B>=U&&B=16&&k<=23}static isNightTimeLocal(){const k=st.R.getNowWithServerTimezoneOffset().getHours();return k>=16&&k<=23}static isDefined(k){return!(null==k||"null"===k)}static has(k,B){if(G.Aq$.isDefined(k)){const U=B.split(".");let F=k;for(let k=0;kthis.removeFromArray(k,F,U))),F}static equalArrayContents(k,B){if(k===B)return!0;if(null===k||null===B)return!1;if(k.length!==B.length)return!1;const U=[...k];for(const F of B)if(!this.removeFromArray(F,U))return!1;return!(U.length>0)}static removeFromArray(k,B,U=((k,B)=>k===B)){for(let F=0;F$.width&&($.width=U.width),$.height+=U.height}$.height/=k.length}let H=U?0:B.x,V=U?0:B.y;G.Aq$.isDefined(F)&&(H+=G.Aq$.isDefined(F.x)?F.x:0,V+=G.Aq$.isDefined(F.y)?F.y:0);const W=nt.calculateItemSpacing(k.length,$.width,B.width),q=nt.calculateItemSpacing(1,$.height,B.height),K=V+nt.calculateItemCoordinate(0,$.height,q);k.forEach(((k,B)=>{k.x=H+nt.calculateItemCoordinate(B,$.width,W),k.y=K}))}static frameDataToFrameJson(k){const B={};for(let U=0;U0||"item"===k.type&&F.backpack.hasItem("item",k.ID)>0||"spell"===k.type&&G.Aq$.isDefined(F.data.spells)&&-1!==F.data.spells.indexOf(k.ID)||U.push(k)}return U}static validateVersion(k){return/^[0-9-]+$/.test(k)?k:"undefined"}static joinByProperty(k,B,U=","){let F="";const G=k.length;for(let j=0;j=0||k.indexOf("dev.prodigygame.org")>=0?U="test":k.indexOf("prodigygame.net")>=0||B.indexOf("env=dev")>=0?U="dev":k.indexOf("prodigygame.org")>=0||B.indexOf("env=staging")>=0?U="staging":(k.indexOf("prodigygame.com")>=0||B.indexOf("env=production")>=0||B.indexOf("env=prod")>=0)&&(U="production"),U}static getEnvironmentByHost(){const k=window.location.host;let B="local";return k.indexOf("-qa")>=0||k.indexOf("dev.prodigygame.org")>=0?B="test":k.indexOf("prodigygame.net")>=0?B="dev":k.indexOf("prodigygame.org")>=0?B="staging":k.indexOf("prodigygame.com")>=0&&(B="production"),B}static getOptionalParameter(k,B){return void 0===k?B:k}static getRealWorldPosition(k,B,U){return U?{x:k+U.viewMatrix.tx,y:B+U.viewMatrix.ty}:{x:k,y:B}}static safeDeleteObjectProperty(k,B){G.Aq$.isDefined(k[B])&&delete k[B]}static deleteFieldsWithNullsOrEmptyStrings(k,B=!1){for(const U in k)k.hasOwnProperty(U)&&(""===k[U]?(B&&G.VyI.log(`Util.deleteFieldsWithNullsOrEmptyStrings - deleted key with empty string value named: ${U}`,G.$bb.Verbose),delete k[U]):null===k[U]?(B&&G.VyI.log(`Util.deleteFieldsWithNullsOrEmptyStrings - deleted key with null value named: ${U}`,G.$bb.Verbose),delete k[U]):"object"==typeof k[U]&&nt.deleteFieldsWithNullsOrEmptyStrings(k[U]))}static validateString(k,B=""){for(let U=0;Uk));K.q.instance.prodigy.open.resultsMenu($,G,[],[],void 0,F,!1).onClose=()=>{j.forceSaveCharacter(),null==U||U()}}static setOuterWidth(k,B){k.style.width=B-(k.style.borderLeftWidth?parseInt(k.style.borderLeftWidth):0)-(k.style.borderRightWidth?parseInt(k.style.borderRightWidth):0)+"px"}static setOuterHeight(k,B){k.style.height=B-(k.style.borderTopWidth?parseInt(k.style.borderTopWidth):0)-(k.style.borderBottomWidth?parseInt(k.style.borderBottomWidth):0)+"px"}static shouldSuppressAd(k,B=!0){return k.isPlayingAtSchool()&&(!B||!k.hasMembership())}static showYouTubeMembershipAd(k,B=!0,U){const F=K.q.instance.prodigy.gameContainer.get("80c-6fa4"),j=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player,$=j.data.membershipVideoTimeStamp;return F.getValue("enableMembershipVideoAd",!1)&&!j.isPlayingAtSchool()&&!(()=>{const k=F.getValue("disableMembershipVideoAdDuringSchoolHours",!0),B=F.getValue("useServerTimeForVideoLockout",!0)?new Date(K.q.instance.prodigy.timeManager.getServerTimeMs()):new Date;return k&&nt.isSchoolDay(B)&&nt.isDateWithinSchoolHours(B)})()&&!et.pF.isNativeApp()&&!(B&&G.Aq$.isDefined($)&&nt.isDateWithinSameDay(new Date($),new Date(K.q.instance.prodigy.timeManager.getServerTimeMs())))}static isDateWithinSameDay(k,B){return k.getDate()===B.getDate()&&k.getMonth()===B.getMonth()&&k.getFullYear()===B.getFullYear()}static wrapArrayIndex(k,B){if(B<=0)return null;let U=k;for(;U<0;)U+=B;for(;U>=B;)U-=B;return U}static logUpdateUserFailed(k=1){const B=new H.i;B.setKey("prodigy_game.education.updateUserFailed"),B.setValue(k);K.q.instance.prodigy.gameContainer.get("e59-eea6").logStat(B,$.d.Increment),G.VyI.log("Education update user failed.",G.$bb.Error)}static logSetInitialGradesFailed(k=1){const B=new H.i;B.setKey("prodigy_game.education.setInitialGradesFailed"),B.setValue(k);K.q.instance.prodigy.gameContainer.get("e59-eea6").logStat(B,$.d.Increment),G.VyI.log("Education set initial grades failed.",G.$bb.Error)}static logSetCurriculumFailed(k=1){const B=new H.i;B.setKey("prodigy_game.education.setCurriculumFailed"),B.setValue(k);K.q.instance.prodigy.gameContainer.get("e59-eea6").logStat(B,$.d.Increment),G.VyI.log("Education set curriculum failed.",G.$bb.Error)}static createTransformEffectAssetKey(k){const B=k.effect.transform,U=k.effect.ID,F=z.t.getItem(B,U);return"spine"===F.metadata.assets.default.type?Z.N.createSpineAssetSourceName(F,B,U):X.X.createImageAssetSourceName(B,U)}static isTransformEffectLoaded(k){const B=k.effect.transform,U=k.effect.ID,F=z.t.getItem(B,U),G=this.createTransformEffectAssetKey(k);return"spine"===F.metadata.assets.default.type?K.q.instance.game.cache.checkSpineKey(G):K.q.instance.game.cache.checkImageKey(G)}static getEnvironmentURL(){let k="";switch(nt.getEnvironment()){case"test":case"local":k=window.location.hostname;break;case"dev":k="www.prodigygame.net";break;case"staging":k="www.prodigygame.org";break;case"production":k="www.prodigygame.com"}return k}static convertItemDefinitionToItemDrop(k){return k.map((k=>({ID:k.ID,type:k.type,N:k.quantity})))}static getPurchasePrice(k,B){var U;return null!==(U=k.price)&&void 0!==U?U:B.getAmount()}static isCoreZone(k){return q.s0.includes(k)}static isAvgFrameRateAboveThreshold(k){return K.q.instance.game.fps.getAverageFramerate()>=k}static cacheAsBitmap(k,B){k.cacheAsBitmap=!1,B&&(k.cacheAsBitmap=B)}static asyncFilter(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=yield Promise.all(k.map(B));return k.filter(((k,B)=>U[B]))}))}static isGuid(k){if(!k)return!1;return/^[A-F\d]{8}-[A-F\d]{4}-4[A-F\d]{3}-[89AB][A-F\d]{3}-[A-F\d]{12}$/i.test(k)}static applyBlurToScreen(k=!0){K.q.instance.prodigy.game.input.enabled=!k;const B=K.q.instance.game.state.getCurrentState().key;if(B===J.G.TileScreen){const U=K.q.instance.game.state.get(B);(null==U?void 0:U.isMapScreen)&&(null==U?void 0:U.complete)&&(U.opaque.visible=k,U.bitmapCacheContainer(k,U.opaque,!0))}}static callAfterFrameDelay(k,B=1){let U=0;const F=()=>{U++,U>=B&&(k(),K.q.instance.game.app.ticker.remove(F))};K.q.instance.game.app.ticker.add(F)}static waitForFrames(){return(0,F.sH)(this,arguments,void 0,(function*(k=1){yield new Promise((B=>nt.callAfterFrameDelay((()=>B()),k)))}))}static isObjectOnScreen(k){if(!k.active)return!1;const{width:B,height:U}=G.W$e.instance.game,F=k.findComponent(G.XVE);if(G.Aq$.isDefined(F)){const k=F.worldPosition.x,G=F.worldPosition.y,j=k+F.widthDelta,$=G+F.heightDelta;return k<=B&&j>=0&&G<=U&&$>=0}const j=k.transform;return j.worldPosition.x=0&&j.worldPosition.y=0}static getItemName(k,B=!1){const U=K.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),F=this.getLocalizationNameKey(k);if(B){const k=`${F}S`;if(U.hasText(k))return U.getText(k)}return U.getText(F)}static getLocalizationNameKey(k,B){return nt.resolveLocalizationKey(k,B,"NAME")}static getLocalizationFlavorKey(k,B){return nt.resolveLocalizationKey(k,B,"FLAVORTEXT")}static getLocalizationActiveNameKey(k,B){return nt.resolveLocalizationKey(k,B,"ACTIVENAME")}static getLocalizationActiveFlavorKey(k,B){return nt.resolveLocalizationKey(k,B,"ACTIVEFLAVORTEXT")}static resolveLocalizationKey(k,B,U){var F;if(!k||"string"==typeof k&&!G.Aq$.isDefined(B))return"";return`${"string"==typeof k?k:String(k.type)}_${"string"==typeof k?B:null!==(F=k.ID)&&void 0!==F?F:k.id}_${U}`.toUpperCase()}}nt.DEBUG_DAY_LENGTH=864e5},48982:(k,B,U)=>{"use strict";U.d(B,{h:()=>V});var F=U(76253),G=U(35120),j=U(65050),$=U(53661),H=U(84415);class V{static selectNextVideoInFeature(k,B){var U,F;const j=null===(F=null===(U=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.featureInteractionTimestamps)||void 0===U?void 0:U[k])||void 0===F?void 0:F.videoId;let $=0;if(j){const k=B.indexOf(j)+1;$=k{"use strict";U.d(B,{u:()=>j});var F=U(62459),G=U(35120);class j{static getGameApiStatusData(){try{return Object.assign(Object.assign({},window.gameApiStatusData),window.gameApiStatusData.prodigyGameFlags)}catch(e){return F.VyI.log("Could not load game api status",F.$bb.Error),[]}}static fetchGameApiStatusData(k){let B=3;const U=new XMLHttpRequest;U.onreadystatechange=()=>{U.readyState===XMLHttpRequest.DONE&&(200===U.status?(window.gameApiStatusData=U.response.data,k(j.getGameApiStatusData())):B>0?(B--,j.fetchGameApiStatusData(k)):window.statusErrored=!0)};const F=`${G.q.instance.prodigy.urlProvider.getAPIRootUrl()}/game-api/status`;U.responseType="json",U.open("GET",F,!0),U.send("")}static showLoaderIfHidden(){window.prodigyLoaderHidden&&(window.SW.Load.setLoadingVisible(!0),window.prodigyLoaderHidden=!1)}}},64271:(k,B,U)=>{"use strict";U.d(B,{N:()=>W});var F,G=U(62459),j=U(40392),$=U(73678),H=U(15989),V=U(30226);!function(k){k.LevelPrerequisite="LevelPrerequisite",k.ZonePrerequisite="ZonePrerequisite",k.MultipleZonePrerequisite="MultipleZonePrerequisite",k.None="None"}(F||(F={}));class W{static sortZonesByLevel(k){return k.filter((k=>V.J.isCoreZone(k.zone))).sort(((k,B)=>{var U,F;return(null!==(U=null==k?void 0:k.getRequiredLevel())&&void 0!==U?U:0)-(null!==(F=null==B?void 0:B.getRequiredLevel())&&void 0!==F?F:0)}))}static sortZonesBySinglePrerequisite(k){const B=[...k],U=B.find((k=>k.zone===$.A_.SHIVERCHILL));if(U&&(U.requirementsID=33),B.some((k=>{var B;return(null!==(B=k.getZonePrerequisites().length)&&void 0!==B?B:0)>=1})))return G.VyI.log("Zones have multiple or no prerequisites. Cannot sort by single prerequisites. Returning unsorted zones!",G.$bb.Warning),k;const F=new Map(k.map((k=>[k.getZonePrerequisites()[0],k]))),j=[];let H=k.find((k=>!k.getZonePrerequisites()[0]));for(;H;)j.push(H),H=F.get(H.zone);return j}static sortZonesByNumPrerequisite(k){return[...k].sort(((k,B)=>{var U,F;return(null!==(U=k.getZonePrerequisites().length)&&void 0!==U?U:0)-(null!==(F=B.getZonePrerequisites().length)&&void 0!==F?F:0)}))}static getCoreZonesInOrder(k=j.i.getDifficultyMode()){const B=j.i.BUTTONS_CONFIG.filter((B=>B.difficultyMode===k&&V.J.isCoreZone(B.zone)));switch(W.getCoreZoneRequirementType(B)){case F.LevelPrerequisite:return this.sortZonesByLevel(B);case F.ZonePrerequisite:return this.sortZonesBySinglePrerequisite(B);case F.MultipleZonePrerequisite:return this.sortZonesByNumPrerequisite(B);case F.None:default:return G.VyI.log("Zones have mixed or no prerequisites. Returning unsorted zones!",G.$bb.Warning),B}}static getCoreZoneRequirementType(k){const B=k.filter((k=>k.nameKey!==H.NJ.FireflyForest&&k.nameKey!==H.NJ.ShiverchillMountains));if(B.every((k=>void 0!==k.getRequiredLevel())))return F.LevelPrerequisite;if(B.every((k=>0!==(null==k?void 0:k.getZonePrerequisites().length)))){return B.some((k=>{var B;return(null!==(B=k.getZonePrerequisites().length)&&void 0!==B?B:0)>1}))?F.MultipleZonePrerequisite:F.ZonePrerequisite}return F.None}}},80882:(k,B,U)=>{"use strict";U.d(B,{y:()=>$});var F=U(8674),G=U(62459),j=U(28152);let $=class extends G.uAl{constructor(){super(...arguments),this.constant=!1,this.isTrue=new G.HN0,this.isFalse=new G.HN0}fireBooleanSignal(k){(k?this.isTrue:this.isFalse).dispatch()}fireBooleanSignalAgainstConstant(){(this.constant?this.isTrue:this.isFalse).dispatch()}destroy(){this.isTrue.dispose(),this.isFalse.dispose(),super.destroy()}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],$.prototype,"constant",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"isTrue",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"isFalse",void 0),$=(0,F.Cg)([(0,G.EVk)("BooleanSignal",j.Y.utility)],$)},77713:(k,B,U)=>{"use strict";U.d(B,{h:()=>H});var F=U(8674),G=U(62459),j=U(28152),$=U(80060);let H=class extends G.uAl{constructor(){super(...arguments),this.defaultPrefabGuid="",this.loadWithDependencies=!0,this.contentLoadedSignalName="",this._waitForAllLoadedToActivate=!0,this._clearOnSpawn=!1,this.onPrefabSpawned=new G.HN0,this.onAllPrefabsSpawned=new G.HN0,this.onSpawnStart=new G.HN0,this.onAllImagesLoaded=new G.HN0,this.spawnedPrefabs=[],this._spawnPrefabsPromise=null}spawnDefaultPrefabsFromDataArray(k){return(0,F.sH)(this,arguments,void 0,(function*(k,B=this.container){this.defaultPrefabGuid?yield this.spawnPrefabsFromDataArray(this.defaultPrefabGuid,k,B):G.VyI.log("DataArrayPrefabSpawnerComponent: No default prefab GUID set, cannot spawn prefabs",G.$bb.Error)}))}spawnPrefabsFromDataArray(k,B){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U=this.container,F=!1){yield this._spawnPrefabsPromise,this._spawnPrefabsPromise=new G.bnh,this.onSpawnStart.dispatch();const j=null!=U?U:this.gameObject,H=[],V=[];this._clearOnSpawn&&this.destroySpawnedPrefabs();for(const W of B){const B=new G._mx;B.active=!1,B.addComponent(G.dLy);B.addComponent(G.bE_).Container.parent=G.Uoy.getParentContainer(j);const U=this.loadWithDependencies?yield $.d.loadWithInjectedValuesAndDependenciesFromGUID(this._prefabLoader,k,W,B).promise:$.d.loadWithInjectedValuesFromGUID(this._prefabLoader,k,W,B);if(this.contentLoadedSignalName)for(const k of U.findComponentsInChildren(G.uAl,!0)){const B=k[this.contentLoadedSignalName];if(B instanceof G.HN0&&0===B.dispatchCount){V.push(new Promise((k=>{B.addOnce(k)})));break}}if(this._waitForAllLoadedToActivate&&(U.active=!1,H.push(U)),!j||j.isDestroyed)return U.destroy(),void B.destroy();if(F){U.addComponent(G.bE_).bindInjectedValues(W)}U.parent=j,B.destroy(),this.spawnedPrefabs.push(U),this.onPrefabSpawned.dispatch(U)}if(this._waitForAllLoadedToActivate)for(const G of H)G.active=!0;this.onAllPrefabsSpawned.dispatch(),this._spawnPrefabsPromise.resolve(),Promise.all(V).then((()=>{this.gameObject.isDestroyed||this.onAllImagesLoaded.dispatch()})).catch(G.RQr.createHandler("DataArrayPrefabSpawnerComponent: Failed to resolve image load promises for spawned prefabs"))}))}spawnPrefabsFromDataArrayWithContext(k,B){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U=this.container){yield this.spawnPrefabsFromDataArray(k,B,U,!0)}))}destroySpawnedPrefabs(){for(const k of this.spawnedPrefabs)null==k||k.destroy();this.spawnedPrefabs.length=0}destroy(){this.onSpawnStart.dispose(),this.onPrefabSpawned.dispose(),this.onAllPrefabsSpawned.dispose(),this.onAllImagesLoaded.dispose(),super.destroy()}};(0,F.Cg)([(0,G.Cdj)("d0e-64fd"),(0,F.Sn)("design:type",G.wNP)],H.prototype,"_prefabLoader",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"defaultPrefabGuid",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"loadWithDependencies",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],H.prototype,"container",void 0),(0,F.Cg)([(0,G.W_S)(),(0,F.Sn)("design:type",String)],H.prototype,"contentLoadedSignalName",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_waitForAllLoadedToActivate",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],H.prototype,"_clearOnSpawn",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onPrefabSpawned",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onAllPrefabsSpawned",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onSpawnStart",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onAllImagesLoaded",void 0),H=(0,F.Cg)([(0,G.EVk)("DataArrayPrefabSpawner",j.Y.utility,"Spawns a prefab for each item in a data array, injecting the data into the prefab")],H)},10704:(k,B,U)=>{"use strict";U.d(B,{f:()=>K});var F=U(8674),G=U(62459),j=U(99625),$=U(11647),H=U(15821),V=U(80060),W=U(30226);let q=class extends((0,$.o)(G.uAl)){constructor(){super(...arguments),this.keepAlive=!1}get config(){return this._config}get attachedObject(){var k;return null===(k=this.gameObject)||void 0===k?void 0:k.children[0]}get isOnScreen(){return W.J.isObjectOnScreen(this.gameObject)}postCreate(){super.postCreate(),this.addListenerToSignal(this.gameObject.onChildAdded,(()=>{H.A.isDefined(this.config)&&this.setConfig(this.config)}))}setConfig(k){H.A.isDefined(this.attachedObject)&&(V.d.updateInjectedValues(this.attachedObject,k.data),this.matchTransform(this.attachedObject.findComponent(G.XVE))),this._config=k}matchTransform(k){var B;if(!H.A.isDefined(k))return void G.VyI.log("DynamicObjectPoolSlotContainerComponent can only match RectTransforms; transform passed was undefined",G.$bb.Warning);const{sizeDelta:U,anchorMax:F,anchorMin:j,pivot:$}=k,V=null!==(B=this.gameObject.findComponent(G.XVE))&&void 0!==B?B:this.gameObject.addComponent(G.XVE);V.setSizeDelta(U.width,U.height),V.setAnchorMax(F.x,F.y),V.setAnchorMin(j.x,j.y),V.setPivot($.x,$.y)}};(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],q.prototype,"keepAlive",void 0),q=(0,F.Cg)([(0,G.EVk)("DynamicObjectPoolSlotComponent")],q);let K=class extends((0,$.o)(G.uAl)){constructor(){super(...arguments),this.onObjectAddedToPool=this.createTidySignal(),this.onObjectAddedToSlot=this.createTidySignal(),this.debugSlotRect=!1,this.minimumPooledObjects=0,this.prefabGuids=[],this._objectPools=new Map,this._slots=[],this._changedSlots=new Set,this._didInitialPreload=!1,this._preloadedAssets=[]}destroy(){this.flushPool(),super.destroy()}update(){super.update(),G.Aq$.isDefined(this._preloadPromise)&&!this._didInitialPreload||(this._didInitialPreload?this.processChangedSlots():this._preloadPromise=this.preloadPrefabs(new Set(this.prefabGuids)).catch(G.RQr.createHandler("Error preloading DynamicObjectPoolManager prefabs")).finally((()=>{this._didInitialPreload=!0})))}spawnPrefabsWithData(k){return(0,F.sH)(this,void 0,void 0,(function*(){var B,U;if(!G.Aq$.isDefined(this.container))return G.VyI.log("DynamicObjectPoolManager requires a container object to spawn objects into!",G.$bb.Error),[];this._didInitialPreload||(yield this._preloadPromise);const F=new Set(k.map((({prefabGuid:k})=>k)));yield this.preloadPrefabs(F);const j=[];for(const[G,$]of k.entries()){const k=null!==(B=this._slots[G])&&void 0!==B?B:this.createObjectSlot(G);$.prefabGuid!==(null===(U=k.config)||void 0===U?void 0:U.prefabGuid)&&(this.returnSlotObjectToPool(k),this.updateSlotTransform(k,$.prefabGuid)),k.setConfig($),j.push(k),this._changedSlots.add(k)}return this._slots.length>j.length&&this.destroyObjectSlots(((k,B)=>B>=j.length)),this._slots=j,this.processChangedSlots(),this._slots}))}processChangedSlots(){0!==this._changedSlots.size&&this._didInitialPreload&&(this._changedSlots.forEach((k=>{const{attachedObject:B,keepAlive:U,isOnScreen:F}=k;if(F||U){if(F){if(G.Aq$.isDefined(B))return;this.attachPooledObjectToSlot(k)}}else this.returnSlotObjectToPool(k)})),this._changedSlots.clear())}destroyObjectSlots(k){var B;const U=[];for(const[F,G]of this._slots.entries())k(G,F)?(this.returnSlotObjectToPool(G),this._changedSlots.delete(G),null===(B=G.GameObject)||void 0===B||B.destroy()):U.push(G);this._slots=U}updateData(k){for(const[B,U]of this._slots.entries()){const F=k[B],j=G.Aq$.isDefined(F);U.GameObject.active!==j&&(U.GameObject.active=j,this._changedSlots.add(U)),j&&U.setConfig(F)}}updateDataAtIndex(k,B){var U;null===(U=this._slots[k])||void 0===U||U.setConfig(B)}getSlotAtIndex(k){return this._slots[k]}flushPool(k=!1){if(this.destroyObjectSlots((()=>!0)),this._objectPools.forEach((k=>{for(const B of k)B.destroy()})),this._objectPools.clear(),k)for(const B of this.prefabGuids)this.prespawnObjectsWithGuid(B)}createObjectSlot(k){const B=new G._mx,U=B.addComponent(G.XVE),F=B.addComponent(q);return this.debugSlotRect&&B.addComponent(G.Lom).setColor("00ff00"),B.name="dynamic-pool-placeholder",this.container.addChildAt(B,k),this.addListenerToSignal(U.onWorldMatrixChanged,(()=>{this._changedSlots.add(F)})),F}preloadPrefabs(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield Promise.all(Array.from(k).map((k=>(0,F.sH)(this,void 0,void 0,(function*(){if(this._preloadedAssets.includes(k))return;const B=this._preloadedAssets.push(k);try{yield this._prefabLoader.preloadFromGUIDWithDependencies(k),this._objectPools.set(k,this.prespawnObjectsWithGuid(k))}catch(e){throw this._preloadedAssets.splice(B-1,1),e}})))))}))}prespawnObjectsWithGuid(k){if(this.minimumPooledObjects<=0)return[];const B=[];for(let U=0;U{"use strict";U.d(B,{A:()=>$});var F=U(8674),G=U(62459),j=U(11647);class $ extends((0,j.o)(G.uAl)){constructor(){super(...arguments),this.showInState=[],this.onStateEnter=this.createTidySignal(),this.onStateExit=this.createTidySignal()}}(0,F.Cg)([(0,G.SZi)(),(0,G.ERr)(),(0,F.Sn)("design:type",Array)],$.prototype,"showInState",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onStateEnter",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],$.prototype,"onStateExit",void 0)},40743:(k,B,U)=>{"use strict";U.d(B,{r:()=>q});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(15821),V=U(11647),W=U(41170);class q extends((0,V.o)(G.uAl)){constructor(){super(...arguments),this._stateComponents=[],this.onStateUpdated=this.createTidySignal(),this.debugDeactivate=!1,this.matchForState=k=>k.state===this._state}postCreate(){super.postCreate(),this._stateComponents=this.gameObject.findComponents(W.A),this.setState(this._state)}get currentState(){return this._state}setState(k){var B;const U=this._stateComponents.find(this.matchForState);if(this._state=k,this.debugDeactivate||!H.A.isDefined(this._state))return;const F=this._stateComponents.find(this.matchForState),G=[];null==F||F.blendStates.forEach((k=>{var B;const U=this._stateComponents.find((B=>B.state===k));G.push(...null!==(B=null==U?void 0:U.showInState)&&void 0!==B?B:[])}));const j=[...null!==(B=null==F?void 0:F.showInState)&&void 0!==B?B:[],...G],V=$().flatten(this._stateComponents.map((k=>k.showInState.filter((k=>!j.includes(k))))));j.forEach((k=>{k.active=!0})),V.forEach((k=>{k.active=!1})),this.onStateUpdated.dispatch(this._state),null==U||U.onStateExit.dispatch(),null==F||F.onStateEnter.dispatch()}}(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],q.prototype,"onStateUpdated",void 0),(0,F.Cg)([(0,G.vkK)(),(0,F.Sn)("design:type",Boolean)],q.prototype,"debugDeactivate",void 0)},11191:(k,B,U)=>{"use strict";U.d(B,{N:()=>q});var F,G=U(8674),j=U(62459),$=U(68910),H=U(15821),V=U(11647),W=U(61917);let q=F=class extends((0,V.o)(j.y4o)){constructor(){super(...arguments),this.allowDepthSorting=!1,this._depthLayerContainers=new Map,this._depthValues=[],this._depthComponents=[]}getDimensions(){var k,B;return null!==(B=null===(k=this.gameObject.findComponent(j.XVE))||void 0===k?void 0:k.sizeDelta)&&void 0!==B?B:j.or0.ZERO}get _transform(){var k;return null!==(k=this._rectTransform)&&void 0!==k?k:this.gameObject.findComponent(j.XVE)}create(){if(super.create(),!H.A.isDefined(this._transform))return void j.VyI.log(`RenderContainerComponent on ${this.gameObject.name} needs to have a RectTransform`,j.$bb.Warning);const k=new $.Container;k.name=`render-container-root-${this.gameObject.name}`,this.setUpDisplayObject(k),this.sizeContainer(),this.addListenerToSignal(this._transform.onDimensionsChanged,(()=>this.sizeContainer())),this.allowDepthSorting&&(this.addListenerToSignal(this.gameObject.onChildAdded,(k=>this.sortChildToLayer(k))),this.createDepthLayerContainer(0))}postCreate(){super.postCreate(),this.triggerSort()}triggerSort(){if(this.allowDepthSorting)for(const k of this.GameObject.children)this.sortChildToLayer(k)}sortChildToLayer(k){var B;const U=k.findComponent(W.d);if(!H.A.isDefined(U)){return void(null!==(B=k.findComponent(j.y4o))&&void 0!==B?B:k.addComponent(F)).getRootContainer().setParent(this._depthLayerContainers.get(0))}this._depthComponents.some((k=>k===U))||(this.addListenerToSignal(U.OnDestroy,(()=>{this._depthComponents=this._depthComponents.filter((k=>k!==U)),this.cleanDepthLayer(U.depth)})),this.addListenerToSignal(U.onDepthChanged,(({old:k,val:B})=>{const F=this.getDepthLayer(B);U.renderComponent.getRootContainer().setParent(F),this.cleanDepthLayer(k)})),this._depthComponents.push(U));const{depth:G,renderComponent:$}=U;this.getDepthLayer(G).addChild($.getRootContainer())}cleanDepthLayer(k){const B=this._depthLayerContainers.get(k);H.A.isDefined(B)&&0===B.children.length&&(B.destroy(),this._depthValues=this._depthValues.filter((B=>B!==k)),this._depthLayerContainers.delete(k))}getDepthLayer(k){return this._depthLayerContainers.has(k)?this._depthLayerContainers.get(k):this.createDepthLayerContainer(k)}createDepthLayerContainer(k){let B=-1;for(const[F,G]of this._depthValues.entries())G>k&&(B=F);B>=0?this._depthValues.splice(B,0,k):(B=this._depthValues.length,this._depthValues.push(k));const U=new $.Container;return U.name=`depth-layer-${k}`,this._depthLayerContainers.set(k,U),this.getRootContainer().addChildAt(U,B),U}sizeContainer(){if(!H.A.isDefined(this._transform))return;const{fullHeight:k,fullWidth:B}=this._transform,U=this.getRootContainer();U.width=B,U.height=k}};(0,G.Cg)([(0,j.Pqz)(j.XVE),(0,G.Sn)("design:type",j.XVE)],q.prototype,"_rectTransform",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],q.prototype,"allowDepthSorting",void 0),q=F=(0,G.Cg)([(0,j.EVk)("RenderContainer",void 0,"Adds an empty Pixi Container to the GameObject that matches the size of any attached RectTransform.")],q)},61917:(k,B,U)=>{"use strict";U.d(B,{d:()=>H});var F=U(8674),G=U(62459),j=U(11647),$=U(11191);let H=class extends((0,j.o)(G.uAl)){constructor(){super(...arguments),this.onDepthChanged=this.createTidySignal(),this._depth=0}set depth(k){if(k===this._depth)return;const B=this._depth;this._depth=k,this.onDepthChanged.dispatch({old:B,val:k})}get depth(){return this._depth}get renderComponent(){const k=this.gameObject.findComponent(G.y4o);return G.Aq$.isDefined(k)?k:this.gameObject.addComponent($.N)}postCreate(){var k;super.postCreate(),null===(k=this.gameObject.parent.findComponent($.N))||void 0===k||k.triggerSort()}};(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],H.prototype,"onDepthChanged",void 0),(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number),(0,F.Sn)("design:paramtypes",[Number])],H.prototype,"depth",null),H=(0,F.Cg)([(0,G.EVk)("RenderDepth",void 0,"Applies a depth to a game object to provide granular control of the draw order. NOTE: You likely want to use layers instead, be aware of caveats before use.")],H)},1312:(k,B,U)=>{"use strict";U.d(B,{s:()=>$});var F=U(62459),G=U(88225),j=U(35120);class ${static startRecording(k,B){var U;const F=function(){var k,B,U;const F=null===(U=null===(B=null===(k=null===j.q||void 0===j.q?void 0:j.q.instance)||void 0===k?void 0:k.prodigy)||void 0===B?void 0:B.gameContainer)||void 0===U?void 0:U.get("80c-6fa4");if(!F)return 0;const G=F.getValue("sentryReplaySampleRate",0);return"number"==typeof G?G:0}();Math.random(){F.VyI.log(`Failed to stop Sentry replay recording ${String(k)}`,F.$bb.Error)}))}}},27488:(k,B,U)=>{"use strict";U.d(B,{r:()=>F});class F extends Error{constructor(k,B){super(B),this.code=k,Object.setPrototypeOf(this,F.prototype)}}},76546:(k,B,U)=>{"use strict";U.d(B,{D:()=>Y});var F,G=U(8674),j=U(62459),$=U(79687),H=U(95891),V=U.n(H),W=(U(34829),U(37251)),q=U(13956),K=U(27488),z=U(35537);let Y=F=class{get networkRequestBehaviour(){return{}}makeCloudscriptRequest(k,B){return(0,G.sH)(this,arguments,void 0,(function*(k,B,U=!0){if(this._featureFlags.getValue("disableCloudscriptRequestQueue",!1))return this.doRequest(k,B,U,Promise.resolve());const G=this.doRequest(k,B,U,F._lastRequest);return F._lastRequest=G,G}))}doRequest(k,B,U,$){return(0,G.sH)(this,void 0,void 0,(function*(){yield $.catch((()=>{}));const G=V().merge(V().clone(F.DEFAULT_NETWORK_REQUEST_BEHAVIOUR),this.networkRequestBehaviour);for(const k in B)Array.isArray(B[k])&&0===B[k].length&&(B[k]=void 0);try{let j=G.retryCount;0;const $=yield this._catalyst.cloudScript.setServiceUrlVersion("v2").useIdempotency(U).timeoutMS(G.timeoutMs).setRetryOption({retryCount:j,retryIntervalMS:G.retryIntervalMs,retryIncreamentMS:G.retryIncrementMs,retryMaxDelayMS:G.retryMaxDelayMs}).execute(k,B);if(!$.isOK())throw new K.r($.status,JSON.stringify($.data));const H=yield this._sideEffect.processEnvelope($.data);return F.assertResponseDataIdempotency(H,U)?H.response:H}catch(H){throw j.RQr.logError(H,`Error calling CloudScript ${k}`),H}}))}static assertResponseDataIdempotency(k,B){return B}};Y.DEFAULT_NETWORK_REQUEST_BEHAVIOUR={timeoutMs:1e4,retryCount:3,retryIntervalMs:1e3,retryIncrementMs:1e3,retryMaxDelayMs:1e4},Y._lastRequest=Promise.resolve(),(0,G.Cg)([(0,q.b)("00d-b27e"),(0,G.Sn)("design:type",W.X)],Y.prototype,"_catalyst",void 0),(0,G.Cg)([(0,q.b)("80c-6fa4"),(0,G.Sn)("design:type",Object)],Y.prototype,"_featureFlags",void 0),(0,G.Cg)([(0,q.b)("48b-b777"),(0,G.Sn)("design:type",z.zj)],Y.prototype,"_sideEffect",void 0),Y=F=(0,G.Cg)([(0,$.injectable)()],Y)},47255:(k,B,U)=>{"use strict";var F;U.d(B,{o:()=>F}),function(k){k.FunnelBossStatueModalPurchaseRematch="Boss-Statue-Modal-Purchase-Rematch",k.FunnelBuyMemberItem="Buy-Member-Item",k.FunnelSecondWheelSpin="Second-Wheel-Spin",k.FunnelEnterDarkTower="Enter-Dark-Tower",k.FunnelCatchMorePets="Catch-More-Pets",k.FunnelOpenMemberChestBattle="Open-Member-Chest-Battle",k.FunnelOpenMemberChestWorld="Open-Member-Chest-World",k.FunnelEquipNewLockedItem="Equip-New-Locked-Item",k.FunnelEquipBackpackLockedItem="Equip-Backpack-Locked-Item",k.FunnelEquipMemberLockedCostume="Equip-Member-Locked-Costume",k.FunnelEquipCardLockedItem="Equip-Card-Locked-Item",k.FunnelCatchPetAgain="Catch-Pet-Again",k.FunnelUseBoost="Use-Boost",k.FunnelClickHUDButton="Click-HUD-Button",k.FunnelEvolutionMemberLock="Evolution-Member-Lock",k.FunnelEvolutionInsufficientResource="Evolution-Insufficient-Resource",k.FunnelTileScreen="Tile-Screen-Load",k.FunnelCharSelect="Char-Select-Load",k.FunnelPVEBattleScreen="PVE-Battle-Screen-Load",k.FunnelPVPBattleScreen="PVP-Battle-Screen-Load",k.FunnelVideoPlayer="Video-Player",k.FunnelTransitMap="Transit-First-Map",k.FunnelClickMemberDance="Click-Member-Dance",k.FunnelFireTitanCatapult="Fire-Titan-Catapult",k.FunnelSelectMemberNickname="Select-Member-Nickname",k.FunnelClickMemberBounty="Click-Member-Bounty",k.FunnelClickMemberBoxMail="Click-Member-Box-Mail",k.FunnelEquipLevelLockedItem="Equip-Level-Locked-Item",k.FunnelCatchUpToClass="Catch-up-to-Your-Class",k.FunnelClickWizardWatch="Click-Wizard-Watch-CTA",k.FunnelCatchMemberLockedPet="Catch-Member-Locked-Pet",k.FunnelCatchEvolvedPet="Catch-Evolved-Pet",k.FunnelLoginScreen="login_screen_funnel",k.FunnelUltimatesTab="Ultimates-Tab",k.FunnelMythics21Q4="mythics",k.FunnelStarJar="NonMember-Star-Jar",k.FunnelUseMemberLockedItem="Use-Member-Locked-Item",k.FunnelNotEnoughCurrency="Not-Enough-Currency",k.FunnelNotEnoughCurrencyRifts="Not-Enough-Currency-Rifts",k.FunnelBattlePassMemberUnlock="Battle-Pass-Member-Unlock",k.FunnelMemberJar="Member-Jar",k.FunnelPostBattleMagicoinGetMemberRewards="Post-Battle-Magicoin-Get-Member-Rewards",k.FunnelLockedStadiumRoom="Locked-Stadium-Room",k.FunnelRiftRunMemberLockedOpponentOption="Rift-Run-Member-Locked-Opponent-Option",k.FunnelPetSlots="Pet-Slots",k.FunnelPetGear="Equip-Member-Locked-Pet-Gear",k.FunnelLootDash="Loot-Dash",k.FunnelSegmentedOffers="Segmented-Offers",k.FunnelChargedLevels="Charged-Levels",k.FunnelCurrencyConversion="Currency-Conversion",k.FunnelPrizeWheelPurchaseSpin="Prize-Wheel-Purchase-Spin",k.FunnelFestivalMemberQuest="Festival-Member-Quest",k.FunnelPetMergeNotEnoughCurrency="Pet-Merge-Not-Enough-Currency",k.FunnelMembersGetSevenLevels="Members-Get-Seven-Levels",k.FunnelWizardBank="wizard_bank",k.FunnelMemberLockedGoldRifts="Member-Locked-Gold-Rifts",k.StageClickItem="Click-Item",k.StageClickBuy="Click-Buy",k.StageClickMembership="Click-Membership",k.StageClickParentConfirmation="Click-Parent-Confirmation",k.StageClickSpinAgain="Click-Spin-Again",k.StageEnterTower="Enter-Tower",k.StageCatchPet="Catch-Pet",k.StageOpenChest="Open-Chest",k.StageEquipItem="Equip-Item",k.StageCatchPetFail="Catch-Pet-Fail",k.StageTryAgain="Try-Again",k.StageClickBoost="Click-Boost",k.StageClickStars="Click-Stars",k.StageClickButton="Click-Button",k.StageEvolutionSeeButton="Evolution-See-Button",k.StageEvolutionClickButton="Evolution-Click-Button",k.StageEvolutionEvolvePet="Evolve-Pet",k.StageEvolutionConverted="Evolution-Converted",k.StageTransitMap="Transit-Map",k.StageDanceStart="Dance",k.StageFireCatapult="Fire-Catapult",k.StageSelectNickname="Select-Nickname",k.StageClickBounty="Click-Bounty",k.StageEquipFromBackpack="Equip-From-Backpack",k.StageEquipFromPouch="Equip-From-Pouch",k.StageLoadStart="Load-Start",k.StageLoadEnd="Load-End",k.StageSaved="Character-Saved",k.StageVideoStart="Video-Start",k.StageVideoEnd="Video-Complete",k.StageCloseVideo="Close-Video",k.StageInsufficientCurrency="Insufficient-Currency",k.StageClickCTA="Click-CTA",k.StageSessionLoadGame="load_game",k.StageSessionLoadEnd="load_end",k.StageSessionLoadLogin="load_login",k.StageSessionLoadStart="load_start",k.StageClickMembershipBenefits="Click-Membership-Benefits",k.StageClickLockedItemBattlePass="Click-Item-Treasure-Track",k.StageClickGetMoreRevivesLootDash="Click-Get-More-Revives-Loot-Dash",k.StageClickRerollRiftBuff="Click-Reroll-Rift-Buff",k.StageClickRerollRiftOpponents="Click-Reroll-Rift-Opponents",k.StageClickRouletteSpinAgain="Click-Roulette-Spin-Again",k.StagePostBattleMagicoinClickGetMemberRewards="Post-Battle-Magicoin-Click-Get-Member-Rewards"}(F||(F={}))},325:(k,B,U)=>{"use strict";var F;U.d(B,{Q:()=>F}),function(k){k.Math="math",k.Science="science",k.ELA="ela"}(F||(F={}))},37629:(k,B,U)=>{"use strict";U.d(B,{c:()=>G});var F=U(62459);class G{constructor(k=null){this._jsonObject=null,this._jsonObject=k}setJson(k){this._jsonObject=k}getJson(){return this._jsonObject}getData(){const k=[];return this.encodeAsUrl(this._jsonObject,null,k),k.join("&")}getContentType(){return"application/x-www-form-urlencoded; charset=UTF-8"}encodeAsUrl(k,B,U){if(k instanceof Array)k.forEach(((k,F)=>{const G=`${B}[${F}]`;null!==k&&"object"==typeof k?this.encodeAsUrl(k,G,U):this.appendKeyValuePair(U,G,k)}));else if(null!==k&&"object"==typeof k)for(const G in k)k.hasOwnProperty(G)&&this.encodeAsUrl(k[G],F.Aq$.isDefined(B)?`${B}[${G}]`:G,U);else this.appendKeyValuePair(U,B,k)}appendKeyValuePair(k,B,U){null===U?k.push(`${B}=`):void 0!==U&&k.push(`${B}=${encodeURIComponent(U)}`)}}},80403:(k,B,U)=>{"use strict";U.d(B,{K:()=>H});var F,G=U(8674),j=U(62459),$=U(79687);let H=F=class{constructor(k,B,U){this._identityAuthProvider=k,this._httpClient=B,this._technicalMetricsManager=U}sendRequest(k,B,U,F){return(0,G.sH)(this,void 0,void 0,(function*(){const G=this.createRequest(k,B,null!=U?U:this.determineOperationName(k),F),j=yield this._httpClient.sendRequest(G);return this._technicalMetricsManager.increaseNetworkRequestCount(),j.wasSuccessful()?j.getData():Promise.reject(new Error(j.getErrorMessage()))}))}static responseIsGraphQLError(k){var B;return(null===(B=null==k?void 0:k.errors)||void 0===B?void 0:B.length)>0}static getGraphQLErrorCode(k){var B,U;if(F.responseIsGraphQLError(k))for(const F of k.errors){const k=F.extensions,G=null===(U=null===(B=null==k?void 0:k.response)||void 0===B?void 0:B.body)||void 0===U?void 0:U.errors;if((null==G?void 0:G.length)>0)for(const B of G)if(j.Aq$.isDefined(B.code))return B.code;if(j.Aq$.isDefined(k.code))return k.code}}createRequest(k,B,U,G){const $=Object.assign(Object.assign({},F.DEFAULT_NETWORK_REQUEST_BEHAVIOUR),G),H=new j.u1k;return H.setTimeout($.timeoutMs).setRetryCount($.retryCount).setHeader("apollographql-client-name","prodigy-game").setHeader("apollographql-client-version","1.0").setMethod(j.iXQ.Post).setRequestURI("graphql/").addRequestInterceptor(this._identityAuthProvider.authenticateRequest,this._identityAuthProvider).addResponseInterceptor(j.XKG.convertToJson).setBody(new j._A9({query:k,variables:B,operationName:U})),H}determineOperationName(k){const B=/^\s*(query|mutation|subscription)\s+(\w+)/i.exec(k);return null==B?void 0:B[2]}};H.DEFAULT_NETWORK_REQUEST_BEHAVIOUR={timeoutMs:1e4,retryCount:0,retryIntervalMs:1e3,retryIncrementMs:1e3,retryMaxDelayMs:1e4},H=F=(0,G.Cg)([(0,$.injectable)(),(0,G.Qj)(0,(0,$.inject)("40f-f847")),(0,G.Qj)(1,(0,$.inject)("30b-3020")),(0,G.Qj)(2,(0,$.inject)("2a1-fed9")),(0,G.Sn)("design:paramtypes",[Object,Object,Object])],H)},45716:(k,B,U)=>{"use strict";var F;U.d(B,{l:()=>F}),function(k){k.AllGood="NETWORK_ALL_GOOD",k.WrongUsernameOrPassword="WRONG_USERNAME_PASSWORD",k.CheckNetworkConnection="NETWORK_CHECK_CONNECTION",k.NetworkOffline="NETWORK_OFFLINE"}(F||(F={}))},10312:(k,B,U)=>{"use strict";U.d(B,{I:()=>_t});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U(99625),V=U(95066),W=U(36525),q=U(2952),K=U(17516),z=U(59287),Y=U(35120),Q=U(51477),X=U(34829),Z=U(73797),J=U(2272),tt=U(75329),et=U(98252),it=U(30405),st=U(51979),nt=U(78686),at=U(51151),rt=U(48417),ot=U(30628),ht=U(72042),ct=U(22023),dt=U(37629);var lt;!function(k){k.Math="MATH",k.English="ELA",k.Science="SCIENCE"}(lt||(lt={}));class ut{constructor(k,B,U,F,G,j,$,H,V){if(this.userID=null,this.genericAjaxError=()=>{},this.defaultSettings=null,this.defaultHandlers={},this.wasSocketConnected=!1,this.socketConnectUrl="",this.socketConnectParams={},this.worldID=0,this.gameContainer=null,this.zone=null,this.clientVersion=null,this.httpClient=null,this._jwtAuthProvider=null,this._tokenAuthProvider=null,this._identityAuthProvider=null,this.urlProvider=null,this.socketInterface=null,this.disconnectCountInSession=0,this.reconnectAttemptsCount=0,this._remoteLogger=null,this._worldName="",this.gameContainer=U,this.clientVersion=k.clientVersion,this.urlProvider=$,this.defaultSettings=ut.getDefaultSettings(this.urlProvider),this.httpClient=F,this._jwtAuthProvider=G,this._tokenAuthProvider=j,this._remoteLogger=H,this._identityAuthProvider=V,this.socketInterface=U.get("e2e-64d8"),this.game=U.get("51c-03a0"),null!==k)for(const W in k)void 0!==k[W]&&(this.defaultSettings[W]=k[W]);if(null!==B){const k=Object.keys(B),U=k.length;for(let F=0;F{G.VyI.log("client connected",G.$bb.Verbose),this.wasSocketConnected=!0},J=k=>{G.Aq$.isDefined(k)&&G.VyI.log(k,G.$bb.Error);const B=k,U=ut.getStatusKey(K,B.code.toString());G.Aq$.isDefined(B.code)&&G.Aq$.isDefined(U)?K[B.code](B.code,"joinMultiplayerServer"):q?q("joinMultiplayerServer",B.code):this.genericAjaxError("joinMultiplayerServer",B.code)},tt=()=>{this.socketInterface.removeListener(G.KZk.Connect,Z),this.socketInterface.removeListener(G.KZk.Connect,W),this.socketInterface.removeListener(G.KZk.Error,J);const k=ut.getStatusKey(K,"503","503");G.Aq$.isDefined(k)&&this.socketInterface.removeListener(G.KZk.ConnectError,K[k])};this.socketInterface.addListener(G.KZk.Connect,Z),this.socketInterface.addListener(G.KZk.Connect,W),this.socketInterface.addListener(G.KZk.Connect,tt),this.socketInterface.addListener(G.KZk.ConnectError,(k=>{G.VyI.log("connect_error",G.$bb.Verbose),G.VyI.log(k,G.$bb.Error),this.wasSocketConnected||(this.socketInterface.disconnect(),this.trackConnection(G.KZk.Disconnect))})),this.socketInterface.addListener(G.KZk.Error,J),this.socketInterface.addListener(G.KZk.Error,tt);const et=ut.getStatusKey(K,"503","503");return G.Aq$.isDefined(et)&&this.socketInterface.addListener(G.KZk.ConnectError,K[et]),this.socketInterface.addListener(G.KZk.ConnectError,tt),this.socketInterface.addListener(G.KZk.ReconnectAttempt,(()=>{G.Aq$.isDefined(this.zone)?X.zone=this.zone:G.Aq$.isDefined(X.zone)||delete X.zone,X.jwt=this._jwtAuthProvider.getToken(),this.socketInterface.setQuery(X)})),this.socketInterface.addListener(G.KZk.Message,(k=>{U(k)})),this.socketInterface.addListener(G.KZk.PlayerJoined,(k=>{G.VyI.log(`player Joined - playerId: ${k}`,G.$bb.Verbose),H(k)})),this.socketInterface.addListener(G.KZk.PlayerLeft,(k=>{G.VyI.log(`player Left - playerId: ${k}`,G.$bb.Verbose),V(k)})),this.socketInterface.addListener(G.KZk.PlayerList,(k=>{G.VyI.log("player list received",G.$bb.Verbose),F(k)})),this.socketInterface.addListener(G.KZk.Disconnect,(k=>{G.VyI.log("Disconnected from multiplayer server",G.$bb.Verbose),j(k),this.trackConnection(G.KZk.Disconnect)})),this.socketInterface.addListener(G.KZk.Reconnect,(()=>{G.VyI.log("Reconnected to the multiplayer server",G.$bb.Verbose),this.trackConnection(G.KZk.Reconnect),$()})),this.socketInterface.addListener(G.KZk.Reconnecting,(()=>{this.trackConnection(G.KZk.Reconnecting)})),!0}trackConnection(k){const B=new Date;if(k===G.KZk.Disconnect)this.disconnectTime=B,this.disconnectCountInSession++;else if(k===G.KZk.Reconnecting)this.reconnectAttemptsCount++;else if(k===G.KZk.Reconnect){if(this.disconnectTime){const k=Y.q.instance.prodigy.gameContainer,U=B.getTime()-this.disconnectTime.getTime();k.get("fab-547a").getData().then((([,B])=>{const F={disconnectTime:this.disconnectTime,disconnectPeriod:Math.round(U/1e3),disconnectCountInSession:this.disconnectCountInSession,reconnectAttemptsCount:this.reconnectAttemptsCount},j=k.get("e20-0fb0").player;G.Aq$.isDefined(j.primaryParentID)&&(F.parentID=j.primaryParentID)})),k.get("c47-20b6").connection.sendServerReconnectedEvent({name:this._worldName,duration:U/X.A.SECONDS_TO_MILLISECONDS_MULTIPLIER,disconnect_time:this.disconnectTime.getTime()/X.A.SECONDS_TO_MILLISECONDS_MULTIPLIER,disconnect_count:this.disconnectCountInSession,reconnection_attempt_count:this.reconnectAttemptsCount.toString()})}else G.VyI.log("Could not log reconnect event as disconnect event never occurred.",G.$bb.Warning);this.reconnectAttemptsCount=0}G.VyI.log(`Multiplayer Socket ${k} at ${B.toLocaleString()}`,G.$bb.Verbose)}emitMessage(k,B){return null!==this.assignHandlers(B,["200"],"emit message")&&null!==this.socketInterface&&(this.socketInterface.emitEvent(G.KZk.Message,k),!0)}getWorldList(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.multiplayer}worlds`,{},"getWorldList",k,B,U)}))}getCharacter(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=this.gameContainer.get("00d-b27e"),F=rt.D.Character.GetFieldsOnInitialLogin,G={fields:[]};try{const j=yield U.cloudScript.useIdempotency(!1).execute(F,G);if(j.isOK()){const B=Object.keys(j.data)[0];k(j.data[B],j.status)}else B("getCharacter",j.status)}catch(j){const k=j;(null==k?void 0:k.errorInfo)?B("getCharacter",k.errorInfo.status):B("getUser",500)}}))}static isSuccess(k){return 200===k}static isError(k){return k/100>=4}static httpStatusCodeToString(k){let B;const U={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",408:"Timeout Error",409:"Conflict",426:"Upgrade required",500:"Internal Server Error",503:"Service Not Available"};return B=k in U?U[k]:"No defined Handler detected for ErrorCode",B+=` [${k}]`,B}processRequestResponse(k,B,U,F,j){if(B.wasSuccessful()&&ut.isSuccess(k))j&&k in j?j[k](k,void 0,B.getData()):U&&U(B.getData(),k);else{B.wasSuccessful()&&!ut.isSuccess(k)?G.VyI.log(`http response code is not 200 [${k}] - treat as failed`,G.$bb.Warning):ut.isError(k)?G.VyI.log(ut.httpStatusCodeToString(k),G.$bb.Error):G.VyI.log(`No defined Handler detected [${k}]`,G.$bb.Warning);let U=ut.getStatusKey(j,k.toString());G.Aq$.isDefined(U)?j[U](k,B.getErrorMessage()):(U=ut.getStatusKey(this.defaultHandlers,k.toString()),G.Aq$.isDefined(U)?this.defaultHandlers[U](k,B.getErrorMessage()):F?F(B.getErrorMessage(),k):this.genericAjaxError(B.getErrorMessage(),k))}}loginSDK(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this.gameContainer.get("00d-b27e"),B=this.gameContainer.get("40f-f847"),U=Y.q.instance.prodigy.gameContainer.get("a03-308f"),F={sessionID:this.gameContainer.get("2e6-0f71").getUUID()};return k.authHandler.login(F).then((F=>{this.userID=F.data.userID,this._tokenAuthProvider.setSessionToken(this.userID,F.data.authToken);const G=nt.read(F.data.token);return U.setServerTime(1e3*G.claim.iat),k.setToken("Authorization",`Bearer ${F.data.token}`,!0,!1),k.authHandler.setCallback("onSetIdentityJWT",B.setAuthorizationToken.bind(B)),window.SW.Load.userInfo=()=>JSON.stringify({accessToken:F.data.identityToken,premises:F.data.premises,name:F.data.name}),{data:F.data,status:F.status}}))}))}login(k,B,U){if(this._tokenAuthProvider.isLoggedIn())return!1;const F=this.gameContainer.get("00d-b27e");return(null==F?void 0:F.authHandler)&&this.loginSDK().then((B=>{k(B.data,B.status)})).catch((k=>{B(k.message,k.code)})),!0}attachStudentUsingClassCode(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){const F=yield this.sendGraphQLRequest("\n mutation JoinClassroom($code: ClassCode!) {\n joinClassroom(input: { code: $code }) {\n classroomJoined\n classroom {\n id\n }\n player {\n grade {\n id\n number\n }\n chosenGrade {\n id\n number\n }\n classrooms {\n id\n code\n }\n }\n }\n }\n",{code:k});this.processRequestResponse(F.getHttpStatusCode(),F,B,U,G)}))}setCurriculum(k,B,U,G,j){return(0,F.sH)(this,void 0,void 0,(function*(){const F=yield this.sendGraphQLRequest("\n mutation setCurriculum($subject: Subject!, $curriculumId: ID!) {\n setCurriculum(input: {curriculumId: $curriculumId}) {\n viewer {\n curriculum(subject: $subject) {\n node {\n id\n }\n }\n chosenGrade(subject: $subject) {\n number\n }\n }\n }\n }\n",{subject:B,curriculumId:k});this.processRequestResponse(F.getHttpStatusCode(),F,U,G,j)}))}setInitialGrades(k,B,U,G,j){return(0,F.sH)(this,void 0,void 0,(function*(){const F=yield this.sendGraphQLRequest("\n mutation setInitialGrades($subject: Subject!, $grade: GradeNumber!) {\n setInitialGrades(input: {grade: $grade }) {\n viewer {\n curriculum(subject: $subject) {\n node {\n id\n }\n }\n chosenGrade(subject: $subject) {\n number\n }\n }\n }\n }\n",{subject:B,grade:k});this.processRequestResponse(F.getHttpStatusCode(),F,U,G,j)}))}updatePlayerGrade(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.sendGraphQLRequest("\n mutation UpdateGradeFromAlgorithm($grade: GradeNumber!) {\n _updateDataForAlgorithm(input: { grade: $grade }) {\n player {\n id\n grade {\n id\n number\n }\n }\n }\n }\n",k)}))}logout(){this.userID=null,this.socketInterface&&this.socketInterface.disconnect();const k=window.gameLoaderLogout;k&&k(),et.pF.isNewMobileLogin()||window.SW.Load.redirectToLauncher(window.launcherUrl)}updateCharacter(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=Date.now();if(B&&U&&this._jwtAuthProvider.isLoggedIn()){const j=this.gameContainer.get("00d-b27e"),$=rt.D.Character.Update,H={data:k,userID:this.userID};try{const k=yield j.cloudScript.useIdempotency(!1).execute($,H),G=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player;if(X.A.get("GameConstants.Build.ENABLE_LOADING_METRICS")&&it.o.inTestGroups(G,ht.U.TEST_GROUPS)){const k=Date.now()-F,B=new W.i;B.setKey("prodigy_game.gameAPI.RTT"),B.setValue(k),this._remoteLogger.logStat(B,V.d.Timing)}k.isOK()?B(k.data,k.body):U(k)}catch(G){const k=G;(null==k?void 0:k.errorInfo)?U({status:k.errorInfo.status,data:k.errorInfo.result}):U({status:500,data:"Internal Server Error"})}return!0}return!1}))}leaveZone(){null!==this.socketInterface&&(this.zone=null,this.socketInterface.emitEvent("leaveZone"))}joinZone(k){null!==this.socketInterface&&(this.zone=k,this.socketInterface.emitEvent("joinZone",k))}refreshMultiplayer(){null!==this.socketInterface&&this.socketInterface.emitEvent("refresh",{})}getClassCodes(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.sendGraphQLRequest("\n query fetchAllClassCodes {\n player {\n id\n classrooms {\n id\n code\n }\n }\n }\n");return k.wasSuccessful()?k.getData():Promise.reject(new Error("Failed to get class code data from server"))}))}getCurrentClassCode(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=yield this.sendGraphQLRequest("\n query fetchCurrentClassCode {\n player {\n id\n currentClassroom {\n id\n code\n }\n }\n }\n");return k.wasSuccessful()?k.getData():Promise.reject(new Error("Failed to get current class code data from server"))}))}getCurriculumAndGrade(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){var U,F,j;let $;switch(B){default:case lt.Math:$="\n query mathCurriculumAndGrades {\n viewer {\n curriculum(subject: MATH) {\n node {\n id\n }\n }\n chosenGrade(subject: MATH) {\n value: number\n }\n }\n }\n"}const H=yield this.sendGraphQLRequest($);if(!H.wasSuccessful())return Promise.reject(new Error("Failed to get curriculum and grade from the server"));const V=H.getData(),W={userID:k.userID,goalId:k.goalId};return G.Aq$.isDefined(null===(F=null===(U=V.data.viewer.curriculum)||void 0===U?void 0:U.node)||void 0===F?void 0:F.id)&&(W.curriculumTreeID=V.data.viewer.curriculum.node.id),G.Aq$.isDefined(null===(j=V.data.viewer.chosenGrade)||void 0===j?void 0:j.value)&&(W.grade=V.data.viewer.chosenGrade.value,W.chosenGrade=V.data.viewer.chosenGrade.value),W}))}updateStrandBasedPlacementTest(k,B,U,j,$){return(0,F.sH)(this,void 0,void 0,(function*(){const F=`${this.defaultSettings.url.education}v4/placement-tests/instance/${k}/${this.userID}`,H=(new G.u1k).setBaseURI(F).setBody(new dt.c(B)).addRequestInterceptor(this._identityAuthProvider.authenticateRequest,this._identityAuthProvider).setMethod(G.iXQ.Post);return this.httpClient.sendRequest(H).then((k=>{this.processRequestResponse(k.getHttpStatusCode(),k,U,j,$)}))}))}getVideoLessonSignedUrls(k,B,U,j,$){return(0,F.sH)(this,void 0,void 0,(function*(){const F=`${this.defaultSettings.url.education}v4/users/${this.userID}/signed-urls/video-lessons`,H=(new G.u1k).setBaseURI(F).addRequestInterceptor(this._identityAuthProvider.authenticateRequest,this._identityAuthProvider).addResponseInterceptor(G.XKG.convertToJson).setQueryParameter("videoURL",k).setQueryParameter("captionsURL",B);return this.httpClient.sendRequest(H).then((k=>{this.processRequestResponse(k.getHttpStatusCode(),k,U,j,$)}))}))}updatePlanStudent(k,B,U){const F={planId:k};U||(F.currentSkillId=B);this.defaultSettings.loader;this.sendGraphQLRequest(U?"\n mutation failFromPlanMutation($planId: ID!) {\n failFromPlan(input: { planId: $planId }) {\n failedAt\n }\n }\n":"\n mutation updateCurrentSkillForPlanMutation($planId: ID!, $currentSkillId: ID!) {\n updateCurrentSkillForPlan(input: { planId: $planId, currentSkillId: $currentSkillId }) {\n currentSkillId\n }\n }\n",F)}updatePlacementTest(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.sendGraphQLRequest("\n mutation completePlacementTestMutation(\n $curriculumId: ID\n $finalGradeNumCompletePercentage: Float\n $grade: GradeNumber!\n $placementTestInstanceId: ID\n $subject: Subject\n $studentDataGrade: PositiveInt\n $studentDataCurriculumId: ID\n $studentDataChosenGrade: PositiveInt\n ) {\n completePlacementTest(\n input: {\n curriculumId: $curriculumId\n finalGradeNumCompletePercentage: $finalGradeNumCompletePercentage\n grade: $grade\n placementTestInstanceId: $placementTestInstanceId\n subject: $subject\n studentDataGrade: $studentDataGrade\n studentDataCurriculumId: $studentDataCurriculumId\n studentDataChosenGrade: $studentDataChosenGrade\n }\n ) {\n player {\n id\n }\n }\n }\n",k)}))}saveAnswer(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("post",`${this.defaultSettings.url.answer}users/${this.userID}/answers`,k,"saveAnswer",B,U,G)}))}getUser(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){const F=this.gameContainer.get("00d-b27e"),j=rt.D.Character.GetMultiple,$={userIDs:k.split(","),fields:B};try{const k=yield F.cloudScript.useIdempotency(!1).execute(j,$);k.isOK()?U(k.data,k.status):G("getUser",k.status)}catch(H){const k=H;(null==k?void 0:k.errorInfo)?G("getUser",k.errorInfo.status):G("getUser",500)}}))}getTitans(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.titan}v1/titans`,{userID:this.userID},"getTitans",k,B,U)}))}getTitan(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.titan}v1/titan/${k}`,{userID:this.userID},"getTitan",B,U,G)}))}hitTitan(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("post",`${this.defaultSettings.url.titan}v1/titan/${k}/hit`,{userID:this.userID,hits:1},"hitTitan",B,U,G)}))}getTitanUserData(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.titan}v1/titan/user/${this.userID}`,{},"getTitanUserData",k,B,U)}))}startMatchmaking(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=B.appearance,F=B.getPlayerData().playerTransformation,j=this.gameContainer.get("03c-6e1e"),$=at.DuelInviteProto.create({userID:B.userID,team:B.data.team,member:B.hasMembership()?1:0,level:B.getChargedLevelCumulative(),appearance:{faceID:U.getFace(),hair:{styleID:U.getHair().style,colorID:U.getHair().color},skinColorID:U.getSkinColor(),eyeColorID:U.getEyeColor(),morph:F?{type:F.transformType,ID:F.transformID}:null},equipment:{hatID:B.equipment.getHat(),bootsID:B.equipment.getBoots(),weaponID:B.equipment.getWeapon(),outfitID:B.equipment.getOutfit()},name:{first:U.getName().getFirstName(),middle:U.getName().getMiddleName(),last:U.getName().getLastName(),nick:U.getName().getNickname()}}),H={"force new connection":!0,reconnection:!1,transports:["websocket"],reconnectionDelay:1e4,reconnectionDelayMax:15e3,reconnectionAttempts:10,pingInterval:6e3,pingTimeout:6e3,query:{userId:this.userID,jwt:this.jwtAuthProvider.getToken(),level:B.getChargedLevelCumulative(),playerData:JSON.stringify({data:ot.B.toArray(at.DuelInviteProto,$)}),bucketId:k,maxRange:this.getMatchmakingMaxRange(),maxWait:this.getMatchmakingMaxWait(),effectivePetLevels:ct.P8.getTeamsEffectiveLevels()},secure:this.defaultSettings.url.matchmaking.startsWith("https://"),path:this.defaultSettings.path.matchmaking},V=new G.bnh;j.connect(this.defaultSettings.url.matchmaking,null,H);const W=()=>{G.VyI.log("client connected to matchmaking",G.$bb.Verbose),V.resolve(!0)},q=k=>{G.Aq$.isDefined(k)&&G.RQr.logError(k,"Error connecting to the matchmaking service");const B=k;G.Aq$.isDefined(B.code)&&this.genericAjaxError("joinMatchmakingService",B.code),V.resolve(!1)};j.addListener(G.KZk.ConnectError,(k=>{G.VyI.log("connect_error",G.$bb.Verbose),G.VyI.log(k,G.$bb.Error),V.resolve(!1)}));const K=()=>{j.removeListener(G.KZk.Connect,W),j.removeListener(G.KZk.Connect,K),j.removeListener(G.KZk.Error,q),j.removeListener(G.KZk.Error,K)};return j.addListener(G.KZk.Connect,W),j.addListener(G.KZk.Connect,K),j.addListener(G.KZk.Error,q),j.addListener(G.KZk.Error,K),V}))}getMatchmakingMaxRange(){return 3}getMatchmakingMaxWait(){return 10}quitMatchmaking(){this.gameContainer.get("03c-6e1e").disconnect()}getFriendList(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.friend}v1/friend/${this.userID}`,{offset:0,limit:0},"getFriendList",k,B,U)}))}getTotalFriendRequests(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/countFriendRequest`,{},"getTotalFriendRequests",k,B,U)}))}getFriendRequestList(k,B,U,G,j){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/request`,{offset:k,limit:B},"getFriendRequestList",U,G,j)}))}sendFriendRequest(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("post",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/add/${k}`,{},"sendFriendRequest",B,U,G)}))}cancelFriendRequest(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("delete",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/cancel/${k}`,{},"cancelFriendRequest",B,U,G)}))}acceptFriendRequest(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("post",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/accept/${k}`,{},"acceptFriendRequest",B,U,G)}))}rejectFriendRequest(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("delete",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/reject/${k}`,{},"rejectFriendRequest",B,U,G)}))}removeFriend(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("delete",`${this.defaultSettings.url.friend}v1/friend/${this.userID}/remove/${k}`,{},"removeFriend",B,U,G)}))}getGiftBoxes(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("get",`${this.defaultSettings.root}v1/users/${this.userID}/giftboxes`,{},"getGiftBoxes",k,B,U)}))}updateGiftBox(k,B,U,G,j){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("post",`${this.defaultSettings.root}v1/users/${this.userID}/giftbox/${k}`,{giftBoxData:JSON.stringify(B)},"updateGiftBox",U,G,j)}))}addGiftBox(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.request("post",`${this.defaultSettings.root}v1/users/${this.userID}/giftboxes`,{giftBoxID:k},"addGiftBox",B,U,G)}))}completeAssignment(k,B){return null!==this.assignHandlers(B,["200"],"completeStudentAssignment")&&(this.sendGraphQLRequest("\n mutation completeAssignment($assignmentId: ID!) {\n completeAssignment(input: { id: $assignmentId }) {\n assignment {\n id\n }\n }\n }\n",{assignmentId:k}),!0)}getStudentData(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=k,U=yield this.sendGraphQLRequest("\n query fetchStudentData ($subject: Subject!) {\n player {\n id\n curriculum (subject: $subject) {\n id\n subject\n }\n chosenGrade (subject: $subject) {\n chosenGradeNumber: number\n }\n grade (subject: $subject) {\n gradeNumber: number\n }\n goal (subject: $subject) {\n id\n }\n }\n }\n",{subject:B});if(!U.wasSuccessful())return Promise.reject(new Error("Failed to get student data from server"));return U.getData().data}))}static getDefaultSettings(k){const B=`${k.getAPIRootUrl()}/`,U=`${k.getMatcherApiRootUrl()}/`,F=`${k.getLoaderUrl()}/`;return{version:"v1",root:`${F}game-api/`,loader:F,url:{matchmaking:U,multiplayer:`${B}multiplayer-api/`,friend:`${B}friend-api/`,mailer:`${B}game-mailer-api/`,education:`${F}education-api/`,titan:`${B}titan-api/`,gameAPI:`${B}game-api/`,answer:`${k.getAnswerURL()}/`,websocket:U},path:{matchmaking:"/game-matcher-api/socket.io/"}}}sendGraphQLRequest(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return this.httpClient.sendRequest((new G.u1k).addRequestInterceptor(this._identityAuthProvider.authenticateRequest,this._identityAuthProvider).setHeader("userID",`${this.userID}`).setHeader("usertype","student").setHeader("apollographql-client-name","prodigy-game").setHeader("apollographql-client-version","1.0").setMethod(G.iXQ.Post).setRequestURI("graphql/").setBody(new G._A9({query:k,variables:B})).addResponseInterceptor(G.XKG.convertToJson))}))}}var ft,bt,pt=U(325),vt=U(35564),gt=U(69698),mt=U(21314),yt=U(70330);!function(k){k.Info="info",k.PlayerLeft="playerLeft",k.PlayerJoined="playerJoined"}(bt||(bt={}));let _t=ft=class{get OnSocketMessage(){return this.onSocketMessage}get OnPlayerJoinedSignal(){return this.onPlayerJoinedSignal}get OnPlayerLeftSignal(){return this.onPlayerLeftSignal}get OnPlayerListSignal(){return this.onPlayerListSignal}get characterProcessed(){return this._characterProcessed}set characterProcessed(k){this._characterProcessed=k}constructor(k,B,U,F){this.loggedIn=!1,this._characterProcessed=!1,this.offlineTimer=-1,this.socketConnected=!0,this.onPlayerSaved=new G.HN0,this.saving=!1,this.processPlayer=!1,this.processFriendsList=!1,this.hasFailedUpdate=!1,this.isActivityDialogOpen=!1,this._isTokenExpiredMessageOpen=!1,this.expiredToken=!1,this.onSocketMessage=new G.HN0,this.onPlayerJoinedSignal=new G.HN0,this.onPlayerLeftSignal=new G.HN0,this.onPlayerListSignal=new G.HN0,this.onSocketReconnect=new G.HN0,this._multiplayerWorldSuccessHandler=null,this._multiplayerWorldErrorHandler=null,this._multiplayerWorldFullErrorHandler=null;const j=Y.q.instance.prodigy.gameContainer;this.game=k,this.timeManager=B,this.metricsManager=F,this._sessionTokenAuthProvider=j.get("f7c-2e57"),this.jwtAuthProvider=j.get("330-3c25"),this._identityAuthProvider=j.get("40f-f847"),this._playerDataProvider=j.get("e20-0fb0"),this._subjectProvider=j.get("f1d-f7b1"),this._multiplayerMessageService=j.get("c35-2f95"),this.api=new ut({clientVersion:this.game.clientVersion},{},j,j.get("30b-3020"),j.get("330-3c25"),this._sessionTokenAuthProvider,U,j.get("e59-eea6"),this._identityAuthProvider),this.api.setErrorHandler(this.onError.bind(this));const $=j.get("30b-3020");$.setDefaultResponseHandler(418,this.showInvalidCharacterPopup,this),$.setDefaultResponseHandler(403,this.showTokenExpiredPopup,this),$.setDefaultResponseHandler(412,this.onReadOnlyCharacter,this),setInterval(this.updateCharacter.bind(this),3e3)}onReadOnlyCharacter(){var k,B;G.VyI.log("HTTP 412: Read-only character cannot login",G.$bb.Warning);try{null===(B=null===(k=window.localStorage)||void 0===k?void 0:k.removeItem)||void 0===B||B.call(k,"autoLogin")}catch(F){}const U=Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);Y.q.instance.prodigy.open.informationDialog(new tt.Z(U.getText("SETTINGS_LOGOUT"),(()=>this.logout(!0)),J.E.Small,500,U.getText("ERROR"),U.getText("READ_ONLY_CHARACTER_LOGIN"),void 0,void 0,void 0,H.l.ErrorDialogHeader,H.l.ErrorDialogFooter))}updatePlayerPositionOnMap(){this.lastPlayerPosition&&this.emitMessage({action:vt.x.Move,data:{target:this.lastPlayerPosition}}),this.lastPlayerPositionTimer&&clearTimeout(this.lastPlayerPositionTimer),this.lastPlayerPositionTimer=null}static openWebsite(k,B=!0,U=!0){try{const F=U?`https://${k}`:k,j=G.o5U.isSafari()&&G.o5U.isIOS();et.pF.isNativeApp()&&et.pF.appType()===et.uC.NATIVE_APP?window.postMessage(JSON.stringify({type:"OPEN_URL_IN_BROWSER",payload:F}),window.location.origin):B&&!j?window.open(F):window.location.href=F}catch(e){}}getErrorMessage(k,B,U=!0){const F=Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);let j="NETWORK_ERROR";return G.Aq$.isDefined(k)&&G.Aq$.isDefined(B)?j=B[k]:G.Aq$.isDefined(B)&&(j=B[0]),U?F.getText(j):j}sendZoneEvent(k){const B=Y.q.instance.prodigy.world.getCurrentMap();if(G.Aq$.isDefined(B)){2!==B.split("-").length&&G.VyI.log(`Zone event failed to send for current map ${B}`,G.$bb.Warning)}}onError(k,B){G.VyI.log(`FAIL : ${k}, ${B}`,G.$bb.Verbose),null===this.updateFailedTime&&this.loggedIn&&G.Aq$.isDefined(k)&&-1!==k.indexOf("update")&&(this.updateFailedTime=this.timeManager.getLocalTimeMs(),G.VyI.log("logout countdown",G.$bb.Verbose))}generalErrorHandler(k,B,U,F,j){if(426===U)return G.VyI.log(`NetworkManager.generalErrorHandler[${k}] - httpResponseCode ${U} - version error`,G.$bb.Warning),void this.versionError();B?B(`NetworkManager.generalErrorHandler[${k}] - ${F}`,U):G.VyI.log(`NetworkManager.generalErrorHandler[${k}] - httpResponseCode ${U}`,G.$bb.Verbose)}getCharData(k,B){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U=(()=>{}),F=(()=>{})){return this.api.getUser(k,B,U,((k,B)=>{this.generalErrorHandler("getCharData",F,B,k)}))}))}initGoingOffline(){-1===this.offlineTimer&&this.loggedIn&&(this.offlineTimer=this.timeManager.getLocalTimeMs()+7e4,this.offlineMessage="NETWORK_GOING_OFFLINE")}getWorldList(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){try{const B=yield this._multiplayerMessageService.getWorldList();k(B.data,200)}catch(U){B("",U.errorInfo.status)}return{}}))}startMatchmaking(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.api.startMatchmaking(k)}))}quitMatchmaking(){this.api.quitMatchmaking()}joinMultiplayerServer(k,B,U,F,j){this.world=k;Y.q.instance.prodigy.gameContainer.get("779-a746").joinWorldChannel(k.name,this.processWorldMessage.bind(this),this.processAllWorldSubscriptionError.bind(this)).catch(G.RQr.createHandler("Error joining world channel")),this._multiplayerWorldSuccessHandler=U,this._multiplayerWorldErrorHandler=F,this._multiplayerWorldFullErrorHandler=j}isMultiplayerZone(k){const B=Y.q.instance.prodigy.world;return!(k.isCutscenePlaying||0===k.zoneName.indexOf("scene-")||k.zoneName===st.W||B.isZoneSinglePlayer(k.zoneName))}joinZone(k){var B;if(this.zone=k,!this.loggedIn||!this.characterProcessed)return;const U=Y.q.instance.prodigy.gameContainer.get("779-a746");U.isSubscribedToWorld()&&(this.isMultiplayerZone(this.zone)?(U.joinLocationChannel(z.K.getZoneMapChannelName(this.world.name,this.zone.zoneName),this.processZoneLocationMessage.bind(this),this.processZoneMapSubscriptionError.bind(this),this.processZoneMapDisconnection.bind(this),this.processZoneMapReconnection.bind(this),null===(B=k.onSubscribed)||void 0===B?void 0:B.bind(k)).catch(G.RQr.createHandler("Error joining map channel")),U.onNotificationReceived.has(this.handleNotificationMessages,this)||U.onNotificationReceived.add(this.handleNotificationMessages,this)):U.leaveLocationChannel().catch(G.RQr.createHandler("Error leaving map channel")))}leaveZone(){if(this.zone=null,!this.loggedIn||!this.characterProcessed)return;const k=Y.q.instance.prodigy.gameContainer.get("779-a746");k.onNotificationReceived.has(this.handleNotificationMessages,this)&&(k.leaveLocationChannel().catch(G.RQr.createHandler("Error leaving map channel")),k.onNotificationReceived.remove(this.handleNotificationMessages,this)),this.lastPlayerPosition=null}refreshMultiplayer(){this.api.refreshMultiplayer()}setZone(k){this.zone=k}attachClassCode(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return this.api.attachStudentUsingClassCode(k,((k,F)=>{var j,$,H;const V=null===(j=null==k?void 0:k.data)||void 0===j?void 0:j.joinClassroom;if(null==V?void 0:V.classroomJoined){const U=null===(H=null===($=V.player)||void 0===$?void 0:$.classrooms)||void 0===H?void 0:H.map((k=>parseInt(k.id))).filter((k=>!Number.isNaN(k)));if(U)return this._playerDataProvider.player.classIDs=U,void B(k,F)}G.VyI.log("JoinClassroom request did not return the expected response",G.$bb.Error),U()}),((k,B)=>{this.generalErrorHandler("attachClassCode",U,B,k)}))}))}emitMessage(k){if(!this.canUseMultiplayer()||!this.zone)return!1;ft.emitMessageCount++,G.Aq$.isDefined(k.action)&&G.VyI.log(`[${ft.emitMessageCount}] emitMessage called action: ${k.action}`,G.$bb.Verbose);if(!Y.q.instance.prodigy.gameContainer.get("779-a746").isSubscribedToWorld()||G.Aq$.isDefined(this.zone.zoneName)&&!this.isMultiplayerZone(this.zone))return!1;const B=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=z.K.getZoneMapChannelName(this.world.name,this.zone.zoneName);switch(k.action){case vt.x.FX:return this._multiplayerMessageService.sendFXMessage(z.K.getZoneMapChannelName(this.world.name,this.zone.zoneName),k.data.type,k.data.x,k.data.y).catch(G.RQr.createHandler("Could not send fx message")),!0;case vt.x.Move:return Y.q.instance.prodigy.gameContainer.get("779-a746").moveOnArea(k.data.target).catch(G.RQr.createHandler("Could not send move message")),this.lastPlayerPosition=k.data.target,!0;case vt.x.Chat:return this._multiplayerMessageService.sendChatMessage(U,k.data.emoteID,k.data.danceID,k.data.chatID).catch(G.RQr.createHandler("Could not send chat message")),!0;case vt.x.Transform:return B.forceSaveCharacter((()=>{const U=z.K.getZoneMapChannelName(this.world.name,this.zone.zoneName);this._multiplayerMessageService.sendTransformMessage(U,k.data.showEffect,k.data.transformID,k.data.transformType).catch(G.RQr.createHandler("Could not send transform message")),this._multiplayerMessageService.updateCachedAppearance(U,B.getID()).catch(G.RQr.createHandler("Could not send update cached appearance"))})),B.saveEnabled=!1,!0;case vt.x.HostTeam:return this._multiplayerMessageService.sendCoopHostTeamMessage(U,k.data.hostID,k.data.teamMembers,k.data.streak,k.data.readyMembers).catch(G.RQr.createHandler("Could not send Coop Host Team message")),!0;case vt.x.TeamDisbanded:return this._multiplayerMessageService.sendCoopTeamDisbandedMessage(U,k.data.hostID).catch(G.RQr.createHandler("Could not send Coop Team disbanded message")),!0;case vt.x.JoinTeam:return this._multiplayerMessageService.sendCoopJoinTeamMessage(U,k.data.hostID,k.data.teamMembers,k.data.streak,k.data.readyMembers,k.target).catch(G.RQr.createHandler("Could not send Coop Join Team message")),!0;case vt.x.TeamUpdated:return this._multiplayerMessageService.sendCoopTeamUpdatedMessage(U,k.data.hostID,k.data.teamMembers,k.data.streak,k.data.readyMembers).catch(G.RQr.createHandler("Could not send Coop Team Updated message")),!0;case vt.x.RequestJoinTeam:return this._multiplayerMessageService.sendCoopTeamRequestJoinMessage(U,B.getID(),k.target).catch(G.RQr.createHandler("Could not send Coop Request Join Team message")),!0;case vt.x.PlayerLeftTeam:return this._multiplayerMessageService.sendCoopPlayerLeftTeamMessage(U,B.getID(),k.target).catch(G.RQr.createHandler("Could not send Coop Player Left Team message")),!0;case vt.x.StartCoOpTitanMatch:return this._multiplayerMessageService.sendCoopStartCoopTitanMatchMessage(U,k.data,k.target).catch(G.RQr.createHandler("Could not send Coop Stat Match message")),!0;case vt.x.HostHeartbeat:return this._multiplayerMessageService.sendCoopHostHeartbeatMessage(U,{}).catch(G.RQr.createHandler("Could not send Coop Host Heartbeat message")),!0;case vt.x.SyncHealth:return this._multiplayerMessageService.sendCoopSyncHealthMessage(U,k.data.crystalHP,k.data.titanHP).catch(G.RQr.createHandler("Could not send Sync health message")),!0;case vt.x.QuestionAnswered:return this._multiplayerMessageService.sendCoopQuestionAnsweredMessage(U,k.target,k.data.sourcePlayerID,k.data.correct).catch(G.RQr.createHandler("Could not send question answered message")),!0;case vt.x.PlayerAttacked:return this._multiplayerMessageService.sendCoopPlayerAttackedMessage(U,k.data.sourcePlayerID,k.data.missed,k.data.titanHealth,k.data.damage,k.data.spellID).catch(G.RQr.createHandler("Could not send player attacked message")),!0;case vt.x.TitanAttacked:return this._multiplayerMessageService.sendCoopTitanAttackedMessage(U,k.data.missed,k.data.crystalHealth,k.data.damage,k.data.spellID).catch(G.RQr.createHandler("Could not send titan attacked message")),!0;case vt.x.TitanDefeated:return this._multiplayerMessageService.sendCoopTitanDefeatedMessage(U).catch(G.RQr.createHandler("Could not send titan defeated message")),!0;case vt.x.PlayersDefeated:return this._multiplayerMessageService.sendCoopPlayersDefeatedMessage(U).catch(G.RQr.createHandler("Could not send players defeated message")),!0;case vt.x.JoinTeamFailed:return this._multiplayerMessageService.sendCoopJoinTeamFailedMessage(U,k.target,k.data.reason).catch(G.RQr.createHandler("Could not send join team failed message")),!0;case vt.x.PlayerRejoinTeam:return this._multiplayerMessageService.sendCoopRejoinJoinTeamMessage(U,k.target,B.getID()).catch(G.RQr.createHandler("Could not send rejoin team message")),!0;case vt.x.Catapult:return this._multiplayerMessageService.sendCoopCatapultMessage(U,B.getID()).catch(G.RQr.createHandler("Could not send catapult team message")),!0;case vt.x.Change:return B.forceSaveCharacter((()=>{const k=z.K.getZoneMapChannelName(this.world.name,this.zone.zoneName);this._multiplayerMessageService.sendChangeAppearanceMessage(k).catch(G.RQr.createHandler("Could not send change appearance message")),this._multiplayerMessageService.updateCachedAppearance(k,B.getID()).catch(G.RQr.createHandler("Could not send update cached appearance"))})),B.saveEnabled=!1,!0;case vt.x.Info:return k.data.coOpTeam&&this._multiplayerMessageService.sendCoopTeamMessage(U,$.pick(k.data,ft.MESSAGE_SCHEMAS.info)).catch(G.RQr.createHandler("Could not send change appearance message")),!0}return!1}onMessage(k,B=!0){if(this.canUseMultiplayer()&&this.zone){const U=ft.MESSAGE_SCHEMAS[k.action];B&&G.Aq$.isDefined(U)&&ft.decompressMessage(k,U),this.onSocketMessage.dispatch(k),G.Aq$.isDefined(this.zone.onMessage)&&this.zone.onMessage(k)}}getFriendsList(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return X.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(G.VyI.log("Test get friend list",G.$bb.Verbose),this.game.time.events.addTimer(1e3,k.bind(this,{data:[{userID:5339281,status:0},{userID:5339282,status:1},{userID:5339279,status:1}],meta:{}}),this),Promise.resolve(null)):this.api.getFriendList(k,((k,U)=>{this.generalErrorHandler("getFriendsList",B,U,k)}))}))}getTotalFriendRequests(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return X.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(G.VyI.log("Test get total friend requests",G.$bb.Verbose),this.game.time.events.addTimer(2,k.bind(this,{data:{pendingRequests:1},meta:{friendsCap:20}}),this),Promise.resolve(null)):this.api.getTotalFriendRequests(k,((k,U)=>{this.generalErrorHandler("getTotalFriendRequests",B,U,k)}))}))}getFriendRequestList(k,B,U,j){return(0,F.sH)(this,void 0,void 0,(function*(){return X.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(G.VyI.log("Test get friend request list",G.$bb.Verbose),this.game.time.events.addTimer(2,U.bind(this,{data:[{userID:15263772}],meta:{}}),this),Promise.resolve(null)):this.api.getFriendRequestList(k,B,U,((k,B)=>{this.generalErrorHandler("getFriendRequestList",j,B,k)}))}))}sendFriendRequest(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return X.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(G.VyI.log("Test send friend request",G.$bb.Verbose),this.game.time.events.addTimer(2,B.bind(this,k),this),Promise.resolve(null)):this.api.sendFriendRequest(k,B,((k,B)=>{this.generalErrorHandler("sendFriendRequest",U,B,k)}))}))}cancelFriendRequest(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return X.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(G.VyI.log("Test cancel friend request",G.$bb.Verbose),this.game.time.events.addTimer(2,B.bind(this,k),this),Promise.resolve(null)):this.api.cancelFriendRequest(k,B,((k,B)=>{this.generalErrorHandler("cancelFriendRequest",U,B,k)}))}))}acceptFriendRequest(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return X.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(G.VyI.log("Test accept friend request",G.$bb.Verbose),this.game.time.events.addTimer(2,B.bind(this,k),this),Promise.resolve(null)):this.api.acceptFriendRequest(k,B,((k,B)=>{this.generalErrorHandler("acceptFriendRequest",U,B,k)}))}))}rejectFriendRequest(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return X.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(G.VyI.log("Test reject friend request",G.$bb.Verbose),this.game.time.events.addTimer(2,B.bind(this,k),this),Promise.resolve(null)):this.api.rejectFriendRequest(k,B,((k,B)=>{this.generalErrorHandler("rejectFriendRequest",U,B,k)}))}))}removeFriend(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return X.s.get("GameConstants.FriendsList.TEST_FRIENDS_LIST")?(G.VyI.log("Test remove friend",G.$bb.Verbose),this.game.time.events.addTimer(2,B.bind(this,k),this),Promise.resolve(null)):this.api.removeFriend(k,B,((k,B)=>{this.generalErrorHandler("removeFriend",U,B,k)}))}))}getTitans(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return this.api.getTitans(k,((k,U)=>{this.generalErrorHandler("getTitans",B,U,k)}))}))}getTitan(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return this.api.getTitan(k,B,((k,B)=>{this.generalErrorHandler("getTitan",U,B,k)}))}))}hitTitan(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){return this.api.hitTitan(k,B,((k,B)=>{this.generalErrorHandler("hitTitan",U,B,k)}))}))}getTitanUserData(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return this.api.getTitanUserData(k,((k,U)=>{this.generalErrorHandler("getTitanUserData",B,U,k)}))}))}completeAssignment(k){this.api.completeAssignment(k,{200:()=>{}})}answerQuestion(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=Object.assign(Object.assign({},k),{isMember:B.hasMembership(),playLocation:this._playerDataProvider.player.locationSelectionType,sessionID:this._sessionTokenAuthProvider.getSessionToken()});return this.api.saveAnswer(U,(()=>{}))}))}updatePlanStudent(k){this.api.updatePlanStudent(k.id,k.currentSkillId,k.hasFailed)}updateStrandBasedPlacementTest(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=k.placementTestInstanceId;return this.api.updateStrandBasedPlacementTest(B,k)}))}finishPlacement(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.api.updatePlacementTest(k)}))}setCurriculum(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){var F;return this.api.setCurriculum(k.curriculumTreeID,null!==(F=k.subject)&&void 0!==F?F:lt.Math,B,U)}))}setInitialGrades(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){var F;return this.api.setInitialGrades(k.grade,null!==(F=k.subject)&&void 0!==F?F:lt.Math,B,U)}))}updatePlayerGrade(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.api.updatePlayerGrade(k)}))}loadEducation(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.loggedIn&&this.characterProcessed?Y.q.instance.prodigy.education.getStudentData(k):Promise.resolve(null)}))}getClassCodes(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.loggedIn?this.api.getClassCodes():Promise.resolve(null)}))}getCurrentClassCode(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.loggedIn?this.api.getCurrentClassCode():Promise.resolve(null)}))}getCurriculumAndGrade(k){return(0,F.sH)(this,arguments,void 0,(function*(k,B=lt.Math){return this.loggedIn?this.api.getCurriculumAndGrade(k,B):Promise.resolve(null)}))}getVideoLessonSignedUrls(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){return this.loggedIn?this.api.getVideoLessonSignedUrls(k,B,U,G):Promise.resolve(null)}))}login(k,B,U,F,j,$,H,V=0){this._playerDataProvider.initialize(j),null!==this._retryTimer&&(window.clearInterval(this._retryTimer),this._retryTimer=null);const W=V+1;if(W>3)return G.VyI.log("NetworkManager.login; retried 3 times. Go to failure",G.$bb.Error),void H();const q=this.login.bind(this,k,B,U,F,j,$,H,W);this.api.login(((k,B)=>{this.processLoginSuccess($,k,k.identityToken,B)}),((k,B)=>{this.processLoginFailure("login",H,q,B,k)}))}getCharacter(k,B,U,G){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U,F,G=0){this._playerDataProvider.initialize(B);const j=this.getCharacter.bind(this,k,B,U,F,G+1);return null!==this._retryTimer&&(window.clearInterval(this._retryTimer),this._retryTimer=null),this.api.getCharacter(((B,F)=>{this.processCharacterSuccess(U,k,B,F)}),((k,B)=>{this.processCharacterFailure("getCharacter",F,j,G,B,k)}))}))}logout(k=!1){G.VyI.log("Logging out",G.$bb.Info),this._playerDataProvider.logout(),this.loggedIn=!1,this.characterProcessed=!1,this.jwtAuthProvider.logout(),this._sessionTokenAuthProvider.logout(),this.api.logout(),et.pF.isNativeApp()&&window.postMessage(JSON.stringify({type:"NATIVE_LOGOUT",payload:k,token:this.api.getRefreshToken()}))}updateCharacter(){var k;if(!this.saving)if(!this.expiredToken&&!this._isTokenExpiredMessageOpen&&this.loggedIn&&this.characterProcessed&&this._playerDataProvider.player&&this._sessionTokenAuthProvider.getSessionToken()){if(G.Aq$.isDefined(this.updateFailedTime)&&null===this.offlineTimer&&(this.timeManager.getLocalTimeMs()-this.updateFailedTime)/1e3>X.s.get("GameConstants.Inactivity.CANNOT_CONNECT_TIMER_SECONDS")&&(this.offlineTimer=this.timeManager.getLocalTimeMs()+X.s.get("GameConstants.Inactivity.NETWORK_BOOT_TIMER_SECONDS"),this.offlineMessage="NETWORK_CANNOT_CONNECT"),null!==this.offlineTimer){const B=this.offlineTimer-this.timeManager.getLocalTimeMs();B<0?this.logout(!0):(null===(k=this.zone)||void 0===k?void 0:k.showMessage)&&this.zone.showMessage(Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(this.offlineMessage,Math.floor(B/1e3)),5e3)}if(this._playerDataProvider.player.saveEnabled){const k=this._playerDataProvider.player.getUpdatedData(this.processPlayer);if(this.processFriendsList&&Y.q.instance.prodigy.friendsListNetworkHandler.getTotalFriendRequests(),this.processPlayer=!1,this.processFriendsList=!1,this.saving=!it.o.isEmptyObject(k),this.saving||G.Aq$.isDefined(this.lastUpdate)&&!(this.timeManager.getLocalTimeMs()-this.lastUpdate>3e4)||(this.saving=!0),this.saving)if(this.jwtAuthProvider.isLoggedIn()){if(G.VyI.log("Token is still valid so let's save",G.$bb.Verbose),k.data&&!G.Aq$.isDefined(k.data.level)){G.VyI.log("APIClient: Player data has been corrupted",G.$bb.Error);const k=new W.i;k.setKey("prodigy_game.APIClient.updateCharacterNoLevel"),k.setValue(1);return Y.q.instance.prodigy.gameContainer.get("e59-eea6").logStat(k,V.d.Increment),void this.logout(!0)}this.api.updateCharacter(k,this.onUpdateCharacterSuccess.bind(this),this.onUpdateCharacterFailure.bind(this));const B=Date.now()-this.metricsManager.getLastGameSessionStartTime();isNaN(B)&&G.VyI.log("Updated session without time being defined",G.$bb.Warning)}else this.showTokenExpiredPopup();else this.onPlayerSaved.dispatch()}else this.onPlayerSaved.dispatch()}else this.onPlayerSaved.dispatch()}showTokenExpiredPopup(){this.expiredToken=!0,this._isTokenExpiredMessageOpen||(this._isTokenExpiredMessageOpen=!0,Y.q.instance.prodigy.open.messageBoxPrefab({text:"TOKEN_EXPIRE_MESSAGE",title:"MESSAGE_TITLE_UH_OH",confirmCallback:()=>{this.logout(!0)}}))}showInvalidCharacterPopup(){const k=Y.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);this.jwtAuthProvider.logout(),this._sessionTokenAuthProvider.logout(),Y.q.instance.prodigy.open.informationDialog(new tt.Z(k.getText("SETTINGS_LOGOUT"),(()=>{this.logout()}),J.E.Small,500,k.getText("ERROR_RCI_POPUP_A"),k.getText("ERROR_RCI_POPUP_B"),void 0,void 0,void 0,H.l.ErrorDialogHeader,H.l.DefaultFooter))}onUpdateCharacterSuccess(k,B){this.processUpdate(!0,!1),G.VyI.log("Character saved successfully to GameAPI",G.$bb.Verbose)}onUpdateCharacterFailure(k){const B=$.includes([409,503],k.status);this.processUpdate(!1,B)}startInactiveTimer(){this.stopInactiveTimer(),this.loggedIn&&this.characterProcessed&&!et.pF.isNativeApp()&&(this.game.input.onDown.add(this.stopInactiveTimer,this),this.game.input.onUp.add(this.startInactiveTimer,this),this.inactiveTimer=window.setTimeout(this.showInactiveDialog.bind(this),1e3*X.s.get("GameConstants.Inactivity.DIALOG_TIMER_SECONDS")))}stopInactiveTimer(){null!==this.inactiveTimer&&(this.game.input.onDown.removeAll(this),clearTimeout(this.inactiveTimer),this.inactiveTimer=null)}showInactiveDialog(){this.isActivityDialogOpen||this.expiredToken||this._isTokenExpiredMessageOpen||(this.isActivityDialogOpen=!0,Y.q.instance.prodigy.open.messageBoxPrefab({text:"INACTIVITY_MESSAGE",confirmButtonTextKey:"INACTIVITY_BUTTON",confirmCallback:()=>{this.onInactivityPopupButtonPress()}}));const k=Y.q.instance.prodigy.gameContainer.get("80c-6fa4").getValue("inactivityLogoutTimerSeconds",X.s.get("GameConstants.Inactivity.LOG_OUT_TIMER_SECONDS"));this.inactiveTimer=window.setTimeout(this.logout.bind(this,!0),1e3*k)}onInactivityPopupButtonPress(){this.isActivityDialogOpen=!1,this.startInactiveTimer()}onPlayerList(k){var B;G.VyI.log(`playerList ${JSON.stringify(k)}`,G.$bb.Verbose),this.canUseMultiplayer()&&G.Aq$.isDefined(null===(B=this.zone)||void 0===B?void 0:B.onPlayerList)&&(this.onPlayerListSignal.dispatch(k),this.zone.onPlayerList(k))}onDisconnect(k,B){G.VyI.log(`disconnect ${String(B)}`,G.$bb.Verbose),this.socketConnected=!1,G.Aq$.isDefined(k)&&k()}onReconnect(){this.socketConnected=!0}onPlayerJoined(k){G.VyI.log(`join ${k}`,G.$bb.Verbose),this.canUseMultiplayer()&&this.zone&&(this.onPlayerJoinedSignal.dispatch(k),G.Aq$.isDefined(this.zone.onPlayerJoined)&&this.zone.onPlayerJoined(k))}onPlayerLeft(k){G.VyI.log(`left ${k}`,G.$bb.Verbose),this.canUseMultiplayer()&&this.zone&&(this.onPlayerLeftSignal.dispatch(k),G.Aq$.isDefined(this.zone.onPlayerLeft)&&this.zone.onPlayerLeft(k))}canUseMultiplayer(){return this.loggedIn&&this.characterProcessed&&this.socketConnected}joinSuccess(k,B){Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player.world=k,this.socketConnected=!0,B()}static compressMessage(k,B){const U=[];for(let F=0;F(null!==(H=X.s.get("GameConstants.Debug.GET_CHARACTER_RETRIES"))&&void 0!==H?H:5))return G.VyI.log("NetworkManager.getCharacter; retried 5 times. Go to failure",G.$bb.Error),void B();if(G.Aq$.isDefined(U)&&(0===j||500===j||340===j))return void(this._retryTimer=window.setInterval(U,1e3));const q=new W.i;q.setKey("prodigy_game.APIClient.processCharacterFailed"),q.setValue(1);Y.q.instance.prodigy.gameContainer.get("e59-eea6").logStat(q,V.d.Increment),G.VyI.log("Process Character failed.",G.$bb.Error),this.generalErrorHandler(k,B,j,$)}versionError(){Y.q.instance.prodigy.open.informationDialog(new tt.Z("BUTTON_OKAY_CAPITAL",(()=>{this.logout(!0)}),J.E.Small,500,"ERROR","NETWORK_OUT_OF_DATE",void 0,void 0,void 0,H.l.ErrorDialogHeader,H.l.ErrorDialogFooter))}processUpdate(k,B){if(this.saving=!1,k||(!G.Aq$.isDefined(this.updateFailedTime)&&this.loggedIn&&this.characterProcessed&&(this.updateFailedTime=this.timeManager.getLocalTimeMs()),B&&null===this.offlineTimer&&this.loggedIn&&this.characterProcessed&&(this.offlineMessage="NETWORK_LOGGED_IN_ELSEWHERE",this.offlineTimer=this.timeManager.getLocalTimeMs()+5e3),G.VyI.log("network update fail",G.$bb.Verbose),this.hasFailedUpdate=!0),k){this.onPlayerSaved.dispatch(),this.updateFailedTime=null,this.lastUpdate=this.timeManager.getLocalTimeMs(),this.processFriendsList=this.hasFailedUpdate,this.hasFailedUpdate=!1;Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player}this.processPlayer=!k}processWorldMessage(k){if("subscribed"===k.type){const k=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this._multiplayerMessageService.updateCachedAppearance(z.K.getWorldChannelName(this.world.name),k.getID()).catch(G.RQr.createHandler("Could not send update cached appearance on world join")),this.joinSuccess(this.world,this._multiplayerWorldSuccessHandler)}}processAllWorldSubscriptionError(k){if(k.message===yt.p.DoesNotExist){Y.q.instance.prodigy.gameContainer.get("779-a746").createAndJoinWorldChannel(this.world.name,this.processWorldMessage.bind(this),this.processWorldSubscriptionError.bind(this)).catch(G.RQr.createHandler("Error initializing world"))}else this.processWorldSubscriptionError(k)}processWorldSubscriptionError(k){k.message===yt.p.Full?this._multiplayerWorldFullErrorHandler():this.onDisconnect(this._multiplayerWorldErrorHandler,"Error Subscribing to world")}processZoneLocationMessage(k){var B;if("broadcastAction"===k.type){let B;switch(k.actionInfo.action){case q.P.FX:B=this.createFXAction(k);break;case q.P.Chat:B=this.createChatAction(k);break;case q.P.HostTeam:B=this.createHostTeamAction(k);break;case q.P.TeamDisbanded:B=this.createTeamDisbandedAction(k);break;case q.P.TeamUpdated:B=this.createTeamUpdateAction(k);break;case q.P.HostHeartbeat:B=this.createCoopHostHeartbeatAction(k);break;case q.P.SyncHealth:B=this.createCoopSyncHealthAction(k);break;case q.P.PlayerAttacked:B=this.createCoopPlayerAttackedAction(k);break;case q.P.TitanAttacked:B=this.createCoopTitanAttackedAction(k);break;case q.P.TitanDefeated:B=this.createCoopTitanDefeatedAction(k);break;case q.P.PlayersDefeated:B=this.createCoopPlayersDefeatedAction(k);break;case q.P.Transform:B=this.createTransformAction(k);break;case q.P.Catapult:B=this.createCatapultAction(k);break;case q.P.Change:B=this.createChangeAction(k);break;case q.P.CoopTeam:B=this.createInfoFromCoopTeamAction(k)}G.Aq$.isDefined(B)&&this.onMessage(B,!1)}else if("playerMoved"===k.type)this.onMessage(this.createMoveAction(k),!1);else if("userList"===k.type){this.onPlayerList(this.createPlayerList(k));const B=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getID();k.userList.forEach((k=>{if(B.toString()!==k.userID){const B=this.createPlayerJoinedAction({action:q.P.Info,data:k.appearance});this.onMessage(B,!1)}}))}else if("playerJoined"===k.type){this.onPlayerJoined(k.playerInfo.userID);if(Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getID().toString()!==k.playerInfo.userID){const U=this.createPlayerJoinedAction({action:q.P.Info,data:k.playerInfo.appearance});this.onMessage(U,!1),!this.zone||null!==(B=this.zone.autoBroadcastPosition)&&void 0!==B&&!B||this.lastPlayerPositionTimer||(this.lastPlayerPositionTimer=window.setTimeout((()=>this.updatePlayerPositionOnMap()),5e3))}}else"playerLeft"===k.type&&this.onPlayerLeft(k.playerInfo.userID)}createPlayerList(k){return k.userList.map((k=>k.userID))}createMoveAction(k){return{action:vt.x.Move,data:{userID:parseInt(k.userID,10),target:k.movementInfo}}}createFXAction(k){var B,U;return{action:vt.x.FX,data:{type:k.actionInfo.type,userID:parseInt(k.userID,10),x:null===(B=k.actionInfo.data)||void 0===B?void 0:B.x,y:null===(U=k.actionInfo.data)||void 0===U?void 0:U.y}}}createHostTeamAction(k){let B,U,F,j;return G.Aq$.isDefined(k.actionInfo.data)&&(j=k.actionInfo.data.streak,B=k.actionInfo.data.hostID,U=k.actionInfo.data.teamMembers,F=k.actionInfo.data.readyMembers),{action:vt.x.HostTeam,data:{hostID:B,streak:j,readyMembers:F,teamMembers:U}}}createTeamDisbandedAction(k){let B;return G.Aq$.isDefined(k.actionInfo.data)&&(B=k.actionInfo.data.hostID),{action:vt.x.TeamDisbanded,data:{hostID:B}}}createRequestJoinTeamAction(k){let B;return G.Aq$.isDefined(k.data)&&(B=k.data.userID),{action:vt.x.RequestJoinTeam,data:{userID:B}}}createTransformAction(k){return{action:vt.x.Transform,data:{userID:parseInt(k.userID,10),showEffect:k.actionInfo.showEffect,transformID:k.actionInfo.transformID,transformType:k.actionInfo.transformType}}}createJoinTeamAction(k){let B,U,F,j;return G.Aq$.isDefined(k.data)&&(F=k.data.streak,B=k.data.teamMembers,U=k.data.readyMembers,j=k.data.hostID),{action:vt.x.JoinTeam,data:{hostID:j,streak:F,teamMembers:B,readyMembers:U}}}createTeamUpdateAction(k){let B,U,F,j;return G.Aq$.isDefined(k.actionInfo.data)&&(j=k.actionInfo.data.streak,B=k.actionInfo.data.hostID,U=k.actionInfo.data.teamMembers,F=k.actionInfo.data.readyMembers),{action:vt.x.TeamUpdated,data:{hostID:B,streak:j,teamMembers:U,readyMembers:F}}}createPlayerLeftTeamAction(k){let B;return G.Aq$.isDefined(k.data)&&(B=k.target),{action:vt.x.PlayerLeftTeam,data:{userID:k.data.userID}}}createStartCoopTitanMatchAction(k){return{action:vt.x.StartCoOpTitanMatch,data:k.data}}createCoopHostHeartbeatAction(k){return{action:vt.x.HostHeartbeat}}createCoopSyncHealthAction(k){return{action:vt.x.SyncHealth,data:k.actionInfo.data}}createCoopQuestionAnsweredAction(k){let B,U;return G.Aq$.isDefined(k.data)&&(B=k.data.sourcePlayerID,U=k.data.correct),{action:vt.x.QuestionAnswered,data:{sourcePlayerID:B,correct:U}}}createCoopPlayerAttackedAction(k){let B,U,F,j,$;return G.Aq$.isDefined(k.actionInfo.data)&&(B=k.actionInfo.data.sourcePlayerID,U=k.actionInfo.data.damage,F=k.actionInfo.data.titanHealth,j=k.actionInfo.data.spellID,$=k.actionInfo.data.missed),{action:vt.x.PlayerAttacked,data:{sourcePlayerID:B,spellID:j,damage:U,titanHealth:F,missed:$}}}createCoopTitanAttackedAction(k){let B,U,F,j;return G.Aq$.isDefined(k.actionInfo.data)&&(B=k.actionInfo.data.crystalHealth,U=k.actionInfo.data.damage,F=k.actionInfo.data.spellID,j=k.actionInfo.data.missed),{action:vt.x.TitanAttacked,data:{crystalHealth:B,spellID:F,damage:U,missed:j}}}createCoopTitanDefeatedAction(k){return{action:vt.x.TitanDefeated}}createCoopPlayersDefeatedAction(k){return{action:vt.x.PlayersDefeated}}createCoopJoinTeamFailedAction(k){let B;return G.Aq$.isDefined(k.data)&&(B=k.data.reason),{action:vt.x.JoinTeamFailed,data:{reason:B}}}createCoopRejoinTeamAction(k){let B;return G.Aq$.isDefined(k.data)&&(B=k.data.userID),{action:vt.x.PlayerRejoinTeam,data:{userID:B}}}createPlayerJoinedAction(k){return{action:vt.x.Info,data:k.data}}createCatapultAction(k){return{action:vt.x.Catapult}}createChangeAction(k){return{action:vt.x.Change,data:{appearance:k.actionInfo.data.appearance.appearance,equipment:k.actionInfo.data.appearance.equipment,userID:k.actionInfo.data.appearance.userID}}}createInfoFromCoopTeamAction(k){return{action:vt.x.Info,data:k.actionInfo.data.appearance}}handleNotificationMessages(k){let B;switch(k.action){case K.m.RequestJoinTeam:B=this.createRequestJoinTeamAction(k);break;case K.m.JoinTeam:B=this.createJoinTeamAction(k);break;case K.m.PlayerLeftTeam:B=this.createPlayerLeftTeamAction(k);break;case K.m.StartCoOpTitanMatch:B=this.createStartCoopTitanMatchAction(k);break;case K.m.QuestionAnswered:B=this.createCoopQuestionAnsweredAction(k);break;case K.m.JoinTeamFailed:B=this.createCoopJoinTeamFailedAction(k);break;case K.m.PlayerRejoinTeam:B=this.createCoopRejoinTeamAction(k);break;case K.m.PlayerJoined:}G.Aq$.isDefined(B)&&this.onMessage(B,!1)}processZoneMapSubscriptionError(k){if(k.message===yt.p.DoesNotExist){Y.q.instance.prodigy.gameContainer.get("779-a746").createAndJoinZoneMapChannel(this.world.name,this.zone.zoneName,this.processZoneLocationMessage.bind(this)).catch(G.RQr.createHandler("Error initializing zone channel"))}else G.RQr.createHandler("Error Joining Zone")}processZoneMapDisconnection(k){this.socketConnected=!1}processZoneMapReconnection(){this.socketConnected=!0,this.onSocketReconnect.dispatch()}createChatAction(k){return{action:vt.x.Chat,data:{userID:parseInt(k.userID,10),emoteID:k.actionInfo.emoteID,danceID:k.actionInfo.danceID,chatID:k.actionInfo.chatID}}}fetchStudentData(k){return(0,F.sH)(this,void 0,void 0,(function*(){let B;switch(k){case pt.Q.ELA:B=lt.English;break;case pt.Q.Science:B=lt.Science;break;default:case pt.Q.Math:B=lt.Math}return this.api.getStudentData(B)}))}get isCurrentlySaving(){return this.saving}};_t.VERBOSE_ANALYTICS=!1,_t.emitMessageCount=0,_t.MESSAGE_SCHEMAS={info:["userID","target.x","target.y","appearance.name","appearance.name.first","appearance.name.middle","appearance.name.last","appearance.name.nick","appearance.gender","appearance.hair.style","appearance.hair.color","appearance.skinColor","appearance.eyeColor","appearance.face","isMember","equipment.boots","equipment.follow","equipment.hat","equipment.outfit","equipment.weapon","data.level","data.win","data.loss","data.gold","data.tower","data.stars","data.hp","data.team","data.allowsHouseVisitors","data.versionID","data.playerTransformation.transformType","data.playerTransformation.transformID","equipment.mount","coOpTeam.hostID","coOpTeam.teamMembers"],catapult:[]},_t=ft=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("51c-03a0")),(0,F.Qj)(1,(0,j.inject)("a03-308f")),(0,F.Qj)(2,(0,j.inject)("be9-3278")),(0,F.Qj)(3,(0,j.inject)("2a1-fed9")),(0,F.Sn)("design:paramtypes",[Q.n,gt.V,mt.p,Object])],_t)},35564:(k,B,U)=>{"use strict";var F;U.d(B,{x:()=>F}),function(k){k.FX="fx",k.Move="move",k.Chat="chat",k.Transform="transform",k.HostTeam="create_co_op_team",k.TeamDisbanded="co_op_team_disbanded",k.TeamUpdated="co_op_team_updated",k.HostHeartbeat="co_op_host_heartbeat",k.SyncHealth="co_op_health_sync",k.PlayerAttacked="player_attacked",k.TitanAttacked="titan_attacked",k.TitanDefeated="titan_defeated",k.PlayersDefeated="players_defeated",k.Catapult="catapult",k.Change="change",k.Info="info",k.CoopTeam="coopTeam",k.RequestJoinTeam="request_co_op_team_join",k.JoinTeam="join_co_op_team",k.PlayerLeftTeam="co_op_player_left_team",k.StartCoOpTitanMatch="start_co_op_titan",k.QuestionAnswered="question_answered",k.JoinTeamFailed="join_co_op_team_failed",k.PlayerRejoinTeam="co_op_player_rejoin_team"}(F||(F={}))},81623:(k,B,U)=>{"use strict";U.d(B,{u:()=>W});var F,G=U(8674),j=U(62459),$=U(79687),H=U(35120),V=U(98252);let W=F=class{constructor(){this._isServiceWorkerRegistered=!1,this._initComplete=!1}init(){if(this._initComplete)j.VyI.log("Error at ProgressiveWebAppInstallerService#init. Initialization should only run once.",j.$bb.Error);else{if(!this.isPlatformSupported())return void(this._initComplete=!0);"ServiceWorkerRegistration"in window?navigator.serviceWorker.getRegistration().then((k=>{k&&(this._isServiceWorkerRegistered=!0),this._initComplete=!0})).catch((()=>{j.VyI.log("CLIENT: Error at service worker getRegistration.",j.$bb.Error)})):this._initComplete=!0}}registerServiceWorker(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this.isPlatformSupported())return!1;if("ServiceWorkerRegistration"in window){j.VyI.log("CLIENT: service worker registration started.",j.$bb.Verbose);const k=H.q.instance.prodigy.gameContainer.get("be9-3278").getServiceWorkerPath(F.SERVICE_WORKER_FILE_NAME);let B;return yield navigator.serviceWorker.register(k).then((()=>{j.VyI.log("CLIENT: service worker registration COMPLETE.",j.$bb.Verbose),this._isServiceWorkerRegistered=!0,B=!0}),(()=>{j.VyI.log("CLIENT: service worker registration FAILED.",j.$bb.Verbose),B=!1})).catch((()=>{j.VyI.log("CLIENT: service worker registration ERROR.",j.$bb.Verbose)})),B}return j.VyI.log("CLIENT: service worker is NOT supported.",j.$bb.Verbose),!1}))}promptInstall(){return(0,G.sH)(this,void 0,void 0,(function*(){let k="error";return F.PWA_BEFORE_INSTALL_DEFERRED_EVENT&&this.isPlatformSupported()&&(yield F.PWA_BEFORE_INSTALL_DEFERRED_EVENT.prompt(),yield F.PWA_BEFORE_INSTALL_DEFERRED_EVENT.userChoice.then((B=>{"accepted"===B.outcome?k="accepted":"dismissed"===B.outcome&&(k="dismissed"),F.PWA_BEFORE_INSTALL_DEFERRED_EVENT=null})).catch((()=>{k="error"}))),k}))}isServiceWorkerRegistered(){return this._initComplete?this._isServiceWorkerRegistered:(j.VyI.log("Error at ProgressiveWebAppInstallerService#isServiceWorkerRegistered. Initialization not complete.",j.$bb.Error),!1)}isPWAInstalled(){if(this._initComplete){if(this._isServiceWorkerRegistered&&null===F.PWA_BEFORE_INSTALL_DEFERRED_EVENT)return!0}else j.VyI.log("Error at ProgressiveWebAppInstallerService#isPWAInstalled. Initialization not complete.",j.$bb.Error);return!1}isPlatformSupported(){return!V.pF.isNativeApp()&&!j.o5U.isMobile()&&j.o5U.isChrome()}};W.PWA_BEFORE_INSTALL_DEFERRED_EVENT=null,W.PWA_INSTALLED_DURING_CURRENT_SESSION=!1,W.SERVICE_WORKER_FILE_NAME="service-worker",W=F=(0,G.Cg)([(0,$.injectable)()],W),window.addEventListener("beforeinstallprompt",(k=>{W.PWA_BEFORE_INSTALL_DEFERRED_EVENT=k})),window.addEventListener("appinstalled",(()=>{W.PWA_INSTALLED_DURING_CURRENT_SESSION=!0}))},29044:(k,B,U)=>{"use strict";U.d(B,{F:()=>V});var F,G=U(8674),j=U(62459),$=U(79687),H=U(35120);let V=F=class{constructor(){this._currentPermissionState=null}registerServiceWorkerForFirebase(){return(0,G.sH)(this,void 0,void 0,(function*(){if("ServiceWorkerRegistration"in window){const k=H.q.instance.prodigy.gameContainer.get("be9-3278").getServiceWorkerPath(F._SERVICE_WORKER_FILE_NAME);let B;return yield navigator.serviceWorker.register(k).then((()=>{j.VyI.log("CLIENT: Firebase service worker registration COMPLETE.",j.$bb.Verbose),B=!0}),(()=>{j.VyI.log("CLIENT: Firebase service worker registration FAILED.",j.$bb.Verbose),B=!1})).catch((()=>{j.VyI.log("CLIENT: Firebase service worker registration ERROR.",j.$bb.Verbose)})),B}return j.VyI.log("CLIENT: Firebase service worker is NOT supported.",j.$bb.Verbose),!1}))}notificationPermissionRequest(){return(0,G.sH)(this,void 0,void 0,(function*(){if(!("Notification"in window))return void j.VyI.log("Notification API not supported",j.$bb.Verbose);let k;return this._currentPermissionState=Notification.permission,yield Notification.requestPermission().then((B=>{j.VyI.log(`Notification requestPermission option selected: ${B}`,j.$bb.Verbose),this._currentPermissionState!==B?(this._currentPermissionState=B,k={hasChanged:!0,status:this._currentPermissionState}):k={hasChanged:!1,status:this._currentPermissionState}})).catch((k=>{j.VyI.log(`Notification requestPermission error: ${k}`,j.$bb.Verbose)})),k}))}};V._SERVICE_WORKER_FILE_NAME="firebase-messaging-sw",V=F=(0,G.Cg)([(0,$.injectable)()],V)},35537:(k,B,U)=>{"use strict";U.d(B,{Gq:()=>V,JN:()=>q,sE:()=>W,zj:()=>K});var F=U(8674),G=U(62459),j=U(79687),$=U(95891),H=U.n($);const V=Symbol("NETWORK_SIDE_EFFECT_HANDLER"),W=Symbol("INetworkSideEffectHandler.key"),q=Symbol("INetworkSideEffectHandler.consume");let K=class{broadcast(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=H().groupBy(this._handlers,W);yield Promise.all(Object.entries(k).map((k=>(0,F.sH)(this,[k],void 0,(function*([k,U]){try{const F=B[k][0];yield F[q](U)}catch(F){G.RQr.logError(F,`Error running ${k} side effect handler`)}})))))}))}processEnvelope(k){return(0,F.sH)(this,void 0,void 0,(function*(){return"object"==typeof k&&"$sideEffects"in k&&"$data"in k?(yield this.broadcast(k.$sideEffects),k.$data):k}))}};(0,F.Cg)([(0,j.multiInject)(V),(0,F.Sn)("design:type",Array)],K.prototype,"_handlers",void 0),K=(0,F.Cg)([(0,j.injectable)()],K)},69698:(k,B,U)=>{"use strict";U.d(B,{V:()=>$});var F=U(8674),G=U(62459),j=U(79687);let $=class{constructor(){this.isServerDeltaSet=!1,this.serverTimeDeltaMs=0,this._timezoneOffset=null}getIsServerDeltaSet(){return this.isServerDeltaSet}setServerTime(k){const B=this.getLocalTimeMs();this.serverTimeDeltaMs=k-B,this.isServerDeltaSet=!0}getServerTimeMs(){return this.isServerDeltaSet||G.VyI.log("Server time has not been set yet.",G.$bb.Warning),this.getLocalTimeMs()+this.serverTimeDeltaMs}getLocalTimeMs(){return Date.now()}getServerTimeDeltaMs(){return this.serverTimeDeltaMs}getUTCOffset(){return G.Aq$.isDefined(this._timezoneOffset)||(this._timezoneOffset=(new Date).getTimezoneOffset()),this._timezoneOffset}};$=(0,F.Cg)([(0,j.injectable)()],$)},21314:(k,B,U)=>{"use strict";U.d(B,{p:()=>W});var F=U(8674),G=U(62459),j=U(79687),$=U(86663),H=U(34829),V=U(52498);let W=class{constructor(k){this.environmentProvider=null,this.environmentProvider=k}getRootUrl(){var k,B;switch(this.environmentProvider.getCurrentEnvironment()){case V.h.Production:return"https://www.prodigygame.com";case V.h.Staging:case V.h.QABox:return null!==(B=null===(k=window.gameEnvironmentVariables)||void 0===k?void 0:k.webRootUrl)&&void 0!==B?B:"https://www.prodigygame.org";case V.h.Dev:default:return"https://www.prodigygame.net"}}getAPIRootUrl(){switch(this.environmentProvider.getCurrentEnvironment()){case V.h.Production:return"https://api.prodigygame.com";case V.h.Staging:return"https://api.prodigygame.org";case V.h.Dev:return"https://api.prodigygame.net";case V.h.QABox:case V.h.Local:const k=$.qg(window.location.search);return G.Aq$.isDefined(k.env)&&k.env.indexOf("-qa")>-1?`https://api.${k.env}.prodigygame.${G.Aq$.isDefined(k.boxEnv)?k.boxEnv:"org"}`:`https://${window.location.host}`;default:return""}}getMatcherApiRootUrl(){var k,B;return null!==(B=null===(k=window.gameEnvironmentVariables)||void 0===k?void 0:k.matcherApiRootUrl)&&void 0!==B?B:this.getMultiplayerRootURL()}getCDNRootUrl(){return"https://cdn.prodigygame.com"}getLoaderUrl(){return this.getAPIRootUrl()}getCortexRootURL(){var k,B,U;return null!==(U=null!==(B=null===(k=window.gameEnvironmentVariables)||void 0===k?void 0:k.cortexRootUrl)&&void 0!==B?B:H.A.get("GameConstants.Network.CORTEX_ROOT"))&&void 0!==U?U:this.getLoaderUrl()}getMultiplayerRootURL(){var k,B;return null!==(B=null===(k=window.gameEnvironmentVariables)||void 0===k?void 0:k.multiplayerRootUrl)&&void 0!==B?B:this.getCortexRootURL()}getIdentityUrl(){switch(this.environmentProvider.getCurrentEnvironment()){case V.h.Production:return"https://sso.prodigygame.com";case V.h.Staging:case V.h.QABox:return"https://sso.prodigygame.org";case V.h.Dev:default:return"https://sso.prodigygame.net"}}getWorkerPath(k){const B=this.environmentProvider.getCurrentEnvironmentByHost(),U=window.gameCodeFile?window.gameCodeFile.replace("code.prodigygame.",`${window.location.hostname.split(".")[0]}.prodigygame.`):"../bin/",F=Math.max(U.lastIndexOf("/"),U.lastIndexOf("\\"));return`${`${F>=0?U.substr(0,F+1):U}workers/`}${k}.${B===V.h.Local||window.location.origin.indexOf("localhost")>-1?"js":"min.js"}${B===V.h.Production?"":`?v=${Date.now()}`}`}getServiceWorkerPath(k){const B=this.environmentProvider.getCurrentEnvironmentByHost();return B===V.h.Local?`/${k}.js`:B===V.h.QABox?`${this.getLoaderUrl()}/Play/${k}.js`:`/${k}.js`}getAnswerURL(){let k=this.environmentProvider.getCurrentEnvironment();if(k===V.h.QABox){const B=window.location.host;k=B.indexOf(".com")>-1?V.h.Production:B.indexOf(".org")>-1||B.indexOf(".run")>-1?V.h.Staging:V.h.Dev}switch(k){case V.h.Production:return"https://answers-v1.prodigygame.com";case V.h.Staging:return"https://answers-v1.prodigygame.org";case V.h.Dev:return"https://answers-v1.prodigygame.net";default:return""}}getParentAttachURL(){return`${this.getRootUrl()}/parent/onboarding/`}getMembershipUpgradeUrl(k){return`${this.getRootUrl()}/membership-management/upgrade/${k}/plan-selection/`}getOtpUrl(k){const B=encodeURIComponent(JSON.stringify({priceOptions:k}));return`${this.getRootUrl()}/Memberships/purchase/otp/selection/?options=${B}`}getUuidUrl(){return`${this.getRootUrl()}/Memberships/api/game-uuid/`}getArcadiaLauncherUrl(){switch(this.environmentProvider.getCurrentEnvironment()){case V.h.Production:return"https://games.prodigygame.com";case V.h.Staging:case V.h.QABox:return"https://games.prodigygame.org";case V.h.Dev:default:return"https://games.prodigygame.net"}}};W=(0,F.Cg)([(0,j.injectable)(),(0,F.Qj)(0,(0,j.inject)("6a1-4b92")),(0,F.Sn)("design:paramtypes",[Object])],W)},20352:(k,B,U)=>{"use strict";U.d(B,{j:()=>q});var F=U(8674),G=U(79687),j=U(99625),$=U(35120),H=U(21397),V=U(53661),W=U(80060);let q=class{constructor(){this._iframeOpenOrLoading=!1}canOpenIframe(){return!this._iframeOpenOrLoading}flagIframeClosed(){this._iframeOpenOrLoading=!1}createIFrame(k,B){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U=j.l.IFrameModal){if(!this.canOpenIframe())return null;this._iframeOpenOrLoading=!0;const F=(yield W.d.loadWithInjectedValuesAndDependenciesFromGUID($.q.instance.prodigy.gameContainer.get("d0e-64fd"),U,{[V.n7.IFrameSource]:k,[V.n7.IFrameClosePostMessage]:B})).findComponent(H.w);return F.onIFrameClosed.addOnce((()=>this.flagIframeClosed())),F.GameObject.onDestroy.addOnce((()=>this.flagIframeClosed())),F}))}};q=(0,F.Cg)([(0,G.injectable)()],q)},64582:(k,B,U)=>{"use strict";U.d(B,{O:()=>W});var F,G=U(8674),j=U(62459),$=U(79687),H=U(76572),V=U(21314);let W=F=class{constructor(k,B,U){this.httpClient=k,this.featureFlags=B,this._urlProvider=U}getData(){return(0,G.sH)(this,void 0,void 0,(function*(){return this.getDataAndCache()}))}spoofIp(k){return(0,G.sH)(this,void 0,void 0,(function*(){return j.Aq$.isDefined(this.fetchPromise)&&(yield this.fetchPromise,this.fetchPromise=null),this.cachedGeolocationData&&(this.cachedGeolocationData=null),this.getDataAndCache(k)}))}getDataAndCache(k){return(0,G.sH)(this,void 0,void 0,(function*(){if(!this.featureFlags.getValue("enableGeolocationService",!0))return[new H._("Geolocation Service is disabled"),null];if(!this.cachedGeolocationData){j.Aq$.isDefined(this.fetchPromise)||(this.fetchPromise=this.fetchGeolocationData(k));const[B,U]=yield this.fetchPromise;if(this.fetchPromise=null,B)return[B,null];this.cachedGeolocationData=U}return[null,this.cachedGeolocationData]}))}fetchGeolocationData(k){return(0,G.sH)(this,void 0,void 0,(function*(){const B=this._urlProvider.getLoaderUrl();let U=F.BASE_URL;j.Aq$.isDefined(k)&&(U+=`?ip=${k}`);const G=new j.u1k;G.setMethod(j.iXQ.Get).setBaseURI(B).setRequestURI(U).addResponseInterceptor(j.XKG.convertToJson);const $=yield this.httpClient.sendRequest(G);return $.wasSuccessful()?[null,$.getData()]:[new H._($.getErrorMessage()),null]}))}static GeolocationDataToIGeolocationMetadata(k){if(!k)return null;const B={country:k.country?k.country.name:null,city:null,time_zone:k.time_zone,subdivisions:k.subdivisions?k.subdivisions.map(((k,B,U)=>k.name)):null};return j.Aq$.isDefined(B.country)&&(j.Aq$.isDefined(B.city)||j.Aq$.isDefined(B.time_zone)||j.Aq$.isDefined(B.subdivisions)&&!(B.subdivisions.length<=0))?B:null}};W.BASE_URL="geolocation-api/v1",W=F=(0,G.Cg)([(0,$.injectable)(),(0,G.Qj)(0,(0,$.inject)("30b-3020")),(0,G.Qj)(1,(0,$.inject)("80c-6fa4")),(0,G.Qj)(2,(0,$.inject)("be9-3278")),(0,G.Sn)("design:paramtypes",[Object,Object,V.p])],W)},46014:(k,B,U)=>{"use strict";var F;U.d(B,{R:()=>F}),function(k){k.BattlePass="BattlePassMailExtension",k.Titan="TitanMailExtension",k.Popup="PopupMailExtension",k.Prefab="OpenPrefabMailExtension"}(F||(F={}))},83634:(k,B,U)=>{"use strict";U.d(B,{Z:()=>$});var F=U(8674),G=U(48417),j=U(67238);class $ extends j.D{getRewardStatus(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.call(G.D.AfterSchoolWidget.GetRewardsStatus,{},!0)}))}claimReward(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.call(G.D.AfterSchoolWidget.ClaimReward,{rewardType:k},!0)}))}resetState(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.call(G.D.AfterSchoolWidget.ResetState,{rewardType:k},!0)}))}}},35571:(k,B,U)=>{"use strict";U.d(B,{e:()=>W});var F=U(8674),G=U(79687),j=U(48417),$=U(1195),H=U(13956),V=U(76546);let W=class extends V.D{GetChargedLevelProgressData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.ChargedLevels.GetChargedLevelProgressData,{},!1)}))}sendTutorialReminderMailer(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.ChargedLevels.SendTutorialReminderMailer,{})}))}awardMemberOnlyChargedLevelXp(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=this._player.getUserID().toString();return this.makeCloudscriptRequest(j.D.ChargedLevels.AwardMemberOnlyChargedLevelXp,{userId:B,xpAmount:Math.round(k)})}))}abandonChargedLevelLosses(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.ChargedLevels.AbandonChargedLevelLosses,{},!1)}))}recuperateChargedLevelLosses(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.ChargedLevels.RecuperateChargedLevelLosses,{},!1)}))}updateDecayImmunity(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.ChargedLevels.UpdateDecayImmunity,{},!1)}))}debugSetChargedLevel(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.ChargedLevels.Debug.SetChargedLevel,{level:k},!1)}))}clearChargedLevelData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.ChargedLevels.ClearChargedLevelData,{},!1)}))}};(0,F.Cg)([(0,H.b)("e20-0fb0"),(0,F.Sn)("design:type",$.E)],W.prototype,"_player",void 0),W=(0,F.Cg)([(0,G.injectable)()],W)},55328:(k,B,U)=>{"use strict";U.d(B,{v:()=>W});var F=U(8674),G=U(62459),j=U(88225),$=U(48417),H=U(88131),V=U(76546);class W extends V.D{debugAddDefeatedPets(k){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest($.D.DynamicStore.Debug.AddDefeatedPet,{idsToAdd:k})).updated}))}debugRemoveDefeatedPets(k){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest($.D.DynamicStore.Debug.RemoveDefeatedPet,{handlesToRemove:k})).updated}))}debugListDefeatedPets(){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest($.D.DynamicStore.Debug.ListDefeatedPets,{})).updated}))}debugClearDefeatedPets(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest($.D.DynamicStore.Debug.ClearDefeatedPets,{})}))}debugResetStoreProgress(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest($.D.DynamicStore.Debug.ResetStoreProgress,{})}))}purchaseItem(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest($.D.DynamicStore.PurchaseItem,{taskId:k,analyticsTransactionId:B})).questProgress}))}getStoreOffers(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=yield this.makeCloudscriptRequest($.D.DynamicStore.GetStore,{store:k});return H.Q.fromJSON(B)}))}getStoreConfigurationEntity(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest($.D.DynamicStore.GetStoreConfiguration,{})}))}getNextSectionExpiry(){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest($.D.DynamicStore.GetNextSectionExpiry,{})).expiryTime}))}getRestrictionOffer(k){return(0,F.sH)(this,void 0,void 0,(function*(){try{const B=yield this.makeCloudscriptRequest($.D.Restrictions.GetRestrictionOffers,{restrictionIds:[k]});if(B.offers.length>0)return B.offers[0]}catch(B){j.captureException(B),G.RQr.logError(B,"Error fetching restriction offer")}}))}markFreeRestrictionOfferClaimed(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest($.D.Restrictions.MarkFreeRestrictionOfferClaimed,{})}))}getHudWidgetItems(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest($.D.DynamicStore.GetHudWidgetItems,{})}))}}},7001:(k,B,U)=>{"use strict";U.d(B,{W:()=>$});var F=U(8674),G=U(48417),j=U(67238);class $ extends j.D{getFeaturedSpawnData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.call(G.D.FeaturedSpawn.GetConfig,{},!0)}))}}},47968:(k,B,U)=>{"use strict";U.d(B,{b:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(67238);let H=class extends $.D{spend(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.call(j.D.HardCurrency.Spend,{value:k,analyticsTransactionId:B},!0)}))}grantCaptureTutorialMagicoin(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.call(j.D.HardCurrency.GrantCaptureTutorialMagicoin,{analyticsTransactionId:k},!0)}))}claimAllowances(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){return this.call(j.D.HardCurrency.ClaimAllowances,{keys:k,analyticsTransactionId:B},!0)}))}getAllowanceClaimData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.call(j.D.HardCurrency.GetAllowanceClaimData,{findAll:!0},!0)}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},88061:(k,B,U)=>{"use strict";U.d(B,{o:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(76546);let H=class extends $.D{fetchOptions(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.OTP.FetchOptions,{storeName:k})}))}collectPurchasedItems(k){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(j.D.OTP.CollectPurchasedItems,{transactions:k})).result}))}updatePurchaseHistory(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(j.D.OTP.UpdatePurchaseHistory,{amount:k})}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},60126:(k,B,U)=>{"use strict";U.d(B,{L:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(76546);let H=class extends $.D{getOwnedPetGear(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.PetGearInventory.ListItem,null!=k?k:{},!1)}))}markGearAsSeen(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=Array.isArray(k)?k:[k];return this.makeCloudscriptRequest(j.D.PetGearInventory.SeenItem,{items:B},!1)}))}removeGearFromInventory(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.PetGearInventory.DeleteItems,k,!1)}))}addGearToInventory(k){return(0,F.sH)(this,void 0,void 0,(function*(){0}))}clearAllPetGear(){return(0,F.sH)(this,void 0,void 0,(function*(){0}))}getPetGearAdGifts(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.PetGearInventory.ReceiveAdGift,{},!1)}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},65933:(k,B,U)=>{"use strict";U.d(B,{Y:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(76546);let H=class extends $.D{getPetInventoryData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.PetInventory.GetPetInventoryData,{},!1)}))}updateSlots(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(j.D.PetInventory.UpdateSlots,{reason:k},!1)}))}setSlots(k){return(0,F.sH)(this,void 0,void 0,(function*(){0}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},38560:(k,B,U)=>{"use strict";U.d(B,{B:()=>z});var F=U(8674),G=U(79687),j=U(24652),$=U(90633),H=U(48417),V=U(74958),W=U(67665),q=U(13956),K=U(76546);let z=class extends K.D{getInventory(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(H.D.Rifts.GetInventory,{riftKeyId:k},!1)}))}startRiftRun(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){this._segment.rifts.generateRiftRunUuids();const F=this._segment.item.beginSecureItemTransaction();yield this.makeCloudscriptRequest(H.D.Rifts.StartRiftRun,{riftTier:k,riftRunSegmentUuid:this._segment.rifts.riftRunUuid,roundOneSegmentUuid:this._segment.rifts.riftRunRoundUuid},!1),V.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(V.fk.RiftsStartFirstRiftRun,$.B.BREADCRUMB_RIFTS_STARTED_FIRST_RIFT_RUN);const G=this._segment.rifts.getRiftTransactionData();this._segment.rifts.sendRiftRunStartedEvent(k,B,U,G.transaction_id),F.flush(G)}))}startRiftRunDebug(k){return(0,F.sH)(this,arguments,void 0,(function*(k,B="enemy-hp-buff",U=1,F=j.cn.Normal){this._segment.rifts.generateRiftRunUuids(),yield this.makeCloudscriptRequest(H.D.Rifts.Debug.SetRiftRunDebug,{riftStartingNerf:k,riftStartingBuff:B,currentRiftTier:U,riftType:F,riftRunSegmentUuid:this._segment.rifts.riftRunUuid,roundOneSegmentUuid:this._segment.rifts.riftRunRoundUuid},!1)}))}rerollRiftBuffModifier(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(H.D.Rifts.RerollRiftBuffModifier,{riftTier:k},!1)}))}rerollRiftOpponents(){return(0,F.sH)(this,void 0,void 0,(function*(){const k=this._segment.item.beginSecureItemTransaction();yield this.makeCloudscriptRequest(H.D.Rifts.RerollRiftOpponents,{},!1);const B=this._segment.rifts.getRiftTransactionData();k.flush(B)}))}startBossRift(k,B){return(0,F.sH)(this,void 0,void 0,(function*(){const U=yield this.makeCloudscriptRequest(H.D.Rifts.StartBossRift,{riftTier:k,bossType:B},!1);return V.Aj.sendFunnelAdvancedEventIfBreadcrumbNotComplete(V.fk.RiftsStartBossRift,$.B.BREADCRUMB_RIFTS_STARTED_FIRST_BOSS_RIFT),this._segment.rifts.sendBossRiftStartedEvent(),U}))}resetRiftRun(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(H.D.Rifts.ResetRiftRun,{},!0)}))}updateTierUnlockProgress(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(H.D.Rifts.UpdateTierUnlockProgress,{},!0)}))}getRiftsTierData(k){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(H.D.Rifts.GetTierData,{selectedPortalId:k},!1)}))}getRiftsConfig(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(H.D.Rifts.GetConfig,{},!1)}))}getSelectedPortalId(){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(H.D.Rifts.GetSelectedPortal,{},!1)).currentPortalId}))}updateSelectedPortal(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(H.D.Rifts.UpdateSelectedPortal,{selectedPortalId:k},!0)}))}attemptSecureUnlockNextRiftTier(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(H.D.Rifts.AttemptSecureUnlockNextRiftTier,{selectedPortalId:k},!0)}))}reuseRiftPet(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(H.D.Rifts.ReuseRiftPet,{petId:k},!0)}))}expireRiftPetCooldown(k){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(H.D.Rifts.ExpireRiftPetCooldown,{petId:k},!0)}))}getFirstTimeRewardsData(){return(0,F.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(H.D.Rifts.GetFirstTimeRewardsData,{},!1)).firstTimeRewardsData}))}updateRiftsConfigVersion(){return(0,F.sH)(this,void 0,void 0,(function*(){yield this.makeCloudscriptRequest(H.D.Rifts.UpdateRiftsConfigVersion,{},!1)}))}};(0,F.Cg)([(0,q.b)("c47-20b6"),(0,F.Sn)("design:type",W.Y)],z.prototype,"_segment",void 0),z=(0,F.Cg)([(0,G.injectable)()],z)},59219:(k,B,U)=>{"use strict";U.d(B,{E:()=>K});var F,G,j=U(8674),$=U(79687),H=U(76546),V=U(80403),W=U(48417),q=U(15821);!function(k){k.NEAR_RANKINGS="NEAR_RANKINGS",k.TOP_RANKINGS="TOP_RANKINGS"}(G||(G={}));let K=F=class extends H.D{isEligibleForMenu(){return(0,j.sH)(this,void 0,void 0,(function*(){var k,B,U,G,j,$,H,V,W,K;const z=yield this._graphQL.sendRequest(F.STATE_CHALLENGES_CLASS_OPTED_OUT);return null!==(K=!(null===(G=null===(U=null===(B=null===(k=z.data)||void 0===k?void 0:k.viewer)||void 0===B?void 0:B.currentClassroom)||void 0===U?void 0:U.node)||void 0===G?void 0:G.isOptedOutOfStateChallenge)&&q.A.isDefined(null===(W=null===(V=null===(H=null===($=null===(j=z.data)||void 0===j?void 0:j.viewer)||void 0===$?void 0:$.currentClassroom)||void 0===H?void 0:H.node)||void 0===V?void 0:V.currentProdigyCup)||void 0===W?void 0:W.tier))&&void 0!==K&&K}))}fetchStateChallengesData(){return(0,j.sH)(this,void 0,void 0,(function*(){return this._graphQL.sendRequest(F.STATE_CHALLENGES_QUERY)}))}getStateChallengeGoalsData(k){return(0,j.sH)(this,void 0,void 0,(function*(){return(yield this.makeCloudscriptRequest(W.D.StateChallenge.GetStateChallengeGoalsData,{params:k},!1)).goalsData}))}claimStateChallengeGoalsRewards(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(W.D.StateChallenge.ClaimStateChallengeGoalsRewards,{id:k,params:B},!1)}))}claimPreviousStateChallengeGoalsRewards(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(W.D.StateChallenge.ClaimPreviousStateChallengeGoalsRewards,Object.assign({params:k},void 0!==B&&{id:B}),!1)}))}hasUnclaimedPreviousStateChallengeGoalsRewards(k){return(0,j.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(W.D.StateChallenge.HasUnclaimedPreviousStateChallengeGoalsRewards,{params:k},!1)}))}getEndOfChallengeRewards(k,B){return(0,j.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(W.D.StateChallenge.GetEndOfChallengeRewards,{rank:k,correctAnswers:B},!1)}))}getRewardsGrantingPeriodEndDate(k){return(0,j.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(W.D.StateChallenge.GetRewardsGrantingPeriodEndDate,{competition:k},!1)}))}getProdigyCupConfigData(){return(0,j.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(W.D.StateChallenge.GetProdigyCupConfigData,{},!1)}))}};K.STATE_CHALLENGES_QUERY="\n query stateChallengesQuery {\n viewer {\n id\n username\n currentClassroom {\n node {\n id\n classroomMonthlyLeaderboard {\n currentLeaderboard {\n node {\n leaderboard {\n nodes {\n correctAnswers\n displayName\n rank\n }\n }\n currentClassroom {\n node {\n correctAnswers\n displayName\n rank\n rankDeltaValue\n }\n }\n }\n }\n }\n currentProdigyCup {\n tier\n finalsPhase {\n competition\n startDate\n endDate\n lastUpdated\n currentFinalsSchoolEntry {\n correctAnswers\n displayName\n rank\n schoolId\n }\n leaderboard {\n correctAnswers\n displayName\n rank\n schoolId\n }\n }\n stateChallengesPhase {\n startDate\n endDate\n lastUpdated\n nationalCupQualificationDate\n stateChallengeWinnerDate\n currentStateChallenge {\n node {\n topRankings: leaderboard(leaderboardType: TOP_RANKINGS) {\n nodes {\n correctAnswers\n displayName\n rank\n schoolId\n }\n }\n nearRankings: leaderboard(leaderboardType: NEAR_RANKINGS) {\n nodes {\n correctAnswers\n displayName\n rank\n schoolId\n }\n }\n currentSchool {\n node {\n correctAnswers\n displayName\n schoolId\n rank\n }\n }\n }\n }\n stateChallenges {\n\t\t\t\t\t\t\t\t\tnodes {\n month\n\t\t\t\t\t\t\t\t\t\tcurrentSchool {\n\t\t\t\t\t\t\t\t\t\t\tnode {\n rank\n\t\t\t\t\t\t\t\t\t\t\t\tcorrectAnswers\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n }\n }\n }\n }\n }\n }\n ",K.STATE_CHALLENGES_SCHOOL_RANK_ONLY_QUERY="\n query stateChallengesSchoolRankQuery {\n viewer {\n id\n username\n currentClassroom {\n node {\n id\n currentProdigyCup {\n stateChallengesPhase {\n currentStateChallenge {\n node {\n currentSchool {\n node {\n rank\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n ",K.STATE_CHALLENGES_CLASS_OPTED_OUT="\n query stateChallengesClassOptedOut {\n viewer {\n id\n username\n currentClassroom {\n node {\n isOptedOutOfStateChallenge\n currentProdigyCup {\n tier\n }\n }\n }\n }\n }\n ",(0,j.Cg)([(0,$.inject)("8bb-7057"),(0,j.Sn)("design:type",V.K)],K.prototype,"_graphQL",void 0),K=F=(0,j.Cg)([(0,$.injectable)()],K)},70330:(k,B,U)=>{"use strict";U.d(B,{d:()=>Z,p:()=>G});var F,G,j=U(8674),$=U(79600),H=U(3332),V=U(62459),W=U(79687),q=U(95891),K=U(48417),z=U(59287),Y=U(35120),Q=U(34829),X=U(37251);!function(k){k.DoesNotExist="Channel does not exist",k.Full="Channel is full"}(G||(G={}));let Z=F=class{constructor(){this.onError=new V.HN0,this.onNotificationReceived=new V.HN0,this._onSubscribeLocationError=new V.HN0,this._onSubscribeWorldError=new V.HN0,this._onSubscribeFeatureError=new V.HN0,this._onDisconnection=new V.HN0,this._onReconnection=new V.HN0,this._worldChannel=null,this._featureChannels={}}connect(){return(0,j.sH)(this,void 0,void 0,(function*(){if(this._multiplayer)return;const k=Y.q.instance.prodigy.gameContainer.get("be9-3278"),B=new H.Multiplayer(`${X.X.CLIENT_ID}`,k.getMultiplayerRootURL());this._multiplayer=B,B.connect(),B.enableMoveOnAreaPerChannel(),yield B.authenticate(this._catalyst.authHandler.getJWT()),B.generalError((k=>this.onError.dispatch(k))).catch(V.RQr.createHandler("Error in the multiplayer error callback")),B.subscribeFailError(this.onSubscribeFailError.bind(this)).catch(V.RQr.createHandler("Error in subscribeFailError")),B.onReconnect((()=>this._onReconnection.dispatch())).catch(V.RQr.createHandler("Error in onReconnect")),B.disconnectError((()=>this._onDisconnection.dispatch())).catch(V.RQr.createHandler("Error in onDisconnection")),B.addNotificationListener((k=>{"notification"===k.type?this.onNotificationReceived.dispatch(k.notificationInfo):"playerJoined"===k.type?this.onNotificationReceived.dispatch({notificationInfo:k.playerInfo.appearance,action:"player_joined",target:k.playerInfo.userID}):V.VyI.log(`Notification received with invalid message type ${k.type}`,V.$bb.Error)})).catch(V.RQr.createHandler("Error in notification listener"))}))}joinLocationChannel(k,B,U,F,G,$){return(0,j.sH)(this,void 0,void 0,(function*(){yield this.connect();const j=this.createVerboseMessageProcessor(k,B);yield this.leaveLocationChannel().catch(V.RQr.createHandler("Error leaving channel")),this._multiplayer.userListReceiver((B=>{B.channel!==k&&B.channel!==this.getChannelName(k)||j(Object.assign(Object.assign({},B),{type:"userList"}))})).catch(V.RQr.createHandler("Error in user list receiver")),U&&(this.onError.add(U,this.joinLocationChannel),this._onSubscribeLocationError.add(U,this.joinLocationChannel)),F&&this._onDisconnection.add(F,this.joinLocationChannel),G&&this._onReconnection.add(G,this.joinLocationChannel),this._channelSubscriptionCallback=[`${X.X.CLIENT_ID}-${k}`,$],this._multiplayer.subscribe(k,j).catch(V.RQr.createHandler("Error in channel subscription")),this._locationChannel=k}))}leaveLocationChannel(){return(0,j.sH)(this,void 0,void 0,(function*(){if(V.Aq$.isDefined(this._locationChannel)){const k=this._locationChannel;this._locationChannel=null,yield this._multiplayer.unsubscribe(k),this.onError.removeAll(this.joinLocationChannel),this._onSubscribeLocationError.removeAll(this.joinLocationChannel),this._onDisconnection.removeAll(this.joinLocationChannel),this._onReconnection.removeAll(this.joinLocationChannel)}}))}joinWorldChannel(k,B,U){return(0,j.sH)(this,arguments,void 0,(function*(k,B,U,F=!1){const G=z.K.getWorldChannelName(k);if(G===this._worldChannel&&!F)return;const j=this.createVerboseMessageProcessor(k,B);yield this.connect(),yield this.leaveWorldChannel().catch(V.RQr.createHandler("Error world leaving channel")),this._multiplayer.subscribedReceiver((k=>{var B;k.channel!==G&&k.channel!==this.getChannelName(G)||j(Object.assign(Object.assign({},k),{type:"subscribed"})),(null===(B=this._channelSubscriptionCallback)||void 0===B?void 0:B[1])&&this._channelSubscriptionCallback[0]===k.channel&&(this._channelSubscriptionCallback[1](k),this._channelSubscriptionCallback=void 0)})).catch(V.RQr.createHandler("Error in subscribed receiver")),this._onSubscribeWorldError.add(U,this.joinWorldChannel);try{this._multiplayer.subscribe(G,j).catch(V.RQr.createHandler("Error subscribing to world channel"))}catch($){return}this._worldChannel=G}))}createAndJoinWorldChannel(k,B,U){return(0,j.sH)(this,void 0,void 0,(function*(){const F=z.K.sanitizeName(k),G=yield this._catalyst.cloudScript.timeoutMS(1e4).setRetryOption({retryCount:5,retryIntervalMS:1e3}).execute(K.D.World.CreateChannel,{worldName:F});if(!G.isOK())throw new $.CatalystSdkError($.EErrorCode.Unknown,"Unknown CatalystSDK Error",`Status: ${G.status}`);yield this.joinWorldChannel(F,B,(k=>{this.leaveLocationChannel(),V.VyI.log("Could not connect to World",V.$bb.Error),U(k)}),!0)}))}createAndJoinZoneMapChannel(k,B,U,F,G){return(0,j.sH)(this,void 0,void 0,(function*(){const j=z.K.sanitizeName(k),H=z.K.sanitizeName(B),V=yield this._catalyst.cloudScript.timeoutMS(1e4).setRetryOption({retryCount:5,retryIntervalMS:1e3}).execute(K.D.ZoneMap.CreateChannel,{worldName:j,zoneMapName:H});if(!V.isOK())throw new $.CatalystSdkError($.EErrorCode.Unknown,"Unknown CatalystSDK Error",`Status: ${V.status}`);yield this.joinLocationChannel(z.K.getZoneMapChannelName(j,H),U,this.createAndJoinZoneMapSocketError,F,G)}))}createAndJoinZoneMapSocketError(k){this.leaveLocationChannel(),V.VyI.log("Could not connect to map channel",V.$bb.Error)}leaveWorldChannel(){return(0,j.sH)(this,void 0,void 0,(function*(){if(V.Aq$.isDefined(this._worldChannel)){const k=this._worldChannel;this._worldChannel=null,yield this._multiplayer.unsubscribe(k),this.onError.removeAll(this.joinWorldChannel),this._onSubscribeWorldError.removeAll(this.joinWorldChannel)}}))}joinFeatureChannel(k,B,U,F,G){return(0,j.sH)(this,void 0,void 0,(function*(){yield this.connect();const j=this.createVerboseMessageProcessor(k,B);this._multiplayer.userListReceiver((B=>{B.channel!==k&&B.channel!==this.getChannelName(k)||j(Object.assign(Object.assign({},B),{type:"userList"}))})).catch(V.RQr.createHandler("Error in user list receiver"));const $={name:k};U&&(this.onError.add(U,$),this._onSubscribeFeatureError.add(U,$)),F&&this._onDisconnection.add(F,$),G&&this._onReconnection.add(G,$),this._multiplayer.subscribe(k,j).catch(V.RQr.createHandler("Error in channel subscription")),this._featureChannels[k]=$}))}leaveFeatureChannel(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=this._featureChannels[k];V.Aq$.isDefined(B)&&(delete this._featureChannels[k],yield this._multiplayer.unsubscribe(k),this.onError.removeAll(B),this._onSubscribeFeatureError.removeAll(B))}))}leaveAllFeatureChannels(){return(0,j.sH)(this,void 0,void 0,(function*(){for(const k of Object.values(this._featureChannels))delete this._featureChannels[k.name],yield this.leaveFeatureChannel(k.name),this.onError.removeAll(k),this._onSubscribeFeatureError.removeAll(k)}))}moveOnArea(k){return(0,j.sH)(this,void 0,void 0,(function*(){this.isSubscribedToWorld()&&V.Aq$.isDefined(this._locationChannel)&&(yield this._multiplayer.moveOnArea(this.getChannelName(this._locationChannel),k))}))}setUserStatus(k){return(0,j.sH)(this,void 0,void 0,(function*(){const B=yield this._catalyst.cloudScript.timeoutMS(1e4).setRetryOption({retryCount:5,retryIntervalMS:1e3}).execute(K.D.Social.SetStatus,{status:k});if(!B.isOK())throw new $.CatalystSdkError($.EErrorCode.Unknown,"Unknown CatalystSDK Error",`Status: ${B.status}`)}))}getFriendsStatuses(k){return(0,j.sH)(this,void 0,void 0,(function*(){return this._throttledGetFriendStatuses||(this._throttledGetFriendStatuses=q.throttle(this.getFriendStatusesImpl,F.FRIEND_STATUS_UPDATE_INTERVAL,{trailing:!1})),this._throttledGetFriendStatuses(k)}))}getFriendStatusesImpl(k){return(0,j.sH)(this,void 0,void 0,(function*(){k.length>F.GET_FRIENDS_STATUSES_ID_LIMIT&&(V.VyI.log(`Truncating friend status request to ${F.GET_FRIENDS_STATUSES_ID_LIMIT} IDs (${k.length} given)`,V.$bb.Warning),k.length=F.GET_FRIENDS_STATUSES_ID_LIMIT);const B=yield this._catalyst.cloudScript.timeoutMS(1e4).setRetryOption({retryCount:5,retryIntervalMS:1e3}).execute(K.D.Social.GetFriendsStatuses,{friendIds:k});if(!B.isOK())throw new $.CatalystSdkError($.EErrorCode.Unknown,"Unknown CatalystSDK Error",`Status: ${B.status}, Data: ${JSON.stringify(B.data)}`);return B.data}))}onSubscribeFailError(k,B){B===this.getChannelName(this._locationChannel)?this._onSubscribeLocationError.dispatch(k):B===this.getChannelName(this._worldChannel)&&this._onSubscribeWorldError.dispatch(k)}getChannelName(k){return`${X.X.CLIENT_ID}-${k}`}isSubscribedToWorld(){return null!==this._worldChannel}destroy(){this.onError.dispose(),this._onSubscribeLocationError.dispose(),this._onSubscribeWorldError.dispose(),this._onSubscribeFeatureError.dispose(),this.onNotificationReceived.dispose(),this._onDisconnection.dispose(),this._onReconnection.dispose()}createVerboseMessageProcessor(k,B){return Q.s.get("GameConstants.Debug.VERBOSE_SYNAPSE_MESSAGES")?U=>{V.VyI.log(`Message received on channel ${k}: ${JSON.stringify(U)}`,V.$bb.Verbose),B(U)}:B}};Z.FRIEND_STATUS_UPDATE_INTERVAL=1e4,Z.GET_FRIENDS_STATUSES_ID_LIMIT=100,(0,j.Cg)([(0,W.inject)("00d-b27e"),(0,j.Sn)("design:type",X.X)],Z.prototype,"_catalyst",void 0),Z=F=(0,j.Cg)([(0,W.injectable)()],Z)},37962:(k,B,U)=>{"use strict";U.d(B,{j:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(76546);let H=class extends $.D{getVideosConfig(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.Videos.GetConfig,{},!1)}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},34854:(k,B,U)=>{"use strict";U.d(B,{J:()=>H});var F=U(8674),G=U(79687),j=U(48417),$=U(76546);let H=class extends $.D{getWizardWatchData(){return(0,F.sH)(this,void 0,void 0,(function*(){return this.makeCloudscriptRequest(j.D.WizardWatch.GetWizardWatchData,{},!1)}))}};H=(0,F.Cg)([(0,G.injectable)()],H)},5668:(k,B,U)=>{"use strict";U.d(B,{D:()=>H});var F=U(8674),G=U(62459),j=U(95891),$=U(79422);class H extends G.s3P{get multiplayerRoomID(){return this._multiplayerRoomID}get playerList(){return this._playerList}get isDisconnected(){return!!this.joinPromise}constructor(k,B){var U,F;super(k),this.onConnect=new G.HN0,this.onMessage=new G.HN0,this.onPlayerJoined=new G.HN0,this.onPlayerDisconnect=new G.HN0,this._multiplayerRoomID="None",this._playerList=[],this._activePlayerId=null!==(F=null===(U=this.getInjectedValue("306-5359"))||void 0===U?void 0:U.getID())&&void 0!==F?F:G.wa5.getActiveScene().container.get("306-5359").getID(),this.ft=B,this.joinPromise=new G.bnh}broadcastMessage(k){var B,U;null===(B=this.logger)||void 0===B||B.logMessage("Broadcasting message"),null===(U=this.logger)||void 0===U||U.logMessage(JSON.stringify(k)),this.ft.emitMessage(k)}sendMessage(k){var B,U;null===(B=this.logger)||void 0===B||B.logMessage("Sending message"),null===(U=this.logger)||void 0===U||U.logMessage(JSON.stringify(k)),this.ft.emitMessage(k)}joinRoom(k){var B;null===(B=this.joinPromise)||void 0===B||B.resolve(),this.joinPromise=null,this.ft.joinZone({zoneName:k,autoBroadcastPosition:!1,onSubscribed:k=>{this._multiplayerRoomID=k.channel,this.onConnect.dispatch()},onMessage:k=>{var B,U;this.onMessage.dispatch(k),null===(B=this.logger)||void 0===B||B.logMessage("Received Message"),null===(U=this.logger)||void 0===U||U.logMessage(JSON.stringify(k))},onPlayerList:k=>{this._playerList=j.map(k,(k=>parseInt(k,10))).filter((k=>k!==this._activePlayerId))},onPlayerJoined:k=>{const B=parseInt(k,10);B!==this._activePlayerId&&(this._playerList.push(B),this.onPlayerJoined.dispatch(B))},onPlayerLeft:k=>{const B=parseInt(k,10);j.remove(this._playerList,B),this.onPlayerDisconnect.dispatch(B)}})}leaveRoom(){this.joinPromise=new G.bnh,this._multiplayerRoomID="None",this.ft.leaveZone()}awaitRoomJoined(){return(0,F.sH)(this,void 0,void 0,(function*(){this.joinPromise&&(yield this.joinPromise)}))}}(0,F.Cg)([(0,G.fFd)("CoOpLogging"),(0,F.Sn)("design:type",$.h)],H.prototype,"logger",void 0)},6413:(k,B,U)=>{"use strict";U.d(B,{h:()=>F});class F{}F.MAX_TEAM_SIZE=3,F.MAX_NONMEMBER_KENNEL_SIZE=150,F.MAX_KENNEL_SIZE_MULTIPLIER=2,F.STARTER_PET_SNOWFLUFF=148,F.STARTER_PET_MERMINA=145,F.STARTER_PET_WOTT=142,F.STARTER_PET_SPROOT=139,F.STARTER_PET_CHARFOAL=136,F.STARTER_PETS=[F.STARTER_PET_SNOWFLUFF,F.STARTER_PET_MERMINA,F.STARTER_PET_WOTT,F.STARTER_PET_SPROOT,F.STARTER_PET_CHARFOAL],F.CRYSTAL_MONSTER_1=152,F.CRYSTAL_MONSTER_2=153,F.CRYSTAL_MONSTER_3=154,F.CRYSTAL_MONSTERS=[F.CRYSTAL_MONSTER_1,F.CRYSTAL_MONSTER_2,F.CRYSTAL_MONSTER_3],F.DRAGONS=[130,131,132,133]},49282:(k,B,U)=>{"use strict";U.d(B,{D:()=>W});var F=U(8674),G=U(62459),j=U(88022),$=U(77938),H=U(28152),V=U(34603);let W=class extends G.uAl{constructor(){super(...arguments),this.onIconLoaded=new G.HN0}create(){super.create(),G.Aq$.isDefined(this._petID)&&this.setPetID(this._petID)}setPetID(k,B=!1){var U;this._petID=k;{const k=$.t.getItem("pet",this._petID);if(this._petIcon.OnLoaded.addOnce(this.onIconLoaded.dispatch,this.onIconLoaded),k){const F=B?"-cooldown":"";this._petIcon.setAsset(j._.Ui_battle_revamp_json,`icon-mini-element-${null===(U=k.data)||void 0===U?void 0:U.affinity}${F}`).catch(G.RQr.createHandler("Could not set element asset"))}else this._petIcon.setAsset("").catch(G.RQr.createHandler("Could not set asset"))}}destroy(){this.onIconLoaded.dispose(),super.destroy()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],W.prototype,"_petID",void 0),(0,F.Cg)([(0,G.MnK)(V._),(0,F.Sn)("design:type",V._)],W.prototype,"_petIcon",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],W.prototype,"onIconLoaded",void 0),W=(0,F.Cg)([(0,G.EVk)("PetElementDisplay",H.Y.uiPet)],W)},30065:(k,B,U)=>{"use strict";var F;U.d(B,{Q:()=>F}),function(k){k[k.Springfest=0]="Springfest",k[k.Summerfest=1]="Summerfest",k[k.Pumpkinfest=2]="Pumpkinfest",k[k.Winterfest=3]="Winterfest",k[k.StarlightFestival=4]="StarlightFestival",k[k.MoonlightFestival=5]="MoonlightFestival",k[k.GenericFestival=6]="GenericFestival"}(F||(F={}))},47728:(k,B,U)=>{"use strict";U.d(B,{x:()=>st});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(99625),V=U(36648),W=U(57797),q=U(99842),K=U(56567),z=U(92240),Y=U(94310),Q=U(35120),X=U(34829),Z=U(77938),J=U(53880),tt=U(65050),et=U(41674),it=U(46784);class st{static sampleDailyBattleData(k,B,U){return(0,F.sH)(this,void 0,void 0,(function*(){const F=k.dailyPlacements.filter((k=>k.type!==W.k$.Boss&&(U!==W.je.Normal||B!==k.location))),G=$().sample(F),j=k.dailyPlacements.filter((k=>k.type!==W.k$.Normal&&k.location!==(null==G?void 0:G.location)&&(U!==W.je.Boss||B!==k.location))),H=$().sample(j),V=new K.f,[z,Y]=yield Promise.all([q.s.sampleRandomEncounter(k.encounterEntity,V),k.bossEncounterEntity?q.s.sampleRandomEncounter(k.bossEncounterEntity,V):Promise.resolve(void 0)]);return{normalPlacement:G,bossPlacement:H,normalEncounter:z,bossEncounter:Y}}))}static openFestivalAboutMenu(k,B){var U,F,j,$,W,q;const K=H.l.FestivalAboutMenu,z=it.B.FestivalAboutWindow,Y=Q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),X=Q.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig(),Z=Y.getText("ABOUT_X",(null===(U=null==X?void 0:X.tintableBanner)||void 0===U?void 0:U.titleText)?Y.getText(null===(F=null==X?void 0:X.tintableBanner)||void 0===F?void 0:F.titleText):Y.getText("FESTIVAL")),st=Q.q.instance.prodigy.open.prefabMenu(K,void 0,void 0,void 0,!0,{[J.J.BackgroundImageGuid]:null!==(j=null==X?void 0:X.backgroundImageGuid)&&void 0!==j?j:V.q.Background_starlight,[J.J.TitleText]:Z,[J.J.LeftColumnText]:Y.getText(null!==($=null==X?void 0:X.aboutScreenData.leftColumnText)&&void 0!==$?$:""),[J.J.MiddleColumnText]:Y.getText(null!==(W=null==X?void 0:X.aboutScreenData.middleColumnText)&&void 0!==W?W:""),[J.J.RightColumnText]:Y.getText(null!==(q=null==X?void 0:X.aboutScreenData.rightColumnText)&&void 0!==q?q:""),[J.J.FestivalAtlasGuid]:null==X?void 0:X.festivalUiAtlasGuid,[J.J.LeftColumnFrame]:null==X?void 0:X.aboutScreenData.leftAtlasFrame,[J.J.MiddleColumnFrame]:null==X?void 0:X.aboutScreenData.middleAtlasFrame,[J.J.RightColumnFrame]:null==X?void 0:X.aboutScreenData.rightAtlasFrame},{interfaceName:z,interfaceType:et.Wm.Modal,originType:k,originID:B,instanceType:tt.N.Interface},!0,!1,void 0,!1,!0);return st.createContainer=!1,st}static openFestivalProgressMenu(k,B,U,F){let G;return G=this.shouldShowCurrencyDrainPopup(Y.L.CurrencyDrainHudOverride)?st.openCurrencyDrainModal(et.$N.HudClick,F):Q.q.instance.prodigy.gameContainer.get("12b-405a").handleFestivalProgressPopup(F,{originType:k,originID:B}),U&&(null==G||G.onPrefabLoaded.addOnce(U)),G}static openCurrencyDrainModal(k,B){const U=Q.q.instance.prodigy.gameContainer.get("99d-5e9e").getCachedFestivalQuestData();if(!U)return void(null==B||B());const F=Q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),j=U.getEndDate()-Date.now(),$=U.getMetadata();return Q.q.instance.prodigy.open.prefabMenu(H.l.CurrencyDrainWarningModal,B,!0,!0,!0,{CurrencyModalHeader:$.currencyDrainModalTitle?F.getText($.currencyDrainModalTitle):"",CurrencyModalText:$.currencyDrainModalText?F.getText($.currencyDrainModalText):"",CurrencyModalStoreId:U.getMetadata().festivalStoreId,CURRENCY_DISPLAY_ID:U.getMetadata().festivalCurrencyId,CURRENCY_DISPLAY_PROMO:U.getMetadata().currencyDrainPromoGuid,TIMER_TEXT:F.getText(st.DAYS_LEFT_TEXT_KEY,Math.ceil(j/X.s.DAY_IN_MS)),CLOSE_BUTTON_ACTIVE:k!==et.$N.HudClick},{interfaceName:it.B.FestivalCurrencyDrainPopup,interfaceType:et.Wm.Modal,originType:k,originID:"festival",instanceType:tt.N.Interface},!0,!1,void 0,!1,!1)}static openTravelModal(k,B,U){var F;const j=Q.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig(),$=Q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),W={travelModalTitle:$.getText("X_IS_ON",(null==j?void 0:j.tintableBanner.titleText)?$.getText(null==j?void 0:j.tintableBanner.titleText):$.getText("FESTIVAL")),travelModalImageGuid:null!==(F=null==j?void 0:j.modalImageGuid)&&void 0!==F?F:V.q.Pumpkinfest_modal,actionButtonName:st.TRAVEL_MODAL_ACTION_BUTTON_NAME_MAP,actionButtonDestination:st.TRAVEL_MODAL_DESTINATION,actionButtonInterfaceName:st.TRAVEL_MODAL_INTERFACE_NAME_MAP,closeButtonDestination:st.TRAVEL_MODAL_CLOSE_BUTTON_DESTINATION,closeButtonInterfaceName:st.TRAVEL_MODAL_INTERFACE_NAME_MAP};k===et.$N.HudClick&&(W.actionButtonName=st.TRAVEL_MODAL_ACTION_BUTTON_NAME_HUD,W.actionButtonDestination=st.TRAVEL_MODAL_DESTINATION,W.actionButtonInterfaceName=st.TRAVEL_MODAL_INTERFACE_NAME_HUD,W.closeButtonInterfaceName=st.TRAVEL_MODAL_INTERFACE_NAME_HUD);const q=k===et.$N.HudClick?it.B.FestivalHudLaunchPopup:it.B.FestivalLaunchPopup;return Q.q.instance.prodigy.open.prefabMenu(H.l.FestivalTravelModal,B,!0,!1,!0,Object.assign(Object.assign({},W),{[st.TRAVEL_MODAL_TRAVEL_SUCCESS_CALLBACK]:U}),{interfaceName:q,interfaceType:et.Wm.Modal,originType:k,originID:"festival",instanceType:tt.N.Interface},!0,!1,void 0,!1,!1)}static getFestivalMapButtonImage(k){var B,U;const F=Q.q.instance.prodigy.gameContainer.get("12b-405a");if(!F.getActiveFestival())return;return(null!==(U=null===(B=F.getFestivalConfig())||void 0===B?void 0:B.worldMapButtonGuids)&&void 0!==U?U:{})[k]}static getFestivalMapIconImage(){var k;return null===(k=Q.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig())||void 0===k?void 0:k.worldMapIconGuid}static getAllFestivalMapButtonImages(){var k;const B=[],U=Q.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig(),F=null!==(k=null==U?void 0:U.worldMapButtonGuids)&&void 0!==k?k:{};return B.push(...Object.values(F)),(null==U?void 0:U.worldMapIconGuid)&&B.push(U.worldMapIconGuid),B}static isMorphMarbleAsset(k){var B,U;const F=null===(B=Z.t.getItem("item",k))||void 0===B?void 0:B.data;return F?!!((null===(U=F.effect)||void 0===U?void 0:U.transform)&&F.effect.time&&F.effect.ID):(G.VyI.log(`FestivalUtil.isMorphMarbleAsset: Item with ID ${k} not found.`,G.$bb.Warning),!1)}static shouldShowCurrencyDrainPopup(k){var B,U,F,G,j;const $=Q.q.instance.prodigy.gameContainer.get("99d-5e9e"),H=$.getCachedFestivalQuestData();if(!(null===(B=null==H?void 0:H.getMetadata())||void 0===B?void 0:B.festivalCurrencyId))return!1;if(!(null===(U=Q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.getItem("currency",null==H?void 0:H.getMetadata().festivalCurrencyId))||void 0===U?void 0:U.N))return!1;const V=null==H?void 0:H.getStates(),W=null===(F=$.getCachedFestivalQuestData())||void 0===F?void 0:F.getTasks().map((k=>k.taskProgress)),q=z.h.calculateState(k,null!=V?V:[],null!=W?W:[]);return null!==(j=null===(G=null==q?void 0:q.active)||void 0===G?void 0:G.isActive)&&void 0!==j&&j}static getFestivalSegmentContext(){var k;const B=Q.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=Q.q.instance.prodigy.gameContainer.get("99d-5e9e");return{instance_type:B.daily.festivalType,instance_id:null!==(k=U.getCurrentQuestID())&&void 0!==k?k:""}}static hasFestivalBeenSeen(){var k;const B=Q.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=Q.q.instance.prodigy.gameContainer.get("12b-405a").getActiveFestival();if(!U)return!1;const F=null===(k=B.data.hudAttentionSeenFlags)||void 0===k?void 0:k.Festival;return!!F&&Number.parseInt(F.identifier.toString())===U.type}}st.MULTIPLE_PREREQUISITES_TEXT_KEY="FESTIVAL_COMPLETE_OTHER_QUESTS",st.LONG_PREREQUISITE_TEXT_KEY="FESTIVAL_TIER_COMPLETE_X",st.SHORT_PREREQUISITE_TEXT_KEY="FESTIVAL_TIER_COMPLETE_X_TO_UNLOCK",st.DAYS_LEFT_TEXT_KEY="FESTIVAL_TIER_X_DAYS_LEFT",st.STARTS_IN_TEXT_KEY="FESTIVAL_TIER_STARTS_IN_X_DAYS",st.STORY_COMPLETE_TEXT_KEY="FESTIVAL_STORY_TIER_COMPLETE",st.LONG_QUEST_NAME_CHAR_LENGTH=14,st.PROGRESS_STORY_KEY="FESTIVAL_PROGRESS_STORY",st.PROGRESS_COMPLETE_KEY="FESTIVAL_PROGRESS_COMPLETED",st.QUEST_LAMPLIGHT_PROMPT_KEY="FESTIVAL_QUEST_LAMPLIGHT_PROMPT",st.FESTIVAL_TIER_RETURN_TODAY_KEY="FESTIVAL_TIER_RETURN_TODAY",st.FESTIVAL_TIER_RETURN_TOMORROW_KEY="FESTIVAL_TIER_RETURN_TOMORROW",st.FESTIVAL_QUEST_COMING_SOON_KEY="FESTIVAL_QUEST_COMING_SOON",st.TRAVEL_MODAL_ACTION_BUTTON_NAME_HUD="festival-launch-play",st.TRAVEL_MODAL_ACTION_BUTTON_NAME_MAP="festival-play-button",st.TRAVEL_MODAL_DESTINATION="lamplight-B3",st.TRAVEL_MODAL_INTERFACE_NAME_HUD="hud-button",st.TRAVEL_MODAL_INTERFACE_NAME_MAP="world-map",st.TRAVEL_MODAL_CLOSE_BUTTON_DESTINATION="map-screen",st.TRAVEL_MODAL_TRAVEL_SUCCESS_CALLBACK="travel-success-callback"},92946:(k,B,U)=>{"use strict";U.d(B,{E:()=>it});var F=U(8674),G=U(62459),j=U(28152),$=U(35120),H=U(57797),V=U(13956),W=U(90744),q=U(47255),K=U(41674),z=U(65240),Y=U(95057),Q=U(64353),X=U(88022),Z=U(19633),J=U(43333),tt=U(31125),et=U(80060);let it=class extends G.uAl{constructor(){super(...arguments),this._playerDaily=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily,this._assetID="festival-boss-statue-modal",this._bossGraphicsAtlas=X._.Ui_shared_revamp_json,this._bossGraphicOnAssetFrame="boss-statue-on",this._bossGraphicOffAssetFrame="boss-statue-off",this._localizer=$.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService)}create(){var k,B,U,F;super.create();const j=null===(k=$.q.instance.prodigy.gameContainer.get("12b-405a").getFestivalConfig())||void 0===k?void 0:k.bossBattleModalData;if(j)if(this._bossBattleModalData=j,this._bossGraphicsAtlas=null!==(B=j.bossGraphicsAtlas)&&void 0!==B?B:this._bossGraphicsAtlas,this._bossGraphicOnAssetFrame=null!==(U=j.bossGraphicOnAssetFrame)&&void 0!==U?U:this._bossGraphicOnAssetFrame,this._bossGraphicOffAssetFrame=null!==(F=j.bossGraphicOffAssetFrame)&&void 0!==F?F:this._bossGraphicOffAssetFrame,this._bossGraphic.updateAsset(this._bossGraphicsAtlas,this._bossGraphicOnAssetFrame),this._playerDaily.isDailyBattleComplete(H.je.Boss))if(this._playerDaily.dailyBossBattleRematchCount>=this._bossBattleModalData.purchaseRematchLimit)this._titleText.text=this._localizer.getText("BOSS_STATUE_TITLE_INACTIVE"),this._bodyText.text=this._localizer.getText("BOSS_STATUE_BODY_INACTIVE"),this._bossGraphic.updateAsset(this._bossGraphicsAtlas,this._bossGraphicOffAssetFrame),this._actionButton.text=this._localizer.getText("CLOSE_BUTTON_SENTENCE_CASE"),this._countdownTimer.active=!1,this._noButton.GameObject.active=!1,this._rematchCounterGameObject.active=!1,this._actionButton.icon=tt.XN.Close,this._actionButton.onClick.add((()=>{this.GameObject.destroy()}));else{const k=$.q.instance.prodigy.gameContainer.get("5c7-e02d");this._titleText.text=this._localizer.getText("BOSS_STATUE_TITLE_REMATCH"),this._bodyText.text=this._localizer.getText("BOSS_STATUE_BODY_REMATCH"),this._actionButton.text=k.isHardCurrencyMemberLocked(this._bossBattleModalData.respinCostMagicoin)?"Battle Now":this._bossBattleModalData.respinCostMagicoin.toString(),et.d.updateInjectedValues(this.gameObject,{SHOW_MEMBER_ICON:k.isHardCurrencyMemberLocked(this._bossBattleModalData.respinCostMagicoin)}),this._countdownTimer.active=!0;const B=Math.abs(this._playerDaily.lastStarted.getTime()+this._playerDaily.dailyBattleRefreshInterval-Date.now());this._countdownTimerText.setTemplateString("Rematch time"),this._countdownTimerText.setCountdownTimeMS(B),this._rematchCounterText.text=this._localizer.getText("REMATCHES_LEFT_X",this._bossBattleModalData.purchaseRematchLimit-this._playerDaily.dailyBossBattleRematchCount),this._actionButton.onClick.add((()=>{this.spendMagicoinForRematch()}))}else this._titleText.text=this._localizer.getText("BOSS_STATUE_TITLE_ACTIVE"),this._bodyText.text=this._localizer.getText("BOSS_STATUE_BODY_ACTIVE"),this._actionButton.text=this._localizer.getText("BATTLE_NOW"),this._actionButton.icon=tt.XN.Right,this._countdownTimer.active=!1,this._rematchCounterGameObject.active=!1,this._actionButton.onClick.add((()=>{this.startDailyBossBattleCallback()}));else G.RQr.createHandler("BossBattleModalData is undefined")}spendMagicoinForRematch(){const k=$.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily,B=$.q.instance.prodigy.gameContainer.get("12b-405a"),U=$.q.instance.prodigy.gameContainer.get("c47-20b6");let F;if(B.getActiveFestival()){const B=`${k.festivalType}-${this._assetID}`,G=k.getFestivalInstanceName();F={instance_id:B,instance_type:G,sink_type:z.C.FestivalDailyRespawnBossBattle,sink_id:U.festival.getCurrentFestivalSpinID()}}else F={sink_type:z.C.FestivalDailyRespawnBossBattle,sink_id:q.o.FunnelBossStatueModalPurchaseRematch};const j={currency:27,value:this._bossBattleModalData.respinCostMagicoin};this._bossBattleModalData.respinCostMagicoin&&this._paymentManager.canAfford(j)?this._paymentManager.spend(j,"festivalBossBattleRematch",F).then((()=>{this._playerDaily.dailyBossBattleRematchCount++,this.startDailyBossBattleCallback(),this.destroy()})).catch((()=>{G.RQr.createHandler("Error purchasing a boss daily battle rematch"),this.showConversionUpsellPopup(j,U,F),this.GameObject.destroy()})):(this.showConversionUpsellPopup(j,U,F),this.GameObject.destroy())}showConversionUpsellPopup(k,B,U){B.item.sendInsufficientCurrencyEvent(k,U),B.purchase.sendFunnelStart({type:"Festival-Boss-Battle-Hard-Currency-Insufficient-Resources",category:"festival-daily-boss-battle",contentId:`${this._playerDaily.festivalType}-${this._assetID}`,adType:Y.R.UnifiedConversionFlow,adVersion:Q.P.getAdVersion(q.o.FunnelNotEnoughCurrency)});const F={conversionFunnelName:q.o.FunnelNotEnoughCurrency};$.q.instance.prodigy.open.unifiedConversionFlow((()=>this.destroy()),F,{type:K.$N.FestivalBossBattleRematch,id:this._assetID})}};(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],it.prototype,"_titleText",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],it.prototype,"_bodyText",void 0),(0,F.Cg)([(0,G.MnK)(G.vYh),(0,F.Sn)("design:type",G.vYh)],it.prototype,"_bossGraphic",void 0),(0,F.Cg)([(0,G.MnK)(Z.S),(0,F.Sn)("design:type",Z.S)],it.prototype,"_noButton",void 0),(0,F.Cg)([(0,G.MnK)(Z.S),(0,F.Sn)("design:type",Z.S)],it.prototype,"_actionButton",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],it.prototype,"_countdownTimer",void 0),(0,F.Cg)([(0,G.MnK)(J.U),(0,F.Sn)("design:type",J.U)],it.prototype,"_countdownTimerText",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],it.prototype,"_rematchCounterGameObject",void 0),(0,F.Cg)([(0,G.MnK)(G.EYj),(0,F.Sn)("design:type",G.EYj)],it.prototype,"_rematchCounterText",void 0),(0,F.Cg)([(0,V.b)("743-fd51"),(0,F.Sn)("design:type",W.E)],it.prototype,"_paymentManager",void 0),it=(0,F.Cg)([(0,G.EVk)("BossStatueModalComponent",j.Y.festival)],it)},31589:(k,B,U)=>{"use strict";U.d(B,{l:()=>ot});var F,G=U(8674),j=U(62459),$=U(35120),H=U(28402),V=U(95891),W=U(99625),q=U(65240),K=U(41674),z=U(90744),Y=U(13956),Q=U(64353),X=U(80060),Z=U(47255),J=U(43846),tt=U(43531),et=U(95057),it=U(21097),st=U(30226),nt=U(46318);class at extends nt.Q{constructor(){super(...arguments),this._segment=$.q.instance.prodigy.gameContainer.get("c47-20b6"),this._weekendEvents=$.q.instance.prodigy.gameContainer.get("12b-405a")}start(){let k=this.data.spinDialogueID;const B=this.data.firstSpinBreadcrumb;j.Aq$.isDefined(this.data.firstSpinDialogueID)&&!$.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(B.featureName,B.breadcrumbName)&&(k=this.data.firstSpinDialogueID,$.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(B.featureName,B.breadcrumbName)),this.showInitialDialogue(k)}tryAgain(){const k=new tt.rD(this.game);k.addEvents([{dialogueData:k.dataProvider.get(this.data.prizeReceivedDialogueID),blockInput:!0},{callback:this.showInitialDialogue.bind(this,this.data.spinAgainDialogueID)}]),k.start()}showInitialDialogue(k){const B=$.q.instance.prodigy.gameContainer.get("5c7-e02d");if(this.player.canSpin(this.assetID)||!this.player.canPurchaseSpin(this.assetID,this.data)||B.isHardCurrencyMemberLocked(this.data.respinCost.amount)){const B=(this.player.hasMembership()?2:1)-this.player.getNumSpins(this.assetID),U={INFO_TEXT:B>0?(0,J.k)("WHEEL_FREE_SPINS",B):void 0},F=$.q.instance.prodigy.gameContainer.get("d0e-64fd");X.d.preloadWithInjectedValuesAndDependenciesFromGUID(F,W.l.CharacterDialogue,U).then((()=>{const B=new tt.rD(this.game);B.addEvents([{type:tt.fA.WHEEL,dialogueData:Object.assign(Object.assign({},B.dataProvider.get(k)),{injectedValues:X.d.getDataForInjection(U)}),yes:this.trySpin.bind(this),no:this.showGoodbyeDialogue.bind(this)}]),B.start()})).catch(j.RQr.createHandler("Error preloading dialogue prefab"))}else this.showPurchaseSpinDialogue()}showSpinningDialogue(){this._spinDialogue=new tt.rD(this.game),this._spinDialogue.addEvents([{dialogueData:this._spinDialogue.dataProvider.get(this.data.spinningDialogueID)}]),this._spinDialogue.start(!0)}closeSpinDialogue(){this._spinDialogue.close()}showOutOfSpinsDialogue(k){var B,U;const F=new tt.rD(this.game),G=[];if(this._weekendEvents.getActiveFestival()){const k=this.player.daily,F=k.getFestivalInstanceName(),G=k.festivalType,j=null===(U=null===(B=this._weekendEvents.getFestivalConfig())||void 0===B?void 0:B.festivalPrizeWheels.find((k=>k.wheelId===this.assetID)))||void 0===U?void 0:U.name;this._segment.festival.sendFestivalPrizeWheelSpinFailedEvent(null!=j?j:this.assetID.toString(),this.assetID,it.WE.OutsideOfHours,F,G)}if(G.push({dialogueData:F.dataProvider.get(this.data.outOfSpinsDialogueID),blockInput:!0}),!this.player.hasMembership()&&!st.J.shouldSuppressAd(this.player)&&this.player.getNumSpins(this.assetID)<2){G.push({callback:$.q.instance.prodigy.open.membershipInfo.bind($.q.instance.prodigy.open,void 0,k)});const B=st.J.showYouTubeMembershipAd(this.game,!0)?et.R.Video:et.R.Static;this._segment.purchase.sendFunnelStart(Object.assign(Object.assign({},this.getSegmentPurchaseFunnelTriggerTypeAndCategory()),{contentId:`prizeWheel-${this.assetID}`,adType:B}))}G.push({callback:this.close.bind(this)}),F.addEvents(G),F.start()}openPrizesDialogue(k,B){let U={source_type:q.C.PrizeWheel};if(this._weekendEvents.getActiveFestival()){const k=this.player.daily,B=k.getFestivalInstanceName(),F=`${k.festivalType}-${this.assetID}`;U={source_type:q.C.FestivalPrizeWheel,source_id:this._segment.festival.getCurrentFestivalSpinID(),instance_id:B,instance_type:F}}const F=$.q.instance.prodigy.open.gotItem(k,(()=>{F.onClose=null,this.tryAgain()}),void 0,B,void 0,void 0,U)}showGoodbyeDialogue(){const k=new tt.rD(this.game);k.addEvents([{dialogueData:k.dataProvider.get(this.data.declineSpinDialogueID),blockInput:!0},{callback:this.close.bind(this)}]),k.start()}showPurchaseSpinDialogue(){var k,B,U;const F=new tt.rD(this.game),G=[],H=(null!==(k=this.data.purchaseSpinCount)&&void 0!==k?k:this.player.getNumSpins(this.assetID))-this.player.getNumSpins(this.assetID)+(this.player.hasMembership()?2:1),q={CURRENCY_AMOUNT:null!==(U=null===(B=this.data.respinCost)||void 0===B?void 0:B.amount.toString())&&void 0!==U?U:"",STAY_BUTTON_TEXT:(0,J.k)("NOT_NOW_CAPITAL"),INFO_TEXT:(0,J.k)("WHEEL_REMAINING",(0,V.clamp)(H,0,99))},K=$.q.instance.prodigy.gameContainer.get("d0e-64fd");X.d.preloadWithInjectedValuesAndDependenciesFromGUID(K,W.l.CharacterDialogue,q).then((()=>{G.push({type:tt.fA.CURRENCY,dialogueData:Object.assign(Object.assign({},F.dataProvider.get(this.data.purchaseSpinDialogueID)),{currencyButton:this.data.respinCost?{currencyId:this.data.respinCost.currencyId,amount:this.data.respinCost.amount}:void 0,injectedValues:X.d.getDataForInjection(q)}),yes:this.spendMagicoinToSpin.bind(this),no:this.showGoodbyeDialogue.bind(this)}),F.addEvents(G),F.start()})).catch(j.RQr.createHandler("Error preloading dialogue prefab"))}spendMagicoinToSpin(){let k;if(this._weekendEvents.getActiveFestival()){const B=this.player.daily,U=B.getFestivalInstanceName(),F=`${B.festivalType}-${this.assetID}`;k={instance_id:U,instance_type:F,sink_type:q.C.FestivalPrizeWheel,sink_id:this._segment.festival.getCurrentFestivalSpinID()}}else k={sink_type:q.C.PrizeWheel,sink_id:Z.o.FunnelPrizeWheelPurchaseSpin};const B={currency:this.data.respinCost.currencyId,value:this.data.respinCost.amount};this.data.respinCost&&this._paymentManager.canAfford(B)?this._paymentManager.spend(B,"prizeWheelSpin",k).then((()=>{this.showSpinningDialogue(),this.startSpin()})).catch((()=>{j.RQr.createHandler("Error purchasing a prize wheel spin"),this.showNotEnoughMagicoinDialogue(B,k)})):this.showNotEnoughMagicoinDialogue(B,k)}showNotEnoughMagicoinDialogue(k,B){var U,F,G;$.q.instance.prodigy.gameContainer.get("c47-20b6").item.sendInsufficientCurrencyEvent(k,B);const j=new tt.rD(this.game),H={CURRENCY_AMOUNT:null!==(F=null===(U=this.data.respinCost)||void 0===U?void 0:U.amount.toString())&&void 0!==F?F:"",STAY_BUTTON_TEXT:"Okay"};j.addEvents([{type:tt.fA.CURRENCY,dialogueData:Object.assign(Object.assign({},j.dataProvider.get(null!==(G=this.data.purchaseSpinFailedDialogueID)&&void 0!==G?G:this.data.declineSpinDialogueID)),{injectedValues:X.d.getDataForInjection(H)}),yes:this.showConversionUpsellPopup.bind(this),no:this.close.bind(this)},{callback:this.close.bind(this)}]),j.start()}showConversionUpsellPopup(){$.q.instance.prodigy.gameContainer.get("c47-20b6").purchase.sendFunnelStart({type:"Prize-Wheel-Hard-Currency-Insufficient-Resources-Respin",category:"festival-prize-wheel",contentId:`${this.player.daily.festivalType}-${this.assetID}`,adType:et.R.UnifiedConversionFlow,adVersion:Q.P.getAdVersion(Z.o.FunnelNotEnoughCurrency)});const k={conversionFunnelName:Z.o.FunnelNotEnoughCurrency};$.q.instance.prodigy.open.unifiedConversionFlow((()=>this.close()),k,{type:K.$N.PrizeWheel,id:this.assetID.toString()})}}(0,G.Cg)([(0,Y.b)("743-fd51"),(0,G.Sn)("design:type",z.E)],at.prototype,"_paymentManager",void 0);class rt extends at{constructor(k,B,U,F,G,j){super(k,B,U,F,G),this.festivalPrizeWheelComponent=j}trySpin(){this.festivalPrizeWheelComponent&&this.festivalPrizeWheelComponent.toggleWheelNewContainerActive(!1),super.trySpin()}}let ot=F=class extends j.jsv{constructor(){super(...arguments),this.wheelID=F.WHEEL_OF_WONDER_ID,this.wheelNpcContainerActive=!0,this.wheelNewStateContainerActive=!0,this.onWheelClose=new j.HN0}create(){super.create(),this.wheelNpcContainer.active=this.wheelNpcContainerActive,this.toggleWheelNewContainerActive()}destroy(){this.onWheelClose.dispose(),super.destroy()}toggleWheelNewContainerActive(k){if(void 0!==k)this.wheelNewStateContainerActive=k;else{const k=this._loggedInPlayer.player;this.wheelNewStateContainerActive=void 0===k.getNumSpins(this.wheelID)}this.wheelNewStateContainer.active=this.wheelNewStateContainerActive}openWheel(k){$.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily.isNewFestivalWheel=!1;const B=k&&"number"==typeof k?k:this.wheelID;new rt($.q.instance.prodigy.game,this.screen.uiLayer,this._loggedInPlayer.player,this.screen,B,this)}moveSparkleEffect(k=0,B=0){const U=this.wheelSparklesGO.findComponent(j.XVE);U.setPosition(U.localPosition.x+k,U.localPosition.y+B)}};ot.WHEEL_OF_WONDER_ID=1,(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],ot.prototype,"wheelID",void 0),(0,G.Cg)([(0,j.MnK)(j.vYh),(0,G.Sn)("design:type",j.vYh)],ot.prototype,"wheelGraphic",void 0),(0,G.Cg)([(0,j.MnK)(H.v),(0,G.Sn)("design:type",H.v)],ot.prototype,"wheelNpcSpine",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ot.prototype,"wheelNpcContainer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ot.prototype,"wheelNpcContainerActive",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ot.prototype,"wheelSparklesGO",void 0),(0,G.Cg)([(0,j.ERr)(),(0,G.Sn)("design:type",j._mx)],ot.prototype,"wheelNewStateContainer",void 0),(0,G.Cg)([(0,j.vkK)(),(0,G.Sn)("design:type",Boolean)],ot.prototype,"wheelNewStateContainerActive",void 0),(0,G.Cg)([(0,j.Cdj)("e20-0fb0"),(0,G.Sn)("design:type",Object)],ot.prototype,"_loggedInPlayer",void 0),(0,G.Cg)([(0,j.bbQ)(),(0,G.Sn)("design:type",j.HN0)],ot.prototype,"onWheelClose",void 0),ot=F=(0,G.Cg)([(0,j.EVk)("FestivalPrizeWheel",j.YH6.ui)],ot)},28080:(k,B,U)=>{"use strict";U.d(B,{D:()=>Q});var F,G=U(8674),j=U(62459),$=U(99625),H=(U(5491),U(35120)),V=U(82209),W=U(129),q=U(28152),K=U(6476),z=U(51941),Y=U(80060);let Q=F=class extends j.uAl{constructor(){super(...arguments),this.skinColor=1,this.eyeColor=1,this.face=1,this.hairColor=1,this.hairStyle=1,this.morphId=1}create(){super.create(),this.spawn().catch(j.RQr.createHandler("Error spawning wizard"))}spawn(){return(0,G.sH)(this,void 0,void 0,(function*(){const k=new W.a(H.q.instance.game);k.appearance.setFace(this.face),k.appearance.setHair(this.hairStyle,this.hairColor),k.appearance.setSkinColor(this.skinColor),k.appearance.setEyeColor(this.eyeColor),k.equipment.setHat(this.hat),k.equipment.setOutfit(this.outfit),k.equipment.setWeapon(this.weapon),k.equipment.setBoots(this.boots),k.equipment.setMount(this.mount),this.morphType&&this.morphId&&k.setData({playerTransformation:{transformType:this.morphType,transformID:this.morphId}});const B=yield F.createWizardObject(k);this.gameObject.addChild(B)}))}static createWizardObject(k){return(0,G.sH)(this,arguments,void 0,(function*(k,B=!0){var U;const F=new V.z;F.initialize(k);const G=new j._mx;G.active=!1,G.addComponent(j.dLy);const W=yield Y.d.loadWithInjectedValuesAndDependenciesFromGUID(H.q.instance.prodigy.gameContainer.get("d0e-64fd"),$.l.WizardInjectionConfigured,{"377-3e7b":F,APPEARANCE:{face:k.appearance.getFace(),hair:k.appearance.getHair(),skin:k.appearance.getSkinColor(),eyeColor:k.appearance.getEyeColor(),hat:k.equipment.getHat(),outfit:k.equipment.getOutfit(),weapon:k.equipment.getWeapon(),boot:k.equipment.getBoots(),costume:k.equipment.getCostume()}},G);if(!B){W.findComponentInChildren(K.T).GameObject.active=!1}return yield null===(U=W.findComponentInChildren(z.c))||void 0===U?void 0:U.onLoadComplete.asPromise(),W}))}};(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"skinColor",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"eyeColor",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"face",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"hairColor",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"hairStyle",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"hat",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"outfit",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"weapon",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"boots",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"mount",void 0),(0,G.Cg)([(0,j.W_S)(),(0,G.Sn)("design:type",String)],Q.prototype,"morphType",void 0),(0,G.Cg)([(0,j.g11)(),(0,G.Sn)("design:type",Number)],Q.prototype,"morphId",void 0),Q=F=(0,G.Cg)([(0,j.EVk)("WizardSpawner",q.Y.player)],Q)},71802:(k,B,U)=>{"use strict";U.d(B,{D:()=>tt});var F=U(62459),G=U(95891),j=U(68910),$=U(88022),H=U(56942),V=U(73678),W=U(35120),q=U(34829),K=U(77938),z=U(10730),Y=U(28930),Q=U(73797),X=U(48951),Z=U(21922),J=U(83726);class tt extends J.T{constructor(k,B,U,F,G,j,H,V){const W=`${V}-${H.tilemap}`;super(k,B,U,F,G,[],j.concat([W,$._.Ui_social_feed_json,$._.Ui_coop_json])),this.mapConfig=H,this.file=W,this.dungeonZone=k,this.key=`${this.mapConfig.x}-${this.mapConfig.y}`}setup(k,B,U){super.setup(k,B,U);const G=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;let j=this.dungeonZone.collectedItems[this.key];F.Aq$.isDefined(j)||(j=this.dungeonZone.collectedItems[this.key]=[]),B.zoneName=`${this.dungeonZone.ID}-${G.userID}`;for(let F=0;F<4;F++)this.toggleDynamicLayer(this.game,F+1,!1,0);for(let F=0;F{this.dungeonZone.skipProgressBarAnimation=!0,this.dungeonZone.teleportInDungeon(U.map,j.exit.x,j.exit.y)})).name=Y.O[G];const H=W.q.instance.prodigy.create.sprite(j.area.x,j.area.y,$._.General_core_json,"empty",{x:.5,y:.5},null,200,200);H.events.onInputUp.add((()=>{this.walkToDoorway(j.walkTarget.x,j.walkTarget.y,null)})),H.alpha=0,H.inputEnabled=!0,this.screen.content.addChild(H),this.toggleDynamicLayer(this.game,G+1,!0,0),this.addDoorGlow(G,j)}for(let F=0;F{k&&this.screen.user.setPath(k,U)})).catch(F.RQr.createHandler("Unable to find path to doorway"))}addCollected(k){this.dungeonZone.addCollected(this.key,k)}addDoorGlow(k,B){const U=this.game.add.spine(B.glowPos.x,B.glowPos.y,H.Q.Spine_archive_door_glow_json);U.setToSetupPose(),U.setAnimationByName(0,B.glowAnimation,!0),U.scale.x=B.isGlowFlipped?-1:1,F.Aq$.toggleDisplayObjSmooth(U,!1),this.screen.above.add(U)}createHUDCounter(){if(this.isInAcademyElementalTower())W.q.instance.prodigy.open.academyTowerProgress().onPrefabLoaded.add((k=>{k.findComponent(Z.u).initialize(this.dungeonZone.skipProgressBarAnimation)}));else if(F.Aq$.isDefined(this.counterUI)){const k=K.t.getItem("ui",this.counterUI).data;this.hudCounterContainer=new j.Container;const B=new X.c(this.game).createUIElements(k.elements,this.hudCounterContainer);this.hudCounterText=B.find((k=>"counterText"===k.name));const U=this.dungeonZone.goalTotal,F=this.dungeonZone.goalCollected;this.hudCounterText.setText(`${F} / ${U}`),this.game.broadcaster.addAppListener(Q.$i.TargetCollected,(()=>{this.updateHUDCounter()}),this)}}isInAcademyElementalTower(){return tt.ELEMENTAL_TOWER_ZONE_IDS.includes(this.zone.ID)}updateHUDCounter(){F.Aq$.isDefined(this.hudCounterText)&&this.hudCounterText.setText(`${this.dungeonZone.goalCollected} / ${this.dungeonZone.goalTotal}`)}guideToExit(k){if(!tt.hasExit(this.mapConfig,k)){const B=this.getDirectionToExit(k);if(F.Aq$.isDefined(B)){const k=Y.O[B],U=this.screen.floor.getByName(k);if(F.Aq$.isDefined(U)){const k=this.screen.above.add(W.q.instance.prodigy.create.sprite(U.x,U.y,$._.General_core_json,"area-pointer"));k.anchor.set(.5,0);let G=0,j=0;switch(B){case Y.O.North:j=20,k.x-=5;break;case Y.O.East:G=-20,k.x-=20,k.y-=10,k.angle=90;break;case Y.O.South:j=-20,k.y-=80,k.x-=5,k.angle=190;break;case Y.O.West:G=20,k.x+=20,k.y-=10,k.angle=270}this.game.add.tween(k,this).to({x:k.x+G,y:k.y+j},400,F.GS3.Quadratic.InOut,!0,0,q.A.MAX_SAFE_INTEGER,!0)}}}}getDirectionToExit(k){for(let B=0;Bk instanceof z.v&&k.id===B))>=0}cleanup(){this.game.broadcaster.removeAppListener(Q.$i.TargetCollected,this),this.hudCounterText&&(this.hudCounterText.destroy(),this.hudCounterText=null),super.cleanup()}}tt.ELEMENTAL_TOWER_ZONE_IDS=[V.A_.EARTHTOWER,V.A_.ICETOWER,V.A_.STORMTOWER,V.A_.FIRETOWER,V.A_.WATERTOWER,V.A_.ASTRALTOWER]},4631:(k,B,U)=>{"use strict";var F;U.d(B,{j:()=>F}),function(k){k[k.openMap=0]="openMap",k[k.mapTeleport=1]="mapTeleport",k[k.teleport=2]="teleport",k[k.logout=3]="logout"}(F||(F={}))},83726:(k,B,U)=>{"use strict";U.d(B,{T:()=>et});var F=U(8674),G=U(62459),j=U(95891),$=U.n(j),H=U(88022),V=U(51742),W=U(62886),q=U(35120),K=U(15521),z=U(34829),Y=U(77938),Q=U(10592),X=U(13367),Z=U(73797),J=U(30226),tt=U(1041);class et extends tt.Z{constructor(k,B,U,F,j,$,W,K,z){super(q.q.instance.prodigy.gameContainer),this.tag="",this.isScene=!1,this.isMultiplayerDisabled=!1,this.arePopupsDisabled=!1,this.nameKey="",this.x=0,this.y=0,this.battleBG="",this.locations=[],this.questParams={},this.mapMonsters=[],this.guideHandData=[],this.tag=B,this.nameKey=U,this.zoneName=`${k.ID}-${B}`,this.x=F,this.y=j,this.file=`map-${this.zoneName.toLowerCase()}`,this.onFaint=k.defaultOnFaint,this.zone=k,this.battleBG=k.battleBG,this.technicalMetricsManager=q.q.instance.prodigy.gameContainer.get("2a1-fed9"),G.Aq$.isDefined(K)?this.file=K.toLowerCase():this.file=`map-${this.zoneName.toLowerCase()}`,this.assets.clear();const Y=[this.file,H._.Particles_json,H._.Ui_social_feed_json,V.c.Sfx_toaster_open].concat(W);G.Mnj.addAll(this.assets,Y),this.locations=$,this.guideHandData=null!=z?z:[]}get isQuestHub(){return this.zone.questHub.indexOf(this.tag)>=0}get name(){return this.getName()}getName(){return q.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(this.nameKey)}getLocation(){return this.zoneName}setup(k,B,U={}){this.questParams=G.Aq$.isDefined(U)?U:{},q.q.instance.prodigy.gameContainer.get("a25-68f4").sendQuestEventViaHub(W.T.ENTER_MAP,{id:`${this.zone.ID}-${this.tag}`}).catch(G.RQr.createHandler(`Error sending EnterMap event for ${this.zone.ID}-${this.tag}`));const F=this.technicalMetricsManager.timeToPlayMS;null!==F&&(G.VyI.log(`TTP: ${F}`,G.$bb.Verbose),this.technicalMetricsManager.timeToPlayMS=null),this.zone.hasDaily(this)&&G.Aq$.isDefined(this.zone.monsters)&&this.zone.placeDaily(this,k,B);const j=q.q.instance.prodigy.gameContainer.get("e5b-e931");if(this.canRegularMonsterSpawn()){const U=q.q.instance.prodigy.world;U.getPreviousMap()!==U.getCurrentMap()&&this.clearRespawns(),Promise.all([j.getSpawnDataForMap(this.zoneName),j.getMaximumSpawnsForMap(this.zoneName)]).then((([U,F])=>{U.map(((k,B)=>Object.assign({spawnId:B},k))).sort((()=>Math.random()-.5)).sort((k=>this.mapMonsters[k.spawnId+1]?-1:1)).slice(0,F).forEach((k=>{this.screen.user.playerPrefab?this.addPrefabEncounter(k.spawnId,k.x,k.y):this.screen.user.OnLoad.addOnce((()=>this.addPrefabEncounter(k.spawnId,k.x,k.y)))})),this.onMonsterSpawns(k,B)})).catch(G.RQr.createHandler(`Error loading spawn data for map ${this.zoneName}`))}else this.onMonsterSpawns(k,B);this.game=k,this.screen=B,this.game.broadcaster.addAppListener(Z.ph.EnableDynamicLayer,this.toggleDynamicLayer.bind(this),this,null,!0)}getEncounterDataFromLocalAsset(k){return(0,F.sH)(this,void 0,void 0,(function*(){return q.q.instance.prodigy.gameContainer.get("e5b-e931").loadDataSchemaFromJson(k)}))}start(k,B,U){const F=G.Aq$.isDefined(U)?U:this.zone.bgmID;q.q.instance.prodigy.audio.autoplay&&(q.q.instance.prodigy.audio.playBGM(F,!0),q.q.instance.prodigy.audio.resumeBGM())}process(k,B,U){}update(k){}getTag(){return this.tag}cleanup(){this.game?(this.game.broadcaster.removeAppListener(Z.ph.EnableDynamicLayer,this),super.cleanup()):G.VyI.log("Map cleanup called after map destroyed.",G.$bb.Warning)}processDynamicLayers(k,B){for(const U of this.dynamicSprites)G.Aq$.isDefined(U.collisionTile)&&U.collisionTile?U.destroy():U.isAbove?(K.Z.bringToTop(this.dynamicLayerContainers[`element-${U.dynamicToggle}`].above),this.dynamicLayerContainers[`element-${U.dynamicToggle}`].above.add(U)):(K.Z.bringToTop(this.dynamicLayerContainers[`element-${U.dynamicToggle}`].below),this.dynamicLayerContainers[`element-${U.dynamicToggle}`].below.add(U))}addAreaEvent(k,B,U,F,j,$,H,V,W=!1,K=!1){var z,Y;const Q=null!==(Y=null===(z=this.questParams)||void 0===z?void 0:z.enableAreaEvents)&&void 0!==Y?Y:!K,X=Q&&W;return U.target=F,!G.Aq$.isDefined(H)&&q.q.instance.prodigy.classModeController.isLockedZone(F)?(U.canReTrigger=!0,B.addAreaEvent(U,q.q.instance.prodigy.classModeController.onClassMode.bind(q.q.instance.prodigy.classModeController,F),V,X,!Q)):G.Aq$.isDefined(H)?B.addAreaEvent(U,H,V,X,!Q):B.addAreaEvent(U,q.q.instance.prodigy.world.it.bind(q.q.instance.prodigy.world,F,j,$),V,X,!Q)}addChest(k,B,F,j,$,H,V){if(G.Aq$.isDefined(this.questParams.enableChests)&&!this.questParams.enableChests)return null;const W=U(93096)[`${this.zoneName}-${F}`];return W||G.VyI.log(`No chest rewards found for chest with ID ${F} in ${this.zoneName}`,G.$bb.Error),B.addChest(F,j,$,W,H,V)}clearRespawns(){var k;for(let B=0;Bk===this.zoneName)))return!1;H.setUltimateSessionStatus(Q.n.None,null,0)}if(G.Aq$.isDefined(this.questParams.enableMonsters)&&!this.questParams.enableMonsters||G.Aq$.isDefined(this.questParams.overrideMonsterIDWithPippet)&&k===this.questParams.overrideMonsterIDWithPippet)return!1;if(J.J.isCoreZone(this.zone.ID)&&!B){const B=this.zone.getQuestState();if((null==B?void 0:B.req)&&(null===(F=null===(U=B.monsterState)||void 0===U?void 0:U[this.tag])||void 0===F?void 0:F[k])>0)return!1;if(1===(null===(j=B.state)||void 0===j?void 0:j[k]))return!1}return!(!B&&(null===($=this.mapMonsters[k])||void 0===$?void 0:$.respawn))}addMonster(k,B,U,F,j,$,H,V=!1,W=null,K=!1){if(G.Aq$.isDefined(this.mapMonsters[U])||(this.mapMonsters[U]={}),!this.canSpawnMonsterWithId(U,V))return null;const z=J.J.copyObject(H);z.onEnd=G.Aq$.isDefined(z.onEnd)?z.onEnd:this.zoneName,z.onFaint=G.Aq$.isDefined(z.onFaint)?z.onFaint:this.onFaint,z.screen=G.Aq$.isDefined(z.screen)?z.screen:this.battleBG,G.Aq$.isDefined(this.mapMonsters[U].data)&&!K&&(z.encounter=[this.mapMonsters[U].data]);const Y=q.q.instance.prodigy.gameContainer.get("d1f-4da3"),Q=B.addMonster(U,F,j,$,z,et.resetMonsterRespawn.bind(this,this.mapMonsters[U],z,Y.spawnCooldownDurationSeconds),G.Aq$.isDefined(this.mapMonsters[U].respawn),W);return this.mapMonsters[U].data=Q.monsterData,this.mapMonsters[U].event=Q,delete this.mapMonsters[U].respawn,Q}addPrefabEncounter(k,B,U){this.canSpawnMonsterWithId(k+1)&&q.q.instance.prodigy.prefabFactory.addMonster(this,B,U,k).catch(G.RQr.createHandler("Could not load spawn encounter prefab"))}static resetMonsterRespawn(k,B,U){k.monsterData=null,k.respawn=(new Date).getTime()+1e3*U,G.Aq$.isDefined(B)&&(k.data=null,G.Aq$.isDefined(B.onEnc)&&B.onEnc())}addPippet(k,B,U,F,j){const $=this.questParams.enableMonsters||!1;this.featureRequirements.meetsRequirementsDeprecated(1)&&G.Aq$.isDefined(q.q.instance.prodigy.world.pippetEncounterSpawn)&&this.zoneName===q.q.instance.prodigy.world.pippetEncounterSpawn.location&&!$&&(this.questParams.overrideMonsterIDWithPippet=G.Aq$.isDefined(U)?U:1,B.addPippet(F,j))}addWizard(k,B,U,F,j,$,H){const V=this.generateRogueWizardMod($);V.onEnd=G.Aq$.isDefined(V.onEnd)?V.onEnd:this.zoneName,V.onFaint=G.Aq$.isDefined(V.onFaint)?V.onFaint:this.onFaint,V.screen=G.Aq$.isDefined(V.screen)?V.screen:this.battleBG;const W=B.addWizard(U,F,j,V);return null!==W&&(H&&W.flip(),G.Aq$.isDefined(this.questParams.enableWizards)&&!this.questParams.enableWizards&&(W.visible=!1)),W}addConstructedNPC(k,B,U,F,j,$,H,V){return G.Aq$.isDefined(this.questParams.hiddenNPCs)&&this.questParams.hiddenNPCs.indexOf(j)>-1?null:B.addConstructedNPC(U,F,j,$,H,V)}addCollisionZone(k,B,U,F,G){const j=k.path.size,$=Math.floor(F/j),H=Math.floor(G/j),V=Math.floor(B/j),W=Math.floor(U/j);for(let q=V;q0?(k.add.tween([$.above],this).to({alpha:j},G.Aq$.isDefined(F)?F:1,G.GS3.Linear.None).start(),k.add.tween([$.below],this).to({alpha:j},G.Aq$.isDefined(F)?F:1,G.GS3.Linear.None).start()):($.above.alpha=j,$.below.alpha=j)),G.Aq$.isDefined(H)&&(H.forEach((k=>{this.screen.area[k.y][k.x]=U?k.value:1})),this.screen.path.init(this.screen.area,this.screen.tileSize))}}canRegularMonsterSpawn(){return!0}onMonsterSpawns(k,B){}getDefaultSpawnPosition(){return{x:this.x,y:this.y}}}(0,F.Cg)([(0,G.fFd)("db5-fb6e"),(0,F.Sn)("design:type",Object)],et.prototype,"featureRequirements",void 0),(0,F.Cg)([(0,G.fFd)("c47-20b6"),(0,F.Sn)("design:type",Function)],et.prototype,"segment",void 0)},85182:(k,B,U)=>{"use strict";U.d(B,{T:()=>$});var F=U(5491),G=U(35120),j=U(39984);class ${constructor(k,B,U,F,G,j,$,H,V,W,q,K,z=null,Y=null,Q=null){this.collectionMaps=null,this.zone=k,this.assets=B,this.ID=U,this.descKey=F,this.descCacheKey=F,this.req=G,this.area=j,this.areaCache=j,this.onStart=$,this.onProc=H,this.onComplete=V,this.reward=W,this.chain=q||!1,this.questGiver=z,this.questReceiver=Y,this.alternateOnStart=Q,this.questStep=K}setup(k,B,U){return this.screen=B,this.map=U,{}}start(k,B,U){return{}}end(){}process(k,B,U){}update(k,B,U){}static getXpRewardedForCompletingQuest(){const k=G.q.instance.prodigy.gameContainer.get("e20-0fb0").player.getLevel(),B=Math.pow(.5,k/25);return Math.round(Math.max(this.MIN_QUEST_XP_REWARD,(j.e.starsToLevel(k+1,F.V.Player)-j.e.starsToLevel(k,F.V.Player))*B))}onQuestEventDialogue(k){}}$.MIN_QUEST_XP_REWARD=20},79340:(k,B,U)=>{"use strict";U.d(B,{Z:()=>z});var F=U(8674),G=U(62459),j=U(35120),$=U(24190),H=U(88022),V=U(80060),W=U(99625),q=U(76642),K=U(83726);class z extends K.T{constructor(k,B,U,F,G=0,j=0){super(k,B,"",G,j,[],U,F),this.isScene=!0,this.hasStarted=!1,this.isScene=!0,this.loadingData={fadeIn:!0,time:1,fadeOut:!0,save:!1}}setup(k,B,U){this.zone.hideFollow(B),B.walkEnabled=!1,B.user.clickEnabled=!1,B.menuBar.active=!1,j.q.instance.prodigy.notifications.clearNotifications(),super.setup(k,B,U)}start(k,B,U){super.start(k,B,U),this.hasStarted=!0}playCutscene(){return(0,F.sH)(this,void 0,void 0,(function*(){var k;this.cutsceneHUDControllerPromise=V.d.loadWithInjectedValuesAndDependenciesFromGUID(j.q.instance.prodigy.gameContainer.get("d0e-64fd"),W.l.CutsceneHUDController,{}),this.cutsceneHUDController=yield this.cutsceneHUDControllerPromise;const B=null===(k=this.cutsceneHUDController)||void 0===k?void 0:k.findChildByName("Disable HUD / Notifs / Input / AreaEvents"),U=null==B?void 0:B.findComponent(q.S);null==U||U.run()}))}endCutscene(){var k,B;null===(k=this.cutsceneHUDControllerPromise)||void 0===k||k.cancel(),null===(B=this.cutsceneHUDController)||void 0===B||B.destroy()}end(k,B){}enterScene(k,B,U){var F;const j=k.state.getCurrentState();null===(F=j.hideParentalConsentBanner)||void 0===F||F.call(j);const V=k.width,W=k.height;this.sceneTop=B.menus.addChild(new $.C(k,0,-50,V,50,H._.Tiled_sprites_json,"overlay-small")),this.sceneBot=B.menus.addChild(new $.C(k,0,W,V,50,H._.Tiled_sprites_json,"overlay-small"));const q=k.add.tween(this.sceneTop,this).to({y:0},1e3,G.GS3.Quadratic.Out).start();G.Aq$.isDefined(U)&&q.onTweenComplete.add(U),k.add.tween(this.sceneBot,this).to({y:W-50},1e3,G.GS3.Quadratic.Out).start(),B.user.unmount()}cleanup(){this.sceneTop&&(this.sceneTop.destroy(),this.sceneTop=null),this.sceneBot&&(this.sceneBot.destroy(),this.sceneBot=null),super.cleanup()}}},1041:(k,B,U)=>{"use strict";U.d(B,{Z:()=>tt});var F=U(8674),G=U(62459),j=U(95891),$=U(88022),H=U(99625),V=U(35120),W=U(34829),q=U(77078),K=U(28402),z=U(85515),Y=U(92150);class Q extends Y._{constructor(k,B,U,F,G){super(k,B,U,F,`${G}`)}}var X=U(57750);class Z extends X.k{constructor(k,B,U,F,G=0,j=null,$,H,V,W){super(k,B,U,F,`${G}`,j,$,H,V,W)}}var J=U(19690);class tt extends G.s3P{constructor(){super(...arguments),this.animatedSprites=[],this.dynamicSprites=[],this.disabledLayers=[""],this.disabledLayerIDs=[],this.dynamicLayerContainers={},this.contentLayerContainers={},this.tempCollisionData=null,this.onLoad=null,this.assets=new Set,this.skipPrefabInitialization=!1}init(k,B,U,F,j,H){var W,q;this.cleanupMap(),this.game=k,this.onLoad=H,this.screen=F,this.above=U,this.below=B,this.dynamicSprites=[],this.dynamicLayerContainers={},G.Aq$.isDefined(j)&&(this.file=j.mapName),null!==(W=this.assets)&&void 0!==W||(this.assets=new Set),G.Mnj.addEntry(this.assets,$._.Tileset_core_json);for(let $=0;$0?(B.x+=U.width/2,B.y+=U.height):(B.scale.x=-1,B.y+=U.height/2):"objectgroup"===k.type&&(B.y+=U.height/2,B.scale.x=F.scale.x,B.scale.y=F.scale.y),B.add(U)}}this.contentLayerContainers[B].content.destroy()}else J&&this.initLayer(tt?this.above:this.below,k,K.tilesets,Y,tt?null:Q)}}return G.Aq$.isDefined(this.onLoad)&&this.onLoad(),G.Aq$.toggleDisplayObjSmooth(this.screen.background,!1),Q}getTiledObjectTypeProperty(k,B){var U;return(null===(U=k.tiledversion)||void 0===U?void 0:U.startsWith("1.9"))?B.class:B.type}enableLayerID(k,B){const U=this.disabledLayerIDs.indexOf(k);B?-1!==U&&this.disabledLayerIDs.splice(U,1):-1===U&&(this.disabledLayerIDs.push(k),this.disabledLayerIDs.sort(((k,B)=>k-B)))}initLayer(k,B,U,F,j){return G.Aq$.isDefined(B)?G.Aq$.isDefined(B.objects)?this.initObjectLayer(k,B,U,F,j):this.initTiledLayer(k,B,U,F,j):null}initObjectLayer(k,B,U,F,j){const $=G.Aq$.isDefined(B.properties)&&B.properties.useAnimDuration;for(let H=0;H0?(W.anchor.set(0,1),W.angle=V.rotation,W.x=V.x,W.y=parseInt(V.y)+40):(W.anchor.set(.5,.5),W.x=parseInt(V.x)+(W.width>>1),W.y=parseInt(V.y)-(W.height>>1)),this.addSpriteToLayer(W,k,B))}return k}initTiledLayer(k,B,U,F,j){const $=G.Aq$.isDefined(B.properties)&&B.properties.useAnimDuration;for(let H=0;H<32;H++)for(let V=0;V<18;V++){const W=32*V+H,q=this.getTile(B.data[W],40*H,40*V,F,j,U,null,$);if(G.Aq$.isDefined(q)){const U=B.opacity;G.Aq$.isDefined(U)&&(q.alpha=U),this.addSpriteToLayer(q,k,B)}}return k}initImage(k,B){const U=k.properties,F=B?`singleImage-${U.id}`:`atlas-${U.id}`,j=B?void 0:k.name;V.q.instance.prodigy.create.sprite(k.x+k.width/2,k.y-k.height/2,F,j,new G.I9Y(.5,.5),((k,B)=>{this.screen[U.layer].addChild(k)}))}initSpineObject(k){const B=new G._mx;B.name=k.name;const U=k.properties;if(B.addComponent(G.dLy),B.transform.setPosition(k.x+k.width/2,k.y-k.height/2),j.get(U,"flip",!1)){const k=B.transform.localScale;k.x*=-1,B.transform.setScale(k.x,k.y)}const F=new G._mx(B);F.addComponent(G.dLy);const $=F.addComponent(K.v);$.setAsset(`spine-${U.id}`,(()=>{const k=G.Aq$.isDefined(U.offsetX)?U.offsetX:0,B=G.Aq$.isDefined(U.offsetY)?U.offsetY:0;F.transform.setPosition(k,B),$.getSpine().setAnimationByName(0,U.animation,U.loop)}));const H=new G._mx(B);H.addComponent(G.dLy);const V=H.addComponent(q.p);V.InputEnabled=!1,V.Width=k.width,V.Height=k.height,this.addObjectToScreen(B,k.properties.layer)}loadPrefab(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=(0,J.Ks)();return G.Aq$.isDefined(k.properties.assetKey)?B.loadWithDependenciesFromGUID(H.l[k.properties.assetKey]):B.loadWithDependencies(k.properties.id)}))}initPrefab(k){this.loadPrefab(k).then((B=>{B.name=k.name,B.transform.setPosition(k.x,k.y),k.properties.layer===z.E.ContentLayer?this.legacyAddObjectToScreen(B,k.properties.layer):this.addObjectToScreen(B,k.properties.layer)})).catch((B=>{G.VyI.log(`Error loading prefab ${k.properties.id} from TMX Map: ${B}`,G.$bb.Error)}))}addObjectToScreen(k,B){this.screen?this.screen[`${B}GameObject`]?this.screen[`${B}GameObject`].addChild(k):G.VyI.log(`TiledMap no ${B} game object to parent object to`,G.$bb.Error):G.VyI.log("TiledMap no screen to parent object to",G.$bb.Error)}legacyAddObjectToScreen(k,B){if(this.screen)if(this.screen[B]){const U=k.findComponent(G.y4o).getRootContainer();this.screen[B].addChild(U),U.x=k.transform.worldPosition.x,U.y=k.transform.worldPosition.y;const F=this.game.time.events.loop(W.s.TARGET_FPS_40_MS,(()=>k.update()),this);k.onDestroy.addOnce((()=>this.game.time.events.remove(F)))}else G.VyI.log(`TiledMap no ${B} game object to parent object to`,G.$bb.Error);else G.VyI.log("TiledMap no screen to parent object to",G.$bb.Error)}getTile(k,B,U,F,j,$,H,V=!1){const W=G.Aq$.isDefined($)?$:this.game.cache.getJSON(this.file).tilesets;let q=k;const K=0!=(q&G.DXe.flippedHorizontally),z=0!=(q&G.DXe.flippedVertically),Y=0!=(q&G.DXe.flippedDiagonally);q&=~G.DXe.all;const X=this.getTileset(W,q);if(!G.Aq$.isDefined(X)||!G.Aq$.isDefined(q))return null;q-=X.firstgid;const J=this.getTileProperties(X,q,F);let tt,et,it;if(G.Aq$.isDefined(J)&&(tt=J.x),et=G.Aq$.isDefined(X.tiles)&&G.Aq$.isDefined(X.tiles[q])?new Z(this.game,B,U,X.name,q):new Q(this.game,B,U,X.name,q),(Y||z||K)&&(et.anchor.set(.5,.5),et.x+=20,et.y+=20),Y?(et.angle=-90,G.Aq$.isDefined(J)&&(it=J.x[1],it+=J.x[3],it+=J.x[0],it+=J.x[2],J.x=it),et.scale.x=-1,G.Aq$.isDefined(J)&&(it=J.x[1],it+=J.x[0],it+=J.x[3],it+=J.x[2],J.x=it),K&&(et.scale.y=-et.scale.y,G.Aq$.isDefined(J)&&(it=J.x[2],it+=J.x[3],it+=J.x[0],it+=J.x[1],J.x=it)),z&&(et.scale.x=-et.scale.x,G.Aq$.isDefined(J)&&(it=J.x[1],it+=J.x[0],it+=J.x[3],it+=J.x[2],J.x=it))):(K&&(et.scale.x=-et.scale.x,G.Aq$.isDefined(J)&&(it=J.x[1],it+=J.x[0],it+=J.x[3],it+=J.x[2],J.x=it)),z&&(et.scale.y=-et.scale.y,G.Aq$.isDefined(J)&&(it=J.x[2],it+=J.x[3],it+=J.x[0],it+=J.x[1],J.x=it))),G.Aq$.isDefined(j)&&G.Aq$.isDefined(J)&&G.Aq$.isDefined(J.x)){const k=J.x,F=Math.floor(B/40),$=Math.floor(U/40);1===parseInt(k[0],10)&&(j[2*$][2*F]=0,G.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*F,y:2*$,value:0}),et.visible=!1,et.collisionTile=!0)),1===parseInt(k[1],10)&&(j[2*$][2*F+1]=0,G.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*F+1,y:2*$,value:0}),et.visible=!1,et.collisionTile=!0)),1===parseInt(k[2],10)&&(j[2*$+1][2*F]=0,G.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*F,y:2*$+1,value:0}),et.visible=!1,et.collisionTile=!0)),1===parseInt(k[3],10)&&(j[2*$+1][2*F+1]=0,G.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*F+1,y:2*$+1,value:0}),et.visible=!1,et.collisionTile=!0)),6===parseInt(k[0],10)&&(j[2*$][2*F]=6,G.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*F,y:2*$,value:6}),et.visible=!1,et.collisionTile=!0)),6===parseInt(k[1],10)&&(j[2*$][2*F+1]=6,G.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*F+1,y:2*$,value:6}),et.visible=!1,et.collisionTile=!0)),6===parseInt(k[2],10)&&(j[2*$+1][2*F]=6,G.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*F,y:2*$+1,value:6}),et.visible=!1,et.collisionTile=!0)),6===parseInt(k[3],10)&&(j[2*$+1][2*F+1]=6,G.Aq$.isDefined(this.tempCollisionData)&&(this.tempCollisionData.push({x:2*F+1,y:2*$+1,value:6}),et.visible=!1,et.collisionTile=!0))}if(G.Aq$.isDefined(J)&&G.Aq$.isDefined(tt)&&(J.x=tt),G.Aq$.isDefined(j)&&H)for(let G=0;G<2;G++)for(let k=0;k<2;k++)j[U/40*2+G][B/40*2+k]=1;return this.processTileAnimations(et,X,q,V),et}addSpriteToLayer(k,B,U){var F,j,$,H;G.Aq$.isDefined(U.properties)&&G.Aq$.isDefined(U.properties.dynamicToggle)?(this.dynamicSprites.push(k),k.isAbove=null!==(j=null===(F=U.properties)||void 0===F?void 0:F.isAbove)&&void 0!==j&&j,k.dynamicToggle=U.properties.dynamicToggle):k.isAnimatedSprite?(this.animatedSprites.push(k),k.isAbove=null!==(H=null===($=U.properties)||void 0===$?void 0:$.isAbove)&&void 0!==H&&H):B.addChild(k)}processAnimations(k,B){for(let U=0;U=F.firstgid&&B{"use strict";U.d(B,{W:()=>F});const F="house-exterior"},87820:(k,B,U)=>{"use strict";U.d(B,{b:()=>vt});var F=U(62459),G=U(95891),j=U(99625),$=U(97495),H=U(40295),V=U(90633),W=U(81137),q=U(35120),K=U(49237),z=U(76974),Y=U(34829),Q=U(93867),X=U(75781),Z=U(84399),J=U(46725),tt=U(44677),et=U(80434),it=U(52191),st=U(73797),nt=U(23082),at=U(15485),rt=U(65050),ot=U(41674),ht=U(87337),ct=U(70703),dt=U(48842),lt=U(45385),ut=U(17425),ft=U(92864),bt=U(30226),pt=U(73678);class vt{get Guardian(){return this.guardian}get timeWhenZoneLoaded(){return this._timeWhenZoneLoaded}get allQuestsAreComplete(){return this.getCurrentQuestID()>0&&!this.quests[this.getCurrentQuestID()]}get isKeystonePlaced(){return 1===q.q.instance.prodigy.world.getZone(pt.A_.ACADEMY).getKeystoneState(this.ID)}get finalQuestId(){var k,B,U;return null===(U=null===(B=null===(k=Object.values(this.quests))||void 0===k?void 0:k.slice(-1))||void 0===B?void 0:B.pop())||void 0===U?void 0:U.ID}isTeleportingIntoNewPlayerFTUEZone(k,B){return!B.hasCompletedTutorial()&&this._newPlayerFTUEZones.includes(k)}constructor(k){this.states=[],this.maps={},this.quests={},this.scenes={},this.monsters={},this.bgmID=3,this.debugBounties=!1,this.battleBG="",this.difficultyMode=$.i.Regular,this.difficultyModeAgnostic=!1,this.mapEnteredFestivalContext=!1,this.questManagerIdentifier="a78-11c7",this._petsInZoneButtonObject=null,this._hidePetsInZoneButtonOnCreate=!1,this._newPlayerFTUEZones=["house-exterior","academy-GH1","academy-GH2"],this.game=k}getMap(k){return this.maps[k]}getScene(k){return this.scenes[k]}getDailyQuestDescription(k){return{}}teleport(k,B,U,G,j){var $,H,V,W;const K=this.getMap(k);if(!F.Aq$.isDefined(K))return;this._teleportData={mapKey:k,map:K,x:B,y:U,data:G,ld:j};const z=`${this.ID}-${this._teleportData.mapKey}`,Q=q.q.instance.prodigy.gameContainer,X=Q.get("c47-20b6"),tt=Q.get("e20-0fb0").player,[et,it]=q.q.instance.prodigy.world.getCurrentMap().split("-");tt.data.previousZone=tt.data.zone,j.callback||z!==`${pt.A_.ACADEMY}-GH2`&&z!==`${pt.A_.ACADEMY}-${Y.s.TOWER_COMMON_ROOM_SHORTFORM}1`&&!z.includes(`tower-${Y.s.TOWER_COMMON_ROOM_SHORTFORM}`)||X.featureCommon.sendScreenTransitionEvent({screenID:z,previousScreenID:tt.data.previousZone,transitionType:this.ID!==et?"spawned":"walk",duration:F.Aq$.isDefined(j.timeWhenPreviousZoneLoaded)?((new Date).getTime()-j.timeWhenPreviousZoneLoaded)/Y.s.SECONDS_TO_MILLISECONDS_MULTIPLIER:null}),tt.setZone(this.ID,z),tt.forceSaveCharacter(),q.q.instance.prodigy.world.setCurrentMap(z),this.game.state.states.get(nt.G.TileScreen).initMap(this._teleportData.map,this,this._teleportData.x,this._teleportData.y),this.createLoadingData();const st=J.D.getAvailablePrefabMap(z)||Z.R.isFeatureEnabled()&&(null===(H=null===($=Z.R.getVariables())||void 0===$?void 0:$.maps)||void 0===H?void 0:H[z]);if(st&&!this.isTeleportingIntoNewPlayerFTUEZone(z,tt)){const G={BGM_ID:null!==(V=q.q.instance.prodigy.skin.getSkinOverrideBgm(z))&&void 0!==V?V:this.bgmID,ZONE_MAP_TAG:z,Zone:this,ZoneId:this.ID,MapTag:k,"a78-11c7":Q.get(this.questManagerIdentifier)};F.Aq$.isDefined(B)&&F.Aq$.isDefined(U)&&(G.ACTIVE_PLAYER_POSITION={x:B,y:U}),this.loadingData.targetInitArgs=[{prefabIDs:[st],injectedValues:G}],q.q.instance.prodigy.start(nt.G.PrefabScene,this.loadingData,this._teleportData.data),this.updatePrefabMapFaintData(K.zoneName,B,U)}else q.q.instance.prodigy.start(nt.G.TileScreen,this.loadingData,this._teleportData.data);F.Aq$.isDefined(it)&&it!==k&&(X.gameWorld.sendMapEnteredEvent(it,et,null!==(W=null==j?void 0:j.mapEnteredTransitionType)&&void 0!==W?W:vt._screenTransactionType,null,this.mapEnteredFestivalContext),vt._screenTransactionType=ht.iQ.Walk)}updatePrefabMapFaintData(k,B,U){const G=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player;k&&G&&(G.onFaintData={mapKey:k,coordinates:F.Aq$.isDefined(B)&&F.Aq$.isDefined(U)?{x:B,y:U}:null})}isTutorialZone(){return this.ID===pt.A_.ACADEMY||this.ID===pt.A_.HOUSE}createLoadingData(){var k,B;this.loadingData=this._teleportData.ld||{},this.loadingData.assets=this.loadingData.assets||[],this.loadingData.assets=this.loadingData.assets.concat(["map-pathing"]).concat(Array.from(this._teleportData.map.assets)),this.loadingData.assets=this.loadingData.assets.concat(q.q.instance.prodigy.skin.getAssets(this._teleportData.map.zoneName));const U=this.getCurrentQuest();F.Aq$.isDefined(U)&&(this.loadingData.assets=this.loadingData.assets.concat(U.assets)),this.loadingData.assets=[...new Set(this.loadingData.assets)],this.cacheZoneAssets(this.loadingData.assets),this.loadingData.title=F.Aq$.isDefined(this.loadingData.title)?this.loadingData.title:null===(B=(k=this._teleportData.map).getName)||void 0===B?void 0:B.call(k),this.loadingData.x=this._teleportData.x,this.loadingData.y=this._teleportData.y}teleportLoad(){const k=this.game.state.getCurrentState(),B=this.game.state.get(nt.G.Loading);k.fadeOut?k.fadeOut(!0,(()=>{B.startLoading(this.loadingData)})):B.startLoading(this.loadingData)}teleportPrefabScene(k,B,U,G){var $,H,V;const W=q.q.instance.prodigy,K=W.gameContainer.get("e20-0fb0").player,z=`${this.ID}-${k}`,[Y,Q]=W.world.getCurrentMap().split("-");W.world.setCurrentMap(z),K.setZone(this.ID,z);const X=q.q.instance.game.state.states.get(nt.G.Loading);X&&(X.data.target=nt.G.PrefabScene);const Z=[this.maps[k]];if(tt.p.isQuestComplete||Z.push(j.l.FtuePlayerGoalsHudIcon),W.startPrefabScene(Z,{layers:[],spawnPosition:F.Aq$.isDefined(B)&&F.Aq$.isDefined(U)?new F.I9Y(B,U):null,spawnFacingDirection:null!==($=null==G?void 0:G.playerDirection)&&void 0!==$?$:1,playFSM:null!==(H=null==G?void 0:G.runFSMOnLoad)&&void 0!==H?H:null,spawnLocationName:null!==(V=null==G?void 0:G.spawnLocationName)&&void 0!==V?V:null}),F.Aq$.isDefined(Q)&&Q!==k){const k=ht.iQ.Walk;q.q.instance.prodigy.gameContainer.get("c47-20b6").gameWorld.sendMapEnteredEvent(Q,Y,this.ID===Y?k:ht.iQ.FastTravel)}}playScene(k){const B=this.getScene(k);F.Aq$.isDefined(B)?this.initScene(B):F.VyI.log(`Scene: ${k} was not found in Zone: ${this.ID}`,F.$bb.Warning)}initScene(k,B={}){var U;this.game.state.get(nt.G.TileScreen).initScene(k,this);let F=k.loadingData;F.assets=[],F.assets=F.assets.concat(["map-pathing"]).concat(Array.from(k.assets)),F.title=k.name,F=G.merge(F,B),this.cacheZoneAssets(F.assets),null===(U=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer)||void 0===U||U.unmount(),q.q.instance.prodigy.start(nt.G.TileScreen,F)}init(k,B,U){}handleLeaving(k,B){var U,F;null===(U=this._playerGoalsButtonLoadPromise)||void 0===U||U.cancel(),null===(F=this._playerGoalsButton)||void 0===F||F.destroy(),vt._screenTransactionType=ht.iQ.FastTravel,B()}setup(k,B,U){const G=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player;this.isTutorialZone()||G.hasCompletedTutorial()||new it.G("",0).markTutorialComplete(),this.game.broadcaster.broadcast(st.sd.GetFriendList,st.HG.FriendsList),U.questParams={};const j=this.getValidatedCurrentQuest();return F.Aq$.isDefined(j)&&!U.isScene?j.setup(k,B,U):null}start(k,B,U){const G=this.getCurrentQuest();F.Aq$.isDefined(G)&&G.start(k,B,U),this._timeWhenZoneLoaded=(new Date).getTime()}update(k,B,U){const G=this.getCurrentQuest();F.Aq$.isDefined(G)&&G.update(k,B,U)}cleanup(){var k,B,U;null===(k=this._playerGoalsButtonLoadPromise)||void 0===k||k.cancel(),q.q.instance.prodigy.load.removeAssets(),this.game.time.events.removeAll(),null===(B=this._petsInZoneButtonObject)||void 0===B||B.destroy(),this._petsInZoneButtonObject=null,null===(U=this._playerGoalsButton)||void 0===U||U.destroy(),this._playerGoalsButton=null,this.loadingData=null}process(k,B,U){F.Aq$.isDefined(this.monsters)&&(F.Aq$.isDefined(this.getState("daily"))?bt.J.getDate()!==this.getState("daily").date&&this.setState("daily",{date:bt.J.getDate(),flags:[1,1,1,1,1],rewards:this.getState("daily").rewards}):this.setState("daily",{date:bt.J.getDate(),flags:[1,1,1,1,1],rewards:0}));const G=this.getCurrentQuest();F.Aq$.isDefined(G)&&G.process(k,B,U)}meetsQuestPrerequisite(){return!0}getQuest(k){return q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.isZoneQuestEnabled?this.quests[k]:void 0}getCurrentQuest(){const k=this.getQuestState();return F.Aq$.isDefined(k)?this.getQuest(k.ID):null}getValidatedCurrentQuest(){const k=this.getCurrentQuest(),B=this.getQuestState();return this.validateQuestProgress(B,k),k}getState(k){let B=-1;const U=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return B="string"!=typeof k||!k.startsWith("quest")&&!k.startsWith("uniqueEncounters")?this.states.findIndex((B=>B===k)):k,-1===B?null:U.state.get(`zone-${this.ID}-${B}`)}setState(k,B){let U=-1;if("string"==typeof k&&k.startsWith("quest"))U=k;else for(let F=0;F!F.Aq$.isDefined(B.state[k])||1!==B.state[k])).length>0&&k.push(`${this.ID}-${G}`)}return k}return U.area}}startQuest(k,B=!1){let U=this.getQuestState();if(F.Aq$.isDefined(U)&&!B||(U={ID:B?k:1}),U.ID!==k)return null;const G=this.getQuest(U.ID);if(!G)return null;U.req=bt.J.copyObject(G.req),U.state=bt.J.copyObject(G.state)||{},U.seq=0;return q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.set(`zone-${this.ID}-quest`,U),G}isQuestStarted(k){const B=this.getQuestState();return!(!F.Aq$.isDefined(B)||!F.Aq$.isDefined(B.req)||B.ID!==k)}isQuestComplete(k){if(!this.isQuestStarted(k))return!1;const B=this.getQuestState(),U=this.getQuest(k),F=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player;return this.getQuestState().ID===k&&(!("pet"===B.req.type&&B.req.N>0)&&(!("clear"===B.req.type&&B.req.N>0)&&(!(bt.J.inArray(["item","weapon","hat","outfit","boots","key"],B.req.type)&&F.backpack.hasItem(B.req.type,B.req.ID)"key"===k.type&&k.ID===vt.ZONE_KEYSTONES[this.ID]))),K=null!==(U=null==V?void 0:V.questStep)&&void 0!==U?U:null==V?void 0:V.descKey;if(!W&&bt.J.isCoreZone(this.ID)?$.state.set(`zone-${this.ID}-quest`,{ID:G.ID+1,monsterState:G.monsterState}):$.state.set(`zone-${this.ID}-quest`,{ID:G.ID+1}),K&&""!==K&&j.get("c47-20b6").playerProgression.sendQuestProgressionAdvancedEvent({quest_id:`${k}`,quest_type:"zone_mission",quest_step:W?"Quest Complete":1===k?"Quest Start":K,zone_complete:W}),W){const k=q.q.instance.game.broadcaster;k.addAppListener(st.n8.GotItemClosed,(()=>{k.removeAppListener(st.n8.GotItemClosed,this),Q.U.progressData.step===H.B.NotStarted&&$.hasFoundAllKeystones()&&X.E.runCollectedLastKeystoneSequence()}),this)}return!0}isQuestProcessed(k){return this.isQuestStarted(k)&&this.isQuestComplete(k)&&this.getQuestState().proc}processQuest(k){if(this.isQuestStarted(k)&&this.isQuestComplete(k)){q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.set(`zone-${this.ID}-quest-proc`,1)}}isOnQuest(k){const B=this.getQuestState();return F.Aq$.isDefined(B)&&B.ID===k}getCurrentQuestID(){const k=this.getQuestState();return F.Aq$.isDefined(null==k?void 0:k.ID)?k.ID:0}validateQuestProgress(k,B){var U;const F=(null==B?void 0:B.req)&&!(null==k?void 0:k.req)&&!this.allQuestsAreComplete,G=(null==B?void 0:B.req)&&(null==k?void 0:k.req)&&(k.req.ID!==B.req.ID||k.req.type!==B.req.type);(F||G)&&B.zone.startQuest(B.ID),(null==B?void 0:B.req)&&(null==k?void 0:k.req)&&"pet"===B.req.type&&Object.keys(null!==(U=null==k?void 0:k.state)&&void 0!==U?U:{}).length>=B.req.N&&k.req.N>0&&(k.state={},q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.set(`zone-${B.zone.ID}-quest`,k))}defeatMonster(k,B,U,G,j=!1){const $=this.getQuestState(),H=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player;U&&(j?$.state[B]=1:H.state.set(`zone-${this.ID}-uniqueEncounters-${q.q.instance.prodigy.world.getCurrentMapTag()}-${B}`,1),H.state.updated=!0),F.Aq$.isDefined($)&&F.Aq$.isDefined($.req)&&("pet"===$.req.type&&$.req.ID===k&&j||"clear"===$.req.type&&j?($.req.N--,H.state.updated=!0):bt.J.isCoreZone(this.ID)&&!U&&H.state.set(`zone-${this.ID}-quest-monsterState-${q.q.instance.prodigy.world.getCurrentMapTag()}-${B}`,1))}isUniqueEncounterDefeated(k){return 1===q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.get(`zone-${this.ID}-uniqueEncounters-${q.q.instance.prodigy.world.getCurrentMapTag()}-${k+1}`)}isNamedUniqueEncounterDefeated(k,B=q.q.instance.prodigy.world.getCurrentMapTag()){return q.q.instance.prodigy.gameContainer.get("306-5359").state.get(`zone-${this.ID}-uniqueEncounters-${B}-${k}`)}isOnSequence(k,B){const U=this.getQuestState();return!(!F.Aq$.isDefined(U)||U.ID!==k||!F.Aq$.isDefined(U.req)||U.seq!==B)}isSequenceComplete(k,B){const U=this.getQuestState();return F.Aq$.isDefined(U)&&U.ID===k&&U.seq>B}completeSequence(k,B){const U=this.getQuestState();if(F.Aq$.isDefined(U)&&U.ID===k&&F.Aq$.isDefined(U.req)&&U.seq===B){U.seq++;q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.updated=!0}}getDailyMaps(){const k=[];for(const B in this.maps)k.push(B);return k}hasDaily(k){if(F.Aq$.isDefined(this.getState("daily"))){const B=new ft.t(this.getState("daily").date),U=this.getDailyMaps();if(F.Aq$.isDefined(U))for(let F=0;F<5;F++)if(U[Math.floor(B.jumpFromStart(F)*(U.length-1))]===k.tag&&0!==this.getState("daily").flags[F])return!0}return!1}testQuest(k,B,U){q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.state.data.zone[this.ID]={};for(let F=1;F{const B=this.game.state.getCurrentState();B.uiLayerGameObject?B.uiLayerGameObject.addChild(k):k.setLayer("ui"),this.setUpPetsInZoneButton(k)})).catch(F.RQr.createHandler("Unable to load the Pets In Zones Button")))}setUpPetsInZoneButton(k){this._petsInZoneButtonObject=k;const B=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player,U=this.ID,G=k.findComponentInChildren(K.$),$=k.findComponentInChildren(lt.e),H=B.newPetRescueData.getNumberOfNewRescues(U);if($.updateNumberedNotificationBadge(H>0,H),!q.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_PETS_IN_ZONES,V.B.BREADCRUMB_PETS_IN_ZONES_BUTTON_FTUE)){q.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(V.B.FEATURE_PETS_IN_ZONES,V.B.BREADCRUMB_PETS_IN_ZONES_BUTTON_FTUE);k.findComponentsInChildren(ct.x).forEach((k=>{k.GameObject.active=!0,k.startTween()}))}const W=q.q.instance.prodigy.gameContainer.get("fa6-b1fc");G.onEnabledClick.add((()=>{Promise.all([W.getPetsInZone(U),W.getMinMaxEnemyLevelsForZone(U)]).then((([k,F])=>{this.sendPetsInZonesButtonEvent(U),this.sendPetsInZonesInterfaceEvent(U);const H=q.q.instance.prodigy.open.prefabMenu(j.l.Pets_ZoneUI,(()=>G.unlockState()),void 0,void 0,void 0,{PET_ZONE_ID:this.zoneIndex,PET_ZONE_MENU_STATE:dt.SB.InZone,GRID_VIEW_DATA:k.map((k=>k.ID)),PET_ZONE_ENEMY_MIN_MAX_LEVEL:F});H.onPrefabLoaded.add((()=>{B.newPetRescueData.clearNewestRescuesByAmount(dt.J8.PET_CARDS_PER_PAGE,U),B.forceSaveCharacter()})),H.onDestroy.add((()=>{this.sendPetsInZonesInterfaceEvent.bind(this,U,!0),B.newPetRescueData.clearNewRescues(),B.forceSaveCharacter(),$.updateNumberedNotificationBadge(!1,0)}))})).catch(F.RQr.createHandler("Could not fetch pets for current zone")),G.lockState(z.K.Disabled)})),this._hidePetsInZoneButtonOnCreate&&(this._petsInZoneButtonObject.active=!1,this._hidePetsInZoneButtonOnCreate=!1)}togglePetsInZoneButtonVisibility(k){this._petsInZoneButtonObject?this._petsInZoneButtonObject.active=k:this._hidePetsInZoneButtonOnCreate=!k}destroyPetsInZoneButton(){var k;null===(k=this._petsInZoneButtonObject)||void 0===k||k.destroy(),this._petsInZoneButtonObject=null}showTopLeftNavigationButton(){W.x.isFeatureEnabled()||this.spawnPetsInZoneButton()}createTopLeftNavigationButton(){}sendPetsInZonesButtonEvent(k){const B=`pet_menu_${k}`;q.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendButtonEvent({buttonName:B,interfaceName:B,interfaceType:ot.Wm.Modal,saveClickInfo:B})}sendPetsInZonesInterfaceEvent(k,B){const U=`zone_pet_menu_${k}`,F=ot.Wm.Modal,G=ot.Lv.ButtonClick,j=`pet_menu_${k}`;q.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:U,interfaceType:F,instanceType:rt.N.Interface,originType:ot.$N.ButtonClick,originID:B?at.k.X:j,closeMethod:B?G:void 0})}getOnFaintData(){const k=q.q.instance.prodigy.gameContainer.get("e20-0fb0").player.onFaintData;return null!=k?k:{mapKey:this.defaultOnFaint}}}vt.ZONE_KEYSTONES={[pt.A_.FOREST]:3,[pt.A_.SHIVERCHILL]:4,[pt.A_.BONFIRE]:11,[pt.A_.SHIPWRECK]:17,[pt.A_.SKYWATCH]:10,[pt.A_.FORESTHARD]:3,[pt.A_.SHIVERCHILLHARD]:4,[pt.A_.BONFIREHARD]:11,[pt.A_.SHIPWRECKHARD]:17,[pt.A_.SKYWATCHHARD]:10,[pt.A_.FORESTEXPERT]:3,[pt.A_.SHIVERCHILLEXPERT]:4,[pt.A_.BONFIREEXPERT]:11,[pt.A_.SHIPWRECKEXPERT]:17,[pt.A_.SKYWATCHEXPERT]:10},vt.ZONE_TOWERS={[pt.A_.FOREST]:1,[pt.A_.SHIVERCHILL]:3,[pt.A_.BONFIRE]:5,[pt.A_.SHIPWRECK]:6,[pt.A_.SKYWATCH]:4},vt._screenTransactionType=ht.iQ.Walk},38454:(k,B,U)=>{"use strict";U.d(B,{V:()=>V});var F=U(8674),G=U(62459),j=U(28152),$=U(26932),H=U(26004);let V=class extends $.z{constructor(){super(...arguments),this._counter=0,this.onComplete=new G.HN0}postCreate(){super.postCreate(),this.bindContext()}advance(){this._counterk.consume()))}unbindContext(){this._context.Container.unbind("ZONE_ENTRY_ILLUSTRATION_DIALOGUE_IDS"),this._context.Container.unbind("ZONE_ENTRY_ILLUSTRATION_CURRENT_DIALOGUE_INDEX"),this._context.Container.unbind("ZONE_ENTRY_ILLUSTRATION_CURRENT_DIALOGUE_ID"),this.gameObject.findComponentsInChildren(H.B).forEach((k=>k.consume()))}destroy(){this.onComplete.dispose(),super.destroy()}};(0,F.Cg)([(0,G.g11)(),(0,F.Sn)("design:type",Number)],V.prototype,"_illustrationCount",void 0),(0,F.Cg)([(0,G.SZi)(),(0,G.g11)(),(0,F.Sn)("design:type",Array)],V.prototype,"_dialogueIds",void 0),(0,F.Cg)([(0,G.bbQ)(),(0,F.Sn)("design:type",G.HN0)],V.prototype,"onComplete",void 0),V=(0,F.Cg)([(0,G.EVk)("ZoneEntryIllustrationDataProvider",j.Y.map)],V)},15804:(k,B,U)=>{"use strict";U.d(B,{h:()=>Y});var F=U(8674),G=U(62459),j=U(99625),$=U(35120),H=U(96494),V=U(90633),W=U(13956),q=U(13021),K=U(80060),z=U(73678);class Y extends G.s3P{static shouldShowEntryIllustration(k){var B;const U=k.split("-")[0],F=$.q.instance.prodigy.world.getZone(U);return Y.ZONE_WHITELIST.includes(U)&&(null==F?void 0:F.meetsQuestPrerequisite())&&(null==F?void 0:F.getCurrentQuestID())<=1&&!q.w.isTitanMap(k)&&!this._breadcrumbManager.isBreadcrumbComplete(V.B.FEATURE_ZONE_ENTRY_ILLUSTRATION,null!==(B=Y.getZoneBreadcrumbName(U))&&void 0!==B?B:"")}static openZoneEntryIllustrationPrefabForZone(k){let B;switch(k){case z.A_.FOREST:case z.A_.FORESTHARD:case z.A_.FORESTEXPERT:B=j.l.ZoneEntryIllustrationFirefly;break;case z.A_.SHIVERCHILL:case z.A_.SHIVERCHILLHARD:case z.A_.SHIVERCHILLEXPERT:B=j.l.ZoneEntryIllustrationShiverchill;break;case z.A_.SHIPWRECK:case z.A_.SHIPWRECKHARD:case z.A_.SHIPWRECKEXPERT:B=j.l.ZoneEntryIllustrationShipwreck;break;case z.A_.BONFIRE:case z.A_.BONFIREHARD:case z.A_.BONFIREEXPERT:B=j.l.ZoneEntryIllustrationBonfire;break;case z.A_.SKYWATCH:case z.A_.SKYWATCHHARD:case z.A_.SKYWATCHEXPERT:B=j.l.ZoneEntryIllustrationSkywatch;break;default:return G.RQr.createHandler(`No zone entry prefab for zone id ${k}`),new G.kBN(((B,U)=>U(`No zone entry prefab for zone id ${k}`)))}return K.d.loadWithInjectedValuesAndDependenciesFromGUID($.q.instance.prodigy.gameContainer.get("d0e-64fd"),B,{ZONE_ID:this.getZoneBreadcrumbName(k)})}static getZoneBreadcrumbName(k){switch(k){case z.A_.LAMPLIGHT:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_LAMPLIGHT;case z.A_.FOREST:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FOREST;case z.A_.SHIVERCHILL:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILL;case z.A_.SKYWATCH:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCH;case z.A_.BONFIRE:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIRE;case z.A_.SHIPWRECK:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECK;case z.A_.FORESTHARD:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FORESTHARD;case z.A_.SHIVERCHILLHARD:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILLHARD;case z.A_.SKYWATCHHARD:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCHHARD;case z.A_.BONFIREHARD:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIREHARD;case z.A_.SHIPWRECKHARD:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECKHARD;case z.A_.FORESTEXPERT:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_FORESTEXPERT;case z.A_.SHIVERCHILLEXPERT:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIVERCHILLEXPERT;case z.A_.SKYWATCHEXPERT:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SKYWATCHEXPERT;case z.A_.BONFIREEXPERT:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_BONFIREEXPERT;case z.A_.SHIPWRECKEXPERT:return V.B.BREADCRUMB_ZONE_ENTRY_ILLUSTRATION_SHIPWRECKEXPERT;default:return null}}}Y.ZONE_WHITELIST=[z.A_.FOREST,z.A_.SHIVERCHILL,z.A_.BONFIRE,z.A_.SHIPWRECK,z.A_.SKYWATCH,z.A_.FORESTHARD,z.A_.SHIVERCHILLHARD,z.A_.BONFIREHARD,z.A_.SHIPWRECKHARD,z.A_.SKYWATCHHARD,z.A_.FORESTEXPERT,z.A_.SHIVERCHILLEXPERT,z.A_.BONFIREEXPERT,z.A_.SHIPWRECKEXPERT,z.A_.SKYWATCHEXPERT],(0,F.Cg)([(0,W.b)("12f-4e29"),(0,F.Sn)("design:type",H.F)],Y,"_breadcrumbManager",void 0)},93054:(k,B,U)=>{"use strict";U.d(B,{P:()=>Y});var F,G,j=U(62459),$=U(95891);!function(k){k.Equal="=",k.NotEqual="!="}(F||(F={})),function(k){k.GreaterThanOrEqualTo=">=",k.LessThanOrEqualTo="<=",k.GreaterThan=">",k.LessThan="<"}(G||(G={}));var H,V=U(35120),W=U(30065),q=U(73678);!function(k){k.ZoneState="zoneState",k.Festival="festival"}(H||(H={}));const K={[q.A_.FOREST]:{A3:[{zone:q.A_.FOREST,tag:"A4"}],A4:[{zone:q.A_.FOREST,tag:"A3"},{zone:q.A_.FOREST,tag:"A5"},{zone:q.A_.FOREST,tag:"B5"}],A5:[{zone:q.A_.FOREST,tag:"A4"}],B5:[{zone:q.A_.FOREST,tag:"A4"},{zone:q.A_.FOREST,tag:"C4"},{zone:q.A_.FOREST,tag:"B6"}],B6:[{zone:q.A_.FOREST,tag:"B5"},{zone:q.A_.FOREST,tag:"B7"}],B7:[{zone:q.A_.FOREST,tag:"B6"},{zone:q.A_.FOREST,tag:"C7"}],B8:[{zone:q.A_.FOREST,tag:"C8"}],C4:[{zone:q.A_.FOREST,tag:"B5"},{zone:q.A_.FOREST,tag:"D3"}],C7:[{zone:q.A_.FOREST,tag:"B7"},{zone:q.A_.FOREST,tag:"C8"}],C8:[{zone:q.A_.FOREST,tag:"C7"},{zone:q.A_.FOREST,tag:"B8"},{zone:q.A_.LAMPLIGHT,tag:"B1"}],D3:[{zone:q.A_.FOREST,tag:"C4"}]},[q.A_.SHIVERCHILL]:{A2:[{zone:q.A_.SHIVERCHILL,tag:"A3"}],A3:[{zone:q.A_.SHIVERCHILL,tag:"A2",prereq:{type:H.ZoneState,dataKey:"furnace",target:3,operator:G.GreaterThanOrEqualTo}},{zone:q.A_.SHIVERCHILL,tag:"A4"},{zone:q.A_.SHIVERCHILL,tag:"B3"}],A4:[{zone:q.A_.SHIVERCHILL,tag:"A3"},{zone:q.A_.SHIVERCHILL,tag:"A5"}],A5:[{zone:q.A_.SHIVERCHILL,tag:"A4"},{zone:q.A_.SHIVERCHILL,tag:"A6"}],A6:[{zone:q.A_.SHIVERCHILL,tag:"A5"},{zone:q.A_.SHIVERCHILL,tag:"A9",prereq:{type:H.ZoneState,dataKey:"furnace",target:2,operator:G.GreaterThanOrEqualTo}},{zone:q.A_.SHIVERCHILL,tag:"B6"}],A7:[{zone:q.A_.SHIVERCHILL,tag:"B7"},{zone:q.A_.SHIVERCHILL,tag:"B8"}],A9:[{zone:q.A_.SHIVERCHILL,tag:"A6",prereq:{type:H.ZoneState,dataKey:"furnace",target:2,operator:G.GreaterThanOrEqualTo}},{zone:q.A_.SHIVERCHILL,tag:"A10"},{zone:q.A_.SHIVERCHILL,tag:"B8",prereq:{type:H.ZoneState,dataKey:"furnace",target:1,operator:G.GreaterThanOrEqualTo}}],A10:[{zone:q.A_.SHIVERCHILL,tag:"A9"},{zone:q.A_.SHIVERCHILL,tag:"A11"},{zone:q.A_.SHIVERCHILL,tag:"B10"}],A11:[{zone:q.A_.SHIVERCHILL,tag:"A10"}],B1:[{zone:q.A_.SHIVERCHILL,tag:"B3"}],B2:[{zone:q.A_.SHIVERCHILL,tag:"B3"}],B3:[{zone:q.A_.SHIVERCHILL,tag:"A3"},{zone:q.A_.SHIVERCHILL,tag:"B1"},{zone:q.A_.SHIVERCHILL,tag:"B2",prereq:{type:H.ZoneState,dataKey:"furnace",target:3,operator:G.GreaterThanOrEqualTo}}],B6:[{zone:q.A_.SHIVERCHILL,tag:"A6"},{zone:q.A_.SHIVERCHILL,tag:"B7"}],B7:[{zone:q.A_.SHIVERCHILL,tag:"A7"},{zone:q.A_.SHIVERCHILL,tag:"B6"}],B8:[{zone:q.A_.SHIVERCHILL,tag:"A7"},{zone:q.A_.SHIVERCHILL,tag:"A9"}],B9:[{zone:q.A_.SHIVERCHILL,tag:"B10"}],B10:[{zone:q.A_.SHIVERCHILL,tag:"A10"},{zone:q.A_.SHIVERCHILL,tag:"B9"}]},[q.A_.SKYWATCH]:{A0:[{zone:q.A_.SKYWATCH,tag:"A1"},{zone:q.A_.SHIVERCHILL,tag:"B1"}],A1:[{zone:q.A_.SKYWATCH,tag:"A0"},{zone:q.A_.SKYWATCH,tag:"B1"},{zone:q.A_.SKYWATCH,tag:"C1"},{zone:q.A_.SKYWATCH,tag:"D1"}],B1:[{zone:q.A_.SKYWATCH,tag:"A1"},{zone:q.A_.SKYWATCH,tag:"B2"},{zone:q.A_.SKYWATCH,tag:"B3"}],B2:[{zone:q.A_.SKYWATCH,tag:"B1"}],B3:[{zone:q.A_.SKYWATCH,tag:"B1"}],C1:[{zone:q.A_.SKYWATCH,tag:"A1"},{zone:q.A_.SKYWATCH,tag:"C2"},{zone:q.A_.SKYWATCH,tag:"C3"}],C2:[{zone:q.A_.SKYWATCH,tag:"C1"}],C3:[{zone:q.A_.SKYWATCH,tag:"C1"},{zone:q.A_.SKYWATCH,tag:"C4"}],C4:[{zone:q.A_.SKYWATCH,tag:"C3"}],D1:[{zone:q.A_.SKYWATCH,tag:"A1"},{zone:q.A_.SKYWATCH,tag:"D2"},{zone:q.A_.SKYWATCH,tag:"E1"}],D2:[{zone:q.A_.SKYWATCH,tag:"D1"},{zone:q.A_.SKYWATCH,tag:"D3"}],D3:[{zone:q.A_.SKYWATCH,tag:"D2"}],E1:[{zone:q.A_.SKYWATCH,tag:"D1"},{zone:q.A_.SKYWATCH,tag:"E2"},{zone:q.A_.SKYWATCH,tag:"E3"}],E2:[{zone:q.A_.SKYWATCH,tag:"E1"}],E3:[{zone:q.A_.SKYWATCH,tag:"E1"},{zone:q.A_.SKYWATCH,tag:"E4"}],E4:[{zone:q.A_.SKYWATCH,tag:"E3"},{zone:q.A_.SKYWATCH,tag:"E5"}],E5:[{zone:q.A_.SKYWATCH,tag:"E4"}]},[q.A_.BONFIRE]:{A1:[{zone:q.A_.BONFIRE,tag:"B1"}],A4:[{zone:q.A_.BONFIRE,tag:"B4"}],B1:[{zone:q.A_.BONFIRE,tag:"C1"},{zone:q.A_.BONFIRE,tag:"B2"},{zone:q.A_.BONFIRE,tag:"A1"}],B2:[{zone:q.A_.BONFIRE,tag:"B1"},{zone:q.A_.BONFIRE,tag:"C3"},{zone:q.A_.BONFIRE,tag:"B4"}],B4:[{zone:q.A_.BONFIRE,tag:"A4"},{zone:q.A_.BONFIRE,tag:"B2"},{zone:q.A_.BONFIRE,tag:"C4"},{zone:q.A_.BONFIRE,tag:"B5"}],B5:[{zone:q.A_.BONFIRE,tag:"B4"},{zone:q.A_.BONFIRE,tag:"C6"}],C1:[{zone:q.A_.BONFIRE,tag:"D1"},{zone:q.A_.BONFIRE,tag:"D2"},{zone:q.A_.BONFIRE,tag:"B1"}],C2:[{zone:q.A_.BONFIRE,tag:"C3"}],C3:[{zone:q.A_.BONFIRE,tag:"C2"},{zone:q.A_.BONFIRE,tag:"D3"},{zone:q.A_.BONFIRE,tag:"B2"}],C4:[{zone:q.A_.BONFIRE,tag:"D4"},{zone:q.A_.BONFIRE,tag:"B4"}],C6:[{zone:q.A_.BONFIRE,tag:"D5"},{zone:q.A_.BONFIRE,tag:"D6"},{zone:q.A_.BONFIRE,tag:"B5"}],D1:[{zone:q.A_.BONFIRE,tag:"C1"}],D2:[{zone:q.A_.BONFIRE,tag:"C1"}],D3:[{zone:q.A_.BONFIRE,tag:"C3"}],D4:[{zone:q.A_.BONFIRE,tag:"C4"}],D5:[{zone:q.A_.BONFIRE,tag:"E6"},{zone:q.A_.BONFIRE,tag:"C6"}],D6:[{zone:q.A_.BONFIRE,tag:"C6"}],E5:[{zone:q.A_.BONFIRE,tag:"E6"}],E6:[{zone:q.A_.BONFIRE,tag:"E5"},{zone:q.A_.BONFIRE,tag:"D5"}]},[q.A_.SHIPWRECK]:{A1:[{zone:q.A_.SHIPWRECK,tag:"A2"},{zone:q.A_.SHIPWRECK,tag:"B2"}],A2:[{zone:q.A_.SHIPWRECK,tag:"A1"},{zone:q.A_.SHIPWRECK,tag:"A3"}],A3:[{zone:q.A_.SHIPWRECK,tag:"A2"}],A4:[{zone:q.A_.SHIPWRECK,tag:"A5"},{zone:q.A_.SHIPWRECK,tag:"B4"}],A5:[{zone:q.A_.SHIPWRECK,tag:"A4"}],A7:[{zone:q.A_.SHIPWRECK,tag:"B6"},{zone:q.A_.SHIPWRECK,tag:"B7"}],B2:[{zone:q.A_.SHIPWRECK,tag:"A1"},{zone:q.A_.SHIPWRECK,tag:"B4"}],B4:[{zone:q.A_.SHIPWRECK,tag:"A4"},{zone:q.A_.SHIPWRECK,tag:"B2"},{zone:q.A_.SHIPWRECK,tag:"B5"}],B5:[{zone:q.A_.SHIPWRECK,tag:"B4"},{zone:q.A_.SHIPWRECK,tag:"B6"}],B6:[{zone:q.A_.SHIPWRECK,tag:"A7"},{zone:q.A_.SHIPWRECK,tag:"B5"},{zone:q.A_.SHIPWRECK,tag:"C6"}],B7:[{zone:q.A_.SHIPWRECK,tag:"A7"},{zone:q.A_.SHIPWRECK,tag:"C7"},{zone:q.A_.SHIPWRECK,tag:"C9",prereq:{type:H.ZoneState,dataKey:"inkC9",target:1,operator:G.GreaterThanOrEqualTo}}],B8:[{zone:q.A_.SHIPWRECK,tag:"C8"}],B10:[{zone:q.A_.SHIPWRECK,tag:"B11"}],B11:[{zone:q.A_.SHIPWRECK,tag:"B10"},{zone:q.A_.SHIPWRECK,tag:"C11"}],B12:[{zone:q.A_.SHIPWRECK,tag:"B13"},{zone:q.A_.SHIPWRECK,tag:"C12"}],B13:[{zone:q.A_.SHIPWRECK,tag:"B12"}],C6:[{zone:q.A_.SHIPWRECK,tag:"B6"}],C7:[{zone:q.A_.SHIPWRECK,tag:"B7"},{zone:q.A_.SHIPWRECK,tag:"C8"}],C8:[{zone:q.A_.SHIPWRECK,tag:"B8"},{zone:q.A_.SHIPWRECK,tag:"C7"},{zone:q.A_.SHIPWRECK,tag:"C9"}],C9:[{zone:q.A_.SHIPWRECK,tag:"B7",prereq:{type:H.ZoneState,dataKey:"inkB7",target:1,operator:G.GreaterThanOrEqualTo}},{zone:q.A_.SHIPWRECK,tag:"C8"},{zone:q.A_.SHIPWRECK,tag:"C10"}],C10:[{zone:q.A_.SHIPWRECK,tag:"C9"},{zone:q.A_.SHIPWRECK,tag:"C11"}],C11:[{zone:q.A_.SHIPWRECK,tag:"B11"},{zone:q.A_.SHIPWRECK,tag:"C10"},{zone:q.A_.SHIPWRECK,tag:"C12"}],C12:[{zone:q.A_.SHIPWRECK,tag:"B12"},{zone:q.A_.SHIPWRECK,tag:"C11"}]},[q.A_.LAMPLIGHT]:{A1:[{zone:q.A_.LAMPLIGHT,tag:"B2"}],A2:[{zone:q.A_.LAMPLIGHT,tag:"B2"},{zone:q.A_.LAMPLIGHT,tag:"A3"}],A3:[{zone:q.A_.LAMPLIGHT,tag:"A2"},{zone:q.A_.LAMPLIGHT,tag:"B3"},{zone:q.A_.LAMPLIGHT,tag:"A4"}],A4:[{zone:q.A_.LAMPLIGHT,tag:"A3"},{zone:q.A_.LAMPLIGHT,tag:"B4"},{zone:q.A_.LAMPLIGHT,tag:"B2"},{zone:q.A_.LAMPLIGHT,tag:"house-exit"}],B0:[{zone:q.A_.LAMPLIGHT,tag:"B1"}],B1:[{zone:q.A_.FOREST,tag:"C8"},{zone:q.A_.LAMPLIGHT,tag:"B2"}],B2:[{zone:q.A_.LAMPLIGHT,tag:"B1"},{zone:q.A_.LAMPLIGHT,tag:"C2"},{zone:q.A_.LAMPLIGHT,tag:"A2"}],B3:[{zone:q.A_.LAMPLIGHT,tag:"A3"},{zone:q.A_.LAMPLIGHT,tag:"C3"},{zone:q.A_.MOON,tag:"A1",prereq:{type:H.Festival,activeFestival:W.Q.MoonlightFestival}}],B4:[{zone:q.A_.LAMPLIGHT,tag:"A4"},{zone:q.A_.LAMPLIGHT,tag:"C4"},{zone:q.A_.LAMPLIGHT,tag:"B5"}],B5:[{zone:q.A_.LAMPLIGHT,tag:"B4"}],C2:[{zone:q.A_.LAMPLIGHT,tag:"B2"},{zone:q.A_.LAMPLIGHT,tag:"C3"}],C3:[{zone:q.A_.LAMPLIGHT,tag:"B3"},{zone:q.A_.LAMPLIGHT,tag:"C2"},{zone:q.A_.LAMPLIGHT,tag:"C4"},{zone:q.A_.LAMPLIGHT,tag:"D3"}],C4:[{zone:q.A_.LAMPLIGHT,tag:"B4"},{zone:q.A_.LAMPLIGHT,tag:"C3"}],D3:[{zone:q.A_.LAMPLIGHT,tag:"C3"}]},[q.A_.FORESTHARD]:{A3:[{zone:q.A_.FORESTHARD,tag:"A4"}],A4:[{zone:q.A_.FORESTHARD,tag:"A3"},{zone:q.A_.FORESTHARD,tag:"A5"},{zone:q.A_.FORESTHARD,tag:"B5"}],A5:[{zone:q.A_.FORESTHARD,tag:"A4"}],B5:[{zone:q.A_.FORESTHARD,tag:"A4"},{zone:q.A_.FORESTHARD,tag:"C4"},{zone:q.A_.FORESTHARD,tag:"B6"}],B6:[{zone:q.A_.FORESTHARD,tag:"B5"},{zone:q.A_.FORESTHARD,tag:"B7"}],B7:[{zone:q.A_.FORESTHARD,tag:"B6"},{zone:q.A_.FORESTHARD,tag:"C7"}],B8:[{zone:q.A_.FORESTHARD,tag:"C8"}],C4:[{zone:q.A_.FORESTHARD,tag:"B5"},{zone:q.A_.FORESTHARD,tag:"D3"}],C7:[{zone:q.A_.FORESTHARD,tag:"B7"},{zone:q.A_.FORESTHARD,tag:"C8"}],C8:[{zone:q.A_.FORESTHARD,tag:"C7"},{zone:q.A_.FORESTHARD,tag:"B8"},{zone:q.A_.LAMPLIGHT,tag:"B1"}],D3:[{zone:q.A_.FORESTHARD,tag:"C4"}]},[q.A_.SHIVERCHILLHARD]:{A2:[{zone:q.A_.SHIVERCHILLHARD,tag:"A3"}],A3:[{zone:q.A_.SHIVERCHILLHARD,tag:"A2",prereq:{type:H.ZoneState,dataKey:"furnace",target:3,operator:G.GreaterThanOrEqualTo}},{zone:q.A_.SHIVERCHILLHARD,tag:"A4"},{zone:q.A_.SHIVERCHILLHARD,tag:"B3"}],A4:[{zone:q.A_.SHIVERCHILLHARD,tag:"A3"},{zone:q.A_.SHIVERCHILLHARD,tag:"A5"}],A5:[{zone:q.A_.SHIVERCHILLHARD,tag:"A4"},{zone:q.A_.SHIVERCHILLHARD,tag:"A6"}],A6:[{zone:q.A_.SHIVERCHILLHARD,tag:"A5"},{zone:q.A_.SHIVERCHILLHARD,tag:"A9",prereq:{type:H.ZoneState,dataKey:"furnace",target:2,operator:G.GreaterThanOrEqualTo}},{zone:q.A_.SHIVERCHILLHARD,tag:"B6"}],A7:[{zone:q.A_.SHIVERCHILLHARD,tag:"B7"},{zone:q.A_.SHIVERCHILLHARD,tag:"B8"}],A9:[{zone:q.A_.SHIVERCHILLHARD,tag:"A6",prereq:{type:H.ZoneState,dataKey:"furnace",target:2,operator:G.GreaterThanOrEqualTo}},{zone:q.A_.SHIVERCHILLHARD,tag:"A10"},{zone:q.A_.SHIVERCHILLHARD,tag:"B8",prereq:{type:H.ZoneState,dataKey:"furnace",target:1,operator:G.GreaterThanOrEqualTo}}],A10:[{zone:q.A_.SHIVERCHILLHARD,tag:"A9"},{zone:q.A_.SHIVERCHILLHARD,tag:"A11"},{zone:q.A_.SHIVERCHILLHARD,tag:"B10"}],A11:[{zone:q.A_.SHIVERCHILLHARD,tag:"A10"}],B1:[{zone:q.A_.SHIVERCHILLHARD,tag:"B3"}],B2:[{zone:q.A_.SHIVERCHILLHARD,tag:"B3"}],B3:[{zone:q.A_.SHIVERCHILLHARD,tag:"A3"},{zone:q.A_.SHIVERCHILLHARD,tag:"B1"},{zone:q.A_.SHIVERCHILLHARD,tag:"B2",prereq:{type:H.ZoneState,dataKey:"furnace",target:3,operator:G.GreaterThanOrEqualTo}}],B6:[{zone:q.A_.SHIVERCHILLHARD,tag:"A6"},{zone:q.A_.SHIVERCHILLHARD,tag:"B7"}],B7:[{zone:q.A_.SHIVERCHILLHARD,tag:"A7"},{zone:q.A_.SHIVERCHILLHARD,tag:"B6"}],B8:[{zone:q.A_.SHIVERCHILLHARD,tag:"A7"},{zone:q.A_.SHIVERCHILLHARD,tag:"A9"}],B9:[{zone:q.A_.SHIVERCHILLHARD,tag:"B10"}],B10:[{zone:q.A_.SHIVERCHILLHARD,tag:"A10"},{zone:q.A_.SHIVERCHILLHARD,tag:"B9"}]},[q.A_.SKYWATCHHARD]:{A0:[{zone:q.A_.SKYWATCHHARD,tag:"A1"},{zone:q.A_.SHIVERCHILLHARD,tag:"B1"}],A1:[{zone:q.A_.SKYWATCHHARD,tag:"A0"},{zone:q.A_.SKYWATCHHARD,tag:"B1"},{zone:q.A_.SKYWATCHHARD,tag:"C1"},{zone:q.A_.SKYWATCHHARD,tag:"D1"}],B1:[{zone:q.A_.SKYWATCHHARD,tag:"A1"},{zone:q.A_.SKYWATCHHARD,tag:"B2"},{zone:q.A_.SKYWATCHHARD,tag:"B3"}],B2:[{zone:q.A_.SKYWATCHHARD,tag:"B1"}],B3:[{zone:q.A_.SKYWATCHHARD,tag:"B1"}],C1:[{zone:q.A_.SKYWATCHHARD,tag:"A1"},{zone:q.A_.SKYWATCHHARD,tag:"C2"},{zone:q.A_.SKYWATCHHARD,tag:"C3"}],C2:[{zone:q.A_.SKYWATCHHARD,tag:"C1"}],C3:[{zone:q.A_.SKYWATCHHARD,tag:"C1"},{zone:q.A_.SKYWATCHHARD,tag:"C4"}],C4:[{zone:q.A_.SKYWATCHHARD,tag:"C3"}],D1:[{zone:q.A_.SKYWATCHHARD,tag:"A1"},{zone:q.A_.SKYWATCHHARD,tag:"D2"},{zone:q.A_.SKYWATCHHARD,tag:"E1"}],D2:[{zone:q.A_.SKYWATCHHARD,tag:"D1"},{zone:q.A_.SKYWATCHHARD,tag:"D3"}],D3:[{zone:q.A_.SKYWATCHHARD,tag:"D2"}],E1:[{zone:q.A_.SKYWATCHHARD,tag:"D1"},{zone:q.A_.SKYWATCHHARD,tag:"E2"},{zone:q.A_.SKYWATCHHARD,tag:"E3"}],E2:[{zone:q.A_.SKYWATCHHARD,tag:"E1"}],E3:[{zone:q.A_.SKYWATCHHARD,tag:"E1"},{zone:q.A_.SKYWATCHHARD,tag:"E4"}],E4:[{zone:q.A_.SKYWATCHHARD,tag:"E3"},{zone:q.A_.SKYWATCHHARD,tag:"E5"}],E5:[{zone:q.A_.SKYWATCHHARD,tag:"E4"}]},[q.A_.BONFIREHARD]:{A1:[{zone:q.A_.BONFIREHARD,tag:"B1"}],A4:[{zone:q.A_.BONFIREHARD,tag:"B4"}],B1:[{zone:q.A_.BONFIREHARD,tag:"C1"},{zone:q.A_.BONFIREHARD,tag:"B2"},{zone:q.A_.BONFIREHARD,tag:"A1"}],B2:[{zone:q.A_.BONFIREHARD,tag:"B1"},{zone:q.A_.BONFIREHARD,tag:"C3"},{zone:q.A_.BONFIREHARD,tag:"B4"}],B4:[{zone:q.A_.BONFIREHARD,tag:"A4"},{zone:q.A_.BONFIREHARD,tag:"B2"},{zone:q.A_.BONFIREHARD,tag:"C4"},{zone:q.A_.BONFIREHARD,tag:"B5"}],B5:[{zone:q.A_.BONFIREHARD,tag:"B4"},{zone:q.A_.BONFIREHARD,tag:"C6"}],C1:[{zone:q.A_.BONFIREHARD,tag:"D1"},{zone:q.A_.BONFIREHARD,tag:"D2"},{zone:q.A_.BONFIREHARD,tag:"B1"}],C2:[{zone:q.A_.BONFIREHARD,tag:"C3"}],C3:[{zone:q.A_.BONFIREHARD,tag:"C2"},{zone:q.A_.BONFIREHARD,tag:"D3"},{zone:q.A_.BONFIREHARD,tag:"B2"}],C4:[{zone:q.A_.BONFIREHARD,tag:"D4"},{zone:q.A_.BONFIREHARD,tag:"B4"}],C6:[{zone:q.A_.BONFIREHARD,tag:"D5"},{zone:q.A_.BONFIREHARD,tag:"D6"},{zone:q.A_.BONFIREHARD,tag:"B5"}],D1:[{zone:q.A_.BONFIREHARD,tag:"C1"}],D2:[{zone:q.A_.BONFIREHARD,tag:"C1"}],D3:[{zone:q.A_.BONFIREHARD,tag:"C3"}],D4:[{zone:q.A_.BONFIREHARD,tag:"C4"}],D5:[{zone:q.A_.BONFIREHARD,tag:"E6"},{zone:q.A_.BONFIREHARD,tag:"C6"}],D6:[{zone:q.A_.BONFIREHARD,tag:"C6"}],E5:[{zone:q.A_.BONFIREHARD,tag:"E6"}],E6:[{zone:q.A_.BONFIREHARD,tag:"E5"},{zone:q.A_.BONFIREHARD,tag:"D5"}]},[q.A_.SHIPWRECKHARD]:{A1:[{zone:q.A_.SHIPWRECKHARD,tag:"A2"},{zone:q.A_.SHIPWRECKHARD,tag:"B2"}],A2:[{zone:q.A_.SHIPWRECKHARD,tag:"A1"},{zone:q.A_.SHIPWRECKHARD,tag:"A3"}],A3:[{zone:q.A_.SHIPWRECKHARD,tag:"A2"}],A4:[{zone:q.A_.SHIPWRECKHARD,tag:"A5"},{zone:q.A_.SHIPWRECKHARD,tag:"B4"}],A5:[{zone:q.A_.SHIPWRECKHARD,tag:"A4"}],A7:[{zone:q.A_.SHIPWRECKHARD,tag:"B6"},{zone:q.A_.SHIPWRECKHARD,tag:"B7"}],B2:[{zone:q.A_.SHIPWRECKHARD,tag:"A1"},{zone:q.A_.SHIPWRECKHARD,tag:"B4"}],B4:[{zone:q.A_.SHIPWRECKHARD,tag:"A4"},{zone:q.A_.SHIPWRECKHARD,tag:"B2"},{zone:q.A_.SHIPWRECKHARD,tag:"B5"}],B5:[{zone:q.A_.SHIPWRECKHARD,tag:"B4"},{zone:q.A_.SHIPWRECKHARD,tag:"B6"}],B6:[{zone:q.A_.SHIPWRECKHARD,tag:"A7"},{zone:q.A_.SHIPWRECKHARD,tag:"B5"},{zone:q.A_.SHIPWRECKHARD,tag:"C6"}],B7:[{zone:q.A_.SHIPWRECKHARD,tag:"A7"},{zone:q.A_.SHIPWRECKHARD,tag:"C7"},{zone:q.A_.SHIPWRECKHARD,tag:"C9",prereq:{type:H.ZoneState,dataKey:"inkC9",target:1,operator:G.GreaterThanOrEqualTo}}],B8:[{zone:q.A_.SHIPWRECKHARD,tag:"C8"}],B10:[{zone:q.A_.SHIPWRECKHARD,tag:"B11"}],B11:[{zone:q.A_.SHIPWRECKHARD,tag:"B10"},{zone:q.A_.SHIPWRECKHARD,tag:"C11"}],B12:[{zone:q.A_.SHIPWRECKHARD,tag:"B13"},{zone:q.A_.SHIPWRECKHARD,tag:"C12"}],B13:[{zone:q.A_.SHIPWRECKHARD,tag:"B12"}],C6:[{zone:q.A_.SHIPWRECKHARD,tag:"B6"}],C7:[{zone:q.A_.SHIPWRECKHARD,tag:"B7"},{zone:q.A_.SHIPWRECKHARD,tag:"C8"}],C8:[{zone:q.A_.SHIPWRECKHARD,tag:"B8"},{zone:q.A_.SHIPWRECKHARD,tag:"C7"},{zone:q.A_.SHIPWRECKHARD,tag:"C9"}],C9:[{zone:q.A_.SHIPWRECKHARD,tag:"B7",prereq:{type:H.ZoneState,dataKey:"inkB7",target:1,operator:G.GreaterThanOrEqualTo}},{zone:q.A_.SHIPWRECKHARD,tag:"C8"},{zone:q.A_.SHIPWRECKHARD,tag:"C10"}],C10:[{zone:q.A_.SHIPWRECKHARD,tag:"C9"},{zone:q.A_.SHIPWRECKHARD,tag:"C11"}],C11:[{zone:q.A_.SHIPWRECKHARD,tag:"B11"},{zone:q.A_.SHIPWRECKHARD,tag:"C10"},{zone:q.A_.SHIPWRECKHARD,tag:"C12"}],C12:[{zone:q.A_.SHIPWRECKHARD,tag:"B12"},{zone:q.A_.SHIPWRECKHARD,tag:"C11"}]},[q.A_.MOON]:{A1:[{zone:q.A_.MOON,tag:"B1"}],B1:[{zone:q.A_.MOON,tag:"A1"},{zone:q.A_.MOON,tag:"C1"}],C1:[{zone:q.A_.MOON,tag:"B1"},{zone:q.A_.MOON,tag:"D1"}],D1:[{zone:q.A_.MOON,tag:"C1"}]},[q.A_.SPRINGFESTGROTTO_BUNNY]:{A3:[{zone:q.A_.SPRINGFESTGROTTO_BUNNY,tag:"B7"}],A9:[{zone:q.A_.SPRINGFESTGROTTO_BUNNY,tag:"B2"},{zone:q.A_.SPRINGFESTGROTTO_BUNNY,tag:"B7"}],B2:[{zone:q.A_.SPRINGFESTGROTTO_BUNNY,tag:"A9"}],B7:[{zone:q.A_.SPRINGFESTGROTTO_BUNNY,tag:"A3"},{zone:q.A_.SPRINGFESTGROTTO_BUNNY,tag:"A9"}]},[q.A_.SPRINGFESTGROTTO_FOX]:{A3:[{zone:q.A_.SPRINGFESTGROTTO_FOX,tag:"B7"}],A9:[{zone:q.A_.SPRINGFESTGROTTO_FOX,tag:"B2"},{zone:q.A_.SPRINGFESTGROTTO_FOX,tag:"B7"}],B2:[{zone:q.A_.SPRINGFESTGROTTO_FOX,tag:"A9"}],B7:[{zone:q.A_.SPRINGFESTGROTTO_FOX,tag:"A3"},{zone:q.A_.SPRINGFESTGROTTO_FOX,tag:"A9"}]}};var z=U(39144);class Y{static findShortestPaths(k,B){return this.findShortestPathsInternal(k,B)}static findShortestPathsInternal(k,B,U=[]){const F=[...U,k];if(k===B)return[F];const G=k.split("-");if(G.length<2)return void j.VyI.log(`Invalid map format: ${k}`,j.$bb.Error);const $=G[0],H=G[1],V=K[$];if(!(null==V?void 0:V[H]))return;const W=V[H];let q,z=1/0;for(const j of W){if(!this.isConnectionAvailable(j))continue;const k=`${j.zone}-${j.tag}`;if(F.includes(k))continue;const U=this.findShortestPathsInternal(k,B,F);if(U&&U.length>0){const k=U[0].length;kthis.findShortestPaths(k,B))).filter((k=>k));if(0===U.length)return;const F=Math.min(...U.map((k=>k[0].length)));return $.flatten(U.filter((k=>k[0].length===F)))}static findShortestPathsToAllOf(k,B){const U=B.map((B=>this.findShortestPaths(k,B))).filter((k=>k));return 0===U.length?[]:$.flatten(U)}static isHouse(k){return j.Aq$.isDefined(k)&&k.indexOf(q.A_.HOUSE)>-1&&-1===k.indexOf("exit")}static isConnectionAvailable(k){var B;if(!k.prereq)return!0;let U,$,W,q;switch(k.prereq.type){case H.ZoneState:return U=V.q.instance.prodigy.world.getCurrentZoneObject(),$=U.getState(k.prereq.dataKey),"object"==typeof $&&null!==$?(j.VyI.log("Unable to compare zone state objects in a map connection prerequisite comparison",j.$bb.Error),!1):(W=k.prereq.target,class{static compare(k,B,U){if(U in G&&(!this.isNumeric(k)||!this.isNumeric(B)))return console.log(`Unable to compare non-numeric values: ${k} and ${B} with operator ${U}`),!1;switch(U){case F.Equal:return k===B;case F.NotEqual:return k!==B;case G.GreaterThan:return k>B;case G.GreaterThanOrEqualTo:return k>=B;case G.LessThan:return kU.finalQuestId}static getTargetMapsFromLocations(k,B){const U=null!=B?B:V.q.instance.prodigy.world.getCurrentZoneObject(),F=[];for(const G of k)if("string"!=typeof G){if(G.uniqueEncounters){if(Object.entries(G.uniqueEncounters).every((([k,B])=>B.every((B=>U.isNamedUniqueEncounterDefeated(B,k))))))continue}if(G.requiredStates){if(!Object.entries(G.requiredStates).every((([k,B])=>{var F;return(null!==(F=U.getState(k))&&void 0!==F?F:void 0)===B})))continue}if(G.disallowedStates){if(Object.entries(G.disallowedStates).every((([k,B])=>{var F;return(null!==(F=U.getState(k))&&void 0!==F?F:void 0)===B})))continue}F.push(G.location)}else F.push(G);return F}static manageTeleportTriggerGuideHands(k,B){let U;const F=null!=B?B:this.findSceneTeleportTriggers();return F.length?(F.forEach((B=>{const F=B.GameObject.findComponentInChildren(z.P,!0);F&&(B.targetMapTag===k?(F.spawnGuideHand().catch(j.RQr.createHandler("Failed to spawn guide hand")),U=F):F.despawnGuideHand())})),U):U}static despawnTeleportTriggerGuideHands(k){(null!=k?k:this.findSceneTeleportTriggers()).forEach((k=>{const B=k.GameObject.findComponentInChildren(z.P,!0);B&&B.despawnGuideHand()}))}static findSceneTeleportTriggers(){let k=[];return j.wa5.getActiveScene().container.sourceContainer.isBound("TELEPORT_TRIGGER")&&(k=j.wa5.getActiveScene().container.sourceContainer.getAll("TELEPORT_TRIGGER")),$.uniq(k)}}},85126:(k,B,U)=>{"use strict";U.d(B,{N:()=>Xt,s:()=>Kt});var F=U(62459),G=U(51742),j=U(84317),$=U(90633),H=U(73678),V=U(25531),W=U(35120),q=U(34829),K=U(77938),z=U(11624),Y=U(35569),Q=U(87820),X=U(56942),Z=U(93867),J=U(77078),tt=U(10213);class et extends tt.z{constructor(k,B){super(k,"CR1","MAP_ACADEMY_SECOND_FLOOR",640,520,["academy-CR1"],B.concat([X.Q.Spine_academy_landingdoors_json,X.Q.Spine_pmlocks_basic_json])),this.localizer=null}setup(k,B,U){super.setup(k,B,U),this.localizer=W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService);const G=this.game.width,j=this.game.height;this.addAreaEvent(k,B,{x:162,y:j,w:500,h:80,rect:!0},"academy-CR2",162,100),this.addAreaEvent(k,B,{x:G-162,y:j,w:500,h:80,rect:!0},"academy-CR2",1114,100);const $=Xt.getAllTowerData(),V=W.q.instance.prodigy.gameContainer.get("306-5359");for(let F=0;F<$.length;F++){const k=$[F],U=k.keystone.zone;if(U===H.A_.ACADEMY)continue;const G=this.screen.contentGameObject.findChildByName(`${U}_tower_lock`),j=this.screen.aboveGameObject.findChildByName(`${U}_warden`);V.data.previousZone.includes(k.towerID)&&(V.playerContainer.x=.5*(G.transform.worldPosition.x+j.transform.worldPosition.x),V.playerContainer.y=.5*(G.transform.worldPosition.y+j.transform.worldPosition.y)),j&&(j.active=!1),this.addCollisionZone(B,G.transform.localPosition.x-40,G.transform.localPosition.y,80,80);const q=G.findComponentInChildren(J.p);q.InputEnabled=!0,q.onClicked.add((()=>{const k=this.localizer.getText("BUTTON_OKAY_UPPERCASE"),B=this.localizer.getText("ACADEMY_TOWER_NOT_RELEASED");W.q.instance.prodigy.open.messageBoxOkay(B,k,null)}))}}start(k,B,U){Z.U.isEndgameQuestActive()&&(this.addGuideHand(k,B,150,660,0,20,180),this.addGuideHand(k,B,1130,660,0,20,180)),super.start(k,B,U)}}class it extends tt.z{constructor(k,B){super(k,"CR2","MAP_ACADEMY_SECOND_FLOOR",640,530,["academy-CR2"],B.concat([]))}setup(k,B,U){super.setup(k,B,U),this.localizer=W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService),this.addAreaEvent(k,B,{x:162,y:40,w:500,h:80,rect:!0},"academy-CR1",200,660),this.addAreaEvent(k,B,{x:1114,y:40,w:500,h:80,rect:!0},"academy-CR1",1090,660),this.addAreaEvent(k,B,{x:640,y:655,w:this.game.width,h:130,rect:!0},"academy-GH1",640,100);const G=B.contentGameObject.findChildByName("astral_tower_lock");if(F.Aq$.isDefined(G)){const k=G.findComponentInChildren(J.p);k.InputEnabled=!0,k.onClicked.add((()=>{const k=this.localizer.getText("BUTTON_OKAY_UPPERCASE"),B=this.localizer.getText("ACADEMY_TOWER_NOT_RELEASED");W.q.instance.prodigy.open.messageBoxOkay(B,k,null)}))}}start(k,B,U){Z.U.isEndgameQuestActive()&&this.addGuideHand(k,B,640,570,0,20,180),super.start(k,B,U)}}class st extends tt.z{constructor(k,B){const U=[X.Q.Spine_academystairlight_json,X.Q.Spine_academylanternglow_json,X.Q.Spine_academy_window_glow_horizontal_json,X.Q.Spine_academy_window_light_horizontal_json,X.Q.Spine_stair_lock_json,G.c.Sfx_academy_rumble];super(k,"GH1","MAP_ACADEMY_GREATHALL",640,500,["academy-GH2"],B.concat(U))}init(k,B,U,F){return this.enableLayerID(1,!1),super.init(k,B,U,F)}setup(k,B,U){super.setup(k,B,U);k.rootContainer.get("e20-0fb0").player.hasCompletedTutorial()&&(this.addAreaEvent(k,B,{x:640,y:655,w:1110,h:150,rect:!0},"academy-GH2",640,100),this.addAreaEvent(k,B,{x:640,y:40,w:1110,h:80,rect:!0},"academy-CR2",640,560)),st.addEffects(k,B)}start(k,B,U){Z.U.isEndgameQuestActive()&&this.addGuideHand(k,B,640,570,0,20,180),super.start(k,B,U)}static addEffects(k,B){const U=265,F=420,G=1015,j=420,$=k.add.spine(419,212,X.Q.Spine_academystairlight_json);$.setToSetupPose(),$.setAnimationByName(0,"animation",!0);const H=k.add.spine(861,212,X.Q.Spine_academystairlight_json);H.setToSetupPose(),H.setAnimationByName(0,"animation",!0),B.foreground.addChild($),B.foreground.addChild(H);const V=k.add.spine(U,F,X.Q.Spine_academy_window_glow_horizontal_json);V.setToSetupPose(),V.setAnimationByName(0,"animation",!0),V.scale.x=-1;const W=k.add.spine(G,j,X.Q.Spine_academy_window_glow_horizontal_json);W.setToSetupPose(),W.setAnimationByName(0,"animation",!0),B.foreground.addChild(V),B.foreground.addChild(W);const q=k.add.spine(U,F,X.Q.Spine_academy_window_light_horizontal_json);q.setToSetupPose(),q.setAnimationByName(0,"animation",!0),q.scale.x=-1;const K=k.add.spine(G,j,X.Q.Spine_academy_window_light_horizontal_json);K.setToSetupPose(),K.setAnimationByName(0,"animation",!0),B.background.addChild(q),B.background.addChild(K)}}var nt=U(4324),at=U(88022),rt=U(75214),ot=U(87337),ht=U(3862);class ct extends tt.z{constructor(k,B){super(k,"GH3","MAP_ACADEMY_GREATHALL",640,500,["academy-GH2"],B.concat([X.Q.Spine_academylanternglow_json,X.Q.Spine_trap_door_glow_json,X.Q.Spine_npc_gale_json,X.Q.Spine_npc_floatlingmerchant_json]))}setup(k,B,U){super.setup(k,B,U),this.addAreaEvent(k,B,{x:640,y:40,w:1110,h:80,rect:!0},"academy-GH2",640,570),this.addAreaEvent(k,B,{x:640,y:600,w:500,h:180,canReTrigger:!0},null,null,null,(()=>{W.q.instance.prodigy.open.map({disableClose:!1})})),this._archiveEntranceAreaEvent=this.addAreaEvent(k,B,{x:900,y:465,w:150,h:120,rect:!0,canReTrigger:!0},null,null,null,(()=>{W.q.instance.prodigy.open.archiveEntranceMenu(H.A_.ARCHIVES,(()=>{this.moveOffArchiveEntrance()}))}));const G=W.q.instance.prodigy.create.sprite(900,465,at._.General_core_json,"empty",{x:.5,y:.5},null,150,120);G.events.onInputUp.add((()=>{this.screen.path.findPath(this.screen.user.x,this.screen.user.y,G.x-40,G.y+20,!0).then((k=>{k&&this.screen.user.setPath(k)})).catch(F.RQr.createHandler("Unable to find path to trapdoor"))})),G.alpha=0,G.inputEnabled=!0,this.screen.content.addChild(G);new rt.p(k,"NPC_NAME_GALE",83,ot.ac.CareGiver,B.content,915,180,"idle").onClick.add((()=>{const k=W.q.instance.prodigy.event.create();k.text(14,"gale"),k.start()}),this);new rt.p(k,"NPC_NAME_ACADEMY_MERCHANT",84,ot.ac.Merchant,B.content,345,180,"idle").onClick.add((()=>W.q.instance.prodigy.open.store(35)));const j=k.add.spine(949,450,X.Q.Spine_trap_door_glow_json);j.setAnimationByName(0,"animation",!0),j.scale.x=-1,B.content.addChild(j)}start(k,B,U){if(Z.U.isEndgameQuestActive())this.addGuideHand(k,B,640,30,0,20);else if(F.Aq$.isDefined(ht.B.getLastDungeonRun(this.game,H.A_.ARCHIVES))&&0!==ht.B.getLastDungeonRun(this.game,H.A_.ARCHIVES).lastRunTimeStamp)W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_UNPLACED_KEYSTONES)||W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_NO_KEYSTONES)||this.addGuideHand(k,B,640,30,0,20);else{W.q.instance.prodigy.create.element(B.foreground,880,410).highlight(!0)}super.start(k,B,U)}moveOffArchiveEntrance(){if(!this._archiveEntranceAreaEvent)return;const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player.playerContainer;k.setValidPath(this.screen.path,this._archiveEntranceAreaEvent.x-k.width,k.y)}}var dt=U(18155),lt=U(79340),ut=U(85855);class ft extends lt.Z{constructor(k,B){super(k,"B0",B.concat([j.t.Tileset_generic_new_png,j.t.Tileset_town_new_png,j.t.Tileset_firefly_new_png,ut.V.Bgm_puppetmaster,X.Q.Spine_shadowportal_json,ut.V.Bgm_lamplight,G.c.Sfx_academy_portal_open,G.c.Sfx_academy_portal_close]),"map-lamplight-B0"),this.noot=null,this.pippet=null,this.portal=null}setup(k,B,U){super.setup(k,B,U),B.user.position.x=120,B.user.position.y=880,this.portal=k.add.spine(870,425,X.Q.Spine_shadowportal_json),this.portal.setToSetupPose(),B.content.addChild(this.portal)}start(k,B){super.start(k,B),this.noot=B.addNPC(150,850,at._.Npc_sprite_noot_json),this.noot.float(!0),this.noot.walkSpeed=2,this.pippet=new dt.N(k,"NPC_NAME_PIPPET",B.content,120,880,"idle",B.user);const U=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),G=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);U.execute(G.getStateMachine(67),{game:k,screen:B,scene:this,player:B.user,noot:this.noot,pippet:this.pippet,path:B.path,pathfinder:B.path,portal:this.portal},null)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),this.pippet&&(this.pippet.destroy(),this.pippet=null),this.portal&&(this.portal.destroy(),this.portal=null),super.cleanup()}resizeContainer(k,B){W.q.instance.prodigy.effects.resizeContainer(k,B)}removePippet(){this.pippet.destroy()}playNextScene(){W.q.instance.prodigy.world.playScene("academy-introPt2")}}class bt extends lt.Z{constructor(k,B){super(k,"GH3",B.concat([at._.Npc_sprite_noot_json,at._.Zone_lamplight_json,ut.V.Bgm_puppetmaster,X.Q.Spine_shadowportal_json,X.Q.Spine_trap_door_glow_json,X.Q.Spine_npc_gale_json,X.Q.Spine_npc_floatlingmerchant_json,G.c.Sfx_academy_portal_open,G.c.Sfx_academy_portal_close,ut.V.Bgm_fun]),"map-academy-GH3"),this.noot=null,this.gale=null,this.academyMerchan=null,this.portal=null,this.trapDoor=null}setup(k,B,U){super.setup(k,B,U),B.user.scale.set(0,0),B.user.position.x=370,B.user.position.y=350,this.gale=new rt.p(k,"NPC_NAME_GALE",83,ot.ac.CareGiver,B.content,915,235,"animation"),this.gale.walkSpeed=2,this.academyMerchan=new rt.p(k,"NPC_NAME_ACADEMY_MERCHANT",84,ot.ac.Merchant,B.content,350,180,"animation"),this.portal=k.add.spine(370,300,X.Q.Spine_shadowportal_json),this.portal.setToSetupPose(),B.content.addChild(this.portal),this.trapDoor=k.add.spine(949,450,X.Q.Spine_trap_door_glow_json),this.trapDoor.setAnimationByName(0,"animation",!0),this.trapDoor.scale.x=-1,B.content.addChild(this.trapDoor)}start(k,B){super.start(k,B),this.noot=B.addNPC(370,350,at._.Npc_sprite_noot_json),this.noot.scale.set(0,0),this.noot.float(!0),this.noot.walkSpeed=2;const U=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),G=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);U.execute(G.getStateMachine(76),{game:k,screen:B,scene:this,player:B.user,noot:this.noot,gale:this.gale,path:B.path,pathfinder:B.path,portal:this.portal,nootDialogueEndgame:Z.U.isEndgameQuestActive()?292:230},null)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),this.gale&&(this.gale.destroy(),this.gale=null),this.portal&&(this.portal.destroy(),this.portal=null),this.trapDoor&&(this.trapDoor.destroy(),this.trapDoor=null),super.cleanup()}resizeContainer(k,B){W.q.instance.prodigy.effects.resizeContainer(k,B)}}class pt extends lt.Z{constructor(k,B){super(k,"CR2",B.concat([]),"map-academy-CR2"),this.noot=null}setup(k,B,U){super.setup(k,B,U),this.screen.user.position.x=640,this.screen.user.position.y=900,this.noot=this.screen.addNPC(700,900,at._.Npc_sprite_noot_json),this.noot.float(!0)}start(k,B){super.start(k,B);const U=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),G=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);U.execute(G.getStateMachine(81),{game:k,screen:B,scene:this,player:B.user,noot:this.noot,pathfinder:B.path},null)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),super.cleanup()}}class vt extends lt.Z{constructor(k,B){super(k,"GH1",B.concat([at._.Npc_sprite_noot_json,at._.Zone_lamplight_json,X.Q.Spine_academy_window_light_horizontal_json,ut.V.Bgm_fun,ut.V.Bgm_puppetmaster,X.Q.Spine_academystairlight_json,X.Q.Spine_academylanternglow_json,X.Q.Spine_academy_window_glow_horizontal_json,X.Q.Spine_stair_lock_json,X.Q.Spine_academy_window_glow_vertical_json,X.Q.Spine_academy_window_light_vertical_json,X.Q.Spine_screendebris_json,G.c.Sfx_puppetmaster_blast,G.c.Sfx_keystone_disappear]),"map-academy-GH1"),this.noot=null}setup(k,B,U){super.setup(k,B,U),this.screen.user.position.x=640,this.screen.user.position.y=900,this.noot=this.screen.addNPC(700,900,at._.Npc_sprite_noot_json),this.noot.float(!0),st.addEffects(k,B)}start(k,B){super.start(k,B);const U=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),G=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);U.execute(G.getStateMachine(80),{game:k,screen:B,scene:this,player:B.user,noot:this.noot,pathfinder:B.path},null)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),super.cleanup()}}var gt=U(8674),mt=U(99625),yt=U(80060);class _t extends lt.Z{constructor(k,B){super(k,"GH1",B.concat([ut.V.Bgm_academy_greathall]),"map-academy-GH1"),this.onSceneComplete=new F.HN0,this.cutscenePrefab=mt.l.AcademyStatusEffects1Cutscene,this.isMultiplayerDisabled=!0,this.arePopupsDisabled=!0}setup(k,B,U){super.setup(k,B,U),B.user.position.set(550,445)}start(k,B){super.start(k,B,20),this.playCutscene().catch((k=>{F.VyI.log(`Error during Academy Status Effect FTUE cutscene: ${k}`,F.$bb.Error),this.endCutscene()}))}playCutscene(){return(0,gt.sH)(this,void 0,void 0,(function*(){const k=new F._mx;F.wa5.getActiveScene().addGameObject(k),this.cutsceneLoadPromise=yt.d.loadWithInjectedValuesAndDependenciesFromGUID(W.q.instance.prodigy.gameContainer.get("d0e-64fd"),this.cutscenePrefab,{END_CUTSCENE:this.endCutscene.bind(this)},k),yield this.cutsceneLoadPromise}))}endCutscene(){W.q.instance.prodigy.open.menuCloseAll(),this.onSceneComplete.dispatch(),super.endCutscene()}cleanup(){var k;null===(k=this.cutsceneLoadPromise)||void 0===k||k.cancel(),this.onSceneComplete.dispose(),super.cleanup()}}class Et extends _t{constructor(){super(...arguments),this.cutscenePrefab=mt.l.AcademyStatusEffects2Cutscene}}var wt=U(96535),Tt=U(44357),St=U(13956);class At extends lt.Z{constructor(k,B){super(k,"GH2",B.concat(At.PRELOAD_ASSETS),"map-academy-GH2")}setup(k,B,U){super.setup(k,B,U),nt.k.initKeystones(this.game,this.screen),nt.k.addEffects(k,B),B.user.position.set(350,400),this._pippet=new rt.p(W.q.instance.game,"NPC_NAME_PIPPET",X.Q.Spine_npc_pippet_json,ot.ac.Boss,this.screen.content,930,400,"idle"),this._pippet.flip()}start(k,B){super.start(k,B),this.playCutscene().catch((k=>{F.RQr.logError(k,"Error playing Pippet post-battle cutscene"),this.endCutscene()}))}playCutscene(){const k=Object.create(null,{playCutscene:{get:()=>super.playCutscene}});return(0,gt.sH)(this,void 0,void 0,(function*(){yield k.playCutscene.call(this),this._player.saveEnabled=!1,yield Tt.v$([1425]),yield Tt.x(this.screen.path,this._pippet,900,0),this._pippet.visible=!1;for(const k of Object.keys(Q.b.ZONE_TOWERS)){const B=K.t.getItem("academyTower",Q.b.ZONE_TOWERS[k]).data,U=B.keystone.zone;this._player.state.get(`keystones-${U}`)>0||(yield F.Egh.timeout(800),nt.k.placeKeystone(this.game,this.screen,B.keystone,B.element).catch(F.RQr.createHandler(`Error placing ${k} keystone`)))}yield F.Egh.timeout(3500),this.endCutscene()}))}endCutscene(){super.endCutscene(),this._player.saveEnabled=!0,W.q.instance.prodigy.world.it("academy-GH2",290,490)}}At.PRELOAD_ASSETS=[X.Q.Spine_academygh_centre_json,X.Q.Spine_academygh_addkeystone_json,X.Q.Spine_academy_window_glow_vertical_json,X.Q.Spine_academy_window_light_vertical_json],(0,gt.Cg)([(0,St.b)("306-5359"),(0,gt.Sn)("design:type",wt.W)],At.prototype,"_player",void 0);var Ct=U(95891),Ot=U.n(Ct),It=U(84399),Dt=U(85604);class Rt extends lt.Z{constructor(k,B){super(k,"GH2",B.concat(Rt.PRELOAD_ASSETS),"map-academy-GH2"),this._noot=null,this._hasBeenSetup=!1}setup(k,B,U){super.setup(k,B,U),nt.k.initKeystones(this.game,this.screen),nt.k.addEffects(k,B),B.user.position.set(370,400);for(const{type:F,x:G,y:j,flip:$}of Rt.NPC_DATA)B.addConstructedQuestNPC(G,j,F,$,Ct.noop);this._noot=new rt.p(k,"NPC_NAME_NOOT",X.Q.Spine_npc_noot_json,void 0,B.content,910,400,"idle"),this._noot.flip(),this._hasBeenSetup=!0}start(k,B){this._hasBeenSetup&&(super.start(k,B),this.playCutscene().catch(F.RQr.createHandler("Error playing Pippet post-battle cutscene")).finally((()=>this.endCutscene())))}playCutscene(){const k=Object.create(null,{playCutscene:{get:()=>super.playCutscene}});return(0,gt.sH)(this,void 0,void 0,(function*(){yield k.playCutscene.call(this),yield Tt.v$([1483,1484,1485,1486,1487,1488,1489,1490,1595,1492])}))}endCutscene(){super.endCutscene();const k=W.q.instance.prodigy.gameContainer.get("306-5359");k.data.puppetMasterDefeatDate=Date.now(),k.updated=!0,It.R.sendActivationEvent(),W.q.instance.prodigy.world.it(k.isPlayingAtSchool()&&!It.R.isFeatureEnabled()?"academy-GH3":"lamplight-B3")}cleanup(){this._noot&&(this._noot.destroy(),this._noot=null),super.cleanup()}}Rt.PRELOAD_ASSETS=[X.Q.Spine_npc_flora_json,X.Q.Spine_npc_benni_json,X.Q.Spine_npc_bok_json,X.Q.Spine_npc_slurpy_json,at._.Npc_sprite_windsail_json,X.Q.Spine_npc_noot_json,X.Q.Spine_academygh_centre_json,X.Q.Spine_academygh_addkeystone_json,X.Q.Spine_academy_window_glow_vertical_json,X.Q.Spine_academy_window_light_vertical_json],Rt.NPC_DATA=[{type:Dt.y.Flora,x:445,y:258,flip:!1},{type:Dt.y.Eve,x:553,y:211,flip:!1},{type:Dt.y.Benni,x:642,y:143,flip:!1},{type:Dt.y.Slurpy,x:720,y:213,flip:!1},{type:Dt.y.Bok,x:857,y:258,flip:!1}];var Pt=U(82351),Mt=U(36648),Nt=U(28628),xt=U(40295),Lt=U(48975),kt=U(59968);class Bt extends kt.R{constructor(k,B,U,G,j,$,H=-260){const V=new Lt.s(W.q.instance.game);V.init({npc_name:G,npc_type:j,x_coord:B,y_coord:U,npc_animation_id:"idle"}),super(W.q.instance.game,k,V,1,B,U),this.nameText.GameObject.legacyTransform.group.position.set(0,H),this.setup($).catch(F.RQr.createHandler("Error loading NPC spine"))}setup(k){return(0,gt.sH)(this,void 0,void 0,(function*(){if(this._initialState=this.stand,!F.E3R.isLoaded(k)){const B=W.q.instance.prodigy.gameContainer.get(F.t5G.AssetLoader);yield B.loadAssets([k])}this._spine=W.q.instance.prodigy.create.spine(0,0,k,this.sprites),this._initialState.apply(this)}))}walk(){this._spine?this._spine.setAnimationByName(0,"walk",!0):this._initialState=this.walk}stand(){this._spine?this._spine.setAnimationByName(0,"idle",!0):this._initialState=this.stand}}var Ut=U(10670),Ft=U(76945);class Gt extends lt.Z{get cutsceneErrorMessage(){return"Error playing endgame pre-battle cutscene"}get cutsceneDialogueSequence(){return[1477]}get battleType(){return Nt.gu.EndGamePuppetMaster}get battleBackground(){return[Mt.q.Battle_puppet_master_bg,""]}get firstTimeBreadcrumbKey(){return $.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PUPPET_MASTER}constructor(k,B){super(k,"GH2",B.concat(Gt.PRELOAD_ASSETS),"map-academy-GH2")}setup(k,B,U){super.setup(k,B,U),nt.k.initKeystones(this.game,this.screen),nt.k.addEffects(k,B),this.screen.user.position.set(350,400),this._puppetMaster=new Bt(B.content,930,0,"NPC_NAME_PUPPETMASTER",ot.ac.Boss,X.Q.Spine_npc_puppetmaster_json),this._puppetMaster.flip()}start(k,B){super.start(k,B),this.playCutscene().catch((k=>{F.RQr.logError(k,this.cutsceneErrorMessage),this.endCutscene()}))}playCutscene(){const k=Object.create(null,{playCutscene:{get:()=>super.playCutscene}});return(0,gt.sH)(this,void 0,void 0,(function*(){yield k.playCutscene.call(this),yield Tt.x(this.screen.path,this._puppetMaster,900,400);const B=W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete($.B.FEATURE_ENDGAME_QUEST,this.firstTimeBreadcrumbKey)?Gt.getRetryDialogue():this.cutsceneDialogueSequence;yield Tt.v$(B),this.endCutscene()}))}static getRetryDialogue(){const k=Ft.o.integerInRange(0,this._currentRetryDialogues.length),B=this._currentRetryDialogues.splice(k,1)[0];return 0===this._currentRetryDialogues.length&&(this._currentRetryDialogues.push(...this.RETRY_DIALOGUES),this._currentRetryDialogues.splice(this._currentRetryDialogues.indexOf(B),1)),B}endCutscene(){super.endCutscene();const k={revampBattleType:this.battleType,screen:this.battleBackground};Z.U.progressData.step===xt.B.Guardian5Defeated&&(k.backgroundMusic=Pt.B.Bgm_battle_puppet_master,k.victoryMusic=Pt.B.Bgm_puppet_master_victory_loop);let B=null,U=null,F=null;switch(this.battleType){case Nt.gu.EndGameGuardianFirefly:B=5,U=Ut.jT.IllusionBoss1FirstTimeBattleStart,F=$.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_FIREFLY;break;case Nt.gu.EndGameGuardianShiverchill:B=7,U=Ut.jT.IllusionBoss2FirstTimeBattleStart,F=$.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIVERCHILL;break;case Nt.gu.EndGameGuardianBonfire:B=9,U=Ut.jT.IllusionBoss3FirstTimeBattleStart,F=$.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_BONFIRE;break;case Nt.gu.EndGameGuardianShipwreck:B=11,U=Ut.jT.IllusionBoss4FirstTimeBattleStart,F=$.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIPWRECK;break;case Nt.gu.EndGameGuardianSkywatch:B=13,U=Ut.jT.IllusionBoss5FirstTimeBattleStart,F=$.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SKYWATCH;break;case Nt.gu.EndGamePuppetMaster:B=15,U=Ut.jT.PuppetMasterFirstTimeBattleStart,F=$.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PUPPET_MASTER}U&&W.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(B,U,F),W.q.instance.prodigy.battle.start(k,void 0,this.onBattleWon,this.onBattleEnd)}onBattleWon(){Z.U.locallyAdvanceQuest(),W.q.instance.prodigy.world.it("academy-GH2",290,490)}onBattleEnd(){W.q.instance.prodigy.world.it("academy-GH2",290,490)}}Gt.PRELOAD_ASSETS=[X.Q.Spine_npc_puppetmaster_json,X.Q.Spine_academygh_centre_json,X.Q.Spine_academygh_addkeystone_json,X.Q.Spine_academy_window_glow_vertical_json,X.Q.Spine_academy_window_light_vertical_json],Gt.RETRY_DIALOGUES=[[1517],[1518],[1519],[1520],[1521],[1522],[1523]],Gt._currentRetryDialogues=Ot().clone(Gt.RETRY_DIALOGUES);var jt=U(87539);class $t extends Gt{get cutsceneErrorMessage(){return"Error playing guardian pre-battle cutscene"}get cutsceneDialogueSequence(){return this._guardianData.puppetMasterPreBattleDialogue}get battleType(){return this._battleType}get firstTimeBreadcrumbKey(){switch(this._battleType){case Nt.gu.EndGameGuardianFirefly:return $.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_FIREFLY;case Nt.gu.EndGameGuardianShiverchill:return $.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIVERCHILL;case Nt.gu.EndGameGuardianBonfire:return $.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_BONFIRE;case Nt.gu.EndGameGuardianShipwreck:return $.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SHIPWRECK;case Nt.gu.EndGameGuardianSkywatch:return $.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_GUARDIAN_SKYWATCH}}get battleBackground(){return[Mt.q[this._guardianData.backgroundImageKey],Mt.q[this._guardianData.foregroundImageKey]]}setup(k,B,U){super.setup(k,B,U),this._battleIndex=Z.U.getCurrentGuardianIndex(),this._battleType=$t.GUARDIAN_BATTLE_TYPE[this._battleIndex],this._guardianData=jt.m.getGuardianData(this._battleType)}onBattleWon(){Z.U.locallyAdvanceQuest(),W.q.instance.prodigy.world.it("academy-GH2",290,490,{guardianJustDefeated:!0})}}$t.GUARDIAN_BATTLE_TYPE=[Nt.gu.EndGameGuardianFirefly,Nt.gu.EndGameGuardianShiverchill,Nt.gu.EndGameGuardianBonfire,Nt.gu.EndGameGuardianShipwreck,Nt.gu.EndGameGuardianSkywatch];var Ht=U(29834);class Vt extends lt.Z{constructor(k,B){super(k,"GH2",B.concat(Vt.PRELOAD_ASSETS),"map-academy-GH2")}setup(k,B,U){super.setup(k,B,U),nt.k.initKeystones(this.game,this.screen),nt.k.addEffects(k,B),this.screen.user.position.set(350,400),this._pippet=new rt.p(W.q.instance.game,"NPC_NAME_PIPPET",X.Q.Spine_npc_pippet_json,ot.ac.Boss,this.screen.content,930,0,"idle"),this._pippet.flip()}start(k,B){super.start(k,B),this.playCutscene().catch((k=>{F.RQr.logError(k,"Error playing pippet pre-battle cutscene"),this.endCutscene()}))}playCutscene(){const k=Object.create(null,{playCutscene:{get:()=>super.playCutscene}});return(0,gt.sH)(this,void 0,void 0,(function*(){var B;yield k.playCutscene.call(this),yield Tt.x(this.screen.path,this._pippet,900,400),null===(B=this._pippet.spineNPC.findComponent(Ht.j))||void 0===B||B.playAnimation("idle",!0),yield Tt.v$([1454]),this.endCutscene()}))}endCutscene(){super.endCutscene(),Vt.startEndgamePippetBattle()}static startEndgamePippetBattle(){const k={revampBattleType:Nt.gu.EndgamePippet,screen:[Mt.q.Battle_academy_gh_stairs_bg,Mt.q.Battle_academy_gh_stairs_fg]};W.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(3,Ut.jT.PippetFirstTimeBattleStart,$.B.BREADCRUMB_ENDGAME_QUEST_FIRST_BATTLE_WITH_PIPPET),W.q.instance.prodigy.battle.start(k,void 0,(()=>{Z.U.locallyAdvanceQuest(),W.q.instance.prodigy.world.it("academy-GH2",290,490)}),(()=>{W.q.instance.prodigy.world.it("academy-GH2",290,490)}))}}Vt.PRELOAD_ASSETS=[X.Q.Spine_academygh_centre_json,X.Q.Spine_academygh_addkeystone_json,X.Q.Spine_academy_window_glow_vertical_json,X.Q.Spine_academy_window_light_vertical_json];class Wt extends lt.Z{constructor(k,B){super(k,"GH3",B.concat([at._.Npc_sprite_noot_json,at._.Zone_lamplight_json,ut.V.Bgm_fun,ut.V.Bgm_puppetmaster,X.Q.Spine_academylanternglow_json,G.c.Sfx_academy_rumble,X.Q.Spine_academy_window_glow_vertical_json,X.Q.Spine_screendebris_json]),"map-academy-GH3"),this.noot=null}setup(k,B,U){super.setup(k,B,U),B.user.position.x=640,B.user.position.y=850,this.debris=this.game.add.spine(640,480,X.Q.Spine_screendebris_json),this.debris.setToSetupPose(),this.screen.foreground.addChild(this.debris)}start(k,B){super.start(k,B,20),this.noot=B.addNPC(640,760,at._.Npc_sprite_noot_json),this.noot.float(!0),this.noot.walkSpeed=2;const U=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),G=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);U.execute(G.getStateMachine(53),{game:k,screen:B,scene:this,player:B.user,noot:this.noot,path:B.path,pathfinder:B.path,debris:this.debris},null)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),this.debris&&(this.debris.destroy(),this.debris=null),super.cleanup()}}class qt extends lt.Z{constructor(k,B){super(k,"GH2",B.concat([at._.Npc_sprite_noot_json,at._.Zone_lamplight_json,ut.V.Bgm_puppetmaster,X.Q.Spine_academylanternglow_json,ut.V.Bgm_fun,X.Q.Spine_academy_window_light_horizontal_json,X.Q.Spine_screendebris_json,X.Q.Spine_screendebris_json,X.Q.Spine_academy_window_glow_vertical_json,X.Q.Spine_academy_window_light_vertical_json,X.Q.Spine_academygh_centre_json,G.c.Sfx_puppetmaster_blast,G.c.Sfx_keystone_disappear]),"map-academy-GH2"),this.noot=null}setup(k,B,U){super.setup(k,B,U),B.user.position.x=640,B.user.position.y=850,this.keystonesSpine=this.game.add.spine(640,403,X.Q.Spine_academygh_centre_json),this.keystonesSpine.setToSetupPose(),this.screen.content.addChild(this.keystonesSpine),this.debris=this.game.add.spine(640,480,X.Q.Spine_screendebris_json),this.debris.setToSetupPose(),this.screen.foreground.addChild(this.debris),nt.k.addEffects(k,B)}start(k,B){super.start(k,B,12),this.noot=B.addNPC(640,800,at._.Npc_sprite_noot_json),this.noot.float(!0),this.noot.walkSpeed=2;const U=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),G=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);U.execute(G.getStateMachine(54),{game:k,screen:B,scene:this,player:B.user,noot:this.noot,keystones:this.keystonesSpine,debris:this.debris},null)}cleanup(){this.noot&&(this.noot.destroy(),this.noot=null),this.keystonesSpine&&(this.keystonesSpine.destroy(),this.keystonesSpine=null),this.debris&&(this.debris.destroy(),this.debris=null),super.cleanup()}}var Kt,zt=U(96810);class Yt extends lt.Z{constructor(k,B){super(k,"GH1",B.concat([at._.Npc_sprite_noot_json,at._.Zone_lamplight_json,ut.V.Bgm_puppetmaster,X.Q.Spine_academylanternglow_json,ut.V.Bgm_fun,X.Q.Spine_academystairlight_json,X.Q.Spine_academy_window_glow_horizontal_json,X.Q.Spine_academy_window_light_horizontal_json]),"map-academy-GH1"),this._noot=null}setup(k,B,U){super.setup(k,B,U),B.user.position.x=640,B.user.position.y=850,this._puppetMaster=new rt.p(k,"NPC_NAME_PUPPETMASTER",X.Q.Spine_npc_puppetmaster_json,ot.ac.Boss,B.content,640,-50,"idle"),this._pippet=new dt.N(k,"NPC_NAME_PIPPET",B.content,640,-50,"idle",B.user),this._puppetMaster.alpha=this._pippet.alpha=1,st.addEffects(k,B)}start(k,B){super.start(k,B,12),this._noot=B.addNPC(640,800,at._.Npc_sprite_noot_json),this._noot.float(!0),this._noot.walkSpeed=2;const U=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),G=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);U.execute(G.getStateMachine(55),{game:k,screen:B,scene:this,player:B.user,noot:this._noot,path:B.path,puppetmaster:this._puppetMaster,pippet:this._pippet,pathfinder:B.path},null)}battle(k){const B={revampBattleType:Nt.gu.Tutorial3,intro:W.q.instance.prodigy.gameContainer.get(F.$Bt.LocalizationService).getText("COMBAT_MINION_BATTLE"),screen:"battle-academy-gh-stairs",encounter:[{ID:69}],drops:[{type:"gold",N:50}],dropsDisabled:!0,difficulty:3,minTeamSize:2,maxTeamSize:2,bench:[{petID:122,weight:1}]};W.q.instance.prodigy.gameContainer.get("e20-0fb0").player.setEnergy(1),this.technicalMetricsManager.sendOnboardingFunnelEvent(zt.l.MinionBattleStarted),W.q.instance.prodigy.battle.battleStats.type="AcademyTutorialBattle",W.q.instance.prodigy.battle.start(B,(()=>{this.endBattle()}),(()=>{this.endBattle()}),(()=>{this.endBattle()}),"academy-GH1")}endBattle(){this.technicalMetricsManager.sendOnboardingFunnelEvent(zt.l.MinionBattleWon),W.q.instance.prodigy.world.it("academy-GH1"),this.zone.completeSequence(1,0)}cleanup(){this._noot&&(this._noot.destroy(),this._noot=null),this._puppetMaster&&(this._puppetMaster.destroy(),this._puppetMaster=null),this._pippet&&(this._pippet.destroy(),this._pippet=null),super.cleanup()}}class Qt extends lt.Z{constructor(k,B){super(k,"GH1",B.concat([at._.Npc_sprite_noot_json,at._.Zone_lamplight_json,ut.V.Bgm_puppetmaster,X.Q.Spine_academylanternglow_json,ut.V.Bgm_fun,X.Q.Spine_academystairlight_json,X.Q.Spine_academy_window_glow_horizontal_json,X.Q.Spine_academy_window_light_horizontal_json]),"map-academy-GH1"),this._noot=null}setup(k,B,U){super.setup(k,B,U),B.user.position.x=320,B.user.position.y=520,this._noot=B.addNPC(430,520,at._.Npc_sprite_noot_json),this._noot.float(!0),this._noot.walkSpeed=2,this._puppetMaster=new rt.p(k,"NPC_NAME_PUPPETMASTER",X.Q.Spine_npc_puppetmaster_json,ot.ac.Boss,B.content,640,480,"idle",null,!0),this._pippet=new dt.N(k,"NPC_NAME_PIPPET",B.content,815,490,"idle",B.user),this._puppetMaster.alpha=this._pippet.alpha=1,st.addEffects(k,B)}start(k,B){super.start(k,B,12);const U=W.q.instance.prodigy.gameContainer.get(F.$Bt.IFSMController),G=W.q.instance.prodigy.gameContainer.get(F.$Bt.FSMService);U.execute(G.getStateMachine(77),{game:this.game,screen:this.screen,scene:this,player:B.user,noot:this._noot,path:this.screen.path,puppetmaster:this._puppetMaster,pippet:this._pippet,pathfinder:this.screen.path},null)}cleanup(){this._noot&&(this._noot.destroy(),this._noot=null),this._puppetMaster&&(this._puppetMaster.destroy(),this._puppetMaster=null),this._pippet&&(this._pippet.destroy(),this._pippet=null),super.cleanup()}}!function(k){k[k.None=0]="None",k[k.Placed=1]="Placed"}(Kt||(Kt={}));class Xt extends Q.b{constructor(k){super(k),this.assets=[j.t.Tileset_academy_png,j.t.Tileset_academy_sup_png,j.t.Tileset_collisions_png,`bgm-${this.bgmID}`,G.c.Sfx_lamplight],this.name="The Academy",this.ID=H.A_.ACADEMY,this.battleBG="battle-academy-gh-stairs",this.defaultOnFaint="academy-GH3",this.questHub="academy-GH3",this.bgmID=20,this.currency=13,this.zoneIndex=z.P.Academy,this.states=["daily"],this.monsters=[],this.maps={GH1:new st(this,this.assets),GH2:new nt.k(this,this.assets),GH3:new ct(this,this.assets),CR1:new et(this,this.assets),CR2:new it(this,this.assets)},this.scenes={greatHallPt1:new Wt(this,this.assets),greatHallPt2:new qt(this,this.assets),greatHallPt3:new Yt(this,this.assets),greatHallPt4:new Qt(this,this.assets),introPt1:new ft(this,this.assets),introPt2:new bt(this,this.assets),stairsUnlocked:new vt(this,this.assets),secondFloor:new pt(this,this.assets),endgamePrePippet:new Vt(this,this.assets),endgamePostPippet:new At(this,this.assets),endgamePreGuardian:new $t(this,this.assets),endgamePrePuppetMaster:new Gt(this,this.assets),endgamePostPuppetMaster:new Rt(this,this.assets),statusEffectFTUE1:new _t(this,this.assets),statusEffectFTUE2:new Et(this,this.assets)}}placeDaily(k,B,U){}init(k,B,U){super.init(k,B,U),this.quests={},this.bgmID=20}setup(k,B,U){return W.q.instance.prodigy.gameContainer.get("e20-0fb0").player.hasCompletedTutorial()||(B.menuBar.active=!1),super.setup(k,B,U)}teleport(k,B,U,F,G){const j=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player;j.backpack.hasItem("key",22,this.difficultyMode);j.hasCompletedTutorial()&&j.backpack.hasItem("key",22,this.difficultyMode)<=0?W.q.instance.prodigy.world.it("lamplight-B0"):(W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_VISITED)||W.q.instance.prodigy.breadcrumbManager.completeBreadcrumb($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_VISITED),super.teleport(k,B,U,F,G),this.sendSegmentTrackingEvents())}sendSegmentTrackingEvents(){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=k.data.zone,U=k.data.previousZone;if(!W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_VISITED_AFTER_RECIEVING_KEYSTONE)){const B=Xt.getAllTowerData().filter((B=>k.backpack.hasItem("key",B.keystone.itemID)));B&&(B.forEach((k=>{W.q.instance.prodigy.gameContainer.get("c47-20b6").academyTowers.sendFunnelEvent({funnelName:V.w.format("{0}_tower",k.element),funnelType:"feature",step:Y.D.AcademyTeleport})})),W.q.instance.prodigy.breadcrumbManager.completeBreadcrumb($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_VISITED_AFTER_RECIEVING_KEYSTONE))}if(B===`${H.A_.ACADEMY}-${q.s.TOWER_COMMON_ROOM_SHORTFORM}1`&&U===`${H.A_.ACADEMY}-${q.s.TOWER_COMMON_ROOM_SHORTFORM}2`&&!W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_TOWER_LOBBY_VISITED_AFTER_PLACING_KEYSTONE)){const k=Xt.getAllTowerData().filter((k=>this.getKeystoneState(k.keystone.zone)===Kt.Placed));k&&(k.forEach((k=>{W.q.instance.prodigy.gameContainer.get("c47-20b6").academyTowers.sendFunnelEvent({funnelName:V.w.format("{0}_tower",k.element),funnelType:"feature",step:Y.D.AcademyTowerLobby})})),W.q.instance.prodigy.breadcrumbManager.completeBreadcrumb($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_TOWER_LOBBY_VISITED_AFTER_PLACING_KEYSTONE))}if(B===`${H.A_.ACADEMY}-GH2`&&U===`${H.A_.ACADEMY}-GH3`&&!W.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_PEDESTAL_ROOM_VISITED_AFTER_RECIEVING_KEYSTONE)){const B=Xt.getAllTowerData().filter((B=>k.backpack.hasItem("key",B.keystone.itemID)));B&&(B.forEach((k=>{W.q.instance.prodigy.gameContainer.get("c47-20b6").academyTowers.sendFunnelEvent({funnelName:V.w.format("{0}_tower",k.element),funnelType:"feature",step:Y.D.PedestalRoom})})),W.q.instance.prodigy.breadcrumbManager.completeBreadcrumb($.B.FEATURE_ACADEMY_TOWERS,$.B.BREADCRUMB_ACADEMY_PEDESTAL_ROOM_VISITED_AFTER_RECIEVING_KEYSTONE))}}static getAllTowerData(){return K.t.getCategoryItems("academyTower").sort(((k,B)=>k.ID-B.ID)).map((k=>k.data))}static getTowerData(k){const B=Xt.getAllTowerData();for(let U=0;U0}static getKeystonesToPlace(){const k=W.q.instance.prodigy.gameContainer.get("e20-0fb0").player,B=Xt.getAllTowerData();let U=[];for(let F=0;F0&&k.state.get(`keystones-${G.keystone.zone}`)!==Kt.Placed&&U.push(G.keystone.zone)}return U}}},4324:(k,B,U)=>{"use strict";U.d(B,{k:()=>nt});var F=U(8674),G=U(62459),j=U(88022),$=U(82351),H=U(99625),V=U(51742),W=U(56942),q=U(40295),K=U(90633),z=U(73678),Y=U(35120),Q=U(93867),X=U(10670),Z=U(41674),J=U(46784),tt=U(44357),et=U(38454),it=U(85126),st=U(10213);class nt extends st.z{constructor(k,B){const U=[W.Q.Spine_academygh_centre_json,W.Q.Spine_academylanternglow_json,W.Q.Spine_academy_window_glow_vertical_json,W.Q.Spine_academy_window_light_horizontal_json,W.Q.Spine_academy_window_light_vertical_json,W.Q.Spine_shadowportal_json,W.Q.Spine_academygh_addkeystone_json,V.c.Sfx_academy_portal_open,V.c.Sfx_academy_portal_close,V.c.Sfx_keystone_appear,V.c.Sfx_bubble_pop,W.Q.Spine_circle_bloom_1_json,$.B.Sfx_academy_keystone_activation_sheen];super(k,"GH2","MAP_ACADEMY_GREATHALL",640,570,["academy-GH3","academy-GH1"],B.concat(U))}setup(k,B,U){var F;super.setup(k,B,U);const $=Y.q.instance.prodigy.gameContainer.get("306-5359");this.addAreaEvent(k,B,{x:640,y:45,w:1110,h:75,rect:!0},"academy-GH1",640,560),this.addAreaEvent(k,B,{x:640,y:655,w:1110,h:130,rect:!0},"academy-GH3",640,100),Q.U.progressData.step===q.B.LastKeystoneCutsceneViewed&&Y.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(2,X.jT.AllGemsFirstAcademyVisit,K.B.BREADCRUMB_ENDGAME_QUEST_FIRST_ACADEMY_VISIT_WITH_ALL_GEMS);const V=this.screen.content.addChild(Y.q.instance.prodigy.create.sprite(640,383,j._.General_core_json,"empty",{x:.5,y:.5},null,260,220));if(V.events.onInputUp.add((()=>{Y.q.instance.prodigy.gameContainer.get("c47-20b6").featureCommon.sendInterfaceEvent({interfaceName:J.B.PedestalsClicked,interfaceType:Z.Wm.ClickableSprite}),nt.setGuideHandActive(!1),Q.U.progressData.step===q.B.LastKeystoneCutsceneViewed?this.zone.playScene("endgamePrePippet"):Q.U.getCurrentGuardianIndex()>=0?this.zone.playScene("endgamePreGuardian"):Q.U.progressData.step===q.B.Guardian5Defeated?this.zone.playScene("endgamePrePuppetMaster"):Q.U.isStepComplete(q.B.PuppetMasterDefeated)?(Y.q.instance.prodigy.gameContainer.get("c47-20b6").battleRevamp.sendEndGameFunnelAdvancedEvent(18,X.jT.PostPuppetMasterPedestalClicked,K.B.BREADCRUMB_ENDGAME_QUEST_FIRST_CLICK_POST_PUPPET_MASTER_PEDESTAL),tt.v$([1493,1494]).catch(G.RQr.createHandler("Error running dialog"))):Y.q.instance.prodigy.open.keystonePedestals((()=>{it.N.anyKeystonesToPlace()||Y.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(K.B.FEATURE_ACADEMY_TOWERS,K.B.BREADCRUMB_ACADEMY_NO_KEYSTONES)||(Y.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(K.B.FEATURE_ACADEMY_TOWERS,K.B.BREADCRUMB_ACADEMY_NO_KEYSTONES),nt.setGuideHandActive(!1))}))})),V.alpha=0,V.inputEnabled=!0,nt.addEffects(k,B),Q.U.progressData.step===q.B.PippetDefeated&&it.N.anyKeystonesToPlace())return void this.zone.playScene("endgamePostPippet");if(Q.U.progressData.step===q.B.PuppetMasterDefeated&&!G.Aq$.isDefined($.data.puppetMasterDefeatDate))return void($.backpack.hasItem("hat",240)?this.zone.playScene("endgamePostPuppetMaster"):this.playMissedPuppetMasterGearSequence().catch(G.RQr.createHandler("Error playing missed Puppet Master gear sequence")));const W=Y.q.instance.prodigy.gameContainer.get("d0e-64fd");nt._guideHand=new G._mx(B.foregroundGameObject),nt._guideHand.addComponent(G.dLy).setPosition(640,360),nt.setGuideHandActive(!1),W.loadWithDependenciesFromGUID(H.l.ClickHereGuideHand,nt._guideHand).catch(G.RQr.createHandler("Error loading guide hand")),(null===(F=$.data.previousZone)||void 0===F?void 0:F.includes(z.A_.SHIVERCHILL))&&this.portalInSetup(k,B,1035,480)}start(k,B,U){var F;(null===(F=Y.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data.previousZone)||void 0===F?void 0:F.includes(z.A_.SHIVERCHILL))&&this.portalInStart(k,this.screen),super.start(k,B,U),Q.U.progressData.step===q.B.LastKeystoneCutsceneViewed?Y.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(K.B.FEATURE_ENDGAME_QUEST,K.B.BREADCRUMB_ENDGAME_QUEST_SAW_KEYSTONE_DIALOGUE)?nt.setGuideHandActive(!0):(Y.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(K.B.FEATURE_ENDGAME_QUEST,K.B.BREADCRUMB_ENDGAME_QUEST_SAW_KEYSTONE_DIALOGUE),tt.v$([1473]).then((()=>{nt.setGuideHandActive(!0)})).catch(G.RQr.createHandler("Error showing pippet dialogue"))):nt.setGuideHandActive(it.N.anyKeystonesToPlace()||Q.U.isEndgameQuestActive())}cleanup(){var k;null===(k=nt._guideHand)||void 0===k||k.destroy(),nt._guideHand=null,super.cleanup()}static setGuideHandActive(k){nt._guideHand&&(nt._guideHand.active=k)}portalInSetup(k,B,U,F){B.user.scale.set(0,0),B.user.x=U,B.user.y=F,G.Aq$.isDefined(B.user.follow)&&(B.user.follow.visible=!1,B.user.follow.x=U,B.user.follow.y=F)}portalInStart(k,B){const U=k.add.spine(B.user.x,B.user.y,W.Q.Spine_shadowportal_json);U.setToSetupPose(),B.content.addChild(U);const F=-150,j=50,$=Y.q.instance.prodigy.gameContainer.get(G.$Bt.IFSMController),H=Y.q.instance.prodigy.gameContainer.get(G.$Bt.FSMService);$.execute(H.getStateMachine(185),{game:k,map:this,player:B.user,playerScale:B.user.scale,path:B.path,portal:U,startX:B.user.x+F,startY:B.user.y+j},(()=>{G.Aq$.isDefined(B.user.follow)&&(B.user.follow.visible=!0)}))}static addEffects(k,B){const U=k.add.spine(160,600,W.Q.Spine_academy_window_glow_vertical_json);U.setToSetupPose(),U.setAnimationByName(0,"animation",!0);const F=k.add.spine(1120,600,W.Q.Spine_academy_window_glow_vertical_json);F.setToSetupPose(),F.setAnimationByName(0,"animation",!0),B.foreground.addChild(U),B.foreground.addChild(F);const G=k.add.spine(160,600,W.Q.Spine_academy_window_light_vertical_json);G.setToSetupPose(),G.setAnimationByName(0,"animation",!0);const j=k.add.spine(1120,600,W.Q.Spine_academy_window_light_vertical_json);j.setToSetupPose(),j.setAnimationByName(0,"animation",!0),B.background.addChild(G),B.background.addChild(j)}static placeKeystone(k,B,U,G){return(0,F.sH)(this,void 0,void 0,(function*(){Y.q.instance.prodigy.audio.playSFX(39,"appear"),k.time.events.addTimer(2333,(()=>{Y.q.instance.prodigy.audio.playSFX(40,"pop")}),this),Y.q.instance.prodigy.world.getZone(z.A_.ACADEMY).setKeystoneState(U,it.s.Placed),Y.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(K.B.FEATURE_TOWERS_PROMPT,K.B.NOOT_TOWER_PROMPT),Y.q.instance.prodigy.breadcrumbManager.completeBreadcrumb(K.B.FEATURE_ACADEMY_TOWERS,K.B.BREADCRUMB_ACADEMY_UNPLACED_KEYSTONES),Y.q.instance.prodigy.breadcrumbManager.resetBreadcrumb(K.B.FEATURE_ACADEMY_TOWERS,K.B.BREADCRUMB_ACADEMY_TOWER_LOBBY_VISITED_AFTER_PLACING_KEYSTONE);const F=k.add.spine(U.x,U.y,W.Q.Spine_academygh_addkeystone_json);F.setToSetupPose(),B.above.add(F),F.setAnimationByName(0,`keystone-add-${U.zone}`),yield F.onComplete.asPromise(),F.setAnimationByName(0,`keystone-idle-${U.zone}`,!0),nt.setGuideHandActive(it.N.anyKeystonesToPlace()||Q.U.isEndgameQuestActive())}))}static initKeystones(k,B){var U;const F=k.add.spine(640,403,W.Q.Spine_academygh_centre_json);F.setToSetupPose(),F.updateMethod=G.ba$.Pixi;const j=F.setAnimationByName(0,"tutorial");j.time=j.animationEnd,F.updateMethod=G.ba$.Spine,B.content.addChild(F);const H=it.N.getAllTowerData(),V=Q.U.progressData.step===q.B.Guardian5Defeated?5:Q.U.getCurrentGuardianIndex();for(let G=0;G<5;G++){const F=H[nt.TOWER_DATA_INDEX_BY_GUARDIAN_INDEX[G]];if(Y.q.instance.prodigy.world.getZone(z.A_.ACADEMY).getKeystoneState(F.keystone.zone)===it.s.Placed){const j=k.add.spine(F.keystone.x,F.keystone.y,W.Q.Spine_academygh_addkeystone_json),H=(null===(U=B.screenData)||void 0===U?void 0:U.guardianJustDefeated)&&V===G+1,q=`keystone-${V>G?"active-":""}idle-${F.keystone.zone}`;if(j.setToSetupPose(),H){const U=k.add.spine(F.keystone.x,F.keystone.y,W.Q.Spine_circle_bloom_1_json);U.alpha=0,U.setAnimationByName(0,"animation",!0),B.above.add(U);const G=Y.q.instance.game.add.tween(U,this).to({alpha:1},450,null,!1).to({alpha:1},750,null,!1).to({alpha:0},900,null,!1),H=()=>{Y.q.instance.prodigy.audio.playSFXFromGUID($.B.Sfx_academy_keystone_activation_sheen)};G.onStart.addOnce(H),j.onStart.addOnce((()=>{G.start()})),j.setAnimationByName(0,`keystone-activate-${F.keystone.zone}`,!1),j.addAnimationByName(0,q,!0)}else j.setAnimationByName(0,q,!0);B.above.add(j)}}F.setToSetupPose()}playMissedPuppetMasterGearSequence(){return(0,F.sH)(this,void 0,void 0,(function*(){try{const k=Y.q.instance.prodigy.gameContainer.get("d0e-64fd"),B=(yield k.loadWithDependenciesFromGUID(H.l.EndgameIllustrationPuppetMasterDefeat)).findComponentInChildren(et.V);yield B.onComplete.asPromise()}catch(e){G.RQr.logError(e,"Error showing story panels")}const k={};yield new Promise((B=>{Q.U.awardMissedPuppetMasterGear(),Y.q.instance.game.broadcaster.addAppListener("Prodigy.Events.Endgame.MISSED_PUPPET_MASTER_GEAR_AWARDED",(()=>B()),k)})),Y.q.instance.game.broadcaster.removeAppListener("Prodigy.Events.Endgame.MISSED_PUPPET_MASTER_GEAR_AWARDED",k),this.zone.playScene("endgamePostPuppetMaster")}))}}nt.TOWER_DATA_INDEX_BY_GUARDIAN_INDEX=[0,1,3,4,2]},10213:(k,B,U)=>{"use strict";U.d(B,{z:()=>$});var F=U(28029),G=U(93867),j=U(83726);class $ extends j.T{setup(k,B,U={}){super.setup(k,B,U),G.U.shouldShowPuppetMasterDefeatCelebration()&&F.E.addConfetti(B.foregroundGameObject)}}},64544:(k,B,U)=>{"use strict";U.d(B,{w:()=>H});var F=U(8674),G=U(62459),j=U(35120),$=U(28152);let H=class extends G.uAl{create(){super.create();{const k=j.q.instance.prodigy.world.getCurrentZone();this._towerZone=j.q.instance.prodigy.world.getZone(k);const B=j.q.instance.prodigy.world.getCurrentMap().split("-")[1];this._currentMap=this._towerZone.getMap(B)}}getCurrentFloor(){return this._towerZone.CurrentFloor}getNextFloor(){return this._towerZone.CurrentFloor+1}getElement(){return this._towerZone.Element}getBattlesWon(){return this._towerZone.monstersDefeated}getTotalBattles(){return this._towerZone.goalTotal}getCurrentTowerMap(){return this._currentMap}getCurrentTowerZone(){return this._towerZone}getCurrentTowerMaxFloor(){return this._towerZone.TotalFloors}getWardenSaved(){return this._towerZone.isWardenSaved}destroy(){this._towerZone=null,this._currentMap=null,super.destroy()}};H=(0,F.Cg)([(0,G.EVk)("AcademyTowerDataProvider",$.Y.academy)],H)},90029:(k,B,U)=>{"use strict";U.d(B,{l:()=>W});var F=U(8674),G=U(62459),j=U(35120),$=U(28152),H=U(17331),V=U(64544);let W=class extends G.uAl{create(){super.create(),this._towerZone=this._academyTowerDataProvider.getCurrentTowerZone(),this._currentMap=this._academyTowerDataProvider.getCurrentTowerMap()}destroy(){this._currentMap=null,this._towerZone=null,super.destroy()}setCallbacks(k,B,U){this._gotoNextFloor=B,this._gotoCommonRoom=k,this._exitElevator=U}goToNextFloor(){this._gotoNextFloor?this._gotoNextFloor(this._currentMap):(this.onFloorExit(),this._currentMap.dungeonZone.enterDungeon()),this._rootGameObject.destroy()}goToCommonRoom(){this._gotoCommonRoom?this._gotoCommonRoom(this._currentMap):(this.onFloorExit(),j.q.instance.prodigy.world.it(this._towerZone.commonRoom)),this._rootGameObject.destroy()}exitElevator(){var k;this._exitElevator?this._exitElevator():null===(k=this._elevator)||void 0===k||k.exit(),this._rootGameObject.destroy()}onFloorExit(){this._towerZone.monstersDefeated===this._towerZone.goalTotal&&(this._towerZone.setFloor(this._towerZone.CurrentFloor,!0),this._towerZone.sendSegmentEvent("Tower Floor Completed"))}};(0,F.Cg)([(0,G.MnK)(H.H),(0,F.Sn)("design:type",H.H)],W.prototype,"_elevator",void 0),(0,F.Cg)([(0,G.MnK)(V.w),(0,F.Sn)("design:type",V.w)],W.prototype,"_academyTowerDataProvider",void 0),(0,F.Cg)([(0,G.ERr)(),(0,F.Sn)("design:type",G._mx)],W.prototype,"_rootGameObject",void 0),(0,F.Cg)([(0,G.DTs)(),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[Function,Function,Function]),(0,F.Sn)("design:returntype",void 0)],W.prototype,"setCallbacks",null),(0,F.Cg)([(0,G.DTs)(),(0,F.Sn)("design:type",Function),(0,F.Sn)("design:paramtypes",[]),(0,F.Sn)("design:returntype",void 0)],W.prototype,"onFloorExit",null),W=(0,F.Cg)([(0,G.EVk)("ExitTowerFloor",$.Y.academy)],W)},21922:(k,B,U)=>{"use strict";U.d(B,{u:()=>W});var F=U(8674),G=U(62459),j=U(28152),$=U(74846),H=U(44094),V=U(64544);let W=class extends G.uAl{constructor(){super(...arguments),this._uiSpineAnimatonClip=[],this._enemyDefeatedFillVisual=[]}postCreate(){super.postCreate(),this.resetVisuals()}resetVisuals(){for(let k=0;k=B)this._completionFill.active=!0,this.updateFloorCompleteText();else for(let U=0;U=this._academyTowerDataProvider.getTotalBattles())this._uiSpineAnimatonClip[1].play();else for(let B=0;B{"use strict";U.d(B,{M:()=>V});var F=U(88022),G=U(51742),j=U(56942),$=U(28930),H=U(71802);class V extends H.D{constructor(k,B,U){super(k,"map","MAP_ACADEMY_ARCHIVES",640,280,B.concat([G.c.Sfx_academy_portal_open,j.Q.Spine_archive_door_glow_json,F._.Popup_ui_roulette_json]),U,"map-archives"),this.doorways=[{area:{x:640,y:160},exit:{x:640,y:560},walkTarget:{x:640,y:220},glowPos:{x:640,y:155},glowAnimation:"front-glow"},{area:{x:1180,y:400},exit:{x:180,y:420},walkTarget:{x:1135,y:430},glowPos:{x:1160,y:395},glowAnimation:"side-2-glow",isGlowFlipped:!0},{area:{x:640,y:640},exit:{x:640,y:280},walkTarget:{x:640,y:595},glowPos:{x:640,y:595},glowAnimation:"bottom-glow"},{area:{x:100,y:400},exit:{x:1100,y:420},walkTarget:{x:140,y:430},glowPos:{x:120,y:395},glowAnimation:"side-2-glow"}],this.counterUI=50}setup(k,B,U){super.setup(k,B,U),this.dungeonZone.goalCollected===this.dungeonZone.goalTotal&&this.guideToExit(1)}updateHUDCounter(){super.updateHUDCounter(),this.dungeonZone.goalCollected===this.dungeonZone.goalTotal&&this.guideToExit(1)}addDoorGlow(k,B){if(super.addDoorGlow(k,B),k===$.O.North){const k=this.game.add.spine(B.glowPos.x,B.glowPos.y,j.Q.Spine_archive_door_glow_json);k.setToSetupPose(),k.setAnimationByName(0,"front-light",!0),this.screen.content.addChild(k)}}}},31478:(k,B,U)=>{"use strict";U.d(B,{k:()=>$});var F=U(42448),G=U(90633),j=U(35120);function $(){var k,B,U,$,H,V;const W=j.q.instance.prodigy.gameContainer.get("61f-37d6"),[q,K,z]=[null!==(B=null===(k=W.get({type:"riftRunKey",id:F.BN.PortalOneKey}))||void 0===k?void 0:k.quantity)&&void 0!==B?B:0,null!==($=null===(U=W.get({type:"riftRunKey",id:F.BN.PortalTwoKey}))||void 0===U?void 0:U.quantity)&&void 0!==$?$:0,null!==(V=null===(H=W.get({type:"riftRunKey",id:F.BN.PortalThreeKey}))||void 0===H?void 0:H.quantity)&&void 0!==V?V:0],Y=Math.max(q,K,z)>0,Q=j.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(G.B.FEATURE_ZONE_UNLOCKED_POPUP,G.B.BREADCRUMB_ZONE_UNLOCKED_ANIM_DRAGON_ISLE);return Y||Q?Q?2:1:0}},97447:(k,B,U)=>{"use strict";U.d(B,{j:()=>ut});var F=U(8674),G=U(62459),j=U(99625),$=U(56942),H=U(42448),V=U(4903),W=U(90633),q=U(38170),K=U(35120),z=U(34829);const Y={PORTAL_SPINE:$.Q.Spine_rift_portal_basic_json,SHOW_TIMER:!1};var Q=U(72955),X=U(3374),Z=U(35084),J=U(29834),tt=U(23082),et=U(46784),it=U(65050),st=U(70703),nt=U(65165),at=U(95057),rt=U(53661),ot=U(80882),ht=U(84415),ct=U(30226),dt=U(4631),lt=U(83726);class ut extends lt.T{constructor(k,B){super(k,"A1","DRAGON_ISLE_MAP",ut.PLAYER_SPAWN_LOCATION_X,ut.PLAYER_SPAWN_LOCATION_Y,[],B.concat([j.l.RiftRunPortal,j.l.Overlay_difficulty_hard,j.l.Overlay_difficulty_expert])),this.portalTimeouts=[]}cleanup(){this.portalTimeouts.forEach((k=>window.clearTimeout(k))),this.portalTimeouts.length=0,super.cleanup()}setup(){var k;let B=!1;(null===(k=this.screen.screenData)||void 0===k?void 0:k[ut.SHOW_PORTAL_GUIDE_HAND])&&(B=!0),K.q.instance.prodigy.breadcrumbManager.isBreadcrumbComplete(W.B.FEATURE_RIFTS,W.B.BREADCRUMB_RIFTS_AFTER_FIRST_CUTSCENE_SEEN)||(B=!0),(()=>(0,F.sH)(this,void 0,void 0,(function*(){var k,U;const j=K.q.instance.prodigy.gameContainer.get("196-d3a5"),$=yield j.fetchRiftsConfig();if(!$){const k=K.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService);return void K.q.instance.prodigy.open.messageBoxOkay(k.getText(ut.FAILED_DATA_LOAD_LOCALIZED_TEXT_KEY))}(null!==(k=(U=K.q.instance.prodigy.gameContainer.get("e20-0fb0").player.data).rifts)&&void 0!==k?k:U.rifts={}).dragonIsleNotificationLastSeenTimestampMs=Date.now();const H=yield this.getActivePortals($),V=B?[H[0]]:H,W=K.q.instance.prodigy.prefabFactory,q=V.map((k=>(0,F.sH)(this,void 0,void 0,(function*(){var U;const F=[];F.push(this.addPortal(k)),(null===(U=$[k.id])||void 0===U?void 0:U.storeEnabled)&&!B&&F.push(W.addPrefabNPC(k.shopNpcPrefab,k.shopNpcLocation.x,k.shopNpcLocation.y));const G=(yield Promise.all(F))[0];B&&this.addGuideHand(this.game,this.screen,G.transform.worldPosition.x,G.transform.worldPosition.y-80,0,20,180)}))));yield Promise.all(q)})))().catch(G.RQr.createHandler("DragonIsleA1: Failed to set up dragon isle"))}addPortal(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=K.q.instance.prodigy.gameContainer.get("196-d3a5");let U;const F=k.spine&&Object.values($.Q).includes(k.spine)?k.spine:$.Q.Spine_rift_portal_basic_json;U=k.timeRemainingMs?{PORTAL_SPINE:F,SHOW_TIMER:!0,TIME_REMAINING_MS:k.timeRemainingMs}:{PORTAL_SPINE:F,SHOW_TIMER:!1};const G=yield ut.addPortalToScreen(this.screen,k.location.x,k.location.y,!0,U);G.name=k.id,ut.portalGameObjects[k.id]=G;const j=G.findComponentInChildren(Z.n),H=G.findComponentInChildren(nt.k);return G.findComponentInChildren(st.x).onComplete.add((()=>{H.onComplete.add(this.interactWithPortal.bind(this,B,k)),j.useHandCursor=!0,j.onClicked.add((()=>{H.run()}))})),G}))}interactWithPortal(k,B){var U;k.selectedPortalId=B.id;const F=K.q.instance.prodigy.gameContainer.get("e20-0fb0"),j=F.player.hasMembership(),$=F.player.isPlayingAtSchool()||ct.J.isDateWithinSchoolDayAndHours(new Date(Date.now())),H=this.getVideoType(j,$);this.shouldShowMemberLockedRiftsVideo(H,j,k,F.player)?this.showVideoMenu(H,j,$,null!==(U=k.getCurrentRiftsId())&&void 0!==U?U:"",(()=>{this.zone.handleLeaving(dt.j.teleport,(()=>K.q.instance.game.state.start(tt.G.Rifts,void 0,Q.I,B.id)))})).catch(G.RQr.createHandler("Error setting up rift selection menu after showing video")):this.zone.handleLeaving(dt.j.teleport,(()=>K.q.instance.game.state.start(tt.G.Rifts,void 0,Q.I,B.id)))}static addPortalToScreen(k,B,U){return(0,F.sH)(this,arguments,void 0,(function*(k,B,U,F=!1,G=Y){const $=yield k.addPrefabToScreen(j.l.RiftRunPortal,B,U,G),H=$.findComponentInChildren(st.x),V=$.findComponentInChildren(J.j);if(F){const k=2e3;H.startTween(1,0,void 0,k),V.OnAnimationComplete.addOnce((()=>{$.transform.setScale(1,1),V.playAnimation("idle",!0);const k=$.findComponentInChildren(ot.y);k&&k.fireBooleanSignalAgainstConstant()}))}else V.playAnimation("idle",!0);return $}))}setupTimeoutForPortalOpening(k,B,U){const F=q.r.millisecondsBetween(new Date,new Date(B));F>2*z.s.HOURS_IN_MS||this.portalTimeouts.push(window.setTimeout((()=>{U&&this.setupTimeoutForPortalClosing(k,U),this.addPortal(k).catch(G.RQr.createHandler("DragonIsleA1: Failed to open a portal after the start date has passed"))}),F))}setupTimeoutForPortalClosing(k,B){k.timeRemainingMs=B-q.r.toDateUtcMs(Date.now());q.r.millisecondsBetween(new Date,new Date(B))>2*z.s.HOURS_IN_MS||this.portalTimeouts.push(window.setTimeout((()=>{const B=ut.portalGameObjects[k.id];if(!B)return;const U=B.findComponentInChildren(G.bTj);U&&U.playAnimation()}),q.r.millisecondsBetween(new Date,new Date(B))))}getActivePortals(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=K.q.instance.prodigy.gameContainer.get("196-d3a5"),U=yield B.getActiveRiftsPortalIds();if(!G.Aq$.isDefined(U)||0===U.length)return[];const F=U.map((k=>H.R7[k]));for(const G of F){const B=k[G.id];B&&(B.spine&&(G.spine=B.spine),B.startDate||!B.endDate?B.endDate||!B.startDate?B.startDate&&B.endDate&&(q.r.isDateWithinRange(Date.now(),B.startDate,B.endDate)?this.setupTimeoutForPortalClosing(G,q.r.toDateUtcMs(B.endDate)):q.r.toDateUtcMs(Date.now()){"use strict";var F;U.d(B,{v:()=>F}),function(k){k.Q1="QUESTS_FOREST_LEVEL_UP",k.Q2="QUESTS_FOREST_FIRST_MINIBOSS_FIGHT",k.Q3="QUESTS_FOREST_SECOND_MINIBOSS_FIGHT",k.Q4="QUESTS_FOREST_FIND_FLORIAN",k.Q5="QUESTS_FOREST_TALK_TO_MERCHANT",k.Q6="QUESTS_FOREST_SAVE_FLORIAN",k.Q7="QUESTS_FOREST_COLLECT_MANDRAKE",k.Q8="QUESTS_FOREST_DEFEAT_THE_TRIO",k.Q9="QUESTS_FOREST_FIND_GERALD",k.Q10="QUESTS_FOREST_FIX_FLUTE",k.Q11="QUESTS_FOREST_COLLECT_WAND",k.Q12="QUESTS_FOREST_WAKE_GERALD"}(F||(F={}))},76711:(k,B,U)=>{"use strict";U.d(B,{c:()=>it,p:()=>F});var F,G=U(62459),j=U(99625),$=U(90633),H=U(5491),V=U(65240),W=U(35120),q=U(77938),K=U(55122),z=U(73797),Y=U(43531),Q=U(54336),X=U(40392),Z=U(22023),J=U(30226),tt=U(85182),et=U(73678);!function(k){k[k.TALK_TO_FLORIAN=0]="TALK_TO_FLORIAN",k[k.TRAVEL_TO_SHIVERCHILL=1]="TRAVEL_TO_SHIVERCHILL",k[k.TALK_TO_BOK=2]="TALK_TO_BOK"}(F||(F={}));class it extends tt.T{constructor(k,B,U){super(k,B,it.QUEST_INDEX,"Go to Shiverchill",{type:"seq",ID:1,N:3},["forest-B6","shiverchill-A10"],[],[],[],U,!1,"QUESTS_FOREST_GO_TO_SHIVERCHIL"),this._isDialogueShowing=!1}setup(k,B,U){return super.setup(k,B,U),W.q.instance.prodigy.world.getCurrentZone()===et.A_.SHIVERCHILL?(this.unlockShiverchill(),this.showBokDialogue(),{enableAreaEvents:!1}):(this.zone.isSequenceComplete(it.QUEST_INDEX,F.TALK_TO_FLORIAN)&&this.unlockShiverchill(),U.getTag()===it.DIALOGUE_MAP_TAG?(W.q.instance.prodigy.prefabFactory.addPrefabNPC(j.l.FloraNPC,800,330,!0).catch(G.RQr.createHandler(`Unable to load the NPC Prefab: ${j.l.FloraNPC}`)),W.q.instance.prodigy.prefabFactory.addPrefabNPC(j.l.FlorianNPCLegacyMaps,700,320).catch(G.RQr.createHandler(`Unable to load the NPC Prefab: ${j.l.FlorianNPCLegacyMaps}`)),{enableMonsters:!1,enableAreaEvents:!1}):{enableMonsters:!1})}process(k,B,U){this.screen=B,this._playerData=W.q.instance.prodigy.gameContainer.get("e20-0fb0"),U.tag===it.DIALOGUE_MAP_TAG&&(this.zone.isOnSequence(it.QUEST_INDEX,F.TALK_TO_FLORIAN)?this.showFlorianDialogue():this.zone.isOnSequence(it.QUEST_INDEX,F.TRAVEL_TO_SHIVERCHILL)&&B.menuBarCreationPromise.then((()=>this.highlightWorldMap())).catch(G.RQr.createHandler("The menu bar could not be loaded"))),W.q.instance.prodigy.world.getCurrentZone()===et.A_.SHIVERCHILL&&this._playerData.player.playerContainer.setPath([{x:326,y:650}],(()=>this._playerData.player.playerContainer.setPath([{x:426,y:500}])))}unlockShiverchill(){X.i.BUTTONS_CONFIG.map((k=>k.nameKey)).filter((k=>!it.ENABLED_ZONE_IDS.includes(k)));W.q.instance.prodigy.gameContainer.get("12f-4e29").completeBreadcrumb($.B.FEATURE_FIREFLY_QUEST_REVISIONS,$.B.BREADCRUMB_SHIVERCHILL_UNLOCKED)}showFlorianDialogue(){if(this._isDialogueShowing)return;const k=W.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),B=new Y.rD(W.q.instance.prodigy.game),U=[1395,1396].map((k=>({dialogueData:B.dataProvider.get(k),blockInput:!0})));U[U.length-1].nextButtonText=k.getText("BUTTON_LETS_GO"),B.addEvents(U),B.start(!0,(()=>{this.zone.completeSequence(it.QUEST_INDEX,F.TALK_TO_FLORIAN),this.unlockShiverchill(),this.highlightWorldMap()})),this._isDialogueShowing=!0}highlightWorldMap(){W.q.instance.game.broadcaster.broadcast(z.Y1.HighlightMapButton,z.HG.HUD),X.i.setNextVisitParameters({disableClose:!0,disableZoneGoals:!0,disableDifficultyModeSelect:!0})}showBokDialogue(){let k;W.q.instance.prodigy.prefabFactory.addMonster(this.map,520,410,0,{encounter:[{ID:it.PET_AWARD_ID}],showNewIndicator:!1}).then((B=>{k=B,B.findComponentInChildren(Q.s).Active=!1})).catch(G.RQr.createHandler("Could not catch monster"));const B=W.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService),U=new Y.rD(W.q.instance.prodigy.game),F=[1397,1398,1399].map((k=>({dialogueData:U.dataProvider.get(k),blockInput:!0})));F[F.length-1].nextButtonText=B.getText("BUTTON_GET_GIFT"),U.addEvents(F),U.start(!0,(()=>{k&&(k.active=!1),this.awardPet()}))}awardPet(){const k=it.PET_AWARD_ID,B=this._playerData.getLevel(),U=q.t.getItem("pet",k),F={type:"pet",ID:k,N:1,data:{level:B,stars:K.s.xpRequiredForLevel(B,H.V.Pet)}},G={ID:k,name:U.name,level:B};W.q.instance.prodigy.open.prefabMenu(j.l.PetRescueCardSequence,(()=>{J.J.bagItem(F,W.q.instance.game,"got-pet",void 0,{source_type:V.C.QuestReward}),this.autoEquipPet(k),this.zone.completeQuest(it.QUEST_INDEX),this.screen.process()}),void 0,void 0,void 0,{PET_RESCUE_CREATURE_DATA:G,PET_RESCUE_BUTTON_TEXT_KEY:"EPIC_VIEWER_ADD_TO_TEAM",PET_RESCUE_STAMP_ENABLED:!1})}autoEquipPet(k){const B=this._playerData.player.kennel.getPetTeamIDs();if(!B.includes(k)){const U=Z.P8.isPetEvolvedStarter(B[1])?1:2,F=this._playerData.player.kennel.getPetByID(k);this._playerData.player.kennel.removeAtTeamPosition(U),this._playerData.player.kennel.setTeamPosition(F,U)}}}it.DIALOGUE_MAP_TAG="B6",it.QUEST_INDEX=5,it.PET_AWARD_ID=79,it.ENABLED_ZONE_IDS=["WORLD_FIREFLY_FOREST","WORLD_SHIVERCHILL_MOUNTAINS"]},46318:(k,B,U)=>{"use strict";U.d(B,{Q:()=>dt});var F=U(8674),G=U(62459),j=U(95891),$=U(68910),H=U(88022),V=U(62886),W=U(60157),q=U(17446),K=U(65240),z=U(35120),Y=U(34829),Q=U(43846),X=U(77938),Z=U(73797),J=U(43531),tt=U(23283),et=U(64353),it=U(95057),st=U(21097),nt=U(95130),at=U(17425),rt=U(76945),ot=U(30226),ht=U(47255),ct=U(71586);class dt extends nt.D{constructor(k,B,U,F,j,$=-55,V,W=!1){if(super(k,B),this.soundTimeoutInterval=null,this.onClose=null,this.numSpins=0,this.player=U,this.screen=F,this.assetID=j,this.data=X.t.getItem("prizeWheel",j).data,this.onClose=V,G.Aq$.isDefined(this.screen)&&(this.wasVisible=G.Aq$.isDefined(this.screen.questProgress)&&this.screen.questProgress.visible,this.wasVisible&&(this.screen.questProgress.visible=!1)),this.wheelItems=dt.getWheelItems(this.game,this.assetID),!W){const k=z.q.instance.prodigy.create.sprite(0,0,H._.General_core_json,"overlay-small");k.width=this.game.world.width,k.height=this.game.world.height,k.alpha=.5,this.add(k),k.inputEnabled=!0}this.drawWheel($).catch(G.RQr.createHandler("Wheel: Failed to draw the wheel"))}drawWheel(k){return(0,F.sH)(this,void 0,void 0,(function*(){const B=.5*this.game.world.width,U=.5*this.game.world.height+k;let F=null;F="singleImage"===this.data.atlas?this.add(z.q.instance.prodigy.create.sprite(B+this.data.wheelTopOffset.x,U+this.data.wheelTopOffset.y,`singleImage-${this.data.wheelTop}`)):this.add(z.q.instance.prodigy.create.sprite(B+this.data.wheelTopOffset.x,U+this.data.wheelTopOffset.y,this.data.atlas,this.data.wheelTop)),F.anchor.set(.5,.5);const j=360/this.wheelItems.length;this.wheel=z.q.instance.prodigy.create.element(this,B,U),this.wheel.angle=j/2;const H=this.wheel.angle;let V=null;"singleImage"===this.data.atlas?(V=this.wheel.add(z.q.instance.prodigy.create.sprite(0,0,`singleImage-${this.data.wheelSprite}`)),at.K.cacheAsset(this.game,`singleImage-${this.data.wheelSprite}`,at.K.zoneAssetsCached)):(V=this.wheel.add(z.q.instance.prodigy.create.sprite(0,0,this.data.atlas,this.data.wheelSprite)),V.scale.set(1,1)),V.anchor.set(.5,.5);for(let k=0;k0&&(k={conversionFunnelName:ht.o.FunnelSecondWheelSpin}),this.player.canSpin(this.assetID)?(this.showSpinningDialogue(),this.startSpin()):this.checkTickets(this.assetID)?this.consumeTicket(this.assetID):this.showOutOfSpinsDialogue(k)}close(){this.wasVisible&&(this.screen.questProgress.visible=!0),z.q.instance.game.broadcaster.broadcast(Z.Y1.ShowHUD,Z.HG.HUD),G.Aq$.isDefined(this.onClose)&&this.onClose(),this.destroy()}startSpin(){var k,B,U;let F=Y.s.get("GameConstants.Features.Wheel.SPIN_TIME");const j=G.Aq$.isDefined(this.selectedIndex)?this.selectedIndex:0;this.selectedIndex=this.wheelItems.indexOf(rt.o.weightedArrayElement(this.wheelItems));const $=this.wheelItems[this.selectedIndex].item,H=z.q.instance.prodigy.gameContainer.get("e20-0fb0").player;G.Aq$.isDefined(this.data.maxedItemPrizeSubstitute)&&H.hasMaxQuantityOfItem($.type,$.ID)&&(this.selectedIndex=this.data.maxedItemPrizeSubstitute),this.playSound(F,100);const V=360/this.wheelItems.length,W=this.wheel.angle+2880+(this.selectedIndex-j)*-V;this.game.add.tween(this.wheel,this).to({angle:W},F,G.GS3.Cubic.Out).start().onTweenComplete.addOnce(this.endSpin,this),this.player.spinWheel(this.assetID),this.sendSpinWheelQuestEvent();const q=z.q.instance.prodigy.gameContainer.get("c47-20b6"),K=z.q.instance.prodigy.gameContainer.get("12b-405a");if(K.getActiveFestival()){const F=z.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily,G=F.getFestivalInstanceName(),j=F.festivalType;this.wheelName=null===(B=null===(k=K.getFestivalConfig())||void 0===k?void 0:k.festivalPrizeWheels.find((k=>k.wheelId===this.assetID)))||void 0===B?void 0:B.name,q.festival.sendFestivalPrizeWheelSpunEvent(null!==(U=this.wheelName)&&void 0!==U?U:this.assetID.toString(),this.assetID,G,j,this.numSpins>0)}else q.economy.sendPrizeWheelSpunEvent(this.assetID===dt.DAYTIME_WHEEL?tt.U.WheelOfWonder:tt.U.TwilightWheel)}playSound(k,B){if(k<=0)return;z.q.instance.prodigy.audio.playSFX(19,"tick");const U=B+9e-7*Math.pow(B,3);this.soundTimeoutInterval=window.setTimeout(this.playSound.bind(this,k-U,U),B)}endSpin(){this.numSpins++,this.closeSpinDialogue(),this.openPrizesDialogue([this.wheelItems[this.selectedIndex].item],this.data.eventType)}tryAgain(){const k={yes:this.trySpin.bind(this),no:this.close.bind(this),text:z.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(this.checkTickets(this.assetID)&&!this.player.canSpin(this.assetID)?this.data.ticketDialogue:this.data.spinAgainDialogue),anim:4};this.showDialogue([k])}destroy(k={children:!0}){this.player=null,super.destroy(k),null!==this.soundTimeoutInterval&&(clearTimeout(this.soundTimeoutInterval),this.soundTimeoutInterval=null)}showSpinningDialogue(){const k={text:z.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(this.data.spinningDialogue),anim:4,hideNext:!0};this.showDialogue([k])}closeSpinDialogue(){this.dialogueController.close()}showOutOfSpinsDialogue(k){const B=z.q.instance.prodigy.gameContainer,U=B.get("c47-20b6"),F=[];F.push({text:B.get(G.$Bt.LocalizationService).getText(this.data.outOfSpinsDialogue),anim:1});const j=B.get("e20-0fb0").player;if(!this.player.hasMembership()&&!ot.J.shouldSuppressAd(j)){F.push({callback:z.q.instance.prodigy.open.membershipInfo.bind(z.q.instance.prodigy.open,null,k)});const U=et.P.shouldUseUnifiedConversionFlow(ht.o.FunnelSecondWheelSpin)?it.R.UnifiedConversionFlow:ot.J.showYouTubeMembershipAd(this.game,!0)?it.R.Video:it.R.Static;B.get("c47-20b6").purchase.sendFunnelStart(Object.assign(Object.assign({},this.getSegmentPurchaseFunnelTriggerTypeAndCategory()),{contentId:`prizeWheel-${this.assetID}`,adType:U,adVersion:et.P.getAdVersion(ht.o.FunnelSecondWheelSpin)}))}F.push({callback:this.close.bind(this)}),U.economy.sendPrizeWheelSpinFailedEvent(this.assetID===dt.DAYTIME_WHEEL?tt.U.WheelOfWonder:tt.U.TwilightWheel,this.player.hasMembership()?st.WE.OutsideOfHours:st.WE.MemberLocked),this.showDialogue(F)}getSegmentPurchaseFunnelTriggerTypeAndCategory(){return{type:"Second-Daily-Wheel-Spin",category:"Daily"}}openPrizesDialogue(k,B){const U=z.q.instance.prodigy.open.gotItem(k,this.tryAgain.bind(this),null,B,null,null,{source_type:K.C.PrizeWheel});U.setParent(this),U.dialogue.setParent(U)}checkTickets(k){if(1===k){return z.q.instance.prodigy.gameContainer.get("e20-0fb0").player.backpack.hasItem("item",130)>0}return!1}consumeTicket(k){1===k&&this.player.backpack.consume("item",130,1);const B={text:z.q.instance.prodigy.gameContainer.get(G.$Bt.LocalizationService).getText(this.data.spinningDialogue),anim:4,hideNext:!0};this.showDialogue([B]),this.startSpin()}sendSpinWheelQuestEvent(){const k=z.q.instance.prodigy.gameContainer.get("a25-68f4"),B={params:{taskEventType:W.Z7.Item,rarity:q.E.Common,itemType:"prizeWheel",source:K.C.PrizeWheel,id:this.assetID}};k.sendQuestEventViaHub(V.T.SPIN_WHEEL,B).catch(G.RQr.createHandler("Error sending a quest event for spinning a wheel"))}generateFestivalWheelCountdownText(k){const B=z.q.instance.prodigy.gameContainer.get("e20-0fb0").player.daily,U=k.getFestivalConfig(),F=k.getActiveFestival();let j=0;if(U&&F&&B.currentWheelEndDate){const k=z.q.instance.prodigy.gameContainer.get("a03-308f");let U=new Date(B.currentWheelEndDate);const G=new Date(F.endDate);U>G&&(U=G),j=Math.floor((U.getTime()-k.getServerTimeMs())/864e5),0===j&&(j=1)}const H=new $.TextStyle({fontFamily:G.dBt.PaytoneOne,fontSize:32,fill:16777215,fontWeight:"bold",stroke:3552822,strokeThickness:4,align:"center"});return new $.Text((0,Q.k)("WHEEL_TIME_REMAINING",j,1===j?"":"s"),H)}}dt.DEBUG_SPIN_TIME_MS=-1,dt.DAYTIME_WHEEL=1},8674:(k,B,U)=>{"use strict";U.d(B,{Cg:()=>G,Qj:()=>j,Sn:()=>$,Tt:()=>F,sH:()=>H});function F(k,B){var U={};for(var F in k)Object.prototype.hasOwnProperty.call(k,F)&&B.indexOf(F)<0&&(U[F]=k[F]);if(null!=k&&"function"==typeof Object.getOwnPropertySymbols){var G=0;for(F=Object.getOwnPropertySymbols(k);G=0;H--)(G=k[H])&&($=(j<3?G($):j>3?G(B,U,$):G(B,U))||$);return j>3&&$&&Object.defineProperty(B,U,$),$}function j(k,B){return function(U,F){B(U,F,k)}}function $(k,B){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,B)}function H(k,B,U,F){return new(U||(U=Promise))((function(G,j){function $(k){try{V(F.next(k))}catch(e){j(e)}}function H(k){try{V(F.throw(k))}catch(e){j(e)}}function V(k){var B;k.done?G(k.value):(B=k.value,B instanceof U?B:new U((function(k){k(B)}))).then($,H)}V((F=F.apply(k,B||[])).next())}))}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError},20748:(k,B)=>{"use strict";function U(k,B,U,F){var G={timer:void 0,lastArgs:[]},j=function(){for(var F=this,j=[],$=0;$1&&"object"==typeof k[1]&&void 0!==k[1].leading&&(G=k[1]),G&&(F=G.leading),function(){for(var k=[],B=0;B{"use strict"},88835:(k,B,U)=>{"use strict";var F=U(9655);function G(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var j=/^([a-z0-9.+-]+:)/i,$=/:[0-9]*$/,H=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,V=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),W=["'"].concat(V),q=["%","/","?",";","#"].concat(W),K=["/","?","#"],z=/^[+a-z0-9A-Z_-]{0,63}$/,Y=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Q={javascript:!0,"javascript:":!0},X={javascript:!0,"javascript:":!0},Z={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},J=U(55373);function tt(k,B,U){if(k&&"object"==typeof k&&k instanceof G)return k;var F=new G;return F.parse(k,B,U),F}G.prototype.parse=function(k,B,U){if("string"!=typeof k)throw new TypeError("Parameter 'url' must be a string, not "+typeof k);var G=k.indexOf("?"),$=-1!==G&&G127?bt+="x":bt+=ft[pt];if(!bt.match(z)){var gt=lt.slice(0,ht),mt=lt.slice(ht+1),yt=ft.match(Y);yt&&(gt.push(yt[1]),mt.unshift(yt[2])),mt.length&&(tt="/"+mt.join(".")+tt),this.hostname=gt.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),dt||(this.hostname=F.toASCII(this.hostname));var _t=this.port?":"+this.port:"",Et=this.hostname||"";this.host=Et+_t,this.href+=this.host,dt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==tt[0]&&(tt="/"+tt))}if(!Q[st])for(ht=0,ut=W.length;ht0)&&U.host.split("@"))&&(U.auth=dt.shift(),U.hostname=dt.shift(),U.host=U.hostname);return U.search=k.search,U.query=k.query,null===U.pathname&&null===U.search||(U.path=(U.pathname?U.pathname:"")+(U.search?U.search:"")),U.href=U.format(),U}if(!nt.length)return U.pathname=null,U.search?U.path="/"+U.search:U.path=null,U.href=U.format(),U;for(var rt=nt.slice(-1)[0],ot=(U.host||k.host||nt.length>1)&&("."===rt||".."===rt)||""===rt,ht=0,ct=nt.length;ct>=0;ct--)"."===(rt=nt[ct])?nt.splice(ct,1):".."===rt?(nt.splice(ct,1),ht++):ht&&(nt.splice(ct,1),ht--);if(!it&&!st)for(;ht--;ht)nt.unshift("..");!it||""===nt[0]||nt[0]&&"/"===nt[0].charAt(0)||nt.unshift(""),ot&&"/"!==nt.join("/").substr(-1)&&nt.push("");var dt,lt=""===nt[0]||nt[0]&&"/"===nt[0].charAt(0);at&&(U.hostname=lt?"":nt.length?nt.shift():"",U.host=U.hostname,(dt=!!(U.host&&U.host.indexOf("@")>0)&&U.host.split("@"))&&(U.auth=dt.shift(),U.hostname=dt.shift(),U.host=U.hostname));return(it=it||U.host&&nt.length)&&!lt&&nt.unshift(""),nt.length>0?U.pathname=nt.join("/"):(U.pathname=null,U.path=null),null===U.pathname&&null===U.search||(U.path=(U.pathname?U.pathname:"")+(U.search?U.search:"")),U.auth=k.auth||U.auth,U.slashes=U.slashes||k.slashes,U.href=U.format(),U},G.prototype.parseHost=function(){var k=this.host,B=$.exec(k);B&&(":"!==(B=B[0])&&(this.port=B.substr(1)),k=k.substr(0,k.length-B.length)),k&&(this.hostname=k)},B.qg=tt,B.hd=function(k,B){return tt(k,!1,!0).resolve(B)},B.GP=function(k){return"string"==typeof k&&(k=tt(k)),k instanceof G?k.format():G.prototype.format.call(k)}},81135:k=>{k.exports=function(k){return k&&"object"==typeof k&&"function"==typeof k.copy&&"function"==typeof k.fill&&"function"==typeof k.readUInt8}},49032:(k,B,U)=>{"use strict";var F=U(47244),G=U(48184),j=U(25767),$=U(35680);function H(k){return k.call.bind(k)}var V="undefined"!=typeof BigInt,W="undefined"!=typeof Symbol,q=H(Object.prototype.toString),K=H(Number.prototype.valueOf),z=H(String.prototype.valueOf),Y=H(Boolean.prototype.valueOf);if(V)var Q=H(BigInt.prototype.valueOf);if(W)var X=H(Symbol.prototype.valueOf);function Z(k,B){if("object"!=typeof k)return!1;try{return B(k),!0}catch(e){return!1}}function J(k){return"[object Map]"===q(k)}function tt(k){return"[object Set]"===q(k)}function et(k){return"[object WeakMap]"===q(k)}function it(k){return"[object WeakSet]"===q(k)}function st(k){return"[object ArrayBuffer]"===q(k)}function nt(k){return"undefined"!=typeof ArrayBuffer&&(st.working?st(k):k instanceof ArrayBuffer)}function at(k){return"[object DataView]"===q(k)}function rt(k){return"undefined"!=typeof DataView&&(at.working?at(k):k instanceof DataView)}B.isArgumentsObject=F,B.isGeneratorFunction=G,B.isTypedArray=$,B.isPromise=function(k){return"undefined"!=typeof Promise&&k instanceof Promise||null!==k&&"object"==typeof k&&"function"==typeof k.then&&"function"==typeof k.catch},B.isArrayBufferView=function(k){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(k):$(k)||rt(k)},B.isUint8Array=function(k){return"Uint8Array"===j(k)},B.isUint8ClampedArray=function(k){return"Uint8ClampedArray"===j(k)},B.isUint16Array=function(k){return"Uint16Array"===j(k)},B.isUint32Array=function(k){return"Uint32Array"===j(k)},B.isInt8Array=function(k){return"Int8Array"===j(k)},B.isInt16Array=function(k){return"Int16Array"===j(k)},B.isInt32Array=function(k){return"Int32Array"===j(k)},B.isFloat32Array=function(k){return"Float32Array"===j(k)},B.isFloat64Array=function(k){return"Float64Array"===j(k)},B.isBigInt64Array=function(k){return"BigInt64Array"===j(k)},B.isBigUint64Array=function(k){return"BigUint64Array"===j(k)},J.working="undefined"!=typeof Map&&J(new Map),B.isMap=function(k){return"undefined"!=typeof Map&&(J.working?J(k):k instanceof Map)},tt.working="undefined"!=typeof Set&&tt(new Set),B.isSet=function(k){return"undefined"!=typeof Set&&(tt.working?tt(k):k instanceof Set)},et.working="undefined"!=typeof WeakMap&&et(new WeakMap),B.isWeakMap=function(k){return"undefined"!=typeof WeakMap&&(et.working?et(k):k instanceof WeakMap)},it.working="undefined"!=typeof WeakSet&&it(new WeakSet),B.isWeakSet=function(k){return it(k)},st.working="undefined"!=typeof ArrayBuffer&&st(new ArrayBuffer),B.isArrayBuffer=nt,at.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&at(new DataView(new ArrayBuffer(1),0,1)),B.isDataView=rt;var ot="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function ht(k){return"[object SharedArrayBuffer]"===q(k)}function ct(k){return void 0!==ot&&(void 0===ht.working&&(ht.working=ht(new ot)),ht.working?ht(k):k instanceof ot)}function dt(k){return Z(k,K)}function lt(k){return Z(k,z)}function ut(k){return Z(k,Y)}function ft(k){return V&&Z(k,Q)}function bt(k){return W&&Z(k,X)}B.isSharedArrayBuffer=ct,B.isAsyncFunction=function(k){return"[object AsyncFunction]"===q(k)},B.isMapIterator=function(k){return"[object Map Iterator]"===q(k)},B.isSetIterator=function(k){return"[object Set Iterator]"===q(k)},B.isGeneratorObject=function(k){return"[object Generator]"===q(k)},B.isWebAssemblyCompiledModule=function(k){return"[object WebAssembly.Module]"===q(k)},B.isNumberObject=dt,B.isStringObject=lt,B.isBooleanObject=ut,B.isBigIntObject=ft,B.isSymbolObject=bt,B.isBoxedPrimitive=function(k){return dt(k)||lt(k)||ut(k)||ft(k)||bt(k)},B.isAnyArrayBuffer=function(k){return"undefined"!=typeof Uint8Array&&(nt(k)||ct(k))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(k){Object.defineProperty(B,k,{enumerable:!1,value:function(){throw new Error(k+" is not supported in userland")}})}))},40537:(k,B,U)=>{var F=Object.getOwnPropertyDescriptors||function(k){for(var B=Object.keys(k),U={},F=0;F=j)return k;switch(k){case"%s":return String(F[U++]);case"%d":return Number(F[U++]);case"%j":try{return JSON.stringify(F[U++])}catch(B){return"[Circular]"}default:return k}})),H=F[U];U=3&&(F.depth=arguments[2]),arguments.length>=4&&(F.colors=arguments[3]),X(U)?F.showHidden=U:U&&B._extend(F,U),et(F.showHidden)&&(F.showHidden=!1),et(F.depth)&&(F.depth=2),et(F.colors)&&(F.colors=!1),et(F.customInspect)&&(F.customInspect=!0),F.colors&&(F.stylize=W),K(F,k,F.depth)}function W(k,B){var U=V.styles[B];return U?"["+V.colors[U][0]+"m"+k+"["+V.colors[U][1]+"m":k}function q(k,B){return k}function K(k,U,F){if(k.customInspect&&U&&rt(U.inspect)&&U.inspect!==B.inspect&&(!U.constructor||U.constructor.prototype!==U)){var G=U.inspect(F,k);return tt(G)||(G=K(k,G,F)),G}var j=function(k,B){if(et(B))return k.stylize("undefined","undefined");if(tt(B)){var U="'"+JSON.stringify(B).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return k.stylize(U,"string")}if(J(B))return k.stylize(""+B,"number");if(X(B))return k.stylize(""+B,"boolean");if(Z(B))return k.stylize("null","null")}(k,U);if(j)return j;var $=Object.keys(U),H=function(k){var B={};return k.forEach((function(k,U){B[k]=!0})),B}($);if(k.showHidden&&($=Object.getOwnPropertyNames(U)),at(U)&&($.indexOf("message")>=0||$.indexOf("description")>=0))return z(U);if(0===$.length){if(rt(U)){var V=U.name?": "+U.name:"";return k.stylize("[Function"+V+"]","special")}if(it(U))return k.stylize(RegExp.prototype.toString.call(U),"regexp");if(nt(U))return k.stylize(Date.prototype.toString.call(U),"date");if(at(U))return z(U)}var W,q="",st=!1,ot=["{","}"];(Q(U)&&(st=!0,ot=["[","]"]),rt(U))&&(q=" [Function"+(U.name?": "+U.name:"")+"]");return it(U)&&(q=" "+RegExp.prototype.toString.call(U)),nt(U)&&(q=" "+Date.prototype.toUTCString.call(U)),at(U)&&(q=" "+z(U)),0!==$.length||st&&0!=U.length?F<0?it(U)?k.stylize(RegExp.prototype.toString.call(U),"regexp"):k.stylize("[Object]","special"):(k.seen.push(U),W=st?function(k,B,U,F,G){for(var j=[],$=0,H=B.length;$=0&&0,k+B.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return U[0]+(""===B?"":B+"\n ")+" "+k.join(",\n ")+" "+U[1];return U[0]+B+" "+k.join(", ")+" "+U[1]}(W,q,ot)):ot[0]+q+ot[1]}function z(k){return"["+Error.prototype.toString.call(k)+"]"}function Y(k,B,U,F,G,j){var $,H,V;if((V=Object.getOwnPropertyDescriptor(B,G)||{value:B[G]}).get?H=V.set?k.stylize("[Getter/Setter]","special"):k.stylize("[Getter]","special"):V.set&&(H=k.stylize("[Setter]","special")),lt(F,G)||($="["+G+"]"),H||(k.seen.indexOf(V.value)<0?(H=Z(U)?K(k,V.value,null):K(k,V.value,U-1)).indexOf("\n")>-1&&(H=j?H.split("\n").map((function(k){return" "+k})).join("\n").slice(2):"\n"+H.split("\n").map((function(k){return" "+k})).join("\n")):H=k.stylize("[Circular]","special")),et($)){if(j&&G.match(/^\d+$/))return H;($=JSON.stringify(""+G)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?($=$.slice(1,-1),$=k.stylize($,"name")):($=$.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),$=k.stylize($,"string"))}return $+": "+H}function Q(k){return Array.isArray(k)}function X(k){return"boolean"==typeof k}function Z(k){return null===k}function J(k){return"number"==typeof k}function tt(k){return"string"==typeof k}function et(k){return void 0===k}function it(k){return st(k)&&"[object RegExp]"===ot(k)}function st(k){return"object"==typeof k&&null!==k}function nt(k){return st(k)&&"[object Date]"===ot(k)}function at(k){return st(k)&&("[object Error]"===ot(k)||k instanceof Error)}function rt(k){return"function"==typeof k}function ot(k){return Object.prototype.toString.call(k)}function ht(k){return k<10?"0"+k.toString(10):k.toString(10)}B.debuglog=function(k){if(k=k.toUpperCase(),!j[k])if($.test(k)){var U=process.pid;j[k]=function(){var F=B.format.apply(B,arguments);console.error("%s %d: %s",k,U,F)}}else j[k]=function(){};return j[k]},B.inspect=V,V.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},V.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},B.types=U(49032),B.isArray=Q,B.isBoolean=X,B.isNull=Z,B.isNullOrUndefined=function(k){return null==k},B.isNumber=J,B.isString=tt,B.isSymbol=function(k){return"symbol"==typeof k},B.isUndefined=et,B.isRegExp=it,B.types.isRegExp=it,B.isObject=st,B.isDate=nt,B.types.isDate=nt,B.isError=at,B.types.isNativeError=at,B.isFunction=rt,B.isPrimitive=function(k){return null===k||"boolean"==typeof k||"number"==typeof k||"string"==typeof k||"symbol"==typeof k||void 0===k},B.isBuffer=U(81135);var ct=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function dt(){var k=new Date,B=[ht(k.getHours()),ht(k.getMinutes()),ht(k.getSeconds())].join(":");return[k.getDate(),ct[k.getMonth()],B].join(" ")}function lt(k,B){return Object.prototype.hasOwnProperty.call(k,B)}B.log=function(){console.log("%s - %s",dt(),B.format.apply(B,arguments))},B.inherits=U(56698),B._extend=function(k,B){if(!B||!st(B))return k;for(var U=Object.keys(B),F=U.length;F--;)k[U[F]]=B[U[F]];return k};var ut="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function ft(k,B){if(!k){var U=new Error("Promise was rejected with a falsy value");U.reason=k,k=U}return B(k)}B.promisify=function(k){if("function"!=typeof k)throw new TypeError('The "original" argument must be of type Function');if(ut&&k[ut]){var B;if("function"!=typeof(B=k[ut]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(B,ut,{value:B,enumerable:!1,writable:!1,configurable:!0}),B}function B(){for(var B,U,F=new Promise((function(k,F){B=k,U=F})),G=[],j=0;j{"use strict";var F=U(82682),G=U(39209),j=U(10487),$=U(36556),H=U(75795),V=U(93628),W=$("Object.prototype.toString"),q=U(49092)(),K="undefined"==typeof globalThis?U.g:globalThis,z=G(),Y=$("String.prototype.slice"),Q=$("Array.prototype.indexOf",!0)||function(k,B){for(var U=0;U-1?B:"Object"===B&&function(k){var B=!1;return F(X,(function(U,F){if(!B)try{U(k),B=Y(F,1)}catch(e){}})),B}(k)}return H?function(k){var B=!1;return F(X,(function(U,F){if(!B)try{"$"+U(k)===F&&(B=Y(F,1))}catch(e){}})),B}(k):null}},55904:k=>{class B{constructor(k,B,U,F){this.id=B,this._backpressure=0,this.currentNode=U,this.timeout=F,this.isAlive=!0,this.stream=k,this.stream.setConsumer(this.id,this)}getStats(){let k={id:this.id,backpressure:this._backpressure};return null!=this.timeout&&(k.timeout=this.timeout),k}_resetBackpressure(){this._backpressure=0}applyBackpressure(k){this._backpressure++}releaseBackpressure(k){this._backpressure--}getBackpressure(){return this._backpressure}clearActiveTimeout(){clearTimeout(this._timeoutId),delete this._timeoutId}write(k){void 0!==this._timeoutId&&this.clearActiveTimeout(k),this.applyBackpressure(k),this._resolve&&(this._resolve(),delete this._resolve)}kill(k){this._killPacket={value:k,done:!0},void 0!==this._timeoutId&&this.clearActiveTimeout(this._killPacket),this._destroy(),this._resolve&&(this._resolve(),delete this._resolve)}_destroy(){this.isAlive=!1,this._resetBackpressure(),this.stream.removeConsumer(this.id)}async _waitForNextItem(k){return new Promise(((B,U)=>{let F;if(this._resolve=B,void 0!==k){let B=new Error("Stream consumer iteration timed out");(async()=>{let G=function(k){let B,U=new Promise((U=>{B=setTimeout(U,k)}));return{timeoutId:B,promise:U}}(k);F=G.timeoutId,await G.promise,B.name="TimeoutError",delete this._resolve,U(B)})()}this._timeoutId=F}))}async next(){for(this.stream.setConsumer(this.id,this);;){if(!this.currentNode.next)try{await this._waitForNextItem(this.timeout)}catch(k){throw this._destroy(),k}if(this._killPacket){this._destroy();let k=this._killPacket;return delete this._killPacket,k}if(this.currentNode=this.currentNode.next,this.releaseBackpressure(this.currentNode.data),!this.currentNode.consumerId||this.currentNode.consumerId===this.id)return this.currentNode.data.done&&this._destroy(),this.currentNode.data}}return(){return delete this.currentNode,this._destroy(),{}}[Symbol.asyncIterator](){return this}}k.exports=B},44658:(k,B,U)=>{const F=U(52960),G=U(55904);k.exports=class extends F{constructor(k){super(),k=k||{},this._nextConsumerId=1,this.generateConsumerId=k.generateConsumerId,this.generateConsumerId||(this.generateConsumerId=()=>this._nextConsumerId++),this.removeConsumerCallback=k.removeConsumerCallback,this._consumers=new Map,this.tailNode={next:null,data:{value:void 0,done:!1}}}_write(k,B,U){let F={data:{value:k,done:B},next:null};U&&(F.consumerId=U),this.tailNode.next=F,this.tailNode=F;for(let G of this._consumers.values())G.write(F.data)}write(k){this._write(k,!1)}close(k){this._write(k,!0)}writeToConsumer(k,B){this._write(B,!1,k)}closeConsumer(k,B){this._write(B,!0,k)}kill(k){for(let B of this._consumers.keys())this.killConsumer(B,k)}killConsumer(k,B){let U=this._consumers.get(k);U&&U.kill(B)}getBackpressure(){let k=0;for(let B of this._consumers.values()){let U=B.getBackpressure();U>k&&(k=U)}return k}getConsumerBackpressure(k){let B=this._consumers.get(k);return B?B.getBackpressure():0}hasConsumer(k){return this._consumers.has(k)}setConsumer(k,B){this._consumers.set(k,B),B.currentNode||(B.currentNode=this.tailNode)}removeConsumer(k){let B=this._consumers.delete(k);return this.removeConsumerCallback&&this.removeConsumerCallback(k),B}getConsumerStats(k){let B=this._consumers.get(k);if(B)return B.getStats()}getConsumerStatsList(){let k=[];for(let B of this._consumers.values())k.push(B.getStats());return k}createConsumer(k){return new G(this,this.generateConsumerId(),this.tailNode,k)}getConsumerList(){return[...this._consumers.values()]}getConsumerCount(){return this._consumers.size}}},52960:k=>{class B{async next(k){let B=this.createConsumer(k),U=await B.next();return B.return(),U}async once(k){let B=await this.next(k);if(B.done){if(null!=k){let k=new Error("Stream consumer operation timed out early because stream ended");throw k.name="TimeoutError",k}await new Promise((()=>{}))}return B.value}createConsumer(){throw new TypeError("Method must be overriden by subclass")}[Symbol.asyncIterator](){return this.createConsumer()}}k.exports=B},87490:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);U(33482),F.__exportStar(U(79687),B),F.__exportStar(U(47547),B)},2771:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BattleAction=void 0;var U=function(){};B.BattleAction=U},61582:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.CastSpellAction=void 0;var F=U(17498),G=U(95891),j=U(15907),$=U(51648),H=U(36700),V=U(44503),W=U(82825),q=U(49042),K=U(12634),z=U(88250),Y=U(66020),Q=U(58690),X=U(89647),Z=U(1191),J=function(k){function B(B,U,F){var G=k.call(this)||this;return G.countsAsPlayedTurn=!0,G._container=B,G._stateUpdateManager=B.get($.StateUpdateManager),G._spellCastUtil=B.get(K.SpellCastUtil),G._affixStateDataProvider=B.get(H.AffixStateDataProvider),G._statusEffectStateDataProvider=B.get(W.StatusEffectStateDataProvider),G._spell=U,G._targets=F,G}return F.__extends(B,k),B.prototype.run=function(){var k,B,U,$,H,W,K,J,tt,et=this,it={type:Q.EBattleStateUpdate.CastSpell,id:this._spell.id,targets:[]};if(this._spell instanceof X.UnitSpell){if(this._spell.isLocked)throw new j.BattleError("Cannot cast a locked spell. Spell ID - ".concat(this._spell.id));if(0!==this._spell.currentCooldown)throw new j.BattleError("Cannot cast a spell on cooldown. Spell ID: ".concat(this._spell.id));var st=this._spell.energyCost;if(tt=this._spell.unit,st>0){if(tt.mp0?++this._spell.currentCooldown:-1===this._spell.currentCooldown&&this._stateUpdateManager.addToBack({type:Q.EBattleStateUpdate.ModifySpellCooldown,unitId:tt.id,spellId:this._spell.id,cooldown:this._spell.currentCooldown})}var nt={caster:tt,targets:this._targets,spell:this._spell};this._container.dispatchEvent(q.EBattleEvent.CastingSpell,nt),this._targets=nt.targets,this._spell=nt.spell;var at=[],rt={},ot=[],ht=this._spellCastUtil.generateSpellEffects(this._container,this._spell,this._targets),ct={};if(this._spell.statusEffects.length>0&&tt)try{for(var dt=F.__values(this._spell.statusEffects),lt=dt.next();!lt.done;lt=dt.next()){var ut=lt.value,ft=[];try{for(var bt=(U=void 0,F.__values(this._targets)),pt=bt.next();!pt.done;pt=bt.next()){var vt=pt.value;ft.push.apply(ft,F.__spreadArray([],F.__read(this._spellCastUtil.getStatusEffectTargets(this._container,ut.targetType,tt,vt)),!1))}}catch(Ct){U={error:Ct}}finally{try{pt&&!pt.done&&($=bt.return)&&$.call(bt)}finally{if(U)throw U.error}}ct[ut.statusEffectId]=ft.map((function(k){return k.id}))}}catch(Ot){k={error:Ot}}finally{try{lt&&!lt.done&&(B=dt.return)&&B.call(dt)}finally{if(k)throw k.error}}null===(J=this.spellEffectProcessor)||void 0===J||J.call(this,ht);var gt=G.groupBy(ht,(function(k){return k.target.id})),mt=function(k,B){var U=!1;it.targets.push({unitId:k,hits:B.map((function(B){var j,$,H,V,W,q;et._spellCastUtil.applySpellEffectsToTarget(B);var K=B.affixes.filter((function(k){return k.isDisplayed})),Y=B.removedAffixes.filter((function(k){return k.isDisplayed})),X={damage:B.damage,damageInformation:B.damageInformation,hpResult:B.target.health,affixes:K.length>0?K:void 0,removedAffixes:Y.length>0?Y.map((function(k){return k.id})):void 0};try{for(var Z=(j=void 0,F.__values(B.flags)),J=Z.next();!J.done;J=Z.next()){var tt=J.value;switch(tt.flag){case z.ESpellFlag.Rescue:U=!0;break;case z.ESpellFlag.ChangeMp:tt.flagValue&&(X.mpDamage=-tt.flagValue,X.mpResult=B.target.mp);break;case z.ESpellFlag.ChangeCooldown:if(tt.flagValue)try{for(var it=(H=void 0,F.__values(B.target.spells)),st=it.next();!st.done;st=it.next()){var nt=st.value,at=G.clamp(nt.currentCooldown+tt.flagValue,0,nt.cooldown);nt.currentCooldown!==at&&nt.currentCooldown>=0&&(nt.currentCooldown=at,et._stateUpdateManager.addToBack({type:Q.EBattleStateUpdate.ModifySpellCooldown,unitId:k,spellId:nt.id,cooldown:nt.currentCooldown}))}}catch(ut){H={error:ut}}finally{try{st&&!st.done&&(V=it.return)&&V.call(it)}finally{if(H)throw H.error}}}}}catch(ft){j={error:ft}}finally{try{J&&!J.done&&($=Z.return)&&$.call(Z)}finally{if(j)throw j.error}}try{for(var ot=(W=void 0,F.__values(B.statusEffectsAdded)),ht=ot.next();!ht.done;ht=ot.next()){var dt=ht.value,lt=et._statusEffectStateDataProvider.addStatusEffect(dt,!1);lt.intendedTargets=ct[dt.statusEffectId],rt[dt.statusEffectId]?rt[dt.statusEffectId].statusEffects.push(lt.statusEffects[0]):rt[dt.statusEffectId]=lt}}catch(bt){W={error:bt}}finally{try{ht&&!ht.done&&(q=ot.return)&&q.call(ot)}finally{if(W)throw W.error}}return X}))});var j=B[0].target;at.push.apply(at,F.__spreadArray([],F.__read(Z.AffixUtils.handleAfterDamageAffixesForTarget(yt._affixStateDataProvider,j)),!1)),(j.isDefeated()||U)&&(j.battleStatus=U?V.EUnitBattleStatus.Rescued:V.EUnitBattleStatus.Defeated,ot.push({type:Q.EBattleStateUpdate.DefeatUnit,unitId:j.id,isRescued:U}))},yt=this;try{for(var _t=F.__values(Object.entries(gt)),Et=_t.next();!Et.done;Et=_t.next()){var wt=F.__read(Et.value,2);mt(wt[0],wt[1])}}catch(It){H={error:It}}finally{try{Et&&!Et.done&&(W=_t.return)&&W.call(_t)}finally{if(H)throw H.error}}var Tt={};for(var St in rt){var At=rt[St];Tt[St]=At.statusEffects.map((function(k){return k.id}))}return Object.keys(Tt).length>0&&(it.statusEffectsApplied=Tt),this._container.dispatchEvent(q.EBattleEvent.AddingCastSpellStateUpdate,nt,it),(K=this._stateUpdateManager).addToBack.apply(K,F.__spreadArray(F.__spreadArray(F.__spreadArray([it],F.__read(Object.values(rt)),!1),F.__read(at),!1),F.__read(ot),!1)),!0},B}(U(2771).BattleAction);B.CastSpellAction=J},43396:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.EmptyAction=void 0;var F=U(17498),G=function(k){function B(){var B=k.apply(this,F.__spreadArray([],F.__read(arguments),!1))||this;return B.countsAsPlayedTurn=!1,B}return F.__extends(B,k),B.prototype.run=function(){return!0},B}(U(2771).BattleAction);B.EmptyAction=G},27996:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.FumbleAction=void 0;var F=U(17498),G=U(51448),j=U(51648),$=U(58690),H=U(54705),V=function(k){function B(B,U){var F=k.call(this)||this;return F.countsAsPlayedTurn=!0,F._stateUpdateManager=B.get(j.StateUpdateManager),F._battleConstants=B.get(G.BattleConstants),F._target=U,F}return F.__extends(B,k),B.prototype.run=function(){var k={type:$.EBattleStateUpdate.CastSpell,id:this._battleConstants.fumbleSpellId,targets:[{unitId:this._target.id,hits:[{damage:0,damageInformation:H.EDamageInformation.Fumble,hpResult:this._target.health}]}]};return this._stateUpdateManager.addToBack(k),!0},B}(U(2771).BattleAction);B.FumbleAction=V},9189:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.PowerUpAction=void 0;var F=U(17498),G=U(51448),j=U(16104),$=U(51648),H=U(58690),V=U(54705),W=function(k){function B(B,U,F){var H=k.call(this)||this;return H._stateUpdateManager=B.get($.StateUpdateManager),H._battleCalculations=B.get(j.BattleCalculations),H._battleConstants=B.get(G.BattleConstants),H.correctAnswer=U,H.target=F,H}return F.__extends(B,k),B.prototype.run=function(){return this.correctAnswer?(this.countsAsPlayedTurn=!1,this.awardMp(this.target)):(this.countsAsPlayedTurn=!0,this.makeUnitFumble(this.target)),!this.correctAnswer},B.prototype.awardMp=function(k){var B=this._battleCalculations.getUnitMPIncrement(k);k.mp+=B;var U={type:H.EBattleStateUpdate.ModifyMp,unitId:k.id,mpResult:k.mp};this._stateUpdateManager.addToBack(U)},B.prototype.makeUnitFumble=function(k){var B={type:H.EBattleStateUpdate.CastSpell,id:this._battleConstants.fumbleSpellId,targets:[{unitId:k.id,hits:[{damage:0,damageInformation:V.EDamageInformation.Fumble,hpResult:k.health}]}]};this._stateUpdateManager.addToBack(B)},B}(U(2771).BattleAction);B.PowerUpAction=W},24573:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.SkipTurnAction=void 0;var F=U(17498),G=U(51648),j=U(58690),$=function(k){function B(B,U){var F=k.call(this)||this;return F.countsAsPlayedTurn=!1,F._stateUpdateManager=B.get(G.StateUpdateManager),F._target=U,F}return F.__extends(B,k),B.prototype.run=function(){return this._stateUpdateManager.addToBack({type:j.EBattleStateUpdate.SkipTurn,unitId:this._target.id}),!0},B}(U(2771).BattleAction);B.SkipTurnAction=$},40783:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(2771),B),F.__exportStar(U(61582),B),F.__exportStar(U(43396),B),F.__exportStar(U(27996),B),F.__exportStar(U(9189),B),F.__exportStar(U(24573),B)},54284:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.Affix=void 0;var U=function(k){this._data=k};B.Affix=U},81327:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EAffixType=void 0,function(k){k.Stat="stat",k.DodgeChance="dodgeChance",k.ApplyDamage="applyDamage",k.ApplyHealing="applyHealing",k.BonusElement="bonusElement",k.IncomingDamageMultiplier="incomingDamage",k.OutgoingDamageMultiplier="outgoingDamage",k.IncomingHealingMultiplier="incomingHealing",k.OutgoingHealingMultiplier="outgoingHealing",k.IncomingCritChanceBonus="incomingCritChance",k.PreventDefeat="preventDefeat",k.Survivor="survivor",k.OneHitKill="oneHitKill",k.AlwaysDodge="alwaysDodge",k.NeverDodge="neverDodge",k.Shield="shield",k.AdditiveDamageMultiplier="additiveDamageMultiplier",k.Revive="revive"}(U||(B.EAffixType=U={}))},1191:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.AffixUtils=void 0;var F=U(17498),G=U(95891),j=U(81327),$=U(54705),H=U(9546),V=U(58690),W=function(){function k(){}return k.hasWhenToTrigger=function(k){return H.Util.isDefined(null==k?void 0:k.whenToTrigger)},k.handleAffixesForTarget=function(k,B,U,H){var V,W,q,K,z,Y;if(k.getAffixesForUnit(U.id).find((function(k){return k.type===j.EAffixType.PreventDefeat}))){var Q=H.filter((function(k){return k.target===U})),X=U.health;try{for(var Z=F.__values(Q),J=Z.next();!J.done;J=Z.next()){(nt=J.value).damage>=X&&(nt.damage=X-1),X-=nt.damage}}catch(lt){V={error:lt}}finally{try{J&&!J.done&&(W=Z.return)&&W.call(Z)}finally{if(V)throw V.error}}}if(U.health>1&&k.getAffixesForUnit(U.id).find((function(k){return k.type===j.EAffixType.Survivor}))){Q=H.filter((function(k){return k.target===U}));try{for(var tt=F.__values(Q),et=tt.next();!et.done;et=tt.next()){if((nt=et.value).damage>U.health){nt.damage=U.health-1;break}}}catch(ut){q={error:ut}}finally{try{et&&!et.done&&(K=tt.return)&&K.call(tt)}finally{if(q)throw q.error}}}var it=k.getAffixesForUnit(U.id).filter((function(k){return k.type===j.EAffixType.Shield}));if(it.length>0){Q=H.filter((function(k){return k.target===U}));for(var st=0;st0;++st)for(var nt=Q[st],at=0;at0;++at){var rt=it[at];nt.damage=rt.damageRange?Math.min(nt.damage,G.random(rt.damageRange.min,rt.damageRange.max)):0,nt.damageInformation=$.EDamageInformation.None,rt.removeAfterHit&&(nt.removedAffixes.push(rt),k.removeAffix(rt,!1),it.shift())}}var ot=B?k.getAffixesForUnit(B.id).find((function(k){return k.type===j.EAffixType.OutgoingHealingMultiplier})):void 0,ht=k.getAffixesForUnit(U.id).find((function(k){return k.type===j.EAffixType.IncomingHealingMultiplier}));if(ht||ot){Q=H.filter((function(k){return k.target===U}));try{for(var ct=F.__values(Q),dt=ct.next();!dt.done;dt=ct.next()){(nt=dt.value).isDamageInformationFlagSet($.EDamageInformation.Heal)&&(ht&&(nt.damage=Math.round(nt.damage*ht.multiplier)),ot&&(nt.damage=Math.round(nt.damage*ot.multiplier)))}}catch(ft){z={error:ft}}finally{try{dt&&!dt.done&&(Y=ct.return)&&Y.call(ct)}finally{if(z)throw z.error}}}},k.handleAfterDamageAffixesForTarget=function(k,B){var U=[];if(B.isDefeated()){var F=k.getAffixesForUnit(B.id).find((function(k){return k.type===j.EAffixType.Revive}));F&&(B.health=Math.max(1,Math.round(B.maxHealth*F.percentHealth)),k.removeAffix(F,!1),U.push({type:V.EBattleStateUpdate.RemoveAffix,affixId:F.id}),U.push({type:V.EBattleStateUpdate.ReviveUnit,unitId:B.id,hpResult:B.health}))}return U},k}();B.AffixUtils=W},26342:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EWhenToReduce=void 0,function(k){k.StartOfTurn="startOfTurn",k.EndOfTurn="endOfTurn"}(U||(B.EWhenToReduce=U={}))},18902:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EWhenToTrigger=void 0,function(k){k.StartOfTurn="startOfTurn",k.EndOfTurn="endOfTurn",k.WhenDurationExpires="whenDurationExpires"}(U||(B.EWhenToTrigger=U={}))},38126:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(54284),B),F.__exportStar(U(81327),B),F.__exportStar(U(1191),B),F.__exportStar(U(18902),B),F.__exportStar(U(26342),B)},24599:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BattleController=void 0;var F=U(17498),G=U(79687),j=U(41334),$=U(87584),H=U(21073),V=function(){function k(){}return k.prototype.getVictoriousTeam=function(){var k=this.getTeams().filter((function(k){return!k.isDefeated()}));return 1===k.length?k[0]:null},k.prototype.getTeams=function(){var k=this;return this._battleStateDataProvider.getTeamIds().map((function(B){return k._battleContainer.getNamed($.Team,B)}))},k.prototype.getUnits=function(){var k=this;return this._battleStateDataProvider.getUnitIds().map((function(B){return k._battleContainer.getNamed(H.Unit,B)}))},k.prototype.removeUnit=function(k){this._battleContainer.get(j.BattleStateDataProvider).deleteUnitData(k)},F.__decorate([(0,G.inject)(G.Container),F.__metadata("design:type",Function)],k.prototype,"_battleContainer",void 0),F.__decorate([(0,G.inject)(j.BattleStateDataProvider),F.__metadata("design:type",j.BattleStateDataProvider)],k.prototype,"_battleStateDataProvider",void 0),k=F.__decorate([(0,G.injectable)()],k)}();B.BattleController=V},16636:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.TeamController=void 0;var F=U(87584),G=U(24599),j=function(){function k(k,B){this._battleContainer=B,this._battleController=B.get(G.BattleController),this._team=B.getNamed(F.Team,k)}return Object.defineProperty(k.prototype,"team",{get:function(){return this._team},enumerable:!1,configurable:!0}),k.prototype.start=function(){},k}();B.TeamController=j},12030:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BasicBattleCalculations=void 0;var F=U(17498),G=U(79687),j=function(){function k(){}return k.prototype.getUnitMPIncrement=function(k){return k.maxMp-k.mp},k=F.__decorate([(0,G.injectable)()],k)}();B.BasicBattleCalculations=j},19124:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.createDefaultBasicBattleConfiguration=void 0;B.createDefaultBasicBattleConfiguration=function(){return{difficulty:5}}},1616:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BasicBattleController=void 0;var F=U(17498),G=U(79687),j=U(2771),$=U(10141),H=U(51648),V=U(36700),W=U(44503),q=U(13435),K=U(73566),z=U(49042),Y=U(12634),Q=U(41866),X=U(58690),Z=U(387),J=U(21073),tt=U(9546),et=U(24599),it=U(16636),st=U(84951),nt=U(19124),at=function(k){function B(){return null!==k&&k.apply(this,arguments)||this}return F.__extends(B,k),Object.defineProperty(B.prototype,"config",{get:function(){return this._battleControllerDataStore.getObjectOrDefault("config",nt.createDefaultBasicBattleConfiguration)},set:function(k){this._battleControllerDataStore.setObject("config",k)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"_turnOrder",{get:function(){var k=this._battleControllerDataStore.getObject("turnOrder");return tt.Util.assertDefined(k,"turnOrder is undefined"),k},set:function(k){this._battleControllerDataStore.setObject("turnOrder",k)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"_turnIndex",{get:function(){var k=this._battleControllerDataStore.getObject("turnIndex");return tt.Util.assertDefined(k,"turnIndex is undefined"),k},set:function(k){this._battleControllerDataStore.setObject("turnIndex",k)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"currentTurnOrder",{get:function(){return{turnOrder:this._turnOrder,turnIndex:this._turnIndex}},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"_round",{get:function(){var k;return null!==(k=this._battleControllerDataStore.getObject("round"))&&void 0!==k?k:0},set:function(k){this._battleControllerDataStore.setObject("round",k)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"turn",{get:function(){var k;return null!==(k=this._battleControllerDataStore.getObject("turn"))&&void 0!==k?k:1},set:function(k){this._battleControllerDataStore.setObject("turn",k)},enumerable:!1,configurable:!0}),B.prototype.start=function(){var k,B;this._turnOrder=this._battleStateDataProvider.getUnitIds(),this._turnIndex=-1,this.changeTurn();try{for(var U=F.__values(this.getTeamControllers()),G=U.next();!G.done;G=U.next()){G.value.start()}}catch(j){k={error:j}}finally{try{G&&!G.done&&(B=U.return)&&B.call(U)}finally{if(k)throw k.error}}this.doCurrentUnitTurn()},B.prototype.resume=function(){this.doCurrentUnitTurn()},B.prototype.getTeamControllers=function(){var k=this;return this._battleStateDataProvider.getTeamIds().map((function(B){return k._battleContainer.getNamed(it.TeamController,B)}))},B.prototype.runAction=function(k){var B=k.run();this.checkForVictory(),B&&this.changeTurn(k.countsAsPlayedTurn),this.doCurrentUnitTurn()},B.prototype.checkForVictory=function(){var k=this.getVictoriousTeam();if(k)throw this._stateUpdateManager.addToBack({type:X.EBattleStateUpdate.EndBattle,victoriousTeamId:k.id}),new $.BattleEndError},B.prototype.getActiveUnit=function(){var k=this._battleControllerDataStore.getObjectOrDefault("turnOrder",(function(){return[]}));if(!(k.length<1||this._turnIndex<0))return this._battleContainer.getNamed(J.Unit,k[this._turnIndex])},B.prototype.recalculateTurnOrder=function(){var k=this,B=this._turnOrder.map((function(B){return k._battleContainer.getNamed(J.Unit,B)})),U=this._unitSorter.sort({units:B,currentUnitIndex:this._turnIndex});this._turnOrder=U.units.map((function(k){return k.id})),this._turnIndex=U.currentUnitIndex},B.prototype.changeTurn=function(k){this.removeDefeatedUnits();var B=this.getActiveUnit();do{this.recalculateTurnOrder(),null==B||B.endTurn(),this._affixStateDataProvider.endTurn(),this._turnIndex=(this._turnIndex+1)%this._turnOrder.length,0===this._turnIndex&&this.changeRound(),this.checkForVictory(),B=this.getActiveUnit(),tt.Util.assertDefined(B,"No active unit"),B.startTurn(),this.removeDefeatedUnits()}while(B.passive||B.isDefeated());k&&this.turn++,this.addActiveUnitStateUpdate(B.id),tt.Util.isDebugEnabled()&&this._stateUpdateManager.addDebugMessage(Z.EDebugMessageType.TurnOrder,this.getTurnOrderDebugMessage())},B.prototype.addActiveUnitStateUpdate=function(k){var B;if(null!==k){var U=this._battleContainer.getNamed(J.Unit,k);if(this.shouldSendCalculatedSpellData(U)){var F=this._battleContainer.get(Y.SpellCastUtil);B=U.spells.map((function(k){return{spellId:k.id,spellPower:F.calculateSpellPower(k),spellAccuracy:F.calculateSpellAccuracy(k)}}))}}this._stateUpdateManager.addToBack({type:X.EBattleStateUpdate.SetActiveUnit,unitId:k,spellData:B,turn:this.turn})},B.prototype.shouldSendCalculatedSpellData=function(k){return k.teamId===Q.ETeamId.Home},B.prototype.changeRound=function(){this._stateUpdateManager.addToBack({type:X.EBattleStateUpdate.NewRound,round:++this._round}),this._battleContainer.dispatchEvent(z.EBattleEvent.NewRoundStarted,this._round)},B.prototype.doCurrentUnitTurn=function(){var k=this.getActiveUnit();tt.Util.assertDefined(k,"No active unit");var B=this.getTeamControllers().find((function(B){return B.team.getMembers().includes(k)}));tt.Util.assertDefined(B,"Active unit not found on any team"),B.readyActionForUnit(k)},B.prototype.removeDefeatedUnits=function(){var k,B;try{for(var U=F.__values(this._battleStateDataProvider.getUnitIds()),G=U.next();!G.done;G=U.next()){var j=G.value,$=this._battleContainer.getNamed(J.Unit,j);$.isDefeated()&&this.removeUnit($.id)}}catch(H){k={error:H}}finally{try{G&&!G.done&&(B=U.return)&&B.call(U)}finally{if(k)throw k.error}}},B.prototype.removeUnit=function(B){var U=this._turnOrder.indexOf(B);-1!==U&&(this._turnOrder.splice(U,1),U===this._turnIndex?0!==this._turnIndex?--this._turnIndex:this._turnIndex=this._turnOrder.length-1:U>":""," \t ").concat(F+1,". ").concat(B.id," (").concat(G.slot,") (").concat(B.getStat(W.EStat.Initiative),", ").concat(B.rarity,", ").concat(B.level,")\n")})),U},F.__decorate([(0,G.inject)(q.BattleStateDataStore),F.__metadata("design:type",Object)],B.prototype,"_battleControllerDataStore",void 0),F.__decorate([(0,G.inject)(H.StateUpdateManager),F.__metadata("design:type",H.StateUpdateManager)],B.prototype,"_stateUpdateManager",void 0),F.__decorate([(0,G.inject)(V.AffixStateDataProvider),F.__metadata("design:type",V.AffixStateDataProvider)],B.prototype,"_affixStateDataProvider",void 0),F.__decorate([(0,G.inject)(st.BattleUnitSorter),F.__metadata("design:type",st.BattleUnitSorter)],B.prototype,"_unitSorter",void 0),F.__decorate([$.handleBattleEnd,F.__metadata("design:type",Function),F.__metadata("design:paramtypes",[]),F.__metadata("design:returntype",void 0)],B.prototype,"start",null),F.__decorate([$.handleBattleEnd,F.__metadata("design:type",Function),F.__metadata("design:paramtypes",[j.BattleAction]),F.__metadata("design:returntype",void 0)],B.prototype,"runAction",null),B=F.__decorate([(0,G.injectable)()],B)}(et.BattleController);B.BasicBattleController=at},48531:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BasicBattleFormulas=void 0;var U=function(){function k(){}return k.getEnemyUnitStartMP=function(k,B){switch(k){case 1:return 0;case 2:return Math.floor(.5*B);case 3:return Math.ceil(.5*B);default:return B}},k.getEnemyQIPercentage=function(k){switch(k){case 1:return.6;case 2:case 3:return.75;default:return.9}},k}();B.BasicBattleFormulas=U},45960:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(12030),B),F.__exportStar(U(19124),B),F.__exportStar(U(1616),B),F.__exportStar(U(48531),B)},21889:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(24599),B),F.__exportStar(U(16636),B),F.__exportStar(U(45960),B),F.__exportStar(U(15450),B)},84951:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BattleUnitSorter=void 0;var F=U(17498),G=U(79687),j=function(){function k(){}return k=F.__decorate([(0,G.injectable)()],k)}();B.BattleUnitSorter=j},764:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.InitiativeRarityLevelBattleUnitSorter=void 0;var F=U(17498),G=U(44503),j=function(k){function B(){return null!==k&&k.apply(this,arguments)||this}return F.__extends(B,k),B.prototype.sort=function(k){var B=k.units,U=k.currentUnitIndex,F=B.map((function(k){var B;return{unit:k,initiative:k.getStat(G.EStat.Initiative),rarity:null!==(B=k.rarity)&&void 0!==B?B:-1,level:k.level}}));return F.sort((function(k,B){return F.indexOf(k)<=U||F.indexOf(B)<=U?0:k.initiative!==B.initiative?B.initiative-k.initiative:k.rarity!==B.rarity?B.rarity-k.rarity:k.level!==B.level?B.level-k.level:.5-Math.random()})),{units:F.map((function(k){return k.unit})),currentUnitIndex:U}},B}(U(84951).BattleUnitSorter);B.InitiativeRarityLevelBattleUnitSorter=j},62359:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.MultipleTurnPingPongInitiativeRarityLevelBattleUnitSorter=void 0;var F=U(17498),G=U(95891),j=function(k){function B(){return null!==k&&k.apply(this,arguments)||this}return F.__extends(B,k),B.prototype.getNextUnitIndex=function(B){var U=k.prototype.getNextUnitIndex.call(this,B);if(U>=0)return U;var F=B.units,j=B.currentUnitIndex,$=F[j].teamId;return G.findLastIndex(F,(function(k){return k.teamId!==$&&!k.passive}),j-1)},B}(U(88266).PingPongInitiativeRarityLevelBattleUnitSorter);B.MultipleTurnPingPongInitiativeRarityLevelBattleUnitSorter=j},88266:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.PingPongInitiativeRarityLevelBattleUnitSorter=void 0;var F=U(17498),G=U(95891),j=U(9546),$=function(k){function B(){return null!==k&&k.apply(this,arguments)||this}return F.__extends(B,k),B.prototype.sort=function(B){var U=k.prototype.sort.call(this,B),F=U.units,G=U.currentUnitIndex;if(G<0||G>=F.length)return{units:F,currentUnitIndex:G};var j=this.getNextNaturalUnit({units:F,currentUnitIndex:G});if(j.unit.teamId!==F[G].teamId)return j.newRoundOrderData?j.newRoundOrderData:{units:F,currentUnitIndex:G};var $=this.getNextUnitIndex({units:F,currentUnitIndex:G});if($>=0){var H=F.splice($,1)[0],V=$=B.length-1)return-1;var F=B[U].teamId;return G.findIndex(B,(function(k){return k.teamId!==F&&!k.passive}),U+1)},B}(U(764).InitiativeRarityLevelBattleUnitSorter);B.PingPongInitiativeRarityLevelBattleUnitSorter=$},15450:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(84951),B),F.__exportStar(U(764),B),F.__exportStar(U(62359),B),F.__exportStar(U(88266),B)},51448:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BattleConstants=void 0;var F=U(17498),G=U(79687),j=U(44503),$=U(26036),H=U(50532),V=U(87452),W=function(){function k(){}return Object.defineProperty(k.prototype,"baseLevelMinimum",{get:function(){return this._constantsDataProvider.constants.baseLevelMinimum},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"baseLevelMaximum",{get:function(){return this._constantsDataProvider.constants.baseLevelMaximum},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"baseLevelMaximumConfig",{get:function(){return this._constantsDataProvider.constants.baseLevelMaximumConfig},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"minPlayerHeartsOnEndBattle",{get:function(){return this._constantsDataProvider.constants.minPlayerHeartsOnEndBattle},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"elementalAffinityBonus",{get:function(){return this._constantsDataProvider.constants.multipliers.stabElement},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"criticalHitBonus",{get:function(){return this._constantsDataProvider.constants.multipliers.criticalHit},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"criticalHitChanceBonus",{get:function(){var k;return null!==(k=this._constantsDataProvider.constants.multipliers.critChance)&&void 0!==k?k:1},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"physicalMultiplier",{get:function(){return this._constantsDataProvider.constants.multipliers.physical},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"finalDamageMultiplier",{get:function(){return this._constantsDataProvider.constants.multipliers.finalDamage},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"enemyNerfMinMultiplier",{get:function(){return this._constantsDataProvider.constants.multipliers.enemyNerf.min},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"minimumHitChance",{get:function(){return this._constantsDataProvider.constants.minimumHitChance},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"maximumHitChance",{get:function(){return this._constantsDataProvider.constants.maximumHitChance},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"enemyNerfBonusMultiplier",{get:function(){return this._constantsDataProvider.constants.multipliers.enemyNerf.bonus},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"chanceHitOffset",{get:function(){return this._constantsDataProvider.constants.multipliers.hitChanceScaling.chanceHitOffset},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"chanceHitCoefSquared",{get:function(){return this._constantsDataProvider.constants.multipliers.hitChanceScaling.chanceHitCoefSquared},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"chanceHitCoefPrime",{get:function(){return this._constantsDataProvider.constants.multipliers.hitChanceScaling.chanceHitCoefPrime},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"equipmentBaseHpModifier",{get:function(){return this._constantsDataProvider.constants.equipmentModifierBaseValues.health},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"equipmentBasePowerModifier",{get:function(){return this._constantsDataProvider.constants.equipmentModifierBaseValues.power},enumerable:!1,configurable:!0}),k.prototype.getMultiplierByName=function(k){return this._constantsDataProvider.constants.multipliers[k]},Object.defineProperty(k.prototype,"aoaSpellId",{get:function(){return this._constantsDataProvider.constants.aoaSpellId},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"rescueSpellId",{get:function(){return this._constantsDataProvider.constants.rescueSpellId},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"fumbleSpellId",{get:function(){return this._constantsDataProvider.constants.fumbleSpellId},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"rescueDamageThreshold",{get:function(){return this._constantsDataProvider.constants.rescue.damageThreshold},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"difficultyStreak",{get:function(){return this._constantsDataProvider.constants.difficultyStreak},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"difficultyStreakBench",{get:function(){return this._constantsDataProvider.constants.difficultyStreakBench},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"difficultyStreakLoseStep",{get:function(){return this._constantsDataProvider.constants.difficultyStreakLoseStep},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"difficultyStreakWinStep",{get:function(){return this._constantsDataProvider.constants.difficultyStreakWinStep},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"xpRewards",{get:function(){return this._constantsDataProvider.constants.xp},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"unitStatDefaults",{get:function(){return this._constantsDataProvider.constants.unitStatDefaults},enumerable:!1,configurable:!0}),k.prototype.getDivisor=function(k){return this._constantsDataProvider.constants.divisors[k]},k.prototype.getSpellElementalMultiplier=function(k,B){var U=this._constantsDataProvider.constants.elementalMultiplier.find((function(B){return B.name===k}));return(null==U?void 0:U.data[B])?U.data[B]:1},k.prototype.getBestElementalAdvantageType=function(k,B,U){var F=this,G=this.getSpellElementalMultiplier(U,B),j=U;return k.forEach((function(k){var U=F.getSpellElementalMultiplier(k,B);U>G&&(G=U,j=k)})),j},k.prototype.getElementalAdvantage=function(k,B){return k===this.getElementalWeakness(B)?H.EElementalAdvantage.Strong:k===this.getElementalResistance(B)?H.EElementalAdvantage.Weak:H.EElementalAdvantage.Neutral},k.prototype.getDamageLimit=function(k){return k?new V.ValueRange(this._constantsDataProvider.constants.damageRange.aoa.min,this._constantsDataProvider.constants.damageRange.aoa.max):new V.ValueRange(this._constantsDataProvider.constants.damageRange.spell.min,this._constantsDataProvider.constants.damageRange.spell.max)},k.prototype.getElementalWeakness=function(k){var B=this._constantsDataProvider.constants.elementalMultiplier.find((function(B){return B.name===k}));return null==B?void 0:B.weakness},k.prototype.getElementalResistance=function(k){var B=this._constantsDataProvider.constants.elementalMultiplier.find((function(B){return B.name===k}));return null==B?void 0:B.resistance},k.prototype.getEnemyDamageMultiplier=function(k){var B=this.getDivisor(j.EDivisor.EnemyNerf);return this.enemyNerfBonusMultiplier-this.enemyNerfBonusMultiplier/((k+B-1)/B)+this.enemyNerfMinMultiplier},F.__decorate([(0,G.inject)($.ConstantsDataProvider),F.__metadata("design:type",Object)],k.prototype,"_constantsDataProvider",void 0),k=F.__decorate([(0,G.injectable)()],k)}();B.BattleConstants=W},10424:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},10141:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.handleBattleEnd=B.BattleEndError=void 0;var F=U(17498),G=function(k){function B(){var U=k.call(this)||this;return U.name="BattleEndError",Object.setPrototypeOf(U,B.prototype),U}return F.__extends(B,k),B}(Error);B.BattleEndError=G,B.handleBattleEnd=function(k,B,U){var F=U.value;U.value=function(){for(var k=[],B=0;B{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BattleError=void 0;var F=U(17498),G=function(k){function B(U){var F=k.call(this,U)||this;return Object.setPrototypeOf(F,B.prototype),F}return F.__extends(B,k),B}(Error);B.BattleError=G},79152:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.COMBAT_LEVEL_FIELD=void 0,B.COMBAT_LEVEL_FIELD="level"},8571:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.CombatFormulaScalingConstants=void 0;var F=U(17498),G=U(79687),j=U(99928),$=U(9546),H=U(79152),V=function(){function k(){}return k.prototype.getChanceToHitCoef1=function(k){var B;return null===(B=$.Util.findFirstElementBelowThreshold(H.COMBAT_LEVEL_FIELD,k,this._combatFormulaScalingProvider.constants.casterLevelBonusConfigs))||void 0===B?void 0:B.chanceToHitFormulaCoef1},k.prototype.getChanceToHitCoef2=function(k){var B;return null===(B=$.Util.findFirstElementBelowThreshold(H.COMBAT_LEVEL_FIELD,k,this._combatFormulaScalingProvider.constants.casterLevelBonusConfigs))||void 0===B?void 0:B.chanceToHitFormulaCoef2},k.prototype.getDefenceFormulaCoef=function(k){var B;return null===(B=$.Util.findFirstElementBelowThreshold(H.COMBAT_LEVEL_FIELD,k,this._combatFormulaScalingProvider.constants.casterLevelBonusConfigs))||void 0===B?void 0:B.defenceFormulaCoef},k.prototype.getDefenceFormulaExponent=function(k){var B;return null===(B=$.Util.findFirstElementBelowThreshold(H.COMBAT_LEVEL_FIELD,k,this._combatFormulaScalingProvider.constants.casterLevelBonusConfigs))||void 0===B?void 0:B.defenceExponent},k.prototype.getDamageLevelAverage=function(k){var B;return null===(B=$.Util.findFirstElementBelowThreshold(H.COMBAT_LEVEL_FIELD,k,this._combatFormulaScalingProvider.constants.casterLevelBonusConfigs))||void 0===B?void 0:B.damageAverage},k.prototype.getDefenceLevelAverage=function(k){var B;return null===(B=$.Util.findFirstElementBelowThreshold(H.COMBAT_LEVEL_FIELD,k,this._combatFormulaScalingProvider.constants.casterLevelBonusConfigs))||void 0===B?void 0:B.defenceAverage},Object.defineProperty(k.prototype,"getDamageAveragePower",{get:function(){return this._combatFormulaScalingProvider.constants.damageAveragePower},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"getDefenceAveragePower",{get:function(){return this._combatFormulaScalingProvider.constants.defenceAveragePower},enumerable:!1,configurable:!0}),F.__decorate([(0,G.inject)(j.CombatFormulaScalingDataProvider),F.__metadata("design:type",Object)],k.prototype,"_combatFormulaScalingProvider",void 0),k=F.__decorate([(0,G.injectable)()],k)}();B.CombatFormulaScalingConstants=V},16104:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BattleCalculations=void 0,B.BattleCalculations=Symbol("IBattleCalculations")},94167:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.SimStateUpdateManager=void 0;var F=U(17498),G=U(79687),j=U(58690),$=function(k){function B(){return null!==k&&k.apply(this,arguments)||this}return F.__extends(B,k),B.prototype.addToBack=function(){for(var k,B=[],U=0;U{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.SPELL_LEVEL_SPEED_PREFIX=B.SPELL_LEVEL_POWER_PREFIX=B.SPELL_LEVEL_FIELD=void 0,B.SPELL_LEVEL_FIELD="level",B.SPELL_LEVEL_POWER_PREFIX="pwr",B.SPELL_LEVEL_SPEED_PREFIX="spd"},52431:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.SpellLevelBonusConstants=void 0;var F=U(17498),G=U(79687),j=U(13135),$=U(9546),H=U(57276),V=function(){function k(){}return k.prototype.getSpeedLevelBonus=function(k,B){var U=this._spellLevelDataProvider.constants.casterLevelBonusConfigs,F=this.getSpeedField(B);if(!$.Util.isDefined(F))return 0;for(var G=1;G0?U[U.length-1].speed[F]:0},k.prototype.getPowerLevelBonus=function(k,B){var U=this._spellLevelDataProvider.constants.casterLevelBonusConfigs,F=this.getPowerField(B);if(!$.Util.isDefined(F))return 1;for(var G=1;G0?U[U.length-1].power[F]:1},k.prototype.getPowerField=function(k){return void 0!==k?"".concat(H.SPELL_LEVEL_POWER_PREFIX).concat(k):void 0},k.prototype.getSpeedField=function(k){return void 0!==k?"".concat(H.SPELL_LEVEL_SPEED_PREFIX).concat(k):void 0},k.prototype.getSpellSpeed=function(k){var B,U,F=null!==(B=this.getSpeedField(k.upgradeType))&&void 0!==B?B:"",G=$.Util.findFirstElementBelowThreshold(H.SPELL_LEVEL_FIELD,k.level,this._spellLevelDataProvider.constants.casterLevelBonusConfigs);return k.casterValue+k.spellBaseValue+(null!==(U=null==G?void 0:G.speed[F])&&void 0!==U?U:0)},k.prototype.getSpellPower=function(k){var B,U,F=null!==(B=this.getPowerField(k.upgradeType))&&void 0!==B?B:"",G=$.Util.findFirstElementBelowThreshold(H.SPELL_LEVEL_FIELD,k.level,this._spellLevelDataProvider.constants.casterLevelBonusConfigs);return k.casterValue*k.spellBaseValue*(null!==(U=null==G?void 0:G.power[F])&&void 0!==U?U:1)},k.prototype.getDisplaySpellPower=function(k,B){var U,F,G,j,H,V=null!==(U=this._spellLevelDataProvider.constants.powerDisplayRoundToDecimals)&&void 0!==U?U:0;if(B){var W=null!==(F=this._spellLevelDataProvider.constants.powerDisplayHealRoundSignificance)&&void 0!==F?F:0;H="".concat($.Util.toFixedTrimmed($.Util.round(100*k,W),V),"%")}else H=$.Util.toFixedTrimmed($.Util.ceiling(k/(null!==(G=this._spellLevelDataProvider.constants.powerDisplayDivider)&&void 0!==G?G:1),null!==(j=this._spellLevelDataProvider.constants.powerDisplayCeiling)&&void 0!==j?j:1),V);return H},k.prototype.getDisplaySpellAccuracy=function(k){var B,U;return $.Util.ceiling(k/(null!==(B=this._spellLevelDataProvider.constants.speedDisplayDivider)&&void 0!==B?B:1),null!==(U=this._spellLevelDataProvider.constants.speedDisplayCeiling)&&void 0!==U?U:1).toString()},F.__decorate([(0,G.inject)(j.SpellLevelDataProvider),F.__metadata("design:type",Object)],k.prototype,"_spellLevelDataProvider",void 0),k=F.__decorate([(0,G.injectable)()],k)}();B.SpellLevelBonusConstants=V},51648:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.StateUpdateManager=void 0;var F=U(17498),G=U(79687),j=U(49042),$=U(58690),H=function(){function k(){this.stateUpdates=[]}return k.prototype.consume=function(k){var B=F.__spreadArray([],F.__read(this.stateUpdates),!1);return this.clearList(),null==k||k.dispatchEvent(j.EBattleEvent.StateUpdatesConsumed,B),B},k.prototype.addToBack=function(){for(var k,B=[],U=0;U0&&G[j].type===$.EBattleStateUpdate.EndBattle?G.splice(j-1,0,F):this.addToBack(F))},k=F.__decorate([(0,G.injectable)()],k)}();B.StateUpdateManager=H},16779:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(51448),B),F.__exportStar(U(10424),B),F.__exportStar(U(15907),B),F.__exportStar(U(79152),B),F.__exportStar(U(8571),B),F.__exportStar(U(16104),B),F.__exportStar(U(16825),B),F.__exportStar(U(94167),B),F.__exportStar(U(57276),B),F.__exportStar(U(52431),B),F.__exportStar(U(51648),B)},94820:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BattleContainer=void 0;var F=U(17498),G=U(79687),j=U(36700),$=U(41334),H=U(26036),V=U(13135),W=U(99928),q=U(13435),K=U(68688),z=U(95142),Y=U(82825),Q=U(35223),X=U(11282),Z=U(73566),J=U(12634),tt=U(87584),et=U(21073),it=U(89647),st=U(9546),nt=U(51448),at=U(51648),rt=U(52431),ot=U(8571),ht=function(k){function B(U){var st=k.call(this)||this;return st.bind(G.Container).toConstantValue(st),st.bind(B).toConstantValue(st),st.bind(at.StateUpdateManager).toSelf().inSingletonScope(),st.bind(H.ConstantsDataProvider).to(H.HardCodedConstantsDataProvider).inSingletonScope(),st.bind(V.SpellLevelDataProvider).to(V.HardCodedSpellLevelDataProvider).inSingletonScope(),st.bind(W.CombatFormulaScalingDataProvider).to(W.HardCodedCombatFormulaScalingDataProvider).inSingletonScope(),st.bind(nt.BattleConstants).toSelf().inSingletonScope(),st.bind(rt.SpellLevelBonusConstants).toSelf().inSingletonScope(),st.bind(ot.CombatFormulaScalingConstants).toSelf().inSingletonScope(),st.bind(J.SpellCastUtil).toSelf().inSingletonScope(),st.bind(q.BattleStateDataStore).to(z.InMemoryBattleStateDataStore).inSingletonScope(),st.bind($.BattleStateDataProvider).toSelf().inSingletonScope(),st.bind(j.AffixStateDataProvider).toSelf().inSingletonScope(),st.bind(Y.StatusEffectStateDataProvider).toSelf().inSingletonScope(),st.bind(K.SpellDataProvider).toDynamicValue(st.createCachedDynamicBinding(U)),st.bind(Z.UnitStateDataProvider).toDynamicValue(st.createCachedDynamicBinding((function(k){return new Z.UnitStateDataProvider(k,st.get($.BattleStateDataProvider))}))),st.bind(Q.TeamStateDataProvider).toDynamicValue(st.createCachedDynamicBinding((function(k){return new Q.TeamStateDataProvider(k,st.get($.BattleStateDataProvider))}))),st.bind(X.UnitSpellStateDataProvider).toDynamicValue(st.createCachedDynamicBinding((function(k){var B=F.__read(st.getDynamicBindingIdsFromName(k),2),U=B[0],G=B[1],j=st.getNamed(Z.UnitStateDataProvider,U);return new X.UnitSpellStateDataProvider(G,j)}))),st.bind(et.Unit).toDynamicValue(st.createCachedDynamicBinding((function(k){return new et.Unit(k,st)}))),st.bind(tt.Team).toDynamicValue(st.createCachedDynamicBinding((function(k){return new tt.Team(k,st)}))),st.bind(it.UnitSpell).toDynamicValue(st.createCachedDynamicBinding((function(k){var B=F.__read(st.getDynamicBindingIdsFromName(k),2),U=B[0],G=B[1];return new it.UnitSpell(U,G,st)}))),st}return F.__extends(B,k),B.prototype.getByIds=function(k){for(var B=[],U=1;U{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.injectOnDemand=void 0;var F=U(79687),G=U(9546),j="__container__";B.injectOnDemand=function(k){return function(B,U,$){(0,F.inject)(F.Container)(B,j,$),Object.defineProperty(B,U,{get:function(){return G.Util.assertDefined(this.__container__,"injectOnDemand: Container not bound"),this.__container__.get(k)},configurable:!0})}}},16825:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(94820),B),F.__exportStar(U(49586),B)},36700:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.AffixStateDataProvider=void 0;var F=U(17498),G=U(79687),j=U(95891),$=U(81327),H=U(1191),V=U(18902),W=U(51448),q=U(51648),K=U(98239),z=U(58690),Y=U(54705),Q=U(387),X=U(9546),Z=U(50532),J=U(44503),tt=U(41334),et=U(82825),it=function(){function k(){this._affixesAddedThisTurn=[]}return k.prototype.endTurn=function(){this._affixesAddedThisTurn.length=0},k.prototype.getAffixesForUnit=function(k){return this._battleStateDataProvider.getAffixInstances().filter((function(B){return B.unitId===k}))},k.prototype.addAffix=function(k,B){void 0===B&&(B=!1),k.id||(k.id=X.Util.generateInstanceId()),this._battleStateDataProvider.getAffixInstances().push(k),this._affixesAddedThisTurn.push(k),B&&this._stateUpdateManager.addToBack({type:z.EBattleStateUpdate.AddAffix,affix:k})},k.prototype.removeAffixes=function(k,B){var U,G;void 0===B&&(B=!1);var $=j.remove(this._battleStateDataProvider.getAffixInstances(),k);if(B)try{for(var H=F.__values($),V=H.next();!V.done;V=H.next()){var W=V.value;this._stateUpdateManager.addToBack({type:z.EBattleStateUpdate.RemoveAffix,affixId:W.id}),this._statusEffectStateDataProvider.handleRemovedAffix(W.id)}}catch(q){U={error:q}}finally{try{V&&!V.done&&(G=H.return)&&G.call(H)}finally{if(U)throw U.error}}},k.prototype.removeAffix=function(k,B){void 0===B&&(B=!1),this.removeAffixes((function(B){return B.id===k.id}),B)},k.prototype.reduceAffixDuration=function(k,B,U){if(void 0===U&&(U=1),B.duration&&(!1!==B.duration.canReduceOnTurnAdded||!this._affixesAddedThisTurn.includes(B))){if(B.duration.remainingDuration-=U,B.duration.remainingDuration<=0){var F=this._statusEffectStateDataProvider.getStatusEffectForAffix(B.id);return this._statusEffectStateDataProvider.handleModifiedAffix(B.id,!1),H.AffixUtils.hasWhenToTrigger(B)&&B.whenToTrigger===V.EWhenToTrigger.WhenDurationExpires&&this.triggerAffix(k,B,F,!0),void this.removeAffix(B,!0)}this._stateUpdateManager.addToBack({type:z.EBattleStateUpdate.ModifyAffixDuration,affixId:B.id,remainingDuration:B.duration.remainingDuration}),this._statusEffectStateDataProvider.handleModifiedAffix(B.id,!0)}},k.prototype.triggerAffix=function(k,B,U,G){var j,V;if(void 0===G&&(G=!1),!k.isDefeated()){var W,q;if(X.Util.isDebugEnabled()){var K=-1,Y=-1;B.debug="",U&&(K=U.timesTriggered+1,Y=null!==(V=U.remainingDuration)&&void 0!==V?V:-1,B.debug+="Status Id: ".concat(U.statusEffectId,", ")),B.debug+="Trigger type: ".concat(B.type,"\n")+"target: ".concat(k.id,", duration left: ").concat(Y,", times triggered: ").concat(K,"\n")}switch(B.type){case $.EAffixType.ApplyDamage:W=this.applyDamage(k,B),q=B.element;break;case $.EAffixType.ApplyHealing:W=this.applyHealing(k,B);break;default:return}var Z=H.AffixUtils.handleAfterDamageAffixesForTarget(this,k),tt=[];k.isDefeated()&&(k.battleStatus=J.EUnitBattleStatus.Defeated,tt.push({type:z.EBattleStateUpdate.DefeatUnit,unitId:k.id,isRescued:!1})),U&&(U.timesTriggered+=1,(j=this._stateUpdateManager).addToBack.apply(j,F.__spreadArray(F.__spreadArray([{type:z.EBattleStateUpdate.TriggerStatusEffect,statusEffects:[U],hitData:W,element:q,isBeingRemoved:G}],F.__read(Z),!1),F.__read(tt),!1))),X.Util.isDebugEnabled()&&X.Util.isDefined(B.debug)&&(this._stateUpdateManager.addDebugMessage(Q.EDebugMessageType.StatusTrigger,B.debug),delete B.debug)}},k.prototype.applyDamage=function(k,B){var U=this._battleStateDataProvider.getUnitData(B.unitId);X.Util.assertDefined(U,"Unit data not found for affix with ID ".concat(B.id," and unit ID ").concat(B.unitId));var F=Math.random()*(B.damagePercentRange.max-B.damagePercentRange.min)+B.damagePercentRange.min,G=F*U.health.max,j=new K.SpellEffectInstance(null,k);if(B.element){var $=this._battleConstants.getSpellElementalMultiplier(B.element,k.element),V=this._battleConstants.getElementalAdvantage(B.element,k.element);V===Z.EElementalAdvantage.Strong?j.setDamageInformationFlag(Y.EDamageInformation.Effective):V===Z.EElementalAdvantage.Weak&&j.setDamageInformationFlag(Y.EDamageInformation.Ineffective),G*=$}return j.damage=G,H.AffixUtils.handleAffixesForTarget(this,null,k,[j]),j.damage=Math.ceil(j.damage),this._debugMode||(U.health.current-=j.damage),X.Util.isDebugEnabled()&&(B.debug+="Percent Roll: ".concat(F,", Range: ").concat(B.damagePercentRange.min,"-").concat(B.damagePercentRange.max,"\n")+"Trigger: ".concat(B.whenToTrigger,"\n")+"Element: ".concat(B.element,", Bonus Applied: ").concat(1,"\n")+"PreAffix Damage: ".concat(G,", Final: ").concat(j.damage,", Final Percent: ").concat(j.damage/k.maxHealth,"\n")),{damage:j.damage,damageInformation:j.damageInformation,hpResult:U.health.current}},k.prototype.applyHealing=function(k,B){var U=this._battleStateDataProvider.getUnitData(B.unitId);X.Util.assertDefined(U,"Unit data not found for affix with ID ".concat(B.id," and unit ID ").concat(B.unitId));var F=Math.random()*(B.healingPercentRange.max-B.healingPercentRange.min)+B.healingPercentRange.min,G=-1*F*U.health.max,j=new K.SpellEffectInstance(null,k);return j.damage=G,j.damageInformation=Y.EDamageInformation.Heal,H.AffixUtils.handleAffixesForTarget(this,null,k,[j]),j.damage=Math.ceil(j.damage),this._debugMode||(U.health.current=Math.min(U.health.max,U.health.current-j.damage)),X.Util.isDebugEnabled()&&(B.debug+="Percent Roll: ".concat(F,", Range: ").concat(B.healingPercentRange.min,"-").concat(B.healingPercentRange.max)+"Trigger: ".concat(B.whenToTrigger,"\n")+"PreAffix Heal: ".concat(G,", Final: ").concat(j.damage,"\n")),{damage:j.damage,damageInformation:j.damageInformation,hpResult:U.health.current}},k.prototype.setDebugMode=function(k){this._debugMode=k},F.__decorate([(0,G.inject)(tt.BattleStateDataProvider),F.__metadata("design:type",tt.BattleStateDataProvider)],k.prototype,"_battleStateDataProvider",void 0),F.__decorate([(0,G.inject)(q.StateUpdateManager),F.__metadata("design:type",q.StateUpdateManager)],k.prototype,"_stateUpdateManager",void 0),F.__decorate([(0,G.inject)(et.StatusEffectStateDataProvider),F.__metadata("design:type",et.StatusEffectStateDataProvider)],k.prototype,"_statusEffectStateDataProvider",void 0),F.__decorate([(0,G.inject)(W.BattleConstants),F.__metadata("design:type",W.BattleConstants)],k.prototype,"_battleConstants",void 0),k=F.__decorate([(0,G.injectable)()],k)}();B.AffixStateDataProvider=it},44503:(k,B)=>{"use strict";var U,F,G;Object.defineProperty(B,"__esModule",{value:!0}),B.EUnitBattleStatus=B.EDivisor=B.EStat=void 0,function(k){k.Hp="hp",k.Mp="mp",k.Power="power",k.Defence="defence",k.Speed="speed",k.Initiative="initiative",k.Accuracy="accuracy",k.Dodge="dodge",k.DodgeDamage="dodgeDamage",k.CritChance="critChance",k.CritDamage="critDamage"}(U||(B.EStat=U={})),function(k){k.Level="level",k.Aoa="aoa",k.Physical="physical",k.Magical="magical",k.Critical="speedCrit",k.EnemyNerf="enemyNerf",k.MergeRank="mergeRank"}(F||(B.EDivisor=F={})),function(k){k.Active="active",k.Defeated="defeated",k.Rescued="rescued"}(G||(B.EUnitBattleStatus=G={}))},41334:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BattleStateDataProvider=void 0;var F=U(17498),G=U(79687),j=U(9546),$=U(13435),H=function(){function k(){}return k.prototype.setUnitData=function(k,B){this._battleStateDataStore.getObjectOrDefault("units",(function(){return{}}))[k]=B},k.prototype.getUnitData=function(k){var B;return null===(B=this._battleStateDataStore.getObject("units"))||void 0===B?void 0:B[k]},k.prototype.deleteUnitData=function(k){var B;null===(B=this._battleStateDataStore.getObject("units"))||void 0===B||delete B[k]},k.prototype.getUnitsOnTeam=function(k){var B=this._battleStateDataStore.getObject("units");return j.Util.assertDefined(B,"No units exist"),Object.keys(B).filter((function(U){return B[U].teamId===k}))},k.prototype.getUnitDataForTeam=function(k){var B=this._battleStateDataStore.getObject("units");return j.Util.assertDefined(B,"No units exist"),Object.values(B).filter((function(B){return B.teamId===k}))},k.prototype.getUnitIds=function(){var k=this._battleStateDataStore.getObject("units");return j.Util.assertDefined(k,"No units exist"),Object.keys(k)},k.prototype.setTeamData=function(k,B){this._battleStateDataStore.getObjectOrDefault("teams",(function(){return{}}))[k]=B},k.prototype.getTeamData=function(k){var B;return null===(B=this._battleStateDataStore.getObject("teams"))||void 0===B?void 0:B[k]},k.prototype.getTeamIds=function(){var k=this._battleStateDataStore.getObject("teams");return j.Util.assertDefined(k,"No teams exist"),Object.keys(k)},k.prototype.getAffixInstances=function(){return this._battleStateDataStore.getObjectOrDefault("affixes",(function(){return[]}))},k.prototype.getStatusEffectInstances=function(){return this._battleStateDataStore.getObjectOrDefault("statusEffects",(function(){return[]}))},F.__decorate([(0,G.inject)($.BattleStateDataStore),F.__metadata("design:type",Object)],k.prototype,"_battleStateDataStore",void 0),k=F.__decorate([(0,G.injectable)()],k)}();B.BattleStateDataProvider=H},99928:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.HardCodedCombatFormulaScalingDataProvider=B.CombatFormulaScalingDataProvider=void 0;var F=U(17498),G=U(79687);B.CombatFormulaScalingDataProvider=Symbol("ICombatFormulaScalingDataProvider");var j=function(){function k(){}var B;return B=k,Object.defineProperty(k.prototype,"constants",{get:function(){return B.DEFAULT_CONSTANTS},enumerable:!1,configurable:!0}),k.DEFAULT_CONSTANTS={damageAveragePower:1,defenceAveragePower:1,casterLevelBonusConfigs:[{level:0,chanceToHitFormulaCoef1:1,chanceToHitFormulaCoef2:1,defenceFormulaCoef:2,defenceExponent:-.649512743064356,damageAverage:120,defenceAverage:.1057777778},{level:20,chanceToHitFormulaCoef1:6.905378704,chanceToHitFormulaCoef2:2.520833333,defenceFormulaCoef:2,defenceExponent:-.671129653966679,damageAverage:333,defenceAverage:.06574960128}]},k=B=F.__decorate([(0,G.injectable)()],k)}();B.HardCodedCombatFormulaScalingDataProvider=j},26036:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.HardCodedConstantsDataProvider=B.ConstantsDataProvider=void 0;var F=U(17498),G=U(79687),j=U(56132);B.ConstantsDataProvider=Symbol("IConstantsDataProvider");var $=function(){function k(){}var B;return B=k,Object.defineProperty(k.prototype,"constants",{get:function(){return B.DEFAULT_CONSTANTS},enumerable:!1,configurable:!0}),k.DEFAULT_CONSTANTS={baseLevelMinimum:1,baseLevelMaximum:100,baseLevelMaximumConfig:{regular:100,hard:150,expert:200},aoaSpellId:"1100",rescueSpellId:"1101",fumbleSpellId:"1103",multipliers:{physical:1.2,stabElement:.2,criticalHit:.5,critChance:1,finalDamage:1,enemyNerf:{min:.65,bonus:.35},hitChanceScaling:{chanceHitOffset:.78,chanceHitCoefSquared:-32e-8,chanceHitCoefPrime:.0015}},minimumHitChance:.25,maximumHitChance:1,primaryStatModifier:{tier1:.25,tier2:.4},secondaryStatModifier:{tier1:.15,tier2:.25},equipmentModifierBaseValues:{health:500,power:500},divisors:{level:25,physical:5,magical:75,aoa:33,speedCrit:50,enemyNerf:20,mergeRank:10},damageRange:{aoa:{min:100,max:1e3},spell:{min:1,max:999}},elementalMultiplier:[{name:j.EElementType.Physical,weakness:j.EElementType.Shadow,resistance:j.EElementType.Physical,data:{physical:.75,fire:1,ice:1,plant:1,storm:1,water:1,shadow:1,astral:1.25,neutral:1}},{name:j.EElementType.Fire,weakness:j.EElementType.Water,resistance:j.EElementType.Ice,data:{physical:1,fire:.75,ice:2,plant:1,storm:1,water:.5,shadow:.75,astral:1,neutral:1}},{name:j.EElementType.Ice,weakness:j.EElementType.Fire,resistance:j.EElementType.Plant,data:{physical:1,fire:.5,ice:.75,plant:2,storm:1,water:1,shadow:.75,astral:1,neutral:1}},{name:j.EElementType.Plant,weakness:j.EElementType.Ice,resistance:j.EElementType.Storm,data:{physical:1,fire:1,ice:.5,plant:.75,storm:2,water:1,shadow:.75,astral:1,neutral:1}},{name:j.EElementType.Storm,weakness:j.EElementType.Plant,resistance:j.EElementType.Water,data:{physical:1,fire:1,ice:1,plant:.5,storm:.75,water:2,shadow:.75,astral:1,neutral:1}},{name:j.EElementType.Water,weakness:j.EElementType.Storm,resistance:j.EElementType.Fire,data:{physical:1,fire:2,ice:1,plant:1,storm:.5,water:.75,shadow:.75,astral:1,neutral:1}},{name:j.EElementType.Shadow,weakness:j.EElementType.Astral,resistance:j.EElementType.Physical,data:{physical:1.5,fire:1.25,ice:1.25,plant:1.25,storm:1.25,water:1.25,shadow:1,astral:.75,neutral:1}},{name:j.EElementType.Astral,weakness:j.EElementType.Physical,resistance:j.EElementType.Shadow,data:{physical:1,fire:.75,ice:.75,plant:.75,storm:.75,water:.75,shadow:2,astral:1,neutral:1}},{name:j.EElementType.Neutral,data:{physical:1,fire:1,ice:1,plant:1,storm:1,water:1,shadow:1,astral:1,neutral:1}}],rescue:{damageThreshold:.5},minPlayerHeartsOnEndBattle:20,ai:{accuracyPenalty:{max:.3,levelCap:33},fumbleChanceIncrease:.05},difficultyStreak:{min:-3,max:10},difficultyStreakBench:{min:-1,max:7},difficultyStreakLoseStep:.1,difficultyStreakWinStep:.025,xp:{base:10,miniBoss:30,singularBoss:200,repeatableBoss:100,illusionBoss:333,finalBoss:1e3,cloakedWizard:80,pippet:30,mythic:30,titan:30},unitStatDefaults:{initiative:5}},k=B=F.__decorate([(0,G.injectable)()],k)}();B.HardCodedConstantsDataProvider=$},13435:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.BattleStateDataStore=void 0,B.BattleStateDataStore=Symbol("IBattleStateDataStore")},68688:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.SpellDataProvider=void 0,B.SpellDataProvider=Symbol("ISpellDataProvider")},95142:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.InMemoryBattleStateDataStore=void 0;var F=U(17498),G=U(79687),j=function(){function k(){this._data={}}return k.prototype.getObject=function(k){return this._data[k]},k.prototype.setObject=function(k,B){return this._data[k]=B},k.prototype.getObjectOrDefault=function(k,B){var U,F;return null!==(U=(F=this._data)[k])&&void 0!==U?U:F[k]=B()},k=F.__decorate([(0,G.injectable)()],k)}();B.InMemoryBattleStateDataStore=j},91549:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.SimulateDebugUtil=void 0;var F=U(17498),G=U(1191),j=U(51648),$=U(24599),H=U(9546),V=U(51448),W=U(81327),q=U(82825),K=U(36700),z=function(){function k(){}return k.debugTriggerAllAffixes=function(k,B){var U,z,Y,Q,X=k.get(K.AffixStateDataProvider),Z=k.get(j.StateUpdateManager),J=k.get($.BattleController),tt=k.get(q.StatusEffectStateDataProvider),et="Status Sim running for ".concat(B.numberOfTimesToTrigger,"\n");X.setDebugMode(!0);try{for(var it=F.__values(J.getUnits()),st=it.next();!st.done;st=it.next()){var nt=st.value;try{for(var at=(Y=void 0,F.__values(X.getAffixesForUnit(nt.id))),rt=at.next();!rt.done;rt=at.next()){var ot=rt.value;if(G.AffixUtils.hasWhenToTrigger(ot)&&(!H.Util.isDefined(B.whenToTriggerFilter)||ot.whenToTrigger===B.whenToTriggerFilter)){et+="\nStatus ".concat(ot.type," on Unit ").concat(nt.id,"\n");for(var ht=0,ct=Number.MAX_VALUE,dt=0,lt=0;lt0;){var ut=Z.shiftState();ut.hitData&&(Math.abs(ut.hitData.damage)dt&&(dt=ut.hitData.damage),ht+=ut.hitData.damage)}if(ot.type===W.EAffixType.ApplyDamage&&ot.element){var ft=k.get(V.BattleConstants).getSpellElementalMultiplier(ot.element,nt.element);et+="Status Element: ".concat(ot.element,", Multiplier: ").concat(ft,"\n")}et+="Min Damage Rolled: ".concat(ct,", Min Percent: ").concat((ct/nt.maxHealth).toFixed(2),",\n")+"Max Damage Rolled: ".concat(dt,", Max Percent: ").concat((dt/nt.maxHealth).toFixed(2),",\n")+"Average Damage: ".concat(ht/B.numberOfTimesToTrigger,", ")+"Average Percent: ".concat((ht/B.numberOfTimesToTrigger/nt.maxHealth).toFixed(2),"\n")}}}catch(bt){Y={error:bt}}finally{try{rt&&!rt.done&&(Q=at.return)&&Q.call(at)}finally{if(Y)throw Y.error}}}}catch(pt){U={error:pt}}finally{try{st&&!st.done&&(z=it.return)&&z.call(it)}finally{if(U)throw U.error}}return X.setDebugMode(!1),et},k}();B.SimulateDebugUtil=z},13135:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.HardCodedSpellLevelDataProvider=B.SpellLevelDataProvider=void 0;var F=U(17498),G=U(79687);B.SpellLevelDataProvider=Symbol("ISpellLevelDataProvider");var j=function(){function k(){}var B;return B=k,Object.defineProperty(k.prototype,"constants",{get:function(){return B.DEFAULT_CONSTANTS},enumerable:!1,configurable:!0}),k.DEFAULT_CONSTANTS={casterLevelBonusConfigs:[{level:0,speed:{spdSingleHits1:1,spdAOEHits1:1,spdSingleHits2:1,spdAOEHits2:1,spdSingleHits3:1,spdAOEHits3:1,spdSingleHits4:1,spdAOEHits4:1,spdSingleHits5:1,spdAOEHits5:1,spdNoDmgSingle:1,spdNoDmgAOE:1},power:{pwrSingleHits1:1,pwrAOEHits1:1,pwrSingleHits2:1,pwrAOEHits2:1,pwrSingleHits3:1,pwrAOEHits3:1,pwrSingleHits4:1,pwrAOEHits4:1,pwrSingleHits5:1,pwrAOEHits5:1,pwrNoDmgSingle:1,pwrNoDmgAOE:1}},{level:5,speed:{spdSingleHits1:1.2,spdAOEHits1:1.2,spdSingleHits2:1.2,spdAOEHits2:1.2,spdSingleHits3:1.2,spdAOEHits3:1.2,spdSingleHits4:1.2,spdAOEHits4:1.2,spdSingleHits5:1.2,spdAOEHits5:1.2,spdNoDmgSingle:1,spdNoDmgAOE:1},power:{pwrSingleHits1:1,pwrAOEHits1:1,pwrSingleHits2:1,pwrAOEHits2:1,pwrSingleHits3:1,pwrAOEHits3:1,pwrSingleHits4:1,pwrAOEHits4:1,pwrSingleHits5:1,pwrAOEHits5:1,pwrNoDmgSingle:1,pwrNoDmgAOE:1}}]},k=B=F.__decorate([(0,G.injectable)()],k)}();B.HardCodedSpellLevelDataProvider=j},82825:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.StatusEffectStateDataProvider=void 0;var F=U(17498),G=U(79687),j=U(95891),$=U(51648),H=U(58690),V=U(9546),W=U(41334),q=function(){function k(){}return k.prototype.getAllStatusEffects=function(){return this._battleStateDataProvider.getStatusEffectInstances()},k.prototype.getStatusEffectsForUnit=function(k){return this.getAllStatusEffects().filter((function(B){return B.unitId===k}))},k.prototype.getStatusEffectForAffix=function(k){return this.getAllStatusEffects().find((function(B){return B.affixIds.includes(k)}))},k.prototype.addStatusEffect=function(k,B){void 0===B&&(B=!1),k.id||(k.id=V.Util.generateInstanceId()),this.getAllStatusEffects().push(k);var U={type:H.EBattleStateUpdate.AddStatusEffect,statusEffects:[j.clone(k)],intendedTargets:[]};return B&&this._stateUpdateManager.addToBack(U),U},k.prototype.removeStatusEffects=function(k,B){var U;void 0===B&&(B=!1);var G=j.remove(this.getAllStatusEffects(),k).map((function(k){return{type:H.EBattleStateUpdate.RemoveStatusEffect,statusEffects:[k]}}));return B&&(U=this._stateUpdateManager).addToBack.apply(U,F.__spreadArray([],F.__read(G),!1)),G},k.prototype.removeStatusEffect=function(k,B){void 0===B&&(B=!1);var U=this.removeStatusEffects((function(B){return B.id===k.id}),B);return U.length>0?U[0]:null},k.prototype.handleRemovedAffix=function(k){var B=this;this.getAllStatusEffects().forEach((function(U){var F=U.affixIds.indexOf(k);-1!==F&&U.affixIds.splice(F,1),0===U.affixIds.length&&B.removeStatusEffect(U,!0)}))},k.prototype.handleModifiedAffix=function(k,B){var U=this;this.getAllStatusEffects().forEach((function(F){if(F.affixIds.includes(k)){var G=0;U._battleStateDataProvider.getAffixInstances().forEach((function(k){var B,U,j=null!==(U=null===(B=k.duration)||void 0===B?void 0:B.remainingDuration)&&void 0!==U?U:0;F.affixIds.includes(k.id)&&j>G&&(G=j)}));var j=G!==F.remainingDuration;F.remainingDuration=G,B&&j&&U._stateUpdateManager.addToBack({type:H.EBattleStateUpdate.ModifyStatusEffect,statusEffects:[F]})}}))},F.__decorate([(0,G.inject)(W.BattleStateDataProvider),F.__metadata("design:type",W.BattleStateDataProvider)],k.prototype,"_battleStateDataProvider",void 0),F.__decorate([(0,G.inject)($.StateUpdateManager),F.__metadata("design:type",$.StateUpdateManager)],k.prototype,"_stateUpdateManager",void 0),k=F.__decorate([(0,G.injectable)()],k)}();B.StatusEffectStateDataProvider=q},35223:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.TeamStateDataProvider=void 0;var F=U(9546),G=function(k,B){var U=B.getTeamData(k);F.Util.assertDefined(U,"No data for team ".concat(k)),this.teamStateData=U};B.TeamStateDataProvider=G},11282:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.UnitSpellStateDataProvider=void 0;var F=U(9546),G=function(k,B){var U=B.unitStateData.spells.find((function(B){return B.spellId===k}));F.Util.assertDefined(U,"Unit does not have access to spell ".concat(k)),this.unitSpellStateData=U};B.UnitSpellStateDataProvider=G},73566:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.UnitStateDataProvider=void 0;var F=U(9546),G=function(k,B){var U=B.getUnitData(k);F.Util.assertDefined(U,"No data for unit ".concat(k)),this.unitStateData=U};B.UnitStateDataProvider=G},95448:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(36700),B),F.__exportStar(U(91549),B),F.__exportStar(U(44503),B),F.__exportStar(U(41334),B),F.__exportStar(U(99928),B),F.__exportStar(U(26036),B),F.__exportStar(U(13435),B),F.__exportStar(U(68688),B),F.__exportStar(U(95142),B),F.__exportStar(U(82825),B),F.__exportStar(U(13135),B),F.__exportStar(U(35223),B),F.__exportStar(U(11282),B),F.__exportStar(U(73566),B)},49042:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.EBattleEvent=void 0;var U=function(){function k(){}return k.NewRoundStarted=Symbol("NewRoundStarted"),k.CastingSpell=Symbol("CastingSpell"),k.AddingCastSpellStateUpdate=Symbol("AddingCastSpellStateUpdate"),k.StateUpdatesConsumed=Symbol("StateUpdatesConsumed"),k}();B.EBattleEvent=U},12073:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),U(17498).__exportStar(U(49042),B)},47547:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(40783),B),F.__exportStar(U(38126),B),F.__exportStar(U(21889),B),F.__exportStar(U(16779),B),F.__exportStar(U(95448),B),F.__exportStar(U(12073),B),F.__exportStar(U(24439),B),F.__exportStar(U(4497),B),F.__exportStar(U(38041),B),F.__exportStar(U(18035),B),F.__exportStar(U(77536),B)},38641:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.Spell=void 0;var U=function(){function k(k){this._schema=k}return Object.defineProperty(k.prototype,"id",{get:function(){return this._schema.id},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"name",{get:function(){return this._schema.name},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"element",{get:function(){return this._schema.element},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"energyCost",{get:function(){return this._schema.cost},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"target",{get:function(){return this._schema.target},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"delivery",{get:function(){return this._schema.delivery},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"baseDamage",{get:function(){return this._schema.damage},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"accuracy",{get:function(){return this._schema.accuracy},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"accuracySpeedBonus",{get:function(){var k;return null!==(k=this._schema.accuracySpeedBonus)&&void 0!==k?k:0},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"critical",{get:function(){return this._schema.critical},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"hitCount",{get:function(){var k;return null!==(k=this._schema.hits)&&void 0!==k?k:1},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"warmup",{get:function(){var k;return null!==(k=this._schema.warmup)&&void 0!==k?k:0},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"upgradeType",{get:function(){var k;return null!==(k=this._schema.upgradeType)&&void 0!==k?k:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"cooldown",{get:function(){var k;return null!==(k=this._schema.cooldown)&&void 0!==k?k:0},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"statusEffects",{get:function(){var k;return null!==(k=this._schema.statusEffects)&&void 0!==k?k:[]},enumerable:!1,configurable:!0}),k.prototype.getFlags=function(){var k,B;return null!==(B=null===(k=this._schema.flags)||void 0===k?void 0:k.filter((function(k){return k.flag})))&&void 0!==B?B:[]},k.prototype.findFlag=function(k){var B;return null===(B=this._schema.flags)||void 0===B?void 0:B.find((function(B){return B.flag===k}))},k.prototype.hasFlag=function(k){var B=Array.isArray(k)?k:[k];return this.getFlags().some((function(k){return B.includes(k.flag)}))},Object.defineProperty(k.prototype,"affixes",{get:function(){return Array.isArray(this._schema.affixes)?this._schema.affixes:[]},enumerable:!1,configurable:!0}),k}();B.Spell=U},12634:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.SpellCastUtil=void 0;var F=U(17498),G=U(79687),j=U(95891),$=U(81327),H=U(1191),V=U(24599),W=U(51448),q=U(15907),K=U(8571),z=U(52431),Y=U(51648),Q=U(36700),X=U(44503),Z=U(68688),J=U(87584),tt=U(41866),et=U(54705),it=U(387),st=U(56132),nt=U(50532),at=U(47747),rt=U(89647),ot=U(9546),ht=U(98239),ct=U(88250),dt=U(66020),lt=function(){function k(){this.bossStatGrowths=[at.EStatGrowthTrackName.Boss,at.EStatGrowthTrackName.Miniboss,at.EStatGrowthTrackName.IllusionBoss,at.EStatGrowthTrackName.DragonBoss,at.EStatGrowthTrackName.PuppetMaster,at.EStatGrowthTrackName.Pippet]}return k.prototype.generateSpellEffects=function(k,B,U){var F,G=this,j=B instanceof rt.UnitSpell?B:void 0,$=null!==(F=null==j?void 0:j.unit)&&void 0!==F?F:null,H=[],V=[];return U.forEach((function(U){for(var F=!1,W=0;W0&&(q.damage=G.commonBaseDamage($,U,j),G.calculateMultipliers($,U,j,q),q.isDamageInformationFlagSet(et.EDamageInformation.Heal)||(q.damage=G.limitDamage(j,q.damage,U))),q.damage=Math.round(q.damage),G.generateAffixApplication(B,q),H.push(q),q.isDamageInformationFlagSet(et.EDamageInformation.Dodge)||(V.push(q),F||(F=!0,G.applyStatusEffect(k,B,q)))}})),this.handleAffixes($,H),H},k.prototype.calculateHitChance=function(k,B,U){var F,G,$=this.calculateSpellAccuracy(U),H=B.getStat(X.EStat.Speed),V=this._battleConstants.chanceHitCoefSquared,W=null!==(F=this._combatFormulaScalingConstants.getChanceToHitCoef1(k.level))&&void 0!==F?F:1,q=null!==(G=this._combatFormulaScalingConstants.getChanceToHitCoef2(k.level))&&void 0!==G?G:1,K=$-H,z=this._battleConstants.chanceHitCoefPrime,Y=this._battleConstants.chanceHitOffset,Q=V/W*Math.pow(K,2)+z/q*K+Y;return Q+=k.getStat(X.EStat.Accuracy)-B.getStat(X.EStat.Dodge),j.clamp(Q,this._battleConstants.minimumHitChance,this._battleConstants.maximumHitChance)},k.prototype.calculateSpellAccuracy=function(k){var B=k.unit.getStat(X.EStat.Speed);return this._spellLevelBonusConstants.getSpellSpeed({casterValue:B,spellBaseValue:k.accuracySpeedBonus,upgradeType:k.upgradeType,level:k.unit.level})},k.prototype.applySpellEffectsToTarget=function(k){var B,U,G,$,H,V,W,q;if(!k.isDamageInformationFlagSet(et.EDamageInformation.Missed)){var K=k.target;if(!K.isDefeated()){try{for(var z=F.__values(k.flags),Y=z.next();!Y.done;Y=z.next()){switch((Z=Y.value).flag){case ct.ESpellFlag.ChangeMp:Z.flagValue&&(K.mp=j.clamp(K.mp+Z.flagValue,0,K.maxMp))}}}catch(at){B={error:at}}finally{try{Y&&!Y.done&&(U=z.return)&&U.call(z)}finally{if(B)throw B.error}}if(K.health-=k.damage,!K.isDefeated())try{for(var Q=F.__values(k.flags),X=Q.next();!X.done;X=Q.next()){var Z;switch((Z=X.value).flag){case ct.ESpellFlag.Rescue:this._battleController.removeUnit(K.id);break;case ct.ESpellFlag.StealUnit:k.caster&&(K.teamId=k.caster.teamId)}}}catch(rt){G={error:rt}}finally{try{X&&!X.done&&($=Q.return)&&$.call(Q)}finally{if(G)throw G.error}}try{for(var J=F.__values(k.affixes),tt=J.next();!tt.done;tt=J.next()){var it=tt.value;K.isDefeated()&&K.id===it.unitId||this._affixStateDataProvider.addAffix(it)}}catch(ot){H={error:ot}}finally{try{tt&&!tt.done&&(V=J.return)&&V.call(J)}finally{if(H)throw H.error}}try{for(var st=F.__values(k.removedAffixes),nt=st.next();!nt.done;nt=st.next()){it=nt.value;K.isDefeated()&&K.id===it.unitId||this._affixStateDataProvider.removeAffix(it)}}catch(ht){W={error:ht}}finally{try{nt&&!nt.done&&(q=st.return)&&q.call(st)}finally{if(W)throw W.error}}}}},k.prototype.getValidSpellTargets=function(k,B){try{var U=this.getUnitsFromTeamType(k,B.target.team,B.unit.teamId);return this.filterUnitsFromUnitType(B.target.unit,U,B.unit.id)}catch(F){throw new q.BattleError("Error getting valid spell targets for spell ".concat(B.id,": ").concat(F))}},k.prototype.getUnitsFromTeamType=function(k,B,U){var G=[];switch(B){case dt.ESpellTeamTarget.Enemy:G.push.apply(G,F.__spreadArray([],F.__read(k.get(V.BattleController).getTeams().filter((function(k){return k.id!==U}))),!1));break;case dt.ESpellTeamTarget.Own:G.push(k.getNamed(J.Team,U));break;case dt.ESpellTeamTarget.Any:case dt.ESpellTeamTarget.All:G.push.apply(G,F.__spreadArray([],F.__read(k.get(V.BattleController).getTeams()),!1));break;default:throw new q.BattleError("Invalid team target type ".concat(B))}return j.flatMap(G,(function(k){return k.getMembers()})).filter((function(k){return!k.isDefeated()}))},k.prototype.filterUnitsFromUnitType=function(k,B,U){return B.filter((function(B){switch(k){case dt.ESpellUnitTarget.Self:return B.id===U;case dt.ESpellUnitTarget.Ally:case dt.ESpellUnitTarget.Allies:return B.id!==U;case dt.ESpellUnitTarget.Single:case dt.ESpellUnitTarget.Team:case dt.ESpellUnitTarget.Row:case dt.ESpellUnitTarget.Random:break;default:throw new q.BattleError("Invalid unit target type ".concat(k))}return!0}))},k.prototype.hasValidSpellOption=function(k,B){var U,F=this;return null===(U=B.currentLoadout)||void 0===U?void 0:U.map((function(k){return B.spells.find((function(B){return B.id===k}))})).some((function(U){if(0!==U.currentCooldown||U.isLocked)return!1;var G=F._battleController.getTeams().find((function(k){return k.getMembers().includes(B)}));return ot.Util.assertDefined(G,'Unit "'.concat(B.id,'" is not in an active team.')),F.getValidSpellTargets(k,U).some((function(k){return!k.isDefeated()}))}))},k.prototype.handleAffixes=function(k,B){var U,G,V,W;if(k&&this._affixStateDataProvider.getAffixesForUnit(k.id).find((function(k){return k.type===$.EAffixType.OneHitKill})))try{for(var q=F.__values(B),K=q.next();!K.done;K=q.next()){var z=K.value;this._affixStateDataProvider.getAffixesForUnit(z.target.id).some((function(k){return k.type===$.EAffixType.AlwaysDodge}))||(z.isDamageInformationFlagSet(et.EDamageInformation.Heal)||(z.damage=90001,z.clearDamageInformationFlag(et.EDamageInformation.Missed)))}}catch(J){U={error:J}}finally{try{K&&!K.done&&(G=q.return)&&G.call(q)}finally{if(U)throw U.error}}var Y=j.uniq(j.map(B,"target"));try{for(var Q=F.__values(Y),X=Q.next();!X.done;X=Q.next()){var Z=X.value;H.AffixUtils.handleAffixesForTarget(this._affixStateDataProvider,k,Z,B)}}catch(tt){V={error:tt}}finally{try{X&&!X.done&&(W=Q.return)&&W.call(Q)}finally{if(V)throw V.error}}},k.prototype.generateAffixApplication=function(k,B){var U,G,$;try{for(var H=F.__values(k.affixes),V=H.next();!V.done;V=H.next()){var W=V.value;(null!==($=W.requireHit)&&void 0!==$&&!$||!B.isDamageInformationFlagSet(et.EDamageInformation.Missed)&&!B.isDamageInformationFlagSet(et.EDamageInformation.Dodge))&&(ot.Util.isDefined(W.chance)&&Math.random()>W.chance||B.affixes.push(F.__assign(F.__assign({},j.cloneDeep(W.affix)),{unitId:B.target.id})))}}catch(q){U={error:q}}finally{try{V&&!V.done&&(G=H.return)&&G.call(H)}finally{if(U)throw U.error}}},k.prototype.applyStatusEffect=function(k,B,U){var G,$;if(0!==B.statusEffects.length&&U.caster){var H=k.getNamed(Z.SpellDataProvider,B.id),V=function(G){var $,V,K=H.statusEffectData[G.statusEffectId];if(!K)throw new q.BattleError("Data for status effect ".concat(G.statusEffectId," not found for spell ").concat(B.id));var z=W.getStatusEffectTargets(k,G.targetType,U.caster,U.target),Y=function(k){var $,H=K.affixes;K.bossAffixes&&K.bossAffixes.length>0&&k.statGrowthTrack&&W.getIsStatGrowthBoss(k.statGrowthTrack)&&(H=K.bossAffixes);var V=H.map((function(B){return F.__assign(F.__assign({},j.cloneDeep(B)),{id:ot.Util.generateInstanceId(),unitId:k.id,duration:j.clone(G.duration)})}));($=U.affixes).push.apply($,F.__spreadArray([],F.__read(V),!1));var q=V.map((function(k){return k.id}));U.statusEffectsAdded.push({id:ot.Util.generateInstanceId(),unitId:k.id,statusEffectId:K.id,affixIds:q,timesTriggered:0,remainingDuration:G.duration.remainingDuration,spellId:B.id})};try{for(var Q=($=void 0,F.__values(z)),X=Q.next();!X.done;X=Q.next()){Y(X.value)}}catch(Z){$={error:Z}}finally{try{X&&!X.done&&(V=Q.return)&&V.call(Q)}finally{if($)throw $.error}}},W=this;try{for(var K=F.__values(B.statusEffects),z=K.next();!z.done;z=K.next()){V(z.value)}}catch(Y){G={error:Y}}finally{try{z&&!z.done&&($=K.return)&&$.call(K)}finally{if(G)throw G.error}}}},k.prototype.getStatusEffectTargets=function(k,B,U,F){var G=this.getUnitsFromTeamType(k,B.team,U.teamId),$=G.filter((function(k){return k!==U&&k!==F}));switch(B.unit){case dt.ESpellUnitTarget.Team:return G;case dt.ESpellUnitTarget.Allies:return $;case dt.ESpellUnitTarget.Self:return G.includes(U)?[U]:[];case dt.ESpellUnitTarget.Single:return G.includes(F)?[F]:[];case dt.ESpellUnitTarget.Random:return[j.sample(G)];case dt.ESpellUnitTarget.Ally:var H=j.sample($);return H?[H]:[];default:throw new q.BattleError("Status effect target unit type:".concat(B.unit," is unsupported"))}},k.prototype.processSpellFlags=function(k,B,U){U.flags=B.getFlags();var F=B.findFlag(ct.ESpellFlag.ChangeHp);F&&(U.damage=F.flagValue?-1*F.flagValue*k.maxHealth:0,U.setDamageInformationFlag(et.EDamageInformation.Heal))},k.prototype.limitDamage=function(k,B,U){return this._battleConstants.getDamageLimit(k.id===this._battleConstants.aoaSpellId).clamp(B)},k.prototype.calculateMultipliers=function(k,B,U,F){var G,H,V=this.getUnitElements(k);V.push(U.element);var W=this._battleConstants.getBestElementalAdvantageType(V,B.element,U.element),q=this._battleConstants.getSpellElementalMultiplier(W,B.element),K=this._battleConstants.getElementalAdvantage(W,B.element);K===nt.EElementalAdvantage.Strong?F.setDamageInformationFlag(et.EDamageInformation.Effective):K===nt.EElementalAdvantage.Weak&&F.setDamageInformationFlag(et.EDamageInformation.Ineffective);var z=k.getStat(X.EStat.Speed)>B.getStat(X.EStat.Speed)?k.getStat(X.EStat.Speed)-B.getStat(X.EStat.Speed):0,Y=0,Q=0,Z=U.findFlag(ct.ESpellFlag.NoDodge)?1:this.calculateHitChance(k,B,U);if(ot.Util.isDebugEnabled()){var J=null===(G=this._affixStateDataProvider.getAffixesForUnit(B.id).find((function(k){return k.type===$.EAffixType.AlwaysDodge||k.type===$.EAffixType.NeverDodge})))||void 0===G?void 0:G.type;J===$.EAffixType.AlwaysDodge?Z=0:J===$.EAffixType.NeverDodge&&(Z=1)}var st=z/this._battleConstants.getDivisor(X.EDivisor.Critical),at=this._battleConstants.criticalHitChanceBonus,rt=(k.getStat(X.EStat.CritChance)+st+this.getIncomingCritChanceBonus(B))*at;Math.random()<=Z?Math.random()0&&(j=(j+$*U.baseDamage*H)/(H+1));var V=this.calculateTargetDefenceRate(B);return U.element===st.EElementType.Physical&&(j*=this._battleConstants.physicalMultiplier),j*V},k.prototype.calculateSpellPower=function(k){var B=k.unit.getStat(X.EStat.Power);return this._spellLevelBonusConstants.getSpellPower({casterValue:B,spellBaseValue:k.baseDamage,upgradeType:k.upgradeType,level:k.unit.level})},k.prototype.calculateTargetDefenceRate=function(k){var B,U,F,G,j=k.getStat(X.EStat.Defence),$=null!==(B=this._combatFormulaScalingConstants.getDefenceFormulaCoef(k.level))&&void 0!==B?B:1,H=null!==(U=this._combatFormulaScalingConstants.getDefenceFormulaExponent(k.level))&&void 0!==U?U:1,V=$*Math.pow(j,H),W=null!==(F=this._combatFormulaScalingConstants.getDefenceLevelAverage(k.level))&&void 0!==F?F:0,q=null!==(G=this._combatFormulaScalingConstants.getDefenceAveragePower)&&void 0!==G?G:0;return W>0&&(V=(V+W*q)/(q+1)),V},k.prototype.getAdditiveDamageMultiplier=function(k,B){var U,G,j=this._affixStateDataProvider.getAffixesForUnit(k.id).filter((function(k){return k.type===$.EAffixType.AdditiveDamageMultiplier}));if(!j.length)return 0;var H=0;try{for(var V=F.__values(j),W=V.next();!W.done;W=V.next()){var q=W.value;q.element&&!ot.Util.singleOrArrayIncludes(B,q.element)||(H+=q.additiveMultiplier)}}catch(K){U={error:K}}finally{try{W&&!W.done&&(G=V.return)&&G.call(V)}finally{if(U)throw U.error}}return+H.toFixed(2)},k.prototype.getIncomingCritChanceBonus=function(k){var B,U,G=this._affixStateDataProvider.getAffixesForUnit(k.id).filter((function(k){return k.type===$.EAffixType.IncomingCritChanceBonus}));if(!G.length)return 0;var H=0;try{for(var V=F.__values(G),W=V.next();!W.done;W=V.next()){var q=W.value;H+=j.random(q.multiplier.min,q.multiplier.max)}}catch(K){B={error:K}}finally{try{W&&!W.done&&(U=V.return)&&U.call(V)}finally{if(B)throw B.error}}return+H.toFixed(2)},k.prototype.getUnitElements=function(k){var B=this._affixStateDataProvider.getAffixesForUnit(k.id).filter((function(k){return k.type===$.EAffixType.BonusElement})),U=[];return B.forEach((function(k){U.push(k.element)})),U},k.prototype.getIsStatGrowthBoss=function(k){return this.bossStatGrowths.includes(k)},F.__decorate([(0,G.inject)(W.BattleConstants),F.__metadata("design:type",W.BattleConstants)],k.prototype,"_battleConstants",void 0),F.__decorate([(0,G.inject)(z.SpellLevelBonusConstants),F.__metadata("design:type",z.SpellLevelBonusConstants)],k.prototype,"_spellLevelBonusConstants",void 0),F.__decorate([(0,G.inject)(K.CombatFormulaScalingConstants),F.__metadata("design:type",K.CombatFormulaScalingConstants)],k.prototype,"_combatFormulaScalingConstants",void 0),F.__decorate([(0,G.inject)(Q.AffixStateDataProvider),F.__metadata("design:type",Q.AffixStateDataProvider)],k.prototype,"_affixStateDataProvider",void 0),F.__decorate([(0,G.inject)(V.BattleController),F.__metadata("design:type",V.BattleController)],k.prototype,"_battleController",void 0),F.__decorate([(0,G.inject)(Y.StateUpdateManager),F.__metadata("design:type",Y.StateUpdateManager)],k.prototype,"_stateUpdateManager",void 0),k=F.__decorate([(0,G.injectable)()],k)}();B.SpellCastUtil=lt},98239:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.SpellEffectInstance=void 0;var F=U(54705),G=function(){function k(k,B){this.damage=0,this.damageInformation=F.EDamageInformation.None,this.flags=[],this.affixes=[],this.removedAffixes=[],this.statusEffectsAdded=[],this.caster=k,this.target=B}return k.prototype.isDamageInformationFlagSet=function(k){return(this.damageInformation&k)===k},k.prototype.setDamageInformationFlag=function(k){this.damageInformation|=k},k.prototype.clearDamageInformationFlag=function(k){this.damageInformation&=~k},k}();B.SpellEffectInstance=G},88250:(k,B)=>{"use strict";var U,F,G;Object.defineProperty(B,"__esModule",{value:!0}),B.ESpellDelivery=B.EAffixStatusEffect=B.ESpellFlag=void 0,function(k){k.ChangeHp="Change-HP",k.ChangeMp="Change-MP",k.Rescue="Rescue",k.StealUnit="Switch-Sides",k.ChangeCooldown="Change-Timers",k.NoDamage="No-Damage",k.NoDodge="No-Dodge"}(U||(B.ESpellFlag=U={})),function(k){k.Burning="burning",k.Confused="confused",k.Frozen="frozen",k.Regen="regen",k.Shocked="shocked"}(F||(B.EAffixStatusEffect=F={})),function(k){k.Melee="melee",k.Projectile="projectile",k.Above="above",k.Below="below",k.Direct="direct"}(G||(B.ESpellDelivery=G={}))},66020:(k,B)=>{"use strict";var U,F;Object.defineProperty(B,"__esModule",{value:!0}),B.ESpellTeamTarget=B.ESpellUnitTarget=void 0,function(k){k.Self="self",k.Ally="ally",k.Allies="allies",k.Single="single",k.Team="team",k.Row="row",k.Random="random"}(U||(B.ESpellUnitTarget=U={})),function(k){k.Enemy="enemy",k.Own="own",k.Any="any",k.All="all"}(F||(B.ESpellTeamTarget=F={}))},9664:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EStatusEffectType=void 0,function(k){k.DOT="DOT",k.HOT="HOT",k.Bomb="bomb",k.Gift="gift",k.Buff="buff",k.Debuff="debuff"}(U||(B.EStatusEffectType=U={}))},24439:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(38641),B),F.__exportStar(U(12634),B),F.__exportStar(U(98239),B),F.__exportStar(U(88250),B),F.__exportStar(U(66020),B),F.__exportStar(U(9664),B)},87584:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.Team=void 0;var F=U(41334),G=U(21073),j=function(){function k(k,B){this.id=k,this._container=B}return k.prototype.getMembers=function(){var k=this;return this._container.get(F.BattleStateDataProvider).getUnitsOnTeam(this.id).map((function(B){return k._container.getNamed(G.Unit,B)}))},k.prototype.isDefeated=function(){return this.getMembers().every((function(k){return k.isDefeated()}))},k}();B.Team=j},4497:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),U(17498).__exportStar(U(87584),B)},15855:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},71211:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},41866:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.ETeamId=void 0,function(k){k.Home="home",k.Away="away"}(U||(B.ETeamId=U={}))},11454:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EBattleAction=void 0,function(k){k.CastSpell="castSpell",k.UseConsumable="useConsumable",k.RescuePet="rescuePet",k.PowerUp="powerUp",k.EscapeBattle="escapeBattle",k.Fumble="fumble"}(U||(B.EBattleAction=U={}))},58690:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EBattleStateUpdate=void 0,function(k){k.SetActiveUnit="setActiveUnit",k.CastSpell="castSpell",k.Escape="escape",k.DefeatUnit="defeatUnit",k.ModifyMp="modifyMp",k.ModifyLevel="modifyLevel",k.ModifySpellCooldown="modifySpellCooldown",k.ModifyUnitTeam="modifyUnitTeam",k.AddUnit="addUnit",k.ReviveUnit="reviveUnit",k.AddAffix="addAffix",k.RemoveAffix="removeAffix",k.ModifyAffixDuration="modifyAffixDuration",k.AddStatusEffect="addStatusEffect",k.TriggerStatusEffect="triggerStatusEffect",k.RemoveStatusEffect="removeStatusEffect",k.ModifyStatusEffect="modifyStatusEffect",k.SkipTurn="skipTurn",k.EndBattle="endBattle",k.NewRound="newRound",k.CustomEvent="event",k.DebugMessage="debugMessage"}(U||(B.EBattleStateUpdate=U={}))},54705:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EDamageInformation=void 0,function(k){k[k.None=0]="None",k[k.CriticalHit=1]="CriticalHit",k[k.Effective=2]="Effective",k[k.Ineffective=4]="Ineffective",k[k.Missed=8]="Missed",k[k.Heal=16]="Heal",k[k.Fumble=32]="Fumble",k[k.Absorb=64]="Absorb",k[k.Reflected=128]="Reflected",k[k.Dodge=256]="Dodge"}(U||(B.EDamageInformation=U={}))},387:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EDebugMessageType=void 0,function(k){k.TurnOrder="turn-order",k.CombatStats="combat-stats",k.RewardScaling="reward-scaling",k.StatusTrigger="status-trigger"}(U||(B.EDebugMessageType=U={}))},56132:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.invertElementType=B.ELegacyElementType=B.EElementType=void 0;var F,G,j=U(9546);!function(k){k.Astral="astral",k.Fire="fire",k.Ice="ice",k.Physical="physical",k.Plant="plant",k.Shadow="shadow",k.Storm="storm",k.Water="water",k.Neutral="neutral"}(F||(B.EElementType=F={})),function(k){k.Astral="astral",k.Fire="fire",k.Ice="ice",k.Physical="physical",k.Plant="plant",k.Shadow="shadow",k.Storm="storm",k.Water="water",k.Neutral="neutral",k.Earth="earth",k.Wizard="wizard",k.Mech="mech"}(G||(B.ELegacyElementType=G={})),B.invertElementType=function(k){var B=j.Util.guaranteeArray(k);return Object.values(F).filter((function(k){return!B.includes(k)}))}},50532:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EElementalAdvantage=void 0,function(k){k[k.Strong=0]="Strong",k[k.Weak=1]="Weak",k[k.Neutral=2]="Neutral"}(U||(B.EElementalAdvantage=U={}))},47747:(k,B)=>{"use strict";var U;Object.defineProperty(B,"__esModule",{value:!0}),B.EStatGrowthTrackName=void 0,function(k){k.StatsCommon="statsCom",k.StatsUncommon="statsUnc",k.StatsRare="statsRar",k.StatsHeroic="statsHer",k.StatsLegendary="statsLeg",k.Default="default",k.Wizard="wizard",k.PuppetMaster="puppetMaster",k.Boss="boss",k.Miniboss="miniboss",k.IllusionBoss="illusionBoss",k.DragonBoss="dragonBoss",k.HoodedWizard="hoodedWizard",k.Pippet="pippet"}(U||(B.EStatGrowthTrackName=U={}))},7178:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0})},38041:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(15855),B),F.__exportStar(U(71211),B),F.__exportStar(U(41866),B),F.__exportStar(U(11454),B),F.__exportStar(U(58690),B),F.__exportStar(U(54705),B),F.__exportStar(U(387),B),F.__exportStar(U(56132),B),F.__exportStar(U(50532),B),F.__exportStar(U(47747),B),F.__exportStar(U(7178),B)},21073:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.Unit=void 0;var F=U(17498),G=U(95891),j=U(81327),$=U(1191),H=U(26342),V=U(18902),W=U(51448),q=U(15907),K=U(51648),z=U(36700),Y=U(44503),Q=U(82825),X=U(73566),Z=U(58690),J=U(9546),tt=U(89647),et=function(){function k(k,B){this.id=k,this._container=B,this._unitStateData=B.getNamed(X.UnitStateDataProvider,k).unitStateData,this._affixStateDataProvider=B.get(z.AffixStateDataProvider),this._statusEffectStateDataProvider=B.get(Q.StatusEffectStateDataProvider)}return Object.defineProperty(k.prototype,"type",{get:function(){return this._unitStateData.type},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"passive",{get:function(){var k;return null!==(k=this._unitStateData.passive)&&void 0!==k&&k},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"rarity",{get:function(){return this._unitStateData.rarity},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"health",{get:function(){return this._unitStateData.health.current},set:function(k){this._unitStateData.health.current=G.clamp(k,0,this.maxHealth)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"maxHealth",{get:function(){return this._unitStateData.health.max},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"mp",{get:function(){return this._unitStateData.mp.current},set:function(k){this._unitStateData.mp.current=G.clamp(k,0,this.maxMp)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"maxMp",{get:function(){return this._unitStateData.mp.max},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"level",{get:function(){var k;return this._unitStateData.level+(null!==(k=this._unitStateData.chargedLevel)&&void 0!==k?k:0)},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"mergeRank",{get:function(){var k;return null!==(k=this._unitStateData.mergeRank)&&void 0!==k?k:0},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"statGrowthTrack",{get:function(){return this._unitStateData.statGrowthTrackName},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"teamId",{get:function(){return this._unitStateData.teamId},set:function(k){this._unitStateData.teamId=k},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"spells",{get:function(){var k,B=this;return null!==(k=this._spells)&&void 0!==k?k:this._spells=this._unitStateData.spells.map((function(k){return B._container.getByIds(tt.UnitSpell,B.id,k.spellId)})).filter((function(k){return k}))},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"loadout",{get:function(){return this._unitStateData.loadout},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"currentLoadout",{get:function(){return this._unitStateData.currentLoadout},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"battleStatus",{get:function(){return this._unitStateData.battleStatus},set:function(k){this._unitStateData.battleStatus=k},enumerable:!1,configurable:!0}),k.prototype.removeFromCurrentLoadout=function(k){var B=this._unitStateData.currentLoadout;J.Util.assertDefined(B,"Current loadout does not exist");var U=B.indexOf(k);if(U<0)throw new q.BattleError('Spell id "'.concat(k,'" not found in current loadout'));B.splice(U,1)},k.prototype.resetCurrentLoadout=function(){this._unitStateData.currentLoadout=G.cloneDeep(this._unitStateData.loadout)},Object.defineProperty(k.prototype,"element",{get:function(){return this._unitStateData.element},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"catchChance",{get:function(){return this._unitStateData.catchChance},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"catchHealth",{get:function(){var k;return null!==(k=this._unitStateData.catchHealth)&&void 0!==k?k:Math.round(this.maxHealth*this._container.get(W.BattleConstants).rescueDamageThreshold)},enumerable:!1,configurable:!0}),k.prototype.startTurn=function(){var k,B;try{for(var U=F.__values(this.getAffixes()),G=U.next();!G.done;G=U.next()){var j=G.value;$.AffixUtils.hasWhenToTrigger(j)&&j.whenToTrigger===V.EWhenToTrigger.StartOfTurn&&this._affixStateDataProvider.triggerAffix(this,j,this._statusEffectStateDataProvider.getStatusEffectForAffix(j.id)),!j.duration||j.duration.whenToReduce!==H.EWhenToReduce.StartOfTurn&&j.duration.whenToReduce||this._affixStateDataProvider.reduceAffixDuration(this,j,1)}}catch(W){k={error:W}}finally{try{G&&!G.done&&(B=U.return)&&B.call(U)}finally{if(k)throw k.error}}},k.prototype.endTurn=function(){var k,B,U,G,j;try{for(var W=F.__values(this.getAffixes()),q=W.next();!q.done;q=W.next()){var z=q.value;$.AffixUtils.hasWhenToTrigger(z)&&z.whenToTrigger===V.EWhenToTrigger.EndOfTurn&&this._affixStateDataProvider.triggerAffix(this,z,this._statusEffectStateDataProvider.getStatusEffectForAffix(z.id)),(null===(j=z.duration)||void 0===j?void 0:j.whenToReduce)===H.EWhenToReduce.EndOfTurn&&this._affixStateDataProvider.reduceAffixDuration(this,z,1)}}catch(J){k={error:J}}finally{try{q&&!q.done&&(B=W.return)&&B.call(W)}finally{if(k)throw k.error}}try{for(var Y=F.__values(this.spells),Q=Y.next();!Q.done;Q=Y.next()){var X=Q.value;X.currentCooldown>0&&(--X.currentCooldown,this._container.get(K.StateUpdateManager).addToBack({type:Z.EBattleStateUpdate.ModifySpellCooldown,unitId:this.id,spellId:X.id,cooldown:X.currentCooldown}))}}catch(tt){U={error:tt}}finally{try{Q&&!Q.done&&(G=Y.return)&&G.call(Y)}finally{if(U)throw U.error}}},k.prototype.isDefeated=function(){return this.health<=0},k.prototype.getBaseStat=function(k){return this._unitStateData.stats[k]},k.prototype.getStat=function(B){var U=this._unitStateData.stats[B],F=this.getAffixes().filter((function(k){return k.type===j.EAffixType.Stat&&k.stat===B})).reduce((function(k,B){var U,F;return k*(null!==(U=B.multiplier)&&void 0!==U?U:1)+(null!==(F=B.amount)&&void 0!==F?F:0)}),U);return k.PERCENTAGE_STATS.includes(B)?F:Math.round(F)},k.prototype.getAffixes=function(){return this._affixStateDataProvider.getAffixesForUnit(this.id)},k.prototype.getStatAffixesDebug=function(k){var B="";return this.getAffixes().filter((function(B){return B.type===j.EAffixType.Stat&&B.stat===k})).forEach((function(k,U){B+="".concat(U+1,". amount: ").concat(k.amount,", multiplier: ").concat(k.multiplier,"\n")})),B},k.PERCENTAGE_STATS=[Y.EStat.CritChance,Y.EStat.CritDamage,Y.EStat.Accuracy,Y.EStat.Dodge,Y.EStat.DodgeDamage],k}();B.Unit=et},89647:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.UnitSpell=void 0;var F=U(17498),G=U(68688),j=U(11282),$=U(38641),H=U(9546),V=U(21073),W=function(k){function B(B,U,F){var $,V=this,W=F.getNamed(G.SpellDataProvider,U);(V=k.call(this,W.spellData)||this)._container=F,V._unitId=B;var q=null===($=F.getByIds(j.UnitSpellStateDataProvider,B,U))||void 0===$?void 0:$.unitSpellStateData;return H.Util.assertDefined(q,"Spell ".concat(U," not available for unit ").concat(B)),V._unitSpellStateData=q,V}return F.__extends(B,k),Object.defineProperty(B.prototype,"isLocked",{get:function(){return this._unitSpellStateData.isLocked},set:function(k){this._unitSpellStateData.isLocked=k},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"currentCooldown",{get:function(){return this._unitSpellStateData.currentCooldown},set:function(k){this._unitSpellStateData.currentCooldown=k},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"unit",{get:function(){var k;return null!==(k=this._unit)&&void 0!==k?k:this._unit=this._container.getNamed(V.Unit,this._unitId)},enumerable:!1,configurable:!0}),B}($.Spell);B.UnitSpell=W},18035:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(21073),B),F.__exportStar(U(89647),B)},9546:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.Util=void 0;var F=U(15907),G=function(){function k(){}return k.isDefined=function(k){return!(null==k)},k.assertDefined=function(k,B){if(void 0===B&&(B="value is not defined"),!this.isDefined(k))throw new F.BattleError("string"==typeof B?B:B())},k.guaranteeArray=function(B){return k.isDefined(B)?Array.isArray(B)?B:[B]:[]},k.singleOrArrayIncludes=function(B,U){return k.guaranteeArray(B).includes(U)},k.generateInstanceId=function(){return Math.random().toString(36).substr(2,9)},k.isDebugEnabled=function(k,B){return void 0===B&&(B=!0),B&&!!process.env.DEBUG&&"false"!==process.env.DEBUG||!!k&&!!process.env[k]&&"false"!==process.env[k]},k.findFirstElementBelowThreshold=function(B,U,F){if(0!==F.length){for(var G,j=0,$=F.length-1;j<=$;){var H=Math.floor((j+$)/2),V=F[H];k.isDefined(V[B])?V[B]>U?$=H-1:(G=V,j=H+1):j=H+1}return G=null!=G?G:F[0],k.isDefined(G[B])?G:void 0}},k.ceiling=function(k,B){return 0===B?k:Math.ceil(Math.abs(k)/Math.abs(B))*Math.abs(B)*Math.sign(k*B)},k.round=function(k,B){return 0===B?k:Math.round(Math.abs(k)/Math.abs(B))*Math.abs(B)*Math.sign(k*B)},k.toFixedTrimmed=function(k,B){return parseFloat(k.toFixed(B)).toString()},k}();B.Util=G},87452:(k,B)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0}),B.ValueRange=void 0;var U=function(){function k(k,B){this._minValue=0,this._maxValue=0,this._minValue=k,this._maxValue=B}return Object.defineProperty(k.prototype,"min",{get:function(){return this._minValue},enumerable:!1,configurable:!0}),Object.defineProperty(k.prototype,"max",{get:function(){return this._maxValue},enumerable:!1,configurable:!0}),k.prototype.isInRange=function(k){return!(kthis._maxValue)},k.prototype.clamp=function(k){return Math.max(Math.min(k,this._maxValue),this._minValue)},k.prototype.getRange=function(){return this._maxValue-this._minValue},k}();B.ValueRange=U},77536:(k,B,U)=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});var F=U(17498);F.__exportStar(U(87452),B),F.__exportStar(U(9546),B)},33482:(k,B,U)=>{var F;!function(k){!function(B){var F="object"==typeof U.g?U.g:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),G=j(k);function j(k,B){return function(U,F){"function"!=typeof k[U]&&Object.defineProperty(k,U,{configurable:!0,writable:!0,value:F}),B&&B(U,F)}}void 0===F.Reflect?F.Reflect=k:G=j(F.Reflect,G),function(k){var B=Object.prototype.hasOwnProperty,U="function"==typeof Symbol,F=U&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",G=U&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",j="function"==typeof Object.create,$={__proto__:[]}instanceof Array,H=!j&&!$,V={create:j?function(){return Ft(Object.create(null))}:$?function(){return Ft({__proto__:null})}:function(){return Ft({})},has:H?function(k,U){return B.call(k,U)}:function(k,B){return B in k},get:H?function(k,U){return B.call(k,U)?k[U]:void 0}:function(k,B){return k[B]}},W=Object.getPrototypeOf(Function),q="object"==typeof process&&process.env&&"true"===process.env.REFLECT_METADATA_USE_MAP_POLYFILL,K=q||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?kt():Map,z=q||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?Bt():Set,Y=new(q||"function"!=typeof WeakMap?Ut():WeakMap);function Q(k,B,U,F){if(gt(U)){if(!Ct(k))throw new TypeError;if(!It(B))throw new TypeError;return rt(k,B)}if(!Ct(k))throw new TypeError;if(!_t(B))throw new TypeError;if(!_t(F)&&!gt(F)&&!mt(F))throw new TypeError;return mt(F)&&(F=void 0),ot(k,B,U=At(U),F)}function X(k,B){function U(U,F){if(!_t(U))throw new TypeError;if(!gt(F)&&!Dt(F))throw new TypeError;ft(k,B,U,F)}return U}function Z(k,B,U,F){if(!_t(U))throw new TypeError;return gt(F)||(F=At(F)),ft(k,B,U,F)}function J(k,B,U){if(!_t(B))throw new TypeError;return gt(U)||(U=At(U)),ct(k,B,U)}function tt(k,B,U){if(!_t(B))throw new TypeError;return gt(U)||(U=At(U)),dt(k,B,U)}function et(k,B,U){if(!_t(B))throw new TypeError;return gt(U)||(U=At(U)),lt(k,B,U)}function it(k,B,U){if(!_t(B))throw new TypeError;return gt(U)||(U=At(U)),ut(k,B,U)}function st(k,B){if(!_t(k))throw new TypeError;return gt(B)||(B=At(B)),bt(k,B)}function nt(k,B){if(!_t(k))throw new TypeError;return gt(B)||(B=At(B)),pt(k,B)}function at(k,B,U){if(!_t(B))throw new TypeError;gt(U)||(U=At(U));var F=ht(B,U,!1);if(gt(F))return!1;if(!F.delete(k))return!1;if(F.size>0)return!0;var G=Y.get(B);return G.delete(U),G.size>0||Y.delete(B),!0}function rt(k,B){for(var U=k.length-1;U>=0;--U){var F=(0,k[U])(B);if(!gt(F)&&!mt(F)){if(!It(F))throw new TypeError;B=F}}return B}function ot(k,B,U,F){for(var G=k.length-1;G>=0;--G){var j=(0,k[G])(B,U,F);if(!gt(j)&&!mt(j)){if(!_t(j))throw new TypeError;F=j}}return F}function ht(k,B,U){var F=Y.get(k);if(gt(F)){if(!U)return;F=new K,Y.set(k,F)}var G=F.get(B);if(gt(G)){if(!U)return;G=new K,F.set(B,G)}return G}function ct(k,B,U){if(dt(k,B,U))return!0;var F=Lt(B);return!mt(F)&&ct(k,F,U)}function dt(k,B,U){var F=ht(B,U,!1);return!gt(F)&&Tt(F.has(k))}function lt(k,B,U){if(dt(k,B,U))return ut(k,B,U);var F=Lt(B);return mt(F)?void 0:lt(k,F,U)}function ut(k,B,U){var F=ht(B,U,!1);if(!gt(F))return F.get(k)}function ft(k,B,U,F){ht(U,F,!0).set(k,B)}function bt(k,B){var U=pt(k,B),F=Lt(k);if(null===F)return U;var G=bt(F,B);if(G.length<=0)return U;if(U.length<=0)return G;for(var j=new z,$=[],H=0,V=U;H=0&&k=this._keys.length?(this._index=-1,this._keys=B,this._values=B):this._index++,{value:U,done:!1}}return{value:void 0,done:!0}},k.prototype.throw=function(k){throw this._index>=0&&(this._index=-1,this._keys=B,this._values=B),k},k.prototype.return=function(k){return this._index>=0&&(this._index=-1,this._keys=B,this._values=B),{value:k,done:!0}},k}();return function(){function B(){this._keys=[],this._values=[],this._cacheKey=k,this._cacheIndex=-2}return Object.defineProperty(B.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),B.prototype.has=function(k){return this._find(k,!1)>=0},B.prototype.get=function(k){var B=this._find(k,!1);return B>=0?this._values[B]:void 0},B.prototype.set=function(k,B){var U=this._find(k,!0);return this._values[U]=B,this},B.prototype.delete=function(B){var U=this._find(B,!1);if(U>=0){for(var F=this._keys.length,G=U+1;G{"use strict";U.r(B),U.d(B,{__assign:()=>j,__asyncDelegator:()=>st,__asyncGenerator:()=>it,__asyncValues:()=>nt,__await:()=>et,__awaiter:()=>q,__classPrivateFieldGet:()=>ct,__classPrivateFieldIn:()=>lt,__classPrivateFieldSet:()=>dt,__createBinding:()=>z,__decorate:()=>H,__exportStar:()=>Y,__extends:()=>G,__generator:()=>K,__importDefault:()=>ht,__importStar:()=>ot,__makeTemplateObject:()=>at,__metadata:()=>W,__param:()=>V,__read:()=>X,__rest:()=>$,__spread:()=>Z,__spreadArray:()=>tt,__spreadArrays:()=>J,__values:()=>Q});var F=function(k,B){return(F=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,B){k.__proto__=B}||function(k,B){for(var U in B)Object.prototype.hasOwnProperty.call(B,U)&&(k[U]=B[U])})(k,B)};function G(k,B){if("function"!=typeof B&&null!==B)throw new TypeError("Class extends value "+String(B)+" is not a constructor or null");function U(){this.constructor=k}F(k,B),k.prototype=null===B?Object.create(B):(U.prototype=B.prototype,new U)}var j=function(){return(j=Object.assign||function(k){for(var B,U=1,F=arguments.length;U=0;H--)(G=k[H])&&($=(j<3?G($):j>3?G(B,U,$):G(B,U))||$);return j>3&&$&&Object.defineProperty(B,U,$),$}function V(k,B){return function(U,F){B(U,F,k)}}function W(k,B){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(k,B)}function q(k,B,U,F){return new(U||(U=Promise))((function(G,j){function $(k){try{V(F.next(k))}catch(e){j(e)}}function H(k){try{V(F.throw(k))}catch(e){j(e)}}function V(k){var B;k.done?G(k.value):(B=k.value,B instanceof U?B:new U((function(k){k(B)}))).then($,H)}V((F=F.apply(k,B||[])).next())}))}function K(k,B){var U,F,G,j,$={label:0,sent:function(){if(1&G[0])throw G[1];return G[1]},trys:[],ops:[]};return j={next:H(0),throw:H(1),return:H(2)},"function"==typeof Symbol&&(j[Symbol.iterator]=function(){return this}),j;function H(j){return function(H){return function(j){if(U)throw new TypeError("Generator is already executing.");for(;$;)try{if(U=1,F&&(G=2&j[0]?F.return:j[0]?F.throw||((G=F.return)&&G.call(F),0):F.next)&&!(G=G.call(F,j[1])).done)return G;switch(F=0,G&&(j=[2&j[0],G.value]),j[0]){case 0:case 1:G=j;break;case 4:return $.label++,{value:j[1],done:!1};case 5:$.label++,F=j[1],j=[0];continue;case 7:j=$.ops.pop(),$.trys.pop();continue;default:if(!(G=$.trys,(G=G.length>0&&G[G.length-1])||6!==j[0]&&2!==j[0])){$=0;continue}if(3===j[0]&&(!G||j[1]>G[0]&&j[1]=k.length&&(k=void 0),{value:k&&k[F++],done:!k}}};throw new TypeError(B?"Object is not iterable.":"Symbol.iterator is not defined.")}function X(k,B){var U="function"==typeof Symbol&&k[Symbol.iterator];if(!U)return k;var F,G,j=U.call(k),$=[];try{for(;(void 0===B||B-- >0)&&!(F=j.next()).done;)$.push(F.value)}catch(H){G={error:H}}finally{try{F&&!F.done&&(U=j.return)&&U.call(j)}finally{if(G)throw G.error}}return $}function Z(){for(var k=[],B=0;B1||H(k,B)}))})}function H(k,B){try{(U=G[k](B)).value instanceof et?Promise.resolve(U.value.v).then(V,W):q(j[0][2],U)}catch(e){q(j[0][3],e)}var U}function V(k){H("next",k)}function W(k){H("throw",k)}function q(k,B){k(B),j.shift(),j.length&&H(j[0][0],j[0][1])}}function st(k){var B,U;return B={},F("next"),F("throw",(function(k){throw k})),F("return"),B[Symbol.iterator]=function(){return this},B;function F(F,G){B[F]=k[F]?function(B){return(U=!U)?{value:et(k[F](B)),done:"return"===F}:G?G(B):B}:G}}function nt(k){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var B,U=k[Symbol.asyncIterator];return U?U.call(k):(k=Q(k),B={},F("next"),F("throw"),F("return"),B[Symbol.asyncIterator]=function(){return this},B);function F(U){B[U]=k[U]&&function(B){return new Promise((function(F,G){(function(k,B,U,F){Promise.resolve(F).then((function(B){k({value:B,done:U})}),B)})(F,G,(B=k[U](B)).done,B.value)}))}}}function at(k,B){return Object.defineProperty?Object.defineProperty(k,"raw",{value:B}):k.raw=B,k}var rt=Object.create?function(k,B){Object.defineProperty(k,"default",{enumerable:!0,value:B})}:function(k,B){k.default=B};function ot(k){if(k&&k.__esModule)return k;var B={};if(null!=k)for(var U in k)"default"!==U&&Object.prototype.hasOwnProperty.call(k,U)&&z(B,k,U);return rt(B,k),B}function ht(k){return k&&k.__esModule?k:{default:k}}function ct(k,B,U,F){if("a"===U&&!F)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof B?k!==B||!F:!B.has(k))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===U?F:"a"===U?F.call(k):F?F.value:B.get(k)}function dt(k,B,U,F,G){if("m"===F)throw new TypeError("Private method is not writable");if("a"===F&&!G)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof B?k!==B||!G:!B.has(k))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===F?G.call(k,U):G?G.value=U:B.set(k,U),U}function lt(k,B){if(null===B||"object"!=typeof B&&"function"!=typeof B)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof k?B===k:k.has(B)}},68910:k=>{"use strict";k.exports=window.PIXI},88225:k=>{"use strict";k.exports=window.Sentry},95891:k=>{"use strict";k.exports=window._},79687:k=>{"use strict";k.exports=window.inversify},42634:()=>{},39209:(k,B,U)=>{"use strict";var F=U(76578),G="undefined"==typeof globalThis?U.g:globalThis;k.exports=function(){for(var k=[],B=0;B{"use strict";U.d(B,{t:()=>X});var F=[],G=[],j={},$={},H={};function V(k){return"string"==typeof k?new RegExp("^"+k+"$","i"):k}function W(k,B){return k===B?B:k===k.toLowerCase()?B.toLowerCase():k===k.toUpperCase()?B.toUpperCase():k[0]===k[0].toUpperCase()?B.charAt(0).toUpperCase()+B.substr(1).toLowerCase():B.toLowerCase()}function q(k,B){return k.replace(/\$(\d{1,2})/g,(function(k,U){return B[U]||""}))}function K(k,B){return k.replace(B[0],(function(U,F){var G=q(B[1],arguments);return W(""===U?k[F-1]:U,G)}))}function z(k,B,U){if(!k.length||j.hasOwnProperty(k))return B;for(var F=U.length;F--;){var G=U[F];if(G[0].test(B))return K(B,G)}return B}function Y(k,B,U){return function(F){var G=F.toLowerCase();return B.hasOwnProperty(G)?W(F,G):k.hasOwnProperty(G)?W(F,k[G]):z(G,F,U)}}function Q(k,B,U){return function(F){var G=F.toLowerCase();return!!B.hasOwnProperty(G)||!k.hasOwnProperty(G)&&z(G,G,U)===G}}function X(k,B,U){return(U?B+" ":"")+(1===B?X.singular(k):X.plural(k))}X.plural=Y(H,$,F),X.isPlural=Q(H,$,F),X.singular=Y($,H,G),X.isSingular=Q($,H,G),X.addPluralRule=function(k,B){F.push([V(k),B])},X.addSingularRule=function(k,B){G.push([V(k),B])},X.addUncountableRule=function(k){"string"!=typeof k?(X.addPluralRule(k,"$0"),X.addSingularRule(k,"$0")):j[k.toLowerCase()]=!0},X.addIrregularRule=function(k,B){B=B.toLowerCase(),k=k.toLowerCase(),H[k]=B,$[B]=k},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["my","our"],["its","their"],["his","their"],["her","their"],["mosquito","mosquitoes"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach((function(k){return X.addIrregularRule(k[0],k[1])})),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach((function(k){return X.addPluralRule(k[0],k[1])})),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/(dg|ss|ois|lk|ok|wn|mb|th|ch|ec|oal|is|ck|ix|sser|ts|wb)ies$/i,"$1ie"],[/\b(l|(?:neck|cross|hog|aun)?t|coll|faer|food|gen|goon|group|hipp|junk|vegg|(?:pork)?p|charl|calor|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach((function(k){return X.addSingularRule(k[0],k[1])})),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hertz","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(X.addUncountableRule)},44329:(k,B,U)=>{"use strict";U.d(B,{Ak:()=>F});let F=(k=21)=>crypto.getRandomValues(new Uint8Array(k)).reduce(((k,B)=>k+=(B&=63)<36?B.toString(36):B<62?(B-26).toString(36).toUpperCase():B>62?"-":"_"),"")},92661:(k,B,U)=>{"use strict";U.d(B,{YOg:()=>Zs,zMY:()=>qs,k5n:()=>hn,Whr:()=>Vs,RZV:()=>Tn,aig:()=>$s,Ikc:()=>tn,g1P:()=>rn,YjP:()=>_s,KCZ:()=>sn,L5J:()=>zs});Object.freeze({status:"aborted"});function F(k,B,U){function F(U,F){var G;Object.defineProperty(U,"_zod",{value:U._zod??{},enumerable:!1}),(G=U._zod).traits??(G.traits=new Set),U._zod.traits.add(k),B(U,F);for(const k in $.prototype)k in U||Object.defineProperty(U,k,{value:$.prototype[k].bind(U)});U._zod.constr=$,U._zod.def=F}const G=U?.Parent??Object;class j extends G{}function $(k){var B;const G=U?.Parent?new j:this;F(G,k),(B=G._zod).deferred??(B.deferred=[]);for(const U of G._zod.deferred)U();return G}return Object.defineProperty(j,"name",{value:k}),Object.defineProperty($,"init",{value:F}),Object.defineProperty($,Symbol.hasInstance,{value:B=>!!(U?.Parent&&B instanceof U.Parent)||B?._zod?.traits?.has(k)}),Object.defineProperty($,"name",{value:k}),$}Symbol("zod_brand");class G extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class j extends Error{constructor(k){super(`Encountered unidirectional transform during encode: ${k}`),this.name="ZodEncodeError"}}const $={};function H(k){return k&&Object.assign($,k),$}function V(k,B="|"){return k.map((k=>ct(k))).join(B)}function W(k,B){return"bigint"==typeof B?B.toString():B}function q(k){return{get value(){{const B=k();return Object.defineProperty(this,"value",{value:B}),B}}}}function K(k){return null==k}function z(k){const B=k.startsWith("^")?1:0,U=k.endsWith("$")?k.length-1:k.length;return k.slice(B,U)}const Y=Symbol("evaluating");function Q(k,B,U){let F;Object.defineProperty(k,B,{get(){if(F!==Y)return void 0===F&&(F=Y,F=U()),F},set(U){Object.defineProperty(k,B,{value:U})},configurable:!0})}function X(k,B,U){Object.defineProperty(k,B,{value:U,writable:!0,enumerable:!0,configurable:!0})}function Z(...k){const B={};for(const U of k){const k=Object.getOwnPropertyDescriptors(U);Object.assign(B,k)}return Object.defineProperties({},B)}function J(k){return JSON.stringify(k)}const tt="captureStackTrace"in Error?Error.captureStackTrace:(...k)=>{};function et(k){return"object"==typeof k&&null!==k&&!Array.isArray(k)}const it=q((()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(k){return!1}}));function st(k){if(!1===et(k))return!1;const B=k.constructor;if(void 0===B)return!0;const U=B.prototype;return!1!==et(U)&&!1!==Object.prototype.hasOwnProperty.call(U,"isPrototypeOf")}function nt(k){return st(k)?{...k}:Array.isArray(k)?[...k]:k}const at=new Set(["string","number","symbol"]);new Set(["string","number","bigint","boolean","symbol","undefined"]);function rt(k){return k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ot(k,B,U){const F=new k._zod.constr(B??k._zod.def);return B&&!U?.parent||(F._zod.parent=k),F}function ht(k){const B=k;if(!B)return{};if("string"==typeof B)return{error:()=>B};if(void 0!==B?.message){if(void 0!==B?.error)throw new Error("Cannot specify both `message` and `error` params");B.error=B.message}return delete B.message,"string"==typeof B.error?{...B,error:()=>B.error}:B}function ct(k){return"bigint"==typeof k?k.toString()+"n":"string"==typeof k?`"${k}"`:`${k}`}const dt={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function lt(k,B=0){if(!0===k.aborted)return!0;for(let U=B;U{var U;return(U=B).path??(U.path=[]),B.path.unshift(k),B}))}function ft(k){return"string"==typeof k?k:k?.message}function bt(k,B,U){const F={...k,path:k.path??[]};if(!k.message){const G=ft(k.inst?._zod.def?.error?.(k))??ft(B?.error?.(k))??ft(U.customError?.(k))??ft(U.localeError?.(k))??"Invalid input";F.message=G}return delete F.inst,delete F.continue,B?.reportInput||delete F.input,F}function pt(k){return Array.isArray(k)?"array":"string"==typeof k?"string":"unknown"}function vt(...k){const[B,U,F]=k;return"string"==typeof B?{message:B,code:"custom",input:U,inst:F}:{...B}}const gt=(k,B)=>{k.name="$ZodError",Object.defineProperty(k,"_zod",{value:k._zod,enumerable:!1}),Object.defineProperty(k,"issues",{value:B,enumerable:!1}),k.message=JSON.stringify(B,W,2),Object.defineProperty(k,"toString",{value:()=>k.message,enumerable:!1})},mt=F("$ZodError",gt),yt=F("$ZodError",gt,{Parent:Error});const _t=k=>(B,U,F,j)=>{const $=F?Object.assign(F,{async:!1}):{async:!1},V=B._zod.run({value:U,issues:[]},$);if(V instanceof Promise)throw new G;if(V.issues.length){const B=new(j?.Err??k)(V.issues.map((k=>bt(k,$,H()))));throw tt(B,j?.callee),B}return V.value},Et=k=>async(B,U,F,G)=>{const j=F?Object.assign(F,{async:!0}):{async:!0};let $=B._zod.run({value:U,issues:[]},j);if($ instanceof Promise&&($=await $),$.issues.length){const B=new(G?.Err??k)($.issues.map((k=>bt(k,j,H()))));throw tt(B,G?.callee),B}return $.value},wt=k=>(B,U,F)=>{const j=F?{...F,async:!1}:{async:!1},$=B._zod.run({value:U,issues:[]},j);if($ instanceof Promise)throw new G;return $.issues.length?{success:!1,error:new(k??mt)($.issues.map((k=>bt(k,j,H()))))}:{success:!0,data:$.value}},Tt=wt(yt),St=k=>async(B,U,F)=>{const G=F?Object.assign(F,{async:!0}):{async:!0};let j=B._zod.run({value:U,issues:[]},G);return j instanceof Promise&&(j=await j),j.issues.length?{success:!1,error:new k(j.issues.map((k=>bt(k,G,H()))))}:{success:!0,data:j.value}},At=St(yt),Ct=k=>(B,U,F)=>{const G=F?Object.assign(F,{direction:"backward"}):{direction:"backward"};return _t(k)(B,U,G)},Ot=k=>(B,U,F)=>_t(k)(B,U,F),It=k=>async(B,U,F)=>{const G=F?Object.assign(F,{direction:"backward"}):{direction:"backward"};return Et(k)(B,U,G)},Dt=k=>async(B,U,F)=>Et(k)(B,U,F),Rt=k=>(B,U,F)=>{const G=F?Object.assign(F,{direction:"backward"}):{direction:"backward"};return wt(k)(B,U,G)},Pt=k=>(B,U,F)=>wt(k)(B,U,F),Mt=k=>async(B,U,F)=>{const G=F?Object.assign(F,{direction:"backward"}):{direction:"backward"};return St(k)(B,U,G)},Nt=k=>async(B,U,F)=>St(k)(B,U,F),xt=/^[cC][^\s-]{8,}$/,Lt=/^[0-9a-z]+$/,kt=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Bt=/^[0-9a-vA-V]{20}$/,Ut=/^[A-Za-z0-9]{27}$/,Ft=/^[a-zA-Z0-9_-]{21}$/,Gt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,jt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,$t=k=>k?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${k}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ht=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const Vt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Wt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,qt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Kt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Yt=/^[A-Za-z0-9_-]*$/,Qt=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Xt=/^\+(?:[0-9]){6,14}[0-9]$/,Zt="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Jt=new RegExp(`^${Zt}$`);function te(k){const B="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof k.precision?-1===k.precision?`${B}`:0===k.precision?`${B}:[0-5]\\d`:`${B}:[0-5]\\d\\.\\d{${k.precision}}`:`${B}(?::[0-5]\\d(?:\\.\\d+)?)?`}const ee=/^-?\d+$/,ie=/^-?\d+(?:\.\d+)?/,se=/^(?:true|false)$/i,ne=/^[^A-Z]*$/,ae=/^[^a-z]*$/;const re=F("$ZodCheck",((k,B)=>{var U;k._zod??(k._zod={}),k._zod.def=B,(U=k._zod).onattach??(U.onattach=[])})),oe={number:"number",bigint:"bigint",object:"date"},he=F("$ZodCheckLessThan",((k,B)=>{re.init(k,B);const U=oe[typeof B.value];k._zod.onattach.push((k=>{const U=k._zod.bag,F=(B.inclusive?U.maximum:U.exclusiveMaximum)??Number.POSITIVE_INFINITY;B.value{(B.inclusive?F.value<=B.value:F.value{re.init(k,B);const U=oe[typeof B.value];k._zod.onattach.push((k=>{const U=k._zod.bag,F=(B.inclusive?U.minimum:U.exclusiveMinimum)??Number.NEGATIVE_INFINITY;B.value>F&&(B.inclusive?U.minimum=B.value:U.exclusiveMinimum=B.value)})),k._zod.check=F=>{(B.inclusive?F.value>=B.value:F.value>B.value)||F.issues.push({origin:U,code:"too_small",minimum:B.value,input:F.value,inclusive:B.inclusive,inst:k,continue:!B.abort})}})),de=F("$ZodCheckMultipleOf",((k,B)=>{re.init(k,B),k._zod.onattach.push((k=>{var U;(U=k._zod.bag).multipleOf??(U.multipleOf=B.value)})),k._zod.check=U=>{if(typeof U.value!=typeof B.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof U.value?U.value%B.value===BigInt(0):0===function(k,B){const U=(k.toString().split(".")[1]||"").length,F=B.toString();let G=(F.split(".")[1]||"").length;if(0===G&&/\d?e-\d?/.test(F)){const k=F.match(/\d?e-(\d?)/);k?.[1]&&(G=Number.parseInt(k[1]))}const j=U>G?U:G;return Number.parseInt(k.toFixed(j).replace(".",""))%Number.parseInt(B.toFixed(j).replace(".",""))/10**j}(U.value,B.value))||U.issues.push({origin:typeof U.value,code:"not_multiple_of",divisor:B.value,input:U.value,inst:k,continue:!B.abort})}})),le=F("$ZodCheckNumberFormat",((k,B)=>{re.init(k,B),B.format=B.format||"float64";const U=B.format?.includes("int"),F=U?"int":"number",[G,j]=dt[B.format];k._zod.onattach.push((k=>{const F=k._zod.bag;F.format=B.format,F.minimum=G,F.maximum=j,U&&(F.pattern=ee)})),k._zod.check=$=>{const H=$.value;if(U){if(!Number.isInteger(H))return void $.issues.push({expected:F,format:B.format,code:"invalid_type",continue:!1,input:H,inst:k});if(!Number.isSafeInteger(H))return void(H>0?$.issues.push({input:H,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:k,origin:F,continue:!B.abort}):$.issues.push({input:H,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:k,origin:F,continue:!B.abort}))}Hj&&$.issues.push({origin:"number",input:H,code:"too_big",maximum:j,inst:k})}})),ue=F("$ZodCheckMaxLength",((k,B)=>{var U;re.init(k,B),(U=k._zod.def).when??(U.when=k=>{const B=k.value;return!K(B)&&void 0!==B.length}),k._zod.onattach.push((k=>{const U=k._zod.bag.maximum??Number.POSITIVE_INFINITY;B.maximum{const F=U.value;if(F.length<=B.maximum)return;const G=pt(F);U.issues.push({origin:G,code:"too_big",maximum:B.maximum,inclusive:!0,input:F,inst:k,continue:!B.abort})}})),fe=F("$ZodCheckMinLength",((k,B)=>{var U;re.init(k,B),(U=k._zod.def).when??(U.when=k=>{const B=k.value;return!K(B)&&void 0!==B.length}),k._zod.onattach.push((k=>{const U=k._zod.bag.minimum??Number.NEGATIVE_INFINITY;B.minimum>U&&(k._zod.bag.minimum=B.minimum)})),k._zod.check=U=>{const F=U.value;if(F.length>=B.minimum)return;const G=pt(F);U.issues.push({origin:G,code:"too_small",minimum:B.minimum,inclusive:!0,input:F,inst:k,continue:!B.abort})}})),be=F("$ZodCheckLengthEquals",((k,B)=>{var U;re.init(k,B),(U=k._zod.def).when??(U.when=k=>{const B=k.value;return!K(B)&&void 0!==B.length}),k._zod.onattach.push((k=>{const U=k._zod.bag;U.minimum=B.length,U.maximum=B.length,U.length=B.length})),k._zod.check=U=>{const F=U.value,G=F.length;if(G===B.length)return;const j=pt(F),$=G>B.length;U.issues.push({origin:j,...$?{code:"too_big",maximum:B.length}:{code:"too_small",minimum:B.length},inclusive:!0,exact:!0,input:U.value,inst:k,continue:!B.abort})}})),pe=F("$ZodCheckStringFormat",((k,B)=>{var U,F;re.init(k,B),k._zod.onattach.push((k=>{const U=k._zod.bag;U.format=B.format,B.pattern&&(U.patterns??(U.patterns=new Set),U.patterns.add(B.pattern))})),B.pattern?(U=k._zod).check??(U.check=U=>{B.pattern.lastIndex=0,B.pattern.test(U.value)||U.issues.push({origin:"string",code:"invalid_format",format:B.format,input:U.value,...B.pattern?{pattern:B.pattern.toString()}:{},inst:k,continue:!B.abort})}):(F=k._zod).check??(F.check=()=>{})})),ve=F("$ZodCheckRegex",((k,B)=>{pe.init(k,B),k._zod.check=U=>{B.pattern.lastIndex=0,B.pattern.test(U.value)||U.issues.push({origin:"string",code:"invalid_format",format:"regex",input:U.value,pattern:B.pattern.toString(),inst:k,continue:!B.abort})}})),ge=F("$ZodCheckLowerCase",((k,B)=>{B.pattern??(B.pattern=ne),pe.init(k,B)})),me=F("$ZodCheckUpperCase",((k,B)=>{B.pattern??(B.pattern=ae),pe.init(k,B)})),ye=F("$ZodCheckIncludes",((k,B)=>{re.init(k,B);const U=rt(B.includes),F=new RegExp("number"==typeof B.position?`^.{${B.position}}${U}`:U);B.pattern=F,k._zod.onattach.push((k=>{const B=k._zod.bag;B.patterns??(B.patterns=new Set),B.patterns.add(F)})),k._zod.check=U=>{U.value.includes(B.includes,B.position)||U.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:B.includes,input:U.value,inst:k,continue:!B.abort})}})),_e=F("$ZodCheckStartsWith",((k,B)=>{re.init(k,B);const U=new RegExp(`^${rt(B.prefix)}.*`);B.pattern??(B.pattern=U),k._zod.onattach.push((k=>{const B=k._zod.bag;B.patterns??(B.patterns=new Set),B.patterns.add(U)})),k._zod.check=U=>{U.value.startsWith(B.prefix)||U.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:B.prefix,input:U.value,inst:k,continue:!B.abort})}})),Ee=F("$ZodCheckEndsWith",((k,B)=>{re.init(k,B);const U=new RegExp(`.*${rt(B.suffix)}$`);B.pattern??(B.pattern=U),k._zod.onattach.push((k=>{const B=k._zod.bag;B.patterns??(B.patterns=new Set),B.patterns.add(U)})),k._zod.check=U=>{U.value.endsWith(B.suffix)||U.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:B.suffix,input:U.value,inst:k,continue:!B.abort})}}));const we=F("$ZodCheckOverwrite",((k,B)=>{re.init(k,B),k._zod.check=k=>{k.value=B.tx(k.value)}}));class Te{constructor(k=[]){this.content=[],this.indent=0,this&&(this.args=k)}indented(k){this.indent+=1,k(this),this.indent-=1}write(k){if("function"==typeof k)return k(this,{execution:"sync"}),void k(this,{execution:"async"});const B=k.split("\n").filter((k=>k)),U=Math.min(...B.map((k=>k.length-k.trimStart().length))),F=B.map((k=>k.slice(U))).map((k=>" ".repeat(2*this.indent)+k));for(const G of F)this.content.push(G)}compile(){return new Function(...this?.args,[...(this?.content??[""]).map((k=>` ${k}`))].join("\n"))}}const Se={major:4,minor:1,patch:12},Ae=F("$ZodType",((k,B)=>{var U;k??(k={}),k._zod.def=B,k._zod.bag=k._zod.bag||{},k._zod.version=Se;const F=[...k._zod.def.checks??[]];k._zod.traits.has("$ZodCheck")&&F.unshift(k);for(const G of F)for(const B of G._zod.onattach)B(k);if(0===F.length)(U=k._zod).deferred??(U.deferred=[]),k._zod.deferred?.push((()=>{k._zod.run=k._zod.parse}));else{const B=(k,B,U)=>{let F,j=lt(k);for(const $ of B){if($._zod.def.when){if(!$._zod.def.when(k))continue}else if(j)continue;const B=k.issues.length,H=$._zod.check(k);if(H instanceof Promise&&!1===U?.async)throw new G;if(F||H instanceof Promise)F=(F??Promise.resolve()).then((async()=>{await H;k.issues.length!==B&&(j||(j=lt(k,B)))}));else{if(k.issues.length===B)continue;j||(j=lt(k,B))}}return F?F.then((()=>k)):k},U=(U,j,$)=>{if(lt(U))return U.aborted=!0,U;const H=B(j,F,$);if(H instanceof Promise){if(!1===$.async)throw new G;return H.then((B=>k._zod.parse(B,$)))}return k._zod.parse(H,$)};k._zod.run=(j,$)=>{if($.skipChecks)return k._zod.parse(j,$);if("backward"===$.direction){const B=k._zod.parse({value:j.value,issues:[]},{...$,skipChecks:!0});return B instanceof Promise?B.then((k=>U(k,j,$))):U(B,j,$)}const H=k._zod.parse(j,$);if(H instanceof Promise){if(!1===$.async)throw new G;return H.then((k=>B(k,F,$)))}return B(H,F,$)}}k["~standard"]={validate:B=>{try{const U=Tt(k,B);return U.success?{value:U.data}:{issues:U.error?.issues}}catch(U){return At(k,B).then((k=>k.success?{value:k.data}:{issues:k.error?.issues}))}},vendor:"zod",version:1}})),Ce=F("$ZodString",((k,B)=>{var U;Ae.init(k,B),k._zod.pattern=[...k?._zod.bag?.patterns??[]].pop()??(U=k._zod.bag,new RegExp(`^${U?`[\\s\\S]{${U?.minimum??0},${U?.maximum??""}}`:"[\\s\\S]*"}$`)),k._zod.parse=(U,F)=>{if(B.coerce)try{U.value=String(U.value)}catch(F){}return"string"==typeof U.value||U.issues.push({expected:"string",code:"invalid_type",input:U.value,inst:k}),U}})),Oe=F("$ZodStringFormat",((k,B)=>{pe.init(k,B),Ce.init(k,B)})),Ie=F("$ZodGUID",((k,B)=>{B.pattern??(B.pattern=jt),Oe.init(k,B)})),De=F("$ZodUUID",((k,B)=>{if(B.version){const k={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[B.version];if(void 0===k)throw new Error(`Invalid UUID version: "${B.version}"`);B.pattern??(B.pattern=$t(k))}else B.pattern??(B.pattern=$t());Oe.init(k,B)})),Re=F("$ZodEmail",((k,B)=>{B.pattern??(B.pattern=Ht),Oe.init(k,B)})),Pe=F("$ZodURL",((k,B)=>{Oe.init(k,B),k._zod.check=U=>{try{const F=U.value.trim(),G=new URL(F);return B.hostname&&(B.hostname.lastIndex=0,B.hostname.test(G.hostname)||U.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Qt.source,input:U.value,inst:k,continue:!B.abort})),B.protocol&&(B.protocol.lastIndex=0,B.protocol.test(G.protocol.endsWith(":")?G.protocol.slice(0,-1):G.protocol)||U.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:B.protocol.source,input:U.value,inst:k,continue:!B.abort})),void(B.normalize?U.value=G.href:U.value=F)}catch(F){U.issues.push({code:"invalid_format",format:"url",input:U.value,inst:k,continue:!B.abort})}}})),Me=F("$ZodEmoji",((k,B)=>{B.pattern??(B.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Oe.init(k,B)})),Ne=F("$ZodNanoID",((k,B)=>{B.pattern??(B.pattern=Ft),Oe.init(k,B)})),xe=F("$ZodCUID",((k,B)=>{B.pattern??(B.pattern=xt),Oe.init(k,B)})),Le=F("$ZodCUID2",((k,B)=>{B.pattern??(B.pattern=Lt),Oe.init(k,B)})),ke=F("$ZodULID",((k,B)=>{B.pattern??(B.pattern=kt),Oe.init(k,B)})),Be=F("$ZodXID",((k,B)=>{B.pattern??(B.pattern=Bt),Oe.init(k,B)})),Ue=F("$ZodKSUID",((k,B)=>{B.pattern??(B.pattern=Ut),Oe.init(k,B)})),Fe=F("$ZodISODateTime",((k,B)=>{B.pattern??(B.pattern=function(k){const B=te({precision:k.precision}),U=["Z"];k.local&&U.push(""),k.offset&&U.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const F=`${B}(?:${U.join("|")})`;return new RegExp(`^${Zt}T(?:${F})$`)}(B)),Oe.init(k,B)})),Ge=F("$ZodISODate",((k,B)=>{B.pattern??(B.pattern=Jt),Oe.init(k,B)})),je=F("$ZodISOTime",((k,B)=>{B.pattern??(B.pattern=new RegExp(`^${te(B)}$`)),Oe.init(k,B)})),$e=F("$ZodISODuration",((k,B)=>{B.pattern??(B.pattern=Gt),Oe.init(k,B)})),He=F("$ZodIPv4",((k,B)=>{B.pattern??(B.pattern=Vt),Oe.init(k,B),k._zod.onattach.push((k=>{k._zod.bag.format="ipv4"}))})),Ve=F("$ZodIPv6",((k,B)=>{B.pattern??(B.pattern=Wt),Oe.init(k,B),k._zod.onattach.push((k=>{k._zod.bag.format="ipv6"})),k._zod.check=U=>{try{new URL(`http://[${U.value}]`)}catch{U.issues.push({code:"invalid_format",format:"ipv6",input:U.value,inst:k,continue:!B.abort})}}})),We=F("$ZodCIDRv4",((k,B)=>{B.pattern??(B.pattern=qt),Oe.init(k,B)})),qe=F("$ZodCIDRv6",((k,B)=>{B.pattern??(B.pattern=Kt),Oe.init(k,B),k._zod.check=U=>{const F=U.value.split("/");try{if(2!==F.length)throw new Error;const[k,B]=F;if(!B)throw new Error;const U=Number(B);if(`${U}`!==B)throw new Error;if(U<0||U>128)throw new Error;new URL(`http://[${k}]`)}catch{U.issues.push({code:"invalid_format",format:"cidrv6",input:U.value,inst:k,continue:!B.abort})}}}));function Ke(k){if(""===k)return!0;if(k.length%4!=0)return!1;try{return atob(k),!0}catch{return!1}}const ze=F("$ZodBase64",((k,B)=>{B.pattern??(B.pattern=zt),Oe.init(k,B),k._zod.onattach.push((k=>{k._zod.bag.contentEncoding="base64"})),k._zod.check=U=>{Ke(U.value)||U.issues.push({code:"invalid_format",format:"base64",input:U.value,inst:k,continue:!B.abort})}}));const Ye=F("$ZodBase64URL",((k,B)=>{B.pattern??(B.pattern=Yt),Oe.init(k,B),k._zod.onattach.push((k=>{k._zod.bag.contentEncoding="base64url"})),k._zod.check=U=>{(function(k){if(!Yt.test(k))return!1;const B=k.replace(/[-_]/g,(k=>"-"===k?"+":"/"));return Ke(B.padEnd(4*Math.ceil(B.length/4),"="))})(U.value)||U.issues.push({code:"invalid_format",format:"base64url",input:U.value,inst:k,continue:!B.abort})}})),Qe=F("$ZodE164",((k,B)=>{B.pattern??(B.pattern=Xt),Oe.init(k,B)}));const Xe=F("$ZodJWT",((k,B)=>{Oe.init(k,B),k._zod.check=U=>{(function(k,B=null){try{const U=k.split(".");if(3!==U.length)return!1;const[F]=U;if(!F)return!1;const G=JSON.parse(atob(F));return!("typ"in G&&"JWT"!==G?.typ||!G.alg||B&&(!("alg"in G)||G.alg!==B))}catch{return!1}})(U.value,B.alg)||U.issues.push({code:"invalid_format",format:"jwt",input:U.value,inst:k,continue:!B.abort})}})),Ze=F("$ZodNumber",((k,B)=>{Ae.init(k,B),k._zod.pattern=k._zod.bag.pattern??ie,k._zod.parse=(U,F)=>{if(B.coerce)try{U.value=Number(U.value)}catch($){}const G=U.value;if("number"==typeof G&&!Number.isNaN(G)&&Number.isFinite(G))return U;const j="number"==typeof G?Number.isNaN(G)?"NaN":Number.isFinite(G)?void 0:"Infinity":void 0;return U.issues.push({expected:"number",code:"invalid_type",input:G,inst:k,...j?{received:j}:{}}),U}})),Je=F("$ZodNumber",((k,B)=>{le.init(k,B),Ze.init(k,B)})),ti=F("$ZodBoolean",((k,B)=>{Ae.init(k,B),k._zod.pattern=se,k._zod.parse=(U,F)=>{if(B.coerce)try{U.value=Boolean(U.value)}catch(j){}const G=U.value;return"boolean"==typeof G||U.issues.push({expected:"boolean",code:"invalid_type",input:G,inst:k}),U}})),ei=F("$ZodUnknown",((k,B)=>{Ae.init(k,B),k._zod.parse=k=>k})),ii=F("$ZodNever",((k,B)=>{Ae.init(k,B),k._zod.parse=(B,U)=>(B.issues.push({expected:"never",code:"invalid_type",input:B.value,inst:k}),B)}));function si(k,B,U){k.issues.length&&B.issues.push(...ut(U,k.issues)),B.value[U]=k.value}const ni=F("$ZodArray",((k,B)=>{Ae.init(k,B),k._zod.parse=(U,F)=>{const G=U.value;if(!Array.isArray(G))return U.issues.push({expected:"array",code:"invalid_type",input:G,inst:k}),U;U.value=Array(G.length);const j=[];for(let k=0;ksi(B,U,k)))):si(H,U,k)}return j.length?Promise.all(j).then((()=>U)):U}}));function ai(k,B,U,F){k.issues.length&&B.issues.push(...ut(U,k.issues)),void 0===k.value?U in F&&(B.value[U]=void 0):B.value[U]=k.value}function ri(k){const B=Object.keys(k.shape);for(const G of B)if(!k.shape?.[G]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${G}": expected a Zod schema`);const U=(F=k.shape,Object.keys(F).filter((k=>"optional"===F[k]._zod.optin&&"optional"===F[k]._zod.optout)));var F;return{...k,keys:B,keySet:new Set(B),numKeys:B.length,optionalKeys:new Set(U)}}function oi(k,B,U,F,G,j){const $=[],H=G.keySet,V=G.catchall._zod,W=V.def.type;for(const q of Object.keys(B)){if(H.has(q))continue;if("never"===W){$.push(q);continue}const G=V.run({value:B[q],issues:[]},F);G instanceof Promise?k.push(G.then((k=>ai(k,U,q,B)))):ai(G,U,q,B)}return $.length&&U.issues.push({code:"unrecognized_keys",keys:$,input:B,inst:j}),k.length?Promise.all(k).then((()=>U)):U}const hi=F("$ZodObject",((k,B)=>{Ae.init(k,B);if(!Object.getOwnPropertyDescriptor(B,"shape")?.get){const k=B.shape;Object.defineProperty(B,"shape",{get:()=>{const U={...k};return Object.defineProperty(B,"shape",{value:U}),U}})}const U=q((()=>ri(B)));Q(k._zod,"propValues",(()=>{const k=B.shape,U={};for(const B in k){const F=k[B]._zod;if(F.values){U[B]??(U[B]=new Set);for(const k of F.values)U[B].add(k)}}return U}));const F=et,G=B.catchall;let j;k._zod.parse=(B,$)=>{j??(j=U.value);const H=B.value;if(!F(H))return B.issues.push({expected:"object",code:"invalid_type",input:H,inst:k}),B;B.value={};const V=[],W=j.shape;for(const k of j.keys){const U=W[k]._zod.run({value:H[k],issues:[]},$);U instanceof Promise?V.push(U.then((U=>ai(U,B,k,H)))):ai(U,B,k,H)}return G?oi(V,H,B,$,U.value,k):V.length?Promise.all(V).then((()=>B)):B}})),ci=F("$ZodObjectJIT",((k,B)=>{hi.init(k,B);const U=k._zod.parse,F=q((()=>ri(B)));let G;const j=et,H=!$.jitless,V=H&&it.value,W=B.catchall;let K;k._zod.parse=($,q)=>{K??(K=F.value);const z=$.value;return j(z)?H&&V&&!1===q?.async&&!0!==q.jitless?(G||(G=(k=>{const B=new Te(["shape","payload","ctx"]),U=F.value,G=k=>{const B=J(k);return`shape[${B}]._zod.run({ value: input[${B}], issues: [] }, ctx)`};B.write("const input = payload.value;");const j=Object.create(null);let $=0;for(const F of U.keys)j[F]="key_"+$++;B.write("const newResult = {};");for(const F of U.keys){const k=j[F],U=J(F);B.write(`const ${k} = ${G(F)};`),B.write(`\n if (${k}.issues.length) {\n payload.issues = payload.issues.concat(${k}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${U}, ...iss.path] : [${U}]\n })));\n }\n \n \n if (${k}.value === undefined) {\n if (${U} in input) {\n newResult[${U}] = undefined;\n }\n } else {\n newResult[${U}] = ${k}.value;\n }\n \n `)}B.write("payload.value = newResult;"),B.write("return payload;");const H=B.compile();return(B,U)=>H(k,B,U)})(B.shape)),$=G($,q),W?oi([],z,$,q,K,k):$):U($,q):($.issues.push({expected:"object",code:"invalid_type",input:z,inst:k}),$)}}));function di(k,B,U,F){for(const j of k)if(0===j.issues.length)return B.value=j.value,B;const G=k.filter((k=>!lt(k)));return 1===G.length?(B.value=G[0].value,G[0]):(B.issues.push({code:"invalid_union",input:B.value,inst:U,errors:k.map((k=>k.issues.map((k=>bt(k,F,H())))))}),B)}const li=F("$ZodUnion",((k,B)=>{Ae.init(k,B),Q(k._zod,"optin",(()=>B.options.some((k=>"optional"===k._zod.optin))?"optional":void 0)),Q(k._zod,"optout",(()=>B.options.some((k=>"optional"===k._zod.optout))?"optional":void 0)),Q(k._zod,"values",(()=>{if(B.options.every((k=>k._zod.values)))return new Set(B.options.flatMap((k=>Array.from(k._zod.values))))})),Q(k._zod,"pattern",(()=>{if(B.options.every((k=>k._zod.pattern))){const k=B.options.map((k=>k._zod.pattern));return new RegExp(`^(${k.map((k=>z(k.source))).join("|")})$`)}}));const U=1===B.options.length,F=B.options[0]._zod.run;k._zod.parse=(G,j)=>{if(U)return F(G,j);let $=!1;const H=[];for(const k of B.options){const B=k._zod.run({value:G.value,issues:[]},j);if(B instanceof Promise)H.push(B),$=!0;else{if(0===B.issues.length)return B;H.push(B)}}return $?Promise.all(H).then((B=>di(B,G,k,j))):di(H,G,k,j)}})),ui=F("$ZodIntersection",((k,B)=>{Ae.init(k,B),k._zod.parse=(k,U)=>{const F=k.value,G=B.left._zod.run({value:F,issues:[]},U),j=B.right._zod.run({value:F,issues:[]},U);return G instanceof Promise||j instanceof Promise?Promise.all([G,j]).then((([B,U])=>bi(k,B,U))):bi(k,G,j)}}));function fi(k,B){if(k===B)return{valid:!0,data:k};if(k instanceof Date&&B instanceof Date&&+k==+B)return{valid:!0,data:k};if(st(k)&&st(B)){const U=Object.keys(B),F=Object.keys(k).filter((k=>-1!==U.indexOf(k))),G={...k,...B};for(const j of F){const U=fi(k[j],B[j]);if(!U.valid)return{valid:!1,mergeErrorPath:[j,...U.mergeErrorPath]};G[j]=U.data}return{valid:!0,data:G}}if(Array.isArray(k)&&Array.isArray(B)){if(k.length!==B.length)return{valid:!1,mergeErrorPath:[]};const U=[];for(let F=0;F{Ae.init(k,B),k._zod.parse=(U,F)=>{const G=U.value;if(!st(G))return U.issues.push({expected:"record",code:"invalid_type",input:G,inst:k}),U;const j=[];if(B.keyType._zod.values){const $=B.keyType._zod.values;U.value={};for(const k of $)if("string"==typeof k||"number"==typeof k||"symbol"==typeof k){const $=B.valueType._zod.run({value:G[k],issues:[]},F);$ instanceof Promise?j.push($.then((B=>{B.issues.length&&U.issues.push(...ut(k,B.issues)),U.value[k]=B.value}))):($.issues.length&&U.issues.push(...ut(k,$.issues)),U.value[k]=$.value)}let H;for(const k in G)$.has(k)||(H=H??[],H.push(k));H&&H.length>0&&U.issues.push({code:"unrecognized_keys",input:G,inst:k,keys:H})}else{U.value={};for(const $ of Reflect.ownKeys(G)){if("__proto__"===$)continue;const V=B.keyType._zod.run({value:$,issues:[]},F);if(V instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(V.issues.length){U.issues.push({code:"invalid_key",origin:"record",issues:V.issues.map((k=>bt(k,F,H()))),input:$,path:[$],inst:k}),U.value[V.value]=V.value;continue}const W=B.valueType._zod.run({value:G[$],issues:[]},F);W instanceof Promise?j.push(W.then((k=>{k.issues.length&&U.issues.push(...ut($,k.issues)),U.value[V.value]=k.value}))):(W.issues.length&&U.issues.push(...ut($,W.issues)),U.value[V.value]=W.value)}}return j.length?Promise.all(j).then((()=>U)):U}}));const vi=F("$ZodEnum",((k,B)=>{Ae.init(k,B);const U=function(k){const B=Object.values(k).filter((k=>"number"==typeof k));return Object.entries(k).filter((([k,U])=>-1===B.indexOf(+k))).map((([k,B])=>B))}(B.entries),F=new Set(U);k._zod.values=F,k._zod.pattern=new RegExp(`^(${U.filter((k=>at.has(typeof k))).map((k=>"string"==typeof k?rt(k):k.toString())).join("|")})$`),k._zod.parse=(B,G)=>{const j=B.value;return F.has(j)||B.issues.push({code:"invalid_value",values:U,input:j,inst:k}),B}})),gi=F("$ZodTransform",((k,B)=>{Ae.init(k,B),k._zod.parse=(U,F)=>{if("backward"===F.direction)throw new j(k.constructor.name);const $=B.transform(U.value,U);if(F.async){return($ instanceof Promise?$:Promise.resolve($)).then((k=>(U.value=k,U)))}if($ instanceof Promise)throw new G;return U.value=$,U}}));function mi(k,B){return k.issues.length&&void 0===B?{issues:[],value:void 0}:k}const yi=F("$ZodOptional",((k,B)=>{Ae.init(k,B),k._zod.optin="optional",k._zod.optout="optional",Q(k._zod,"values",(()=>B.innerType._zod.values?new Set([...B.innerType._zod.values,void 0]):void 0)),Q(k._zod,"pattern",(()=>{const k=B.innerType._zod.pattern;return k?new RegExp(`^(${z(k.source)})?$`):void 0})),k._zod.parse=(k,U)=>{if("optional"===B.innerType._zod.optin){const F=B.innerType._zod.run(k,U);return F instanceof Promise?F.then((B=>mi(B,k.value))):mi(F,k.value)}return void 0===k.value?k:B.innerType._zod.run(k,U)}})),_i=F("$ZodNullable",((k,B)=>{Ae.init(k,B),Q(k._zod,"optin",(()=>B.innerType._zod.optin)),Q(k._zod,"optout",(()=>B.innerType._zod.optout)),Q(k._zod,"pattern",(()=>{const k=B.innerType._zod.pattern;return k?new RegExp(`^(${z(k.source)}|null)$`):void 0})),Q(k._zod,"values",(()=>B.innerType._zod.values?new Set([...B.innerType._zod.values,null]):void 0)),k._zod.parse=(k,U)=>null===k.value?k:B.innerType._zod.run(k,U)})),Ei=F("$ZodDefault",((k,B)=>{Ae.init(k,B),k._zod.optin="optional",Q(k._zod,"values",(()=>B.innerType._zod.values)),k._zod.parse=(k,U)=>{if("backward"===U.direction)return B.innerType._zod.run(k,U);if(void 0===k.value)return k.value=B.defaultValue,k;const F=B.innerType._zod.run(k,U);return F instanceof Promise?F.then((k=>wi(k,B))):wi(F,B)}}));function wi(k,B){return void 0===k.value&&(k.value=B.defaultValue),k}const Ti=F("$ZodPrefault",((k,B)=>{Ae.init(k,B),k._zod.optin="optional",Q(k._zod,"values",(()=>B.innerType._zod.values)),k._zod.parse=(k,U)=>("backward"===U.direction||void 0===k.value&&(k.value=B.defaultValue),B.innerType._zod.run(k,U))})),Si=F("$ZodNonOptional",((k,B)=>{Ae.init(k,B),Q(k._zod,"values",(()=>{const k=B.innerType._zod.values;return k?new Set([...k].filter((k=>void 0!==k))):void 0})),k._zod.parse=(U,F)=>{const G=B.innerType._zod.run(U,F);return G instanceof Promise?G.then((B=>Ai(B,k))):Ai(G,k)}}));function Ai(k,B){return k.issues.length||void 0!==k.value||k.issues.push({code:"invalid_type",expected:"nonoptional",input:k.value,inst:B}),k}const Ci=F("$ZodCatch",((k,B)=>{Ae.init(k,B),Q(k._zod,"optin",(()=>B.innerType._zod.optin)),Q(k._zod,"optout",(()=>B.innerType._zod.optout)),Q(k._zod,"values",(()=>B.innerType._zod.values)),k._zod.parse=(k,U)=>{if("backward"===U.direction)return B.innerType._zod.run(k,U);const F=B.innerType._zod.run(k,U);return F instanceof Promise?F.then((F=>(k.value=F.value,F.issues.length&&(k.value=B.catchValue({...k,error:{issues:F.issues.map((k=>bt(k,U,H())))},input:k.value}),k.issues=[]),k))):(k.value=F.value,F.issues.length&&(k.value=B.catchValue({...k,error:{issues:F.issues.map((k=>bt(k,U,H())))},input:k.value}),k.issues=[]),k)}})),Oi=F("$ZodPipe",((k,B)=>{Ae.init(k,B),Q(k._zod,"values",(()=>B.in._zod.values)),Q(k._zod,"optin",(()=>B.in._zod.optin)),Q(k._zod,"optout",(()=>B.out._zod.optout)),Q(k._zod,"propValues",(()=>B.in._zod.propValues)),k._zod.parse=(k,U)=>{if("backward"===U.direction){const F=B.out._zod.run(k,U);return F instanceof Promise?F.then((k=>Ii(k,B.in,U))):Ii(F,B.in,U)}const F=B.in._zod.run(k,U);return F instanceof Promise?F.then((k=>Ii(k,B.out,U))):Ii(F,B.out,U)}}));function Ii(k,B,U){return k.issues.length?(k.aborted=!0,k):B._zod.run({value:k.value,issues:k.issues},U)}const Di=F("$ZodReadonly",((k,B)=>{Ae.init(k,B),Q(k._zod,"propValues",(()=>B.innerType._zod.propValues)),Q(k._zod,"values",(()=>B.innerType._zod.values)),Q(k._zod,"optin",(()=>B.innerType._zod.optin)),Q(k._zod,"optout",(()=>B.innerType._zod.optout)),k._zod.parse=(k,U)=>{if("backward"===U.direction)return B.innerType._zod.run(k,U);const F=B.innerType._zod.run(k,U);return F instanceof Promise?F.then(Ri):Ri(F)}}));function Ri(k){return k.value=Object.freeze(k.value),k}const Pi=F("$ZodLazy",((k,B)=>{Ae.init(k,B),Q(k._zod,"innerType",(()=>B.getter())),Q(k._zod,"pattern",(()=>k._zod.innerType._zod.pattern)),Q(k._zod,"propValues",(()=>k._zod.innerType._zod.propValues)),Q(k._zod,"optin",(()=>k._zod.innerType._zod.optin??void 0)),Q(k._zod,"optout",(()=>k._zod.innerType._zod.optout??void 0)),k._zod.parse=(B,U)=>k._zod.innerType._zod.run(B,U)})),Mi=F("$ZodCustom",((k,B)=>{re.init(k,B),Ae.init(k,B),k._zod.parse=(k,B)=>k,k._zod.check=U=>{const F=U.value,G=B.fn(F);if(G instanceof Promise)return G.then((B=>Ni(B,U,F,k)));Ni(G,U,F,k)}}));function Ni(k,B,U,F){if(!k){const k={code:"custom",input:U,inst:F,path:[...F._zod.def.path??[]],continue:!F._zod.def.abort};F._zod.def.params&&(k.params=F._zod.def.params),B.issues.push(vt(k))}}const xi=()=>{const k={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function B(B){return k[B]??null}const U={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return k=>{switch(k.code){case"invalid_type":return`Invalid input: expected ${k.expected}, received ${(k=>{const B=typeof k;switch(B){case"number":return Number.isNaN(k)?"NaN":"number";case"object":if(Array.isArray(k))return"array";if(null===k)return"null";if(Object.getPrototypeOf(k)!==Object.prototype&&k.constructor)return k.constructor.name}return B})(k.input)}`;case"invalid_value":return 1===k.values.length?`Invalid input: expected ${ct(k.values[0])}`:`Invalid option: expected one of ${V(k.values,"|")}`;case"too_big":{const U=k.inclusive?"<=":"<",F=B(k.origin);return F?`Too big: expected ${k.origin??"value"} to have ${U}${k.maximum.toString()} ${F.unit??"elements"}`:`Too big: expected ${k.origin??"value"} to be ${U}${k.maximum.toString()}`}case"too_small":{const U=k.inclusive?">=":">",F=B(k.origin);return F?`Too small: expected ${k.origin} to have ${U}${k.minimum.toString()} ${F.unit}`:`Too small: expected ${k.origin} to be ${U}${k.minimum.toString()}`}case"invalid_format":{const B=k;return"starts_with"===B.format?`Invalid string: must start with "${B.prefix}"`:"ends_with"===B.format?`Invalid string: must end with "${B.suffix}"`:"includes"===B.format?`Invalid string: must include "${B.includes}"`:"regex"===B.format?`Invalid string: must match pattern ${B.pattern}`:`Invalid ${U[B.format]??k.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${k.divisor}`;case"unrecognized_keys":return`Unrecognized key${k.keys.length>1?"s":""}: ${V(k.keys,", ")}`;case"invalid_key":return`Invalid key in ${k.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${k.origin}`;default:return"Invalid input"}}};Symbol("ZodOutput"),Symbol("ZodInput");class Li{constructor(){this._map=new WeakMap,this._idmap=new Map}add(k,...B){const U=B[0];if(this._map.set(k,U),U&&"object"==typeof U&&"id"in U){if(this._idmap.has(U.id))throw new Error(`ID ${U.id} already exists in the registry`);this._idmap.set(U.id,k)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(k){const B=this._map.get(k);return B&&"object"==typeof B&&"id"in B&&this._idmap.delete(B.id),this._map.delete(k),this}get(k){const B=k._zod.parent;if(B){const U={...this.get(B)??{}};delete U.id;const F={...U,...this._map.get(k)};return Object.keys(F).length?F:void 0}return this._map.get(k)}has(k){return this._map.has(k)}}function ki(){return new Li}const Bi=ki();function Ui(k,B){return new k({type:"string",format:"guid",check:"string_format",abort:!1,...ht(B)})}function Fi(k,B){return new he({check:"less_than",...ht(B),value:k,inclusive:!1})}function Gi(k,B){return new he({check:"less_than",...ht(B),value:k,inclusive:!0})}function ji(k,B){return new ce({check:"greater_than",...ht(B),value:k,inclusive:!1})}function $i(k,B){return new ce({check:"greater_than",...ht(B),value:k,inclusive:!0})}function Hi(k,B){return new de({check:"multiple_of",...ht(B),value:k})}function Vi(k,B){return new ue({check:"max_length",...ht(B),maximum:k})}function Wi(k,B){return new fe({check:"min_length",...ht(B),minimum:k})}function qi(k,B){return new be({check:"length_equals",...ht(B),length:k})}function Ki(k){return new we({check:"overwrite",tx:k})}function zi(k){const B=function(k,B){const U=new re({check:"custom",...ht(B)});return U._zod.check=k,U}((U=>(U.addIssue=k=>{if("string"==typeof k)U.issues.push(vt(k,U.value,B._zod.def));else{const F=k;F.fatal&&(F.continue=!1),F.code??(F.code="custom"),F.input??(F.input=U.value),F.inst??(F.inst=B),F.continue??(F.continue=!B._zod.def.abort),U.issues.push(vt(F))}},k(U.value,U))));return B}const Yi=F("ZodISODateTime",((k,B)=>{Fe.init(k,B),Es.init(k,B)}));function Qi(k){return function(k,B){return new k({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ht(B)})}(Yi,k)}const Xi=F("ZodISODate",((k,B)=>{Ge.init(k,B),Es.init(k,B)}));function Zi(k){return function(k,B){return new k({type:"string",format:"date",check:"string_format",...ht(B)})}(Xi,k)}const Ji=F("ZodISOTime",((k,B)=>{je.init(k,B),Es.init(k,B)}));function ts(k){return function(k,B){return new k({type:"string",format:"time",check:"string_format",precision:null,...ht(B)})}(Ji,k)}const es=F("ZodISODuration",((k,B)=>{$e.init(k,B),Es.init(k,B)}));function is(k){return function(k,B){return new k({type:"string",format:"duration",check:"string_format",...ht(B)})}(es,k)}const ss=(k,B)=>{mt.init(k,B),k.name="ZodError",Object.defineProperties(k,{format:{value:B=>function(k,B=(k=>k.message)){const U={_errors:[]},F=k=>{for(const G of k.issues)if("invalid_union"===G.code&&G.errors.length)G.errors.map((k=>F({issues:k})));else if("invalid_key"===G.code)F({issues:G.issues});else if("invalid_element"===G.code)F({issues:G.issues});else if(0===G.path.length)U._errors.push(B(G));else{let k=U,F=0;for(;Ffunction(k,B=(k=>k.message)){const U={},F=[];for(const G of k.issues)G.path.length>0?(U[G.path[0]]=U[G.path[0]]||[],U[G.path[0]].push(B(G))):F.push(B(G));return{formErrors:F,fieldErrors:U}}(k,B)},addIssue:{value:B=>{k.issues.push(B),k.message=JSON.stringify(k.issues,W,2)}},addIssues:{value:B=>{k.issues.push(...B),k.message=JSON.stringify(k.issues,W,2)}},isEmpty:{get:()=>0===k.issues.length}})},ns=(F("ZodError",ss),F("ZodError",ss,{Parent:Error})),as=_t(ns),rs=Et(ns),os=wt(ns),hs=St(ns),cs=Ct(ns),ds=Ot(ns),ls=It(ns),us=Dt(ns),fs=Rt(ns),bs=Pt(ns),ps=Mt(ns),vs=Nt(ns),gs=F("ZodType",((k,B)=>(Ae.init(k,B),k.def=B,k.type=B.type,Object.defineProperty(k,"_def",{value:B}),k.check=(...U)=>k.clone(Z(B,{checks:[...B.checks??[],...U.map((k=>"function"==typeof k?{_zod:{check:k,def:{check:"custom"},onattach:[]}}:k))]})),k.clone=(B,U)=>ot(k,B,U),k.brand=()=>k,k.register=(B,U)=>(B.add(k,U),k),k.parse=(B,U)=>as(k,B,U,{callee:k.parse}),k.safeParse=(B,U)=>os(k,B,U),k.parseAsync=async(B,U)=>rs(k,B,U,{callee:k.parseAsync}),k.safeParseAsync=async(B,U)=>hs(k,B,U),k.spa=k.safeParseAsync,k.encode=(B,U)=>cs(k,B,U),k.decode=(B,U)=>ds(k,B,U),k.encodeAsync=async(B,U)=>ls(k,B,U),k.decodeAsync=async(B,U)=>us(k,B,U),k.safeEncode=(B,U)=>fs(k,B,U),k.safeDecode=(B,U)=>bs(k,B,U),k.safeEncodeAsync=async(B,U)=>ps(k,B,U),k.safeDecodeAsync=async(B,U)=>vs(k,B,U),k.refine=(B,U)=>k.check(function(k,B={}){return function(k,B,U){return new k({type:"custom",check:"custom",fn:B,...ht(U)})}(Sn,k,B)}(B,U)),k.superRefine=B=>k.check(zi(B)),k.overwrite=B=>k.check(Ki(B)),k.optional=()=>un(k),k.nullable=()=>bn(k),k.nullish=()=>un(bn(k)),k.nonoptional=B=>function(k,B){return new gn({type:"nonoptional",innerType:k,...ht(B)})}(k,B),k.array=()=>Zs(k),k.or=B=>sn([k,B]),k.and=B=>new nn({type:"intersection",left:k,right:B}),k.transform=B=>_n(k,dn(B)),k.default=B=>{return U=B,new pn({type:"default",innerType:k,get defaultValue(){return"function"==typeof U?U():nt(U)}});var U},k.prefault=B=>{return U=B,new vn({type:"prefault",innerType:k,get defaultValue(){return"function"==typeof U?U():nt(U)}});var U},k.catch=B=>{return new mn({type:"catch",innerType:k,catchValue:"function"==typeof(U=B)?U:()=>U});var U},k.pipe=B=>_n(k,B),k.readonly=()=>new En({type:"readonly",innerType:k}),k.describe=B=>{const U=k.clone();return Bi.add(U,{description:B}),U},Object.defineProperty(k,"description",{get:()=>Bi.get(k)?.description,configurable:!0}),k.meta=(...B)=>{if(0===B.length)return Bi.get(k);const U=k.clone();return Bi.add(U,B[0]),U},k.isOptional=()=>k.safeParse(void 0).success,k.isNullable=()=>k.safeParse(null).success,k))),ms=F("_ZodString",((k,B)=>{Ce.init(k,B),gs.init(k,B);const U=k._zod.bag;k.format=U.format??null,k.minLength=U.minimum??null,k.maxLength=U.maximum??null,k.regex=(...B)=>k.check(function(k,B){return new ve({check:"string_format",format:"regex",...ht(B),pattern:k})}(...B)),k.includes=(...B)=>k.check(function(k,B){return new ye({check:"string_format",format:"includes",...ht(B),includes:k})}(...B)),k.startsWith=(...B)=>k.check(function(k,B){return new _e({check:"string_format",format:"starts_with",...ht(B),prefix:k})}(...B)),k.endsWith=(...B)=>k.check(function(k,B){return new Ee({check:"string_format",format:"ends_with",...ht(B),suffix:k})}(...B)),k.min=(...B)=>k.check(Wi(...B)),k.max=(...B)=>k.check(Vi(...B)),k.length=(...B)=>k.check(qi(...B)),k.nonempty=(...B)=>k.check(Wi(1,...B)),k.lowercase=B=>k.check(function(k){return new ge({check:"string_format",format:"lowercase",...ht(k)})}(B)),k.uppercase=B=>k.check(function(k){return new me({check:"string_format",format:"uppercase",...ht(k)})}(B)),k.trim=()=>k.check(Ki((k=>k.trim()))),k.normalize=(...B)=>k.check(function(k){return Ki((B=>B.normalize(k)))}(...B)),k.toLowerCase=()=>k.check(Ki((k=>k.toLowerCase()))),k.toUpperCase=()=>k.check(Ki((k=>k.toUpperCase())))})),ys=F("ZodString",((k,B)=>{Ce.init(k,B),ms.init(k,B),k.email=B=>k.check(function(k,B){return new k({type:"string",format:"email",check:"string_format",abort:!1,...ht(B)})}(ws,B)),k.url=B=>k.check(function(k,B){return new k({type:"string",format:"url",check:"string_format",abort:!1,...ht(B)})}(As,B)),k.jwt=B=>k.check(function(k,B){return new k({type:"string",format:"jwt",check:"string_format",abort:!1,...ht(B)})}(Gs,B)),k.emoji=B=>k.check(function(k,B){return new k({type:"string",format:"emoji",check:"string_format",abort:!1,...ht(B)})}(Cs,B)),k.guid=B=>k.check(Ui(Ts,B)),k.uuid=B=>k.check(function(k,B){return new k({type:"string",format:"uuid",check:"string_format",abort:!1,...ht(B)})}(Ss,B)),k.uuidv4=B=>k.check(function(k,B){return new k({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ht(B)})}(Ss,B)),k.uuidv6=B=>k.check(function(k,B){return new k({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ht(B)})}(Ss,B)),k.uuidv7=B=>k.check(function(k,B){return new k({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ht(B)})}(Ss,B)),k.nanoid=B=>k.check(function(k,B){return new k({type:"string",format:"nanoid",check:"string_format",abort:!1,...ht(B)})}(Os,B)),k.guid=B=>k.check(Ui(Ts,B)),k.cuid=B=>k.check(function(k,B){return new k({type:"string",format:"cuid",check:"string_format",abort:!1,...ht(B)})}(Is,B)),k.cuid2=B=>k.check(function(k,B){return new k({type:"string",format:"cuid2",check:"string_format",abort:!1,...ht(B)})}(Ds,B)),k.ulid=B=>k.check(function(k,B){return new k({type:"string",format:"ulid",check:"string_format",abort:!1,...ht(B)})}(Rs,B)),k.base64=B=>k.check(function(k,B){return new k({type:"string",format:"base64",check:"string_format",abort:!1,...ht(B)})}(Bs,B)),k.base64url=B=>k.check(function(k,B){return new k({type:"string",format:"base64url",check:"string_format",abort:!1,...ht(B)})}(Us,B)),k.xid=B=>k.check(function(k,B){return new k({type:"string",format:"xid",check:"string_format",abort:!1,...ht(B)})}(Ps,B)),k.ksuid=B=>k.check(function(k,B){return new k({type:"string",format:"ksuid",check:"string_format",abort:!1,...ht(B)})}(Ms,B)),k.ipv4=B=>k.check(function(k,B){return new k({type:"string",format:"ipv4",check:"string_format",abort:!1,...ht(B)})}(Ns,B)),k.ipv6=B=>k.check(function(k,B){return new k({type:"string",format:"ipv6",check:"string_format",abort:!1,...ht(B)})}(xs,B)),k.cidrv4=B=>k.check(function(k,B){return new k({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ht(B)})}(Ls,B)),k.cidrv6=B=>k.check(function(k,B){return new k({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ht(B)})}(ks,B)),k.e164=B=>k.check(function(k,B){return new k({type:"string",format:"e164",check:"string_format",abort:!1,...ht(B)})}(Fs,B)),k.datetime=B=>k.check(Qi(B)),k.date=B=>k.check(Zi(B)),k.time=B=>k.check(ts(B)),k.duration=B=>k.check(is(B))}));function _s(k){return function(k,B){return new k({type:"string",...ht(B)})}(ys,k)}const Es=F("ZodStringFormat",((k,B)=>{Oe.init(k,B),ms.init(k,B)})),ws=F("ZodEmail",((k,B)=>{Re.init(k,B),Es.init(k,B)}));const Ts=F("ZodGUID",((k,B)=>{Ie.init(k,B),Es.init(k,B)}));const Ss=F("ZodUUID",((k,B)=>{De.init(k,B),Es.init(k,B)}));const As=F("ZodURL",((k,B)=>{Pe.init(k,B),Es.init(k,B)}));const Cs=F("ZodEmoji",((k,B)=>{Me.init(k,B),Es.init(k,B)}));const Os=F("ZodNanoID",((k,B)=>{Ne.init(k,B),Es.init(k,B)}));const Is=F("ZodCUID",((k,B)=>{xe.init(k,B),Es.init(k,B)}));const Ds=F("ZodCUID2",((k,B)=>{Le.init(k,B),Es.init(k,B)}));const Rs=F("ZodULID",((k,B)=>{ke.init(k,B),Es.init(k,B)}));const Ps=F("ZodXID",((k,B)=>{Be.init(k,B),Es.init(k,B)}));const Ms=F("ZodKSUID",((k,B)=>{Ue.init(k,B),Es.init(k,B)}));const Ns=F("ZodIPv4",((k,B)=>{He.init(k,B),Es.init(k,B)}));const xs=F("ZodIPv6",((k,B)=>{Ve.init(k,B),Es.init(k,B)}));const Ls=F("ZodCIDRv4",((k,B)=>{We.init(k,B),Es.init(k,B)}));const ks=F("ZodCIDRv6",((k,B)=>{qe.init(k,B),Es.init(k,B)}));const Bs=F("ZodBase64",((k,B)=>{ze.init(k,B),Es.init(k,B)}));const Us=F("ZodBase64URL",((k,B)=>{Ye.init(k,B),Es.init(k,B)}));const Fs=F("ZodE164",((k,B)=>{Qe.init(k,B),Es.init(k,B)}));const Gs=F("ZodJWT",((k,B)=>{Xe.init(k,B),Es.init(k,B)}));const js=F("ZodNumber",((k,B)=>{Ze.init(k,B),gs.init(k,B),k.gt=(B,U)=>k.check(ji(B,U)),k.gte=(B,U)=>k.check($i(B,U)),k.min=(B,U)=>k.check($i(B,U)),k.lt=(B,U)=>k.check(Fi(B,U)),k.lte=(B,U)=>k.check(Gi(B,U)),k.max=(B,U)=>k.check(Gi(B,U)),k.int=B=>k.check(Vs(B)),k.safe=B=>k.check(Vs(B)),k.positive=B=>k.check(ji(0,B)),k.nonnegative=B=>k.check($i(0,B)),k.negative=B=>k.check(Fi(0,B)),k.nonpositive=B=>k.check(Gi(0,B)),k.multipleOf=(B,U)=>k.check(Hi(B,U)),k.step=(B,U)=>k.check(Hi(B,U)),k.finite=()=>k;const U=k._zod.bag;k.minValue=Math.max(U.minimum??Number.NEGATIVE_INFINITY,U.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,k.maxValue=Math.min(U.maximum??Number.POSITIVE_INFINITY,U.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,k.isInt=(U.format??"").includes("int")||Number.isSafeInteger(U.multipleOf??.5),k.isFinite=!0,k.format=U.format??null}));function $s(k){return function(k,B){return new k({type:"number",checks:[],...ht(B)})}(js,k)}const Hs=F("ZodNumberFormat",((k,B)=>{Je.init(k,B),js.init(k,B)}));function Vs(k){return function(k,B){return new k({type:"number",check:"number_format",abort:!1,format:"safeint",...ht(B)})}(Hs,k)}const Ws=F("ZodBoolean",((k,B)=>{ti.init(k,B),gs.init(k,B)}));function qs(k){return function(k,B){return new k({type:"boolean",...ht(B)})}(Ws,k)}const Ks=F("ZodUnknown",((k,B)=>{ei.init(k,B),gs.init(k,B)}));function zs(){return function(k){return new k({type:"unknown"})}(Ks)}const Ys=F("ZodNever",((k,B)=>{ii.init(k,B),gs.init(k,B)}));function Qs(k){return function(k,B){return new k({type:"never",...ht(B)})}(Ys,k)}const Xs=F("ZodArray",((k,B)=>{ni.init(k,B),gs.init(k,B),k.element=B.element,k.min=(B,U)=>k.check(Wi(B,U)),k.nonempty=B=>k.check(Wi(1,B)),k.max=(B,U)=>k.check(Vi(B,U)),k.length=(B,U)=>k.check(qi(B,U)),k.unwrap=()=>k.element}));function Zs(k,B){return function(k,B,U){return new k({type:"array",element:B,...ht(U)})}(Xs,k,B)}const Js=F("ZodObject",((k,B)=>{ci.init(k,B),gs.init(k,B),Q(k,"shape",(()=>B.shape)),k.keyof=()=>hn(Object.keys(k._zod.def.shape)),k.catchall=B=>k.clone({...k._zod.def,catchall:B}),k.passthrough=()=>k.clone({...k._zod.def,catchall:zs()}),k.loose=()=>k.clone({...k._zod.def,catchall:zs()}),k.strict=()=>k.clone({...k._zod.def,catchall:Qs()}),k.strip=()=>k.clone({...k._zod.def,catchall:void 0}),k.extend=B=>function(k,B){if(!st(B))throw new Error("Invalid input to extend: expected a plain object");const U=k._zod.def.checks;if(U&&U.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const F=Z(k._zod.def,{get shape(){const U={...k._zod.def.shape,...B};return X(this,"shape",U),U},checks:[]});return ot(k,F)}(k,B),k.safeExtend=B=>function(k,B){if(!st(B))throw new Error("Invalid input to safeExtend: expected a plain object");const U={...k._zod.def,get shape(){const U={...k._zod.def.shape,...B};return X(this,"shape",U),U},checks:k._zod.def.checks};return ot(k,U)}(k,B),k.merge=B=>function(k,B){const U=Z(k._zod.def,{get shape(){const U={...k._zod.def.shape,...B._zod.def.shape};return X(this,"shape",U),U},get catchall(){return B._zod.def.catchall},checks:[]});return ot(k,U)}(k,B),k.pick=B=>function(k,B){const U=k._zod.def;return ot(k,Z(k._zod.def,{get shape(){const k={};for(const F in B){if(!(F in U.shape))throw new Error(`Unrecognized key: "${F}"`);B[F]&&(k[F]=U.shape[F])}return X(this,"shape",k),k},checks:[]}))}(k,B),k.omit=B=>function(k,B){const U=k._zod.def,F=Z(k._zod.def,{get shape(){const F={...k._zod.def.shape};for(const k in B){if(!(k in U.shape))throw new Error(`Unrecognized key: "${k}"`);B[k]&&delete F[k]}return X(this,"shape",F),F},checks:[]});return ot(k,F)}(k,B),k.partial=(...B)=>function(k,B,U){const F=Z(B._zod.def,{get shape(){const F=B._zod.def.shape,G={...F};if(U)for(const B in U){if(!(B in F))throw new Error(`Unrecognized key: "${B}"`);U[B]&&(G[B]=k?new k({type:"optional",innerType:F[B]}):F[B])}else for(const B in F)G[B]=k?new k({type:"optional",innerType:F[B]}):F[B];return X(this,"shape",G),G},checks:[]});return ot(B,F)}(ln,k,B[0]),k.required=(...B)=>function(k,B,U){const F=Z(B._zod.def,{get shape(){const F=B._zod.def.shape,G={...F};if(U)for(const B in U){if(!(B in G))throw new Error(`Unrecognized key: "${B}"`);U[B]&&(G[B]=new k({type:"nonoptional",innerType:F[B]}))}else for(const B in F)G[B]=new k({type:"nonoptional",innerType:F[B]});return X(this,"shape",G),G},checks:[]});return ot(B,F)}(gn,k,B[0])}));function tn(k,B){const U={type:"object",shape:k??{},...ht(B)};return new Js(U)}const en=F("ZodUnion",((k,B)=>{li.init(k,B),gs.init(k,B),k.options=B.options}));function sn(k,B){return new en({type:"union",options:k,...ht(B)})}const nn=F("ZodIntersection",((k,B)=>{ui.init(k,B),gs.init(k,B)}));const an=F("ZodRecord",((k,B)=>{pi.init(k,B),gs.init(k,B),k.keyType=B.keyType,k.valueType=B.valueType}));function rn(k,B,U){return new an({type:"record",keyType:k,valueType:B,...ht(U)})}const on=F("ZodEnum",((k,B)=>{vi.init(k,B),gs.init(k,B),k.enum=B.entries,k.options=Object.values(B.entries);const U=new Set(Object.keys(B.entries));k.extract=(k,F)=>{const G={};for(const j of k){if(!U.has(j))throw new Error(`Key ${j} not found in enum`);G[j]=B.entries[j]}return new on({...B,checks:[],...ht(F),entries:G})},k.exclude=(k,F)=>{const G={...B.entries};for(const B of k){if(!U.has(B))throw new Error(`Key ${B} not found in enum`);delete G[B]}return new on({...B,checks:[],...ht(F),entries:G})}}));function hn(k,B){const U=Array.isArray(k)?Object.fromEntries(k.map((k=>[k,k]))):k;return new on({type:"enum",entries:U,...ht(B)})}const cn=F("ZodTransform",((k,B)=>{gi.init(k,B),gs.init(k,B),k._zod.parse=(U,F)=>{if("backward"===F.direction)throw new j(k.constructor.name);U.addIssue=F=>{if("string"==typeof F)U.issues.push(vt(F,U.value,B));else{const B=F;B.fatal&&(B.continue=!1),B.code??(B.code="custom"),B.input??(B.input=U.value),B.inst??(B.inst=k),U.issues.push(vt(B))}};const G=B.transform(U.value,U);return G instanceof Promise?G.then((k=>(U.value=k,U))):(U.value=G,U)}}));function dn(k){return new cn({type:"transform",transform:k})}const ln=F("ZodOptional",((k,B)=>{yi.init(k,B),gs.init(k,B),k.unwrap=()=>k._zod.def.innerType}));function un(k){return new ln({type:"optional",innerType:k})}const fn=F("ZodNullable",((k,B)=>{_i.init(k,B),gs.init(k,B),k.unwrap=()=>k._zod.def.innerType}));function bn(k){return new fn({type:"nullable",innerType:k})}const pn=F("ZodDefault",((k,B)=>{Ei.init(k,B),gs.init(k,B),k.unwrap=()=>k._zod.def.innerType,k.removeDefault=k.unwrap}));const vn=F("ZodPrefault",((k,B)=>{Ti.init(k,B),gs.init(k,B),k.unwrap=()=>k._zod.def.innerType}));const gn=F("ZodNonOptional",((k,B)=>{Si.init(k,B),gs.init(k,B),k.unwrap=()=>k._zod.def.innerType}));const mn=F("ZodCatch",((k,B)=>{Ci.init(k,B),gs.init(k,B),k.unwrap=()=>k._zod.def.innerType,k.removeCatch=k.unwrap}));const yn=F("ZodPipe",((k,B)=>{Oi.init(k,B),gs.init(k,B),k.in=B.in,k.out=B.out}));function _n(k,B){return new yn({type:"pipe",in:k,out:B})}const En=F("ZodReadonly",((k,B)=>{Di.init(k,B),gs.init(k,B),k.unwrap=()=>k._zod.def.innerType}));const wn=F("ZodLazy",((k,B)=>{Pi.init(k,B),gs.init(k,B),k.unwrap=()=>k._zod.def.getter()}));function Tn(k){return new wn({type:"lazy",getter:k})}const Sn=F("ZodCustom",((k,B)=>{Mi.init(k,B),gs.init(k,B)}));var An;An||(An={}),H({localeError:xi()})},6030:k=>{"use strict";k.exports=JSON.parse('{"normal-forest-1-pet-collection":{"data":{"name":"normal-forest-1-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":1}}]},"metadata":{"location":"forest"}},"normal-forest-2-pet-collection":{"data":{"name":"normal-forest-2-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":2}}]},"metadata":{"location":"forest"}},"normal-forest-3-pet-collection":{"data":{"name":"normal-forest-3-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":3}}]},"metadata":{"location":"forest"}},"normal-forest-4-pet-collection":{"data":{"name":"normal-forest-4-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":4}}]},"metadata":{"location":"forest"}},"normal-shiverchill-5-pet-collection":{"data":{"name":"normal-shiverchill-5-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":4}}]},"metadata":{"location":"shiverchill"}},"normal-shiverchill-6-pet-collection":{"data":{"name":"normal-shiverchill-6-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":5}}]},"metadata":{"location":"shiverchill"}},"normal-shiverchill-7-pet-collection":{"data":{"name":"normal-shiverchill-7-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":6}}]},"metadata":{"location":"shiverchill"}},"normal-shiverchill-8-pet-collection":{"data":{"name":"normal-shiverchill-8-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":7}}]},"metadata":{"location":"shiverchill"}},"normal-shiverchill-9-pet-collection":{"data":{"name":"normal-shiverchill-9-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":9}}]},"metadata":{"location":"shiverchill"}},"normal-bonfire-spire-10-pet-collection":{"data":{"name":"normal-bonfire-spire-10-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":9}}]},"metadata":{"location":"bonfire-spire"}},"normal-bonfire-spire-11-pet-collection":{"data":{"name":"normal-bonfire-spire-11-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":10}}]},"metadata":{"location":"bonfire-spire"}},"normal-bonfire-spire-12-pet-collection":{"data":{"name":"normal-bonfire-spire-12-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":11}}]},"metadata":{"location":"bonfire-spire"}},"normal-bonfire-spire-13-pet-collection":{"data":{"name":"normal-bonfire-spire-13-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":12}}]},"metadata":{"location":"bonfire-spire"}},"normal-bonfire-spire-14-pet-collection":{"data":{"name":"normal-bonfire-spire-14-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":14}}]},"metadata":{"location":"bonfire-spire"}},"normal-shipwreck-shore-15-pet-collection":{"data":{"name":"normal-shipwreck-shore-15-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":14}}]},"metadata":{"location":"shipwreck-shore"}},"normal-shipwreck-shore-16-pet-collection":{"data":{"name":"normal-shipwreck-shore-16-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":15}}]},"metadata":{"location":"shipwreck-shore"}},"normal-shipwreck-shore-17-pet-collection":{"data":{"name":"normal-shipwreck-shore-17-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":16}}]},"metadata":{"location":"shipwreck-shore"}},"normal-shipwreck-shore-18-pet-collection":{"data":{"name":"normal-shipwreck-shore-18-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":17}}]},"metadata":{"location":"shipwreck-shore"}},"normal-shipwreck-shore-19-pet-collection":{"data":{"name":"normal-shipwreck-shore-19-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":19}}]},"metadata":{"location":"shipwreck-shore"}},"normal-skywatch-20-pet-collection":{"data":{"name":"normal-skywatch-20-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":19}}]},"metadata":{"location":"skywatch"}},"normal-skywatch-21-pet-collection":{"data":{"name":"normal-skywatch-21-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":20}}]},"metadata":{"location":"skywatch"}},"normal-skywatch-22-pet-collection":{"data":{"name":"normal-skywatch-22-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":21}}]},"metadata":{"location":"skywatch"}},"normal-skywatch-23-pet-collection":{"data":{"name":"normal-skywatch-23-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":22}}]},"metadata":{"location":"skywatch"}},"normal-skywatch-24-pet-collection":{"data":{"name":"normal-skywatch-24-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":25}}]},"metadata":{"location":"skywatch"}},"normal-academy-25-pet-collection":{"data":{"name":"normal-academy-25-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":27}}]},"metadata":{"location":"academy"}},"normal-academy-26-pet-collection":{"data":{"name":"normal-academy-26-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":30}}]},"metadata":{"location":"academy"}},"normal-academy-27-pet-collection":{"data":{"name":"normal-academy-27-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":35}}]},"metadata":{"location":"academy"}},"normal-optional-wizard-28-pet-collection":{"data":{"name":"normal-optional-wizard-28-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":10}}]},"metadata":{"location":"optional-wizard"}},"normal-optional-wizard-29-pet-collection":{"data":{"name":"normal-optional-wizard-29-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":20}}]},"metadata":{"location":"optional-wizard"}},"normal-optional-wizard-30-pet-collection":{"data":{"name":"normal-optional-wizard-30-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":30}}]},"metadata":{"location":"optional-wizard"}},"normal-optional-wizard-31-pet-collection":{"data":{"name":"normal-optional-wizard-31-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":40}}]},"metadata":{"location":"optional-wizard"}},"normal-optional-wizard-32-pet-collection":{"data":{"name":"normal-optional-wizard-32-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":50}}]},"metadata":{"location":"optional-wizard"}},"hard-world-map-1-pet-collection":{"data":{"name":"hard-world-map-1-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":35}}]},"metadata":{"location":"world-map"}},"hard-forest-2-pet-collection":{"data":{"name":"hard-forest-2-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":37}}]},"metadata":{"location":"forest"}},"hard-forest-3-pet-collection":{"data":{"name":"hard-forest-3-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":39}}]},"metadata":{"location":"forest"}},"hard-forest-4-pet-collection":{"data":{"name":"hard-forest-4-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":42}}]},"metadata":{"location":"forest"}},"hard-forest-5-pet-collection":{"data":{"name":"hard-forest-5-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":46}}]},"metadata":{"location":"forest"}},"hard-shiverchill-6-pet-collection":{"data":{"name":"hard-shiverchill-6-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":48}}]},"metadata":{"location":"shiverchill"}},"hard-shiverchill-7-pet-collection":{"data":{"name":"hard-shiverchill-7-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":50}}]},"metadata":{"location":"shiverchill"}},"hard-shiverchill-8-pet-collection":{"data":{"name":"hard-shiverchill-8-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":52}}]},"metadata":{"location":"shiverchill"}},"hard-shiverchill-9-pet-collection":{"data":{"name":"hard-shiverchill-9-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":55}}]},"metadata":{"location":"shiverchill"}},"hard-shiverchill-10-pet-collection":{"data":{"name":"hard-shiverchill-10-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":59}}]},"metadata":{"location":"shiverchill"}},"hard-bonfire-spire-11-pet-collection":{"data":{"name":"hard-bonfire-spire-11-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":61}}]},"metadata":{"location":"bonfire-spire"}},"hard-bonfire-spire-12-pet-collection":{"data":{"name":"hard-bonfire-spire-12-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":63}}]},"metadata":{"location":"bonfire-spire"}},"hard-bonfire-spire-13-pet-collection":{"data":{"name":"hard-bonfire-spire-13-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":65}}]},"metadata":{"location":"bonfire-spire"}},"hard-bonfire-spire-14-pet-collection":{"data":{"name":"hard-bonfire-spire-14-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":68}}]},"metadata":{"location":"bonfire-spire"}},"hard-bonfire-spire-15-pet-collection":{"data":{"name":"hard-bonfire-spire-15-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":72}}]},"metadata":{"location":"bonfire-spire"}},"hard-shipwreck-shore-16-pet-collection":{"data":{"name":"hard-shipwreck-shore-16-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":74}}]},"metadata":{"location":"shipwreck-shore"}},"hard-shipwreck-shore-17-pet-collection":{"data":{"name":"hard-shipwreck-shore-17-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":76}}]},"metadata":{"location":"shipwreck-shore"}},"hard-shipwreck-shore-18-pet-collection":{"data":{"name":"hard-shipwreck-shore-18-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":78}}]},"metadata":{"location":"shipwreck-shore"}},"hard-shipwreck-shore-19-pet-collection":{"data":{"name":"hard-shipwreck-shore-19-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":81}}]},"metadata":{"location":"shipwreck-shore"}},"hard-shipwreck-shore-20-pet-collection":{"data":{"name":"hard-shipwreck-shore-20-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":85}}]},"metadata":{"location":"shipwreck-shore"}},"hard-skywatch-21-pet-collection":{"data":{"name":"hard-skywatch-21-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":87}}]},"metadata":{"location":"skywatch"}},"hard-skywatch-22-pet-collection":{"data":{"name":"hard-skywatch-22-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":89}}]},"metadata":{"location":"skywatch"}},"hard-skywatch-23-pet-collection":{"data":{"name":"hard-skywatch-23-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":91}}]},"metadata":{"location":"skywatch"}},"hard-skywatch-24-pet-collection":{"data":{"name":"hard-skywatch-24-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":94}}]},"metadata":{"location":"skywatch"}},"hard-skywatch-25-pet-collection":{"data":{"name":"hard-skywatch-25-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":98}}]},"metadata":{"location":"skywatch"}},"hard-academy-26-pet-collection":{"data":{"name":"hard-academy-26-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":100}}]},"metadata":{"location":"academy"}},"hard-academy-27-pet-collection":{"data":{"name":"hard-academy-27-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":105}}]},"metadata":{"location":"academy"}},"hard-academy-28-pet-collection":{"data":{"name":"hard-academy-28-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":110}}]},"metadata":{"location":"academy"}},"hard-optional-wizard-29-pet-collection":{"data":{"name":"hard-optional-wizard-29-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":50}}]},"metadata":{"location":"optional-wizard"}},"hard-optional-wizard-30-pet-collection":{"data":{"name":"hard-optional-wizard-30-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":65}}]},"metadata":{"location":"optional-wizard"}},"hard-optional-wizard-31-pet-collection":{"data":{"name":"hard-optional-wizard-31-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":85}}]},"metadata":{"location":"optional-wizard"}},"hard-optional-wizard-32-pet-collection":{"data":{"name":"hard-optional-wizard-32-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":110}}]},"metadata":{"location":"optional-wizard"}},"hard-optional-wizard-33-pet-collection":{"data":{"name":"hard-optional-wizard-33-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":130}}]},"metadata":{"location":"optional-wizard"}},"expert-world-map-1-pet-collection":{"data":{"name":"expert-world-map-1-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":115}}]},"metadata":{"location":"world-map"}},"expert-forest-2-pet-collection":{"data":{"name":"expert-forest-2-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":116}}]},"metadata":{"location":"forest"}},"expert-forest-3-pet-collection":{"data":{"name":"expert-forest-3-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":117}}]},"metadata":{"location":"forest"}},"expert-forest-4-pet-collection":{"data":{"name":"expert-forest-4-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":118}}]},"metadata":{"location":"forest"}},"expert-forest-5-pet-collection":{"data":{"name":"expert-forest-5-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":119}}]},"metadata":{"location":"forest"}},"expert-shiverchill-6-pet-collection":{"data":{"name":"expert-shiverchill-6-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":120}}]},"metadata":{"location":"shiverchill"}},"expert-shiverchill-7-pet-collection":{"data":{"name":"expert-shiverchill-7-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":121}}]},"metadata":{"location":"shiverchill"}},"expert-shiverchill-8-pet-collection":{"data":{"name":"expert-shiverchill-8-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":122}}]},"metadata":{"location":"shiverchill"}},"expert-shiverchill-9-pet-collection":{"data":{"name":"expert-shiverchill-9-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":123}}]},"metadata":{"location":"shiverchill"}},"expert-shiverchill-10-pet-collection":{"data":{"name":"expert-shiverchill-10-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":124}}]},"metadata":{"location":"shiverchill"}},"expert-bonfire-spire-11-pet-collection":{"data":{"name":"expert-bonfire-spire-11-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":125}}]},"metadata":{"location":"bonfire-spire"}},"expert-bonfire-spire-12-pet-collection":{"data":{"name":"expert-bonfire-spire-12-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":126}}]},"metadata":{"location":"bonfire-spire"}},"expert-bonfire-spire-13-pet-collection":{"data":{"name":"expert-bonfire-spire-13-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":127}}]},"metadata":{"location":"bonfire-spire"}},"expert-bonfire-spire-14-pet-collection":{"data":{"name":"expert-bonfire-spire-14-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":128}}]},"metadata":{"location":"bonfire-spire"}},"expert-bonfire-spire-15-pet-collection":{"data":{"name":"expert-bonfire-spire-15-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":129}}]},"metadata":{"location":"bonfire-spire"}},"expert-shipwreck-shore-16-pet-collection":{"data":{"name":"expert-shipwreck-shore-16-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":130}}]},"metadata":{"location":"shipwreck-shore"}},"expert-shipwreck-shore-17-pet-collection":{"data":{"name":"expert-shipwreck-shore-17-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":131}}]},"metadata":{"location":"shipwreck-shore"}},"expert-shipwreck-shore-18-pet-collection":{"data":{"name":"expert-shipwreck-shore-18-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":132}}]},"metadata":{"location":"shipwreck-shore"}},"expert-shipwreck-shore-19-pet-collection":{"data":{"name":"expert-shipwreck-shore-19-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":133}}]},"metadata":{"location":"shipwreck-shore"}},"expert-shipwreck-shore-20-pet-collection":{"data":{"name":"expert-shipwreck-shore-20-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":134}}]},"metadata":{"location":"shipwreck-shore"}},"expert-skywatch-21-pet-collection":{"data":{"name":"expert-skywatch-21-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":135}}]},"metadata":{"location":"skywatch"}},"expert-skywatch-22-pet-collection":{"data":{"name":"expert-skywatch-22-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":136}}]},"metadata":{"location":"skywatch"}},"expert-skywatch-23-pet-collection":{"data":{"name":"expert-skywatch-23-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":137}}]},"metadata":{"location":"skywatch"}},"expert-skywatch-24-pet-collection":{"data":{"name":"expert-skywatch-24-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":138}}]},"metadata":{"location":"skywatch"}},"expert-skywatch-25-pet-collection":{"data":{"name":"expert-skywatch-25-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":139}}]},"metadata":{"location":"skywatch"}},"expert-academy-26-pet-collection":{"data":{"name":"expert-academy-26-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":140}}]},"metadata":{"location":"academy"}},"expert-academy-27-pet-collection":{"data":{"name":"expert-academy-27-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":145}}]},"metadata":{"location":"academy"}},"expert-academy-28-pet-collection":{"data":{"name":"expert-academy-28-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":150}}]},"metadata":{"location":"academy"}},"expert-optional-wizard-29-pet-collection":{"data":{"name":"expert-optional-wizard-29-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":130}}]},"metadata":{"location":"optional-wizard"}},"expert-optional-wizard-30-pet-collection":{"data":{"name":"expert-optional-wizard-30-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":145}}]},"metadata":{"location":"optional-wizard"}},"expert-optional-wizard-31-pet-collection":{"data":{"name":"expert-optional-wizard-31-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":165}}]},"metadata":{"location":"optional-wizard"}},"expert-optional-wizard-32-pet-collection":{"data":{"name":"expert-optional-wizard-32-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":190}}]},"metadata":{"location":"optional-wizard"}},"expert-optional-wizard-33-pet-collection":{"data":{"name":"expert-optional-wizard-33-pet-collection","evaluationStrategy":"RequireAll","requirements":[{"kennel":{"isMythic":false,"unique":true,"petCount":205}}]},"metadata":{"location":"optional-wizard"}}}')},94554:k=>{"use strict";k.exports=JSON.parse('{"spawnLevelChanceSame":1,"spawnLevelChanceHigher":0,"spawnLevelChanceLower":0,"benchLevelChanceSame":1,"benchLevelChanceLower":0,"benchLevelChanceLowest":0,"spawnCooldownDuration":120,"threatIndicatorLevel":2,"encounterRatesPerRarity":{"regular":{"0":0.5,"1":0.25,"2":0.15,"3":0.07,"4":0.03},"hard":{"0":0.1,"1":0.2,"2":0.5,"3":0.15,"4":0.05},"expert":{"0":0.06,"1":0.12,"2":0.42,"3":0.25,"4":0.15}},"encounterRatesPerEvolutionTier":{"regular":{"1":1.5,"2":1.25,"3":1,"4":0},"hard":{"1":1,"2":1.25,"3":1,"4":0},"expert":{"1":1,"2":1.15,"3":1.5,"4":0}}}')},93096:k=>{"use strict";k.exports=JSON.parse('{"bonfire_spire-A1-chest1":[{"type":"gold","N":200}],"bonfire_spire-A4-chestGuardian":[{"type":"key","ID":12},{"type":"item","ID":92}],"bonfire_spire-B5-chest4":[{"type":"gold","N":200}],"bonfire_spire-C6-chest5":[{"type":"weapon","ID":21}],"bonfire_spire-D2-chest2":[{"type":"hat","ID":34}],"bonfire_spire-D3-chest3":[{"type":"outfit","ID":27}],"bonfire_spire-E5-chest6":[{"type":"gold","N":200}],"shipwreck_shore-A3-chestA3":[{"type":"gold","N":800},{"type":"weapon","ID":93}],"shipwreck_shore-A5-chestA5":[{"type":"hat","ID":81}],"shipwreck_shore-B10-chestB10":[{"type":"gold","N":600},{"type":"boots","ID":31}],"shipwreck_shore-B13-chestB13":[{"type":"gold","N":200}],"shipwreck_shore-B5-chestB5":[{"type":"gold","N":200}],"shipwreck_shore-C10-chestBreathingBubble":[{"type":"key","ID":14}],"shiverchill-A2-chest3":[{"type":"item","ID":71}],"shiverchill-A5-chest4":[{"type":"outfit","ID":48}],"shiverchill-A9-chest6":[{"type":"weapon","ID":73}],"shiverchill-B6-chest1":[{"type":"item","ID":73},{"type":"gold","N":250},{"type":"item","ID":75}],"shiverchill-B8-chest2":[{"type":"hat","ID":55}],"shiverchill-B9-chest5":[{"type":"item","ID":2},{"type":"item","ID":5},{"type":"item","ID":6},{"type":"item","ID":7},{"type":"item","ID":15}],"skywatch-A0-chest1":[{"type":"gold","N":200}],"skywatch-B1-chest2":[{"type":"outfit","ID":41}],"skywatch-C3-chest3":[{"type":"gold","N":500}],"skywatch-D2-chest4":[{"type":"weapon","ID":69}],"skywatch-E3-chest5":[{"type":"hat","ID":45}],"forest-A5-chest3":[{"type":"outfit","ID":12}],"forest-B7-chest1":[{"type":"weapon","ID":1}],"forest-B8-chest4":[{"type":"gold","N":500}],"forest-C4-chest2":[{"type":"gold","N":250}],"forest-C7-chest5":[{"type":"gold","N":500}],"forest-A4-chest6":[{"type":"gold","N":100},{"type":"currency","ID":13,"N":50},{"type":"item","ID":179,"N":10}]}')},56351:k=>{"use strict";k.exports=JSON.parse('{"endgame-guardian-firefly":{"bossID":54,"puppetMasterPreBattleDialogue":[1429],"puppetMasterDialogueSequence":[1436],"backgroundImageKey":"Battle_forest_generic_bg","foregroundImageKey":"Battle_forest_generic_fg","npcHelperData":[{"entranceRound":2,"dialogueSequence":[1414,1415]}]},"endgame-guardian-shiverchill":{"bossID":55,"puppetMasterPreBattleDialogue":[1430,1434],"puppetMasterDialogueSequence":[1437],"backgroundImageKey":"Battle_shiverchill_inside_bg","foregroundImageKey":"Battle_shiverchill_inside_fg","displayShield":true,"npcHelperData":[{"entranceRound":2,"dialogueSequence":[1416,1417]}]},"endgame-guardian-bonfire":{"bossID":56,"puppetMasterPreBattleDialogue":[1431],"puppetMasterDialogueSequence":[1438],"backgroundImageKey":"Battle_bonfire_lava_bg","foregroundImageKey":"Battle_bonfire_lava_fg","npcHelperData":[{"entranceRound":3,"dialogueSequence":[1418,1419]}]},"endgame-guardian-shipwreck":{"bossID":57,"puppetMasterPreBattleDialogue":[1432],"puppetMasterDialogueSequence":[1439],"backgroundImageKey":"Battle_shipwreck_inside_bg","foregroundImageKey":"Battle_shipwreck_inside_fg","npcHelperData":[{"entranceRound":1,"dialogueSequence":[1420,1421]}]},"endgame-guardian-skywatch":{"bossID":58,"puppetMasterPreBattleDialogue":[1433],"puppetMasterDialogueSequence":[1440],"backgroundImageKey":"Battle_skywatch_outside_bg","foregroundImageKey":"Battle_skywatch_outside_fg","displayShield":true,"npcHelperData":[{"entranceRound":2,"dialogueSequence":[1422],"dialogueSequenceReprise":[1495]},{"entranceRound":3,"dialogueSequence":[1423,1424]}]}}')},79259:k=>{"use strict";k.exports=JSON.parse('{"battle-academy-classroom-icetower":"bf36ed9d-a1bd-4bc6-8e07-dc2e9deb9bc2","7d49da25-cd3e-454d-91ef-0a3b093d6797":"bf36ed9d-a1bd-4bc6-8e07-dc2e9deb9bc2","battle-academy-classroom":"c2efc300-2e72-48d8-b646-e7c14b85fd63","9fef2c8a-2ff5-4670-9588-7204f3c70691":"c2efc300-2e72-48d8-b646-e7c14b85fd63","battle-academy-gh":"b9aed696-a108-4316-8077-3defba917de6","battle-academy-gh-stairs":["8c3bf69a-1282-416d-90c1-57efca053c5f","ca4194f4-8626-4ff4-b1f1-4d84fa0f823b"],"1f3b1af5-5868-4801-b68b-5338e46c0014":["8c3bf69a-1282-416d-90c1-57efca053c5f","ca4194f4-8626-4ff4-b1f1-4d84fa0f823b"],"battle-academy-office-icetower":"5e70d317-5751-462f-98b7-e9f30afbe201","56774bcb-6165-4235-829e-d5558d1a231b":"5e70d317-5751-462f-98b7-e9f30afbe201","battle-academy-office":"dd1bdac4-6044-465f-8fbf-7daf26e2fe1e","7ce67cd8-aa5a-4efe-af8c-2fd128061016":"dd1bdac4-6044-465f-8fbf-7daf26e2fe1e","battle-archives":["41f23d64-af23-4ad2-8c33-0f3ccfeaf3b4","88182fd5-723a-4ac5-9c21-ae0de5cb8b1c"],"5d4d4526-8264-4db6-bd65-8d8be4868e2e":["41f23d64-af23-4ad2-8c33-0f3ccfeaf3b4","88182fd5-723a-4ac5-9c21-ae0de5cb8b1c"],"battle-bonfire-inside":["6ba91a53-b9f0-4e76-a99a-133121d1f163","b292329a-50c6-46e7-92fb-e3b6b4fb0694"],"4f9b4c38-36d4-4dcc-83c3-aa39e345fd6c":["6ba91a53-b9f0-4e76-a99a-133121d1f163","b292329a-50c6-46e7-92fb-e3b6b4fb0694"],"battle-bonfire-lava":["49f70191-39bb-4f25-832e-84f6c2b1149b","b95d2b2d-cd94-4e1f-beac-149c9f023809"],"545efb2b-e4e2-4797-927d-f5f0fadc1672":["49f70191-39bb-4f25-832e-84f6c2b1149b","b95d2b2d-cd94-4e1f-beac-149c9f023809"],"battle-bonfire-outside":["16b4a938-d5bc-41ea-9089-c308b24b7237","ace7fd1a-3c7c-42fc-8b11-471d19098b40"],"4908067d-bf10-48bd-9341-81ae43b755de":["16b4a938-d5bc-41ea-9089-c308b24b7237","ace7fd1a-3c7c-42fc-8b11-471d19098b40"],"battle-bonfire-titan":"4f9b4c38-36d4-4dcc-83c3-aa39e345fd6c","battle-forest-generic":["351db49c-f8f5-4076-b713-a6175f9c1c0e","f5e3e053-a0f4-471d-88e9-c10404d8da07"],"29f4ad28-df74-4133-958f-12bbde4cc27f":["351db49c-f8f5-4076-b713-a6175f9c1c0e","f5e3e053-a0f4-471d-88e9-c10404d8da07"],"battle-forest-outside":["325a0230-611d-4d79-8c9e-784703b77721","c376bd6d-ef20-4c13-a396-4085486ef68c"],"62ae1ab1-881c-472f-bc99-7eb63564e017":["325a0230-611d-4d79-8c9e-784703b77721","c376bd6d-ef20-4c13-a396-4085486ef68c"],"battle-lamplight-outside":["33d861e0-8416-4366-b640-75bd58a76419","8088a9e2-278a-48cc-a429-be02d472fbbc"],"f369358a-fdea-43c7-83e6-c1a5b1f3e467":["33d861e0-8416-4366-b640-75bd58a76419","8088a9e2-278a-48cc-a429-be02d472fbbc"],"battle-lamplight-outside-pumpkinfest":["83af8521-a111-4086-8412-90998096923b","e96058b9-7536-4dfd-9c4f-b89a9a6f312d"],"087fd393-236a-4749-bdd7-dca2b7708960":["83af8521-a111-4086-8412-90998096923b","e96058b9-7536-4dfd-9c4f-b89a9a6f312d"],"battle-lamplight-outside-pumpkinfest-night":["ebf28489-f1ca-4961-9c9a-b4833bfb8b5a","6f160c28-ca59-4b62-b5b8-ea9f0e5e9fe0"],"battle-lamplight-outside-springfest":["99a5fe98-a71a-4c17-a9b4-c85809f08d82","e636c55e-fde2-4c8d-870c-b7d8035fce92"],"battle-lamplight-outside-summerfest":["dc9e3505-30bd-4e74-9fc5-bc9147af52ce","25f0b480-cadc-43c3-835b-ffd6e60115ad"],"battle-lamplight-outside-starlight":["e666e7f9-6294-41e6-8a7a-45fdbc61a69b","654aa629-489e-4cb6-bf46-fed109a439ce"],"9d7b7d41-fa35-41a7-af78-87398d3eeff1":["e666e7f9-6294-41e6-8a7a-45fdbc61a69b","654aa629-489e-4cb6-bf46-fed109a439ce"],"battle-lamplight-outside-winterfest":["a24b5f19-0b31-47ae-ab9e-2be6854dfc5f","d133013e-92a7-467e-875b-c599d5fffff5"],"battle-moon":["bd6ba53d-dd8a-4a7f-a68c-26161c17f5df","aa0f953d-a092-4ba4-9ea6-3e017d4f8e77"],"battle-moonlight":["6b62b005-097a-4580-9701-061386e71920","dddabadb-b443-4499-a8e0-a896944e727f"],"e30f311b-73b7-409c-8850-46f8ae854b3c":["a24b5f19-0b31-47ae-ab9e-2be6854dfc5f","d133013e-92a7-467e-875b-c599d5fffff5"],"battle-shipwreck-inside":["510850d9-61d9-49ed-a600-4ba7f2b7f397","c547d4ff-e235-4bd4-be23-b503cb6cad72"],"510850d9-61d9-49ed-a600-4ba7f2b7f397":["510850d9-61d9-49ed-a600-4ba7f2b7f397","c547d4ff-e235-4bd4-be23-b503cb6cad72"],"battle-shipwreck-outside":["d502cd37-ef8c-46d6-81e8-7c548b66dc0d","bc6618a6-f008-446e-8ead-5391c4cce57d"],"19cbd9ec-281e-4fe3-80fc-72edfd2289ba":["d502cd37-ef8c-46d6-81e8-7c548b66dc0d","bc6618a6-f008-446e-8ead-5391c4cce57d"],"battle-shipwreck-underwater":["9e53b099-9941-466f-8ea8-e6e7d0126049","c883bf41-56ea-4415-bd75-1157fa748a67"],"ef6a2f9a-5d14-4afd-8767-e34ca09db5ee":["9e53b099-9941-466f-8ea8-e6e7d0126049","c883bf41-56ea-4415-bd75-1157fa748a67"],"battle-shiverchill-inside":["b7555e19-a333-47c4-ab5c-7eb5dc06893e","a5a80e5b-5680-4b3e-a53f-6155540dcc9c"],"9ee1391b-9efb-4898-ac14-7d0168d82825":["b7555e19-a333-47c4-ab5c-7eb5dc06893e","a5a80e5b-5680-4b3e-a53f-6155540dcc9c"],"battle-shiverchill-outside":["0d6c6911-c576-4200-8a99-7be16d46e7e8","c14e6f6f-83dd-48ac-970a-4d9cd6d30f59"],"d0e470ef-38cc-4dc7-8259-ab85abd2cf5a":["0d6c6911-c576-4200-8a99-7be16d46e7e8","c14e6f6f-83dd-48ac-970a-4d9cd6d30f59"],"battle-skywatch-inside":["bec82905-9385-4c6d-a27a-2027d27d9f0f","d87f5a6b-64e8-4afd-ac23-a9905ca5e2a0"],"9b95d790-0d89-48dc-a95d-add23a4d3885":["bec82905-9385-4c6d-a27a-2027d27d9f0f","d87f5a6b-64e8-4afd-ac23-a9905ca5e2a0"],"battle-skywatch-outside":["29189a36-c263-472b-9375-6340c7e5486a","858eb9e5-97cd-4d79-bd4a-66347b53f294"],"19a67124-2042-4cb6-a4b9-4a39c0d02002":["29189a36-c263-472b-9375-6340c7e5486a","858eb9e5-97cd-4d79-bd4a-66347b53f294"],"battle-tower-inside":["6689ef4f-ed14-4a10-b50b-7c51aeb172ef","d21d9862-1f9a-42e6-988b-efcd34f5f397"],"0a2117f2-2b4e-463b-b22d-00e4b9404e03":["6689ef4f-ed14-4a10-b50b-7c51aeb172ef","d21d9862-1f9a-42e6-988b-efcd34f5f397"],"battle-grotto":["e3602904-def2-4b94-ba3f-1f2e5ae65d83","211ad4ee-1450-4931-b4e4-4964e9e4199e"]}')},73792:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"tail":{"y":{"interval":10000,"frames":[6]},"frameName":{"interval":150,"frames":[0,1,2]}},"body":{"frameName":{"interval":150,"frames":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]}},"legs":{"visible":{"interval":10000,"frames":[false]}}},"walk":{"loop":true,"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":[0]}},"legs":{"frameName":{"interval":150,"frames":[0,1,2,3]}},"tail":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":150,"frames":[0,1]}}}}')},60675:k=>{"use strict";k.exports=JSON.parse('{"H":["CHAT_ALL_RIGHT","CHAT_ALL_GOOD","CHAT_ABRACADABRA","CHAT_ANIMALS","CHAT_ARE_YOU_COMING","CHAT_ARE_YOU_LEAVING","CHAT_ARE_YOU_STAYING","CHAT_ARE_YOU_HAVING_FUN","CHAT_BAD","CHAT_BUSY","CHAT_BYE","CHAT_BYE_BYE","CHAT_BORING","CHAT_BOUGHT_IT","CHAT_BUT","CHAT_BARELY","CHAT_BECAUSE","CHAT_CANT_RIGHT_NOW","CHAT_CHECK_IT_OUT","CHAT_COME_OVER_HERE","CHAT_CRUD","CHAT_DO_YOU_HAVE_A_MIN","CHAT_DO_YOU_HAVE","CHAT_DID_YOU_SEE_THAT","CHAT_DID_YOU_CATCH","CHAT_DONT_BOTHER","CHAT_DUDE","CHAT_DEPENDS","CHAT_EVERYONE_LOOK","CHAT_ELEMENTARY","CHAT_FOLLOW_ME","CHAT_FRIENDS","CHAT_FORGET_IT","CHAT_FUN","CHAT_FOUND_YOU","CHAT_FOUND_IT","CHAT_FUNDERFUL","CHAT_FREAKY","CHAT_GO_AWAY","CHAT_GOOD","CHAT_GOODBYE","CHAT_GREETINGS","CHAT_GOOD_MORNING","CHAT_GOOD_NIGHT","CHAT_GOOD_AFTERNOON","CHAT_GOOD_TO_KNOW","CHAT_GHOSTS","CHAT_GREAT","CHAT_GUESS_AGAIN","CHAT_GUESS","CHAT_GOLLY","CHAT_GOT_TO_GO","CHAT_HI","CHAT_HELLO","CHAT_HELLO_THERE","CHAT_HEY","CHAT_HOW_ARE_YOU","CHAT_HOW","CHAT_HAPPY","CHAT_HELP_ME","CHAT_I_CAUGHT_A","CHAT_I_GOT_A","CHAT_I_HAVE_TO_GO","CHAT_I_HAVE_TO_LEAVE","CHAT_I_LEVELED_UP","CHAT_I_LOVE_PRODIGY","CHAT_I_LIKE_YOUR_HAIR","CHAT_I_LIKE_YOUR_OUTFIT","CHAT_I_LIKE_YOUR_HAT","CHAT_I_LIKE_YOUR_WAND","CHAT_I_LIKE_YOU_PET","CHAT_I_LIKE_THIS_PLACE","CHAT_I_DONT_LIKE_IT_HERE","CHAT_I_LIKE_IT_HERE","CHAT_ITS_SPOOKY_HERE","CHAT_ITS_SUPER_RARE","CHAT_ITS_TIME","CHAT_IM_RICH","CHAT_JUST_KIDDING","CHAT_JUST_YOU_WAIT","CHAT_JOKING","CHAT_JEALOUS","CHAT_KEEP_GOING","CHAT_KEEP_IT_UP","CHAT_KEEP_WALKING","CHAT_LEAVE_ME_ALONE","CHAT_LOOK","CHAT_LOOK_AT_THIS","CHAT_LOVE_IT","CHAT_LETS_GO","CHAT_LETS_BATTLE","CHAT_LET_ME_SEE","CHAT_LOCKED","CHAT_MY_FAVOURITE_IS","CHAT_MY_FAVOURITE_ITEM_IS","CHAT_MY_FAVOURITE_PET_IS","CHAT_MAYBE","CHAT_MAKE_ME","CHAT_MADE_IT","CHAT_MANY_THANKS","CHAT_MADE_TONS_OF_GOLD","CHAT_NEAT","CHAT_NO","CHAT_NOT_RIGHT_NOW","CHAT_NOT_TODAY","CHAT_NEVER_MIND","CHAT_NAH","CHAT_NO_CAN_DO","CHAT_NEVER","CHAT_NOW_QUESTION","CHAT_NOW","CHAT_NO_WAY","CHAT_OVER","CHAT_OVER_HERE","CHAT_ONE_OF_THESE_IS","CHAT_OKAY","CHAT_OMINOUS","CHAT_PUYOY","CHAT_PERHAPS","CHAT_PARTY_TIME","CHAT_PRETTY_COOL","CHAT_PRACTICE","CHAT_QUACK_QUACK","CHAT_QUITE","CHAT_QUIET","CHAT_RIGHT","CHAT_RIGHT_BEHIND_YOU","CHAT_RIBBIT","CHAT_RIGHT_OVER_HERE","CHAT_RIGHT_THERE","CHAT_SEE_YOU_LATER","CHAT_SEE_YA","CHAT_SEE","CHAT_SORRY","CHAT_SAFE_AND_SOUND","CHAT_SHHH","CHAT_SOUNDS_LIKE","CHAT_SEEMS_LIKE_IT","CHAT_SOMEONE_SAID_SO","CHAT_SOMEDAY","CHAT_THANK_YOU","CHAT_THERE_YOU_ARE","CHAT_THINK_ABOUT_IT","CHAT_TIME_FOR_BED","CHAT_TIME_FOR_DINNER","CHAT_TIME_FOR_LUNCH","CHAT_TIME_FOR_SUPPER","CHAT_TIME_TO_GET_UP","CHAT_TIME_TO_GO","CHAT_TERRIBLE","CHAT_TELL_YOU_WHAT","CHAT_VERY_GOOD","CHAT_WHATS_UP","CHAT_WHO","CHAT_WHO_ARE_YOU","CHAT_WHY","CHAT_WHAT","CHAT_WHERE","CHAT_YES","CHAT_YOU_COMING","CHAT_YOU_LOOK_COOL","CHAT_YOU_STILL_THERE","CHAT_YOLO","CHAT_YOURE_WELCOME","CHAT_ZZZ","CHAT_DRAGONS","CHAT_DRAGONS_COMING","CHAT_DRAGONS_HERE","CHAT_DRAGONS_COOL","CHAT_DRAGONS_WANT","CHAT_DRAGONS_SEEN","CHAT_CHILL_CHAR_COOL","CHAT_TIDUS_COOL","CHAT_ECLIPSE_COOL","CHAT_LUMA_COOL","CHAT_CHILL_CHAR_FAVOURITE","CHAT_TIDUS_FAVOURITE","CHAT_ECLIPSE_FAVOURITE","CHAT_LUMA_FAVOURITE","CHAT_DRAGONS_LIKE","CHAT_ABRACA_DAB_RA","CHAT_FEEL_LIKE_DANCING","CHAT_LETS_DANCE","CHAT_SHOW_FUNNY_FACE","CHAT_ASK_PARENTS","CHAT_PARENTS_BEST","CHAT_MEMBER_AWESOME","CHAT_TEACHER_AWESOME","CHAT_BUNNIES_ARE_BEST","CHAT_I_LIKE_BUNNIES","CHAT_GO_BUNNY_BANDITS","CHAT_DO_YOU_LIKE_BUNNIES","CHAT_HIPPITY_HOP","CHAT_HOP_HOP","CHAT_HARRIET_HOOD_RULES","CHAT_FOXES_ARE_BEST","CHAT_I_LIKE_FOXES","CHAT_GO_FOX_KNIGHTS","CHAT_DO_YOU_LIKE_FOXES","CHAT_WHAT_DOES_FOX_SAY","CHAT_DON_ZORRO_FANTASTICO"]}')},7640:k=>{"use strict";k.exports=JSON.parse('{"noot":[{"textKey":"DIALOGUE_NOOT_0","face":2,"anim":4,"audio":{"tag":"voice-10-12","s":0,"d":1}},{"textKey":"DIALOGUE_NOOT_1","face":3,"anim":1,"audio":{"tag":"voice-10-12","s":1,"d":4}},{"textKey":"DIALOGUE_NOOT_2","face":0,"audio":{"tag":"voice-10-12","s":5,"d":7}},{"textKey":"DIALOGUE_NOOT_3","face":0,"anim":2,"audio":{"tag":"voice-10-13","s":0,"d":7}},{"textKey":"DIALOGUE_NOOT_4","face":1,"audio":{"tag":"voice-10-13","s":7,"d":6}},{"textKey":"DIALOGUE_NOOT_5","face":4,"audio":{"tag":"voice-10-13","s":13,"d":7}},{"textKey":"DIALOGUE_NOOT_6","face":4,"audio":{"tag":"voice-10-14","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_7","face":3,"anim":2,"audio":{"tag":"voice-10-14","s":6,"d":4}},{"textKey":"DIALOGUE_NOOT_8","face":0,"audio":{"tag":"voice-10-87","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_9","face":1,"audio":{"tag":"voice-10-1","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_10","face":0,"audio":{"tag":"voice-10-1","s":6,"d":3.5}},{"textKey":"DIALOGUE_NOOT_11","face":2,"anim":4,"audio":{"tag":"voice-10-2","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_12","face":3,"audio":{"tag":"voice-10-2","s":4,"d":3}},{"textKey":"DIALOGUE_NOOT_13","face":4,"audio":{"tag":"voice-10-4","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_14","face":0,"audio":{"tag":"voice-10-15","s":8,"d":6}},{"textKey":"DIALOGUE_NOOT_15","face":0,"audio":{"tag":"voice-10-5","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_16","face":4,"audio":{"tag":"voice-10-5","s":4,"d":4}},{"textKey":"DIALOGUE_NOOT_17","face":3,"audio":{"tag":"voice-10-5","s":8,"d":5}},{"textKey":"DIALOGUE_NOOT_18","face":2,"audio":{"tag":"voice-10-6","s":2.8,"d":3.2}},{"textKey":"DIALOGUE_NOOT_19","face":0,"audio":{"tag":"voice-10-7","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_20","face":4,"audio":{"tag":"voice-10-7","s":3,"d":3}},{"textKey":"DIALOGUE_NOOT_21","face":0,"audio":{"tag":"voice-10-7","s":6,"d":6}},{"textKey":"DIALOGUE_NOOT_22","face":1,"anim":1,"audio":{"tag":"voice-10-8","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_23","face":4,"audio":{"tag":"voice-10-8","s":4,"d":5}},{"textKey":"DIALOGUE_NOOT_24","face":3,"anim":2,"audio":{"tag":"voice-10-16","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_25","face":5,"anim":4,"audio":{"tag":"voice-10-16","s":4,"d":3}},{"textKey":"DIALOGUE_NOOT_26","face":4,"audio":{"tag":"voice-10-16","s":7,"d":8}},{"textKey":"DIALOGUE_NOOT_27","face":0,"audio":{"tag":"voice-10-15","s":0,"d":8}},{"textKey":"DIALOGUE_NOOT_28","face":1,"audio":{"tag":"voice-10-12","s":12,"d":5}},{"textKey":"DIALOGUE_NOOT_29","face":5,"anim":2,"audio":{"tag":"voice-10-17","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_30","face":2,"anim":4,"audio":{"tag":"voice-10-17","s":6,"d":8}},{"textKey":"DIALOGUE_NOOT_31","face":1,"audio":{"tag":"voice-10-17","s":14,"d":5}},{"textKey":"DIALOGUE_NOOT_32","face":3,"audio":{"tag":"voice-10-18","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_33","face":2,"anim":4,"audio":{"tag":"voice-10-18","s":5,"d":4}},{"textKey":"DIALOGUE_NOOT_34","face":0,"audio":{"tag":"voice-10-16","s":15,"d":6}},{"textKey":"DIALOGUE_NOOT_35","face":0,"audio":{"tag":"voice-10-19","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_36","face":2,"audio":{"tag":"voice-10-19","s":10,"d":5}},{"textKey":"DIALOGUE_NOOT_37","face":3,"anim":2,"audio":{"tag":"voice-10-19","s":6,"d":4}},{"textKey":"DIALOGUE_NOOT_38","face":3,"anim":2,"audio":{"tag":"voice-10-20","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_39","face":1,"audio":{"tag":"voice-10-20","s":3,"d":2}},{"textKey":"DIALOGUE_NOOT_40","face":3,"anim":4,"audio":{"tag":"voice-10-20","s":5,"d":3}},{"textKey":"DIALOGUE_NOOT_41","face":3,"anim":4,"audio":{"tag":"voice-10-20","s":8,"d":3}},{"textKey":"DIALOGUE_NOOT_42","face":0,"audio":{"tag":"voice-10-19","s":15,"d":7}},{"textKey":"DIALOGUE_NOOT_43","face":0,"audio":{"tag":"voice-10-19","s":22,"d":6}},{"textKey":"DIALOGUE_NOOT_44","face":0,"audio":{"tag":"voice-10-21","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_45","face":2,"audio":{"tag":"voice-10-21","s":4,"d":3}},{"textKey":"DIALOGUE_NOOT_46","face":3,"audio":{"tag":"voice-10-21","s":7,"d":4}},{"textKey":"DIALOGUE_NOOT_47","face":4,"audio":{"tag":"voice-10-21","s":11,"d":1}},{"textKey":"DIALOGUE_NOOT_48","face":1,"audio":{"tag":"voice-10-21","s":12,"d":1}},{"textKey":"DIALOGUE_NOOT_49","face":2,"audio":{"tag":"voice-10-21","s":13,"d":2}},{"textKey":"DIALOGUE_NOOT_50","face":3,"audio":{"tag":"voice-10-21","s":15,"d":2}},{"textKey":"DIALOGUE_NOOT_51","face":2,"anim":4,"audio":{"tag":"voice-10-21","s":17,"d":4}},{"textKey":"DIALOGUE_NOOT_52","face":1,"audio":{"tag":"voice-10-21","s":21,"d":4}},{"textKey":"DIALOGUE_NOOT_53","face":2,"anim":4,"audio":{"tag":"voice-10-22","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_54","face":2,"anim":4,"audio":{"tag":"voice-10-23","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_55","face":0,"audio":{"tag":"voice-10-23","s":6,"d":4}},{"textKey":"DIALOGUE_NOOT_56","face":1,"anim":2,"audio":{"tag":"voice-10-24","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_57","face":2,"audio":{"tag":"voice-10-24","s":4,"d":4}},{"textKey":"DIALOGUE_NOOT_58","face":4,"audio":{"tag":"voice-10-24","s":8,"d":7}},{"textKey":"DIALOGUE_NOOT_59","face":2,"anim":4,"audio":{"tag":"voice-10-25","s":0,"d":7}},{"textKey":"DIALOGUE_NOOT_60","face":5,"audio":{"tag":"voice-10-26","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_61","face":1,"audio":{"tag":"voice-10-27","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_62","face":3,"audio":{"tag":"voice-10-27","s":6,"d":2}},{"textKey":"DIALOGUE_NOOT_63","face":5,"audio":{"tag":"voice-10-27","s":8,"d":3}},{"textKey":"DIALOGUE_NOOT_64","face":2,"anim":4,"audio":{"tag":"voice-10-28","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_65","face":3,"audio":{"tag":"voice-10-28","s":4,"d":3}},{"textKey":"DIALOGUE_NOOT_66","face":1,"audio":{"tag":"voice-10-21","s":25,"d":3}},{"textKey":"DIALOGUE_NOOT_67","face":1,"anim":4,"audio":{"tag":"voice-10-29","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_68","face":1,"audio":{"tag":"voice-10-30","s":0,"d":2}},{"textKey":"DIALOGUE_NOOT_69","face":4,"audio":{"tag":"voice-10-31","s":0,"d":2}},{"textKey":"DIALOGUE_NOOT_70","face":5,"audio":{"tag":"voice-10-32","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_71","face":1,"audio":{"tag":"voice-10-33","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_72","face":4,"audio":{"tag":"voice-10-33","s":3,"d":7}},{"textKey":"DIALOGUE_NOOT_73","face":3,"anim":2,"audio":{"tag":"voice-10-34","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_74","face":1,"audio":{"tag":"voice-10-35","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_75","face":2,"anim":2,"audio":{"tag":"voice-10-35","s":5,"d":6}},{"textKey":"DIALOGUE_NOOT_76","face":1,"audio":{"tag":"voice-10-35","s":11,"d":4}},{"textKey":"DIALOGUE_NOOT_77","face":2,"anim":4,"audio":{"tag":"voice-10-36","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_78","face":2,"anim":4,"audio":{}},{"textKey":"DIALOGUE_NOOT_79","face":3},{"textKey":"DIALOGUE_NOOT_80","face":2,"anim":4,"audio":{"tag":"voice-10-37","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_81","face":2,"anim":4,"audio":{"tag":"voice-10-37","s":6,"d":5}},{"textKey":"DIALOGUE_NOOT_82","face":2,"anim":4,"audio":{"tag":"voice-10-37","s":11,"d":5}},{"textKey":"DIALOGUE_NOOT_83","face":2,"anim":4,"audio":{"tag":"voice-10-38","s":0,"d":8}},{"textKey":"DIALOGUE_NOOT_84","face":2,"anim":4,"audio":{"tag":"voice-10-38","s":8,"d":7}},{"textKey":"DIALOGUE_NOOT_85","face":2,"anim":4,"audio":{"tag":"voice-10-39","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_86","face":2,"anim":4,"audio":{"tag":"voice-10-39","s":5,"d":4}},{"textKey":"DIALOGUE_NOOT_87","face":2,"anim":4,"audio":{"tag":"voice-10-39","s":9,"d":6}},{"textKey":"DIALOGUE_NOOT_88","face":2,"anim":4,"audio":{"tag":"voice-10-40","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_89","face":2,"anim":4,"audio":{"tag":"voice-10-40","s":4,"d":5}},{"textKey":"DIALOGUE_NOOT_90","face":2,"anim":4,"audio":{"tag":"voice-10-40","s":9,"d":4}},{"textKey":"DIALOGUE_NOOT_91","face":2,"anim":4,"audio":{"tag":"voice-10-41","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_92","face":2,"anim":4,"audio":{"tag":"voice-10-41","s":4,"d":8}},{"textKey":"DIALOGUE_NOOT_93","face":2,"anim":4,"audio":{"tag":"voice-10-41","s":12,"d":6}},{"textKey":"DIALOGUE_NOOT_94","face":2,"anim":4,"audio":{"tag":"voice-10-42","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_95","face":5,"anim":1,"audio":{"tag":"voice-10-43","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_96","face":5,"anim":4,"audio":{"tag":"voice-10-43","s":4,"d":2}},{"textKey":"DIALOGUE_NOOT_97","face":1,"anim":2,"audio":{"tag":"voice-10-44","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_98","face":4,"anim":1,"audio":{"tag":"voice-10-45","s":0,"d":2}},{"textKey":"DIALOGUE_NOOT_99","face":1},{"textKey":"DIALOGUE_NOOT_100","face":5,"anim":4,"audio":{"tag":"voice-10-46","s":0,"d":2}},{"textKey":"DIALOGUE_NOOT_101","face":2,"anim":2,"audio":{"tag":"voice-10-47","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_102","face":3,"anim":4,"audio":{"tag":"voice-10-47","s":4,"d":3}},{"textKey":"DIALOGUE_NOOT_103","face":4,"anim":1,"audio":{"tag":"voice-10-50","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_104","face":5,"anim":1,"audio":{"tag":"voice-10-51","s":0,"d":2}},{"textKey":"DIALOGUE_NOOT_105","face":1,"anim":2,"audio":{"tag":"voice-10-51","s":2,"d":3}},{"textKey":"DIALOGUE_NOOT_106","face":4,"anim":2,"audio":{"tag":"voice-10-51","s":5,"d":3}},{"textKey":"DIALOGUE_NOOT_107","face":1,"anim":2,"audio":{"tag":"voice-10-52","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_108","face":3,"anim":4,"audio":{"tag":"voice-10-48","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_109","face":2,"anim":2,"audio":{"tag":"voice-10-49","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_110","face":3,"anim":4},{"textKey":"DIALOGUE_NOOT_111","face":3,"anim":4,"audio":{"tag":"voice-10-20","s":9,"d":2}},{"textKey":"DIALOGUE_NOOT_112","face":1,"anim":4,"audio":{"tag":"voice-10-66","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_113","face":1,"anim":4,"audio":{"tag":"voice-10-66","s":6,"d":6}},{"textKey":"DIALOGUE_NOOT_114","face":4,"anim":4,"audio":{"tag":"voice-10-66","s":12,"d":5}},{"textKey":"DIALOGUE_NOOT_115","face":3,"anim":4,"audio":{"tag":"voice-10-66","s":17,"d":4}},{"textKey":"DIALOGUE_NOOT_116","face":3,"anim":4,"audio":{"tag":"voice-10-66","s":21,"d":3}},{"textKey":"DIALOGUE_NOOT_117","face":2},{"textKey":"DIALOGUE_NOOT_118","face":1,"audio":{"tag":"voice-10-53","s":0,"d":2}},{"textKey":"DIALOGUE_NOOT_119","face":5,"anim":2,"audio":{"tag":"voice-10-53","s":2,"d":2}},{"textKey":"DIALOGUE_NOOT_120","face":5,"anim":4,"audio":{"tag":"voice-10-53","s":6.4,"d":3.2}},{"textKey":"DIALOGUE_NOOT_121","face":2,"anim":4,"audio":{"tag":"voice-10-54","s":0,"d":1}},{"textKey":"DIALOGUE_NOOT_122","face":0,"anim":2,"audio":{"tag":"voice-10-54","s":3,"d":5}},{"textKey":"DIALOGUE_NOOT_123","face":1,"anim":2,"audio":{"tag":"voice-10-54","s":8,"d":1}},{"textKey":"DIALOGUE_NOOT_124","face":3,"anim":4,"audio":{"tag":"voice-10-55","s":0,"d":1}},{"textKey":"DIALOGUE_NOOT_125","face":2,"anim":2,"audio":{"tag":"voice-10-55","s":1,"d":1}},{"textKey":"DIALOGUE_NOOT_126","face":0,"anim":2,"audio":{"tag":"voice-10-55","s":4,"d":5}},{"textKey":"DIALOGUE_NOOT_127","face":1,"anim":3,"audio":{"tag":"voice-10-55","s":9,"d":5}},{"textKey":"DIALOGUE_NOOT_128","face":2,"anim":2,"audio":{"tag":"voice-10-56","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_129","face":4,"anim":2,"audio":{"tag":"voice-10-56","s":4,"d":5}},{"textKey":"DIALOGUE_NOOT_130","face":0,"anim":2,"audio":{"tag":"voice-10-56","s":9,"d":5}},{"textKey":"DIALOGUE_NOOT_131","face":2,"anim":2,"audio":{"tag":"voice-10-56","s":14,"d":2}},{"textKey":"DIALOGUE_NOOT_132","face":3,"anim":2,"audio":{"tag":"voice-10-57","s":0,"d":7}},{"textKey":"DIALOGUE_NOOT_133","face":2,"anim":2,"audio":{"tag":"voice-10-57","s":7,"d":5}},{"textKey":"DIALOGUE_NOOT_134","face":2,"anim":2,"audio":{"tag":"voice-10-57","s":12,"d":5}},{"textKey":"DIALOGUE_NOOT_135","face":0,"audio":{"tag":"voice-10-96","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_136","face":2,"anim":4,"audio":{"tag":"voice-10-57","s":22,"d":4}},{"textKey":"DIALOGUE_NOOT_137","face":4,"anim":3,"audio":{"tag":"voice-10-57","s":26,"d":3}},{"textKey":"DIALOGUE_NOOT_138","face":2,"anim":2,"audio":{"tag":"voice-10-57","s":29,"d":6}},{"textKey":"DIALOGUE_NOOT_139","face":0,"anim":2,"audio":{"tag":"voice-10-96","s":5,"d":6}},{"textKey":"DIALOGUE_NOOT_140","face":2,"anim":2,"audio":{"tag":"voice-10-58","s":4,"d":5}},{"textKey":"DIALOGUE_NOOT_141","face":5,"anim":2,"audio":{"tag":"voice-10-59","s":0,"d":7}},{"textKey":"DIALOGUE_NOOT_142","face":5,"anim":4,"audio":{"tag":"voice-10-60","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_143","face":2,"anim":2,"audio":{"tag":"voice-10-61","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_144","face":2,"anim":2,"audio":{"tag":"voice-10-61","s":5,"d":9}},{"textKey":"DIALOGUE_NOOT_145","face":1,"anim":3,"audio":{"tag":"voice-10-61","s":14,"d":1}},{"textKey":"DIALOGUE_NOOT_146","face":1,"anim":2,"audio":{"tag":"voice-10-61","s":15,"d":5}},{"textKey":"DIALOGUE_NOOT_147","face":1,"anim":1,"audio":{"tag":"voice-10-62","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_148","face":5,"anim":4,"audio":{"tag":"voice-10-62","s":4,"d":3}},{"textKey":"DIALOGUE_NOOT_149","face":5,"anim":2,"audio":{"tag":"voice-10-62","s":7,"d":3}},{"textKey":"DIALOGUE_NOOT_150","face":1,"anim":4,"audio":{"tag":"voice-10-63","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_151","face":2,"anim":2,"audio":{"tag":"voice-10-63","s":5,"d":3}},{"textKey":"DIALOGUE_NOOT_152","face":5,"anim":2,"audio":{"tag":"voice-10-63","s":8,"d":7}},{"textKey":"DIALOGUE_NOOT_153","face":1,"anim":3,"audio":{"tag":"voice-10-63","s":15,"d":3}},{"textKey":"DIALOGUE_NOOT_154","face":0,"anim":2,"audio":{"tag":"voice-10-64","s":0,"d":7}},{"textKey":"DIALOGUE_NOOT_155","face":2,"anim":2,"audio":{"tag":"voice-10-64","s":7,"d":3}},{"textKey":"DIALOGUE_NOOT_156","face":3,"anim":4,"audio":{"tag":"voice-10-86","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_157","face":1,"anim":2,"audio":{"tag":"voice-10-64","s":15,"d":5}},{"textKey":"DIALOGUE_NOOT_158","face":3,"anim":2,"audio":{"tag":"voice-10-64","s":20,"d":4}},{"textKey":"DIALOGUE_NOOT_159","face":2,"anim":2,"audio":{"tag":"voice-10-64","s":24,"d":5}},{"textKey":"DIALOGUE_NOOT_160","face":3,"anim":4,"audio":{"tag":"voice-10-64","s":29,"d":2}},{"textKey":"DIALOGUE_NOOT_161","face":2,"anim":2,"audio":{"tag":"voice-10-64","s":31,"d":5}},{"textKey":"DIALOGUE_NOOT_162","face":0,"anim":4,"audio":{"tag":"voice-10-96","s":11,"d":4}},{"textKey":"DIALOGUE_NOOT_163","face":0,"anim":2,"audio":{"tag":"voice-10-64","s":40,"d":7}},{"textKey":"DIALOGUE_NOOT_164","face":2,"anim":2,"audio":{"tag":"voice-10-64","s":47,"d":7}},{"textKey":"DIALOGUE_NOOT_165","face":2,"anim":4,"audio":{"tag":"voice-10-18","s":7,"d":1.6}},{"textKey":"DIALOGUE_NOOT_166","face":1},{"textKey":"DIALOGUE_NOOT_167","face":0,"anim":2,"audio":{"tag":"voice-25-1","s":0,"d":2.8}},{"textKey":"DIALOGUE_NOOT_168","face":1,"audio":{"tag":"voice-25-1","s":3,"d":5.5}},{"textKey":"DIALOGUE_NOOT_169","face":1,"audio":{"tag":"voice-25-1","s":9,"d":1.6}},{"textKey":"DIALOGUE_NOOT_170","face":0,"anim":2,"audio":{"tag":"voice-25-1","s":11,"d":3.1}},{"textKey":"DIALOGUE_NOOT_171","face":1,"anim":2,"audio":{"tag":"voice-25-1","s":15,"d":8}},{"textKey":"DIALOGUE_NOOT_172","face":1,"anim":4,"audio":{"tag":"voice-25-1","s":32,"d":7.3}},{"textKey":"DIALOGUE_NOOT_173","face":0,"anim":2,"audio":{"tag":"voice-25-1","s":40,"d":2.9}},{"textKey":"DIALOGUE_NOOT_174","face":1,"anim":2,"audio":{"tag":"voice-25-1","s":44,"d":5.4}},{"textKey":"DIALOGUE_NOOT_175","face":2,"anim":2,"audio":{"tag":"voice-25-1","s":50,"d":1.4}},{"textKey":"DIALOGUE_NOOT_176","face":4,"anim":2,"audio":{"tag":"voice-25-1","s":52,"d":2.74}},{"textKey":"DIALOGUE_NOOT_177","face":4,"anim":2,"audio":{"tag":"voice-10-65","s":0,"d":2.54}},{"textKey":"DIALOGUE_NOOT_178","face":3,"anim":4,"audio":{"tag":"voice-10-67","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_179","face":0,"anim":2,"audio":{"tag":"voice-10-67","s":5.5,"d":8.5}},{"textKey":"DIALOGUE_NOOT_180","face":0,"anim":2,"audio":{"tag":"voice-10-67","s":15,"d":3}},{"textKey":"DIALOGUE_NOOT_181","face":0,"audio":{"tag":"voice-10-67","s":19,"d":8}},{"textKey":"DIALOGUE_NOOT_182","face":3,"anim":2,"audio":{"tag":"voice-10-67","s":28,"d":5}},{"textKey":"DIALOGUE_NOOT_183","face":2,"anim":4,"audio":{"tag":"voice-10-67","s":33,"d":4}},{"textKey":"DIALOGUE_NOOT_184","face":0,"anim":4,"audio":{"tag":"voice-10-69","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_185","face":3,"anim":4,"audio":{"tag":"voice-10-70","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_186","face":3,"anim":4,"audio":{"tag":"voice-10-71","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_187","face":3,"anim":4,"audio":{"tag":"voice-10-72","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_188","face":3,"anim":4,"audio":{"tag":"voice-10-73","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_189","face":3,"anim":4,"audio":{"tag":"voice-10-74","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_190","face":3,"anim":4,"audio":{"tag":"voice-10-75","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_191","face":3,"anim":4,"audio":{"tag":"voice-10-76","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_192","face":3,"anim":4,"audio":{"tag":"voice-10-77","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_193","face":3,"anim":4,"audio":{"tag":"voice-10-78","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_194","face":3,"anim":4,"audio":{"tag":"voice-10-79","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_195","face":3,"anim":4,"audio":{"tag":"voice-10-80","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_196","face":3,"anim":4,"audio":{"tag":"voice-10-81","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_197","face":3,"anim":4,"audio":{"tag":"voice-10-82","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_198","face":3,"anim":4,"audio":{"tag":"voice-10-57","s":32.5,"d":2}},{"textKey":"DIALOGUE_NOOT_199","face":3,"anim":4,"audio":{"tag":"voice-10-16","s":0,"d":1.2}},{"textKey":"DIALOGUE_NOOT_200","face":4,"anim":4,"audio":{"tag":"voice-10-87","s":3,"d":5}},{"textKey":"DIALOGUE_NOOT_201","face":4,"anim":2,"audio":{"tag":"voice-10-87","s":8,"d":4}},{"textKey":"DIALOGUE_NOOT_202","face":0,"anim":4,"audio":{"tag":"voice-10-87","s":12,"d":6}},{"textKey":"DIALOGUE_NOOT_203","face":1,"anim":1,"audio":{"tag":"voice-10-87","s":18,"d":4}},{"textKey":"DIALOGUE_NOOT_204","face":4,"anim":2,"audio":{"tag":"voice-10-87","s":22,"d":4}},{"textKey":"DIALOGUE_NOOT_205","face":0,"anim":4,"audio":{"tag":"voice-10-87","s":26,"d":5}},{"textKey":"DIALOGUE_NOOT_206","face":2,"anim":2,"audio":{"tag":"voice-10-87","s":31,"d":4}},{"textKey":"DIALOGUE_NOOT_207","face":3,"anim":3,"audio":{"tag":"voice-10-87","s":35,"d":6}},{"textKey":"DIALOGUE_NOOT_208","face":1,"anim":2,"audio":{"tag":"voice-10-87","s":41,"d":6}},{"textKey":"DIALOGUE_NOOT_209","face":4,"anim":1,"audio":{"tag":"voice-10-87","s":47,"d":7}},{"textKey":"DIALOGUE_NOOT_210","face":4,"anim":1,"audio":{"tag":"voice-10-87","s":54,"d":4}},{"textKey":"DIALOGUE_NOOT_211","face":4,"anim":1,"audio":{"tag":"voice-10-87","s":58,"d":5}},{"textKey":"DIALOGUE_NOOT_212","face":4,"anim":1,"audio":{"tag":"voice-10-87","s":63,"d":4}},{"textKey":"DIALOGUE_NOOT_213","face":3,"anim":0,"audio":{"tag":"voice-10-87","s":67,"d":4}},{"textKey":"DIALOGUE_NOOT_214","face":3,"anim":0,"audio":{"tag":"voice-10-87","s":71,"d":6}},{"textKey":"DIALOGUE_NOOT_215","face":3,"anim":0,"audio":{"tag":"voice-10-87","s":77,"d":3}},{"textKey":"DIALOGUE_NOOT_216","face":3,"anim":0,"audio":{"tag":"voice-10-87","s":80,"d":5}},{"textKey":"DIALOGUE_NOOT_217","face":1,"anim":4,"audio":{"tag":"voice-10-87","s":85,"d":5}},{"textKey":"DIALOGUE_NOOT_218","face":0,"anim":2,"audio":{"tag":"voice-10-87","s":90,"d":4}},{"textKey":"DIALOGUE_NOOT_219","face":2,"anim":4,"audio":{"tag":"voice-10-87","s":94,"d":2}},{"textKey":"DIALOGUE_NOOT_220","face":0,"anim":2,"audio":{"tag":"voice-10-87","s":96,"d":6}},{"textKey":"DIALOGUE_NOOT_221","face":4,"anim":1,"audio":{"tag":"voice-10-87","s":102,"d":3}},{"textKey":"DIALOGUE_NOOT_222","face":5,"anim":3,"audio":{"tag":"voice-10-88","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_223","face":1,"anim":4,"audio":{"tag":"voice-10-88","s":5,"d":9}},{"textKey":"DIALOGUE_NOOT_224","face":1,"anim":4,"audio":{"tag":"voice-10-88","s":15,"d":4}},{"textKey":"DIALOGUE_NOOT_225","face":5,"anim":2,"audio":{"tag":"voice-10-88","s":20,"d":4}},{"textKey":"DIALOGUE_NOOT_226","face":2,"anim":4,"audio":{"tag":"voice-10-88","s":25,"d":4}},{"textKey":"DIALOGUE_NOOT_227","face":2,"anim":4,"audio":{"tag":"voice-10-88","s":30,"d":9}},{"textKey":"DIALOGUE_NOOT_228","face":1,"anim":2,"audio":{"tag":"voice-10-88","s":40,"d":4}},{"textKey":"DIALOGUE_NOOT_229","face":3,"anim":2,"audio":{"tag":"voice-10-88","s":45,"d":4}},{"textKey":"DIALOGUE_NOOT_230","face":0,"anim":2,"audio":{"tag":"voice-10-88","s":50,"d":9}},{"textKey":"DIALOGUE_NOOT_231","face":0,"audio":{"tag":"voice-10-88","s":60,"d":4}},{"textKey":"DIALOGUE_NOOT_232","face":0,"audio":{"tag":"voice-10-88","s":65,"d":4}},{"textKey":"DIALOGUE_NOOT_233","face":4,"anim":2,"audio":{"tag":"voice-10-88","s":70,"d":9}},{"textKey":"DIALOGUE_NOOT_234","face":3,"anim":4,"audio":{"tag":"voice-10-88","s":80,"d":4}},{"textKey":"DIALOGUE_NOOT_235","face":0,"audio":{"tag":"voice-10-88","s":85,"d":4}},{"textKey":"DIALOGUE_NOOT_236","face":1,"anim":3,"audio":{"tag":"voice-10-90","s":0,"d":1.5}},{"textKey":"DIALOGUE_NOOT_237","face":4,"anim":2,"audio":{"tag":"voice-10-90","s":2,"d":1.5}},{"textKey":"DIALOGUE_NOOT_238","face":1,"anim":4,"audio":{"tag":"voice-10-90","s":4,"d":2.5}},{"textKey":"DIALOGUE_NOOT_239","face":2,"anim":4,"audio":{"tag":"voice-10-90","s":7,"d":3}},{"textKey":"DIALOGUE_NOOT_240","face":1,"anim":2,"audio":{"tag":"voice-10-90","s":11,"d":4}},{"textKey":"DIALOGUE_NOOT_241","face":5,"audio":{"tag":"voice-10-90","s":16,"d":4}},{"textKey":"DIALOGUE_NOOT_242","face":0,"anim":0,"audio":{"tag":"voice-10-90","s":21,"d":2}},{"textKey":"DIALOGUE_NOOT_243","face":0,"anim":2,"audio":{"tag":"voice-10-91","s":0,"d":6}},{"textKey":"DIALOGUE_NOOT_244","face":1,"anim":2,"audio":{"tag":"voice-10-91","s":7,"d":5}},{"textKey":"DIALOGUE_NOOT_245","face":2,"anim":4,"audio":{"tag":"voice-10-91","s":13,"d":3}},{"textKey":"DIALOGUE_NOOT_246","face":1,"anim":3,"audio":{"tag":"voice-10-91","s":16,"d":1.5}},{"textKey":"DIALOGUE_NOOT_247","face":3,"anim":4,"audio":{"tag":"voice-10-91","s":18,"d":2}},{"textKey":"DIALOGUE_NOOT_248","face":0,"anim":0,"audio":{"tag":"voice-10-91","s":20,"d":2}},{"textKey":"DIALOGUE_NOOT_249","face":1,"anim":4,"audio":{"tag":"voice-10-92","s":0,"d":2.5}},{"textKey":"DIALOGUE_NOOT_250","face":0,"anim":2,"audio":{"tag":"voice-10-92","s":3,"d":2.5}},{"textKey":"DIALOGUE_NOOT_251","face":4,"anim":0,"audio":{"tag":"voice-10-93","s":0,"d":3}},{"textKey":"DIALOGUE_NOOT_252","face":1,"anim":1,"audio":{"tag":"voice-10-94","s":0,"d":5}},{"textKey":"DIALOGUE_NOOT_253","face":5,"audio":{"tag":"voice-10-94","s":5,"d":5}},{"textKey":"DIALOGUE_NOOT_254","face":4,"anim":2,"audio":{"tag":"voice-10-94","s":10,"d":3}},{"textKey":"DIALOGUE_NOOT_255","face":1,"audio":{"tag":"voice-10-95","s":2,"d":3}},{"textKey":"DIALOGUE_NOOT_256","face":0,"anim":2,"audio":{"tag":"voice-10-95","s":6,"d":5}},{"textKey":"DIALOGUE_NOOT_257","face":3,"anim":4,"audio":{"tag":"voice-10-20","s":9,"d":2}},{"textKey":"DIALOGUE_NOOT_258","face":0},{"textKey":"DIALOGUE_NOOT_259","face":0},{"textKey":"DIALOGUE_NOOT_260","face":2,"anim":0},{"textKey":"DIALOGUE_NOOT_261","face":2,"anim":0},{"textKey":"DIALOGUE_NOOT_262","face":0,"anim":0},{"textKey":"DIALOGUE_NOOT_263","face":2,"anim":0},{"textKey":"DIALOGUE_NOOT_264","face":2,"anim":0},{"textKey":"DIALOGUE_NOOT_265","face":1,"anim":0},{"textKey":"DIALOGUE_NOOT_266","face":4,"anim":0},{"textKey":"DIALOGUE_NOOT_267","face":0,"anim":0},{"textKey":"DIALOGUE_NOOT_268","face":2,"anim":1},{"textKey":"DIALOGUE_NOOT_269","face":2,"anim":0},{"textKey":"DIALOGUE_NOOT_270","face":2,"anim":0},{"textKey":"DIALOGUE_NOOT_271","face":3,"anim":0},{"textKey":"DIALOGUE_NOOT_272","face":1,"anim":0},{"textKey":"DIALOGUE_NOOT_273","face":0,"anim":0},{"textKey":"DIALOGUE_NOOT_274","face":0,"anim":0},{"textKey":"DIALOGUE_NOOT_275","face":0,"audio":{"tag":"voice-10-89","s":23,"d":6.5}},{"textKey":"DIALOGUE_NOOT_276","face":0,"audio":{"tag":"voice-10-89","s":30,"d":5.5}},{"textKey":"DIALOGUE_NOOT_277","face":0,"audio":{"tag":"voice-10-89","s":36,"d":3}},{"textKey":"DIALOGUE_NOOT_278","face":2,"anim":4,"audio":{"tag":"voice-10-89","s":0,"d":9}},{"textKey":"DIALOGUE_NOOT_279","face":0,"anim":2,"audio":{"tag":"voice-10-89","s":10,"d":3}},{"textKey":"DIALOGUE_NOOT_280","face":4,"anim":2,"audio":{"tag":"voice-10-89","s":13,"d":2}},{"textKey":"DIALOGUE_NOOT_281","face":0,"anim":2,"audio":{"tag":"voice-10-89","s":16,"d":6}},{"textKey":"DIALOGUE_NOOT_282","face":1,"anim":2},{"textKey":"DIALOGUE_NOOT_283","face":1,"anim":2,"audio":{"tag":"voice-10-97","s":0,"d":4}},{"textKey":"DIALOGUE_NOOT_284","face":1,"anim":2,"audio":{"tag":"voice-10-97","s":4,"d":8}},{"textKey":"DIALOGUE_NOOT_285","face":1,"anim":2},{"textKey":"DIALOGUE_NOOT_286","face":0,"anim":2},{"textKey":"DIALOGUE_NOOT_287","face":5},{"textKey":"DIALOGUE_NOOT_288","face":3,"anim":4},{"textKey":"DIALOGUE_NOOT_289","face":0,"anim":2},{"textKey":"DIALOGUE_POST_ENDGAME_NOOT_TITAN_INTRO_1","face":4,"audio":{"tag":"e907829b-e167-4a74-a007-43560ed75270","s":0,"d":3}},{"textKey":"DIALOGUE_POST_ENDGAME_NOOT_TITAN_INTRO_2","face":4,"audio":{"tag":"6ad06bed-0669-466a-b4e4-e31543f53f3f","s":0,"d":10}},{"textKey":"DIALOGUE_ENDGAME_NOOT_ACADEMY_INTRO","face":0,"audio":{"tag":"800500cb-684b-419e-b760-3509c1005d58","s":0,"d":6}}],"flora":[{"textKey":"DIALOGUE_FLORA_0","face":5,"anim":4,"audio":{"tag":"voice-8-1","s":0,"d":6}},{"textKey":"DIALOGUE_FLORA_1","face":3,"audio":{"tag":"voice-8-1","s":6,"d":6}},{"textKey":"DIALOGUE_FLORA_2","face":2,"audio":{"tag":"voice-8-1","s":12,"d":3}},{"textKey":"DIALOGUE_FLORA_3","face":6,"anim":2,"audio":{"tag":"voice-8-1","s":15,"d":5}},{"textKey":"DIALOGUE_FLORA_4","face":2,"audio":{"tag":"voice-8-2","s":0,"d":4}},{"textKey":"DIALOGUE_FLORA_5","face":1,"audio":{"tag":"voice-8-2","s":4,"d":8}},{"textKey":"DIALOGUE_FLORA_6","face":2,"audio":{"tag":"voice-8-2","s":12,"d":3}},{"textKey":"DIALOGUE_FLORA_7","face":1,"audio":{"tag":"voice-8-2","s":15,"d":2}},{"textKey":"DIALOGUE_FLORA_8","face":2,"audio":{"tag":"voice-8-3","s":2.1,"d":6}},{"textKey":"DIALOGUE_FLORA_9","face":5,"audio":{"tag":"voice-8-3","s":4,"d":6}},{"textKey":"DIALOGUE_FLORA_10","face":3,"audio":{"tag":"voice-8-3","s":10,"d":5}},{"textKey":"DIALOGUE_FLORA_11","face":4,"anim":4,"audio":{"tag":"voice-8-4","s":0,"d":7}},{"textKey":"DIALOGUE_FLORA_12","face":6,"audio":{"tag":"voice-8-4","s":7,"d":6}},{"textKey":"DIALOGUE_FLORA_13","face":7,"audio":{"tag":"voice-8-4","s":13,"d":3}},{"textKey":"DIALOGUE_FLORA_14","face":2,"audio":{"tag":"voice-8-5","s":0,"d":5}},{"textKey":"DIALOGUE_FLORA_15","face":0,"audio":{"tag":"voice-8-5","s":5,"d":3}},{"textKey":"DIALOGUE_FLORA_16","face":6,"anim":1,"audio":{"tag":"voice-8-6","s":0,"d":5}},{"textKey":"DIALOGUE_FLORA_17","face":6,"audio":{"tag":"voice-8-6","s":5,"d":8}},{"textKey":"DIALOGUE_FLORA_18","face":3,"audio":{"tag":"voice-8-7","s":0,"d":6}},{"textKey":"DIALOGUE_FLORA_19","face":6,"audio":{"tag":"voice-8-7","s":6,"d":5}},{"textKey":"DIALOGUE_FLORA_20","face":1,"audio":{"tag":"voice-8-7","s":11,"d":4}},{"textKey":"DIALOGUE_FLORA_21","face":6,"anim":4,"audio":{"tag":"voice-8-8","s":0,"d":6}},{"textKey":"DIALOGUE_FLORA_22","face":7,"audio":{"tag":"voice-8-8","s":6,"d":4}},{"textKey":"DIALOGUE_FLORA_23","face":6,"audio":{"tag":"voice-8-8","s":10,"d":5}},{"textKey":"DIALOGUE_FLORA_24","face":6,"anim":2,"audio":{"tag":"voice-8-9","s":0,"d":6}},{"textKey":"DIALOGUE_FLORA_25","face":2,"audio":{"tag":"voice-8-9","s":6,"d":6}},{"textKey":"DIALOGUE_FLORA_26","face":6,"anim":4,"audio":{"tag":"voice-8-9","s":12,"d":4}},{"textKey":"DIALOGUE_FLORA_27","face":2,"audio":{"tag":"voice-8-10","s":0,"d":7}},{"textKey":"DIALOGUE_FLORA_28","face":7,"audio":{"tag":"voice-8-10","s":7,"d":5}},{"textKey":"DIALOGUE_FLORA_29","face":0,"audio":{"tag":"voice-8-10","s":12,"d":4}},{"textKey":"DIALOGUE_FLORA_30","face":6,"anim":2,"audio":{"tag":"voice-8-10","s":16,"d":3}},{"textKey":"DIALOGUE_FLORA_31","face":6,"anim":4,"audio":{"tag":"voice-8-11","s":0,"d":9}},{"textKey":"DIALOGUE_FLORA_32","face":6,"audio":{"tag":"voice-8-11","s":9,"d":5}},{"textKey":"DIALOGUE_FLORA_33","face":3,"audio":{"tag":"voice-8-12","s":0,"d":4}},{"textKey":"DIALOGUE_FLORA_34","face":2,"audio":{"tag":"voice-8-12","s":4,"d":6}},{"textKey":"DIALOGUE_FLORA_35","face":4,"anim":4,"audio":{"tag":"voice-8-12","s":10,"d":6}},{"textKey":"DIALOGUE_FLORA_36","face":5,"audio":{"tag":"voice-8-13","s":0,"d":6}},{"textKey":"DIALOGUE_FLORA_37","face":4,"audio":{"tag":"voice-8-13","s":6,"d":3}},{"textKey":"DIALOGUE_FLORA_38","face":0,"anim":2,"audio":{"tag":"voice-8-14","s":0,"d":2}},{"textKey":"DIALOGUE_FLORA_39","face":4,"anim":2,"audio":{"tag":"voice-8-14","s":2,"d":2}}],"bok":[{"textKey":"DIALOGUE_BOK_0","face":0,"anim":4,"audio":{"tag":"voice-1-1","s":0,"d":5}},{"textKey":"DIALOGUE_BOK_1","face":7,"anim":2,"audio":{"tag":"voice-1-1","s":5,"d":8}},{"textKey":"DIALOGUE_BOK_2","face":2,"audio":{"tag":"voice-1-1","s":13,"d":1}},{"textKey":"DIALOGUE_BOK_3","face":1,"audio":{"tag":"voice-1-2","s":0,"d":8}},{"textKey":"DIALOGUE_BOK_4","face":6,"anim":1,"audio":{"tag":"voice-1-2","s":8,"d":8}},{"textKey":"DIALOGUE_BOK_5","face":3,"audio":{"tag":"voice-1-2","s":16,"d":6}},{"textKey":"DIALOGUE_BOK_6","face":4,"audio":{"tag":"voice-1-2","s":22,"d":7}},{"textKey":"DIALOGUE_BOK_7","face":8,"audio":{"tag":"voice-1-3","s":0,"d":8}},{"textKey":"DIALOGUE_BOK_8","face":6,"audio":{"tag":"voice-1-3","s":8,"d":8}},{"textKey":"DIALOGUE_BOK_9","face":3,"audio":{"tag":"voice-1-3","s":16,"d":6}},{"textKey":"DIALOGUE_BOK_10","face":0,"audio":{"tag":"voice-1-4","s":0,"d":5}},{"textKey":"DIALOGUE_BOK_11","face":1,"audio":{"tag":"voice-1-4","s":5,"d":6}},{"textKey":"DIALOGUE_BOK_12","face":5,"audio":{"tag":"voice-1-5","s":0,"d":9}},{"textKey":"DIALOGUE_BOK_13","face":0,"audio":{"tag":"voice-1-5","s":9,"d":9}},{"textKey":"DIALOGUE_BOK_14","face":3,"anim":2,"audio":{"tag":"voice-1-5","s":18,"d":6}},{"textKey":"DIALOGUE_BOK_15","face":8,"audio":{"tag":"voice-1-5","s":24,"d":10}},{"textKey":"DIALOGUE_BOK_16","face":5,"audio":{"tag":"voice-1-5","s":34,"d":12}},{"textKey":"DIALOGUE_BOK_17","face":4,"audio":{"tag":"voice-1-6","s":0,"d":11}},{"textKey":"DIALOGUE_BOK_18","face":8,"anim":2,"audio":{"tag":"voice-1-6","s":11,"d":8}},{"textKey":"DIALOGUE_BOK_19","face":3,"anim":4,"audio":{"tag":"voice-1-6","s":19,"d":2}},{"textKey":"DIALOGUE_BOK_20","face":0,"audio":{"tag":"voice-1-7","s":0,"d":7}},{"textKey":"DIALOGUE_BOK_21","face":8,"audio":{"tag":"voice-1-8","s":0,"d":7}},{"textKey":"DIALOGUE_BOK_22","face":0,"audio":{"tag":"voice-1-8","s":7,"d":5}},{"textKey":"DIALOGUE_BOK_23","face":5,"audio":{"tag":"voice-1-9","s":0,"d":6}},{"textKey":"DIALOGUE_BOK_24","face":1,"audio":{"tag":"voice-1-9","s":6,"d":7}},{"textKey":"DIALOGUE_BOK_25","face":8,"audio":{"tag":"voice-1-9","s":13,"d":7}},{"textKey":"DIALOGUE_BOK_26","face":3,"audio":{"tag":"voice-1-10","s":0,"d":9}},{"textKey":"DIALOGUE_BOK_27","face":0,"audio":{"tag":"voice-1-11","s":0,"d":10}},{"textKey":"DIALOGUE_BOK_28","face":4,"audio":{"tag":"voice-1-11","s":10,"d":7}},{"textKey":"DIALOGUE_BOK_29","face":6,"audio":{"tag":"voice-1-11","s":17,"d":8}},{"textKey":"DIALOGUE_BOK_30","face":0,"audio":{"tag":"voice-1-12","s":0,"d":3}},{"textKey":"DIALOGUE_BOK_31","face":3,"audio":{"tag":"voice-1-12","s":3,"d":5}},{"textKey":"DIALOGUE_BOK_32","face":5,"audio":{"tag":"voice-1-12","s":8,"d":5}},{"textKey":"DIALOGUE_BOK_33","face":1,"audio":{"tag":"voice-1-12","s":13,"d":8}},{"textKey":"DIALOGUE_BOK_34","face":3,"anim":4,"audio":{"tag":"voice-1-13","s":0,"d":7}},{"textKey":"DIALOGUE_BOK_35","face":4,"audio":{"tag":"voice-1-13","s":7,"d":4}},{"textKey":"DIALOGUE_BOK_36","face":1,"anim":4,"audio":{"tag":"voice-1-14","s":7,"d":6}},{"textKey":"DIALOGUE_BOK_37","face":5,"audio":{"tag":"voice-1-14","s":13,"d":9}},{"textKey":"DIALOGUE_BOK_38","face":7,"anim":4,"audio":{"tag":"voice-1-15","s":0,"d":8}},{"textKey":"DIALOGUE_BOK_39","face":5}],"merchant":[{"textKey":"DIALOGUE_MERCHANT_0","face":0,"anim":4,"audio":{"tag":"voice-11","s":0,"d":4}},{"textKey":"DIALOGUE_MERCHANT_1","face":0,"anim":2,"audio":{"tag":"voice-11","s":24,"d":3}},{"textKey":"DIALOGUE_MERCHANT_2","face":0,"anim":4,"audio":{"tag":"voice-11","s":6,"d":3}},{"textKey":"DIALOGUE_MERCHANT_3","face":0,"audio":{"tag":"voice-11","s":9,"d":5}},{"textKey":"DIALOGUE_MERCHANT_4","face":0,"audio":{"tag":"voice-11","s":19,"d":5}},{"textKey":"DIALOGUE_MERCHANT_5","face":0,"audio":{"tag":"voice-11","s":14,"d":5}},{"textKey":"DIALOGUE_MERCHANT_6","face":0,"audio":{"tag":"voice-11","s":4,"d":2}},{"textKey":"DIALOGUE_MERCHANT_7","face":0,"audio":{"tag":"voice-11-1","s":0,"d":6}},{"textKey":"DIALOGUE_MERCHANT_8","face":0,"audio":{"tag":"voice-11-1","s":6,"d":4}},{"textKey":"DIALOGUE_MERCHANT_9","face":0,"audio":{"tag":"voice-11-2","s":0,"d":4}},{"textKey":"DIALOGUE_MERCHANT_10","face":0,"audio":{"tag":"voice-11-2","s":4,"d":6}},{"textKey":"DIALOGUE_MERCHANT_11","face":0,"audio":{"tag":"voice-11-2","s":10,"d":4}},{"textKey":"DIALOGUE_MERCHANT_12","face":0,"audio":{"tag":"voice-11-2","s":14,"d":5}},{"textKey":"DIALOGUE_MERCHANT_13"},{"textKey":"DIALOGUE_MERCHANT_14"},{"textKey":"DIALOGUE_MERCHANT_15"},{"textKey":"DIALOGUE_MERCHANT_16"},{"textKey":"DIALOGUE_MERCHANT_17"},{"textKey":"DIALOGUE_MERCHANT_18","face":0},{"textKey":"DIALOGUE_MERCHANT_19","face":0},{"textKey":"DIALOGUE_MERCHANT_20","face":0},{"textKey":"DIALOGUE_MERCHANT_21","face":0},{"textKey":"DIALOGUE_MERCHANT_22","face":0},{"textKey":"DIALOGUE_MERCHANT_23","face":0},{"textKey":"DIALOGUE_MERCHANT_24","face":0},{"textKey":"DIALOGUE_MERCHANT_25","face":0},{"textKey":"DIALOGUE_MERCHANT_26","face":0},{"textKey":"DIALOGUE_MERCHANT_27","face":0},{"textKey":"DIALOGUE_MERCHANT_28","face":0},{"textKey":"DIALOGUE_MERCHANT_29","face":0},{"textKey":"DIALOGUE_MERCHANT_30","face":0},{"textKey":"DIALOGUE_MERCHANT_31","face":0},{"textKey":"DIALOGUE_MERCHANT_32","face":0},{"textKey":"DIALOGUE_MERCHANT_33","face":0},{"textKey":"DIALOGUE_MERCHANT_34","face":0},{"textKey":"DIALOGUE_MERCHANT_35","face":0},{"textKey":"DIALOGUE_MERCHANT_36","face":0},{"textKey":"DIALOGUE_MERCHANT_37","face":1,"anim":1,"audio":{"tag":"voice-11-3","s":0,"d":6}},{"textKey":"DIALOGUE_MERCHANT_38","face":1,"anim":2,"audio":{"tag":"voice-11-3","s":6,"d":4}},{"textKey":"DIALOGUE_MERCHANT_39","face":1,"audio":{"tag":"voice-11-3","s":10,"d":8}}],"winterfest":[{"textKey":"DIALOGUE_WINTERFEST_0","audio":{}},{"textKey":"DIALOGUE_WINTERFEST_1","audio":{}}],"benni":[{"textKey":"DIALOGUE_BENNI_0","face":7,"anim":4,"audio":{"tag":"voice-12-1","s":0,"d":2}},{"textKey":"DIALOGUE_BENNI_1","face":4,"anim":4,"audio":{"tag":"voice-12-1","s":2,"d":2}},{"textKey":"DIALOGUE_BENNI_2","face":1,"anim":2,"audio":{"tag":"voice-12-2","s":0,"d":5.05}},{"textKey":"DIALOGUE_BENNI_3","face":6,"anim":2,"audio":{"tag":"voice-12-2","s":5,"d":3}},{"textKey":"DIALOGUE_BENNI_4","face":10,"anim":2,"audio":{"tag":"voice-12-2","s":8,"d":2}},{"textKey":"DIALOGUE_BENNI_5","face":1,"anim":2,"audio":{"tag":"voice-12-2","s":10,"d":4}},{"textKey":"DIALOGUE_BENNI_6","face":6,"anim":1,"audio":{"tag":"voice-12-2","s":14,"d":6}},{"textKey":"DIALOGUE_BENNI_7","face":10,"anim":2,"audio":{"tag":"voice-12-2","s":20,"d":5}},{"textKey":"DIALOGUE_BENNI_8","face":0,"anim":4,"audio":{"tag":"voice-12-3","s":0,"d":3}},{"textKey":"DIALOGUE_BENNI_9","face":0,"anim":2,"audio":{"tag":"voice-12-4","s":0,"d":6}},{"textKey":"DIALOGUE_BENNI_10","face":0,"anim":2,"audio":{"tag":"voice-12-4","s":6,"d":10}},{"textKey":"DIALOGUE_BENNI_11","face":0,"anim":2,"audio":{"tag":"voice-12-4","s":16,"d":3}},{"textKey":"DIALOGUE_BENNI_12","face":0,"anim":2,"audio":{"tag":"voice-12-4","s":19,"d":6}},{"textKey":"DIALOGUE_BENNI_13","face":2,"audio":{"tag":"voice-12-5","s":0,"d":6}},{"textKey":"DIALOGUE_BENNI_14","face":2,"anim":2,"audio":{"tag":"voice-12-5","s":6,"d":4}},{"textKey":"DIALOGUE_BENNI_15","face":1,"anim":2,"audio":{"tag":"voice-12-5","s":10,"d":3}},{"textKey":"DIALOGUE_BENNI_16","face":0,"anim":2,"audio":{"tag":"voice-12-6","s":0,"d":5}},{"textKey":"DIALOGUE_BENNI_17","face":9,"audio":{"tag":"voice-12-6","s":5,"d":3}},{"textKey":"DIALOGUE_BENNI_18","face":1,"anim":1,"audio":{"tag":"voice-12-6","s":8,"d":9}},{"textKey":"DIALOGUE_BENNI_19","face":3,"audio":{"tag":"voice-12-7","s":0,"d":5}},{"textKey":"DIALOGUE_BENNI_20","face":8,"anim":2,"audio":{"tag":"voice-12-7","s":5,"d":5}},{"textKey":"DIALOGUE_BENNI_21","face":1,"anim":2,"audio":{"tag":"voice-12-7","s":10,"d":6}},{"textKey":"DIALOGUE_BENNI_22","face":0,"anim":2,"audio":{"tag":"voice-12-7","s":16,"d":4}},{"textKey":"DIALOGUE_BENNI_23","face":1,"anim":4,"audio":{"tag":"voice-12-8","s":0,"d":5}},{"textKey":"DIALOGUE_BENNI_24","face":5,"anim":2,"audio":{"tag":"voice-12-8","s":5,"d":2}},{"textKey":"DIALOGUE_BENNI_25","face":0,"anim":2,"audio":{"tag":"voice-12-9","s":0,"d":5}},{"textKey":"DIALOGUE_BENNI_26","face":4,"anim":4,"audio":{"tag":"voice-12-10","s":0,"d":4}},{"textKey":"DIALOGUE_BENNI_27","face":8,"anim":2,"audio":{"tag":"voice-12-10","s":4,"d":2}},{"textKey":"DIALOGUE_BENNI_28","face":1,"anim":2,"audio":{"tag":"voice-12-10","s":6,"d":6}},{"textKey":"DIALOGUE_BENNI_29","face":5,"anim":2,"audio":{"tag":"voice-12-11","s":0,"d":3}},{"textKey":"DIALOGUE_BENNI_30","face":0,"anim":2,"audio":{"tag":"voice-12-12","s":0,"d":3}},{"textKey":"DIALOGUE_BENNI_31","face":0,"anim":2,"audio":{"tag":"voice-12-13","s":0,"d":4}},{"textKey":"DIALOGUE_BENNI_32","face":8,"anim":2,"audio":{"tag":"voice-12-13","s":4,"d":3}},{"textKey":"DIALOGUE_BENNI_33","face":1,"anim":2,"audio":{"tag":"voice-12-13","s":7,"d":6}},{"textKey":"DIALOGUE_BENNI_34","face":9,"audio":{"tag":"voice-12-14","s":0,"d":3}},{"textKey":"DIALOGUE_BENNI_35","face":3,"anim":1,"audio":{"tag":"voice-12-14","s":3,"d":4}},{"textKey":"DIALOGUE_BENNI_36","face":5,"anim":2,"audio":{"tag":"voice-12-14","s":7,"d":4}},{"textKey":"DIALOGUE_BENNI_37","face":2,"anim":2,"audio":{"tag":"voice-12-15","s":0,"d":7}},{"textKey":"DIALOGUE_BENNI_38","face":6,"anim":2,"audio":{"tag":"voice-12-15","s":7,"d":2}},{"textKey":"DIALOGUE_BENNI_39","face":2,"anim":4,"audio":{"tag":"voice-12-16","s":0,"d":3}},{"textKey":"DIALOGUE_BENNI_40","face":6,"anim":1,"audio":{"tag":"voice-12-16","s":3,"d":3}},{"textKey":"DIALOGUE_BENNI_41","face":15,"anim":4,"audio":{"tag":"voice-12-16","s":6,"d":7}},{"textKey":"DIALOGUE_BENNI_42","face":0,"anim":2,"audio":{"tag":"voice-12-17","s":0,"d":5}},{"textKey":"DIALOGUE_BENNI_43","face":8,"anim":4,"audio":{"tag":"voice-12-17","s":5,"d":3}},{"textKey":"DIALOGUE_BENNI_44","face":4,"audio":{"tag":"voice-12-17","s":8,"d":3}},{"textKey":"DIALOGUE_BENNI_45","face":15,"anim":4,"audio":{"tag":"voice-12-17","s":11,"d":2}},{"textKey":"DIALOGUE_BENNI_46","face":4,"anim":2,"audio":{"tag":"voice-12-18","s":0,"d":3}}],"broccolina":[{"textKey":"DIALOGUE_BROCCOLINA_0","face":0,"anim":2,"audio":{"tag":"voice-13-1","s":0,"d":5}},{"textKey":"DIALOGUE_BROCCOLINA_1","face":3,"anim":2},{"textKey":"DIALOGUE_BROCCOLINA_2","face":3,"anim":2,"audio":{"tag":"voice-12-1","s":0,"d":2}}],"eugene":[{"textKey":"DIALOGUE_EUGENE_0","face":3,"anim":4,"audio":{"tag":"voice-14-1","s":0,"d":4}},{"textKey":"DIALOGUE_EUGENE_1","face":0,"anim":2,"audio":{"tag":"voice-14-2","s":0,"d":4}},{"textKey":"DIALOGUE_EUGENE_2","face":1,"anim":2,"audio":{"tag":"voice-14-2","s":4,"d":6}},{"textKey":"DIALOGUE_EUGENE_3","face":4,"anim":4,"audio":{"tag":"voice-14-2","s":10,"d":2}},{"textKey":"DIALOGUE_EUGENE_4","face":2,"anim":2,"audio":{"tag":"voice-14-2","s":12,"d":4}},{"textKey":"DIALOGUE_EUGENE_5","face":0,"anim":2,"audio":{"tag":"voice-14-2","s":16,"d":9}},{"textKey":"DIALOGUE_EUGENE_6","face":4,"anim":1,"audio":{"tag":"voice-14-2","s":25,"d":6}}],"cebollini":[{"textKey":"DIALOGUE_CEBOLLINI_0","face":0,"anim":2,"audio":{"tag":"voice-18-2","s":0,"d":5}},{"textKey":"DIALOGUE_CEBOLLINI_1","face":0,"anim":2,"audio":{"tag":"voice-18-3","s":0,"d":3}},{"textKey":"DIALOGUE_CEBOLLINI_2","face":0,"anim":2,"audio":{"tag":"voice-18-3","s":3,"d":3}},{"textKey":"DIALOGUE_CEBOLLINI_3","face":0,"anim":2,"audio":{"tag":"voice-18-3","s":6,"d":5}},{"textKey":"DIALOGUE_CEBOLLINI_4","face":0,"anim":2,"audio":{"tag":"voice-18-3","s":11,"d":4}},{"textKey":"DIALOGUE_CEBOLLINI_5","face":0,"anim":2,"audio":{"tag":"voice-18-4","s":0,"d":3}},{"textKey":"DIALOGUE_CEBOLLINI_6","face":0,"anim":2,"audio":{"tag":"voice-18-4","s":3,"d":7}},{"textKey":"DIALOGUE_CEBOLLINI_7","face":0,"anim":2,"audio":{"tag":"voice-18-4","s":10,"d":4}},{"textKey":"DIALOGUE_CEBOLLINI_8","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":0,"d":5}},{"textKey":"DIALOGUE_CEBOLLINI_9","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":5,"d":5}},{"textKey":"DIALOGUE_CEBOLLINI_10","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":10,"d":3}},{"textKey":"DIALOGUE_CEBOLLINI_11","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":13,"d":4}},{"textKey":"DIALOGUE_CEBOLLINI_12","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":17,"d":3}},{"textKey":"DIALOGUE_CEBOLLINI_13","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":20,"d":9}},{"textKey":"DIALOGUE_CEBOLLINI_14","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":29,"d":4}},{"textKey":"DIALOGUE_CEBOLLINI_15","face":0,"anim":2,"audio":{"tag":"voice-18-5","s":33,"d":7}},{"textKey":"DIALOGUE_CEBOLLINI_16","face":0,"anim":2,"audio":{"tag":"voice-18-1","s":0,"d":5}},{"textKey":"DIALOGUE_CEBOLLINI_17","face":0,"anim":2,"audio":{"tag":"voice-18-1","s":5,"d":9}},{"textKey":"DIALOGUE_CEBOLLINI_18","face":0,"anim":2,"audio":{"tag":"voice-18-1","s":14,"d":3}},{"textKey":"DIALOGUE_CEBOLLINI_19","face":0,"anim":2,"audio":{"tag":"voice-18-1","s":17,"d":4}}],"slime_queen":[{"textKey":"DIALOGUE_SLIME_QUEEN_0","face":0,"anim":2,"audio":{"tag":"voice-16-3","s":0,"d":7}},{"textKey":"DIALOGUE_SLIME_QUEEN_1","face":1,"anim":2},{"textKey":"DIALOGUE_SLIME_QUEEN_2","face":5,"anim":1,"audio":{"tag":"voice-16-3","s":7,"d":4}},{"textKey":"DIALOGUE_SLIME_QUEEN_3","face":5,"anim":4,"audio":{"tag":"voice-16-3","s":11,"d":8}},{"textKey":"DIALOGUE_SLIME_QUEEN_4","face":5,"anim":1,"audio":{"tag":"voice-16-3","s":19,"d":7}},{"textKey":"DIALOGUE_SLIME_QUEEN_5","face":0,"anim":2,"audio":{"tag":"voice-16-1","s":0,"d":5}},{"textKey":"DIALOGUE_SLIME_QUEEN_6","face":0,"anim":2,"audio":{"tag":"voice-16-3","s":7.8,"d":0.85}},{"textKey":"DIALOGUE_SLIME_QUEEN_7","face":2,"anim":2,"audio":{"tag":"voice-16-1","s":5,"d":6}},{"textKey":"DIALOGUE_SLIME_QUEEN_8","face":0,"anim":2,"audio":{"tag":"voice-16-1","s":11,"d":8}},{"textKey":"DIALOGUE_SLIME_QUEEN_9","face":4,"anim":2,"audio":{"tag":"voice-16-1","s":19,"d":10}},{"textKey":"DIALOGUE_SLIME_QUEEN_10","face":4,"anim":1,"audio":{"tag":"voice-16-2","s":0,"d":5}}],"slime_guard":[{"textKey":"DIALOGUE_SLIME_GUARD_0","face":0,"anim":2,"audio":{"tag":"voice-17-3","s":0,"d":3}},{"textKey":"DIALOGUE_SLIME_GUARD_1","face":3,"anim":2,"audio":{"tag":"voice-17-4","s":0,"d":4}},{"textKey":"DIALOGUE_SLIME_GUARD_2","face":0,"anim":1,"audio":{"tag":"voice-17-4","s":4,"d":4}},{"textKey":"DIALOGUE_SLIME_GUARD_3","face":1,"anim":2,"audio":{"tag":"voice-17-4","s":8,"d":4}},{"textKey":"DIALOGUE_SLIME_GUARD_4","face":2,"anim":1,"audio":{"tag":"voice-17-4","s":12,"d":5}},{"textKey":"DIALOGUE_SLIME_GUARD_5","face":4,"anim":2,"audio":{"tag":"voice-17-2","s":0,"d":6}}],"slime_worker":[{"textKey":"DIALOGUE_SLIME_WORKER_0","face":3,"anim":1,"audio":{"tag":"voice-17-1","s":0,"d":4}},{"textKey":"DIALOGUE_SLIME_WORKER_1","face":2,"anim":2,"audio":{"tag":"voice-17-1","s":4,"d":6}}],"slurpy":[{"textKey":"DIALOGUE_SLURPY_0","face":1,"anim":2,"audio":{"tag":"voice-15-2","s":0,"d":3}},{"textKey":"DIALOGUE_SLURPY_1","face":1,"anim":4,"audio":{"tag":"voice-15-7","s":0,"d":4}},{"textKey":"DIALOGUE_SLURPY_2","face":0,"anim":2,"audio":{"tag":"voice-15-1","s":0,"d":6}},{"textKey":"DIALOGUE_SLURPY_3","face":4,"anim":4,"audio":{"tag":"voice-15-1","s":6,"d":7}},{"textKey":"DIALOGUE_SLURPY_4","face":0,"anim":2,"audio":{"tag":"voice-15-1","s":13,"d":5}},{"textKey":"DIALOGUE_SLURPY_5","face":4,"anim":2,"audio":{"tag":"voice-15-1","s":18,"d":5}},{"textKey":"DIALOGUE_SLURPY_6","face":1,"anim":4,"audio":{"tag":"voice-15-3","s":0,"d":4}},{"textKey":"DIALOGUE_SLURPY_7","face":4,"anim":2,"audio":{"tag":"voice-15-3","s":4,"d":4}},{"textKey":"DIALOGUE_SLURPY_8","face":1,"anim":4,"audio":{"tag":"voice-15-4","s":0,"d":9}},{"textKey":"DIALOGUE_SLURPY_9","face":4,"anim":2,"audio":{"tag":"voice-15-4","s":9,"d":7}},{"textKey":"DIALOGUE_SLURPY_10","face":1,"anim":2,"audio":{"tag":"voice-15-5","s":0,"d":9}},{"textKey":"DIALOGUE_SLURPY_11","face":0,"anim":2,"audio":{"tag":"voice-15-5","s":9,"d":3}},{"textKey":"DIALOGUE_SLURPY_12","face":2,"anim":1,"audio":{"tag":"voice-15-5","s":12,"d":6}},{"textKey":"DIALOGUE_SLURPY_13","face":4,"anim":2,"audio":{"tag":"voice-15-6","s":0,"d":6}},{"textKey":"DIALOGUE_SLURPY_14","face":0,"anim":2,"audio":{"tag":"voice-15-6","s":6,"d":3}},{"textKey":"DIALOGUE_SLURPY_15","face":1,"anim":4,"audio":{"tag":"voice-15-8","s":0,"d":7}},{"textKey":"DIALOGUE_SLURPY_16","face":2,"anim":1,"audio":{"tag":"voice-15-8","s":7,"d":6}},{"textKey":"DIALOGUE_SLURPY_17","face":3,"anim":4,"audio":{"tag":"voice-15-9","s":0,"d":6}},{"textKey":"DIALOGUE_SLURPY_18","face":2,"anim":1,"audio":{"tag":"voice-15-9","s":6,"d":7}},{"textKey":"DIALOGUE_SLURPY_19","face":4,"anim":2,"audio":{"tag":"voice-15-9","s":13,"d":4}},{"textKey":"DIALOGUE_SLURPY_20","face":1,"anim":4,"audio":{"tag":"voice-15-9","s":17,"d":2}},{"textKey":"DIALOGUE_SLURPY_21","face":4,"anim":2,"audio":{"tag":"voice-15-9","s":19,"d":7}},{"textKey":"DIALOGUE_SLURPY_22","face":1,"anim":2,"audio":{"tag":"voice-15-10","s":0,"d":6}},{"textKey":"DIALOGUE_SLURPY_23","face":4,"anim":2,"audio":{"tag":"voice-15-10","s":6,"d":6}},{"textKey":"DIALOGUE_SLURPY_24","face":0,"anim":2,"audio":{"tag":"voice-15-10","s":12,"d":2}},{"textKey":"DIALOGUE_SLURPY_25","face":2,"anim":1,"audio":{"tag":"voice-15-11","s":0,"d":7}},{"textKey":"DIALOGUE_SLURPY_26","face":0,"anim":2,"audio":{"tag":"voice-15-11","s":7,"d":6}},{"textKey":"DIALOGUE_SLURPY_27","face":1,"anim":4,"audio":{"tag":"voice-15-12","s":0,"d":10}},{"textKey":"DIALOGUE_SLURPY_28","face":4,"anim":2,"audio":{"tag":"voice-15-12","s":10,"d":5}},{"textKey":"DIALOGUE_SLURPY_29","face":3,"anim":4,"audio":{"tag":"voice-15-13","s":0,"d":4}},{"textKey":"DIALOGUE_SLURPY_30","face":0,"anim":2},{"textKey":"DIALOGUE_SLURPY_31","face":0,"anim":2,"audio":{"tag":"voice-15-13","s":4,"d":5}},{"textKey":"DIALOGUE_SLURPY_32","face":0,"anim":2,"audio":{"tag":"voice-15-13","s":9,"d":6}},{"textKey":"DIALOGUE_SLURPY_33","face":4,"anim":2,"audio":{"tag":"voice-15-13","s":15,"d":8}},{"textKey":"DIALOGUE_SLURPY_34","face":4,"anim":2,"audio":{"tag":"voice-15-13","s":23,"d":4}},{"textKey":"DIALOGUE_SLURPY_35","face":4,"anim":2,"audio":{"tag":"voice-15-14","s":0,"d":3}},{"textKey":"DIALOGUE_SLURPY_36","face":0,"anim":2,"audio":{"tag":"voice-15-14","s":3,"d":5}},{"textKey":"DIALOGUE_SLURPY_37","face":0,"anim":2,"audio":{"tag":"voice-15-14","s":8,"d":6}},{"textKey":"DIALOGUE_SLURPY_38","face":3,"anim":1,"audio":{"tag":"voice-15-16","s":0,"d":8}},{"textKey":"DIALOGUE_SLURPY_39","face":4,"anim":4,"audio":{"tag":"voice-15-16","s":8,"d":2}},{"textKey":"DIALOGUE_SLURPY_40","face":0,"anim":2,"audio":{"tag":"voice-15-16","s":10,"d":6}},{"textKey":"DIALOGUE_SLURPY_41","face":1,"anim":4,"audio":{"tag":"voice-15-17","s":0,"d":4}},{"textKey":"DIALOGUE_SLURPY_42","face":0,"anim":2,"audio":{"tag":"voice-15-17","s":4,"d":4}},{"textKey":"DIALOGUE_SLURPY_43","face":2,"anim":4,"audio":{"tag":"voice-15-17","s":8,"d":3}},{"textKey":"DIALOGUE_SLURPY_44","face":2,"anim":1,"audio":{"tag":"voice-15-17","s":11,"d":2}},{"textKey":"DIALOGUE_SLURPY_45","face":0,"anim":2,"audio":{"tag":"voice-15-17","s":13,"d":7}},{"textKey":"DIALOGUE_SLURPY_46","face":4,"anim":2,"audio":{"tag":"voice-15-17","s":20,"d":2}},{"textKey":"DIALOGUE_SLURPY_47","face":1,"anim":4,"audio":{"tag":"voice-15-17","s":22,"d":5}},{"textKey":"DIALOGUE_SLURPY_48","face":1,"anim":4,"audio":{"tag":"voice-15-18","s":0,"d":5}},{"textKey":"DIALOGUE_SLURPY_49","face":4,"anim":2,"audio":{"tag":"voice-15-18","s":5,"d":9}}],"puppetmaster":[{"textKey":"DIALOGUE_PUPPET_MASTER_0","face":0,"audio":{"tag":"voice-20-1","s":0,"d":10}},{"textKey":"DIALOGUE_PUPPET_MASTER_1","face":2,"anim":4,"audio":{"tag":"voice-20-1","s":10,"d":5}},{"textKey":"DIALOGUE_PUPPET_MASTER_2","face":0,"audio":{"tag":"voice-20-1","s":15,"d":5}},{"textKey":"DIALOGUE_PUPPET_MASTER_3","face":0,"audio":{"tag":"voice-20-1","s":20,"d":10}},{"textKey":"DIALOGUE_PUPPET_MASTER_4","face":2,"audio":{"tag":"voice-20-1","s":30,"d":3}},{"textKey":"DIALOGUE_PUPPET_MASTER_5","face":1,"anim":2,"audio":{"tag":"voice-20-1","s":33,"d":5}},{"textKey":"DIALOGUE_PUPPET_MASTER_6","face":3,"anim":1,"audio":{"tag":"voice-20-1","s":38,"d":3}},{"textKey":"DIALOGUE_PUPPET_MASTER_7","face":3,"anim":1,"audio":{"tag":"voice-20-1","s":41,"d":4.3}},{"textKey":"DIALOGUE_PUPPET_MASTER_8","face":1,"audio":{"tag":"voice-20-1","s":48,"d":2}},{"textKey":"DIALOGUE_PUPPET_MASTER_9","face":2,"anim":2,"audio":{"tag":"voice-20-1","s":50,"d":6}},{"textKey":"DIALOGUE_PUPPET_MASTER_10","face":2,"anim":2,"audio":{"tag":"voice-20-2","s":0,"d":8}},{"textKey":"DIALOGUE_PUPPET_MASTER_11","face":1,"anim":4,"audio":{"tag":"voice-20-2","s":9,"d":11}},{"textKey":"DIALOGUE_PUPPET_MASTER_12","face":0,"anim":4,"audio":{"tag":"voice-20-2","s":21,"d":5}},{"textKey":"DIALOGUE_PUPPET_MASTER_13","face":2,"anim":2,"audio":{"tag":"voice-20-2","s":26,"d":6}},{"textKey":"DIALOGUE_PUPPET_MASTER_14","face":2,"anim":2,"audio":{"tag":"voice-20-2","s":33,"d":6}}],"pippet":[{"textKey":"DIALOGUE_PIPPIT_0","face":1,"anim":2,"audio":{"tag":"voice-19-1","s":0,"d":5}},{"textKey":"DIALOGUE_PIPPIT_1","face":3,"anim":2,"audio":{"tag":"voice-19-1","s":5,"d":8}},{"textKey":"DIALOGUE_PIPPIT_2","face":4,"anim":2,"audio":{"tag":"voice-19-1","s":13,"d":8}},{"textKey":"DIALOGUE_PIPPIT_3","face":5,"anim":4,"audio":{"tag":"voice-28-1","s":0,"d":6}},{"textKey":"DIALOGUE_PIPPIT_4","face":3,"anim":2,"audio":{"tag":"voice-28-1","s":7,"d":4.5}},{"textKey":"DIALOGUE_PIPPIT_5","face":0,"anim":4,"audio":{"tag":"voice-28-1","s":12,"d":4}},{"textKey":"DIALOGUE_PIPPIT_6","face":5,"anim":2,"audio":{"tag":"voice-28-1","s":17,"d":6}},{"textKey":"DIALOGUE_PIPPIT_7","face":5,"anim":4,"audio":{"tag":"voice-28-1","s":25,"d":5}},{"textKey":"DIALOGUE_PIPPIT_8","face":0,"anim":2,"audio":{"tag":"voice-28-1","s":31,"d":7}},{"textKey":"DIALOGUE_PIPPIT_9","face":5,"anim":4}],"julia_ghoulia":[{"textKey":"DIALOGUE_JULIA_GHOULIA_0","face":0,"anim":2,"audio":{"tag":"voice-21-2","s":0,"d":6}},{"textKey":"DIALOGUE_JULIA_GHOULIA_1","face":0,"anim":4,"audio":{"tag":"voice-21-1","s":0,"d":3}},{"textKey":"DIALOGUE_JULIA_GHOULIA_2","face":0,"anim":2,"audio":{"tag":"voice-21-1","s":3,"d":7}},{"textKey":"DIALOGUE_JULIA_GHOULIA_3","face":0,"anim":2,"audio":{"tag":"voice-21-1","s":10,"d":5}},{"textKey":"DIALOGUE_JULIA_GHOULIA_4","face":0,"anim":2,"audio":{"tag":"voice-21-1","s":15,"d":11}},{"textKey":"DIALOGUE_JULIA_GHOULIA_5","face":0,"anim":4,"audio":{"tag":"voice-21-1","s":26,"d":7}}],"mama_star":[{"textKey":"DIALOGUE_MAMA_STAR_0","face":0,"anim":2,"audio":{"tag":"voice-22-1","s":34,"d":5}},{"textKey":"DIALOGUE_MAMA_STAR_1","face":0,"anim":4,"audio":{"tag":"voice-22-1","s":37.4,"d":10}},{"textKey":"DIALOGUE_MAMA_STAR_2","face":0,"anim":2,"audio":{"tag":"voice-22-1","s":49,"d":7}},{"textKey":"DIALOGUE_MAMA_STAR_3","face":0,"anim":4,"audio":{"tag":"voice-22-1","s":0,"d":6}},{"textKey":"DIALOGUE_MAMA_STAR_4","face":0,"anim":2,"audio":{"tag":"voice-22-1","s":6,"d":5.4}},{"textKey":"DIALOGUE_MAMA_STAR_5","face":0,"anim":2,"audio":{"tag":"voice-22-1","s":11.4,"d":4}},{"textKey":"DIALOGUE_MAMA_STAR_6","face":0,"anim":2,"audio":{"tag":"voice-22-1","s":15.4,"d":9.6}},{"textKey":"DIALOGUE_MAMA_STAR_7","face":0,"anim":4,"audio":{"tag":"voice-22-1","s":25.4,"d":6.6}},{"textKey":"DIALOGUE_MAMA_STAR_8","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":0,"d":7}},{"textKey":"DIALOGUE_MAMA_STAR_9","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":7,"d":5}},{"textKey":"DIALOGUE_MAMA_STAR_10","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":12,"d":9}},{"textKey":"DIALOGUE_MAMA_STAR_11","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":21,"d":10}},{"textKey":"DIALOGUE_MAMA_STAR_12","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":31,"d":9}},{"textKey":"DIALOGUE_MAMA_STAR_13","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":40,"d":6}},{"textKey":"DIALOGUE_MAMA_STAR_14","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":46,"d":8}},{"textKey":"DIALOGUE_MAMA_STAR_15","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":54,"d":8}},{"textKey":"DIALOGUE_MAMA_STAR_16","face":0,"anim":4,"audio":{"tag":"voice-22-2","s":62,"d":5}}],"toy":[{"textKey":"DIALOGUE_TOY_0","face":0,"audio":{"tag":"voice-23-1","s":0,"d":8}},{"textKey":"DIALOGUE_TOY_1","face":0,"audio":{"tag":"voice-23-1","s":8,"d":4}},{"textKey":"DIALOGUE_TOY_2","face":0,"audio":{"tag":"voice-23-1","s":8,"d":4}},{"textKey":"DIALOGUE_TOY_3","face":0,"audio":{"tag":"voice-23-2","s":12.6,"d":10.4}},{"textKey":"DIALOGUE_TOY_4","face":0,"audio":{"tag":"voice-23-2","s":23.1,"d":9}},{"textKey":"DIALOGUE_TOY_5","face":0,"audio":{"tag":"voice-23-2","s":32.4,"d":9.6}},{"textKey":"DIALOGUE_TOY_6","face":0,"audio":{"tag":"voice-23-2","s":42,"d":8}},{"textKey":"DIALOGUE_TOY_7","face":0,"audio":{"tag":"voice-23-2","s":50,"d":9}},{"textKey":"DIALOGUE_TOY_8","face":0,"audio":{"tag":"voice-23-2","s":59,"d":7.3}},{"textKey":"DIALOGUE_TOY_9","face":0,"audio":{"tag":"voice-23-2","s":67.5,"d":8.5}},{"textKey":"DIALOGUE_TOY_10","face":0,"audio":{"tag":"voice-23-2","s":0,"d":7}},{"textKey":"DIALOGUE_TOY_11","face":0,"audio":{"tag":"voice-23-2","s":7,"d":6}},{"textKey":"DIALOGUE_TOY_12","face":0},{"textKey":"DIALOGUE_TOY_13","face":0,"audio":{"tag":"voice-23-3","s":0,"d":5}},{"textKey":"DIALOGUE_TOY_14","face":0,"audio":{"tag":"voice-23-3","s":22,"d":9}},{"textKey":"DIALOGUE_TOY_15","face":0,"audio":{"tag":"voice-23-3","s":31,"d":6}},{"textKey":"DIALOGUE_TOY_16","face":0,"audio":{"tag":"voice-23-3","s":5,"d":9}},{"textKey":"DIALOGUE_TOY_17","face":0,"audio":{"tag":"voice-23-3","s":14,"d":8}}],"howard_cornelius":[{"textKey":"DIALOGUE_HOWARD_CORNELIUS_0","face":0,"anim":4,"audio":{"tag":"voice-24-1","s":21.9,"d":5.1}},{"textKey":"DIALOGUE_HOWARD_CORNELIUS_1","face":0,"anim":2,"audio":{"tag":"voice-24-1","s":27,"d":2.25}},{"textKey":"DIALOGUE_HOWARD_CORNELIUS_2","face":0,"anim":2,"audio":{"tag":"voice-24-1","s":29.25,"d":3.5}},{"textKey":"DIALOGUE_HOWARD_CORNELIUS_3","face":0,"anim":4,"audio":{"tag":"voice-24-1","s":0,"d":5}},{"textKey":"DIALOGUE_HOWARD_CORNELIUS_4","face":0,"anim":2,"audio":{"tag":"voice-24-1","s":5.9,"d":8}},{"textKey":"DIALOGUE_HOWARD_CORNELIUS_5","face":0,"anim":2,"audio":{"tag":"voice-24-1","s":13.9,"d":8}}],"sir-vey":[{"textKey":"DIALOGUE_SIR_VEY_0","anim":4,"face":0},{"textKey":"DIALOGUE_SIR_VEY_1","anim":4,"face":1}],"mozza-ella":[{"textKey":"DIALOGUE_MOZZA_ELLE_0","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_1","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_2","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_3","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_4","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_5","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_6","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_7","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_8","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_9","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_10","face":0},{"textKey":"DIALOGUE_MOZZA_ELLE_11","face":1}],"potion":[{"textKey":"DIALOGUE_POTION_0","face":1},{"textKey":"DIALOGUE_POTION_1","face":0},{"textKey":"DIALOGUE_POTION_2","face":1},{"textKey":"DIALOGUE_POTION_3","face":0},{"textKey":"DIALOGUE_POTION_4","face":0},{"textKey":"DIALOGUE_POTION_5","face":1},{"textKey":"DIALOGUE_POTION_6","face":0},{"textKey":"DIALOGUE_POTION_7","face":0}],"swoopy":[{"textKey":"DIALOGUE_SWOOPY_0","face":1},{"textKey":"DIALOGUE_SWOOPY_1","face":0},{"textKey":"DIALOGUE_SWOOPY_2","face":1},{"textKey":"DIALOGUE_SWOOPY_3","face":0},{"textKey":"DIALOGUE_SWOOPY_4","face":0}],"eve":[{"textKey":"DIALOGUE_EVE_0","face":1,"anim":4,"audio":{"tag":"voice-27-1","s":62,"d":3}},{"textKey":"DIALOGUE_EVE_1","face":3,"audio":{"tag":"voice-27-1","s":0,"d":1.2}},{"textKey":"DIALOGUE_EVE_2","face":0,"anim":2,"audio":{"tag":"voice-27-1","s":2,"d":7}},{"textKey":"DIALOGUE_EVE_3","face":0,"audio":{"tag":"voice-27-1","s":11,"d":8.2}},{"textKey":"DIALOGUE_EVE_4","face":0,"audio":{"tag":"voice-27-1","s":20,"d":4.2}},{"textKey":"DIALOGUE_EVE_5","face":4,"audio":{"tag":"voice-27-1","s":25,"d":7.5}},{"textKey":"DIALOGUE_EVE_6","face":3,"anim":4,"audio":{"tag":"voice-27-1","s":34,"d":6}},{"textKey":"DIALOGUE_EVE_7","face":4,"audio":{"tag":"voice-27-1","s":41,"d":5.5}},{"textKey":"DIALOGUE_EVE_8","face":4,"anim":2,"audio":{"tag":"voice-27-1","s":47,"d":5.5}},{"textKey":"DIALOGUE_EVE_9","face":0,"audio":{"tag":"voice-27-1","s":53,"d":7.5}},{"textKey":"DIALOGUE_EVE_10","face":0,"anim":4,"audio":{"tag":"voice-27-1","s":66,"d":4}},{"textKey":"DIALOGUE_EVE_11","face":4,"audio":{"tag":"voice-27-1","s":71,"d":5.5}},{"textKey":"DIALOGUE_EVE_12","face":0,"audio":{"tag":"voice-27-1","s":77,"d":7}},{"textKey":"DIALOGUE_EVE_13","face":4,"audio":{"tag":"voice-27-1","s":85,"d":4.5}},{"textKey":"DIALOGUE_EVE_14","face":5,"anim":2,"audio":{"tag":"voice-25-1","s":24,"d":4.2}},{"textKey":"DIALOGUE_EVE_15","face":4,"audio":{"tag":"voice-27-1","s":90,"d":5}},{"textKey":"DIALOGUE_EVE_16","face":2,"anim":2,"audio":{"tag":"voice-27-1","s":96,"d":3.5}},{"textKey":"DIALOGUE_EVE_17","face":0,"anim":4,"audio":{"tag":"voice-27-1","s":100,"d":5}},{"textKey":"DIALOGUE_EVE_18","face":0,"anim":2,"audio":{"tag":"voice-27-1","s":106,"d":4.5}},{"textKey":"DIALOGUE_EVE_19","face":2,"audio":{"tag":"voice-27-1","s":111,"d":3}},{"textKey":"DIALOGUE_EVE_20","face":0,"audio":{"tag":"voice-27-1","s":115,"d":7}},{"textKey":"DIALOGUE_EVE_21","face":1,"anim":2,"audio":{"tag":"voice-27-1","s":123,"d":3.2}},{"textKey":"DIALOGUE_EVE_22","face":6,"anim":2,"audio":{"tag":"voice-25-1","s":29,"d":2.5}},{"textKey":"DIALOGUE_EVE_23","face":1,"audio":{"tag":"voice-27-1","s":127,"d":5.5}},{"textKey":"DIALOGUE_EVE_24","face":3,"anim":2,"audio":{"tag":"voice-27-1","s":133,"d":4}},{"textKey":"DIALOGUE_EVE_25","face":0,"anim":4,"audio":{"tag":"voice-27-1","s":138,"d":2}},{"textKey":"DIALOGUE_EVE_26","face":0,"anim":4,"audio":{"tag":"voice-27-1","s":141,"d":7.5}},{"textKey":"DIALOGUE_EVE_27","face":3,"audio":{"tag":"voice-27-1","s":150,"d":6}},{"textKey":"DIALOGUE_EVE_28","face":0,"anim":2,"audio":{"tag":"voice-27-1","s":157,"d":7.5}},{"textKey":"DIALOGUE_EVE_29","face":2,"anim":2,"audio":{"tag":"voice-27-1","s":165,"d":6}},{"textKey":"DIALOGUE_EVE_30","face":2,"audio":{"tag":"voice-27-1","s":172,"d":5.5}},{"textKey":"DIALOGUE_EVE_31","face":3,"audio":{"tag":"voice-27-1","s":178,"d":4}},{"textKey":"DIALOGUE_EVE_32","face":2,"anim":2,"audio":{"tag":"voice-27-1","s":182,"d":7}},{"textKey":"DIALOGUE_EVE_33","face":3,"anim":2,"audio":{"tag":"voice-27-1","s":190,"d":7.5}},{"textKey":"DIALOGUE_EVE_34","face":4,"anim":2,"audio":{"tag":"voice-27-1","s":198,"d":2.5}},{"textKey":"DIALOGUE_EVE_35","face":2,"anim":4,"audio":{"tag":"voice-27-1","s":201,"d":8.5}},{"textKey":"DIALOGUE_EVE_36","face":2,"audio":{"tag":"voice-27-1","s":210,"d":8}},{"textKey":"DIALOGUE_EVE_37","face":3,"anim":2,"audio":{"tag":"voice-27-1","s":219,"d":8.5}},{"textKey":"DIALOGUE_EVE_38","face":0,"anim":4,"audio":{"tag":"voice-27-1","s":228,"d":2}},{"textKey":"DIALOGUE_EVE_39","face":0,"audio":{"tag":"voice-27-1","s":231,"d":3.5}},{"textKey":"DIALOGUE_EVE_40","face":3,"anim":2,"audio":{"tag":"voice-27-1","s":235,"d":10}},{"textKey":"DIALOGUE_EVE_41","face":3,"audio":{"tag":"voice-27-1","s":246,"d":5}},{"textKey":"DIALOGUE_EVE_42","face":4,"anim":2,"audio":{"tag":"voice-27-1","s":253,"d":6}},{"textKey":"DIALOGUE_EVE_43","face":4,"anim":2,"audio":{"tag":"voice-27-1","s":260,"d":2.5}},{"textKey":"DIALOGUE_EVE_44","face":0,"anim":4,"audio":{"tag":"voice-27-1","s":265,"d":3.5}},{"textKey":"DIALOGUE_EVE_45","face":0,"anim":2,"audio":{"tag":"voice-27-1","s":269,"d":4.5}}],"jim":[{"textKey":"DIALOGUE_JELLY_JIM_0","face":0,"anim":2,"audio":{"tag":"voice-26-1","s":0,"d":7.2}},{"textKey":"DIALOGUE_JELLY_JIM_1","face":1,"audio":{"tag":"voice-26-1","s":8,"d":9.2}},{"textKey":"DIALOGUE_JELLY_JIM_2","face":0,"audio":{"tag":"voice-26-1","s":18,"d":9.5}},{"textKey":"DIALOGUE_JELLY_JIM_3","face":1,"anim":2,"audio":{"tag":"voice-26-1","s":28,"d":4}},{"textKey":"DIALOGUE_JELLY_JIM_4","face":2,"anim":4,"audio":{"tag":"voice-26-1","s":33,"d":7.2}},{"textKey":"DIALOGUE_JELLY_JIM_5","face":0,"anim":2,"audio":{"tag":"voice-26-1","s":41,"d":5.7}},{"textKey":"DIALOGUE_JELLY_JIM_6","face":2,"anim":4,"audio":{"tag":"voice-26-1","s":47,"d":8.4}},{"textKey":"DIALOGUE_JELLY_JIM_7","face":2,"anim":4,"audio":{"tag":"voice-26-1","s":56,"d":10.3}}],"harvey":[{"textKey":"DIALOGUE_HARVEY_0","face":0,"anim":2,"audio":{"tag":"voice-29-1","s":0,"d":4}},{"textKey":"DIALOGUE_HARVEY_1","face":1,"audio":{"tag":"voice-29-1","s":5,"d":10}},{"textKey":"DIALOGUE_HARVEY_2","face":1,"audio":{"tag":"voice-29-1","s":16,"d":3}},{"textKey":"DIALOGUE_HARVEY_3","face":1,"anim":2,"audio":{"tag":"voice-29-1","s":20,"d":7}},{"textKey":"DIALOGUE_HARVEY_4","face":1,"anim":4,"audio":{"tag":"voice-29-1","s":28,"d":4}},{"textKey":"DIALOGUE_HARVEY_5","face":1}],"professor_scoog":[{"textKey":"DIALOGUE_PROFESSOR_SCOOG_0","face":1,"audio":{"tag":"voice-9","s":3,"d":2},"anim":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_1","face":0,"audio":{"tag":"voice-9","s":7,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_2","face":2,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_3","face":1,"audio":{"tag":"voice-9","s":0,"d":3}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_4","face":3},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_5","face":2,"audio":{"tag":"voice-9","s":9,"d":2},"anim":3},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_6","face":1},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_7","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_8","face":1,"audio":{"tag":"voice-9","s":3,"d":2},"anim":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_9","face":0,"audio":{"tag":"voice-9","s":11,"d":3}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_10","face":1,"anim":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_11","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_12","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_13","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_14","anim":1,"face":2,"audio":{"tag":"voice-9","s":5,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_15","anim":2,"face":1,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_16","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_17","face":3},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_18","face":1,"anim":3,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_19","anim":4,"face":1},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_20","face":1,"audio":{"tag":"voice-9","s":9,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_21","face":3},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_22","face":1,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_23","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_24","face":3,"anim":1},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_25","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_26","face":3,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_27","face":3,"anim":1,"audio":{"tag":"voice-9","s":5,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_28","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_29","face":0,"anim":4,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_30","face":3,"anim":1,"audio":{"tag":"voice-9","s":5,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_31","face":1,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_32","face":1},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_33","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_34","face":3},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_35","face":3,"audio":{"tag":"voice-9","s":9,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_36","face":0,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_37","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_38","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_39","face":1,"anim":2,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_40","face":3},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_41","face":3,"anim":1,"audio":{"tag":"voice-9","s":5,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_42","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_43","face":1,"anim":2,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_44","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_45","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_46","face":3,"anim":2,"audio":{"tag":"voice-9","s":5,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_47","face":3,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_48","face":3,"anim":2,"audio":{"tag":"voice-9","s":5,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_49","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_50","face":1},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_51","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_52","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_53","face":1,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_54","face":2,"audio":{"tag":"voice-9","s":9,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_55","face":3,"anim":4,"audio":{"tag":"voice-9","s":9,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_56","face":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_57","face":3,"anim":4},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_58","face":3,"anim":2},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_59","face":1,"anim":4,"audio":{"tag":"voice-9","s":3,"d":2}},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_60","face":1},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_61","face":0},{"textKey":"DIALOGUE_PROFESSOR_SCOOG_62","face":1,"anim":2,"audio":{"tag":"voice-9","s":11,"d":3}}],"don-zorro":[{"textKey":"DIALOGUE_DON_ZORRO_0","face":2},{"textKey":"DIALOGUE_DON_ZORRO_1","face":1},{"textKey":"DIALOGUE_DON_ZORRO_2","face":1},{"textKey":"DIALOGUE_DON_ZORRO_3","face":1},{"textKey":"DIALOGUE_DON_ZORRO_4","face":0},{"textKey":"DIALOGUE_DON_ZORRO_5","face":0},{"textKey":"DIALOGUE_DON_ZORRO_6","face":2},{"textKey":"DIALOGUE_DON_ZORRO_7","face":1},{"textKey":"DIALOGUE_DON_ZORRO_8","face":0},{"textKey":"DIALOGUE_DON_ZORRO_9","face":2},{"textKey":"DIALOGUE_DON_ZORRO_10","face":1},{"textKey":"DIALOGUE_DON_ZORRO_11","face":0},{"textKey":"DIALOGUE_DON_ZORRO_12","face":1},{"textKey":"DIALOGUE_DON_ZORRO_13","face":2},{"textKey":"DIALOGUE_DON_ZORRO_14","face":0}],"harriet":[{"textKey":"DIALOGUE_HARRIET_0","face":1},{"textKey":"DIALOGUE_HARRIET_1","face":0},{"textKey":"DIALOGUE_HARRIET_2","face":2},{"textKey":"DIALOGUE_HARRIET_3","face":0},{"textKey":"DIALOGUE_HARRIET_4","face":1},{"textKey":"DIALOGUE_HARRIET_5","face":0},{"textKey":"DIALOGUE_HARRIET_6","face":2},{"textKey":"DIALOGUE_HARRIET_7","face":1},{"textKey":"DIALOGUE_HARRIET_8","face":0},{"textKey":"DIALOGUE_HARRIET_9","face":2},{"textKey":"DIALOGUE_HARRIET_10","face":2},{"textKey":"DIALOGUE_HARRIET_11","face":1},{"textKey":"DIALOGUE_HARRIET_12","face":0}],"verna":[{"textKey":"DIALOGUE_VERNA_0","face":0},{"textKey":"DIALOGUE_VERNA_1","face":2},{"textKey":"DIALOGUE_VERNA_2","face":0},{"textKey":"DIALOGUE_VERNA_3","face":1}],"bargo-bunny":[{"textKey":"DIALOGUE_BARGO_0","face":0},{"textKey":"DIALOGUE_BARGO_1","face":1},{"textKey":"DIALOGUE_BARGO_2","face":3},{"textKey":"DIALOGUE_BARGO_3","face":1},{"textKey":"DIALOGUE_BARGO_4","face":2}],"gale":[{"textKey":"DIALOGUE_GALE_0","face":1,"anim":4,"audio":{"tag":"voice-30-1","s":0,"d":2}},{"textKey":"DIALOGUE_GALE_1","face":1,"anim":0,"audio":{"tag":"voice-30-1","s":3,"d":5}},{"textKey":"DIALOGUE_GALE_2","face":3,"anim":3,"audio":{"tag":"voice-30-1","s":9,"d":6}},{"textKey":"DIALOGUE_GALE_3","face":0,"anim":0,"audio":{"tag":"voice-30-1","s":16,"d":3}},{"textKey":"DIALOGUE_GALE_4","face":3,"anim":0,"audio":{"tag":"voice-30-1","s":20,"d":6}},{"textKey":"DIALOGUE_GALE_5","face":3,"anim":0,"audio":{"tag":"voice-30-1","s":27,"d":4}},{"textKey":"DIALOGUE_GALE_6","face":0,"anim":4,"audio":{"tag":"voice-30-1","s":32,"d":2}},{"textKey":"DIALOGUE_GALE_7","face":2,"anim":0,"audio":{"tag":"voice-30-1","s":35,"d":7}},{"textKey":"DIALOGUE_GALE_8","face":2,"anim":4,"audio":{"tag":"voice-30-1","s":43,"d":1}},{"textKey":"DIALOGUE_GALE_9","face":0,"anim":0,"audio":{"tag":"voice-30-1","s":45,"d":6}},{"textKey":"DIALOGUE_GALE_10","face":3,"anim":0,"audio":{"tag":"voice-30-1","s":52,"d":8}},{"textKey":"DIALOGUE_GALE_11","face":3,"anim":3,"audio":{"tag":"voice-30-1","s":61,"d":10}},{"textKey":"DIALOGUE_GALE_12","face":0,"anim":0,"audio":{"tag":"voice-30-1","s":72,"d":7}},{"textKey":"DIALOGUE_GALE_13","face":0,"anim":0,"audio":{"tag":"voice-30-1","s":80,"d":5}},{"textKey":"DIALOGUE_GALE_14","face":2,"anim":4,"audio":{"tag":"voice-30-1","s":86,"d":3}},{"textKey":"DIALOGUE_GALE_15","face":3},{"textKey":"DIALOGUE_GALE_16","face":0,"anim":2}],"florian":[{"textKey":"DIALOGUE_FLORIAN_0","face":0,"anim":0,"dimmed":true,"audio":{"tag":"voice-31-9","s":0,"d":2}},{"textKey":"DIALOGUE_FLORIAN_1","face":3,"anim":0,"dimmed":true,"audio":{"tag":"voice-31-9","s":2,"d":9.5}},{"textKey":"DIALOGUE_FLORIAN_2","face":3,"anim":0,"dimmed":true,"audio":{"tag":"voice-31-9","s":12,"d":7}},{"textKey":"DIALOGUE_FLORIAN_3","face":3,"anim":0,"dimmed":true,"audio":{"tag":"voice-31-9","s":20,"d":4}},{"textKey":"DIALOGUE_FLORIAN_4","face":0,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-9","s":24,"d":6.5}},{"textKey":"DIALOGUE_FLORIAN_5","face":1,"anim":0,"dimmed":true,"audio":{"tag":"voice-31-9","s":31,"d":3.5}},{"textKey":"DIALOGUE_FLORIAN_6","face":0,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-1","s":0,"d":4.5}},{"textKey":"DIALOGUE_FLORIAN_7","face":3,"anim":3,"dimmed":true,"audio":{"tag":"voice-31-1","s":5,"d":4.5}},{"textKey":"DIALOGUE_FLORIAN_8","face":1,"anim":4,"dimmed":true,"audio":{"tag":"voice-31-1","s":10,"d":1}},{"textKey":"DIALOGUE_FLORIAN_9","face":2,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-2","s":0,"d":3}},{"textKey":"DIALOGUE_FLORIAN_10","face":1,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-3","s":0,"d":9}},{"textKey":"DIALOGUE_FLORIAN_11","face":2,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-4","s":0,"d":7}},{"textKey":"DIALOGUE_FLORIAN_12","face":1,"anim":4,"dimmed":true,"audio":{"tag":"voice-31-5","s":0,"d":4.5}},{"textKey":"DIALOGUE_FLORIAN_13","face":3,"anim":1,"dimmed":true,"audio":{"tag":"voice-31-6","s":0,"d":7}},{"textKey":"DIALOGUE_FLORIAN_14","face":3,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-7","s":0,"d":8}},{"textKey":"DIALOGUE_FLORIAN_15","face":0,"anim":2,"dimmed":true,"audio":{"tag":"voice-31-8","s":0,"d":7.5}},{"textKey":"DIALOGUE_FLORIAN_16","face":0,"anim":0,"audio":{"tag":"voice-31-10","s":0,"d":6}},{"textKey":"DIALOGUE_FLORIAN_17","face":3,"anim":1,"audio":{"tag":"voice-31-10","s":6,"d":7}},{"textKey":"DIALOGUE_FLORIAN_18","face":3,"audio":{"tag":"voice-31-10","s":13,"d":9}},{"textKey":"DIALOGUE_FLORIAN_19","face":1,"anim":2,"audio":{"tag":"voice-31-10","s":22,"d":9}},{"textKey":"DIALOGUE_FLORIAN_20","face":0,"anim":2,"audio":{"tag":"voice-31-10","s":32,"d":3}},{"textKey":"DIALOGUE_FLORIAN_21","face":0,"audio":{"tag":"voice-31-10","s":35,"d":4}},{"textKey":"DIALOGUE_FLORIAN_22","face":1,"anim":2,"audio":{"tag":"voice-31-10","s":39,"d":7}},{"textKey":"DIALOGUE_FLORIAN_23","face":0,"anim":2,"audio":{"tag":"voice-31-10","s":53,"d":6}},{"textKey":"DIALOGUE_FLORIAN_24","face":1,"anim":2,"audio":{"tag":"voice-31-10","s":60,"d":2}},{"textKey":"DIALOGUE_FLORIAN_25","face":2,"anim":0,"audio":{"tag":"voice-10-87","s":102,"d":3}},{"textKey":"DIALOGUE_FLORIAN_26","face":2,"anim":0,"audio":{"tag":"voice-31-11","s":0,"d":4.5}}]}')},34500:k=>{"use strict";k.exports=JSON.parse('{"stand":{"loop":true,"head":{"y":{"interval":30,"frames":[0,-0.2,-0.4,-0.6,-0.8,-1,-1.2,-1.4,-1.6,-1.8,-2,-2.2,-2.4,-2.6,-2.8,-3,-2.8,-2.6,-2.4,-2.2,-2,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.3,-0.15]},"x":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"legs":{"frameName":{"interval":10000,"frames":[0]},"y":{"interval":10000,"frames":[0]},"x":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":30,"frames":[0,-0.15,-0.3,-0.45,-0.6,-0.75,-0.9,-1.05,-1.2,-1.35,-1.5,-1.65,-1.8,-1.95,-2.1,-2.25,-2.4,-2.4,-2.2,-2,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.3,-0.2,-0.1]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"leftArm":{"y":{"interval":30,"frames":[0,-0.25,-0.5,-0.75,-1,-1.25,-1.5,-1.75,-2,-2.25,-2.5,-2.75,-3,-3.25,-3.5,-3.75,-3.75,-3.5,-3.25,-3,-2.75,-2.5,-2.25,-2,-1.75,-1.5,-1.25,-1,-0.75,-0.5,-0.25]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"y":{"interval":30,"frames":[0,-0.25,-0.5,-0.75,-1,-1.25,-1.5,-1.75,-2,-2.25,-2.5,-2.75,-3,-3.25,-3.5,-3.75,-3.75,-3.5,-3.25,-3,-2.75,-2.5,-2.25,-2,-1.75,-1.5,-1.25,-1,-0.75,-0.5,-0.25]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"weapon":{"x":{"interval":93,"frames":[0,-0.1,-0.2,-0.3,-0.4,-0.5,-0.4,-0.3,-0.2,-0.1]},"y":{"interval":30,"frames":[0,-0.35,-0.7,-1.05,-1.4,-1.75,-2.1,-2.45,-2.8,-3.15,-3.5,-3.85,-4.2,-4.55,-4.9,-5.25,-5.25,-4.9,-4.55,-4.2,-3.85,-3.5,-3.15,-2.8,-2.45,-2.1,-1.75,-1.4,-1.05,-0.7,-0.35]},"angle":{"interval":10000,"frames":[0]}},"transformedObject":{"y":{"interval":30,"frames":[0,-0.15,-0.3,-0.45,-0.6,-0.75,-0.9,-1.05,-1.2,-1.35,-1.5,-1.65,-1.8,-1.95,-2.1,-2.25,-2.4,-2.4,-2.2,-2,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.3,-0.2,-0.1]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}}},"standFloat":{"loop":true,"head":{"y":{"interval":30,"frames":[0,-0.2,-0.4,-0.6,-0.8,-1,-1.2,-1.4,-1.6,-1.8,-2,-2.2,-2.4,-2.6,-2.8,-3,-2.8,-2.6,-2.4,-2.2,-2,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.3,-0.15]},"x":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"legs":{"frameName":{"interval":10000,"frames":[3]},"y":{"interval":30,"frames":[0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,0.9,0.85,0.8,0.75,0.7,0.65,0.6,0.55,0.5,0.45,0.4,0.35,0.3,0.25,0.2,0.15,0.1,0.05,0,-0.05,-0.05]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":30,"frames":[0,-0.15,-0.3,-0.45,-0.6,-0.75,-0.9,-1.05,-1.2,-1.35,-1.5,-1.65,-1.8,-1.95,-2.1,-2.25,-2.4,-2.4,-2.2,-2,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.3,-0.2,-0.1]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"leftArm":{"y":{"interval":30,"frames":[0,-0.25,-0.5,-0.75,-1,-1.25,-1.5,-1.75,-2,-2.25,-2.5,-2.75,-3,-3.25,-3.5,-3.75,-3.75,-3.5,-3.25,-3,-2.75,-2.5,-2.25,-2,-1.75,-1.5,-1.25,-1,-0.75,-0.5,-0.25]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"y":{"interval":30,"frames":[0,-0.25,-0.5,-0.75,-1,-1.25,-1.5,-1.75,-2,-2.25,-2.5,-2.75,-3,-3.25,-3.5,-3.75,-3.75,-3.5,-3.25,-3,-2.75,-2.5,-2.25,-2,-1.75,-1.5,-1.25,-1,-0.75,-0.5,-0.25]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"weapon":{"x":{"interval":93,"frames":[0,-0.1,-0.2,-0.3,-0.4,-0.5,-0.4,-0.3,-0.2,-0.1]},"y":{"interval":30,"frames":[0,-0.35,-0.7,-1.05,-1.4,-1.75,-2.1,-2.45,-2.8,-3.15,-3.5,-3.85,-4.2,-4.55,-4.9,-5.25,-5.25,-4.9,-4.55,-4.2,-3.85,-3.5,-3.15,-2.8,-2.45,-2.1,-1.75,-1.4,-1.05,-0.7,-0.35]},"angle":{"interval":10000,"frames":[0]}}},"walk":{"loop":true,"head":{"y":{"interval":30,"frames":[0,-1,-2,-2.6,-2.4,-2.2,-2,-1.8,-0.5,0.2,1.2,1.4,1.5,1.6]},"x":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":30,"frames":[0,-0.4,-0.8,-1,-1.2,-1.5,-1.5,-1.6,-0.6,0.6,1.6,1.5,1.4,1.3]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"leftArm":{"y":{"interval":30,"frames":[0,-0.6,-1.3,-1.7,-2,-2.5,-2.4,-2.3,-1,0.2,1.5,1.7,1.9,2]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"y":{"interval":30,"frames":[0,-0.6,-1.3,-1.7,-2,-2.5,-2.4,-2.3,-1,0.2,1.5,1.7,1.9,2]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"weapon":{"y":{"interval":30,"frames":[0,-0.7,-1.4,-1.9,-2.4,-2.8,-2.8,-2.7,-1.4,-0.1,1.2,1.3,1.4,1.5]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"legs":{"frameName":{"interval":80,"frames":[1,2,3,4]},"y":{"interval":10000,"frames":[0]},"x":{"interval":10000,"frames":[0]}},"transformedObject":{"y":{"interval":30,"frames":[0,-2.4,-4.8,-6,-7.2,-9,-9,-9.6,-3.6,1.8,9.6,9,8.4,7.8]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}}},"walkmale":{"loop":true,"head":{"y":{"interval":30,"frames":[0,-1,-2,-2.6,-2.4,-2.2,-2,-1.8,-0.5,0.2,1.2,1.4,1.5,1.6]},"x":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":30,"frames":[0,-0.4,-0.8,-1,-1.2,-1.5,-1.5,-1.6,-0.6,0.6,1.6,1.5,1.4,1.3]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"leftArm":{"y":{"interval":30,"frames":[0,-0.6,-1.3,-1.7,-2,-2.5,-2.4,-2.3,-1,0.2,1.5,1.7,1.9,2]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"y":{"interval":30,"frames":[0,-0.6,-1.3,-1.7,-2,-2.5,-2.4,-2.3,-1,0.2,1.5,1.7,1.9,2]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"weapon":{"y":{"interval":30,"frames":[0,-0.7,-1.4,-1.9,-2.4,-2.8,-2.8,-2.7,-1.4,-0.1,1.2,1.3,1.4,1.5]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"legs":{"frameName":{"interval":80,"frames":[1,2,3,4]},"y":{"interval":10000,"frames":[2]},"x":{"interval":10000,"frames":[0]}},"transformedObject":{"y":{"interval":30,"frames":[0,-2.4,-4.8,-6,-7.2,-9,-9,-9.6,-3.6,1.8,9.6,9,8.4,7.8]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}}},"walkfemale":{"loop":true,"head":{"y":{"interval":30,"frames":[0,-1,-2,-2.6,-2.4,-2.2,-2,-1.8,-0.5,0.2,1.2,1.4,1.5,1.6]},"x":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":30,"frames":[0,-0.4,-0.8,-1,-1.2,-1.5,-1.5,-1.6,-0.6,0.6,1.6,1.5,1.4,1.3]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"leftArm":{"y":{"interval":30,"frames":[0,-0.6,-1.3,-1.7,-2,-2.5,-2.4,-2.3,-1,0.2,1.5,1.7,1.9,2]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"y":{"interval":30,"frames":[0,-0.6,-1.3,-1.7,-2,-2.5,-2.4,-2.3,-1,0.2,1.5,1.7,1.9,2]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"weapon":{"y":{"interval":30,"frames":[0,-0.7,-1.4,-1.9,-2.4,-2.8,-2.8,-2.7,-1.4,-0.1,1.2,1.3,1.4,1.5]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"legs":{"frameName":{"interval":80,"frames":[1,2,3,4]},"y":{"interval":10000,"frames":[4]},"x":{"interval":10000,"frames":[0]}},"transformedObject":{"y":{"interval":30,"frames":[0,-2.4,-4.8,-6,-7.2,-9,-9,-9.6,-3.6,1.8,9.6,9,8.4,7.8]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}}},"walkFloat":{"loop":true,"head":{"y":{"interval":30,"frames":[-0.4,0,0.5,1,1.4,1.9,2.3,2.1,2,1.8,1.2,0.6,0.4,0.2,0,0,-0.1,-0.2]},"x":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":30,"frames":[1.3,1.5,1.7,1.9,2,2.2,2.4,2.5,2.7,2.9,2.6,2.3,1.9,1.6,1.3,1.2,1.1,1]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"leftArm":{"y":{"interval":30,"frames":[1.3,1.5,1.7,1.9,2,2.2,2.4,2.5,2.7,2.9,2.6,2.3,1.9,1.6,1.3,1.2,1.1,1]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"y":{"interval":30,"frames":[1.3,1.5,1.7,1.9,2,2.2,2.4,2.5,2.7,2.9,2.6,2.3,1.9,1.6,1.3,1.2,1.1,1]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"weapon":{"y":{"interval":30,"frames":[1.3,1.5,1.7,1.9,2,2.2,2.4,2.5,2.7,2.9,2.6,2.3,1.9,1.6,1.3,1.2,1.1,1]},"angle":{"interval":10000,"frames":[0]}},"legs":{"y":{"interval":30,"frames":[0,-0.3,-0.6,-0.9,-1.2,-1.5,-1.8,-2.1,-1.9,-1.7,-1.5,-1.3,-1.1,-0.9,-0.7,-0.5,-0.3,-0.1]},"x":{"interval":10000,"frames":[0]},"frameName":{"interval":10000,"frames":[3]},"angle":{"interval":10000,"frames":[15]}}},"dig":{"loop":false,"head":{"x":{"interval":30,"frames":[-4.4,-1,2.2,5.6,5.4,5.2,5,4.9,4.7,4.5,4.4,4.2,4,3.9,3.8,3.6,2.8,1.4,0.6,-0.1,-0.9,-1.6,-2.4,-3.1,0]},"y":{"interval":30,"frames":[0.4,0.2,0.9,1.6,1.5,1.4,1.3,1.2,1,1,0.9,0.8,0.8,0.8,0.8,0.8,0.6,0.2,0,-0.2,-0.4,-0.6,-0.8,-1,0]},"angle":{"interval":30,"frames":[-4,0,2,6,10,9,9,9,9,9,9,9,9,9,9,9,8,6,5,4,3,2,1,0,0]}},"shirt":{"angle":{"interval":30,"frames":[0,5,11,17,16,16,15,15,15,14,14,14,13,13,13,12,11,10,9,8,7,6,4,2,0]},"x":{"interval":30,"frames":[0,0.9,1.8,2.7,2.5,2.5,2.4,2.2,2.1,2,1.9,1.8,1.7,1.6,1.5,1.4,1.2,1.1,1,0.9,0.8,0.7,0.6,0.4,0]},"y":{"interval":30,"frames":[0,0.5,1,1.5,1.5,1.4,1.3,1.3,1.2,1.1,1,1,0.9,0.8,0.8,0.7,0.6,0.5,0.5,0.4,0.3,0.3,0.2,0.1,0]}},"rightArm":{"angle":{"interval":30,"frames":[0,11,22,34,40,45,42,38,35,32,29,25,22,19,15,12,8,4,0,-4,-8,-12,-16,-20,-24]},"x":{"interval":30,"frames":[0,2.4,4.9,7.4,7,6.8,6.5,6.2,5.9,5.7,5.4,5.1,4.8,4.6,4.3,4,3.5,3.1,2.7,2.3,1.8,1.4,1,0.6,0.2]}},"leftArm":{"angle":{"interval":30,"frames":[0,5,10,15,15,20,18,16,16,15,13,12,10,9,6,3,0,-4,-7,-11,-14,-18,-22,-25,-29]},"x":{"interval":30,"frames":[0,2.4,4.6,6.8,6.6,6.4,6.2,6,5.8,5.6,5.4,5.2,5,4.9,4.7,4.5,4,3.7,3.3,2.9,2.6,2.2,1.7,1.4,0.9]},"y":{"interval":30,"frames":[0,1.2,2.4,3.9,3.7,3.6,3.5,3.3,3.2,3,2.9,2.8,2.6,2.5,2.4,2.3,2,1.8,1.5,1.3,1.1,0.9,0.7,0.5,0.2]}},"legs":{"frameName":{"interval":10000,"frames":[1]},"y":{"interval":10000,"frames":[0]}},"weapon":{"x":{"interval":30,"frames":[-25.2,-24.5,-23.8,-22.9,-23.5,-24.8,-24.6,-24.3,-24.2,-24,-23.8,-23.7,-23.5,-22.8,-22.1,-21.5,-20.9,-20.2,-19.6,-18.9,-18.3,-17.7,-17.1,-16.6,-16.2]},"y":{"interval":30,"frames":[0.4,0.1,-0.6,-1.3,-1.4,-3.4,-3.1,-2.8,-2.6,-2.3,-2,-1.8,-1.6,-1.4,-1,-0.6,-0.2,0,0.3,0.4,0.4,0.4,0.2,0,0,-0.5]},"angle":{"interval":30,"frames":[45,46,60,67,68,75,74,73,72,70,69,68,67,66,64,61,59,55,53,50,47,43,41,38,35,33]}}},"attack":{"loop":false,"head":{"y":{"interval":30,"frames":[0,-0.1,-0.1,-0.2,-0.2,-0.3,0.3,0.8,1.4,2.6,0,-2.7,-5.4,-8,-10.7,-13.5,-16.1,-18.8,-21.5,-24.2,-26,-28,-24.8,-21.5,-18.3,-15,-11.8,-8.6,-5.4,-2,1.5,2,2,1.8,1,0,-0.4,-0.8,-0.6,-0.4,-0.2,0,0,0,0,0,0,0,0,0]}},"shirt":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"legs":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0,0,0,0,0,-2.2,-4.4,-6.6,-8.7,-10.9,-13.1,-15.3,-17.5,-19.7,-21.9,-24.1,-26.27,-23.3,-20.3,-17.4,-14.4,-11.5,-8.5,-5.5,-2.6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"frameName":{"interval":30,"frames":[0,0,0,0,0,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},"rightArm":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"angle":{"interval":30,"frames":[0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,28,36,44,52,60,68,76,84,92,100,93,86,79,72,65,58,51,44,37,30,23,16,8,0,0,0,0,0,0,0,0,0,0,0]}},"leftArm":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"angle":{"interval":30,"frames":[0,0,0,0,0,0,0,-8,-16,-24,-32,-40,-48,-56,-64,-72,-80,-85,-90,-95,-100,-104,-107,-97,-87,-77,-67,-57,-47,-37,-27,-17,-7,-5,-3,-2,-1,0,0,0,0,0,0,0,0,0,0,0,0,0]}},"weapon":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.9,0.2,-0.7,-1,8,-3,-7.7,-12.4,-17.13,-21.9,-26.6,-31.3,-35.8,-40.3,-44.5,-48.6,-48.3,-47.7,-41.6,-35.3,-28.9,-22.6,-16.5,-12.8,-9.1,-5.5,-1.8,0,-0.2,-0.6,-1,-1.4,-1.8,-2.3,-2.6,-3,-2.9,-2.8,-2.4,-2,-1.5,-1,-0.5,0]},"x":{"interval":30,"frames":[0,0,0,0,0,0,1.5,3,4.2,5.2,5.9,6.4,6.5,6.4,6,5.4,4.5,3.3,1.9,0.4,2.7,4.5,5.7,6.4,6.5,5.8,4.7,4.5,4.2,3.9,3.6,3.6,3.5,3.5,3.5,3.4,3.4,3.3,3.3,3.3,3.2,3.2,3.1,2.9,2.5,2,1.5,1,0.5,0]},"angle":{"interval":30,"frames":[0,0,0,0,0,0,-8,-15,-23,-31,-37,-46,-54,-62,-69,-77,-84,-92,-100,-73,-58,-43,-28,-13,2,17,32,37,43,48,53,58,55,52,49,45,42,38,35,32,29,25,22,18,15,12,9,6,3,0]}},"transformedObject":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}}},"attackFloat":{"loop":false,"head":{"y":{"interval":30,"frames":[0,-0.1,-0.1,-0.2,-0.2,-0.3,0.3,0.8,1.4,2.6,0,-2.7,-5.4,-8,-10.7,-13.5,-16.1,-18.8,-21.5,-24.2,-26,-28,-24.8,-21.5,-18.3,-15,-11.8,-8.6,-5.4,-2,1.5,2,2,1.8,1,0,-0.4,-0.8,-0.6,-0.4,-0.2,0,0,0,0,0,0,0,0,0]}},"shirt":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"legs":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0,0,0,0,0,-2.2,-4.4,-6.6,-8.7,-10.9,-13.1,-15.3,-17.5,-19.7,-21.9,-24.1,-26.27,-23.3,-20.3,-17.4,-14.4,-11.5,-8.5,-5.5,-2.6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"frameName":{"interval":10000,"frames":[3]},"angle":{"interval":30,"frames":[0,0,0,0,-1,-2,-3,-5,-8,-10,-12,-14,-16,-18,-20,-22,-24,-24,-24,-24,-24,-24,-24,-24,-24,-24,-23,-22,-21,-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0]}},"rightArm":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"angle":{"interval":30,"frames":[0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,28,36,44,52,60,68,76,84,92,100,93,86,79,72,65,58,51,44,37,30,23,16,8,0,0,0,0,0,0,0,0,0,0,0]}},"leftArm":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"angle":{"interval":30,"frames":[0,0,0,0,0,0,0,-8,-16,-24,-32,-40,-48,-56,-64,-72,-80,-85,-90,-95,-100,-104,-107,-97,-87,-77,-67,-57,-47,-37,-27,-17,-7,-5,-3,-2,-1,0,0,0,0,0,0,0,0,0,0,0,0,0]}},"weapon":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.9,0.2,-0.7,-1,8,-3,-7.7,-12.4,-17.13,-21.9,-26.6,-31.3,-35.8,-40.3,-44.5,-48.6,-48.3,-47.7,-41.6,-35.3,-28.9,-22.6,-16.5,-12.8,-9.1,-5.5,-1.8,0,-0.2,-0.6,-1,-1.4,-1.8,-2.3,-2.6,-3,-2.9,-2.8,-2.4,-2,-1.5,-1,-0.5,0]},"x":{"interval":30,"frames":[0,0,0,0,0,0,1.5,3,4.2,5.2,5.9,6.4,6.5,6.4,6,5.4,4.5,3.3,1.9,0.4,2.7,4.5,5.7,6.4,6.5,5.8,4.7,4.5,4.2,3.9,3.6,3.6,3.5,3.5,3.5,3.4,3.4,3.3,3.3,3.3,3.2,3.2,3.1,2.9,2.5,2,1.5,1,0.5,0]},"angle":{"interval":30,"frames":[0,0,0,0,0,0,-8,-15,-23,-31,-37,-46,-54,-62,-69,-77,-84,-92,-100,-73,-58,-43,-28,-13,2,17,32,37,43,48,53,58,55,52,49,45,42,38,35,32,29,25,22,18,15,12,9,6,3,0]}}},"attackBig":{"loop":false,"head":{"y":{"interval":30,"frames":[0,-0.1,-0.1,-0.2,-0.2,-0.3,0.3,0.8,1.4,2.6,0,-2.7,-5.4,-8,-10.7,-13.5,-16.1,-18.8,-21.5,-24.2,-26,-28,-24.8,-21.5,-18.3,-15,-11.8,-8.6,-5.4,-2,1.5,2,2,1.8,1,0,-0.4,-0.8,-0.6,-0.4,-0.2,0,0,0,0,0,0,0,0,0]}},"shirt":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"x":{"interval":10000,"frames":[0]},"angle":{"interval":10000,"frames":[0]}},"legs":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0,0,0,0,0,-2.2,-4.4,-6.6,-8.7,-10.9,-13.1,-15.3,-17.5,-19.7,-21.9,-24.1,-26.27,-23.3,-20.3,-17.4,-14.4,-11.5,-8.5,-5.5,-2.6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},"frameName":{"interval":30,"frames":[0,0,0,0,0,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},"rightArm":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"angle":{"interval":30,"frames":[0,1,2,3,4,5,6,7,8,9,10,12,14,16,18,20,28,36,44,52,60,68,76,84,92,100,93,86,79,72,65,58,51,44,37,30,23,16,8,0,0,0,0,0,0,0,0,0,0,0]}},"leftArm":{"y":{"interval":30,"frames":[0,0,0,0,0,0,0.6,1.2,1.8,2.4,3,0.3,-2.3,-5,-7.7,-10.4,-13,-15.8,-18.4,-21.1,-23.8,-25.7,-27.6,-24.4,-21.1,-17.9,-14.7,-11.5,-8.2,-5,-1.5,1.4,1.7,1.2,0.8,0.4,0.3,0.2,0.1,0,-0.1,-0.2,-0.3,-0.3,-0.2,-0.2,-0.1,-0.1,0,0]},"angle":{"interval":30,"frames":[0,0,0,0,0,0,0,-8,-16,-24,-32,-40,-48,-56,-64,-72,-80,-85,-90,-95,-100,-104,-107,-97,-87,-77,-67,-57,-47,-37,-27,-17,-7,-5,-3,-2,-1,0,0,0,0,0,0,0,0,0,0,0,0,0]}},"weapon":{"angle":{"interval":30,"frames":[23,24,26,27,29,30,32,33,25,16,8,0,-8,-16,-25,-33,-29,-26,-20,-15,-9,-3,3,8.5,14,22,26,31,36,40,43,43,44,45,45,46,47,48,49,47,45,43,42,40,41,42,42,43,44,45]},"x":{"interval":30,"frames":[-26.1,-27.6,-29.2,-31,-32.7,-34.6,-36.6,-38.6,-35,-31.6,-28.7,-26.6,-25.1,-24,-23.5,-23.5,-23.5,-23.5,-23,-22.4,-22,-22,-21.4,-21.4,-21.7,-22.2,-24.1,-26,-28,-30.3,-32.7,-32,-33,-33,-33,-34,-34,-34.3,-34.6,-36.5,-38.5,-40.4,-42.3,-44.2,-38.2,-32.3,-27,-21,-16,-6]},"y":{"interval":30,"frames":[13.5,14.6,15.7,16.6,17.4,18,18.5,18.8,19.8,19.8,19.1,17,14.7,5.2,-4.2,-13.4,-21.5,-29.6,-36,-42.2,-37,-31.6,-26,-19.9,-13.6,-7.1,-2,3,8,12,15.8,15.2,15,15,15,15,15,14.7,14.6,14.5,14.3,14,14,13.4,15.2,16,16,15,15,12.4]}}},"moonwalkfemale":{"loop":true,"rightArm":{"x":{"interval":40,"frames":[0,0.5,1,1.4,1.9,1.5,1,0.5,0,0.4,0.9,1.4,1.9,1.5,1,0.5,0,0.4,0.9,1.4,2,1.5,1,0.5,0,0.4,0.9,1.5,2,1.5,1,0.5,0,0.4,1,1.5,2.1,1.6,1,0.4,-0.2,0.4,1,1.6,2.3,1.6,0.8,0,-0.9]},"y":{"interval":40,"frames":[0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0]}},"character":{"x":{"interval":40,"frames":[0,-1.2,-2.4,-3.6,-4.8,-6,-7.2,-8.4,-9.6,-11.2,-12.4,-13.6,-14.8,-16,-17.2,-18.4,-19.6,-21.2,-22.4,-23.6,-24.8,-26,-27.2,-28.4,-29.6,-28.8,-27.6,-26.4,-25.2,-24,-22.8,-21.6,-20.4,-18.8,-17.6,-16.4,-15.2,-14,-12.8,-11.6,-10.4,-8.8,-7.6,-6.4,-5.2,-4,-2.8,-1.6,-0.4]},"xScale":{"interval":40,"frames":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]}},"head":{"y":{"interval":40,"frames":[0,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]},"x":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":40,"frames":[0,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,-2]}},"leftArm":{"x":{"interval":40,"frames":[0,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1]},"y":{"interval":40,"frames":[0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0]}},"legs":{"frameName":{"interval":40,"frames":[3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4]}}},"moonwalkmale":{"loop":true,"rightArm":{"x":{"interval":40,"frames":[0,0.5,1,1.4,1.9,1.5,1,0.5,0,0.4,0.9,1.4,1.9,1.5,1,0.5,0,0.4,0.9,1.4,2,1.5,1,0.5,0,0.4,0.9,1.5,2,1.5,1,0.5,0,0.4,1,1.5,2.1,1.6,1,0.4,-0.2,0.4,1,1.6,2.3,1.6,0.8,0,-0.9]},"y":{"interval":40,"frames":[0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0]}},"character":{"x":{"interval":40,"frames":[0,-1.2,-2.4,-3.6,-4.8,-6,-7.2,-8.4,-9.6,-11.2,-12.4,-13.6,-14.8,-16,-17.2,-18.4,-19.6,-21.2,-22.4,-23.6,-24.8,-26,-27.2,-28.4,-29.6,-28.8,-27.6,-26.4,-25.2,-24,-22.8,-21.6,-20.4,-18.8,-17.6,-16.4,-15.2,-14,-12.8,-11.6,-10.4,-8.8,-7.6,-6.4,-5.2,-4,-2.8,-1.6,-0.4]},"xScale":{"interval":40,"frames":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]}},"head":{"y":{"interval":40,"frames":[0,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1,-0.5,-1,-1.4,-1.9,-1.5,-1,-0.6,-0.1]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]},"x":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":40,"frames":[0,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,0,0,0,0,-2,-2,-2,-2,-2]}},"leftArm":{"x":{"interval":40,"frames":[0,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1]},"y":{"interval":40,"frames":[0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0]}},"legs":{"frameName":{"interval":40,"frames":[0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4]}}},"runningMan":{"loop":true,"character":{"x":{"interval":40,"frames":[0,0,2.67,2.67,4.67,4.67,6.67,8.67,8.67,8.67,8.67,8.67,7.67,6.67,5.67,4.67,2.67,2.67,0,0,0,0]}},"leftArm":{"x":{"interval":10000,"frames":[-1.31]},"y":{"interval":10000,"frames":[1.52]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":40,"frames":[-18.45,-13.9,-9.4,-4.8,-0.3,-2.4,-5.3,-8.1,-10.9,-13.7,-16.5,-27.2,-36,-44.7,-53.5,-62.3,-59.3,-49.1,-38.9,-28.7]}},"rightArm":{"x":{"interval":10000,"frames":[-1]},"y":{"interval":10000,"frames":[-1]},"angle":{"interval":40,"frames":[0.39,-5.4,-11.3,-17.1,-23,-28.8,-26.8,-20,-13.2,-6.4,13.8,27.2,40.6,54,67.3,62.8,47.2,31.6,16,8]}},"head":{"y":{"interval":40,"frames":[-2,-1.5,-1.1,-0.6,-0.2,0.3,0.7,0.3,-0.4,-1.2,-1.9,-1.6,-1.1,-0.7,-0.2,0.2,0.7,0.3,-0.4,-1.2,-1.9]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]},"x":{"interval":10000,"frames":[0]}},"shirt":{"y":{"interval":40,"frames":[-2,-1.7,-1.4,-1.1,-0.8,-0.5,-0.2,-0.5,-1,-1.4,-1.9,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-1.2,-1.8,-2.3,-2.9]}},"legs":{"frameName":{"interval":40,"frames":[1,1,2,2,2,2,3,3,3,4,4,1,1,2,2,2,3,3,3,3,4,4]}}},"hammermale":{"loop":true,"character":{"x":{"interval":40,"frames":[0,0.4,0.7,1.1,1.4,1.8,2.2,2.5,2.9,3.9,4.8,5.7,6.9,7.8,8.7,9.9,10.8,11.7,12.9,13.8,14.7,15.9,16.8,17.7,17.4,16.8,16.2,15.6,14.1,13.2,12.3,11.1,10.2,9.3,8.1,7.2,6.3,5.1,4.2,3.3,2.1,1.2,0.3,0,0,0]},"y":{"interval":10000,"frames":[0]}},"head":{"x":{"interval":40,"frames":[0,0.4,0.8,1.6,2.4,2.8,2.4,1.6,1.2,0.4,-0.4,-0.8,-1.6,-2.4,-2.8,-2.4,-1.6,-1.2,-0.4,0.4,0.8,1.6,2.4,2.8,2.4,1.6,1.2,0.4,-0.4,-0.8,-1.6,-2.4,-2.8,-2.4,-1.6,-1.2,-0.4]},"y":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"x":{"interval":40,"frames":[0,0.2,0.3,0.5,0.6,0.8,1,1.1,1.3,1.4,1.6,1.8,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1]},"y":{"interval":40,"frames":[0,0,0,0,0,0,0,0,0,-0.1,-0.1,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0]},"angle":{"interval":40,"frames":[0,8.7,17.4,26,34.7,43.4,52.1,60.7,69.4,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,54.9,37.6,20.3,3]}},"leftArm":{"x":{"interval":40,"frames":[0,0.2,0.3,0.5,0.6,0.8,1,1.1,1.3,1.4,1.6,1.8,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-6.9,-13.8,-20.6,-27.5,-34.4,-41.3,-48.2,-55,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-43.6,-29.8,-16.1,-2.4]}},"legs":{"frameName":{"interval":40,"frames":[2,2,2,2,2,0,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,2,2,2,2,0,0,0,0,0,2,2,2,0,0,0,2,2,2,2,0,0,0,2,2,2,0,0,0,0]}}},"hammerfemale":{"loop":true,"character":{"x":{"interval":40,"frames":[0,0.4,0.7,1.1,1.4,1.8,2.2,2.5,2.9,3.9,4.8,5.7,6.9,7.8,8.7,9.9,10.8,11.7,12.9,13.8,14.7,15.9,16.8,17.7,17.4,16.8,16.2,15.6,14.1,13.2,12.3,11.1,10.2,9.3,8.1,7.2,6.3,5.1,4.2,3.3,2.1,1.2,0.3,0,0,0]},"y":{"interval":10000,"frames":[0]}},"head":{"x":{"interval":40,"frames":[0,0.4,0.8,1.6,2.4,2.8,2.4,1.6,1.2,0.4,-0.4,-0.8,-1.6,-2.4,-2.8,-2.4,-1.6,-1.2,-0.4,0.4,0.8,1.6,2.4,2.8,2.4,1.6,1.2,0.4,-0.4,-0.8,-1.6,-2.4,-2.8,-2.4,-1.6,-1.2,-0.4]},"y":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]},"angle":{"interval":10000,"frames":[0]}},"rightArm":{"x":{"interval":40,"frames":[0,0.2,0.3,0.5,0.6,0.8,1,1.1,1.3,1.4,1.6,1.8,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1]},"y":{"interval":40,"frames":[0,0,0,0,0,0,0,0,0,-0.1,-0.1,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0,0,0,-0.1,-0.1,-0.1,0,0,0]},"angle":{"interval":40,"frames":[0,8.7,17.4,26,34.7,43.4,52.1,60.7,69.4,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,72.2,54.9,37.6,20.3,3]}},"leftArm":{"x":{"interval":40,"frames":[0,0.2,0.3,0.5,0.6,0.8,1,1.1,1.3,1.4,1.6,1.8,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1,0.5,1,1.4,1.9,1.5,1,0.6,0.1]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-6.9,-13.8,-20.6,-27.5,-34.4,-41.3,-48.2,-55,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-57.3,-43.6,-29.8,-16.1,-2.4]}},"legs":{"frameName":{"interval":40,"frames":[1,1,1,1,1,1,3,3,3,4,4,4,3,3,3,3,4,4,4,3,3,3,4,4,4,4,1,1,1,1,1,3,3,3,4,4,4,3,3,3,3,4,4,4,3,3,3,4,4,4,4]}}},"shimmy":{"loop":true,"rightArm":{"x":{"interval":10000,"frames":[0]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0.13,-17,-34.2,-51.4,-68.5,-103,-120.4,-118.4,-107.8,-97.1,-86.5,-93.9,-111.9,-129.9,-118.2,-100.6,-83.1,-68.4,-59.5,-50.6,-41.7,-51.9,-63.6,-75.3,-68.8,-58.5,-48.2,-37.9,-43,-58.4,-73.8,-64.6,-50,-35.4,-41.8,-53,-64.2,-75.3,-72.4,-67.5,-62.6,-57.7,-52.9,-48,-43.1,-38.2,-33.3,-28.5,-23.6,-18.7,-13.8,-8.9,-4]}},"leftArm":{"x":{"interval":10000,"frames":[0]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-10.3,-20.6,-30.8,-41.1,-56.6,-61.8,-51.3,-38.2,-25.1,-12,-17.9,-36.9,-55.9,-45.1,-28.1,-11.1,-19.3,-32.9,-46.6,-60.2,-41.8,-21,-0.2,-7.5,-21.5,-35.5,-49.5,-42.2,-20.9,0.4,-14,-35.9,-57.7,-61,-57.1,-53.2,-49.3,-45.4,-41.5,-37.6,-33.8,-29.9,-26,-22.1,-18.2,-14.3,-10.4,-6.6,-2.7,1.2,5.1,9]}},"head":{"x":{"interval":10000,"frames":[0]},"y":{"interval":40,"frames":[0,0.4,0.8,1.2,1.7,1.2,0.4,0.7,1.3,2,2.6,2,0.8,-0.5,0.2,1.2,2.3,1.9,1.1,0.3,-0.5,0.4,1.5,2.5,2.1,1.3,0.6,-0.2,-0.1,0.7,1.5,1.4,1.1,0.8,1.1,1.5,1.9,2.4,2.3,2.1,2,1.8,1.7,1.5,1.4,1.3,1.1,1,0.8,0.7,0.5,0.4,0.2]},"angle":{"interval":10000,"frames":[0]},"xScale":{"interval":10000,"frames":[1]},"yScale":{"interval":10000,"frames":[1]}},"legs":{"frameName":{"interval":40,"frames":[3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0]}}},"dabfemale":{"loop":true,"character":{"xScale":{"interval":2040,"frames":[1,-1]}},"legs":{"frameName":{"interval":40,"frames":[4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]},"x":{"interval":40,"frames":[0,0,0,0,0,0,0,0,0,0,0,0,0,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6,-2.6]}},"rightArm":{"x":{"interval":10000,"frames":[0]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-6.7,-13.4,-20.2,-26.9,-33.6,-40.3,-47.1,-60.8,-70.5,-80.2,-90.9,-100.7,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120]}},"leftArm":{"x":{"interval":10000,"frames":[0]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-6.1,-12.2,-18.4,-24.5,-30.6,-36.7,-42.9,-49,-55.1,-61.2,-67.3,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80]}},"head":{"x":{"interval":40,"frames":[0,-0.2,-0.4,-0.6,-0.8,-1,-1.3,-1.5,-1.7,-1.9,-2.1,-2.3,-2.3,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12]},"y":{"interval":40,"frames":[0,-0.4,-0.7,-1.1,-1.5,-1.9,-2.2,-2.6,-3,-3,-3,-3,-3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]},"xScale":{"interval":40,"frames":[1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]},"angle":{"interval":40,"frames":[0,0,0,0,0,0,0,0,0,0,0,0,0,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94]}},"shirt":{"x":{"interval":10000,"frames":[0]},"y":{"interval":40,"frames":[0,-0.3,-0.5,-0.8,-1.1,-1.4,-1.6,-1.9,-2.2,-2.4,-2.7,-3,1,0.9,0.7,0.6,0.5,0.3,0.2,0,0.1,0.1,0.2,0.3,0.3,0.4,0.5,0.5,0.6,0.7,0.7,0.8,0.9,0.9,1,1.1,1,0.9,0.8,0.7,0.6,0.5,0.4,0.3,0.2,0.1,0,0,0,0,0]}}},"dabmale":{"loop":true,"character":{"xScale":{"interval":2040,"frames":[1,-1]}},"legs":{"frameName":{"interval":40,"frames":[4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},"rightArm":{"x":{"interval":10000,"frames":[-2]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-6.7,-13.4,-20.2,-26.9,-33.6,-40.3,-47.1,-60.8,-70.5,-80.2,-90.9,-100.7,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120,-120]}},"leftArm":{"x":{"interval":10000,"frames":[0]},"y":{"interval":10000,"frames":[0]},"angle":{"interval":40,"frames":[0,-6.1,-12.2,-18.4,-24.5,-30.6,-36.7,-42.9,-49,-55.1,-61.2,-67.3,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80,-80]}},"head":{"x":{"interval":40,"frames":[0,-0.2,-0.4,-0.6,-0.8,-1,-1.3,-1.5,-1.7,-1.9,-2.1,-2.3,-2.3,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12,-12]},"y":{"interval":40,"frames":[0,-0.4,-0.7,-1.1,-1.5,-1.9,-2.2,-2.6,-3,-3,-3,-3,-3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]},"xScale":{"interval":40,"frames":[1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]},"angle":{"interval":40,"frames":[0,0,0,0,0,0,0,0,0,0,0,0,0,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94,-15.94]}},"shirt":{"x":{"interval":10000,"frames":[0]},"y":{"interval":40,"frames":[0,-0.3,-0.5,-0.8,-1.1,-1.4,-1.6,-1.9,-2.2,-2.4,-2.7,-3,1,0.9,0.7,0.6,0.5,0.3,0.2,0,0.1,0.1,0.2,0.3,0.3,0.4,0.5,0.5,0.6,0.7,0.7,0.8,0.9,0.9,1,1.1,1,0.9,0.8,0.7,0.6,0.5,0.4,0.3,0.2,0.1,0,0,0,0,0]}}},"floatDig":{},"setup":{}}')},77628:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":80,"frames":["{birdTag}/walk/body-0","{birdTag}/walk/body-1","{birdTag}/walk/body-2","{birdTag}/walk/body-3"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":80,"frames":["{birdTag}/walk/body-0","{birdTag}/walk/body-1","{birdTag}/walk/body-2","{birdTag}/walk/body-3"]}}}}}')},60296:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["cactus-0/idle/body-0","cactus-0/idle/body-1","cactus-0/idle/body-2","cactus-0/idle/body-3"]}},"head":{"frameName":{"interval":150,"frames":["cactus-0/idle/flower-0","cactus-0/idle/flower-1","cactus-0/idle/flower-2","cactus-0/idle/flower-3"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["cactus-0/walk/body-0","cactus-0/walk/body-1","cactus-0/walk/body-2","cactus-0/walk/body-3"]}},"head":{"frameName":{"interval":150,"frames":["cactus-0/walk/flower-0","cactus-0/walk/flower-1","cactus-0/walk/flower-2","cactus-0/walk/flower-3"]}}}}}')},48687:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":10000,"frames":["{catTag}/idle/body-0"]}},"legs":{"visible":{"interval":10000,"frames":[false]}},"tail":{"y":{"interval":10000,"frames":[6]},"frameName":{"interval":150,"frames":["{catTag}/idle/tail-0","{catTag}/idle/tail-1","{catTag}/idle/tail-2"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["{catTag}/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["{catTag}/walk/legs-0","{catTag}/walk/legs-1","{catTag}/walk/legs-2","{catTag}/walk/legs-3"]}},"tail":{"frameName":{"interval":150,"frames":["{catTag}/walk/tail-0","{catTag}/walk/tail-1"]},"y":{"interval":150,"frames":[0,1]}}}}}')},24625:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":10000,"frames":["{dogTag}/idle/body-0"]}},"legs":{"visible":{"interval":10000,"frames":[false]}},"tail":{"y":{"interval":10000,"frames":[6]},"frameName":{"interval":150,"frames":["{dogTag}/idle/tail-0","{dogTag}/idle/tail-1","{dogTag}/idle/tail-2"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["{dogTag}/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["{dogTag}/walk/legs-0","{dogTag}/walk/legs-1","{dogTag}/walk/legs-2","{dogTag}/walk/legs-3"]}},"tail":{"frameName":{"interval":150,"frames":["{dogTag}/walk/tail-0","{dogTag}/walk/tail-1"]},"y":{"interval":150,"frames":[0,1]}}}}}')},57131:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["lizard-3/idle/body-0","lizard-3/idle/body-1","lizard-3/idle/body-2","lizard-3/idle/body-3"]}},"head":{"visible":{"interval":10000,"frames":[false]}},"tail":{"frameName":{"interval":150,"frames":["lizard-3/idle/tail-0","lizard-3/idle/tail-1","lizard-3/idle/tail-2","lizard-3/idle/tail-3"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["lizard-3/walk/body-0","lizard-3/walk/body-1","lizard-3/walk/body-2","lizard-3/walk/body-3"]}},"head":{"frameName":{"interval":10000,"frames":["lizard-3/walk/head-0"]},"y":{"interval":150,"frames":[0,1]}},"tail":{"y":{"interval":150,"frames":[0,-1]},"frameName":{"interval":150,"frames":["lizard-3/walk/tail-0","lizard-3/walk/tail-1"]}}}}}')},85218:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"x":{"interval":10000,"frames":[-6]},"frameName":{"interval":150,"frames":["fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-0","fox-0/idle/body-1"]}},"legs":{"visible":{"interval":10000,"frames":[false]}},"tail":{"frameName":{"interval":150,"frames":["fox-0/idle/tail-0","fox-0/idle/tail-0","fox-0/idle/tail-0","fox-0/idle/tail-0","fox-0/idle/tail-0","fox-0/idle/tail-0","fox-0/idle/tail-1"]},"y":{"interval":10000,"frames":[-1]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["fox-0/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["fox-0/walk/legs-0","fox-0/walk/legs-1","fox-0/walk/legs-2","fox-0/walk/legs-3"]}},"tail":{"frameName":{"interval":150,"frames":["fox-0/walk/tail-0","fox-0/walk/tail-1"]},"y":{"interval":150,"frames":[0,1]}}}}}')},22967:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":10000,"frames":["{lizardTag}/idle/body-0"]}},"head":{"visible":{"interval":10000,"frames":[false]}},"tail":{"frameName":{"interval":10000,"frames":["{lizardTag}/idle/tail-0"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["{lizardTag}/walk/body-0","{lizardTag}/walk/body-1","{lizardTag}/walk/body-2","{lizardTag}/walk/body-3"]}},"head":{"frameName":{"interval":10000,"frames":["{lizardTag}/walk/head-0"]},"y":{"interval":150,"frames":[0,1]}},"tail":{"y":{"interval":150,"frames":[0,-1]},"frameName":{"interval":150,"frames":["{lizardTag}/walk/tail-0","{lizardTag}/walk/tail-1"]}}}}}')},67987:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["panda-0/idle/body-0","panda-0/idle/body-1","panda-0/idle/body-2"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["panda-0/walk/body-0","panda-0/walk/body-1","panda-0/walk/body-2","panda-0/walk/body-3"]}}}}}')},11475:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["penguin-0/idle/body-0","penguin-0/idle/body-1","penguin-0/idle/body-2"]}},"head":{"x":{"interval":10000,"frames":[-3]},"frameName":{"interval":10000,"frames":["penguin-0/idle/head-0"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["penguin-0/walk/body-0","penguin-0/walk/body-1","penguin-0/walk/body-2","penguin-0/walk/body-3"]}},"head":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["penguin-0/walk/head-0"]}}}}}')},45221:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"x":{"interval":10000,"frames":[4]},"frameName":{"interval":10000,"frames":["reindeer-0/idle/body-0"]}},"legs":{"visible":{"interval":10000,"frames":[false]}},"tail":{"y":{"interval":10000,"frames":[8]},"frameName":{"interval":150,"frames":["reindeer-0/idle/tail-0","reindeer-0/idle/tail-2","reindeer-0/idle/tail-1","reindeer-0/idle/tail-2"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["reindeer-0/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["reindeer-0/walk/legs-0","reindeer-0/walk/legs-1","reindeer-0/walk/legs-2","reindeer-0/walk/legs-3"]}},"tail":{"frameName":{"interval":150,"frames":["reindeer-0/walk/tail-0","reindeer-0/walk/tail-1"]},"y":{"interval":150,"frames":[0,1]}}}}}')},88505:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-0","{rodentTag}/idle/body-1"]}},"legs":{"visible":{"interval":10000,"frames":[false]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["{rodentTag}/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["{rodentTag}/walk/legs-0","{rodentTag}/walk/legs-1","{rodentTag}/walk/legs-2","{rodentTag}/walk/legs-3"]}}}}}')},43168:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":300,"frames":["sheep-0/idle/body-0","sheep-0/idle/body-1"]},"y":{"interval":150,"frames":[0,-1,0,1]}},"legs":{"frameName":{"interval":150,"frames":["sheep-0/idle/legs-0","sheep-0/idle/legs-1","sheep-0/idle/legs-2","sheep-0/idle/legs-3"]},"y":{"interval":10000,"frames":[-14]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["sheep-0/walk/body-0","sheep-0/walk/body-1"]},"y":{"interval":150,"frames":[0,-1,0,1]}},"legs":{"frameName":{"interval":10000,"frames":["sheep-0/walk/shadow-0"]}}}}}')},35002:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["snowman-0/idle/body-0","snowman-0/idle/body-1","snowman-0/idle/body-0","snowman-0/idle/body-1"]}},"head":{"y":{"interval":150,"frames":[-1,-2,-3,-2]},"frameName":{"interval":10000,"frames":["snowman-0/idle/head-0"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["snowman-0/walk/body-0","snowman-0/walk/body-1","snowman-0/walk/body-2","snowman-0/walk/body-3"]}},"head":{"x":{"interval":150,"frames":[0,1,2,1]},"y":{"interval":150,"frames":[0,-1,-1,0]},"frameName":{"interval":10000,"frames":["snowman-0/walk/head-0"]}}}}}')},74109:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"x":{"interval":10000,"frames":[-12]},"frameName":{"interval":150,"frames":["sparkle-cat-0/idle/body-0","sparkle-cat-0/idle/body-1","sparkle-cat-0/idle/body-2","sparkle-cat-0/idle/body-3"]}},"legs":{"visible":{"interval":10000,"frames":[false]}},"tail":{"visible":{"interval":10000,"frames":[false]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["sparkle-cat-0/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["sparkle-cat-0/walk/legs-0","sparkle-cat-0/walk/legs-1","sparkle-cat-0/walk/legs-2","sparkle-cat-0/walk/legs-3"]}},"tail":{"frameName":{"interval":150,"frames":["sparkle-cat-0/walk/tail-0","sparkle-cat-0/walk/tail-1"]},"y":{"interval":150,"frames":[0,1]}}}}}')},67131:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"x":{"interval":10000,"frames":[-12]},"frameName":{"interval":150,"frames":["sparkle-dog-0/idle/body-0","sparkle-dog-0/idle/body-1","sparkle-dog-0/idle/body-2","sparkle-dog-0/idle/body-3"]}},"legs":{"visible":{"interval":10000,"frames":[false]}},"tail":{"visible":{"interval":10000,"frames":[false]}}}},"walk":{"loop":true,"animationTargets":{"body":{"y":{"interval":150,"frames":[0,1]},"frameName":{"interval":10000,"frames":["sparkle-dog-0/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["sparkle-dog-0/walk/legs-0","sparkle-dog-0/walk/legs-1","sparkle-dog-0/walk/legs-2","sparkle-dog-0/walk/legs-3"]}},"tail":{"frameName":{"interval":150,"frames":["sparkle-dog-0/walk/tail-0","sparkle-dog-0/walk/tail-1"]},"y":{"interval":150,"frames":[0,1]}}}}}')},98179:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["sparkle-rodent-0/idle/body-0","sparkle-rodent-0/idle/body-1","sparkle-rodent-0/idle/body-2","sparkle-rodent-0/idle/body-3"]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":150,"frames":["sparkle-rodent-0/walk/body-0","sparkle-rodent-0/walk/body-1","sparkle-rodent-0/walk/body-2","sparkle-rodent-0/walk/body-3"]}}}}}')},43081:k=>{"use strict";k.exports=JSON.parse('{"idle":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":10000,"frames":["{turtleTag}/idle/body-0"]}},"legs":{"visible":{"interval":10000,"frames":[false]}}}},"walk":{"loop":true,"animationTargets":{"body":{"frameName":{"interval":10000,"frames":["{turtleTag}/walk/body-0"]}},"legs":{"frameName":{"interval":150,"frames":["{turtleTag}/walk/legs-0","{turtleTag}/walk/legs-1","{turtleTag}/walk/legs-2","{turtleTag}/walk/legs-3"]}}}}}')}},__webpack_module_cache__={},leafPrototypes,getProto;function __webpack_require__(k){var B=__webpack_module_cache__[k];if(void 0!==B)return B.exports;var U=__webpack_module_cache__[k]={id:k,loaded:!1,exports:{}};return __webpack_modules__[k].call(U.exports,U,U.exports,__webpack_require__),U.loaded=!0,U.exports}__webpack_require__.n=k=>{var B=k&&k.__esModule?()=>k.default:()=>k;return __webpack_require__.d(B,{a:B}),B},getProto=Object.getPrototypeOf?k=>Object.getPrototypeOf(k):k=>k.__proto__,__webpack_require__.t=function(k,B){if(1&B&&(k=this(k)),8&B)return k;if("object"==typeof k&&k){if(4&B&&k.__esModule)return k;if(16&B&&"function"==typeof k.then)return k}var U=Object.create(null);__webpack_require__.r(U);var F={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var G=2&B&&k;"object"==typeof G&&!~leafPrototypes.indexOf(G);G=getProto(G))Object.getOwnPropertyNames(G).forEach((B=>F[B]=()=>k[B]));return F.default=()=>k,__webpack_require__.d(U,F),U},__webpack_require__.d=(k,B)=>{for(var U in B)__webpack_require__.o(B,U)&&!__webpack_require__.o(k,U)&&Object.defineProperty(k,U,{enumerable:!0,get:B[U]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(k,B)=>Object.prototype.hasOwnProperty.call(k,B),__webpack_require__.r=k=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(k,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(k,"__esModule",{value:!0})},__webpack_require__.nmd=k=>(k.paths=[],k.children||(k.children=[]),k),__webpack_require__(85409),__webpack_require__(52250);var __webpack_exports__=__webpack_require__(67820),__webpack_export_target__=window;for(var i in __webpack_exports__)__webpack_export_target__[i]=__webpack_exports__[i];__webpack_exports__.__esModule&&Object.defineProperty(__webpack_export_target__,"__esModule",{value:!0})})(); //# sourceMappingURL=game.min.js.map -/** P-NP Patcher v4.4.0 — Suffix **/ +/** P-NP Patcher v4.4.1 — Suffix **/ /* ── 1. Immediate: Signal game script loaded ── */ SW.Load.decrementLoadSemaphore(); console.log("%cP-NP Patcher", "font-size:40px;color:#540052;font-weight:900;font-family:sans-serif;"); -console.log("%cVersion 4.4.0", "font-size:20px;color:#000025;font-weight:700;font-family:sans-serif;"); +console.log("%cVersion 4.4.1", "font-size:20px;color:#000025;font-weight:700;font-family:sans-serif;"); console.image((e => e[Math.floor(Math.random() * e.length)])(["https://i.imgur.com/bPtAQ8I.png","https://i.imgur.com/EVbS5zG.png","https://i.imgur.com/ij1DgZi.png","https://i.imgur.com/lJTWDu2.png","https://i.imgur.com/EPAdHYN.png","https://i.imgur.com/5S5Tr1t.png","https://i.imgur.com/d3BGwnZ.png","https://i.imgur.com/Thdxszk.png","https://i.imgur.com/zpyv4TJ.png","https://i.imgur.com/lHztg3K.png","https://i.imgur.com/Odu0WDF.png","https://i.imgur.com/ExRgzlL.png","https://i.imgur.com/2tj8ArT.png","https://i.imgur.com/JMVR4wZ.png","https://i.imgur.com/QhybQ9J.png","https://i.imgur.com/sFdJp9c.png","https://i.imgur.com/N4XnUY6.png","https://i.imgur.com/0ivwtH8.png","https://i.imgur.com/qJJh7nf.png","https://i.imgur.com/BTnE99I.png","https://i.imgur.com/T0LEsCe.png","https://i.imgur.com/Nh20Jwl.png","https://i.imgur.com/MvV56er.png","https://i.imgur.com/Jyd6Uuy.png","https://i.imgur.com/a3Tfych.png","https://i.imgur.com/oNZIEhl.png","https://i.imgur.com/VEJxBcM.png","https://i.imgur.com/5UvWETx.png","https://i.imgur.com/Pt9u23U.png","https://i.imgur.com/Q5nVNus.png","https://i.imgur.com/bDtTVd4.png","https://i.imgur.com/0xAJCAy.png","https://i.imgur.com/2rm0eUH.png","https://i.imgur.com/lrbPvoc.png","https://i.imgur.com/2xz4muk.png","https://i.imgur.com/vURg371.png","https://i.imgur.com/woEnk7L.png","https://i.imgur.com/NX4pThk.png","https://i.imgur.com/qwIznNP.png","https://i.imgur.com/hwPeqbQ.png","https://i.imgur.com/c4kM2cV.png","https://i.imgur.com/k3CTGox.png","https://i.imgur.com/SidLEMT.png","https://i.imgur.com/C7uQ4mr.png","https://i.imgur.com/orHdDCF.png","https://i.imgur.com/caJF6R6.png","https://i.imgur.com/hPZtRjb.png","https://i.imgur.com/rwlTCpQ.png","https://i.imgur.com/r0gIjUt.png","https://i.imgur.com/k4YfiWs.png","https://i.imgur.com/R89VSXH.png","https://i.imgur.com/5X4tgvR.png","https://i.imgur.com/E79ZaFT.png","https://i.imgur.com/rZEGd27.png","https://i.imgur.com/v5pDXsL.png","https://i.imgur.com/VEHoaR9.png","https://i.imgur.com/qyKbB5L.png","https://i.imgur.com/NG0rZgL.png","https://i.imgur.com/l3UODvl.png","https://i.imgur.com/fQFxBi5.png","https://i.imgur.com/dybtFOP.png","https://i.imgur.com/iPua2Dg.png","https://i.imgur.com/pXK2yWH.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/iLC5pQW.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/iDM2afL.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/y2fa9gg.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/22a89fh.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/80ahwofi.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/q29pgra.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/39ahfaai.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/19jamaa.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/a92upaaa.png","https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/q8r9pqh.png"])); /* ── 2. Setup P-NP properties (waits for lodash if needed) ── */ @@ -324,11 +324,18 @@ console.image((e => e[Math.floor(Math.random() * e.length)])(["https://i.imgur.c }, 500); })(); -/* ── 3. CheatGUI loader (delayed to ensure game is ready) ── */ +/* ── 3. CheatGUI loader (delayed to ensure game is ready) ── + * URL is supplied by the extension via window.__ORIGIN_MENU_URL__. + * The extension resolves: popup override → manifest.defaultMenuUrl. */ setTimeout(() => (async () => { try { - eval(await (await fetch("https://raw.githubusercontent.com/ProdigyPXP/ProdigyOrigin/master/originGUI/dist/bundle.js")).text()); + var url = window.__ORIGIN_MENU_URL__; + if (typeof url !== "string" || url.length === 0) { + console.warn("[Play Origin] No menu URL set (window.__ORIGIN_MENU_URL__ missing). Mod bundle skipped."); + return; + } + eval(await (await fetch(url)).text()); } catch(e) { console.error("[Play Origin] CheatGUI load failed:", e); } diff --git a/dist/manifest.json b/dist/manifest.json index be1c232..14ebe59 100644 --- a/dist/manifest.json +++ b/dist/manifest.json @@ -1,7 +1,7 @@ { "schemaVersion": 1, - "patcherVersion": "4.4.0", - "hash": "9af20f1557abfe88", + "patcherVersion": "4.4.1", + "hash": "aa3a3ec39939dbb0", "rules": [ { "id": "singleton-exposure", @@ -52,6 +52,7 @@ "minMatches": 1 } ], - "prefix": "\n/** P-NP Patcher v4.4.0 — Prefix **/\nconst _getBox=(o,t)=>({string:\"+\",style:\"font-size: 1px; padding: 0 \"+Math.floor(o/2)+\"px; line-height: \"+t+\"px;\"});\nconsole.image=((o,t=1)=>{const e=new Image;e.onload=(()=>{const n=_getBox(e.width*t,e.height*t);\nconsole.log(\"%c\"+n.string,n.style+\"background: url(\"+o+\"); background-size: \"+e.width*t+\"px \"\n+e.height*t+\"px; color: transparent;\")}),e.src=o});\nconst _pnpOldLog = console.log.bind(console);\nconsole.log = (...d) => {\n if (d && d.length && typeof d[0] === \"string\" && d[0].includes(\"This is a browser feature for developers only\")) return \"lol no\";\n if (new Error().stack?.split(\"\\n\").reverse()[0]?.includes(\"load-identity\")) return \"denied\";\n return _pnpOldLog(...d);\n};\n/** Ensure window._ exists before game code (lodash may load separately) **/\nif (typeof window._ === 'undefined' || window._ === null) window._ = {};\nwindow.__PNP_ORIG_UNDERSCORE__ = window._;\nwindow._.variables = Object.create(null);\n/** Pre-init _.constants as empty obj with Map-like API so game-side patches don't crash\n * before the suffix wires up __PNP_CONSTANTS_RAW__. Real values populated post-game-load. **/\nif (!window._.constants) {\n var _c = Object.create(null);\n _c.get = function(k) { return _c[k]; };\n _c.set = function(k, v) { _c[k] = v; return _c; };\n _c.has = function(k) { return k in _c; };\n _c.constants = _c;\n window._.constants = _c;\n}\n\n/** Fix Inversify duplicate binding errors (e.g. \"Ambiguous match: MathTower\").\n * Some installers bind services to the GLOBAL gameContainer and can fire more\n * than once in the patched execution context. We define a helper that the\n * game-code patch below uses to safely bind (rebind if already bound). */\nwindow.__pnp_safeBind = function(container, id) {\n try {\n var inv = container._inversifyContainer || container;\n if (typeof inv.isBound === 'function' && inv.isBound(id)) {\n return (typeof container.rebind === 'function') ? container.rebind(id) : inv.rebind(id);\n }\n } catch(e) {}\n return container.bind(id);\n};\n\n/** Guard SW.Load.decrementLoadSemaphore against duplicate calls.\n * ROOT CAUSE: The old extension build (fetch+onreset approach) appends a second\n * SW.Load.decrementLoadSemaphore() call after the game code, AND the patcher\n * suffix calls it too → createGame() fires twice → all Inversify bind() calls\n * run twice on the same container → \"Ambiguous match found for MathTower\" crash.\n *\n * Fix: wrap the function so only the FIRST call triggers createGame().\n * This works for both old extension (fetch+onreset) and new extension (doc-rewrite). */\n/** Runtime service discovery — enumerate Inversify bindings and match by shape (duck-typing).\n * This replaces hardcoded service IDs that break every game update. */\nwindow.__pnp_discoverService = function(gc, shapeFn, label) {\n try {\n var map = gc._inversifyContainer._bindingDictionary._map;\n if (!map) return null;\n var hexPattern = /^[0-9a-f]{2,4}-[0-9a-f]{2,6}$/;\n var iter = map.keys();\n var next = iter.next();\n while (!next.done) {\n var id = next.value;\n next = iter.next();\n if (typeof id !== 'string' || !hexPattern.test(id)) continue;\n try {\n var inst = gc.get(id);\n if (inst && shapeFn(inst)) {\n console.log(\"[Play Origin] Discovered \" + label + \" \\u2192 \" + id);\n return inst;\n }\n } catch(e) {}\n }\n } catch(e) {\n console.warn(\"[Play Origin] Discovery failed for \" + label + \":\", e);\n }\n return null;\n};\n\nif (typeof SW !== 'undefined' && SW.Load && typeof SW.Load.decrementLoadSemaphore === 'function') {\n var _pnpOrigDecrement = SW.Load.decrementLoadSemaphore.bind(SW.Load);\n SW.Load.decrementLoadSemaphore = function() {\n if (window.__PNP_SEM_DECREMENTED__) {\n console.warn(\"[Play Origin] SW.Load.decrementLoadSemaphore() called twice — blocking duplicate createGame()\");\n return;\n }\n window.__PNP_SEM_DECREMENTED__ = true;\n return _pnpOrigDecrement();\n };\n}\n", - "suffix": "\n/** P-NP Patcher v4.4.0 — Suffix **/\n\n/* ── 1. Immediate: Signal game script loaded ── */\nSW.Load.decrementLoadSemaphore();\nconsole.log(\"%cP-NP Patcher\", \"font-size:40px;color:#540052;font-weight:900;font-family:sans-serif;\");\nconsole.log(\"%cVersion 4.4.0\", \"font-size:20px;color:#000025;font-weight:700;font-family:sans-serif;\");\nconsole.image((e => e[Math.floor(Math.random() * e.length)])([\"https://i.imgur.com/bPtAQ8I.png\",\"https://i.imgur.com/EVbS5zG.png\",\"https://i.imgur.com/ij1DgZi.png\",\"https://i.imgur.com/lJTWDu2.png\",\"https://i.imgur.com/EPAdHYN.png\",\"https://i.imgur.com/5S5Tr1t.png\",\"https://i.imgur.com/d3BGwnZ.png\",\"https://i.imgur.com/Thdxszk.png\",\"https://i.imgur.com/zpyv4TJ.png\",\"https://i.imgur.com/lHztg3K.png\",\"https://i.imgur.com/Odu0WDF.png\",\"https://i.imgur.com/ExRgzlL.png\",\"https://i.imgur.com/2tj8ArT.png\",\"https://i.imgur.com/JMVR4wZ.png\",\"https://i.imgur.com/QhybQ9J.png\",\"https://i.imgur.com/sFdJp9c.png\",\"https://i.imgur.com/N4XnUY6.png\",\"https://i.imgur.com/0ivwtH8.png\",\"https://i.imgur.com/qJJh7nf.png\",\"https://i.imgur.com/BTnE99I.png\",\"https://i.imgur.com/T0LEsCe.png\",\"https://i.imgur.com/Nh20Jwl.png\",\"https://i.imgur.com/MvV56er.png\",\"https://i.imgur.com/Jyd6Uuy.png\",\"https://i.imgur.com/a3Tfych.png\",\"https://i.imgur.com/oNZIEhl.png\",\"https://i.imgur.com/VEJxBcM.png\",\"https://i.imgur.com/5UvWETx.png\",\"https://i.imgur.com/Pt9u23U.png\",\"https://i.imgur.com/Q5nVNus.png\",\"https://i.imgur.com/bDtTVd4.png\",\"https://i.imgur.com/0xAJCAy.png\",\"https://i.imgur.com/2rm0eUH.png\",\"https://i.imgur.com/lrbPvoc.png\",\"https://i.imgur.com/2xz4muk.png\",\"https://i.imgur.com/vURg371.png\",\"https://i.imgur.com/woEnk7L.png\",\"https://i.imgur.com/NX4pThk.png\",\"https://i.imgur.com/qwIznNP.png\",\"https://i.imgur.com/hwPeqbQ.png\",\"https://i.imgur.com/c4kM2cV.png\",\"https://i.imgur.com/k3CTGox.png\",\"https://i.imgur.com/SidLEMT.png\",\"https://i.imgur.com/C7uQ4mr.png\",\"https://i.imgur.com/orHdDCF.png\",\"https://i.imgur.com/caJF6R6.png\",\"https://i.imgur.com/hPZtRjb.png\",\"https://i.imgur.com/rwlTCpQ.png\",\"https://i.imgur.com/r0gIjUt.png\",\"https://i.imgur.com/k4YfiWs.png\",\"https://i.imgur.com/R89VSXH.png\",\"https://i.imgur.com/5X4tgvR.png\",\"https://i.imgur.com/E79ZaFT.png\",\"https://i.imgur.com/rZEGd27.png\",\"https://i.imgur.com/v5pDXsL.png\",\"https://i.imgur.com/VEHoaR9.png\",\"https://i.imgur.com/qyKbB5L.png\",\"https://i.imgur.com/NG0rZgL.png\",\"https://i.imgur.com/l3UODvl.png\",\"https://i.imgur.com/fQFxBi5.png\",\"https://i.imgur.com/dybtFOP.png\",\"https://i.imgur.com/iPua2Dg.png\",\"https://i.imgur.com/pXK2yWH.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/iLC5pQW.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/iDM2afL.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/y2fa9gg.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/22a89fh.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/80ahwofi.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/q29pgra.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/39ahfaai.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/19jamaa.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/a92upaaa.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/q8r9pqh.png\"]));\n\n/* ── 2. Setup P-NP properties (waits for lodash if needed) ── */\n(function _pnpSetup() {\n function _applyProps() {\n const W = window;\n if (!W._) W._ = {};\n\n /* variables & functions namespaces */\n if (!W._.variables) W._.variables = Object.create(null);\n W._.functions = Object.create(null);\n\n /* _.instance → the prodigy singleton exposed by our constructor patch */\n Object.defineProperty(W._, \"instance\", {\n get: () => W.__PNP__,\n enumerable: true, configurable: true\n });\n\n /* _.constants → raw plain object with Map-compatible .get()/.set() + self-alias .constants\n * WHY: cheatGUI uses _.constants.constants[\"GameConstants.X\"] = val (plain object writes)\n * patcher game-side bypasses use _.constants.get(\"GameConstants.X\") (Map-like reads)\n * Both must work on the same underlying storage. We make _.constants the raw object\n * and bolt on get/set/has methods + a .constants self-alias so every call site works. */\n if (W.__PNP_CONSTANTS_RAW__) {\n var raw = W.__PNP_CONSTANTS_RAW__;\n /* bolt Map-like API onto the plain object */\n raw.get = function(key) { return raw[key]; };\n raw.set = function(key, val) { raw[key] = val; return raw; };\n raw.has = function(key) { return key in raw; };\n /* self-alias: _.constants.constants[\"GameConstants.X\"] = val */\n raw.constants = raw;\n W._.constants = raw;\n }\n\n /* _.player → discovered dynamically from DI container by shape.\n * Cache the SERVICE (stable ref), not the player object (.player getter\n * returns a new object each call). */\n Object.defineProperty(W._, \"player\", {\n get: function() {\n if (W.__PNP_PLAYER_SVC__) return W.__PNP_PLAYER_SVC__.player;\n try {\n var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer;\n if (!gc) return null;\n var svc = W.__pnp_discoverService(gc, function(inst) {\n try { var p = inst.player; return p && typeof p === 'object' && ('data' in p); }\n catch(e) { return false; }\n }, \"PlayerService\");\n if (svc) {\n W.__PNP_PLAYER_SVC__ = svc;\n return svc.player;\n }\n } catch(e) {}\n return null;\n },\n enumerable: true, configurable: true\n });\n\n /* _.gameData */\n Object.defineProperty(W._, \"gameData\", {\n get: () => {\n try { return W.__PNP__?.game?.state?.states?.get?.(\"Boot\")?._gameData; }\n catch(e) { return null; }\n },\n enumerable: true, configurable: true\n });\n\n /* _.localizer */\n Object.defineProperty(W._, \"localizer\", {\n get: () => {\n try { return W.__PNP__?.prodigy?.gameContainer?.get(\"LocalizationService\"); }\n catch(e) { return null; }\n },\n enumerable: true, configurable: true\n });\n\n /* _.network → discovered dynamically from DI container by shape */\n Object.defineProperty(W._, \"network\", {\n get: function() {\n if (W.__PNP_NETWORK__) return W.__PNP_NETWORK__;\n try {\n var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer;\n if (!gc) return null;\n var nm = W.__pnp_discoverService(gc, function(inst) {\n return typeof inst.getCharData === 'function'\n && ('processPlayer' in inst)\n && typeof inst.sendZoneEvent === 'function';\n }, \"NetworkManager\");\n if (nm && typeof nm === \"object\") {\n if (!nm.game) {\n Object.defineProperty(nm, \"game\", {\n get: function() { return W.__PNP__ && W.__PNP__.game; },\n enumerable: true, configurable: true\n });\n }\n W.__PNP_NETWORK__ = nm;\n return nm;\n }\n } catch(e) {}\n return null;\n },\n enumerable: true, configurable: true\n });\n\n /* _.hack → self-reference */\n Object.defineProperty(W._, \"hack\", {\n get: () => W._, enumerable: true, configurable: true\n });\n\n /* Escape battle helper — handles SecureBattleRevamp via BattleController */\n W._.functions.escapeBattle = () => {\n try {\n const g = W.__PNP__?.game;\n const currentState = g?.state?.current;\n if (currentState === \"PVP\") {\n g.state.states.PVP.endPVP();\n } else if (currentState === \"CoOp\") {\n W.__PNP__.prodigy.world.$(W._.player?.data?.zone);\n } else if (currentState === \"SecureBattleRevamp\") {\n const st = g.state.states.get(\"SecureBattleRevamp\");\n const bc = st?._battleController;\n if (bc?.escapeBattle) bc.escapeBattle();\n else g?.state?.callbackContext?.runAwayCallback();\n } else {\n g?.state?.callbackContext?.runAwayCallback();\n }\n } catch(e) { console.warn(\"[Play Origin] escapeBattle failed:\", e); }\n };\n\n /* _.membership → discovered by shape (isMember getter + hasFeatureAccess).\n * Service ID drifts per build; shape is stable. */\n Object.defineProperty(W._, \"membership\", {\n get: function() {\n if (W.__PNP_MEMBERSHIP__) return W.__PNP_MEMBERSHIP__;\n try {\n var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer;\n if (!gc) return null;\n var ms = W.__pnp_discoverService(gc, function(inst) {\n return inst && typeof inst.hasFeatureAccess === 'function'\n && 'isMember' in inst;\n }, \"MembershipService\");\n if (ms) { W.__PNP_MEMBERSHIP__ = ms; return ms; }\n } catch(e) {}\n return null;\n },\n enumerable: true, configurable: true\n });\n\n /* _.functions.setMembership(bool) — deep membership override.\n memberTier is derived from three hasFeatureAccess checks, so forcing it to return\n true auto-promotes to Ultra tier. We snapshot the original _data on first call so\n disable restores it. */\n W._.functions.setMembership = function(active) {\n var ms = W._.membership;\n if (!ms) return false;\n if (!W.__PNP_MEMBERSHIP_ORIG__) {\n W.__PNP_MEMBERSHIP_ORIG__ = { data: ms._data };\n }\n if (active) {\n var start = new Date(Date.now() - 86400000).toISOString();\n var end = new Date(Date.now() + 365 * 86400000 * 10).toISOString();\n ms._data = {\n active: true,\n features: [],\n membershipStartTs: start,\n membershipEndTs: end\n };\n Object.defineProperty(ms, \"hasFeatureAccess\", {\n value: function() { return true; },\n configurable: true, writable: true\n });\n try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {}\n try { W._.player && W._.player.unlockMemberItems && W._.player.unlockMemberItems(); } catch(e) {}\n } else {\n ms._data = W.__PNP_MEMBERSHIP_ORIG__.data;\n if (Object.getOwnPropertyDescriptor(ms, \"hasFeatureAccess\")) {\n delete ms.hasFeatureAccess;\n }\n try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {}\n }\n try { W._.player && (W._.player.appearanceChanged = true); } catch(e) {}\n return true;\n };\n\n if (!W.__PNP_PROPS_APPLIED__) {\n W.__PNP_PROPS_APPLIED__ = true;\n console.log(\"[Play Origin] Properties applied to window._\");\n }\n }\n\n /* Lodash loads as a SEPARATE script AFTER game.min.js.\n When it loads, it overwrites window._ entirely — and the game keeps\n reassigning window._ (chunks, runInContext, etc.) indefinitely.\n We PERMANENTLY poll and re-apply our properties whenever they're\n missing. The 500ms interval is negligible overhead. */\n _applyProps();\n\n setInterval(() => {\n try {\n const desc = Object.getOwnPropertyDescriptor(window._, 'instance');\n if (!desc || !desc.get || !window.__PNP__) {\n _applyProps();\n }\n /* Singleton auto-fix: the constructor may fire twice (onreset context).\n Our patch captures the first instance, but the REAL fully-initialized\n singleton (with #prodigy set) is stored on the class's static _instance.\n Detect the mismatch and update __PNP__ to the real one. */\n if (window.__PNP__ && !window.__PNP__.prodigy) {\n try {\n var ctor = Object.getPrototypeOf(window.__PNP__).constructor;\n if (ctor._instance && ctor._instance !== window.__PNP__ && ctor._instance.prodigy) {\n window.__PNP__ = ctor._instance;\n console.log(\"[Play Origin] Singleton auto-fixed to real instance (prodigy available)\");\n }\n } catch(e) {}\n }\n /* Trigger lazy discovery for player and network via their getters */\n if (!window.__PNP_PLAYER_SVC__ && window.__PNP__) {\n try { void window._.player; } catch(e) {}\n }\n if (!window.__PNP_NETWORK__ && window.__PNP__) {\n try { void window._.network; } catch(e) {}\n }\n } catch(e) { _applyProps(); }\n }, 500);\n})();\n\n/* ── 3. CheatGUI loader (delayed to ensure game is ready) ── */\nsetTimeout(() =>\n (async () => {\n try {\n eval(await (await fetch(\"https://raw.githubusercontent.com/ProdigyPXP/ProdigyOrigin/master/originGUI/dist/bundle.js\")).text());\n } catch(e) {\n console.error(\"[Play Origin] CheatGUI load failed:\", e);\n }\n })(), 15000);\nconsole.trace = () => {};\n" + "prefix": "\n/** P-NP Patcher v4.4.1 — Prefix **/\nconst _getBox=(o,t)=>({string:\"+\",style:\"font-size: 1px; padding: 0 \"+Math.floor(o/2)+\"px; line-height: \"+t+\"px;\"});\nconsole.image=((o,t=1)=>{const e=new Image;e.onload=(()=>{const n=_getBox(e.width*t,e.height*t);\nconsole.log(\"%c\"+n.string,n.style+\"background: url(\"+o+\"); background-size: \"+e.width*t+\"px \"\n+e.height*t+\"px; color: transparent;\")}),e.src=o});\nconst _pnpOldLog = console.log.bind(console);\nconsole.log = (...d) => {\n if (d && d.length && typeof d[0] === \"string\" && d[0].includes(\"This is a browser feature for developers only\")) return \"lol no\";\n if (new Error().stack?.split(\"\\n\").reverse()[0]?.includes(\"load-identity\")) return \"denied\";\n return _pnpOldLog(...d);\n};\n/** Ensure window._ exists before game code (lodash may load separately) **/\nif (typeof window._ === 'undefined' || window._ === null) window._ = {};\nwindow.__PNP_ORIG_UNDERSCORE__ = window._;\nwindow._.variables = Object.create(null);\n/** Pre-init _.constants as empty obj with Map-like API so game-side patches don't crash\n * before the suffix wires up __PNP_CONSTANTS_RAW__. Real values populated post-game-load. **/\nif (!window._.constants) {\n var _c = Object.create(null);\n _c.get = function(k) { return _c[k]; };\n _c.set = function(k, v) { _c[k] = v; return _c; };\n _c.has = function(k) { return k in _c; };\n _c.constants = _c;\n window._.constants = _c;\n}\n\n/** Fix Inversify duplicate binding errors (e.g. \"Ambiguous match: MathTower\").\n * Some installers bind services to the GLOBAL gameContainer and can fire more\n * than once in the patched execution context. We define a helper that the\n * game-code patch below uses to safely bind (rebind if already bound). */\nwindow.__pnp_safeBind = function(container, id) {\n try {\n var inv = container._inversifyContainer || container;\n if (typeof inv.isBound === 'function' && inv.isBound(id)) {\n return (typeof container.rebind === 'function') ? container.rebind(id) : inv.rebind(id);\n }\n } catch(e) {}\n return container.bind(id);\n};\n\n/** Guard SW.Load.decrementLoadSemaphore against duplicate calls.\n * ROOT CAUSE: The old extension build (fetch+onreset approach) appends a second\n * SW.Load.decrementLoadSemaphore() call after the game code, AND the patcher\n * suffix calls it too → createGame() fires twice → all Inversify bind() calls\n * run twice on the same container → \"Ambiguous match found for MathTower\" crash.\n *\n * Fix: wrap the function so only the FIRST call triggers createGame().\n * This works for both old extension (fetch+onreset) and new extension (doc-rewrite). */\n/** Runtime service discovery — enumerate Inversify bindings and match by shape (duck-typing).\n * This replaces hardcoded service IDs that break every game update. */\nwindow.__pnp_discoverService = function(gc, shapeFn, label) {\n try {\n var map = gc._inversifyContainer._bindingDictionary._map;\n if (!map) return null;\n var hexPattern = /^[0-9a-f]{2,4}-[0-9a-f]{2,6}$/;\n var iter = map.keys();\n var next = iter.next();\n while (!next.done) {\n var id = next.value;\n next = iter.next();\n if (typeof id !== 'string' || !hexPattern.test(id)) continue;\n try {\n var inst = gc.get(id);\n if (inst && shapeFn(inst)) {\n console.log(\"[Play Origin] Discovered \" + label + \" \\u2192 \" + id);\n return inst;\n }\n } catch(e) {}\n }\n } catch(e) {\n console.warn(\"[Play Origin] Discovery failed for \" + label + \":\", e);\n }\n return null;\n};\n\nif (typeof SW !== 'undefined' && SW.Load && typeof SW.Load.decrementLoadSemaphore === 'function') {\n var _pnpOrigDecrement = SW.Load.decrementLoadSemaphore.bind(SW.Load);\n SW.Load.decrementLoadSemaphore = function() {\n if (window.__PNP_SEM_DECREMENTED__) {\n console.warn(\"[Play Origin] SW.Load.decrementLoadSemaphore() called twice — blocking duplicate createGame()\");\n return;\n }\n window.__PNP_SEM_DECREMENTED__ = true;\n return _pnpOrigDecrement();\n };\n}\n", + "suffix": "\n/** P-NP Patcher v4.4.1 — Suffix **/\n\n/* ── 1. Immediate: Signal game script loaded ── */\nSW.Load.decrementLoadSemaphore();\nconsole.log(\"%cP-NP Patcher\", \"font-size:40px;color:#540052;font-weight:900;font-family:sans-serif;\");\nconsole.log(\"%cVersion 4.4.1\", \"font-size:20px;color:#000025;font-weight:700;font-family:sans-serif;\");\nconsole.image((e => e[Math.floor(Math.random() * e.length)])([\"https://i.imgur.com/bPtAQ8I.png\",\"https://i.imgur.com/EVbS5zG.png\",\"https://i.imgur.com/ij1DgZi.png\",\"https://i.imgur.com/lJTWDu2.png\",\"https://i.imgur.com/EPAdHYN.png\",\"https://i.imgur.com/5S5Tr1t.png\",\"https://i.imgur.com/d3BGwnZ.png\",\"https://i.imgur.com/Thdxszk.png\",\"https://i.imgur.com/zpyv4TJ.png\",\"https://i.imgur.com/lHztg3K.png\",\"https://i.imgur.com/Odu0WDF.png\",\"https://i.imgur.com/ExRgzlL.png\",\"https://i.imgur.com/2tj8ArT.png\",\"https://i.imgur.com/JMVR4wZ.png\",\"https://i.imgur.com/QhybQ9J.png\",\"https://i.imgur.com/sFdJp9c.png\",\"https://i.imgur.com/N4XnUY6.png\",\"https://i.imgur.com/0ivwtH8.png\",\"https://i.imgur.com/qJJh7nf.png\",\"https://i.imgur.com/BTnE99I.png\",\"https://i.imgur.com/T0LEsCe.png\",\"https://i.imgur.com/Nh20Jwl.png\",\"https://i.imgur.com/MvV56er.png\",\"https://i.imgur.com/Jyd6Uuy.png\",\"https://i.imgur.com/a3Tfych.png\",\"https://i.imgur.com/oNZIEhl.png\",\"https://i.imgur.com/VEJxBcM.png\",\"https://i.imgur.com/5UvWETx.png\",\"https://i.imgur.com/Pt9u23U.png\",\"https://i.imgur.com/Q5nVNus.png\",\"https://i.imgur.com/bDtTVd4.png\",\"https://i.imgur.com/0xAJCAy.png\",\"https://i.imgur.com/2rm0eUH.png\",\"https://i.imgur.com/lrbPvoc.png\",\"https://i.imgur.com/2xz4muk.png\",\"https://i.imgur.com/vURg371.png\",\"https://i.imgur.com/woEnk7L.png\",\"https://i.imgur.com/NX4pThk.png\",\"https://i.imgur.com/qwIznNP.png\",\"https://i.imgur.com/hwPeqbQ.png\",\"https://i.imgur.com/c4kM2cV.png\",\"https://i.imgur.com/k3CTGox.png\",\"https://i.imgur.com/SidLEMT.png\",\"https://i.imgur.com/C7uQ4mr.png\",\"https://i.imgur.com/orHdDCF.png\",\"https://i.imgur.com/caJF6R6.png\",\"https://i.imgur.com/hPZtRjb.png\",\"https://i.imgur.com/rwlTCpQ.png\",\"https://i.imgur.com/r0gIjUt.png\",\"https://i.imgur.com/k4YfiWs.png\",\"https://i.imgur.com/R89VSXH.png\",\"https://i.imgur.com/5X4tgvR.png\",\"https://i.imgur.com/E79ZaFT.png\",\"https://i.imgur.com/rZEGd27.png\",\"https://i.imgur.com/v5pDXsL.png\",\"https://i.imgur.com/VEHoaR9.png\",\"https://i.imgur.com/qyKbB5L.png\",\"https://i.imgur.com/NG0rZgL.png\",\"https://i.imgur.com/l3UODvl.png\",\"https://i.imgur.com/fQFxBi5.png\",\"https://i.imgur.com/dybtFOP.png\",\"https://i.imgur.com/iPua2Dg.png\",\"https://i.imgur.com/pXK2yWH.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/iLC5pQW.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/iDM2afL.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/y2fa9gg.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/22a89fh.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/80ahwofi.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/q29pgra.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/39ahfaai.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/19jamaa.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/a92upaaa.png\",\"https://raw.githubusercontent.com/ProdigyPXP/pnp-images/main/q8r9pqh.png\"]));\n\n/* ── 2. Setup P-NP properties (waits for lodash if needed) ── */\n(function _pnpSetup() {\n function _applyProps() {\n const W = window;\n if (!W._) W._ = {};\n\n /* variables & functions namespaces */\n if (!W._.variables) W._.variables = Object.create(null);\n W._.functions = Object.create(null);\n\n /* _.instance → the prodigy singleton exposed by our constructor patch */\n Object.defineProperty(W._, \"instance\", {\n get: () => W.__PNP__,\n enumerable: true, configurable: true\n });\n\n /* _.constants → raw plain object with Map-compatible .get()/.set() + self-alias .constants\n * WHY: cheatGUI uses _.constants.constants[\"GameConstants.X\"] = val (plain object writes)\n * patcher game-side bypasses use _.constants.get(\"GameConstants.X\") (Map-like reads)\n * Both must work on the same underlying storage. We make _.constants the raw object\n * and bolt on get/set/has methods + a .constants self-alias so every call site works. */\n if (W.__PNP_CONSTANTS_RAW__) {\n var raw = W.__PNP_CONSTANTS_RAW__;\n /* bolt Map-like API onto the plain object */\n raw.get = function(key) { return raw[key]; };\n raw.set = function(key, val) { raw[key] = val; return raw; };\n raw.has = function(key) { return key in raw; };\n /* self-alias: _.constants.constants[\"GameConstants.X\"] = val */\n raw.constants = raw;\n W._.constants = raw;\n }\n\n /* _.player → discovered dynamically from DI container by shape.\n * Cache the SERVICE (stable ref), not the player object (.player getter\n * returns a new object each call). */\n Object.defineProperty(W._, \"player\", {\n get: function() {\n if (W.__PNP_PLAYER_SVC__) return W.__PNP_PLAYER_SVC__.player;\n try {\n var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer;\n if (!gc) return null;\n var svc = W.__pnp_discoverService(gc, function(inst) {\n try { var p = inst.player; return p && typeof p === 'object' && ('data' in p); }\n catch(e) { return false; }\n }, \"PlayerService\");\n if (svc) {\n W.__PNP_PLAYER_SVC__ = svc;\n return svc.player;\n }\n } catch(e) {}\n return null;\n },\n enumerable: true, configurable: true\n });\n\n /* _.gameData */\n Object.defineProperty(W._, \"gameData\", {\n get: () => {\n try { return W.__PNP__?.game?.state?.states?.get?.(\"Boot\")?._gameData; }\n catch(e) { return null; }\n },\n enumerable: true, configurable: true\n });\n\n /* _.localizer */\n Object.defineProperty(W._, \"localizer\", {\n get: () => {\n try { return W.__PNP__?.prodigy?.gameContainer?.get(\"LocalizationService\"); }\n catch(e) { return null; }\n },\n enumerable: true, configurable: true\n });\n\n /* _.network → discovered dynamically from DI container by shape */\n Object.defineProperty(W._, \"network\", {\n get: function() {\n if (W.__PNP_NETWORK__) return W.__PNP_NETWORK__;\n try {\n var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer;\n if (!gc) return null;\n var nm = W.__pnp_discoverService(gc, function(inst) {\n return typeof inst.getCharData === 'function'\n && ('processPlayer' in inst)\n && typeof inst.sendZoneEvent === 'function';\n }, \"NetworkManager\");\n if (nm && typeof nm === \"object\") {\n if (!nm.game) {\n Object.defineProperty(nm, \"game\", {\n get: function() { return W.__PNP__ && W.__PNP__.game; },\n enumerable: true, configurable: true\n });\n }\n W.__PNP_NETWORK__ = nm;\n return nm;\n }\n } catch(e) {}\n return null;\n },\n enumerable: true, configurable: true\n });\n\n /* _.hack → self-reference */\n Object.defineProperty(W._, \"hack\", {\n get: () => W._, enumerable: true, configurable: true\n });\n\n /* Escape battle helper — handles SecureBattleRevamp via BattleController */\n W._.functions.escapeBattle = () => {\n try {\n const g = W.__PNP__?.game;\n const currentState = g?.state?.current;\n if (currentState === \"PVP\") {\n g.state.states.PVP.endPVP();\n } else if (currentState === \"CoOp\") {\n W.__PNP__.prodigy.world.$(W._.player?.data?.zone);\n } else if (currentState === \"SecureBattleRevamp\") {\n const st = g.state.states.get(\"SecureBattleRevamp\");\n const bc = st?._battleController;\n if (bc?.escapeBattle) bc.escapeBattle();\n else g?.state?.callbackContext?.runAwayCallback();\n } else {\n g?.state?.callbackContext?.runAwayCallback();\n }\n } catch(e) { console.warn(\"[Play Origin] escapeBattle failed:\", e); }\n };\n\n /* _.membership → discovered by shape (isMember getter + hasFeatureAccess).\n * Service ID drifts per build; shape is stable. */\n Object.defineProperty(W._, \"membership\", {\n get: function() {\n if (W.__PNP_MEMBERSHIP__) return W.__PNP_MEMBERSHIP__;\n try {\n var gc = W.__PNP__ && W.__PNP__.prodigy && W.__PNP__.prodigy.gameContainer;\n if (!gc) return null;\n var ms = W.__pnp_discoverService(gc, function(inst) {\n return inst && typeof inst.hasFeatureAccess === 'function'\n && 'isMember' in inst;\n }, \"MembershipService\");\n if (ms) { W.__PNP_MEMBERSHIP__ = ms; return ms; }\n } catch(e) {}\n return null;\n },\n enumerable: true, configurable: true\n });\n\n /* _.functions.setMembership(bool) — deep membership override.\n memberTier is derived from three hasFeatureAccess checks, so forcing it to return\n true auto-promotes to Ultra tier. We snapshot the original _data on first call so\n disable restores it. */\n W._.functions.setMembership = function(active) {\n var ms = W._.membership;\n if (!ms) return false;\n if (!W.__PNP_MEMBERSHIP_ORIG__) {\n W.__PNP_MEMBERSHIP_ORIG__ = { data: ms._data };\n }\n if (active) {\n var start = new Date(Date.now() - 86400000).toISOString();\n var end = new Date(Date.now() + 365 * 86400000 * 10).toISOString();\n ms._data = {\n active: true,\n features: [],\n membershipStartTs: start,\n membershipEndTs: end\n };\n Object.defineProperty(ms, \"hasFeatureAccess\", {\n value: function() { return true; },\n configurable: true, writable: true\n });\n try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {}\n try { W._.player && W._.player.unlockMemberItems && W._.player.unlockMemberItems(); } catch(e) {}\n } else {\n ms._data = W.__PNP_MEMBERSHIP_ORIG__.data;\n if (Object.getOwnPropertyDescriptor(ms, \"hasFeatureAccess\")) {\n delete ms.hasFeatureAccess;\n }\n try { ms.updateMembershipDates && ms.updateMembershipDates(); } catch(e) {}\n }\n try { W._.player && (W._.player.appearanceChanged = true); } catch(e) {}\n return true;\n };\n\n if (!W.__PNP_PROPS_APPLIED__) {\n W.__PNP_PROPS_APPLIED__ = true;\n console.log(\"[Play Origin] Properties applied to window._\");\n }\n }\n\n /* Lodash loads as a SEPARATE script AFTER game.min.js.\n When it loads, it overwrites window._ entirely — and the game keeps\n reassigning window._ (chunks, runInContext, etc.) indefinitely.\n We PERMANENTLY poll and re-apply our properties whenever they're\n missing. The 500ms interval is negligible overhead. */\n _applyProps();\n\n setInterval(() => {\n try {\n const desc = Object.getOwnPropertyDescriptor(window._, 'instance');\n if (!desc || !desc.get || !window.__PNP__) {\n _applyProps();\n }\n /* Singleton auto-fix: the constructor may fire twice (onreset context).\n Our patch captures the first instance, but the REAL fully-initialized\n singleton (with #prodigy set) is stored on the class's static _instance.\n Detect the mismatch and update __PNP__ to the real one. */\n if (window.__PNP__ && !window.__PNP__.prodigy) {\n try {\n var ctor = Object.getPrototypeOf(window.__PNP__).constructor;\n if (ctor._instance && ctor._instance !== window.__PNP__ && ctor._instance.prodigy) {\n window.__PNP__ = ctor._instance;\n console.log(\"[Play Origin] Singleton auto-fixed to real instance (prodigy available)\");\n }\n } catch(e) {}\n }\n /* Trigger lazy discovery for player and network via their getters */\n if (!window.__PNP_PLAYER_SVC__ && window.__PNP__) {\n try { void window._.player; } catch(e) {}\n }\n if (!window.__PNP_NETWORK__ && window.__PNP__) {\n try { void window._.network; } catch(e) {}\n }\n } catch(e) { _applyProps(); }\n }, 500);\n})();\n\n/* ── 3. CheatGUI loader (delayed to ensure game is ready) ──\n * URL is supplied by the extension via window.__ORIGIN_MENU_URL__.\n * The extension resolves: popup override → manifest.defaultMenuUrl. */\nsetTimeout(() =>\n (async () => {\n try {\n var url = window.__ORIGIN_MENU_URL__;\n if (typeof url !== \"string\" || url.length === 0) {\n console.warn(\"[Play Origin] No menu URL set (window.__ORIGIN_MENU_URL__ missing). Mod bundle skipped.\");\n return;\n }\n eval(await (await fetch(url)).text());\n } catch(e) {\n console.error(\"[Play Origin] CheatGUI load failed:\", e);\n }\n })(), 15000);\nconsole.trace = () => {};\n", + "defaultMenuUrl": "https://raw.githubusercontent.com/ProdigyPXP/ProdigyOrigin/master/originGUI/dist/bundle.js" } diff --git a/dist/metadata.json b/dist/metadata.json index ecc6dd2..753c434 100644 --- a/dist/metadata.json +++ b/dist/metadata.json @@ -1,11 +1,11 @@ { - "generatedAt": "2026-05-24T19:47:21.595Z", - "patcherVersion": "4.4.0", + "generatedAt": "2026-05-24T20:35:07.819Z", + "patcherVersion": "4.4.1", "gameVersion": "2026.25.0", "publicGameHash": null, "loadGamePath": "/js/load-game-f2baaaba58.min.js", "patchDegraded": false, - "manifestHash": "9af20f1557abfe88", + "manifestHash": "aa3a3ec39939dbb0", "perRuleCounts": { "singleton-exposure": 1, "safe-bind": 9, diff --git a/package.json b/package.json index 83fc41b..15c234b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "p-np-patcher", - "version": "4.4.0", + "version": "4.4.1", "description": "Fetches and patches Prodigy game files for static hosting", "main": "./dist/patch.js", "type": "module", diff --git a/src/constants.ts b/src/constants.ts index 0c7d65a..1b43d27 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,4 +1,4 @@ -export const VERSION = "4.4.0"; +export const VERSION = "4.4.1"; export const GUI_LINK = "https://raw.githubusercontent.com/ProdigyPXP/ProdigyOrigin/master/originGUI/dist/bundle.js"; export const PRODIGY_LOAD_URL = "https://math.prodigygame.com/load"; export const PRODIGY_CODE_ORIGIN = "https://code.prodigygame.com"; diff --git a/src/patch.ts b/src/patch.ts index e4e93ca..242054e 100644 --- a/src/patch.ts +++ b/src/patch.ts @@ -91,9 +91,10 @@ export const runPatch = async (outputDir = "patched-output"): Promise { ); } - const prefix = buildPrefix("4.4.0"); - const suffix = buildSuffix("4.4.0", "https://x/y.js", ["https://img/1.png"]); + const prefix = buildPrefix("4.4.1"); + const suffix = buildSuffix("4.4.1", ["https://img/1.png"]); const wrapped = `${prefix}\n${patched}\n${suffix}`; assert.ok(wrapped.includes("window.__PNP__=this")); assert.ok(wrapped.includes("window.__pnp_safeBind")); assert.ok(wrapped.includes("__PNP_CONSTANTS_RAW__")); assert.ok(wrapped.includes("AUTO_ANSWER_CORRECT_PERCENT")); - assert.ok(wrapped.includes("P-NP Patcher v4.4.0 — Prefix")); - assert.ok(wrapped.includes("P-NP Patcher v4.4.0 — Suffix")); + assert.ok(wrapped.includes("P-NP Patcher v4.4.1 — Prefix")); + assert.ok(wrapped.includes("P-NP Patcher v4.4.1 — Suffix")); const manifest = buildManifest({ - patcherVersion: "4.4.0", + patcherVersion: "4.4.1", rules: RULES, prefix, - suffix + suffix, + defaultMenuUrl: GUI_LINK }); assert.equal(manifest.schemaVersion, 1); - assert.equal(manifest.patcherVersion, "4.4.0"); + assert.equal(manifest.patcherVersion, "4.4.1"); assert.match(manifest.hash, /^[0-9a-f]{16}$/); assert.equal(manifest.rules.length, RULES.length); assert.equal(manifest.prefix, prefix); assert.equal(manifest.suffix, suffix); + assert.equal(manifest.defaultMenuUrl, GUI_LINK); }); }); + +test("integration: manifest.defaultMenuUrl matches GUI_LINK", () => { + const prefix = buildPrefix("test"); + const suffix = buildSuffix("test", ["https://example.com/a.png"]); + const manifest = buildManifest({ + patcherVersion: "test", + rules: [], + prefix, + suffix, + defaultMenuUrl: GUI_LINK + }); + assert.equal(manifest.defaultMenuUrl, GUI_LINK); + assert.ok(!suffix.includes(GUI_LINK), "suffix must not contain GUI_LINK literal"); +}); From 31b984f1d585e5d0eb587576628d42f9a56fac81 Mon Sep 17 00:00:00 2001 From: Alexey Fedorov Date: Mon, 25 May 2026 13:48:36 -0700 Subject: [PATCH 15/16] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Alexey Fedorov --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1421751..76c3f1f 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,13 @@ The repository no longer runs an HTTP server. Instead, a GitHub Action fetches c The patcher's primary artifact is `dist/manifest.json` — a small JSON file containing: +- `schemaVersion` — manifest schema version for compatibility checks. +- `patcherVersion` — version of this patcher that produced the manifest. - `rules` — ordered list of regex find/replace rules applied to `game.min.js`. - `prefix` — pre-rendered JS string prepended to the patched game. - `suffix` — pre-rendered JS string appended after the patched game. -- `hash` — content hash of `{rules, prefix, suffix}` for cache invalidation. +- `defaultMenuUrl` — default menu/loader URL used by consumers when patching. +- `hash` — content hash of `{rules, prefix, suffix, defaultMenuUrl}` for cache invalidation. The Play Origin extension fetches this manifest, fetches the original `game.min.js` from `code.prodigygame.com`, applies the rules locally in its background service From dc04fbd63eb7e9f7a7525a1ad9292d9cdfd53981 Mon Sep 17 00:00:00 2001 From: Alexey Fedorov Date: Mon, 25 May 2026 13:48:43 -0700 Subject: [PATCH 16/16] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Alexey Fedorov --- CLAUDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index a53ee83..643f476 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -12,7 +12,7 @@ The Play Origin extension (in `ProdigyPXP/ProdigyOrigin`, formerly "Prodigy Orig - **src/patch.ts** — Orchestrator. Fetches game files, runs rules via `src/patches.ts` for VERIFICATION, builds the prefix/suffix via `src/wrappers.ts`, assembles `dist/manifest.json` (primary artifact) + `dist/game.min.js` (verification copy) + `dist/metadata.json`. - **src/patches.ts** — `PatchRule` type, `RULES` array, `applyRules`, `hashRules`. -- **src/wrappers.ts** — `buildPrefix(version)`, `buildSuffix(version, guiLink, displayImages)`. +- **src/wrappers.ts** — `buildPrefix(version)`, `buildSuffix(version, displayImages)`; `buildSuffix` reads `window.__ORIGIN_MENU_URL__`, which is provided via `manifest.defaultMenuUrl`. - **src/manifest.ts** — `Manifest` type, `buildManifest`, `hashManifest`. - **src/constants.ts** — URLs, version, GUI link. - **src/displayImages.ts** — Console splash images.